commit bbf5c979011a099af5dc76498918ed7df445635b Author: Linus Torvalds Date: Sun Oct 11 14:15:50 2020 -0700 Linux 5.9 commit 3dd0130f2430decf0cb001b452824515436986d2 Merge: 5b697f86f9f13 4aab2be098303 Author: Linus Torvalds Date: Sun Oct 11 11:18:04 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "Five fixes. Subsystems affected by this patch series: MAINTAINERS, mm/pagemap, mm/swap, and mm/hugetlb" * emailed patches from Andrew Morton : mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged mm: validate inode in mapping_set_error() mm: mmap: Fix general protection fault in unlink_file_vma() MAINTAINERS: Antoine Tenart's email address MAINTAINERS: change hardening mailing list commit 5b697f86f9f136d200c9827d6eca0437b7eb96cf Merge: c120ec12e2162 8a018eb55e3ac Author: Linus Torvalds Date: Sun Oct 11 11:11:35 2020 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fix from Al Viro: "Fixes an obvious bug (memory leak introduced in 5.8)" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: pipe: Fix memory leaks in create_pipe_files() commit c120ec12e216225f7536cc1b924fe428ff64b5bd Merge: aa5c3a2911e6d 0c7689830e907 Author: Linus Torvalds Date: Sun Oct 11 10:53:37 2020 -0700 Merge tag 'x86-urgent-2020-10-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Two fixes: - Fix a (hopefully final) IRQ state tracking bug vs MCE handling - Fix a documentation link" * tag 'x86-urgent-2020-10-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation/x86: Fix incorrect references to zero-page.txt x86/mce: Use idtentry_nmi_enter/exit() commit aa5c3a2911e6d5feaf0c3c7af5bbc652f129d8b2 Merge: da690031a5d6d 6d6b8b9f4fcea Author: Linus Torvalds Date: Sun Oct 11 10:43:37 2020 -0700 Merge tag 'perf-urgent-2020-10-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Ingo Molnar: "Fix an error handling bug that can cause a lockup if a CPU is offline (doh ...)" * tag 'perf-urgent-2020-10-11' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Fix task_function_call() error handling commit 4aab2be0983031a05cb4a19696c9da5749523426 Author: Vijay Balakrishna Date: Sat Oct 10 23:16:40 2020 -0700 mm: khugepaged: recalculate min_free_kbytes after memory hotplug as expected by khugepaged When memory is hotplug added or removed the min_free_kbytes should be recalculated based on what is expected by khugepaged. Currently after hotplug, min_free_kbytes will be set to a lower default and higher default set when THP enabled is lost. This change restores min_free_kbytes as expected for THP consumers. [vijayb@linux.microsoft.com: v5] Link: https://lkml.kernel.org/r/1601398153-5517-1-git-send-email-vijayb@linux.microsoft.com Fixes: f000565adb77 ("thp: set recommended min free kbytes") Signed-off-by: Vijay Balakrishna Signed-off-by: Andrew Morton Reviewed-by: Pavel Tatashin Acked-by: Michal Hocko Cc: Allen Pais Cc: Andrea Arcangeli Cc: "Kirill A. Shutemov" Cc: Oleg Nesterov Cc: Song Liu Cc: Link: https://lkml.kernel.org/r/1600305709-2319-2-git-send-email-vijayb@linux.microsoft.com Link: https://lkml.kernel.org/r/1600204258-13683-1-git-send-email-vijayb@linux.microsoft.com Signed-off-by: Linus Torvalds commit 8b7b2eb131d3476062ffd34358785b44be25172f Author: Minchan Kim Date: Sat Oct 10 23:16:37 2020 -0700 mm: validate inode in mapping_set_error() The swap address_space doesn't have host. Thus, it makes kernel crash once swap write meets error. Fix it. Fixes: 735e4ae5ba28 ("vfs: track per-sb writeback errors and report them to syncfs") Signed-off-by: Minchan Kim Signed-off-by: Andrew Morton Acked-by: Jeff Layton Cc: Jan Kara Cc: Andres Freund Cc: Matthew Wilcox Cc: Al Viro Cc: Christoph Hellwig Cc: Dave Chinner Cc: David Howells Cc: Link: https://lkml.kernel.org/r/20201010000650.750063-1-minchan@kernel.org Signed-off-by: Linus Torvalds commit bc4fe4cdd602b3bee5eeb49d843bd6b3296cfc86 Author: Miaohe Lin Date: Sat Oct 10 23:16:34 2020 -0700 mm: mmap: Fix general protection fault in unlink_file_vma() The syzbot reported the below general protection fault: general protection fault, probably for non-canonical address 0xe00eeaee0000003b: 0000 [#1] PREEMPT SMP KASAN KASAN: maybe wild-memory-access in range [0x00777770000001d8-0x00777770000001df] CPU: 1 PID: 10488 Comm: syz-executor721 Not tainted 5.9.0-rc3-syzkaller #0 RIP: 0010:unlink_file_vma+0x57/0xb0 mm/mmap.c:164 Call Trace: free_pgtables+0x1b3/0x2f0 mm/memory.c:415 exit_mmap+0x2c0/0x530 mm/mmap.c:3184 __mmput+0x122/0x470 kernel/fork.c:1076 mmput+0x53/0x60 kernel/fork.c:1097 exit_mm kernel/exit.c:483 [inline] do_exit+0xa8b/0x29f0 kernel/exit.c:793 do_group_exit+0x125/0x310 kernel/exit.c:903 get_signal+0x428/0x1f00 kernel/signal.c:2757 arch_do_signal+0x82/0x2520 arch/x86/kernel/signal.c:811 exit_to_user_mode_loop kernel/entry/common.c:136 [inline] exit_to_user_mode_prepare+0x1ae/0x200 kernel/entry/common.c:167 syscall_exit_to_user_mode+0x7e/0x2e0 kernel/entry/common.c:242 entry_SYSCALL_64_after_hwframe+0x44/0xa9 It's because the ->mmap() callback can change vma->vm_file and fput the original file. But the commit d70cec898324 ("mm: mmap: merge vma after call_mmap() if possible") failed to catch this case and always fput() the original file, hence add an extra fput(). [ Thanks Hillf for pointing this extra fput() out. ] Fixes: d70cec898324 ("mm: mmap: merge vma after call_mmap() if possible") Reported-by: syzbot+c5d5a51dcbb558ca0cb5@syzkaller.appspotmail.com Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Cc: Christian König Cc: Hongxiang Lou Cc: Chris Wilson Cc: Dave Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: Matthew Wilcox (Oracle) Cc: John Hubbard Link: https://lkml.kernel.org/r/20200916090733.31427-1-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit 512b557ac8a869932e03f1fd522419f4348118bf Author: Antoine Tenart Date: Sat Oct 10 23:16:30 2020 -0700 MAINTAINERS: Antoine Tenart's email address Use my kernel.org address instead of my bootlin.com one. Signed-off-by: Antoine Tenart Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20201005164533.16811-1-atenart@kernel.org Signed-off-by: Linus Torvalds commit ae4a380109d154ffbc7e2b6204d79b1a171671bb Author: Kees Cook Date: Sat Oct 10 23:16:27 2020 -0700 MAINTAINERS: change hardening mailing list As more email from git history gets aimed at the OpenWall kernel-hardening@ list, there has been a desire to separate "new topics" from "on-going" work. To handle this, the superset of hardening email topics are now to be directed to linux-hardening@vger.kernel.org. Update the MAINTAINERS file and the .mailmap to accomplish this, so that linux-hardening@ can be treated like any other regular upstream kernel development list. Signed-off-by: Kees Cook Signed-off-by: Andrew Morton Cc: Randy Dunlap Cc: Emese Revfy Cc: "Tobin C. Harding" Cc: Tycho Andersen Cc: Jonathan Corbet Link: https://lore.kernel.org/linux-hardening/202010051443.279CC265D@keescook/ Link: https://lkml.kernel.org/r/20201006000012.2768958-1-keescook@chromium.org Signed-off-by: Linus Torvalds commit da690031a5d6d50a361e3f19f3eeabd086a6f20d Merge: 64b7f674c2922 f5b3f433641c5 Author: Linus Torvalds Date: Sat Oct 10 16:09:12 2020 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Some more driver bugfixes for I2C. Including a revert - the updated series for it will come during the next merge window" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: owl: Clear NACK and BUS error bits Revert "i2c: imx: Fix reset of I2SR_IAL flag" i2c: meson: fixup rate calculation with filter delay i2c: meson: keep peripheral clock enabled i2c: meson: fix clock setting overwrite i2c: imx: Fix reset of I2SR_IAL flag commit 64b7f674c292207624b3d788eda2dde3dc1415df Author: Vladimir Zapolskiy Date: Sat Oct 10 21:25:54 2020 +0300 cifs: Fix incomplete memory allocation on setxattr path On setxattr() syscall path due to an apprent typo the size of a dynamically allocated memory chunk for storing struct smb2_file_full_ea_info object is computed incorrectly, to be more precise the first addend is the size of a pointer instead of the wanted object size. Coincidentally it makes no difference on 64-bit platforms, however on 32-bit targets the following memcpy() writes 4 bytes of data outside of the dynamically allocated memory. ============================================================================= BUG kmalloc-16 (Not tainted): Redzone overwritten ----------------------------------------------------------------------------- Disabling lock debugging due to kernel taint INFO: 0x79e69a6f-0x9e5cdecf @offset=368. First byte 0x73 instead of 0xcc INFO: Slab 0xd36d2454 objects=85 used=51 fp=0xf7d0fc7a flags=0x35000201 INFO: Object 0x6f171df3 @offset=352 fp=0x00000000 Redzone 5d4ff02d: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc ................ Object 6f171df3: 00 00 00 00 00 05 06 00 73 6e 72 75 62 00 66 69 ........snrub.fi Redzone 79e69a6f: 73 68 32 0a sh2. Padding 56254d82: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ CPU: 0 PID: 8196 Comm: attr Tainted: G B 5.9.0-rc8+ #3 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1 04/01/2014 Call Trace: dump_stack+0x54/0x6e print_trailer+0x12c/0x134 check_bytes_and_report.cold+0x3e/0x69 check_object+0x18c/0x250 free_debug_processing+0xfe/0x230 __slab_free+0x1c0/0x300 kfree+0x1d3/0x220 smb2_set_ea+0x27d/0x540 cifs_xattr_set+0x57f/0x620 __vfs_setxattr+0x4e/0x60 __vfs_setxattr_noperm+0x4e/0x100 __vfs_setxattr_locked+0xae/0xd0 vfs_setxattr+0x4e/0xe0 setxattr+0x12c/0x1a0 path_setxattr+0xa4/0xc0 __ia32_sys_lsetxattr+0x1d/0x20 __do_fast_syscall_32+0x40/0x70 do_fast_syscall_32+0x29/0x60 do_SYSENTER_32+0x15/0x20 entry_SYSENTER_32+0x9f/0xf2 Fixes: 5517554e4313 ("cifs: Add support for writing attributes on SMB2+") Signed-off-by: Vladimir Zapolskiy Signed-off-by: Linus Torvalds commit 033b5d77551167f8c24ca862ce83d3e0745f9245 Author: Hugh Dickins Date: Fri Oct 9 20:07:59 2020 -0700 mm/khugepaged: fix filemap page_to_pgoff(page) != offset There have been elusive reports of filemap_fault() hitting its VM_BUG_ON_PAGE(page_to_pgoff(page) != offset, page) on kernels built with CONFIG_READ_ONLY_THP_FOR_FS=y. Suren has hit it on a kernel with CONFIG_READ_ONLY_THP_FOR_FS=y and CONFIG_NUMA is not set: and he has analyzed it down to how khugepaged without NUMA reuses the same huge page after collapse_file() failed (whereas NUMA targets its allocation to the respective node each time). And most of us were usually testing with CONFIG_NUMA=y kernels. collapse_file(old start) new_page = khugepaged_alloc_page(hpage) __SetPageLocked(new_page) new_page->index = start // hpage->index=old offset new_page->mapping = mapping xas_store(&xas, new_page) filemap_fault page = find_get_page(mapping, offset) // if offset falls inside hpage then // compound_head(page) == hpage lock_page_maybe_drop_mmap() __lock_page(page) // collapse fails xas_store(&xas, old page) new_page->mapping = NULL unlock_page(new_page) collapse_file(new start) new_page = khugepaged_alloc_page(hpage) __SetPageLocked(new_page) new_page->index = start // hpage->index=new offset new_page->mapping = mapping // mapping becomes valid again // since compound_head(page) == hpage // page_to_pgoff(page) got changed VM_BUG_ON_PAGE(page_to_pgoff(page) != offset) An initial patch replaced __SetPageLocked() by lock_page(), which did fix the race which Suren illustrates above. But testing showed that it's not good enough: if the racing task's __lock_page() gets delayed long after its find_get_page(), then it may follow collapse_file(new start)'s successful final unlock_page(), and crash on the same VM_BUG_ON_PAGE. It could be fixed by relaxing filemap_fault()'s VM_BUG_ON_PAGE to a check and retry (as is done for mapping), with similar relaxations in find_lock_entry() and pagecache_get_page(): but it's not obvious what else might get caught out; and khugepaged non-NUMA appears to be unique in exposing a page to page cache, then revoking, without going through a full cycle of freeing before reuse. Instead, non-NUMA khugepaged_prealloc_page() release the old page if anyone else has a reference to it (1% of cases when I tested). Although never reported on huge tmpfs, I believe its find_lock_entry() has been at similar risk; but huge tmpfs does not rely on khugepaged for its normal working nearly so much as READ_ONLY_THP_FOR_FS does. Reported-by: Denis Lisov Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206569 Link: https://lore.kernel.org/linux-mm/?q=20200219144635.3b7417145de19b65f258c943%40linux-foundation.org Reported-by: Qian Cai Link: https://lore.kernel.org/linux-xfs/?q=20200616013309.GB815%40lca.pw Reported-and-analyzed-by: Suren Baghdasaryan Fixes: 87c460a0bded ("mm/khugepaged: collapse_shmem() without freezing new_page") Signed-off-by: Hugh Dickins Cc: stable@vger.kernel.org # v4.9+ Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Linus Torvalds commit f5b3f433641c543ebe5171285a42aa6adcdb2d22 Author: Cristian Ciocaltea Date: Fri Oct 9 00:44:39 2020 +0300 i2c: owl: Clear NACK and BUS error bits When the NACK and BUS error bits are set by the hardware, the driver is responsible for clearing them by writing "1" into the corresponding status registers. Hence perform the necessary operations in owl_i2c_interrupt(). Fixes: d211e62af466 ("i2c: Add Actions Semiconductor Owl family S900 I2C driver") Reported-by: Manivannan Sadhasivam Signed-off-by: Cristian Ciocaltea Signed-off-by: Wolfram Sang commit 5a02e7c429cb5e082e5d7be6e5b768828014ba70 Author: Wolfram Sang Date: Sat Oct 10 13:03:54 2020 +0200 Revert "i2c: imx: Fix reset of I2SR_IAL flag" This reverts commit fa4d30556883f2eaab425b88ba9904865a4d00f3. An updated version was sent. So, revert this version and give the new version more time for testing. Signed-off-by: Wolfram Sang commit 6f2f486d57c4d562cdf4932320b66fbb878ab1c4 Merge: 8a5f78d98c26c 1c33524f79853 Author: Linus Torvalds Date: Fri Oct 9 18:05:12 2020 -0700 Merge tag 'spi-fix-v5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fix from Mark Brown: "One last minute fix for v5.9 which has been causing crashes in test systems with the fsl-dspi driver when they hit deferred probe (and which I probably let cook in next a bit longer than is ideal). And an update to MAINTAINERS reflecting Serge's extensive and detailed recent work on the DesignWare driver" * tag 'spi-fix-v5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: MAINTAINERS: Add maintainer of DW APB SSI driver spi: fsl-dspi: fix NULL pointer dereference commit 8a5f78d98c26c8e2a79ea37224435d2b434453e1 Merge: 277e570ae193d 84814460eef9a Author: Linus Torvalds Date: Fri Oct 9 11:49:22 2020 -0700 Merge tag 'riscv-for-linus-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: "Two fixes this week: - A fix to actually reserve the device tree's memory. Without this the device tree can be overwritten on systems that don't otherwise reserve it. This issue should only manifest on !MMU systems. - A workaround for a BUG() that triggers when the memory that originally contained initdata is freed and later repurposed. This triggers a BUG() on builds that had HARDENED_USERCOPY enabled" * tag 'riscv-for-linus-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fixup bootup failure with HARDENED_USERCOPY RISC-V: Make sure memblock reserves the memory containing DT commit 277e570ae193ddd39a7d16f08e3647f2f110c6a3 Merge: d813a8cb8d902 e3f2396b75707 Author: Linus Torvalds Date: Fri Oct 9 11:38:07 2020 -0700 Merge tag 'for-v5.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fix from Sebastian Reichel: "Just a single change to revert enablement of packet error checking for battery data on Chromebooks, since some of their embedded controllers do not handle it correctly" * tag 'for-v5.9-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: sbs-battery: chromebook workaround for PEC commit d813a8cb8d90225a6c0051b5b050c8dd03cc435c Merge: f318052ef2f07 8b81edd80baf1 Author: Linus Torvalds Date: Fri Oct 9 11:33:48 2020 -0700 Merge tag 'gpio-v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Some late fixes: one IRQ issue and one compilation issue for UML. - Fix a compilation issue with User Mode Linux - Handle spurious interrupts properly in the PCA953x driver" * tag 'gpio-v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: pca953x: Survive spurious interrupts gpiolib: Disable compat ->read() code in UML case commit f318052ef2f07da2cd0c535d0d2900d5080a47e1 Merge: fd330b1bc2f58 4243219141b67 Author: Linus Torvalds Date: Fri Oct 9 10:10:52 2020 -0700 Merge tag 'mmc-v5.9-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fix from Ulf Hansson: "Assign a proper discard granularity rather than incorrectly set it to zero" * tag 'mmc-v5.9-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: core: don't set limits.discard_granularity as 0 commit fd330b1bc2f5840d68cbfa61c60573b4250bf14f Merge: 583090b1b8232 dded93ffbb8c4 Author: Linus Torvalds Date: Fri Oct 9 09:59:36 2020 -0700 Merge tag 'drm-fixes-2020-10-09' of git://anongit.freedesktop.org/drm/drm Pull amdgpu drm fixes from Dave Airlie: "Fixes trickling in this week. Alex had a final fix for the newest GPU they introduced in rc1, along with one build regression and one crasher fix. Cross my fingers that's it for 5.9: - Fix a crash on renoir if you override the IP discovery parameter - Fix the build on ARC platforms - Display fix for Sienna Cichlid" * tag 'drm-fixes-2020-10-09' of git://anongit.freedesktop.org/drm/drm: drm/amd/display: Change ABM config init interface drm/amdgpu/swsmu: fix ARC build errors drm/amdgpu: fix NULL pointer dereference for Renoir commit 4243219141b67d7c2fdb2d8073c17c539b9263eb Author: Coly Li Date: Fri Oct 2 09:38:52 2020 +0800 mmc: core: don't set limits.discard_granularity as 0 In mmc_queue_setup_discard() the mmc driver queue's discard_granularity might be set as 0 (when card->pref_erase > max_discard) while the mmc device still declares to support discard operation. This is buggy and triggered the following kernel warning message, WARNING: CPU: 0 PID: 135 at __blkdev_issue_discard+0x200/0x294 CPU: 0 PID: 135 Comm: f2fs_discard-17 Not tainted 5.9.0-rc6 #1 Hardware name: Google Kevin (DT) pstate: 00000005 (nzcv daif -PAN -UAO BTYPE=--) pc : __blkdev_issue_discard+0x200/0x294 lr : __blkdev_issue_discard+0x54/0x294 sp : ffff800011dd3b10 x29: ffff800011dd3b10 x28: 0000000000000000 x27: ffff800011dd3cc4 x26: ffff800011dd3e18 x25: 000000000004e69b x24: 0000000000000c40 x23: ffff0000f1deaaf0 x22: ffff0000f2849200 x21: 00000000002734d8 x20: 0000000000000008 x19: 0000000000000000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000394 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 00000000000008b0 x9 : ffff800011dd3cb0 x8 : 000000000004e69b x7 : 0000000000000000 x6 : ffff0000f1926400 x5 : ffff0000f1940800 x4 : 0000000000000000 x3 : 0000000000000c40 x2 : 0000000000000008 x1 : 00000000002734d8 x0 : 0000000000000000 Call trace: __blkdev_issue_discard+0x200/0x294 __submit_discard_cmd+0x128/0x374 __issue_discard_cmd_orderly+0x188/0x244 __issue_discard_cmd+0x2e8/0x33c issue_discard_thread+0xe8/0x2f0 kthread+0x11c/0x120 ret_from_fork+0x10/0x1c ---[ end trace e4c8023d33dfe77a ]--- This patch fixes the issue by setting discard_granularity as SECTOR_SIZE instead of 0 when (card->pref_erase > max_discard) is true. Now no more complain from __blkdev_issue_discard() for the improper value of discard granularity. This issue is exposed after commit b35fd7422c2f ("block: check queue's limits.discard_granularity in __blkdev_issue_discard()"), a "Fixes:" tag is also added for the commit to make sure people won't miss this patch after applying the change of __blkdev_issue_discard(). Fixes: e056a1b5b67b ("mmc: queue: let host controllers specify maximum discard timeout") Fixes: b35fd7422c2f ("block: check queue's limits.discard_granularity in __blkdev_issue_discard()"). Reported-and-tested-by: Vicente Bergas Signed-off-by: Coly Li Acked-by: Adrian Hunter Cc: Ulf Hansson Link: https://lore.kernel.org/r/20201002013852.51968-1-colyli@suse.de Signed-off-by: Ulf Hansson commit 6d6b8b9f4fceab7266ca03d194f60ec72bd4b654 Author: Kajol Jain Date: Thu Aug 27 12:17:32 2020 +0530 perf: Fix task_function_call() error handling The error handling introduced by commit: 2ed6edd33a21 ("perf: Add cond_resched() to task_function_call()") looses any return value from smp_call_function_single() that is not {0, -EINVAL}. This is a problem because it will return -EXNIO when the target CPU is offline. Worse, in that case it'll turn into an infinite loop. Fixes: 2ed6edd33a21 ("perf: Add cond_resched() to task_function_call()") Reported-by: Srikar Dronamraju Signed-off-by: Kajol Jain Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Barret Rhoden Tested-by: Srikar Dronamraju Link: https://lkml.kernel.org/r/20200827064732.20860-1-kjain@linux.ibm.com commit dded93ffbb8c4a578adf13b54cd62519908a23f8 Merge: d10285a25e29f 33c8256b3bcc0 Author: Dave Airlie Date: Fri Oct 9 13:02:49 2020 +1000 Merge tag 'amd-drm-fixes-5.9-2020-10-08' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.9-2020-10-08: amdgpu: - Fix a crash on renoir if you override the IP discovery parameter - Fix the build on ARC platforms - Display fix for Sienna Cichlid Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20201009024917.3984-1-alexander.deucher@amd.com commit 583090b1b8232e6eae243a9009699666153a13a9 Merge: 3fdd47c3b40ac e0894cd618e42 Author: Linus Torvalds Date: Thu Oct 8 18:48:34 2020 -0700 Merge tag 'block5.9-2020-10-08' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few fixes that should go into this release: - NVMe controller error path reference fix (Chaitanya) - Fix regression with IBM partitions on non-dasd devices (Christoph) - Fix a missing clear in the compat CDROM packet structure (Peilin)" * tag 'block5.9-2020-10-08' of git://git.kernel.dk/linux-block: partitions/ibm: fix non-DASD devices nvme-core: put ctrl ref when module ref get fail block/scsi-ioctl: Fix kernel-infoleak in scsi_put_cdrom_generic_arg() commit e3f2396b7570751a7ddba996812fb608134fd63c Author: Sebastian Reichel Date: Mon Oct 5 00:46:01 2020 +0200 power: supply: sbs-battery: chromebook workaround for PEC Looks like the I2C tunnel implementation from Chromebook's embedded controller does not handle PEC correctly. Fix this by disabling PEC for batteries behind those I2C tunnels as a workaround. Note, that some Chromebooks actually have been reported to have working PEC support (with I2C tunnel). Since the problem has not yet been fully understood this simply reverts all Chromebooks to not use PEC for now. Reported-by: "Milan P. Stanić" Reported-by: Vicente Bergas CC: Enric Balletbo i Serra Fixes: 7222bd603dd2 ("power: supply: sbs-battery: add PEC support") Tested-by: Vicente Bergas Tested-by: "Milan P. Stanić" Signed-off-by: Sebastian Reichel commit 3fdd47c3b40ac48e6e6e5904cf24d12e6e073a96 Merge: 6288c1d8024ee aff90770e54cd Author: Linus Torvalds Date: Thu Oct 8 14:25:46 2020 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull vhost fixes from Michael Tsirkin: "Some last minute vhost,vdpa fixes. The last two of them haven't been in next but they do seem kind of obvious, very small and safe, fix bugs reported in the field, and they are both in a new mlx5 vdpa driver, so it's not like we can introduce regressions" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vdpa/mlx5: Fix dependency on MLX5_CORE vdpa/mlx5: should keep avail_index despite device status vhost-vdpa: fix page pinning leakage in error path vhost-vdpa: fix vhost_vdpa_map() on error condition vhost: Don't call log_access_ok() when using IOTLB vhost: Use vhost_get_used_size() in vhost_vring_set_addr() vhost: Don't call access_ok() when using IOTLB vhost vdpa: fix vhost_vdpa_open error handling commit 33c8256b3bcc0425caec2bb7511e34176f464348 Author: Yongqiang Sun Date: Fri Jul 31 13:57:05 2020 -0400 drm/amd/display: Change ABM config init interface [Why & How] change abm config init interface to support multiple ABMs. Signed-off-by: Yongqiang Sun Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 6288c1d8024eebb7a1ccdbab80f6e857ac94eeb0 Merge: 3d006ee42dde0 28802e7c0c995 Author: Linus Torvalds Date: Thu Oct 8 14:11:21 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "One more set of fixes from the networking tree: - add missing input validation in nl80211_del_key(), preventing out-of-bounds access - last minute fix / improvement of a MRP netlink (uAPI) interface introduced in 5.9 (current) release - fix "unresolved symbol" build error under CONFIG_NET w/o CONFIG_INET due to missing tcp_timewait_sock and inet_timewait_sock BTF. - fix 32 bit sub-register bounds tracking in the bpf verifier for OR case - tcp: fix receive window update in tcp_add_backlog() - openvswitch: handle DNAT tuple collision in conntrack-related code - r8169: wait for potential PHY reset to finish after applying a FW file, avoiding unexpected PHY behaviour and failures later on - mscc: fix tail dropping watermarks for Ocelot switches - avoid use-after-free in macsec code after a call to the GRO layer - avoid use-after-free in sctp error paths - add a device id for Cellient MPL200 WWAN card - rxrpc fixes: - fix the xdr encoding of the contents read from an rxrpc key - fix a BUG() for a unsupported encoding type. - fix missing _bh lock annotations. - fix acceptance handling for an incoming call where the incoming call is encrypted. - the server token keyring isn't network namespaced - it belongs to the server, so there's no need. Namespacing it means that request_key() fails to find it. - fix a leak of the server keyring" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (21 commits) net: usb: qmi_wwan: add Cellient MPL200 card macsec: avoid use-after-free in macsec_handle_frame() r8169: consider that PHY reset may still be in progress after applying firmware openvswitch: handle DNAT tuple collision sctp: fix sctp_auth_init_hmacs() error path bridge: Netlink interface fix. net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key() bpf: Fix scalar32_min_max_or bounds tracking tcp: fix receive window update in tcp_add_backlog() net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails mptcp: more DATA FIN fixes net: mscc: ocelot: warn when encoding an out-of-bounds watermark value net: mscc: ocelot: divide watermark value by 60 when writing to SYS_ATOP net: qrtr: ns: Fix the incorrect usage of rcu_read_lock() rxrpc: Fix server keyring leak rxrpc: The server keyring isn't network-namespaced rxrpc: Fix accept on a connection that need securing rxrpc: Fix some missing _bh annotations on locking conn->state_lock rxrpc: Downgrade the BUG() for unsupported token type in rxrpc_read() rxrpc: Fix rxkad token xdr encoding ... commit aff90770e54cdb40228f2ab339339e95d0aa0c9a Author: Eli Cohen Date: Wed Oct 7 09:40:11 2020 +0300 vdpa/mlx5: Fix dependency on MLX5_CORE Remove propmt for selecting MLX5_VDPA by the user and modify MLX5_VDPA_NET to select MLX5_VDPA. Also modify MLX5_VDPA_NET to depend on mlx5_core. This fixes an issue where configuration sets 'y' for MLX5_VDPA_NET while MLX5_CORE is compiled as a module causing link errors. Reported-by: kernel test robot Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 device")s Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20201007064011.GA50074@mtl-vdi-166.wap.labs.mlnx Signed-off-by: Michael S. Tsirkin commit 3176e974a750d6b700a10ffba0ec18d5a884fade Author: Si-Wei Liu Date: Thu Oct 1 16:18:31 2020 -0400 vdpa/mlx5: should keep avail_index despite device status A VM with mlx5 vDPA has below warnings while being reset: vhost VQ 0 ring restore failed: -1: Resource temporarily unavailable (11) vhost VQ 1 ring restore failed: -1: Resource temporarily unavailable (11) We should allow userspace emulating the virtio device be able to get to vq's avail_index, regardless of vDPA device status. Save the index that was last seen when virtq was stopped, so that userspace doesn't complain. Signed-off-by: Si-Wei Liu Link: https://lore.kernel.org/r/1601583511-15138-1-git-send-email-si-wei.liu@oracle.com Signed-off-by: Michael S. Tsirkin Acked-by: Eli Cohen commit 28802e7c0c9954218d1830f7507edc9d49b03a00 Author: Wilken Gottwalt Date: Thu Oct 8 09:21:38 2020 +0200 net: usb: qmi_wwan: add Cellient MPL200 card Add usb ids of the Cellient MPL200 card. Signed-off-by: Wilken Gottwalt Acked-by: Bjørn Mork Signed-off-by: Jakub Kicinski commit c7cc9200e9b4a2ac172e990ef1975cd42975dad6 Author: Eric Dumazet Date: Wed Oct 7 01:42:46 2020 -0700 macsec: avoid use-after-free in macsec_handle_frame() De-referencing skb after call to gro_cells_receive() is not allowed. We need to fetch skb->len earlier. Fixes: 5491e7c6b1a9 ("macsec: enable GRO and RPS on macsec devices") Signed-off-by: Eric Dumazet Cc: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Jakub Kicinski commit 47dda78671a3d5cee3fb2229e37997d2ac8a3b54 Author: Heiner Kallweit Date: Wed Oct 7 13:34:51 2020 +0200 r8169: consider that PHY reset may still be in progress after applying firmware Some firmware files trigger a PHY soft reset and don't wait for it to be finished. PHY register writes directly after applying the firmware may fail or provide unexpected results therefore. Fix this by waiting for bit BMCR_RESET to be cleared after applying firmware. There's nothing wrong with the referenced change, it's just that the fix will apply cleanly only after this change. Fixes: 89fbd26cca7e ("r8169: fix firmware not resetting tp->ocp_base") Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 8aa7b526dc0b5dbf40c1b834d76a667ad672a410 Author: Dumitru Ceara Date: Wed Oct 7 17:48:03 2020 +0200 openvswitch: handle DNAT tuple collision With multiple DNAT rules it's possible that after destination translation the resulting tuples collide. For example, two openvswitch flows: nw_dst=10.0.0.10,tp_dst=10, actions=ct(commit,table=2,nat(dst=20.0.0.1:20)) nw_dst=10.0.0.20,tp_dst=10, actions=ct(commit,table=2,nat(dst=20.0.0.1:20)) Assuming two TCP clients initiating the following connections: 10.0.0.10:5000->10.0.0.10:10 10.0.0.10:5000->10.0.0.20:10 Both tuples would translate to 10.0.0.10:5000->20.0.0.1:20 causing nf_conntrack_confirm() to fail because of tuple collision. Netfilter handles this case by allocating a null binding for SNAT at egress by default. Perform the same operation in openvswitch for DNAT if no explicit SNAT is requested by the user and allocate a null binding for SNAT for packets in the "original" direction. Reported-at: https://bugzilla.redhat.com/1877128 Suggested-by: Florian Westphal Fixes: 05752523e565 ("openvswitch: Interface with NAT.") Signed-off-by: Dumitru Ceara Signed-off-by: Jakub Kicinski commit d42ee76ecb6c49d499fc5eb32ca34468d95dbc3e Author: Eric Dumazet Date: Thu Oct 8 01:38:31 2020 -0700 sctp: fix sctp_auth_init_hmacs() error path After freeing ep->auth_hmacs we have to clear the pointer or risk use-after-free as reported by syzbot: BUG: KASAN: use-after-free in sctp_auth_destroy_hmacs net/sctp/auth.c:509 [inline] BUG: KASAN: use-after-free in sctp_auth_destroy_hmacs net/sctp/auth.c:501 [inline] BUG: KASAN: use-after-free in sctp_auth_free+0x17e/0x1d0 net/sctp/auth.c:1070 Read of size 8 at addr ffff8880a8ff52c0 by task syz-executor941/6874 CPU: 0 PID: 6874 Comm: syz-executor941 Not tainted 5.9.0-rc8-syzkaller #0 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+0x198/0x1fd lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 sctp_auth_destroy_hmacs net/sctp/auth.c:509 [inline] sctp_auth_destroy_hmacs net/sctp/auth.c:501 [inline] sctp_auth_free+0x17e/0x1d0 net/sctp/auth.c:1070 sctp_endpoint_destroy+0x95/0x240 net/sctp/endpointola.c:203 sctp_endpoint_put net/sctp/endpointola.c:236 [inline] sctp_endpoint_free+0xd6/0x110 net/sctp/endpointola.c:183 sctp_destroy_sock+0x9c/0x3c0 net/sctp/socket.c:4981 sctp_v6_destroy_sock+0x11/0x20 net/sctp/socket.c:9415 sk_common_release+0x64/0x390 net/core/sock.c:3254 sctp_close+0x4ce/0x8b0 net/sctp/socket.c:1533 inet_release+0x12e/0x280 net/ipv4/af_inet.c:431 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:475 __sock_release+0xcd/0x280 net/socket.c:596 sock_close+0x18/0x20 net/socket.c:1277 __fput+0x285/0x920 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:141 exit_task_work include/linux/task_work.h:25 [inline] do_exit+0xb7d/0x29f0 kernel/exit.c:806 do_group_exit+0x125/0x310 kernel/exit.c:903 __do_sys_exit_group kernel/exit.c:914 [inline] __se_sys_exit_group kernel/exit.c:912 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:912 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x43f278 Code: Bad RIP value. RSP: 002b:00007fffe0995c38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043f278 RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000 RBP: 00000000004bf068 R08: 00000000000000e7 R09: ffffffffffffffd0 R10: 0000000020000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00000000006d1180 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 6874: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 kmem_cache_alloc_trace+0x174/0x300 mm/slab.c:3554 kmalloc include/linux/slab.h:554 [inline] kmalloc_array include/linux/slab.h:593 [inline] kcalloc include/linux/slab.h:605 [inline] sctp_auth_init_hmacs+0xdb/0x3b0 net/sctp/auth.c:464 sctp_auth_init+0x8a/0x4a0 net/sctp/auth.c:1049 sctp_setsockopt_auth_supported net/sctp/socket.c:4354 [inline] sctp_setsockopt+0x477e/0x97f0 net/sctp/socket.c:4631 __sys_setsockopt+0x2db/0x610 net/socket.c:2132 __do_sys_setsockopt net/socket.c:2143 [inline] __se_sys_setsockopt net/socket.c:2140 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2140 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 6874: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422 __cache_free mm/slab.c:3422 [inline] kfree+0x10e/0x2b0 mm/slab.c:3760 sctp_auth_destroy_hmacs net/sctp/auth.c:511 [inline] sctp_auth_destroy_hmacs net/sctp/auth.c:501 [inline] sctp_auth_init_hmacs net/sctp/auth.c:496 [inline] sctp_auth_init_hmacs+0x2b7/0x3b0 net/sctp/auth.c:454 sctp_auth_init+0x8a/0x4a0 net/sctp/auth.c:1049 sctp_setsockopt_auth_supported net/sctp/socket.c:4354 [inline] sctp_setsockopt+0x477e/0x97f0 net/sctp/socket.c:4631 __sys_setsockopt+0x2db/0x610 net/socket.c:2132 __do_sys_setsockopt net/socket.c:2143 [inline] __se_sys_setsockopt net/socket.c:2140 [inline] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2140 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 1f485649f529 ("[SCTP]: Implement SCTP-AUTH internals") Signed-off-by: Eric Dumazet Cc: Vlad Yasevich Cc: Neil Horman Cc: Marcelo Ricardo Leitner Acked-by: Marcelo Ricardo Leitner Signed-off-by: Jakub Kicinski commit a9e54cb3d5eba9d7728f8efda98d7cca85ee3387 Merge: cfe90f4980ee2 3dc289f8f1399 Author: Jakub Kicinski Date: Thu Oct 8 12:18:34 2020 -0700 Merge tag 'mac80211-for-net-2020-10-08' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== pull-request: mac80211 2020-10-08 A single fix for missing input validation in nl80211. ==================== Signed-off-by: Jakub Kicinski commit cfe90f4980ee27ebfa24e4c4b3cd56dc9b67ef42 Merge: b6c02ef549134 5b9fbeb75b6a9 Author: Jakub Kicinski Date: Thu Oct 8 12:05:37 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-10-08 The main changes are: 1) Fix "unresolved symbol" build error under CONFIG_NET w/o CONFIG_INET due to missing tcp_timewait_sock and inet_timewait_sock BTF, from Yonghong Song. 2) Fix 32 bit sub-register bounds tracking for OR case, from Daniel Borkmann. ==================== Signed-off-by: Jakub Kicinski commit b6c02ef549134d7bf14fa3835ad2bd3738982689 Author: Henrik Bjoernlund Date: Wed Oct 7 12:07:00 2020 +0000 bridge: Netlink interface fix. This commit is correcting NETLINK br_fill_ifinfo() to be able to handle 'filter_mask' with multiple flags asserted. Fixes: 36a8e8e265420 ("bridge: Extend br_fill_ifinfo to return MPR status") Signed-off-by: Henrik Bjoernlund Reviewed-by: Horatiu Vultur Suggested-by: Nikolay Aleksandrov Tested-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: Jakub Kicinski commit 3d006ee42dde0b08b7b47697def6f50fd849c996 Merge: b9e3aa2a9bd49 d10285a25e29f Author: Linus Torvalds Date: Thu Oct 8 11:14:17 2020 -0700 Merge tag 'drm-fixes-2020-10-08' of git://anongit.freedesktop.org/drm/drm Pull drm nouveau fixes from Dave Airlie: "Karol found two last minute nouveau fixes, they both fix crashes, the TTM one follows what other drivers do already, and the other is for bailing on load on unrecognised chipsets. - fix crash in TTM alloc fail path - return error earlier for unknown chipsets" * tag 'drm-fixes-2020-10-08' of git://anongit.freedesktop.org/drm/drm: drm/nouveau/mem: guard against NULL pointer access in mem_del drm/nouveau/device: return error for unknown chipsets commit b9e3aa2a9bd49860ec5a9129fb522b0addc7d05b Merge: 86f0a5fb1b98e 8ff006e57ad3a Author: Linus Torvalds Date: Thu Oct 8 11:10:13 2020 -0700 Merge tag 'exfat-for-5.9-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat fixes from Namjae Jeon: - Fix use of uninitialized spinlock on error path - Fix missing err assignment in exfat_build_inode() * tag 'exfat-for-5.9-rc9' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: fix use of uninitialized spinlock on error path exfat: fix pointer error checking commit 86f0a5fb1b98e993fd43899d6640c7b9eec5000a Merge: ec0fa0b659144 5a0677110b73d Author: Linus Torvalds Date: Thu Oct 8 11:01:53 2020 -0700 Merge tag 'for-linus-5.9b-rc9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "One fix for a regression when booting as a Xen guest on ARM64 introduced probably during the 5.9 cycle. It is very low risk as it is modifying Xen specific code only. The exact commit introducing the bug hasn't been identified yet, but everything was fine in 5.8 and only in 5.9 some configurations started to fail" * tag 'for-linus-5.9b-rc9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: arm/arm64: xen: Fix to convert percpu address to gfn correctly commit ec0fa0b659144d9c68204d23f627b6a65fa53e50 Author: David Howells Date: Wed Oct 7 14:22:12 2020 +0100 afs: Fix deadlock between writeback and truncate The afs filesystem has a lock[*] that it uses to serialise I/O operations going to the server (vnode->io_lock), as the server will only perform one modification operation at a time on any given file or directory. This prevents the the filesystem from filling up all the call slots to a server with calls that aren't going to be executed in parallel anyway, thereby allowing operations on other files to obtain slots. [*] Note that is probably redundant for directories at least since i_rwsem is used to serialise directory modifications and lookup/reading vs modification. The server does allow parallel non-modification ops, however. When a file truncation op completes, we truncate the in-memory copy of the file to match - but we do it whilst still holding the io_lock, the idea being to prevent races with other operations. However, if writeback starts in a worker thread simultaneously with truncation (whilst notify_change() is called with i_rwsem locked, writeback pays it no heed), it may manage to set PG_writeback bits on the pages that will get truncated before afs_setattr_success() manages to call truncate_pagecache(). Truncate will then wait for those pages - whilst still inside io_lock: # cat /proc/8837/stack [<0>] wait_on_page_bit_common+0x184/0x1e7 [<0>] truncate_inode_pages_range+0x37f/0x3eb [<0>] truncate_pagecache+0x3c/0x53 [<0>] afs_setattr_success+0x4d/0x6e [<0>] afs_wait_for_operation+0xd8/0x169 [<0>] afs_do_sync_operation+0x16/0x1f [<0>] afs_setattr+0x1fb/0x25d [<0>] notify_change+0x2cf/0x3c4 [<0>] do_truncate+0x7f/0xb2 [<0>] do_sys_ftruncate+0xd1/0x104 [<0>] do_syscall_64+0x2d/0x3a [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 The writeback operation, however, stalls indefinitely because it needs to get the io_lock to proceed: # cat /proc/5940/stack [<0>] afs_get_io_locks+0x58/0x1ae [<0>] afs_begin_vnode_operation+0xc7/0xd1 [<0>] afs_store_data+0x1b2/0x2a3 [<0>] afs_write_back_from_locked_page+0x418/0x57c [<0>] afs_writepages_region+0x196/0x224 [<0>] afs_writepages+0x74/0x156 [<0>] do_writepages+0x2d/0x56 [<0>] __writeback_single_inode+0x84/0x207 [<0>] writeback_sb_inodes+0x238/0x3cf [<0>] __writeback_inodes_wb+0x68/0x9f [<0>] wb_writeback+0x145/0x26c [<0>] wb_do_writeback+0x16a/0x194 [<0>] wb_workfn+0x74/0x177 [<0>] process_one_work+0x174/0x264 [<0>] worker_thread+0x117/0x1b9 [<0>] kthread+0xec/0xf1 [<0>] ret_from_fork+0x1f/0x30 and thus deadlock has occurred. Note that whilst afs_setattr() calls filemap_write_and_wait(), the fact that the caller is holding i_rwsem doesn't preclude more pages being dirtied through an mmap'd region. Fix this by: (1) Use the vnode validate_lock to mediate access between afs_setattr() and afs_writepages(): (a) Exclusively lock validate_lock in afs_setattr() around the whole RPC operation. (b) If WB_SYNC_ALL isn't set on entry to afs_writepages(), trying to shared-lock validate_lock and returning immediately if we couldn't get it. (c) If WB_SYNC_ALL is set, wait for the lock. The validate_lock is also used to validate a file and to zap its cache if the file was altered by a third party, so it's probably a good fit for this. (2) Move the truncation outside of the io_lock in setattr, using the same hook as is used for local directory editing. This requires the old i_size to be retained in the operation record as we commit the revised status to the inode members inside the io_lock still, but we still need to know if we reduced the file size. Fixes: d2ddc776a458 ("afs: Overhaul volume and server record caching and fileserver rotation") Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit f3c64eda3e5097ec3198cb271f5f504d65d67131 Author: Linus Torvalds Date: Mon Sep 28 12:50:03 2020 -0700 mm: avoid early COW write protect games during fork() In commit 70e806e4e645 ("mm: Do early cow for pinned pages during fork() for ptes") we write-protected the PTE before doing the page pinning check, in order to avoid a race with concurrent fast-GUP pinning (which doesn't take the mm semaphore or the page table lock). That trick doesn't actually work - it doesn't handle memory ordering properly, and doing so would be prohibitively expensive. It also isn't really needed. While we're moving in the direction of allowing and supporting page pinning without marking the pinned area with MADV_DONTFORK, the fact is that we've never really supported this kind of odd "concurrent fork() and page pinning", and doing the serialization on a pte level is just wrong. We can add serialization with a per-mm sequence counter, so we know how to solve that race properly, but we'll do that at a more appropriate time. Right now this just removes the write protect games. It also turns out that the write protect games actually break on Power, as reported by Aneesh Kumar: "Architecture like ppc64 expects set_pte_at to be not used for updating a valid pte. This is further explained in commit 56eecdb912b5 ("mm: Use ptep/pmdp_set_numa() for updating _PAGE_NUMA bit")" and the code triggered a warning there: WARNING: CPU: 0 PID: 30613 at arch/powerpc/mm/pgtable.c:185 set_pte_at+0x2a8/0x3a0 arch/powerpc/mm/pgtable.c:185 Call Trace: copy_present_page mm/memory.c:857 [inline] copy_present_pte mm/memory.c:899 [inline] copy_pte_range mm/memory.c:1014 [inline] copy_pmd_range mm/memory.c:1092 [inline] copy_pud_range mm/memory.c:1127 [inline] copy_p4d_range mm/memory.c:1150 [inline] copy_page_range+0x1f6c/0x2cc0 mm/memory.c:1212 dup_mmap kernel/fork.c:592 [inline] dup_mm+0x77c/0xab0 kernel/fork.c:1355 copy_mm kernel/fork.c:1411 [inline] copy_process+0x1f00/0x2740 kernel/fork.c:2070 _do_fork+0xc4/0x10b0 kernel/fork.c:2429 Link: https://lore.kernel.org/lkml/CAHk-=wiWr+gO0Ro4LvnJBMs90OiePNyrE3E+pJvc9PzdBShdmw@mail.gmail.com/ Link: https://lore.kernel.org/linuxppc-dev/20201008092541.398079-1-aneesh.kumar@linux.ibm.com/ Reported-by: Aneesh Kumar K.V Tested-by: Leon Romanovsky Cc: Peter Xu Cc: Jason Gunthorpe Cc: John Hubbard Cc: Andrew Morton Cc: Jan Kara Cc: Michal Hocko Cc: Kirill Shutemov Cc: Hugh Dickins Signed-off-by: Linus Torvalds commit 3dc289f8f139997f4e9d3cfccf8738f20d23e47b Author: Anant Thazhemadam Date: Wed Oct 7 09:24:01 2020 +0530 net: wireless: nl80211: fix out-of-bounds access in nl80211_del_key() In nl80211_parse_key(), key.idx is first initialized as -1. If this value of key.idx remains unmodified and gets returned, and nl80211_key_allowed() also returns 0, then rdev_del_key() gets called with key.idx = -1. This causes an out-of-bounds array access. Handle this issue by checking if the value of key.idx after nl80211_parse_key() is called and return -EINVAL if key.idx < 0. Cc: stable@vger.kernel.org Reported-by: syzbot+b1bb342d1d097516cbda@syzkaller.appspotmail.com Tested-by: syzbot+b1bb342d1d097516cbda@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20201007035401.9522-1-anant.thazhemadam@gmail.com Signed-off-by: Johannes Berg commit 1334d3b4e49e35d8912a7c37ffca4c5afb9a0516 Author: Nicolas Belin Date: Wed Oct 7 10:07:51 2020 +0200 i2c: meson: fixup rate calculation with filter delay Apparently, 15 cycles of the peripheral clock are used by the controller for sampling and filtering. Because this was not known before, the rate calculation is slightly off. Clean up and fix the calculation taking this filtering delay into account. Fixes: 30021e3707a7 ("i2c: add support for Amlogic Meson I2C controller") Signed-off-by: Nicolas Belin Signed-off-by: Jerome Brunet Signed-off-by: Wolfram Sang commit 79e137b1540165f788394658442284d55a858984 Author: Jerome Brunet Date: Wed Oct 7 10:07:50 2020 +0200 i2c: meson: keep peripheral clock enabled SCL rate appears to be different than what is expected. For example, We get 164kHz on i2c3 of the vim3 when 400kHz is expected. This is partially due to the peripheral clock being disabled when the clock is set. Let's keep the peripheral clock on after probe to fix the problem. This does not affect the SCL output which is still gated when i2c is idle. Fixes: 09af1c2fa490 ("i2c: meson: set clock divider in probe instead of setting it for each transfer") Signed-off-by: Jerome Brunet Signed-off-by: Wolfram Sang commit 28683e847e2f20eed22cdd24f185d7783db396d3 Author: Jerome Brunet Date: Wed Oct 7 10:07:49 2020 +0200 i2c: meson: fix clock setting overwrite When the slave address is written in do_start(), SLAVE_ADDR is written completely. This may overwrite some setting related to the clock rate or signal filtering. Fix this by writing only the bits related to slave address. To avoid causing unexpected changed, explicitly disable filtering or high/low clock mode which may have been left over by the bootloader. Fixes: 30021e3707a7 ("i2c: add support for Amlogic Meson I2C controller") Signed-off-by: Jerome Brunet Signed-off-by: Wolfram Sang commit fa4d30556883f2eaab425b88ba9904865a4d00f3 Author: Christian Eggers Date: Wed Oct 7 10:45:22 2020 +0200 i2c: imx: Fix reset of I2SR_IAL flag According to the "VFxxx Controller Reference Manual" (and the comment block starting at line 97), Vybrid requires writing a one for clearing an interrupt flag. Syncing the method for clearing I2SR_IIF in i2c_imx_isr(). Signed-off-by: Christian Eggers Fixes: 4b775022f6fd ("i2c: imx: add struct to hold more configurable quirks") Reviewed-by: Uwe Kleine-König Cc: stable@vger.kernel.org Signed-off-by: Wolfram Sang commit 5b9fbeb75b6a98955f628e205ac26689bcb1383e Author: Daniel Borkmann Date: Wed Oct 7 15:48:58 2020 +0200 bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tracking issues, for example: [...] 8: R0=map_value(id=0,off=0,ks=4,vs=48,imm=0) R10=fp0 fp-8=mmmmmmmm 8: (79) r1 = *(u64 *)(r0 +0) R0=map_value(id=0,off=0,ks=4,vs=48,imm=0) R10=fp0 fp-8=mmmmmmmm 9: R0=map_value(id=0,off=0,ks=4,vs=48,imm=0) R1_w=inv(id=0) R10=fp0 fp-8=mmmmmmmm 9: (b7) r0 = 1 10: R0_w=inv1 R1_w=inv(id=0) R10=fp0 fp-8=mmmmmmmm 10: (18) r2 = 0x600000002 12: R0_w=inv1 R1_w=inv(id=0) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 12: (ad) if r1 < r2 goto pc+1 R0_w=inv1 R1_w=inv(id=0,umin_value=25769803778) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 13: R0_w=inv1 R1_w=inv(id=0,umin_value=25769803778) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 13: (95) exit 14: R0_w=inv1 R1_w=inv(id=0,umax_value=25769803777,var_off=(0x0; 0x7ffffffff)) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 14: (25) if r1 > 0x0 goto pc+1 R0_w=inv1 R1_w=inv(id=0,umax_value=0,var_off=(0x0; 0x7fffffff),u32_max_value=2147483647) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 15: R0_w=inv1 R1_w=inv(id=0,umax_value=0,var_off=(0x0; 0x7fffffff),u32_max_value=2147483647) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 15: (95) exit 16: R0_w=inv1 R1_w=inv(id=0,umin_value=1,umax_value=25769803777,var_off=(0x0; 0x77fffffff),u32_max_value=2147483647) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 16: (47) r1 |= 0 17: R0_w=inv1 R1_w=inv(id=0,umin_value=1,umax_value=32212254719,var_off=(0x1; 0x700000000),s32_max_value=1,u32_max_value=1) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm [...] The bound tests on the map value force the upper unsigned bound to be 25769803777 in 64 bit (0b11000000000000000000000000000000001) and then lower one to be 1. By using OR they are truncated and thus result in the range [1,1] for the 32 bit reg tracker. This is incorrect given the only thing we know is that the value must be positive and thus 2147483647 (0b1111111111111111111111111111111) at max for the subregs. Fix it by using the {u,s}32_{min,max}_value vars instead. This also makes sense, for example, for the case where we update dst_reg->s32_{min,max}_value in the else branch we need to use the newly computed dst_reg->u32_{min,max}_value as we know that these are positive. Previously, in the else branch the 64 bit values of umin_value=1 and umax_value=32212254719 were used and latter got truncated to be 1 as upper bound there. After the fix the subreg range is now correct: [...] 8: R0=map_value(id=0,off=0,ks=4,vs=48,imm=0) R10=fp0 fp-8=mmmmmmmm 8: (79) r1 = *(u64 *)(r0 +0) R0=map_value(id=0,off=0,ks=4,vs=48,imm=0) R10=fp0 fp-8=mmmmmmmm 9: R0=map_value(id=0,off=0,ks=4,vs=48,imm=0) R1_w=inv(id=0) R10=fp0 fp-8=mmmmmmmm 9: (b7) r0 = 1 10: R0_w=inv1 R1_w=inv(id=0) R10=fp0 fp-8=mmmmmmmm 10: (18) r2 = 0x600000002 12: R0_w=inv1 R1_w=inv(id=0) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 12: (ad) if r1 < r2 goto pc+1 R0_w=inv1 R1_w=inv(id=0,umin_value=25769803778) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 13: R0_w=inv1 R1_w=inv(id=0,umin_value=25769803778) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 13: (95) exit 14: R0_w=inv1 R1_w=inv(id=0,umax_value=25769803777,var_off=(0x0; 0x7ffffffff)) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 14: (25) if r1 > 0x0 goto pc+1 R0_w=inv1 R1_w=inv(id=0,umax_value=0,var_off=(0x0; 0x7fffffff),u32_max_value=2147483647) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 15: R0_w=inv1 R1_w=inv(id=0,umax_value=0,var_off=(0x0; 0x7fffffff),u32_max_value=2147483647) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 15: (95) exit 16: R0_w=inv1 R1_w=inv(id=0,umin_value=1,umax_value=25769803777,var_off=(0x0; 0x77fffffff),u32_max_value=2147483647) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm 16: (47) r1 |= 0 17: R0_w=inv1 R1_w=inv(id=0,umin_value=1,umax_value=32212254719,var_off=(0x0; 0x77fffffff),u32_max_value=2147483647) R2_w=inv25769803778 R10=fp0 fp-8=mmmmmmmm [...] Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") Reported-by: Simon Scannell Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Acked-by: Alexei Starovoitov commit dcba603f82ed261c3db33cf9e7c639116a6e84ae Author: Alex Deucher Date: Tue Oct 6 09:20:47 2020 -0400 drm/amdgpu/swsmu: fix ARC build errors We want to use the dev_* functions here rather than the pr_* variants. Switch to using dev_warn() which mirrors what we do on other asics. Fixes the following build errors on ARC: ../drivers/gpu/drm/amd/amdgpu/../powerplay/navi10_ppt.c: In function 'navi10_fill_i2c_req': ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] ../drivers/gpu/drm/amd/amdgpu/../powerplay/sienna_cichlid_ppt.c: In function 'sienna_cichlid_fill_i2c_req': ../arch/arc/include/asm/bug.h:24:2: error: implicit declaration of function 'pr_warn'; did you mean 'drm_warn'? [-Werror=implicit-function-declaration] Reported-by: kernel test robot Cc: Randy Dunlap Cc: Evan Quan Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Acked-by: Randy Dunlap Signed-off-by: Alex Deucher commit 33eade2cd27a49cd858fd7b21be8447462afe859 Author: Dirk Gouders Date: Thu Oct 1 21:55:25 2020 +0200 drm/amdgpu: fix NULL pointer dereference for Renoir Commit c1cf79ca5ced46 ("drm/amdgpu: use IP discovery table for renoir") introduced a NULL pointer dereference when booting with amdgpu.discovery=0, because it removed the call of vega10_reg_base_init() for that case. Fix this by calling that funcion if amdgpu_discovery == 0 in addition to the case that amdgpu_discovery_reg_base_init() failed. Fixes: c1cf79ca5ced46 ("drm/amdgpu: use IP discovery table for renoir") Signed-off-by: Dirk Gouders Cc: Hawking Zhang Cc: Evan Quan Signed-off-by: Alex Deucher commit e0894cd618e420d7bacebadcd26b7193780332e2 Merge: 7370997d48520 4bab69093044c Author: Jens Axboe Date: Wed Oct 7 08:24:09 2020 -0600 Merge tag 'nvme-5.9-2020-10-07' of git://git.infradead.org/nvme into block-5.9 Pull NVMe fix from Christoph: "nvme fix for 5.9: - fix a recently introduced controller leak (Logan Gunthorpe)" * tag 'nvme-5.9-2020-10-07' of git://git.infradead.org/nvme: nvme-core: put ctrl ref when module ref get fail commit 7370997d48520ad923e8eb4deb59ebf290396202 Author: Christoph Hellwig Date: Wed Oct 7 14:40:09 2020 +0200 partitions/ibm: fix non-DASD devices Don't error out if the dasd_biodasdinfo symbol is not available. Cc: stable@vger.kernel.org Fixes: 26d7e28e3820 ("s390/dasd: remove ioctl_by_bdev calls") Reported-by: Christian Borntraeger Signed-off-by: Christoph Hellwig Tested-by: Christian Borntraeger Reviewed-by: Stefan Haberland Signed-off-by: Jens Axboe commit 8b81edd80baf12d64420daff1759380aa9a14998 Author: Marc Zyngier Date: Mon Oct 5 15:02:17 2020 +0100 gpio: pca953x: Survive spurious interrupts The pca953x driver never checks the result of irq_find_mapping(), which returns 0 when no mapping is found. When a spurious interrupt is delivered (which can happen under obscure circumstances), the kernel explodes as it still tries to handle the error code as a real interrupt. Handle this particular case and warn on spurious interrupts. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201005140217.1390851-1-maz@kernel.org Signed-off-by: Linus Walleij commit 47e538d86d5776ac8152146c3ed3d22326243190 Author: Andy Shevchenko Date: Mon Oct 5 16:10:44 2020 +0300 gpiolib: Disable compat ->read() code in UML case It appears that UML (arch/um) has no compat.h header defined and hence can't compile a recently provided piece of code in GPIO library. Disable compat ->read() code in UML case to avoid compilation errors. While at it, use pattern which is already being used in the kernel elsewhere. Fixes: 5ad284ab3a01 ("gpiolib: Fix line event handling in syscall compatible mode") Reported-by: Geert Uytterhoeven Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20201005131044.87276-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 4bab69093044ca81f394bd0780be1b71c5a4d308 Author: Chaitanya Kulkarni Date: Tue Oct 6 16:36:47 2020 -0700 nvme-core: put ctrl ref when module ref get fail When try_module_get() fails in the nvme_dev_open() it returns without releasing the ctrl reference which was taken earlier. Put the ctrl reference which is taken before calling the try_module_get() in the error return code path. Fixes: 52a3974feb1a "nvme-core: get/put ctrl and transport module in nvme_dev_open/release()" Signed-off-by: Chaitanya Kulkarni Reviewed-by: Logan Gunthorpe Signed-off-by: Christoph Hellwig commit d10285a25e29f13353bbf7760be8980048c1ef2f Author: Karol Herbst Date: Wed Oct 7 00:05:28 2020 +0200 drm/nouveau/mem: guard against NULL pointer access in mem_del other drivers seems to do something similar Signed-off-by: Karol Herbst Cc: dri-devel Cc: Dave Airlie Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201006220528.13925-2-kherbst@redhat.com commit c3e0276c31ca8c7b8615da890727481260d4676f Author: Karol Herbst Date: Wed Oct 7 00:05:27 2020 +0200 drm/nouveau/device: return error for unknown chipsets Previously the code relied on device->pri to be NULL and to fail probing later. We really should just return an error inside nvkm_device_ctor for unsupported GPUs. Fixes: 24d5ff40a732 ("drm/nouveau/device: rework mmio mapping code to get rid of second map") Signed-off-by: Karol Herbst Cc: dann frazier Cc: dri-devel Cc: Dave Airlie Cc: stable@vger.kernel.org Reviewed-by: Jeremy Cline Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20201006220528.13925-1-kherbst@redhat.com commit 8ff006e57ad3a25f909c456d053aa498b6673a39 Author: Namjae Jeon Date: Tue Sep 29 09:09:49 2020 +0900 exfat: fix use of uninitialized spinlock on error path syzbot reported warning message: Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d6/0x29e lib/dump_stack.c:118 register_lock_class+0xf06/0x1520 kernel/locking/lockdep.c:893 __lock_acquire+0xfd/0x2ae0 kernel/locking/lockdep.c:4320 lock_acquire+0x148/0x720 kernel/locking/lockdep.c:5029 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] exfat_cache_inval_inode+0x30/0x280 fs/exfat/cache.c:226 exfat_evict_inode+0x124/0x270 fs/exfat/inode.c:660 evict+0x2bb/0x6d0 fs/inode.c:576 exfat_fill_super+0x1e07/0x27d0 fs/exfat/super.c:681 get_tree_bdev+0x3e9/0x5f0 fs/super.c:1342 vfs_get_tree+0x88/0x270 fs/super.c:1547 do_new_mount fs/namespace.c:2875 [inline] path_mount+0x179d/0x29e0 fs/namespace.c:3192 do_mount fs/namespace.c:3205 [inline] __do_sys_mount fs/namespace.c:3413 [inline] __se_sys_mount+0x126/0x180 fs/namespace.c:3390 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 If exfat_read_root() returns an error, spinlock is used in exfat_evict_inode() without initialization. This patch combines exfat_cache_init_inode() with exfat_inode_init_once() to initialize spinlock by slab constructor. Fixes: c35b6810c495 ("exfat: add exfat cache") Cc: stable@vger.kernel.org # v5.7+ Reported-by: syzbot Signed-off-by: Namjae Jeon commit d6c9efd92443b23307995f34246c2374056ebbd8 Author: Tetsuhiro Kohada Date: Wed Aug 26 10:18:29 2020 +0900 exfat: fix pointer error checking Fix missing result check of exfat_build_inode(). And use PTR_ERR_OR_ZERO instead of PTR_ERR. Signed-off-by: Tetsuhiro Kohada Signed-off-by: Namjae Jeon commit 5a0677110b73dd3e1766f89159701bfe8ac06808 Author: Masami Hiramatsu Date: Tue Oct 6 15:49:31 2020 +0900 arm/arm64: xen: Fix to convert percpu address to gfn correctly Use per_cpu_ptr_to_phys() instead of virt_to_phys() for per-cpu address conversion. In xen_starting_cpu(), per-cpu xen_vcpu_info address is converted to gfn by virt_to_gfn() macro. However, since the virt_to_gfn(v) assumes the given virtual address is in linear mapped kernel memory area, it can not convert the per-cpu memory if it is allocated on vmalloc area. This depends on CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK. If it is enabled, the first chunk of percpu memory is linear mapped. In the other case, that is allocated from vmalloc area. Moreover, if the first chunk of percpu has run out until allocating xen_vcpu_info, it will be allocated on the 2nd chunk, which is based on kernel memory or vmalloc memory (depends on CONFIG_NEED_PER_CPU_KM). Without this fix and kernel configured to use vmalloc area for the percpu memory, the Dom0 kernel will fail to boot with following errors. [ 0.466172] Xen: initializing cpu0 [ 0.469601] ------------[ cut here ]------------ [ 0.474295] WARNING: CPU: 0 PID: 1 at arch/arm64/xen/../../arm/xen/enlighten.c:153 xen_starting_cpu+0x160/0x180 [ 0.484435] Modules linked in: [ 0.487565] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc4+ #4 [ 0.493895] Hardware name: Socionext Developer Box (DT) [ 0.499194] pstate: 00000005 (nzcv daif -PAN -UAO BTYPE=--) [ 0.504836] pc : xen_starting_cpu+0x160/0x180 [ 0.509263] lr : xen_starting_cpu+0xb0/0x180 [ 0.513599] sp : ffff8000116cbb60 [ 0.516984] x29: ffff8000116cbb60 x28: ffff80000abec000 [ 0.522366] x27: 0000000000000000 x26: 0000000000000000 [ 0.527754] x25: ffff80001156c000 x24: fffffdffbfcdb600 [ 0.533129] x23: 0000000000000000 x22: 0000000000000000 [ 0.538511] x21: ffff8000113a99c8 x20: ffff800010fe4f68 [ 0.543892] x19: ffff8000113a9988 x18: 0000000000000010 [ 0.549274] x17: 0000000094fe0f81 x16: 00000000deadbeef [ 0.554655] x15: ffffffffffffffff x14: 0720072007200720 [ 0.560037] x13: 0720072007200720 x12: 0720072007200720 [ 0.565418] x11: 0720072007200720 x10: 0720072007200720 [ 0.570801] x9 : ffff8000100fbdc0 x8 : ffff800010715208 [ 0.576182] x7 : 0000000000000054 x6 : ffff00001b790f00 [ 0.581564] x5 : ffff800010bbf880 x4 : 0000000000000000 [ 0.586945] x3 : 0000000000000000 x2 : ffff80000abec000 [ 0.592327] x1 : 000000000000002f x0 : 0000800000000000 [ 0.597716] Call trace: [ 0.600232] xen_starting_cpu+0x160/0x180 [ 0.604309] cpuhp_invoke_callback+0xac/0x640 [ 0.608736] cpuhp_issue_call+0xf4/0x150 [ 0.612728] __cpuhp_setup_state_cpuslocked+0x128/0x2c8 [ 0.618030] __cpuhp_setup_state+0x84/0xf8 [ 0.622192] xen_guest_init+0x324/0x364 [ 0.626097] do_one_initcall+0x54/0x250 [ 0.630003] kernel_init_freeable+0x12c/0x2c8 [ 0.634428] kernel_init+0x1c/0x128 [ 0.637988] ret_from_fork+0x10/0x18 [ 0.641635] ---[ end trace d95b5309a33f8b27 ]--- [ 0.646337] ------------[ cut here ]------------ [ 0.651005] kernel BUG at arch/arm64/xen/../../arm/xen/enlighten.c:158! [ 0.657697] Internal error: Oops - BUG: 0 [#1] SMP [ 0.662548] Modules linked in: [ 0.665676] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G W 5.9.0-rc4+ #4 [ 0.673398] Hardware name: Socionext Developer Box (DT) [ 0.678695] pstate: 00000005 (nzcv daif -PAN -UAO BTYPE=--) [ 0.684338] pc : xen_starting_cpu+0x178/0x180 [ 0.688765] lr : xen_starting_cpu+0x144/0x180 [ 0.693188] sp : ffff8000116cbb60 [ 0.696573] x29: ffff8000116cbb60 x28: ffff80000abec000 [ 0.701955] x27: 0000000000000000 x26: 0000000000000000 [ 0.707344] x25: ffff80001156c000 x24: fffffdffbfcdb600 [ 0.712718] x23: 0000000000000000 x22: 0000000000000000 [ 0.718107] x21: ffff8000113a99c8 x20: ffff800010fe4f68 [ 0.723481] x19: ffff8000113a9988 x18: 0000000000000010 [ 0.728863] x17: 0000000094fe0f81 x16: 00000000deadbeef [ 0.734245] x15: ffffffffffffffff x14: 0720072007200720 [ 0.739626] x13: 0720072007200720 x12: 0720072007200720 [ 0.745008] x11: 0720072007200720 x10: 0720072007200720 [ 0.750390] x9 : ffff8000100fbdc0 x8 : ffff800010715208 [ 0.755771] x7 : 0000000000000054 x6 : ffff00001b790f00 [ 0.761153] x5 : ffff800010bbf880 x4 : 0000000000000000 [ 0.766534] x3 : 0000000000000000 x2 : 00000000deadbeef [ 0.771916] x1 : 00000000deadbeef x0 : ffffffffffffffea [ 0.777304] Call trace: [ 0.779819] xen_starting_cpu+0x178/0x180 [ 0.783898] cpuhp_invoke_callback+0xac/0x640 [ 0.788325] cpuhp_issue_call+0xf4/0x150 [ 0.792317] __cpuhp_setup_state_cpuslocked+0x128/0x2c8 [ 0.797619] __cpuhp_setup_state+0x84/0xf8 [ 0.801779] xen_guest_init+0x324/0x364 [ 0.805683] do_one_initcall+0x54/0x250 [ 0.809590] kernel_init_freeable+0x12c/0x2c8 [ 0.814016] kernel_init+0x1c/0x128 [ 0.817583] ret_from_fork+0x10/0x18 [ 0.821226] Code: d0006980 f9427c00 cb000300 17ffffea (d4210000) [ 0.827415] ---[ end trace d95b5309a33f8b28 ]--- [ 0.832076] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 0.839815] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- Signed-off-by: Masami Hiramatsu Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/160196697165.60224.17470743378683334995.stgit@devnote2 Signed-off-by: Juergen Gross commit 84814460eef9af0fb56a4698341c9cb7996a6312 Author: Guo Ren Date: Tue Oct 6 16:49:33 2020 +0000 riscv: Fixup bootup failure with HARDENED_USERCOPY 6184358da000 ("riscv: Fixup static_obj() fail") attempted to elide a lockdep failure by rearranging our kernel image to place all initdata within [_stext, _end], thus triggering lockdep to treat these as static objects. These objects are released and eventually reallocated, causing check_kernel_text_object() to trigger a BUG(). This backs out the change to make [_stext, _end] all-encompassing, instead just moving initdata. This results in initdata being outside of [__init_begin, __init_end], which means initdata can't be freed. Link: https://lore.kernel.org/linux-riscv/1593266228-61125-1-git-send-email-guoren@kernel.org/T/#t Signed-off-by: Guo Ren Reported-by: Aurelien Jarno Tested-by: Aurelien Jarno [Palmer: Clean up commit text] Signed-off-by: Palmer Dabbelt commit c85fb28b6f999db9928b841f63f1beeb3074eeca Merge: 6ec37e6bb1fa1 39e4716caa598 Author: Linus Torvalds Date: Tue Oct 6 12:09:29 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Catalin Marinas: "Fix a kernel panic in the AES crypto code caused by a BR tail call not matching the target BTI instruction (when branch target identification is enabled)" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: crypto: arm64: Use x16 with indirect branch to bti_c commit 6ec37e6bb1fa1d6d6ba6bf0e2d93a148c53c8976 Merge: f1e141e9db6b8 1797d588af151 Author: Linus Torvalds Date: Tue Oct 6 12:00:52 2020 -0700 Merge tag 'platform-drivers-x86-v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull another x86 platform driver fix from Hans de Goede: "One final pdx86 fix for Tablet Mode reporting regressions (which make the keyboard and touchpad unusable) on various Asus notebooks. These regressions were caused by the asus-nb-wmi and the intel-vbtn drivers both receiving recent patches to start reporting Tablet Mode / to report it on more models. Due to a miscommunication between Andy and me, Andy's earlier pull-req only contained the fix for the intel-vbtn driver and not the fix for the asus-nb-wmi code. This fix has been tested as a downstream patch in Fedora kernels for approx two weeks with no problems being reported" * tag 'platform-drivers-x86-v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: asus-wmi: Fix SW_TABLET_MODE always reporting 1 on many different models commit f1e141e9db6b89d124ec09ca162f378a29119481 Merge: 4013c1496c496 86fdf61e71046 Author: Linus Torvalds Date: Tue Oct 6 11:05:44 2020 -0700 Merge tag 'drm-fixes-2020-10-06-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Daniel queued these up last week and I took a long weekend so didn't get them out, but fixing the OOB access on get font seems like something we should land and it's cc'ed stable as well. The other big change is a partial revert for a regression on android on the clcd fbdev driver, and one other docs fix. fbdev: - Re-add FB_ARMCLCD for android - Fix global-out-of-bounds read in fbcon_get_font() core: - Small doc fix" * tag 'drm-fixes-2020-10-06-1' of git://anongit.freedesktop.org/drm/drm: drm: drm_dsc.h: fix a kernel-doc markup Partially revert "video: fbdev: amba-clcd: Retire elder CLCD driver" fbcon: Fix global-out-of-bounds read in fbcon_get_font() Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h commit 4013c1496c49615d90d36b9d513eee8e369778e9 Author: Linus Torvalds Date: Mon Oct 5 10:56:22 2020 -0700 usermodehelper: reset umask to default before executing user process Kernel threads intentionally do CLONE_FS in order to follow any changes that 'init' does to set up the root directory (or cwd). It is admittedly a bit odd, but it avoids the situation where 'init' does some extensive setup to initialize the system environment, and then we execute a usermode helper program, and it uses the original FS setup from boot time that may be very limited and incomplete. [ Both Al Viro and Eric Biederman point out that 'pivot_root()' will follow the root regardless, since it fixes up other users of root (see chroot_fs_refs() for details), but overmounting root and doing a chroot() would not. ] However, Vegard Nossum noticed that the CLONE_FS not only means that we follow the root and current working directories, it also means we share umask with whatever init changed it to. That wasn't intentional. Just reset umask to the original default (0022) before actually starting the usermode helper program. Reported-by: Vegard Nossum Cc: Al Viro Acked-by: Eric W. Biederman Signed-off-by: Linus Torvalds commit d1a819a2ec2d3b5e6a8f8a9f67386bda0ad315bc Author: Linus Torvalds Date: Mon Oct 5 11:26:27 2020 -0700 splice: teach splice pipe reading about empty pipe buffers Tetsuo Handa reports that splice() can return 0 before the real EOF, if the data in the splice source pipe is an empty pipe buffer. That empty pipe buffer case doesn't happen in any normal situation, but you can trigger it by doing a write to a pipe that fails due to a page fault. Tetsuo has a test-case to show the behavior: #define _GNU_SOURCE #include #include #include #include int main(int argc, char *argv[]) { const int fd = open("/tmp/testfile", O_WRONLY | O_CREAT, 0600); int pipe_fd[2] = { -1, -1 }; pipe(pipe_fd); write(pipe_fd[1], NULL, 4096); /* This splice() should wait unless interrupted. */ return !splice(pipe_fd[0], NULL, fd, NULL, 65536, 0); } which results in write(5, NULL, 4096) = -1 EFAULT (Bad address) splice(4, NULL, 3, NULL, 65536, 0) = 0 and this can confuse splice() users into believing they have hit EOF prematurely. The issue was introduced when the pipe write code started pre-allocating the pipe buffers before copying data from user space. This is modified verion of Tetsuo's original patch. Fixes: a194dfe6e6f6 ("pipe: Rearrange sequence in pipe_write() to preallocate slot") Link:https://lore.kernel.org/linux-fsdevel/20201005121339.4063-1-penguin-kernel@I-love.SAKURA.ne.jp/ Reported-by: Tetsuo Handa Acked-by: Tetsuo Handa Signed-off-by: Linus Torvalds commit 39e4716caa598a07a98598b2e7cd03055ce25fb9 Author: Jeremy Linton Date: Tue Oct 6 11:33:26 2020 -0500 crypto: arm64: Use x16 with indirect branch to bti_c The AES code uses a 'br x7' as part of a function called by a macro. That branch needs a bti_j as a target. This results in a panic as seen below. Using x16 (or x17) with an indirect branch keeps the target bti_c. Bad mode in Synchronous Abort handler detected on CPU1, code 0x34000003 -- BTI CPU: 1 PID: 265 Comm: cryptomgr_test Not tainted 5.8.11-300.fc33.aarch64 #1 pstate: 20400c05 (nzCv daif +PAN -UAO BTYPE=j-) pc : aesbs_encrypt8+0x0/0x5f0 [aes_neon_bs] lr : aesbs_xts_encrypt+0x48/0xe0 [aes_neon_bs] sp : ffff80001052b730 aesbs_encrypt8+0x0/0x5f0 [aes_neon_bs] __xts_crypt+0xb0/0x2dc [aes_neon_bs] xts_encrypt+0x28/0x3c [aes_neon_bs] crypto_skcipher_encrypt+0x50/0x84 simd_skcipher_encrypt+0xc8/0xe0 crypto_skcipher_encrypt+0x50/0x84 test_skcipher_vec_cfg+0x224/0x5f0 test_skcipher+0xbc/0x120 alg_test_skcipher+0xa0/0x1b0 alg_test+0x3dc/0x47c cryptomgr_test+0x38/0x60 Fixes: 0e89640b640d ("crypto: arm64 - Use modern annotations for assembly functions") Cc: # 5.6.x- Signed-off-by: Jeremy Linton Suggested-by: Dave P Martin Reviewed-by: Ard Biesheuvel Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20201006163326.2780619-1-jeremy.linton@arm.com Signed-off-by: Catalin Marinas commit d91dc434f2baa592e9793597421231174d57bbbf Merge: 86bccd0367130 38b1dc47a35ba Author: David S. Miller Date: Tue Oct 6 06:18:20 2020 -0700 Merge tag 'rxrpc-fixes-20201005' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc: Miscellaneous fixes Here are some miscellaneous rxrpc fixes: (1) Fix the xdr encoding of the contents read from an rxrpc key. (2) Fix a BUG() for a unsupported encoding type. (3) Fix missing _bh lock annotations. (4) Fix acceptance handling for an incoming call where the incoming call is encrypted. (5) The server token keyring isn't network namespaced - it belongs to the server, so there's no need. Namespacing it means that request_key() fails to find it. (6) Fix a leak of the server keyring. ==================== Signed-off-by: David S. Miller commit 86bccd0367130f481ca99ba91de1c6a5aa1c78c1 Author: Eric Dumazet Date: Mon Oct 5 06:48:13 2020 -0700 tcp: fix receive window update in tcp_add_backlog() We got reports from GKE customers flows being reset by netfilter conntrack unless nf_conntrack_tcp_be_liberal is set to 1. Traces seemed to suggest ACK packet being dropped by the packet capture, or more likely that ACK were received in the wrong order. wscale=7, SYN and SYNACK not shown here. This ACK allows the sender to send 1871*128 bytes from seq 51359321 : New right edge of the window -> 51359321+1871*128=51598809 09:17:23.389210 IP A > B: Flags [.], ack 51359321, win 1871, options [nop,nop,TS val 10 ecr 999], length 0 09:17:23.389212 IP B > A: Flags [.], seq 51422681:51424089, ack 1577, win 268, options [nop,nop,TS val 999 ecr 10], length 1408 09:17:23.389214 IP A > B: Flags [.], ack 51422681, win 1376, options [nop,nop,TS val 10 ecr 999], length 0 09:17:23.389253 IP B > A: Flags [.], seq 51424089:51488857, ack 1577, win 268, options [nop,nop,TS val 999 ecr 10], length 64768 09:17:23.389272 IP A > B: Flags [.], ack 51488857, win 859, options [nop,nop,TS val 10 ecr 999], length 0 09:17:23.389275 IP B > A: Flags [.], seq 51488857:51521241, ack 1577, win 268, options [nop,nop,TS val 999 ecr 10], length 32384 Receiver now allows to send 606*128=77568 from seq 51521241 : New right edge of the window -> 51521241+606*128=51598809 09:17:23.389296 IP A > B: Flags [.], ack 51521241, win 606, options [nop,nop,TS val 10 ecr 999], length 0 09:17:23.389308 IP B > A: Flags [.], seq 51521241:51553625, ack 1577, win 268, options [nop,nop,TS val 999 ecr 10], length 32384 It seems the sender exceeds RWIN allowance, since 51611353 > 51598809 09:17:23.389346 IP B > A: Flags [.], seq 51553625:51611353, ack 1577, win 268, options [nop,nop,TS val 999 ecr 10], length 57728 09:17:23.389356 IP B > A: Flags [.], seq 51611353:51618393, ack 1577, win 268, options [nop,nop,TS val 999 ecr 10], length 7040 09:17:23.389367 IP A > B: Flags [.], ack 51611353, win 0, options [nop,nop,TS val 10 ecr 999], length 0 netfilter conntrack is not happy and sends RST 09:17:23.389389 IP A > B: Flags [R], seq 92176528, win 0, length 0 09:17:23.389488 IP B > A: Flags [R], seq 174478967, win 0, length 0 Now imagine ACK were delivered out of order and tcp_add_backlog() sets window based on wrong packet. New right edge of the window -> 51521241+859*128=51631193 Normally TCP stack handles OOO packets just fine, but it turns out tcp_add_backlog() does not. It can update the window field of the aggregated packet even if the ACK sequence of the last received packet is too old. Many thanks to Alexandre Ferrieux for independently reporting the issue and suggesting a fix. Fixes: 4f693b55c3d2 ("tcp: implement coalescing on backlog queue") Signed-off-by: Eric Dumazet Reported-by: Alexandre Ferrieux Acked-by: Soheil Hassas Yeganeh Acked-by: Neal Cardwell Signed-off-by: David S. Miller commit f45a4248ea4cc13ed50618ff066849f9587226b2 Author: Anant Thazhemadam Date: Mon Oct 5 18:59:58 2020 +0530 net: usb: rtl8150: set random MAC address when set_ethernet_addr() fails When get_registers() fails in set_ethernet_addr(),the uninitialized value of node_id gets copied over as the address. So, check the return value of get_registers(). If get_registers() executed successfully (i.e., it returns sizeof(node_id)), copy over the MAC address using ether_addr_copy() (instead of using memcpy()). Else, if get_registers() failed instead, a randomly generated MAC address is set as the MAC address instead. Reported-by: syzbot+abbc768b560c84d92fd3@syzkaller.appspotmail.com Tested-by: syzbot+abbc768b560c84d92fd3@syzkaller.appspotmail.com Acked-by: Petko Manolov Signed-off-by: Anant Thazhemadam Signed-off-by: David S. Miller commit 017512a07e15b66472946cf5e6f4b4511e7cf898 Author: Paolo Abeni Date: Mon Oct 5 12:01:06 2020 +0200 mptcp: more DATA FIN fixes Currently data fin on data packet are not handled properly: the 'rcv_data_fin_seq' field is interpreted as the last sequence number carrying a valid data, but for data fin packet with valid maps we currently store map_seq + map_len, that is, the next value. The 'write_seq' fields carries instead the value subseguent to the last valid byte, so in mptcp_write_data_fin() we never detect correctly the last DSS map. Fixes: 7279da6145bb ("mptcp: Use MPTCP-level flag for sending DATA_FIN") Fixes: 1a49b2c2a501 ("mptcp: Handle incoming 32-bit DATA_FIN values") Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit c88c5ed75fab918742ef6cc62db88655573be0ef Merge: 082bb94fe18e5 013264936654f Author: David S. Miller Date: Tue Oct 6 06:05:47 2020 -0700 Merge branch 'Fix-tail-dropping-watermarks-for-Ocelot-switches' Vladimir Oltean says: ==================== Fix tail dropping watermarks for Ocelot switches This series adds a missing division by 60, and a warning to prevent that in the future. ==================== Signed-off-by: David S. Miller commit 013264936654fd3052fabe700b7a4933d3925395 Author: Vladimir Oltean Date: Mon Oct 5 12:09:12 2020 +0300 net: mscc: ocelot: warn when encoding an out-of-bounds watermark value There is an upper bound to the value that a watermark may hold. That upper bound is not immediately obvious during configuration, and it might be possible to have accidental truncation. Actually this has happened already, add a warning to prevent it from happening again. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 601e984f23abcaa7cf3eb078c13de4db3cf6a4f0 Author: Vladimir Oltean Date: Mon Oct 5 12:09:11 2020 +0300 net: mscc: ocelot: divide watermark value by 60 when writing to SYS_ATOP Tail dropping is enabled for a port when: 1. A source port consumes more packet buffers than the watermark encoded in SYS:PORT:ATOP_CFG.ATOP. AND 2. Total memory use exceeds the consumption watermark encoded in SYS:PAUSE_CFG:ATOP_TOT_CFG. The unit of these watermarks is a 60 byte memory cell. That unit is programmed properly into ATOP_TOT_CFG, but not into ATOP. Actually when written into ATOP, it would get truncated and wrap around. Fixes: a556c76adc05 ("net: mscc: Add initial Ocelot switch support") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 082bb94fe18e54cc64026a623d94ed6bc7242a5f Author: Manivannan Sadhasivam Date: Mon Oct 5 12:46:42 2020 +0530 net: qrtr: ns: Fix the incorrect usage of rcu_read_lock() The rcu_read_lock() is not supposed to lock the kernel_sendmsg() API since it has the lock_sock() in qrtr_sendmsg() which will sleep. Hence, fix it by excluding the locking for kernel_sendmsg(). While at it, let's also use radix_tree_deref_retry() to confirm the validity of the pointer returned by radix_tree_deref_slot() and use radix_tree_iter_resume() to resume iterating the tree properly before releasing the lock as suggested by Doug. Fixes: a7809ff90ce6 ("net: qrtr: ns: Protect radix_tree_deref_slot() using rcu read locks") Reported-by: Douglas Anderson Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Tested-by: Alex Elder Signed-off-by: Manivannan Sadhasivam Signed-off-by: David S. Miller commit 1797d588af15174d4a4e7159dac8c800538e4f8c Author: Hans de Goede Date: Wed Sep 16 16:14:39 2020 +0200 platform/x86: asus-wmi: Fix SW_TABLET_MODE always reporting 1 on many different models Commit b0dbd97de1f1 ("platform/x86: asus-wmi: Add support for SW_TABLET_MODE") added support for reporting SW_TABLET_MODE using the Asus 0x00120063 WMI-device-id to see if various transformer models were docked into their keyboard-dock (SW_TABLET_MODE=0) or if they were being used as a tablet. The new SW_TABLET_MODE support (naively?) assumed that non Transformer devices would either not support the 0x00120063 WMI-device-id at all, or would NOT set ASUS_WMI_DSTS_PRESENCE_BIT in their reply when querying the device-id. Unfortunately this is not true and we have received many bug reports about this change causing the asus-wmi driver to always report SW_TABLET_MODE=1 on non Transformer devices. This causes libinput to think that these are 360 degree hinges style 2-in-1s folded into tablet-mode. Making libinput suppress keyboard and touchpad events from the builtin keyboard and touchpad. So effectively this causes the keyboard and touchpad to not work on many non Transformer Asus models. This commit fixes this by using the existing DMI based quirk mechanism in asus-nb-wmi.c to allow using the 0x00120063 device-id for reporting SW_TABLET_MODE on Transformer models and ignoring it on all other models. Fixes: b0dbd97de1f1 ("platform/x86: asus-wmi: Add support for SW_TABLET_MODE") Link: https://patchwork.kernel.org/patch/11780901/ BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209011 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1876997 Reported-by: Samuel Čavoj Signed-off-by: Hans de Goede commit 86fdf61e71046618f6f499542cee12f2348c523c Merge: 549738f15da0e 27204b99b0828 Author: Dave Airlie Date: Tue Oct 6 12:34:58 2020 +1000 Merge tag 'drm-misc-fixes-2020-10-01' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.9: - Small doc fix. - Re-add FB_ARMCLCD for android. - Fix global-out-of-bounds read in fbcon_get_font(). Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/8585daa2-fcbc-3924-ac4f-e7b5668808e0@linux.intel.com commit 7575fdda569b2a2e8be32c1a64ecb05d6f96a500 Merge: 165563c050884 720ef73d1a239 Author: Linus Torvalds Date: Mon Oct 5 11:54:20 2020 -0700 Merge tag 'platform-drivers-x86-v5.9-2' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver fixes from Andy Shevchenko: "We have some fixes for Tablet Mode reporting in particular, that users are complaining a lot about. Summary: - Attempt #3 of enabling Tablet Mode reporting w/o regressions - Improve battery recognition code in ASUS WMI driver - Fix Kconfig dependency warning for Fujitsu and LG laptop drivers - Add fixes in Thinkpad ACPI driver for _BCL method and NVRAM polling - Fix power supply extended topology in Mellanox driver - Fix memory leak in OLPC EC driver - Avoid static struct device in Intel PMC core driver - Add support for the touchscreen found in MPMAN Converter9 2-in-1 - Update MAINTAINERS to reflect the real state of affairs" * tag 'platform-drivers-x86-v5.9-2' of git://git.infradead.org/linux-platform-drivers-x86: platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse MAINTAINERS: Add Mark Gross and Hans de Goede as x86 platform drivers maintainers platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting platform/x86: intel-vbtn: Revert "Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360" platform/x86: intel_pmc_core: do not create a static struct device platform/x86: mlx-platform: Fix extended topology configuration for power supply units platform/x86: pcengines-apuv2: Fix typo on define of AMD_FCH_GPIO_REG_GPIO55_DEVSLP0 platform/x86: fix kconfig dependency warning for FUJITSU_LAPTOP platform/x86: fix kconfig dependency warning for LG_LAPTOP platform/x86: thinkpad_acpi: initialize tp_nvram_state variable platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360 platform/x86: asus-wmi: Add BATC battery name to the list of supported platform/x86: asus-nb-wmi: Revert "Do not load on Asus T100TA and T200TA" platform/x86: touchscreen_dmi: Add info for the MPMAN Converter9 2-in-1 Documentation: laptops: thinkpad-acpi: fix underline length build warning Platform: OLPC: Fix memleak in olpc_ec_probe commit 165563c05088467e7e0ba382c5bdb04b6cbf0013 Merge: 549738f15da0e 4296adc3e32f5 Author: Linus Torvalds Date: Mon Oct 5 11:27:14 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Make sure SKB control block is in the proper state during IPSEC ESP-in-TCP encapsulation. From Sabrina Dubroca. 2) Various kinds of attributes were not being cloned properly when we build new xfrm_state objects from existing ones. Fix from Antony Antony. 3) Make sure to keep BTF sections, from Tony Ambardar. 4) TX DMA channels need proper locking in lantiq driver, from Hauke Mehrtens. 5) Honour route MTU during forwarding, always. From Maciej Żenczykowski. 6) Fix races in kTLS which can result in crashes, from Rohit Maheshwari. 7) Skip TCP DSACKs with rediculous sequence ranges, from Priyaranjan Jha. 8) Use correct address family in xfrm state lookups, from Herbert Xu. 9) A bridge FDB flush should not clear out user managed fdb entries with the ext_learn flag set, from Nikolay Aleksandrov. 10) Fix nested locking of netdev address lists, from Taehee Yoo. 11) Fix handling of 32-bit DATA_FIN values in mptcp, from Mat Martineau. 12) Fix r8169 data corruptions on RTL8402 chips, from Heiner Kallweit. 13) Don't free command entries in mlx5 while comp handler could still be running, from Eran Ben Elisha. 14) Error flow of request_irq() in mlx5 is busted, due to an off by one we try to free and IRQ never allocated. From Maor Gottlieb. 15) Fix leak when dumping netlink policies, from Johannes Berg. 16) Sendpage cannot be performed when a page is a slab page, or the page count is < 1. Some subsystems such as nvme were doing so. Create a "sendpage_ok()" helper and use it as needed, from Coly Li. 17) Don't leak request socket when using syncookes with mptcp, from Paolo Abeni. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (111 commits) net/core: check length before updating Ethertype in skb_mpls_{push,pop} net: mvneta: fix double free of txq->buf net_sched: check error pointer in tcf_dump_walker() net: team: fix memory leak in __team_options_register net: typhoon: Fix a typo Typoon --> Typhoon net: hinic: fix DEVLINK build errors net: stmmac: Modify configuration method of EEE timers tcp: fix syn cookied MPTCP request socket leak libceph: use sendpage_ok() in ceph_tcp_sendpage() scsi: libiscsi: use sendpage_ok() in iscsi_tcp_segment_map() drbd: code cleanup by using sendpage_ok() to check page for kernel_sendpage() tcp: use sendpage_ok() to detect misused .sendpage nvme-tcp: check page by sendpage_ok() before calling kernel_sendpage() net: add WARN_ONCE in kernel_sendpage() for improper zero-copy send net: introduce helper sendpage_ok() in include/linux/net.h net: usb: pegasus: Proper error handing when setting pegasus' MAC address net: core: document two new elements of struct net_device netlink: fix policy dump leak net/mlx5e: Fix race condition on nhe->n pointer in neigh update net/mlx5e: Fix VLAN create flow ... commit 38b1dc47a35ba14c3f4472138ea56d014c2d609b Author: David Howells Date: Fri Oct 2 14:04:51 2020 +0100 rxrpc: Fix server keyring leak If someone calls setsockopt() twice to set a server key keyring, the first keyring is leaked. Fix it to return an error instead if the server key keyring is already set. Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both") Signed-off-by: David Howells commit fea99111244bae44e7d82a973744d27ea1567814 Author: David Howells Date: Wed Sep 30 19:52:08 2020 +0100 rxrpc: The server keyring isn't network-namespaced The keyring containing the server's tokens isn't network-namespaced, so it shouldn't be looked up with a network namespace. It is expected to be owned specifically by the server, so namespacing is unnecessary. Fixes: a58946c158a0 ("keys: Pass the network namespace into request_key mechanism") Signed-off-by: David Howells commit 2d914c1bf079491d1113051a7232250267f3f2e4 Author: David Howells Date: Wed Sep 30 21:27:18 2020 +0100 rxrpc: Fix accept on a connection that need securing When a new incoming call arrives at an userspace rxrpc socket on a new connection that has a security class set, the code currently pushes it onto the accept queue to hold a ref on it for the socket. This doesn't work, however, as recvmsg() pops it off, notices that it's in the SERVER_SECURING state and discards the ref. This means that the call runs out of refs too early and the kernel oopses. By contrast, a kernel rxrpc socket manually pre-charges the incoming call pool with calls that already have user call IDs assigned, so they are ref'd by the call tree on the socket. Change the mode of operation for userspace rxrpc server sockets to work like this too. Although this is a UAPI change, server sockets aren't currently functional. Fixes: 248f219cb8bc ("rxrpc: Rewrite the data and ack handling code") Signed-off-by: David Howells commit fa1d113a0f96f9ab7e4fe4f8825753ba1e34a9d3 Author: David Howells Date: Thu Oct 1 11:57:40 2020 +0100 rxrpc: Fix some missing _bh annotations on locking conn->state_lock conn->state_lock may be taken in softirq mode, but a previous patch replaced an outer lock in the response-packet event handling code, and lost the _bh from that when doing so. Fix this by applying the _bh annotation to the state_lock locking. Fixes: a1399f8bb033 ("rxrpc: Call channels should have separate call number spaces") Signed-off-by: David Howells commit 9a059cd5ca7d9c5c4ca5a6e755cf72f230176b6a Author: David Howells Date: Tue Sep 8 22:09:04 2020 +0100 rxrpc: Downgrade the BUG() for unsupported token type in rxrpc_read() If rxrpc_read() (which allows KEYCTL_READ to read a key), sees a token of a type it doesn't recognise, it can BUG in a couple of places, which is unnecessary as it can easily get back to userspace. Fix this to print an error message instead. Fixes: 99455153d067 ("RxRPC: Parse security index 5 keys (Kerberos 5)") Signed-off-by: David Howells commit 56305118e05b2db8d0395bba640ac9a3aee92624 Author: Marc Dionne Date: Fri Sep 4 14:01:24 2020 -0300 rxrpc: Fix rxkad token xdr encoding The session key should be encoded with just the 8 data bytes and no length; ENCODE_DATA precedes it with a 4 byte length, which confuses some existing tools that try to parse this format. Add an ENCODE_BYTES macro that does not include a length, and use it for the key. Also adjust the expected length. Note that commit 774521f353e1d ("rxrpc: Fix an assertion in rxrpc_read()") had fixed a BUG by changing the length rather than fixing the encoding. The original length was correct. Fixes: 99455153d067 ("RxRPC: Parse security index 5 keys (Kerberos 5)") Signed-off-by: Marc Dionne Signed-off-by: David Howells commit 1c33524f79853f41e80390b1a223254aadd30bd4 Author: Serge Semin Date: Sat Oct 3 00:16:47 2020 +0300 MAINTAINERS: Add maintainer of DW APB SSI driver Add myself as a maintainer of the Synopsis DesignWare APB SSI driver. Suggested-by: Andy Shevchenko Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20201002211648.24320-1-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit 720ef73d1a239e33c3ad8fac356b9b1348e68aaf Author: Aaron Ma Date: Sat Oct 3 01:09:16 2020 +0800 platform/x86: thinkpad_acpi: re-initialize ACPI buffer size when reuse Evaluating ACPI _BCL could fail, then ACPI buffer size will be set to 0. When reuse this ACPI buffer, AE_BUFFER_OVERFLOW will be triggered. Re-initialize buffer size will make ACPI evaluate successfully. Fixes: 46445b6b896fd ("thinkpad-acpi: fix handle locate for video and query of _BCL") Signed-off-by: Aaron Ma Signed-off-by: Andy Shevchenko commit a78c6f5956a949b496a5b087188dde52483edf51 Author: Atish Patra Date: Thu Oct 1 12:04:56 2020 -0700 RISC-V: Make sure memblock reserves the memory containing DT Currently, the memory containing DT is not reserved. Thus, that region of memory can be reallocated or reused for other purposes. This may result in corrupted DT for nommu virt board in Qemu. We may not face any issue in kendryte as DT is embedded in the kernel image for that. Fixes: 6bd33e1ece52 ("riscv: add nommu support") Cc: stable@vger.kernel.org Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 549738f15da0e5a00275977623be199fbbf7df50 Author: Linus Torvalds Date: Sun Oct 4 16:04:34 2020 -0700 Linux 5.9-rc8 commit 4296adc3e32f5d544a95061160fe7e127be1b9ff Author: Guillaume Nault Date: Fri Oct 2 21:53:08 2020 +0200 net/core: check length before updating Ethertype in skb_mpls_{push,pop} Openvswitch allows to drop a packet's Ethernet header, therefore skb_mpls_push() and skb_mpls_pop() might be called with ethernet=true and mac_len=0. In that case the pointer passed to skb_mod_eth_type() doesn't point to an Ethernet header and the new Ethertype is written at unexpected locations. Fix this by verifying that mac_len is big enough to contain an Ethernet header. Fixes: fa4e0f8855fc ("net/sched: fix corrupted L2 header with MPLS 'push' and 'pop' actions") Signed-off-by: Guillaume Nault Acked-by: Davide Caratti Signed-off-by: David S. Miller commit f4544e5361da5050ff5c0330ceea095cb5dbdd72 Author: Tom Rix Date: Sat Oct 3 11:51:21 2020 -0700 net: mvneta: fix double free of txq->buf clang static analysis reports this problem: drivers/net/ethernet/marvell/mvneta.c:3465:2: warning: Attempt to free released memory kfree(txq->buf); ^~~~~~~~~~~~~~~ When mvneta_txq_sw_init() fails to alloc txq->tso_hdrs, it frees without poisoning txq->buf. The error is caught in the mvneta_setup_txqs() caller which handles the error by cleaning up all of the txqs with a call to mvneta_txq_sw_deinit which also frees txq->buf. Since mvneta_txq_sw_deinit is a general cleaner, all of the partial cleaning in mvneta_txq_sw_deinit()'s error handling is not needed. Fixes: 2adb719d74f6 ("net: mvneta: Implement software TSO") Signed-off-by: Tom Rix Signed-off-by: David S. Miller commit 580e4273d7a883ececfefa692c1f96bdbacb99b5 Author: Cong Wang Date: Fri Oct 2 12:13:34 2020 -0700 net_sched: check error pointer in tcf_dump_walker() Although we take RTNL on dump path, it is possible to skip RTNL on insertion path. So the following race condition is possible: rtnl_lock() // no rtnl lock mutex_lock(&idrinfo->lock); // insert ERR_PTR(-EBUSY) mutex_unlock(&idrinfo->lock); tc_dump_action() rtnl_unlock() So we have to skip those temporary -EBUSY entries on dump path too. Reported-and-tested-by: syzbot+b47bc4f247856fb4d9e1@syzkaller.appspotmail.com Fixes: 0fedc63fadf0 ("net_sched: commit action insertions together") Cc: Vlad Buslov Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 9a9e77495958c7382b2438bc19746dd3aaaabb8e Author: Anant Thazhemadam Date: Mon Oct 5 02:25:36 2020 +0530 net: team: fix memory leak in __team_options_register The variable "i" isn't initialized back correctly after the first loop under the label inst_rollback gets executed. The value of "i" is assigned to be option_count - 1, and the ensuing loop (under alloc_rollback) begins by initializing i--. Thus, the value of i when the loop begins execution will now become i = option_count - 2. Thus, when kfree(dst_opts[i]) is called in the second loop in this order, (i.e., inst_rollback followed by alloc_rollback), dst_optsp[option_count - 2] is the first element freed, and dst_opts[option_count - 1] does not get freed, and thus, a memory leak is caused. This memory leak can be fixed, by assigning i = option_count (instead of option_count - 1). Fixes: 80f7c6683fe0 ("team: add support for per-port options") Reported-by: syzbot+69b804437cfec30deac3@syzkaller.appspotmail.com Tested-by: syzbot+69b804437cfec30deac3@syzkaller.appspotmail.com Signed-off-by: Anant Thazhemadam Signed-off-by: David S. Miller commit 7ed9e3d97c32d969caded2dfb6e67c1a2cc5a0b1 Author: Si-Wei Liu Date: Sat Oct 3 01:02:10 2020 -0400 vhost-vdpa: fix page pinning leakage in error path Pinned pages are not properly accounted particularly when mapping error occurs on IOTLB update. Clean up dangling pinned pages for the error path. As the inflight pinned pages, specifically for memory region that strides across multiple chunks, would need more than one free page for book keeping and accounting. For simplicity, pin pages for all memory in the IOVA range in one go rather than have multiple pin_user_pages calls to make up the entire region. This way it's easier to track and account the pages already mapped, particularly for clean-up in the error path. Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") Signed-off-by: Si-Wei Liu Link: https://lore.kernel.org/r/1601701330-16837-3-git-send-email-si-wei.liu@oracle.com Signed-off-by: Michael S. Tsirkin commit 1477c8aebb94a1db398c12d929a9d27bbd678d8c Author: Si-Wei Liu Date: Sat Oct 3 01:02:09 2020 -0400 vhost-vdpa: fix vhost_vdpa_map() on error condition vhost_vdpa_map() should remove the iotlb entry just added if the corresponding mapping fails to set up properly. Fixes: 4c8cf31885f6 ("vhost: introduce vDPA-based backend") Signed-off-by: Si-Wei Liu Link: https://lore.kernel.org/r/1601701330-16837-2-git-send-email-si-wei.liu@oracle.com Signed-off-by: Michael S. Tsirkin commit ab5122510b0a453c0ac898ec9952d38e80243ee7 Author: Greg Kurz Date: Sat Oct 3 12:02:13 2020 +0200 vhost: Don't call log_access_ok() when using IOTLB When the IOTLB device is enabled, the log_guest_addr that is passed by userspace to the VHOST_SET_VRING_ADDR ioctl, and which is then written to vq->log_addr, is a GIOVA. All writes to this address are translated by log_user() to writes to an HVA, and then ultimately logged through the corresponding GPAs in log_write_hva(). No logging will ever occur with vq->log_addr in this case. It is thus wrong to pass vq->log_addr and log_guest_addr to log_access_vq() which assumes they are actual GPAs. Introduce a new vq_log_used_access_ok() helper that only checks accesses to the log for the used structure when there isn't an IOTLB device around. Signed-off-by: Greg Kurz Link: https://lore.kernel.org/r/160171933385.284610.10189082586063280867.stgit@bahia.lan Signed-off-by: Michael S. Tsirkin commit 71878fa46c7e3b40fa7b3f1b6e4ba3f92f1ac359 Author: Greg Kurz Date: Sat Oct 3 12:02:03 2020 +0200 vhost: Use vhost_get_used_size() in vhost_vring_set_addr() The open-coded computation of the used size doesn't take the event into account when the VIRTIO_RING_F_EVENT_IDX feature is present. Fix that by using vhost_get_used_size(). Fixes: 8ea8cf89e19a ("vhost: support event index") Cc: stable@vger.kernel.org Signed-off-by: Greg Kurz Link: https://lore.kernel.org/r/160171932300.284610.11846106312938909461.stgit@bahia.lan Signed-off-by: Michael S. Tsirkin commit 0210a8db2aeca393fb3067e234967877e3146266 Author: Greg Kurz Date: Sat Oct 3 12:01:52 2020 +0200 vhost: Don't call access_ok() when using IOTLB When the IOTLB device is enabled, the vring addresses we get from userspace are GIOVAs. It is thus wrong to pass them down to access_ok() which only takes HVAs. Access validation is done at prefetch time with IOTLB. Teach vq_access_ok() about that by moving the (vq->iotlb) check from vhost_vq_access_ok() to vq_access_ok(). This prevents vhost_vring_set_addr() to fail when verifying the accesses. No behavior change for vhost_vq_access_ok(). BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1883084 Fixes: 6b1e6cc7855b ("vhost: new device IOTLB API") Cc: jasowang@redhat.com CC: stable@vger.kernel.org # 4.14+ Signed-off-by: Greg Kurz Acked-by: Jason Wang Link: https://lore.kernel.org/r/160171931213.284610.2052489816407219136.stgit@bahia.lan Signed-off-by: Michael S. Tsirkin commit 790ca79d3e7f76d77291540e1728f400c6ad931f Author: Christophe JAILLET Date: Fri Oct 2 21:47:43 2020 +0200 net: typhoon: Fix a typo Typoon --> Typhoon s/Typoon/Typhoon/ Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 1f7e877c20517735bceff1535e1b7fa846b2f215 Author: Randy Dunlap Date: Thu Oct 1 10:54:49 2020 -0700 net: hinic: fix DEVLINK build errors Fix many (lots deleted here) build errors in hinic by selecting NET_DEVLINK. ld: drivers/net/ethernet/huawei/hinic/hinic_hw_dev.o: in function `mgmt_watchdog_timeout_event_handler': hinic_hw_dev.c:(.text+0x30a): undefined reference to `devlink_health_report' ld: drivers/net/ethernet/huawei/hinic/hinic_devlink.o: in function `hinic_fw_reporter_dump': hinic_devlink.c:(.text+0x1c): undefined reference to `devlink_fmsg_u32_pair_put' ld: drivers/net/ethernet/huawei/hinic/hinic_devlink.o: in function `hinic_fw_reporter_dump': hinic_devlink.c:(.text+0x126): undefined reference to `devlink_fmsg_binary_pair_put' ld: drivers/net/ethernet/huawei/hinic/hinic_devlink.o: in function `hinic_hw_reporter_dump': hinic_devlink.c:(.text+0x1ba): undefined reference to `devlink_fmsg_string_pair_put' ld: hinic_devlink.c:(.text+0x227): undefined reference to `devlink_fmsg_u8_pair_put' ld: drivers/net/ethernet/huawei/hinic/hinic_devlink.o: in function `hinic_devlink_alloc': hinic_devlink.c:(.text+0xaee): undefined reference to `devlink_alloc' ld: drivers/net/ethernet/huawei/hinic/hinic_devlink.o: in function `hinic_devlink_free': hinic_devlink.c:(.text+0xb04): undefined reference to `devlink_free' ld: drivers/net/ethernet/huawei/hinic/hinic_devlink.o: in function `hinic_devlink_register': hinic_devlink.c:(.text+0xb26): undefined reference to `devlink_register' ld: drivers/net/ethernet/huawei/hinic/hinic_devlink.o: in function `hinic_devlink_unregister': hinic_devlink.c:(.text+0xb46): undefined reference to `devlink_unregister' ld: drivers/net/ethernet/huawei/hinic/hinic_devlink.o: in function `hinic_health_reporters_create': hinic_devlink.c:(.text+0xb75): undefined reference to `devlink_health_reporter_create' ld: hinic_devlink.c:(.text+0xb95): undefined reference to `devlink_health_reporter_create' ld: hinic_devlink.c:(.text+0xbac): undefined reference to `devlink_health_reporter_destroy' ld: drivers/net/ethernet/huawei/hinic/hinic_devlink.o: in function `hinic_health_reporters_destroy': Fixes: 51ba902a16e6 ("net-next/hinic: Initialize hw interface") Signed-off-by: Randy Dunlap Cc: Bin Luo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Aviad Krawczyk Cc: Zhao Chen Signed-off-by: David S. Miller commit 388e201d41fa1ed8f2dce0f0567f56f8e919ffb0 Author: Vineetha G. Jaya Kumaran Date: Thu Oct 1 23:56:09 2020 +0800 net: stmmac: Modify configuration method of EEE timers Ethtool manual stated that the tx-timer is the "the amount of time the device should stay in idle mode prior to asserting its Tx LPI". The previous implementation for "ethtool --set-eee tx-timer" sets the LPI TW timer duration which is not correct. Hence, this patch fixes the "ethtool --set-eee tx-timer" to configure the EEE LPI timer. The LPI TW Timer will be using the defined default value instead of "ethtool --set-eee tx-timer" which follows the EEE LS timer implementation. Changelog V2 *Not removing/modifying the eee_timer. *EEE LPI timer can be configured through ethtool and also the eee_timer module param. *EEE TW Timer will be configured with default value only, not able to be configured through ethtool or module param. This follows the implementation of the EEE LS Timer. Fixes: d765955d2ae0 ("stmmac: add the Energy Efficient Ethernet support") Signed-off-by: Vineetha G. Jaya Kumaran Signed-off-by: Voon Weifeng Signed-off-by: David S. Miller commit 22fbc037cd32e4e6771d2271b565806cfb8c134c Merge: 5ee56135b2f58 e2e1a1c86bf32 Author: Linus Torvalds Date: Sat Oct 3 12:19:23 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Two bugfixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: VMX: update PFEC_MASK/PFEC_MATCH together with PF intercept KVM: arm64: Restore missing ISB on nVHE __tlb_switch_to_guest commit 5ee56135b2f5886cb0333d18640043a8f73fa830 Merge: 5f056638517aa 0891fb39ba67b Author: Linus Torvalds Date: Sat Oct 3 11:57:39 2020 -0700 Merge tag 'for-linus-5.9b-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "Fix a regression introduced in 5.9-rc3 which caused a system running as fully virtualized guest under Xen to crash when using legacy devices like a floppy" * tag 'for-linus-5.9b-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/events: don't use chip_data for legacy IRQs commit 5f056638517aa8ecc8b9f132a690cc6d08fa8e88 Merge: f35c08e0bb9df 25b9e4b31ed57 Author: Linus Torvalds Date: Sat Oct 3 11:47:35 2020 -0700 Merge tag 'usb-5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/PHY fixes from Greg KH: "Here are some small USB and PHY driver fixes for 5.9-rc8 The PHY driver fix resolves an issue found by Dan Carpenter for a memory leak. The USB fixes fall into two groups: - usb gadget fix from Bryan that is a fix for a previous security fix that showed up in in-the-wild testing - usb core driver matching bugfixes. This fixes a bug that has plagued the both the usbip driver and syzbot testing tools this -rc release cycle. All is now working properly so usbip connections will work, and syzbot can get back to fuzzing USB drivers properly. All have been in linux-next for a while with no reported issues" * tag 'usb-5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usbcore/driver: Accommodate usbip usbcore/driver: Fix incorrect downcast usbcore/driver: Fix specific driver selection Revert "usbip: Implement a match function to fix usbip" USB: gadget: f_ncm: Fix NDP16 datagram validation phy: ti: am654: Fix a leak in serdes_am654_probe() commit f35c08e0bb9dfab1bb5b9c244149bcb150bebf67 Merge: 72af7b411d50e 8947efc077168 Author: Linus Torvalds Date: Sat Oct 3 11:40:22 2020 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Some more driver fixes for i2c" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: npcm7xx: Clear LAST bit after a failed transaction. i2c: cpm: Fix i2c_ram structure i2c: i801: Exclude device from suspend direct complete optimization commit 72af7b411d50eddcfed7611c4510a62dfac3fcb9 Merge: d43ca1386bf21 5fc27b098dafb Author: Linus Torvalds Date: Sat Oct 3 11:37:23 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "A couple more driver quirks, now enabling newer trackpoints from Synaptics for real" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: i8042 - add nopnp quirk for Acer Aspire 5 A515 Input: trackpoint - enable Synaptics trackpoints commit d43ca1386bf21b783d618e3a5f61c3b2e8759df2 Author: Eric Biggers Date: Fri Oct 2 22:21:48 2020 -0700 scripts/spelling.txt: fix malformed entry One of the entries has three fields "mistake||correction||correction" rather than the expected two fields "mistake||correction". Fix it. Signed-off-by: Eric Biggers Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200930234359.255295-1-ebiggers@kernel.org Signed-off-by: Linus Torvalds commit 1d91df85f399adbe4f318f3e74ac5a5d84c0ca7c Author: Joonsoo Kim Date: Fri Oct 2 22:21:45 2020 -0700 mm/page_alloc: handle a missing case for memalloc_nocma_{save/restore} APIs memalloc_nocma_{save/restore} APIs can be used to skip page allocation on CMA area, but, there is a missing case and the page on CMA area could be allocated even if APIs are used. This patch handles this case to fix the potential issue. For now, these APIs are used to prevent long-term pinning on the CMA page. When the long-term pinning is requested on the CMA page, it is migrated to the non-CMA page before pinning. This non-CMA page is allocated by using memalloc_nocma_{save/restore} APIs. If APIs doesn't work as intended, the CMA page is allocated and it is pinned for a long time. This long-term pin for the CMA page causes cma_alloc() failure and it could result in wrong behaviour on the device driver who uses the cma_alloc(). Missing case is an allocation from the pcplist. MIGRATE_MOVABLE pcplist could have the pages on CMA area so we need to skip it if ALLOC_CMA isn't specified. Fixes: 8510e69c8efe (mm/page_alloc: fix memalloc_nocma_{save/restore} APIs) Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: "Aneesh Kumar K . V" Cc: Mel Gorman Link: https://lkml.kernel.org/r/1601429472-12599-1-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 484cfaca95925f1a38ded6d0561de06a70409a32 Author: Eric Farman Date: Fri Oct 2 22:21:41 2020 -0700 mm, slub: restore initial kmem_cache flags The routine that applies debug flags to the kmem_cache slabs inadvertantly prevents non-debug flags from being applied to those same objects. That is, if slub_debug=, is specified, non-debugged slabs will end up having flags of zero, and the slabs may be unusable. Fix this by including the input flags for non-matching slabs with the contents of slub_debug, so that the caches are created as expected alongside any debugging options that may be requested. With this, we can remove the check for a NULL slub_debug_string, since it's covered by the loop itself. Fixes: e17f1dfba37b ("mm, slub: extend slub_debug syntax for multiple blocks") Signed-off-by: Eric Farman Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Kees Cook Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Link: https://lkml.kernel.org/r/20200930161931.28575-1-farman@linux.ibm.com Signed-off-by: Linus Torvalds commit e2e1a1c86bf32a8d7458b9024f518cf2434414c8 Merge: b502e6ecdc3b6 452d62227958e Author: Paolo Bonzini Date: Sat Oct 3 05:07:59 2020 -0400 Merge tag 'kvmarm-fixes-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/arm64 fixes for 5.9, take #3 - Fix synchronization of VTTBR update on TLB invalidation for nVHE systems commit b502e6ecdc3b6d381bd72c5f879bc1e00d6fe7db Author: Paolo Bonzini Date: Tue Sep 29 08:31:32 2020 -0400 KVM: VMX: update PFEC_MASK/PFEC_MATCH together with PF intercept The PFEC_MASK and PFEC_MATCH fields in the VMCS reverse the meaning of the #PF intercept bit in the exception bitmap when they do not match. This means that, if PFEC_MASK and/or PFEC_MATCH are set, the hypervisor can get a vmexit for #PF exceptions even when the corresponding bit is clear in the exception bitmap. This is unexpected and is promptly detected by a WARN_ON_ONCE. To fix it, reset PFEC_MASK and PFEC_MATCH when the #PF intercept is disabled (as is common with enable_ept && !allow_smaller_maxphyaddr). Reported-by: Qian Cai > Reported-by: Naresh Kamboju Tested-by: Naresh Kamboju Signed-off-by: Paolo Bonzini commit ab0faf5f04e8f4d0602de7dba187758d58e0ea0b Merge: 9d8c05ad5627b 1253935ad8014 Author: David S. Miller Date: Fri Oct 2 16:14:21 2020 -0700 Merge tag 'mlx5-fixes-2020-09-30' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux From: Saeed Mahameed ==================== This series introduces some fixes to mlx5 driver. v1->v2: - Patch #1 Don't return while mutex is held. (Dave) v2->v3: - Drop patch #1, will consider a better approach (Jakub) - use cpu_relax() instead of cond_resched() (Jakub) - while(i--) to reveres a loop (Jakub) - Drop old mellanox email sign-off and change the committer email (Jakub) Please pull and let me know if there is any problem. For -stable v4.15 ('net/mlx5e: Fix VLAN cleanup flow') ('net/mlx5e: Fix VLAN create flow') For -stable v4.16 ('net/mlx5: Fix request_irqs error flow') For -stable v5.4 ('net/mlx5e: Add resiliency in Striding RQ mode for packets larger than MTU') ('net/mlx5: Avoid possible free of command entry while timeout comp handler') For -stable v5.7 ('net/mlx5e: Fix return status when setting unsupported FEC mode') For -stable v5.8 ('net/mlx5e: Fix race condition on nhe->n pointer in neigh update') ==================== Signed-off-by: David S. Miller commit 9d8c05ad5627b3a650087c14c67dd1d22a6368ab Author: Paolo Abeni Date: Fri Oct 2 12:39:44 2020 +0200 tcp: fix syn cookied MPTCP request socket leak If a syn-cookies request socket don't pass MPTCP-level validation done in syn_recv_sock(), we need to release it immediately, or it will be leaked. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/89 Fixes: 9466a1ccebbe ("mptcp: enable JOIN requests even if cookies are in use") Reported-and-tested-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit e7d4005d48e248a5bd30db780a67164ccdc37f16 Merge: f30e25a9d1b25 40efc4dc73956 Author: David S. Miller Date: Fri Oct 2 15:27:08 2020 -0700 Merge branch 'Introduce-sendpage_ok-to-detect-misused-sendpage-in-network-related-drivers' Coly Li says: ==================== Introduce sendpage_ok() to detect misused sendpage in network related drivers As Sagi Grimberg suggested, the original fix is refind to a more common inline routine: static inline bool sendpage_ok(struct page *page) { return (!PageSlab(page) && page_count(page) >= 1); } If sendpage_ok() returns true, the checking page can be handled by the concrete zero-copy sendpage method in network layer. The v10 series has 7 patches, fixes a WARN_ONCE() usage from v9 series, - The 1st patch in this series introduces sendpage_ok() in header file include/linux/net.h. - The 2nd patch adds WARN_ONCE() for improper zero-copy send in kernel_sendpage(). - The 3rd patch fixes the page checking issue in nvme-over-tcp driver. - The 4th patch adds page_count check by using sendpage_ok() in do_tcp_sendpages() as Eric Dumazet suggested. - The 5th and 6th patches just replace existing open coded checks with the inline sendpage_ok() routine. ==================== Signed-off-by: David S. Miller commit 40efc4dc73956e1fab177783e55f30117517c542 Author: Coly Li Date: Fri Oct 2 16:27:34 2020 +0800 libceph: use sendpage_ok() in ceph_tcp_sendpage() In libceph, ceph_tcp_sendpage() does the following checks before handle the page by network layer's zero copy sendpage method, if (page_count(page) >= 1 && !PageSlab(page)) This check is exactly what sendpage_ok() does. This patch replace the open coded checks by sendpage_ok() as a code cleanup. Signed-off-by: Coly Li Acked-by: Jeff Layton Cc: Ilya Dryomov Signed-off-by: David S. Miller commit 6aa25c737705466020e74ad44679d3758b8961f6 Author: Coly Li Date: Fri Oct 2 16:27:33 2020 +0800 scsi: libiscsi: use sendpage_ok() in iscsi_tcp_segment_map() In iscsci driver, iscsi_tcp_segment_map() uses the following code to check whether the page should or not be handled by sendpage: if (!recv && page_count(sg_page(sg)) >= 1 && !PageSlab(sg_page(sg))) The "page_count(sg_page(sg)) >= 1 && !PageSlab(sg_page(sg)" part is to make sure the page can be sent to network layer's zero copy path. This part is exactly what sendpage_ok() does. This patch uses use sendpage_ok() in iscsi_tcp_segment_map() to replace the original open coded checks. Signed-off-by: Coly Li Reviewed-by: Lee Duncan Acked-by: Martin K. Petersen Cc: Vasily Averin Cc: Cong Wang Cc: Mike Christie Cc: Chris Leech Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-by: David S. Miller commit fb25ebe1b212c37781b23a7f7cd21c0bb2f6eb83 Author: Coly Li Date: Fri Oct 2 16:27:32 2020 +0800 drbd: code cleanup by using sendpage_ok() to check page for kernel_sendpage() In _drbd_send_page() a page is checked by following code before sending it by kernel_sendpage(), (page_count(page) < 1) || PageSlab(page) If the check is true, this page won't be send by kernel_sendpage() and handled by sock_no_sendpage(). This kind of check is exactly what macro sendpage_ok() does, which is introduced into include/linux/net.h to solve a similar send page issue in nvme-tcp code. This patch uses macro sendpage_ok() to replace the open coded checks to page type and refcount in _drbd_send_page(), as a code cleanup. Signed-off-by: Coly Li Cc: Philipp Reisner Cc: Sagi Grimberg Signed-off-by: David S. Miller commit cf83a17edeeb36195596d2dae060a7c381db35f1 Author: Coly Li Date: Fri Oct 2 16:27:31 2020 +0800 tcp: use sendpage_ok() to detect misused .sendpage commit a10674bf2406 ("tcp: detecting the misuse of .sendpage for Slab objects") adds the checks for Slab pages, but the pages don't have page_count are still missing from the check. Network layer's sendpage method is not designed to send page_count 0 pages neither, therefore both PageSlab() and page_count() should be both checked for the sending page. This is exactly what sendpage_ok() does. This patch uses sendpage_ok() in do_tcp_sendpages() to detect misused .sendpage, to make the code more robust. Fixes: a10674bf2406 ("tcp: detecting the misuse of .sendpage for Slab objects") Suggested-by: Eric Dumazet Signed-off-by: Coly Li Cc: Vasily Averin Cc: David S. Miller Cc: stable@vger.kernel.org Signed-off-by: David S. Miller commit 7d4194abfc4de13a2663c7fee6891de8360f7a52 Author: Coly Li Date: Fri Oct 2 16:27:30 2020 +0800 nvme-tcp: check page by sendpage_ok() before calling kernel_sendpage() Currently nvme_tcp_try_send_data() doesn't use kernel_sendpage() to send slab pages. But for pages allocated by __get_free_pages() without __GFP_COMP, which also have refcount as 0, they are still sent by kernel_sendpage() to remote end, this is problematic. The new introduced helper sendpage_ok() checks both PageSlab tag and page_count counter, and returns true if the checking page is OK to be sent by kernel_sendpage(). This patch fixes the page checking issue of nvme_tcp_try_send_data() with sendpage_ok(). If sendpage_ok() returns true, send this page by kernel_sendpage(), otherwise use sock_no_sendpage to handle this page. Signed-off-by: Coly Li Cc: Chaitanya Kulkarni Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Jan Kara Cc: Jens Axboe Cc: Mikhail Skorzhinskii Cc: Philipp Reisner Cc: Sagi Grimberg Cc: Vlastimil Babka Cc: stable@vger.kernel.org Signed-off-by: David S. Miller commit 7b62d31d3f399079e7de7cc43e85d6481170970a Author: Coly Li Date: Fri Oct 2 16:27:29 2020 +0800 net: add WARN_ONCE in kernel_sendpage() for improper zero-copy send If a page sent into kernel_sendpage() is a slab page or it doesn't have ref_count, this page is improper to send by the zero copy sendpage() method. Otherwise such page might be unexpected released in network code path and causes impredictable panic due to kernel memory management data structure corruption. This path adds a WARN_ON() on the sending page before sends it into the concrete zero-copy sendpage() method, if the page is improper for the zero-copy sendpage() method, a warning message can be observed before the consequential unpredictable kernel panic. This patch does not change existing kernel_sendpage() behavior for the improper page zero-copy send, it just provides hint warning message for following potential panic due the kernel memory heap corruption. Signed-off-by: Coly Li Cc: Cong Wang Cc: Christoph Hellwig Cc: David S. Miller Cc: Sridhar Samudrala Signed-off-by: David S. Miller commit c381b07941adc2274ce552daf86c94701c5e265a Author: Coly Li Date: Fri Oct 2 16:27:28 2020 +0800 net: introduce helper sendpage_ok() in include/linux/net.h The original problem was from nvme-over-tcp code, who mistakenly uses kernel_sendpage() to send pages allocated by __get_free_pages() without __GFP_COMP flag. Such pages don't have refcount (page_count is 0) on tail pages, sending them by kernel_sendpage() may trigger a kernel panic from a corrupted kernel heap, because these pages are incorrectly freed in network stack as page_count 0 pages. This patch introduces a helper sendpage_ok(), it returns true if the checking page, - is not slab page: PageSlab(page) is false. - has page refcount: page_count(page) is not zero All drivers who want to send page to remote end by kernel_sendpage() may use this helper to check whether the page is OK. If the helper does not return true, the driver should try other non sendpage method (e.g. sock_no_sendpage()) to handle the page. Signed-off-by: Coly Li Cc: Chaitanya Kulkarni Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Jan Kara Cc: Jens Axboe Cc: Mikhail Skorzhinskii Cc: Philipp Reisner Cc: Sagi Grimberg Cc: Vlastimil Babka Cc: stable@vger.kernel.org Signed-off-by: David S. Miller commit f30e25a9d1b25ac8d40071c4dc2679ad0fcdc55a Author: Petko Manolov Date: Fri Oct 2 10:56:04 2020 +0300 net: usb: pegasus: Proper error handing when setting pegasus' MAC address v2: If reading the MAC address from eeprom fail don't throw an error, use randomly generated MAC instead. Either way the adapter will soldier on and the return type of set_ethernet_addr() can be reverted to void. v1: Fix a bug in set_ethernet_addr() which does not take into account possible errors (or partial reads) returned by its helpers. This can potentially lead to writing random data into device's MAC address registers. Signed-off-by: Petko Manolov Signed-off-by: David S. Miller commit a93bdcb94a0b3ca72046151412c2389dca681d2a Author: Mauro Carvalho Chehab Date: Fri Oct 2 07:49:45 2020 +0200 net: core: document two new elements of struct net_device As warned by "make htmldocs", there are two new struct elements that aren't documented: ../include/linux/netdevice.h:2159: warning: Function parameter or member 'unlink_list' not described in 'net_device' ../include/linux/netdevice.h:2159: warning: Function parameter or member 'nested_level' not described in 'net_device' Fixes: 1fc70edb7d7b ("net: core: add nested_level variable in net_device") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: David S. Miller commit d3d45f8220d60a0b2aaaacf8fb2be4e6ffd9008e Merge: 4d9c3a688a01e 39c4dbe4cc363 Author: Linus Torvalds Date: Fri Oct 2 14:51:34 2020 -0700 Merge tag 'pinctrl-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Some pin control fixes here. All of them are driver fixes, the Intel Cherryview being the most interesting one. - Fix a mux problem for I2C in the MVEBU driver. - Fix a really hairy inversion problem in the Intel Cherryview driver. - Fix the register for the sdc2_clk in the Qualcomm SM8250 driver. - Check the virtual GPIO boot failur in the Mediatek driver" * tag 'pinctrl-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: mediatek: check mtk_is_virt_gpio input parameter pinctrl: qcom: sm8250: correct sdc2_clk pinctrl: cherryview: Preserve CHV_PADCTRL1_INVRXTX_TXDATA flag on GPIOs pinctrl: mvebu: Fix i2c sda definition for 98DX3236 commit 4d9c3a688a01e7dd0a33cf3ddb7b206cf867b615 Merge: cb6f55af1fb28 76a6b0b90d532 Author: Linus Torvalds Date: Fri Oct 2 14:48:25 2020 -0700 Merge tag 'pci-v5.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Fix rockchip regression in rockchip_pcie_valid_device() (Lorenzo Pieralisi) - Add Pali Rohár as aardvark PCI maintainer (Pali Rohár) * tag 'pci-v5.9-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: MAINTAINERS: Add Pali Rohár as aardvark PCI maintainer PCI: rockchip: Fix bus checks in rockchip_pcie_valid_device() commit cb6f55af1fb28655c9f3843bc12c0a48856c1d09 Merge: 702bfc891db16 bcf3a2953d36b Author: Linus Torvalds Date: Fri Oct 2 14:42:13 2020 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two patches in driver frameworks. The iscsi one corrects a bug induced by a BPF change to network locking and the other is a regression we introduced" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: iscsi: iscsi_tcp: Avoid holding spinlock while calling getpeername() scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case commit 702bfc891db162b99e880da78cc256dac14cfc7f Merge: f016a54052347 c8d317aa1887b Author: Linus Torvalds Date: Fri Oct 2 14:38:10 2020 -0700 Merge tag 'io_uring-5.9-2020-10-02' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - fix for async buffered reads if read-ahead is fully disabled (Hao) - double poll match fix - ->show_fdinfo() potential ABBA deadlock complaint fix * tag 'io_uring-5.9-2020-10-02' of git://git.kernel.dk/linux-block: io_uring: fix async buffered reads when readahead is disabled io_uring: fix potential ABBA deadlock in ->show_fdinfo() io_uring: always delete double poll wait entry on match commit f016a5405234709938b38e965e02950e51084ac3 Merge: d4fce2e20ffed 632bfb6323799 Author: Linus Torvalds Date: Fri Oct 2 14:34:52 2020 -0700 Merge tag 'block-5.9-2020-10-02' of git://git.kernel.dk/linux-block Pull block fix from Jens Axboe: "Single fix for a ->commit_rqs failure case" * tag 'block-5.9-2020-10-02' of git://git.kernel.dk/linux-block: blk-mq: call commit_rqs while list empty but error happen commit 0c7689830e907668288a1a1da84dca66dbdb4728 Author: Heinrich Schuchardt Date: Fri Oct 2 21:06:23 2020 +0200 Documentation/x86: Fix incorrect references to zero-page.txt The file zero-page.txt does not exit. Add links to zero-page.rst instead. [ bp: Massage a bit. ] Signed-off-by: Heinrich Schuchardt Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20201002190623.7489-1-xypron.glpk@gmx.de commit a95bc734e60449e7b073ff7ff70c35083b290ae9 Author: Johannes Berg Date: Fri Oct 2 09:46:04 2020 +0200 netlink: fix policy dump leak If userspace doesn't complete the policy dump, we leak the allocated state. Fix this. Fixes: d07dcf9aadd6 ("netlink: add infrastructure to expose policies to userspace") Signed-off-by: Johannes Berg Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6d53a9fe5a1983490bc14b3a64d49fabb4ccc651 Author: Peilin Ye Date: Fri Oct 2 10:22:23 2020 -0400 block/scsi-ioctl: Fix kernel-infoleak in scsi_put_cdrom_generic_arg() scsi_put_cdrom_generic_arg() is copying uninitialized stack memory to userspace, since the compiler may leave a 3-byte hole in the middle of `cgc32`. Fix it by adding a padding field to `struct compat_cdrom_generic_command`. Cc: stable@vger.kernel.org Fixes: f3ee6e63a9df ("compat_ioctl: move CDROM_SEND_PACKET handling into scsi") Suggested-by: Dan Carpenter Suggested-by: Arnd Bergmann Reported-by: syzbot+85433a479a646a064ab3@syzkaller.appspotmail.com Signed-off-by: Peilin Ye Signed-off-by: Jens Axboe commit 1253935ad801485270194d5651acab04abc97b36 Author: Vlad Buslov Date: Sun Sep 20 19:59:08 2020 +0300 net/mlx5e: Fix race condition on nhe->n pointer in neigh update Current neigh update event handler implementation takes reference to neighbour structure, assigns it to nhe->n, tries to schedule workqueue task and releases the reference if task was already enqueued. This results potentially overwriting existing nhe->n pointer with another neighbour instance, which causes double release of the instance (once in neigh update handler that failed to enqueue to workqueue and another one in neigh update workqueue task that processes updated nhe->n pointer instead of original one): [ 3376.512806] ------------[ cut here ]------------ [ 3376.513534] refcount_t: underflow; use-after-free. [ 3376.521213] Modules linked in: act_skbedit act_mirred act_tunnel_key vxlan ip6_udp_tunnel udp_tunnel nfnetlink act_gact cls_flower sch_ingress openvswitch nsh nf_conncount nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 mlx5_ib mlx5_core mlxfw pci_hyperv_intf ptp pps_core nfsv3 nfs_acl rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache ib_isert iscsi_target_mod ib_srpt target_core_mod ib_srp rpcrdma rdma_ucm ib_umad ib_ipoib ib_iser rdma_cm ib_cm iw_cm rfkill ib_uverbs ib_core sunrpc kvm_intel kvm iTCO_wdt iTCO_vendor_support virtio_net irqbypass net_failover crc32_pclmul lpc_ich i2c_i801 failover pcspkr i2c_smbus mfd_core ghash_clmulni_intel sch_fq_codel drm i2c _core ip_tables crc32c_intel serio_raw [last unloaded: mlxfw] [ 3376.529468] CPU: 8 PID: 22756 Comm: kworker/u20:5 Not tainted 5.9.0-rc5+ #6 [ 3376.530399] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 [ 3376.531975] Workqueue: mlx5e mlx5e_rep_neigh_update [mlx5_core] [ 3376.532820] RIP: 0010:refcount_warn_saturate+0xd8/0xe0 [ 3376.533589] Code: ff 48 c7 c7 e0 b8 27 82 c6 05 0b b6 09 01 01 e8 94 93 c1 ff 0f 0b c3 48 c7 c7 88 b8 27 82 c6 05 f7 b5 09 01 01 e8 7e 93 c1 ff <0f> 0b c3 0f 1f 44 00 00 8b 07 3d 00 00 00 c0 74 12 83 f8 01 74 13 [ 3376.536017] RSP: 0018:ffffc90002a97e30 EFLAGS: 00010286 [ 3376.536793] RAX: 0000000000000000 RBX: ffff8882de30d648 RCX: 0000000000000000 [ 3376.537718] RDX: ffff8882f5c28f20 RSI: ffff8882f5c18e40 RDI: ffff8882f5c18e40 [ 3376.538654] RBP: ffff8882cdf56c00 R08: 000000000000c580 R09: 0000000000001a4d [ 3376.539582] R10: 0000000000000731 R11: ffffc90002a97ccd R12: 0000000000000000 [ 3376.540519] R13: ffff8882de30d600 R14: ffff8882de30d640 R15: ffff88821e000900 [ 3376.541444] FS: 0000000000000000(0000) GS:ffff8882f5c00000(0000) knlGS:0000000000000000 [ 3376.542732] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3376.543545] CR2: 0000556e5504b248 CR3: 00000002c6f10005 CR4: 0000000000770ee0 [ 3376.544483] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3376.545419] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3376.546344] PKRU: 55555554 [ 3376.546911] Call Trace: [ 3376.547479] mlx5e_rep_neigh_update.cold+0x33/0xe2 [mlx5_core] [ 3376.548299] process_one_work+0x1d8/0x390 [ 3376.548977] worker_thread+0x4d/0x3e0 [ 3376.549631] ? rescuer_thread+0x3e0/0x3e0 [ 3376.550295] kthread+0x118/0x130 [ 3376.550914] ? kthread_create_worker_on_cpu+0x70/0x70 [ 3376.551675] ret_from_fork+0x1f/0x30 [ 3376.552312] ---[ end trace d84e8f46d2a77eec ]--- Fix the bug by moving work_struct to dedicated dynamically-allocated structure. This enabled every event handler to work on its own private neighbour pointer and removes the need for handling the case when task is already enqueued. Fixes: 232c001398ae ("net/mlx5e: Add support to neighbour update flow") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit d4a16052bccdd695982f89d815ca075825115821 Author: Aya Levin Date: Sun Sep 13 18:05:40 2020 +0300 net/mlx5e: Fix VLAN create flow When interface is attached while in promiscuous mode and with VLAN filtering turned off, both configurations are not respected and VLAN filtering is performed. There are 2 flows which add the any-vid rules during interface attach: VLAN creation table and set rx mode. Each is relaying on the other to add any-vid rules, eventually non of them does. Fix this by adding any-vid rules on VLAN creation regardless of promiscuous mode. Fixes: 9df30601c843 ("net/mlx5e: Restore vlan filter after seamless reset") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 8c7353b6f716436ad0bfda2b5c5524ab2dde5894 Author: Aya Levin Date: Sun Sep 13 17:57:23 2020 +0300 net/mlx5e: Fix VLAN cleanup flow Prior to this patch unloading an interface in promiscuous mode with RX VLAN filtering feature turned off - resulted in a warning. This is due to a wrong condition in the VLAN rules cleanup flow, which left the any-vid rules in the VLAN steering table. These rules prevented destroying the flow group and the flow table. The any-vid rules are removed in 2 flows, but none of them remove it in case both promiscuous is set and VLAN filtering is off. Fix the issue by changing the condition of the VLAN table cleanup flow to clean also in case of promiscuous mode. mlx5_core 0000:00:08.0: mlx5_destroy_flow_group:2123:(pid 28729): Flow group 20 wasn't destroyed, refcount > 1 mlx5_core 0000:00:08.0: mlx5_destroy_flow_group:2123:(pid 28729): Flow group 19 wasn't destroyed, refcount > 1 mlx5_core 0000:00:08.0: mlx5_destroy_flow_table:2112:(pid 28729): Flow table 262149 wasn't destroyed, refcount > 1 ... ... ------------[ cut here ]------------ FW pages counter is 11560 after reclaiming all pages WARNING: CPU: 1 PID: 28729 at drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:660 mlx5_reclaim_startup_pages+0x178/0x230 [mlx5_core] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Call Trace: mlx5_function_teardown+0x2f/0x90 [mlx5_core] mlx5_unload_one+0x71/0x110 [mlx5_core] remove_one+0x44/0x80 [mlx5_core] pci_device_remove+0x3e/0xc0 device_release_driver_internal+0xfb/0x1c0 device_release_driver+0x12/0x20 pci_stop_bus_device+0x68/0x90 pci_stop_and_remove_bus_device+0x12/0x20 hv_eject_device_work+0x6f/0x170 [pci_hyperv] ? __schedule+0x349/0x790 process_one_work+0x206/0x400 worker_thread+0x34/0x3f0 ? process_one_work+0x400/0x400 kthread+0x126/0x140 ? kthread_park+0x90/0x90 ret_from_fork+0x22/0x30 ---[ end trace 6283bde8d26170dc ]--- Fixes: 9df30601c843 ("net/mlx5e: Restore vlan filter after seamless reset") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 2608a2f831c47dfdf18885a7289be5af97182b05 Author: Aya Levin Date: Wed Aug 12 10:44:36 2020 +0300 net/mlx5e: Fix return status when setting unsupported FEC mode Verify the configured FEC mode is supported by at least a single link mode before applying the command. Otherwise fail the command and return "Operation not supported". Prior to this patch, the command was successful, yet it falsely set all link modes to FEC auto mode - like configuring FEC mode to auto. Auto mode is the default configuration if a link mode doesn't support the configured FEC mode. Fixes: b5ede32d3329 ("net/mlx5e: Add support for FEC modes based on 50G per lane links") Signed-off-by: Aya Levin Reviewed-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 3d093bc2369003b4ce6c3522d9b383e47c40045d Author: Aya Levin Date: Sun Aug 9 12:34:21 2020 +0300 net/mlx5e: Fix driver's declaration to support GRE offload Declare GRE offload support with respect to the inner protocol. Add a list of supported inner protocols on which the driver can offload checksum and GSO. For other protocols, inform the stack to do the needed operations. There is no noticeable impact on GRE performance. Fixes: 2729984149e6 ("net/mlx5e: Support TSO and TX checksum offloads for GRE tunnels") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 2b0219898b8684075ff66027551fb02ea12f652b Author: Maor Dickman Date: Tue Sep 1 12:33:18 2020 +0300 net/mlx5e: CT, Fix coverity issue The cited commit introduced the following coverity issue at function mlx5_tc_ct_rule_to_tuple_nat: - Memory - corruptions (OVERRUN) Overrunning array "tuple->ip.src_v6.in6_u.u6_addr32" of 4 4-byte elements at element index 7 (byte offset 31) using index "ip6_offset" (which evaluates to 7). In case of IPv6 destination address rewrite, ip6_offset values are between 4 to 7, which will cause memory overrun of array "tuple->ip.src_v6.in6_u.u6_addr32" to array "tuple->ip.dst_v6.in6_u.u6_addr32". Fixed by writing the value directly to array "tuple->ip.dst_v6.in6_u.u6_addr32" in case ip6_offset values are between 4 to 7. Fixes: bc562be9674b ("net/mlx5e: CT: Save ct entries tuples in hashtables") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit c3c9402373fe20e2d08c04f437ce4dcd252cffb2 Author: Aya Levin Date: Mon Jul 20 16:53:18 2020 +0300 net/mlx5e: Add resiliency in Striding RQ mode for packets larger than MTU Prior to this fix, in Striding RQ mode the driver was vulnerable when receiving packets in the range (stride size - headroom, stride size]. Where stride size is calculated by mtu+headroom+tailroom aligned to the closest power of 2. Usually, this filtering is performed by the HW, except for a few cases: - Between 2 VFs over the same PF with different MTUs - On bluefield, when the host physical function sets a larger MTU than the ARM has configured on its representor and uplink representor. When the HW filtering is not present, packets that are larger than MTU might be harmful for the RQ's integrity, in the following impacts: 1) Overflow from one WQE to the next, causing a memory corruption that in most cases is unharmful: as the write happens to the headroom of next packet, which will be overwritten by build_skb(). In very rare cases, high stress/load, this is harmful. When the next WQE is not yet reposted and points to existing SKB head. 2) Each oversize packet overflows to the headroom of the next WQE. On the last WQE of the WQ, where addresses wrap-around, the address of the remainder headroom does not belong to the next WQE, but it is out of the memory region range. This results in a HW CQE error that moves the RQ into an error state. Solution: Add a page buffer at the end of each WQE to absorb the leak. Actually the maximal overflow size is headroom but since all memory units must be of the same size, we use page size to comply with UMR WQEs. The increase in memory consumption is of a single page per RQ. Initialize the mkey with all MTTs pointing to a default page. When the channels are activated, UMR WQEs will redirect the RX WQEs to the actual memory from the RQ's pool, while the overflow MTTs remain mapped to the default page. Fixes: 73281b78a37a ("net/mlx5e: Derive Striding RQ size from MTU") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 08a762cecc60e19cd64e379df6580f1997408e04 Author: Aya Levin Date: Mon Aug 3 16:22:42 2020 +0300 net/mlx5e: Fix error path for RQ alloc Increase granularity of the error path to avoid unneeded free/release. Fix the cleanup to be symmetric to the order of creation. Fixes: 0ddf543226ac ("xdp/mlx5: setup xdp_rxq_info") Fixes: 422d4c401edd ("net/mlx5e: RX, Split WQ objects for different RQ types") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 732ebfab7fe96b7ac9a3df3208f14752a4bb6db3 Author: Maor Gottlieb Date: Mon Aug 31 21:37:31 2020 +0300 net/mlx5: Fix request_irqs error flow Fix error flow handling in request_irqs which try to free irq that we failed to request. It fixes the below trace. WARNING: CPU: 1 PID: 7587 at kernel/irq/manage.c:1684 free_irq+0x4d/0x60 CPU: 1 PID: 7587 Comm: bash Tainted: G W OE 4.15.15-1.el7MELLANOXsmp-x86_64 #1 Hardware name: Advantech SKY-6200/SKY-6200, BIOS F2.00 08/06/2020 RIP: 0010:free_irq+0x4d/0x60 RSP: 0018:ffffc9000ef47af0 EFLAGS: 00010282 RAX: ffff88001476ae00 RBX: 0000000000000655 RCX: 0000000000000000 RDX: ffff88001476ae00 RSI: ffffc9000ef47ab8 RDI: ffff8800398bb478 RBP: ffff88001476a838 R08: ffff88001476ae00 R09: 000000000000156d R10: 0000000000000000 R11: 0000000000000004 R12: ffff88001476a838 R13: 0000000000000006 R14: ffff88001476a888 R15: 00000000ffffffe4 FS: 00007efeadd32740(0000) GS:ffff88047fc40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc9cc010008 CR3: 00000001a2380004 CR4: 00000000007606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: mlx5_irq_table_create+0x38d/0x400 [mlx5_core] ? atomic_notifier_chain_register+0x50/0x60 mlx5_load_one+0x7ee/0x1130 [mlx5_core] init_one+0x4c9/0x650 [mlx5_core] pci_device_probe+0xb8/0x120 driver_probe_device+0x2a1/0x470 ? driver_allows_async_probing+0x30/0x30 bus_for_each_drv+0x54/0x80 __device_attach+0xa3/0x100 pci_bus_add_device+0x4a/0x90 pci_iov_add_virtfn+0x2dc/0x2f0 pci_enable_sriov+0x32e/0x420 mlx5_core_sriov_configure+0x61/0x1b0 [mlx5_core] ? kstrtoll+0x22/0x70 num_vf_store+0x4b/0x70 [mlx5_core] kernfs_fop_write+0x102/0x180 __vfs_write+0x26/0x140 ? rcu_all_qs+0x5/0x80 ? _cond_resched+0x15/0x30 ? __sb_start_write+0x41/0x80 vfs_write+0xad/0x1a0 SyS_write+0x42/0x90 do_syscall_64+0x60/0x110 entry_SYSCALL_64_after_hwframe+0x3d/0xa2 Fixes: 24163189da48 ("net/mlx5: Separate IRQ request/free from EQ life cycle") Signed-off-by: Maor Gottlieb Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit b898ce7bccf13087719c021d829dab607c175246 Author: Saeed Mahameed Date: Fri Sep 11 11:48:55 2020 -0700 net/mlx5: cmdif, Avoid skipping reclaim pages if FW is not accessible In case of pci is offline reclaim_pages_cmd() will still try to call the FW to release FW pages, cmd_exec() in this case will return a silent success without actually calling the FW. This is wrong and will cause page leaks, what we should do is to detect pci offline or command interface un-available before tying to access the FW and manually release the FW pages in the driver. In this patch we share the code to check for FW command interface availability and we call it in sensitive places e.g. reclaim_pages_cmd(). Alternative fix: 1. Remove MLX5_CMD_OP_MANAGE_PAGES form mlx5_internal_err_ret_value, command success simulation list. 2. Always Release FW pages even if cmd_exec fails in reclaim_pages_cmd(). Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 410bd754cd73c4a2ac3856d9a03d7b08f9c906bf Author: Eran Ben Elisha Date: Mon Aug 31 15:04:35 2020 +0300 net/mlx5: Add retry mechanism to the command entry index allocation It is possible that new command entry index allocation will temporarily fail. The new command holds the semaphore, so it means that a free entry should be ready soon. Add one second retry mechanism before returning an error. Patch "net/mlx5: Avoid possible free of command entry while timeout comp handler" increase the possibility to bump into this temporarily failure as it delays the entry index release for non-callback commands. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 1d5558b1f0de81f54ddee05f3793acc5260d107f Author: Eran Ben Elisha Date: Tue Jul 21 10:25:52 2020 +0300 net/mlx5: poll cmd EQ in case of command timeout Once driver detects a command interface command timeout, it warns the user and returns timeout error to the caller. In such case, the entry of the command is not evacuated (because only real event interrupt is allowed to clear command interface entry). If the HW event interrupt of this entry will never arrive, this entry will be left unused forever. Command interface entries are limited and eventually we can end up without the ability to post a new command. In addition, if driver will not consume the EQE of the lost interrupt and rearm the EQ, no new interrupts will arrive for other commands. Add a resiliency mechanism for manually polling the command EQ in case of a command timeout. In case resiliency mechanism will find non-handled EQE, it will consume it, and the command interface will be fully functional again. Once the resiliency flow finished, wait another 5 seconds for the command interface to complete for this command entry. Define mlx5_cmd_eq_recover() to manage the cmd EQ polling resiliency flow. Add an async EQ spinlock to avoid races between resiliency flows and real interrupts that might run simultaneously. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit 50b2412b7e7862c5af0cbf4b10d93bc5c712d021 Author: Eran Ben Elisha Date: Tue Aug 4 10:40:21 2020 +0300 net/mlx5: Avoid possible free of command entry while timeout comp handler Upon command completion timeout, driver simulates a forced command completion. In a rare case where real interrupt for that command arrives simultaneously, it might release the command entry while the forced handler might still access it. Fix that by adding an entry refcount, to track current amount of allowed handlers. Command entry to be released only when this refcount is decremented to zero. Command refcount is always initialized to one. For callback commands, command completion handler is the symmetric flow to decrement it. For non-callback commands, it is wait_func(). Before ringing the doorbell, increment the refcount for the real completion handler. Once the real completion handler is called, it will decrement it. For callback commands, once the delayed work is scheduled, increment the refcount. Upon callback command completion handler, we will try to cancel the timeout callback. In case of success, we need to decrement the callback refcount as it will never run. In addition, gather the entry index free and the entry free into a one flow for all command types release. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 432161ea26d6d5e5c3f7306d9407d26ed1e1953e Author: Eran Ben Elisha Date: Thu Aug 13 16:55:20 2020 +0300 net/mlx5: Fix a race when moving command interface to polling mode As part of driver unload, it destroys the commands EQ (via FW command). As the commands EQ is destroyed, FW will not generate EQEs for any command that driver sends afterwards. Driver should poll for later commands status. Driver commands mode metadata is updated before the commands EQ is actually destroyed. This can lead for double completion handle by the driver (polling and interrupt), if a command is executed and completed by FW after the mode was changed, but before the EQ was destroyed. Fix that by using the mlx5_cmd_allowed_opcode mechanism to guarantee that only DESTROY_EQ command can be executed during this time period. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Eran Ben Elisha Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit d4fce2e20ffed59eb5db7780fcbbb0a21decef74 Merge: db23baa28eb1f 3701cb59d892b Author: Linus Torvalds Date: Fri Oct 2 10:37:08 2020 -0700 Merge branch 'work.epoll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull epoll fixes from Al Viro: "Several race fixes in epoll" * 'work.epoll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ep_create_wakeup_source(): dentry name can change under you... epoll: EPOLL_CTL_ADD: close the race in decision to take fast path epoll: replace ->visited/visited_list with generation count epoll: do not insert into poll queues until all sanity checks are done commit db23baa28eb1f93df1fc175a419e7ffe5b6f1582 Merge: 4e3b9ce271b4b aa9887608e77b Author: Linus Torvalds Date: Fri Oct 2 10:13:05 2020 -0700 Merge tag 'riscv-for-linus-5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: "Two fixes for this week: - The addition of a symbol export for clint_time_val, which has been inlined into some timex functions and can be used by drivers. - A fix to avoid calling get_cycles() before the timers have been probed. These both only effect !MMU systems" * tag 'riscv-for-linus-5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Check clint_time_val before use clocksource: clint: Export clint_time_val for modules commit 4e3b9ce271b4b54d2293a3916d22e4ddc0c89aab Merge: c513091103314 4c8f353272dd1 Author: Linus Torvalds Date: Fri Oct 2 10:09:40 2020 -0700 Merge tag 'for-5.9-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two more fixes. One is for a lockdep warning/lockup (also caught by syzbot), that one has been seen in practice. Regarding the other syzbot reports mentioned last time, they don't seem to be urgent and reliably reproducible so they'll be fixed later. The second fix is for a potential corruption when device replace finishes and the in-memory state of trim is not copied to the new device" * tag 'for-5.9-rc7-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix filesystem corruption after a device replace btrfs: move btrfs_rm_dev_replace_free_srcdev outside of all locks btrfs: move btrfs_scratch_superblocks into btrfs_dev_replace_finishing commit c5130911033149c18bf84fa094c8e5def26ec8d0 Merge: cc8ad8fa844ae 7bbe8f2a7e7e8 Author: Linus Torvalds Date: Fri Oct 2 10:05:56 2020 -0700 Merge tag 'pm-5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix one more issue related to the recent RCU-lockdep changes, a typo in documentation and add a missing return statement to intel_pstate. Specifics: - Fix up RCU usage for cpuidle on the ARM imx6q platform (Ulf Hansson) - Fix typo in the PM documentation (Yoann Congal) - Add return statement that is missing after recent changes in the intel_pstate driver (Zhang Rui)" * tag 'pm-5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ARM: imx6q: Fixup RCU usage for cpuidle Documentation: PM: Fix a reStructuredText syntax error cpufreq: intel_pstate: Fix missing return statement commit cc8ad8fa844aeae64c10f002b97a7c56619f1f57 Merge: 0bf0dfda003eb 52a035235ed5a Author: Linus Torvalds Date: Fri Oct 2 10:01:00 2020 -0700 Merge tag 'staging-5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull IIO fixes from Greg KH: "Here are two small IIO driver fixes for 5.9-rc8 that resolve some reported issues: - driver name fixed in one driver - device name typo fixed Both have been in linux-next for a while with no reported problems" * tag 'staging-5.9-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: adc: qcom-spmi-adc5: fix driver name iio: adc: ad7124: Fix typo in device name commit 0bf0dfda003eb98ca2b26441dec28751991d76d3 Merge: 2270b890bc295 8c1f1c34777bd Author: Linus Torvalds Date: Fri Oct 2 09:51:42 2020 -0700 Merge tag 'gpio-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "Some late GPIO fixes for the v5.9 series: - Fix compiler warnings on the OMAP when PM is disabled - Clear the interrupt when setting edge sensitivity on the Spreadtrum driver. - Fix up spurious interrupts on the TC35894. - Support threaded interrupts on the Siox controller. - Fix resource leaks on the mockup driver. - Fix line event handling in syscall compatible mode for the character device. - Fix an unitialized variable in the PCA953A driver. - Fix access to all GPIO IRQs on the Aspeed AST2600. - Fix line direction on the AMD FCH driver. - Use the bitmap API instead of compiler intrinsics for bit manipulation in the PCA953x driver" * tag 'gpio-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: pca953x: Correctly initialize registers 6 and 7 for PCA957x gpio: pca953x: Use bitmap API over implicit GCC extension gpio: amd-fch: correct logic of GPIO_LINE_DIRECTION gpio: aspeed: fix ast2600 bank properties gpio/aspeed-sgpio: don't enable all interrupts by default gpio/aspeed-sgpio: enable access to all 80 input & output sgpios gpio: pca953x: Fix uninitialized pending variable gpiolib: Fix line event handling in syscall compatible mode gpio: mockup: fix resource leak in error path gpio: siox: explicitly support only threaded irqs gpio: tc35894: fix up tc35894 interrupt configuration gpio: sprd: Clear interrupt when setting the type as edge gpio: omap: Fix warnings if PM is disabled commit 2270b890bc295c6de2f4e4e3a770025b76657699 Merge: 09a6b0bc3be79 afd7f30886b0b Author: Linus Torvalds Date: Fri Oct 2 09:40:09 2020 -0700 Merge tag 'mmc-v5.9-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - Fix deadlock when removing MEMSTICK host - Workaround broken CMDQ on Intel GLK based IRBIS models * tag 'mmc-v5.9-rc4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci: Workaround broken command queuing on Intel GLK based IRBIS models memstick: Skip allocating card when removing host commit 09a6b0bc3be793ca8cba580b7992d73e9f68f15d Author: Thibaut Sautereau Date: Fri Oct 2 17:16:11 2020 +0200 random32: Restore __latent_entropy attribute on net_rand_state Commit f227e3ec3b5c ("random32: update the net random state on interrupt and activity") broke compilation and was temporarily fixed by Linus in 83bdc7275e62 ("random32: remove net_rand_state from the latent entropy gcc plugin") by entirely moving net_rand_state out of the things handled by the latent_entropy GCC plugin. From what I understand when reading the plugin code, using the __latent_entropy attribute on a declaration was the wrong part and simply keeping the __latent_entropy attribute on the variable definition was the correct fix. Fixes: 83bdc7275e62 ("random32: remove net_rand_state from the latent entropy gcc plugin") Acked-by: Willy Tarreau Cc: Emese Revfy Signed-off-by: Thibaut Sautereau Signed-off-by: Linus Torvalds commit 7bbe8f2a7e7e819c050212a4bc984f03dc85af9d Merge: 1a67b9263e066 fc7d17551f776 Author: Rafael J. Wysocki Date: Fri Oct 2 18:30:30 2020 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: intel_pstate: Fix missing return statement commit be458311cdbb5d94820ffc4e40c5906085c0a507 Author: Roman Gushchin Date: Thu Oct 1 13:07:49 2020 -0700 mm: memcg/slab: fix slab statistics in !SMP configuration Since commit ea426c2a7de8 ("mm: memcg: prepare for byte-sized vmstat items") the write side of slab counters accepts a value in bytes and converts it to pages. It happens in __mod_node_page_state(). However a non-SMP version of __mod_node_page_state() doesn't perform this conversion. It leads to incorrect (unrealistically high) slab counters values. Fix this by adding a similar conversion to the non-SMP version of __mod_node_page_state(). Signed-off-by: Roman Gushchin Reported-and-tested-by: Bastian Bittorf Fixes: ea426c2a7de8 ("mm: memcg: prepare for byte-sized vmstat items") Acked-by: Vlastimil Babka Signed-off-by: Linus Torvalds commit 9fb77799557d1537a059161bf645db7be9e358ae Author: Hans de Goede Date: Fri Sep 25 08:58:12 2020 +0200 MAINTAINERS: Add Mark Gross and Hans de Goede as x86 platform drivers maintainers Darren Hart and Andy Shevchenko lately have not had enough time to maintain the x86 platform drivers, dropping their status to: "Odd Fixes". Mark Gross and Hans de Goede will take over maintainership of the x86 platform drivers. Replace Darren and Andy's entries with theirs and change the status to "Maintained". Signed-off-by: Hans de Goede Acked-by: Mark Gross Signed-off-by: Andy Shevchenko commit 8169bd3e6e193497cab781acddcff8fde5d0c416 Author: Hans de Goede Date: Wed Sep 30 15:19:05 2020 +0200 platform/x86: intel-vbtn: Switch to an allow-list for SW_TABLET_MODE reporting 2 recent commits: cfae58ed681c ("platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type") 1fac39fd0316 ("platform/x86: intel-vbtn: Also handle tablet-mode switch on "Detachable" and "Portable" chassis-types") Enabled reporting of SW_TABLET_MODE on more devices since the vbtn ACPI interface is used by the firmware on some of those devices to report this. Testing has shown that unconditionally enabling SW_TABLET_MODE reporting on all devices with a chassis type of 8 ("Portable") or 10 ("Notebook") which support the VGBS method is a very bad idea. Many of these devices are normal laptops (non 2-in-1) models with a VGBS which always returns 0, which we translate to SW_TABLET_MODE=1. This in turn causes userspace (libinput) to suppress events from the builtin keyboard and touchpad, making the laptop essentially unusable. Since the problem of wrongly reporting SW_TABLET_MODE=1 in combination with libinput, leads to a non-usable system. Where as OTOH many people will not even notice when SW_TABLET_MODE is not being reported, this commit changes intel_vbtn_has_switches() to use a DMI based allow-list. The new DMI based allow-list matches on the 31 ("Convertible") and 32 ("Detachable") chassis-types, as these clearly are 2-in-1s and so far if they support the intel-vbtn ACPI interface they all have properly working SW_TABLET_MODE reporting. Besides these 2 generic matches, it also contains model specific matches for 2-in-1 models which use a different chassis-type and which are known to have properly working SW_TABLET_MODE reporting. This has been tested on the following 2-in-1 devices: Dell Venue 11 Pro 7130 vPro HP Pavilion X2 10-p002nd HP Stream x360 Convertible PC 11 Medion E1239T Fixes: cfae58ed681c ("platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type") BugLink: https://forum.manjaro.org/t/keyboard-and-touchpad-only-work-on-kernel-5-6/22668 BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1175599 Cc: Barnabás Pőcze Cc: Takashi Iwai Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 21d64817c72470ed69483f59279ce557c0658826 Author: Andy Shevchenko Date: Fri Oct 2 17:29:59 2020 +0300 platform/x86: intel-vbtn: Revert "Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360" After discussion, see the Link tag, it appears that this is not good enough. So, revert it now and apply a better fix. This reverts commit d823346876a970522ff9e4d2b323c9b734dcc4de. Link: https://lore.kernel.org/platform-driver-x86/s5hft71klxl.wl-tiwai@suse.de/ Signed-off-by: Andy Shevchenko commit 472e5b056f000a778abb41f1e443de58eb259783 Author: Linus Torvalds Date: Thu Oct 1 19:14:36 2020 -0700 pipe: remove pipe_wait() and fix wakeup race with splice The pipe splice code still used the old model of waiting for pipe IO by using a non-specific "pipe_wait()" that waited for any pipe event to happen, which depended on all pipe IO being entirely serialized by the pipe lock. So by checking the state you were waiting for, and then adding yourself to the wait queue before dropping the lock, you were guaranteed to see all the wakeups. Strictly speaking, the actual wakeups were not done under the lock, but the pipe_wait() model still worked, because since the waiter held the lock when checking whether it should sleep, it would always see the current state, and the wakeup was always done after updating the state. However, commit 0ddad21d3e99 ("pipe: use exclusive waits when reading or writing") split the single wait-queue into two, and in the process also made the "wait for event" code wait for _two_ wait queues, and that then showed a race with the wakers that were not serialized by the pipe lock. It's only splice that used that "pipe_wait()" model, so the problem wasn't obvious, but Josef Bacik reports: "I hit a hang with fstest btrfs/187, which does a btrfs send into /dev/null. This works by creating a pipe, the write side is given to the kernel to write into, and the read side is handed to a thread that splices into a file, in this case /dev/null. The box that was hung had the write side stuck here [pipe_write] and the read side stuck here [splice_from_pipe_next -> pipe_wait]. [ more details about pipe_wait() scenario ] The problem is we're doing the prepare_to_wait, which sets our state each time, however we can be woken up either with reads or writes. In the case above we race with the WRITER waking us up, and re-set our state to INTERRUPTIBLE, and thus never break out of schedule" Josef had a patch that avoided the issue in pipe_wait() by just making it set the state only once, but the deeper problem is that pipe_wait() depends on a level of synchonization by the pipe mutex that it really shouldn't. And the whole "wait for any pipe state change" model really isn't very good to begin with. So rather than trying to work around things in pipe_wait(), remove that legacy model of "wait for arbitrary pipe event" entirely, and actually create functions that wait for the pipe actually being readable or writable, and can do so without depending on the pipe lock serializing everything. Fixes: 0ddad21d3e99 ("pipe: use exclusive waits when reading or writing") Link: https://lore.kernel.org/linux-fsdevel/bfa88b5ad6f069b2b679316b9e495a970130416c.1601567868.git.josef@toxicpanda.com/ Reported-by: Josef Bacik Reviewed-and-tested-by: Josef Bacik Signed-off-by: Linus Torvalds commit 44b6e23be32be4470b1b8bf27380c2e9cca98e2b Merge: eed2ef4403de3 1a3f2fd7fc4e8 Author: Linus Torvalds Date: Thu Oct 1 12:59:36 2020 -0700 Merge tag 'iommu-fixes-v5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Fix a device reference counting bug in the Exynos IOMMU driver. - Lockdep fix for the Intel VT-d driver. - Fix a bug in the AMD IOMMU driver which caused corruption of the IVRS ACPI table and caused IOMMU driver initialization failures in kdump kernels. * tag 'iommu-fixes-v5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Fix lockdep splat in iommu_flush_dev_iotlb() iommu/amd: Fix the overwritten field in IVMD header iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate() commit ef9da46ddef071e1bbb943afbbe9b38771855554 Author: Heiner Kallweit Date: Thu Oct 1 09:23:02 2020 +0200 r8169: fix data corruption issue on RTL8402 Petr reported that after resume from suspend RTL8402 partially truncates incoming packets, and re-initializing register RxConfig before the actual chip re-initialization sequence is needed to avoid the issue. Reported-by: Petr Tesarik Proposed-by: Petr Tesarik Tested-by: Petr Tesarik Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit bb13a800620c2b9046187facdf7dfd45699f5a74 Author: Heiner Kallweit Date: Thu Oct 1 08:44:19 2020 +0200 r8169: fix handling ether_clk Petr reported that system freezes on r8169 driver load on a system using ether_clk. The original change was done under the assumption that the clock isn't needed for basic operations like chip register access. But obviously that was wrong. Therefore effectively revert the original change, and in addition leave the clock active when suspending and WoL is enabled. Chip may not be able to process incoming packets otherwise. Fixes: 9f0b54cd1672 ("r8169: move switching optional clock on/off to pll power functions") Reported-by: Petr Tesarik Tested-by: Petr Tesarik Signed-off-by: Heiner Kallweit Reviewed-by: Hans de Goede Signed-off-by: David S. Miller commit eed2ef4403de3d8937ccb624e15d3c5004e7dda5 Merge: fcadab740480e a509a66a9d0d4 Author: Linus Torvalds Date: Thu Oct 1 11:49:01 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Catalin Marinas: "A previous commit to prevent AML memory opregions from accessing the kernel memory turned out to be too restrictive. Relax the permission check to permit the ACPI core to map kernel memory used for table overrides" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: permit ACPI core to map kernel memory used for table overrides commit fcadab740480e0e0e9fa9bd272acd409884d431a Merge: aa5ff93523ebc 132d7c8abeaa6 Author: Linus Torvalds Date: Thu Oct 1 09:45:37 2020 -0700 Merge tag 'drm-fixes-2020-10-01-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "AMD and vmwgfx fixes. Just dequeuing these a bit early as the AMD ones are bit larger than I'd prefer, but Alex missed last week so it's a double set of fixes. The larger ones are just register header fixes for the new chips that were just introduced in rc1 along with some new PCI IDs for new hw. Otherwise it is usual fixes. The vmwgfx fix was due to some testing I was doing and found we weren't booting properly, vmware had the fix internally so hurried it vmwgfx: - fix a regression due to TTM refactor amdgpu: - Fix potential double free in userptr handling - Sienna Cichlid and Navy Flounder udpates - Add Sienna Cichlid PCI IDs - Drop experimental flag for navi12 - Raven fixes - Renoir fixes - HDCP fix - DCN3 fix for clang and older versions of gcc - Fix a runtime pm refcount issue" * tag 'drm-fixes-2020-10-01-1' of git://anongit.freedesktop.org/drm/drm: drm/amdgpu: disable gfxoff temporarily for navy_flounder drm/amd/pm: setup APU dpm clock table in SMU HW initialization drm/vmwgfx: Fix error handling in get_node drm/amd/display: remove duplicate call to rn_vbios_smu_get_smu_version() drm/amdgpu/swsmu/smu12: fix force clock handling for mclk drm/amdgpu: restore proper ref count in amdgpu_display_crtc_set_config drm/amdgpu/display: fix CFLAGS setup for DCN30 drm/amd/display: fix return value check for hdcp_work drm/amdgpu: remove gpu_info fw support for sienna_cichlid etc. drm/amd/pm: Removed fixed clock in auto mode DPM drm/amdgpu: remove experimental flag from navi12 drm/amdgpu: add device ID for sienna_cichlid (v2) drm/amdgpu: use the AV1 defines for VCN 3.0 drm/amdgpu: add VCN 3.0 AV1 registers drm/amdgpu: add the GC 10.3 VRS registers drm/amdgpu: prevent double kfree ttm->sg commit aa5ff93523ebc9f4cfd9fb37d021b5204ce14657 Merge: 60e720931556f b40341fad6cc2 Author: Linus Torvalds Date: Thu Oct 1 09:41:02 2020 -0700 Merge tag 'trace-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Two tracing fixes: - Fix temp buffer accounting that caused a WARNING for ftrace_dump_on_opps() - Move the recursion check in one of the function callback helpers to the beginning of the function, as if the rcu_is_watching() gets traced, it will cause a recursive loop that will crash the kernel" * tag 'trace-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Move RCU is watching check after recursion check tracing: Fix trace_find_next_entry() accounting of temp buffer size commit d82a532a611572d85fd2610ec41b5c9e222931b6 Author: Yonghong Song Date: Wed Sep 30 22:13:39 2020 -0700 bpf: Fix "unresolved symbol" build error with resolve_btfids Michal reported a build failure likes below: BTFIDS vmlinux FAILED unresolved symbol tcp_timewait_sock make[1]: *** [/.../linux-5.9-rc7/Makefile:1176: vmlinux] Error 255 This error can be triggered when config has CONFIG_NET enabled but CONFIG_INET disabled. In this case, there is no user of istructs inet_timewait_sock and tcp_timewait_sock and hence vmlinux BTF types are not generated for these two structures. To fix the problem, let us force BTF generation for these two structures with BTF_TYPE_EMIT. Fixes: fce557bcef11 ("bpf: Make btf_sock_ids global") Reported-by: Michal Kubecek Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20201001051339.2549085-1-yhs@fb.com commit 8a018eb55e3ac033592afbcb476b0ffe64465b12 Author: Qian Cai Date: Thu Oct 1 08:50:55 2020 -0400 pipe: Fix memory leaks in create_pipe_files() Calling pipe2() with O_NOTIFICATION_PIPE could results in memory leaks unless watch_queue_init() is successful. In case of watch_queue_init() failure in pipe2() we are left with inode and pipe_inode_info instances that need to be freed. That failure exit has been introduced in commit c73be61cede5 ("pipe: Add general notification queue support") and its handling should've been identical to nearby treatment of alloc_file_pseudo() failures - it is dealing with the same situation. As it is, the mainline kernel leaks in that case. Another problem is that CONFIG_WATCH_QUEUE and !CONFIG_WATCH_QUEUE cases are treated differently (and the former leaks just pipe_inode_info, the latter - both pipe_inode_info and inode). Fixed by providing a dummy wacth_queue_init() in !CONFIG_WATCH_QUEUE case and by having failures of wacth_queue_init() handled the same way we handle alloc_file_pseudo() ones. Fixes: c73be61cede5 ("pipe: Add general notification queue support") Signed-off-by: Qian Cai Signed-off-by: Al Viro commit 1a3f2fd7fc4e8f24510830e265de2ffb8e3300d2 Author: Lu Baolu Date: Sun Sep 27 14:24:28 2020 +0800 iommu/vt-d: Fix lockdep splat in iommu_flush_dev_iotlb() Lock(&iommu->lock) without disabling irq causes lockdep warnings. [ 12.703950] ======================================================== [ 12.703962] WARNING: possible irq lock inversion dependency detected [ 12.703975] 5.9.0-rc6+ #659 Not tainted [ 12.703983] -------------------------------------------------------- [ 12.703995] systemd-udevd/284 just changed the state of lock: [ 12.704007] ffffffffbd6ff4d8 (device_domain_lock){..-.}-{2:2}, at: iommu_flush_dev_iotlb.part.57+0x2e/0x90 [ 12.704031] but this lock took another, SOFTIRQ-unsafe lock in the past: [ 12.704043] (&iommu->lock){+.+.}-{2:2} [ 12.704045] and interrupts could create inverse lock ordering between them. [ 12.704073] other info that might help us debug this: [ 12.704085] Possible interrupt unsafe locking scenario: [ 12.704097] CPU0 CPU1 [ 12.704106] ---- ---- [ 12.704115] lock(&iommu->lock); [ 12.704123] local_irq_disable(); [ 12.704134] lock(device_domain_lock); [ 12.704146] lock(&iommu->lock); [ 12.704158] [ 12.704164] lock(device_domain_lock); [ 12.704174] *** DEADLOCK *** Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20200927062428.13713-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 0891fb39ba67bd7ae023ea0d367297ffff010781 Author: Juergen Gross Date: Wed Sep 30 11:16:14 2020 +0200 xen/events: don't use chip_data for legacy IRQs Since commit c330fb1ddc0a ("XEN uses irqdesc::irq_data_common::handler_data to store a per interrupt XEN data pointer which contains XEN specific information.") Xen is using the chip_data pointer for storing IRQ specific data. When running as a HVM domain this can result in problems for legacy IRQs, as those might use chip_data for their own purposes. Use a local array for this purpose in case of legacy IRQs, avoiding the double use. Cc: stable@vger.kernel.org Fixes: c330fb1ddc0a ("XEN uses irqdesc::irq_data_common::handler_data to store a per interrupt XEN data pointer which contains XEN specific information.") Signed-off-by: Juergen Gross Tested-by: Stefan Bader Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20200930091614.13660-1-jgross@suse.com Signed-off-by: Juergen Gross commit 0bbe4ced53e36786eafc2ecbf9a1761f55b4a82e Author: Adrian Huang Date: Sat Sep 26 18:26:02 2020 +0800 iommu/amd: Fix the overwritten field in IVMD header Commit 387caf0b759a ("iommu/amd: Treat per-device exclusion ranges as r/w unity-mapped regions") accidentally overwrites the 'flags' field in IVMD (struct ivmd_header) when the I/O virtualization memory definition is associated with the exclusion range entry. This leads to the corrupted IVMD table (incorrect checksum). The kdump kernel reports the invalid checksum: ACPI BIOS Warning (bug): Incorrect checksum in table [IVRS] - 0x5C, should be 0x60 (20200717/tbprint-177) AMD-Vi: [Firmware Bug]: IVRS invalid checksum Fix the above-mentioned issue by modifying the 'struct unity_map_entry' member instead of the IVMD header. Cleanup: The *exclusion_range* functions are not used anymore, so get rid of them. Fixes: 387caf0b759a ("iommu/amd: Treat per-device exclusion ranges as r/w unity-mapped regions") Reported-and-tested-by: Baoquan He Signed-off-by: Adrian Huang Cc: Jerry Snitselaar Link: https://lore.kernel.org/r/20200926102602.19177-1-adrianhuang0701@gmail.com Signed-off-by: Joerg Roedel commit 452d62227958e149e5c7b0084a559c0957c3ff2a Author: Marc Zyngier Date: Mon Jul 13 15:15:14 2020 +0100 KVM: arm64: Restore missing ISB on nVHE __tlb_switch_to_guest Commit a0e50aa3f4a8 ("KVM: arm64: Factor out stage 2 page table data from struct kvm") dropped the ISB after __load_guest_stage2(), only leaving the one that is required when the speculative AT workaround is in effect. As Andrew points it: "This alternative is 'backwards' to avoid a double ISB as there is one in __load_guest_stage2 when the workaround is active." Restore the missing ISB, conditionned on the AT workaround not being active. Fixes: a0e50aa3f4a8 ("KVM: arm64: Factor out stage 2 page table data from struct kvm") Reported-by: Andrew Scull Reported-by: Thomas Tai Signed-off-by: Marc Zyngier commit 8c1f1c34777bddb633d4a068a9c812d29974c6bd Author: Andy Shevchenko Date: Wed Sep 30 17:20:13 2020 +0300 gpio: pca953x: Correctly initialize registers 6 and 7 for PCA957x When driver has been converted to the bitmap API the non-bitmap functions started behaving differently on 32-bit BE architectures since the bytes in two consequent unsigned longs are in different order in comparison to byte array. Hence if the chip had had more than 32 lines the memset() call over it would have not set up upper lines correctly. Although it's currently a theoretical case (no supported chips of this type has 32+ lines), it's better to provide a clean code to avoid people thinking this is okay and potentially producing not fully working things. Fixes: 35d13d94893f ("gpio: pca953x: convert to use bitmap API") Signed-off-by: Andy Shevchenko Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200930142013.59247-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit e09e200e07222467ef82367bff7cc6f44ad00397 Author: Andy Shevchenko Date: Wed Sep 30 17:20:12 2020 +0300 gpio: pca953x: Use bitmap API over implicit GCC extension In IRQ handler we have to clear bitmap before use. Currently the GCC extension has been used for that. For sake of the consistency switch to bitmap API. As expected bloat-o-meter shows no difference in the object size. Signed-off-by: Andy Shevchenko Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200930142013.59247-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 39c4dbe4cc363accd676162c24b264f44c581490 Author: Hanks Chen Date: Thu Aug 20 19:22:25 2020 +0800 pinctrl: mediatek: check mtk_is_virt_gpio input parameter check mtk_is_virt_gpio input parameter, virtual gpio need to support eint mode. add error handler for the ko case to fix this boot fail: pc : mtk_is_virt_gpio+0x20/0x38 [pinctrl_mtk_common_v2] lr : mtk_gpio_get_direction+0x44/0xb0 [pinctrl_paris] Fixes: edd546465002 ("pinctrl: mediatek: avoid virtual gpio trying to set reg") Signed-off-by: Hanks Chen Acked-by: Sean Wang Singed-off-by: Jie Yang Link: https://lore.kernel.org/r/1597922546-29633-1-git-send-email-hanks.chen@mediatek.com Signed-off-by: Linus Walleij commit 5d8ff95a52c36740bf4e61202d08549e7a9caf20 Author: Dmitry Baryshkov Date: Mon Sep 14 12:18:46 2020 +0300 pinctrl: qcom: sm8250: correct sdc2_clk Correct sdc2_clk pin definition (register offset is wrong, verified by the msm-4.19 driver). Fixes: 4e3ec9e407ad ("pinctrl: qcom: Add sm8250 pinctrl driver.") Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Acked-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200914091846.55204-1-dmitry.baryshkov@linaro.org Signed-off-by: Linus Walleij commit 132d7c8abeaa6b10ed5f47330b0f06c6dd220a43 Merge: 6f4fc18f3575c 95433a1305a00 Author: Dave Airlie Date: Thu Oct 1 15:25:32 2020 +1000 Merge tag 'amd-drm-fixes-5.9-2020-09-30' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.9-2020-09-30: amdgpu: - Fix potential double free in userptr handling - Sienna Cichlid and Navy Flounder udpates - Add Sienna Cichlid PCI IDs - Drop experimental flag for navi12 - Raven fixes - Renoir fixes - HDCP fix - DCN3 fix for clang and older versions of gcc - Fix a runtime pm refcount issue Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200930161326.4243-1-alexander.deucher@amd.com commit a59cf619787e628b31c310367f869fde26c8ede1 Merge: 03e7e72ceddaa 66a5209b53418 Author: David S. Miller Date: Wed Sep 30 15:07:19 2020 -0700 Merge branch 'Fix-bugs-in-Octeontx2-netdev-driver' Geetha sowjanya says: ==================== Fix bugs in Octeontx2 netdev driver In existing Octeontx2 network drivers code has issues like stale entries in broadcast replication list, missing L3TYPE for IPv6 frames, running tx queues on error and race condition in mbox reset. This patch set fixes the above issues. ==================== Signed-off-by: David S. Miller commit 66a5209b53418111757716d71e52727b782eabd4 Author: Hariprasad Kelam Date: Wed Sep 30 21:39:35 2020 +0530 octeontx2-pf: Fix synchnorization issue in mbox Mbox implementation in octeontx2 driver has three states alloc, send and reset in mbox response. VF allocate and sends message to PF for processing, PF ACKs them back and reset the mbox memory. In some case we see synchronization issue where after msgs_acked is incremented and before mbox_reset API is called, if current execution is scheduled out and a different thread is scheduled in which checks for msgs_acked. Since the new thread sees msgs_acked == msgs_sent it will try to allocate a new message and to send a new mbox message to PF.Now if mbox_reset is scheduled in, PF will see '0' in msgs_send. This patch fixes the issue by calling mbox_reset before incrementing msgs_acked flag for last processing message and checks for valid message size. Fixes: d424b6c02 ("octeontx2-pf: Enable SRIOV and added VF mbox handling") Signed-off-by: Hariprasad Kelam Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 1ea0166da0509e987caa42c30a6a71f2c6ca1875 Author: Hariprasad Kelam Date: Wed Sep 30 21:39:14 2020 +0530 octeontx2-pf: Fix the device state on error Currently in otx2_open on failure of nix_lf_start transmit queues are not stopped which are already started in link_event. Since the tx queues are not stopped network stack still try's to send the packets leading to driver crash while access the device resources. Fixes: 50fe6c02e ("octeontx2-pf: Register and handle link notifications") Signed-off-by: Hariprasad Kelam Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 89eae5e87b4fa799726a3e8911c90d418cb5d2b1 Author: Geetha sowjanya Date: Wed Sep 30 21:38:52 2020 +0530 octeontx2-pf: Fix TCP/UDP checksum offload for IPv6 frames For TCP/UDP checksum offload feature in Octeontx2 expects L3TYPE to be set irrespective of IP header checksum is being offloaded or not. Currently for IPv6 frames L3TYPE is not being set resulting in packet drop with checksum error. This patch fixes this issue. Fixes: 3ca6c4c88 ("octeontx2-pf: Add packet transmission support") Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit e154b5b70368a84a19505a0be9b0096c66562b56 Author: Subbaraya Sundeep Date: Wed Sep 30 21:38:27 2020 +0530 octeontx2-af: Fix enable/disable of default NPC entries Packet replication feature present in Octeontx2 is a hardware linked list of PF and its VF interfaces so that broadcast packets are sent to all interfaces present in the list. It is driver job to add and delete a PF/VF interface to/from the list when the interface is brought up and down. This patch fixes the npc_enadis_default_entries function to handle broadcast replication properly if packet replication feature is present. Fixes: 40df309e4166 ("octeontx2-af: Support to enable/disable default MCAM entries") Signed-off-by: Subbaraya Sundeep Signed-off-by: Geetha sowjanya Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller commit 03e7e72ceddaa643795bb36b7dcdde262eba94b0 Merge: 1f25c9bbfd44a be49b1ad299a6 Author: David S. Miller Date: Wed Sep 30 15:01:09 2020 -0700 Merge branch '100GbE' of https://github.com/anguy11/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2020-09-30 This series contains updates to ice driver only. Jake increases the wait time for firmware response as it can take longer than the current wait time. Preserves the NVM capabilities of the device in safe mode so the device reports its NVM update capabilities properly when in this state. v2: Added cover letter ==================== Signed-off-by: David S. Miller commit 76a6b0b90d532ed9bb9f6069aa12859c185e5b99 Author: Pali Rohár Date: Fri Sep 25 11:21:15 2020 +0200 MAINTAINERS: Add Pali Rohár as aardvark PCI maintainer Link: https://lore.kernel.org/r/20200925092115.16546-1-pali@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Bjorn Helgaas Acked-by: Thomas Petazzzoni commit a509a66a9d0d4f4e304d58fad38c078d0336c445 Author: Ard Biesheuvel Date: Tue Sep 29 15:25:22 2020 +0200 arm64: permit ACPI core to map kernel memory used for table overrides Jonathan reports that the strict policy for memory mapped by the ACPI core breaks the use case of passing ACPI table overrides via initramfs. This is due to the fact that the memory type used for loading the initramfs in memory is not recognized as a memory type that is typically used by firmware to pass firmware tables. Since the purpose of the strict policy is to ensure that no AML or other ACPI code can manipulate any memory that is used by the kernel to keep its internal state or the state of user tasks, we can relax the permission check, and allow mappings of memory that is reserved and marked as NOMAP via memblock, and therefore not covered by the linear mapping to begin with. Fixes: 1583052d111f ("arm64/acpi: disallow AML memory opregions to access kernel memory") Fixes: 325f5585ec36 ("arm64/acpi: disallow writeable AML opregion mapping for EFI code regions") Reported-by: Jonathan Cameron Signed-off-by: Ard Biesheuvel Tested-by: Jonathan Cameron Cc: Sudeep Holla Cc: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20200929132522.18067-1-ardb@kernel.org Signed-off-by: Catalin Marinas commit 60e720931556fc1034d0981460164dcf02697679 Merge: 02de58b24d2e1 b02cf0c4736c6 Author: Linus Torvalds Date: Wed Sep 30 14:18:38 2020 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Stephen Boyd: "Another batch of clk driver fixes: - Make sure DRAM and ChipID region doesn't get disabled on Exynos - Fix a SATA failure on Tegra - Fix the emac_ptp clk divider on stratix10" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: socfpga: stratix10: fix the divider for the emac_ptp_free_clk clk: samsung: exynos4: mark 'chipid' clock as CLK_IGNORE_UNUSED clk: tegra: Fix missing prototype for tegra210_clk_register_emc() clk: tegra: Always program PLL_E when enabled clk: tegra: Capitalization fixes clk: samsung: Keep top BPLL mux on Exynos542x enabled commit aa9887608e77b835d51f05a54940380391cd4e21 Author: Anup Patel Date: Sun Sep 27 11:09:16 2020 +0530 RISC-V: Check clint_time_val before use The NoMMU kernel is broken for QEMU virt machine from Linux-5.9-rc6 because clint_time_val is used even before CLINT driver is probed at following places: 1. rand_initialize() calls get_cycles() which in-turn uses clint_time_val 2. boot_init_stack_canary() calls get_cycles() which in-turn uses clint_time_val The issue#1 (above) is fixed by providing custom random_get_entropy() for RISC-V NoMMU kernel. For issue#2 (above), we remove dependency of boot_init_stack_canary() on get_cycles() and this is aligned with the boot_init_stack_canary() implementations of ARM, ARM64 and MIPS kernel. Fixes: d5be89a8d118 ("RISC-V: Resurrect the MMIO timer implementation for M-mode systems") Signed-off-by: Anup Patel Tested-by: Damien Le Moal Signed-off-by: Palmer Dabbelt commit 4c8f353272dd1262013873990c0fafd0e3c8f274 Author: Filipe Manana Date: Wed Sep 23 15:30:16 2020 +0100 btrfs: fix filesystem corruption after a device replace We use a device's allocation state tree to track ranges in a device used for allocated chunks, and we set ranges in this tree when allocating a new chunk. However after a device replace operation, we were not setting the allocated ranges in the new device's allocation state tree, so that tree is empty after a device replace. This means that a fitrim operation after a device replace will trim the device ranges that have allocated chunks and extents, as we trim every range for which there is not a range marked in the device's allocation state tree. It is also important during chunk allocation, since the device's allocation state is used to determine if a range is already allocated when allocating a new chunk. This is trivial to reproduce and the following script triggers the bug: $ cat reproducer.sh #!/bin/bash DEV1="/dev/sdg" DEV2="/dev/sdh" DEV3="/dev/sdi" wipefs -a $DEV1 $DEV2 $DEV3 &> /dev/null # Create a raid1 test fs on 2 devices. mkfs.btrfs -f -m raid1 -d raid1 $DEV1 $DEV2 > /dev/null mount $DEV1 /mnt/btrfs xfs_io -f -c "pwrite -S 0xab 0 10M" /mnt/btrfs/foo echo "Starting to replace $DEV1 with $DEV3" btrfs replace start -B $DEV1 $DEV3 /mnt/btrfs echo echo "Running fstrim" fstrim /mnt/btrfs echo echo "Unmounting filesystem" umount /mnt/btrfs echo "Mounting filesystem in degraded mode using $DEV3 only" wipefs -a $DEV1 $DEV2 &> /dev/null mount -o degraded $DEV3 /mnt/btrfs if [ $? -ne 0 ]; then dmesg | tail echo echo "Failed to mount in degraded mode" exit 1 fi echo echo "File foo data (expected all bytes = 0xab):" od -A d -t x1 /mnt/btrfs/foo umount /mnt/btrfs When running the reproducer: $ ./replace-test.sh wrote 10485760/10485760 bytes at offset 0 10 MiB, 2560 ops; 0.0901 sec (110.877 MiB/sec and 28384.5216 ops/sec) Starting to replace /dev/sdg with /dev/sdi Running fstrim Unmounting filesystem Mounting filesystem in degraded mode using /dev/sdi only mount: /mnt/btrfs: wrong fs type, bad option, bad superblock on /dev/sdi, missing codepage or helper program, or other error. [19581.748641] BTRFS info (device sdg): dev_replace from /dev/sdg (devid 1) to /dev/sdi started [19581.803842] BTRFS info (device sdg): dev_replace from /dev/sdg (devid 1) to /dev/sdi finished [19582.208293] BTRFS info (device sdi): allowing degraded mounts [19582.208298] BTRFS info (device sdi): disk space caching is enabled [19582.208301] BTRFS info (device sdi): has skinny extents [19582.212853] BTRFS warning (device sdi): devid 2 uuid 1f731f47-e1bb-4f00-bfbb-9e5a0cb4ba9f is missing [19582.213904] btree_readpage_end_io_hook: 25839 callbacks suppressed [19582.213907] BTRFS error (device sdi): bad tree block start, want 30490624 have 0 [19582.214780] BTRFS warning (device sdi): failed to read root (objectid=7): -5 [19582.231576] BTRFS error (device sdi): open_ctree failed Failed to mount in degraded mode So fix by setting all allocated ranges in the replace target device when the replace operation is finishing, when we are holding the chunk mutex and we can not race with new chunk allocations. A test case for fstests follows soon. Fixes: 1c11b63eff2a67 ("btrfs: replace pending/pinned chunks lists with io tree") CC: stable@vger.kernel.org # 5.2+ Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit a466c85edc6fbe845facc8f57c408c544f42899e Author: Josef Bacik Date: Thu Aug 20 11:18:27 2020 -0400 btrfs: move btrfs_rm_dev_replace_free_srcdev outside of all locks When closing and freeing the source device we could end up doing our final blkdev_put() on the bdev, which will grab the bd_mutex. As such we want to be holding as few locks as possible, so move this call outside of the dev_replace->lock_finishing_cancel_unmount lock. Since we're modifying the fs_devices we need to make sure we're holding the uuid_mutex here, so take that as well. There's a report from syzbot probably hitting one of the cases where the bd_mutex and device_list_mutex are taken in the wrong order, however it's not with device replace, like this patch fixes. As there's no reproducer available so far, we can't verify the fix. https://lore.kernel.org/lkml/000000000000fc04d105afcf86d7@google.com/ dashboard link: https://syzkaller.appspot.com/bug?extid=84a0634dc5d21d488419 WARNING: possible circular locking dependency detected 5.9.0-rc5-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/6878 is trying to acquire lock: ffff88804c17d780 (&bdev->bd_mutex){+.+.}-{3:3}, at: blkdev_put+0x30/0x520 fs/block_dev.c:1804 but task is already holding lock: ffff8880908cfce0 (&fs_devs->device_list_mutex){+.+.}-{3:3}, at: close_fs_devices.part.0+0x2e/0x800 fs/btrfs/volumes.c:1159 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&fs_devs->device_list_mutex){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x134/0x10e0 kernel/locking/mutex.c:1103 btrfs_finish_chunk_alloc+0x281/0xf90 fs/btrfs/volumes.c:5255 btrfs_create_pending_block_groups+0x2f3/0x700 fs/btrfs/block-group.c:2109 __btrfs_end_transaction+0xf5/0x690 fs/btrfs/transaction.c:916 find_free_extent_update_loop fs/btrfs/extent-tree.c:3807 [inline] find_free_extent+0x23b7/0x2e60 fs/btrfs/extent-tree.c:4127 btrfs_reserve_extent+0x166/0x460 fs/btrfs/extent-tree.c:4206 cow_file_range+0x3de/0x9b0 fs/btrfs/inode.c:1063 btrfs_run_delalloc_range+0x2cf/0x1410 fs/btrfs/inode.c:1838 writepage_delalloc+0x150/0x460 fs/btrfs/extent_io.c:3439 __extent_writepage+0x441/0xd00 fs/btrfs/extent_io.c:3653 extent_write_cache_pages.constprop.0+0x69d/0x1040 fs/btrfs/extent_io.c:4249 extent_writepages+0xcd/0x2b0 fs/btrfs/extent_io.c:4370 do_writepages+0xec/0x290 mm/page-writeback.c:2352 __writeback_single_inode+0x125/0x1400 fs/fs-writeback.c:1461 writeback_sb_inodes+0x53d/0xf40 fs/fs-writeback.c:1721 wb_writeback+0x2ad/0xd40 fs/fs-writeback.c:1894 wb_do_writeback fs/fs-writeback.c:2039 [inline] wb_workfn+0x2dc/0x13e0 fs/fs-writeback.c:2080 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 -> #3 (sb_internal#2){.+.+}-{0:0}: percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write+0x234/0x470 fs/super.c:1672 sb_start_intwrite include/linux/fs.h:1690 [inline] start_transaction+0xbe7/0x1170 fs/btrfs/transaction.c:624 find_free_extent_update_loop fs/btrfs/extent-tree.c:3789 [inline] find_free_extent+0x25e1/0x2e60 fs/btrfs/extent-tree.c:4127 btrfs_reserve_extent+0x166/0x460 fs/btrfs/extent-tree.c:4206 cow_file_range+0x3de/0x9b0 fs/btrfs/inode.c:1063 btrfs_run_delalloc_range+0x2cf/0x1410 fs/btrfs/inode.c:1838 writepage_delalloc+0x150/0x460 fs/btrfs/extent_io.c:3439 __extent_writepage+0x441/0xd00 fs/btrfs/extent_io.c:3653 extent_write_cache_pages.constprop.0+0x69d/0x1040 fs/btrfs/extent_io.c:4249 extent_writepages+0xcd/0x2b0 fs/btrfs/extent_io.c:4370 do_writepages+0xec/0x290 mm/page-writeback.c:2352 __writeback_single_inode+0x125/0x1400 fs/fs-writeback.c:1461 writeback_sb_inodes+0x53d/0xf40 fs/fs-writeback.c:1721 wb_writeback+0x2ad/0xd40 fs/fs-writeback.c:1894 wb_do_writeback fs/fs-writeback.c:2039 [inline] wb_workfn+0x2dc/0x13e0 fs/fs-writeback.c:2080 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 -> #2 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}: __flush_work+0x60e/0xac0 kernel/workqueue.c:3041 wb_shutdown+0x180/0x220 mm/backing-dev.c:355 bdi_unregister+0x174/0x590 mm/backing-dev.c:872 del_gendisk+0x820/0xa10 block/genhd.c:933 loop_remove drivers/block/loop.c:2192 [inline] loop_control_ioctl drivers/block/loop.c:2291 [inline] loop_control_ioctl+0x3b1/0x480 drivers/block/loop.c:2257 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (loop_ctl_mutex){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x134/0x10e0 kernel/locking/mutex.c:1103 lo_open+0x19/0xd0 drivers/block/loop.c:1893 __blkdev_get+0x759/0x1aa0 fs/block_dev.c:1507 blkdev_get fs/block_dev.c:1639 [inline] blkdev_open+0x227/0x300 fs/block_dev.c:1753 do_dentry_open+0x4b9/0x11b0 fs/open.c:817 do_open fs/namei.c:3251 [inline] path_openat+0x1b9a/0x2730 fs/namei.c:3368 do_filp_open+0x17e/0x3c0 fs/namei.c:3395 do_sys_openat2+0x16d/0x420 fs/open.c:1168 do_sys_open fs/open.c:1184 [inline] __do_sys_open fs/open.c:1192 [inline] __se_sys_open fs/open.c:1188 [inline] __x64_sys_open+0x119/0x1c0 fs/open.c:1188 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&bdev->bd_mutex){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:2496 [inline] check_prevs_add kernel/locking/lockdep.c:2601 [inline] validate_chain kernel/locking/lockdep.c:3218 [inline] __lock_acquire+0x2a96/0x5780 kernel/locking/lockdep.c:4426 lock_acquire+0x1f3/0xae0 kernel/locking/lockdep.c:5006 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x134/0x10e0 kernel/locking/mutex.c:1103 blkdev_put+0x30/0x520 fs/block_dev.c:1804 btrfs_close_bdev fs/btrfs/volumes.c:1117 [inline] btrfs_close_bdev fs/btrfs/volumes.c:1107 [inline] btrfs_close_one_device fs/btrfs/volumes.c:1133 [inline] close_fs_devices.part.0+0x1a4/0x800 fs/btrfs/volumes.c:1161 close_fs_devices fs/btrfs/volumes.c:1193 [inline] btrfs_close_devices+0x95/0x1f0 fs/btrfs/volumes.c:1179 close_ctree+0x688/0x6cb fs/btrfs/disk-io.c:4149 generic_shutdown_super+0x144/0x370 fs/super.c:464 kill_anon_super+0x36/0x60 fs/super.c:1108 btrfs_kill_super+0x38/0x50 fs/btrfs/super.c:2265 deactivate_locked_super+0x94/0x160 fs/super.c:335 deactivate_super+0xad/0xd0 fs/super.c:366 cleanup_mnt+0x3a3/0x530 fs/namespace.c:1118 task_work_run+0xdd/0x190 kernel/task_work.c:141 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:163 [inline] exit_to_user_mode_prepare+0x1e1/0x200 kernel/entry/common.c:190 syscall_exit_to_user_mode+0x7e/0x2e0 kernel/entry/common.c:265 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Chain exists of: &bdev->bd_mutex --> sb_internal#2 --> &fs_devs->device_list_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fs_devs->device_list_mutex); lock(sb_internal#2); lock(&fs_devs->device_list_mutex); lock(&bdev->bd_mutex); *** DEADLOCK *** 3 locks held by syz-executor.0/6878: #0: ffff88809070c0e0 (&type->s_umount_key#70){++++}-{3:3}, at: deactivate_super+0xa5/0xd0 fs/super.c:365 #1: ffffffff8a5b37a8 (uuid_mutex){+.+.}-{3:3}, at: btrfs_close_devices+0x23/0x1f0 fs/btrfs/volumes.c:1178 #2: ffff8880908cfce0 (&fs_devs->device_list_mutex){+.+.}-{3:3}, at: close_fs_devices.part.0+0x2e/0x800 fs/btrfs/volumes.c:1159 stack backtrace: CPU: 0 PID: 6878 Comm: syz-executor.0 Not tainted 5.9.0-rc5-syzkaller #0 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+0x198/0x1fd lib/dump_stack.c:118 check_noncircular+0x324/0x3e0 kernel/locking/lockdep.c:1827 check_prev_add kernel/locking/lockdep.c:2496 [inline] check_prevs_add kernel/locking/lockdep.c:2601 [inline] validate_chain kernel/locking/lockdep.c:3218 [inline] __lock_acquire+0x2a96/0x5780 kernel/locking/lockdep.c:4426 lock_acquire+0x1f3/0xae0 kernel/locking/lockdep.c:5006 __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x134/0x10e0 kernel/locking/mutex.c:1103 blkdev_put+0x30/0x520 fs/block_dev.c:1804 btrfs_close_bdev fs/btrfs/volumes.c:1117 [inline] btrfs_close_bdev fs/btrfs/volumes.c:1107 [inline] btrfs_close_one_device fs/btrfs/volumes.c:1133 [inline] close_fs_devices.part.0+0x1a4/0x800 fs/btrfs/volumes.c:1161 close_fs_devices fs/btrfs/volumes.c:1193 [inline] btrfs_close_devices+0x95/0x1f0 fs/btrfs/volumes.c:1179 close_ctree+0x688/0x6cb fs/btrfs/disk-io.c:4149 generic_shutdown_super+0x144/0x370 fs/super.c:464 kill_anon_super+0x36/0x60 fs/super.c:1108 btrfs_kill_super+0x38/0x50 fs/btrfs/super.c:2265 deactivate_locked_super+0x94/0x160 fs/super.c:335 deactivate_super+0xad/0xd0 fs/super.c:366 cleanup_mnt+0x3a3/0x530 fs/namespace.c:1118 task_work_run+0xdd/0x190 kernel/task_work.c:141 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:163 [inline] exit_to_user_mode_prepare+0x1e1/0x200 kernel/entry/common.c:190 syscall_exit_to_user_mode+0x7e/0x2e0 kernel/entry/common.c:265 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x460027 RSP: 002b:00007fff59216328 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000076035 RCX: 0000000000460027 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007fff592163d0 RBP: 0000000000000333 R08: 0000000000000000 R09: 000000000000000b R10: 0000000000000005 R11: 0000000000000246 R12: 00007fff59217460 R13: 0000000002df2a60 R14: 0000000000000000 R15: 00007fff59217460 Signed-off-by: Josef Bacik [ add syzbot reference ] Signed-off-by: David Sterba commit 1a67b9263e06688d7f683714cace8dcc203f8c55 Author: Ulf Hansson Date: Wed Sep 30 13:20:23 2020 +0200 ARM: imx6q: Fixup RCU usage for cpuidle The commit eb1f00237aca ("lockdep,trace: Expose tracepoints"), started to expose us for tracepoints. For imx6q cpuidle, this leads to an RCU splat according to below. [6.870684] [] (_raw_spin_lock) from [] (imx6q_enter_wait+0x18/0x9c) [6.878846] [] (imx6q_enter_wait) from [] (cpuidle_enter_state+0x168/0x5e4) To fix the problem, let's assign the corresponding idlestate->flags the CPUIDLE_FLAG_RCU_IDLE bit, which enables us to call rcu_idle_enter|exit() at the proper point. Reported-by: Dong Aisheng Suggested-by: Peter Zijlstra Signed-off-by: Ulf Hansson Acked-by: Peter Zijlstra (Intel) Signed-off-by: Rafael J. Wysocki commit eac53b3e304a8354dc2a2f38e60e712d0e110ef6 Author: Yoann Congal Date: Tue Sep 29 22:41:58 2020 +0200 Documentation: PM: Fix a reStructuredText syntax error Fix a reStructuredText syntax error in the cpuidle PM admin-guide documentation: the ``...'' quotation marks are parsed as partial ''...'' reStructuredText markup and break the output formatting. This change them to "...". Signed-off-by: Yoann Congal Signed-off-by: Rafael J. Wysocki commit fc7d17551f776fda243493ce59894c1eec2a339f Author: Zhang Rui Date: Mon Sep 28 11:33:42 2020 +0800 cpufreq: intel_pstate: Fix missing return statement Fix missing return statement when writing "off" to intel_pstate status sysfs I/F. Fixes: 55671ea3257a ("cpufreq: intel_pstate: Free memory only when turning off") Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit be49b1ad299a638e6181aefc7bdbfd621b46a7ef Author: Jacob Keller Date: Wed Sep 2 08:53:42 2020 -0700 ice: preserve NVM capabilities in safe mode If the driver initializes in safe mode, it will call ice_set_safe_mode_caps. This results in clearing the capabilities structures, in order to set them up for operating in safe mode, ensuring many features are disabled. This has a side effect of also clearing the capability bits that relate to NVM update. The result is that the device driver will not indicate support for unified update, even if the firmware is capable. Fix this by adding the relevant capability fields to the list of values we preserve. To simplify the code, use a common_cap structure instead of a handful of local variables. To reduce some duplication of the capability name, introduce a couple of macros used to restore the capabilities values from the cached copy. Fixes: de9b277ee032 ("ice: Add support for unified NVM update flow capability") Signed-off-by: Jacob Keller Tested-by: Brijesh Behera Signed-off-by: Tony Nguyen commit 0ec86e8e82b57cfb2f83a9de14732002816d3282 Author: Jacob Keller Date: Wed Aug 26 11:30:34 2020 -0700 ice: increase maximum wait time for flash write commands The ice driver needs to wait for a firmware response to each command to write a block of data to the scratch area used to update the device firmware. The driver currently waits for up to 1 second for this to be returned. It turns out that firmware might take longer than 1 second to return a completion in some cases. If this happens, the flash update will fail to complete. Fix this by increasing the maximum time that the driver will wait for both writing a block of data, and for activating the new NVM bank. The timeout for an erase command is already several minutes, as the firmware had to erase the entire bank which was already expected to take a minute or more in the worst case. In the case where firmware really won't respond, we will now take longer to fail. However, this ensures that if the firmware is simply slow to respond, the flash update can still complete. This new maximum timeout should not adversely increase the update time, as the implementation for wait_event_interruptible_timeout, and should wake very soon after we get a completion event. It is better for a flash update be slow but still succeed than to fail because we gave up too quickly. Fixes: d69ea414c9b4 ("ice: implement device flash update via devlink") Signed-off-by: Jacob Keller Tested-by: Brijesh Behera Signed-off-by: Tony Nguyen commit 37787e9f81e2e586b526ff5c29c94e4f41513e80 Author: Mike Christie Date: Mon Sep 21 13:23:01 2020 -0500 vhost vdpa: fix vhost_vdpa_open error handling We must free the vqs array in the open failure path, because vhost_vdpa_release will not be called. Signed-off-by: Mike Christie Link: https://lore.kernel.org/r/1600712588-9514-2-git-send-email-michael.christie@oracle.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 27204b99b08289d0993cb77c22470034b5eb974d Author: Mauro Carvalho Chehab Date: Wed Sep 30 15:24:43 2020 +0200 drm: drm_dsc.h: fix a kernel-doc markup As warned by Sphinx: ./Documentation/gpu/drm-kms-helpers:305: ./include/drm/drm_dsc.h:587: WARNING: Unparseable C cross-reference: 'struct' Invalid C declaration: Expected identifier in nested name, got keyword: struct [error at 6] struct ------^ The markup for one struct is wrong, as struct is used twice. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/3d467022325e15bba8dcb13da8fb730099303266.1601467849.git.mchehab+huawei@kernel.org commit 112c35237c726cb2c6eed32db660f285938fb666 Author: Peter Collingbourne Date: Tue Sep 29 12:53:44 2020 -0700 Partially revert "video: fbdev: amba-clcd: Retire elder CLCD driver" Also partially revert the follow-up change "drm: pl111: Absorb the external register header". This reverts the parts of commits 7e4e589db76a3cf4c1f534eb5a09cc6422766b93 and 0fb8125635e8eb5483fb095f98dcf0651206a7b8 that touch paths outside of drivers/gpu/drm/pl111. The fbdev driver is used by Android's FVP configuration. Using the DRM driver together with DRM's fbdev emulation results in a failure to boot Android. The root cause is that Android's generic fbdev userspace driver relies on the ability to set the pixel format via FBIOPUT_VSCREENINFO, which is not supported by fbdev emulation. There have been other less critical behavioral differences identified between the fbdev driver and the DRM driver with fbdev emulation. The DRM driver exposes different values for the panel's width, height and refresh rate, and the DRM driver fails a FBIOPUT_VSCREENINFO syscall with yres_virtual greater than the maximum supported value instead of letting the syscall succeed and setting yres_virtual based on yres. Signed-off-by: Peter Collingbourne Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200929195344.2219796-1-pcc@google.com commit 95433a1305a000aa91f558b062ce614a3bb8ceb5 Author: Jiansong Chen Date: Wed Sep 30 15:30:24 2020 +0800 drm/amdgpu: disable gfxoff temporarily for navy_flounder gfxoff is temporarily disabled for navy_flounder, since at present the feature caused some tdr when performing display operations. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit b195152536237acf65962b703394614d9c4d307b Author: Evan Quan Date: Wed Sep 30 12:07:56 2020 +0800 drm/amd/pm: setup APU dpm clock table in SMU HW initialization As the dpm clock table is needed during DC HW initialization. And that (DC HW initialization) comes before smu_late_init() where current APU dpm clock table setup is performed. So, NULL pointer dereference will be triggered. By moving APU dpm clock table setup to smu_hw_init(), this can be avoided. Fixes: 02cf91c113ea ("drm/amd/powerplay: postpone operations not required for hw setup to late_init") Acked-by: Nirmoy Das Acked-by: Alex Deucher Signed-off-by: Evan Quan Reported-by: Dirk Gouders Signed-off-by: Alex Deucher commit 17479aa39fbf65ad1502368437875e537c2f8139 Merge: 2e969d8a7f990 d25e8fdebdad8 Author: Linus Walleij Date: Wed Sep 30 11:38:04 2020 +0200 Merge tag 'gpio-fixes-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.9 - correct logic of GPIO_LINE_DIRECTION in gpio-amd-fch commit 1f25c9bbfd44aed9f9b6546b2815072e7b769546 Merge: 2b3e981a94d87 9cf51446e6860 Author: David S. Miller Date: Wed Sep 30 01:49:20 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2020-09-29 The following pull-request contains BPF updates for your *net* tree. We've added 7 non-merge commits during the last 14 day(s) which contain a total of 7 files changed, 28 insertions(+), 8 deletions(-). The main changes are: 1) fix xdp loading regression in libbpf for old kernels, from Andrii. 2) Do not discard packet when NETDEV_TX_BUSY, from Magnus. 3) Fix corner cases in libbpf related to endianness and kconfig, from Tony. ==================== Signed-off-by: David S. Miller commit bc21a291fc11bbd60868c45b9f5a79ceed97fd4e Author: Thomas Gleixner Date: Wed Sep 30 10:19:49 2020 +0200 x86/mce: Use idtentry_nmi_enter/exit() The recent fix for NMI vs. IRQ state tracking missed to apply the cure to the MCE handler. Fixes: ba1f2b2eaa2a ("x86/entry: Fix NMI vs IRQ state tracking") Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/87mu17ism2.fsf@nanos.tec.linutronix.de commit c14decfca23cfbeb423ad8be3961a58a31a5473c Author: Palmer Dabbelt Date: Tue Sep 29 23:48:47 2020 -0700 clocksource: clint: Export clint_time_val for modules clint_time_val will soon be used by the RISC-V implementation of random_get_entropy(), which is a static inline function that may be used by modules (at least CRYPTO_JITTERENTROPY=m). Reported-by: kernel test robot Signed-off-by: Palmer Dabbelt commit 6f4fc18f3575ca3cff892df0ba303231bc495f8a Merge: a1b8638ba1320 f54c4442893b8 Author: Dave Airlie Date: Wed Sep 30 14:21:22 2020 +1000 Merge branch 'vmwgfx-fixes-5.9' of git://people.freedesktop.org/~sroland/linux into drm-fixes One vmwgfx regression fix. Signed-off-by: Dave Airlie From: "Roland Scheidegger (VMware)" Link: https://patchwork.freedesktop.org/patch/msgid/20200930041000.2423-1-rscheidegger.oss@gmail.com commit f54c4442893b8dfbd3aff8e903c54dfff1aef990 Author: Zack Rusin Date: Fri Sep 25 11:54:10 2020 -0400 drm/vmwgfx: Fix error handling in get_node ttm_mem_type_manager_func.get_node was changed to return -ENOSPC instead of setting the node pointer to NULL. Unfortunately vmwgfx still had two places where it was explicitly converting -ENOSPC to 0 causing regressions. This fixes those spots by allowing -ENOSPC to be returned. That seems to fix recent regressions with vmwgfx. Signed-off-by: Zack Rusin Reviewed-by: Roland Scheidegger Reviewed-by: Martin Krastev Sigend-off-by: Roland Scheidegger commit bcf3a2953d36bbfb9bd44ccb3db0897d935cc485 Author: Mark Mielke Date: Mon Sep 28 00:33:29 2020 -0400 scsi: iscsi: iscsi_tcp: Avoid holding spinlock while calling getpeername() The kernel may fail to boot or devices may fail to come up when initializing iscsi_tcp devices starting with Linux 5.8. Commit a79af8a64d39 ("[SCSI] iscsi_tcp: use iscsi_conn_get_addr_param libiscsi function") introduced getpeername() within the session spinlock. Commit 1b66d253610c ("bpf: Add get{peer, sock}name attach types for sock_addr") introduced BPF_CGROUP_RUN_SA_PROG_LOCK() within getpeername(), which acquires a mutex and when used from iscsi_tcp devices can now lead to "BUG: scheduling while atomic:" and subsequent damage. Ensure that the spinlock is released before calling getpeername() or getsockname(). sock_hold() and sock_put() are used to ensure that the socket reference is preserved until after the getpeername() or getsockname() complete. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1877345 Link: https://lkml.org/lkml/2020/7/28/1085 Link: https://lkml.org/lkml/2020/8/31/459 Link: https://lore.kernel.org/r/20200928043329.606781-1-mark.mielke@gmail.com Fixes: a79af8a64d39 ("[SCSI] iscsi_tcp: use iscsi_conn_get_addr_param libiscsi function") Fixes: 1b66d253610c ("bpf: Add get{peer, sock}name attach types for sock_addr") Cc: stable@vger.kernel.org Reported-by: Marc Dionne Tested-by: Marc Dionne Reviewed-by: Mike Christie Signed-off-by: Mark Mielke Signed-off-by: Martin K. Petersen commit 2b3e981a94d876ae4f05db28b9ac6a85a80c7633 Merge: 4972c6ccf9a5f 1a49b2c2a5014 Author: David S. Miller Date: Tue Sep 29 18:16:09 2020 -0700 Merge branch 'mptcp-Fix-for-32-bit-DATA_FIN' Mat Martineau says: ==================== mptcp: Fix for 32-bit DATA_FIN The main fix is contained in patch 2, and that commit message explains the issue with not properly converting truncated DATA_FIN sequence numbers sent by the peer. With patch 2 adding an unlocked read of msk->ack_seq, patch 1 cleans up access to that data with READ_ONCE/WRITE_ONCE. This does introduce two merge conflicts with net-next, but both have straightforward resolution. Patch 1 modifies a line that got removed in net-next so the modification can be dropped when merging. Patch 2 will require a trivial conflict resolution for a modified function declaration. ==================== Signed-off-by: David S. Miller commit 1a49b2c2a501467587504e75bd049d43af38b692 Author: Mat Martineau Date: Tue Sep 29 15:08:20 2020 -0700 mptcp: Handle incoming 32-bit DATA_FIN values The peer may send a DATA_FIN mapping with either a 32-bit or 64-bit sequence number. When a 32-bit sequence number is received for the DATA_FIN, it must be expanded to 64 bits before comparing it to the last acked sequence number. This expansion was missing. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/93 Fixes: 3721b9b64676 ("mptcp: Track received DATA_FIN sequence number and add related helpers") Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 917944da3bfc7cb5ac3af26725af3371d3a12db0 Author: Mat Martineau Date: Tue Sep 29 15:08:19 2020 -0700 mptcp: Consistently use READ_ONCE/WRITE_ONCE with msk->ack_seq The msk->ack_seq value is sometimes read without the msk lock held, so make proper use of READ_ONCE and WRITE_ONCE. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 02de58b24d2e1b2cf947d57205bd2221d897193c Merge: 90fb702791bf9 efe84d408bf41 Author: Linus Torvalds Date: Tue Sep 29 17:56:30 2020 -0700 Merge tag 'devicetree-fixes-for-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Fix handling of HOST_EXTRACFLAGS for dtc - Several warning fixes for DT bindings * tag 'devicetree-fixes-for-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting dt-bindings: Fix 'reg' size issues in zynqmp examples ARM: dts: bcm2835: Change firmware compatible from simple-bus to simple-mfd dt-bindings: leds: cznic,turris-omnia-leds: fix error in binding dt-bindings: crypto: sa2ul: fix a DT binding check warning commit 90fb702791bf99b959006972e8ee7bb4609f441b Author: Linus Torvalds Date: Tue Sep 29 17:18:34 2020 -0700 autofs: use __kernel_write() for the autofs pipe writing autofs got broken in some configurations by commit 13c164b1a186 ("autofs: switch to kernel_write") because there is now an extra LSM permission check done by security_file_permission() in rw_verify_area(). autofs is one if the few places that really does want the much more limited __kernel_write(), because the write is an internal kernel one that shouldn't do any user permission checks (it also doesn't need the file_start_write/file_end_write logic, since it's just a pipe). There are a couple of other cases like that - accounting, core dumping, and splice - but autofs stands out because it can be built as a module. As a result, we need to export this internal __kernel_write() function again. We really don't want any other module to use this, but we don't have a "EXPORT_SYMBOL_FOR_AUTOFS_ONLY()". But we can mark it GPL-only to at least approximate that "internal use only" for licensing. While in this area, make autofs pass in NULL for the file position pointer, since it's always a pipe, and we now use a NULL file pointer for streaming file descriptors (see file_ppos() and commit 438ab720c675: "vfs: pass ppos=NULL to .read()/.write() of FMODE_STREAM files") This effectively reverts commits 9db977522449 ("fs: unexport __kernel_write") and 13c164b1a186 ("autofs: switch to kernel_write"). Fixes: 13c164b1a186 ("autofs: switch to kernel_write") Reported-by: Ondrej Mosnacek Acked-by: Christoph Hellwig Acked-by: Acked-by: Ian Kent Signed-off-by: Linus Torvalds commit 4972c6ccf9a5f25bd0c877683cea5c1dc16669be Merge: 6667df916fcec 2b6b78e082894 Author: David S. Miller Date: Tue Sep 29 14:23:45 2020 -0700 Merge branch 'via-rhine-Resume-fix-and-other-maintenance-work' Kevin Brace says: ==================== via-rhine: Resume fix and other maintenance work I use via-rhine based Ethernet regularly, and the Ethernet dying after resume was really annoying me. I decided to take the matter into my own hands, and came up with a fix for the Ethernet disappearing after resume. I will also want to take over the code maintenance work for via-rhine. The patches apply to the latest code, but they should be backported to older kernels as well. ==================== Signed-off-by: David S. Miller commit 2b6b78e0828948fdc8374dc6fe6b2911252333c9 Author: Kevin Brace Date: Tue Sep 29 13:09:43 2020 -0700 via-rhine: New device driver maintainer Signed-off-by: Kevin Brace Signed-off-by: David S. Miller commit 9f5159e89d5d1535e3da0222805c355a86d3e2dc Author: Kevin Brace Date: Tue Sep 29 13:09:42 2020 -0700 via-rhine: Eliminate version information Signed-off-by: Kevin Brace Signed-off-by: David S. Miller commit aa15190cf2cf25ec7e6c6d7373ae3ca563d48601 Author: Kevin Brace Date: Tue Sep 29 13:09:41 2020 -0700 via-rhine: VTunknown1 device is really VT8251 South Bridge The VIA Technologies VT8251 South Bridge's integrated Rhine-II Ethernet MAC comes has a PCI revision value of 0x7c. This was verified on ASUS P5V800-VM mainboard. Signed-off-by: Kevin Brace Signed-off-by: David S. Miller commit d120c9a81e32c43cba8017dec873b6a414898716 Author: Kevin Brace Date: Tue Sep 29 13:09:40 2020 -0700 via-rhine: Fix for the hardware having a reset failure after resume In rhine_resume() and rhine_suspend(), the code calls netif_running() to see if the network interface is down or not. If it is down (i.e., netif_running() returning false), they will skip any housekeeping work within the function relating to the hardware. This becomes a problem when the hardware resumes from a standby since it is counting on rhine_resume() to map its MMIO and power up rest of the hardware. Not getting its MMIO remapped and rest of the hardware powered up lead to a soft reset failure and hardware disappearance. The solution is to map its MMIO and power up rest of the hardware inside rhine_open() before soft reset is to be performed. This solution was verified on ASUS P5V800-VM mainboard's integrated Rhine-II Ethernet MAC inside VIA Technologies VT8251 South Bridge. Signed-off-by: Kevin Brace Signed-off-by: David S. Miller commit 6667df916fceca7d585b34d8bb7a4aea2402f11f Author: Tony Nguyen Date: Tue Sep 29 14:06:18 2020 -0700 MAINTAINERS: Update MAINTAINERS for Intel ethernet drivers Add Jesse Brandeburg and myself; remove Jeff Kirsher. CC: Jeff Kirsher CC: Jesse Brandeburg Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller commit 548c7ba7dc9e9dacb43bd2af00b586da48015d04 Author: Dirk Gouders Date: Sun Sep 27 11:39:45 2020 +0200 drm/amd/display: remove duplicate call to rn_vbios_smu_get_smu_version() Commit 78fe9f63947a2b ("drm/amd/display: Remove DISPCLK Limit Floor for Certain SMU Versions") added a call to rn_vbios_smu_get_smu_version() to set clk_mgr->smu_ver. That field is initialized prior to the if-statement, already. Fixes: 78fe9f63947a2b (drm/amd/display: Remove DISPCLK Limit Floor for Certain SMU Versions) Signed-off-by: Dirk Gouders Cc: Alex Deucher Cc: Sung Lee Cc: Yongqiang Sun Cc: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 3c26d0314c10ceb77511e2cc81894001d488c1d0 Author: Alex Deucher Date: Mon Sep 28 14:16:25 2020 -0400 drm/amdgpu/swsmu/smu12: fix force clock handling for mclk The state array is in the reverse order compared to other asics (high to low rather than low to high). Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1313 Reviewed-by: Prike Liang Signed-off-by: Alex Deucher commit a39d0d7bdf8c21ac7645c02e9676b5cb2b804c31 Author: Jean Delvare Date: Mon Sep 28 11:10:37 2020 +0200 drm/amdgpu: restore proper ref count in amdgpu_display_crtc_set_config A recent attempt to fix a ref count leak in amdgpu_display_crtc_set_config() turned out to be doing too much and "fixed" an intended decrease as if it were a leak. Undo that part to restore the proper balance. This is the very nature of this function to increase or decrease the power reference count depending on the situation. Consequences of this bug is that the power reference would eventually get down to 0 while the display was still in use, resulting in that display switching off unexpectedly. Signed-off-by: Jean Delvare Fixes: e008fa6fb415 ("drm/amdgpu: fix ref count leak in amdgpu_display_crtc_set_config") Cc: stable@vger.kernel.org Cc: Navid Emamdoost Cc: Alex Deucher Signed-off-by: Alex Deucher commit c73d05eaba1c2d60558364f2d980090ebec6b082 Author: Alex Deucher Date: Tue Sep 22 11:34:16 2020 -0400 drm/amdgpu/display: fix CFLAGS setup for DCN30 Properly handle clang and older versions of gcc. Fixes: e77165bf7b02a3 ("drm/amd/display: Add DCN3 blocks to Makefile") Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 898c7302f4de1d91065e80fc46552b3ec70894ff Author: Flora Cui Date: Wed Sep 23 14:42:59 2020 +0800 drm/amd/display: fix return value check for hdcp_work max_caps might be 0, thus hdcp_work might be ZERO_SIZE_PTR Signed-off-by: Flora Cui Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 0c7014154d6397d6a35bf3759839207f1c702a42 Author: Jiansong Chen Date: Wed Sep 23 11:58:23 2020 +0800 drm/amdgpu: remove gpu_info fw support for sienna_cichlid etc. Remove gpu_info fw support for sienna_cichlid etc., since the information can be retrieved from discovery binary. Signed-off-by: Jiansong Chen Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 97cf32996c46d9935cc133d910a75fb687dd6144 Author: Sudheesh Mavila Date: Tue Sep 15 12:48:20 2020 +0530 drm/amd/pm: Removed fixed clock in auto mode DPM SMU10_UMD_PSTATE_PEAK_FCLK value should not be used to set the DPM. Suggested-by: Evan Quan Reviewed-by: Evan Quan Signed-off-by: Sudheesh Mavila Signed-off-by: Alex Deucher commit efe84d408bf41975db8506d3a1cc02e794e2309c Author: Uwe Kleine-König Date: Sat Sep 19 16:39:22 2020 +0200 scripts/dtc: only append to HOST_EXTRACFLAGS instead of overwriting When building with $ HOST_EXTRACFLAGS=-g make the expectation is that host tools are built with debug informations. This however doesn't happen if the Makefile assigns a new value to the HOST_EXTRACFLAGS instead of appending to it. So use += instead of := for the first assignment. Fixes: e3fd9b5384f3 ("scripts/dtc: consolidate include path options in Makefile") Signed-off-by: Uwe Kleine-König Signed-off-by: Rob Herring commit 64ff609b551914d8c2c51d828920f2ffc5237de7 Author: Rob Herring Date: Mon Sep 28 10:22:56 2020 -0500 dt-bindings: Fix 'reg' size issues in zynqmp examples The default sizes in examples for 'reg' are 1 cell each. Fix the incorrect sizes in zynqmp examples: Documentation/devicetree/bindings/dma/xilinx/xlnx,zynqmp-dpdma.example.dt.yaml: example-0: dma-controller@fd4c0000:reg:0: [0, 4249616384, 0, 4096] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.example.dt.yaml: example-0: display@fd4a0000:reg:0: [0, 4249485312, 0, 4096] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.example.dt.yaml: example-0: display@fd4a0000:reg:1: [0, 4249526272, 0, 4096] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.example.dt.yaml: example-0: display@fd4a0000:reg:2: [0, 4249530368, 0, 4096] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml Documentation/devicetree/bindings/display/xlnx/xlnx,zynqmp-dpsub.example.dt.yaml: example-0: display@fd4a0000:reg:3: [0, 4249534464, 0, 4096] is too long From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml Cc: Hyun Kwon Cc: Laurent Pinchart Cc: Vinod Koul Cc: dri-devel@lists.freedesktop.org Cc: dmaengine@vger.kernel.org Acked-by: Michal Simek Signed-off-by: Rob Herring commit 8ba00e2434e0e91a816ee77289957bbc2dc0f3d6 Merge: bbc4d71d63549 eaa0355c668d2 Author: David S. Miller Date: Tue Sep 29 13:24:17 2020 -0700 Merge branch 'More-incorrect-VCAP-offsets-for-mscc_ocelot-switch' Vladimir Oltean says: ==================== More incorrect VCAP offsets for mscc_ocelot switch This small series fixes some wrong tc-flower action fields in the Seville and Felix DSA drivers. ==================== Signed-off-by: David S. Miller commit eaa0355c668d2793e6ced32926fa22d518752845 Author: Vladimir Oltean Date: Tue Sep 29 14:20:25 2020 +0300 net: dsa: seville: fix VCAP IS2 action width Since the actions are packed together in the action RAM, an incorrect action width means that no action except the first one would behave correctly. The tc-flower offload has probably not been tested on this hardware since its introduction. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 460e985ea07ec23d46af257e84e57b5409576577 Author: Vladimir Oltean Date: Tue Sep 29 14:20:24 2020 +0300 net: dsa: felix: fix incorrect action offsets for VCAP IS2 The port mask width was larger than the actual number of ports, and therefore, all fields following this one were also shifted by the number of excess bits. But the driver doesn't use the REW_OP, SMAC_REPLACE_ENA or ACL_ID bits from the action vector, so the bug was inconsequential. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit bbc4d71d63549bcd003a430de18a72a742d8c91e Author: Willy Liu Date: Tue Sep 29 10:10:49 2020 +0800 net: phy: realtek: fix rtl8211e rx/tx delay config There are two chip pins named TXDLY and RXDLY which actually adds the 2ns delays to TXC and RXC for TXD/RXD latching. These two pins can config via 4.7k-ohm resistor to 3.3V hw setting, but also config via software setting (extension page 0xa4 register 0x1c bit13 12 and 11). The configuration register definitions from table 13 official PHY datasheet: PHYAD[2:0] = PHY Address AN[1:0] = Auto-Negotiation Mode = Interface Mode Select RX Delay = RX Delay TX Delay = TX Delay SELRGV = RGMII/GMII Selection This table describes how to config these hw pins via external pull-high or pull- low resistor. It is a misunderstanding that mapping it as register bits below: 8:6 = PHY Address 5:4 = Auto-Negotiation 3 = Interface Mode Select 2 = RX Delay 1 = TX Delay 0 = SELRGV So I removed these descriptions above and add related settings as below: 14 = reserved 13 = force Tx RX Delay controlled by bit12 bit11 12 = Tx Delay 11 = Rx Delay 10:0 = Test && debug settings reserved by realtek Test && debug settings are not recommend to modify by default. Fixes: f81dadbcf7fd ("net: phy: realtek: Add rtl8211e rx/tx delays config") Signed-off-by: Willy Liu Signed-off-by: David S. Miller commit 1a03b8a35a957f9f38ecb8a97443b7380bbf6a8b Author: Tonghao Zhang Date: Tue Sep 29 09:58:06 2020 +0800 virtio-net: don't disable guest csum when disable LRO Open vSwitch and Linux bridge will disable LRO of the interface when this interface added to them. Now when disable the LRO, the virtio-net csum is disable too. That drops the forwarding performance. Fixes: a02e8964eaf9 ("virtio-net: ethtool configurable LRO") Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Willem de Bruijn Signed-off-by: Tonghao Zhang Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit ccc1d052eff9f3cfe59d201263903fe1d46c79a5 Merge: 1ccfa66d94cf6 ce65d55f92a67 Author: Linus Torvalds Date: Tue Sep 29 10:35:42 2020 -0700 Merge tag 'dmaengine-fix-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fix from Vinod Koul: "Fix dmatest for misconfigured channel" * tag 'dmaengine-fix-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: dmatest: Prevent to run on misconfigured channel commit 1ccfa66d94cf65d3e89eeb95676a03e8f90edd99 Merge: fb0155a09b022 a127c5bbb6a8e Author: Linus Torvalds Date: Tue Sep 29 10:33:06 2020 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull 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-vdpa: fix backend feature ioctls vhost: Fix documentation commit b40341fad6cc2daa195f8090fd3348f18fff640a Author: Steven Rostedt (VMware) Date: Tue Sep 29 12:40:31 2020 -0400 ftrace: Move RCU is watching check after recursion check The first thing that the ftrace function callback helper functions should do is to check for recursion. Peter Zijlstra found that when "rcu_is_watching()" had its notrace removed, it caused perf function tracing to crash. This is because the call of rcu_is_watching() is tested before function recursion is checked and and if it is traced, it will cause an infinite recursion loop. rcu_is_watching() should still stay notrace, but to prevent this should never had crashed in the first place. The recursion prevention must be the first thing done in callback functions. Link: https://lore.kernel.org/r/20200929112541.GM2628@hirez.programming.kicks-ass.net Cc: stable@vger.kernel.org Cc: Paul McKenney Fixes: c68c0fa293417 ("ftrace: Have ftrace_ops_get_func() handle RCU and PER_CPU flags too") Acked-by: Peter Zijlstra (Intel) Reported-by: Peter Zijlstra (Intel) Signed-off-by: Steven Rostedt (VMware) commit 851e6f61cd076954f9d521e0d79b173ad3a2453b Author: Steven Rostedt (VMware) Date: Tue Sep 29 12:27:23 2020 -0400 tracing: Fix trace_find_next_entry() accounting of temp buffer size The temp buffer size variable for trace_find_next_entry() was incorrectly being updated when the size did not change. The temp buffer size should only be updated when it is reallocated. This is mostly an issue when used with ftrace_dump(). That's because ftrace_dump() can not allocate a new buffer, and instead uses a temporary buffer with a fix size. But the variable that keeps track of that size is incorrectly updated with each call, and it could fall into the path that would try to reallocate the buffer and produce a warning. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 1601 at kernel/trace/trace.c:3548 trace_find_next_entry+0xd0/0xe0 Modules linked in [..] CPU: 1 PID: 1601 Comm: bash Not tainted 5.9.0-rc5-test+ #521 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v03.03 07/14/2016 RIP: 0010:trace_find_next_entry+0xd0/0xe0 Code: 40 21 00 00 4c 89 e1 31 d2 4c 89 ee 48 89 df e8 c6 9e ff ff 89 ab 54 21 00 00 5b 5d 41 5c 41 5d c3 48 63 d5 eb bf 31 c0 eb f0 <0f> 0b 48 63 d5 eb b4 66 0f 1f 84 00 00 00 00 00 53 48 8d 8f 60 21 RSP: 0018:ffff95a4f2e8bd70 EFLAGS: 00010046 RAX: ffffffff96679fc0 RBX: ffffffff97910de0 RCX: ffffffff96679fc0 RDX: ffff95a4f2e8bd98 RSI: ffff95a4ee321098 RDI: ffffffff97913000 RBP: 0000000000000018 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000046 R12: ffff95a4f2e8bd98 R13: 0000000000000000 R14: ffff95a4ee321098 R15: 00000000009aa301 FS: 00007f8565484740(0000) GS:ffff95a55aa40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055876bd43d90 CR3: 00000000b76e6003 CR4: 00000000001706e0 Call Trace: trace_print_lat_context+0x58/0x2d0 ? cpumask_next+0x16/0x20 print_trace_line+0x1a4/0x4f0 ftrace_dump.cold+0xad/0x12c __handle_sysrq.cold+0x51/0x126 write_sysrq_trigger+0x3f/0x4a proc_reg_write+0x53/0x80 vfs_write+0xca/0x210 ksys_write+0x70/0xf0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f8565579487 Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24 RSP: 002b:00007ffd40707948 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f8565579487 RDX: 0000000000000002 RSI: 000055876bd74de0 RDI: 0000000000000001 RBP: 000055876bd74de0 R08: 000000000000000a R09: 0000000000000001 R10: 000055876bdec280 R11: 0000000000000246 R12: 0000000000000002 R13: 00007f856564a500 R14: 0000000000000002 R15: 00007f856564a700 irq event stamp: 109958 ---[ end trace 7aab5b7e51484b00 ]--- Not only fix the updating of the temp buffer, but also do not free the temp buffer before a new buffer is allocated (there's no reason to not continue to use the current temp buffer if an allocation fails). Cc: stable@vger.kernel.org Fixes: 8e99cf91b99bb ("tracing: Do not allocate buffer in trace_find_next_entry() in atomic") Reported-by: Anna-Maria Behnsen Signed-off-by: Steven Rostedt (VMware) commit 25b9e4b31ed5724b1f37a8a46fd50c6bafa6745c Merge: 3fce39601a1a3 850280156f642 Author: Greg Kroah-Hartman Date: Tue Sep 29 17:21:54 2020 +0200 Merge tag 'phy-fixes-2-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into usb-linus Vinod writes: phy: Second round of fixes for 5.9 *) Fix of leak in TI phy driver * tag 'phy-fixes-2-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: ti: am654: Fix a leak in serdes_am654_probe() commit 9cf51446e68607136e42a4e531a30c888c472463 Author: He Zhe Date: Mon Sep 28 17:00:23 2020 +0800 bpf, powerpc: Fix misuse of fallthrough in bpf_jit_comp() The user defined label following "fallthrough" is not considered by GCC and causes build failure. kernel-source/include/linux/compiler_attributes.h:208:41: error: attribute 'fallthrough' not preceding a case label or default label [-Werror] 208 define fallthrough _attribute((fallthrough_)) ^~~~~~~~~~~~~ Fixes: df561f6688fe ("treewide: Use fallthrough pseudo-keyword") Signed-off-by: He Zhe Signed-off-by: Daniel Borkmann Cc: Gustavo A. R. Silva Link: https://lore.kernel.org/bpf/20200928090023.38117-1-zhe.he@windriver.com commit 632bfb6323799c087fcb4108dfe59518609667a7 Author: yangerkun Date: Sat Sep 5 19:25:56 2020 +0800 blk-mq: call commit_rqs while list empty but error happen Blk-mq should call commit_rqs once 'bd.last != true' and no more request will come(so virtscsi can kick the virtqueue, e.g.). We already do that in 'blk_mq_dispatch_rq_list/blk_mq_try_issue_list_directly' while list not empty and 'queued > 0'. However, we can seen the same scene once the last request in list call queue_rq and return error like BLK_STS_IOERR which will not requeue the request, and lead that list empty but need call commit_rqs too(Or the request for virtscsi will stay timeout until other request kick virtqueue). We found this problem by do fsstress test with offline/online virtscsi device repeat quickly. Fixes: d666ba98f849 ("blk-mq: add mq_ops->commit_rqs()") Reported-by: zhangyi (F) Signed-off-by: yangerkun Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit c8d317aa1887b40b188ec3aaa6e9e524333caed1 Author: Hao Xu Date: Tue Sep 29 20:00:45 2020 +0800 io_uring: fix async buffered reads when readahead is disabled The async buffered reads feature is not working when readahead is turned off. There are two things to concern: - when doing retry in io_read, not only the IOCB_WAITQ flag but also the IOCB_NOWAIT flag is still set, which makes it goes to would_block phase in generic_file_buffered_read() and then return -EAGAIN. After that, the io-wq thread work is queued, and later doing the async reads in the old way. - even if we remove IOCB_NOWAIT when doing retry, the feature is still not running properly, since in generic_file_buffered_read() it goes to lock_page_killable() after calling mapping->a_ops->readpage() to do IO, and thus causing process to sleep. Fixes: 1a0a7853b901 ("mm: support async buffered reads in generic_file_buffered_read()") Fixes: 3b2a4439e0ae ("io_uring: get rid of kiocb_wait_page_queue_init()") Signed-off-by: Hao Xu Signed-off-by: Jens Axboe commit 2e969d8a7f9903e8d015885bdfd031a6809a4d02 Merge: 53c14e237b012 3e640b1eec38e Author: Linus Walleij Date: Tue Sep 29 13:40:37 2020 +0200 Merge tag 'gpio-fixes-for-v5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio: fixes for v5.9-rc7 - fix uninitialized variable in gpio-pca953x - enable all 160 lines and fix interrupt configuration in gpio-aspeed-gpio - fix ast2600 bank properties in gpio-aspeed commit 78b70155dc73280be2c7084a3be591161cdc6d0c Author: Jakub Kicinski Date: Mon Sep 28 17:58:41 2020 -0700 ethtool: mark netlink family as __ro_after_init Like all genl families ethtool_genl_family needs to not be a straight up constant, because it's modified/initialized by genl_register_family(). After init, however, it's only passed to genlmsg_put() & co. therefore we can mark it as __ro_after_init. Since genl_family structure contains function pointers mark this as a fix. Fixes: 2b4a8990b7df ("ethtool: introduce ethtool netlink interface") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3ddf9b431b931544dc2f94e8f6a055ff501436fa Author: Jakub Kicinski Date: Mon Sep 28 17:53:29 2020 -0700 genetlink: add missing kdoc for validation flags Validation flags are missing kdoc, add it. Fixes: ef6243acb478 ("genetlink: optionally validate strictly/dumps") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit c92a79829c7c169139874aa1d4bf6da32d10c38a Author: Wilken Gottwalt Date: Mon Sep 28 11:17:40 2020 +0200 net: usb: ax88179_178a: add MCT usb 3.0 adapter Adds the driver_info and usb ids of the AX88179 based MCT U3-A9003 USB 3.0 ethernet adapter. Signed-off-by: Wilken Gottwalt Signed-off-by: David S. Miller commit 9666ea66a74adfe295cb3a8760c76e1ef70f9caf Author: Wilken Gottwalt Date: Mon Sep 28 11:01:04 2020 +0200 net: usb: ax88179_178a: fix missing stop entry in driver_info Adds the missing .stop entry in the Belkin driver_info structure. Fixes: e20bd60bf62a ("net: usb: asix88179_178a: Add support for the Belkin B2B128") Signed-off-by: Wilken Gottwalt Signed-off-by: David S. Miller commit 5fc27b098dafb8e30794a9db0705074c7d766179 Author: Jiri Kosina Date: Mon Sep 28 16:21:17 2020 -0700 Input: i8042 - add nopnp quirk for Acer Aspire 5 A515 Touchpad on this laptop is not detected properly during boot, as PNP enumerates (wrongly) AUX port as disabled on this machine. Fix that by adding this board (with admittedly quite funny DMI identifiers) to nopnp quirk list. Reported-by: Andrés Barrantes Silman Signed-off-by: Jiri Kosina Link: https://lore.kernel.org/r/nycvar.YFH.7.76.2009252337340.3336@cbobk.fhfr.pm Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 996d585b079ad494a30cac10e08585bcd5345125 Author: Vincent Huang Date: Mon Sep 28 16:19:05 2020 -0700 Input: trackpoint - enable Synaptics trackpoints Add Synaptics IDs in trackpoint_start_protocol() to mark them as valid. Signed-off-by: Vincent Huang Fixes: 6c77545af100 ("Input: trackpoint - add new trackpoint variant IDs") Reviewed-by: Harry Cutts Tested-by: Harry Cutts Link: https://lore.kernel.org/r/20200924053013.1056953-1-vincent.huang@tw.synaptics.com Signed-off-by: Dmitry Torokhov commit a7809ff90ce6c48598d3c4ab54eb599bec1e9c42 Author: Manivannan Sadhasivam Date: Sat Sep 26 22:26:25 2020 +0530 net: qrtr: ns: Protect radix_tree_deref_slot() using rcu read locks The rcu read locks are needed to avoid potential race condition while dereferencing radix tree from multiple threads. The issue was identified by syzbot. Below is the crash report: ============================= WARNING: suspicious RCU usage 5.7.0-syzkaller #0 Not tainted ----------------------------- include/linux/radix-tree.h:176 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 2 locks held by kworker/u4:1/21: #0: ffff88821b097938 ((wq_completion)qrtr_ns_handler){+.+.}-{0:0}, at: spin_unlock_irq include/linux/spinlock.h:403 [inline] #0: ffff88821b097938 ((wq_completion)qrtr_ns_handler){+.+.}-{0:0}, at: process_one_work+0x6df/0xfd0 kernel/workqueue.c:2241 #1: ffffc90000dd7d80 ((work_completion)(&qrtr_ns.work)){+.+.}-{0:0}, at: process_one_work+0x71e/0xfd0 kernel/workqueue.c:2243 stack backtrace: CPU: 0 PID: 21 Comm: kworker/u4:1 Not tainted 5.7.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: qrtr_ns_handler qrtr_ns_worker Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1e9/0x30e lib/dump_stack.c:118 radix_tree_deref_slot include/linux/radix-tree.h:176 [inline] ctrl_cmd_new_lookup net/qrtr/ns.c:558 [inline] qrtr_ns_worker+0x2aff/0x4500 net/qrtr/ns.c:674 process_one_work+0x76e/0xfd0 kernel/workqueue.c:2268 worker_thread+0xa7f/0x1450 kernel/workqueue.c:2414 kthread+0x353/0x380 kernel/kthread.c:268 Fixes: 0c2204a4ad71 ("net: qrtr: Migrate nameservice to kernel from userspace") Reported-and-tested-by: syzbot+0f84f6eed90503da72fc@syzkaller.appspotmail.com Signed-off-by: Manivannan Sadhasivam Signed-off-by: David S. Miller commit 0ba56b89fabc139849cf27e475287b0361f550d3 Merge: 1aad8049909a6 1fc70edb7d7b5 Author: David S. Miller Date: Mon Sep 28 15:00:15 2020 -0700 Merge branch 'net-core-fix-a-lockdep-splat-in-the-dev_addr_list' Taehee Yoo says: ==================== net: core: fix a lockdep splat in the dev_addr_list. This patchset is to avoid lockdep splat. When a stacked interface graph is changed, netif_addr_lock() is called recursively and it internally calls spin_lock_nested(). The parameter of spin_lock_nested() is 'dev->lower_level', this is called subclass. The problem of 'dev->lower_level' is that while 'dev->lower_level' is being used as a subclass of spin_lock_nested(), its value can be changed. So, spin_lock_nested() would be called recursively with the same subclass value, the lockdep understands a deadlock. In order to avoid this, a new variable is needed and it is going to be used as a parameter of spin_lock_nested(). The first and second patch is a preparation patch for the third patch. In the third patch, the problem will be fixed. The first patch is to add __netdev_upper_dev_unlink(). An existed netdev_upper_dev_unlink() is renamed to __netdev_upper_dev_unlink(). and netdev_upper_dev_unlink() is added as an wrapper of this function. The second patch is to add the netdev_nested_priv structure. netdev_walk_all_{ upper | lower }_dev() pass both private functions and "data" pointer to handle their own things. At this point, the data pointer type is void *. In order to make it easier to expand common variables and functions, this new netdev_nested_priv structure is added. The third patch is to add a new variable 'nested_level' into the net_device structure. This variable will be used as a parameter of spin_lock_nested() of dev->addr_list_lock. Due to this variable, it can avoid lockdep splat. ==================== Signed-off-by: David S. Miller commit 1fc70edb7d7b5ce1ae32b0cf90183f4879ad421a Author: Taehee Yoo Date: Fri Sep 25 18:13:29 2020 +0000 net: core: add nested_level variable in net_device This patch is to add a new variable 'nested_level' into the net_device structure. This variable will be used as a parameter of spin_lock_nested() of dev->addr_list_lock. netif_addr_lock() can be called recursively so spin_lock_nested() is used instead of spin_lock() and dev->lower_level is used as a parameter of spin_lock_nested(). But, dev->lower_level value can be updated while it is being used. So, lockdep would warn a possible deadlock scenario. When a stacked interface is deleted, netif_{uc | mc}_sync() is called recursively. So, spin_lock_nested() is called recursively too. At this moment, the dev->lower_level variable is used as a parameter of it. dev->lower_level value is updated when interfaces are being unlinked/linked immediately. Thus, After unlinking, dev->lower_level shouldn't be a parameter of spin_lock_nested(). A (macvlan) | B (vlan) | C (bridge) | D (macvlan) | E (vlan) | F (bridge) A->lower_level : 6 B->lower_level : 5 C->lower_level : 4 D->lower_level : 3 E->lower_level : 2 F->lower_level : 1 When an interface 'A' is removed, it releases resources. At this moment, netif_addr_lock() would be called. Then, netdev_upper_dev_unlink() is called recursively. Then dev->lower_level is updated. There is no problem. But, when the bridge module is removed, 'C' and 'F' interfaces are removed at once. If 'F' is removed first, a lower_level value is like below. A->lower_level : 5 B->lower_level : 4 C->lower_level : 3 D->lower_level : 2 E->lower_level : 1 F->lower_level : 1 Then, 'C' is removed. at this moment, netif_addr_lock() is called recursively. The ordering is like this. C(3)->D(2)->E(1)->F(1) At this moment, the lower_level value of 'E' and 'F' are the same. So, lockdep warns a possible deadlock scenario. In order to avoid this problem, a new variable 'nested_level' is added. This value is the same as dev->lower_level - 1. But this value is updated in rtnl_unlock(). So, this variable can be used as a parameter of spin_lock_nested() safely in the rtnl context. Test commands: ip link add br0 type bridge vlan_filtering 1 ip link add vlan1 link br0 type vlan id 10 ip link add macvlan2 link vlan1 type macvlan ip link add br3 type bridge vlan_filtering 1 ip link set macvlan2 master br3 ip link add vlan4 link br3 type vlan id 10 ip link add macvlan5 link vlan4 type macvlan ip link add br6 type bridge vlan_filtering 1 ip link set macvlan5 master br6 ip link add vlan7 link br6 type vlan id 10 ip link add macvlan8 link vlan7 type macvlan ip link set br0 up ip link set vlan1 up ip link set macvlan2 up ip link set br3 up ip link set vlan4 up ip link set macvlan5 up ip link set br6 up ip link set vlan7 up ip link set macvlan8 up modprobe -rv bridge Splat looks like: [ 36.057436][ T744] WARNING: possible recursive locking detected [ 36.058848][ T744] 5.9.0-rc6+ #728 Not tainted [ 36.059959][ T744] -------------------------------------------- [ 36.061391][ T744] ip/744 is trying to acquire lock: [ 36.062590][ T744] ffff8c4767509280 (&vlan_netdev_addr_lock_key){+...}-{2:2}, at: dev_set_rx_mode+0x19/0x30 [ 36.064922][ T744] [ 36.064922][ T744] but task is already holding lock: [ 36.066626][ T744] ffff8c4767769280 (&vlan_netdev_addr_lock_key){+...}-{2:2}, at: dev_uc_add+0x1e/0x60 [ 36.068851][ T744] [ 36.068851][ T744] other info that might help us debug this: [ 36.070731][ T744] Possible unsafe locking scenario: [ 36.070731][ T744] [ 36.072497][ T744] CPU0 [ 36.073238][ T744] ---- [ 36.074007][ T744] lock(&vlan_netdev_addr_lock_key); [ 36.075290][ T744] lock(&vlan_netdev_addr_lock_key); [ 36.076590][ T744] [ 36.076590][ T744] *** DEADLOCK *** [ 36.076590][ T744] [ 36.078515][ T744] May be due to missing lock nesting notation [ 36.078515][ T744] [ 36.080491][ T744] 3 locks held by ip/744: [ 36.081471][ T744] #0: ffffffff98571df0 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x236/0x490 [ 36.083614][ T744] #1: ffff8c4767769280 (&vlan_netdev_addr_lock_key){+...}-{2:2}, at: dev_uc_add+0x1e/0x60 [ 36.085942][ T744] #2: ffff8c476c8da280 (&bridge_netdev_addr_lock_key/4){+...}-{2:2}, at: dev_uc_sync+0x39/0x80 [ 36.088400][ T744] [ 36.088400][ T744] stack backtrace: [ 36.089772][ T744] CPU: 6 PID: 744 Comm: ip Not tainted 5.9.0-rc6+ #728 [ 36.091364][ T744] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 36.093630][ T744] Call Trace: [ 36.094416][ T744] dump_stack+0x77/0x9b [ 36.095385][ T744] __lock_acquire+0xbc3/0x1f40 [ 36.096522][ T744] lock_acquire+0xb4/0x3b0 [ 36.097540][ T744] ? dev_set_rx_mode+0x19/0x30 [ 36.098657][ T744] ? rtmsg_ifinfo+0x1f/0x30 [ 36.099711][ T744] ? __dev_notify_flags+0xa5/0xf0 [ 36.100874][ T744] ? rtnl_is_locked+0x11/0x20 [ 36.101967][ T744] ? __dev_set_promiscuity+0x7b/0x1a0 [ 36.103230][ T744] _raw_spin_lock_bh+0x38/0x70 [ 36.104348][ T744] ? dev_set_rx_mode+0x19/0x30 [ 36.105461][ T744] dev_set_rx_mode+0x19/0x30 [ 36.106532][ T744] dev_set_promiscuity+0x36/0x50 [ 36.107692][ T744] __dev_set_promiscuity+0x123/0x1a0 [ 36.108929][ T744] dev_set_promiscuity+0x1e/0x50 [ 36.110093][ T744] br_port_set_promisc+0x1f/0x40 [bridge] [ 36.111415][ T744] br_manage_promisc+0x8b/0xe0 [bridge] [ 36.112728][ T744] __dev_set_promiscuity+0x123/0x1a0 [ 36.113967][ T744] ? __hw_addr_sync_one+0x23/0x50 [ 36.115135][ T744] __dev_set_rx_mode+0x68/0x90 [ 36.116249][ T744] dev_uc_sync+0x70/0x80 [ 36.117244][ T744] dev_uc_add+0x50/0x60 [ 36.118223][ T744] macvlan_open+0x18e/0x1f0 [macvlan] [ 36.119470][ T744] __dev_open+0xd6/0x170 [ 36.120470][ T744] __dev_change_flags+0x181/0x1d0 [ 36.121644][ T744] dev_change_flags+0x23/0x60 [ 36.122741][ T744] do_setlink+0x30a/0x11e0 [ 36.123778][ T744] ? __lock_acquire+0x92c/0x1f40 [ 36.124929][ T744] ? __nla_validate_parse.part.6+0x45/0x8e0 [ 36.126309][ T744] ? __lock_acquire+0x92c/0x1f40 [ 36.127457][ T744] __rtnl_newlink+0x546/0x8e0 [ 36.128560][ T744] ? lock_acquire+0xb4/0x3b0 [ 36.129623][ T744] ? deactivate_slab.isra.85+0x6a1/0x850 [ 36.130946][ T744] ? __lock_acquire+0x92c/0x1f40 [ 36.132102][ T744] ? lock_acquire+0xb4/0x3b0 [ 36.133176][ T744] ? is_bpf_text_address+0x5/0xe0 [ 36.134364][ T744] ? rtnl_newlink+0x2e/0x70 [ 36.135445][ T744] ? rcu_read_lock_sched_held+0x32/0x60 [ 36.136771][ T744] ? kmem_cache_alloc_trace+0x2d8/0x380 [ 36.138070][ T744] ? rtnl_newlink+0x2e/0x70 [ 36.139164][ T744] rtnl_newlink+0x47/0x70 [ ... ] Fixes: 845e0ebb4408 ("net: change addr_list_lock back to static key") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit eff7423365a6938d2d34dbce989febed2ae1f957 Author: Taehee Yoo Date: Fri Sep 25 18:13:12 2020 +0000 net: core: introduce struct netdev_nested_priv for nested interface infrastructure Functions related to nested interface infrastructure such as netdev_walk_all_{ upper | lower }_dev() pass both private functions and "data" pointer to handle their own things. At this point, the data pointer type is void *. In order to make it easier to expand common variables and functions, this new netdev_nested_priv structure is added. In the following patch, a new member variable will be added into this struct to fix the lockdep issue. Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit fe8300fd8d655ebc6b6297565665959d6d7bbe02 Author: Taehee Yoo Date: Fri Sep 25 18:13:02 2020 +0000 net: core: add __netdev_upper_dev_unlink() The netdev_upper_dev_unlink() has to work differently according to flags. This idea is the same with __netdev_upper_dev_link(). In the following patches, new flags will be added. Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 1aad8049909a6d3379175ef2824a68ac35c0b564 Author: Cong Wang Date: Mon Sep 28 11:31:03 2020 -0700 net_sched: remove a redundant goto chain check All TC actions call tcf_action_check_ctrlact() to validate goto chain, so this check in tcf_action_init_1() is actually redundant. Remove it to save troubles of leaking memory. Fixes: e49d8c22f126 ("net_sched: defer tcf_idr_insert() in tcf_action_init_1()") Reported-by: Vlad Buslov Suggested-by: Davide Caratti Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Reviewed-by: Davide Caratti Signed-off-by: David S. Miller commit f2f3729fb65c5c2e6db234e6316b71a7bdc4b30b Author: Nikolay Aleksandrov Date: Mon Sep 28 18:30:02 2020 +0300 net: bridge: fdb: don't flush ext_learn entries When a user-space software manages fdb entries externally it should set the ext_learn flag which marks the fdb entry as externally managed and avoids expiring it (they're treated as static fdbs). Unfortunately on events where fdb entries are flushed (STP down, netlink fdb flush etc) these fdbs are also deleted automatically by the bridge. That in turn causes trouble for the managing user-space software (e.g. in MLAG setups we lose remote fdb entries on port flaps). These entries are completely externally managed so we should avoid automatically deleting them, the only exception are offloaded entries (i.e. BR_FDB_ADDED_BY_EXT_LEARN + BR_FDB_OFFLOADED). They are flushed as before. Fixes: eb100e0e24a2 ("net: bridge: allow to add externally learned entries from user-space") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit a4be47afb02a22689800609247ed9e489de63e13 Merge: 709a16be0593c e94ee171349db Author: David S. Miller Date: Mon Sep 28 12:25:42 2020 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec Steffen Klassert says: ==================== pull request (net): ipsec 2020-09-28 1) Fix a build warning in ip_vti if CONFIG_IPV6 is not set. From YueHaibing. 2) Restore IPCB on espintcp before handing the packet to xfrm as the information there is still needed. From Sabrina Dubroca. 3) Fix pmtu updating for xfrm interfaces. From Sabrina Dubroca. 4) Some xfrm state information was not cloned with xfrm_do_migrate. Fixes to clone the full xfrm state, from Antony Antony. 5) Use the correct address family in xfrm_state_find. The struct flowi must always be interpreted along with the original address family. This got lost over the years. Fix from Herbert Xu. ==================== Signed-off-by: David S. Miller commit 6e3837668e00fb914ac2b43158ef51b027ec385c Author: Michael Walle Date: Mon Sep 28 10:55:00 2020 +0200 spi: fsl-dspi: fix NULL pointer dereference Since commit 530b5affc675 ("spi: fsl-dspi: fix use-after-free in remove path") this driver causes a kernel oops: [ 1.891065] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000080 [..] [ 2.056973] Call trace: [ 2.059425] dspi_setup+0xc8/0x2e0 [ 2.062837] spi_setup+0xcc/0x248 [ 2.066160] spi_add_device+0xb4/0x198 [ 2.069918] of_register_spi_device+0x250/0x370 [ 2.074462] spi_register_controller+0x4f4/0x770 [ 2.079094] dspi_probe+0x5bc/0x7b0 [ 2.082594] platform_drv_probe+0x5c/0xb0 [ 2.086615] really_probe+0xec/0x3c0 [ 2.090200] driver_probe_device+0x60/0xc0 [ 2.094308] device_driver_attach+0x7c/0x88 [ 2.098503] __driver_attach+0x60/0xe8 [ 2.102263] bus_for_each_dev+0x7c/0xd0 [ 2.106109] driver_attach+0x2c/0x38 [ 2.109692] bus_add_driver+0x194/0x1f8 [ 2.113538] driver_register+0x6c/0x128 [ 2.117385] __platform_driver_register+0x50/0x60 [ 2.122105] fsl_dspi_driver_init+0x24/0x30 [ 2.126302] do_one_initcall+0x54/0x2d0 [ 2.130149] kernel_init_freeable+0x1ec/0x258 [ 2.134520] kernel_init+0x1c/0x120 [ 2.138018] ret_from_fork+0x10/0x34 [ 2.141606] Code: 97e0b11d aa0003f3 b4000680 f94006e0 (f9404000) [ 2.147723] ---[ end trace 26cf63e6cbba33a8 ]--- This is because since this commit, the allocation of the drivers private data is done explicitly and in this case spi_alloc_master() won't set the correct pointer. Also move the platform_set_drvdata() to have both next to each other. Fixes: 530b5affc675 ("spi: fsl-dspi: fix use-after-free in remove path") Signed-off-by: Michael Walle Tested-by: Sascha Hauer Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200928085500.28254-1-michael@walle.cc Signed-off-by: Mark Brown commit fb0155a09b0224a7147cb07a4ce6034c8d29667f Merge: a4d63c3732f1a b9df46d08a8d0 Author: Linus Torvalds Date: Mon Sep 28 11:05:56 2020 -0700 Merge tag 'nfs-for-5.9-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "Highlights include: - NFSv4.2: copy_file_range needs to invalidate caches on success - NFSv4.2: Fix security label length not being reset - pNFS/flexfiles: Ensure we initialise the mirror bsizes correctly on read - pNFS/flexfiles: Fix signed/unsigned type issues with mirror indices" * tag 'nfs-for-5.9-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: pNFS/flexfiles: Be consistent about mirror index types pNFS/flexfiles: Ensure we initialise the mirror bsizes correctly on read NFSv4.2: fix client's attribute cache management for copy_file_range nfs: Fix security label length not being reset commit a4d63c3732f1a0c91abcf5b7f32b4ef7dcd82025 Author: Jason A. Donenfeld Date: Mon Sep 28 12:35:07 2020 +0200 mm: do not rely on mm == current->mm in __get_user_pages_locked It seems likely this block was pasted from internal_get_user_pages_fast, which is not passed an mm struct and therefore uses current's. But __get_user_pages_locked is passed an explicit mm, and current->mm is not always valid. This was hit when being called from i915, which uses: pin_user_pages_remote-> __get_user_pages_remote-> __gup_longterm_locked-> __get_user_pages_locked Before, this would lead to an OOPS: BUG: kernel NULL pointer dereference, address: 0000000000000064 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page CPU: 10 PID: 1431 Comm: kworker/u33:1 Tainted: P S U O 5.9.0-rc7+ #140 Hardware name: LENOVO 20QTCTO1WW/20QTCTO1WW, BIOS N2OET47W (1.34 ) 08/06/2020 Workqueue: i915-userptr-acquire __i915_gem_userptr_get_pages_worker [i915] RIP: 0010:__get_user_pages_remote+0xd7/0x310 Call Trace: __i915_gem_userptr_get_pages_worker+0xc8/0x260 [i915] process_one_work+0x1ca/0x390 worker_thread+0x48/0x3c0 kthread+0x114/0x130 ret_from_fork+0x1f/0x30 CR2: 0000000000000064 This commit fixes the problem by using the mm pointer passed to the function rather than the bogus one in current. Fixes: 008cfe4418b3 ("mm: Introduce mm_struct.has_pinned") Tested-by: Chris Wilson Reported-by: Harald Arnesen Reviewed-by: Jason Gunthorpe Reviewed-by: Peter Xu Signed-off-by: Jason A. Donenfeld Signed-off-by: Linus Torvalds commit fad8e0de4426a776c9bcb060555e7c09e2d08db6 Author: Jens Axboe Date: Mon Sep 28 08:57:48 2020 -0600 io_uring: fix potential ABBA deadlock in ->show_fdinfo() syzbot reports a potential lock deadlock between the normal IO path and ->show_fdinfo(): ====================================================== WARNING: possible circular locking dependency detected 5.9.0-rc6-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.2/19710 is trying to acquire lock: ffff888098ddc450 (sb_writers#4){.+.+}-{0:0}, at: io_write+0x6b5/0xb30 fs/io_uring.c:3296 but task is already holding lock: ffff8880a11b8428 (&ctx->uring_lock){+.+.}-{3:3}, at: __do_sys_io_uring_enter+0xe9a/0x1bd0 fs/io_uring.c:8348 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&ctx->uring_lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x134/0x10e0 kernel/locking/mutex.c:1103 __io_uring_show_fdinfo fs/io_uring.c:8417 [inline] io_uring_show_fdinfo+0x194/0xc70 fs/io_uring.c:8460 seq_show+0x4a8/0x700 fs/proc/fd.c:65 seq_read+0x432/0x1070 fs/seq_file.c:208 do_loop_readv_writev fs/read_write.c:734 [inline] do_loop_readv_writev fs/read_write.c:721 [inline] do_iter_read+0x48e/0x6e0 fs/read_write.c:955 vfs_readv+0xe5/0x150 fs/read_write.c:1073 kernel_readv fs/splice.c:355 [inline] default_file_splice_read.constprop.0+0x4e6/0x9e0 fs/splice.c:412 do_splice_to+0x137/0x170 fs/splice.c:871 splice_direct_to_actor+0x307/0x980 fs/splice.c:950 do_splice_direct+0x1b3/0x280 fs/splice.c:1059 do_sendfile+0x55f/0xd40 fs/read_write.c:1540 __do_sys_sendfile64 fs/read_write.c:1601 [inline] __se_sys_sendfile64 fs/read_write.c:1587 [inline] __x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1587 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&p->lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:956 [inline] __mutex_lock+0x134/0x10e0 kernel/locking/mutex.c:1103 seq_read+0x61/0x1070 fs/seq_file.c:155 pde_read fs/proc/inode.c:306 [inline] proc_reg_read+0x221/0x300 fs/proc/inode.c:318 do_loop_readv_writev fs/read_write.c:734 [inline] do_loop_readv_writev fs/read_write.c:721 [inline] do_iter_read+0x48e/0x6e0 fs/read_write.c:955 vfs_readv+0xe5/0x150 fs/read_write.c:1073 kernel_readv fs/splice.c:355 [inline] default_file_splice_read.constprop.0+0x4e6/0x9e0 fs/splice.c:412 do_splice_to+0x137/0x170 fs/splice.c:871 splice_direct_to_actor+0x307/0x980 fs/splice.c:950 do_splice_direct+0x1b3/0x280 fs/splice.c:1059 do_sendfile+0x55f/0xd40 fs/read_write.c:1540 __do_sys_sendfile64 fs/read_write.c:1601 [inline] __se_sys_sendfile64 fs/read_write.c:1587 [inline] __x64_sys_sendfile64+0x1cc/0x210 fs/read_write.c:1587 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (sb_writers#4){.+.+}-{0:0}: check_prev_add kernel/locking/lockdep.c:2496 [inline] check_prevs_add kernel/locking/lockdep.c:2601 [inline] validate_chain kernel/locking/lockdep.c:3218 [inline] __lock_acquire+0x2a96/0x5780 kernel/locking/lockdep.c:4441 lock_acquire+0x1f3/0xaf0 kernel/locking/lockdep.c:5029 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write+0x228/0x450 fs/super.c:1672 io_write+0x6b5/0xb30 fs/io_uring.c:3296 io_issue_sqe+0x18f/0x5c50 fs/io_uring.c:5719 __io_queue_sqe+0x280/0x1160 fs/io_uring.c:6175 io_queue_sqe+0x692/0xfa0 fs/io_uring.c:6254 io_submit_sqe fs/io_uring.c:6324 [inline] io_submit_sqes+0x1761/0x2400 fs/io_uring.c:6521 __do_sys_io_uring_enter+0xeac/0x1bd0 fs/io_uring.c:8349 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Chain exists of: sb_writers#4 --> &p->lock --> &ctx->uring_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&ctx->uring_lock); lock(&p->lock); lock(&ctx->uring_lock); lock(sb_writers#4); *** DEADLOCK *** 1 lock held by syz-executor.2/19710: #0: ffff8880a11b8428 (&ctx->uring_lock){+.+.}-{3:3}, at: __do_sys_io_uring_enter+0xe9a/0x1bd0 fs/io_uring.c:8348 stack backtrace: CPU: 0 PID: 19710 Comm: syz-executor.2 Not tainted 5.9.0-rc6-syzkaller #0 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+0x198/0x1fd lib/dump_stack.c:118 check_noncircular+0x324/0x3e0 kernel/locking/lockdep.c:1827 check_prev_add kernel/locking/lockdep.c:2496 [inline] check_prevs_add kernel/locking/lockdep.c:2601 [inline] validate_chain kernel/locking/lockdep.c:3218 [inline] __lock_acquire+0x2a96/0x5780 kernel/locking/lockdep.c:4441 lock_acquire+0x1f3/0xaf0 kernel/locking/lockdep.c:5029 percpu_down_read include/linux/percpu-rwsem.h:51 [inline] __sb_start_write+0x228/0x450 fs/super.c:1672 io_write+0x6b5/0xb30 fs/io_uring.c:3296 io_issue_sqe+0x18f/0x5c50 fs/io_uring.c:5719 __io_queue_sqe+0x280/0x1160 fs/io_uring.c:6175 io_queue_sqe+0x692/0xfa0 fs/io_uring.c:6254 io_submit_sqe fs/io_uring.c:6324 [inline] io_submit_sqes+0x1761/0x2400 fs/io_uring.c:6521 __do_sys_io_uring_enter+0xeac/0x1bd0 fs/io_uring.c:8349 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45e179 Code: 3d b2 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 0b b2 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f1194e74c78 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 00000000000082c0 RCX: 000000000045e179 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000004 RBP: 000000000118cf98 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007ffd1aa5756f R14: 00007f1194e759c0 R15: 000000000118cf4c Fix this by just not diving into details if we fail to trylock the io_uring mutex. We know the ctx isn't going away during this operation, but we cannot safely iterate buffers/files/personalities if we don't hold the io_uring mutex. Reported-by: syzbot+2f8fa4e860edc3066aba@syzkaller.appspotmail.com Signed-off-by: Jens Axboe commit 8706e04ed7d6c95004d42b22a4db97d5b2eb73b2 Author: Jens Axboe Date: Mon Sep 28 08:38:54 2020 -0600 io_uring: always delete double poll wait entry on match syzbot reports a crash with tty polling, which is using the double poll handling: general protection fault, probably for non-canonical address 0xdffffc0000000009: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000048-0x000000000000004f] CPU: 0 PID: 6874 Comm: syz-executor749 Not tainted 5.9.0-rc6-next-20200924-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:io_poll_get_single fs/io_uring.c:4778 [inline] RIP: 0010:io_poll_double_wake+0x51/0x510 fs/io_uring.c:4845 Code: fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 9e 03 00 00 48 b8 00 00 00 00 00 fc ff df 49 8b 5d 08 48 8d 7b 48 48 89 fa 48 c1 ea 03 <0f> b6 04 02 84 c0 74 06 0f 8e 63 03 00 00 0f b6 6b 48 bf 06 00 00 RSP: 0018:ffffc90001c1fb70 EFLAGS: 00010006 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: 0000000000000004 RDX: 0000000000000009 RSI: ffffffff81d9b3ad RDI: 0000000000000048 RBP: dffffc0000000000 R08: ffff8880a3cac798 R09: ffffc90001c1fc60 R10: fffff52000383f73 R11: 0000000000000000 R12: 0000000000000004 R13: ffff8880a3cac798 R14: ffff8880a3cac7a0 R15: 0000000000000004 FS: 0000000001f98880(0000) GS:ffff8880ae400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f18886916c0 CR3: 0000000094c5a000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __wake_up_common+0x147/0x650 kernel/sched/wait.c:93 __wake_up_common_lock+0xd0/0x130 kernel/sched/wait.c:123 tty_ldisc_hangup+0x1cf/0x680 drivers/tty/tty_ldisc.c:735 __tty_hangup.part.0+0x403/0x870 drivers/tty/tty_io.c:625 __tty_hangup drivers/tty/tty_io.c:575 [inline] tty_vhangup+0x1d/0x30 drivers/tty/tty_io.c:698 pty_close+0x3f5/0x550 drivers/tty/pty.c:79 tty_release+0x455/0xf60 drivers/tty/tty_io.c:1679 __fput+0x285/0x920 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:141 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:165 [inline] exit_to_user_mode_prepare+0x1e2/0x1f0 kernel/entry/common.c:192 syscall_exit_to_user_mode+0x7a/0x2c0 kernel/entry/common.c:267 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x401210 which is due to a failure in removing the double poll wait entry if we hit a wakeup match. This can cause multiple invocations of the wakeup, which isn't safe. Cc: stable@vger.kernel.org # v5.8 Reported-by: syzbot+81b3883093f772addf6d@syzkaller.appspotmail.com Signed-off-by: Jens Axboe commit 6a7548305a04ae0cd9e9f062c050f265d4bf2d2e Author: Maxime Ripard Date: Thu Sep 24 10:26:42 2020 +0200 ARM: dts: bcm2835: Change firmware compatible from simple-bus to simple-mfd The current binding for the RPi firmware uses the simple-bus compatible as a fallback to benefit from its automatic probing of child nodes. However, simple-bus also comes with some constraints, like having the ranges, our case. Let's switch to simple-mfd that provides the same probing logic without those constraints. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200924082642.18144-1-maxime@cerno.tech Signed-off-by: Rob Herring commit d25e8fdebdad84219b498873300b7f11dd915b88 Author: Ed Wildgoose Date: Mon Sep 28 10:44:52 2020 +0100 gpio: amd-fch: correct logic of GPIO_LINE_DIRECTION The original commit appears to have the logic reversed in amd_fch_gpio_get_direction. Also confirmed by observing the value of "direction" in the sys tree. Signed-off-by: Ed Wildgoose Fixes: e09d168f13f0 ("gpio: AMD G-Series PCH gpio driver") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski commit afd7f30886b0b445a4240a99020458a9772f2b89 Author: Hans de Goede Date: Sun Sep 27 12:48:21 2020 +0200 mmc: sdhci: Workaround broken command queuing on Intel GLK based IRBIS models Commit bedf9fc01ff1 ("mmc: sdhci: Workaround broken command queuing on Intel GLK"), disabled command-queuing on Intel GLK based LENOVO models because of it being broken due to what is believed to be a bug in the BIOS. It seems that the BIOS of some IRBIS models, including the IRBIS NB111 model has the same issue, so disable command queuing there too. Fixes: bedf9fc01ff1 ("mmc: sdhci: Workaround broken command queuing on Intel GLK") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=209397 Reported-and-tested-by: RussianNeuroMancer Signed-off-by: Hans de Goede Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200927104821.5676-1-hdegoede@redhat.com Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 62c59a8786e6bb75569cee91dab66e9da3ff4b68 Author: Kai-Heng Feng Date: Fri Sep 25 16:49:51 2020 +0800 memstick: Skip allocating card when removing host After commit 6827ca573c03 ("memstick: rtsx_usb_ms: Support runtime power management"), removing module rtsx_usb_ms will be stuck. The deadlock is caused by powering on and powering off at the same time, the former one is when memstick_check() is flushed, and the later is called by memstick_remove_host(). Soe let's skip allocating card to prevent this issue. Fixes: 6827ca573c03 ("memstick: rtsx_usb_ms: Support runtime power management") Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200925084952.13220-1-kai.heng.feng@canonical.com Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit a1b8638ba1320e6684aa98233c15255eb803fac7 Author: Linus Torvalds Date: Sun Sep 27 14:38:10 2020 -0700 Linux 5.9-rc7 commit 709a16be0593c08190982cfbdca6df95e6d5823b Author: Heiner Kallweit Date: Sun Sep 27 19:44:29 2020 +0200 r8169: fix RTL8168f/RTL8411 EPHY config Mistakenly bit 2 was set instead of bit 3 as in the vendor driver. Fixes: a7a92cf81589 ("r8169: sync PCIe PHY init with vendor driver 8.047.01") Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 307eea32b202864c98d28174c14ddbf5b9367722 Author: Marian-Cristian Rotariu Date: Sun Sep 27 13:34:39 2020 +0100 dt-bindings: net: renesas,ravb: Add support for r8a774e1 SoC Document RZ/G2H (R8A774E1) SoC bindings. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: David S. Miller commit 72865028582a678be1e05240e55d452e5c258eca Author: Ido Schimmel Date: Sun Sep 27 09:42:11 2020 +0300 mlxsw: spectrum_acl: Fix mlxsw_sp_acl_tcam_group_add()'s error path If mlxsw_sp_acl_tcam_group_id_get() fails, the mutex initialized earlier is not destroyed. Fix this by initializing the mutex after calling the function. This is symmetric to mlxsw_sp_acl_tcam_group_del(). Fixes: 5ec2ee28d27b ("mlxsw: spectrum_acl: Introduce a mutex to guard region list updates") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 7dbbcf496f2a4b6d82cfc7810a0746e160b79762 Author: Randy Dunlap Date: Sat Sep 26 21:33:43 2020 -0700 mdio: fix mdio-thunder.c dependency & build error Fix build error by selecting MDIO_DEVRES for MDIO_THUNDER. Fixes this build error: ld: drivers/net/phy/mdio-thunder.o: in function `thunder_mdiobus_pci_probe': drivers/net/phy/mdio-thunder.c:78: undefined reference to `devm_mdiobus_alloc_size' Fixes: 379d7ac7ca31 ("phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses.") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Cc: Bartosz Golaszewski Cc: Andrew Lunn Cc: Heiner Kallweit Cc: netdev@vger.kernel.org Cc: David Daney Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 16bc1d5432ebd8e50e480eb300fd2b84afa28286 Merge: f8818559ca625 e30d694c3381b Author: Linus Torvalds Date: Sun Sep 27 12:18:57 2020 -0700 Merge tag 'kbuild-fixes-v5.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - ignore compiler stubs for PPC to fix builds - fix the usage of --target mentioned in the LLVM document * tag 'kbuild-fixes-v5.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: Documentation/llvm: Fix clang target examples scripts/kallsyms: skip ppc compiler stub *.long_branch.* / *.plt_branch.* commit f8818559ca6251adbcd9408dc1ebe3b832f3e1d7 Merge: ba25f0570b532 86a82ae0b5095 Author: Linus Torvalds Date: Sun Sep 27 12:15:21 2020 -0700 Merge tag 'x86-urgent-2020-09-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Two fixes for the x86 interrupt code: - Unbreak the magic 'search the timer interrupt' logic in IO/APIC code which got wreckaged when the core interrupt code made the state tracking logic stricter. That caused the interrupt line to stay masked after switching from IO/APIC to PIC delivery mode, which obviously prevents interrupts from being delivered. - Make run_on_irqstack_code() typesafe. The function argument is a void pointer which is then cast to 'void (*fun)(void *). This breaks Control Flow Integrity checking in clang. Use proper helper functions for the three variants reuqired" * tag 'x86-urgent-2020-09-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioapic: Unbreak check_timer() x86/irq: Make run_on_irqstack_cond() typesafe commit ba25f0570b53267e8b9dc1f2e185caa3d3bc7633 Merge: d042035eaf5f9 a7b6c0feda15c Author: Linus Torvalds Date: Sun Sep 27 12:11:35 2020 -0700 Merge tag 'timers-urgent-2020-09-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "A set of clocksource/clockevents updates: - Reset the TI/DM timer before enabling it instead of doing it the other way round. - Initialize the reload value for the GX6605s timer correctly so the hardware counter starts at 0 again after overrun. - Make error return value negative in the h8300 timer init function" * tag 'timers-urgent-2020-09-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/timer-gx6605s: Fixup counter reload clocksource/drivers/timer-ti-dm: Do reset before enable clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init() commit d042035eaf5f9009ad927dc4d3ce848381ccdeed Author: Peter Xu Date: Fri Sep 25 18:26:00 2020 -0400 mm/thp: Split huge pmds/puds if they're pinned when fork() Pinned pages shouldn't be write-protected when fork() happens, because follow up copy-on-write on these pages could cause the pinned pages to be replaced by random newly allocated pages. For huge PMDs, we split the huge pmd if pinning is detected. So that future handling will be done by the PTE level (with our latest changes, each of the small pages will be copied). We can achieve this by let copy_huge_pmd() return -EAGAIN for pinned pages, so that we'll fallthrough in copy_pmd_range() and finally land the next copy_pte_range() call. Huge PUDs will be even more special - so far it does not support anonymous pages. But it can actually be done the same as the huge PMDs even if the split huge PUDs means to erase the PUD entries. It'll guarantee the follow up fault ins will remap the same pages in either parent/child later. This might not be the most efficient way, but it should be easy and clean enough. It should be fine, since we're tackling with a very rare case just to make sure userspaces that pinned some thps will still work even without MADV_DONTFORK and after they fork()ed. Signed-off-by: Peter Xu Signed-off-by: Linus Torvalds commit 70e806e4e645019102d0e09d4933654fb5fb58ce Author: Peter Xu Date: Fri Sep 25 18:25:59 2020 -0400 mm: Do early cow for pinned pages during fork() for ptes This allows copy_pte_range() to do early cow if the pages were pinned on the source mm. Currently we don't have an accurate way to know whether a page is pinned or not. The only thing we have is page_maybe_dma_pinned(). However that's good enough for now. Especially, with the newly added mm->has_pinned flag to make sure we won't affect processes that never pinned any pages. It would be easier if we can do GFP_KERNEL allocation within copy_one_pte(). Unluckily, we can't because we're with the page table locks held for both the parent and child processes. So the page allocation needs to be done outside copy_one_pte(). Some trick is there in copy_present_pte(), majorly the wrprotect trick to block concurrent fast-gup. Comments in the function should explain better in place. Oleg Nesterov reported a (probably harmless) bug during review that we didn't reset entry.val properly in copy_pte_range() so that potentially there's chance to call add_swap_count_continuation() multiple times on the same swp entry. However that should be harmless since even if it happens, the same function (add_swap_count_continuation()) will return directly noticing that there're enough space for the swp counter. So instead of a standalone stable patch, it is touched up in this patch directly. Link: https://lore.kernel.org/lkml/20200914143829.GA1424636@nvidia.com/ Suggested-by: Linus Torvalds Signed-off-by: Peter Xu Signed-off-by: Linus Torvalds commit 7a4830c380f3a8b3425f6383deff58e65b2557b5 Author: Peter Xu Date: Fri Sep 25 18:25:58 2020 -0400 mm/fork: Pass new vma pointer into copy_page_range() This prepares for the future work to trigger early cow on pinned pages during fork(). No functional change intended. Signed-off-by: Peter Xu Signed-off-by: Linus Torvalds commit 008cfe4418b3dbda2ff820cdd7b1a5ce458ae444 Author: Peter Xu Date: Fri Sep 25 18:25:57 2020 -0400 mm: Introduce mm_struct.has_pinned (Commit message majorly collected from Jason Gunthorpe) Reduce the chance of false positive from page_maybe_dma_pinned() by keeping track if the mm_struct has ever been used with pin_user_pages(). This allows cases that might drive up the page ref_count to avoid any penalty from handling dma_pinned pages. Future work is planned, to provide a more sophisticated solution, likely to turn it into a real counter. For now, make it atomic_t but use it as a boolean for simplicity. Suggested-by: Jason Gunthorpe Signed-off-by: Peter Xu Signed-off-by: Linus Torvalds commit 8947efc077168c53b84d039881a7c967086a248a Author: Tali Perry Date: Sun Sep 20 23:48:09 2020 +0300 i2c: npcm7xx: Clear LAST bit after a failed transaction. Due to a HW issue, in some scenarios the LAST bit might remain set. This will cause an unexpected NACK after reading 16 bytes on the next read. Example: if user tries to read from a missing device, get a NACK, then if the next command is a long read ( > 16 bytes), the master will stop reading after 16 bytes. To solve this, if a command fails, check if LAST bit is still set. If it does, reset the module. Fixes: 56a1485b102e (i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver) Signed-off-by: Tali Perry Signed-off-by: Wolfram Sang commit a2bd970aa62f2f7f80fd0d212b1d4ccea5df4aed Author: Nicolas VINCENT Date: Wed Sep 23 16:08:40 2020 +0200 i2c: cpm: Fix i2c_ram structure the i2c_ram structure is missing the sdmatmp field mentionned in datasheet for MPC8272 at paragraph 36.5. With this field missing, the hardware would write past the allocated memory done through cpm_muram_alloc for the i2c_ram structure and land in memory allocated for the buffers descriptors corrupting the cbd_bufaddr field. Since this field is only set during setup(), the first i2c transaction would work and the following would send data read from an arbitrary memory location. Fixes: 61045dbe9d8d ("i2c: Add support for I2C bus on Freescale CPM1/CPM2 controllers") Signed-off-by: Nicolas VINCENT Acked-by: Jochen Friedrich Acked-by: Christophe Leroy Signed-off-by: Wolfram Sang commit a7b6c0feda15c9881cac83102cdbc82e39889995 Merge: b0294f30256bb bc6717d55d071 Author: Thomas Gleixner Date: Sun Sep 27 11:24:34 2020 +0200 Merge tag 'timers-v5.9-rc4' of https://git.linaro.org/people/daniel.lezcano/linux into timers/urgent Pull clocksource/clockevent fixes from Daniel Lezcano: - Fix wrong signed return value when checking of_iomap in the probe function for the h8300 timer (Tianjia Zhang) - Fix reset sequence when setting up the timer on the dm_timer (Tony Lindgren) - Fix counter reload when the interrupt fires on gx6605s (Guo Ren) commit a1bffa48745afbb54cb4f873bba783b2ae8be042 Merge: 692495baa377e 6c5dee18756b4 Author: Linus Torvalds Date: Sat Sep 26 11:18:37 2020 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three fixes: one in drivers (lpfc) and two for zoned block devices. The latter also impinges on the block layer but only to introduce a new block API for setting the zone model rather than fiddling with the queue directly in the zoned block driver" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: sd_zbc: Fix ZBC disk initialization scsi: sd: sd_zbc: Fix handling of host-aware ZBC disks scsi: lpfc: Fix initial FLOGI failure due to BBSCN not supported commit 692495baa377e373cc9cd930af03e9b8b77eacdf Merge: 9d2fbaefb3b04 f38c7e3abfba9 Author: Linus Torvalds Date: Sat Sep 26 11:13:51 2020 -0700 Merge tag 'io_uring-5.9-2020-09-25' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Two fixes for regressions in this cycle, and one that goes to 5.8 stable: - fix leak of getname() retrieved filename - remove plug->nowait assignment, fixing a regression with btrfs - fix for async buffered retry" * tag 'io_uring-5.9-2020-09-25' of git://git.kernel.dk/linux-block: io_uring: ensure async buffered read-retry is setup properly io_uring: don't unconditionally set plug->nowait = true io_uring: ensure open/openat2 name is cleaned on cancelation commit 9d2fbaefb3b049772b468447ed427204789ea9a5 Merge: eeddbe6841cde 3aab91774bbd8 Author: Linus Torvalds Date: Sat Sep 26 11:07:36 2020 -0700 Merge tag 'block-5.9-2020-09-25' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "NVMe pull request from Christoph, and removal of a dead define. - fix error during controller probe that cause double free irqs (Keith Busch) - FC connection establishment fix (James Smart) - properly handle completions for invalid tags (Xianting Tian) - pass the correct nsid to the command effects and supported log (Chaitanya Kulkarni)" * tag 'block-5.9-2020-09-25' of git://git.kernel.dk/linux-block: block: remove unused BLK_QC_T_EAGAIN flag nvme-core: don't use NVME_NSID_ALL for command effects and supported log nvme-fc: fail new connections to a deleted host or remote port nvme-pci: fix NULL req in completion handler nvme: return errors for hwmon init commit eeddbe6841cde5524b0b1d01f6e060be564453bf Merge: 8fb1e91033583 f7e80983f0cf4 Author: Linus Torvalds Date: Sat Sep 26 11:01:18 2020 -0700 Merge tag 's390-5.9-7' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fix from Vasily Gorbik: "Fix truncated ZCRYPT_PERDEV_REQCNT ioctl result. Copy entire reqcnt list" * tag 's390-5.9-7' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl commit 8fb1e910335837c0e157679d6a29ad5eca127411 Merge: ce2684254bd48 f85086f95fa36 Author: Linus Torvalds Date: Sat Sep 26 10:53:35 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "9 patches. Subsystems affected by this patch series: mm (thp, memcg, gup, migration, memory-hotplug), lib, and x86" * emailed patches from Andrew Morton : mm: don't rely on system state to detect hot-plug operations mm: replace memmap_context by meminit_context arch/x86/lib/usercopy_64.c: fix __copy_user_flushcache() cache writeback lib/memregion.c: include memregion.h lib/string.c: implement stpcpy mm/migrate: correct thp migration stats mm/gup: fix gup_fast with dynamic page table folding mm: memcontrol: fix missing suffix of workingset_restore mm, THP, swap: fix allocating cluster for swapfile by mistake commit ce2684254bd4818ca3995c0d021fb62c4cf10a19 Author: Minchan Kim Date: Mon Sep 14 23:32:15 2020 -0700 mm: validate pmd after splitting syzbot reported the following KASAN splat: general protection fault, probably for non-canonical address 0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] CPU: 1 PID: 6826 Comm: syz-executor142 Not tainted 5.9.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__lock_acquire+0x84/0x2ae0 kernel/locking/lockdep.c:4296 Code: ff df 8a 04 30 84 c0 0f 85 e3 16 00 00 83 3d 56 58 35 08 00 0f 84 0e 17 00 00 83 3d 25 c7 f5 07 00 74 2c 4c 89 e8 48 c1 e8 03 <80> 3c 30 00 74 12 4c 89 ef e8 3e d1 5a 00 48 be 00 00 00 00 00 fc RSP: 0018:ffffc90004b9f850 EFLAGS: 00010006 Call Trace: lock_acquire+0x140/0x6f0 kernel/locking/lockdep.c:5006 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] madvise_cold_or_pageout_pte_range+0x52f/0x25c0 mm/madvise.c:389 walk_pmd_range mm/pagewalk.c:89 [inline] walk_pud_range mm/pagewalk.c:160 [inline] walk_p4d_range mm/pagewalk.c:193 [inline] walk_pgd_range mm/pagewalk.c:229 [inline] __walk_page_range+0xe7b/0x1da0 mm/pagewalk.c:331 walk_page_range+0x2c3/0x5c0 mm/pagewalk.c:427 madvise_pageout_page_range mm/madvise.c:521 [inline] madvise_pageout mm/madvise.c:557 [inline] madvise_vma mm/madvise.c:946 [inline] do_madvise+0x12d0/0x2090 mm/madvise.c:1145 __do_sys_madvise mm/madvise.c:1171 [inline] __se_sys_madvise mm/madvise.c:1169 [inline] __x64_sys_madvise+0x76/0x80 mm/madvise.c:1169 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The backing vma was shmem. In case of split page of file-backed THP, madvise zaps the pmd instead of remapping of sub-pages. So we need to check pmd validity after split. Reported-by: syzbot+ecf80462cb7d5d552bc7@syzkaller.appspotmail.com Fixes: 1a4e58cce84e ("mm: introduce MADV_PAGEOUT") Signed-off-by: Minchan Kim Acked-by: Kirill A. Shutemov Signed-off-by: Linus Torvalds commit f85086f95fa36194eb0db5cd5c12e56801b98523 Author: Laurent Dufour Date: Fri Sep 25 21:19:31 2020 -0700 mm: don't rely on system state to detect hot-plug operations In register_mem_sect_under_node() the system_state's value is checked to detect whether the call is made during boot time or during an hot-plug operation. Unfortunately, that check against SYSTEM_BOOTING is wrong because regular memory is registered at SYSTEM_SCHEDULING state. In addition, memory hot-plug operation can be triggered at this system state by the ACPI [1]. So checking against the system state is not enough. The consequence is that on system with interleaved node's ranges like this: Early memory node ranges node 1: [mem 0x0000000000000000-0x000000011fffffff] node 2: [mem 0x0000000120000000-0x000000014fffffff] node 1: [mem 0x0000000150000000-0x00000001ffffffff] node 0: [mem 0x0000000200000000-0x000000048fffffff] node 2: [mem 0x0000000490000000-0x00000007ffffffff] This can be seen on PowerPC LPAR after multiple memory hot-plug and hot-unplug operations are done. At the next reboot the node's memory ranges can be interleaved and since the call to link_mem_sections() is made in topology_init() while the system is in the SYSTEM_SCHEDULING state, the node's id is not checked, and the sections registered to multiple nodes: $ ls -l /sys/devices/system/memory/memory21/node* total 0 lrwxrwxrwx 1 root root 0 Aug 24 05:27 node1 -> ../../node/node1 lrwxrwxrwx 1 root root 0 Aug 24 05:27 node2 -> ../../node/node2 In that case, the system is able to boot but if later one of theses memory blocks is hot-unplugged and then hot-plugged, the sysfs inconsistency is detected and this is triggering a BUG_ON(): kernel BUG at /Users/laurent/src/linux-ppc/mm/memory_hotplug.c:1084! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: rpadlpar_io rpaphp pseries_rng rng_core vmx_crypto gf128mul binfmt_misc ip_tables x_tables xfs libcrc32c crc32c_vpmsum autofs4 CPU: 8 PID: 10256 Comm: drmgr Not tainted 5.9.0-rc1+ #25 Call Trace: add_memory_resource+0x23c/0x340 (unreliable) __add_memory+0x5c/0xf0 dlpar_add_lmb+0x1b4/0x500 dlpar_memory+0x1f8/0xb80 handle_dlpar_errorlog+0xc0/0x190 dlpar_store+0x198/0x4a0 kobj_attr_store+0x30/0x50 sysfs_kf_write+0x64/0x90 kernfs_fop_write+0x1b0/0x290 vfs_write+0xe8/0x290 ksys_write+0xdc/0x130 system_call_exception+0x160/0x270 system_call_common+0xf0/0x27c This patch addresses the root cause by not relying on the system_state value to detect whether the call is due to a hot-plug operation. An extra parameter is added to link_mem_sections() detailing whether the operation is due to a hot-plug operation. [1] According to Oscar Salvador, using this qemu command line, ACPI memory hotplug operations are raised at SYSTEM_SCHEDULING state: $QEMU -enable-kvm -machine pc -smp 4,sockets=4,cores=1,threads=1 -cpu host -monitor pty \ -m size=$MEM,slots=255,maxmem=4294967296k \ -numa node,nodeid=0,cpus=0-3,mem=512 -numa node,nodeid=1,mem=512 \ -object memory-backend-ram,id=memdimm0,size=134217728 -device pc-dimm,node=0,memdev=memdimm0,id=dimm0,slot=0 \ -object memory-backend-ram,id=memdimm1,size=134217728 -device pc-dimm,node=0,memdev=memdimm1,id=dimm1,slot=1 \ -object memory-backend-ram,id=memdimm2,size=134217728 -device pc-dimm,node=0,memdev=memdimm2,id=dimm2,slot=2 \ -object memory-backend-ram,id=memdimm3,size=134217728 -device pc-dimm,node=0,memdev=memdimm3,id=dimm3,slot=3 \ -object memory-backend-ram,id=memdimm4,size=134217728 -device pc-dimm,node=1,memdev=memdimm4,id=dimm4,slot=4 \ -object memory-backend-ram,id=memdimm5,size=134217728 -device pc-dimm,node=1,memdev=memdimm5,id=dimm5,slot=5 \ -object memory-backend-ram,id=memdimm6,size=134217728 -device pc-dimm,node=1,memdev=memdimm6,id=dimm6,slot=6 \ Fixes: 4fbce633910e ("mm/memory_hotplug.c: make register_mem_sect_under_node() a callback of walk_memory_range()") Signed-off-by: Laurent Dufour Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Cc: Fenghua Yu Cc: Nathan Lynch Cc: Scott Cheloha Cc: Tony Luck Cc: Link: https://lkml.kernel.org/r/20200915094143.79181-3-ldufour@linux.ibm.com Signed-off-by: Linus Torvalds commit c1d0da83358a2316d9be7f229f26126dbaa07468 Author: Laurent Dufour Date: Fri Sep 25 21:19:28 2020 -0700 mm: replace memmap_context by meminit_context Patch series "mm: fix memory to node bad links in sysfs", v3. Sometimes, firmware may expose interleaved memory layout like this: Early memory node ranges node 1: [mem 0x0000000000000000-0x000000011fffffff] node 2: [mem 0x0000000120000000-0x000000014fffffff] node 1: [mem 0x0000000150000000-0x00000001ffffffff] node 0: [mem 0x0000000200000000-0x000000048fffffff] node 2: [mem 0x0000000490000000-0x00000007ffffffff] In that case, we can see memory blocks assigned to multiple nodes in sysfs: $ ls -l /sys/devices/system/memory/memory21 total 0 lrwxrwxrwx 1 root root 0 Aug 24 05:27 node1 -> ../../node/node1 lrwxrwxrwx 1 root root 0 Aug 24 05:27 node2 -> ../../node/node2 -rw-r--r-- 1 root root 65536 Aug 24 05:27 online -r--r--r-- 1 root root 65536 Aug 24 05:27 phys_device -r--r--r-- 1 root root 65536 Aug 24 05:27 phys_index drwxr-xr-x 2 root root 0 Aug 24 05:27 power -r--r--r-- 1 root root 65536 Aug 24 05:27 removable -rw-r--r-- 1 root root 65536 Aug 24 05:27 state lrwxrwxrwx 1 root root 0 Aug 24 05:25 subsystem -> ../../../../bus/memory -rw-r--r-- 1 root root 65536 Aug 24 05:25 uevent -r--r--r-- 1 root root 65536 Aug 24 05:27 valid_zones The same applies in the node's directory with a memory21 link in both the node1 and node2's directory. This is wrong but doesn't prevent the system to run. However when later, one of these memory blocks is hot-unplugged and then hot-plugged, the system is detecting an inconsistency in the sysfs layout and a BUG_ON() is raised: kernel BUG at /Users/laurent/src/linux-ppc/mm/memory_hotplug.c:1084! LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Modules linked in: rpadlpar_io rpaphp pseries_rng rng_core vmx_crypto gf128mul binfmt_misc ip_tables x_tables xfs libcrc32c crc32c_vpmsum autofs4 CPU: 8 PID: 10256 Comm: drmgr Not tainted 5.9.0-rc1+ #25 Call Trace: add_memory_resource+0x23c/0x340 (unreliable) __add_memory+0x5c/0xf0 dlpar_add_lmb+0x1b4/0x500 dlpar_memory+0x1f8/0xb80 handle_dlpar_errorlog+0xc0/0x190 dlpar_store+0x198/0x4a0 kobj_attr_store+0x30/0x50 sysfs_kf_write+0x64/0x90 kernfs_fop_write+0x1b0/0x290 vfs_write+0xe8/0x290 ksys_write+0xdc/0x130 system_call_exception+0x160/0x270 system_call_common+0xf0/0x27c This has been seen on PowerPC LPAR. The root cause of this issue is that when node's memory is registered, the range used can overlap another node's range, thus the memory block is registered to multiple nodes in sysfs. There are two issues here: (a) The sysfs memory and node's layouts are broken due to these multiple links (b) The link errors in link_mem_sections() should not lead to a system panic. To address (a) register_mem_sect_under_node should not rely on the system state to detect whether the link operation is triggered by a hot plug operation or not. This is addressed by the patches 1 and 2 of this series. Issue (b) will be addressed separately. This patch (of 2): The memmap_context enum is used to detect whether a memory operation is due to a hot-add operation or happening at boot time. Make it general to the hotplug operation and rename it as meminit_context. There is no functional change introduced by this patch Suggested-by: David Hildenbrand Signed-off-by: Laurent Dufour Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Greg Kroah-Hartman Cc: "Rafael J . Wysocki" Cc: Nathan Lynch Cc: Scott Cheloha Cc: Tony Luck Cc: Fenghua Yu Cc: Link: https://lkml.kernel.org/r/20200915094143.79181-1-ldufour@linux.ibm.com Link: https://lkml.kernel.org/r/20200915132624.9723-1-ldufour@linux.ibm.com Signed-off-by: Linus Torvalds commit a1cd6c2ae47ee10ff21e62475685d5b399e2ed4a Author: Mikulas Patocka Date: Fri Sep 25 21:19:24 2020 -0700 arch/x86/lib/usercopy_64.c: fix __copy_user_flushcache() cache writeback If we copy less than 8 bytes and if the destination crosses a cache line, __copy_user_flushcache would invalidate only the first cache line. This patch makes it invalidate the second cache line as well. Fixes: 0aed55af88345b ("x86, uaccess: introduce copy_from_iter_flushcache for pmem / cache-bypass operations") Signed-off-by: Mikulas Patocka Signed-off-by: Andrew Morton Reviewed-by: Dan Williams Cc: Jan Kara Cc: Jeff Moyer Cc: Ingo Molnar Cc: Christoph Hellwig Cc: Toshi Kani Cc: "H. Peter Anvin" Cc: Al Viro Cc: Thomas Gleixner Cc: Matthew Wilcox Cc: Ross Zwisler Cc: Ingo Molnar Cc: Link: https://lkml.kernel.org/r/alpine.LRH.2.02.2009161451140.21915@file01.intranet.prod.int.rdu2.redhat.com Signed-off-by: Linus Torvalds commit ffa550cd691b8ba6c6117ce986516635afe03c13 Author: Jason Yan Date: Fri Sep 25 21:19:21 2020 -0700 lib/memregion.c: include memregion.h This addresses the following sparse warning: lib/memregion.c:8:5: warning: symbol 'memregion_alloc' was not declared. Should it be static? lib/memregion.c:14:6: warning: symbol 'memregion_free' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/20200921142852.875312-1-yanaijie@huawei.com Signed-off-by: Linus Torvalds commit 1e1b6d63d6340764e00356873e5794225a2a03ea Author: Nick Desaulniers Date: Fri Sep 25 21:19:18 2020 -0700 lib/string.c: implement stpcpy LLVM implemented a recent "libcall optimization" that lowers calls to `sprintf(dest, "%s", str)` where the return value is used to `stpcpy(dest, str) - dest`. This generally avoids the machinery involved in parsing format strings. `stpcpy` is just like `strcpy` except it returns the pointer to the new tail of `dest`. This optimization was introduced into clang-12. Implement this so that we don't observe linkage failures due to missing symbol definitions for `stpcpy`. Similar to last year's fire drill with: commit 5f074f3e192f ("lib/string.c: implement a basic bcmp") The kernel is somewhere between a "freestanding" environment (no full libc) and "hosted" environment (many symbols from libc exist with the same type, function signature, and semantics). As Peter Anvin notes, there's not really a great way to inform the compiler that you're targeting a freestanding environment but would like to opt-in to some libcall optimizations (see pr/47280 below), rather than opt-out. Arvind notes, -fno-builtin-* behaves slightly differently between GCC and Clang, and Clang is missing many __builtin_* definitions, which I consider a bug in Clang and am working on fixing. Masahiro summarizes the subtle distinction between compilers justly: To prevent transformation from foo() into bar(), there are two ways in Clang to do that; -fno-builtin-foo, and -fno-builtin-bar. There is only one in GCC; -fno-buitin-foo. (Any difference in that behavior in Clang is likely a bug from a missing __builtin_* definition.) Masahiro also notes: We want to disable optimization from foo() to bar(), but we may still benefit from the optimization from foo() into something else. If GCC implements the same transform, we would run into a problem because it is not -fno-builtin-bar, but -fno-builtin-foo that disables that optimization. In this regard, -fno-builtin-foo would be more future-proof than -fno-built-bar, but -fno-builtin-foo is still potentially overkill. We may want to prevent calls from foo() being optimized into calls to bar(), but we still may want other optimization on calls to foo(). It seems that compilers today don't quite provide the fine grain control over which libcall optimizations pseudo-freestanding environments would prefer. Finally, Kees notes that this interface is unsafe, so we should not encourage its use. As such, I've removed the declaration from any header, but it still needs to be exported to avoid linkage errors in modules. Reported-by: Sami Tolvanen Suggested-by: Andy Lavr Suggested-by: Arvind Sankar Suggested-by: Joe Perches Suggested-by: Kees Cook Suggested-by: Masahiro Yamada Suggested-by: Rasmus Villemoes Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Tested-by: Nathan Chancellor Cc: Link: https://lkml.kernel.org/r/20200914161643.938408-1-ndesaulniers@google.com Link: https://bugs.llvm.org/show_bug.cgi?id=47162 Link: https://bugs.llvm.org/show_bug.cgi?id=47280 Link: https://github.com/ClangBuiltLinux/linux/issues/1126 Link: https://man7.org/linux/man-pages/man3/stpcpy.3.html Link: https://pubs.opengroup.org/onlinepubs/9699919799/functions/stpcpy.html Link: https://reviews.llvm.org/D85963 Signed-off-by: Linus Torvalds commit 6c5c7b9f3352728af490183f71d350bb658ffb75 Author: Zi Yan Date: Fri Sep 25 21:19:14 2020 -0700 mm/migrate: correct thp migration stats PageTransHuge returns true for both thp and hugetlb, so thp stats was counting both thp and hugetlb migrations. Exclude hugetlb migration by setting is_thp variable right. Clean up thp handling code too when we are there. Fixes: 1a5bae25e3cf ("mm/vmstat: add events for THP migration without split") Signed-off-by: Zi Yan Signed-off-by: Andrew Morton Reviewed-by: Daniel Jordan Cc: Anshuman Khandual Link: https://lkml.kernel.org/r/20200917210413.1462975-1-zi.yan@sent.com Signed-off-by: Linus Torvalds commit d3f7b1bb204099f2f7306318896223e8599bb6a2 Author: Vasily Gorbik Date: Fri Sep 25 21:19:10 2020 -0700 mm/gup: fix gup_fast with dynamic page table folding Currently to make sure that every page table entry is read just once gup_fast walks perform READ_ONCE and pass pXd value down to the next gup_pXd_range function by value e.g.: static int gup_pud_range(p4d_t p4d, unsigned long addr, unsigned long end, unsigned int flags, struct page **pages, int *nr) ... pudp = pud_offset(&p4d, addr); This function passes a reference on that local value copy to pXd_offset, and might get the very same pointer in return. This happens when the level is folded (on most arches), and that pointer should not be iterated. On s390 due to the fact that each task might have different 5,4 or 3-level address translation and hence different levels folded the logic is more complex and non-iteratable pointer to a local copy leads to severe problems. Here is an example of what happens with gup_fast on s390, for a task with 3-level paging, crossing a 2 GB pud boundary: // addr = 0x1007ffff000, end = 0x10080001000 static int gup_pud_range(p4d_t p4d, unsigned long addr, unsigned long end, unsigned int flags, struct page **pages, int *nr) { unsigned long next; pud_t *pudp; // pud_offset returns &p4d itself (a pointer to a value on stack) pudp = pud_offset(&p4d, addr); do { // on second iteratation reading "random" stack value pud_t pud = READ_ONCE(*pudp); // next = 0x10080000000, due to PUD_SIZE/MASK != PGDIR_SIZE/MASK on s390 next = pud_addr_end(addr, end); ... } while (pudp++, addr = next, addr != end); // pudp++ iterating over stack return 1; } This happens since s390 moved to common gup code with commit d1874a0c2805 ("s390/mm: make the pxd_offset functions more robust") and commit 1a42010cdc26 ("s390/mm: convert to the generic get_user_pages_fast code"). s390 tried to mimic static level folding by changing pXd_offset primitives to always calculate top level page table offset in pgd_offset and just return the value passed when pXd_offset has to act as folded. What is crucial for gup_fast and what has been overlooked is that PxD_SIZE/MASK and thus pXd_addr_end should also change correspondingly. And the latter is not possible with dynamic folding. To fix the issue in addition to pXd values pass original pXdp pointers down to gup_pXd_range functions. And introduce pXd_offset_lockless helpers, which take an additional pXd entry value parameter. This has already been discussed in https://lkml.kernel.org/r/20190418100218.0a4afd51@mschwideX1 Fixes: 1a42010cdc26 ("s390/mm: convert to the generic get_user_pages_fast code") Signed-off-by: Vasily Gorbik Signed-off-by: Andrew Morton Reviewed-by: Gerald Schaefer Reviewed-by: Alexander Gordeev Reviewed-by: Jason Gunthorpe Reviewed-by: Mike Rapoport Reviewed-by: John Hubbard Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Dave Hansen Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Jeff Dike Cc: Richard Weinberger Cc: Dave Hansen Cc: Andy Lutomirski Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Arnd Bergmann Cc: Andrey Ryabinin Cc: Heiko Carstens Cc: Christian Borntraeger Cc: Claudio Imbrenda Cc: [5.2+] Link: https://lkml.kernel.org/r/patch.git-943f1e5dcff2.your-ad-here.call-01599856292-ext-8676@work.hours Signed-off-by: Linus Torvalds commit 8d3fe09d8d6645dcbbe2413cde58f51ceb6545a6 Author: Muchun Song Date: Fri Sep 25 21:19:05 2020 -0700 mm: memcontrol: fix missing suffix of workingset_restore We forget to add the suffix to the workingset_restore string, so fix it. And also update the documentation of cgroup-v2.rst. Fixes: 170b04b7ae49 ("mm/workingset: prepare the workingset detection infrastructure for anon LRU") Signed-off-by: Muchun Song Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Joonsoo Kim Cc: Johannes Weiner Cc: Vlastimil Babka Cc: Tejun Heo Cc: Zefan Li Cc: Jonathan Corbet Cc: Michal Hocko Cc: Vladimir Davydov Cc: Roman Gushchin Cc: Randy Dunlap Link: https://lkml.kernel.org/r/20200916100030.71698-1-songmuchun@bytedance.com Signed-off-by: Linus Torvalds commit 41663430588c737dd735bad5a0d1ba325dcabd59 Author: Gao Xiang Date: Fri Sep 25 21:19:01 2020 -0700 mm, THP, swap: fix allocating cluster for swapfile by mistake SWP_FS is used to make swap_{read,write}page() go through the filesystem, and it's only used for swap files over NFS. So, !SWP_FS means non NFS for now, it could be either file backed or device backed. Something similar goes with legacy SWP_FILE. So in order to achieve the goal of the original patch, SWP_BLKDEV should be used instead. FS corruption can be observed with SSD device + XFS + fragmented swapfile due to CONFIG_THP_SWAP=y. I reproduced the issue with the following details: Environment: QEMU + upstream kernel + buildroot + NVMe (2 GB) Kernel config: CONFIG_BLK_DEV_NVME=y CONFIG_THP_SWAP=y Some reproducible steps: mkfs.xfs -f /dev/nvme0n1 mkdir /tmp/mnt mount /dev/nvme0n1 /tmp/mnt bs="32k" sz="1024m" # doesn't matter too much, I also tried 16m xfs_io -f -c "pwrite -R -b $bs 0 $sz" -c "fdatasync" /tmp/mnt/sw xfs_io -f -c "pwrite -R -b $bs 0 $sz" -c "fdatasync" /tmp/mnt/sw xfs_io -f -c "pwrite -R -b $bs 0 $sz" -c "fdatasync" /tmp/mnt/sw xfs_io -f -c "pwrite -F -S 0 -b $bs 0 $sz" -c "fdatasync" /tmp/mnt/sw xfs_io -f -c "pwrite -R -b $bs 0 $sz" -c "fsync" /tmp/mnt/sw mkswap /tmp/mnt/sw swapon /tmp/mnt/sw stress --vm 2 --vm-bytes 600M # doesn't matter too much as well Symptoms: - FS corruption (e.g. checksum failure) - memory corruption at: 0xd2808010 - segfault Fixes: f0eea189e8e9 ("mm, THP, swap: Don't allocate huge cluster for file backed swap device") Fixes: 38d8b4e6bdc8 ("mm, THP, swap: delay splitting THP during swap out") Signed-off-by: Gao Xiang Signed-off-by: Andrew Morton Reviewed-by: "Huang, Ying" Reviewed-by: Yang Shi Acked-by: Rafael Aquini Cc: Matthew Wilcox Cc: Carlos Maiolino Cc: Eric Sandeen Cc: Dave Chinner Cc: Link: https://lkml.kernel.org/r/20200820045323.7809-1-hsiangkao@redhat.com Signed-off-by: Linus Torvalds commit 678ff6a7afccc43d352c1b8c94b6d8c0ee1464ad Author: Shakeel Butt Date: Sat Sep 26 07:13:41 2020 -0700 mm: slab: fix potential double free in ___cache_free With the commit 10befea91b61 ("mm: memcg/slab: use a single set of kmem_caches for all allocations"), it becomes possible to call kfree() from the slabs_destroy(). The functions cache_flusharray() and do_drain() calls slabs_destroy() on array_cache of the local CPU without updating the size of the array_cache. This enables the kfree() call from the slabs_destroy() to recursively call cache_flusharray() which can potentially call free_block() on the same elements of the array_cache of the local CPU and causing double free and memory corruption. To fix the issue, simply update the local CPU array_cache cache before calling slabs_destroy(). Fixes: 10befea91b61 ("mm: memcg/slab: use a single set of kmem_caches for all allocations") Signed-off-by: Shakeel Butt Reviewed-by: Roman Gushchin Tested-by: Ming Lei Reported-by: kernel test robot Cc: Andrew Morton Cc: Ted Ts'o Signed-off-by: Linus Torvalds commit e30d694c3381b565e043cf74b0bed059db1b4ac9 Author: Florian Fainelli Date: Fri Sep 25 08:21:14 2020 -0700 Documentation/llvm: Fix clang target examples clang --target= is how we can specify a particular toolchain triple to be use, fix the two occurences in the documentation. Fixes: fcf1b6a35c16 ("Documentation/llvm: add documentation on building w/ Clang/LLVM") Signed-off-by: Florian Fainelli Reviewed-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 059432495e209279bae12db3d2b0bc8c8fe987bb Author: Igor Russkikh Date: Fri Sep 25 23:27:35 2020 +0300 net: atlantic: fix build when object tree is separate Driver subfolder files refer parent folder includes in an absolute manner. Makefile contains a -I for this, but apparently that does not work if object tree is separated. Adding srctree to fix that. Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 7c7ec3226f5f33f9c050d85ec20f18419c622ad6 Merge: b463b6f699748 4bb05f30483fd Author: Linus Torvalds Date: Fri Sep 25 17:15:19 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more kvm fixes from Paolo Bonzini: "Five small fixes. The nested migration bug will be fixed with a better API in 5.10 or 5.11, for now this is a fix that works with existing userspace but keeps the current ugly API" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: SVM: Add a dedicated INVD intercept routine KVM: x86: Reset MMU context if guest toggles CR4.SMAP or CR4.PKE KVM: x86: fix MSR_IA32_TSC read for nested migration selftests: kvm: Fix assert failure in single-step test KVM: x86: VMX: Make smaller physical guest address space support user-configurable commit 5e46e43c2ad92bca709944be806feb9bce044061 Author: Florian Fainelli Date: Fri Sep 25 08:26:16 2020 -0700 MAINTAINERS: Add Vladimir as a maintainer for DSA Signed-off-by: Florian Fainelli Acked-by: Vladimir Oltean Acked-by: Andrew Lunn Acked-by: Vivien Didelot Signed-off-by: David S. Miller commit 72e27c38abb3dc8da7c05f829d44b3f3c46d06da Author: Ioana Ciornei Date: Fri Sep 25 17:35:30 2020 +0300 dpaa2-eth: fix command version for Tx shaping When adding the support for TBF offload, the improper command version was added even though the command format is for the V2 of dpni_set_tx_shaping(). This does not affect the functionality of TBF since the only change between these two versions is the addition of the exceeded parameters which are not used in TBF. Still, fix the bug so that we keep things in sync. Fixes: 39344a89623d ("dpaa2-eth: add API for Tx shaping") Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit e42d72fea91f8f2e82b65808739ca04b7a8cd7a8 Author: Wilken Gottwalt Date: Fri Sep 25 15:58:57 2020 +0200 net: usb: ax88179_178a: add Toshiba usb 3.0 adapter Adds the driver_info and usb ids of the AX88179 based Toshiba USB 3.0 ethernet adapter. Signed-off-by: Wilken Gottwalt Signed-off-by: David S. Miller commit dc171dcf8a93db642bcbf246a7bddd6d4e0ff84a Merge: 4663ff60257ae 89d01748b2354 Author: David S. Miller Date: Fri Sep 25 17:04:56 2020 -0700 Merge branch 'bonding-team-basic-dev-needed_headroom-support' Eric Dumazet says: ==================== bonding/team: basic dev->needed_headroom support Both bonding and team drivers support non-ethernet devices, but missed proper dev->needed_headroom initializations. syzbot found a crash caused by bonding, I mirrored the fix in team as well. ==================== Signed-off-by: David S. Miller commit 89d01748b2354e210b5d4ea47bc25a42a1b42c82 Author: Eric Dumazet Date: Fri Sep 25 06:38:08 2020 -0700 team: set dev->needed_headroom in team_setup_by_port() Some devices set needed_headroom. If we ignore it, we might end up crashing in various skb_push() for example in ipgre_header() since some layers assume enough headroom has been reserved. Fixes: 1d76efe1577b ("team: add support for non-ethernet devices") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit f32f19339596b214c208c0dba716f4b6cc4f6958 Author: Eric Dumazet Date: Fri Sep 25 06:38:07 2020 -0700 bonding: set dev->needed_headroom in bond_setup_by_slave() syzbot managed to crash a host by creating a bond with a GRE device. For non Ethernet device, bonding calls bond_setup_by_slave() instead of ether_setup(), and unfortunately dev->needed_headroom was not copied from the new added member. [ 171.243095] skbuff: skb_under_panic: text:ffffffffa184b9ea len:116 put:20 head:ffff883f84012dc0 data:ffff883f84012dbc tail:0x70 end:0xd00 dev:bond0 [ 171.243111] ------------[ cut here ]------------ [ 171.243112] kernel BUG at net/core/skbuff.c:112! [ 171.243117] invalid opcode: 0000 [#1] SMP KASAN PTI [ 171.243469] gsmi: Log Shutdown Reason 0x03 [ 171.243505] Call Trace: [ 171.243506] [ 171.243512] [] skb_push+0x49/0x50 [ 171.243516] [] ipgre_header+0x2a/0xf0 [ 171.243520] [] neigh_connected_output+0xb7/0x100 [ 171.243524] [] ip6_finish_output2+0x383/0x490 [ 171.243528] [] __ip6_finish_output+0xa2/0x110 [ 171.243531] [] ip6_finish_output+0x2c/0xa0 [ 171.243534] [] ip6_output+0x69/0x110 [ 171.243537] [] ? ip6_output+0x110/0x110 [ 171.243541] [] mld_sendpack+0x1b2/0x2d0 [ 171.243544] [] ? mld_send_report+0xf0/0xf0 [ 171.243548] [] mld_ifc_timer_expire+0x2d7/0x3b0 [ 171.243551] [] ? mld_gq_timer_expire+0x50/0x50 [ 171.243556] [] call_timer_fn+0x30/0x130 [ 171.243559] [] expire_timers+0x4c/0x110 [ 171.243563] [] __run_timers+0x213/0x260 [ 171.243566] [] ? ktime_get+0x3d/0xa0 [ 171.243570] [] ? clockevents_program_event+0x7e/0xe0 [ 171.243574] [] ? sched_clock_cpu+0x15/0x190 [ 171.243577] [] run_timer_softirq+0x1d/0x40 [ 171.243581] [] __do_softirq+0x152/0x2f0 [ 171.243585] [] irq_exit+0x9f/0xb0 [ 171.243588] [] smp_apic_timer_interrupt+0xfd/0x1a0 [ 171.243591] [] apic_timer_interrupt+0x86/0x90 Fixes: f5184d267c1a ("net: Allow netdevices to specify needed head/tailroom") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 4663ff60257aec4ee1e2e969a7c046f0aff35ab8 Author: Ivan Khoronzhuk Date: Fri Sep 25 15:44:39 2020 +0300 net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop To start also "phy state machine", with UP state as it should be, the phy_start() has to be used, in another case machine even is not triggered. After this change negotiation is supposed to be triggered by SM workqueue. It's not correct usage, but it appears after the following patch, so add it as a fix. Fixes: 74a992b3598a ("net: phy: add phy_check_link_status") Signed-off-by: Ivan Khoronzhuk Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ac322f86b56cb99d1c4224c209095aa67647c967 Author: Wong Vee Khee Date: Fri Sep 25 17:54:06 2020 +0800 net: stmmac: Fix clock handling on remove path While unloading the dwmac-intel driver, clk_disable_unprepare() is being called twice in stmmac_dvr_remove() and intel_eth_pci_remove(). This causes kernel panic on the second call. Removing the second call of clk_disable_unprepare() in intel_eth_pci_remove(). Fixes: 09f012e64e4b ("stmmac: intel: Fix clock handling on error and remove paths") Cc: Andy Shevchenko Reviewed-by: Voon Weifeng Signed-off-by: Wong Vee Khee Reviewed-by: Andy Shevchenko Signed-off-by: David S. Miller commit 1dac3b1bc66dc68dbb0c9f43adac71a7d0a0331a Author: Ronak Doshi Date: Thu Sep 24 23:11:29 2020 -0700 vmxnet3: fix cksum offload issues for non-udp tunnels Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") added support for encapsulation offload. However, the inner offload capability is to be restrictued to UDP tunnels. This patch fixes the issue for non-udp tunnels by adding features check capability and filtering appropriate features for non-udp tunnels. Fixes: dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") Signed-off-by: Ronak Doshi Signed-off-by: David S. Miller commit abe2f12d9453b544cb76ebb70904de9d32e03284 Merge: 4e1b469ab0c2c f6a07271bb153 Author: David S. Miller Date: Fri Sep 25 16:24:20 2020 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2020-09-25 This series contains updates to the iavf and ice driver. Sylwester fixes a crash with iavf resume due to getting the wrong pointers. Ani fixes a call trace in ice resume by calling pci_save_state(). Jakes fixes memory leaks in case of register_netdev() failure or ice_cfg_vsi_lan() failure for the ice driver. v2: Rebased; no other changes ==================== Signed-off-by: David S. Miller commit b463b6f69974867b3b5885de2f488d72e979a751 Merge: 782d1222555c4 be090fa62080d Author: Linus Torvalds Date: Fri Sep 25 15:24:04 2020 -0700 Merge tag 'mips_fixes_5.9_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fixed FP register access on Loongsoon-3 - added missing 1074 cpu handling - fixed Loongson2ef build error * tag 'mips_fixes_5.9_3' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: BCM47XX: Remove the needless check with the 1074K MIPS: Add the missing 'CPU_1074K' into __get_cpu_type() MIPS: Loongson2ef: Disable Loongson MMI instructions MIPS: Loongson-3: Fix fp register access if MSA enabled commit 782d1222555c42187af94b5cb65c68034f473fb2 Merge: 814324b593814 00fb259c618ea Author: Linus Torvalds Date: Fri Sep 25 15:21:54 2020 -0700 Merge tag 'spi-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small collection of driver specific fixes, the fsl-espi and bcm-qspi changes in particular have been causing breakage for users" * tag 'spi-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: bcm-qspi: Fix probe regression on iProc platforms spi: fsl-dspi: fix use-after-free in remove path spi: fsl-espi: Only process interrupts for expected events spi: bcm2835: Make polling_limit_us static spi: spi-fsl-dspi: use XSPI mode instead of DMA for DPAA2 SoCs commit 814324b5938147b659706d859a12db4bd77f0136 Merge: 9a3a0876b9c40 fbb5a79d2fe7b Author: Linus Torvalds Date: Fri Sep 25 15:16:01 2020 -0700 Merge tag 'regulator-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "A single fix for incorrect specification of some of the register fields on axp20x devices which would break voltage setting on affected systems" * tag 'regulator-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: axp20x: fix LDO2/4 description commit 9a3a0876b9c40b1471329e484f503e6f8ca3e56f Merge: 6d28cf7dfede6 05669b6317077 Author: Linus Torvalds Date: Fri Sep 25 15:11:24 2020 -0700 Merge tag 'regmap-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap fixes from Mark Brown: "Two issues here - one is a fix for use after free issues in the case where a regmap overrides its name using something dynamically generated, the other is that we weren't handling access checks non-incrementing I/O on registers within paged register regions correctly resulting in spurious errors. Both of these are quite rare but serious if they occur" * tag 'regmap-fix-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: fix page selection for noinc writes regmap: fix page selection for noinc reads regmap: debugfs: Add back in erroneously removed initialisation of ret regmap: debugfs: Fix handling of name string for debugfs init delays commit f38c7e3abfba9a9e180b34f642254c43782e7ffe Author: Jens Axboe Date: Fri Sep 25 15:23:43 2020 -0600 io_uring: ensure async buffered read-retry is setup properly A previous commit for fixing up short reads botched the async retry path, so we ended up going to worker threads more often than we should. Fix this up, so retries work the way they originally were intended to. Fixes: 227c0c9673d8 ("io_uring: internally retry short reads") Reported-by: Hao_Xu Signed-off-by: Jens Axboe commit 4e1b469ab0c2c6e6611a0af9f88c7745250dbf64 Merge: ad2b9b0f8d010 efb1676306f66 Author: David S. Miller Date: Fri Sep 25 13:14:15 2020 -0700 Merge tag 'wireless-drivers-2020-09-25' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.9 Second, and last, set of fixes for v5.9. Only one important regression fix for mt76. mt76 * fix a regression in aggregation which appeared after mac80211 changes ==================== Signed-off-by: David S. Miller commit 6d28cf7dfede6cfca5119a0d415a6a447c68f3a0 Merge: 15083aa02561f 13a9a9d74d4d9 Author: Linus Torvalds Date: Fri Sep 25 10:46:11 2020 -0700 Merge tag 'nfsd-5.9-2' of git://git.linux-nfs.org/projects/cel/cel-2.6 Pull NFS server fix from Chuck Lever: "Fix incorrect calculation on platforms that implement flush_dcache_page()" * tag 'nfsd-5.9-2' of git://git.linux-nfs.org/projects/cel/cel-2.6: SUNRPC: Fix svc_flush_dcache() commit 15083aa02561f6f208a253132c9d3b72af8c2b40 Merge: 33d04c66f5799 6040723009060 Author: Linus Torvalds Date: Fri Sep 25 10:39:22 2020 -0700 Merge tag 'pm-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix more fallout of recent RCU-lockdep changes in CPU idle code and two devfreq issues. Specifics: - Export rcu_idle_{enter,exit} to modules to fix build issues introduced by recent RCU-lockdep fixes (Borislav Petkov) - Add missing return statement to a stub function in the ACPI processor driver to fix a build issue introduced by recent RCU-lockdep fixes (Rafael Wysocki) - Fix recently introduced suspicious RCU usage warnings in the PSCI cpuidle driver and drop stale comments regarding RCU_NONIDLE() usage from enter_s2idle_proper() (Ulf Hansson) - Fix error code path in the tegra30 devfreq driver (Dan Carpenter) - Add missing information to devfreq_summary debugfs (Chanwoo Choi)" * tag 'pm-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: processor: Fix build for ARCH_APICTIMER_STOPS_ON_C3 unset PM / devfreq: tegra30: Disable clock on error in probe PM / devfreq: Add timer type to devfreq_summary debugfs cpuidle: Drop misleading comments about RCU usage cpuidle: psci: Fix suspicious RCU usage rcu/tree: Export rcu_idle_{enter,exit} to modules commit 4bb05f30483fd21ea5413eaf1182768f251cf625 Author: Tom Lendacky Date: Thu Sep 24 13:41:57 2020 -0500 KVM: SVM: Add a dedicated INVD intercept routine The INVD instruction intercept performs emulation. Emulation can't be done on an SEV guest because the guest memory is encrypted. Provide a dedicated intercept routine for the INVD intercept. And since the instruction is emulated as a NOP, just skip it instead. Fixes: 1654efcbc431 ("KVM: SVM: Add KVM_SEV_INIT command") Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 33d04c66f5799befa7c0c618be387541d0c311a3 Merge: 574ec42e1a9c4 4aa1615268a8a Author: Linus Torvalds Date: Fri Sep 25 09:49:19 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fix from Jason Gunthorpe: "One fix for a bug that blktests hits when using rxe: tear down the CQ pool before waiting for all references to go away" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/core: Fix ordering of CQ pool destruction commit 574ec42e1a9c4bfb8b2eef8d801a77e92bcea76a Merge: 171d4ff79f965 ba78755e0c25d Author: Linus Torvalds Date: Fri Sep 25 09:41:57 2020 -0700 Merge tag 'drm-fixes-2020-09-25' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Fairly quiet, a couple of i915 fixes, one dma-buf fix, one vc4 and two sun4i changes dma-buf: - Single null pointer deref fix i915: - Fix selftest reference to stack data out of scope - Fix GVT null pointer dereference vc4: - fill asoc card owner sun4i: - program secondary CSC correctly" * tag 'drm-fixes-2020-09-25' of git://anongit.freedesktop.org/drm/drm: drm/i915/selftests: Push the fake iommu device from the stack to data dmabuf: fix NULL pointer dereference in dma_buf_release() drm/i915/gvt: Fix port number for BDW on EDID region setup drm/sun4i: mixer: Extend regmap max_register drm/sun4i: sun8i-csc: Secondary CSC register correction drm/vc4/vc4_hdmi: fill ASoC card owner commit 6040723009060ed356dc93dd9a27e80b2206e59b Merge: 1b0e6e2675d1c 955921289dcdb Author: Rafael J. Wysocki Date: Fri Sep 25 18:33:46 2020 +0200 Merge branch 'pm-cpuidle' * pm-cpuidle: ACPI: processor: Fix build for ARCH_APICTIMER_STOPS_ON_C3 unset cpuidle: Drop misleading comments about RCU usage cpuidle: psci: Fix suspicious RCU usage rcu/tree: Export rcu_idle_{enter,exit} to modules commit 62c774ed483174b994c79e0c9f596b315f1ddfaf Author: Jens Axboe Date: Fri Sep 25 09:01:53 2020 -0600 io_uring: don't unconditionally set plug->nowait = true This causes all the bios to be submitted with REQ_NOWAIT, which can be problematic on either btrfs or on file systems that otherwise use a mix of block devices where only some of them support it. For now, just remove the setting of plug->nowait = true. Reported-by: Dan Melnic Reported-by: Brian Foster Fixes: b63534c41e20 ("io_uring: re-issue block requests that failed because of resources") Signed-off-by: Jens Axboe commit 3fce39601a1a34d940cf62858ee01ed9dac5d459 Author: M. Vefa Bicakci Date: Tue Sep 22 14:07:03 2020 +0300 usbcore/driver: Accommodate usbip Commit 88b7381a939d ("USB: Select better matching USB drivers when available") inadvertently broke usbip functionality. The commit in question allows USB device drivers to be explicitly matched with USB devices via the use of driver-provided identifier tables and match functions, which is useful for a specialised device driver to be chosen for a device that can also be handled by another, more generic, device driver. Prior, the USB device section of usb_device_match() had an unconditional "return 1" statement, which allowed user-space to bind USB devices to the usbip_host device driver, if desired. However, the aforementioned commit changed the default/fallback return value to zero. This breaks device drivers such as usbip_host, so this commit restores the legacy behaviour, but only if a device driver does not have an id_table and a match() function. In addition, if usb_device_match is called for a device driver and device pair where the device does not match the id_table of the device driver in question, then the device driver will be disqualified for the device. This allows avoiding the default case of "return 1", which prevents undesirable probe() calls to a driver even though its id_table did not match the device. Finally, this commit changes the specialised-driver-to-generic-driver transition code so that when a device driver returns -ENODEV, a more generic device driver is only considered if the current device driver does not have an id_table and a match() function. This ensures that "generic" drivers such as usbip_host will not be considered specialised device drivers and will not cause the device to be locked in to the generic device driver, when a more specialised device driver could be tried. All of these changes restore usbip functionality without regressions, ensure that the specialised/generic device driver selection logic works as expected with the usb and apple-mfi-fastcharge drivers, and do not negatively affect the use of devices provided by dummy_hcd. Fixes: 88b7381a939d ("USB: Select better matching USB drivers when available") Cc: # 5.8 Cc: Bastien Nocera Cc: Valentina Manea Cc: Shuah Khan Cc: Greg Kroah-Hartman Cc: Alan Stern Cc: Tested-by: Andrey Konovalov Acked-by: Shuah Khan Signed-off-by: M. Vefa Bicakci Link: https://lore.kernel.org/r/20200922110703.720960-5-m.v.b@runbox.com Signed-off-by: Greg Kroah-Hartman commit 4df30e7603432704380b12fe40a604ee7f66746d Author: M. Vefa Bicakci Date: Tue Sep 22 14:07:02 2020 +0300 usbcore/driver: Fix incorrect downcast This commit resolves a minor bug in the selection/discovery of more specific USB device drivers for devices that are currently bound to generic USB device drivers. The bug is related to the way a candidate USB device driver is compared against the generic USB device driver. The code in is_dev_usb_generic_driver() assumes that the device driver in question is a USB device driver by calling to_usb_device_driver(dev->driver) to downcast; however I have observed that this assumption is not always true, through code instrumentation. This commit avoids the incorrect downcast altogether by comparing the USB device's driver (i.e., dev->driver) to the generic USB device driver directly. This method was suggested by Alan Stern. This bug was found while investigating Andrey Konovalov's report indicating usbip device driver misbehaviour with the recently merged generic USB device driver selection feature. The report is linked below. Fixes: d5643d2249b2 ("USB: Fix device driver race") Cc: # 5.8 Cc: Greg Kroah-Hartman Cc: Alan Stern Cc: Bastien Nocera Cc: Shuah Khan Cc: Valentina Manea Cc: Tested-by: Andrey Konovalov Signed-off-by: M. Vefa Bicakci Link: https://lore.kernel.org/r/20200922110703.720960-4-m.v.b@runbox.com Signed-off-by: Greg Kroah-Hartman commit aea850cd35ae3d266fe6f93fb9edb25e4a555230 Author: M. Vefa Bicakci Date: Tue Sep 22 14:07:01 2020 +0300 usbcore/driver: Fix specific driver selection This commit resolves a bug in the selection/discovery of more specific USB device drivers for devices that are currently bound to generic USB device drivers. The bug is in the logic that determines whether a device currently bound to a generic USB device driver should be re-probed by a more specific USB device driver or not. The code in __usb_bus_reprobe_drivers() used to have the following lines: if (usb_device_match_id(udev, new_udriver->id_table) == NULL && (!new_udriver->match || new_udriver->match(udev) != 0)) return 0; ret = device_reprobe(dev); As the reader will notice, the code checks whether the USB device in consideration matches the identifier table (id_table) of a specific USB device_driver (new_udriver), followed by a similar check, but this time with the USB device driver's match function. However, the match function's return value is not checked correctly. When match() returns zero, it means that the specific USB device driver is *not* applicable to the USB device in question, but the code then goes on to reprobe the device with the new USB device driver under consideration. All this to say, the logic is inverted. This bug was found by code inspection and instrumentation while investigating the root cause of the issue reported by Andrey Konovalov, where usbip took over syzkaller's virtual USB devices in an undesired manner. The report is linked below. Fixes: d5643d2249b2 ("USB: Fix device driver race") Cc: # 5.8 Cc: Greg Kroah-Hartman Cc: Alan Stern Cc: Bastien Nocera Cc: Shuah Khan Cc: Valentina Manea Cc: Tested-by: Andrey Konovalov Signed-off-by: M. Vefa Bicakci Link: https://lore.kernel.org/r/20200922110703.720960-3-m.v.b@runbox.com Signed-off-by: Greg Kroah-Hartman commit d6407613c1e2ef90213dee388aa16b6e1bd08cbc Author: M. Vefa Bicakci Date: Tue Sep 22 14:07:00 2020 +0300 Revert "usbip: Implement a match function to fix usbip" This commit reverts commit 7a2f2974f265 ("usbip: Implement a match function to fix usbip"). In summary, commit d5643d2249b2 ("USB: Fix device driver race") inadvertently broke usbip functionality, which I resolved in an incorrect manner by introducing a match function to usbip, usbip_match(), that unconditionally returns true. However, the usbip_match function, as is, causes usbip to take over virtual devices used by syzkaller for USB fuzzing, which is a regression reported by Andrey Konovalov. Furthermore, in conjunction with the fix of another bug, handled by another patch titled "usbcore/driver: Fix specific driver selection" in this patch set, the usbip_match function causes unexpected USB subsystem behaviour when the usbip_host driver is loaded. The unexpected behaviour can be qualified as follows: - If commit 41160802ab8e ("USB: Simplify USB ID table match") is included in the kernel, then all USB devices are bound to the usbip_host driver, which appears to the user as if all USB devices were disconnected. - If the same commit (41160802ab8e) is not in the kernel (as is the case with v5.8.10) then all USB devices are re-probed and re-bound to their original device drivers, which appears to the user as a disconnection and re-connection of USB devices. Please note that this commit will make usbip non-operational again, until yet another patch in this patch set is merged, titled "usbcore/driver: Accommodate usbip". Cc: # 5.8: 41160802ab8e: USB: Simplify USB ID table match Cc: # 5.8 Cc: Bastien Nocera Cc: Valentina Manea Cc: Shuah Khan Cc: Greg Kroah-Hartman Cc: Alan Stern Cc: Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Acked-by: Shuah Khan Signed-off-by: M. Vefa Bicakci Link: https://lore.kernel.org/r/20200922110703.720960-2-m.v.b@runbox.com Signed-off-by: Greg Kroah-Hartman commit 313b085851c13ca08320372a05a7047ea25d3dd4 Author: Josef Bacik Date: Thu Aug 20 11:18:26 2020 -0400 btrfs: move btrfs_scratch_superblocks into btrfs_dev_replace_finishing We need to move the closing of the src_device out of all the device replace locking, but we definitely want to zero out the superblock before we commit the last time to make sure the device is properly removed. Handle this by pushing btrfs_scratch_superblocks into btrfs_dev_replace_finishing, and then later on we'll move the src_device closing and freeing stuff where we need it to be. Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit f6a07271bb1535d9549380461437cc48d9e19958 Author: Jacob Keller Date: Wed Sep 2 08:53:47 2020 -0700 ice: fix memory leak in ice_vsi_setup During ice_vsi_setup, if ice_cfg_vsi_lan fails, it does not properly release memory associated with the VSI rings. If we had used devres allocations for the rings, this would be ok. However, we use kzalloc and kfree_rcu for these ring structures. Using the correct label to cleanup the rings during ice_vsi_setup highlights an issue in the ice_vsi_clear_rings function: it can leave behind stale ring pointers in the q_vectors structure. When releasing rings, we must also ensure that no q_vector associated with the VSI will point to this ring again. To resolve this, loop over all q_vectors and release their ring mapping. Because we are about to free all rings, no q_vector should remain pointing to any of the rings in this VSI. Fixes: 5513b920a4f7 ("ice: Update Tx scheduler tree for VSI multi-Tx queue support") Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 135f4b9e9340dadb78e9737bb4eb9817b9c89dac Author: Jacob Keller Date: Wed Sep 2 08:53:46 2020 -0700 ice: fix memory leak if register_netdev_fails The ice_setup_pf_sw function can cause a memory leak if register_netdev fails, due to accidentally failing to free the VSI rings. Fix the memory leak by using ice_vsi_release, ensuring we actually go through the full teardown process. This should be safe even if the netdevice is not registered because we will have set the netdev pointer to NULL, ensuring ice_vsi_release won't call unregister_netdev. An alternative fix would be moving management of the PF VSI netdev into the main VSI setup code. This is complicated and likely requires significant refactor in how we manage VSIs Fixes: 3a858ba392c3 ("ice: Add support for VSI allocation and deallocation") Signed-off-by: Jacob Keller Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 466e4392920083c58c7ee8905795453d62c4add7 Author: Anirudh Venkataramanan Date: Wed Sep 2 08:53:45 2020 -0700 ice: Fix call trace on suspend It appears that the ice_suspend flow is missing a call to pci_save_state and this is triggering the message "State of device not saved by ice_suspend" and a call trace. Fix it. Fixes: 769c500dcc1e ("ice: Add advanced power mgmt for WoL") Signed-off-by: Anirudh Venkataramanan Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 75598a8fc0e0dff2aa5d46c62531b36a595f1d4f Author: Sylwester Dziedziuch Date: Wed Sep 2 12:54:59 2020 +0000 iavf: Fix incorrect adapter get in iavf_resume When calling iavf_resume there was a crash because wrong function was used to get iavf_adapter and net_device pointers. Changed how iavf_resume is getting iavf_adapter and net_device pointers from pci_dev. Fixes: 5eae00c57f5e ("i40evf: main driver core") Signed-off-by: Sylwester Dziedziuch Reviewed-by: Aleksandr Loktionov Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 1b0e6e2675d1c7ee32c071337184f6f4d001f7cb Merge: ba4f184e126b7 6bf560766a8ef Author: Rafael J. Wysocki Date: Fri Sep 25 16:33:19 2020 +0200 Merge tag 'devfreq-fixes-for-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for 5.9-rc7 from Chanwoo Choi: "1. Update devfreq core - Add missing timer type to devfreq_summary debugfs node. 2. Fix devfreq device driver - Fix the exception handling about clock on tegra30-devfreq.c" * tag 'devfreq-fixes-for-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: tegra30: Disable clock on error in probe PM / devfreq: Add timer type to devfreq_summary debugfs commit 3aab91774bbd8e571cfaddaf839aafd07718333c Author: Jeffle Xu Date: Fri Sep 25 14:00:31 2020 +0800 block: remove unused BLK_QC_T_EAGAIN flag commit 7b6620d7db56 ("block: remove REQ_NOWAIT_INLINE") removed the REQ_NOWAIT_INLINE related code, but the diff wasn't applied to blk_types.h somehow. Then commit 2771cefeac49 ("block: remove the REQ_NOWAIT_INLINE flag") removed the REQ_NOWAIT_INLINE flag while the BLK_QC_T_EAGAIN flag still remains. Fixes: 7b6620d7db56 ("block: remove REQ_NOWAIT_INLINE") Signed-off-by: Jeffle Xu Signed-off-by: Jens Axboe commit f3cd4850504ff612d0ea77a0aaf29b66c98fcefe Author: Jens Axboe Date: Thu Sep 24 14:55:54 2020 -0600 io_uring: ensure open/openat2 name is cleaned on cancelation If we cancel these requests, we'll leak the memory associated with the filename. Add them to the table of ops that need cleaning, if REQ_F_NEED_CLEANUP is set. Cc: stable@vger.kernel.org Fixes: e62753e4e292 ("io_uring: call statx directly") Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe commit 8d214c481611b29458a57913bd786f0ac06f0605 Author: Sean Christopherson Date: Wed Sep 23 14:53:52 2020 -0700 KVM: x86: Reset MMU context if guest toggles CR4.SMAP or CR4.PKE Reset the MMU context during kvm_set_cr4() if SMAP or PKE is toggled. Recent commits to (correctly) not reload PDPTRs when SMAP/PKE are toggled inadvertantly skipped the MMU context reset due to the mask of bits that triggers PDPTR loads also being used to trigger MMU context resets. Fixes: 427890aff855 ("kvm: x86: Toggling CR4.SMAP does not load PDPTEs in PAE mode") Fixes: cb957adb4ea4 ("kvm: x86: Toggling CR4.PKE does not load PDPTEs in PAE mode") Cc: Jim Mattson Cc: Peter Shier Cc: Oliver Upton Signed-off-by: Sean Christopherson Message-Id: <20200923215352.17756-1-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 5af08640795b2b9a940c9266c0260455377ae262 Author: Peilin Ye Date: Thu Sep 24 09:43:48 2020 -0400 fbcon: Fix global-out-of-bounds read in fbcon_get_font() fbcon_get_font() is reading out-of-bounds. A malicious user may resize `vc->vc_font.height` to a large value, causing fbcon_get_font() to read out of `fontdata`. fbcon_get_font() handles both built-in and user-provided fonts. Fortunately, recently we have added FONT_EXTRA_WORDS support for built-in fonts, so fix it by adding range checks using FNTSIZE(). This patch depends on patch "fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h", and patch "Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts". Cc: stable@vger.kernel.org Reported-and-tested-by: syzbot+29d4ed7f3bdedf2aa2fd@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=08b8be45afea11888776f897895aef9ad1c3ecfd Signed-off-by: Peilin Ye Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/b34544687a1a09d6de630659eb7a773f4953238b.1600953813.git.yepeilin.cs@gmail.com commit 6735b4632def0640dbdf4eb9f99816aca18c4f16 Author: Peilin Ye Date: Thu Sep 24 09:42:22 2020 -0400 Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts syzbot has reported an issue in the framebuffer layer, where a malicious user may overflow our built-in font data buffers. In order to perform a reliable range check, subsystems need to know `FONTDATAMAX` for each built-in font. Unfortunately, our font descriptor, `struct console_font` does not contain `FONTDATAMAX`, and is part of the UAPI, making it infeasible to modify it. For user-provided fonts, the framebuffer layer resolves this issue by reserving four extra words at the beginning of data buffers. Later, whenever a function needs to access them, it simply uses the following macros: Recently we have gathered all the above macros to . Let us do the same thing for built-in fonts, prepend four extra words (including `FONTDATAMAX`) to their data buffers, so that subsystems can use these macros for all fonts, no matter built-in or user-provided. This patch depends on patch "fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h". Cc: stable@vger.kernel.org Link: https://syzkaller.appspot.com/bug?id=08b8be45afea11888776f897895aef9ad1c3ecfd Signed-off-by: Peilin Ye Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/ef18af00c35fb3cc826048a5f70924ed6ddce95b.1600953813.git.yepeilin.cs@gmail.com commit bb0890b4cd7f8203e3aa99c6d0f062d6acdaad27 Author: Peilin Ye Date: Thu Sep 24 09:40:53 2020 -0400 fbdev, newport_con: Move FONT_EXTRA_WORDS macros into linux/font.h drivers/video/console/newport_con.c is borrowing FONT_EXTRA_WORDS macros from drivers/video/fbdev/core/fbcon.h. To keep things simple, move all definitions into . Since newport_con now uses four extra words, initialize the fourth word in newport_set_font() properly. Cc: stable@vger.kernel.org Signed-off-by: Peilin Ye Reviewed-by: Greg Kroah-Hartman Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/7fb8bc9b0abc676ada6b7ac0e0bd443499357267.1600953813.git.yepeilin.cs@gmail.com commit e94ee171349db84c7cfdc5fefbebe414054d0924 Author: Herbert Xu Date: Fri Sep 25 14:42:56 2020 +1000 xfrm: Use correct address family in xfrm_state_find The struct flowi must never be interpreted by itself as its size depends on the address family. Therefore it must always be grouped with its original family value. In this particular instance, the original family value is lost in the function xfrm_state_find. Therefore we get a bogus read when it's coupled with the wrong family which would occur with inter- family xfrm states. This patch fixes it by keeping the original family value. Note that the same bug could potentially occur in LSM through the xfrm_state_pol_flow_match hook. I checked the current code there and it seems to be safe for now as only secid is used which is part of struct flowi_common. But that API should be changed so that so that we don't get new bugs in the future. We could do that by replacing fl with just secid or adding a family field. Reported-by: syzbot+577fbac3145a6eb2e7a5@syzkaller.appspotmail.com Fixes: 48b8d78315bf ("[XFRM]: State selection update to use inner...") Signed-off-by: Herbert Xu Signed-off-by: Steffen Klassert commit ad2b9b0f8d0107602bdc1f3b1ab90719842ace11 Author: Priyaranjan Jha Date: Thu Sep 24 15:23:14 2020 -0700 tcp: skip DSACKs with dubious sequence ranges Currently, we use length of DSACKed range to compute number of delivered packets. And if sequence range in DSACK is corrupted, we can get bogus dsacked/acked count, and bogus cwnd. This patch put bounds on DSACKed range to skip update of data delivery and spurious retransmission information, if the DSACK is unlikely caused by sender's action: - DSACKed range shouldn't be greater than maximum advertised rwnd. - Total no. of DSACKed segments shouldn't be greater than total no. of retransmitted segs. Unlike spurious retransmits, network duplicates or corrupted DSACKs shouldn't be counted as delivery. Signed-off-by: Priyaranjan Jha Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 1ec8e74855588cecb2620b28b877c08f45765374 Author: Jamie Iles Date: Thu Sep 24 15:56:45 2020 +0100 net/fsl: quieten expected MDIO access failures MDIO reads can happen during PHY probing, and printing an error with dev_err can result in a large number of error messages during device probe. On a platform with a serial console this can result in excessively long boot times in a way that looks like an infinite loop when multiple busses are present. Since 0f183fd151c (net/fsl: enable extended scanning in xgmac_mdio) we perform more scanning so there are potentially more failures. Reduce the logging level to dev_dbg which is consistent with the Freescale enetc driver. Cc: Jeremy Linton Signed-off-by: Jamie Iles Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 912aae27c6af6605eae967ab540c5e26bd76d421 Author: Helmut Grohne Date: Thu Sep 24 10:37:47 2020 +0200 net: dsa: microchip: really look for phy-mode in port nodes The previous implementation failed to account for the "ports" node. The actual port nodes are not child nodes of the switch node, but a "ports" node sits in between. Fixes: edecfa98f602 ("net: dsa: microchip: look for phy-mode in port nodes") Signed-off-by: Helmut Grohne Signed-off-by: David S. Miller commit 38f7e1c0c43dd25b06513137bb6fd35476f9ec6d Author: Rohit Maheshwari Date: Thu Sep 24 12:28:45 2020 +0530 net/tls: race causes kernel panic BUG: kernel NULL pointer dereference, address: 00000000000000b8 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 80000008b6fef067 P4D 80000008b6fef067 PUD 8b6fe6067 PMD 0 Oops: 0000 [#1] SMP PTI CPU: 12 PID: 23871 Comm: kworker/12:80 Kdump: loaded Tainted: G S 5.9.0-rc3+ #1 Hardware name: Supermicro X10SRA-F/X10SRA-F, BIOS 2.1 03/29/2018 Workqueue: events tx_work_handler [tls] RIP: 0010:tx_work_handler+0x1b/0x70 [tls] Code: dc fe ff ff e8 16 d4 a3 f6 66 0f 1f 44 00 00 0f 1f 44 00 00 55 53 48 8b 6f 58 48 8b bd a0 04 00 00 48 85 ff 74 1c 48 8b 47 28 <48> 8b 90 b8 00 00 00 83 e2 02 75 0c f0 48 0f ba b0 b8 00 00 00 00 RSP: 0018:ffffa44ace61fe88 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff91da9e45cc30 RCX: dead000000000122 RDX: 0000000000000001 RSI: ffff91da9e45cc38 RDI: ffff91d95efac200 RBP: ffff91da133fd780 R08: 0000000000000000 R09: 000073746e657665 R10: 8080808080808080 R11: 0000000000000000 R12: ffff91dad7d30700 R13: ffff91dab6561080 R14: 0ffff91dad7d3070 R15: ffff91da9e45cc38 FS: 0000000000000000(0000) GS:ffff91dad7d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000b8 CR3: 0000000906478003 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: process_one_work+0x1a7/0x370 worker_thread+0x30/0x370 ? process_one_work+0x370/0x370 kthread+0x114/0x130 ? kthread_park+0x80/0x80 ret_from_fork+0x22/0x30 tls_sw_release_resources_tx() waits for encrypt_pending, which can have race, so we need similar changes as in commit 0cada33241d9de205522e3858b18e506ca5cce2c here as well. Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance") Signed-off-by: Rohit Maheshwari Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 0eb11dfe224f9bf0f7d66a68500a43a9b9c83b02 Author: Wang Qing Date: Thu Sep 24 14:50:24 2020 +0800 net/ethernet/broadcom: fix spelling typo Modify the comment typo: "compliment" -> "complement". Signed-off-by: Wang Qing Signed-off-by: David S. Miller commit 4ab810a4e04ab6c851007033d39c13e6d3f55110 Author: Xiaoliang Yang Date: Thu Sep 24 10:11:13 2020 +0800 net: mscc: ocelot: fix fields offset in SG_CONFIG_REG_3 INIT_IPS and GATE_ENABLE fields have a wrong offset in SG_CONFIG_REG_3. This register is used by stream gate control of PSFP, and it has not been used before, because PSFP is not implemented in ocelot driver. Signed-off-by: Xiaoliang Yang Signed-off-by: David S. Miller commit dba1e4660a87927bdc03c23e36fd2c81a16a7ab1 Author: Xiaoliang Yang Date: Thu Sep 24 09:57:46 2020 +0800 net: dsa: felix: convert TAS link speed based on phylink speed state->speed holds a value of 10, 100, 1000 or 2500, but QSYS_TAG_CONFIG_LINK_SPEED expects a value of 0, 1, 2, 3. So convert the speed to a proper value. Fixes: de143c0e274b ("net: dsa: felix: Configure Time-Aware Scheduler via taprio offload") Signed-off-by: Xiaoliang Yang Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit f68910a8056f9451ee9fe7e1b962f7d90d326ad3 Author: Luo bin Date: Thu Sep 24 09:31:51 2020 +0800 hinic: fix wrong return value of mac-set cmd It should also be regarded as an error when hw return status=4 for PF's setting mac cmd. Only if PF return status=4 to VF should this cmd be taken special treatment. Fixes: 7dd29ee12865 ("hinic: add sriov feature support") Signed-off-by: Luo bin Signed-off-by: David S. Miller commit ed46cd1d4cc4b2cf05f31fe25fc68d1a9d3589ba Author: Xie He Date: Wed Sep 23 11:18:18 2020 -0700 drivers/net/wan/x25_asy: Correct the ndo_open and ndo_stop functions 1. Move the lapb_register/lapb_unregister calls into the ndo_open/ndo_stop functions. This makes the LAPB protocol start/stop when the network interface starts/stops. When the network interface is down, the LAPB protocol shouldn't be running and the LAPB module shoudn't be generating control frames. 2. Move netif_start_queue/netif_stop_queue into the ndo_open/ndo_stop functions. This makes the TX queue start/stop when the network interface starts/stops. (netif_stop_queue was originally in the ndo_stop function. But to make the code look better, I created a new function to use as ndo_stop, and made it call the original ndo_stop function. I moved netif_stop_queue from the original ndo_stop function to the new ndo_stop function.) Cc: Martin Schiller Signed-off-by: Xie He Signed-off-by: David S. Miller commit 02a1b175b0e92d9e0fa5df3957ade8d733ceb6a0 Author: Maciej Żenczykowski Date: Wed Sep 23 13:18:15 2020 -0700 net/ipv4: always honour route mtu during forwarding Documentation/networking/ip-sysctl.txt:46 says: ip_forward_use_pmtu - BOOLEAN By default we don't trust protocol path MTUs while forwarding because they could be easily forged and can lead to unwanted fragmentation by the router. You only need to enable this if you have user-space software which tries to discover path mtus by itself and depends on the kernel honoring this information. This is normally not the case. Default: 0 (disabled) Possible values: 0 - disabled 1 - enabled Which makes it pretty clear that setting it to 1 is a potential security/safety/DoS issue, and yet it is entirely reasonable to want forwarded traffic to honour explicitly administrator configured route mtus (instead of defaulting to device mtu). Indeed, I can't think of a single reason why you wouldn't want to. Since you configured a route mtu you probably know better... It is pretty common to have a higher device mtu to allow receiving large (jumbo) frames, while having some routes via that interface (potentially including the default route to the internet) specify a lower mtu. Note that ipv6 forwarding uses device mtu unless the route is locked (in which case it will use the route mtu). This approach is not usable for IPv4 where an 'mtu lock' on a route also has the side effect of disabling TCP path mtu discovery via disabling the IPv4 DF (don't frag) bit on all outgoing frames. I'm not aware of a way to lock a route from an IPv6 RA, so that also potentially seems wrong. Signed-off-by: Maciej Żenczykowski Cc: Eric Dumazet Cc: Willem de Bruijn Cc: Lorenzo Colitti Cc: Sunmeet Gill (Sunny) Cc: Vinay Paradkar Cc: Tyler Wear Cc: David Ahern Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 6d8899962afdf789f6ec8407ffdf3130724a7005 Merge: 7241c5a697479 0fedc63fadf04 Author: David S. Miller Date: Thu Sep 24 19:46:21 2020 -0700 Merge branch 'net_sched-fix-a-UAF-in-tcf_action_init' Cong Wang says: ==================== net_sched: fix a UAF in tcf_action_init() This patchset fixes a use-after-free triggered by syzbot. Please find more details in each patch description. ==================== Signed-off-by: David S. Miller commit 0fedc63fadf0404a729e73a35349481c8009c02f Author: Cong Wang Date: Tue Sep 22 20:56:24 2020 -0700 net_sched: commit action insertions together syzbot is able to trigger a failure case inside the loop in tcf_action_init(), and when this happens we clean up with tcf_action_destroy(). But, as these actions are already inserted into the global IDR, other parallel process could free them before tcf_action_destroy(), then we will trigger a use-after-free. Fix this by deferring the insertions even later, after the loop, and committing all the insertions in a separate loop, so we will never fail in the middle of the insertions any more. One side effect is that the window between alloction and final insertion becomes larger, now it is more likely that the loop in tcf_del_walker() sees the placeholder -EBUSY pointer. So we have to check for error pointer in tcf_del_walker(). Reported-and-tested-by: syzbot+2287853d392e4b42374a@syzkaller.appspotmail.com Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action") Cc: Vlad Buslov Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit e49d8c22f1261c43a986a7fdbf677ac309682a07 Author: Cong Wang Date: Tue Sep 22 20:56:23 2020 -0700 net_sched: defer tcf_idr_insert() in tcf_action_init_1() All TC actions call tcf_idr_insert() for new action at the end of their ->init(), so we can actually move it to a central place in tcf_action_init_1(). And once the action is inserted into the global IDR, other parallel process could free it immediately as its refcnt is still 1, so we can not fail after this, we need to move it after the goto action validation to avoid handling the failure case after insertion. This is found during code review, is not directly triggered by syzbot. And this prepares for the next patch. Cc: Vlad Buslov Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit ba78755e0c25dec4151880a14f523e929b2052c6 Merge: f3231a02aabec 19a508bd1ad8e Author: Dave Airlie Date: Fri Sep 25 11:28:36 2020 +1000 Merge tag 'drm-misc-fixes-2020-09-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.9: - Single null pointer deref fix for dma-buf. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/4106c21e-f52c-4c05-6cdb-daa743bb8617@linux.intel.com commit f3231a02aabeccb09348b955423a99d7919566db Merge: 720777c5be95a 16cce04cdb200 Author: Dave Airlie Date: Fri Sep 25 11:07:01 2020 +1000 Merge tag 'drm-intel-fixes-2020-09-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.9-rc7: - Fix selftest reference to stack data out of scope - Fix GVT null pointer dereference - Backmerge from Linus' master to fix build Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87zh5fpmha.fsf@intel.com commit 720777c5be95a9e51288c8157b561febf9052e55 Merge: 3de5f98dafbb0 98477740630f2 Author: Dave Airlie Date: Fri Sep 25 11:06:18 2020 +1000 BackMerge commit '98477740630f270aecf648f1d6a9dbc6027d4ff1' into drm-fixes The dax mess had some fallout, and i915 used a later base to fix their CI. Signed-off-by: Dave Airlie commit 3701cb59d892b88d569427586f01491552f377b1 Author: Al Viro Date: Thu Sep 24 19:41:58 2020 -0400 ep_create_wakeup_source(): dentry name can change under you... or get freed, for that matter, if it's a long (separately stored) name. Signed-off-by: Al Viro commit 9754d6cb63c7f6f09f828afed5d722d9e667e857 Merge: 4a2dd2c798522 46d2613eae51d Author: Jens Axboe Date: Thu Sep 24 13:42:40 2020 -0600 Merge tag 'nvme-5.9-2020-09-24' of git://git.infradead.org/nvme into block-5.9 Pull NVMe fixes from Christoph: "nvme fixes for 5.9 - fix error during controller probe that cause double free irqs (Keith Busch) - FC connection establishment fix (James Smart) - properly handle completions for invalid tags (Xianting Tian) - pass the correct nsid to the command effects and supported log (Chaitanya Kulkarni)" * tag 'nvme-5.9-2020-09-24' of git://git.infradead.org/nvme: nvme-core: don't use NVME_NSID_ALL for command effects and supported log nvme-fc: fail new connections to a deleted host or remote port nvme-pci: fix NULL req in completion handler nvme: return errors for hwmon init commit ee6fa053019478918ca15eadaa93e516ddb9da8d Author: Maxim Levitsky Date: Mon Sep 21 13:38:05 2020 +0300 KVM: x86: fix MSR_IA32_TSC read for nested migration MSR reads/writes should always access the L1 state, since the (nested) hypervisor should intercept all the msrs it wants to adjust, and these that it doesn't should be read by the guest as if the host had read it. However IA32_TSC is an exception. Even when not intercepted, guest still reads the value + TSC offset. The write however does not take any TSC offset into account. This is documented in Intel's SDM and seems also to happen on AMD as well. This creates a problem when userspace wants to read the IA32_TSC value and then write it. (e.g for migration) In this case it reads L2 value but write is interpreted as an L1 value. To fix this make the userspace initiated reads of IA32_TSC return L1 value as well. Huge thanks to Dave Gilbert for helping me understand this very confusing semantic of MSR writes. Signed-off-by: Maxim Levitsky Message-Id: <20200921103805.9102-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 87f92ac4c12758c4da3bbe4393f1d884b610b8a6 Author: Andrii Nakryiko Date: Thu Sep 24 10:17:05 2020 -0700 libbpf: Fix XDP program load regression for old kernels Fix regression in libbpf, introduced by XDP link change, which causes XDP programs to fail to be loaded into kernel due to specified BPF_XDP expected_attach_type. While kernel doesn't enforce expected_attach_type for BPF_PROG_TYPE_XDP, some old kernels already support XDP program, but they don't yet recognize expected_attach_type field in bpf_attr, so setting it to non-zero value causes program load to fail. Luckily, libbpf already has a mechanism to deal with such cases, so just make expected_attach_type optional for XDP programs. Fixes: dc8698cac7aa ("libbpf: Add support for BPF XDP link") Reported-by: Nikita Shirokov Reported-by: Udip Pant Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200924171705.3803628-1-andriin@fb.com commit 171d4ff79f965c1f164705ef0aaea102a6ad238b Merge: 8fa5960f57599 14801c624066a Author: Linus Torvalds Date: Thu Sep 24 09:09:47 2020 -0700 Merge tag 'mmc-v5.9-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fix from Ulf Hansson: "Fix build warning in mmc_spi when CONFIG_HAS_DMA is unset" * tag 'mmc-v5.9-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: mmc_spi: Fix mmc_spi_dma_alloc() return type for !HAS_DMA commit 8fa5960f575995bc8f3beb6b36c5aa6c61e7cdc0 Merge: 9ef7dce564b41 d0254f82d702a Author: Linus Torvalds Date: Thu Sep 24 09:05:04 2020 -0700 Merge tag 'media/v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - fix a regression at the CEC adapter core - two uAPI patches (one revert) for changes in this development cycle * tag 'media/v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: dt-bindings: media: imx274: Convert to json-schema media: media/v4l2: remove V4L2_FLAG_MEMORY_NON_CONSISTENT flag media: cec-adap.c: don't use flush_scheduled_work() commit 9ef7dce564b41e012e1fb45484248a262cd69c10 Merge: be068f29034fb c413c3102703a Author: Linus Torvalds Date: Thu Sep 24 09:00:05 2020 -0700 Merge tag 'sound-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just a handful small device-specific fixes including a couple of reverts" * tag 'sound-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: Revert "ALSA: usb-audio: Disable Lenovo P620 Rear line-in volume control" Revert "ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO" ALSA: usb-audio: Add delay quirk for H570e USB headsets ALSA: hda/realtek: Enable front panel headset LED on Lenovo ThinkStation P520 ALSA: hda/realtek - Couldn't detect Mic if booting with headset plugged ALSA: asihpi: fix iounmap in error handler commit 516d980f85415d76ae3d0d2a871eb20243f46c95 Author: Masahiro Yamada Date: Wed Sep 23 02:48:56 2020 +0900 scripts/kallsyms: skip ppc compiler stub *.long_branch.* / *.plt_branch.* PowerPC allmodconfig often fails to build as follows: LD .tmp_vmlinux.kallsyms1 KSYM .tmp_vmlinux.kallsyms1.o LD .tmp_vmlinux.kallsyms2 KSYM .tmp_vmlinux.kallsyms2.o LD .tmp_vmlinux.kallsyms3 KSYM .tmp_vmlinux.kallsyms3.o LD vmlinux SORTTAB vmlinux SYSMAP System.map Inconsistent kallsyms data Try make KALLSYMS_EXTRA_PASS=1 as a workaround make[2]: *** [../Makefile:1162: vmlinux] Error 1 Setting KALLSYMS_EXTRA_PASS=1 does not help. This is caused by the compiler inserting stubs such as *.long_branch.* and *.plt_branch.* $ powerpc-linux-nm -n .tmp_vmlinux.kallsyms2 [ snip ] c00000000210c010 t 00000075.plt_branch.da9:19 c00000000210c020 t 00000075.plt_branch.1677:5 c00000000210c030 t 00000075.long_branch.memmove c00000000210c034 t 00000075.plt_branch.9e0:5 c00000000210c044 t 00000075.plt_branch.free_initrd_mem ... Actually, the problem mentioned in scripts/link-vmlinux.sh comments; "In theory it's possible this results in even more stubs, but unlikely" is happening here, and ends up with another kallsyms step required. scripts/kallsyms.c already ignores various compiler stubs. Let's do similar to make kallsysms for PowerPC always succeed in 2 steps. Reported-by: Guenter Roeck Signed-off-by: Masahiro Yamada Tested-by: Guenter Roeck commit be068f29034fb00530a053d18b8cf140c32b12b3 Author: Linus Torvalds Date: Thu Sep 24 08:41:32 2020 -0700 mm: fix misplaced unlock_page in do_wp_page() Commit 09854ba94c6a ("mm: do_wp_page() simplification") reorganized all the code around the page re-use vs copy, but in the process also moved the final unlock_page() around to after the wp_page_reuse() call. That normally doesn't matter - but it means that the unlock_page() is now done after releasing the page table lock. Again, not a big deal, you'd think. But it turns out that it's very wrong indeed, because once we've released the page table lock, we've basically lost our only reference to the page - the page tables - and it could now be free'd at any time. We do hold the mmap_sem, so no actual unmap() can happen, but madvise can come in and a MADV_DONTNEED will zap the page range - and free the page. So now the page may be free'd just as we're unlocking it, which in turn will usually trigger a "Bad page state" error in the freeing path. To make matters more confusing, by the time the debug code prints out the page state, the unlock has typically completed and everything looks fine again. This all doesn't happen in any normal situations, but it does trigger with the dirtyc0w_child LTP test. And it seems to trigger much more easily (but not expclusively) on s390 than elsewhere, probably because s390 doesn't do the "batch pages up for freeing after the TLB flush" that gives the unlock_page() more time to complete and makes the race harder to hit. Fixes: 09854ba94c6a ("mm: do_wp_page() simplification") Link: https://lore.kernel.org/lkml/a46e9bbef2ed4e17778f5615e818526ef848d791.camel@redhat.com/ Link: https://lore.kernel.org/linux-mm/c41149a8-211e-390b-af1d-d5eee690fecb@linux.alibaba.com/ Reported-by: Qian Cai Reported-by: Alex Shi Bisected-and-analyzed-by: Gerald Schaefer Tested-by: Gerald Schaefer Signed-off-by: Linus Torvalds commit 3e640b1eec38e4c8eba160f26cba4f592e657f3d Author: Tao Ren Date: Wed Sep 16 13:42:16 2020 -0700 gpio: aspeed: fix ast2600 bank properties GPIO_U is mapped to the least significant byte of input/output mask, and the byte in "output" mask should be 0 because GPIO_U is input only. All the other bits need to be 1 because GPIO_V/W/X support both input and output modes. Similarly, GPIO_Y/Z are mapped to the 2 least significant bytes, and the according bits need to be 1 because GPIO_Y/Z support both input and output modes. Fixes: ab4a85534c3e ("gpio: aspeed: Add in ast2600 details to Aspeed driver") Signed-off-by: Tao Ren Reviewed-by: Andrew Jeffery Signed-off-by: Bartosz Golaszewski commit efb1676306f664625c0c546dd10d18d33c75e3fc Author: Felix Fietkau Date: Wed Sep 23 07:24:42 2020 +0200 mt76: mt7615: reduce maximum VHT MPDU length to 7991 After fixing mac80211 to allow larger A-MSDUs in some cases, there have been reports of performance regressions and packet loss with some clients. It appears that the issue occurs when the hardware is transmitting A-MSDUs bigger than 8k. Limit the local VHT MPDU size capability to 7991, matching the value used for MT7915 as well. Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200923052442.24141-1-nbd@nbd.name commit bf0d394e885015941ed2d5724c0a6ed8d42dd95e Author: Jeremy Kerr Date: Fri Sep 11 09:51:05 2020 +0800 gpio/aspeed-sgpio: don't enable all interrupts by default Currently, the IRQ setup for the SGPIO driver enables all interrupts in dual-edge trigger mode. Since the default handler is handle_bad_irq, any state change on input GPIOs will trigger bad IRQ warnings. This change applies sensible IRQ defaults: single-edge trigger, and all IRQs disabled. Signed-off-by: Jeremy Kerr Fixes: 7db47faae79b ("gpio: aspeed: Add SGPIO driver") Reviewed-by: Joel Stanley Acked-by: Andrew Jeffery Signed-off-by: Bartosz Golaszewski commit ac67b07e268d46eba675a60c37051bb3e59fd201 Author: Jeremy Kerr Date: Fri Sep 11 09:51:04 2020 +0800 gpio/aspeed-sgpio: enable access to all 80 input & output sgpios Currently, the aspeed-sgpio driver exposes up to 80 GPIO lines, corresponding to the 80 status bits available in hardware. Each of these lines can be configured as either an input or an output. However, each of these GPIOs is actually an input *and* an output; we actually have 80 inputs plus 80 outputs. This change expands the maximum number of GPIOs to 160; the lower half of this range are the input-only GPIOs, the upper half are the outputs. We fix the GPIO directions to correspond to this mapping. This also fixes a bug when setting GPIOs - we were reading from the input register, making it impossible to set more than one output GPIO. Signed-off-by: Jeremy Kerr Fixes: 7db47faae79b ("gpio: aspeed: Add SGPIO driver") Reviewed-by: Joel Stanley Reviewed-by: Andrew Jeffery Acked-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit e43c26e12dd49a41cf5a4cd5c5b59a1eb98ed11e Author: Ye Li Date: Wed Sep 23 02:03:44 2020 -0700 gpio: pca953x: Fix uninitialized pending variable When pca953x_irq_pending returns false, the pending parameter won't be set. But pca953x_irq_handler continues using this uninitialized variable as pending irqs and will cause problem. Fix the issue by initializing pending to 0. Fixes: 064c73afe738 ("gpio: pca953x: Synchronize interrupt handler properly") Signed-off-by: Ye Li Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 00fb259c618ea1198fc51b53a6167aa0d78672a9 Author: Ray Jui Date: Thu Sep 10 08:25:38 2020 -0700 spi: bcm-qspi: Fix probe regression on iProc platforms iProc chips have QSPI controller that does not have the MSPI_REV offset. Reading from that offset will cause a bus error. Fix it by having MSPI_REV query disabled in the generic compatible string. Fixes: 3a01f04d74ef ("spi: bcm-qspi: Handle lack of MSPI_REV offset") Link: https://lore.kernel.org/linux-arm-kernel/20200909211857.4144718-1-f.fainelli@gmail.com/T/#u Signed-off-by: Ray Jui Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200910152539.45584-3-ray.jui@broadcom.com Signed-off-by: Mark Brown commit 938835aa903ae19ad62805134f79bbcf20fc3bea Author: Greg Kroah-Hartman Date: Wed Sep 23 20:48:03 2020 +0200 platform/x86: intel_pmc_core: do not create a static struct device A struct device is a dynamic structure, with reference counting. "Tricking" the kernel to make a dynamic structure static, by working around the driver core release detection logic, is not nice. Because of this, this code has been used as an example for others on "how to do things", which is just about the worst thing possible to have happen. Fix this all up by making the platform device dynamic and providing a real release function. Cc: Rajneesh Bhardwaj Cc: Vishwanath Somayaji Cc: Darren Hart Cc: Andy Shevchenko Cc: Rajat Jain Cc: platform-driver-x86@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reported-by: Maximilian Luz Fixes: b02f6a2ef0a1 ("platform/x86: intel_pmc_core: Attach using APCI HID "INT33A1"") Signed-off-by: Greg Kroah-Hartman Acked-by: Rajat Jain Reviewed-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 2b06a1c889ca33d550675db4b0ca91e1b4dd9873 Author: Vadim Pasternak Date: Wed Sep 23 20:20:50 2020 +0300 platform/x86: mlx-platform: Fix extended topology configuration for power supply units Fix topology configuration for power supply units in structure 'mlxplat_mlxcpld_ext_pwr_items_data', due to hardware change. Note: no need to backport the fix, since there is no such hardware yet (equipped with four power) at the filed. Signed-off-by: Vadim Pasternak Reviewed-by: Hans de Goede Signed-off-by: Andy Shevchenko commit fce55cc8b7ade3c583f47eab5885e2f541ede1ee Author: Ed Wildgoose Date: Sun Sep 20 21:32:06 2020 +0100 platform/x86: pcengines-apuv2: Fix typo on define of AMD_FCH_GPIO_REG_GPIO55_DEVSLP0 Schematics show that the GPIO number is 55 (not 59). Trivial typo. Signed-off-by: Ed Wildgoose Signed-off-by: Andy Shevchenko commit afdd1ebb72051e8b6b83c4d7dc542a9be0e1352d Author: Necip Fazil Yildiran Date: Thu Sep 17 19:16:53 2020 +0300 platform/x86: fix kconfig dependency warning for FUJITSU_LAPTOP When FUJITSU_LAPTOP is enabled and NEW_LEDS is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for LEDS_CLASS Depends on [n]: NEW_LEDS [=n] Selected by [y]: - FUJITSU_LAPTOP [=y] && X86 [=y] && X86_PLATFORM_DEVICES [=y] && ACPI [=y] && INPUT [=y] && BACKLIGHT_CLASS_DEVICE [=y] && (ACPI_VIDEO [=n] || ACPI_VIDEO [=n]=n) The reason is that FUJITSU_LAPTOP selects LEDS_CLASS without depending on or selecting NEW_LEDS while LEDS_CLASS is subordinate to NEW_LEDS. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Reported-by: Hans de Goede Fixes: d89bcc83e709 ("platform/x86: fujitsu-laptop: select LEDS_CLASS") Signed-off-by: Necip Fazil Yildiran Signed-off-by: Andy Shevchenko commit 8f0c01e666685c4d2e1a233e6f4d7ab16c9f8b2a Author: Necip Fazil Yildiran Date: Tue Sep 15 12:09:23 2020 +0300 platform/x86: fix kconfig dependency warning for LG_LAPTOP When LG_LAPTOP is enabled and NEW_LEDS is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for LEDS_CLASS Depends on [n]: NEW_LEDS [=n] Selected by [y]: - LG_LAPTOP [=y] && X86 [=y] && X86_PLATFORM_DEVICES [=y] && ACPI [=y] && ACPI_WMI [=y] && INPUT [=y] The reason is that LG_LAPTOP selects LEDS_CLASS without depending on or selecting NEW_LEDS while LEDS_CLASS is subordinate to NEW_LEDS. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Fixes: dbf0c5a6b1f8 ("platform/x86: Add LG Gram laptop special features driver") Signed-off-by: Necip Fazil Yildiran Reviewed-by: Hans de Goede Acked-by: mark gross Signed-off-by: Andy Shevchenko commit 5f38b06db8af3ed6c2fc1b427504ca56fae2eacc Author: Tom Rix Date: Sun Sep 13 12:02:03 2020 -0700 platform/x86: thinkpad_acpi: initialize tp_nvram_state variable clang static analysis flags this represenative problem thinkpad_acpi.c:2523:7: warning: Branch condition evaluates to a garbage value if (!oldn->mute || ^~~~~~~~~~~ In hotkey_kthread() mute is conditionally set by hotkey_read_nvram() but unconditionally checked by hotkey_compare_and_issue_event(). So the tp_nvram_state variable s[2] needs to be initialized. Fixes: 01e88f25985d ("ACPI: thinkpad-acpi: add CMOS NVRAM polling for hot keys (v9)") Signed-off-by: Tom Rix Reviewed-by: Hans de Goede Acked-by: mark gross Signed-off-by: Andy Shevchenko commit d823346876a970522ff9e4d2b323c9b734dcc4de Author: Hans de Goede Date: Sat Sep 12 11:35:32 2020 +0200 platform/x86: intel-vbtn: Fix SW_TABLET_MODE always reporting 1 on the HP Pavilion 11 x360 Commit cfae58ed681c ("platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type") restored SW_TABLET_MODE reporting on the HP stream x360 11 series on which it was previously broken by commit de9647efeaa9 ("platform/x86: intel-vbtn: Only activate tablet mode switch on 2-in-1's"). It turns out that enabling SW_TABLET_MODE reporting on devices with a chassis-type of 10 ("Notebook") causes SW_TABLET_MODE to always report 1 at boot on the HP Pavilion 11 x360, which causes libinput to disable the kbd and touchpad. The HP Pavilion 11 x360's ACPI VGBS method sets bit 4 instead of bit 6 when NOT in tablet mode at boot. Inspecting all the DSDTs in my DSDT collection shows only one other model, the Medion E1239T ever setting bit 4 and it always sets this together with bit 6. So lets treat bit 4 as a second bit which when set indicates the device not being in tablet-mode, as we already do for bit 6. While at it also prefix all VGBS constant defines with "VGBS_". Fixes: cfae58ed681c ("platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type") Signed-off-by: Hans de Goede Acked-by: Mark Gross Signed-off-by: Andy Shevchenko commit 1d2dd379bd99ee4356ae4552fd1b8e43c7ca02cd Author: Marius Iacob Date: Mon Aug 31 15:58:01 2020 +0300 platform/x86: asus-wmi: Add BATC battery name to the list of supported The Intel Atom Cherry Trail platform reports a new battery name (BATC). Tested on ASUS Transformer Mini T103HAF. Signed-off-by: Marius Iacob Signed-off-by: Andy Shevchenko commit 8a333dab282467562b55096bab941b761ac26a73 Author: Hans de Goede Date: Thu Sep 10 17:06:50 2020 +0200 platform/x86: asus-nb-wmi: Revert "Do not load on Asus T100TA and T200TA" The WMI INIT method on for some reason turns on the camera LED on these 2-in-1s, without the WMI interface allowing further control over the LED. To fix this commit b5f7311d3a2e ("platform/x86: asus-nb-wmi: Do not load on Asus T100TA and T200TA") added a blacklist with these 2 models on it since the WMI driver did not add any extra functionality to these models. Recently I've been working on making more 2-in-1 models report their tablet-mode (SW_TABLET_MODE) to userspace; and I've found that these 2 Asus models report this through WMI. This commit reverts the adding of the blacklist, so that the Asus WMI driver can be used on these models to report their tablet-mode. I have another patch fixing the LED issue in a different manner. Note this is the second time the we revert the adding of the asus_nb_wmi_blacklist. It was reverted before in commit: aab9e7896ec9 ("platform/x86: asus-nb-wmi: Revert "Do not load on Asus T100TA and T200TA")" But some how (accidentally re-applying of the patch?) it got re-added again in commit 3bd12da7f50b ("platform/x86: asus-nb-wmi: Do not load on Asus T100TA and T200TA"), so now we need to revert it again. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit efe813d0b0e90a19102a36fd1d448a65dbf5d474 Author: Hans de Goede Date: Tue Sep 1 10:07:52 2020 +0200 platform/x86: touchscreen_dmi: Add info for the MPMAN Converter9 2-in-1 Add touchscreen info for the MPMAN Converter9 2-in-1. This device uses the same case as the ITworks TW891, but it uses a different digitizer, so it needs its own firmware. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit a127c5bbb6a8eee851cbdec254424c480b8edd75 Author: Jason Wang Date: Mon Sep 7 18:43:43 2020 +0800 vhost-vdpa: fix backend feature ioctls Commit 653055b9acd4 ("vhost-vdpa: support get/set backend features") introduces two malfunction backend features ioctls: 1) the ioctls was blindly added to vring ioctl instead of vdpa device ioctl 2) vhost_set_backend_features() was called when dev mutex has already been held which will lead a deadlock This patch fixes the above issues. Cc: Eli Cohen Reported-by: Zhu Lingshan Fixes: 653055b9acd4 ("vhost-vdpa: support get/set backend features") Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20200907104343.31141-1-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 71c548c26de20334cf0d52217de0b02471442e6a Author: Eli Cohen Date: Tue Jun 30 08:29:25 2020 +0300 vhost: Fix documentation Fix documentation to match actual function prototypes "end" used instead of "last". Fix that. Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20200630052925.GA157062@mtl-vdi-166.wap.labs.mlnx Signed-off-by: Michael S. Tsirkin commit d41ec792edf89858a77ad485f1a4c10e3d26a10f Author: Randy Dunlap Date: Sun Aug 23 15:55:16 2020 -0700 Documentation: laptops: thinkpad-acpi: fix underline length build warning Fix underline length build warning in thinkpad-acpi.rst documentation: Documentation/admin-guide/laptops/thinkpad-acpi.rst:1437: WARNING: Title underline too short. DYTC Lapmode sensor ------------------ Fixes: acf7f4a59114 ("platform/x86: thinkpad_acpi: lap or desk mode interface") Signed-off-by: Randy Dunlap Cc: Nitin Joshi Cc: Sugumaran Cc: Bastien Nocera Cc: Mark Pearson Cc: Andy Shevchenko Cc: Darren Hart Cc: Henrique de Moraes Holschuh Cc: ibm-acpi-devel@lists.sourceforge.net Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Andy Shevchenko commit 4fd9ac6bd3044734a7028bd993944c3617d1eede Author: Dinghao Liu Date: Sun Aug 23 19:12:11 2020 +0800 Platform: OLPC: Fix memleak in olpc_ec_probe When devm_regulator_register() fails, ec should be freed just like when olpc_ec_cmd() fails. Fixes: 231c0c216172a ("Platform: OLPC: Add a regulator for the DCON") Signed-off-by: Dinghao Liu Signed-off-by: Andy Shevchenko commit 1a26044954a6d1f4d375d5e62392446af663be7a Author: Yu Kuai Date: Fri Sep 18 09:13:35 2020 +0800 iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate() if of_find_device_by_node() succeed, exynos_iommu_of_xlate() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: aa759fd376fb ("iommu/exynos: Add callback for initializing devices from device tree") Signed-off-by: Yu Kuai Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200918011335.909141-1-yukuai3@huawei.com Signed-off-by: Joerg Roedel commit f7e80983f0cf470bb82036e73bff4d5a7daf8fc2 Author: Christian Borntraeger Date: Mon Sep 21 12:48:36 2020 +0200 s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl reqcnt is an u32 pointer but we do copy sizeof(reqcnt) which is the size of the pointer. This means we only copy 8 byte. Let us copy the full monty. Signed-off-by: Christian Borntraeger Cc: Harald Freudenberger Cc: stable@vger.kernel.org Fixes: af4a72276d49 ("s390/zcrypt: Support up to 256 crypto adapters.") Reviewed-by: Harald Freudenberger Signed-off-by: Vasily Gorbik commit 7241c5a697479c7d0c5a96595822cdab750d41ae Author: Voon Weifeng Date: Wed Sep 23 16:56:14 2020 +0800 net: stmmac: removed enabling eee in EEE set callback EEE should be only be enabled during stmmac_mac_link_up() when the link are up and being set up properly. set_eee should only do settings configuration and disabling the eee. Without this fix, turning on EEE using ethtool will return "Operation not supported". This is due to the driver is in a dead loop waiting for eee to be advertised in the for eee to be activated but the driver will only configure the EEE advertisement after the eee is activated. Ethtool should only return "Operation not supported" if there is no EEE capbility in the MAC controller. Fixes: 8a7493e58ad6 ("net: stmmac: Fix a race in EEE enable callback") Signed-off-by: Voon Weifeng Acked-by: Mark Gross Signed-off-by: David S. Miller commit f9317ae5523f99999fb54c513ebabbb2bc887ddf Author: Hauke Mehrtens Date: Tue Sep 22 23:41:12 2020 +0200 net: lantiq: Add locking for TX DMA channel The TX DMA channel data is accessed by the xrx200_start_xmit() and the xrx200_tx_housekeeping() function from different threads. Make sure the accesses are synchronized by acquiring the netif_tx_lock() in the xrx200_tx_housekeeping() function too. This lock is acquired by the kernel before calling xrx200_start_xmit(). Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit ea6754aef2449e2cadfeb28741a199d35da53e28 Author: Tian Tao Date: Tue Sep 22 21:32:19 2020 +0800 net: switchdev: Fixed kerneldoc warning Update kernel-doc line comments to fix warnings reported by make W=1. net/switchdev/switchdev.c:413: warning: Function parameter or member 'extack' not described in 'call_switchdev_notifiers' Signed-off-by: Tian Tao Acked-by: Ivan Vecera Signed-off-by: David S. Miller commit 77972b55fb9d35d4a6b0abca99abffaa4ec6a85b Author: Geert Uytterhoeven Date: Tue Sep 22 09:29:31 2020 +0200 Revert "ravb: Fixed to be able to unload modules" This reverts commit 1838d6c62f57836639bd3d83e7855e0ee4f6defc. This commit moved the ravb_mdio_init() call (and thus the of_mdiobus_register() call) from the ravb_probe() to the ravb_open() call. This causes a regression during system resume (s2idle/s2ram), as new PHY devices cannot be bound while suspended. During boot, the Micrel PHY is detected like this: Micrel KSZ9031 Gigabit PHY e6800000.ethernet-ffffffff:00: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=e6800000.ethernet-ffffffff:00, irq=228) ravb e6800000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off During system suspend, (A) defer_all_probes is set to true, and (B) usermodehelper_disabled is set to UMH_DISABLED, to avoid drivers being probed while suspended. A. If CONFIG_MODULES=n, phy_device_register() calling device_add() merely adds the device, but does not probe it yet, as really_probe() returns early due to defer_all_probes being set: dpm_resume+0x128/0x4f8 device_resume+0xcc/0x1b0 dpm_run_callback+0x74/0x340 ravb_resume+0x190/0x1b8 ravb_open+0x84/0x770 of_mdiobus_register+0x1e0/0x468 of_mdiobus_register_phy+0x1b8/0x250 of_mdiobus_phy_device_register+0x178/0x1e8 phy_device_register+0x114/0x1b8 device_add+0x3d4/0x798 bus_probe_device+0x98/0xa0 device_initial_probe+0x10/0x18 __device_attach+0xe4/0x140 bus_for_each_drv+0x64/0xc8 __device_attach_driver+0xb8/0xe0 driver_probe_device.part.11+0xc4/0xd8 really_probe+0x32c/0x3b8 Later, phy_attach_direct() notices no PHY driver has been bound, and falls back to the Generic PHY, leading to degraded operation: Generic PHY e6800000.ethernet-ffffffff:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=e6800000.ethernet-ffffffff:00, irq=POLL) ravb e6800000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off B. If CONFIG_MODULES=y, request_module() returns early with -EBUSY due to UMH_DISABLED, and MDIO initialization fails completely: mdio_bus e6800000.ethernet-ffffffff:00: error -16 loading PHY driver module for ID 0x00221622 ravb e6800000.ethernet eth0: failed to initialize MDIO PM: dpm_run_callback(): ravb_resume+0x0/0x1b8 returns -16 PM: Device e6800000.ethernet failed to resume: error -16 Ignoring -EBUSY in phy_request_driver_module(), like was done for -ENOENT in commit 21e194425abd65b5 ("net: phy: fix issue with loading PHY driver w/o initramfs"), would makes it fall back to the Generic PHY, like in the CONFIG_MODULES=n case. Signed-off-by: Geert Uytterhoeven Cc: stable@vger.kernel.org Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit ef59b1953c26130ef23e6986b2ceea1efaa472e9 Author: Mat Martineau Date: Mon Sep 21 16:57:58 2020 +0200 mptcp: Wake up MPTCP worker when DATA_FIN found on a TCP FIN packet When receiving a DATA_FIN MPTCP option on a TCP FIN packet, the DATA_FIN information would be stored but the MPTCP worker did not get scheduled. In turn, the MPTCP socket state would remain in TCP_ESTABLISHED and no blocked operations would be awakened. TCP FIN packets are seen by the MPTCP socket when moving skbs out of the subflow receive queues, so schedule the MPTCP worker when a skb with DATA_FIN but no data payload is moved from a subflow queue. Other cases (DATA_FIN on a bare TCP ACK or on a packet with data payload) are already handled. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/84 Fixes: 43b54c6ee382 ("mptcp: Use full MPTCP-level disconnect state machine") Acked-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit c9c9e6a49f8998e9334507378c08cc16cb3ec0e5 Merge: a969324fe7cc3 2f5fb555637ef Author: Linus Torvalds Date: Wed Sep 23 14:52:22 2020 -0700 Merge tag 'trace-v5.9-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull bootconfig fixes from Steven Rostedt: "A couple of fixes for bootconfig. Masami discovered two bugs which this fixes and he added tests to cover these issues. - Fix a bug that breaks bootconfig tree nodes - Fix a bug that does not truncate whitespace properly - Add tests to cover the above two cases" * tag 'trace-v5.9-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tools/bootconfig: Add testcase for tailing space tools/bootconfig: Add testcases for repeated key with brace lib/bootconfig: Fix to remove tailing spaces after value lib/bootconfig: Fix a bug of breaking existing tree nodes commit a969324fe7cc38e4af05eea44fde385a2853c91e Merge: bffac4b5435a0 4c07ae0ad493b Author: Linus Torvalds Date: Wed Sep 23 14:38:21 2020 -0700 Merge tag 'for-5.9/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - DM core fix for incorrect double bio splitting. Keep "fixing" this because past attempts didn't fully appreciate the liability relative to recursive bio splitting. This fix limits DM's bio splitting to a single method and does _not_ use blk_queue_split() for normal IO. - DM crypt Documentation updates for features added during 5.9 merge. * tag 'for-5.9/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm crypt: document encrypted keyring key option dm crypt: document new no_workqueue flags dm: fix comment in dm_process_bio() dm: fix bio splitting and its bio completion order for regular IO commit bffac4b5435a07bf26604385ae533adff3cccf23 Merge: 79a1971c5f14e b5ddcffa37778 Author: Linus Torvalds Date: Wed Sep 23 14:32:23 2020 -0700 Merge tag 'for-5.9-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "syzkaller started to hit us with reports, here's a fix for one type (stack overflow when printing checksums on read error). The other patch is a fix for sysfs object, we have a test for that and it leads to a crash." * tag 'for-5.9-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix put of uninitialized kobject after seed device delete btrfs: fix overflow when copying corrupt csums for a message commit 86a82ae0b5095ea24c55898a3f025791e7958b21 Author: Thomas Gleixner Date: Wed Sep 23 17:46:20 2020 +0200 x86/ioapic: Unbreak check_timer() Several people reported in the kernel bugzilla that between v4.12 and v4.13 the magic which works around broken hardware and BIOSes to find the proper timer interrupt delivery mode stopped working for some older affected platforms which need to fall back to ExtINT delivery mode. The reason is that the core code changed to keep track of the masked and disabled state of an interrupt line more accurately to avoid the expensive hardware operations. That broke an assumption in i8259_make_irq() which invokes disable_irq_nosync(); irq_set_chip_and_handler(); enable_irq(); Up to v4.12 this worked because enable_irq() unconditionally unmasked the interrupt line, but after the state tracking improvements this is not longer the case because the IO/APIC uses lazy disabling. So the line state is unmasked which means that enable_irq() does not call into the new irq chip to unmask it. In principle this is a shortcoming of the core code, but it's more than unclear whether the core code should try to reset state. At least this cannot be done unconditionally as that would break other existing use cases where the chip type is changed, e.g. when changing the trigger type, but the callers expect the state to be preserved. As the way how check_timer() is switching the delivery modes is truly unique, the obvious fix is to simply unmask the i8259 manually after changing the mode to ExtINT delivery and switching the irq chip to the legacy PIC. Note, that the fixes tag is not really precise, but identifies the commit which broke the assumptions in the IO/APIC and i8259 code and that's the kernel version to which this needs to be backported. Fixes: bf22ff45bed6 ("genirq: Avoid unnecessary low level irq function calls") Reported-by: p_c_chan@hotmail.com Reported-by: ecm4@mail.com Reported-by: perdigao1@yahoo.com Reported-by: matzes@users.sourceforge.net Reported-by: rvelascog@gmail.com Signed-off-by: Thomas Gleixner Tested-by: p_c_chan@hotmail.com Tested-by: matzes@users.sourceforge.net Cc: stable@vger.kernel.org Link: https://bugzilla.kernel.org/show_bug.cgi?id=197769 commit 46d2613eae51d527ecaf0e8248a9bfcc0b92aa7e Author: Chaitanya Kulkarni Date: Tue Sep 22 12:49:38 2020 -0700 nvme-core: don't use NVME_NSID_ALL for command effects and supported log In the function nvme_get_effects_log() it uses NVME_NSID_ALL which has namespace scope. The command effect log page is controller specific. Replace NVME_NSID_ALL with 0x00 which specifies the controller scope instead of namespace scope. Fixes: 84fef62d135b ("nvme: check admin passthru command effects") Link: https://bugzilla.kernel.org/show_bug.cgi?id=209287 Reported-by: Huai-Cheng Kuo Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 79a1971c5f14ea3a6e2b0c4caf73a1760db7cab8 Author: Linus Torvalds Date: Wed Sep 23 10:04:16 2020 -0700 mm: move the copy_one_pte() pte_present check into the caller This completes the split of the non-present and present pte cases by moving the check for the source pte being present into the single caller, which also means that we clearly separate out the very different return value case for a non-present pte. The present pte case currently always succeeds. This is a pure code re-organization with no semantic change: the intent is to make it much easier to add a new return case to the present pte case for when we do early COW at page table copy time. This was split out from the previous commit simply to make it easy to visually see that there were no semantic changes from this code re-organization. Signed-off-by: Linus Torvalds commit df3a57d1f6072d07978bafa7dbd9904cdf8f3e13 Author: Linus Torvalds Date: Wed Sep 23 09:56:59 2020 -0700 mm: split out the non-present case from copy_one_pte() This is a purely mechanical split of the copy_one_pte() function. It's not immediately obvious when looking at the diff because of the indentation change, but the way to see what is going on in this commit is to use the "-w" flag to not show pure whitespace changes, and you see how the first part of copy_one_pte() is simply lifted out into a separate function. And since the non-present case is marked unlikely, don't make the new function be inlined. Not that gcc really seems to care, since it looks like it will inline it anyway due to the whole "single callsite for static function" logic. In fact, code generation with the function split is almost identical to before. But not marking it inline is the right thing to do. This is pure prep-work and cleanup for subsequent changes. Signed-off-by: Linus Torvalds commit 530b5affc675ade5db4a03f04ed7cd66806c8a1a Author: Sascha Hauer Date: Wed Sep 23 15:10:26 2020 +0200 spi: fsl-dspi: fix use-after-free in remove path spi_unregister_controller() not only unregisters the controller, but also frees the controller. This will free the driver data with it, so we must not access it later dspi_remove(). Solve this by allocating the driver data separately from the SPI controller. Signed-off-by: Sascha Hauer Link: https://lore.kernel.org/r/20200923131026.20707-1-s.hauer@pengutronix.de Signed-off-by: Mark Brown commit fbb5a79d2fe7b01c6424fbbc04368373b1672d61 Author: Icenowy Zheng Date: Wed Sep 23 08:51:42 2020 +0800 regulator: axp20x: fix LDO2/4 description Currently we wrongly set the mask of value of LDO2/4 both to the mask of LDO2, and the LDO4 voltage configuration is left untouched. This leads to conflict when LDO2/4 are both in use. Fix this issue by setting different vsel_mask to both regulators. Fixes: db4a555f7c4c ("regulator: axp20x: use defines for masks") Signed-off-by: Icenowy Zheng Link: https://lore.kernel.org/r/20200923005142.147135-1-icenowy@aosc.io Signed-off-by: Mark Brown commit 18391e5e9cf59226354a864e5befa3c764eb8903 Author: Yang Weijiang Date: Wed Aug 26 09:55:24 2020 +0800 selftests: kvm: Fix assert failure in single-step test This is a follow-up patch to fix an issue left in commit: 98b0bf02738004829d7e26d6cb47b2e469aaba86 selftests: kvm: Use a shorter encoding to clear RAX With the change in the commit, we also need to modify "xor" instruction length from 3 to 2 in array ss_size accordingly to pass below check: for (i = 0; i < (sizeof(ss_size) / sizeof(ss_size[0])); i++) { target_rip += ss_size[i]; CLEAR_DEBUG(); debug.control = KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_SINGLESTEP; debug.arch.debugreg[7] = 0x00000400; APPLY_DEBUG(); vcpu_run(vm, VCPU_ID); TEST_ASSERT(run->exit_reason == KVM_EXIT_DEBUG && run->debug.arch.exception == DB_VECTOR && run->debug.arch.pc == target_rip && run->debug.arch.dr6 == target_dr6, "SINGLE_STEP[%d]: exit %d exception %d rip 0x%llx " "(should be 0x%llx) dr6 0x%llx (should be 0x%llx)", i, run->exit_reason, run->debug.arch.exception, run->debug.arch.pc, target_rip, run->debug.arch.dr6, target_dr6); } Reported-by: kernel test robot Signed-off-by: Yang Weijiang Message-Id: <20200826015524.13251-1-weijiang.yang@intel.com> Signed-off-by: Paolo Bonzini commit b96e6506c2ea7c8e3ef0860169b6d0ba2f1aca9f Author: Mohammed Gamal Date: Thu Sep 3 16:11:22 2020 +0200 KVM: x86: VMX: Make smaller physical guest address space support user-configurable This patch exposes allow_smaller_maxphyaddr to the user as a module parameter. Since smaller physical address spaces are only supported on VMX, the parameter is only exposed in the kvm_intel module. For now disable support by default, and let the user decide if they want to enable it. Modifications to VMX page fault and EPT violation handling will depend on whether that parameter is enabled. Signed-off-by: Mohammed Gamal Message-Id: <20200903141122.72908-1-mgamal@redhat.com> Signed-off-by: Paolo Bonzini commit be090fa62080d8501a5651a73cb954721966b125 Author: Wei Li Date: Wed Sep 23 14:53:26 2020 +0800 MIPS: BCM47XX: Remove the needless check with the 1074K As there is no known soc powered by mips 1074K in bcm47xx series, the check with 1074K is needless. So just remove it. Link: https://wireless.wiki.kernel.org/en/users/Drivers/b43/soc Fixes: 442e14a2c55e ("MIPS: Add 1074K CPU support explicitly.") Signed-off-by: Wei Li Acked-by: Rafał Miłecki Signed-off-by: Thomas Bogendoerfer commit e393fbe6fa27af23f78df6e16a8fd2963578a8c4 Author: Wei Li Date: Wed Sep 23 14:53:12 2020 +0800 MIPS: Add the missing 'CPU_1074K' into __get_cpu_type() Commit 442e14a2c55e ("MIPS: Add 1074K CPU support explicitly.") split 1074K from the 74K as an unique CPU type, while it missed to add the 'CPU_1074K' in __get_cpu_type(). So let's add it back. Fixes: 442e14a2c55e ("MIPS: Add 1074K CPU support explicitly.") Signed-off-by: Wei Li Signed-off-by: Thomas Bogendoerfer commit b13812ddea615b6507beef24f76540c0c1143c5c Author: Jiaxun Yang Date: Wed Sep 23 18:33:12 2020 +0800 MIPS: Loongson2ef: Disable Loongson MMI instructions It was missed when I was forking Loongson2ef from Loongson64 but should be applied to Loongson2ef as march=loongson2f will also enable Loongson MMI in GCC-9+. Signed-off-by: Jiaxun Yang Fixes: 71e2f4dd5a65 ("MIPS: Fork loongson2ef from loongson64") Reported-by: Thomas Bogendoerfer Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Thomas Bogendoerfer commit 955921289dcdbc49b46a731ec07978fb7d4e1fc7 Author: Rafael J. Wysocki Date: Wed Sep 23 13:50:12 2020 +0200 ACPI: processor: Fix build for ARCH_APICTIMER_STOPS_ON_C3 unset Fix the lapic_timer_needs_broadcast() stub for ARCH_APICTIMER_STOPS_ON_C3 unset to actually return a value. Fixes: aa6b43d57f99 ("ACPI: processor: Use CPUIDLE_FLAG_TIMER_STOP") Reported-by: Guenter Roeck Signed-off-by: Rafael J. Wysocki commit 16cce04cdb200ba905d1241b425ac48da5a9ace5 Author: Chris Wilson Date: Wed Sep 16 11:50:22 2020 +0100 drm/i915/selftests: Push the fake iommu device from the stack to data Since we store a pointer to the fake iommu device that is allocated on the stack, as soon as we leave the function it goes out of scope and any future dereference is undefined behaviour. Just in case we may need to look at the fake iommu device after initialiation, move the allocation from the stack into the data. Fixes: 01b9d4e21148 ("iommu/vt-d: Use dev_iommu_priv_get/set()") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200916105022.28316-2-chris@chris-wilson.co.uk (cherry picked from commit 9f9f4101fc98db56714e71676d5a1e2d27e01f7e) Signed-off-by: Jani Nikula commit 6bf560766a8ef5afe4faa3244220cf5b3a934549 Author: Dan Carpenter Date: Tue Sep 8 10:25:57 2020 +0300 PM / devfreq: tegra30: Disable clock on error in probe This error path needs to call clk_disable_unprepare(). Fixes: 7296443b900e ("PM / devfreq: tegra30: Handle possible round-rate error") Signed-off-by: Dan Carpenter Reviewed-by: Dmitry Osipenko Signed-off-by: Dan Carpenter Signed-off-by: Chanwoo Choi commit 0c309ed17c50e7eeaf3c66102b475198064e80da Author: Chanwoo Choi Date: Tue Sep 8 19:57:07 2020 +0900 PM / devfreq: Add timer type to devfreq_summary debugfs The commit 4dc3bab8687f ("PM / devfreq: Add support delayed timer for polling mode") supports the delayed timer but this commit missed the adding the timer type to devfreq_summary debugfs node. Add the timer type to devfreq_summary debugfs. Fixes: 4dc3bab8687f ("PM / devfreq: Add support delayed timer for polling mode") Signed-off-by: Chanwoo Choi commit 3de5f98dafbb0a5ac6aafea2e6d3b2bea4950695 Merge: a31128384dfd9 74ea06164cda8 Author: Dave Airlie Date: Wed Sep 23 09:30:29 2020 +1000 Merge tag 'drm-misc-fixes-2020-09-18' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.9-rc6: - Fill asoc card owner in vc4. - Program secondary CSC correctly in sun4i, and extend register mapping to cover secondary CSC registers. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/e3ab56cf-3b8e-9b21-f1b6-9a4989a52996@linux.intel.com commit 805c6d3c19210c90c109107d189744e960eae025 Merge: d3017135c4337 933a3752babcf Author: Linus Torvalds Date: Tue Sep 22 15:08:41 2020 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "No common topic, just assorted fixes" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fuse: fix the ->direct_IO() treatment of iov_iter fs: fix cast in fsparam_u32hex() macro vboxsf: Fix the check for the old binary mount-arguments struct commit 149415586243bd0ea729760fb6dd7b3c50601871 Author: Sudhakar Panneerselvam Date: Wed Sep 16 23:54:31 2020 +0000 scsi: target: Fix lun lookup for TARGET_SCF_LOOKUP_LUN_FROM_TAG case transport_lookup_tmr_lun() uses "orig_fe_lun" member of struct se_cmd for the lookup. Hence, update this field directly for the TARGET_SCF_LOOKUP_LUN_FROM_TAG case. Link: https://lore.kernel.org/r/1600300471-26135-1-git-send-email-sudhakar.panneerselvam@oracle.com Fixes: a36840d80027 ("target: Initialize LUN in transport_init_se_cmd()") Reported-by: Martin Wilck Reviewed-by: Mike Christie Signed-off-by: Sudhakar Panneerselvam Signed-off-by: Martin K. Petersen commit d3017135c43373b06eef1eb70dfeb948b8ae159f Merge: 0baca070068c5 b334ec66d4554 Author: Linus Torvalds Date: Tue Sep 22 14:43:50 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: - fix failure to add bond interfaces to a bridge, the offload-handling code was too defensive there and recent refactoring unearthed that. Users complained (Ido) - fix unnecessarily reflecting ECN bits within TOS values / QoS marking in TCP ACK and reset packets (Wei) - fix a deadlock with bpf iterator. Hopefully we're in the clear on this front now... (Yonghong) - BPF fix for clobbering r2 in bpf_gen_ld_abs (Daniel) - fix AQL on mt76 devices with FW rate control and add a couple of AQL issues in mac80211 code (Felix) - fix authentication issue with mwifiex (Maximilian) - WiFi connectivity fix: revert IGTK support in ti/wlcore (Mauro) - fix exception handling for multipath routes via same device (David Ahern) - revert back to a BH spin lock flavor for nsid_lock: there are paths which do require the BH context protection (Taehee) - fix interrupt / queue / NAPI handling in the lantiq driver (Hauke) - fix ife module load deadlock (Cong) - make an adjustment to netlink reply message type for code added in this release (the sole change touching uAPI here) (Michal) - a number of fixes for small NXP and Microchip switches (Vladimir) [ Pull request acked by David: "you can expect more of this in the future as I try to delegate more things to Jakub" ] * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (167 commits) net: mscc: ocelot: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries net: dsa: seville: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries net: dsa: felix: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries inet_diag: validate INET_DIAG_REQ_PROTOCOL attribute net: bridge: br_vlan_get_pvid_rcu() should dereference the VLAN group under RCU net: Update MAINTAINERS for MediaTek switch driver net/mlx5e: mlx5e_fec_in_caps() returns a boolean net/mlx5e: kTLS, Avoid kzalloc(GFP_KERNEL) under spinlock net/mlx5e: kTLS, Fix leak on resync error flow net/mlx5e: kTLS, Add missing dma_unmap in RX resync net/mlx5e: kTLS, Fix napi sync and possible use-after-free net/mlx5e: TLS, Do not expose FPGA TLS counter if not supported net/mlx5e: Fix using wrong stats_grps in mlx5e_update_ndo_stats() net/mlx5e: Fix multicast counter not up-to-date in "ip -s" net/mlx5e: Fix endianness when calculating pedit mask first bit net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported net/mlx5e: CT: Fix freeing ct_label mapping net/mlx5e: Fix memory leak of tunnel info when rule under multipath not ready net/mlx5e: Use synchronize_rcu to sync with NAPI net/mlx5e: Use RCU to protect rq->xdp_prog ... commit 0baca070068c58b95e342881d9da4840d5cf3bd1 Merge: c37b7189228cf 4eb8dded6b82e Author: Linus Torvalds Date: Tue Sep 22 14:36:50 2020 -0700 Merge tag 'io_uring-5.9-2020-09-22' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A few fixes - most of them regression fixes from this cycle, but also a few stable heading fixes, and a build fix for the included demo tool since some systems now actually have gettid() available" * tag 'io_uring-5.9-2020-09-22' of git://git.kernel.dk/linux-block: io_uring: fix openat/openat2 unified prep handling io_uring: mark statx/files_update/epoll_ctl as non-SQPOLL tools/io_uring: fix compile breakage io_uring: don't use retry based buffered reads for non-async bdev io_uring: don't re-setup vecs/iter in io_resumit_prep() is already there io_uring: don't run task work on an exiting task io_uring: drop 'ctx' ref on task work cancelation io_uring: grab any needed state during defer prep commit c37b7189228cf972b5f899e0fedd89a83009ae25 Merge: eff48ddeab782 4a2dd2c798522 Author: Linus Torvalds Date: Tue Sep 22 14:31:38 2020 -0700 Merge tag 'block-5.9-2020-09-22' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few NVMe fixes, and a dasd write zero fix" * tag 'block-5.9-2020-09-22' of git://git.kernel.dk/linux-block: nvmet: get transport reference for passthru ctrl nvme-core: get/put ctrl and transport module in nvme_dev_open/release() nvme-tcp: fix kconfig dependency warning when !CRYPTO nvme-pci: disable the write zeros command for Intel 600P/P3100 s390/dasd: Fix zero write for FBA devices commit a7b3474cbb2864d5500d5e4f48dd57c903975cab Author: Thomas Gleixner Date: Tue Sep 22 09:58:52 2020 +0200 x86/irq: Make run_on_irqstack_cond() typesafe Sami reported that run_on_irqstack_cond() requires the caller to cast functions to mismatching types, which trips indirect call Control-Flow Integrity (CFI) in Clang. Instead of disabling CFI on that function, provide proper helpers for the three call variants. The actual ASM code stays the same as that is out of reach. [ bp: Fix __run_on_irqstack() prototype to match. ] Fixes: 931b94145981 ("x86/entry: Provide helpers for executing on the irqstack") Reported-by: Nathan Chancellor Reported-by: Sami Tolvanen Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Tested-by: Sami Tolvanen Cc: Link: https://github.com/ClangBuiltLinux/linux/issues/1052 Link: https://lkml.kernel.org/r/87pn6eb5tv.fsf@nanos.tec.linutronix.de commit b02cf0c4736c65c6667f396efaae6b5521e82abf Author: Dinh Nguyen Date: Mon Aug 31 15:26:57 2020 -0500 clk: socfpga: stratix10: fix the divider for the emac_ptp_free_clk The fixed divider the emac_ptp_free_clk should be 2, not 4. Fixes: 07afb8db7340 ("clk: socfpga: stratix10: add clock driver for Stratix10 platform") Cc: stable@vger.kernel.org Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20200831202657.8224-1-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit f3bb0f796f5ffe32f0fbdce5b1b12eb85511158f Author: Marek Szyprowski Date: Tue Sep 22 14:40:46 2020 +0200 clk: samsung: exynos4: mark 'chipid' clock as CLK_IGNORE_UNUSED The ChipID IO region has it's own clock, which is being disabled while scanning for unused clocks. It turned out that some CPU hotplug, CPU idle or even SOC firmware code depends on the reads from that area. Fix the mysterious hang caused by entering deep CPU idle state by ignoring the 'chipid' clock during unused clocks scan, as there are no direct clients for it which will keep it enabled. Fixes: e062b571777f ("clk: exynos4: register clocks using common clock framework") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200922124046.10496-1-m.szyprowski@samsung.com Reviewed-by: Krzysztof Kozlowski Acked-by: Sylwester Nawrocki Signed-off-by: Stephen Boyd commit 51644df867c0fd156187a79d089450215a05ddcb Merge: e56b4d4cc5029 2f878d04218c8 Author: Stephen Boyd Date: Tue Sep 22 12:09:07 2020 -0700 Merge tag 'for-5.10-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into clk-fixes Pull Tegra clk driver fixes from Thierry Reding: This is a set of small fixes for the Tegra clock driver. * tag 'for-5.10-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: tegra: Fix missing prototype for tegra210_clk_register_emc() clk: tegra: Always program PLL_E when enabled clk: tegra: Capitalization fixes commit bd805274577457f301bf826f86543f550cf5c1ef Author: Ulf Hansson Date: Tue Sep 22 11:15:50 2020 +0200 cpuidle: Drop misleading comments about RCU usage The commit 1098582a0f6c ("sched,idle,rcu: Push rcu_idle deeper into the idle path"), moved the calls rcu_idle_enter|exit() into the cpuidle core. However, it forgot to remove a couple of comments in enter_s2idle_proper() about why RCU_NONIDLE earlier was needed. So, let's drop them as they have become a bit misleading. Fixes: 1098582a0f6c ("sched,idle,rcu: Push rcu_idle deeper into the idle path") Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 4c07ae0ad493b7b2d3dd3e53870e594f136ce8a5 Author: Milan Broz Date: Thu Aug 20 21:20:26 2020 +0200 dm crypt: document encrypted keyring key option Commit 27f5411a718c4 ("dm crypt: support using encrypted keys") introduced support for encrypted keyring type. Fix documentation in admin guide to mention this type. Fixes: 27f5411a718c4 ("dm crypt: support using encrypted keys") Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer commit e89c8323b3f19a964453f9bb99a1ae2fdf63f9ed Merge: b63c2eb1bfaae 28284943ac940 Author: Jani Nikula Date: Tue Sep 22 20:25:11 2020 +0300 Merge tag 'gvt-fixes-2020-09-17' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2020-09-17 - Fix kernel oops for VFIO edid on BDW (Zhenyu) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20200917064208.GF11592@zhen-hp.sh.intel.com commit 4a5caa4af0df5cd8f1c7f0c2f871d382662b022e Author: Milan Broz Date: Thu Aug 20 19:45:38 2020 +0200 dm crypt: document new no_workqueue flags Commit 39d42fa96ba1 ("dm crypt: add flags to optionally bypass kcryptd workqueues") introduced new dm-crypt 'no_read_workqueue' and 'no_write_workqueue' flags. Add documentation to admin guide for them. Fixes: 39d42fa96ba1 ("dm crypt: add flags to optionally bypass kcryptd workqueues") Signed-off-by: Milan Broz Signed-off-by: Mike Snitzer commit 2b405533c2560d7878199c57d95a39151351df72 Author: Bryan O'Donoghue Date: Sun Sep 20 18:01:58 2020 +0100 USB: gadget: f_ncm: Fix NDP16 datagram validation commit 2b74b0a04d3e ("USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()") adds important bounds checking however it unfortunately also introduces a bug with respect to section 3.3.1 of the NCM specification. wDatagramIndex[1] : "Byte index, in little endian, of the second datagram described by this NDP16. If zero, then this marks the end of the sequence of datagrams in this NDP16." wDatagramLength[1]: "Byte length, in little endian, of the second datagram described by this NDP16. If zero, then this marks the end of the sequence of datagrams in this NDP16." wDatagramIndex[1] and wDatagramLength[1] respectively then may be zero but that does not mean we should throw away the data referenced by wDatagramIndex[0] and wDatagramLength[0] as is currently the case. Breaking the loop on (index2 == 0 || dg_len2 == 0) should come at the end as was previously the case and checks for index2 and dg_len2 should be removed since zero is valid. I'm not sure how much testing the above patch received but for me right now after enumeration ping doesn't work. Reverting the commit restores ping, scp, etc. The extra validation associated with wDatagramIndex[0] and wDatagramLength[0] appears to be valid so, this change removes the incorrect restriction on wDatagramIndex[1] and wDatagramLength[1] restoring data processing between host and device. Fixes: 2b74b0a04d3e ("USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb()") Cc: Ilja Van Sprundel Cc: Brooke Basile Cc: stable Signed-off-by: Bryan O'Donoghue Link: https://lore.kernel.org/r/20200920170158.1217068-1-bryan.odonoghue@linaro.org Signed-off-by: Greg Kroah-Hartman commit 52a035235ed5a1392fc264bd614eb96d1ac97a3d Merge: 856deb866d16e fdb29f4de1374 Author: Greg Kroah-Hartman Date: Tue Sep 22 18:36:40 2020 +0200 Merge tag 'iio-fixes-for-5.9b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: 2nd set of IIO fixes for the 5.9 cycle. One of these fixes a regresison introduced this cycle, but if I am too late sending this request, it can be queued up for the merge window. ad7124: fix typo in device name exposed through sysfs. qcom-spmi-adc: fix stray .c in driver name field. * tag 'iio-fixes-for-5.9b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: qcom-spmi-adc5: fix driver name iio: adc: ad7124: Fix typo in device name commit eff48ddeab782e35e58ccc8853f7386bbae9dec4 Merge: 98477740630f2 a27026e95b57a Author: Linus Torvalds Date: Tue Sep 22 09:08:33 2020 -0700 Merge tag 'trace-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Check kprobe is enabled before unregistering from ftrace as it isn't registered when disabled. - Remove kprobes enabled via command-line that is on init text when freed. - Add missing RCU synchronization for ftrace trampoline symbols removed from kallsyms. - Free trampoline on error path if ftrace_startup() fails. - Give more space for the longer PID numbers in trace output. - Fix a possible double free in the histogram code. - A couple of fixes that were discovered by sparse. * tag 'trace-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: bootconfig: init: make xbc_namebuf static kprobes: tracing/kprobes: Fix to kill kprobes on initmem after boot tracing: fix double free ftrace: Let ftrace_enable_sysctl take a kernel pointer buffer tracing: Make the space reserved for the pid wider ftrace: Fix missing synchronize_rcu() removing trampoline from kallsyms ftrace: Free the trampoline when ftrace_startup() fails kprobes: Fix to check probe enabled before disarm_kprobe_ftrace() commit 9e0e8dac985d4bd07d9e62922b9d189d3ca2fccf Author: James Smart Date: Thu Sep 17 13:33:22 2020 -0700 nvme-fc: fail new connections to a deleted host or remote port The lldd may have made calls to delete a remote port or local port and the delete is in progress when the cli then attempts to create a new controller. Currently, this proceeds without error although it can't be very successful. Fix this by validating that both the host port and remote port are present when a new controller is to be created. Signed-off-by: James Smart Reviewed-by: Himanshu Madhani Signed-off-by: Christoph Hellwig commit 50b7c24390a53c78de546215282fb52980f1d7b7 Author: Xianting Tian Date: Tue Sep 22 14:25:17 2020 +0800 nvme-pci: fix NULL req in completion handler Currently, we use nvmeq->q_depth as the upper limit for a valid tag in nvme_handle_cqe(), it is not correct. Because the available tag number is recorded in tagset, which is not equal to nvmeq->q_depth. The nvme driver registers interrupts for queues before initializing the tagset, because it uses the number of successful request_irq() calls to configure the tagset parameters. This allows a race condition with the current tag validity check if the controller happens to produce an interrupt with a corrupted CQE before the tagset is initialized. Replace the driver's indirect tag check with the one already provided by the block layer. Signed-off-by: Xianting Tian Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit 59e330f8ff7ada7aa64fa422f6adf22a45152a7e Author: Keith Busch Date: Thu Sep 17 08:50:25 2020 -0700 nvme: return errors for hwmon init Initializing the nvme hwmon retrieves a log from the controller. If the controller is broken, we need to return the appropriate error so that subsequent initialization doesn't attempt to continue. Reported-by: Tong Zhang Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit c413c3102703a453c1312ce2160c6b7ffd55403e Author: Kai-Heng Feng Date: Tue Sep 15 18:39:23 2020 +0800 Revert "ALSA: usb-audio: Disable Lenovo P620 Rear line-in volume control" This reverts commit 34dedd2a83b241ba6aeb290260313c65dc58660e. According to Realtek, volume FU works for line-in. I can confirm volume control works after device firmware is updated. Fixes: 34dedd2a83b2 ("ALSA: usb-audio: Disable Lenovo P620 Rear line-in volume control") Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200915103925.12777-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit ce65d55f92a67e247f4d799e581cf9fed677871c Author: Vladimir Murzin Date: Tue Sep 22 14:58:45 2020 +0300 dmaengine: dmatest: Prevent to run on misconfigured channel Andy reported that commit 6b41030fdc79 ("dmaengine: dmatest: Restore default for channel") broke his scripts for the case where "busy" channel is used for configuration with expectation that run command would do nothing. Instead, behavior was (unintentionally) changed to treat such case as under-configuration and progress with defaults, i.e. run command would start a test with default setting for channel (which would use all channels). Restore original behavior with tracking status of channel setter so we can distinguish between misconfigured and under-configured cases in run command and act accordingly. Fixes: 6b41030fdc79 ("dmaengine: dmatest: Restore default for channel") Reported-by: Andy Shevchenko Tested-by: Andy Shevchenko Signed-off-by: Vladimir Murzin Tested-by: Peter Ujfalusi Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200922115847.30100-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit b5ddcffa37778244d5e786fe32f778edf2bfc93e Author: Anand Jain Date: Sat Sep 5 01:34:21 2020 +0800 btrfs: fix put of uninitialized kobject after seed device delete The following test case leads to NULL kobject free error: mount seed /mnt add sprout to /mnt umount /mnt mount sprout to /mnt delete seed kobject: '(null)' (00000000dd2b87e4): is not initialized, yet kobject_put() is being called. WARNING: CPU: 1 PID: 15784 at lib/kobject.c:736 kobject_put+0x80/0x350 RIP: 0010:kobject_put+0x80/0x350 :: Call Trace: btrfs_sysfs_remove_devices_dir+0x6e/0x160 [btrfs] btrfs_rm_device.cold+0xa8/0x298 [btrfs] btrfs_ioctl+0x206c/0x22a0 [btrfs] ksys_ioctl+0xe2/0x140 __x64_sys_ioctl+0x1e/0x29 do_syscall_64+0x96/0x150 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f4047c6288b :: This is because, at the end of the seed device-delete, we try to remove the seed's devid sysfs entry. But for the seed devices under the sprout fs, we don't initialize the devid kobject yet. So add a kobject state check, which takes care of the bug. Fixes: 668e48af7a94 ("btrfs: sysfs, add devid/dev_state kobject and device attributes") CC: stable@vger.kernel.org # 5.6+ Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit fdb29f4de1374483291232ae7515e5e7bb464762 Author: Dmitry Baryshkov Date: Thu Sep 10 16:59:51 2020 +0300 iio: adc: qcom-spmi-adc5: fix driver name Remove superfluous '.c' from qcom-spmi-adc5 device driver name. Fixes: e13d757279bb ("iio: adc: Add QCOM SPMI PMIC5 ADC driver") Signed-off-by: Dmitry Baryshkov Acked-by: Manivannan Sadhasivam Cc: Link: https://lore.kernel.org/r/20200910140000.324091-2-dmitry.baryshkov@linaro.org Signed-off-by: Jonathan Cameron commit 01ce6d4d2c8157b076425e3dd8319948652583c5 Author: Huacai Chen Date: Mon Aug 24 15:44:03 2020 +0800 MIPS: Loongson-3: Fix fp register access if MSA enabled If MSA is enabled, FPU_REG_WIDTH is 128 rather than 64, then get_fpr64() /set_fpr64() in the original unaligned instruction emulation code access the wrong fp registers. This is because the current code doesn't specify the correct index field, so fix it. Fixes: f83e4f9896eff614d0f2547a ("MIPS: Loongson-3: Add some unaligned instructions emulation") Signed-off-by: Huacai Chen Signed-off-by: Pei Huang Signed-off-by: Thomas Bogendoerfer commit b63c2eb1bfaaee9e328c7a53cb5d9b077cc59248 Merge: ba4f184e126b7 98477740630f2 Author: Jani Nikula Date: Tue Sep 22 13:15:19 2020 +0300 Merge remote-tracking branch 'origin/master' into drm-intel-fixes Direct backmerge to get commit 88b67edd7247 ("dax: Fix compilation for CONFIG_DAX && !CONFIG_FS_DAX") to fix CI build issues. Acked-by: Daniel Vetter Signed-off-by: Jani Nikula commit d0254f82d702a1d0d92e42f87676111de88846cf Author: Jacopo Mondi Date: Sat Sep 12 12:30:45 2020 +0200 media: dt-bindings: media: imx274: Convert to json-schema Convert the imx274 bindings document to json-schema and update the MAINTAINERS file accordingly. Reviewed-by: Luca Ceresoli Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 2f5fb555637eff4a3e5579f2323cd358c77efdc8 Author: Masami Hiramatsu Date: Mon Sep 21 18:45:11 2020 +0900 tools/bootconfig: Add testcase for tailing space Add testcases for removing/keeping tailing space in the value. Link: https://lkml.kernel.org/r/160068151151.1088739.3469541807296024227.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 1d210c166b693c3a659abbac4b58385c2d4cf887 Author: Masami Hiramatsu Date: Mon Sep 21 18:45:02 2020 +0900 tools/bootconfig: Add testcases for repeated key with brace Add a testcase for repeated key with brace parsing issue. Link: https://lkml.kernel.org/r/160068150176.1088739.409481347784771987.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit c7af4ecdffe1537ba8aeed0ac12c3326f908df43 Author: Masami Hiramatsu Date: Mon Sep 21 18:44:51 2020 +0900 lib/bootconfig: Fix to remove tailing spaces after value Fix to remove tailing spaces after value. If there is a space after value, the bootconfig failed to remove it because it applies strim() before replacing the delimiter with null. For example, foo = var # comment was parsed as below. foo="var " but user will expect foo="var" This fixes it by applying strim() after removing the delimiter. Link: https://lkml.kernel.org/r/160068149134.1088739.8868306567670058853.stgit@devnote2 Fixes: 76db5a27a827 ("bootconfig: Add Extra Boot Config support") Cc: Ingo Molnar Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit ead1e19ad905b97261f0ad7a98bb64abb9323b2b Author: Masami Hiramatsu Date: Mon Sep 21 18:44:42 2020 +0900 lib/bootconfig: Fix a bug of breaking existing tree nodes Fix a bug of breaking existing tree nodes by parsing the second and subsequent braces. Since the bootconfig parser uses the node.next field as a flag of current parent node, but this will break the existing tree if the same key node is specified again in the bootconfig. For example, the following bootconfig should be foo.buz and bar. foo bar foo { buz } However, when parsing the brace "{", it breaks foo->bar link by marking open-brace node. So the bootconfig unlinks bar from the bootconfig internal tree. This introduces a stack outside of the tree and record the last open-brace on the stack instead of using node.next field. Link: https://lkml.kernel.org/r/160068148267.1088739.8264704338030168660.stgit@devnote2 Fixes: 76db5a27a827 ("bootconfig: Add Extra Boot Config support") Cc: Ingo Molnar Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit b334ec66d4554a0af0471b1f21c477575c8c175d Merge: d5e4d0a5e692a 8194d8fa719f7 Author: David S. Miller Date: Mon Sep 21 17:40:53 2020 -0700 Merge branch 'Fix-broken-tc-flower-rules-for-mscc_ocelot-switches' Vladimir Oltean says: ==================== Fix broken tc-flower rules for mscc_ocelot switches All 3 switch drivers from the Ocelot family have the same bug in the VCAP IS2 key offsets, which is that some keys are in the incorrect order. ==================== Signed-off-by: David S. Miller commit 8194d8fa719f78007c0c4d5c721b6b0dfa290f81 Author: Vladimir Oltean Date: Tue Sep 22 01:56:38 2020 +0300 net: mscc: ocelot: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries The IS2 IP4_TCP_UDP key offsets do not correspond to the VSC7514 datasheet. Whether they work or not is unknown to me. On VSC9959 and VSC9953, with the same mistake and same discrepancy from the documentation, tc-flower src_port and dst_port rules did not work, so I am assuming the same is true here. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7a0230759ea6795af037f3fd9526d00dc896ce19 Author: Vladimir Oltean Date: Tue Sep 22 01:56:37 2020 +0300 net: dsa: seville: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries Since these were copied from the Felix VCAP IS2 code, and only the offsets were adjusted, the order of the bit fields is still wrong. Fix it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8b9e03cd08250c60409099c791e858157838d9eb Author: Xiaoliang Yang Date: Tue Sep 22 01:56:36 2020 +0300 net: dsa: felix: fix some key offsets for IP4_TCP_UDP VCAP IS2 entries Some of the IS2 IP4_TCP_UDP keys are not correct, like L4_DPORT, L4_SPORT and other L4 keys. This prevents offloaded tc-flower rules from matching on src_port and dst_port for TCP and UDP packets. Signed-off-by: Xiaoliang Yang Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d5e4d0a5e692a942f0c212e37dc6aeac47ecbdea Author: Eric Dumazet Date: Mon Sep 21 07:27:20 2020 -0700 inet_diag: validate INET_DIAG_REQ_PROTOCOL attribute User space could send an invalid INET_DIAG_REQ_PROTOCOL attribute as caught by syzbot. BUG: KMSAN: uninit-value in inet_diag_lock_handler net/ipv4/inet_diag.c:55 [inline] BUG: KMSAN: uninit-value in __inet_diag_dump+0x58c/0x720 net/ipv4/inet_diag.c:1147 CPU: 0 PID: 8505 Comm: syz-executor174 Not tainted 5.9.0-rc4-syzkaller #0 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+0x21c/0x280 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:122 __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:219 inet_diag_lock_handler net/ipv4/inet_diag.c:55 [inline] __inet_diag_dump+0x58c/0x720 net/ipv4/inet_diag.c:1147 inet_diag_dump_compat+0x2a5/0x380 net/ipv4/inet_diag.c:1254 netlink_dump+0xb73/0x1cb0 net/netlink/af_netlink.c:2246 __netlink_dump_start+0xcf2/0xea0 net/netlink/af_netlink.c:2354 netlink_dump_start include/linux/netlink.h:246 [inline] inet_diag_rcv_msg_compat+0x5da/0x6c0 net/ipv4/inet_diag.c:1288 sock_diag_rcv_msg+0x24f/0x620 net/core/sock_diag.c:256 netlink_rcv_skb+0x6d7/0x7e0 net/netlink/af_netlink.c:2470 sock_diag_rcv+0x63/0x80 net/core/sock_diag.c:275 netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline] netlink_unicast+0x11c8/0x1490 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x173a/0x1840 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] ____sys_sendmsg+0xc82/0x1240 net/socket.c:2353 ___sys_sendmsg net/socket.c:2407 [inline] __sys_sendmsg+0x6d1/0x820 net/socket.c:2440 __do_sys_sendmsg net/socket.c:2449 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2447 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2447 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x441389 Code: e8 fc 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 1b 09 fc ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fff3b02ce98 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441389 RDX: 0000000000000000 RSI: 0000000020001500 RDI: 0000000000000003 RBP: 00000000006cb018 R08: 00000000004002c8 R09: 00000000004002c8 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000402130 R13: 00000000004021c0 R14: 0000000000000000 R15: 0000000000000000 Uninit was created at: kmsan_save_stack_with_flags mm/kmsan/kmsan.c:143 [inline] kmsan_internal_poison_shadow+0x66/0xd0 mm/kmsan/kmsan.c:126 kmsan_slab_alloc+0x8a/0xe0 mm/kmsan/kmsan_hooks.c:80 slab_alloc_node mm/slub.c:2907 [inline] __kmalloc_node_track_caller+0x9aa/0x12f0 mm/slub.c:4511 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0x35f/0xb30 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1094 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1176 [inline] netlink_sendmsg+0xdb9/0x1840 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] ____sys_sendmsg+0xc82/0x1240 net/socket.c:2353 ___sys_sendmsg net/socket.c:2407 [inline] __sys_sendmsg+0x6d1/0x820 net/socket.c:2440 __do_sys_sendmsg net/socket.c:2449 [inline] __se_sys_sendmsg+0x97/0xb0 net/socket.c:2447 __x64_sys_sendmsg+0x4a/0x70 net/socket.c:2447 do_syscall_64+0x9f/0x140 arch/x86/entry/common.c:48 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 3f935c75eb52 ("inet_diag: support for wider protocol numbers") Signed-off-by: Eric Dumazet Cc: Paolo Abeni Cc: Christoph Paasch Cc: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit 99f62a746066fa436aa15d4606a538569540db08 Author: Vladimir Oltean Date: Tue Sep 22 01:07:09 2020 +0300 net: bridge: br_vlan_get_pvid_rcu() should dereference the VLAN group under RCU When calling the RCU brother of br_vlan_get_pvid(), lockdep warns: ============================= WARNING: suspicious RCU usage 5.9.0-rc3-01631-g13c17acb8e38-dirty #814 Not tainted ----------------------------- net/bridge/br_private.h:1054 suspicious rcu_dereference_protected() usage! Call trace: lockdep_rcu_suspicious+0xd4/0xf8 __br_vlan_get_pvid+0xc0/0x100 br_vlan_get_pvid_rcu+0x78/0x108 The warning is because br_vlan_get_pvid_rcu() calls nbp_vlan_group() which calls rtnl_dereference() instead of rcu_dereference(). In turn, rtnl_dereference() calls rcu_dereference_protected() which assumes operation under an RCU write-side critical section, which obviously is not the case here. So, when the incorrect primitive is used to access the RCU-protected VLAN group pointer, READ_ONCE() is not used, which may cause various unexpected problems. I'm sad to say that br_vlan_get_pvid() and br_vlan_get_pvid_rcu() cannot share the same implementation. So fix the bug by splitting the 2 functions, and making br_vlan_get_pvid_rcu() retrieve the VLAN groups under proper locking annotations. Fixes: 7582f5b70f9a ("bridge: add br_vlan_get_pvid_rcu()") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 47cec3f68c6ca33fdfe381934c6c581cd716df96 Merge: 2b617c11d7c07 cb39ccc5cbe10 Author: David S. Miller Date: Mon Sep 21 17:32:42 2020 -0700 Merge tag 'mlx5-fixes-2020-09-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes-2020-09-18 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. v1->v2: Remove missing patch from -stable list. For -stable v5.1 ('net/mlx5: Fix FTE cleanup') For -stable v5.3 ('net/mlx5e: TLS, Do not expose FPGA TLS counter if not supported') ('net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported') For -stable v5.7 ('net/mlx5e: Fix memory leak of tunnel info when rule under multipath not ready') For -stable v5.8 ('net/mlx5e: Use RCU to protect rq->xdp_prog') ('net/mlx5e: Fix endianness when calculating pedit mask first bit') ('net/mlx5e: Use synchronize_rcu to sync with NAPI') ==================== Signed-off-by: David S. Miller commit 2b617c11d7c0791a18402407222ca9f2c343c47b Author: Sean Wang Date: Tue Sep 22 07:09:23 2020 +0800 net: Update MAINTAINERS for MediaTek switch driver Update maintainers for MediaTek switch driver with Landen Chao who is familiar with MediaTek MT753x switch devices and will help maintenance from the vendor side. Cc: Steven Liu Signed-off-by: Sean Wang Signed-off-by: Landen Chao Signed-off-by: David S. Miller commit cb39ccc5cbe1011d8d21886b75e2468070ac672c Author: Saeed Mahameed Date: Fri Sep 11 11:00:06 2020 -0700 net/mlx5e: mlx5e_fec_in_caps() returns a boolean Returning errno is a bug, fix that. Also fixes smatch warnings: drivers/net/ethernet/mellanox/mlx5/core/en/port.c:453 mlx5e_fec_in_caps() warn: signedness bug returning '(-95)' Fixes: 2132b71f78d2 ("net/mlx5e: Advertise globaly supported FEC modes") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Saeed Mahameed Reviewed-by: Moshe Shemesh Reviewed-by: Aya Levin commit 94c4fed710c372313157f20b5eced39d04a96f88 Author: Saeed Mahameed Date: Mon Sep 7 22:54:43 2020 -0700 net/mlx5e: kTLS, Avoid kzalloc(GFP_KERNEL) under spinlock The spinlock only needed when accessing the channel's icosq, grab the lock after the buf allocation in resync_post_get_progress_params() to avoid kzalloc(GFP_KERNEL) in atomic context. Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Reported-by: YueHaibing Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan commit 581642f32f33017619355b7d91704c152df1fc2d Author: Saeed Mahameed Date: Thu Sep 10 21:16:04 2020 -0700 net/mlx5e: kTLS, Fix leak on resync error flow Resync progress params buffer and dma weren't released on error, Add missing error unwinding for resync_post_get_progress_params(). Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan commit 66ce5fc05713e6b90f74c01439f2aaa137ffd9f4 Author: Saeed Mahameed Date: Mon Sep 7 22:58:50 2020 -0700 net/mlx5e: kTLS, Add missing dma_unmap in RX resync Progress params dma address is never unmapped, unmap it when completion handling is over. Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Signed-off-by: Saeed Mahameed Reviewed-by: Tariq Toukan commit 6e8de0b6b4690ba7a685db33801bf7536bac674f Author: Tariq Toukan Date: Mon Aug 10 15:59:41 2020 +0300 net/mlx5e: kTLS, Fix napi sync and possible use-after-free Using synchronize_rcu() is sufficient to wait until running NAPI quits. See similar upstream fix with detailed explanation: ("net/mlx5e: Use synchronize_rcu to sync with NAPI") This change also fixes a possible use-after-free as the NAPI might be already released at this stage. Fixes: 0419d8c9d8f8 ("net/mlx5e: kTLS, Add kTLS RX resync support") Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 8f0bcd19b1da3f264223abea985b9462e85a3718 Author: Tariq Toukan Date: Sun Jun 28 13:06:06 2020 +0300 net/mlx5e: TLS, Do not expose FPGA TLS counter if not supported The set of TLS TX global SW counters in mlx5e_tls_sw_stats_desc is updated from all rings by using atomic ops. This set of stats is used only in the FPGA TLS use case, not in the Connect-X TLS one, where regular per-ring counters are used. Do not expose them in the Connect-X use case, as this would cause counter duplication. For example, tx_tls_drop_no_sync_data would appear twice in the ethtool stats. Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support") Signed-off-by: Tariq Toukan Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit b521105b68a2e3334d69202fb354d7b711b01aa3 Author: Alaa Hleihel Date: Tue Aug 25 10:41:50 2020 +0300 net/mlx5e: Fix using wrong stats_grps in mlx5e_update_ndo_stats() The cited commit started to reuse function mlx5e_update_ndo_stats() for the representors as well. However, the function is hard-coded to work on mlx5e_nic_stats_grps only. Due to this issue, the representors statistics were not updated in the output of "ip -s". Fix it to work with the correct group by extracting it from the caller's profile. Also, while at it and since this function became generic, move it to en_stats.c and rename it accordingly. Fixes: 8a236b15144b ("net/mlx5e: Convert rep stats to mlx5e_stats_grp-based infra") Signed-off-by: Alaa Hleihel Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 47c97e6b10a1e3680cad539929da092bfa535446 Author: Ron Diskin Date: Sun May 10 14:39:51 2020 +0300 net/mlx5e: Fix multicast counter not up-to-date in "ip -s" Currently the FW does not generate events for counters other than error counters. Unlike ".get_ethtool_stats", ".ndo_get_stats64" (which ip -s uses) might run in atomic context, while the FW interface is non atomic. Thus, 'ip' is not allowed to issue FW commands, so it will only display cached counters in the driver. Add a SW counter (mcast_packets) in the driver to count rx multicast packets. The counter also counts broadcast packets, as we consider it a special case of multicast. Use the counter value when calling "ip -s"/"ifconfig". Fixes: f62b8bb8f2d3 ("net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality") Signed-off-by: Ron Diskin Reviewed-by: Tariq Toukan Reviewed-by: Moshe Shemesh Signed-off-by: Saeed Mahameed commit 82198d8bcdeff01d19215d712aa55031e21bccbc Author: Maor Dickman Date: Wed Sep 2 16:49:52 2020 +0300 net/mlx5e: Fix endianness when calculating pedit mask first bit The field mask value is provided in network byte order and has to be converted to host byte order before calculating pedit mask first bit. Fixes: 88f30bbcbaaa ("net/mlx5e: Bit sized fields rewrite support") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 6cec0229ab1959259e71e9a5bbe47c04577950b1 Author: Maor Dickman Date: Wed Aug 5 17:56:04 2020 +0300 net/mlx5e: Enable adding peer miss rules only if merged eswitch is supported The cited commit creates peer miss group during switchdev mode initialization in order to handle miss packets correctly while in VF LAG mode. This is done regardless of FW support of such groups which could cause rules setups failure later on. Fix by adding FW capability check before creating peer groups/rule. Fixes: ac004b832128 ("net/mlx5e: E-Switch, Add peer miss rules") Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed commit 4c8594adb9d9250120cffc57a7175a1a09f2b084 Author: Roi Dayan Date: Sun Jul 26 16:37:47 2020 +0300 net/mlx5e: CT: Fix freeing ct_label mapping Add missing mapping remove call when removing ct rule, as the mapping was allocated when ct rule was adding with ct_label. Also there is a missing mapping remove call in error flow. Fixes: 54b154ecfb8c ("net/mlx5e: CT: Map 128 bits labels to 32 bit map ID") Signed-off-by: Roi Dayan Reviewed-by: Eli Britstein Signed-off-by: Saeed Mahameed commit 12a240a41427d37b5e70570700704e84c827452f Author: Jianbo Liu Date: Tue Jul 7 06:16:24 2020 +0000 net/mlx5e: Fix memory leak of tunnel info when rule under multipath not ready When deleting vxlan flow rule under multipath, tun_info in parse_attr is not freed when the rule is not ready. Fixes: ef06c9ee8933 ("net/mlx5e: Allow one failure when offloading tc encap rules under multipath") Signed-off-by: Jianbo Liu Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 9c25a22dfb00270372224721fed646965420323a Author: Maxim Mikityanskiy Date: Thu Jun 11 14:25:19 2020 +0300 net/mlx5e: Use synchronize_rcu to sync with NAPI As described in the previous commit, napi_synchronize doesn't quite fit the purpose when we just need to wait until the currently running NAPI quits. Its implementation waits until NAPI is not running by polling and waiting for 1ms in between. In cases where we need to deactivate one queue (e.g., recovery flows) or where we deactivate them one-by-one (deactivate channel flow), we may get stuck in napi_synchronize forever if other queues keep NAPI active, causing a soft lockup. Depending on kernel configuration (CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC), it may result in a kernel panic. To fix the issue, use synchronize_rcu to wait for NAPI to quit, and wrap the whole NAPI in rcu_read_lock. Fixes: acc6c5953af1 ("net/mlx5e: Split open/close channels to stages") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit fe45386a208277cae4648106133c08246eecd012 Author: Maxim Mikityanskiy Date: Thu Jun 11 13:55:19 2020 +0300 net/mlx5e: Use RCU to protect rq->xdp_prog Currently, the RQs are temporarily deactivated while hot-replacing the XDP program, and napi_synchronize is used to make sure rq->xdp_prog is not in use. However, napi_synchronize is not ideal: instead of waiting till the end of a NAPI cycle, it polls and waits until NAPI is not running, sleeping for 1ms between the periodic checks. Under heavy workloads, this loop will never end, which may even lead to a kernel panic if the kernel detects the hangup. Such workloads include XSK TX and possibly also heavy RX (XSK or normal). The fix is inspired by commit 326fe02d1ed6 ("net/mlx4_en: protect ring->xdp_prog with rcu_read_lock"). As mlx5e_xdp_handle is already protected by rcu_read_lock, and bpf_prog_put uses call_rcu to free the program, there is no need for additional synchronization if proper RCU functions are used to access the pointer. This patch converts all accesses to rq->xdp_prog to use RCU functions. Fixes: 86994156c736 ("net/mlx5e: XDP fast RX drop bpf programs support") Fixes: db05815b36cb ("net/mlx5e: Add XSK zero-copy support") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit cefc23554fc259114e78a7b0908aac4610ee18eb Author: Maor Gottlieb Date: Mon Aug 31 20:50:42 2020 +0300 net/mlx5: Fix FTE cleanup Currently, when an FTE is allocated, its refcount is decreased to 0 with the purpose it will not be a stand alone steering object and every rule (destination) of the FTE would increase the refcount. When mlx5_cleanup_fs is called while not all rules were deleted by the steering users, it hit refcount underflow on the FTE once clean_tree calls to tree_remove_node after the deleted rules already decreased the refcount to 0. FTE is no longer destroyed implicitly when the last rule (destination) is deleted. mlx5_del_flow_rules avoids it by increasing the refcount on the FTE and destroy it explicitly after all rules were deleted. So we can avoid the refcount underflow by making FTE as stand alone object. In addition need to set del_hw_func to FTE so the HW object will be destroyed when the FTE is deleted from the cleanup_tree flow. refcount_t: underflow; use-after-free. WARNING: CPU: 2 PID: 15715 at lib/refcount.c:28 refcount_warn_saturate+0xd9/0xe0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: tree_put_node+0xf2/0x140 [mlx5_core] clean_tree+0x4e/0xf0 [mlx5_core] clean_tree+0x4e/0xf0 [mlx5_core] clean_tree+0x4e/0xf0 [mlx5_core] clean_tree+0x5f/0xf0 [mlx5_core] clean_tree+0x4e/0xf0 [mlx5_core] clean_tree+0x5f/0xf0 [mlx5_core] mlx5_cleanup_fs+0x26/0x270 [mlx5_core] mlx5_unload+0x2e/0xa0 [mlx5_core] mlx5_unload_one+0x51/0x120 [mlx5_core] mlx5_devlink_reload_down+0x51/0x90 [mlx5_core] devlink_reload+0x39/0x120 ? devlink_nl_cmd_reload+0x43/0x220 genl_rcv_msg+0x1e4/0x420 ? genl_family_rcv_msg_attrs_parse+0x100/0x100 netlink_rcv_skb+0x47/0x110 genl_rcv+0x24/0x40 netlink_unicast+0x217/0x2f0 netlink_sendmsg+0x30f/0x430 sock_sendmsg+0x30/0x40 __sys_sendto+0x10e/0x140 ? handle_mm_fault+0xc4/0x1f0 ? do_page_fault+0x33f/0x630 __x64_sys_sendto+0x24/0x30 do_syscall_64+0x48/0x130 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 718ce4d601db ("net/mlx5: Consolidate update FTE for all removal changes") Fixes: bd71b08ec2ee ("net/mlx5: Support multiple updates of steering rules in parallel") Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit cf9c37865557d39292d82da29e9ebda1dbc584b3 Author: Mike Snitzer Date: Mon Sep 21 19:08:30 2020 -0400 dm: fix comment in dm_process_bio() Refer to the correct function (->submit_bio instead of ->queue_bio). Also, add details about why using blk_queue_split() isn't needed for dm_wq_work()'s call to dm_process_bio(). Fixes: c62b37d96b6eb ("block: move ->make_request_fn to struct block_device_operations") Signed-off-by: Mike Snitzer commit ee1dfad5325ff1cfb2239e564cd411b3bfe8667a Author: Mike Snitzer Date: Mon Sep 14 13:04:19 2020 -0400 dm: fix bio splitting and its bio completion order for regular IO dm_queue_split() is removed because __split_and_process_bio() _must_ handle splitting bios to ensure proper bio submission and completion ordering as a bio is split. Otherwise, multiple recursive calls to ->submit_bio will cause multiple split bios to be allocated from the same ->bio_split mempool at the same time. This would result in deadlock in low memory conditions because no progress could be made (only one bio is available in ->bio_split mempool). This fix has been verified to still fix the loss of performance, due to excess splitting, that commit 120c9257f5f1 provided. Fixes: 120c9257f5f1 ("Revert "dm: always call blk_queue_split() in dm_process_bio()"") Cc: stable@vger.kernel.org # 5.0+, requires custom backport due to 5.9 changes Reported-by: Ming Lei Signed-off-by: Mike Snitzer commit 25b8ab916dd7a1f490b603d68c7765c06f9ed9e1 Merge: 91b2c9a0fdb56 75bcbd6913de6 Author: David S. Miller Date: Mon Sep 21 14:54:35 2020 -0700 Merge tag 'mac80211-for-net-2020-09-21' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just a few fixes: * fix using HE on 2.4 GHz * AQL (airtime queue limit) estimation & VHT160 fix * do not oversize A-MPDUs if local capability is smaller than peer's * fix radiotap on 6 GHz to not put 2.4 GHz flag * fix Kconfig for lib80211 * little fixlet for 6 GHz channel number / frequency conversion ==================== Signed-off-by: David S. Miller commit 91b2c9a0fdb56e3d7eb6bf06a39ad7a50f000916 Author: Xu Wang Date: Mon Sep 21 06:38:56 2020 +0000 ipv6: route: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Xu Wang Signed-off-by: David S. Miller commit 53c14e237b0128aed9e2f1ab3700c46fdad36ebc Merge: 3c68e90fdb65d 5ad284ab3a01e Author: Linus Walleij Date: Mon Sep 21 23:38:47 2020 +0200 Merge tag 'gpio-fixes-for-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.9-rc6 - fix the interrupt configuration in gpio-tc35894 - explicitly support only threaded irqs in gpio-siox - fix a resource leak in error path in gpio-mockup - fix line event handling in syscall compatible mode in GPIO chardev commit 921daeeca91bda2dfb57fcba9f69ff368083be4b Author: Hans de Goede Date: Fri Sep 4 19:21:41 2020 +0200 pinctrl: cherryview: Preserve CHV_PADCTRL1_INVRXTX_TXDATA flag on GPIOs One some devices the GPIO should output the inverted value from what device-drivers / ACPI code expects. The reason for this is unknown, perhaps these systems use an external buffer chip on the GPIO which inverts the signal. The BIOS makes this work by setting the CHV_PADCTRL1_INVRXTX_TXDATA flag. Before this commit we would unconditionally clear all INVRXTX flags, including the CHV_PADCTRL1_INVRXTX_TXDATA flag when a GPIO is requested by a driver (from chv_gpio_request_enable()). This breaks systems using this setup. Specifically it is causing problems for systems with a goodix touchscreen, where the BIOS sets the INVRXTX_TXDATA flag on the GPIO used for the touchscreen's reset pin. The goodix touchscreen driver by defaults configures this pin as input (relying on the pull-up to keep it high), but the clearing of the INVRXTX_TXDATA flag done by chv_gpio_request_enable() causes it to be driven low for a brief time before the GPIO gets set to input mode. This causes the touchscreen controller to get reset. On most CHT devs with this touchscreen this leads to: [ 31.596534] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -121 The driver retries this though and then everything is fine. But during reset the touchscreen uses its interrupt pin as bootstrap to determine which i2c address to use and on the Acer One S1003 the spurious reset caused by the clearing of the INVRXTX_TXDATA flag causes the controller to come back up again on the wrong i2c address, breaking things. This commit fixes both the -121 errors, as well as the total breakage on the Acer One S1003, by making chv_gpio_clear_triggering() not clear the INVRXTX_TXDATA flag if the pin is already configured as a GPIO. Note that chv_pinmux_set_mux() does still unconditionally clear the flag, so this only affects GPIO usage. Fixes: a7d4b171660c ("Input: goodix - add support for getting IRQ + reset GPIOs on Cherry Trail devices") Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij commit 58ed68b592377f7483bcbff937567d8cbaab38ed Author: Dan Carpenter Date: Fri Sep 18 17:33:11 2020 +0300 sfc: Fix error code in probe This failure path should return a negative error code but it currently returns success. Fixes: 51b35a454efd ("sfc: skeleton EF100 PF driver") Signed-off-by: Dan Carpenter Acked-by: Edward Cree Signed-off-by: David S. Miller commit b867eef4cf548cd9541225aadcdcee644669b9e1 Author: Chris Packham Date: Fri Sep 4 12:28:12 2020 +1200 spi: fsl-espi: Only process interrupts for expected events The SPIE register contains counts for the TX FIFO so any time the irq handler was invoked we would attempt to process the RX/TX fifos. Use the SPIM value to mask the events so that we only process interrupts that were expected. This was a latent issue exposed by commit 3282a3da25bd ("powerpc/64: Implement soft interrupt replay in C"). Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20200904002812.7300-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Mark Brown commit 05669b63170771d554854c0e465b76dc98fc7c84 Author: Dmitry Baryshkov Date: Thu Sep 17 18:34:05 2020 +0300 regmap: fix page selection for noinc writes Non-incrementing writes can fail if register + length crosses page border. However for non-incrementing writes we should not check for page border crossing. Fix this by passing additional flag to _regmap_raw_write and passing length to _regmap_select_page basing on the flag. Signed-off-by: Dmitry Baryshkov Fixes: cdf6b11daa77 ("regmap: Add regmap_noinc_write API") Link: https://lore.kernel.org/r/20200917153405.3139200-2-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown commit 4003324856311faebb46cbd56a1616bd3f3b67c2 Author: Dmitry Baryshkov Date: Thu Sep 17 18:34:04 2020 +0300 regmap: fix page selection for noinc reads Non-incrementing reads can fail if register + length crosses page border. However for non-incrementing reads we should not check for page border crossing. Fix this by passing additional flag to _regmap_raw_read and passing length to _regmap_select_page basing on the flag. Signed-off-by: Dmitry Baryshkov Fixes: 74fe7b551f33 ("regmap: Add regmap_noinc_read API") Link: https://lore.kernel.org/r/20200917153405.3139200-1-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown commit 1245008122d7311683d70c05b2eea167a314fb5f Author: Tony Ambardar Date: Sat Sep 19 22:01:35 2020 -0700 libbpf: Fix native endian assumption when parsing BTF Code in btf__parse_raw() fails to detect raw BTF of non-native endianness and assumes it must be ELF data, which then fails to parse as ELF and yields a misleading error message: root:/# bpftool btf dump file /sys/kernel/btf/vmlinux libbpf: failed to get EHDR from /sys/kernel/btf/vmlinux For example, this could occur after cross-compiling a BTF-enabled kernel for a target with non-native endianness, which is currently unsupported. Check for correct endianness and emit a clearer error message: root:/# bpftool btf dump file /sys/kernel/btf/vmlinux libbpf: non-native BTF endianness is not supported Fixes: 94a1fedd63ed ("libbpf: Add btf__parse_raw() and generic btf__parse() APIs") Signed-off-by: Tony Ambardar Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/90f81508ecc57bc0da318e0fe0f45cfe49b17ea7.1600417359.git.Tony.Ambardar@gmail.com commit 65c204398928f9c79f1a29912b410439f7052635 Author: Tony Ambardar Date: Sat Sep 19 22:01:34 2020 -0700 bpf: Prevent .BTF section elimination Systems with memory or disk constraints often reduce the kernel footprint by configuring LD_DEAD_CODE_DATA_ELIMINATION. However, this can result in removal of any BTF information. Use the KEEP() macro to preserve the BTF data as done with other important sections, while still allowing for smaller kernels. Fixes: 90ceddcb4950 ("bpf: Support llvm-objcopy for vmlinux BTF") Signed-off-by: Tony Ambardar Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/a635b5d3e2da044e7b51ec1315e8910fbce0083f.1600417359.git.Tony.Ambardar@gmail.com commit e23bb04b0c938588eae41b7f4712b722290ed2b8 Author: Tony Ambardar Date: Sat Sep 19 22:01:33 2020 -0700 bpf: Fix sysfs export of empty BTF section If BTF data is missing or removed from the ELF section it is still exported via sysfs as a zero-length file: root@OpenWrt:/# ls -l /sys/kernel/btf/vmlinux -r--r--r-- 1 root root 0 Jul 18 02:59 /sys/kernel/btf/vmlinux Moreover, reads from this file succeed and leak kernel data: root@OpenWrt:/# hexdump -C /sys/kernel/btf/vmlinux|head -10 000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000cc0 00 00 00 00 00 00 00 00 00 00 00 00 80 83 b0 80 |................| 000cd0 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000ce0 00 00 00 00 00 00 00 00 00 00 00 00 57 ac 6e 9d |............W.n.| 000cf0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 002650 00 00 00 00 00 00 00 10 00 00 00 01 00 00 00 01 |................| 002660 80 82 9a c4 80 85 97 80 81 a9 51 68 00 00 00 02 |..........Qh....| 002670 80 25 44 dc 80 85 97 80 81 a9 50 24 81 ab c4 60 |.%D.......P$...`| This situation was first observed with kernel 5.4.x, cross-compiled for a MIPS target system. Fix by adding a sanity-check for export of zero-length data sections. Fixes: 341dfcf8d78e ("btf: expose BTF info through sysfs") Signed-off-by: Tony Ambardar Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/b38db205a66238f70823039a8c531535864eaac5.1600417359.git.Tony.Ambardar@gmail.com commit 98477740630f270aecf648f1d6a9dbc6027d4ff1 Merge: beaeb4f39bc31 78edc005f477a Author: Linus Torvalds Date: Mon Sep 21 12:42:31 2020 -0700 Merge branch 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull RCU fix from Paul McKenney: "This contains a single commit that fixes a bug that was introduced in the last merge window. This bug causes a compiler warning complaining about show_rcu_tasks_classic_gp_kthread() being an unused static function in !SMP kernels. The fix is straightforward, just adding an 'inline' to make this a static inline function, thus avoiding the warning. This bug was reported by Laurent Pinchart, who would like it fixed sooner rather than later" * 'rcu/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: rcu-tasks: Prevent complaints of unused show_rcu_tasks_classic_gp_kthread() commit beaeb4f39bc31d5a5eb6d05465a86af4fe147732 Merge: a31128384dfd9 32251b07d5321 Author: Linus Torvalds Date: Mon Sep 21 08:53:48 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "ARM: - fix fault on page table writes during instruction fetch s390: - doc improvement x86: - The obvious patches are always the ones that turn out to be completely broken. /me hangs his head in shame" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: Revert "KVM: Check the allocation of pv cpu mask" KVM: arm64: Remove S1PTW check from kvm_vcpu_dabt_iswrite() KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch docs: kvm: add documentation for KVM_CAP_S390_DIAG318 commit a31128384dfd9ca11f15ef4ea73df25e394846d1 Merge: ba4f184e126b7 88b67edd72474 Author: Linus Torvalds Date: Mon Sep 21 08:46:20 2020 -0700 Merge tag 'libnvdimm-fixes-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Dan Williams: "Fix compilation for the new dax_supported() exported helper" * tag 'libnvdimm-fixes-5.9-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Fix compilation for CONFIG_DAX && !CONFIG_FS_DAX commit 13a9a9d74d4d9689ad65938966dbc66386063648 Author: Chuck Lever Date: Sun Sep 20 13:46:25 2020 -0400 SUNRPC: Fix svc_flush_dcache() On platforms that implement flush_dcache_page(), a large NFS WRITE triggers the WARN_ONCE in bvec_iter_advance(): Sep 20 14:01:05 klimt.1015granger.net kernel: Attempted to advance past end of bvec iter Sep 20 14:01:05 klimt.1015granger.net kernel: WARNING: CPU: 0 PID: 1032 at include/linux/bvec.h:101 bvec_iter_advance.isra.0+0xa7/0x158 [sunrpc] Sep 20 14:01:05 klimt.1015granger.net kernel: Call Trace: Sep 20 14:01:05 klimt.1015granger.net kernel: svc_tcp_recvfrom+0x60c/0x12c7 [sunrpc] Sep 20 14:01:05 klimt.1015granger.net kernel: ? bvec_iter_advance.isra.0+0x158/0x158 [sunrpc] Sep 20 14:01:05 klimt.1015granger.net kernel: ? del_timer_sync+0x4b/0x55 Sep 20 14:01:05 klimt.1015granger.net kernel: ? test_bit+0x1d/0x27 [sunrpc] Sep 20 14:01:05 klimt.1015granger.net kernel: svc_recv+0x1193/0x15e4 [sunrpc] Sep 20 14:01:05 klimt.1015granger.net kernel: ? try_to_freeze.isra.0+0x6f/0x6f [sunrpc] Sep 20 14:01:05 klimt.1015granger.net kernel: ? refcount_sub_and_test.constprop.0+0x13/0x40 [sunrpc] Sep 20 14:01:05 klimt.1015granger.net kernel: ? svc_xprt_put+0x1e/0x29f [sunrpc] Sep 20 14:01:05 klimt.1015granger.net kernel: ? svc_send+0x39f/0x3c1 [sunrpc] Sep 20 14:01:05 klimt.1015granger.net kernel: nfsd+0x282/0x345 [nfsd] Sep 20 14:01:05 klimt.1015granger.net kernel: ? __kthread_parkme+0x74/0xba Sep 20 14:01:05 klimt.1015granger.net kernel: kthread+0x2ad/0x2bc Sep 20 14:01:05 klimt.1015granger.net kernel: ? nfsd_destroy+0x124/0x124 [nfsd] Sep 20 14:01:05 klimt.1015granger.net kernel: ? test_bit+0x1d/0x27 Sep 20 14:01:05 klimt.1015granger.net kernel: ? kthread_mod_delayed_work+0x115/0x115 Sep 20 14:01:05 klimt.1015granger.net kernel: ret_from_fork+0x22/0x30 Reported-by: He Zhe Fixes: ca07eda33e01 ("SUNRPC: Refactor svc_recvfrom()") Signed-off-by: Chuck Lever commit 36050d8984ab743f9990a2eb97a0062fdc3d7bbd Author: Ulf Hansson Date: Fri Sep 4 08:47:05 2020 +0200 cpuidle: psci: Fix suspicious RCU usage The commit eb1f00237aca ("lockdep,trace: Expose tracepoints"), started to expose us for tracepoints. This lead to the following RCU splat on an ARM64 Qcom board. [ 5.529634] WARNING: suspicious RCU usage [ 5.537307] sdhci-pltfm: SDHCI platform and OF driver helper [ 5.541092] 5.9.0-rc3 #86 Not tainted [ 5.541098] ----------------------------- [ 5.541105] ../include/trace/events/lock.h:37 suspicious rcu_dereference_check() usage! [ 5.541110] [ 5.541110] other info that might help us debug this: [ 5.541110] [ 5.541116] [ 5.541116] rcu_scheduler_active = 2, debug_locks = 1 [ 5.541122] RCU used illegally from extended quiescent state! [ 5.541129] no locks held by swapper/0/0. [ 5.541134] [ 5.541134] stack backtrace: [ 5.541143] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.9.0-rc3 #86 [ 5.541149] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT) [ 5.541157] Call trace: [ 5.568185] sdhci_msm 7864900.sdhci: Got CD GPIO [ 5.574186] dump_backtrace+0x0/0x1c8 [ 5.574206] show_stack+0x14/0x20 [ 5.574229] dump_stack+0xe8/0x154 [ 5.574250] lockdep_rcu_suspicious+0xd4/0xf8 [ 5.574269] lock_acquire+0x3f0/0x460 [ 5.574292] _raw_spin_lock_irqsave+0x80/0xb0 [ 5.574314] __pm_runtime_suspend+0x4c/0x188 [ 5.574341] psci_enter_domain_idle_state+0x40/0xa0 [ 5.574362] cpuidle_enter_state+0xc0/0x610 [ 5.646487] cpuidle_enter+0x38/0x50 [ 5.650651] call_cpuidle+0x18/0x40 [ 5.654467] do_idle+0x228/0x278 [ 5.657678] cpu_startup_entry+0x24/0x70 [ 5.661153] rest_init+0x1a4/0x278 [ 5.665061] arch_call_rest_init+0xc/0x14 [ 5.668272] start_kernel+0x508/0x540 Following the path in pm_runtime_put_sync_suspend() from psci_enter_domain_idle_state(), it seems like we end up using the RCU. Therefore, let's simply silence the splat by informing the RCU about it with RCU_NONIDLE. Note that, this is a temporary solution. Instead we should strive to avoid using RCU_NONIDLE (and similar), but rather push rcu_idle_enter|exit() further down, closer to the arch specific code. However, as the CPU PM notifiers are also using the RCU, additional rework is needed. Reported-by: Naresh Kamboju Signed-off-by: Ulf Hansson Acked-by: Paul E. McKenney Signed-off-by: Rafael J. Wysocki commit 88b67edd7247466bc47f01e1dc539b0d0d4b931e Author: Jan Kara Date: Mon Sep 21 11:33:23 2020 +0200 dax: Fix compilation for CONFIG_DAX && !CONFIG_FS_DAX dax_supported() is defined whenever CONFIG_DAX is enabled. So dummy implementation should be defined only in !CONFIG_DAX case, not in !CONFIG_FS_DAX case. Fixes: e2ec51282545 ("dm: Call proper helper to determine dax support") Cc: Reported-by: Geert Uytterhoeven Reported-by: Naresh Kamboju Reported-by: kernel test robot Signed-off-by: Jan Kara Signed-off-by: Dan Williams commit 4eb8dded6b82e184c09bb963bea0335fa3f30b55 Author: Jens Axboe Date: Fri Sep 18 19:36:24 2020 -0600 io_uring: fix openat/openat2 unified prep handling A previous commit unified how we handle prep for these two functions, but this means that we check the allowed context (SQPOLL, specifically) later than we should. Move the ring type checking into the two parent functions, instead of doing it after we've done some setup work. Fixes: ec65fea5a8d7 ("io_uring: deduplicate io_openat{,2}_prep()") Reported-by: Andy Lutomirski Signed-off-by: Jens Axboe commit 6ca56f845955e325033758f90a2cffe150f31bc8 Author: Jens Axboe Date: Fri Sep 18 16:51:19 2020 -0600 io_uring: mark statx/files_update/epoll_ctl as non-SQPOLL These will naturally fail when attempted through SQPOLL, but either with -EFAULT or -EBADF. Make it explicit that these are not workable through SQPOLL and return -EINVAL, just like other ops that need to use ->files. Signed-off-by: Jens Axboe commit 72f04da48a9828ba3ae8ac77bea648bda8b7d0ff Author: Douglas Gilbert Date: Mon Sep 14 17:36:09 2020 -0400 tools/io_uring: fix compile breakage It would seem none of the kernel continuous integration does this: $ cd tools/io_uring $ make Otherwise it may have noticed: cc -Wall -Wextra -g -D_GNU_SOURCE -c -o io_uring-bench.o io_uring-bench.c io_uring-bench.c:133:12: error: static declaration of ‘gettid’ follows non-static declaration 133 | static int gettid(void) | ^~~~~~ In file included from /usr/include/unistd.h:1170, from io_uring-bench.c:27: /usr/include/x86_64-linux-gnu/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here 34 | extern __pid_t gettid (void) __THROW; | ^~~~~~ make: *** [: io_uring-bench.o] Error 1 The problem on Ubuntu 20.04 (with lk 5.9.0-rc5) is that unistd.h already defines gettid(). So prefix the local definition with "lk_". Signed-off-by: Douglas Gilbert Signed-off-by: Jens Axboe commit f5cac8b156e8b7b67bb0fdfd19900855bf9569f3 Author: Jens Axboe Date: Mon Sep 14 09:30:38 2020 -0600 io_uring: don't use retry based buffered reads for non-async bdev Some block devices, like dm, bubble back -EAGAIN through the completion handler. We check for this in io_read(), but don't honor it for when we have copied the iov. Return -EAGAIN for this case before retrying, to force punt to io-wq. Fixes: bcf5a06304d6 ("io_uring: support true async buffered reads, if file provides it") Reported-by: Zorro Lang Tested-by: Zorro Lang Signed-off-by: Jens Axboe commit 8f3d749685e48c44dbe877ac9781079d85f914c8 Author: Jens Axboe Date: Mon Sep 14 09:28:14 2020 -0600 io_uring: don't re-setup vecs/iter in io_resumit_prep() is already there If we already have mapped the necessary data for retry, then don't set it up again. It's a pointless operation, and we leak the iovec if it's a large (non-stack) vec. Fixes: b63534c41e20 ("io_uring: re-issue block requests that failed because of resources") Signed-off-by: Jens Axboe commit 3ad1c8ef083bef96ec922688966484be1039e6b5 Author: Borislav Petkov Date: Mon Sep 21 12:31:36 2020 +0200 rcu/tree: Export rcu_idle_{enter,exit} to modules Fix this link error: ERROR: modpost: "rcu_idle_enter" [drivers/acpi/processor.ko] undefined! ERROR: modpost: "rcu_idle_exit" [drivers/acpi/processor.ko] undefined! when CONFIG_ACPI_PROCESSOR is built as module. PeterZ says that in light of ARM needing those soon too, they should simply be exported. Fixes: 1fecfdbb7acc ("ACPI: processor: Take over RCU-idle for C3-BM idle") Reported-by: Sven Joachim Suggested-by: Peter Zijlstra Signed-off-by: Borislav Petkov Reviewed-by: Paul E. McKenney Signed-off-by: Rafael J. Wysocki commit 2f878d04218c8b26f6d0ab26955ca6b03848a1ad Author: Thierry Reding Date: Mon Jun 22 08:08:26 2020 +0200 clk: tegra: Fix missing prototype for tegra210_clk_register_emc() Include the Tegra driver's clk.h to pull in the prototype definition for this function so that compilers don't warn about it being missing. Fixes: 0ac65fc946d3 ("clk: tegra: Implement Tegra210 EMC clock") Reported-by: kernel test robot Signed-off-by: Thierry Reding commit 5105660ee80862b85f7769626d0f936c18ce1885 Author: Thierry Reding Date: Wed Jun 3 13:13:07 2020 +0200 clk: tegra: Always program PLL_E when enabled Commit bff1cef5f23a ("clk: tegra: Don't enable already enabled PLLs") added checks to avoid enabling PLLs that have already been enabled by the bootloader. However, the PLL_E configuration inherited from the bootloader isn't necessarily the one that is needed for the kernel. This can cause SATA to fail like this: [ 5.310270] phy phy-sata.6: phy poweron failed --> -110 [ 5.315604] tegra-ahci 70027000.sata: failed to power on AHCI controller: -110 [ 5.323022] tegra-ahci: probe of 70027000.sata failed with error -110 Fix this by always programming the PLL_E. This ensures that any mis- configuration by the bootloader will be overwritten by the kernel. Fixes: bff1cef5f23a ("clk: tegra: Don't enable already enabled PLLs") Reported-by: LABBE Corentin Tested-by: Corentin Labbe Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 6402e780e9434246a4c221034e1f8a0fd67f20bd Author: Thierry Reding Date: Wed Jun 3 13:12:12 2020 +0200 clk: tegra: Capitalization fixes HW, XUSB and PLL are abbreviations and should be all-uppercase. Signed-off-by: Thierry Reding commit 35be8851d172c6e3db836c0f28c19087b10c9e00 Author: Johannes Thumshirn Date: Mon Sep 21 16:57:14 2020 +0900 btrfs: fix overflow when copying corrupt csums for a message Syzkaller reported a buffer overflow in btree_readpage_end_io_hook() when loop mounting a crafted image: detected buffer overflow in memcpy ------------[ cut here ]------------ kernel BUG at lib/string.c:1129! invalid opcode: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 26 Comm: kworker/u4:2 Not tainted 5.9.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: btrfs-endio-meta btrfs_work_helper RIP: 0010:fortify_panic+0xf/0x20 lib/string.c:1129 RSP: 0018:ffffc90000e27980 EFLAGS: 00010286 RAX: 0000000000000022 RBX: ffff8880a80dca64 RCX: 0000000000000000 RDX: ffff8880a90860c0 RSI: ffffffff815dba07 RDI: fffff520001c4f22 RBP: ffff8880a80dca00 R08: 0000000000000022 R09: ffff8880ae7318e7 R10: 0000000000000000 R11: 0000000000077578 R12: 00000000ffffff6e R13: 0000000000000008 R14: ffffc90000e27a40 R15: 1ffff920001c4f3c FS: 0000000000000000(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000557335f440d0 CR3: 000000009647d000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: memcpy include/linux/string.h:405 [inline] btree_readpage_end_io_hook.cold+0x206/0x221 fs/btrfs/disk-io.c:642 end_bio_extent_readpage+0x4de/0x10c0 fs/btrfs/extent_io.c:2854 bio_endio+0x3cf/0x7f0 block/bio.c:1449 end_workqueue_fn+0x114/0x170 fs/btrfs/disk-io.c:1695 btrfs_work_helper+0x221/0xe20 fs/btrfs/async-thread.c:318 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Modules linked in: ---[ end trace b68924293169feef ]--- RIP: 0010:fortify_panic+0xf/0x20 lib/string.c:1129 RSP: 0018:ffffc90000e27980 EFLAGS: 00010286 RAX: 0000000000000022 RBX: ffff8880a80dca64 RCX: 0000000000000000 RDX: ffff8880a90860c0 RSI: ffffffff815dba07 RDI: fffff520001c4f22 RBP: ffff8880a80dca00 R08: 0000000000000022 R09: ffff8880ae7318e7 R10: 0000000000000000 R11: 0000000000077578 R12: 00000000ffffff6e R13: 0000000000000008 R14: ffffc90000e27a40 R15: 1ffff920001c4f3c FS: 0000000000000000(0000) GS:ffff8880ae700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f95b7c4d008 CR3: 000000009647d000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 The overflow happens, because in btree_readpage_end_io_hook() we assume that we have found a 4 byte checksum instead of the real possible 32 bytes we have for the checksums. With the fix applied: [ 35.726623] BTRFS: device fsid 815caf9a-dc43-4d2a-ac54-764b8333d765 devid 1 transid 5 /dev/loop0 scanned by syz-repro (215) [ 35.738994] BTRFS info (device loop0): disk space caching is enabled [ 35.738998] BTRFS info (device loop0): has skinny extents [ 35.743337] BTRFS warning (device loop0): loop0 checksum verify failed on 1052672 wanted 0xf9c035fc8d239a54 found 0x67a25c14b7eabcf9 level 0 [ 35.743420] BTRFS error (device loop0): failed to read chunk root [ 35.745899] BTRFS error (device loop0): open_ctree failed Reported-by: syzbot+e864a35d361e1d4e29a5@syzkaller.appspotmail.com Fixes: d5178578bcd4 ("btrfs: directly call into crypto framework for checksumming") CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit 8f8bf00b1c00b37ef5c32a642e5c3e0a364182b6 Author: Takashi Iwai Date: Mon Sep 21 12:26:32 2020 +0200 Revert "ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO" This reverts commit 15cbff3fbbc6 ("ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO"). A regression reported by a Fedora user for MSI X570-A PRO mobo. Until the correct solution is found out, let's revert the quirk as a quick workaround. Fixes: 15cbff3fbbc6 ("ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO") Reported-by: Hans de Goede Cc: Cc: Dan Crawford BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1879277 Link: https://lore.kernel.org/r/7efd2fe5-bf38-7f85-891a-eee3845d1493@redhat.com Link: https://lore.kernel.org/r/20200921102632.31139-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 845b89127bc5458d0152a4d63f165c62a22fcb70 Author: Jean Delvare Date: Thu Sep 10 11:57:08 2020 +0200 i2c: i801: Exclude device from suspend direct complete optimization By default, PCI drivers with runtime PM enabled will skip the calls to suspend and resume on system PM. For this driver, we don't want that, as we need to perform additional steps for system PM to work properly on all systems. So instruct the PM core to not skip these calls. Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM") Reported-by: Volker Rümelin Signed-off-by: Jean Delvare Cc: stable@vger.kernel.org Signed-off-by: Wolfram Sang commit 19a508bd1ad8e444de86873bf2f2b2ab8edd6552 Author: Charan Teja Reddy Date: Fri Sep 18 16:02:31 2020 +0530 dmabuf: fix NULL pointer dereference in dma_buf_release() NULL pointer dereference is observed while exporting the dmabuf but failed to allocate the 'struct file' which results into the dropping of the allocated dentry corresponding to this file in the dmabuf fs, which is ending up in dma_buf_release() and accessing the uninitialzed dentry->d_fsdata. Call stack on 5.4 is below: dma_buf_release+0x2c/0x254 drivers/dma-buf/dma-buf.c:88 __dentry_kill+0x294/0x31c fs/dcache.c:584 dentry_kill fs/dcache.c:673 [inline] dput+0x250/0x380 fs/dcache.c:859 path_put+0x24/0x40 fs/namei.c:485 alloc_file_pseudo+0x1a4/0x200 fs/file_table.c:235 dma_buf_getfile drivers/dma-buf/dma-buf.c:473 [inline] dma_buf_export+0x25c/0x3ec drivers/dma-buf/dma-buf.c:585 Fix this by checking for the valid pointer in the dentry->d_fsdata. Fixes: 4ab59c3c638c ("dma-buf: Move dma_buf_release() from fops to dentry_ops") Cc: [5.7+] Signed-off-by: Charan Teja Reddy Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/391319/ Signed-off-by: Christian König commit 315c7ad7a701baba28c628c4c5426b3d9617ceed Author: Joakim Tjernlund Date: Thu Sep 10 10:53:28 2020 +0200 ALSA: usb-audio: Add delay quirk for H570e USB headsets Needs the same delay as H650e Signed-off-by: Joakim Tjernlund Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200910085328.19188-1-joakim.tjernlund@infinera.com Signed-off-by: Takashi Iwai commit f73bbf639b32acb6b409e188fdde5644b301978f Author: Kai-Heng Feng Date: Mon Sep 14 15:02:29 2020 +0800 ALSA: hda/realtek: Enable front panel headset LED on Lenovo ThinkStation P520 On Lenovo P520, the front panel headset LED isn't lit up right now. Realtek states that the LED needs to be enabled by ALC233's GPIO2, so let's do it accordingly to light the LED up. Signed-off-by: Kai-Heng Feng Acked-by: Hui Wang Cc: Link: https://lore.kernel.org/r/20200914070231.13192-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 3f74249057827c5f6676c41c18f6be12ce1469ce Author: Hui Wang Date: Mon Sep 14 14:51:18 2020 +0800 ALSA: hda/realtek - Couldn't detect Mic if booting with headset plugged We found a Mic detection issue on many Lenovo laptops, those laptops belong to differnt models and they have different audio design like internal mic connects to the codec or PCH, they all have this problem, the problem is if plugging a headset before powerup/reboot the machine, after booting up, the headphone could be detected but Mic couldn't. If we plug out and plug in the headset, both headphone and Mic could be detected then. Through debugging we found the codec on those laptops are same, it is alc257, and if we don't disable the 3k pulldown in alc256_shutup(), the issue will be fixed. So far there is no pop noise or power consumption regression on those laptops after this change. Cc: Kailang Yang Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20200914065118.19238-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 472eb39103e885f302fd8fd6eff104fcf5503f1b Author: Tom Rix Date: Sun Sep 13 09:52:30 2020 -0700 ALSA: asihpi: fix iounmap in error handler clang static analysis flags this problem hpioctl.c:513:7: warning: Branch condition evaluates to a garbage value if (pci.ap_mem_base[idx]) { ^~~~~~~~~~~~~~~~~~~~ If there is a failure in the middle of the memory space loop, only some of the memory spaces need to be cleaned up. At the error handler, idx holds the number of successful memory spaces mapped. So rework the handler loop to use the old idx. There is a second problem, the memory space loop conditionally iomaps()/sets the mem_base so it is necessay to initize pci. Fixes: 719f82d3987a ("ALSA: Add support of AudioScience ASI boards") Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20200913165230.17166-1-trix@redhat.com Signed-off-by: Takashi Iwai commit e1b81391421b8b7577988fbf797bfbc176bedd1e Merge: fe81d9f6182d1 c07fa08f02f40 Author: David S. Miller Date: Sun Sep 20 19:04:45 2020 -0700 Merge branch 'bnxt_en-Bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. A series of small driver fixes covering VPD length logic, ethtool_get_regs on VF, hwmon temperature error handling, mutex locking for EEE and pause ethtool settings, and parameters for statistics related firmware calls. Please queue patches 1, 2, and 3 for -stable. Thanks. ==================== Signed-off-by: David S. Miller commit c07fa08f02f4053b51dae1a6ee08bc644dc7846d Author: Michael Chan Date: Sun Sep 20 21:08:59 2020 -0400 bnxt_en: Fix wrong flag value passed to HWRM_PORT_QSTATS_EXT fw call. The wrong flag value caused the firmware call to return actual port counters instead of the counter masks. This messed up the counter overflow logic and caused erratic extended port counters to be displayed under ethtool -S. Fixes: 531d1d269c1d ("bnxt_en: Retrieve hardware masks for port counters.") Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d2b42d010f2941c2a85d970500b9d4ba79765593 Author: Michael Chan Date: Sun Sep 20 21:08:58 2020 -0400 bnxt_en: Fix HWRM_FUNC_QSTATS_EXT firmware call. Fix it to set the required fid input parameter. The firmware call fails without this patch. Fixes: d752d0536c97 ("bnxt_en: Retrieve hardware counter masks from firmware if available.") Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f0f47b2f8cbc22e6e611ef6cc988f5452e5aec3f Author: Vasundhara Volam Date: Sun Sep 20 21:08:57 2020 -0400 bnxt_en: Return -EOPNOTSUPP for ETHTOOL_GREGS on VFs. Debug firmware commands are not supported on VFs to read registers. This patch avoids logging unnecessary access_denied error on VFs when user calls ETHTOOL_GREGS. By returning error in get_regs_len() method on the VF, the get_regs() method will not be called. Fixes: b5d600b027eb ("bnxt_en: Add support for 'ethtool -d'") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit a53906908148d64423398a62c4435efb0d09652c Author: Michael Chan Date: Sun Sep 20 21:08:56 2020 -0400 bnxt_en: Protect bnxt_set_eee() and bnxt_set_pauseparam() with mutex. All changes related to bp->link_info require the protection of the link_lock mutex. It's not sufficient to rely just on RTNL. Fixes: 163e9ef63641 ("bnxt_en: Fix race when modifying pause settings.") Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d69753fa1ecb3218b56b022722f7a5822735b876 Author: Edwin Peer Date: Sun Sep 20 21:08:55 2020 -0400 bnxt_en: return proper error codes in bnxt_show_temp Returning "unknown" as a temperature value violates the hwmon interface rules. Appropriate error codes should be returned via device_attribute show instead. These will ultimately be propagated to the user via the file system interface. In addition to the corrected error handling, it is an even better idea to not present the sensor in sysfs at all if it is known that the read will definitely fail. Given that temp1_input is currently the only sensor reported, ensure no hwmon registration if TEMP_MONITOR_QUERY is not supported or if it will fail due to access permissions. Something smarter may be needed if and when other sensors are added. Fixes: 12cce90b934b ("bnxt_en: fix HWRM error when querying VF temperature") Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 492adcf481292521ee8df1a482dc12acdb28aa15 Author: Vasundhara Volam Date: Sun Sep 20 21:08:54 2020 -0400 bnxt_en: Use memcpy to copy VPD field info. Using strlcpy() to copy from VPD is not correct because VPD strings are not necessarily NULL terminated. Use memcpy() to copy the VPD length up to the destination buffer size - 1. The destination is zeroed memory so it will always be NULL terminated. Fixes: a0d0fd70fed5 ("bnxt_en: Read partno and serialno of the board from VPD") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ba4f184e126b751d1bffad5897f263108befc780 Author: Linus Torvalds Date: Sun Sep 20 16:33:55 2020 -0700 Linux 5.9-rc6 commit e2bff391caba23fb2780b2c9863b11aa25aaeb6f Merge: 1f8ee7e8521a4 b6ec413461034 Author: Linus Torvalds Date: Sun Sep 20 15:37:15 2020 -0700 Merge tag 'core_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull syscall tracing fix from Borislav Petkov: "Fix the seccomp syscall rewriting so that trace and audit see the rewritten syscall number, from Kees Cook" * tag 'core_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: core/entry: Report syscall correctly for trace and audit commit 1f8ee7e8521a496024fb504de9eacbb49bd9152a Merge: 3d491679b8800 db6c6a0df840e Author: Linus Torvalds Date: Sun Sep 20 15:31:04 2020 -0700 Merge tag 'objtool_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Borislav Petkov: "Fix noreturn detection for ignored sibling functions (Josh Poimboeuf)" * tag 'objtool_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Fix noreturn detection for ignored functions commit 3d491679b880006d2469ad14f73c2debb2a522bd Merge: 5674d81c21d47 e6b1a44eccfca Author: Linus Torvalds Date: Sun Sep 20 15:25:33 2020 -0700 Merge tag 'locking_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Borislav Petkov: "Two fixes from the locking/urgent pile: - Fix lockdep's detection of "USED" <- "IN-NMI" inversions (Peter Zijlstra) - Make percpu-rwsem operations on the semaphore's ->read_count IRQ-safe because it can be used in an IRQ context (Hou Tao)" * tag 'locking_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/percpu-rwsem: Use this_cpu_{inc,dec}() for read_count locking/lockdep: Fix "USED" <- "IN-NMI" inversions commit 5674d81c21d47e12c2def2df7360ef2dbca108e6 Merge: 217eee7231e4b 46908326c6b80 Author: Linus Torvalds Date: Sun Sep 20 15:18:11 2020 -0700 Merge tag 'efi-urgent-for-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fix from Borislav Petkov: "Ensure that the EFI bootloader control module only probes successfully on systems that support the EFI SetVariable runtime service" [ Tag and commit from Ard Biesheuvel, forwarded by Borislav ] * tag 'efi-urgent-for-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: efibc: check for efivars write capability commit 217eee7231e4b70995bfc24d279c61f6fefbf5d6 Merge: 4a123dbaf3a6e 6f9885a36c006 Author: Linus Torvalds Date: Sun Sep 20 15:06:43 2020 -0700 Merge tag 'x86_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - A defconfig fix (Daniel Díaz) - Disable relocation relaxation for the compressed kernel when not built as -pie as in that case kernels built with clang and linked with LLD fail to boot due to the linker optimizing some instructions in non-PIE form; the gory details in the commit message (Arvind Sankar) - A fix for the "bad bp value" warning issued by the frame-pointer unwinder (Josh Poimboeuf) * tag 'x86_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/unwind/fp: Fix FP unwinding in ret_from_fork x86/boot/compressed: Disable relocation relaxation x86/defconfigs: Explicitly unset CONFIG_64BIT in i386_defconfig commit 4a123dbaf3a6efca717e3a5ac8176fd4897456b2 Merge: bdcf11de8f776 d4c5da5049ac2 Author: Linus Torvalds Date: Sun Sep 20 15:01:57 2020 -0700 Merge tag 'libnvdimm-fixes-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A handful of fixes to address a string of mistakes in the mechanism for device-mapper to determine if its component devices are dax capable. - Fix an original bug in device-mapper table reference counting when interrogating dax capability in the component device. This bug was hidden by the following bug. - Fix device-mapper to use the proper helper (dax_supported() instead of the leaf helper generic_fsdax_supported()) to determine dax operation of a stacked block device configuration. The original implementation is only valid for one level of dax-capable block device stacking. This bug was discovered while fixing the below regression. - Fix an infinite recursion regression introduced by broken attempts to quiet the generic_fsdax_supported() path and make it bail out before logging "dax capability not found" errors" * tag 'libnvdimm-fixes-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Fix stack overflow when mounting fsdax pmem device dm: Call proper helper to determine dax support dm/dax: Fix table reference counts commit 32251b07d532174d66941488c112ec046f646157 Merge: b73815a18de15 f20d4e924b446 Author: Paolo Bonzini Date: Sun Sep 20 17:31:15 2020 -0400 Merge tag 'kvm-s390-master-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-master KVM: s390: add documentation for KVM_CAP_S390_DIAG318 diag318 code was merged in 5.9-rc1, let us add some missing documentation commit b73815a18de154d712d0a4b4932a4b1b37c99580 Merge: 7d1f8691ccffe 620cf45f7a516 Author: Paolo Bonzini Date: Sun Sep 20 17:31:07 2020 -0400 Merge tag 'kvmarm-fixes-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/arm64 fixes for 5.9, take #2 - Fix handling of S1 Page Table Walk permission fault at S2 on instruction fetch - Cleanup kvm_vcpu_dabt_iswrite() commit 7d1f8691ccffe88cec70a6e4044adf1b9bbd8a7c Author: Vitaly Kuznetsov Date: Sun Sep 20 09:10:12 2020 -0400 Revert "KVM: Check the allocation of pv cpu mask" The commit 0f990222108d ("KVM: Check the allocation of pv cpu mask") we have in 5.9-rc5 has two issue: 1) Compilation fails for !CONFIG_SMP, see: https://bugzilla.kernel.org/show_bug.cgi?id=209285 2) This commit completely disables PV TLB flush, see https://lore.kernel.org/kvm/87y2lrnnyf.fsf@vitty.brq.redhat.com/ The allocation problem is likely a theoretical one, if we don't have memory that early in boot process we're likely doomed anyway. Let's solve it properly later. This reverts commit 0f990222108d214a0924d920e6095b58107d7b59. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit fe81d9f6182d1160e625894eecb3d7ff0222cac5 Author: Henry Ptasinski Date: Sat Sep 19 00:12:11 2020 +0000 net: sctp: Fix IPv6 ancestor_size calc in sctp_copy_descendant When calculating ancestor_size with IPv6 enabled, simply using sizeof(struct ipv6_pinfo) doesn't account for extra bytes needed for alignment in the struct sctp6_sock. On x86, there aren't any extra bytes, but on ARM the ipv6_pinfo structure is aligned on an 8-byte boundary so there were 4 pad bytes that were omitted from the ancestor_size calculation. This would lead to corruption of the pd_lobby pointers, causing an oops when trying to free the sctp structure on socket close. Fixes: 636d25d557d1 ("sctp: not copy sctp_sock pd_lobby in sctp_copy_descendant") Signed-off-by: Henry Ptasinski Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit b6e11785cf957f4f4dd7da7f5a1f41ca4f1ea913 Author: Lorenzo Bianconi Date: Fri Sep 18 23:25:56 2020 +0200 net: mvneta: recycle the page in case of out-of-order Recycle the received page into the page_pool cache if the dma descriptors arrived in a wrong order Fixes: ca0e014609f05 ("net: mvneta: move skb build after descriptors processing") Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 769f5083c5e2de371d9a451e3bb9d4aaa24f3346 Author: Colin Ian King Date: Fri Sep 18 22:51:26 2020 +0100 rhashtable: fix indentation of a continue statement A continue statement is indented incorrectly, add in the missing tab. Signed-off-by: Colin Ian King Acked-by: Herbert Xu Signed-off-by: David S. Miller commit bdcf11de8f776152c82d2197b255c2d04603f976 Merge: d0373c1463ef0 d5be89a8d118a Author: Linus Torvalds Date: Sun Sep 20 10:51:11 2020 -0700 Merge tag 'riscv-for-linus-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix for a lockdep issue to avoid an asserting triggering during early boot. There shouldn't be any incorrect behavior as the system isn't concurrent at the time. - The addition of a missing fence when installing early fixmap mappings. - A corretion to the K210 device tree's interrupt map. - A fix for M-mode timer handling on the K210. * tag 'riscv-for-linus-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Resurrect the MMIO timer implementation for M-mode systems riscv: Fix Kendryte K210 device tree riscv: Add sfence.vma after early page table changes RISC-V: Take text_mutex in ftrace_init_nop() commit d0373c1463ef0cdbf05176eed2fc8f554dc2bd73 Merge: f44f3f83d895b 9cdabcb3ef8c2 Author: Linus Torvalds Date: Sun Sep 20 10:48:20 2020 -0700 Merge tag 'usb-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/Thunderbolt fixes from Greg KH: "Here are some small USB and one Thunderbolt driver fixes. Nothing major at all, just some fixes for reported issues, and a quirk addition: - typec fixes - UAS disconnect fix - usblp race fix - ehci-hcd modversions build fix - ignore wakeup quirk table addition - thunderbolt DROM read fix All of these have been in linux-next with no reported issues" * tag 'usb-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usblp: fix race between disconnect() and read() ehci-hcd: Move include to keep CRC stable usb: typec: intel_pmc_mux: Handle SCU IPC error conditions USB: quirks: Add USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk for BYD zhaoxin notebook USB: UAS: fix disconnect by unplugging a hub usb: typec: ucsi: Prevent mode overrun usb: typec: ucsi: acpi: Increase command completion timeout value thunderbolt: Retry DROM read once if parsing fails commit f44f3f83d895b830a85f62790cedd5605a399ac4 Merge: aac5925b49956 ec0972adecb39 Author: Linus Torvalds Date: Sun Sep 20 10:46:26 2020 -0700 Merge tag 'tty-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial/fbcon fixes from Greg KH: "Here are some small tty/serial and one more fbcon fix. They include: - serial core locking regression fixes - new device ids for 8250_pci driver - fbcon fix for syzbot found issue All have been in linux-next with no reported issues" * tag 'tty-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: fbcon: Fix user font detection test at fbcon_resize(). serial: 8250_pci: Add Realtek 816a and 816b serial: core: fix console port-lock regression serial: core: fix port-lock initialisation commit aac5925b49956f7bf0f5d0ef3477e419f3ee2f78 Merge: 376566ca87257 251c54ea26fa6 Author: Linus Torvalds Date: Sun Sep 20 10:43:59 2020 -0700 Merge tag 'edac_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fixes from Borislav Petkov: "Two fixes for resulting from CONFIG_DEBUG_TEST_DRIVER_REMOVE=y experiments: - complete a previous fix to reset a local structure containing scanned system data properly so that the driver rescans, as it should, on a second load. - address a refcount underflow due to not paying attention to the driver whitelest on unregister" * tag 'edac_urgent_for_v5.9_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/ghes: Check whether the driver is on the safe list correctly EDAC/ghes: Clear scanned data on unload commit 376566ca87257b9116ac5205f0efaa3c0f29103b Merge: 5868ec267de5e 6c77545af100a Author: Linus Torvalds Date: Sun Sep 20 10:40:43 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "Just a couple of driver quirks" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: trackpoint - add new trackpoint variant IDs Input: i8042 - add Entroware Proteus EL07R4 to nomux and reset lists commit 5868ec267de5eade3ef80bd8716d6b7621a0c4c0 Author: Linus Torvalds Date: Sun Sep 20 10:38:47 2020 -0700 mm: fix wake_page_function() comment typos Sedat Dilek pointed out some silly comment typo issues. Reported-by: Sedat Dilek Signed-off-by: Linus Torvalds commit 62fe3e42ba4fa8156ac6f9096f796dd721489e0a Author: Mircea Caprioru Date: Wed Sep 2 16:42:22 2020 +0300 iio: adc: ad7124: Fix typo in device name This patch fixes the device name typo. Fixes: 951ad4700313 ("iio: adc: ad7124: move chip ID & name on the chip_info table") Signed-off-by: Mircea Caprioru Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200902134222.28357-1-mircea.caprioru@analog.com Signed-off-by: Jonathan Cameron commit c7948fe9bada1b335de1cbe8a1fd02e2ccecaa6b Merge: 325d0eab4f31c a46afd1141475 Author: Linus Torvalds Date: Sun Sep 20 10:08:45 2020 -0700 Merge tag 'kbuild-fixes-v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: "Fix qconf warnings and revive help message" * tag 'kbuild-fixes-v5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: qconf: revive help message in the info view kconfig: qconf: fix incomplete type 'struct gstr' warning kconfig: qconf: use delete[] instead of delete to free array (again) commit d4c5da5049ac27c6ef8f6f98548c3a1ade352d25 Author: Adrian Huang Date: Thu Sep 17 19:15:49 2020 +0800 dax: Fix stack overflow when mounting fsdax pmem device When mounting fsdax pmem device, commit 6180bb446ab6 ("dax: fix detection of dax support for non-persistent memory block devices") introduces the stack overflow [1][2]. Here is the call path for mounting ext4 file system: ext4_fill_super bdev_dax_supported __bdev_dax_supported dax_supported generic_fsdax_supported __generic_fsdax_supported bdev_dax_supported The call path leads to the infinite calling loop, so we cannot call bdev_dax_supported() in __generic_fsdax_supported(). The sanity checking of the variable 'dax_dev' is moved prior to the two bdev_dax_pgoff() checks [3][4]. [1] https://lore.kernel.org/linux-nvdimm/1420999447.1004543.1600055488770.JavaMail.zimbra@redhat.com/ [2] https://lore.kernel.org/linux-nvdimm/alpine.LRH.2.02.2009141131220.30651@file01.intranet.prod.int.rdu2.redhat.com/ [3] https://lore.kernel.org/linux-nvdimm/CA+RJvhxBHriCuJhm-D8NvJRe3h2MLM+ZMFgjeJjrRPerMRLvdg@mail.gmail.com/ [4] https://lore.kernel.org/linux-nvdimm/20200903160608.GU878166@iweiny-DESK2.sc.intel.com/ Fixes: 6180bb446ab6 ("dax: fix detection of dax support for non-persistent memory block devices") Reported-by: Yi Zhang Reported-by: Mikulas Patocka Signed-off-by: Adrian Huang Reviewed-by: Jan Kara Tested-by: Ritesh Harjani Cc: Coly Li Cc: Ira Weiny Cc: John Pittman Link: https://lore.kernel.org/r/20200917111549.6367-1-adrianhuang0701@gmail.com Signed-off-by: Dan Williams commit e2ec5128254518cae320d5dc631b71b94160f663 Author: Jan Kara Date: Sun Sep 20 08:54:42 2020 -0700 dm: Call proper helper to determine dax support DM was calling generic_fsdax_supported() to determine whether a device referenced in the DM table supports DAX. However this is a helper for "leaf" device drivers so that they don't have to duplicate common generic checks. High level code should call dax_supported() helper which that calls into appropriate helper for the particular device. This problem manifested itself as kernel messages: dm-3: error: dax access failed (-95) when lvm2-testsuite run in cases where a DM device was stacked on top of another DM device. Fixes: 7bf7eac8d648 ("dax: Arrange for dax_supported check to span multiple devices") Cc: Tested-by: Adrian Huang Signed-off-by: Jan Kara Acked-by: Mike Snitzer Reported-by: kernel test robot Link: https://lore.kernel.org/r/160061715195.13131.5503173247632041975.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 02186d8897d49b0afd3c80b6cf23437d91024065 Author: Dan Williams Date: Fri Sep 18 12:51:15 2020 -0700 dm/dax: Fix table reference counts A recent fix to the dm_dax_supported() flow uncovered a latent bug. When dm_get_live_table() fails it is still required to drop the srcu_read_lock(). Without this change the lvm2 test-suite triggers this warning: # lvm2-testsuite --only pvmove-abort-all.sh WARNING: lock held when returning to user space! 5.9.0-rc5+ #251 Tainted: G OE ------------------------------------------------ lvm/1318 is leaving the kernel with locks still held! 1 lock held by lvm/1318: #0: ffff9372abb5a340 (&md->io_barrier){....}-{0:0}, at: dm_get_live_table+0x5/0xb0 [dm_mod] ...and later on this hang signature: INFO: task lvm:1344 blocked for more than 122 seconds. Tainted: G OE 5.9.0-rc5+ #251 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:lvm state:D stack: 0 pid: 1344 ppid: 1 flags:0x00004000 Call Trace: __schedule+0x45f/0xa80 ? finish_task_switch+0x249/0x2c0 ? wait_for_completion+0x86/0x110 schedule+0x5f/0xd0 schedule_timeout+0x212/0x2a0 ? __schedule+0x467/0xa80 ? wait_for_completion+0x86/0x110 wait_for_completion+0xb0/0x110 __synchronize_srcu+0xd1/0x160 ? __bpf_trace_rcu_utilization+0x10/0x10 __dm_suspend+0x6d/0x210 [dm_mod] dm_suspend+0xf6/0x140 [dm_mod] Fixes: 7bf7eac8d648 ("dax: Arrange for dax_supported check to span multiple devices") Cc: Cc: Jan Kara Cc: Alasdair Kergon Cc: Mike Snitzer Reported-by: Adrian Huang Reviewed-by: Ira Weiny Tested-by: Adrian Huang Link: https://lore.kernel.org/r/160045867590.25663.7548541079217827340.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit a46afd11414758233f23798cc5be51e554d04efe Author: Masahiro Yamada Date: Mon Sep 14 23:59:48 2020 +0900 kconfig: qconf: revive help message in the info view Since commit 68fd110b3e7e ("kconfig: qconf: remove redundant help in the info view"), the help message is no longer displayed. I intended to drop duplicated "Symbol:", "Type:", but precious info about help and reverse dependencies was lost too. Revive it now. "defined at" is contained in menu_get_ext_help(), so I made sure to not display it twice. Fixes: 68fd110b3e7e ("kconfig: qconf: remove redundant help in the info view") Reported-by: Maxim Levitsky Signed-off-by: Masahiro Yamada commit 19b835a5db93254a46cb90c95ddde6959d7e1e06 Author: Masahiro Yamada Date: Wed Sep 9 07:16:38 2020 +0900 kconfig: qconf: fix incomplete type 'struct gstr' warning "make HOSTCXX=clang++ xconfig" reports the following: HOSTCXX scripts/kconfig/qconf.o In file included from scripts/kconfig/qconf.cc:23: In file included from scripts/kconfig/lkc.h:15: scripts/kconfig/lkc_proto.h:26:13: warning: 'get_relations_str' has C-linkage specified, but returns incomplete type 'struct gstr' which could be incompatible with C [-Wreturn-type-c-linkage] struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head); ^ Currently, get_relations_str() is declared before the struct gstr definition. Move all declarations of menu.c functions below. BTW, some are declared in lkc.h and some in lkc_proto.h, but the difference is unclear. I guess some refactoring is needed. Signed-off-by: Masahiro Yamada Acked-by: Boris Kolpackov commit 325d0eab4f31c6240b59d5b2b8042c88f59405b5 Merge: c8d1a46f94387 2645d432051cd Author: Linus Torvalds Date: Sat Sep 19 18:18:37 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "15 patches. Subsystems affected by this patch series: mailmap, mm/hotfixes, mm/thp, mm/memory-hotplug, misc, kcsan" * emailed patches from Andrew Morton : kcsan: kconfig: move to menu 'Generic Kernel Debugging Instruments' fs/fs-writeback.c: adjust dirtytime_interval_handler definition to match prototype stackleak: let stack_erasing_sysctl take a kernel pointer buffer ftrace: let ftrace_enable_sysctl take a kernel pointer buffer mm/memory_hotplug: drain per-cpu pages again during memory offline selftests/vm: fix display of page size in map_hugetlb mm/thp: fix __split_huge_pmd_locked() for migration PMD kprobes: fix kill kprobe which has been marked as gone tmpfs: restore functionality of nr_inodes=0 mlock: fix unevictable_pgs event counts on THP mm: fix check_move_unevictable_pages() on THP mm: migration of hugetlbfs page skip memcg ksm: reinstate memcg charge on copied pages mailmap: add older email addresses for Kees Cook commit c8d1a46f943877c08d1154a6f90f43a245a671cf Merge: eb5f95f1593f7 6eb158ec0a45d Author: Linus Torvalds Date: Sat Sep 19 13:24:37 2020 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Another bunch of fixes for I2C. Jean's i801 patch is a cleanup on top of Volker's i801 patch, but it will make dependency handling much easier if those two go together" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mxs: use MXS_DMA_CTRL_WAIT4END instead of DMA_CTRL_ACK i2c: mediatek: Send i2c master code at more than 1MHz i2c: mediatek: Fix generic definitions for bus frequency i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices() i2c: i801: Simplify the suspend callback i2c: i801: Fix resume bug i2c: aspeed: Mask IRQ status to relevant bits commit d5be89a8d118a8e8d09cd74a921a808f17fbdd09 Author: Palmer Dabbelt Date: Mon Sep 14 09:56:30 2020 -0700 RISC-V: Resurrect the MMIO timer implementation for M-mode systems The K210 doesn't implement rdtime in M-mode, and since that's where Linux runs in the NOMMU systems that means we can't use rdtime. The K210 is the only system that anyone is currently running NOMMU or M-mode on, so here we're just inlining the timer read directly. This also adds the CLINT driver as an !MMU dependency, as it's currently the only timer driver availiable for these systems and without it we get a build failure for some configurations. Tested-by: Damien Le Moal Signed-off-by: Palmer Dabbelt commit f025d9d9934b84cd03b7796072d10686029c408e Author: Damien Le Moal Date: Wed Sep 16 16:59:41 2020 +0900 riscv: Fix Kendryte K210 device tree The Kendryte K210 SoC CLINT is compatible with Sifive clint v0 (sifive,clint0). Fix the Kendryte K210 device tree clint entry to be inline with the sifive timer definition documented in Documentation/devicetree/bindings/timer/sifive,clint.yaml. The device tree clint entry is renamed similarly to u-boot device tree definition to improve compatibility with u-boot defined device tree. To ensure correct initialization, the interrup-cells attribute is added and the interrupt-extended attribute definition fixed. This fixes boot failures with Kendryte K210 SoC boards. Note that the clock referenced is kept as K210_CLK_ACLK, which does not necessarilly match the clint MTIME increment rate. This however does not seem to cause any problem for now. Signed-off-by: Damien Le Moal Signed-off-by: Palmer Dabbelt commit 21190b74bcf3a36ebab9a715088c29f59877e1f3 Author: Greentime Hu Date: Tue Aug 4 11:02:05 2020 +0800 riscv: Add sfence.vma after early page table changes This invalidates local TLB after modifying the page tables during early init as it's too early to handle suprious faults as we otherwise do. Fixes: f2c17aabc917 ("RISC-V: Implement compile-time fixed mappings") Reported-by: Syven Wang Signed-off-by: Syven Wang Signed-off-by: Greentime Hu Reviewed-by: Anup Patel [Palmer: Cleaned up the commit text] Signed-off-by: Palmer Dabbelt commit 2645d432051cd4e6c04ee8af23be07c92f1f52a2 Author: Changbin Du Date: Fri Sep 18 21:20:42 2020 -0700 kcsan: kconfig: move to menu 'Generic Kernel Debugging Instruments' This moves the KCSAN kconfig items under menu 'Generic Kernel Debugging Instruments' where UBSAN resides. Signed-off-by: Changbin Du Signed-off-by: Andrew Morton Tested-by: Randy Dunlap Reviewed-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: Marco Elver Link: https://lkml.kernel.org/r/20200904152224.5570-1-changbin.du@gmail.com Signed-off-by: Linus Torvalds commit 9ca48e20ec5cb3427ca57ffac9ed2b87090ab488 Author: Tobias Klauser Date: Fri Sep 18 21:20:39 2020 -0700 fs/fs-writeback.c: adjust dirtytime_interval_handler definition to match prototype Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") changed ctl_table.proc_handler to take a kernel pointer. Adjust the definition of dirtytime_interval_handler to match its prototype in linux/writeback.h which fixes the following sparse error/warning: fs/fs-writeback.c:2189:50: warning: incorrect type in argument 3 (different address spaces) fs/fs-writeback.c:2189:50: expected void * fs/fs-writeback.c:2189:50: got void [noderef] __user *buffer fs/fs-writeback.c:2184:5: error: symbol 'dirtytime_interval_handler' redeclared with different type (incompatible argument 3 (different address spaces)): fs/fs-writeback.c:2184:5: int extern [addressable] [signed] [toplevel] dirtytime_interval_handler( ... ) fs/fs-writeback.c: note: in included file: ./include/linux/writeback.h:374:5: note: previously declared as: ./include/linux/writeback.h:374:5: int extern [addressable] [signed] [toplevel] dirtytime_interval_handler( ... ) Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Reviewed-by: Jan Kara Cc: Christoph Hellwig Cc: Al Viro Link: https://lkml.kernel.org/r/20200907093140.13434-1-tklauser@distanz.ch Signed-off-by: Linus Torvalds commit 4773ef33fc6e59bad2e5d19e334de2fa79c27b74 Author: Tobias Klauser Date: Fri Sep 18 21:20:37 2020 -0700 stackleak: let stack_erasing_sysctl take a kernel pointer buffer Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") changed ctl_table.proc_handler to take a kernel pointer. Adjust the signature of stack_erasing_sysctl to match ctl_table.proc_handler which fixes the following sparse warning: kernel/stackleak.c:31:50: warning: incorrect type in argument 3 (different address spaces) kernel/stackleak.c:31:50: expected void * kernel/stackleak.c:31:50: got void [noderef] __user *buffer Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Cc: Christoph Hellwig Cc: Al Viro Link: https://lkml.kernel.org/r/20200907093253.13656-1-tklauser@distanz.ch Signed-off-by: Linus Torvalds commit 7bb82ac30c3dd4ecf1485685cbe84d2ba10dddf4 Author: Tobias Klauser Date: Fri Sep 18 21:20:34 2020 -0700 ftrace: let ftrace_enable_sysctl take a kernel pointer buffer Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") changed ctl_table.proc_handler to take a kernel pointer. Adjust the signature of ftrace_enable_sysctl to match ctl_table.proc_handler which fixes the following sparse warning: kernel/trace/ftrace.c:7544:43: warning: incorrect type in argument 3 (different address spaces) kernel/trace/ftrace.c:7544:43: expected void * kernel/trace/ftrace.c:7544:43: got void [noderef] __user *buffer Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Cc: Christoph Hellwig Cc: Al Viro Link: https://lkml.kernel.org/r/20200907093207.13540-1-tklauser@distanz.ch Signed-off-by: Linus Torvalds commit 9683182612214aa5f5e709fad49444b847cd866a Author: Pavel Tatashin Date: Fri Sep 18 21:20:31 2020 -0700 mm/memory_hotplug: drain per-cpu pages again during memory offline There is a race during page offline that can lead to infinite loop: a page never ends up on a buddy list and __offline_pages() keeps retrying infinitely or until a termination signal is received. Thread#1 - a new process: load_elf_binary begin_new_exec exec_mmap mmput exit_mmap tlb_finish_mmu tlb_flush_mmu release_pages free_unref_page_list free_unref_page_prepare set_pcppage_migratetype(page, migratetype); // Set page->index migration type below MIGRATE_PCPTYPES Thread#2 - hot-removes memory __offline_pages start_isolate_page_range set_migratetype_isolate set_pageblock_migratetype(page, MIGRATE_ISOLATE); Set migration type to MIGRATE_ISOLATE-> set drain_all_pages(zone); // drain per-cpu page lists to buddy allocator. Thread#1 - continue free_unref_page_commit migratetype = get_pcppage_migratetype(page); // get old migration type list_add(&page->lru, &pcp->lists[migratetype]); // add new page to already drained pcp list Thread#2 Never drains pcp again, and therefore gets stuck in the loop. The fix is to try to drain per-cpu lists again after check_pages_isolated_cb() fails. Fixes: c52e75935f8d ("mm: remove extra drain pages on pcp list") Signed-off-by: Pavel Tatashin Signed-off-by: Andrew Morton Acked-by: David Rientjes Acked-by: Vlastimil Babka Acked-by: Michal Hocko Acked-by: David Hildenbrand Cc: Oscar Salvador Cc: Wei Yang Cc: Link: https://lkml.kernel.org/r/20200903140032.380431-1-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20200904151448.100489-2-pasha.tatashin@soleen.com Link: http://lkml.kernel.org/r/20200904070235.GA15277@dhcp22.suse.cz Signed-off-by: Linus Torvalds commit 1ec882fc81e3177faf055877310dbdb0c68eb7db Author: Christophe Leroy Date: Fri Sep 18 21:20:28 2020 -0700 selftests/vm: fix display of page size in map_hugetlb The displayed size is in bytes while the text says it is in kB. Shift it by 10 to really display kBytes. Fixes: fa7b9a805c79 ("tools/selftest/vm: allow choosing mem size and page size in map_hugetlb") Signed-off-by: Christophe Leroy Signed-off-by: Andrew Morton Cc: Link: https://lkml.kernel.org/r/e27481224564a93d14106e750de31189deaa8bc8.1598861977.git.christophe.leroy@csgroup.eu Signed-off-by: Linus Torvalds commit ec0abae6dcdf7ef88607c869bf35a4b63ce1b370 Author: Ralph Campbell Date: Fri Sep 18 21:20:24 2020 -0700 mm/thp: fix __split_huge_pmd_locked() for migration PMD A migrating transparent huge page has to already be unmapped. Otherwise, the page could be modified while it is being copied to a new page and data could be lost. The function __split_huge_pmd() checks for a PMD migration entry before calling __split_huge_pmd_locked() leading one to think that __split_huge_pmd_locked() can handle splitting a migrating PMD. However, the code always increments the page->_mapcount and adjusts the memory control group accounting assuming the page is mapped. Also, if the PMD entry is a migration PMD entry, the call to is_huge_zero_pmd(*pmd) is incorrect because it calls pmd_pfn(pmd) instead of migration_entry_to_pfn(pmd_to_swp_entry(pmd)). Fix these problems by checking for a PMD migration entry. Fixes: 84c3fc4e9c56 ("mm: thp: check pmd migration entry in common path") Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Reviewed-by: Yang Shi Reviewed-by: Zi Yan Cc: Jerome Glisse Cc: John Hubbard Cc: Alistair Popple Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Bharata B Rao Cc: Ben Skeggs Cc: Shuah Khan Cc: [4.14+] Link: https://lkml.kernel.org/r/20200903183140.19055-1-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit b0399092ccebd9feef68d4ceb8d6219a8c0caa05 Author: Muchun Song Date: Fri Sep 18 21:20:21 2020 -0700 kprobes: fix kill kprobe which has been marked as gone If a kprobe is marked as gone, we should not kill it again. Otherwise, we can disarm the kprobe more than once. In that case, the statistics of kprobe_ftrace_enabled can unbalance which can lead to that kprobe do not work. Fixes: e8386a0cb22f ("kprobes: support probing module __exit function") Co-developed-by: Chengming Zhou Signed-off-by: Muchun Song Signed-off-by: Chengming Zhou Signed-off-by: Andrew Morton Acked-by: Masami Hiramatsu Cc: "Naveen N . Rao" Cc: Anil S Keshavamurthy Cc: David S. Miller Cc: Song Liu Cc: Steven Rostedt Cc: Link: https://lkml.kernel.org/r/20200822030055.32383-1-songmuchun@bytedance.com Signed-off-by: Linus Torvalds commit bb3e96d63eb75a2f4ff790b089f6b93614c729a1 Author: Byron Stanoszek Date: Fri Sep 18 21:20:18 2020 -0700 tmpfs: restore functionality of nr_inodes=0 Commit e809d5f0b5c9 ("tmpfs: per-superblock i_ino support") made changes to shmem_reserve_inode() in mm/shmem.c, however the original test for (sbinfo->max_inodes) got dropped. This causes mounting tmpfs with option nr_inodes=0 to fail: # mount -ttmpfs -onr_inodes=0 none /ext0 mount: /ext0: mount(2) system call failed: Cannot allocate memory. This patch restores the nr_inodes=0 functionality. Fixes: e809d5f0b5c9 ("tmpfs: per-superblock i_ino support") Signed-off-by: Byron Stanoszek Signed-off-by: Andrew Morton Acked-by: Hugh Dickins Acked-by: Chris Down Link: https://lkml.kernel.org/r/20200902035715.16414-1-gandalf@winds.org Signed-off-by: Linus Torvalds commit 0964730bf46b4e271c5ecad5badbbd95737c087b Author: Hugh Dickins Date: Fri Sep 18 21:20:15 2020 -0700 mlock: fix unevictable_pgs event counts on THP 5.8 commit 5d91f31faf8e ("mm: swap: fix vmstats for huge page") has established that vm_events should count every subpage of a THP, including unevictable_pgs_culled and unevictable_pgs_rescued; but lru_cache_add_inactive_or_unevictable() was not doing so for unevictable_pgs_mlocked, and mm/mlock.c was not doing so for unevictable_pgs mlocked, munlocked, cleared and stranded. Fix them; but THPs don't go the pagevec way in mlock.c, so no fixes needed on that path. Fixes: 5d91f31faf8e ("mm: swap: fix vmstats for huge page") Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Yang Shi Cc: Alex Shi Cc: Johannes Weiner Cc: Michal Hocko Cc: Mike Kravetz Cc: Qian Cai Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008301408230.5954@eggly.anvils Signed-off-by: Linus Torvalds commit 8d8869ca5d2d9d86db96271ab063fdcfa9baf5b4 Author: Hugh Dickins Date: Fri Sep 18 21:20:12 2020 -0700 mm: fix check_move_unevictable_pages() on THP check_move_unevictable_pages() is used in making unevictable shmem pages evictable: by shmem_unlock_mapping(), drm_gem_check_release_pagevec() and i915/gem check_release_pagevec(). Those may pass down subpages of a huge page, when /sys/kernel/mm/transparent_hugepage/shmem_enabled is "force". That does not crash or warn at present, but the accounting of vmstats unevictable_pgs_scanned and unevictable_pgs_rescued is inconsistent: scanned being incremented on each subpage, rescued only on the head (since tails already appear evictable once the head has been updated). 5.8 commit 5d91f31faf8e ("mm: swap: fix vmstats for huge page") has established that vm_events in general (and unevictable_pgs_rescued in particular) should count every subpage: so follow that precedent here. Do this in such a way that if mem_cgroup_page_lruvec() is made stricter (to check page->mem_cgroup is always set), no problem: skip the tails before calling it, and add thp_nr_pages() to vmstats on the head. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Yang Shi Cc: Johannes Weiner Cc: Michal Hocko Cc: Mike Kravetz Cc: Qian Cai Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008301405000.5954@eggly.anvils Signed-off-by: Linus Torvalds commit a333e3e73b6648d3bd3ef6b971a59a6363bfcfc5 Author: Hugh Dickins Date: Fri Sep 18 21:20:06 2020 -0700 mm: migration of hugetlbfs page skip memcg hugetlbfs pages do not participate in memcg: so although they do find most of migrate_page_states() useful, it would be better if they did not call into mem_cgroup_migrate() - where Qian Cai reported that LTP's move_pages12 triggers the warning in Alex Shi's prospective commit "mm/memcg: warning on !memcg after readahead page charged". Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Alex Shi Cc: Michal Hocko Cc: Mike Kravetz Cc: Qian Cai Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008301359460.5954@eggly.anvils Signed-off-by: Linus Torvalds commit 62fdb1632bcbed30c40f6bd2b58297617e442658 Author: Hugh Dickins Date: Fri Sep 18 21:20:03 2020 -0700 ksm: reinstate memcg charge on copied pages Patch series "mm: fixes to past from future testing". Here's a set of independent fixes against 5.9-rc2: prompted by testing Alex Shi's "warning on !memcg" and lru_lock series, but I think fit for 5.9 - though maybe only the first for stable. This patch (of 5): In 5.8 some instances of memcg charging in do_swap_page() and unuse_pte() were removed, on the understanding that swap cache is now already charged at those points; but a case was missed, when ksm_might_need_to_copy() has decided it must allocate a substitute page: such pages were never charged. Fix it inside ksm_might_need_to_copy(). This was discovered by Alex Shi's prospective commit "mm/memcg: warning on !memcg after readahead page charged". But there is a another surprise: this also fixes some rarer uncharged PageAnon cases, when KSM is configured in, but has never been activated. ksm_might_need_to_copy()'s anon_vma->root and linear_page_index() check sometimes catches a case which would need to have been copied if KSM were turned on. Or that's my optimistic interpretation (of my own old code), but it leaves some doubt as to whether everything is working as intended there - might it hint at rare anon ptes which rmap cannot find? A question not easily answered: put in the fix for missed memcg charges. Cc; Matthew Wilcox Fixes: 4c6355b25e8b ("mm: memcontrol: charge swapin pages on instantiation") Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Alex Shi Cc: Michal Hocko Cc: Mike Kravetz Cc: Qian Cai Cc: [5.8] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008301343270.5954@eggly.anvils Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008301358020.5954@eggly.anvils Signed-off-by: Linus Torvalds commit b5bfe7dca3e00a7c7de900b2d671c06cd66d7dee Author: Kees Cook Date: Fri Sep 18 21:20:00 2020 -0700 mailmap: add older email addresses for Kees Cook This adds explicit mailmap entries for my older/other email addresses. Reported-by: Joe Perches Signed-off-by: Kees Cook Signed-off-by: Andrew Morton Cc: Jonathan Corbet Link: https://lkml.kernel.org/r/20200910193939.3798377-1-keescook@chromium.org Signed-off-by: Linus Torvalds commit a27026e95b57acbb8df7182e020b099e7f3b5ac3 Author: Jason Yan Date: Tue Sep 15 15:03:24 2020 +0800 bootconfig: init: make xbc_namebuf static This eliminates the following sparse warning: init/main.c:306:6: warning: symbol 'xbc_namebuf' was not declared. Should it be static? Link: https://lkml.kernel.org/r/20200915070324.2239473-1-yanaijie@huawei.com Reported-by: Hulk Robot Acked-by: Masami Hiramatsu Signed-off-by: Jason Yan Signed-off-by: Steven Rostedt (VMware) commit eb5f95f1593f7c22dac681b19e815828e2af3efd Merge: 92ab97adeefcc cd4d3d5f21ddb Author: Linus Torvalds Date: Fri Sep 18 18:51:08 2020 -0700 Merge tag 's390-5.9-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix order in trace_hardirqs_off_caller() to make locking state consistent even if the IRQ tracer calls into lockdep again. Touches common code. Acked-by Peter Zijlstra. - Correctly handle secure storage violation exception to avoid kernel panic triggered by user space misbehaviour. - Switch the idle->seqcount over to using raw_write_*() to avoid "suspicious RCU usage". - Fix memory leaks on hard unplug in pci code. - Use kvmalloc instead of kmalloc for larger allocations in zcrypt. - Add few missing __init annotations to static functions to avoid section mismatch complains when functions are not inlined. * tag 's390-5.9-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: add 3f program exception handler lockdep: fix order in trace_hardirqs_off_caller() s390/pci: fix leak of DMA tables on hard unplug s390/init: add missing __init annotations s390/zcrypt: fix kmalloc 256k failure s390/idle: fix suspicious RCU usage commit f13d783a184e4868c5fdbdf20c90a8e323f66dd7 Author: Cristobal Forno Date: Fri Sep 18 13:47:43 2020 -0500 MAINTAINERS: Update ibmveth maintainer Removed Thomas Falcon. Added myself (Cristobal Forno) as the maintainer of ibmveth. Signed-off-by: Cristobal Forno Signed-off-by: David S. Miller commit db7cd91a4be15e1485d6b58c6afc8761c59c4efb Author: Necip Fazil Yildiran Date: Thu Sep 17 19:46:43 2020 +0300 net: ipv6: fix kconfig dependency warning for IPV6_SEG6_HMAC When IPV6_SEG6_HMAC is enabled and CRYPTO is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for CRYPTO_HMAC Depends on [n]: CRYPTO [=n] Selected by [y]: - IPV6_SEG6_HMAC [=y] && NET [=y] && INET [=y] && IPV6 [=y] WARNING: unmet direct dependencies detected for CRYPTO_SHA1 Depends on [n]: CRYPTO [=n] Selected by [y]: - IPV6_SEG6_HMAC [=y] && NET [=y] && INET [=y] && IPV6 [=y] WARNING: unmet direct dependencies detected for CRYPTO_SHA256 Depends on [n]: CRYPTO [=n] Selected by [y]: - IPV6_SEG6_HMAC [=y] && NET [=y] && INET [=y] && IPV6 [=y] The reason is that IPV6_SEG6_HMAC selects CRYPTO_HMAC, CRYPTO_SHA1, and CRYPTO_SHA256 without depending on or selecting CRYPTO while those configs are subordinate to CRYPTO. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Fixes: bf355b8d2c30 ("ipv6: sr: add core files for SR HMAC support") Signed-off-by: Necip Fazil Yildiran Signed-off-by: David S. Miller commit ba2fd563b7408b8dd9bbd72fcae8bcb3c14e8ec8 Author: Tony Ambardar Date: Thu Sep 17 04:58:33 2020 -0700 tools/bpftool: Support passing BPFTOOL_VERSION to make This change facilitates out-of-tree builds, packaging, and versioning for test and debug purposes. Defining BPFTOOL_VERSION allows self-contained builds within the tools tree, since it avoids use of the 'kernelversion' target in the top-level makefile, which would otherwise pull in several other includes from outside the tools tree. Signed-off-by: Tony Ambardar Signed-off-by: Daniel Borkmann Acked-by: Quentin Monnet Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200917115833.1235518-1-Tony.Ambardar@gmail.com commit 8f623a10c31bf7dd9cbb10bb53555b83d5ea3192 Merge: a128592799b89 2369e82704692 Author: David S. Miller Date: Fri Sep 18 14:57:59 2020 -0700 Merge tag 'batadv-net-for-davem-20200918' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are some batman-adv bugfixes: - fix wrong type use in backbone_gw hash, by Linus Luessing - disable TT re-routing for multicast packets, by Linus Luessing - Add missing include for in_interrupt(), by Sven Eckelmann - fix BLA/multicast issues for packets sent via unicast, by Linus Luessing (3 patches) ==================== Signed-off-by: David S. Miller commit a128592799b89d3985331d261fa4d41868ee4b04 Author: Yangbo Lu Date: Fri Sep 18 17:22:25 2020 +0800 dpaa2-eth: fix a build warning in dpmac.c Fix below sparse warning in dpmac.c. warning: cast to restricted __le64 Signed-off-by: Yangbo Lu Signed-off-by: David S. Miller commit a3a94156c15737513a8ddda2b8770d2659bbc617 Author: Lu Wei Date: Fri Sep 18 14:36:46 2020 +0800 net: hns: kerneldoc fixes Fix some parameter description mistakes. Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit 6eb158ec0a45dbfd98bc6971c461b7d4d5bf61b3 Author: Matthias Schiffer Date: Fri Sep 11 17:01:39 2020 +0200 i2c: mxs: use MXS_DMA_CTRL_WAIT4END instead of DMA_CTRL_ACK The driver-specific usage of the DMA_CTRL_ACK flag was replaced with a custom flag in commit ceeeb99cd821 ("dmaengine: mxs: rename custom flag"), but i2c-mxs was not updated to use the new flag, completely breaking I2C transactions using DMA. Fixes: ceeeb99cd821 ("dmaengine: mxs: rename custom flag") Signed-off-by: Matthias Schiffer Reviewed-by: Fabio Estevam Signed-off-by: Wolfram Sang commit fc25fa97976b1c2fd226ae2b43e1f5abb61b77c9 Author: Luo bin Date: Fri Sep 18 12:09:38 2020 +0800 hinic: fix sending pkts from core while self testing Call netif_tx_disable firstly before starting doing self-test to avoid sending packet from networking core and self-test packet simultaneously which may cause self-test failure or hw abnormal. Fixes: 4aa218a4fe77 ("hinic: add self test support") Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 2b33b202dc3e30a15d7c0147f26fc6bb23f85493 Merge: 5f6857e808a8b e5fb512d81d02 Author: David S. Miller Date: Fri Sep 18 13:52:34 2020 -0700 Merge branch 'Bugfixes-in-Microsemi-Ocelot-switch-driver' Vladimir Oltean says: ==================== Bugfixes in Microsemi Ocelot switch driver This is a series of 8 assorted patches for "net", on the drivers for the VSC7514 MIPS switch (Ocelot-1), the VSC9953 PowerPC (Seville), and a few more that are common to all supported devices since they are in the common library portion. ==================== Signed-off-by: David S. Miller commit e5fb512d81d021b7c7a0c2547c3dafb9de759285 Author: Vladimir Oltean Date: Fri Sep 18 04:07:30 2020 +0300 net: mscc: ocelot: deinitialize only initialized ports Currently mscc_ocelot_init_ports() will skip initializing a port when it doesn't have a phy-handle, so the ocelot->ports[port] pointer will be NULL. Take this into consideration when tearing down the driver, and add a new function ocelot_deinit_port() to the switch library, mirror of ocelot_init_port(), which needs to be called by the driver for all ports it has initialized. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller commit 22cdb493de54ca4cb161553376f7b02fcaca2328 Author: Vladimir Oltean Date: Fri Sep 18 04:07:29 2020 +0300 net: mscc: ocelot: unregister net devices on unbind This driver was not unregistering its network interfaces on unbind. Now it is. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Reviewed-by: Florian Fainelli Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller commit 7c411799e1b3e0efa3a50e44e98cce6a771441c6 Author: Vladimir Oltean Date: Fri Sep 18 04:07:28 2020 +0300 net: mscc: ocelot: refactor ports parsing code into a dedicated function mscc_ocelot_probe() is already pretty large and hard to follow. So move the code for parsing ports in a separate function. This makes it easier for the next patch to just call mscc_ocelot_release_ports from the error path of mscc_ocelot_init_ports. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Reviewed-by: Florian Fainelli Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller commit d1cc0e932039cc40357baf037ab403d1d2e228fd Author: Vladimir Oltean Date: Fri Sep 18 04:07:27 2020 +0300 net: mscc: ocelot: error checking when calling ocelot_init() ocelot_init() allocates memory, resets the switch and polls for a status register, things which can fail. Stop probing the driver in that case, and propagate the error result. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Reviewed-by: Florian Fainelli Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller commit c9d4b2cf16021d1f65e764f4035d7d1616e3bda3 Author: Vladimir Oltean Date: Fri Sep 18 04:07:26 2020 +0300 net: mscc: ocelot: check for errors on memory allocation of ports Do not proceed probing if we couldn't allocate memory for the ports array, just error out. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Reviewed-by: Florian Fainelli Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller commit a63ed92d217fcc2a36a0fbb77d80d8b9ee31aac1 Author: Vladimir Oltean Date: Fri Sep 18 04:07:25 2020 +0300 net: dsa: seville: fix buffer size of the queue system The VSC9953 Seville switch has 2 megabits of buffer split into 4360 words of 60 bytes each. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Reviewed-by: Florian Fainelli Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller commit 6565243c0677aa2befa5a953cf11bc7b4a6f0a47 Author: Vladimir Oltean Date: Fri Sep 18 04:07:24 2020 +0300 net: mscc: ocelot: add locking for the port TX timestamp ID The ocelot_port->ts_id is used to: (a) populate skb->cb[0] for matching the TX timestamp in the PTP IRQ with an skb. (b) populate the REW_OP from the injection header of the ongoing skb. Only then is ocelot_port->ts_id incremented. This is a problem because, at least theoretically, another timestampable skb might use the same ocelot_port->ts_id before that is incremented. Normally all transmit calls are serialized by the netdev transmit spinlock, but in this case, ocelot_port_add_txtstamp_skb() is also called by DSA, which has started declaring the NETIF_F_LLTX feature since commit 2b86cb829976 ("net: dsa: declare lockless TX feature for slave ports"). So the logic of using and incrementing the timestamp id should be atomic per port. The solution is to use the global ocelot_port->ts_id only while protected by the associated ocelot_port->ts_id_lock. That's where we populate skb->cb[0]. Note that for ocelot, ocelot_port_add_txtstamp_skb is called for the actual skb, but for felix, it is called for the skb's clone. That is something which will also be changed in the future. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Reviewed-by: Florian Fainelli Tested-by: Alexandre Belloni Reviewed-by: Alexandre Belloni Signed-off-by: David S. Miller commit 9dda66acddcbcd5c9e94a1292c679738ba999345 Author: Vladimir Oltean Date: Fri Sep 18 04:07:23 2020 +0300 net: mscc: ocelot: fix race condition with TX timestamping The TX-timestampable skb is added late to the ocelot_port->tx_skbs. It is in a race with the TX timestamp IRQ, which checks that queue trying to match the timestamp with the skb by the ts_id. The skb should be added to the queue before the IRQ can fire. Fixes: 4e3b0468e6d7 ("net: mscc: PTP Hardware Clock (PHC) support") Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Signed-off-by: David S. Miller commit b44658e755b5a733e9df04449facbc738df09170 Author: Qii Wang Date: Thu Sep 17 19:55:42 2020 +0800 i2c: mediatek: Send i2c master code at more than 1MHz The master code needs to being sent when the speed is more than I2C_MAX_FAST_MODE_PLUS_FREQ, not I2C_MAX_FAST_MODE_FREQ in the latest I2C-bus specification and user manual. Signed-off-by: Qii Wang Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit ff6f3aff46beb3c29e0802cffcc559e1756c4814 Author: Qii Wang Date: Thu Sep 17 19:55:41 2020 +0800 i2c: mediatek: Fix generic definitions for bus frequency The max frequency of mediatek i2c controller driver is I2C_MAX_HIGH_SPEED_MODE_FREQ, not I2C_MAX_FAST_MODE_PLUS_FREQ. Fix it. Fixes: 90224e6468e1 ("i2c: drivers: Use generic definitions for bus frequencies") Reviewed-by: Yingjoe Chen Reviewed-by: Andy Shevchenko Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit 92ab97adeefccf375de7ebaad9d5b75d4125fe8b Merge: 69828c475d152 b0cfc315ff38c Author: Linus Torvalds Date: Fri Sep 18 11:59:15 2020 -0700 Merge tag 'sh-for-5.9-part2' of git://git.libc.org/linux-sh Pull arch/sh fixes from Rich Felker: "Fixes for build and function regression" * tag 'sh-for-5.9-part2' of git://git.libc.org/linux-sh: sh: fix syscall tracing sh: remove spurious circular inclusion from asm/smp.h commit 69828c475d15290553cb5512108424746baf6225 Merge: 5a55d36f715b0 75df529bec911 Author: Linus Torvalds Date: Fri Sep 18 11:55:43 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Allow CPUs affected by erratum 1418040 to come online late (previously we only fixed the other case - CPUs not affected by the erratum coming up late). - Fix branch offset in BPF JIT. - Defer the stolen time initialisation to the CPU online time from the CPU starting time to avoid a (sleep-able) memory allocation in an atomic context. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: paravirt: Initialize steal time when cpu is online arm64: bpf: Fix branch offset in JIT arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late commit 5a55d36f715b01a00c1ad7127a73044c6f1c9668 Merge: 794a9965eef49 0460534b532e5 Author: Linus Torvalds Date: Fri Sep 18 11:48:25 2020 -0700 Merge tag 'powerpc-5.9-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Some more powerpc fixes for 5.9: - Opt us out of the DEBUG_VM_PGTABLE support for now as it's causing crashes. - Fix a long standing bug in our DMA mask handling that was hidden until recently, and which caused problems with some drivers. - Fix a boot failure on systems with large amounts of RAM, and no hugepage support and using Radix MMU, only seen in the lab. - A few other minor fixes. Thanks to Alexey Kardashevskiy, Aneesh Kumar K.V, Gautham R. Shenoy, Hari Bathini, Ira Weiny, Nick Desaulniers, Shirisha Ganta, Vaibhav Jain, and Vaidyanathan Srinivasan" * tag 'powerpc-5.9-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute cpuidle: pseries: Fix CEDE latency conversion from tb to us powerpc/dma: Fix dma_map_ops::get_required_mask Revert "powerpc/build: vdso linker warning for orphan sections" powerpc/mm: Remove DEBUG_VM_PGTABLE support on powerpc selftests/powerpc: Skip PROT_SAO test in guests/LPARS powerpc/book3s64/radix: Fix boot failure with large amount of guest memory commit 794a9965eef498f6e4c466167880acb4ab990b63 Merge: 343b529a00d43 e8dc676e2a35e Author: Linus Torvalds Date: Fri Sep 18 11:43:21 2020 -0700 Merge tag 'pm-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These add a new CPU ID to the RAPL power capping driver and prevent the ACPI processor idle driver from triggering RCU-lockdep complaints. Specifics: - Add support for the Lakefield chip to the RAPL power capping driver (Ricardo Neri). - Modify the ACPI processor idle driver to prevent it from triggering RCU-lockdep complaints which has started to happen after recent changes in that area (Peter Zijlstra)" * tag 'pm-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: processor: Take over RCU-idle for C3-BM idle cpuidle: Allow cpuidle drivers to take over RCU-idle ACPI: processor: Use CPUIDLE_FLAG_TLB_FLUSHED ACPI: processor: Use CPUIDLE_FLAG_TIMER_STOP powercap: RAPL: Add support for Lakefield commit 343b529a00d43d38f753d8221bd9fcd9bbc73d5f Merge: 1fd79656f7d59 8949b6660c3c7 Author: Linus Torvalds Date: Fri Sep 18 11:38:08 2020 -0700 Merge tag 'sound-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here is a collection of fixes for 5.9. All look small and are nothing scary. The majority of changes are about ASoC driver- specific fixes, while there are a couple of ASoC core fixes (DAI lookup and lockdep stuff) and usual HD-audio quirks" * tag 'sound-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits) ALSA: hda/realtek - The Mic on a RedmiBook doesn't work ASoC: tlv320adcx140: Wake up codec before accessing register ASoC: core: Do not cleanup uninitialized dais on soc_pcm_open failure ALSA: hda: fixup headset for ASUS GX502 laptop ASoC: Intel: bytcr_rt5640: Add quirk for MPMAN Converter9 2-in-1 ASoC: Intel: haswell: Fix power transition refactor ASoC: tlv320adcx140: Fix accessing uninitialized adcx140->dev ASoC: wm8994: Ensure the device is resumed in wm89xx_mic_detect functions ASoC: wm8994: Skip setting of the WM8994_MICBIAS register for WM1811 ASoC: meson: axg-toddr: fix channel order on g12 platforms ASoC: soc-core: add snd_soc_find_dai_with_mutex() ASoC: qcom: common: Fix refcount imbalance on error ASoC: rt700: Fix return check for devm_regmap_init_sdw() ASoC: rt715: Fix return check for devm_regmap_init_sdw() ASoC: rt711: Fix return check for devm_regmap_init_sdw() ASoC: rt1308-sdw: Fix return check for devm_regmap_init_sdw() ASoC: max98373: Fix return check for devm_regmap_init_sdw() ASoC: ti: fixup ams_delta_mute() function name ASoC: pcm3168a: ignore 0 Hz settings ASoC: Intel: tgl_max98373: fix a runtime pm issue in multi-thread case ... commit 82d083ab60c3693201c6f5c7a5f23a6ed422098d Author: Masami Hiramatsu Date: Thu Sep 10 17:55:05 2020 +0900 kprobes: tracing/kprobes: Fix to kill kprobes on initmem after boot Since kprobe_event= cmdline option allows user to put kprobes on the functions in initmem, kprobe has to make such probes gone after boot. Currently the probes on the init functions in modules will be handled by module callback, but the kernel init text isn't handled. Without this, kprobes may access non-exist text area to disable or remove it. Link: https://lkml.kernel.org/r/159972810544.428528.1839307531600646955.stgit@devnote2 Fixes: 970988e19eb0 ("tracing/kprobe: Add kprobe_event= boot parameter") Cc: Jonathan Corbet Cc: Shuah Khan Cc: Randy Dunlap Cc: Ingo Molnar Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 1fd79656f7d59b2ccfc8d7ec8136db60d21f1e0a Merge: 92373933f7dc0 e97685abd5d71 Author: Linus Torvalds Date: Fri Sep 18 11:20:34 2020 -0700 Merge tag 'iommu-fixes-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: "Two fixes for the AMD IOMMU driver: - Fix a potential NULL-ptr dereference found by smatch - Fix interrupt remapping when a device is assigned to a guest and AVIC is enabled" * tag 'iommu-fixes-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Restore IRTE.RemapEn bit for amd_iommu_activate_guest_mode iommu/amd: Fix potential @entry null deref commit 92373933f7dc0b311804d7d45bdae2aced81da23 Merge: 10b82d5176488 1afc0c89f6a15 Author: Linus Torvalds Date: Fri Sep 18 11:11:13 2020 -0700 Merge tag 'mtd/fixes-for-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD/SPI NOR fixes from Vignesh Raghavendra: "Revert patches that caused non volatile Quad Enable bit to be cleared for certain SPI NOR flashes during module remove or during shutdown, thus breaking backward compatibility" Acked-by: Miquel Raynal * tag 'mtd/fixes-for-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: Revert "mtd: spi-nor: Add capability to disable flash quad mode" Revert "mtd: spi-nor: Disable the flash quad mode in spi_nor_restore()" commit db6c6a0df840e3f52c84cc302cc1a08ba11a4416 Author: Josh Poimboeuf Date: Thu Sep 10 10:24:57 2020 -0500 objtool: Fix noreturn detection for ignored functions When a function is annotated with STACK_FRAME_NON_STANDARD, objtool doesn't validate its code paths. It also skips sibling call detection within the function. But sibling call detection is actually needed for the case where the ignored function doesn't have any return instructions. Otherwise objtool naively marks the function as implicit static noreturn, which affects the reachability of its callers, resulting in "unreachable instruction" warnings. Fix it by just enabling sibling call detection for ignored functions. The 'insn->ignore' check in add_jump_destinations() is no longer needed after e6da9567959e ("objtool: Don't use ignore flag for fake jumps"). Fixes the following warning: arch/x86/kvm/vmx/vmx.o: warning: objtool: vmx_handle_exit_irqoff()+0x142: unreachable instruction which triggers on an allmodconfig with CONFIG_GCOV_KERNEL unset. Reported-by: Linus Torvalds Signed-off-by: Josh Poimboeuf Signed-off-by: Borislav Petkov Acked-by: Linus Torvalds Link: https://lkml.kernel.org/r/5b1e2536cdbaa5246b60d7791b76130a74082c62.1599751464.git.jpoimboe@redhat.com commit 46bbe5c671e06f070428b9be142cc4ee5cedebac Author: Tom Rix Date: Mon Sep 7 06:58:45 2020 -0700 tracing: fix double free clang static analyzer reports this problem trace_events_hist.c:3824:3: warning: Attempt to free released memory kfree(hist_data->attrs->var_defs.name[i]); In parse_var_defs() if there is a problem allocating var_defs.expr, the earlier var_defs.name is freed. This free is duplicated by free_var_defs() which frees the rest of the list. Because free_var_defs() has to run anyway, remove the second free fom parse_var_defs(). Link: https://lkml.kernel.org/r/20200907135845.15804-1-trix@redhat.com Cc: stable@vger.kernel.org Fixes: 30350d65ac56 ("tracing: Add variable support to hist triggers") Reviewed-by: Tom Zanussi Signed-off-by: Tom Rix Signed-off-by: Steven Rostedt (VMware) commit 54fa9ba564b717fc2cf689427e195c360315999d Author: Tobias Klauser Date: Mon Sep 7 11:32:07 2020 +0200 ftrace: Let ftrace_enable_sysctl take a kernel pointer buffer Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") changed ctl_table.proc_handler to take a kernel pointer. Adjust the signature of ftrace_enable_sysctl to match ctl_table.proc_handler which fixes the following sparse warning: kernel/trace/ftrace.c:7544:43: warning: incorrect type in argument 3 (different address spaces) kernel/trace/ftrace.c:7544:43: expected void * kernel/trace/ftrace.c:7544:43: got void [noderef] __user *buffer Link: https://lkml.kernel.org/r/20200907093207.13540-1-tklauser@distanz.ch Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Cc: Andrew Morton Cc: Ingo Molnar Cc: Christoph Hellwig Cc: Al Viro Signed-off-by: Tobias Klauser Signed-off-by: Steven Rostedt (VMware) commit 620cf45f7a516bf5fe9e5dce675a652e935c8bde Author: Marc Zyngier Date: Tue Sep 15 11:42:18 2020 +0100 KVM: arm64: Remove S1PTW check from kvm_vcpu_dabt_iswrite() Now that kvm_vcpu_trap_is_write_fault() checks for S1PTW, there is no need for kvm_vcpu_dabt_iswrite() to do the same thing, as we already check for this condition on all existing paths. Drop the check and add a comment instead. Signed-off-by: Marc Zyngier Reviewed-by: Will Deacon Link: https://lore.kernel.org/r/20200915104218.1284701-3-maz@kernel.org commit c4ad98e4b72cb5be30ea282fce935248f2300e62 Author: Marc Zyngier Date: Tue Sep 15 11:42:17 2020 +0100 KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch KVM currently assumes that an instruction abort can never be a write. This is in general true, except when the abort is triggered by a S1PTW on instruction fetch that tries to update the S1 page tables (to set AF, for example). This can happen if the page tables have been paged out and brought back in without seeing a direct write to them (they are thus marked read only), and the fault handling code will make the PT executable(!) instead of writable. The guest gets stuck forever. In these conditions, the permission fault must be considered as a write so that the Stage-1 update can take place. This is essentially the I-side equivalent of the problem fixed by 60e21a0ef54c ("arm64: KVM: Take S1 walks into account when determining S2 write faults"). Update kvm_is_write_fault() to return true on IABT+S1PTW, and introduce kvm_vcpu_trap_is_exec_fault() that only return true when no faulting on a S1 fault. Additionally, kvm_vcpu_dabt_iss1tw() is renamed to kvm_vcpu_abt_iss1tw(), as the above makes it plain that it isn't specific to data abort. Signed-off-by: Marc Zyngier Reviewed-by: Will Deacon Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200915104218.1284701-2-maz@kernel.org commit 795d6379a47bcbb88bd95a69920e4acc52849f88 Author: Sebastian Andrzej Siewior Date: Fri Sep 4 10:23:31 2020 +0200 tracing: Make the space reserved for the pid wider For 64bit CONFIG_BASE_SMALL=0 systems PID_MAX_LIMIT is set by default to 4194304. During boot the kernel sets a new value based on number of CPUs but no lower than 32768. It is 1024 per CPU so with 128 CPUs the default becomes 131072 which needs six digits. This value can be increased during run time but must not exceed the initial upper limit. Systemd sometime after v241 sets it to the upper limit during boot. The result is that when the pid exceeds five digits, the trace output is a little hard to read because it is no longer properly padded (same like on big iron with 98+ CPUs). Increase the pid padding to seven digits. Link: https://lkml.kernel.org/r/20200904082331.dcdkrr3bkn3e4qlg@linutronix.de Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Steven Rostedt (VMware) commit 478ece9573f04aed834e05e0bbf034320d240f9f Author: Adrian Hunter Date: Tue Sep 1 12:16:17 2020 +0300 ftrace: Fix missing synchronize_rcu() removing trampoline from kallsyms Add synchronize_rcu() after list_del_rcu() in ftrace_remove_trampoline_from_kallsyms() to protect readers of ftrace_ops_trampoline_list (in ftrace_get_trampoline_kallsym) which is used when kallsyms is read. Link: https://lkml.kernel.org/r/20200901091617.31837-1-adrian.hunter@intel.com Fixes: fc0ea795f53c8d ("ftrace: Add symbols for ftrace trampolines") Signed-off-by: Adrian Hunter Signed-off-by: Steven Rostedt (VMware) commit d5e47505e02666d5b3fe99212e0100791847dc8d Author: Miroslav Benes Date: Mon Aug 31 14:26:31 2020 +0200 ftrace: Free the trampoline when ftrace_startup() fails Commit fc0ea795f53c ("ftrace: Add symbols for ftrace trampolines") missed to remove ops from new ftrace_ops_trampoline_list in ftrace_startup() if ftrace_hash_ipmodify_enable() fails there. It may lead to BUG if such ops come from a module which may be removed. Moreover, the trampoline itself is not freed in this case. Fix it by calling ftrace_trampoline_free() during the rollback. Link: https://lkml.kernel.org/r/20200831122631.28057-1-mbenes@suse.cz Fixes: fc0ea795f53c ("ftrace: Add symbols for ftrace trampolines") Fixes: f8b8be8a310a ("ftrace, kprobes: Support IPMODIFY flag to find IP modify conflict") Signed-off-by: Miroslav Benes Signed-off-by: Steven Rostedt (VMware) commit 3031313eb3d549b7ad6f9fbcc52ba04412e3eb9e Author: Masami Hiramatsu Date: Tue Sep 1 00:12:07 2020 +0900 kprobes: Fix to check probe enabled before disarm_kprobe_ftrace() Commit 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler") fixed one bug but not completely fixed yet. If we run a kprobe_module.tc of ftracetest, kernel showed a warning as below. # ./ftracetest test.d/kprobe/kprobe_module.tc === Ftrace unit tests === [1] Kprobe dynamic event - probing module ... [ 22.400215] ------------[ cut here ]------------ [ 22.400962] Failed to disarm kprobe-ftrace at trace_printk_irq_work+0x0/0x7e [trace_printk] (-2) [ 22.402139] WARNING: CPU: 7 PID: 200 at kernel/kprobes.c:1091 __disarm_kprobe_ftrace.isra.0+0x7e/0xa0 [ 22.403358] Modules linked in: trace_printk(-) [ 22.404028] CPU: 7 PID: 200 Comm: rmmod Not tainted 5.9.0-rc2+ #66 [ 22.404870] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014 [ 22.406139] RIP: 0010:__disarm_kprobe_ftrace.isra.0+0x7e/0xa0 [ 22.406947] Code: 30 8b 03 eb c9 80 3d e5 09 1f 01 00 75 dc 49 8b 34 24 89 c2 48 c7 c7 a0 c2 05 82 89 45 e4 c6 05 cc 09 1f 01 01 e8 a9 c7 f0 ff <0f> 0b 8b 45 e4 eb b9 89 c6 48 c7 c7 70 c2 05 82 89 45 e4 e8 91 c7 [ 22.409544] RSP: 0018:ffffc90000237df0 EFLAGS: 00010286 [ 22.410385] RAX: 0000000000000000 RBX: ffffffff83066024 RCX: 0000000000000000 [ 22.411434] RDX: 0000000000000001 RSI: ffffffff810de8d3 RDI: ffffffff810de8d3 [ 22.412687] RBP: ffffc90000237e10 R08: 0000000000000001 R09: 0000000000000001 [ 22.413762] R10: 0000000000000000 R11: 0000000000000001 R12: ffff88807c478640 [ 22.414852] R13: ffffffff8235ebc0 R14: ffffffffa00060c0 R15: 0000000000000000 [ 22.415941] FS: 00000000019d48c0(0000) GS:ffff88807d7c0000(0000) knlGS:0000000000000000 [ 22.417264] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 22.418176] CR2: 00000000005bb7e3 CR3: 0000000078f7a000 CR4: 00000000000006a0 [ 22.419309] Call Trace: [ 22.419990] kill_kprobe+0x94/0x160 [ 22.420652] kprobes_module_callback+0x64/0x230 [ 22.421470] notifier_call_chain+0x4f/0x70 [ 22.422184] blocking_notifier_call_chain+0x49/0x70 [ 22.422979] __x64_sys_delete_module+0x1ac/0x240 [ 22.423733] do_syscall_64+0x38/0x50 [ 22.424366] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 22.425176] RIP: 0033:0x4bb81d [ 22.425741] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 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 c7 c1 e0 ff ff ff f7 d8 64 89 01 48 [ 22.428726] RSP: 002b:00007ffc70fef008 EFLAGS: 00000246 ORIG_RAX: 00000000000000b0 [ 22.430169] RAX: ffffffffffffffda RBX: 00000000019d48a0 RCX: 00000000004bb81d [ 22.431375] RDX: 0000000000000000 RSI: 0000000000000880 RDI: 00007ffc70fef028 [ 22.432543] RBP: 0000000000000880 R08: 00000000ffffffff R09: 00007ffc70fef320 [ 22.433692] R10: 0000000000656300 R11: 0000000000000246 R12: 00007ffc70fef028 [ 22.434635] R13: 0000000000000000 R14: 0000000000000002 R15: 0000000000000000 [ 22.435682] irq event stamp: 1169 [ 22.436240] hardirqs last enabled at (1179): [] console_unlock+0x422/0x580 [ 22.437466] hardirqs last disabled at (1188): [] console_unlock+0x7b/0x580 [ 22.438608] softirqs last enabled at (866): [] __do_softirq+0x38e/0x490 [ 22.439637] softirqs last disabled at (859): [] asm_call_on_stack+0x12/0x20 [ 22.440690] ---[ end trace 1e7ce7e1e4567276 ]--- [ 22.472832] trace_kprobe: This probe might be able to register after target module is loaded. Continue. This is because the kill_kprobe() calls disarm_kprobe_ftrace() even if the given probe is not enabled. In that case, ftrace_set_filter_ip() fails because the given probe point is not registered to ftrace. Fix to check the given (going) probe is enabled before invoking disarm_kprobe_ftrace(). Link: https://lkml.kernel.org/r/159888672694.1411785.5987998076694782591.stgit@devnote2 Fixes: 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler") Cc: Ingo Molnar Cc: "Naveen N . Rao" Cc: Anil S Keshavamurthy Cc: David Miller Cc: Muchun Song Cc: Chengming Zhou Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit e8dc676e2a35e753fc46664968963f22e6e8af4a Merge: e1c2d96cd0196 1fecfdbb7acc6 Author: Rafael J. Wysocki Date: Fri Sep 18 17:38:31 2020 +0200 Merge branch 'pm-cpuidle' * pm-cpuidle: ACPI: processor: Take over RCU-idle for C3-BM idle cpuidle: Allow cpuidle drivers to take over RCU-idle ACPI: processor: Use CPUIDLE_FLAG_TLB_FLUSHED ACPI: processor: Use CPUIDLE_FLAG_TIMER_STOP commit a608b6a646e8816bc0db156baad2e0679fa4d137 Author: Masahiro Yamada Date: Wed Sep 9 07:16:37 2020 +0900 kconfig: qconf: use delete[] instead of delete to free array (again) Commit c9b09a9249e6 ("kconfig: qconf: use delete[] instead of delete to free array") fixed two lines, but there is one more. (cppcheck does not report it for some reason...) This was detected by Clang. "make HOSTCXX=clang++ xconfig" reports the following: scripts/kconfig/qconf.cc:1279:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete] delete data; ^ [] scripts/kconfig/qconf.cc:1239:15: note: allocated with 'new[]' here char *data = new char[count + 1]; ^ Fixes: c4f7398bee9c ("kconfig: qconf: make debug links work again") Fixes: c9b09a9249e6 ("kconfig: qconf: use delete[] instead of delete to free array") Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit b9df46d08a8d098ea2124cb9e3b84458a474b4d4 Author: Trond Myklebust Date: Fri Sep 18 09:19:43 2020 -0400 pNFS/flexfiles: Be consistent about mirror index types A mirror index is always of type u32. Signed-off-by: Trond Myklebust commit ee15c7b53e52fb04583f734461244c4dcca828fa Author: Trond Myklebust Date: Fri Sep 18 08:58:58 2020 -0400 pNFS/flexfiles: Ensure we initialise the mirror bsizes correctly on read While it is true that reading from an unmirrored source always uses index 0, that is no longer true for mirrored sources when we fail over. Fixes: 563c53e73b8b ("NFS: Fix flexfiles read failover") Signed-off-by: Trond Myklebust commit 75bcbd6913de649601f4e7d3fb6d2b5effc24e9e Author: John Crispin Date: Fri Sep 18 13:53:04 2020 +0200 mac80211: fix 80 MHz association to 160/80+80 AP on 6 GHz When trying to associate to an AP support 180 or 80+80 MHz on 6 GHz with a STA that only has 80 Mhz support the cf2 field inside the chandef will get set causing the association to fail when trying to validate the chandef. Fix this by checking the support flags prior to setting cf2. Fixes: 57fa5e85d53ce ("mac80211: determine chandef from HE 6 GHz operation") Signed-off-by: John Crispin Link: https://lore.kernel.org/r/20200918115304.1135693-1-john@phrozen.org [reword commit message a bit] Signed-off-by: Johannes Berg commit d36cb0205f034e943aa29e35b59c6a441f0056b5 Author: Charles Keepax Date: Fri Sep 18 12:20:02 2020 +0100 regmap: debugfs: Add back in erroneously removed initialisation of ret Fixes: 94cc89eb8fa5 ("regmap: debugfs: Fix handling of name string for debugfs init delays") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200918112002.15216-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 3bd5c7a28a7c3aba07a2d300d43f8e988809e147 Author: Felix Fietkau Date: Thu Sep 17 14:50:31 2020 +0200 mac80211: do not allow bigger VHT MPDUs than the hardware supports Limit maximum VHT MPDU size by local capability. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200917125031.45009-1-nbd@nbd.name Signed-off-by: Johannes Berg commit c0de8776af6543e10d1a5c8969679fd9f6b66fa9 Author: Johannes Berg Date: Thu Sep 17 11:52:23 2020 +0200 cfg80211: fix 6 GHz channel conversion We shouldn't accept any channels bigger than 233, fix that. Reported-by: Amar Fixes: d1a1646c0de7 ("cfg80211: adapt to new channelization of the 6GHz band") Signed-off-by: Johannes Berg Link: https://lore.kernel.org/r/20200917115222.312ba6f1d461.I3a8c8fbcc3cc019814fd9cd0aced7eb591626136@changeid Signed-off-by: Johannes Berg commit 780a8c9efc65f6d86acd44794495cedcd32eeb26 Author: Wen Gong Date: Fri Sep 11 10:29:02 2020 +0000 mac80211: do not disable HE if HT is missing on 2.4 GHz VHT is not supported on 2.4 GHz, but HE is; don't disable HE if HT is missing there, do that only on 5 GHz (6 GHz is only HE). Fixes: 57fa5e85d53ce51 ("mac80211: determine chandef from HE 6 GHz operation") Signed-off-by: Wen Gong Link: https://lore.kernel.org/r/010101747cb617f2-593c5410-1648-4a42-97a0-f3646a5a6dd1-000000@us-west-2.amazonses.com [rewrite the commit message] Signed-off-by: Johannes Berg commit 412a84b5714af56f3eb648bba155107b5edddfdf Author: Aloka Dixit Date: Fri Sep 11 01:11:35 2020 +0000 mac80211: Fix radiotap header channel flag for 6GHz band Radiotap header field 'Channel flags' has '2 GHz spectrum' set to 'true' for 6GHz packet. Change it to 5GHz as there isn't a separate option available for 6GHz. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/010101747ab7b703-1d7c9851-1594-43bf-81f7-f79ce7a67cc6-000000@us-west-2.amazonses.com Signed-off-by: Johannes Berg commit b959ba9f468b1c581f40e92661ad58b093abaa03 Author: Necip Fazil Yildiran Date: Wed Sep 9 12:54:53 2020 +0300 lib80211: fix unmet direct dependendices config warning when !CRYPTO When LIB80211_CRYPT_CCMP is enabled and CRYPTO is disabled, it results in unmet direct dependencies config warning. The reason is that LIB80211_CRYPT_CCMP selects CRYPTO_AES and CRYPTO_CCM, which are subordinate to CRYPTO. This is reproducible with CRYPTO disabled and R8188EU enabled, where R8188EU selects LIB80211_CRYPT_CCMP but does not select or depend on CRYPTO. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Fixes: a11e2f85481c ("lib80211: use crypto API ccm(aes) transform for CCMP processing") Signed-off-by: Necip Fazil Yildiran Link: https://lore.kernel.org/r/20200909095452.3080-1-fazilyildiran@gmail.com Signed-off-by: Johannes Berg commit 8e280369b9076dc08ce13c802c1687b81b4cccd4 Author: Felix Fietkau Date: Tue Sep 15 10:59:45 2020 +0200 mac80211: add AQL support for VHT160 tx rates When converting from struct ieee80211_tx_rate to ieee80211_rx_status, there was one check missing to fill in the bandwidth for 160 MHz Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20200915085945.3782-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 1f38b8c564b8c24132428f6a4d04e05366fa10f4 Author: Felix Fietkau Date: Tue Sep 15 10:59:44 2020 +0200 mac80211: extend AQL aggregation estimation to HE and fix unit mismatch The unit of the return value of ieee80211_get_rate_duration is nanoseconds, not microseconds. Adjust the duration checks to account for that. For higher data rates, allow larger estimated aggregation sizes, and add some values for HE as well, which can use much larger aggregates. Since small packets with high data rates can now lead to duration values too small for info->tx_time_est, return a minimum of 4us. Fixes: f01cfbaf9b29 ("mac80211: improve AQL aggregation estimation for low data rates") Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20200915085945.3782-1-nbd@nbd.name Signed-off-by: Johannes Berg commit e97685abd5d711c885053d4949178f7ab9acbaef Author: Suravee Suthikulpanit Date: Wed Sep 16 11:17:20 2020 +0000 iommu/amd: Restore IRTE.RemapEn bit for amd_iommu_activate_guest_mode Commit e52d58d54a32 ("iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE") removed an assumption that modify_irte_ga always set the valid bit, which requires the callers to set the appropriate value for the struct irte_ga.valid bit before calling the function. Similar to the commit 26e495f34107 ("iommu/amd: Restore IRTE.RemapEn bit after programming IRTE"), which is for the function amd_iommu_deactivate_guest_mode(). The same change is also needed for the amd_iommu_activate_guest_mode(). Otherwise, this could trigger IO_PAGE_FAULT for the VFIO based VMs with AVIC enabled. Fixes: e52d58d54a321 ("iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE") Reported-by: Maxim Levitsky Signed-off-by: Suravee Suthikulpanit Tested-by: Maxim Levitsky Reviewed-by: Joao Martins Reviewed-by: Maxim Levitsky Cc: Joao Martins Link: https://lore.kernel.org/r/20200916111720.43913-1-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit 14c4acc5ed22c21f9821103be7c48efdf9763584 Author: Joao Martins Date: Thu Sep 10 18:16:21 2020 +0100 iommu/amd: Fix potential @entry null deref After commit 26e495f34107 ("iommu/amd: Restore IRTE.RemapEn bit after programming IRTE"), smatch warns: drivers/iommu/amd/iommu.c:3870 amd_iommu_deactivate_guest_mode() warn: variable dereferenced before check 'entry' (see line 3867) Fix this by moving the @valid assignment to after @entry has been checked for NULL. Fixes: 26e495f34107 ("iommu/amd: Restore IRTE.RemapEn bit after programming IRTE") Reported-by: Dan Carpenter Signed-off-by: Joao Martins Reviewed-by: Suravee Suthikulpanit Cc: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20200910171621.12879-1-joao.m.martins@oracle.com Signed-off-by: Joerg Roedel commit 6f9885a36c006d798319661fa849f9c2922223b9 Author: Josh Poimboeuf Date: Mon Sep 14 12:04:22 2020 -0500 x86/unwind/fp: Fix FP unwinding in ret_from_fork There have been some reports of "bad bp value" warnings printed by the frame pointer unwinder: WARNING: kernel stack regs at 000000005bac7112 in sh:1014 has bad 'bp' value 0000000000000000 This warning happens when unwinding from an interrupt in ret_from_fork(). If entry code gets interrupted, the state of the frame pointer (rbp) may be undefined, which can confuse the unwinder, resulting in warnings like the above. There's an in_entry_code() check which normally silences such warnings for entry code. But in this case, ret_from_fork() is getting interrupted. It recently got moved out of .entry.text, so the in_entry_code() check no longer works. It could be moved back into .entry.text, but that would break the noinstr validation because of the call to schedule_tail(). Instead, initialize each new task's RBP to point to the task's entry regs via an encoded frame pointer. That will allow the unwinder to reach the end of the stack gracefully. Fixes: b9f6976bfb94 ("x86/entry/64: Move non entry code into .text section") Reported-by: Naresh Kamboju Reported-by: Logan Gunthorpe Signed-off-by: Josh Poimboeuf Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Link: https://lkml.kernel.org/r/f366bbf5a8d02e2318ee312f738112d0af74d16f.1600103007.git.jpoimboe@redhat.com commit b4ebd0827fd024d0d23c1c9ee33be39c57cf7ad0 Author: Alex Deucher Date: Tue Sep 15 13:36:20 2020 -0400 drm/amdgpu: remove experimental flag from navi12 Navi12 has worked fine for a while now. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit fc08ce66c0f3776b185b099b8093df2fd7f81151 Author: Likun Gao Date: Thu Jan 16 10:45:38 2020 +0800 drm/amdgpu: add device ID for sienna_cichlid (v2) Add device ID for sienna_cichlid. v2: squash in additional device ids. Reviewed-by: Hawking Zhang Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8a410da6aaf6e9a1903aeefc6353f62dfcf0065a Author: Alex Deucher Date: Fri May 1 16:46:11 2020 -0400 drm/amdgpu: use the AV1 defines for VCN 3.0 Switch from magic numbers to defines for AV1 clockgating. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1b51916b9734acd609c4f552e582cdc59ac254d6 Author: Alex Deucher Date: Fri May 1 16:45:09 2020 -0400 drm/amdgpu: add VCN 3.0 AV1 registers This adds the AV1 registers. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5d5b71e8a0f2f5649991d651d005181dc087981c Author: Alex Deucher Date: Fri May 1 16:42:56 2020 -0400 drm/amdgpu: add the GC 10.3 VRS registers Add the VRS registers. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1d0e16ac1a9e800598dcfa5b6bc53b704a103390 Author: Philip Yang Date: Tue Sep 15 17:07:35 2020 -0400 drm/amdgpu: prevent double kfree ttm->sg Set ttm->sg to NULL after kfree, to avoid memory corruption backtrace: [ 420.932812] kernel BUG at /build/linux-do9eLF/linux-4.15.0/mm/slub.c:295! [ 420.934182] invalid opcode: 0000 [#1] SMP NOPTI [ 420.935445] Modules linked in: xt_conntrack ipt_MASQUERADE [ 420.951332] Hardware name: Dell Inc. PowerEdge R7525/0PYVT1, BIOS 1.5.4 07/09/2020 [ 420.952887] RIP: 0010:__slab_free+0x180/0x2d0 [ 420.954419] RSP: 0018:ffffbe426291fa60 EFLAGS: 00010246 [ 420.955963] RAX: ffff9e29263e9c30 RBX: ffff9e29263e9c30 RCX: 000000018100004b [ 420.957512] RDX: ffff9e29263e9c30 RSI: fffff3d33e98fa40 RDI: ffff9e297e407a80 [ 420.959055] RBP: ffffbe426291fb00 R08: 0000000000000001 R09: ffffffffc0d39ade [ 420.960587] R10: ffffbe426291fb20 R11: ffff9e49ffdd4000 R12: ffff9e297e407a80 [ 420.962105] R13: fffff3d33e98fa40 R14: ffff9e29263e9c30 R15: ffff9e2954464fd8 [ 420.963611] FS: 00007fa2ea097780(0000) GS:ffff9e297e840000(0000) knlGS:0000000000000000 [ 420.965144] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 420.966663] CR2: 00007f16bfffefb8 CR3: 0000001ff0c62000 CR4: 0000000000340ee0 [ 420.968193] Call Trace: [ 420.969703] ? __page_cache_release+0x3c/0x220 [ 420.971294] ? amdgpu_ttm_tt_unpopulate+0x5e/0x80 [amdgpu] [ 420.972789] kfree+0x168/0x180 [ 420.974353] ? amdgpu_ttm_tt_set_user_pages+0x64/0xc0 [amdgpu] [ 420.975850] ? kfree+0x168/0x180 [ 420.977403] amdgpu_ttm_tt_unpopulate+0x5e/0x80 [amdgpu] [ 420.978888] ttm_tt_unpopulate.part.10+0x53/0x60 [amdttm] [ 420.980357] ttm_tt_destroy.part.11+0x4f/0x60 [amdttm] [ 420.981814] ttm_tt_destroy+0x13/0x20 [amdttm] [ 420.983273] ttm_bo_cleanup_memtype_use+0x36/0x80 [amdttm] [ 420.984725] ttm_bo_release+0x1c9/0x360 [amdttm] [ 420.986167] amdttm_bo_put+0x24/0x30 [amdttm] [ 420.987663] amdgpu_bo_unref+0x1e/0x30 [amdgpu] [ 420.989165] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x9ca/0xb10 [amdgpu] [ 420.990666] kfd_ioctl_alloc_memory_of_gpu+0xef/0x2c0 [amdgpu] Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 10b82d5176488acee2820e5a2cf0f2ec5c3488b6 Merge: 4c0449c906fe4 b3b33d3c43bbe Author: Linus Torvalds Date: Thu Sep 17 18:05:29 2020 -0700 Merge branch 'for-5.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu fix from Dennis Zhou: "This is a fix for the first chunk size calculation where the variable length array incorrectly used the number of longs instead of bytes of longs. This came in as a code fix and not a bug report, so I don't think it was widely problematic. I believe it worked out due to it being memblock memory and alignment requirements working in our favor" * 'for-5.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: percpu: fix first chunk size calculation for populated bitmap commit 5f6857e808a8bd078296575b417c4b9d160b9779 Author: Jakub Kicinski Date: Thu Sep 17 10:52:57 2020 -0700 nfp: use correct define to return NONE fec struct ethtool_fecparam carries bitmasks not bit numbers. We want to return 1 (NONE), not 0. Fixes: 0d0870938337 ("nfp: implement ethtool FEC mode settings") Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 4c0449c906fe4d9631025bc11993009071094a9a Merge: 4cbffc461ec91 1f08fde700757 Author: Linus Torvalds Date: Thu Sep 17 17:46:04 2020 -0700 Merge tag 'drm-fixes-2020-09-18' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "A bunch of small fixes, some of the i915 ones have been out for a while and got better commit msg explaining some better reasoning behind them (hopefully this trend continues). Otherwise there a few AMD related ones mostly small, one radeon PLL regression fix and a bunch of small mediatek fixes. amdgpu: - Sienna Cichlid fixes - Navy Flounder fixes - DC fixes amdkfd: - Fix a GPU reset crash - Fix a memory leak radeon: - Revert a PLL fix that broke other boards i915: - Avoid exposing a partially constructed context - Use RCU instead of mutex for context termination list iteration - Avoid data race reported by KCSAN - Filter wake_flags passed to default_wake_function mediatek: - Fix scrolling of panel - Remove duplicated include - Use CPU when fail to get cmdq event - Add missing put_device() call" * tag 'drm-fixes-2020-09-18' of git://anongit.freedesktop.org/drm/drm: (21 commits) drm/amd/display: Don't log hdcp module warnings in dmesg drm/amdgpu: declare ta firmware for navy_flounder drm/mediatek: Add missing put_device() call in mtk_hdmi_dt_parse_pdata() drm/mediatek: Add missing put_device() call in mtk_drm_kms_init() drm/mediatek: Add exception handing in mtk_drm_probe() if component init fail drm/mediatek: Add missing put_device() call in mtk_ddp_comp_init() drm/mediatek: Use CPU when fail to get cmdq event drm/mediatek: Remove duplicated include drm/i915: Filter wake_flags passed to default_wake_function drm/i915: Be wary of data races when reading the active execlists drm/i915/gem: Reduce context termination list iteration guard to RCU drm/i915/gem: Delay tracking the GEM context until it is registered drm/amdgpu/dc: Require primary plane to be enabled whenever the CRTC is drm/radeon: revert "Prefer lower feedback dividers" drm/amdgpu: Include sienna_cichlid in USBC PD FW support. drm/amd/display: update nv1x stutter latencies drm/amd/display: Don't use DRM_ERROR() for DTM add topology drm/amd/pm: support runtime pptable update for sienna_cichlid etc. drm/amdkfd: fix a memory leak issue drm/kfd: fix a system crash issue during GPU recovery ... commit ce000c61b0bf96506ad4a537f3218a716b6fadcd Author: Wei Li Date: Thu Sep 17 20:29:50 2020 +0800 hinic: fix potential resource leak In rx_request_irq(), it will just return what irq_set_affinity_hint() returns. If it is failed, the napi and irq requested are not freed properly. So add exits for failures to handle these. Signed-off-by: Wei Li Signed-off-by: David S. Miller commit 0dfdbc7440870007818277dc02d20d4794178a4f Merge: 19a83d36f9837 5116a8ade333b Author: David S. Miller Date: Thu Sep 17 16:55:35 2020 -0700 Merge branch 'net-phy-Unbind-fixes' Florian Fainelli says: ==================== net: phy: Unbind fixes This patch series fixes a couple of issues with the unbinding of the PHY drivers and then bringing down a network interface. The first is a NULL pointer de-reference and the second was an incorrect warning being triggered. ==================== Signed-off-by: David S. Miller commit 5116a8ade333b6c2e180782139c9c516a437b21c Author: Florian Fainelli Date: Wed Sep 16 20:43:10 2020 -0700 net: phy: Do not warn in phy_stop() on PHY_DOWN When phy_is_started() was added to catch incorrect PHY states, phy_stop() would not be qualified against PHY_DOWN. It is possible to reach that state when the PHY driver has been unbound and the network device is then brought down. Fixes: 2b3e88ea6528 ("net: phy: improve phy state checking") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c2b727df7caa33876e7066bde090f40001b6d643 Author: Florian Fainelli Date: Wed Sep 16 20:43:09 2020 -0700 net: phy: Avoid NPD upon phy_detach() when driver is unbound If we have unbound the PHY driver prior to calling phy_detach() (often via phy_disconnect()) then we can cause a NULL pointer de-reference accessing the driver owner member. The steps to reproduce are: echo unimac-mdio-0:01 > /sys/class/net/eth0/phydev/driver/unbind ip link set eth0 down Fixes: cafe8df8b9bc ("net: phy: Fix lack of reference count on PHY driver") Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 19a83d36f9837e8bd27435ebb31564a717a5d15a Author: Michal Kubecek Date: Thu Sep 17 01:04:10 2020 +0200 ethtool: add and use message type for tunnel info reply Tunnel offload info code uses ETHTOOL_MSG_TUNNEL_INFO_GET message type (cmd field in genetlink header) for replies to tunnel info netlink request, i.e. the same value as the request have. This is a problem because we are using two separate enums for userspace to kernel and kernel to userspace message types so that this ETHTOOL_MSG_TUNNEL_INFO_GET (28) collides with ETHTOOL_MSG_CABLE_TEST_TDR_NTF which is what message type 28 means for kernel to userspace messages. As the tunnel info request reached mainline in 5.9 merge window, we should still be able to fix the reply message type without breaking backward compatibility. Fixes: c7d759eb7b12 ("ethtool: add tunnel info interface") Signed-off-by: Michal Kubecek Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9fb030a70431a2a2a1b292dbf0b2f399cc072c16 Author: Xie He Date: Wed Sep 16 14:25:07 2020 -0700 drivers/net/wan/hdlc: Set skb->protocol before transmitting This patch sets skb->protocol before transmitting frames on the HDLC device, so that a user listening on the HDLC device with an AF_PACKET socket will see outgoing frames' sll_protocol field correctly set and consistent with that of incoming frames. 1. Control frames in hdlc_cisco and hdlc_ppp When these drivers send control frames, skb->protocol is not set. This value should be set to htons(ETH_P_HDLC), because when receiving control frames, their skb->protocol is set to htons(ETH_P_HDLC). When receiving, hdlc_type_trans in hdlc.h is called, which then calls cisco_type_trans or ppp_type_trans. The skb->protocol of control frames is set to htons(ETH_P_HDLC) so that the control frames can be received by hdlc_rcv in hdlc.c, which calls cisco_rx or ppp_rx to process the control frames. 2. hdlc_fr When this driver sends control frames, skb->protocol is set to internal values used in this driver. When this driver sends data frames (from upper stacked PVC devices), skb->protocol is the same as that of the user data packet being sent on the upper PVC device (for normal PVC devices), or is htons(ETH_P_802_3) (for Ethernet-emulating PVC devices). However, skb->protocol for both control frames and data frames should be set to htons(ETH_P_HDLC), because when receiving, all frames received on the HDLC device will have their skb->protocol set to htons(ETH_P_HDLC). When receiving, hdlc_type_trans in hdlc.h is called, and because this driver doesn't provide a type_trans function in struct hdlc_proto, all frames will have their skb->protocol set to htons(ETH_P_HDLC). The frames are then received by hdlc_rcv in hdlc.c, which calls fr_rx to process the frames (control frames are consumed and data frames are re-received on upper PVC devices). Cc: Krzysztof Halasa Signed-off-by: Xie He Signed-off-by: David S. Miller commit 83f9a9c8c1edc222846dc1bde6e3479703e8e5a3 Author: Xie He Date: Wed Sep 16 09:49:18 2020 -0700 drivers/net/wan/lapbether: Make skb->protocol consistent with the header This driver is a virtual driver stacked on top of Ethernet interfaces. When this driver transmits data on the Ethernet device, the skb->protocol setting is inconsistent with the Ethernet header prepended to the skb. This causes a user listening on the Ethernet interface with an AF_PACKET socket, to see different sll_protocol values for incoming and outgoing frames, because incoming frames would have this value set by parsing the Ethernet header. This patch changes the skb->protocol value for outgoing Ethernet frames, making it consistent with the Ethernet header prepended. This makes a user listening on the Ethernet device with an AF_PACKET socket, to see the same sll_protocol value for incoming and outgoing frames. Cc: Martin Schiller Signed-off-by: Xie He Signed-off-by: David S. Miller commit f4a26a9b311d7ff9db461278faf2869d06496ef8 Author: Raju Rangoju Date: Wed Sep 16 21:50:39 2020 +0530 cxgb4: fix memory leak during module unload Fix the memory leak in mps during module unload path by freeing mps reference entries if the list adpter->mps_ref is not already empty Fixes: 28b3870578ef ("cxgb4: Re-work the logic for mps refcounting") Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller commit 44144185951a0ff9b50bf21c0cd1f79ff688e5ca Author: Andres Beltran Date: Wed Sep 16 11:47:27 2020 +0200 hv_netvsc: Add validation for untrusted Hyper-V values For additional robustness in the face of Hyper-V errors or malicious behavior, validate all values that originate from packets that Hyper-V has sent to the guest in the host-to-guest ring buffer. Ensure that invalid values cannot cause indexing off the end of an array, or subvert an existing validation via integer overflow. Ensure that outgoing packets do not have any leftover guest memory that has not been zeroed out. Signed-off-by: Andres Beltran Co-developed-by: Andrea Parri (Microsoft) Signed-off-by: Andrea Parri (Microsoft) Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller commit 1f08fde70075784d28d1687d0e75871e81cc1173 Merge: d7261b14ddc79 0680a622318b8 Author: Dave Airlie Date: Fri Sep 18 08:51:58 2020 +1000 Merge tag 'mediatek-drm-fixes-5.9' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-fixes Mediatek DRM Fixes for Linux 5.9 1. Fix scrolling of panel 2. Remove duplicated include 3. Use CPU when fail to get cmdq event 4. Add missing put_device() call Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20200916231724.30571-1-chunkuang.hu@kernel.org commit d7261b14ddc79b665acdc5fcad8eaf988e0025a8 Merge: 4b1ededb69d93 20612303a0b45 Author: Dave Airlie Date: Fri Sep 18 08:37:31 2020 +1000 Merge tag 'drm-intel-fixes-2020-09-17' of ssh://git.freedesktop.org/git/drm/drm-intel into drm-fixes drm/i915 fixes for v5.9-rc6: - Avoid exposing a partially constructed context - Use RCU instead of mutex for context termination list iteration - Avoid data race reported by KCSAN - Filter wake_flags passed to default_wake_function Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87y2l8vlj3.fsf@intel.com commit 4b1ededb69d930a9f904be0a5320f4f3e74f9f13 Merge: 856deb866d16e 875d369d8f752 Author: Dave Airlie Date: Fri Sep 18 08:06:23 2020 +1000 Merge tag 'amd-drm-fixes-5.9-2020-09-17' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.9-2020-09-17: amdgpu: - Sienna Cichlid fixes - Navy Flounder fixes - DC fixes amdkfd: - Fix a GPU reset crash - Fix a memory leak radeon: - Revert a PLL fix that broke other boards Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200917043818.3717-1-alexander.deucher@amd.com commit 933a3752babcf6513117d5773d2b70782d6ad149 Author: Al Viro Date: Thu Sep 17 17:26:56 2020 -0400 fuse: fix the ->direct_IO() treatment of iov_iter the callers rely upon having any iov_iter_truncate() done inside ->direct_IO() countered by iov_iter_reexpand(). Reported-by: Qian Cai Tested-by: Qian Cai Signed-off-by: Al Viro commit 21653a4181ff292480599dad996a2b759ccf050f Author: Hans de Goede Date: Wed Sep 9 12:32:33 2020 +0200 i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices() Some ACPI i2c-devices _STA method (which is used to detect if the device is present) use autodetection code which probes which device is present over i2c. This requires the I2C ACPI OpRegion handler to be registered before we enumerate i2c-clients under the i2c-adapter. This fixes the i2c touchpad on the Lenovo ThinkBook 14-IIL and ThinkBook 15 IIL not getting an i2c-client instantiated and thus not working. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1842039 Signed-off-by: Hans de Goede Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang commit 4cbffc461ec91287c4cb1d0e27b01b988d0b8fba Merge: 5ef64cc8987a9 b959b97860d0f Author: Linus Torvalds Date: Thu Sep 17 11:30:36 2020 -0700 Merge tag 'mips_fixes_5.9_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: "Two small fixes for SNI machines" * tag 'mips_fixes_5.9_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: SNI: Fix spurious interrupts MIPS: SNI: Fix MIPS_L1_CACHE_SHIFT commit 94cc89eb8fa5039fcb6e3e3d50f929ddcccee095 Author: Charles Keepax Date: Thu Sep 17 13:08:28 2020 +0100 regmap: debugfs: Fix handling of name string for debugfs init delays In regmap_debugfs_init the initialisation of the debugfs is delayed if the root node isn't ready yet. Most callers of regmap_debugfs_init pass the name from the regmap_config, which is considered temporary ie. may be unallocated after the regmap_init call returns. This leads to a potential use after free, where config->name has been freed by the time it is used in regmap_debugfs_initcall. This situation can be seen on Zynq, where the architecture init_irq callback registers a syscon device, using a local variable for the regmap_config. As init_irq is very early in the platform bring up the regmap debugfs root isn't ready yet. Although this doesn't crash it does result in the debugfs entry not having the correct name. Regmap already sets map->name from config->name on the regmap_init path and the fact that a separate field is used to pass the name to regmap_debugfs_init appears to be an artifact of the debugfs name being added before the map name. As such this patch updates regmap_debugfs_init to use map->name, which is already duplicated from the config avoiding the issue. This does however leave two lose ends, both regmap_attach_dev and regmap_reinit_cache can be called after a regmap is registered and would have had the effect of applying a new name to the debugfs entries. In both of these cases it was chosen to update the map name. In the case of regmap_attach_dev there are 3 users that currently use this function to update the name, thus doing so avoids changes for those users and it seems reasonable that attaching a device would want to set the name of the map. In the case of regmap_reinit_cache the primary use-case appears to be devices that need some register access to identify the device (for example devices in the same family) and then update the cache to match the exact hardware. Whilst no users do currently update the name here, given the use-case it seemed reasonable the name might want to be updated once the device is better identified. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200917120828.12987-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 4a2dd2c798522859811dd520a059f982278be9d9 Merge: 709192d531e5b 3a6b076168e20 Author: Jens Axboe Date: Thu Sep 17 11:49:44 2020 -0600 Merge tag 'nvme-5.9-2020-09-17' of git://git.infradead.org/nvme into block-5.9 Pull NVMe fixes from Christoph: "nvme fixes for 5.9 - another quirk for the controller from hell (David Milburn) - fix a Kconfig dependency (Necip Fazil Yildiran) - char devices / passthrough refcount fixes (Chaitanya Kulkarni)" * tag 'nvme-5.9-2020-09-17' of git://git.infradead.org/nvme: nvmet: get transport reference for passthru ctrl nvme-core: get/put ctrl and transport module in nvme_dev_open/release() nvme-tcp: fix kconfig dependency warning when !CRYPTO nvme-pci: disable the write zeros command for Intel 600P/P3100 commit b3b33d3c43bbe0177d70653f4e889c78cc37f097 Author: Sunghyun Jin Date: Thu Sep 3 21:41:16 2020 +0900 percpu: fix first chunk size calculation for populated bitmap Variable populated, which is a member of struct pcpu_chunk, is used as a unit of size of unsigned long. However, size of populated is miscounted. So, I fix this minor part. Fixes: 8ab16c43ea79 ("percpu: change the number of pages marked in the first_chunk pop bitmap") Cc: # 4.14+ Signed-off-by: Sunghyun Jin Signed-off-by: Dennis Zhou commit 5ef64cc8987a9211d3f3667331ba3411a94ddc79 Author: Linus Torvalds Date: Sun Sep 13 14:05:35 2020 -0700 mm: allow a controlled amount of unfairness in the page lock Commit 2a9127fcf229 ("mm: rewrite wait_on_page_bit_common() logic") made the page locking entirely fair, in that if a waiter came in while the lock was held, the lock would be transferred to the lockers strictly in order. That was intended to finally get rid of the long-reported watchdog failures that involved the page lock under extreme load, where a process could end up waiting essentially forever, as other page lockers stole the lock from under it. It also improved some benchmarks, but it ended up causing huge performance regressions on others, simply because fair lock behavior doesn't end up giving out the lock as aggressively, causing better worst-case latency, but potentially much worse average latencies and throughput. Instead of reverting that change entirely, this introduces a controlled amount of unfairness, with a sysctl knob to tune it if somebody needs to. But the default value should hopefully be good for any normal load, allowing a few rounds of lock stealing, but enforcing the strict ordering before the lock has been stolen too many times. There is also a hint from Matthieu Baerts that the fair page coloring may end up exposing an ABBA deadlock that is hidden by the usual optimistic lock stealing, and while the unfairness doesn't fix the fundamental issue (and I'm still looking at that), it avoids it in practice. The amount of unfairness can be modified by writing a new value to the 'sysctl_page_lock_unfairness' variable (default value of 5, exposed through /proc/sys/vm/page_lock_unfairness), but that is hopefully something we'd use mainly for debugging rather than being necessary for any deep system tuning. This whole issue has exposed just how critical the page lock can be, and how contended it gets under certain locks. And the main contention doesn't really seem to be anything related to IO (which was the origin of this lock), but for things like just verifying that the page file mapping is stable while faulting in the page into a page table. Link: https://lore.kernel.org/linux-fsdevel/ed8442fd-6f54-dd84-cd4a-941e8b7ee603@MichaelLarabel.com/ Link: https://www.phoronix.com/scan.php?page=article&item=linux-50-59&num=1 Link: https://lore.kernel.org/linux-fsdevel/c560a38d-8313-51fb-b1ec-e904bd8836bc@tessares.net/ Reported-and-tested-by: Michael Larabel Tested-by: Matthieu Baerts Cc: Dave Chinner Cc: Matthew Wilcox Cc: Chris Mason Cc: Jan Kara Cc: Amir Goldstein Signed-off-by: Linus Torvalds commit 75df529bec9110dad43ab30e2d9490242529e8b8 Author: Andrew Jones Date: Wed Sep 16 17:45:30 2020 +0200 arm64: paravirt: Initialize steal time when cpu is online Steal time initialization requires mapping a memory region which invokes a memory allocation. Doing this at CPU starting time results in the following trace when CONFIG_DEBUG_ATOMIC_SLEEP is enabled: BUG: sleeping function called from invalid context at mm/slab.h:498 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/1 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.9.0-rc5+ #1 Call trace: dump_backtrace+0x0/0x208 show_stack+0x1c/0x28 dump_stack+0xc4/0x11c ___might_sleep+0xf8/0x130 __might_sleep+0x58/0x90 slab_pre_alloc_hook.constprop.101+0xd0/0x118 kmem_cache_alloc_node_trace+0x84/0x270 __get_vm_area_node+0x88/0x210 get_vm_area_caller+0x38/0x40 __ioremap_caller+0x70/0xf8 ioremap_cache+0x78/0xb0 memremap+0x9c/0x1a8 init_stolen_time_cpu+0x54/0xf0 cpuhp_invoke_callback+0xa8/0x720 notify_cpu_starting+0xc8/0xd8 secondary_start_kernel+0x114/0x180 CPU1: Booted secondary processor 0x0000000001 [0x431f0a11] However we don't need to initialize steal time at CPU starting time. We can simply wait until CPU online time, just sacrificing a bit of accuracy by returning zero for steal time until we know better. While at it, add __init to the functions that are only called by pv_time_init() which is __init. Signed-off-by: Andrew Jones Fixes: e0685fa228fd ("arm64: Retrieve stolen time as paravirtualized guest") Cc: stable@vger.kernel.org Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20200916154530.40809-1-drjones@redhat.com Signed-off-by: Catalin Marinas commit 9cdabcb3ef8c24ca3a456e4db7b012befb688e73 Author: Oliver Neukum Date: Thu Sep 17 12:34:27 2020 +0200 usblp: fix race between disconnect() and read() read() needs to check whether the device has been disconnected before it tries to talk to the device. Signed-off-by: Oliver Neukum Reported-by: syzbot+be5b5f86a162a6c281e6@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20200917103427.15740-1-oneukum@suse.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 32f6865c7aa3c422f710903baa6eb81abc6f559b Author: Ilias Apalodimas Date: Thu Sep 17 11:49:25 2020 +0300 arm64: bpf: Fix branch offset in JIT Running the eBPF test_verifier leads to random errors looking like this: [ 6525.735488] Unexpected kernel BRK exception at EL1 [ 6525.735502] Internal error: ptrace BRK handler: f2000100 [#1] SMP [ 6525.741609] Modules linked in: nls_utf8 cifs libdes libarc4 dns_resolver fscache binfmt_misc nls_ascii nls_cp437 vfat fat aes_ce_blk crypto_simd cryptd aes_ce_cipher ghash_ce gf128mul efi_pstore sha2_ce sha256_arm64 sha1_ce evdev efivars efivarfs ip_tables x_tables autofs4 btrfs blake2b_generic xor xor_neon zstd_compress raid6_pq libcrc32c crc32c_generic ahci xhci_pci libahci xhci_hcd igb libata i2c_algo_bit nvme realtek usbcore nvme_core scsi_mod t10_pi netsec mdio_devres of_mdio gpio_keys fixed_phy libphy gpio_mb86s7x [ 6525.787760] CPU: 3 PID: 7881 Comm: test_verifier Tainted: G W 5.9.0-rc1+ #47 [ 6525.796111] Hardware name: Socionext SynQuacer E-series DeveloperBox, BIOS build #1 Jun 6 2020 [ 6525.804812] pstate: 20000005 (nzCv daif -PAN -UAO BTYPE=--) [ 6525.810390] pc : bpf_prog_c3d01833289b6311_F+0xc8/0x9f4 [ 6525.815613] lr : bpf_prog_d53bb52e3f4483f9_F+0x38/0xc8c [ 6525.820832] sp : ffff8000130cbb80 [ 6525.824141] x29: ffff8000130cbbb0 x28: 0000000000000000 [ 6525.829451] x27: 000005ef6fcbf39b x26: 0000000000000000 [ 6525.834759] x25: ffff8000130cbb80 x24: ffff800011dc7038 [ 6525.840067] x23: ffff8000130cbd00 x22: ffff0008f624d080 [ 6525.845375] x21: 0000000000000001 x20: ffff800011dc7000 [ 6525.850682] x19: 0000000000000000 x18: 0000000000000000 [ 6525.855990] x17: 0000000000000000 x16: 0000000000000000 [ 6525.861298] x15: 0000000000000000 x14: 0000000000000000 [ 6525.866606] x13: 0000000000000000 x12: 0000000000000000 [ 6525.871913] x11: 0000000000000001 x10: ffff8000000a660c [ 6525.877220] x9 : ffff800010951810 x8 : ffff8000130cbc38 [ 6525.882528] x7 : 0000000000000000 x6 : 0000009864cfa881 [ 6525.887836] x5 : 00ffffffffffffff x4 : 002880ba1a0b3e9f [ 6525.893144] x3 : 0000000000000018 x2 : ffff8000000a4374 [ 6525.898452] x1 : 000000000000000a x0 : 0000000000000009 [ 6525.903760] Call trace: [ 6525.906202] bpf_prog_c3d01833289b6311_F+0xc8/0x9f4 [ 6525.911076] bpf_prog_d53bb52e3f4483f9_F+0x38/0xc8c [ 6525.915957] bpf_dispatcher_xdp_func+0x14/0x20 [ 6525.920398] bpf_test_run+0x70/0x1b0 [ 6525.923969] bpf_prog_test_run_xdp+0xec/0x190 [ 6525.928326] __do_sys_bpf+0xc88/0x1b28 [ 6525.932072] __arm64_sys_bpf+0x24/0x30 [ 6525.935820] el0_svc_common.constprop.0+0x70/0x168 [ 6525.940607] do_el0_svc+0x28/0x88 [ 6525.943920] el0_sync_handler+0x88/0x190 [ 6525.947838] el0_sync+0x140/0x180 [ 6525.951154] Code: d4202000 d4202000 d4202000 d4202000 (d4202000) [ 6525.957249] ---[ end trace cecc3f93b14927e2 ]--- The reason is the offset[] creation and later usage, while building the eBPF body. The code currently omits the first instruction, since build_insn() will increase our ctx->idx before saving it. That was fine up until bounded eBPF loops were introduced. After that introduction, offset[0] must be the offset of the end of prologue which is the start of the 1st insn while, offset[n] holds the offset of the end of n-th insn. When "taken loop with back jump to 1st insn" test runs, it will eventually call bpf2a64_offset(-1, 2, ctx). Since negative indexing is permitted, the current outcome depends on the value stored in ctx->offset[-1], which has nothing to do with our array. If the value happens to be 0 the tests will work. If not this error triggers. commit 7c2e988f400e ("bpf: fix x64 JIT code generation for jmp to 1st insn") fixed an indentical bug on x86 when eBPF bounded loops were introduced. So let's fix it by creating the ctx->offset[] differently. Track the beginning of instruction and account for the extra instruction while calculating the arm instruction offsets. Fixes: 2589726d12a1 ("bpf: introduce bounded loops") Reported-by: Naresh Kamboju Reported-by: Jiri Olsa Co-developed-by: Jean-Philippe Brucker Co-developed-by: Yauheni Kaliuta Signed-off-by: Jean-Philippe Brucker Signed-off-by: Yauheni Kaliuta Signed-off-by: Ilias Apalodimas Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200917084925.177348-1-ilias.apalodimas@linaro.org Signed-off-by: Catalin Marinas commit 5ad284ab3a01e2d6a89be2a8663ae76f4e617549 Author: Andy Shevchenko Date: Tue Sep 15 15:58:16 2020 +0300 gpiolib: Fix line event handling in syscall compatible mode The introduced line event handling ABI in the commit 61f922db7221 ("gpio: userspace ABI for reading GPIO line events") missed the fact that 64-bit kernel may serve for 32-bit applications. In such case the very first check in the lineevent_read() will fail due to alignment differences. To workaround this introduce lineevent_get_size() helper which returns actual size of the structure in user space. Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events") Suggested-by: Arnd Bergmann Signed-off-by: Andy Shevchenko Acked-by: Arnd Bergmann Tested-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 3a6b076168e20a50289d71f601f1dd02be0f8e88 Author: Christoph Hellwig Date: Wed Sep 16 18:11:01 2020 -0700 nvmet: get transport reference for passthru ctrl Grab a reference to the transport driver to ensure it can't be unloaded while a passthrough controller is active. Fixes: c1fef73f793b ("nvmet: add passthru code to process commands") Reported-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig Reviewed-by: Logan Gunthorpe commit 52a3974feb1a3eec25d8836d37a508b67b0a9cd0 Author: Chaitanya Kulkarni Date: Tue Sep 15 20:53:25 2020 -0700 nvme-core: get/put ctrl and transport module in nvme_dev_open/release() Get and put the reference to the ctrl in the nvme_dev_open() and nvme_dev_release() before and after module get/put for ctrl in char device file operations. Introduce char_dev relase function, get/put the controller and module which allows us to fix the potential Oops which can be easily reproduced with a passthru ctrl (although the problem also exists with pure user access): Entering kdb (current=0xffff8887f8290000, pid 3128) on processor 30 Oops: (null) due to oops @ 0xffffffffa01019ad CPU: 30 PID: 3128 Comm: bash Tainted: G W OE 5.8.0-rc4nvme-5.9+ #35 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.4 RIP: 0010:nvme_free_ctrl+0x234/0x285 [nvme_core] Code: 57 10 a0 e8 73 bf 02 e1 ba 3d 11 00 00 48 c7 c6 98 33 10 a0 48 c7 c7 1d 57 10 a0 e8 5b bf 02 e1 8 RSP: 0018:ffffc90001d63de0 EFLAGS: 00010246 RAX: ffffffffa05c0440 RBX: ffff8888119e45a0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff8888177e9550 RDI: ffff8888119e43b0 RBP: ffff8887d4768000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: ffffc90001d63c90 R12: ffff8888119e43b0 R13: ffff8888119e5108 R14: dead000000000100 R15: ffff8888119e5108 FS: 00007f1ef27b0740(0000) GS:ffff888817600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffa05c0470 CR3: 00000007f6bee000 CR4: 00000000003406e0 Call Trace: device_release+0x27/0x80 kobject_put+0x98/0x170 nvmet_passthru_ctrl_disable+0x4a/0x70 [nvmet] nvmet_passthru_enable_store+0x4c/0x90 [nvmet] configfs_write_file+0xe6/0x150 vfs_write+0xba/0x1e0 ksys_write+0x5f/0xe0 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f1ef1eb2840 Code: Bad RIP value. RSP: 002b:00007fffdbff0eb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007f1ef1eb2840 RDX: 0000000000000002 RSI: 00007f1ef27d2000 RDI: 0000000000000001 RBP: 00007f1ef27d2000 R08: 000000000000000a R09: 00007f1ef27b0740 R10: 0000000000000001 R11: 0000000000000246 R12: 00007f1ef2186400 R13: 0000000000000002 R14: 0000000000000001 R15: 0000000000000000 With this patch fix we take the module ref count in nvme_dev_open() and release that ref count in newly introduced nvme_dev_release(). Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 29231826f3bd65500118c473fccf31c0cf14dbc0 Author: Quentin Perret Date: Wed Sep 16 18:18:25 2020 +0100 ehci-hcd: Move include to keep CRC stable The CRC calculation done by genksyms is triggered when the parser hits EXPORT_SYMBOL*() macros. At this point, genksyms recursively expands the types of the function parameters, and uses that as the input for the CRC calculation. In the case of forward-declared structs, the type expands to 'UNKNOWN'. Following this, it appears that the result of the expansion of each type is cached somewhere, and seems to be re-used when/if the same type is seen again for another exported symbol in the same C file. Unfortunately, this can cause CRC 'stability' issues when a struct definition becomes visible in the middle of a C file. For example, let's assume code with the following pattern: struct foo; int bar(struct foo *arg) { /* Do work ... */ } EXPORT_SYMBOL_GPL(bar); /* This contains struct foo's definition */ #include "foo.h" int baz(struct foo *arg) { /* Do more work ... */ } EXPORT_SYMBOL_GPL(baz); Here, baz's CRC will be computed using the expansion of struct foo that was cached after bar's CRC calculation ('UNKOWN' here). But if EXPORT_SYMBOL_GPL(bar) is removed from the file (because of e.g. symbol trimming using CONFIG_TRIM_UNUSED_KSYMS), struct foo will be expanded late, during baz's CRC calculation, which now has visibility over the full struct definition, hence resulting in a different CRC for baz. The proper fix for this certainly is in genksyms, but that will take me some time to get right. In the meantime, we have seen one occurrence of this in the ehci-hcd code which hits this problem because of the way it includes C files halfway through the code together with an unlucky mix of symbol trimming. In order to workaround this, move the include done in ehci-hub.c early in ehci-hcd.c, hence making sure the struct definitions are visible to the entire file. This improves CRC stability of the ehci-hcd exports even when symbol trimming is enabled. Acked-by: Alan Stern Cc: stable Signed-off-by: Quentin Perret Link: https://lore.kernel.org/r/20200916171825.3228122-1-qperret@google.com Signed-off-by: Greg Kroah-Hartman commit 875d369d8f75275d30e59421602d9366426abff7 Author: Bhawanpreet Lakha Date: Tue Sep 15 17:26:29 2020 -0400 drm/amd/display: Don't log hdcp module warnings in dmesg [Why] DTM topology updates happens by default now. This results in DTM warnings when hdcp is not even being enabled. This spams the dmesg and doesn't effect normal display functionality so it is better to log it using DRM_DEBUG_KMS() [How] Change the DRM_WARN() to DRM_DEBUG_KMS() Signed-off-by: Bhawanpreet Lakha Acked-by: Alex Deucher Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e60c27f1ffc733e729319662f75419f4d4fb6a80 Author: Jiansong Chen Date: Wed Sep 16 19:17:20 2020 +0800 drm/amdgpu: declare ta firmware for navy_flounder The firmware provided via MODULE_FIRMWARE appears in the module information. External tools(eg. dracut) may use the list of fw files to include them as appropriate in an initramfs, thus missing declaration will lead to request firmware failure in boot time. Signed-off-by: Jiansong Chen Reviewed-by: Tianci Yin Signed-off-by: Alex Deucher commit fd944dc24336922656a48f4608bfb41abdcdc4aa Author: Matthias Schiffer Date: Wed Sep 16 12:08:39 2020 +0200 net: dsa: microchip: ksz8795: really set the correct number of ports The KSZ9477 and KSZ8795 use the port_cnt field differently: For the KSZ9477, it includes the CPU port(s), while for the KSZ8795, it doesn't. It would be a good cleanup to make the handling of both drivers match, but as a first step, fix the recently broken assignment of num_ports in the KSZ8795 driver (which completely broke probing, as the CPU port index was always failing the num_ports check). Fixes: af199a1a9cb0 ("net: dsa: microchip: set the correct number of ports") Signed-off-by: Matthias Schiffer Reviewed-by: Codrin Ciubotariu Signed-off-by: David S. Miller commit 34beb21594519ce64a55a498c2fe7d567bc1ca20 Author: Mark Gray Date: Wed Sep 16 05:19:35 2020 -0400 geneve: add transport ports in route lookup for geneve This patch adds transport ports information for route lookup so that IPsec can select Geneve tunnel traffic to do encryption. This is needed for OVS/OVN IPsec with encrypted Geneve tunnels. This can be tested by configuring a host-host VPN using an IKE daemon and specifying port numbers. For example, for an Openswan-type configuration, the following parameters should be configured on both hosts and IPsec set up as-per normal: $ cat /etc/ipsec.conf conn in ... left=$IP1 right=$IP2 ... leftprotoport=udp/6081 rightprotoport=udp ... conn out ... left=$IP1 right=$IP2 ... leftprotoport=udp rightprotoport=udp/6081 ... The tunnel can then be setup using "ip" on both hosts (but changing the relevant IP addresses): $ ip link add tun type geneve id 1000 remote $IP2 $ ip addr add 192.168.0.1/24 dev tun $ ip link set tun up This can then be tested by pinging from $IP1: $ ping 192.168.0.2 Without this patch the traffic is unencrypted on the wire. Fixes: 2d07dc79fe04 ("geneve: add initial netdev driver for GENEVE tunnels") Signed-off-by: Qiuyu Xiao Signed-off-by: Mark Gray Reviewed-by: Greg Rose Signed-off-by: David S. Miller commit 5f1ab0f493f81517a7b47d859cd5d32e6af1eb9f Author: Lu Wei Date: Wed Sep 16 10:04:28 2020 +0800 net: hns: kerneldoc fixes Fix some parameter description or spelling mistakes. Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit 78edc005f477a4987ee0a5d96bfe117295c231fd Author: Paul E. McKenney Date: Tue Aug 25 08:09:40 2020 -0700 rcu-tasks: Prevent complaints of unused show_rcu_tasks_classic_gp_kthread() Commit 8344496e8b49 ("rcu-tasks: Conditionally compile show_rcu_tasks_gp_kthreads()") introduced conditional compilation of several functions, but forgot one occurrence of show_rcu_tasks_classic_gp_kthread() that causes the compiler to warn of an unused static function. This commit uses "static inline" to avoid these complaints and possibly also to avoid emitting an actual definition of this function. Fixes: 8344496e8b49 ("rcu-tasks: Conditionally compile show_rcu_tasks_gp_kthreads()") Cc: # 5.8.x Reported-by: Laurent Pinchart Signed-off-by: Paul E. McKenney commit ffbc3dd1975f1e2dac7b1752aa8b5cac3cd5b459 Author: Alexey Dobriyan Date: Wed Sep 16 23:18:43 2020 +0300 fs: fix cast in fsparam_u32hex() macro Signed-off-by: Alexey Dobriyan Signed-off-by: Al Viro commit 0680a622318b8d657323b94082f4b9a44038dfee Author: Yu Kuai Date: Fri Sep 11 19:21:51 2020 +0800 drm/mediatek: Add missing put_device() call in mtk_hdmi_dt_parse_pdata() if of_find_device_by_node() succeed, mtk_drm_kms_init() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 8f83f26891e1 ("drm/mediatek: Add HDMI support") Signed-off-by: Yu Kuai Signed-off-by: Chun-Kuang Hu commit 2132940f2192824acf160d115192755f7c58a847 Author: Yu Kuai Date: Fri Sep 11 19:21:19 2020 +0800 drm/mediatek: Add missing put_device() call in mtk_drm_kms_init() if of_find_device_by_node() succeed, mtk_drm_kms_init() doesn't have a corresponding put_device(). Thus add jump target to fix the exception handling for this function implementation. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Yu Kuai Signed-off-by: Chun-Kuang Hu commit 64c194c00789889b0f9454f583712f079ba414ee Author: Yu Kuai Date: Wed Sep 9 16:49:42 2020 +0800 drm/mediatek: Add exception handing in mtk_drm_probe() if component init fail mtk_ddp_comp_init() is called in a loop in mtk_drm_probe(), if it fail, previous successive init component is not proccessed. Thus uninitialize valid component and put their device if component init failed. Fixes: 119f5173628a ("drm/mediatek: Add DRM Driver for Mediatek SoC MT8173.") Signed-off-by: Yu Kuai Signed-off-by: Chun-Kuang Hu commit d494c257271153633a05c11e6dec85ddfc7700ee Author: Yu Kuai Date: Sat Sep 5 16:30:58 2020 +0800 drm/mediatek: Add missing put_device() call in mtk_ddp_comp_init() if of_find_device_by_node() succeed, mtk_ddp_comp_init() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: d0afe37f5209 ("drm/mediatek: support CMDQ interface in ddp component") Signed-off-by: Yu Kuai Signed-off-by: Chun-Kuang Hu commit f85acdad07fe36b91f2244263a890bf372528326 Author: Chun-Kuang Hu Date: Tue Sep 1 07:39:52 2020 +0800 drm/mediatek: Use CPU when fail to get cmdq event Even though cmdq client is created successfully, without the cmdq event, cmdq could not work correctly, so use CPU when fail to get cmdq event. Fixes: 60fa8c13ab1a ("drm/mediatek: Move gce event property to mutex device node") Signed-off-by: Chun-Kuang Hu commit 855f3e08d5565811ab109d9c0f64ee11c24feabf Author: Wang Hai Date: Wed Aug 19 10:58:29 2020 +0800 drm/mediatek: Remove duplicated include Remove mtk_drm_ddp.h which is included more than once Fixes: 9aef5867c86c ("drm/mediatek: drop use of drmP.h") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Chun-Kuang Hu commit 642e450b6b5955f2059d0ae372183f7c6323f951 Author: Magnus Karlsson Date: Wed Sep 16 14:00:25 2020 +0200 xsk: Do not discard packet when NETDEV_TX_BUSY In the skb Tx path, transmission of a packet is performed with dev_direct_xmit(). When NETDEV_TX_BUSY is set in the drivers, it signifies that it was not possible to send the packet right now, please try later. Unfortunately, the xsk transmit code discarded the packet and returned EBUSY to the application. Fix this unnecessary packet loss, by not discarding the packet in the Tx ring and return EAGAIN. As EAGAIN is returned to the application, it can then retry the send operation later and the packet will then likely be sent as the driver will then likely have space/resources to send the packet. In summary, EAGAIN tells the application that the packet was not discarded from the Tx ring and that it needs to call send() again. EBUSY, on the other hand, signifies that the packet was not sent and discarded from the Tx ring. The application needs to put the packet on the Tx ring again if it wants it to be sent. Fixes: 35fcde7f8deb ("xsk: support for Tx") Reported-by: Arkadiusz Zema Suggested-by: Arkadiusz Zema Suggested-by: Daniel Borkmann Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Reviewed-by: Jesse Brandeburg Link: https://lore.kernel.org/bpf/1600257625-2353-1-git-send-email-magnus.karlsson@gmail.com commit b959b97860d0fee8c8f6a3e641d3c2ad76eab6be Author: Thomas Bogendoerfer Date: Wed Sep 16 15:54:37 2020 +0200 MIPS: SNI: Fix spurious interrupts On A20R machines the interrupt pending bits in cause register need to be updated by requesting the chipset to do it. This needs to be done to find the interrupt cause and after interrupt service. In commit 0b888c7f3a03 ("MIPS: SNI: Convert to new irq_chip functions") the function to do after service update got lost, which caused spurious interrupts. Fixes: 0b888c7f3a03 ("MIPS: SNI: Convert to new irq_chip functions") Signed-off-by: Thomas Bogendoerfer commit 5925fa68fe8244651b3f78a88c4af99190a88f0d Merge: 05da40eb47cdb ce9c13f31b105 Author: Linus Torvalds Date: Wed Sep 16 12:00:16 2020 -0700 Merge tag 'perf-tools-fixes-for-v5.9-2020-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Set PERF_SAMPLE_PERIOD if attr->freq is set. - Remove trailing commas from AMD JSON vendor event files. - Don't clear event's period if set by a event definition term. - Leader sampling shouldn't clear sample period in 'perf test'. - Fix the "signal" test inline assembly when built with DEBUG=1. - Fix memory leaks detected by ASAN, some in normal paths, some in error paths. - Fix 2 memory sanitizer warnings in 'perf bench'. - Fix the ratio comments of miss-events in 'perf stat'. - Prevent override of attr->sample_period for libpfm4 events. - Sync kvm.h and in.h headers with the kernel sources. * tag 'perf-tools-fixes-for-v5.9-2020-09-16' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf stat: Fix the ratio comments of miss-events perf test: Free formats for perf pmu parse test perf metric: Do not free metric when failed to resolve perf metric: Free metric when it failed to resolve perf metric: Release expr_parse_ctx after testing perf test: Fix memory leaks in parse-metric test perf parse-event: Fix memory leak in evsel->unit perf evlist: Fix cpu/thread map leak perf metric: Fix some memory leaks - part 2 perf metric: Fix some memory leaks perf test: Free aliases for PMU event map aliases test perf vendor events amd: Remove trailing commas perf test: Leader sampling shouldn't clear sample period perf record: Don't clear event's period if set by a term tools headers UAPI: update linux/in.h copy tools headers UAPI: Sync kvm.h headers with the kernel sources perf record: Prevent override of attr->sample_period for libpfm4 events perf record: Set PERF_RECORD_PERIOD if attr->freq is set. perf bench: Fix 2 memory sanitizer warnings perf test: Fix the "signal" test inline assembly commit 05da40eb47cdbc9c18bc2d7256a760931914041e Merge: 6279e774b0e4a d2249bf25c565 Author: Linus Torvalds Date: Wed Sep 16 11:52:56 2020 -0700 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk driver fixes from Stephen Boyd: "A handful of clk driver fixes. Mostly they're for error paths or improper memory allocations sizes. Nothing as exciting as a wildfire" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe() clk: versatile: Add of_node_put() before return statement clk: bcm: dvp: Select the reset framework clk: rockchip: Fix initialization of mux_pll_src_4plls_p clk: davinci: Use the correct size when allocating memory commit 6279e774b0e4abfab20ff6cfaff99e752a32f27a Author: Leon Romanovsky Date: Tue Sep 15 11:27:41 2020 +0300 MAINTAINERS: Fix Max's and Shravan's emails Max's and Shravan's usernames were changed while @mellanox.com emails were transferred to be @nvidia.com. Fixes: f6da70d99c96 ("MAINTAINERS: Update Mellanox and Cumulus Network addresses to new domain") Signed-off-by: Leon Romanovsky Signed-off-by: Linus Torvalds commit 1fecfdbb7acc6624655450a609221c89b5197a06 Author: Peter Zijlstra Date: Tue Sep 15 12:32:01 2020 +0200 ACPI: processor: Take over RCU-idle for C3-BM idle The C3 BusMaster idle code takes lock in a number of places, some deep inside the ACPI code. Instead of wrapping it all in RCU_NONIDLE, have the driver take over RCU-idle duty and avoid flipping RCU state back and forth a lot. ( by marking 'C3 && bm_check' as RCU_IDLE, we _must_ call enter_bm() for that combination, otherwise we'll loose RCU-idle, this requires shuffling some code around ) Signed-off-by: Peter Zijlstra (Intel) Tested-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki commit 8747f2022fe8d8029193707ee86ff5c792cbef9b Author: Peter Zijlstra Date: Tue Sep 15 12:32:00 2020 +0200 cpuidle: Allow cpuidle drivers to take over RCU-idle Some drivers have to do significant work, some of which relies on RCU still being active. Instead of using RCU_NONIDLE in the drivers and flipping RCU back on, allow drivers to take over RCU-idle duty. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ulf Hansson Tested-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki commit a889a23a98fee183c9b6b0b14b2fd70583429c5e Author: Peter Zijlstra Date: Tue Sep 15 12:31:59 2020 +0200 ACPI: processor: Use CPUIDLE_FLAG_TLB_FLUSHED Make acpi_processor_idle() use the generic TLB flushing code. This again removes RCU usage after rcu_idle_enter(). (XXX make every C3 invalidate TLBs, not just C3-BM) Signed-off-by: Peter Zijlstra (Intel) Tested-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki commit aa6b43d57f995f6eec0e9e744dcb200e09ecb8e0 Author: Peter Zijlstra Date: Tue Sep 15 12:31:58 2020 +0200 ACPI: processor: Use CPUIDLE_FLAG_TIMER_STOP Make acpi_processor_idle use the common broadcast code, there's no reason not to. This also removes some RCU usage after rcu_idle_enter(). Signed-off-by: Peter Zijlstra (Intel) Reported-by: Borislav Petkov Tested-by: Borislav Petkov Signed-off-by: Rafael J. Wysocki commit 16abd2a0c124a6c3543c88ca4c53c997c9fb4114 Author: Olga Kornievskaia Date: Wed Sep 16 09:07:54 2020 -0400 NFSv4.2: fix client's attribute cache management for copy_file_range After client is done with the COPY operation, it needs to invalidate its pagecache (as it did no reading or writing of the data locally) and it needs to invalidate it's attributes just like it would have for a read on the source file and write on the destination file. Once the linux server started giving out read delegations to read+write opens, the destination file of the copy_file range started having delegations and not doing syncup on close of the file leading to xfstest failures for generic/430,431,432,433,565. v2: changing cache_validity needs to be protected by the i_lock. Reported-by: Murphy Zhou Fixes: 2e72448b07dc ("NFS: Add COPY nfs operation") Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit d33030e2ee3508d65db5644551435310df86010e Author: Jeffrey Mitchell Date: Tue Sep 15 16:42:52 2020 -0500 nfs: Fix security label length not being reset nfs_readdir_page_filler() iterates over entries in a directory, reusing the same security label buffer, but does not reset the buffer's length. This causes decode_attr_security_label() to return -ERANGE if an entry's security label is longer than the previous one's. This error, in nfs4_decode_dirent(), only gets passed up as -EAGAIN, which causes another failed attempt to copy into the buffer. The second error is ignored and the remaining entries do not show up in ls, specifically the getdents64() syscall. Reproduce by creating multiple files in NFS and giving one of the later files a longer security label. ls will not see that file nor any that are added afterwards, though they will exist on the backend. In nfs_readdir_page_filler(), reset security label buffer length before every reuse Signed-off-by: Jeffrey Mitchell Fixes: b4487b935452 ("nfs: Fix getxattr kernel panic and memory overflow") Signed-off-by: Trond Myklebust commit e6b1a44eccfcab5e5e280be376f65478c3b2c7a2 Author: Hou Tao Date: Tue Sep 15 22:07:50 2020 +0800 locking/percpu-rwsem: Use this_cpu_{inc,dec}() for read_count The __this_cpu*() accessors are (in general) IRQ-unsafe which, given that percpu-rwsem is a blocking primitive, should be just fine. However, file_end_write() is used from IRQ context and will cause load-store issues on architectures where the per-cpu accessors are not natively irq-safe. Fix it by using the IRQ-safe this_cpu_*() for operations on read_count. This will generate more expensive code on a number of platforms, which might cause a performance regression for some of the other percpu-rwsem users. If any such is reported, we can consider alternative solutions. Fixes: 70fe2f48152e ("aio: fix freeze protection of aio writes") Signed-off-by: Hou Tao Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Acked-by: Oleg Nesterov Link: https://lkml.kernel.org/r/20200915140750.137881-1-houtao1@huawei.com commit ce9c13f31b10560d4e4d801f9f94895f595756aa Author: Qi Liu Date: Wed Sep 16 18:48:51 2020 +0800 perf stat: Fix the ratio comments of miss-events 'perf stat' displays miss ratio of L1-dcache, L1-icache, dTLB cache, iTLB cache and LL-cache. Take L1-dcache for example, miss ratio is caculated as "L1-dcache-load-misses/L1-dcache-loads". So "of all L1-dcache hits" is unsuitable to describe it, and "of all L1-dcache accesses" seems better. The comments of L1-icache, dTLB cache, iTLB cache and LL-cache are fixed in the same way. Signed-off-by: Qi Liu Reviewed-by: Andi Kleen Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1600253331-10535-1-git-send-email-liuqi115@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit ec0972adecb391a8d8650832263a4790f3bfb4df Author: Tetsuo Handa Date: Fri Sep 11 07:57:06 2020 +0900 fbcon: Fix user font detection test at fbcon_resize(). syzbot is reporting OOB read at fbcon_resize() [1], for commit 39b3cffb8cf31117 ("fbcon: prevent user font height or width change from causing potential out-of-bounds access") is by error using registered_fb[con2fb_map[vc->vc_num]]->fbcon_par->p->userfont (which was set to non-zero) instead of fb_display[vc->vc_num].userfont (which remains zero for that display). We could remove tricky userfont flag [2], for we can determine it by comparing address of the font data and addresses of built-in font data. But since that commit is failing to fix the original OOB read [3], this patch keeps the change minimal in case we decide to revert altogether. [1] https://syzkaller.appspot.com/bug?id=ebcbbb6576958a496500fee9cf7aa83ea00b5920 [2] https://syzkaller.appspot.com/text?tag=Patch&x=14030853900000 [3] https://syzkaller.appspot.com/bug?id=6fba8c186d97cf1011ab17660e633b1cc4e080c9 Reported-by: syzbot Signed-off-by: Tetsuo Handa Fixes: 39b3cffb8cf31117 ("fbcon: prevent user font height or width change from causing potential out-of-bounds access") Cc: George Kennedy Link: https://lore.kernel.org/r/f6e3e611-8704-1263-d163-f52c906a4f06@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman commit e1c2d96cd0196383e6c390c8abf0b9045a9616b2 Author: Ricardo Neri Date: Fri Aug 21 11:48:10 2020 -0700 powercap: RAPL: Add support for Lakefield Simply add Lakefield model ID. No additional changes are needed. Signed-off-by: Ricardo Neri [ rjw: Minor subject edit ] Signed-off-by: Rafael J. Wysocki commit 3c5a87be170aba8ac40982182f812dcff6ed1ad1 Author: Tobias Diedrich Date: Mon Sep 14 19:36:28 2020 +0200 serial: 8250_pci: Add Realtek 816a and 816b These serial ports are exposed by the OOB-management-engine on RealManage-enabled network cards (e.g. AMD DASH enabled systems using Realtek cards). Because these have 3 BARs, they fail the "num_iomem <= 1" check in serial_pci_guess_board. I've manually checked the two IOMEM regions and BAR 2 doesn't seem to respond to reads, but BAR 4 seems to be an MMIO version of the IO ports (untested). With this change, the ports are detected: 0000:02:00.1: ttyS0 at I/O 0x2200 (irq = 82, base_baud = 115200) is a 16550A 0000:02:00.2: ttyS1 at I/O 0x2100 (irq = 55, base_baud = 115200) is a 16550A lspci output: 02:00.1 0700: 10ec:816a (rev 0e) (prog-if 02 [16550]) Subsystem: 17aa:5082 Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort+ SERR- Cc: stable Link: https://lore.kernel.org/r/20200914173628.GA22508@yamamaya.is-a-geek.org Signed-off-by: Greg Kroah-Hartman commit e0830dbf71f191851ed3772d2760f007b7c5bc3a Author: Johan Hovold Date: Wed Sep 9 16:31:01 2020 +0200 serial: core: fix console port-lock regression Fix the port-lock initialisation regression introduced by commit a3cb39d258ef ("serial: core: Allow detach and attach serial device for console") by making sure that the lock is again initialised during console setup. The console may be registered before the serial controller has been probed in which case the port lock needs to be initialised during console setup by a call to uart_set_options(). The console-detach changes introduced a regression in several drivers by effectively removing that initialisation by not initialising the lock when the port is used as a console (which is always the case during console setup). Add back the early lock initialisation and instead use a new console-reinit flag to handle the case where a console is being re-attached through sysfs. The question whether the console-detach interface should have been added in the first place is left for another discussion. Note that the console-enabled check in uart_set_options() is not redundant because of kgdboc, which can end up reinitialising an already enabled console (see commit 42b6a1baa3ec ("serial_core: Don't re-initialize a previously initialized spinlock.")). Fixes: a3cb39d258ef ("serial: core: Allow detach and attach serial device for console") Cc: stable # 5.7 Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200909143101.15389-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit fe88c6489264eaea23570dfdf03e1d3f5f47f423 Author: Johan Hovold Date: Wed Sep 9 16:31:00 2020 +0200 serial: core: fix port-lock initialisation Commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()") tried to work around a breakage introduced by commit a3cb39d258ef ("serial: core: Allow detach and attach serial device for console") by adding a second initialisation of the port lock when registering the port. As reported by the build robots [1], this doesn't really solve the regression introduced by the console-detach changes and also adds a second redundant initialisation of the lock for normal ports. Start cleaning up this mess by removing the redundant initialisation and making sure that the port lock is again initialised once-only for ports that aren't already in use as a console. [1] https://lore.kernel.org/r/20200802054852.GR23458@shao2-debian Fixes: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()") Fixes: a3cb39d258ef ("serial: core: Allow detach and attach serial device for console") Cc: stable # 5.7 Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200909143101.15389-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit d69030c91b3765934048151792f141f0571efa86 Author: Madhusudanarao Amara Date: Wed Sep 16 12:11:02 2020 +0300 usb: typec: intel_pmc_mux: Handle SCU IPC error conditions Check and return if there are errors. The response bits are valid only on no errors. Fixes: b7404a29cd3d ("usb: typec: intel_pmc_mux: Definitions for response status bits") Signed-off-by: Madhusudanarao Amara Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200916091102.27118-4-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bcea6dafeeef7d1a6a8320a249aabf981d63b881 Author: Penghao Date: Mon Sep 7 10:30:26 2020 +0800 USB: quirks: Add USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk for BYD zhaoxin notebook Add a USB_QUIRK_IGNORE_REMOTE_WAKEUP quirk for the BYD zhaoxin notebook. This notebook come with usb touchpad. And we would like to disable touchpad wakeup on this notebook by default. Signed-off-by: Penghao Cc: stable Link: https://lore.kernel.org/r/20200907023026.28189-1-penghao@uniontech.com Signed-off-by: Greg Kroah-Hartman commit 325b008723b2dd31de020e85ab9d2e9aa4637d35 Author: Oliver Neukum Date: Wed Sep 16 11:40:25 2020 +0200 USB: UAS: fix disconnect by unplugging a hub The SCSI layer can go into an ugly loop if you ignore that a device is gone. You need to report an error in the command rather than in the return value of the queue method. We need to specifically check for ENODEV. The issue goes back to the introduction of the driver. Fixes: 115bb1ffa54c3 ("USB: Add UAS driver") Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20200916094026.30085-2-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit 386e15a650447f53de3d2d8819ce9393f31650a4 Author: Heikki Krogerus Date: Wed Sep 16 12:00:34 2020 +0300 usb: typec: ucsi: Prevent mode overrun Sometimes the embedded controller firmware does not terminate the list of alternate modes that the partner supports in its response to the GET_ALTERNATE_MODES command. Instead the firmware returns the supported alternate modes over and over again until the driver stops requesting them. If that happens, the number of modes for each alternate mode will exceed the maximum 6 that is defined in the USB Power Delivery specification. Making sure that can't happen by adding a check for it. This fixes NULL pointer dereference that is caused by the overrun. Fixes: ad74b8649beaf ("usb: typec: ucsi: Preliminary support for alternate modes") Cc: stable@vger.kernel.org Reported-by: Zwane Mwaikambo Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200916090034.25119-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 130a96d698d7bee9f339832d1e47ab26aad8dbf1 Author: Heikki Krogerus Date: Wed Sep 16 12:00:33 2020 +0300 usb: typec: ucsi: acpi: Increase command completion timeout value UCSI specification quite clearly states that if a command can't be completed in 10ms, the firmware must notify about BUSY condition. Unfortunately almost none of the platforms (the firmware on them) generate the BUSY notification even if a command can't be completed in time. The driver already considered that, and used a timeout value of 5 seconds, but processing especially the alternate mode discovery commands takes often considerable amount of time from the firmware, much more than the 5 seconds. That happens especially after bootup when devices are already connected to the USB Type-C connector. For now on those platforms the alternate mode discovery has simply failed because of the timeout. To improve the situation, increasing the timeout value for the command completion to 1 minute. That should give enough time for even the slowest firmware to process the commands. Fixes: f56de278e8ec ("usb: typec: ucsi: acpi: Move to the new API") Cc: stable@vger.kernel.org Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200916090034.25119-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 20612303a0b45de748d31331407e84300c38e497 Author: Chris Wilson Date: Tue Jul 28 16:21:44 2020 +0100 drm/i915: Filter wake_flags passed to default_wake_function (NOTE: This is the minimal backportable fix, a full fix is being developed at https://patchwork.freedesktop.org/patch/388048/) The flags passed to the wait_entry.func are passed onwards to try_to_wake_up(), which has a very particular interpretation for its wake_flags. In particular, beyond the published WF_SYNC, it has a few internal flags as well. Since we passed the fence->error down the chain via the flags argument, these ended up in the default_wake_function confusing the kernel/sched. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2110 Fixes: ef4688497512 ("drm/i915: Propagate fence errors") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: # v5.4+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200728152144.1100-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi [Joonas: Rebased and reordered into drm-intel-gt-next branch] [Joonas: Added a note and link about more complete fix] Signed-off-by: Joonas Lahtinen (cherry picked from commit f4b3c395540aa3d4f5a6275c5bdd83ab89034806) Signed-off-by: Jani Nikula commit b82a8b93b4f9008de97d6920184948563980df37 Author: Chris Wilson Date: Thu Jul 16 15:22:06 2020 +0100 drm/i915: Be wary of data races when reading the active execlists To implement preempt-to-busy (and so efficient timeslicing and best utilization of the hardware submission ports) we let the GPU run asynchronously in respect to the ELSP submission queue. This created challenges in keeping and accessing the driver state mirroring the asynchronous GPU execution. The latest occurence of this was spotted by KCSAN: [ 1413.563200] BUG: KCSAN: data-race in __await_execution+0x217/0x370 [i915] [ 1413.563221] [ 1413.563236] race at unknown origin, with read to 0xffff88885bb6c478 of 8 bytes by task 9654 on cpu 1: [ 1413.563548] __await_execution+0x217/0x370 [i915] [ 1413.563891] i915_request_await_dma_fence+0x4eb/0x6a0 [i915] [ 1413.564235] i915_request_await_object+0x421/0x490 [i915] [ 1413.564577] i915_gem_do_execbuffer+0x29b7/0x3c40 [i915] [ 1413.564967] i915_gem_execbuffer2_ioctl+0x22f/0x5c0 [i915] [ 1413.564998] drm_ioctl_kernel+0x156/0x1b0 [ 1413.565022] drm_ioctl+0x2ff/0x480 [ 1413.565046] __x64_sys_ioctl+0x87/0xd0 [ 1413.565069] do_syscall_64+0x4d/0x80 [ 1413.565094] entry_SYSCALL_64_after_hwframe+0x44/0xa9 To complicate matters, we have to both avoid the read tearing of *active and avoid any write tearing as perform the pending[] -> inflight[] promotion of the execlists. This is because we cannot rely on the memcpy doing u64 aligned copies on all kernels/platforms and so we opt to open-code it with explicit WRITE_ONCE annotations to satisfy KCSAN. v2: When in doubt, write the same comment again. v3: Expanded commit message. Fixes: b55230e5e800 ("drm/i915: Check for awaits on still currently executing requests") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200716142207.13003-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi [Joonas: Rebased and reordered into drm-intel-gt-next branch] [Joonas: Added expanded commit message from Tvrtko and Chris] Signed-off-by: Joonas Lahtinen (cherry picked from commit b4d9145b0154f8c71dafc2db5fd445f1f3db9426) Signed-off-by: Jani Nikula commit c2314b8bd4c009793b6f9d57bc8363af034e02ca Author: Chris Wilson Date: Thu Aug 6 11:59:54 2020 +0100 drm/i915/gem: Reduce context termination list iteration guard to RCU As we now protect the timeline list using RCU, we can drop the timeline->mutex for guarding the list iteration during context close, as we are searching for an inflight request. Any new request will see the context is banned and not be submitted. In doing so, pull the checks for a concurrent submission of the request (notably the i915_request_completed()) under the engine spinlock, to fully serialise with __i915_request_submit()). That is in the case of preempt-to-busy where the request may be completed during the __i915_request_submit(), we need to be careful that we sample the request status after serialising so that we don't miss the request the engine is actually submitting. Fixes: 4a3174152147 ("drm/i915/gem: Refine occupancy test in kill_context()") References: d22d2d073ef8 ("drm/i915: Protect i915_request_await_start from early waits") # rcu protection of timeline->requests References: https://gitlab.freedesktop.org/drm/intel/-/issues/1622 References: https://gitlab.freedesktop.org/drm/intel/-/issues/2158 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200806105954.7766-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen (cherry picked from commit 736e785f9b28cd9ef2d16a80960a04fd00e64b22) Signed-off-by: Jani Nikula commit e7d95527f27a6d9edcffbd74eee38e5cb6b91785 Author: Chris Wilson Date: Thu Jul 30 10:28:56 2020 +0100 drm/i915/gem: Delay tracking the GEM context until it is registered Avoid exposing a partially constructed context by deferring the list_add() from the initial construction to the end of registration. Otherwise, if we peek into the list of contexts from inside debugfs, we may see the partially constructed context and chase down some dangling incomplete pointers. Reported-by: CQ Tang Fixes: 3aa9945a528e ("drm/i915: Separate GEM context construction and registration to userspace") References: f6e8aa387171 ("drm/i915: Report the number of closed vma held by each context in debugfs") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: CQ Tang Cc: # v5.2+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200730092856.23615-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi Signed-off-by: Joonas Lahtinen (cherry picked from commit eb4dedae920a07c485328af3da2202ec5184fb17) Signed-off-by: Jani Nikula commit e5467b672bd99f0c1904900013e778e3a5ce30b7 Author: Marek Behún Date: Tue Sep 15 02:54:26 2020 +0200 dt-bindings: leds: cznic,turris-omnia-leds: fix error in binding There is a bug in the device tree binding for cznic,turris-omnia-leds which causes make dt_binding_check to complain. The reason is that the multi-led property binding's regular expression does not contain the `@` character, while the example nodes do. Fix this, and also adjust the maximum address to 'b' as there are 12 LEDs. Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: Pavel Machek Signed-off-by: Marek Behún Link: https://lore.kernel.org/r/20200915005426.15957-1-marek.behun@nic.cz Signed-off-by: Rob Herring commit d5d325eae7823c85eedabf05f78f9cd574fe832b Merge: 2fbc6e89b2f14 ce880cb825fcc Author: David S. Miller Date: Tue Sep 15 19:26:21 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2020-09-15 The following pull-request contains BPF updates for your *net* tree. We've added 12 non-merge commits during the last 19 day(s) which contain a total of 10 files changed, 47 insertions(+), 38 deletions(-). The main changes are: 1) docs/bpf fixes, from Andrii. 2) ld_abs fix, from Daniel. 3) socket casting helpers fix, from Martin. 4) hash iterator fixes, from Yonghong. ==================== Signed-off-by: David S. Miller commit ce880cb825fcc22d4e39046a6c3a3a7f6603883d Author: Yonghong Song Date: Tue Sep 15 17:44:01 2020 -0700 bpf: Fix a rcu warning for bpffs map pretty-print Running selftest ./btf_btf -p the kernel had the following warning: [ 51.528185] WARNING: CPU: 3 PID: 1756 at kernel/bpf/hashtab.c:717 htab_map_get_next_key+0x2eb/0x300 [ 51.529217] Modules linked in: [ 51.529583] CPU: 3 PID: 1756 Comm: test_btf Not tainted 5.9.0-rc1+ #878 [ 51.530346] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.3-1.el7.centos 04/01/2014 [ 51.531410] RIP: 0010:htab_map_get_next_key+0x2eb/0x300 ... [ 51.542826] Call Trace: [ 51.543119] map_seq_next+0x53/0x80 [ 51.543528] seq_read+0x263/0x400 [ 51.543932] vfs_read+0xad/0x1c0 [ 51.544311] ksys_read+0x5f/0xe0 [ 51.544689] do_syscall_64+0x33/0x40 [ 51.545116] entry_SYSCALL_64_after_hwframe+0x44/0xa9 The related source code in kernel/bpf/hashtab.c: 709 static int htab_map_get_next_key(struct bpf_map *map, void *key, void *next_key) 710 { 711 struct bpf_htab *htab = container_of(map, struct bpf_htab, map); 712 struct hlist_nulls_head *head; 713 struct htab_elem *l, *next_l; 714 u32 hash, key_size; 715 int i = 0; 716 717 WARN_ON_ONCE(!rcu_read_lock_held()); In kernel/bpf/inode.c, bpffs map pretty print calls map->ops->map_get_next_key() without holding a rcu_read_lock(), hence causing the above warning. To fix the issue, just surrounding map->ops->map_get_next_key() with rcu read lock. Fixes: a26ca7c982cb ("bpf: btf: Add pretty print support to the basic arraymap") Reported-by: Alexei Starovoitov Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Cc: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200916004401.146277-1-yhs@fb.com commit 8c33dadc3e0eef1599811a55d748a0b95da0317d Author: Martin KaFai Lau Date: Tue Sep 15 11:29:59 2020 -0700 bpf: Bpf_skc_to_* casting helpers require a NULL check on sk The bpf_skc_to_* type casting helpers are available to BPF_PROG_TYPE_TRACING. The traced PTR_TO_BTF_ID may be NULL. For example, the skb->sk may be NULL. Thus, these casting helpers need to check "!sk" also and this patch fixes them. Fixes: 0d4fad3e57df ("bpf: Add bpf_skc_to_udp6_sock() helper") Fixes: 478cfbdf5f13 ("bpf: Add bpf_skc_to_{tcp, tcp_timewait, tcp_request}_sock() helpers") Fixes: af7ec1383361 ("bpf: Add bpf_skc_to_tcp6_sock() helper") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200915182959.241101-1-kafai@fb.com commit 6c5dee18756b4721ac8518c69b22ee8ac0c9c442 Author: Damien Le Moal Date: Tue Sep 15 16:33:47 2020 +0900 scsi: sd: sd_zbc: Fix ZBC disk initialization Make sure to call sd_zbc_init_disk() when the sdkp->zoned field is known, that is, once sd_read_block_characteristics() is executed in sd_revalidate_disk(), so that host-aware disks also get initialized. To do so, move sd_zbc_init_disk() call in sd_zbc_revalidate_zones() and make sure to execute it for all zoned disks, including for host-aware disks used as regular disks as these disk zoned model may be changed back to BLK_ZONED_HA when partitions are deleted. Link: https://lore.kernel.org/r/20200915073347.832424-3-damien.lemoal@wdc.com Fixes: 5795eb443060 ("scsi: sd_zbc: emulate ZONE_APPEND commands") Cc: # v5.8+ Reported-by: Borislav Petkov Tested-by: Borislav Petkov Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 27ba3e8ff3ab86449e63d38a8d623053591e65fa Author: Damien Le Moal Date: Tue Sep 15 16:33:46 2020 +0900 scsi: sd: sd_zbc: Fix handling of host-aware ZBC disks When CONFIG_BLK_DEV_ZONED is disabled, allow using host-aware ZBC disks as regular disks. In this case, ensure that command completion is correctly executed by changing sd_zbc_complete() to return good_bytes instead of 0 and causing a hang during device probe (endless retries). When CONFIG_BLK_DEV_ZONED is enabled and a host-aware disk is detected to have partitions, it will be used as a regular disk. In this case, make sure to not do anything in sd_zbc_revalidate_zones() as that triggers warnings. Since all these different cases result in subtle settings of the disk queue zoned model, introduce the block layer helper function blk_queue_set_zoned() to generically implement setting up the effective zoned model according to the disk type, the presence of partitions on the disk and CONFIG_BLK_DEV_ZONED configuration. Link: https://lore.kernel.org/r/20200915073347.832424-2-damien.lemoal@wdc.com Fixes: b72053072c0b ("block: allow partitions on host aware zone devices") Cc: Reported-by: Borislav Petkov Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 9803ab172228d8509c72b34c703b9fe67cb94ddc Merge: 1e484d388773b 244359c99fd90 Author: Linus Torvalds Date: Tue Sep 15 16:30:20 2020 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fix from James Bottomley: "Just one fix in libsas for a resource leak in an error path" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: libsas: Fix error path in sas_notify_lldd_dev_found() commit 1e484d388773b0a984236a181fb21e133630df42 Merge: 00acc50506329 bc62d68e2a0a6 Author: Linus Torvalds Date: Tue Sep 15 16:26:57 2020 -0700 Merge tag 'fixes-v5.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security layer fix from James Morris: "A device_cgroup RCU warning fix from Amol Grover" * tag 'fixes-v5.9a' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: device_cgroup: Fix RCU list debugging warning commit 00acc50506329bef3c28d11481730e6cda01a6a0 Merge: fc4f28bb3daf3 911e1987efc8f Author: Linus Torvalds Date: Tue Sep 15 16:20:43 2020 -0700 Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: "Two patches from Michael and Dexuan to fix vmbus hanging issues" * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload Drivers: hv: vmbus: hibernation: do not hang forever in vmbus_bus_resume() commit 7f04839ec4483563f38062b4dd90253e45447198 Author: James Smart Date: Fri Sep 11 13:01:47 2020 -0700 scsi: lpfc: Fix initial FLOGI failure due to BBSCN not supported Initial FLOGIs are failing with the following message: lpfc 0000:13:00.1: 1:(0):0820 FLOGI Failed (x300). BBCredit Not Supported In a prior patch, the READ_SPARAM command was re-ordered to post after CONFIG_LINK as the driver is expected to update the driver's copy of the service parameters for the FLOGI payload. If the bb-credit recovery feature is enabled, this is fine. But on adapters were bb-credit recovery isn't enabled, it would cause the FLOGI to fail. Fix by restoring the original command order (READ_SPARAM before CONFIG_LINK), and after issuing CONFIG_LINK, detect bb-credit recovery support and reissuing READ_SPARAM to obtain the updated service parameters (effectively adding in the fix command order). [mkp: corrected SHA] Link: https://lore.kernel.org/r/20200911200147.110826-1-james.smart@broadcom.com Fixes: 835214f5d5f5 ("scsi: lpfc: Fix broken Credit Recovery after driver load") CC: # v5.7+ Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 2fbc6e89b2f1403189e624cabaf73e189c5e50c6 Author: David Ahern Date: Mon Sep 14 21:03:54 2020 -0600 ipv4: Update exception handling for multipath routes via same device Kfir reported that pmtu exceptions are not created properly for deployments where multipath routes use the same device. After some digging I see 2 compounding problems: 1. ip_route_output_key_hash_rcu is updating the flowi4_oif *after* the route lookup. This is the second use case where this has been a problem (the first is related to use of vti devices with VRF). I can not find any reason for the oif to be changed after the lookup; the code goes back to the start of git. It does not seem logical so remove it. 2. fib_lookups for exceptions do not call fib_select_path to handle multipath route selection based on the hash. The end result is that the fib_lookup used to add the exception always creates it based using the first leg of the route. An example topology showing the problem: | host1 +------+ | eth0 | .209 +------+ | +------+ switch | br0 | +------+ | +---------+---------+ | host2 | host3 +------+ +------+ | eth0 | .250 | eth0 | 192.168.252.252 +------+ +------+ +-----+ +-----+ | vti | .2 | vti | 192.168.247.3 +-----+ +-----+ \ / ================================= tunnels 192.168.247.1/24 for h in host1 host2 host3; do ip netns add ${h} ip -netns ${h} link set lo up ip netns exec ${h} sysctl -wq net.ipv4.ip_forward=1 done ip netns add switch ip -netns switch li set lo up ip -netns switch link add br0 type bridge stp 0 ip -netns switch link set br0 up for n in 1 2 3; do ip -netns switch link add eth-sw type veth peer name eth-h${n} ip -netns switch li set eth-h${n} master br0 up ip -netns switch li set eth-sw netns host${n} name eth0 done ip -netns host1 addr add 192.168.252.209/24 dev eth0 ip -netns host1 link set dev eth0 up ip -netns host1 route add 192.168.247.0/24 \ nexthop via 192.168.252.250 dev eth0 nexthop via 192.168.252.252 dev eth0 ip -netns host2 addr add 192.168.252.250/24 dev eth0 ip -netns host2 link set dev eth0 up ip -netns host2 addr add 192.168.252.252/24 dev eth0 ip -netns host3 link set dev eth0 up ip netns add tunnel ip -netns tunnel li set lo up ip -netns tunnel li add br0 type bridge ip -netns tunnel li set br0 up for n in $(seq 11 20); do ip -netns tunnel addr add dev br0 192.168.247.${n}/24 done for n in 2 3 do ip -netns tunnel link add vti${n} type veth peer name eth${n} ip -netns tunnel link set eth${n} mtu 1360 master br0 up ip -netns tunnel link set vti${n} netns host${n} mtu 1360 up ip -netns host${n} addr add dev vti${n} 192.168.247.${n}/24 done ip -netns tunnel ro add default nexthop via 192.168.247.2 nexthop via 192.168.247.3 ip netns exec host1 ping -M do -s 1400 -c3 -I 192.168.252.209 192.168.247.11 ip netns exec host1 ping -M do -s 1400 -c3 -I 192.168.252.209 192.168.247.15 ip -netns host1 ro ls cache Before this patch the cache always shows exceptions against the first leg in the multipath route; 192.168.252.250 per this example. Since the hash has an initial random seed, you may need to vary the final octet more than what is listed. In my tests, using addresses between 11 and 19 usually found 1 that used both legs. With this patch, the cache will have exceptions for both legs. Fixes: 4895c771c7f0 ("ipv4: Add FIB nexthop exceptions") Reported-by: Kfir Itzhak Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 2f228aab21bbc74e90e267a721215ec8be51daf7 Author: Michel Dänzer Date: Fri Sep 4 12:43:04 2020 +0200 drm/amdgpu/dc: Require primary plane to be enabled whenever the CRTC is Don't check drm_crtc_state::active for this either, per its documentation in include/drm/drm_crtc.h: * Hence drivers must not consult @active in their various * &drm_mode_config_funcs.atomic_check callback to reject an atomic * commit. atomic_remove_fb disables the CRTC as needed for disabling the primary plane. This prevents at least the following problems if the primary plane gets disabled (e.g. due to destroying the FB assigned to the primary plane, as happens e.g. with mutter in Wayland mode): * The legacy cursor ioctl returned EINVAL for a non-0 cursor FB ID (which enables the cursor plane). * If the cursor plane was enabled, changing the legacy DPMS property value from off to on returned EINVAL. v2: * Minor changes to code comment and commit log, per review feedback. GitLab: https://gitlab.gnome.org/GNOME/mutter/-/issues/1108 GitLab: https://gitlab.gnome.org/GNOME/mutter/-/issues/1165 GitLab: https://gitlab.gnome.org/GNOME/mutter/-/issues/1344 Suggested-by: Daniel Vetter Acked-by: Daniel Vetter Reviewed-by: Nicholas Kazlauskas Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 40eab0f8956724b0c2bb9e5679269632afb72b26 Author: Christian König Date: Wed Sep 9 13:12:46 2020 +0200 drm/radeon: revert "Prefer lower feedback dividers" Turns out this breaks a lot of different hardware. This reverts commit fc8c70526bd30733ea8667adb8b8ffebea30a8ed. Signed-off-by: Christian König Acked-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5367eb6d8a98b8682877961f4ccee1088d5735f3 Author: Andrey Grodzovsky Date: Thu Sep 10 13:59:33 2020 -0400 drm/amdgpu: Include sienna_cichlid in USBC PD FW support. Create sysfs interface also for sienna_cichlid. Reviewed-by: Alex Deucher Signed-off-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit c4790a8894232f39c25c7c546c06efe074e63384 Author: Jun Lei Date: Thu Sep 3 16:17:46 2020 -0400 drm/amd/display: update nv1x stutter latencies [why] Recent characterization shows increased stutter latencies on some SKUs, leading to underflow. [how] Update SOC params to account for this worst case latency. Signed-off-by: Jun Lei Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 4cdd7b332ed139b1e37faeb82409a14490adb644 Author: Bhawanpreet Lakha Date: Fri Aug 28 11:09:38 2020 -0400 drm/amd/display: Don't use DRM_ERROR() for DTM add topology [Why] Previously we were only calling add_topology when hdcp was being enabled. Now we call add_topology by default so the ERROR messages are printed if the firmware is not loaded. This error message is not relevant for normal display functionality so no need to print a ERROR message. [How] Change DRM_ERROR to DRM_INFO Signed-off-by: Bhawanpreet Lakha Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit cc8e66e769ebd1d10c406a3152474bab24ac1730 Author: Jiansong Chen Date: Mon Sep 14 14:42:51 2020 +0800 drm/amd/pm: support runtime pptable update for sienna_cichlid etc. This avoids smu issue when enabling runtime pptable update for sienna_cichlid and so on. Runtime pptable udpate is needed for test and debug purpose. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 087d764159996ae378b08c0fdd557537adfd6899 Author: Dennis Li Date: Wed Sep 2 17:11:09 2020 +0800 drm/amdkfd: fix a memory leak issue In the resume stage of GPU recovery, start_cpsch will call pm_init which set pm->allocated as false, cause the next pm_release_ib has no chance to release ib memory. Add pm_release_ib in stop_cpsch which will be called in the suspend stage of GPU recovery. Reviewed-by: Felix Kuehling Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit 66a5710beaf42903d553378f609166034bd219c7 Author: Dennis Li Date: Wed Sep 2 12:57:59 2020 +0800 drm/kfd: fix a system crash issue during GPU recovery The crash log as the below: [Thu Aug 20 23:18:14 2020] general protection fault: 0000 [#1] SMP NOPTI [Thu Aug 20 23:18:14 2020] CPU: 152 PID: 1837 Comm: kworker/152:1 Tainted: G OE 5.4.0-42-generic #46~18.04.1-Ubuntu [Thu Aug 20 23:18:14 2020] Hardware name: GIGABYTE G482-Z53-YF/MZ52-G40-00, BIOS R12 05/13/2020 [Thu Aug 20 23:18:14 2020] Workqueue: events amdgpu_ras_do_recovery [amdgpu] [Thu Aug 20 23:18:14 2020] RIP: 0010:evict_process_queues_cpsch+0xc9/0x130 [amdgpu] [Thu Aug 20 23:18:14 2020] Code: 49 8d 4d 10 48 39 c8 75 21 eb 44 83 fa 03 74 36 80 78 72 00 74 0c 83 ab 68 01 00 00 01 41 c6 45 41 00 48 8b 00 48 39 c8 74 25 <80> 78 70 00 c6 40 6d 01 74 ee 8b 50 28 c6 40 70 00 83 ab 60 01 00 [Thu Aug 20 23:18:14 2020] RSP: 0018:ffffb29b52f6fc90 EFLAGS: 00010213 [Thu Aug 20 23:18:14 2020] RAX: 1c884edb0a118914 RBX: ffff8a0d45ff3c00 RCX: ffff8a2d83e41038 [Thu Aug 20 23:18:14 2020] RDX: 0000000000000000 RSI: 0000000000000082 RDI: ffff8a0e2e4178c0 [Thu Aug 20 23:18:14 2020] RBP: ffffb29b52f6fcb0 R08: 0000000000001b64 R09: 0000000000000004 [Thu Aug 20 23:18:14 2020] R10: ffffb29b52f6fb78 R11: 0000000000000001 R12: ffff8a0d45ff3d28 [Thu Aug 20 23:18:14 2020] R13: ffff8a2d83e41028 R14: 0000000000000000 R15: 0000000000000000 [Thu Aug 20 23:18:14 2020] FS: 0000000000000000(0000) GS:ffff8a0e2e400000(0000) knlGS:0000000000000000 [Thu Aug 20 23:18:14 2020] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [Thu Aug 20 23:18:14 2020] CR2: 000055c783c0e6a8 CR3: 00000034a1284000 CR4: 0000000000340ee0 [Thu Aug 20 23:18:14 2020] Call Trace: [Thu Aug 20 23:18:14 2020] kfd_process_evict_queues+0x43/0xd0 [amdgpu] [Thu Aug 20 23:18:14 2020] kfd_suspend_all_processes+0x60/0xf0 [amdgpu] [Thu Aug 20 23:18:14 2020] kgd2kfd_suspend.part.7+0x43/0x50 [amdgpu] [Thu Aug 20 23:18:14 2020] kgd2kfd_pre_reset+0x46/0x60 [amdgpu] [Thu Aug 20 23:18:14 2020] amdgpu_amdkfd_pre_reset+0x1a/0x20 [amdgpu] [Thu Aug 20 23:18:14 2020] amdgpu_device_gpu_recover+0x377/0xf90 [amdgpu] [Thu Aug 20 23:18:14 2020] ? amdgpu_ras_error_query+0x1b8/0x2a0 [amdgpu] [Thu Aug 20 23:18:14 2020] amdgpu_ras_do_recovery+0x159/0x190 [amdgpu] [Thu Aug 20 23:18:14 2020] process_one_work+0x20f/0x400 [Thu Aug 20 23:18:14 2020] worker_thread+0x34/0x410 When GPU hang, user process will fail to create a compute queue whose struct object will be freed later, but driver wrongly add this queue to queue list of the proccess. And then kfd_process_evict_queues will access a freed memory, which cause a system crash. v2: The failure to execute_queues should probably not be reported to the caller of create_queue, because the queue was already created. Therefore change to ignore the return value from execute_queues. Reviewed-by: Felix Kuehling Signed-off-by: Dennis Li Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 2e5117ba9f582262e93a1fdf8e1a7b9affd5121c Author: Lu Wei Date: Tue Sep 15 10:39:55 2020 +0800 net: tipc: kerneldoc fixes Fix parameter description of tipc_link_bc_create() Reported-by: Hulk Robot Fixes: 16ad3f4022bb ("tipc: introduce variable window congestion control") Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit d3f2ef1887e18a091ac25e3ec8985ecb9a5c76fc Author: Dany Madden Date: Mon Sep 14 20:35:35 2020 -0400 ibmvnic: update MAINTAINERS Update supporters for IBM Power SRIOV Virtual NIC Device Driver. Thomas Falcon is moving on to other works. Dany Madden, Lijun Pan and Sukadev Bhattiprolu are the current supporters. Signed-off-by: Dany Madden Signed-off-by: David S. Miller commit e56b4d4cc5029bd39347ff7ee559f66d6b25ca98 Merge: d2249bf25c565 0212a0483b0a3 Author: Stephen Boyd Date: Tue Sep 15 09:17:57 2020 -0700 Merge tag 'v5.9-clk-samsung-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-fixes Pull a Samsung clk driver fix from Sylwester Nawrocki: - fix for a regression in v5.9-rc1 on Odroid XU3/XU4, i.e. booting failure due to the DRAM controller root clock being disabled * tag 'v5.9-clk-samsung-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: clk: samsung: Keep top BPLL mux on Exynos542x enabled commit 50851f5033a34fb9f2ecefa57fc9efd862634416 Author: Jason Yan Date: Sat Sep 12 15:22:11 2020 +0800 spi: bcm2835: Make polling_limit_us static This eliminates the following sparse warning: drivers/spi/spi-bcm2835.c:78:14: warning: symbol 'polling_limit_us' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Jason Yan Link: https://lore.kernel.org/r/20200912072211.602735-1-yanaijie@huawei.com Signed-off-by: Mark Brown commit 46908326c6b801201f1e46f5ed0db6e85bef74ae Author: Ard Biesheuvel Date: Tue Sep 15 18:12:09 2020 +0300 efi: efibc: check for efivars write capability Branden reports that commit f88814cc2578c1 ("efi/efivars: Expose RT service availability via efivars abstraction") regresses UEFI platforms that implement GetVariable but not SetVariable when booting kernels that have EFIBC (bootloader control) enabled. The reason is that EFIBC is a user of the efivars abstraction, which was updated to permit users that rely only on the read capability, but not on the write capability. EFIBC is in the latter category, so it has to check explicitly whether efivars supports writes. Fixes: f88814cc2578c1 ("efi/efivars: Expose RT service availability via efivars abstraction") Tested-by: Branden Sherrell Link: https://lore.kernel.org/linux-efi/AE217103-C96F-4AFC-8417-83EC11962004@gmail.com/ Signed-off-by: Ard Biesheuvel commit d26383dcb2b4b8629fde05270b4e3633be9e3d4b Author: Namhyung Kim Date: Tue Sep 15 12:18:19 2020 +0900 perf test: Free formats for perf pmu parse test The following leaks were detected by ASAN: Indirect leak of 360 byte(s) in 9 object(s) allocated from: #0 0x7fecc305180e in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10780e) #1 0x560578f6dce5 in perf_pmu__new_format util/pmu.c:1333 #2 0x560578f752fc in perf_pmu_parse util/pmu.y:59 #3 0x560578f6a8b7 in perf_pmu__format_parse util/pmu.c:73 #4 0x560578e07045 in test__pmu tests/pmu.c:155 #5 0x560578de109b in run_test tests/builtin-test.c:410 #6 0x560578de109b in test_and_print tests/builtin-test.c:440 #7 0x560578de401a in __cmd_test tests/builtin-test.c:661 #8 0x560578de401a in cmd_test tests/builtin-test.c:807 #9 0x560578e49354 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312 #10 0x560578ce71a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364 #11 0x560578ce71a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408 #12 0x560578ce71a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538 #13 0x7fecc2b7acc9 in __libc_start_main ../csu/libc-start.c:308 Fixes: cff7f956ec4a1 ("perf tests: Move pmu tests into separate object") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200915031819.386559-12-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6f47ed6cd12a0ea9b55b19b5d6e4a3b490a97bdf Author: Namhyung Kim Date: Tue Sep 15 12:18:17 2020 +0900 perf metric: Do not free metric when failed to resolve It's dangerous to free the original metric when it's called from resolve_metric() as it's already in the metric_list and might have other resources too. Instead, it'd better let them bail out and be released properly at the later stage. So add a check when it's called from metricgroup__add_metric() and release it. Also make sure that mp is set properly. Fixes: 83de0b7d535de ("perf metric: Collect referenced metrics in struct metric_ref_node") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200915031819.386559-10-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 27adafcda3d8b8a818e85d58eea95b85b5f513f9 Author: Namhyung Kim Date: Tue Sep 15 12:18:16 2020 +0900 perf metric: Free metric when it failed to resolve The metricgroup__add_metric() can find multiple match for a metric group and it's possible to fail. Also it can fail in the middle like in resolve_metric() even for single metric. In those cases, the intermediate list and ids will be leaked like: Direct leak of 3 byte(s) in 1 object(s) allocated from: #0 0x7f4c938f40b5 in strdup (/lib/x86_64-linux-gnu/libasan.so.5+0x920b5) #1 0x55f7e71c1bef in __add_metric util/metricgroup.c:683 #2 0x55f7e71c31d0 in add_metric util/metricgroup.c:906 #3 0x55f7e71c3844 in metricgroup__add_metric util/metricgroup.c:940 #4 0x55f7e71c488d in metricgroup__add_metric_list util/metricgroup.c:993 #5 0x55f7e71c488d in parse_groups util/metricgroup.c:1045 #6 0x55f7e71c60a4 in metricgroup__parse_groups_test util/metricgroup.c:1087 #7 0x55f7e71235ae in __compute_metric tests/parse-metric.c:164 #8 0x55f7e7124650 in compute_metric tests/parse-metric.c:196 #9 0x55f7e7124650 in test_recursion_fail tests/parse-metric.c:318 #10 0x55f7e7124650 in test__parse_metric tests/parse-metric.c:356 #11 0x55f7e70be09b in run_test tests/builtin-test.c:410 #12 0x55f7e70be09b in test_and_print tests/builtin-test.c:440 #13 0x55f7e70c101a in __cmd_test tests/builtin-test.c:661 #14 0x55f7e70c101a in cmd_test tests/builtin-test.c:807 #15 0x55f7e7126214 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312 #16 0x55f7e6fc41a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364 #17 0x55f7e6fc41a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408 #18 0x55f7e6fc41a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538 #19 0x7f4c93492cc9 in __libc_start_main ../csu/libc-start.c:308 Fixes: 83de0b7d535de ("perf metric: Collect referenced metrics in struct metric_ref_node") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200915031819.386559-9-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 437822bf38c1dc3bda6ffde52689e4e667046a6a Author: Namhyung Kim Date: Tue Sep 15 12:18:15 2020 +0900 perf metric: Release expr_parse_ctx after testing The test_generic_metric() missed to release entries in the pctx. Asan reported following leak (and more): Direct leak of 128 byte(s) in 1 object(s) allocated from: #0 0x7f4c9396980e in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10780e) #1 0x55f7e748cc14 in hashmap_grow (/home/namhyung/project/linux/tools/perf/perf+0x90cc14) #2 0x55f7e748d497 in hashmap__insert (/home/namhyung/project/linux/tools/perf/perf+0x90d497) #3 0x55f7e7341667 in hashmap__set /home/namhyung/project/linux/tools/perf/util/hashmap.h:111 #4 0x55f7e7341667 in expr__add_ref util/expr.c:120 #5 0x55f7e7292436 in prepare_metric util/stat-shadow.c:783 #6 0x55f7e729556d in test_generic_metric util/stat-shadow.c:858 #7 0x55f7e712390b in compute_single tests/parse-metric.c:128 #8 0x55f7e712390b in __compute_metric tests/parse-metric.c:180 #9 0x55f7e712446d in compute_metric tests/parse-metric.c:196 #10 0x55f7e712446d in test_dcache_l2 tests/parse-metric.c:295 #11 0x55f7e712446d in test__parse_metric tests/parse-metric.c:355 #12 0x55f7e70be09b in run_test tests/builtin-test.c:410 #13 0x55f7e70be09b in test_and_print tests/builtin-test.c:440 #14 0x55f7e70c101a in __cmd_test tests/builtin-test.c:661 #15 0x55f7e70c101a in cmd_test tests/builtin-test.c:807 #16 0x55f7e7126214 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312 #17 0x55f7e6fc41a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364 #18 0x55f7e6fc41a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408 #19 0x55f7e6fc41a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538 #20 0x7f4c93492cc9 in __libc_start_main ../csu/libc-start.c:308 Fixes: 6d432c4c8aa56 ("perf tools: Add test_generic_metric function") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200915031819.386559-8-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f5a56570a3f2c01e5307a972ae7d4636edff7b13 Author: Namhyung Kim Date: Tue Sep 15 12:18:14 2020 +0900 perf test: Fix memory leaks in parse-metric test It didn't release resources when there's an error so the test_recursion_fail() will leak some memory. Fixes: 0a507af9c681a ("perf tests: Add parse metric test for ipc metric") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200915031819.386559-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b12eea5ad8e77f8a380a141e3db67c07432dde16 Author: Namhyung Kim Date: Tue Sep 15 12:18:13 2020 +0900 perf parse-event: Fix memory leak in evsel->unit The evsel->unit borrows a pointer of pmu event or alias instead of owns a string. But tool event (duration_time) passes a result of strdup() caused a leak. It was found by ASAN during metric test: Direct leak of 210 byte(s) in 70 object(s) allocated from: #0 0x7fe366fca0b5 in strdup (/lib/x86_64-linux-gnu/libasan.so.5+0x920b5) #1 0x559fbbcc6ea3 in add_event_tool util/parse-events.c:414 #2 0x559fbbcc6ea3 in parse_events_add_tool util/parse-events.c:1414 #3 0x559fbbd8474d in parse_events_parse util/parse-events.y:439 #4 0x559fbbcc95da in parse_events__scanner util/parse-events.c:2096 #5 0x559fbbcc95da in __parse_events util/parse-events.c:2141 #6 0x559fbbc28555 in check_parse_id tests/pmu-events.c:406 #7 0x559fbbc28555 in check_parse_id tests/pmu-events.c:393 #8 0x559fbbc28555 in check_parse_cpu tests/pmu-events.c:415 #9 0x559fbbc28555 in test_parsing tests/pmu-events.c:498 #10 0x559fbbc0109b in run_test tests/builtin-test.c:410 #11 0x559fbbc0109b in test_and_print tests/builtin-test.c:440 #12 0x559fbbc03e69 in __cmd_test tests/builtin-test.c:695 #13 0x559fbbc03e69 in cmd_test tests/builtin-test.c:807 #14 0x559fbbc691f4 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312 #15 0x559fbbb071a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364 #16 0x559fbbb071a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408 #17 0x559fbbb071a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538 #18 0x7fe366b68cc9 in __libc_start_main ../csu/libc-start.c:308 Fixes: f0fbb114e3025 ("perf stat: Implement duration_time as a proper event") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200915031819.386559-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bfd1b83d75e44a9f65de30accb3dd3b5940bd3ac Author: Namhyung Kim Date: Tue Sep 15 12:18:11 2020 +0900 perf evlist: Fix cpu/thread map leak Asan reported leak of cpu and thread maps as they have one more refcount than released. I found that after setting evlist maps it should release it's refcount. It seems to be broken from the beginning so I chose the original commit as the culprit. But not sure how it's applied to stable trees since there are many changes in the code after that. Fixes: 7e2ed097538c5 ("perf evlist: Store pointer to the cpu and thread maps") Fixes: 4112eb1899c0e ("perf evlist: Default to syswide target when no thread/cpu maps set") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200915031819.386559-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b033ab11ad0c7f9a9c9fa4a1ac2ffad14454a9f3 Author: Namhyung Kim Date: Tue Sep 15 12:18:10 2020 +0900 perf metric: Fix some memory leaks - part 2 The metric_event_delete() missed to free expr->metric_events and it should free an expr when metric_refs allocation failed. Fixes: 4ea2896715e67 ("perf metric: Collect referenced metrics in struct metric_expr") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: John Garry Cc: Kajol Jain Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200915031819.386559-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4f57a1ed749a81ec553d89233cab53db9365e193 Author: Namhyung Kim Date: Tue Sep 15 12:18:09 2020 +0900 perf metric: Fix some memory leaks I found some memory leaks while reading the metric code. Some are real and others only occur in the error path. When it failed during metric or event parsing, it should release all resources properly. Fixes: b18f3e365019d ("perf stat: Support JSON metrics in perf stat") Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: John Garry Cc: Kajol Jain Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200915031819.386559-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0212a0483b0a36cc94cfab882b3edbb41fcfe1cd Author: Marek Szyprowski Date: Fri Aug 7 15:31:43 2020 +0200 clk: samsung: Keep top BPLL mux on Exynos542x enabled BPLL clock must not be disabled because it is needed for proper DRAM operation. This is normally handled by respective memory devfreq driver, but when that driver is not yet probed or its probe has been deferred the clock might get disabled what causes board hang. Fix this by calling clk_prepare_enable() directly from the clock provider driver. Cc: stable@vger.kernel.org Signed-off-by: Marek Szyprowski Reviewed-by: Lukasz Luba Tested-by: Lukasz Luba Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200807133143.22748-1-m.szyprowski@samsung.com Fixes: 6e7674c3c6df ("memory: Add DMC driver for Exynos5422") Signed-off-by: Sylwester Nawrocki commit 22fe5a25b5d8c4f8008dc4a8738d6d8a5f5ddbe9 Author: Namhyung Kim Date: Tue Sep 15 12:18:18 2020 +0900 perf test: Free aliases for PMU event map aliases test The aliases were never released causing the following leaks: Indirect leak of 1224 byte(s) in 9 object(s) allocated from: #0 0x7feefb830628 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x107628) #1 0x56332c8f1b62 in __perf_pmu__new_alias util/pmu.c:322 #2 0x56332c8f401f in pmu_add_cpu_aliases_map util/pmu.c:778 #3 0x56332c792ce9 in __test__pmu_event_aliases tests/pmu-events.c:295 #4 0x56332c792ce9 in test_aliases tests/pmu-events.c:367 #5 0x56332c76a09b in run_test tests/builtin-test.c:410 #6 0x56332c76a09b in test_and_print tests/builtin-test.c:440 #7 0x56332c76ce69 in __cmd_test tests/builtin-test.c:695 #8 0x56332c76ce69 in cmd_test tests/builtin-test.c:807 #9 0x56332c7d2214 in run_builtin /home/namhyung/project/linux/tools/perf/perf.c:312 #10 0x56332c6701a8 in handle_internal_command /home/namhyung/project/linux/tools/perf/perf.c:364 #11 0x56332c6701a8 in run_argv /home/namhyung/project/linux/tools/perf/perf.c:408 #12 0x56332c6701a8 in main /home/namhyung/project/linux/tools/perf/perf.c:538 #13 0x7feefb359cc9 in __libc_start_main ../csu/libc-start.c:308 Fixes: 956a78356c24c ("perf test: Test pmu-events aliases") Signed-off-by: Namhyung Kim Reviewed-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200915031819.386559-11-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 56f3a1cdafc25c5f78e4267ba9e2f341da3eec16 Author: Henry Burns Date: Mon Sep 14 20:40:49 2020 -0400 perf vendor events amd: Remove trailing commas The amdzen2/core.json and amdzen/core.json vendor events files have the occasional trailing comma. Since that goes against the JSON standard, lets remove it. Signed-off-by: Henry Burns Acked-by: Kim Phillips Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Vijay Thakkar Link: http://lore.kernel.org/lkml/20200915004125.971-1-henrywolfeburns@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit bf638d736e3e48c2538ebbd3e922c4f3a195db02 Merge: 856deb866d16e f022ff7bf377c Author: Greg Kroah-Hartman Date: Tue Sep 15 13:52:14 2020 +0200 Merge tag 'thunderbolt-for-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fix for v5.9-rc6 One more fix that makes ASUS PA27AC Thunderbolt 3 monitor work more reliably. This has been in linux-next with no reported issues. * tag 'thunderbolt-for-v5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Retry DROM read once if parsing fails commit 564c836fd945a94b5dd46597d6b7adb464092650 Author: Thomas Bogendoerfer Date: Mon Sep 14 18:05:00 2020 +0200 MIPS: SNI: Fix MIPS_L1_CACHE_SHIFT Commit 930beb5ac09a ("MIPS: introduce MIPS_L1_CACHE_SHIFT_") forgot to select the correct MIPS_L1_CACHE_SHIFT for SNI RM. This breaks non coherent DMA because of a wrong allocation alignment. Fixes: 930beb5ac09a ("MIPS: introduce MIPS_L1_CACHE_SHIFT_") Signed-off-by: Thomas Bogendoerfer commit 2369e827046920ef0599e6a36b975ac5c0a359c2 Author: Linus Lüssing Date: Tue Sep 15 09:54:10 2020 +0200 batman-adv: mcast: fix duplicate mcast packets from BLA backbone to mesh Scenario: * Multicast frame send from BLA backbone gateways (multiple nodes with their bat0 bridged together, with BLA enabled) sharing the same LAN to nodes in the mesh Issue: * Nodes receive the frame multiple times on bat0 from the mesh, once from each foreign BLA backbone gateway which shares the same LAN with another For multicast frames via batman-adv broadcast packets coming from the same BLA backbone but from different backbone gateways duplicates are currently detected via a CRC history of previously received packets. However this CRC so far was not performed for multicast frames received via batman-adv unicast packets. Fixing this by appyling the same check for such packets, too. Room for improvements in the future: Ideally we would introduce the possibility to not only claim a client, but a complete originator, too. This would allow us to only send a multicast-in-unicast packet from a BLA backbone gateway claiming the node and by that avoid potential redundant transmissions in the first place. Fixes: 279e89b2281a ("batman-adv: add broadcast duplicate check") Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 74c09b7275126da1b642b90c9cdc3ae8b729ad4b Author: Linus Lüssing Date: Tue Sep 15 09:54:09 2020 +0200 batman-adv: mcast: fix duplicate mcast packets in BLA backbone from mesh Scenario: * Multicast frame send from mesh to a BLA backbone (multiple nodes with their bat0 bridged together, with BLA enabled) Issue: * BLA backbone nodes receive the frame multiple times on bat0, once from mesh->bat0 and once from each backbone_gw from LAN For unicast, a node will send only to the best backbone gateway according to the TQ. However for multicast we currently cannot determine if multiple destination nodes share the same backbone if they don't share the same backbone with us. So we need to keep sending the unicasts to all backbone gateways and let the backbone gateways decide which one will forward the frame. We can use the CLAIM mechanism to make this decision. One catch: The batman-adv gateway feature for DHCP packets potentially sends multicast packets in the same batman-adv unicast header as the multicast optimizations code. And we are not allowed to drop those even if we did not claim the source address of the sender, as for such packets there is only this one multicast-in-unicast packet. How can we distinguish the two cases? The gateway feature uses a batman-adv unicast 4 address header. While the multicast-to-unicasts feature uses a simple, 3 address batman-adv unicast header. So let's use this to distinguish. Fixes: fe2da6ff27c7 ("batman-adv: check incoming packet type for bla") Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 3236d215ad38a3f5372e65cd1e0a52cf93d3c6a2 Author: Linus Lüssing Date: Tue Sep 15 09:54:08 2020 +0200 batman-adv: mcast: fix duplicate mcast packets in BLA backbone from LAN Scenario: * Multicast frame send from a BLA backbone (multiple nodes with their bat0 bridged together, with BLA enabled) Issue: * BLA backbone nodes receive the frame multiple times on bat0 For multicast frames received via batman-adv broadcast packets the originator of the broadcast packet is checked before decapsulating and forwarding the frame to bat0 (batadv_bla_is_backbone_gw()-> batadv_recv_bcast_packet()). If it came from a node which shares the same BLA backbone with us then it is not forwarded to bat0 to avoid a loop. When sending a multicast frame in a non-4-address batman-adv unicast packet we are currently missing this check - and cannot do so because the batman-adv unicast packet has no originator address field. However, we can simply fix this on the sender side by only sending the multicast frame via unicasts to interested nodes which do not share the same BLA backbone with us. This also nicely avoids some unnecessary transmissions on mesh side. Note that no infinite loop was observed, probably because of dropping via batadv_interface_tx()->batadv_bla_tx(). However the duplicates still utterly confuse switches/bridges, ICMPv6 duplicate address detection and neighbor discovery and therefore leads to long delays before being able to establish TCP connections, for instance. And it also leads to the Linux bridge printing messages like: "br-lan: received packet on eth1 with own address as source address ..." Fixes: 2d3f6ccc4ea5 ("batman-adv: Modified forwarding behaviour for multicast packets") Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 251c54ea26fa6029b01a76161a37a12fde5124e4 Author: Borislav Petkov Date: Fri Sep 11 18:17:30 2020 +0200 EDAC/ghes: Check whether the driver is on the safe list correctly With CONFIG_DEBUG_TEST_DRIVER_REMOVE=y, a system would try to probe, unregister and probe again a driver. When ghes_edac is attempted to be loaded on a system which is not on the safe platforms list, ghes_edac_register() would return early. The unregister counterpart ghes_edac_unregister() would still attempt to unregister and exit early at the refcount test, leading to the refcount underflow below. In order to not do *anything* on the unregister path too, reuse the force_load parameter and check it on that path too, before fumbling with the refcount. ghes_edac: ghes_edac_register: entry ghes_edac: ghes_edac_register: return -ENODEV ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 10 PID: 1 at lib/refcount.c:28 refcount_warn_saturate+0xb9/0x100 Modules linked in: CPU: 10 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc4+ #12 Hardware name: GIGABYTE MZ01-CE1-00/MZ01-CE1-00, BIOS F02 08/29/2018 RIP: 0010:refcount_warn_saturate+0xb9/0x100 Code: 82 e8 fb 8f 4d 00 90 0f 0b 90 90 c3 80 3d 55 4c f5 00 00 75 88 c6 05 4c 4c f5 00 01 90 48 c7 c7 d0 8a 10 82 e8 d8 8f 4d 00 90 <0f> 0b 90 90 c3 80 3d 30 4c f5 00 00 0f 85 61 ff ff ff c6 05 23 4c RSP: 0018:ffffc90000037d58 EFLAGS: 00010292 RAX: 0000000000000026 RBX: ffff88840b8da000 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffff8216b24f RDI: 00000000ffffffff RBP: ffff88840c662e00 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000046 R12: 0000000000000000 R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88840ee80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000800002211000 CR4: 00000000003506e0 Call Trace: ghes_edac_unregister ghes_remove platform_drv_remove really_probe driver_probe_device device_driver_attach __driver_attach ? device_driver_attach ? device_driver_attach bus_for_each_dev bus_add_driver driver_register ? bert_init ghes_init do_one_initcall ? rcu_read_lock_sched_held kernel_init_freeable ? rest_init kernel_init ret_from_fork ... ghes_edac: ghes_edac_unregister: FALSE, refcount: -1073741824 Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200911164950.GB19320@zn.tnic commit cd8100f1f3be406a4e0e122e7307ac0fca6d57cc Author: Borislav Petkov Date: Fri Sep 11 12:55:55 2020 +0200 EDAC/ghes: Clear scanned data on unload Commit b972fdba8665 ("EDAC/ghes: Fix NULL pointer dereference in ghes_edac_register()") didn't clear all the information from the scanned system and, more specifically, left ghes_hw.num_dimms to its previous value. On a second load (CONFIG_DEBUG_TEST_DRIVER_REMOVE=y), the driver would use the leftover num_dimms value which is not 0 and thus the 0 check in enumerate_dimms() will get bypassed and it would go directly to the pointer deref: d = &hw->dimms[hw->num_dimms]; which is, of course, NULL: #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] PREEMPT SMP CPU: 7 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc4+ #7 Hardware name: GIGABYTE MZ01-CE1-00/MZ01-CE1-00, BIOS F02 08/29/2018 RIP: 0010:enumerate_dimms.cold+0x7b/0x375 Reset the whole ghes_hw on driver unregister so that no stale values are used on a second system scan. Fixes: b972fdba8665 ("EDAC/ghes: Fix NULL pointer dereference in ghes_edac_register()") Cc: Shiju Jose Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200911164817.GA19320@zn.tnic commit af5ad17854f96a6d3c9775e776bd01ab262672a1 Author: Necip Fazil Yildiran Date: Mon Sep 14 18:01:21 2020 +0300 nvme-tcp: fix kconfig dependency warning when !CRYPTO When NVME_TCP is enabled and CRYPTO is disabled, it results in the following Kbuild warning: WARNING: unmet direct dependencies detected for CRYPTO_CRC32C Depends on [n]: CRYPTO [=n] Selected by [y]: - NVME_TCP [=y] && INET [=y] && BLK_DEV_NVME [=y] The reason is that NVME_TCP selects CRYPTO_CRC32C without depending on or selecting CRYPTO while CRYPTO_CRC32C is subordinate to CRYPTO. Honor the kconfig menu hierarchy to remove kconfig dependency warnings. Fixes: 79fd751d61aa ("nvme: tcp: selects CRYPTO_CRC32C for nvme-tcp") Signed-off-by: Necip Fazil Yildiran Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit ce4cc3133dc72c31bd49ddcf22d0f9eeff47a761 Author: David Milburn Date: Thu Sep 10 16:18:50 2020 -0500 nvme-pci: disable the write zeros command for Intel 600P/P3100 The write zeros command does not work with 4k range. bash-4.4# ./blkdiscard /dev/nvme0n1p2 bash-4.4# strace -efallocate xfs_io -c "fzero 536895488 2048" /dev/nvme0n1p2 fallocate(3, FALLOC_FL_ZERO_RANGE, 536895488, 2048) = 0 +++ exited with 0 +++ bash-4.4# dd bs=1 if=/dev/nvme0n1p2 skip=536895488 count=512 | hexdump -C 00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00000200 bash-4.4# ./blkdiscard /dev/nvme0n1p2 bash-4.4# strace -efallocate xfs_io -c "fzero 536895488 4096" /dev/nvme0n1p2 fallocate(3, FALLOC_FL_ZERO_RANGE, 536895488, 4096) = 0 +++ exited with 0 +++ bash-4.4# dd bs=1 if=/dev/nvme0n1p2 skip=536895488 count=512 | hexdump -C 00000000 5c 61 5c b0 96 21 1b 5e 85 0c 07 32 9c 8c eb 3c |\a\..!.^...2...<| 00000010 4a a2 06 ca 67 15 2d 8e 29 8d a8 a0 7e 46 8c 62 |J...g.-.)...~F.b| 00000020 bb 4c 6c c1 6b f5 ae a5 e4 a9 bc 93 4f 60 ff 7a |.Ll.k.......O`.z| Reported-by: Eric Sandeen Signed-off-by: David Milburn Tested-by: Eric Sandeen Signed-off-by: Christoph Hellwig commit 65dce596e2b839bc324b9543eac99a923eb6d794 Author: Andrii Nakryiko Date: Mon Sep 14 17:50:31 2020 -0700 docs/bpf: Remove source code links Make path to bench_ringbufs.c just a text, not a special link. Fixes: 97abb2b39682 ("docs/bpf: Add BPF ring buffer design notes") Reported-by: Mauro Carvalho Chehab Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200915005031.2748397-1-andriin@fb.com commit 709192d531e5b0a91f20aa14abfe2fc27ddd47af Author: Jan Höppner Date: Mon Sep 14 13:56:47 2020 +0200 s390/dasd: Fix zero write for FBA devices A discard request that writes zeros using the global kernel internal ZERO_PAGE will fail for machines with more than 2GB of memory due to the location of the ZERO_PAGE. Fix this by using a driver owned global zero page allocated with GFP_DMA flag set. Fixes: 28b841b3a7cb ("s390/dasd: Add discard support for FBA devices") Signed-off-by: Jan Höppner Reviewed-by: Stefan Haberland Cc: # 4.14+ Signed-off-by: Jens Axboe commit 2b1667e54caf95e1e4249d9068eea7a3089a5229 Author: Björn Töpel Date: Thu Sep 10 09:56:09 2020 +0200 xsk: Fix number of pinned pages/umem size discrepancy For AF_XDP sockets, there was a discrepancy between the number of of pinned pages and the size of the umem region. The size of the umem region is used to validate the AF_XDP descriptor addresses. The logic that pinned the pages covered by the region only took whole pages into consideration, creating a mismatch between the size and pinned pages. A user could then pass AF_XDP addresses outside the range of pinned pages, but still within the size of the region, crashing the kernel. This change correctly calculates the number of pages to be pinned. Further, the size check for the aligned mode is simplified. Now the code simply checks if the size is divisible by the chunk size. Fixes: bbff2f321a86 ("xsk: new descriptor addressing scheme") Reported-by: Ciara Loftus Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Tested-by: Ciara Loftus Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200910075609.7904-1-bjorn.topel@gmail.com commit 8e1b3ac4786680c2d2b5a24e38a2d714c3bcd1ef Author: Xin Long Date: Sun Sep 13 19:43:03 2020 +0800 net: sched: initialize with 0 before setting erspan md->u In fl_set_erspan_opt(), all bits of erspan md was set 1, as this function is also used to set opt MASK. However, when setting for md->u.index for opt VALUE, the rest bits of the union md->u will be left 1. It would cause to fail the match of the whole md when version is 1 and only index is set. This patch is to fix by initializing with 0 before setting erspan md->u. Reported-by: Shuang Li Fixes: 79b1011cb33d ("net: sched: allow flower to match erspan options") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit ad7b27c9e64afce4ad69020329a3e89f6df4f382 Merge: ff48b6222e65e 681d2cfb79033 Author: David S. Miller Date: Mon Sep 14 16:49:39 2020 -0700 Merge branch 'net-improve-vxlan-option-process-in-net_sched-and-lwtunnel' Xin Long says: ==================== net: improve vxlan option process in net_sched and lwtunnel This patch is to do some mask when setting vxlan option in net_sched and lwtunnel, so that only available bits can be set on vxlan md gbp. This would help when users don't know exactly vxlan's gbp bits, and avoid some mismatch because of some unavailable bits set by users. ==================== Signed-off-by: David S. Miller commit 681d2cfb790339a3e95b98bc140baf1f816a896a Author: Xin Long Date: Sun Sep 13 19:51:51 2020 +0800 lwtunnel: only keep the available bits when setting vxlan md->gbp As we can see from vxlan_build/parse_gbp_hdr(), when processing metadata on vxlan rx/tx path, only dont_learn/policy_applied/policy_id fields can be set to or parse from the packet for vxlan gbp option. So do the mask when set it in lwtunnel, as it does in act_tunnel_key and cls_flower. Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 13e6ce98aa65ab5ce19351c020419360dfe8af29 Author: Xin Long Date: Sun Sep 13 19:51:50 2020 +0800 net: sched: only keep the available bits when setting vxlan md->gbp As we can see from vxlan_build/parse_gbp_hdr(), when processing metadata on vxlan rx/tx path, only dont_learn/policy_applied/policy_id fields can be set to or parse from the packet for vxlan gbp option. So we'd better do the mask when set it in act_tunnel_key and cls_flower. Otherwise, when users don't know these bits, they may configure with a value which can never be matched. Reported-by: Shuang Li Signed-off-by: Xin Long Signed-off-by: David S. Miller commit ff48b6222e65ebdba5a403ef1deba6214e749193 Author: Xin Long Date: Sun Sep 13 19:37:31 2020 +0800 tipc: use skb_unshare() instead in tipc_buf_append() In tipc_buf_append() it may change skb's frag_list, and it causes problems when this skb is cloned. skb_unclone() doesn't really make this skb's flag_list available to change. Shuang Li has reported an use-after-free issue because of this when creating quite a few macvlan dev over the same dev, where the broadcast packets will be cloned and go up to the stack: [ ] BUG: KASAN: use-after-free in pskb_expand_head+0x86d/0xea0 [ ] Call Trace: [ ] dump_stack+0x7c/0xb0 [ ] print_address_description.constprop.7+0x1a/0x220 [ ] kasan_report.cold.10+0x37/0x7c [ ] check_memory_region+0x183/0x1e0 [ ] pskb_expand_head+0x86d/0xea0 [ ] process_backlog+0x1df/0x660 [ ] net_rx_action+0x3b4/0xc90 [ ] [ ] Allocated by task 1786: [ ] kmem_cache_alloc+0xbf/0x220 [ ] skb_clone+0x10a/0x300 [ ] macvlan_broadcast+0x2f6/0x590 [macvlan] [ ] macvlan_process_broadcast+0x37c/0x516 [macvlan] [ ] process_one_work+0x66a/0x1060 [ ] worker_thread+0x87/0xb10 [ ] [ ] Freed by task 3253: [ ] kmem_cache_free+0x82/0x2a0 [ ] skb_release_data+0x2c3/0x6e0 [ ] kfree_skb+0x78/0x1d0 [ ] tipc_recvmsg+0x3be/0xa40 [tipc] So fix it by using skb_unshare() instead, which would create a new skb for the cloned frag and it'll be safe to change its frag_list. The similar things were also done in sctp_make_reassembled_event(), which is using skb_copy(). Reported-by: Shuang Li Fixes: 37e22164a8a3 ("tipc: rename and move message reassembly function") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit bb3a420d47ab00d7e1e5083286cab15235a96680 Author: Peilin Ye Date: Sun Sep 13 04:06:05 2020 -0400 tipc: Fix memory leak in tipc_group_create_member() tipc_group_add_to_tree() returns silently if `key` matches `nkey` of an existing node, causing tipc_group_create_member() to leak memory. Let tipc_group_add_to_tree() return an error in such a case, so that tipc_group_create_member() can handle it properly. Fixes: 75da2163dbb6 ("tipc: introduce communication groups") Reported-and-tested-by: syzbot+f95d90c454864b3b5bc9@syzkaller.appspotmail.com Cc: Hillf Danton Link: https://syzkaller.appspot.com/bug?id=048390604fe1b60df34150265479202f10e13aff Signed-off-by: Peilin Ye Signed-off-by: David S. Miller commit fc4f28bb3daf3265d6bc5f73b497306985bb23ab Merge: 973c096f6a85e 1c78544eaa466 Author: Linus Torvalds Date: Mon Sep 14 15:41:58 2020 -0700 Merge tag 'for-5.9-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "One of the recent lockdep fixes introduced a bug that breaks the search ioctl, which is used by some applications (bees, compsize). The patch made it to stable trees so we need this fixup to make it work again" * tag 'for-5.9-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix wrong address when faulting in pages in the search ioctl commit 880a784344fb8a7c498a1145fb541fe8e8d2040f Author: Ian Rogers Date: Fri Sep 11 19:56:55 2020 -0700 perf test: Leader sampling shouldn't clear sample period Add test that a sibling with leader sampling doesn't have its period cleared. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Athira Jajeev Cc: Daniel Borkmann Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20200912025655.1337192-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3b0a18c1aa6cbfa7b0dd513b6be9893ef6e6ac30 Author: Ian Rogers Date: Fri Sep 11 19:56:54 2020 -0700 perf record: Don't clear event's period if set by a term If events in a group explicitly set a frequency or period with leader sampling, don't disable the samples on those events. Prior to 5.8: perf record -e '{cycles/period=12345000/,instructions/period=6789000/}:S' would clear the attributes then apply the config terms. In commit 5f34278867b7 leader sampling configuration was moved to after applying the config terms, in the example, making the instructions' event have its period cleared. This change makes it so that sampling is only disabled if configuration terms aren't present. Committer testing: Before: # perf record -e '{cycles/period=1/,instructions/period=2/}:S' sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.051 MB perf.data (6 samples) ] # # perf evlist -v cycles/period=1/: size: 120, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|READ|ID, read_format: ID|GROUP, disabled: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 instructions/period=2/: size: 120, config: 0x1, sample_type: IP|TID|TIME|READ|ID, read_format: ID|GROUP, sample_id_all: 1, exclude_guest: 1 # After: # perf record -e '{cycles/period=1/,instructions/period=2/}:S' sleep 0.0001 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.052 MB perf.data (4 samples) ] # perf evlist -v cycles/period=1/: size: 120, { sample_period, sample_freq }: 1, sample_type: IP|TID|TIME|READ|ID, read_format: ID|GROUP, disabled: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1 instructions/period=2/: size: 120, config: 0x1, { sample_period, sample_freq }: 2, sample_type: IP|TID|TIME|READ|ID, read_format: ID|GROUP, sample_id_all: 1, exclude_guest: 1 # Fixes: 5f34278867b7 ("perf evlist: Move leader-sampling configuration") Signed-off-by: Ian Rogers Acked-by: Adrian Hunter Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Athira Jajeev Cc: Daniel Borkmann Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Yonghong Song Link: http://lore.kernel.org/lkml/20200912025655.1337192-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2fa3fc9579c9f7682d832cd1dfdc56f46f4d2b67 Author: Arnaldo Carvalho de Melo Date: Mon Sep 14 19:06:41 2020 -0300 tools headers UAPI: update linux/in.h copy To get the changes from: 645f08975f49441b ("net: Fix some comments") That don't cause any changes in tooling, its just a typo fix. This silences this tools/perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/in.h' differs from latest version at 'include/uapi/linux/in.h' diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h Cc: Adrian Hunter Cc: David S. Miller Cc: Jiri Olsa Cc: Miaohe Lin Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 8d761d2ccc3d41107b7805383a0baeeff05e91c9 Author: Arnaldo Carvalho de Melo Date: Mon Sep 14 19:02:18 2020 -0300 tools headers UAPI: Sync kvm.h headers with the kernel sources To pick the changes in: 15e9e35cd1dec2bc ("KVM: MIPS: Change the definition of kvm type") 004a01241c5a0d37 ("arm64/x86: KVM: Introduce steal-time cap") That do not result in any change in tooling, as the additions are not being used in any table generator. This silences these perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Cc: Adrian Hunter Cc: Andrew Jones Cc: Huacai Chen Cc: Jiri Olsa Cc: Marc Zyngier Cc: Namhyung Kim Cc: Paolo Bonzini Signed-off-by: Arnaldo Carvalho de Melo commit 1869e226a7b3ef75b4f70ede2f1b7229f7157fa4 Author: David Ahern Date: Sun Sep 13 12:43:39 2020 -0600 ipv4: Initialize flowi4_multipath_hash in data path flowi4_multipath_hash was added by the commit referenced below for tunnels. Unfortunately, the patch did not initialize the new field for several fast path lookups that do not initialize the entire flow struct to 0. Fix those locations. Currently, flowi4_multipath_hash is random garbage and affects the hash value computed by fib_multipath_hash for multipath selection. Fixes: 24ba14406c5c ("route: Add multipath_hash in flowi_common to make user-define hash") Signed-off-by: David Ahern Cc: wenxu Signed-off-by: David S. Miller commit 9d6e0c8b707b1f29f3d4e03714a72fffb417d144 Merge: 4202c9fdf03d7 9423361da5235 Author: David S. Miller Date: Mon Sep 14 14:53:15 2020 -0700 Merge branch 'net-lantiq-Fix-bugs-in-NAPI-handling' Hauke Mehrtens says: ==================== net: lantiq: Fix bugs in NAPI handling This fixes multiple bugs in the NAPI handling. Changes since: v1: - removed stable tag from "net: lantiq: use netif_tx_napi_add() for TX NAPI" - Check the NAPI budged in "net: lantiq: Use napi_complete_done()" - Add extra fix "net: lantiq: Disable IRQs only if NAPI gets scheduled" ==================== Signed-off-by: David S. Miller commit 9423361da52356cb68642db5b2729b6b85aad330 Author: Hauke Mehrtens Date: Sat Sep 12 21:36:29 2020 +0200 net: lantiq: Disable IRQs only if NAPI gets scheduled The napi_schedule() call will only schedule the NAPI if it is not already running. To make sure that we do not deactivate interrupts without scheduling NAPI only deactivate the interrupts in case NAPI also gets scheduled. Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit c582a7fea9dad4d309437d1a7e22e6d2cb380e2e Author: Hauke Mehrtens Date: Sat Sep 12 21:36:28 2020 +0200 net: lantiq: Use napi_complete_done() Use napi_complete_done() and activate the interrupts when this function returns true. This way the generic NAPI code can take care of activating the interrupts. Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 74c7b80e222b58d3cea731d31e2a31a77fea8345 Author: Hauke Mehrtens Date: Sat Sep 12 21:36:27 2020 +0200 net: lantiq: use netif_tx_napi_add() for TX NAPI netif_tx_napi_add() should be used for NAPI in the TX direction instead of the netif_napi_add() function. Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit dea36631e6f186d4b853af67a4aef2e35cfa8bb7 Author: Hauke Mehrtens Date: Sat Sep 12 21:36:26 2020 +0200 net: lantiq: Wake TX queue again The call to netif_wake_queue() when the TX descriptors were freed was missing. When there are no TX buffers available the TX queue will be stopped, but it was not started again when they are available again, this is fixed in this patch. Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver") Signed-off-by: Hauke Mehrtens Signed-off-by: David S. Miller commit ae5dcc8abe311ceafd8753fb488e38c4f5e8e699 Author: Stephane Eranian Date: Fri Sep 11 19:56:53 2020 -0700 perf record: Prevent override of attr->sample_period for libpfm4 events Before: $ perf record -c 10000 --pfm-events=cycles:period=77777 Would yield a cycles event with period=10000, instead of 77777. the event string and perf record initializing the event. This was due to an ordering issue between libpfm4 parsing events with attr->sample_period != 0 by the time intent of the author. perf_evsel__config() is invoked. This seems to have been the This patch fixes the problem by preventing override for Signed-off-by: Stephane Eranian Reviewed-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Athira Jajeev Cc: Daniel Borkmann Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Yonghong Song Link: http://lore.kernel.org/lkml/20200912025655.1337192-3-irogers@google.com Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo commit ce4326d2752fd51726be50e94b750d3f74670ae3 Author: David Sharp Date: Fri Sep 11 19:56:52 2020 -0700 perf record: Set PERF_RECORD_PERIOD if attr->freq is set. evsel__config() would only set PERF_RECORD_PERIOD if it set attr->freq from perf record options. When it is set by libpfm events, it would not get set. This changes evsel__config to see if attr->freq is set outside of whether or not it changes attr->freq itself. Signed-off-by: David Sharp Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Athira Jajeev Cc: Daniel Borkmann Cc: Ian Rogers Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Yonghong Song Cc: david sharp Link: http://lore.kernel.org/lkml/20200912025655.1337192-2-irogers@google.com Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo commit 4202c9fdf03d79dedaa94b2c4cf574f25793d669 Author: Olympia Giannou Date: Fri Sep 11 14:17:24 2020 +0000 rndis_host: increase sleep time in the query-response loop Some WinCE devices face connectivity issues via the NDIS interface. They fail to register, resulting in -110 timeout errors and failures during the probe procedure. In this kind of WinCE devices, the Windows-side ndis driver needs quite more time to be loaded and configured, so that the linux rndis host queries to them fail to be responded correctly on time. More specifically, when INIT is called on the WinCE side - no other requests can be served by the Client and this results in a failed QUERY afterwards. The increase of the waiting time on the side of the linux rndis host in the command-response loop leaves the INIT process to complete and respond to a QUERY, which comes afterwards. The WinCE devices with this special "feature" in their ndis driver are satisfied by this fix. Signed-off-by: Olympia Giannou Signed-off-by: David S. Miller commit d2c73501a767514b6c85c7feff9457a165d51057 Author: Ian Rogers Date: Fri Sep 11 22:37:25 2020 -0700 perf bench: Fix 2 memory sanitizer warnings Memory sanitizer warns if a write is performed where the memory being read for the write is uninitialized. Avoid this warning by initializing the memory. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200912053725.1405857-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8a39e8c4d9baf65d88f66d49ac684df381e30055 Author: Jiri Olsa Date: Fri Sep 11 15:00:05 2020 +0200 perf test: Fix the "signal" test inline assembly When compiling with DEBUG=1 on Fedora 32 I'm getting crash for 'perf test signal': Program received signal SIGSEGV, Segmentation fault. 0x0000000000c68548 in __test_function () (gdb) bt #0 0x0000000000c68548 in __test_function () #1 0x00000000004d62e9 in test_function () at tests/bp_signal.c:61 #2 0x00000000004d689a in test__bp_signal (test=0xa8e280 DW_AT_producer : (indirect string, offset: 0x254a): GNU C99 10.2.1 20200723 (Red Hat 10.2.1-1) -mtune=generic -march=x86-64 -ggdb3 -std=gnu99 -fno-omit-frame-pointer -funwind-tables -fstack-protector-all ^^^^^ ^^^^^ ^^^^^ $ Before: $ perf test signal 20: Breakpoint overflow signal handler : FAILED! $ After: $ perf test signal 20: Breakpoint overflow signal handler : Ok $ Fixes: 8fd34e1cce18 ("perf test: Improve bp_signal") Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lore.kernel.org/lkml/20200911130005.1842138-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b6ec413461034d49f9e586845825adb35ba308f6 Author: Kees Cook Date: Fri Sep 11 17:58:26 2020 -0700 core/entry: Report syscall correctly for trace and audit On v5.8 when doing seccomp syscall rewrites (e.g. getpid into getppid as seen in the seccomp selftests), trace (and audit) correctly see the rewritten syscall on entry and exit: seccomp_bpf-1307 [000] .... 22974.874393: sys_enter: NR 110 (... seccomp_bpf-1307 [000] .N.. 22974.874401: sys_exit: NR 110 = 1304 With mainline we see a mismatched enter and exit (the original syscall is incorrectly visible on entry): seccomp_bpf-1030 [000] .... 21.806766: sys_enter: NR 39 (... seccomp_bpf-1030 [000] .... 21.806767: sys_exit: NR 110 = 1027 When ptrace or seccomp change the syscall, this needs to be visible to trace and audit at that time as well. Update the syscall earlier so they see the correct value. Fixes: d88d59b64ca3 ("core/entry: Respect syscall number rewrites") Reported-by: Michael Ellerman Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200912005826.586171-1-keescook@chromium.org commit 4bba9dab86b6ac15ca560ef1f2b5aa4529cbf784 Author: Sven Eckelmann Date: Mon Sep 14 13:58:16 2020 +0200 batman-adv: Add missing include for in_interrupt() The fix for receiving (internally generated) bla packets outside the interrupt context introduced the usage of in_interrupt(). But this functionality is only defined in linux/preempt.h which was not included with the same patch. Fixes: 279e89b2281a ("batman-adv: bla: use netif_rx_ni when not in interrupt context") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 6c77545af100a72bf5e28142b510ba042a17648d Author: Vincent Huang Date: Mon Sep 14 12:19:08 2020 -0700 Input: trackpoint - add new trackpoint variant IDs Add trackpoint variant IDs to allow supported control on Synaptics trackpoints. Signed-off-by: Vincent Huang Link: https://lore.kernel.org/r/20200914120327.2592-1-vincent.huang@tw.synaptics.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit 4aa1615268a8ac2b20096211d3f9ac53874067d7 Author: Jason Gunthorpe Date: Mon Sep 14 15:20:18 2020 -0300 RDMA/core: Fix ordering of CQ pool destruction rxe will hold a refcount on the IB device as long as CQ objects exist, this causes destruction of a rxe device to hang if the CQ pool has any cached CQs since they are being destroyed after the refcount must go to zero. Treat the CQ pool like a client and create/destroy it before/after all other clients. No users of CQ pool can exist past a client remove call. Link: https://lore.kernel.org/r/e8a240aa-9e9b-3dca-062f-9130b787f29b@acm.org Fixes: c7ff819aefea ("RDMA/core: Introduce shared CQ pool API") Tested-by: Bart Van Assche Tested-by: Yi Zhang Signed-off-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 973c096f6a85e5b5f2a295126ba6928d9a6afd45 Author: Linus Torvalds Date: Wed Sep 9 14:53:50 2020 -0700 vgacon: remove software scrollback support Yunhai Zhang recently fixed a VGA software scrollback bug in commit ebfdfeeae8c0 ("vgacon: Fix for missing check in scrollback handling"), but that then made people look more closely at some of this code, and there were more problems on the vgacon side, but also the fbcon software scrollback. We don't really have anybody who maintains this code - probably because nobody actually _uses_ it any more. Sure, people still use both VGA and the framebuffer consoles, but they are no longer the main user interfaces to the kernel, and haven't been for decades, so these kinds of extra features end up bitrotting and not really being used. So rather than try to maintain a likely unused set of code, I'll just aggressively remove it, and see if anybody even notices. Maybe there are people who haven't jumped on the whole GUI badnwagon yet, and think it's just a fad. And maybe those people use the scrollback code. If that turns out to be the case, we can resurrect this again, once we've found the sucker^Wmaintainer for it who actually uses it. Reported-by: NopNop Nop Tested-by: Willy Tarreau Cc: 张云海 Acked-by: Andy Lutomirski Acked-by: Willy Tarreau Reviewed-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds commit 06a0df4d1b8b13b551668e47b11fd7629033b7df Author: Linus Torvalds Date: Tue Sep 8 10:56:27 2020 -0700 fbcon: remove now unusued 'softback_lines' cursor() argument Since the softscroll code got removed, this argument is always zero and makes no sense any more. Tested-by: Yuan Ming Tested-by: Willy Tarreau Reviewed-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds commit 50145474f6ef4a9c19205b173da6264a644c7489 Author: Linus Torvalds Date: Mon Sep 7 11:45:27 2020 -0700 fbcon: remove soft scrollback code This (and the VGA soft scrollback) turns out to have various nasty small special cases that nobody really is willing to fight. The soft scrollback code was really useful a few decades ago when you typically used the console interactively as the main way to interact with the machine, but that just isn't the case any more. So it's not worth dragging along. Tested-by: Yuan Ming Tested-by: Willy Tarreau Acked-by: Bartlomiej Zolnierkiewicz Acked-by: Daniel Vetter Reviewed-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds commit 6200b0ae4ea28a4bfd8eb434e33e6201b7a6a282 Author: Jens Axboe Date: Sun Sep 13 14:38:30 2020 -0600 io_uring: don't run task work on an exiting task This isn't safe, and isn't needed either. We are guaranteed that any work we queue is on a live task (and will be run), or it goes to our backup io-wq threads if the task is exiting. Signed-off-by: Jens Axboe commit 87ceb6a6b81eca000911403446d4c6043b4e4f82 Author: Jens Axboe Date: Mon Sep 14 08:20:12 2020 -0600 io_uring: drop 'ctx' ref on task work cancelation If task_work ends up being marked for cancelation, we go through a cancelation helper instead of the queue path. In converting task_work to always hold a ctx reference, this path was missed. Make sure that io_req_task_cancel() puts the reference that is being held against the ctx. Fixes: 6d816e088c35 ("io_uring: hold 'ctx' reference around task_work queue + execute") Signed-off-by: Jens Axboe commit 1afc0c89f6a155c54c76d65ffcf72cd1232daf3a Author: Yicong Yang Date: Fri Sep 4 15:47:20 2020 +0800 Revert "mtd: spi-nor: Add capability to disable flash quad mode" As the only user has been removed in previous patch, let's revert this one together. This reverts commit be192209d5a33c912caa4a05d6f92b89328d8db8. Reported-by: Matthias Weisser Suggested-by: Vignesh Raghavendra Signed-off-by: Yicong Yang Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/1599205640-26690-2-git-send-email-yangyicong@hisilicon.com commit 7d90a9b2693a753abfc7034eacea5bbcbb566560 Author: Yicong Yang Date: Fri Sep 4 15:47:19 2020 +0800 Revert "mtd: spi-nor: Disable the flash quad mode in spi_nor_restore()" Previous patch intends to restore the flash's QE bit when removed/shutdown, but may have some problems and break the flash: - for those originally in Quad mode, this patch will clear the QE bit when unloaded the flash, which is incorrect. - even with above problem solved, it may still break the flash as some flash's QE bit is non-volatile and lots of set/reset will wear out the bit. - the restore method cannot be proved to be valid as if a hard reset or accident crash happened, the spi_nor_restore() won't be performed the the QE bit will not be restored as we expected to. So let's revert it to fix this. The discussion can be found at [1]. This reverts commit cc59e6bb6cd69d3347c06ccce088c5c6052e041e. [1] https://lore.kernel.org/linux-mtd/CAO8h3eFLVLRmw7u+rurKsg7=Nh2q-HVq-HgVXig8gf5Dffk8MA@mail.gmail.com/ Reported-by: Matthias Weisser Suggested-by: Vignesh Raghavendra Signed-off-by: Yicong Yang Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/1599205640-26690-1-git-send-email-yangyicong@hisilicon.com commit 1c78544eaa4660096aeb6a57ec82b42cdb3bfe5a Author: Filipe Manana Date: Mon Sep 14 09:01:04 2020 +0100 btrfs: fix wrong address when faulting in pages in the search ioctl When faulting in the pages for the user supplied buffer for the search ioctl, we are passing only the base address of the buffer to the function fault_in_pages_writeable(). This means that after the first iteration of the while loop that searches for leaves, when we have a non-zero offset, stored in 'sk_offset', we try to fault in a wrong page range. So fix this by adding the offset in 'sk_offset' to the base address of the user supplied buffer when calling fault_in_pages_writeable(). Several users have reported that the applications compsize and bees have started to operate incorrectly since commit a48b73eca4ceb9 ("btrfs: fix potential deadlock in the search ioctl") was added to stable trees, and these applications make heavy use of the search ioctls. This fixes their issues. Link: https://lore.kernel.org/linux-btrfs/632b888d-a3c3-b085-cdf5-f9bb61017d92@lechevalier.se/ Link: https://github.com/kilobyte/compsize/issues/34 Fixes: a48b73eca4ceb9 ("btrfs: fix potential deadlock in the search ioctl") CC: stable@vger.kernel.org # 4.4+ Tested-by: A L Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 129134e5415d46f38b9978b3809af94ed649b57d Author: Sergey Senozhatsky Date: Fri Sep 11 05:07:58 2020 +0200 media: media/v4l2: remove V4L2_FLAG_MEMORY_NON_CONSISTENT flag The patch partially reverts some of the UAPI bits of the buffer cache management hints. Namely, the queue consistency (memory coherency) user-space hint because, as it turned out, the kernel implementation of this feature was misusing DMA_ATTR_NON_CONSISTENT. The patch reverts both kernel and user space parts: removes the DMA consistency attr functions, rolls back changes to v4l2_requestbuffers, v4l2_create_buffers structures and corresponding UAPI functions (plus compat32 layer) and cleans up the documentation. [hverkuil: fixed a few typos in the commit log] [hverkuil: fixed vb2_core_reqbufs call in drivers/media/dvb-core/dvb_vb2.c] [mchehab: fixed a typo in the commit log: revers->reverts] Signed-off-by: Christoph Hellwig Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 911e1987efc8f3e6445955fbae7f54b428b92bd3 Author: Michael Kelley Date: Sun Sep 13 12:47:29 2020 -0700 Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload vmbus_wait_for_unload() looks for a CHANNELMSG_UNLOAD_RESPONSE message coming from Hyper-V. But if the message isn't found for some reason, the panic path gets hung forever. Add a timeout of 10 seconds to prevent this. Fixes: 415719160de3 ("Drivers: hv: vmbus: avoid scheduling in interrupt context in vmbus_initiate_unload()") Signed-off-by: Michael Kelley Reviewed-by: Dexuan Cui Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/1600026449-23651-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 14801c624066a55139c2c57963eb1b859d0a316a Author: Geert Uytterhoeven Date: Mon Sep 14 11:42:43 2020 +0200 mmc: mmc_spi: Fix mmc_spi_dma_alloc() return type for !HAS_DMA If CONFIG_NO_DMA=y (e.g. Sun-3 allmodconfig): drivers/mmc/host/mmc_spi.c:1323:15: warning: return type defaults to ‘int’ [-Wreturn-type] static inline mmc_spi_dma_alloc(struct mmc_spi_host *host) { return 0; } ^~~~~~~~~~~~~~~~~ Fix this by adding the missing return type. Fixes: a395acf0f6dc6409 ("mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200914094243.3912-1-geert@linux-m68k.org Signed-off-by: Ulf Hansson commit 09e43968db40c33a73e9ddbfd937f46d5c334924 Author: Arvind Sankar Date: Tue Aug 11 20:43:08 2020 -0400 x86/boot/compressed: Disable relocation relaxation The x86-64 psABI [0] specifies special relocation types (R_X86_64_[REX_]GOTPCRELX) for indirection through the Global Offset Table, semantically equivalent to R_X86_64_GOTPCREL, which the linker can take advantage of for optimization (relaxation) at link time. This is supported by LLD and binutils versions 2.26 onwards. The compressed kernel is position-independent code, however, when using LLD or binutils versions before 2.27, it must be linked without the -pie option. In this case, the linker may optimize certain instructions into a non-position-independent form, by converting foo@GOTPCREL(%rip) to $foo. This potential issue has been present with LLD and binutils-2.26 for a long time, but it has never manifested itself before now: - LLD and binutils-2.26 only relax movq foo@GOTPCREL(%rip), %reg to leaq foo(%rip), %reg which is still position-independent, rather than mov $foo, %reg which is permitted by the psABI when -pie is not enabled. - GCC happens to only generate GOTPCREL relocations on mov instructions. - CLang does generate GOTPCREL relocations on non-mov instructions, but when building the compressed kernel, it uses its integrated assembler (due to the redefinition of KBUILD_CFLAGS dropping -no-integrated-as), which has so far defaulted to not generating the GOTPCRELX relocations. Nick Desaulniers reports [1,2]: "A recent change [3] to a default value of configuration variable (ENABLE_X86_RELAX_RELOCATIONS OFF -> ON) in LLVM now causes Clang's integrated assembler to emit R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX relocations. LLD will relax instructions with these relocations based on whether the image is being linked as position independent or not. When not, then LLD will relax these instructions to use absolute addressing mode (R_RELAX_GOT_PC_NOPIC). This causes kernels built with Clang and linked with LLD to fail to boot." Patch series [4] is a solution to allow the compressed kernel to be linked with -pie unconditionally, but even if merged is unlikely to be backported. As a simple solution that can be applied to stable as well, prevent the assembler from generating the relaxed relocation types using the -mrelax-relocations=no option. For ease of backporting, do this unconditionally. [0] https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/linker-optimization.tex#L65 [1] https://lore.kernel.org/lkml/20200807194100.3570838-1-ndesaulniers@google.com/ [2] https://github.com/ClangBuiltLinux/linux/issues/1121 [3] https://reviews.llvm.org/rGc41a18cf61790fc898dcda1055c3efbf442c14c0 [4] https://lore.kernel.org/lkml/20200731202738.2577854-1-nivedita@alum.mit.edu/ Reported-by: Nick Desaulniers Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Acked-by: Ard Biesheuvel Reviewed-by: Nick Desaulniers Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200812004308.1448603-1-nivedita@alum.mit.edu commit 28284943ac94014767ecc2f7b3c5747c4a5617a0 Author: Zhenyu Wang Date: Mon Sep 14 11:03:02 2020 +0800 drm/i915/gvt: Fix port number for BDW on EDID region setup Current BDW virtual display port is initialized as PORT_B, so need to use same port for VFIO EDID region, otherwise invalid EDID blob pointer is assigned which caused kernel null pointer reference. We might evaluate actual display hotplug for BDW to make this function work as expected, anyway this is always required to be fixed first. Reported-by: Alejandro Sior Cc: Alejandro Sior Fixes: 0178f4ce3c3b ("drm/i915/gvt: Enable vfio edid for all GVT supported platform") Reviewed-by: Hang Yuan Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200914030302.2775505-1-zhenyuw@linux.intel.com commit cd4d3d5f21ddbfae3f686ac0ff405f21f7847ad3 Author: Janosch Frank Date: Tue Sep 8 09:05:04 2020 -0400 s390: add 3f program exception handler Program exception 3f (secure storage violation) can only be detected when the CPU is running in SIE with a format 4 state description, e.g. running a protected guest. Because of this and because user space partly controls the guest memory mapping and can trigger this exception, we want to send a SIGSEGV to the process running the guest and not panic the kernel. Signed-off-by: Janosch Frank Cc: # 5.7 Fixes: 084ea4d611a3 ("s390/mm: add (non)secure page access exceptions handlers") Reviewed-by: Claudio Imbrenda Reviewed-by: Cornelia Huck Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 73ac74c7d489756d2313219a108809921dbfaea1 Author: Sven Schnelle Date: Thu Sep 10 12:24:53 2020 +0200 lockdep: fix order in trace_hardirqs_off_caller() Switch order so that locking state is consistent even if the IRQ tracer calls into lockdep again. Acked-by: Peter Zijlstra Signed-off-by: Sven Schnelle Signed-off-by: Vasily Gorbik commit afdf9550e54627fcf4dd609bdc1153059378cdf5 Author: Niklas Schnelle Date: Thu Sep 3 13:42:57 2020 +0200 s390/pci: fix leak of DMA tables on hard unplug commit f606b3ef47c9 ("s390/pci: adapt events for zbus") removed the zpci_disable_device() call for a zPCI event with PEC 0x0304 because the device is already deconfigured by the platform. This however skips the Linux side of the disable in particular it leads to leaking the DMA tables and bitmaps because zpci_dma_exit_device() is never called on the device. If the device transitions to the Reserved state we call zpci_zdev_put() but zpci_release_device() will not call zpci_disable_device() because the state of the zPCI function is already ZPCI_FN_STATE_STANDBY. If the device is put into the Standby state, zpci_disable_device() is not called and the device is assumed to have been put in Standby through platform action. At this point the device may be removed by a subsequent event with PEC 0x0308 or 0x0306 which calls zpci_zdev_put() with the same problem as above or the device may be configured again in which case zpci_disable_device() is also not called. Fix this by calling zpci_disable_device() explicitly for PEC 0x0304 as before. To make it more clear that zpci_disable_device() may be called, even if the lower level device has already been disabled by the platform, add a comment to zpci_disable_device(). Cc: # 5.8 Fixes: f606b3ef47c9 ("s390/pci: adapt events for zbus") Signed-off-by: Niklas Schnelle Signed-off-by: Vasily Gorbik commit fcb2b70cdb194157678fb1a75f9ff499aeba3d2a Author: Ilya Leoshkevich Date: Wed Sep 9 14:27:25 2020 +0200 s390/init: add missing __init annotations Add __init to reserve_memory_end, reserve_oldmem and remove_oldmem. Sometimes these functions are not inlined, and then the build complains about section mismatch. Signed-off-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit b6186d7fb53349efd274263a45f0b08749ccaa2d Author: Harald Freudenberger Date: Wed Sep 9 11:59:43 2020 +0200 s390/zcrypt: fix kmalloc 256k failure Tests showed that under stress conditions the kernel may temporary fail to allocate 256k with kmalloc. However, this fix reworks the related code in the cca_findcard2() function to use kvmalloc instead. Signed-off-by: Harald Freudenberger Reviewed-by: Ingo Franzki Cc: Stable Signed-off-by: Vasily Gorbik commit ca589ea8d1b64938329c016a5c07fc2eea985712 Author: Peter Zijlstra Date: Tue Sep 8 15:30:31 2020 +0200 s390/idle: fix suspicious RCU usage After commit eb1f00237aca ("lockdep,trace: Expose tracepoints") the lock tracepoints are visible to lockdep and RCU-lockdep is finding a bunch more RCU violations that were previously hidden. Switch the idle->seqcount over to using raw_write_*() to avoid the lockdep annotation and thus the lock tracepoints. Reported-by: Guenter Roeck Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit f20d4e924b4465822c4a35290b85aadf88ddf466 Author: Collin Walling Date: Thu Jun 25 11:07:23 2020 -0400 docs: kvm: add documentation for KVM_CAP_S390_DIAG318 Documentation for the s390 DIAGNOSE 0x318 instruction handling. Signed-off-by: Collin Walling Reviewed-by: Cornelia Huck Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/kvm/20200625150724.10021-2-walling@linux.ibm.com/ Message-Id: <20200625150724.10021-2-walling@linux.ibm.com> Signed-off-by: Christian Borntraeger commit 811a6e18a8633ef66c6c9bad09f359dd9daa9ec1 Author: Jean Delvare Date: Tue Sep 1 15:28:37 2020 +0200 i2c: i801: Simplify the suspend callback We don't actually need to derive the PCI device from the device structure, as we already have a pointer to it in our private data structure. Signed-off-by: Jean Delvare Signed-off-by: Wolfram Sang commit 66d402e2e9455cf0213c42b97f22a0493372d7cc Author: Volker Rümelin Date: Tue Sep 1 15:22:21 2020 +0200 i2c: i801: Fix resume bug On suspend the original host configuration gets restored. The resume routine has to undo this, otherwise the SMBus master may be left in disabled state or in i2c mode. [JD: Rebased on v5.8, moved the write into i801_setup_hstcfg.] Signed-off-by: Volker Rümelin Signed-off-by: Jean Delvare Signed-off-by: Wolfram Sang Cc: stable@vger.kernel.org commit 1a1d6db23ddacde0b15ea589e9103373e05af8de Author: Eddie James Date: Wed Sep 9 15:30:57 2020 -0500 i2c: aspeed: Mask IRQ status to relevant bits Mask the IRQ status to only the bits that the driver checks. This prevents excessive driver warnings when operating in slave mode when additional bits are set that the driver doesn't handle. Signed-off-by: Eddie James Reviewed-by: Tao Ren Signed-off-by: Wolfram Sang commit b0cfc315ff38c423a5ce9ce159bd5baa4135e688 Author: Rich Felker Date: Fri Aug 28 21:01:41 2020 -0400 sh: fix syscall tracing Addition of SECCOMP_FILTER exposed a longstanding bug in do_syscall_trace_enter, whereby r0 (the 5th argument register) was mistakenly used where r3 (syscall_nr) was intended. By overwriting r0 rather than r3 with -1 when attempting to block a syscall, the existing code would instead have caused the syscall to execute with an argument clobbered. Commit 0bb605c2c7f2b4b3 then introduced skipping of the syscall when do_syscall_trace_enter returns -1, so that the return value set by seccomp filters would not be clobbered by -ENOSYS. This eliminated the clobbering of the 5th argument register, but instead caused syscalls made with a 5th argument of -1 to be misinterpreted as a request by do_syscall_trace_enter to suppress the syscall. Fixes: 0bb605c2c7f2b4b3 ("sh: Add SECCOMP_FILTER") Fixes: ab99c733ae73cce3 ("sh: Make syscall tracer use tracehook notifiers, add TIF_NOTIFY_RESUME.") Tested-by: John Paul Adrian Glaubitz Signed-off-by: Rich Felker commit ca6345de57a46ba1bd35bd15b0ceb42e05b3d71f Author: Rich Felker Date: Wed Sep 2 13:40:17 2020 -0400 sh: remove spurious circular inclusion from asm/smp.h Commit 0cd39f4600ed4de8 added inclusion of smp.h to lockdep.h, creating a circular include dependency where arch/sh's asm/smp.h in turn includes spinlock.h which depends on lockdep.h. Since our asm/smp.h does not actually need spinlock.h, just remove it. Fixes: 0cd39f4600ed4de8 ("locking/seqlock, headers: Untangle the spaghetti monster") Tested-by: Rob Landley Signed-off-by: Rich Felker commit 856deb866d16e29bd65952e0289066f6078af773 Author: Linus Torvalds Date: Sun Sep 13 16:06:00 2020 -0700 Linux 5.9-rc5 commit 5712c3ed549e0dddee096bce24df41db15cb80b5 Merge: e4c26faa426c1 a4da411e41892 Author: Linus Torvalds Date: Sun Sep 13 14:54:40 2020 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Olof Johansson: "A collection of fixes I've been accruing over the last few weeks, none of them have been severe enough to warrant flushing the queue but it's been long enough now that it's a good idea to send them in. A handful of them are fixups for QSPI DT/bindings/compatibles, some smaller fixes for system DMA clock control and TMU interrupts on i.MX, a handful of fixes for OMAP, including a fix for DSI (display) on omap5" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (27 commits) arm64: dts: ns2: Fixed QSPI compatible string ARM: dts: BCM5301X: Fixed QSPI compatible string ARM: dts: NSP: Fixed QSPI compatible string ARM: dts: bcm: HR2: Fixed QSPI compatible string dt-bindings: spi: Fix spi-bcm-qspi compatible ordering ARM: dts: imx6sx: fix the pad QSPI1B_SCLK mux mode for uart3 arm64: dts: imx8mp: correct sdma1 clk setting arm64: dts: imx8mq: Fix TMU interrupt property ARM: dts: imx7d-zii-rmu2: fix rgmii phy-mode for ksz9031 phy ARM: dts: vfxxx: Add syscon compatible with OCOTP ARM: dts: imx6q-logicpd: Fix broken PWM arm64: dts: imx: Add missing imx8mm-beacon-kit.dtb to build ARM: dts: imx6q-prtwd2: Remove unneeded i2c unit name ARM: dts: imx6qdl-gw51xx: Remove unneeded #address-cells/#size-cells ARM: dts: imx7ulp: Correct gpio ranges ARM: dts: ls1021a: fix QuadSPI-memory reg range arm64: defconfig: Enable ptn5150 extcon driver arm64: defconfig: Enable USB gadget with configfs ARM: configs: Update Integrator defconfig ARM: dts: omap5: Fix DSI base address and clocks ... commit 202700e18acbed55970dbb9d4d518ac59b1172c8 Author: Jens Axboe Date: Sat Sep 12 13:18:10 2020 -0600 io_uring: grab any needed state during defer prep Always grab work environment for deferred links. The assumption that we will be running it always from the task in question is false, as exiting tasks may mean that we're deferring this one to a thread helper. And at that point it's too late to grab the work environment. Fixes: debb85f496c9 ("io_uring: factor out grab_env() from defer_prep()") Signed-off-by: Jens Axboe commit e4c26faa426c17274884f759f708bc9ee22fd59a Merge: 6c7247f6258b2 a29c0adbb688d Author: Linus Torvalds Date: Sun Sep 13 09:23:54 2020 -0700 Merge tag 'usb-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/Thunderbolt fixes from Greg KH: "Here are some small USB and Thunderbolt driver fixes for 5.9-rc5. Nothing huge, just a number of bugfixes and new device ids for problems reported: - new USB serial driver ids - bug fixes for syzbot reported problems - typec driver fixes - thunderbolt driver fixes - revert of reported broken commit All of these have been in linux-next with no reported issues" * tag 'usb-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes usb: typec: intel_pmc_mux: Do not configure Altmode HPD High usb: core: fix slab-out-of-bounds Read in read_descriptors Revert "usb: dwc3: meson-g12a: fix shared reset control use" usb: typec: ucsi: acpi: Check the _DEP dependencies usb: typec: intel_pmc_mux: Un-register the USB role switch usb: Fix out of sync data toggle if a configured device is reconfigured USB: serial: option: support dynamic Quectel USB compositions USB: serial: option: add support for SIM7070/SIM7080/SIM7090 modules thunderbolt: Use maximum USB3 link rate when reclaiming if link is not up thunderbolt: Disable ports that are not implemented USB: serial: ftdi_sio: add IDs for Xsens Mti USB converter commit 6c7247f6258b2dba353c885a1b00d795a380cc85 Merge: 20a7b6be05143 a139ffa40f0c2 Author: Linus Torvalds Date: Sun Sep 13 09:15:20 2020 -0700 Merge tag 'staging-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO driver fixes from Greg KH: "Here are a number of staging and IIO driver fixes for 5.9-rc5. The majority of these are IIO driver fixes, to resolve a timestamp issue that was recently found to affect a bunch of IIO drivers. The other fixes in here are: - small IIO driver fixes - greybus driver fix - counter driver fix (came in through the IIO fixes tree) All of these have been in linux-next for a while with no reported issues" * tag 'staging-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (23 commits) iio: adc: mcp3422: fix locking on error path iio: adc: mcp3422: fix locking scope iio: adc: meson-saradc: Use the parent device to look up the calib data iio:adc:max1118 Fix alignment of timestamp and data leak issues iio:adc:ina2xx Fix timestamp alignment issue. iio:adc:ti-adc084s021 Fix alignment and data leak issues. iio:adc:ti-adc081c Fix alignment and data leak issues iio:magnetometer:ak8975 Fix alignment and data leak issues. iio:light:ltr501 Fix timestamp alignment issue. iio:light:max44000 Fix timestamp alignment and prevent data leak. iio:chemical:ccs811: Fix timestamp alignment and prevent data leak. iio:proximity:mb1232: Fix timestamp alignment and prevent data leak. iio:accel:mma7455: Fix timestamp alignment and prevent data leak. iio:accel:bmc150-accel: Fix timestamp alignment and prevent data leak. iio:accel:mma8452: Fix timestamp alignment and prevent data leak. iio: accel: kxsd9: Fix alignment of local buffer. iio: adc: rockchip_saradc: select IIO_TRIGGERED_BUFFER iio: adc: ti-ads1015: fix conversion when CONFIG_PM is not set counter: microchip-tcb-capture: check the correct variable iio: cros_ec: Set Gyroscope default frequency to 25Hz ... commit 20a7b6be0514334a30a4306331a4bcf6f78e451a Merge: 2a1a4bee5ef27 baaabecfc80fa Author: Linus Torvalds Date: Sun Sep 13 09:02:59 2020 -0700 Merge tag 'driver-core-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are some small driver core and debugfs fixes for 5.9-rc5 Included in here are: - firmware loader memory leak fix - firmware loader testing fixes for non-EFI systems - device link locking fixes found by lockdep - kobject_del() bugfix that has been affecting some callers - debugfs minor fix All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: test_firmware: Test platform fw loading on non-EFI systems PM: : fix @em_pd kernel-doc warning kobject: Drop unneeded conditional in __kobject_del() driver core: Fix device_pm_lock() locking for device links MAINTAINERS: Add the security document to SECURITY CONTACT driver code: print symbolic error code debugfs: Fix module state check condition kobject: Restore old behaviour of kobject_del(NULL) firmware_loader: fix memory leak for paged buffer commit a4da411e41892628f35aa180a78b7b0f8f1e3038 Merge: 2aedcb042fb80 686e0a0c8c61e Author: Olof Johansson Date: Sun Sep 13 08:57:37 2020 -0700 Merge tag 'arm-soc/for-5.9/devicetree-fixes' of https://github.com/Broadcom/stblinux into arm/fixes This pull request contains Broadcom ARM-based SoCs Device Tree fixes for 5.9, please pull the following: - Florian fixes the Broadcom QSPI controller binding such that the most specific compatible string is the left most one, and all existing in-tree users are updated as well. * tag 'arm-soc/for-5.9/devicetree-fixes' of https://github.com/Broadcom/stblinux: arm64: dts: ns2: Fixed QSPI compatible string ARM: dts: BCM5301X: Fixed QSPI compatible string ARM: dts: NSP: Fixed QSPI compatible string ARM: dts: bcm: HR2: Fixed QSPI compatible string dt-bindings: spi: Fix spi-bcm-qspi compatible ordering Link: https://lore.kernel.org/r/20200909211857.4144718-1-f.fainelli@gmail.com Signed-off-by: Olof Johansson commit 2aedcb042fb80d9f60b780f07e900565028910b7 Merge: 0e384029e1532 3ee99f6a2379e Author: Olof Johansson Date: Sun Sep 13 08:56:03 2020 -0700 Merge tag 'imx-fixes-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.9, round 2: - Fix the misspelling of 'interrupts' property in i.MX8MQ TMU DT node. - Correct 'ahb' clock for i.MX8MP SDMA1 in device tree. - Fix pad QSPI1B_SCLK mux mode for UART3 on i.MX6SX. * tag 'imx-fixes-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx6sx: fix the pad QSPI1B_SCLK mux mode for uart3 arm64: dts: imx8mp: correct sdma1 clk setting arm64: dts: imx8mq: Fix TMU interrupt property Link: https://lore.kernel.org/r/20200909143844.GA25109@dragon Signed-off-by: Olof Johansson commit 0e384029e1532157e6a382d6bb8562628370bde0 Merge: 9c8b0a9c37b75 6542e2b613c2b Author: Olof Johansson Date: Sun Sep 13 08:54:01 2020 -0700 Merge tag 'omap-for-v5.9/fixes-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Fixes for omaps for v5.9-rc cycle Few fixes for omap based devices: - Fix of_clk_get() error handling for omap-iommu - Fix missing audio pinctrl entries for logicpd boards - Fix video for logicpd-som-lv after switch to generic panels - Fix omap5 DSI clocks base * tag 'omap-for-v5.9/fixes-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: omap5: Fix DSI base address and clocks ARM: dts: logicpd-som-lv-baseboard: Fix missing video ARM: dts: logicpd-som-lv-baseboard: Fix broken audio ARM: dts: logicpd-torpedo-baseboard: Fix broken audio ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm() Link: https://lore.kernel.org/r/pull-1599132064-54898@atomide.com Signed-off-by: Olof Johansson commit 2a1a4bee5ef277c7dc2906d9268db61478876288 Merge: 84b1349972129 952e934d7f682 Author: Linus Torvalds Date: Sun Sep 13 08:52:21 2020 -0700 Merge tag 'char-misc-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc driver fixes from Greg KH: "Here are a number of small driver fixes for 5.9-rc5 Included in here are: - habanalabs driver fixes - interconnect driver fixes - soundwire driver fixes - dyndbg fixes for reported issues, and then reverts to fix it all up to a sane state. - phy driver fixes All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: Revert "dyndbg: accept query terms like file=bar and module=foo" Revert "dyndbg: fix problem parsing format="foo bar"" scripts/tags.sh: exclude tools directory from tags generation video: fbdev: fix OOB read in vga_8planes_imageblit() dyndbg: fix problem parsing format="foo bar" dyndbg: refine export, rename to dynamic_debug_exec_queries() dyndbg: give %3u width in pr-format, cosmetic only interconnect: qcom: Fix small BW votes being truncated to zero soundwire: fix double free of dangling pointer interconnect: Show bandwidth for disabled paths as zero in debugfs habanalabs: fix report of RAZWI initiator coordinates habanalabs: prevent user buff overflow phy: omap-usb2-phy: disable PHY charger detect phy: qcom-qmp: Use correct values for ipq8074 PCIe Gen2 PHY init soundwire: bus: fix typo in comment on INTSTAT registers phy: qualcomm: fix return value check in qcom_ipq806x_usb_phy_probe() phy: qualcomm: fix platform_no_drv_owner.cocci warnings commit 84b1349972129918557b7593c37ae52855bdc2e8 Merge: b952e974300be 37f66bbef0920 Author: Linus Torvalds Date: Sun Sep 13 08:34:47 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "A bit on the bigger side, mostly due to me being on vacation, then busy, then on parental leave, but there's nothing worrisome. ARM: - Multiple stolen time fixes, with a new capability to match x86 - Fix for hugetlbfs mappings when PUD and PMD are the same level - Fix for hugetlbfs mappings when PTE mappings are enforced (dirty logging, for example) - Fix tracing output of 64bit values x86: - nSVM state restore fixes - Async page fault fixes - Lots of small fixes everywhere" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (25 commits) KVM: emulator: more strict rsm checks. KVM: nSVM: more strict SMM checks when returning to nested guest SVM: nSVM: setup nested msr permission bitmap on nested state load SVM: nSVM: correctly restore GIF on vmexit from nesting after migration x86/kvm: don't forget to ACK async PF IRQ x86/kvm: properly use DEFINE_IDTENTRY_SYSVEC() macro KVM: VMX: Don't freeze guest when event delivery causes an APIC-access exit KVM: SVM: avoid emulation with stale next_rip KVM: x86: always allow writing '0' to MSR_KVM_ASYNC_PF_EN KVM: SVM: Periodically schedule when unregistering regions on destroy KVM: MIPS: Change the definition of kvm type kvm x86/mmu: use KVM_REQ_MMU_SYNC to sync when needed KVM: nVMX: Fix the update value of nested load IA32_PERF_GLOBAL_CTRL control KVM: fix memory leak in kvm_io_bus_unregister_dev() KVM: Check the allocation of pv cpu mask KVM: nVMX: Update VMCS02 when L2 PAE PDPTE updates detected KVM: arm64: Update page shift if stage 2 block mapping not supported KVM: arm64: Fix address truncation in traces KVM: arm64: Do not try to map PUDs when they are folded into PMD arm64/x86: KVM: Introduce steal-time cap ... commit ed888cb0d1ebce69f12794e89fbd5e2c86d40b8d Author: Marc Zyngier Date: Fri Sep 11 19:16:11 2020 +0100 arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late Now that we allow CPUs affected by erratum 1418040 to come in late, this prevents their unaffected sibblings from coming in late (or coming back after a suspend or hotplug-off, which amounts to the same thing). To allow this, we need to add ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU, which amounts to set .type to ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE. Fixes: bf87bb0881d0 ("arm64: Allow booting of late CPUs affected by erratum 1418040") Reported-by: Matthias Kaehlcke Signed-off-by: Marc Zyngier Tested-by: Sai Prakash Ranjan Tested-by: Matthias Kaehlcke Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200911181611.2073183-1-maz@kernel.org Signed-off-by: Catalin Marinas commit b952e974300be3184049a125e7cba112fe659017 Merge: ef2e9a563b0cd d877322bc1adc Author: Linus Torvalds Date: Sat Sep 12 13:03:49 2020 -0700 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC fixes from Stafford Horne: "Fixes for compile issues pointed out by kbuild and one bug I found in initrd with the 5.9 patches" * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: Fix issue with get_user for 64-bit values openrisc: Fix cache API compile issue when not inlining openrisc: Reserve memblock for initrd commit ef2e9a563b0cd7965e2a1263125dcbb1c86aa6cc Merge: 4f8b0a5b3f7e5 e839317900e9f Author: Linus Torvalds Date: Sat Sep 12 12:58:01 2020 -0700 Merge tag 'seccomp-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp fixes from Kees Cook: "This fixes a rare race condition in seccomp when using TSYNC and USER_NOTIF together where a memory allocation would not get freed (found by syzkaller, fixed by Tycho). Additionally updates Tycho's MAINTAINERS and .mailmap entries for his new address" * tag 'seccomp-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: seccomp: don't leave dangling ->notif if file allocation fails mailmap, MAINTAINERS: move to tycho.pizza seccomp: don't leak memory when filter install races commit 4f8b0a5b3f7e5f03b188de9025b60c15559790f9 Merge: edf6b0e1e4ddb 6180bb446ab62 Author: Linus Torvalds Date: Sat Sep 12 12:43:58 2020 -0700 Merge tag 'libnvdimm-fix-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Vishal Verma: "Fix detection of dax support for block devices. Previous fixes in this area, which only affected printing of debug messages, had an incorrect condition for detection of dax. This fix should finally do the right thing" * tag 'libnvdimm-fix-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: fix detection of dax support for non-persistent memory block devices commit edf6b0e1e4ddb12e022ce0c17829bad6d4161ea7 Merge: 5a3c558a9f05f 2d892ccdc163a Author: Linus Torvalds Date: Sat Sep 12 12:28:39 2020 -0700 Merge tag 'for-5.9-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more fixes: - regression fix for a crash after failed snapshot creation - one more lockep fix: use nofs allocation when allocating missing device - fix reloc tree leak on degraded mount - make some extent buffer alignment checks less strict to mount filesystems created by btrfs-convert" * tag 'for-5.9-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix NULL pointer dereference after failure to create snapshot btrfs: free data reloc tree on failed mount btrfs: require only sector size alignment for parent eb bytenr btrfs: fix lockdep splat in add_missing_dev commit 5a3c558a9f05f4664f569b06f04d6b217785fd21 Merge: 729e3d0919844 01ec372cef1e5 Author: Linus Torvalds Date: Sat Sep 12 11:48:04 2020 -0700 Merge tag '5.9-rc4-smb3-fix' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fix from Steve French: "A fix for lookup on DFS link when cifsacl or modefromsid is used" * tag '5.9-rc4-smb3-fix' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix DFS mount with cifsacl/modefromsid commit 37f66bbef0920429b8cb5eddba849ec4308a9f8e Author: Maxim Levitsky Date: Thu Aug 27 20:11:44 2020 +0300 KVM: emulator: more strict rsm checks. Don't ignore return values in rsm_load_state_64/32 to avoid loading invalid state from SMM state area if it was tampered with by the guest. This is primarly intended to avoid letting guest set bits in EFER (like EFER.SVME when nesting is disabled) by manipulating SMM save area. Signed-off-by: Maxim Levitsky Message-Id: <20200827171145.374620-8-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 3ebb5d2617fbf45567975f878232178c5b292d58 Author: Maxim Levitsky Date: Thu Aug 27 19:27:20 2020 +0300 KVM: nSVM: more strict SMM checks when returning to nested guest * check that guest is 64 bit guest, otherwise the SVM related fields in the smm state area are not defined * If the SMM area indicates that SMM interrupted a running guest, check that EFER.SVME which is also saved in this area is set, otherwise the guest might have tampered with SMM save area, and so indicate emulation failure which should triple fault the guest. * Check that that guest CPUID supports SVM (due to the same issue as above) Signed-off-by: Maxim Levitsky Message-Id: <20200827162720.278690-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 772b81bb2f9b191a046ba7bba1f232eb7b109b84 Author: Maxim Levitsky Date: Thu Aug 27 19:27:19 2020 +0300 SVM: nSVM: setup nested msr permission bitmap on nested state load This code was missing and was forcing the L2 run with L1's msr permission bitmap Signed-off-by: Maxim Levitsky Message-Id: <20200827162720.278690-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 9883764ad0ce037c554ac0ef302dcf671f8d1ccb Author: Maxim Levitsky Date: Thu Aug 27 19:27:18 2020 +0300 SVM: nSVM: correctly restore GIF on vmexit from nesting after migration Currently code in svm_set_nested_state copies the current vmcb control area to L1 control area (hsave->control), under assumption that it mostly reflects the defaults that kvm choose, and later qemu overrides these defaults with L2 state using standard KVM interfaces, like KVM_SET_REGS. However nested GIF (which is AMD specific thing) is by default is true, and it is copied to hsave area as such. This alone is not a big deal since on VMexit, GIF is always set to false, regardless of what it was on VM entry. However in nested_svm_vmexit we were first were setting GIF to false, but then we overwrite the control fields with value from the hsave area. (including the nested GIF field itself if GIF virtualization is enabled). Now on normal vm entry this is not a problem, since GIF is usually false prior to normal vm entry, and this is the value that copied to hsave, and then restored, but this is not always the case when the nested state is loaded as explained above. To fix this issue, move svm_set_gif after we restore the L1 control state in nested_svm_vmexit, so that even with wrong GIF in the saved L1 control area, we still clear GIF as the spec says. Signed-off-by: Maxim Levitsky Message-Id: <20200827162720.278690-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 63c3212e7a37d68c89a13bdaebce869f4e064e67 Author: Chris Packham Date: Tue Sep 8 09:17:10 2020 +1200 pinctrl: mvebu: Fix i2c sda definition for 98DX3236 Per the datasheet the i2c functions use MPP_Sel=0x1. They are documented as using MPP_Sel=0x4 as well but mixing 0x1 and 0x4 is clearly wrong. On the board tested 0x4 resulted in a non-functioning i2c bus so stick with 0x1 which works. Fixes: d7ae8f8dee7f ("pinctrl: mvebu: pinctrl driver for 98DX3236 SoC") Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20200907211712.9697-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Linus Walleij commit 3c68e90fdb65d7884e34d2f0bf900cdc76ba0192 Merge: d012a7190fc1f 5fcface659aab Author: Linus Walleij Date: Sat Sep 12 13:13:58 2020 +0200 Merge tag 'gpio-fixes-for-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into fixes gpio fixes for v5.9-rc4 - fix warnings if PM is enabled in gpio-omap - clear interrupt when setting the type as edge in gpio-sprd commit d877322bc1adcab9850732275670409e8bcca4c4 Author: Stafford Horne Date: Thu Sep 3 05:54:40 2020 +0900 openrisc: Fix issue with get_user for 64-bit values A build failure was raised by kbuild with the following error. drivers/android/binder.c: Assembler messages: drivers/android/binder.c:3861: Error: unrecognized keyword/register name `l.lwz ?ap,4(r24)' drivers/android/binder.c:3866: Error: unrecognized keyword/register name `l.addi ?ap,r0,0' The issue is with 64-bit get_user() calls on openrisc. I traced this to a problem where in the internally in the get_user macros there is a cast to long __gu_val this causes GCC to think the get_user call is 32-bit. This binder code is really long and GCC allocates register r30, which triggers the issue. The 64-bit get_user asm tries to get the 64-bit pair register, which for r30 overflows the general register names and returns the dummy register ?ap. The fix here is to move the temporary variables into the asm macros. We use a 32-bit __gu_tmp for 32-bit and smaller macro and a 64-bit tmp in the 64-bit macro. The cast in the 64-bit macro has a trick of casting through __typeof__((x)-(x)) which avoids the below warning. This was barrowed from riscv. arch/openrisc/include/asm/uaccess.h:240:8: warning: cast to pointer from integer of different size I tested this in a small unit test to check reading between 64-bit and 32-bit pointers to 64-bit and 32-bit values in all combinations. Also I ran make C=1 to confirm no new sparse warnings came up. It all looks clean to me. Link: https://lore.kernel.org/lkml/202008200453.ohnhqkjQ%25lkp@intel.com/ Signed-off-by: Stafford Horne Reviewed-by: Luc Van Oostenryck commit cc17b22559d9b9c8b7540810df172f3d7af901ce Author: Vitaly Kuznetsov Date: Tue Sep 8 15:53:50 2020 +0200 x86/kvm: don't forget to ACK async PF IRQ Merge commit 26d05b368a5c0 ("Merge branch 'kvm-async-pf-int' into HEAD") tried to adapt the new interrupt based async PF mechanism to the newly introduced IDTENTRY magic but unfortunately it missed the fact that DEFINE_IDTENTRY_SYSVEC() doesn't call ack_APIC_irq() on its own and all DEFINE_IDTENTRY_SYSVEC() users have to call it manually. As the result all multi-CPU KVM guest hang on boot when KVM_FEATURE_ASYNC_PF_INT is present. The breakage went unnoticed because no KVM userspace (e.g. QEMU) currently set it (and thus async PF mechanism is currently disabled) but we're about to change that. Fixes: 26d05b368a5c0 ("Merge branch 'kvm-async-pf-int' into HEAD") Signed-off-by: Vitaly Kuznetsov Message-Id: <20200908135350.355053-3-vkuznets@redhat.com> Tested-by: Ingo Molnar Signed-off-by: Paolo Bonzini commit 244081f9073fe934adbcb2db6496b91b8fc51655 Author: Vitaly Kuznetsov Date: Tue Sep 8 15:53:49 2020 +0200 x86/kvm: properly use DEFINE_IDTENTRY_SYSVEC() macro DEFINE_IDTENTRY_SYSVEC() already contains irqentry_enter()/ irqentry_exit(). Signed-off-by: Vitaly Kuznetsov Message-Id: <20200908135350.355053-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 99b82a1437cb31340dbb2c437a2923b9814a7b15 Author: Wanpeng Li Date: Wed Aug 19 16:55:27 2020 +0800 KVM: VMX: Don't freeze guest when event delivery causes an APIC-access exit According to SDM 27.2.4, Event delivery causes an APIC-access VM exit. Don't report internal error and freeze guest when event delivery causes an APIC-access exit, it is handleable and the event will be re-injected during the next vmentry. Signed-off-by: Wanpeng Li Message-Id: <1597827327-25055-2-git-send-email-wanpengli@tencent.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit e42c68281b444f9a20d72a062f8c6fd0d31e4de8 Author: Wanpeng Li Date: Sat Sep 12 02:16:39 2020 -0400 KVM: SVM: avoid emulation with stale next_rip svm->next_rip is reset in svm_vcpu_run() only after calling svm_exit_handlers_fastpath(), which will cause SVM's skip_emulated_instruction() to write a stale RIP. We can move svm_exit_handlers_fastpath towards the end of svm_vcpu_run(). To align VMX with SVM, keep svm_complete_interrupts() close as well. Suggested-by: Sean Christopherson Cc: Paul K. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Wanpeng Li [Also move vmcb_mark_all_clean before any possible write to the VMCB. - Paolo] commit 5760d9acbe9514eec68eb70821d6fa5764f57042 Author: Grygorii Strashko Date: Thu Sep 10 23:52:29 2020 +0300 net: ethernet: ti: cpsw_new: fix suspend/resume Add missed suspend/resume callbacks to properly restore networking after suspend/resume cycle. Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac") Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit c047dc1d260f2593035d63747d616c3512f9d6b6 Author: Vadym Kochan Date: Thu Sep 10 18:41:52 2020 +0300 net: ipa: fix u32_replace_bits by u32p_xxx version Looks like u32p_replace_bits() should be used instead of u32_replace_bits() which does not modifies the value but returns the modified version. Fixes: 2b9feef2b6c2 ("soc: qcom: ipa: filter and routing tables") Signed-off-by: Vadym Kochan Reviewed-by: Alex Elder Signed-off-by: David S. Miller commit a1b80e0143a1b878f8e21d82fd55f3f46f0014be Author: Luo bin Date: Thu Sep 10 22:04:40 2020 +0800 hinic: fix rewaking txq after netif_tx_disable When calling hinic_close in hinic_set_channels, all queues are stopped after netif_tx_disable, but some queue may be rewaken in free_tx_poll by mistake while drv is handling tx irq. If one queue is rewaken core may call hinic_xmit_frame to send pkt after netif_tx_disable within a short time which may results in accessing memory that has been already freed in hinic_close. So we call napi_disable before netif_tx_disable in hinic_close to fix this bug. Fixes: 2eed5a8b614b ("hinic: add set_channels ethtool_ops support") Signed-off-by: Luo bin Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit b5b73b26b3ca34574124ed7ae9c5ba8391a7f176 Author: Vinicius Costa Gomes Date: Wed Sep 9 17:03:11 2020 -0700 taprio: Fix allowing too small intervals It's possible that the user specifies an interval that couldn't allow any packet to be transmitted. This also avoids the issue of the hrtimer handler starving the other threads because it's running too often. The solution is to reject interval sizes that according to the current link speed wouldn't allow any packet to be transmitted. Reported-by: syzbot+8267241609ae8c23b248@syzkaller.appspotmail.com Fixes: 5a781ccbd19e ("tc: Add support for configuring the taprio scheduler") Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit 53467ecb6f38d7cbd86359ff1c8958b8b568dc57 Merge: cdb0e6dccc1fd 4406e977a4a1e Author: David S. Miller Date: Fri Sep 11 17:17:16 2020 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2020-09-09 This series contains updates to i40e and igc drivers. Stefan Assmann changes num_vlans to u16 to fix may be used uninitialized error and propagates error in i40_set_vsi_promisc() for i40e. Vinicius corrects timestamping latency values for i225 devices and accounts for TX timestamping delay for igc. ==================== Signed-off-by: David S. Miller commit cdb0e6dccc1fd0f7096d333d90cad0ac81c2b342 Author: Claudiu Manoil Date: Fri Sep 11 13:16:35 2020 +0300 enetc: Fix mdio bus removal on PF probe bailout This is the correct resolution for the conflict from merging the "net" tree fix: commit 26cb7085c898 ("enetc: Remove the mdio bus on PF probe bailout") with the "net-next" new work: commit 07095c025ac2 ("net: enetc: Use DT protocol information to set up the ports") that moved mdio bus allocation to an ealier stage of the PF probing routine. Fixes: a57066b1a019 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net") Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit 729e3d091984487f7aa1ebfabfe594e5b317ed0f Merge: e9287bd248160 f44d04e696fea Author: Linus Torvalds Date: Fri Sep 11 13:47:29 2020 -0700 Merge tag 'ceph-for-5.9-rc5' of git://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "Add missing capability checks in rbd, marked for stable" * tag 'ceph-for-5.9-rc5' of git://github.com/ceph/ceph-client: rbd: require global CAP_SYS_ADMIN for mapping and unmapping commit e9287bd248160880ff9476eea705fa47f75c6136 Merge: 566e24eeb498a 0a355aeb24081 Author: Linus Torvalds Date: Fri Sep 11 13:43:05 2020 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: "Usual driver bugfixes for the I2C subsystem" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: algo: pca: Reapply i2c bus settings after reset i2c: npcm7xx: Fix timeout calculation misc: eeprom: at24: register nvmem only after eeprom is ready to use commit 66d18dbda8469a944dfec6c49d26d5946efba218 Author: Palmer Dabbelt Date: Mon Aug 24 17:21:22 2020 -0700 RISC-V: Take text_mutex in ftrace_init_nop() Without this we get lockdep failures. They're spurious failures as SMP isn't up when ftrace_init_nop() is called. As far as I can tell the easiest fix is to just take the lock, which also seems like the safest fix. Signed-off-by: Palmer Dabbelt Acked-by: Guo Ren Signed-off-by: Palmer Dabbelt commit 566e24eeb498a5352cd79dc03788401bac9212c6 Merge: 7b8731d9589d5 d64e6906d188f Author: Linus Torvalds Date: Fri Sep 11 11:59:14 2020 -0700 Merge tag 'pm-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix three pieces of documentation and add new CPU IDs to the Intel RAPL power capping driver. Specifics: - Add CPU IDs of the TigerLake Desktop, RocketLake and AlderLake chips to the Intel RAPL power capping driver (Zhang Rui). - Add the missing energy model performance domain item to the struct device kerneldoc comment (Randy Dunlap). - Fix the struct powercap_control_type kerneldoc comment to match the actual definition of that structure and add missing item to the struct powercap_zone_ops kerneldoc comment (Amit Kucheria)" * tag 'pm-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: powercap: make documentation reflect code PM: : fix @em_pd kernel-doc warning powercap/intel_rapl: add support for AlderLake powercap/intel_rapl: add support for RocketLake powercap/intel_rapl: add support for TigerLake Desktop commit 7b8731d9589d569912d6418213890963f1b32e40 Merge: e8878ab825450 fd04358e0196f Author: Linus Torvalds Date: Fri Sep 11 11:55:28 2020 -0700 Merge tag 'block-5.9-2020-09-11' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Fix a regression in bdev partition locking (Christoph) - NVMe pull request from Christoph: - cancel async events before freeing them (David Milburn) - revert a broken race fix (James Smart) - fix command processing during resets (Sagi Grimberg) - Fix a kyber crash with requeued flushes (Omar) - Fix __bio_try_merge_page() same_page error for no merging (Ritesh) * tag 'block-5.9-2020-09-11' of git://git.kernel.dk/linux-block: block: Set same_page to false in __bio_try_merge_page if ret is false nvme-fabrics: allow to queue requests for live queues block: only call sched requeue_request() for scheduled requests nvme-tcp: cancel async events before freeing event struct nvme-rdma: cancel async events before freeing event struct nvme-fc: cancel async events before freeing event struct nvme: Revert: Fix controller creation races with teardown flow block: restore a specific error code in bdev_del_partition commit e8878ab825450c9ac07a0fc22e1f66fdb62b4f72 Merge: 8b6ce2517797e c170a5a3b6944 Author: Linus Torvalds Date: Fri Sep 11 11:35:55 2020 -0700 Merge tag 'spi-fix-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "There's some driver specific fixes here plus one core fix for memory leaks that could be triggered by a potential race condition when cleaning up after we have split transfers to fit into what the controller can support" * tag 'spi-fix-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: stm32: fix pm_runtime_get_sync() error checking spi: Fix memory leak on splited transfers spi: spi-cadence-quadspi: Fix mapping of buffers for DMA reads spi: stm32: Rate-limit the 'Communication suspended' message spi: spi-loopback-test: Fix out-of-bounds read spi: spi-cadence-quadspi: Populate get_name() interface MAINTAINERS: add myself as maintainer for spi-fsl-dspi driver commit 8b6ce2517797efa216115630a12d7cb076bb936c Merge: 063d6a4ce378c 59ae97a7a9e14 Author: Linus Torvalds Date: Fri Sep 11 11:25:55 2020 -0700 Merge tag 'regulator-fix-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "The biggest set of fixes here is those from Michał Mirosław fixing some locking issues with coupled regulators that are triggered in cases where a coupled regulator is used by a device involved in fs_reclaim like eMMC storage. These are relatively serious for the affected systems, though the circumstances where they trigger are very rare" * tag 'regulator-fix-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: pwm: Fix machine constraints application regulator: core: Fix slab-out-of-bounds in regulator_unlock_recursive() regulator: remove superfluous lock in regulator_resolve_coupling() regulator: cleanup regulator_ena_gpio_free() regulator: plug of_node leak in regulator_register()'s error path regulator: push allocation in set_consumer_device_supply() out of lock regulator: push allocations in create_regulator() outside of lock regulator: push allocation in regulator_ena_gpio_request() out of lock regulator: push allocation in regulator_init_coupling() outside of lock regulator: fix spelling mistake "Cant" -> "Can't" regulator: cros-ec-regulator: Add NULL test for devm_kmemdup call commit d831de177217cd494bfb99f2c849a0d40c2a7890 Author: Vitaly Kuznetsov Date: Fri Sep 11 11:31:47 2020 +0200 KVM: x86: always allow writing '0' to MSR_KVM_ASYNC_PF_EN Even without in-kernel LAPIC we should allow writing '0' to MSR_KVM_ASYNC_PF_EN as we're not enabling the mechanism. In particular, QEMU with 'kernel-irqchip=off' fails to start a guest with qemu-system-x86_64: error: failed to set MSR 0x4b564d02 to 0x0 Fixes: 9d3c447c72fb2 ("KVM: X86: Fix async pf caused null-ptr-deref") Reported-by: Dr. David Alan Gilbert Signed-off-by: Vitaly Kuznetsov Message-Id: <20200911093147.484565-1-vkuznets@redhat.com> [Actually commit the version proposed by Sean Christopherson. - Paolo] Signed-off-by: Paolo Bonzini commit 7be74942f184fdfba34ddd19a0d995deb34d4a03 Author: David Rientjes Date: Tue Aug 25 12:56:28 2020 -0700 KVM: SVM: Periodically schedule when unregistering regions on destroy There may be many encrypted regions that need to be unregistered when a SEV VM is destroyed. This can lead to soft lockups. For example, on a host running 4.15: watchdog: BUG: soft lockup - CPU#206 stuck for 11s! [t_virtual_machi:194348] CPU: 206 PID: 194348 Comm: t_virtual_machi RIP: 0010:free_unref_page_list+0x105/0x170 ... Call Trace: [<0>] release_pages+0x159/0x3d0 [<0>] sev_unpin_memory+0x2c/0x50 [kvm_amd] [<0>] __unregister_enc_region_locked+0x2f/0x70 [kvm_amd] [<0>] svm_vm_destroy+0xa9/0x200 [kvm_amd] [<0>] kvm_arch_destroy_vm+0x47/0x200 [<0>] kvm_put_kvm+0x1a8/0x2f0 [<0>] kvm_vm_release+0x25/0x30 [<0>] do_exit+0x335/0xc10 [<0>] do_group_exit+0x3f/0xa0 [<0>] get_signal+0x1bc/0x670 [<0>] do_signal+0x31/0x130 Although the CLFLUSH is no longer issued on every encrypted region to be unregistered, there are no other changes that can prevent soft lockups for very large SEV VMs in the latest kernel. Periodically schedule if necessary. This still holds kvm->lock across the resched, but since this only happens when the VM is destroyed this is assumed to be acceptable. Signed-off-by: David Rientjes Message-Id: Signed-off-by: Paolo Bonzini commit 15e9e35cd1dec2bc138464de6bf8ef828df19235 Author: Huacai Chen Date: Thu Sep 10 18:33:51 2020 +0800 KVM: MIPS: Change the definition of kvm type MIPS defines two kvm types: #define KVM_VM_MIPS_TE 0 #define KVM_VM_MIPS_VZ 1 In Documentation/virt/kvm/api.rst it is said that "You probably want to use 0 as machine type", which implies that type 0 be the "automatic" or "default" type. And, in user-space libvirt use the null-machine (with type 0) to detect the kvm capability, which returns "KVM not supported" on a VZ platform. I try to fix it in QEMU but it is ugly: https://lists.nongnu.org/archive/html/qemu-devel/2020-08/msg05629.html And Thomas Huth suggests me to change the definition of kvm type: https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03281.html So I define like this: #define KVM_VM_MIPS_AUTO 0 #define KVM_VM_MIPS_VZ 1 #define KVM_VM_MIPS_TE 2 Since VZ and TE cannot co-exists, using type 0 on a TE platform will still return success (so old user-space tools have no problems on new kernels); the advantage is that using type 0 on a VZ platform will not return failure. So, the only problem is "new user-space tools use type 2 on old kernels", but if we treat this as a kernel bug, we can backport this patch to old stable kernels. Signed-off-by: Huacai Chen Message-Id: <1599734031-28746-1-git-send-email-chenhc@lemote.com> Signed-off-by: Paolo Bonzini commit 063d6a4ce378ca248d48d700220e5f18d8969554 Merge: d67f2ec1f5fed f0c393e2104e4 Author: Linus Torvalds Date: Fri Sep 11 10:19:27 2020 -0700 Merge tag 'mmc-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - sdio: Restore ~20% performance drop for SDHCI drivers, by using mmc_pre_req() and mmc_post_req() for SDIO requests. MMC host: - sdhci-of-esdhc: Fix support for erratum eSDHC7 - mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset - sdhci-msm: Use retries to fix tuning - sdhci-acpi: Fix resume for eMMC HS400 mode" * tag 'mmc-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdio: Use mmc_pre_req() / mmc_post_req() mmc: sdhci-of-esdhc: Don't walk device-tree on every interrupt mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset mmc: sdhci-msm: Add retries when all tuning phases are found valid mmc: sdhci-acpi: Clear amd_sdhci_host on reset commit f6f6195b888c28a0b59ceb0562daff92a2be86c3 Author: Lai Jiangshan Date: Wed Sep 2 21:54:21 2020 +0800 kvm x86/mmu: use KVM_REQ_MMU_SYNC to sync when needed When kvm_mmu_get_page() gets a page with unsynced children, the spt pagetable is unsynchronized with the guest pagetable. But the guest might not issue a "flush" operation on it when the pagetable entry is changed from zero or other cases. The hypervisor has the responsibility to synchronize the pagetables. KVM behaved as above for many years, But commit 8c8560b83390 ("KVM: x86/mmu: Use KVM_REQ_TLB_FLUSH_CURRENT for MMU specific flushes") inadvertently included a line of code to change it without giving any reason in the changelog. It is clear that the commit's intention was to change KVM_REQ_TLB_FLUSH -> KVM_REQ_TLB_FLUSH_CURRENT, so we don't needlessly flush other contexts; however, one of the hunks changed a nearby KVM_REQ_MMU_SYNC instead. This patch changes it back. Link: https://lore.kernel.org/lkml/20200320212833.3507-26-sean.j.christopherson@intel.com/ Cc: Sean Christopherson Cc: Vitaly Kuznetsov Signed-off-by: Lai Jiangshan Message-Id: <20200902135421.31158-1-jiangshanlai@gmail.com> fixes: 8c8560b83390 ("KVM: x86/mmu: Use KVM_REQ_TLB_FLUSH_CURRENT for MMU specific flushes") Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit c6b177a3beb9140dc0ba05b61c5142fcec5f2bf7 Author: Chenyi Qiang Date: Fri Aug 28 16:56:21 2020 +0800 KVM: nVMX: Fix the update value of nested load IA32_PERF_GLOBAL_CTRL control A minor fix for the update of VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL field in exit_ctls_high. Fixes: 03a8871add95 ("KVM: nVMX: Expose load IA32_PERF_GLOBAL_CTRL VM-{Entry,Exit} control") Signed-off-by: Chenyi Qiang Reviewed-by: Xiaoyao Li Message-Id: <20200828085622.8365-5-chenyi.qiang@intel.com> Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit f65886606c2d3b562716de030706dfe1bea4ed5e Author: Rustam Kovhaev Date: Mon Sep 7 11:55:35 2020 -0700 KVM: fix memory leak in kvm_io_bus_unregister_dev() when kmalloc() fails in kvm_io_bus_unregister_dev(), before removing the bus, we should iterate over all other devices linked to it and call kvm_iodevice_destructor() for them Fixes: 90db10434b16 ("KVM: kvm_io_bus_unregister_dev() should never fail") Cc: stable@vger.kernel.org Reported-and-tested-by: syzbot+f196caa45793d6374707@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=f196caa45793d6374707 Signed-off-by: Rustam Kovhaev Reviewed-by: Vitaly Kuznetsov Message-Id: <20200907185535.233114-1-rkovhaev@gmail.com> Signed-off-by: Paolo Bonzini commit 0f990222108d214a0924d920e6095b58107d7b59 Author: Haiwei Li Date: Tue Sep 1 19:41:37 2020 +0800 KVM: Check the allocation of pv cpu mask check the allocation of per-cpu __pv_cpu_mask. Initialize ops only when successful. Signed-off-by: Haiwei Li Message-Id: Signed-off-by: Paolo Bonzini commit 43fea4e42599c3eb4109996698f5c25761d3f815 Author: Peter Shier Date: Thu Aug 20 16:05:45 2020 -0700 KVM: nVMX: Update VMCS02 when L2 PAE PDPTE updates detected When L2 uses PAE, L0 intercepts of L2 writes to CR0/CR3/CR4 call load_pdptrs to read the possibly updated PDPTEs from the guest physical address referenced by CR3. It loads them into vcpu->arch.walk_mmu->pdptrs and sets VCPU_EXREG_PDPTR in vcpu->arch.regs_dirty. At the subsequent assumed reentry into L2, the mmu will call vmx_load_mmu_pgd which calls ept_load_pdptrs. ept_load_pdptrs sees VCPU_EXREG_PDPTR set in vcpu->arch.regs_dirty and loads VMCS02.GUEST_PDPTRn from vcpu->arch.walk_mmu->pdptrs[]. This all works if the L2 CRn write intercept always resumes L2. The resume path calls vmx_check_nested_events which checks for exceptions, MTF, and expired VMX preemption timers. If vmx_check_nested_events finds any of these conditions pending it will reflect the corresponding exit into L1. Live migration at this point would also cause a missed immediate reentry into L2. After L1 exits, vmx_vcpu_run calls vmx_register_cache_reset which clears VCPU_EXREG_PDPTR in vcpu->arch.regs_dirty. When L2 next resumes, ept_load_pdptrs finds VCPU_EXREG_PDPTR clear in vcpu->arch.regs_dirty and does not load VMCS02.GUEST_PDPTRn from vcpu->arch.walk_mmu->pdptrs[]. prepare_vmcs02 will then load VMCS02.GUEST_PDPTRn from vmcs12->pdptr0/1/2/3 which contain the stale values stored at last L2 exit. A repro of this bug showed L2 entering triple fault immediately due to the bad VMCS02.GUEST_PDPTRn values. When L2 is in PAE paging mode add a call to ept_load_pdptrs before leaving L2. This will update VMCS02.GUEST_PDPTRn if they are dirty in vcpu->arch.walk_mmu->pdptrs[]. Tested: kvm-unit-tests with new directed test: vmx_mtf_pdpte_test. Verified that test fails without the fix. Also ran Google internal VMM with an Ubuntu 16.04 4.4.0-83 guest running a custom hypervisor with a 32-bit Windows XP L2 guest using PAE. Prior to fix would repro readily. Ran 14 simultaneous L2s for 140 iterations with no failures. Signed-off-by: Peter Shier Reviewed-by: Jim Mattson Message-Id: <20200820230545.2411347-1-pshier@google.com> Signed-off-by: Paolo Bonzini commit 1b67fd086dd7be076f190dfe4b52403d0cf58375 Merge: b5331379bc626 7b75cd5128421 Author: Paolo Bonzini Date: Fri Sep 11 13:12:11 2020 -0400 Merge tag 'kvmarm-fixes-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for Linux 5.9, take #1 - Multiple stolen time fixes, with a new capability to match x86 - Fix for hugetlbfs mappings when PUD and PMD are the same level - Fix for hugetlbfs mappings when PTE mappings are enforced (dirty logging, for example) - Fix tracing output of 64bit values commit d67f2ec1f5fed849d9773cd783ea161df842bbae Merge: b1df2a0783f3d 7f7a47952c0f9 Author: Linus Torvalds Date: Fri Sep 11 10:10:27 2020 -0700 Merge tag 'drm-fixes-2020-09-11' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular fixes, not much a major amount. One thing though is Laurent fixed some Kconfig issues, and I'm carrying the rapidio kconfig change so the drm one for xlnx driver works. He hadn't got a response from rapidio maintainers. Otherwise, virtio, sun4i, tve200, ingenic have some fixes, one audio fix for i915 and a core docs fix. kconfig: - rapidio/xlnx kconfig fix core: - Documentation fix i915: - audio regression fix virtio: - Fix double free in virtio - Fix virtio unblank - Remove output->enabled from virtio, as it should use crtc_state sun4i: - Add missing put_device in sun4i, and other fixes - Handle sun4i alpha on lowest plane correctly tv200: - Fix tve200 enable/disable ingenic - Small ingenic fixes" * tag 'drm-fixes-2020-09-11' of git://anongit.freedesktop.org/drm/drm: drm/i915: fix regression leading to display audio probe failure on GLK drm: xlnx: dpsub: Fix DMADEVICES Kconfig dependency rapidio: Replace 'select' DMAENGINES 'with depends on' drm/virtio: drop virtio_gpu_output->enabled drm/sun4i: backend: Disable alpha on the lowest plane on the A20 drm/sun4i: backend: Support alpha property on lowest plane drm/sun4i: Fix DE2 YVU handling drm/tve200: Stabilize enable/disable dma-buf: fence-chain: Document missing dma_fence_chain_init() parameter in kerneldoc dma-buf: Fix kerneldoc of dma_buf_set_name() drm/virtio: fix unblank Documentation: fix dma-buf.rst underline length warning drm/sun4i: Fix dsi dcs long write function drm/ingenic: Fix driver not probing when IPU port is missing drm/ingenic: Fix leak of device_node pointer drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux() drm/virtio: Revert "drm/virtio: Call the right shmem helpers" commit b1df2a0783f3d80d6d37102eb90f06727113c7dc Merge: 40249c6962075 0b089c1ef7047 Author: Linus Torvalds Date: Fri Sep 11 10:02:36 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "A number of driver bug fixes and a few recent regressions: - Several bug fixes for bnxt_re. Crashing, incorrect data reported, and corruption on new HW - Memory leak and crash in rxe - Fix sysfs corruption in rxe if the netdev name is too long - Fix a crash on error unwind in the new cq_pool code - Fix kobject panics in rtrs by working device lifetime properly - Fix a data corruption bug in iser target related to misaligned buffers" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/isert: Fix unaligned immediate-data handling RDMA/rtrs-srv: Set .release function for rtrs srv device during device init RDMA/bnxt_re: Remove set but not used variable 'qplib_ctx' RDMA/core: Fix reported speed and width RDMA/core: Fix unsafe linked list traversal after failing to allocate CQ RDMA/bnxt_re: Remove the qp from list only if the qp destroy succeeds RDMA/bnxt_re: Fix driver crash on unaligned PSN entry address RDMA/bnxt_re: Restrict the max_gids to 256 RDMA/bnxt_re: Static NQ depth allocation RDMA/bnxt_re: Fix the qp table indexing RDMA/bnxt_re: Do not report transparent vlan from QP1 RDMA/mlx4: Read pkey table length instead of hardcoded value RDMA/rxe: Fix panic when calling kmem_cache_create() RDMA/rxe: Fix memleak in rxe_mem_init_user RDMA/rxe: Fix the parent sysfs read when the interface has 15 chars RDMA/rtrs-srv: Replace device_register with device_initialize and device_add commit 40249c6962075c040fd071339acae524f18bfac9 Author: Peter Oberparleiter Date: Thu Sep 10 14:52:01 2020 +0200 gcov: add support for GCC 10.1 Using gcov to collect coverage data for kernels compiled with GCC 10.1 causes random malfunctions and kernel crashes. This is the result of a changed GCOV_COUNTERS value in GCC 10.1 that causes a mismatch between the layout of the gcov_info structure created by GCC profiling code and the related structure used by the kernel. Fix this by updating the in-kernel GCOV_COUNTERS value. Also re-enable config GCOV_KERNEL for use with GCC 10. Reported-by: Colin Ian King Reported-by: Leon Romanovsky Signed-off-by: Peter Oberparleiter Tested-by: Leon Romanovsky Tested-and-Acked-by: Colin Ian King Signed-off-by: Linus Torvalds commit 8949b6660c3c7947a9b696c97eb85a32abe4a2d7 Merge: fc19d559b0d31 1a5ce48fd6671 Author: Takashi Iwai Date: Fri Sep 11 18:26:04 2020 +0200 Merge tag 'asoc-fix-v5.9-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.9 Most of this is various driver specific fixes, none of which are terribly exciting in themselves, plus one core fix adding and using a new DAI lookup function to deal with a lockdep warning. commit d64e6906d188f0ba6a4f82b3f42e0bd0598183fa Merge: 95035eac76329 cc88b78c0870e Author: Rafael J. Wysocki Date: Fri Sep 11 16:46:01 2020 +0200 Merge branch 'powercap' * powercap: powercap: make documentation reflect code powercap/intel_rapl: add support for AlderLake powercap/intel_rapl: add support for RocketLake powercap/intel_rapl: add support for TigerLake Desktop commit 505623a2be48b36de533951ced130876a76a2d55 Author: Vladimir Oltean Date: Thu Sep 10 15:15:32 2020 +0300 spi: spi-fsl-dspi: use XSPI mode instead of DMA for DPAA2 SoCs The arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi device tree lacks DMA channels for DSPI, so naturally, the driver fails to probe: [ 2.945302] fsl-dspi 2100000.spi: rx dma channel not available [ 2.951134] fsl-dspi 2100000.spi: can't get dma channels In retrospect, this should have been obvious, because LS2080A, LS2085A LS2088A and LX2160A don't appear to have an eDMA module at all. Looking again at their datasheets, the CTARE register (which is specific to XSPI functionality) seems to be documented, so switch them to XSPI mode instead. Fixes: 0feaf8f5afe0 ("spi: spi-fsl-dspi: Convert the instantiations that support it to DMA") Reported-by: Qiang Zhao Tested-by: Qiang Zhao Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20200910121532.1138596-1-olteanv@gmail.com Signed-off-by: Mark Brown commit fde6dedfb794ec8a89c3c980a245a2e43dad2411 Author: Andrii Nakryiko Date: Thu Sep 10 15:52:45 2020 -0700 docs/bpf: Fix ringbuf documentation Remove link to litmus tests that didn't make it to upstream. Fix ringbuf benchmark link. I wasn't able to test this with `make htmldocs`, unfortunately, because of Sphinx dependencies. But bench_ringbufs.c path is certainly correct now. Fixes: 97abb2b39682 ("docs/bpf: Add BPF ring buffer design notes") Reported-by: Mauro Carvalho Chehab Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200910225245.2896991-1-andriin@fb.com commit 7f7a47952c0f981f9c9a6409c8cf8d025d55af64 Merge: 7bf23bfb0d787 fc7f148feb897 Author: Dave Airlie Date: Fri Sep 11 09:48:43 2020 +1000 Merge tag 'drm-misc-fixes-2020-09-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.9-rc5: - Fix double free in virtio. - Add missing put_device in sun4i, and other fixes. - Small ingenic fixes. - Handle sun4i alpha on lowest plane correctly. - Remove output->enabled from virtio, as it should use crtc_state. - Fix tve200 enable/disable. - Documentation fix. - Fix virtio unblank. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/478b49d1-b1b3-c983-7056-8a89249be435@mblankhorst.nl commit 7bf23bfb0d7870d042460d31540bc03ceb2800c7 Merge: f9c88aa50b26d 0c4c801b31f89 Author: Dave Airlie Date: Fri Sep 11 09:45:51 2020 +1000 Merge tag 'drm-intel-fixes-2020-09-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.9-rc5: - Fix regression leading to audio probe failure Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/875z8m2hss.fsf@intel.com commit ee460417d254d941dfea5fb7cff841f589643992 Author: Lucy Yan Date: Thu Sep 10 12:05:09 2020 -0700 net: dec: de2104x: Increase receive ring size for Tulip Increase Rx ring size to address issue where hardware is reaching the receive work limit. Before: [ 102.223342] de2104x 0000:17:00.0 eth0: rx work limit reached [ 102.245695] de2104x 0000:17:00.0 eth0: rx work limit reached [ 102.251387] de2104x 0000:17:00.0 eth0: rx work limit reached [ 102.267444] de2104x 0000:17:00.0 eth0: rx work limit reached Signed-off-by: Lucy Yan Reviewed-by: Moritz Fischer Signed-off-by: David S. Miller commit 553d87b658fed0e22a0f86b4f1b093c39d3e3074 Author: Nicolas Dichtel Date: Thu Sep 10 15:34:39 2020 +0200 netlink: fix doc about nlmsg_parse/nla_validate There is no @validate argument. CC: Johannes Berg Fixes: 3de644035446 ("netlink: re-add parse/validate functions in strict mode") Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller commit 297e77e53eadb332d5062913447b104a772dc33b Author: Petr Machata Date: Thu Sep 10 14:09:05 2020 +0200 net: DCB: Validate DCB_ATTR_DCB_BUFFER argument The parameter passed via DCB_ATTR_DCB_BUFFER is a struct dcbnl_buffer. The field prio2buffer is an array of IEEE_8021Q_MAX_PRIORITIES bytes, where each value is a number of a buffer to direct that priority's traffic to. That value is however never validated to lie within the bounds set by DCBX_MAX_BUFFERS. The only driver that currently implements the callback is mlx5 (maintainers CCd), and that does not do any validation either, in particual allowing incorrect configuration if the prio2buffer value does not fit into 4 bits. Instead of offloading the need to validate the buffer index to drivers, do it right there in core, and bounce the request if the value is too large. CC: Parav Pandit CC: Saeed Mahameed Fixes: e549f6f9c098 ("net/dcb: Add dcbnl buffer attribute") Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit cdaa7a73700d40ffb4250b845422e4c4102feab5 Merge: 9d3b2d3e4942c 6374a5606990e Author: David S. Miller Date: Thu Sep 10 15:06:48 2020 -0700 Merge branch 'net-Fix-bridge-enslavement-failure' Ido Schimmel says: ==================== net: Fix bridge enslavement failure Patch #1 fixes an issue in which an upper netdev cannot be enslaved to a bridge when it has multiple netdevs with different parent identifiers beneath it. Patch #2 adds a test case using two netdevsim instances. ==================== Signed-off-by: David S. Miller commit 6374a5606990ea4de7fe0f7035dd04422c4690f5 Author: Ido Schimmel Date: Thu Sep 10 14:01:27 2020 +0300 selftests: rtnetlink: Test bridge enslavement with different parent IDs Test that an upper device of netdevs with different parent IDs can be enslaved to a bridge. The test fails without previous commit. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit e1b9efe6baebe79019a2183176686a0e709388ae Author: Ido Schimmel Date: Thu Sep 10 14:01:26 2020 +0300 net: Fix bridge enslavement failure When a netdev is enslaved to a bridge, its parent identifier is queried. This is done so that packets that were already forwarded in hardware will not be forwarded again by the bridge device between netdevs belonging to the same hardware instance. The operation fails when the netdev is an upper of netdevs with different parent identifiers. Instead of failing the enslavement, have dev_get_port_parent_id() return '-EOPNOTSUPP' which will signal the bridge to skip the query operation. Other callers of the function are not affected by this change. Fixes: 7e1146e8c10c ("net: devlink: introduce devlink_compat_switch_id_get() helper") Signed-off-by: Ido Schimmel Reported-by: Vasundhara Volam Reviewed-by: Jiri Pirko Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 9d3b2d3e4942cb82630f0d638de4b2253c0af56d Author: Lorenzo Bianconi Date: Thu Sep 10 11:08:01 2020 +0200 net: mvneta: fix possible use-after-free in mvneta_xdp_put_buff Release first buffer as last one since it contains references to subsequent fragments. This code will be optimized introducing multi-buffer bit in xdp_buff structure. Fixes: ca0e014609f05 ("net: mvneta: move skb build after descriptors processing") Signed-off-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Signed-off-by: David S. Miller commit fe0a916c1eae8e17e86c3753d13919177d63ed7e Author: Al Viro Date: Thu Sep 10 08:33:27 2020 -0400 epoll: EPOLL_CTL_ADD: close the race in decision to take fast path Checking for the lack of epitems refering to the epoll we want to insert into is not enough; we might have an insertion of that epoll into another one that has already collected the set of files to recheck for excessive reverse paths, but hasn't gotten to creating/inserting the epitem for it. However, any such insertion in progress can be detected - it will update the generation count in our epoll when it's done looking through it for files to check. That gets done under ->mtx of our epoll and that allows us to detect that safely. We are *not* holding epmutex here, so the generation count is not stable. However, since both the update of ep->gen by loop check and (later) insertion into ->f_ep_link are done with ep->mtx held, we are fine - the sequence is grab epmutex bump loop_check_gen ... grab tep->mtx // 1 tep->gen = loop_check_gen ... drop tep->mtx // 2 ... grab tep->mtx // 3 ... insert into ->f_ep_link ... drop tep->mtx // 4 bump loop_check_gen drop epmutex and if the fastpath check in another thread happens for that eventpoll, it can come * before (1) - in that case fastpath is just fine * after (4) - we'll see non-empty ->f_ep_link, slow path taken * between (2) and (3) - loop_check_gen is stable, with ->mtx providing barriers and we end up taking slow path. Note that ->f_ep_link emptiness check is slightly racy - we are protected against insertions into that list, but removals can happen right under us. Not a problem - in the worst case we'll end up taking a slow path for no good reason. Signed-off-by: Al Viro commit d2249bf25c565b6e310453962fef63f8d38677a6 Author: Jing Xiangfeng Date: Thu Aug 27 22:16:29 2020 +0800 clk: qcom: lpass: Correct goto target in lpass_core_sc7180_probe() lpass_core_sc7180_probe() misses to call pm_clk_destroy() and pm_runtime_disable() in error paths. Correct goto target to fix it. This issue is found by code inspection. Signed-off-by: Jing Xiangfeng Link: https://lore.kernel.org/r/20200827141629.101802-1-jingxiangfeng@huawei.com Fixes: edab812d802d ("clk: qcom: lpass: Add support for LPASS clock controller for SC7180") Signed-off-by: Stephen Boyd commit 5bf490e6807bf56f49b5991b4be817407dd32656 Author: Julian Wiedmann Date: Thu Sep 10 11:05:18 2020 +0200 s390/qeth: delay draining the TX buffers Wait until the QDIO data connection is severed. Otherwise the device might still be processing the buffers, and end up accessing skb data that we already freed. Fixes: 8b5026bc1693 ("s390/qeth: fix qdio teardown after early init error") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 83896b0bd8223ac33bcc609bcc82a57a587002ff Author: Miaohe Lin Date: Thu Sep 10 04:46:40 2020 -0400 net: Fix broken NETIF_F_CSUM_MASK spell in netdev_features.h Remove the weird space inside the NETIF_F_CSUM_MASK. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 1be107de2ee4b3f0808e2071529364cf4d9a67b9 Author: Miaohe Lin Date: Thu Sep 10 04:41:53 2020 -0400 net: Correct the comment of dst_dev_put() Since commit 8d7017fd621d ("blackhole_netdev: use blackhole_netdev to invalidate dst entries"), we use blackhole_netdev to invalidate dst entries instead of loopback device anymore. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 581cb3a26baf846ee9636214afaa5333919875b1 Merge: 7fe10096c1508 20d0a107fb35f Author: Linus Torvalds Date: Thu Sep 10 13:12:46 2020 -0700 Merge tag 'f2fs-for-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs fixes from Jaegeuk Kim: "Small bug fixes for: - SMR drive fix - infinite loop when building free node ids - EOF at DIO read" * tag 'f2fs-for-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: Return EOF on unaligned end of file DIO read f2fs: fix indefinite loop scanning for free nid f2fs: Fix type of section block count variables commit 66d42ed8b25b64eb63111a2b8582c5afc8bf1105 Author: Dan Carpenter Date: Wed Sep 9 12:46:48 2020 +0300 hdlc_ppp: add range checks in ppp_cp_parse_cr() There are a couple bugs here: 1) If opt[1] is zero then this results in a forever loop. If the value is less than 2 then it is invalid. 2) It assumes that "len" is more than sizeof(valid_accm) or 6 which can result in memory corruption. In the case of LCP_OPTION_ACCM, then we should check "opt[1]" instead of "len" because, if "opt[1]" is less than sizeof(valid_accm) then "nak_len" gets out of sync and it can lead to memory corruption in the next iterations through the loop. In case of LCP_OPTION_MAGIC, the only valid value for opt[1] is 6, but the code is trying to log invalid data so we should only discard the data when "len" is less than 6 because that leads to a read overflow. Reported-by: ChenNan Of Chaitin Security Research Lab Fixes: e022c2f07ae5 ("WAN: new synchronous PPP implementation for generic HDLC.") Signed-off-by: Dan Carpenter Reviewed-by: Eric Dumazet Reviewed-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit 7d3ba9360c6dac7c077fbd6631e08f32ea2bcd53 Author: Yoshihiro Shimoda Date: Wed Sep 9 14:43:14 2020 +0900 net: phy: call phy_disable_interrupts() in phy_attach_direct() instead Since the micrel phy driver calls phy_init_hw() as a workaround, the commit 9886a4dbd2aa ("net: phy: call phy_disable_interrupts() in phy_init_hw()") disables the interrupt unexpectedly. So, call phy_disable_interrupts() in phy_attach_direct() instead. Otherwise, the phy cannot link up after the ethernet cable was disconnected. Note that other drivers (like at803x.c) also calls phy_init_hw(). So, perhaps, the driver caused a similar issue too. Fixes: 9886a4dbd2aa ("net: phy: call phy_disable_interrupts() in phy_init_hw()") Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit da26658c3d7005aa67a706dceff7b2807b59e123 Author: Dexuan Cui Date: Tue Sep 8 21:08:19 2020 -0700 hv_netvsc: Cache the current data path to avoid duplicate call and message The previous change "hv_netvsc: Switch the data path at the right time during hibernation" adds the call of netvsc_vf_changed() upon NETDEV_CHANGE, so it's necessary to avoid the duplicate call and message when the VF is brought UP or DOWN. Signed-off-by: Dexuan Cui Signed-off-by: David S. Miller commit de214e52de1bba5392b5b7054924a08dbd57c2f6 Author: Dexuan Cui Date: Tue Sep 8 21:07:32 2020 -0700 hv_netvsc: Switch the data path at the right time during hibernation When netvsc_resume() is called, the mlx5 VF NIC has not been resumed yet, so in the future the host might sliently fail the call netvsc_vf_changed() -> netvsc_switch_datapath() there, even if the call works now. Call netvsc_vf_changed() in the NETDEV_CHANGE event handler: at that time the mlx5 VF NIC has been resumed. Fixes: 19162fd4063a ("hv_netvsc: Fix hibernation for mlx5 VF driver") Signed-off-by: Dexuan Cui Signed-off-by: David S. Miller commit 2fb541c862c987d02dfdf28f1545016deecfa0d5 Author: Yunsheng Lin Date: Tue Sep 8 19:02:34 2020 +0800 net: sch_generic: aviod concurrent reset and enqueue op for lockless qdisc Currently there is concurrent reset and enqueue operation for the same lockless qdisc when there is no lock to synchronize the q->enqueue() in __dev_xmit_skb() with the qdisc reset operation in qdisc_deactivate() called by dev_deactivate_queue(), which may cause out-of-bounds access for priv->ring[] in hns3 driver if user has requested a smaller queue num when __dev_xmit_skb() still enqueue a skb with a larger queue_mapping after the corresponding qdisc is reset, and call hns3_nic_net_xmit() with that skb later. Reused the existing synchronize_net() in dev_deactivate_many() to make sure skb with larger queue_mapping enqueued to old qdisc(which is saved in dev_queue->qdisc_sleeping) will always be reset when dev_reset_queue() is called. Fixes: 6b3ba9146fe6 ("net: sched: allow qdiscs to handle locking") Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit edecfa98f602a597666e3c5cab2677ada38d93c5 Author: Helmut Grohne Date: Tue Sep 8 10:01:38 2020 +0200 net: dsa: microchip: look for phy-mode in port nodes Documentation/devicetree/bindings/net/dsa/dsa.txt says that the phy-mode property should be specified on port nodes. However, the microchip drivers read it from the switch node. Let the driver use the per-port property and fall back to the old location with a warning. Fix in-tree users. Signed-off-by: Helmut Grohne Link: https://lore.kernel.org/netdev/20200617082235.GA1523@laureti-dev/ Acked-by: Alexandre Belloni Signed-off-by: David S. Miller commit f612eb76f349919128d5f5cc4e8cc4251a16bf30 Author: Geliang Tang Date: Wed Sep 9 11:01:24 2020 +0800 mptcp: fix kmalloc flag in mptcp_pm_nl_get_local_id mptcp_pm_nl_get_local_id may be called in interrupt context, so we need to use GFP_ATOMIC flag to allocate memory to avoid sleeping in atomic context. [ 280.209809] BUG: sleeping function called from invalid context at mm/slab.h:498 [ 280.209812] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1680, name: kworker/1:3 [ 280.209814] INFO: lockdep is turned off. [ 280.209816] CPU: 1 PID: 1680 Comm: kworker/1:3 Tainted: G W 5.9.0-rc3-mptcp+ #146 [ 280.209818] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 [ 280.209820] Workqueue: events mptcp_worker [ 280.209822] Call Trace: [ 280.209824] [ 280.209826] dump_stack+0x77/0xa0 [ 280.209829] ___might_sleep.cold+0xa6/0xb6 [ 280.209832] kmem_cache_alloc_trace+0x1d1/0x290 [ 280.209835] mptcp_pm_nl_get_local_id+0x23c/0x410 [ 280.209840] subflow_init_req+0x1e9/0x2ea [ 280.209843] ? inet_reqsk_alloc+0x1c/0x120 [ 280.209845] ? kmem_cache_alloc+0x264/0x290 [ 280.209849] tcp_conn_request+0x303/0xae0 [ 280.209854] ? printk+0x53/0x6a [ 280.209857] ? tcp_rcv_state_process+0x28f/0x1374 [ 280.209859] tcp_rcv_state_process+0x28f/0x1374 [ 280.209864] ? tcp_v4_do_rcv+0xb3/0x1f0 [ 280.209866] tcp_v4_do_rcv+0xb3/0x1f0 [ 280.209869] tcp_v4_rcv+0xed6/0xfa0 [ 280.209873] ip_protocol_deliver_rcu+0x28/0x270 [ 280.209875] ip_local_deliver_finish+0x89/0x120 [ 280.209877] ip_local_deliver+0x180/0x220 [ 280.209881] ip_rcv+0x166/0x210 [ 280.209885] __netif_receive_skb_one_core+0x82/0x90 [ 280.209888] process_backlog+0xd6/0x230 [ 280.209891] net_rx_action+0x13a/0x410 [ 280.209895] __do_softirq+0xcf/0x468 [ 280.209899] asm_call_on_stack+0x12/0x20 [ 280.209901] [ 280.209903] ? ip_finish_output2+0x240/0x9a0 [ 280.209906] do_softirq_own_stack+0x4d/0x60 [ 280.209908] do_softirq.part.0+0x2b/0x60 [ 280.209911] __local_bh_enable_ip+0x9a/0xa0 [ 280.209913] ip_finish_output2+0x264/0x9a0 [ 280.209916] ? rcu_read_lock_held+0x4d/0x60 [ 280.209920] ? ip_output+0x7a/0x250 [ 280.209922] ip_output+0x7a/0x250 [ 280.209925] ? __ip_finish_output+0x330/0x330 [ 280.209928] __ip_queue_xmit+0x1dc/0x5a0 [ 280.209931] __tcp_transmit_skb+0xa0f/0xc70 [ 280.209937] tcp_connect+0xb03/0xff0 [ 280.209939] ? lockdep_hardirqs_on_prepare+0xe7/0x190 [ 280.209942] ? ktime_get_with_offset+0x125/0x150 [ 280.209944] ? trace_hardirqs_on+0x1c/0xe0 [ 280.209948] tcp_v4_connect+0x449/0x550 [ 280.209953] __inet_stream_connect+0xbb/0x320 [ 280.209955] ? mark_held_locks+0x49/0x70 [ 280.209958] ? lockdep_hardirqs_on_prepare+0xe7/0x190 [ 280.209960] ? __local_bh_enable_ip+0x6b/0xa0 [ 280.209963] inet_stream_connect+0x32/0x50 [ 280.209966] __mptcp_subflow_connect+0x1fd/0x242 [ 280.209972] mptcp_pm_create_subflow_or_signal_addr+0x2db/0x600 [ 280.209975] mptcp_worker+0x543/0x7a0 [ 280.209980] process_one_work+0x26d/0x5b0 [ 280.209984] ? process_one_work+0x5b0/0x5b0 [ 280.209987] worker_thread+0x48/0x3d0 [ 280.209990] ? process_one_work+0x5b0/0x5b0 [ 280.209993] kthread+0x117/0x150 [ 280.209996] ? kthread_park+0x80/0x80 [ 280.209998] ret_from_fork+0x22/0x30 Fixes: 01cacb00b35cb ("mptcp: add netlink-based PM") Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit d697f42a9fa29af0604f895a2290e9e2928c4b62 Merge: a4b5cc9e10803 2ff0e566faa4e Author: David S. Miller Date: Thu Sep 10 12:29:15 2020 -0700 Merge branch 'mptcp-fix-subflow-s-local_id-remote_id-issues' Geliang Tang says: ==================== mptcp: fix subflow's local_id/remote_id issues v2: - add Fixes tags; - simply with 'return addresses_equal'; - use 'reversed Xmas tree' way. ==================== Signed-off-by: David S. Miller commit 2ff0e566faa4e92cba8138c5b396d6ba96a215f1 Author: Geliang Tang Date: Tue Sep 8 10:49:39 2020 +0800 mptcp: fix subflow's remote_id issues This patch set the init remote_id to zero, otherwise it will be a random number. Then it added the missing subflow's remote_id setting code both in __mptcp_subflow_connect and in subflow_ulp_clone. Fixes: 01cacb00b35cb ("mptcp: add netlink-based PM") Fixes: ec3edaa7ca6ce ("mptcp: Add handling of outgoing MP_JOIN requests") Fixes: f296234c98a8f ("mptcp: Add handling of incoming MP_JOIN requests") Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Signed-off-by: David S. Miller commit 57025817eaa42c0b6e2a907f28a125c74e3b2fc6 Author: Geliang Tang Date: Tue Sep 8 10:49:38 2020 +0800 mptcp: fix subflow's local_id issues In mptcp_pm_nl_get_local_id, skc_local is the same as msk_local, so it always return 0. Thus every subflow's local_id is 0. It's incorrect. This patch fixed this issue. Also, we need to ignore the zero address here, like 0.0.0.0 in IPv4. When we use the zero address as a local address, it means that we can use any one of the local addresses. The zero address is not a new address, we don't need to add it to PM, so this patch added a new function address_zero to check whether an address is the zero address, if it is, we ignore this address. Fixes: 01cacb00b35cb ("mptcp: add netlink-based PM") Signed-off-by: Geliang Tang Reviewed-by: Matthieu Baerts Reported-by: kernel test robot Signed-off-by: David S. Miller commit a4b5cc9e10803ecba64a7d54c0f47e4564b4a980 Author: Tetsuo Handa Date: Sat Sep 5 15:14:47 2020 +0900 tipc: fix shutdown() of connection oriented socket I confirmed that the problem fixed by commit 2a63866c8b51a3f7 ("tipc: fix shutdown() of connectionless socket") also applies to stream socket. ---------- #include #include #include int main(int argc, char *argv[]) { int fds[2] = { -1, -1 }; socketpair(PF_TIPC, SOCK_STREAM /* or SOCK_DGRAM */, 0, fds); if (fork() == 0) _exit(read(fds[0], NULL, 1)); shutdown(fds[0], SHUT_RDWR); /* This must make read() return. */ wait(NULL); /* To be woken up by _exit(). */ return 0; } ---------- Since shutdown(SHUT_RDWR) should affect all processes sharing that socket, unconditionally setting sk->sk_shutdown to SHUTDOWN_MASK will be the right behavior. Signed-off-by: Tetsuo Handa Acked-by: Ying Xue Signed-off-by: David S. Miller commit cc88b78c0870ebcab2123ba9e73689d97fbf3b14 Author: Amit Kucheria Date: Thu Sep 10 15:57:46 2020 +0530 powercap: make documentation reflect code Fix up the documentation of the struct powercap_control_type members to match the code. Also fixup stray whitespace. Signed-off-by: Amit Kucheria [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki commit 95035eac763294eb4543aea9afd48d2f7c8caa5c Author: Randy Dunlap Date: Sun Sep 6 20:42:52 2020 -0700 PM: : fix @em_pd kernel-doc warning Fix kernel-doc warning in : ../include/linux/device.h:613: warning: Function parameter or member 'em_pd' not described in 'device' Fixes: 1bc138c62295 ("PM / EM: add support for other devices than CPUs in Energy Model") Signed-off-by: Randy Dunlap Reviewed-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit ba92a4201167d945ccdc5a84e6a0994f7ab71870 Author: Zhang Rui Date: Thu Sep 10 15:49:21 2020 +0800 powercap/intel_rapl: add support for AlderLake Add intel_rapl support for the AlderLake platform. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 64e5f367155fe64854a0555bfa809af45f6e7e39 Author: Zhang Rui Date: Thu Sep 10 15:49:11 2020 +0800 powercap/intel_rapl: add support for RocketLake Add intel_rapl support for the RocketLake platform. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 57a2fb068a9513bf0fe51a1f2057235423330709 Author: Zhang Rui Date: Thu Sep 10 15:48:58 2020 +0800 powercap/intel_rapl: add support for TigerLake Desktop Add intel_rapl support for the TigerLake desktop platform. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 952e934d7f682a961c92eb9bbd521a4876e201fe Author: Greg Kroah-Hartman Date: Thu Sep 10 18:45:03 2020 +0200 Revert "dyndbg: accept query terms like file=bar and module=foo" This reverts commit 14775b04964264189caa4a0862eac05dab8c0502 as there were still some parsing problems with it, and the follow-on patch for it. Let's revisit it later, just drop it for now. Cc: Cc: Jim Cromie Reported-by: Naresh Kamboju Cc: Stephen Rothwell Fixes: 14775b049642 ("dyndbg: accept query terms like file=bar and module=foo") Signed-off-by: Greg Kroah-Hartman commit 7f6e1f3072b6842b2491b2cce28360e8cfea12ad Author: Greg Kroah-Hartman Date: Thu Sep 10 18:42:38 2020 +0200 Revert "dyndbg: fix problem parsing format="foo bar"" This reverts commit 42f07816ac0cc797928119cc039c414ae2b95d34 as it still causes problems. It will be resolved later, let's revert it so we can also revert the original patch this was supposed to be helping with. Reported-by: Naresh Kamboju Fixes: 42f07816ac0c ("dyndbg: fix problem parsing format="foo bar"") Cc: Jim Cromie Cc: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit baaabecfc80fad255f866563b53b8c7a3eec176e Author: Kees Cook Date: Wed Sep 9 15:53:54 2020 -0700 test_firmware: Test platform fw loading on non-EFI systems On non-EFI systems, it wasn't possible to test the platform firmware loader because it will have never set "checked_fw" during __init. Instead, allow the test code to override this check. Additionally split the declarations into a private symbol namespace so there is greater enforcement of the symbol visibility. Fixes: 548193cba2a7 ("test_firmware: add support for firmware_request_platform") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20200909225354.3118328-1-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 46cf789b68b25744be3dc99efd4afce4a5381b5c Author: David S. Miller Date: Thu Sep 10 08:40:13 2020 -0700 connector: Move maintainence under networking drivers umbrella. Evgeniy does not have the time nor capacity to maintain the connector subsystem any longer, so just move it under networking as that is effectively what has been happening lately. Signed-off-by: David S. Miller commit fd04358e0196fe3b7b44c69b755c7fc329360829 Merge: 2cd896a5e86fc 73a5379937ec8 Author: Jens Axboe Date: Thu Sep 10 07:12:22 2020 -0600 Merge tag 'nvme-5.9-2020-09-10' of git://git.infradead.org/nvme into block-5.9 Pull NVMe fixes from Christoph. "nvme fixes for 5.9 - cancel async events before freeing them (David Milburn) - revert a broken race fix (James Smart) - fix command processing during resets (Sagi Grimberg)" * tag 'nvme-5.9-2020-09-10' of git://git.infradead.org/nvme: nvme-fabrics: allow to queue requests for live queues nvme-tcp: cancel async events before freeing event struct nvme-rdma: cancel async events before freeing event struct nvme-fc: cancel async events before freeing event struct nvme: Revert: Fix controller creation races with teardown flow commit 18306c404abe18a0972587a6266830583c60c928 Author: Al Viro Date: Thu Sep 10 08:30:05 2020 -0400 epoll: replace ->visited/visited_list with generation count removes the need to clear it, along with the races. Signed-off-by: Al Viro commit 288eceb0858323d66bff03cf386630a797b248ad Author: Hans Verkuil Date: Tue Sep 8 12:02:53 2020 +0200 media: cec-adap.c: don't use flush_scheduled_work() For some inexplicable reason I decided to call flush_scheduled_work() instead of cancel_delayed_work_sync(). The problem with that is that flush_scheduled_work() waits for *all* queued scheduled work to be completed instead of just the work itself. This can cause a deadlock if a CEC driver also schedules work that takes the same lock. See the comments for flush_scheduled_work() in linux/workqueue.h. This is exactly what has been observed a few times. This patch simply replaces flush_scheduled_work() by cancel_delayed_work_sync(). Signed-off-by: Hans Verkuil Cc: # for v5.8 and up Signed-off-by: Mauro Carvalho Chehab commit 74ea06164cda81dc80e97790164ca533fd7e3087 Author: Martin Cerveny Date: Sun Sep 6 18:21:40 2020 +0200 drm/sun4i: mixer: Extend regmap max_register Better guess. Secondary CSC registers are from 0xF0000. Signed-off-by: Martin Cerveny Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200906162140.5584-3-m.cerveny@computer.org commit cab4c03b4ba54c8d9378298cacb8bc0fd74ceece Author: Martin Cerveny Date: Sun Sep 6 18:21:39 2020 +0200 drm/sun4i: sun8i-csc: Secondary CSC register correction "Allwinner V3s" has secondary video layer (VI). Decoded video is displayed in wrong colors until secondary CSC registers are programmed correctly. Fixes: 883029390550 ("drm/sun4i: Add DE2 CSC library") Signed-off-by: Martin Cerveny Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200906162140.5584-2-m.cerveny@computer.org commit da9c43dc0e2ec5c42a3d414e389feb30467000e2 Author: Sumera Priyadarsini Date: Sat Aug 29 23:27:04 2020 +0530 clk: versatile: Add of_node_put() before return statement Every iteration of for_each_available_child_of_node() decrements the reference count of the previous node, however when control is transferred from the middle of the loop, as in the case of a return or break or goto, there is no decrement thus ultimately resulting in a memory leak. Fix a potential memory leak in clk-impd1.c by inserting of_node_put() before a return statement. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini Link: https://lore.kernel.org/r/20200829175704.GA10998@Kaladin Reviewed-by: Linus Walleij Signed-off-by: Stephen Boyd commit 73a203b0dc56d2e8d4facc3820b0fcab43a300e1 Author: Maxime Ripard Date: Thu Sep 3 10:26:36 2020 +0200 clk: bcm: dvp: Select the reset framework The DVP driver depends both on the RESET_SIMPLE driver but also on the reset framework itself. Let's make sure we have it enabled. Fixes: 1bc95972715a ("clk: bcm: Add BCM2711 DVP driver") Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200903082636.3844629-1-maxime@cerno.tech Acked-by: Nicolas Saenz Julienne Signed-off-by: Stephen Boyd commit 7fe10096c1508c7f033d34d0741809f8eecc1ed4 Merge: ab29a807a7dda 1b0df11fde0f1 Author: Linus Torvalds Date: Wed Sep 9 19:46:22 2020 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a regression in padata" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: padata: fix possible padata_works_lock deadlock commit f8d4f44df056c5b504b0d49683fb7279218fd207 Author: Al Viro Date: Wed Sep 9 22:25:06 2020 -0400 epoll: do not insert into poll queues until all sanity checks are done Signed-off-by: Al Viro commit 244359c99fd90f1c61c3944f93250f8219435c75 Author: Dan Carpenter Date: Sat Sep 5 15:58:36 2020 +0300 scsi: libsas: Fix error path in sas_notify_lldd_dev_found() In sas_notify_lldd_dev_found(), if we can't allocate the necessary resources, then it seems like the wrong thing to mark the device as found and to increment the reference count. None of the callers ever drop the reference in that situation. [mkp: tweaked commit desc based on feedback from John] Link: https://lore.kernel.org/r/20200905125836.GF183976@mwanda Fixes: 735f7d2fedf5 ("[SCSI] libsas: fix domain_device leak") Reviewed-by: Jason Yan Acked-by: John Garry Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 4406e977a4a1e997818b6d77c3218ef8d15b2abf Author: Vinicius Costa Gomes Date: Tue Aug 18 16:40:02 2020 -0700 igc: Fix not considering the TX delay for timestamps When timestamping a packet there's a delay between the start of the packet and the point where the hardware actually captures the timestamp. This difference needs to be considered if we want accurate timestamps. This was done on the RX side, but not on the TX side. Fixes: 2c344ae24501 ("igc: Add support for TX timestamping") Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit f03369b9bfab8e23ac28ca7ab7e6631c374b7cbe Author: Vinicius Costa Gomes Date: Tue Aug 18 16:40:01 2020 -0700 igc: Fix wrong timestamp latency numbers The previous timestamping latency numbers were obtained by interpolating the i210 numbers with the i225 crystal clock value. That calculation was wrong. Use the correct values from real measurements. Fixes: 81b055205e8b ("igc: Add support for RX timestamping") Signed-off-by: Vinicius Costa Gomes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit b6f23d3817b965bcd6d72aab1f438ff6d16a0691 Author: Stefan Assmann Date: Thu Aug 20 13:53:12 2020 +0200 i40e: always propagate error value in i40e_set_vsi_promisc() The for loop in i40e_set_vsi_promisc() reports errors via dev_err() but does not propagate the error up the call chain. Instead it continues the loop and potentially overwrites the reported error value. This results in the error being recorded in the log buffer, but the caller might never know anything went the wrong way. To avoid this situation i40e_set_vsi_promisc() needs to temporarily store the error after reporting it. This is still not optimal as multiple different errors may occur, so store the first error and hope that's the main issue. Fixes: 37d318d7805f (i40e: Remove scheduling while atomic possibility) Reported-by: Michal Schmidt Signed-off-by: Stefan Assmann Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit e1e1b5356eb48dce4307f5cae10e4d6d5bd3df74 Author: Stefan Assmann Date: Thu Aug 13 13:26:38 2020 +0200 i40e: fix return of uninitialized aq_ret in i40e_set_vsi_promisc drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c: In function ‘i40e_set_vsi_promisc’: drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:1176:14: error: ‘aq_ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] i40e_status aq_ret; In case the code inside the if statement and the for loop does not get executed aq_ret will be uninitialized when the variable gets returned at the end of the function. Avoid this by changing num_vlans from int to u16, so aq_ret always gets set. Making this change in additional places as num_vlans should never be negative. Fixes: 37d318d7805f ("i40e: Remove scheduling while atomic possibility") Signed-off-by: Stefan Assmann Acked-by: Jakub Kicinski Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 9b29e26f793443a265d3d9273711caf0ccc882f6 Merge: a19454b60963a ce1cf9e5025f4 Author: David S. Miller Date: Wed Sep 9 14:28:19 2020 -0700 Merge branch 'net-qed-disable-aRFS-in-NPAR-and-100G' Igor Russkikh says: ==================== net: qed disable aRFS in NPAR and 100G This patchset fixes some recent issues found by customers. v3: resending on Dmitry's behalf v2: correct hash in Fixes tag ==================== Signed-off-by: David S. Miller commit ce1cf9e5025f4e2d2198728391f1847b3e168bc6 Author: Dmitry Bogdanov Date: Wed Sep 9 20:43:10 2020 +0300 net: qed: RDMA personality shouldn't fail VF load Fix the assert during VF driver installation when the personality is iWARP Fixes: 1fe614d10f45 ("qed: Relax VF firmware requirements") Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit 0367f05885b9f21d062447bd2ba1302ba3cc7392 Author: Dmitry Bogdanov Date: Wed Sep 9 20:43:09 2020 +0300 net: qede: Disable aRFS for NPAR and 100G In some configurations ARFS cannot be used, so disable it if device is not capable. Fixes: e4917d46a653 ("qede: Add aRFS support") Signed-off-by: Manish Chopra Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit 2d2fe8433796603091ac8ea235b9165ac5a85f9a Author: Dmitry Bogdanov Date: Wed Sep 9 20:43:08 2020 +0300 net: qed: Disable aRFS for NPAR and 100G In CMT and NPAR the PF is unknown when the GFS block processes the packet. Therefore cannot use searcher as it has a per PF database, and thus ARFS must be disabled. Fixes: d51e4af5c209 ("qed: aRFS infrastructure support") Signed-off-by: Manish Chopra Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: Dmitry Bogdanov Signed-off-by: David S. Miller commit 686e0a0c8c61e0e3f55321d0181fece3efd92777 Author: Florian Fainelli Date: Wed Aug 26 16:49:19 2020 -0700 arm64: dts: ns2: Fixed QSPI compatible string The string was incorrectly defined before from least to most specific, swap the compatible strings accordingly. Fixes: ff73917d38a6 ("ARM64: dts: Add QSPI Device Tree node for NS2") Signed-off-by: Florian Fainelli commit b793dab8d811e103665d6bddaaea1c25db3776eb Author: Florian Fainelli Date: Wed Aug 26 16:45:29 2020 -0700 ARM: dts: BCM5301X: Fixed QSPI compatible string The string was incorrectly defined before from least to most specific, swap the compatible strings accordingly. Fixes: 1c8f40650723 ("ARM: dts: BCM5301X: convert to iProc QSPI") Signed-off-by: Florian Fainelli commit d1ecc40a954fd0f5e3789b91fa80f15e82284e39 Author: Florian Fainelli Date: Wed Aug 26 16:44:25 2020 -0700 ARM: dts: NSP: Fixed QSPI compatible string The string was incorrectly defined before from least to most specific, swap the compatible strings accordingly. Fixes: 329f98c1974e ("ARM: dts: NSP: Add QSPI nodes to NSPI and bcm958625k DTSes") Signed-off-by: Florian Fainelli commit d663186293a818af97c648624bee6c7a59e8218b Author: Florian Fainelli Date: Wed Aug 26 16:43:41 2020 -0700 ARM: dts: bcm: HR2: Fixed QSPI compatible string The string was incorrectly defined before from least to most specific, swap the compatible strings accordingly. Fixes: b9099ec754b5 ("ARM: dts: Add Broadcom Hurricane 2 DTS include file") Signed-off-by: Florian Fainelli commit fcd2e4b9ca20faf6de959f67df5b454a5b055c56 Author: Florian Fainelli Date: Wed Aug 26 16:40:13 2020 -0700 dt-bindings: spi: Fix spi-bcm-qspi compatible ordering The binding is currently incorrectly defining the compatible strings from least specifice to most specific instead of the converse. Re-order them from most specific (left) to least specific (right) and fix the examples as well. Fixes: 5fc78f4c842a ("spi: Broadcom BRCMSTB, NSP, NS2 SoC bindings") Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli commit a19454b60963a50d12b4f919723c0b1250f7ef7f Merge: 99dc4a5dfe940 1264c1e0cfe55 Author: David S. Miller Date: Wed Sep 9 11:33:56 2020 -0700 Merge tag 'wireless-drivers-2020-09-09' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.9 First set of fixes for v5.9, small but important. brcmfmac * fix a throughput regression on bcm4329 mt76 * fix a regression with stations reconnecting on mt7616 * properly free tx skbs, it was working by accident before mwifiex * fix a regression with 256 bit encryption keys wlcore * revert AES CMAC support as it caused a regression ==================== Signed-off-by: David S. Miller commit 99dc4a5dfe940ec986f915da36dda196798bd977 Merge: b87f9fe1ac944 6147f7b1e90ff Author: David S. Miller Date: Wed Sep 9 11:31:38 2020 -0700 Merge branch 'wireguard-fixes' Jason A. Donenfeld says: ==================== wireguard fixes for 5.9-rc5 Yesterday, Eric reported a race condition found by syzbot. This series contains two commits, one that fixes the direct issue, and another that addresses the more general issue, as a defense in depth. 1) The basic problem syzbot unearthed was that one particular mutation of handshake->entry was not protected by the handshake mutex like the other cases, so this patch basically just reorders a line to make sure the mutex is actually taken at the right point. Most of the work here went into making sure the race was fully understood and making a reproducer (which syzbot was unable to do itself, due to the rarity of the race). 2) Eric's initial suggestion for fixing this was taking a spinlock around the hash table replace function where the null ptr deref was happening. This doesn't address the main problem in the most precise possible way like (1) does, but it is a good suggestion for defense-in-depth, in case related issues come up in the future, and basically costs nothing from a performance perspective. I thought it aided in implementing a good general rule: all mutators of that hash table take the table lock. So that's part of this series as a companion. Both of these contain Fixes: tags and are good candidates for stable. ==================== Signed-off-by: David S. Miller commit 6147f7b1e90ff09bd52afc8b9206a7fcd133daf7 Author: Jason A. Donenfeld Date: Wed Sep 9 13:58:15 2020 +0200 wireguard: peerlookup: take lock before checking hash in replace operation Eric's suggested fix for the previous commit's mentioned race condition was to simply take the table->lock in wg_index_hashtable_replace(). The table->lock of the hash table is supposed to protect the bucket heads, not the entires, but actually, since all the mutator functions are already taking it, it makes sense to take it too for the test to hlist_unhashed, as a defense in depth measure, so that it no longer races with deletions, regardless of what other locks are protecting individual entries. This is sensible from a performance perspective because, as Eric pointed out, the case of being unhashed is already the unlikely case, so this won't add common contention. And comparing instructions, this basically doesn't make much of a difference other than pushing and popping %r13, used by the new `bool ret`. More generally, I like the idea of locking consistency across table mutator functions, and this might let me rest slightly easier at night. Suggested-by: Eric Dumazet Link: https://lore.kernel.org/wireguard/20200908145911.4090480-1-edumazet@google.com/ Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 9179ba31367bcf481c3c79b5f028c94faad9f30a Author: Jason A. Donenfeld Date: Wed Sep 9 13:58:14 2020 +0200 wireguard: noise: take lock when removing handshake entry from table Eric reported that syzkaller found a race of this variety: CPU 1 CPU 2 -------------------------------------------|--------------------------------------- wg_index_hashtable_replace(old, ...) | if (hlist_unhashed(&old->index_hash)) | | wg_index_hashtable_remove(old) | hlist_del_init_rcu(&old->index_hash) | old->index_hash.pprev = NULL hlist_replace_rcu(&old->index_hash, ...) | *old->index_hash.pprev | Syzbot wasn't actually able to reproduce this more than once or create a reproducer, because the race window between checking "hlist_unhashed" and calling "hlist_replace_rcu" is just so small. Adding an mdelay(5) or similar there helps make this demonstrable using this simple script: #!/bin/bash set -ex trap 'kill $pid1; kill $pid2; ip link del wg0; ip link del wg1' EXIT ip link add wg0 type wireguard ip link add wg1 type wireguard wg set wg0 private-key <(wg genkey) listen-port 9999 wg set wg1 private-key <(wg genkey) peer $(wg show wg0 public-key) endpoint 127.0.0.1:9999 persistent-keepalive 1 wg set wg0 peer $(wg show wg1 public-key) ip link set wg0 up yes link set wg1 up | ip -force -batch - & pid1=$! yes link set wg1 down | ip -force -batch - & pid2=$! wait The fundumental underlying problem is that we permit calls to wg_index_ hashtable_remove(handshake.entry) without requiring the caller to take the handshake mutex that is intended to protect members of handshake during mutations. This is consistently the case with calls to wg_index_ hashtable_insert(handshake.entry) and wg_index_hashtable_replace( handshake.entry), but it's missing from a pertinent callsite of wg_ index_hashtable_remove(handshake.entry). So, this patch makes sure that mutex is taken. The original code was a little bit funky though, in the form of: remove(handshake.entry) lock(), memzero(handshake.some_members), unlock() remove(handshake.entry) The original intention of that double removal pattern outside the lock appears to be some attempt to prevent insertions that might happen while locks are dropped during expensive crypto operations, but actually, all callers of wg_index_hashtable_insert(handshake.entry) take the write lock and then explicitly check handshake.state, as they should, which the aforementioned memzero clears, which means an insertion should already be impossible. And regardless, the original intention was necessarily racy, since it wasn't guaranteed that something else would run after the unlock() instead of after the remove(). So, from a soundness perspective, it seems positive to remove what looks like a hack at best. The crash from both syzbot and from the script above is as follows: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 0 PID: 7395 Comm: kworker/0:3 Not tainted 5.9.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: wg-kex-wg1 wg_packet_handshake_receive_worker RIP: 0010:hlist_replace_rcu include/linux/rculist.h:505 [inline] RIP: 0010:wg_index_hashtable_replace+0x176/0x330 drivers/net/wireguard/peerlookup.c:174 Code: 00 fc ff df 48 89 f9 48 c1 e9 03 80 3c 01 00 0f 85 44 01 00 00 48 b9 00 00 00 00 00 fc ff df 48 8b 45 10 48 89 c6 48 c1 ee 03 <80> 3c 0e 00 0f 85 06 01 00 00 48 85 d2 4c 89 28 74 47 e8 a3 4f b5 RSP: 0018:ffffc90006a97bf8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff888050ffc4f8 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88808e04e010 RBP: ffff88808e04e000 R08: 0000000000000001 R09: ffff8880543d0000 R10: ffffed100a87a000 R11: 000000000000016e R12: ffff8880543d0000 R13: ffff88808e04e008 R14: ffff888050ffc508 R15: ffff888050ffc500 FS: 0000000000000000(0000) GS:ffff8880ae600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000f5505db0 CR3: 0000000097cf7000 CR4: 00000000001526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: wg_noise_handshake_begin_session+0x752/0xc9a drivers/net/wireguard/noise.c:820 wg_receive_handshake_packet drivers/net/wireguard/receive.c:183 [inline] wg_packet_handshake_receive_worker+0x33b/0x730 drivers/net/wireguard/receive.c:220 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Reported-by: syzbot Reported-by: Eric Dumazet Link: https://lore.kernel.org/wireguard/20200908145911.4090480-1-edumazet@google.com/ Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit b87f9fe1ac9441b75656dfd95eba70ef9f0375e0 Author: Ye Bin Date: Wed Sep 9 17:38:21 2020 +0800 hsr: avoid newline at end of message in NL_SET_ERR_MSG_MOD clean follow coccicheck warning: net//hsr/hsr_netlink.c:94:8-42: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD net//hsr/hsr_netlink.c:87:30-57: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD net//hsr/hsr_netlink.c:79:29-53: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD Signed-off-by: Ye Bin Signed-off-by: David S. Miller commit ab29a807a7ddaa7c84d2f4cb8d29e74e33759072 Merge: 34d4ddd359dbc 8c6b6c793ed32 Author: Linus Torvalds Date: Wed Sep 9 11:14:20 2020 -0700 Merge tag 'nfs-for-5.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: - Fix an NFS/RDMA resource leak - Fix the error handling during delegation recall - NFSv4.0 needs to return the delegation on a zero-stateid SETATTR - Stop printk reading past end of string * tag 'nfs-for-5.9-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: SUNRPC: stop printk reading past end of string NFS: Zero-stateid SETATTR should first return delegation NFSv4.1 handle ERR_DELAY error reclaiming locking state on delegation recall xprtrdma: Release in-flight MRs on disconnect commit 0ddaa27803847f8c14a9aa8ebee4fff5f1a1c379 Merge: ba9e04a7ddf4f 4a009cb04aeca Author: David S. Miller Date: Wed Sep 9 11:04:39 2020 -0700 Merge branch 'net-skb_put_padto-fixes' Eric Dumazet says: ==================== net: skb_put_padto() fixes sysbot reported a bug in qrtr leading to use-after-free. First patch fixes the issue. Second patch addes __must_check attribute to avoid similar issues in the future. ==================== Signed-off-by: David S. Miller commit 4a009cb04aeca0de60b73f37b102573354214b52 Author: Eric Dumazet Date: Wed Sep 9 01:27:40 2020 -0700 net: add __must_check to skb_put_padto() skb_put_padto() and __skb_put_padto() callers must check return values or risk use-after-free. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 3ca1a42a52ca4b4f02061683851692ad65fefac8 Author: Eric Dumazet Date: Wed Sep 9 01:27:39 2020 -0700 net: qrtr: check skb_put_padto() return value If skb_put_padto() returns an error, skb has been freed. Better not touch it anymore, as reported by syzbot [1] Note to qrtr maintainers : this suggests qrtr_sendmsg() should adjust sock_alloc_send_skb() second parameter to account for the potential added alignment to avoid reallocation. [1] BUG: KASAN: use-after-free in __skb_insert include/linux/skbuff.h:1907 [inline] BUG: KASAN: use-after-free in __skb_queue_before include/linux/skbuff.h:2016 [inline] BUG: KASAN: use-after-free in __skb_queue_tail include/linux/skbuff.h:2049 [inline] BUG: KASAN: use-after-free in skb_queue_tail+0x6b/0x120 net/core/skbuff.c:3146 Write of size 8 at addr ffff88804d8ab3c0 by task syz-executor.4/4316 CPU: 1 PID: 4316 Comm: syz-executor.4 Not tainted 5.9.0-rc4-syzkaller #0 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+0x1d6/0x29e lib/dump_stack.c:118 print_address_description+0x66/0x620 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report+0x132/0x1d0 mm/kasan/report.c:530 __skb_insert include/linux/skbuff.h:1907 [inline] __skb_queue_before include/linux/skbuff.h:2016 [inline] __skb_queue_tail include/linux/skbuff.h:2049 [inline] skb_queue_tail+0x6b/0x120 net/core/skbuff.c:3146 qrtr_tun_send+0x1a/0x40 net/qrtr/tun.c:23 qrtr_node_enqueue+0x44f/0xc00 net/qrtr/qrtr.c:364 qrtr_bcast_enqueue+0xbe/0x140 net/qrtr/qrtr.c:861 qrtr_sendmsg+0x680/0x9c0 net/qrtr/qrtr.c:960 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] sock_write_iter+0x317/0x470 net/socket.c:998 call_write_iter include/linux/fs.h:1882 [inline] new_sync_write fs/read_write.c:503 [inline] vfs_write+0xa96/0xd10 fs/read_write.c:578 ksys_write+0x11b/0x220 fs/read_write.c:631 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d5b9 Code: 5d b4 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 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f84b5b81c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000038b40 RCX: 000000000045d5b9 RDX: 0000000000000055 RSI: 0000000020001240 RDI: 0000000000000003 RBP: 00007f84b5b81ca0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000000f R13: 00007ffcbbf86daf R14: 00007f84b5b829c0 R15: 000000000118cf4c Allocated by task 4316: kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc+0x100/0x130 mm/kasan/common.c:461 slab_post_alloc_hook+0x3e/0x290 mm/slab.h:518 slab_alloc mm/slab.c:3312 [inline] kmem_cache_alloc+0x1c1/0x2d0 mm/slab.c:3482 skb_clone+0x1b2/0x370 net/core/skbuff.c:1449 qrtr_bcast_enqueue+0x6d/0x140 net/qrtr/qrtr.c:857 qrtr_sendmsg+0x680/0x9c0 net/qrtr/qrtr.c:960 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] sock_write_iter+0x317/0x470 net/socket.c:998 call_write_iter include/linux/fs.h:1882 [inline] new_sync_write fs/read_write.c:503 [inline] vfs_write+0xa96/0xd10 fs/read_write.c:578 ksys_write+0x11b/0x220 fs/read_write.c:631 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 4316: kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track+0x3d/0x70 mm/kasan/common.c:56 kasan_set_free_info+0x17/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xdd/0x110 mm/kasan/common.c:422 __cache_free mm/slab.c:3418 [inline] kmem_cache_free+0x82/0xf0 mm/slab.c:3693 __skb_pad+0x3f5/0x5a0 net/core/skbuff.c:1823 __skb_put_padto include/linux/skbuff.h:3233 [inline] skb_put_padto include/linux/skbuff.h:3252 [inline] qrtr_node_enqueue+0x62f/0xc00 net/qrtr/qrtr.c:360 qrtr_bcast_enqueue+0xbe/0x140 net/qrtr/qrtr.c:861 qrtr_sendmsg+0x680/0x9c0 net/qrtr/qrtr.c:960 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] sock_write_iter+0x317/0x470 net/socket.c:998 call_write_iter include/linux/fs.h:1882 [inline] new_sync_write fs/read_write.c:503 [inline] vfs_write+0xa96/0xd10 fs/read_write.c:578 ksys_write+0x11b/0x220 fs/read_write.c:631 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88804d8ab3c0 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 0 bytes inside of 224-byte region [ffff88804d8ab3c0, ffff88804d8ab4a0) The buggy address belongs to the page: page:00000000ea8cccfb refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88804d8abb40 pfn:0x4d8ab flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002237ec8 ffffea00029b3388 ffff88821bb66800 raw: ffff88804d8abb40 ffff88804d8ab000 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Fixes: ce57785bf91b ("net: qrtr: fix len of skb_put_padto in qrtr_node_enqueue") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Carl Huang Cc: Wen Gong Cc: Bjorn Andersson Cc: Manivannan Sadhasivam Acked-by: Manivannan Sadhasivam Reviewed-by: Bjorn Andersson Signed-off-by: David S. Miller commit 0b089c1ef7047652b13b4cdfdb1e0e7dbdb8c9ab Author: Sagi Grimberg Date: Fri Sep 4 12:50:39 2020 -0700 IB/isert: Fix unaligned immediate-data handling Currently we allocate rx buffers in a single contiguous buffers for headers (iser and iscsi) and data trailer. This means that most likely the data starting offset is aligned to 76 bytes (size of both headers). This worked fine for years, but at some point this broke, resulting in data corruptions in isert when a command comes with immediate data and the underlying backend device assumes 512 bytes buffer alignment. We assume a hard-requirement for all direct I/O buffers to be 512 bytes aligned. To fix this, we should avoid passing unaligned buffers for I/O. Instead, we allocate our recv buffers with some extra space such that we can have the data portion align to 512 byte boundary. This also means that we cannot reference headers or data using structure but rather accessors (as they may move based on alignment). Also, get rid of the wrong __packed annotation from iser_rx_desc as this has only harmful effects (not aligned to anything). This affects the rx descriptors for iscsi login and data plane. Fixes: 3d75ca0adef4 ("block: introduce multi-page bvec helpers") Link: https://lore.kernel.org/r/20200904195039.31687-1-sagi@grimberg.me Reported-by: Stephen Rust Tested-by: Doug Dumitru Signed-off-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 39c2d639ca183a400ba3259fa0825714cbb09c53 Author: Md Haris Iqbal Date: Mon Sep 7 15:52:16 2020 +0530 RDMA/rtrs-srv: Set .release function for rtrs srv device during device init The device .release function was not being set during the device initialization. This was leading to the below warning, in error cases when put_srv was called before device_add was called. Warning: Device '(null)' does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt. So, set the device .release function during device initialization in the __alloc_srv() function. Fixes: baa5b28b7a47 ("RDMA/rtrs-srv: Replace device_register with device_initialize and device_add") Link: https://lore.kernel.org/r/20200907102216.104041-1-haris.iqbal@cloud.ionos.com Signed-off-by: Md Haris Iqbal Reviewed-by: Leon Romanovsky Acked-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 9e712446a80bba9ede824ff00f2af630ed9ac0be Author: YueHaibing Date: Sat Sep 5 20:16:24 2020 +0800 RDMA/bnxt_re: Remove set but not used variable 'qplib_ctx' drivers/infiniband/hw/bnxt_re/main.c:1012:25: warning: variable ‘qplib_ctx’ set but not used [-Wunused-but-set-variable] Fixes: f86b31c6a28f ("RDMA/bnxt_re: Static NQ depth allocation") Link: https://lore.kernel.org/r/20200905121624.32776-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ec653df2a0cbc306a4bfcb0e3484d318fa779002 Author: Marek Szyprowski Date: Wed Jul 1 09:39:49 2020 +0200 drm/vc4/vc4_hdmi: fill ASoC card owner card->owner is a required property and since commit 81033c6b584b ("ALSA: core: Warn on empty module") a warning is issued if it is empty. Fix lack of it. This fixes following warning observed on RaspberryPi 3B board with ARM 32bit kernel and multi_v7_defconfig: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 210 at sound/core/init.c:207 snd_card_new+0x378/0x398 [snd] Modules linked in: vc4(+) snd_soc_core ac97_bus snd_pcm_dmaengine bluetooth snd_pcm snd_timer crc32_arm_ce raspberrypi_hwmon snd soundcore ecdh_generic ecc bcm2835_thermal phy_generic CPU: 1 PID: 210 Comm: systemd-udevd Not tainted 5.8.0-rc1-00027-g81033c6b584b #1087 Hardware name: BCM2835 [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xd4/0xe8) [] (dump_stack) from [] (__warn+0xdc/0xf4) [] (__warn) from [] (warn_slowpath_fmt+0xb0/0xb8) [] (warn_slowpath_fmt) from [] (snd_card_new+0x378/0x398 [snd]) [] (snd_card_new [snd]) from [] (snd_soc_bind_card+0x280/0x99c [snd_soc_core]) [] (snd_soc_bind_card [snd_soc_core]) from [] (devm_snd_soc_register_card+0x34/0x6c [snd_soc_core]) [] (devm_snd_soc_register_card [snd_soc_core]) from [] (vc4_hdmi_bind+0x43c/0x5f4 [vc4]) [] (vc4_hdmi_bind [vc4]) from [] (component_bind_all+0xec/0x24c) [] (component_bind_all) from [] (vc4_drm_bind+0xd4/0x174 [vc4]) [] (vc4_drm_bind [vc4]) from [] (try_to_bring_up_master+0x160/0x1b0) [] (try_to_bring_up_master) from [] (component_master_add_with_match+0xd0/0x104) [] (component_master_add_with_match) from [] (vc4_platform_drm_probe+0x9c/0xbc [vc4]) [] (vc4_platform_drm_probe [vc4]) from [] (platform_drv_probe+0x6c/0xa4) [] (platform_drv_probe) from [] (really_probe+0x210/0x350) [] (really_probe) from [] (driver_probe_device+0x5c/0xb4) [] (driver_probe_device) from [] (device_driver_attach+0x58/0x60) [] (device_driver_attach) from [] (__driver_attach+0x80/0xbc) [] (__driver_attach) from [] (bus_for_each_dev+0x68/0xb4) [] (bus_for_each_dev) from [] (bus_add_driver+0x130/0x1e8) [] (bus_add_driver) from [] (driver_register+0x78/0x110) [] (driver_register) from [] (do_one_initcall+0x50/0x220) [] (do_one_initcall) from [] (do_init_module+0x60/0x210) [] (do_init_module) from [] (load_module+0x1e34/0x2338) [] (load_module) from [] (sys_finit_module+0xac/0xbc) [] (sys_finit_module) from [] (ret_fast_syscall+0x0/0x54) Exception stack(0xeded9fa8 to 0xeded9ff0) ... ---[ end trace 6414689569c2bc08 ]--- Fixes: bb7d78568814 ("drm/vc4: Add HDMI audio support") Suggested-by: Takashi Iwai Signed-off-by: Marek Szyprowski Tested-by: Stefan Wahren Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200701073949.28941-1-m.szyprowski@samsung.com commit 2cd896a5e86fc326bda8614b96c0401dcc145868 Author: Ritesh Harjani Date: Wed Sep 9 08:44:25 2020 +0530 block: Set same_page to false in __bio_try_merge_page if ret is false If we hit the UINT_MAX limit of bio->bi_iter.bi_size and so we are anyway not merging this page in this bio, then it make sense to make same_page also as false before returning. Without this patch, we hit below WARNING in iomap. This mostly happens with very large memory system and / or after tweaking vm dirty threshold params to delay writeback of dirty data. WARNING: CPU: 18 PID: 5130 at fs/iomap/buffered-io.c:74 iomap_page_release+0x120/0x150 CPU: 18 PID: 5130 Comm: fio Kdump: loaded Tainted: G W 5.8.0-rc3 #6 Call Trace: __remove_mapping+0x154/0x320 (unreliable) iomap_releasepage+0x80/0x180 try_to_release_page+0x94/0xe0 invalidate_inode_page+0xc8/0x110 invalidate_mapping_pages+0x1dc/0x540 generic_fadvise+0x3c8/0x450 xfs_file_fadvise+0x2c/0xe0 [xfs] vfs_fadvise+0x3c/0x60 ksys_fadvise64_64+0x68/0xe0 sys_fadvise64+0x28/0x40 system_call_exception+0xf8/0x1c0 system_call_common+0xf0/0x278 Fixes: cc90bc68422 ("block: fix "check bi_size overflow before merge"") Reported-by: Shivaprasad G Bhat Suggested-by: Christoph Hellwig Signed-off-by: Anju T Sudhakar Signed-off-by: Ritesh Harjani Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c170a5a3b6944ad8e76547c4a1d9fe81c8f23ac8 Author: Dan Carpenter Date: Wed Sep 9 12:43:04 2020 +0300 spi: stm32: fix pm_runtime_get_sync() error checking The pm_runtime_get_sync() can return either 0 or 1 on success but this code treats 1 as a failure. Fixes: db96bf976a4f ("spi: stm32: fixes suspend/resume management") Signed-off-by: Dan Carpenter Reviewed-by: Alain Volmat Link: https://lore.kernel.org/r/20200909094304.GA420136@mwanda Signed-off-by: Mark Brown commit b59a7ca15464c78ea1ba3b280cfc5ac5ece11ade Author: Gustav Wiklander Date: Tue Sep 8 17:11:29 2020 +0200 spi: Fix memory leak on splited transfers In the prepare_message callback the bus driver has the opportunity to split a transfer into smaller chunks. spi_map_msg is done after prepare_message. Function spi_res_release releases the splited transfers in the message. Therefore spi_res_release should be called after spi_map_msg. The previous try at this was commit c9ba7a16d0f1 which released the splited transfers after spi_finalize_current_message had been called. This introduced a race since the message struct could be out of scope because the spi_sync call got completed. Fixes this leak on spi bus driver spi-bcm2835.c when transfer size is greater than 65532: Kmemleak: sg_alloc_table+0x28/0xc8 spi_map_buf+0xa4/0x300 __spi_pump_messages+0x370/0x748 __spi_sync+0x1d4/0x270 spi_sync+0x34/0x58 spi_test_execute_msg+0x60/0x340 [spi_loopback_test] spi_test_run_iter+0x548/0x578 [spi_loopback_test] spi_test_run_test+0x94/0x140 [spi_loopback_test] spi_test_run_tests+0x150/0x180 [spi_loopback_test] spi_loopback_test_probe+0x50/0xd0 [spi_loopback_test] spi_drv_probe+0x84/0xe0 Signed-off-by: Gustav Wiklander Link: https://lore.kernel.org/r/20200908151129.15915-1-gustav.wiklander@axis.com Signed-off-by: Mark Brown commit 19873eec7e13fda140a0ebc75d6664e57c00bfb1 Author: Dexuan Cui Date: Fri Sep 4 19:55:55 2020 -0700 Drivers: hv: vmbus: hibernation: do not hang forever in vmbus_bus_resume() After we Stop and later Start a VM that uses Accelerated Networking (NIC SR-IOV), currently the VF vmbus device's Instance GUID can change, so after vmbus_bus_resume() -> vmbus_request_offers(), vmbus_onoffer() can not find the original vmbus channel of the VF, and hence we can't complete() vmbus_connection.ready_for_resume_event in check_ready_for_resume_event(), and the VM hangs in vmbus_bus_resume() forever. Fix the issue by adding a timeout, so the resuming can still succeed, and the saved state is not lost, and according to my test, the user can disable Accelerated Networking and then will be able to SSH into the VM for further recovery. Also prevent the VM in question from suspending again. The host will be fixed so in future the Instance GUID will stay the same across hibernation. Fixes: d8bd2d442bb2 ("Drivers: hv: vmbus: Resume after fixing up old primary channels") Signed-off-by: Dexuan Cui Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200905025555.45614-1-decui@microsoft.com Signed-off-by: Wei Liu commit 1b02d9e770cd7087f34c743f85ccf5ea8372b047 Author: Bartosz Golaszewski Date: Tue Sep 8 15:07:49 2020 +0200 gpio: mockup: fix resource leak in error path If the module init function fails after creating the debugs directory, it's never removed. Add proper cleanup calls to avoid this resource leak. Fixes: 9202ba2397d1 ("gpio: mockup: implement event injecting over debugfs") Cc: Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit f022ff7bf377ca94367be05de61277934d42ea74 Author: Mika Westerberg Date: Mon Sep 7 12:20:36 2020 +0300 thunderbolt: Retry DROM read once if parsing fails Kai-Heng reported that sometimes DROM parsing of ASUS PA27AC Thunderbolt 3 monitor fails. This makes the driver to fail to add the device so only DisplayPort tunneling is functional. It is not clear what exactly happens but waiting for 100 ms and retrying the read seems to work this around so we do that here. Link: https://bugzilla.kernel.org/show_bug.cgi?id=206493 Reported-by: Kai-Heng Feng Tested-by: Kai-Heng Feng Cc: stable@vger.kernel.org Signed-off-by: Mika Westerberg commit 45ccf6556720293323c20cda717756014ff63007 Author: Ahmad Fatoum Date: Mon Sep 7 17:31:35 2020 +0200 gpio: siox: explicitly support only threaded irqs The gpio-siox driver uses handle_nested_irq() to implement its interrupt support. This is only capable of handling threaded irq actions. For a hardirq action it triggers a NULL pointer oops. (It calls action->thread_fn which is NULL then.) Prevent registration of a hardirq action by setting gpio_irq_chip::threaded to true. Cc: u.kleine-koenig@pengutronix.de Fixes: be8c8facc707 ("gpio: new driver to work with a 8x12 siox") Cc: stable@vger.kernel.org Signed-off-by: Ahmad Fatoum Acked-by: Uwe Kleine-König Signed-off-by: Bartosz Golaszewski commit 214b0e1ad01abf4c1f6d8d28fa096bf167e47cef Author: dillon min Date: Thu Sep 3 15:30:21 2020 +0800 gpio: tc35894: fix up tc35894 interrupt configuration The offset of regmap is incorrect, j * 8 is move to the wrong register. for example: asume i = 0, j = 1. we want to set KPY5 as interrupt falling edge mode, regmap[0][1] should be TC3589x_GPIOIBE1 0xcd but, regmap[i] + j * 8 = TC3589x_GPIOIBE0 + 8 ,point to 0xd4, this is TC3589x_GPIOIE2 not TC3589x_GPIOIBE1. Fixes: d88b25be3584 ("gpio: Add TC35892 GPIO driver") Cc: Cc: stable@vger.kernel.org Signed-off-by: dillon min Signed-off-by: Bartosz Golaszewski commit fc19d559b0d31b5b831fd468b10d7dadafc0d0ec Author: Hui Wang Date: Wed Sep 9 10:00:41 2020 +0800 ALSA: hda/realtek - The Mic on a RedmiBook doesn't work The Mic connects to the Nid 0x19, but the configuration of Nid 0x19 is not defined to Mic, and also need to set the coeff to enable the auto detection on the Nid 0x19. After this change, the Mic plugging in or plugging out could be detected and could record the sound from the Mic. And the coeff value is suggested by Kailang of Realtek. Cc: Kailang Yang Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20200909020041.8967-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 0a355aeb24081e4538d4d424cd189f16c0bbd983 Author: Evan Nimmo Date: Wed Sep 9 08:32:47 2020 +1200 i2c: algo: pca: Reapply i2c bus settings after reset If something goes wrong (such as the SCL being stuck low) then we need to reset the PCA chip. The issue with this is that on reset we lose all config settings and the chip ends up in a disabled state which results in a lock up/high CPU usage. We need to re-apply any configuration that had previously been set and re-enable the chip. Signed-off-by: Evan Nimmo Reviewed-by: Chris Packham Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 0065ec0054be8da664ac0830bb887dd7574ed251 Merge: 06be67266a0c9 45df80d7605c2 Author: Wolfram Sang Date: Wed Sep 9 10:17:08 2020 +0200 Merge tag 'at24-fixes-for-v5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into i2c/for-current at24 fixes for v5.9-rc5 - delay registration of the nvmem provider until after power is enabled commit 76366050eb1b3151c4b4110c76538ff14dffb74c Author: Daniel Díaz Date: Wed Aug 19 12:32:24 2020 -0500 x86/defconfigs: Explicitly unset CONFIG_64BIT in i386_defconfig A recent refresh of the defconfigs got rid of the following (unset) config: # CONFIG_64BIT is not set Innocuous as it seems, when the config file is saved again the behavior is changed so that CONFIG_64BIT=y. Currently, $ make i386_defconfig $ grep CONFIG_64BIT .config CONFIG_64BIT=y whereas previously (and with this patch): $ make i386_defconfig $ grep CONFIG_64BIT .config # CONFIG_64BIT is not set ( This was found with weird compiler errors on OpenEmbedded builds, as the compiler was unable to cope with 64-bits data types. ) Fixes: 1d0e12fd3a84 ("x86/defconfigs: Refresh defconfig files") Reported-by: Jarkko Nikula Reported-by: Andy Shevchenko Tested-by: Sedat Dilek Signed-off-by: Daniel Díaz Signed-off-by: Ingo Molnar commit 73a5379937ec89b91e907bb315e2434ee9696a2c Author: Sagi Grimberg Date: Tue Sep 8 12:56:08 2020 -0700 nvme-fabrics: allow to queue requests for live queues Right now we are failing requests based on the controller state (which is checked inline in nvmf_check_ready) however we should definitely accept requests if the queue is live. When entering controller reset, we transition the controller into NVME_CTRL_RESETTING, and then return BLK_STS_RESOURCE for non-mpath requests (have blk_noretry_request set). This is also the case for NVME_REQ_USER for the wrong reason. There shouldn't be any reason for us to reject this I/O in a controller reset. We do want to prevent passthru commands on the admin queue because we need the controller to fully initialize first before we let user passthru admin commands to be issued. In a non-mpath setup, this means that the requests will simply be requeued over and over forever not allowing the q_usage_counter to drop its final reference, causing controller reset to hang if running concurrently with heavy I/O. Fixes: 35897b920c8a ("nvme-fabrics: fix and refine state checks in __nvmf_check_ready") Reviewed-by: James Smart Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 0460534b532e5518c657c7d6492b9337d975eaa3 Author: Vaibhav Jain Date: Mon Sep 7 16:35:40 2020 +0530 powerpc/papr_scm: Limit the readability of 'perf_stats' sysfs attribute The newly introduced 'perf_stats' attribute uses the default access mode of 0444, allowing non-root users to access performance stats of an nvdimm and potentially force the kernel into issuing a large number of expensive hypercalls. Since the information exposed by this attribute cannot be cached it is better to ward off access to this attribute from users who don't need to access to these performance statistics. Hence update the access mode of 'perf_stats' attribute to be only readable by root users. Fixes: 2d02bf835e57 ("powerpc/papr_scm: Fetch nvdimm performance stats from PHYP") Reported-by: Aneesh Kumar K.V Signed-off-by: Vaibhav Jain Reviewed-by: Ira Weiny Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200907110540.21349-1-vaibhav@linux.ibm.com commit 20d0a107fb35f37578b919f62bd474d6d358d579 Author: Gabriel Krisman Bertazi Date: Wed Aug 19 16:07:31 2020 -0400 f2fs: Return EOF on unaligned end of file DIO read Reading past end of file returns EOF for aligned reads but -EINVAL for unaligned reads on f2fs. While documentation is not strict about this corner case, most filesystem returns EOF on this case, like iomap filesystems. This patch consolidates the behavior for f2fs, by making it return EOF(0). it can be verified by a read loop on a file that does a partial read before EOF (A file that doesn't end at an aligned address). The following code fails on an unaligned file on f2fs, but not on btrfs, ext4, and xfs. while (done < total) { ssize_t delta = pread(fd, buf + done, total - done, off + done); if (!delta) break; ... } It is arguable whether filesystems should actually return EOF or -EINVAL, but since iomap filesystems support it, and so does the original DIO code, it seems reasonable to consolidate on that. Signed-off-by: Gabriel Krisman Bertazi Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e2cab031ba7b5003cd12185b3ef38f1a75e3dae8 Author: Sahitya Tummala Date: Tue Aug 18 15:40:14 2020 +0530 f2fs: fix indefinite loop scanning for free nid If the sbi->ckpt->next_free_nid is not NAT block aligned and if there are free nids in that NAT block between the start of the block and next_free_nid, then those free nids will not be scanned in scan_nat_page(). This results into mismatch between nm_i->available_nids and the sum of nm_i->free_nid_count of all NAT blocks scanned. And nm_i->available_nids will always be greater than the sum of free nids in all the blocks. Under this condition, if we use all the currently scanned free nids, then it will loop forever in f2fs_alloc_nid() as nm_i->available_nids is still not zero but nm_i->free_nid_count of that partially scanned NAT block is zero. Fix this to align the nm_i->next_scan_nid to the first nid of the corresponding NAT block. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 123aaf774f70ba48fb9ab064b6ce75a9b64d7b85 Author: Shin'ichiro Kawasaki Date: Wed Aug 19 10:34:48 2020 +0900 f2fs: Fix type of section block count variables Commit da52f8ade40b ("f2fs: get the right gc victim section when section has several segments") added code to count blocks of each section using variables with type 'unsigned short', which has 2 bytes size in many systems. However, the counts can be larger than the 2 bytes range and type conversion results in wrong values. Especially when the f2fs sections have blocks as many as USHRT_MAX + 1, the count is handled as 0. This triggers eternal loop in init_dirty_segmap() at mount system call. Fix this by changing the type of the variables to block_t. Fixes: da52f8ade40b ("f2fs: get the right gc victim section when section has several segments") Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ba9e04a7ddf4f22a10e05bf9403db6b97743c7bf Author: Wei Wang Date: Tue Sep 8 14:09:34 2020 -0700 ip: fix tos reflection in ack and reset packets Currently, in tcp_v4_reqsk_send_ack() and tcp_v4_send_reset(), we echo the TOS value of the received packets in the response. However, we do not want to echo the lower 2 ECN bits in accordance with RFC 3168 6.1.5 robustness principles. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Wei Wang Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 6fd40d32ef545628225a00c861908a20bfc510a5 Merge: 2a154988aa4b2 0ff4628f4c6c1 Author: David S. Miller Date: Tue Sep 8 20:12:58 2020 -0700 Merge tag 'ieee802154-for-davem-2020-09-08' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan Stefan Schmidt says: ==================== pull-request: ieee802154 for net 2020-09-08 An update from ieee802154 for your *net* tree. A potential memory leak fix for ca8210 from Liu Jian, a check on the return for a register read in adf7242 and finally a user after free fix in the softmac tx function from Eric found by syzkaller. ==================== Signed-off-by: David S. Miller commit 2a154988aa4b2b87bef5dc0678df675829448e32 Author: Jakub Kicinski Date: Tue Sep 8 09:30:12 2020 -0700 MAINTAINERS: remove John Allen from ibmvnic John's email has bounced and Thomas confirms he no longer works on ibmvnic. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 923f614cdba2842b6f7eaf0713cba1c5668c1b5f Author: Brian Vazquez Date: Tue Sep 8 09:18:12 2020 -0700 fib: fix fib_rule_ops indirect call wrappers when CONFIG_IPV6=m If CONFIG_IPV6=m, the IPV6 functions won't be found by the linker: ld: net/core/fib_rules.o: in function `fib_rules_lookup': fib_rules.c:(.text+0x606): undefined reference to `fib6_rule_match' ld: fib_rules.c:(.text+0x611): undefined reference to `fib6_rule_match' ld: fib_rules.c:(.text+0x68c): undefined reference to `fib6_rule_action' ld: fib_rules.c:(.text+0x693): undefined reference to `fib6_rule_action' ld: fib_rules.c:(.text+0x6aa): undefined reference to `fib6_rule_suppress' ld: fib_rules.c:(.text+0x6bc): undefined reference to `fib6_rule_suppress' make: *** [Makefile:1166: vmlinux] Error 1 Reported-by: Sven Joachim Fixes: b9aaec8f0be5 ("fib: use indirect call wrappers in the most common fib_rules_ops") Acked-by: Randy Dunlap # build-tested Signed-off-by: Brian Vazquez Signed-off-by: David S. Miller commit 2650be2c2d594c4697ff0fdf300cd5274114de0e Merge: 843d926b003ea 0c92411bb81de Author: David S. Miller Date: Tue Sep 8 20:07:58 2020 -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 net: 1) Allow conntrack entries with l3num == NFPROTO_IPV4 or == NFPROTO_IPV6 only via ctnetlink, from Will McVicker. 2) Batch notifications to userspace to improve netlink socket receive utilization. 3) Restore mark based dump filtering via ctnetlink, from Martin Willi. 4) nf_conncount_init() fails with -EPROTO with CONFIG_IPV6, from Eelco Chaudron. 5) Containers fail to match on meta skuid and skgid, use socket user_ns to retrieve meta skuid and skgid. =================== Signed-off-by: David S. Miller commit 843d926b003ea692468c8cc5bea1f9f58dfa8c75 Author: Eric Dumazet Date: Tue Sep 8 01:20:23 2020 -0700 ipv6: avoid lockdep issue in fib6_del() syzbot reported twice a lockdep issue in fib6_del() [1] which I think is caused by net->ipv6.fib6_null_entry having a NULL fib6_table pointer. fib6_del() already checks for fib6_null_entry special case, we only need to return earlier. Bug seems to occur very rarely, I have thus chosen a 'bug origin' that makes backports not too complex. [1] WARNING: suspicious RCU usage 5.9.0-rc4-syzkaller #0 Not tainted ----------------------------- net/ipv6/ip6_fib.c:1996 suspicious rcu_dereference_protected() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 4 locks held by syz-executor.5/8095: #0: ffffffff8a7ea708 (rtnl_mutex){+.+.}-{3:3}, at: ppp_release+0x178/0x240 drivers/net/ppp/ppp_generic.c:401 #1: ffff88804c422dd8 (&net->ipv6.fib6_gc_lock){+.-.}-{2:2}, at: spin_trylock_bh include/linux/spinlock.h:414 [inline] #1: ffff88804c422dd8 (&net->ipv6.fib6_gc_lock){+.-.}-{2:2}, at: fib6_run_gc+0x21b/0x2d0 net/ipv6/ip6_fib.c:2312 #2: ffffffff89bd6a40 (rcu_read_lock){....}-{1:2}, at: __fib6_clean_all+0x0/0x290 net/ipv6/ip6_fib.c:2613 #3: ffff8880a82e6430 (&tb->tb6_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:359 [inline] #3: ffff8880a82e6430 (&tb->tb6_lock){+.-.}-{2:2}, at: __fib6_clean_all+0x107/0x290 net/ipv6/ip6_fib.c:2245 stack backtrace: CPU: 1 PID: 8095 Comm: syz-executor.5 Not tainted 5.9.0-rc4-syzkaller #0 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+0x198/0x1fd lib/dump_stack.c:118 fib6_del+0x12b4/0x1630 net/ipv6/ip6_fib.c:1996 fib6_clean_node+0x39b/0x570 net/ipv6/ip6_fib.c:2180 fib6_walk_continue+0x4aa/0x8e0 net/ipv6/ip6_fib.c:2102 fib6_walk+0x182/0x370 net/ipv6/ip6_fib.c:2150 fib6_clean_tree+0xdb/0x120 net/ipv6/ip6_fib.c:2230 __fib6_clean_all+0x120/0x290 net/ipv6/ip6_fib.c:2246 fib6_clean_all net/ipv6/ip6_fib.c:2257 [inline] fib6_run_gc+0x113/0x2d0 net/ipv6/ip6_fib.c:2320 ndisc_netdev_event+0x217/0x350 net/ipv6/ndisc.c:1805 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2033 call_netdevice_notifiers_extack net/core/dev.c:2045 [inline] call_netdevice_notifiers net/core/dev.c:2059 [inline] dev_close_many+0x30b/0x650 net/core/dev.c:1634 rollback_registered_many+0x3a8/0x1210 net/core/dev.c:9261 rollback_registered net/core/dev.c:9329 [inline] unregister_netdevice_queue+0x2dd/0x570 net/core/dev.c:10410 unregister_netdevice include/linux/netdevice.h:2774 [inline] ppp_release+0x216/0x240 drivers/net/ppp/ppp_generic.c:403 __fput+0x285/0x920 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:141 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:163 [inline] exit_to_user_mode_prepare+0x1e1/0x200 kernel/entry/common.c:190 syscall_exit_to_user_mode+0x7e/0x2e0 kernel/entry/common.c:265 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 421842edeaf6 ("net/ipv6: Add fib6_null_entry") Signed-off-by: Eric Dumazet Cc: David Ahern Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 2f1e8ea726e9020e01e9e2ae29c2d5eb11133032 Author: Vladimir Oltean Date: Tue Sep 8 02:48:42 2020 +0300 net: dsa: link interfaces with the DSA master to get rid of lockdep warnings Since commit 845e0ebb4408 ("net: change addr_list_lock back to static key"), cascaded DSA setups (DSA switch port as DSA master for another DSA switch port) are emitting this lockdep warning: ============================================ WARNING: possible recursive locking detected 5.8.0-rc1-00133-g923e4b5032dd-dirty #208 Not tainted -------------------------------------------- dhcpcd/323 is trying to acquire lock: ffff000066dd4268 (&dsa_master_addr_list_lock_key/1){+...}-{2:2}, at: dev_mc_sync+0x44/0x90 but task is already holding lock: ffff00006608c268 (&dsa_master_addr_list_lock_key/1){+...}-{2:2}, at: dev_mc_sync+0x44/0x90 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&dsa_master_addr_list_lock_key/1); lock(&dsa_master_addr_list_lock_key/1); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by dhcpcd/323: #0: ffffdbd1381dda18 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x24/0x30 #1: ffff00006614b268 (_xmit_ETHER){+...}-{2:2}, at: dev_set_rx_mode+0x28/0x48 #2: ffff00006608c268 (&dsa_master_addr_list_lock_key/1){+...}-{2:2}, at: dev_mc_sync+0x44/0x90 stack backtrace: Call trace: dump_backtrace+0x0/0x1e0 show_stack+0x20/0x30 dump_stack+0xec/0x158 __lock_acquire+0xca0/0x2398 lock_acquire+0xe8/0x440 _raw_spin_lock_nested+0x64/0x90 dev_mc_sync+0x44/0x90 dsa_slave_set_rx_mode+0x34/0x50 __dev_set_rx_mode+0x60/0xa0 dev_mc_sync+0x84/0x90 dsa_slave_set_rx_mode+0x34/0x50 __dev_set_rx_mode+0x60/0xa0 dev_set_rx_mode+0x30/0x48 __dev_open+0x10c/0x180 __dev_change_flags+0x170/0x1c8 dev_change_flags+0x2c/0x70 devinet_ioctl+0x774/0x878 inet_ioctl+0x348/0x3b0 sock_do_ioctl+0x50/0x310 sock_ioctl+0x1f8/0x580 ksys_ioctl+0xb0/0xf0 __arm64_sys_ioctl+0x28/0x38 el0_svc_common.constprop.0+0x7c/0x180 do_el0_svc+0x2c/0x98 el0_sync_handler+0x9c/0x1b8 el0_sync+0x158/0x180 Since DSA never made use of the netdev API for describing links between upper devices and lower devices, the dev->lower_level value of a DSA switch interface would be 1, which would warn when it is a DSA master. We can use netdev_upper_dev_link() to describe the relationship between a DSA slave and a DSA master. To be precise, a DSA "slave" (switch port) is an "upper" to a DSA "master" (host port). The relationship is "many uppers to one lower", like in the case of VLAN. So, for that reason, we use the same function as VLAN uses. There might be a chance that somebody will try to take hold of this interface and use it immediately after register_netdev() and before netdev_upper_dev_link(). To avoid that, we do the registration and linkage while holding the RTNL, and we use the RTNL-locked cousin of register_netdev(), which is register_netdevice(). Since this warning was not there when lockdep was using dynamic keys for addr_list_lock, we are blaming the lockdep patch itself. The network stack _has_ been using static lockdep keys before, and it _is_ likely that stacked DSA setups have been triggering these lockdep warnings since forever, however I can't test very old kernels on this particular stacked DSA setup, to ensure I'm not in fact introducing regressions. Fixes: 845e0ebb4408 ("net: change addr_list_lock back to static key") Suggested-by: Cong Wang Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f9c88aa50b26de3129add13ae4adbb84418b08bb Merge: 20561da3a2e1e 3e8b2403545ef Author: Dave Airlie Date: Wed Sep 9 11:31:15 2020 +1000 Merge tag 'drm-xlnx-dpsub-fixes-20200905' of git://linuxtv.org/pinchartl/media into drm-fixes Kconfig fixes for DRM_ZYNQMP_DPSUB DMA engine dependency Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200905172751.GC6319@pendragon.ideasonboard.com commit e8a8a185051a460e3eb0617dca33f996f4e31516 Author: Omar Sandoval Date: Tue Sep 8 13:46:37 2020 -0700 block: only call sched requeue_request() for scheduled requests Yang Yang reported the following crash caused by requeueing a flush request in Kyber: [ 2.517297] Unable to handle kernel paging request at virtual address ffffffd8071c0b00 ... [ 2.517468] pc : clear_bit+0x18/0x2c [ 2.517502] lr : sbitmap_queue_clear+0x40/0x228 [ 2.517503] sp : ffffff800832bc60 pstate : 00c00145 ... [ 2.517599] Process ksoftirqd/5 (pid: 51, stack limit = 0xffffff8008328000) [ 2.517602] Call trace: [ 2.517606] clear_bit+0x18/0x2c [ 2.517619] kyber_finish_request+0x74/0x80 [ 2.517627] blk_mq_requeue_request+0x3c/0xc0 [ 2.517637] __scsi_queue_insert+0x11c/0x148 [ 2.517640] scsi_softirq_done+0x114/0x130 [ 2.517643] blk_done_softirq+0x7c/0xb0 [ 2.517651] __do_softirq+0x208/0x3bc [ 2.517657] run_ksoftirqd+0x34/0x60 [ 2.517663] smpboot_thread_fn+0x1c4/0x2c0 [ 2.517667] kthread+0x110/0x120 [ 2.517669] ret_from_fork+0x10/0x18 This happens because Kyber doesn't track flush requests, so kyber_finish_request() reads a garbage domain token. Only call the scheduler's requeue_request() hook if RQF_ELVPRIV is set (like we do for the finish_request() hook in blk_mq_free_request()). Now that we're handling it in blk-mq, also remove the check from BFQ. Reported-by: Yang Yang Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe commit c4440b8a457779adeec42c5e181cb4016f19ce0f Author: Hans de Goede Date: Tue Sep 8 16:27:29 2020 -0700 Input: i8042 - add Entroware Proteus EL07R4 to nomux and reset lists The keyboard drops keypresses early during boot unless both the nomux and reset quirks are set. Add DMI table entries for this. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1806085 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200907095656.13155-1-hdegoede@redhat.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit d89a80ddbfd86d04d0901e576ca2016d324bcb85 Author: Tero Kristo Date: Tue Aug 25 16:31:05 2020 +0300 dt-bindings: crypto: sa2ul: fix a DT binding check warning DT binding check produces a warning about bad cell size: Documentation/devicetree/bindings/crypto/ti,sa2ul.example.dt.yaml: example-0: crypto@4e00000:reg:0: [0, 81788928, 0, 4608] is too long From schema: python3.6/site-packages/dtschema/schemas/reg.yaml Fix this by reducing the address sizes for the example to 1 cell from current 2. Fixes: 2ce9a7299bf6 ("dt-bindings: crypto: Add TI SA2UL crypto accelerator documentation") Reported-by: Rob Herring Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Tero Kristo Link: https://lore.kernel.org/r/20200825133106.21542-2-t-kristo@ti.com Signed-off-by: Rob Herring commit 746f534a4809e07f427f7d13d10f3a6a9641e5c3 Author: Tony Ambardar Date: Sat Sep 5 14:48:31 2020 -0700 tools/libbpf: Avoid counting local symbols in ABI check Encountered the following failure building libbpf from kernel 5.8.5 sources with GCC 8.4.0 and binutils 2.34: (long paths shortened) Warning: Num of global symbols in sharedobjs/libbpf-in.o (234) does NOT match with num of versioned symbols in libbpf.so (236). Please make sure all LIBBPF_API symbols are versioned in libbpf.map. --- libbpf_global_syms.tmp 2020-09-02 07:30:58.920084380 +0000 +++ libbpf_versioned_syms.tmp 2020-09-02 07:30:58.924084388 +0000 @@ -1,3 +1,5 @@ +_fini +_init bpf_btf_get_fd_by_id bpf_btf_get_next_id bpf_create_map make[4]: *** [Makefile:210: check_abi] Error 1 Investigation shows _fini and _init are actually local symbols counted amongst global ones: $ readelf --dyn-syms --wide libbpf.so|head -10 Symbol table '.dynsym' contains 343 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00004098 0 SECTION LOCAL DEFAULT 11 2: 00004098 8 FUNC LOCAL DEFAULT 11 _init@@LIBBPF_0.0.1 3: 00023040 8 FUNC LOCAL DEFAULT 14 _fini@@LIBBPF_0.0.1 4: 00000000 0 OBJECT GLOBAL DEFAULT ABS LIBBPF_0.0.4 5: 00000000 0 OBJECT GLOBAL DEFAULT ABS LIBBPF_0.0.1 6: 0000ffa4 8 FUNC GLOBAL DEFAULT 12 bpf_object__find_map_by_offset@@LIBBPF_0.0.1 A previous commit filtered global symbols in sharedobjs/libbpf-in.o. Do the same with the libbpf.so DSO for consistent comparison. Fixes: 306b267cb3c4 ("libbpf: Verify versioned symbols") Signed-off-by: Tony Ambardar Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200905214831.1565465-1-Tony.Ambardar@gmail.com commit e338eecf3fe79054e8a31b8c39a1234b5acfdabe Author: Lorenzo Pieralisi Date: Fri Sep 4 15:09:04 2020 +0100 PCI: rockchip: Fix bus checks in rockchip_pcie_valid_device() The root bus checks rework in d84c572de1a3 ("PCI: rockchip: Use pci_is_root_bus() to check if bus is root bus") caused a regression whereby in rockchip_pcie_valid_device() if the bus parameter is the root bus and the dev value == 0, the function should return 1 (ie true) without checking if the bus->parent pointer is a root bus because that triggers a NULL pointer dereference. Fix this by streamlining the root bus detection. Fixes: d84c572de1a3 ("PCI: rockchip: Use pci_is_root_bus() to check if bus is root bus") Link: https://lore.kernel.org/r/20200904140904.944-1-lorenzo.pieralisi@arm.com Reported-by: Samuel Dionne-Riel Tested-by: Samuel Dionne-Riel Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Cc: Shawn Lin commit 34d4ddd359dbcdf6c5fb3f85a179243d7a1cb7f8 Merge: d6dc7e06826bd 5c1e4f7e9e49b Author: Linus Torvalds Date: Tue Sep 8 11:56:47 2020 -0700 Merge tag 'linux-kselftest-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest fix from Shuah Khan: "A single fix to timers test to disable timeout setting for tests to run and report accurate results" * tag 'linux-kselftest-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: selftests/timers: Turn off timeout setting commit d6dc7e06826bd7bbb654b7a730db99e7020abbf6 Merge: 6f6a73c8b715d b614d55b970d0 Author: Linus Torvalds Date: Tue Sep 8 11:42:58 2020 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Eleven fixes, mostly in drivers or minor fixes in driver related infrastructure libraries (target, libfc and libsas). Most of the bugs fixed only show up under rare circumstances, the exception being the endianness problem in qla2xxx which is used as a device on some sparc systems" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Don't call disable_irq from IRQ poll handler scsi: megaraid_sas: Don't call disable_irq from process IRQ poll scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA scsi: target: iscsi: Fix data digest calculation scsi: lpfc: Update lpfc version to 12.8.0.4 scsi: lpfc: Extend the RDF FPIN Registration descriptor for additional events scsi: lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery scsi: lpfc: Fix setting IRQ affinity with an empty CPU mask scsi: qla2xxx: Fix regression on sparc64 scsi: libfc: Fix for double free() scsi: pm8001: Fix memleak in pm8001_exec_internal_task_abort commit e839317900e9f13c83d8711d684de88c625b307a Author: Tycho Andersen Date: Wed Sep 2 08:09:53 2020 -0600 seccomp: don't leave dangling ->notif if file allocation fails Christian and Kees both pointed out that this is a bit sloppy to open-code both places, and Christian points out that we leave a dangling pointer to ->notif if file allocation fails. Since we check ->notif for null in order to determine if it's ok to install a filter, this means people won't be able to install a filter if the file allocation fails for some reason, even if they subsequently should be able to. To fix this, let's hoist this free+null into its own little helper and use it. Reported-by: Kees Cook Reported-by: Christian Brauner Signed-off-by: Tycho Andersen Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20200902140953.1201956-1-tycho@tycho.pizza Signed-off-by: Kees Cook commit 19d1d49f2a8ce7adb10d93ff31909b0932c0d628 Author: Tycho Andersen Date: Tue Sep 1 19:40:17 2020 -0600 mailmap, MAINTAINERS: move to tycho.pizza I've changed my e-mail address to tycho.pizza, so let's reflect that in these files. Signed-off-by: Tycho Andersen Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20200902014017.934315-2-tycho@tycho.pizza Signed-off-by: Kees Cook commit a566a9012acd7c9a4be7e30dc7acb7a811ec2260 Author: Tycho Andersen Date: Tue Sep 1 19:40:16 2020 -0600 seccomp: don't leak memory when filter install races In seccomp_set_mode_filter() with TSYNC | NEW_LISTENER, we first initialize the listener fd, then check to see if we can actually use it later in seccomp_may_assign_mode(), which can fail if anyone else in our thread group has installed a filter and caused some divergence. If we can't, we partially clean up the newly allocated file: we put the fd, put the file, but don't actually clean up the *memory* that was allocated at filter->notif. Let's clean that up too. To accomplish this, let's hoist the actual "detach a notifier from a filter" code to its own helper out of seccomp_notify_release(), so that in case anyone adds stuff to init_listener(), they only have to add the cleanup code in one spot. This does a bit of extra locking and such on the failure path when the filter is not attached, but it's a slow failure path anyway. Fixes: 51891498f2da ("seccomp: allow TSYNC and USER_NOTIF together") Reported-by: syzbot+3ad9614a12f80994c32e@syzkaller.appspotmail.com Signed-off-by: Tycho Andersen Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20200902014017.934315-1-tycho@tycho.pizza Signed-off-by: Kees Cook commit 6f6a73c8b715d595977774d48450a734297ab21f Merge: 612ab8ad64140 20561da3a2e1e Author: Linus Torvalds Date: Tue Sep 8 11:16:11 2020 -0700 Merge tag 'drm-fixes-2020-09-08' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "The i915 reverts are going to be a bit of a conflict mess for next, so I decided to dequeue them now, along with some msm fixes for a ring corruption issue, that Rob sent over the weekend. Summary: i915: - revert gpu relocation changes due to regression msm: - fixes for RPTR corruption issue" * tag 'drm-fixes-2020-09-08' of git://anongit.freedesktop.org/drm/drm: Revert "drm/i915/gem: Delete unused code" Revert "drm/i915/gem: Async GPU relocations only" Revert "drm/i915: Remove i915_gem_object_get_dirty_page()" drm/msm: Disable the RPTR shadow drm/msm: Disable preemption on all 5xx targets drm/msm: Enable expanded apriv support for a650 drm/msm: Split the a5xx preemption record commit 612ab8ad64140f0f291d7baae45982ce7119839a Merge: f4d51dffc6c01 318af7b80b6a6 Author: Linus Torvalds Date: Tue Sep 8 10:52:59 2020 -0700 Merge tag 'livepatching-for-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching fix from Petr Mladek: "Workaround for 'unreachable instruction' objtool warnings that happen with some compiler versions" * tag 'livepatching-for-5.9-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: Revert "kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled" commit ceb1e0874dba5cbfc4e0b4145796a4bfb3716e6a Author: David Milburn Date: Wed Sep 2 17:42:53 2020 -0500 nvme-tcp: cancel async events before freeing event struct Cancel async event work in case async event has been queued up, and nvme_tcp_submit_async_event() runs after event has been freed. Signed-off-by: David Milburn Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 925dd04c1f9825194b9e444c12478084813b2b5d Author: David Milburn Date: Wed Sep 2 17:42:52 2020 -0500 nvme-rdma: cancel async events before freeing event struct Cancel async event work in case async event has been queued up, and nvme_rdma_submit_async_event() runs after event has been freed. Signed-off-by: David Milburn Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit e126e8210e950bb83414c4f57b3120ddb8450742 Author: David Milburn Date: Wed Sep 2 17:42:54 2020 -0500 nvme-fc: cancel async events before freeing event struct Cancel async event work in case async event has been queued up, and nvme_fc_submit_async_event() runs after event has been freed. Signed-off-by: David Milburn Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit b63de8400a6e1001b5732286cf6f5ec27799b7b4 Author: James Smart Date: Fri Aug 28 12:01:50 2020 -0700 nvme: Revert: Fix controller creation races with teardown flow The indicated patch introduced a barrier in the sysfs_delete attribute for the controller that rejects the request if the controller isn't created. "Created" is defined as at least 1 call to nvme_start_ctrl(). This is problematic in error-injection testing. If an error occurs on the initial attempt to create an association and the controller enters reconnect(s) attempts, the admin cannot delete the controller until either there is a successful association created or ctrl_loss_tmo times out. Where this issue is particularly hurtful is when the "admin" is the nvme-cli, it is performing a connection to a discovery controller, and it is initiated via auto-connect scripts. With the FC transport, if the first connection attempt fails, the controller enters a normal reconnect state but returns control to the cli thread that created the controller. In this scenario, the cli attempts to read the discovery log via ioctl, which fails, causing the cli to see it as an empty log and then proceeds to delete the discovery controller. The delete is rejected and the controller is left live. If the discovery controller reconnect then succeeds, there is no action to delete it, and it sits live doing nothing. Cc: # v5.7+ Fixes: ce1518139e69 ("nvme: Fix controller creation races with teardown flow") Signed-off-by: James Smart CC: Israel Rukshin CC: Max Gurtovoy CC: Christoph Hellwig CC: Keith Busch CC: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 1a5ce48fd667128e369fdc7fb87e21539aed21b5 Author: Camel Guo Date: Tue Sep 8 10:35:21 2020 +0200 ASoC: tlv320adcx140: Wake up codec before accessing register According to its datasheet, after reset this codec goes into sleep mode. In this mode, any register accessing should be avoided except for exiting sleep mode. Hence this commit moves SLEEP_CFG access before any register accessing. Signed-off-by: Camel Guo Acked-by: Dan Murphy Link: https://lore.kernel.org/r/20200908083521.14105-2-camel.guo@axis.com Signed-off-by: Mark Brown commit e6a18d36118bea3bf497c9df4d9988b6df120689 Author: Daniel Borkmann Date: Tue Sep 8 00:04:10 2020 +0200 bpf: Fix clobbering of r2 in bpf_gen_ld_abs Bryce reported that he saw the following with: 0: r6 = r1 1: r1 = 12 2: r0 = *(u16 *)skb[r1] The xlated sequence was incorrectly clobbering r2 with pointer value of r6 ... 0: (bf) r6 = r1 1: (b7) r1 = 12 2: (bf) r1 = r6 3: (bf) r2 = r1 4: (85) call bpf_skb_load_helper_16_no_cache#7692160 ... and hence call to the load helper never succeeded given the offset was too high. Fix it by reordering the load of r6 to r1. Other than that the insn has similar calling convention than BPF helpers, that is, r0 - r5 are scratch regs, so nothing else affected after the insn. Fixes: e0cea7ce988c ("bpf: implement ld_abs/ld_ind in native bpf") Reported-by: Bryce Kahle Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/cace836e4d07bb63b1a53e49c5dfb238a040c298.1599512096.git.daniel@iogearbox.net commit a29c0adbb688ddee61b731804fb360898412fe7e Merge: 7c6bbdf086ac7 2bb70f0a4b238 Author: Greg Kroah-Hartman Date: Tue Sep 8 17:50:58 2020 +0200 Merge tag 'usb-serial-5.9-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.9-rc5 Here are some new device ids for 5.9. All have been in linux-next with no reported issues. * tag 'usb-serial-5.9-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: option: support dynamic Quectel USB compositions USB: serial: option: add support for SIM7070/SIM7080/SIM7090 modules USB: serial: ftdi_sio: add IDs for Xsens Mti USB converter commit 0ff4628f4c6c1ab87eef9f16b25355cadc426d64 Author: Eric Dumazet Date: Tue Sep 8 03:40:25 2020 -0700 mac802154: tx: fix use-after-free syzbot reported a bug in ieee802154_tx() [1] A similar issue in ieee802154_xmit_worker() is also fixed in this patch. [1] BUG: KASAN: use-after-free in ieee802154_tx+0x3d2/0x480 net/mac802154/tx.c:88 Read of size 4 at addr ffff8880251a8c70 by task syz-executor.3/928 CPU: 0 PID: 928 Comm: syz-executor.3 Not tainted 5.9.0-rc3-syzkaller #0 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+0x198/0x1fd lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 ieee802154_tx+0x3d2/0x480 net/mac802154/tx.c:88 ieee802154_subif_start_xmit+0xbe/0xe4 net/mac802154/tx.c:130 __netdev_start_xmit include/linux/netdevice.h:4634 [inline] netdev_start_xmit include/linux/netdevice.h:4648 [inline] dev_direct_xmit+0x4e9/0x6e0 net/core/dev.c:4203 packet_snd net/packet/af_packet.c:2989 [inline] packet_sendmsg+0x2413/0x5290 net/packet/af_packet.c:3014 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d5b9 Code: 5d b4 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 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fc98e749c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000002ccc0 RCX: 000000000045d5b9 RDX: 0000000000000000 RSI: 0000000020007780 RDI: 000000000000000b RBP: 000000000118d020 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cfec R13: 00007fff690c720f R14: 00007fc98e74a9c0 R15: 000000000118cfec Allocated by task 928: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:518 [inline] slab_alloc_node mm/slab.c:3254 [inline] kmem_cache_alloc_node+0x136/0x3e0 mm/slab.c:3574 __alloc_skb+0x71/0x550 net/core/skbuff.c:198 alloc_skb include/linux/skbuff.h:1094 [inline] alloc_skb_with_frags+0x92/0x570 net/core/skbuff.c:5771 sock_alloc_send_pskb+0x72a/0x880 net/core/sock.c:2348 packet_alloc_skb net/packet/af_packet.c:2837 [inline] packet_snd net/packet/af_packet.c:2932 [inline] packet_sendmsg+0x19fb/0x5290 net/packet/af_packet.c:3014 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 928: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track+0x1c/0x30 mm/kasan/common.c:56 kasan_set_free_info+0x1b/0x30 mm/kasan/generic.c:355 __kasan_slab_free+0xd8/0x120 mm/kasan/common.c:422 __cache_free mm/slab.c:3418 [inline] kmem_cache_free.part.0+0x74/0x1e0 mm/slab.c:3693 kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:622 __kfree_skb net/core/skbuff.c:679 [inline] consume_skb net/core/skbuff.c:838 [inline] consume_skb+0xcf/0x160 net/core/skbuff.c:832 __dev_kfree_skb_any+0x9c/0xc0 net/core/dev.c:3107 fakelb_hw_xmit+0x20e/0x2a0 drivers/net/ieee802154/fakelb.c:81 drv_xmit_async net/mac802154/driver-ops.h:16 [inline] ieee802154_tx+0x282/0x480 net/mac802154/tx.c:81 ieee802154_subif_start_xmit+0xbe/0xe4 net/mac802154/tx.c:130 __netdev_start_xmit include/linux/netdevice.h:4634 [inline] netdev_start_xmit include/linux/netdevice.h:4648 [inline] dev_direct_xmit+0x4e9/0x6e0 net/core/dev.c:4203 packet_snd net/packet/af_packet.c:2989 [inline] packet_sendmsg+0x2413/0x5290 net/packet/af_packet.c:3014 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:671 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2353 ___sys_sendmsg+0xf3/0x170 net/socket.c:2407 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2440 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880251a8c00 which belongs to the cache skbuff_head_cache of size 224 The buggy address is located 112 bytes inside of 224-byte region [ffff8880251a8c00, ffff8880251a8ce0) The buggy address belongs to the page: page:0000000062b6a4f1 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x251a8 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0000435c88 ffffea00028b6c08 ffff8880a9055d00 raw: 0000000000000000 ffff8880251a80c0 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880251a8b00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880251a8b80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880251a8c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880251a8c80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8880251a8d00: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb Fixes: 409c3b0c5f03 ("mac802154: tx: move stats tx increment") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Alexander Aring Cc: Stefan Schmidt Cc: linux-wpan@vger.kernel.org Link: https://lore.kernel.org/r/20200908104025.4009085-1-edumazet@google.com Signed-off-by: Stefan Schmidt commit 83048015ff7710b46e7c489458a93c6fe348229d Author: Vignesh Raghavendra Date: Mon Aug 31 18:37:20 2020 +0530 spi: spi-cadence-quadspi: Fix mapping of buffers for DMA reads Buffers need to mapped to DMA channel's device pointer instead of SPI controller's device pointer as its system DMA that actually does data transfer. Data inconsistencies have been reported when reading from flash without this fix. Fixes: ffa639e069fb ("mtd: spi-nor: cadence-quadspi: Add DMA support for direct mode reads") Signed-off-by: Vignesh Raghavendra Tested-by: Jan Kiszka Link: https://lore.kernel.org/r/20200831130720.4524-1-vigneshr@ti.com Signed-off-by: Mark Brown commit 88ce2a530cc9865a894454b2e40eba5957a60e1a Author: Christoph Hellwig Date: Tue Sep 8 16:15:06 2020 +0200 block: restore a specific error code in bdev_del_partition mdadm relies on the fact that deleting an invalid partition returns -ENXIO or -ENOTTY to detect if a block device is a partition or a whole device. Fixes: 08fc1ab6d748 ("block: fix locking in bdev_del_partition") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 0c4c801b31f89cfc1b97207abbab687f43d8e258 Author: Kai Vehmanen Date: Tue Sep 1 18:10:36 2020 +0300 drm/i915: fix regression leading to display audio probe failure on GLK In commit 4f0b4352bd26 ("drm/i915: Extract cdclk requirements checking to separate function") the order of force_min_cdclk_changed check and intel_modeset_checks(), was reversed. This broke the mechanism to immediately force a new CDCLK minimum, and lead to driver probe errors for display audio on GLK platform with 5.9-rc1 kernel. Fix the issue by moving intel_modeset_checks() call later. [vsyrjala: It also broke the ability of planes to bump up the cdclk and thus could lead to underruns when eg. flipping from 32bpp to 64bpp framebuffer. To be clear, we still compute the new cdclk correctly but fail to actually program it to the hardware due to intel_set_cdclk_{pre,post}_plane_update() not getting called on account of state->modeset==false.] Fixes: 4f0b4352bd26 ("drm/i915: Extract cdclk requirements checking to separate function") BugLink: https://github.com/thesofproject/linux/issues/2410 Signed-off-by: Kai Vehmanen Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200901151036.1312357-1-kai.vehmanen@linux.intel.com (cherry picked from commit cf696856bc54a31f78e6538b84c8f7a006b6108b) Signed-off-by: Jani Nikula commit 0c92411bb81de9bc516d6924f50289d8d5f880e5 Author: Pablo Neira Ayuso Date: Thu Sep 3 19:00:52 2020 +0200 netfilter: nft_meta: use socket user_ns to retrieve skuid and skgid ... instead of using init_user_ns. Fixes: 96518518cc41 ("netfilter: add nftables") Tested-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 526e81b990e53e31ba40ba304a2285ffd098721f Author: Eelco Chaudron Date: Tue Sep 1 16:56:02 2020 +0200 netfilter: conntrack: nf_conncount_init is failing with IPv6 disabled The openvswitch module fails initialization when used in a kernel without IPv6 enabled. nf_conncount_init() fails because the ct code unconditionally tries to initialize the netns IPv6 related bit, regardless of the build option. The change below ignores the IPv6 part if not enabled. Note that the corresponding _put() function already has this IPv6 configuration check. Fixes: 11efd5cb04a1 ("openvswitch: Support conntrack zone limit") Signed-off-by: Eelco Chaudron Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 6c0d95d1238d944fe54f0bbfc7ec017d78435daa Author: Martin Willi Date: Tue Sep 1 08:56:19 2020 +0200 netfilter: ctnetlink: fix mark based dump filtering regression conntrack mark based dump filtering may falsely skip entries if a mask is given: If the mask-based check does not filter out the entry, the else-if check is always true and compares the mark without considering the mask. The if/else-if logic seems wrong. Given that the mask during filter setup is implicitly set to 0xffffffff if not specified explicitly, the mark filtering flags seem to just complicate things. Restore the previously used approach by always matching against a zero mask is no filter mark is given. Fixes: cb8aa9a3affb ("netfilter: ctnetlink: add kernel side filtering for dump") Signed-off-by: Martin Willi Signed-off-by: Pablo Neira Ayuso commit 67cc570edaa02016a8685a06a0ee91f05a6277d9 Author: Pablo Neira Ayuso Date: Thu Aug 27 19:28:42 2020 +0200 netfilter: nf_tables: coalesce multiple notifications into one skbuff On x86_64, each notification results in one skbuff allocation which consumes at least 768 bytes due to the skbuff overhead. This patch coalesces several notifications into one single skbuff, so each notification consumes at least ~211 bytes, that ~3.5 times less memory consumption. As a result, this is reducing the chances to exhaust the netlink socket receive buffer. Rule of thumb is that each notification batch only contains netlink messages whose report flag is the same, nfnetlink_send() requires this to do appropriate delivery to userspace, either via unicast (echo mode) or multicast (monitor mode). The skbuff control buffer is used to annotate the report flag for later handling at the new coalescing routine. The batch skbuff notification size is NLMSG_GOODSIZE, using a larger skbuff would allow for more socket receiver buffer savings (to amortize the cost of the skbuff even more), however, going over that size might break userspace applications, so let's be conservative and stick to NLMSG_GOODSIZE. Reported-by: Phil Sutter Acked-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 850280156f6421a404f2351bee07a0e7bedfd4c6 Author: Dan Carpenter Date: Sat Sep 5 15:46:48 2020 +0300 phy: ti: am654: Fix a leak in serdes_am654_probe() If devm_phy_create() fails then we need to call of_clk_del_provider(node) to undo the call to of_clk_add_provider(). Fixes: 71e2f5c5c224 ("phy: ti: Add a new SERDES driver for TI's AM654x SoC") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200905124648.GA183976@mwanda Signed-off-by: Vinod Koul commit 1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6 Author: Will McVicker Date: Mon Aug 24 19:38:32 2020 +0000 netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in an index greater than NFPROTO_NUMPROTO. Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in:... Process poc (pid: 5614, stack limit = 0x00000000a3933121) CPU: 4 PID: 5614 Comm: poc Tainted: G S W O 4.14.180-g051355490483 Hardware name: Qualcomm Technologies, Inc. SM8150 V2 PM8150 Google Inc. MSM task: 000000002a3dfffe task.stack: 00000000a3933121 pc : __cfi_check_fail+0x1c/0x24 lr : __cfi_check_fail+0x1c/0x24 ... Call trace: __cfi_check_fail+0x1c/0x24 name_to_dev_t+0x0/0x468 nfnetlink_parse_nat_setup+0x234/0x258 ctnetlink_parse_nat_setup+0x4c/0x228 ctnetlink_new_conntrack+0x590/0xc40 nfnetlink_rcv_msg+0x31c/0x4d4 netlink_rcv_skb+0x100/0x184 nfnetlink_rcv+0xf4/0x180 netlink_unicast+0x360/0x770 netlink_sendmsg+0x5a0/0x6a4 ___sys_sendmsg+0x314/0x46c SyS_sendmsg+0xb4/0x108 el0_svc_naked+0x34/0x38 This crash is not happening since 5.4+, however, ctnetlink still allows for creating entries with unsupported layer 3 protocol number. Fixes: c1d10adb4a521 ("[NETFILTER]: Add ctnetlink port for nf_conntrack") Signed-off-by: Will McVicker [pablo@netfilter.org: rebased original patch on top of nf.git] Signed-off-by: Pablo Neira Ayuso commit 1d3ee7df009a46440c58508b8819213c09503acd Author: Gautham R. Shenoy Date: Thu Sep 3 14:57:27 2020 +0530 cpuidle: pseries: Fix CEDE latency conversion from tb to us Commit d947fb4c965c ("cpuidle: pseries: Fixup exit latency for CEDE(0)") sets the exit latency of CEDE(0) based on the latency values of the Extended CEDE states advertised by the platform. The values advertised by the platform are in timebase ticks. However the cpuidle framework requires the latency values in microseconds. If the tb-ticks value advertised by the platform correspond to a value smaller than 1us, during the conversion from tb-ticks to microseconds, in the current code, the result becomes zero. This is incorrect as it puts a CEDE state on par with the snooze state. This patch fixes this by rounding up the result obtained while converting the latency value from tb-ticks to microseconds. It also prints a warning in case we discover an extended-cede state with wakeup latency to be 0. In such a case, ensure that CEDE(0) has a non-zero wakeup latency. Fixes: d947fb4c965c ("cpuidle: pseries: Fixup exit latency for CEDE(0)") Signed-off-by: Gautham R. Shenoy Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1599125247-28488-1-git-send-email-ego@linux.vnet.ibm.com commit 06be67266a0c9a6a1ffb330a4ab50c2f21612e2b Author: Tali Perry Date: Mon Aug 31 00:31:21 2020 +0300 i2c: npcm7xx: Fix timeout calculation timeout_usec value calculation was wrong, the calculated value was in msec instead of usec. Fixes: 56a1485b102e ("i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver") Signed-off-by: Tali Perry Reviewed-by: Avi Fishman Reviewed-by: Joel Stanley Reviewed-by: Alex Qiu Signed-off-by: Wolfram Sang commit 20561da3a2e1e0e827ef5510cb0f74bcfd377e41 Author: Dave Airlie Date: Tue Sep 8 15:41:43 2020 +1000 Revert "drm/i915/gem: Delete unused code" These commits caused a regression on Lenovo t520 sandybridge machine belonging to reporter. We are reverting them for 5.10 for other reasons, so just do it for 5.9 as well. This reverts commit 7ac2d2536dfa71c275a74813345779b1e7522c91. Reported-by: Harald Arnesen Signed-off-by: Dave Airlie commit ad5d95e4d538737ed3fa25493777decf264a3011 Author: Dave Airlie Date: Tue Sep 8 15:41:17 2020 +1000 Revert "drm/i915/gem: Async GPU relocations only" These commits caused a regression on Lenovo t520 sandybridge machine belonging to reporter. We are reverting them for 5.10 for other reasons, so just do it for 5.9 as well. This reverts commit 9e0f9464e2ab36b864359a59b0e9058fdef0ce47. Reported-by: Harald Arnesen Signed-off-by: Dave Airlie commit 4993a8a378088be8b2f64fd9d00de9c6fb0a7ce9 Author: Dave Airlie Date: Tue Sep 8 15:40:43 2020 +1000 Revert "drm/i915: Remove i915_gem_object_get_dirty_page()" These commits caused a regression on Lenovo t520 sandybridge machine belonging to reporter. We are reverting them for 5.10 for other reasons, so just do it for 5.9 as well. This reverts commit 763fedd6a216f94c2eb98d2f7ca21be3d3806e69. Reported-by: Harald Arnesen Signed-off-by: Dave Airlie commit 8052ff431a458ede2c17bec6a1717bfe5d600a8b Merge: f4d51dffc6c01 f6828e0c4045f Author: Dave Airlie Date: Tue Sep 8 14:51:10 2020 +1000 Merge tag 'drm-msm-fixes-2020-09-04' of https://gitlab.freedesktop.org/drm/msm into drm-fixes A few fixes for a potential RPTR corruption issue. Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Tue Sep 8 11:51:06 2020 +1000 powerpc/dma: Fix dma_map_ops::get_required_mask There are 2 problems with it: 1. "<" vs expected "<<" 2. the shift number is an IOMMU page number mask, not an address mask as the IOMMU page shift is missing. This did not hit us before f1565c24b596 ("powerpc: use the generic dma_ops_bypass mode") because we had additional code to handle bypass mask so this chunk (almost?) never executed.However there were reports that aacraid does not work with "iommu=nobypass". After f1565c24b596, aacraid (and probably others which call dma_get_required_mask() before setting the mask) was unable to enable 64bit DMA and fall back to using IOMMU which was known not to work, one of the problems is double free of an IOMMU page. This fixes DMA for aacraid, both with and without "iommu=nobypass" in the kernel command line. Verified with "stress-ng -d 4". Fixes: 6a5c7be5e484 ("powerpc: Override dma_get_required_mask by platform hook and ops") Cc: stable@vger.kernel.org # v3.2+ Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200908015106.79661-1-aik@ozlabs.ru commit 19162fd4063a3211843b997a454b505edb81d5ce Author: Dexuan Cui Date: Mon Sep 7 00:13:39 2020 -0700 hv_netvsc: Fix hibernation for mlx5 VF driver mlx5_suspend()/resume() keep the network interface, so during hibernation netvsc_unregister_vf() and netvsc_register_vf() are not called, and hence netvsc_resume() should call netvsc_vf_changed() to switch the data path back to the VF after hibernation. Note: after we close and re-open the vmbus channel of the netvsc NIC in netvsc_suspend() and netvsc_resume(), the data path is implicitly switched to the netvsc NIC. Similarly, netvsc_suspend() should not call netvsc_unregister_vf(), otherwise the VF can no longer be used after hibernation. For mlx4, since the VF network interafce is explicitly destroyed and re-created during hibernation (see mlx4_suspend()/resume()), hv_netvsc already explicitly switches the data path from and to the VF automatically via netvsc_register_vf() and netvsc_unregister_vf(), so mlx4 doesn't need this fix. Note: mlx4 can still work with the fix because in netvsc_suspend()/resume() ndev_ctx->vf_netdev is NULL for mlx4. Fixes: 0efeea5fb153 ("hv_netvsc: Add the support of hibernation") Signed-off-by: Dexuan Cui Signed-off-by: Jakub Kicinski commit e1f469cd5866499ac40bfdca87411e1c525a10c7 Author: Taehee Yoo Date: Mon Sep 7 15:54:41 2020 +0000 Revert "netns: don't disable BHs when locking "nsid_lock"" This reverts commit 8d7e5dee972f1cde2ba96c621f1541fa36e7d4f4. To protect netns id, the nsid_lock is used when netns id is being allocated and removed by peernet2id_alloc() and unhash_nsid(). The nsid_lock can be used in BH context but only spin_lock() is used in this code. Using spin_lock() instead of spin_lock_bh() can result in a deadlock in the following scenario reported by the lockdep. In order to avoid a deadlock, the spin_lock_bh() should be used instead of spin_lock() to acquire nsid_lock. Test commands: ip netns del nst ip netns add nst ip link add veth1 type veth peer name veth2 ip link set veth1 netns nst ip netns exec nst ip link add name br1 type bridge vlan_filtering 1 ip netns exec nst ip link set dev br1 up ip netns exec nst ip link set dev veth1 master br1 ip netns exec nst ip link set dev veth1 up ip netns exec nst ip link add macvlan0 link br1 up type macvlan Splat looks like: [ 33.615860][ T607] WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected [ 33.617194][ T607] 5.9.0-rc1+ #665 Not tainted [ ... ] [ 33.670615][ T607] Chain exists of: [ 33.670615][ T607] &mc->mca_lock --> &bridge_netdev_addr_lock_key --> &net->nsid_lock [ 33.670615][ T607] [ 33.673118][ T607] Possible interrupt unsafe locking scenario: [ 33.673118][ T607] [ 33.674599][ T607] CPU0 CPU1 [ 33.675557][ T607] ---- ---- [ 33.676516][ T607] lock(&net->nsid_lock); [ 33.677306][ T607] local_irq_disable(); [ 33.678517][ T607] lock(&mc->mca_lock); [ 33.679725][ T607] lock(&bridge_netdev_addr_lock_key); [ 33.681166][ T607] [ 33.681791][ T607] lock(&mc->mca_lock); [ 33.682579][ T607] [ 33.682579][ T607] *** DEADLOCK *** [ ... ] [ 33.922046][ T607] stack backtrace: [ 33.922999][ T607] CPU: 3 PID: 607 Comm: ip Not tainted 5.9.0-rc1+ #665 [ 33.924099][ T607] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 33.925714][ T607] Call Trace: [ 33.926238][ T607] dump_stack+0x78/0xab [ 33.926905][ T607] check_irq_usage+0x70b/0x720 [ 33.927708][ T607] ? iterate_chain_key+0x60/0x60 [ 33.928507][ T607] ? check_path+0x22/0x40 [ 33.929201][ T607] ? check_noncircular+0xcf/0x180 [ 33.930024][ T607] ? __lock_acquire+0x1952/0x1f20 [ 33.930860][ T607] __lock_acquire+0x1952/0x1f20 [ 33.931667][ T607] lock_acquire+0xaf/0x3a0 [ 33.932366][ T607] ? peernet2id_alloc+0x3a/0x170 [ 33.933147][ T607] ? br_port_fill_attrs+0x54c/0x6b0 [bridge] [ 33.934140][ T607] ? br_port_fill_attrs+0x5de/0x6b0 [bridge] [ 33.935113][ T607] ? kvm_sched_clock_read+0x14/0x30 [ 33.935974][ T607] _raw_spin_lock+0x30/0x70 [ 33.936728][ T607] ? peernet2id_alloc+0x3a/0x170 [ 33.937523][ T607] peernet2id_alloc+0x3a/0x170 [ 33.938313][ T607] rtnl_fill_ifinfo+0xb5e/0x1400 [ 33.939091][ T607] rtmsg_ifinfo_build_skb+0x8a/0xf0 [ 33.939953][ T607] rtmsg_ifinfo_event.part.39+0x17/0x50 [ 33.940863][ T607] rtmsg_ifinfo+0x1f/0x30 [ 33.941571][ T607] __dev_notify_flags+0xa5/0xf0 [ 33.942376][ T607] ? __irq_work_queue_local+0x49/0x50 [ 33.943249][ T607] ? irq_work_queue+0x1d/0x30 [ 33.943993][ T607] ? __dev_set_promiscuity+0x7b/0x1a0 [ 33.944878][ T607] __dev_set_promiscuity+0x7b/0x1a0 [ 33.945758][ T607] dev_set_promiscuity+0x1e/0x50 [ 33.946582][ T607] br_port_set_promisc+0x1f/0x40 [bridge] [ 33.947487][ T607] br_manage_promisc+0x8b/0xe0 [bridge] [ 33.948388][ T607] __dev_set_promiscuity+0x123/0x1a0 [ 33.949244][ T607] __dev_set_rx_mode+0x68/0x90 [ 33.950021][ T607] dev_uc_add+0x50/0x60 [ 33.950720][ T607] macvlan_open+0x18e/0x1f0 [macvlan] [ 33.951601][ T607] __dev_open+0xd6/0x170 [ 33.952269][ T607] __dev_change_flags+0x181/0x1d0 [ 33.953056][ T607] rtnl_configure_link+0x2f/0xa0 [ 33.953884][ T607] __rtnl_newlink+0x6b9/0x8e0 [ 33.954665][ T607] ? __lock_acquire+0x95d/0x1f20 [ 33.955450][ T607] ? lock_acquire+0xaf/0x3a0 [ 33.956193][ T607] ? is_bpf_text_address+0x5/0xe0 [ 33.956999][ T607] rtnl_newlink+0x47/0x70 Acked-by: Guillaume Nault Fixes: 8d7e5dee972f ("netns: don't disable BHs when locking "nsid_lock"") Reported-by: syzbot+3f960c64a104eaa2c813@syzkaller.appspotmail.com Signed-off-by: Taehee Yoo Signed-off-by: Jakub Kicinski commit 8ae4dff882eb879c17bf46574201bd37fc6bc8b5 Author: Jakub Kicinski Date: Fri Sep 4 21:07:49 2020 -0700 ibmvnic: add missing parenthesis in do_reset() Indentation and logic clearly show that this code is missing parenthesis. Fixes: 9f1345737790 ("ibmvnic fix NULL tx_pools and rx_tools issue at do_reset") Signed-off-by: Jakub Kicinski commit ffa59b0b396cb2c0ea6712ff30ee05c35d4c9c8d Author: Randy Dunlap Date: Sun Sep 6 20:32:30 2020 -0700 netdevice.h: fix xdp_state kernel-doc warning Fix kernel-doc warning in : ../include/linux/netdevice.h:2158: warning: Function parameter or member 'xdp_state' not described in 'net_device' Fixes: 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device") Signed-off-by: Randy Dunlap Cc: Andrii Nakryiko Cc: Alexei Starovoitov Signed-off-by: Jakub Kicinski commit eb02d39ad3099c3dcd96c5b3fdc0303541766ed1 Author: Randy Dunlap Date: Sun Sep 6 20:31:16 2020 -0700 netdevice.h: fix proto_down_reason kernel-doc warning Fix kernel-doc warning in : ../include/linux/netdevice.h:2158: warning: Function parameter or member 'proto_down_reason' not described in 'net_device' Fixes: 829eb208e80d ("rtnetlink: add support for protodown reason") Signed-off-by: Randy Dunlap Acked-by: Roopa Prabhu Signed-off-by: Jakub Kicinski commit 2d892ccdc163a3d2e08c5ed1cea8b61bf7e4f531 Author: Filipe Manana Date: Fri Sep 4 17:22:57 2020 +0100 btrfs: fix NULL pointer dereference after failure to create snapshot When trying to get a new fs root for a snapshot during the transaction at transaction.c:create_pending_snapshot(), if btrfs_get_new_fs_root() fails we leave "pending->snap" pointing to an error pointer, and then later at ioctl.c:create_snapshot() we dereference that pointer, resulting in a crash: [12264.614689] BUG: kernel NULL pointer dereference, address: 00000000000007c4 [12264.615650] #PF: supervisor write access in kernel mode [12264.616487] #PF: error_code(0x0002) - not-present page [12264.617436] PGD 0 P4D 0 [12264.618328] Oops: 0002 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI [12264.619150] CPU: 0 PID: 2310635 Comm: fsstress Tainted: G W 5.9.0-rc3-btrfs-next-67 #1 [12264.619960] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [12264.621769] RIP: 0010:btrfs_mksubvol+0x438/0x4a0 [btrfs] [12264.622528] Code: bc ef ff ff (...) [12264.624092] RSP: 0018:ffffaa6fc7277cd8 EFLAGS: 00010282 [12264.624669] RAX: 00000000fffffff4 RBX: ffff9d3e8f151a60 RCX: 0000000000000000 [12264.625249] RDX: 0000000000000001 RSI: ffffffff9d56c9be RDI: fffffffffffffff4 [12264.625830] RBP: ffff9d3e8f151b48 R08: 0000000000000000 R09: 0000000000000000 [12264.626413] R10: 0000000000000000 R11: 0000000000000000 R12: 00000000fffffff4 [12264.626994] R13: ffff9d3ede380538 R14: ffff9d3ede380500 R15: ffff9d3f61b2eeb8 [12264.627582] FS: 00007f140d5d8200(0000) GS:ffff9d3fb5e00000(0000) knlGS:0000000000000000 [12264.628176] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [12264.628773] CR2: 00000000000007c4 CR3: 000000020f8e8004 CR4: 00000000003706f0 [12264.629379] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [12264.629994] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [12264.630594] Call Trace: [12264.631227] btrfs_mksnapshot+0x7b/0xb0 [btrfs] [12264.631840] __btrfs_ioctl_snap_create+0x16f/0x1a0 [btrfs] [12264.632458] btrfs_ioctl_snap_create_v2+0xb0/0xf0 [btrfs] [12264.633078] btrfs_ioctl+0x1864/0x3130 [btrfs] [12264.633689] ? do_sys_openat2+0x1a7/0x2d0 [12264.634295] ? kmem_cache_free+0x147/0x3a0 [12264.634899] ? __x64_sys_ioctl+0x83/0xb0 [12264.635488] __x64_sys_ioctl+0x83/0xb0 [12264.636058] do_syscall_64+0x33/0x80 [12264.636616] entry_SYSCALL_64_after_hwframe+0x44/0xa9 (gdb) list *(btrfs_mksubvol+0x438) 0x7c7b8 is in btrfs_mksubvol (fs/btrfs/ioctl.c:858). 853 ret = 0; 854 pending_snapshot->anon_dev = 0; 855 fail: 856 /* Prevent double freeing of anon_dev */ 857 if (ret && pending_snapshot->snap) 858 pending_snapshot->snap->anon_dev = 0; 859 btrfs_put_root(pending_snapshot->snap); 860 btrfs_subvolume_release_metadata(root, &pending_snapshot->block_rsv); 861 free_pending: 862 if (pending_snapshot->anon_dev) So fix this by setting "pending->snap" to NULL if we get an error from the call to btrfs_get_new_fs_root() at transaction.c:create_pending_snapshot(). Fixes: 2dfb1e43f57dd3 ("btrfs: preallocate anon block device at first phase of snapshot creation") Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 72bbee2aea29342b39a7925108e6dad7bbfca8d0 Merge: 4ddcaf1ebb5e4 b16939b59cc00 Author: Jakub Kicinski Date: Mon Sep 7 10:08:37 2020 -0700 Merge branch 'bnxt_en-Two-bug-fixes' Michael Chan says: ==================== bnxt_en: Two bug fixes. The first patch fixes AER recovery by reducing the time from several minutes to a more reasonable 20 - 30 seconds. The second patch fixes a possible NULL pointer crash during firmware reset. ==================== Signed-off-by: Jakub Kicinski commit b16939b59cc00231a75d224fd058d22c9d064976 Author: Vasundhara Volam Date: Sat Sep 5 22:55:37 2020 -0400 bnxt_en: Fix NULL ptr dereference crash in bnxt_fw_reset_task() bnxt_fw_reset_task() which runs from a workqueue can race with bnxt_remove_one(). For example, if firmware reset and VF FLR are happening at about the same time. bnxt_remove_one() already cancels the workqueue and waits for it to finish, but we need to do this earlier before the devlink reporters are destroyed. This will guarantee that the devlink reporters will always be valid when bnxt_fw_reset_task() is still running. Fixes: b148bb238c02 ("bnxt_en: Fix possible crash in bnxt_fw_reset_task().") Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit b340dc680ed48dcc05b56e1ebe1b9535813c3ee0 Author: Vasundhara Volam Date: Sat Sep 5 22:55:36 2020 -0400 bnxt_en: Avoid sending firmware messages when AER error is detected. When the driver goes through PCIe AER reset in error state, all firmware messages will timeout because the PCIe bus is no longer accessible. This can lead to AER reset taking many minutes to complete as each firmware command takes time to timeout. Define a new macro BNXT_NO_FW_ACCESS() to skip these firmware messages when either firmware is in fatal error state or when pci_channel_offline() is true. It now takes a more reasonable 20 to 30 seconds to complete AER recovery. Fixes: b4fff2079d10 ("bnxt_en: Do not send firmware messages if firmware is in error state.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: Jakub Kicinski commit 7c6bbdf086ac7f1374bcf1ef0994b15109ecaf48 Author: Utkarsh Patel Date: Mon Sep 7 17:21:52 2020 +0300 usb: typec: intel_pmc_mux: Do not configure SBU and HSL Orientation in Alternate modes According to the PMC Type C Subsystem (TCSS) Mux programming guide rev 0.7, bits 4 and 5 are reserved in Alternate modes. SBU Orientation and HSL Orientation needs to be configured only during initial cable detection in USB connect flow based on device property of "sbu-orientation" and "hsl-orientation". Configuring these reserved bits in the Alternate modes may result in delay in display link training or some unexpected behaviour. So do not configure them while issuing Alternate Mode requests. Fixes: ff4a30d5e243 ("usb: typec: mux: intel_pmc_mux: Support for static SBU/HSL orientation") Signed-off-by: Utkarsh Patel Cc: stable Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200907142152.35678-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 294955fd43dbf1e8f3a84cffa4797c6f22badc31 Author: Utkarsh Patel Date: Mon Sep 7 17:21:51 2020 +0300 usb: typec: intel_pmc_mux: Do not configure Altmode HPD High According to the PMC Type C Subsystem (TCSS) Mux programming guide rev 0.7, bit 14 is reserved in Alternate mode. In DP Alternate Mode state, if the HPD_STATE (bit 7) field in the status update command VDO is set to HPD_HIGH, HPD is configured via separate HPD mode request after configuring DP Alternate mode request. Configuring reserved bit may show unexpected behaviour. So do not configure them while issuing the Alternate Mode request. Fixes: 7990be48ef4d ("usb: typec: mux: intel: Handle alt mode HPD_HIGH") Cc: stable@vger.kernel.org Signed-off-by: Utkarsh Patel Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200907142152.35678-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 162343a876f14f7604881dd2bc53ca140c82c230 Author: Rustam Kovhaev Date: Mon Aug 10 08:36:50 2020 -0700 scripts/tags.sh: exclude tools directory from tags generation when COMPILED_SOURCE is set, running 'make ARCH=x86_64 COMPILED_SOURCE=1 cscope tags' in KBUILD_OUTPUT directory produces lots of "No such file or directory" warnings: ... realpath: sigchain.h: No such file or directory realpath: orc_gen.c: No such file or directory realpath: objtool.c: No such file or directory ... let's exclude tools directory from tags generation Fixes: 4f491bb6ea2a ("scripts/tags.sh: collect compiled source precisely") Link: https://lore.kernel.org/lkml/20200809210056.GA1344537@thinkpad Signed-off-by: Rustam Kovhaev Link: https://lore.kernel.org/r/20200810153650.1822316-1-rkovhaev@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9e3aa8054453d23d9f477f0cdae70a6a1ea6ec8a Author: Josef Bacik Date: Thu Sep 3 14:29:50 2020 -0400 btrfs: free data reloc tree on failed mount While testing a weird problem with -o degraded, I noticed I was getting leaked root errors BTRFS warning (device loop0): writable mount is not allowed due to too many missing devices BTRFS error (device loop0): open_ctree failed BTRFS error (device loop0): leaked root -9-0 refcount 1 This is the DATA_RELOC root, which gets read before the other fs roots, but is included in the fs roots radix tree. Handle this by adding a btrfs_drop_and_free_fs_root() on the data reloc root if it exists. This is ok to do here if we fail further up because we will only drop the ref if we delete the root from the radix tree, and all other cleanup won't be duplicated. CC: stable@vger.kernel.org # 5.8+ Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit ea57788eb76dc81f6003245427356a1dcd0ac524 Author: Qu Wenruo Date: Wed Aug 26 17:26:43 2020 +0800 btrfs: require only sector size alignment for parent eb bytenr [BUG] A completely sane converted fs will cause kernel warning at balance time: [ 1557.188633] BTRFS info (device sda7): relocating block group 8162107392 flags data [ 1563.358078] BTRFS info (device sda7): found 11722 extents [ 1563.358277] BTRFS info (device sda7): leaf 7989321728 gen 95 total ptrs 213 free space 3458 owner 2 [ 1563.358280] item 0 key (7984947200 169 0) itemoff 16250 itemsize 33 [ 1563.358281] extent refs 1 gen 90 flags 2 [ 1563.358282] ref#0: tree block backref root 4 [ 1563.358285] item 1 key (7985602560 169 0) itemoff 16217 itemsize 33 [ 1563.358286] extent refs 1 gen 93 flags 258 [ 1563.358287] ref#0: shared block backref parent 7985602560 [ 1563.358288] (parent 7985602560 is NOT ALIGNED to nodesize 16384) [ 1563.358290] item 2 key (7985635328 169 0) itemoff 16184 itemsize 33 ... [ 1563.358995] BTRFS error (device sda7): eb 7989321728 invalid extent inline ref type 182 [ 1563.358996] ------------[ cut here ]------------ [ 1563.359005] WARNING: CPU: 14 PID: 2930 at 0xffffffff9f231766 Then with transaction abort, and obviously failed to balance the fs. [CAUSE] That mentioned inline ref type 182 is completely sane, it's BTRFS_SHARED_BLOCK_REF_KEY, it's some extra check making kernel to believe it's invalid. Commit 64ecdb647ddb ("Btrfs: add one more sanity check for shared ref type") introduced extra checks for backref type. One of the requirement is, parent bytenr must be aligned to node size, which is not correct. One example is like this: 0 1G 1G+4K 2G 2G+4K | |///////////////////|//| <- A chunk starts at 1G+4K | | <- A tree block get reserved at bytenr 1G+4K Then we have a valid tree block at bytenr 1G+4K, but not aligned to nodesize (16K). Such chunk is not ideal, but current kernel can handle it pretty well. We may warn about such tree block in the future, but should not reject them. [FIX] Change the alignment requirement from node size alignment to sector size alignment. Also, to make our lives a little easier, also output @iref when btrfs_get_extent_inline_ref_type() failed, so we can locate the item easier. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205475 Fixes: 64ecdb647ddb ("Btrfs: add one more sanity check for shared ref type") CC: stable@vger.kernel.org # 4.14+ Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo [ update comments and messages ] Signed-off-by: David Sterba commit fccc0007b8dc952c6bc0805cdf842eb8ea06a639 Author: Josef Bacik Date: Mon Aug 31 10:52:42 2020 -0400 btrfs: fix lockdep splat in add_missing_dev Nikolay reported a lockdep splat in generic/476 that I could reproduce with btrfs/187. ====================================================== WARNING: possible circular locking dependency detected 5.9.0-rc2+ #1 Tainted: G W ------------------------------------------------------ kswapd0/100 is trying to acquire lock: ffff9e8ef38b6268 (&delayed_node->mutex){+.+.}-{3:3}, at: __btrfs_release_delayed_node.part.0+0x3f/0x330 but task is already holding lock: ffffffffa9d74700 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x5/0x30 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (fs_reclaim){+.+.}-{0:0}: fs_reclaim_acquire+0x65/0x80 slab_pre_alloc_hook.constprop.0+0x20/0x200 kmem_cache_alloc_trace+0x3a/0x1a0 btrfs_alloc_device+0x43/0x210 add_missing_dev+0x20/0x90 read_one_chunk+0x301/0x430 btrfs_read_sys_array+0x17b/0x1b0 open_ctree+0xa62/0x1896 btrfs_mount_root.cold+0x12/0xea legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 vfs_kern_mount.part.0+0x71/0xb0 btrfs_mount+0x10d/0x379 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 path_mount+0x434/0xc00 __x64_sys_mount+0xe3/0x120 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&fs_info->chunk_mutex){+.+.}-{3:3}: __mutex_lock+0x7e/0x7e0 btrfs_chunk_alloc+0x125/0x3a0 find_free_extent+0xdf6/0x1210 btrfs_reserve_extent+0xb3/0x1b0 btrfs_alloc_tree_block+0xb0/0x310 alloc_tree_block_no_bg_flush+0x4a/0x60 __btrfs_cow_block+0x11a/0x530 btrfs_cow_block+0x104/0x220 btrfs_search_slot+0x52e/0x9d0 btrfs_lookup_inode+0x2a/0x8f __btrfs_update_delayed_inode+0x80/0x240 btrfs_commit_inode_delayed_inode+0x119/0x120 btrfs_evict_inode+0x357/0x500 evict+0xcf/0x1f0 vfs_rmdir.part.0+0x149/0x160 do_rmdir+0x136/0x1a0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&delayed_node->mutex){+.+.}-{3:3}: __lock_acquire+0x1184/0x1fa0 lock_acquire+0xa4/0x3d0 __mutex_lock+0x7e/0x7e0 __btrfs_release_delayed_node.part.0+0x3f/0x330 btrfs_evict_inode+0x24c/0x500 evict+0xcf/0x1f0 dispose_list+0x48/0x70 prune_icache_sb+0x44/0x50 super_cache_scan+0x161/0x1e0 do_shrink_slab+0x178/0x3c0 shrink_slab+0x17c/0x290 shrink_node+0x2b2/0x6d0 balance_pgdat+0x30a/0x670 kswapd+0x213/0x4c0 kthread+0x138/0x160 ret_from_fork+0x1f/0x30 other info that might help us debug this: Chain exists of: &delayed_node->mutex --> &fs_info->chunk_mutex --> fs_reclaim Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(&fs_info->chunk_mutex); lock(fs_reclaim); lock(&delayed_node->mutex); *** DEADLOCK *** 3 locks held by kswapd0/100: #0: ffffffffa9d74700 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x5/0x30 #1: ffffffffa9d65c50 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x115/0x290 #2: ffff9e8e9da260e0 (&type->s_umount_key#48){++++}-{3:3}, at: super_cache_scan+0x38/0x1e0 stack backtrace: CPU: 1 PID: 100 Comm: kswapd0 Tainted: G W 5.9.0-rc2+ #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 Call Trace: dump_stack+0x92/0xc8 check_noncircular+0x12d/0x150 __lock_acquire+0x1184/0x1fa0 lock_acquire+0xa4/0x3d0 ? __btrfs_release_delayed_node.part.0+0x3f/0x330 __mutex_lock+0x7e/0x7e0 ? __btrfs_release_delayed_node.part.0+0x3f/0x330 ? __btrfs_release_delayed_node.part.0+0x3f/0x330 ? lock_acquire+0xa4/0x3d0 ? btrfs_evict_inode+0x11e/0x500 ? find_held_lock+0x2b/0x80 __btrfs_release_delayed_node.part.0+0x3f/0x330 btrfs_evict_inode+0x24c/0x500 evict+0xcf/0x1f0 dispose_list+0x48/0x70 prune_icache_sb+0x44/0x50 super_cache_scan+0x161/0x1e0 do_shrink_slab+0x178/0x3c0 shrink_slab+0x17c/0x290 shrink_node+0x2b2/0x6d0 balance_pgdat+0x30a/0x670 kswapd+0x213/0x4c0 ? _raw_spin_unlock_irqrestore+0x46/0x60 ? add_wait_queue_exclusive+0x70/0x70 ? balance_pgdat+0x670/0x670 kthread+0x138/0x160 ? kthread_create_worker_on_cpu+0x40/0x40 ret_from_fork+0x1f/0x30 This is because we are holding the chunk_mutex when we call btrfs_alloc_device, which does a GFP_KERNEL allocation. We don't want to switch that to a GFP_NOFS lock because this is the only place where it matters. So instead use memalloc_nofs_save() around the allocation in order to avoid the lockdep splat. Reported-by: Nikolay Borisov CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1c30474826682bc970c3200700d8bcfa2b771278 Author: Randy Dunlap Date: Sun Sep 6 20:42:52 2020 -0700 PM: : fix @em_pd kernel-doc warning Fix kernel-doc warning in : ../include/linux/device.h:613: warning: Function parameter or member 'em_pd' not described in 'device' Fixes: 1bc138c62295 ("PM / EM: add support for other devices than CPUs in Energy Model") Signed-off-by: Randy Dunlap Cc: Rafael J. Wysocki Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/d97f40ad-3033-703a-c3cb-2843ce0f6371@infradead.org Signed-off-by: Greg Kroah-Hartman commit 3ae90d764093dfcd6ab8ab6875377302892c87d4 Author: Stafford Horne Date: Thu Sep 3 05:48:58 2020 +0900 openrisc: Fix cache API compile issue when not inlining I found this when compiling a kbuild random config with GCC 11. The config enables CONFIG_DEBUG_SECTION_MISMATCH, which sets CFLAGS -fno-inline-functions-called-once. This causes the call to cache_loop in cache.c to not be inlined causing the below compile error. In file included from arch/openrisc/mm/cache.c:13: arch/openrisc/mm/cache.c: In function 'cache_loop': ./arch/openrisc/include/asm/spr.h:16:27: warning: 'asm' operand 0 probably does not match constraints 16 | #define mtspr(_spr, _val) __asm__ __volatile__ ( \ | ^~~~~~~ arch/openrisc/mm/cache.c:25:3: note: in expansion of macro 'mtspr' 25 | mtspr(reg, line); | ^~~~~ ./arch/openrisc/include/asm/spr.h:16:27: error: impossible constraint in 'asm' 16 | #define mtspr(_spr, _val) __asm__ __volatile__ ( \ | ^~~~~~~ arch/openrisc/mm/cache.c:25:3: note: in expansion of macro 'mtspr' 25 | mtspr(reg, line); | ^~~~~ make[1]: *** [scripts/Makefile.build:283: arch/openrisc/mm/cache.o] Error 1 The asm constraint "K" requires a immediate constant argument to mtspr, however because of no inlining a register argument is passed causing a failure. Fix this by using __always_inline. Link: https://lore.kernel.org/lkml/202008200453.ohnhqkjQ%25lkp@intel.com/ Signed-off-by: Stafford Horne commit 141d170495beb4772fad653312364dac6f4716f5 Author: Stafford Horne Date: Sun Aug 30 20:58:11 2020 +0900 openrisc: Reserve memblock for initrd Recently OpenRISC added support for external initrd images, but I found some instability when using larger buildroot initrd images. It turned out that I forgot to reserve the memblock space for the initrd image. This patch fixes the instability issue by reserving memblock space. Fixes: ff6c923dbec3 ("openrisc: Add support for external initrd images") Signed-off-by: Stafford Horne Reviewed-by: Mike Rapoport commit ea8be08cc9358f811e4175ba7fa7fea23c5d393e Author: Marek Vasut Date: Sat Sep 5 17:19:13 2020 +0200 spi: stm32: Rate-limit the 'Communication suspended' message The 'spi_stm32 44004000.spi: Communication suspended' message means that when using PIO, the kernel did not read the FIFO fast enough and so the SPI controller paused the transfer. Currently, this is printed on every single such event, so if the kernel is busy and the controller is pausing the transfers often, the kernel will be all the more busy scrolling this message into the log buffer every few milliseconds. That is not helpful. Instead, rate-limit the message and print it every once in a while. It is not possible to use the default dev_warn_ratelimited(), because that is still too verbose, as it prints 10 lines (DEFAULT_RATELIMIT_BURST) every 5 seconds (DEFAULT_RATELIMIT_INTERVAL). The policy here is to print 1 line every 50 seconds (DEFAULT_RATELIMIT_INTERVAL * 10), because 1 line is more than enough and the cycles saved on printing are better left to the CPU to handle the SPI. However, dev_warn_once() is also not useful, as the user should be aware that this condition is possibly recurring or ongoing. Thus the custom rate-limit policy. Finally, turn the message from dev_warn() to dev_dbg(), since the system does not suffer any sort of malfunction if this message appears, it is just slowing down. This further reduces the printing into the log buffer and frees the CPU to do useful work. Fixes: dcbe0d84dfa5 ("spi: add driver for STM32 SPI controller") Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Amelie Delaunay Cc: Antonio Borneo Cc: Mark Brown Link: https://lore.kernel.org/r/20200905151913.117775-1-marex@denx.de Signed-off-by: Mark Brown commit 20244b2a8a8728c63233d33146e007dcacbcc5c4 Author: Cezary Rojewski Date: Mon Sep 7 13:19:39 2020 +0200 ASoC: core: Do not cleanup uninitialized dais on soc_pcm_open failure Introduce for_each_rtd_dais_rollback macro which behaves exactly like for_each_codec_dais_rollback and its cpu_dais equivalent but for all dais instead. Use newly added macro to fix soc_pcm_open error path and prevent uninitialized dais from being cleaned-up. Signed-off-by: Cezary Rojewski Fixes: 5d9fa03e6c35 ("ASoC: soc-pcm: tidyup soc_pcm_open() order") Acked-by: Liam Girdwood Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20200907111939.16169-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit f44d04e696feaf13d192d942c4f14ad2e117065a Author: Ilya Dryomov Date: Thu Sep 3 13:24:11 2020 +0200 rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/remove --w------- 1 root root 4096 Sep 3 20:38 /sys/bus/rbd/remove_single_major This means that images can be mapped and unmapped (i.e. block devices can be created and deleted) by a UID 0 process even after it drops all privileges or by any process with CAP_DAC_OVERRIDE in its user namespace as long as UID 0 is mapped into that user namespace. Be consistent with other virtual block devices (loop, nbd, dm, md, etc) and require CAP_SYS_ADMIN in the initial user namespace for mapping and unmapping, and also for dumping the configuration string and refreshing the image header. Cc: stable@vger.kernel.org Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton commit 8366685b2883e523f91e9816d7be371eb1144749 Author: Antony Antony Date: Fri Sep 4 08:50:29 2020 +0200 xfrm: clone whole liftime_cur structure in xfrm_do_migrate When we clone state only add_time was cloned. It missed values like bytes, packets. Now clone the all members of the structure. v1->v3: - use memcpy to copy the entire structure Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint address(es)") Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert commit 7aa05d304785204703a67a6aa7f1db402889a172 Author: Antony Antony Date: Fri Sep 4 08:50:11 2020 +0200 xfrm: clone XFRMA_SEC_CTX in xfrm_do_migrate XFRMA_SEC_CTX was not cloned from the old to the new. Migrate this attribute during XFRMA_MSG_MIGRATE v1->v2: - return -ENOMEM on error v2->v3: - fix return type to int Fixes: 80c9abaabf42 ("[XFRM]: Extension for dynamic update of endpoint address(es)") Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert commit 91a46c6d1b4fcbfa4773df9421b8ad3e58088101 Author: Antony Antony Date: Fri Sep 4 08:49:55 2020 +0200 xfrm: clone XFRMA_REPLAY_ESN_VAL in xfrm_do_migrate XFRMA_REPLAY_ESN_VAL was not cloned completely from the old to the new. Migrate this attribute during XFRMA_MSG_MIGRATE v1->v2: - move curleft cloning to a separate patch Fixes: af2f464e326e ("xfrm: Assign esn pointers when cloning a state") Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert commit 545e5c571662b1cd79d9588f9d3b6e36985b8007 Author: Antony Antony Date: Fri Sep 4 08:49:38 2020 +0200 xfrm: clone XFRMA_SET_MARK in xfrm_do_migrate XFRMA_SET_MARK and XFRMA_SET_MARK_MASK was not cloned from the old to the new. Migrate these two attributes during XFRMA_MSG_MIGRATE Fixes: 9b42c1f179a6 ("xfrm: Extend the output_mark to support input direction and masking.") Signed-off-by: Antony Antony Signed-off-by: Steffen Klassert commit 07ecc6693f9157cf293da5d165c73fb28fd69bf4 Author: Andy Shevchenko Date: Mon Aug 3 11:35:20 2020 +0300 kobject: Drop unneeded conditional in __kobject_del() __kobject_del() is called from two places, in one where kobj is dereferenced before and thus can't be NULL, and in the other the NULL check is done before call. Drop unneeded conditional in __kobject_del(). Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20200803083520.5460-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1264c1e0cfe55e2d6c35e869244093195529af37 Author: Mauro Carvalho Chehab Date: Wed Aug 26 07:49:34 2020 +0200 Revert "wlcore: Adding suppoprt for IGTK key in wlcore driver" This patch causes a regression betwen Kernel 5.7 and 5.8 at wlcore: with it applied, WiFi stops working, and the Kernel starts printing this message every second: wlcore: PHY firmware version: Rev 8.2.0.0.242 wlcore: firmware booted (Rev 8.9.0.0.79) wlcore: ERROR command execute failure 14 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 133 at drivers/net/wireless/ti/wlcore/main.c:795 wl12xx_queue_recovery_work.part.0+0x6c/0x74 [wlcore] Modules linked in: wl18xx wlcore mac80211 libarc4 cfg80211 rfkill snd_soc_hdmi_codec crct10dif_ce wlcore_sdio adv7511 cec kirin9xx_drm(C) kirin9xx_dw_drm_dsi(C) drm_kms_helper drm ip_tables x_tables ipv6 nf_defrag_ipv6 CPU: 0 PID: 133 Comm: kworker/0:1 Tainted: G WC 5.8.0+ #186 Hardware name: HiKey970 (DT) Workqueue: events_freezable ieee80211_restart_work [mac80211] pstate: 60000005 (nZCv daif -PAN -UAO BTYPE=--) pc : wl12xx_queue_recovery_work.part.0+0x6c/0x74 [wlcore] lr : wl12xx_queue_recovery_work+0x24/0x30 [wlcore] sp : ffff8000126c3a60 x29: ffff8000126c3a60 x28: 00000000000025de x27: 0000000000000010 x26: 0000000000000005 x25: ffff0001a5d49e80 x24: ffff8000092cf580 x23: ffff0001b7c12623 x22: ffff0001b6fcf2e8 x21: ffff0001b7e46200 x20: 00000000fffffffb x19: ffff0001a78e6400 x18: 0000000000000030 x17: 0000000000000001 x16: 0000000000000001 x15: ffff0001b7e46670 x14: ffffffffffffffff x13: ffff8000926c37d7 x12: ffff8000126c37e0 x11: ffff800011e01000 x10: ffff8000120526d0 x9 : 0000000000000000 x8 : 3431206572756c69 x7 : 6166206574756365 x6 : 0000000000000c2c x5 : 0000000000000000 x4 : ffff0001bf1361e8 x3 : ffff0001bf1790b0 x2 : 0000000000000000 x1 : ffff0001a5d49e80 x0 : 0000000000000001 Call trace: wl12xx_queue_recovery_work.part.0+0x6c/0x74 [wlcore] wl12xx_queue_recovery_work+0x24/0x30 [wlcore] wl1271_cmd_set_sta_key+0x258/0x25c [wlcore] wl1271_set_key+0x7c/0x2dc [wlcore] wlcore_set_key+0xe4/0x360 [wlcore] wl18xx_set_key+0x48/0x1d0 [wl18xx] wlcore_op_set_key+0xa4/0x180 [wlcore] ieee80211_key_enable_hw_accel+0xb0/0x2d0 [mac80211] ieee80211_reenable_keys+0x70/0x110 [mac80211] ieee80211_reconfig+0xa00/0xca0 [mac80211] ieee80211_restart_work+0xc4/0xfc [mac80211] process_one_work+0x1cc/0x350 worker_thread+0x13c/0x470 kthread+0x154/0x160 ret_from_fork+0x10/0x30 ---[ end trace b1f722abf9af5919 ]--- wlcore: WARNING could not set keys wlcore: ERROR Could not add or replace key wlan0: failed to set key (4, ff:ff:ff:ff:ff:ff) to hardware (-5) wlcore: Hardware recovery in progress. FW ver: Rev 8.9.0.0.79 wlcore: pc: 0x0, hint_sts: 0x00000040 count: 39 wlcore: down wlcore: down ieee80211 phy0: Hardware restart was requested mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0) mmc_host mmc0: Bus speed (slot 0) = 25000000Hz (slot req 25000000Hz, actual 25000000HZ div = 0) wlcore: PHY firmware version: Rev 8.2.0.0.242 wlcore: firmware booted (Rev 8.9.0.0.79) wlcore: ERROR command execute failure 14 ------------[ cut here ]------------ Tested on Hikey 970. This reverts commit 2b7aadd3b9e17e8b81eeb8d9cc46756ae4658265. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/f0a2cb7ea606f1a284d4c23cbf983da2954ce9b6.1598420968.git.mchehab+huawei@kernel.org commit c3cdf189276c2a63da62ee250615bd55e3fb680d Author: Luke D Jones Date: Mon Sep 7 20:19:59 2020 +1200 ALSA: hda: fixup headset for ASUS GX502 laptop The GX502 requires a few steps to enable the headset i/o: pincfg, verbs to enable and unmute the amp used for headpone out, and a jacksense callback to toggle output via internal or jack using a verb. Signed-off-by: Luke D Jones Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208005 Link: https://lore.kernel.org/r/20200907081959.56186-1-luke@ljones.dev Signed-off-by: Takashi Iwai commit f0c393e2104e48c8a881719a8bd37996f71b0aee Author: Adrian Hunter Date: Thu Sep 3 11:20:07 2020 +0300 mmc: sdio: Use mmc_pre_req() / mmc_post_req() SDHCI changed from using a tasklet to finish requests, to using an IRQ thread i.e. commit c07a48c2651965 ("mmc: sdhci: Remove finish_tasklet"). Because this increased the latency to complete requests, a preparatory change was made to complete the request from the IRQ handler if possible i.e. commit 19d2f695f4e827 ("mmc: sdhci: Call mmc_request_done() from IRQ handler if possible"). That alleviated the situation for MMC block devices because the MMC block driver makes use of mmc_pre_req() and mmc_post_req() so that successful requests are completed in the IRQ handler and any DMA unmapping is handled separately in mmc_post_req(). However SDIO was still affected, and an example has been reported with up to 20% degradation in performance. Looking at SDIO I/O helper functions, sdio_io_rw_ext_helper() appeared to be a possible candidate for making use of asynchronous requests within its I/O loops, but analysis revealed that these loops almost never iterate more than once, so the complexity of the change would not be warrented. Instead, mmc_pre_req() and mmc_post_req() are added before and after I/O submission (mmc_wait_for_req) in mmc_io_rw_extended(). This still has the potential benefit of reducing the duration of interrupt handlers, as well as addressing the latency issue for SDHCI. It also seems a more reasonable solution than forcing drivers to do everything in the IRQ handler. Reported-by: Dmitry Osipenko Fixes: c07a48c2651965 ("mmc: sdhci: Remove finish_tasklet") Signed-off-by: Adrian Hunter Tested-by: Dmitry Osipenko Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200903082007.18715-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 060522d89705f9d961ef1762dc1468645dd21fbd Author: Chris Packham Date: Thu Sep 3 13:20:29 2020 +1200 mmc: sdhci-of-esdhc: Don't walk device-tree on every interrupt Commit b214fe592ab7 ("mmc: sdhci-of-esdhc: add erratum eSDHC7 support") added code to check for a specific compatible string in the device-tree on every esdhc interrupat. Instead of doing this record the quirk in struct sdhci_esdhc and lookup the struct in esdhc_irq. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20200903012029.25673-1-chris.packham@alliedtelesis.co.nz Fixes: b214fe592ab7 ("mmc: sdhci-of-esdhc: add erratum eSDHC7 support") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit a395acf0f6dc6409a704dea6fc3cd71eb8e3e4ec Author: Ulf Hansson Date: Tue Sep 1 17:04:38 2020 +0200 mmc: mmc_spi: Allow the driver to be built when CONFIG_HAS_DMA is unset The commit cd57d07b1e4e ("sh: don't allow non-coherent DMA for NOMMU") made CONFIG_NO_DMA to be set for some platforms, for good reasons. Consequentially, CONFIG_HAS_DMA doesn't get set, which makes the DMA mapping interface to be built as stub functions, but also prevent the mmc_spi driver from being built as it depends on CONFIG_HAS_DMA. It turns out that for some odd cases, the driver still relied on the DMA mapping interface, even if the DMA was not actively being used. To fixup the behaviour, let's drop the build dependency for CONFIG_HAS_DMA. Moreover, as to allow the driver to succeed probing, let's move the DMA initializations behind "#ifdef CONFIG_HAS_DMA". Fixes: cd57d07b1e4e ("sh: don't allow non-coherent DMA for NOMMU") Reported-by: Rich Felker Signed-off-by: Ulf Hansson Tested-by: Rich Felker Link: https://lore.kernel.org/r/20200901150438.228887-1-ulf.hansson@linaro.org commit 9d5dcefb7b114d610aeb2371f6a6f119af316e43 Author: Douglas Anderson Date: Thu Aug 27 07:58:41 2020 -0700 mmc: sdhci-msm: Add retries when all tuning phases are found valid As the comments in this patch say, if we tune and find all phases are valid it's _almost_ as bad as no phases being found valid. Probably all phases are not really reliable but we didn't detect where the unreliable place is. That means we'll essentially be guessing and hoping we get a good phase. This is not just a problem in theory. It was causing real problems on a real board. On that board, most often phase 10 is found as the only invalid phase, though sometimes 10 and 11 are invalid and sometimes just 11. Some percentage of the time, however, all phases are found to be valid. When this happens, the current logic will decide to use phase 11. Since phase 11 is sometimes found to be invalid, this is a bad choice. Sure enough, when phase 11 is picked we often get mmc errors later in boot. I have seen cases where all phases were found to be valid 3 times in a row, so increase the retry count to 10 just to be extra sure. Fixes: 415b5a75da43 ("mmc: sdhci-msm: Add platform_execute_tuning implementation") Signed-off-by: Douglas Anderson Reviewed-by: Veerabhadrarao Badiganti Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200827075809.1.If179abf5ecb67c963494db79c3bc4247d987419b@changeid Signed-off-by: Ulf Hansson commit 2cf9bfe9be75ed3656bbf882fb70c3e3047866e4 Author: Raul E Rangel Date: Mon Aug 31 15:10:32 2020 -0600 mmc: sdhci-acpi: Clear amd_sdhci_host on reset The commit 61d7437ed1390 ("mmc: sdhci-acpi: Fix HS400 tuning for AMDI0040") broke resume for eMMC HS400. When the system suspends the eMMC controller is powered down. So, on resume we need to reinitialize the controller. Although, amd_sdhci_host was not getting cleared, so the DLL was never re-enabled on resume. This results in HS400 being non-functional. To fix the problem, this change clears the tuned_clock flag, clears the dll_enabled flag and disables the DLL on reset. Fixes: 61d7437ed1390 ("mmc: sdhci-acpi: Fix HS400 tuning for AMDI0040") Signed-off-by: Raul E Rangel Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200831150517.1.I93c78bfc6575771bb653c9d3fca5eb018a08417d@changeid Signed-off-by: Ulf Hansson commit 01ec372cef1e5afa4ab843bbaf88a6fcb64dc14c Author: Ronnie Sahlberg Date: Thu Sep 3 10:02:39 2020 +1000 cifs: fix DFS mount with cifsacl/modefromsid RHBZ: 1871246 If during cifs_lookup()/get_inode_info() we encounter a DFS link and we use the cifsacl or modefromsid mount options we must suppress any -EREMOTE errors that triggers or else we will not be able to follow the DFS link and automount the target. This fixes an issue with modefromsid/cifsacl where these mountoptions would break DFS and we would no longer be able to access the share. Signed-off-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit f4d51dffc6c01a9e94650d95ce0104964f8ae822 Author: Linus Torvalds Date: Sun Sep 6 17:11:40 2020 -0700 Linux 5.9-rc4 commit 4ddcaf1ebb5e4e99240f29d531ee69d4244fe416 Author: Linus Walleij Date: Sat Sep 5 12:32:33 2020 +0200 net: dsa: rtl8366: Properly clear member config When removing a port from a VLAN we are just erasing the member config for the VLAN, which is wrong: other ports can be using it. Just mask off the port and only zero out the rest of the member config once ports using of the VLAN are removed from it. Reported-by: Florian Fainelli Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij Signed-off-by: Jakub Kicinski commit a8205e310011f09cc73cd577d7b0074c57b9bb54 Merge: 2ccdd9f8b2ce7 c127a2a1b7baa Author: Linus Torvalds Date: Sun Sep 6 12:10:27 2020 -0700 Merge tag 'io_uring-5.9-2020-09-06' of git://git.kernel.dk/linux-block Pull more io_uring fixes from Jens Axboe: "Two followup fixes. One is fixing a regression from this merge window, the other is two commits fixing cancelation of deferred requests. Both have gone through full testing, and both spawned a few new regression test additions to liburing. - Don't play games with const, properly store the output iovec and assign it as needed. - Deferred request cancelation fix (Pavel)" * tag 'io_uring-5.9-2020-09-06' of git://git.kernel.dk/linux-block: io_uring: fix linked deferred ->files cancellation io_uring: fix cancel of deferred reqs with ->files io_uring: fix explicit async read/write mapping for large segments commit d7739b0b6d15ef9ad5c79424736b8ded5ed3e913 Author: Parshuram Thombare Date: Sat Sep 5 10:21:33 2020 +0200 net: macb: fix for pause frame receive enable bit PAE bit of NCFGR register, when set, pauses transmission if a non-zero 802.3 classic pause frame is received. Fixes: 7897b071ac3b ("net: macb: convert to phylink") Signed-off-by: Parshuram Thombare Signed-off-by: Jakub Kicinski commit 2ccdd9f8b2ce7290aad6f0a34200ad394e61f940 Merge: 015b3155c46a0 29aaebbca4abc Author: Linus Torvalds Date: Sun Sep 6 11:58:15 2020 -0700 Merge tag 'iommu-fixes-v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - three Intel VT-d fixes to fix address handling on 32bit, fix a NULL pointer dereference bug and serialize a hardware register access as required by the VT-d spec. - two patches for AMD IOMMU to force AMD GPUs into translation mode when memory encryption is active and disallow using IOMMUv2 functionality. This makes the AMDGPU driver work when memory encryption is active. - two more fixes for AMD IOMMU to fix updating the Interrupt Remapping Table Entries. - MAINTAINERS file update for the Qualcom IOMMU driver. * tag 'iommu-fixes-v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Handle 36bit addressing for x86-32 iommu/amd: Do not use IOMMUv2 functionality when SME is active iommu/amd: Do not force direct mapping when SME is active iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE iommu/amd: Restore IRTE.RemapEn bit after programming IRTE iommu/vt-d: Fix NULL pointer dereference in dev_iommu_priv_set() iommu/vt-d: Serialize IOMMU GCMD register modifications MAINTAINERS: Update QUALCOMM IOMMU after Arm SMMU drivers move commit 015b3155c46a089f623c8a2e794ffad84143565d Merge: 68beef5710710 4facb95b7adaf Author: Linus Torvalds Date: Sun Sep 6 10:28:00 2020 -0700 Merge tag 'x86-urgent-2020-09-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: - more generic entry code ABI fallout - debug register handling bugfixes - fix vmalloc mappings on 32-bit kernels - kprobes instrumentation output fix on 32-bit kernels - fix over-eager WARN_ON_ONCE() on !SMAP hardware - NUMA debugging fix - fix Clang related crash on !RETPOLINE kernels * tag 'x86-urgent-2020-09-06' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry: Unbreak 32bit fast syscall x86/debug: Allow a single level of #DB recursion x86/entry: Fix AC assertion tracing/kprobes, x86/ptrace: Fix regs argument order for i386 x86, fakenuma: Fix invalid starting node ID x86/mm/32: Bring back vmalloc faulting on x86_32 x86/cmdline: Disable jump tables for cmdline.c commit 68beef571071014ef34a3beac65fe2af7e8e3cf6 Merge: dd9fb9bb3340c 9e2369c06c8a1 Author: Linus Torvalds Date: Sun Sep 6 09:59:27 2020 -0700 Merge tag 'for-linus-5.9-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: "A small series for fixing a problem with Xen PVH guests when running as backends (e.g. as dom0). Mapping other guests' memory is now working via ZONE_DEVICE, thus not requiring to abuse the memory hotplug functionality for that purpose" * tag 'for-linus-5.9-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: add helpers to allocate unpopulated memory memremap: rename MEMORY_DEVICE_DEVDAX to MEMORY_DEVICE_GENERIC xen/balloon: add header guard commit 94cc242a067a869c29800aa789d38b7676136e50 Author: Ganji Aravind Date: Fri Sep 4 15:58:18 2020 +0530 cxgb4: Fix offset when clearing filter byte counters Pass the correct offset to clear the stale filter hit bytes counter. Otherwise, the counter starts incrementing from the stale information, instead of 0. Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Signed-off-by: Ganji Aravind Signed-off-by: Jakub Kicinski commit 02146a93ba87401bb0e13c616bed248044796ba8 Merge: cc8e58f8325cd 0c97ee5fbdca1 Author: Jakub Kicinski Date: Sat Sep 5 15:24:50 2020 -0700 Merge branch 'hinic-BugFixes' Luo bin says: ==================== hinic: BugFixes The bugs fixed in this patchset have been present since the following commits: patch #1: Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx operation") patch #2: Fixes: 5e126e7c4e52 ("hinic: add firmware update support") ==================== Signed-off-by: Jakub Kicinski commit 0c97ee5fbdca1be3cc7af730832170f4f7c38e68 Author: Luo bin Date: Fri Sep 4 16:37:29 2020 +0800 hinic: bump up the timeout of UPDATE_FW cmd Firmware erases the entire flash region which may take several seconds before flashing, so we bump up the timeout to ensure this cmd won't return failure. Fixes: 5e126e7c4e52 ("hinic: add firmware update support") Signed-off-by: Luo bin Signed-off-by: Jakub Kicinski commit 4e4269ebe7e18038fffacf113e2dd5ded6d49942 Author: Luo bin Date: Fri Sep 4 16:37:28 2020 +0800 hinic: bump up the timeout of SET_FUNC_STATE cmd We free memory regardless of the return value of SET_FUNC_STATE cmd in hinic_close function to avoid memory leak and this cmd may timeout when fw is busy with handling other cmds, so we bump up the timeout of this cmd to ensure it won't return failure. Fixes: 00e57a6d4ad3 ("net-next/hinic: Add Tx operation") Signed-off-by: Luo bin Signed-off-by: Jakub Kicinski commit c127a2a1b7baa5eb40a7e2de4b7f0c51ccbbb2ef Author: Pavel Begunkov Date: Sun Sep 6 00:45:15 2020 +0300 io_uring: fix linked deferred ->files cancellation While looking for ->files in ->defer_list, consider that requests there may actually be links. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b7ddce3cbf010edbfac6c6d8cc708560a7bcd7a4 Author: Pavel Begunkov Date: Sun Sep 6 00:45:14 2020 +0300 io_uring: fix cancel of deferred reqs with ->files While trying to cancel requests with ->files, it also should look for requests in ->defer_list, otherwise it might end up hanging a thread. Cancel all requests in ->defer_list up to the last request there with matching ->files, that's needed to follow drain ordering semantics. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit dd9fb9bb3340c791a2be106fdc895db75f177343 Merge: 70187f7727d4d 46d4a403a04c0 4e4bb894467cd e5fc436f06eef Author: Linus Torvalds Date: Sat Sep 5 14:22:46 2020 -0700 Merge tags 'auxdisplay-for-linus-v5.9-rc4', 'clang-format-for-linus-v5.9-rc4' and 'compiler-attributes-for-linus-v5.9-rc4' of git://github.com/ojeda/linux Pull misc fixes from Miguel Ojeda: "A trivial patch for auxdisplay: - Replace HTTP links with HTTPS ones (Alexander A. Klimov) The usual clang-format trivial update: - Update with the latest for_each macro list (Miguel Ojeda) And Luc requested me to pick a sparse fix on my queue, so here it goes along with other two trivial Compiler Attributes ones (also from Luc). - sparse: use static inline for __chk_{user,io}_ptr() (Luc Van Oostenryck) - Compiler Attributes: fix comment concerning GCC 4.6 (Luc Van Oostenryck) - Compiler Attributes: remove comment about sparse not supporting __has_attribute (Luc Van Oostenryck)" * tag 'auxdisplay-for-linus-v5.9-rc4' of git://github.com/ojeda/linux: auxdisplay: Replace HTTP links with HTTPS ones * tag 'clang-format-for-linus-v5.9-rc4' of git://github.com/ojeda/linux: clang-format: Update with the latest for_each macro list * tag 'compiler-attributes-for-linus-v5.9-rc4' of git://github.com/ojeda/linux: sparse: use static inline for __chk_{user,io}_ptr() Compiler Attributes: fix comment concerning GCC 4.6 Compiler Attributes: remove comment about sparse not supporting __has_attribute commit 70187f7727d4ddd8282b576ece93ca233e88b19e Merge: 7514c0362ffdd 26907eb605fbc Author: Linus Torvalds Date: Sat Sep 5 13:46:14 2020 -0700 Merge tag 'arc-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - HSDK-4xd Dev system: perf driver updates for sampling interrupt - HSDK* Dev System: Ethernet broken [Evgeniy Didin] - HIGHMEM broken (2 memory banks) [Mike Rapoport] - show_regs() rewrite once and for all - Other minor fixes * tag 'arc-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: [plat-hsdk]: Switch ethernet phy-mode to rgmii-id arc: fix memory initialization for systems with two memory banks irqchip/eznps: Fix build error for !ARC700 builds ARC: show_regs: fix r12 printing and simplify ARC: HSDK: wireup perf irq ARC: perf: don't bail setup if pct irq missing in device-tree ARC: pgalloc.h: delete a duplicated word + other fixes commit 7514c0362ffdd9af953ae94334018e7356b31313 Merge: 9322c47b21b9e 428fc0aff4e59 Author: Linus Torvalds Date: Sat Sep 5 13:28:40 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "19 patches. Subsystems affected by this patch series: MAINTAINERS, ipc, fork, checkpatch, lib, and mm (memcg, slub, pagemap, madvise, migration, hugetlb)" * emailed patches from Andrew Morton : include/linux/log2.h: add missing () around n in roundup_pow_of_two() mm/khugepaged.c: fix khugepaged's request size in collapse_file mm/hugetlb: fix a race between hugetlb sysctl handlers mm/hugetlb: try preferred node first when alloc gigantic page from cma mm/migrate: preserve soft dirty in remove_migration_pte() mm/migrate: remove unnecessary is_zone_device_page() check mm/rmap: fixup copying of soft dirty and uffd ptes mm/migrate: fixup setting UFFD_WP flag mm: madvise: fix vma user-after-free checkpatch: fix the usage of capture group ( ... ) fork: adjust sysctl_max_threads definition to match prototype ipc: adjust proc_ipc_sem_dointvec definition to match prototype mm: track page table modifications in __apply_to_page_range() MAINTAINERS: IA64: mark Status as Odd Fixes only MAINTAINERS: add LLVM maintainers MAINTAINERS: update Cavium/Marvell entries mm: slub: fix conversion of freelist_corrupted() mm: memcg: fix memcg reclaim soft lockup memcg: fix use-after-free in uncharge_batch commit 428fc0aff4e59399ec719ffcc1f7a5d29a4ee476 Author: Jason Gunthorpe Date: Fri Sep 4 16:36:19 2020 -0700 include/linux/log2.h: add missing () around n in roundup_pow_of_two() Otherwise gcc generates warnings if the expression is complicated. Fixes: 312a0c170945 ("[PATCH] LOG2: Alter roundup_pow_of_two() so that it can use a ilog2() on a constant") Signed-off-by: Jason Gunthorpe Signed-off-by: Andrew Morton Link: https://lkml.kernel.org/r/0-v1-8a2697e3c003+41165-log_brackets_jgg@nvidia.com Signed-off-by: Linus Torvalds commit e5a59d308f52bb0052af5790c22173651b187465 Author: David Howells Date: Fri Sep 4 16:36:16 2020 -0700 mm/khugepaged.c: fix khugepaged's request size in collapse_file collapse_file() in khugepaged passes PAGE_SIZE as the number of pages to be read to page_cache_sync_readahead(). The intent was probably to read a single page. Fix it to use the number of pages to the end of the window instead. Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS") Signed-off-by: David Howells Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Song Liu Acked-by: Yang Shi Acked-by: Pankaj Gupta Cc: Eric Biggers Link: https://lkml.kernel.org/r/20200903140844.14194-2-willy@infradead.org Signed-off-by: Linus Torvalds commit 17743798d81238ab13050e8e2833699b54e15467 Author: Muchun Song Date: Fri Sep 4 16:36:13 2020 -0700 mm/hugetlb: fix a race between hugetlb sysctl handlers There is a race between the assignment of `table->data` and write value to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on the other thread. CPU0: CPU1: proc_sys_write hugetlb_sysctl_handler proc_sys_call_handler hugetlb_sysctl_handler_common hugetlb_sysctl_handler table->data = &tmp; hugetlb_sysctl_handler_common table->data = &tmp; proc_doulongvec_minmax do_proc_doulongvec_minmax sysctl_head_finish __do_proc_doulongvec_minmax unuse_table i = table->data; *i = val; // corrupt CPU1's stack Fix this by duplicating the `table`, and only update the duplicate of it. And introduce a helper of proc_hugetlb_doulongvec_minmax() to simplify the code. The following oops was seen: BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page Code: Bad RIP value. ... Call Trace: ? set_max_huge_pages+0x3da/0x4f0 ? alloc_pool_huge_page+0x150/0x150 ? proc_doulongvec_minmax+0x46/0x60 ? hugetlb_sysctl_handler_common+0x1c7/0x200 ? nr_hugepages_store+0x20/0x20 ? copy_fd_bitmaps+0x170/0x170 ? hugetlb_sysctl_handler+0x1e/0x20 ? proc_sys_call_handler+0x2f1/0x300 ? unregister_sysctl_table+0xb0/0xb0 ? __fd_install+0x78/0x100 ? proc_sys_write+0x14/0x20 ? __vfs_write+0x4d/0x90 ? vfs_write+0xef/0x240 ? ksys_write+0xc0/0x160 ? __ia32_sys_read+0x50/0x50 ? __close_fd+0x129/0x150 ? __x64_sys_write+0x43/0x50 ? do_syscall_64+0x6c/0x200 ? entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: e5ff215941d5 ("hugetlb: multiple hstates for multiple page sizes") Signed-off-by: Muchun Song Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Cc: Andi Kleen Link: http://lkml.kernel.org/r/20200828031146.43035-1-songmuchun@bytedance.com Signed-off-by: Linus Torvalds commit 953f064aa6b29debcc211869b60bd59f26d19c34 Author: Li Xinhai Date: Fri Sep 4 16:36:10 2020 -0700 mm/hugetlb: try preferred node first when alloc gigantic page from cma Since commit cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma"), the gigantic page would be allocated from node which is not the preferred node, although there are pages available from that node. The reason is that the nid parameter has been ignored in alloc_gigantic_page(). Besides, the __GFP_THISNODE also need be checked if user required to alloc only from the preferred node. After this patch, the preferred node is tried first before other allowed nodes, and don't try to allocate from other nodes if __GFP_THISNODE is specified. If user don't specify the preferred node, the current node will be used as preferred node, which makes sure consistent behavior of allocating gigantic and non-gigantic hugetlb page. Fixes: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma") Signed-off-by: Li Xinhai Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Acked-by: Michal Hocko Cc: Roman Gushchin Link: https://lkml.kernel.org/r/20200902025016.697260-1-lixinhai.lxh@gmail.com Signed-off-by: Linus Torvalds commit 3d321bf82c4be8e33261754a5775bc65fc5d2184 Author: Ralph Campbell Date: Fri Sep 4 16:36:07 2020 -0700 mm/migrate: preserve soft dirty in remove_migration_pte() The code to remove a migration PTE and replace it with a device private PTE was not copying the soft dirty bit from the migration entry. This could lead to page contents not being marked dirty when faulting the page back from device private memory. Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Reviewed-by: Christoph Hellwig Cc: Jerome Glisse Cc: Alistair Popple Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Bharata B Rao Link: https://lkml.kernel.org/r/20200831212222.22409-3-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit 6128763fc3244d1b4868e5f0aa401f7f987b5c4d Author: Ralph Campbell Date: Fri Sep 4 16:36:04 2020 -0700 mm/migrate: remove unnecessary is_zone_device_page() check Patch series "mm/migrate: preserve soft dirty in remove_migration_pte()". I happened to notice this from code inspection after seeing Alistair Popple's patch ("mm/rmap: Fixup copying of soft dirty and uffd ptes"). This patch (of 2): The check for is_zone_device_page() and is_device_private_page() is unnecessary since the latter is sufficient to determine if the page is a device private page. Simplify the code for easier reading. Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Reviewed-by: Christoph Hellwig Cc: Jerome Glisse Cc: Alistair Popple Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: Bharata B Rao Link: https://lkml.kernel.org/r/20200831212222.22409-1-rcampbell@nvidia.com Link: https://lkml.kernel.org/r/20200831212222.22409-2-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit ad7df764b7e1c7dc64e016da7ada2e3e1bb90700 Author: Alistair Popple Date: Fri Sep 4 16:36:01 2020 -0700 mm/rmap: fixup copying of soft dirty and uffd ptes During memory migration a pte is temporarily replaced with a migration swap pte. Some pte bits from the existing mapping such as the soft-dirty and uffd write-protect bits are preserved by copying these to the temporary migration swap pte. However these bits are not stored at the same location for swap and non-swap ptes. Therefore testing these bits requires using the appropriate helper function for the given pte type. Unfortunately several code locations were found where the wrong helper function is being used to test soft_dirty and uffd_wp bits which leads to them getting incorrectly set or cleared during page-migration. Fix these by using the correct tests based on pte type. Fixes: a5430dda8a3a ("mm/migrate: support un-addressable ZONE_DEVICE page in migration") Fixes: 8c3328f1f36a ("mm/migrate: migrate_vma() unmap page from vma while collecting pages") Fixes: f45ec5ff16a7 ("userfaultfd: wp: support swap and page migration") Signed-off-by: Alistair Popple Signed-off-by: Andrew Morton Reviewed-by: Peter Xu Cc: Jérôme Glisse Cc: John Hubbard Cc: Ralph Campbell Cc: Alistair Popple Cc: Link: https://lkml.kernel.org/r/20200825064232.10023-2-alistair@popple.id.au Signed-off-by: Linus Torvalds commit ebdf8321eeeb623aed60f7ed16f7445363230118 Author: Alistair Popple Date: Fri Sep 4 16:35:58 2020 -0700 mm/migrate: fixup setting UFFD_WP flag Commit f45ec5ff16a75 ("userfaultfd: wp: support swap and page migration") introduced support for tracking the uffd wp bit during page migration. However the non-swap PTE variant was used to set the flag for zone device private pages which are a type of swap page. This leads to corruption of the swap offset if the original PTE has the uffd_wp flag set. Fixes: f45ec5ff16a75 ("userfaultfd: wp: support swap and page migration") Signed-off-by: Alistair Popple Signed-off-by: Andrew Morton Reviewed-by: Peter Xu Cc: Jérôme Glisse Cc: John Hubbard Cc: Ralph Campbell Link: https://lkml.kernel.org/r/20200825064232.10023-1-alistair@popple.id.au Signed-off-by: Linus Torvalds commit 7867fd7cc44e63c6673cd0f8fea155456d34d0de Author: Yang Shi Date: Fri Sep 4 16:35:55 2020 -0700 mm: madvise: fix vma user-after-free The syzbot reported the below use-after-free: BUG: KASAN: use-after-free in madvise_willneed mm/madvise.c:293 [inline] BUG: KASAN: use-after-free in madvise_vma mm/madvise.c:942 [inline] BUG: KASAN: use-after-free in do_madvise.part.0+0x1c8b/0x1cf0 mm/madvise.c:1145 Read of size 8 at addr ffff8880a6163eb0 by task syz-executor.0/9996 CPU: 0 PID: 9996 Comm: syz-executor.0 Not tainted 5.9.0-rc1-syzkaller #0 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+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 madvise_willneed mm/madvise.c:293 [inline] madvise_vma mm/madvise.c:942 [inline] do_madvise.part.0+0x1c8b/0x1cf0 mm/madvise.c:1145 do_madvise mm/madvise.c:1169 [inline] __do_sys_madvise mm/madvise.c:1171 [inline] __se_sys_madvise mm/madvise.c:1169 [inline] __x64_sys_madvise+0xd9/0x110 mm/madvise.c:1169 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Allocated by task 9992: kmem_cache_alloc+0x138/0x3a0 mm/slab.c:3482 vm_area_alloc+0x1c/0x110 kernel/fork.c:347 mmap_region+0x8e5/0x1780 mm/mmap.c:1743 do_mmap+0xcf9/0x11d0 mm/mmap.c:1545 vm_mmap_pgoff+0x195/0x200 mm/util.c:506 ksys_mmap_pgoff+0x43a/0x560 mm/mmap.c:1596 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 9992: kmem_cache_free.part.0+0x67/0x1f0 mm/slab.c:3693 remove_vma+0x132/0x170 mm/mmap.c:184 remove_vma_list mm/mmap.c:2613 [inline] __do_munmap+0x743/0x1170 mm/mmap.c:2869 do_munmap mm/mmap.c:2877 [inline] mmap_region+0x257/0x1780 mm/mmap.c:1716 do_mmap+0xcf9/0x11d0 mm/mmap.c:1545 vm_mmap_pgoff+0x195/0x200 mm/util.c:506 ksys_mmap_pgoff+0x43a/0x560 mm/mmap.c:1596 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 It is because vma is accessed after releasing mmap_lock, but someone else acquired the mmap_lock and the vma is gone. Releasing mmap_lock after accessing vma should fix the problem. Fixes: 692fe62433d4c ("mm: Handle MADV_WILLNEED through vfs_fadvise()") Reported-by: syzbot+b90df26038d1d5d85c97@syzkaller.appspotmail.com Signed-off-by: Yang Shi Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Jan Kara Cc: [5.4+] Link: https://lkml.kernel.org/r/20200816141204.162624-1-shy828301@gmail.com Signed-off-by: Linus Torvalds commit 13e45417cedbfc44b1926124b1846f5ee8c6ba4a Author: Mrinal Pandey Date: Fri Sep 4 16:35:52 2020 -0700 checkpatch: fix the usage of capture group ( ... ) The usage of "capture group (...)" in the immediate condition after `&&` results in `$1` being uninitialized. This issues a warning "Use of uninitialized value $1 in regexp compilation at ./scripts/checkpatch.pl line 2638". I noticed this bug while running checkpatch on the set of commits from v5.7 to v5.8-rc1 of the kernel on the commits with a diff content in their commit message. This bug was introduced in the script by commit e518e9a59ec3 ("checkpatch: emit an error when there's a diff in a changelog"). It has been in the script since then. The author intended to store the match made by capture group in variable `$1`. This should have contained the name of the file as `[\w/]+` matched. However, this couldn't be accomplished due to usage of capture group and `$1` in the same regular expression. Fix this by placing the capture group in the condition before `&&`. Thus, `$1` can be initialized to the text that capture group matches thereby setting it to the desired and required value. Fixes: e518e9a59ec3 ("checkpatch: emit an error when there's a diff in a changelog") Signed-off-by: Mrinal Pandey Signed-off-by: Andrew Morton Tested-by: Lukas Bulwahn Reviewed-by: Lukas Bulwahn Cc: Joe Perches Link: https://lkml.kernel.org/r/20200714032352.f476hanaj2dlmiot@mrinalpandey Signed-off-by: Linus Torvalds commit b0daa2c73f3a8ab9183a9d298495b583b6c1bd19 Author: Tobias Klauser Date: Fri Sep 4 16:35:49 2020 -0700 fork: adjust sysctl_max_threads definition to match prototype Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") changed ctl_table.proc_handler to take a kernel pointer. Adjust the definition of sysctl_max_threads to match its prototype in linux/sysctl.h which fixes the following sparse error/warning: kernel/fork.c:3050:47: warning: incorrect type in argument 3 (different address spaces) kernel/fork.c:3050:47: expected void * kernel/fork.c:3050:47: got void [noderef] __user *buffer kernel/fork.c:3036:5: error: symbol 'sysctl_max_threads' redeclared with different type (incompatible argument 3 (different address spaces)): kernel/fork.c:3036:5: int extern [addressable] [signed] [toplevel] sysctl_max_threads( ... ) kernel/fork.c: note: in included file (through include/linux/key.h, include/linux/cred.h, include/linux/sched/signal.h, include/linux/sched/cputime.h): include/linux/sysctl.h:242:5: note: previously declared as: include/linux/sysctl.h:242:5: int extern [addressable] [signed] [toplevel] sysctl_max_threads( ... ) Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Cc: Christoph Hellwig Cc: Al Viro Link: https://lkml.kernel.org/r/20200825093647.24263-1-tklauser@distanz.ch Signed-off-by: Linus Torvalds commit fff1662cc423be00c5a7dffc6cf2332161c882d6 Author: Tobias Klauser Date: Fri Sep 4 16:35:46 2020 -0700 ipc: adjust proc_ipc_sem_dointvec definition to match prototype Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") changed ctl_table.proc_handler to take a kernel pointer. Adjust the signature of proc_ipc_sem_dointvec to match ctl_table.proc_handler which fixes the following sparse error/warning: ipc/ipc_sysctl.c:94:47: warning: incorrect type in argument 3 (different address spaces) ipc/ipc_sysctl.c:94:47: expected void *buffer ipc/ipc_sysctl.c:94:47: got void [noderef] __user *buffer ipc/ipc_sysctl.c:194:35: warning: incorrect type in initializer (incompatible argument 3 (different address spaces)) ipc/ipc_sysctl.c:194:35: expected int ( [usertype] *proc_handler )( ... ) ipc/ipc_sysctl.c:194:35: got int ( * )( ... ) Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Signed-off-by: Tobias Klauser Signed-off-by: Andrew Morton Cc: Christoph Hellwig Cc: Alexander Viro Link: https://lkml.kernel.org/r/20200825105846.5193-1-tklauser@distanz.ch Signed-off-by: Linus Torvalds commit e80d3909be42f7e38cc350c1ba109cf0aa51956a Author: Joerg Roedel Date: Fri Sep 4 16:35:43 2020 -0700 mm: track page table modifications in __apply_to_page_range() __apply_to_page_range() is also used to change and/or allocate page-table pages in the vmalloc area of the address space. Make sure these changes get synchronized to other page-tables in the system by calling arch_sync_kernel_mappings() when necessary. The impact appears limited to x86-32, where apply_to_page_range may miss updating the PMD. That leads to explosions in drivers like BUG: unable to handle page fault for address: fe036000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page *pde = 00000000 Oops: 0002 [#1] SMP CPU: 3 PID: 1300 Comm: gem_concurrent_ Not tainted 5.9.0-rc1+ #16 Hardware name: /NUC6i3SYB, BIOS SYSKLi35.86A.0024.2015.1027.2142 10/27/2015 EIP: __execlists_context_alloc+0x132/0x2d0 [i915] Code: 31 d2 89 f0 e8 2f 55 02 00 89 45 e8 3d 00 f0 ff ff 0f 87 11 01 00 00 8b 4d e8 03 4b 30 b8 5a 5a 5a 5a ba 01 00 00 00 8d 79 04 01 5a 5a 5a 5a c7 81 fc 0f 00 00 5a 5a 5a 5a 83 e7 fc 29 f9 81 EAX: 5a5a5a5a EBX: f60ca000 ECX: fe036000 EDX: 00000001 ESI: f43b7340 EDI: fe036004 EBP: f6389cb8 ESP: f6389c9c DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 EFLAGS: 00010286 CR0: 80050033 CR2: fe036000 CR3: 2d361000 CR4: 001506d0 DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000 DR6: fffe0ff0 DR7: 00000400 Call Trace: execlists_context_alloc+0x10/0x20 [i915] intel_context_alloc_state+0x3f/0x70 [i915] __intel_context_do_pin+0x117/0x170 [i915] i915_gem_do_execbuffer+0xcc7/0x2500 [i915] i915_gem_execbuffer2_ioctl+0xcd/0x1f0 [i915] drm_ioctl_kernel+0x8f/0xd0 drm_ioctl+0x223/0x3d0 __ia32_sys_ioctl+0x1ab/0x760 __do_fast_syscall_32+0x3f/0x70 do_fast_syscall_32+0x29/0x60 do_SYSENTER_32+0x15/0x20 entry_SYSENTER_32+0x9f/0xf2 EIP: 0xb7f28559 Code: 03 74 c0 01 10 05 03 74 b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 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: ffffffda EBX: 00000005 ECX: c0406469 EDX: bf95556c ESI: b7e68000 EDI: c0406469 EBP: 00000005 ESP: bf9554d8 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b EFLAGS: 00000296 Modules linked in: i915 x86_pkg_temp_thermal intel_powerclamp crc32_pclmul crc32c_intel intel_cstate intel_uncore intel_gtt drm_kms_helper intel_pch_thermal video button autofs4 i2c_i801 i2c_smbus fan CR2: 00000000fe036000 It looks like kasan, xen and i915 are vulnerable. Actual impact is "on thinkpad X60 in 5.9-rc1, screen starts blinking after 30-or-so minutes, and machine is unusable" [sfr@canb.auug.org.au: ARCH_PAGE_TABLE_SYNC_MASK needs vmalloc.h] Link: https://lkml.kernel.org/r/20200825172508.16800a4f@canb.auug.org.au [chris@chris-wilson.co.uk: changelog addition] [pavel@ucw.cz: changelog addition] Fixes: 2ba3e6947aed ("mm/vmalloc: track which page-table levels were modified") Fixes: 86cf69f1d893 ("x86/mm/32: implement arch_sync_kernel_mappings()") Signed-off-by: Joerg Roedel Signed-off-by: Stephen Rothwell Signed-off-by: Andrew Morton Tested-by: Chris Wilson [x86-32] Tested-by: Pavel Machek Acked-by: Linus Torvalds Cc: [5.8+] Link: https://lkml.kernel.org/r/20200821123746.16904-1-joro@8bytes.org Signed-off-by: Linus Torvalds commit 9d90dd188d5e25742d41bd8b91dd5f22da587cdc Author: Randy Dunlap Date: Fri Sep 4 16:35:40 2020 -0700 MAINTAINERS: IA64: mark Status as Odd Fixes only IA64 isn't really being maintained, so mark it as Odd Fixes only. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Acked-by: Tony Luck Cc: Fenghua Yu Link: http://lkml.kernel.org/r/7e719139-450f-52c2-59a2-7964a34eda1f@infradead.org Signed-off-by: Linus Torvalds commit b9644289657748314dbfe6502c316b3f09e251ed Author: Nick Desaulniers Date: Fri Sep 4 16:35:37 2020 -0700 MAINTAINERS: add LLVM maintainers Nominate Nathan and myself to be point of contact for clang/LLVM related support, after a poll at the LLVM BoF at Linux Plumbers Conf 2020. While corporate sponsorship is beneficial, its important to not entrust the keys to the nukes with any one entity. Should Nathan and I find ourselves at the same employer, I would gladly step down. Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Reviewed-by: Sedat Dilek Acked-by: Nathan Chancellor Acked-by: Lukas Bulwahn Acked-by: Miguel Ojeda Acked-by: Masahiro Yamada Link: https://lkml.kernel.org/r/20200825143540.2948637-1-ndesaulniers@google.com Signed-off-by: Linus Torvalds commit f548a64570cbb7ca3760643b9e2d7c45b9fe2931 Author: Robert Richter Date: Fri Sep 4 16:35:33 2020 -0700 MAINTAINERS: update Cavium/Marvell entries I am leaving Marvell and already do not have access to my @marvell.com email address. So switching over to my korg mail address or removing my address there another maintainer is already listed. For the entries there no other maintainer is listed I will keep looking into patches for Cavium systems for a while until someone from Marvell takes it over. Since I might have limited access to hardware and also limited time I changed state to 'Odd Fixes' for those entries. Signed-off-by: Robert Richter Signed-off-by: Andrew Morton Cc: Ganapatrao Kulkarni Cc: Sunil Goutham CC: Borislav Petkov Cc: Marc Zyngier Cc: Arnd Bergmann Cc: Wolfram Sang , Link: https://lkml.kernel.org/r/20200824122050.31164-1-rric@kernel.org Signed-off-by: Linus Torvalds commit dc07a728d49cf025f5da2c31add438d839d076c0 Author: Eugeniu Rosca Date: Fri Sep 4 16:35:30 2020 -0700 mm: slub: fix conversion of freelist_corrupted() Commit 52f23478081ae0 ("mm/slub.c: fix corrupted freechain in deactivate_slab()") suffered an update when picked up from LKML [1]. Specifically, relocating 'freelist = NULL' into 'freelist_corrupted()' created a no-op statement. Fix it by sticking to the behavior intended in the original patch [1]. In addition, make freelist_corrupted() immune to passing NULL instead of &freelist. The issue has been spotted via static analysis and code review. [1] https://lore.kernel.org/linux-mm/20200331031450.12182-1-dongli.zhang@oracle.com/ Fixes: 52f23478081ae0 ("mm/slub.c: fix corrupted freechain in deactivate_slab()") Signed-off-by: Eugeniu Rosca Signed-off-by: Andrew Morton Cc: Dongli Zhang Cc: Joe Jin Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Link: https://lkml.kernel.org/r/20200824130643.10291-1-erosca@de.adit-jv.com Signed-off-by: Linus Torvalds commit e3336cab2579012b1e72b5265adf98e2d6e244ad Author: Xunlei Pang Date: Fri Sep 4 16:35:27 2020 -0700 mm: memcg: fix memcg reclaim soft lockup We've met softlockup with "CONFIG_PREEMPT_NONE=y", when the target memcg doesn't have any reclaimable memory. It can be easily reproduced as below: watchdog: BUG: soft lockup - CPU#0 stuck for 111s![memcg_test:2204] CPU: 0 PID: 2204 Comm: memcg_test Not tainted 5.9.0-rc2+ #12 Call Trace: shrink_lruvec+0x49f/0x640 shrink_node+0x2a6/0x6f0 do_try_to_free_pages+0xe9/0x3e0 try_to_free_mem_cgroup_pages+0xef/0x1f0 try_charge+0x2c1/0x750 mem_cgroup_charge+0xd7/0x240 __add_to_page_cache_locked+0x2fd/0x370 add_to_page_cache_lru+0x4a/0xc0 pagecache_get_page+0x10b/0x2f0 filemap_fault+0x661/0xad0 ext4_filemap_fault+0x2c/0x40 __do_fault+0x4d/0xf9 handle_mm_fault+0x1080/0x1790 It only happens on our 1-vcpu instances, because there's no chance for oom reaper to run to reclaim the to-be-killed process. Add a cond_resched() at the upper shrink_node_memcgs() to solve this issue, this will mean that we will get a scheduling point for each memcg in the reclaimed hierarchy without any dependency on the reclaimable memory in that memcg thus making it more predictable. Suggested-by: Michal Hocko Signed-off-by: Xunlei Pang Signed-off-by: Andrew Morton Acked-by: Chris Down Acked-by: Michal Hocko Acked-by: Johannes Weiner Link: http://lkml.kernel.org/r/1598495549-67324-1-git-send-email-xlpang@linux.alibaba.com Signed-off-by: Linus Torvalds commit f1796544a0ca0f14386a679d3d05fbc69235015e Author: Michal Hocko Date: Fri Sep 4 16:35:24 2020 -0700 memcg: fix use-after-free in uncharge_batch syzbot has reported an use-after-free in the uncharge_batch path BUG: KASAN: use-after-free in instrument_atomic_write include/linux/instrumented.h:71 [inline] BUG: KASAN: use-after-free in atomic64_sub_return include/asm-generic/atomic-instrumented.h:970 [inline] BUG: KASAN: use-after-free in atomic_long_sub_return include/asm-generic/atomic-long.h:113 [inline] BUG: KASAN: use-after-free in page_counter_cancel mm/page_counter.c:54 [inline] BUG: KASAN: use-after-free in page_counter_uncharge+0x3d/0xc0 mm/page_counter.c:155 Write of size 8 at addr ffff8880371c0148 by task syz-executor.0/9304 CPU: 0 PID: 9304 Comm: syz-executor.0 Not tainted 5.8.0-syzkaller #0 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+0x1f0/0x31e lib/dump_stack.c:118 print_address_description+0x66/0x620 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report+0x132/0x1d0 mm/kasan/report.c:530 check_memory_region_inline mm/kasan/generic.c:183 [inline] check_memory_region+0x2b5/0x2f0 mm/kasan/generic.c:192 instrument_atomic_write include/linux/instrumented.h:71 [inline] atomic64_sub_return include/asm-generic/atomic-instrumented.h:970 [inline] atomic_long_sub_return include/asm-generic/atomic-long.h:113 [inline] page_counter_cancel mm/page_counter.c:54 [inline] page_counter_uncharge+0x3d/0xc0 mm/page_counter.c:155 uncharge_batch+0x6c/0x350 mm/memcontrol.c:6764 uncharge_page+0x115/0x430 mm/memcontrol.c:6796 uncharge_list mm/memcontrol.c:6835 [inline] mem_cgroup_uncharge_list+0x70/0xe0 mm/memcontrol.c:6877 release_pages+0x13a2/0x1550 mm/swap.c:911 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu+0x780/0x910 mm/mmu_gather.c:249 tlb_finish_mmu+0xcb/0x200 mm/mmu_gather.c:328 exit_mmap+0x296/0x550 mm/mmap.c:3185 __mmput+0x113/0x370 kernel/fork.c:1076 exit_mm+0x4cd/0x550 kernel/exit.c:483 do_exit+0x576/0x1f20 kernel/exit.c:793 do_group_exit+0x161/0x2d0 kernel/exit.c:903 get_signal+0x139b/0x1d30 kernel/signal.c:2743 arch_do_signal+0x33/0x610 arch/x86/kernel/signal.c:811 exit_to_user_mode_loop kernel/entry/common.c:135 [inline] exit_to_user_mode_prepare+0x8d/0x1b0 kernel/entry/common.c:166 syscall_exit_to_user_mode+0x5e/0x1a0 kernel/entry/common.c:241 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Commit 1a3e1f40962c ("mm: memcontrol: decouple reference counting from page accounting") reworked the memcg lifetime to be bound the the struct page rather than charges. It also removed the css_put_many from uncharge_batch and that is causing the above splat. uncharge_batch() is supposed to uncharge accumulated charges for all pages freed from the same memcg. The queuing is done by uncharge_page which however drops the memcg reference after it adds charges to the batch. If the current page happens to be the last one holding the reference for its memcg then the memcg is OK to go and the next page to be freed will trigger batched uncharge which needs to access the memcg which is gone already. Fix the issue by taking a reference for the memcg in the current batch. Fixes: 1a3e1f40962c ("mm: memcontrol: decouple reference counting from page accounting") Reported-by: syzbot+b305848212deec86eabe@syzkaller.appspotmail.com Reported-by: syzbot+b5ea6fb6f139c8b9482b@syzkaller.appspotmail.com Signed-off-by: Michal Hocko Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Roman Gushchin Cc: Hugh Dickins Link: https://lkml.kernel.org/r/20200820090341.GC5033@dhcp22.suse.cz Signed-off-by: Linus Torvalds commit 9322c47b21b9e05d7f9c037aa2c472e9f0dc7f3b Merge: b17164e258e38 d0c20d38af135 Author: Linus Torvalds Date: Sat Sep 5 10:04:53 2020 -0700 Merge tag 'xfs-5.9-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fix from Darrick Wong: "Fix a broken metadata verifier that would incorrectly validate attr fork extents of a realtime file against the realtime volume" * tag 'xfs-5.9-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: fix xfs_bmap_validate_extent_raw when checking attr fork of rt files commit b17164e258e3888d376a7434415013175d637377 Author: Mikulas Patocka Date: Sat Sep 5 08:13:02 2020 -0400 xfs: don't update mtime on COW faults When running in a dax mode, if the user maps a page with MAP_PRIVATE and PROT_WRITE, the xfs filesystem would incorrectly update ctime and mtime when the user hits a COW fault. This breaks building of the Linux kernel. How to reproduce: 1. extract the Linux kernel tree on dax-mounted xfs filesystem 2. run make clean 3. run make -j12 4. run make -j12 at step 4, make would incorrectly rebuild the whole kernel (although it was already built in step 3). The reason for the breakage is that almost all object files depend on objtool. When we run objtool, it takes COW page fault on its .data section, and these faults will incorrectly update the timestamp of the objtool binary. The updated timestamp causes make to rebuild the whole tree. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds commit 1ef6ea0efe8e68d0299dad44c39dc6ad9e5d1f39 Author: Mikulas Patocka Date: Sat Sep 5 08:12:01 2020 -0400 ext2: don't update mtime on COW faults When running in a dax mode, if the user maps a page with MAP_PRIVATE and PROT_WRITE, the ext2 filesystem would incorrectly update ctime and mtime when the user hits a COW fault. This breaks building of the Linux kernel. How to reproduce: 1. extract the Linux kernel tree on dax-mounted ext2 filesystem 2. run make clean 3. run make -j12 4. run make -j12 at step 4, make would incorrectly rebuild the whole kernel (although it was already built in step 3). The reason for the breakage is that almost all object files depend on objtool. When we run objtool, it takes COW page fault on its .data section, and these faults will incorrectly update the timestamp of the objtool binary. The updated timestamp causes make to rebuild the whole tree. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds commit 3e8b2403545efd46c6347002e27eae4708205fd4 Author: Laurent Pinchart Date: Wed Jul 29 01:23:32 2020 +0300 drm: xlnx: dpsub: Fix DMADEVICES Kconfig dependency The dpsub driver uses the DMA engine API, and thus selects DMA_ENGINE to provide that API. DMA_ENGINE depends on DMADEVICES, which can be deselected by the user, creating a possibly unmet indirect dependency: WARNING: unmet direct dependencies detected for DMA_ENGINE Depends on [n]: DMADEVICES [=n] Selected by [m]: - DRM_ZYNQMP_DPSUB [=m] && HAS_IOMEM [=y] && (ARCH_ZYNQMP || COMPILE_TEST [=y]) && COMMON_CLK [=y] && DRM [=m] && OF [=y] Add a dependency on DMADEVICES to fix this. Reported-by: Randy Dunlap Signed-off-by: Laurent Pinchart Acked-by: Randy Dunlap commit d2b86100245080cfdf1e95e9e07477474c1be2bd Author: Laurent Pinchart Date: Wed Jul 29 01:19:40 2020 +0300 rapidio: Replace 'select' DMAENGINES 'with depends on' Enabling a whole subsystem from a single driver 'select' is frowned upon and won't be accepted in new drivers, that need to use 'depends on' instead. Existing selection of DMAENGINES will then cause circular dependencies. Replace them with a dependency. Signed-off-by: Laurent Pinchart Acked-by: Randy Dunlap commit c183edff33fdcd639d222a8f473bf44602adc655 Author: Jens Axboe Date: Fri Sep 4 22:36:52 2020 -0600 io_uring: fix explicit async read/write mapping for large segments If we exceed UIO_FASTIOV, we don't handle the transition correctly between an allocated vec for requests that are queued with IOSQE_ASYNC. Store the iovec appropriately and re-set it in the iter iov in case it changed. Fixes: ff6165b2d7f6 ("io_uring: retain iov_iter state over io_read/io_write calls") Reported-by: Nick Hill Tested-by: Norman Maurer Signed-off-by: Jens Axboe commit 8c6b6c793ed32b8f9770ebcdf1ba99af423c303b Author: J. Bruce Fields Date: Sat Sep 5 10:03:26 2020 -0400 SUNRPC: stop printk reading past end of string Since p points at raw xdr data, there's no guarantee that it's NULL terminated, so we should give a length. And probably escape any special characters too. Reported-by: Zhi Li Signed-off-by: J. Bruce Fields Signed-off-by: Trond Myklebust commit 644c9f40cf71969f29add32f32349e71d4995c0b Author: Chuck Lever Date: Fri Sep 4 17:39:12 2020 -0400 NFS: Zero-stateid SETATTR should first return delegation If a write delegation isn't available, the Linux NFS client uses a zero-stateid when performing a SETATTR. NFSv4.0 provides no mechanism for an NFS server to match such a request to a particular client. It recalls all delegations for that file, even delegations held by the client issuing the request. If that client happens to hold a read delegation, the server will recall it immediately, resulting in an NFS4ERR_DELAY/CB_RECALL/ DELEGRETURN sequence. Optimize out this pipeline bubble by having the client return any delegations it may hold on a file before it issues a SETATTR(zero-stateid) on that file. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 3ee99f6a2379eca87ab11122b7e9abd68f3441e2 Author: Fugang Duan Date: Thu Sep 3 18:05:21 2020 +0800 ARM: dts: imx6sx: fix the pad QSPI1B_SCLK mux mode for uart3 The pad QSPI1B_SCLK mux mode 0x1 is for function UART3_DTE_TX, correct the mux mode. Fixes: 743636f25f1d ("ARM: dts: imx: add pin function header for imx6sx") Signed-off-by: Fugang Duan Signed-off-by: Shawn Guo commit 66138621f2473e29625dfa6bb229872203b71b90 Author: Robin Gong Date: Tue Sep 1 18:21:49 2020 +0800 arm64: dts: imx8mp: correct sdma1 clk setting Correct sdma1 ahb clk, otherwise wrong 1:1 clk ratio will be chosed so that sdma1 function broken. sdma1 should use 1:2 clk, while sdma2/3 use 1:1. Fixes: 6d9b8d20431f ("arm64: dts: freescale: Add i.MX8MP dtsi support") Cc: Signed-off-by: Robin Gong Signed-off-by: Shawn Guo commit 7dda5b3384121181c4e79f6eaeac2b94c0622c8d Author: Linus Lüssing Date: Fri Sep 4 20:28:00 2020 +0200 batman-adv: mcast/TT: fix wrongly dropped or rerouted packets The unicast packet rerouting code makes several assumptions. For instance it assumes that there is always exactly one destination in the TT. This breaks for multicast frames in a unicast packets in several ways: For one thing if there is actually no TT entry and the destination node was selected due to the multicast tvlv flags it announced. Then an intermediate node will wrongly drop the packet. For another thing if there is a TT entry but the TTVN of this entry is newer than the originally addressed destination node: Then the intermediate node will wrongly redirect the packet, leading to duplicated multicast packets at a multicast listener and missing packets at other multicast listeners or multicast routers. Fixing this by not applying the unicast packet rerouting to batman-adv unicast packets with a multicast payload. We are not able to detect a roaming multicast listener at the moment and will just continue to send the multicast frame to both the new and old destination for a while in case of such a roaming multicast listener. Fixes: a73105b8d4c7 ("batman-adv: improved client announcement mechanism") Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit cc8e58f8325cdf14b9516b61c384cdfd02a4f408 Author: Cong Wang Date: Thu Sep 3 19:10:11 2020 -0700 act_ife: load meta modules before tcf_idr_check_alloc() The following deadlock scenario is triggered by syzbot: Thread A: Thread B: tcf_idr_check_alloc() ... populate_metalist() rtnl_unlock() rtnl_lock() ... request_module() tcf_idr_check_alloc() rtnl_lock() At this point, thread A is waiting for thread B to release RTNL lock, while thread B is waiting for thread A to commit the IDR change with tcf_idr_insert() later. Break this deadlock situation by preloading ife modules earlier, before tcf_idr_check_alloc(), this is fine because we only need to load modules we need potentially. Reported-and-tested-by: syzbot+80e32b5d1f9923f8ace6@syzkaller.appspotmail.com Fixes: 0190c1d452a9 ("net: sched: atomically check-allocate action") Cc: Jamal Hadi Salim Cc: Vlad Buslov Cc: Jiri Pirko Signed-off-by: Cong Wang Signed-off-by: Jakub Kicinski commit c2b947879ca320ac5505c6c29a731ff17da5e805 Author: Jing Xiangfeng Date: Fri Sep 4 10:51:03 2020 +0800 atm: eni: fix the missed pci_disable_device() for eni_init_one() eni_init_one() misses to call pci_disable_device() in an error path. Jump to err_disable to fix it. Fixes: ede58ef28e10 ("atm: remove deprecated use of pci api") Signed-off-by: Jing Xiangfeng Signed-off-by: Jakub Kicinski commit 44a049c42681de71c783d75cd6e56b4e339488b0 Author: Xie He Date: Wed Sep 2 17:06:58 2020 -0700 drivers/net/wan/hdlc_fr: Add needed_headroom for PVC devices PVC devices are virtual devices in this driver stacked on top of the actual HDLC device. They are the devices normal users would use. PVC devices have two types: normal PVC devices and Ethernet-emulating PVC devices. When transmitting data with PVC devices, the ndo_start_xmit function will prepend a header of 4 or 10 bytes. Currently this driver requests this headroom to be reserved for normal PVC devices by setting their hard_header_len to 10. However, this does not work when these devices are used with AF_PACKET/RAW sockets. Also, this driver does not request this headroom for Ethernet-emulating PVC devices (but deals with this problem by reallocating the skb when needed, which is not optimal). This patch replaces hard_header_len with needed_headroom, and set needed_headroom for Ethernet-emulating PVC devices, too. This makes the driver to request headroom for all PVC devices in all cases. Cc: Krzysztof Halasa Cc: Martin Schiller Signed-off-by: Xie He Signed-off-by: Jakub Kicinski commit c70672d8d316ebd46ea447effadfe57ab7a30a50 Merge: 09274aed90216 5c60ed283e1d8 Author: Linus Torvalds Date: Fri Sep 4 13:46:33 2020 -0700 Merge tag 's390-5.9-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix GENERIC_LOCKBREAK dependency on PREEMPTION in Kconfig broken because of a typo - Update defconfigs * tag 's390-5.9-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: update defconfigs s390: fix GENERIC_LOCKBREAK dependency typo in Kconfig commit 09274aed9021642cb3e5e0eb0e657a13ee3eafed Merge: 16bf121b2ddeb e0328feda79d9 Author: Linus Torvalds Date: Fri Sep 4 13:40:59 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Fix the loading of modules built with binutils-2.35. This version produces writable and executable .text.ftrace_trampoline section which is rejected by the kernel. - Remove the exporting of cpu_logical_map() as the Tegra driver has now been fixed and no longer uses this function. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/module: set trampoline section flags regardless of CONFIG_DYNAMIC_FTRACE arm64: Remove exporting cpu_logical_map symbol commit 16bf121b2ddebd4421bd73098eaae1500dd40389 Merge: 41bef91c8aa35 baf5cb30fbd1c Author: Linus Torvalds Date: Fri Sep 4 13:37:19 2020 -0700 Merge tag 'mips_fixes_5.9_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: "A few MIPS fixes: - fallthrough fallout fix - BMIPS fixes - MSA fix to avoid leaking MSA register contents - Loongson perf and cpu feature fix - SNI interrupt fix" * tag 'mips_fixes_5.9_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: SNI: Fix SCSI interrupt MIPS: add missing MSACSR and upper MSA initialization MIPS: perf: Fix wrong check condition of Loongson event IDs mips/oprofile: Fix fallthrough placement MIPS: Loongson64: Remove unnecessary inclusion of boot_param.h MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores MIPS: mm: BMIPS5000 has inclusive physical caches MIPS: Loongson64: Do not override watch and ejtag feature commit 41bef91c8aa351255cd19e7e72608ee86f7f4bab Merge: f162626a038ec 163e0c27fead9 Author: Linus Torvalds Date: Fri Sep 4 13:34:52 2020 -0700 Merge tag 'kbuild-fixes-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - fix documents - fix warning in 'make localmodconfig' * tag 'kbuild-fixes-v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: remove redundant assignment prompt = prompt kbuild: Documentation: clean up makefiles.rst kconfig: streamline_config.pl: check defined(ENV variable) before using it Documentation/llvm: Improve formatting of commands, variables, and arguments commit f162626a038ec06da98ac38ce3d6bdbd715e9c5f Merge: d824e0809ce3c f7ce2c3afc938 Author: Linus Torvalds Date: Fri Sep 4 13:27:24 2020 -0700 Merge tag 'pm-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix reference counting in the operating performance points (OPP) framework and address a few intel_pstate driver issues, mostly related to switching driver operation modes and similar with hardware-managed P-states (HWP) enabled. Specifics: - Fix reference counting of operating performance points (OPP) tables (Viresh Kumar). - Address intel_pstate driver interface issues, mostly related to switching operation modes and handling CPU offline and online and system-wide suspend/resume with hardware-managed P-states (HWP) enabled (Rafael Wysocki). - Fix the maximum frequency computation in the intel_pstate driver with turbo P-states disabled by the platform firmware and HWP enabled (Francisco Jerez)" * tag 'pm-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled cpufreq: intel_pstate: Free memory only when turning off cpufreq: intel_pstate: Add ->offline and ->online callbacks cpufreq: intel_pstate: Tweak the EPP sysfs interface cpufreq: intel_pstate: Update cached EPP in the active mode cpufreq: intel_pstate: Refuse to turn off with HWP enabled opp: Don't drop reference for an OPP table that was never parsed commit d824e0809ce3c9e935f3aa37381cda7fd4184f12 Merge: 8075fc3b113de 3b5455636fe26 Author: Linus Torvalds Date: Fri Sep 4 13:19:19 2020 -0700 Merge tag 'libata-5.9-2020-09-04' of git://git.kernel.dk/linux-block Pull libata fixes from Jens Axboe: - improve Sandisks ATA_HORKAGE on NCQ (Tejun) - link printk cleanup (Xu) * tag 'libata-5.9-2020-09-04' of git://git.kernel.dk/linux-block: libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks ata: ahci: use ata_link_info() instead of ata_link_printk() commit 8075fc3b113dee1531106aaec3dfa19c8158374d Merge: d849ca483dba7 7e24969022cbd Author: Linus Torvalds Date: Fri Sep 4 13:04:51 2020 -0700 Merge tag 'block-5.9-2020-09-04' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A bit larger than usual this week, mostly due to the NVMe fixes arriving late for -rc3 and hence didn't make last weeks pull request. - NVMe: - instance leak and io boundary fixes from Keith - fc locking fix from Christophe - various tcp/rdma reset during traffic fixes from Sagi - pci use-after-free fix from Tong - tcp target null deref fix from Ziye - Locking fix for partition removal (Christoph) - Ensure bdi->io_pages is always set (me) - Fixup for hd struct reference (Ming) - Fix for zero length bvecs (Ming) - Two small blk-iocost fixes (Tejun)" * tag 'block-5.9-2020-09-04' of git://git.kernel.dk/linux-block: block: allow for_each_bvec to support zero len bvec blk-stat: make q->stats->lock irqsafe blk-iocost: ioc_pd_free() shouldn't assume irq disabled block: fix locking in bdev_del_partition block: release disk reference in hd_struct_free_work block: ensure bdi->io_pages is always initialized nvme-pci: cancel nvme device request before disabling nvme: only use power of two io boundaries nvme: fix controller instance leak nvmet-fc: Fix a missed _irqsave version of spin_lock in 'nvmet_fc_fod_op_done()' nvme: Fix NULL dereference for pci nvme controllers nvme-rdma: fix reset hang if controller died in the middle of a reset nvme-rdma: fix timeout handler nvme-rdma: serialize controller teardown sequences nvme-tcp: fix reset hang if controller died in the middle of a reset nvme-tcp: fix timeout handler nvme-tcp: serialize controller teardown sequences nvme: have nvme_wait_freeze_timeout return if it timed out nvme-fabrics: don't check state NVME_CTRL_NEW for request acceptance nvmet-tcp: Fix NULL dereference when a connect data comes in h2cdata pdu commit d849ca483dba7546ad176da83bf66d1c013725f6 Merge: 2fb547911ca54 355afaeb578ab Author: Linus Torvalds Date: Fri Sep 4 12:55:22 2020 -0700 Merge tag 'io_uring-5.9-2020-09-04' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - EAGAIN with O_NONBLOCK retry fix - Two small fixes for registered files (Jiufei) * tag 'io_uring-5.9-2020-09-04' of git://git.kernel.dk/linux-block: io_uring: no read/write-retry on -EAGAIN error and O_NONBLOCK marked file io_uring: set table->files[i] to NULL when io_sqe_file_register failed io_uring: fix removing the wrong file in __io_sqe_files_update() commit 2fb547911ca54bc9ffa2709c55c9a7638ac50ae4 Merge: e2dacf6cd13c1 a5f785ce608ca Author: Linus Torvalds Date: Fri Sep 4 12:49:03 2020 -0700 Merge tag 'thermal-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal fixes from Daniel Lezcano: - Fix bogus thermal shutdowns for omap4430 where bogus values resulting from an incorrect ADC conversion are too high and fire an emergency shutdown (Tony Lindgren) - Don't suppress negative temp for qcom spmi as they are valid and userspace needs them (Veera Vegivada) - Fix use-after-free in thermal_zone_device_unregister reported by Kasan (Dmitry Osipenko) * tag 'thermal-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal: core: Fix use-after-free in thermal_zone_device_unregister() thermal: qcom-spmi-temp-alarm: Don't suppress negative temp thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430 commit f6828e0c4045f03f9cf2df6c2a768102641183f4 Author: Jordan Crouse Date: Thu Sep 3 20:03:13 2020 -0600 drm/msm: Disable the RPTR shadow Disable the RPTR shadow across all targets. It will be selectively re-enabled later for targets that need it. Cc: stable@vger.kernel.org Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 7b3f3948c8b7053d771acc9f79810cc410f5e2e0 Author: Jordan Crouse Date: Thu Sep 3 20:03:12 2020 -0600 drm/msm: Disable preemption on all 5xx targets Temporarily disable preemption on a5xx targets pending some improvements to protect the RPTR shadow from being corrupted. Cc: stable@vger.kernel.org Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 604234f33658cdd72f686be405a99646b397d0b3 Author: Jordan Crouse Date: Thu Sep 3 20:03:11 2020 -0600 drm/msm: Enable expanded apriv support for a650 a650 supports expanded apriv support that allows us to map critical buffers (ringbuffer and memstore) as as privileged to protect them from corruption. Cc: stable@vger.kernel.org Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit 34221545d2069dc947131f42392fd4cebabe1b39 Author: Jordan Crouse Date: Thu Sep 3 20:03:10 2020 -0600 drm/msm: Split the a5xx preemption record The main a5xx preemption record can be marked as privileged to protect it from user access but the counters storage needs to be remain unprivileged. Split the buffers and mark the critical memory as privileged. Cc: stable@vger.kernel.org Signed-off-by: Jordan Crouse Signed-off-by: Rob Clark commit e2dacf6cd13c1f8d40a59fdda41ecd139c2207df Merge: 86edf52e7c720 46815bf4d5a2e Author: Linus Torvalds Date: Fri Sep 4 12:12:39 2020 -0700 Merge tag 'dmaengine-fix-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "A couple of core fixes and odd driver fixes for dmaengine subsystem: Core: - drop ACPI CSRT table reference after using it - fix of_dma_router_xlate() error handling Drivers fixes in idxd, at_hdmac, pl330, dw-edma and jz478" * tag 'dmaengine-fix-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: ti: k3-udma: Update rchan_oes_offset for am654 SYSFW ABI 3.0 drivers/dma/dma-jz4780: Fix race condition between probe and irq handler dmaengine: dw-edma: Fix scatter-gather address calculation dmaengine: ti: k3-udma: Fix the TR initialization for prep_slave_sg dmaengine: pl330: Fix burst length if burst size is smaller than bus width dmaengine: at_hdmac: add missing kfree() call in at_dma_xlate() dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate() dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate() dmaengine: of-dma: Fix of_dma_router_xlate's of_dma_xlate handling dmaengine: idxd: reset states after device disable or reset dmaengine: acpi: Put the CSRT table after using it commit 86edf52e7c7201fabfba39ae694a5206d48e77af Merge: cf85f5de83b19 6a6660d049f88 Author: Linus Torvalds Date: Fri Sep 4 12:05:25 2020 -0700 Merge tag 'sound-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small changes, nothing intrusive: - remaining tasklet API conversions, now all sound stuff have been converted - a few HD-audio and USB-audio quirks and minor fixes - FireWire Tascam and Digi00xx fixes - drop a kernel WARNING from PCM OSS for syzkaller" * tag 'sound-5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (29 commits) ALSA: hda/realtek - Improved routing for Thinkpad X1 7th/8th Gen ALSA: hda: use consistent HDAudio spelling in comments/docs ALSA: hda: add dev_dbg log when driver is not selected ALSA: hda: fix a runtime pm issue in SOF when integrated GPU is disabled ALSA: hda: hdmi - add Rocketlake support ALSA: ua101: convert tasklets to use new tasklet_setup() API ALSA: usb-audio: convert tasklets to use new tasklet_setup() API ASoC: txx9: convert tasklets to use new tasklet_setup() API ASoC: siu: convert tasklets to use new tasklet_setup() API ASoC: fsl_esai: convert tasklets to use new tasklet_setup() API ALSA: hdsp: convert tasklets to use new tasklet_setup() API ALSA: riptide: convert tasklets to use new tasklet_setup() API ALSA: pci/asihpi: convert tasklets to use new tasklet_setup() API ALSA: firewire: convert tasklets to use new tasklet_setup() API ALSA: core: convert tasklets to use new tasklet_setup() API ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO ALSA: hda/hdmi: always check pin power status in i915 pin fixup ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion NT950XCJ-X716A ALSA: usb-audio: Add basic capture support for Pioneer DJ DJM-250MK2 ... commit cf85f5de83b19361c3d575fa0ea05d8194bb0d05 Merge: acf69c9462332 d37d56920004c Author: Linus Torvalds Date: Fri Sep 4 11:59:44 2020 -0700 Merge tag 'drm-fixes-2020-09-04' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Not much going on this week, nouveau has a display hw bug workaround, amdgpu has some PM fixes and CIK regression fixes, one single radeon PLL fix, and a couple of i915 display fixes. amdgpu: - Fix for 32bit systems - SW CTF fix - Update for Sienna Cichlid - CIK bug fixes radeon: - PLL fix i915: - Clang build warning fix - HDCP fixes nouveau: - display fixes" * tag 'drm-fixes-2020-09-04' of git://anongit.freedesktop.org/drm/drm: drm/nouveau/kms/nv50-gp1xx: add WAR for EVO push buffer HW bug drm/nouveau/kms/nv50-gp1xx: disable notifies again after core update drm/nouveau/kms/nv50-: add some whitespace before debug message drm/nouveau/kms/gv100-: Include correct push header in crcc37d.c drm/radeon: Prefer lower feedback dividers drm/amdgpu: Fix bug in reporting voltage for CIK drm/amdgpu: Specify get_argument function for ci_smu_funcs drm/amd/pm: enable MP0 DPM for sienna_cichlid drm/amd/pm: avoid false alarm due to confusing softwareshutdowntemp setting drm/amd/pm: fix is_dpm_running() run error on 32bit system drm/i915: Clear the repeater bit on HDCP disable drm/i915: Fix sha_text population code drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state commit acf69c946233259ab4d64f8869d4037a198c7f06 Author: Or Cohen Date: Thu Sep 3 21:05:28 2020 -0700 net/packet: fix overflow in tpacket_rcv Using tp_reserve to calculate netoff can overflow as tp_reserve is unsigned int and netoff is unsigned short. This may lead to macoff receving a smaller value then sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr is set, an out-of-bounds write will occur when calling virtio_net_hdr_from_skb. The bug is fixed by converting netoff to unsigned int and checking if it exceeds USHRT_MAX. This addresses CVE-2020-14386 Fixes: 8913336a7e8d ("packet: add PACKET_RESERVE sockopt") Signed-off-by: Or Cohen Signed-off-by: Eric Dumazet Signed-off-by: Linus Torvalds commit b25d1dc9474e1f0cefca994885e82beea271acfe Merge: cfc905f158eaa 798a6b87ecd72 Author: Linus Torvalds Date: Fri Sep 4 09:31:54 2020 -0700 Merge branch 'simplify-do_wp_page' Merge emailed patches from Peter Xu: "This is a small series that I picked up from Linus's suggestion to simplify cow handling (and also make it more strict) by checking against page refcounts rather than mapcounts. This makes uffd-wp work again (verified by running upmapsort)" Note: this is horrendously bad timing, and making this kind of fundamental vm change after -rc3 is not at all how things should work. The saving grace is that it really is a a nice simplification: 8 files changed, 29 insertions(+), 120 deletions(-) The reason for the bad timing is that it turns out that commit 17839856fd58 ("gup: document and work around 'COW can break either way' issue" broke not just UFFD functionality (as Peter noticed), but Mikulas Patocka also reports that it caused issues for strace when running in a DAX environment with ext4 on a persistent memory setup. And we can't just revert that commit without re-introducing the original issue that is a potential security hole, so making COW stricter (and in the process much simpler) is a step to then undoing the forced COW that broke other uses. Link: https://lore.kernel.org/lkml/alpine.LRH.2.02.2009031328040.6929@file01.intranet.prod.int.rdu2.redhat.com/ * emailed patches from Peter Xu : mm: Add PGREUSE counter mm/gup: Remove enfornced COW mechanism mm/ksm: Remove reuse_ksm_page() mm: do_wp_page() simplification commit f7ce2c3afc938b7d743ee8e5563560c04e17d7be Merge: 763700f5e0fc8 eacc9c5a927e4 Author: Rafael J. Wysocki Date: Fri Sep 4 18:31:25 2020 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled cpufreq: intel_pstate: Free memory only when turning off cpufreq: intel_pstate: Add ->offline and ->online callbacks cpufreq: intel_pstate: Tweak the EPP sysfs interface cpufreq: intel_pstate: Update cached EPP in the active mode cpufreq: intel_pstate: Refuse to turn off with HWP enabled commit 798a6b87ecd72828a6c6b5469aaa2032a57e92b7 Author: Peter Xu Date: Fri Aug 21 19:49:58 2020 -0400 mm: Add PGREUSE counter This accounts for wp_page_reuse() case, where we reused a page for COW. Signed-off-by: Peter Xu Signed-off-by: Linus Torvalds commit a308c71bf1e6e19cc2e4ced31853ee0fc7cb439a Author: Peter Xu Date: Fri Aug 21 19:49:57 2020 -0400 mm/gup: Remove enfornced COW mechanism With the more strict (but greatly simplified) page reuse logic in do_wp_page(), we can safely go back to the world where cow is not enforced with writes. This essentially reverts commit 17839856fd58 ("gup: document and work around 'COW can break either way' issue"). There are some context differences due to some changes later on around it: 2170ecfa7688 ("drm/i915: convert get_user_pages() --> pin_user_pages()", 2020-06-03) 376a34efa4ee ("mm/gup: refactor and de-duplicate gup_fast() code", 2020-06-03) Some lines moved back and forth with those, but this revert patch should have striped out and covered all the enforced cow bits anyways. Suggested-by: Linus Torvalds Signed-off-by: Peter Xu Signed-off-by: Linus Torvalds commit 1a0cf26323c80e2f1c58fc04f15686de61bfab0c Author: Peter Xu Date: Fri Aug 21 19:49:56 2020 -0400 mm/ksm: Remove reuse_ksm_page() Remove the function as the last reference has gone away with the do_wp_page() changes. Signed-off-by: Peter Xu Signed-off-by: Linus Torvalds commit 09854ba94c6aad7886996bfbee2530b3d8a7f4f4 Author: Linus Torvalds Date: Fri Aug 21 19:49:55 2020 -0400 mm: do_wp_page() simplification How about we just make sure we're the only possible valid user fo the page before we bother to reuse it? Simplify, simplify, simplify. And get rid of the nasty serialization on the page lock at the same time. [peterx: add subject prefix] Signed-off-by: Linus Torvalds Signed-off-by: Peter Xu Signed-off-by: Linus Torvalds commit 6b57b15abe11aa334ebf726e02c0deaf123ba040 Author: Saravana Kannan Date: Tue Sep 1 11:44:44 2020 -0700 driver core: Fix device_pm_lock() locking for device links This commit fixes two issues: 1. The lockdep warning reported by Dong Aisheng [1]. It is a warning about a cycle (dpm_list_mtx --> kn->active#3 --> fw_lock) that was introduced when device-link devices were added to expose device link information in sysfs. The patch that "introduced" this cycle can't be reverted because it's fixes a real SRCU issue and also ensures that the device-link device is deleted as soon as the device-link is deleted. This is important to avoid sysfs name collisions if the device-link is create again immediately (this can happen a lot with deferred probing). 2. Inconsistency in grabbing device_pm_lock() during device link deletion Some device link deletion code paths grab device_pm_lock(), while others don't. The device_pm_lock() is grabbed during device_link_add() because it checks if the supplier is in the dpm_list and also reorders the dpm_list. However, when a device link is deleted, it does not do either of those and therefore device_pm_lock() is not necessary. Dropping the device_pm_lock() in all the device link deletion paths removes the inconsistency in locking. Thanks to Stephen Boyd for helping me understand the lockdep splat. Fixes: 843e600b8a2b ("driver core: Fix sleeping in invalid context during device link deletion") [1] - https://lore.kernel.org/lkml/CAA+hA=S4eAreb7vo69LAXSk2t5=DEKNxHaiY1wSpk4xTp9urLg@mail.gmail.com/ Reported-by: Dong Aisheng Signed-off-by: Saravana Kannan Tested-by: Peng Fan Link: https://lore.kernel.org/r/20200901184445.1736658-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit cfc905f158eaa099d6258031614d11869e7ef71c Author: Leon Romanovsky Date: Fri Sep 4 18:58:08 2020 +0300 gcov: Disable gcov build with GCC 10 GCOV built with GCC 10 doesn't initialize n_function variable. This produces different kernel panics as was seen by Colin in Ubuntu and me in FC 32. As a workaround, let's disable GCOV build for broken GCC 10 version. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1891288 Link: https://lore.kernel.org/lkml/20200827133932.3338519-1-leon@kernel.org Link: https://lore.kernel.org/lkml/CAHk-=whbijeSdSvx-Xcr0DPMj0BiwhJ+uiNnDSVZcr_h_kg7UA@mail.gmail.com/ Cc: Colin Ian King Signed-off-by: Leon Romanovsky Signed-off-by: Linus Torvalds commit 7b81ce7cdcef3a3ae71eb3fb863433c646b4a2f4 Author: Barret Rhoden Date: Fri Sep 4 09:53:32 2020 -0400 init: fix error check in clean_path() init_stat() returns 0 on success, same as vfs_lstat(). When it replaced vfs_lstat(), the '!' was dropped. Fixes: 716308a5331b ("init: add an init_stat helper") Signed-off-by: Barret Rhoden Reviewed-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit 51de18bff23362bfaa3c7af33bb455de274b49c9 Author: Krzysztof Kozlowski Date: Thu Aug 27 20:20:29 2020 +0200 MAINTAINERS: Add the security document to SECURITY CONTACT When changing the document related to kernel security workflow, notify the security mailing list as its concerned by this. Cc: Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200827182029.3458-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit 693a8e936590f93451e6f5a3d748616f5a59c80b Author: Michał Mirosław Date: Fri Aug 28 18:14:35 2020 +0200 driver code: print symbolic error code dev_err_probe() prepends the message with an error code. Let's make it more readable by translating the code to a more recognisable symbol. Fixes: a787e5400a1c ("driver core: add device probe log helper") Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/ea3f973e4708919573026fdce52c264db147626d.1598630856.git.mirq-linux@rere.qmqm.pl Signed-off-by: Greg Kroah-Hartman commit e3b9fc7eec55e6fdc8beeed18f2ed207086341e2 Author: Vladis Dronov Date: Tue Aug 11 17:01:29 2020 +0200 debugfs: Fix module state check condition The '#ifdef MODULE' check in the original commit does not work as intended. The code under the check is not built at all if CONFIG_DEBUG_FS=y. Fix this by using a correct check. Fixes: 275678e7a9be ("debugfs: Check module state before warning in {full/open}_proxy_open()") Signed-off-by: Vladis Dronov Cc: stable Link: https://lore.kernel.org/r/20200811150129.53343-1-vdronov@redhat.com Signed-off-by: Greg Kroah-Hartman commit bd018a6a75cebb511bb55a0e7690024be975fe93 Author: Tetsuo Handa Date: Mon Aug 31 19:37:00 2020 +0900 video: fbdev: fix OOB read in vga_8planes_imageblit() syzbot is reporting OOB read at vga_8planes_imageblit() [1], for "cdat[y] >> 4" can become a negative value due to "const char *cdat". [1] https://syzkaller.appspot.com/bug?id=0d7a0da1557dcd1989e00cb3692b26d4173b4132 Reported-by: syzbot Signed-off-by: Tetsuo Handa Cc: stable Link: https://lore.kernel.org/r/90b55ec3-d5b0-3307-9f7c-7ff5c5fd6ad3@i-love.sakura.ne.jp Signed-off-by: Greg Kroah-Hartman commit 42f07816ac0cc797928119cc039c414ae2b95d34 Author: Jim Cromie Date: Mon Aug 31 12:22:10 2020 -0600 dyndbg: fix problem parsing format="foo bar" commit 14775b049642 ("dyndbg: accept query terms like file=bar and module=foo") added the combined keyword=value parsing poorly; revert most of it, keeping the keyword & arg change. Instead, fix the tokenizer for the new input, by terminating the keyword (an unquoted word) on '=' as well as space, thus letting the tokenizer work on the quoted argument, like it would have previously. Also add a few debug-prints to show more parsing context, into tokenizer and parse-query, and use "keyword, value" in others. Fixes: 14775b049642 ("dyndbg: accept query terms like file=bar and module=foo") Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200831182210.850852-4-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit a2d375eda771a6a4866f3717a8ed81b63acb1dbd Author: Jim Cromie Date: Mon Aug 31 12:22:09 2020 -0600 dyndbg: refine export, rename to dynamic_debug_exec_queries() commit 4c0d77828d4f ("dyndbg: export ddebug_exec_queries") had a few problems: - broken non DYNAMIC_DEBUG_CORE configs, sparse warning - the exported function modifies query string, breaks on RO strings. - func name follows internal convention, shouldn't be exposed as is. 1st is fixed in header with ifdefd function prototype or stub defn. Also remove an obsolete HAVE-symbol ifdef-comment, and add others. Fix others by wrapping existing internal function with a new one, named in accordance with module-prefix naming convention, before export hits v5.9.0. In new function, copy query string to a local buffer, so users can pass hard-coded/RO queries, and internal function can be used unchanged. Fixes: 4c0d77828d4f ("dyndbg: export ddebug_exec_queries") Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200831182210.850852-3-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit b52a95eac112f6f21f0c93987c0bbf3e91bfbf88 Author: Jim Cromie Date: Mon Aug 31 12:22:08 2020 -0600 dyndbg: give %3u width in pr-format, cosmetic only Specify the print-width so log entries line up nicely. no functional changes. Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200831182210.850852-2-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit a18cd6c9b6bc73dc17e8b7e9bd07decaa8833c97 Author: Zeng Tao Date: Fri Sep 4 14:37:44 2020 +0800 usb: core: fix slab-out-of-bounds Read in read_descriptors The USB device descriptor may get changed between two consecutive enumerations on the same device for some reason, such as DFU or malicius device. In that case, we may access the changing descriptor if we don't take the device lock here. The issue is reported: https://syzkaller.appspot.com/bug?id=901a0d9e6519ef8dc7acab25344bd287dd3c7be9 Cc: stable Cc: Alan Stern Reported-by: syzbot+256e56ddde8b8957eabd@syzkaller.appspotmail.com Fixes: 217a9081d8e6 ("USB: add all configs to the "descriptors" attribute") Signed-off-by: Zeng Tao Link: https://lore.kernel.org/r/1599201467-11000-1-git-send-email-prime.zeng@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit a6498d51821edf9615b42b968fb419a40197a982 Author: Amjad Ouled-Ameur Date: Thu Aug 27 16:48:10 2020 +0200 Revert "usb: dwc3: meson-g12a: fix shared reset control use" This reverts commit 7a410953d1fb4dbe91ffcfdee9cbbf889d19b0d7. This commit breaks USB on meson-gxl-s905x-libretech-cc. Reverting the change solves the issue. In fact, according to the reset framework code, consumers must not use reset_control_(de)assert() on shared reset lines when reset_control_reset has been used, and vice-versa. Moreover, with this commit, usb is not guaranted to be reset since the reset is likely to be initially deasserted. Reverting the commit will bring back the suspend warning mentioned in the commit description. Nevertheless, a warning is much less critical than breaking dwc3-meson-g12a USB completely. We will address the warning issue in another way as a 2nd step. Fixes: 7a410953d1fb ("usb: dwc3: meson-g12a: fix shared reset control use") Cc: stable Signed-off-by: Amjad Ouled-Ameur Reported-by: Jerome Brunet Acked-by: Neil Armstrong Acked-by: Philipp Zabel Link: https://lore.kernel.org/r/20200827144810.26657-1-aouledameur@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 1f3546ff3f0a1000971daef58406954bad3f7061 Author: Heikki Krogerus Date: Fri Sep 4 14:09:18 2020 +0300 usb: typec: ucsi: acpi: Check the _DEP dependencies Failing probe with -EPROBE_DEFER until all dependencies listed in the _DEP (Operation Region Dependencies) object have been met. This will fix an issue where on some platforms UCSI ACPI driver fails to probe because the address space handler for the operation region that the UCSI ACPI interface uses has not been loaded yet. Fixes: 8243edf44152 ("usb: typec: ucsi: Add ACPI driver") Cc: stable@vger.kernel.org Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200904110918.51546-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 290a405ce318d036666c4155d5899eb8cd6e0d97 Author: Madhusudanarao Amara Date: Wed Aug 26 00:08:11 2020 +0530 usb: typec: intel_pmc_mux: Un-register the USB role switch Added missing code for un-register USB role switch in the remove and error path. Cc: Stable # v5.8 Reviewed-by: Heikki Krogerus Fixes: 6701adfa9693b ("usb: typec: driver for Intel PMC mux control") Signed-off-by: Madhusudanarao Amara Link: https://lore.kernel.org/r/20200825183811.7262-1-madhusudanarao.amara@intel.com Signed-off-by: Greg Kroah-Hartman commit cfd54fa83a5068b61b7eb28d3c117d8354c74c7a Author: Mathias Nyman Date: Tue Sep 1 11:25:28 2020 +0300 usb: Fix out of sync data toggle if a configured device is reconfigured Userspace drivers that use a SetConfiguration() request to "lightweight" reset an already configured usb device might cause data toggles to get out of sync between the device and host, and the device becomes unusable. The xHCI host requires endpoints to be dropped and added back to reset the toggle. If USB core notices the new configuration is the same as the current active configuration it will avoid these extra steps by calling usb_reset_configuration() instead of usb_set_configuration(). A SetConfiguration() request will reset the device side data toggles. Make sure usb_reset_configuration() function also drops and adds back the endpoints to ensure data toggles are in sync. To avoid code duplication split the current usb_disable_device() function and reuse the endpoint specific part. Cc: stable Tested-by: Martin Thierer Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200901082528.12557-1-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4facb95b7adaf77e2da73aafb9ba60996fe42a12 Author: Thomas Gleixner Date: Wed Sep 2 01:50:54 2020 +0200 x86/entry: Unbreak 32bit fast syscall Andy reported that the syscall treacing for 32bit fast syscall fails: # ./tools/testing/selftests/x86/ptrace_syscall_32 ... [RUN] SYSEMU [FAIL] Initial args are wrong (nr=224, args=10 11 12 13 14 4289172732) ... [RUN] SYSCALL [FAIL] Initial args are wrong (nr=29, args=0 0 0 0 0 4289172732) The eason is that the conversion to generic entry code moved the retrieval of the sixth argument (EBP) after the point where the syscall entry work runs, i.e. ptrace, seccomp, audit... Unbreak it by providing a split up version of syscall_enter_from_user_mode(). - syscall_enter_from_user_mode_prepare() establishes state and enables interrupts - syscall_enter_from_user_mode_work() runs the entry work Replace the call to syscall_enter_from_user_mode() in the 32bit fast syscall C-entry with the split functions and stick the EBP retrieval between them. Fixes: 27d6b4d14f5c ("x86/entry: Use generic syscall entry function") Reported-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/87k0xdjbtt.fsf@nanos.tec.linutronix.de commit d5c678aed5eddb944b8e7ce451b107b39245962d Author: Andy Lutomirski Date: Wed Sep 2 15:25:51 2020 +0200 x86/debug: Allow a single level of #DB recursion Trying to clear DR7 around a #DB from usermode malfunctions if the tasks schedules when delivering SIGTRAP. Rather than trying to define a special no-recursion region, just allow a single level of recursion. The same mechanism is used for NMI, and it hasn't caused any problems yet. Fixes: 9f58fdde95c9 ("x86/db: Split out dr6/7 handling") Reported-by: Kyle Huey Debugged-by: Josh Poimboeuf Signed-off-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/8b9bd05f187231df008d48cf818a6a311cbd5c98.1597882384.git.luto@kernel.org Link: https://lore.kernel.org/r/20200902133200.726584153@infradead.org commit 662a0221893a3d58aa72719671844264306f6e4b Author: Peter Zijlstra Date: Wed Sep 2 15:25:50 2020 +0200 x86/entry: Fix AC assertion The WARN added in commit 3c73b81a9164 ("x86/entry, selftests: Further improve user entry sanity checks") unconditionally triggers on a IVB machine because it does not support SMAP. For !SMAP hardware the CLAC/STAC instructions are patched out and thus if userspace sets AC, it is still have set after entry. Fixes: 3c73b81a9164 ("x86/entry, selftests: Further improve user entry sanity checks") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Tested-by: Daniel Thompson Acked-by: Andy Lutomirski Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200902133200.666781610@infradead.org commit 2356bb4b8221d7dc8c7beb810418122ed90254c9 Author: Vamshi K Sthambamkadi Date: Fri Aug 28 17:02:46 2020 +0530 tracing/kprobes, x86/ptrace: Fix regs argument order for i386 On i386, the order of parameters passed on regs is eax,edx,and ecx (as per regparm(3) calling conventions). Change the mapping in regs_get_kernel_argument(), so that arg1=ax arg2=dx, and arg3=cx. Running the selftests testcase kprobes_args_use.tc shows the result as passed. Fixes: 3c88ee194c28 ("x86: ptrace: Add function argument access API") Signed-off-by: Vamshi K Sthambamkadi Signed-off-by: Borislav Petkov Acked-by: Masami Hiramatsu Acked-by: Peter Zijlstra (Intel) Cc: Link: https://lkml.kernel.org/r/20200828113242.GA1424@cosmos commit b27eda5ce11143829642c97d0de1d9775130a781 Merge: e22a220515e88 91e045b93db79 Author: Greg Kroah-Hartman Date: Fri Sep 4 13:52:03 2020 +0200 Merge tag 'icc-5.9-rc4' of https://git.linaro.org/people/georgi.djakov/linux into char-misc-linus Georgi writes: interconnect fixes for v5.9 This contains two fixes: - Fix the core to show correctly the bandwidth for disabled paths. - Fix a driver to make sure small values are not truncated. Signed-off-by: Georgi Djakov * tag 'icc-5.9-rc4' of https://git.linaro.org/people/georgi.djakov/linux: interconnect: qcom: Fix small BW votes being truncated to zero interconnect: Show bandwidth for disabled paths as zero in debugfs commit fc7f148feb8975784bd40e41fff875d33f698be8 Author: Gerd Hoffmann Date: Tue Aug 18 09:25:11 2020 +0200 drm/virtio: drop virtio_gpu_output->enabled Not needed, already tracked by drm_crtc_state->active. Signed-off-by: Gerd Hoffmann Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20200818072511.6745-3-kraxel@redhat.com (cherry picked from commit 1174c8a0f33c1e5c442ac40381fe124248c08b3a) commit e22a220515e884b286e7dc0ab938b0f9e7304b5f Merge: 51fc07d9ff864 ad7a7acaedcf4 Author: Greg Kroah-Hartman Date: Fri Sep 4 12:41:55 2020 +0200 Merge tag 'phy-fixes-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-linus Vinod writes: phy: fixes for 5.9 *) platform_no_drv_owner.cocci and return value check qcom ipq806x-usb driver *) correcting register programming for ipq8074 phy *) disable PHY charger detect for omap-usb2-phy * tag 'phy-fixes-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: omap-usb2-phy: disable PHY charger detect phy: qcom-qmp: Use correct values for ipq8074 PCIe Gen2 PHY init phy: qualcomm: fix return value check in qcom_ipq806x_usb_phy_probe() phy: qualcomm: fix platform_no_drv_owner.cocci warnings commit 51fc07d9ff864e06ce5a898c76d032c7187468bd Merge: c626c5fb7fe48 3fbbf2148a406 Author: Greg Kroah-Hartman Date: Fri Sep 4 12:41:08 2020 +0200 Merge tag 'soundwire-5.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-linus Vinod writes: soundwire fixes for v5.8 This contains two fixes to sdw core for dangling pointer and a typo for INTSTAT register * tag 'soundwire-5.9-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: fix double free of dangling pointer soundwire: bus: fix typo in comment on INTSTAT registers commit 29aaebbca4abc4cceb38738483051abefafb6950 Author: Chris Wilson Date: Sat Aug 22 17:02:09 2020 +0100 iommu/vt-d: Handle 36bit addressing for x86-32 Beware that the address size for x86-32 may exceed unsigned long. [ 0.368971] UBSAN: shift-out-of-bounds in drivers/iommu/intel/iommu.c:128:14 [ 0.369055] shift exponent 36 is too large for 32-bit type 'long unsigned int' If we don't handle the wide addresses, the pages are mismapped and the device read/writes go astray, detected as DMAR faults and leading to device failure. The behaviour changed (from working to broken) in commit fa954e683178 ("iommu/vt-d: Delegate the dma domain to upper layer"), but the error looks older. Fixes: fa954e683178 ("iommu/vt-d: Delegate the dma domain to upper layer") Signed-off-by: Chris Wilson Acked-by: Lu Baolu Cc: James Sewart Cc: Lu Baolu Cc: Joerg Roedel Cc: # v5.3+ Link: https://lore.kernel.org/r/20200822160209.28512-1-chris@chris-wilson.co.uk Signed-off-by: Joerg Roedel commit 2822e582501b65707089b097e773e6fd70774841 Author: Joerg Roedel Date: Mon Aug 24 12:54:15 2020 +0200 iommu/amd: Do not use IOMMUv2 functionality when SME is active When memory encryption is active the device is likely not in a direct mapped domain. Forbid using IOMMUv2 functionality for now until finer grained checks for this have been implemented. Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20200824105415.21000-3-joro@8bytes.org Signed-off-by: Joerg Roedel commit 7cad554887f1c5fd77e57e6bf4be38370c2160cb Author: Joerg Roedel Date: Mon Aug 24 12:54:14 2020 +0200 iommu/amd: Do not force direct mapping when SME is active Do not force devices supporting IOMMUv2 to be direct mapped when memory encryption is active. This might cause them to be unusable because their DMA mask does not include the encryption bit. Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20200824105415.21000-2-joro@8bytes.org Signed-off-by: Joerg Roedel commit 7b75cd5128421c673153efb1236705696a1a9812 Author: Alexandru Elisei Date: Tue Sep 1 14:33:56 2020 +0100 KVM: arm64: Update page shift if stage 2 block mapping not supported Commit 196f878a7ac2e (" KVM: arm/arm64: Signal SIGBUS when stage2 discovers hwpoison memory") modifies user_mem_abort() to send a SIGBUS signal when the fault IPA maps to a hwpoisoned page. Commit 1559b7583ff6 ("KVM: arm/arm64: Re-check VMA on detecting a poisoned page") changed kvm_send_hwpoison_signal() to use the page shift instead of the VMA because at that point the code had already released the mmap lock, which means userspace could have modified the VMA. If userspace uses hugetlbfs for the VM memory, user_mem_abort() tries to map the guest fault IPA using block mappings in stage 2. That is not always possible, if, for example, userspace uses dirty page logging for the VM. Update the page shift appropriately in those cases when we downgrade the stage 2 entry from a block mapping to a page. Fixes: 1559b7583ff6 ("KVM: arm/arm64: Re-check VMA on detecting a poisoned page") Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Reviewed-by: Gavin Shan Link: https://lore.kernel.org/r/20200901133357.52640-2-alexandru.elisei@arm.com commit 376426b1a953762b00df887e28d29e44ab4ff723 Author: Marc Zyngier Date: Wed Sep 2 11:53:03 2020 +0100 KVM: arm64: Fix address truncation in traces Owing to their ARMv7 origins, the trace events are truncating most address values to 32bits. That's not really helpful. Expand the printing of such values to their full glory. Signed-off-by: Marc Zyngier commit e52d58d54a321d4fe9d0ecdabe4f8774449f0d6e Author: Suravee Suthikulpanit Date: Thu Sep 3 09:38:22 2020 +0000 iommu/amd: Use cmpxchg_double() when updating 128-bit IRTE When using 128-bit interrupt-remapping table entry (IRTE) (a.k.a GA mode), current driver disables interrupt remapping when it updates the IRTE so that the upper and lower 64-bit values can be updated safely. However, this creates a small window, where the interrupt could arrive and result in IO_PAGE_FAULT (for interrupt) as shown below. IOMMU Driver Device IRQ ============ =========== irte.RemapEn=0 ... change IRTE IRQ from device ==> IO_PAGE_FAULT !! ... irte.RemapEn=1 This scenario has been observed when changing irq affinity on a system running I/O-intensive workload, in which the destination APIC ID in the IRTE is updated. Instead, use cmpxchg_double() to update the 128-bit IRTE at once without disabling the interrupt remapping. However, this means several features, which require GA (128-bit IRTE) support will also be affected if cmpxchg16b is not supported (which is unprecedented for AMD processors w/ IOMMU). Fixes: 880ac60e2538 ("iommu/amd: Introduce interrupt remapping ops structure") Reported-by: Sean Osborne Signed-off-by: Suravee Suthikulpanit Tested-by: Erik Rockstrom Reviewed-by: Joao Martins Link: https://lore.kernel.org/r/20200903093822.52012-3-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit 26e495f341075c09023ba16dee9a7f37a021e745 Author: Suravee Suthikulpanit Date: Thu Sep 3 09:38:21 2020 +0000 iommu/amd: Restore IRTE.RemapEn bit after programming IRTE Currently, the RemapEn (valid) bit is accidentally cleared when programming IRTE w/ guestMode=0. It should be restored to the prior state. Fixes: b9fc6b56f478 ("iommu/amd: Implements irq_set_vcpu_affinity() hook to setup vapic mode for pass-through devices") Signed-off-by: Suravee Suthikulpanit Reviewed-by: Joao Martins Link: https://lore.kernel.org/r/20200903093822.52012-2-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit a5f785ce608cafc444cdf047d1791d5ad97943ba Author: Dmitry Osipenko Date: Tue Aug 18 02:58:54 2020 +0300 thermal: core: Fix use-after-free in thermal_zone_device_unregister() The user-after-free bug in thermal_zone_device_unregister() is reported by KASAN. It happens because struct thermal_zone_device is released during of device_unregister() invocation, and hence the "tz" variable shouldn't be touched by thermal_notify_tz_delete(tz->id). Fixes: 55cdf0a283b8 ("thermal: core: Add notifications call in the framework") Signed-off-by: Dmitry Osipenko Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200817235854.26816-1-digetx@gmail.com commit 0ffdab6f2dea9e23ec33230de24e492ff0b186d9 Author: Veera Vegivada Date: Wed Jul 29 09:52:51 2020 -0700 thermal: qcom-spmi-temp-alarm: Don't suppress negative temp Currently driver is suppressing the negative temperature readings from the vadc. Consumers of the thermal zones need to read the negative temperature too. Don't suppress the readings. Fixes: c610afaa21d3c6e ("thermal: Add QPNP PMIC temperature alarm driver") Signed-off-by: Veera Vegivada Signed-off-by: Guru Das Srinagesh Reviewed-by: Stephen Boyd Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/944856eb819081268fab783236a916257de120e4.1596040416.git.gurus@codeaurora.org commit 3fb884ffe921c99483a84b0175f3c03f048e9069 Author: Marc Zyngier Date: Wed Sep 2 11:18:29 2020 +0100 KVM: arm64: Do not try to map PUDs when they are folded into PMD For the obscure cases where PMD and PUD are the same size (64kB pages with 42bit VA, for example, which results in only two levels of page tables), we can't map anything as a PUD, because there is... erm... no PUD to speak of. Everything is either a PMD or a PTE. So let's only try and map a PUD when its size is different from that of a PMD. Cc: stable@vger.kernel.org Fixes: b8e0ba7c8bea ("KVM: arm64: Add support for creating PUD hugepages at stage 2") Reported-by: Gavin Shan Reported-by: Eric Auger Reviewed-by: Alexandru Elisei Reviewed-by: Gavin Shan Tested-by: Gavin Shan Tested-by: Eric Auger Tested-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit 30d24faba0532d6972df79a1bf060601994b5873 Author: Tony Lindgren Date: Mon Jul 6 11:33:38 2020 -0700 thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430 We can sometimes get bogus thermal shutdowns on omap4430 at least with droid4 running idle with a battery charger connected: thermal thermal_zone0: critical temperature reached (143 C), shutting down Dumping out the register values shows we can occasionally get a 0x7f value that is outside the TRM listed values in the ADC conversion table. And then we get a normal value when reading again after that. Reading the register multiple times does not seem help avoiding the bogus values as they stay until the next sample is ready. Looking at the TRM chapter "18.4.10.2.3 ADC Codes Versus Temperature", we should have values from 13 to 107 listed with a total of 95 values. But looking at the omap4430_adc_to_temp array, the values are off, and the end values are missing. And it seems that the 4430 ADC table is similar to omap3630 rather than omap4460. Let's fix the issue by using values based on the omap3630 table and just ignoring invalid values. Compared to the 4430 TRM, the omap3630 table has the missing values added while the TRM table only shows every second value. Note that sometimes the ADC register values within the valid table can also be way off for about 1 out of 10 values. But it seems that those just show about 25 C too low values rather than too high values. So those do not cause a bogus thermal shutdown. Fixes: 1a31270e54d7 ("staging: omap-thermal: add OMAP4 data structures") Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200706183338.25622-1-tony@atomide.com commit 2d33b7d631d9dc81c78bb71368645cf7f0e68cb1 Author: Lu Baolu Date: Thu Sep 3 14:51:32 2020 +0800 iommu/vt-d: Fix NULL pointer dereference in dev_iommu_priv_set() The dev_iommu_priv_set() must be called after probe_device(). This fixes a NULL pointer deference bug when booting a system with kernel cmdline "intel_iommu=on,igfx_off", where the dev_iommu_priv_set() is abused. The following stacktrace was produced: Command line: BOOT_IMAGE=/isolinux/bzImage console=tty1 intel_iommu=on,igfx_off ... DMAR: Host address width 39 DMAR: DRHD base: 0x000000fed90000 flags: 0x0 DMAR: dmar0: reg_base_addr fed90000 ver 1:0 cap 1c0000c40660462 ecap 19e2ff0505e DMAR: DRHD base: 0x000000fed91000 flags: 0x1 DMAR: dmar1: reg_base_addr fed91000 ver 1:0 cap d2008c40660462 ecap f050da DMAR: RMRR base: 0x0000009aa9f000 end: 0x0000009aabefff DMAR: RMRR base: 0x0000009d000000 end: 0x0000009f7fffff DMAR: No ATSR found BUG: kernel NULL pointer dereference, address: 0000000000000038 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 0 P4D 0 Oops: 0002 [#1] SMP PTI CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.9.0-devel+ #2 Hardware name: LENOVO 20HGS0TW00/20HGS0TW00, BIOS N1WET46S (1.25s ) 03/30/2018 RIP: 0010:intel_iommu_init+0xed0/0x1136 Code: fe e9 61 02 00 00 bb f4 ff ff ff e9 57 02 00 00 48 63 d1 48 c1 e2 04 48 03 50 20 48 8b 12 48 85 d2 74 0b 48 8b 92 d0 02 00 00 48 89 7a 38 ff c1 e9 15 f5 ff ff 48 c7 c7 60 99 ac a7 49 c7 c7 a0 RSP: 0000:ffff96d180073dd0 EFLAGS: 00010282 RAX: ffff8c91037a7d20 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffffffffffff RBP: ffff96d180073e90 R08: 0000000000000001 R09: ffff8c91039fe3c0 R10: 0000000000000226 R11: 0000000000000226 R12: 000000000000000b R13: ffff8c910367c650 R14: ffffffffa8426d60 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8c9107480000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000038 CR3: 00000004b100a001 CR4: 00000000003706e0 Call Trace: ? _raw_spin_unlock_irqrestore+0x1f/0x30 ? call_rcu+0x10e/0x320 ? trace_hardirqs_on+0x2c/0xd0 ? rdinit_setup+0x2c/0x2c ? e820__memblock_setup+0x8b/0x8b pci_iommu_init+0x16/0x3f do_one_initcall+0x46/0x1e4 kernel_init_freeable+0x169/0x1b2 ? rest_init+0x9f/0x9f kernel_init+0xa/0x101 ret_from_fork+0x22/0x30 Modules linked in: CR2: 0000000000000038 ---[ end trace 3653722a6f936f18 ]--- Fixes: 01b9d4e21148c ("iommu/vt-d: Use dev_iommu_priv_get/set()") Reported-by: Torsten Hilbrich Reported-by: Wendy Wang Signed-off-by: Lu Baolu Tested-by: Torsten Hilbrich Link: https://lore.kernel.org/linux-iommu/96717683-70be-7388-3d2f-61131070a96a@secunet.com/ Link: https://lore.kernel.org/r/20200903065132.16879-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 6e4e9ec65078093165463c13d4eb92b3e8d7b2e8 Author: Lu Baolu Date: Fri Aug 28 08:06:15 2020 +0800 iommu/vt-d: Serialize IOMMU GCMD register modifications The VT-d spec requires (10.4.4 Global Command Register, GCMD_REG General Description) that: If multiple control fields in this register need to be modified, software must serialize the modifications through multiple writes to this register. However, in irq_remapping.c, modifications of IRE and CFI are done in one write. We need to do two separate writes with STS checking after each. It also checks the status register before writing command register to avoid unnecessary register write. Fixes: af8d102f999a4 ("x86/intel/irq_remapping: Clean up x2apic opt-out security warning mess") Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Cc: Andy Lutomirski Cc: Jacob Pan Cc: Kevin Tian Cc: Ashok Raj Link: https://lore.kernel.org/r/20200828000615.8281-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 365d2a23663711c32e778c9c18b07163f9193925 Author: Lukas Bulwahn Date: Tue Aug 25 07:38:28 2020 +0200 MAINTAINERS: Update QUALCOMM IOMMU after Arm SMMU drivers move Commit e86d1aa8b60f ("iommu/arm-smmu: Move Arm SMMU drivers into their own subdirectory") moved drivers/iommu/qcom_iommu.c to drivers/iommu/arm/arm-smmu/qcom_iommu.c amongst other moves, adjusted some sections in MAINTAINERS, but missed adjusting the QUALCOMM IOMMU section. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: drivers/iommu/qcom_iommu.c Update the file entry in MAINTAINERS to the new location. Signed-off-by: Lukas Bulwahn Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200825053828.4166-1-lukas.bulwahn@gmail.com Signed-off-by: Joerg Roedel commit 5e2e2600a3744491a8b49b92597c13b693692082 Author: Maxime Ripard Date: Tue Jul 28 15:48:10 2020 +0200 drm/sun4i: backend: Disable alpha on the lowest plane on the A20 Unlike we previously thought, the per-pixel alpha is just as broken on the A20 as it is on the A10. Remove the quirk that says we can use it. Fixes: dcf496a6a608 ("drm/sun4i: sun4i: Introduce a quirk for lowest plane alpha support") Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Cc: Paul Kocialkowski Link: https://patchwork.freedesktop.org/patch/msgid/20200728134810.883457-2-maxime@cerno.tech commit e359c70462d2a82aae80274d027351d38792dde6 Author: Maxime Ripard Date: Tue Jul 28 15:48:09 2020 +0200 drm/sun4i: backend: Support alpha property on lowest plane Unlike what we previously thought, only the per-pixel alpha is broken on the lowest plane and the per-plane alpha isn't. Remove the check on the alpha property being set on the lowest plane to reject a mode. Fixes: dcf496a6a608 ("drm/sun4i: sun4i: Introduce a quirk for lowest plane alpha support") Signed-off-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Cc: Paul Kocialkowski Link: https://patchwork.freedesktop.org/patch/msgid/20200728134810.883457-1-maxime@cerno.tech commit 0ee9f600e69d901d31469359287b90bbe8e54553 Author: Jernej Skrabec Date: Wed Sep 2 00:03:05 2020 +0200 drm/sun4i: Fix DE2 YVU handling Function sun8i_vi_layer_get_csc_mode() is supposed to return CSC mode but due to inproper return type (bool instead of u32) it returns just 0 or 1. Colors are wrong for YVU formats because of that. Fixes: daab3d0e8e2b ("drm/sun4i: de2: csc_mode in de2 format struct is mostly redundant") Reported-by: Roman Stratiienko Signed-off-by: Jernej Skrabec Tested-by: Roman Stratiienko Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200901220305.6809-1-jernej.skrabec@siol.net commit 9e2369c06c8a181478039258a4598c1ddd2cadfa Author: Roger Pau Monne Date: Tue Sep 1 10:33:26 2020 +0200 xen: add helpers to allocate unpopulated memory To be used in order to create foreign mappings. This is based on the ZONE_DEVICE facility which is used by persistent memory devices in order to create struct pages and kernel virtual mappings for the IOMEM areas of such devices. Note that on kernels without support for ZONE_DEVICE Xen will fallback to use ballooned pages in order to create foreign mappings. The newly added helpers use the same parameters as the existing {alloc/free}_xenballooned_pages functions, which allows for in-place replacement of the callers. Once a memory region has been added to be used as scratch mapping space it will no longer be released, and pages returned are kept in a linked list. This allows to have a buffer of pages and prevents resorting to frequent additions and removals of regions. If enabled (because ZONE_DEVICE is supported) the usage of the new functionality untangles Xen balloon and RAM hotplug from the usage of unpopulated physical memory ranges to map foreign pages, which is the correct thing to do in order to avoid mappings of foreign pages depend on memory hotplug. Note the driver is currently not enabled on Arm platforms because it would interfere with the identity mapping required on some platforms. Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20200901083326.21264-4-roger.pau@citrix.com Signed-off-by: Juergen Gross commit 4533d3aed857c558d6aabd00d0cb04100c5a2258 Author: Roger Pau Monne Date: Tue Sep 1 10:33:25 2020 +0200 memremap: rename MEMORY_DEVICE_DEVDAX to MEMORY_DEVICE_GENERIC This is in preparation for the logic behind MEMORY_DEVICE_DEVDAX also being used by non DAX devices. No functional change intended. Signed-off-by: Roger Pau Monné Reviewed-by: Ira Weiny Acked-by: Andrew Morton Reviewed-by: Pankaj Gupta Link: https://lore.kernel.org/r/20200901083326.21264-3-roger.pau@citrix.com Signed-off-by: Juergen Gross commit aecb2016c90a1b620e21c9e143afbdc9666cce52 Author: Roger Pau Monne Date: Tue Sep 1 10:33:24 2020 +0200 xen/balloon: add header guard In order to protect against the header being included multiple times on the same compilation unit. Signed-off-by: Roger Pau Monné Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20200901083326.21264-2-roger.pau@citrix.com Signed-off-by: Juergen Gross commit 1b0df11fde0f14a269a181b3b7f5122415bc5ed7 Author: Daniel Jordan Date: Wed Sep 2 13:07:56 2020 -0400 padata: fix possible padata_works_lock deadlock syzbot reports, WARNING: inconsistent lock state 5.9.0-rc2-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.0/26715 takes: (padata_works_lock){+.?.}-{2:2}, at: padata_do_parallel kernel/padata.c:220 {IN-SOFTIRQ-W} state was registered at: spin_lock include/linux/spinlock.h:354 [inline] padata_do_parallel kernel/padata.c:220 ... __do_softirq kernel/softirq.c:298 ... sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt arch/x86/include/asm/idtentry.h:581 Possible unsafe locking scenario: CPU0 ---- lock(padata_works_lock); lock(padata_works_lock); padata_do_parallel() takes padata_works_lock with softirqs enabled, so a deadlock is possible if, on the same CPU, the lock is acquired in process context and then softirq handling done in an interrupt leads to the same path. Fix by leaving softirqs disabled while do_parallel holds padata_works_lock. Reported-by: syzbot+f4b9f49e38e25eb4ef52@syzkaller.appspotmail.com Fixes: 4611ce2246889 ("padata: allocate work structures for parallel jobs from a pool") Signed-off-by: Daniel Jordan Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit ccae0f36d500aef727f98acd8d0601e6b262a513 Author: Huang Ying Date: Fri Sep 4 14:10:47 2020 +0800 x86, fakenuma: Fix invalid starting node ID Commit: cc9aec03e58f ("x86/numa_emulation: Introduce uniform split capability") uses "-1" as the starting node ID, which causes the strange kernel log as follows, when "numa=fake=32G" is added to the kernel command line: Faking node -1 at [mem 0x0000000000000000-0x0000000893ffffff] (35136MB) Faking node 0 at [mem 0x0000001840000000-0x000000203fffffff] (32768MB) Faking node 1 at [mem 0x0000000894000000-0x000000183fffffff] (64192MB) Faking node 2 at [mem 0x0000002040000000-0x000000283fffffff] (32768MB) Faking node 3 at [mem 0x0000002840000000-0x000000303fffffff] (32768MB) And finally the kernel crashes: BUG: Bad page state in process swapper pfn:00011 page:(____ptrval____) refcount:0 mapcount:1 mapping:(____ptrval____) index:0x55cd7e44b270 pfn:0x11 failed to read mapping contents, not a valid kernel address? flags: 0x5(locked|uptodate) raw: 0000000000000005 000055cd7e44af30 000055cd7e44af50 0000000100000006 raw: 000055cd7e44b270 000055cd7e44b290 0000000000000000 000055cd7e44b510 page dumped because: page still charged to cgroup page->mem_cgroup:000055cd7e44b510 Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.9.0-rc2 #1 Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019 Call Trace: dump_stack+0x57/0x80 bad_page.cold+0x63/0x94 __free_pages_ok+0x33f/0x360 memblock_free_all+0x127/0x195 mem_init+0x23/0x1f5 start_kernel+0x219/0x4f5 secondary_startup_64+0xb6/0xc0 Fix this bug via using 0 as the starting node ID. This restores the original behavior before cc9aec03e58f. [ mingo: Massaged the changelog. ] Fixes: cc9aec03e58f ("x86/numa_emulation: Introduce uniform split capability") Signed-off-by: "Huang, Ying" Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200904061047.612950-1-ying.huang@intel.com commit 59126901f200f5fc907153468b03c64e0081b6e6 Merge: 3e8d3bdc2a757 830fadfd954c6 Author: Linus Torvalds Date: Thu Sep 3 19:10:43 2020 -0700 Merge tag 'perf-tools-fixes-for-v5.9-2020-09-03' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull more perf tools fixes from Arnaldo Carvalho de Melo: - Use uintptr_t when casting numbers to pointers - Keep output expected by 3rd parties: Turn off summary for interval mode by default. - BPF is in kernel space, make sure do_validate_kcore_modules() knows about that. - Explicitly call out event modifiers in the documentation. - Fix jevents() allocation of space for regular expressions. - Address libtraceevent build warnings on 32-bit arches. - Fix checking of functions returns using ERR_PTR() in 'perf bench'. * tag 'perf-tools-fixes-for-v5.9-2020-09-03' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf tools: Add bpf image check to __map__is_kmodule perf record/stat: Explicitly call out event modifiers in the documentation perf bench: The do_run_multi_threaded() function must use IS_ERR(perf_session__new()) perf stat: Turn off summary for interval mode by default libtraceevent: Fix build warning on 32-bit arches perf jevents: Fix suspicious code in fixregex() perf parse-events: Use uintptr_t when casting numbers to pointers commit 3e8d3bdc2a757cc6be5470297947799a7df445cc Merge: 8381979dfa056 b61ac5bb420ad Author: Linus Torvalds Date: Thu Sep 3 18:50:48 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: 1) Use netif_rx_ni() when necessary in batman-adv stack, from Jussi Kivilinna. 2) Fix loss of RTT samples in rxrpc, from David Howells. 3) Memory leak in hns_nic_dev_probe(), from Dignhao Liu. 4) ravb module cannot be unloaded, fix from Yuusuke Ashizuka. 5) We disable BH for too lokng in sctp_get_port_local(), add a cond_resched() here as well, from Xin Long. 6) Fix memory leak in st95hf_in_send_cmd, from Dinghao Liu. 7) Out of bound access in bpf_raw_tp_link_fill_link_info(), from Yonghong Song. 8) Missing of_node_put() in mt7530 DSA driver, from Sumera Priyadarsini. 9) Fix crash in bnxt_fw_reset_task(), from Michael Chan. 10) Fix geneve tunnel checksumming bug in hns3, from Yi Li. 11) Memory leak in rxkad_verify_response, from Dinghao Liu. 12) In tipc, don't use smp_processor_id() in preemptible context. From Tuong Lien. 13) Fix signedness issue in mlx4 memory allocation, from Shung-Hsi Yu. 14) Missing clk_disable_prepare() in gemini driver, from Dan Carpenter. 15) Fix ABI mismatch between driver and firmware in nfp, from Louis Peens. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (110 commits) net/smc: fix sock refcounting in case of termination net/smc: reset sndbuf_desc if freed net/smc: set rx_off for SMCR explicitly net/smc: fix toleration of fake add_link messages tg3: Fix soft lockup when tg3_reset_task() fails. doc: net: dsa: Fix typo in config code sample net: dp83867: Fix WoL SecureOn password nfp: flower: fix ABI mismatch between driver and firmware tipc: fix shutdown() of connectionless socket ipv6: Fix sysctl max for fib_multipath_hash_policy drivers/net/wan/hdlc: Change the default of hard_header_len to 0 net: gemini: Fix another missing clk_disable_unprepare() in probe net: bcmgenet: fix mask check in bcmgenet_validate_flow() amd-xgbe: Add support for new port mode net: usb: dm9601: Add USB ID of Keenetic Plus DSL vhost: fix typo in error message net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init() pktgen: fix error message with wrong function name net: ethernet: ti: am65-cpsw: fix rmii 100Mbit link mode cxgb4: fix thermal zone device registration ... commit 8381979dfa056dee4df83d1b98740b68776ae8ac Merge: e28f0104343d0 8891adc61dce2 Author: Linus Torvalds Date: Thu Sep 3 18:43:06 2020 -0700 Merge branch 'gate-page-refcount' (patches from Dave Hansen) Merge gate page refcount fix from Dave Hansen: "During the conversion over to pin_user_pages(), gate pages were missed. The fix is pretty simple, and is accompanied by a new test from Andy which probably would have caught this earlier" * emailed patches from Dave Hansen : selftests/x86/test_vsyscall: Improve the process_vm_readv() test mm: fix pin vs. gup mismatch with gate pages commit 8891adc61dce2a8a41fc0c23262b681c3ec4b73a Author: Andy Lutomirski Date: Thu Sep 3 13:40:30 2020 -0700 selftests/x86/test_vsyscall: Improve the process_vm_readv() test The existing code accepted process_vm_readv() success or failure as long as it didn't return garbage. This is too weak: if the vsyscall page is readable, then process_vm_readv() should succeed and, if the page is not readable, then it should fail. Signed-off-by: Andy Lutomirski Signed-off-by: Dave Hansen Cc: x86@kernel.org Cc: Peter Zijlstra Cc: Andy Lutomirski Cc: Jann Horn Cc: John Hubbard Cc: Andrew Morton Cc: Kirill A. Shutemov Signed-off-by: Linus Torvalds commit 9fa2dd946743ae6f30dc4830da19147bf100a7f2 Author: Dave Hansen Date: Thu Sep 3 13:40:28 2020 -0700 mm: fix pin vs. gup mismatch with gate pages Gate pages were missed when converting from get to pin_user_pages(). This can lead to refcount imbalances. This is reliably and quickly reproducible running the x86 selftests when vsyscall=emulate is enabled (the default). Fix by using try_grab_page() with appropriate flags passed. The long story: Today, pin_user_pages() and get_user_pages() are similar interfaces for manipulating page reference counts. However, "pins" use a "bias" value and manipulate the actual reference count by 1024 instead of 1 used by plain "gets". That means that pin_user_pages() must be matched with unpin_user_pages() and can't be mixed with a plain put_user_pages() or put_page(). Enter gate pages, like the vsyscall page. They are pages usually in the kernel image, but which are mapped to userspace. Userspace is allowed access to them, including interfaces using get/pin_user_pages(). The refcount of these kernel pages is manipulated just like a normal user page on the get/pin side so that the put/unpin side can work the same for normal user pages or gate pages. get_gate_page() uses try_get_page() which only bumps the refcount by 1, not 1024, even if called in the pin_user_pages() path. If someone pins a gate page, this happens: pin_user_pages() get_gate_page() try_get_page() // bump refcount +1 ... some time later unpin_user_pages() page_ref_sub_and_test(page, 1024)) ... and boom, we get a refcount off by 1023. This is reliably and quickly reproducible running the x86 selftests when booted with vsyscall=emulate (the default). The selftests use ptrace(), but I suspect anything using pin_user_pages() on gate pages could hit this. To fix it, simply use try_grab_page() instead of try_get_page(), and pass 'gup_flags' in so that FOLL_PIN can be respected. This bug traces back to the very beginning of the FOLL_PIN support in commit 3faa52c03f44 ("mm/gup: track FOLL_PIN pages"), which showed up in the 5.7 release. Signed-off-by: Dave Hansen Fixes: 3faa52c03f44 ("mm/gup: track FOLL_PIN pages") Reported-by: Peter Zijlstra Reviewed-by: John Hubbard Acked-by: Andy Lutomirski Cc: x86@kernel.org Cc: Jann Horn Cc: Andrew Morton Cc: Kirill A. Shutemov Signed-off-by: Linus Torvalds commit d37d56920004cae612fa32d1f92aaacca5e145f7 Merge: 0f8aeef1a56cf ca386aa7155a5 Author: Dave Airlie Date: Fri Sep 4 11:14:24 2020 +1000 Merge branch 'linux-5.9' of git://github.com/skeggsb/linux into drm-fixes A couple of minor fixes to the display changes that went in for 5.9. The most important of which is a workaround for a HW bug that was exposed by better push buffer space management, leading to random(ish...) display engine hangs. Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Fri Sep 4 11:00:47 2020 +1000 Merge tag 'drm-intel-fixes-2020-09-03' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.9-rc4: - Clang build warning fix - HDCP fixes Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87sgbz2pnx.fsf@intel.com commit b596649fd18e10e3e48bdf61d964b7d1d4d0c333 Merge: f75aef392f869 fc8c70526bd30 Author: Dave Airlie Date: Fri Sep 4 10:51:27 2020 +1000 Merge tag 'amd-drm-fixes-5.9-2020-09-03' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.9-2020-09-03: amdgpu: - Fix for 32bit systems - SW CTF fix - Update for Sienna Cichlid - CIK bug fixes radeon: - PLL fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200903050022.3960-1-alexander.deucher@amd.com commit e6135df45e21f1815a5948f452593124b1544a3e Merge: 21e9ba5373fc2 4daab7132731a Author: Alexei Starovoitov Date: Thu Sep 3 17:36:41 2020 -0700 Merge branch 'hashmap_iter_bucket_lock_fix' Yonghong Song says: ==================== Currently, the bpf hashmap iterator takes a bucket_lock, a spin_lock, before visiting each element in the bucket. This will cause a deadlock if a map update/delete operates on an element with the same bucket id of the visited map. To avoid the deadlock, let us just use rcu_read_lock instead of bucket_lock. This may result in visiting stale elements, missing some elements, or repeating some elements, if concurrent map delete/update happens for the same map. I think using rcu_read_lock is a reasonable compromise. For users caring stale/missing/repeating element issues, bpf map batch access syscall interface can be used. Note that another approach is during bpf_iter link stage, we check whether the iter program might be able to do update/delete to the visited map. If it is, reject the link_create. Verifier needs to record whether an update/delete operation happens for each map for this approach. I just feel this checking is too specialized, hence still prefer rcu_read_lock approach. Patch #1 has the kernel implementation and Patch #2 added a selftest which can trigger deadlock without Patch #1. ==================== Signed-off-by: Alexei Starovoitov commit 4daab7132731ac5ec9384c8a070cdb9607dc38c8 Author: Yonghong Song Date: Wed Sep 2 16:53:41 2020 -0700 selftests/bpf: Add bpf_{update, delete}_map_elem in hashmap iter program Added bpf_{updata,delete}_map_elem to the very map element the iter program is visiting. Due to rcu protection, the visited map elements, although stale, should still contain correct values. $ ./test_progs -n 4/18 #4/18 bpf_hash_map:OK #4 bpf_iter:OK Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200902235341.2001534-1-yhs@fb.com commit dc0988bbe1bd41e2fa555e4a6f890b819a34b49b Author: Yonghong Song Date: Wed Sep 2 16:53:40 2020 -0700 bpf: Do not use bucket_lock for hashmap iterator Currently, for hashmap, the bpf iterator will grab a bucket lock, a spinlock, before traversing the elements in the bucket. This can ensure all bpf visted elements are valid. But this mechanism may cause deadlock if update/deletion happens to the same bucket of the visited map in the program. For example, if we added bpf_map_update_elem() call to the same visited element in selftests bpf_iter_bpf_hash_map.c, we will have the following deadlock: ============================================ WARNING: possible recursive locking detected 5.9.0-rc1+ #841 Not tainted -------------------------------------------- test_progs/1750 is trying to acquire lock: ffff9a5bb73c5e70 (&htab->buckets[i].raw_lock){....}-{2:2}, at: htab_map_update_elem+0x1cf/0x410 but task is already holding lock: ffff9a5bb73c5e20 (&htab->buckets[i].raw_lock){....}-{2:2}, at: bpf_hash_map_seq_find_next+0x94/0x120 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&htab->buckets[i].raw_lock); lock(&htab->buckets[i].raw_lock); *** DEADLOCK *** ... Call Trace: dump_stack+0x78/0xa0 __lock_acquire.cold.74+0x209/0x2e3 lock_acquire+0xba/0x380 ? htab_map_update_elem+0x1cf/0x410 ? __lock_acquire+0x639/0x20c0 _raw_spin_lock_irqsave+0x3b/0x80 ? htab_map_update_elem+0x1cf/0x410 htab_map_update_elem+0x1cf/0x410 ? lock_acquire+0xba/0x380 bpf_prog_ad6dab10433b135d_dump_bpf_hash_map+0x88/0xa9c ? find_held_lock+0x34/0xa0 bpf_iter_run_prog+0x81/0x16e __bpf_hash_map_seq_show+0x145/0x180 bpf_seq_read+0xff/0x3d0 vfs_read+0xad/0x1c0 ksys_read+0x5f/0xe0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ... The bucket_lock first grabbed in seq_ops->next() called by bpf_seq_read(), and then grabbed again in htab_map_update_elem() in the bpf program, causing deadlocks. Actually, we do not need bucket_lock here, we can just use rcu_read_lock() similar to netlink iterator where the rcu_read_{lock,unlock} likes below: seq_ops->start(): rcu_read_lock(); seq_ops->next(): rcu_read_unlock(); /* next element */ rcu_read_lock(); seq_ops->stop(); rcu_read_unlock(); Compared to old bucket_lock mechanism, if concurrent updata/delete happens, we may visit stale elements, miss some elements, or repeat some elements. I think this is a reasonable compromise. For users wanting to avoid stale, missing/repeated accesses, bpf_map batch access syscall interface can be used. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200902235340.2001375-1-yhs@fb.com commit b61ac5bb420adce0c9b79c6b9e1c854af083e33f Merge: 556699341efa9 5fb8642a17aa2 Author: David S. Miller Date: Thu Sep 3 16:52:33 2020 -0700 Merge branch 'smc-fixes' Karsten Graul says: ==================== net/smc: fixes 2020-09-03 Please apply the following patch series for smc to netdev's net tree. Patch 1 fixes the toleration of older SMC implementations. Patch 2 takes care of a problem that happens when SMCR is used after SMCD initialization failed. Patch 3 fixes a problem with freed send buffers, and patch 4 corrects refcounting when SMC terminates due to device removal. ==================== Signed-off-by: David S. Miller commit 5fb8642a17aa2ab9077372977d67a72d3899a98d Author: Ursula Braun Date: Thu Sep 3 21:53:18 2020 +0200 net/smc: fix sock refcounting in case of termination When an ISM device is removed, all its linkgroups are terminated, i.e. all the corresponding connections are killed. Connection killing invokes smc_close_active_abort(), which decreases the sock refcount for certain states to simulate passive closing. And it cancels the close worker and has to give up the sock lock for this timeframe. This opens the door for a passive close worker or a socket close to run in between. In this case smc_close_active_abort() and passive close worker resp. smc_release() might do a sock_put for passive closing. This causes: [ 1323.315943] refcount_t: underflow; use-after-free. [ 1323.316055] WARNING: CPU: 3 PID: 54469 at lib/refcount.c:28 refcount_warn_saturate+0xe8/0x130 [ 1323.316069] Kernel panic - not syncing: panic_on_warn set ... [ 1323.316084] CPU: 3 PID: 54469 Comm: uperf Not tainted 5.9.0-20200826.rc2.git0.46328853ed20.300.fc32.s390x+debug #1 [ 1323.316096] Hardware name: IBM 2964 NC9 702 (z/VM 6.4.0) [ 1323.316108] Call Trace: [ 1323.316125] [<00000000c0d4aae8>] show_stack+0x90/0xf8 [ 1323.316143] [<00000000c15989b0>] dump_stack+0xa8/0xe8 [ 1323.316158] [<00000000c0d8344e>] panic+0x11e/0x288 [ 1323.316173] [<00000000c0d83144>] __warn+0xac/0x158 [ 1323.316187] [<00000000c1597a7a>] report_bug+0xb2/0x130 [ 1323.316201] [<00000000c0d36424>] monitor_event_exception+0x44/0xc0 [ 1323.316219] [<00000000c195c716>] pgm_check_handler+0x1da/0x238 [ 1323.316234] [<00000000c151844c>] refcount_warn_saturate+0xec/0x130 [ 1323.316280] ([<00000000c1518448>] refcount_warn_saturate+0xe8/0x130) [ 1323.316310] [<000003ff801f2e2a>] smc_release+0x192/0x1c8 [smc] [ 1323.316323] [<00000000c169f1fa>] __sock_release+0x5a/0xe0 [ 1323.316334] [<00000000c169f2ac>] sock_close+0x2c/0x40 [ 1323.316350] [<00000000c1086de0>] __fput+0xb8/0x278 [ 1323.316362] [<00000000c0db1e0e>] task_work_run+0x76/0xb8 [ 1323.316393] [<00000000c0d8ab84>] do_exit+0x26c/0x520 [ 1323.316408] [<00000000c0d8af08>] do_group_exit+0x48/0xc0 [ 1323.316421] [<00000000c0d8afa8>] __s390x_sys_exit_group+0x28/0x38 [ 1323.316433] [<00000000c195c32c>] system_call+0xe0/0x2b4 [ 1323.316446] 1 lock held by uperf/54469: [ 1323.316456] #0: 0000000044125e60 (&sb->s_type->i_mutex_key#9){+.+.}-{3:3}, at: __sock_release+0x44/0xe0 The patch rechecks sock state in smc_close_active_abort() after smc_close_cancel_work() to avoid duplicate decrease of sock refcount for the same purpose. Fixes: 611b63a12732 ("net/smc: cancel tx worker in case of socket aborts") Reviewed-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 1d8df41d896d75c6eababaa912e3a814585d9f61 Author: Ursula Braun Date: Thu Sep 3 21:53:17 2020 +0200 net/smc: reset sndbuf_desc if freed When an SMC connection is created, and there is a problem to create an RMB or DMB, the previously created send buffer is thrown away as well including buffer descriptor freeing. Make sure the connection no longer references the freed buffer descriptor, otherwise bugs like this are possible: [71556.835148] ============================================================================= [71556.835168] BUG kmalloc-128 (Tainted: G B OE ): Poison overwritten [71556.835172] ----------------------------------------------------------------------------- [71556.835179] INFO: 0x00000000d20894be-0x00000000aaef63e9 @offset=2724. First byte 0x0 instead of 0x6b [71556.835215] INFO: Allocated in __smc_buf_create+0x184/0x578 [smc] age=0 cpu=5 pid=46726 [71556.835234] ___slab_alloc+0x5a4/0x690 [71556.835239] __slab_alloc.constprop.0+0x70/0xb0 [71556.835243] kmem_cache_alloc_trace+0x38e/0x3f8 [71556.835250] __smc_buf_create+0x184/0x578 [smc] [71556.835257] smc_buf_create+0x2e/0xe8 [smc] [71556.835264] smc_listen_work+0x516/0x6a0 [smc] [71556.835275] process_one_work+0x280/0x478 [71556.835280] worker_thread+0x66/0x368 [71556.835287] kthread+0x17a/0x1a0 [71556.835294] ret_from_fork+0x28/0x2c [71556.835301] INFO: Freed in smc_buf_create+0xd8/0xe8 [smc] age=0 cpu=5 pid=46726 [71556.835307] __slab_free+0x246/0x560 [71556.835311] kfree+0x398/0x3f8 [71556.835318] smc_buf_create+0xd8/0xe8 [smc] [71556.835324] smc_listen_work+0x516/0x6a0 [smc] [71556.835328] process_one_work+0x280/0x478 [71556.835332] worker_thread+0x66/0x368 [71556.835337] kthread+0x17a/0x1a0 [71556.835344] ret_from_fork+0x28/0x2c [71556.835348] INFO: Slab 0x00000000a0744551 objects=51 used=51 fp=0x0000000000000000 flags=0x1ffff00000010200 [71556.835352] INFO: Object 0x00000000563480a1 @offset=2688 fp=0x00000000289567b2 [71556.835359] Redzone 000000006783cde2: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ [71556.835363] Redzone 00000000e35b876e: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ [71556.835367] Redzone 0000000023074562: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ [71556.835372] Redzone 00000000b9564b8c: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ [71556.835376] Redzone 00000000810c6362: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ [71556.835380] Redzone 0000000065ef52c3: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ [71556.835384] Redzone 00000000c5dd6984: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ [71556.835388] Redzone 000000004c480f8f: bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ [71556.835392] Object 00000000563480a1: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71556.835397] Object 000000009c479d06: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71556.835401] Object 000000006e1dce92: 6b 6b 6b 6b 00 00 00 00 6b 6b 6b 6b 6b 6b 6b 6b kkkk....kkkkkkkk [71556.835405] Object 00000000227f7cf8: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71556.835410] Object 000000009a701215: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71556.835414] Object 000000003731ce76: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71556.835418] Object 00000000f7085967: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk [71556.835422] Object 0000000007f99927: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 kkkkkkkkkkkkkkk. [71556.835427] Redzone 00000000579c4913: bb bb bb bb bb bb bb bb ........ [71556.835431] Padding 00000000305aef82: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ [71556.835435] Padding 00000000b1cdd722: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ [71556.835438] Padding 00000000c7568199: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ [71556.835442] Padding 00000000fad4c4d4: 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ [71556.835451] CPU: 0 PID: 47939 Comm: kworker/0:15 Tainted: G B OE 5.9.0-rc1uschi+ #54 [71556.835456] Hardware name: IBM 3906 M03 703 (LPAR) [71556.835464] Workqueue: events smc_listen_work [smc] [71556.835470] Call Trace: [71556.835478] [<00000000d5eaeb10>] show_stack+0x90/0xf8 [71556.835493] [<00000000d66fc0f8>] dump_stack+0xa8/0xe8 [71556.835499] [<00000000d61a511c>] check_bytes_and_report+0x104/0x130 [71556.835504] [<00000000d61a57b2>] check_object+0x26a/0x2e0 [71556.835509] [<00000000d61a59bc>] alloc_debug_processing+0x194/0x238 [71556.835514] [<00000000d61a8c14>] ___slab_alloc+0x5a4/0x690 [71556.835519] [<00000000d61a9170>] __slab_alloc.constprop.0+0x70/0xb0 [71556.835524] [<00000000d61aaf66>] kmem_cache_alloc_trace+0x38e/0x3f8 [71556.835530] [<000003ff80549bbc>] __smc_buf_create+0x184/0x578 [smc] [71556.835538] [<000003ff8054a396>] smc_buf_create+0x2e/0xe8 [smc] [71556.835545] [<000003ff80540c16>] smc_listen_work+0x516/0x6a0 [smc] [71556.835549] [<00000000d5f0f448>] process_one_work+0x280/0x478 [71556.835554] [<00000000d5f0f6a6>] worker_thread+0x66/0x368 [71556.835559] [<00000000d5f18692>] kthread+0x17a/0x1a0 [71556.835563] [<00000000d6abf3b8>] ret_from_fork+0x28/0x2c [71556.835569] INFO: lockdep is turned off. [71556.835573] FIX kmalloc-128: Restoring 0x00000000d20894be-0x00000000aaef63e9=0x6b [71556.835577] FIX kmalloc-128: Marking all objects used Fixes: fd7f3a746582 ("net/smc: remove freed buffer from list") Reviewed-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 2d2bfeb8c5c8c95a93c473ca2c7d07cad6943a34 Author: Ursula Braun Date: Thu Sep 3 21:53:16 2020 +0200 net/smc: set rx_off for SMCR explicitly SMC tries to make use of SMCD first. If a problem shows up, it tries to switch to SMCR. If the SMCD initializing problem shows up after the SMCD connection has already been initialized, field rx_off keeps the wrong SMCD value for SMCR, which results in corrupted data at the receiver. This patch adds an explicit (re-)setting of field rx_off to zero if the connection uses SMCR. Fixes: be244f28d22f ("net/smc: add SMC-D support in data transfer") Reviewed-by: Karsten Graul Signed-off-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit fffe83c8c40a61978f8998a85cc94bb2ca19b6dd Author: Karsten Graul Date: Thu Sep 3 21:53:15 2020 +0200 net/smc: fix toleration of fake add_link messages Older SMCR implementations had no link failover support and used one link only. Because the handshake protocol requires to try the establishment of a second link the old code sent a fake add_link message and declined any server response afterwards. The current code supports multiple links and inspects the received fake add_link message more closely. To tolerate the fake add_link messages smc_llc_is_local_add_link() needs an improved check of the message to be able to separate between locally enqueued and fake add_link messages. And smc_llc_cli_add_link() needs to check if the provided qp_mtu size is invalid and reject the add_link request in that case. Fixes: c48254fa48e5 ("net/smc: move add link processing for new device into llc layer") Reviewed-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 91e045b93db79a2ef66e045ad0d1f8f9d348e1f4 Author: Mike Tipton Date: Thu Sep 3 12:21:44 2020 -0700 interconnect: qcom: Fix small BW votes being truncated to zero Small BW votes that translate to less than a single BCM unit are currently truncated to zero. Ensure that non-zero BW requests always result in at least a vote of 1 to BCM. Fixes: 976daac4a1c5 ("interconnect: qcom: Consolidate interconnect RPMh support") Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20200903192149.30385-2-mdtipton@codeaurora.org Signed-off-by: Georgi Djakov commit 556699341efa98243e08e34401b3f601da91f5a3 Author: Michael Chan Date: Thu Sep 3 14:28:54 2020 -0400 tg3: Fix soft lockup when tg3_reset_task() fails. If tg3_reset_task() fails, the device state is left in an inconsistent state with IFF_RUNNING still set but NAPI state not enabled. A subsequent operation, such as ifdown or AER error can cause it to soft lock up when it tries to disable NAPI state. Fix it by bringing down the device to !IFF_RUNNING state when tg3_reset_task() fails. tg3_reset_task() running from workqueue will now call tg3_close() when the reset fails. We need to modify tg3_reset_task_cancel() slightly to avoid tg3_close() calling cancel_work_sync() to cancel tg3_reset_task(). Otherwise cancel_work_sync() will wait forever for tg3_reset_task() to finish. Reported-by: David Christensen Reported-by: Baptiste Covolato Fixes: db2199737990 ("tg3: Schedule at most one tg3_reset_task run") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f71800228dc74711c3df43854ce7089562a3bc2d Author: Linus Walleij Date: Thu Aug 20 22:31:44 2020 +0200 drm/tve200: Stabilize enable/disable The TVE200 will occasionally print a bunch of lost interrupts and similar dmesg messages, sometimes during boot and sometimes after disabling and coming back to enablement. This is probably because the hardware is left in an unknown state by the boot loader that displays a logo. This can be fixed by bringing the controller into a known state by resetting the controller while enabling it. We retry reset 5 times like the vendor driver does. We also put the controller into reset before de-clocking it and clear all interrupts before enabling the vblank IRQ. This makes the video enable/disable/enable cycle rock solid on the D-Link DIR-685. Tested extensively. Signed-off-by: Linus Walleij Acked-by: Daniel Vetter Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200820203144.271081-1-linus.walleij@linaro.org commit 830fadfd954c6782b7a8a2461c76a568c7153b9a Author: Jiri Olsa Date: Wed Aug 26 23:30:17 2020 +0200 perf tools: Add bpf image check to __map__is_kmodule When validating kcore modules the do_validate_kcore_modules function checks on every kernel module dso against modules record. The __map__is_kmodule check is used to get only kernel module dso objects through. Currently the bpf images are slipping through the check and making the validation to fail, so report falls back from kcore usage to kallsyms. Adding __map__is_bpf_image check for bpf image and adding it to __map__is_kmodule check. Fixes: 3c29d4483e85 ("perf annotate: Add basic support for bpf_image") Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200826213017.818788-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e48a73a312ebf19cc3d72aa74985db25c30757c1 Author: Kim Phillips Date: Tue Sep 1 16:58:53 2020 -0500 perf record/stat: Explicitly call out event modifiers in the documentation Event modifiers are not mentioned in the perf record or perf stat manpages. Add them to orient new users more effectively by pointing them to the perf list manpage for details. Fixes: 2055fdaf8703 ("perf list: Document precise event sampling for AMD IBS") Signed-off-by: Kim Phillips Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Tony Jones Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20200901215853.276234-1-kim.phillips@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit e4d71f79cf5c10fa8bc6f5d3bebea570c9c438f1 Author: YueHaibing Date: Wed Sep 2 22:05:26 2020 +0800 perf bench: The do_run_multi_threaded() function must use IS_ERR(perf_session__new()) In case of error, the function perf_session__new() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR() Committer notes: This wasn't compiling due to an extraneous '{' not matched by a '}', fix it. Fixes: 13edc237200c ("perf bench: Add a multi-threaded synthesize benchmark") Signed-off-by: YueHaibing Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200902140526.26916-1-yuehaibing@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit ee6a961432e75393bd69bf70ba70bad90396fa82 Author: Jin Yao Date: Thu Sep 3 09:01:13 2020 +0800 perf stat: Turn off summary for interval mode by default There's a risk that outputting interval mode summaries by default breaks CSV consumers. It already broke pmu-tools/toplev. So now we turn off the summary by default but we create a new option '--summary' to enable the summary. This is active even when not using CSV mode. Before: root@kbl-ppc:~# perf stat -I1000 --interval-count 2 # time counts unit events 1.000265904 8,005.73 msec cpu-clock # 8.006 CPUs utilized 1.000265904 601 context-switches # 0.075 K/sec 1.000265904 10 cpu-migrations # 0.001 K/sec 1.000265904 0 page-faults # 0.000 K/sec 1.000265904 66,746,521 cycles # 0.008 GHz 1.000265904 71,874,398 instructions # 1.08 insn per cycle 1.000265904 13,356,781 branches # 1.668 M/sec 1.000265904 298,756 branch-misses # 2.24% of all branches 2.001857667 8,012.52 msec cpu-clock # 8.013 CPUs utilized 2.001857667 164 context-switches # 0.020 K/sec 2.001857667 10 cpu-migrations # 0.001 K/sec 2.001857667 2 page-faults # 0.000 K/sec 2.001857667 5,822,188 cycles # 0.001 GHz 2.001857667 2,186,170 instructions # 0.38 insn per cycle 2.001857667 442,378 branches # 0.055 M/sec 2.001857667 44,750 branch-misses # 10.12% of all branches Performance counter stats for 'system wide': 16,018.25 msec cpu-clock # 7.993 CPUs utilized 765 context-switches # 0.048 K/sec 20 cpu-migrations # 0.001 K/sec 2 page-faults # 0.000 K/sec 72,568,709 cycles # 0.005 GHz 74,060,568 instructions # 1.02 insn per cycle 13,799,159 branches # 0.861 M/sec 343,506 branch-misses # 2.49% of all branches 2.004118489 seconds time elapsed After: root@kbl-ppc:~# perf stat -I1000 --interval-count 2 # time counts unit events 1.001336393 8,013.28 msec cpu-clock # 8.013 CPUs utilized 1.001336393 82 context-switches # 0.010 K/sec 1.001336393 8 cpu-migrations # 0.001 K/sec 1.001336393 0 page-faults # 0.000 K/sec 1.001336393 4,199,121 cycles # 0.001 GHz 1.001336393 1,373,991 instructions # 0.33 insn per cycle 1.001336393 270,681 branches # 0.034 M/sec 1.001336393 31,659 branch-misses # 11.70% of all branches 2.003905006 8,020.52 msec cpu-clock # 8.021 CPUs utilized 2.003905006 184 context-switches # 0.023 K/sec 2.003905006 8 cpu-migrations # 0.001 K/sec 2.003905006 2 page-faults # 0.000 K/sec 2.003905006 5,446,190 cycles # 0.001 GHz 2.003905006 2,312,547 instructions # 0.42 insn per cycle 2.003905006 451,691 branches # 0.056 M/sec 2.003905006 37,925 branch-misses # 8.40% of all branches root@kbl-ppc:~# perf stat -I1000 --interval-count 2 --summary # time counts unit events 1.001313128 8,013.20 msec cpu-clock # 8.013 CPUs utilized 1.001313128 83 context-switches # 0.010 K/sec 1.001313128 8 cpu-migrations # 0.001 K/sec 1.001313128 0 page-faults # 0.000 K/sec 1.001313128 4,470,950 cycles # 0.001 GHz 1.001313128 1,440,045 instructions # 0.32 insn per cycle 1.001313128 283,222 branches # 0.035 M/sec 1.001313128 33,576 branch-misses # 11.86% of all branches 2.003857385 8,020.34 msec cpu-clock # 8.020 CPUs utilized 2.003857385 154 context-switches # 0.019 K/sec 2.003857385 8 cpu-migrations # 0.001 K/sec 2.003857385 2 page-faults # 0.000 K/sec 2.003857385 4,515,676 cycles # 0.001 GHz 2.003857385 2,180,449 instructions # 0.48 insn per cycle 2.003857385 435,254 branches # 0.054 M/sec 2.003857385 31,179 branch-misses # 7.16% of all branches Performance counter stats for 'system wide': 16,033.53 msec cpu-clock # 7.992 CPUs utilized 237 context-switches # 0.015 K/sec 16 cpu-migrations # 0.001 K/sec 2 page-faults # 0.000 K/sec 8,986,626 cycles # 0.001 GHz 3,620,494 instructions # 0.40 insn per cycle 718,476 branches # 0.045 M/sec 64,755 branch-misses # 9.01% of all branches 2.006124542 seconds time elapsed Fixes: c7e5b328a8d4 ("perf stat: Report summary for interval mode") 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://lore.kernel.org/lkml/20200903010113.32232-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 10a6f5c3b3ec03c7427b055b1f6081e752762d2e Author: Tzvetomir Stoyanov (VMware) Date: Wed Sep 2 13:31:21 2020 +0300 libtraceevent: Fix build warning on 32-bit arches Fixed a compilation warning for casting to pointer from integer of different size on 32-bit platforms. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Steven Rostedt (VMware) Cc: linux-trace-devel@vger.kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e62458e3940eb3dfb009481850e140fbee183b04 Author: Namhyung Kim Date: Fri Sep 4 00:25:10 2020 +0900 perf jevents: Fix suspicious code in fixregex() The new string should have enough space for the original string and the back slashes IMHO. Fixes: fbc2844e84038ce3 ("perf vendor events: Use more flexible pattern matching for CPU identification for mapfile.csv") Signed-off-by: Namhyung Kim Reviewed-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: John Garry Cc: Kajol Jain Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Cc: William Cohen Link: http://lore.kernel.org/lkml/20200903152510.489233-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0823f768b800cca2592fad3b5649766ae6bc4eba Author: Arnaldo Carvalho de Melo Date: Thu Sep 3 15:34:20 2020 -0300 perf parse-events: Use uintptr_t when casting numbers to pointers To address these errors found when cross building from x86_64 to MIPS little endian 32-bit: CC /tmp/build/perf/util/parse-events-bison.o util/parse-events.y: In function 'parse_events_parse': util/parse-events.y:514:6: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 514 | (void *) $2, $6, $4); | ^ util/parse-events.y:531:7: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 531 | (void *) $2, NULL, $4)) { | ^ util/parse-events.y:547:6: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 547 | (void *) $2, $4, 0); | ^ util/parse-events.y:564:7: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] 564 | (void *) $2, NULL, 0)) { | ^ Fixes: cabbf26821aa210f ("perf parse: Before yyabort-ing free components") Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Daniel Borkmann Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: John Garry Cc: Kan Liang Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Yonghong Song Signed-off-by: Arnaldo Carvalho de Melo commit 6180bb446ab624b9ab8bf201ed251ca87f07b413 Author: Coly Li Date: Fri Sep 4 00:16:25 2020 +0800 dax: fix detection of dax support for non-persistent memory block devices When calling __generic_fsdax_supported(), a dax-unsupported device may not have dax_dev as NULL, e.g. the dax related code block is not enabled by Kconfig. Therefore in __generic_fsdax_supported(), to check whether a device supports DAX or not, the following order of operations should be performed: - If dax_dev pointer is NULL, it means the device driver explicitly announce it doesn't support DAX. Then it is OK to directly return false from __generic_fsdax_supported(). - If dax_dev pointer is NOT NULL, it might be because the driver doesn't support DAX and not explicitly initialize related data structure. Then bdev_dax_supported() should be called for further check. If device driver desn't explicitly set its dax_dev pointer to NULL, this is not a bug. Calling bdev_dax_supported() makes sure they can be recognized as dax-unsupported eventually. Fixes: c2affe920b0e ("dax: do not print error message for non-persistent memory block device") Cc: Jan Kara Cc: Vishal Verma Reviewed-and-tested-by: Adrian Huang Reviewed-by: Ira Weiny Reviewed-by: Mike Snitzer Reviewed-by: Pankaj Gupta Signed-off-by: Coly Li Signed-off-by: Vishal Verma Link: https://lore.kernel.org/r/20200903161625.19524-1-colyli@suse.de commit af0ae997a3a7ef7e9d0b1358a0983e088084f086 Author: Paul Barker Date: Thu Sep 3 09:49:25 2020 +0100 doc: net: dsa: Fix typo in config code sample In the "single port" example code for configuring a DSA switch without tagging support from userspace the command to bring up the "lan2" link was typo'd. Signed-off-by: Paul Barker Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit e28f0104343d0c132fa37f479870c9e43355fee4 Merge: 26acd8b07a070 5f7b81c18366c Author: Linus Torvalds Date: Thu Sep 3 10:05:48 2020 -0700 Merge tag 'fixes-2020-09-03' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull misc build failure fixes from Mike Rapoport: "Fix min_low_pfn/max_low_pfn build errors on ia64 and microblaze. Some configurations of ia64 and microblaze use min_low_pfn and max_low_pfn in pfn_valid(). This causes build failures for modules that use pfn_valid(). The fix is to add EXPORT_SYMBOL() for these variables on ia64 and microblaze" * tag 'fixes-2020-09-03' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: ia64: fix min_low_pfn/max_low_pfn build errors microblaze: fix min_low_pfn/max_low_pfn build errors commit 26acd8b07a07000d9f61ee64dc6fde0494997b47 Merge: 0fdf68c767c08 d3a84a8d0dde4 Author: Linus Torvalds Date: Thu Sep 3 08:41:36 2020 -0700 Merge tag 'affs-for-5.9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull affs fix from David Sterba: "One fix to make permissions work the same way as on AmigaOS" * tag 'affs-for-5.9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: affs: fix basic permission bits to actually work commit d0c20d38af135b2b4b90aa59df7878ef0c8fbef4 Author: Darrick J. Wong Date: Wed Sep 2 10:47:02 2020 -0700 xfs: fix xfs_bmap_validate_extent_raw when checking attr fork of rt files The realtime flag only applies to the data fork, so don't use the realtime block number checks on the attr fork of a realtime file. Fixes: 30b0984d9117 ("xfs: refactor bmap record validation") Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen commit 0fdf68c767c08004ff3a2fc032a139bdaf7826c5 Merge: fc3abb53250a9 ddecfc76979d5 Author: Linus Torvalds Date: Thu Sep 3 08:22:16 2020 -0700 Merge tag 'media/v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - a compilation fix issue with ti-vpe on arm 32 bits - two Kconfig fixes for imx214 and max9286 drivers - a kernel information leak at v4l2-core on time32 compat ioctls - some fixes at rc core unbind logic - a fix at mceusb driver for it to not use GFP_ATOMIC - fixes at cedrus and vicodec drivers at the control handling logic - a fix at gpio-ir-tx to avoid disabling interruts on a spinlock * tag 'media/v5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: mceusb: Avoid GFP_ATOMIC where it is not needed media: gpio-ir-tx: spinlock is not needed to disable interrupts media: rc: do not access device via sysfs after rc_unregister_device() media: rc: uevent sysfs file races with rc_unregister_device() media: max9286: Depend on OF_GPIO media: i2c: imx214: select V4L2_FWNODE media: cedrus: Add missing v4l2_ctrl_request_hdl_put() media: vicodec: add missing v4l2_ctrl_request_hdl_put() media: media/v4l2-core: Fix kernel-infoleak in video_put_user() media: ti-vpe: cal: Fix compilation on 32-bit ARM commit 21e9ba5373fc2cec608fd68301a1dbfd14df3172 Author: Naveen N. Rao Date: Wed Sep 2 14:12:46 2020 +0530 libbpf: Remove arch-specific include path in Makefile Ubuntu mainline builds for ppc64le are failing with the below error (*): CALL /home/kernel/COD/linux/scripts/atomic/check-atomics.sh DESCEND bpf/resolve_btfids Auto-detecting system features: ... libelf: [ [32mon[m ] ... zlib: [ [32mon[m ] ... bpf: [ [31mOFF[m ] BPF API too old make[6]: *** [Makefile:295: bpfdep] Error 1 make[5]: *** [Makefile:54: /home/kernel/COD/linux/debian/build/build-generic/tools/bpf/resolve_btfids//libbpf.a] Error 2 make[4]: *** [Makefile:71: bpf/resolve_btfids] Error 2 make[3]: *** [/home/kernel/COD/linux/Makefile:1890: tools/bpf/resolve_btfids] Error 2 make[2]: *** [/home/kernel/COD/linux/Makefile:335: __build_one_by_one] Error 2 make[2]: Leaving directory '/home/kernel/COD/linux/debian/build/build-generic' make[1]: *** [Makefile:185: __sub-make] Error 2 make[1]: Leaving directory '/home/kernel/COD/linux' resolve_btfids needs to be build as a host binary and it needs libbpf. However, libbpf Makefile hardcodes an include path utilizing $(ARCH). This results in mixing of cross-architecture headers resulting in a build failure. The specific header include path doesn't seem necessary for a libbpf build. Hence, remove the same. (*) https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9-rc3/ppc64el/log Reported-by: Vaidyanathan Srinivasan Signed-off-by: Naveen N. Rao Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200902084246.1513055-1-naveen.n.rao@linux.vnet.ibm.com commit 8d0441cf9b6c7bb2ddfa10739d1f5cb5dad4cd55 Author: Krzysztof Kozlowski Date: Wed Aug 19 19:51:34 2020 +0200 dma-buf: fence-chain: Document missing dma_fence_chain_init() parameter in kerneldoc Fix W=1 compile warnings (invalid kerneldoc): drivers/dma-buf/dma-fence-chain.c:233: warning: Function parameter or member 'seqno' not described in 'dma_fence_chain_init' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20200819175134.19261-2-krzk@kernel.org commit 6d3ba803ce32ecee36eb462427dc82237b3a70c8 Author: Krzysztof Kozlowski Date: Wed Aug 19 19:51:33 2020 +0200 dma-buf: Fix kerneldoc of dma_buf_set_name() Fix W=1 compile warnings (invalid kerneldoc): drivers/dma-buf/dma-buf.c:328: warning: Function parameter or member 'dmabuf' not described in 'dma_buf_set_name' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20200819175134.19261-1-krzk@kernel.org commit 6a6660d049f88b89fd9a4b9db3581b245f7782fa Author: Takashi Iwai Date: Thu Sep 3 10:33:00 2020 +0200 ALSA: hda/realtek - Improved routing for Thinkpad X1 7th/8th Gen There've been quite a few regression reports about the lowered volume (reduced to ca 65% from the previous level) on Lenovo Thinkpad X1 after the commit d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen"). Although the commit itself does the right thing from HD-audio POV in order to have a volume control for bass speakers, it seems that the machine has some secret recipe under the hood. Through experiments, Benjamin Poirier found out that the following routing gives the best result: * DAC1 (NID 0x02) -> Speaker pin (NID 0x14) * DAC2 (NID 0x03) -> Shared by both Bass Speaker pin (NID 0x17) & Headphone pin (0x21) * DAC3 (NID 0x06) -> Unused DAC1 seems to have some equalizer internally applied, and you'd get again the output in a bad quality if you connect this to the headphone pin. Hence the headphone is connected to DAC2, which is now shared with the bass speaker pin. DAC3 has no volume amp, hence it's not connected at all. For achieving the routing above, this patch introduced a couple of workarounds: * The connection list of bass speaker pin (NID 0x17) is reduced not to include DAC3 (NID 0x06) * Pass preferred_pairs array to specify the fixed connection Here, both workarounds are needed because the generic parser prefers the individual DAC assignment over others. When the routing above is applied, the generic parser creates the two volume controls "Front" and "Bass Speaker". Since we have only two DACs for three output pins, those are not fully controlling each output individually, and it would confuse PulseAudio. For avoiding the pitfall, in this patch, we rename those volume controls to some unique ones ("DAC1" and "DAC2"). Then PulseAudio ignore them and concentrate only on the still good-working "Master" volume control. If a user still wants to control each DAC volume, they can still change manually via "DAC1" and "DAC2" volume controls. Fixes: d2cd795c4ece ("ALSA: hda - fixup for the bass speaker on Lenovo Carbon X1 7th gen") Reported-by: Benjamin Poirier Reviewed-by: Jaroslav Kysela Tested-by: Benjamin Poirier Cc: BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207407#c10 BugLink: https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3214171 BugLink: https://gist.github.com/hamidzr/dd81e429dc86f4327ded7a2030e7d7d9#gistcomment-3276276 Link: https://lore/kernel.org/r/20200829112746.3118-1-benjamin.poirier@gmail.com Link: https://lore.kernel.org/r/20200903083300.6333-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit baf5cb30fbd1c22f6aa03c081794c2ee0f5be4da Author: Thomas Bogendoerfer Date: Wed Sep 2 23:32:14 2020 +0200 MIPS: SNI: Fix SCSI interrupt On RM400(a20r) machines ISA and SCSI interrupts share the same interrupt line. Commit 49e6e07e3c80 ("MIPS: pass non-NULL dev_id on shared request_irq()") accidently dropped the IRQF_SHARED bit, which breaks registering SCSI interrupt. Put back IRQF_SHARED and add dev_id for ISA interrupt. Fixes: 49e6e07e3c80 ("MIPS: pass non-NULL dev_id on shared request_irq()") Signed-off-by: Thomas Bogendoerfer commit bb06748207cfb1502d11b90325eba7f8c44c9f02 Author: Huang Pei Date: Tue Sep 1 14:53:09 2020 +0800 MIPS: add missing MSACSR and upper MSA initialization In cc97ab235f3f ("MIPS: Simplify FP context initialization), init_fp_ctx just initialize the fp/msa context, and own_fp_inatomic just restore FCSR and 64bit FP regs from it, but miss MSACSR and upper MSA regs for MSA, so MSACSR and MSA upper regs's value from previous task on current cpu can leak into current task and cause unpredictable behavior when MSA context not initialized. Fixes: cc97ab235f3f ("MIPS: Simplify FP context initialization") Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer commit 318af7b80b6a6751520cf2b71edb8c45abb9d9d8 Author: Josh Poimboeuf Date: Fri Jul 17 13:29:48 2020 -0500 Revert "kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled" Use of the new -flive-patching flag was introduced with the following commit: 43bd3a95c98e ("kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled") This flag has several drawbacks: - It disables some optimizations, so it can have a negative effect on performance. - According to the GCC documentation it's not compatible with LTO, which will become a compatibility issue as LTO support gets upstreamed in the kernel. - It was intended to be used for source-based patch generation tooling, as opposed to binary-based patch generation tooling (e.g., kpatch-build). It probably should have at least been behind a separate config option so as not to negatively affect other livepatch users. - Clang doesn't have the flag, so as far as I can tell, this method of generating patches is incompatible with Clang, which like LTO is becoming more mainstream. - It breaks GCC's implicit noreturn detection for local functions. This is the cause of several "unreachable instruction" objtool warnings. - The broken noreturn detection is an obvious GCC regression, but we haven't yet gotten GCC developers to acknowledge that, which doesn't inspire confidence in their willingness to keep the feature working as optimizations are added or changed going forward. - While there *is* a distro which relies on this flag for their distro livepatch module builds, there's not a publicly documented way to create safe livepatch modules with it. Its use seems to be based on tribal knowledge. It serves no benefit to those who don't know how to use it. (In fact, I believe the current livepatch documentation and samples are misleading and dangerous, and should be corrected. Or at least amended with a disclaimer. But I don't feel qualified to make such changes.) Also, we have an idea for using objtool to detect function changes, which could potentially obsolete the need for this flag anyway. At this point the flag has no benefits for upstream which would counteract the above drawbacks. Revert it until it becomes more ready. This reverts commit 43bd3a95c98e1a86b8b55d97f745c224ecff02b9. Fixes: 43bd3a95c98e ("kbuild: use -flive-patching when CONFIG_LIVEPATCH is enabled") Reported-by: Randy Dunlap Signed-off-by: Josh Poimboeuf Acked-by: Miroslav Benes Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/696262e997359666afa053fe7d1a9fb2bb373964.1595010490.git.jpoimboe@redhat.com commit 4819e15f740ec884a50bdc431d7f1e7638b6f7d9 Author: Joerg Roedel Date: Wed Sep 2 17:59:04 2020 +0200 x86/mm/32: Bring back vmalloc faulting on x86_32 One can not simply remove vmalloc faulting on x86-32. Upstream commit: 7f0a002b5a21 ("x86/mm: remove vmalloc faulting") removed it on x86 alltogether because previously the arch_sync_kernel_mappings() interface was introduced. This interface added synchronization of vmalloc/ioremap page-table updates to all page-tables in the system at creation time and was thought to make vmalloc faulting obsolete. But that assumption was incredibly naive. It turned out that there is a race window between the time the vmalloc or ioremap code establishes a mapping and the time it synchronizes this change to other page-tables in the system. During this race window another CPU or thread can establish a vmalloc mapping which uses the same intermediate page-table entries (e.g. PMD or PUD) and does no synchronization in the end, because it found all necessary mappings already present in the kernel reference page-table. But when these intermediate page-table entries are not yet synchronized, the other CPU or thread will continue with a vmalloc address that is not yet mapped in the page-table it currently uses, causing an unhandled page fault and oops like below: BUG: unable to handle page fault for address: fe80c000 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page *pde = 33183067 *pte = a8648163 Oops: 0002 [#1] SMP CPU: 1 PID: 13514 Comm: cve-2017-17053 Tainted: G ... Call Trace: ldt_dup_context+0x66/0x80 dup_mm+0x2b3/0x480 copy_process+0x133b/0x15c0 _do_fork+0x94/0x3e0 __ia32_sys_clone+0x67/0x80 __do_fast_syscall_32+0x3f/0x70 do_fast_syscall_32+0x29/0x60 do_SYSENTER_32+0x15/0x20 entry_SYSENTER_32+0x9f/0xf2 EIP: 0xb7eef549 So the arch_sync_kernel_mappings() interface is racy, but removing it would mean to re-introduce the vmalloc_sync_all() interface, which is even more awful. Keep arch_sync_kernel_mappings() in place and catch the race condition in the page-fault handler instead. Do a partial revert of above commit to get vmalloc faulting on x86-32 back in place. Fixes: 7f0a002b5a21 ("x86/mm: remove vmalloc faulting") Reported-by: Naresh Kamboju Signed-off-by: Joerg Roedel Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200902155904.17544-1-joro@8bytes.org commit 23870f1227680d2aacff6f79c3ab2222bd04e86e Author: peterz@infradead.org Date: Wed Sep 2 18:03:23 2020 +0200 locking/lockdep: Fix "USED" <- "IN-NMI" inversions During the LPC RCU BoF Paul asked how come the "USED" <- "IN-NMI" detector doesn't trip over rcu_read_lock()'s lockdep annotation. Looking into this I found a very embarrasing typo in verify_lock_unused(): - if (!(class->usage_mask & LOCK_USED)) + if (!(class->usage_mask & LOCKF_USED)) fixing that will indeed cause rcu_read_lock() to insta-splat :/ The above typo means that instead of testing for: 0x100 (1 << LOCK_USED), we test for 8 (LOCK_USED), which corresponds to (1 << LOCK_ENABLED_HARDIRQ). So instead of testing for _any_ used lock, it will only match any lock used with interrupts enabled. The rcu_read_lock() annotation uses .check=0, which means it will not set any of the interrupt bits and will thus never match. In order to properly fix the situation and allow rcu_read_lock() to correctly work, split LOCK_USED into LOCK_USED and LOCK_USED_READ and by having .read users set USED_READ and test USED, pure read-recursive locks are permitted. Fixes: f6f48e180404 ("lockdep: Teach lockdep about "USED" <- "IN-NMI" inversions") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Tested-by: Masami Hiramatsu Acked-by: Paul E. McKenney Link: https://lore.kernel.org/r/20200902160323.GK1362448@hirez.programming.kicks-ass.net commit aef0148f3606117352053c015cb33734e9ee7397 Author: Arvind Sankar Date: Wed Sep 2 22:30:56 2020 -0400 x86/cmdline: Disable jump tables for cmdline.c When CONFIG_RETPOLINE is disabled, Clang uses a jump table for the switch statement in cmdline_find_option (jump tables are disabled when CONFIG_RETPOLINE is enabled). This function is called very early in boot from sme_enable() if CONFIG_AMD_MEM_ENCRYPT is enabled. At this time, the kernel is still executing out of the identity mapping, but the jump table will contain virtual addresses. Fix this by disabling jump tables for cmdline.c when AMD_MEM_ENCRYPT is enabled. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200903023056.3914690-1-nivedita@alum.mit.edu commit 3fbbf2148a406b3e350fe91e6fdd78eb42ecad24 Author: Tom Rix Date: Wed Sep 2 13:26:50 2020 -0700 soundwire: fix double free of dangling pointer clang static analysis flags this problem stream.c:844:9: warning: Use of memory after it is freed kfree(bus->defer_msg.msg->buf); ^~~~~~~~~~~~~~~~~~~~~~~ This happens in an error handler cleaning up memory allocated for elements in a list. list_for_each_entry(m_rt, &stream->master_list, stream_node) { bus = m_rt->bus; kfree(bus->defer_msg.msg->buf); kfree(bus->defer_msg.msg); } And is triggered when the call to sdw_bank_switch() fails. There are a two problems. First, when sdw_bank_switch() fails, though it frees memory it does not clear bus's reference 'defer_msg.msg' to that memory. The second problem is the freeing msg->buf. In some cases msg will be NULL so this will dereference a null pointer. Need to check before freeing. Fixes: 99b8a5d608a6 ("soundwire: Add bank switch routine") Signed-off-by: Tom Rix Reviewed-by: Nick Desaulniers Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200902202650.14189-1-trix@redhat.com Signed-off-by: Vinod Koul commit b1910c6b9983817160e04d4e87b2dc1413c5361a Author: Matthias Kaehlcke Date: Wed Jul 29 10:50:12 2020 -0700 interconnect: Show bandwidth for disabled paths as zero in debugfs For disabled paths the 'interconnect_summary' in debugfs currently shows the orginally requested bandwidths. This is confusing, since the bandwidth requests aren't active. Instead show the bandwidths for disabled paths/requests as zero. Signed-off-by: Matthias Kaehlcke Reviewed-by: Evan Green Link: https://lore.kernel.org/r/20200729104933.1.If8e80e4c0c7ddf99056f6e726e59505ed4e127f3@changeid Signed-off-by: Georgi Djakov commit 46815bf4d5a2e6ed64e4fa636c7d13f025bf40d8 Author: Peter Ujfalusi Date: Mon Aug 31 12:10:19 2020 +0300 dmaengine: ti: k3-udma: Update rchan_oes_offset for am654 SYSFW ABI 3.0 SYSFW ABI 3.0 has changed the rchan_oes_offset value for am654 to support SR2. Since the kernel now needs SYSFW API 3.0 to work because the merged irqchip update, we need to also update the am654 rchan_oes_offset. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200831091019.25273-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 4c62285439f80f8996c38e0bda79b1125a192365 Author: Michael Ellerman Date: Wed Sep 2 22:14:39 2020 +1000 Revert "powerpc/build: vdso linker warning for orphan sections" This reverts commit f2af201002a8bc22500c04cc474ea480bf361351. It added a usage of cc-ldoption, but cc-ldoption was removed in commit 055efab3120b ("kbuild: drop support for cc-ldoption"). Reported-by: Nick Desaulniers Signed-off-by: Michael Ellerman commit ca386aa7155a5467fa7b2b8376f4da8f8e59be4d Author: Ben Skeggs Date: Wed Sep 2 15:30:33 2020 +1000 drm/nouveau/kms/nv50-gp1xx: add WAR for EVO push buffer HW bug Thanks to NVIDIA for confirming this workaround, and clarifying which HW is affected. Signed-off-by: Ben Skeggs Tested-by: Alexander Kapshuk commit a9cfcfcad50c7bf4ef7335a3eefba8d989d15c06 Author: Ben Skeggs Date: Tue Aug 11 10:11:38 2020 +1000 drm/nouveau/kms/nv50-gp1xx: disable notifies again after core update This was lost during the header conversion. Signed-off-by: Ben Skeggs commit 35dde8d406369486e54cd628b0b3e6547bfb93a6 Author: Ben Skeggs Date: Mon Aug 10 10:48:20 2020 +1000 drm/nouveau/kms/nv50-: add some whitespace before debug message Signed-off-by: Ben Skeggs commit a255e9c8694d3ed240480d1b4d95d325a37358b3 Author: Lyude Paul Date: Mon Aug 10 17:18:37 2020 -0400 drm/nouveau/kms/gv100-: Include correct push header in crcc37d.c Looks like when we converted everything over to Nvidia's class headers, we mistakenly included the nvif/push507b.h instead of nvif/pushc37b.h, which resulted in breaking CRC reporting for volta+: nouveau 0000:1f:00.0: disp: chid 0 stat 10003361 reason 3 [RESERVED_METHOD] mthd 0d84 data 00000000 code 00000000 nouveau 0000:1f:00.0: disp: chid 0 stat 10003360 reason 3 [RESERVED_METHOD] mthd 0d80 data 00000000 code 00000000 nouveau 0000:1f:00.0: DRM: CRC notifier ctx for head 3 not finished after 50ms So, fix that. Signed-off-by: Lyude Paul Fixes: c4b27bc8682c ("drm/nouveau/kms/nv50-: convert core crc_set_src() to new push macros") Signed-off-by: Ben Skeggs commit fc8c70526bd30733ea8667adb8b8ffebea30a8ed Author: Kai-Heng Feng Date: Wed Aug 26 01:33:48 2020 +0800 drm/radeon: Prefer lower feedback dividers Commit 2e26ccb119bd ("drm/radeon: prefer lower reference dividers") fixed screen flicker for HP Compaq nx9420 but breaks other laptops like Asus X50SL. Turns out we also need to favor lower feedback dividers. Users confirmed this change fixes the regression and doesn't regress the original fix. Fixes: 2e26ccb119bd ("drm/radeon: prefer lower reference dividers") BugLink: https://bugs.launchpad.net/bugs/1791312 BugLink: https://bugs.launchpad.net/bugs/1861554 Reviewed-by: Christian König Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher commit d98299885c9ea140c1108545186593deba36c4ac Author: Sandeep Raghuraman Date: Thu Aug 27 18:43:37 2020 +0530 drm/amdgpu: Fix bug in reporting voltage for CIK On my R9 390, the voltage was reported as a constant 1000 mV. This was due to a bug in smu7_hwmgr.c, in the smu7_read_sensor() function, where some magic constants were used in a condition, to determine whether the voltage should be read from PLANE2_VID or PLANE1_VID. The VDDC mask was incorrectly used, instead of the VDDGFX mask. This patch changes the code to use the correct defined constants (and apply the correct bitshift), thus resulting in correct voltage reporting. Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher commit f7b2e34b4afb8d712913dc199d3292ea9e078637 Author: Sandeep Raghuraman Date: Thu Aug 27 17:07:33 2020 +0530 drm/amdgpu: Specify get_argument function for ci_smu_funcs Starting in Linux 5.8, the graphics and memory clock frequency were not being reported for CIK cards. This is a regression, since they were reported correctly in Linux 5.7. After investigation, I discovered that the smum_send_msg_to_smc() function, attempts to call the corresponding get_argument() function of ci_smu_funcs. However, the get_argument() function is not defined in ci_smu_funcs. This patch fixes the bug by specifying the correct get_argument() function. Fixes: a0ec225633d9f6 ("drm/amd/powerplay: unified interfaces for message issuing and response checking") Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 33286b793b079c237ee73f7264294769ea0e8076 Author: Jiansong Chen Date: Thu Aug 27 14:31:20 2020 +0800 drm/amd/pm: enable MP0 DPM for sienna_cichlid Enable MP0 clock DPM for sienna_cichlid. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 971df65cbf32da9bc9af52c1196ca504dd316086 Author: Evan Quan Date: Tue Aug 25 13:51:29 2020 +0800 drm/amd/pm: avoid false alarm due to confusing softwareshutdowntemp setting Normally softwareshutdowntemp should be greater than Thotspotlimit. However, on some VEGA10 ASIC, the softwareshutdowntemp is 91C while Thotspotlimit is 105C. This seems not right and may trigger some false alarms. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 7c62235b95db29210814b771a05279121400af5e Author: Kevin Wang Date: Mon Aug 24 16:50:12 2020 +0800 drm/amd/pm: fix is_dpm_running() run error on 32bit system v1: the C type "unsigned long" size is 32bit on 32bit system, it will cause code logic error, so replace it with "uint64_t". v2: remove duplicate cast operation. Signed-off-by: Kevin Suggest-by: Jiansong Chen Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 163e0c27fead96fd6804fa59a55fc4f841d38db8 Author: Denis Efremov Date: Mon Aug 31 09:52:23 2020 +0300 kconfig: remove redundant assignment prompt = prompt Semi-automatic removing of localization macros changed the line from "prompt = _(prompt);" to "prompt = prompt;". Drop the reduntand assignment. Fixes: 694c49a7c01c ("kconfig: drop localization support") Signed-off-by: Denis Efremov Signed-off-by: Masahiro Yamada commit b26ff488b5a8ed9fc3f606c1d04318132a431b0f Author: Randy Dunlap Date: Fri Aug 28 10:26:26 2020 -0700 kbuild: Documentation: clean up makefiles.rst This is a general cleanup of kbuild/makefiles.rst: * Use "Chapter" for major heading references and use "section" for the next-level heading references, for consistency. * Section 3.8 was deleted long ago. * Drop the ending ':' in section names in the contents list. * Correct some section numbering references. * Correct verb agreement typo. * Fix run-on sentence punctuation. Signed-off-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit a73fbfce2cc28883f659414d598e6e60ca2214b4 Author: Randy Dunlap Date: Wed Aug 26 14:21:43 2020 -0700 kconfig: streamline_config.pl: check defined(ENV variable) before using it A user reported: 'Use of uninitialized value $ENV{"LMC_KEEP"} in split at ./scripts/kconfig/streamline_config.pl line 596.' so first check that $ENV{LMC_KEEP} is defined before trying to use it. Fixes: c027b02d89fd ("streamline_config.pl: add LMC_KEEP to preserve some kconfigs") Signed-off-by: Randy Dunlap Acked-by: Steven Rostedt (VMware) Signed-off-by: Masahiro Yamada commit 7e24969022cbd61ddc586f14824fc205661bb124 Author: Ming Lei Date: Mon Aug 17 18:00:55 2020 +0800 block: allow for_each_bvec to support zero len bvec Block layer usually doesn't support or allow zero-length bvec. Since commit 1bdc76aea115 ("iov_iter: use bvec iterator to implement iterate_bvec()"), iterate_bvec() switches to bvec iterator. However, Al mentioned that 'Zero-length segments are not disallowed' in iov_iter. Fixes for_each_bvec() so that it can move on after seeing one zero length bvec. Fixes: 1bdc76aea115 ("iov_iter: use bvec iterator to implement iterate_bvec()") Reported-by: syzbot Signed-off-by: Ming Lei Tested-by: Tetsuo Handa Cc: Al Viro Cc: Matthew Wilcox Cc: Link: https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2262077.html Signed-off-by: Jens Axboe commit b614d55b970d08bcac5b0bc15a5526181b3e4459 Author: Tomas Henzl Date: Tue Sep 1 16:50:26 2020 +0200 scsi: mpt3sas: Don't call disable_irq from IRQ poll handler disable_irq() might sleep, replace it with disable_irq_nosync(). For synchronisation 'irq_poll_scheduled' is sufficient Fixes: 320e77acb3 scsi: mpt3sas: Irq poll to avoid CPU hard lockups Link: https://lore.kernel.org/r/20200901145026.12174-1-thenzl@redhat.com Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit d2af39141eea34ef651961e885f49d96781a1016 Author: Tomas Henzl Date: Thu Aug 27 18:53:32 2020 +0200 scsi: megaraid_sas: Don't call disable_irq from process IRQ poll disable_irq() might sleep. Replace it with disable_irq_nosync() which is sufficient as irq_poll_scheduled protects against concurrently running complete_cmd_fusion() from megasas_irqpoll() and megasas_isr_fusion(). Link: https://lore.kernel.org/r/20200827165332.8432-1-thenzl@redhat.com Fixes: a6ffd5bf681 scsi: megaraid_sas: Call disable_irq from process IRQ poll Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit ed43ffea78dcc97db3f561da834f1a49c8961e33 Author: Hou Pu Date: Wed Jul 29 09:03:43 2020 -0400 scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem The iSCSI target login thread might get stuck with the following stack: cat /proc/`pidof iscsi_np`/stack [<0>] down_interruptible+0x42/0x50 [<0>] iscsit_access_np+0xe3/0x167 [<0>] iscsi_target_locate_portal+0x695/0x8ac [<0>] __iscsi_target_login_thread+0x855/0xb82 [<0>] iscsi_target_login_thread+0x2f/0x5a [<0>] kthread+0xfa/0x130 [<0>] ret_from_fork+0x1f/0x30 This can be reproduced via the following steps: 1. Initiator A tries to log in to iqn1-tpg1 on port 3260. After finishing PDU exchange in the login thread and before the negotiation is finished the the network link goes down. At this point A has not finished login and tpg->np_login_sem is held. 2. Initiator B tries to log in to iqn2-tpg1 on port 3260. After finishing PDU exchange in the login thread the target expects to process remaining login PDUs in workqueue context. 3. Initiator A' tries to log in to iqn1-tpg1 on port 3260 from a new socket. A' will wait for tpg->np_login_sem with np->np_login_timer loaded to wait for at most 15 seconds. The lock is held by A so A' eventually times out. 4. Before A' got timeout initiator B gets negotiation failed and calls iscsi_target_login_drop()->iscsi_target_login_sess_out(). The np->np_login_timer is canceled and initiator A' will hang forever. Because A' is now in the login thread, no new login requests can be serviced. Fix this by moving iscsi_stop_login_thread_timer() out of iscsi_target_login_sess_out(). Also remove iscsi_np parameter from iscsi_target_login_sess_out(). Link: https://lore.kernel.org/r/20200729130343.24976-1-houpu@bytedance.com Cc: stable@vger.kernel.org Reviewed-by: Mike Christie Signed-off-by: Hou Pu Signed-off-by: Martin K. Petersen commit 8b4a11c67da538504d60ae917ffe5254f59b1248 Author: Dan Murphy Date: Wed Sep 2 14:27:04 2020 -0500 net: dp83867: Fix WoL SecureOn password Fix the registers being written to as the values were being over written when writing the same registers. Fixes: caabee5b53f5 ("net: phy: dp83867: support Wake on LAN") Signed-off-by: Dan Murphy Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f614e536704d37326b0975da9cc33dd61d28c378 Author: Louis Peens Date: Wed Sep 2 17:04:58 2020 +0200 nfp: flower: fix ABI mismatch between driver and firmware Fix an issue where the driver wrongly detected ipv6 neighbour updates from the NFP as corrupt. Add a reserved field on the kernel side so it is similar to the ipv4 version of the struct and has space for the extra bytes from the card. Fixes: 9ea9bfa12240 ("nfp: flower: support ipv6 tunnel keep-alive messages from fw") Signed-off-by: Louis Peens Signed-off-by: Simon Horman Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 2a63866c8b51a3f72cea388dfac259d0e14c4ba6 Author: Tetsuo Handa Date: Wed Sep 2 22:44:16 2020 +0900 tipc: fix shutdown() of connectionless socket syzbot is reporting hung task at nbd_ioctl() [1], for there are two problems regarding TIPC's connectionless socket's shutdown() operation. ---------- #include #include #include #include #include int main(int argc, char *argv[]) { const int fd = open("/dev/nbd0", 3); alarm(5); ioctl(fd, NBD_SET_SOCK, socket(PF_TIPC, SOCK_DGRAM, 0)); ioctl(fd, NBD_DO_IT, 0); /* To be interrupted by SIGALRM. */ return 0; } ---------- One problem is that wait_for_completion() from flush_workqueue() from nbd_start_device_ioctl() from nbd_ioctl() cannot be completed when nbd_start_device_ioctl() received a signal at wait_event_interruptible(), for tipc_shutdown() from kernel_sock_shutdown(SHUT_RDWR) from nbd_mark_nsock_dead() from sock_shutdown() from nbd_start_device_ioctl() is failing to wake up a WQ thread sleeping at wait_woken() from tipc_wait_for_rcvmsg() from sock_recvmsg() from sock_xmit() from nbd_read_stat() from recv_work() scheduled by nbd_start_device() from nbd_start_device_ioctl(). Fix this problem by always invoking sk->sk_state_change() (like inet_shutdown() does) when tipc_shutdown() is called. The other problem is that tipc_wait_for_rcvmsg() cannot return when tipc_shutdown() is called, for tipc_shutdown() sets sk->sk_shutdown to SEND_SHUTDOWN (despite "how" is SHUT_RDWR) while tipc_wait_for_rcvmsg() needs sk->sk_shutdown set to RCV_SHUTDOWN or SHUTDOWN_MASK. Fix this problem by setting sk->sk_shutdown to SHUTDOWN_MASK (like inet_shutdown() does) when the socket is connectionless. [1] https://syzkaller.appspot.com/bug?id=3fe51d307c1f0a845485cf1798aa059d12bf18b2 Reported-by: syzbot Signed-off-by: Tetsuo Handa Signed-off-by: David S. Miller commit 05d4487197b2b71d5363623c28924fd58c71c0b6 Author: Ido Schimmel Date: Wed Sep 2 16:16:59 2020 +0300 ipv6: Fix sysctl max for fib_multipath_hash_policy Cited commit added the possible value of '2', but it cannot be set. Fix it by adjusting the maximum value to '2'. This is consistent with the corresponding IPv4 sysctl. Before: # sysctl -w net.ipv6.fib_multipath_hash_policy=2 sysctl: setting key "net.ipv6.fib_multipath_hash_policy": Invalid argument net.ipv6.fib_multipath_hash_policy = 2 # sysctl net.ipv6.fib_multipath_hash_policy net.ipv6.fib_multipath_hash_policy = 0 After: # sysctl -w net.ipv6.fib_multipath_hash_policy=2 net.ipv6.fib_multipath_hash_policy = 2 # sysctl net.ipv6.fib_multipath_hash_policy net.ipv6.fib_multipath_hash_policy = 2 Fixes: d8f74f0975d8 ("ipv6: Support multipath hashing on inner IP pkts") Signed-off-by: Ido Schimmel Reviewed-by: Stephen Suryaputra Signed-off-by: David S. Miller commit 2b7bcd967a0f5b7ac9bb0c37b92de36e073dd119 Author: Xie He Date: Wed Sep 2 05:07:06 2020 -0700 drivers/net/wan/hdlc: Change the default of hard_header_len to 0 Change the default value of hard_header_len in hdlc.c from 16 to 0. Currently there are 6 HDLC protocol drivers, among them: hdlc_raw_eth, hdlc_cisco, hdlc_ppp, hdlc_x25 set hard_header_len when attaching the protocol, overriding the default. So this patch does not affect them. hdlc_raw and hdlc_fr don't set hard_header_len when attaching the protocol. So this patch will change the hard_header_len of the HDLC device for them from 16 to 0. This is the correct change because both hdlc_raw and hdlc_fr don't have header_ops, and the code in net/packet/af_packet.c expects the value of hard_header_len to be consistent with header_ops. In net/packet/af_packet.c, in the packet_snd function, for AF_PACKET/DGRAM sockets it would reserve a headroom of hard_header_len and call dev_hard_header to fill in that headroom, and for AF_PACKET/RAW sockets, it does not reserve the headroom and does not call dev_hard_header, but checks if the user has provided a header of length hard_header_len (in function dev_validate_header). Cc: Krzysztof Halasa Cc: Martin Schiller Signed-off-by: Xie He Signed-off-by: David S. Miller commit eb0f3bc463d59d86402f19c59aa44e82dc3fab6d Author: Dan Carpenter Date: Wed Sep 2 14:56:31 2020 +0300 net: gemini: Fix another missing clk_disable_unprepare() in probe We recently added some calls to clk_disable_unprepare() but we missed the last error path if register_netdev() fails. I made a couple cleanups so we avoid mistakes like this in the future. First I reversed the "if (!ret)" condition and pulled the code in one indent level. Also, the "port->netdev = NULL;" is not required because "port" isn't used again outside this function so I deleted that line. Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 28b0865714b315e318ac45c4fc9156f3d4649646 Author: Kamal Heib Date: Wed Sep 2 15:43:04 2020 +0300 RDMA/core: Fix reported speed and width When the returned speed from __ethtool_get_link_ksettings() is SPEED_UNKNOWN this will lead to reporting a wrong speed and width for providers that uses ib_get_eth_speed(), fix that by defaulting the netdev_speed to SPEED_1000 in case the returned value from __ethtool_get_link_ksettings() is SPEED_UNKNOWN. Fixes: d41861942fc5 ("IB/core: Add generic function to extract IB speed from netdev") Link: https://lore.kernel.org/r/20200902124304.170912-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit fc3abb53250a90ba2150eebd182137c136f4d25a Merge: c3a1309564d38 35556bed836f8 Author: Linus Torvalds Date: Wed Sep 2 12:55:46 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - data sanitization and validtion fixes for report descriptor parser from Marc Zyngier - memory leak fix for hid-elan driver from Dinghao Liu - two device-specific quirks * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: core: Sanitize event code and type when mapping input HID: core: Correctly handle ReportSize being zero HID: elan: Fix memleak in elan_input_configured HID: microsoft: Add rumble support for the 8bitdo SN30 Pro+ controller HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for all Saitek X52 devices commit 1996cf46e4673a25ef2478eb266714f409a98221 Author: Denis Efremov Date: Wed Sep 2 14:18:45 2020 +0300 net: bcmgenet: fix mask check in bcmgenet_validate_flow() VALIDATE_MASK(eth_mask->h_source) is checked twice in a row in bcmgenet_validate_flow(). Add VALIDATE_MASK(eth_mask->h_dest) instead. Fixes: 3e370952287c ("net: bcmgenet: add support for ethtool rxnfc flows") Signed-off-by: Denis Efremov Acked-by: Doug Berger Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 7deedd9f0e43bb3f4ea531b3ea9ecc27bf1f4871 Author: Shyam Sundar S K Date: Wed Sep 2 09:28:07 2020 +0000 amd-xgbe: Add support for new port mode Add support for a new port mode that is a backplane connection without support for auto negotiation. Signed-off-by: Shyam Sundar S K Signed-off-by: David S. Miller commit c3a1309564d3834bad6547a50e58bd195ee85fb6 Merge: e1d0126ca3a66 3a653b205f29b Author: Linus Torvalds Date: Wed Sep 2 11:59:49 2020 -0700 Merge tag 'for-5.9/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - writecache fix to allow dax_direct_access() to partitioned pmem devices. - multipath fix to avoid any Path Group initialization if 'pg_init_in_progress' isn't set. - crypt fix to use DECLARE_CRYPTO_WAIT() for onstack wait structures. - integrity fix to properly check integrity after device creation when in bitmap mode. - thinp and cache target __create_persistent_data_objects() fixes to reset the metadata's dm_block_manager pointer from PTR_ERR to NULL before returning from error path. - persistent-data block manager fix to guard against dm_block_manager NULL pointer dereference in dm_bm_is_read_only() and update various opencoded bm->read_only checks to use dm_bm_is_read_only() instead. * tag 'for-5.9/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm thin metadata: Fix use-after-free in dm_bm_set_read_only dm thin metadata: Avoid returning cmd->bm wild pointer on error dm cache metadata: Avoid returning cmd->bm wild pointer on error dm integrity: fix error reporting in bitmap mode after creation dm crypt: Initialize crypto wait structures dm mpath: fix racey management of PG initialization dm writecache: handle DAX to partitions on persistent memory correctly commit 8aa64be019567c4f90d45c5082a4b6f22e182d00 Author: Xi Wang Date: Tue Sep 1 20:38:55 2020 +0800 RDMA/core: Fix unsafe linked list traversal after failing to allocate CQ It's not safe to access the next CQ in list_for_each_entry() after invoking ib_free_cq(), because the CQ has already been freed in current iteration. It should be replaced by list_for_each_entry_safe(). Fixes: c7ff819aefea ("RDMA/core: Introduce shared CQ pool API") Link: https://lore.kernel.org/r/1598963935-32335-1-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Reviewed-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit e1d0126ca3a66c284a02b083a42e2b39558002cd Merge: 54e54d58184e3 125eac243806e Author: Linus Torvalds Date: Wed Sep 2 11:42:18 2020 -0700 Merge tag 'xfs-5.9-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Various small corruption fixes that have come in during the past month: - Avoid a log recovery failure for an insert range operation by rolling deferred ops incrementally instead of at the end. - Fix an off-by-one error when calculating log space reservations for anything involving an inode allocation or free. - Fix a broken shortform xattr verifier. - Ensure that the shortform xattr header padding is always initialized to zero" * tag 'xfs-5.9-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: initialize the shortform attr header padding entry xfs: fix boundary test in xfs_attr_shortform_verify xfs: fix off-by-one in inode alloc block reservation calculation xfs: finish dfops on every insert range shift iteration commit 837ba18dfcd4db21ad58107c65bfe89753aa56d7 Author: Vincent Whitchurch Date: Wed Sep 2 15:23:41 2020 +0200 spi: spi-loopback-test: Fix out-of-bounds read The "tx/rx-transfer - crossing PAGE_SIZE" test always fails when len=131071 and rx_offset >= 5: spi-loopback-test spi0.0: Running test tx/rx-transfer - crossing PAGE_SIZE ... with iteration values: len = 131071, tx_off = 0, rx_off = 3 with iteration values: len = 131071, tx_off = 0, rx_off = 4 with iteration values: len = 131071, tx_off = 0, rx_off = 5 loopback strangeness - rx changed outside of allowed range at: ...a4321000 spi_msg@ffffffd5a4157690 frame_length: 131071 actual_length: 131071 spi_transfer@ffffffd5a41576f8 len: 131071 tx_buf: ffffffd5a4340ffc Note that rx_offset > 3 can only occur if the SPI controller driver sets ->dma_alignment to a higher value than 4, so most SPI controller drivers are not affect. The allocated Rx buffer is of size SPI_TEST_MAX_SIZE_PLUS, which is 132 KiB (assuming 4 KiB pages). This test uses an initial offset into the rx_buf of PAGE_SIZE - 4, and a len of 131071, so the range expected to be written in this transfer ends at (4096 - 4) + 5 + 131071 == 132 KiB, which is also the end of the allocated buffer. But the code which verifies the content of the buffer reads a byte beyond the allocated buffer and spuriously fails because this out-of-bounds read doesn't return the expected value. Fix this by using ITERATE_LEN instead of ITERATE_MAX_LEN to avoid testing sizes which cause out-of-bounds reads. Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20200902132341.7079-1-vincent.whitchurch@axis.com Signed-off-by: Mark Brown commit 54e54d58184e34887cc40d0bc83720dbaf57db1a Merge: 9c7d619be5a00 77f4689de17c0 Author: Linus Torvalds Date: Wed Sep 2 11:29:34 2020 -0700 Merge branch 'work.epoll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull epoll fixup from Al Viro: "Fixup for epoll regression; there's a better solution longer term, but this is the least intrusive fix" * 'work.epoll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix regression in "epoll: Keep a reference on files added to the check list" commit 59ae97a7a9e1499c2070e29841d1c4be4ae2994a Author: Vincent Whitchurch Date: Wed Sep 2 15:09:52 2020 +0200 regulator: pwm: Fix machine constraints application If the zero duty cycle doesn't correspond to any voltage in the voltage table, the PWM regulator returns an -EINVAL from get_voltage_sel() which results in the core erroring out with a "failed to get the current voltage" and ending up not applying the machine constraints. Instead, return -ENOTRECOVERABLE which makes the core set the voltage since it's at an unknown value. For example, with this device tree: fooregulator { compatible = "pwm-regulator"; pwms = <&foopwm 0 100000>; regulator-min-microvolt = <2250000>; regulator-max-microvolt = <2250000>; regulator-name = "fooregulator"; regulator-always-on; regulator-boot-on; voltage-table = <2250000 30>; }; Before this patch: fooregulator: failed to get the current voltage(-22) After this patch: fooregulator: Setting 2250000-2250000uV fooregulator: 2250 mV Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20200902130952.24880-1-vincent.whitchurch@axis.com Signed-off-by: Mark Brown commit 6a0137101f47301fff2da6ba4b9048383d569909 Author: Hans de Goede Date: Tue Sep 1 10:06:23 2020 +0200 ASoC: Intel: bytcr_rt5640: Add quirk for MPMAN Converter9 2-in-1 The MPMAN Converter9 2-in-1 almost fully works with out default settings. The only problem is that it has only 1 speaker so any sounds only playing on the right channel get lost. Add a quirk for this model using the default settings + MONO_SPEAKER. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200901080623.4987-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit 3a653b205f29b3f9827a01a0c88bfbcb0d169494 Author: Ye Bin Date: Tue Sep 1 14:25:44 2020 +0800 dm thin metadata: Fix use-after-free in dm_bm_set_read_only The following error ocurred when testing disk online/offline: [ 301.798344] device-mapper: thin: 253:5: aborting current metadata transaction [ 301.848441] device-mapper: thin: 253:5: failed to abort metadata transaction [ 301.849206] Aborting journal on device dm-26-8. [ 301.850489] EXT4-fs error (device dm-26) in __ext4_new_inode:943: Journal has aborted [ 301.851095] EXT4-fs (dm-26): Delayed block allocation failed for inode 398742 at logical offset 181 with max blocks 19 with error 30 [ 301.854476] BUG: KASAN: use-after-free in dm_bm_set_read_only+0x3a/0x40 [dm_persistent_data] Reason is: metadata_operation_failed abort_transaction dm_pool_abort_metadata __create_persistent_data_objects r = __open_or_format_metadata if (r) --> If failed will free pmd->bm but pmd->bm not set NULL dm_block_manager_destroy(pmd->bm); set_pool_mode dm_pool_metadata_read_only(pool->pmd); dm_bm_set_read_only(pmd->bm); --> use-after-free Add checks to see if pmd->bm is NULL in dm_bm_set_read_only and dm_bm_set_read_write functions. If bm is NULL it means creating the bm failed and so dm_bm_is_read_only must return true. Signed-off-by: Ye Bin Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit 219403d7e56f9b716ad80ab87db85d29547ee73e Author: Ye Bin Date: Tue Sep 1 14:25:43 2020 +0800 dm thin metadata: Avoid returning cmd->bm wild pointer on error Maybe __create_persistent_data_objects() caller will use PTR_ERR as a pointer, it will lead to some strange things. Signed-off-by: Ye Bin Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit d16ff19e69ab57e08bf908faaacbceaf660249de Author: Ye Bin Date: Tue Sep 1 14:25:42 2020 +0800 dm cache metadata: Avoid returning cmd->bm wild pointer on error Maybe __create_persistent_data_objects() caller will use PTR_ERR as a pointer, it will lead to some strange things. Signed-off-by: Ye Bin Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit b79de57b4378a93115307be6962d05b099eb0f37 Author: Pierre-Louis Bossart Date: Wed Sep 2 18:42:50 2020 +0300 ALSA: hda: use consistent HDAudio spelling in comments/docs We use HDaudio and HDAudio, pick one to make searches easier. No functionality change Also fix timestamping typo in documentation. Reported-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200902154250.1440585-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 3b5455636fe26ea21b4189d135a424a6da016418 Author: Tejun Heo Date: Wed Sep 2 12:32:45 2020 -0400 libata: implement ATA_HORKAGE_MAX_TRIM_128M and apply to Sandisks All three generations of Sandisk SSDs lock up hard intermittently. Experiments showed that disabling NCQ lowered the failure rate significantly and the kernel has been disabling NCQ for some models of SD7's and 8's, which is obviously undesirable. Karthik worked with Sandisk to root cause the hard lockups to trim commands larger than 128M. This patch implements ATA_HORKAGE_MAX_TRIM_128M which limits max trim size to 128M and applies it to all three generations of Sandisk SSDs. Signed-off-by: Tejun Heo Cc: Karthik Shivaram Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe commit ae035947162c9350619de1b3a3e3051a265f43f2 Author: Pierre-Louis Bossart Date: Wed Sep 2 18:42:39 2020 +0300 ALSA: hda: add dev_dbg log when driver is not selected On SKL+ Intel platforms, the driver selection is handled by the snd_intel_dspcfg, and when the HDaudio legacy driver is not selected, be it with the auto-selection or user preferences with a kernel parameter, the probe aborts with no logs, only a -ENODEV return value. Having no dmesg trace, even with dynamic debug enabled, makes support more complicated than it needs to be, and even experienced users can be fooled. A simple dev_dbg() trace solves this problem. BugLink: https://github.com/thesofproject/linux/issues/2330 Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200902154239.1440537-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 13774d81f38538c5fa2924bdcdfa509155480fa6 Author: Rander Wang Date: Wed Sep 2 18:42:18 2020 +0300 ALSA: hda: fix a runtime pm issue in SOF when integrated GPU is disabled In snd_hdac_device_init pm_runtime_set_active is called to increase child_count in parent device. But when it is failed to build connection with GPU for one case that integrated graphic gpu is disabled, snd_hdac_ext_bus_device_exit will be invoked to clean up a HD-audio extended codec base device. At this time the child_count of parent is not decreased, which makes parent device can't get suspended. This patch calls pm_runtime_set_suspended to decrease child_count in parent device in snd_hdac_device_exit to match with snd_hdac_device_init. pm_runtime_set_suspended can make sure that it will not decrease child_count if the device is already suspended. Signed-off-by: Rander Wang Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200902154218.1440441-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit f804a324a41a880c1ab43cc5145d8b3e5790430d Author: Rander Wang Date: Wed Sep 2 18:42:07 2020 +0300 ALSA: hda: hdmi - add Rocketlake support Add Rocketlake HDMI codec support. Rocketlake shares the pin-to-port mapping table with Tigerlake. Signed-off-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200902154207.1440393-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 355afaeb578abac907217c256a844cfafb0337b2 Author: Jens Axboe Date: Wed Sep 2 09:30:31 2020 -0600 io_uring: no read/write-retry on -EAGAIN error and O_NONBLOCK marked file Actually two things that need fixing up here: - The io_rw_reissue() -EAGAIN retry is explicit to block devices and regular files, so don't ever attempt to do that on other types of files. - If we hit -EAGAIN on a nonblock marked file, don't arm poll handler for it. It should just complete with -EAGAIN. Cc: stable@vger.kernel.org Reported-by: Norman Maurer Signed-off-by: Jens Axboe commit 77f4689de17c0887775bb77896f4cc11a39bf848 Author: Al Viro Date: Wed Sep 2 11:30:48 2020 -0400 fix regression in "epoll: Keep a reference on files added to the check list" epoll_loop_check_proc() can run into a file already committed to destruction; we can't grab a reference on those and don't need to add them to the set for reverse path check anyway. Tested-by: Marc Zyngier Fixes: a9ed4a6560b8 ("epoll: Keep a reference on files added to the check list") Signed-off-by: Al Viro commit 95d1c8e5f801e959a89181a2548a3efa60a1a6ce Author: Jiufei Xue Date: Wed Sep 2 17:59:39 2020 +0800 io_uring: set table->files[i] to NULL when io_sqe_file_register failed While io_sqe_file_register() failed in __io_sqe_files_update(), table->files[i] still point to the original file which may freed soon, and that will trigger use-after-free problems. Cc: stable@vger.kernel.org Fixes: f3bd9dae3708 ("io_uring: fix memleak in __io_sqe_files_update()") Signed-off-by: Jiufei Xue Signed-off-by: Jens Axboe commit 675bceb097e6fb9769309093ec6f3d33a2fed9cc Author: Aneesh Kumar K.V Date: Wed Sep 2 09:31:22 2020 +0530 powerpc/mm: Remove DEBUG_VM_PGTABLE support on powerpc The test is broken w.r.t page table update rules and results in kernel crash as below. Disable the support until we get the tests updated. [ 21.083519] kernel BUG at arch/powerpc/mm/pgtable.c:304! cpu 0x0: Vector: 700 (Program Check) at [c000000c6d1e76c0] pc: c00000000009a5ec: assert_pte_locked+0x14c/0x380 lr: c0000000005eeeec: pte_update+0x11c/0x190 sp: c000000c6d1e7950 msr: 8000000002029033 current = 0xc000000c6d172c80 paca = 0xc000000003ba0000 irqmask: 0x03 irq_happened: 0x01 pid = 1, comm = swapper/0 kernel BUG at arch/powerpc/mm/pgtable.c:304! [link register ] c0000000005eeeec pte_update+0x11c/0x190 [c000000c6d1e7950] 0000000000000001 (unreliable) [c000000c6d1e79b0] c0000000005eee14 pte_update+0x44/0x190 [c000000c6d1e7a10] c000000001a2ca9c pte_advanced_tests+0x160/0x3d8 [c000000c6d1e7ab0] c000000001a2d4fc debug_vm_pgtable+0x7e8/0x1338 [c000000c6d1e7ba0] c0000000000116ec do_one_initcall+0xac/0x5f0 [c000000c6d1e7c80] c0000000019e4fac kernel_init_freeable+0x4dc/0x5a4 [c000000c6d1e7db0] c000000000012474 kernel_init+0x24/0x160 [c000000c6d1e7e20] c00000000000cbd0 ret_from_kernel_thread+0x5c/0x6c With DEBUG_VM disabled [ 20.530152] BUG: Kernel NULL pointer dereference on read at 0x00000000 [ 20.530183] Faulting instruction address: 0xc0000000000df330 cpu 0x33: Vector: 380 (Data SLB Access) at [c000000c6d19f700] pc: c0000000000df330: memset+0x68/0x104 lr: c00000000009f6d8: hash__pmdp_huge_get_and_clear+0xe8/0x1b0 sp: c000000c6d19f990 msr: 8000000002009033 dar: 0 current = 0xc000000c6d177480 paca = 0xc00000001ec4f400 irqmask: 0x03 irq_happened: 0x01 pid = 1, comm = swapper/0 [link register ] c00000000009f6d8 hash__pmdp_huge_get_and_clear+0xe8/0x1b0 [c000000c6d19f990] c00000000009f748 hash__pmdp_huge_get_and_clear+0x158/0x1b0 (unreliable) [c000000c6d19fa10] c0000000019ebf30 pmd_advanced_tests+0x1f0/0x378 [c000000c6d19fab0] c0000000019ed088 debug_vm_pgtable+0x79c/0x1244 [c000000c6d19fba0] c0000000000116ec do_one_initcall+0xac/0x5f0 [c000000c6d19fc80] c0000000019a4fac kernel_init_freeable+0x4dc/0x5a4 [c000000c6d19fdb0] c000000000012474 kernel_init+0x24/0x160 [c000000c6d19fe20] c00000000000cbd0 ret_from_kernel_thread+0x5c/0x6c 33:mon> Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200902040122.136414-1-aneesh.kumar@linux.ibm.com commit 6bde8ef51c917a657476310728d6cb3de6bac9e4 Merge: 949a1ebe8cea7 07da90b0e5fc2 Author: Takashi Iwai Date: Wed Sep 2 13:31:45 2020 +0200 Merge branch 'topic/tasklet-convert' into for-linus Pull tasklet API conversions. Signed-off-by: Takashi Iwai commit 07da90b0e5fc299c0ce4d34d1916d7a79b86848b Author: Allen Pais Date: Wed Sep 2 09:32:21 2020 +0530 ALSA: ua101: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200902040221.354941-11-allen.lkml@gmail.com Signed-off-by: Takashi Iwai commit 7fbf9547f3420bae7f3713fc97349767bced5906 Author: Allen Pais Date: Wed Sep 2 09:32:20 2020 +0530 ALSA: usb-audio: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200902040221.354941-10-allen.lkml@gmail.com Signed-off-by: Takashi Iwai commit ad77b35abb53481bc4cd7237ceae14af7275a50d Author: Allen Pais Date: Wed Sep 2 09:32:19 2020 +0530 ASoC: txx9: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200902040221.354941-9-allen.lkml@gmail.com Signed-off-by: Takashi Iwai commit ea0364c01e9539a2ec973ab49df4b3124ec5d0fc Author: Allen Pais Date: Wed Sep 2 09:32:18 2020 +0530 ASoC: siu: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200902040221.354941-8-allen.lkml@gmail.com Signed-off-by: Takashi Iwai commit b07e4a3fb2473e3e55e209e2cd22295276de333a Author: Allen Pais Date: Wed Sep 2 09:32:17 2020 +0530 ASoC: fsl_esai: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200902040221.354941-7-allen.lkml@gmail.com Signed-off-by: Takashi Iwai commit 1a1575a151478f336c473137c32b82a3933e402e Author: Allen Pais Date: Wed Sep 2 09:32:16 2020 +0530 ALSA: hdsp: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200902040221.354941-6-allen.lkml@gmail.com Signed-off-by: Takashi Iwai commit c2082393d55487d30d1b307242135b2b442920a0 Author: Allen Pais Date: Wed Sep 2 09:32:15 2020 +0530 ALSA: riptide: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200902040221.354941-5-allen.lkml@gmail.com Signed-off-by: Takashi Iwai commit 70f8b2f12dc033b24e2932c2b196d1ca4a915417 Author: Allen Pais Date: Wed Sep 2 09:32:14 2020 +0530 ALSA: pci/asihpi: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200902040221.354941-4-allen.lkml@gmail.com Signed-off-by: Takashi Iwai commit 51bc581a21c420f71b4d78e5718efac2aaf854b1 Author: Allen Pais Date: Wed Sep 2 09:32:13 2020 +0530 ALSA: firewire: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Acked-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200902040221.354941-3-allen.lkml@gmail.com Signed-off-by: Takashi Iwai commit d1a58aae6648031afcb2a93f5af8498037efe2cc Author: Allen Pais Date: Wed Sep 2 09:32:12 2020 +0530 ALSA: core: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais Link: https://lore.kernel.org/r/20200902040221.354941-2-allen.lkml@gmail.com Signed-off-by: Takashi Iwai commit 5c60ed283e1d87e161441bb273541a948ee96f6a Author: Heiko Carstens Date: Tue Sep 1 20:39:29 2020 +0200 s390: update defconfigs Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 114b9df419bf5db097b322ebb03fcf2f502f9380 Author: Eric Farman Date: Tue Aug 25 03:59:39 2020 +0200 s390: fix GENERIC_LOCKBREAK dependency typo in Kconfig Commit fa686453053b ("sched/rt, s390: Use CONFIG_PREEMPTION") changed a bunch of uses of CONFIG_PREEMPT to _PREEMPTION. Except in the Kconfig it used two T's. That's the only place in the system where that spelling exists, so let's fix that. Fixes: fa686453053b ("sched/rt, s390: Use CONFIG_PREEMPTION") Cc: # 5.6 Signed-off-by: Eric Farman Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 57537b4e1d37002ed8cbd0a9be082104749e9d8f Author: Sean Paul Date: Tue Aug 18 11:38:50 2020 -0400 drm/i915: Clear the repeater bit on HDCP disable On HDCP disable, clear the repeater bit. This ensures if we connect a non-repeater sink after a repeater, the bit is in the state we expect. Fixes: ee5e5e7a5e0f ("drm/i915: Add HDCP framework + base implementation") Cc: Chris Wilson Cc: Ramalingam C Cc: Daniel Vetter Cc: Sean Paul Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Cc: # v4.17+ Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-3-sean@poorly.run (cherry picked from commit 2cc0c7b520bf8ea20ec42285d4e3d37b467eb7f9) Signed-off-by: Jani Nikula commit 9ab57658a608f879469ffa22b723c4539c05a58f Author: Sean Paul Date: Tue Aug 18 11:38:49 2020 -0400 drm/i915: Fix sha_text population code This patch fixes a few bugs: 1- We weren't taking into account sha_leftovers when adding multiple ksvs to sha_text. As such, we were or'ing the end of ksv[j - 1] with the beginning of ksv[j] 2- In the sha_leftovers == 2 and sha_leftovers == 3 case, bstatus was being placed on the wrong half of sha_text, overlapping the leftover ksv value 3- In the sha_leftovers == 2 case, we need to manually terminate the byte stream with 0x80 since the hardware doesn't have enough room to add it after writing M0 The upside is that all of the HDCP supported HDMI repeaters I could find on Amazon just strip HDCP anyways, so it turns out to be _really_ hard to hit any of these cases without an MST hub, which is not (yet) supported. Oh, and the sha_leftovers == 1 case works perfectly! Fixes: ee5e5e7a5e0f ("drm/i915: Add HDCP framework + base implementation") Cc: Chris Wilson Cc: Ramalingam C Cc: Daniel Vetter Cc: Sean Paul Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Cc: # v4.17+ Reviewed-by: Ramalingam C Signed-off-by: Sean Paul Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200818153910.27894-2-sean@poorly.run (cherry picked from commit 1f0882214fd0037b74f245d9be75c31516fed040) Signed-off-by: Jani Nikula commit 6baa2e0c8ab89664285bb0780bfd39276bc27a88 Author: Nathan Chancellor Date: Fri Aug 28 13:28:30 2020 -0700 drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state Clang warns: drivers/gpu/drm/i915/display/intel_combo_phy.c:268:3: warning: variable 'ret' is uninitialized when used here [-Wuninitialized] ret &= check_phy_reg(dev_priv, phy, ICL_PORT_TX_DW8_LN0(phy), ^~~ drivers/gpu/drm/i915/display/intel_combo_phy.c:261:10: note: initialize the variable 'ret' to silence this warning bool ret; ^ = 0 1 warning generated. In practice, the bug this warning appears to be concerned with would not actually matter because ret gets initialized to the return value of cnl_verify_procmon_ref_values. However, that does appear to be a bug since it means the first hunk of the patch this fixes won't actually do anything (since the values of check_phy_reg won't factor into the final ret value). Initialize ret to true then make all of the assignments a bitwise AND with itself so that the function always does what it should do. Fixes: 239bef676d8e ("drm/i915/display: Implement new combo phy initialization step") Link: https://github.com/ClangBuiltLinux/linux/issues/1094 Signed-off-by: Nathan Chancellor Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200828202830.7165-1-jose.souza@intel.com Signed-off-by: José Roberto de Souza (cherry picked from commit 2034c2129bc4a91d471815d4dc7a2a69eaa5338d) Signed-off-by: Jani Nikula commit e0328feda79d9681b3e3245e6e180295550c8ee9 Author: Jessica Yu Date: Tue Sep 1 18:00:16 2020 +0200 arm64/module: set trampoline section flags regardless of CONFIG_DYNAMIC_FTRACE In the arm64 module linker script, the section .text.ftrace_trampoline is specified unconditionally regardless of whether CONFIG_DYNAMIC_FTRACE is enabled (this is simply due to the limitation that module linker scripts are not preprocessed like the vmlinux one). Normally, for .plt and .text.ftrace_trampoline, the section flags present in the module binary wouldn't matter since module_frob_arch_sections() would assign them manually anyway. However, the arm64 module loader only sets the section flags for .text.ftrace_trampoline when CONFIG_DYNAMIC_FTRACE=y. That's only become problematic recently due to a recent change in binutils-2.35, where the .text.ftrace_trampoline section (along with the .plt section) is now marked writable and executable (WAX). We no longer allow writable and executable sections to be loaded due to commit 5c3a7db0c7ec ("module: Harden STRICT_MODULE_RWX"), so this is causing all modules linked with binutils-2.35 to be rejected under arm64. Drop the IS_ENABLED(CONFIG_DYNAMIC_FTRACE) check in module_frob_arch_sections() so that the section flags for .text.ftrace_trampoline get properly set to SHF_EXECINSTR|SHF_ALLOC, without SHF_WRITE. Signed-off-by: Jessica Yu Acked-by: Will Deacon Acked-by: Ard Biesheuvel Link: http://lore.kernel.org/r/20200831094651.GA16385@linux-8ccs Link: https://lore.kernel.org/r/20200901160016.3646-1-jeyu@kernel.org Signed-off-by: Catalin Marinas commit 60295d50958e21da1df7311fd3c6aced1b3f1f04 Author: Sudeep Holla Date: Tue Sep 1 10:52:29 2020 +0100 arm64: Remove exporting cpu_logical_map symbol Commit eaecca9e7710 ("arm64: Fix __cpu_logical_map undefined issue") exported cpu_logical_map in order to fix tegra194-cpufreq module build failure. As this might potentially cause problem while supporting physical CPU hotplug, tegra194-cpufreq module was reworded to avoid use of cpu_logical_map() via the commit 93d0c1ab2328 ("cpufreq: replace cpu_logical_map() with read_cpuid_mpir()") Since cpu_logical_map was exported to fix the module build temporarily, let us remove the same before it gains any user again. Signed-off-by: Sudeep Holla Link: https://lore.kernel.org/r/20200901095229.56793-1-sudeep.holla@arm.com Signed-off-by: Catalin Marinas commit c6016c6e39c3ee8fd671532520be3cc13e439db2 Author: Gerd Hoffmann Date: Tue Aug 18 09:25:10 2020 +0200 drm/virtio: fix unblank When going through a disable/enable cycle without changing the framebuffer the optimization added by commit 3954ff10e06e ("drm/virtio: skip set_scanout if framebuffer didn't change") causes the screen stay blank. Add a bool to force an update to fix that. v2: use drm_atomic_crtc_needs_modeset() (Daniel). Cc: 1882851@bugs.launchpad.net Fixes: 3954ff10e06e ("drm/virtio: skip set_scanout if framebuffer didn't change") Signed-off-by: Gerd Hoffmann Tested-by: Jiri Slaby Tested-by: Diego Viola Acked-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20200818072511.6745-2-kraxel@redhat.com (cherry picked from commit 1bc371cd0ec907bab870cacb6e898105f9c41dc8) commit 9c7d619be5a002ea29c172df5e3c1227c22cbb41 Merge: dcdfd9cc28ddd 977f739b7126b Author: Linus Torvalds Date: Tue Sep 1 19:36:52 2020 -0700 Merge tag 'perf-tools-fixes-for-v5.9-2020-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix infinite loop in the TUI for grouped events in 'perf top/record', eg when using "perf top -e '{cycles,instructions,cache-misses}'". - Fix segfault by skipping side-band event setup if HAVE_LIBBPF_SUPPORT is not set. - Fix synthesized branch stacks generated from CoreSight ETM trace and Intel PT hardware traces. - Fix error when synthesizing events from ARM SPE hardware trace. - The SNOOPX and REMOTE offsets in the data_src bitmask in perf records were were both 37, SNOOPX is 38, fix it. - Fix use of CPU list with summary option in 'perf sched timehist'. - Avoid an uninitialized read when using fake PMUs. - Set perf_event_attr.exclude_guest=1 for user-space counting. - Don't order events when doing a 'perf report -D' raw dump of perf.data records. - Set NULL sentinel in pmu_events table in "Parse and process metrics" 'perf test' - Fix basic bpf filtering 'perf test' on s390x. - Fix out of bounds array access in the 'perf stat' print_counters() evlist method. - Add mwait_idle_with_hints.constprop.0 to the list of idle symbols. - Use %zd for size_t printf formats on 32-bit. - Correct the help info of "perf record --no-bpf-event" option. - Add entries for CoreSight and Arm SPE tooling to MAINTAINERS. * tag 'perf-tools-fixes-for-v5.9-2020-09-01' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf report: Disable ordered_events for raw dump perf tools: Correct SNOOPX field offset perf intel-pt: Fix corrupt data after perf inject from perf cs-etm: Fix corrupt data after perf inject from perf top/report: Fix infinite loop in the TUI for grouped events perf parse-events: Avoid an uninitialized read when using fake PMUs perf stat: Fix out of bounds array access in the print_counters() evlist method perf test: Set NULL sentinel in pmu_events table in "Parse and process metrics" test perf parse-events: Set exclude_guest=1 for user-space counting perf record: Correct the help info of option "--no-bpf-event" perf tools: Use %zd for size_t printf formats on 32-bit MAINTAINERS: Add entries for CoreSight and Arm SPE tooling perf: arm-spe: Fix check error when synthesizing events perf symbols: Add mwait_idle_with_hints.constprop.0 to the list of idle symbols perf top: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set perf sched timehist: Fix use of CPU list with summary option perf test: Fix basic bpf filtering test commit 53de092f47ff40e8d4d78d590d95819d391bf2e0 Author: Luo Jiaxing Date: Wed Aug 26 15:24:26 2020 +0800 scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA It was discovered that sdparm will fail when attempting to disable write cache on a SATA disk connected via libsas. In the ATA command set the write cache state is controlled through the SET FEATURES operation. This is roughly corresponds to MODE SELECT in SCSI and the latter command is what is used in the SCSI-ATA translation layer. A subtle difference is that a MODE SELECT carries data whereas SET FEATURES is defined as a non-data command in ATA. Set the DMA data direction to DMA_NONE if the requested ATA command is identified as non-data. [mkp: commit desc] Fixes: fa1c1e8f1ece ("[SCSI] Add SATA support to libsas") Link: https://lore.kernel.org/r/1598426666-54544-1-git-send-email-luojiaxing@huawei.com Reviewed-by: John Garry Reviewed-by: Jason Yan Signed-off-by: Luo Jiaxing Signed-off-by: Martin K. Petersen commit dcdfd9cc28ddd356d24d5461119e4c1d19284ff5 Merge: b765a32a2e917 f96d6960abbc5 Author: Linus Torvalds Date: Tue Sep 1 18:36:45 2020 -0700 Merge tag 'for-5.9-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Two small fixes and a bunch of lockdep fixes for warnings that show up with an upcoming tree locking update but are valid with current locks as well" * tag 'for-5.9-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: tree-checker: fix the error message for transid error btrfs: set the lockdep class for log tree extent buffers btrfs: set the correct lockdep class for new nodes btrfs: allocate scrub workqueues outside of locks btrfs: fix potential deadlock in the search ioctl btrfs: drop path before adding new uuid tree entry btrfs: block-group: fix free-space bitmap threshold commit 5528d03183fe5243416c706f64b1faa518b05130 Author: Varun Prakash Date: Tue Aug 25 18:05:10 2020 +0530 scsi: target: iscsi: Fix data digest calculation Current code does not consider 'page_off' in data digest calculation. To fix this, add a local variable 'first_sg' and set first_sg.offset to sg->offset + page_off. Link: https://lore.kernel.org/r/1598358910-3052-1-git-send-email-varun@chelsio.com Fixes: e48354ce078c ("iscsi-target: Add iSCSI fabric support for target v4.1") Cc: Reviewed-by: Mike Christie Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit e11d80a849e010f78243bb6f6af7dccef3a71a90 Author: Tejun Heo Date: Tue Sep 1 14:52:32 2020 -0400 blk-stat: make q->stats->lock irqsafe blk-iocost calls blk_stat_enable_accounting() while holding an irqsafe lock which triggers a lockdep splat because q->stats->lock isn't irqsafe. Let's make it irqsafe. Signed-off-by: Tejun Heo Fixes: cd006509b0a9 ("blk-iocost: account for IO size when testing latencies") Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Jens Axboe commit 5aeac7c4b16069aae49005f0a8d4526baa83341b Author: Tejun Heo Date: Tue Sep 1 14:52:31 2020 -0400 blk-iocost: ioc_pd_free() shouldn't assume irq disabled ioc_pd_free() grabs irq-safe ioc->lock without ensuring that irq is disabled when it can be called with irq disabled or enabled. This has a small chance of causing A-A deadlocks and triggers lockdep splats. Use irqsave operations instead. Signed-off-by: Tejun Heo Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Jens Axboe commit a609d0259183a841621f252e067f40f8cc25d6f6 Author: Kamil Lorenc Date: Tue Sep 1 10:57:38 2020 +0200 net: usb: dm9601: Add USB ID of Keenetic Plus DSL Keenetic Plus DSL is a xDSL modem that uses dm9620 as its USB interface. Signed-off-by: Kamil Lorenc Signed-off-by: David S. Miller commit ae6961de541d2307076d02fe9ae31f25c9f13611 Author: Yunsheng Lin Date: Tue Sep 1 10:39:09 2020 +0800 vhost: fix typo in error message "enable" should be "disable" when the function name is vhost_disable_notify(), which does the disabling work. Signed-off-by: Yunsheng Lin Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit b765a32a2e9170702467747e290614be072c4f76 Merge: b51594df17d0c 75d46c6d15efa Author: Linus Torvalds Date: Tue Sep 1 14:12:44 2020 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three minor fixes, all in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_debug: Remove superfluous close zone in resp_open_zone() scsi: libcxgbi: Fix a use after free in cxgbi_conn_xmit_pdu() scsi: qedf: Fix null ptr reference in qedf_stag_change_work commit e27fec66f0a94e35a35548bd0b29ae616e62ec62 Author: Mikulas Patocka Date: Mon Aug 31 09:25:41 2020 -0400 dm integrity: fix error reporting in bitmap mode after creation The dm-integrity target did not report errors in bitmap mode just after creation. The reason is that the function integrity_recalc didn't clean up ic->recalc_bitmap as it proceeded with recalculation. Fix this by updating the bitmap accordingly -- the double shift serves to rounddown. Signed-off-by: Mikulas Patocka Fixes: 468dfca38b1a ("dm integrity: add a bitmap mode") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Mike Snitzer commit 7785a9e4c228db6d01086a52d5685cd7336a08b7 Author: Damien Le Moal Date: Mon Aug 31 14:55:55 2020 +0900 dm crypt: Initialize crypto wait structures Use the DECLARE_CRYPTO_WAIT() macro to properly initialize the crypto wait structures declared on stack before their use with crypto_wait_req(). Fixes: 39d13a1ac41d ("dm crypt: reuse eboiv skcipher for IV generation") Fixes: bbb1658461ac ("dm crypt: Implement Elephant diffuser for Bitlocker compatibility") Cc: stable@vger.kernel.org Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit c322ee9320eaa4013ca3620b1130992916b19b31 Author: Mike Snitzer Date: Mon Aug 24 14:19:55 2020 -0400 dm mpath: fix racey management of PG initialization Commit 935fcc56abc3 ("dm mpath: only flush workqueue when needed") changed flush_multipath_work() to avoid needless workqueue flushing (of a multipath global workqueue). But that change didn't realize the surrounding flush_multipath_work() code should also only run if 'pg_init_in_progress' is set. Fix this by only doing all of flush_multipath_work()'s PG init related work if 'pg_init_in_progress' is set. Otherwise multipath_wait_for_pg_init_completion() will run unconditionally but the preceeding flush_workqueue(kmpath_handlerd) may not. This could lead to deadlock (though only if kmpath_handlerd never runs a corresponding work to decrement 'pg_init_in_progress'). It could also be, though highly unlikely, that the kmpath_handlerd work that does PG init completes before 'pg_init_in_progress' is set, and then an intervening DM table reload's multipath_postsuspend() triggers flush_multipath_work(). Fixes: 935fcc56abc3 ("dm mpath: only flush workqueue when needed") Cc: stable@vger.kernel.org Reported-by: Ben Marzinski Signed-off-by: Mike Snitzer commit f9e040efcc28309e5c592f7e79085a9a52e31f58 Author: Mikulas Patocka Date: Mon Aug 24 11:09:47 2020 -0400 dm writecache: handle DAX to partitions on persistent memory correctly The function dax_direct_access doesn't take partitions into account, it always maps pages from the beginning of the device. Therefore, persistent_memory_claim() must get the partition offset using get_start_sect() and add it to the page offsets passed to dax_direct_access(). Signed-off-by: Mikulas Patocka Fixes: 48debafe4f2f ("dm: add writecache target") Cc: stable@vger.kernel.org # 4.18+ Signed-off-by: Mike Snitzer commit cbedcb044e9cc4e14bbe6658111224bb923094f4 Author: Shung-Hsi Yu Date: Mon Aug 31 22:37:09 2020 +0800 net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init() On machines with much memory (> 2 TByte) and log_mtts_per_seg == 0, a max_order of 31 will be passed to mlx_buddy_init(), which results in s = BITS_TO_LONGS(1 << 31) becoming a negative value, leading to kvmalloc_array() failure when it is converted to size_t. mlx4_core 0000:b1:00.0: Failed to initialize memory region table, aborting mlx4_core: probe of 0000:b1:00.0 failed with error -12 Fix this issue by changing the left shifting operand from a signed literal to an unsigned one. Fixes: 225c7b1feef1 ("IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters") Signed-off-by: Shung-Hsi Yu Signed-off-by: David S. Miller commit eacc9c5a927e474c173a5d53dd7fb8e306511768 Author: Francisco Jerez Date: Mon Aug 31 20:02:50 2020 -0700 cpufreq: intel_pstate: Fix intel_pstate_get_hwp_max() for turbo disabled This fixes the behavior of the scaling_max_freq and scaling_min_freq sysfs files in systems which had turbo disabled by the BIOS. Caleb noticed that the HWP is programmed to operate in the wrong P-state range on his system when the CPUFREQ policy min/max frequency is set via sysfs. This seems to be because in his system intel_pstate_get_hwp_max() is returning the maximum turbo P-state even though turbo was disabled by the BIOS, which causes intel_pstate to scale kHz frequencies incorrectly e.g. setting the maximum turbo frequency whenever the maximum guaranteed frequency is requested via sysfs. Tested-by: Caleb Callaway Signed-off-by: Francisco Jerez Acked-by: Srinivas Pandruvada [ rjw: Minor subject edits ] Signed-off-by: Rafael J. Wysocki commit 55671ea3257ac596abd817c4031a996b2867e586 Author: Rafael J. Wysocki Date: Tue Sep 1 18:33:41 2020 +0200 cpufreq: intel_pstate: Free memory only when turning off When intel_pstate switches the operation mode from "active" to "passive" or the other way around, freeing its data structures representing CPUs and allocating them again from scratch is not necessary and wasteful. Moreover, if these data structures are preserved, the cached HWP Request MSR value from there may be written to the MSR to start with to reinitialize it and help to restore the EPP value set previously (it is set to 0xFF when CPUs go offline to allow their SMT siblings to use the full range of EPP values and that also happens when the driver gets unregistered). Accordingly, modify the driver to only do a full cleanup on driver object registration errors and when its status is changed to "off" via sysfs and to write the cached HWP Request MSR value back to the MSR on CPU init if the data structure representing the given CPU is still there. Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada commit 4adcf2e5829f83cbab581ba376abb7cb6404eeb3 Author: Rafael J. Wysocki Date: Tue Sep 1 18:33:21 2020 +0200 cpufreq: intel_pstate: Add ->offline and ->online callbacks Add ->offline and ->online driver callbacks to prepare for taking a CPU offline and to restore its working configuration when it goes back online, respectively, to avoid invoking the ->init callback on every CPU online which is quite a bit of unnecessary overhead. Define ->offline and ->online so that they can be used in the passive mode as well as in the active mode and because ->offline will do the majority of ->stop_cpu work, the passive mode does not need that callback any more, so drop it from there. Also modify the active mode ->suspend and ->resume callbacks to prevent them from interfering with the new ->offline and ->online ones in case the latter are invoked withing the system-wide suspend and resume code flow and make the passive mode use them too. Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada commit b388eb58ce47484a330681f09d1d058fe122c744 Author: Rafael J. Wysocki Date: Thu Aug 27 14:32:12 2020 +0200 cpufreq: intel_pstate: Tweak the EPP sysfs interface Modify the EPP sysfs interface to reject attempts to change the EPP to values different from 0 ("performance") in the active mode with the "performance" policy (ie. scaling_governor set to "performance"), to avoid situations in which the kernel appears to discard data passed to it via the EPP sysfs attribute. Signed-off-by: Rafael J. Wysocki Reviewed-by: Artem Bityutskiy Acked-by: Srinivas Pandruvada commit c27a0ccc3c715c55fea6709eab2f9c6f551fcfaa Author: Rafael J. Wysocki Date: Thu Aug 27 14:32:00 2020 +0200 cpufreq: intel_pstate: Update cached EPP in the active mode Make intel_pstate update the cached EPP value when setting the EPP via sysfs in the active mode just like it is the case in the passive mode, for consistency, but also for the benefit of subsequent changes. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada commit 43298db3009f06fe5c69e1ca8b6cfc2565772fa1 Author: Rafael J. Wysocki Date: Thu Aug 20 17:40:02 2020 +0200 cpufreq: intel_pstate: Refuse to turn off with HWP enabled After commit f6ebbcf08f37 ("cpufreq: intel_pstate: Implement passive mode with HWP enabled") it is possible to change the driver status to "off" via sysfs with HWP enabled, which effectively causes the driver to unregister itself, but HWP remains active and it forces the minimum performance, so even if another cpufreq driver is loaded, it will not be able to control the CPU frequency. For this reason, make the driver refuse to change the status to "off" with HWP enabled. Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada commit 26907eb605fbc3ba9dbf888f21d9d8d04471271d Author: Evgeniy Didin Date: Tue Jul 7 18:38:58 2020 +0300 ARC: [plat-hsdk]: Switch ethernet phy-mode to rgmii-id HSDK board has Micrel KSZ9031, recent commit bcf3440c6dd ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") caused a breakdown of Ethernet. Using 'phy-mode = "rgmii"' is not correct because accodring RGMII specification it is necessary to have delay on RX (PHY to MAX) which is not generated in case of "rgmii". Using "rgmii-id" adds necessary delay and solves the issue. Also adding name of PHY placed on HSDK board. Signed-off-by: Evgeniy Didin Cc: Eugeniy Paltsev Cc: Alexey Brodkin Signed-off-by: Vineet Gupta commit 355db39110100b968c8291a1a7d897f92e17a8df Author: Leesoo Ahn Date: Tue Sep 1 22:04:47 2020 +0900 pktgen: fix error message with wrong function name Error on calling kthread_create_on_node prints wrong function name, kernel_thread. Fixes: 94dcf29a11b3 ("kthread: use kthread_create_on_node()") Signed-off-by: Leesoo Ahn Acked-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 4af22ded0ecf23adea1b26ea264c53f9f1cfc310 Author: Mike Rapoport Date: Fri Aug 28 19:39:02 2020 +0300 arc: fix memory initialization for systems with two memory banks Rework of memory map initialization broke initialization of ARC systems with two memory banks. Before these changes, memblock was not aware of nodes configuration and the memory map was always allocated from the "lowmem" bank. After the addition of node information to memblock, the core mm attempts to allocate the memory map for the "highmem" bank from its node. The access to this memory using __va() fails because it can be only accessed using kmap. Anther problem that was uncovered is that {min,max}_high_pfn are calculated from u64 high_mem_start variable which prevents truncation to 32-bit physical address and the PFN values are above the node and zone boundaries. Use phys_addr_t type for high_mem_start and high_mem_size to ensure correspondence between PFNs and highmem zone boundaries and reserve the entire highmem bank until mem_init() to avoid accesses to it before highmem is enabled. To test this: 1. Enable HIGHMEM in ARC config 2. Enable 2 memory banks in haps_hs.dts (uncomment the 2nd bank) Fixes: 51930df5801e ("mm: free_area_init: allow defining max_zone_pfn in descending order") Cc: stable@vger.kernel.org [5.8] Signed-off-by: Mike Rapoport Signed-off-by: Vineet Gupta [vgupta: added instructions to test highmem] commit 763700f5e0fc8e66f4279848b150c5d12eb4d421 Merge: f75aef392f869 922ff0759a162 Author: Rafael J. Wysocki Date: Tue Sep 1 19:44:20 2020 +0200 Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework fixes for 5.9-rc4 from Viresh Kumar: "This fixes reference counting for OPP tables. Few patches are getting queued (for various subsystems) for 5.10 which depend on this to be fixed first." * 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Don't drop reference for an OPP table that was never parsed commit 5f7b81c18366c38446f6eedab570b98dbdc07cff Author: Randy Dunlap Date: Fri Aug 28 17:01:26 2020 -0700 ia64: fix min_low_pfn/max_low_pfn build errors Fix min_low_pfn/max_low_pfn build errors for arch/ia64/: (e.g.) ERROR: "max_low_pfn" [drivers/rpmsg/virtio_rpmsg_bus.ko] undefined! ERROR: "min_low_pfn" [drivers/rpmsg/virtio_rpmsg_bus.ko] undefined! ERROR: "min_low_pfn" [drivers/hwtracing/intel_th/intel_th_msu.ko] undefined! ERROR: "max_low_pfn" [drivers/hwtracing/intel_th/intel_th_msu.ko] undefined! ERROR: "min_low_pfn" [drivers/crypto/cavium/nitrox/n5pf.ko] undefined! ERROR: "max_low_pfn" [drivers/crypto/cavium/nitrox/n5pf.ko] undefined! ERROR: "max_low_pfn" [drivers/md/dm-integrity.ko] undefined! ERROR: "min_low_pfn" [drivers/md/dm-integrity.ko] undefined! ERROR: "max_low_pfn" [crypto/tcrypt.ko] undefined! ERROR: "min_low_pfn" [crypto/tcrypt.ko] undefined! ERROR: "min_low_pfn" [security/keys/encrypted-keys/encrypted-keys.ko] undefined! ERROR: "max_low_pfn" [security/keys/encrypted-keys/encrypted-keys.ko] undefined! ERROR: "min_low_pfn" [arch/ia64/kernel/mca_recovery.ko] undefined! ERROR: "max_low_pfn" [arch/ia64/kernel/mca_recovery.ko] undefined! David suggested just exporting min_low_pfn & max_low_pfn in mm/memblock.c: https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2006291911220.1118534@chino.kir.corp.google.com/ Reported-by: kernel test robot Signed-off-by: Randy Dunlap Acked-by: David Rientjes Acked-by: Tony Luck Cc: linux-mm@kvack.org Cc: Andrew Morton Cc: David Rientjes Cc: Mike Rapoport Cc: Tony Luck Cc: Fenghua Yu Cc: linux-ia64@vger.kernel.org Signed-off-by: Mike Rapoport commit 1eb832ac2dee8a350f3fcd5544886f07a3ef8869 Author: Toke Høiland-Jørgensen Date: Tue Sep 1 16:43:43 2020 +0200 tools/bpf: build: Make sure resolve_btfids cleans up after itself The new resolve_btfids tool did not clean up the feature detection folder on 'make clean', and also was not called properly from the clean rule in tools/make/ folder on its 'make clean'. This lead to stale objects being left around, which could cause feature detection to fail on subsequent builds. Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20200901144343.179552-1-toke@redhat.com commit 154549558a622b31702fcaa01ccd85e6e34073de Author: Cezary Rojewski Date: Tue Sep 1 17:30:41 2020 +0200 ASoC: Intel: haswell: Fix power transition refactor While addressing existing power-cycle limitations for sound/soc/intel/haswell solution, change brings regression for standard audio userspace flows e.g.: when using PulseAudio. Occasional sound-card initialization fail is still better than permanent audio distortions, so revert the change. Fixes: 8ec7d6043263 ("ASoC: Intel: haswell: Power transition refactor") Reported-by: Christian Bundy Signed-off-by: Cezary Rojewski Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200901153041.14771-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit c626c5fb7fe48729283e8e84dc55d0465b7c4924 Merge: f75aef392f869 69c6e18d0ce99 Author: Greg Kroah-Hartman Date: Tue Sep 1 17:30:19 2020 +0200 Merge tag 'misc-habanalabs-fixes-2020-08-31' of git://people.freedesktop.org/~gabbayo/linux into char-misc-nexxt Oded writes: This tag contains the two fixes: - prevent user buffer overflow through a debugfs entry - fix the report of the engines that create RAZWI error in GAUDI * tag 'misc-habanalabs-fixes-2020-08-31' of git://people.freedesktop.org/~gabbayo/linux: habanalabs: fix report of RAZWI initiator coordinates habanalabs: prevent user buff overflow commit 977f739b7126bf98b5202e243f60cbc0a1ec2c3b Author: Jiri Olsa Date: Thu Aug 27 15:48:29 2020 +0200 perf report: Disable ordered_events for raw dump Disable ordered_events for report raw dump, because for raw dump we want to see events as they are stored in the perf.data file, not sorted by time. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200827134830.126721-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 39c0a53b114d0317e5c4e76b631f41d133af5cb0 Author: Al Grant Date: Tue Sep 1 12:10:14 2020 -0300 perf tools: Correct SNOOPX field offset perf_event.h has macros that define the field offsets in the data_src bitmask in perf records. The SNOOPX and REMOTE offsets were both 37. These are distinct fields, and the bitfield layout in perf_mem_data_src confirms that SNOOPX should be at offset 38. Committer notes: This was extracted from a larger patch that also contained kernel changes. Fixes: 52839e653b5629bd ("perf tools: Add support for printing new mem_info encodings") Signed-off-by: Al Grant Reviewed-by: Andi Kleen Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/9974f2d0-bf7f-518e-d9f7-4520e5ff1bb0@foss.arm.com Signed-off-by: Arnaldo Carvalho de Melo commit a347306fbec5dcaf7c276777b11d530eab6a4526 Author: Al Grant Date: Wed Aug 19 16:47:51 2020 +0800 perf intel-pt: Fix corrupt data after perf inject from Commit 42bbabed09ce6208 ("perf tools: Add hw_idx in struct branch_stack") changed the format of branch stacks in perf samples. When samples use this new format, a flag must be set in the corresponding event. Synthesized branch stacks generated from Intel PT were using the new format, but not setting the event attribute, leading to consumers seeing corrupt data. This patch fixes the issue by setting the event attribute to indicate use of the new format. Fixes: 42bbabed09ce6208 ("perf tools: Add hw_idx in struct branch_stack") Signed-off-by: Al Grant Acked-by: Adrian Hunter Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20200819084751.17686-2-leo.yan@linaro.org Signed-off-by: Leo Yan Signed-off-by: Arnaldo Carvalho de Melo commit f5f8e7e55fbdb4fdddec73518e23c48083108fbb Author: Al Grant Date: Wed Aug 19 16:47:50 2020 +0800 perf cs-etm: Fix corrupt data after perf inject from Commit 42bbabed09ce6208 ("perf tools: Add hw_idx in struct branch_stack") changed the format of branch stacks in perf samples. When samples use this new format, a flag must be set in the corresponding event. Synthesized branch stacks generated from CoreSight ETM trace were using the new format, but not setting the event attribute, leading to consumers seeing corrupt data. This patch fixes the issue by setting the event attribute to indicate use of the new format. Fixes: 42bbabed09ce6208 ("perf tools: Add hw_idx in struct branch_stack") Signed-off-by: Al Grant Reviewed-by: Andrea Brunato Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Mathieu Poirier Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Leo Yan Link: http://lore.kernel.org/lkml/20200819084751.17686-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit d4ccbacb9c217fefb4332a9af81b785690cf1053 Author: Arnaldo Carvalho de Melo Date: Mon Aug 31 16:17:00 2020 -0300 perf top/report: Fix infinite loop in the TUI for grouped events For a while we need to have a dummy event for doing things like receiving PERF_RECORD_COMM, PERF_RECORD_EXEC, etc for threads being created and dying while we synthesize the pre-existing ones at tool start. This 'dummy' event is needed for keeping track of thread lifetime events early in the session but are uninteresting otherwise, i.e. no need to have it in a initial events menu for the non-grouped case, i.e. for: # perf top -e cycles,instructions or even for plain: # perf top When 'cycles' and that 'dummy' event are in place. The code to remove that 'dummy' event ended up creating an endless loop for the grouped case, i.e.: # perf top -e '{cycles,instructions}' Fix it. Fixes: bee9ca1c8a237ca1 ("perf report TUI: Remove needless 'dummy' event from menu") Cc: Adrian Hunter Cc: Ian Rogers Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 33321a06c70b44dd391b4cc01568a20d53fb3a6e Author: Ian Rogers Date: Tue Aug 25 21:29:10 2020 -0700 perf parse-events: Avoid an uninitialized read when using fake PMUs With a fake_pmu the pmu_info isn't populated by perf_pmu__check_alias. In this case, don't try to copy the uninitialized values to the evsel. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kajol Jain Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200826042910.1902374-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 313146a844182c4829acd5e1d60246367212088f Author: Thomas Richter Date: Tue Aug 25 08:33:04 2020 +0200 perf stat: Fix out of bounds array access in the print_counters() evlist method Fix a compile error on F32 and gcc version 10.1 on s390 in file utils/stat-display.c. The error does not show up with make DEBUG=y. In fact the issue shows up when using both compiler options -O6 and -D_FORTIFY_SOURCE=2 (which are omitted with DEBUG=Y). This is the offending call chain: print_counter_aggr() printout(config, -1, 0, ...) with 2nd parm id set to -1 aggr_printout(config, x, id --> -1, ...) which leads to this code: case AGGR_NONE: if (evsel->percore && !config->percore_show_thread) { .... } else { fprintf(config->output, "CPU%*d%s", config->csv_output ? 0 : -7, evsel__cpus(evsel)->map[id], ^^ id is -1 !!!! config->csv_sep); } This is a compiler inlining issue which is detected on s390 but not on other plattforms. Output before: # make util/stat-display.o ..... util/stat-display.c: In function ‘perf_evlist__print_counters’: util/stat-display.c:121:4: error: array subscript -1 is below array bounds of ‘int[]’ [-Werror=array-bounds] 121 | fprintf(config->output, "CPU%*d%s", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 122 | config->csv_output ? 0 : -7, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 123 | evsel__cpus(evsel)->map[id], | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 124 | config->csv_sep); | ~~~~~~~~~~~~~~~~ In file included from util/evsel.h:13, from util/evlist.h:13, from util/stat-display.c:9: /root/linux/tools/lib/perf/include/internal/cpumap.h:10:7: note: while referencing ‘map’ 10 | int map[]; | ^~~ cc1: all warnings being treated as errors mv: cannot stat 'util/.stat-display.o.tmp': No such file or directory make[3]: *** [/root/linux/tools/build/Makefile.build:97: util/stat-display.o] Error 1 make[2]: *** [Makefile.perf:716: util/stat-display.o] Error 2 make[1]: *** [Makefile.perf:231: sub-make] Error 2 make: *** [Makefile:110: util/stat-display.o] Error 2 [root@t35lp46 perf]# Output after: # make util/stat-display.o ..... CC util/stat-display.o [root@t35lp46 perf]# Committer notes: Removed the removal of {} enclosing the multiline else block, as pointed out by Jiri Olsa. Suggested-by: Jiri Olsa Signed-off-by: Thomas Richter Acked-by: Jiri Olsa Cc: Heiko Carstens Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: http://lore.kernel.org/lkml/20200825063304.77733-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 492d4d876c293e64266222ecec0573103dfc2625 Author: Thomas Richter Date: Tue Aug 25 09:12:11 2020 +0200 perf test: Set NULL sentinel in pmu_events table in "Parse and process metrics" test Linux 5.9 introduced perf test case "Parse and process metrics" and on s390 this test case always dumps core: [root@t35lp67 perf]# ./perf test -vvvv -F 67 67: Parse and process metrics : --- start --- metric expr inst_retired.any / cpu_clk_unhalted.thread for IPC parsing metric: inst_retired.any / cpu_clk_unhalted.thread Segmentation fault (core dumped) [root@t35lp67 perf]# I debugged this core dump and gdb shows this call chain: (gdb) where #0 0x000003ffabc3192a in __strnlen_c_1 () from /lib64/libc.so.6 #1 0x000003ffabc293de in strcasestr () from /lib64/libc.so.6 #2 0x0000000001102ba2 in match_metric(list=0x1e6ea20 "inst_retired.any", n=) at util/metricgroup.c:368 #3 find_metric (map=, map=, metric=0x1e6ea20 "inst_retired.any") at util/metricgroup.c:765 #4 __resolve_metric (ids=0x0, map=, metric_list=0x0, metric_no_group=, m=) at util/metricgroup.c:844 #5 resolve_metric (ids=0x0, map=0x0, metric_list=0x0, metric_no_group=) at util/metricgroup.c:881 #6 metricgroup__add_metric (metric=, metric_no_group=metric_no_group@entry=false, events=, events@entry=0x3ffd84fb878, metric_list=0x0, metric_list@entry=0x3ffd84fb868, map=0x0) at util/metricgroup.c:943 #7 0x00000000011034ae in metricgroup__add_metric_list (map=0x13f9828 , metric_list=0x3ffd84fb868, events=0x3ffd84fb878, metric_no_group=, list=) at util/metricgroup.c:988 #8 parse_groups (perf_evlist=perf_evlist@entry=0x1e70260, str=str@entry=0x12f34b2 "IPC", metric_no_group=, metric_no_merge=, fake_pmu=fake_pmu@entry=0x1462f18 , metric_events=0x3ffd84fba58, map=0x1) at util/metricgroup.c:1040 #9 0x0000000001103eb2 in metricgroup__parse_groups_test( evlist=evlist@entry=0x1e70260, map=map@entry=0x13f9828 , str=str@entry=0x12f34b2 "IPC", metric_no_group=metric_no_group@entry=false, metric_no_merge=metric_no_merge@entry=false, metric_events=0x3ffd84fba58) at util/metricgroup.c:1082 #10 0x00000000010c84d8 in __compute_metric (ratio2=0x0, name2=0x0, ratio1=, name1=0x12f34b2 "IPC", vals=0x3ffd84fbad8, name=0x12f34b2 "IPC") at tests/parse-metric.c:159 #11 compute_metric (ratio=, vals=0x3ffd84fbad8, name=0x12f34b2 "IPC") at tests/parse-metric.c:189 #12 test_ipc () at tests/parse-metric.c:208 ..... ..... omitted many more lines This test case was added with commit 218ca91df477 ("perf tests: Add parse metric test for frontend metric"). When I compile with make DEBUG=y it works fine and I do not get a core dump. It turned out that the above listed function call chain worked on a struct pmu_event array which requires a trailing element with zeroes which was missing. The marco map_for_each_event() loops over that array tests for members metric_expr/metric_name/metric_group being non-NULL. Adding this element fixes the issue. Output after: [root@t35lp46 perf]# ./perf test 67 67: Parse and process metrics : Ok [root@t35lp46 perf]# Committer notes: As Ian remarks, this is not s390 specific: This also shows up with address sanitizer on all architectures (perhaps change the patch title) and perhaps add a "Fixes: " tag. ================================================================= ==4718==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55c93b4d59e8 at pc 0x55c93a1541e2 bp 0x7ffd24327c60 sp 0x7ffd24327c58 READ of size 8 at 0x55c93b4d59e8 thread T0 #0 0x55c93a1541e1 in find_metric tools/perf/util/metricgroup.c:764:2 #1 0x55c93a153e6c in __resolve_metric tools/perf/util/metricgroup.c:844:9 #2 0x55c93a152f18 in resolve_metric tools/perf/util/metricgroup.c:881:9 #3 0x55c93a1528db in metricgroup__add_metric tools/perf/util/metricgroup.c:943:9 #4 0x55c93a151996 in metricgroup__add_metric_list tools/perf/util/metricgroup.c:988:9 #5 0x55c93a1511b9 in parse_groups tools/perf/util/metricgroup.c:1040:8 #6 0x55c93a1513e1 in metricgroup__parse_groups_test tools/perf/util/metricgroup.c:1082:9 #7 0x55c93a0108ae in __compute_metric tools/perf/tests/parse-metric.c:159:8 #8 0x55c93a010744 in compute_metric tools/perf/tests/parse-metric.c:189:9 #9 0x55c93a00f5ee in test_ipc tools/perf/tests/parse-metric.c:208:2 #10 0x55c93a00f1e8 in test__parse_metric tools/perf/tests/parse-metric.c:345:2 #11 0x55c939fd7202 in run_test tools/perf/tests/builtin-test.c:410:9 #12 0x55c939fd6736 in test_and_print tools/perf/tests/builtin-test.c:440:9 #13 0x55c939fd58c3 in __cmd_test tools/perf/tests/builtin-test.c:661:4 #14 0x55c939fd4e02 in cmd_test tools/perf/tests/builtin-test.c:807:9 #15 0x55c939e4763d in run_builtin tools/perf/perf.c:313:11 #16 0x55c939e46475 in handle_internal_command tools/perf/perf.c:365:8 #17 0x55c939e4737e in run_argv tools/perf/perf.c:409:2 #18 0x55c939e45f7e in main tools/perf/perf.c:539:3 0x55c93b4d59e8 is located 0 bytes to the right of global variable 'pme_test' defined in 'tools/perf/tests/parse-metric.c:17:25' (0x55c93b4d54a0) of size 1352 SUMMARY: AddressSanitizer: global-buffer-overflow tools/perf/util/metricgroup.c:764:2 in find_metric Shadow bytes around the buggy address: 0x0ab9a7692ae0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ab9a7692af0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ab9a7692b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ab9a7692b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ab9a7692b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0ab9a7692b30: 00 00 00 00 00 00 00 00 00 00 00 00 00[f9]f9 f9 0x0ab9a7692b40: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ab9a7692b50: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 0x0ab9a7692b60: f9 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00 0x0ab9a7692b70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0ab9a7692b80: f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 f9 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc I'm also adding the missing "Fixes" tag and setting just .name to NULL, as doing it that way is more compact (the compiler will zero out everything else) and the table iterators look for .name being NULL as the sentinel marking the end of the table. Fixes: 0a507af9c681ac2a ("perf tests: Add parse metric test for ipc metric") Signed-off-by: Thomas Richter Reviewed-by: Sumanth Korikkar Acked-by: Ian Rogers Cc: Heiko Carstens Cc: Jiri Olsa Cc: Namhyung Kim Cc: Sven Schnelle Cc: Vasily Gorbik Link: http://lore.kernel.org/lkml/20200825071211.16959-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 943b69ac1884d8e0260ee653e696456810d7c6e3 Author: Jin Yao Date: Fri Aug 14 09:21:20 2020 +0800 perf parse-events: Set exclude_guest=1 for user-space counting Currently if we run 'perf record -e cycles:u', exclude_guest=0. But it doesn't make sense in most cases that we request for user-space counting but we also get the guest report. Of course, we also need to consider 'perf kvm' usage case that authorized perf users on the host may only want to count guest user space events. For example, # perf kvm --guest record -e cycles:u When we have 'exclude_guest=1' for 'perf kvm' usage, we may get nothing from guest events. To keep perf semantics consistent and clear, this patch sets exclude_guest=1 for user-space counting but except for 'perf kvm' usage. Before: perf record -e cycles:u ./div perf evlist -v cycles:u: ..., exclude_kernel: 1, exclude_hv: 1, ... After: perf record -e cycles:u ./div perf evlist -v cycles:u: ..., exclude_kernel: 1, exclude_hv: 1, exclude_guest: 1, ... Before: perf kvm --guest record -e cycles:u -vvv perf_event_attr: size 120 { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|ID|CPU|PERIOD read_format ID disabled 1 inherit 1 exclude_kernel 1 exclude_hv 1 freq 1 sample_id_all 1 After: perf kvm --guest record -e cycles:u -vvv perf_event_attr: size 120 { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|ID|CPU|PERIOD read_format ID disabled 1 inherit 1 exclude_kernel 1 exclude_hv 1 freq 1 sample_id_all 1 For Before/After, exclude_guest are both 0 for perf kvm usage. perf test 6 6: Parse event definition strings : Ok Signed-off-by: Jin Yao Tested-by: Like Xu Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200814012120.16647-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a060c1f12b525ba828f871eff3127dabf8daa1e6 Author: Wei Li Date: Wed Aug 19 11:19:47 2020 +0800 perf record: Correct the help info of option "--no-bpf-event" The help info of option "--no-bpf-event" is wrongly described as "record bpf events", correct it. Committer testing: $ perf record -h bpf Usage: perf record [] [] or: perf record [] -- [] --clang-opt options passed to clang when compiling BPF scriptlets --clang-path clang binary to use for compiling BPF scriptlets --no-bpf-event do not record bpf events $ Fixes: 71184c6ab7e6 ("perf record: Replace option --bpf-event with --no-bpf-event") Signed-off-by: Wei Li Acked-by: Song Liu Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Hanjun Guo Cc: Jiri Olsa Cc: Li Bin Cc: Mark Rutland Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20200819031947.12115-1-liwei391@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 20befbb1080307e70c7893ef9840d32e3ef8ac45 Author: Chris Wilson Date: Thu Aug 20 22:25:01 2020 +0100 perf tools: Use %zd for size_t printf formats on 32-bit A couple of trivial fixes for using %zd for size_t in the code supporting the ZSTD compression library. Signed-off-by: Chris Wilson Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexey Budankov Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200820212501.24421-1-chris@chris-wilson.co.uk Signed-off-by: Arnaldo Carvalho de Melo commit 2569231d71dff82cfd6e82ab3871776f72ec53b6 Author: Camel Guo Date: Tue Sep 1 15:57:35 2020 +0200 ASoC: tlv320adcx140: Fix accessing uninitialized adcx140->dev In adcx140_i2c_probe, adcx140->dev is accessed before its initialization. This commit fixes this bug. Fixes: 689c7655b50c ("ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver family") Acked-by: Dan Murphy Signed-off-by: Camel Guo Link: https://lore.kernel.org/r/20200901135736.32036-1-camel.guo@axis.com Signed-off-by: Mark Brown commit 08fc1ab6d748ab1a690fd483f41e2938984ce353 Author: Christoph Hellwig Date: Tue Sep 1 11:59:41 2020 +0200 block: fix locking in bdev_del_partition We need to hold the whole device bd_mutex to protect against other thread concurrently deleting out partition before we get to it, and thus causing a use after free. Fixes: cddae808aeb7 ("block: pass a hd_struct to delete_partition") Reported-by: syzbot+6448f3c229bc52b82f69@syzkaller.appspotmail.com Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit cafe01ef8fcb248583038e1be071383530fe355a Author: Ming Lei Date: Tue Sep 1 18:07:38 2020 +0800 block: release disk reference in hd_struct_free_work Commit e8c7d14ac6c3 ("block: revert back to synchronous request_queue removal") stops to release request queue from wq context because that commit supposed all blk_put_queue() is called in context which is allowed to sleep. However, this assumption isn't true because we release disk's reference in partition's percpu_ref's ->release() which doesn't allow to sleep, because the ->release() is run via call_rcu(). Fixes this issue by moving put disk reference into hd_struct_free_work() Fixes: e8c7d14ac6c3 ("block: revert back to synchronous request_queue removal") Reported-by: Ilya Dryomov Signed-off-by: Ming Lei Tested-by: Ilya Dryomov Reviewed-by: Christoph Hellwig Cc: Luis Chamberlain Cc: Christoph Hellwig Cc: Bart Van Assche Signed-off-by: Jens Axboe commit a139ffa40f0c24b753838b8ef3dcf6ad10eb7854 Author: Angelo Compagnucci Date: Tue Sep 1 11:32:18 2020 +0200 iio: adc: mcp3422: fix locking on error path Reading from the chip should be unlocked on error path else the lock could never being released. Fixes: 07914c84ba30 ("iio: adc: Add driver for Microchip MCP3422/3/4 high resolution ADC") Fixes: 3f1093d83d71 ("iio: adc: mcp3422: fix locking scope") Acked-by: Jonathan Cameron Signed-off-by: Angelo Compagnucci Link: https://lore.kernel.org/r/20200901093218.1500845-1-angelo.compagnucci@gmail.com Signed-off-by: Greg Kroah-Hartman commit 98dfd5024a2e9e170b85c07078e2d89f20a5dfbd Author: Jiufei Xue Date: Tue Sep 1 13:35:02 2020 +0800 io_uring: fix removing the wrong file in __io_sqe_files_update() Index here is already the position of the file in fixed_file_table, we should not use io_file_from_index() again to get it. Otherwise, the wrong file which still in use may be released unexpectedly. Cc: stable@vger.kernel.org # v5.6 Fixes: 05f3fb3c5397 ("io_uring: avoid ring quiesce for fixed file set unregister and update") Signed-off-by: Jiufei Xue Signed-off-by: Jens Axboe commit de1b0ee490eafdf65fac9eef9925391a8369f2dc Author: Jens Axboe Date: Mon Aug 31 11:20:02 2020 -0600 block: ensure bdi->io_pages is always initialized If a driver leaves the limit settings as the defaults, then we don't initialize bdi->io_pages. This means that file systems may need to work around bdi->io_pages == 0, which is somewhat messy. Initialize the default value just like we do for ->ra_pages. Cc: stable@vger.kernel.org Fixes: 9491ae4aade6 ("mm: don't cap request size based on read-ahead setting") Reported-by: OGAWA Hirofumi Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 949a1ebe8cea7b342085cb6a4946b498306b9493 Author: Takashi Iwai Date: Tue Sep 1 15:18:02 2020 +0200 ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check The PCM OSS mulaw plugin has a check of the format of the counter part whether it's a linear format. The check is with snd_BUG_ON() that emits WARN_ON() when the debug config is set, and it confuses syzkaller as if it were a serious issue. Let's drop snd_BUG_ON() for avoiding that. While we're at it, correct the error code to a more suitable, EINVAL. Reported-by: syzbot+23b22dc2e0b81cbfcc95@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20200901131802.18157-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit fc1f178cdb31783ff37296ecae817a1045a1a513 Author: Michael Ellerman Date: Tue Sep 1 22:45:17 2020 +1000 selftests/powerpc: Skip PROT_SAO test in guests/LPARS In commit 9b725a90a8f1 ("powerpc/64s: Disallow PROT_SAO in LPARs by default") PROT_SAO was disabled in guests/LPARs by default. So skip the test if we are running in a guest to avoid a spurious failure. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200901124653.523182-1-mpe@ellerman.id.au commit 0a7416f94707c60b9f66b01c0a505b7e41375f3a Author: Dmitry Osipenko Date: Mon Aug 31 23:43:35 2020 +0300 regulator: core: Fix slab-out-of-bounds in regulator_unlock_recursive() The recent commit 7d8196641ee1 ("regulator: Remove pointer table overallocation") changed the size of coupled_rdevs and now KASAN is able to detect slab-out-of-bounds problem in regulator_unlock_recursive(), which is a legit problem caused by a typo in the code. The recursive unlock function uses n_coupled value of a parent regulator for unlocking supply regulator, while supply's n_coupled should be used. In practice problem may only affect platforms that use coupled regulators. Cc: stable@vger.kernel.org # 5.0+ Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200831204335.19489-1-digetx@gmail.com Signed-off-by: Mark Brown commit f5a2cda4f1db89776b64c4f0f2c2ac609527ac70 Author: Sylwester Nawrocki Date: Thu Aug 27 19:33:57 2020 +0200 ASoC: wm8994: Ensure the device is resumed in wm89xx_mic_detect functions When the wm8958_mic_detect, wm8994_mic_detect functions get called from the machine driver, e.g. from the card's late_probe() callback, the CODEC device may be PM runtime suspended and any regmap writes have no effect. Add PM runtime calls to these functions to ensure the device registers are updated as expected. This suppresses an error during boot "wm8994-codec: ASoC: error at snd_soc_component_update_bits on wm8994-codec" caused by the regmap access error due to the cache_only flag being set. Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200827173357.31891-2-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit 811c5494436789e7149487c06e0602b507ce274b Author: Sylwester Nawrocki Date: Thu Aug 27 19:33:56 2020 +0200 ASoC: wm8994: Skip setting of the WM8994_MICBIAS register for WM1811 The WM8994_MICBIAS register is not available in the WM1811 CODEC so skip initialization of that register for that device. This suppresses an error during boot: "wm8994-codec: ASoC: error at snd_soc_component_update_bits on wm8994-codec" Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200827173357.31891-1-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit a231995700c392c0807da95deea231b23fc51a3c Author: Tiezhu Yang Date: Thu Aug 27 16:03:08 2020 +0800 MIPS: perf: Fix wrong check condition of Loongson event IDs According to the user's manual chapter 8.2.1 of Loongson 3A2000 CPU [1] and 3A3000 CPU [2], we should take some event IDs such as 274, 358, 359 and 360 as valid in the check condition, otherwise they are recognized as "not supported", fix it. [1] http://www.loongson.cn/uploadfile/cpu/3A2000/Loongson3A2000_user2.pdf [2] http://www.loongson.cn/uploadfile/cpu/3A3000/Loongson3A3000_3B3000user2.pdf Fixes: e9dfbaaeef1c ("MIPS: perf: Add hardware perf events support for new Loongson-3") Signed-off-by: Tiezhu Yang Acked-by: Huang Pei Signed-off-by: Thomas Bogendoerfer commit 4e4bb894467cd2a08fc3116407b13e6bc23a7119 Author: Miguel Ojeda Date: Tue Sep 1 12:53:42 2020 +0200 clang-format: Update with the latest for_each macro list Re-run the shell fragment that generated the original list. Signed-off-by: Miguel Ojeda commit 35556bed836f8dc07ac55f69c8d17dce3e7f0e25 Author: Marc Zyngier Date: Tue Sep 1 10:52:33 2020 +0100 HID: core: Sanitize event code and type when mapping input When calling into hid_map_usage(), the passed event code is blindly stored as is, even if it doesn't fit in the associated bitmap. This event code can come from a variety of sources, including devices masquerading as input devices, only a bit more "programmable". Instead of taking the event code at face value, check that it actually fits the corresponding bitmap, and if it doesn't: - spit out a warning so that we know which device is acting up - NULLify the bitmap pointer so that we catch unexpected uses Code paths that can make use of untrusted inputs can now check that the mapping was indeed correct and bail out if not. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Benjamin Tissoires commit bce1305c0ece3dc549663605e567655dd701752c Author: Marc Zyngier Date: Sat Aug 29 12:26:01 2020 +0100 HID: core: Correctly handle ReportSize being zero It appears that a ReportSize value of zero is legal, even if a bit non-sensical. Most of the HID code seems to handle that gracefully, except when computing the total size in bytes. When fed as input to memset, this leads to some funky outcomes. Detect the corner case and correctly compute the size. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Benjamin Tissoires commit 6546d28f0ef2ea81f6668fa5477cb99cd5e97b59 Author: Randy Dunlap Date: Sun Aug 23 16:41:59 2020 -0700 Documentation: fix dma-buf.rst underline length warning /home/rdunlap/lnx/lnx-59-rc2/Documentation/driver-api/dma-buf.rst:182: WARNING: Title underline too short. Indefinite DMA Fences ~~~~~~~~~~~~~~~~~~~~ Fixes: 72b6ede73623 ("dma-buf.rst: Document why indefinite fences are a bad idea") Signed-off-by: Randy Dunlap Cc: Daniel Vetter Cc: Daniel Vetter Cc: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1b22d4c3-4ea5-c633-9e35-71ce65d8dbcc@infradead.org commit 45df80d7605c25055a85fbc5a8446c81c6c0ca24 Author: Vadym Kochan Date: Mon Aug 31 04:55:39 2020 +0300 misc: eeprom: at24: register nvmem only after eeprom is ready to use During nvmem_register() the nvmem core sends notifications when: - cell added - nvmem added and during these notifications some callback func may access the nvmem device, which will fail in case of at24 eeprom because regulator and pm are enabled after nvmem_register(). Fixes: cd5676db0574 ("misc: eeprom: at24: support pm_runtime control") Fixes: b20eb4c1f026 ("eeprom: at24: drop unnecessary label") Cc: stable@vger.kernel.org Signed-off-by: Vadym Kochan Signed-off-by: Bartosz Golaszewski commit 6b6c71e897e2bfa6acf8583daf80970cb0a9f87e Merge: f75aef392f869 813050e0a9b87 Author: Greg Kroah-Hartman Date: Tue Sep 1 09:48:28 2020 +0200 Merge tag 'thunderbolt-for-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fixes for v5.9-rc4 This includes two fixes, one that fixes a regression around reboot and other that uses a correct link rate when USB3 bandwidth is reclaimed when the link is not up. Both have been in linux-next with no reported issues. * tag 'thunderbolt-for-v5.9-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Use maximum USB3 link rate when reclaiming if link is not up thunderbolt: Disable ports that are not implemented commit b7429ea53d6c0936a0f10a5d64164f0aea440143 Author: Dinghao Liu Date: Mon Aug 31 17:06:43 2020 +0800 HID: elan: Fix memleak in elan_input_configured When input_mt_init_slots() fails, input should be freed to prevent memleak. When input_register_device() fails, we should call input_mt_destroy_slots() to free memory allocated by input_mt_init_slots(). Signed-off-by: Dinghao Liu Signed-off-by: Jiri Kosina commit bc534069374966e6df0862c2f039e17cb4c2133a Author: James Smart Date: Fri Aug 28 10:53:32 2020 -0700 scsi: lpfc: Update lpfc version to 12.8.0.4 Update lpfc version to 12.8.0.4 Link: https://lore.kernel.org/r/20200828175332.130300-5-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 441f6b5b097d74a8aa72ec0d8992ef820e2b3773 Author: James Smart Date: Fri Aug 28 10:53:31 2020 -0700 scsi: lpfc: Extend the RDF FPIN Registration descriptor for additional events Currently the driver registers for Link Integrity events only. This patch adds registration for the following FPIN types: - Delivery Notifications - Congestion Notification - Peer Congestion Notification Link: https://lore.kernel.org/r/20200828175332.130300-4-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 7b08e89f98cee9907895fabb64cf437bc505ce9a Author: James Smart Date: Fri Aug 28 10:53:30 2020 -0700 scsi: lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery The driver is unable to successfully login with remote device. During pt2pt login, the driver completes its FLOGI request with the remote device having WWN precedence. The remote device issues its own (delayed) FLOGI after accepting the driver's and, upon transmitting the FLOGI, immediately recognizes it has already processed the driver's FLOGI thus it transitions to sending a PLOGI before waiting for an ACC to its FLOGI. In the driver, the FLOGI is received and an ACC sent, followed by the PLOGI being received and an ACC sent. The issue is that the PLOGI reception occurs before the response from the adapter from the FLOGI ACC is received. Processing of the PLOGI sets state flags to perform the REG_RPI mailbox command and proceed with the rest of discovery on the port. The same completion routine used by both FLOGI and PLOGI is generic in nature. One of the things it does is clear flags, and those flags happen to drive the rest of discovery. So what happened was the PLOGI processing set the flags, the FLOGI ACC completion cleared them, thus when the PLOGI ACC completes it doesn't see the flags and stops. Fix by modifying the generic completion routine to not clear the rest of discovery flag (NLP_ACC_REGLOGIN) unless the completion is also associated with performing a mailbox command as part of its handling. For things such as FLOGI ACC, there isn't a subsequent action to perform with the adapter, thus there is no mailbox cmd ptr. PLOGI ACC though will perform REG_RPI upon completion, thus there is a mailbox cmd ptr. Link: https://lore.kernel.org/r/20200828175332.130300-3-james.smart@broadcom.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 7ac836ebcb1509845fe7d66314f469f8e709da93 Author: James Smart Date: Fri Aug 28 10:53:29 2020 -0700 scsi: lpfc: Fix setting IRQ affinity with an empty CPU mask Some systems are reporting the following log message during driver unload or system shutdown: ics_rtas_set_affinity: No online cpus in the mask A prior commit introduced the writing of an empty affinity mask in calls to irq_set_affinity_hint() when disabling interrupts or when there are no remaining online CPUs to service an eq interrupt. At least some ppc64 systems are checking whether affinity masks are empty or not. Do not call irq_set_affinity_hint() with an empty CPU mask. Fixes: dcaa21367938 ("scsi: lpfc: Change default IRQ model on AMD architectures") Link: https://lore.kernel.org/r/20200828175332.130300-2-james.smart@broadcom.com Cc: # v5.5+ Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 2a87d485c4cb4d1b34be6c278a1c6ce3e15c8b8a Author: René Rebe Date: Thu Aug 27 22:27:29 2020 +0200 scsi: qla2xxx: Fix regression on sparc64 Commit 98aee70d19a7 ("qla2xxx: Add endianizer to max_payload_size modifier.") in 2014 broke qla2xxx on sparc64, e.g. as in the Sun Blade 1000 / 2000. Unbreak by partial revert to fix endianness in nvram firmware default initialization. Also mark the second frame_payload_size in nvram_t __le16 to avoid new sparse warnings. Link: https://lore.kernel.org/r/20200827.222729.1875148247374704975.rene@exactcode.com Fixes: 98aee70d19a7 ("qla2xxx: Add endianizer to max_payload_size modifier.") Reviewed-by: Himanshu Madhani Reviewed-by: Bart Van Assche Acked-by: Arun Easi Signed-off-by: René Rebe Signed-off-by: Martin K. Petersen commit 5a5b80f98534416b3b253859897e2ba1dc241e70 Author: Javed Hasan Date: Tue Aug 25 02:39:40 2020 -0700 scsi: libfc: Fix for double free() Fix for '&fp->skb' double free. Link: https://lore.kernel.org/r/20200825093940.19612-1-jhasan@marvell.com Reported-by: Dan Carpenter Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit ea403fde7552bd61bad6ea45e3feb99db77cb31e Author: Dinghao Liu Date: Sun Aug 23 17:14:53 2020 +0800 scsi: pm8001: Fix memleak in pm8001_exec_internal_task_abort When pm8001_tag_alloc() fails, task should be freed just like it is done in the subsequent error paths. Link: https://lore.kernel.org/r/20200823091453.4782-1-dinghao.liu@zju.edu.cn Acked-by: Jack Wang Signed-off-by: Dinghao Liu Signed-off-by: Martin K. Petersen commit c2f89219f559502c9292d79f695bab9dcec532d1 Author: Grygorii Strashko Date: Sun Aug 30 20:34:32 2020 +0300 net: ethernet: ti: am65-cpsw: fix rmii 100Mbit link mode In RMII link mode it's required to set bit 15 IFCTL_A in MAC_SL MAC_CONTROL register to enable support for 100Mbit link speed. Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit b51594df17d0ce80b9f9f35394a1f42d7ac94472 Merge: 59815d6d1c773 92001bc0365a1 Author: Linus Torvalds Date: Mon Aug 31 12:46:00 2020 -0700 Merge tag 'docs-5.9-3' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of documentation fixes for 5.9" * tag 'docs-5.9-3' of git://git.lwn.net/linux: Documentation: laptops: thinkpad-acpi: fix underline length build warning Documentation: fix typo for abituguru documentation docs: Fix function name trailing double-()s devices.txt: fix typo of "ubd" as "udb" Documentation: add riscv entry in list of existing profiles MAINTAINERS: mention documentation maintainer entry profile Fpga: Documentation: Replace deprecated :c:func: Usage IIO: Documentation: Replace deprecated :c:func: Usage Documentation/locking/locktypes: fix local_locks documentation commit 6b6382a857d824c0866056d5736bbcb597a922ed Author: Potnuri Bharat Teja Date: Fri Aug 28 21:14:40 2020 +0530 cxgb4: fix thermal zone device registration When multiple adapters are present in the system, pci hot-removing second adapter leads to the following warning as both the adapters registered thermal zone device with same thermal zone name/type. Therefore, use unique thermal zone name during thermal zone device initialization. Also mark thermal zone dev NULL once unregistered. [ 414.370143] ------------[ cut here ]------------ [ 414.370944] sysfs group 'power' not found for kobject 'hwmon0' [ 414.371747] WARNING: CPU: 9 PID: 2661 at fs/sysfs/group.c:281 sysfs_remove_group+0x76/0x80 [ 414.382550] CPU: 9 PID: 2661 Comm: bash Not tainted 5.8.0-rc6+ #33 [ 414.383593] Hardware name: Supermicro X10SRA-F/X10SRA-F, BIOS 2.0a 06/23/2016 [ 414.384669] RIP: 0010:sysfs_remove_group+0x76/0x80 [ 414.385738] Code: 48 89 df 5b 5d 41 5c e9 d8 b5 ff ff 48 89 df e8 60 b0 ff ff eb cb 49 8b 14 24 48 8b 75 00 48 c7 c7 90 ae 13 bb e8 6a 27 d0 ff <0f> 0b 5b 5d 41 5c c3 0f 1f 00 0f 1f 44 00 00 48 85 f6 74 31 41 54 [ 414.388404] RSP: 0018:ffffa22bc080fcb0 EFLAGS: 00010286 [ 414.389638] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 414.390829] RDX: 0000000000000001 RSI: ffff8ee2de3e9510 RDI: ffff8ee2de3e9510 [ 414.392064] RBP: ffffffffbaef2ee0 R08: 0000000000000000 R09: 0000000000000000 [ 414.393224] R10: 0000000000000000 R11: 000000002b30006c R12: ffff8ee260720008 [ 414.394388] R13: ffff8ee25e0a40e8 R14: ffffa22bc080ff08 R15: ffff8ee2c3be5020 [ 414.395661] FS: 00007fd2a7171740(0000) GS:ffff8ee2de200000(0000) knlGS:0000000000000000 [ 414.396825] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 414.398011] CR2: 00007f178ffe5020 CR3: 000000084c5cc003 CR4: 00000000003606e0 [ 414.399172] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 414.400352] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 414.401473] Call Trace: [ 414.402685] device_del+0x89/0x400 [ 414.403819] device_unregister+0x16/0x60 [ 414.405024] hwmon_device_unregister+0x44/0xa0 [ 414.406112] thermal_remove_hwmon_sysfs+0x196/0x200 [ 414.407256] thermal_zone_device_unregister+0x1b5/0x1f0 [ 414.408415] cxgb4_thermal_remove+0x3c/0x4f [cxgb4] [ 414.409668] remove_one+0x212/0x290 [cxgb4] [ 414.410875] pci_device_remove+0x36/0xb0 [ 414.412004] device_release_driver_internal+0xe2/0x1c0 [ 414.413276] pci_stop_bus_device+0x64/0x90 [ 414.414433] pci_stop_and_remove_bus_device_locked+0x16/0x30 [ 414.415609] remove_store+0x75/0x90 [ 414.416790] kernfs_fop_write+0x114/0x1b0 [ 414.417930] vfs_write+0xcf/0x210 [ 414.419059] ksys_write+0xa7/0xe0 [ 414.420120] do_syscall_64+0x4c/0xa0 [ 414.421278] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 414.422335] RIP: 0033:0x7fd2a686afd0 [ 414.423396] Code: Bad RIP value. [ 414.424549] RSP: 002b:00007fffc1446148 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 414.425638] RAX: ffffffffffffffda RBX: 0000000000000002 RCX: 00007fd2a686afd0 [ 414.426830] RDX: 0000000000000002 RSI: 00007fd2a7196000 RDI: 0000000000000001 [ 414.427927] RBP: 00007fd2a7196000 R08: 000000000000000a R09: 00007fd2a7171740 [ 414.428923] R10: 00007fd2a7171740 R11: 0000000000000246 R12: 00007fd2a6b43400 [ 414.430082] R13: 0000000000000002 R14: 0000000000000001 R15: 0000000000000000 [ 414.431027] irq event stamp: 76300 [ 414.435678] ---[ end trace 13865acb4d5ab00f ]--- Fixes: b18719157762 ("cxgb4: Add thermal zone support") Signed-off-by: Potnuri Bharat Teja Signed-off-by: David S. Miller commit 1a545ebe380bf4c1433e3c136e35a77764fda5ad Author: Xie He Date: Fri Aug 28 00:07:52 2020 -0700 drivers/net/wan/hdlc_cisco: Add hard_header_len This driver didn't set hard_header_len. This patch sets hard_header_len for it according to its header_ops->create function. This driver's header_ops->create function (cisco_hard_header) creates a header of (struct hdlc_header), so hard_header_len should be set to sizeof(struct hdlc_header). Cc: Martin Schiller Signed-off-by: Xie He Acked-by: Krzysztof Halasa Signed-off-by: David S. Miller commit 9dda51101a77abb05ae49612164523bb91bf92f0 Author: Shannon Nelson Date: Thu Aug 27 16:44:22 2020 -0700 ionic: fix txrx work accounting Take the tx accounting out of the work_done calculation to prevent a possible duplicate napi_schedule call when under high Tx stress but low Rx traffic. Fixes: b14e4e95f9ec ("ionic: tx separate servicing") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 59815d6d1c773f3609ef9da50881a47e9cba9c25 Merge: f75aef392f869 8048822bac019 Author: Linus Torvalds Date: Mon Aug 31 11:22:57 2020 -0700 Merge tag 'mmc-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: - Fix HS400 tuning for ACPI ID AMDI0040 - Fix reset of CQHCI for Intel GLK-based controllers - Use correct timeout clock for Tegra186/194/210 - Fix eMMC mounting on mt7622/Bpi-64 * tag 'mmc-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: sdhci: tegra: Add missing TMCLK for data timeout arm64: tegra: Add missing timeout clock to Tegra194 SDMMC nodes arm64: tegra: Add missing timeout clock to Tegra186 SDMMC nodes arm64: tegra: Add missing timeout clock to Tegra210 SDMMC dt-bindings: mmc: tegra: Add tmclk for Tegra210 and later sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra186 sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra210 arm64: dts: mt7622: add reset node for mmc device dt-bindings: mmc: Add missing description for clk_in/out_sd1 mmc: mediatek: add optional module reset property mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings mmc: sdhci-pci: Fix SDHCI_RESET_ALL for CQHCI for Intel GLK-based controllers mmc: sdhci-acpi: Fix HS400 tuning for AMDI0040 commit e9d572d94e1bb1336ab2045da9563edc921ba437 Merge: bb8872a1e6bc9 c46172147ebbe Author: David S. Miller Date: Mon Aug 31 11:22:30 2020 -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 net: 1) Do not delete clash entries on reply, let them expire instead, from Florian Westphal. 2) Do not report EAGAIN to nfnetlink, otherwise this enters a busy loop. Update nfnetlink_unicast() to translate EAGAIN to ENOBUFS. 3) Remove repeated words in code comments, from Randy Dunlap. 4) Several patches for the flowtable selftests, from Fabian Frederick. ==================== Signed-off-by: David S. Miller commit 08134e79e0ab138db211287ef3a705b09ba45f50 Author: Randy Dunlap Date: Fri Aug 28 17:01:10 2020 -0700 microblaze: fix min_low_pfn/max_low_pfn build errors Fix min_low_pfn/max_low_pfn build errors for arch/microblaze/: (e.g.) ERROR: "min_low_pfn" [drivers/rpmsg/virtio_rpmsg_bus.ko] undefined! ERROR: "min_low_pfn" [drivers/hwtracing/intel_th/intel_th_msu_sink.ko] undefined! ERROR: "min_low_pfn" [drivers/hwtracing/intel_th/intel_th_msu.ko] undefined! ERROR: "min_low_pfn" [drivers/mmc/core/mmc_core.ko] undefined! ERROR: "min_low_pfn" [drivers/md/dm-crypt.ko] undefined! ERROR: "min_low_pfn" [drivers/net/wireless/ath/ath6kl/ath6kl_sdio.ko] undefined! ERROR: "min_low_pfn" [crypto/tcrypt.ko] undefined! ERROR: "min_low_pfn" [crypto/asymmetric_keys/asym_tpm.ko] undefined! Mike had/has an alternate patch for Microblaze: https://lore.kernel.org/lkml/20200630111519.GA1951986@linux.ibm.com/ David suggested just exporting min_low_pfn & max_low_pfn in mm/memblock.c: https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2006291911220.1118534@chino.kir.corp.google.com/ Reported-by: kernel test robot Signed-off-by: Randy Dunlap Acked-by: Michal Simek Acked-by: David Rientjes Cc: linux-mm@kvack.org Cc: Andrew Morton Cc: David Rientjes Cc: Mike Rapoport Cc: Michal Simek Cc: Michal Simek Signed-off-by: Mike Rapoport commit 5fcface659aab7eac4bd65dd116d98b8f7bb88d5 Author: Taiping Lai Date: Mon Aug 31 17:09:47 2020 +0800 gpio: sprd: Clear interrupt when setting the type as edge The raw interrupt status of GPIO maybe set before the interrupt is enabled, which would trigger the interrupt event once enabled it from user side. This is the case for edge interrupts only. Adding a clear operation when setting interrupt type can avoid that. There're a few considerations for the solution: 1) This issue is for edge interrupt only; The interrupts requested by users are IRQ_TYPE_LEVEL_HIGH as default, so clearing interrupt when request is useless. 2) The interrupt type can be set to edge when request and following up with clearing it though, but the problem is still there once users set the interrupt type to level trggier. 3) We can add a clear operation after each time of setting interrupt enable bit, but it is redundant for level trigger interrupt. Therefore, the solution is this patch seems the best for now. Fixes: 9a3821c2bb47 ("gpio: Add GPIO driver for Spreadtrum SC9860 platform") Signed-off-by: Taiping Lai Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang Signed-off-by: Bartosz Golaszewski commit 3168c158ad3535af1cd7423c9f8cd5ac549f2f9c Author: Tony Ambardar Date: Sun Aug 30 17:03:04 2020 -0700 libbpf: Fix build failure from uninitialized variable warning While compiling libbpf, some GCC versions (at least 8.4.0) have difficulty determining control flow and a emit warning for potentially uninitialized usage of 'map', which results in a build error if using "-Werror": In file included from libbpf.c:56: libbpf.c: In function '__bpf_object__open': libbpf_internal.h:59:2: warning: 'map' may be used uninitialized in this function [-Wmaybe-uninitialized] libbpf_print(level, "libbpf: " fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~~ libbpf.c:5032:18: note: 'map' was declared here struct bpf_map *map, *targ_map; ^~~ The warning/error is false based on code inspection, so silence it with a NULL initialization. Fixes: 646f02ffdd49 ("libbpf: Add BTF-defined map-in-map support") Reference: 063e68813391 ("libbpf: Fix false uninitialized variable warning") Signed-off-by: Tony Ambardar Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200831000304.1696435-1-Tony.Ambardar@gmail.com commit fd90e3808fd2c207560270c39b86b71af2231aa1 Author: Ondrej Jirman Date: Fri Aug 28 14:50:32 2020 +0200 drm/sun4i: Fix dsi dcs long write function It's writing too much data. regmap_bulk_write expects number of register sized chunks to write, not a byte sized length of the bounce buffer. Bounce buffer needs to be padded too, so that regmap_bulk_write will not read past the end of the buffer. Fixes: 133add5b5ad4 ("drm/sun4i: Add Allwinner A31 MIPI-DSI controller support") Signed-off-by: Ondrej Jirman Signed-off-by: Maxime Ripard Reviewed-by: Jernej Skrabec Link: https://patchwork.freedesktop.org/patch/msgid/20200828125032.937148-1-megous@megous.com commit 69c6e18d0ce9980c8c6708f1fdb4ba843f8df172 Author: Ofir Bitton Date: Wed Aug 26 17:34:26 2020 +0300 habanalabs: fix report of RAZWI initiator coordinates All initiator coordinates received upon an 'MMU page fault RAZWI event' should be the routers coordinates, the only exception is the DMA initiators for which the reported coordinates correspond to their actual location. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6396feabf7a4104a4ddfecc00b8aac535c631a66 Author: Moti Haimovski Date: Wed Aug 19 17:40:33 2020 +0300 habanalabs: prevent user buff overflow This commit fixes a potential debugfs issue that may occur when reading the clock gating mask into the user buffer since the user buffer size was not taken into consideration. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 91a9d50219f6338d874650b4f035f32844be829e Author: Nathan Chancellor Date: Tue Aug 25 16:14:38 2020 -0700 Documentation/llvm: Improve formatting of commands, variables, and arguments While reviewing a separate patch, I noticed that the formatting of the commands, variables, and arguments was not in a monospaced font like the rest of the Kbuild documentation (see kbuild/kconfig.rst for an example). This is due to a lack of "::" before indented command blocks and single backticks instead of double backticks for inline formatting. Add those so that the document looks nicer in an HTML format, while not ruining the look in plain text. As a result of this, we can remove the escaped backslashes in the last code block and move them to single backslashes. Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit c96711e138444d37d6d8b3f0fa7f09e4917cd326 Merge: 1dffeb8b8b4c2 3f1093d83d716 Author: Greg Kroah-Hartman Date: Mon Aug 31 12:24:44 2020 +0200 Merge tag 'iio-fixes-for-5.9a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First set of IIO fixes for the 5.9 cycle Most of the fixes this time are for a long term issue that Lars-Peter Clausen identified recently. IIO assumes that any data pushed to the buffer interface (either kfifo or another in kernel consumer) are naturally aligned. Unfortunately this isn't true in a number of drivers, mostly by failing to ensure the buffer used is aligned suitably for an s64 timestamp. For the ones covered this time we use a structure to enforce this alignment, with the added need for __aligned(8) to ensure 8 byte alignment of the timestamp on x86_32 and similar platforms where it would be 4 byte aligned giving different padded from some other architectures. Patches to make this requirement clearer and potentially cause an error print will follow once we've cleaned up existing cases. Note that it is a very hard to hit problem and as a result of this as we only have one bug report despite the problem being present for many years. Other fixes: * cros_ec: - set gyroscope default frequency. For some older boards not having this set can lead to a choice that doesn't work. * counter,microchip-tcb-capture: - Fix a wrong value check in error check. * mcp3422 - Fix locking to protect against race condition. * meson-adc - Use right device when looking up fuse values for calibration. * rockchip-adc - Fix missing Kconfig dependency. * ti-ads1015: - Fix reading when CONFIG_PM not set. * tag 'iio-fixes-for-5.9a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: mcp3422: fix locking scope iio: adc: meson-saradc: Use the parent device to look up the calib data iio:adc:max1118 Fix alignment of timestamp and data leak issues iio:adc:ina2xx Fix timestamp alignment issue. iio:adc:ti-adc084s021 Fix alignment and data leak issues. iio:adc:ti-adc081c Fix alignment and data leak issues iio:magnetometer:ak8975 Fix alignment and data leak issues. iio:light:ltr501 Fix timestamp alignment issue. iio:light:max44000 Fix timestamp alignment and prevent data leak. iio:chemical:ccs811: Fix timestamp alignment and prevent data leak. iio:proximity:mb1232: Fix timestamp alignment and prevent data leak. iio:accel:mma7455: Fix timestamp alignment and prevent data leak. iio:accel:bmc150-accel: Fix timestamp alignment and prevent data leak. iio:accel:mma8452: Fix timestamp alignment and prevent data leak. iio: accel: kxsd9: Fix alignment of local buffer. iio: adc: rockchip_saradc: select IIO_TRIGGERED_BUFFER iio: adc: ti-ads1015: fix conversion when CONFIG_PM is not set counter: microchip-tcb-capture: check the correct variable iio: cros_ec: Set Gyroscope default frequency to 25Hz commit d3a84a8d0dde4e26bc084b36ffcbdc5932ac85e2 Author: Max Staudt Date: Thu Aug 27 17:49:00 2020 +0200 affs: fix basic permission bits to actually work The basic permission bits (protection bits in AmigaOS) have been broken in Linux' AFFS - it would only set bits, but never delete them. Also, contrary to the documentation, the Archived bit was not handled. Let's fix this for good, and set the bits such that Linux and classic AmigaOS can coexist in the most peaceful manner. Also, update the documentation to represent the current state of things. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Max Staudt Signed-off-by: David Sterba commit 3f1093d83d7164e4705e4232ccf76da54adfda85 Author: Angelo Compagnucci Date: Wed Aug 19 09:55:25 2020 +0200 iio: adc: mcp3422: fix locking scope Locking should be held for the entire reading sequence involving setting the channel, waiting for the channel switch and reading from the channel. If not, reading from a channel can result mixing with the reading from another channel. Fixes: 07914c84ba30 ("iio: adc: Add driver for Microchip MCP3422/3/4 high resolution ADC") Signed-off-by: Angelo Compagnucci Link: https://lore.kernel.org/r/20200819075525.1395248-1-angelo.compagnucci@gmail.com Cc: Signed-off-by: Jonathan Cameron commit d53bfdf2f0b2ec2d4bcebc4f1a1257d05f78dc51 Author: Martin Blumenstingl Date: Sat Aug 15 20:13:55 2020 +0200 iio: adc: meson-saradc: Use the parent device to look up the calib data On the older-gen 32-bit SoCs the meson-saradc driver is used to read the SoC temperature. This requires reading calibration data from the eFuse. Looking up the calibration data nvmem-cell requires the OF device_node pointer to be available in the struct device which is passed to devm_nvmem_cell_get(). This however got lost with commit 8cb631ccbb1952 ("iio: Remove superfluous of_node assignments") from indio_dev->dev. As devm_nvmem_cell_get() is called in the initialization phase the device_node is not yet available because the NVMEM cell is looked up before iio_device_register() is called (which would then set the device_node automatically). Use the parent device to look up the NVMEM cell instead to fix this issue. Fixes: 8cb631ccbb1952 ("iio: Remove superfluous of_node assignments") Signed-off-by: Martin Blumenstingl Signed-off-by: Jonathan Cameron commit db8f06d97ec284dc018e2e4890d2e5035fde8630 Author: Jonathan Cameron Date: Wed Jul 22 16:51:03 2020 +0100 iio:adc:max1118 Fix alignment of timestamp and data leak issues One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() data. This data is allocated with kzalloc so no data can leak apart from previous readings. The explicit alignment of ts is necessary to ensure correct padding on architectures where s64 is only 4 bytes aligned such as x86_32. Fixes: a9e9c7153e96 ("iio: adc: add max1117/max1118/max1119 ADC driver") Reported-by: Lars-Peter Clausen Cc: Akinobu Mita Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: commit f8cd222feb82ecd82dcf610fcc15186f55f9c2b5 Author: Jonathan Cameron Date: Wed Jul 22 16:51:02 2020 +0100 iio:adc:ina2xx Fix timestamp alignment issue. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses a 32 byte array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() data with alignment explicitly requested. This data is allocated with kzalloc so no data can leak apart from previous readings. The explicit alignment isn't technically needed here, but it reduced fragility and avoids cut and paste into drivers where it will be needed. If we want this in older stables will need manual backport due to driver reworks. Fixes: c43a102e67db ("iio: ina2xx: add support for TI INA2xx Power Monitors") Reported-by: Lars-Peter Clausen Cc: Stefan Brüns Cc: Marc Titinger Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: commit a661b571e3682705cb402a5cd1e970586a3ec00f Author: Jonathan Cameron Date: Wed Jul 22 16:50:57 2020 +0100 iio:adc:ti-adc084s021 Fix alignment and data leak issues. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv(). This data is allocated with kzalloc so no data can leak apart from previous readings. The force alignment of ts is not strictly necessary in this case but reduces the fragility of the code. Fixes: 3691e5a69449 ("iio: adc: add driver for the ti-adc084s021 chip") Reported-by: Lars-Peter Clausen Cc: Mårten Lindahl Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: commit 54f82df2ba86e2a8e9cbf4036d192366e3905c89 Author: Jonathan Cameron Date: Wed Jul 22 16:50:56 2020 +0100 iio:adc:ti-adc081c Fix alignment and data leak issues One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv(). This data is allocated with kzalloc so no data can leak apart from previous readings. The eplicit alignment of ts is necessary to ensure correct padding on x86_32 where s64 is only aligned to 4 bytes. Fixes: 08e05d1fce5c ("ti-adc081c: Initial triggered buffer support") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: commit 922ff0759a16299e24cacfc981ac07914d8f1826 Author: Viresh Kumar Date: Mon Aug 31 13:03:06 2020 +0530 opp: Don't drop reference for an OPP table that was never parsed dev_pm_opp_remove_table() should drop a reference to the OPP table only if the DT OPP table was parsed earlier with a call to dev_pm_opp_of_add_table() earlier. Else it may end up dropping the reference to the OPP table, which was added as a result of other calls like dev_pm_opp_set_clkname(). And would hence result in undesirable behavior later on when caller would try to free the resource again. Fixes: 03758d60265c ("opp: Replace list_kref with a local counter") Reported-by: Naresh Kamboju Reported-by: Anders Roxell Tested-by: Naresh Kamboju Signed-off-by: Viresh Kumar commit ad7a7acaedcf45071c822b6c983f9c1e084041c9 Author: Roger Quadros Date: Mon Aug 24 10:51:26 2020 +0300 phy: omap-usb2-phy: disable PHY charger detect AM654x PG1.0 has a silicon bug that D+ is pulled high after POR, which could cause enumeration failure with some USB hubs. Disabling the USB2_PHY Charger Detect function will put D+ into the normal state. This addresses Silicon Errata: i2075 - "USB2PHY: USB2PHY Charger Detect is Enabled by Default Without VBUS Presence" Signed-off-by: Roger Quadros Tested-by: Jan Kiszka Link: https://lore.kernel.org/r/20200824075127.14902-2-rogerq@ti.com Signed-off-by: Vinod Koul commit 724a419ea28f7514a391e80040230f69cf626707 Author: Nicholas Miell Date: Fri Aug 28 21:14:29 2020 -0700 HID: microsoft: Add rumble support for the 8bitdo SN30 Pro+ controller When operating in XInput mode, the 8bitdo SN30 Pro+ requires the same quirk as the official Xbox One Bluetooth controllers for rumble to function. Other controllers like the N30 Pro 2, SF30 Pro, SN30 Pro, etc. probably also need this quirk, but I do not have the hardware to test. Signed-off-by: Nicholas Miell Signed-off-by: Jiri Kosina commit 77df710ba633dfb6c65c65cf99ea9e084a1c9933 Author: Nirenjan Krishnan Date: Sun Aug 30 17:48:59 2020 -0700 HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for all Saitek X52 devices The Saitek X52 family of joysticks has a pair of axes that were originally (by the Windows driver) used as mouse pointer controls. The corresponding usage page is the Game Controls page, which is not recognized by the generic HID driver, and therefore, both axes get mapped to ABS_MISC. The quirk makes the second axis get mapped to ABS_MISC+1, and therefore made available separately. One Saitek X52 device is already fixed. This patch fixes the other two known devices with VID/PID 06a3:0255 and 06a3:0762. Signed-off-by: Nirenjan Krishnan Signed-off-by: Jiri Kosina commit 2bb70f0a4b238323e4e2f392fc3ddeb5b7208c9e Author: Bjørn Mork Date: Sat Aug 29 15:42:50 2020 +0200 USB: serial: option: support dynamic Quectel USB compositions The USB composition, defining the set of exported functions, is dynamic in newer Quectel modems. Default functions can be disabled and alternative functions can be enabled instead. The alternatives includes class functions using interface pairs, which should be handled by the respective class drivers. Active interfaces are numbered consecutively, so static blacklisting based on interface numbers will fail when the composition changes. An example of such an error, where the option driver has bound to the CDC ECM data interface, preventing cdc_ether from handling this function: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0125 Rev= 3.18 S: Manufacturer=Quectel S: Product=EC25-AF C:* #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=500mA A: FirstIf#= 4 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00 I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=(none) E: Ad=89(I) Atr=03(Int.) MxPS= 16 Ivl=32ms I:* If#= 5 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=option I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=option E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Another device with the same id gets correct drivers, since the interface of the network function happens to be blacklisted by option: T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 3 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2c7c ProdID=0125 Rev= 3.18 S: Manufacturer=Android S: Product=Android 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 E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=83(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=85(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=87(I) Atr=03(Int.) MxPS= 10 Ivl=32ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan E: Ad=89(I) Atr=03(Int.) MxPS= 8 Ivl=32ms E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms Change rules for EC21, EC25, BG96 and EG95 to match vendor specific serial functions only, to prevent binding to class functions. Require 2 endpoints on ff/ff/ff functions, avoiding the 3 endpoint QMI/RMNET network functions. Cc: AceLan Kao Cc: Sebastian Sjoholm Cc: Dan Williams Cc: stable@vger.kernel.org Signed-off-by: Bjørn Mork Signed-off-by: Johan Hovold commit 1ac698790819b83f39fd7ea4f6cdabee9bdd7b38 Author: Aleksander Morgado Date: Sat Aug 29 11:05:39 2020 +0200 USB: serial: option: add support for SIM7070/SIM7080/SIM7090 modules These modules have 2 different USB layouts: The default layout with PID 0x9205 (AT+CUSBSELNV=1) exposes 4 TTYs and an ECM interface: T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 6 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=1e0e ProdID=9205 Rev=00.00 S: Manufacturer=SimTech, Incorporated S: Product=SimTech SIM7080 S: SerialNumber=1234567890ABCDEF C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 Driver=cdc_ether I: If#=0x5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether The purpose of each TTY is as follows: * ttyUSB0: DIAG/QCDM port. * ttyUSB1: GNSS data. * ttyUSB2: AT-capable port (control). * ttyUSB3: AT-capable port (data). In the secondary layout with PID=0x9206 (AT+CUSBSELNV=86) the module exposes 6 TTY ports: T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 8 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=02(commc) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1e0e ProdID=9206 Rev=00.00 S: Manufacturer=SimTech, Incorporated S: Product=SimTech SIM7080 S: SerialNumber=1234567890ABCDEF C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option I: If#=0x5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option The purpose of each TTY is as follows: * ttyUSB0: DIAG/QCDM port. * ttyUSB1: GNSS data. * ttyUSB2: AT-capable port (control). * ttyUSB3: QFLOG interface. * ttyUSB4: DAM interface. * ttyUSB5: AT-capable port (data). Signed-off-by: Aleksander Morgado Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 1f2f98f2703e8134678fe20982886085631eda23 Author: Krzysztof Kozlowski Date: Sat Aug 29 13:12:48 2020 +0200 arm64: dts: imx8mq: Fix TMU interrupt property "interrupt" is not a valid property. Using proper name fixes dtbs_check warning: arch/arm64/boot/dts/freescale/imx8mq-zii-ultra-zest.dt.yaml: tmu@30260000: 'interrupts' is a required property Fixes: e464fd2ba4d4 ("arm64: dts: imx8mq: enable the multi sensor TMU") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit bb8872a1e6bc911869a729240781076ed950764b Author: Tuong Lien Date: Sun Aug 30 02:37:55 2020 +0700 tipc: fix using smp_processor_id() in preemptible The 'this_cpu_ptr()' is used to obtain the AEAD key' TFM on the current CPU for encryption, however the execution can be preemptible since it's actually user-space context, so the 'using smp_processor_id() in preemptible' has been observed. We fix the issue by using the 'get/put_cpu_ptr()' API which consists of a 'preempt_disable()' instead. Fixes: fc1b6d6de220 ("tipc: introduce TIPC encryption & authentication") Acked-by: Jon Maloy Signed-off-by: Tuong Lien Signed-off-by: David S. Miller commit f75aef392f869018f78cfedf3c320a6b3fcfda6b Author: Linus Torvalds Date: Sun Aug 30 16:01:54 2020 -0700 Linux 5.9-rc3 commit e43327c706f28d9e66fc4242af4aefdd69e8ff24 Merge: dcc5c6f013d84 c195d66a8a75c Author: Linus Torvalds Date: Sun Aug 30 15:53:44 2020 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fixes from Herbert Xu: - fix regression in af_alg that affects iwd - restore polling delay in qat - fix double free in ingenic on error path - fix potential build failure in sa2ul due to missing Kconfig dependency * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: af_alg - Work around empty control messages without MSG_MORE crypto: sa2ul - add Kconfig selects to fix build error crypto: ingenic - Drop kfree for memory allocated with devm_kzalloc crypto: qat - add delay before polling mailbox commit 3b5b005ef7d9e2ff1693c1d14a0f4459dcedb4e0 Author: Paul Cercueil Date: Thu Aug 27 13:44:04 2020 +0200 drm/ingenic: Fix driver not probing when IPU port is missing Even if support for the IPU was compiled in, we may run on a device (e.g. the Qi LB60) where the IPU is not available, or simply with an old devicetree without the IPU node. In that case the ingenic-drm refused to probe. Fix the driver so that it will probe even if the IPU node is not present in devicetree (but then IPU support is disabled of course). v2: Take a different approach Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU") Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200827114404.36748-2-paul@crapouillou.net commit 1a21e5b930e8454438ebb707f558b256e4b06ec7 Author: Paul Cercueil Date: Thu Aug 27 13:44:03 2020 +0200 drm/ingenic: Fix leak of device_node pointer of_graph_get_remote_node() requires of_node_put() to be called on the device_node pointer when it's no more in use. Fixes: fc1acf317b01 ("drm/ingenic: Add support for the IPU") Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200827114404.36748-1-paul@crapouillou.net commit dcc5c6f013d841e9ae74d527d312d512dfc2e2f0 Merge: d2283cdc18d33 784a0830377d0 Author: Linus Torvalds Date: Sun Aug 30 12:01:23 2020 -0700 Merge tag 'x86-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Thomas Gleixner: "Three interrupt related fixes for X86: - Move disabling of the local APIC after invoking fixup_irqs() to ensure that interrupts which are incoming are noted in the IRR and not ignored. - Unbreak affinity setting. The rework of the entry code reused the regular exception entry code for device interrupts. The vector number is pushed into the errorcode slot on the stack which is then lifted into an argument and set to -1 because that's regs->orig_ax which is used in quite some places to check whether the entry came from a syscall. But it was overlooked that orig_ax is used in the affinity cleanup code to validate whether the interrupt has arrived on the new target. It turned out that this vector check is pointless because interrupts are never moved from one vector to another on the same CPU. That check is a historical leftover from the time where x86 supported multi-CPU affinities, but not longer needed with the now strict single CPU affinity. Famous last words ... - Add a missing check for an empty cpumask into the matrix allocator. The affinity change added a warning to catch the case where an interrupt is moved on the same CPU to a different vector. This triggers because a condition with an empty cpumask returns an assignment from the allocator as the allocator uses for_each_cpu() without checking the cpumask for being empty. The historical inconsistent for_each_cpu() behaviour of ignoring the cpumask and unconditionally claiming that CPU0 is in the mask struck again. Sigh. plus a new entry into the MAINTAINER file for the HPE/UV platform" * tag 'x86-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/matrix: Deal with the sillyness of for_each_cpu() on UP x86/irq: Unbreak interrupt affinity setting x86/hotplug: Silence APIC only after all interrupts are migrated MAINTAINERS: Add entry for HPE Superdome Flex (UV) maintainers commit d2283cdc18d3378587f9d05be4fd1818059a757a Merge: 0063a82de9374 ceb2465c51195 Author: Linus Torvalds Date: Sun Aug 30 11:56:54 2020 -0700 Merge tag 'irq-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A set of fixes for interrupt chip drivers: - Revert the platform driver conversion of interrupt chip drivers as it turned out to create more problems than it solves. - Fix a trivial typo in the new module helpers which made probing reliably fail. - Small fixes in the STM32 and MIPS Ingenic drivers - The TI firmware rework which had badly managed dependencies and had to wait post rc1" * tag 'irq-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/ingenic: Leave parent IRQ unmasked on suspend irqchip/stm32-exti: Avoid losing interrupts due to clearing pending bits by mistake irqchip: Revert modular support for drivers using IRQCHIP_PLATFORM_DRIVER helperse irqchip: Fix probing deferal when using IRQCHIP_PLATFORM_DRIVER helpers arm64: dts: k3-am65: Update the RM resource types arm64: dts: k3-am65: ti-sci-inta/intr: Update to latest bindings arm64: dts: k3-j721e: ti-sci-inta/intr: Update to latest bindings irqchip/ti-sci-inta: Add support for INTA directly connecting to GIC irqchip/ti-sci-inta: Do not store TISCI device id in platform device id field dt-bindings: irqchip: Convert ti, sci-inta bindings to yaml dt-bindings: irqchip: ti, sci-inta: Update docs to support different parent. irqchip/ti-sci-intr: Add support for INTR being a parent to INTR dt-bindings: irqchip: Convert ti, sci-intr bindings to yaml dt-bindings: irqchip: ti, sci-intr: Update bindings to drop the usage of gic as parent firmware: ti_sci: Add support for getting resource with subtype firmware: ti_sci: Drop unused structure ti_sci_rm_type_map firmware: ti_sci: Drop the device id to resource type translation commit 0063a82de937433ccfffe123e12b4503b9155c96 Merge: b69bea8a657b6 c94a88f341c9b Author: Linus Torvalds Date: Sun Aug 30 11:50:53 2020 -0700 Merge tag 'sched-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Thomas Gleixner: "A single fix for the scheduler: - Make is_idle_task() __always_inline to prevent the compiler from putting it out of line into the wrong section because it's used inside noinstr sections" * tag 'sched-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched: Use __always_inline on is_idle_task() commit b69bea8a657b681442765b06be92a2607b1bd875 Merge: 3edd8db2d53fe eb1f00237aca2 Author: Linus Torvalds Date: Sun Aug 30 11:43:50 2020 -0700 Merge tag 'locking-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "A set of fixes for lockdep, tracing and RCU: - Prevent recursion by using raw_cpu_* operations - Fixup the interrupt state in the cpu idle code to be consistent - Push rcu_idle_enter/exit() invocations deeper into the idle path so that the lock operations are inside the RCU watching sections - Move trace_cpu_idle() into generic code so it's called before RCU goes idle. - Handle raw_local_irq* vs. local_irq* operations correctly - Move the tracepoints out from under the lockdep recursion handling which turned out to be fragile and inconsistent" * tag 'locking-urgent-2020-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep,trace: Expose tracepoints lockdep: Only trace IRQ edges mips: Implement arch_irqs_disabled() arm64: Implement arch_irqs_disabled() nds32: Implement arch_irqs_disabled() locking/lockdep: Cleanup x86/entry: Remove unused THUNKs cpuidle: Move trace_cpu_idle() into generic code cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic sched,idle,rcu: Push rcu_idle deeper into the idle path cpuidle: Fixup IRQ state lockdep: Use raw_cpu_*() for per-cpu variables commit 3edd8db2d53fe6c96ad66248bb1479ae62807268 Merge: 8bb5021cc2ee5 e183785f2529b Author: Linus Torvalds Date: Sun Aug 30 11:38:21 2020 -0700 Merge tag '5.9-rc2-smb-fix' of git://git.samba.org/sfrench/cifs-2.6 Pull cfis fix from Steve French: "DFS fix for referral problem when using SMB1" * tag '5.9-rc2-smb-fix' of git://git.samba.org/sfrench/cifs-2.6: cifs: fix check of tcon dfs in smb1 commit 8bb5021cc2ee5d5dd129a9f2f5ad2bb76eea297d Merge: 6f0306d1bfbc4 4a133eb351ccc Author: Linus Torvalds Date: Sun Aug 30 10:56:12 2020 -0700 Merge tag 'powerpc-5.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Revert our removal of PROT_SAO, at least one user expressed an interest in using it on Power9. Instead don't allow it to be used in guests unless enabled explicitly at compile time. - A fix for a crash introduced by a recent change to FP handling. - Revert a change to our idle code that left Power10 with no idle support. - One minor fix for the new scv system call path to set PPR. - Fix a crash in our "generic" PMU if branch stack events were enabled. - A fix for the IMC PMU, to correctly identify host kernel samples. - The ADB_PMU powermac code was found to be incompatible with VMAP_STACK, so make them incompatible in Kconfig until the code can be fixed. - A build fix in drivers/video/fbdev/controlfb.c, and a documentation fix. Thanks to Alexey Kardashevskiy, Athira Rajeev, Christophe Leroy, Giuseppe Sacco, Madhavan Srinivasan, Milton Miller, Nicholas Piggin, Pratik Rajesh Sampat, Randy Dunlap, Shawn Anastasio, Vaidyanathan Srinivasan. * tag 'powerpc-5.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/32s: Disable VMAP stack which CONFIG_ADB_PMU Revert "powerpc/powernv/idle: Replace CPU feature check with PVR check" powerpc/perf: Fix reading of MSR[HV/PR] bits in trace-imc powerpc/perf: Fix crashes with generic_compat_pmu & BHRB powerpc/64s: Fix crash in load_fp_state() due to fpexc_mode powerpc/64s: scv entry should set PPR Documentation/powerpc: fix malformed table in syscall64-abi video: fbdev: controlfb: Fix build for COMPILE_TEST=y && PPC_PMAC=n selftests/powerpc: Update PROT_SAO test to skip ISA 3.1 powerpc/64s: Disallow PROT_SAO in LPARs by default Revert "powerpc/64s: Remove PROT_SAO support" commit 6f0306d1bfbc4d3e3fcfb949ee2c4af21071920a Merge: 42df60fcdfb8c 20934c0de13b4 Author: Linus Torvalds Date: Sun Aug 30 10:51:03 2020 -0700 Merge tag 'usb-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Let's try this again... Here are some USB fixes for 5.9-rc3. This differs from the previous pull request for this release in that the usb gadget patch now does not break some systems, and actually does what it was intended to do. Many thanks to Marek Szyprowski for quickly noticing and testing the patch from Andy Shevchenko to resolve this issue. Additionally, some more new USB quirks have been added to get some new devices to work properly based on user reports. Other than that, the patches are all here, and they contain: - usb gadget driver fixes - xhci driver fixes - typec fixes - new quirks and ids - fixes for USB patches that went into 5.9-rc1. All of these have been tested in linux-next with no reported issues" * tag 'usb-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (33 commits) usb: storage: Add unusual_uas entry for Sony PSZ drives USB: Ignore UAS for JMicron JMS567 ATA/ATAPI Bridge usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe() USB: gadget: u_f: Unbreak offset calculation in VLAs USB: quirks: Ignore duplicate endpoint on Sound Devices MixPre-D usb: typec: tcpm: Fix Fix source hard reset response for TDA 2.3.1.1 and TDA 2.3.1.2 failures USB: PHY: JZ4770: Fix static checker warning. USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb() USB: gadget: u_f: add overflow checks to VLA macros xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed xhci: Do warm-reset when both CAS and XDEV_RESUME are set usb: host: xhci: fix ep context print mismatch in debugfs usb: uas: Add quirk for PNY Pro Elite tools: usb: move to tools buildsystem USB: Fix device driver race USB: Also match device drivers using the ->match vfunc usb: host: xhci-tegra: fix tegra_xusb_get_phy() usb: host: xhci-tegra: otg usb2/usb3 port init usb: hcd: Fix use after free in usb_hcd_pci_remove() usb: typec: ucsi: Hold con->lock for the entire duration of ucsi_register_port() ... commit 42df60fcdfb8c02fa1800899cb33858e46efd587 Merge: c4011283a7d5d b972fdba8665d Author: Linus Torvalds Date: Sun Aug 30 10:47:23 2020 -0700 Merge tag 'edac_urgent_for_v5.9_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fix from Borislav Petkov: "A fix to properly clear ghes_edac driver state on driver remove so that a subsequent load can probe the system properly (Shiju Jose)" * tag 'edac_urgent_for_v5.9_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/ghes: Fix NULL pointer dereference in ghes_edac_register() commit c4011283a7d5d64a50991dd3baa9acdf3d49092c Merge: 1127b219ce948 892fc9f6835ec Author: Linus Torvalds Date: Sun Aug 30 10:37:18 2020 -0700 Merge tag 'dma-mapping-5.9-2' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fix from Christoph Hellwig: "Fix a possibly uninitialized variable (Dan Carpenter)" * tag 'dma-mapping-5.9-2' of git://git.infradead.org/users/hch/dma-mapping: dma-pool: Fix an uninitialized variable bug in atomic_pool_expand() commit 784a0830377d0761834e385975bc46861fea9fa0 Author: Thomas Gleixner Date: Sun Aug 30 19:07:53 2020 +0200 genirq/matrix: Deal with the sillyness of for_each_cpu() on UP Most of the CPU mask operations behave the same way, but for_each_cpu() and it's variants ignore the cpumask argument and claim that CPU0 is always in the mask. This is historical, inconsistent and annoying behaviour. The matrix allocator uses for_each_cpu() and can be called on UP with an empty cpumask. The calling code does not expect that this succeeds but until commit e027fffff799 ("x86/irq: Unbreak interrupt affinity setting") this went unnoticed. That commit added a WARN_ON() to catch cases which move an interrupt from one vector to another on the same CPU. The warning triggers on UP. Add a check for the cpumask being empty to prevent this. Fixes: 2f75d9e1c905 ("genirq: Implement bitmap matrix allocator") Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org commit 1127b219ce9481c84edad9711626d856127d5e51 Merge: 0a4c56c80f907 c165a08d2b285 Author: Linus Torvalds Date: Sat Aug 29 14:21:58 2020 -0700 Merge tag 'fallthrough-fixes-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull fallthrough fixes from Gustavo A. R. Silva: "Fix some minor issues introduced by the recent treewide fallthrough conversions: - Fix identation issue - Fix erroneous fallthrough annotation - Remove unnecessary fallthrough annotation - Fix code comment changed by fallthrough conversion" * tag 'fallthrough-fixes-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: arm64/cpuinfo: Remove unnecessary fallthrough annotation media: dib0700: Fix identation issue in dib8096_set_param_override() afs: Remove erroneous fallthough annotation iio: dpot-dac: fix code comment in dpot_dac_read_raw() commit 0a4c56c80f90797e9b9f8426c6aae4c0cf1c9785 Author: Linus Torvalds Date: Sat Aug 29 13:50:56 2020 -0700 fsldma: fix very broken 32-bit ppc ioread64 functionality Commit ef91bb196b0d ("kernel.h: Silence sparse warning in lower_32_bits") caused new warnings to show in the fsldma driver, but that commit was not to blame: it only exposed some very incorrect code that tried to take the low 32 bits of an address. That made no sense for multiple reasons, the most notable one being that that code was intentionally limited to only 32-bit ppc builds, so "only low 32 bits of an address" was completely nonsensical. There were no high bits to mask off to begin with. But even more importantly fropm a correctness standpoint, turning the address into an integer then caused the subsequent address arithmetic to be completely wrong too, and the "+1" actually incremented the address by one, rather than by four. Which again was incorrect, since the code was reading two 32-bit values and trying to make a 64-bit end result of it all. Surprisingly, the iowrite64() did not suffer from the same odd and incorrect model. This code has never worked, but it's questionable whether anybody cared: of the two users that actually read the 64-bit value (by way of some C preprocessor hackery and eventually the 'get_cdar()' inline function), one of them explicitly ignored the value, and the other one might just happen to work despite the incorrect value being read. This patch at least makes it not fail the build any more, and makes the logic superficially sane. Whether it makes any difference to the code _working_ or not shall remain a mystery. Compile-tested-by: Guenter Roeck Reviewed-by: Guenter Roeck Signed-off-by: Linus Torvalds commit e77aee1326f7691763aa968eee2f57db37840b9d Merge: 1b46b921b0b92 0204081128d58 Author: Linus Torvalds Date: Sat Aug 29 13:13:44 2020 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "A core fix for ACPI matching and two driver bugfixes" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: iproc: Fix shifting 31 bits i2c: rcar: in slave mode, clear NACK earlier i2c: acpi: Remove dead code, i.e. i2c_acpi_match_device() i2c: core: Don't fail PRP0001 enumeration when no ID table exist commit 1b46b921b0b92bfc507d29a39f1b265c48ed45be Merge: c8b5563abe02c bffc2f7aa9634 Author: Linus Torvalds Date: Sat Aug 29 12:51:58 2020 -0700 Merge tag 's390-5.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Disable preemption trace in percpu macros since the lockdep code itself uses percpu variables now and it causes recursions. - Fix kernel space 4-level paging broken by recent vmem rework. * tag 's390-5.9-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/vmem: fix vmem_add_range for 4-level paging s390: don't trace preemption in percpu macros commit c8b5563abe02c5e9abdd6a74043c651a9ec31e9e Merge: e4cad138aa4f7 9d3004bf7ba32 Author: Linus Torvalds Date: Sat Aug 29 12:44:30 2020 -0700 Merge tag 'for-linus-5.9-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "Two fixes for Xen: one needed for ongoing work to support virtio with Xen, and one for a corner case in IRQ handling with Xen" * tag 'for-linus-5.9-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: arm/xen: Add misuse warning to virt_to_gfn xen/xenbus: Fix granting of vmalloc'd memory XEN uses irqdesc::irq_data_common::handler_data to store a per interrupt XEN data pointer which contains XEN specific information. commit e4cad138aa4f73cd88c624a88cfd63ddcdd1c098 Merge: 4d41ead6ead97 c1ae18d313e24 Author: Linus Torvalds Date: Sat Aug 29 12:37:00 2020 -0700 Merge tag 'hwmon-for-v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Fix tempeerature scale in gsc-hwmon driver - Fix divide by 0 error in nct7904 driver - Drop non-existing attribute from pmbus/isl68137 driver - Fix status check in applesmc driver * tag 'hwmon-for-v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (gsc-hwmon) Scale temperature to millidegrees hwmon: (applesmc) check status earlier. hwmon: (nct7904) Correct divide by 0 hwmon: (pmbus/isl68137) remove READ_TEMPERATURE_1 telemetry for RAA228228 commit 5d220bcd378a1de14b9609c2706e041ba62253b6 Merge: a433d7217feab 7ad92f656bddf Author: Jens Axboe Date: Sat Aug 29 10:54:11 2020 -0600 Merge branch 'nvme-5.9-rc' of git://git.infradead.org/nvme into block-5.9 Pull NVMe fixes from Sagi: "- instance leak and io boundary fixes from Keith - fc locking fix from Christophe - various tcp/rdma reset during traffic fixes from Me - pci use-after-free fix from Tong - tcp target null deref fix from Ziye" * 'nvme-5.9-rc' of git://git.infradead.org/nvme: nvme-pci: cancel nvme device request before disabling nvme: only use power of two io boundaries nvme: fix controller instance leak nvmet-fc: Fix a missed _irqsave version of spin_lock in 'nvmet_fc_fod_op_done()' nvme: Fix NULL dereference for pci nvme controllers nvme-rdma: fix reset hang if controller died in the middle of a reset nvme-rdma: fix timeout handler nvme-rdma: serialize controller teardown sequences nvme-tcp: fix reset hang if controller died in the middle of a reset nvme-tcp: fix timeout handler nvme-tcp: serialize controller teardown sequences nvme: have nvme_wait_freeze_timeout return if it timed out nvme-fabrics: don't check state NVME_CTRL_NEW for request acceptance nvmet-tcp: Fix NULL dereference when a connect data comes in h2cdata pdu commit c46172147ebbeb70094db48d76ab7945d96c638b Author: Florian Westphal Date: Wed Aug 26 00:07:18 2020 +0200 netfilter: conntrack: do not auto-delete clash entries on reply Its possible that we have more than one packet with the same ct tuple simultaneously, e.g. when an application emits n packets on same UDP socket from multiple threads. NAT rules might be applied to those packets. With the right set of rules, n packets will be mapped to m destinations, where at least two packets end up with the same destination. When this happens, the existing clash resolution may merge the skb that is processed after the first has been received with the identical tuple already in hash table. However, its possible that this identical tuple is a NAT_CLASH tuple. In that case the second skb will be sent, but no reply can be received since the reply that is processed first removes the NAT_CLASH tuple. Do not auto-delete, this gives a 1 second window for replies to be passed back to originator. Packets that are coming later (udp stream case) will not be affected: they match the original ct entry, not a NAT_CLASH one. Also prevent NAT_CLASH entries from getting offloaded. Fixes: 6a757c07e51f ("netfilter: conntrack: allow insertion of clashing entries") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e5fc436f06eef54ef512ea55a9db8eb9f2e76959 Author: Luc Van Oostenryck Date: Fri Aug 28 10:53:01 2020 +0200 sparse: use static inline for __chk_{user,io}_ptr() __chk_user_ptr() & __chk_io_ptr() are dummy extern functions which only exist to enforce the typechecking of __user or __iomem pointers in macros when using sparse. This typechecking is done by inserting a call to these functions. But the presence of these calls can inhibit some simplifications and so influence the result of sparse's analysis of context/locking. Fix this by changing these calls into static inline calls with an empty body. Signed-off-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 15cbff3fbbc631952c346744f862fb294504b5e2 Author: Dan Crawford Date: Sat Aug 29 12:49:46 2020 +1000 ALSA: hda - Fix silent audio output and corrupted input on MSI X570-A PRO Following Christian Lachner's patch for Gigabyte X570-based motherboards, also patch the MSI X570-A PRO motherboard; the ALC1220 codec requires the same workaround for Clevo laptops to enforce the DAC/mixer connection path. Set up a quirk entry for that. I suspect most if all X570 motherboards will require similar patches. [ The entries reordered in the SSID order -- tiwai ] Related buglink: https://bugzilla.kernel.org/show_bug.cgi?id=205275 Signed-off-by: Dan Crawford Cc: Link: https://lore.kernel.org/r/20200829024946.5691-1-dnlcrwfrd@gmail.com Signed-off-by: Takashi Iwai commit 7ad92f656bddff4cf8f641e0e3b1acd4eb9644cb Author: Tong Zhang Date: Fri Aug 28 10:17:08 2020 -0400 nvme-pci: cancel nvme device request before disabling This patch addresses an irq free warning and null pointer dereference error problem when nvme devices got timeout error during initialization. This problem happens when nvme_timeout() function is called while nvme_reset_work() is still in execution. This patch fixed the problem by setting flag of the problematic request to NVME_REQ_CANCELLED before calling nvme_dev_disable() to make sure __nvme_submit_sync_cmd() returns an error code and let nvme_submit_sync_cmd() fail gracefully. The following is console output. [ 62.472097] nvme nvme0: I/O 13 QID 0 timeout, disable controller [ 62.488796] nvme nvme0: could not set timestamp (881) [ 62.494888] ------------[ cut here ]------------ [ 62.495142] Trying to free already-free IRQ 11 [ 62.495366] WARNING: CPU: 0 PID: 7 at kernel/irq/manage.c:1751 free_irq+0x1f7/0x370 [ 62.495742] Modules linked in: [ 62.495902] CPU: 0 PID: 7 Comm: kworker/u4:0 Not tainted 5.8.0+ #8 [ 62.496206] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-p4 [ 62.496772] Workqueue: nvme-reset-wq nvme_reset_work [ 62.497019] RIP: 0010:free_irq+0x1f7/0x370 [ 62.497223] Code: e8 ce 49 11 00 48 83 c4 08 4c 89 e0 5b 5d 41 5c 41 5d 41 5e 41 5f c3 44 89 f6 48 c70 [ 62.498133] RSP: 0000:ffffa96800043d40 EFLAGS: 00010086 [ 62.498391] RAX: 0000000000000000 RBX: ffff9b87fc458400 RCX: 0000000000000000 [ 62.498741] RDX: 0000000000000001 RSI: 0000000000000096 RDI: ffffffff9693d72c [ 62.499091] RBP: ffff9b87fd4c8f60 R08: ffffa96800043bfd R09: 0000000000000163 [ 62.499440] R10: ffffa96800043bf8 R11: ffffa96800043bfd R12: ffff9b87fd4c8e00 [ 62.499790] R13: ffff9b87fd4c8ea4 R14: 000000000000000b R15: ffff9b87fd76b000 [ 62.500140] FS: 0000000000000000(0000) GS:ffff9b87fdc00000(0000) knlGS:0000000000000000 [ 62.500534] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 62.500816] CR2: 0000000000000000 CR3: 000000003aa0a000 CR4: 00000000000006f0 [ 62.501165] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 62.501515] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 62.501864] Call Trace: [ 62.501993] pci_free_irq+0x13/0x20 [ 62.502167] nvme_reset_work+0x5d0/0x12a0 [ 62.502369] ? update_load_avg+0x59/0x580 [ 62.502569] ? ttwu_queue_wakelist+0xa8/0xc0 [ 62.502780] ? try_to_wake_up+0x1a2/0x450 [ 62.502979] process_one_work+0x1d2/0x390 [ 62.503179] worker_thread+0x45/0x3b0 [ 62.503361] ? process_one_work+0x390/0x390 [ 62.503568] kthread+0xf9/0x130 [ 62.503726] ? kthread_park+0x80/0x80 [ 62.503911] ret_from_fork+0x22/0x30 [ 62.504090] ---[ end trace de9ed4a70f8d71e2 ]--- [ 123.912275] nvme nvme0: I/O 12 QID 0 timeout, disable controller [ 123.914670] nvme nvme0: 1/0/0 default/read/poll queues [ 123.916310] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 123.917469] #PF: supervisor write access in kernel mode [ 123.917725] #PF: error_code(0x0002) - not-present page [ 123.917976] PGD 0 P4D 0 [ 123.918109] Oops: 0002 [#1] SMP PTI [ 123.918283] CPU: 0 PID: 7 Comm: kworker/u4:0 Tainted: G W 5.8.0+ #8 [ 123.918650] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-p4 [ 123.919219] Workqueue: nvme-reset-wq nvme_reset_work [ 123.919469] RIP: 0010:__blk_mq_alloc_map_and_request+0x21/0x80 [ 123.919757] Code: 66 0f 1f 84 00 00 00 00 00 41 55 41 54 55 48 63 ee 53 48 8b 47 68 89 ee 48 89 fb 8b4 [ 123.920657] RSP: 0000:ffffa96800043d40 EFLAGS: 00010286 [ 123.920912] RAX: ffff9b87fc4fee40 RBX: ffff9b87fc8cb008 RCX: 0000000000000000 [ 123.921258] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9b87fc618000 [ 123.921602] RBP: 0000000000000000 R08: ffff9b87fdc2c4a0 R09: ffff9b87fc616000 [ 123.921949] R10: 0000000000000000 R11: ffff9b87fffd1500 R12: 0000000000000000 [ 123.922295] R13: 0000000000000000 R14: ffff9b87fc8cb200 R15: ffff9b87fc8cb000 [ 123.922641] FS: 0000000000000000(0000) GS:ffff9b87fdc00000(0000) knlGS:0000000000000000 [ 123.923032] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 123.923312] CR2: 0000000000000000 CR3: 000000003aa0a000 CR4: 00000000000006f0 [ 123.923660] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 123.924007] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 123.924353] Call Trace: [ 123.924479] blk_mq_alloc_tag_set+0x137/0x2a0 [ 123.924694] nvme_reset_work+0xed6/0x12a0 [ 123.924898] process_one_work+0x1d2/0x390 [ 123.925099] worker_thread+0x45/0x3b0 [ 123.925280] ? process_one_work+0x390/0x390 [ 123.925486] kthread+0xf9/0x130 [ 123.925642] ? kthread_park+0x80/0x80 [ 123.925825] ret_from_fork+0x22/0x30 [ 123.926004] Modules linked in: [ 123.926158] CR2: 0000000000000000 [ 123.926322] ---[ end trace de9ed4a70f8d71e3 ]--- [ 123.926549] RIP: 0010:__blk_mq_alloc_map_and_request+0x21/0x80 [ 123.926832] Code: 66 0f 1f 84 00 00 00 00 00 41 55 41 54 55 48 63 ee 53 48 8b 47 68 89 ee 48 89 fb 8b4 [ 123.927734] RSP: 0000:ffffa96800043d40 EFLAGS: 00010286 [ 123.927989] RAX: ffff9b87fc4fee40 RBX: ffff9b87fc8cb008 RCX: 0000000000000000 [ 123.928336] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9b87fc618000 [ 123.928679] RBP: 0000000000000000 R08: ffff9b87fdc2c4a0 R09: ffff9b87fc616000 [ 123.929025] R10: 0000000000000000 R11: ffff9b87fffd1500 R12: 0000000000000000 [ 123.929370] R13: 0000000000000000 R14: ffff9b87fc8cb200 R15: ffff9b87fc8cb000 [ 123.929715] FS: 0000000000000000(0000) GS:ffff9b87fdc00000(0000) knlGS:0000000000000000 [ 123.930106] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 123.930384] CR2: 0000000000000000 CR3: 000000003aa0a000 CR4: 00000000000006f0 [ 123.930731] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 123.931077] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Co-developed-by: Keith Busch Signed-off-by: Tong Zhang Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg commit e83d776f9f98b4af18d67f05f9d1f3042dbe62c7 Author: Keith Busch Date: Thu Aug 27 10:38:57 2020 -0700 nvme: only use power of two io boundaries The kernel requires a power of two for boundaries because that's the only way it can efficiently split commands that cross them. A controller, however, may report a non-power of two boundary. The driver had been rounding the controller's value to one the kernel can use, but splitting on the wrong boundary provides no benefit on the device side, and incurs additional submission overhead from non-optimal splits. Don't provide any boundary hint if the controller's value can't be used and log a warning when first scanning a disk's unreported IO boundary. Since the chunk sector logic has grown, move it to a separate function. Cc: Martin K. Petersen Signed-off-by: Keith Busch Reviewed-by: Martin K. Petersen Signed-off-by: Sagi Grimberg commit 192f6c29bb28bfd0a17e6ad331d09f1ec84143d0 Author: Keith Busch Date: Wed Aug 26 10:53:04 2020 -0700 nvme: fix controller instance leak If the driver has to unbind from the controller for an early failure before the subsystem has been set up, there won't be a subsystem holding the controller's instance, so the controller needs to free its own instance in this case. Fixes: 733e4b69d508d ("nvme: Assign subsys instance from first ctrl") Signed-off-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg commit 70e37988db94aba607d5491a94f80ba08e399b6b Author: Christophe JAILLET Date: Fri Aug 21 09:58:19 2020 +0200 nvmet-fc: Fix a missed _irqsave version of spin_lock in 'nvmet_fc_fod_op_done()' The way 'spin_lock()' and 'spin_lock_irqsave()' are used is not consistent in this function. Use 'spin_lock_irqsave()' also here, as there is no guarantee that interruptions are disabled at that point, according to surrounding code. Fixes: a97ec51b37ef ("nvmet_fc: Rework target side abort handling") Signed-off-by: Christophe JAILLET Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg commit 7cd49f7576b0c61d6c4a2114cda08cc4d5ce0028 Author: Sagi Grimberg Date: Mon Aug 24 15:47:25 2020 -0700 nvme: Fix NULL dereference for pci nvme controllers PCIe controllers do not have fabric opts, verify they exist before showing ctrl_loss_tmo or reconnect_delay attributes. Fixes: 764075fdcb2f ("nvme: expose reconnect_delay and ctrl_loss_tmo via sysfs") Reported-by: Tobias Markus Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg commit 2362acb6785611eda795bfc12e1ea6b202ecf62c Author: Sagi Grimberg Date: Thu Jul 30 13:42:42 2020 -0700 nvme-rdma: fix reset hang if controller died in the middle of a reset If the controller becomes unresponsive in the middle of a reset, we will hang because we are waiting for the freeze to complete, but that cannot happen since we have commands that are inflight holding the q_usage_counter, and we can't blindly fail requests that times out. So give a timeout and if we cannot wait for queue freeze before unfreezing, fail and have the error handling take care how to proceed (either schedule a reconnect of remove the controller). Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg commit 0475a8dcbcee92a5d22e40c9c6353829fc6294b8 Author: Sagi Grimberg Date: Wed Jul 29 02:36:03 2020 -0700 nvme-rdma: fix timeout handler When a request times out in a LIVE state, we simply trigger error recovery and let the error recovery handle the request cancellation, however when a request times out in a non LIVE state, we make sure to complete it immediately as it might block controller setup or teardown and prevent forward progress. However tearing down the entire set of I/O and admin queues causes freeze/unfreeze imbalance (q->mq_freeze_depth) because and is really an overkill to what we actually need, which is to just fence controller teardown that may be running, stop the queue, and cancel the request if it is not already completed. Now that we have the controller teardown_lock, we can safely serialize request cancellation. This addresses a hang caused by calling extra queue freeze on controller namespaces, causing unfreeze to not complete correctly. Reviewed-by: Christoph Hellwig Reviewed-by: James Smart Signed-off-by: Sagi Grimberg commit 5110f40241d08334375eb0495f174b1d2c07657e Author: Sagi Grimberg Date: Wed Aug 5 18:13:58 2020 -0700 nvme-rdma: serialize controller teardown sequences In the timeout handler we may need to complete a request because the request that timed out may be an I/O that is a part of a serial sequence of controller teardown or initialization. In order to complete the request, we need to fence any other context that may compete with us and complete the request that is timing out. In this case, we could have a potential double completion in case a hard-irq or a different competing context triggered error recovery and is running inflight request cancellation concurrently with the timeout handler. Protect using a ctrl teardown_lock to serialize contexts that may complete a cancelled request due to error recovery or a reset. Reviewed-by: Christoph Hellwig Reviewed-by: James Smart Signed-off-by: Sagi Grimberg commit e5c01f4f7f623e768e868bcc08d8e7ceb03b75d0 Author: Sagi Grimberg Date: Thu Jul 30 13:25:34 2020 -0700 nvme-tcp: fix reset hang if controller died in the middle of a reset If the controller becomes unresponsive in the middle of a reset, we will hang because we are waiting for the freeze to complete, but that cannot happen since we have commands that are inflight holding the q_usage_counter, and we can't blindly fail requests that times out. So give a timeout and if we cannot wait for queue freeze before unfreezing, fail and have the error handling take care how to proceed (either schedule a reconnect of remove the controller). Signed-off-by: Sagi Grimberg commit 236187c4ed195161dfa4237c7beffbba0c5ae45b Author: Sagi Grimberg Date: Tue Jul 28 13:16:36 2020 -0700 nvme-tcp: fix timeout handler When a request times out in a LIVE state, we simply trigger error recovery and let the error recovery handle the request cancellation, however when a request times out in a non LIVE state, we make sure to complete it immediately as it might block controller setup or teardown and prevent forward progress. However tearing down the entire set of I/O and admin queues causes freeze/unfreeze imbalance (q->mq_freeze_depth) because and is really an overkill to what we actually need, which is to just fence controller teardown that may be running, stop the queue, and cancel the request if it is not already completed. Now that we have the controller teardown_lock, we can safely serialize request cancellation. This addresses a hang caused by calling extra queue freeze on controller namespaces, causing unfreeze to not complete correctly. Signed-off-by: Sagi Grimberg commit d4d61470ae48838f49e668503e840e1520b97162 Author: Sagi Grimberg Date: Wed Aug 5 18:13:48 2020 -0700 nvme-tcp: serialize controller teardown sequences In the timeout handler we may need to complete a request because the request that timed out may be an I/O that is a part of a serial sequence of controller teardown or initialization. In order to complete the request, we need to fence any other context that may compete with us and complete the request that is timing out. In this case, we could have a potential double completion in case a hard-irq or a different competing context triggered error recovery and is running inflight request cancellation concurrently with the timeout handler. Protect using a ctrl teardown_lock to serialize contexts that may complete a cancelled request due to error recovery or a reset. Signed-off-by: Sagi Grimberg commit 7cf0d7c0f3c3b0203aaf81c1bc884924d8fdb9bd Author: Sagi Grimberg Date: Thu Jul 30 13:24:45 2020 -0700 nvme: have nvme_wait_freeze_timeout return if it timed out Users can detect if the wait has completed or not and take appropriate actions based on this information (e.g. weather to continue initialization or rather fail and schedule another initialization attempt). Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg commit d7144f5c4cf4de95fdc3422943cf51c06aeaf7a7 Author: Sagi Grimberg Date: Fri Aug 14 11:46:51 2020 -0700 nvme-fabrics: don't check state NVME_CTRL_NEW for request acceptance NVME_CTRL_NEW should never see any I/O, because in order to start initialization it has to transition to NVME_CTRL_CONNECTING and from there it will never return to this state. Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg commit a6ce7d7b4adaebc27ee7e78e5ecc378a1cfc221d Author: Ziye Yang Date: Sat Aug 22 00:48:10 2020 +0800 nvmet-tcp: Fix NULL dereference when a connect data comes in h2cdata pdu When handling commands without in-capsule data, we assign the ttag assuming we already have the queue commands array allocated (based on the queue size information in the connect data payload). However if the connect itself did not send the connect data in-capsule we have yet to allocate the queue commands,and we will assign a bogus ttag and suffer a NULL dereference when we receive the corresponding h2cdata pdu. Fix this by checking if we already allocated commands before dereferencing it when handling h2cdata, if we didn't, its for sure a connect and we should use the preallocated connect command. Signed-off-by: Ziye Yang Signed-off-by: Sagi Grimberg commit 4d41ead6ead97c3730bbd186a601a64828668f01 Merge: 24148d8648e37 a433d7217feab Author: Linus Torvalds Date: Fri Aug 28 16:38:29 2020 -0700 Merge tag 'block-5.9-2020-08-28' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - nbd timeout fix (Hou) - device size fix for loop LOOP_CONFIGURE (Martijn) - MD pull from Song with raid5 stripe size fix (Yufen) * tag 'block-5.9-2020-08-28' of git://git.kernel.dk/linux-block: md/raid5: make sure stripe_size as power of two loop: Set correct device size when using LOOP_CONFIGURE nbd: restore default timeout when setting it to zero commit 24148d8648e37f8c15bedddfa50d14a31a0582c5 Merge: 005c53447a63c fdee946d0925f Author: Linus Torvalds Date: Fri Aug 28 16:23:16 2020 -0700 Merge tag 'io_uring-5.9-2020-08-28' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A few fixes in here, all based on reports and test cases from folks using it. Most of it is stable material as well: - Hashed work cancelation fix (Pavel) - poll wakeup signalfd fix - memlock accounting fix - nonblocking poll retry fix - ensure we never return -ERESTARTSYS for reads - ensure offset == -1 is consistent with preadv2() as documented - IOPOLL -EAGAIN handling fixes - remove useless task_work bounce for block based -EAGAIN retry" * tag 'io_uring-5.9-2020-08-28' of git://git.kernel.dk/linux-block: io_uring: don't bounce block based -EAGAIN retry off task_work io_uring: fix IOPOLL -EAGAIN retries io_uring: clear req->result on IOPOLL re-issue io_uring: make offset == -1 consistent with preadv2/pwritev2 io_uring: ensure read requests go through -ERESTART* transformation io_uring: don't use poll handler if file can't be nonblocking read/written io_uring: fix imbalanced sqo_mm accounting io_uring: revert consumed iov_iter bytes on error io-wq: fix hang after cancelling pending hashed work io_uring: don't recurse on tsk->sighand->siglock with signalfd commit c8146fe292a726d71e302719df90b53e2f84f7a5 Merge: 5438dd45831ee fa4505675e093 Author: David S. Miller Date: Fri Aug 28 16:12:48 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-08-28 The following pull-request contains BPF updates for your *net* tree. We've added 4 non-merge commits during the last 4 day(s) which contain a total of 4 files changed, 7 insertions(+), 4 deletions(-). The main changes are: 1) Fix out of bounds access for BPF_OBJ_GET_INFO_BY_FD retrieval, from Yonghong Song. 2) Fix wrong __user annotation in bpf_stats sysctl handler, from Tobias Klauser. 3) Few fixes for BPF selftest scripting in test_{progs,maps}, from Jesper Dangaard Brouer. ==================== Signed-off-by: David S. Miller commit 005c53447a63cbce10de37406975a34d7bdc8704 Merge: 0b2f18e7aeef8 c15e1bdda4365 Author: Linus Torvalds Date: Fri Aug 28 13:23:31 2020 -0700 Merge tag 'devprop-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework fix from Rafael Wysocki: "Prevent the promotion of the secondary firmware node of a device to the primary one from leaking a pointer (Heikki Krogerus)" * tag 'devprop-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: Fix the secondary firmware node handling in set_primary_fwnode() commit 0b2f18e7aeef86f966bbfccec8d698e05ccc4631 Merge: 326e311b84942 4f31d53c21ec9 Author: Linus Torvalds Date: Fri Aug 28 13:17:14 2020 -0700 Merge tag 'acpi-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These fix two recent issues in the ACPI memory mappings management code and tighten up error handling in the ACPI driver for AMD SoCs (APD). Specifics: - Avoid redundant rounding to the page size in acpi_os_map_iomem() to address a recently introduced issue with the EFI memory map permission check on ARM64 (Ard Biesheuvel). - Fix acpi_release_memory() to wait until the memory mappings released by it have been really unmapped (Rafael Wysocki). - Make the ACPI driver for AMD SoCs (APD) check the return value of acpi_dev_get_property() to avoid failures in the cases when the device property under inspection is missing (Furquan Shaikh)" * tag 'acpi-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: OSL: Prevent acpi_release_memory() from returning too early ACPI: ioremap: avoid redundant rounding to OS page size ACPI: SoC: APD: Check return value of acpi_dev_get_property() commit 326e311b849426a95cac0149406efb2bbd13fa65 Merge: 96d454cd2c166 ef7d960403ecd Author: Linus Torvalds Date: Fri Aug 28 13:12:09 2020 -0700 Merge tag 'pm-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix the recently added Tegra194 cpufreq driver and the handling of devices using runtime PM during system-wide suspend, improve the intel_pstate driver documentation and clean up the cpufreq core. Specifics: - Make the recently added Tegra194 cpufreq driver use read_cpuid_mpir() instead of cpu_logical_map() to avoid exporting logical_cpu_map (Sumit Gupta). - Drop the automatic system wakeup event reporting for devices with pending runtime-resume requests during system-wide suspend to avoid spurious aborts of the suspend flow (Rafael Wysocki). - Fix build warning in the intel_pstate driver documentation and improve the wording in there (Randy Dunlap). - Clean up two pieces of code in the cpufreq core (Viresh Kumar)" * tag 'pm-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: Use WARN_ON_ONCE() for invalid relation cpufreq: No need to verify cpufreq_driver in show_scaling_cur_freq() PM: sleep: core: Fix the handling of pending runtime resume requests Documentation: fix pm/intel_pstate build warning and wording cpufreq: replace cpu_logical_map() with read_cpuid_mpir() commit 4f31d53c21ec98a2c8973cff759804bd1c217c93 Merge: 6556b0a8ef3a5 33f61d725a86e Author: Rafael J. Wysocki Date: Fri Aug 28 21:17:56 2020 +0200 Merge branch 'acpi-mm' * acpi-mm: ACPI: OSL: Prevent acpi_release_memory() from returning too early ACPI: ioremap: avoid redundant rounding to OS page size commit ef7d960403ecd87276e12b69c26bf0fdd5f21a0e Merge: e3eb6e8fba650 30b8e6b22fd0f Author: Rafael J. Wysocki Date: Fri Aug 28 20:58:16 2020 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: Use WARN_ON_ONCE() for invalid relation cpufreq: No need to verify cpufreq_driver in show_scaling_cur_freq() Documentation: fix pm/intel_pstate build warning and wording cpufreq: replace cpu_logical_map() with read_cpuid_mpir() commit 96d454cd2c1668010406ea4c28ab915bcbb747f4 Merge: ef91bb196b0db 71a7f8cb1ca4c Author: Linus Torvalds Date: Fri Aug 28 11:37:33 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Fix kernel build with the integrated LLVM assembler which doesn't see the -Wa,-march option. - Fix "make vdso_install" when COMPAT_VDSO is disabled. - Make KVM more robust if the AT S1E1R instruction triggers an exception (architecture corner cases). * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception KVM: arm64: Survive synchronous exceptions caused by AT instructions KVM: arm64: Add kvm_extable for vaxorcism code arm64: vdso32: make vdso32 install conditional arm64: use a common .arch preamble for inline assembly commit ef91bb196b0db1013ef8705367bc2d7944ef696b Author: Herbert Xu Date: Fri Aug 28 17:11:25 2020 +1000 kernel.h: Silence sparse warning in lower_32_bits I keep getting sparse warnings in crypto such as: CHECK drivers/crypto/ccree/cc_hash.c drivers/crypto/ccree/cc_hash.c:49:9: warning: cast truncates bits from constant value (47b5481dbefa4fa4 becomes befa4fa4) drivers/crypto/ccree/cc_hash.c:49:26: warning: cast truncates bits from constant value (db0c2e0d64f98fa7 becomes 64f98fa7) [.. many more ..] This patch removes the warning by adding a mask to keep sparse happy. Signed-off-by: Herbert Xu Signed-off-by: Linus Torvalds commit 67afbda69645a89adb365f1dfa35181e09cd7e80 Author: Fabian Frederick Date: Sun Aug 23 20:18:06 2020 +0200 selftests: netfilter: add command usage Avoid bad command arguments. Based on tools/power/cpupower/bench/cpufreq-bench_plot.sh Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit 2f4bba4ef77cf01ae805554e8f1d98e57b28f25f Author: Fabian Frederick Date: Sun Aug 23 20:17:39 2020 +0200 selftests: netfilter: simplify command testing Fix some shellcheck SC2181 warnings: "Check exit code directly with e.g. 'if mycmd;', not indirectly with $?." as suggested by Stefano Brivio. Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit d721b68654d0fcf8930fd0d2edfff78df82fb8c4 Author: Fabian Frederick Date: Sun Aug 23 20:17:07 2020 +0200 selftests: netfilter: remove unused variable in make_file() 'who' variable was not used in make_file() Problem found using Shellcheck Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit a7bf670ebe192120cbe0a0ab6448baad6fbf7983 Author: Fabian Frederick Date: Sun Aug 23 20:15:59 2020 +0200 selftests: netfilter: exit on invalid parameters exit script with comments when parameters are wrong during address addition. No need for a message when trying to change MTU with lower values: output is self-explanatory. Use short testing sequence to avoid shellcheck warnings (suggested by Stefano Brivio). Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit da2f849e89ed621f3e0688ec5ba92725ed9f0f92 Author: Fabian Frederick Date: Sun Aug 23 20:15:37 2020 +0200 selftests: netfilter: fix header example nft_flowtable.sh is made for bash not sh. Also give values which not return "RTNETLINK answers: Invalid argument" Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit ee921183557af39c1a0475f982d43b0fcac25e2e Author: Pablo Neira Ayuso Date: Sun Aug 23 13:55:36 2020 +0200 netfilter: nfnetlink: nfnetlink_unicast() reports EAGAIN instead of ENOBUFS Frontend callback reports EAGAIN to nfnetlink to retry a command, this is used to signal that module autoloading is required. Unfortunately, nlmsg_unicast() reports EAGAIN in case the receiver socket buffer gets full, so it enters a busy-loop. This patch updates nfnetlink_unicast() to turn EAGAIN into ENOBUFS and to use nlmsg_unicast(). Remove the flags field in nfnetlink_unicast() since this is always MSG_DONTWAIT in the existing code which is exactly what nlmsg_unicast() passes to netlink_unicast() as parameter. Fixes: 96518518cc41 ("netfilter: add nftables") Reported-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 4b7ddc58e61ada82be1f47f82d5139f0ab2ba478 Author: Randy Dunlap Date: Sat Aug 22 18:07:27 2020 -0700 netfilter: delete repeated words Drop duplicated words in net/netfilter/ and net/ipv4/netfilter/. Signed-off-by: Randy Dunlap Reviewed-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 9c4b205a20f483d8a5d1208cfec33e339347d4bd Author: Jerome Brunet Date: Fri Aug 28 17:14:38 2020 +0200 ASoC: meson: axg-toddr: fix channel order on g12 platforms On g12 and following platforms, The first channel of record with more than 2 channels ends being placed randomly on an even channel of the output. On these SoCs, a bit was added to force the first channel to be placed at the beginning of the output. Apparently the behavior if the bit is not set is not easily predictable. According to the documentation, this bit is not present on the axg series. Set the bit on g12 and fix the problem. Fixes: a3c23a8ad4dc ("ASoC: meson: axg-toddr: add g12a support") Reported-by: Nicolas Belin Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200828151438.350974-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit e30942859030199dab5ad73f95faac226133c639 Merge: 40129b8cb4170 5fcd57505c002 Author: Linus Torvalds Date: Fri Aug 28 10:57:14 2020 -0700 Merge tag 'writeback_for_v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull writeback fixes from Jan Kara: "Fixes for writeback code occasionally skipping writeback of some inodes or livelocking sync(2)" * tag 'writeback_for_v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: writeback: Drop I_DIRTY_TIME_EXPIRE writeback: Fix sync livelock due to b_dirty_time processing writeback: Avoid skipping inode writeback writeback: Protect inode->i_io_list with inode->i_lock commit 40129b8cb41704c98901e08c3edf8224b8af1b31 Merge: b0bfd5eca956c 462582b99b607 Author: Linus Torvalds Date: Fri Aug 28 10:41:00 2020 -0700 Merge tag 'gfs2-v5.9-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Andreas Gruenbacher: "Fix a memory leak on filesystem withdraw. We didn't detect this bug because we have slab merging on by default (CONFIG_SLAB_MERGE_DEFAULT). Adding 'slub_nomerge' to the kernel command line exposed the problem" * tag 'gfs2-v5.9-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: add some much needed cleanup for log flushes that fail commit b0bfd5eca956c498b8f9c7ec4a25f355f793f24e Merge: 3a7c327767221 496ceaf12432b Author: Linus Torvalds Date: Fri Aug 28 10:33:04 2020 -0700 Merge tag 'ceph-for-5.9-rc3' of git://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "We have an inode number handling change, prompted by s390x which is a 64-bit architecture with a 32-bit ino_t, a patch to disallow leases to avoid potential data integrity issues when CephFS is re-exported via NFS or CIFS and a fix for the bulk of W=1 compilation warnings" * tag 'ceph-for-5.9-rc3' of git://github.com/ceph/ceph-client: ceph: don't allow setlease on cephfs ceph: fix inode number handling on arches with 32-bit ino_t libceph: add __maybe_unused to DEFINE_CEPH_FEATURE commit e183785f2529b4135f00a0330a3b08e7c86530c8 Author: Paulo Alcantara Date: Thu Aug 27 11:20:19 2020 -0300 cifs: fix check of tcon dfs in smb1 For SMB1, the DFS flag should be checked against tcon->Flags rather than tcon->share_flags. While at it, add an is_tcon_dfs() helper to check for DFS capability in a more generic way. Signed-off-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French Reviewed-by: Shyam Prasad N commit 3a7c327767221660e9e9a62e5538173873193f0a Merge: 5ec06b5c0d259 22380b65dc70f Author: Linus Torvalds Date: Fri Aug 28 10:15:33 2020 -0700 Merge tag 'mfd-fixes-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fixes from Lee Jones: - fix double free - handle devicetree disabled devices gracefully * tag 'mfd-fixes-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: mfd-core: Ensure disabled devices are ignored without error mfd: core: Fix double-free in mfd_remove_devices_fn() commit 5ec06b5c0d259a8c7c4376b121b2f62dfbfe57ef Merge: 15bc20c6af4ce 2a3f9da32de46 Author: Linus Torvalds Date: Fri Aug 28 09:46:48 2020 -0700 Merge tag 'drm-fixes-2020-08-28' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "As expected a bit of an rc3 uptick, amdgpu and msm are the main ones, one msm patch was from the merge window, but had dependencies and we dropped it until the other tree had landed. Otherwise it's a couple of fixes for core, and etnaviv, and single i915, exynos, omap fixes. I'm still tracking the Sandybridge gpu relocations issue, if we don't see much movement I might just queue up the reverts. I'll talk to Daniel next week once he's back from holidays. core: - Take modeset bkl for legacy drivers dp_mst: - Allow null crtc in dp_mst i915: - Fix command parser desc matching with masks amdgpu: - Misc display fixes - Backlight fixes - MPO fix for DCN1 - Fixes for Sienna Cichlid - Fixes for Navy Flounder - Vega SW CTF fixes - SMU fix for Raven - Fix a possible overflow in INFO ioctl - Gfx10 clockgating fix msm: - opp/bw scaling patch followup - frequency restoring fux - vblank in atomic commit fix - dpu modesetting fixes - fencing fix etnaviv: - scheduler interaction fix - gpu init regression fix exynos: - Just drop __iommu annotation to fix sparse warning omap: - locking state fix" * tag 'drm-fixes-2020-08-28' of git://anongit.freedesktop.org/drm/drm: (41 commits) drm/amd/display: Fix memleak in amdgpu_dm_mode_config_init drm/amdgpu: disable runtime pm for navy_flounder drm/amd/display: Retry AUX write when fail occurs drm/amdgpu: Fix buffer overflow in INFO ioctl drm/amd/powerplay: Fix hardmins not being sent to SMU for RV drm/amdgpu: use MODE1 reset for navy_flounder by default drm/amd/pm: correct the thermal alert temperature limit settings drm/amdgpu: add asd fw check before loading asd drm/amd/display: Keep current gain when ABM disable immediately drm/amd/display: Fix passive dongle mistaken as active dongle in EDID emulation drm/amd/display: Revert HDCP disable sequence change drm/amd/display: Send DISPLAY_OFF after power down on boot drm/amdgpu/gfx10: refine mgcg setting drm/amd/pm: correct Vega20 swctf limit setting drm/amd/pm: correct Vega12 swctf limit setting drm/amd/pm: correct Vega10 swctf limit setting drm/amd/pm: set VCN pg per instances drm/amd/pm: enable run_btc callback for sienna_cichlid drivers: gpu: amd: Initialize amdgpu_dm_backlight_caps object to 0 in amdgpu_dm_update_backlight_caps drm/amd/display: Reject overlay plane configurations in multi-display scenarios ... commit 71a7f8cb1ca4ca7214a700b1243626759b6c11d4 Author: James Morse Date: Fri Aug 21 15:07:07 2020 +0100 KVM: arm64: Set HCR_EL2.PTW to prevent AT taking synchronous exception AT instructions do a translation table walk and return the result, or the fault in PAR_EL1. KVM uses these to find the IPA when the value is not provided by the CPU in HPFAR_EL1. If a translation table walk causes an external abort it is taken as an exception, even if it was due to an AT instruction. (DDI0487F.a's D5.2.11 "Synchronous faults generated by address translation instructions") While we previously made KVM resilient to exceptions taken due to AT instructions, the device access causes mismatched attributes, and may occur speculatively. Prevent this, by forbidding a walk through memory described as device at stage2. Now such AT instructions will report a stage2 fault. Such a fault will cause KVM to restart the guest. If the AT instructions always walk the page tables, but guest execution uses the translation cached in the TLB, the guest can't make forward progress until the TLB entry is evicted. This isn't a problem, as since commit 5dcd0fdbb492 ("KVM: arm64: Defer guest entry when an asynchronous exception is pending"), KVM will return to the host to process IRQs allowing the rest of the system to keep running. Cc: stable@vger.kernel.org # Reviewed-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 88a84ccccb3966bcc3f309cdb76092a9892c0260 Author: James Morse Date: Fri Aug 21 15:07:06 2020 +0100 KVM: arm64: Survive synchronous exceptions caused by AT instructions KVM doesn't expect any synchronous exceptions when executing, any such exception leads to a panic(). AT instructions access the guest page tables, and can cause a synchronous external abort to be taken. The arm-arm is unclear on what should happen if the guest has configured the hardware update of the access-flag, and a memory type in TCR_EL1 that does not support atomic operations. B2.2.6 "Possible implementation restrictions on using atomic instructions" from DDI0487F.a lists synchronous external abort as a possible behaviour of atomic instructions that target memory that isn't writeback cacheable, but the page table walker may behave differently. Make KVM robust to synchronous exceptions caused by AT instructions. Add a get_user() style helper for AT instructions that returns -EFAULT if an exception was generated. While KVM's version of the exception table mixes synchronous and asynchronous exceptions, only one of these can occur at each location. Re-enter the guest when the AT instructions take an exception on the assumption the guest will take the same exception. This isn't guaranteed to make forward progress, as the AT instructions may always walk the page tables, but guest execution may use the translation cached in the TLB. This isn't a problem, as since commit 5dcd0fdbb492 ("KVM: arm64: Defer guest entry when an asynchronous exception is pending"), KVM will return to the host to process IRQs allowing the rest of the system to keep running. Cc: stable@vger.kernel.org # Reviewed-by: Marc Zyngier Signed-off-by: Catalin Marinas commit e9ee186bb735bfc17fa81dbc9aebf268aee5b41e Author: James Morse Date: Fri Aug 21 15:07:05 2020 +0100 KVM: arm64: Add kvm_extable for vaxorcism code KVM has a one instruction window where it will allow an SError exception to be consumed by the hypervisor without treating it as a hypervisor bug. This is used to consume asynchronous external abort that were caused by the guest. As we are about to add another location that survives unexpected exceptions, generalise this code to make it behave like the host's extable. KVM's version has to be mapped to EL2 to be accessible on nVHE systems. The SError vaxorcism code is a one instruction window, so has two entries in the extable. Because the KVM code is copied for VHE and nVHE, we end up with four entries, half of which correspond with code that isn't mapped. Signed-off-by: James Morse Reviewed-by: Marc Zyngier Signed-off-by: Catalin Marinas commit 5438dd45831ee33869779bd1919b05816ae4dbc9 Author: Cong Wang Date: Thu Aug 27 10:40:41 2020 -0700 net_sched: fix error path in red_init() When ->init() fails, ->destroy() is called to clean up. So it is unnecessary to clean up in red_init(), and it would cause some refcount underflow. Fixes: aee9caa03fc3 ("net: sched: sch_red: Add qevents "early_drop" and "mark"") Reported-and-tested-by: syzbot+b33c1cb0a30ebdc8a5f9@syzkaller.appspotmail.com Reported-and-tested-by: syzbot+e5ea5f8a3ecfd4427a1c@syzkaller.appspotmail.com Cc: Petr Machata Signed-off-by: Cong Wang Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit f272285f6abb9178d029375599626baf3d5f4e8a Author: Landen Chao Date: Thu Aug 27 17:15:47 2020 +0800 net: dsa: mt7530: fix advertising unsupported 1000baseT_Half Remove 1000baseT_Half to advertise correct hardware capability in phylink_validate() callback function. Fixes: 38f790a80560 ("net: dsa: mt7530: Add support for port 5") Signed-off-by: Landen Chao Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a433d7217feab712ff69ef5cc2a86f95ed1aca40 Merge: 79e5dc59e2974 6af10a33c501b Author: Jens Axboe Date: Fri Aug 28 07:52:02 2020 -0600 Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.9 Pull MD fix from Song. * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid5: make sure stripe_size as power of two commit 174bce38caf18b47816f352156fab926f4fe072a Author: zhudi Date: Wed Aug 26 20:01:13 2020 +0800 netlink: fix a data race in netlink_rcv_wake() The data races were reported by KCSAN: BUG: KCSAN: data-race in netlink_recvmsg / skb_queue_tail write (marked) to 0xffff8c0986e5a8c8 of 8 bytes by interrupt on cpu 3: skb_queue_tail+0xcc/0x120 __netlink_sendskb+0x55/0x80 netlink_broadcast_filtered+0x465/0x7e0 nlmsg_notify+0x8f/0x120 rtnl_notify+0x8e/0xb0 __neigh_notify+0xf2/0x120 neigh_update+0x927/0xde0 arp_process+0x8a3/0xf50 arp_rcv+0x27c/0x3b0 __netif_receive_skb_core+0x181c/0x1840 __netif_receive_skb+0x38/0xf0 netif_receive_skb_internal+0x77/0x1c0 napi_gro_receive+0x1bd/0x1f0 e1000_clean_rx_irq+0x538/0xb20 [e1000] e1000_clean+0x5e4/0x1340 [e1000] net_rx_action+0x310/0x9d0 __do_softirq+0xe8/0x308 irq_exit+0x109/0x110 do_IRQ+0x7f/0xe0 ret_from_intr+0x0/0x1d 0xffffffffffffffff read to 0xffff8c0986e5a8c8 of 8 bytes by task 1463 on cpu 0: netlink_recvmsg+0x40b/0x820 sock_recvmsg+0xc9/0xd0 ___sys_recvmsg+0x1a4/0x3b0 __sys_recvmsg+0x86/0x120 __x64_sys_recvmsg+0x52/0x70 do_syscall_64+0xb5/0x360 entry_SYSCALL_64_after_hwframe+0x65/0xca 0xffffffffffffffff Since the write is under sk_receive_queue->lock but the read is done as lockless. so fix it by using skb_queue_empty_lockless() instead of skb_queue_empty() for the read in netlink_rcv_wake() Signed-off-by: zhudi Signed-off-by: David S. Miller commit 51458c97058deaec49f9d42028450e7a404c0653 Merge: b43c75abfd084 2d9b55508556c Author: David S. Miller Date: Fri Aug 28 06:16:48 2020 -0700 Merge tag 'mac80211-for-davem-2020-08-28' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== We have: * fixes for AQL (airtime queue limits) * reduce packet loss detection false positives * a small channel number fix for the 6 GHz band * a fix for 80+80/160 MHz negotiation * an nl80211 attribute (NL80211_ATTR_HE_6GHZ_CAPABILITY) fix * add a missing sanity check for the regulatory code ==================== Signed-off-by: David S. Miller commit 5d28ba5f8a0cfa3a874fa96c33731b8fcd141b3a Author: Frank van der Linden Date: Thu Aug 27 23:40:12 2020 +0000 arm64: vdso32: make vdso32 install conditional vdso32 should only be installed if CONFIG_COMPAT_VDSO is enabled, since it's not even supposed to be compiled otherwise, and arm64 builds without a 32bit crosscompiler will fail. Fixes: 8d75785a8142 ("ARM64: vdso32: Install vdso32 from vdso_install") Signed-off-by: Frank van der Linden Cc: stable@vger.kernel.org [5.4+] Link: https://lore.kernel.org/r/20200827234012.19757-1-fllinden@amazon.com Signed-off-by: Catalin Marinas commit ddecfc76979d5585847c76c4c489dcac389f86dd Author: Christophe JAILLET Date: Sat Aug 15 08:12:37 2020 +0200 media: mceusb: Avoid GFP_ATOMIC where it is not needed There is no point in using GFP_ATOMIC here. It is a probe function, and GFP_KERNEL is already used the line before and the line after. Use GFP_KERNEL instead. Signed-off-by: Christophe JAILLET Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 1451b93223bbe3b4e9c91fca6b451d00667c5bf0 Author: Sean Young Date: Thu Aug 13 11:08:49 2020 +0200 media: gpio-ir-tx: spinlock is not needed to disable interrupts During bit-banging the IR on a gpio pin, we cannot be scheduled or have anything interrupt us, else the generated signal will be incorrect. Therefore, we need to disable interrupts on the local cpu. This also disables preemption. local_irq_disable() does exactly what we need and does not require a spinlock. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit a2e2d73fa28136598e84db9d021091f1b98cbb1a Author: Sean Young Date: Sat Aug 8 13:38:02 2020 +0200 media: rc: do not access device via sysfs after rc_unregister_device() Device drivers do not expect to have change_protocol or wakeup re-programming to be accesed after rc_unregister_device(). This can cause the device driver to access deallocated resources. Cc: # 4.16+ Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 4f0835d6677dc69263f90f976524cb92b257d9f4 Author: Sean Young Date: Sat Aug 8 13:19:12 2020 +0200 media: rc: uevent sysfs file races with rc_unregister_device() Only report uevent file contents if device still registered, else we might read freed memory. Reported-by: syzbot+ceef16277388d6f24898@syzkaller.appspotmail.com Cc: Hillf Danton Cc: # 4.16+ Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit fa4505675e093e895b7ec49a76d44f6b5ad9602e Author: Jesper Dangaard Brouer Date: Wed Aug 26 10:17:36 2020 +0200 selftests/bpf: Fix massive output from test_maps When stdout output from the selftests tool 'test_maps' gets redirected into e.g file or pipe, then the output lines increase a lot (from 21 to 33949 lines). This is caused by the printf that happens before the fork() call, and there are user-space buffered printf data that seems to be duplicated into the forked process. To fix this fflush() stdout before the fork loop in __run_parallel(). Fixes: 1a97cf1fe503 ("selftests/bpf: speedup test_maps") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/159842985651.1050885.2154399297503372406.stgit@firesoul commit 20d9fdee72dfaa1fa7588c7a846283bd740e7157 Author: Kuninori Morimoto Date: Thu Aug 27 08:55:39 2020 +0900 ASoC: soc-core: add snd_soc_find_dai_with_mutex() commit 25612477d20b52 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper") added snd_soc_dai_link_set_capabilities(). But it is using snd_soc_find_dai() (A) which is required client_mutex (B). And client_mutex is soc-core.c local. struct snd_soc_dai *snd_soc_find_dai(xxx) { ... (B) lockdep_assert_held(&client_mutex); ... } void snd_soc_dai_link_set_capabilities(xxx) { ... for_each_pcm_streams(direction) { ... for_each_link_cpus(dai_link, i, cpu) { (A) dai = snd_soc_find_dai(cpu); ... } ... for_each_link_codecs(dai_link, i, codec) { (A) dai = snd_soc_find_dai(codec); ... } } ... } Because of these background, we will get WARNING if .config has CONFIG_LOCKDEP. WARNING: CPU: 2 PID: 53 at sound/soc/soc-core.c:814 snd_soc_find_dai+0xf8/0x100 CPU: 2 PID: 53 Comm: kworker/2:1 Not tainted 5.7.0-rc1+ #328 Hardware name: Renesas H3ULCB Kingfisher board based on r8a77951 (DT) Workqueue: events deferred_probe_work_func pstate: 60000005 (nZCv daif -PAN -UAO) pc : snd_soc_find_dai+0xf8/0x100 lr : snd_soc_find_dai+0xf4/0x100 ... Call trace: snd_soc_find_dai+0xf8/0x100 snd_soc_dai_link_set_capabilities+0xa0/0x16c graph_dai_link_of_dpcm+0x390/0x3c0 graph_for_each_link+0x134/0x200 graph_probe+0x144/0x230 platform_drv_probe+0x5c/0xb0 really_probe+0xe4/0x430 driver_probe_device+0x60/0xf4 snd_soc_find_dai() will be used from (X) CPU/Codec/Platform driver with mutex lock, and (Y) Card driver without mutex lock. This snd_soc_dai_link_set_capabilities() is for Card driver, this means called without mutex. This patch adds snd_soc_find_dai_with_mutex() to solve it. Fixes: 25612477d20b52 ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blixvuab.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 40b8b826a6998639dd1c26f0e127f18371e1058d Author: Andy Shevchenko Date: Mon Aug 3 11:27:06 2020 +0300 kobject: Restore old behaviour of kobject_del(NULL) The commit 079ad2fb4bf9 ("kobject: Avoid premature parent object freeing in kobject_cleanup()") inadvertently dropped a possibility to call kobject_del() with NULL pointer. Restore the old behaviour. Fixes: 079ad2fb4bf9 ("kobject: Avoid premature parent object freeing in kobject_cleanup()") Cc: stable Reported-by: Qu Wenruo Cc: Heikki Krogerus Signed-off-by: Andy Shevchenko Reviewed-by: Qu Wenruo Link: https://lore.kernel.org/r/20200803082706.65347-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1764c3edc66880778604f5053fe2dda7b3ddd2c1 Author: Sami Tolvanen Date: Thu Aug 27 13:36:08 2020 -0700 arm64: use a common .arch preamble for inline assembly Commit 7c78f67e9bd9 ("arm64: enable tlbi range instructions") breaks LLVM's integrated assembler, because -Wa,-march is only passed to external assemblers and therefore, the new instructions are not enabled when IAS is used. This change adds a common architecture version preamble, which can be used in inline assembly blocks that contain instructions that require a newer architecture version, and uses it to fix __TLBI_0 and __TLBI_1 with ARM64_TLB_RANGE. Fixes: 7c78f67e9bd9 ("arm64: enable tlbi range instructions") Signed-off-by: Sami Tolvanen Tested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Link: https://github.com/ClangBuiltLinux/linux/issues/1106 Link: https://lore.kernel.org/r/20200827203608.1225689-1-samitolvanen@google.com Signed-off-by: Catalin Marinas commit 103a8542cb35b5130f732d00b0419a594ba1b517 Author: Aneesh Kumar K.V Date: Fri Aug 28 15:38:52 2020 +0530 powerpc/book3s64/radix: Fix boot failure with large amount of guest memory If the hypervisor doesn't support hugepages, the kernel ends up allocating a large number of page table pages. The early page table allocation was wrongly setting the max memblock limit to ppc64_rma_size with radix translation which resulted in boot failure as shown below. Kernel panic - not syncing: early_alloc_pgtable: Failed to allocate 16777216 bytes align=0x1000000 nid=-1 from=0x0000000000000000 max_addr=0xffffffffffffffff CPU: 0 PID: 0 Comm: swapper Not tainted 5.8.0-24.9-default+ #2 Call Trace: [c0000000016f3d00] [c0000000007c6470] dump_stack+0xc4/0x114 (unreliable) [c0000000016f3d40] [c00000000014c78c] panic+0x164/0x418 [c0000000016f3dd0] [c000000000098890] early_alloc_pgtable+0xe0/0xec [c0000000016f3e60] [c0000000010a5440] radix__early_init_mmu+0x360/0x4b4 [c0000000016f3ef0] [c000000001099bac] early_init_mmu+0x1c/0x3c [c0000000016f3f10] [c00000000109a320] early_setup+0x134/0x170 This was because the kernel was checking for the radix feature before we enable the feature via mmu_features. This resulted in the kernel using hash restrictions on radix. Rework the early init code such that the kernel boot with memblock restrictions as imposed by hash. At that point, the kernel still hasn't finalized the translation the kernel will end up using. We have three different ways of detecting radix. 1. dt_cpu_ftrs_scan -> used only in case of PowerNV 2. ibm,pa-features -> Used when we don't use cpu_dt_ftr_scan 3. CAS -> Where we negotiate with hypervisor about the supported translation. We look at 1 or 2 early in the boot and after that, we look at the CAS vector to finalize the translation the kernel will use. We also support a kernel command line option (disable_radix) to switch to hash. Update the memblock limit after mmu_early_init_devtree() if the kernel is going to use radix translation. This forces some of the memblock allocations we do before mmu_early_init_devtree() to be within the RMA limit. Fixes: 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for early init routines") Reported-by: Shirisha Ganta Signed-off-by: Aneesh Kumar K.V Reviewed-by: Hari Bathini Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200828100852.426575-1-aneesh.kumar@linux.ibm.com commit 4965b8cd1bc1ffb017e5c58e622da82b55e49414 Author: Prateek Sood Date: Fri Aug 21 02:27:50 2020 +0530 firmware_loader: fix memory leak for paged buffer vfree() is being called on paged buffer allocated using alloc_page() and mapped using vmap(). Freeing of pages in vfree() relies on nr_pages of struct vm_struct. vmap() does not update nr_pages. It can lead to memory leaks. Fixes: ddaf29fd9bb6 ("firmware: Free temporary page table after vmapping") Signed-off-by: Prateek Sood Reviewed-by: Takashi Iwai Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1597957070-27185-1-git-send-email-prsood@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 8a30c017c99603b216907c2f7aa22d3afe4137c3 Author: Sakari Ailus Date: Mon Aug 3 11:07:06 2020 +0200 media: max9286: Depend on OF_GPIO The driver expects struct gpio_chip has of_node field and that field is only there if CONFIG_OF_GPIO is defined. Fix this by changing the OF dependency to OF_GPIO. Reported-by: kernel test robot Signed-off-by: Sakari Ailus Reviewed-by: Kieran Bingham Signed-off-by: Mauro Carvalho Chehab commit bca82e3557ee1fbfbdacb09033a2d81ac76c86eb Author: Jacopo Mondi Date: Mon Jun 22 18:43:52 2020 +0200 media: i2c: imx214: select V4L2_FWNODE After the recent conversion of the media build infrastructure to select V4L2 components instead of depending on their presence, which took place in: 32a363d0b0b14 ("media: Kconfig files: use select for V4L2 subdevs and MC") imx214 stands out as being the (only?) media I2C driver that still depends on a V4L2 core symbol instead of selecting it. This confuses the build system which claims it has detected a circular dependency when other drivers select the same symbol as the imx214 driver does. drivers/media/i2c/Kconfig:728:error: recursive dependency detected! drivers/media/i2c/Kconfig:728: symbol VIDEO_IMX214 depends on V4L2_FWNODE drivers/media/v4l2-core/Kconfig:71: symbol V4L2_FWNODE is selected by VIDEO_BCM2835_UNICAM drivers/media/platform/bcm2835/Kconfig:3: symbol VIDEO_BCM2835_UNICAM depends on VIDEO_V4L2_SUBDEV_API drivers/media/v4l2-core/Kconfig:19: symbol VIDEO_V4L2_SUBDEV_API depends on MEDIA_CONTROLLER drivers/media/Kconfig:168: symbol MEDIA_CONTROLLER is selected by VIDEO_IMX214 Fix this by making the imx214 driver select V4L2_FWNODE instead of depending on it and align it with all the other drivers. Fixes: 32a363d0b0b14 ("media: Kconfig files: use select for V4L2 subdevs and MC") Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 22380b65dc70f5b132c5afdf6b4011e2a84ec34a Author: Lee Jones Date: Wed Aug 19 09:16:50 2020 +0100 mfd: mfd-core: Ensure disabled devices are ignored without error Commit e49aa9a9bd22 ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes") changed the semantics for disabled devices in mfd_add_device(). Instead of silently ignoring a disabled child device, an error was returned. On receipt of the error mfd_add_devices() the precedes to remove *all* child devices and returns an all-failed error to the caller, which will inevitably fail the parent device as well. This patch reverts back to the old semantics and ignores child devices which are disabled in Device Tree. Fixes: e49aa9a9bd22 ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes") Reported-by: Icenowy Zheng Tested-by: Icenowy Zheng Signed-off-by: Lee Jones commit 8048822bac01936fda2c7b924a52131da81e6198 Author: Sowjanya Komatineni Date: Thu Aug 27 10:21:01 2020 -0700 sdhci: tegra: Add missing TMCLK for data timeout commit b5a84ecf025a ("mmc: tegra: Add Tegra210 support") Tegra210 and later has a separate sdmmc_legacy_tm (TMCLK) used by Tegra SDMMC hawdware for data timeout to achive better timeout than using SDCLK and using TMCLK is recommended. USE_TMCLK_FOR_DATA_TIMEOUT bit in Tegra SDMMC register SDHCI_TEGRA_VENDOR_SYS_SW_CTRL can be used to choose either TMCLK or SDCLK for data timeout. Default USE_TMCLK_FOR_DATA_TIMEOUT bit is set to 1 and TMCLK is used for data timeout by Tegra SDMMC hardware and having TMCLK not enabled is not recommended. So, this patch adds quirk NVQUIRK_HAS_TMCLK for SoC having separate timeout clock and keeps TMCLK enabled all the time. Fixes: b5a84ecf025a ("mmc: tegra: Add Tegra210 support") Cc: stable # 5.4 Tested-by: Jon Hunter Reviewed-by: Jon Hunter Acked-by: Adrian Hunter Signed-off-by: Sowjanya Komatineni Link: https://lore.kernel.org/r/1598548861-32373-8-git-send-email-skomatineni@nvidia.com Signed-off-by: Ulf Hansson commit c956c0cd4f6f4aac4f095621b1c4e1c5ee1df877 Author: Sowjanya Komatineni Date: Thu Aug 27 10:21:00 2020 -0700 arm64: tegra: Add missing timeout clock to Tegra194 SDMMC nodes commit 5425fb15d8ee ("arm64: tegra: Add Tegra194 chip device tree") Tegra194 uses separate SDMMC_LEGACY_TM clock for data timeout and this clock is not enabled currently which is not recommended. Tegra194 SDMMC advertises 12Mhz as timeout clock frequency in host capability register. So, this clock should be kept enabled by SDMMC driver. Fixes: 5425fb15d8ee ("arm64: tegra: Add Tegra194 chip device tree") Cc: stable # 5.4 Tested-by: Jon Hunter Reviewed-by: Jon Hunter Signed-off-by: Sowjanya Komatineni Link: https://lore.kernel.org/r/1598548861-32373-7-git-send-email-skomatineni@nvidia.com Signed-off-by: Ulf Hansson commit baba217d2c4446b6eef309d81d8776cb5c68cb55 Author: Sowjanya Komatineni Date: Thu Aug 27 10:20:59 2020 -0700 arm64: tegra: Add missing timeout clock to Tegra186 SDMMC nodes commit 39cb62cb8973 ("arm64: tegra: Add Tegra186 support") Tegra186 uses separate SDMMC_LEGACY_TM clock for data timeout and this clock is not enabled currently which is not recommended. Tegra186 SDMMC advertises 12Mhz as timeout clock frequency in host capability register and uses it by default. So, this clock should be kept enabled by the SDMMC driver. Fixes: 39cb62cb8973 ("arm64: tegra: Add Tegra186 support") Cc: stable # 5.4 Tested-by: Jon Hunter Reviewed-by: Jon Hunter Signed-off-by: Sowjanya Komatineni Link: https://lore.kernel.org/r/1598548861-32373-6-git-send-email-skomatineni@nvidia.com Signed-off-by: Ulf Hansson commit 679f71fa0db2d777f39c7a5af7f7c0689fc713fa Author: Sowjanya Komatineni Date: Thu Aug 27 10:20:58 2020 -0700 arm64: tegra: Add missing timeout clock to Tegra210 SDMMC commit 742af7e7a0a1 ("arm64: tegra: Add Tegra210 support") Tegra210 uses separate SDMMC_LEGACY_TM clock for data timeout and this clock is not enabled currently which is not recommended. Tegra SDMMC advertises 12Mhz as timeout clock frequency in host capability register. So, this clock should be kept enabled by SDMMC driver. Fixes: 742af7e7a0a1 ("arm64: tegra: Add Tegra210 support") Cc: stable # 5.4 Tested-by: Jon Hunter Reviewed-by: Jon Hunter Signed-off-by: Sowjanya Komatineni Link: https://lore.kernel.org/r/1598548861-32373-5-git-send-email-skomatineni@nvidia.com Signed-off-by: Ulf Hansson commit f7f86e8ac0ad7cd6792a80137f5a550924966916 Author: Sowjanya Komatineni Date: Thu Aug 27 10:20:57 2020 -0700 dt-bindings: mmc: tegra: Add tmclk for Tegra210 and later commit b5a84ecf025a ("mmc: tegra: Add Tegra210 support") Tegra210 and later uses separate SDMMC_LEGACY_TM clock for data timeout. So, this patch adds "tmclk" to Tegra sdhci clock property in the device tree binding. Fixes: b5a84ecf025a ("mmc: tegra: Add Tegra210 support") Cc: stable # 5.4 Reviewed-by: Jon Hunter Signed-off-by: Sowjanya Komatineni Link: https://lore.kernel.org/r/1598548861-32373-4-git-send-email-skomatineni@nvidia.com Signed-off-by: Ulf Hansson commit 391d89dba8c290859a3e29430d0b9e32c358bb0d Author: Sowjanya Komatineni Date: Thu Aug 27 10:20:56 2020 -0700 sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra186 commit 4346b7c7941d ("mmc: tegra: Add Tegra186 support") SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK is set for Tegra186 from the beginning of its support in driver. Tegra186 SDMMC hardware by default uses timeout clock (TMCLK) instead of SDCLK and this quirk should not be set. So, this patch remove this quirk for Tegra186. Fixes: 4346b7c7941d ("mmc: tegra: Add Tegra186 support") Cc: stable # 5.4 Tested-by: Jon Hunter Reviewed-by: Jon Hunter Acked-by: Adrian Hunter Signed-off-by: Sowjanya Komatineni Link: https://lore.kernel.org/r/1598548861-32373-3-git-send-email-skomatineni@nvidia.com Signed-off-by: Ulf Hansson commit e33588adcaa925c18ee2ea253161fb0317fa2329 Author: Sowjanya Komatineni Date: Thu Aug 27 10:20:55 2020 -0700 sdhci: tegra: Remove SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK for Tegra210 commit b5a84ecf025a ("mmc: tegra: Add Tegra210 support") SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK is set for Tegra210 from the beginning of Tegra210 support in the driver. Tegra210 SDMMC hardware by default uses timeout clock (TMCLK) instead of SDCLK and this quirk should not be set. So, this patch remove this quirk for Tegra210. Fixes: b5a84ecf025a ("mmc: tegra: Add Tegra210 support") Cc: stable # 5.4 Tested-by: Jon Hunter Reviewed-by: Jon Hunter Acked-by: Adrian Hunter Signed-off-by: Sowjanya Komatineni Link: https://lore.kernel.org/r/1598548861-32373-2-git-send-email-skomatineni@nvidia.com Signed-off-by: Ulf Hansson commit 20934c0de13b49a072fb1e0ca79fe0fe0e40eae5 Author: Alan Stern Date: Wed Aug 26 10:32:29 2020 -0400 usb: storage: Add unusual_uas entry for Sony PSZ drives The PSZ-HA* family of USB disk drives from Sony can't handle the REPORT OPCODES command when using the UAS protocol. This patch adds an appropriate quirks entry. Reported-and-tested-by: Till Dörges Signed-off-by: Alan Stern CC: Link: https://lore.kernel.org/r/20200826143229.GB400430@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit d6f6cbeee4e5ee6976792851e0461c19f1ede864 Author: Wenbin Mei Date: Fri Aug 14 09:43:45 2020 +0800 arm64: dts: mt7622: add reset node for mmc device This commit adds reset node for mmc device. Cc: # v5.4+ Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC") Signed-off-by: Wenbin Mei Tested-by: Frank Wunderlich Acked-by: Matthias Brugger Link: https://lore.kernel.org/r/20200814014346.6496-3-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson commit 6af10a33c501b0b5878476501143c2cfbbfd63a2 Author: Yufen Yu Date: Thu Aug 20 09:22:05 2020 -0400 md/raid5: make sure stripe_size as power of two Commit 3b5408b98e4d ("md/raid5: support config stripe_size by sysfs entry") make stripe_size as a configurable value. It just requires stripe_size as multiple of 4KB. In fact, we should make sure stripe_size as power of two. Otherwise, stripe_shift which is the result of ilog2 can not represent the real stripe_size. Then, stripe_hash() and stripe_hash_locks_hash() may get unexpected value. Fixes: 3b5408b98e4d ("md/raid5: support config stripe_size by sysfs entry") Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 4a133eb351ccc275683ad49305d0b04dde903733 Author: Christophe Leroy Date: Thu Aug 27 18:30:27 2020 +0000 powerpc/32s: Disable VMAP stack which CONFIG_ADB_PMU low_sleep_handler() can't restore the context from virtual stack because the stack can hardly be accessed with MMU OFF. For now, disable VMAP stack when CONFIG_ADB_PMU is selected. Fixes: cd08f109e262 ("powerpc/32s: Enable CONFIG_VMAP_STACK") Cc: stable@vger.kernel.org # v5.6+ Reported-by: Giuseppe Sacco Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ec96c15bfa1a7415ab604ee1c98cd45779c08be0.1598553015.git.christophe.leroy@csgroup.eu commit 2a3f9da32de4616f0104209194e9bd3dfae092c9 Merge: c2b2f02a02c3e e5f10d6385cda Author: Dave Airlie Date: Fri Aug 28 11:02:52 2020 +1000 Merge tag 'drm-intel-fixes-2020-08-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.9-rc3: - Fix command parser desc matching with masks Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87imd45ufw.fsf@intel.com commit c2b2f02a02c3ee46ebb7f16adc3749fb145494d7 Merge: e035803797473 7fd5b25499bce Author: Dave Airlie Date: Fri Aug 28 10:52:28 2020 +1000 Merge tag 'drm-misc-fixes-2020-08-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Fixes for v5.9-rc2: - Take modeset bkl for legacy drivers. - Allow null crtc in dp_mst. - Omap locking state fix. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/7af1e52a-27de-8edc-d0b2-e23b01e8bc96@linux.intel.com commit fdee946d0925f971f167d2606984426763355e4f Author: Jens Axboe Date: Thu Aug 27 16:46:24 2020 -0600 io_uring: don't bounce block based -EAGAIN retry off task_work These events happen inline from submission, so there's no need to bounce them through the original task. Just set them up for retry and issue retry directly instead of going over task_work. Signed-off-by: Jens Axboe commit eefdf30f3dcb5c1d47bee2b3afdb9d4d05343ff3 Author: Jens Axboe Date: Thu Aug 27 16:40:19 2020 -0600 io_uring: fix IOPOLL -EAGAIN retries This normally isn't hit, as polling is mostly done on NVMe with deep queue depths. But if we do run into request starvation, we need to ensure that retries are properly serialized. Reported-by: Andres Freund Signed-off-by: Jens Axboe commit c165a08d2b2857c91c627039c4881f9d7ad1a3bd Author: Gustavo A. R. Silva Date: Thu Aug 27 15:44:32 2020 -0500 arm64/cpuinfo: Remove unnecessary fallthrough annotation Fallthrough annotations for consecutive default and case labels are not necessary. Reported-by: Linus Torvalds Signed-off-by: Gustavo A. R. Silva commit 0cc4a0c486f37af1ea3932ae8f76afbefe105a32 Author: Gustavo A. R. Silva Date: Thu Aug 27 15:36:28 2020 -0500 media: dib0700: Fix identation issue in dib8096_set_param_override() Fix identation issues. Fixes: 5e9c85d98337 ("[media] dib8096: enhancement") Reported-by: Linus Torvalds Signed-off-by: Gustavo A. R. Silva commit 89d29997f103d08264b0685796b420d911658b96 Author: Vineet Gupta Date: Mon Aug 24 12:10:33 2020 -0700 irqchip/eznps: Fix build error for !ARC700 builds eznps driver is supposed to be platform independent however it ends up including stuff from inside arch/arc headers leading to rand config build errors. The quick hack to fix this (proper fix is too much chrun for non active user-base) is to add following to nps platform agnostic header. - copy AUX_IENABLE from arch/arc header - move CTOP_AUX_IACK from arch/arc/plat-eznps/*/** Reported-by: kernel test robot Reported-by: Sebastian Andrzej Siewior Link: https://lkml.kernel.org/r/20200824095831.5lpkmkafelnvlpi2@linutronix.de Signed-off-by: Vineet Gupta commit e5c388b4b967037a0e00b60194b0dbcf94881a9b Author: Vineet Gupta Date: Fri Aug 7 21:29:28 2020 -0700 ARC: show_regs: fix r12 printing and simplify when working on ARC64, spotted an issue in ARCv2 reg file printing. print_reg_file() assumes contiguous reg-file whereas in ARCv2 they are not: r12 comes before r0-r11 due to hardware auto-save. Apparently this issue has been present since v2 port submission. To avoid bolting hacks for this discontinuity while looping through pt_regs, just ditching the loop and print pt_regs directly. Signed-off-by: Vineet Gupta commit b43c75abfd084b9e961a47c6331e01f2f91176b6 Author: Dinghao Liu Date: Thu Aug 27 16:55:46 2020 +0100 rxrpc: Fix memory leak in rxkad_verify_response() Fix a memory leak in rxkad_verify_response() whereby the response buffer doesn't get freed if we fail to allocate a ticket buffer. Fixes: ef68622da9cc ("rxrpc: Handle temporary errors better in rxkad security") Signed-off-by: Dinghao Liu Signed-off-by: David Howells Signed-off-by: David S. Miller commit 8d73a73a7f6312e65f3c93b6cb93df9e1eff2ca1 Merge: af8ea11113462 e4686c79b103c Author: David S. Miller Date: Thu Aug 27 12:55:46 2020 -0700 Merge tag 'rxrpc-fixes-20200820' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs David Howells says: ==================== rxrpc, afs: Fix probing issues Here are some fixes for rxrpc and afs to fix issues in the RTT measuring in rxrpc and thence the Volume Location server probing in afs: (1) Move the serial number of a received ACK into a local variable to simplify the next patch. (2) Fix the loss of RTT samples due to extra interposed ACKs causing baseline information to be discarded too early. This is a particular problem for afs when it sends a single very short call to probe a server it hasn't talked to recently. (3) Fix rxrpc_kernel_get_srtt() to indicate whether it actually has seen any valid samples or not. (4) Remove a field that's set/woken, but never read/waited on. (5) Expose the RTT and other probe information through procfs to make debugging of this stuff easier. (6) Fix VL rotation in afs to only use summary information from VL probing and not the probe running state (which gets clobbered when next a probe is issued). (7) Fix VL rotation to actually return the error aggregated from the probe errors. ==================== Signed-off-by: David S. Miller commit c1ae18d313e24bc7833e1749dd36dba5d47f259c Author: Tim Harvey Date: Thu Aug 27 10:20:24 2020 -0700 hwmon: (gsc-hwmon) Scale temperature to millidegrees The GSC registers report temperature in decidegrees celcius so we need to scale it to represent the hwmon sysfs API of millidegrees. Cc: stable@vger.kernel.org Fixes: 3bce5377ef66 ("hwmon: Add Gateworks System Controller support") Signed-off-by: Tim Harvey Link: https://lore.kernel.org/r/1598548824-16898-1-git-send-email-tharvey@gateworks.com Signed-off-by: Guenter Roeck commit 210e799ed275488bcae16f1acd3d259043ec6c68 Author: Dan Carpenter Date: Wed Aug 26 14:32:14 2020 +0300 afs: Remove erroneous fallthough annotation The fall through annotation comes after a return statement so it's not reachable. Signed-off-by: Dan Carpenter Signed-off-by: Gustavo A. R. Silva commit af8ea111134624855710a0ef5543b871d49b0162 Author: Murali Karicheri Date: Thu Aug 27 10:38:39 2020 -0400 net: ethernet: ti: cpsw_new: fix error handling in cpsw_ndo_vlan_rx_kill_vid() This patch fixes a bunch of issues in cpsw_ndo_vlan_rx_kill_vid() - pm_runtime_get_sync() returns non zero value. This results in non zero value return to caller which will be interpreted as error. So overwrite ret with zero. - If VID matches with port VLAN VID, then set error code. - Currently when VLAN interface is deleted, all of the VLAN mc addresses are removed from ALE table, however the return values from ale function calls are not checked. These functions can return error code -ENOENT. But that shouldn't happen in a normal case. So add error print to catch the situations so that these can be investigated and addressed. return zero in these cases as these are not real error case, but only serve to catch ALE table update related issues and help address the same in the driver. Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac") Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller commit 07b5b12d97dc9f47ff3dff46c4f944a15bd762e5 Author: Yu Kuai Date: Wed Aug 26 09:08:26 2020 +0800 drm/sun4i: add missing put_device() call in sun8i_r40_tcon_tv_set_mux() If sun8i_r40_tcon_tv_set_mux() succeed, sun8i_r40_tcon_tv_set_mux() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") Signed-off-by: Yu Kuai Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20200826010826.1785487-1-yukuai3@huawei.com commit b972fdba8665d75109ade0357739f46af6415d2a Author: Shiju Jose Date: Thu Aug 27 15:04:50 2020 +0100 EDAC/ghes: Fix NULL pointer dereference in ghes_edac_register() After b9cae27728d1 ("EDAC/ghes: Scan the system once on driver init") and with CONFIG_DEBUG_TEST_DRIVER_REMOVE enabled, ghes_hw.dimms becomes a NULL pointer after the second ->probe() (aka ghes_edac_register()) which the config option causes to be called. This happens because the static variable which holds down whether the system has been scanned already, doesn't get reset in ghes_edac_unregister(). Then, on the second probe, ghes_scan_system() doesn't get to enumerate the DIMMs, leading to ghes_hw.dimms remaining NULL. Clear the variable and rename it to something more descriptive so that a second probe succeeds. [ bp: Rewrite commit message. ] Fixes: b9cae27728d1 ("EDAC/ghes: Scan the system once on driver init") Suggested-by: Borislav Petkov Signed-off-by: Shiju Jose Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200827140450.1620-1-shiju.jose@huawei.com commit 097930e85f90f252c44dc0d084598265dd44ca48 Author: Linus Lüssing Date: Thu Aug 27 17:34:48 2020 +0200 batman-adv: bla: fix type misuse for backbone_gw hash indexing It seems that due to a copy & paste error the void pointer in batadv_choose_backbone_gw() is cast to the wrong type. Fixing this by using "struct batadv_bla_backbone_gw" instead of "struct batadv_bla_claim" which better matches the caller's side. For now it seems that we were lucky because the two structs both have their orig/vid and addr/vid in the beginning. However I stumbled over this issue when I was trying to add some debug variables in front of "orig" in batadv_backbone_gw, which caused hash lookups to fail. Fixes: 07568d0369f9 ("batman-adv: don't rely on positions in struct for hashing") Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann commit 125eac243806e021f33a1fdea3687eccbb9f7636 Author: Darrick J. Wong Date: Wed Aug 26 14:12:18 2020 -0700 xfs: initialize the shortform attr header padding entry Don't leak kernel memory contents into the shortform attr fork. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 645f08975f49441b3e753d8dc5b740cbcb226594 Author: Miaohe Lin Date: Thu Aug 27 07:27:49 2020 -0400 net: Fix some comments Fix some comments, including wrong function name, duplicated word and so on. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit a092b7233f0e000cc6f2c71a49e2ecc6f917a5fc Author: Himadri Pandya Date: Thu Aug 27 12:23:55 2020 +0530 net: usb: Fix uninit-was-stored issue in asix_read_phy_addr() The buffer size is 2 Bytes and we expect to receive the same amount of data. But sometimes we receive less data and run into uninit-was-stored issue upon read. Hence modify the error check on the return value to match with the buffer size as a prevention. Reported-and-tested by: syzbot+a7e220df5a81d1ab400e@syzkaller.appspotmail.com Signed-off-by: Himadri Pandya Signed-off-by: David S. Miller commit c195d66a8a75c60515819b101975f38b7ec6577f Author: Herbert Xu Date: Thu Aug 27 17:14:36 2020 +1000 crypto: af_alg - Work around empty control messages without MSG_MORE The iwd daemon uses libell which sets up the skcipher operation with two separate control messages. As the first control message is sent without MSG_MORE, it is interpreted as an empty request. While libell should be fixed to use MSG_MORE where appropriate, this patch works around the bug in the kernel so that existing binaries continue to work. We will print a warning however. A separate issue is that the new kernel code no longer allows the control message to be sent twice within the same request. This restriction is obviously incompatible with what iwd was doing (first setting an IV and then sending the real control message). This patch changes the kernel so that this is explicitly allowed. Reported-by: Caleb Jorden Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when...") Cc: Signed-off-by: Herbert Xu commit 4afc850e2e9e781976fb2c7852ce7bac374af938 Author: Maximilian Luz Date: Tue Aug 25 17:38:29 2020 +0200 mwifiex: Increase AES key storage size to 256 bits Following commit e18696786548 ("mwifiex: Prevent memory corruption handling keys") the mwifiex driver fails to authenticate with certain networks, specifically networks with 256 bit keys, and repeatedly asks for the password. The kernel log repeats the following lines (id and bssid redacted): mwifiex_pcie 0000:01:00.0: info: trying to associate to '' bssid mwifiex_pcie 0000:01:00.0: info: associated to bssid successfully mwifiex_pcie 0000:01:00.0: crypto keys added mwifiex_pcie 0000:01:00.0: info: successfully disconnected from : reason code 3 Tracking down this problem lead to the overflow check introduced by the aforementioned commit into mwifiex_ret_802_11_key_material_v2(). This check fails on networks with 256 bit keys due to the current storage size for AES keys in struct mwifiex_aes_param being only 128 bit. To fix this issue, increase the storage size for AES keys to 256 bit. Fixes: e18696786548 ("mwifiex: Prevent memory corruption handling keys") Signed-off-by: Maximilian Luz Reported-by: Kaloyan Nikolov Tested-by: Kaloyan Nikolov Reviewed-by: Dan Carpenter Reviewed-by: Brian Norris Tested-by: Brian Norris Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200825153829.38043-1-luzmaximilian@gmail.com commit b4be5a53ebf478ffcfb4c98c0ccc4a8d922b9a02 Author: Felix Fietkau Date: Wed Aug 12 16:49:43 2020 +0200 mt76: mt7915: use ieee80211_free_txskb to free tx skbs Using dev_kfree_skb for tx skbs breaks AQL. This worked until now only by accident, because a mac80211 issue breaks AQL on drivers with firmware rate control that report the rate via ieee80211_tx_status_ext as struct rate_info. Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200812144943.91974-1-nbd@nbd.name commit d1c9da9e4c938e8bbf8b0ef9e5772b97db5639e9 Author: Felix Fietkau Date: Wed Aug 12 12:23:32 2020 +0200 mt76: mt7615: use v1 MCU API on MT7615 to fix issues with adding/removing stations The implementation of embedding WTBL update inside the STA_REC update is buggy on the MT7615 v2 firmware. This leads to connection issues after a station has connected and disconnected again. Switch to the v1 MCU API ops, since they have received much more testing and should be more stable. On MT7622 and later, the v2 API is more actively used, so we should keep using it as well. Fixes: 6849e29ed92e ("mt76: mt7615: add starec operating flow for firmware v2") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200812102332.11812-1-nbd@nbd.name commit 097a9d23b7250355b182c5fd47dd4c55b22b1c33 Author: Selvin Xavier Date: Mon Aug 24 11:14:31 2020 -0700 RDMA/bnxt_re: Remove the qp from list only if the qp destroy succeeds Driver crashes when destroy_qp is re-tried because of an error returned. This is because the qp entry was removed from the qp list during the first call. Remove qp from the list only if destroy_qp returns success. The driver will still trigger a WARN_ON due to the memory leaking, but at least it isn't corrupting memory too. Fixes: 8dae419f9ec7 ("RDMA/bnxt_re: Refactor queue pair creation code") Link: https://lore.kernel.org/r/1598292876-26529-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 934d0ac9a64d21523e3ad03ea4098da7826bc788 Author: Naresh Kumar PBS Date: Mon Aug 24 11:14:36 2020 -0700 RDMA/bnxt_re: Fix driver crash on unaligned PSN entry address When computing the first psn entry, driver checks for page alignment. If this address is not page aligned,it attempts to compute the offset in that page for later use by using ALIGN macro. ALIGN macro does not return offset bytes but the requested aligned address and hence cannot be used directly to store as offset. Since driver was using the address itself instead of offset, it resulted in invalid address when filling the psn buffer. Fixed driver to use PAGE_MASK macro to calculate the offset. Fixes: fddcbbb02af4 ("RDMA/bnxt_re: Simplify obtaining queue entry from hw ring") Link: https://lore.kernel.org/r/1598292876-26529-7-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Naresh Kumar PBS Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 847b97887ed4569968d5b9a740f2334abca9f99a Author: Naresh Kumar PBS Date: Mon Aug 24 11:14:35 2020 -0700 RDMA/bnxt_re: Restrict the max_gids to 256 Some adapters report more than 256 gid entries. Restrict it to 256 for now. Fixes: 1ac5a4047975("RDMA/bnxt_re: Add bnxt_re RoCE driver") Link: https://lore.kernel.org/r/1598292876-26529-6-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Naresh Kumar PBS Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit f86b31c6a28f06eed3f6d9dc958079853b0792f1 Author: Naresh Kumar PBS Date: Mon Aug 24 11:14:34 2020 -0700 RDMA/bnxt_re: Static NQ depth allocation At first, driver allocates memory for NQ based on qplib_ctx->cq_count and qplib_ctx->srqc_count. Later when creating ring, it uses a static value of 128K -1. Fixing this with a static value for now. Fixes: b08fe048a69d ("RDMA/bnxt_re: Refactor net ring allocation function") Link: https://lore.kernel.org/r/1598292876-26529-5-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Naresh Kumar PBS Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 84cf229f4001c1216afc3e4c7f05e1620a0dd4bc Author: Selvin Xavier Date: Mon Aug 24 11:14:33 2020 -0700 RDMA/bnxt_re: Fix the qp table indexing qp->id can be a value outside the max number of qp. Indexing the qp table with the id can cause out of bounds crash. So changing the qp table indexing by (qp->id % max_qp -1). Allocating one extra entry for QP1. Some adapters create one more than the max_qp requested to accommodate QP1. If the qp->id is 1, store the inforamtion in the last entry of the qp table. Fixes: f218d67ef004 ("RDMA/bnxt_re: Allow posting when QPs are in error") Link: https://lore.kernel.org/r/1598292876-26529-4-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 2d0e60ee322d512fa6bc62d23a6760b39a380847 Author: Selvin Xavier Date: Mon Aug 24 11:14:32 2020 -0700 RDMA/bnxt_re: Do not report transparent vlan from QP1 QP1 Rx CQE reports transparent VLAN ID in the completion and this is used while reporting the completion for received MAD packet. Check if the vlan id is configured before reporting it in the work completion. Fixes: 84511455ac5b ("RDMA/bnxt_re: report vlan_id and sl in qp1 recv completion") Link: https://lore.kernel.org/r/1598292876-26529-3-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit ec78b3bd66bc9a015505df0ef0eb153d9e64b03b Author: Mark Bloch Date: Mon Aug 24 14:02:29 2020 +0300 RDMA/mlx4: Read pkey table length instead of hardcoded value If the pkey_table is not available (which is the case when RoCE is not supported), the cited commit caused a regression where mlx4_devices without RoCE are not created. Fix this by returning a pkey table length of zero in procedure eth_link_query_port() if the pkey-table length reported by the device is zero. Link: https://lore.kernel.org/r/20200824110229.1094376-1-leon@kernel.org Cc: Fixes: 1901b91f9982 ("IB/core: Fix potential NULL pointer dereference in pkey cache") Fixes: fa417f7b520e ("IB/mlx4: Add support for IBoE") Signed-off-by: Mark Bloch Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f96d6960abbc52e26ad124e69e6815283d3e1674 Author: Qu Wenruo Date: Tue Aug 25 21:42:51 2020 +0800 btrfs: tree-checker: fix the error message for transid error The error message for inode transid is the same as for inode generation, which makes us unable to detect the real problem. Reported-by: Tyler Richmond Fixes: 496245cac57e ("btrfs: tree-checker: Verify inode item") CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Marcos Paulo de Souza Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit d862060a4b43479887ae8e2c0b74a58c4e27e5f3 Author: Kamal Heib Date: Tue Aug 25 18:17:25 2020 +0300 RDMA/rxe: Fix panic when calling kmem_cache_create() To avoid the following kernel panic when calling kmem_cache_create() with a NULL pointer from pool_cache(), Block the rxe_param_set_add() from running if the rdma_rxe module is not initialized. BUG: unable to handle kernel NULL pointer dereference at 000000000000000b PGD 0 P4D 0 Oops: 0000 [#1] SMP NOPTI CPU: 4 PID: 8512 Comm: modprobe Kdump: loaded Not tainted 4.18.0-231.el8.x86_64 #1 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 10/02/2018 RIP: 0010:kmem_cache_alloc+0xd1/0x1b0 Code: 8b 57 18 45 8b 77 1c 48 8b 5c 24 30 0f 1f 44 00 00 5b 48 89 e8 5d 41 5c 41 5d 41 5e 41 5f c3 81 e3 00 00 10 00 75 0e 4d 89 fe <41> f6 47 0b 04 0f 84 6c ff ff ff 4c 89 ff e8 cc da 01 00 49 89 c6 RSP: 0018:ffffa2b8c773f9d0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000005 RDX: 0000000000000004 RSI: 00000000006080c0 RDI: 0000000000000000 RBP: ffff8ea0a8634fd0 R08: ffffa2b8c773f988 R09: 00000000006000c0 R10: 0000000000000000 R11: 0000000000000230 R12: 00000000006080c0 R13: ffffffffc0a97fc8 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f9138ed9740(0000) GS:ffff8ea4ae800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000000b CR3: 000000046d59a000 CR4: 00000000003406e0 Call Trace: rxe_alloc+0xc8/0x160 [rdma_rxe] rxe_get_dma_mr+0x25/0xb0 [rdma_rxe] __ib_alloc_pd+0xcb/0x160 [ib_core] ib_mad_init_device+0x296/0x8b0 [ib_core] add_client_context+0x11a/0x160 [ib_core] enable_device_and_get+0xdc/0x1d0 [ib_core] ib_register_device+0x572/0x6b0 [ib_core] ? crypto_create_tfm+0x32/0xe0 ? crypto_create_tfm+0x7a/0xe0 ? crypto_alloc_tfm+0x58/0xf0 rxe_register_device+0x19d/0x1c0 [rdma_rxe] rxe_net_add+0x3d/0x70 [rdma_rxe] ? dev_get_by_name_rcu+0x73/0x90 rxe_param_set_add+0xaf/0xc0 [rdma_rxe] parse_args+0x179/0x370 ? ref_module+0x1b0/0x1b0 load_module+0x135e/0x17e0 ? ref_module+0x1b0/0x1b0 ? __do_sys_init_module+0x13b/0x180 __do_sys_init_module+0x13b/0x180 do_syscall_64+0x5b/0x1a0 entry_SYSCALL_64_after_hwframe+0x65/0xca RIP: 0033:0x7f9137ed296e This can be triggered if a user tries to use the 'module option' which is not actually a real module option but some idiotic (and thankfully no obsolete) sysfs interface. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200825151725.254046-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit d3beaa253fd6fa40b8b18a216398e6e5376a9d21 Author: Josef Bacik Date: Mon Aug 10 11:42:31 2020 -0400 btrfs: set the lockdep class for log tree extent buffers These are special extent buffers that get rewound in order to lookup the state of the tree at a specific point in time. As such they do not go through the normal initialization paths that set their lockdep class, so handle them appropriately when they are created and before they are locked. 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 ad24466588ab7d7c879053c5afd919b0c555fec0 Author: Josef Bacik Date: Mon Aug 10 11:42:30 2020 -0400 btrfs: set the correct lockdep class for new nodes When flipping over to the rw_semaphore I noticed I'd get a lockdep splat in replace_path(), which is weird because we're swapping the reloc root with the actual target root. Turns out this is because we're using the root->root_key.objectid as the root id for the newly allocated tree block when setting the lockdep class, however we need to be using the actual owner of this new block, which is saved in owner. The affected path is through btrfs_copy_root as all other callers of btrfs_alloc_tree_block (which calls init_new_buffer) have root_objectid == root->root_key.objectid . CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Filipe Manana Reviewed-by: Nikolay Borisov Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit e89c4a9c8e6ce3a84cab4f342687d3fbbb1234eb Author: Josef Bacik Date: Mon Aug 10 11:42:29 2020 -0400 btrfs: allocate scrub workqueues outside of locks I got the following lockdep splat while testing: ====================================================== WARNING: possible circular locking dependency detected 5.8.0-rc7-00172-g021118712e59 #932 Not tainted ------------------------------------------------------ btrfs/229626 is trying to acquire lock: ffffffff828513f0 (cpu_hotplug_lock){++++}-{0:0}, at: alloc_workqueue+0x378/0x450 but task is already holding lock: ffff889dd3889518 (&fs_info->scrub_lock){+.+.}-{3:3}, at: btrfs_scrub_dev+0x11c/0x630 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #7 (&fs_info->scrub_lock){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 btrfs_scrub_dev+0x11c/0x630 btrfs_dev_replace_by_ioctl.cold.21+0x10a/0x1d4 btrfs_ioctl+0x2799/0x30a0 ksys_ioctl+0x83/0xc0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #6 (&fs_devs->device_list_mutex){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 btrfs_run_dev_stats+0x49/0x480 commit_cowonly_roots+0xb5/0x2a0 btrfs_commit_transaction+0x516/0xa60 sync_filesystem+0x6b/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0xe/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x29/0x60 cleanup_mnt+0xb8/0x140 task_work_run+0x6d/0xb0 __prepare_exit_to_usermode+0x1cc/0x1e0 do_syscall_64+0x5c/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #5 (&fs_info->tree_log_mutex){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 btrfs_commit_transaction+0x4bb/0xa60 sync_filesystem+0x6b/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0xe/0x30 btrfs_kill_super+0x12/0x20 deactivate_locked_super+0x29/0x60 cleanup_mnt+0xb8/0x140 task_work_run+0x6d/0xb0 __prepare_exit_to_usermode+0x1cc/0x1e0 do_syscall_64+0x5c/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #4 (&fs_info->reloc_mutex){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 btrfs_record_root_in_trans+0x43/0x70 start_transaction+0xd1/0x5d0 btrfs_dirty_inode+0x42/0xd0 touch_atime+0xa1/0xd0 btrfs_file_mmap+0x3f/0x60 mmap_region+0x3a4/0x640 do_mmap+0x376/0x580 vm_mmap_pgoff+0xd5/0x120 ksys_mmap_pgoff+0x193/0x230 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #3 (&mm->mmap_lock#2){++++}-{3:3}: __might_fault+0x68/0x90 _copy_to_user+0x1e/0x80 perf_read+0x141/0x2c0 vfs_read+0xad/0x1b0 ksys_read+0x5f/0xe0 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #2 (&cpuctx_mutex){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 perf_event_init_cpu+0x88/0x150 perf_event_init+0x1db/0x20b start_kernel+0x3ae/0x53c secondary_startup_64+0xa4/0xb0 -> #1 (pmus_lock){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 perf_event_init_cpu+0x4f/0x150 cpuhp_invoke_callback+0xb1/0x900 _cpu_up.constprop.26+0x9f/0x130 cpu_up+0x7b/0xc0 bringup_nonboot_cpus+0x4f/0x60 smp_init+0x26/0x71 kernel_init_freeable+0x110/0x258 kernel_init+0xa/0x103 ret_from_fork+0x1f/0x30 -> #0 (cpu_hotplug_lock){++++}-{0:0}: __lock_acquire+0x1272/0x2310 lock_acquire+0x9e/0x360 cpus_read_lock+0x39/0xb0 alloc_workqueue+0x378/0x450 __btrfs_alloc_workqueue+0x15d/0x200 btrfs_alloc_workqueue+0x51/0x160 scrub_workers_get+0x5a/0x170 btrfs_scrub_dev+0x18c/0x630 btrfs_dev_replace_by_ioctl.cold.21+0x10a/0x1d4 btrfs_ioctl+0x2799/0x30a0 ksys_ioctl+0x83/0xc0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Chain exists of: cpu_hotplug_lock --> &fs_devs->device_list_mutex --> &fs_info->scrub_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fs_info->scrub_lock); lock(&fs_devs->device_list_mutex); lock(&fs_info->scrub_lock); lock(cpu_hotplug_lock); *** DEADLOCK *** 2 locks held by btrfs/229626: #0: ffff88bfe8bb86e0 (&fs_devs->device_list_mutex){+.+.}-{3:3}, at: btrfs_scrub_dev+0xbd/0x630 #1: ffff889dd3889518 (&fs_info->scrub_lock){+.+.}-{3:3}, at: btrfs_scrub_dev+0x11c/0x630 stack backtrace: CPU: 15 PID: 229626 Comm: btrfs Kdump: loaded Not tainted 5.8.0-rc7-00172-g021118712e59 #932 Hardware name: Quanta Tioga Pass Single Side 01-0030993006/Tioga Pass Single Side, BIOS F08_3A18 12/20/2018 Call Trace: dump_stack+0x78/0xa0 check_noncircular+0x165/0x180 __lock_acquire+0x1272/0x2310 lock_acquire+0x9e/0x360 ? alloc_workqueue+0x378/0x450 cpus_read_lock+0x39/0xb0 ? alloc_workqueue+0x378/0x450 alloc_workqueue+0x378/0x450 ? rcu_read_lock_sched_held+0x52/0x80 __btrfs_alloc_workqueue+0x15d/0x200 btrfs_alloc_workqueue+0x51/0x160 scrub_workers_get+0x5a/0x170 btrfs_scrub_dev+0x18c/0x630 ? start_transaction+0xd1/0x5d0 btrfs_dev_replace_by_ioctl.cold.21+0x10a/0x1d4 btrfs_ioctl+0x2799/0x30a0 ? do_sigaction+0x102/0x250 ? lockdep_hardirqs_on_prepare+0xca/0x160 ? _raw_spin_unlock_irq+0x24/0x30 ? trace_hardirqs_on+0x1c/0xe0 ? _raw_spin_unlock_irq+0x24/0x30 ? do_sigaction+0x102/0x250 ? ksys_ioctl+0x83/0xc0 ksys_ioctl+0x83/0xc0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This happens because we're allocating the scrub workqueues under the scrub and device list mutex, which brings in a whole host of other dependencies. Because the work queue allocation is done with GFP_KERNEL, it can trigger reclaim, which can lead to a transaction commit, which in turns needs the device_list_mutex, it can lead to a deadlock. A different problem for which this fix is a solution. Fix this by moving the actual allocation outside of the scrub lock, and then only take the lock once we're ready to actually assign them to the fs_info. We'll now have to cleanup the workqueues in a few more places, so I've added a helper to do the refcount dance to safely free the workqueues. CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit a48b73eca4ceb9b8a4b97f290a065335dbcd8a04 Author: Josef Bacik Date: Mon Aug 10 11:42:27 2020 -0400 btrfs: fix potential deadlock in the search ioctl With the conversion of the tree locks to rwsem I got the following lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 5.8.0-rc7-00165-g04ec4da5f45f-dirty #922 Not tainted ------------------------------------------------------ compsize/11122 is trying to acquire lock: ffff889fabca8768 (&mm->mmap_lock#2){++++}-{3:3}, at: __might_fault+0x3e/0x90 but task is already holding lock: ffff889fe720fe40 (btrfs-fs-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x39/0x180 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (btrfs-fs-00){++++}-{3:3}: down_write_nested+0x3b/0x70 __btrfs_tree_lock+0x24/0x120 btrfs_search_slot+0x756/0x990 btrfs_lookup_inode+0x3a/0xb4 __btrfs_update_delayed_inode+0x93/0x270 btrfs_async_run_delayed_root+0x168/0x230 btrfs_work_helper+0xd4/0x570 process_one_work+0x2ad/0x5f0 worker_thread+0x3a/0x3d0 kthread+0x133/0x150 ret_from_fork+0x1f/0x30 -> #1 (&delayed_node->mutex){+.+.}-{3:3}: __mutex_lock+0x9f/0x930 btrfs_delayed_update_inode+0x50/0x440 btrfs_update_inode+0x8a/0xf0 btrfs_dirty_inode+0x5b/0xd0 touch_atime+0xa1/0xd0 btrfs_file_mmap+0x3f/0x60 mmap_region+0x3a4/0x640 do_mmap+0x376/0x580 vm_mmap_pgoff+0xd5/0x120 ksys_mmap_pgoff+0x193/0x230 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&mm->mmap_lock#2){++++}-{3:3}: __lock_acquire+0x1272/0x2310 lock_acquire+0x9e/0x360 __might_fault+0x68/0x90 _copy_to_user+0x1e/0x80 copy_to_sk.isra.32+0x121/0x300 search_ioctl+0x106/0x200 btrfs_ioctl_tree_search_v2+0x7b/0xf0 btrfs_ioctl+0x106f/0x30a0 ksys_ioctl+0x83/0xc0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Chain exists of: &mm->mmap_lock#2 --> &delayed_node->mutex --> btrfs-fs-00 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(btrfs-fs-00); lock(&delayed_node->mutex); lock(btrfs-fs-00); lock(&mm->mmap_lock#2); *** DEADLOCK *** 1 lock held by compsize/11122: #0: ffff889fe720fe40 (btrfs-fs-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x39/0x180 stack backtrace: CPU: 17 PID: 11122 Comm: compsize Kdump: loaded Not tainted 5.8.0-rc7-00165-g04ec4da5f45f-dirty #922 Hardware name: Quanta Tioga Pass Single Side 01-0030993006/Tioga Pass Single Side, BIOS F08_3A18 12/20/2018 Call Trace: dump_stack+0x78/0xa0 check_noncircular+0x165/0x180 __lock_acquire+0x1272/0x2310 lock_acquire+0x9e/0x360 ? __might_fault+0x3e/0x90 ? find_held_lock+0x72/0x90 __might_fault+0x68/0x90 ? __might_fault+0x3e/0x90 _copy_to_user+0x1e/0x80 copy_to_sk.isra.32+0x121/0x300 ? btrfs_search_forward+0x2a6/0x360 search_ioctl+0x106/0x200 btrfs_ioctl_tree_search_v2+0x7b/0xf0 btrfs_ioctl+0x106f/0x30a0 ? __do_sys_newfstat+0x5a/0x70 ? ksys_ioctl+0x83/0xc0 ksys_ioctl+0x83/0xc0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x50/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The problem is we're doing a copy_to_user() while holding tree locks, which can deadlock if we have to do a page fault for the copy_to_user(). This exists even without my locking changes, so it needs to be fixed. Rework the search ioctl to do the pre-fault and then copy_to_user_nofault for the copying. 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 9771a5cf937129307d9f58922d60484d58ababe7 Author: Josef Bacik Date: Mon Aug 10 11:42:26 2020 -0400 btrfs: drop path before adding new uuid tree entry With the conversion of the tree locks to rwsem I got the following lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 5.8.0-rc7-00167-g0d7ba0c5b375-dirty #925 Not tainted ------------------------------------------------------ btrfs-uuid/7955 is trying to acquire lock: ffff88bfbafec0f8 (btrfs-root-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x39/0x180 but task is already holding lock: ffff88bfbafef2a8 (btrfs-uuid-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x39/0x180 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (btrfs-uuid-00){++++}-{3:3}: down_read_nested+0x3e/0x140 __btrfs_tree_read_lock+0x39/0x180 __btrfs_read_lock_root_node+0x3a/0x50 btrfs_search_slot+0x4bd/0x990 btrfs_uuid_tree_add+0x89/0x2d0 btrfs_uuid_scan_kthread+0x330/0x390 kthread+0x133/0x150 ret_from_fork+0x1f/0x30 -> #0 (btrfs-root-00){++++}-{3:3}: __lock_acquire+0x1272/0x2310 lock_acquire+0x9e/0x360 down_read_nested+0x3e/0x140 __btrfs_tree_read_lock+0x39/0x180 __btrfs_read_lock_root_node+0x3a/0x50 btrfs_search_slot+0x4bd/0x990 btrfs_find_root+0x45/0x1b0 btrfs_read_tree_root+0x61/0x100 btrfs_get_root_ref.part.50+0x143/0x630 btrfs_uuid_tree_iterate+0x207/0x314 btrfs_uuid_rescan_kthread+0x12/0x50 kthread+0x133/0x150 ret_from_fork+0x1f/0x30 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(btrfs-uuid-00); lock(btrfs-root-00); lock(btrfs-uuid-00); lock(btrfs-root-00); *** DEADLOCK *** 1 lock held by btrfs-uuid/7955: #0: ffff88bfbafef2a8 (btrfs-uuid-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x39/0x180 stack backtrace: CPU: 73 PID: 7955 Comm: btrfs-uuid Kdump: loaded Not tainted 5.8.0-rc7-00167-g0d7ba0c5b375-dirty #925 Hardware name: Quanta Tioga Pass Single Side 01-0030993006/Tioga Pass Single Side, BIOS F08_3A18 12/20/2018 Call Trace: dump_stack+0x78/0xa0 check_noncircular+0x165/0x180 __lock_acquire+0x1272/0x2310 lock_acquire+0x9e/0x360 ? __btrfs_tree_read_lock+0x39/0x180 ? btrfs_root_node+0x1c/0x1d0 down_read_nested+0x3e/0x140 ? __btrfs_tree_read_lock+0x39/0x180 __btrfs_tree_read_lock+0x39/0x180 __btrfs_read_lock_root_node+0x3a/0x50 btrfs_search_slot+0x4bd/0x990 btrfs_find_root+0x45/0x1b0 btrfs_read_tree_root+0x61/0x100 btrfs_get_root_ref.part.50+0x143/0x630 btrfs_uuid_tree_iterate+0x207/0x314 ? btree_readpage+0x20/0x20 btrfs_uuid_rescan_kthread+0x12/0x50 kthread+0x133/0x150 ? kthread_create_on_node+0x60/0x60 ret_from_fork+0x1f/0x30 This problem exists because we have two different rescan threads, btrfs_uuid_scan_kthread which creates the uuid tree, and btrfs_uuid_tree_iterate that goes through and updates or deletes any out of date roots. The problem is they both do things in different order. btrfs_uuid_scan_kthread() reads the tree_root, and then inserts entries into the uuid_root. btrfs_uuid_tree_iterate() scans the uuid_root, but then does a btrfs_get_fs_root() which can read from the tree_root. It's actually easy enough to not be holding the path in btrfs_uuid_scan_kthread() when we add a uuid entry, as we already drop it further down and re-start the search when we loop. So simply move the path release before we add our entry to the uuid tree. This also fixes a problem where we're holding a path open after we do btrfs_end_transaction(), which has it's own problems. 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 e3ddd6067ee62f6e76ebcf61ff08b2c729ae412b Author: Dinghao Liu Date: Wed Aug 19 15:56:32 2020 +0800 RDMA/rxe: Fix memleak in rxe_mem_init_user When page_address() fails, umem should be freed just like when rxe_mem_alloc() fails. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200819075632.22285-1-dinghao.liu@zju.edu.cn Signed-off-by: Dinghao Liu Signed-off-by: Jason Gunthorpe commit e3e39c72b99f93bbd0420d38c858e7c4a061bb63 Author: Marcos Paulo de Souza Date: Fri Aug 21 11:54:44 2020 -0300 btrfs: block-group: fix free-space bitmap threshold [BUG] After commit 9afc66498a0b ("btrfs: block-group: refactor how we read one block group item"), cache->length is being assigned after calling btrfs_create_block_group_cache. This causes a problem since set_free_space_tree_thresholds calculates the free-space threshold to decide if the free-space tree should convert from extents to bitmaps. The current code calls set_free_space_tree_thresholds with cache->length being 0, which then makes cache->bitmap_high_thresh zero. This implies the system will always use bitmap instead of extents, which is not desired if the block group is not fragmented. This behavior can be seen by a test that expects to repair systems with FREE_SPACE_EXTENT and FREE_SPACE_BITMAP, but the current code only created FREE_SPACE_BITMAP. [FIX] Call set_free_space_tree_thresholds after setting cache->length. There is now a WARN_ON in set_free_space_tree_thresholds to help preventing the same mistake to happen again in the future. Link: https://github.com/kdave/btrfs-progs/issues/251 Fixes: 9afc66498a0b ("btrfs: block-group: refactor how we read one block group item") CC: stable@vger.kernel.org # 5.8+ Reviewed-by: Qu Wenruo Reviewed-by: Filipe Manana Signed-off-by: Marcos Paulo de Souza Signed-off-by: David Sterba commit 30b8e6b22fd0f7a56911e69c681e92532e72e3b6 Author: Viresh Kumar Date: Thu Aug 27 10:54:16 2020 +0530 cpufreq: Use WARN_ON_ONCE() for invalid relation The relation can't be invalid here, so if it turns out to be invalid, just WARN_ON_ONCE() and return 0. Signed-off-by: Viresh Kumar [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit 681fe68448ef370f1d7213cab38013ab8e9d8ff0 Author: Viresh Kumar Date: Thu Aug 27 10:54:15 2020 +0530 cpufreq: No need to verify cpufreq_driver in show_scaling_cur_freq() "cpufreq_driver" is guaranteed to be valid here, no need to check it here. Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 2d9b55508556ccee6410310fb9ea2482fd3328eb Author: Amar Singhal Date: Fri Jun 19 13:52:01 2020 -0700 cfg80211: Adjust 6 GHz frequency to channel conversion Adjust the 6 GHz frequency to channel conversion function, the other way around was previously handled. Signed-off-by: Amar Singhal Link: https://lore.kernel.org/r/1592599921-10607-1-git-send-email-asinghal@codeaurora.org [rewrite commit message, hard-code channel 2] Signed-off-by: Johannes Berg commit 47df8e059b49a80c179fae39256bcd7096810934 Author: Felix Fietkau Date: Sat Aug 8 19:25:42 2020 +0200 mac80211: reduce packet loss event false positives When running a large number of packets per second with a high data rate and long A-MPDUs, the packet loss threshold can be reached very quickly when the link conditions change. This frequently shows up as spurious disconnects. Mitigate false positives by using a similar logic for regular stations as the one being used for TDLS, though with a more aggressive timeout. Packet loss events are only reported if no ACK was received for a second. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200808172542.41628-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 47caf685a6854593348f216e0b489b71c10cbe03 Author: Johannes Berg Date: Wed Aug 19 10:46:48 2020 +0200 cfg80211: regulatory: reject invalid hints Reject invalid hints early in order to not cause a kernel WARN later if they're restored to or similar. Reported-by: syzbot+d451401ffd00a60677ee@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=d451401ffd00a60677ee Link: https://lore.kernel.org/r/20200819084648.13956-1-johannes@sipsolutions.net Signed-off-by: Johannes Berg commit 3579994476b65cb5e272ff0f720a1fd31322e53f Author: Shay Bar Date: Wed Aug 26 17:31:39 2020 +0300 wireless: fix wrong 160/80+80 MHz setting Fix cfg80211_chandef_usable(): consider IEEE80211_VHT_CAP_EXT_NSS_BW when verifying 160/80+80 MHz. Based on: "Table 9-272 — Setting of the Supported Channel Width Set subfield and Extended NSS BW Support subfield at a STA transmitting the VHT Capabilities Information field" From "Draft P802.11REVmd_D3.0.pdf" Signed-off-by: Aviad Brikman Signed-off-by: Shay Bar Link: https://lore.kernel.org/r/20200826143139.25976-1-shay.bar@celeno.com [reformat the code a bit and use u32_get_bits()] Signed-off-by: Johannes Berg commit f01cfbaf9b2971126f094acfbda2589bd2394f4d Author: Felix Fietkau Date: Fri Aug 21 18:30:45 2020 +0200 mac80211: improve AQL aggregation estimation for low data rates Links with low data rates use much smaller aggregates and are much more sensitive to latency added by bufferbloat. Tune the assumed aggregation length based on the tx rate duration. Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20200821163045.62140-3-nbd@nbd.name Signed-off-by: Johannes Berg commit 43cd72c5892c46fe69b8a1682fb4905cf158c39c Author: Felix Fietkau Date: Fri Aug 21 18:30:44 2020 +0200 mac80211: factor out code to look up the average packet length duration for a rate This will be used to enhance AQL estimated aggregation length Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20200821163045.62140-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 8ed37e79196033dbdb09a4eea9465af6a0e29fe9 Author: Felix Fietkau Date: Fri Aug 21 18:30:43 2020 +0200 mac80211: use rate provided via status->rate on ieee80211_tx_status_ext for AQL Since ieee80211_tx_info does not have enough room to encode HE rates, HE drivers use status->rate to provide rate info. Store it in struct sta_info and use it for AQL. Signed-off-by: Felix Fietkau Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20200821163045.62140-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 5861af92ff2a2e002449191413c35f3ec5f721fe Author: Luc Van Oostenryck Date: Tue Aug 25 01:25:26 2020 +0200 Compiler Attributes: fix comment concerning GCC 4.6 GCC 4.6 is not supported anymore, so remove a reference to it, leaving just the part about version prior GCC 5. Signed-off-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit aac544c3553d98ebe150dda19a25aa253f7ad3fe Author: Luc Van Oostenryck Date: Tue Aug 25 01:25:11 2020 +0200 Compiler Attributes: remove comment about sparse not supporting __has_attribute Sparse supports __has_attribute() since 2018-08-31, so the comment is not true anymore but more importantly is rather confusing. So remove it. Signed-off-by: Luc Van Oostenryck Signed-off-by: Miguel Ojeda commit 16d83a540ca4e7f1ebb2b3756869b77451d31414 Author: Pratik Rajesh Sampat Date: Wed Aug 26 13:59:18 2020 +0530 Revert "powerpc/powernv/idle: Replace CPU feature check with PVR check" cpuidle stop state implementation has minor optimizations for P10 where hardware preserves more SPR registers compared to P9. The current P9 driver works for P10, although does few extra save-restores. P9 driver can provide the required power management features like SMT thread folding and core level power savings on a P10 platform. Until the P10 stop driver is available, revert the commit which allows for only P9 systems to utilize cpuidle and blocks all idle stop states for P10. CPU idle states are enabled and tested on the P10 platform with this fix. This reverts commit 8747bf36f312356f8a295a0c39ff092d65ce75ae. Fixes: 8747bf36f312 ("powerpc/powernv/idle: Replace CPU feature check with PVR check") Signed-off-by: Pratik Rajesh Sampat Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200826082918.89306-1-psampat@linux.ibm.com commit 82715a0f332843d3a1830d7ebc9ac7c99a00c880 Author: Athira Rajeev Date: Wed Aug 26 02:40:29 2020 -0400 powerpc/perf: Fix reading of MSR[HV/PR] bits in trace-imc IMC trace-mode uses MSR[HV/PR] bits to set the cpumode for the instruction pointer captured in each sample. The bits are fetched from the third double word of the trace record. Reading third double word from IMC trace record should use be64_to_cpu() along with READ_ONCE inorder to fetch correct MSR[HV/PR] bits. Patch addresses this change. Currently we are using PERF_RECORD_MISC_HYPERVISOR as cpumode if MSR HV is 1 and PR is 0 which means the address is from host counter. But using PERF_RECORD_MISC_HYPERVISOR for host counter data will fail to resolve the address -> symbol during "perf report" because perf tools side uses PERF_RECORD_MISC_KERNEL to represent the host counter data. Therefore, fix the trace imc sample data to use PERF_RECORD_MISC_KERNEL as cpumode for host kernel information. Fixes: 77ca3951cc37 ("powerpc/perf: Add kernel support for new MSR[HV PR] bits in trace-imc") Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1598424029-1662-1-git-send-email-atrajeev@linux.vnet.ibm.com commit b460b512417ae9c8b51a3bdcc09020cd6c60ff69 Author: Alexey Kardashevskiy Date: Tue Jun 2 12:56:12 2020 +1000 powerpc/perf: Fix crashes with generic_compat_pmu & BHRB The bhrb_filter_map ("The Branch History Rolling Buffer") callback is only defined in raw CPUs' power_pmu structs. The "architected" CPUs use generic_compat_pmu, which does not have this callback, and crashes occur if a user tries to enable branch stack for an event. This add a NULL pointer check for bhrb_filter_map() which behaves as if the callback returned an error. This does not add the same check for config_bhrb() as the only caller checks for cpuhw->bhrb_users which remains zero if bhrb_filter_map==0. Fixes: be80e758d0c2 ("powerpc/perf: Add generic compat mode pmu driver") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Alexey Kardashevskiy Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200602025612.62707-1-aik@ozlabs.ru commit b91eb5182405b01a8aeb42e9b5207831767e97ee Author: Michael Ellerman Date: Tue Aug 25 19:34:24 2020 +1000 powerpc/64s: Fix crash in load_fp_state() due to fpexc_mode The recent commit 01eb01877f33 ("powerpc/64s: Fix restore_math unnecessarily changing MSR") changed some of the handling of floating point/vector restore. In particular it caused current->thread.fpexc_mode to be copied into the current MSR (via msr_check_and_set()), rather than just into regs->msr (which is moved into MSR on return to userspace). This can lead to a crash in the kernel if we take a floating point exception when restoring FPSCR: Oops: Exception in kernel mode, sig: 8 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: CPU: 3 PID: 101213 Comm: ld64.so.2 Not tainted 5.9.0-rc1-00098-g18445bf405cb-dirty #9 NIP: c00000000000fbb4 LR: c00000000001a7ac CTR: c000000000183570 REGS: c0000016b7cfb3b0 TRAP: 0700 Not tainted (5.9.0-rc1-00098-g18445bf405cb-dirty) MSR: 900000000290b933 CR: 44002444 XER: 00000000 CFAR: c00000000001a7a8 IRQMASK: 1 GPR00: c00000000001ae40 c0000016b7cfb640 c0000000011b7f00 c000001542a0f740 GPR04: c000001542a0f720 c000001542a0eb00 0000000000000900 c000001542a0eb00 GPR08: 000000000000000a 0000000000002000 9000000000009033 0000000000000000 GPR12: 0000000000004000 c0000017ffffd900 0000000000000001 c000000000df5a58 GPR16: c000000000e19c18 c0000000010e1123 0000000000000001 c000000000e1a638 GPR20: 0000000000000000 c0000000044b1d00 0000000000000000 c000001542a0f2a0 GPR24: 00000016c7fe0000 c000001542a0f720 c000000001c93da0 c000000000fe5f28 GPR28: c000001542a0f720 0000000000800000 c0000016b7cfbe90 0000000002802900 NIP load_fp_state+0x4/0x214 LR restore_math+0x17c/0x1f0 Call Trace: 0xc0000016b7cfb680 (unreliable) __switch_to+0x330/0x460 __schedule+0x318/0x920 schedule+0x74/0x140 schedule_timeout+0x318/0x3f0 wait_for_completion+0xc8/0x210 call_usermodehelper_exec+0x234/0x280 do_coredump+0xedc/0x13c0 get_signal+0x1d4/0xbe0 do_notify_resume+0x1a0/0x490 interrupt_exit_user_prepare+0x1c4/0x230 interrupt_return+0x14/0x1c0 Instruction dump: ebe10168 e88101a0 7c8ff120 382101e0 e8010010 7c0803a6 4e800020 790605c4 782905c4 7c0008a8 7c0008a8 c8030200 48000088 c8030000 c8230010 Fix it by only loading the fpexc_mode value into regs->msr. Also add a comment to explain that although VSX is subject to the value of fpexc_mode, we don't have to handle that separately because we only allow VSX to be enabled if FP is also enabled. Fixes: 01eb01877f33 ("powerpc/64s: Fix restore_math unnecessarily changing MSR") Reported-by: Milton Miller Signed-off-by: Michael Ellerman Reviewed-by: Nicholas Piggin Link: https://lore.kernel.org/r/20200825093424.3967813-1-mpe@ellerman.id.au commit e5fe56092e753c50093c60e757561984abff335e Author: Nicholas Piggin Date: Tue Aug 25 17:53:09 2020 +1000 powerpc/64s: scv entry should set PPR Kernel entry sets PPR to HMT_MEDIUM by convention. The scv entry path missed this. Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv instructions") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200825075309.224184-1-npiggin@gmail.com commit aa661d7fab436d8a782618b3138da1a84ca28a31 Author: Randy Dunlap Date: Sun Aug 23 17:31:16 2020 -0700 Documentation/powerpc: fix malformed table in syscall64-abi Fix malformed table warning in powerpc/syscall64-abi.rst by making two tables and moving the headings. Documentation/powerpc/syscall64-abi.rst:53: WARNING: Malformed table. Text in column margin in table line 2. =========== ============= ======================================== --- For the sc instruction, differences with the ELF ABI --- r0 Volatile (System call number.) r3 Volatile (Parameter 1, and return value.) r4-r8 Volatile (Parameters 2-6.) cr0 Volatile (cr0.SO is the return error condition.) cr1, cr5-7 Nonvolatile lr Nonvolatile --- For the scv 0 instruction, differences with the ELF ABI --- r0 Volatile (System call number.) r3 Volatile (Parameter 1, and return value.) r4-r8 Volatile (Parameters 2-6.) =========== ============= ======================================== Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv instructions") Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e06de4d3-a36f-2745-9775-467e125436cc@infradead.org commit 4d618b9f3fcab84e9ec28c180de46fb2c929d096 Author: Michael Ellerman Date: Fri Aug 21 20:49:10 2020 +1000 video: fbdev: controlfb: Fix build for COMPILE_TEST=y && PPC_PMAC=n The build is currently broken, if COMPILE_TEST=y and PPC_PMAC=n: linux/drivers/video/fbdev/controlfb.c: In function ‘control_set_hardware’: linux/drivers/video/fbdev/controlfb.c:276:2: error: implicit declaration of function ‘btext_update_display’ 276 | btext_update_display(p->frame_buffer_phys + CTRLFB_OFF, | ^~~~~~~~~~~~~~~~~~~~ Fix it by including btext.h whenever CONFIG_BOOTX_TEXT is enabled. Fixes: a07a63b0e24d ("video: fbdev: controlfb: add COMPILE_TEST support") Signed-off-by: Michael Ellerman Acked-by: Bartlomiej Zolnierkiewicz Link: https://lore.kernel.org/r/20200821104910.3363818-1-mpe@ellerman.id.au commit b30063976f29fc221a99d18d37d22ca035068aa9 Author: Ezequiel Garcia Date: Thu Aug 13 21:18:33 2020 +0200 media: cedrus: Add missing v4l2_ctrl_request_hdl_put() The check for a required control in the request was missing a call to v4l2_ctrl_request_hdl_put() in the error path. Fix it. Fixes: 50e761516f2b8c ("media: platform: Add Cedrus VPU decoder driver") Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2e7c8fb8942773f412fe12f3b63e8bb92c18ab3f Author: Hans Verkuil Date: Wed Aug 12 12:30:33 2020 +0200 media: vicodec: add missing v4l2_ctrl_request_hdl_put() The check for a required control in the request was missing a call to v4l2_ctrl_request_hdl_put(), so the control request object was never released. Signed-off-by: Hans Verkuil Fixes: 997deb811bf5 ("media: vicodec: Add support for stateless decoder.") Reviewed-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab commit e027fffff799cdd70400c5485b1a54f482255985 Author: Thomas Gleixner Date: Wed Aug 26 22:21:44 2020 +0200 x86/irq: Unbreak interrupt affinity setting Several people reported that 5.8 broke the interrupt affinity setting mechanism. The consolidation of the entry code reused the regular exception entry code for device interrupts and changed the way how the vector number is conveyed from ptregs->orig_ax to a function argument. The low level entry uses the hardware error code slot to push the vector number onto the stack which is retrieved from there into a function argument and the slot on stack is set to -1. The reason for setting it to -1 is that the error code slot is at the position where pt_regs::orig_ax is. A positive value in pt_regs::orig_ax indicates that the entry came via a syscall. If it's not set to a negative value then a signal delivery on return to userspace would try to restart a syscall. But there are other places which rely on pt_regs::orig_ax being a valid indicator for syscall entry. But setting pt_regs::orig_ax to -1 has a nasty side effect vs. the interrupt affinity setting mechanism, which was overlooked when this change was made. Moving interrupts on x86 happens in several steps. A new vector on a different CPU is allocated and the relevant interrupt source is reprogrammed to that. But that's racy and there might be an interrupt already in flight to the old vector. So the old vector is preserved until the first interrupt arrives on the new vector and the new target CPU. Once that happens the old vector is cleaned up, but this cleanup still depends on the vector number being stored in pt_regs::orig_ax, which is now -1. That -1 makes the check for cleanup: pt_regs::orig_ax == new_vector always false. As a consequence the interrupt is moved once, but then it cannot be moved anymore because the cleanup of the old vector never happens. There would be several ways to convey the vector information to that place in the guts of the interrupt handling, but on deeper inspection it turned out that this check is pointless and a leftover from the old affinity model of X86 which supported multi-CPU affinities. Under this model it was possible that an interrupt had an old and a new vector on the same CPU, so the vector match was required. Under the new model the effective affinity of an interrupt is always a single CPU from the requested affinity mask. If the affinity mask changes then either the interrupt stays on the CPU and on the same vector when that CPU is still in the new affinity mask or it is moved to a different CPU, but it is never moved to a different vector on the same CPU. Ergo the cleanup check for the matching vector number is not required and can be removed which makes the dependency on pt_regs:orig_ax go away. The remaining check for new_cpu == smp_processsor_id() is completely sufficient. If it matches then the interrupt was successfully migrated and the cleanup can proceed. For paranoia sake add a warning into the vector assignment code to validate that the assumption of never moving to a different vector on the same CPU holds. Fixes: 633260fa143 ("x86/irq: Convey vector as argument and not in ptregs") Reported-by: Alex bykov Reported-by: Avi Kivity Reported-by: Alexander Graf Signed-off-by: Thomas Gleixner Tested-by: Alexander Graf Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87wo1ltaxz.fsf@nanos.tec.linutronix.de commit 52d6b926aabc47643cd910c85edb262b7f44c168 Author: Ashok Raj Date: Wed Aug 26 21:12:10 2020 -0700 x86/hotplug: Silence APIC only after all interrupts are migrated There is a race when taking a CPU offline. Current code looks like this: native_cpu_disable() { ... apic_soft_disable(); /* * Any existing set bits for pending interrupt to * this CPU are preserved and will be sent via IPI * to another CPU by fixup_irqs(). */ cpu_disable_common(); { .... /* * Race window happens here. Once local APIC has been * disabled any new interrupts from the device to * the old CPU are lost */ fixup_irqs(); // Too late to capture anything in IRR. ... } } The fix is to disable the APIC *after* cpu_disable_common(). Testing was done with a USB NIC that provided a source of frequent interrupts. A script migrated interrupts to a specific CPU and then took that CPU offline. Fixes: 60dcaad5736f ("x86/hotplug: Silence APIC and NMI when CPU is dead") Reported-by: Evan Green Signed-off-by: Ashok Raj Signed-off-by: Thomas Gleixner Tested-by: Mathias Nyman Tested-by: Evan Green Reviewed-by: Evan Green Cc: stable@vger.kernel.org Link: https://lore.kernel.org/lkml/875zdarr4h.fsf@nanos.tec.linutronix.de/ Link: https://lore.kernel.org/r/1598501530-45821-1-git-send-email-ashok.raj@intel.com commit 9aa37788e7ebb3f489fb4b71ce07adadd444264a Author: Cyril Roelandt Date: Tue Aug 25 23:22:31 2020 +0200 USB: Ignore UAS for JMicron JMS567 ATA/ATAPI Bridge This device does not support UAS properly and a similar entry already exists in drivers/usb/storage/unusual_uas.h. Without this patch, storage_probe() defers the handling of this device to UAS, which cannot handle it either. Tested-by: Brice Goglin Fixes: bc3bdb12bbb3 ("usb-storage: Disable UAS on JMicron SATA enclosure") Acked-by: Alan Stern CC: Signed-off-by: Cyril Roelandt Link: https://lore.kernel.org/r/20200825212231.46309-1-tipecaml@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1d4169834628d18b2392a2da92b7fbf5e8e2ce89 Author: Tang Bin Date: Wed Aug 26 22:49:31 2020 +0800 usb: host: ohci-exynos: Fix error handling in exynos_ohci_probe() If the function platform_get_irq() failed, the negative value returned will not be detected here. So fix error handling in exynos_ohci_probe(). And when get irq failed, the function platform_get_irq() logs an error message, so remove redundant message here. Fixes: 62194244cf87 ("USB: Add Samsung Exynos OHCI diver") Signed-off-by: Zhang Shengju Cc: stable Signed-off-by: Tang Bin Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200826144931.1828-1-tangbin@cmss.chinamobile.com Signed-off-by: Greg Kroah-Hartman commit bfd08d06d978d0304eb6f7855b548aa2cd1c5486 Author: Andy Shevchenko Date: Wed Aug 26 22:21:19 2020 +0300 USB: gadget: u_f: Unbreak offset calculation in VLAs Inadvertently the commit b1cd1b65afba ("USB: gadget: u_f: add overflow checks to VLA macros") makes VLA macros to always return 0 due to different scope of two variables of the same name. Obviously we need to have only one. Fixes: b1cd1b65afba ("USB: gadget: u_f: add overflow checks to VLA macros") Reported-by: Marek Szyprowski Tested-by: Marek Szyprowski Signed-off-by: Andy Shevchenko Cc: Brooke Basile Cc: stable Link: https://lore.kernel.org/r/20200826192119.56450-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 068834a2773b6a12805105cfadbb3d4229fc6e0a Author: Alan Stern Date: Wed Aug 26 15:46:24 2020 -0400 USB: quirks: Ignore duplicate endpoint on Sound Devices MixPre-D The Sound Devices MixPre-D audio card suffers from the same defect as the Sound Devices USBPre2: an endpoint shared between a normal audio interface and a vendor-specific interface, in violation of the USB spec. Since the USB core now treats duplicated endpoints as bugs and ignores them, the audio endpoint isn't available and the card can't be used for audio capture. Along the same lines as commit bdd1b147b802 ("USB: quirks: blacklist duplicate ep on Sound Devices USBPre2"), this patch adds a quirks entry saying to ignore ep5in for interface 1, leaving it available for use with standard audio interface 2. Reported-and-tested-by: Jean-Christophe Barnoud Signed-off-by: Alan Stern CC: Fixes: 3e4f8e21c4f2 ("USB: core: fix check for duplicate endpoints") Link: https://lore.kernel.org/r/20200826194624.GA412633@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 892fc9f6835ecf075efac20789b012c5c9997fcc Author: Dan Carpenter Date: Wed Aug 26 14:33:30 2020 +0300 dma-pool: Fix an uninitialized variable bug in atomic_pool_expand() The "page" pointer can be used with out being initialized. Fixes: d7e673ec2c8e ("dma-pool: Only allocate from CMA when in same memory zone") Signed-off-by: Dan Carpenter Signed-off-by: Christoph Hellwig commit 9d3004bf7ba32c89873bb8422671d52b4bb52ce1 Author: Simon Leiner Date: Tue Aug 25 11:31:53 2020 +0200 arm/xen: Add misuse warning to virt_to_gfn As virt_to_gfn uses virt_to_phys, it will return invalid addresses when used with vmalloc'd addresses. This patch introduces a warning, when virt_to_gfn is used in this way. Signed-off-by: Simon Leiner Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20200825093153.35500-2-simon@leiner.me Signed-off-by: Juergen Gross commit d742db70033c745e410523e00522ee0cfe2aa416 Author: Simon Leiner Date: Tue Aug 25 11:31:52 2020 +0200 xen/xenbus: Fix granting of vmalloc'd memory On some architectures (like ARM), virt_to_gfn cannot be used for vmalloc'd memory because of its reliance on virt_to_phys. This patch introduces a check for vmalloc'd addresses and obtains the PFN using vmalloc_to_pfn in that case. Signed-off-by: Simon Leiner Reviewed-by: Stefano Stabellini Link: https://lore.kernel.org/r/20200825093153.35500-1-simon@leiner.me Signed-off-by: Juergen Gross commit 45a36a18d01907710bad5258d81f76c18882ad88 Author: Sabrina Dubroca Date: Tue Aug 4 11:37:29 2020 +0200 xfrmi: drop ignore_df check before updating pmtu xfrm interfaces currently test for !skb->ignore_df when deciding whether to update the pmtu on the skb's dst. Because of this, no pmtu exception is created when we do something like: ping -s 1438 By dropping this check, the pmtu exception will be created and the next ping attempt will work. Fixes: f203b76d7809 ("xfrm: Add virtual xfrm interfaces") Reported-by: Xiumei Mu Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert commit c330fb1ddc0a922f044989492b7fcca77ee1db46 Author: Thomas Gleixner Date: Tue Aug 25 17:22:58 2020 +0200 XEN uses irqdesc::irq_data_common::handler_data to store a per interrupt XEN data pointer which contains XEN specific information. handler data is meant for interrupt handlers and not for storing irq chip specific information as some devices require handler data to store internal per interrupt information, e.g. pinctrl/GPIO chained interrupt handlers. This obviously creates a conflict of interests and crashes the machine because the XEN pointer is overwritten by the driver pointer. As the XEN data is not handler specific it should be stored in irqdesc::irq_data::chip_data instead. A simple sed s/irq_[sg]et_handler_data/irq_[sg]et_chip_data/ cures that. Cc: stable@vger.kernel.org Reported-by: Roman Shaposhnik Signed-off-by: Thomas Gleixner Tested-by: Roman Shaposhnik Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/87lfi2yckt.fsf@nanos.tec.linutronix.de Signed-off-by: Juergen Gross commit e035803797473c90052244dcf8eaec455f0c884f Merge: 60a10650e7e5f b67a468a4ccef Author: Dave Airlie Date: Thu Aug 27 12:44:04 2020 +1000 Merge tag 'amd-drm-fixes-5.9-2020-08-26' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.9-2020-08-26: amdgpu: - Misc display fixes - Backlight fixes - MPO fix for DCN1 - Fixes for Sienna Cichlid - Fixes for Navy Flounder - Vega SW CTF fixes - SMU fix for Raven - Fix a possible overflow in INFO ioctl - Gfx10 clockgating fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200826200801.17735-1-alexander.deucher@amd.com commit 60a10650e7e5f74e7d17393e763f2ff432b13784 Merge: 6284a418035f0 5e0c22d4a9dda Author: Dave Airlie Date: Thu Aug 27 12:36:32 2020 +1000 Merge tag 'drm-msm-fixes-2020-08-24' of https://gitlab.freedesktop.org/drm/msm into drm-fixes Some fixes for v5.9 plus the one opp/bandwidth scaling patch ("drm: msm: a6xx: use dev_pm_opp_set_bw to scale DDR") which was not included in the initial pull due to dependency on patch landing thru OPP tree Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Thu Aug 27 12:34:06 2020 +1000 Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes Two fixes: One fixes a bad interaction with the DRM scheduler, leading to some dma fences not getting signalled after hitting the job timeout. The other one fixes a GPU init regression, as apparently one old core doesn't likes us reading some of the identification registers. Signed-off-by: Dave Airlie From: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/aceebfe3af636346f5252bdf727cdd988bdcbdf2.camel@pengutronix.de commit 234a2c42fde5a193d44ab24552af3eb3c6ce5033 Merge: d012a7190fc1f d4035d104313c Author: Dave Airlie Date: Thu Aug 27 12:22:22 2020 +1000 Merge tag 'exynos-drm-fixes-v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes One fixup - Just drop __iommu annotation to fix sparse warning. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20200826071520.3140-1-daeinki@gmail.com commit 56450c20fe10d4d93f58019109aa4e06fc0b9206 Author: Jens Axboe Date: Wed Aug 26 18:58:26 2020 -0600 io_uring: clear req->result on IOPOLL re-issue Make sure we clear req->result, which was set to -EAGAIN for retry purposes, when moving it to the reissue list. Otherwise we can end up retrying a request more than once, which leads to weird results in the io-wq handling (and other spots). Cc: stable@vger.kernel.org Reported-by: Andres Freund Signed-off-by: Jens Axboe commit 3d7a9520f0c3e6a68b6de8c5812fc8b6d7a52626 Author: Olga Kornievskaia Date: Thu Aug 20 18:52:43 2020 -0400 NFSv4.1 handle ERR_DELAY error reclaiming locking state on delegation recall A client should be able to handle getting an ERR_DELAY error while doing a LOCK call to reclaim state due to delegation being recalled. This is a transient error that can happen due to server moving its volumes and invalidating its file location cache and upon reference to it during the LOCK call needing to do an expensive lookup (leading to an ERR_DELAY error on a PUTFH). Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit ff96b7485dd5547a3a34b23a566ffb49fc2df33c Merge: d012a7190fc1f 5de55ce951a14 Author: Trond Myklebust Date: Wed Aug 26 20:36:06 2020 -0400 Merge tag 'nfs-rdma-for-5.9-1' of git://git.linux-nfs.org/projects/anna/linux-nfs NFSoRDMA Client Bugfix for Linux 5.9 Bugfix: - xprtrdma: Release in-flight MRs on disconnect Signed-off-by: Trond Myklebust commit 5875568aa187c0330fdd81159d0d72f855886099 Merge: 7f6f32bb7d335 96ecdcc992eb7 Author: David S. Miller Date: Wed Aug 26 16:16:39 2020 -0700 Merge branch 'net-fix-netpoll-crash-with-bnxt' Jakub Kicinski says: ==================== net: fix netpoll crash with bnxt Rob run into crashes when using XDP on bnxt. Upon investigation it turns out that during driver reconfig irq core produces a warning message when IRQs are requested. This triggers netpoll, which in turn accesses uninitialized driver state. Same crash can also be triggered on this platform by changing the number of rings. Looks like we have two missing pieces here, netif_napi_add() has to make sure we start out with netpoll blocked. The driver also has to be more careful about when napi gets enabled. Tested XDP and channel count changes, the warning message no longer causes a crash. Not sure if the memory barriers added in patch 1 are necessary, but it seems we should have them. ==================== Signed-off-by: David S. Miller commit 96ecdcc992eb7f468b2cf829b0f5408a1fad4668 Author: Jakub Kicinski Date: Wed Aug 26 12:40:07 2020 -0700 bnxt: don't enable NAPI until rings are ready Netpoll can try to poll napi as soon as napi_enable() is called. It crashes trying to access a doorbell which is still NULL: BUG: kernel NULL pointer dereference, address: 0000000000000000 CPU: 59 PID: 6039 Comm: ethtool Kdump: loaded Tainted: G S 5.9.0-rc1-00469-g5fd99b5d9950-dirty #26 RIP: 0010:bnxt_poll+0x121/0x1c0 Code: c4 20 44 89 e0 5b 5d 41 5c 41 5d 41 5e 41 5f c3 41 8b 86 a0 01 00 00 41 23 85 18 01 00 00 49 8b 96 a8 01 00 00 0d 00 00 00 24 <89> 02 41 f6 45 77 02 74 cb 49 8b ae d8 01 00 00 31 c0 c7 44 24 1a netpoll_poll_dev+0xbd/0x1a0 __netpoll_send_skb+0x1b2/0x210 netpoll_send_udp+0x2c9/0x406 write_ext_msg+0x1d7/0x1f0 console_unlock+0x23c/0x520 vprintk_emit+0xe0/0x1d0 printk+0x58/0x6f x86_vector_activate.cold+0xf/0x46 __irq_domain_activate_irq+0x50/0x80 __irq_domain_activate_irq+0x32/0x80 __irq_domain_activate_irq+0x32/0x80 irq_domain_activate_irq+0x25/0x40 __setup_irq+0x2d2/0x700 request_threaded_irq+0xfb/0x160 __bnxt_open_nic+0x3b1/0x750 bnxt_open_nic+0x19/0x30 ethtool_set_channels+0x1ac/0x220 dev_ethtool+0x11ba/0x2240 dev_ioctl+0x1cf/0x390 sock_do_ioctl+0x95/0x130 Reported-by: Rob Sherwood Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Jakub Kicinski Reviewed-by: Michael Chan Signed-off-by: David S. Miller commit 96e97bc07e90f175a8980a22827faf702ca4cb30 Author: Jakub Kicinski Date: Wed Aug 26 12:40:06 2020 -0700 net: disable netpoll on fresh napis napi_disable() makes sure to set the NAPI_STATE_NPSVC bit to prevent netpoll from accessing rings before init is complete. However, the same is not done for fresh napi instances in netif_napi_add(), even though we expect NAPI instances to be added as disabled. This causes crashes during driver reconfiguration (enabling XDP, changing the channel count) - if there is any printk() after netif_napi_add() but before napi_enable(). To ensure memory ordering is correct we need to use RCU accessors. Reported-by: Rob Sherwood Fixes: 2d8bff12699a ("netpoll: Close race condition between poll_one_napi and napi_disable") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7f6f32bb7d3355cd78ebf1dece9a6ea7a0ca8158 Author: Ido Schimmel Date: Wed Aug 26 19:48:10 2020 +0300 ipv4: Silence suspicious RCU usage warning fib_info_notify_update() is always called with RTNL held, but not from an RCU read-side critical section. This leads to the following warning [1] when the FIB table list is traversed with hlist_for_each_entry_rcu(), but without a proper lockdep expression. Since modification of the list is protected by RTNL, silence the warning by adding a lockdep expression which verifies RTNL is held. [1] ============================= WARNING: suspicious RCU usage 5.9.0-rc1-custom-14233-g2f26e122d62f #129 Not tainted ----------------------------- net/ipv4/fib_trie.c:2124 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by ip/834: #0: ffffffff85a3b6b0 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x49a/0xbd0 stack backtrace: CPU: 0 PID: 834 Comm: ip Not tainted 5.9.0-rc1-custom-14233-g2f26e122d62f #129 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-2.fc32 04/01/2014 Call Trace: dump_stack+0x100/0x184 lockdep_rcu_suspicious+0x143/0x14d fib_info_notify_update+0x8d1/0xa60 __nexthop_replace_notify+0xd2/0x290 rtm_new_nexthop+0x35e2/0x5946 rtnetlink_rcv_msg+0x4f7/0xbd0 netlink_rcv_skb+0x17a/0x480 rtnetlink_rcv+0x22/0x30 netlink_unicast+0x5ae/0x890 netlink_sendmsg+0x98a/0xf40 ____sys_sendmsg+0x879/0xa00 ___sys_sendmsg+0x122/0x190 __sys_sendmsg+0x103/0x1d0 __x64_sys_sendmsg+0x7d/0xb0 do_syscall_64+0x32/0x50 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fde28c3be57 Code: 0c 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b7 0f 1f 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10 RSP: 002b:00007ffc09330028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fde28c3be57 RDX: 0000000000000000 RSI: 00007ffc09330090 RDI: 0000000000000003 RBP: 000000005f45f911 R08: 0000000000000001 R09: 00007ffc0933012c R10: 0000000000000076 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffc09330290 R14: 00007ffc09330eee R15: 00005610e48ed020 Fixes: 1bff1a0c9bbd ("ipv4: Add function to send route updates") Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 91244d108441013b7367b3b4dcc6869998676473 Author: Xie He Date: Tue Aug 25 20:03:53 2020 -0700 drivers/net/wan/lapbether: Set network_header before transmitting Set the skb's network_header before it is passed to the underlying Ethernet device for transmission. This patch fixes the following issue: When we use this driver with AF_PACKET sockets, there would be error messages of: protocol 0805 is buggy, dev (Ethernet interface name) printed in the system "dmesg" log. This is because skbs passed down to the Ethernet device for transmission don't have their network_header properly set, and the dev_queue_xmit_nit function in net/core/dev.c complains about this. Reason of setting the network_header to this place (at the end of the Ethernet header, and at the beginning of the Ethernet payload): Because when this driver receives an skb from the Ethernet device, the network_header is also set at this place. Cc: Martin Schiller Signed-off-by: Xie He Signed-off-by: David S. Miller commit 35bf948f1edbf507f6e57e0879fa6ea36d2d2930 Author: Jitao Shi Date: Mon Aug 17 21:06:40 2020 +0800 drm/mediatek: dsi: Fix scrolling of panel with small hfp or hbp horizontal_backporch_byte should be hbp * bpp - hbp extra bytes. So remove the wrong subtraction 10. Fixes: 7a5bc4e22ecf ("drm/mediatek: change the dsi phytiming calculate method") Signed-off-by: Jitao Shi Signed-off-by: Chun-Kuang Hu commit 1cec170d458b1d18f6f1654ca84c0804a701c5ef Author: Florian Westphal Date: Wed Aug 26 01:31:05 2020 +0200 mptcp: free acked data before waiting for more memory After subflow lock is dropped, more wmem might have been made available. This fixes a deadlock in mptcp_connect.sh 'mmap' mode: wmem is exhausted. But as the mptcp socket holds on to already-acked data (for retransmit) no wakeup will occur. Using 'goto restart' calls mptcp_clean_una(sk) which will free pages that have been acked completely in the mean time. Fixes: fb529e62d3f3 ("mptcp: break and restart in case mptcp sndbuf is full") Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 09e31cf0c528dac3358a081dc4e773d1b3de1bc9 Author: Vinicius Costa Gomes Date: Tue Aug 25 10:44:04 2020 -0700 taprio: Fix using wrong queues in gate mask Since commit 9c66d1564676 ("taprio: Add support for hardware offloading") there's a bit of inconsistency when offloading schedules to the hardware: In software mode, the gate masks are specified in terms of traffic classes, so if say "sched-entry S 03 20000", it means that the traffic classes 0 and 1 are open for 20us; when taprio is offloaded to hardware, the gate masks are specified in terms of hardware queues. The idea here is to fix hardware offloading, so schedules in hardware and software mode have the same behavior. What's needed to do is to map traffic classes to queues when applying the offload to the driver. Fixes: 9c66d1564676 ("taprio: Add support for hardware offloading") Signed-off-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit f4020438fab05364018c91f7e02ebdd192085933 Author: Eric Sandeen Date: Wed Aug 26 14:11:58 2020 -0700 xfs: fix boundary test in xfs_attr_shortform_verify The boundary test for the fixed-offset parts of xfs_attr_sf_entry in xfs_attr_shortform_verify is off by one, because the variable array at the end is defined as nameval[1] not nameval[]. Hence we need to subtract 1 from the calculation. This can be shown by: # touch file # setfattr -n root.a file and verifications will fail when it's written to disk. This only matters for a last attribute which has a single-byte name and no value, otherwise the combination of namelen & valuelen will push endp further out and this test won't fail. Fixes: 1e1bbd8e7ee06 ("xfs: create structure verifier function for shortform xattrs") Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 657f101930bc6c5b41bd7d6c22565c4302a80d33 Author: Brian Foster Date: Wed Aug 26 14:08:27 2020 -0700 xfs: fix off-by-one in inode alloc block reservation calculation The inode chunk allocation transaction reserves inobt_maxlevels-1 blocks to accommodate a full split of the inode btree. A full split requires an allocation for every existing level and a new root block, which means inobt_maxlevels is the worst case block requirement for a transaction that inserts to the inobt. This can lead to a transaction block reservation overrun when tmpfile creation allocates an inode chunk and expands the inobt to its maximum depth. This problem has been observed in conjunction with overlayfs, which makes frequent use of tmpfiles internally. The existing reservation code goes back as far as the Linux git repo history (v2.6.12). It was likely never observed as a problem because the traditional file/directory creation transactions also include worst case block reservation for directory modifications, which most likely is able to make up for a single block deficiency in the inode allocation portion of the calculation. tmpfile support is relatively more recent (v3.15), less heavily used, and only includes the inode allocation block reservation as tmpfiles aren't linked into the directory tree on creation. Fix up the inode alloc block reservation macro and a couple of the block allocator minleft parameters that enforce an allocation to leave enough free blocks in the AG for a full inobt split. Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9c516e0e4554e8f26ab73d46cbc789d7d8db664d Author: Brian Foster Date: Tue Aug 18 08:05:58 2020 -0700 xfs: finish dfops on every insert range shift iteration The recent change to make insert range an atomic operation used the incorrect transaction rolling mechanism. The explicit transaction roll does not finish deferred operations. This means that intents for rmapbt updates caused by extent shifts are not logged until the final transaction commits. Thus if a crash occurs during an insert range, log recovery might leave the rmapbt in an inconsistent state. This was discovered by repeated runs of generic/455. Update insert range to finish dfops on every shift iteration. This is similar to collapse range and ensures that intents are logged with the transactions that make associated changes. Fixes: dd87f87d87fa ("xfs: rework insert range into an atomic operation") Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b67a468a4ccef593cd8df6a02ba3d167b77f0c81 Author: Dinghao Liu Date: Wed Aug 26 21:24:58 2020 +0800 drm/amd/display: Fix memleak in amdgpu_dm_mode_config_init When amdgpu_display_modeset_create_props() fails, state and state->context should be freed to prevent memleak. It's the same when amdgpu_dm_audio_init() fails. Signed-off-by: Dinghao Liu Signed-off-by: Alex Deucher commit 82dff839c9b4adad6980cc9aa6ea18c16db49013 Author: Jiansong Chen Date: Wed Aug 26 14:11:52 2020 +0800 drm/amdgpu: disable runtime pm for navy_flounder Disable runtime pm for navy_flounder temporarily. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ef67d792a2fc578319399f605fbec2f99ecc06ea Author: Wayne Lin Date: Tue Aug 18 11:19:42 2020 +0800 drm/amd/display: Retry AUX write when fail occurs [Why] In dm_dp_aux_transfer() now, we forget to handle AUX_WR fail cases. We suppose every write wil get done successfully and hence some AUX commands might not sent out indeed. [How] Check if AUX_WR success. If not, retry it. Signed-off-by: Wayne Lin Reviewed-by: Hersen Wu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit b5b97cab55eb71daba3283c8b1d2cce456d511a1 Author: Alex Deucher Date: Tue Aug 25 11:43:45 2020 -0400 drm/amdgpu: Fix buffer overflow in INFO ioctl The values for "se_num" and "sh_num" come from the user in the ioctl. They can be in the 0-255 range but if they're more than AMDGPU_GFX_MAX_SE (4) or AMDGPU_GFX_MAX_SH_PER_SE (2) then it results in an out of bounds read. Reported-by: Dan Carpenter Acked-by: Dan Carpenter Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit e2bf3723db563457c0abe4eaeedac25bbbbd1d76 Author: Nicholas Kazlauskas Date: Fri Aug 14 11:49:13 2020 -0400 drm/amd/powerplay: Fix hardmins not being sent to SMU for RV [Why] DC uses these to raise the voltage as needed for higher dispclk/dppclk and to ensure that we have enough bandwidth to drive the displays. There's a bug preventing these from actuially sending messages since it's checking the actual clock (which is 0) instead of the incoming clock (which shouldn't be 0) when deciding to send the hardmin. [How] Check the clocks != 0 instead of the actual clocks. Fixes: 9ed9203c3ee7 ("drm/amd/powerplay: rv dal-pplib interface refactor powerplay part") Signed-off-by: Nicholas Kazlauskas Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 75947544c8abd380064c817e2a2f043914d49e55 Author: Jiansong Chen Date: Tue Aug 25 15:39:57 2020 +0800 drm/amdgpu: use MODE1 reset for navy_flounder by default Switch default gpu reset method to MODE1 for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 28e628645333b7e581c4a7b04d958e4804ea10fe Author: Evan Quan Date: Tue Aug 25 10:35:11 2020 +0800 drm/amd/pm: correct the thermal alert temperature limit settings Do the maths in celsius degree. This can fix the issues caused by the changes below: drm/amd/pm: correct Vega20 swctf limit setting drm/amd/pm: correct Vega12 swctf limit setting drm/amd/pm: correct Vega10 swctf limit setting Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 5de55ce951a1466e31ff68a7bc6b0a7ce3cb5947 Author: Chuck Lever Date: Mon Aug 17 11:19:26 2020 -0400 xprtrdma: Release in-flight MRs on disconnect Dan Aloni reports that when a server disconnects abruptly, a few memory regions are left DMA mapped. Over time this leak could pin enough I/O resources to slow or even deadlock an NFS/RDMA client. I found that if a transport disconnects before pending Send and FastReg WRs can be posted, the to-be-registered MRs are stranded on the req's rl_registered list and never released -- since they weren't posted, there's no Send completion to DMA unmap them. Reported-by: Dan Aloni Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker commit 14e4f3bd818a216dc85ab5ec9a33c49357a6369b Author: Tao Zhou Date: Tue Jul 28 12:44:59 2020 +0800 drm/amdgpu: add asd fw check before loading asd asd is not ready for some ASICs in early stage, and psp->asd_fw is more generic than ASIC name in the check. Signed-off-by: Tao Zhou Reviewed-by: Hawking Zhang Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit cba4b52e431e5de3d8012281cfe194f1c39a9052 Author: Brandon Syu Date: Wed Jun 10 16:44:33 2020 +0800 drm/amd/display: Keep current gain when ABM disable immediately [Why] When system enters s3/s0i3, backlight PWM would set user level. [How] ABM disable function add keep current gain to avoid it. Signed-off-by: Brandon Syu Reviewed-by: Josip Pavic Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit efbde23a3b0164cef27fd394e7d548f46af5b51d Author: Samson Tam Date: Thu Aug 13 10:50:21 2020 -0400 drm/amd/display: Fix passive dongle mistaken as active dongle in EDID emulation [Why] dongle_type is set during dongle connection but for passive dongles, dongle_type is not set. If user starts with an active dongle and then switches to a passive dongle, it will still report as an active dongle. Trying to emulate the wrong connecter type results in display not lighting up. [How] Set dpcd_caps.dongle_type for passive dongles in detect_dp(). Signed-off-by: Samson Tam Reviewed-by: Joshua Aberback Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit b61f05622ace5b9498ae279cdfd1c9f0c1ce3f75 Author: Jaehyun Chung Date: Mon Aug 10 16:02:47 2020 -0400 drm/amd/display: Revert HDCP disable sequence change [Why] Revert HDCP disable sequence change that blanks stream before disabling HDCP. PSP and HW teams are currently investigating the root cause of why HDCP cannot be disabled before stream blank, which is expected to work without issues. Signed-off-by: Jaehyun Chung Reviewed-by: Wenjing Liu Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit d2ce14fd99e91f3de667e5dba5b9affa3e40e725 Author: Sung Lee Date: Tue Aug 11 17:23:20 2020 -0400 drm/amd/display: Send DISPLAY_OFF after power down on boot [WHY] update_clocks might not be called on headless adapters. This means DISPLAY_OFF may not be sent in headless cases. [HOW] If hardware is powered down on boot because it is headless (mode set does not happen on that adapter) also send DISPLAY_OFF notification. Signed-off-by: Sung Lee Reviewed-by: Yongqiang Sun Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit de7a1b0b8753e1b0000084f0e339ffab295d27ef Author: Jiansong Chen Date: Mon Aug 24 18:44:09 2020 +0800 drm/amdgpu/gfx10: refine mgcg setting 1. enable ENABLE_CGTS_LEGACY to fix specviewperf11 random hang. 2. remove obsolete RLC_CGTT_SCLK_OVERRIDE workaround. Signed-off-by: Jiansong Chen Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 9b51c4b2ba31396f3894ccc7df8bdf067243e9f5 Author: Evan Quan Date: Fri Aug 21 12:21:30 2020 +0800 drm/amd/pm: correct Vega20 swctf limit setting Correct the Vega20 thermal swctf limit. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit e0ffd340249699ad27a6c91abdfa3e89f7823941 Author: Evan Quan Date: Fri Aug 21 12:18:58 2020 +0800 drm/amd/pm: correct Vega12 swctf limit setting Correct the Vega12 thermal swctf limit. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit b05d71b51078fc428c6b72582126d9d75d3c1f4c Author: Evan Quan Date: Fri Aug 21 12:05:03 2020 +0800 drm/amd/pm: correct Vega10 swctf limit setting Correct the Vega10 thermal swctf limit. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1267 Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 317951ee922cb561c0da62f6bbc568c96b2ad0d1 Author: Jiansong Chen Date: Fri Aug 21 16:20:47 2020 +0800 drm/amd/pm: set VCN pg per instances When deciding whether to set pg for vcn1, instances number is more generic than chip name. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f2cdef66dcef44bc26c06a2c070617272b1360a1 Author: Jiansong Chen Date: Fri Aug 21 11:30:19 2020 +0800 drm/amd/pm: enable run_btc callback for sienna_cichlid DC BTC support for sienna_cichlid is added, it provides the DC tolerance and aging measurements. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 5896585512e5156482335e902f7c7393b940da51 Author: Furquan Shaikh Date: Thu Aug 20 00:52:41 2020 -0700 drivers: gpu: amd: Initialize amdgpu_dm_backlight_caps object to 0 in amdgpu_dm_update_backlight_caps In `amdgpu_dm_update_backlight_caps()`, there is a local `amdgpu_dm_backlight_caps` object that is filled in by `amdgpu_acpi_get_backlight_caps()`. However, this object is uninitialized before the call and hence the subsequent check for aux_support can fail since it is not initialized by `amdgpu_acpi_get_backlight_caps()` as well. This change initializes this local `amdgpu_dm_backlight_caps` object to 0. Reviewed-by: Christian König Signed-off-by: Furquan Shaikh Signed-off-by: Alex Deucher commit 168f09cdadbd547c2b202246ef9a8183da725f13 Author: Nicholas Kazlauskas Date: Wed Aug 19 13:37:54 2020 -0400 drm/amd/display: Reject overlay plane configurations in multi-display scenarios [Why] These aren't stable on some platform configurations when driving multiple displays, especially on higher resolution. In particular the delay in asserting p-state and validating from x86 outweights any power or performance benefit from the hardware composition. Under some configurations this will manifest itself as extreme stutter or unresponsiveness especially when combined with cursor movement. [How] Disable these for now. Exposing overlays to userspace doesn't guarantee that they'll be able to use them in any and all configurations and it's part of the DRM contract to have userspace gracefully handle validation failures when they occur. Valdiation occurs as part of DC and this in particular affects RV, so disable this in dcn10_global_validation. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit 69d9f4278d0f9d24607645f10e5ac5c59c77a4ac Author: Alexander Monakov Date: Tue Aug 4 23:13:13 2020 +0300 drm/amd/display: use correct scale for actual_brightness Documentation for sysfs backlight level interface requires that values in both 'brightness' and 'actual_brightness' files are interpreted to be in range from 0 to the value given in the 'max_brightness' file. With amdgpu, max_brightness gives 255, and values written by the user into 'brightness' are internally rescaled to a wider range. However, reading from 'actual_brightness' gives the raw register value without inverse rescaling. This causes issues for various userspace tools such as PowerTop and systemd that expect the value to be in the correct range. Introduce a helper to retrieve internal backlight range. Use it to reimplement 'convert_brightness' as 'convert_brightness_from_user' and introduce 'convert_brightness_to_user'. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=203905 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1242 Cc: Alex Deucher Cc: Nicholas Kazlauskas Reviewed-by: Alex Deucher Signed-off-by: Alexander Monakov Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit ed9ab229fea24cbcab17f484297dc8344afb7ea9 Author: Tong Zhang Date: Sun Aug 16 03:32:12 2020 -0400 drm/amd/display: should check error using DC_OK core_link_read_dpcd returns only DC_OK(1) and DC_ERROR_UNEXPECTED(-1), the caller should check error using DC_OK instead of checking against 0 Signed-off-by: Tong Zhang Signed-off-by: Alex Deucher commit b19a8b3d36697d8cf8f9a305d85a313d931fef71 Author: Gustavo A. R. Silva Date: Tue Aug 25 18:57:12 2020 -0500 iio: dpot-dac: fix code comment in dpot_dac_read_raw() After the replacement of the /* fall through */ comment with the fallthrough pseudo-keyword macro, the natural reading of a code comment was broken. Fix the natural reading of such a comment and make it intelligible. Reported-by: Peter Rosin Acked-by: Peter Rosin Signed-off-by: Gustavo A. R. Silva commit 858e0ad9301d1270c02b5aca97537d2d6ee9dd68 Author: Kai Vehmanen Date: Wed Aug 26 20:03:06 2020 +0300 ALSA: hda/hdmi: always check pin power status in i915 pin fixup When system is suspended with active audio playback to HDMI/DP, two alternative sequences can happen at resume: a) monitor is detected first and ALSA prepare follows normal stream setup sequence, or b) ALSA prepare is called first, but monitor is not yet detected, so PCM is restarted without a pin, In case of (b), on i915 systems, haswell_verify_D0() is not called at resume and the pin power state may be incorrect. Result is lack of audio after resume with no error reported back to user-space. Fix the problem by always verifying converter and pin state in the i915_pin_cvt_fixup(). BugLink: https://github.com/thesofproject/linux/issues/2388 Signed-off-by: Kai Vehmanen Cc: Link: https://lore.kernel.org/r/20200826170306.701566-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit d563b6c834ae1da46fcb1f00f262c76a155aa231 Merge: c1e6414cdc371 db1a4250aef53 Author: Mark Brown Date: Wed Aug 26 19:26:59 2020 +0100 Merge series "ASoC: Fix return check for devm_regmap_init_sdw()" from Vinod Koul : This series attempts to fix return check for devm_regmap_init_sdw() Changes in v2: - Add missing patch for rt711 - Add patch for rt700 Vinod Koul (5): ASoC: max98373: Fix return check for devm_regmap_init_sdw() ASoC: rt1308-sdw: Fix return check for devm_regmap_init_sdw() ASoC: rt711: Fix return check for devm_regmap_init_sdw() ASoC: rt715: Fix return check for devm_regmap_init_sdw() ASoC: rt700: Fix return check for devm_regmap_init_sdw() sound/soc/codecs/max98373-sdw.c | 4 ++-- sound/soc/codecs/rt1308-sdw.c | 4 ++-- sound/soc/codecs/rt700-sdw.c | 4 ++-- sound/soc/codecs/rt711-sdw.c | 4 ++-- sound/soc/codecs/rt715-sdw.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) -- 2.26.2 commit c1e6414cdc371f9ed82cefebba7538499a3059f9 Author: Dinghao Liu Date: Thu Aug 20 12:28:27 2020 +0800 ASoC: qcom: common: Fix refcount imbalance on error for_each_child_of_node returns a node pointer np with refcount incremented. So when devm_kzalloc fails, a pairing refcount decrement is needed to keep np's refcount balanced. Fixes: 16395ceee11f8 ("ASoC: qcom: common: Fix NULL pointer in of parser") Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20200820042828.10308-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown commit db1a4250aef53775ec0094b81454213319cc8c74 Author: Vinod Koul Date: Wed Aug 26 22:03:40 2020 +0530 ASoC: rt700: Fix return check for devm_regmap_init_sdw() devm_regmap_init_sdw() returns a valid pointer on success or ERR_PTR on failure which should be checked with IS_ERR. Also use PTR_ERR for returning error codes. Reported-by: Takashi Iwai Fixes: 7d2a5f9ae41e ("ASoC: rt700: add rt700 codec driver") Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200826163340.3249608-6-vkoul@kernel.org Signed-off-by: Mark Brown commit 282eb0b52e3f0399ee48a4cad0d9ffec840b0164 Author: Vinod Koul Date: Wed Aug 26 22:03:39 2020 +0530 ASoC: rt715: Fix return check for devm_regmap_init_sdw() devm_regmap_init_sdw() returns a valid pointer on success or ERR_PTR on failure which should be checked with IS_ERR. Also use PTR_ERR for returning error codes. Reported-by: Takashi Iwai Fixes: d1ede0641b05 ("ASoC: rt715: add RT715 codec driver") Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200826163340.3249608-5-vkoul@kernel.org Signed-off-by: Mark Brown commit be1a4b2c56db860a220c6f74d461188e5733264a Author: Vinod Koul Date: Wed Aug 26 22:03:38 2020 +0530 ASoC: rt711: Fix return check for devm_regmap_init_sdw() devm_regmap_init_sdw() returns a valid pointer on success or ERR_PTR on failure which should be checked with IS_ERR. Also use PTR_ERR for returning error codes. Reported-by: Takashi Iwai Fixes: 320b8b0d13b8 ("ASoC: rt711: add rt711 codec driver") Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200826163340.3249608-4-vkoul@kernel.org Signed-off-by: Mark Brown commit 344850d93c098e1b17e6f89d5e436893e9762ef3 Author: Vinod Koul Date: Wed Aug 26 22:03:37 2020 +0530 ASoC: rt1308-sdw: Fix return check for devm_regmap_init_sdw() devm_regmap_init_sdw() returns a valid pointer on success or ERR_PTR on failure which should be checked with IS_ERR. Also use PTR_ERR for returning error codes. Reported-by: Takashi Iwai Fixes: a87a6653a28c ("ASoC: rt1308-sdw: add rt1308 SdW amplifier driver") Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200826163340.3249608-3-vkoul@kernel.org Signed-off-by: Mark Brown commit 6e0c9b5f90978287b5a3d38ee83203d295f375f1 Author: Vinod Koul Date: Wed Aug 26 22:03:36 2020 +0530 ASoC: max98373: Fix return check for devm_regmap_init_sdw() devm_regmap_init_sdw() returns a valid pointer on success or ERR_PTR on failure which should be checked with IS_ERR. Also use PTR_ERR for returning error codes. Reported-by: Takashi Iwai Fixes: 56a5b7910e96 ("ASoC: codecs: max98373: add SoundWire support") Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200826163340.3249608-2-vkoul@kernel.org Signed-off-by: Mark Brown commit 15bc20c6af4ceee97a1f90b43c0e386643c071b4 Merge: 27563ab6ef75a ea1fc02e12b64 Author: Linus Torvalds Date: Wed Aug 26 10:58:20 2020 -0700 Merge tag 'tty-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial fixes from Greg KH: "Here are a few small TTY/Serial/vt fixes for 5.9-rc3 Included in here are: - qcom serial fixes - vt ioctl and core bugfixes - pl011 serial driver fixes - 8250 serial driver fixes - other misc serial driver fixes and for good measure: - fbcon fix for syzbot found problem. All of these have been in linux-next for a while with no reported issues" * tag 'tty-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: serial: imx: add dependence and build for earlycon serial: samsung: Removes the IRQ not found warning serial: 8250: change lock order in serial8250_do_startup() serial: stm32: avoid kernel warning on absence of optional IRQ serial: pl011: Fix oops on -EPROBE_DEFER serial: pl011: Don't leak amba_ports entry on driver register error serial: 8250_exar: Fix number of ports for Commtech PCIe cards tty: serial: qcom_geni_serial: Drop __init from qcom_geni_console_setup serial: qcom_geni_serial: Fix recent kdb hang vt_ioctl: change VT_RESIZEX ioctl to check for error return from vc_resize() fbcon: prevent user font height or width change from causing potential out-of-bounds access vt: defer kfree() of vc_screenbuf in vc_do_resize() commit 27563ab6ef75abc64b7da2c7a321b7edd89dfcf7 Merge: 51c4518ab77c6 9c97cecab0d49 Author: Linus Torvalds Date: Wed Aug 26 10:50:50 2020 -0700 Merge tag 'char-misc-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small char and misc and other driver subsystem fixes for 5.9-rc3. The majority of these are tiny habanalabs driver fixes, but also in here are: - speakup build fixes now that it is out of staging and got exposed to more build systems all of a sudden - mei driver fix All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: habanalabs: correctly report inbound pci region cfg error habanalabs: check correct vmalloc return code habanalabs: validate FW file size habanalabs: fix incorrect check on failed workqueue create habanalabs: set max power according to card type habanalabs: proper handling of alloc size in coresight habanalabs: set clock gating according to mask habanalabs: verify user input in cs_ioctl_signal_wait habanalabs: Fix a loop in gaudi_extract_ecc_info() habanalabs: Fix memory corruption in debugfs habanalabs: validate packet id during CB parse habanalabs: Validate user address before mapping habanalabs: unmap PCI bars upon iATU failure mei: hdcp: fix mei_hdcp_verify_mprime() input parameter speakup: only build serialio when ISA is enabled speakup: Fix wait_for_xmitr for ttyio case commit 51c4518ab77c6d3e917675891a9a529daabfaef1 Merge: e652049b2018e b46b4a8a57c37 Author: Linus Torvalds Date: Wed Aug 26 10:44:15 2020 -0700 Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fixes from Wei Liu: "Two patches from Vineeth to improve Hyper-V timesync facility" * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: hv_utils: drain the timesync packets on onchannelcallback hv_utils: return error if host timesysnc update is stale commit e652049b2018e3a2e32d71c74cf7d359e07e7618 Merge: 2ac69819ba9e3 cbb523594eb71 Author: Linus Torvalds Date: Wed Aug 26 10:40:09 2020 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio bugfixes from Michael Tsirkin: "A couple vdpa and vhost bugfixes" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms vhost-iotlb: fix vhost_iotlb_itree_next() documentation vdpa: ifcvf: free config irq in ifcvf_free_irq() vdpa: ifcvf: return err when fail to request config irq commit 0fef948363f62494d779cf9dc3c0a86ea1e5f7cd Author: Jens Axboe Date: Wed Aug 26 10:36:20 2020 -0600 io_uring: make offset == -1 consistent with preadv2/pwritev2 The man page for io_uring generally claims were consistent with what preadv2 and pwritev2 accept, but turns out there's a slight discrepancy in how offset == -1 is handled for pipes/streams. preadv doesn't allow it, but preadv2 does. This currently causes io_uring to return -EINVAL if that is attempted, but we should allow that as documented. This change makes us consistent with preadv2/pwritev2 for just passing in a NULL ppos for streams if the offset is -1. Cc: stable@vger.kernel.org # v5.7+ Reported-by: Benedikt Ames Signed-off-by: Jens Axboe commit d4f07268d035721dd055ceb0de98ace6ac5f858b Author: Steve Wahl Date: Mon Aug 24 17:14:39 2020 -0500 MAINTAINERS: Add entry for HPE Superdome Flex (UV) maintainers Add an entry and email addresses for people at HPE who are supporting Linux on the Superdome Flex (a.k.a) UV platform. [ bp: Capitalize "linux" too :) ] Signed-off-by: Steve Wahl Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200824221439.GA52810@swahl-home.5wahls.com commit bffc2f7aa96343f91931272d7a8a2d8d925e1ab2 Author: Vasily Gorbik Date: Fri Aug 21 18:27:36 2020 +0200 s390/vmem: fix vmem_add_range for 4-level paging The kernel currently crashes if 4-level paging is used. Add missing p4d_populate for just allocated pud entry. Fixes: 3e0d3e408e63 ("s390/vmem: consolidate vmem_add_range() and vmem_remove_range()") Reviewed-by: Gerald Schaefer Signed-off-by: Vasily Gorbik commit 1196f12a2c960951d02262af25af0bb1775ebcc2 Author: Sven Schnelle Date: Thu Aug 20 09:48:23 2020 +0200 s390: don't trace preemption in percpu macros Since commit a21ee6055c30 ("lockdep: Change hardirq{s_enabled,_context} to per-cpu variables") the lockdep code itself uses percpu variables. This leads to recursions because the percpu macros are calling preempt_enable() which might call trace_preempt_on(). Signed-off-by: Sven Schnelle Reviewed-by: Vasily Gorbik Signed-off-by: Vasily Gorbik commit 79e5dc59e2974a48764269fa9ff544ae8ffe3338 Author: Martijn Coenen Date: Tue Aug 25 09:18:29 2020 +0200 loop: Set correct device size when using LOOP_CONFIGURE The device size calculation was done before processing the loop configuration, which meant that the we set the size on the underlying block device incorrectly in case lo_offset/lo_sizelimit were set in the configuration. Delay computing the size until we've setup the device parameters correctly. Fixes: 3448914e8cc5("loop: Add LOOP_CONFIGURE ioctl") Reported-by: Lennart Poettering Tested-by: Yang Xu Signed-off-by: Martijn Coenen Signed-off-by: Jens Axboe commit acb19e17c5134dd78668c429ecba5b481f038e6a Author: Hou Pu Date: Mon Aug 10 08:00:44 2020 -0400 nbd: restore default timeout when setting it to zero If we configured io timeout of nbd0 to 100s. Later after we finished using it, we configured nbd0 again and set the io timeout to 0. We expect it would timeout after 30 seconds and keep retry. But in fact we could not change the timeout when we set it to 0. the timeout is still the original 100s. So change the timeout to default 30s when we set it to zero. It also behaves same as commit 2da22da57348 ("nbd: fix zero cmd timeout handling v2"). It becomes more important if we were reconfigure a nbd device and the io timeout it set to zero. Because it could take 30s to detect the new socket and thus io could be completed more quickly compared to 100s. Signed-off-by: Hou Pu Reviewed-by: Josef Bacik Signed-off-by: Jens Axboe commit 5fd99b5d9950d6300467ded18ff4e44af0b4ae55 Author: YueHaibing Date: Wed Aug 26 14:52:31 2020 +0800 net: cdc_ncm: Fix build error If USB_NET_CDC_NCM is y and USB_NET_CDCETHER is m, build fails: drivers/net/usb/cdc_ncm.o:(.rodata+0x1d8): undefined reference to `usbnet_cdc_update_filter' Select USB_NET_CDCETHER for USB_NET_CDC_NCM to fix this. Reported-by: Hulk Robot Fixes: e10dcb1b6ba7 ("net: cdc_ncm: hook into set_rx_mode to admit multicast traffic") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 4ffb879ea648c2b42da4ca992ed3db87e564af69 Author: Peilin Ye Date: Mon Jul 27 10:00:02 2020 +0200 media: media/v4l2-core: Fix kernel-infoleak in video_put_user() video_put_user() is copying uninitialized stack memory to userspace due to the compiler not initializing holes in the structures declared on the stack. Fix it by initializing `ev32` and `vb32` using memset(). Reported-and-tested-by: syzbot+79d751604cb6f29fbf59@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=79d751604cb6f29fbf59 Cc: stable@vger.kernel.org Fixes: 1a6c0b36dd19 ("media: v4l2-core: fix VIDIOC_DQEVENT for time64 ABI") Fixes: 577c89b0ce72 ("media: v4l2-core: fix v4l2_buffer handling for time64 ABI") Reviewed-by: Laurent Pinchart Reviewed-by: Arnd Bergmann Signed-off-by: Peilin Ye Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bec2ddfd39f07ac2c1dec9fd5299424ad75c0a9d Author: Laurent Pinchart Date: Sun Aug 23 07:02:57 2020 +0200 media: ti-vpe: cal: Fix compilation on 32-bit ARM When compiled on 32-bit ARM, the CAL driver fails with the FIELD_PREP() macro complaining that the mask is not constant. While all callers of the inline cal_write_field() function pass a constant mask, the mask parameter itself is a variable, which likely doesn't please the compiler. Fix it by replacing FIELD_PREP() with a manual implementation. Fixes: 50797fb30b95 ("media: ti-vpe: cal: Turn reg_(read|write)_field() into inline functions") Signed-off-by: Laurent Pinchart Reviewed-by: Sakari Ailus Reported-by: Sakari Ailus Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a156998fc92d3859c8e820f1583f6d0541d643c3 Author: Yi Li Date: Wed Aug 26 13:11:50 2020 +0800 net: hns3: Fix for geneve tx checksum bug when skb->encapsulation is 0, skb->ip_summed is CHECKSUM_PARTIAL and it is udp packet, which has a dest port as the IANA assigned. the hardware is expected to do the checksum offload, but the hardware will not do the checksum offload when udp dest port is 6081. This patch fixes it by doing the checksum in software. Reported-by: Li Bing Signed-off-by: Yi Li Signed-off-by: David S. Miller commit 0a3445b82e0d66520345b7ef2b82df341a8c6db0 Merge: 2e1ec861a605d b43b9f53fbb06 Author: David S. Miller Date: Wed Aug 26 07:19:03 2020 -0700 Merge branch 'bnxt_en-Bug-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. This set of driver patches include bug fixes for ethtool get channels, ethtool statistics, ethtool NVRAM, AER recovery, a firmware reset issue that could potentially crash, hwmon temperature reporting issue on VF, and 2 fixes for regressions introduced by the recent user-defined RSS map feature. Please queue patches 1 to 6 for -stable. Thanks. ==================== Signed-off-by: David S. Miller commit b43b9f53fbb06faa4f2fcdbf235db3289026e2e4 Author: Michael Chan Date: Wed Aug 26 01:08:39 2020 -0400 bnxt_en: Setup default RSS map in all scenarios. The recent changes to support user-defined RSS map assume that RX rings are always reserved and the default RSS map is set after the RX rings are successfully reserved. If the firmware spec is older than 1.6.1, no ring reservations are required and the default RSS map is not setup at all. In another scenario where the fw Resource Manager is older, RX rings are not reserved and we also end up with no valid RSS map. Fix both issues in bnxt_need_reserve_rings(). In both scenarios described above, we don't need to reserve RX rings so we need to call this new function bnxt_check_rss_map_no_rmgr() to setup the default RSS map when needed. Without valid RSS map, the NIC won't receive packets properly. Fixes: 1667cbf6a4eb ("bnxt_en: Add logical RSS indirection table structure.") Reviewed-by: Vasundhara Volam Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 5fa65524f6e0b9528c6ceac3f33f7e8f0c3a084a Author: Edwin Peer Date: Wed Aug 26 01:08:38 2020 -0400 bnxt_en: init RSS table for Minimal-Static VF reservation There are no VF rings available during probe when the device is configured using the Minimal-Static reservation strategy. In this case, the RSS indirection table can only be initialized later, during bnxt_open_nic(). However, this was not happening because the rings will already have been reserved via bnxt_init_dflt_ring_mode(), causing bnxt_need_reserve_rings() to return false in bnxt_reserve_rings() and bypass the RSS table init. Solve this by pushing the call to bnxt_set_dflt_rss_indir_tbl() into __bnxt_reserve_rings(), which is common to both paths and is called whenever ring configuration is changed. After doing this, the RSS table init that must be called from bnxt_init_one() happens implicitly via bnxt_set_default_rings(), necessitating doing the allocation earlier in order to avoid a null pointer dereference. Fixes: bd3191b5d87d ("bnxt_en: Implement ethtool -X to set indirection table.") Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 12cce90b934bf2b0ed9c339b4d5503e69954351a Author: Edwin Peer Date: Wed Aug 26 01:08:37 2020 -0400 bnxt_en: fix HWRM error when querying VF temperature Firmware returns RESOURCE_ACCESS_DENIED for HWRM_TEMP_MONITORY_QUERY for VFs. This produces unpleasing error messages in the log when temp1_input is queried via the hwmon sysfs interface from a VF. The error is harmless and expected, so silence it and return unknown as the value. Since the device temperature is not particularly sensitive information, provide flexibility to change this policy in future by silencing the error rather than avoiding the HWRM call entirely for VFs. Fixes: cde49a42a9bb ("bnxt_en: Add hwmon sysfs support to read temperature") Cc: Marc Smith Reported-by: Marc Smith Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit b148bb238c02f0c7797efed026e9bba5892d2172 Author: Michael Chan Date: Wed Aug 26 01:08:36 2020 -0400 bnxt_en: Fix possible crash in bnxt_fw_reset_task(). bnxt_fw_reset_task() is run from a delayed workqueue. The current code is not cancelling the workqueue in the driver's .remove() method and it can potentially crash if the device is removed with the workqueue still pending. The fix is to clear the BNXT_STATE_IN_FW_RESET flag and then cancel the delayed workqueue in bnxt_remove_one(). bnxt_queue_fw_reset_work() also needs to check that this flag is set before scheduling. This will guarantee that no rescheduling will be done after it is cancelled. Fixes: 230d1f0de754 ("bnxt_en: Handle firmware reset.") Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit df3875ec550396974b1d8a518bd120d034738236 Author: Vasundhara Volam Date: Wed Aug 26 01:08:35 2020 -0400 bnxt_en: Fix PCI AER error recovery flow When a PCI error is detected the PCI state could be corrupt, save the PCI state after initialization and restore it after the slot reset. Fixes: 6316ea6db93d ("bnxt_en: Enable AER support.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 7de651490c27ebc5edb5c7224c368bd0cd5b3862 Author: Michael Chan Date: Wed Aug 26 01:08:34 2020 -0400 bnxt_en: Fix ethtool -S statitics with XDP or TCs enabled. We are returning the wrong count for ETH_SS_STATS in get_sset_count() when XDP or TCs are enabled. In a recent commit, we got rid of irrelevant counters when the ring is RX only or TX only, but we did not make the proper adjustments for the count. As a result, when we have XDP or TCs enabled, we are returning an excess count because some of the rings are TX only. This causes ethtool -S to display extra counters with no counter names. Fix bnxt_get_num_ring_stats() by not assuming that all rings will always have RX and TX counters in combined mode. Fixes: 125592fbf467 ("bnxt_en: show only relevant ethtool stats for a TX or RX ring") Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit dbbfa96ad920c50d58bcaefa57f5f33ceef9d00e Author: Vasundhara Volam Date: Wed Aug 26 01:08:33 2020 -0400 bnxt_en: Check for zero dir entries in NVRAM. If firmware goes into unstable state, HWRM_NVM_GET_DIR_INFO firmware command may return zero dir entries. Return error in such case to avoid zero length dma buffer request. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c1c2d77408022a398a1a7c51cf20488c922629de Author: Pavan Chebbi Date: Wed Aug 26 01:08:32 2020 -0400 bnxt_en: Don't query FW when netif_running() is false. In rare conditions like two stage OS installation, the ethtool's get_channels function may be called when the device is in D3 state, leading to uncorrectable PCI error. Check netif_running() first before making any query to FW which involves writing to BAR. Fixes: db4723b3cd2d ("bnxt_en: Check max_tx_scheduler_inputs value from firmware.") Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 2e1ec861a605d1d116f8c774f45e9f6a2b593cbb Author: Daniel Gorsulowski Date: Wed Aug 26 07:00:14 2020 +0200 net: dp83869: Fix RGMII internal delay configuration The RGMII control register at 0x32 indicates the states for the bits RGMII_TX_CLK_DELAY and RGMII_RX_CLK_DELAY as follows: RGMII Transmit/Receive Clock Delay 0x0 = RGMII transmit clock is shifted with respect to transmit/receive data. 0x1 = RGMII transmit clock is aligned with respect to transmit/receive data. This commit fixes the inversed behavior of these bits Fixes: 736b25afe284 ("net: dp83869: Add RGMII internal delay configuration") Signed-off-by: Daniel Gorsulowski Acked-by: Dan Murphy Signed-off-by: David S. Miller commit cbb523594eb718944b726ba52bb43a1d66188a17 Author: Nathan Chancellor Date: Fri Aug 21 15:50:19 2020 -0700 vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms Clang warns several times when building for 32-bit ARM along the lines of: drivers/vdpa/mlx5/net/mlx5_vnet.c:1462:31: warning: shift count >= width of type [-Wshift-count-overflow] ndev->mvdev.mlx_features |= BIT(VIRTIO_F_VERSION_1); ^~~~~~~~~~~~~~~~~~~~~~~ This is related to the BIT macro, which uses an unsigned long literal, which is 32-bit on ARM so having a shift equal to or larger than 32 will cause this warning, such as the above, where VIRTIO_F_VERSION_1 is 32. To avoid this, use BIT_ULL, which will be an unsigned long long. This matches the size of the features field throughout this driver, which is u64 so there should be no functional change. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Link: https://github.com/ClangBuiltLinux/linux/issues/1140 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20200821225018.940798-1-natechancellor@gmail.com Signed-off-by: Michael S. Tsirkin Reported-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Acked-by: Eli Cohen commit eb07d8f5ff32a0151967a56479fc3bd1003c303f Author: Stefano Garzarella Date: Tue Aug 25 15:05:43 2020 +0200 vhost-iotlb: fix vhost_iotlb_itree_next() documentation This patch contains trivial changes for the vhost_iotlb_itree_next() documentation, fixing the function name and the description of first argument (@map). Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20200825130543.43308-1-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 2b9f28d5e8efad34f472542315911c5ee9a65b6c Author: Jason Wang Date: Thu Jul 23 17:12:54 2020 +0800 vdpa: ifcvf: free config irq in ifcvf_free_irq() We don't free config irq in ifcvf_free_irq() which will trigger a BUG() in pci core since we try to free the vectors that has an action. Fixing this by recording the config irq in ifcvf_hw structure and free it in ifcvf_free_irq(). Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF") Cc: Zhu Lingshan Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20200723091254.20617-2-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Zhu Lingshan Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF") Cc: Zhu Lingshan <lingshan.zhu@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com> commit 9f4ce5d72b8e7a1f750598407c99f9e39dfb12fc Author: Jason Wang Date: Thu Jul 23 17:12:53 2020 +0800 vdpa: ifcvf: return err when fail to request config irq We ignore the err of requesting config interrupt, fix this. Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF") Cc: Zhu Lingshan Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20200723091254.20617-1-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Zhu Lingshan Fixes: e7991f376a4d ("ifcvf: implement config interrupt in IFCVF") Cc: Zhu Lingshan <lingshan.zhu@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Tested-by: Maxime Coquelin commit eb1f00237aca2e368b93db79303f8433d1976d10 Author: Peter Zijlstra Date: Fri Aug 7 20:53:16 2020 +0200 lockdep,trace: Expose tracepoints The lockdep tracepoints are under the lockdep recursion counter, this has a bunch of nasty side effects: - TRACE_IRQFLAGS doesn't work across the entire tracepoint - RCU-lockdep doesn't see the tracepoints either, hiding numerous "suspicious RCU usage" warnings. Pull the trace_lock_*() tracepoints completely out from under the lockdep recursion handling and completely rely on the trace level recusion handling -- also, tracing *SHOULD* not be taking locks in any case. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Link: https://lkml.kernel.org/r/20200821085348.782688941@infradead.org commit 044d0d6de9f50192f9697583504a382347ee95ca Author: Nicholas Piggin Date: Thu Jul 23 20:56:14 2020 +1000 lockdep: Only trace IRQ edges Problem: raw_local_irq_save(); // software state on local_irq_save(); // software state off ... local_irq_restore(); // software state still off, because we don't enable IRQs raw_local_irq_restore(); // software state still off, *whoopsie* existing instances: - lock_acquire() raw_local_irq_save() __lock_acquire() arch_spin_lock(&graph_lock) pv_wait() := kvm_wait() (same or worse for Xen/HyperV) local_irq_save() - trace_clock_global() raw_local_irq_save() arch_spin_lock() pv_wait() := kvm_wait() local_irq_save() - apic_retrigger_irq() raw_local_irq_save() apic->send_IPI() := default_send_IPI_single_phys() local_irq_save() Possible solutions: A) make it work by enabling the tracing inside raw_*() B) make it work by keeping tracing disabled inside raw_*() C) call it broken and clean it up now Now, given that the only reason to use the raw_* variant is because you don't want tracing. Therefore A) seems like a weird option (although it can be done). C) is tempting, but OTOH it ends up converting a _lot_ of code to raw just because there is one raw user, this strips the validation/tracing off for all the other users. So we pick B) and declare any code that ends up doing: raw_local_irq_save() local_irq_save() lockdep_assert_irqs_disabled(); broken. AFAICT this problem has existed forever, the only reason it came up is because commit: 859d069ee1dd ("lockdep: Prepare for NMI IRQ state tracking") changed IRQ tracing vs lockdep recursion and the first instance is fairly common, the other cases hardly ever happen. Signed-off-by: Nicholas Piggin [rewrote changelog] Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Link: https://lkml.kernel.org/r/20200723105615.1268126-1-npiggin@gmail.com commit 99dc56feb7932020502d40107a712fa302b32082 Author: Peter Zijlstra Date: Sat Aug 22 18:04:15 2020 +0200 mips: Implement arch_irqs_disabled() Cc: Thomas Bogendoerfer Cc: Paul Burton Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200826101653.GE1362448@hirez.programming.kicks-ass.net commit 021c109330ebc1f54b546c63a078ea3c31356ecb Author: Peter Zijlstra Date: Fri Aug 21 10:40:49 2020 +0200 arm64: Implement arch_irqs_disabled() Cc: Catalin Marinas Cc: Will Deacon Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/20200821085348.664425120@infradead.org commit 36206b588bc815e5f64e8da72d7ab79e00b76281 Author: Peter Zijlstra Date: Thu Aug 20 09:27:52 2020 +0200 nds32: Implement arch_irqs_disabled() Cc: Nick Hu Cc: Greentime Hu Cc: Vincent Chen Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Link: https://lkml.kernel.org/r/20200821085348.604899379@infradead.org commit 00b0ed2d4997af6d0a93edef820386951fd66d94 Author: Peter Zijlstra Date: Wed Aug 12 19:28:06 2020 +0200 locking/lockdep: Cleanup Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Link: https://lkml.kernel.org/r/20200821085348.546087214@infradead.org commit 7da93f379330f2be1122ca7f54ab1eb44ef9aa59 Author: Peter Zijlstra Date: Wed Aug 12 19:28:07 2020 +0200 x86/entry: Remove unused THUNKs Unused remnants Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Link: https://lkml.kernel.org/r/20200821085348.487040689@infradead.org commit 9864f5b5943ab0f1f835f21dc3f9f068d06f5b52 Author: Peter Zijlstra Date: Wed Aug 12 12:27:10 2020 +0200 cpuidle: Move trace_cpu_idle() into generic code Remove trace_cpu_idle() from the arch_cpu_idle() implementations and put it in the generic code, right before disabling RCU. Gets rid of more trace_*_rcuidle() users. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Link: https://lkml.kernel.org/r/20200821085348.428433395@infradead.org commit bf9282dc26e7fe2a0736edc568762f0f05d12416 Author: Peter Zijlstra Date: Wed Aug 12 12:22:17 2020 +0200 cpuidle: Make CPUIDLE_FLAG_TLB_FLUSHED generic This allows moving the leave_mm() call into generic code before rcu_idle_enter(). Gets rid of more trace_*_rcuidle() users. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Link: https://lkml.kernel.org/r/20200821085348.369441600@infradead.org commit 1098582a0f6c4e8fd28da0a6305f9233d02c9c1d Author: Peter Zijlstra Date: Fri Aug 7 20:50:19 2020 +0200 sched,idle,rcu: Push rcu_idle deeper into the idle path Lots of things take locks, due to a wee bug, rcu_lockdep didn't notice that the locking tracepoints were using RCU. Push rcu_idle_{enter,exit}() as deep as possible into the idle paths, this also resolves a lot of _rcuidle()/RCU_NONIDLE() usage. Specifically, sched_clock_idle_wakeup_event() will use ktime which will use seqlocks which will tickle lockdep, and stop_critical_timings() uses lock. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Link: https://lkml.kernel.org/r/20200821085348.310943801@infradead.org commit 49d9c5936314e44d314c605c39cce0fd947f9c3a Author: Peter Zijlstra Date: Thu Aug 20 16:47:24 2020 +0200 cpuidle: Fixup IRQ state Match the pattern elsewhere in this file. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Link: https://lkml.kernel.org/r/20200821085348.251340558@infradead.org commit fddf9055a60dfcc97bda5ef03c8fa4108ed555c5 Author: Peter Zijlstra Date: Thu Aug 20 09:13:30 2020 +0200 lockdep: Use raw_cpu_*() for per-cpu variables Sven reported that commit a21ee6055c30 ("lockdep: Change hardirq{s_enabled,_context} to per-cpu variables") caused trouble on s390 because their this_cpu_*() primitives disable preemption which then lands back tracing. On the one hand, per-cpu ops should use preempt_*able_notrace() and raw_local_irq_*(), on the other hand, we can trivialy use raw_cpu_*() ops for this. Fixes: a21ee6055c30 ("lockdep: Change hardirq{s_enabled,_context} to per-cpu variables") Reported-by: Sven Schnelle Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Tested-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200821085348.192346882@infradead.org commit c94a88f341c9b8f05d8639f62bb5d95936f881cd Author: Marco Elver Date: Thu Aug 20 19:20:46 2020 +0200 sched: Use __always_inline on is_idle_task() is_idle_task() may be used from noinstr functions such as irqentry_enter(). Since the compiler is free to not inline regular inline functions, switch to using __always_inline. Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200820172046.GA177701@elver.google.com commit 8bcea6cb2cbc1f749e574954569323dec5e2920e Author: Adrien Crivelli Date: Wed Aug 26 17:40:14 2020 +0900 ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion NT950XCJ-X716A The Galaxy Book Ion NT950XCJ-X716A (15 inches) uses the same ALC298 codec as other Samsung laptops which have the no headphone sound bug. I confirmed on my own hardware that this fixes the bug. This also correct the model name for the 13 inches version. It was incorrectly referenced as NT950XCJ-X716A in commit e17f02d05. But it should have been NP930XCJ-K01US. Fixes: e17f02d0559c ("ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423 Signed-off-by: Adrien Crivelli Cc: Link: https://lore.kernel.org/r/20200826084014.211217-1-adrien.crivelli@gmail.com Signed-off-by: Takashi Iwai commit 14335d8b9e1a2bf006f9d969a103f9731cabb210 Author: František Kučera Date: Tue Aug 25 17:31:13 2020 +0200 ALSA: usb-audio: Add basic capture support for Pioneer DJ DJM-250MK2 This patch extends support for DJM-250MK2 and allows recording. However, DVS is not possible yet (see the comment in code). Signed-off-by: František Kučera Cc: Link: https://lore.kernel.org/r/20200825153113.6352-1-konference@frantovo.cz Signed-off-by: Takashi Iwai commit 7c5b892e0871655fea3294ffac6fa3cc3400b60d Author: Joshua Sivec Date: Tue Aug 25 18:55:18 2020 +0200 ALSA: usb-audio: Add implicit feedback quirk for UR22C This uses the same quirk as the Motu and SSL2 devices. Tested on the UR22C. Fixes bug 208851. Signed-off-by: Joshua Sivec BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208851 Cc: Link: https://lore.kernel.org/r/20200825165515.8239-1-sivec@posteo.net Signed-off-by: Takashi Iwai commit d4035d104313cc43b34381b585a7407f069a5132 Author: Marek Szyprowski Date: Mon Jul 13 09:07:08 2020 +0200 drm/exynos: gem: Fix sparse warning kvaddr element of the exynos_gem object points to a memory buffer, thus it should not have a __iomem annotation. Then, to avoid a warning or casting on assignment to fbi structure, the screen_buffer element of the union should be used instead of the screen_base. Reported-by: kernel test robot Suggested-by: Sam Ravnborg Signed-off-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Sam Ravnborg Signed-off-by: Inki Dae commit 460f26d3ee70ec25b3bf8d08e0c79936212d36b6 Author: Gurchetan Singh Date: Mon Jun 15 16:05:00 2020 -0700 drm/virtio: Revert "drm/virtio: Call the right shmem helpers" This reverts commit d323bb44e4d23802eb25d13de1f93f2335bd60d0. Fixes a double-free regression: [ 4.357928] drm_gem_shmem_free_object+0xb4/0x100 [ 4.358983] virtio_gpu_dequeue_ctrl_func+0xd9/0x290 [ 4.360343] process_one_work+0x1d2/0x3a0 [ 4.361581] worker_thread+0x45/0x3c0 [ 4.362645] kthread+0xf6/0x130 [ 4.363543] ? process_one_work+0x3a0/0x3a0 [ 4.364770] ? kthread_park+0x80/0x80 [ 4.365799] ret_from_fork+0x35/0x40 [ 4.367103] Modules linked in: [ 4.367958] CR2: 0000000000000018 [ 4.368857] ---[ end trace db84f7a2974d5c79 ]--- [ 4.370118] RIP: 0010:dma_direct_unmap_sg+0x1f/0x60 In addition, virtio has it's own set of dma-ops so there's not an obviously clean way to transition to shmem helpers. Fixes: d323bb44e4d2 ("drm/virtio: Call the right shmem helpers") Signed-off-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20200615230500.551-1-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann (cherry picked from commit 51c3b0cc32d2e17581fce5b487ee95bbe9e8270a) commit 2ac69819ba9e3d8d550bb5d2d2df74848e556812 Merge: abb3438d69fb6 ad112aa8b1ac4 Author: Linus Torvalds Date: Tue Aug 25 18:01:36 2020 -0700 Merge tag 'nfsd-5.9-1' of git://git.linux-nfs.org/projects/cel/cel-2.6 Pull nfs server fixes from Chuck Lever: - Eliminate an oops introduced in v5.8 - Remove a duplicate #include added by nfsd-5.9 * tag 'nfsd-5.9-1' of git://git.linux-nfs.org/projects/cel/cel-2.6: SUNRPC: remove duplicate include nfsd: fix oops on mixed NFSv4/NFSv3 client access commit 9f13457377907fa253aef560e1a37e1ca4197f9b Author: Mingming Cao Date: Tue Aug 25 13:26:41 2020 -0400 ibmvnic fix NULL tx_pools and rx_tools issue at do_reset At the time of do_rest, ibmvnic tries to re-initalize the tx_pools and rx_pools to avoid re-allocating the long term buffer. However there is a window inside do_reset that the tx_pools and rx_pools were freed before re-initialized making it possible to deference null pointers. This patch fix this issue by always check the tx_pool and rx_pool are not NULL after ibmvnic_login. If so, re-allocating the pools. This will avoid getting into calling reset_tx/rx_pools with NULL adapter tx_pools/rx_pools pointer. Also add null pointer check in reset_tx_pools and reset_rx_pools to safe handle NULL pointer case. Signed-off-by: Mingming Cao Signed-off-by: Dany Madden Signed-off-by: David S. Miller commit ceb2465c51195967f11f6507538579816ac67cb8 Merge: f107cee94ba4d 821fc9e261f3a Author: Thomas Gleixner Date: Wed Aug 26 01:36:07 2020 +0200 Merge tag 'irqchip-fixes-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - Revert the wholesale conversion to platform drivers of the pdc, sysirq and cirq drivers, as it breaks a number of platforms even when the driver is built-in (probe ordering bites you). - Prevent interrupt from being lost with the STM32 exti driver - Fix wake-up interrupts for the MIPS Ingenic driver - Fix an embarassing typo in the new module helpers, leading to the probe failing most of the time - The promised TI firmware rework that couldn't make it into the merge window due to a very badly managed set of dependencies commit 2ea370a9173f4a3c80b24221049359a5d1518bc0 Author: Vignesh Raghavendra Date: Tue Aug 25 22:55:06 2020 +0530 spi: spi-cadence-quadspi: Populate get_name() interface Implement get_name() interface of spi_controller_mem_ops so as to avoid changing of mtd->name due to driver being moved over to spi-mem framework from SPI NOR. This avoids breaking of MTD cmdline args being passed by bootloaders which maybe using old driver name. Fixes: 31fb632b5d43c ("spi: Move cadence-quadspi driver to drivers/spi/") Reported-by: Jan Kiszka Suggested-by: Boris Brezillon Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200825172506.14375-1-vigneshr@ti.com Signed-off-by: Mark Brown commit abb3438d69fb6dd5baa4ae23eafbf5b87945eff1 Merge: d7d1f235aaffb 2217b98262468 Author: Linus Torvalds Date: Tue Aug 25 11:59:23 2020 -0700 Merge tag 'm68knommu-for-v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu fix from Greg Ungerer: "Only a single fix for the binfmt_flat loader (reverting a recent change)" * tag 'm68knommu-for-v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: binfmt_flat: revert "binfmt_flat: don't offset the data start" commit 00d23d516e2e7900cd1bd577c1f84794ae7ff3a7 Author: Jens Axboe Date: Tue Aug 25 12:59:22 2020 -0600 io_uring: ensure read requests go through -ERESTART* transformation We need to call kiocb_done() for any ret < 0 to ensure that we always get the proper -ERESTARTSYS (and friends) transformation done. At some point this should be tied into general error handling, so we can get rid of the various (mostly network) related commands that check and perform this substitution. Signed-off-by: Jens Axboe commit d7d1f235aaffbac15a07455a774aca42d027638c Merge: b9aa527ae38ba c2affe920b0e0 Author: Linus Torvalds Date: Tue Aug 25 11:42:43 2020 -0700 Merge tag 'libnvdimm-fix-v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Vishal Verma: "A couple of minor fixes for things merged in 5.9-rc1. One is an out-of-bounds access caught by KASAN, and the second is a tweak to some overzealous logging about dax support even for traditional block devices which was unnecessary" * tag 'libnvdimm-fix-v5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: do not print error message for non-persistent memory block device libnvdimm: KASAN: global-out-of-bounds Read in internal_create_group commit 9dab14b81807a40dab8e464ec87043935c562c2c Author: Jens Axboe Date: Tue Aug 25 12:27:50 2020 -0600 io_uring: don't use poll handler if file can't be nonblocking read/written There's no point in using the poll handler if we can't do a nonblocking IO attempt of the operation, since we'll need to go async anyway. In fact this is actively harmful, as reading from eg pipes won't return 0 to indicate EOF. Cc: stable@vger.kernel.org # v5.7+ Reported-by: Benedikt Ames Signed-off-by: Jens Axboe commit b9aa527ae38ba0ee998ced376b040fc92b0a2c03 Merge: 6a9dc5fd6170d 5b0545dc18444 Author: Linus Torvalds Date: Tue Aug 25 11:13:29 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - regression fix / revert of a commit that intended to reduce probing delay by ~50ms, but introduced a race that causes quite a few devices not to enumerate, or get stuck on first IRQ - buffer overflow fix in hiddev, from Peilin Ye * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: Revert "HID: usbhid: do not sleep when opening device" HID: hiddev: Fix slab-out-of-bounds write in hiddev_ioctl_usage() HID: quirks: Always poll three more Lenovo PixArt mice HID: i2c-hid: Always sleep 60ms after I2C_HID_PWR_ON commands HID: macally: Constify macally_id_table HID: cougar: Constify cougar_id_table commit 6b7898eb180df12767933466b7855b23103ad489 Author: Jens Axboe Date: Tue Aug 25 07:58:00 2020 -0600 io_uring: fix imbalanced sqo_mm accounting We do the initial accounting of locked_vm and pinned_vm before we have setup ctx->sqo_mm, which means we can end up having not accounted the memory at setup time, but still decrement it when we exit. This causes an imbalance in the accounting. Setup ctx->sqo_mm earlier in io_uring_create(), before we do the first accounting of mm->{locked,pinned}_vm. This also unifies the state grabbing for the ctx, and eliminates a failure case in io_sq_offload_start(). Fixes: f74441e6311a ("io_uring: account locked memory before potential error case") Reported-by: Robert M. Muncrief Reported-by: Niklas Schnelle Tested-by: Niklas Schnelle Tested-by: Robert M. Muncrief Signed-off-by: Jens Axboe commit d062085d61b1c2015845d1d9c475266381cce785 Author: Kuninori Morimoto Date: Tue Aug 25 08:38:54 2020 +0900 ASoC: ti: fixup ams_delta_mute() function name commit 059374fe9ea5d ("ASoC: ti: merge .digital_mute() into .mute_stream()") merged .digital_mute() into .mute_stream(). But it didn't rename ams_delta_digital_mute() to ams_delta_mute(). This patch fixup it. Signed-off-by: Kuninori Morimoto Reported-by: kernel test robot Link: https://lore.kernel.org/r/87blizy5ts.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7ad26d6671db758c959d7e1d100b138a38483612 Author: Kuninori Morimoto Date: Tue Aug 25 08:39:24 2020 +0900 ASoC: pcm3168a: ignore 0 Hz settings Some sound card try to set 0 Hz as reset, but it is impossible. This patch ignores it to avoid error return. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6yjy5sy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2c6500e82e5190b038f0b79f85a20da55bdd4b86 Author: Murali Karicheri Date: Mon Aug 24 11:10:53 2020 -0400 net: ethernet: ti: cpsw_new: fix clean up of vlan mc entries for host port To flush the vid + mc entries from ALE, which is required when a VLAN interface is removed, driver needs to call cpsw_ale_flush_multicast() with ALE_PORT_HOST for port mask as these entries are added only for host port. Without this, these entries remain in the ALE table even after removing the VLAN interface. cpsw_ale_flush_multicast() calls cpsw_ale_flush_mcast which expects a port mask to do the job. Fixes: ed3525eda4c4 ("net: ethernet: ti: introduce cpsw switchdev based driver part 1 - dual-emac") Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller commit 99d469fc64d06f0c81c0fe2a1c01645a67e0cbf0 Author: Murali Karicheri Date: Mon Aug 24 11:10:52 2020 -0400 net: ethernet: ti: cpsw: fix clean up of vlan mc entries for host port To flush the vid + mc entries from ALE, which is required when a VLAN interface is removed, driver needs to call cpsw_ale_flush_multicast() with ALE_PORT_HOST for port mask as these entries are added only for host port. Without this, these entries remain in the ALE table even after removing the VLAN interface. cpsw_ale_flush_multicast() calls cpsw_ale_flush_mcast which expects a port mask to do the job. Fixes: 15180eca569b ("net: ethernet: ti: cpsw: fix vlan mcast") Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller commit e104684108fc8b846dbca889f28257a65a956874 Author: Tong Zhang Date: Mon Aug 24 18:08:06 2020 -0400 net: caif: fix error code handling cfpkt_peek_head return 0 and 1, caller is checking error using <0 Signed-off-by: Tong Zhang Signed-off-by: David S. Miller commit 8e4efd4706f77d76c99f78f8859e1d61fae5142a Author: Sumera Priyadarsini Date: Tue Aug 25 01:33:11 2020 +0530 net: dsa: mt7530: Add of_node_put() before break and return statements Every iteration of for_each_child_of_node() decrements the reference count of the previous node, however when control is transferred from the middle of the loop, as in the case of a return or break or goto, there is no decrement thus ultimately resulting in a memory leak. Fix a potential memory leak in mt7530.c by inserting of_node_put() before the break and return statements. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini Signed-off-by: David S. Miller commit e3eb6e8fba65094328b8dca635d00de74ba75b45 Author: Rafael J. Wysocki Date: Mon Aug 24 19:35:31 2020 +0200 PM: sleep: core: Fix the handling of pending runtime resume requests It has been reported that system-wide suspend may be aborted in the absence of any wakeup events due to unforseen interactions of it with the runtume PM framework. One failing scenario is when there are multiple devices sharing an ACPI power resource and runtime-resume needs to be carried out for one of them during system-wide suspend (for example, because it needs to be reconfigured before the whole system goes to sleep). In that case, the runtime-resume of that device involves turning the ACPI power resource "on" which in turn causes runtime-resume requests to be queued up for all of the other devices sharing it. Those requests go to the runtime PM workqueue which is frozen during system-wide suspend, so they are not actually taken care of until the resume of the whole system, but the pm_runtime_barrier() call in __device_suspend() sees them and triggers system wakeup events for them which then cause the system-wide suspend to be aborted if wakeup source objects are in active use. Of course, the logic that leads to triggering those wakeup events is questionable in the first place, because clearly there are cases in which a pending runtime resume request for a device is not connected to any real wakeup events in any way (like the one above). Moreover, it is racy, because the device may be resuming already by the time the pm_runtime_barrier() runs and so if the driver doesn't take care of signaling the wakeup event as appropriate, it will be lost. However, if the driver does take care of that, the extra pm_wakeup_event() call in the core is redundant. Accordingly, drop the conditional pm_wakeup_event() call fron __device_suspend() and make the latter call pm_runtime_barrier() alone. Also modify the comment next to that call to reflect the new code and extend it to mention the need to avoid unwanted interactions between runtime PM and system-wide device suspend callbacks. Fixes: 1e2ef05bb8cf8 ("PM: Limit race conditions between runtime PM and system sleep (v2)") Signed-off-by: Rafael J. Wysocki Acked-by: Alan Stern Reported-by: Utkarsh H Patel Tested-by: Utkarsh H Patel Tested-by: Pengfei Xu Cc: All applicable commit 33f61d725a86e9ae02bf504e9372ba973c010ddc Author: Rafael J. Wysocki Date: Fri Aug 21 19:42:55 2020 +0200 ACPI: OSL: Prevent acpi_release_memory() from returning too early After commit 1757659d022b ("ACPI: OSL: Implement deferred unmapping of ACPI memory") in some cases acpi_release_memory() may return before the target memory mappings actually go away, because they are released asynchronously now. Prevent it from returning prematurely by making it wait for the next RCU grace period to elapse, for all of the RCU callbacks to complete and for all of the scheduled work items to be flushed before returning. Fixes: 1757659d022b ("ACPI: OSL: Implement deferred unmapping of ACPI memory") Reported-by: Kenneth R. Crudup Tested-by: Kenneth R. Crudup Signed-off-by: Rafael J. Wysocki Reviewed-by: Heikki Krogerus Reviewed-by: Mika Westerberg commit 23e26d0577535f5ffe4ff8ed6d06e009553c0bca Author: Badhri Jagan Sridharan Date: Mon Aug 17 11:46:01 2020 -0700 usb: typec: tcpm: Fix Fix source hard reset response for TDA 2.3.1.1 and TDA 2.3.1.2 failures The patch addresses the compliance test failures while running TDA 2.3.1.1 and TDA 2.3.1.2 of the "PD Communications Engine USB PD Compliance MOI" test plan published in https://www.usb.org/usbc. For a product to be Type-C compliant, it's expected that these tests are run on usb.org certified Type-C compliance tester as mentioned in https://www.usb.org/usbc. While the purpose of TDA 2.3.1.1 and TDA 2.3.1.2 is to verify that the static and dynamic electrical capabilities of a Source meet the requirements for each PDO offered, while doing so, the tests also monitor that the timing of the VBUS waveform versus the messages meets the requirements for Hard Reset defined in PROT-PROC-HR-TSTR as mentioned in step 11 of TDA.2.3.1.1 and step 15 of TDA.2.3.1.2. TDB.2.2.13.1: PROT-PROC-HR-TSTR Procedure and Checks for Tester Originated Hard Reset Purpose: To perform the appropriate protocol checks relating to any circumstance in which the Hard Reset signal is sent by the Tester. UUT is behaving as source: The Tester sends a Hard Reset signal. 1. Check VBUS stays within present valid voltage range for tPSHardReset min (25ms) after last bit of Hard Reset signal. [PROT_PROC_HR_TSTR_1] 2. Check that VBUS starts to fall below present valid voltage range by tPSHardReset max (35ms). [PROT_PROC_HR_TSTR_2] 3. Check that VBUS reaches vSafe0V within tSafe0v max (650 ms). [PROT_PROC_HR_TSTR_3] 4. Check that VBUS starts rising to vSafe5V after a delay of tSrcRecover (0.66s - 1s) from reaching vSafe0V. [PROT_PROC_HR_TSTR_4] 5. Check that VBUS reaches vSafe5V within tSrcTurnOn max (275ms) of rising above vSafe0v max (0.8V). [PROT_PROC_HR_TSTR_5] Power Delivery Compliance Plan 139 6. Check that Source Capabilities are finished sending within tFirstSourceCap max (250ms) of VBUS reaching vSafe5v min. [PROT_PROC_HR_TSTR_6]. This is in line with 7.1.5 Response to Hard Resets of the USB Power Delivery Specification Revision 3.0, Version 1.2, "Hard Reset Signaling indicates a communication failure has occurred and the Source Shall stop driving VCONN, Shall remove Rp from the VCONN pin and Shall drive VBUS to vSafe0V as shown in Figure 7-9. The USB connection May reset during a Hard Reset since the VBUS voltage will be less than vSafe5V for an extended period of time. After establishing the vSafe0V voltage condition on VBUS, the Source Shall wait tSrcRecover before re-applying VCONN and restoring VBUS to vSafe5V. A Source Shall conform to the VCONN timing as specified in [USB Type-C 1.3]." With the above guidelines from the spec in mind, TCPM does not turn off VCONN while entering SRC_HARD_RESET_VBUS_OFF. The patch makes TCPM turn off VCONN while entering SRC_HARD_RESET_VBUS_OFF and turn it back on while entering SRC_HARD_RESET_VBUS_ON along with vbus instead of having VCONN on through hardreset. Also, the spec clearly states that "After establishing the vSafe0V voltage condition on VBUS", the Source Shall wait tSrcRecover before re-applying VCONN and restoring VBUS to vSafe5V. TCPM does not conform to this requirement. If the TCPC driver calls tcpm_vbus_change with vbus off signal, TCPM right away enters SRC_HARD_RESET_VBUS_ON without waiting for tSrcRecover. For TCPC's which are buggy/does not call tcpm_vbus_change, TCPM assumes that the vsafe0v is instantaneous as TCPM only waits tSrcRecover instead of waiting for tSafe0v + tSrcRecover. This patch also fixes this behavior by making sure that TCPM waits for tSrcRecover before transitioning into SRC_HARD_RESET_VBUS_ON when tcpm_vbus_change is called by TCPC. When TCPC does not call tcpm_vbus_change, TCPM assumes the worst case i.e. tSafe0v + tSrcRecover before transitioning into SRC_HARD_RESET_VBUS_ON. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Cc: stable Link: https://lore.kernel.org/r/20200817184601.1899929-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 41dd70b368278f3ac789bed25bc810f764e14bbf Author: 周琰杰 (Zhou Yanjie) Date: Tue Aug 25 16:16:54 2020 +0800 USB: PHY: JZ4770: Fix static checker warning. The commit 2a6c0b82e651 ("USB: PHY: JZ4770: Add support for new Ingenic SoCs.") introduced the initialization function for different chips, but left the relevant code involved in the resetting process in the original function, resulting in uninitialized variable calls. Fixes: 2a6c0b82e651 ("USB: PHY: JZ4770: Add support for new Ingenic SoCs."). Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20200825081654.18186-2-zhouyanjie@wanyeetech.com Signed-off-by: Greg Kroah-Hartman commit 2b74b0a04d3e9f9f08ff026e5663dce88ff94e52 Author: Brooke Basile Date: Tue Aug 25 09:07:27 2020 -0400 USB: gadget: f_ncm: add bounds checks to ncm_unwrap_ntb() Some values extracted by ncm_unwrap_ntb() could possibly lead to several different out of bounds reads of memory. Specifically the values passed to netdev_alloc_skb_ip_align() need to be checked so that memory is not overflowed. Resolve this by applying bounds checking to a number of different indexes and lengths of the structure parsing logic. Reported-by: Ilja Van Sprundel Signed-off-by: Brooke Basile Acked-by: Felipe Balbi Cc: stable Signed-off-by: Greg Kroah-Hartman commit b1cd1b65afba95971fa457dfdb2c941c60d38c5b Author: Brooke Basile Date: Tue Aug 25 09:05:08 2020 -0400 USB: gadget: u_f: add overflow checks to VLA macros size can potentially hold an overflowed value if its assigned expression is left unchecked, leading to a smaller than needed allocation when vla_group_size() is used by callers to allocate memory. To fix this, add a test for saturation before declaring variables and an overflow check to (n) * sizeof(type). If the expression results in overflow, vla_group_size() will return SIZE_MAX. Reported-by: Ilja Van Sprundel Suggested-by: Kees Cook Signed-off-by: Brooke Basile Acked-by: Felipe Balbi Cc: stable Signed-off-by: Greg Kroah-Hartman commit b274e47d9e3f4dcd4ad4028a316ec22dc4533ac7 Author: Nicolas Dichtel Date: Tue Aug 25 14:59:40 2020 +0200 gtp: add GTPA_LINK info to msg sent to userspace During a dump, this attribute is essential, it enables the userspace to know on which interface the context is linked to. Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Nicolas Dichtel Tested-by: Gabriel Ganne Signed-off-by: David S. Miller commit 842163154b87b01d8f516af15ad8916eb1661016 Author: Jens Axboe Date: Mon Aug 24 11:45:26 2020 -0600 io_uring: revert consumed iov_iter bytes on error Some consumers of the iov_iter will return an error, but still have bytes consumed in the iterator. This is an issue for -EAGAIN, since we rely on a sane iov_iter state across retries. Fix this by ensuring that we revert consumed bytes, if any, if the file operations have consumed any bytes from iterator. This is similar to what generic_file_read_iter() does, and is always safe as we have the previous bytes count handy already. Fixes: ff6165b2d7f6 ("io_uring: retain iov_iter state over io_read/io_write calls") Reported-by: Dmitry Shulyak Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe commit 9d682ea6bcc76b8b2691c79add59f7d99c881635 Author: Hans de Goede Date: Tue Aug 25 13:12:57 2020 +0200 vboxsf: Fix the check for the old binary mount-arguments struct Fix the check for the mainline vboxsf code being used with the old mount.vboxsf mount binary from the out-of-tree vboxsf version doing a comparison between signed and unsigned data types. This fixes the following smatch warnings: fs/vboxsf/super.c:390 vboxsf_parse_monolithic() warn: impossible condition '(options[1] == (255)) => ((-128)-127 == 255)' fs/vboxsf/super.c:391 vboxsf_parse_monolithic() warn: impossible condition '(options[2] == (254)) => ((-128)-127 == 254)' fs/vboxsf/super.c:392 vboxsf_parse_monolithic() warn: impossible condition '(options[3] == (253)) => ((-128)-127 == 253)' Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Hans de Goede Signed-off-by: Al Viro commit 6d6018fc30bee67290dbed2fa51123f7c6f3d691 Author: Madhuparna Bhowmik Date: Fri Aug 21 09:14:23 2020 +0530 drivers/dma/dma-jz4780: Fix race condition between probe and irq handler In probe, IRQ is requested before zchan->id is initialized which can be read in the irq handler. Hence, shift request irq after other initializations complete. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Madhuparna Bhowmik Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/20200821034423.12713-1-madhuparnabhowmik10@gmail.com Signed-off-by: Vinod Koul commit 05655541c9503bfd01af4e6cbd7f5a29ac748e6c Author: Gustavo Pimentel Date: Thu Aug 13 16:14:04 2020 +0200 dmaengine: dw-edma: Fix scatter-gather address calculation Fix the source and destination physical address calculation of a peripheral device on scatter-gather implementation. This issue manifested during tests using a 64 bits architecture system. The abnormal behavior wasn't visible before due to all previous tests were done using 32 bits architecture system, that masked his effect. Fixes: e63d79d1ffcd ("dmaengine: Add Synopsys eDMA IP core driver") Cc: stable@vger.kernel.org Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/8d3ab7e2ba96563fe3495b32f60077fffb85307d.1597327623.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit 33ebffa105990c43bf336cabe26c77384f59fe70 Author: Peter Ujfalusi Date: Mon Aug 24 15:01:08 2020 +0300 dmaengine: ti: k3-udma: Fix the TR initialization for prep_slave_sg The TR which needs to be initialized for the next sg entry is indexed by tr_idx and not by the running i counter. In case any sub element in the SG needs more than one TR, the code would corrupt an already configured TR. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200824120108.9178-1-peter.ujfalusi@ti.com Fixes: 6cf668a4ef829 ("dmaengine: ti: k3-udma: Use the TR counter helper for slave_sg and cyclic") Signed-off-by: Vinod Koul commit 0661cef675d37e2c4b66a996389ebeae8568e49e Author: Marek Szyprowski Date: Tue Aug 25 08:46:17 2020 +0200 dmaengine: pl330: Fix burst length if burst size is smaller than bus width Move the burst len fixup after setting the generic value for it. This finally enables the fixup introduced by commit 137bd11090d8 ("dmaengine: pl330: Align DMA memcpy operations to MFIFO width"), which otherwise was overwritten by the generic value. Reported-by: kernel test robot Fixes: 137bd11090d8 ("dmaengine: pl330: Align DMA memcpy operations to MFIFO width") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200825064617.16193-1-m.szyprowski@samsung.com Signed-off-by: Vinod Koul commit eed8f88b109aa927fbf0d0c80ff9f8d00444ca7f Author: Tiezhu Yang Date: Tue Aug 25 17:39:48 2020 +0800 Revert "ALSA: hda: Add support for Loongson 7A1000 controller" This reverts commit 61eee4a7fc40 ("ALSA: hda: Add support for Loongson 7A1000 controller") to fix the following error on the Loongson LS7A platform: rcu: INFO: rcu_preempt self-detected stall on CPU NMI backtrace for cpu 0 CPU: 0 PID: 68 Comm: kworker/0:2 Not tainted 5.8.0+ #3 Hardware name: , BIOS Workqueue: events azx_probe_work [snd_hda_intel] Call Trace: [] show_stack+0x9c/0x130 [] dump_stack+0xb0/0xf0 [] nmi_cpu_backtrace+0x134/0x140 [] nmi_trigger_cpumask_backtrace+0x190/0x200 [] rcu_dump_cpu_stacks+0x12c/0x190 [] rcu_sched_clock_irq+0xa2c/0xfc8 [] update_process_times+0x2c/0xb8 [] tick_sched_timer+0x40/0xb8 [] __hrtimer_run_queues+0x118/0x1d0 [] hrtimer_interrupt+0x12c/0x2d8 [] c0_compare_interrupt+0x74/0xa0 [] __handle_irq_event_percpu+0xa8/0x198 [] handle_irq_event_percpu+0x30/0x90 [] handle_percpu_irq+0x88/0xb8 [] generic_handle_irq+0x44/0x60 [] do_IRQ+0x18/0x28 [] plat_irq_dispatch+0x64/0x100 [] handle_int+0x140/0x14c [] irq_exit+0xf8/0x100 Because AZX_DRIVER_GENERIC can not work well for Loongson LS7A HDA controller, it needs some workarounds which are not merged into the upstream kernel at this time, so it should revert this patch now. Fixes: 61eee4a7fc40 ("ALSA: hda: Add support for Loongson 7A1000 controller") Cc: # 5.9-rc1+ Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1598348388-2518-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Takashi Iwai commit 3bec5b6aae830355e786e204b20a7cea38c3a8ed Merge: a577f3456c0a2 d012a7190fc1f Author: Mark Brown Date: Tue Aug 25 11:01:46 2020 +0100 Merge tag 'v5.9-rc2' into regulator-5.9 Linux 5.9-rc2 commit 1959ba4e40ce40c380dbe868433f5c4b20bb1ba3 Merge: 0235bc04627d0 d012a7190fc1f Author: Mark Brown Date: Tue Aug 25 11:00:43 2020 +0100 Merge tag 'v5.9-rc2' into asoc-5.9 Linux 5.9-rc2 commit 821fc9e261f3af235752f46e59084467cfd440c4 Author: Paul Cercueil Date: Wed Aug 19 20:06:02 2020 +0200 irqchip/ingenic: Leave parent IRQ unmasked on suspend All the wakeup sources we possibly want will go through the interrupt controller, so the parent IRQ must not be masked during suspend, or there won't be any way to wake up the system. Signed-off-by: Paul Cercueil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200819180602.136969-1-paul@crapouillou.net commit e579076ac0a3bebb440fab101aef3c42c9f4c709 Author: qiuguorui1 Date: Thu Aug 20 11:16:29 2020 +0800 irqchip/stm32-exti: Avoid losing interrupts due to clearing pending bits by mistake In the current code, when the eoi callback of the exti clears the pending bit of the current interrupt, it will first read the values of fpr and rpr, then logically OR the corresponding bit of the interrupt number, and finally write back to fpr and rpr. We found through experiments that if two exti interrupts, we call them int1/int2, arrive almost at the same time. in our scenario, the time difference is 30 microseconds, assuming int1 is triggered first. there will be an extreme scenario: both int's pending bit are set to 1, the irq handle of int1 is executed first, and eoi handle is then executed, at this moment, all pending bits are cleared, but the int 2 has not finally been reported to the cpu yet, which eventually lost int2. According to stm32's TRM description about rpr and fpr: Writing a 1 to this bit will trigger a rising edge event on event x, Writing 0 has no effect. Therefore, when clearing the pending bit, we only need to clear the pending bit of the irq. Fixes: 927abfc4461e7 ("irqchip/stm32: Add stm32mp1 support with hierarchy domain") Signed-off-by: qiuguorui1 Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org # v4.18+ Link: https://lore.kernel.org/r/20200820031629.15582-1-qiuguorui1@huawei.com commit a150dac5a8fb711fdc378c23f44bee4546f04246 Author: Marc Zyngier Date: Tue Aug 25 10:38:39 2020 +0100 irqchip: Revert modular support for drivers using IRQCHIP_PLATFORM_DRIVER helperse It has become obvious that switching a number of irqchip drivers to being platform drivers without considering the platform was a mistake. We have multiple reports of end-point drivers not probing because the irqchip driver isn't there yet, breaking the expectations of the users. This patch reverts: 920ecb8c35cb ("irqchip/mtk-cirq: Convert to a platform driver") f97dbf48ca43 ("irqchip/mtk-sysirq: Convert to a platform driver") 5be57099d445 ("irqchip/qcom-pdc: Switch to using IRQCHIP_PLATFORM_DRIVER helper macros") 95bf9305d2e3 ("irqchip/qcom-pdc: Allow QCOM_PDC to be loadable as a permanent module") and leave QCOM PDC, MTK sysrq and cirq drivers as built-in, special purpose drivers for the time being until we have worked out a better solution. Reported-by: Enric Balletbo i Serra Reported-by: Frank Wunderlich Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/93debe6a0308b66d3f307af67ba7ec2c@kernel.org commit 710d4d916e6d84aa3f1507db1f1dfce8f60211a1 Author: Michal Simek Date: Mon Aug 24 10:25:23 2020 +0200 dt-bindings: mmc: Add missing description for clk_in/out_sd1 The commit a8fdb80f4d47 ("arm64: zynqmp: Add ZynqMP SDHCI compatible string") added clock-output-names for both SDHCIs before DT binding yaml conversion. But only clk_in/out_sd0 clock names have been covered by DT binding which ends up with dt yaml checking warnings as: From schema: .../Documentation/devicetree/bindings/mmc/arasan,sdhci.yaml ... mmc@ff170000: clock-output-names:0: 'clk_out_sd0' was expected ... mmc@ff170000: clock-output-names:1: 'clk_in_sd0' was expected Fixes: 16ecd8f33c6e ("dt-bindings: mmc: convert arasan sdhci bindings to yaml") Signed-off-by: Michal Simek Reviewed-by: Manish Narani Link: https://lore.kernel.org/r/aef586778921c93377ec2f31c86e151b6e93f6c7.1598257520.git.michal.simek@xilinx.com Signed-off-by: Ulf Hansson commit 7fd5b25499bcec157dd4de9a713425efcf4571cd Author: Tomi Valkeinen Date: Wed Aug 19 13:30:21 2020 +0300 drm/omap: fix incorrect lock state After commit 92cc68e35863c1c61c449efa2b2daef6e9926048 ("drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_on()") omapdrm locking is broken: WARNING: inconsistent lock state 5.8.0-rc2-00483-g92cc68e35863 #13 Tainted: G W -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. swapper/0/0 [HC1[1]:SC0[0]:HE0:SE1] takes: ea98222c (&dev->event_lock#2){?.+.}-{2:2}, at: drm_handle_vblank+0x4c/0x520 [drm] {HARDIRQ-ON-W} state was registered at: trace_hardirqs_on+0x9c/0x1ec _raw_spin_unlock_irq+0x20/0x58 omap_crtc_atomic_enable+0x54/0xa0 [omapdrm] drm_atomic_helper_commit_modeset_enables+0x218/0x270 [drm_kms_helper] omap_atomic_commit_tail+0x48/0xc4 [omapdrm] commit_tail+0x9c/0x190 [drm_kms_helper] drm_atomic_helper_commit+0x154/0x188 [drm_kms_helper] drm_client_modeset_commit_atomic+0x228/0x268 [drm] drm_client_modeset_commit_locked+0x60/0x1d0 [drm] drm_client_modeset_commit+0x24/0x40 [drm] drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xa8 [drm_kms_helper] drm_fb_helper_set_par+0x2c/0x5c [drm_kms_helper] drm_fb_helper_hotplug_event.part.0+0xa0/0xbc [drm_kms_helper] drm_kms_helper_hotplug_event+0x24/0x30 [drm_kms_helper] output_poll_execute+0x1a8/0x1c0 [drm_kms_helper] process_one_work+0x268/0x800 worker_thread+0x30/0x4e0 kthread+0x164/0x190 ret_from_fork+0x14/0x20 The reason for this is that omapdrm calls drm_crtc_vblank_on() while holding event_lock taken with spin_lock_irq(). It is not clear why drm_crtc_vblank_on() and drm_crtc_vblank_get() are called while holding event_lock. I don't see any problem with moving those calls outside the lock, which is what this patch does. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200819103021.440288-1-tomi.valkeinen@ti.com Reviewed-by: Laurent Pinchart commit 2d9ad4cfaf4d32a64a4ed556e5bcab9121215026 Merge: 77ef38574beb3 d012a7190fc1f Author: Maarten Lankhorst Date: Tue Aug 25 11:00:02 2020 +0200 Merge tag 'v5.9-rc2' into drm-misc-fixes Backmerge requested by Tomi for a fix to omap inconsistent locking state issue, and because we need at least v5.9-rc2 now. Signed-off-by: Maarten Lankhorst commit 813050e0a9b871ac575abfd3d321f74916df609d Author: Mika Westerberg Date: Wed Jun 24 21:45:03 2020 +0300 thunderbolt: Use maximum USB3 link rate when reclaiming if link is not up If the USB3 link is not up the actual link rate is 0 so when reclaiming bandwidth we should look at maximum supported link rate instead. Cc: stable@vger.kernel.org Fixes: 0bd680cd900c ("thunderbolt: Add USB3 bandwidth management") Signed-off-by: Mika Westerberg commit 8824d19b45867be75d375385414c4f06719a11a4 Author: Nikunj A. Dadhania Date: Tue Jul 21 17:05:23 2020 +0530 thunderbolt: Disable ports that are not implemented Commit 4caf2511ec49 ("thunderbolt: Add trivial .shutdown") exposes a bug in the Thunderbolt driver, that frees an unallocated id, resulting in the following spinlock bad magic bug. [ 20.633803] BUG: spinlock bad magic on CPU#4, halt/3313 [ 20.640030] lock: 0xffff92e6ad5c97e0, .magic: 00000000, .owner: /-1, .owner_cpu: 0 [ 20.672139] Call Trace: [ 20.675032] dump_stack+0x97/0xdb [ 20.678950] ? spin_bug+0xa5/0xb0 [ 20.682865] do_raw_spin_lock+0x68/0x98 [ 20.687397] _raw_spin_lock_irqsave+0x3f/0x5d [ 20.692535] ida_destroy+0x4f/0x124 [ 20.696657] tb_switch_release+0x6d/0xfd [ 20.701295] device_release+0x2c/0x7d [ 20.705622] kobject_put+0x8e/0xac [ 20.709637] tb_stop+0x55/0x66 [ 20.713243] tb_domain_remove+0x36/0x62 [ 20.717774] nhi_remove+0x4d/0x58 Fix the issue by disabling ports that are enabled as per the EEPROM, but not implemented. While at it, update the kernel doc for the disabled field, to reflect this. Cc: stable@vger.kernel.org Fixes: 4caf2511ec49 ("thunderbolt: Add trivial .shutdown") Reported-by: Srikanth Nandamuri Signed-off-by: Nikunj A. Dadhania Signed-off-by: Mika Westerberg commit e5f10d6385cda083037915c12b130887c8831d2b Author: Mika Kuoppala Date: Mon Aug 17 22:59:26 2020 +0300 drm/i915: Fix cmd parser desc matching with masks Our variety of defined gpu commands have the actual command id field and possibly length and flags applied. We did start to apply the mask during initialization of the cmd descriptors but forgot to also apply it on comparisons. Fix comparisons in order to properly deny access with associated commands. v2: fix lri with correct mask (Chris) References: 926abff21a8f ("drm/i915/cmdparser: Ignore Length operands during command matching") Reported-by: Nicolai Stange Cc: stable@vger.kernel.org # v5.4+ Cc: Miroslav Benes Cc: Takashi Iwai Cc: Tyler Hicks Cc: Jon Bloomfield Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200817195926.12671-1-mika.kuoppala@linux.intel.com (cherry picked from commit 3b4efa148da36f158cce3f662e831af2834b8e0f) Signed-off-by: Jani Nikula commit 0204081128d582965e9e39ca83ee6e4f7d27142b Author: Ray Jui Date: Fri Aug 14 15:40:08 2020 -0700 i2c: iproc: Fix shifting 31 bits Fix undefined behaviour in the iProc I2C driver by using 'BIT' marcro. Reported-by: Wolfram Sang Signed-off-by: Ray Jui Acked-by: Florian Fainelli [wsa: in commit msg, don't say 'checkpatch' but name the issue] Signed-off-by: Wolfram Sang commit 914a7b3563b8fb92f976619bbd0fa3a4a708baae Author: Wolfram Sang Date: Mon Aug 17 14:19:30 2020 +0200 i2c: rcar: in slave mode, clear NACK earlier Currently, a NACK in slave mode is set/cleared when SCL is held low by the IP core right before the bit is about to be pushed out. This is too late for clearing and then a NACK from the previous byte is still used for the current one. Now, let's clear the NACK right after we detected the STOP condition following the NACK. Fixes: de20d1857dd6 ("i2c: rcar: add slave support") Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 23d63a31d9f44d7daeac0d1fb65c6a73c70e5216 Author: Mohan Kumar Date: Tue Aug 25 10:54:15 2020 +0530 ALSA: hda/tegra: Program WAKEEN register for Tegra The WAKEEN bits are used to indicate which bits in the STATESTS register may cause wake event during the codec state change request. Configure the WAKEEN register for the Tegra to detect the wake events. Signed-off-by: Mohan Kumar Acked-by: Sameer Pujar Link: https://lore.kernel.org/r/20200825052415.20626-3-mkumard@nvidia.com Signed-off-by: Takashi Iwai commit 216116eae43963c662eb84729507bad95214ca6b Author: Mohan Kumar Date: Tue Aug 25 10:54:14 2020 +0530 ALSA: hda: Fix 2 channel swapping for Tegra The Tegra HDA codec HW implementation has an issue related to not swapping the 2 channel Audio Sample Packet(ASP) channel mapping. Whatever the FL and FR mapping specified the left channel always comes out of left speaker and right channel on right speaker. So add condition to disallow the swapping of FL,FR during the playback. Signed-off-by: Mohan Kumar Acked-by: Sameer Pujar Link: https://lore.kernel.org/r/20200825052415.20626-2-mkumard@nvidia.com Signed-off-by: Takashi Iwai commit ee0761d1d8222bcc5c86bf10849dc86cf008557c Author: Tong Zhang Date: Mon Aug 24 18:45:41 2020 -0400 ALSA: ca0106: fix error code handling snd_ca0106_spi_write() returns 1 on error, snd_ca0106_pcm_power_dac() is returning the error code directly, and the caller is expecting an negative error code Signed-off-by: Tong Zhang Cc: Link: https://lore.kernel.org/r/20200824224541.1260307-1-ztong0001@gmail.com Signed-off-by: Takashi Iwai commit e4682b8a688bc3352e663545ad51997c3d84877b Author: Andy Shevchenko Date: Fri Aug 21 20:03:34 2020 +0300 i2c: acpi: Remove dead code, i.e. i2c_acpi_match_device() We have no users of i2c_acpi_match_device() anymore and seems will not have them in the future, thus remove dead code. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang commit e3cb82c6d6f6c27ab754e13ae29bdd6b949982e2 Author: Andy Shevchenko Date: Fri Aug 21 20:03:33 2020 +0300 i2c: core: Don't fail PRP0001 enumeration when no ID table exist When commit c64ffff7a9d1 ("i2c: core: Allow empty id_table in ACPI case as well") fixed the enumeration of I²C devices on ACPI enabled platforms when driver has no ID table, it missed the PRP0001 support. i2c_device_match() and i2c_acpi_match_device() differently match driver against given device. Use acpi_driver_match_device(), that is used in the former, in i2c_device_probe() and don't fail PRP0001 enumeration when no ID table exist. Fixes: c64ffff7a9d1 ("i2c: core: Allow empty id_table in ACPI case as well") BugLink: https://stackoverflow.com/q/63519678/2511795 Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Wolfram Sang commit 7787b6fc938e16aa418613c4a765c1dbb268ed9f Author: Tobias Klauser Date: Mon Aug 24 16:20:47 2020 +0200 bpf, sysctl: Let bpf_stats_handler take a kernel pointer buffer Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") changed ctl_table.proc_handler to take a kernel pointer. Adjust the signature of bpf_stats_handler to match ctl_table.proc_handler which fixes the following sparse warning: kernel/sysctl.c:226:49: warning: incorrect type in argument 3 (different address spaces) kernel/sysctl.c:226:49: expected void * kernel/sysctl.c:226:49: got void [noderef] __user *buffer kernel/sysctl.c:2640:35: warning: incorrect type in initializer (incompatible argument 3 (different address spaces)) kernel/sysctl.c:2640:35: expected int ( [usertype] *proc_handler )( ... ) kernel/sysctl.c:2640:35: got int ( * )( ... ) Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Signed-off-by: Tobias Klauser Signed-off-by: Alexei Starovoitov Cc: Christoph Hellwig Link: https://lore.kernel.org/bpf/20200824142047.22043-1-tklauser@distanz.ch commit 2b10af318ad305b8e56f1f7ad78ea3ba20aadc01 Author: Jesper Dangaard Brouer Date: Mon Aug 24 13:57:20 2020 +0200 selftests/bpf: Fix test_progs-flavor run getting number of tests Commit 643e7233aa94 ("selftests/bpf: Test_progs option for getting number of tests") introduced ability to getting number of tests, which is targeted towards scripting. As demonstrate in the commit the number can be use as a shell variable for further scripting. The test_progs program support "flavor", which is detected by the binary have a "-flavor" in the executable name. One example is test_progs-no_alu32, which load bpf-progs compiled with disabled alu32, located in dir 'no_alu32/'. The problem is that invoking a "flavor" binary prints to stdout e.g.: "Switching to flavor 'no_alu32' subdirectory..." Thus, intermixing with the number of tests, making it unusable for scripting. Fix the issue by only printing "flavor" info when verbose -v option is used. Fixes: 643e7233aa94 ("selftests/bpf: Test_progs option for getting number of tests") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/159827024012.923543.7104106594870150597.stgit@firesoul commit b474959d5afda6e341a02c85f9595d85d39189ae Author: Yonghong Song Date: Fri Aug 21 12:10:54 2020 -0700 bpf: Fix a buffer out-of-bound access when filling raw_tp link_info Commit f2e10bff16a0 ("bpf: Add support for BPF_OBJ_GET_INFO_BY_FD for bpf_link") added link query for raw_tp. One of fields in link_info is to fill a user buffer with tp_name. The Scurrent checking only declares "ulen && !ubuf" as invalid. So "!ulen && ubuf" will be valid. Later on, we do "copy_to_user(ubuf, tp_name, ulen - 1)" which may overwrite user memory incorrectly. This patch fixed the problem by disallowing "!ulen && ubuf" case as well. Fixes: f2e10bff16a0 ("bpf: Add support for BPF_OBJ_GET_INFO_BY_FD for bpf_link") Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200821191054.714731-1-yhs@fb.com commit 75d46c6d15efabc5176a5e2694ee236f02ee72ef Author: Niklas Cassel Date: Fri Aug 21 15:00:07 2020 +0200 scsi: scsi_debug: Remove superfluous close zone in resp_open_zone() resp_open_zone() always calls zbc_open_zone() with parameter explicit set to true. If zbc_open_zone() is called with parameter explicit set to true, and the current zone state is implicit open, it will call zbc_close_zone() on the zone before proceeding. Therefore, there is no need for resp_open_zone() to call zbc_close_zone() on an implicitly open zone before calling zbc_open_zone(). Remove superfluous close zone in resp_open_zone(). Link: https://lore.kernel.org/r/20200821130007.39938-1-niklas.cassel@wdc.com Reviewed-by: Damien Le Moal Signed-off-by: Niklas Cassel Signed-off-by: Martin K. Petersen commit 38660389a7697ae6dd56edfac5d87754374f217a Author: Dan Carpenter Date: Mon Aug 24 11:59:33 2020 +0300 scsi: libcxgbi: Fix a use after free in cxgbi_conn_xmit_pdu() We accidentally move this logging printk after the free, but that leads to a use after free. Link: https://lore.kernel.org/r/20200824085933.GD208317@mwanda Fixes: e33c2482289b ("scsi: cxgb4i: Add support for iSCSI segmentation offload") Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit f308a35f547cd7c1d8a901c12b3ac508e96df665 Author: Ye Bin Date: Mon Aug 24 11:34:36 2020 +0800 scsi: qedf: Fix null ptr reference in qedf_stag_change_work Link: https://lore.kernel.org/r/20200824033436.45570-1-yebin10@huawei.com Acked-by: Saurav Kashyap Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit 99408c422d336db32bfab5cbebc10038a70cf7d2 Merge: 966b8266a4629 279e89b2281af Author: David S. Miller Date: Mon Aug 24 18:16:56 2020 -0700 Merge tag 'batadv-net-for-davem-20200824' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are some batman-adv bugfixes: - Avoid uninitialized memory access when handling DHCP, by Sven Eckelmann - Fix check for own OGM in OGM receive handler, by Linus Luessing - Fix netif_rx access for non-interrupt context in BLA, by Jussi Kivilinna ==================== Signed-off-by: David S. Miller commit 966b8266a4629a84042f8c237d767d133c456a10 Author: Edward Cree Date: Mon Aug 24 16:18:51 2020 +0100 sfc: fix boolreturn.cocci warning and rename function check_fcs() was returning bool as 0/1, which was a sign that the sense of the function was unclear: false was good, which doesn't really match a name like 'check_$thing'. So rename it to ef100_has_fcs_error(), and use proper booleans in the return statements. Reported-by: kernel test robot Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 59ebb4305c432b6ca34fd9704c9294c1f16e5847 Author: Sumera Priyadarsini Date: Sun Aug 23 19:22:45 2020 +0530 net: ocelot: Add of_node_put() before return statement Every iteration of for_each_available_child_of_node() decrements the reference count of the previous node, however when control is transferred from the middle of the loop, as in the case of a return or break or goto, there is no decrement thus ultimately resulting in a memory leak. Fix a potential memory leak in felix.c by inserting of_node_put() before the return statement. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini Signed-off-by: David S. Miller commit 4341b7d9164093c14edc686deac6a9f36eb661b5 Author: Kurt Kanzenbach Date: Sun Aug 23 14:18:36 2020 +0200 dt-bindings: net: dsa: Fix typo Fix spelling mistake documenation -> documentation. Fixes: 5a18bb14c0f7 ("dt-bindings: net: dsa: Let dsa.txt refer to dsa.yaml") Signed-off-by: Kurt Kanzenbach Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 15ac5cdafb9202424206dc5bd376437a358963f9 Author: Dinghao Liu Date: Sun Aug 23 19:29:35 2020 +0800 firestream: Fix memleak in fs_open When make_rate() fails, vcc should be freed just like other error paths in fs_open(). Signed-off-by: Dinghao Liu Signed-off-by: David S. Miller commit e2d79cd8875fa8c3cc7defa98a8cc99a1ed0c62f Author: Dinghao Liu Date: Sun Aug 23 16:56:47 2020 +0800 net: arc_emac: Fix memleak in arc_mdio_probe When devm_gpiod_get_optional() fails, bus should be freed just like when of_mdiobus_register() fails. Fixes: 1bddd96cba03d ("net: arc_emac: support the phy reset for emac driver") Signed-off-by: Dinghao Liu Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f97c04c316d8fea16dca449fdfbe101fbdfee6a2 Author: Dinghao Liu Date: Sun Aug 23 15:23:43 2020 +0800 NFC: st95hf: Fix memleak in st95hf_in_send_cmd When down_killable() fails, skb_resp should be freed just like when st95hf_spi_send() fails. Signed-off-by: Dinghao Liu Signed-off-by: David S. Miller commit 92001bc0365a144783f8f3108be94e74baf61011 Author: Randy Dunlap Date: Sun Aug 23 15:55:16 2020 -0700 Documentation: laptops: thinkpad-acpi: fix underline length build warning Fix underline length build warning in thinkpad-acpi.rst documentation: Documentation/admin-guide/laptops/thinkpad-acpi.rst:1437: WARNING: Title underline too short. DYTC Lapmode sensor ------------------ Fixes: acf7f4a59114 ("platform/x86: thinkpad_acpi: lap or desk mode interface") Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/7b2ecef9-dfb7-808a-7c05-4e4f44b363c4@infradead.org Signed-off-by: Jonathan Corbet commit 4776b9e332441b49f0c20f1ea56ccb187b375ce0 Author: Brandon Jiang Date: Sat Aug 22 15:46:40 2020 +0800 Documentation: fix typo for abituguru documentation Typo fix for abituguru,abituguru3 and abituguru-datasheet Signed-off-by: Brandon Jiang Link: https://lore.kernel.org/r/DM5PR22MB0892E4FEFCA9ED055B0A8E71AC580@DM5PR22MB0892.namprd22.prod.outlook.com Signed-off-by: Jonathan Corbet commit 053f8fc7c1c8f70e30a89955f8fd53e1e48dee58 Author: Kees Cook Date: Mon Aug 17 16:32:07 2020 -0700 docs: Fix function name trailing double-()s I noticed a double-() in the deprecated.rst rendering today. Fix that one and two others in the Documentation/ tree. Acked-by: "Paul E. McKenney" # For RCU Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200817233207.4083538-1-keescook@chromium.org Signed-off-by: Jonathan Corbet commit 15ab85695595fbaba1ccccd07f7b0cede57cccf2 Author: Theodore Dubois Date: Sun Aug 16 16:38:23 2020 -0700 devices.txt: fix typo of "ubd" as "udb" Signed-off-by: Theodore Dubois Link: https://lore.kernel.org/r/20200816233823.86316-1-tblodt@icloud.com Signed-off-by: Jonathan Corbet commit 003ad49f74003aaa95992fe17028512d58977d07 Author: Lukas Bulwahn Date: Sat Aug 15 13:57:28 2020 +0200 Documentation: add riscv entry in list of existing profiles As long as there are only a few maintainer entry profiles, i.e., three in v5.8, continue to maintain a complete a list of entries in the maintainer handbook. Complete the list by adding the RISC-V ARCHITECTURE maintainer entry profile found in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20200815115728.15128-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit fb08f4a6a3139dc1b7ca5ed312ced2b60ec1a362 Author: Lukas Bulwahn Date: Sat Aug 15 12:26:58 2020 +0200 MAINTAINERS: mention documentation maintainer entry profile Since commit 53b7f3aa411b ("Add a maintainer entry profile for documentation"), the documentation "subsystem" has a maintainer entry profile, and it deserves to be mentioned in MAINTAINERS with a suitable P: entry. Signed-off-by: Lukas Bulwahn Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200815102658.12236-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit 78b8612e7fce1a17c65d6f5070c2994ce4e28968 Author: Puranjay Mohan Date: Wed Aug 12 23:32:24 2020 +0530 Fpga: Documentation: Replace deprecated :c:func: Usage Replace :c:func: with func() as the previous usage is deprecated. Signed-off-by: Puranjay Mohan Link: https://lore.kernel.org/r/20200812180224.24810-1-puranjay12@gmail.com Signed-off-by: Jonathan Corbet commit a320274a09da0200802bfc54cbb283a8fa4a73be Author: Puranjay Mohan Date: Wed Aug 12 23:16:11 2020 +0530 IIO: Documentation: Replace deprecated :c:func: Usage Replace :c:func: with func() as the previous usage is deprecated. Signed-off-by: Puranjay Mohan Link: https://lore.kernel.org/r/20200812174611.18580-1-puranjay12@gmail.com Signed-off-by: Jonathan Corbet commit 94dea151bf3651c01acb12a38ca75ba9d26ea4da Author: Marta Rybczynska Date: Sun Jul 26 20:54:40 2020 +0200 Documentation/locking/locktypes: fix local_locks documentation Fix issues with local_locks documentation: - fix function names, local_lock.h has local_unlock_irqrestore(), not local_lock_irqrestore() - fix mapping table, local_unlock_irqrestore() maps to local_irq_restore(), not _save() Signed-off-by: Marta Rybczynska Acked-by: Will Deacon Link: https://lore.kernel.org/r/CAApg2=SKxQ3Sqwj6TZnV-0x0cKLXFKDaPvXT4N15MPDMKq724g@mail.gmail.com Signed-off-by: Jonathan Corbet commit 799b87120c243febc4241a95bf616735c3ccd361 Merge: 5978fac03ea3f 3ad1b1e16dbff Author: David S. Miller Date: Mon Aug 24 16:18:48 2020 -0700 Merge branch 'MAINTAINERS-Remove-self-from-PHY-LIBRARY' Florian Fainelli says: ==================== MAINTAINERS: Remove self from PHY LIBRARY This patch series aims at allowing myself to keep track of the Ethernet PHY and MDIO bus drivers that I authored or contributed to without being listed as a maintainer in the PHY library anymore. Thank you for the fish, I will still be around. This builds on top of Andrew's series: https://lore.kernel.org/netdev/20200822180611.2576807-1-andrew@lunn.ch/ ==================== Signed-off-by: David S. Miller commit 3ad1b1e16dbff695f430b7d7ac0b6e98c02065c2 Author: Florian Fainelli Date: Sat Aug 22 13:11:26 2020 -0700 MAINTAINERS: Remove self from PHY LIBRARY My last significant achievements to the PHY library was ensuring we would have small bus factor by having Andrew and Heiner added. The world has moved on past 1G, but I have not, so let more competent maintainers take over. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit e063713c05bc22f11d9e9aac0bc846ca233b9f41 Author: Florian Fainelli Date: Sat Aug 22 13:11:25 2020 -0700 MAINTAINERS: Add entry for Broadcom Ethernet PHY drivers Add an entry for the Broadcom Ethernet PHY drivers covering the BCM63xx, BCM7xxx, BCM87xx, BCM54140, BCM84881, the venerable broadcom.c driver and the companion library files. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit ccaab4d3df9879a3d4b930f160b229fa7c2a8477 Author: Florian Fainelli Date: Sat Aug 22 13:11:24 2020 -0700 MAINTAINERS: GENET: Add UniMAC MDIO controller files In preparation for removing myself from the PHYLIB entry, add the UniMAC MDIO controller files (DT binding, driver and platform_data header) to the GENET entry. The UniMAC MDIO controller is essential to the GENET operation, therefore it makes sense to group them together. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit f69ccc563df0c2097eb9fdcf80d426a4458835f3 Author: Florian Fainelli Date: Sat Aug 22 13:11:23 2020 -0700 MAINTAINERS: GENET: Add DT binding file When the DT binding was added in aab5127d94e6 ("Documentation: add Device tree bindings for Broadcom GENET"), the file was not explicitly listed under the GENET MAINTAINERS section, do that now. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 9fac261c1eb5db61aad52b9071d6b569ffdabe55 Author: Florian Fainelli Date: Sat Aug 22 13:11:22 2020 -0700 MAINTAINERS: B53: Add DT binding file When the binding was added with 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch"), it was not explicitly added to the B53 MAINTAINERS file section, add it now. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit d0cac91817c81140957a9b3deb1581e4f908907d Author: Florian Fainelli Date: Sat Aug 22 13:11:21 2020 -0700 MAINTAINERS: GENET: Add missing platform data file When commit b0ba512e25d7 ("net: bcmgenet: enable driver to work without a device tree") added include/linux/platform_data/bcmgenet.h, the file was not added to the GENET MAINTAINERS file section, add it now. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 5978fac03ea3faf793dffeedcbe60dd8da673f89 Author: Nathan Chancellor Date: Fri Aug 21 15:25:16 2020 -0700 net: dsa: sja1105: Do not use address of compatible member in sja1105_check_device_id Clang warns: drivers/net/dsa/sja1105/sja1105_main.c:3418:38: warning: address of array 'match->compatible' will always evaluate to 'true' [-Wpointer-bool-conversion] for (match = sja1105_dt_ids; match->compatible; match++) { ~~~ ~~~~~~~^~~~~~~~~~ 1 warning generated. We should check the value of the first character in compatible to see if it is empty or not. This matches how the rest of the tree iterates over IDs. Fixes: 0b0e299720bb ("net: dsa: sja1105: use detected device id instead of DT one on mismatch") Link: https://github.com/ClangBuiltLinux/linux/issues/1139 Signed-off-by: Nathan Chancellor Acked-by: Florian Fainelli Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit be769db2f95861cc8c7c8fedcc71a8c39b803b10 Author: Herbert Xu Date: Sat Aug 22 08:23:29 2020 +1000 net: Get rid of consume_skb when tracing is off The function consume_skb is only meaningful when tracing is enabled. This patch makes it conditional on CONFIG_TRACEPOINTS. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller commit 1ee39c1448c4e0d480c5b390e2db1987561fb5c2 Author: Xie He Date: Fri Aug 21 14:26:59 2020 -0700 drivers/net/wan/lapbether: Added needed_tailroom The underlying Ethernet device may request necessary tailroom to be allocated by setting needed_tailroom. This driver should also set needed_tailroom to request the tailroom needed by the underlying Ethernet device to be allocated. Cc: Willem de Bruijn Cc: Martin Schiller Signed-off-by: Xie He Signed-off-by: David S. Miller commit d3b990b7f327e2afa98006e7666fb8ada8ed8683 Author: Paul Moore Date: Fri Aug 21 16:34:52 2020 -0400 netlabel: fix problems with mapping removal This patch fixes two main problems seen when removing NetLabel mappings: memory leaks and potentially extra audit noise. The memory leaks are caused by not properly free'ing the mapping's address selector struct when free'ing the entire entry as well as not properly cleaning up a temporary mapping entry when adding new address selectors to an existing entry. This patch fixes both these problems such that kmemleak reports no NetLabel associated leaks after running the SELinux test suite. The potentially extra audit noise was caused by the auditing code in netlbl_domhsh_remove_entry() being called regardless of the entry's validity. If another thread had already marked the entry as invalid, but not removed/free'd it from the list of mappings, then it was possible that an additional mapping removal audit record would be generated. This patch fixes this by returning early from the removal function when the entry was previously marked invalid. This change also had the side benefit of improving the code by decreasing the indentation level of large chunk of code by one (accounting for most of the diffstat). Fixes: 63c416887437 ("netlabel: Add network address selectors to the NetLabel/LSM domain mapping") Reported-by: Stephen Smalley Signed-off-by: Paul Moore Signed-off-by: David S. Miller commit 3106ecb43a05dc3e009779764b9da245a5d082de Author: Xin Long Date: Fri Aug 21 14:59:38 2020 +0800 sctp: not disable bh in the whole sctp_get_port_local() With disabling bh in the whole sctp_get_port_local(), when snum == 0 and too many ports have been used, the do-while loop will take the cpu for a long time and cause cpu stuck: [ ] watchdog: BUG: soft lockup - CPU#11 stuck for 22s! [ ] RIP: 0010:native_queued_spin_lock_slowpath+0x4de/0x940 [ ] Call Trace: [ ] _raw_spin_lock+0xc1/0xd0 [ ] sctp_get_port_local+0x527/0x650 [sctp] [ ] sctp_do_bind+0x208/0x5e0 [sctp] [ ] sctp_autobind+0x165/0x1e0 [sctp] [ ] sctp_connect_new_asoc+0x355/0x480 [sctp] [ ] __sctp_connect+0x360/0xb10 [sctp] There's no need to disable bh in the whole function of sctp_get_port_local. So fix this cpu stuck by removing local_bh_disable() called at the beginning, and using spin_lock_bh() instead. The same thing was actually done for inet_csk_get_port() in Commit ea8add2b1903 ("tcp/dccp: better use of ephemeral ports in bind()"). Thanks to Marcelo for pointing the buggy code out. v1->v2: - use cond_resched() to yield cpu to other tasks if needed, as Eric noticed. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Ying Xu Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 1838d6c62f57836639bd3d83e7855e0ee4f6defc Author: Yuusuke Ashizuka Date: Thu Aug 20 18:43:07 2020 +0900 ravb: Fixed to be able to unload modules When this driver is built as a module, I cannot rmmod it after insmoding it. This is because that this driver calls ravb_mdio_init() at the time of probe, and module->refcnt is incremented by alloc_mdio_bitbang() called after that. Therefore, even if ifup is not performed, the driver is in use and rmmod cannot be performed. $ lsmod Module Size Used by ravb 40960 1 $ rmmod ravb rmmod: ERROR: Module ravb is in use Call ravb_mdio_init() at open and free_mdio_bitbang() at close, thereby rmmod is possible in the ifdown state. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Signed-off-by: Yuusuke Ashizuka Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 6a9dc5fd6170d0a41c8a14eb19e63d94bea5705a Author: Gustavo A. R. Silva Date: Mon Aug 24 15:36:14 2020 -0500 lib: Revert use of fallthrough pseudo-keyword in lib/ The following build error for powerpc64 was reported by Nathan Chancellor: "$ scripts/config --file arch/powerpc/configs/powernv_defconfig -e KERNEL_XZ $ make -skj"$(nproc)" ARCH=powerpc CROSS_COMPILE=powerpc64le-linux- distclean powernv_defconfig zImage ... In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:234, from arch/powerpc/boot/decompress.c:38: arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c: In function 'dec_main': arch/powerpc/boot/../../../lib/xz/xz_dec_stream.c:586:4: error: 'fallthrough' undeclared (first use in this function) 586 | fallthrough; | ^~~~~~~~~~~ This will end up affecting distribution configurations such as Debian and OpenSUSE according to my testing. I am not sure what the solution is, the PowerPC wrapper does not set -D__KERNEL__ so I am not sure that compiler_attributes.h can be safely included." In order to avoid these sort of problems, it seems that the best solution is to use /* fall through */ comments instead of the fallthrough pseudo-keyword macro in lib/, for now. Reported-by: Nathan Chancellor Fixes: df561f6688fe ("treewide: Use fallthrough pseudo-keyword") Signed-off-by: Gustavo A. R. Silva Reviewed-and-tested-by: Nathan Chancellor Signed-off-by: Linus Torvalds commit 0235bc04627d02a08f7ad9d226a8fe78e6c4a1c3 Author: Rander Wang Date: Fri Aug 21 14:55:53 2020 -0500 ASoC: Intel: tgl_max98373: fix a runtime pm issue in multi-thread case When the playback & capture streams are stopped simultaneously, the SOF PCI device will remain pm_runtime active. The root-cause is a race condition with two threads reaching the trigger function at the same time. They see another stream is active so the dapm pin is not disabled, so the codec remains active as well as the parent PCI device. For max98373, the capture stream provides feedback when playback is working and it is unused when playback is stopped. So the dapm pin should be set only when playback is active. Fixes: 94d2d08974746 ('ASoC: Intel: Boards: tgl_max98373: add dai_trigger function') Reviewed-by: Ranjani Sridharan Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200821195603.215535-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9907ab371426da8b3cffa6cc3e4ae54829559207 Merge: c41c3ec4a2bcd a84d5d429f9eb Author: Linus Torvalds Date: Mon Aug 24 12:01:20 2020 -0700 Merge tag 'for-5.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: - fix swapfile activation on subvolumes with deleted snapshots - error value mixup when removing directory entries from tree log - fix lzo compression level reset after previous level setting - fix space cache memory leak after transaction abort - fix const function attribute - more error handling improvements * tag 'for-5.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: detect nocow for swap after snapshot delete btrfs: check the right error variable in btrfs_del_dir_entries_in_log btrfs: fix space cache memory leak after transaction abort btrfs: use the correct const function attribute for btrfs_get_num_csums btrfs: reset compression level for lzo on remount btrfs: handle errors from async submission commit c41c3ec4a2bcd3f24ab753bb337ec342f24bdf94 Merge: 2bf74771ca561 2d62e6b038e72 Author: Linus Torvalds Date: Mon Aug 24 11:53:15 2020 -0700 Merge tag 'io_uring-5.9-2020-08-23' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request from Sagi: - nvme completion rework from Christoph and Chao that mostly came from a bit of divergence of how we classify errors related to pathing/retry etc. - nvmet passthru fixes from Chaitanya - minor nvmet fixes from Amit and I - mpath round-robin path selection fix from Martin - ignore noiob for zoned devices from Keith - minor nvme-fc fix from Tianjia" - BFQ cgroup leak fix (Dmitry) - block layer MAINTAINERS addition (Geert) - fix null_blk FUA checking (Hou) - get_max_io_size() size fix (Keith) - fix block page_is_mergeable() for compound pages (Matthew) - discard granularity fixes (Ming) - IO scheduler ordering fix (Ming) - misc fixes * tag 'io_uring-5.9-2020-08-23' of git://git.kernel.dk/linux-block: (31 commits) null_blk: fix passing of REQ_FUA flag in null_handle_rq nvmet: Disable keep-alive timer when kato is cleared to 0h nvme: redirect commands on dying queue nvme: just check the status code type in nvme_is_path_error nvme: refactor command completion nvme: rename and document nvme_end_request nvme: skip noiob for zoned devices nvme-pci: fix PRP pool size nvme-pci: Use u32 for nvme_dev.q_depth and nvme_queue.q_depth nvme: Use spin_lock_irq() when taking the ctrl->lock nvmet: call blk_mq_free_request() directly nvmet: fix oops in pt cmd execution nvmet: add ns tear down label for pt-cmd handling nvme: multipath: round-robin: eliminate "fallback" variable nvme: multipath: round-robin: fix single non-optimized path case nvme-fc: Fix wrong return value in __nvme_fc_init_request() nvmet-passthru: Reject commands with non-sgl flags set nvmet: fix a memory leak blkcg: fix memleak for iolatency MAINTAINERS: Add missing header files to BLOCK LAYER section ... commit 2bf74771ca5610b10c3ac4cd17aacc389e6927ca Merge: d012a7190fc1f df561f6688fef Author: Linus Torvalds Date: Mon Aug 24 11:30:52 2020 -0700 Merge tag 'fallthrough-pseudo-keyword-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux Pull 'fallthrough' keyword conversion from Gustavo A. R. Silva: "A tree-wide patch that replaces tons (2484) of /* fall through */ comments, and its variants, with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. There are currently 1167 intances of this fallthrough pseudo-keyword macro in mainline (5.9-rc2), that have been introduced over the last couple of development cycles: $ git grep -nw 'fallthrough;' | wc -l 1167 The global adoption of the fallthrough pseudo-keyword is something certain to happen; so, better sooner than later. :) This will also save everybody's time and thousands of lines of unnecessarily repetitive changelog text. After applying this patch on top of 5.9-rc2, we'll have a total of 3651 instances of this macro: $ git grep -nw 'fallthrough;' | wc -l 3651 This treewide patch doesn't address ALL fall-through markings in all subsystems at once because I have previously sent out patches for some of such subsystems separately, and I will follow up on them; however, this definitely contributes most of the work needed to replace all the fall-through markings with the fallthrough pseudo-keyword macro in the whole codebase. I have build-tested this patch on 10 different architectures: x86_64, i386, arm64, powerpc, s390, sparc64, sh, m68k, powerpc64 and alpha (allyesconfig for all of them). This is in linux-next already and kernel test robot has also helped me to successfully build-test early versions of this patch[2][3][4][5]" [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through [2] https://lore.kernel.org/lkml/5f3cc99a.HgvOW3rH0mD0RmkM%25lkp@intel.com/ [3] https://lore.kernel.org/lkml/5f3dd1d2.l1axczH+t4hMBZ63%25lkp@intel.com/ [4] https://lore.kernel.org/lkml/5f3e977a.mwYHUIObbR4SHr0B%25lkp@intel.com/ [5] https://lore.kernel.org/lkml/5f3f9e1c.qsyb%2FaySkiXNpkO4%25lkp@intel.com/ * tag 'fallthrough-pseudo-keyword-5.9-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux: treewide: Use fallthrough pseudo-keyword commit 496ceaf12432b3d136dcdec48424312e71359ea7 Author: Jeff Layton Date: Thu Aug 20 11:00:26 2020 -0400 ceph: don't allow setlease on cephfs Leases don't currently work correctly on kcephfs, as they are not broken when caps are revoked. They could eventually be implemented similarly to how we did them in libcephfs, but for now don't allow them. [ idryomov: no need for simple_nosetlease() in ceph_dir_fops and ceph_snapdir_fops ] Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 60b1af64eb35074a4f2d41cc1e503a7671e68963 Author: Yi Zhang Date: Thu Aug 20 23:36:46 2020 +0800 RDMA/rxe: Fix the parent sysfs read when the interface has 15 chars 'parent' sysfs reads will yield '\0' bytes when the interface name has 15 chars, and there will no "\n" output. To reproduce, create one interface with 15 chars: [root@test ~]# ip a s enp0s29u1u7u3c2 2: enp0s29u1u7u3c2: mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000 link/ether 02:21:28:57:47:17 brd ff:ff:ff:ff:ff:ff inet6 fe80::ac41:338f:5bcd:c222/64 scope link noprefixroute valid_lft forever preferred_lft forever [root@test ~]# modprobe rdma_rxe [root@test ~]# echo enp0s29u1u7u3c2 > /sys/module/rdma_rxe/parameters/add [root@test ~]# cat /sys/class/infiniband/rxe0/parent enp0s29u1u7u3c2[root@test ~]# [root@test ~]# f="/sys/class/infiniband/rxe0/parent" [root@test ~]# echo "$(<"$f")" -bash: warning: command substitution: ignored null byte in input enp0s29u1u7u3c2 Use scnprintf and PAGE_SIZE to fill the sysfs output buffer. Cc: stable@vger.kernel.org Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200820153646.31316-1-yi.zhang@redhat.com Suggested-by: Jason Gunthorpe Signed-off-by: Yi Zhang Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit baa5b28b7a474f66a511ebf71a2ade510652a2f6 Author: Md Haris Iqbal Date: Tue Aug 11 14:57:22 2020 +0530 RDMA/rtrs-srv: Replace device_register with device_initialize and device_add There are error cases when we will call free_srv before device kobject is initialized; in such cases calling put_device generates the following warning: kobject: '(null)' (000000009f5445ed): is not initialized, yet kobject_put() is being called. So call device_initialize() only once when the server is allocated. If we end up calling put_srv() and subsequently free_srv(), our call to put_device() would result in deletion of the obj. Call device_add() later when we actually have a connection. Correspondingly, call device_del() instead of device_unregister() when srv->dev_ref falls to 0. Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality") Link: https://lore.kernel.org/r/20200811092722.2450-1-haris.iqbal@cloud.ionos.com Suggested-by: Jason Gunthorpe Signed-off-by: Md Haris Iqbal Reviewed-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 9c8b0a9c37b757ae06f382668d5a80eae4921339 Merge: cabe3a137148d 5cbb80d5236b4 Author: Olof Johansson Date: Mon Aug 24 08:56:13 2020 -0700 Merge tag 'imx-fixes-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.9: - Fix QuadSPI-memory 'reg' for LS1021A and GPIO 'ranges' for i.MX7ULP pinctrl. - A couple of DTC warning fixes on imx6qdl-gw51xx and imx6q-prtwd2 boards. - Add missing imx8mm-beacon-kit.dtb to dtbs-y for build coverage. - Fix broken PWM settings on imx6q-logicpd board. - Add missing syscon compatible to OCOTP device, so that access to UID is possible. - Fix a network regression on imx7d-zii-rmu2 due to a phy-mode mismatch. * tag 'imx-fixes-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx7d-zii-rmu2: fix rgmii phy-mode for ksz9031 phy ARM: dts: vfxxx: Add syscon compatible with OCOTP ARM: dts: imx6q-logicpd: Fix broken PWM arm64: dts: imx: Add missing imx8mm-beacon-kit.dtb to build ARM: dts: imx6q-prtwd2: Remove unneeded i2c unit name ARM: dts: imx6qdl-gw51xx: Remove unneeded #address-cells/#size-cells ARM: dts: imx7ulp: Correct gpio ranges ARM: dts: ls1021a: fix QuadSPI-memory reg range Link: https://lore.kernel.org/r/20200824130359.GF12776@dragon Signed-off-by: Olof Johansson commit ebce3eb2f7ef9f6ef01a60874ebd232450107c9a Author: Jeff Layton Date: Tue Aug 18 08:03:48 2020 -0400 ceph: fix inode number handling on arches with 32-bit ino_t Tuan and Ulrich mentioned that they were hitting a problem on s390x, which has a 32-bit ino_t value, even though it's a 64-bit arch (for historical reasons). I think the current handling of inode numbers in the ceph driver is wrong. It tries to use 32-bit inode numbers on 32-bit arches, but that's actually not a problem. 32-bit arches can deal with 64-bit inode numbers just fine when userland code is compiled with LFS support (the common case these days). What we really want to do is just use 64-bit numbers everywhere, unless someone has mounted with the ino32 mount option. In that case, we want to ensure that we hash the inode number down to something that will fit in 32 bits before presenting the value to userland. Add new helper functions that do this, and only do the conversion before presenting these values to userland in getattr and readdir. The inode table hashvalue is changed to just cast the inode number to unsigned long, as low-order bits are the most likely to vary anyway. While it's not strictly required, we do want to put something in inode->i_ino. Instead of basing it on BITS_PER_LONG, however, base it on the size of the ino_t type. NOTE: This is a user-visible change on 32-bit arches: 1/ inode numbers will be seen to have changed between kernel versions. 32-bit arches will see large inode numbers now instead of the hashed ones they saw before. 2/ any really old software not built with LFS support may start failing stat() calls with -EOVERFLOW on inode numbers >2^32. Nothing much we can do about these, but hopefully the intersection of people running such code on ceph will be very small. The workaround for both problems is to mount with "-o ino32". [ idryomov: changelog tweak ] URL: https://tracker.ceph.com/issues/46828 Reported-by: Ulrich Weigand Reported-and-Tested-by: Tuan Hoang1 Signed-off-by: Jeff Layton Reviewed-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov commit 50248a3ec0f5e5debd18033eb2a29f0b793a7000 Author: Lucas Stach Date: Mon Aug 24 12:55:37 2020 +0200 drm/etnaviv: always start/stop scheduler in timeout processing The drm scheduler currently expects that the stop/start sequence is always executed in the timeout handling, as the job at the head of the hardware execution list is always removed from the ring mirror before the driver function is called and only inserted back into the list when starting the scheduler. This adds some unnecessary overhead if the timeout handler determines that the GPU is still executing jobs normally and just wished to extend the timeout, but a better solution requires a major rearchitecture of the scheduler, which is not applicable as a fix. Fixes: 135517d3565b ("drm/scheduler: Avoid accessing freed bad job.") Signed-off-by: Lucas Stach Tested-by: Russell King commit 2c5bf028ef34745e7b3fe768f9c9355ecc7df101 Author: Christian Gmeiner Date: Sun Aug 23 21:09:22 2020 +0200 drm/etnaviv: fix external abort seen on GC600 rev 0x19 It looks like that this GPU core triggers an abort when reading VIVS_HI_CHIP_PRODUCT_ID and/or VIVS_HI_CHIP_ECO_ID. I looked at different versions of Vivante's kernel driver and did not found anything about this issue or what feature flag can be used. So go the simplest route and do not read these two registers on the affected GPU core. Signed-off-by: Christian Gmeiner Reported-by: Josua Mayer Fixes: 815e45bbd4d3 ("drm/etnaviv: determine product, customer and eco id") Cc: stable@vger.kernel.org Tested-by: Josua Mayer Signed-off-by: Lucas Stach commit b46b4a8a57c377b72a98c7930a9f6969d2d4784e Author: Vineeth Pillai Date: Fri Aug 21 15:28:49 2020 +0000 hv_utils: drain the timesync packets on onchannelcallback There could be instances where a system stall prevents the timesync packets to be consumed. And this might lead to more than one packet pending in the ring buffer. Current code empties one packet per callback and it might be a stale one. So drain all the packets from ring buffer on each callback. Signed-off-by: Vineeth Pillai Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200821152849.99517-1-viremana@linux.microsoft.com Signed-off-by: Wei Liu commit 90b125f4cd2697f949f5877df723a0b710693dd0 Author: Vineeth Pillai Date: Fri Aug 21 15:25:23 2020 +0000 hv_utils: return error if host timesysnc update is stale If for any reason, host timesync messages were not processed by the guest, hv_ptp_gettime() returns a stale value and the caller (clock_gettime, PTP ioctl etc) has no means to know this now. Return an error so that the caller knows about this. Signed-off-by: Vineeth Pillai Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20200821152523.99364-1-viremana@linux.microsoft.com Signed-off-by: Wei Liu commit 3622adb02623cde94ea85c68e9a968d0059de545 Author: Tobias Klauser Date: Mon Aug 24 13:46:22 2020 +0200 ipv6: ndisc: adjust ndisc_ifinfo_sysctl_change prototype Commit 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") changed ndisc_ifinfo_sysctl_change to take a kernel pointer. Adjust its prototype in net/ndisc.h as well to fix the following sparse warning: net/ipv6/ndisc.c:1838:5: error: symbol 'ndisc_ifinfo_sysctl_change' redeclared with different type (incompatible argument 3 (different address spaces)): net/ipv6/ndisc.c:1838:5: int extern [addressable] [signed] [toplevel] ndisc_ifinfo_sysctl_change( ... ) net/ipv6/ndisc.c: note: in included file (through include/net/ipv6.h): ./include/net/ndisc.h:496:5: note: previously declared as: ./include/net/ndisc.h:496:5: int extern [addressable] [signed] [toplevel] ndisc_ifinfo_sysctl_change( ... ) net/ipv6/ndisc.c: note: in included file (through include/net/ip6_route.h): Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler") Cc: Christoph Hellwig Signed-off-by: Tobias Klauser Signed-off-by: David S. Miller commit a26aea2010601920ad3e61abdc22ad38a805be94 Merge: 7ef1fc57301f3 1e105e6afa6c3 Author: David S. Miller Date: Mon Aug 24 06:37:05 2020 -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 net: 1) Don't flag SCTP heartbeat as invalid for re-used connections, from Florian Westphal. 2) Bogus overlap report due to rbtree tree rotations, from Stefano Brivio. 3) Detect partial overlap with start end point match, also from Stefano. 4) Skip netlink dump of NFTA_SET_USERDATA is unset. 5) Incorrect nft_list_attributes enumeration definition. 6) Missing zeroing before memcpy to destination register, also from Florian. ==================== Signed-off-by: David S. Miller commit 6b6cf2b5debd42de39afd8ac84b60faeca62cfaf Author: Dmitry Osipenko Date: Tue Aug 18 02:50:48 2020 +0300 mfd: core: Fix double-free in mfd_remove_devices_fn() The pdev.mfd_cell is released by platform_device_release(), which is invoked by platform_device_unregister(). Hence mfd_remove_devices_fn() shouldn't release the cell variable. The double-free bug is reported KASAN during of MFD driver module removal. Fixes: 466a62d7642f ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes") Reported-by: Marek Szyprowski Signed-off-by: Dmitry Osipenko Signed-off-by: Lee Jones commit 7ef1fc57301f3cef7201497aa27e89ccb91737fe Author: Dinghao Liu Date: Mon Aug 24 13:58:31 2020 +0800 net: systemport: Fix memleak in bcm_sysport_probe When devm_kcalloc() fails, dev should be freed just like what we've done in the subsequent error paths. Fixes: 7b78be48a8eb6 ("net: systemport: Dynamically allocate number of TX rings") Signed-off-by: Dinghao Liu Signed-off-by: David S. Miller commit 100e3345c6e719d2291e1efd5de311cc24bb9c0b Author: Dinghao Liu Date: Mon Aug 24 13:44:42 2020 +0800 net: hns: Fix memleak in hns_nic_dev_probe hns_nic_dev_probe allocates ndev, but not free it on two error handling paths, which may lead to memleak. Fixes: 63434888aaf1b ("net: hns: net: hns: enet adds support of acpi") Signed-off-by: Dinghao Liu Signed-off-by: David S. Miller commit 5cbb80d5236b47b149da292b86d5fc99a680894b Author: Chris Healy Date: Sat Aug 22 19:25:05 2020 -0700 ARM: dts: imx7d-zii-rmu2: fix rgmii phy-mode for ksz9031 phy Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") the networking is broken on the imx7d-zii-rmu2 board. The end result is that network receive behaviour is marginal with lots of RX CRC errors experienced and NFS frequently failing. Quoting the explanation from Andrew Lunn in commit 0672d22a19244 ("ARM: dts: imx: Fix the AR803X phy-mode"): "The problem here is, all the DTs were broken since day 0. However, because the PHY driver was also broken, nobody noticed and it worked. Now that the PHY driver has been fixed, all the bugs in the DTs now become an issue" Fix it by switching to phy-mode = "rgmii-id". Fixes: bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") Signed-off-by: Chris Healy Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 462582b99b6079a6fbcdfc65bac49f5c2a27cfff Author: Bob Peterson Date: Fri Aug 21 08:50:34 2020 -0500 gfs2: add some much needed cleanup for log flushes that fail When a log flush fails due to io errors, it signals the failure but does not clean up after itself very well. This is because buffers are added to the transaction tr_buf and tr_databuf queue, but the io error causes gfs2_log_flush to bypass the "after_commit" functions responsible for dequeueing the bd elements. If the bd elements are added to the ail list before the error, function ail_drain takes care of dequeueing them. But if they haven't gotten that far, the elements are forgotten and make the transactions unable to be freed. This patch introduces new function trans_drain which drains the bd elements from the transaction so they can be freed properly. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 3cb5fcf1f3a5dfb7bc0305bb15971db04a0e51d4 Author: Vladimir Oltean Date: Sat Aug 22 00:37:53 2020 +0300 MAINTAINERS: add myself as maintainer for spi-fsl-dspi driver Since I've introduced a fairly large diff to this driver since tag v5.4, I would like to avoid breakage for my use cases by getting a chance to be copied on newly submitted patches. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20200821213753.3143632-1-olteanv@gmail.com Signed-off-by: Mark Brown commit bc6717d55d07110d8f3c6d31ec2af50c11b07091 Author: Guo Ren Date: Tue Aug 18 07:31:17 2020 +0000 clocksource/drivers/timer-gx6605s: Fixup counter reload When the timer counts to the upper limit, an overflow interrupt is generated, and the count is reset with the value in the TIME_INI register. But the software expects to start counting from 0 when the count overflows, so it forces TIME_INI to 0 to solve the potential interrupt storm problem. Signed-off-by: Guo Ren Tested-by: Xu Kai Cc: Daniel Lezcano Cc: Thomas Gleixner Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1597735877-71115-1-git-send-email-guoren@kernel.org commit 164805157f3c6834670afbaff563353c773131f1 Author: Tony Lindgren Date: Mon Aug 17 12:24:28 2020 +0300 clocksource/drivers/timer-ti-dm: Do reset before enable Commit 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4") exposed a new issue for type2 dual mode timers on at least omap5 where the clockevent will stop when the SoC starts entering idle states during the boot. Turns out we are wrongly first enabling the system timer and then resetting it, while we must also re-enable it after reset. The current sequence leaves the timer module in a partially initialized state. This issue went unnoticed earlier with ti-sysc driver reconfiguring the timer module until we fixed the issue of ti-sysc reconfiguring system timers. Let's fix the issue by calling dmtimer_systimer_enable() from reset for both type1 and type2 timers, and switch the order of reset and enable in dmtimer_systimer_setup(). Let's also move dmtimer_systimer_enable() and dmtimer_systimer_disable() to do this without adding forward declarations. Fixes: 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4") Reported-by: H. Nikolaus Schaller" Signed-off-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200817092428.6176-1-tony@atomide.com commit 400d033f5a599120089b5f0c54d14d198499af5a Author: Tianjia Zhang Date: Sun Aug 2 19:15:41 2020 +0800 clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init() In the init function, if the call to of_iomap() fails, the return value is ENXIO instead of -ENXIO. Change to the right negative errno. Fixes: 691f8f878290f ("clocksource/drivers/h8300_timer8: Convert init function to return error") Cc: Daniel Lezcano Signed-off-by: Tianjia Zhang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200802111541.5429-1-tianjia.zhang@linux.alibaba.com commit 1c502821992d505747ee222bd358fee9cd836d18 Author: Randy Dunlap Date: Sun Aug 23 16:04:11 2020 -0700 Documentation: fix pm/intel_pstate build warning and wording Fix documentation build warning and sentence wording: Documentation/admin-guide/pm/intel_pstate.rst:568: WARNING: Unexpected indentation. Fixes: f473bf398bf1 ("cpufreq: intel_pstate: Allow raw energy performance preference value") Signed-off-by: Randy Dunlap Cc: Srinivas Pandruvada Cc: Rafael J. Wysocki Signed-off-by: Rafael J. Wysocki commit f062f025fc3a4fae3e6a50d13fb1fafb11900fa7 Author: Ilya Dryomov Date: Wed Aug 19 10:50:08 2020 +0200 libceph: add __maybe_unused to DEFINE_CEPH_FEATURE Avoid -Wunused-const-variable warnings for "make W=1". Reported-by: Leon Romanovsky Signed-off-by: Ilya Dryomov Reviewed-by: Leon Romanovsky commit 6ccc48e0eb2f3a5f3bd39954a21317e5f8874726 Author: Patrick Riphagen Date: Thu Aug 6 13:55:47 2020 +0200 USB: serial: ftdi_sio: add IDs for Xsens Mti USB converter The device added has an FTDI chip inside. The device is used to connect Xsens USB Motion Trackers. Cc: stable@vger.kernel.org Signed-off-by: Patrick Riphagen Signed-off-by: Johan Hovold commit 855d388df217989fbf1f18c781ae6490dbb48e86 Author: Wenbin Mei Date: Fri Aug 14 09:43:46 2020 +0800 mmc: mediatek: add optional module reset property This patch fixs eMMC-Access on mt7622/Bpi-64. Before we got these Errors on mounting eMMC ion R64: [ 48.664925] blk_update_request: I/O error, dev mmcblk0, sector 204800 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0 [ 48.676019] Buffer I/O error on dev mmcblk0p1, logical block 0, lost sync page write This patch adds a optional reset management for msdc. Sometimes the bootloader does not bring msdc register to default state, so need reset the msdc controller. Cc: # v5.4+ Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC") Signed-off-by: Wenbin Mei Reviewed-by: Philipp Zabel Tested-by: Frank Wunderlich Link: https://lore.kernel.org/r/20200814014346.6496-4-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson commit 65557383191de46611dd3d6b639cbcfbade43c4a Author: Wenbin Mei Date: Fri Aug 14 09:43:44 2020 +0800 mmc: dt-bindings: Add resets/reset-names for Mediatek MMC bindings Add description for resets/reset-names. Cc: # v5.4+ Fixes: 966580ad236e ("mmc: mediatek: add support for MT7622 SoC") Signed-off-by: Wenbin Mei Tested-by: Frank Wunderlich Link: https://lore.kernel.org/r/20200814014346.6496-2-wenbin.mei@mediatek.com Signed-off-by: Ulf Hansson commit 1e9eb5c0907600926b81b0ac8317e85f240e8e1c Author: Randy Dunlap Date: Sun Aug 23 17:02:23 2020 -0700 Documentation: sound/cards: fix heading underline lengths for https: changes Fix documentation build warnings for underline length too short, caused by s/http/https/ and not changing the accompanying underlines. Documentation/sound/cards/audigy-mixer.rst:335: WARNING: Title underline too short. US Patents (https://www.uspto.gov/) ---------------------------------- Documentation/sound/cards/sb-live-mixer.rst:340: WARNING: Title underline too short. US Patents (https://www.uspto.gov/) ---------------------------------- Fixes: 7ed33ea6b4fa ("ALSA: Replace HTTP links with HTTPS ones") Signed-off-by: Randy Dunlap Cc: Alexander A. Klimov Link: https://lore.kernel.org/r/357ee576-32a2-6e2b-1db6-78be39253846@infradead.org Signed-off-by: Takashi Iwai commit 24ded46f53f954b9cf246c5d4e3770c7a8aa84ce Author: Shawn Anastasio Date: Fri Aug 21 13:55:58 2020 -0500 selftests/powerpc: Update PROT_SAO test to skip ISA 3.1 Since SAO support was removed from ISA 3.1, skip the prot_sao test if PPC_FEATURE2_ARCH_3_1 is set. Signed-off-by: Shawn Anastasio Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200821185558.35561-4-shawn@anastas.io commit 9b725a90a8f127802e19466d4e336e701bcea0d2 Author: Shawn Anastasio Date: Fri Aug 21 13:55:57 2020 -0500 powerpc/64s: Disallow PROT_SAO in LPARs by default Since migration of guests using SAO to ISA 3.1 hosts may cause issues, disable PROT_SAO in LPARs by default and introduce a new Kconfig option PPC_PROT_SAO_LPAR to allow users to enable it if desired. Signed-off-by: Shawn Anastasio Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200821185558.35561-3-shawn@anastas.io commit 12564485ed8caac3c18572793ec01330792c7191 Author: Shawn Anastasio Date: Fri Aug 21 13:55:56 2020 -0500 Revert "powerpc/64s: Remove PROT_SAO support" This reverts commit 5c9fa16e8abd342ce04dc830c1ebb2a03abf6c05. Since PROT_SAO can still be useful for certain classes of software, reintroduce it. Concerns about guest migration for LPARs using SAO will be addressed next. Signed-off-by: Shawn Anastasio Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200821185558.35561-2-shawn@anastas.io commit 2217b982624680d19a80ebb4600d05c8586c4f96 Author: Max Filippov Date: Sat Aug 8 11:37:13 2020 -0700 binfmt_flat: revert "binfmt_flat: don't offset the data start" binfmt_flat loader uses the gap between text and data to store data segment pointers for the libraries. Even in the absence of shared libraries it stores at least one pointer to the executable's own data segment. Text and data can go back to back in the flat binary image and without offsetting data segment last few instructions in the text segment may get corrupted by the data segment pointer. Fix it by reverting commit a2357223c50a ("binfmt_flat: don't offset the data start"). Cc: stable@vger.kernel.org Fixes: a2357223c50a ("binfmt_flat: don't offset the data start") Signed-off-by: Max Filippov Signed-off-by: Greg Ungerer commit df561f6688fef775baa341a0f5d960becd248b11 Author: Gustavo A. R. Silva Date: Sun Aug 23 17:36:59 2020 -0500 treewide: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva commit d012a7190fc1fd72ed48911e77ca97ba4521bccd Author: Linus Torvalds Date: Sun Aug 23 14:08:43 2020 -0700 Linux 5.9-rc2 commit cb95712138ec5e480db5160b41172bbc6f6494cc Merge: 550c2129d93d5 64ef8f2c47919 Author: Linus Torvalds Date: Sun Aug 23 11:37:23 2020 -0700 Merge tag 'powerpc-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Add perf support for emitting extended registers for power10. - A fix for CPU hotplug on pseries, where on large/loaded systems we may not wait long enough for the CPU to be offlined, leading to crashes. - Addition of a raw cputable entry for Power10, which is not required to boot, but is required to make our PMU setup work correctly in guests. - Three fixes for the recent changes on 32-bit Book3S to move modules into their own segment for strict RWX. - A fix for a recent change in our powernv PCI code that could lead to crashes. - A change to our perf interrupt accounting to avoid soft lockups when using some events, found by syzkaller. - A change in the way we handle power loss events from the hypervisor on pseries. We no longer immediately shut down if we're told we're running on a UPS. - A few other minor fixes. Thanks to Alexey Kardashevskiy, Andreas Schwab, Aneesh Kumar K.V, Anju T Sudhakar, Athira Rajeev, Christophe Leroy, Frederic Barrat, Greg Kurz, Kajol Jain, Madhavan Srinivasan, Michael Neuling, Michael Roth, Nageswara R Sastry, Oliver O'Halloran, Thiago Jung Bauermann, Vaidyanathan Srinivasan, Vasant Hegde. * tag 'powerpc-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/perf/hv-24x7: Move cpumask file to top folder of hv-24x7 driver powerpc/32s: Fix module loading failure when VMALLOC_END is over 0xf0000000 powerpc/pseries: Do not initiate shutdown when system is running on UPS powerpc/perf: Fix soft lockups due to missed interrupt accounting powerpc/powernv/pci: Fix possible crash when releasing DMA resources powerpc/pseries/hotplug-cpu: wait indefinitely for vCPU death powerpc/32s: Fix is_module_segment() when MODULES_VADDR is defined powerpc/kasan: Fix KASAN_SHADOW_START on BOOK3S_32 powerpc/fixmap: Fix the size of the early debug area powerpc/pkeys: Fix build error with PPC_MEM_KEYS disabled powerpc/kernel: Cleanup machine check function declarations powerpc: Add POWER10 raw mode cputable entry powerpc/perf: Add extended regs support for power10 platform powerpc/perf: Add support for outputting extended regs in perf intr_regs powerpc: Fix P10 PVR revision in /proc/cpuinfo for SMT4 cores commit 550c2129d93d5eb198835ac83c05ef672e8c491c Merge: cea05c192b07b 6a3ea3e68b8a8 Author: Linus Torvalds Date: Sun Aug 23 11:21:16 2020 -0700 Merge tag 'x86-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fix from Thomas Gleixner: "A single fix for x86 which removes the RDPID usage from the paranoid entry path and unconditionally uses LSL to retrieve the CPU number. RDPID depends on MSR_TSX_AUX. KVM has an optmization to avoid expensive MRS read/writes on VMENTER/EXIT. It caches the MSR values and restores them either when leaving the run loop, on preemption or when going out to user space. MSR_TSX_AUX is part of that lazy MSR set, so after writing the guest value and before the lazy restore any exception using the paranoid entry will read the guest value and use it as CPU number to retrieve the GSBASE value for the current CPU when FSGSBASE is enabled. As RDPID is only used in that particular entry path, there is no reason to burden VMENTER/EXIT with two extra MSR writes. Remove the RDPID optimization, which is not even backed by numbers from the paranoid entry path instead" * tag 'x86-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/entry/64: Do not use RDPID in paranoid entry to accomodate KVM commit cea05c192b07b82a770816fc9d06031403cea164 Merge: 10c091b62e7fc 24633d901ea44 Author: Linus Torvalds Date: Sun Aug 23 11:15:14 2020 -0700 Merge tag 'perf-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 perf fix from Thomas Gleixner: "A single update for perf on x86 which has support for the broken down bandwith counters" * tag 'perf-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Add BW counters for GT, IA and IO breakdown commit 10c091b62e7fc3133d652b7212904348398b302e Merge: e99b2507baccc fb1201aececc5 Author: Linus Torvalds Date: Sun Aug 23 11:08:32 2020 -0700 Merge tag 'efi-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Thomas Gleixner: - Enforce NX on RO data in mixed EFI mode - Destroy workqueue in an error handling path to prevent UAF - Stop argument parser at '--' which is the delimiter for init - Treat a NULL command line pointer as empty instead of dereferncing it unconditionally. - Handle an unterminated command line correctly - Cleanup the 32bit code leftovers and remove obsolete documentation * tag 'efi-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation: efi: remove description of efi=old_map efi/x86: Move 32-bit code into efi_32.c efi/libstub: Handle unterminated cmdline efi/libstub: Handle NULL cmdline efi/libstub: Stop parsing arguments at "--" efi: add missed destroy_workqueue when efisubsys_init fails efi/x86: Mark kernel rodata non-executable for mixed mode commit e99b2507baccca79394ec646e3d1a0884667ea98 Merge: d9232cb79651c d88d59b64ca35 Author: Linus Torvalds Date: Sun Aug 23 11:05:47 2020 -0700 Merge tag 'core-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull entry fix from Thomas Gleixner: "A single bug fix for the common entry code. The transcription of the x86 version messed up the reload of the syscall number from pt_regs after ptrace and seccomp which breaks syscall number rewriting" * tag 'core-urgent-2020-08-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: core/entry: Respect syscall number rewrites commit d9232cb79651c244f8679607b6e30c5230bcc967 Merge: 9d045ed1ebe1a 45bc6098a3e27 Author: Linus Torvalds Date: Sun Aug 23 10:57:19 2020 -0700 Merge tag 'edac_urgent_for_v5.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fix from Borislav Petkov: "A single fix correcting a reversed error severity determination check which lead to a recoverable error getting marked as fatal, by Tony Luck" * tag 'edac_urgent_for_v5.9_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/{i7core,sb,pnd2,skx}: Fix error event severity commit 9d045ed1ebe1a6115d3fa9930c5371defb31d95a Merge: f320ac6e13166 eeaac3634ee0e Author: Linus Torvalds Date: Sun Aug 23 10:52:33 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: "Nothing earth shattering here, lots of small fixes (f.e. missing RCU protection, bad ref counting, missing memset(), etc.) all over the place: 1) Use get_file_rcu() in task_file iterator, from Yonghong Song. 2) There are two ways to set remote source MAC addresses in macvlan driver, but only one of which validates things properly. Fix this. From Alvin Šipraga. 3) Missing of_node_put() in gianfar probing, from Sumera Priyadarsini. 4) Preserve device wanted feature bits across multiple netlink ethtool requests, from Maxim Mikityanskiy. 5) Fix rcu_sched stall in task and task_file bpf iterators, from Yonghong Song. 6) Avoid reset after device destroy in ena driver, from Shay Agroskin. 7) Missing memset() in netlink policy export reallocation path, from Johannes Berg. 8) Fix info leak in __smc_diag_dump(), from Peilin Ye. 9) Decapsulate ECN properly for ipv6 in ipv4 tunnels, from Mark Tomlinson. 10) Fix number of data stream negotiation in SCTP, from David Laight. 11) Fix double free in connection tracker action module, from Alaa Hleihel. 12) Don't allow empty NHA_GROUP attributes, from Nikolay Aleksandrov" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (46 commits) net: nexthop: don't allow empty NHA_GROUP bpf: Fix two typos in uapi/linux/bpf.h net: dsa: b53: check for timeout tipc: call rcu_read_lock() in tipc_aead_encrypt_done() net/sched: act_ct: Fix skb double-free in tcf_ct_handle_fragments() error flow net: sctp: Fix negotiation of the number of data streams. dt-bindings: net: renesas, ether: Improve schema validation gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY hv_netvsc: Fix the queue_mapping in netvsc_vf_xmit() hv_netvsc: Remove "unlikely" from netvsc_select_queue bpf: selftests: global_funcs: Check err_str before strstr bpf: xdp: Fix XDP mode when no mode flags specified selftests/bpf: Remove test_align leftovers tools/resolve_btfids: Fix sections with wrong alignment net/smc: Prevent kernel-infoleak in __smc_diag_dump() sfc: fix build warnings on 32-bit net: phy: mscc: Fix a couple of spelling mistakes "spcified" -> "specified" libbpf: Fix map index used in error message net: gemini: Fix missing free_netdev() in error path of gemini_ethernet_port_probe() net: atlantic: Use readx_poll_timeout() for large timeout ... commit 204361a77f4018627addd4a06877448f088ddfc0 Author: Pavel Begunkov Date: Sun Aug 23 20:33:10 2020 +0300 io-wq: fix hang after cancelling pending hashed work Don't forget to update wqe->hash_tail after cancelling a pending work item, if it was hashed. Cc: stable@vger.kernel.org # 5.7+ Reported-by: Dmitry Shulyak Fixes: 86f3cd1b589a1 ("io-wq: handle hashed writes in chains") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit fd7d6de2241453fc7d042336d366a939a25bc5a9 Author: Jens Axboe Date: Sun Aug 23 11:00:37 2020 -0600 io_uring: don't recurse on tsk->sighand->siglock with signalfd If an application is doing reads on signalfd, and we arm the poll handler because there's no data available, then the wakeup can recurse on the tasks sighand->siglock as the signal delivery from task_work_add() will use TWA_SIGNAL and that attempts to lock it again. We can detect the signalfd case pretty easily by comparing the poll->head wait_queue_head_t with the target task signalfd wait queue. Just use normal task wakeup for this case. Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Jens Axboe commit afd55e6d1bd35b4b36847869011447a83a81c8e0 Author: Sivaprakash Murugesan Date: Wed Jul 29 21:00:03 2020 +0530 phy: qcom-qmp: Use correct values for ipq8074 PCIe Gen2 PHY init There were some problem in ipq8074 Gen2 PCIe phy init sequence. 1. Few register values were wrongly updated in the phy init sequence. 2. The register QSERDES_RX_SIGDET_CNTRL is a RX tuning parameter register which is added in serdes table causing the wrong register was getting updated. 3. Clocks and resets were not added in the phy init. Fix these to make Gen2 PCIe port on ipq8074 devices to work. Fixes: eef243d04b2b6 ("phy: qcom-qmp: Add support for IPQ8074") Cc: stable@vger.kernel.org Co-developed-by: Selvam Sathappan Periakaruppan Signed-off-by: Selvam Sathappan Periakaruppan Signed-off-by: Sivaprakash Murugesan Link: https://lore.kernel.org/r/1596036607-11877-4-git-send-email-sivaprak@codeaurora.org Signed-off-by: Vinod Koul commit f1ec7ae6c9f8c016db320e204cb519a1da1581b8 Author: Ding Hui Date: Fri Aug 21 12:15:49 2020 +0300 xhci: Always restore EP_SOFT_CLEAR_TOGGLE even if ep reset failed Some device drivers call libusb_clear_halt when target ep queue is not empty. (eg. spice client connected to qemu for usb redir) Before commit f5249461b504 ("xhci: Clear the host side toggle manually when endpoint is soft reset"), that works well. But now, we got the error log: EP not empty, refuse reset xhci_endpoint_reset failed and left ep_state's EP_SOFT_CLEAR_TOGGLE bit still set So all the subsequent urb sumbits to the ep will fail with the warn log: Can't enqueue URB while manually clearing toggle We need to clear ep_state EP_SOFT_CLEAR_TOGGLE bit after xhci_endpoint_reset, even if it failed. Fixes: f5249461b504 ("xhci: Clear the host side toggle manually when endpoint is soft reset") Cc: stable # v4.17+ Signed-off-by: Ding Hui Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200821091549.20556-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 904df64a5f4d5ebd670801d869ca0a6d6a6e8df6 Author: Kai-Heng Feng Date: Fri Aug 21 12:15:48 2020 +0300 xhci: Do warm-reset when both CAS and XDEV_RESUME are set Sometimes re-plugging a USB device during system sleep renders the device useless: [ 173.418345] xhci_hcd 0000:00:14.0: Get port status 2-4 read: 0x14203e2, return 0x10262 ... [ 176.496485] usb 2-4: Waited 2000ms for CONNECT [ 176.496781] usb usb2-port4: status 0000.0262 after resume, -19 [ 176.497103] usb 2-4: can't resume, status -19 [ 176.497438] usb usb2-port4: logical disconnect Because PLS equals to XDEV_RESUME, xHCI driver reports U3 to usbcore, despite of CAS bit is flagged. So proritize CAS over XDEV_RESUME to let usbcore handle warm-reset for the port. Cc: stable Signed-off-by: Kai-Heng Feng Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200821091549.20556-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0077b1b2c8d9ad5f7a08b62fb8524cdb9938388f Author: Li Jun Date: Fri Aug 21 12:15:47 2020 +0300 usb: host: xhci: fix ep context print mismatch in debugfs dci is 0 based and xhci_get_ep_ctx() will do ep index increment to get the ep context. [rename dci to ep_index -Mathias] Cc: stable # v4.15+ Fixes: 02b6fdc2a153 ("usb: xhci: Add debugfs interface for xHCI driver") Signed-off-by: Li Jun Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200821091549.20556-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9c97cecab0d49e40460d9b5230ab4bf036f59491 Merge: 51072c0f5b5e9 5aba368893c0d Author: Greg Kroah-Hartman Date: Sun Aug 23 13:20:47 2020 +0200 Merge tag 'misc-habanalabs-fixes-2020-08-22' of git://people.freedesktop.org/~gabbayo/linux into char-misc-linus Oded writes: This tag contains the following bug fixes for 5.9-rc2/3: - Correct cleanup of PCI bar mapping in case of failure during initialization. - Several security fixes: - Validating user addresses before mapping them - Validating packet id (from user) before using it as index for array. - Validating F/W file size before coping it. - Prevent possible overflow when validating address from user in profiler. - Validate queue index (from user) before using it as index for array. - Check for correct vmalloc return code - Fix memory corruption in debugfs entry - Fix a loop in gaudi_extract_ecc_info() - Fix the set clock gating function in gaudi code - Set maximum power to F/W according to the card type - Cix incorrect check on failed workqueue create - Correctly report error when configuring the PCI controller * tag 'misc-habanalabs-fixes-2020-08-22' of git://people.freedesktop.org/~gabbayo/linux: habanalabs: correctly report inbound pci region cfg error habanalabs: check correct vmalloc return code habanalabs: validate FW file size habanalabs: fix incorrect check on failed workqueue create habanalabs: set max power according to card type habanalabs: proper handling of alloc size in coresight habanalabs: set clock gating according to mask habanalabs: verify user input in cs_ioctl_signal_wait habanalabs: Fix a loop in gaudi_extract_ecc_info() habanalabs: Fix memory corruption in debugfs habanalabs: validate packet id during CB parse habanalabs: Validate user address before mapping habanalabs: unmap PCI bars upon iATU failure commit 1965c4364bdd025e9e3142592edd76addcc4bab4 Author: Kai-Heng Feng Date: Sun Aug 23 18:58:50 2020 +0800 ALSA: usb-audio: Disable autosuspend for Lenovo ThinkStation P620 If USB autosuspend is enabled, both front and rear panel can no longer detect jack insertion. Enable USB remote wakeup, i.e. needs_remote_wakeup = 1, doesn't help either. So disable USB autosuspend to prevent missing jack detection event. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200823105854.26950-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit acd46a6b6de88569654567810acad2b0a0a25cea Author: Takashi Sakamoto Date: Sun Aug 23 16:55:45 2020 +0900 ALSA: firewire-digi00x: exclude Avid Adrenaline from detection Avid Adrenaline is reported that ALSA firewire-digi00x driver is bound to. However, as long as he investigated, the design of this model is hardly similar to the one of Digi 00x family. It's better to exclude the model from modalias of ALSA firewire-digi00x driver. This commit changes device entries so that the model is excluded. $ python3 crpp < ~/git/am-config-rom/misc/avid-adrenaline.img ROM header and bus information block ----------------------------------------------------------------- 400 04203a9c bus_info_length 4, crc_length 32, crc 15004 404 31333934 bus_name "1394" 408 e064a002 irmc 1, cmc 1, isc 1, bmc 0, cyc_clk_acc 100, max_rec 10 (2048) 40c 00a07e01 company_id 00a07e | 410 00085257 device_id 0100085257 | EUI-64 00a07e0100085257 root directory ----------------------------------------------------------------- 414 0005d08c directory_length 5, crc 53388 418 0300a07e vendor 41c 8100000c --> descriptor leaf at 44c 420 0c008380 node capabilities 424 8d000002 --> eui-64 leaf at 42c 428 d1000004 --> unit directory at 438 eui-64 leaf at 42c ----------------------------------------------------------------- 42c 0002410f leaf_length 2, crc 16655 430 00a07e01 company_id 00a07e | 434 00085257 device_id 0100085257 | EUI-64 00a07e0100085257 unit directory at 438 ----------------------------------------------------------------- 438 0004d6c9 directory_length 4, crc 54985 43c 1200a02d specifier id: 1394 TA 440 13014001 version: Vender Unique and AV/C 444 17000001 model 448 81000009 --> descriptor leaf at 46c descriptor leaf at 44c ----------------------------------------------------------------- 44c 00077205 leaf_length 7, crc 29189 450 00000000 textual descriptor 454 00000000 minimal ASCII 458 41766964 "Avid" 45c 20546563 " Tec" 460 686e6f6c "hnol" 464 6f677900 "ogy" 468 00000000 descriptor leaf at 46c ----------------------------------------------------------------- 46c 000599a5 leaf_length 5, crc 39333 470 00000000 textual descriptor 474 00000000 minimal ASCII 478 41647265 "Adre" 47c 6e616c69 "nali" 480 6e650000 "ne" Reported-by: Simon Wood Fixes: 9edf723fd858 ("ALSA: firewire-digi00x: add skeleton for Digi 002/003 family") Cc: # 4.4+ Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200823075545.56305-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 0bd8bce897b6697bbc286b8ba473aa0705fe394b Author: Takashi Sakamoto Date: Sun Aug 23 16:55:37 2020 +0900 ALSA; firewire-tascam: exclude Tascam FE-8 from detection Tascam FE-8 is known to support communication by asynchronous transaction only. The support can be implemented in userspace application and snd-firewire-ctl-services project has the support. However, ALSA firewire-tascam driver is bound to the model. This commit changes device entries so that the model is excluded. In a commit 53b3ffee7885 ("ALSA: firewire-tascam: change device probing processing"), I addressed to the concern that version field in configuration differs depending on installed firmware. However, as long as I checked, the version number is fixed. It's safe to return version number back to modalias. Fixes: 53b3ffee7885 ("ALSA: firewire-tascam: change device probing processing") Cc: # 4.4+ Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200823075537.56255-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 2a6838d54128952ace6f0ca166dd8706abe46649 Author: Chris Healy Date: Fri Aug 21 14:21:02 2020 -0700 ARM: dts: vfxxx: Add syscon compatible with OCOTP Add syscon compatibility with Vybrid OCOTP node. This is required to access the UID. Fixes: fa8d20c8dbb77 ("ARM: dts: vfxxx: Add node corresponding to OCOTP") Cc: stable@vger.kernel.org Reviewed-by: Fabio Estevam Reviewed-by: Stefan Agner Signed-off-by: Chris Healy Signed-off-by: Shawn Guo commit c5e46066b23dbbb4228fbdc3de66a27ddc8b8a36 Author: Adam Ford Date: Wed Aug 19 14:59:44 2020 -0500 ARM: dts: imx6q-logicpd: Fix broken PWM The DTC doesn't like the default PWM settings, because it's expecting three cells. This patch reduces adds the extra entry of 0 to the PWM reference. Fixes: fa28d8212ede ("ARM: dts: imx: default to #pwm-cells = <3> in the SoC dtsi files") Reviewed-by: Fabio Estevam Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit 56e79dfd036b538940227fb31371c1cd67b2467f Author: Rob Herring Date: Tue Aug 18 14:25:31 2020 -0600 arm64: dts: imx: Add missing imx8mm-beacon-kit.dtb to build The imx8mm-beacon-kit.dtb was never added to dtbs-y and wasn't getting built. Fix it. Fixes: 593816fa2f35 ("arm64: dts: imx: Add Beacon i.MX8m-Mini development kit") Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Signed-off-by: Rob Herring Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit ecc1aebe3436a3a97b42f7542f7b30a7a3cd1dc5 Author: Fabio Estevam Date: Mon Aug 17 15:01:43 2020 -0300 ARM: dts: imx6q-prtwd2: Remove unneeded i2c unit name The following dtc warning is seen when building with W=1: arch/arm/boot/dts/imx6q-prtwd2.dts:33.8-43.4: Warning (unit_address_vs_reg): /i2c@4: node has a unit name, but no reg or ranges property Remove the unneeded i2c unit name to fix the issue. Fixes: 88010b8174ab ("ARM: dts: add Protonic WD2 board") Signed-off-by: Fabio Estevam Reviewed-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 140a1dc5aea1648258bd9a5e6186331199212079 Author: Fabio Estevam Date: Mon Aug 17 15:01:42 2020 -0300 ARM: dts: imx6qdl-gw51xx: Remove unneeded #address-cells/#size-cells The following dtc warning is seen when building with W=1: arch/arm/boot/dts/imx6qdl-gw51xx.dtsi:23.12-68.4: Warning (avoid_unnecessary_addr_size): /gpio-keys: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Remove the unneeded #address-cells/#size-cells properties to fix the issue. Fixes: 64bf0a0af18d ("ARM: dts: imx6qdl-gw: add Gateworks System Controller support") Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit f320ac6e131669345c7f4abefbb228b570eb9199 Merge: c3d8f220d0122 52c479697c9b7 Author: Linus Torvalds Date: Sat Aug 22 17:11:38 2020 -0700 Merge branch 'work.epoll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull epoll fixes from Al Viro: "Fix reference counting and clean up exit paths" * 'work.epoll' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: do_epoll_ctl(): clean the failure exits up a bit epoll: Keep a reference on files added to the check list commit 52c479697c9b73f628140dcdfcd39ea302d05482 Author: Al Viro Date: Sat Aug 22 18:25:52 2020 -0400 do_epoll_ctl(): clean the failure exits up a bit Signed-off-by: Al Viro commit a9ed4a6560b8562b7e2e2bed9527e88001f7b682 Author: Marc Zyngier Date: Wed Aug 19 17:12:17 2020 +0100 epoll: Keep a reference on files added to the check list When adding a new fd to an epoll, and that this new fd is an epoll fd itself, we recursively scan the fds attached to it to detect cycles, and add non-epool files to a "check list" that gets subsequently parsed. However, this check list isn't completely safe when deletions can happen concurrently. To sidestep the issue, make sure that a struct file placed on the check list sees its f_count increased, ensuring that a concurrent deletion won't result in the file disapearing from under our feet. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Al Viro commit eeaac3634ee0e3f35548be35275efeca888e9b23 Author: Nikolay Aleksandrov Date: Sat Aug 22 15:06:36 2020 +0300 net: nexthop: don't allow empty NHA_GROUP Currently the nexthop code will use an empty NHA_GROUP attribute, but it requires at least 1 entry in order to function properly. Otherwise we end up derefencing null or random pointers all over the place due to not having any nh_grp_entry members allocated, nexthop code relies on having at least the first member present. Empty NHA_GROUP doesn't make any sense so just disallow it. Also add a WARN_ON for any future users of nexthop_create_group(). BUG: kernel NULL pointer dereference, address: 0000000000000080 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP CPU: 0 PID: 558 Comm: ip Not tainted 5.9.0-rc1+ #93 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-2.fc32 04/01/2014 RIP: 0010:fib_check_nexthop+0x4a/0xaa Code: 0f 84 83 00 00 00 48 c7 02 80 03 f7 81 c3 40 80 fe fe 75 12 b8 ea ff ff ff 48 85 d2 74 6b 48 c7 02 40 03 f7 81 c3 48 8b 40 10 <48> 8b 80 80 00 00 00 eb 36 80 78 1a 00 74 12 b8 ea ff ff ff 48 85 RSP: 0018:ffff88807983ba00 EFLAGS: 00010213 RAX: 0000000000000000 RBX: ffff88807983bc00 RCX: 0000000000000000 RDX: ffff88807983bc00 RSI: 0000000000000000 RDI: ffff88807bdd0a80 RBP: ffff88807983baf8 R08: 0000000000000dc0 R09: 000000000000040a R10: 0000000000000000 R11: ffff88807bdd0ae8 R12: 0000000000000000 R13: 0000000000000000 R14: ffff88807bea3100 R15: 0000000000000001 FS: 00007f10db393700(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000080 CR3: 000000007bd0f004 CR4: 00000000003706f0 Call Trace: fib_create_info+0x64d/0xaf7 fib_table_insert+0xf6/0x581 ? __vma_adjust+0x3b6/0x4d4 inet_rtm_newroute+0x56/0x70 rtnetlink_rcv_msg+0x1e3/0x20d ? rtnl_calcit.isra.0+0xb8/0xb8 netlink_rcv_skb+0x5b/0xac netlink_unicast+0xfa/0x17b netlink_sendmsg+0x334/0x353 sock_sendmsg_nosec+0xf/0x3f ____sys_sendmsg+0x1a0/0x1fc ? copy_msghdr_from_user+0x4c/0x61 ___sys_sendmsg+0x63/0x84 ? handle_mm_fault+0xa39/0x11b5 ? sockfd_lookup_light+0x72/0x9a __sys_sendmsg+0x50/0x6e do_syscall_64+0x54/0xbe entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f10dacc0bb7 Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb cd 66 0f 1f 44 00 00 8b 05 9a 4b 2b 00 85 c0 75 2e 48 63 ff 48 63 d2 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 8b 15 b1 f2 2a 00 f7 d8 64 89 02 48 RSP: 002b:00007ffcbe628bf8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007ffcbe628f80 RCX: 00007f10dacc0bb7 RDX: 0000000000000000 RSI: 00007ffcbe628c60 RDI: 0000000000000003 RBP: 000000005f41099c R08: 0000000000000001 R09: 0000000000000008 R10: 00000000000005e9 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ffcbe628d70 R15: 0000563a86c6e440 Modules linked in: CR2: 0000000000000080 CC: David Ahern Fixes: 430a049190de ("nexthop: Add support for nexthop groups") Reported-by: syzbot+a61aa19b0c14c8770bd9@syzkaller.appspotmail.com Signed-off-by: Nikolay Aleksandrov Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 5e0c22d4a9ddae4e784a3e171b9d3d452b37aeb2 Author: Jonathan Marek Date: Thu Aug 13 14:54:48 2020 -0400 drm/msm/a6xx: fix frequency not always being restored on GMU resume The patch reorganizing the set_freq function made it so the gmu resume doesn't always set the frequency, because a6xx_gmu_set_freq() exits early when the frequency hasn't been changed. Note this always happens when resuming GMU after recovering from a hang. Use a simple workaround to prevent this from happening. Fixes: 1f60d11423db ("drm: msm: a6xx: send opp instead of a frequency") Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 6f7cd6e40b94d498049c1a8664c15bf5863ae578 Author: Rob Clark Date: Tue Aug 11 16:36:57 2020 -0700 drm/msm/a6xx: add module param to enable debugbus snapshot For production devices, the debugbus sections will typically be fused off and empty in the gpu device coredump. But since this may contain data like cache contents, don't capture it by default. Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit f74cacf5d2bf71c2b415dbb9f100f2c705ad5182 Author: Rob Clark Date: Sat Aug 8 10:29:11 2020 -0700 drm/msm/a6xx: fix crashdec section name typo Backport note: maybe wait some time for the crashdec MR[1] to look for both the old typo'd name and the corrected name to land in mesa 20.2 [1] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6242 Fixes: 1707add81551 ("drm/msm/a6xx: Add a6xx gpu state") Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit f5749d6181fa7df5ae741788e5d96f593d3a60b6 Author: Dmitry Baryshkov Date: Thu Aug 20 12:36:22 2020 +0300 drm/msm/a6xx: fix gmu start on newer firmware New Qualcomm firmware has changed a way it reports back the 'started' event. Support new register values. Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark commit c3d8f220d01220a5b253e422be407d068dc65511 Merge: dd105d64a0c69 510bc3cb1ddc3 Author: Linus Torvalds Date: Sat Aug 22 10:22:44 2020 -0700 Merge tag 'kbuild-fixes-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - move -Wsign-compare warning from W=2 to W=3 - fix the keyword _restrict to __restrict in genksyms - fix more bugs in qconf * tag 'kbuild-fixes-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: qconf: replace deprecated QString::sprintf() with QTextStream kconfig: qconf: remove redundant help in the info view kconfig: qconf: remove qInfo() to get back Qt4 support kconfig: qconf: remove unused colNr kconfig: qconf: fix the popup menu in the ConfigInfoView window kconfig: qconf: fix signal connection to invalid slots genksyms: keywords: Use __restrict not _restrict kbuild: remove redundant patterns in filter/filter-out extract-cert: add static to local data Makefile.extrawarn: Move sign-compare from W=2 to W=3 commit dd105d64a0c6976153adea40c034ba26f7cf34ed Merge: d57ce84004a0d 8d75785a81424 Author: Linus Torvalds Date: Sat Aug 22 10:17:36 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Allow booting of late secondary CPUs affected by erratum 1418040 (currently they are parked if none of the early CPUs are affected by this erratum). - Add the 32-bit vdso Makefile to the vdso_install rule so that 'make vdso_install' installs the 32-bit compat vdso when it is compiled. - Print a warning that untrusted guests without a CPU erratum workaround (Cortex-A57 832075) may deadlock the affected system. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: ARM64: vdso32: Install vdso32 from vdso_install KVM: arm64: Print warning when cpu erratum can cause guests to deadlock arm64: Allow booting of late CPUs affected by erratum 1418040 arm64: Move handling of erratum 1418040 into C code commit d57ce84004a0d13ada89fbceec21539559cb72f2 Merge: b2d9e99622796 b97bf44f99155 Author: Linus Torvalds Date: Sat Aug 22 10:12:49 2020 -0700 Merge tag 's390-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - a couple of fixes for storage key handling relevant for debugging - add cond_resched into potentially slow subchannels scanning loop - fixes for PF/VF linking and to ignore stale PCI configuration request events * tag 's390-5.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/pci: fix PF/VF linking on hot plug s390/pci: re-introduce zpci_remove_device() s390/pci: fix zpci_bus_link_virtfn() s390/ptrace: fix storage key handling s390/runtime_instrumentation: fix storage key handling s390/pci: ignore stale configuration request event s390/cio: add cond_resched() in the slow_eval_known_fn() loop commit b2d9e99622796576eb6faa236b2d1f592cc43ace Merge: 9e574b74b781f b5331379bc626 Author: Linus Torvalds Date: Sat Aug 22 10:03:05 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: - PAE and PKU bugfixes for x86 - selftests fix for new binutils - MMU notifier fix for arm64 * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: arm64: Only reschedule if MMU_NOTIFIER_RANGE_BLOCKABLE is not set KVM: Pass MMU notifier range flags to kvm_unmap_hva_range() kvm: x86: Toggling CR4.PKE does not load PDPTEs in PAE mode kvm: x86: Toggling CR4.SMAP does not load PDPTEs in PAE mode KVM: x86: fix access code passed to gva_to_gpa selftests: kvm: Use a shorter encoding to clear RAX commit 9e574b74b781f14fa7348ba8b980b19a250a9c83 Merge: d6af63305666f dca93232b361d Author: Linus Torvalds Date: Sat Aug 22 09:56:42 2020 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "23 fixes in 5 drivers (qla2xxx, ufs, scsi_debug, fcoe, zfcp). The bulk of the changes are in qla2xxx and ufs and all are mostly small and definitely don't impact the core" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (23 commits) Revert "scsi: qla2xxx: Disable T10-DIF feature with FC-NVMe during probe" Revert "scsi: qla2xxx: Fix crash on qla2x00_mailbox_command" scsi: qla2xxx: Fix null pointer access during disconnect from subsystem scsi: qla2xxx: Check if FW supports MQ before enabling scsi: qla2xxx: Fix WARN_ON in qla_nvme_register_hba scsi: qla2xxx: Allow ql2xextended_error_logging special value 1 to be set anytime scsi: qla2xxx: Reduce noisy debug message scsi: qla2xxx: Fix login timeout scsi: qla2xxx: Indicate correct supported speeds for Mezz card scsi: qla2xxx: Flush I/O on zone disable scsi: qla2xxx: Flush all sessions on zone disable scsi: qla2xxx: Use MBX_TOV_SECONDS for mailbox command timeout values scsi: scsi_debug: Fix scp is NULL errors scsi: zfcp: Fix use-after-free in request timeout handlers scsi: ufs: No need to send Abort Task if the task in DB was cleared scsi: ufs: Clean up completed request without interrupt notification scsi: ufs: Improve interrupt handling for shared interrupts scsi: ufs: Fix interrupt error message for shared interrupts scsi: ufs-pci: Add quirk for broken auto-hibernate for Intel EHL scsi: ufs-mediatek: Fix incorrect time to wait link status ... commit d6af63305666f4e6fb211f3f12b802b3255f5194 Merge: f873db9acd3c9 5cd841d2676a7 Author: Linus Torvalds Date: Sat Aug 22 09:31:11 2020 -0700 Merge tag 'devicetree-fixes-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: "Another set of DT fixes: - restore range parsing error check - workaround PCI range parsing with missing 'device_type' now required - correct description of 'phy-connection-type' - fix erroneous matching on 'snps,dw-pcie' by 'intel,lgm-pcie' schema - a couple of grammar and whitespace fixes - update Shawn Guo's email" * tag 'devicetree-fixes-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: vendor-prefixes: Remove trailing whitespace dt-bindings: net: correct description of phy-connection-type dt-bindings: PCI: intel,lgm-pcie: Fix matching on all snps,dw-pcie instances of: address: Work around missing device_type property in pcie nodes dt: writing-schema: Miscellaneous grammar fixes dt-bindings: Use Shawn Guo's preferred e-mail for i.MX bindings of/address: check for invalid range.cpu_addr commit deb6323b739c54e1a1e83cd3a2bae4901e3eebf6 Author: Anson Huang Date: Mon Aug 3 16:01:24 2020 +0800 ARM: dts: imx7ulp: Correct gpio ranges Correct gpio ranges according to i.MX7ULP pinctrl driver: gpio_ptc: ONLY pin 0~19 are available; gpio_ptd: ONLY pin 0~11 are available; gpio_pte: ONLY pin 0~15 are available; gpio_ptf: ONLY pin 0~19 are available; Fixes: 20434dc92c05 ("ARM: dts: imx: add common imx7ulp dtsi support") Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 02ad21cefbac4d89ac443866f25b90449527737b Author: Jonathan Cameron Date: Wed Jul 22 16:50:49 2020 +0100 iio:magnetometer:ak8975 Fix alignment and data leak issues. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() data. This data is allocated with kzalloc so no data can leak apart from previous readings. The explicit alignment of ts is not necessary in this case as by coincidence the padding will end up the same, however I consider it to make the code less fragile and have included it. Fixes: bc11ca4a0b84 ("iio:magnetometer:ak8975: triggered buffer support") Reported-by: Lars-Peter Clausen Cc: Gregor Boirie Cc: Linus Walleij Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: commit 2684d5003490df5398aeafe2592ba9d4a4653998 Author: Jonathan Cameron Date: Wed Jul 22 16:50:48 2020 +0100 iio:light:ltr501 Fix timestamp alignment issue. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. Here we use a structure on the stack. The driver already did an explicit memset so no data leak was possible. Forced alignment of ts is not strictly necessary but probably makes the code slightly less fragile. Note there has been some rework in this driver of the years, so no way this will apply cleanly all the way back. Fixes: 2690be905123 ("iio: Add Lite-On ltr501 ambient light / proximity sensor driver") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: commit 523628852a5f5f34a15252b2634d0498d3cfb347 Author: Jonathan Cameron Date: Wed Jul 22 16:50:45 2020 +0100 iio:light:max44000 Fix timestamp alignment and prevent data leak. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses a 16 byte array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv(). This data is allocated with kzalloc so no data can leak appart from previous readings. It is necessary to force the alignment of ts to avoid the padding on x86_32 being different from 64 bit platorms (it alows for 4 bytes aligned 8 byte types. Fixes: 06ad7ea10e2b ("max44000: Initial triggered buffer support") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: commit eb1a148ef41d8ae8d9201efc3f1b145976290331 Author: Jonathan Cameron Date: Wed Jul 22 16:50:43 2020 +0100 iio:chemical:ccs811: Fix timestamp alignment and prevent data leak. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses an array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() data with alignment explicitly requested. This data is allocated with kzalloc so no data can leak appart from previous readings. The explicit alignment of ts is necessary to ensure consistent padding for x86_32 in which the ts would otherwise be 4 byte aligned. Fixes: 283d26917ad6 ("iio: chemical: ccs811: Add triggered buffer support") Reported-by: Lars-Peter Clausen Cc: Narcisa Ana Maria Vasile Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: commit f60e8bb84282b8e633956cfe74b4f0d64ca73cec Author: Jonathan Cameron Date: Wed Jul 22 16:50:42 2020 +0100 iio:proximity:mb1232: Fix timestamp alignment and prevent data leak. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses a 16 byte s16 array on the stack As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() data with alignment ensured by use of an explicit c structure. This data is allocated with kzalloc so no data can leak appart from previous readings. In this case the forced alignment of the ts is necessary to ensure correct padding on x86_32 where the s64 would only be 4 byte aligned. Fixes: 16b05261537e ("mb1232.c: add distance iio sensor with i2c") Reported-by: Lars-Peter Clausen Cc: Andreas Klinger Signed-off-by: Jonathan Cameron Cc: Reviewed-by: Andy Shevchenko commit 7e5ac1f2206eda414f90c698fe1820dee873394d Author: Jonathan Cameron Date: Wed Jul 22 16:50:40 2020 +0100 iio:accel:mma7455: Fix timestamp alignment and prevent data leak. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses a 16 byte u8 array on the stack As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() data with alignment ensured by use of an explicit c structure. This data is allocated with kzalloc so no data can leak appart from previous readings. The force alignment of ts is not strictly necessary in this particularly case but does make the code less fragile. Fixes: a84ef0d181d9 ("iio: accel: add Freescale MMA7455L/MMA7456L 3-axis accelerometer driver") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Cc: Reviewed-by: Andy Shevchenko commit a6f86f724394de3629da63fe5e1b7a4ab3396efe Author: Jonathan Cameron Date: Wed Jul 22 16:50:39 2020 +0100 iio:accel:bmc150-accel: Fix timestamp alignment and prevent data leak. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses a 16 byte array of smaller elements on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() data with alignment ensured by use of an explicit c structure. This data is allocated with kzalloc so no data can leak appart from previous readings. Fixes tag is beyond some major refactoring so likely manual backporting would be needed to get that far back. Whilst the force alignment of the ts is not strictly necessary, it does make the code less fragile. Fixes: 3bbec9773389 ("iio: bmc150_accel: add support for hardware fifo") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Acked-by: Srinivas Pandruvada Reviewed-by: Andy Shevchenko Cc: commit 89226a296d816727405d3fea684ef69e7d388bd8 Author: Jonathan Cameron Date: Wed Jul 22 16:50:38 2020 +0100 iio:accel:mma8452: Fix timestamp alignment and prevent data leak. One of a class of bugs pointed out by Lars in a recent review. iio_push_to_buffers_with_timestamp assumes the buffer used is aligned to the size of the timestamp (8 bytes). This is not guaranteed in this driver which uses a 16 byte u8 array on the stack. As Lars also noted this anti pattern can involve a leak of data to userspace and that indeed can happen here. We close both issues by moving to a suitable structure in the iio_priv() data with alignment ensured by use of an explicit c structure. This data is allocated with kzalloc so no data can leak appart from previous readings. The additional forcing of the 8 byte alignment of the timestamp is not strictly necessary but makes the code less fragile by making this explicit. Fixes: c7eeea93ac60 ("iio: Add Freescale MMA8452Q 3-axis accelerometer driver") Reported-by: Lars-Peter Clausen Cc: Peter Meerwald Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: commit 95ad67577de4ea08eb8e441394e698aa4addcc0b Author: Jonathan Cameron Date: Wed Jul 22 16:50:37 2020 +0100 iio: accel: kxsd9: Fix alignment of local buffer. iio_push_to_buffers_with_timestamp assumes 8 byte alignment which is not guaranteed by an array of smaller elements. Note that whilst in this particular case the alignment forcing of the ts element is not strictly necessary it acts as good documentation. Doing this where not necessary should cut down on the number of cut and paste introduced errors elsewhere. Fixes: 0427a106a98a ("iio: accel: kxsd9: Add triggered buffer handling") Reported-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Cc: commit e3ea4192d82480e1215280267746f51ce21db283 Author: Michael Walle Date: Mon Aug 3 10:30:01 2020 +0200 iio: adc: rockchip_saradc: select IIO_TRIGGERED_BUFFER The kernel fails to compile due to undefined reference to devm_iio_triggered_buffer_setup() if IIO_TRIGGERED_BUFFER is not enabled. The original patch [1] had this dependency. But somehow it didn't make it into the kernel tree. Re-add it. [1] https://lore.kernel.org/lkml/20200623233011.2319035-3-heiko@sntech.de/ Fixes: 4e130dc7b413 ("iio: adc: rockchip_saradc: Add support iio buffers") Signed-off-by: Michael Walle Reviewed-by: Heiko Stuebner Signed-off-by: Jonathan Cameron commit e71e6dbe96ac80ac2aebe71a6a942e7bd60e7596 Author: Maxim Kochetkov Date: Mon Aug 3 08:04:05 2020 +0300 iio: adc: ti-ads1015: fix conversion when CONFIG_PM is not set To stop conversion ads1015_set_power_state() function call unimplemented function __pm_runtime_suspend() from pm_runtime_put_autosuspend() if CONFIG_PM is not set. In case of CONFIG_PM is not set: __pm_runtime_suspend() returns -ENOSYS, so ads1015_read_raw() failed because ads1015_set_power_state() returns an error. If CONFIG_PM is disabled, there is no need to start/stop conversion. Fix it by adding return 0 function variant if CONFIG_PM is not set. Signed-off-by: Maxim Kochetkov Fixes: ecc24e72f437 ("iio: adc: Add TI ADS1015 ADC driver support") Tested-by: Maxim Kiselev Reviewed-by: Andy Shevchenko Cc: Signed-off-by: Jonathan Cameron commit ab3300deff6a81cc10887437383fc8a63884c3f9 Author: Dan Carpenter Date: Mon Jul 27 14:23:16 2020 +0300 counter: microchip-tcb-capture: check the correct variable This should be testing "regmap" instead of "priv->regmap". The "priv->regmap" variable is always zero so it's not an error pointer. Fixes: 106b104137fd ("counter: Add microchip TCB capture counter") Signed-off-by: Dan Carpenter Signed-off-by: Jonathan Cameron commit 336306790b2bbf7ce837625fa3b24ba724d05838 Author: Gwendal Grignou Date: Tue Jul 28 13:48:25 2020 -0700 iio: cros_ec: Set Gyroscope default frequency to 25Hz BMI160 Minimium gyroscope frequency in normal mode is 25Hz. When older EC firmware do not report their sensors frequencies, use 25Hz as the minimum for gyroscope to be sure it works on BMI160. Fixes: ae7b02ad2f32d ("iio: common: cros_ec_sensors: Expose cros_ec_sensors frequency range via iio sysfs") Signed-off-by: Gwendal Grignou Reviewed-by: Enric Balletbo i Serra Cc: Signed-off-by: Jonathan Cameron commit 5aba368893c0d9e275f4b823e053fd16155f63b9 Author: Ofir Bitton Date: Tue Aug 11 08:11:49 2020 +0300 habanalabs: correctly report inbound pci region cfg error During inbound iATU configuration we can get errors while configuring PCI registers, there is a certain scenario in which these errors are not reflected and driver is loaded with wrong configuration. Signed-off-by: Ofir Bitton Signed-off-by: Oded Gabbay commit 0839152f8c1efc1cc2d515d1ff1e253ca9402ad3 Author: Ofir Bitton Date: Tue Aug 11 08:57:45 2020 +0300 habanalabs: check correct vmalloc return code vmalloc can return different return code than NULL and a valid pointer. We must validate it in order to dereference a non valid pointer. Signed-off-by: Ofir Bitton Signed-off-by: Oded Gabbay commit bce382a8bb080ed5f2f3a06754526dc58b91cca2 Author: Ofir Bitton Date: Tue Aug 11 09:19:53 2020 +0300 habanalabs: validate FW file size We must validate FW size in order not to corrupt memory in case a malicious FW file will be present in system. Signed-off-by: Ofir Bitton Signed-off-by: Oded Gabbay commit 804d057cfae25c5447b36099fa59682d0d184ed6 Author: Colin Ian King Date: Thu Jul 30 09:20:22 2020 +0100 habanalabs: fix incorrect check on failed workqueue create The null check on a failed workqueue create is currently null checking hdev->cq_wq rather than the pointer hdev->cq_wq[i] and so the test will never be true on a failed workqueue create. Fix this by checking hdev->cq_wq[i]. Addresses-Coverity: ("Dereference before null check") Fixes: 5574cb2194b1 ("habanalabs: Assign each CQ with its own work queue") Signed-off-by: Colin Ian King Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 58361aae4b0eed388680a89ac153d27177f40510 Author: Oded Gabbay Date: Sat Aug 8 23:34:47 2020 +0300 habanalabs: set max power according to card type In Gaudi, the default max power setting is different between PCI and PMC cards. Therefore, the driver need to set the default after knowing what is the card type. The current code has a bug where it limits the maximum power of the PMC card to 200W after a reset occurs. Signed-off-by: Oded Gabbay commit 36545279f076afeb77104f5ffeab850da3b6d107 Author: Ofir Bitton Date: Thu Aug 6 11:33:27 2020 +0300 habanalabs: proper handling of alloc size in coresight Allocation size can go up to 64bit but truncated to 32bit, we should make sure it is not truncated and validate no address overflow. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f44d23b9095abd91dad9f5f3add2a3149833ec83 Author: Ofir Bitton Date: Tue Aug 4 13:38:43 2020 +0300 habanalabs: set clock gating according to mask Once clock gating is set we enable clock gating according to mask, we should also disable clock gating according to relevant bits. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 1cff11974080f47864d56ef97db228c51fcb8a0c Author: Ofir Bitton Date: Wed Aug 5 13:55:12 2020 +0300 habanalabs: verify user input in cs_ioctl_signal_wait User input must be validated before using it to access internal structures. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b0353540ffd2d78dca232990719916bee58c7523 Author: Dan Carpenter Date: Wed Aug 5 12:51:05 2020 +0300 habanalabs: Fix a loop in gaudi_extract_ecc_info() The condition was reversed. It should have been less than instead of greater than. The result is that we never enter the loop. Fixes: fcc6a4e60678 ("habanalabs: Extract ECC information from FW") Signed-off-by: Dan Carpenter Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit eeec23cd325ad4d83927b8ee162693579cf3813f Author: Dan Carpenter Date: Mon Aug 3 17:36:36 2020 +0300 habanalabs: Fix memory corruption in debugfs This has to be a long instead of a u32 because we write a long value. On 64 bit systems, this will cause memory corruption. Fixes: c216477363a3 ("habanalabs: add debugfs support") Signed-off-by: Dan Carpenter Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit bc75be24fa88ef10eecaff2b2a9ada8189e5ab5d Author: Ofir Bitton Date: Thu Jul 30 14:56:38 2020 +0300 habanalabs: validate packet id during CB parse During command buffer parsing, driver extracts packet id from user buffer. Driver must validate this packet id, since it is being used in order to extract information from internal structures. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit bf6d10963ed0db290e9aba05a97bfc4c72c7c0e4 Author: Ofir Bitton Date: Thu Jul 30 10:00:10 2020 +0300 habanalabs: Validate user address before mapping User address must be validated before driver performs address map. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f1aae40e8dbd2655e3b10cae381a1e8292b19d57 Author: Ofir Bitton Date: Thu Jul 16 13:33:52 2020 +0300 habanalabs: unmap PCI bars upon iATU failure In case the driver fails to configure the PCI controller iATU, it needs to unmap the PCI bars before exiting so if the driver is removed, the bars won't be left mapped. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 91dbd73a1739039fa7e9fe5c0169f2817a7f7670 Author: He Zhe Date: Thu Aug 20 20:54:40 2020 +0800 mips/oprofile: Fix fallthrough placement We want neither " include/linux/compiler_attributes.h:201:41: warning: statement will never be executed [-Wswitch-unreachable] 201 | # define fallthrough __attribute__((__fallthrough__)) | ^~~~~~~~~~~~~ " nor " include/linux/compiler_attributes.h:201:41: warning: attribute 'fallthrough' not preceding a case label or default label 201 | # define fallthrough __attribute__((__fallthrough__)) | ^~~~~~~~~~~~~ " It's not worth adding one more macro. Let's simply place the fallthrough in between the expansions. Fixes: c9b029903466 ("MIPS: Use fallthrough for arch/mips") Cc: stable@vger.kernel.org Signed-off-by: He Zhe Reviewed-by: Gustavo A. R. Silva Signed-off-by: Thomas Bogendoerfer commit ed0ec1a81faba7572646ceb515ea8cbf9625bbac Author: WANG Xuerui Date: Wed Aug 19 14:07:22 2020 +0800 MIPS: Loongson64: Remove unnecessary inclusion of boot_param.h The couple of #includes are unused by now; remove to prevent namespace pollution. This fixes e.g. build of dm_thin, which has a VIRTUAL symbol that conflicted with the newly-introduced one in mach-loongson64/boot_param.h. Fixes: 39c1485c8baa ("MIPS: KVM: Add kvm guest support for Loongson-3") Signed-off-by: WANG Xuerui Reviewed-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 43906812eaab06423f56af5cca9a9fcdbb4ac454 Author: Rob Clark Date: Tue Aug 18 09:31:19 2020 -0700 drm/msm: enable vblank during atomic commits This has roughly the same effect as drm_atomic_helper_wait_for_vblanks(), basically just ensuring that vblank accounting is enabled so that we get valid timestamp/seqn on pageflip events. Signed-off-by: Rob Clark Tested-by: Stephen Boyd Signed-off-by: Rob Clark commit 81dbbb417da4d1ac407dca5b434d39d5b6b91ef3 Author: Matthias Schiffer Date: Tue Jul 28 12:50:06 2020 +0200 ARM: dts: ls1021a: fix QuadSPI-memory reg range According to the Reference Manual, the correct size is 512 MiB. Without this fix, probing the QSPI fails: fsl-quadspi 1550000.spi: ioremap failed for resource [mem 0x40000000-0x7fffffff] fsl-quadspi 1550000.spi: Freescale QuadSPI probe failed fsl-quadspi: probe of 1550000.spi failed with error -12 Fixes: 85f8ee78ab72 ("ARM: dts: ls1021a: Add support for QSPI with ls1021a SoC") Signed-off-by: Matthias Schiffer Signed-off-by: Shawn Guo commit 2d62e6b038e729c3e4bfbfcfbd44800ef0883680 Author: Hou Pu Date: Fri Aug 21 04:34:42 2020 -0400 null_blk: fix passing of REQ_FUA flag in null_handle_rq REQ_FUA should be checked using rq->cmd_flags instead of req_op(). Fixes: deb78b419dfda ("nullb: emulate cache") Signed-off-by: Hou Pu Signed-off-by: Jens Axboe commit 0d3b6a8d213a30387b5104b2fb25376d18636f23 Author: Amit Engel Date: Wed Aug 19 11:31:11 2020 +0300 nvmet: Disable keep-alive timer when kato is cleared to 0h Based on nvme spec, when keep alive timeout is set to zero the keep-alive timer should be disabled. Signed-off-by: Amit Engel Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 5eac5f3342b20825260d3800e7f5f74f12bac931 Author: Chao Leng Date: Tue Aug 18 09:11:32 2020 +0200 nvme: redirect commands on dying queue If a command send through nvme-multipath failed on a dying queue, resend it on another path. Signed-off-by: Chao Leng [hch: rebased on top of the completion refactoring] Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Mike Snitzer Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 1e41f3bd26f79463c07aebf062a0a77f1fd39b2b Author: Christoph Hellwig Date: Tue Aug 18 09:11:31 2020 +0200 nvme: just check the status code type in nvme_is_path_error Check the SCT sub-field for a path related status instead of enumerating invididual status code. As of NVMe 1.4 this adds "Internal Path Error" and "Controller Pathing Error" to the list, but it also future proofs for additional status codes added to the category. Suggested-by: Chao Leng Signed-off-by: Christoph Hellwig Reviewed-by: Mike Snitzer Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 5ddaabe8ed713f148e3d67e99b86d99427aceb5c Author: Christoph Hellwig Date: Tue Aug 18 09:11:30 2020 +0200 nvme: refactor command completion Lift all the code to decide the dispostition of a completed command from nvme_complete_rq and nvme_failover_req into a new helper, which returns an emum of the potential actions. nvme_complete_rq then just switches on those and calls the proper helper for the action. Signed-off-by: Christoph Hellwig Reviewed-by: Mike Snitzer Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 2eb81a3364eada43985efc0641490b73af78d0fa Author: Christoph Hellwig Date: Tue Aug 18 09:11:29 2020 +0200 nvme: rename and document nvme_end_request nvme_end_request is a bit misnamed, as it wraps around the blk_mq_complete_* API. It's semantics also are non-trivial, so give it a more descriptive name and add a comment explaining the semantics. Signed-off-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Mike Snitzer Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit c41ad98bebb8f4f0335b3c50dbb7583a6149dce4 Author: Keith Busch Date: Fri Aug 7 09:32:35 2020 -0700 nvme: skip noiob for zoned devices Zoned block devices reuse the chunk_sectors queue limit to define zone boundaries. If a such a device happens to also report an optimal boundary, do not use that to define the chunk_sectors as that may intermittently interfere with io splitting and zone size queries. Signed-off-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit c61b82c7b71343c6aca6bb6cc3ff44fb123fb5d3 Author: Christoph Hellwig Date: Tue Aug 18 19:51:59 2020 +0200 nvme-pci: fix PRP pool size All operations are based on the controller, not the host page size. Switch the dma pool to use the controller page size as well to avoid massive overallocations on large page size systems. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 7442ddcedc344b6fa073692f165dffdd1889e780 Author: John Garry Date: Fri Aug 14 23:34:25 2020 +0800 nvme-pci: Use u32 for nvme_dev.q_depth and nvme_queue.q_depth Recently nvme_dev.q_depth was changed from an int to u16 type. This falls over for the queue depth calculation in nvme_pci_enable(), where NVME_CAP_MQES(dev->ctrl.cap) + 1 may overflow as a u16, as NVME_CAP_MQES() is a 16b number also. That happens for me, and this is the result: root@ubuntu:/home/john# [148.272996] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 Mem abort info: ESR = 0x96000004 EC = 0x25: 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=00000a27bf3c9000 [0000000000000010] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 96000004 [#1] PREEMPT SMP Modules linked in: nvme nvme_core CPU: 56 PID: 256 Comm: kworker/u195:0 Not tainted 5.8.0-next-20200812 #27 Hardware name: Huawei D06 /D06, BIOS Hisilicon D06 UEFI RC0 - V1.16.01 03/15/2019 Workqueue: nvme-reset-wq nvme_reset_work [nvme] pstate: 80c00009 (Nzcv daif +PAN +UAO BTYPE=--) pc : __sg_alloc_table_from_pages+0xec/0x238 lr : __sg_alloc_table_from_pages+0xc8/0x238 sp : ffff800013ccbad0 x29: ffff800013ccbad0 x28: ffff0a27b3d380a8 x27: 0000000000000000 x26: 0000000000002dc2 x25: 0000000000000dc0 x24: 0000000000000000 x23: 0000000000000000 x22: ffff800013ccbbe8 x21: 0000000000000010 x20: 0000000000000000 x19: 00000000fffff000 x18: ffffffffffffffff x17: 00000000000000c0 x16: fffffe289eaf6380 x15: ffff800011b59948 x14: ffff002bc8fe98f8 x13: ff00000000000000 x12: ffff8000114ca000 x11: 0000000000000000 x10: ffffffffffffffff x9 : ffffffffffffffc0 x8 : ffff0a27b5f9b6a0 x7 : 0000000000000000 x6 : 0000000000000001 x5 : ffff0a27b5f9b680 x4 : 0000000000000000 x3 : ffff0a27b5f9b680 x2 : 0000000000000000 x1 : 0000000000000001 x0 : 0000000000000000 Call trace: __sg_alloc_table_from_pages+0xec/0x238 sg_alloc_table_from_pages+0x18/0x28 iommu_dma_alloc+0x474/0x678 dma_alloc_attrs+0xd8/0xf0 nvme_alloc_queue+0x114/0x160 [nvme] nvme_reset_work+0xb34/0x14b4 [nvme] process_one_work+0x1e8/0x360 worker_thread+0x44/0x478 kthread+0x150/0x158 ret_from_fork+0x10/0x34 Code: f94002c3 6b01017f 540007c2 11000486 (f8645aa5) ---[ end trace 89bb2b72d59bf925 ]--- Fix by making onto a u32. Also use u32 for nvme_dev.q_depth, as we assign this value from nvme_dev.q_depth, and nvme_dev.q_depth will possibly hold 65536 - this avoids the same crash as above. Fixes: 61f3b8963097 ("nvme-pci: use unsigned for io queue depth") Signed-off-by: John Garry Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit ecbcdf0c81265f7f780b588eed77fa933fd79f68 Author: Logan Gunthorpe Date: Wed Aug 12 17:24:44 2020 -0600 nvme: Use spin_lock_irq() when taking the ctrl->lock When locking the ctrl->lock spinlock IRQs need to be disabled to avoid a dead lock. The new spin_lock() calls recently added produce the following lockdep warning when running the blktest nvme/003: ================================ WARNING: inconsistent lock state -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. ksoftirqd/2/22 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff888276a8c4c0 (&ctrl->lock){+.?.}-{2:2}, at: nvme_keep_alive_end_io+0x50/0xc0 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x164/0x500 _raw_spin_lock+0x28/0x40 nvme_get_effects_log+0x37/0x1c0 nvme_init_identify+0x9e4/0x14f0 nvme_reset_work+0xadd/0x2360 process_one_work+0x66b/0xb70 worker_thread+0x6e/0x6c0 kthread+0x1e7/0x210 ret_from_fork+0x22/0x30 irq event stamp: 1449221 hardirqs last enabled at (1449220): [] ktime_get+0xf9/0x140 hardirqs last disabled at (1449221): [] _raw_spin_lock_irqsave+0x25/0x60 softirqs last enabled at (1449210): [] __do_softirq+0x447/0x595 softirqs last disabled at (1449215): [] run_ksoftirqd+0x35/0x50 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ctrl->lock); lock(&ctrl->lock); *** DEADLOCK *** no locks held by ksoftirqd/2/22. stack backtrace: CPU: 2 PID: 22 Comm: ksoftirqd/2 Not tainted 5.8.0-rc4-eid-vmlocalyes-dbg-00157-g7236657c6b3a #1450 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack+0xc8/0x11a print_usage_bug.cold.63+0x235/0x23e mark_lock+0xa9c/0xcf0 __lock_acquire+0xd9a/0x2b50 lock_acquire+0x164/0x500 _raw_spin_lock_irqsave+0x40/0x60 nvme_keep_alive_end_io+0x50/0xc0 blk_mq_end_request+0x158/0x210 nvme_complete_rq+0x146/0x500 nvme_loop_complete_rq+0x26/0x30 [nvme_loop] blk_done_softirq+0x187/0x1e0 __do_softirq+0x118/0x595 run_ksoftirqd+0x35/0x50 smpboot_thread_fn+0x1d3/0x310 kthread+0x1e7/0x210 ret_from_fork+0x22/0x30 Fixes: be93e87e7802 ("nvme: support for multiple Command Sets Supported and Effects log pages") Signed-off-by: Logan Gunthorpe Reviewed-by: Keith Busch Tested-by: Chaitanya Kulkarni Reviewed-by: Chaitanya Kulkarni Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 7ee51cf60a90c2017b8d5b6e936cb52490aac7bd Author: Chaitanya Kulkarni Date: Thu Aug 6 15:56:27 2020 -0700 nvmet: call blk_mq_free_request() directly Instead of calling blk_put_request() which calls blk_mq_free_request(), call blk_mq_free_request() directly for NVMeOF passthru. This is to mainly avoid an extra function call in the completion path nvmet_passthru_req_done(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Keith Busch Reviewed-by: Logan Gunthorpe Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit a2138fd49467d0b909b9f19936974f9a3c4e3e1a Author: Chaitanya Kulkarni Date: Thu Aug 6 15:48:58 2020 -0700 nvmet: fix oops in pt cmd execution In the existing NVMeOF Passthru core command handling on failure of nvme_alloc_request() it errors out with rq value set to NULL. In the error handling path it calls blk_put_request() without checking if rq is set to NULL or not which produces following Oops:- [ 1457.346861] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 1457.347838] #PF: supervisor read access in kernel mode [ 1457.348464] #PF: error_code(0x0000) - not-present page [ 1457.349085] PGD 0 P4D 0 [ 1457.349402] Oops: 0000 [#1] SMP NOPTI [ 1457.349851] CPU: 18 PID: 10782 Comm: kworker/18:2 Tainted: G OE 5.8.0-rc4nvme-5.9+ #35 [ 1457.350951] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e3214 [ 1457.352347] Workqueue: events nvme_loop_execute_work [nvme_loop] [ 1457.353062] RIP: 0010:blk_mq_free_request+0xe/0x110 [ 1457.353651] Code: 3f ff ff ff 83 f8 01 75 0d 4c 89 e7 e8 1b db ff ff e9 2d ff ff ff 0f 0b eb ef 66 8 [ 1457.355975] RSP: 0018:ffffc900035b7de0 EFLAGS: 00010282 [ 1457.356636] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000002 [ 1457.357526] RDX: ffffffffa060bd05 RSI: 0000000000000000 RDI: 0000000000000000 [ 1457.358416] RBP: 0000000000000037 R08: 0000000000000000 R09: 0000000000000000 [ 1457.359317] R10: 0000000000000000 R11: 000000000000006d R12: 0000000000000000 [ 1457.360424] R13: ffff8887ffa68600 R14: 0000000000000000 R15: ffff8888150564c8 [ 1457.361322] FS: 0000000000000000(0000) GS:ffff888814600000(0000) knlGS:0000000000000000 [ 1457.362337] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1457.363058] CR2: 0000000000000000 CR3: 000000081c0ac000 CR4: 00000000003406e0 [ 1457.363973] Call Trace: [ 1457.364296] nvmet_passthru_execute_cmd+0x150/0x2c0 [nvmet] [ 1457.364990] process_one_work+0x24e/0x5a0 [ 1457.365493] ? __schedule+0x353/0x840 [ 1457.365957] worker_thread+0x3c/0x380 [ 1457.366426] ? process_one_work+0x5a0/0x5a0 [ 1457.366948] kthread+0x135/0x150 [ 1457.367362] ? kthread_create_on_node+0x60/0x60 [ 1457.367934] ret_from_fork+0x22/0x30 [ 1457.368388] Modules linked in: nvme_loop(OE) nvmet(OE) nvme_fabrics(OE) null_blk nvme(OE) nvme_corer [ 1457.368414] ata_piix crc32c_intel virtio_pci libata virtio_ring serio_raw t10_pi virtio floppy dm_] [ 1457.380849] CR2: 0000000000000000 [ 1457.381288] ---[ end trace c6cab61bfd1f68fd ]--- [ 1457.381861] RIP: 0010:blk_mq_free_request+0xe/0x110 [ 1457.382469] Code: 3f ff ff ff 83 f8 01 75 0d 4c 89 e7 e8 1b db ff ff e9 2d ff ff ff 0f 0b eb ef 66 8 [ 1457.384749] RSP: 0018:ffffc900035b7de0 EFLAGS: 00010282 [ 1457.385393] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000002 [ 1457.386264] RDX: ffffffffa060bd05 RSI: 0000000000000000 RDI: 0000000000000000 [ 1457.387142] RBP: 0000000000000037 R08: 0000000000000000 R09: 0000000000000000 [ 1457.388029] R10: 0000000000000000 R11: 000000000000006d R12: 0000000000000000 [ 1457.388914] R13: ffff8887ffa68600 R14: 0000000000000000 R15: ffff8888150564c8 [ 1457.389798] FS: 0000000000000000(0000) GS:ffff888814600000(0000) knlGS:0000000000000000 [ 1457.390796] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1457.391508] CR2: 0000000000000000 CR3: 000000081c0ac000 CR4: 00000000003406e0 [ 1457.392525] Kernel panic - not syncing: Fatal exception [ 1457.394138] Kernel Offset: disabled [ 1457.394677] ---[ end Kernel panic - not syncing: Fatal exception ]--- We fix this Oops by adding a new goto label out_put_req and reordering the blk_put_request call to avoid calling blk_put_request() with rq value is set to NULL. Here we also update the rest of the code accordingly. Fixes: 06b7164dfdc0 ("nvmet: add passthru code to process commands") Signed-off-by: Chaitanya Kulkarni Reviewed-by: Logan Gunthorpe Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 4db69a3d7cfe31e0205bfcb6de331aa9a124cb10 Author: Chaitanya Kulkarni Date: Thu Aug 6 13:02:23 2020 -0700 nvmet: add ns tear down label for pt-cmd handling In the current implementation before submitting the passthru cmd we may come across error e.g. getting ns from passthru controller, allocating a request from passthru controller, etc. For all the failure cases it only uses single goto label fail_out. In the target code, we follow the pattern to have a separate label for each error out the case when setting up multiple things before the actual action. This patch follows the same pattern and renames generic fail_out label to out_put_ns and updates the error out cases in the nvmet_passthru_execute_cmd() where it is needed. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Logan Gunthorpe Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit e398863b75af24103cee69cc8ee8bf4bc9c8913e Author: Martin Wilck Date: Thu Aug 6 15:19:32 2020 +0200 nvme: multipath: round-robin: eliminate "fallback" variable If we find an optimized path, we quit the loop immediately. Thus we can use just one variable for the next path, slighly simplifying the code. Signed-off-by: Martin Wilck Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 93eb0381e13d249a18ed4aae203291ff977e7ffb Author: Martin Wilck Date: Thu Aug 6 15:19:31 2020 +0200 nvme: multipath: round-robin: fix single non-optimized path case If there's only one usable, non-optimized path, nvme_round_robin_path() returns NULL, which is wrong. Fix it by falling back to "old", like in the single optimized path case. Also, if the active path isn't changed, there's no need to re-assign the pointer. Fixes: 3f6e3246db0e ("nvme-multipath: fix logic for non-optimized paths") Signed-off-by: Martin Wilck Signed-off-by: Martin George Reviewed-by: Keith Busch Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit f34448cd0dc697723fb5f4118f8431d9233b370d Author: Tianjia Zhang Date: Sun Aug 2 19:15:45 2020 +0800 nvme-fc: Fix wrong return value in __nvme_fc_init_request() On an error exit path, a negative error code should be returned instead of a positive return value. Fixes: e399441de9115 ("nvme-fabrics: Add host support for FC transport") Cc: James Smart Signed-off-by: Tianjia Zhang Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 0ceeab96ba598c578f0e87cb25b79349cd35b8f1 Author: Logan Gunthorpe Date: Wed Jul 29 13:10:09 2020 -0600 nvmet-passthru: Reject commands with non-sgl flags set Any command with a non-SGL flag set (like fuse flags) should be rejected. Fixes: c1fef73f793b ("nvmet: add passthru code to process commands") Signed-off-by: Logan Gunthorpe Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 382fee1a8b623e2546a3e15e80517389e0e0673e Author: Sagi Grimberg Date: Thu Jul 30 11:51:00 2020 -0700 nvmet: fix a memory leak We forgot to free new_model_number Fixes: 013b7ebe5a0d ("nvmet: make ctrl model configurable") Reviewed-by: Chaitanya Kulkarni Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe commit 27029b4b18aa5d3b060f0bf2c26dae254132cfce Author: Yufen Yu Date: Mon Aug 10 22:21:16 2020 -0400 blkcg: fix memleak for iolatency Normally, blkcg_iolatency_exit() will free related memory in iolatency when cleanup queue. But if blk_throtl_init() return error and queue init fail, blkcg_iolatency_exit() will not do that for us. Then it cause memory leak. Fixes: d70675121546 ("block: introduce blk-iolatency io controller") Signed-off-by: Yufen Yu Signed-off-by: Jens Axboe commit 0c8b9c3540bddd143091045c99b00d43393c8d62 Author: Geert Uytterhoeven Date: Wed Aug 19 14:32:43 2020 +0200 MAINTAINERS: Add missing header files to BLOCK LAYER section The various header files are part of the Block Layer. Add them to the corresponding section in the MAINTAINERS file, so scripts/get_maintainer.pl will pick them up. Signed-off-by: Geert Uytterhoeven Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit e4b469c66f3cbb81c2e94d31123d7bcdf3c1dabd Author: Keith Busch Date: Thu Aug 6 14:58:37 2020 -0700 block: fix get_max_io_size() A previous commit aligning splits to physical block sizes inadvertently modified one return case such that that it now returns 0 length splits when the number of sectors doesn't exceed the physical offset. This later hits a BUG in bio_split(). Restore the previous working behavior. Fixes: 9cc5169cd478b ("block: Improve physical block alignment of split bios") Reported-by: Eric Deal Signed-off-by: Keith Busch Cc: Bart Van Assche Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe commit db03f88fae8a2c8007caafa70287798817df2875 Author: Ming Lei Date: Tue Aug 18 17:07:28 2020 +0800 blk-mq: insert request not through ->queue_rq into sw/scheduler queue c616cbee97ae ("blk-mq: punt failed direct issue to dispatch list") supposed to add request which has been through ->queue_rq() to the hw queue dispatch list, however it adds request running out of budget or driver tag to hw queue too. This way basically bypasses request merge, and causes too many request dispatched to LLD, and system% is unnecessary increased. Fixes this issue by adding request not through ->queue_rq into sw/scheduler queue, and this way is safe because no ->queue_rq is called on this request yet. High %system can be observed on Azure storvsc device, and even soft lock is observed. This patch reduces %system during heavy sequential IO, meantime decreases soft lockup risk. Fixes: c616cbee97ae ("blk-mq: punt failed direct issue to dispatch list") Signed-off-by: Ming Lei Cc: Christoph Hellwig Cc: Bart Van Assche Cc: Mike Snitzer Signed-off-by: Jens Axboe commit 17bc10300c69bd51b82983cdadafa0a7791f074e Author: Nathan Chancellor Date: Mon Aug 17 23:49:25 2020 -0700 block/rnbd: Ensure err is always initialized in process_rdma Clang warns: drivers/block/rnbd/rnbd-srv.c:150:6: warning: variable 'err' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] if (IS_ERR(bio)) { ^~~~~~~~~~~ drivers/block/rnbd/rnbd-srv.c:177:9: note: uninitialized use occurs here return err; ^~~ drivers/block/rnbd/rnbd-srv.c:150:2: note: remove the 'if' if its condition is always false if (IS_ERR(bio)) { ^~~~~~~~~~~~~~~~~~ drivers/block/rnbd/rnbd-srv.c:126:9: note: initialize the variable 'err' to silence this warning int err; ^ = 0 1 warning generated. err is indeed uninitialized when this statement is taken. Ensure that it is assigned the error value of bio before jumping to the error handling label. Fixes: 735d77d4fd28 ("rnbd: remove rnbd_dev_submit_io") Reported-by: Brooke Basile Signed-off-by: Nathan Chancellor Acked-by: Jack Wang Link: https://github.com/ClangBuiltLinux/linux/issues/1134 Signed-off-by: Jens Axboe commit 5cd841d2676a702e5f79a8bacbfbae3bfc2411f7 Author: Geert Uytterhoeven Date: Wed Aug 19 11:20:58 2020 +0200 dt-bindings: vendor-prefixes: Remove trailing whitespace Fixes: f516fb704d02fff2 ("dt-bindings: Whitespace clean-ups in schema files") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200819092058.1526-1-geert+renesas@glider.be Signed-off-by: Rob Herring commit b5331379bc62611d1026173a09c73573384201d9 Author: Will Deacon Date: Tue Aug 11 11:27:25 2020 +0100 KVM: arm64: Only reschedule if MMU_NOTIFIER_RANGE_BLOCKABLE is not set When an MMU notifier call results in unmapping a range that spans multiple PGDs, we end up calling into cond_resched_lock() when crossing a PGD boundary, since this avoids running into RCU stalls during VM teardown. Unfortunately, if the VM is destroyed as a result of OOM, then blocking is not permitted and the call to the scheduler triggers the following BUG(): | BUG: sleeping function called from invalid context at arch/arm64/kvm/mmu.c:394 | in_atomic(): 1, irqs_disabled(): 0, non_block: 1, pid: 36, name: oom_reaper | INFO: lockdep is turned off. | CPU: 3 PID: 36 Comm: oom_reaper Not tainted 5.8.0 #1 | Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 | Call trace: | dump_backtrace+0x0/0x284 | show_stack+0x1c/0x28 | dump_stack+0xf0/0x1a4 | ___might_sleep+0x2bc/0x2cc | unmap_stage2_range+0x160/0x1ac | kvm_unmap_hva_range+0x1a0/0x1c8 | kvm_mmu_notifier_invalidate_range_start+0x8c/0xf8 | __mmu_notifier_invalidate_range_start+0x218/0x31c | mmu_notifier_invalidate_range_start_nonblock+0x78/0xb0 | __oom_reap_task_mm+0x128/0x268 | oom_reap_task+0xac/0x298 | oom_reaper+0x178/0x17c | kthread+0x1e4/0x1fc | ret_from_fork+0x10/0x30 Use the new 'flags' argument to kvm_unmap_hva_range() to ensure that we only reschedule if MMU_NOTIFIER_RANGE_BLOCKABLE is set in the notifier flags. Cc: Fixes: 8b3405e345b5 ("kvm: arm/arm64: Fix locking for kvm_free_stage2_pgd") Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: James Morse Signed-off-by: Will Deacon Message-Id: <20200811102725.7121-3-will@kernel.org> Signed-off-by: Paolo Bonzini commit fdfe7cbd58806522e799e2a50a15aee7f2cbb7b6 Author: Will Deacon Date: Tue Aug 11 11:27:24 2020 +0100 KVM: Pass MMU notifier range flags to kvm_unmap_hva_range() The 'flags' field of 'struct mmu_notifier_range' is used to indicate whether invalidate_range_{start,end}() are permitted to block. In the case of kvm_mmu_notifier_invalidate_range_start(), this field is not forwarded on to the architecture-specific implementation of kvm_unmap_hva_range() and therefore the backend cannot sensibly decide whether or not to block. Add an extra 'flags' parameter to kvm_unmap_hva_range() so that architectures are aware as to whether or not they are permitted to block. Cc: Cc: Marc Zyngier Cc: Suzuki K Poulose Cc: James Morse Signed-off-by: Will Deacon Message-Id: <20200811102725.7121-2-will@kernel.org> Signed-off-by: Paolo Bonzini commit 5f53584ce9c0cd9c92fb04717bb45bcd5719feaa Author: Madalin Bucur Date: Thu Aug 20 13:02:04 2020 +0300 dt-bindings: net: correct description of phy-connection-type The phy-connection-type parameter is described in ePAPR 1.1: Specifies interface type between the Ethernet device and a physical layer (PHY) device. The value of this property is specific to the implementation. Signed-off-by: Madalin Bucur Link: https://lore.kernel.org/r/1597917724-11127-1-git-send-email-madalin.bucur@oss.nxp.com Signed-off-by: Rob Herring commit f873db9acd3c92d4741bc3676c9eb511b2f9a6f6 Merge: 349111f050b54 867a23eab5284 Author: Linus Torvalds Date: Fri Aug 21 14:59:16 2020 -0700 Merge tag 'io_uring-5.9-2020-08-21' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: - Make sure the head link cancelation includes async work - Get rid of kiocb_wait_page_queue_init(), makes no sense to have it as a separate function since you moved it into io_uring itself - io_import_iovec cleanups (Pavel, me) - Use system_unbound_wq for ring exit work, to avoid spawning tons of these if we have tons of rings exiting at the same time - Fix req->flags overflow flag manipulation (Pavel) * tag 'io_uring-5.9-2020-08-21' of git://git.kernel.dk/linux-block: io_uring: kill extra iovec=NULL in import_iovec() io_uring: comment on kfree(iovec) checks io_uring: fix racy req->flags modification io_uring: use system_unbound_wq for ring exit work io_uring: cleanup io_import_iovec() of pre-mapped request io_uring: get rid of kiocb_wait_page_queue_init() io_uring: find and cancel head link async work on files exit commit a326462cba6ae7398a5c997dddf3bea39555a825 Author: Rob Herring Date: Wed Aug 19 11:58:16 2020 -0600 dt-bindings: PCI: intel,lgm-pcie: Fix matching on all snps,dw-pcie instances The intel,lgm-pcie binding is matching on all snps,dw-pcie instances which is wrong. Add a custom 'select' entry to fix this. Fixes: e54ea45a4955 ("dt-bindings: PCI: intel: Add YAML schemas for the PCIe RC controller") Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Reviewed-by: Dilip Kota Signed-off-by: Rob Herring commit 349111f050b54648df9b3e3d70944c56108c6470 Merge: f22c5579a7d60 88e8ac11d2ea3 Author: Linus Torvalds Date: Fri Aug 21 14:44:48 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "11 patches. Subsystems affected by this: misc, mm/hugetlb, mm/vmalloc, mm/misc, romfs, relay, uprobes, squashfs, mm/cma, mm/pagealloc" * emailed patches from Andrew Morton : mm, page_alloc: fix core hung in free_pcppages_bulk() mm: include CMA pages in lowmem_reserve at boot squashfs: avoid bio_alloc() failure with 1Mbyte blocks uprobes: __replace_page() avoid BUG in munlock_vma_page() kernel/relay.c: fix memleak on destroy relay channel romfs: fix uninitialized memory leak in romfs_dev_read() mm/rodata_test.c: fix missing function declaration mm/vunmap: add cond_resched() in vunmap_pmd_range khugepaged: adjust VM_BUG_ON_MM() in __khugepaged_enter() hugetlb_cgroup: convert comma to semicolon mailmap: add Andi Kleen commit 4af7b32f84aa4cd60e39b355bc8a1eab6cd8d8a4 Merge: 774d977abfd02 b16fc097bc283 Author: David S. Miller Date: Fri Aug 21 12:54:50 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Alexei Starovoitov says: ==================== pull-request: bpf 2020-08-21 The following pull-request contains BPF updates for your *net* tree. We've added 11 non-merge commits during the last 5 day(s) which contain a total of 12 files changed, 78 insertions(+), 24 deletions(-). The main changes are: 1) three fixes in BPF task iterator logic, from Yonghong. 2) fix for compressed dwarf sections in vmlinux, from Jiri. 3) fix xdp attach regression, from Andrii. ==================== Signed-off-by: David S. Miller commit f22c5579a7d600fa03f8c1d150cf78188f8709b6 Merge: c0a4f5b354dc2 fc26f5bbf1945 Author: Linus Torvalds Date: Fri Aug 21 12:32:42 2020 -0700 Merge tag 'riscv-for-linus-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - The CLINT driver has been split in two: one to handle the M-mode CLINT (memory mapped and used on NOMMU systems) and one to handle the S-mode CLINT (via SBI). - The addition of SiFive's drivers to rv32_defconfig * tag 'riscv-for-linus-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Add SiFive drivers to rv32_defconfig dt-bindings: timer: Add CLINT bindings RISC-V: Remove CLINT related code from timer and arch clocksource/drivers: Add CLINT timer driver RISC-V: Add mechanism to provide custom IPI operations commit c0a4f5b354dc26573cfaa541064fd35a794eb166 Merge: 985c788b6da44 ee87e1557c42d Author: Linus Torvalds Date: Fri Aug 21 12:28:33 2020 -0700 Merge tag 'for-linus-5.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: "One build fix and a minor fix for suppressing a useless warning when booting a Xen dom0 via UEFI" * tag 'for-linus-5.9-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: Fix build error when CONFIG_ACPI is not set/enabled: efi: avoid error message when booting under Xen commit 985c788b6da44dc21b401ce8ce3c2db023ef79e4 Merge: d723b99ec9e50 cc15fd9892e28 Author: Linus Torvalds Date: Fri Aug 21 12:26:58 2020 -0700 Merge tag 'pm-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These fix a few issues in the operating performance points (OPP) framework. Specifics: - Fix re-enabling of resources in dev_pm_opp_set_rate() (Rajendra Nayak) - Fix OPP table reference counting in error paths (Stephen Boyd)" * tag 'pm-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: opp: Enable resources again if they were disabled earlier opp: Put opp table in dev_pm_opp_set_rate() if _set_opp_bw() fails opp: Put opp table in dev_pm_opp_set_rate() for empty tables commit b16fc097bc283184cde40e5b30d15705e1590410 Author: Tobias Klauser Date: Fri Aug 21 15:36:42 2020 +0200 bpf: Fix two typos in uapi/linux/bpf.h Also remove trailing whitespaces in bpf_skb_get_tunnel_key example code. Signed-off-by: Tobias Klauser Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200821133642.18870-1-tklauser@distanz.ch commit 774d977abfd024e6f73484544b9abe5a5cd62de7 Author: Tom Rix Date: Fri Aug 21 06:56:00 2020 -0700 net: dsa: b53: check for timeout clang static analysis reports this problem b53_common.c:1583:13: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage ent.port &= ~BIT(port); ~~~~~~~~ ^ ent is set by a successful call to b53_arl_read(). Unsuccessful calls are caught by an switch statement handling specific returns. b32_arl_read() calls b53_arl_op_wait() which fails with the unhandled -ETIMEDOUT. So add -ETIMEDOUT to the switch statement. Because b53_arl_op_wait() already prints out a message, do not add another one. Fixes: 1da6df85c6fb ("net: dsa: b53: Implement ARL add/del/dump operations") Signed-off-by: Tom Rix Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit cecf7560f00a8419396a2ed0f6e5d245ccb4feac Author: Tom Rix Date: Thu Aug 20 06:19:32 2020 -0700 hwmon: (applesmc) check status earlier. clang static analysis reports this representative problem applesmc.c:758:10: warning: 1st function call argument is an uninitialized value left = be16_to_cpu(*(__be16 *)(buffer + 6)) >> 2; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ buffer is filled by the earlier call ret = applesmc_read_key(LIGHT_SENSOR_LEFT_KEY, ... This problem is reported because a goto skips the status check. Other similar problems use data from applesmc_read_key before checking the status. So move the checks to before the use. Signed-off-by: Tom Rix Reviewed-by: Henrik Rydberg Link: https://lore.kernel.org/r/20200820131932.10590-1-trix@redhat.com Signed-off-by: Guenter Roeck commit 8aebbbb2d573d0b4afc08b90ac7d73dba2d9da97 Author: Jason Baron Date: Fri Aug 21 12:20:14 2020 -0400 hwmon: (nct7904) Correct divide by 0 We hit a kernel panic due to a divide by 0 in nct7904_read_fan() for the hwmon_fan_min case. Extend the check to hwmon_fan_input case as well for safety. [ 1656.545650] divide error: 0000 [#1] SMP PTI [ 1656.545779] CPU: 12 PID: 18010 Comm: sensors Not tainted 5.4.47 #1 [ 1656.546065] RIP: 0010:nct7904_read+0x1e9/0x510 [nct7904] ... [ 1656.546549] RAX: 0000000000149970 RBX: ffffbd6b86bcbe08 RCX: 0000000000000000 ... [ 1656.547548] Call Trace: [ 1656.547665] hwmon_attr_show+0x32/0xd0 [hwmon] [ 1656.547783] dev_attr_show+0x18/0x50 [ 1656.547898] sysfs_kf_seq_show+0x99/0x120 [ 1656.548013] seq_read+0xd8/0x3e0 [ 1656.548127] vfs_read+0x89/0x130 [ 1656.548234] ksys_read+0x7d/0xb0 [ 1656.548342] do_syscall_64+0x48/0x110 [ 1656.548451] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: d65a5102a99f5 ("hwmon: (nct7904) Convert to use new hwmon registration API") Signed-off-by: Jason Baron Link: https://lore.kernel.org/r/1598026814-2604-1-git-send-email-jbaron@akamai.com Signed-off-by: Guenter Roeck commit c15e1bdda4365a5f17cdadf22bf1c1df13884a9e Author: Heikki Krogerus Date: Fri Aug 21 13:53:42 2020 +0300 device property: Fix the secondary firmware node handling in set_primary_fwnode() When the primary firmware node pointer is removed from a device (set to NULL) the secondary firmware node pointer, when it exists, is made the primary node for the device. However, the secondary firmware node pointer of the original primary firmware node is never cleared (set to NULL). To avoid situation where the secondary firmware node pointer is pointing to a non-existing object, clearing it properly when the primary node is removed from a device in set_primary_fwnode(). Fixes: 97badf873ab6 ("device property: Make it possible to use secondary firmware nodes") Cc: All applicable Signed-off-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki commit 17189d9138fec95a7caacc0d6f602a5793d8f5dd Author: Ard Biesheuvel Date: Tue Aug 18 11:13:53 2020 +0200 ACPI: ioremap: avoid redundant rounding to OS page size The arm64 implementation of acpi_os_ioremap() was recently updated to tighten the checks around which parts of memory are permitted to be mapped by ACPI code, which generally only needs access to memory regions that are statically described by firmware, and any attempts to access memory that is in active use by the OS is generally a bug or a hacking attempt. This tightening is based on the EFI memory map, which describes all memory in the system. The AArch64 architecture permits page sizes of 16k and 64k in addition to the EFI default, which is 4k, which means that the EFI memory map may describe regions that cannot be mapped seamlessly if the OS page size is greater than 4k. This is usually not a problem, given that the EFI spec does not permit memory regions requiring different memory attributes to share a 64k page frame, and so the usual rounding to page size performed by ioremap() is sufficient to deal with this. However, this rounding does complicate our EFI memory map permission check, due to the loss of information that occurs when several small regions share a single 64k page frame (where rounding each of them will result in the same 64k single page region). However, due to the fact that the region check occurs *before* the call to ioremap() where the necessary rounding is performed, we can deal with this issue simply by removing the redundant rounding performed by acpi_os_map_iomem(), as it appears to be the only place where the arguments to a call to acpi_os_ioremap() are rounded up. So omit the rounding in the call, and instead, apply the necessary masking when assigning the map->virt member. Fixes: 1583052d111f ("arm64/acpi: disallow AML memory opregions to access kernel memory") Signed-off-by: Ard Biesheuvel Signed-off-by: Rafael J. Wysocki commit 6556b0a8ef3a51ade1f772ff58807de463fc1b58 Author: Furquan Shaikh Date: Wed Aug 19 10:16:56 2020 -0700 ACPI: SoC: APD: Check return value of acpi_dev_get_property() `fch_misc_setup()` uses `acpi_dev_get_property()` to read the value of "is-rv" passed in by BIOS in ACPI tables. However, not all BIOSes might pass in this property and hence it is important to first check the return value of `acpi_dev_get_property()` before referencing the object filled by it. Signed-off-by: Furquan Shaikh [ rjw: Subject edits ] Signed-off-by: Rafael J. Wysocki commit 93d0c1ab23281fda96490f23cd6f2a1966fdc030 Author: Sumit Gupta Date: Wed Aug 12 01:13:17 2020 +0530 cpufreq: replace cpu_logical_map() with read_cpuid_mpir() Commit eaecca9e7710 ("arm64: Fix __cpu_logical_map undefined issue") fixes the issue with building tegra194 cpufreq driver as module. But the fix might cause problem while supporting physical CPU hotplug[1]. This patch fixes the original problem by avoiding use of cpu_logical_map(). Instead calling read_cpuid_mpidr() to get MPIDR on target CPU. [1] https://lore.kernel.org/linux-arm-kernel/20200724131059.GB6521@bogus/ Fixes: df320f89359c ("cpufreq: Add Tegra194 cpufreq driver") Reviewed-by: Sudeep Holla Signed-off-by: Sumit Gupta Acked-by: Viresh Kumar [ rjw: Subject & changelog edits ] Signed-off-by: Rafael J. Wysocki commit 8d75785a814241587802655cc33e384230744f0c Author: Stephen Boyd Date: Mon Aug 17 18:49:50 2020 -0700 ARM64: vdso32: Install vdso32 from vdso_install Add the 32-bit vdso Makefile to the vdso_install rule so that 'make vdso_install' installs the 32-bit compat vdso when it is compiled. Fixes: a7f71a2c8903 ("arm64: compat: Add vDSO") Signed-off-by: Stephen Boyd Reviewed-by: Vincenzo Frascino Acked-by: Will Deacon Cc: Vincenzo Frascino Link: https://lore.kernel.org/r/20200818014950.42492-1-swboyd@chromium.org Signed-off-by: Catalin Marinas commit d723b99ec9e502a414a96a51ec229333f807b47e Merge: 5e0b17b026eb7 27bc446e2def3 Author: Linus Torvalds Date: Fri Aug 21 11:03:38 2020 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Improvements to ext4's block allocator performance for very large file systems, especially when the file system or files which are highly fragmented. There is a new mount option, prefetch_block_bitmaps which will pull in the block bitmaps and set up the in-memory buddy bitmaps when the file system is initially mounted. Beyond that, a lot of bug fixes and cleanups. In particular, a number of changes to make ext4 more robust in the face of write errors or file system corruptions" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (46 commits) ext4: limit the length of per-inode prealloc list ext4: reorganize if statement of ext4_mb_release_context() ext4: add mb_debug logging when there are lost chunks ext4: Fix comment typo "the the". jbd2: clean up checksum verification in do_one_pass() ext4: change to use fallthrough macro ext4: remove unused parameter of ext4_generic_delete_entry function mballoc: replace seq_printf with seq_puts ext4: optimize the implementation of ext4_mb_good_group() ext4: delete invalid comments near ext4_mb_check_limits() ext4: fix typos in ext4_mb_regular_allocator() comment ext4: fix checking of directory entry validity for inline directories fs: prevent BUG_ON in submit_bh_wbc() ext4: correctly restore system zone info when remount fails ext4: handle add_system_zone() failure in ext4_setup_system_zone() ext4: fold ext4_data_block_valid_rcu() into the caller ext4: check journal inode extents more carefully ext4: don't allow overlapping system zones ext4: handle error of ext4_setup_system_zone() on remount ext4: delete the invalid BUGON in ext4_mb_load_buddy_gfp() ... commit 5e0b17b026eb7c6de9baa9b0d45a51b05f05abe1 Author: David Howells Date: Fri Aug 21 10:15:12 2020 +0100 afs: Fix NULL deref in afs_dynroot_depopulate() If an error occurs during the construction of an afs superblock, it's possible that an error occurs after a superblock is created, but before we've created the root dentry. If the superblock has a dynamic root (ie. what's normally mounted on /afs), the afs_kill_super() will call afs_dynroot_depopulate() to unpin any created dentries - but this will oops if the root hasn't been created yet. Fix this by skipping that bit of code if there is no root dentry. This leads to an oops looking like: general protection fault, ... KASAN: null-ptr-deref in range [0x0000000000000068-0x000000000000006f] ... RIP: 0010:afs_dynroot_depopulate+0x25f/0x529 fs/afs/dynroot.c:385 ... Call Trace: afs_kill_super+0x13b/0x180 fs/afs/super.c:535 deactivate_locked_super+0x94/0x160 fs/super.c:335 afs_get_tree+0x1124/0x1460 fs/afs/super.c:598 vfs_get_tree+0x89/0x2f0 fs/super.c:1547 do_new_mount fs/namespace.c:2875 [inline] path_mount+0x1387/0x2070 fs/namespace.c:3192 do_mount fs/namespace.c:3205 [inline] __do_sys_mount fs/namespace.c:3413 [inline] __se_sys_mount fs/namespace.c:3390 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3390 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 which is oopsing on this line: inode_lock(root->d_inode); presumably because sb->s_root was NULL. Fixes: 0da0b7fd73e4 ("afs: Display manually added cells in dynamic root mount") Reported-by: syzbot+c1eff8205244ae7e11a6@syzkaller.appspotmail.com Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit cd02217a5d813e2bbec984a9eeb8280ff290a150 Merge: 7f04f3ed621fd f6da70d99c962 Author: Linus Torvalds Date: Fri Aug 21 10:14:16 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "One regression from 5.8 and a few bugs from earlier kernels: - Various spelling corrections in kernel prints - Bug fixes in hfi1 and bntx_re - Revert a 5.8 patch in hns - Batch update for Mellanox and Cumulus maintainers emails" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: MAINTAINERS: Update Mellanox and Cumulus Network addresses to new domain Revert "RDMA/hns: Reserve one sge in order to avoid local length error" RDMA/hfi1: Correct an interlock issue for TID RDMA WRITE request RDMA/bnxt_re: Do not add user qps to flushlist RDMA/core: Fix spelling mistake "Could't" -> "Couldn't" RDMA/usnic: Fix spelling mistake "transistion" -> "transition" RDMA/hns: Fix spelling mistake "epmty" -> "empty" commit 7f04f3ed621fd345ca1b01ec6e98c9b85d95851f Merge: 43d387a4adc48 b90b925fd52c7 Author: Linus Torvalds Date: Fri Aug 21 10:07:54 2020 -0700 Merge tag 'sound-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of small fixes over several drivers, but all are driver- specific and nothing looks scary. Slightly large changes are seen in ASoC qcom driver for the bugs that were revealed by the recent ASoC core change to report the invalid register access errors. Also ASoC fsl got a slight intensive change for the distortion fix. Others are only trivial fixes or device-specific quirks" * tag 'sound-5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits) ALSA: hda: avoid reset of sdo_limit ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion ALSA: usb-audio: ignore broken processing/extension unit ASoC: intel: Fix memleak in sst_media_open ASoC: wm8994: Avoid attempts to read unreadable registers ASoC: msm8916-wcd-analog: fix register Interrupt offset ASoC: wm8994: Prevent access to invalid VU register bits on WM1811 ALSA: hda/realtek: Add model alc298-samsung-headphone ALSA: usb-audio: Update documentation comment for MS2109 quirk ALSA: isa: fix spelling mistakes in the comments ALSA: usb-audio: Add capture support for Saffire 6 (USB 1.1) ALSA: hda/realtek: Add quirk for Samsung Galaxy Flex Book ASoC: q6routing: add dummy register read/write function ASoC: q6afe-dai: mark all widgets registers as SND_SOC_NOPM ASoC: Make soc_component_read() returning an error code again ASoC: amd: Replacing component->name with codec_dai->name. ASoC: fsl: Fix unused variable warning ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_dmic: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_ahub: Fix compile warning with CONFIG_PM=n ... commit 43d387a4adc48e1fe68bf467cbfd67a11d65eb45 Merge: da2968ff879b9 0790e63f58f22 Author: Linus Torvalds Date: Fri Aug 21 10:02:44 2020 -0700 Merge tag 'drm-fixes-2020-08-21' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Regular fixes pull for rc2. Usual rc2 doesn't seem too busy, mainly i915 and amdgpu. I'd expect the usual uptick for rc3. amdgpu: - Fix allocation size - SR-IOV fixes - Vega20 SMU feature state caching fix - Fix custom pptable handling - Arcturus golden settings update - Several display fixes - Fixes for Navy Flounder - Misc display fixes - RAS fix amdkfd: - SDMA fix for renoir i915: - Fix device parameter usage for selftest mock i915 device - Fix LPSP capability debugfs NULL dereference - Fix buddy register pagemask table - Fix intel_atomic_check() non-negative return value - Fix selftests passing a random 0 into ilog2() - Fix TGL power well enable/disable ordering - Switch to PMU module refcounting - GVT fixes virtio: - Add missing dma_fence_put() in virtio_gpu_execbuffer_ioctl() - Fix memory leak in virtio_gpu_cleanup_object()" * tag 'drm-fixes-2020-08-21' of git://anongit.freedesktop.org/drm/drm: (34 commits) Revert "drm/amdgpu: disable gfxoff for navy_flounder" drm/i915/tgl: Make sure TC-cold is blocked before enabling TC AUX power wells drm/i915/selftests: Avoid passing a random 0 into ilog2 drm/i915: Fix wrong return value in intel_atomic_check() drm/i915: Update bw_buddy pagemask table drm/i915/display: Check for an LPSP encoder before dereferencing drm/i915: Copy default modparams to mock i915_device drm/i915: Provide the perf pmu.module drm/amd/display: fix pow() crashing when given base 0 drm/amd/display: Reset scrambling on Test Pattern drm/amd/display: fix dcn3 wide timing dsc validation drm/amd/display: Fix DFPstate hang due to view port changed drm/amd/display: Assign correct left shift drm/amd/display: Call DMUB for eDP power control drm/amdkfd: fix the wrong sdma instance query for renoir drm/amdgpu: parse ta firmware for navy_flounder drm/amdgpu: fix NULL pointer access issue when unloading driver drm/amdgpu: fix uninit-value in arcturus_log_thermal_throttling_event() drm/amdgpu: disable gfxoff for navy_flounder drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal ... commit 1e105e6afa6c3d32bfb52c00ffa393894a525c27 Author: Florian Westphal Date: Thu Aug 20 21:05:50 2020 +0200 netfilter: nf_tables: fix destination register zeroing Following bug was reported via irc: nft list ruleset set knock_candidates_ipv4 { type ipv4_addr . inet_service size 65535 elements = { 127.0.0.1 . 123, 127.0.0.1 . 123 } } .. udp dport 123 add @knock_candidates_ipv4 { ip saddr . 123 } udp dport 123 add @knock_candidates_ipv4 { ip saddr . udp dport } It should not have been possible to add a duplicate set entry. After some debugging it turned out that the problem is the immediate value (123) in the second-to-last rule. Concatenations use 32bit registers, i.e. the elements are 8 bytes each, not 6 and it turns out the kernel inserted inet firewall @knock_candidates_ipv4 element 0100007f ffff7b00 : 0 [end] element 0100007f 00007b00 : 0 [end] Note the non-zero upper bits of the first element. It turns out that nft_immediate doesn't zero the destination register, but this is needed when the length isn't a multiple of 4. Furthermore, the zeroing in nft_payload is broken. We can't use [len / 4] = 0 -- if len is a multiple of 4, index is off by one. Skip zeroing in this case and use a conditional instead of (len -1) / 4. Fixes: 49499c3e6e18 ("netfilter: nf_tables: switch registers to 32 bit addressing") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit da9125df854ea48a6240c66e8a67be06e2c12c03 Author: Pablo Neira Ayuso Date: Thu Aug 20 14:12:55 2020 +0200 netfilter: nf_tables: incorrect enum nft_list_attributes definition This should be NFTA_LIST_UNSPEC instead of NFTA_LIST_UNPEC, all other similar attribute definitions are postfixed with _UNSPEC. Fixes: 96518518cc41 ("netfilter: add nftables") Signed-off-by: Pablo Neira Ayuso commit 6f03bf43ee05b31d3822def2a80f11b3591c55b3 Author: Pablo Neira Ayuso Date: Thu Aug 20 14:12:54 2020 +0200 netfilter: nf_tables: add NFTA_SET_USERDATA if not null Kernel sends an empty NFTA_SET_USERDATA attribute with no value if userspace adds a set with no NFTA_SET_USERDATA attribute. Fixes: e6d8ecac9e68 ("netfilter: nf_tables: Add new attributes into nft_set to store user data.") Signed-off-by: Pablo Neira Ayuso commit 88e8ac11d2ea3acc003cf01bb5a38c8aa76c3cfd Author: Charan Teja Reddy Date: Thu Aug 20 17:42:27 2020 -0700 mm, page_alloc: fix core hung in free_pcppages_bulk() The following race is observed with the repeated online, offline and a delay between two successive online of memory blocks of movable zone. P1 P2 Online the first memory block in the movable zone. The pcp struct values are initialized to default values,i.e., pcp->high = 0 & pcp->batch = 1. Allocate the pages from the movable zone. Try to Online the second memory block in the movable zone thus it entered the online_pages() but yet to call zone_pcp_update(). This process is entered into the exit path thus it tries to release the order-0 pages to pcp lists through free_unref_page_commit(). As pcp->high = 0, pcp->count = 1 proceed to call the function free_pcppages_bulk(). Update the pcp values thus the new pcp values are like, say, pcp->high = 378, pcp->batch = 63. Read the pcp's batch value using READ_ONCE() and pass the same to free_pcppages_bulk(), pcp values passed here are, batch = 63, count = 1. Since num of pages in the pcp lists are less than ->batch, then it will stuck in while(list_empty(list)) loop with interrupts disabled thus a core hung. Avoid this by ensuring free_pcppages_bulk() is called with proper count of pcp list pages. The mentioned race is some what easily reproducible without [1] because pcp's are not updated for the first memory block online and thus there is a enough race window for P2 between alloc+free and pcp struct values update through onlining of second memory block. With [1], the race still exists but it is very narrow as we update the pcp struct values for the first memory block online itself. This is not limited to the movable zone, it could also happen in cases with the normal zone (e.g., hotplug to a node that only has DMA memory, or no other memory yet). [1]: https://patchwork.kernel.org/patch/11696389/ Fixes: 5f8dcc21211a ("page-allocator: split per-cpu list into one-list-per-migrate-type") Signed-off-by: Charan Teja Reddy Signed-off-by: Andrew Morton Acked-by: David Hildenbrand Acked-by: David Rientjes Acked-by: Michal Hocko Cc: Michal Hocko Cc: Vlastimil Babka Cc: Vinayak Menon Cc: [2.6+] Link: http://lkml.kernel.org/r/1597150703-19003-1-git-send-email-charante@codeaurora.org Signed-off-by: Linus Torvalds commit e08d3fdfe2dafa0331843f70ce1ff6c1c4900bf4 Author: Doug Berger Date: Thu Aug 20 17:42:24 2020 -0700 mm: include CMA pages in lowmem_reserve at boot The lowmem_reserve arrays provide a means of applying pressure against allocations from lower zones that were targeted at higher zones. Its values are a function of the number of pages managed by higher zones and are assigned by a call to the setup_per_zone_lowmem_reserve() function. The function is initially called at boot time by the function init_per_zone_wmark_min() and may be called later by accesses of the /proc/sys/vm/lowmem_reserve_ratio sysctl file. The function init_per_zone_wmark_min() was moved up from a module_init to a core_initcall to resolve a sequencing issue with khugepaged. Unfortunately this created a sequencing issue with CMA page accounting. The CMA pages are added to the managed page count of a zone when cma_init_reserved_areas() is called at boot also as a core_initcall. This makes it uncertain whether the CMA pages will be added to the managed page counts of their zones before or after the call to init_per_zone_wmark_min() as it becomes dependent on link order. With the current link order the pages are added to the managed count after the lowmem_reserve arrays are initialized at boot. This means the lowmem_reserve values at boot may be lower than the values used later if /proc/sys/vm/lowmem_reserve_ratio is accessed even if the ratio values are unchanged. In many cases the difference is not significant, but for example an ARM platform with 1GB of memory and the following memory layout cma: Reserved 256 MiB at 0x0000000030000000 Zone ranges: DMA [mem 0x0000000000000000-0x000000002fffffff] Normal empty HighMem [mem 0x0000000030000000-0x000000003fffffff] would result in 0 lowmem_reserve for the DMA zone. This would allow userspace to deplete the DMA zone easily. Funnily enough $ cat /proc/sys/vm/lowmem_reserve_ratio would fix up the situation because as a side effect it forces setup_per_zone_lowmem_reserve. This commit breaks the link order dependency by invoking init_per_zone_wmark_min() as a postcore_initcall so that the CMA pages have the chance to be properly accounted in their zone(s) and allowing the lowmem_reserve arrays to receive consistent values. Fixes: bc22af74f271 ("mm: update min_free_kbytes from khugepaged after core initialization") Signed-off-by: Doug Berger Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: Jason Baron Cc: David Rientjes Cc: "Kirill A. Shutemov" Cc: Link: http://lkml.kernel.org/r/1597423766-27849-1-git-send-email-opendmb@gmail.com Signed-off-by: Linus Torvalds commit f26044c83e6e473a61917f5db411d1417327d425 Author: Phillip Lougher Date: Thu Aug 20 17:42:21 2020 -0700 squashfs: avoid bio_alloc() failure with 1Mbyte blocks This is a regression introduced by the patch "migrate from ll_rw_block usage to BIO". Bio_alloc() is limited to 256 pages (1 Mbyte). This can cause a failure when reading 1 Mbyte block filesystems. The problem is a datablock can be fully (or almost uncompressed), requiring 256 pages, but, because blocks are not aligned to page boundaries, it may require 257 pages to read. Bio_kmalloc() can handle 1024 pages, and so use this for the edge condition. Fixes: 93e72b3c612a ("squashfs: migrate from ll_rw_block usage to BIO") Reported-by: Nicolas Prochazka Reported-by: Tomoatsu Shimada Signed-off-by: Phillip Lougher Signed-off-by: Andrew Morton Reviewed-by: Guenter Roeck Cc: Philippe Liard Cc: Christoph Hellwig Cc: Adrien Schildknecht Cc: Daniel Rosenberg Cc: Link: http://lkml.kernel.org/r/20200815035637.15319-1-phillip@squashfs.org.uk Signed-off-by: Linus Torvalds commit c17c3dc9d08b9aad9a55a1e53f205187972f448e Author: Hugh Dickins Date: Thu Aug 20 17:42:17 2020 -0700 uprobes: __replace_page() avoid BUG in munlock_vma_page() syzbot crashed on the VM_BUG_ON_PAGE(PageTail) in munlock_vma_page(), when called from uprobes __replace_page(). Which of many ways to fix it? Settled on not calling when PageCompound (since Head and Tail are equals in this context, PageCompound the usual check in uprobes.c, and the prior use of FOLL_SPLIT_PMD will have cleared PageMlocked already). Fixes: 5a52c9df62b4 ("uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT") Reported-by: syzbot Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Reviewed-by: Srikar Dronamraju Acked-by: Song Liu Acked-by: Oleg Nesterov Cc: "Kirill A. Shutemov" Cc: [5.4+] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008161338360.20413@eggly.anvils Signed-off-by: Linus Torvalds commit 71e843295c680898959b22dc877ae3839cc22470 Author: Wei Yongjun Date: Thu Aug 20 17:42:14 2020 -0700 kernel/relay.c: fix memleak on destroy relay channel kmemleak report memory leak as follows: unreferenced object 0x607ee4e5f948 (size 8): comm "syz-executor.1", pid 2098, jiffies 4295031601 (age 288.468s) hex dump (first 8 bytes): 00 00 00 00 00 00 00 00 ........ backtrace: relay_open kernel/relay.c:583 [inline] relay_open+0xb6/0x970 kernel/relay.c:563 do_blk_trace_setup+0x4a8/0xb20 kernel/trace/blktrace.c:557 __blk_trace_setup+0xb6/0x150 kernel/trace/blktrace.c:597 blk_trace_ioctl+0x146/0x280 kernel/trace/blktrace.c:738 blkdev_ioctl+0xb2/0x6a0 block/ioctl.c:613 block_ioctl+0xe5/0x120 fs/block_dev.c:1871 vfs_ioctl fs/ioctl.c:48 [inline] __do_sys_ioctl fs/ioctl.c:753 [inline] __se_sys_ioctl fs/ioctl.c:739 [inline] __x64_sys_ioctl+0x170/0x1ce fs/ioctl.c:739 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 'chan->buf' is malloced in relay_open() by alloc_percpu() but not free while destroy the relay channel. Fix it by adding free_percpu() before return from relay_destroy_channel(). Fixes: 017c59c042d0 ("relay: Use per CPU constructs for the relay channel buffer pointers") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Andrew Morton Reviewed-by: Chris Wilson Cc: Al Viro Cc: Michael Ellerman Cc: David Rientjes Cc: Michel Lespinasse Cc: Daniel Axtens Cc: Thomas Gleixner Cc: Akash Goel Cc: Link: http://lkml.kernel.org/r/20200817122826.48518-1-weiyongjun1@huawei.com Signed-off-by: Linus Torvalds commit bcf85fcedfdd17911982a3e3564fcfec7b01eebd Author: Jann Horn Date: Thu Aug 20 17:42:11 2020 -0700 romfs: fix uninitialized memory leak in romfs_dev_read() romfs has a superblock field that limits the size of the filesystem; data beyond that limit is never accessed. romfs_dev_read() fetches a caller-supplied number of bytes from the backing device. It returns 0 on success or an error code on failure; therefore, its API can't represent short reads, it's all-or-nothing. However, when romfs_dev_read() detects that the requested operation would cross the filesystem size limit, it currently silently truncates the requested number of bytes. This e.g. means that when the content of a file with size 0x1000 starts one byte before the filesystem size limit, ->readpage() will only fill a single byte of the supplied page while leaving the rest uninitialized, leaking that uninitialized memory to userspace. Fix it by returning an error code instead of truncating the read when the requested read operation would go beyond the end of the filesystem. Fixes: da4458bda237 ("NOMMU: Make it possible for RomFS to use MTD devices directly") Signed-off-by: Jann Horn Signed-off-by: Andrew Morton Reviewed-by: Greg Kroah-Hartman Cc: David Howells Cc: Link: http://lkml.kernel.org/r/20200818013202.2246365-1-jannh@google.com Signed-off-by: Linus Torvalds commit 86f54bb7e4ff22ad5dd0b1e179610cc8bbb3bd63 Author: Leon Romanovsky Date: Thu Aug 20 17:42:08 2020 -0700 mm/rodata_test.c: fix missing function declaration The compilation with CONFIG_DEBUG_RODATA_TEST set produces the following warning due to the missing include. mm/rodata_test.c:15:6: warning: no previous prototype for 'rodata_test' [-Wmissing-prototypes] 15 | void rodata_test(void) | ^~~~~~~~~~~ Fixes: 2959a5f726f6 ("mm: add arch-independent testcases for RODATA") Signed-off-by: Leon Romanovsky Signed-off-by: Andrew Morton Reviewed-by: Anshuman Khandual Link: https://lkml.kernel.org/r/20200819080026.918134-1-leon@kernel.org Signed-off-by: Linus Torvalds commit e47110e90584a22e9980510b00d0dfad3a83354e Author: Aneesh Kumar K.V Date: Thu Aug 20 17:42:05 2020 -0700 mm/vunmap: add cond_resched() in vunmap_pmd_range Like zap_pte_range add cond_resched so that we can avoid softlockups as reported below. On non-preemptible kernel with large I/O map region (like the one we get when using persistent memory with sector mode), an unmap of the namespace can report below softlockups. 22724.027334] watchdog: BUG: soft lockup - CPU#49 stuck for 23s! [ndctl:50777] NIP [c0000000000dc224] plpar_hcall+0x38/0x58 LR [c0000000000d8898] pSeries_lpar_hpte_invalidate+0x68/0xb0 Call Trace: flush_hash_page+0x114/0x200 hpte_need_flush+0x2dc/0x540 vunmap_page_range+0x538/0x6f0 free_unmap_vmap_area+0x30/0x70 remove_vm_area+0xfc/0x140 __vunmap+0x68/0x270 __iounmap.part.0+0x34/0x60 memunmap+0x54/0x70 release_nodes+0x28c/0x300 device_release_driver_internal+0x16c/0x280 unbind_store+0x124/0x170 drv_attr_store+0x44/0x60 sysfs_kf_write+0x64/0x90 kernfs_fop_write+0x1b0/0x290 __vfs_write+0x3c/0x70 vfs_write+0xd8/0x260 ksys_write+0xdc/0x130 system_call+0x5c/0x70 Reported-by: Harish Sriram Signed-off-by: Aneesh Kumar K.V Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Link: http://lkml.kernel.org/r/20200807075933.310240-1-aneesh.kumar@linux.ibm.com Signed-off-by: Linus Torvalds commit f3f99d63a8156c7a4a6b20aac22b53c5579c7dc1 Author: Hugh Dickins Date: Thu Aug 20 17:42:02 2020 -0700 khugepaged: adjust VM_BUG_ON_MM() in __khugepaged_enter() syzbot crashes on the VM_BUG_ON_MM(khugepaged_test_exit(mm), mm) in __khugepaged_enter(): yes, when one thread is about to dump core, has set core_state, and is waiting for others, another might do something calling __khugepaged_enter(), which now crashes because I lumped the core_state test (known as "mmget_still_valid") into khugepaged_test_exit(). I still think it's best to lump them together, so just in this exceptional case, check mm->mm_users directly instead of khugepaged_test_exit(). Fixes: bbe98f9cadff ("khugepaged: khugepaged_test_exit() check mmget_still_valid()") Reported-by: syzbot Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Acked-by: Yang Shi Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: Song Liu Cc: Mike Kravetz Cc: Eric Dumazet Cc: [4.8+] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008141503370.18085@eggly.anvils Signed-off-by: Linus Torvalds commit d5a1695977cf60d3f7b387f4d18bd2fb2a9a7a01 Author: Xu Wang Date: Thu Aug 20 17:41:59 2020 -0700 hugetlb_cgroup: convert comma to semicolon Replace a comma between expression statements by a semicolon. Fixes: faced7e0806cf4 ("mm: hugetlb controller for cgroups v2") Signed-off-by: Xu Wang Signed-off-by: Andrew Morton Cc: Tejun Heo Cc: Giuseppe Scrivano Link: http://lkml.kernel.org/r/20200818064333.21759-1-vulab@iscas.ac.cn Signed-off-by: Linus Torvalds commit 00c54a80cd36de5a0089e7ffd0a690c3a93e65d0 Author: Nick Desaulniers Date: Thu Aug 20 17:41:56 2020 -0700 mailmap: add Andi Kleen I keep getting bounce back from the suse.de address. Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Cc: Andi Kleen Cc: Jonathan Corbet Cc: Kees Cook Cc: Quentin Perret Link: http://lkml.kernel.org/r/20200818203214.659955-1-ndesaulniers@google.com Signed-off-by: Linus Torvalds commit 0726763043dc10dd4c12481f050b1a5ef8f15410 Author: Stefano Brivio Date: Wed Aug 19 23:59:15 2020 +0200 netfilter: nft_set_rbtree: Detect partial overlap with start endpoint match Getting creative with nft and omitting the interval_overlap() check from the set_overlap() function, without omitting set_overlap() altogether, led to the observation of a partial overlap that wasn't detected, and would actually result in replacement of the end element of an existing interval. This is due to the fact that we'll return -EEXIST on a matching, pre-existing start element, instead of -ENOTEMPTY, and the error is cleared by API if NLM_F_EXCL is not given. At this point, we can insert a matching start, and duplicate the end element as long as we don't end up into other intervals. For instance, inserting interval 0 - 2 with an existing 0 - 3 interval would result in a single 0 - 2 interval, and a dangling '3' end element. This is because nft will proceed after inserting the '0' start element as no error is reported, and no further conflicting intervals are detected on insertion of the end element. This needs a different approach as it's a local condition that can be detected by looking for duplicate ends coming from left and right, separately. Track those and directly report -ENOTEMPTY on duplicated end elements for a matching start. Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 226a88de473e475cb9f993682a1c7d0c2b451ad8 Author: Stefano Brivio Date: Wed Aug 19 23:59:14 2020 +0200 netfilter: nft_set_rbtree: Handle outcomes of tree rotations in overlap detection Checks for partial overlaps on insertion assume that end elements are always descendant nodes of their corresponding start, because they are inserted later. However, this is not the case if a previous delete operation caused a tree rotation as part of rebalancing. Taking the issue reported by Andreas Fischer as an example, if we omit delete operations, the existing procedure works because, equivalently, we are inserting a start item with value 40 in the this region of the red-black tree with single-sized intervals: overlap flag 10 (start) / \ false 20 (start) / \ false 30 (start) / \ false 60 (start) / \ false 50 (end) / \ false 20 (end) / \ false 40 (start) if we now delete interval 30 - 30, the tree can be rearranged in a way similar to this (note the rotation involving 50 - 50): overlap flag 10 (start) / \ false 20 (start) / \ false 25 (start) / \ false 70 (start) / \ false 50 (end) / \ true (from rule a1.) 50 (start) / \ true 40 (start) and we traverse interval 50 - 50 from the opposite direction compared to what was expected. To deal with those cases, add a start-before-start rule, b4., that covers traversal of existing intervals from the right. We now need to restrict start-after-end rule b3. to cases where there are no occurring nodes between existing start and end elements, because addition of rule b4. isn't sufficient to ensure that the pre-existing end element we encounter while descending the tree corresponds to a start element of an interval that we already traversed entirely. Different types of overlap detection on trees with rotations resulting from re-balancing will be covered by nft test case sets/0044interval_overlap_1. Reported-by: Andreas Fischer Bugzilla: https://bugzilla.netfilter.org/show_bug.cgi?id=1449 Cc: # 5.6.x Fixes: 7c84d41416d8 ("netfilter: nft_set_rbtree: Detect partial overlaps on insertion") Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit 3c27ea23ffb43262da6c64964163895951aaed4e Author: Stephan Gerhold Date: Thu Aug 20 17:45:11 2020 +0200 ASoC: qcom: Set card->owner to avoid warnings On Linux 5.9-rc1 I get the following warning with apq8016-sbc: WARNING: CPU: 2 PID: 69 at sound/core/init.c:207 snd_card_new+0x36c/0x3b0 [snd] CPU: 2 PID: 69 Comm: kworker/2:1 Not tainted 5.9.0-rc1 #1 Workqueue: events deferred_probe_work_func pc : snd_card_new+0x36c/0x3b0 [snd] lr : snd_card_new+0xf4/0x3b0 [snd] Call trace: snd_card_new+0x36c/0x3b0 [snd] snd_soc_bind_card+0x340/0x9a0 [snd_soc_core] snd_soc_register_card+0xf4/0x110 [snd_soc_core] devm_snd_soc_register_card+0x44/0xa0 [snd_soc_core] apq8016_sbc_platform_probe+0x11c/0x140 [snd_soc_apq8016_sbc] This warning was introduced in commit 81033c6b584b ("ALSA: core: Warn on empty module"). It looks like we are supposed to set card->owner to THIS_MODULE. Fix this for all the qcom ASoC drivers. Cc: Srinivas Kandagatla Fixes: 79119c798649 ("ASoC: qcom: Add Storm machine driver") Fixes: bdb052e81f62 ("ASoC: qcom: add apq8016 sound card support") Fixes: a6f933f63f2f ("ASoC: qcom: apq8096: Add db820c machine driver") Fixes: 6b1687bf76ef ("ASoC: qcom: add sdm845 sound card support") Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200820154511.203072-1-stephan@gerhold.net Signed-off-by: Mark Brown commit d88d59b64ca35abae208e2781fdb45e69cbed56c Author: Thomas Gleixner Date: Wed Aug 19 21:44:39 2020 +0200 core/entry: Respect syscall number rewrites The transcript of the x86 entry code to the generic version failed to reload the syscall number from ptregs after ptrace and seccomp have run, which both can modify the syscall number in ptregs. It returns the original syscall number instead which is obviously not the right thing to do. Reload the syscall number to fix that. Fixes: 142781e108b1 ("entry: Provide generic syscall entry functionality") Reported-by: Kyle Huey Signed-off-by: Thomas Gleixner Tested-by: Kyle Huey Tested-by: Kees Cook Acked-by: Kees Cook Link: https://lore.kernel.org/r/87blj6ifo8.fsf@nanos.tec.linutronix.de commit 6a3ea3e68b8a8a26c4aaac03432ed92269c9a14e Author: Sean Christopherson Date: Fri Aug 21 06:52:29 2020 -0400 x86/entry/64: Do not use RDPID in paranoid entry to accomodate KVM KVM has an optmization to avoid expensive MRS read/writes on VMENTER/EXIT. It caches the MSR values and restores them either when leaving the run loop, on preemption or when going out to user space. The affected MSRs are not required for kernel context operations. This changed with the recently introduced mechanism to handle FSGSBASE in the paranoid entry code which has to retrieve the kernel GSBASE value by accessing per CPU memory. The mechanism needs to retrieve the CPU number and uses either LSL or RDPID if the processor supports it. Unfortunately RDPID uses MSR_TSC_AUX which is in the list of cached and lazily restored MSRs, which means between the point where the guest value is written and the point of restore, MSR_TSC_AUX contains a random number. If an NMI or any other exception which uses the paranoid entry path happens in such a context, then RDPID returns the random guest MSR_TSC_AUX value. As a consequence this reads from the wrong memory location to retrieve the kernel GSBASE value. Kernel GS is used to for all regular this_cpu_*() operations. If the GSBASE in the exception handler points to the per CPU memory of a different CPU then this has the obvious consequences of data corruption and crashes. As the paranoid entry path is the only place which accesses MSR_TSX_AUX (via RDPID) and the fallback via LSL is not significantly slower, remove the RDPID alternative from the entry path and always use LSL. The alternative would be to write MSR_TSC_AUX on every VMENTER and VMEXIT which would be inflicting massive overhead on that code path. [ tglx: Rewrote changelog ] Fixes: eaad981291ee3 ("x86/entry/64: Introduce the FIND_PERCPU_BASE macro") Reported-by: Tom Lendacky Debugged-by: Tom Lendacky Suggested-by: Andy Lutomirski Suggested-by: Peter Zijlstra Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20200821105229.18938-1-pbonzini@redhat.com commit 5e7820e369248f880767c4c4079b414529bc2125 Author: Brent Lu Date: Fri Jul 31 20:26:04 2020 +0800 ASoC: intel: atom: Add period size constraint Use constraint to make sure the period size could always be multiple of 1ms to align with the fundamental design/limitation of firmware. Signed-off-by: Brent Lu Link: https://lore.kernel.org/r/1596198365-10105-2-git-send-email-brent.lu@intel.com Signed-off-by: Mark Brown commit f6da70d99c96256f8be0cbb4dd72d45d622c7823 Author: Leon Romanovsky Date: Mon Aug 10 12:10:59 2020 +0300 MAINTAINERS: Update Mellanox and Cumulus Network addresses to new domain Mellanox and Cumulus Network were acquired by Nvidia, so change the maintainers emails to new domain name. Link: https://lore.kernel.org/r/20200810091100.243932-1-leon@kernel.org Signed-off-by: Leon Romanovsky Acked-by: Andy Shevchenko Signed-off-by: Jason Gunthorpe commit 64ef8f2c4791940d7f3945507b6a45c20d959260 Author: Kajol Jain Date: Fri Aug 21 13:36:10 2020 +0530 powerpc/perf/hv-24x7: Move cpumask file to top folder of hv-24x7 driver Commit 792f73f747b8 ("powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask") added cpumask file as part of hv-24x7 driver inside the interface folder. The cpumask file is supposed to be in the top folder of the PMU driver in order to make hotplug work. This patch fixes that issue and creates new group 'cpumask_attr_group' to add cpumask file and make sure it added in top folder. command:# cat /sys/devices/hv_24x7/cpumask 0 Fixes: 792f73f747b8 ("powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask") Signed-off-by: Kajol Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200821080610.123997-1-kjain@linux.ibm.com commit 541cebb51f3422d4f2c6cb95c1e5cc3dcc9e5021 Author: Christophe Leroy Date: Fri Aug 21 07:15:25 2020 +0000 powerpc/32s: Fix module loading failure when VMALLOC_END is over 0xf0000000 In is_module_segment(), when VMALLOC_END is over 0xf0000000, ALIGN(VMALLOC_END, SZ_256M) has value 0. In that case, addr >= ALIGN(VMALLOC_END, SZ_256M) is always true then is_module_segment() always returns false. Use (ALIGN(VMALLOC_END, SZ_256M) - 1) which will have value 0xffffffff and will be suitable for the comparison. Fixes: c49643319715 ("powerpc/32s: Only leave NX unset on segments used for modules") Reported-by: Andreas Schwab Signed-off-by: Christophe Leroy Tested-by: Andreas Schwab Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/09fc73fe9c7423c6b4cf93f93df9bb0ed8eefab5.1597994047.git.christophe.leroy@csgroup.eu commit 57ed62892b9cb0d07b3d3913fa5997a234ff016e Author: Mathieu Poirier Date: Thu Aug 20 11:55:10 2020 -0600 MAINTAINERS: Add entries for CoreSight and Arm SPE tooling Add entries for perf tools elements related to the support of ARM CoreSight and ARM SPE. Also lump in arm and arm64 architecture files to provide coverage. Signed-off-by: Mathieu Poirier Acked-by: John Garry Acked-by: Will Deacon Cc: Adrian Hunter Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20200820175510.3935932-1-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 19684e969debc912b3ec5eda72b4f90aa73f1d30 Author: Wei Li Date: Fri Jul 24 15:26:28 2020 +0800 perf: arm-spe: Fix check error when synthesizing events In arm_spe_read_record(), when we are processing an events packet, 'decoder->packet.index' is the length of payload, which has been transformed in payloadlen(). So correct the check of 'idx'. Signed-off-by: Wei Li Reviewed-by: Leo Yan Cc: Alexander Shishkin Cc: Hanjun Guo Cc: James Clark Cc: Jiri Olsa Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200724072628.35904-1-liwei391@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 783abbd444926f0d94039c4cf5e5ca1d07496bce Author: Arnaldo Carvalho de Melo Date: Tue Aug 18 10:00:13 2020 -0300 perf symbols: Add mwait_idle_with_hints.constprop.0 to the list of idle symbols The "mwait_idle_with_hints" one was already there, some compiler artifact now adds this ".constprop.0" suffix, cover that one too. At some point we need to put these in a special bucket and show it somewhere on the screen. Noticed building the kernel on a fedora:32 system using: gcc version 10.2.1 20200723 (Red Hat 10.2.1-1) (GCC) Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 0c5f1acc2a14416bf30023f373558d369afdbfc8 Author: Tiezhu Yang Date: Tue Aug 18 20:30:37 2020 +0800 perf top: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set When I execute 'perf top' without HAVE_LIBBPF_SUPPORT, there exists the following segmentation fault, skip the side-band event setup to fix it, this is similar with commit 1101c872c8c7 ("perf record: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set"). [yangtiezhu@linux perf]$ ./perf top perf: Segmentation fault Obtained 6 stack frames. ./perf(sighandler_dump_stack+0x5c) [0x12011b604] [0xffffffc010] ./perf(perf_mmap__read_init+0x3e) [0x1201feeae] ./perf() [0x1200d715c] /lib64/libpthread.so.0(+0xab9c) [0xffee10ab9c] /lib64/libc.so.6(+0x128f4c) [0xffedc08f4c] Segmentation fault [yangtiezhu@linux perf]$ I use git bisect to find commit b38d85ef49cf ("perf bpf: Decouple creating the evlist from adding the SB event") is the first bad commit, so also add the Fixes tag. Committer testing: First build perf explicitely disabling libbpf: $ make NO_LIBBPF=1 O=/tmp/build/perf -C tools/perf install-bin && perf test python Now make sure it isn't linked: $ perf -vv | grep -w bpf bpf: [ OFF ] # HAVE_LIBBPF_SUPPORT $ $ nm ~/bin/perf | grep libbpf $ And now try to run 'perf top': # perf top perf: Segmentation fault -------- backtrace -------- perf[0x5bcd6d] /lib64/libc.so.6(+0x3ca6f)[0x7fd0f5a66a6f] perf(perf_mmap__read_init+0x1e)[0x5e1afe] perf[0x4cc468] /lib64/libpthread.so.0(+0x9431)[0x7fd0f645a431] /lib64/libc.so.6(clone+0x42)[0x7fd0f5b2b912] # Applying this patch fixes the issue. Fixes: b38d85ef49cf ("perf bpf: Decouple creating the evlist from adding the SB event") Signed-off-by: Tiezhu Yang Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xuefeng Li Link: http://lore.kernel.org/lkml/1597753837-16222-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit a74eaf1605d42391c2357a70e94e5a2c7780fea9 Author: David Ahern Date: Mon Aug 17 11:09:42 2020 -0600 perf sched timehist: Fix use of CPU list with summary option Do not update thread stats or show idle summary unless CPU is in the list of interest. Fixes: c30d630d1bcfad8d ("perf sched timehist: Add support for filtering on CPU") Signed-off-by: David Ahern Acked-by: Namhyung Kim Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200817170943.1486-1-dsahern@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4b04e0decd2518e54e3f371abf3d883b3198663d Author: Sumanth Korikkar Date: Mon Aug 17 09:27:54 2020 +0200 perf test: Fix basic bpf filtering test BPF basic filtering test fails on s390x (when vmlinux debuginfo is utilized instead of /proc/kallsyms) Info: - bpf_probe_load installs the bpf code at do_epoll_wait. - For s390x, do_epoll_wait resolves to 3 functions including inlines. found inline addr: 0x43769e Probe point found: __s390_sys_epoll_wait+6 found inline addr: 0x437290 Probe point found: do_epoll_wait+0 found inline addr: 0x4375d6 Probe point found: __se_sys_epoll_wait+6 - add_bpf_event creates evsel for every probe in a BPF object. This results in 3 evsels. Solution: - Expected result = 50% of the samples to be collected from epoll_wait * number of entries present in the evlist. Committer testing: # perf test 42 42: BPF filter : 42.1: Basic BPF filtering : Ok 42.2: BPF pinning : Ok 42.3: BPF prologue generation : Ok 42.4: BPF relocation checker : Ok # Signed-off-by: Sumanth Korikkar Reviewed-by: Thomas Richter Tested-by: Arnaldo Carvalho de Melo Cc: bpf@vger.kernel.org Cc: Heiko Carstens Cc: Jiri Olsa Cc: Sven Schnelle LPU-Reference: 20200817072754.58344-1-sumanthk@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 004a01241c5a0d375266ebf1c72f208de99294e9 Author: Andrew Jones Date: Tue Aug 4 19:06:04 2020 +0200 arm64/x86: KVM: Introduce steal-time cap arm64 requires a vcpu fd (KVM_HAS_DEVICE_ATTR vcpu ioctl) to probe support for steal-time. However this is unnecessary, as only a KVM fd is required, and it complicates userspace (userspace may prefer delaying vcpu creation until after feature probing). Introduce a cap that can be checked instead. While x86 can already probe steal-time support with a kvm fd (KVM_GET_SUPPORTED_CPUID), we add the cap there too for consistency. Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20200804170604.42662-7-drjones@redhat.com commit 739c7af7daeede8e2ec78392f2617c965ce0342a Author: Andrew Jones Date: Tue Aug 4 19:06:03 2020 +0200 KVM: Documentation: Minor fixups In preparation for documenting a new capability let's fix up the formatting of the current ones. Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20200804170604.42662-6-drjones@redhat.com commit 53f985584e3c2ebe5f2455530fbf87a001528db8 Author: Andrew Jones Date: Tue Aug 4 19:06:02 2020 +0200 KVM: arm64: pvtime: Fix stolen time accounting across migration When updating the stolen time we should always read the current stolen time from the user provided memory, not from a kernel cache. If we use a cache then we'll end up resetting stolen time to zero on the first update after migration. Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200804170604.42662-5-drjones@redhat.com commit 4d2d4ce001f283ed8127173543b4cfb65641e357 Author: Andrew Jones Date: Tue Aug 4 19:06:01 2020 +0200 KVM: arm64: Drop type input from kvm_put_guest We can use typeof() to avoid the need for the type input. Suggested-by: Marc Zyngier Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200804170604.42662-4-drjones@redhat.com commit 2dbd780e34ac53e79c6c359ce12b89ed665ef562 Author: Andrew Jones Date: Tue Aug 4 19:06:00 2020 +0200 KVM: arm64: pvtime: Fix potential loss of stolen time We should only check current->sched_info.run_delay once when updating stolen time. Otherwise there's a chance there could be a change between checks that we miss (preemption disabling comes after vcpu request checks). Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200804170604.42662-3-drjones@redhat.com commit 38480df564cc68f081bb38998927d164b9010995 Author: Andrew Jones Date: Tue Aug 4 19:05:59 2020 +0200 KVM: arm64: pvtime: steal-time is only supported when configured Don't confuse the guest by saying steal-time is supported when it hasn't been configured by userspace and won't work. Signed-off-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200804170604.42662-2-drjones@redhat.com commit abf532cceaca9c21a148498091f87de1b8ae9b49 Author: Rob Herring Date: Mon Aug 3 13:31:25 2020 -0600 KVM: arm64: Print warning when cpu erratum can cause guests to deadlock If guests don't have certain CPU erratum workarounds implemented, then there is a possibility a guest can deadlock the system. IOW, only trusted guests should be used on systems with the erratum. This is the case for Cortex-A57 erratum 832075. Signed-off-by: Rob Herring Acked-by: Will Deacon Cc: Marc Zyngier Cc: James Morse Cc: Julien Thierry Cc: Suzuki K Poulose Cc: Will Deacon Cc: kvmarm@lists.cs.columbia.edu Link: https://lore.kernel.org/r/20200803193127.3012242-2-robh@kernel.org Signed-off-by: Catalin Marinas commit bf87bb0881d0f59181fe3bbcf29c609f36483ff8 Author: Marc Zyngier Date: Fri Jul 31 18:38:24 2020 +0100 arm64: Allow booting of late CPUs affected by erratum 1418040 As we can now switch from a system that isn't affected by 1418040 to a system that globally is affected, let's allow affected CPUs to come in at a later time. Signed-off-by: Marc Zyngier Tested-by: Sai Prakash Ranjan Reviewed-by: Stephen Boyd Reviewed-by: Suzuki K Poulose Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200731173824.107480-3-maz@kernel.org Signed-off-by: Catalin Marinas commit d49f7d7376d0c0daf8680984a37bd07581ac7d38 Author: Marc Zyngier Date: Fri Jul 31 18:38:23 2020 +0100 arm64: Move handling of erratum 1418040 into C code Instead of dealing with erratum 1418040 on each entry and exit, let's move the handling to __switch_to() instead, which has several advantages: - It can be applied when it matters (switching between 32 and 64 bit tasks). - It is written in C (yay!) - It can rely on static keys rather than alternatives Signed-off-by: Marc Zyngier Tested-by: Sai Prakash Ranjan Reviewed-by: Stephen Boyd Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200731173824.107480-2-maz@kernel.org Signed-off-by: Catalin Marinas commit a84d5d429f9eb56f81b388609841ed993f0ddfca Author: Boris Burkov Date: Tue Aug 18 11:00:05 2020 -0700 btrfs: detect nocow for swap after snapshot delete can_nocow_extent and btrfs_cross_ref_exist both rely on a heuristic for detecting a must cow condition which is not exactly accurate, but saves unnecessary tree traversal. The incorrect assumption is that if the extent was created in a generation smaller than the last snapshot generation, it must be referenced by that snapshot. That is true, except the snapshot could have since been deleted, without affecting the last snapshot generation. The original patch claimed a performance win from this check, but it also leads to a bug where you are unable to use a swapfile if you ever snapshotted the subvolume it's in. Make the check slower and more strict for the swapon case, without modifying the general cow checks as a compromise. Turning swap on does not seem to be a particularly performance sensitive operation, so incurring a possibly unnecessary btrfs_search_slot seems worthwhile for the added usability. Note: Until the snapshot is competely cleaned after deletion, check_committed_refs will still cause the logic to think that cow is necessary, so the user must until 'btrfs subvolu sync' finished before activating the swapfile swapon. CC: stable@vger.kernel.org # 5.4+ Suggested-by: Omar Sandoval Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit fb2fecbad50964b9f27a3b182e74e437b40753ef Author: Josef Bacik Date: Mon Aug 10 17:31:16 2020 -0400 btrfs: check the right error variable in btrfs_del_dir_entries_in_log With my new locking code dbench is so much faster that I tripped over a transaction abort from ENOSPC. This turned out to be because btrfs_del_dir_entries_in_log was checking for ret == -ENOSPC, but this function sets err on error, and returns err. So instead of properly marking the inode as needing a full commit, we were returning -ENOSPC and aborting in __btrfs_unlink_inode. Fix this by checking the proper variable so that we return the correct thing in the case of ENOSPC. The ENOENT needs to be checked, because btrfs_lookup_dir_item_index() can return -ENOENT if the dir item isn't in the tree log (which would happen if we hadn't fsync'ed this guy). We actually handle that case in __btrfs_unlink_inode, so it's an expected error to get back. Fixes: 4a500fd178c8 ("Btrfs: Metadata ENOSPC handling for tree log") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add note and comment about ENOENT ] Signed-off-by: David Sterba commit df57d73276b863af1debc48546b0e59e44998a55 Author: Adrian Hunter Date: Wed Aug 19 15:18:48 2020 +0300 mmc: sdhci-pci: Fix SDHCI_RESET_ALL for CQHCI for Intel GLK-based controllers For Intel controllers, SDHCI_RESET_ALL resets also CQHCI registers. Normally, SDHCI_RESET_ALL is not used while CQHCI is enabled, but that can happen on the error path. e.g. if mmc_cqe_recovery() fails, mmc_blk_reset() is called which, for a eMMC that does not support HW Reset, will cycle the bus power and the driver will perform SDHCI_RESET_ALL. So whenever performing SDHCI_RESET_ALL ensure CQHCI is deactivated. That will force the driver to reinitialize CQHCI when it is next used. A similar change was done already for sdhci-msm, and other drivers using CQHCI might benefit from a similar change, if they also have CQHCI reset by SDHCI_RESET_ALL. Fixes: 8ee82bda230fc9 ("mmc: sdhci-pci: Add CQHCI support for Intel GLK") Cc: stable@vger.kernel.org # 5.4.x: 0ffa6cfbd949: mmc: cqhci: Add cqhci_deactivate() Cc: stable@vger.kernel.org # 5.4+ Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20200819121848.16967-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 61d7437ed13906984c44697970ee792ac6271a31 Author: Raul E Rangel Date: Wed Aug 19 13:00:19 2020 -0600 mmc: sdhci-acpi: Fix HS400 tuning for AMDI0040 The AMD eMMC Controller can only use the tuned clock while in HS200 and HS400 mode. If we switch to a different mode, we need to disable the tuned clock. If we have previously performed tuning and switch back to HS200 or HS400, we can re-enable the tuned clock. Previously the tuned clock was not getting disabled when switching to DDR52 which is part of the HS400 tuning sequence. Fixes: 34597a3f60b1 ("mmc: sdhci-acpi: Add support for ACPI HID of AMD Controller with HS400") Signed-off-by: Raul E Rangel Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200819125832.v2.1.Ie8f0689ec9f449203328b37409d1cf06b565f331@changeid Signed-off-by: Ulf Hansson commit e14f633b66902615cf7faa5d032b45ab8b6fb158 Author: Florian Fainelli Date: Wed Aug 19 11:26:45 2020 -0700 MIPS: BMIPS: Also call bmips_cpu_setup() for secondary cores The initialization done by bmips_cpu_setup() typically affects both threads of a given core, on 7435 which supports 2 cores and 2 threads, logical CPU number 2 and 3 would not run this initialization. Fixes: 738a3f79027b ("MIPS: BMIPS: Add early CPU initialization code") Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit dbfc95f98f0158958d1f1e6bf06d74be38dbd821 Author: Florian Fainelli Date: Wed Aug 19 11:26:44 2020 -0700 MIPS: mm: BMIPS5000 has inclusive physical caches When the BMIPS generic cpu-feature-overrides.h file was introduced, cpu_has_inclusive_caches/MIPS_CPU_INCLUSIVE_CACHES was not set for BMIPS5000 CPUs. Correct this when we have initialized the MIPS secondary cache successfully. Fixes: f337967d6d87 ("MIPS: BMIPS: Add cpu-feature-overrides.h") Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit bfe8fe939a049e99e1bda0f81e72a612e83ab446 Author: Randy Dunlap Date: Thu Aug 6 08:54:48 2020 -0700 crypto: sa2ul - add Kconfig selects to fix build error sa2ul.c uses sha{1,256,512}_zero_message_hash, so select the Kconfig symbols that provide those, like other crypto drivers do. Fixes this build error: ld: drivers/crypto/sa2ul.o: in function `sa_sha_digest': sa2ul.c:(.text+0x2b25): undefined reference to `sha512_zero_message_hash' Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver") Signed-off-by: Randy Dunlap Reported-by: Randy Dunlap # 2020-07-29 Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Cc: Tero Kristo Cc: Keerthy Reviewed-by: Keerthy Signed-off-by: Herbert Xu commit 11a954eebc4396b51af745e5242df05f71be6d9e Author: Wei Yongjun Date: Tue Aug 4 08:11:53 2020 +0000 crypto: ingenic - Drop kfree for memory allocated with devm_kzalloc It's not necessary to free memory allocated with devm_kzalloc and using kfree leads to a double free. Fixes: 190873a0ea45 ("crypto: ingenic - Add hardware RNG for Ingenic JZ4780 and X1000") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Herbert Xu commit 9a5a668dc348f98de464114411421c4e9381cf21 Author: Giovanni Cabiddu Date: Thu Jul 30 13:27:42 2020 +0100 crypto: qat - add delay before polling mailbox The mailbox CSR register has a write latency and requires a delay before being read. This patch replaces readl_poll_timeout with read_poll_timeout that allows to sleep before read. The initial sleep was removed when the mailbox poll loop was replaced with readl_poll_timeout. Fixes: a79d471c6510 ("crypto: qat - update timeout logic in put admin msg") Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit cabe3a137148d1fdcf8eed494a6a881a5d5a8195 Merge: 1ebda87ad906b 8d53ecfbf2313 Author: Olof Johansson Date: Thu Aug 20 19:12:06 2020 -0700 Merge tag 'zynqmp-dt-for-v5.9' of https://github.com/Xilinx/linux-xlnx into arm/fixes arm64: soc: ZynqMP DT changes for v5.9 - Add node for PS-GTR transceivers - Fix iommu node name to match dtschema * tag 'zynqmp-dt-for-v5.9' of https://github.com/Xilinx/linux-xlnx: arm64: dts: xilinx: Align IOMMU nodename with dtschema arm64: dts: zynqmp: Add GTR transceivers Signed-off-by: Olof Johansson commit 510bc3cb1ddc32f9533e6ed0a68c980544c3ca3f Author: Masahiro Yamada Date: Fri Aug 21 02:43:28 2020 +0900 kconfig: qconf: replace deprecated QString::sprintf() with QTextStream QString::sprintf() is deprecated in the latest Qt version, and spawns a lot of warnings: HOSTCXX scripts/kconfig/qconf.o scripts/kconfig/qconf.cc: In member function ‘void ConfigInfoView::menuInfo()’: scripts/kconfig/qconf.cc:1090:61: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] 1090 | head += QString().sprintf("", sym->name); | ^ In file included from /usr/include/qt5/QtGui/qkeysequence.h:44, from /usr/include/qt5/QtWidgets/qaction.h:44, from /usr/include/qt5/QtWidgets/QAction:1, from scripts/kconfig/qconf.cc:7: /usr/include/qt5/QtCore/qstring.h:382:14: note: declared here 382 | QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3); | ^~~~~~~ scripts/kconfig/qconf.cc:1099:60: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] 1099 | head += QString().sprintf("", sym->name); | ^ In file included from /usr/include/qt5/QtGui/qkeysequence.h:44, from /usr/include/qt5/QtWidgets/qaction.h:44, from /usr/include/qt5/QtWidgets/QAction:1, from scripts/kconfig/qconf.cc:7: /usr/include/qt5/QtCore/qstring.h:382:14: note: declared here 382 | QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3); | ^~~~~~~ scripts/kconfig/qconf.cc:1127:90: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] 1127 | debug += QString().sprintf("defined at %s:%d

", _menu->file->name, _menu->lineno); | ^ In file included from /usr/include/qt5/QtGui/qkeysequence.h:44, from /usr/include/qt5/QtWidgets/qaction.h:44, from /usr/include/qt5/QtWidgets/QAction:1, from scripts/kconfig/qconf.cc:7: /usr/include/qt5/QtCore/qstring.h:382:14: note: declared here 382 | QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3); | ^~~~~~~ scripts/kconfig/qconf.cc: In member function ‘QString ConfigInfoView::debug_info(symbol*)’: scripts/kconfig/qconf.cc:1150:68: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] 1150 | debug += QString().sprintf("prompt:
", sym->name); | ^ In file included from /usr/include/qt5/QtGui/qkeysequence.h:44, from /usr/include/qt5/QtWidgets/qaction.h:44, from /usr/include/qt5/QtWidgets/QAction:1, from scripts/kconfig/qconf.cc:7: /usr/include/qt5/QtCore/qstring.h:382:14: note: declared here 382 | QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3); | ^~~~~~~ scripts/kconfig/qconf.cc: In static member function ‘static void ConfigInfoView::expr_print_help(void*, symbol*, const char*)’: scripts/kconfig/qconf.cc:1225:59: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] 1225 | *text += QString().sprintf("", sym->name); | ^ In file included from /usr/include/qt5/QtGui/qkeysequence.h:44, from /usr/include/qt5/QtWidgets/qaction.h:44, from /usr/include/qt5/QtWidgets/QAction:1, from scripts/kconfig/qconf.cc:7: /usr/include/qt5/QtCore/qstring.h:382:14: note: declared here 382 | QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3); | ^~~~~~~ The documentation also says: "Warning: We do not recommend using QString::asprintf() in new Qt code. Instead, consider using QTextStream or arg(), both of which support Unicode strings seamlessly and are type-safe." Use QTextStream as suggested. Reported-by: Robert Crawford Signed-off-by: Masahiro Yamada commit 68fd110b3e7e2c90d781a132cc4362fbfb4a95a1 Author: Masahiro Yamada Date: Fri Aug 21 02:43:27 2020 +0900 kconfig: qconf: remove redundant help in the info view The same information is repeated in the info view. Remove the second one. Signed-off-by: Masahiro Yamada commit 53efe2e76ca2bfad7f35e0b5330e2ccd44a643e3 Author: Masahiro Yamada Date: Fri Aug 21 00:16:46 2020 +0900 kconfig: qconf: remove qInfo() to get back Qt4 support qconf is supposed to work with Qt4 and Qt5, but since commit c4f7398bee9c ("kconfig: qconf: make debug links work again"), building with Qt4 fails as follows: HOSTCXX scripts/kconfig/qconf.o scripts/kconfig/qconf.cc: In member function ‘void ConfigInfoView::clicked(const QUrl&)’: scripts/kconfig/qconf.cc:1241:3: error: ‘qInfo’ was not declared in this scope; did you mean ‘setInfo’? 1241 | qInfo() << "Clicked link is empty"; | ^~~~~ | setInfo scripts/kconfig/qconf.cc:1254:3: error: ‘qInfo’ was not declared in this scope; did you mean ‘setInfo’? 1254 | qInfo() << "Clicked symbol is invalid:" << data; | ^~~~~ | setInfo make[1]: *** [scripts/Makefile.host:129: scripts/kconfig/qconf.o] Error 1 make: *** [Makefile:606: xconfig] Error 2 qInfo() does not exist in Qt4. In my understanding, these call-sites should be unreachable. Perhaps, qWarning(), assertion, or something is better, but qInfo() is not the right one to use here, I think. Fixes: c4f7398bee9c ("kconfig: qconf: make debug links work again") Reported-by: Ronald Warsow Signed-off-by: Masahiro Yamada commit 1ebda87ad906b732af5660c3ee2e896a13292545 Author: Krzysztof Kozlowski Date: Mon Aug 17 08:56:54 2020 +0200 arm64: defconfig: Enable ptn5150 extcon driver Enable the extcon driver for NXP PTN5150A chips (CC logic for USB Type-C applications) present on some of i.MX8 evaluation boards (e.g. Variscite Symphony board). Link: https://lore.kernel.org/r/20200817065654.4419-2-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Olof Johansson commit 3b574ea2f89321d0a428286be0057340f0313323 Author: Krzysztof Kozlowski Date: Mon Aug 17 08:56:53 2020 +0200 arm64: defconfig: Enable USB gadget with configfs USB OTG connections are pretty common for embedded and development boards, for example to have networking or serial access to the device. Build as a module the USB gadget configfs options so the defconfig can be used in such development configurations. Link: https://lore.kernel.org/r/20200817065654.4419-1-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Olof Johansson commit bf53f463099016dddd12acfed6a025bb780cd504 Author: Linus Walleij Date: Thu Aug 20 10:57:52 2020 +0200 ARM: configs: Update Integrator defconfig Update the Integrator defconfig to the changes from the recent kernel cycles and especially the v5.9-rc1 changes. - Move options around as a result of Kconfig changes. - Drop the ZBOOT_ROM* stuff that doesn't exist anymore. - Select GPIO input and evdev as used by the pushbuttons on the machine. - Select CONFIG_DRM_DISPLAY_CONNECTOR=y, the CONFIG_DRM_SIMPLE_BRIDGE was renamed when renaming the driver, but the simple bridge requires another bridge, the display connector bridge, in order to work, so this is required to have graphics working properly in kernel v5.9-rc1+ Link: https://lore.kernel.org/r/20200820085752.42994-1-linus.walleij@linaro.org Signed-off-by: Linus Walleij Signed-off-by: Olof Johansson commit cc3e43337557e660ca9a56ef54f22dc74f9460cc Merge: 9123e3a74ec7b 0ff5a4812be4e Author: Olof Johansson Date: Thu Aug 20 18:09:30 2020 -0700 Merge tag 'socfpga_fix_for_v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into fixes arm: dts: socfpga: fix for v5.9 - Fix incorrect timer3 reg entry for Arria10 * tag 'socfpga_fix_for_v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfpga: fix register entry for timer3 on Arria10 Link: https://lore.kernel.org/r/20200817150827.15696-1-dinguyen@kernel.org Signed-off-by: Olof Johansson commit 0790e63f58f22a68696667102be03efb92a4da5f Merge: ba9086a6df1ea 4a4064ad79699 Author: Dave Airlie Date: Fri Aug 21 11:03:51 2020 +1000 Merge tag 'drm-intel-fixes-2020-08-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.9-rc2: - GVT fixes - Fix device parameter usage for selftest mock i915 device - Fix LPSP capability debugfs NULL dereference - Fix buddy register pagemask table - Fix intel_atomic_check() non-negative return value - Fix selftests passing a random 0 into ilog2() - Fix TGL power well enable/disable ordering - Switch to PMU module refcounting Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87a6yp7jp3.fsf@intel.com commit ba9086a6df1ea8bb2bbed7a92f14bfddc10fb8a7 Merge: 485d41b092c86 da2446b66b5e2 Author: Dave Airlie Date: Fri Aug 21 10:17:51 2020 +1000 Merge tag 'amd-drm-fixes-5.9-2020-08-20' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.9-2020-08-20: amdgpu: - Fixes for Navy Flounder - Misc display fixes - RAS fix amdkfd: - SDMA fix for renoir Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200820041938.3928-1-alexander.deucher@amd.com commit f6db9096416209474090d64d8284e7c16c3d8873 Author: Xin Long Date: Thu Aug 20 15:34:47 2020 +0800 tipc: call rcu_read_lock() in tipc_aead_encrypt_done() b->media->send_msg() requires rcu_read_lock(), as we can see elsewhere in tipc, tipc_bearer_xmit, tipc_bearer_xmit_skb and tipc_bearer_bc_xmit(). Syzbot has reported this issue as: net/tipc/bearer.c:466 suspicious rcu_dereference_check() usage! Workqueue: cryptd cryptd_queue_worker Call Trace: tipc_l2_send_msg+0x354/0x420 net/tipc/bearer.c:466 tipc_aead_encrypt_done+0x204/0x3a0 net/tipc/crypto.c:761 cryptd_aead_crypt+0xe8/0x1d0 crypto/cryptd.c:739 cryptd_queue_worker+0x118/0x1b0 crypto/cryptd.c:181 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:291 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 So fix it by calling rcu_read_lock() in tipc_aead_encrypt_done() for b->media->send_msg(). Fixes: fc1b6d6de220 ("tipc: introduce TIPC encryption & authentication") Reported-by: syzbot+47bbc6b678d317cccbe0@syzkaller.appspotmail.com Signed-off-by: Xin Long Signed-off-by: David S. Miller commit eda814b97dfb8d9f4808eb2f65af9bd3705c4cae Author: Alaa Hleihel Date: Wed Aug 19 18:24:10 2020 +0300 net/sched: act_ct: Fix skb double-free in tcf_ct_handle_fragments() error flow tcf_ct_handle_fragments() shouldn't free the skb when ip_defrag() call fails. Otherwise, we will cause a double-free bug. In such cases, just return the error to the caller. Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct") Signed-off-by: Alaa Hleihel Reviewed-by: Roi Dayan Signed-off-by: David S. Miller commit ab921f3cdbec01c68705a7ade8bec628d541fc2b Author: David Laight Date: Wed Aug 19 14:40:52 2020 +0000 net: sctp: Fix negotiation of the number of data streams. The number of output and input streams was never being reduced, eg when processing received INIT or INIT_ACK chunks. The effect is that DATA chunks can be sent with invalid stream ids and then discarded by the remote system. Fixes: 2075e50caf5ea ("sctp: convert to genradix") Signed-off-by: David Laight Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 41506bff84f1563e20e505ca9a0366a30ae2a879 Author: Geert Uytterhoeven Date: Wed Aug 19 14:45:39 2020 +0200 dt-bindings: net: renesas, ether: Improve schema validation - Remove pinctrl consumer properties, as they are handled by core dt-schema, - Document missing properties, - Document missing PHY child node, - Add "additionalProperties: false". Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 272502fcb7cda01ab07fc2fcff82d1d2f73d43cc Author: Mark Tomlinson Date: Wed Aug 19 13:53:58 2020 +1200 gre6: Fix reception with IP6_TNL_F_RCV_DSCP_COPY When receiving an IPv4 packet inside an IPv6 GRE packet, and the IP6_TNL_F_RCV_DSCP_COPY flag is set on the tunnel, the IPv4 header would get corrupted. This is due to the common ip6_tnl_rcv() function assuming that the inner header is always IPv6. This patch checks the tunnel protocol for IPv4 inner packets, but still defaults to IPv6. Fixes: 308edfdf1563 ("gre6: Cleanup GREv6 receive path, call common GRE functions") Signed-off-by: Mark Tomlinson Signed-off-by: David S. Miller commit e14fd8da84123fbd7d03aa2c28501879887f2cdd Merge: ce51f63e63c52 c3d897e01aef8 Author: David S. Miller Date: Thu Aug 20 16:24:00 2020 -0700 Merge branch 'hv_netvsc-Some-fixes-for-the-select_queue' Haiyang Zhang says: ==================== hv_netvsc: Some fixes for the select_queue This patch set includes two fixes for the select_queue process. ==================== Signed-off-by: David S. Miller commit c3d897e01aef8ddc43149e4d661b86f823e3aae7 Author: Haiyang Zhang Date: Thu Aug 20 14:53:15 2020 -0700 hv_netvsc: Fix the queue_mapping in netvsc_vf_xmit() netvsc_vf_xmit() / dev_queue_xmit() will call VF NIC’s ndo_select_queue or netdev_pick_tx() again. They will use skb_get_rx_queue() to get the queue number, so the “skb->queue_mapping - 1” will be used. This may cause the last queue of VF not been used. Use skb_record_rx_queue() here, so that the skb_get_rx_queue() called later will get the correct queue number, and VF will be able to use all queues. Fixes: b3bf5666a510 ("hv_netvsc: defer queue selection to VF") Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit 4d820543c54c47a2bd3c95ddbf52f83c89a219a0 Author: Haiyang Zhang Date: Thu Aug 20 14:53:14 2020 -0700 hv_netvsc: Remove "unlikely" from netvsc_select_queue When using vf_ops->ndo_select_queue, the number of queues of VF is usually bigger than the synthetic NIC. This condition may happen often. Remove "unlikely" from the comparison of ndev->real_num_tx_queues. Fixes: b3bf5666a510 ("hv_netvsc: defer queue selection to VF") Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit 5c1e4f7e9e49b6925b1fb5c507d2c614f3edb292 Author: Po-Hsu Lin Date: Wed Mar 18 10:42:15 2020 +0800 selftests/timers: Turn off timeout setting The following 4 tests in timers can take longer than the default 45 seconds that added in commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test") to run: * nsleep-lat - 2m7.350s * set-timer-lat - 2m0.66s * inconsistency-check - 1m45.074s * raw_skew - 2m0.013s Thus they will be marked as failed with the current 45s setting: not ok 3 selftests: timers: nsleep-lat # TIMEOUT not ok 4 selftests: timers: set-timer-lat # TIMEOUT not ok 6 selftests: timers: inconsistency-check # TIMEOUT not ok 7 selftests: timers: raw_skew # TIMEOUT Disable the timeout setting for timers can make these tests finish properly: ok 3 selftests: timers: nsleep-lat ok 4 selftests: timers: set-timer-lat ok 6 selftests: timers: inconsistency-check ok 7 selftests: timers: raw_skew https://bugs.launchpad.net/bugs/1864626 Fixes: 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test") Signed-off-by: Po-Hsu Lin Acked-by: John Stultz Signed-off-by: Shuah Khan commit c210773d6c6f595f5922d56b7391fe343bc7310e Author: Yauheni Kaliuta Date: Thu Aug 20 14:58:43 2020 +0300 bpf: selftests: global_funcs: Check err_str before strstr The error path in libbpf.c:load_program() has calls to pr_warn() which ends up for global_funcs tests to test_global_funcs.c:libbpf_debug_print(). For the tests with no struct test_def::err_str initialized with a string, it causes call of strstr() with NULL as the second argument and it segfaults. Fix it by calling strstr() only for non-NULL err_str. Signed-off-by: Yauheni Kaliuta Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200820115843.39454-1-yauheni.kaliuta@redhat.com commit c8a36f1945b2b1b3f9823b66fc2181dc069cf803 Author: Andrii Nakryiko Date: Wed Aug 19 22:28:41 2020 -0700 bpf: xdp: Fix XDP mode when no mode flags specified 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device") inadvertently changed which XDP mode is assumed when no mode flags are specified explicitly. Previously, driver mode was preferred, if driver supported it. If not, generic SKB mode was chosen. That commit changed default to SKB mode always. This patch fixes the issue and restores the original logic. Fixes: 7f0a838254bd ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device") Reported-by: Lorenzo Bianconi Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Tested-by: Lorenzo Bianconi Link: https://lore.kernel.org/bpf/20200820052841.1559757-1-andriin@fb.com commit 5597432dde62befd3ab92e6ef9e073564e277ea8 Author: Veronika Kabatova Date: Wed Aug 19 18:07:10 2020 +0200 selftests/bpf: Remove test_align leftovers Calling generic selftests "make install" fails as rsync expects all files from TEST_GEN_PROGS to be present. The binary is not generated anymore (commit 3b09d27cc93d) so we can safely remove it from there and also from gitignore. Fixes: 3b09d27cc93d ("selftests/bpf: Move test_align under test_progs") Signed-off-by: Veronika Kabatova Signed-off-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/20200819160710.1345956-1-vkabatov@redhat.com commit 51f6463aacfbfd322bcaadc606da56acef644b05 Author: Jiri Olsa Date: Wed Aug 19 11:23:42 2020 +0200 tools/resolve_btfids: Fix sections with wrong alignment The data of compressed section should be aligned to 4 (for 32bit) or 8 (for 64 bit) bytes. The binutils ld sets sh_addralign to 1, which makes libelf fail with misaligned section error during the update as reported by Jesper: FAILED elf_update(WRITE): invalid section alignment While waiting for ld fix, we can fix compressed sections sh_addralign value manually. Adding warning in -vv mode when the fix is triggered: $ ./tools/bpf/resolve_btfids/resolve_btfids -vv vmlinux ... section(36) .comment, size 44, link 0, flags 30, type=1 section(37) .debug_aranges, size 45684, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 16, expected 8 section(38) .debug_info, size 129104957, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 1, expected 8 section(39) .debug_abbrev, size 1152583, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 1, expected 8 section(40) .debug_line, size 7374522, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 1, expected 8 section(41) .debug_frame, size 702463, link 0, flags 800, type=1 section(42) .debug_str, size 1017571, link 0, flags 830, type=1 - fixing wrong alignment sh_addralign 1, expected 8 section(43) .debug_loc, size 3019453, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 1, expected 8 section(44) .debug_ranges, size 1744583, link 0, flags 800, type=1 - fixing wrong alignment sh_addralign 16, expected 8 section(45) .symtab, size 2955888, link 46, flags 0, type=2 section(46) .strtab, size 2613072, link 0, flags 0, type=3 ... update ok for vmlinux Another workaround is to disable compressed debug info data CONFIG_DEBUG_INFO_COMPRESSED kernel option. Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object") Reported-by: Jesper Dangaard Brouer Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Jesper Dangaard Brouer Acked-by: Yonghong Song Cc: Mark Wielaard Cc: Nick Clifton Link: https://lore.kernel.org/bpf/20200819092342.259004-1-jolsa@kernel.org commit da2968ff879b9e74688cdc658f646971991d2c56 Merge: d271b51c60ebe 7c2308f79fc81 Author: Linus Torvalds Date: Thu Aug 20 14:17:03 2020 -0700 Merge tag 'pci-v5.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Fix P2PDMA build issue (Christoph Hellwig)" * tag 'pci-v5.9-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/P2PDMA: Fix build without DMA ops commit ce51f63e63c52a4e1eee4dd040fb0ba0af3b43ab Author: Peilin Ye Date: Thu Aug 20 16:30:52 2020 +0200 net/smc: Prevent kernel-infoleak in __smc_diag_dump() __smc_diag_dump() is potentially copying uninitialized kernel stack memory into socket buffers, since the compiler may leave a 4-byte hole near the beginning of `struct smcd_diag_dmbinfo`. Fix it by initializing `dinfo` with memset(). Fixes: 4b1b7d3b30a6 ("net/smc: add SMC-D diag support") Suggested-by: Dan Carpenter Signed-off-by: Peilin Ye Signed-off-by: Ursula Braun Signed-off-by: David S. Miller commit 3e659a82c45076e354d20db4b0776e716c6e7fe3 Author: Edward Cree Date: Thu Aug 20 11:47:19 2020 +0100 sfc: fix build warnings on 32-bit Truncation of DMA_BIT_MASK to 32-bit dma_addr_t is semantically safe, but the compiler was warning because it was happening implicitly. Insert explicit casts to suppress the warnings. Reported-by: Randy Dunlap Signed-off-by: Edward Cree Acked-by: Randy Dunlap # build-tested Signed-off-by: David S. Miller commit bc62d68e2a0a69fcdcf28aca8edb01abf306b698 Author: Amol Grover Date: Mon Apr 6 16:29:50 2020 +0530 device_cgroup: Fix RCU list debugging warning exceptions may be traversed using list_for_each_entry_rcu() outside of an RCU read side critical section BUT under the protection of decgroup_mutex. Hence add the corresponding lockdep expression to fix the following false-positive warning: [ 2.304417] ============================= [ 2.304418] WARNING: suspicious RCU usage [ 2.304420] 5.5.4-stable #17 Tainted: G E [ 2.304422] ----------------------------- [ 2.304424] security/device_cgroup.c:355 RCU-list traversed in non-reader section!! Signed-off-by: Amol Grover Signed-off-by: James Morris commit fb73ed5ef7e1f3b561dae517b9efdf58c153636b Author: Kaige Li Date: Thu Aug 20 14:47:55 2020 +0800 net: phy: mscc: Fix a couple of spelling mistakes "spcified" -> "specified" There are a couple of spelling mistakes in comment text. Fix these. Signed-off-by: Kaige Li Signed-off-by: David S. Miller commit fc26f5bbf19459930b7290c87b65a9ae6a274650 Author: Bin Meng Date: Wed Jul 15 21:39:53 2020 -0700 riscv: Add SiFive drivers to rv32_defconfig This adds SiFive drivers to rv32_defconfig, to keep in sync with the 64-bit config. This is useful when testing 32-bit kernel with QEMU 'sifive_u' 32-bit machine. Signed-off-by: Bin Meng Reviewed-by: Anup Patel Reviewed-by: Alistair Francis Signed-off-by: Palmer Dabbelt commit a2770b57d0838148b6d0c8167214dce15c3645a3 Author: Anup Patel Date: Mon Aug 17 18:12:51 2020 +0530 dt-bindings: timer: Add CLINT bindings We add DT bindings documentation for CLINT device. Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Tested-by: Emil Renner Berhing Reviewed-by: Atish Patra Reviewed-by: Rob Herring Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 2bc3fc877aa9c4c8b80cc49f66dfcb7e4857a128 Author: Anup Patel Date: Mon Aug 17 18:12:50 2020 +0530 RISC-V: Remove CLINT related code from timer and arch Right now the RISC-V timer driver is convoluted to support: 1. Linux RISC-V S-mode (with MMU) where it will use TIME CSR for clocksource and SBI timer calls for clockevent device. 2. Linux RISC-V M-mode (without MMU) where it will use CLINT MMIO counter register for clocksource and CLINT MMIO compare register for clockevent device. We now have a separate CLINT timer driver which also provide CLINT based IPI operations so let's remove CLINT MMIO related code from arch/riscv directory and RISC-V timer driver. Signed-off-by: Anup Patel Tested-by: Emil Renner Berhing Acked-by: Daniel Lezcano Reviewed-by: Atish Patra Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit 2ac6795fcc085e8d03649f1bbd0d70aaff612cad Author: Anup Patel Date: Mon Aug 17 18:12:49 2020 +0530 clocksource/drivers: Add CLINT timer driver We add a separate CLINT timer driver for Linux RISC-V M-mode (i.e. RISC-V NoMMU kernel). The CLINT MMIO device provides three things: 1. 64bit free running counter register 2. 64bit per-CPU time compare registers 3. 32bit per-CPU inter-processor interrupt registers Unlike other timer devices, CLINT provides IPI registers along with timer registers. To use CLINT IPI registers, the CLINT timer driver provides IPI related callbacks to arch/riscv. Signed-off-by: Anup Patel Tested-by: Emil Renner Berhing Acked-by: Daniel Lezcano Reviewed-by: Atish Patra Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit cc7f3f72dc2ae2b383142896d79ca1e237ad7e8b Author: Anup Patel Date: Mon Aug 17 18:12:48 2020 +0530 RISC-V: Add mechanism to provide custom IPI operations We add mechanism to set custom IPI operations so that CLINT driver from drivers directory can provide custom IPI operations. Signed-off-by: Anup Patel Tested-by: Emil Renner Berhing Reviewed-by: Atish Patra Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit d271b51c60ebe71e0435a9059b315a3d8bb8a099 Merge: ba8e42077bbe0 d7e673ec2c8e0 Author: Linus Torvalds Date: Thu Aug 20 10:48:17 2020 -0700 Merge tag 'dma-mapping-5.9-1' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping fixes from Christoph Hellwig: "Fix more fallout from the dma-pool changes (Nicolas Saenz Julienne, me)" * tag 'dma-mapping-5.9-1' of git://git.infradead.org/users/hch/dma-mapping: dma-pool: Only allocate from CMA when in same memory zone dma-pool: fix coherent pool allocations for IOMMU mappings commit c2affe920b0e0669650943ac086215cf6519be34 Author: Adrian Huang Date: Wed Aug 19 23:42:36 2020 +0800 dax: do not print error message for non-persistent memory block device Commit 231609785cbf ("dax: print error message by pr_info() in __generic_fsdax_supported()") happens to print the following error message during booting when the non-persistent memory block devices are configured by device mapper. Those error messages are caused by the variable 'dax_dev' is NULL. Users might be confused with those error messages since they do not use the persistent memory device. Moreover, users might scare about "what's wrong with my disks" because they see the 'error' and 'failed' keywords. # dmesg | grep fail sdk3: error: dax access failed (-95) sdk3: error: dax access failed (-95) sdk3: error: dax access failed (-95) sdk3: error: dax access failed (-95) sdk3: error: dax access failed (-95) sdk3: error: dax access failed (-95) sdk3: error: dax access failed (-95) sdk3: error: dax access failed (-95) sdk3: error: dax access failed (-95) sdb3: error: dax access failed (-95) sdb3: error: dax access failed (-95) sdb3: error: dax access failed (-95) sdb3: error: dax access failed (-95) sdb3: error: dax access failed (-95) sdb3: error: dax access failed (-95) sdb3: error: dax access failed (-95) sdb3: error: dax access failed (-95) sdb3: error: dax access failed (-95) # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 1.1T 0 disk ├─sda1 8:1 0 156M 0 part ├─sda2 8:2 0 40G 0 part └─sda3 8:3 0 1.1T 0 part sdb 8:16 0 1.1T 0 disk ├─sdb1 8:17 0 600M 0 part ├─sdb2 8:18 0 1G 0 part └─sdb3 8:19 0 1.1T 0 part ├─rhel00-swap 254:3 0 4G 0 lvm ├─rhel00-home 254:4 0 1T 0 lvm └─rhel00-root 254:5 0 50G 0 lvm sdc 8:32 0 1.1T 0 disk sdd 8:48 0 1.1T 0 disk sde 8:64 0 1.1T 0 disk sdf 8:80 0 1.1T 0 disk sdg 8:96 0 1.1T 0 disk sdh 8:112 0 3.3T 0 disk ├─sdh1 8:113 0 500M 0 part /boot/efi ├─sdh2 8:114 0 40G 0 part / ├─sdh3 8:115 0 2.9T 0 part /home └─sdh4 8:116 0 314.6G 0 part [SWAP] sdi 8:128 0 1.1T 0 disk sdj 8:144 0 3.3T 0 disk ├─sdj1 8:145 0 512M 0 part └─sdj2 8:146 0 3.3T 0 part sdk 8:160 0 119.2G 0 disk ├─sdk1 8:161 0 200M 0 part ├─sdk2 8:162 0 1G 0 part └─sdk3 8:163 0 118G 0 part ├─rhel-swap 254:0 0 4G 0 lvm ├─rhel-home 254:1 0 64G 0 lvm └─rhel-root 254:2 0 50G 0 lvm sdl 8:176 0 119.2G 0 disk The call path is shown as follows: dm_table_determine_type dm_table_supports_dax device_supports_dax generic_fsdax_supported __generic_fsdax_supported With the disk configuration listing from the command 'lsblk', the member 'dev->dax_dev' of the block devices 'sdb3' and 'sdk3' (configured by device mapper) is NULL in function generic_fsdax_supported() because the member is configured in function open_table_device(). To prevent the confusing error messages in this scenario (this is normal behavior), just print those error messages by pr_debug() by checking if dax_dev is NULL and the block device does not support DAX. Link: https://lore.kernel.org/r/20200819154236.24191-1-adrianhuang0701@gmail.com Fixes: 231609785cbf ("dax: print error message by pr_info() in __generic_fsdax_supported()") Cc: Coly Li Cc: Dan Williams Cc: Alasdair Kergon Cc: Mike Snitzer Acked-by: Coly Li Signed-off-by: Adrian Huang Signed-off-by: Vishal Verma commit ba8e42077bbe046a09bdb965dbfbf8c27594fe8f Author: David Howells Date: Thu Aug 20 14:37:12 2020 +0100 afs: Fix key ref leak in afs_put_operation() The afs_put_operation() function needs to put the reference to the key that's authenticating the operation. Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Reported-by: Dave Botsch Signed-off-by: David Howells Signed-off-by: Linus Torvalds commit e4686c79b103c0a73b8ed41e5fd967da201b6fba Author: David Howells Date: Thu Aug 20 16:13:05 2020 +0100 afs: Fix error handling in VL server rotation The error handling in the VL server rotation in the case of there being no contactable servers is not correct. In such a case, the records of all the servers in the list are scanned and the errors and abort codes are mapped and prioritised and one error is chosen. This is then forgotten and the default error is used (EDESTADDRREQ). Fix this by using the calculated error. Also we need to note whether a server responded on one of its endpoints so that we can priorise an error from an abort message over local and network errors. Fixes: 4584ae96ae30 ("afs: Fix missing net error handling") Signed-off-by: David Howells commit b95b30940ee46a4d892ca3de3ffb8249c4985b1f Author: David Howells Date: Wed Aug 19 15:27:17 2020 +0100 afs: Don't use VL probe running state to make decisions outside probe code Don't use the running state for VL server probes to make decisions about which server to use as the state is cleared at the start of a probe and intermediate values might also be misleading. Instead, add a separate 'latest known' rtt in the afs_vlserver struct and a flag to indicate if the server is known to be responding and update these as and when we know what to change them to. Fixes: 3bf0fb6f33dd ("afs: Probe multiple fileservers simultaneously") Signed-off-by: David Howells commit fb72cd3d484ce548597c75ebeecc70483fe8bb6e Author: David Howells Date: Thu Aug 20 15:01:54 2020 +0100 afs: Expose information from afs_vlserver through /proc for debugging Convert various bitfields in afs_vlserver::probe to a mask and then expose this and some other bits of information through /proc/net/afs//vlservers to make it easier to debug VL server communication issues. Signed-off-by: David Howells commit 4f4c2c05eb7703b485b4285b8e2eee908c7b4508 Author: David Howells Date: Wed Aug 19 15:13:44 2020 +0100 afs: Remove afs_vlserver->probe.have_result Remove afs_vlserver->probe.have_result as it's neither read nor waited upon. Fixes: 3bf0fb6f33dd ("afs: Probe multiple fileservers simultaneously") Signed-off-by: David Howells commit 1d4adfaf65746203861c72d9d78de349eb97d528 Author: David Howells Date: Thu Aug 20 15:13:00 2020 +0100 rxrpc: Make rxrpc_kernel_get_srtt() indicate validity Fix rxrpc_kernel_get_srtt() to indicate the validity of the returned smoothed RTT. If we haven't had any valid samples yet, the SRTT isn't useful. Fixes: c410bf01933e ("rxrpc: Fix the excessive initial retransmission timeout") Signed-off-by: David Howells commit 4700c4d80b7bb171f6996016ef121e1508860b42 Author: David Howells Date: Wed Aug 19 23:29:16 2020 +0100 rxrpc: Fix loss of RTT samples due to interposed ACK The Rx protocol has a mechanism to help generate RTT samples that works by a client transmitting a REQUESTED-type ACK when it receives a DATA packet that has the REQUEST_ACK flag set. The peer, however, may interpose other ACKs before transmitting the REQUESTED-ACK, as can be seen in the following trace excerpt: rxrpc_tx_data: c=00000044 DATA d0b5ece8:00000001 00000001 q=00000001 fl=07 rxrpc_rx_ack: c=00000044 00000001 PNG r=00000000 f=00000002 p=00000000 n=0 rxrpc_rx_ack: c=00000044 00000002 REQ r=00000001 f=00000002 p=00000001 n=0 ... DATA packet 1 (q=xx) has REQUEST_ACK set (bit 1 of fl=xx). The incoming ping (labelled PNG) hard-acks the request DATA packet (f=xx exceeds the sequence number of the DATA packet), causing it to be discarded from the Tx ring. The ACK that was requested (labelled REQ, r=xx references the serial of the DATA packet) comes after the ping, but the sk_buff holding the timestamp has gone and the RTT sample is lost. This is particularly noticeable on RPC calls used to probe the service offered by the peer. A lot of peers end up with an unknown RTT because we only ever sent a single RPC. This confuses the server rotation algorithm. Fix this by caching the information about the outgoing packet in RTT calculations in the rxrpc_call struct rather than looking in the Tx ring. A four-deep buffer is maintained and both REQUEST_ACK-flagged DATA and PING-ACK transmissions are recorded in there. When the appropriate response ACK is received, the buffer is checked for a match and, if found, an RTT sample is recorded. If a received ACK refers to a packet with a later serial number than an entry in the cache, that entry is presumed lost and the entry is made available to record a new transmission. ACKs types other than REQUESTED-type and PING-type cause any matching sample to be cancelled as they don't necessarily represent a useful measurement. If there's no space in the buffer on ping/data transmission, the sample base is discarded. Fixes: 50235c4b5a2f ("rxrpc: Obtain RTT data by requesting ACKs on DATA packets") Signed-off-by: David Howells commit cc15fd9892e28689b6e17dbd6e28d00c55d62928 Merge: 9123e3a74ec7b a4501bac0e553 Author: Rafael J. Wysocki Date: Thu Aug 20 18:13:45 2020 +0200 Merge branch 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework fixes for 5.9-rc2 from Viresh Kumar: "This contains the following fixes for 5.9: - Fix re-enabling of resources (Rajendra Nayak). - Put OPP table references (Stephen Boyd)." * 'opp/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Enable resources again if they were disabled earlier opp: Put opp table in dev_pm_opp_set_rate() if _set_opp_bw() fails opp: Put opp table in dev_pm_opp_set_rate() for empty tables commit 68528d937dcd675e79973061c1a314db598162d1 Author: David Howells Date: Thu Aug 20 14:12:33 2020 +0100 rxrpc: Keep the ACK serial in a var in rxrpc_input_ack() Keep the ACK serial number in a variable in rxrpc_input_ack() as it's used frequently. Signed-off-by: David Howells commit fce2ff728f95b8894db14f51c9274dc56c37616f Author: Johannes Berg Date: Wed Aug 5 15:35:18 2020 +0200 nl80211: fix NL80211_ATTR_HE_6GHZ_CAPABILITY usage In nl80211_set_station(), we check NL80211_ATTR_HE_6GHZ_CAPABILITY and then use NL80211_ATTR_HE_CAPABILITY, which is clearly wrong. Fix this to use NL80211_ATTR_HE_6GHZ_CAPABILITY as well. Cc: stable@vger.kernel.org Fixes: 43e64bf301fd ("cfg80211: handle 6 GHz capability of new station") Link: https://lore.kernel.org/r/20200805153516.310cef625955.I0abc04dc8abb2c7c005c88ef8fa2d0e3c9fb95c4@changeid Signed-off-by: Johannes Berg commit 1e891e513e16c145cc9b45b1fdb8bf4a4f2f9557 Author: Toke Høiland-Jørgensen Date: Wed Aug 19 13:05:34 2020 +0200 libbpf: Fix map index used in error message The error message emitted by bpf_object__init_user_btf_maps() was using the wrong section ID. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200819110534.9058-1-toke@redhat.com commit 90a9b102eddf6a3f987d15f4454e26a2532c1c98 Author: Vasant Hegde Date: Thu Aug 20 11:48:44 2020 +0530 powerpc/pseries: Do not initiate shutdown when system is running on UPS As per PAPR we have to look for both EPOW sensor value and event modifier to identify the type of event and take appropriate action. In LoPAPR v1.1 section 10.2.2 includes table 136 "EPOW Action Codes": SYSTEM_SHUTDOWN 3 The system must be shut down. An EPOW-aware OS logs the EPOW error log information, then schedules the system to be shut down to begin after an OS defined delay internal (default is 10 minutes.) Then in section 10.3.2.2.8 there is table 146 "Platform Event Log Format, Version 6, EPOW Section", which includes the "EPOW Event Modifier": For EPOW sensor value = 3 0x01 = Normal system shutdown with no additional delay 0x02 = Loss of utility power, system is running on UPS/Battery 0x03 = Loss of system critical functions, system should be shutdown 0x04 = Ambient temperature too high All other values = reserved We have a user space tool (rtas_errd) on LPAR to monitor for EPOW_SHUTDOWN_ON_UPS. Once it gets an event it initiates shutdown after predefined time. It also starts monitoring for any new EPOW events. If it receives "Power restored" event before predefined time it will cancel the shutdown. Otherwise after predefined time it will shutdown the system. Commit 79872e35469b ("powerpc/pseries: All events of EPOW_SYSTEM_SHUTDOWN must initiate shutdown") changed our handling of the "on UPS/Battery" case, to immediately shutdown the system. This breaks existing setups that rely on the userspace tool to delay shutdown and let the system run on the UPS. Fixes: 79872e35469b ("powerpc/pseries: All events of EPOW_SYSTEM_SHUTDOWN must initiate shutdown") Cc: stable@vger.kernel.org # v4.0+ Signed-off-by: Vasant Hegde [mpe: Massage change log and add PAPR references] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200820061844.306460-1-hegdevasant@linux.vnet.ibm.com commit cc5453a5b7e90c39f713091a7ebc53c1f87d1700 Author: Florian Westphal Date: Tue Aug 18 16:15:58 2020 +0200 netfilter: conntrack: allow sctp hearbeat after connection re-use If an sctp connection gets re-used, heartbeats are flagged as invalid because their vtag doesn't match. Handle this in a similar way as TCP conntrack when it suspects that the endpoints and conntrack are out-of-sync. When a HEARTBEAT request fails its vtag validation, flag this in the conntrack state and accept the packet. When a HEARTBEAT_ACK is received with an invalid vtag in the reverse direction after we allowed such a HEARTBEAT through, assume we are out-of-sync and re-set the vtag info. v2: remove left-over snippet from an older incarnation that moved new_state/old_state assignments, thats not needed so keep that as-is. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 867a23eab52847d41a0a6eae41a64d76de7782a8 Author: Pavel Begunkov Date: Thu Aug 20 11:34:39 2020 +0300 io_uring: kill extra iovec=NULL in import_iovec() If io_import_iovec() returns an error, return iovec is undefined and must not be used, so don't set it to NULL when failing. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f261c16861b82951bd2125706660ce4602930563 Author: Pavel Begunkov Date: Thu Aug 20 11:34:10 2020 +0300 io_uring: comment on kfree(iovec) checks kfree() handles NULL pointers well, but io_{read,write}() checks it because of performance reasons. Leave a comment there for those who are tempted to patch it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit bb175342aa64e6c6f1d04f5235502121d6ff0247 Author: Pavel Begunkov Date: Thu Aug 20 11:33:35 2020 +0300 io_uring: fix racy req->flags modification Setting and clearing REQ_F_OVERFLOW in io_uring_cancel_files() and io_cqring_overflow_flush() are racy, because they might be called asynchronously. REQ_F_OVERFLOW flag in only needed for files cancellation, so if it can be guaranteed that requests _currently_ marked inflight can't be overflown, the problem will be solved with removing the flag altogether. That's how the patch works, it removes inflight status of a request in io_cqring_fill_event() whenever it should be thrown into CQ-overflow list. That's Ok to do, because no opcode specific handling can be done after io_cqring_fill_event(), the same assumption as with "struct io_completion" patches. And it already have a good place for such cleanups, which is io_clean_op(). A nice side effect of this is removing this inflight check from the hot path. note on synchronisation: now __io_cqring_fill_event() may be taking two spinlocks simultaneously, completion_lock and inflight_lock. It's fine, because we never do that in reverse order, and CQ-overflow of inflight requests shouldn't happen often. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6da06c6291f38be4df6df2efb76ba925096d2691 Author: Weihang Li Date: Wed Aug 19 17:39:44 2020 +0800 Revert "RDMA/hns: Reserve one sge in order to avoid local length error" This patch caused some issues on SEND operation, and it should be reverted to make the drivers work correctly. There will be a better solution that has been tested carefully to solve the original problem. This reverts commit 711195e57d341e58133d92cf8aaab1db24e4768d. Fixes: 711195e57d34 ("RDMA/hns: Reserve one sge in order to avoid local length error") Link: https://lore.kernel.org/r/1597829984-20223-1-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit b25e8e85e75a61af1ddc88c4798387dd3132dd43 Author: Kaike Wan Date: Tue Aug 11 13:49:31 2020 -0400 RDMA/hfi1: Correct an interlock issue for TID RDMA WRITE request The following message occurs when running an AI application with TID RDMA enabled: hfi1 0000:7f:00.0: hfi1_0: [QP74] hfi1_tid_timeout 4084 hfi1 0000:7f:00.0: hfi1_0: [QP70] hfi1_tid_timeout 4084 The issue happens when TID RDMA WRITE request is followed by an IB_WR_RDMA_WRITE_WITH_IMM request, the latter could be completed first on the responder side. As a result, no ACK packet for the latter could be sent because the TID RDMA WRITE request is still being processed on the responder side. When the TID RDMA WRITE request is eventually completed, the requester will wait for the IB_WR_RDMA_WRITE_WITH_IMM request to be acknowledged. If the next request is another TID RDMA WRITE request, no TID RDMA WRITE DATA packet could be sent because the preceding IB_WR_RDMA_WRITE_WITH_IMM request is not completed yet. Consequently the IB_WR_RDMA_WRITE_WITH_IMM will be retried but it will be ignored on the responder side because the responder thinks it has already been completed. Eventually the retry will be exhausted and the qp will be put into error state on the requester side. On the responder side, the TID resource timer will eventually expire because no TID RDMA WRITE DATA packets will be received for the second TID RDMA WRITE request. There is also risk of a write-after-write memory corruption due to the issue. Fix by adding a requester side interlock to prevent any potential data corruption and TID RDMA protocol error. Fixes: a0b34f75ec20 ("IB/hfi1: Add interlock between a TID RDMA request and other requests") Link: https://lore.kernel.org/r/20200811174931.191210.84093.stgit@awfm-01.aw.intel.com Cc: # 5.4.x+ Reviewed-by: Mike Marciniszyn Reviewed-by: Dennis Dalessandro Signed-off-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Jason Gunthorpe commit a812f2d60a9fb7818f9c81f967180317b52545c0 Author: Selvin Xavier Date: Wed Aug 5 21:45:48 2020 -0700 RDMA/bnxt_re: Do not add user qps to flushlist Driver shall add only the kernel qps to the flush list for clean up. During async error events from the HW, driver is adding qps to this list without checking if the qp is kernel qp or not. Add a check to avoid user qp addition to the flush list. Fixes: 942c9b6ca8de ("RDMA/bnxt_re: Avoid Hard lockup during error CQE processing") Fixes: c50866e2853a ("bnxt_re: fix the regression due to changes in alloc_pbl") Link: https://lore.kernel.org/r/1596689148-4023-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 4469add9d3b3cdade854997720ebfeb53a83d761 Author: Colin Ian King Date: Mon Aug 10 08:58:24 2020 +0100 RDMA/core: Fix spelling mistake "Could't" -> "Couldn't" There is a spelling mistake in a pr_warn message. Fix it. Link: https://lore.kernel.org/r/20200810075824.46770-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe commit 17899eaf88d689529b866371344c8f269ba79b5f Author: Athira Rajeev Date: Thu Aug 6 08:46:32 2020 -0400 powerpc/perf: Fix soft lockups due to missed interrupt accounting Performance monitor interrupt handler checks if any counter has overflown and calls record_and_restart() in core-book3s which invokes perf_event_overflow() to record the sample information. Apart from creating sample, perf_event_overflow() also does the interrupt and period checks via perf_event_account_interrupt(). Currently we record information only if the SIAR (Sampled Instruction Address Register) valid bit is set (using siar_valid() check) and hence the interrupt check. But it is possible that we do sampling for some events that are not generating valid SIAR, and hence there is no chance to disable the event if interrupts are more than max_samples_per_tick. This leads to soft lockup. Fix this by adding perf_event_account_interrupt() in the invalid SIAR code path for a sampling event. ie if SIAR is invalid, just do interrupt check and don't record the sample information. Reported-by: Alexey Kardashevskiy Signed-off-by: Athira Rajeev Tested-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1596717992-7321-1-git-send-email-atrajeev@linux.vnet.ibm.com commit fb1201aececc59990b75ef59fca93ae4aa1e1444 Author: Ard Biesheuvel Date: Mon Aug 17 12:00:17 2020 +0200 Documentation: efi: remove description of efi=old_map The old EFI runtime region mapping logic that was kept around for some time has finally been removed entirely, along with the SGI UV1 support code that was its last remaining user. So remove any mention of the efi=old_map command line parameter from the docs. Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Ard Biesheuvel commit 39ada88f9c862c1ff8929ff67e0d1199c7af73fe Author: Ard Biesheuvel Date: Thu Aug 13 19:38:17 2020 +0200 efi/x86: Move 32-bit code into efi_32.c Now that the old memmap code has been removed, some code that was left behind in arch/x86/platform/efi/efi.c is only used for 32-bit builds, which means it can live in efi_32.c as well. So move it over. Signed-off-by: Ard Biesheuvel commit 8a8a3237a78cbc0557f0eb16a89f16d616323e99 Author: Arvind Sankar Date: Thu Aug 13 14:58:11 2020 -0400 efi/libstub: Handle unterminated cmdline Make the command line parsing more robust, by handling the case it is not NUL-terminated. Use strnlen instead of strlen, and make sure that the temporary copy is NUL-terminated before parsing. Cc: Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20200813185811.554051-4-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel commit a37ca6a2af9df2972372b918f09390c9303acfbd Author: Arvind Sankar Date: Wed Jul 29 15:33:00 2020 -0400 efi/libstub: Handle NULL cmdline Treat a NULL cmdline the same as empty. Although this is unlikely to happen in practice, the x86 kernel entry does check for NULL cmdline and handles it, so do it here as well. Cc: Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20200729193300.598448-1-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel commit 1fd9717d75df68e3c3509b8e7b1138ca63472f88 Author: Arvind Sankar Date: Sat Jul 25 11:59:16 2020 -0400 efi/libstub: Stop parsing arguments at "--" Arguments after "--" are arguments for init, not for the kernel. Cc: Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20200725155916.1376773-1-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel commit 98086df8b70c06234a8f4290c46064e44dafa0ed Author: Li Heng Date: Mon Jul 20 15:22:18 2020 +0800 efi: add missed destroy_workqueue when efisubsys_init fails destroy_workqueue() should be called to destroy efi_rts_wq when efisubsys_init() init resources fails. Cc: Reported-by: Hulk Robot Signed-off-by: Li Heng Link: https://lore.kernel.org/r/1595229738-10087-1-git-send-email-liheng40@huawei.com Signed-off-by: Ard Biesheuvel commit c8502eb2d43b6b9b1dc382299a4d37031be63876 Author: Arvind Sankar Date: Fri Jul 17 15:45:26 2020 -0400 efi/x86: Mark kernel rodata non-executable for mixed mode When remapping the kernel rodata section RO in the EFI pagetables, the protection flags that were used for the text section are being reused, but the rodata section should not be marked executable. Cc: Signed-off-by: Arvind Sankar Link: https://lore.kernel.org/r/20200717194526.3452089-1-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel commit a4501bac0e553bed117b7e1b166d49731caf7260 Author: Rajendra Nayak Date: Mon Aug 10 12:36:19 2020 +0530 opp: Enable resources again if they were disabled earlier dev_pm_opp_set_rate() can now be called with freq = 0 in order to either drop performance or bandwidth votes or to disable regulators on platforms which support them. In such cases, a subsequent call to dev_pm_opp_set_rate() with the same frequency ends up returning early because 'old_freq == freq' Instead make it fall through and put back the dropped performance and bandwidth votes and/or enable back the regulators. Cc: v5.3+ # v5.3+ Fixes: cd7ea582866f ("opp: Make dev_pm_opp_set_rate() handle freq = 0 to drop performance votes") Reported-by: Sajida Bhanu Reviewed-by: Sibi Sankar Reported-by: Matthias Kaehlcke Tested-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Signed-off-by: Rajendra Nayak [ Viresh: Don't skip clk_set_rate() and massaged changelog ] Signed-off-by: Viresh Kumar commit ee87e1557c42dc9c2da11c38e11b87c311569853 Author: Randy Dunlap Date: Thu Aug 20 06:30:47 2020 +0200 Fix build error when CONFIG_ACPI is not set/enabled: ../arch/x86/pci/xen.c: In function ‘pci_xen_init’: ../arch/x86/pci/xen.c:410:2: error: implicit declaration of function ‘acpi_noirq_set’; did you mean ‘acpi_irq_get’? [-Werror=implicit-function-declaration] acpi_noirq_set(); Fixes: 88e9ca161c13 ("xen/pci: Use acpi_noirq_set() helper to avoid #ifdef") Signed-off-by: Randy Dunlap Reviewed-by: Juergen Gross Cc: Andy Shevchenko Cc: Bjorn Helgaas Cc: Konrad Rzeszutek Wilk Cc: xen-devel@lists.xenproject.org Cc: linux-pci@vger.kernel.org Signed-off-by: Juergen Gross commit 6163a985e50cb19d5bdf73f98e45b8af91a77658 Author: Juergen Gross Date: Fri Jul 10 16:16:51 2020 +0200 efi: avoid error message when booting under Xen efifb_probe() will issue an error message in case the kernel is booted as Xen dom0 from UEFI as EFI_MEMMAP won't be set in this case. Avoid that message by calling efi_mem_desc_lookup() only if EFI_MEMMAP is set. Fixes: 38ac0287b7f4 ("fbdev/efifb: Honour UEFI memory map attributes when mapping the FB") Signed-off-by: Juergen Gross Acked-by: Ard Biesheuvel Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Juergen Gross commit 7eac66d0456fe12a462e5c14c68e97c7460989da Merge: 33d0f96ffd739 aae7a75a821a7 Author: Linus Torvalds Date: Wed Aug 19 21:04:35 2020 -0700 Merge tag 'vfio-v5.9-rc2' of git://github.com/awilliam/linux-vfio Pull VFIO fixes from Alex Williamson: - Fix lockdep issue reported for recursive read-lock (Alex Williamson) - Fix missing unwind in type1 replay function (Alex Williamson) * tag 'vfio-v5.9-rc2' of git://github.com/awilliam/linux-vfio: vfio/type1: Add proper error unwind for vfio_iommu_replay() vfio-pci: Avoid recursive read-lock usage commit da2446b66b5e2c7f3ab63912c8d999810e35e8b3 Author: Jiansong Chen Date: Mon Aug 17 22:38:38 2020 +0800 Revert "drm/amdgpu: disable gfxoff for navy_flounder" This reverts commit 9c9b17a7d19a8e21db2e378784fff1128b46c9d3. Newly released sdma fw (51.52) provides a fix for the issue. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Reviewed-by: Tao Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit e17a7c0e0aebb956719ce2a8465f649859c2da7d Author: Frederic Barrat Date: Wed Aug 19 15:07:41 2020 +0200 powerpc/powernv/pci: Fix possible crash when releasing DMA resources Fix a typo introduced during recent code cleanup, which could lead to silently not freeing resources or an oops message (on PCI hotplug or CAPI reset). Only impacts ioda2, the code path for ioda1 is correct. Fixes: 01e12629af4e ("powerpc/powernv/pci: Add explicit tracking of the DMA setup state") Signed-off-by: Frederic Barrat Reviewed-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200819130741.16769-1-fbarrat@linux.ibm.com commit cf96d977381d4a23957bade2ddf1c420b74a26b6 Author: Wang Hai Date: Wed Aug 19 10:33:09 2020 +0800 net: gemini: Fix missing free_netdev() in error path of gemini_ethernet_port_probe() Replace alloc_etherdev_mq with devm_alloc_etherdev_mqs. In this way, when probe fails, netdev can be freed automatically. Fixes: 4d5ae32f5e1e ("net: ethernet: Add a driver for Gemini gigabit ethernet") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 9553b62c1dd27df67ab2f52ec8a3bc3501887619 Author: Sebastian Andrzej Siewior Date: Tue Aug 18 18:14:39 2020 +0200 net: atlantic: Use readx_poll_timeout() for large timeout Commit 8dcf2ad39fdb2 ("net: atlantic: add hwmon getter for MAC temperature") implemented a read callback with an udelay(10000U). This fails to compile on ARM because the delay is >1ms. I doubt that it is needed to spin for 10ms even if possible on x86. >From looking at the code, the context appears to be preemptible so using usleep() should work and avoid busy spinning. Use readx_poll_timeout() in the poll loop. Fixes: 8dcf2ad39fdb2 ("net: atlantic: add hwmon getter for MAC temperature") Cc: Mark Starovoytov Cc: Igor Russkikh Signed-off-by: Sebastian Andrzej Siewior Acked-by: Guenter Roeck Signed-off-by: David S. Miller commit 957ff4278e0db34f56c2bc121fdd6393e4523ef2 Author: Min Li Date: Tue Aug 18 10:41:22 2020 -0400 ptp: ptp_clockmatrix: use i2c_master_send for i2c write The old code for i2c write would break on some controllers, which fails at handling Repeated Start Condition. So we will just use i2c_master_send to handle write in one transanction. Changes since v1: - Remove indentation change Signed-off-by: Min Li Signed-off-by: David S. Miller commit d1fb55592909ea249af70170c7a52e637009564d Author: Johannes Berg Date: Wed Aug 19 21:52:38 2020 +0200 netlink: fix state reallocation in policy export Evidently, when I did this previously, we didn't have more than 10 policies and didn't run into the reallocation path, because it's missing a memset() for the unused policies. Fix that. Fixes: d07dcf9aadd6 ("netlink: add infrastructure to expose policies to userspace") Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit b4c8998be2a40989faab0001714dad0bc5e5fdbf Merge: ad6641189c593 ccd143e5150f2 Author: David S. Miller Date: Wed Aug 19 15:32:58 2020 -0700 Merge branch 'Bug-fixes-for-ENA-ethernet-driver' Shay Agroskin says: ==================== Bug fixes for ENA ethernet driver This series adds the following: - Fix undesired call to ena_restore after returning from suspend - Fix condition inside a WARN_ON - Fix overriding previous value when updating missed_tx statistic v1->v2: - fix bug when calling reset routine after device resources are freed (Jakub) v2->v3: - fix wrong hash in 'Fixes' tag ==================== Signed-off-by: David S. Miller commit ccd143e5150f24b9ba15145c7221b61dd9e41021 Author: Shay Agroskin Date: Wed Aug 19 20:28:38 2020 +0300 net: ena: Make missed_tx stat incremental Most statistics in ena driver are incremented, meaning that a stat's value is a sum of all increases done to it since driver/queue initialization. This patch makes all statistics this way, effectively making missed_tx statistic incremental. Also added a comment regarding rx_drops and tx_drops to make it clearer how these counters are calculated. Fixes: 11095fdb712b ("net: ena: add statistics for missed tx packets") Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 8b147f6f3e7de4e51113e3e9ec44aa2debc02c58 Author: Shay Agroskin Date: Wed Aug 19 20:28:37 2020 +0300 net: ena: Change WARN_ON expression in ena_del_napi_in_range() The ena_del_napi_in_range() function unregisters the napi handler for rings in a given range. This function had the following WARN_ON macro: WARN_ON(ENA_IS_XDP_INDEX(adapter, i) && adapter->ena_napi[i].xdp_ring); This macro prints the call stack if the expression inside of it is true [1], but the expression inside of it is the wanted situation. The expression checks whether the ring has an XDP queue and its index corresponds to a XDP one. This patch changes the expression to !ENA_IS_XDP_INDEX(adapter, i) && adapter->ena_napi[i].xdp_ring which indicates an unwanted situation. Also, change the structure of the function. The napi handler is unregistered for all rings, and so there's no need to check whether the index is an XDP index or not. By removing this check the code becomes much more readable. Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action") Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 63d4a4c145cca2e84dc6e62d2ef5cb990c9723c2 Author: Shay Agroskin Date: Wed Aug 19 20:28:36 2020 +0300 net: ena: Prevent reset after device destruction The reset work is scheduled by the timer routine whenever it detects that a device reset is required (e.g. when a keep_alive signal is missing). When releasing device resources in ena_destroy_device() the driver cancels the scheduling of the timer routine without destroying the reset work explicitly. This creates the following bug: The driver is suspended and the ena_suspend() function is called -> This function calls ena_destroy_device() to free the net device resources -> The driver waits for the timer routine to finish its execution and then cancels it, thus preventing from it to be called again. If, in its final execution, the timer routine schedules a reset, the reset routine might be called afterwards,and a redundant call to ena_restore_device() would be made. By changing the reset routine we allow it to read the device's state accurately. This is achieved by checking whether ENA_FLAG_TRIGGER_RESET flag is set before resetting the device and making both the destruction function and the flag check are under rtnl lock. The ENA_FLAG_TRIGGER_RESET is cleared at the end of the destruction routine. Also surround the flag check with 'likely' because we expect that the reset routine would be called only when ENA_FLAG_TRIGGER_RESET flag is set. The destruction of the timer and reset services in __ena_shutoff() have to stay, even though the timer routine is destroyed in ena_destroy_device(). This is to avoid a case in which the reset routine is scheduled after free_netdev() in __ena_shutoff(), which would create an access to freed memory in adapter->flags. Fixes: 8c5c7abdeb2d ("net: ena: add power management ops to the ENA driver") Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit d1ac0002dd297069bb8448c2764c9c31c4668441 Author: Marc Zyngier Date: Wed Aug 19 10:42:55 2020 +0100 of: address: Work around missing device_type property in pcie nodes Recent changes to the DT PCI bus parsing made it mandatory for device tree nodes describing a PCI controller to have the 'device_type = "pci"' property for the node to be matched. Although this follows the letter of the specification, it breaks existing device-trees that have been working fine for years. Rockchip rk3399-based systems are a prime example of such collateral damage, and have stopped discovering their PCI bus. In order to paper over it, let's add a workaround to the code matching the device type, and accept as PCI any node that is named "pcie", A warning will hopefully nudge the user into updating their DT to a fixed version if they can, but the incentive is obviously pretty small. Fixes: 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser") Suggested-by: Rob Herring Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200819094255.474565-1-maz@kernel.org Signed-off-by: Rob Herring commit 43647929175e2cd30a6a1b1a5d385704bbf934a3 Author: Geert Uytterhoeven Date: Wed Aug 19 14:48:50 2020 +0200 dt: writing-schema: Miscellaneous grammar fixes - Add missing verb, - Fix accidental plural. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20200819124850.20543-1-geert+renesas@glider.be commit 33d0f96ffd7394ffb208bb366be312d12dfd24a4 Author: Arvind Sankar Date: Wed Aug 19 10:08:16 2020 -0400 lib/string.c: Use freestanding environment gcc can transform the loop in a naive implementation of memset/memcpy etc into a call to the function itself. This optimization is enabled by -ftree-loop-distribute-patterns. This has been the case for a while, but gcc-10.x enables this option at -O2 rather than -O3 as in previous versions. Add -ffreestanding, which implicitly disables this optimization with gcc. It is unclear whether clang performs such optimizations, but hopefully it will also not do so in a freestanding environment. Signed-off-by: Arvind Sankar Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888 Signed-off-by: Linus Torvalds commit 394b19d6cb58ae292c0e1ad6b893fed8ece477ce Author: Arvind Sankar Date: Tue Aug 4 19:48:17 2020 -0400 x86/boot/compressed: Use builtin mem functions for decompressor Since commits c041b5ad8640 ("x86, boot: Create a separate string.h file to provide standard string functions") fb4cac573ef6 ("x86, boot: Move memcmp() into string.h and string.c") the decompressor stub has been using the compiler's builtin memcpy, memset and memcmp functions, _except_ where it would likely have the largest impact, in the decompression code itself. Remove the #undef's of memcpy and memset in misc.c so that the decompressor code also uses the compiler builtins. The rationale given in the comment doesn't really apply: just because some functions use the out-of-line version is no reason to not use the builtin version in the rest. Replace the comment with an explanation of why memzero and memmove are being #define'd. Drop the suggestion to #undef in boot/string.h as well: the out-of-line versions are not really optimized versions, they're generic code that's good enough for the preboot environment. The compiler will likely generate better code for constant-size memcpy/memset/memcmp if it is allowed to. Most decompressors' performance is unchanged, with the exception of LZ4 and 64-bit ZSTD. Before After ARCH LZ4 73ms 10ms 32 LZ4 120ms 10ms 64 ZSTD 90ms 74ms 64 Measurements on QEMU on 2.2GHz Broadwell Xeon, using defconfig kernels. Decompressor code size has small differences, with the largest being that 64-bit ZSTD decreases just over 2k. The largest code size increase was on 64-bit XZ, of about 400 bytes. Signed-off-by: Arvind Sankar Suggested-by: Nick Terrell Tested-by: Nick Terrell Acked-by: Kees Cook Signed-off-by: Linus Torvalds commit ad112aa8b1ac4bf5e8da67734fcb535fd3cd564e Author: Wang Hai Date: Wed Aug 19 10:49:43 2020 +0800 SUNRPC: remove duplicate include Remove linux/sunrpc/auth_gss.h which is included more than once Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Chuck Lever commit fc666777da9da387354b1a142a6ffc5d43bc4f7e Author: Jens Axboe Date: Wed Aug 19 11:10:51 2020 -0600 io_uring: use system_unbound_wq for ring exit work We currently use system_wq, which is unbounded in terms of number of workers. This means that if we're exiting tons of rings at the same time, then we'll briefly spawn tons of event kworkers just for a very short blocking time as the rings exit. Use system_unbound_wq instead, which has a sane cap on the concurrency level. Signed-off-by: Jens Axboe commit bbc37d6e475eee8ffa2156ec813efc6bbb43c06d Author: Filipe Manana Date: Fri Aug 14 11:04:09 2020 +0100 btrfs: fix space cache memory leak after transaction abort If a transaction aborts it can cause a memory leak of the pages array of a block group's io_ctl structure. The following steps explain how that can happen: 1) Transaction N is committing, currently in state TRANS_STATE_UNBLOCKED and it's about to start writing out dirty extent buffers; 2) Transaction N + 1 already started and another task, task A, just called btrfs_commit_transaction() on it; 3) Block group B was dirtied (extents allocated from it) by transaction N + 1, so when task A calls btrfs_start_dirty_block_groups(), at the very beginning of the transaction commit, it starts writeback for the block group's space cache by calling btrfs_write_out_cache(), which allocates the pages array for the block group's io_ctl with a call to io_ctl_init(). Block group A is added to the io_list of transaction N + 1 by btrfs_start_dirty_block_groups(); 4) While transaction N's commit is writing out the extent buffers, it gets an IO error and aborts transaction N, also setting the file system to RO mode; 5) Task A has already returned from btrfs_start_dirty_block_groups(), is at btrfs_commit_transaction() and has set transaction N + 1 state to TRANS_STATE_COMMIT_START. Immediately after that it checks that the filesystem was turned to RO mode, due to transaction N's abort, and jumps to the "cleanup_transaction" label. After that we end up at btrfs_cleanup_one_transaction() which calls btrfs_cleanup_dirty_bgs(). That helper finds block group B in the transaction's io_list but it never releases the pages array of the block group's io_ctl, resulting in a memory leak. In fact at the point when we are at btrfs_cleanup_dirty_bgs(), the pages array points to pages that were already released by us at __btrfs_write_out_cache() through the call to io_ctl_drop_pages(). We end up freeing the pages array only after waiting for the ordered extent to complete through btrfs_wait_cache_io(), which calls io_ctl_free() to do that. But in the transaction abort case we don't wait for the space cache's ordered extent to complete through a call to btrfs_wait_cache_io(), so that's why we end up with a memory leak - we wait for the ordered extent to complete indirectly by shutting down the work queues and waiting for any jobs in them to complete before returning from close_ctree(). We can solve the leak simply by freeing the pages array right after releasing the pages (with the call to io_ctl_drop_pages()) at __btrfs_write_out_cache(), since we will never use it anymore after that and the pages array points to already released pages at that point, which is currently not a problem since no one will use it after that, but not a good practice anyway since it can easily lead to use-after-free issues. So fix this by freeing the pages array right after releasing the pages at __btrfs_write_out_cache(). This issue can often be reproduced with test case generic/475 from fstests and kmemleak can detect it and reports it with the following trace: unreferenced object 0xffff9bbf009fa600 (size 512): comm "fsstress", pid 38807, jiffies 4298504428 (age 22.028s) hex dump (first 32 bytes): 00 a0 7c 4d 3d ed ff ff 40 a0 7c 4d 3d ed ff ff ..|M=...@.|M=... 80 a0 7c 4d 3d ed ff ff c0 a0 7c 4d 3d ed ff ff ..|M=.....|M=... backtrace: [<00000000f4b5cfe2>] __kmalloc+0x1a8/0x3e0 [<0000000028665e7f>] io_ctl_init+0xa7/0x120 [btrfs] [<00000000a1f95b2d>] __btrfs_write_out_cache+0x86/0x4a0 [btrfs] [<00000000207ea1b0>] btrfs_write_out_cache+0x7f/0xf0 [btrfs] [<00000000af21f534>] btrfs_start_dirty_block_groups+0x27b/0x580 [btrfs] [<00000000c3c23d44>] btrfs_commit_transaction+0xa6f/0xe70 [btrfs] [<000000009588930c>] create_subvol+0x581/0x9a0 [btrfs] [<000000009ef2fd7f>] btrfs_mksubvol+0x3fb/0x4a0 [btrfs] [<00000000474e5187>] __btrfs_ioctl_snap_create+0x119/0x1a0 [btrfs] [<00000000708ee349>] btrfs_ioctl_snap_create_v2+0xb0/0xf0 [btrfs] [<00000000ea60106f>] btrfs_ioctl+0x12c/0x3130 [btrfs] [<000000005c923d6d>] __x64_sys_ioctl+0x83/0xb0 [<0000000043ace2c9>] do_syscall_64+0x33/0x80 [<00000000904efbce>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 CC: stable@vger.kernel.org # 4.9+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 604997b4a3803f33e70799b2696bd3dbfed7276c Author: David Sterba Date: Mon Jul 27 17:38:19 2020 +0200 btrfs: use the correct const function attribute for btrfs_get_num_csums The build robot reports compiler: h8300-linux-gcc (GCC) 9.3.0 In file included from fs/btrfs/tests/extent-map-tests.c:8: >> fs/btrfs/tests/../ctree.h:2166:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 2166 | size_t __const btrfs_get_num_csums(void); | ^~~~~~~ The function attribute for const does not follow the expected scheme and in this case is confused with a const type qualifier. Reported-by: kernel test robot Signed-off-by: David Sterba commit 282dd7d7718444679b046b769d872b188818ca35 Author: Marcos Paulo de Souza Date: Mon Aug 3 16:55:01 2020 -0300 btrfs: reset compression level for lzo on remount Currently a user can set mount "-o compress" which will set the compression algorithm to zlib, and use the default compress level for zlib (3): relatime,compress=zlib:3,space_cache If the user remounts the fs using "-o compress=lzo", then the old compress_level is used: relatime,compress=lzo:3,space_cache But lzo does not expose any tunable compression level. The same happens if we set any compress argument with different level, also with zstd. Fix this by resetting the compress_level when compress=lzo is specified. With the fix applied, lzo is shown without compress level: relatime,compress=lzo,space_cache CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Marcos Paulo de Souza Reviewed-by: David Sterba Signed-off-by: David Sterba commit c965d6402f24adcd3d4d0dd9b1f30a0578b6255c Author: Johannes Thumshirn Date: Tue Jul 28 20:25:41 2020 +0900 btrfs: handle errors from async submission Btrfs' async submit mechanism is able to handle errors in the submission path and the meta-data async submit function correctly passes the error code to the caller. In btrfs_submit_bio_start() and btrfs_submit_bio_start_direct_io() we're not handling the errors returned by btrfs_csum_one_bio() correctly though and simply call BUG_ON(). This is unnecessary as the caller of these two functions - run_one_async_start - correctly checks for the return values and sets the status of the async_submit_bio. The actual bio submission will be handled later on by run_one_async_done only if async_submit_bio::status is 0, so the data won't be written if we encountered an error in the checksum process. Simply return the error from btrfs_csum_one_bio() to the async submitters, like it's done in btree_submit_bio_start(). Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit d3f99f9183068efb5b931e50e298bad40285f938 Author: Tony Lindgren Date: Wed Aug 19 12:24:45 2020 +0300 gpio: omap: Fix warnings if PM is disabled Fix warnings for omap_gpio_resume and omap_gpio_suspend defined but not used when PM is disabled as noticed when doing make randconfig builds. Fixes: f02a03985d06 ("gpio: omap: Add missing PM ops for suspend") Cc: Arnd Bergmann Signed-off-by: Tony Lindgren Acked-by: Grygorii Strashko Signed-off-by: Bartosz Golaszewski commit 27bc446e2def38db3244a6eb4bb1d6312936610a Author: brookxu Date: Mon Aug 17 15:36:15 2020 +0800 ext4: limit the length of per-inode prealloc list In the scenario of writing sparse files, the per-inode prealloc list may be very long, resulting in high overhead for ext4_mb_use_preallocated(). To circumvent this problem, we limit the maximum length of per-inode prealloc list to 512 and allow users to modify it. After patching, we observed that the sys ratio of cpu has dropped, and the system throughput has increased significantly. We created a process to write the sparse file, and the running time of the process on the fixed kernel was significantly reduced, as follows: Running time on unfixed kernel: [root@TENCENT64 ~]# time taskset 0x01 ./sparse /data1/sparce.dat real 0m2.051s user 0m0.008s sys 0m2.026s Running time on fixed kernel: [root@TENCENT64 ~]# time taskset 0x01 ./sparse /data1/sparce.dat real 0m0.471s user 0m0.004s sys 0m0.395s Signed-off-by: Chunguang Xu Link: https://lore.kernel.org/r/d7a98178-056b-6db5-6bce-4ead23f4a257@gmail.com Signed-off-by: Theodore Ts'o commit 66d5e0277e225cdc5d272fc22b1aa90a9b0d21ac Author: brookxu Date: Mon Aug 17 15:36:06 2020 +0800 ext4: reorganize if statement of ext4_mb_release_context() Reorganize the if statement of ext4_mb_release_context(), make it easier to read. Signed-off-by: Chunguang Xu Link: https://lore.kernel.org/r/5439ac6f-db79-ad68-76c1-a4dda9aa0cc3@gmail.com Reviewed-by: Ritesh Harjani Signed-off-by: Theodore Ts'o commit c55ee7d202857b000531c2acfe8ce7cba5b77b5c Author: brookxu Date: Sat Aug 15 08:10:44 2020 +0800 ext4: add mb_debug logging when there are lost chunks Lost chunks are when some other process raced with the current thread to grab a particular block allocation. Add mb_debug log for developers who wants to see how often this is happening for a particular workload. Signed-off-by: Chunguang Xu Link: https://lore.kernel.org/r/0a165ac0-1912-aebd-8a0d-b42e7cd1aea1@gmail.com Signed-off-by: Theodore Ts'o commit 7ca4fcba92edf82b05533a6e4f6b19a5fbec6f54 Author: kyoungho koo Date: Sat Apr 25 02:16:24 2020 +0900 ext4: Fix comment typo "the the". I have found double typed comments "the the". So i modified it to one "the" Signed-off-by: kyoungho koo Link: https://lore.kernel.org/r/20200424171620.GA11943@koo-Z370-HD3 Signed-off-by: Theodore Ts'o commit 00a3fff0712cd9cc4112ecf6da0916f8503e2a86 Author: Shijie Luo Date: Mon Aug 10 22:21:28 2020 -0400 jbd2: clean up checksum verification in do_one_pass() Remove the unnecessary chksum_err and checksum_seen variables as well as some redundant code to make the function easier to understand. [ With changes suggested by jack@ and tytso@ ] Signed-off-by: Shijie Luo Signed-off-by: Theodore Ts'o Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200819122955.33526-1-luoshijie1@huawei.com Signed-off-by: Theodore Ts'o commit b90b925fd52c75ee7531df739d850a1f7c58ef06 Author: Sameer Pujar Date: Wed Aug 19 21:02:10 2020 +0530 ALSA: hda: avoid reset of sdo_limit By default 'sdo_limit' is initialized with a default value of '8' as per spec. This is overridden in cases where a different value is required. However this is getting reset when snd_hdac_bus_init_chip() is called again, which happens during runtime PM cycle. Avoid this reset by moving 'sdo_limit' setup to 'snd_hdac_bus_init()' function which would be called only once. Fixes: 67ae482a59e9 ("ALSA: hda: add member to store ratio for stripe control") Cc: Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1597851130-6765-1-git-send-email-spujar@nvidia.com Signed-off-by: Takashi Iwai commit 4a4064ad79699ee41b74c12fa4f9f960a5bf9b2d Author: Imre Deak Date: Tue Jul 21 02:29:52 2020 +0300 drm/i915/tgl: Make sure TC-cold is blocked before enabling TC AUX power wells The dependency between power wells is determined by the ordering of the power well list: when enabling the power wells for a domain, this happens walking the power well list forward, while disabling them happens in the reverse direction. Accordingly a power well on the list must follow any other power well it depends on. Since the TC AUX power wells depend on TC-cold being blocked, move the TC-cold off power well before all AUX power wells. Fixes: 3c02934b24e3 ("drm/i915/tc/tgl: Implement TC cold sequences") Cc: José Roberto de Souza Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200720232952.16228-1-imre.deak@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit b302a2e68807604af2a5015816c1d117747989b6) Signed-off-by: Jani Nikula commit c43a87f537d19499e51a6f013331f196d8f0ddbe Author: George Spelvin Date: Wed Mar 25 19:24:29 2020 +0000 drm/i915/selftests: Avoid passing a random 0 into ilog2 igt_mm_config() calls ilog2() on the (pseudo)random 21-bit number s>>12. Once in 2 million seeds, this is zero and ilog2 summons the nasal demons. There was an attempt to handle this case with a max(), but that's too late; ms could already be something bizarre. Given that the low 12 bits of s and ms are always zero, it's a lot simpler just to divide them by 4096, then everything fits into 32 bits, and we can easily generate a random number 1 <= s <= 0x1fffff. Fixes: 14d1b9a6247c ("drm/i915: buddy allocator") Signed-off-by: George Spelvin Cc: Matthew Auld Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Matthew Auld Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200325192429.GA8865@SDF.ORG Signed-off-by: Rodrigo Vivi (cherry picked from commit 21118e8e56479ef33460fbd63a5ad0535843b666) Signed-off-by: Jani Nikula commit c67f0c28311c44597ecd8e14d152d1775c367cdf Author: Tianjia Zhang Date: Sun Aug 2 19:15:35 2020 +0800 drm/i915: Fix wrong return value in intel_atomic_check() In the case of calling check_digital_port_conflicts() failed, a negative error code -EINVAL should be returned. Fixes: bf5da83e4bd80 ("drm/i915: Move check_digital_port_conflicts() earier") Cc: Ville Syrjälä Signed-off-by: Tianjia Zhang Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200802111535.5200-1-tianjia.zhang@linux.alibaba.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 66b51b801d05ee54a0f23628cb8220189adb715e) Signed-off-by: Jani Nikula commit 5fd73c53701327e725cd4ca70decb5c9a61f3bac Author: Matt Roper Date: Fri Jun 12 13:47:34 2020 -0700 drm/i915: Update bw_buddy pagemask table A recent bspec update removed the LPDDR4 single channel entry from the buddy register table, but added a new four-channel entry. Workaround 1409767108 hasn't been updated with any guidance for four channel configurations, so we leave that alternate table unchanged for now. Bspec 49218 Fixes: 3fa01d642fa7 ("drm/i915/tgl: Program BW_BUDDY registers during display init") Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200612204734.3674650-1-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi Signed-off-by: Rodrigo Vivi (cherry picked from commit ecb40d0826fda213ebb58d49e7d5b4752480e130) Signed-off-by: Jani Nikula commit b7c664611789a96dd0bb32e0fd3e9bb405ba1179 Author: Chris Wilson Date: Wed Jul 29 14:09:12 2020 +0100 drm/i915/display: Check for an LPSP encoder before dereferencing Avoid a GPF at <1>[ 20.177320] BUG: kernel NULL pointer dereference, address: 000000000000007c <1>[ 20.177322] #PF: supervisor read access in kernel mode <1>[ 20.177323] #PF: error_code(0x0000) - not-present page <6>[ 20.177324] PGD 0 P4D 0 <4>[ 20.177327] Oops: 0000 [#1] PREEMPT SMP PTI <4>[ 20.177328] CPU: 1 PID: 944 Comm: debugfs_test Not tainted 5.8.0-rc7-CI-CI_DRM_8814+ #1 <4>[ 20.177330] Hardware name: Dell Inc. XPS 13 9360/0823VW, BIOS 2.9.0 07/09/2018 <4>[ 20.177372] RIP: 0010:i915_lpsp_capability_show+0x44/0xc0 [i915] <4>[ 20.177374] Code: 0f b6 81 ca 0d 00 00 3c 0b 74 77 76 19 3c 0c 75 44 83 7e 7c 01 7e 2f 48 c7 c6 d7 b9 47 a0 e8 43 df 06 e1 31 c0 c3 3c 09 72 2b <8b> 46 7c 85 c0 75 e6 8b 82 e4 00 00 00 89 c2 83 e2 fb 83 fa 0a 74 <4>[ 20.177376] RSP: 0018:ffffc90000cebe38 EFLAGS: 00010246 <4>[ 20.177377] RAX: 0000000000000009 RBX: ffff888267fe6a58 RCX: ffff888252d10000 <4>[ 20.177378] RDX: ffff88824a9a4000 RSI: 0000000000000000 RDI: ffff888267fe6a30 <4>[ 20.177379] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001 <4>[ 20.177380] R10: 0000000000000001 R11: 0000000000000000 R12: ffffc90000cebf08 <4>[ 20.177381] R13: 00000000ffffffff R14: 0000000000000001 R15: ffff888267fe6a30 <4>[ 20.177383] FS: 00007f6f9c6b5e40(0000) GS:ffff888276480000(0000) knlGS:0000000000000000 <4>[ 20.177384] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4>[ 20.177385] CR2: 000000000000007c CR3: 0000000255f04006 CR4: 00000000003606e0 <4>[ 20.177386] Call Trace: <4>[ 20.177390] seq_read+0xcb/0x420 which is presumably from having no encoder attached at that time. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2175 Fixes: 8806211fe7b3 ("drm/i915: Add i915_lpsp_capability debugfs") Signed-off-by: Chris Wilson Cc: Animesh Manna Cc: Anshuman Gupta Cc: Uma Shankar Cc: "Ville Syrjälä" Reviewed-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20200729130912.30093-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi (cherry picked from commit a22b1a9bb0d72a58d5b836653f28d97ee8fea1c4) Signed-off-by: Jani Nikula commit c499f6cb5ea4708c0c3d76a3c49917f8d905f4d4 Author: Chris Wilson Date: Tue Jul 28 16:06:00 2020 +0100 drm/i915: Copy default modparams to mock i915_device Since we use the module parameters stored inside the drm_i915_device itself, we need to ensure the mock i915_device also sets up the right defaults. Fixes: 8a25c4be583d ("drm/i915/params: switch to device specific parameters") Signed-off-by: Chris Wilson Cc: Jani Nikula Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200728150600.4509-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi (cherry picked from commit 98ef067453709444a264939940f7b3a5dfdfa09e) Signed-off-by: Jani Nikula commit df3ab3cb7eae63c6eb7c9aebcc196a75d59f65dd Author: Chris Wilson Date: Thu Jul 16 10:46:43 2020 +0100 drm/i915: Provide the perf pmu.module Rather than manually implement our own module reference counting for perf pmu events, finally realise that there is a module parameter to struct pmu for this very purpose. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: stable@vger.kernel.org Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200716094643.31410-1-chris@chris-wilson.co.uk Signed-off-by: Rodrigo Vivi (cherry picked from commit 27e897beec1c59861f15d4d3562c39ad1143620f) Signed-off-by: Jani Nikula commit 9a469bc9f32dd33c7aac5744669d21a023a719cd Author: Thinh Nguyen Date: Tue Aug 18 19:27:47 2020 -0700 usb: uas: Add quirk for PNY Pro Elite PNY Pro Elite USB 3.1 Gen 2 device (SSD) doesn't respond to ATA_12 pass-through command (i.e. it just hangs). If it doesn't support this command, it should respond properly to the host. Let's just add a quirk to be able to move forward with other operations. Cc: stable@vger.kernel.org Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/2b0585228b003eedcc82db84697b31477df152e0.1597803605.git.thinhn@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 9ca325ffcac46ff1afe72cc3adfb96a848e26425 Author: Heikki Krogerus Date: Wed Aug 19 10:17:33 2020 +0300 tools: usb: move to tools buildsystem Converting the Makefile to use the new tools buildsystem. Signed-off-by: Heikki Krogerus [fixes builds with O=...] Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200819071733.60028-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ab565f7eb19340af7f33d010ce95a98a1ef3babf Merge: d5643d2249b27 bc9a2e226ea95 Author: Greg Kroah-Hartman Date: Wed Aug 19 14:09:37 2020 +0200 Merge tag 'fixes-for-v5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: USB: fixes for v5.9-rc Three ZLP fixes on dwc3 and a resource leak fix on the TCM gadget Signed-off-by: Felipe Balbi * tag 'fixes-for-v5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: usb: dwc3: gadget: Handle ZLP for sg requests usb: dwc3: gadget: Fix handling ZLP usb: dwc3: gadget: Don't setup more than requested usb: gadget: f_tcm: Fix some resource leaks in some error paths commit 5610921a4435ef45c33702073e64f835f3dca7f1 Author: Mateusz Gorski Date: Wed Jul 22 19:35:24 2020 +0200 ASoC: Intel: skl_hda_dsp_generic: Fix NULLptr dereference in autosuspend delay Different modules for HDMI codec are used depending on the "hda_codec_use_common_hdmi" option being enabled or not. Driver private context for both of them is different. This leads to null-pointer dereference error when driver tries to set autosuspend delay for HDMI codec while the option is off (hdac_hdmi module is used for HDMI). Change the string in conditional statement to "ehdaudio0D0" to ensure that only the HDAudio codec is handled by this function. Fixes: 5bf73b1b1dec ("ASoC: intel/skl/hda - fix oops on systems without i915 audio codec") Signed-off-by: Mateusz Gorski Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200722173524.30161-1-mateusz.gorski@linux.intel.com Signed-off-by: Mark Brown commit e9e3086b3d791532be1ee8dc7412bfc1596e6871 Merge: 9123e3a74ec7b 9e7c0efadb86d Author: Jani Nikula Date: Wed Aug 19 13:03:53 2020 +0300 Merge tag 'gvt-next-fixes-2020-08-05' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-next-fixes-2020-08-05 - Fix guest suspend/resume low performance handling of shadow ppgtt (Colin) - Fix PV notifier handling for guest suspend/resume (Colin) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20200805080207.GY27035@zhen-hp.sh.intel.com commit f8d0168e035f6359275efcfd1ad014c80e5adaa9 Author: Pierre-Louis Bossart Date: Tue Aug 18 06:09:33 2020 +0800 soundwire: bus: fix typo in comment on INTSTAT registers s/Instat/Intstat/ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200817220933.17492-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e17f02d0559c174cf1f6435e45134490111eaa37 Author: Mike Pozulp Date: Tue Aug 18 09:54:44 2020 -0700 ALSA: hda/realtek: Add quirk for Samsung Galaxy Book Ion The Galaxy Book Ion uses the same ALC298 codec as other Samsung laptops which have the no headphone sound bug, like my Samsung Notebook. The Galaxy Book owner confirmed that this patch fixes the bug. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423 Signed-off-by: Mike Pozulp Cc: Link: https://lore.kernel.org/r/20200818165446.499821-1-pozulp.kernel@gmail.com Signed-off-by: Takashi Iwai commit 9e9671602644b8e4d82be1011819077f51741053 Merge: d8d0db7bb358e 062fa09f44f4f Author: Takashi Iwai Date: Wed Aug 19 08:03:04 2020 +0200 Merge tag 'asoc-fix-v5.9-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.9 A bunch of fixes that came in during the merge window, mostly for issues that were uncovered by the changes to report errors on invalid register access plus one important fix in that code itself. commit 6542e2b613c2b1952e83973dc434831332ce8e27 Author: David Shah Date: Tue Aug 18 10:51:00 2020 +0100 ARM: dts: omap5: Fix DSI base address and clocks DSI was not probing due to base address off by 0x1000, and sys_clk missing. With this patch, the Pyra display works if HDMI is disabled in the device tree. Fixes: 5a507162f096 ("ARM: dts: Configure interconnect target module for omap5 dsi1") Signed-off-by: David Shah Tested-by: H. Nikolaus Schaller [tony@atomide.com: standardized subject line, added fixes tag] Signed-off-by: Tony Lindgren commit e097eb7473d9e70da9e03276f61cd392ccb9d79f Author: Yu Kuai Date: Mon Aug 17 19:57:28 2020 +0800 dmaengine: at_hdmac: add missing kfree() call in at_dma_xlate() If memory allocation for 'atslave' succeed, at_dma_xlate() doesn't have a corresponding kfree() in exception handling. Thus add kfree() for this function implementation. Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20200817115728.1706719-4-yukuai3@huawei.com Signed-off-by: Vinod Koul commit 3832b78b3ec2cf51e07102f9b4480e343459b20f Author: Yu Kuai Date: Mon Aug 17 19:57:27 2020 +0800 dmaengine: at_hdmac: add missing put_device() call in at_dma_xlate() If of_find_device_by_node() succeed, at_dma_xlate() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20200817115728.1706719-3-yukuai3@huawei.com Signed-off-by: Vinod Koul commit 0cef8e2c5a07d482ec907249dbd6687e8697677f Author: Yu Kuai Date: Mon Aug 17 19:57:26 2020 +0800 dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate() The reurn value of of_find_device_by_node() is not checked, thus null pointer dereference will be triggered if of_find_device_by_node() failed. Fixes: bbe89c8e3d59 ("at_hdmac: move to generic DMA binding") Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20200817115728.1706719-2-yukuai3@huawei.com Signed-off-by: Vinod Koul commit 485d41b092c8643a1e78556a7cda33e958407a30 Merge: f2ea2578df8e6 f41ed88cbd6f0 Author: Dave Airlie Date: Wed Aug 19 13:56:27 2020 +1000 Merge tag 'amd-drm-fixes-5.9-2020-08-12' of git://people.freedesktop.org/~agd5f/linux into drm-fixes amd-drm-fixes-5.9-2020-08-12: amdgpu: - Fix allocation size - SR-IOV fixes - Vega20 SMU feature state caching fix - Fix custom pptable handling - Arcturus golden settings update - Several display fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200813033610.4008-1-alexander.deucher@amd.com commit f2ea2578df8e67d763156a0bf0d06b1c81ef0985 Merge: 9123e3a74ec7b 836b194d65782 Author: Dave Airlie Date: Wed Aug 19 13:54:22 2020 +1000 Merge tag 'drm-misc-fixes-2020-08-12' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v5.9-rc1: - Add missing dma_fence_put() in virtio_gpu_execbuffer_ioctl(). - Fix memory leak in virtio_gpu_cleanup_object(). Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/d50eb2e0-75c8-b724-006f-5e7b391961ff@linux.intel.com commit e9c006bc782c488f485ffe50de20b44e1e3daa18 Author: Nathan Chancellor Date: Sun Aug 9 21:40:20 2020 -0700 clk: rockchip: Fix initialization of mux_pll_src_4plls_p A new warning in Clang points out that the initialization of mux_pll_src_4plls_p appears incorrect: ../drivers/clk/rockchip/clk-rk3228.c:140:58: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation] PNAME(mux_pll_src_4plls_p) = { "cpll", "gpll", "hdmiphy" "usb480m" }; ^ , ../drivers/clk/rockchip/clk-rk3228.c:140:48: note: place parentheses around the string literal to silence warning PNAME(mux_pll_src_4plls_p) = { "cpll", "gpll", "hdmiphy" "usb480m" }; ^ 1 warning generated. Given the name of the variable and the same variable name in rv1108, it seems that this should have been four distinct elements. Fix it up by adding the comma as suggested. Fixes: 307a2e9ac524 ("clk: rockchip: add clock controller for rk3228") Link: https://github.com/ClangBuiltLinux/linux/issues/1123 Signed-off-by: Nathan Chancellor Link: https://lore.kernel.org/r/20200810044020.2063350-1-natechancellor@gmail.com Reviewed-by: Heiko Stübner Signed-off-by: Stephen Boyd commit 3dabfa2bda48dab717986609762ce2a49335eb99 Author: Christophe JAILLET Date: Sun Aug 9 16:49:59 2020 +0200 clk: davinci: Use the correct size when allocating memory 'sizeof(*pllen)' should be used in place of 'sizeof(*pllout)' to avoid a small over-allocation. Fixes: 2d1726915159 ("clk: davinci: New driver for davinci PLL clocks") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20200809144959.747986-1-christophe.jaillet@wanadoo.fr Reviewed-by: David Lechner Signed-off-by: Stephen Boyd commit 00fa1d83a8b50351c830521d00135e823c46e7d0 Author: Yonghong Song Date: Tue Aug 18 15:23:12 2020 -0700 bpftool: Handle EAGAIN error code properly in pids collection When the error code is EAGAIN, the kernel signals the user space should retry the read() operation for bpf iterators. Let us do it. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200818222312.2181675-1-yhs@fb.com commit e60572b8d4c39572be6857d1ec91fdf979f8775f Author: Yonghong Song Date: Tue Aug 18 15:23:10 2020 -0700 bpf: Avoid visit same object multiple times Currently when traversing all tasks, the next tid is always increased by one. This may result in visiting the same task multiple times in a pid namespace. This patch fixed the issue by seting the next tid as pid_nr_ns(pid, ns) + 1, similar to funciton next_tgid(). Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Cc: Rik van Riel Link: https://lore.kernel.org/bpf/20200818222310.2181500-1-yhs@fb.com commit e679654a704e5bd676ea6446fa7b764cbabf168a Author: Yonghong Song Date: Tue Aug 18 15:23:09 2020 -0700 bpf: Fix a rcu_sched stall issue with bpf task/task_file iterator In our production system, we observed rcu stalls when 'bpftool prog` is running. rcu: INFO: rcu_sched self-detected stall on CPU rcu: \x097-....: (20999 ticks this GP) idle=302/1/0x4000000000000000 softirq=1508852/1508852 fqs=4913 \x09(t=21031 jiffies g=2534773 q=179750) NMI backtrace for cpu 7 CPU: 7 PID: 184195 Comm: bpftool Kdump: loaded Tainted: G W 5.8.0-00004-g68bfc7f8c1b4 #6 Hardware name: Quanta Twin Lakes MP/Twin Lakes Passive MP, BIOS F09_3A17 05/03/2019 Call Trace: dump_stack+0x57/0x70 nmi_cpu_backtrace.cold+0x14/0x53 ? lapic_can_unplug_cpu.cold+0x39/0x39 nmi_trigger_cpumask_backtrace+0xb7/0xc7 rcu_dump_cpu_stacks+0xa2/0xd0 rcu_sched_clock_irq.cold+0x1ff/0x3d9 ? tick_nohz_handler+0x100/0x100 update_process_times+0x5b/0x90 tick_sched_timer+0x5e/0xf0 __hrtimer_run_queues+0x12a/0x2a0 hrtimer_interrupt+0x10e/0x280 __sysvec_apic_timer_interrupt+0x51/0xe0 asm_call_on_stack+0xf/0x20 sysvec_apic_timer_interrupt+0x6f/0x80 asm_sysvec_apic_timer_interrupt+0x12/0x20 RIP: 0010:task_file_seq_get_next+0x71/0x220 Code: 00 00 8b 53 1c 49 8b 7d 00 89 d6 48 8b 47 20 44 8b 18 41 39 d3 76 75 48 8b 4f 20 8b 01 39 d0 76 61 41 89 d1 49 39 c1 48 19 c0 <48> 8b 49 08 21 d0 48 8d 04 c1 4c 8b 08 4d 85 c9 74 46 49 8b 41 38 RSP: 0018:ffffc90006223e10 EFLAGS: 00000297 RAX: ffffffffffffffff RBX: ffff888f0d172388 RCX: ffff888c8c07c1c0 RDX: 00000000000f017b RSI: 00000000000f017b RDI: ffff888c254702c0 RBP: ffffc90006223e68 R08: ffff888be2a1c140 R09: 00000000000f017b R10: 0000000000000002 R11: 0000000000100000 R12: ffff888f23c24118 R13: ffffc90006223e60 R14: ffffffff828509a0 R15: 00000000ffffffff task_file_seq_next+0x52/0xa0 bpf_seq_read+0xb9/0x320 vfs_read+0x9d/0x180 ksys_read+0x5f/0xe0 do_syscall_64+0x38/0x60 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f8815f4f76e Code: c0 e9 f6 fe ff ff 55 48 8d 3d 76 70 0a 00 48 89 e5 e8 36 06 02 00 66 0f 1f 44 00 00 64 8b 04 25 18 00 00 00 85 c0 75 14 0f 05 <48> 3d 00 f0 ff ff 77 52 c3 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 RSP: 002b:00007fff8f9df578 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 000000000170b9c0 RCX: 00007f8815f4f76e RDX: 0000000000001000 RSI: 00007fff8f9df5b0 RDI: 0000000000000007 RBP: 00007fff8f9e05f0 R08: 0000000000000049 R09: 0000000000000010 R10: 00007f881601fa40 R11: 0000000000000246 R12: 00007fff8f9e05a8 R13: 00007fff8f9e05a8 R14: 0000000001917f90 R15: 000000000000e22e Note that `bpftool prog` actually calls a task_file bpf iterator program to establish an association between prog/map/link/btf anon files and processes. In the case where the above rcu stall occured, we had a process having 1587 tasks and each task having roughly 81305 files. This implied 129 million bpf prog invocations. Unfortunwtely none of these files are prog/map/link/btf files so bpf iterator/prog needs to traverse all these files and not able to return to user space since there are no seq_file buffer overflow. This patch fixed the issue in bpf_seq_read() to limit the number of visited objects. If the maximum number of visited objects is reached, no more objects will be visited in the current syscall. If there is nothing written in the seq_file buffer, -EAGAIN will return to the user so user can try again. The maximum number of visited objects is set at 1 million. In our Intel Xeon D-2191 2.3GHZ 18-core server, bpf_seq_read() visiting 1 million files takes around 0.18 seconds. We did not use cond_resched() since for some iterators, e.g., netlink iterator, where rcu read_lock critical section spans between consecutive seq_ops->next(), which makes impossible to do cond_resched() in the key while loop of function bpf_seq_read(). Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Cc: Paul E. McKenney Link: https://lore.kernel.org/bpf/20200818222309.2181348-1-yhs@fb.com commit ad6641189c5935192a15eeb4b369dd04ebedfabb Author: Colin Ian King Date: Mon Aug 17 23:44:25 2020 +0100 net: ipv4: remove duplicate "the the" phrase in Kconfig text The Kconfig help text contains the phrase "the the" in the help text. Fix this and reformat the block of help text. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 17340552ce449ab55e3ccbfc2af1bcc600b4fbb5 Author: Colin Ian King Date: Mon Aug 17 23:40:42 2020 +0100 net: mscc: ocelot: remove duplicate "the the" phrase in Kconfig text The Kconfig help text contains the phrase "the the" in the help text. Fix this. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 0df55a03369636c609c4e925f0331ebcf45a9a26 Merge: 4ef1a7cb08e94 f01204ec8be7e Author: David S. Miller Date: Tue Aug 18 16:00:24 2020 -0700 Merge branch 'ethtool-netlink-bug-fixes' Maxim Mikityanskiy says: ==================== ethtool-netlink bug fixes This series contains a few bug fixes for ethtool-netlink. These bugs are specific for the netlink interface, and the legacy ioctl interface is not affected. These patches aim to have the same behavior in ethtool-netlink as in the legacy ethtool. Please also see the sibling series for the userspace tool. v2 changes: Added Fixes tags. ==================== Signed-off-by: David S. Miller commit f01204ec8be7ea5e8f0230a7d4200e338d563bde Author: Maxim Mikityanskiy Date: Mon Aug 17 16:34:07 2020 +0300 ethtool: Don't omit the netlink reply if no features were changed The legacy ethtool userspace tool shows an error when no features could be changed. It's useful to have a netlink reply to be able to show this error when __netdev_update_features wasn't called, for example: 1. ethtool -k eth0 large-receive-offload: off 2. ethtool -K eth0 rx-fcs on 3. ethtool -K eth0 lro on Could not change any device features rx-lro: off [requested on] 4. ethtool -K eth0 lro on # The output should be the same, but without this patch the kernel # doesn't send the reply, and ethtool is unable to detect the error. This commit makes ethtool-netlink always return a reply when requested, and it still avoids unnecessary calls to __netdev_update_features if the wanted features haven't changed. Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller commit 2847bfed888fbb8bf4c8e8067fd6127538c2c700 Author: Maxim Mikityanskiy Date: Mon Aug 17 16:34:06 2020 +0300 ethtool: Account for hw_features in netlink interface ethtool-netlink ignores dev->hw_features and may confuse the drivers by asking them to enable features not in the hw_features bitmask. For example: 1. ethtool -k eth0 tls-hw-tx-offload: off [fixed] 2. ethtool -K eth0 tls-hw-tx-offload on tls-hw-tx-offload: on 3. ethtool -k eth0 tls-hw-tx-offload: on [fixed] Fitler out dev->hw_features from req_wanted to fix it and to resemble the legacy ethtool behavior. Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller commit 840110a4eae190dcbb9907d68216d5d1d9f25839 Author: Maxim Mikityanskiy Date: Mon Aug 17 16:34:05 2020 +0300 ethtool: Fix preserving of wanted feature bits in netlink interface Currently, ethtool-netlink calculates new wanted bits as: (req_wanted & req_mask) | (old_active & ~req_mask) It completely discards the old wanted bits, so they are forgotten with the next ethtool command. Sample steps to reproduce: 1. ethtool -k eth0 tx-tcp-segmentation: on # TSO is on from the beginning 2. ethtool -K eth0 tx off tx-tcp-segmentation: off [not requested] 3. ethtool -k eth0 tx-tcp-segmentation: off [requested on] 4. ethtool -K eth0 rx off # Some change unrelated to TSO 5. ethtool -k eth0 tx-tcp-segmentation: off # "Wanted on" is forgotten This commit fixes it by changing the formula to: (req_wanted & req_mask) | (old_wanted & ~req_mask), where old_active was replaced by old_wanted to account for the wanted bits. The shortcut condition for the case where nothing was changed now compares wanted bitmasks, instead of wanted to active. Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller commit 4ef1a7cb08e94da1f2f2a34ee6cefe7ae142dc98 Author: Xin Long Date: Mon Aug 17 14:30:49 2020 +0800 ipv6: some fixes for ipv6_dev_find() This patch is to do 3 things for ipv6_dev_find(): As David A. noticed, - rt6_lookup() is not really needed. Different from __ip_dev_find(), ipv6_dev_find() doesn't have a compatibility problem, so remove it. As Hideaki suggested, - "valid" (non-tentative) check for the address is also needed. ipv6_chk_addr() calls ipv6_chk_addr_and_flags(), which will traverse the address hash list, but it's heavy to be called inside ipv6_dev_find(). This patch is to reuse the code of ipv6_chk_addr_and_flags() for ipv6_dev_find(). - dev parameter is passed into ipv6_dev_find(), as link-local addresses from user space has sin6_scope_id set and the dev lookup needs it. Fixes: 81f6cb31222d ("ipv6: add ipv6_dev_find()") Suggested-by: YOSHIFUJI Hideaki Reported-by: David Ahern Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 0410d07190961ac526f05085765a8d04d926545b Author: Jiri Wiesner Date: Sun Aug 16 20:52:44 2020 +0200 bonding: fix active-backup failover for current ARP slave When the ARP monitor is used for link detection, ARP replies are validated for all slaves (arp_validate=3) and fail_over_mac is set to active, two slaves of an active-backup bond may get stuck in a state where both of them are active and pass packets that they receive to the bond. This state makes IPv6 duplicate address detection fail. The state is reached thus: 1. The current active slave goes down because the ARP target is not reachable. 2. The current ARP slave is chosen and made active. 3. A new slave is enslaved. This new slave becomes the current active slave and can reach the ARP target. As a result, the current ARP slave stays active after the enslave action has finished and the log is littered with "PROBE BAD" messages: > bond0: PROBE: c_arp ens10 && cas ens11 BAD The workaround is to remove the slave with "going back" status from the bond and re-enslave it. This issue was encountered when DPDK PMD interfaces were being enslaved to an active-backup bond. I would be possible to fix the issue in bond_enslave() or bond_change_active_slave() but the ARP monitor was fixed instead to keep most of the actions changing the current ARP slave in the ARP monitor code. The current ARP slave is set as inactive and backup during the commit phase. A new state, BOND_LINK_FAIL, has been introduced for slaves in the context of the ARP monitor. This allows administrators to see how slaves are rotated for sending ARP requests and attempts are made to find a new active slave. Fixes: b2220cad583c9 ("bonding: refactor ARP active-backup monitor") Signed-off-by: Jiri Wiesner Signed-off-by: David S. Miller commit eabe861881a733fc84f286f4d5a1ffaddd4f526f Author: Miaohe Lin Date: Sat Aug 15 04:46:41 2020 -0400 net: handle the return value of pskb_carve_frag_list() correctly pskb_carve_frag_list() may return -ENOMEM in pskb_carve_inside_nonlinear(). we should handle this correctly or we would get wrong sk_buff. Fixes: 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function") Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit d2e59d0ff4c44d1f6f8ed884a5bea7d1bb7fd98c Author: Krunoslav Kovac Date: Thu Aug 6 17:54:47 2020 -0400 drm/amd/display: fix pow() crashing when given base 0 [Why&How] pow(a,x) is implemented as exp(x*log(a)). log(0) will crash. So return 0^x = 0, unless x=0, convention seems to be 0^0 = 1. Cc: stable@vger.kernel.org Signed-off-by: Krunoslav Kovac Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit db0473f62438e075b6832fd1490fd06d03c59372 Author: Chris Park Date: Thu Aug 6 15:40:01 2020 -0400 drm/amd/display: Reset scrambling on Test Pattern [Why] Programming is missing the sequence where for eDP the scrambling is reset when testing for eye diagram test pattern. [How] Include the required register in the definition Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5ec37c089e7d02265b4e2ed9529bc7497fc1cf5a Author: Dmytro Laktyushkin Date: Thu Aug 6 13:57:08 2020 -0400 drm/amd/display: fix dcn3 wide timing dsc validation Wide timing DSC requires odm. Since spreadsheet is missing this dsc validation we have to modify DML vba code ourselves. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Wesley Chalmers Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8e80d482608a4e6a97c75272ef8b4bcfc5d0c490 Author: Paul Hsieh Date: Wed Aug 5 17:28:37 2020 +0800 drm/amd/display: Fix DFPstate hang due to view port changed [Why] Place the cursor in the center of screen between two pipes then adjusting the viewport but cursour doesn't update cause DFPstate hang. [How] If viewport changed, update cursor as well. Cc: stable@vger.kernel.org Signed-off-by: Paul Hsieh Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 42f8c416521aced2daba61e42d631cc3be2c452b Author: Chris Park Date: Wed Aug 5 16:59:28 2020 -0400 drm/amd/display: Assign correct left shift [Why] Reading for DP alt registers return incorrect values due to LE_SF definition missing. [How] Define correct LE_SF or DP alt registers. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5dea2142a86d9aafca07f1318851fb729577f03a Author: Chris Park Date: Wed Aug 5 13:46:40 2020 -0400 drm/amd/display: Call DMUB for eDP power control [Why] If DMUB is used, LVTMA VBIOS call can be used to control eDP instead of tranditional transmitter control. Interface is agreed with VBIOS for eDP to use this new path to program LVTMA registers. [How] Create DAL interface to send DMUB command for LVTMA as currently implemented in VBIOS. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 34174b89bfa495bed9cddcc504fb38feca90fab7 Author: Huang Rui Date: Tue Aug 11 13:54:56 2020 +0800 drm/amdkfd: fix the wrong sdma instance query for renoir Renoir only has one sdma instance, it will get failed once query the sdma1 registers. So use switch-case instead of static register array. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0a668aee0ac288cf36a554eb7f270be2ca8ef476 Author: Bhawanpreet Lakha Date: Tue Jul 28 11:35:54 2020 -0400 drm/amdgpu: parse ta firmware for navy_flounder Use the same case as sienna_cichlid Signed-off-by: Bhawanpreet Lakha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 18445bf405cb331117bc98427b1ba6f12418ad17 Merge: 9899b587588fb 8cb61d65b1c8d Author: Linus Torvalds Date: Tue Aug 18 14:27:12 2020 -0700 Merge tag 'spi-fix-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A bunch of fixes that came in for SPI during the merge window. Some from ST and others for their controller, one from Lukas for a race between device addition and controller unregistration and one from fix from Geert for the DT bindings which unbreaks validation" * tag 'spi-fix-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: dt-bindings: lpspi: Add missing boolean type for fsl,spi-only-use-cs1-sel spi: stm32: always perform registers configuration prior to transfer spi: stm32: fixes suspend/resume management spi: stm32: fix stm32_spi_prepare_mbr in case of odd clk_rate spi: stm32: fix fifo threshold level in case of short transfer spi: stm32h7: fix race condition at end of transfer spi: stm32: clear only asserted irq flags on interrupt spi: Prevent adding devices below an unregistering controller commit 8452fd0ce657a4313dfa784f11320971b67727fd Author: Jens Axboe Date: Tue Aug 18 13:58:33 2020 -0700 io_uring: cleanup io_import_iovec() of pre-mapped request io_rw_prep_async() goes through a dance of clearing req->io, calling the iovec import, then re-setting req->io. Provide an internal helper that does the right thing without needing state tweaked to get there. This enables further cleanups in io_read, io_write, and io_resubmit_prep(), but that's left for another time. Signed-off-by: Jens Axboe commit 1a68d96f81b8e7eb2a121fbf9abf9e5974e58832 Author: Guchun Chen Date: Thu Aug 13 14:35:35 2020 +0800 drm/amdgpu: fix NULL pointer access issue when unloading driver When unloading driver by "modprobe -r amdgpu", one NULL pointer dereference bug occurs in ras debugfs releasing. The cause is the duplicated debugfs_remove, as drm debugfs_root dir has been cleaned up already by drm_minor_unregister. BUG: kernel NULL pointer dereference, address: 00000000000000a0 PGD 0 P4D 0 Oops: 0002 [#1] SMP PTI CPU: 11 PID: 1526 Comm: modprobe Tainted: G OE 5.6.0-guchchen #1 Hardware name: System manufacturer System Product Name/TUF Z370-PLUS GAMING II, BIOS 0411 09/21/2018 RIP: 0010:down_write+0x15/0x40 Code: eb de e8 7e 17 72 ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 53 48 89 fb e8 92 d8 ff ff 31 c0 ba 01 00 00 00 48 0f b1 13 75 0f 65 48 8b 04 25 c0 8b 01 00 48 89 43 08 5b c3 RSP: 0018:ffffb1590386fcd0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000000000a0 RCX: 0000000000000000 RDX: 0000000000000001 RSI: ffffffff85b2fcc2 RDI: 00000000000000a0 RBP: ffffb1590386fd30 R08: ffffffff85b2fcc2 R09: 000000000002b3c0 R10: ffff97a330618c40 R11: 00000000000005f6 R12: ffff97a3481beb40 R13: 00000000000000a0 R14: ffff97a3481beb40 R15: 0000000000000000 FS: 00007fb11a717540(0000) GS:ffff97a376cc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00000000000000a0 CR3: 00000004066d6006 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: simple_recursive_removal+0x63/0x370 ? debugfs_remove+0x60/0x60 debugfs_remove+0x40/0x60 amdgpu_ras_fini+0x82/0x230 [amdgpu] ? __kernfs_remove.part.17+0x101/0x1f0 ? kernfs_name_hash+0x12/0x80 amdgpu_device_fini+0x1c0/0x580 [amdgpu] amdgpu_driver_unload_kms+0x3e/0x70 [amdgpu] amdgpu_pci_remove+0x36/0x60 [amdgpu] pci_device_remove+0x3b/0xb0 device_release_driver_internal+0xe5/0x1c0 driver_detach+0x46/0x90 bus_remove_driver+0x58/0xd0 pci_unregister_driver+0x29/0x90 amdgpu_exit+0x11/0x25 [amdgpu] __x64_sys_delete_module+0x13d/0x210 do_syscall_64+0x5f/0x250 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f5261bec20f4ed1795d7873ffcda649db686f195 Author: Kevin Wang Date: Thu Aug 6 23:41:47 2020 +0800 drm/amdgpu: fix uninit-value in arcturus_log_thermal_throttling_event() when function arcturus_get_smu_metrics_data() call failed, it will cause the variable "throttler_status" isn't initialized before use. warning: powerplay/arcturus_ppt.c:2268:24: warning: ‘throttler_status’ may be used uninitialized in this function [-Wmaybe-uninitialized] 2268 | if (throttler_status & logging_label[throttler_idx].feature_mask) { Signed-off-by: Kevin Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9c9b17a7d19a8e21db2e378784fff1128b46c9d3 Author: Jiansong Chen Date: Wed Aug 12 15:57:32 2020 +0800 drm/amdgpu: disable gfxoff for navy_flounder gfxoff is temporarily disabled for navy_flounder, since at present the feature has broken some basic amdgpu test. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 989e4da042ca4a56bbaca9223d1a93639ad11e17 Author: Sumera Priyadarsini Date: Wed Aug 19 00:22:41 2020 +0530 net: gianfar: Add of_node_put() before goto statement Every iteration of for_each_available_child_of_node() decrements reference count of the previous node, however when control is transferred from the middle of the loop, as in the case of a return or break or goto, there is no decrement thus ultimately resulting in a memory leak. Fix a potential memory leak in gianfar.c by inserting of_node_put() before the goto statement. Issue found with Coccinelle. Signed-off-by: Sumera Priyadarsini Signed-off-by: David S. Miller commit 5680790b2d85b9c920ad9f626289ccc2c4fbe244 Merge: ab97a28908bff c650e04898072 Author: David S. Miller Date: Tue Aug 18 13:02:51 2020 -0700 Merge branch 'cxgb4-Fix-ethtool-selftest-flits-calculation' Ganji Aravind says: ==================== cxgb4: Fix ethtool selftest flits calculation Patch 1 will fix work request size calculation for loopback selftest. Patch 2 will fix race between loopback selftest and normal Tx handler. ==================== Signed-off-by: David S. Miller commit c650e04898072e4b579cbf8d9dd5b86bcdbe9b00 Author: Ganji Aravind Date: Tue Aug 18 21:10:58 2020 +0530 cxgb4: Fix race between loopback and normal Tx path Even after Tx queues are marked stopped, there exists a small window where the current packet in the normal Tx path is still being sent out and loopback selftest ends up corrupting the same Tx ring. So, ensure selftest takes the Tx lock to synchronize access the Tx ring. Fixes: 7235ffae3d2c ("cxgb4: add loopback ethtool self-test") Signed-off-by: Ganji Aravind Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 335956421c86f64fd46186d76d3961f6adcff187 Author: Ganji Aravind Date: Tue Aug 18 21:10:57 2020 +0530 cxgb4: Fix work request size calculation for loopback test Work request used for sending loopback packet needs to add the firmware work request only once. So, fix by using correct structure size. Fixes: 7235ffae3d2c ("cxgb4: add loopback ethtool self-test") Signed-off-by: Ganji Aravind Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit ab97a28908bff7ffdadd50da17c2b4d9a4dade86 Merge: 8b61fba503904 e6a43910d55d0 Author: David S. Miller Date: Tue Aug 18 12:49:13 2020 -0700 Merge branch 'sfc-more-EF100-fixes' Edward Cree says: ==================== sfc: more EF100 fixes Fix up some bugs in the initial EF100 submission, and re-fix the hash_valid fix which was incomplete. The reset bugs are currently hard to trigger; they were found with an in-progress patch adding ethtool support, whereby ethtool --reset reliably reproduces them. ==================== Signed-off-by: David S. Miller commit e6a43910d55d09dae65772ad571d4c61e459b17a Author: Edward Cree Date: Tue Aug 18 13:44:50 2020 +0100 sfc: don't free_irq()s if they were never requested If efx_nic_init_interrupt fails, or was never run (e.g. due to an earlier failure in ef100_net_open), freeing irqs in efx_nic_fini_interrupt is not needed and will cause error messages and stack traces. So instead, only do this if efx_nic_init_interrupt successfully completed, as indicated by the new efx->irqs_hooked flag. Fixes: 965b549f3c20 ("sfc_ef100: implement ndo_open/close and EVQ probing") Signed-off-by: Edward Cree Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 788f920a0f137baa4dbc1efdd5039c4a0a01b8d7 Author: Edward Cree Date: Tue Aug 18 13:44:18 2020 +0100 sfc: null out channel->rps_flow_id after freeing it If an ef100_net_open() fails, ef100_net_stop() may be called without channel->rps_flow_id having been written; thus it may hold the address freed by a previous ef100_net_stop()'s call to efx_remove_filters(). This then causes a double-free when efx_remove_filters() is called again, leading to a panic. To prevent this, after freeing it, overwrite it with NULL. Fixes: a9dc3d5612ce ("sfc_ef100: RX filter table management and related gubbins") Signed-off-by: Edward Cree Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 9cbbc451098ec1e9942886023203b2247dec94bd Author: Edward Cree Date: Tue Aug 18 13:43:57 2020 +0100 sfc: take correct lock in ef100_reset() When downing and upping the ef100 filter table, we need to take a write lock on efx->filter_sem, not just a read lock, because we may kfree() the table pointers. Without this, resets cause a WARN_ON from efx_rwsem_assert_write_locked(). Fixes: a9dc3d5612ce ("sfc_ef100: RX filter table management and related gubbins") Signed-off-by: Edward Cree Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit db06ea341fcd1752fbdb58454507faa140e3842f Author: Edward Cree Date: Tue Aug 18 13:43:30 2020 +0100 sfc: really check hash is valid before using it Actually hook up the .rx_buf_hash_valid method in EF100's nic_type. Fixes: 068885434ccb ("sfc: check hash is valid before using it") Reported-by: Martin Habets Signed-off-by: Edward Cree Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 8b61fba503904acae24aeb2bd5569b4d6544d48f Author: Alvin Šipraga Date: Tue Aug 18 10:51:34 2020 +0200 macvlan: validate setting of multiple remote source MAC addresses Remote source MAC addresses can be set on a 'source mode' macvlan interface via the IFLA_MACVLAN_MACADDR_DATA attribute. This commit tightens the validation of these MAC addresses to match the validation already performed when setting or adding a single MAC address via the IFLA_MACVLAN_MACADDR attribute. iproute2 uses IFLA_MACVLAN_MACADDR_DATA for its 'macvlan macaddr set' command, and IFLA_MACVLAN_MACADDR for its 'macvlan macaddr add' command, which demonstrates the inconsistent behaviour that this commit addresses: # ip link add link eth0 name macvlan0 type macvlan mode source # ip link set link dev macvlan0 type macvlan macaddr add 01:00:00:00:00:00 RTNETLINK answers: Cannot assign requested address # ip link set link dev macvlan0 type macvlan macaddr set 01:00:00:00:00:00 # ip -d link show macvlan0 5: macvlan0@eth0: mtu 1500 ... link/ether 2e:ac:fd:2d:69:f8 brd ff:ff:ff:ff:ff:ff promiscuity 0 macvlan mode source remotes (1) 01:00:00:00:00:00 numtxqueues 1 ... With this change, the 'set' command will (rightly) fail in the same way as the 'add' command. Signed-off-by: Alvin Šipraga Signed-off-by: David S. Miller commit 9899b587588fb6ced0597e188e049f1ab92c7003 Merge: b7333b58f358f bd05220c7be33 Author: Linus Torvalds Date: Tue Aug 18 12:05:46 2020 -0700 Merge tag 'fixes-2020-08-18' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull ia64 page table fix from Mike Rapoport: "Fix regression in IA-64 caused by page table allocation refactoring The refactoring and consolidation of caused regression on parisc and ia64. The fix for parisc made it into v5.9-rc1 while the fix ia64 got delayed a bit and here it is" * tag 'fixes-2020-08-18' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: arch/ia64: Restore arch-specific pgd_offset_k implementation commit b7333b58f358f38d90d78e00c1ee5dec82df10ad Author: Yang Shi Date: Fri Aug 14 21:30:41 2020 -0700 mm/memory.c: skip spurious TLB flush for retried page fault Recently we found regression when running will_it_scale/page_fault3 test on ARM64. Over 70% down for the multi processes cases and over 20% down for the multi threads cases. It turns out the regression is caused by commit 89b15332af7c ("mm: drop mmap_sem before calling balance_dirty_pages() in write fault"). The test mmaps a memory size file then write to the mapping, this would make all memory dirty and trigger dirty pages throttle, that upstream commit would release mmap_sem then retry the page fault. The retried page fault would see correct PTEs installed then just fall through to spurious TLB flush. The regression is caused by the excessive spurious TLB flush. It is fine on x86 since x86's spurious TLB flush is no-op. We could just skip the spurious TLB flush to mitigate the regression. Suggested-by: Linus Torvalds Reported-by: Xu Yu Debugged-by: Xu Yu Tested-by: Xu Yu Cc: Johannes Weiner Cc: Catalin Marinas Cc: Will Deacon Cc: Signed-off-by: Yang Shi Signed-off-by: Linus Torvalds commit 70d7ced2ed4dc3f7f21b4f4fec0e5be5c2a5a55c Author: Shijie Luo Date: Mon Aug 10 07:44:35 2020 -0400 ext4: change to use fallthrough macro Change to use fallthrough macro in switch case. Signed-off-by: Shijie Luo Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200810114435.24182-1-luoshijie1@huawei.com Signed-off-by: Theodore Ts'o commit 2fe34d2938181b26f86bceb7b87fbf7370bd92c4 Author: Kyoungho Koo Date: Mon Aug 10 17:07:05 2020 +0900 ext4: remove unused parameter of ext4_generic_delete_entry function The ext4_generic_delete_entry function does not use the parameter handle, so it can be removed. Signed-off-by: Kyoungho Koo Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200810080701.GA14160@koo-Z370-HD3 Signed-off-by: Theodore Ts'o commit e0d438c72abe0cb000d67c0795b0341f9e763836 Author: Xu Wang Date: Mon Aug 10 02:21:58 2020 +0000 mballoc: replace seq_printf with seq_puts seq_puts is a lot cheaper than seq_printf, so use that to print literal strings. Signed-off-by: Xu Wang Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200810022158.9167-1-vulab@iscas.ac.cn Signed-off-by: Theodore Ts'o commit dddcd2f9ebdeca9fbd36526e950bbcd0f7c1765f Author: brookxu Date: Fri Aug 7 22:01:39 2020 +0800 ext4: optimize the implementation of ext4_mb_good_group() It might be better to adjust the code in two places: 1. Determine whether grp is currupt or not should be placed first. 2. (cr<=2 && free ac_g_ex.fe_len)should may belong to the crx strategy, and it may be more appropriate to put it in the subsequent switch statement block. For cr1, cr2, the conditions in switch potentially realize the above judgment. For cr0, we should add (free ac_g_ex.fe_len) judgment, and then delete (free / fragments) >= ac->ac_g_ex.fe_len), because cr0 returns true by default. Signed-off-by: Chunguang Xu Reviewed-by: Andreas Dilger Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/e20b2d8f-1154-adb7-3831-a9e11ba842e9@gmail.com Signed-off-by: Theodore Ts'o commit 051e2ce8cb90592c8acdc7056ffed966310d91b4 Author: brookxu Date: Fri Aug 7 22:01:33 2020 +0800 ext4: delete invalid comments near ext4_mb_check_limits() These comments do not seem to be related to ext4_mb_check_limits(), it may be invalid. Signed-off-by: Chunguang Xu Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/c49faf0c-d5d5-9c51-6911-9e0ff57c6bfa@gmail.com Signed-off-by: Theodore Ts'o commit e9a3cd48d65307b1a489300d7e3e0b28ae94dbfd Author: brookxu Date: Fri Aug 7 22:01:23 2020 +0800 ext4: fix typos in ext4_mb_regular_allocator() comment Fix typos in ext4_mb_regular_allocator() comment Signed-off-by: Chunguang Xu Reviewed-by: Ritesh Harjani Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/d6514145-73b3-808b-ec5a-a8be27c51f9c@gmail.com Signed-off-by: Theodore Ts'o commit 5b0545dc184442fa509a311b8c855370441ad5bc Author: Jiri Kosina Date: Tue Aug 18 19:54:04 2020 +0200 Revert "HID: usbhid: do not sleep when opening device" This reverts commit d3132792285859253c466354fd8d54d1fe0ba786. This patch causes a regression with quite a few devices, as probing fails because of the race where the first IRQ is dropped on the floor (after hid_device_io_start() happens, but before the 50ms timeout passess), and report descriptor never gets parsed and populated. As this is just a boot time micro-optimization, let's revert the patch for 5.9 now, and fix this properly eventually for next merge window. Link: https://bugzilla.kernel.org/show_bug.cgi?id=208935 Reported-by: Johannes Hirte Reported-by: Marius Zachmann Signed-off-by: Jiri Kosina commit 279e89b2281af3b1a9f04906e157992c19c9f163 Author: Jussi Kivilinna Date: Tue Aug 18 17:46:10 2020 +0300 batman-adv: bla: use netif_rx_ni when not in interrupt context batadv_bla_send_claim() gets called from worker thread context through batadv_bla_periodic_work(), thus netif_rx_ni needs to be used in that case. This fixes "NOHZ: local_softirq_pending 08" log messages seen when batman-adv is enabled. Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code") Signed-off-by: Jussi Kivilinna Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit d8bf0c01642275c7dca1e5d02c34e4199c200b1f Author: Linus Lüssing Date: Thu Jul 23 14:28:08 2020 +0200 batman-adv: Fix own OGM check in aggregated OGMs The own OGM check is currently misplaced and can lead to the following issues: For one thing we might receive an aggregated OGM from a neighbor node which has our own OGM in the first place. We would then not only skip our own OGM but erroneously also any other, following OGM in the aggregate. For another, we might receive an OGM aggregate which has our own OGM in a place other then the first one. Then we would wrongly not skip this OGM, leading to populating the orginator and gateway table with ourself. Fixes: 9323158ef9f4 ("batman-adv: OGMv2 - implement originators logic") Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 303216e76dcab6049c9d42390b1032f0649a8206 Author: Sven Eckelmann Date: Wed Jul 22 20:36:43 2020 +0200 batman-adv: Avoid uninitialized chaddr when handling DHCP The gateway client code can try to optimize the delivery of DHCP packets to avoid broadcasting them through the whole mesh. But also transmissions to the client can be optimized by looking up the destination via the chaddr of the DHCP packet. But the chaddr is currently only done when chaddr is fully inside the non-paged area of the skbuff. Otherwise it will not be initialized and the unoptimized path should have been taken. But the implementation didn't handle this correctly. It didn't retrieve the correct chaddr but still tried to perform the TT lookup with this uninitialized memory. Reported-by: syzbot+ab16e463b903f5a37036@syzkaller.appspotmail.com Fixes: 6c413b1c22a2 ("batman-adv: send every DHCP packet as bat-unicast") Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli Signed-off-by: Simon Wunderlich commit 3fb1a96a91120877488071a167d26d76be4be977 Author: Andrii Nakryiko Date: Tue Aug 18 09:44:56 2020 -0700 libbpf: Fix build on ppc64le architecture On ppc64le we get the following warning: In file included from btf_dump.c:16:0: btf_dump.c: In function ‘btf_dump_emit_struct_def’: ../include/linux/kernel.h:20:17: error: comparison of distinct pointer types lacks a cast [-Werror] (void) (&_max1 == &_max2); \ ^ btf_dump.c:882:11: note: in expansion of macro ‘max’ m_sz = max(0LL, btf__resolve_size(d->btf, m->type)); ^~~ Fix by explicitly casting to __s64, which is a return type from btf__resolve_size(). Fixes: 702eddc77a90 ("libbpf: Handle GCC built-in types for Arm NEON") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200818164456.1181661-1-andriin@fb.com commit e65b85dd0cf1cc2c0453756e468ee9271822ec0b Author: Fabio Estevam Date: Tue Aug 18 08:12:45 2020 -0300 dt-bindings: Use Shawn Guo's preferred e-mail for i.MX bindings Use Shawn Guo's kernel.org address for the i.MX related bindings as per the MAINTAINERS entries. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20200818111245.17047-1-festevam@gmail.com Signed-off-by: Rob Herring commit dfd022a9ea7ef6ffab95cfaa47aae4475a55e120 Author: Colin Ian King Date: Wed Aug 5 15:14:59 2020 +0100 RDMA/usnic: Fix spelling mistake "transistion" -> "transition" There is a spelling mistake in a usnic_err error message. Fix it. Link: https://lore.kernel.org/r/20200805141459.23069-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe commit d963c524a4b3a7dbb2be0cb6813dcda1c16c9171 Author: Colin Ian King Date: Wed Aug 5 15:11:11 2020 +0100 RDMA/hns: Fix spelling mistake "epmty" -> "empty" There is a spelling mistake in a dev_dbg message. Fix it. Link: https://lore.kernel.org/r/20200805141111.22804-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Jason Gunthorpe commit 9d5cbf5fe46e350715389d89d0c350d83289a102 Author: Krishna Manikandan Date: Mon Jun 1 16:33:22 2020 +0530 drm/msm: add shutdown support for display platform_driver Define shutdown callback for display drm driver, so as to disable all the CRTCS when shutdown notification is received by the driver. This change will turn off the timing engine so that no display transactions are requested while mmu translations are getting disabled during reboot sequence. Signed-off-by: Krishna Manikandan Changes in v2: - Remove NULL check from msm_pdev_shutdown (Stephen Boyd) - Change commit text to reflect when this issue was uncovered (Sai Prakash Ranjan) Signed-off-by: Rob Clark commit 2de791ab4918969d8108f15238a701968375f235 Author: Dmitry Monakhov Date: Tue Aug 11 06:43:40 2020 +0000 bfq: fix blkio cgroup leakage v4 Changes from v1: - update commit description with proper ref-accounting justification commit db37a34c563b ("block, bfq: get a ref to a group when adding it to a service tree") introduce leak forbfq_group and blkcg_gq objects because of get/put imbalance. In fact whole idea of original commit is wrong because bfq_group entity can not dissapear under us because it is referenced by child bfq_queue's entities from here: -> bfq_init_entity() ->bfqg_and_blkg_get(bfqg); ->entity->parent = bfqg->my_entity -> bfq_put_queue(bfqq) FINAL_PUT ->bfqg_and_blkg_put(bfqq_group(bfqq)) ->kmem_cache_free(bfq_pool, bfqq); So parent entity can not disappear while child entity is in tree, and child entities already has proper protection. This patch revert commit db37a34c563b ("block, bfq: get a ref to a group when adding it to a service tree") bfq_group leak trace caused by bad commit: -> blkg_alloc -> bfq_pq_alloc -> bfqg_get (+1) ->bfq_activate_bfqq ->bfq_activate_requeue_entity -> __bfq_activate_entity ->bfq_get_entity ->bfqg_and_blkg_get (+1) <==== : Note1 ->bfq_del_bfqq_busy ->bfq_deactivate_entity+0x53/0xc0 [bfq] ->__bfq_deactivate_entity+0x1b8/0x210 [bfq] -> bfq_forget_entity(is_in_service = true) entity->on_st_or_in_serv = false <=== :Note2 if (is_in_service) return; ==> do not touch reference -> blkcg_css_offline -> blkcg_destroy_blkgs -> blkg_destroy -> bfq_pd_offline -> __bfq_deactivate_entity if (!entity->on_st_or_in_serv) /* true, because (Note2) return false; -> bfq_pd_free -> bfqg_put() (-1, byt bfqg->ref == 2) because of (Note2) So bfq_group and blkcg_gq will leak forever, see test-case below. ##TESTCASE_BEGIN: #!/bin/bash max_iters=${1:-100} #prep cgroup mounts mount -t tmpfs cgroup_root /sys/fs/cgroup mkdir /sys/fs/cgroup/blkio mount -t cgroup -o blkio none /sys/fs/cgroup/blkio # Prepare blkdev grep blkio /proc/cgroups truncate -s 1M img losetup /dev/loop0 img echo bfq > /sys/block/loop0/queue/scheduler grep blkio /proc/cgroups for ((i=0;i /sys/fs/cgroup/blkio/a/cgroup.procs dd if=/dev/loop0 bs=4k count=1 of=/dev/null iflag=direct 2> /dev/null echo 0 > /sys/fs/cgroup/blkio/cgroup.procs rmdir /sys/fs/cgroup/blkio/a grep blkio /proc/cgroups done ##TESTCASE_END: Fixes: db37a34c563b ("block, bfq: get a ref to a group when adding it to a service tree") Tested-by: Oleksandr Natalenko Signed-off-by: Dmitry Monakhov Signed-off-by: Jens Axboe commit 9a2a0862d973c9eab6a1f3efa0d4d18dcedbaf1a Author: Wright Feng Date: Thu Aug 13 02:00:16 2020 -0500 brcmfmac: reserve tx credit only when txctl is ready to send The 4329 throughput drops from 40.2 Mbits/sec to 190 Kbits/sec in 2G 11n mode because the commit b41c232d33666 ("brcmfmac: reserve 2 credits for host tx control path"). To fix the issue, host driver only reserves tx control credit when there is a txctl frame is pending to send. And we also check available credit by using "not equal to 0" instead of "greater than 0" because tx_max and tx_seq are circled positive numbers. Reported-by: Dmitry Osipenko Fixes: b41c232d33666 ("brcmfmac: reserve 2 credits for host tx control path") Signed-off-by: Wright Feng Tested-by: Dmitry Osipenko Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200813070017.89023-1-wright.feng@cypress.com commit 1dffeb8b8b4c261c45416d53c75ea51e6ece1770 Author: Vaibhav Agarwal Date: Fri Aug 14 18:03:15 2020 +0530 staging: greybus: audio: fix uninitialized value issue The current implementation for gbcodec_mixer_dapm_ctl_put() uses uninitialized gbvalue for comparison with updated value. This was found using static analysis with coverity. Uninitialized scalar variable (UNINIT) 11. uninit_use: Using uninitialized value gbvalue.value.integer_value[0]. 460 if (gbvalue.value.integer_value[0] != val) { This patch fixes the issue with fetching the gbvalue before using it for comparision. Fixes: 6339d2322c47 ("greybus: audio: Add topology parser for GB codec") Reported-by: Colin Ian King Signed-off-by: Vaibhav Agarwal Cc: stable Link: https://lore.kernel.org/r/bc4f29eb502ccf93cd2ffd98db0e319fa7d0f247.1597408126.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman commit fea22e159d51c766ba70473f473a0ec914cc7e92 Author: Rustam Kovhaev Date: Tue Aug 4 07:56:14 2020 -0700 staging: wlan-ng: fix out of bounds read in prism2sta_probe_usb() let's use usb_find_common_endpoints() to discover endpoints, it does all necessary checks for type and xfer direction remove memset() in hfa384x_create(), because we now assign endpoints in prism2sta_probe_usb() and because create_wlan() uses kzalloc() to allocate hfa384x struct before calling hfa384x_create() Fixes: faaff9765664 ("staging: wlan-ng: properly check endpoint types") Reported-and-tested-by: syzbot+22794221ab96b0bab53a@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=22794221ab96b0bab53a Signed-off-by: Rustam Kovhaev Cc: stable Link: https://lore.kernel.org/r/20200804145614.104320-1-rkovhaev@gmail.com Signed-off-by: Greg Kroah-Hartman commit b15b4da88be52e7455acc59318f6c97b8740b329 Author: Dan Carpenter Date: Tue Aug 4 13:16:01 2020 +0300 staging: greybus: audio: Uninitialized variable in gbaudio_remove_controls() The "err" variable is not meaningful so there is no need to print it. It's uninitialized on the first iteration through the loop. Fixes: 510e340efe0c ("staging: greybus: audio: Add helper APIs for dynamic audio modules") Signed-off-by: Dan Carpenter Reviewed-by: Alex Elder Reviewed-by: Vaibhav Agarwal Link: https://lore.kernel.org/r/20200804101601.GA392148@mwanda Signed-off-by: Greg Kroah-Hartman commit 45bc6098a3e279d8e391d22428396687562797e2 Author: Tony Luck Date: Tue Jul 7 12:43:24 2020 -0700 EDAC/{i7core,sb,pnd2,skx}: Fix error event severity IA32_MCG_STATUS.RIPV indicates whether the return RIP value pushed onto the stack as part of machine check delivery is valid or not. Various drivers copied a code fragment that uses the RIPV bit to determine the severity of the error as either HW_EVENT_ERR_UNCORRECTED or HW_EVENT_ERR_FATAL, but this check is reversed (marking errors where RIPV is set as "FATAL"). Reverse the tests so that the error is marked fatal when RIPV is not set. Reported-by: Gabriele Paoloni Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov Cc: Link: https://lkml.kernel.org/r/20200707194324.14884-1-tony.luck@intel.com commit 51072c0f5b5e98a035c6f63b83ba2afedbb7accd Author: Tomas Winkler Date: Tue Aug 18 10:54:06 2020 +0300 mei: hdcp: fix mei_hdcp_verify_mprime() input parameter wired_cmd_repeater_auth_stream_req_in has a variable length array at the end. we use struct_size() overflow macro to determine the size for the allocation and sending size. This also fixes bug in case number of streams is > 0 in the original submission. This bug was not triggered as the number of streams is always one. Fixes: c56967d674e3 (mei: hdcp: Replace one-element array with flexible-array member) Fixes: 0a1af1b5c18d (misc/mei/hdcp: Verify M_prime) Cc: # v5.1+: c56967d674e3 (mei: hdcp: Replace one-element array with flexible-array member) Signed-off-by: Tomas Winkler Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200818075406.2532605-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit ea1fc02e12b647d8dd7515d1dba137847d8e951d Author: Fugang Duan Date: Mon Aug 10 14:06:52 2020 +0800 tty: serial: imx: add dependence and build for earlycon Add the earlycon dependence and add earlycon Makefile support to allow to build the driver. Fixes: 699cc4dfd140 ("tty: serial: imx: add imx earlycon driver") Signed-off-by: Fugang Duan Link: https://lore.kernel.org/r/20200810060652.3436-1-fugang.duan@nxp.com Signed-off-by: Greg Kroah-Hartman commit 8c6c378b0cbe0c9f1390986b5f8ffb5f6ff7593b Author: Tamseel Shams Date: Mon Aug 10 08:30:21 2020 +0530 serial: samsung: Removes the IRQ not found warning In few older Samsung SoCs like s3c2410, s3c2412 and s3c2440, UART IP is having 2 interrupt lines. However, in other SoCs like s3c6400, s5pv210, exynos5433, and exynos4210 UART is having only 1 interrupt line. Due to this, "platform_get_irq(platdev, 1)" call in the driver gives the following false-positive error: "IRQ index 1 not found" on newer SoC's. This patch adds the condition to check for Tx interrupt only for the those SoC's which have 2 interrupt lines. Tested-by: Alim Akhtar Tested-by: Marek Szyprowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Signed-off-by: Tamseel Shams Cc: stable Link: https://lore.kernel.org/r/20200810030021.45348-1-m.shams@samsung.com Signed-off-by: Greg Kroah-Hartman commit 205d300aea75623e1ae4aa43e0d265ab9cf195fd Author: Sergey Senozhatsky Date: Mon Aug 17 11:26:46 2020 +0900 serial: 8250: change lock order in serial8250_do_startup() We have a number of "uart.port->desc.lock vs desc.lock->uart.port" lockdep reports coming from 8250 driver; this causes a bit of trouble to people, so let's fix it. The problem is reverse lock order in two different call paths: chain #1: serial8250_do_startup() spin_lock_irqsave(&port->lock); disable_irq_nosync(port->irq); raw_spin_lock_irqsave(&desc->lock) chain #2: __report_bad_irq() raw_spin_lock_irqsave(&desc->lock) for_each_action_of_desc() printk() spin_lock_irqsave(&port->lock); Fix this by changing the order of locks in serial8250_do_startup(): do disable_irq_nosync() first, which grabs desc->lock, and grab uart->port after that, so that chain #1 and chain #2 have same lock order. Full lockdep splat: ====================================================== WARNING: possible circular locking dependency detected 5.4.39 #55 Not tainted ====================================================== swapper/0/0 is trying to acquire lock: ffffffffab65b6c0 (console_owner){-...}, at: console_lock_spinning_enable+0x31/0x57 but task is already holding lock: ffff88810a8e34c0 (&irq_desc_lock_class){-.-.}, at: __report_bad_irq+0x5b/0xba which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&irq_desc_lock_class){-.-.}: _raw_spin_lock_irqsave+0x61/0x8d __irq_get_desc_lock+0x65/0x89 __disable_irq_nosync+0x3b/0x93 serial8250_do_startup+0x451/0x75c uart_startup+0x1b4/0x2ff uart_port_activate+0x73/0xa0 tty_port_open+0xae/0x10a uart_open+0x1b/0x26 tty_open+0x24d/0x3a0 chrdev_open+0xd5/0x1cc do_dentry_open+0x299/0x3c8 path_openat+0x434/0x1100 do_filp_open+0x9b/0x10a do_sys_open+0x15f/0x3d7 kernel_init_freeable+0x157/0x1dd kernel_init+0xe/0x105 ret_from_fork+0x27/0x50 -> #1 (&port_lock_key){-.-.}: _raw_spin_lock_irqsave+0x61/0x8d serial8250_console_write+0xa7/0x2a0 console_unlock+0x3b7/0x528 vprintk_emit+0x111/0x17f printk+0x59/0x73 register_console+0x336/0x3a4 uart_add_one_port+0x51b/0x5be serial8250_register_8250_port+0x454/0x55e dw8250_probe+0x4dc/0x5b9 platform_drv_probe+0x67/0x8b really_probe+0x14a/0x422 driver_probe_device+0x66/0x130 device_driver_attach+0x42/0x5b __driver_attach+0xca/0x139 bus_for_each_dev+0x97/0xc9 bus_add_driver+0x12b/0x228 driver_register+0x64/0xed do_one_initcall+0x20c/0x4a6 do_initcall_level+0xb5/0xc5 do_basic_setup+0x4c/0x58 kernel_init_freeable+0x13f/0x1dd kernel_init+0xe/0x105 ret_from_fork+0x27/0x50 -> #0 (console_owner){-...}: __lock_acquire+0x118d/0x2714 lock_acquire+0x203/0x258 console_lock_spinning_enable+0x51/0x57 console_unlock+0x25d/0x528 vprintk_emit+0x111/0x17f printk+0x59/0x73 __report_bad_irq+0xa3/0xba note_interrupt+0x19a/0x1d6 handle_irq_event_percpu+0x57/0x79 handle_irq_event+0x36/0x55 handle_fasteoi_irq+0xc2/0x18a do_IRQ+0xb3/0x157 ret_from_intr+0x0/0x1d cpuidle_enter_state+0x12f/0x1fd cpuidle_enter+0x2e/0x3d do_idle+0x1ce/0x2ce cpu_startup_entry+0x1d/0x1f start_kernel+0x406/0x46a secondary_startup_64+0xa4/0xb0 other info that might help us debug this: Chain exists of: console_owner --> &port_lock_key --> &irq_desc_lock_class Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&irq_desc_lock_class); lock(&port_lock_key); lock(&irq_desc_lock_class); lock(console_owner); *** DEADLOCK *** 2 locks held by swapper/0/0: #0: ffff88810a8e34c0 (&irq_desc_lock_class){-.-.}, at: __report_bad_irq+0x5b/0xba #1: ffffffffab65b5c0 (console_lock){+.+.}, at: console_trylock_spinning+0x20/0x181 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.39 #55 Hardware name: XXXXXX Call Trace: dump_stack+0xbf/0x133 ? print_circular_bug+0xd6/0xe9 check_noncircular+0x1b9/0x1c3 __lock_acquire+0x118d/0x2714 lock_acquire+0x203/0x258 ? console_lock_spinning_enable+0x31/0x57 console_lock_spinning_enable+0x51/0x57 ? console_lock_spinning_enable+0x31/0x57 console_unlock+0x25d/0x528 ? console_trylock+0x18/0x4e vprintk_emit+0x111/0x17f ? lock_acquire+0x203/0x258 printk+0x59/0x73 __report_bad_irq+0xa3/0xba note_interrupt+0x19a/0x1d6 handle_irq_event_percpu+0x57/0x79 handle_irq_event+0x36/0x55 handle_fasteoi_irq+0xc2/0x18a do_IRQ+0xb3/0x157 common_interrupt+0xf/0xf Signed-off-by: Sergey Senozhatsky Fixes: 768aec0b5bcc ("serial: 8250: fix shared interrupts issues with SMP and RT kernels") Reported-by: Guenter Roeck Reported-by: Raul Rangel BugLink: https://bugs.chromium.org/p/chromium/issues/detail?id=1114800 Link: https://lore.kernel.org/lkml/CAHQZ30BnfX+gxjPm1DUd5psOTqbyDh4EJE=2=VAMW_VDafctkA@mail.gmail.com/T/#u Reviewed-by: Andy Shevchenko Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Cc: stable Link: https://lore.kernel.org/r/20200817022646.1484638-1-sergey.senozhatsky@gmail.com Signed-off-by: Greg Kroah-Hartman commit fdf16d78941b4f380753053d229955baddd00712 Author: Holger Assmann Date: Thu Aug 13 17:27:57 2020 +0200 serial: stm32: avoid kernel warning on absence of optional IRQ stm32_init_port() of the stm32-usart may trigger a warning in platform_get_irq() when the device tree specifies no wakeup interrupt. The wakeup interrupt is usually a board-specific GPIO and the driver functions correctly in its absence. The mainline stm32mp151.dtsi does not specify it, so all mainline device trees trigger an unnecessary kernel warning. Use of platform_get_irq_optional() avoids this. Fixes: 2c58e56096dd ("serial: stm32: fix the get_irq error case") Signed-off-by: Holger Assmann Cc: stable Link: https://lore.kernel.org/r/20200813152757.32751-1-h.assmann@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 27afac93e3bd7fa89749cf11da5d86ac9cde4dba Author: Lukas Wunner Date: Thu Aug 13 12:52:40 2020 +0200 serial: pl011: Fix oops on -EPROBE_DEFER If probing of a pl011 gets deferred until after free_initmem(), an oops ensues because pl011_console_match() is called which has been freed. Fix by removing the __init attribute from the function and those it calls. Commit 10879ae5f12e ("serial: pl011: add console matching function") introduced pl011_console_match() not just for early consoles but regular preferred consoles, such as those added by acpi_parse_spcr(). Regular consoles may be registered after free_initmem() for various reasons, one being deferred probing, another being dynamic enablement of serial ports using a DeviceTree overlay. Thus, pl011_console_match() must not be declared __init and the functions it calls mustn't either. Stack trace for posterity: Unable to handle kernel paging request at virtual address 80c38b58 Internal error: Oops: 8000000d [#1] PREEMPT SMP ARM PC is at pl011_console_match+0x0/0xfc LR is at register_console+0x150/0x468 [<80187004>] (register_console) [<805a8184>] (uart_add_one_port) [<805b2b68>] (pl011_register_port) [<805b3ce4>] (pl011_probe) [<80569214>] (amba_probe) [<805ca088>] (really_probe) [<805ca2ec>] (driver_probe_device) [<805ca5b0>] (__device_attach_driver) [<805c8060>] (bus_for_each_drv) [<805c9dfc>] (__device_attach) [<805ca630>] (device_initial_probe) [<805c90a8>] (bus_probe_device) [<805c95a8>] (deferred_probe_work_func) Fixes: 10879ae5f12e ("serial: pl011: add console matching function") Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v4.10+ Cc: Aleksey Makarov Cc: Peter Hurley Cc: Russell King Cc: Christopher Covington Link: https://lore.kernel.org/r/f827ff09da55b8c57d316a1b008a137677b58921.1597315557.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit 89efbe70b27dd325d8a8c177743a26b885f7faec Author: Lukas Wunner Date: Thu Aug 13 12:59:54 2020 +0200 serial: pl011: Don't leak amba_ports entry on driver register error pl011_probe() calls pl011_setup_port() to reserve an amba_ports[] entry, then calls pl011_register_port() to register the uart driver with the tty layer. If registration of the uart driver fails, the amba_ports[] entry is not released. If this happens 14 times (value of UART_NR macro), then all amba_ports[] entries will have been leaked and driver probing is no longer possible. (To be fair, that can only happen if the DeviceTree doesn't contain alias IDs since they cause the same entry to be used for a given port.) Fix it. Fixes: ef2889f7ffee ("serial: pl011: Move uart_register_driver call to device") Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v3.15+ Cc: Tushar Behera Link: https://lore.kernel.org/r/138f8c15afb2f184d8102583f8301575566064a6.1597316167.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit c6b9e95dde7b54e6a53c47241201ab5a4035c320 Author: Valmer Huhn Date: Thu Aug 13 12:52:55 2020 -0400 serial: 8250_exar: Fix number of ports for Commtech PCIe cards The following in 8250_exar.c line 589 is used to determine the number of ports for each Exar board: nr_ports = board->num_ports ? board->num_ports : pcidev->device & 0x0f; If the number of ports a card has is not explicitly specified, it defaults to the rightmost 4 bits of the PCI device ID. This is prone to error since not all PCI device IDs contain a number which corresponds to the number of ports that card provides. This particular case involves COMMTECH_4222PCIE, COMMTECH_4224PCIE and COMMTECH_4228PCIE cards with device IDs 0x0022, 0x0020 and 0x0021. Currently the multiport cards receive 2, 0 and 1 port instead of 2, 4 and 8 ports respectively. To fix this, each Commtech Fastcom PCIe card is given a struct where the number of ports is explicitly specified. This ensures 'board->num_ports' is used instead of the default 'pcidev->device & 0x0f'. Fixes: d0aeaa83f0b0 ("serial: exar: split out the exar code from 8250_pci") Signed-off-by: Valmer Huhn Tested-by: Valmer Huhn Cc: stable Link: https://lore.kernel.org/r/20200813165255.GC345440@icarus.concurrent-rt.com Signed-off-by: Greg Kroah-Hartman commit 975efc66d4e654207c17f939eb737ac591ac38fe Author: John Stultz Date: Tue Aug 11 02:50:44 2020 +0000 tty: serial: qcom_geni_serial: Drop __init from qcom_geni_console_setup When booting with heavily modularized config, the serial console may not be able to load until after init when modules that satisfy needed dependencies have time to load. Unfortunately, as qcom_geni_console_setup is marked as __init, the function may have been freed before we get to run it, causing boot time crashes such as: [ 6.469057] Unable to handle kernel paging request at virtual address ffffffe645d4e6cc [ 6.481623] Mem abort info: [ 6.484466] ESR = 0x86000007 [ 6.487557] EC = 0x21: IABT (current EL), IL = 32 bits [ 6.492929] SET = 0, FnV = 0g [ 6.496016] EA = 0, S1PTW = 0 [ 6.499202] swapper pgtable: 4k pages, 39-bit VAs, pgdp=000000008151e000 [ 6.501286] ufshcd-qcom 1d84000.ufshc: ufshcd_print_pwr_info:[RX, TX]: gear=[3, 3], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2 [ 6.505977] [ffffffe645d4e6cc] pgd=000000017df9f003, p4d=000000017df9f003, pud=000000017df9f003, pmd=000000017df9c003, pte=0000000000000000 [ 6.505990] Internal error: Oops: 86000007 [#1] PREEMPT SMP [ 6.505995] Modules linked in: zl10353 zl10039 zl10036 zd1301_demod xc5000 xc4000 ves1x93 ves1820 tuner_xc2028 tuner_simple tuner_types tua9001 tua6100 1 [ 6.506152] isl6405 [ 6.518104] ufshcd-qcom 1d84000.ufshc: ufshcd_find_max_sup_active_icc_level: Regulator capability was not set, actvIccLevel=0 [ 6.530549] horus3a helene fc2580 fc0013 fc0012 fc0011 ec100 e4000 dvb_pll ds3000 drxk drxd drx39xyj dib9000 dib8000 dib7000p dib7000m dib3000mc dibx003 [ 6.624271] CPU: 7 PID: 148 Comm: kworker/7:2 Tainted: G W 5.8.0-mainline-12021-g6defd37ba1cd #3455 [ 6.624273] Hardware name: Thundercomm Dragonboard 845c (DT) [ 6.624290] Workqueue: events deferred_probe_work_func [ 6.624296] pstate: 40c00005 (nZcv daif +PAN +UAO BTYPE=--) [ 6.624307] pc : qcom_geni_console_setup+0x0/0x110 [ 6.624316] lr : try_enable_new_console+0xa0/0x140 [ 6.624318] sp : ffffffc010843a30 [ 6.624320] x29: ffffffc010843a30 x28: ffffffe645c3e7d0 [ 6.624325] x27: ffffff80f8022180 x26: ffffffc010843b28 [ 6.637937] x25: 0000000000000000 x24: ffffffe6462a2000 [ 6.637941] x23: ffffffe646398000 x22: 0000000000000000 [ 6.637945] x21: 0000000000000000 x20: ffffffe6462a5ce8 [ 6.637952] x19: ffffffe646398e38 x18: ffffffffffffffff [ 6.680296] x17: 0000000000000000 x16: ffffffe64492b900 [ 6.680300] x15: ffffffe6461e9d08 x14: 69202930203d2064 [ 6.680305] x13: 7561625f65736162 x12: 202c363331203d20 [ 6.696434] x11: 0000000000000030 x10: 0101010101010101 [ 6.696438] x9 : 4d4d20746120304d x8 : 7f7f7f7f7f7f7f7f [ 6.707249] x7 : feff4c524c787373 x6 : 0000000000008080 [ 6.707253] x5 : 0000000000000000 x4 : 8080000000000000 [ 6.707257] x3 : 0000000000000000 x2 : ffffffe645d4e6cc [ 6.744223] qcom_geni_serial 898000.serial: dev_pm_opp_set_rate: failed to find OPP for freq 102400000 (-34) [ 6.744966] x1 : fffffffefe74e174 x0 : ffffffe6462a5ce8 [ 6.753580] qcom_geni_serial 898000.serial: dev_pm_opp_set_rate: failed to find OPP for freq 102400000 (-34) [ 6.761634] Call trace: [ 6.761639] qcom_geni_console_setup+0x0/0x110 [ 6.761645] register_console+0x29c/0x2f8 [ 6.767981] Bluetooth: hci0: Frame reassembly failed (-84) [ 6.775252] uart_add_one_port+0x438/0x500 [ 6.775258] qcom_geni_serial_probe+0x2c4/0x4a8 [ 6.775266] platform_drv_probe+0x58/0xa8 [ 6.855359] really_probe+0xec/0x398 [ 6.855362] driver_probe_device+0x5c/0xb8 [ 6.855367] __device_attach_driver+0x98/0xb8 [ 7.184945] bus_for_each_drv+0x74/0xd8 [ 7.188825] __device_attach+0xec/0x148 [ 7.192705] device_initial_probe+0x24/0x30 [ 7.196937] bus_probe_device+0x9c/0xa8 [ 7.200816] deferred_probe_work_func+0x7c/0xb8 [ 7.205398] process_one_work+0x20c/0x4b0 [ 7.209456] worker_thread+0x48/0x460 [ 7.213157] kthread+0x14c/0x158 [ 7.216432] ret_from_fork+0x10/0x18 [ 7.220049] Code: bad PC value [ 7.223139] ---[ end trace 73f3b21e251d5a70 ]--- Thus this patch removes the __init avoiding crash in such configs. Cc: Andy Gross Cc: Jiri Slaby Cc: Saravana Kannan Cc: Todd Kjos Cc: Amit Pundir Cc: linux-arm-msm@vger.kernel.org Cc: linux-serial@vger.kernel.org Suggested-by: Saravana Kannan Signed-off-by: John Stultz Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200811025044.70626-1-john.stultz@linaro.org Signed-off-by: Greg Kroah-Hartman commit d681a6e4e353958cba22faf2c48474ad1efa20c8 Author: Douglas Anderson Date: Thu Aug 6 22:19:08 2020 -0700 serial: qcom_geni_serial: Fix recent kdb hang The commit e42d6c3ec0c7 ("serial: qcom_geni_serial: Make kgdb work even if UART isn't console") worked pretty well and I've been doing a lot of debugging with it. However, recently I typed "dmesg" in kdb and then held the space key down to scroll through the pagination. My device hung. This was repeatable and I found that it was introduced with the aforementioned commit. It turns out that there are some strange boundary cases in geni where in some weird situations it will signal RX_LAST but then will put 0 in RX_LAST_BYTE. This means that the entire last FIFO entry is valid. This weird corner case is handled in qcom_geni_serial_handle_rx() where you can see that we only honor RX_LAST_BYTE if RX_LAST is set _and_ RX_LAST_BYTE is non-zero. If either of these is not true we use BYTES_PER_FIFO_WORD (4) for the size of the last FIFO word. Let's fix kgdb. While at it, also use the proper #define for 4. Fixes: e42d6c3ec0c7 ("serial: qcom_geni_serial: Make kgdb work even if UART isn't console") Signed-off-by: Douglas Anderson Reviewed-by: Akash Asthana Link: https://lore.kernel.org/r/20200806221904.1.I4455ff86f0ef5281c2a0cd0a4712db614548a5ca@changeid Signed-off-by: Greg Kroah-Hartman commit bc5269ca765057a1b762e79a1cfd267cd7bf1c46 Author: George Kennedy Date: Fri Jul 31 12:33:12 2020 -0400 vt_ioctl: change VT_RESIZEX ioctl to check for error return from vc_resize() vc_resize() can return with an error after failure. Change VT_RESIZEX ioctl to save struct vc_data values that are modified and restore the original values in case of error. Signed-off-by: George Kennedy Cc: stable Reported-by: syzbot+38a3699c7eaf165b97a6@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/1596213192-6635-2-git-send-email-george.kennedy@oracle.com Signed-off-by: Greg Kroah-Hartman commit 39b3cffb8cf3111738ea993e2757ab382253d86a Author: George Kennedy Date: Fri Jul 31 12:33:11 2020 -0400 fbcon: prevent user font height or width change from causing potential out-of-bounds access Add a check to fbcon_resize() to ensure that a possible change to user font height or user font width will not allow a font data out-of-bounds access. NOTE: must use original charcount in calculation as font charcount can change and cannot be used to determine the font data allocated size. Signed-off-by: George Kennedy Cc: stable Reported-by: syzbot+38a3699c7eaf165b97a6@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/1596213192-6635-1-git-send-email-george.kennedy@oracle.com Signed-off-by: Greg Kroah-Hartman commit f8d1653daec02315e06d30246cff4af72e76e54e Author: Tetsuo Handa Date: Wed Jul 29 23:57:01 2020 +0900 vt: defer kfree() of vc_screenbuf in vc_do_resize() syzbot is reporting UAF bug in set_origin() from vc_do_resize() [1], for vc_do_resize() calls kfree(vc->vc_screenbuf) before calling set_origin(). Unfortunately, in set_origin(), vc->vc_sw->con_set_origin() might access vc->vc_pos when scroll is involved in order to manipulate cursor, but vc->vc_pos refers already released vc->vc_screenbuf until vc->vc_pos gets updated based on the result of vc->vc_sw->con_set_origin(). Preserving old buffer and tolerating outdated vc members until set_origin() completes would be easier than preventing vc->vc_sw->con_set_origin() from accessing outdated vc members. [1] https://syzkaller.appspot.com/bug?id=6649da2081e2ebdc65c0642c214b27fe91099db3 Reported-by: syzbot Signed-off-by: Tetsuo Handa Cc: stable Link: https://lore.kernel.org/r/1596034621-4714-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman commit 66c262be8f50c043bf6d2f43fa8070e5d3ba7bc0 Author: Masahiro Yamada Date: Tue Aug 18 01:36:31 2020 +0900 kconfig: qconf: remove unused colNr This is not used at all. Signed-off-by: Masahiro Yamada commit 7d1300e63161d05735ebadf9b9d8bc89afe49d1c Author: Masahiro Yamada Date: Tue Aug 18 01:36:30 2020 +0900 kconfig: qconf: fix the popup menu in the ConfigInfoView window I do not know when ConfigInfoView::createStandardContextMenu() is called. Because QTextEdit::createStandardContextMenu() is not virtual, ConfigInfoView::createStandardContextMenu() cannot override it. Even if right-click the ConfigInfoView window, the "Show Debug Info" menu does not show up. Build up the menu in the constructor, and invoke it from the contextMenuEvent(). Signed-off-by: Masahiro Yamada commit d85de3399f97467baa2026fbbbe587850d01ba8a Author: Masahiro Yamada Date: Tue Aug 18 01:36:29 2020 +0900 kconfig: qconf: fix signal connection to invalid slots If you right-click in the ConfigList window, you will see the following messages in the console: QObject::connect: No such slot QAction::setOn(bool) in scripts/kconfig/qconf.cc:888 QObject::connect: (sender name: 'config') QObject::connect: No such slot QAction::setOn(bool) in scripts/kconfig/qconf.cc:897 QObject::connect: (sender name: 'config') QObject::connect: No such slot QAction::setOn(bool) in scripts/kconfig/qconf.cc:906 QObject::connect: (sender name: 'config') Right, there is no such slot in QAction. I think this is a typo of setChecked. Due to this bug, when you toggled the menu "Option->Show Name/Range/Data" the state of the context menu was not previously updated. Fix this. Fixes: d5d973c3f8a9 ("Port xconfig to Qt5 - Put back some of the old implementation(part 2)") Signed-off-by: Masahiro Yamada commit e29a6d633e2782ec0278b8c199135ad24a99240d Author: Joe Perches Date: Fri Aug 14 18:38:15 2020 -0700 genksyms: keywords: Use __restrict not _restrict Use the proper form of the RESTRICT keyword. Quote the comments properly too. Signed-off-by: Joe Perches Acked-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit efbf97265f9fc5e1978df6cf0e3df4d5b157f070 Author: Masahiro Yamada Date: Wed Aug 12 23:49:23 2020 +0900 kbuild: remove redundant patterns in filter/filter-out The '%' in filter/filter-out matches to any number of any characters, including empty string. So, '%config' matches to 'config', and '%install' to 'install'. Drop the redundant patterns. Signed-off-by: Masahiro Yamada commit 1dbcf46d516b3ab9b114ffcb7b8a55ee5e375523 Author: Masahiro Yamada Date: Wed Jul 29 12:18:45 2020 +0900 extract-cert: add static to local data Fix the following warning from sparse: scripts/extract-cert.c:74:5: warning: symbol 'kbuild_verbose' was not declared. Should it be static? Signed-off-by: Masahiro Yamada commit dfe650be6f79fc69021a9b7a559d5aca1e2ef359 Author: Samuel Thibault Date: Tue Aug 4 18:06:59 2020 +0200 speakup: only build serialio when ISA is enabled Drivers using serialio were already made available in Kconfig only under the ISA condition. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20200804160659.7y76sdseow43lfms@function Signed-off-by: Greg Kroah-Hartman commit 2b86d9b8ec6efb86fc5ea44f2d49b1df17f699a1 Author: Samuel Thibault Date: Tue Aug 4 18:06:37 2020 +0200 speakup: Fix wait_for_xmitr for ttyio case This was missed while introducing the tty-based serial access. The only remaining use of wait_for_xmitr with tty-based access is in spk_synth_is_alive_restart to check whether the synth can be restarted. With tty-based this is up to the tty layer to cope with the buffering etc. so we can just say yes. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20200804160637.x3iycau5izywbgzl@function Signed-off-by: Greg Kroah-Hartman commit d5643d2249b279077427b2c2b2ffae9b70c95b0b Author: Bastien Nocera Date: Tue Aug 18 13:04:45 2020 +0200 USB: Fix device driver race When a new device with a specialised device driver is plugged in, the new driver will be modprobe()'d but the driver core will attach the "generic" driver to the device. After that, nothing will trigger a reprobe when the modprobe()'d device driver has finished initialising, as the device has the "generic" driver attached to it. Trigger a reprobe ourselves when new specialised drivers get registered. Fixes: 88b7381a939d ("USB: Select better matching USB drivers when available") Signed-off-by: Bastien Nocera Cc: stable Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200818110445.509668-3-hadess@hadess.net Signed-off-by: Greg Kroah-Hartman commit adb6e6ac20eedcf1dce19dc75b224e63c0828ea1 Author: Bastien Nocera Date: Tue Aug 18 13:04:43 2020 +0200 USB: Also match device drivers using the ->match vfunc We only ever used the ID table matching before, but we should also support open-coded match functions. Fixes: 88b7381a939de ("USB: Select better matching USB drivers when available") Signed-off-by: Bastien Nocera Cc: stable Acked-by: Alan Stern Link: https://lore.kernel.org/r/20200818110445.509668-1-hadess@hadess.net Signed-off-by: Greg Kroah-Hartman commit d54343a87732726b04ac5af873916b5ed4f52932 Author: JC Kuo Date: Tue Aug 11 17:25:53 2020 +0800 usb: host: xhci-tegra: fix tegra_xusb_get_phy() tegra_xusb_get_phy() should take input argument "name". Signed-off-by: JC Kuo Cc: stable Link: https://lore.kernel.org/r/20200811092553.657762-1-jckuo@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 316a2868bc269be8c6e69ccc3a1f902a3f518eb9 Author: JC Kuo Date: Tue Aug 11 17:31:43 2020 +0800 usb: host: xhci-tegra: otg usb2/usb3 port init tegra_xusb_init_usb_phy() should initialize "otg_usb2_port" and "otg_usb3_port" with -EINVAL because "0" is a valid value represents usb2 port 0 or usb3 port 0. Signed-off-by: JC Kuo Cc: stable Link: https://lore.kernel.org/r/20200811093143.699541-1-jckuo@nvidia.com Signed-off-by: Greg Kroah-Hartman commit 7b2816dd293031b9dec476d7853c099dc2ec9172 Author: Andy Shevchenko Date: Fri Aug 14 21:22:18 2020 +0300 usb: hcd: Fix use after free in usb_hcd_pci_remove() On the removal stage we put a reference to the controller structure and if it's not used anymore it gets freed, but later we try to dereference a pointer to a member of that structure. Copy necessary field to a temporary variable to avoid use after free. Fixes: 306c54d0edb6 ("usb: hcd: Try MSI interrupts on PCI devices") Reported-by: John Garry Link: https://lore.kernel.org/linux-usb/30a8c4ca-64c2-863b-cfcd-0970599c0ba3@huawei.com/ Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200814182218.71957-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bed97b30968ba354035a020989df0623e52b5536 Author: Hans de Goede Date: Sun Aug 9 16:19:04 2020 +0200 usb: typec: ucsi: Hold con->lock for the entire duration of ucsi_register_port() Commit 081da1325d35 ("usb: typec: ucsi: displayport: Fix a potential race during registration") made the ucsi code hold con->lock in ucsi_register_displayport(). But we really don't want any interactions with the connector to run before the port-registration process is fully complete. This commit moves the taking of con->lock from ucsi_register_displayport() into ucsi_register_port() to achieve this. Cc: stable@vger.kernel.org Fixes: 081da1325d35 ("usb: typec: ucsi: displayport: Fix a potential race during registration") Signed-off-by: Hans de Goede Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200809141904.4317-5-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 25794e3079d2a98547b6bf5764ef0240aa89b798 Author: Hans de Goede Date: Sun Aug 9 16:19:03 2020 +0200 usb: typec: ucsi: Rework ppm_lock handling The ppm_lock really only needs to be hold during 2 functions: ucsi_reset_ppm() and ucsi_run_command(). Push the taking of the lock down into these 2 functions, renaming ucsi_run_command() to ucsi_send_command() which was an existing wrapper already taking the lock for its callers. This simplifies things for the callers and removes the difference between ucsi_send_command() and ucsi_run_command() which has led to various locking bugs in the past. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200809141904.4317-4-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 7e90057f125c8c852940b848e06e7a72f050fc6f Author: Hans de Goede Date: Sun Aug 9 16:19:02 2020 +0200 usb: typec: ucsi: Fix 2 unlocked ucsi_run_command calls Fix 2 unlocked ucsi_run_command calls: 1. ucsi_handle_connector_change() contains one ucsi_send_command() call, which takes the ppm_lock for it; and one ucsi_run_command() call which relies on the caller have taking the ppm_lock. ucsi_handle_connector_change() does not take the lock, so the second (ucsi_run_command) calls should also be ucsi_send_command(). 2. ucsi_get_pdos() gets called from ucsi_handle_connector_change() which does not hold the ppm_lock, so it also must use ucsi_send_command(). This commit also adds a WARN_ON(!mutex_is_locked(&ucsi->ppm_lock)); to ucsi_run_command() to avoid similar problems getting re-introduced in the future. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200809141904.4317-3-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 0ff0705a2ef2929e9326c95df48bdbebb0dafaad Author: Hans de Goede Date: Sun Aug 9 16:19:01 2020 +0200 usb: typec: ucsi: Fix AB BA lock inversion Lockdep reports an AB BA lock inversion between ucsi_init() and ucsi_handle_connector_change(): AB order: 1. ucsi_init takes ucsi->ppm_lock (it runs with that locked for the duration of the function) 2. usci_init eventually end up calling ucsi_register_displayport, which takes ucsi_connector->lock BA order: 1. ucsi_handle_connector_change work is started, takes ucsi_connector->lock 2. ucsi_handle_connector_change calls ucsi_send_command which takes ucsi->ppm_lock The ppm_lock really only needs to be hold during 2 functions: ucsi_reset_ppm() and ucsi_run_command(). This commit fixes the AB BA lock inversion by making ucsi_init drop the ucsi->ppm_lock before it starts registering ports; and replacing any ucsi_run_command() calls after this point with ucsi_send_command() (which is a wrapper around run_command taking the lock while handling the command). Some of the replacing of ucsi_run_command with ucsi_send_command in the helpers used during port registration also fixes a number of code paths after registration which call ucsi_run_command() without holding the ppm_lock: 1. ucsi_altmode_update_active() call in ucsi/displayport.c 2. ucsi_register_altmodes() call from ucsi_handle_connector_change() (through ucsi_partner_change()) Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Acked-by: Heikki Krogerus Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200809141904.4317-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 7a2f2974f26542b4e7b9b4321edb3cbbf3eeb91a Author: M. Vefa Bicakci Date: Mon Aug 10 19:00:17 2020 +0300 usbip: Implement a match function to fix usbip Commit 88b7381a939d ("USB: Select better matching USB drivers when available") introduced the use of a "match" function to select a non-generic/better driver for a particular USB device. This unfortunately breaks the operation of usbip in general, as reported in the kernel bugzilla with bug 208267 (linked below). Upon inspecting the aforementioned commit, one can observe that the original code in the usb_device_match function used to return 1 unconditionally, but the aforementioned commit makes the usb_device_match function use identifier tables and "match" virtual functions, if either of them are available. Hence, this commit implements a match function for usbip that unconditionally returns true to ensure that usbip is functional again. This change has been verified to restore usbip functionality, with a v5.7.y kernel on an up-to-date version of Qubes OS 4.0, which uses usbip to redirect USB devices between VMs. Thanks to Jonathan Dieter for the effort in bisecting this issue down to the aforementioned commit. Fixes: 88b7381a939d ("USB: Select better matching USB drivers when available") Link: https://bugzilla.kernel.org/show_bug.cgi?id=208267 Link: https://bugzilla.redhat.com/show_bug.cgi?id=1856443 Link: https://github.com/QubesOS/qubes-issues/issues/5905 Signed-off-by: M. Vefa Bicakci Cc: # 5.7 Cc: Valentina Manea Cc: Alan Stern Reviewed-by: Bastien Nocera Reviewed-by: Shuah Khan Link: https://lore.kernel.org/r/20200810160017.46002-1-m.v.b@runbox.com Signed-off-by: Greg Kroah-Hartman commit d66a57be2f9a315fc10d0f524f670fec903e0fb4 Author: Vinod Koul Date: Tue Aug 18 12:47:39 2020 +0530 usb: renesas-xhci: remove version check Some devices in wild are reporting bunch of firmware versions, so remove the check for versions in driver Reported by: Anastasios Vacharakis Reported by: Glen Journeay Fixes: 2478be82de44 ("usb: renesas-xhci: Add ROM loader for uPD720201") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=208911 Signed-off-by: Vinod Koul Cc: stable Link: https://lore.kernel.org/r/20200818071739.789720-1-vkoul@kernel.org Signed-off-by: Greg Kroah-Hartman commit 531412492ce93ea29b9ca3b4eb5e3ed771f851dd Author: Evgeny Novikov Date: Wed Aug 5 12:06:43 2020 +0300 USB: lvtest: return proper error code in probe lvs_rh_probe() can return some nonnegative value from usb_control_msg() when it is less than "USB_DT_HUB_NONVAR_SIZE + 2" that is considered as a failure. Make lvs_rh_probe() return -EINVAL in this case. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Cc: stable Link: https://lore.kernel.org/r/20200805090643.3432-1-novikov@ispras.ru Signed-off-by: Greg Kroah-Hartman commit f4b9d8a582f738c24ebeabce5cc15f4b8159d74e Author: Tom Rix Date: Sat Aug 1 08:21:54 2020 -0700 USB: cdc-acm: rework notification_buffer resizing Clang static analysis reports this error cdc-acm.c:409:3: warning: Use of memory after it is freed acm_process_notification(acm, (unsigned char *)dr); There are three problems, the first one is that dr is not reset The variable dr is set with if (acm->nb_index) dr = (struct usb_cdc_notification *)acm->notification_buffer; But if the notification_buffer is too small it is resized with if (acm->nb_size) { kfree(acm->notification_buffer); acm->nb_size = 0; } alloc_size = roundup_pow_of_two(expected_size); /* * kmalloc ensures a valid notification_buffer after a * use of kfree in case the previous allocation was too * small. Final freeing is done on disconnect. */ acm->notification_buffer = kmalloc(alloc_size, GFP_ATOMIC); dr should point to the new acm->notification_buffer. The second problem is any data in the notification_buffer is lost when the pointer is freed. In the normal case, the current data is accumulated in the notification_buffer here. memcpy(&acm->notification_buffer[acm->nb_index], urb->transfer_buffer, copy_size); When a resize happens, anything before notification_buffer[acm->nb_index] is garbage. The third problem is the acm->nb_index is not reset on a resizing buffer error. So switch resizing to using krealloc and reassign dr and reset nb_index. Fixes: ea2583529cd1 ("cdc-acm: reassemble fragmented notifications") Signed-off-by: Tom Rix Cc: stable Acked-by: Oliver Neukum Link: https://lore.kernel.org/r/20200801152154.20683-1-trix@redhat.com Signed-off-by: Greg Kroah-Hartman commit 5967116e8358899ebaa22702d09b0af57fef23e1 Author: Kai-Heng Feng Date: Fri Jul 31 13:16:20 2020 +0800 USB: quirks: Add no-lpm quirk for another Raydium touchscreen There's another Raydium touchscreen needs the no-lpm quirk: [ 1.339149] usb 1-9: New USB device found, idVendor=2386, idProduct=350e, bcdDevice= 0.00 [ 1.339150] usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1.339151] usb 1-9: Product: Raydium Touch System [ 1.339152] usb 1-9: Manufacturer: Raydium Corporation ... [ 6.450497] usb 1-9: can't set config #1, error -110 BugLink: https://bugs.launchpad.net/bugs/1889446 Signed-off-by: Kai-Heng Feng Cc: stable Link: https://lore.kernel.org/r/20200731051622.28643-1-kai.heng.feng@canonical.com Signed-off-by: Greg Kroah-Hartman commit f176ede3a3bde5b398a6777a7f9ff091baa2d3ff Author: Alan Stern Date: Mon Aug 10 14:29:54 2020 -0400 USB: yurex: Fix bad gfp argument The syzbot fuzzer identified a bug in the yurex driver: It passes GFP_KERNEL as a memory-allocation flag to usb_submit_urb() at a time when its state is TASK_INTERRUPTIBLE, not TASK_RUNNING: do not call blocking ops when !TASK_RUNNING; state=1 set at [<00000000370c7c68>] prepare_to_wait+0xb1/0x2a0 kernel/sched/wait.c:247 WARNING: CPU: 1 PID: 340 at kernel/sched/core.c:7253 __might_sleep+0x135/0x190 kernel/sched/core.c:7253 Kernel panic - not syncing: panic_on_warn set ... CPU: 1 PID: 340 Comm: syz-executor677 Not tainted 5.8.0-syzkaller #0 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+0xf6/0x16e lib/dump_stack.c:118 panic+0x2aa/0x6e1 kernel/panic.c:231 __warn.cold+0x20/0x50 kernel/panic.c:600 report_bug+0x1bd/0x210 lib/bug.c:198 handle_bug+0x41/0x80 arch/x86/kernel/traps.c:234 exc_invalid_op+0x14/0x40 arch/x86/kernel/traps.c:254 asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:536 RIP: 0010:__might_sleep+0x135/0x190 kernel/sched/core.c:7253 Code: 65 48 8b 1c 25 40 ef 01 00 48 8d 7b 10 48 89 fe 48 c1 ee 03 80 3c 06 00 75 2b 48 8b 73 10 48 c7 c7 e0 9e 06 86 e8 ed 12 f6 ff <0f> 0b e9 46 ff ff ff e8 1f b2 4b 00 e9 29 ff ff ff e8 15 b2 4b 00 RSP: 0018:ffff8881cdb77a28 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff8881c6458000 RCX: 0000000000000000 RDX: ffff8881c6458000 RSI: ffffffff8129ec93 RDI: ffffed1039b6ef37 RBP: ffffffff86fdade2 R08: 0000000000000001 R09: ffff8881db32f54f R10: 0000000000000000 R11: 0000000030343354 R12: 00000000000001f2 R13: 0000000000000000 R14: 0000000000000068 R15: ffffffff83c1b1aa slab_pre_alloc_hook.constprop.0+0xea/0x200 mm/slab.h:498 slab_alloc_node mm/slub.c:2816 [inline] slab_alloc mm/slub.c:2900 [inline] kmem_cache_alloc_trace+0x46/0x220 mm/slub.c:2917 kmalloc include/linux/slab.h:554 [inline] dummy_urb_enqueue+0x7a/0x880 drivers/usb/gadget/udc/dummy_hcd.c:1251 usb_hcd_submit_urb+0x2b2/0x22d0 drivers/usb/core/hcd.c:1547 usb_submit_urb+0xb4e/0x13e0 drivers/usb/core/urb.c:570 yurex_write+0x3ea/0x820 drivers/usb/misc/yurex.c:495 This patch changes the call to use GFP_ATOMIC instead of GFP_KERNEL. Reported-and-tested-by: syzbot+c2c3302f9c601a4b1be2@syzkaller.appspotmail.com Signed-off-by: Alan Stern CC: Link: https://lore.kernel.org/r/20200810182954.GB307778@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit 801980f6497946048709b9b09771a1729551d705 Author: Michael Roth Date: Tue Aug 11 11:15:44 2020 -0500 powerpc/pseries/hotplug-cpu: wait indefinitely for vCPU death For a power9 KVM guest with XIVE enabled, running a test loop where we hotplug 384 vcpus and then unplug them, the following traces can be seen (generally within a few loops) either from the unplugged vcpu: cpu 65 (hwid 65) Ready to die... Querying DEAD? cpu 66 (66) shows 2 list_del corruption. next->prev should be c00a000002470208, but was c00a000002470048 ------------[ cut here ]------------ kernel BUG at lib/list_debug.c:56! Oops: Exception in kernel mode, sig: 5 [#1] LE SMP NR_CPUS=2048 NUMA pSeries Modules linked in: fuse nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 ... CPU: 66 PID: 0 Comm: swapper/66 Kdump: loaded Not tainted 4.18.0-221.el8.ppc64le #1 NIP: c0000000007ab50c LR: c0000000007ab508 CTR: 00000000000003ac REGS: c0000009e5a17840 TRAP: 0700 Not tainted (4.18.0-221.el8.ppc64le) MSR: 800000000282b033 CR: 28000842 XER: 20040000 ... NIP __list_del_entry_valid+0xac/0x100 LR __list_del_entry_valid+0xa8/0x100 Call Trace: __list_del_entry_valid+0xa8/0x100 (unreliable) free_pcppages_bulk+0x1f8/0x940 free_unref_page+0xd0/0x100 xive_spapr_cleanup_queue+0x148/0x1b0 xive_teardown_cpu+0x1bc/0x240 pseries_mach_cpu_die+0x78/0x2f0 cpu_die+0x48/0x70 arch_cpu_idle_dead+0x20/0x40 do_idle+0x2f4/0x4c0 cpu_startup_entry+0x38/0x40 start_secondary+0x7bc/0x8f0 start_secondary_prolog+0x10/0x14 or on the worker thread handling the unplug: pseries-hotplug-cpu: Attempting to remove CPU , drc index: 1000013a Querying DEAD? cpu 314 (314) shows 2 BUG: Bad page state in process kworker/u768:3 pfn:95de1 cpu 314 (hwid 314) Ready to die... page:c00a000002577840 refcount:0 mapcount:-128 mapping:0000000000000000 index:0x0 flags: 0x5ffffc00000000() raw: 005ffffc00000000 5deadbeef0000100 5deadbeef0000200 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffff7f 0000000000000000 page dumped because: nonzero mapcount Modules linked in: kvm xt_CHECKSUM ipt_MASQUERADE xt_conntrack ... CPU: 0 PID: 548 Comm: kworker/u768:3 Kdump: loaded Not tainted 4.18.0-224.el8.bz1856588.ppc64le #1 Workqueue: pseries hotplug workque pseries_hp_work_fn Call Trace: dump_stack+0xb0/0xf4 (unreliable) bad_page+0x12c/0x1b0 free_pcppages_bulk+0x5bc/0x940 page_alloc_cpu_dead+0x118/0x120 cpuhp_invoke_callback.constprop.5+0xb8/0x760 _cpu_down+0x188/0x340 cpu_down+0x5c/0xa0 cpu_subsys_offline+0x24/0x40 device_offline+0xf0/0x130 dlpar_offline_cpu+0x1c4/0x2a0 dlpar_cpu_remove+0xb8/0x190 dlpar_cpu_remove_by_index+0x12c/0x150 dlpar_cpu+0x94/0x800 pseries_hp_work_fn+0x128/0x1e0 process_one_work+0x304/0x5d0 worker_thread+0xcc/0x7a0 kthread+0x1ac/0x1c0 ret_from_kernel_thread+0x5c/0x80 The latter trace is due to the following sequence: page_alloc_cpu_dead drain_pages drain_pages_zone free_pcppages_bulk where drain_pages() in this case is called under the assumption that the unplugged cpu is no longer executing. To ensure that is the case, and early call is made to __cpu_die()->pseries_cpu_die(), which runs a loop that waits for the cpu to reach a halted state by polling its status via query-cpu-stopped-state RTAS calls. It only polls for 25 iterations before giving up, however, and in the trace above this results in the following being printed only .1 seconds after the hotplug worker thread begins processing the unplug request: pseries-hotplug-cpu: Attempting to remove CPU , drc index: 1000013a Querying DEAD? cpu 314 (314) shows 2 At that point the worker thread assumes the unplugged CPU is in some unknown/dead state and procedes with the cleanup, causing the race with the XIVE cleanup code executed by the unplugged CPU. Fix this by waiting indefinitely, but also making an effort to avoid spurious lockup messages by allowing for rescheduling after polling the CPU status and printing a warning if we wait for longer than 120s. Fixes: eac1e731b59ee ("powerpc/xive: guest exploitation of the XIVE interrupt controller") Suggested-by: Michael Ellerman Signed-off-by: Michael Roth Tested-by: Greg Kurz Reviewed-by: Thiago Jung Bauermann Reviewed-by: Greg Kurz [mpe: Trim oopses in change log slightly for readability] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200811161544.10513-1-mdroth@linux.vnet.ibm.com commit 7bee31ad8e2f6c276f36993346ac70f4d4c80e45 Author: Christophe Leroy Date: Wed Aug 5 15:27:28 2020 +0000 powerpc/32s: Fix is_module_segment() when MODULES_VADDR is defined When MODULES_VADDR is defined, is_module_segment() shall check the address against it instead of checking agains VMALLOC_START. Fixes: 6ca055322da8 ("powerpc/32s: Use dedicated segment for modules with STRICT_KERNEL_RWX") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/07884ed033c31e074747b7eb8eaa329d15db07ec.1596641219.git.christophe.leroy@csgroup.eu commit 48d2f0407be7a36e8f20be37ec9121e021ef3964 Author: Christophe Leroy Date: Wed Aug 5 15:27:29 2020 +0000 powerpc/kasan: Fix KASAN_SHADOW_START on BOOK3S_32 On BOOK3S_32, when we have modules and strict kernel RWX, modules are not in vmalloc space but in a dedicated segment that is below PAGE_OFFSET. So KASAN_SHADOW_START must take it into account. MODULES_VADDR can't be used because it is not defined yet in kasan.h Fixes: 6ca055322da8 ("powerpc/32s: Use dedicated segment for modules with STRICT_KERNEL_RWX") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6eddca2d5611fd57312a88eae31278c87a8fc99d.1596641224.git.christophe.leroy@csgroup.eu commit dca93232b361d260413933903cd4bdbd92ebcc7f Author: Quinn Tran Date: Thu Aug 6 04:10:14 2020 -0700 Revert "scsi: qla2xxx: Disable T10-DIF feature with FC-NVMe during probe" FCP T10-PI and NVMe features are independent of each other. This patch allows both features to co-exist. This reverts commit 5da05a26b8305a625bc9d537671b981795b46dab. Link: https://lore.kernel.org/r/20200806111014.28434-12-njavali@marvell.com Fixes: 5da05a26b830 ("scsi: qla2xxx: Disable T10-DIF feature with FC-NVMe during probe") Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit de7e6194301ad31c4ce95395eb678e51a1b907e5 Author: Saurav Kashyap Date: Thu Aug 6 04:10:13 2020 -0700 Revert "scsi: qla2xxx: Fix crash on qla2x00_mailbox_command" FCoE adapter initialization failed for ISP8021 with the following patch applied. In addition, reproduction of the issue the patch originally tried to address has been unsuccessful. This reverts commit 3cb182b3fa8b7a61f05c671525494697cba39c6a. Link: https://lore.kernel.org/r/20200806111014.28434-11-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 83949613fac61e8e37eadf8275bf072342302f4e Author: Quinn Tran Date: Thu Aug 6 04:10:12 2020 -0700 scsi: qla2xxx: Fix null pointer access during disconnect from subsystem NVMEAsync command is being submitted to QLA while the same NVMe controller is in the middle of reset. The reset path has deleted the association and freed aen_op->fcp_req.private. Add a check for this private pointer before issuing the command. ... 6 [ffffb656ca11fce0] page_fault at ffffffff8c00114e [exception RIP: qla_nvme_post_cmd+394] RIP: ffffffffc0d012ba RSP: ffffb656ca11fd98 RFLAGS: 00010206 RAX: ffff8fb039eda228 RBX: ffff8fb039eda200 RCX: 00000000000da161 RDX: ffffffffc0d4d0f0 RSI: ffffffffc0d26c9b RDI: ffff8fb039eda220 RBP: 0000000000000013 R8: ffff8fb47ff6aa80 R9: 0000000000000002 R10: 0000000000000000 R11: ffffb656ca11fdc8 R12: ffff8fb27d04a3b0 R13: ffff8fc46dd98a58 R14: 0000000000000000 R15: ffff8fc4540f0000 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 7 [ffffb656ca11fe08] nvme_fc_start_fcp_op at ffffffffc0241568 [nvme_fc] 8 [ffffb656ca11fe50] nvme_fc_submit_async_event at ffffffffc0241901 [nvme_fc] 9 [ffffb656ca11fe68] nvme_async_event_work at ffffffffc014543d [nvme_core] 10 [ffffb656ca11fe98] process_one_work at ffffffff8b6cd437 11 [ffffb656ca11fed8] worker_thread at ffffffff8b6cdcef 12 [ffffb656ca11ff10] kthread at ffffffff8b6d3402 13 [ffffb656ca11ff50] ret_from_fork at ffffffff8c000255 -- PID: 37824 TASK: ffff8fb033063d80 CPU: 20 COMMAND: "kworker/u97:451" 0 [ffffb656ce1abc28] __schedule at ffffffff8be629e3 1 [ffffb656ce1abcc8] schedule at ffffffff8be62fe8 2 [ffffb656ce1abcd0] schedule_timeout at ffffffff8be671ed 3 [ffffb656ce1abd70] wait_for_completion at ffffffff8be639cf 4 [ffffb656ce1abdd0] flush_work at ffffffff8b6ce2d5 5 [ffffb656ce1abe70] nvme_stop_ctrl at ffffffffc0144900 [nvme_core] 6 [ffffb656ce1abe80] nvme_fc_reset_ctrl_work at ffffffffc0243445 [nvme_fc] 7 [ffffb656ce1abe98] process_one_work at ffffffff8b6cd437 8 [ffffb656ce1abed8] worker_thread at ffffffff8b6cdb50 9 [ffffb656ce1abf10] kthread at ffffffff8b6d3402 10 [ffffb656ce1abf50] ret_from_fork at ffffffff8c000255 Link: https://lore.kernel.org/r/20200806111014.28434-10-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit dffa11453313a115157b19021cc2e27ea98e624c Author: Saurav Kashyap Date: Thu Aug 6 04:10:11 2020 -0700 scsi: qla2xxx: Check if FW supports MQ before enabling OS boot during Boot from SAN was stuck at dracut emergency shell after enabling NVMe driver parameter. For non-MQ support the driver was enabling MQ. Add a check to confirm if FW supports MQ. Link: https://lore.kernel.org/r/20200806111014.28434-9-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 897d68eb816bfae5ad9e870f68350dbb599d6e0e Author: Arun Easi Date: Thu Aug 6 04:10:10 2020 -0700 scsi: qla2xxx: Fix WARN_ON in qla_nvme_register_hba qla_nvme_register_hba() puts out a warning when there are not enough queue pairs available for FC-NVME. Just fail the NVME registration rather than a WARNING + call Trace. Link: https://lore.kernel.org/r/20200806111014.28434-8-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 49030003a38a5e3688781e2ccf9550dcebf61282 Author: Arun Easi Date: Thu Aug 6 04:10:09 2020 -0700 scsi: qla2xxx: Allow ql2xextended_error_logging special value 1 to be set anytime ql2xextended_error_logging can now be set to 1 to get the default mask value, as opposed to at module load time only. Link: https://lore.kernel.org/r/20200806111014.28434-7-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 81b9d1e19d62bf876c3985dbaf53a3a50eedd74b Author: Quinn Tran Date: Thu Aug 6 04:10:08 2020 -0700 scsi: qla2xxx: Reduce noisy debug message Update debug level and message for ELS IOCB done. Link: https://lore.kernel.org/r/20200806111014.28434-6-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit abb31aeaa9b20680b0620b23fea5475ea4591e31 Author: Quinn Tran Date: Thu Aug 6 04:10:07 2020 -0700 scsi: qla2xxx: Fix login timeout Multipath errors were seen during failback due to login timeout. The remote device sent LOGO, the local host tore down the session and did relogin. The RSCN arrived indicates remote device is going through failover after which the relogin is in a 20s timeout phase. At this point the driver is stuck in the relogin process. Add a fix to delete the session as part of abort/flush the login. Link: https://lore.kernel.org/r/20200806111014.28434-5-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 4709272f6327cc4a8ee1dc55771bcf9718346980 Author: Quinn Tran Date: Thu Aug 6 04:10:06 2020 -0700 scsi: qla2xxx: Indicate correct supported speeds for Mezz card Correct the supported speeds for 16G Mezz card. Link: https://lore.kernel.org/r/20200806111014.28434-4-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit a117579d0205b5a0592a3a98493e2b875e4da236 Author: Quinn Tran Date: Thu Aug 6 04:10:05 2020 -0700 scsi: qla2xxx: Flush I/O on zone disable Perform implicit logout to flush I/O on zone disable. Link: https://lore.kernel.org/r/20200806111014.28434-3-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 10ae30ba664822f62de169a61628e31c999c7cc8 Author: Quinn Tran Date: Thu Aug 6 04:10:04 2020 -0700 scsi: qla2xxx: Flush all sessions on zone disable On Zone Disable, certain switches would ignore all commands. This causes timeout for both switch scan command and abort of that command. On detection of this condition, all sessions will be shutdown. Link: https://lore.kernel.org/r/20200806111014.28434-2-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit d81665198b83e55a28339d1f3e4890ed8a434556 Author: Matthew Wilcox (Oracle) Date: Mon Aug 17 20:52:06 2020 +0100 block: Fix page_is_mergeable() for compound pages If we pass in an offset which is larger than PAGE_SIZE, then page_is_mergeable() thinks it's not mergeable with the previous bio_vec, leading to a large number of bio_vecs being used. Use a slightly more obvious test that the two pages are compatible with each other. Fixes: 52d52d1c98a9 ("block: only allow contiguous page structs in a bio_vec") Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit c314a014b1802d30f1dc50db18b2e7f5a77d19c6 Author: Enzo Matsumiya Date: Wed Aug 5 17:05:46 2020 -0300 scsi: qla2xxx: Use MBX_TOV_SECONDS for mailbox command timeout values Improves readability of qla_mbx.c. Link: https://lore.kernel.org/r/20200805200546.22497-1-ematsumiya@suse.de Reviewed-by: Himanshu Madhani Reviewed-by: Roman Bolshakov Signed-off-by: Enzo Matsumiya Signed-off-by: Martin K. Petersen commit 223f91b48079227f914657f07d2d686f7b60aa26 Author: Douglas Gilbert Date: Thu Aug 13 11:57:38 2020 -0400 scsi: scsi_debug: Fix scp is NULL errors John Garry reported 'sdebug_q_cmd_complete: scp is NULL' failures that were mainly seen on aarch64 machines (e.g. RPi 4 with four A72 CPUs). The problem was tracked down to a missing critical section on a "short circuit" path. Namely, the time to process the current command so far has already exceeded the requested command duration (i.e. the number of nanoseconds in the ndelay parameter). The random=1 parameter setting was pivotal in finding this error. The failure scenario involved first taking that "short circuit" path (due to a very short command duration) and then taking the more likely hrtimer_start() path (due to a longer command duration). With random=1 each command's duration is taken from the uniformly distributed [0..ndelay) interval. The fio utility also helped by reliably generating the error scenario at about once per minute on a RPi 4 (64 bit OS). Link: https://lore.kernel.org/r/20200813155738.109298-1-dgilbert@interlog.com Reported-by: John Garry Reviewed-by: Lee Duncan Signed-off-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 2d9a2c5f581be3991ba67fa9e7497c711220ea8e Author: Steffen Maier Date: Thu Aug 13 17:28:56 2020 +0200 scsi: zfcp: Fix use-after-free in request timeout handlers Before v4.15 commit 75492a51568b ("s390/scsi: Convert timers to use timer_setup()"), we intentionally only passed zfcp_adapter as context argument to zfcp_fsf_request_timeout_handler(). Since we only trigger adapter recovery, it was unnecessary to sync against races between timeout and (late) completion. Likewise, we only passed zfcp_erp_action as context argument to zfcp_erp_timeout_handler(). Since we only wakeup an ERP action, it was unnecessary to sync against races between timeout and (late) completion. Meanwhile the timeout handlers get timer_list as context argument and do a timer-specific container-of to zfcp_fsf_req which can have been freed. Fix it by making sure that any request timeout handlers, that might just have started before del_timer(), are completed by using del_timer_sync() instead. This ensures the request free happens afterwards. Space time diagram of potential use-after-free: Basic idea is to have 2 or more pending requests whose timeouts run out at almost the same time. req 1 timeout ERP thread req 2 timeout ---------------- ---------------- --------------------------------------- zfcp_fsf_request_timeout_handler fsf_req = from_timer(fsf_req, t, timer) adapter = fsf_req->adapter zfcp_qdio_siosl(adapter) zfcp_erp_adapter_reopen(adapter,...) zfcp_erp_strategy ... zfcp_fsf_req_dismiss_all list_for_each_entry_safe zfcp_fsf_req_complete 1 del_timer 1 zfcp_fsf_req_free 1 zfcp_fsf_req_complete 2 zfcp_fsf_request_timeout_handler del_timer 2 fsf_req = from_timer(fsf_req, t, timer) zfcp_fsf_req_free 2 adapter = fsf_req->adapter ^^^^^^^ already freed Link: https://lore.kernel.org/r/20200813152856.50088-1-maier@linux.ibm.com Fixes: 75492a51568b ("s390/scsi: Convert timers to use timer_setup()") Cc: #4.15+ Suggested-by: Julian Wiedmann Reviewed-by: Julian Wiedmann Signed-off-by: Steffen Maier Signed-off-by: Martin K. Petersen commit d87a1f6d021f401f99ae2ba8ccddb87dac921308 Author: Bean Huo Date: Tue Aug 11 16:18:59 2020 +0200 scsi: ufs: No need to send Abort Task if the task in DB was cleared If the bit corresponding to a task in the Doorbell register has been cleared, no need to poll the status of the task on the device side and to send an Abort Task TM. Instead, let it directly goto cleanup. In addition, to keep original debug output, move the goto below the debug print. Link: https://lore.kernel.org/r/20200811141859.27399-3-huobean@gmail.com Reviewed-by: Stanley Chu Reviewed-by: Can Guo Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit b10178ee7fa88b68a9e8adc06534d2605cb0ec23 Author: Stanley Chu Date: Tue Aug 11 16:18:58 2020 +0200 scsi: ufs: Clean up completed request without interrupt notification If somehow no interrupt notification is raised for a completed request and its doorbell bit is cleared by host, UFS driver needs to cleanup its outstanding bit in ufshcd_abort(). Otherwise, system may behave abnormally in the following scenario: After ufshcd_abort() returns, this request will be requeued by SCSI layer with its outstanding bit set. Any future completed request will trigger ufshcd_transfer_req_compl() to handle all "completed outstanding bits". At this time the "abnormal outstanding bit" will be detected and the "requeued request" will be chosen to execute request post-processing flow. This is wrong because this request is still "alive". Link: https://lore.kernel.org/r/20200811141859.27399-2-huobean@gmail.com Reviewed-by: Can Guo Acked-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 127d5f7c4b653b8be5eb3b2c7bbe13728f9003ff Author: Adrian Hunter Date: Tue Aug 11 16:39:36 2020 +0300 scsi: ufs: Improve interrupt handling for shared interrupts For shared interrupts, the interrupt status might be zero, so check that first. Link: https://lore.kernel.org/r/20200811133936.19171-2-adrian.hunter@intel.com Reviewed-by: Avri Altman Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit 6337f58cec030b34ced435b3d9d7d29d63c96e36 Author: Adrian Hunter Date: Tue Aug 11 16:39:35 2020 +0300 scsi: ufs: Fix interrupt error message for shared interrupts The interrupt might be shared, in which case it is not an error for the interrupt handler to be called when the interrupt status is zero, so don't print the message unless there was enabled interrupt status. Link: https://lore.kernel.org/r/20200811133936.19171-1-adrian.hunter@intel.com Fixes: 9333d7757348 ("scsi: ufs: Fix irq return code") Reviewed-by: Avri Altman Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit 8da76f71fef7d8a1a72af09d48899573feb60065 Author: Adrian Hunter Date: Mon Aug 10 17:10:24 2020 +0300 scsi: ufs-pci: Add quirk for broken auto-hibernate for Intel EHL Intel EHL UFS host controller advertises auto-hibernate capability but it does not work correctly. Add a quirk for that. [mkp: checkpatch fix] Link: https://lore.kernel.org/r/20200810141024.28859-1-adrian.hunter@intel.com Fixes: 8c09d7527697 ("scsi: ufshdc-pci: Add Intel PCI IDs for EHL") Acked-by: Stanley Chu Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit 215d326702516366a8dfa9624b67ba0761c22b86 Author: Stanley Chu Date: Sun Aug 9 13:57:02 2020 +0800 scsi: ufs-mediatek: Fix incorrect time to wait link status Fix incorrect calculation of "ms" based waiting time in function ufs_mtk_setup_clocks(). Link: https://lore.kernel.org/r/20200809055702.20140-1-stanley.chu@mediatek.com Fixes: 9006e3986f66 ("scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is not entered yet") Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 93b6c5db06028a3b55122bbb74d0715dd8ca4ae0 Author: Stanley Chu Date: Sun Aug 9 13:07:34 2020 +0800 scsi: ufs: Fix possible infinite loop in ufshcd_hold In ufshcd_suspend(), after clk-gating is suspended and link is set as Hibern8 state, ufshcd_hold() is still possibly invoked before ufshcd_suspend() returns. For example, MediaTek's suspend vops may issue UIC commands which would call ufshcd_hold() during the command issuing flow. Now if UFSHCD_CAP_HIBERN8_WITH_CLK_GATING capability is enabled, then ufshcd_hold() may enter infinite loops because there is no clk-ungating work scheduled or pending. In this case, ufshcd_hold() shall just bypass, and keep the link as Hibern8 state. Link: https://lore.kernel.org/r/20200809050734.18740-1-stanley.chu@mediatek.com Reviewed-by: Avri Altman Co-developed-by: Andy Teng Signed-off-by: Andy Teng Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit fa39ab5184d64563cd36f2fb5f0d3fbad83a432c Author: Mike Christie Date: Fri Aug 7 15:23:33 2020 -0500 scsi: fcoe: Fix I/O path allocation ixgbe_fcoe_ddp_setup() can be called from the main I/O path and is called with a spin_lock held, so we have to use GFP_ATOMIC allocation instead of GFP_KERNEL. Link: https://lore.kernel.org/r/1596831813-9839-1-git-send-email-michael.christie@oracle.com cc: Hannes Reinecke Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 2138d1c918246e3d8193c3cb8b6d22d0bb888061 Author: Jing Xiangfeng Date: Thu Aug 6 15:01:35 2020 +0800 scsi: ufs: ti-j721e-ufs: Fix error return in ti_j721e_ufs_probe() Fix to return error code PTR_ERR() from the error handling case instead of 0. Link: https://lore.kernel.org/r/20200806070135.67797-1-jingxiangfeng@huawei.com Fixes: 22617e216331 ("scsi: ufs: ti-j721e-ufs: Fix unwinding of pm_runtime changes") Reviewed-by: Avri Altman Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit 06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd Merge: 4cf7562190c79 5a4fe0624687e Author: Linus Torvalds Date: Mon Aug 17 17:15:23 2020 -0700 Merge tag 'pstore-v5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull mailmap update from Kees Cook: "This was originally part of my pstore tree, but when I realized that mailmap needed re-alphabetizing, I decided to wait until -rc1 to send this, as I saw a lot of mailmap additions pending in -next for the merge window. It's a programmatic reordering and the addition of a pstore contributor's preferred email address" * tag 'pstore-v5.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: mailmap: Add WeiXiong Liao mailmap: Restore dictionary sorting commit 4cf7562190c795f1f95be6ee0d161107d0dc5d49 Merge: 29e44f4535faa bf2bcd6f1a882 Author: Linus Torvalds Date: Mon Aug 17 17:09:50 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: "Another batch of fixes: 1) Remove nft_compat counter flush optimization, it generates warnings from the refcount infrastructure. From Florian Westphal. 2) Fix BPF to search for build id more robustly, from Jiri Olsa. 3) Handle bogus getopt lengths in ebtables, from Florian Westphal. 4) Infoleak and other fixes to j1939 CAN driver, from Eric Dumazet and Oleksij Rempel. 5) Reset iter properly on mptcp sendmsg() error, from Florian Westphal. 6) Show a saner speed in bonding broadcast mode, from Jarod Wilson. 7) Various kerneldoc fixes in bonding and elsewhere, from Lee Jones. 8) Fix double unregister in bonding during namespace tear down, from Cong Wang. 9) Disable RP filter during icmp_redirect selftest, from David Ahern" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (75 commits) otx2_common: Use devm_kcalloc() in otx2_config_npa() net: qrtr: fix usage of idr in port assignment to socket selftests: disable rp_filter for icmp_redirect.sh Revert "net: xdp: pull ethernet header off packet after computing skb->protocol" phylink: : fix function prototype kernel-doc warning mptcp: sendmsg: reset iter on error redux net: devlink: Remove overzealous WARN_ON with snapshots tipc: not enable tipc when ipv6 works as a module tipc: fix uninit skb->data in tipc_nl_compat_dumpit() net: Fix potential wrong skb->protocol in skb_vlan_untag() net: xdp: pull ethernet header off packet after computing skb->protocol ipvlan: fix device features bonding: fix a potential double-unregister can: j1939: add rxtimer for multipacket broadcast session can: j1939: abort multipacket broadcast session when timeout occurs can: j1939: cancel rxtimer on multipacket broadcast session complete can: j1939: fix support for multipacket broadcast message net: fddi: skfp: cfm: Remove seemingly unused variable 'ID_sccs' net: fddi: skfp: cfm: Remove set but unused variable 'oldstate' net: fddi: skfp: smt: Remove seemingly unused variable 'ID_sccs' ... commit bf2bcd6f1a8822ea45465f86d705951725883ee8 Author: Xu Wang Date: Mon Aug 17 02:04:13 2020 +0000 otx2_common: Use devm_kcalloc() in otx2_config_npa() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". Signed-off-by: Xu Wang Signed-off-by: David S. Miller commit 7c2308f79fc81ba0bf24ccd2429fb483a91bcd51 Author: Christoph Hellwig Date: Mon Aug 10 14:48:43 2020 +0200 PCI/P2PDMA: Fix build without DMA ops My commit to make DMA ops support optional missed the reference in the p2pdma code. And while the build bot didn't manage to find a config where this can happen, Matthew did. Fix this by replacing two IS_ENABLED checks with ifdefs. Fixes: 2f9237d4f6df ("dma-mapping: make support for dma ops optional") Link: https://lore.kernel.org/r/20200810124843.1532738-1-hch@lst.de Reported-by: Matthew Wilcox Signed-off-by: Christoph Hellwig Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe commit 8dfddfb79653df7c38a9c8c4c034f242a36acee9 Author: Necip Fazil Yildiran Date: Mon Aug 17 15:54:48 2020 +0000 net: qrtr: fix usage of idr in port assignment to socket Passing large uint32 sockaddr_qrtr.port numbers for port allocation triggers a warning within idr_alloc() since the port number is cast to int, and thus interpreted as a negative number. This leads to the rejection of such valid port numbers in qrtr_port_assign() as idr_alloc() fails. To avoid the problem, switch to idr_alloc_u32() instead. Fixes: bdabad3e363d ("net: Add Qualcomm IPC router") Reported-by: syzbot+f31428628ef672716ea8@syzkaller.appspotmail.com Signed-off-by: Necip Fazil Yildiran Reviewed-by: Dmitry Vyukov Signed-off-by: David S. Miller commit bcf7ddb0186d366f761f86196b480ea6dd2dc18c Author: David Ahern Date: Mon Aug 17 09:43:33 2020 -0600 selftests: disable rp_filter for icmp_redirect.sh h1 is initially configured to reach h2 via r1 rather than the more direct path through r2. If rp_filter is set and inherited for r2, forwarding fails since the source address of h1 is reachable from eth0 vs the packet coming to it via r1 and eth1. Since rp_filter setting affects the test, explicitly reset it. Signed-off-by: David Ahern Signed-off-by: David S. Miller commit cf28f3bbfca097d956f9021cb710dfad56adcc62 Author: Yonghong Song Date: Mon Aug 17 10:42:14 2020 -0700 bpf: Use get_file_rcu() instead of get_file() for task_file iterator With latest `bpftool prog` command, we observed the following kernel panic. BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page PGD dfe894067 P4D dfe894067 PUD deb663067 PMD 0 Oops: 0010 [#1] SMP CPU: 9 PID: 6023 ... RIP: 0010:0x0 Code: Bad RIP value. RSP: 0000:ffffc900002b8f18 EFLAGS: 00010286 RAX: ffff8883a405f400 RBX: ffff888e46a6bf00 RCX: 000000008020000c RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8883a405f400 RBP: ffff888e46a6bf50 R08: 0000000000000000 R09: ffffffff81129600 R10: ffff8883a405f300 R11: 0000160000000000 R12: 0000000000002710 R13: 000000e9494b690c R14: 0000000000000202 R15: 0000000000000009 FS: 00007fd9187fe700(0000) GS:ffff888e46a40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 0000000de5d33002 CR4: 0000000000360ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rcu_core+0x1a4/0x440 __do_softirq+0xd3/0x2c8 irq_exit+0x9d/0xa0 smp_apic_timer_interrupt+0x68/0x120 apic_timer_interrupt+0xf/0x20 RIP: 0033:0x47ce80 Code: Bad RIP value. RSP: 002b:00007fd9187fba40 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000002 RBX: 00007fd931789160 RCX: 000000000000010c RDX: 00007fd9308cdfb4 RSI: 00007fd9308cdfb4 RDI: 00007ffedd1ea0a8 RBP: 00007fd9187fbab0 R08: 000000000000000e R09: 000000000000002a R10: 0000000000480210 R11: 00007fd9187fc570 R12: 00007fd9316cc400 R13: 0000000000000118 R14: 00007fd9308cdfb4 R15: 00007fd9317a9380 After further analysis, the bug is triggered by Commit eaaacd23910f ("bpf: Add task and task/file iterator targets") which introduced task_file bpf iterator, which traverses all open file descriptors for all tasks in the current namespace. The latest `bpftool prog` calls a task_file bpf program to traverse all files in the system in order to associate processes with progs/maps, etc. When traversing files for a given task, rcu read_lock is taken to access all files in a file_struct. But it used get_file() to grab a file, which is not right. It is possible file->f_count is 0 and get_file() will unconditionally increase it. Later put_file() may cause all kind of issues with the above as one of sympotoms. The failure can be reproduced with the following steps in a few seconds: $ cat t.c #include #include #include #include #include #define N 10000 int fd[N]; int main() { int i; for (i = 0; i < N; i++) { fd[i] = open("./note.txt", 'r'); if (fd[i] < 0) { fprintf(stderr, "failed\n"); return -1; } } for (i = 0; i < N; i++) close(fd[i]); return 0; } $ gcc -O2 t.c $ cat run.sh #/bin/bash for i in {1..100} do while true; do ./a.out; done & done $ ./run.sh $ while true; do bpftool prog >& /dev/null; done This patch used get_file_rcu() which only grabs a file if the file->f_count is not zero. This is to ensure the file pointer is always valid. The above reproducer did not fail for more than 30 minutes. Fixes: eaaacd23910f ("bpf: Add task and task/file iterator targets") Suggested-by: Josef Bacik Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Reviewed-by: Josef Bacik Link: https://lore.kernel.org/bpf/20200817174214.252601-1-yhs@fb.com commit 5a4fe0624687e62919a5913dc7c937fbfcf61fdc Author: Kees Cook Date: Wed Jul 29 14:28:15 2020 -0700 mailmap: Add WeiXiong Liao WeiXiong Liao noted to me offlist that his preference for email address had changed and that he'd like it updated in the mailmap so people discussing pstore/blk would be able to reach him. Cc: WeiXiong Liao Signed-off-by: Kees Cook commit d6bd5201f7eaa9c15ea9b0f8ff17dd7bc3b9d78f Author: Kees Cook Date: Wed Jul 29 14:36:42 2020 -0700 mailmap: Restore dictionary sorting Several names had been recently appended (instead of inserted). While git-shortlog doesn't need this file to be sorted, it helps humans to keep it organized this way. Sort the entire file (which includes some minor shuffling for dictionary order). Done with the following commands: grep -E '^(#|$)' .mailmap > .mailmap.head grep -Ev '^(#|$)' .mailmap > .mailmap.body sort -f .mailmap.body > .mailmap.body.sort cat .mailmap.head .mailmap.body.sort > .mailmap rm .mailmap.head .mailmap.body.sort Signed-off-by: Kees Cook commit 62c789270c0b1ed5598c6b87c53b6908cd3c6eb5 Author: Zqiang Date: Wed Aug 12 16:55:01 2020 +0800 libnvdimm: KASAN: global-out-of-bounds Read in internal_create_group Because the last member of the "nvdimm_firmware_attributes" array was not assigned a null ptr, when traversal of "grp->attrs" array is out of bounds in "create_files" func. func: create_files: ->for (i = 0, attr = grp->attrs; *attr && !error; i++, attr++) ->.... BUG: KASAN: global-out-of-bounds in create_files fs/sysfs/group.c:43 [inline] BUG: KASAN: global-out-of-bounds in internal_create_group+0x9d8/0xb20 fs/sysfs/group.c:149 Read of size 8 at addr ffffffff8a2e4cf0 by task kworker/u17:10/959 CPU: 2 PID: 959 Comm: kworker/u17:10 Not tainted 5.8.0-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 Workqueue: events_unbound async_run_entry_fn Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0x5/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 create_files fs/sysfs/group.c:43 [inline] internal_create_group+0x9d8/0xb20 fs/sysfs/group.c:149 internal_create_groups.part.0+0x90/0x140 fs/sysfs/group.c:189 internal_create_groups fs/sysfs/group.c:185 [inline] sysfs_create_groups+0x25/0x50 fs/sysfs/group.c:215 device_add_groups drivers/base/core.c:2024 [inline] device_add_attrs drivers/base/core.c:2178 [inline] device_add+0x7fd/0x1c40 drivers/base/core.c:2881 nd_async_device_register+0x12/0x80 drivers/nvdimm/bus.c:506 async_run_entry_fn+0x121/0x530 kernel/async.c:123 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:292 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the variable: nvdimm_firmware_attributes+0x10/0x40 Link: https://lore.kernel.org/r/20200812085501.30963-1-qiang.zhang@windriver.com Link: https://lore.kernel.org/r/20200814150509.225615-1-vaibhav@linux.ibm.com Fixes: 48001ea50d17f ("PM, libnvdimm: Add runtime firmware activation support") Reported-by: syzbot+1cf0ffe61aecf46f588f@syzkaller.appspotmail.com Reported-by: Sandipan Das Reported-by: Vaibhav Jain Reviewed-by: Ira Weiny Signed-off-by: Zqiang Signed-off-by: Vishal Verma commit 20925fe84463ef87a01b0b536768c39544eae89b Author: Sharat Masetty Date: Mon Jul 13 18:11:43 2020 +0530 drm: msm: a6xx: use dev_pm_opp_set_bw to scale DDR This patches replaces the previously used static DDR vote and uses dev_pm_opp_set_bw() to scale GPU->DDR bandwidth along with scaling GPU frequency. Also since the icc path voting is handled completely in the opp driver, remove the icc_path handle and its usage in the drm driver. Signed-off-by: Sharat Masetty Signed-off-by: Akhil P Oommen Signed-off-by: Rob Clark commit f49c7faf776f16607c948d852a03b04a88c3b583 Author: Colin Ian King Date: Mon Aug 17 12:32:08 2020 +0100 of/address: check for invalid range.cpu_addr Currently invalid CPU addresses are not being sanity checked resulting in SATA setup failure on a SynQuacer SC2A11 development machine. The original check was removed by and earlier commit, so add a sanity check back in to avoid this regression. Fixes: 7a8b64d17e35 ("of/address: use range parser for of_dma_get_range") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200817113208.523805-1-colin.king@canonical.com Signed-off-by: Rob Herring commit 352c83fb39cae3eff95a8e1ed23006291abb6196 Author: Rob Clark Date: Mon Aug 17 09:23:09 2020 -0700 drm/msm/gpu: make ringbuffer readonly The GPU has no business writing into the ringbuffer, let's make it readonly to the GPU. Fixes: 7198e6b03155 ("drm/msm: add a3xx gpu support") Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit f228af11dfa1d1616bc67f3a4119ab77c36181f1 Author: Rob Clark Date: Wed Aug 12 17:03:09 2020 -0700 drm/msm/adreno: fix updating ring fence We need to set it to the most recent completed fence, not the most recent submitted. Otherwise we have races where we think we can retire submits that the GPU is not finished with, if the GPU doesn't manage to overwrite the seqno before we look at it. This can show up with hang recovery if one of the submits after the crashing submit also hangs after it is replayed. Fixes: f97decac5f4c ("drm/msm: Support multiple ringbuffers") Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit cb957adb4ea422bd758568df5b2478ea3bb34f35 Author: Jim Mattson Date: Mon Aug 17 11:16:54 2020 -0700 kvm: x86: Toggling CR4.PKE does not load PDPTEs in PAE mode See the SDM, volume 3, section 4.4.1: If PAE paging would be in use following an execution of MOV to CR0 or MOV to CR4 (see Section 4.1.1) and the instruction is modifying any of CR0.CD, CR0.NW, CR0.PG, CR4.PAE, CR4.PGE, CR4.PSE, or CR4.SMEP; then the PDPTEs are loaded from the address in CR3. Fixes: b9baba8614890 ("KVM, pkeys: expose CPUID/CR4 to guest") Cc: Huaitong Han Signed-off-by: Jim Mattson Reviewed-by: Peter Shier Reviewed-by: Oliver Upton Message-Id: <20200817181655.3716509-1-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 35c719da95c0d28560bff7bafeaf07ebb212665e Author: Rob Clark Date: Tue Aug 11 14:09:35 2020 -0700 drm/msm/dpu: fix unitialized variable error drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c:817 dpu_crtc_enable() error: uninitialized symbol 'request_bandwidth'. Reported-by: kernel test robot Signed-off-by: Rob Clark Reviewed-by: Sean Paul Signed-off-by: Rob Clark commit 427890aff8558eb4326e723835e0eae0e6fe3102 Author: Jim Mattson Date: Mon Aug 17 11:16:55 2020 -0700 kvm: x86: Toggling CR4.SMAP does not load PDPTEs in PAE mode See the SDM, volume 3, section 4.4.1: If PAE paging would be in use following an execution of MOV to CR0 or MOV to CR4 (see Section 4.1.1) and the instruction is modifying any of CR0.CD, CR0.NW, CR0.PG, CR4.PAE, CR4.PGE, CR4.PSE, or CR4.SMEP; then the PDPTEs are loaded from the address in CR3. Fixes: 0be0226f07d14 ("KVM: MMU: fix SMAP virtualization") Cc: Xiao Guangrong Signed-off-by: Jim Mattson Reviewed-by: Peter Shier Reviewed-by: Oliver Upton Message-Id: <20200817181655.3716509-2-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 4c978caf08aa155bdeadd9e2d4b026d4ce97ebd0 Author: Kalyan Thota Date: Thu Jul 30 19:08:56 2020 +0530 drm/msm/dpu: Fix scale params in plane validation Plane validation uses an API drm_calc_scale which will return src/dst value as a scale ratio. when viewing the range on a scale the values should fall in as Upscale ratio < Unity scale < Downscale ratio for src/dst formula Fix the min and max scale ratios to suit the API accordingly. Signed-off-by: Kalyan Thota Tested-by: Kristian H. Kristensen Reviewed-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit ccc862b957c6413b008fbe458034372847992d7f Author: Kalyan Thota Date: Mon Aug 10 18:19:18 2020 +0530 drm/msm/dpu: Fix reservation failures in modeset In TEST_ONLY commit, rm global_state will duplicate the object and request for new reservations, once they pass then the new state will be swapped with the old and will be available for the Atomic Commit. This patch fixes some of missing links in the resource reservation sequence mentioned above. 1) Creation of duplicate state in test_only commit (Rob) 2) Allocate and release the resources on every modeset. 3) Avoid allocation only when active is false. In a modeset operation, swap state happens well before disable. Hence clearing reservations in disable will cause failures in modeset enable. Allow reservations to be cleared/allocated before swap, such that only newly committed resources are pushed to HW. Changes in v1: - Move the rm release to atomic_check. - Ensure resource allocation and free happens when active is not changed i.e only when mode is changed.(Rob) Changes in v2: - Handle dpu_kms_get_global_state API failure as it may return EDEADLK (swboyd). Signed-off-by: Kalyan Thota Signed-off-by: Rob Clark commit 19cf4b7eefc3040192bccb10c322e4c831bb0eb0 Author: Paolo Bonzini Date: Mon Aug 17 13:53:04 2020 -0400 KVM: x86: fix access code passed to gva_to_gpa The PK bit of the error code is computed dynamically in permission_fault and therefore need not be passed to gva_to_gpa: only the access bits (fetch, user, write) need to be passed down. Not doing so causes a splat in the pku test: WARNING: CPU: 25 PID: 5465 at arch/x86/kvm/mmu.h:197 paging64_walk_addr_generic+0x594/0x750 [kvm] Hardware name: Intel Corporation WilsonCity/WilsonCity, BIOS WLYDCRB1.SYS.0014.D62.2001092233 01/09/2020 RIP: 0010:paging64_walk_addr_generic+0x594/0x750 [kvm] Code: <0f> 0b e9 db fe ff ff 44 8b 43 04 4c 89 6c 24 30 8b 13 41 39 d0 89 RSP: 0018:ff53778fc623fb60 EFLAGS: 00010202 RAX: 0000000000000001 RBX: ff53778fc623fbf0 RCX: 0000000000000007 RDX: 0000000000000001 RSI: 0000000000000002 RDI: ff4501efba818000 RBP: 0000000000000020 R08: 0000000000000005 R09: 00000000004000e7 R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000007 R13: ff4501efba818388 R14: 10000000004000e7 R15: 0000000000000000 FS: 00007f2dcf31a700(0000) GS:ff4501f1c8040000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000001dea475005 CR4: 0000000000763ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: paging64_gva_to_gpa+0x3f/0xb0 [kvm] kvm_fixup_and_inject_pf_error+0x48/0xa0 [kvm] handle_exception_nmi+0x4fc/0x5b0 [kvm_intel] kvm_arch_vcpu_ioctl_run+0x911/0x1c10 [kvm] kvm_vcpu_ioctl+0x23e/0x5d0 [kvm] ksys_ioctl+0x92/0xb0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x3e/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ---[ end trace d17eb998aee991da ]--- Reported-by: Sean Christopherson Fixes: 897861479c064 ("KVM: x86: Add helper functions for illegal GPA checking and page fault injection") Signed-off-by: Paolo Bonzini commit bd05220c7be3356046861c317d9c287ca50445ba Author: Jessica Clarke Date: Tue Aug 11 19:24:57 2020 +0100 arch/ia64: Restore arch-specific pgd_offset_k implementation IA-64 is special and treats pgd_offset_k() differently to pgd_offset(), using different formulae to calculate the indices into the kernel and user PGDs. The index into the user PGDs takes into account the region number, but the index into the kernel (init_mm) PGD always assumes a predefined kernel region number. Commit 974b9b2c68f3 ("mm: consolidate pte_index() and pte_offset_*() definitions") made IA-64 use a generic pgd_offset_k() which incorrectly used pgd_index() for kernel page tables. As a result, the index into the kernel PGD was going out of bounds and the kernel hung during early boot. Allow overrides of pgd_offset_k() and override it on IA-64 with the old implementation that will correctly index the kernel PGD. Fixes: 974b9b2c68f3 ("mm: consolidate pte_index() and pte_offset_*() definitions") Reported-by: John Paul Adrian Glaubitz Signed-off-by: Jessica Clarke Tested-by: John Paul Adrian Glaubitz Acked-by: Tony Luck Signed-off-by: Mike Rapoport commit 7f9bf6e82461b97ce43a912cb4a959c5a41367ac Author: David S. Miller Date: Mon Aug 17 11:48:05 2020 -0700 Revert "net: xdp: pull ethernet header off packet after computing skb->protocol" This reverts commit f8414a8d886b613b90d9fdf7cda6feea313b1069. eth_type_trans() does the necessary pull on the skb. Signed-off-by: David S. Miller commit 0b76e642f9ad2471e899e2dd71b9543b7e85e9f6 Author: Randy Dunlap Date: Sun Aug 16 15:25:49 2020 -0700 phylink: : fix function prototype kernel-doc warning Fix a kernel-doc warning for the pcs_config() function prototype: ../include/linux/phylink.h:406: warning: Excess function parameter 'permit_pause_to_mac' description in 'pcs_config' Fixes: 7137e18f6f88 ("net: phylink: add struct phylink_pcs") Signed-off-by: Randy Dunlap Cc: Russell King Cc: David S. Miller Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit d8d0db7bb358ef65d60726a61bfcd08eccff0bc0 Author: Tom Yan Date: Tue Aug 18 01:20:11 2020 +0800 ALSA: usb-audio: ignore broken processing/extension unit Some devices have broken extension unit where getting current value doesn't work. Attempt that once when creating mixer control for it. If it fails, just ignore it, so that it won't cripple the device entirely (and/or make the error floods). Signed-off-by: Tom Yan Link: https://lore.kernel.org/r/5f3abc52.1c69fb81.9cf2.fe91@mx.google.com Signed-off-by: Takashi Iwai commit 98b0bf02738004829d7e26d6cb47b2e469aaba86 Author: Yang Weijiang Date: Fri Aug 14 21:21:05 2020 +0800 selftests: kvm: Use a shorter encoding to clear RAX If debug_regs.c is built with newer binutils, the resulting binary is "optimized" by the assembler: asm volatile("ss_start: " "xor %%rax,%%rax\n\t" "cpuid\n\t" "movl $0x1a0,%%ecx\n\t" "rdmsr\n\t" : : : "rax", "ecx"); is translated to : 000000000040194e : 40194e: 31 c0 xor %eax,%eax <----- rax->eax? 401950: 0f a2 cpuid 401952: b9 a0 01 00 00 mov $0x1a0,%ecx 401957: 0f 32 rdmsr As you can see rax is replaced with eax in target binary code. This causes a difference is the length of xor instruction (2 Byte vs 3 Byte), and makes the hard-coded instruction length check fail: /* Instruction lengths starting at ss_start */ int ss_size[4] = { 3, /* xor */ <-------- 2 or 3? 2, /* cpuid */ 5, /* mov */ 2, /* rdmsr */ }; Encode the shorter version directly and, while at it, fix the "clobbers" of the asm. Cc: stable@vger.kernel.org Signed-off-by: Yang Weijiang Signed-off-by: Paolo Bonzini commit 77ef38574beb3e0b414db48e9c0f04633df68ba6 Author: Daniel Vetter Date: Fri Aug 14 11:38:42 2020 +0200 drm/modeset-lock: Take the modeset BKL for legacy drivers This fell off in the conversion in commit 9bcaa3fe58ab7559e71df798bcff6e0795158695 Author: Michal Orzel Date: Tue Apr 28 19:10:04 2020 +0200 drm: Replace drm_modeset_lock/unlock_all with DRM_MODESET_LOCK_ALL_* helpers but it's caught by the drm_warn_on_modeset_not_all_locked() that the legacy modeset code uses. Since this is the bkl and it's unclear what's all protected, play it safe and grab it again for legacy drivers. Unfortunately this means we need to sprinkle a few more #includes around. Also we need to add the drm_device as a parameter to the _END macro. Finally remove the mute_lock() from setcrtc, since that's now done by the macro. Cc: Alex Deucher References: https://gitlab.freedesktop.org/drm/amd/-/issues/1224 Fixes: 9bcaa3fe58ab ("drm: Replace drm_modeset_lock/unlock_all with DRM_MODESET_LOCK_ALL_* helpers") Cc: Michal Orzel Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Cc: # v5.8+ Signed-off-by: Daniel Vetter Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200814093842.3048472-1-daniel.vetter@ffwll.ch commit aae7a75a821a793ed6b8ad502a5890fb8e8f172d Author: Alex Williamson Date: Mon Aug 17 11:09:13 2020 -0600 vfio/type1: Add proper error unwind for vfio_iommu_replay() The vfio_iommu_replay() function does not currently unwind on error, yet it does pin pages, perform IOMMU mapping, and modify the vfio_dma structure to indicate IOMMU mapping. The IOMMU mappings are torn down when the domain is destroyed, but the other actions go on to cause trouble later. For example, the iommu->domain_list can be empty if we only have a non-IOMMU backed mdev attached. We don't currently check if the list is empty before getting the first entry in the list, which leads to a bogus domain pointer. If a vfio_dma entry is erroneously marked as iommu_mapped, we'll attempt to use that bogus pointer to retrieve the existing physical page addresses. This is the scenario that uncovered this issue, attempting to hot-add a vfio-pci device to a container with an existing mdev device and DMA mappings, one of which could not be pinned, causing a failure adding the new group to the existing container and setting the conditions for a subsequent attempt to explode. To resolve this, we can first check if the domain_list is empty so that we can reject replay of a bogus domain, should we ever encounter this inconsistent state again in the future. The real fix though is to add the necessary unwind support, which means cleaning up the current pinning if an IOMMU mapping fails, then walking back through the r-b tree of DMA entries, reading from the IOMMU which ranges are mapped, and unmapping and unpinning those ranges. To be able to do this, we also defer marking the DMA entry as IOMMU mapped until all entries are processed, in order to allow the unwind to know the disposition of each entry. Fixes: a54eb55045ae ("vfio iommu type1: Add support for mediated devices") Reported-by: Zhiyi Guo Tested-by: Zhiyi Guo Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit bc93b9ae0151ae5ad5b8504cdc598428ea99570b Author: Alex Williamson Date: Mon Aug 17 11:08:18 2020 -0600 vfio-pci: Avoid recursive read-lock usage A down_read on memory_lock is held when performing read/write accesses to MMIO BAR space, including across the copy_to/from_user() callouts which may fault. If the user buffer for these copies resides in an mmap of device MMIO space, the mmap fault handler will acquire a recursive read-lock on memory_lock. Avoid this by reducing the lock granularity. Sequential accesses requiring multiple ioread/iowrite cycles are expected to be rare, therefore typical accesses should not see additional overhead. VGA MMIO accesses are expected to be non-fatal regardless of the PCI memory enable bit to allow legacy probing, this behavior remains with a comment added. ioeventfds are now included in memory access testing, with writes dropped while memory space is disabled. Fixes: abafbc551fdd ("vfio-pci: Invalidate mmaps and block MMIO access on disabled memory") Reported-by: Zhiyi Guo Tested-by: Zhiyi Guo Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit a97ea93ed5b64704a2171c505355c12ab427b1b1 Author: Joe Perches Date: Tue Jul 21 21:57:43 2020 -0700 Makefile.extrawarn: Move sign-compare from W=2 to W=3 This -Wsign-compare compiler warning can be very noisy and most of the suggested conversions are unnecessary. Make the warning W=3 so it's described under the "can most likely be ignored" block. Signed-off-by: Joe Perches Signed-off-by: Masahiro Yamada commit 29e44f4535faa71a70827af3639b5e6762d8f02a Author: David Howells Date: Mon Aug 17 11:07:28 2020 +0100 watch_queue: Limit the number of watches a user can hold Impose a limit on the number of watches that a user can hold so that they can't use this mechanism to fill up all the available memory. This is done by putting a counter in user_struct that's incremented when a watch is allocated and decreased when it is released. If the number exceeds the RLIMIT_NOFILE limit, the watch is rejected with EAGAIN. This can be tested by the following means: (1) Create a watch queue and attach it to fd 5 in the program given - in this case, bash: keyctl watch_session /tmp/nlog /tmp/gclog 5 bash (2) In the shell, set the maximum number of files to, say, 99: ulimit -n 99 (3) Add 200 keyrings: for ((i=0; i<200; i++)); do keyctl newring a$i @s || break; done (4) Try to watch all of the keyrings: for ((i=0; i<200; i++)); do echo $i; keyctl watch_add 5 %:a$i || break; done This should fail when the number of watches belonging to the user hits 99. (5) Remove all the keyrings and all of those watches should go away: for ((i=0; i<200; i++)); do keyctl unlink %:a$i; done (6) Kill off the watch queue by exiting the shell spawned by watch_session. Fixes: c73be61cede5 ("pipe: Add general notification queue support") Reported-by: Linus Torvalds Signed-off-by: David Howells Reviewed-by: Jarkko Sakkinen Signed-off-by: Linus Torvalds commit 88fee1c9007a38c19f2c558dc0ab1ddb4c323dc5 Author: Bhawanpreet Lakha Date: Fri Aug 14 13:01:40 2020 -0400 drm/dp_mst: Don't return error code when crtc is null [Why] In certain cases the crtc can be NULL and returning -EINVAL causes atomic check to fail when it shouln't. This leads to valid configurations failing because atomic check fails. [How] Don't early return if crtc is null Signed-off-by: Bhawanpreet Lakha Reviewed-by: Lyude Paul [added stable cc] Signed-off-by: Lyude Paul Fixes: 8ec046716ca8 ("drm/dp_mst: Add helper to trigger modeset on affected DSC MST CRTCs") Cc: # v5.6+ Link: https://patchwork.freedesktop.org/patch/msgid/20200814170140.24917-1-Bhawanpreet.Lakha@amd.com commit 0ff5a4812be4ebd4782bbb555d369636eea164f7 Author: Dinh Nguyen Date: Fri Jul 31 10:26:40 2020 -0500 ARM: dts: socfpga: fix register entry for timer3 on Arria10 Fixes the register address for the timer3 entry on Arria10. Fixes: 475dc86d08de4 ("arm: dts: socfpga: Add a base DTSI for Altera's Arria10 SOC") Signed-off-by: Dinh Nguyen commit af822aa68fbdf0a480a17462ed70232998127453 Author: Ming Lei Date: Mon Aug 17 17:52:40 2020 +0800 block: virtio_blk: fix handling single range discard request 1f23816b8eb8 ("virtio_blk: add discard and write zeroes support") starts to support multi-range discard for virtio-blk. However, the virtio-blk disk may report max discard segment as 1, at least that is exactly what qemu is doing. So far, block layer switches to normal request merge if max discard segment limit is 1, and multiple bios can be merged to single segment. This way may cause memory corruption in virtblk_setup_discard_write_zeroes(). Fix the issue by handling single max discard segment in straightforward way. Fixes: 1f23816b8eb8 ("virtio_blk: add discard and write zeroes support") Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Cc: Changpeng Liu Cc: Daniel Verkamp Cc: Michael S. Tsirkin Cc: Stefan Hajnoczi Cc: Stefano Garzarella Signed-off-by: Jens Axboe commit 943b40c832beb71115e38a1c4d99b640b5342738 Author: Ming Lei Date: Mon Aug 17 17:52:39 2020 +0800 block: respect queue limit of max discard segment When queue_max_discard_segments(q) is 1, blk_discard_mergable() will return false for discard request, then normal request merge is applied. However, only queue_max_segments() is checked, so max discard segment limit isn't respected. Check max discard segment limit in the request merge code for fixing the issue. Discard request failure of virtio_blk is fixed. Fixes: 69840466086d ("block: fix the DISCARD request merge") Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Cc: Stefano Garzarella Signed-off-by: Jens Axboe commit bcb21c8cc9947286211327d663ace69f07d37a76 Author: Ming Lei Date: Mon Aug 17 18:01:30 2020 +0800 block: loop: set discard granularity and alignment for block device backed loop In case of block device backend, if the backend supports write zeros, the loop device will set queue flag of QUEUE_FLAG_DISCARD. However, limits.discard_granularity isn't setup, and this way is wrong, see the following description in Documentation/ABI/testing/sysfs-block: A discard_granularity of 0 means that the device does not support discard functionality. Especially 9b15d109a6b2 ("block: improve discard bio alignment in __blkdev_issue_discard()") starts to take q->limits.discard_granularity for computing max discard sectors. And zero discard granularity may cause kernel oops, or fail discard request even though the loop queue claims discard support via QUEUE_FLAG_DISCARD. Fix the issue by setup discard granularity and alignment. Fixes: c52abf563049 ("loop: Better discard support for block devices") Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Acked-by: Coly Li Cc: Hannes Reinecke Cc: Xiao Ni Cc: Martin K. Petersen Cc: Evan Green Cc: Gwendal Grignou Cc: Chaitanya Kulkarni Cc: Andrzej Pietrasiewicz Cc: Christoph Hellwig Cc: Signed-off-by: Jens Axboe commit 4eb2e13415757a2bce5bb0d580d22bbeef1f5346 Author: Sabrina Dubroca Date: Thu Aug 13 16:24:04 2020 +0200 espintcp: restore IP CB before handing the packet to xfrm Xiumei reported a bug with espintcp over IPv6 in transport mode, because xfrm6_transport_finish expects to find IP6CB data (struct inet6_skb_cb). Currently, espintcp zeroes the CB, but the relevant part is actually preserved by previous layers (first set up by tcp, then strparser only zeroes a small part of tcp_skb_tb), so we can just relocate it to the start of skb->cb. Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)") Reported-by: Xiumei Mu Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert commit d7d8535f377e9ba87edbf7fbbd634ac942f3f54f Author: Ming Lei Date: Mon Aug 17 18:01:15 2020 +0800 blk-mq: order adding requests to hctx->dispatch and checking SCHED_RESTART SCHED_RESTART code path is relied to re-run queue for dispatch requests in hctx->dispatch. Meantime the SCHED_RSTART flag is checked when adding requests to hctx->dispatch. memory barriers have to be used for ordering the following two pair of OPs: 1) adding requests to hctx->dispatch and checking SCHED_RESTART in blk_mq_dispatch_rq_list() 2) clearing SCHED_RESTART and checking if there is request in hctx->dispatch in blk_mq_sched_restart(). Without the added memory barrier, either: 1) blk_mq_sched_restart() may miss requests added to hctx->dispatch meantime blk_mq_dispatch_rq_list() observes SCHED_RESTART, and not run queue in dispatch side or 2) blk_mq_dispatch_rq_list still sees SCHED_RESTART, and not run queue in dispatch side, meantime checking if there is request in hctx->dispatch from blk_mq_sched_restart() is missed. IO hang in ltp/fs_fill test is reported by kernel test robot: https://lkml.org/lkml/2020/7/26/77 Turns out it is caused by the above out-of-order OPs. And the IO hang can't be observed any more after applying this patch. Fixes: bd166ef183c2 ("blk-mq-sched: add framework for MQ capable IO schedulers") Reported-by: kernel test robot Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Cc: Bart Van Assche Cc: Christoph Hellwig Cc: David Jeffery Cc: Signed-off-by: Jens Axboe commit fdc6edbb31fba76fd25d7bd016b675a92908d81e Author: Christophe Leroy Date: Mon Aug 17 06:03:26 2020 +0000 powerpc/fixmap: Fix the size of the early debug area Commit ("03fd42d458fb powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when page size is 256k") reworked the setup of the early debug area and mistakenly replaced 128 * 1024 by SZ_128. Change to SZ_128K to restore the original 128 kbytes size of the area. Fixes: 03fd42d458fb ("powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when page size is 256k") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/996184974d674ff984643778cf1cdd7fe58cc065.1597644194.git.christophe.leroy@csgroup.eu commit 1e4e4bcaf70ec89f8b499c93a83d078c1e5c0ea6 Author: Aneesh Kumar K.V Date: Mon Aug 17 16:03:01 2020 +0530 powerpc/pkeys: Fix build error with PPC_MEM_KEYS disabled IS_ENABLED() instead of #ifdef still requires variable declaration. In this specific case, default_uamor is declared in asm/pkeys.h which is only included if PPC_MEM_KEYS is enabled. arch/powerpc/mm/book3s64/hash_utils.c: In function ‘hash__early_init_mmu_secondary’: arch/powerpc/mm/book3s64/hash_utils.c:1119:21: error: ‘default_uamor’ undeclared (first use in this function) 1119 | mtspr(SPRN_UAMOR, default_uamor); | ^~~~~~~~~~~~~ Fixes: 6553fb799f60 ("powerpc/pkeys: Fix boot failures with Nemo board (A-EON AmigaOne X1000)") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200817103301.158836-1-aneesh.kumar@linux.ibm.com commit bc9a2e226ea95e1699f7590845554de095308b75 Author: Thinh Nguyen Date: Thu Aug 6 19:46:35 2020 -0700 usb: dwc3: gadget: Handle ZLP for sg requests Currently dwc3 doesn't handle usb_request->zero for SG requests. This change checks and prepares extra TRBs for the ZLP for SG requests. Cc: # v4.5+ Fixes: 04c03d10e507 ("usb: dwc3: gadget: handle request->zero") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit d2ee3ff79e6a3d4105e684021017d100524dc560 Author: Thinh Nguyen Date: Thu Aug 6 19:46:29 2020 -0700 usb: dwc3: gadget: Fix handling ZLP The usb_request->zero doesn't apply for isoc. Also, if we prepare a 0-length (ZLP) TRB for the OUT direction, we need to prepare an extra TRB to pad up to the MPS alignment. Use the same bounce buffer for the ZLP TRB and the extra pad TRB. Cc: # v4.5+ Fixes: d6e5a549cc4d ("usb: dwc3: simplify ZLP handling") Fixes: 04c03d10e507 ("usb: dwc3: gadget: handle request->zero") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit 5d187c0454ef4c5e046a81af36882d4d515922ec Author: Thinh Nguyen Date: Thu Aug 6 19:46:23 2020 -0700 usb: dwc3: gadget: Don't setup more than requested The SG list may be set up with entry size more than the requested length. Check the usb_request->length and make sure that we don't setup the TRBs to send/receive more than requested. This case may occur when the SG entry is allocated up to a certain minimum size, but the request length is less than that. It can also occur when the request is reused for a different request length. Cc: # v4.18+ Fixes: a31e63b608ff ("usb: dwc3: gadget: Correct handling of scattergather lists") Signed-off-by: Thinh Nguyen Signed-off-by: Felipe Balbi commit a577f3456c0a2fac3dee037c483753e6e68f3e49 Author: Michał Mirosław Date: Wed Aug 12 03:31:38 2020 +0200 regulator: remove superfluous lock in regulator_resolve_coupling() The code modifies rdev, but locks c_rdev instead. Remove the lock as this is held together by regulator_list_mutex taken in the caller. Fixes: f9503385b187 ("regulator: core: Mutually resolve regulators coupling") Signed-off-by: Michał Mirosław Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/25eb81cefb37a646f3e44eaaf1d8ae8881cfde52.1597195321.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 2dbf085594370abc1453356518719300d8a7acc1 Author: Michał Mirosław Date: Wed Aug 12 03:31:37 2020 +0200 regulator: cleanup regulator_ena_gpio_free() Since only regulator_ena_gpio_request() allocates rdev->ena_pin, and it guarantees that same gpiod gets same pin structure, it is enough to compare just the pointers. Also we know there can be only one matching entry on the list. Rework the code take advantage of the facts. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/3ff002c7aa3bd774491af4291a9df23541fcf892.1597195321.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit d3c731564e09b6c2ebefcd1344743a91a237d6dc Author: Michał Mirosław Date: Wed Aug 12 03:31:36 2020 +0200 regulator: plug of_node leak in regulator_register()'s error path By calling device_initialize() earlier and noting that kfree(NULL) is ok, we can save a bit of code in error handling and plug of_node leak. Fixed commit already did part of the work. Fixes: 9177514ce349 ("regulator: fix memory leak on error path of regulator_register()") Signed-off-by: Michał Mirosław Reviewed-by: Vladimir Zapolskiy Acked-by: Vladimir Zapolskiy Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/f5035b1b4d40745e66bacd571bbbb5e4644d21a1.1597195321.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 5c06540165d443c6455123eb48e7f1a9b618ab34 Author: Michał Mirosław Date: Wed Aug 12 03:31:36 2020 +0200 regulator: push allocation in set_consumer_device_supply() out of lock Pull regulator_list_mutex into set_consumer_device_supply() and keep allocations outside of it. Fourth of the fs_reclaim deadlock case. Fixes: 45389c47526d ("regulator: core: Add early supply resolution for regulators") Signed-off-by: Michał Mirosław Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/f0380bdb3d60aeefa9693c4e234d2dcda7e56747.1597195321.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 87fe29b61f9522a3d7b60a4580851f548558186f Author: Michał Mirosław Date: Wed Aug 12 03:31:35 2020 +0200 regulator: push allocations in create_regulator() outside of lock Move all allocations outside of the regulator_lock()ed section. ====================================================== WARNING: possible circular locking dependency detected 5.7.13+ #535 Not tainted ------------------------------------------------------ f2fs_discard-179:7/702 is trying to acquire lock: c0e5d920 (regulator_list_mutex){+.+.}-{3:3}, at: regulator_lock_dependent+0x54/0x2c0 but task is already holding lock: cb95b080 (&dcc->cmd_lock){+.+.}-{3:3}, at: __issue_discard_cmd+0xec/0x5f8 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: [...] -> #3 (fs_reclaim){+.+.}-{0:0}: fs_reclaim_acquire.part.11+0x40/0x50 fs_reclaim_acquire+0x24/0x28 __kmalloc_track_caller+0x54/0x218 kstrdup+0x40/0x5c create_regulator+0xf4/0x368 regulator_resolve_supply+0x1a0/0x200 regulator_register+0x9c8/0x163c [...] other info that might help us debug this: Chain exists of: regulator_list_mutex --> &sit_i->sentry_lock --> &dcc->cmd_lock [...] Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") Signed-off-by: Michał Mirosław Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/6eebc99b2474f4ffaa0405b15178ece0e7e4f608.1597195321.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 467bf30142c64f2eb64e2ac67fa4595126230efd Author: Michał Mirosław Date: Wed Aug 12 03:31:34 2020 +0200 regulator: push allocation in regulator_ena_gpio_request() out of lock Move another allocation out of regulator_list_mutex-protected region, as reclaim might want to take the same lock. WARNING: possible circular locking dependency detected 5.7.13+ #534 Not tainted ------------------------------------------------------ kswapd0/383 is trying to acquire lock: c0e5d920 (regulator_list_mutex){+.+.}-{3:3}, at: regulator_lock_dependent+0x54/0x2c0 but task is already holding lock: c0e38518 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x0/0x50 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (fs_reclaim){+.+.}-{0:0}: fs_reclaim_acquire.part.11+0x40/0x50 fs_reclaim_acquire+0x24/0x28 kmem_cache_alloc_trace+0x40/0x1e8 regulator_register+0x384/0x1630 devm_regulator_register+0x50/0x84 reg_fixed_voltage_probe+0x248/0x35c [...] other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(regulator_list_mutex); lock(fs_reclaim); lock(regulator_list_mutex); *** DEADLOCK *** [...] 2 locks held by kswapd0/383: #0: c0e38518 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x0/0x50 #1: cb70e5e0 (hctx->srcu){....}-{0:0}, at: hctx_lock+0x60/0xb8 [...] Fixes: 541d052d7215 ("regulator: core: Only support passing enable GPIO descriptors") [this commit only changes context] Fixes: f8702f9e4aa7 ("regulator: core: Use ww_mutex for regulators locking") [this is when the regulator_list_mutex was introduced in reclaim locking path] Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/41fe6a9670335721b48e8f5195038c3d67a3bf92.1597195321.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit 73a32129f8ccb556704a26b422f54e048bf14bd0 Author: Michał Mirosław Date: Wed Aug 12 03:31:34 2020 +0200 regulator: push allocation in regulator_init_coupling() outside of lock Allocating memory with regulator_list_mutex held makes lockdep unhappy when memory pressure makes the system do fs_reclaim on eg. eMMC using a regulator. Push the lock inside regulator_init_coupling() after the allocation. ====================================================== WARNING: possible circular locking dependency detected 5.7.13+ #533 Not tainted ------------------------------------------------------ kswapd0/383 is trying to acquire lock: cca78ca4 (&sbi->write_io[i][j].io_rwsem){++++}-{3:3}, at: __submit_merged_write_cond+0x104/0x154 but task is already holding lock: c0e38518 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x0/0x50 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (fs_reclaim){+.+.}-{0:0}: fs_reclaim_acquire.part.11+0x40/0x50 fs_reclaim_acquire+0x24/0x28 __kmalloc+0x54/0x218 regulator_register+0x860/0x1584 dummy_regulator_probe+0x60/0xa8 [...] other info that might help us debug this: Chain exists of: &sbi->write_io[i][j].io_rwsem --> regulator_list_mutex --> fs_reclaim Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(regulator_list_mutex); lock(fs_reclaim); lock(&sbi->write_io[i][j].io_rwsem); *** DEADLOCK *** 1 lock held by kswapd0/383: #0: c0e38518 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x0/0x50 [...] Fixes: d8ca7d184b33 ("regulator: core: Introduce API for regulators coupling customization") Signed-off-by: Michał Mirosław Reviewed-by: Dmitry Osipenko Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1a889cf7f61c6429c9e6b34ddcdde99be77a26b6.1597195321.git.mirq-linux@rere.qmqm.pl Signed-off-by: Mark Brown commit d1db7b80a6c8c5f81db0e80664d29b374750e2c6 Author: Adam Ford Date: Fri Aug 14 07:24:41 2020 -0500 ARM: dts: logicpd-som-lv-baseboard: Fix missing video A previous commit removed the panel-dpi driver, which made the SOM-LV video stop working because it relied on the DPI driver for setting video timings. Now that the simple-panel driver is available in omap2plus, this patch migrates the SOM-LV dev kits to use a similar panel and remove the manual timing requirements. A similar patch was already done and applied to the Torpedo family. Fixes: 8bf4b1621178 ("drm/omap: Remove panel-dpi driver") Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit 062fa09f44f4fb3776a23184d5d296b0c8872eb9 Author: Dinghao Liu Date: Thu Aug 13 16:41:10 2020 +0800 ASoC: intel: Fix memleak in sst_media_open When power_up_sst() fails, stream needs to be freed just like when try_module_get() fails. However, current code is returning directly and ends up leaking memory. Fixes: 0121327c1a68b ("ASoC: Intel: mfld-pcm: add control for powering up/down dsp") Signed-off-by: Dinghao Liu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200813084112.26205-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown commit f082bb59b72039a2326ec1a44496899fb8aa6d0e Author: Sylwester Nawrocki Date: Fri Jul 31 19:38:34 2020 +0200 ASoC: wm8994: Avoid attempts to read unreadable registers The driver supports WM1811, WM8994, WM8958 devices but according to documentation and the regmap definitions the WM8958_DSP2_* registers are only available on WM8958. In current code these registers are being accessed as if they were available on all the three chips. When starting playback on WM1811 CODEC multiple errors like: "wm8994-codec wm8994-codec: ASoC: error at soc_component_read_no_lock on wm8994-codec: -5" can be seen, which is caused by attempts to read an unavailable WM8958_DSP2_PROGRAM register. The issue has been uncovered by recent commit "e2329ee ASoC: soc-component: add soc_component_err()". This patch adds a check in wm8958_aif_ev() callback so the DSP2 handling is only done for WM8958. Signed-off-by: Sylwester Nawrocki Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200731173834.23832-1-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit ff69c97ef84c9f7795adb49e9f07c9adcdd0c288 Author: Srinivas Kandagatla Date: Tue Aug 11 11:34:52 2020 +0100 ASoC: msm8916-wcd-analog: fix register Interrupt offset For some reason interrupt set and clear register offsets are not set correctly. This patch corrects them! Fixes: 585e881e5b9e ("ASoC: codecs: Add msm8916-wcd analog codec") Signed-off-by: Srinivas Kandagatla Tested-by: Stephan Gerhold Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200811103452.20448-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 314213c15702f7598c486cf8c94f617719dfe339 Author: Sylwester Nawrocki Date: Tue Aug 4 16:10:43 2020 +0200 ASoC: wm8994: Prevent access to invalid VU register bits on WM1811 The ADC2 and DAC2 are not available on WM1811 device. This patch moves the ADC2, DAC2 VU bitfields to a separate array so we can skip accessing them and avoid unreadable register access on WM1811. This allows to get rid of warnings during boot like: wm8994-codec: ASoC: error at soc_component_read_no_lock on wm8994-codec: -5 Signed-off-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20200804141043.11425-1-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit 4d26e9a028e3d88223e06fa133c3d55af7ddbceb Author: Adam Ford Date: Fri Aug 14 07:53:38 2020 -0500 ARM: dts: logicpd-som-lv-baseboard: Fix broken audio Older versions of U-Boot would pinmux the whole board, but as the bootloader got updated, it started to only pinmux the pins it needed, and expected Linux to configure what it needed. Unfortunately this caused an issue with the audio, because the mcbsp2 pins were configured in the device tree but never referenced by the driver. When U-Boot stopped muxing the audio pins, the audio died. This patch adds the references to the associate the pin controller with the mcbsp2 driver which makes audio operate again. Fixes: 5cb8b0fa55a9 ("ARM: dts: Move most of logicpd-som-lv-37xx-devkit.dts to logicpd-som-lv-baseboard.dtsi") Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit d7dfee67688ac7f2dfd4c3bc70c053ee990c40b5 Author: Adam Ford Date: Sat Aug 8 21:56:10 2020 -0500 ARM: dts: logicpd-torpedo-baseboard: Fix broken audio Older versions of U-Boot would pinmux the whole board, but as the bootloader got updated, it started to only pinmux the pins it needed, and expected Linux to configure what it needed. Unfortunately this caused an issue with the audio, because the mcbsp2 pins were configured in the device tree, they were never referenced by the driver. When U-Boot stopped muxing the audio pins, the audio died. This patch adds the references to the associate the pin controller with the mcbsp2 driver which makes audio operate again. Fixes: 739f85bba5ab ("ARM: dts: Move most of logicpd-torpedo-37xx-devkit to logicpd-torpedo-baseboard") Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit a58cfdba2039ff2d5758840e97a23a2dedecf1e8 Author: Jing Xiangfeng Date: Fri Jul 24 11:54:30 2020 +0800 ARM: OMAP2+: Fix an IS_ERR() vs NULL check in _get_pwrdm() The of_clk_get() function returns error pointers, it never returns NULL. Fixes: 4ea3711aece4 ("ARM: OMAP2+: omap-iommu.c conversion to ti-sysc") Signed-off-by: Jing Xiangfeng Signed-off-by: Tony Lindgren commit b97bf44f99155e57088e16974afb1f2d7b5287aa Author: Niklas Schnelle Date: Mon Aug 3 17:58:10 2020 +0200 s390/pci: fix PF/VF linking on hot plug Currently there are four places in which a PCI function is scanned and made available to drivers: 1. In pci_scan_root_bus() as part of the initial zbus creation. 2. In zpci_bus_add_devices() when registering a device in configured state on a zbus that has already been scanned. 3. When a function is already known to zPCI (in reserved/standby state) and configuration is triggered through firmware by PEC 0x301. 4. When a device is already known to zPCI (in standby/reserved state) and configuration is triggered from within Linux using enable_slot(). The PF/VF linking step and setting of pdev->is_virtfn introduced with commit e5794cf1a270 ("s390/pci: create links between PFs and VFs") was only triggered for the second case, which is where VFs created through sriov_numvfs usually land. However unlike some other platforms but like POWER VFs can be individually enabled/disabled through /sys/bus/pci/slots. Fix this by doing VF setup as part of pcibios_bus_add_device() which is called in all of the above cases. Finally to remove the PF/VF links call the common code pci_iov_remove_virtfn() function to remove linked VFs. This takes care of the necessary sysfs cleanup. Fixes: e5794cf1a270 ("s390/pci: create links between PFs and VFs") Cc: # 5.8: 2f0230b2f2d5: s390/pci: re-introduce zpci_remove_device() Cc: # 5.8 Acked-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 2f0230b2f2d5fd287a85583eefb5aed35b6fe510 Author: Niklas Schnelle Date: Mon Aug 3 17:46:32 2020 +0200 s390/pci: re-introduce zpci_remove_device() For fixing the PF to VF link removal we need to perform some action on every removal of a zdev from the common PCI subsystem. So in preparation re-introduce zpci_remove_device() and use that instead of directly calling the common code functions. This was actually still declared from earlier code but no longer implemented. Reviewed-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 3cddb79afc60bcdb5fd9dd7a1c64a8d03bdd460f Author: Niklas Schnelle Date: Mon Aug 3 09:33:29 2020 +0200 s390/pci: fix zpci_bus_link_virtfn() We were missing the pci_dev_put() for candidate PFs. Furhtermore in discussion with upstream it turns out that somewhat counterintuitively some common code, in particular the vfio-pci driver, assumes that pdev->is_virtfn always implies that pdev->physfn is set, i.e. that VFs are always linked. While POWER does seem to set pdev->is_virtfn even for unlinked functions (see comments in arch/powerpc/kernel/eeh.c:eeh_debugfs_break_device()) for now just be safe and only set pdev->is_virtfn on linking. Also make sure that we only search for parent PFs if the zbus is multifunction and we thus know the devfn values supplied by firmware come from the RID. Fixes: e5794cf1a270 ("s390/pci: create links between PFs and VFs") Cc: # 5.8 Reviewed-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit fd78c59446b8d050ecf3e0897c5a486c7de7c595 Author: Heiko Carstens Date: Wed Aug 12 18:56:28 2020 +0200 s390/ptrace: fix storage key handling The key member of the runtime instrumentation control block contains only the access key, not the complete storage key. Therefore the value must be shifted by four bits. Since existing user space does not necessarily query and set the access key correctly, just ignore the user space provided key and use the correct one. Note: this is only relevant for debugging purposes in case somebody compiles a kernel with a default storage access key set to a value not equal to zero. Fixes: 262832bc5acd ("s390/ptrace: add runtime instrumention register get/set") Reported-by: Claudio Imbrenda Signed-off-by: Heiko Carstens commit 9eaba29c7985236e16468f4e6a49cc18cf01443e Author: Heiko Carstens Date: Wed Aug 12 18:55:41 2020 +0200 s390/runtime_instrumentation: fix storage key handling The key member of the runtime instrumentation control block contains only the access key, not the complete storage key. Therefore the value must be shifted by four bits. Note: this is only relevant for debugging purposes in case somebody compiles a kernel with a default storage access key set to a value not equal to zero. Fixes: e4b8b3f33fca ("s390: add support for runtime instrumentation") Reported-by: Claudio Imbrenda Signed-off-by: Heiko Carstens commit b76fee1bc56c31a9d2a49592810eba30cc06d61a Author: Niklas Schnelle Date: Tue Aug 4 13:01:26 2020 +0200 s390/pci: ignore stale configuration request event A configuration request event may be stale, that is the event may reference a zdev which was already configured. This can happen when a hotplug happens during boot such that the device is discovered and configured in the initial clp_list_pci(), then after initialization we enable events and process the original configuration request which additionally still contains the old disabled function handle leading to a failure during device enablement and subsequent I/O lockout. Fix this by restoring the check that the device to be configured is in standby which was removed in commit f606b3ef47c9 ("s390/pci: adapt events for zbus"). This check does not need serialization as we only enable the events after zPCI has fully initialized, which includes the initial clp_list_pci(), rescan only does updates and events are serialized with respect to each other. Fixes: f606b3ef47c9 ("s390/pci: adapt events for zbus") Cc: # 5.8 Reported-by: Shalini Chellathurai Saroja Tested-by: Shalini Chellathurai Saroja Acked-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 0b8eb2ee9da1e8c9b8082f404f3948aa82a057b2 Author: Vineeth Vijayan Date: Thu Jun 18 16:42:45 2020 +0200 s390/cio: add cond_resched() in the slow_eval_known_fn() loop The scanning through subchannels during the time of an event could take significant amount of time in case of platforms with lots of known subchannels. This might result in higher scheduling latencies for other tasks especially on systems with a single CPU. Add cond_resched() call, as the loop in slow_eval_known_fn() can be executed for a longer duration. Reviewed-by: Peter Oberparleiter Signed-off-by: Vineeth Vijayan Signed-off-by: Heiko Carstens commit 433c1ca0d441ee0b88fdd83c84ee6d6d43080dcd Author: Jiaxun Yang Date: Sat Aug 8 20:32:27 2020 +0800 MIPS: Loongson64: Do not override watch and ejtag feature Do not override ejtag feature to 0 as Loongson 3A1000+ do have ejtag. For watch, as KVM emulated CPU doesn't have watch feature, we should not enable it unconditionally. Signed-off-by: Jiaxun Yang Reviewed-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 07c8434150f4eb0b65cae288721c8af1080fde17 Author: Christophe JAILLET Date: Fri Aug 14 07:55:01 2020 +0200 usb: gadget: f_tcm: Fix some resource leaks in some error paths If a memory allocation fails within a 'usb_ep_alloc_request()' call, the already allocated memory must be released. Fix a mix-up in the code and free the correct requests. Fixes: c52661d60f63 ("usb-gadget: Initial merge of target module for UASP + BOT") Signed-off-by: Christophe JAILLET Signed-off-by: Felipe Balbi commit 25a097f5204675550afb879ee18238ca917cba7a Author: Peilin Ye Date: Wed Jul 29 07:37:12 2020 -0400 HID: hiddev: Fix slab-out-of-bounds write in hiddev_ioctl_usage() `uref->usage_index` is not always being properly checked, causing hiddev_ioctl_usage() to go out of bounds under some cases. Fix it. Reported-by: syzbot+34ee1b45d88571c2fa8b@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=f2aebe90b8c56806b050a20b36f51ed6acabe802 Reviewed-by: Dan Carpenter Signed-off-by: Peilin Ye Signed-off-by: Jiri Kosina commit 627a49975bdc3220f360a8237603a6344ee6a588 Author: Sebastian Parschauer Date: Mon Aug 17 10:36:28 2020 +0200 HID: quirks: Always poll three more Lenovo PixArt mice The PixArt OEM mice are known for disconnecting every minute in runlevel 1 or 3 if they are not always polled. One Lenovo PixArt mouse is already fixed. Got two references for 17ef:602e and three references for 17ef:6019 misbehaving like this. Got one direct bug report for 17ef:6093 from Wyatt Ward (wyatt8740). So add HID_QUIRK_ALWAYS_POLL for all of them. Link: https://github.com/sriemer/fix-linux-mouse issue 22 Signed-off-by: Sebastian Parschauer Signed-off-by: Jiri Kosina commit 8d53ecfbf23135381d2ebbd1b261a7c7f18a7294 Author: Krzysztof Kozlowski Date: Mon Jun 29 10:17:44 2020 +0200 arm64: dts: xilinx: Align IOMMU nodename with dtschema Fix dtschema validator warnings like: smmu@fd800000: $nodename:0: 'smmu@fd800000' does not match '^iommu@[0-9a-f]*' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200629081744.13916-1-krzk@kernel.org commit b4b6fb8de8dcb756c78ef7203cb9d00a42185e26 Author: Laurent Pinchart Date: Mon Jun 29 15:00:54 2020 +0300 arm64: dts: zynqmp: Add GTR transceivers Add a DT node for the PS-GTR transceivers. Signed-off-by: Laurent Pinchart Acked-by: Michal Simek Link: https://lore.kernel.org/r/20200629120054.29338-4-laurent.pinchart@ideasonboard.com commit eef4016243e94c438f177ca8226876eb873b9c75 Author: Hans de Goede Date: Tue Aug 11 15:39:58 2020 +0200 HID: i2c-hid: Always sleep 60ms after I2C_HID_PWR_ON commands Before this commit i2c_hid_parse() consists of the following steps: 1. Send power on cmd 2. usleep_range(1000, 5000) 3. Send reset cmd 4. Wait for reset to complete (device interrupt, or msleep(100)) 5. Send power on cmd 6. Try to read HID descriptor Notice how there is an usleep_range(1000, 5000) after the first power-on command, but not after the second power-on command. Testing has shown that at least on the BMAX Y13 laptop's i2c-hid touchpad, not having a delay after the second power-on command causes the HID descriptor to read as all zeros. In case we hit this on other devices too, the descriptor being all zeros can be recognized by the following message being logged many, many times: hid-generic 0018:0911:5288.0002: unknown main item tag 0x0 At the same time as the BMAX Y13's touchpad issue was debugged, Kai-Heng was working on debugging some issues with Goodix i2c-hid touchpads. It turns out that these need a delay after a PWR_ON command too, otherwise they stop working after a suspend/resume cycle. According to Goodix a delay of minimal 60ms is needed. Having multiple cases where we need a delay after sending the power-on command, seems to indicate that we should always sleep after the power-on command. This commit fixes the mentioned issues by moving the existing 1ms sleep to the i2c_hid_set_power() function and changing it to a 60ms sleep. Cc: stable@vger.kernel.org BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208247 Reported-by: Kai-Heng Feng Reported-and-tested-by: Andrea Borgia Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit d71c8008e194bf947fe260110c8553ff91469294 Author: Rikard Falkeborn Date: Mon Jul 27 15:22:00 2020 +0200 HID: macally: Constify macally_id_table macally_id_table is not modified and can be made const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Jiri Kosina commit 857ce8c1c504e25d08724a86df4e64bf6f282323 Author: Rikard Falkeborn Date: Mon Jul 27 15:21:59 2020 +0200 HID: cougar: Constify cougar_id_table cougar_id_table[] is not changed and can be made const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Jiri Kosina commit 23dc958689449be85e39351a8c809c3d344b155b Author: Mike Pozulp Date: Sun Aug 16 21:32:17 2020 -0700 ALSA: hda/realtek: Add model alc298-samsung-headphone The very quiet and distorted headphone output bug that afflicted my Samsung Notebook 9 is appearing in many other Samsung laptops. Expose the quirk which fixed my laptop as a model so other users can try it. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423 Signed-off-by: Mike Pozulp Link: https://lore.kernel.org/r/20200817043219.458889-1-pozulp.kernel@gmail.com Signed-off-by: Takashi Iwai commit 7828a3ef8646fb2e69ed45616c8453a037ca7867 Author: Marc Zyngier Date: Thu Aug 6 10:57:45 2020 +0100 irqchip: Fix probing deferal when using IRQCHIP_PLATFORM_DRIVER helpers When probing an interrupt controller that is behind a parent, we try to check whether the parent domain is available as an indication that we can actually try to probe. Unfortunately, we are checking this with the firmware node of the about to be probed device, not the parent. This is obviously bound to fail. Instead, use the parent node. Fixes: f8410e626569 ("irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros") Reported-by: John Stultz Tested-by: John Stultz Signed-off-by: Marc Zyngier commit 74a2a7de81a2ef20732ec02087314e92692a7a1b Author: Hector Martin Date: Sun Aug 16 17:44:31 2020 +0900 ALSA: usb-audio: Update documentation comment for MS2109 quirk As the recent fix addressed the channel swap problem more properly, update the comment as well. Fixes: 1b7ecc241a67 ("ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109") Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20200816084431.102151-1-marcan@marcan.st Signed-off-by: Takashi Iwai commit 5b2aa9f918f6837ae943557f8cec02c34fcf80e7 Author: Peter Ujfalusi Date: Thu Aug 6 13:49:28 2020 +0300 dmaengine: of-dma: Fix of_dma_router_xlate's of_dma_xlate handling of_dma_xlate callback can return ERR_PTR as well NULL in case of failure. If error code is returned (not NULL) then the route should be released and the router should not be registered for the channel. Fixes: 56f13c0d9524c ("dmaengine: of_dma: Support for DMA routers") Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200806104928.25975-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit d4ec88d205583ac4f9482cf3e89128589bd881d2 Author: Stephen Boyd Date: Tue Aug 11 14:28:36 2020 -0700 opp: Put opp table in dev_pm_opp_set_rate() if _set_opp_bw() fails We get the opp_table pointer at the top of the function and so we should put the pointer at the end of the function like all other exit paths from this function do. Cc: v5.8+ # v5.8+ Fixes: b00e667a6d8b ("opp: Remove bandwidth votes when target_freq is zero") Reviewed-by: Rajendra Nayak Signed-off-by: Stephen Boyd [ Viresh: Split the patch into two ] Signed-off-by: Viresh Kumar commit 8979ef70850eb469e1094279259d1ef393ffe85f Author: Stephen Boyd Date: Tue Aug 11 14:28:36 2020 -0700 opp: Put opp table in dev_pm_opp_set_rate() for empty tables We get the opp_table pointer at the top of the function and so we should put the pointer at the end of the function like all other exit paths from this function do. Cc: v5.7+ # v5.7+ Fixes: aca48b61f963 ("opp: Manage empty OPP tables with clk handle") Reviewed-by: Rajendra Nayak Signed-off-by: Stephen Boyd [ Viresh: Split the patch into two ] Signed-off-by: Viresh Kumar commit df841b17e809f48f740cd2dd8b63543073c91a02 Author: Dave Jiang Date: Mon Jul 27 09:37:11 2020 -0700 dmaengine: idxd: reset states after device disable or reset The state for WQs should be reset to disabled when a device is reset or disabled. Fixes: da32b28c95a7 ("dmaengine: idxd: cleanup workqueue config after disabling") Reported-by: Mona Hossain Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/159586777684.27150.17589406415773568534.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 7eb48dd094de5fe0e216b550e73aa85257903973 Author: Hanjun Guo Date: Wed Jul 22 17:54:21 2020 +0800 dmaengine: acpi: Put the CSRT table after using it The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used at runtime to release the table mapping, put the CSRT table buf after using it. Signed-off-by: Hanjun Guo Link: https://lore.kernel.org/r/1595411661-15936-1-git-send-email-guohanjun@huawei.com Signed-off-by: Vinod Koul commit fe81d927b78c4f0557836661d32e41ebc957b024 Author: Vineet Gupta Date: Thu Jul 9 19:52:32 2020 -0700 ARC: HSDK: wireup perf irq Newer version of HSDK aka HSDK-4xD (with dual issue HS48x4 CPU) wired up the perf interrupt, so enable that in DT. This is OK for old HSDK where this irq is ignored because pct irq is not wired up in hardware. Signed-off-by: Vineet Gupta commit feb92d7d3813456c11dce215b3421801a78a8986 Author: Vineet Gupta Date: Sun Jul 26 21:51:59 2020 -0700 ARC: perf: don't bail setup if pct irq missing in device-tree Current code inadventely bails if hardware supports sampling/overflow interrupts, but the irq is missing from device tree. | | # perf stat -e cycles,instructions,major-faults,minor-faults ../hackbench | Running with 10 groups 400 process | Time: 0.921 | | Performance counter stats for '../hackbench': | | cycles | instructions | 0 major-faults | 8679 minor-faults This need not be as we can still do simple counting based perf stat. This unborks perf on HSDK-4xD Cc: Signed-off-by: Vineet Gupta commit e5ed6069b7d8a41e4de09e8edf783f6b1a83b48f Author: Randy Dunlap Date: Tue Jul 21 13:59:58 2020 -0700 ARC: pgalloc.h: delete a duplicated word + other fixes Drop the repeated word "to". Change "Thay" to "That". Add a closing right parenthesis. Signed-off-by: Randy Dunlap Cc: Vineet Gupta Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Vineet Gupta commit 388692e943a58f28aac0fe83e75f5994da9ff8a1 Author: Madhavan Srinivasan Date: Mon Aug 17 06:26:17 2020 +0530 powerpc/kernel: Cleanup machine check function declarations __machine_check_early_realmode_p*() are currently declared as extern in cputable.c and because of this when compiled with "C=1" (which enables semantic checker) produces these warnings. CHECK arch/powerpc/kernel/mce_power.c arch/powerpc/kernel/mce_power.c:709:6: warning: symbol '__machine_check_early_realmode_p7' was not declared. Should it be static? arch/powerpc/kernel/mce_power.c:717:6: warning: symbol '__machine_check_early_realmode_p8' was not declared. Should it be static? arch/powerpc/kernel/mce_power.c:722:6: warning: symbol '__machine_check_early_realmode_p9' was not declared. Should it be static? arch/powerpc/kernel/mce_power.c:740:6: warning: symbol '__machine_check_early_realmode_p10' was not declared. Should it be static? Patch here moves the declaration to asm/mce.h and includes the same in cputable.c Fixes: ae744f3432d3 ("powerpc/book3s: Flush SLB/TLBs if we get SLB/TLB machine check errors on power8") Fixes: 7b9f71f974a1 ("powerpc/64s: POWER9 machine check handler") Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200817005618.3305028-1-maddy@linux.ibm.com commit b3b2854dcf704c1db05d897072f98e8b79398af1 Author: Florian Westphal Date: Sun Aug 16 23:14:20 2020 +0200 mptcp: sendmsg: reset iter on error redux This fix wasn't correct: When this function is invoked from the retransmission worker, the iterator contains garbage and resetting it causes a crash. As the work queue should not be performance critical also zero the msghdr struct. Fixes: 35759383133f64d "(mptcp: sendmsg: reset iter on error)" Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 327da008e65a25b8206b36b7fc0c9e4edbb36a58 Author: Madhavan Srinivasan Date: Mon Aug 17 06:26:18 2020 +0530 powerpc: Add POWER10 raw mode cputable entry Add a raw mode cputable entry for POWER10. Copies most of the fields from commit a3ea40d5c736 ("powerpc: Add POWER10 architected mode") except for oprofile_cpu_type, machine_check_early, pvr_mask and pvr_mask fields. On bare metal systems we use DT CPU features, which doesn't need a cputable entry. But in VMs we still rely on the raw cputable entry to set the correct values for the PMU related fields. Fixes: a3ea40d5c736 ("powerpc: Add POWER10 architected mode") Signed-off-by: Madhavan Srinivasan [mpe: Reorder vs cleanup patch and add Fixes tag] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200817005618.3305028-2-maddy@linux.ibm.com commit 04db2304a9495b98b8976c9a8cc5f9845be35ba8 Author: Wei Yongjun Date: Thu Jul 23 11:36:22 2020 +0000 phy: qualcomm: fix return value check in qcom_ipq806x_usb_phy_probe() In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: ef19b117b834 ("phy: qualcomm: add qcom ipq806x dwc usb phy driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200723113622.136752-1-weiyongjun1@huawei.com Signed-off-by: Vinod Koul commit d86f9088938e637de5908ed463b023eee4d1b9e1 Author: YueHaibing Date: Sat Jul 25 03:16:24 2020 +0000 phy: qualcomm: 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 Link: https://lore.kernel.org/r/20200725031624.31432-1-yuehaibing@huawei.com Signed-off-by: Vinod Koul commit bd71ea60673180eccf17b1a1dda3504a04783789 Author: Andrew Lunn Date: Sun Aug 16 21:26:38 2020 +0200 net: devlink: Remove overzealous WARN_ON with snapshots It is possible to trigger this WARN_ON from user space by triggering a devlink snapshot with an ID which already exists. We don't need both -EEXISTS being reported and spamming the kernel log. Signed-off-by: Andrew Lunn Tested-by: Chris Healy Signed-off-by: David S. Miller commit c530189905efe91b6a464db4ec1b56b4c069609f Author: Xin Long Date: Sun Aug 16 17:32:03 2020 +0800 tipc: not enable tipc when ipv6 works as a module When using ipv6_dev_find() in one module, it requires ipv6 not to work as a module. Otherwise, this error occurs in build: undefined reference to `ipv6_dev_find'. So fix it by adding "depends on IPV6 || IPV6=n" to tipc/Kconfig, as it does in sctp/Kconfig. Fixes: 5a6f6f579178 ("tipc: set ub->ifindex for local ipv6 address") Reported-by: kernel test robot Acked-by: Randy Dunlap Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 47733f9daf4fe4f7e0eb9e273f21ad3a19130487 Author: Cong Wang Date: Sat Aug 15 16:29:15 2020 -0700 tipc: fix uninit skb->data in tipc_nl_compat_dumpit() __tipc_nl_compat_dumpit() has two callers, and it expects them to pass a valid nlmsghdr via arg->data. This header is artificial and crafted just for __tipc_nl_compat_dumpit(). tipc_nl_compat_publ_dump() does so by putting a genlmsghdr as well as some nested attribute, TIPC_NLA_SOCK. But the other caller tipc_nl_compat_dumpit() does not, this leaves arg->data uninitialized on this call path. Fix this by just adding a similar nlmsghdr without any payload in tipc_nl_compat_dumpit(). This bug exists since day 1, but the recent commit 6ea67769ff33 ("net: tipc: prepare attrs in __tipc_nl_compat_dumpit()") makes it easier to appear. Reported-and-tested-by: syzbot+0e7181deafa7e0b79923@syzkaller.appspotmail.com Fixes: d0796d1ef63d ("tipc: convert legacy nl bearer dump to nl compat") Cc: Jon Maloy Cc: Ying Xue Cc: Richard Alpe Signed-off-by: Cong Wang Acked-by: Ying Xue Signed-off-by: David S. Miller commit e276c9bd14c75278d1354efbaea278500147d6b3 Author: Xu Wang Date: Mon Aug 17 03:29:13 2020 +0000 ata: ahci: use ata_link_info() instead of ata_link_printk() Using ata_link_info() instead of ata_link_printk(). Signed-off-by: Xu Wang Signed-off-by: Jens Axboe commit d735599a069f6936c1392e07075c34a19bda949a Author: Athira Rajeev Date: Fri Aug 7 06:05:01 2020 -0400 powerpc/perf: Add extended regs support for power10 platform Include capability flag PERF_PMU_CAP_EXTENDED_REGS for power10 and expose MMCR3, SIER2, SIER3 registers as part of extended regs. Also introduce PERF_REG_PMU_MASK_31 to define extended mask value at runtime for power10. Suggested-by: Ryan Grimm Signed-off-by: Athira Rajeev Tested-by: Nageswara R Sastry Reviewed-by: Kajol Jain Reviewed-and-tested-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1596794701-23530-3-git-send-email-atrajeev@linux.vnet.ibm.com commit 781fa4811d95314c1965c0c3337c9ac36ef26093 Author: Anju T Sudhakar Date: Fri Aug 7 06:05:00 2020 -0400 powerpc/perf: Add support for outputting extended regs in perf intr_regs Add support for perf extended register capability in powerpc. The capability flag PERF_PMU_CAP_EXTENDED_REGS, is used to indicate the PMU which support extended registers. The generic code define the mask of extended registers as 0 for non supported architectures. Patch adds extended regs support for power9 platform by exposing MMCR0, MMCR1 and MMCR2 registers. REG_RESERVED mask needs update to include extended regs. PERF_REG_EXTENDED_MASK, contains mask value of the supported registers, is defined at runtime in the kernel based on platform since the supported registers may differ from one processor version to another and hence the MASK value. With the patch: available registers: r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 nip msr orig_r3 ctr link xer ccr softe trap dar dsisr sier mmcra mmcr0 mmcr1 mmcr2 PERF_RECORD_SAMPLE(IP, 0x1): 4784/4784: 0 period: 1 addr: 0 ... intr regs: mask 0xffffffffffff ABI 64-bit .... r0 0xc00000000012b77c .... r1 0xc000003fe5e03930 .... r2 0xc000000001b0e000 .... r3 0xc000003fdcddf800 .... r4 0xc000003fc7880000 .... r5 0x9c422724be .... r6 0xc000003fe5e03908 .... r7 0xffffff63bddc8706 .... r8 0x9e4 .... r9 0x0 .... r10 0x1 .... r11 0x0 .... r12 0xc0000000001299c0 .... r13 0xc000003ffffc4800 .... r14 0x0 .... r15 0x7fffdd8b8b00 .... r16 0x0 .... r17 0x7fffdd8be6b8 .... r18 0x7e7076607730 .... r19 0x2f .... r20 0xc00000001fc26c68 .... r21 0xc0002041e4227e00 .... r22 0xc00000002018fb60 .... r23 0x1 .... r24 0xc000003ffec4d900 .... r25 0x80000000 .... r26 0x0 .... r27 0x1 .... r28 0x1 .... r29 0xc000000001be1260 .... r30 0x6008010 .... r31 0xc000003ffebb7218 .... nip 0xc00000000012b910 .... msr 0x9000000000009033 .... orig_r3 0xc00000000012b86c .... ctr 0xc0000000001299c0 .... link 0xc00000000012b77c .... xer 0x0 .... ccr 0x28002222 .... softe 0x1 .... trap 0xf00 .... dar 0x0 .... dsisr 0x80000000000 .... sier 0x0 .... mmcra 0x80000000000 .... mmcr0 0x82008090 .... mmcr1 0x1e000000 .... mmcr2 0x0 ... thread: perf:4784 Signed-off-by: Anju T Sudhakar Signed-off-by: Athira Rajeev Tested-by: Nageswara R Sastry Reviewed-by: Madhavan Srinivasan Reviewed-by: Kajol Jain Reviewed-and-tested-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1596794701-23530-2-git-send-email-atrajeev@linux.vnet.ibm.com commit 030a2c689fb46e1690f7ded8b194bab7678efb28 Author: Michael Neuling Date: Mon Aug 3 13:56:00 2020 +1000 powerpc: Fix P10 PVR revision in /proc/cpuinfo for SMT4 cores On POWER10 bit 12 in the PVR indicates if the core is SMT4 or SMT8. Bit 12 is set for SMT4. Without this patch, /proc/cpuinfo on a SMT4 DD1 POWER10 looks like this: cpu : POWER10, altivec supported revision : 17.0 (pvr 0080 1100) Fixes: a3ea40d5c736 ("powerpc: Add POWER10 architected mode") Cc: stable@vger.kernel.org # v5.8 Signed-off-by: Michael Neuling Reviewed-by: Vaidyanathan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200803035600.1820371-1-mikey@neuling.org commit 03ef5941a04c68b5eb8254493d09b6e899a377a3 Author: Xu Wang Date: Mon Aug 17 02:16:49 2020 +0000 bsg-lib: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Xu Wang Signed-off-by: Jens Axboe commit 26bfeb26624071a47acb3a07097efe12044865f2 Author: Randy Dunlap Date: Sun Aug 16 16:39:34 2020 -0700 block: blk-mq.c: fix @at_head kernel-doc warning Fix a kernel-doc warning in block/blk-mq.c: ../block/blk-mq.c:1844: warning: Function parameter or member 'at_head' not described in 'blk_mq_request_bypass_insert' Fixes: 01e99aeca397 ("blk-mq: insert passthrough request into hctx->dispatch directly") Signed-off-by: Randy Dunlap Cc: André Almeida Cc: Jens Axboe Cc: Ming Lei Cc: linux-block@vger.kernel.org Signed-off-by: Jens Axboe commit 8c26544f5ace22ee159113a3300de077f2973519 Merge: 71a50419c7307 5c04da55c754c Author: David S. Miller Date: Sun Aug 16 16:05:36 2020 -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 net: 1) Endianness issue in IPv4 option support in nft_exthdr, from Stephen Suryaputra. 2) Removes the waitcount optimization in nft_compat, from Florian Westphal. 3) Remove ipv6 -> nf_defrag_ipv6 module dependency, from Florian Westphal. 4) Memleak in chain binding support, also from Florian. 5) Simplify nft_flowtable.sh selftest, from Fabian Frederick. 6) Optional MTU arguments for selftest nft_flowtable.sh, also from Fabian. 7) Remove noise error report when killing process in selftest nft_flowtable.sh, from Fabian Frederick. 8) Reject bogus getsockopt option length in ebtables, from Florian Westphal. ==================== Signed-off-by: David S. Miller commit 71a50419c7307bef6367e8f3787570f546ae96f8 Merge: 55eff0eb7460c 0ae18a82686f9 Author: David S. Miller Date: Sun Aug 16 16:04:14 2020 -0700 Merge tag 'linux-can-fixes-for-5.9-20200815' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2020-08-15 this is a pull request of 4 patches for net/master. All patches are by Zhang Changzhong and fix broadcast related problems in the j1939 CAN networking stack. ==================== Signed-off-by: David S. Miller commit 55eff0eb7460c3d50716ed9eccf22257b046ca92 Author: Miaohe Lin Date: Sat Aug 15 04:44:31 2020 -0400 net: Fix potential wrong skb->protocol in skb_vlan_untag() We may access the two bytes after vlan_hdr in vlan_set_encap_proto(). So we should pull VLAN_HLEN + sizeof(unsigned short) in skb_vlan_untag() or we may access the wrong data. Fixes: 0d5501c1c828 ("net: Always untag vlan-tagged traffic on input.") Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit f8414a8d886b613b90d9fdf7cda6feea313b1069 Author: Jason A. Donenfeld Date: Sat Aug 15 09:29:30 2020 +0200 net: xdp: pull ethernet header off packet after computing skb->protocol When an XDP program changes the ethernet header protocol field, eth_type_trans is used to recalculate skb->protocol. In order for eth_type_trans to work correctly, the ethernet header must actually be part of the skb data segment, so the code first pushes that onto the head of the skb. However, it subsequently forgets to pull it back off, making the behavior of the passed-on packet inconsistent between the protocol modifying case and the static protocol case. This patch fixes the issue by simply pulling the ethernet header back off of the skb head. Fixes: 297249569932 ("net: fix generic XDP to handle if eth header was mangled") Cc: Jesper Dangaard Brouer Cc: David S. Miller Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit d0f5c7076e01fef6fcb86988d9508bf3ce258bd4 Author: Mahesh Bandewar Date: Fri Aug 14 22:53:24 2020 -0700 ipvlan: fix device features Processing NETDEV_FEAT_CHANGE causes IPvlan links to lose NETIF_F_LLTX feature because of the incorrect handling of features in ipvlan_fix_features(). --before-- lpaa10:~# ethtool -k ipvl0 | grep tx-lockless tx-lockless: on [fixed] lpaa10:~# ethtool -K ipvl0 tso off Cannot change tcp-segmentation-offload Actual changes: vlan-challenged: off [fixed] tx-lockless: off [fixed] lpaa10:~# ethtool -k ipvl0 | grep tx-lockless tx-lockless: off [fixed] lpaa10:~# --after-- lpaa10:~# ethtool -k ipvl0 | grep tx-lockless tx-lockless: on [fixed] lpaa10:~# ethtool -K ipvl0 tso off Cannot change tcp-segmentation-offload Could not change any device features lpaa10:~# ethtool -k ipvl0 | grep tx-lockless tx-lockless: on [fixed] lpaa10:~# Fixes: 2ad7bf363841 ("ipvlan: Initial check-in of the IPVLAN driver.") Signed-off-by: Mahesh Bandewar Cc: Eric Dumazet Signed-off-by: David S. Miller commit 832707021666411d04795c564a4adea5d6b94f17 Author: Cong Wang Date: Fri Aug 14 20:05:58 2020 -0700 bonding: fix a potential double-unregister When we tear down a network namespace, we unregister all the netdevices within it. So we may queue a slave device and a bonding device together in the same unregister queue. If the only slave device is non-ethernet, it would automatically unregister the bonding device as well. Thus, we may end up unregistering the bonding device twice. Workaround this special case by checking reg_state. Fixes: 9b5e383c11b0 ("net: Introduce unregister_netdevice_many()") Reported-by: syzbot+af23e7f3e0a7e10c8b67@syzkaller.appspotmail.com Cc: Eric Dumazet Cc: Andy Gospodarek Cc: Jay Vosburgh Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit 51fb91ed5a6fa855a74731610cd5435d83d6e17f Author: Grant Peltier Date: Mon Aug 10 13:36:27 2020 -0500 hwmon: (pmbus/isl68137) remove READ_TEMPERATURE_1 telemetry for RAA228228 Per the RAA228228 datasheet, READ_TEMPERATURE_1 is not a supported PMBus command. Signed-off-by: Grant Peltier Signed-off-by: Guenter Roeck commit 3b2a4439e0ae1732f90877a7160bbf42e1beb4b6 Author: Jens Axboe Date: Sun Aug 16 10:58:43 2020 -0700 io_uring: get rid of kiocb_wait_page_queue_init() The 5.9 merge moved this function io_uring, which means that we don't need to retain the generic nature of it. Clean up this part by removing redundant checks, and just inlining the small remainder in io_rw_should_retry(). No functional changes in this patch. Signed-off-by: Jens Axboe commit b711d4eaf0c408a811311ee3e94d6e9e5a230a9a Author: Jens Axboe Date: Sun Aug 16 08:23:05 2020 -0700 io_uring: find and cancel head link async work on files exit Commit f254ac04c874 ("io_uring: enable lookup of links holding inflight files") only handled 2 out of the three head link cases we have, we also need to lookup and cancel work that is blocked in io-wq if that work has a link that's holding a reference to the files structure. Put the "cancel head links that hold this request pending" logic into io_attempt_cancel(), which will to through the motions of finding and canceling head links that hold the current inflight files stable request pending. Cc: stable@vger.kernel.org Reported-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6da45875fa174d9db238ea0d6846061e68b41b6d Author: Lokesh Vutla Date: Thu Aug 6 13:18:26 2020 +0530 arm64: dts: k3-am65: Update the RM resource types Update the ringacc and udma dt nodes to use the latest RM resource types similar to the ones used in k3-j721e dt nodes. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Acked-by: Nishanth Menon Link: https://lore.kernel.org/r/20200806074826.24607-14-lokeshvutla@ti.com commit fef845122f6c3c92178e4e4a1f85cce84dca06fe Author: Lokesh Vutla Date: Thu Aug 6 13:18:25 2020 +0530 arm64: dts: k3-am65: ti-sci-inta/intr: Update to latest bindings Update the INTA and INTR dt nodes to the latest DT bindings. Signed-off-by: Lokesh Vutla Signed-off-by: Suman Anna Signed-off-by: Marc Zyngier Acked-by: Nishanth Menon Link: https://lore.kernel.org/r/20200806074826.24607-13-lokeshvutla@ti.com commit 8d523f096da53598c271b5b69fcacb48779884a3 Author: Lokesh Vutla Date: Thu Aug 6 13:18:24 2020 +0530 arm64: dts: k3-j721e: ti-sci-inta/intr: Update to latest bindings Update the INTA and INTR dt nodes to the latest DT bindings. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Acked-by: Nishanth Menon Link: https://lore.kernel.org/r/20200806074826.24607-12-lokeshvutla@ti.com commit 5c4b585d29102c7e6a6217112bbf1be774795cd7 Author: Lokesh Vutla Date: Thu Aug 6 13:18:23 2020 +0530 irqchip/ti-sci-inta: Add support for INTA directly connecting to GIC Driver assumes that Interrupt parent to Interrupt Aggregator is always Interrupt router. This is not true always and GIC can be a parent to Interrupt Aggregator. Update the driver to detect the parent and request the parent irqs accordingly. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200806074826.24607-11-lokeshvutla@ti.com commit 7206f3149b8198c65a0ca8c01bfa1d8ace27bf91 Author: Lokesh Vutla Date: Thu Aug 6 13:18:22 2020 +0530 irqchip/ti-sci-inta: Do not store TISCI device id in platform device id field Even though DT doesn't make active use of id field in platform_device, we cannot hijack it to store TISCI device id. So create a field in struct ti_sci_inta for storing TISCI id and drop usage of id field in platform_device. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200806074826.24607-10-lokeshvutla@ti.com commit c4dff06e79d99691f18dfc8a61a1cb17c602a025 Author: Lokesh Vutla Date: Thu Aug 6 13:18:21 2020 +0530 dt-bindings: irqchip: Convert ti, sci-inta bindings to yaml In order to automate the verification of DT nodes convert ti,sci-inta.txt ti,sci-inta.yaml. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200806074826.24607-9-lokeshvutla@ti.com commit 6dde29dc31aa265a79d9e6b3571987cfa4b179cc Author: Lokesh Vutla Date: Thu Aug 6 13:18:20 2020 +0530 dt-bindings: irqchip: ti, sci-inta: Update docs to support different parent. Drop the firmware related interrupt ranges and use the hardware specified interrupt numbers within Interrupt Aggregator. This ensures interrupt aggregator DT node need not assume any interrupt parent type. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200806074826.24607-8-lokeshvutla@ti.com commit a5b659bd4bc7518a8e45fda5256c5e5e8d3b7c49 Author: Lokesh Vutla Date: Thu Aug 6 13:18:19 2020 +0530 irqchip/ti-sci-intr: Add support for INTR being a parent to INTR Driver assumes that Interrupt parent to Interrupt router is always GIC. This is not true always and an Interrupt Router can be a parent to Interrupt Router. Update the driver to detect the parent and request the parent irqs accordingly. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200806074826.24607-7-lokeshvutla@ti.com commit b8713af858997c3df5bc5b48e66ac1f1bfe19779 Author: Lokesh Vutla Date: Thu Aug 6 13:18:18 2020 +0530 dt-bindings: irqchip: Convert ti, sci-intr bindings to yaml In order to automate the verification of DT nodes convert ti,sci-intr.txt ti,sci-intr.yaml. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200806074826.24607-6-lokeshvutla@ti.com commit 9a8e2ae71f3553f1b6cd4e3681f04e5d0f147387 Author: Lokesh Vutla Date: Thu Aug 6 13:18:17 2020 +0530 dt-bindings: irqchip: ti, sci-intr: Update bindings to drop the usage of gic as parent Drop the firmware related dt-bindings and use the hardware specified interrupt numbers within Interrupt Router. This ensures interrupt router DT node need not assume any interrupt parent type. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200806074826.24607-5-lokeshvutla@ti.com commit 53bf2b0e4e4c1ff0a957474237f9dcd20036ca54 Author: Lokesh Vutla Date: Thu Aug 6 13:18:16 2020 +0530 firmware: ti_sci: Add support for getting resource with subtype With SYSFW ABI 3.0 changes, interrupts coming out of an interrupt controller is identified by a type and it is consistent across SoCs. Similarly global events for Interrupt aggregator. So add an API to get resource range using a resource type. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Acked-by: Nishanth Menon Link: https://lore.kernel.org/r/20200806074826.24607-4-lokeshvutla@ti.com commit 9b98e02a3d369c5d0875338ea0717030471b5210 Author: Lokesh Vutla Date: Thu Aug 6 13:18:15 2020 +0530 firmware: ti_sci: Drop unused structure ti_sci_rm_type_map struct ti_sci_rm_type_map is no longer used. Drop its definition and its declarations. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Acked-by: Nishanth Menon Link: https://lore.kernel.org/r/20200806074826.24607-3-lokeshvutla@ti.com commit 4473171db68fe9e3de3f2bc68a00527f23852ad8 Author: Lokesh Vutla Date: Thu Aug 6 13:18:14 2020 +0530 firmware: ti_sci: Drop the device id to resource type translation With ABI 3.0, sysfw deprecated special resource types used for AM65x SoC. Instead started using device id as resource type similar to the convention used in J721E SOC. Signed-off-by: Lokesh Vutla Signed-off-by: Marc Zyngier Acked-by: Nishanth Menon Link: https://lore.kernel.org/r/20200806074826.24607-2-lokeshvutla@ti.com commit 34b09af4f54e6485e28f138ccad159611a240cc1 Author: J. Bruce Fields Date: Wed Aug 5 15:10:11 2020 -0400 nfsd: fix oops on mixed NFSv4/NFSv3 client access If an NFSv2/v3 client breaks an NFSv4 client's delegation, it will hit a NULL dereference in nfsd_breaker_owns_lease(). Easily reproduceable with for example mount -overs=4.2 server:/export /mnt/ sleep 1h Fixes: 28df3d1539de50 ("nfsd: clients don't need to break their own delegations") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208807 Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 9123e3a74ec7b934a4a099e98af6a61c2f80bbf5 Author: Linus Torvalds Date: Sun Aug 16 13:04:57 2020 -0700 Linux 5.9-rc1 commit 2cc3c4b3c2e9c99e90aaf19cd801ff2c160f283c Merge: 6f6aea7e966cd f91daf565b0e2 Author: Linus Torvalds Date: Sun Aug 16 10:55:12 2020 -0700 Merge tag 'io_uring-5.9-2020-08-15' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A few differerent things in here. Seems like syzbot got some more io_uring bits wired up, and we got a handful of reports and the associated fixes are in here. General fixes too, and a lot of them marked for stable. Lastly, a bit of fallout from the async buffered reads, where we now more easily trigger short reads. Some applications don't really like that, so the io_read() code now handles short reads internally, and got a cleanup along the way so that it's now easier to read (and documented). We're now passing tests that failed before" * tag 'io_uring-5.9-2020-08-15' of git://git.kernel.dk/linux-block: io_uring: short circuit -EAGAIN for blocking read attempt io_uring: sanitize double poll handling io_uring: internally retry short reads io_uring: retain iov_iter state over io_read/io_write calls task_work: only grab task signal lock when needed io_uring: enable lookup of links holding inflight files io_uring: fail poll arm on queue proc failure io_uring: hold 'ctx' reference around task_work queue + execute fs: RWF_NOWAIT should imply IOCB_NOIO io_uring: defer file table grabbing request cleanup for locked requests io_uring: add missing REQ_F_COMP_LOCKED for nested requests io_uring: fix recursive completion locking on oveflow flush io_uring: use TWA_SIGNAL for task_work uncondtionally io_uring: account locked memory before potential error case io_uring: set ctx sq/cq entry count earlier io_uring: Fix NULL pointer dereference in loop_rw_iter() io_uring: add comments on how the async buffered read retry works io_uring: io_async_buf_func() need not test page bit commit 6f6aea7e966cda5a817d091e938c2d9b52209893 Author: Mike Rapoport Date: Sun Aug 16 17:24:03 2020 +0300 parisc: fix PMD pages allocation by restoring pmd_alloc_one() Commit 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()") converted parisc to use generic version of pmd_alloc_one() but it missed the fact that parisc uses order-1 pages for PMD. Restore the original version of pmd_alloc_one() for parisc, just use GFP_PGTABLE_KERNEL that implies __GFP_ZERO instead of GFP_KERNEL and memset. Fixes: 1355c31eeb7e ("asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one()") Reported-by: Meelis Roos Signed-off-by: Mike Rapoport Tested-by: Meelis Roos Reviewed-by: Matthew Wilcox (Oracle) Link: https://lkml.kernel.org/r/9f2b5ebd-e4a4-0fa1-6cd3-4b9f6892d1ad@linux.ee Signed-off-by: Linus Torvalds commit f5d0f820ff8ae7349f9615e686cfc7b0e36211d9 Author: Liang Wang Date: Sun Aug 16 15:13:09 2020 +0800 ALSA: isa: fix spelling mistakes in the comments Fix spelling mistakes in the comments: initailise ==> initialise tranfer ==> transfer Initialse ==> Initialise Signed-off-by: Liang Wang Link: https://lore.kernel.org/r/20200816071309.121461-1-wangliang101@huawei.com Signed-off-by: Takashi Iwai commit 4b6c093e21d36bede0fd88fd0aeb3b03647260e4 Merge: d84835b118ed8 c1e2b8422bf94 Author: Linus Torvalds Date: Sat Aug 15 20:36:42 2020 -0700 Merge tag 'block-5.9-2020-08-14' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few fixes on the block side of things: - Discard granularity fix (Coly) - rnbd cleanups (Guoqing) - md error handling fix (Dan) - md sysfs fix (Junxiao) - Fix flush request accounting, which caused an IO slowdown for some configurations (Ming) - Properly propagate loop flag for partition scanning (Lennart)" * tag 'block-5.9-2020-08-14' of git://git.kernel.dk/linux-block: block: fix double account of flush request's driver tag loop: unset GENHD_FL_NO_PART_SCAN on LOOP_CONFIGURE rnbd: no need to set bi_end_io in rnbd_bio_map_kern rnbd: remove rnbd_dev_submit_io md-cluster: Fix potential error pointer dereference in resize_bitmaps() block: check queue's limits.discard_granularity in __blkdev_issue_discard() md: get sysfs entry after redundancy attr group create commit d84835b118ed8c14c21fa056ca54014b2eff068b Merge: 5bbec3cfe376e 76d4467a97bd8 Author: Linus Torvalds Date: Sat Aug 15 18:54:42 2020 -0700 Merge tag 'riscv-for-linus-5.9-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fix from Palmer Dabbelt: "I collected a single fix during the merge window: we managed to break the early trap setup on !MMU, this fixes it" * tag 'riscv-for-linus-5.9-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Setup exception vector for nommu platform commit 5bbec3cfe376ed0014d9456a9be11d5ed75d587b Merge: 713eee84720e6 0c64a0dce51fa Author: Linus Torvalds Date: Sat Aug 15 18:50:32 2020 -0700 Merge tag 'sh-for-5.9' of git://git.libc.org/linux-sh Pull arch/sh updates from Rich Felker: "Cleanup, SECCOMP_FILTER support, message printing fixes, and other changes to arch/sh" * tag 'sh-for-5.9' of git://git.libc.org/linux-sh: (34 commits) sh: landisk: Add missing initialization of sh_io_port_base sh: bring syscall_set_return_value in line with other architectures sh: Add SECCOMP_FILTER sh: Rearrange blocks in entry-common.S sh: switch to copy_thread_tls() sh: use the generic dma coherent remap allocator sh: don't allow non-coherent DMA for NOMMU dma-mapping: consolidate the NO_DMA definition in kernel/dma/Kconfig sh: unexport register_trapped_io and match_trapped_io_handler sh: don't include in sh: move the ioremap implementation out of line sh: move ioremap_fixed details out of sh: remove __KERNEL__ ifdefs from non-UAPI headers sh: sort the selects for SUPERH alphabetically sh: remove -Werror from Makefiles sh: Replace HTTP links with HTTPS ones arch/sh/configs: remove obsolete CONFIG_SOC_CAMERA* sh: stacktrace: Remove stacktrace_ops.stack() sh: machvec: Modernize printing of kernel messages sh: pci: Modernize printing of kernel messages ... commit f91daf565b0e272a33bd3fcd19eaebd331c5cffd Author: Jens Axboe Date: Sat Aug 15 15:58:42 2020 -0700 io_uring: short circuit -EAGAIN for blocking read attempt One case was missed in the short IO retry handling, and that's hitting -EAGAIN on a blocking attempt read (eg from io-wq context). This is a problem on sockets that are marked as non-blocking when created, they don't carry any REQ_F_NOWAIT information to help us terminate them instead of perpetually retrying. Fixes: 227c0c9673d8 ("io_uring: internally retry short reads") Signed-off-by: Jens Axboe commit d4e7cd36a90e38e0276d6ce0c20f5ccef17ec38c Author: Jens Axboe Date: Sat Aug 15 11:44:50 2020 -0700 io_uring: sanitize double poll handling There's a bit of confusion on the matching pairs of poll vs double poll, depending on if the request is a pure poll (IORING_OP_POLL_ADD) or poll driven retry. Add io_poll_get_double() that returns the double poll waitqueue, if any, and io_poll_get_single() that returns the original poll waitqueue. With that, remove the argument to io_poll_remove_double(). Finally ensure that wait->private is cleared once the double poll handler has run, so that remove knows it's already been seen. Cc: stable@vger.kernel.org # v5.8 Reported-by: syzbot+7f617d4a9369028b8a2c@syzkaller.appspotmail.com Fixes: 18bceab101ad ("io_uring: allow POLL_ADD with double poll_wait() users") Signed-off-by: Jens Axboe commit 24633d901ea44fe99bc9a2d01a3881fa097b78b3 Author: Vaibhav Shankar Date: Thu Aug 13 19:22:34 2020 -0700 perf/x86/intel/uncore: Add BW counters for GT, IA and IO breakdown Linux only has support to read total DDR reads and writes. Here we add support to enable bandwidth breakdown-GT, IA and IO. Breakdown of BW is important to debug and optimize memory access. This can also be used for telemetry and improving the system software.The offsets for GT, IA and IO are added and these free running counters can be accessed via MMIO space. The BW breakdown can be measured using the following cmd: perf stat -e uncore_imc/gt_requests/,uncore_imc/ia_requests/,uncore_imc/io_requests/ 30.57 MiB uncore_imc/gt_requests/ 1346.13 MiB uncore_imc/ia_requests/ 190.97 MiB uncore_imc/io_requests/ 5.984572733 seconds time elapsed BW/s = _requests/time elapsed Signed-off-by: Vaibhav Shankar Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200814022234.23605-1-vaibhav.shankar@intel.com commit 713eee84720e6525bc5b65954c5087604a15f5e8 Merge: 50f6c7dbd9730 492e4edba6e2f Author: Linus Torvalds Date: Sat Aug 15 11:17:15 2020 -0700 Merge tag 'perf-tools-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull more perf tools updates from Arnaldo Carvalho de Melo: "Fixes: - Fixes for 'perf bench numa'. - Always memset source before memcpy in 'perf bench mem'. - Quote CC and CXX for their arguments to fix build in environments using those variables to pass more than just the compiler names. - Fix module symbol processing, addressing regression detected via "perf test". - Allow multiple probes in record+script_probe_vfs_getname.sh 'perf test' entry. Improvements: - Add script to autogenerate socket family name id->string table from copy of kernel header, used so far in 'perf trace'. - 'perf ftrace' improvements to provide similar options for this utility so that one can go from 'perf record', 'perf trace', etc to 'perf ftrace' just by changing the name of the subcommand. - Prefer new "sched:sched_waking" trace event when it exists in 'perf sched' post processing. - Update POWER9 metrics to utilize other metrics. - Fall back to querying debuginfod if debuginfo not found locally. Miscellaneous: - Sync various kvm headers with kernel sources" * tag 'perf-tools-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (40 commits) perf ftrace: Make option description initials all capital letters perf build-ids: Fall back to debuginfod query if debuginfo not found perf bench numa: Remove dead code in parse_nodes_opt() perf stat: Update POWER9 metrics to utilize other metrics perf ftrace: Add change log perf: ftrace: Add set_tracing_options() to set all trace options perf ftrace: Add option --tid to filter by thread id perf ftrace: Add option -D/--delay to delay tracing perf: ftrace: Allow set graph depth by '--graph-opts' perf ftrace: Add support for trace option tracing_thresh perf ftrace: Add option 'verbose' to show more info for graph tracer perf ftrace: Add support for tracing option 'irq-info' perf ftrace: Add support for trace option funcgraph-irqs perf ftrace: Add support for trace option sleep-time perf ftrace: Add support for tracing option 'func_stack_trace' perf tools: Add general function to parse sublevel options perf ftrace: Add option '--inherit' to trace children processes perf ftrace: Show trace column header perf ftrace: Add option '-m/--buffer-size' to set per-cpu buffer size perf ftrace: Factor out function write_tracing_file_int() ... commit 50f6c7dbd973092d8e5f3c89f29eb4bea19fdebd Merge: 1195d58f003bf a6d996cbd38b4 Author: Linus Torvalds Date: Sat Aug 15 10:38:03 2020 -0700 Merge tag 'x86-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes and small updates all around the place: - Fix mitigation state sysfs output - Fix an FPU xstate/sxave code assumption bug triggered by Architectural LBR support - Fix Lightning Mountain SoC TSC frequency enumeration bug - Fix kexec debug output - Fix kexec memory range assumption bug - Fix a boundary condition in the crash kernel code - Optimize porgatory.ro generation a bit - Enable ACRN guests to use X2APIC mode - Reduce a __text_poke() IRQs-off critical section for the benefit of PREEMPT_RT" * tag 'x86-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/alternatives: Acquire pte lock with interrupts enabled x86/bugs/multihit: Fix mitigation reporting when VMX is not in use x86/fpu/xstate: Fix an xstate size check warning with architectural LBRs x86/purgatory: Don't generate debug info for purgatory.ro x86/tsr: Fix tsc frequency enumeration bug on Lightning Mountain SoC kexec_file: Correctly output debugging information for the PT_LOAD ELF header kexec: Improve & fix crash_exclude_mem_range() to handle overlapping ranges x86/crash: Correct the address boundary of function parameters x86/acrn: Remove redundant chars from ACRN signature x86/acrn: Allow ACRN guest to use X2APIC mode commit 1195d58f003bf84d37fc5c30017600e09ba567b2 Merge: 7f5faaaa5909b cc172ff301d80 Author: Linus Torvalds Date: Sat Aug 15 10:36:40 2020 -0700 Merge tag 'sched-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Two fixes: fix a new tracepoint's output value, and fix the formatting of show-state syslog printouts" * tag 'sched-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/debug: Fix the alignment of the show-state debug output sched: Fix use of count for nr_running tracepoint commit 7f5faaaa5909bb0b26dcd309424da14bdf0c7e93 Merge: eb1319af4119c bcfd218b66790 Author: Linus Torvalds Date: Sat Aug 15 10:34:24 2020 -0700 Merge tag 'perf-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc fixes, an expansion of perf syscall access to CAP_PERFMON privileged tools, plus a RAPL HW-enablement for Intel SPR platforms" * tag 'perf-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/rapl: Add support for Intel SPR platform perf/x86/rapl: Support multiple RAPL unit quirks perf/x86/rapl: Fix missing psys sysfs attributes hw_breakpoint: Remove unused __register_perf_hw_breakpoint() declaration kprobes: Remove show_registers() function prototype perf/core: Take over CAP_SYS_PTRACE creds to CAP_PERFMON capability commit eb1319af4119c4936e02c879295e9fd4d50bbe3a Merge: 410520d07f5c6 405fa8ac89e7a Author: Linus Torvalds Date: Sat Aug 15 10:32:18 2020 -0700 Merge tag 'locking-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixlets from Ingo Molnar: "A documentation fix and a 'fallthrough' macro update" * tag 'locking-urgent-2020-08-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Convert to use the preferred 'fallthrough' macro Documentation/locking/locktypes: Fix a typo commit 410520d07f5c66a6c1f3eb7ef2063d9bdd3d440b Merge: f6513bd39c15a 2ed0b7578170c Author: Linus Torvalds Date: Sat Aug 15 08:34:36 2020 -0700 Merge tag '9p-for-5.9-rc1' of git://github.com/martinetd/linux Pull 9p updates from Dominique Martinet: - some code cleanup - a couple of static analysis fixes - setattr: try to pick a fid associated with the file rather than the dentry, which might sometimes matter * tag '9p-for-5.9-rc1' of git://github.com/martinetd/linux: 9p: Remove unneeded cast from memory allocation 9p: remove unused code in 9p net/9p: Fix sparse endian warning in trans_fd.c 9p: Fix memory leak in v9fs_mount 9p: retrieve fid from file when file instance exist. commit f6513bd39c15af8f8a63b1fbfcb1bf4717241655 Merge: 37711e5e23255 c8c412f976124 Author: Linus Torvalds Date: Sat Aug 15 08:31:39 2020 -0700 Merge tag '5.9-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Three small cifs/smb3 fixes, one for stable fixing mkdir path with the 'idsfromsid' mount option" * tag '5.9-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: SMB3: Fix mkdir when idsfromsid configured on mount cifs: Convert to use the fallthrough macro cifs: Fix an error pointer dereference in cifs_mount() commit 37711e5e2325535bf094bdc0a66790d659b52d5b Merge: 6ffdcde4ee9a2 563c53e73b8b6 Author: Linus Torvalds Date: Sat Aug 15 08:26:55 2020 -0700 Merge tag 'nfs-for-5.9-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Stable fixes: - pNFS: Don't return layout segments that are being used for I/O - pNFS: Don't move layout segments off the active list when being used for I/O Features: - NFS: Add support for user xattrs through the NFSv4.2 protocol - NFS: Allow applications to speed up readdir+statx() using AT_STATX_DONT_SYNC - NFSv4.0 allow nconnect for v4.0 Bugfixes and cleanups: - nfs: ensure correct writeback errors are returned on close() - nfs: nfs_file_write() should check for writeback errors - nfs: Fix getxattr kernel panic and memory overflow - NFS: Fix the pNFS/flexfiles mirrored read failover code - SUNRPC: dont update timeout value on connection reset - freezer: Add unsafe versions of freezable_schedule_timeout_interruptible for NFS - sunrpc: destroy rpc_inode_cachep after unregister_filesystem" * tag 'nfs-for-5.9-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (32 commits) NFS: Fix flexfiles read failover fs: nfs: delete repeated words in comments rpc_pipefs: convert comma to semicolon nfs: Fix getxattr kernel panic and memory overflow NFS: Don't return layout segments that are in use NFS: Don't move layouts to plh_return_segs list while in use NFS: Add layout segment info to pnfs read/write/commit tracepoints NFS: Add tracepoints for layouterror and layoutstats. NFS: Report the stateid + status in trace_nfs4_layoutreturn_on_close() SUNRPC dont update timeout value on connection reset nfs: nfs_file_write() should check for writeback errors nfs: ensure correct writeback errors are returned on close() NFSv4.2: xattr cache: get rid of cache discard work queue NFS: remove redundant initialization of variable result NFSv4.0 allow nconnect for v4.0 freezer: Add unsafe versions of freezable_schedule_timeout_interruptible for NFS sunrpc: destroy rpc_inode_cachep after unregister_filesystem NFSv4.2: add client side xattr caching. NFSv4.2: hook in the user extended attribute handlers NFSv4.2: add the extended attribute proc functions. ... commit 6ffdcde4ee9a20beda096dec664da89002610d7d Merge: b07175dc41bab 709ed1bcef123 Author: Linus Torvalds Date: Sat Aug 15 08:25:41 2020 -0700 Merge tag 'edac_updates_for_5.9_pt2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull edac fix from Tony Luck: "Fix for the ie31200 driver that missed the first pull" * tag 'edac_updates_for_5.9_pt2' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/ie31200: Fallback if host bridge device is already initialized commit b07175dc41babfec057f494d22a750af755297d8 Merge: 341323fa0eed1 5f0b06da5cde3 Author: Linus Torvalds Date: Sat Aug 15 08:19:58 2020 -0700 Merge tag 'devicetree-fixes-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: "Another round of 'allOf' removals and whitespace clean-ups of schemas" * tag 'devicetree-fixes-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: Remove more cases of 'allOf' containing a '$ref' dt-bindings: Whitespace clean-ups in schema files commit 341323fa0eed1b201130b7af84d40fa04725c832 Merge: 1a5d9dbbaf3af 19fe87fd854a9 Author: Linus Torvalds Date: Sat Aug 15 08:18:22 2020 -0700 Merge tag 'acpi-5.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more ACPI updates from Rafael Wysocki: "Add new hardware support to the ACPI driver for AMD SoCs, the x86 clk driver and the Designware i2c driver (changes from Akshu Agrawal and Pu Wen)" * tag 'acpi-5.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: clk: x86: Support RV architecture ACPI: APD: Add a fmw property is_raven clk: x86: Change name from ST to FCH ACPI: APD: Change name from ST to FCH i2c: designware: Add device HID for Hygon I2C controller commit 1a5d9dbbaf3af4d029a081bd58dc83b6a25d109e Merge: 884e0d3dd59dd f3db6de55e95e Author: Linus Torvalds Date: Sat Aug 15 08:17:01 2020 -0700 Merge tag 'pm-5.9-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull one more power management update from Rafael Wysocki: "Modify the intel_pstate driver to allow it to work in the passive mode with hardware-managed P-states (HWP) enabled" * tag 'pm-5.9-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Implement passive mode with HWP enabled commit 884e0d3dd59dde1c1f0fbb5b9db2bcdc581982c7 Merge: 18737f4243abe e15d7f2b81d2e Author: Linus Torvalds Date: Sat Aug 15 08:09:38 2020 -0700 Merge tag 'mfd-next-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core Frameworks - Make better attempt at matching device with the correct OF node - Allow batch removal of hierarchical sub-devices New Drivers - Add STM32 Clocksource driver - Add support for Khadas System Control Microcontroller Driver Removal - Remove unused driver for TI's SMSC ECE1099 New Device Support - Add support for Intel Emmitsburg PCH to Intel LPSS PCI - Add support for Intel Tiger Lake PCH-H to Intel LPSS PCI - Add support for Dialog DA revision to Dialog DA9063 New Functionality - Add support for AXP803 to be probed by I2C Fix-ups - Numerous W=1 warning fixes - Device Tree changes (stm32-lptimer, gateworks-gsc, khadas,mcu, stmfx, cros-ec, j721e-system-controller) - Enabled Regmap 'fast I/O' in stm32-lptimer - Change BUG_ON to WARN_ON in arizona-core - Remove superfluous code/initialisation (madera, max14577) - Trivial formatting/spelling issues (madera-core, madera-i2c, da9055, max77693-private) - Switch to of_platform_populate() in sprd-sc27xx-spi - Expand out set/get brightness/pwm macros in lm3533-ctrlbank - Disable IRQs on suspend in motorola-cpcap - Clean-up error handling in intel_soc_pmic_mrfld - Ensure correct removal order of sub-devices in madera - Many s/HTTP/HTTPS/ link changes - Ensure name used with Regmap is unique in syscon Bug Fixes - Properly 'put' clock on unbind and error in arizona-core - Fix revision handling in da9063 - Fix 'assignment of read-only location' error in kempld-core - Avoid using the Regmap API when atomic in rn5t618 - Redefine volatile register description in rn5t618 - Use locking to protect event handler in dln2" * tag 'mfd-next-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (76 commits) mfd: syscon: Use a unique name with regmap_config mfd: Replace HTTP links with HTTPS ones mfd: dln2: Run event handler loop under spinlock mfd: madera: Improve handling of regulator unbinding mfd: mfd-core: Add mechanism for removal of a subset of children mfd: intel_soc_pmic_mrfld: Simplify the return expression of intel_scu_ipc_dev_iowrite8() mfd: max14577: Remove redundant initialization of variable current_bits mfd: rn5t618: Fix caching of battery related registers mfd: max77693-private: Drop a duplicated word mfd: da9055: pdata.h: Drop a duplicated word mfd: rn5t618: Make restart handler atomic safe mfd: kempld-core: Fix 'assignment of read-only location' error mfd: axp20x: Allow the AXP803 to be probed by I2C mfd: da9063: Add support for latest DA silicon revision mfd: da9063: Fix revision handling to correctly select reg tables dt-bindings: mfd: st,stmfx: Remove I2C unit name dt-bindings: mfd: ti,j721e-system-controller.yaml: Add J721e system controller mfd: motorola-cpcap: Disable interrupt for suspend mfd: smsc-ece1099: Remove driver mfd: core: Add OF_MFD_CELL_REG() helper ... commit 18737f4243abe02f55ad62ad4baa04c318b48e8d Merge: c9c9735c46f58 fe0580ac5cea1 Author: Linus Torvalds Date: Sat Aug 15 08:02:03 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: "Subsystems affected by this patch series: mm/hotfixes, lz4, exec, mailmap, mm/thp, autofs, sysctl, mm/kmemleak, mm/misc and lib" * emailed patches from Andrew Morton : (35 commits) virtio: pci: constify ioreadX() iomem argument (as in generic implementation) ntb: intel: constify ioreadX() iomem argument (as in generic implementation) rtl818x: constify ioreadX() iomem argument (as in generic implementation) iomap: constify ioreadX() iomem argument (as in generic implementation) sh: use generic strncpy() sh: clkfwk: remove r8/r16/r32 include/asm-generic/vmlinux.lds.h: align ro_after_init mm: annotate a data race in page_zonenum() mm/swap.c: annotate data races for lru_rotate_pvecs mm/rmap: annotate a data race at tlb_flush_batched mm/mempool: fix a data race in mempool_free() mm/list_lru: fix a data race in list_lru_count_one mm/memcontrol: fix a data race in scan count mm/page_counter: fix various data races at memsw mm/swapfile: fix and annotate various data races mm/filemap.c: fix a data race in filemap_fault() mm/swap_state: mark various intentional data races mm/page_io: mark various intentional data races mm/frontswap: mark various intentional data races mm/kmemleak: silence KCSAN splats in checksum ... commit 0ae18a82686f9b9965a8ce0dd81371871b306ffe Author: Zhang Changzhong Date: Wed Aug 5 11:50:25 2020 +0800 can: j1939: add rxtimer for multipacket broadcast session According to SAE J1939/21 (Chapter 5.12.3 and APPENDIX C), for transmit side the required time interval between packets of a multipacket broadcast message is 50 to 200 ms, the responder shall use a timeout of 250ms (provides margin allowing for the maximumm spacing of 200ms). For receive side a timeout will occur when a time of greater than 750 ms elapsed between two message packets when more packets were expected. So this patch fix and add rxtimer for multipacket broadcast session. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1596599425-5534-5-git-send-email-zhangchangzhong@huawei.com Acked-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit 2b8b2e31555cf55ba3680fb28e2b382e168d7ea1 Author: Zhang Changzhong Date: Wed Aug 5 11:50:24 2020 +0800 can: j1939: abort multipacket broadcast session when timeout occurs If timeout occurs, j1939_tp_rxtimer() first calls hrtimer_start() to restart rxtimer, and then calls __j1939_session_cancel() to set session->state = J1939_SESSION_WAITING_ABORT. At next timeout expiration, because of the J1939_SESSION_WAITING_ABORT session state j1939_tp_rxtimer() will call j1939_session_deactivate_activate_next() to deactivate current session, and rxtimer won't be set. But for multipacket broadcast session, __j1939_session_cancel() don't set session->state = J1939_SESSION_WAITING_ABORT, thus current session won't be deactivate and hrtimer_start() is called to start new rxtimer again and again. So fix it by moving session->state = J1939_SESSION_WAITING_ABORT out of if (!j1939_cb_is_broadcast(&session->skcb)) statement. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1596599425-5534-4-git-send-email-zhangchangzhong@huawei.com Acked-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit e8b17653088f28a87c81845fa41a2d295a3b458c Author: Zhang Changzhong Date: Wed Aug 5 11:50:23 2020 +0800 can: j1939: cancel rxtimer on multipacket broadcast session complete If j1939_xtp_rx_dat_one() receive last frame of multipacket broadcast message, j1939_session_timers_cancel() should be called to cancel rxtimer. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1596599425-5534-3-git-send-email-zhangchangzhong@huawei.com Acked-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit f4fd77fd87e9b214c26bb2ebd4f90055eaea5ade Author: Zhang Changzhong Date: Wed Aug 5 11:50:22 2020 +0800 can: j1939: fix support for multipacket broadcast message Currently j1939_tp_im_involved_anydir() in j1939_tp_recv() check the previously set flags J1939_ECU_LOCAL_DST and J1939_ECU_LOCAL_SRC of incoming skb, thus multipacket broadcast message was aborted by receive side because it may come from remote ECUs and have no exact dst address. Similarly, j1939_tp_cmd_recv() and j1939_xtp_rx_dat() didn't process broadcast message. So fix it by checking and process broadcast message in j1939_tp_recv(), j1939_tp_cmd_recv() and j1939_xtp_rx_dat(). Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Zhang Changzhong Link: https://lore.kernel.org/r/1596599425-5534-2-git-send-email-zhangchangzhong@huawei.com Acked-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit 470757f5b3a46bd85741bb0d8c1fd3f21048a2af Author: Alexander Tsoy Date: Sat Aug 15 03:21:03 2020 +0300 ALSA: usb-audio: Add capture support for Saffire 6 (USB 1.1) Capture and playback endpoints on Saffire 6 (USB 1.1) resides on the same interface. This was not supported by the composite quirk back in the day when initial support for this device was added, thus only playback was enabled until now. Fixes: 11e424e88bd4 ("ALSA: usb-audio: Add support for Focusrite Saffire 6 USB") Signed-off-by: Alexander Tsoy Cc: Link: https://lore.kernel.org/r/20200815002103.29247-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit 81dbf2191f60ccf90f65171d6593c420ee05507f Author: Lee Jones Date: Fri Aug 14 12:39:32 2020 +0100 net: fddi: skfp: cfm: Remove seemingly unused variable 'ID_sccs' This variable is present in many source files and has not been used anywhere (at least internally) since it was introduced. Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/cfm.c: In function ‘cfm’: drivers/net/fddi/skfp/cfm.c:211:6: warning: variable ‘oldstate’ set but not used [-Wunused-but-set-variable] drivers/net/fddi/skfp/cfm.c:40:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Lee Jones Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit d1ad06ba7e47a2cb5522d7e81aed1a76abdef41c Author: Lee Jones Date: Fri Aug 14 12:39:31 2020 +0100 net: fddi: skfp: cfm: Remove set but unused variable 'oldstate' While we're at it, remove some code which has never been invoked. Keep the comment though, as it seems potentially half useful. Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/cfm.c: In function ‘cfm’: drivers/net/fddi/skfp/cfm.c:211:6: warning: variable ‘oldstate’ set but not used [-Wunused-but-set-variable] Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit 7b1af34f024e72c458a330d028ed4e9ad0d981c3 Author: Lee Jones Date: Fri Aug 14 12:39:30 2020 +0100 net: fddi: skfp: smt: Remove seemingly unused variable 'ID_sccs' This variable is present in many source files and has not been used anywhere (at least internally) since it was introduced. Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/smt.c:24:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Tetsuo Handa Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit 327afdd7c0d13695e8fcbaa0995d451b34c3107b Author: Lee Jones Date: Fri Aug 14 12:39:24 2020 +0100 net: fddi: skfp: smt: Place definition of 'smt_pdef' under same stipulations as its use The variable 'smt_pdef' is only used if LITTLE_ENDIAN is set, so only define it if this is the case. Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/smt.c:1572:3: warning: ‘smt_pdef’ defined but not used [-Wunused-const-variable=] Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Tetsuo Handa Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit 026ff46b42f4929b25ef28e1e69dd302835c9783 Author: Lee Jones Date: Fri Aug 14 12:39:22 2020 +0100 net: fddi: skfp: fplustm: Remove seemingly unused variable 'ID_sccs' This variable is present in many source files and has not been used anywhere (at least internally) since it was introduced. Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/fplustm.c:25:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: netdev@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit 0d9b56453b754b1c5ca32ca8a5780b556971f881 Author: Lee Jones Date: Fri Aug 14 12:39:21 2020 +0100 net: fddi: skfp: hwmtm: Remove seemingly unused variable 'ID_sccs' This variable is present in many source files and has not been used anywhere (at least internally) since it was introduced. Fixes the following W=1 kernel build warning(s): drivers/net/fddi/skfp/hwmtm.c:14:19: warning: ‘ID_sccs’ defined but not used [-Wunused-const-variable=] Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit 1a2c26681f88c924e15d3bfe0a9fb7a162336777 Author: Lee Jones Date: Fri Aug 14 12:39:13 2020 +0100 net: wan: dlci: Remove set but not used variable 'err' Fixes the following W=1 kernel build warning(s): drivers/net/wan/dlci.c: In function ‘dlci_close’: drivers/net/wan/dlci.c:298:8: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Mike McLagan Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit fd29aeeec5a1af1a97a42ec2ba307bffdbc563e8 Author: Lee Jones Date: Fri Aug 14 12:39:09 2020 +0100 net: ethernet: 8390: axnet_cs: Document unused parameter 'txqueue' Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/8390/axnet_cs.c:907: warning: Function parameter or member 'txqueue' not described in 'axnet_tx_timeout' Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Martin Habets Cc: Shannon Nelson Cc: "Michael S. Tsirkin" Cc: William Lee Cc: "A. Hinds --" Cc: reached at Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit f6e81b890b29336ff5c5777b0b24c23b631213b2 Author: Lee Jones Date: Fri Aug 14 12:39:07 2020 +0100 net: bonding: bond_alb: Describe alb_handle_addr_collision_on_attach()'s 'bond' and 'addr' params Fixes the following W=1 kernel build warning(s): drivers/net/bonding/bond_alb.c:1222: warning: Function parameter or member 'bond' not described in 'alb_set_mac_address' Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit 2083bebca7c08598ac15ac20a9ba1cc3338fc4d6 Author: Lee Jones Date: Fri Aug 14 12:39:06 2020 +0100 net: ethernet: 3com: 3c574_cs: Remove set but unused variables 'tx' and 'rx' Fixes the following W=1 kernel build warning(s): drivers/net/ethernet/3com/3c574_cs.c: In function ‘update_stats’: drivers/net/ethernet/3com/3c574_cs.c:954:9: warning: variable ‘tx’ set but not used [-Wunused-but-set-variable] 954 | u8 rx, tx, up; | ^~ drivers/net/ethernet/3com/3c574_cs.c:954:5: warning: variable ‘rx’ set but not used [-Wunused-but-set-variable] 954 | u8 rx, tx, up; | ^~ Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Shannon Nelson Cc: Heiner Kallweit Cc: Martin Habets Cc: "Michael S. Tsirkin" Cc: Donald Becker Cc: David Hinds Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit 45a1553bd34abc17c3766d384a6e1500f7551a30 Author: Lee Jones Date: Fri Aug 14 12:39:05 2020 +0100 net: bonding: bond_main: Document 'proto' and rename 'new_active' parameters Fixes the following W=1 kernel build warning(s): drivers/net/bonding/bond_main.c:329: warning: Function parameter or member 'proto' not described in 'bond_vlan_rx_add_vid' drivers/net/bonding/bond_main.c:362: warning: Function parameter or member 'proto' not described in 'bond_vlan_rx_kill_vid' drivers/net/bonding/bond_main.c:964: warning: Function parameter or member 'new_active' not described in 'bond_change_active_slave' drivers/net/bonding/bond_main.c:964: warning: Excess function parameter 'new' description in 'bond_change_active_slave' Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Thomas Davis Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit a35e5478779c2886a68beb233441eabcd2883d6c Author: Lee Jones Date: Fri Aug 14 12:39:04 2020 +0100 net: bonding: bond_3ad: Fix a bunch of kerneldoc parameter issues Renames and missing descriptions. Fixes the following W=1 kernel build warning(s): drivers/net/bonding/bond_3ad.c:140: warning: Function parameter or member 'port' not described in '__get_first_agg' drivers/net/bonding/bond_3ad.c:140: warning: Excess function parameter 'bond' description in '__get_first_agg' drivers/net/bonding/bond_3ad.c:1655: warning: Function parameter or member 'agg' not described in 'ad_agg_selection_logic' drivers/net/bonding/bond_3ad.c:1655: warning: Excess function parameter 'aggregator' description in 'ad_agg_selection_logic' drivers/net/bonding/bond_3ad.c:1817: warning: Function parameter or member 'port' not described in 'ad_initialize_port' drivers/net/bonding/bond_3ad.c:1817: warning: Excess function parameter 'aggregator' description in 'ad_initialize_port' drivers/net/bonding/bond_3ad.c:1976: warning: Function parameter or member 'timeout' not described in 'bond_3ad_initiate_agg_selection' drivers/net/bonding/bond_3ad.c:2274: warning: Function parameter or member 'work' not described in 'bond_3ad_state_machine_handler' drivers/net/bonding/bond_3ad.c:2274: warning: Excess function parameter 'bond' description in 'bond_3ad_state_machine_handler' drivers/net/bonding/bond_3ad.c:2508: warning: Function parameter or member 'link' not described in 'bond_3ad_handle_link_change' drivers/net/bonding/bond_3ad.c:2508: warning: Excess function parameter 'status' description in 'bond_3ad_handle_link_change' drivers/net/bonding/bond_3ad.c:2566: warning: Function parameter or member 'bond' not described in 'bond_3ad_set_carrier' drivers/net/bonding/bond_3ad.c:2677: warning: Function parameter or member 'bond' not described in 'bond_3ad_update_lacp_rate' drivers/net/bonding/bond_3ad.c:1655: warning: Function parameter or member 'agg' not described in 'ad_agg_selection_logic' drivers/net/bonding/bond_3ad.c:1655: warning: Excess function parameter 'aggregator' description in 'ad_agg_selection_logic' drivers/net/bonding/bond_3ad.c:1817: warning: Function parameter or member 'port' not described in 'ad_initialize_port' drivers/net/bonding/bond_3ad.c:1817: warning: Excess function parameter 'aggregator' description in 'ad_initialize_port' drivers/net/bonding/bond_3ad.c:1976: warning: Function parameter or member 'timeout' not described in 'bond_3ad_initiate_agg_selection' drivers/net/bonding/bond_3ad.c:2274: warning: Function parameter or member 'work' not described in 'bond_3ad_state_machine_handler' drivers/net/bonding/bond_3ad.c:2274: warning: Excess function parameter 'bond' description in 'bond_3ad_state_machine_handler' drivers/net/bonding/bond_3ad.c:2508: warning: Function parameter or member 'link' not described in 'bond_3ad_handle_link_change' drivers/net/bonding/bond_3ad.c:2508: warning: Excess function parameter 'status' description in 'bond_3ad_handle_link_change' drivers/net/bonding/bond_3ad.c:2566: warning: Function parameter or member 'bond' not described in 'bond_3ad_set_carrier' drivers/net/bonding/bond_3ad.c:2677: warning: Function parameter or member 'bond' not described in 'bond_3ad_update_lacp_rate' Cc: Jay Vosburgh Cc: Veaceslav Falico Cc: Andy Gospodarek Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit 77b981c82c1df7c7ad32a046f17f007450b46954 Author: Xie He Date: Thu Aug 13 11:17:04 2020 -0700 drivers/net/wan/hdlc_x25: Added needed_headroom and a skb->len check 1. Added a skb->len check This driver expects upper layers to include a pseudo header of 1 byte when passing down a skb for transmission. This driver will read this 1-byte header. This patch added a skb->len check before reading the header to make sure the header exists. 2. Added needed_headroom and set hard_header_len to 0 When this driver transmits data, first this driver will remove a pseudo header of 1 byte, then the lapb module will prepend the LAPB header of 2 or 3 bytes. So the value of needed_headroom in this driver should be 3 - 1. Because this driver has no header_ops, according to the logic of af_packet.c, the value of hard_header_len should be 0. Reason of setting needed_headroom and hard_header_len at this place: This driver is written using the API of the hdlc module, the hdlc module enables this driver (the protocol driver) to run on any hardware that has a driver (the hardware driver) written using the API of the hdlc module. Two other hdlc protocol drivers - hdlc_ppp and hdlc_raw_eth, also set things like hard_header_len at this place. In hdlc_ppp, it sets hard_header_len after attach_hdlc_protocol and before setting dev->type. In hdlc_raw_eth, it sets hard_header_len by calling ether_setup after attach_hdlc_protocol and after memcpy the settings. 3. Reset needed_headroom when detaching protocols (in hdlc.c) When detaching a protocol from a hardware device, the hdlc module will reset various parameters of the device (including hard_header_len) to the default values. We add needed_headroom here so that needed_headroom will also be reset. Cc: Willem de Bruijn Cc: Martin Schiller Cc: Andrew Hendry Signed-off-by: Xie He Signed-off-by: David S. Miller commit 4ca0d9ac3fd8f9f90b72a15d8da2aca3ffb58418 Author: Jarod Wilson Date: Thu Aug 13 10:09:00 2020 -0400 bonding: show saner speed for broadcast mode Broadcast mode bonds transmit a copy of all traffic simultaneously out of all interfaces, so the "speed" of the bond isn't really the aggregate of all interfaces, but rather, the speed of the slowest active interface. Also, the type of the speed field is u32, not unsigned long, so adjust that accordingly, as required to make min() function here without complaining about mismatching types. Fixes: bb5b052f751b ("bond: add support to read speed and duplex via ethtool") CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: "David S. Miller" CC: netdev@vger.kernel.org Acked-by: Jay Vosburgh Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller commit fe0580ac5cea1e534ce32a44306161f34ddbc60a Author: Krzysztof Kozlowski Date: Fri Aug 14 17:32:20 2020 -0700 virtio: pci: constify ioreadX() iomem argument (as in generic implementation) The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among architectures. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Reviewed-by: Geert Uytterhoeven Cc: Allen Hubbe Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Dave Jiang Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Helge Deller Cc: Ivan Kokshaysky Cc: Jakub Kicinski Cc: "James E.J. Bottomley" Cc: Jason Wang Cc: Jon Mason Cc: Kalle Valo Cc: Matt Turner Cc: Michael Ellerman Cc: "Michael S. Tsirkin" Cc: Paul Mackerras Cc: Richard Henderson Cc: Rich Felker Cc: Yoshinori Sato Link: http://lkml.kernel.org/r/20200709072837.5869-5-krzk@kernel.org Signed-off-by: Linus Torvalds commit 58184e95e9f1f80dc7adca215ccbeabfee081b23 Author: Krzysztof Kozlowski Date: Fri Aug 14 17:32:15 2020 -0700 ntb: intel: constify ioreadX() iomem argument (as in generic implementation) The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among architectures. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Reviewed-by: Geert Uytterhoeven Acked-by: Dave Jiang Cc: Allen Hubbe Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Helge Deller Cc: Ivan Kokshaysky Cc: Jakub Kicinski Cc: "James E.J. Bottomley" Cc: Jason Wang Cc: Jon Mason Cc: Kalle Valo Cc: Matt Turner Cc: Michael Ellerman Cc: "Michael S. Tsirkin" Cc: Paul Mackerras Cc: Richard Henderson Cc: Rich Felker Cc: Yoshinori Sato Link: http://lkml.kernel.org/r/20200709072837.5869-4-krzk@kernel.org Signed-off-by: Linus Torvalds commit 5ca6ad7dce2f3d05bd67a15031c750c0214b7b33 Author: Krzysztof Kozlowski Date: Fri Aug 14 17:32:11 2020 -0700 rtl818x: constify ioreadX() iomem argument (as in generic implementation) The ioreadX() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among architectures. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Reviewed-by: Geert Uytterhoeven Acked-by: Kalle Valo Cc: Allen Hubbe Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Dave Jiang Cc: "David S. Miller" Cc: Geert Uytterhoeven Cc: Helge Deller Cc: Ivan Kokshaysky Cc: Jakub Kicinski Cc: "James E.J. Bottomley" Cc: Jason Wang Cc: Jon Mason Cc: Matt Turner Cc: Michael Ellerman Cc: "Michael S. Tsirkin" Cc: Paul Mackerras Cc: Richard Henderson Cc: Rich Felker Cc: Yoshinori Sato Link: http://lkml.kernel.org/r/20200709072837.5869-3-krzk@kernel.org Signed-off-by: Linus Torvalds commit 8f28ca6bd8211214faf717677bbffe375c2a6072 Author: Krzysztof Kozlowski Date: Fri Aug 14 17:32:07 2020 -0700 iomap: constify ioreadX() iomem argument (as in generic implementation) Patch series "iomap: Constify ioreadX() iomem argument", v3. The ioread8/16/32() and others have inconsistent interface among the architectures: some taking address as const, some not. It seems there is nothing really stopping all of them to take pointer to const. This patch (of 4): The ioreadX() and ioreadX_rep() helpers have inconsistent interface. On some architectures void *__iomem address argument is a pointer to const, on some not. Implementations of ioreadX() do not modify the memory under the address so they can be converted to a "const" version for const-safety and consistency among architectures. [krzk@kernel.org: sh: clk: fix assignment from incompatible pointer type for ioreadX()] Link: http://lkml.kernel.org/r/20200723082017.24053-1-krzk@kernel.org [akpm@linux-foundation.org: fix drivers/mailbox/bcm-pdc-mailbox.c] Link: http://lkml.kernel.org/r/202007132209.Rxmv4QyS%25lkp@intel.com Suggested-by: Geert Uytterhoeven Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Reviewed-by: Geert Uytterhoeven Reviewed-by: Arnd Bergmann Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Yoshinori Sato Cc: Rich Felker Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Dave Jiang Cc: Jon Mason Cc: Allen Hubbe Cc: "Michael S. Tsirkin" Cc: Jason Wang Link: http://lkml.kernel.org/r/20200709072837.5869-1-krzk@kernel.org Link: http://lkml.kernel.org/r/20200709072837.5869-2-krzk@kernel.org Signed-off-by: Linus Torvalds commit f9e7ff9c6fc758b6f25674a9a4451db30344ce1e Author: Kuninori Morimoto Date: Fri Aug 14 17:32:04 2020 -0700 sh: use generic strncpy() Current SH will get below warning at strncpy() In file included from ${LINUX}/arch/sh/include/asm/string.h:3, from ${LINUX}/include/linux/string.h:20, from ${LINUX}/include/linux/bitmap.h:9, from ${LINUX}/include/linux/nodemask.h:95, from ${LINUX}/include/linux/mmzone.h:17, from ${LINUX}/include/linux/gfp.h:6, from ${LINUX}/innclude/linux/slab.h:15, from ${LINUX}/linux/drivers/mmc/host/vub300.c:38: ${LINUX}/drivers/mmc/host/vub300.c: In function 'new_system_port_status': ${LINUX}/arch/sh/include/asm/string_32.h:51:42: warning: array subscript\ 80 is above array bounds of 'char[26]' [-Warray-bounds] : "0" (__dest), "1" (__src), "r" (__src+__n) ~~~~~^~~~ In general, strncpy() should behave like below. char dest[10]; char *src = "12345"; strncpy(dest, src, 10); // dest = {'1', '2', '3', '4', '5', '\0','\0','\0','\0','\0'} But, current SH strnpy() has 2 issues. 1st is it will access to out-of-memory (= src + 10). 2nd is it needs big fixup for it, and maintenance __asm__ code is difficult. To solve these issues, this patch simply uses generic strncpy() instead of architecture specific one. Signed-off-by: Kuninori Morimoto Signed-off-by: Andrew Morton Cc: Alan Modra Cc: Bin Meng Cc: Chen Zhou Cc: Geert Uytterhoeven Cc: John Paul Adrian Glaubitz Cc: Krzysztof Kozlowski Cc: Rich Felker Cc: Romain Naour Cc: Sam Ravnborg Cc: Yoshinori Sato Link: https://marc.info/?l=linux-renesas-soc&m=157664657013309 Signed-off-by: Linus Torvalds commit a8e3943b58ac8321d4817cfa08aadcfa59c2bf3f Author: Kuninori Morimoto Date: Fri Aug 14 17:32:00 2020 -0700 sh: clkfwk: remove r8/r16/r32 SH will get below warning ${LINUX}/drivers/sh/clk/cpg.c: In function 'r8': ${LINUX}/drivers/sh/clk/cpg.c:41:17: warning: passing argument 1 of 'ioread8' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] return ioread8(addr); ^~~~ In file included from ${LINUX}/arch/sh/include/asm/io.h:21, from ${LINUX}/include/linux/io.h:13, from ${LINUX}/drivers/sh/clk/cpg.c:14: ${LINUX}/include/asm-generic/iomap.h:29:29: note: expected 'void *' but argument is of type 'const void *' extern unsigned int ioread8(void __iomem *); ^~~~~~~~~~~~~~ We don't need "const" for r8/r16/r32. And we don't need r8/r16/r32 themselvs. This patch cleanup these. Signed-off-by: Kuninori Morimoto Signed-off-by: Andrew Morton Cc: Alan Modra Cc: Bin Meng Cc: Chen Zhou Cc: Geert Uytterhoeven Cc: John Paul Adrian Glaubitz Cc: Krzysztof Kozlowski Cc: Rich Felker Cc: Romain Naour Cc: Sam Ravnborg Cc: Yoshinori Sato X-MARC-Message: https://marc.info/?l=linux-renesas-soc&m=157852973916903 Signed-off-by: Linus Torvalds commit 7f897acbe5d57995438c831670b7c400e9c0dc00 Author: Romain Naour Date: Fri Aug 14 17:31:57 2020 -0700 include/asm-generic/vmlinux.lds.h: align ro_after_init Since the patch [1], building the kernel using a toolchain built with binutils 2.33.1 prevents booting a sh4 system under Qemu. Apply the patch provided by Alan Modra [2] that fix alignment of rodata. [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ebd2263ba9a9124d93bbc0ece63d7e0fae89b40e [2] https://www.sourceware.org/ml/binutils/2019-12/msg00112.html Signed-off-by: Romain Naour Signed-off-by: Andrew Morton Cc: Alan Modra Cc: Bin Meng Cc: Chen Zhou Cc: Geert Uytterhoeven Cc: John Paul Adrian Glaubitz Cc: Krzysztof Kozlowski Cc: Kuninori Morimoto Cc: Rich Felker Cc: Sam Ravnborg Cc: Yoshinori Sato Cc: Arnd Bergmann Cc: Link: https://marc.info/?l=linux-sh&m=158429470221261 Signed-off-by: Linus Torvalds commit c403f6a3a792a6601185497c12b0bdf4be880439 Author: Qian Cai Date: Fri Aug 14 17:31:53 2020 -0700 mm: annotate a data race in page_zonenum() BUG: KCSAN: data-race in page_cpupid_xchg_last / put_page write (marked) to 0xfffffc0d48ec1a00 of 8 bytes by task 91442 on cpu 3: page_cpupid_xchg_last+0x51/0x80 page_cpupid_xchg_last at mm/mmzone.c:109 (discriminator 11) wp_page_reuse+0x3e/0xc0 wp_page_reuse at mm/memory.c:2453 do_wp_page+0x472/0x7b0 do_wp_page at mm/memory.c:2798 __handle_mm_fault+0xcb0/0xd00 handle_pte_fault at mm/memory.c:4049 (inlined by) __handle_mm_fault at mm/memory.c:4163 handle_mm_fault+0xfc/0x2f0 handle_mm_fault at mm/memory.c:4200 do_page_fault+0x263/0x6f9 do_user_addr_fault at arch/x86/mm/fault.c:1465 (inlined by) do_page_fault at arch/x86/mm/fault.c:1539 page_fault+0x34/0x40 read to 0xfffffc0d48ec1a00 of 8 bytes by task 94817 on cpu 69: put_page+0x15a/0x1f0 page_zonenum at include/linux/mm.h:923 (inlined by) is_zone_device_page at include/linux/mm.h:929 (inlined by) page_is_devmap_managed at include/linux/mm.h:948 (inlined by) put_page at include/linux/mm.h:1023 wp_page_copy+0x571/0x930 wp_page_copy at mm/memory.c:2615 do_wp_page+0x107/0x7b0 __handle_mm_fault+0xcb0/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 Reported by Kernel Concurrency Sanitizer on: CPU: 69 PID: 94817 Comm: systemd-udevd Tainted: G W O L 5.5.0-next-20200204+ #6 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 A page never changes its zone number. The zone number happens to be stored in the same word as other bits which are modified, but the zone number bits will never be modified by any other write, so it can accept a reload of the zone bits after an intervening write and it don't need to use READ_ONCE(). Thus, annotate this data race using ASSERT_EXCLUSIVE_BITS() to also assert that there are no concurrent writes to it. Suggested-by: Marco Elver Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Cc: Paul E. McKenney Cc: David Hildenbrand Cc: Jan Kara Cc: John Hubbard Cc: Ira Weiny Cc: Dan Williams Link: http://lkml.kernel.org/r/1581619089-14472-1-git-send-email-cai@lca.pw Signed-off-by: Linus Torvalds commit 7e0cc01ea181c68f6aa013d8d7e7acbf9b49fda0 Author: Qian Cai Date: Fri Aug 14 17:31:50 2020 -0700 mm/swap.c: annotate data races for lru_rotate_pvecs Read to lru_add_pvec->nr could be interrupted and then write to the same variable. The write has local interrupt disabled, but the plain reads result in data races. However, it is unlikely the compilers could do much damage here given that lru_add_pvec->nr is a "unsigned char" and there is an existing compiler barrier. Thus, annotate the reads using the data_race() macro. The data races were reported by KCSAN, BUG: KCSAN: data-race in lru_add_drain_cpu / rotate_reclaimable_page write to 0xffff9291ebcb8a40 of 1 bytes by interrupt on cpu 23: rotate_reclaimable_page+0x2df/0x490 pagevec_add at include/linux/pagevec.h:81 (inlined by) rotate_reclaimable_page at mm/swap.c:259 end_page_writeback+0x1b5/0x2b0 end_swap_bio_write+0x1d0/0x280 bio_endio+0x297/0x560 dec_pending+0x218/0x430 [dm_mod] clone_endio+0xe4/0x2c0 [dm_mod] bio_endio+0x297/0x560 blk_update_request+0x201/0x920 scsi_end_request+0x6b/0x4a0 scsi_io_completion+0xb7/0x7e0 scsi_finish_command+0x1ed/0x2a0 scsi_softirq_done+0x1c9/0x1d0 blk_done_softirq+0x181/0x1d0 __do_softirq+0xd9/0x57c irq_exit+0xa2/0xc0 do_IRQ+0x8b/0x190 ret_from_intr+0x0/0x42 delay_tsc+0x46/0x80 __const_udelay+0x3c/0x40 __udelay+0x10/0x20 kcsan_setup_watchpoint+0x202/0x3a0 __tsan_read1+0xc2/0x100 lru_add_drain_cpu+0xb8/0x3f0 lru_add_drain+0x25/0x40 shrink_active_list+0xe1/0xc80 shrink_lruvec+0x766/0xb70 shrink_node+0x2d6/0xca0 do_try_to_free_pages+0x1f7/0x9a0 try_to_free_pages+0x252/0x5b0 __alloc_pages_slowpath+0x458/0x1290 __alloc_pages_nodemask+0x3bb/0x450 alloc_pages_vma+0x8a/0x2c0 do_anonymous_page+0x16e/0x6f0 __handle_mm_fault+0xcd5/0xd40 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 read to 0xffff9291ebcb8a40 of 1 bytes by task 37761 on cpu 23: lru_add_drain_cpu+0xb8/0x3f0 lru_add_drain_cpu at mm/swap.c:602 lru_add_drain+0x25/0x40 shrink_active_list+0xe1/0xc80 shrink_lruvec+0x766/0xb70 shrink_node+0x2d6/0xca0 do_try_to_free_pages+0x1f7/0x9a0 try_to_free_pages+0x252/0x5b0 __alloc_pages_slowpath+0x458/0x1290 __alloc_pages_nodemask+0x3bb/0x450 alloc_pages_vma+0x8a/0x2c0 do_anonymous_page+0x16e/0x6f0 __handle_mm_fault+0xcd5/0xd40 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 2 locks held by oom02/37761: #0: ffff9281e5928808 (&mm->mmap_sem#2){++++}, at: do_page_fault #1: ffffffffb3ade380 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part irq event stamp: 1949217 trace_hardirqs_on_thunk+0x1a/0x1c __do_softirq+0x2e7/0x57c __do_softirq+0x34c/0x57c irq_exit+0xa2/0xc0 Reported by Kernel Concurrency Sanitizer on: CPU: 23 PID: 37761 Comm: oom02 Not tainted 5.6.0-rc3-next-20200226+ #6 Hardware name: HP ProLiant BL660c Gen9, BIOS I38 10/17/2018 Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Acked-by: Marco Elver Link: http://lkml.kernel.org/r/20200228044018.1263-1-cai@lca.pw Signed-off-by: Linus Torvalds commit 9c1177b62a8c7f78fee5ede540825b844a1bf0c8 Author: Qian Cai Date: Fri Aug 14 17:31:47 2020 -0700 mm/rmap: annotate a data race at tlb_flush_batched mm->tlb_flush_batched could be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in flush_tlb_batched_pending / try_to_unmap_one write to 0xffff93f754880bd0 of 1 bytes by task 822 on cpu 6: try_to_unmap_one+0x59a/0x1ab0 set_tlb_ubc_flush_pending at mm/rmap.c:635 (inlined by) try_to_unmap_one at mm/rmap.c:1538 rmap_walk_anon+0x296/0x650 rmap_walk+0xdf/0x100 try_to_unmap+0x18a/0x2f0 shrink_page_list+0xef6/0x2870 shrink_inactive_list+0x316/0x880 shrink_lruvec+0x8dc/0x1380 shrink_node+0x317/0xd80 balance_pgdat+0x652/0xd90 kswapd+0x396/0x8d0 kthread+0x1e0/0x200 ret_from_fork+0x27/0x50 read to 0xffff93f754880bd0 of 1 bytes by task 6364 on cpu 4: flush_tlb_batched_pending+0x29/0x90 flush_tlb_batched_pending at mm/rmap.c:682 change_p4d_range+0x5dd/0x1030 change_pte_range at mm/mprotect.c:44 (inlined by) change_pmd_range at mm/mprotect.c:212 (inlined by) change_pud_range at mm/mprotect.c:240 (inlined by) change_p4d_range at mm/mprotect.c:260 change_protection+0x222/0x310 change_prot_numa+0x3e/0x60 task_numa_work+0x219/0x350 task_work_run+0xed/0x140 prepare_exit_to_usermode+0x2cc/0x2e0 ret_from_intr+0x32/0x42 Reported by Kernel Concurrency Sanitizer on: CPU: 4 PID: 6364 Comm: mtest01 Tainted: G W L 5.5.0-next-20200210+ #5 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 flush_tlb_batched_pending() is under PTL but the write is not, but mm->tlb_flush_batched is only a bool type, so the value is unlikely to be shattered. Thus, mark it as an intentional data race by using the data race macro. Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Cc: Marco Elver Link: http://lkml.kernel.org/r/1581450783-8262-1-git-send-email-cai@lca.pw Signed-off-by: Linus Torvalds commit abe1de4209f670ca81ba0d96f64fa9285c05a5ad Author: Qian Cai Date: Fri Aug 14 17:31:44 2020 -0700 mm/mempool: fix a data race in mempool_free() mempool_t pool.curr_nr could be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in mempool_free / remove_element write to 0xffffffffa937638c of 4 bytes by task 6359 on cpu 113: remove_element+0x4a/0x1c0 remove_element at mm/mempool.c:132 mempool_alloc+0x102/0x210 (inlined by) mempool_alloc at mm/mempool.c:399 bio_alloc_bioset+0x106/0x2c0 get_swap_bio+0x49/0x230 __swap_writepage+0x680/0xc30 swap_writepage+0x9c/0xf0 pageout+0x33e/0xae0 shrink_page_list+0x1f57/0x2870 shrink_inactive_list+0x316/0x880 shrink_lruvec+0x8dc/0x1380 shrink_node+0x317/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 read to 0xffffffffa937638c of 4 bytes by interrupt on cpu 64: mempool_free+0x3e/0x150 mempool_free at mm/mempool.c:492 bio_free+0x192/0x280 bio_put+0x91/0xd0 end_swap_bio_write+0x1d8/0x280 bio_endio+0x2c2/0x5b0 dec_pending+0x22b/0x440 [dm_mod] clone_endio+0xe4/0x2c0 [dm_mod] bio_endio+0x2c2/0x5b0 blk_update_request+0x217/0x940 scsi_end_request+0x6b/0x4d0 scsi_io_completion+0xb7/0x7e0 scsi_finish_command+0x223/0x310 scsi_softirq_done+0x1d5/0x210 blk_mq_complete_request+0x224/0x250 scsi_mq_done+0xc2/0x250 pqi_raid_io_complete+0x5a/0x70 [smartpqi] pqi_irq_handler+0x150/0x1410 [smartpqi] __handle_irq_event_percpu+0x90/0x540 handle_irq_event_percpu+0x49/0xd0 handle_irq_event+0x85/0xca handle_edge_irq+0x13f/0x3e0 do_IRQ+0x86/0x190 Since the write is under pool->lock but the read is done as lockless. Even though the commit 5b990546e334 ("mempool: fix and document synchronization and memory barrier usage") introduced the smp_wmb() and smp_rmb() pair to improve the situation, it is adequate to protect it from data races which could lead to a logic bug, so fix it by adding READ_ONCE() for the read. Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Cc: Marco Elver Cc: Tejun Heo Cc: Oleg Nesterov Link: http://lkml.kernel.org/r/1581446384-2131-1-git-send-email-cai@lca.pw Signed-off-by: Linus Torvalds commit a1f459354a0f011a7baf52e5f16cd9ca95f1e6f2 Author: Qian Cai Date: Fri Aug 14 17:31:41 2020 -0700 mm/list_lru: fix a data race in list_lru_count_one struct list_lru_one l.nr_items could be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in list_lru_count_one / list_lru_isolate_move write to 0xffffa102789c4510 of 8 bytes by task 823 on cpu 39: list_lru_isolate_move+0xf9/0x130 list_lru_isolate_move at mm/list_lru.c:180 inode_lru_isolate+0x12b/0x2a0 __list_lru_walk_one+0x122/0x3d0 list_lru_walk_one+0x75/0xa0 prune_icache_sb+0x8b/0xc0 super_cache_scan+0x1b8/0x250 do_shrink_slab+0x256/0x6d0 shrink_slab+0x41b/0x4a0 shrink_node+0x35c/0xd80 balance_pgdat+0x652/0xd90 kswapd+0x396/0x8d0 kthread+0x1e0/0x200 ret_from_fork+0x27/0x50 read to 0xffffa102789c4510 of 8 bytes by task 6345 on cpu 56: list_lru_count_one+0x116/0x2f0 list_lru_count_one at mm/list_lru.c:193 super_cache_count+0xe8/0x170 do_shrink_slab+0x95/0x6d0 shrink_slab+0x41b/0x4a0 shrink_node+0x35c/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 __alloc_pages_nodemask+0x3bb/0x450 alloc_pages_vma+0x8a/0x2c0 do_anonymous_page+0x170/0x700 __handle_mm_fault+0xc9f/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 Reported by Kernel Concurrency Sanitizer on: CPU: 56 PID: 6345 Comm: oom01 Tainted: G W L 5.5.0-next-20200205+ #4 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 A shattered l.nr_items could affect the shrinker behaviour due to a data race. Fix it by adding READ_ONCE() for the read. Since the writes are aligned and up to word-size, assume those are safe from data races to avoid readability issues of writing WRITE_ONCE(var, var + val). Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Cc: Marco Elver Cc: Konrad Rzeszutek Wilk Link: http://lkml.kernel.org/r/1581114679-5488-1-git-send-email-cai@lca.pw Signed-off-by: Linus Torvalds commit e0e3f42fd96cf830c61aa720f0abb4eef41c5ce3 Author: Qian Cai Date: Fri Aug 14 17:31:37 2020 -0700 mm/memcontrol: fix a data race in scan count struct mem_cgroup_per_node mz.lru_zone_size[zone_idx][lru] could be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in lruvec_lru_size / mem_cgroup_update_lru_size write to 0xffff9c804ca285f8 of 8 bytes by task 50951 on cpu 12: mem_cgroup_update_lru_size+0x11c/0x1d0 mem_cgroup_update_lru_size at mm/memcontrol.c:1266 isolate_lru_pages+0x6a9/0xf30 shrink_active_list+0x123/0xcc0 shrink_lruvec+0x8fd/0x1380 shrink_node+0x317/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 __alloc_pages_nodemask+0x3bb/0x450 alloc_pages_vma+0x8a/0x2c0 do_anonymous_page+0x170/0x700 __handle_mm_fault+0xc9f/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 read to 0xffff9c804ca285f8 of 8 bytes by task 50964 on cpu 95: lruvec_lru_size+0xbb/0x270 mem_cgroup_get_zone_lru_size at include/linux/memcontrol.h:536 (inlined by) lruvec_lru_size at mm/vmscan.c:326 shrink_lruvec+0x1d0/0x1380 shrink_node+0x317/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 __alloc_pages_nodemask+0x3bb/0x450 alloc_pages_current+0xa6/0x120 alloc_slab_page+0x3b1/0x540 allocate_slab+0x70/0x660 new_slab+0x46/0x70 ___slab_alloc+0x4ad/0x7d0 __slab_alloc+0x43/0x70 kmem_cache_alloc+0x2c3/0x420 getname_flags+0x4c/0x230 getname+0x22/0x30 do_sys_openat2+0x205/0x3b0 do_sys_open+0x9a/0xf0 __x64_sys_openat+0x62/0x80 do_syscall_64+0x91/0xb47 entry_SYSCALL_64_after_hwframe+0x49/0xbe Reported by Kernel Concurrency Sanitizer on: CPU: 95 PID: 50964 Comm: cc1 Tainted: G W O L 5.5.0-next-20200204+ #6 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 The write is under lru_lock, but the read is done as lockless. The scan count is used to determine how aggressively the anon and file LRU lists should be scanned. Load tearing could generate an inefficient heuristic, so fix it by adding READ_ONCE() for the read. Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Link: http://lkml.kernel.org/r/20200206034945.2481-1-cai@lca.pw Signed-off-by: Linus Torvalds commit 6e4bd50f3888fa8fea8bc66a0ad4ad5f1c862961 Author: Qian Cai Date: Fri Aug 14 17:31:34 2020 -0700 mm/page_counter: fix various data races at memsw Commit 3e32cb2e0a12 ("mm: memcontrol: lockless page counters") could had memcg->memsw->watermark and memcg->memsw->failcnt been accessed concurrently as reported by KCSAN, BUG: KCSAN: data-race in page_counter_try_charge / page_counter_try_charge read to 0xffff8fb18c4cd190 of 8 bytes by task 1081 on cpu 59: page_counter_try_charge+0x4d/0x150 mm/page_counter.c:138 try_charge+0x131/0xd50 mm/memcontrol.c:2405 __memcg_kmem_charge_memcg+0x58/0x140 __memcg_kmem_charge+0xcc/0x280 __alloc_pages_nodemask+0x1e1/0x450 alloc_pages_current+0xa6/0x120 pte_alloc_one+0x17/0xd0 __pte_alloc+0x3a/0x1f0 copy_p4d_range+0xc36/0x1990 copy_page_range+0x21d/0x360 dup_mmap+0x5f5/0x7a0 dup_mm+0xa2/0x240 copy_process+0x1b3f/0x3460 _do_fork+0xaa/0xa20 __x64_sys_clone+0x13b/0x170 do_syscall_64+0x91/0xb47 entry_SYSCALL_64_after_hwframe+0x49/0xbe write to 0xffff8fb18c4cd190 of 8 bytes by task 1153 on cpu 120: page_counter_try_charge+0x5b/0x150 mm/page_counter.c:139 try_charge+0x131/0xd50 mm/memcontrol.c:2405 mem_cgroup_try_charge+0x159/0x460 mem_cgroup_try_charge_delay+0x3d/0xa0 wp_page_copy+0x14d/0x930 do_wp_page+0x107/0x7b0 __handle_mm_fault+0xce6/0xd40 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 BUG: KCSAN: data-race in page_counter_try_charge / page_counter_try_charge write to 0xffff88809bbf2158 of 8 bytes by task 11782 on cpu 0: page_counter_try_charge+0x100/0x170 mm/page_counter.c:129 try_charge+0x185/0xbf0 mm/memcontrol.c:2405 __memcg_kmem_charge_memcg+0x4a/0xe0 mm/memcontrol.c:2837 __memcg_kmem_charge+0xcf/0x1b0 mm/memcontrol.c:2877 __alloc_pages_nodemask+0x26c/0x310 mm/page_alloc.c:4780 read to 0xffff88809bbf2158 of 8 bytes by task 11814 on cpu 1: page_counter_try_charge+0xef/0x170 mm/page_counter.c:129 try_charge+0x185/0xbf0 mm/memcontrol.c:2405 __memcg_kmem_charge_memcg+0x4a/0xe0 mm/memcontrol.c:2837 __memcg_kmem_charge+0xcf/0x1b0 mm/memcontrol.c:2877 __alloc_pages_nodemask+0x26c/0x310 mm/page_alloc.c:4780 Since watermark could be compared or set to garbage due to a data race which would change the code logic, fix it by adding a pair of READ_ONCE() and WRITE_ONCE() in those places. The "failcnt" counter is tolerant of some degree of inaccuracy and is only used to report stats, a data race will not be harmful, thus mark it as an intentional data race using the data_race() macro. Fixes: 3e32cb2e0a12 ("mm: memcontrol: lockless page counters") Reported-by: syzbot+f36cfe60b1006a94f9dc@syzkaller.appspotmail.com Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: David Hildenbrand Cc: Tetsuo Handa Cc: Marco Elver Cc: Dmitry Vyukov Cc: Johannes Weiner Link: http://lkml.kernel.org/r/1581519682-23594-1-git-send-email-cai@lca.pw Signed-off-by: Linus Torvalds commit a449bf58e45abf919b27ba62a9dcbae3ad36e725 Author: Qian Cai Date: Fri Aug 14 17:31:31 2020 -0700 mm/swapfile: fix and annotate various data races swap_info_struct si.highest_bit, si.swap_map[offset] and si.flags could be accessed concurrently separately as noticed by KCSAN, === si.highest_bit === write to 0xffff8d5abccdc4d4 of 4 bytes by task 5353 on cpu 24: swap_range_alloc+0x81/0x130 swap_range_alloc at mm/swapfile.c:681 scan_swap_map_slots+0x371/0xb90 get_swap_pages+0x39d/0x5c0 get_swap_page+0xf2/0x524 add_to_swap+0xe4/0x1c0 shrink_page_list+0x1795/0x2870 shrink_inactive_list+0x316/0x880 shrink_lruvec+0x8dc/0x1380 shrink_node+0x317/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 read to 0xffff8d5abccdc4d4 of 4 bytes by task 6672 on cpu 70: scan_swap_map_slots+0x4a6/0xb90 scan_swap_map_slots at mm/swapfile.c:892 get_swap_pages+0x39d/0x5c0 get_swap_page+0xf2/0x524 add_to_swap+0xe4/0x1c0 shrink_page_list+0x1795/0x2870 shrink_inactive_list+0x316/0x880 shrink_lruvec+0x8dc/0x1380 shrink_node+0x317/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 Reported by Kernel Concurrency Sanitizer on: CPU: 70 PID: 6672 Comm: oom01 Tainted: G W L 5.5.0-next-20200205+ #3 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 === si.swap_map[offset] === write to 0xffffbc370c29a64c of 1 bytes by task 6856 on cpu 86: __swap_entry_free_locked+0x8c/0x100 __swap_entry_free_locked at mm/swapfile.c:1209 (discriminator 4) __swap_entry_free.constprop.20+0x69/0xb0 free_swap_and_cache+0x53/0xa0 unmap_page_range+0x7f8/0x1d70 unmap_single_vma+0xcd/0x170 unmap_vmas+0x18b/0x220 exit_mmap+0xee/0x220 mmput+0x10e/0x270 do_exit+0x59b/0xf40 do_group_exit+0x8b/0x180 read to 0xffffbc370c29a64c of 1 bytes by task 6855 on cpu 20: _swap_info_get+0x81/0xa0 _swap_info_get at mm/swapfile.c:1140 free_swap_and_cache+0x40/0xa0 unmap_page_range+0x7f8/0x1d70 unmap_single_vma+0xcd/0x170 unmap_vmas+0x18b/0x220 exit_mmap+0xee/0x220 mmput+0x10e/0x270 do_exit+0x59b/0xf40 do_group_exit+0x8b/0x180 === si.flags === write to 0xffff956c8fc6c400 of 8 bytes by task 6087 on cpu 23: scan_swap_map_slots+0x6fe/0xb50 scan_swap_map_slots at mm/swapfile.c:887 get_swap_pages+0x39d/0x5c0 get_swap_page+0x377/0x524 add_to_swap+0xe4/0x1c0 shrink_page_list+0x1795/0x2870 shrink_inactive_list+0x316/0x880 shrink_lruvec+0x8dc/0x1380 shrink_node+0x317/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 read to 0xffff956c8fc6c400 of 8 bytes by task 6207 on cpu 63: _swap_info_get+0x41/0xa0 __swap_info_get at mm/swapfile.c:1114 put_swap_page+0x84/0x490 __remove_mapping+0x384/0x5f0 shrink_page_list+0xff1/0x2870 shrink_inactive_list+0x316/0x880 shrink_lruvec+0x8dc/0x1380 shrink_node+0x317/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 The writes are under si->lock but the reads are not. For si.highest_bit and si.swap_map[offset], data race could trigger logic bugs, so fix them by having WRITE_ONCE() for the writes and READ_ONCE() for the reads except those isolated reads where they compare against zero which a data race would cause no harm. Thus, annotate them as intentional data races using the data_race() macro. For si.flags, the readers are only interested in a single bit where a data race there would cause no issue there. [cai@lca.pw: add a missing annotation for si->flags in memory.c] Link: http://lkml.kernel.org/r/1581612647-5958-1-git-send-email-cai@lca.pw Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Cc: Marco Elver Cc: Hugh Dickins Link: http://lkml.kernel.org/r/1581095163-12198-1-git-send-email-cai@lca.pw Signed-off-by: Linus Torvalds commit e630bfac79456d3acd22c9286b50e83aafb7a07c Author: Kirill A. Shutemov Date: Fri Aug 14 17:31:27 2020 -0700 mm/filemap.c: fix a data race in filemap_fault() struct file_ra_state ra.mmap_miss could be accessed concurrently during page faults as noticed by KCSAN, BUG: KCSAN: data-race in filemap_fault / filemap_map_pages write to 0xffff9b1700a2c1b4 of 4 bytes by task 3292 on cpu 30: filemap_fault+0x920/0xfc0 do_sync_mmap_readahead at mm/filemap.c:2384 (inlined by) filemap_fault at mm/filemap.c:2486 __xfs_filemap_fault+0x112/0x3e0 [xfs] xfs_filemap_fault+0x74/0x90 [xfs] __do_fault+0x9e/0x220 do_fault+0x4a0/0x920 __handle_mm_fault+0xc69/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 read to 0xffff9b1700a2c1b4 of 4 bytes by task 3313 on cpu 32: filemap_map_pages+0xc2e/0xd80 filemap_map_pages at mm/filemap.c:2625 do_fault+0x3da/0x920 __handle_mm_fault+0xc69/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 Reported by Kernel Concurrency Sanitizer on: CPU: 32 PID: 3313 Comm: systemd-udevd Tainted: G W L 5.5.0-next-20200210+ #1 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 ra.mmap_miss is used to contribute the readahead decisions, a data race could be undesirable. Both the read and write is only under non-exclusive mmap_sem, two concurrent writers could even underflow the counter. Fix the underflow by writing to a local variable before committing a final store to ra.mmap_miss given a small inaccuracy of the counter should be acceptable. Signed-off-by: Kirill A. Shutemov Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Tested-by: Qian Cai Reviewed-by: Matthew Wilcox (Oracle) Cc: Marco Elver Link: http://lkml.kernel.org/r/20200211030134.1847-1-cai@lca.pw Signed-off-by: Linus Torvalds commit b96a3db2f37485e902794f28130f70dc834796a4 Author: Qian Cai Date: Fri Aug 14 17:31:24 2020 -0700 mm/swap_state: mark various intentional data races swap_cache_info.* could be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in lookup_swap_cache / lookup_swap_cache write to 0xffffffff85517318 of 8 bytes by task 94138 on cpu 101: lookup_swap_cache+0x12e/0x460 lookup_swap_cache at mm/swap_state.c:322 do_swap_page+0x112/0xeb0 __handle_mm_fault+0xc7a/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 read to 0xffffffff85517318 of 8 bytes by task 91655 on cpu 100: lookup_swap_cache+0x117/0x460 lookup_swap_cache at mm/swap_state.c:322 shmem_swapin_page+0xc7/0x9e0 shmem_getpage_gfp+0x2ca/0x16c0 shmem_fault+0xef/0x3c0 __do_fault+0x9e/0x220 do_fault+0x4a0/0x920 __handle_mm_fault+0xc69/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 Reported by Kernel Concurrency Sanitizer on: CPU: 100 PID: 91655 Comm: systemd-journal Tainted: G W O L 5.5.0-next-20200204+ #6 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 write to 0xffffffff8d717308 of 8 bytes by task 11365 on cpu 87: __delete_from_swap_cache+0x681/0x8b0 __delete_from_swap_cache at mm/swap_state.c:178 read to 0xffffffff8d717308 of 8 bytes by task 11275 on cpu 53: __delete_from_swap_cache+0x66e/0x8b0 __delete_from_swap_cache at mm/swap_state.c:178 Both the read and write are done as lockless. Since swap_cache_info.* are only used to print out counter information, even if any of them missed a few incremental due to data races, it will be harmless, so just mark it as an intentional data race using the data_race() macro. While at it, fix a checkpatch.pl warning, WARNING: Single statement macros should not use a do {} while (0) loop Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Cc: Marco Elver Link: http://lkml.kernel.org/r/20200207003715.1578-1-cai@lca.pw Signed-off-by: Linus Torvalds commit 7b37e22675dfe8673083aaea84c9e7d6e436abbc Author: Qian Cai Date: Fri Aug 14 17:31:20 2020 -0700 mm/page_io: mark various intentional data races struct swap_info_struct si.flags could be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in scan_swap_map_slots / swap_readpage write to 0xffff9c77b80ac400 of 8 bytes by task 91325 on cpu 16: scan_swap_map_slots+0x6fe/0xb50 scan_swap_map_slots at mm/swapfile.c:887 get_swap_pages+0x39d/0x5c0 get_swap_page+0x377/0x524 add_to_swap+0xe4/0x1c0 shrink_page_list+0x1740/0x2820 shrink_inactive_list+0x316/0x8b0 shrink_lruvec+0x8dc/0x1380 shrink_node+0x317/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 __alloc_pages_nodemask+0x3bb/0x450 alloc_pages_vma+0x8a/0x2c0 do_anonymous_page+0x170/0x700 __handle_mm_fault+0xc9f/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 read to 0xffff9c77b80ac400 of 8 bytes by task 5422 on cpu 7: swap_readpage+0x204/0x6a0 swap_readpage at mm/page_io.c:380 read_swap_cache_async+0xa2/0xb0 swapin_readahead+0x6a0/0x890 do_swap_page+0x465/0xeb0 __handle_mm_fault+0xc7a/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 Reported by Kernel Concurrency Sanitizer on: CPU: 7 PID: 5422 Comm: gmain Tainted: G W O L 5.5.0-next-20200204+ #6 Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 07/10/2019 Other reads, read to 0xffff91ea33eac400 of 8 bytes by task 11276 on cpu 120: __swap_writepage+0x140/0xc20 __swap_writepage at mm/page_io.c:289 read to 0xffff91ea33eac400 of 8 bytes by task 11264 on cpu 16: swap_set_page_dirty+0x44/0x1f4 swap_set_page_dirty at mm/page_io.c:442 The write is under &si->lock, but the reads are done as lockless. Since the reads only check for a specific bit in the flag, it is harmless even if load tearing happens. Thus, just mark them as intentional data races using the data_race() macro. [cai@lca.pw: add a missing annotation] Link: http://lkml.kernel.org/r/1581612585-5812-1-git-send-email-cai@lca.pw Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Cc: Marco Elver Link: http://lkml.kernel.org/r/20200207003601.1526-1-cai@lca.pw Signed-off-by: Linus Torvalds commit 96bdd2bcc1a79818eac6902d6f9565b720f726aa Author: Qian Cai Date: Fri Aug 14 17:31:17 2020 -0700 mm/frontswap: mark various intentional data races There are a few information counters that are intentionally not protected against increment races, so just annotate them using the data_race() macro. BUG: KCSAN: data-race in __frontswap_store / __frontswap_store write to 0xffffffff8b7174d8 of 8 bytes by task 6396 on cpu 103: __frontswap_store+0x2d0/0x344 inc_frontswap_failed_stores at mm/frontswap.c:70 (inlined by) __frontswap_store at mm/frontswap.c:280 swap_writepage+0x83/0xf0 pageout+0x33e/0xae0 shrink_page_list+0x1f57/0x2870 shrink_inactive_list+0x316/0x880 shrink_lruvec+0x8dc/0x1380 shrink_node+0x317/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 __alloc_pages_nodemask+0x3bb/0x450 alloc_pages_vma+0x8a/0x2c0 do_anonymous_page+0x170/0x700 __handle_mm_fault+0xc9f/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 read to 0xffffffff8b7174d8 of 8 bytes by task 6405 on cpu 47: __frontswap_store+0x2b9/0x344 inc_frontswap_failed_stores at mm/frontswap.c:70 (inlined by) __frontswap_store at mm/frontswap.c:280 swap_writepage+0x83/0xf0 pageout+0x33e/0xae0 shrink_page_list+0x1f57/0x2870 shrink_inactive_list+0x316/0x880 shrink_lruvec+0x8dc/0x1380 shrink_node+0x317/0xd80 do_try_to_free_pages+0x1f7/0xa10 try_to_free_pages+0x26c/0x5e0 __alloc_pages_slowpath+0x458/0x1290 __alloc_pages_nodemask+0x3bb/0x450 alloc_pages_vma+0x8a/0x2c0 do_anonymous_page+0x170/0x700 __handle_mm_fault+0xc9f/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Cc: Marco Elver Cc: Konrad Rzeszutek Wilk Link: http://lkml.kernel.org/r/1581114499-5042-1-git-send-email-cai@lca.pw Signed-off-by: Linus Torvalds commit 69d0b54d41f915ae45afed6669d34a305cf95ff3 Author: Qian Cai Date: Fri Aug 14 17:31:14 2020 -0700 mm/kmemleak: silence KCSAN splats in checksum Even if KCSAN is disabled for kmemleak, update_checksum() could still call crc32() (which is outside of kmemleak.c) to dereference object->pointer. Thus, the value of object->pointer could be accessed concurrently as noticed by KCSAN, BUG: KCSAN: data-race in crc32_le_base / do_raw_spin_lock write to 0xffffb0ea683a7d50 of 4 bytes by task 23575 on cpu 12: do_raw_spin_lock+0x114/0x200 debug_spin_lock_after at kernel/locking/spinlock_debug.c:91 (inlined by) do_raw_spin_lock at kernel/locking/spinlock_debug.c:115 _raw_spin_lock+0x40/0x50 __handle_mm_fault+0xa9e/0xd00 handle_mm_fault+0xfc/0x2f0 do_page_fault+0x263/0x6f9 page_fault+0x34/0x40 read to 0xffffb0ea683a7d50 of 4 bytes by task 839 on cpu 60: crc32_le_base+0x67/0x350 crc32_le_base+0x67/0x350: crc32_body at lib/crc32.c:106 (inlined by) crc32_le_generic at lib/crc32.c:179 (inlined by) crc32_le at lib/crc32.c:197 kmemleak_scan+0x528/0xd90 update_checksum at mm/kmemleak.c:1172 (inlined by) kmemleak_scan at mm/kmemleak.c:1497 kmemleak_scan_thread+0xcc/0xfa kthread+0x1e0/0x200 ret_from_fork+0x27/0x50 If a shattered value was returned due to a data race, it will be corrected in the next scan. Thus, let KCSAN ignore all reads in the region to silence KCSAN in case the write side is non-atomic. Suggested-by: Marco Elver Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Acked-by: Marco Elver Acked-by: Catalin Marinas Link: http://lkml.kernel.org/r/20200317182754.2180-1-cai@lca.pw Signed-off-by: Linus Torvalds commit 88db0aa2421666d2f73486d15b239a4521983d55 Author: Xiaoming Ni Date: Fri Aug 14 17:31:07 2020 -0700 all arch: remove system call sys_sysctl Since commit 61a47c1ad3a4dc ("sysctl: Remove the sysctl system call"), sys_sysctl is actually unavailable: any input can only return an error. We have been warning about people using the sysctl system call for years and believe there are no more users. Even if there are users of this interface if they have not complained or fixed their code by now they probably are not going to, so there is no point in warning them any longer. So completely remove sys_sysctl on all architectures. [nixiaoming@huawei.com: s390: fix build error for sys_call_table_emu] Link: http://lkml.kernel.org/r/20200618141426.16884-1-nixiaoming@huawei.com Signed-off-by: Xiaoming Ni Signed-off-by: Andrew Morton Acked-by: Will Deacon [arm/arm64] Acked-by: "Eric W. Biederman" Cc: Aleksa Sarai Cc: Alexander Shishkin Cc: Al Viro Cc: Andi Kleen Cc: Andrew Morton Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Bin Meng Cc: Borislav Petkov Cc: Brian Gerst Cc: Catalin Marinas Cc: chenzefeng Cc: Christian Borntraeger Cc: Christian Brauner Cc: Chris Zankel Cc: David Howells Cc: David S. Miller Cc: Diego Elio Pettenò Cc: Dmitry Vyukov Cc: Dominik Brodowski Cc: Fenghua Yu Cc: Geert Uytterhoeven Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Iurii Zaikin Cc: Ivan Kokshaysky Cc: James Bottomley Cc: Jens Axboe Cc: Jiri Olsa Cc: Kars de Jong Cc: Kees Cook Cc: Krzysztof Kozlowski Cc: Luis Chamberlain Cc: Marco Elver Cc: Mark Rutland Cc: Martin K. Petersen Cc: Masahiro Yamada Cc: Matt Turner Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Miklos Szeredi Cc: Minchan Kim Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Nick Piggin Cc: Oleg Nesterov Cc: Olof Johansson Cc: Paul Burton Cc: "Paul E. McKenney" Cc: Paul Mackerras Cc: Peter Zijlstra (Intel) Cc: Randy Dunlap Cc: Ravi Bangoria Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Sami Tolvanen Cc: Sargun Dhillon Cc: Stephen Rothwell Cc: Sudeep Holla Cc: Sven Schnelle Cc: Thiago Jung Bauermann Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Tony Luck Cc: Vasily Gorbik Cc: Vlastimil Babka Cc: Yoshinori Sato Cc: Zhou Yanjie Link: http://lkml.kernel.org/r/20200616030734.87257-1-nixiaoming@huawei.com Signed-off-by: Linus Torvalds commit c734124c5c824511f553f794a514a185dfc0e3e7 Author: Randy Dunlap Date: Fri Aug 14 17:30:46 2020 -0700 fs: autofs: delete repeated words in comments Drop duplicated words {the, at} in comments. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Acked-by: Ian Kent Link: http://lkml.kernel.org/r/20200811021817.24982-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit ee6c400f5c05459b8c5f2884a176a1287ce2f68f Author: Matthew Wilcox (Oracle) Date: Fri Aug 14 17:30:43 2020 -0700 mm: introduce offset_in_thp Mirroring offset_in_page(), this gives you the offset within this particular page, no matter what size page it is. It optimises down to offset_in_page() if CONFIG_TRANSPARENT_HUGEPAGE is not set. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Reviewed-by: William Kucharski Reviewed-by: Zi Yan Cc: Mike Kravetz Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20200629151959.15779-8-willy@infradead.org Signed-off-by: Linus Torvalds commit 2be1d71841b7ecfb01ce4c59f6e1d082c3c18a8a Author: Matthew Wilcox (Oracle) Date: Fri Aug 14 17:30:40 2020 -0700 mm: add thp_head This is like compound_head() but compiles away when CONFIG_TRANSPARENT_HUGEPAGE is not enabled. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: William Kucharski Reviewed-by: Zi Yan Cc: David Hildenbrand Cc: Mike Kravetz Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20200629151959.15779-7-willy@infradead.org Signed-off-by: Linus Torvalds commit 6c357848b44b4016ca422178aa368a7472245f6f Author: Matthew Wilcox (Oracle) Date: Fri Aug 14 17:30:37 2020 -0700 mm: replace hpage_nr_pages with thp_nr_pages The thp prefix is more frequently used than hpage and we should be consistent between the various functions. [akpm@linux-foundation.org: fix mm/migrate.c] Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: William Kucharski Reviewed-by: Zi Yan Cc: Mike Kravetz Cc: David Hildenbrand Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20200629151959.15779-6-willy@infradead.org Signed-off-by: Linus Torvalds commit af3bbc12df80e8c279b94c752b6edca29841f4f5 Author: Matthew Wilcox (Oracle) Date: Fri Aug 14 17:30:33 2020 -0700 mm: add thp_size This function returns the number of bytes in a THP. It is like page_size(), but compiles to just PAGE_SIZE if CONFIG_TRANSPARENT_HUGEPAGE is disabled. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: William Kucharski Reviewed-by: Zi Yan Cc: David Hildenbrand Cc: Mike Kravetz Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20200629151959.15779-5-willy@infradead.org Signed-off-by: Linus Torvalds commit 6ffbb45826f5d9ae09aa60cd88594b7816c96190 Author: Matthew Wilcox (Oracle) Date: Fri Aug 14 17:30:30 2020 -0700 mm: add thp_order This function returns the order of a transparent huge page. It compiles to 0 if CONFIG_TRANSPARENT_HUGEPAGE is disabled. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: William Kucharski Reviewed-by: Zi Yan Cc: David Hildenbrand Cc: Mike Kravetz Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20200629151959.15779-4-willy@infradead.org Signed-off-by: Linus Torvalds commit 419015675fef6c4b28689bd2ace559564c2e106c Author: Matthew Wilcox (Oracle) Date: Fri Aug 14 17:30:26 2020 -0700 mm: move page-flags include to top of file Give up on the notion that we can remove page-flags.h from mm.h. There are currently 14 inline functions which use a PageFoo function. Also, two of the files directly included by mm.h include page-flags.h themselves, and there are probably more indirect inclusions. So just include it at the top like any other header file. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: William Kucharski Reviewed-by: Zi Yan Cc: David Hildenbrand Cc: Mike Kravetz Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20200629151959.15779-3-willy@infradead.org Signed-off-by: Linus Torvalds commit 1378a5ee451a5e87d0d8dd6356a0b7844db231f6 Author: Matthew Wilcox (Oracle) Date: Fri Aug 14 17:30:23 2020 -0700 mm: store compound_nr as well as compound_order Patch series "THP prep patches". These are some generic cleanups and improvements, which I would like merged into mmotm soon. The first one should be a performance improvement for all users of compound pages, and the others are aimed at getting code to compile away when CONFIG_TRANSPARENT_HUGEPAGE is disabled (ie small systems). Also better documented / less confusing than the current prefix mixture of compound, hpage and thp. This patch (of 7): This removes a few instructions from functions which need to know how many pages are in a compound page. The storage used is either page->mapping on 64-bit or page->index on 32-bit. Both of these are fine to overlay on tail pages. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: William Kucharski Reviewed-by: Zi Yan Cc: David Hildenbrand Cc: Mike Kravetz Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20200629151959.15779-1-willy@infradead.org Link: http://lkml.kernel.org/r/20200629151959.15779-2-willy@infradead.org Signed-off-by: Linus Torvalds commit 14a36a435343931296277f4a3c5adf4e29a8f46d Author: Greg Kurz Date: Fri Aug 14 17:30:20 2020 -0700 mailmap: add entry for Greg Kurz I had stopped using gkurz@linux.vnet.ibm.com a while back already but this email address was shutdown last June when I quit IBM. It's about time to map it to groug@kaod.org. Signed-off-by: Greg Kurz Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/159724692879.76040.4938578139173154028.stgit@bahia.lan Signed-off-by: Linus Torvalds commit 0f71241a8e32baf9ac290cf915bc9b3ff265f7d3 Author: Kees Cook Date: Fri Aug 14 17:30:17 2020 -0700 selftests/exec: add file type errno tests Make sure execve() returns the expected errno values for non-regular files. Signed-off-by: Kees Cook Signed-off-by: Andrew Morton Cc: Marc Zyngier Link: http://lkml.kernel.org/r/20200813231723.2725102-3-keescook@chromium.org Signed-off-by: Linus Torvalds commit fc4177be963dccad73b98d7db3a8a38911f952b7 Author: Kees Cook Date: Fri Aug 14 17:30:14 2020 -0700 exec: restore EACCES of S_ISDIR execve() Patch series "Fix S_ISDIR execve() errno". Fix an errno change for execve() of directories, noticed by Marc Zyngier. Along with the fix, include a regression test to avoid seeing this return in the future. This patch (of 2): The return code for attempting to execute a directory has always been EACCES. Adjust the S_ISDIR exec test to reflect the old errno instead of the general EISDIR for other kinds of "open" attempts on directories. Fixes: 633fb6ac3980 ("exec: move S_ISREG() check earlier") Reported-by: Marc Zyngier Signed-off-by: Kees Cook Signed-off-by: Andrew Morton Tested-by: Greg Kroah-Hartman Reviewed-by: Greg Kroah-Hartman Link: http://lkml.kernel.org/r/20200813231723.2725102-2-keescook@chromium.org Link: https://lore.kernel.org/lkml/20200813151305.6191993b@why Signed-off-by: Linus Torvalds commit b1a3e75e466d96383508634f3d2e477ac45f2fc1 Author: Nick Terrell Date: Fri Aug 14 17:30:10 2020 -0700 lz4: fix kernel decompression speed This patch replaces all memcpy() calls with LZ4_memcpy() which calls __builtin_memcpy() so the compiler can inline it. LZ4 relies heavily on memcpy() with a constant size being inlined. In x86 and i386 pre-boot environments memcpy() cannot be inlined because memcpy() doesn't get defined as __builtin_memcpy(). An equivalent patch has been applied upstream so that the next import won't lose this change [1]. I've measured the kernel decompression speed using QEMU before and after this patch for the x86_64 and i386 architectures. The speed-up is about 10x as shown below. Code Arch Kernel Size Time Speed v5.8 x86_64 11504832 B 148 ms 79 MB/s patch x86_64 11503872 B 13 ms 885 MB/s v5.8 i386 9621216 B 91 ms 106 MB/s patch i386 9620224 B 10 ms 962 MB/s I also measured the time to decompress the initramfs on x86_64, i386, and arm. All three show the same decompression speed before and after, as expected. [1] https://github.com/lz4/lz4/pull/890 Signed-off-by: Nick Terrell Signed-off-by: Andrew Morton Cc: Yann Collet Cc: Gao Xiang Cc: Sven Schmidt <4sschmid@informatik.uni-hamburg.de> Cc: Greg Kroah-Hartman Cc: Ingo Molnar Cc: Arvind Sankar Link: http://lkml.kernel.org/r/20200803194022.2966806-1-nickrterrell@gmail.com Signed-off-by: Linus Torvalds commit a8a4b7aeaf841311cb13ff0f6c4710c7a00e68d4 Author: Baoquan He Date: Fri Aug 14 17:30:07 2020 -0700 Revert "mm/vmstat.c: do not show lowmem reserve protection information of empty zone" This reverts commit 26e7deadaae175. Sonny reported that one of their tests started failing on the latest kernel on their Chrome OS platform. The root cause is that the above commit removed the protection line of empty zone, while the parser used in the test relies on the protection line to mark the end of each zone. Let's revert it to avoid breaking userspace testing or applications. Fixes: 26e7deadaae175 ("mm/vmstat.c: do not show lowmem reserve protection information of empty zone)" Reported-by: Sonny Rao Signed-off-by: Baoquan He Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Acked-by: David Rientjes Cc: [5.8.x] Link: http://lkml.kernel.org/r/20200811075412.12872-1-bhe@redhat.com Signed-off-by: Linus Torvalds commit 9922c1deff915c2b67ec79ea6b87c289772c6492 Author: Mike Rapoport Date: Fri Aug 14 17:30:04 2020 -0700 asm-generic: pgalloc.h: use correct #ifdef to enable pud_alloc_one() The #ifdef statement that guards the generic version of pud_alloc_one() by mistake used __HAVE_ARCH_PUD_FREE instead of __HAVE_ARCH_PUD_ALLOC_ONE. Fix it. Fixes: d9e8b929670b ("asm-generic: pgalloc: provide generic pud_alloc_one() and pud_free_one()") Reported-by: kernel test robot Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200812191415.GE163101@linux.ibm.com Signed-off-by: Linus Torvalds commit 0c64a0dce51faa9c706fdf1f957d6f19878f4b81 Author: Geert Uytterhoeven Date: Fri Aug 14 14:42:45 2020 +0200 sh: landisk: Add missing initialization of sh_io_port_base The Landisk setup code maps the CF IDE area using ioremap_prot(), and passes the resulting virtual addresses to the pata_platform driver, disguising them as I/O port addresses. Hence the pata_platform driver translates them again using ioport_map(). As CONFIG_GENERIC_IOMAP=n, and CONFIG_HAS_IOPORT_MAP=y, the SuperH-specific mapping code in arch/sh/kernel/ioport.c translates I/O port addresses to virtual addresses by adding sh_io_port_base, which defaults to -1, thus breaking the assumption of an identity mapping. Fix this by setting sh_io_port_base to zero. Fixes: 37b7a97884ba64bf ("sh: machvec IO death.") Signed-off-by: Geert Uytterhoeven Signed-off-by: Rich Felker commit 03dd061f0d203c3479791490d6b9359b2eaf9fec Author: Michael Karcher Date: Thu Jul 23 01:13:22 2020 +0200 sh: bring syscall_set_return_value in line with other architectures Other architectures expect that syscall_set_return_value gets an already negative value as error. That's also what kernel/seccomp.c provides. Signed-off-by: Michael Karcher Tested-by: John Paul Adrian Glaubitz Signed-off-by: Rich Felker commit 0bb605c2c7f2b4b314b91510810b226de7f34fa1 Author: Michael Karcher Date: Thu Jul 23 01:13:21 2020 +0200 sh: Add SECCOMP_FILTER Port sh to use the new SECCOMP_FILTER code. Signed-off-by: Michael Karcher Tested-by: John Paul Adrian Glaubitz Signed-off-by: Rich Felker commit 9d2ec8f68e9dfbdd9ae9bdc79cc4deedc0ad4e6b Author: Michael Karcher Date: Thu Jul 23 01:13:20 2020 +0200 sh: Rearrange blocks in entry-common.S This avoids out-of-range jumps that get auto-replaced by the assembler and prepares for the changes needed to implement SECCOMP_FILTER cleanly. Signed-off-by: Michael Karcher Tested-by: John Paul Adrian Glaubitz Signed-off-by: Rich Felker commit e1cc9d8d596e233538a3ecaffea665185751db35 Author: Christian Brauner Date: Tue Jun 23 01:43:23 2020 +0200 sh: switch to copy_thread_tls() Use the copy_thread_tls() calling convention which passes tls through a register. This is required so we can remove the copy_thread{_tls}() split and remove the HAVE_COPY_THREAD_TLS macro. Cc: Rich Felker Cc: Yoshinori Sato Cc: linux-sh@vger.kernel.org Signed-off-by: Christian Brauner Signed-off-by: Rich Felker commit 6dfdf673ccb24dccc95b342235cac3e585c5af34 Author: Christoph Hellwig Date: Tue Jul 14 14:18:56 2020 +0200 sh: use the generic dma coherent remap allocator This switches to using common code for the DMA allocations, including potential use of the CMA allocator if configured. Switching to the generic code enables DMA allocations from atomic context, which is required by the DMA API documentation, and also adds various other minor features drivers start relying upon. It also makes sure we have on tested code base for all architectures that require uncached pte bits for coherent DMA allocations. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit cd57d07b1e4e08f95a27b59253b5c8a46abf4f29 Author: Christoph Hellwig Date: Tue Jul 14 14:18:55 2020 +0200 sh: don't allow non-coherent DMA for NOMMU The code handling non-coherent DMA depends on being able to remap code as non-cached. But that can't be done without an MMU, so using this option on NOMMU builds is broken. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit 846f9e1fb9b9a2c4eecefa2fdbfb51e975a7d532 Author: Christoph Hellwig Date: Tue Jul 14 14:18:54 2020 +0200 dma-mapping: consolidate the NO_DMA definition in kernel/dma/Kconfig Have a single definition that architetures can select. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit bc0f46b1caff2a42ce6e54b31504eb9ecc789f2a Author: Christoph Hellwig Date: Tue Jul 14 14:18:53 2020 +0200 sh: unexport register_trapped_io and match_trapped_io_handler Both functions are only used by compiled in core code. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit 08732d1226edb7a0033d08286acada2b4e800c78 Author: Christoph Hellwig Date: Tue Jul 14 14:18:52 2020 +0200 sh: don't include in No need to expose the details of trapped I/O to drivers. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit 13f1fc870dd747131f21ba6f20dc0d81cc5d4474 Author: Christoph Hellwig Date: Tue Jul 14 14:18:51 2020 +0200 sh: move the ioremap implementation out of line Move the internal implementation details of ioremap out of line, no need to expose any of this to drivers for a slow path API. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit 3eef6b74d9fecf18b03db26584cc66928972a60b Author: Christoph Hellwig Date: Tue Jul 14 14:18:50 2020 +0200 sh: move ioremap_fixed details out of ioremap_fixed is an internal implementation detail and should not be exposed to drivers. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit e12b090eae6ac3b18f42673a4b0fef6e61b63cac Author: Christoph Hellwig Date: Tue Jul 14 14:18:49 2020 +0200 sh: remove __KERNEL__ ifdefs from non-UAPI headers There is no point in having __KERNEL__ ifdefs in headers not exported to userspace. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit 582dc536d75990c7a50f5d385ee0d10ee284411f Author: Christoph Hellwig Date: Tue Jul 14 14:18:48 2020 +0200 sh: sort the selects for SUPERH alphabetically Ensure there is an order for the selects. Also remove a duplicate one. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit ccbb5239d495923cb24b84a73eb814626c5bfa57 Author: Christoph Hellwig Date: Tue Jul 14 14:18:47 2020 +0200 sh: remove -Werror from Makefiles The sh build is full of warnings when building with gcc 9.2.1. While fixing those would be great, at least avoid failing the build. Signed-off-by: Christoph Hellwig Signed-off-by: Rich Felker commit 91194e9b046e18ed813d4632e1c72683aac944ad Author: Alexander A. Klimov Date: Sun Jul 12 13:11:18 2020 +0200 sh: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Rich Felker commit e1a8d38a17ce68776c313f0960f530371418c428 Author: Hans Verkuil Date: Fri Jun 26 15:15:24 2020 +0200 arch/sh/configs: remove obsolete CONFIG_SOC_CAMERA* Drop all configs with the CONFIG_SOC_CAMERA prefix since those have been removed. SOC_CAMERA support for the sh architecture was removed a long time ago. Drop it from the configs. Signed-off-by: Hans Verkuil Signed-off-by: Rich Felker commit c0735ae9a00642b514bade90456ad6a828dcc6df Author: Geert Uytterhoeven Date: Thu Jun 18 09:59:37 2020 +0200 sh: stacktrace: Remove stacktrace_ops.stack() The SH implementation never called stacktrace_ops.stack(). Presumably this was copied from the x86 implementation. Hence remove the method, and all implementations (most of them are dummies). Signed-off-by: Geert Uytterhoeven Signed-off-by: Rich Felker commit eac1a488171c70c695c436bcea7682841649d5b6 Author: Geert Uytterhoeven Date: Wed Jun 17 16:36:39 2020 +0200 sh: machvec: Modernize printing of kernel messages - Convert from printk() to pr_*(), - Add missing continuations. Signed-off-by: Geert Uytterhoeven Tested-by: Guenter Roeck Signed-off-by: Rich Felker commit 601bf18b6630d37bde945fc890a995650f53e2c9 Author: Geert Uytterhoeven Date: Wed Jun 17 16:36:38 2020 +0200 sh: pci: Modernize printing of kernel messages - Convert from printk() to pr_*(), - Add missing continuations, - Join broken messages. Note that printk(KERN_DEBUG ...) is retained, to preserve behavior (pr_debug() is a dummy if DEBUG is not defined). Signed-off-by: Geert Uytterhoeven Tested-by: Guenter Roeck Signed-off-by: Rich Felker commit f88c6a26ddd6c1b914c0c2536cff89b183a89a28 Author: Geert Uytterhoeven Date: Wed Jun 17 16:36:37 2020 +0200 sh: sh2007: Modernize printing of kernel messages - Convert from printk() to pr_*(), - Add missing continuation. Signed-off-by: Geert Uytterhoeven Tested-by: Guenter Roeck Signed-off-by: Rich Felker commit 21afcacb0348edf8f5d4e6115b5eb0b58f9a049b Author: Geert Uytterhoeven Date: Wed Jun 17 16:36:36 2020 +0200 sh: process: Fix broken lines in register dumps Rejoin the broken lines by using pr_cont(). Convert the remaining printk() calls to pr_*() while at it. Signed-off-by: Geert Uytterhoeven Tested-by: Guenter Roeck Signed-off-by: Rich Felker commit 0632a6d8c6809d71f535232a01374458164182ae Author: Geert Uytterhoeven Date: Wed Jun 17 16:36:35 2020 +0200 sh: dump_stack: Fix broken lines and ptrval in calltrace dumps Rejoin the broken lines by dropping the log level parameters and using pr_cont(). Use "%px" to print sensible addresses in call traces. Signed-off-by: Geert Uytterhoeven Tested-by: Guenter Roeck Signed-off-by: Rich Felker commit 9b9fae8ba821c5ecd78d0fd977a3ab0357ec8029 Author: Geert Uytterhoeven Date: Wed Jun 17 16:36:34 2020 +0200 sh: kernel: disassemble: Fix broken lines in disassembly dumps Rejoin the broken lines by using pr_cont(). Convert the remaining printk() calls to pr_*() while at it. Signed-off-by: Geert Uytterhoeven Tested-by: Guenter Roeck Signed-off-by: Rich Felker commit f6bed866f113d0b141f01e2a6472523739886dc8 Author: Geert Uytterhoeven Date: Wed Jun 17 16:36:33 2020 +0200 Revert "sh: remove needless printk()" This reverts commit 8b92f34877225c8eb85e3ab7f1177fc248ba26d0. "data" became the log level in commit 539e786cc37ee5cb ("sh: add loglvl to show_trace()"), so we do need to keep the printk() before the continuation in print_trace_address(). Signed-off-by: Geert Uytterhoeven Signed-off-by: Rich Felker commit fd722f25a6e4aecefbc58047a690076e57015197 Author: Geert Uytterhoeven Date: Wed Jun 17 16:36:32 2020 +0200 Revert "sh: add loglvl to printk_address()" This reverts commit 2deebe4d56d638269a4a728086d64de5734b460a. printk_address() is always used as a continuation of the previous logging, hence it should not include a log level. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rich Felker commit 845d9156febcd6b3b20c0c2c8d73b461b48e844c Author: Geert Uytterhoeven Date: Wed Jun 17 16:36:31 2020 +0200 sh: fault: Fix duplicate printing of "PC:" Somewhere along the patch handling path, both the old "printk(KERN_ALERT ....)" and the new "pr_alert(...)" were retained, leading to the duplicate printing of "PC:". Drop the old one. Fixes: eaabf98b0932a540 ("sh: fault: modernize printing of kernel messages") Signed-off-by: Geert Uytterhoeven Signed-off-by: Rich Felker commit c64bbe7006a4dd5ad51b22ca248d89392487af6d Author: Geert Uytterhoeven Date: Wed Jun 17 08:55:39 2020 +0200 input: i8042 - Remove special Cayman handling As of commit 37744feebc086908 ("sh: remove sh5 support"), support for the SH5-based Cayman platform can no longer be selected. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rich Felker commit 8a8e54625be28a6e675e53d214387fc8ee41fb6e Author: Geert Uytterhoeven Date: Wed Jun 17 08:55:38 2020 +0200 sh: Remove SH5-based Cayman platform Since the removal of core support for SH5, Cayman support can no longer be selected. Fixes: 37744feebc086908 ("sh: remove sh5 support") Signed-off-by: Geert Uytterhoeven Signed-off-by: Rich Felker commit 7dfaa9ea56e9e68b889d6676aa51a246f32c1857 Author: Flavio Suligoi Date: Mon Jun 15 14:09:40 2020 +0200 arch: sh: smc37c93x: fix spelling mistake Fix typo: "triger" --> "trigger" Signed-off-by: Flavio Suligoi Signed-off-by: Rich Felker commit 7619f957dc8cb8b2db3be21254d758c16e025961 Author: Geert Uytterhoeven Date: Mon Jun 8 10:06:36 2020 +0200 Revert "sh: add missing EXPORT_SYMBOL() for __delay" This reverts commit d1f56f318d234fc5db230af2f3e0088f689ab3c0. __delay() is an internal implementation detail on several architectures. Drivers should not call __delay() directly, as it has non-standardized semantics, or may not even exist. Hence there is no need to export __delay() to modules. See also include/asm-generic/delay.h: /* Undefined functions to get compile-time errors */ ... extern void __delay(unsigned long loops); Signed-off-by: Geert Uytterhoeven Signed-off-by: Rich Felker commit 2d2b308a8b7d0aeeadeabd8d7f329bb8200f2e2b Author: John Paul Adrian Glaubitz Date: Thu Jun 11 09:58:11 2020 +0200 sh: Implement __get_user_u64() required for 64-bit get_user() Trying to build the kernel with CONFIG_INFINIBAND_USER_ACCESS enabled fails ERROR: "__get_user_unknown" [drivers/infiniband/core/ib_uverbs.ko] undefined! with on SH since the kernel misses a 64-bit implementation of get_user(). Implement the missing 64-bit get_user() as __get_user_u64(), matching the already existing __put_user_u64() which implements the 64-bit put_user(). Signed-off-by: John Paul Adrian Glaubitz Acked-by: Yoshinori Sato Signed-off-by: Rich Felker commit 2202d81b098ef776153c6b40c5404d486042a3ed Author: Chen Zhou Date: Thu Jan 2 09:54:30 2020 +0800 sh: remove call to memset after dma_alloc_coherent Function dma_alloc_coherent use in buf already zeroes out memory, so memset is not needed. Signed-off-by: Chen Zhou Signed-off-by: Rich Felker commit be74273aee2c94e8322404d0b6e84e4f30d911ed Author: Matthew Wilcox (Oracle) Date: Mon Jun 8 06:04:08 2020 -0700 sh: Fix unneeded constructor in page table allocation The pgd kmem_cache allocation both specified __GFP_ZERO and had a constructor which makes no sense. Remove __GFP_ZERO and zero the user parts of the pgd explicitly. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Rich Felker commit 10a3b7c1c35e061d426d1e6a0d0c9ef434bae143 Merge: c6165cf0dbb82 4fccd2ff74fba Author: David S. Miller Date: Fri Aug 14 17:12:23 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-08-15 The following pull-request contains BPF updates for your *net* tree. We've added 23 non-merge commits during the last 4 day(s) which contain a total of 32 files changed, 421 insertions(+), 141 deletions(-). The main changes are: 1) Fix sock_ops ctx access splat due to register override, from John Fastabend. 2) Batch of various fixes to libbpf, bpftool, and selftests when testing build in 32-bit mode, from Andrii Nakryiko. 3) Fix vmlinux.h generation on ARM by mapping GCC built-in types (__Poly*_t) to equivalent ones clang can work with, from Jean-Philippe Brucker. 4) Fix build_id lookup in bpf_get_stackid() helper by walking all NOTE ELF sections instead of just first, from Jiri Olsa. 5) Avoid use of __builtin_offsetof() in libbpf for CO-RE, from Yonghong Song. 6) Fix segfault in test_mmap due to inconsistent length params, from Jianlin Lv. 7) Don't override errno in libbpf when logging errors, from Toke Høiland-Jørgensen. 8) Fix v4_to_v6 sockaddr conversion in sk_lookup test, from Stanislav Fomichev. 9) Add link to bpf-helpers(7) man page to BPF doc, from Joe Stringer. ==================== Signed-off-by: David S. Miller commit c6165cf0dbb82ded90163dce3ac183fc7a913dc4 Author: Fugang Duan Date: Thu Aug 13 15:13:14 2020 +0800 net: fec: correct the error path for regulator disable in probe Correct the error path for regulator disable. Fixes: 9269e5560b26 ("net: fec: add phy-reset-gpios PROBE_DEFER check") Signed-off-by: Fugang Duan Signed-off-by: David S. Miller commit b07e2a86133989cbcb17a9a9a86788f5ec34d846 Author: Nivedita Singhvi Date: Thu Aug 13 10:40:05 2020 +0530 docs: networking: bonding.rst resources section cleanup Removed obsolete resources from bonding.rst doc: - bonding-devel@lists.sourceforge.net hasn't been used since 2008 - admin interface is 404 - Donald Becker's domain/content no longer online Signed-off-by: Nivedita Singhvi Acked-by: Jay Vosburgh Signed-off-by: David S. Miller commit 0b32ce682f1c2ad4d6fe29861773c089243948f4 Merge: 35759383133f6 5b6d4a7f20b09 Author: David S. Miller Date: Fri Aug 14 16:42:23 2020 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2020-08-14 This series contains updates to i40e and igc drivers. Vinicius fixes an issue with PTP spinlock being accessed before initialization. Przemyslaw fixes an issue with trusted VFs seeing additional traffic. Grzegorz adds a wait for pending resets on driver removal to prevent null pointer dereference. v2: Fix function parameter for hw/aq in patch 2. Fix fixes tag in patch 3. ==================== Signed-off-by: David S. Miller commit 76d4467a97bd8c4bb01e810a5129c8f96d7dcbf8 Author: Qiu Wenbo Date: Thu Aug 13 11:38:04 2020 +0800 riscv: Setup exception vector for nommu platform Exception vector is missing on nommu platform and that is an issue. This patch is tested in Sipeed Maix Bit Dev Board. Fixes: 79b1feba5455 ("RISC-V: Setup exception vector early") Suggested-by: Anup Patel Suggested-by: Atish Patra Signed-off-by: Qiu Wenbo Reviewed-by: Atish Patra Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit c9c9735c46f589b9877b7fc00c89ef1b61a31e18 Merge: fded09198826b 7e0e8be3a1fd1 Author: Linus Torvalds Date: Fri Aug 14 16:01:59 2020 -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 the set of patches which arrived too late to stabilise in -next for the first pull. It's really just an lpfc driver update and an assortment of minor fixes, all in drivers. The only core update is to the zone block device driver, which isn't the one most people use" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: lpfc: Update lpfc version to 12.8.0.3 scsi: lpfc: Fix LUN loss after cable pull scsi: lpfc: Fix validation of bsg reply lengths scsi: lpfc: Fix retry of PRLI when status indicates its unsupported scsi: lpfc: Fix oops when unloading driver while running mds diags scsi: lpfc: Fix RSCN timeout due to incorrect gidft counter scsi: lpfc: Fix no message shown for lpfc_hdw_queue out of range value scsi: lpfc: Fix FCoE speed reporting scsi: lpfc: Add missing misc_deregister() for lpfc_init() scsi: lpfc: nvmet: Avoid hang / use-after-free again when destroying targetport scsi: scsi_transport_sas: Add spaces around binary operator "|" scsi: sd_zbc: Improve zone revalidation scsi: libfc: Free skb in fc_disc_gpn_id_resp() for valid cases scsi: fcoe: Memory leak fix in fcoe_sysfs_fcf_del() scsi: target: Make iscsit_register_transport() return void commit fded09198826b2998242ed2e1a16527849884d3f Merge: 87bd8c2b93ae8 6ced5ff0be8e9 Author: Linus Torvalds Date: Fri Aug 14 16:00:09 2020 -0700 Merge tag 'pwm/for-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "The majority of this batch is conversion of the PWM period and duty cycle to 64-bit unsigned integers, which is required so that some types of hardware can generate the full range of signals that they're capable of. The remainder is mostly minor fixes and cleanups" * tag 'pwm/for-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: bcm-iproc: handle clk_get_rate() return pwm: Replace HTTP links with HTTPS ones pwm: omap-dmtimer: Repair pwm_omap_dmtimer_chip's broken kerneldoc header pwm: mediatek: Provide missing kerneldoc description for 'soc' arg pwm: bcm-kona: Remove impossible comparison when validating duty cycle pwm: bcm-iproc: Remove impossible comparison when validating duty cycle pwm: iqs620a: Use lowercase hexadecimal literals for consistency pwm: Convert period and duty cycle to u64 clk: pwm: Use 64-bit division function backlight: pwm_bl: Use 64-bit division function pwm: sun4i: Use nsecs_to_jiffies to avoid a division pwm: sifive: Use 64-bit division macro pwm: iqs620a: Use 64-bit division pwm: imx27: Use 64-bit division macro pwm: imx-tpm: Use 64-bit division macro pwm: clps711x: Use 64-bit division macro hwmon: pwm-fan: Use 64-bit division macro drm/i915: Use 64-bit division macro commit 87bd8c2b93ae899ecd90a5e0550cdae4260cc4ca Merge: 5848dc5b1b76d 5a25de6df789c Author: Linus Torvalds Date: Fri Aug 14 15:58:57 2020 -0700 Merge tag 'sound-fix-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "All device-specific small fixes and quirks mostly for usual suspects, USB-audio and HD-audio" * tag 'sound-fix-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: echoaudio: Fix potential Oops in snd_echo_resume() ALSA: hda/hdmi: Use force connectivity quirk on another HP desktop ALSA: hda/realtek - Fix unused variable warning ALSA: hda - reverse the setting value in the micmute_led_set ALSA: echoaduio: Drop superfluous volatile modifier ALSA: usb-audio: Disable Lenovo P620 Rear line-in volume control ALSA: usb-audio: add quirk for Pioneer DDJ-RB ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109 ALSA: hda - fix the micmute led status for Lenovo ThinkCentre AIO ALSA: usb-audio: fix overeager device match for MacroSilicon MS2109 ALSA: hda/realtek: Fix pin default on Intel NUC 8 Rugged ALSA: usb-audio: Creative USB X-Fi Pro SB1095 volume knob support ALSA: usb-audio: fix spelling mistake "buss" -> "bus" commit 5848dc5b1b76d83599dcec1b39f188a7cbdca7e2 Author: Linus Torvalds Date: Fri Aug 14 15:22:43 2020 -0700 dma-debug: remove debug_dma_assert_idle() function This remoes the code from the COW path to call debug_dma_assert_idle(), which was added many years ago. Google shows that it hasn't caught anything in the 6+ years we've had it apart from a false positive, and Hugh just noticed how it had a very unfortunate spinlock serialization in the COW path. He fixed that issue the previous commit (a85ffd59bd36: "dma-debug: fix debug_dma_assert_idle(), use rcu_read_lock()"), but let's see if anybody even notices when we remove this function entirely. NOTE! We keep the dma tracking infrastructure that was added by the commit that introduced it. Partly to make it easier to resurrect this debug code if we ever deside to, and partly because that tracking by pfn and offset looks quite reasonable. The problem with this debug code was simply that it was expensive and didn't seem worth it, not that it was wrong per se. Acked-by: Dan Williams Acked-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit a85ffd59bd362d6c2e456e7f523b091830cd5454 Author: Hugh Dickins Date: Wed Aug 12 20:17:00 2020 -0700 dma-debug: fix debug_dma_assert_idle(), use rcu_read_lock() Since commit 2a9127fcf229 ("mm: rewrite wait_on_page_bit_common() logic") improved unlock_page(), it has become more noticeable how cow_user_page() in a kernel with CONFIG_DMA_API_DEBUG=y can create and suffer from heavy contention on DMA debug's radix_lock in debug_dma_assert_idle(). It is only doing a lookup: use rcu_read_lock() and rcu_read_unlock() instead; though that does require the static ents[] to be moved onstack... ...but, hold on, isn't that radix_tree_gang_lookup() and loop doing quite the wrong thing: searching CACHELINES_PER_PAGE entries for an exact match with the first cacheline of the page in question? radix_tree_gang_lookup() is the right tool for the job, but we need nothing more than to check the first entry it can find, reporting if that falls anywhere within the page. (Is RCU safe here? As safe as using the spinlock was. The entries are never freed, so don't need to be freed by RCU. They may be reused, and there is a faint chance of a race, with an offending entry reused while printing its error info; but the spinlock did not prevent that either, and I agree that it's not worth worrying about. ] [ Side noe: this patch is a clear improvement to the status quo, but the next patch will be removing this debug function entirely. But just in case we decide we want to resurrect the debugging code some day, I'm first applying this improvement patch so that it doesn't get lost - Linus ] Fixes: 3b7a6418c749 ("dma debug: account for cachelines and read-only mappings in overlap tracking") Signed-off-by: Hugh Dickins Acked-by: Dan Williams Acked-by: Christoph Hellwig Signed-off-by: Linus Torvalds commit 5b6d4a7f20b09c47ca598760f6dafd554af8b6d5 Author: Grzegorz Szczurek Date: Tue Aug 11 10:56:49 2020 +0000 i40e: Fix crash during removing i40e driver Fix the reason of crashing system by add waiting time to finish reset recovery process before starting remove driver procedure. Now VSI is releasing if VSI is not in reset recovery mode. Without this fix it was possible to start remove driver if other processing command need reset recovery procedure which resulted in null pointer dereference. VSI used by the ethtool process has been cleared by remove driver process. [ 6731.508665] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 6731.508668] #PF: supervisor read access in kernel mode [ 6731.508670] #PF: error_code(0x0000) - not-present page [ 6731.508671] PGD 0 P4D 0 [ 6731.508674] Oops: 0000 [#1] SMP PTI [ 6731.508679] Hardware name: Intel Corporation S2600WT2R/S2600WT2R, BIOS SE5C610.86B.01.01.0021.032120170601 03/21/2017 [ 6731.508694] RIP: 0010:i40e_down+0x252/0x310 [i40e] [ 6731.508696] Code: c7 78 de fa c0 e8 61 02 3a c1 66 83 bb f6 0c 00 00 00 0f 84 bf 00 00 00 45 31 e4 45 31 ff eb 03 41 89 c7 48 8b 83 98 0c 00 00 <4a> 8b 3c 20 e8 a5 79 02 00 48 83 bb d0 0c 00 00 00 74 10 48 8b 83 [ 6731.508698] RSP: 0018:ffffb75ac7b3faf0 EFLAGS: 00010246 [ 6731.508700] RAX: 0000000000000000 RBX: ffff9c9874bd5000 RCX: 0000000000000007 [ 6731.508701] RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffff9c987f4d9780 [ 6731.508703] RBP: ffffb75ac7b3fb30 R08: 0000000000005b60 R09: 0000000000000004 [ 6731.508704] R10: ffffb75ac64fbd90 R11: 0000000000000001 R12: 0000000000000000 [ 6731.508706] R13: ffff9c97a08e0000 R14: ffff9c97a08e0a68 R15: 0000000000000000 [ 6731.508708] FS: 00007f2617cd2740(0000) GS:ffff9c987f4c0000(0000) knlGS:0000000000000000 [ 6731.508710] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 6731.508711] CR2: 0000000000000000 CR3: 0000001e765c4006 CR4: 00000000003606e0 [ 6731.508713] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 6731.508714] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 6731.508715] Call Trace: [ 6731.508734] i40e_vsi_close+0x84/0x90 [i40e] [ 6731.508742] i40e_quiesce_vsi.part.98+0x3c/0x40 [i40e] [ 6731.508749] i40e_pf_quiesce_all_vsi+0x55/0x60 [i40e] [ 6731.508757] i40e_prep_for_reset+0x59/0x130 [i40e] [ 6731.508765] i40e_reconfig_rss_queues+0x5a/0x120 [i40e] [ 6731.508774] i40e_set_channels+0xda/0x170 [i40e] [ 6731.508778] ethtool_set_channels+0xe9/0x150 [ 6731.508781] dev_ethtool+0x1b94/0x2920 [ 6731.508805] dev_ioctl+0xc2/0x590 [ 6731.508811] sock_do_ioctl+0xae/0x150 [ 6731.508813] sock_ioctl+0x34f/0x3c0 [ 6731.508821] ksys_ioctl+0x98/0xb0 [ 6731.508828] __x64_sys_ioctl+0x1a/0x20 [ 6731.508831] do_syscall_64+0x57/0x1c0 [ 6731.508835] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 4b8164467b85 ("i40e: Add common function for finding VSI by type") Signed-off-by: Grzegorz Szczurek Signed-off-by: Arkadiusz Kubalewski Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 4bd5e02a2ed1575c2f65bd3c557a077dd399f0e8 Author: Przemyslaw Patynowski Date: Thu Aug 6 13:40:59 2020 +0000 i40e: Set RX_ONLY mode for unicast promiscuous on VLAN Trusted VF with unicast promiscuous mode set, could listen to TX traffic of other VFs. Set unicast promiscuous mode to RX traffic, if VSI has port VLAN configured. Rename misleading I40E_AQC_SET_VSI_PROMISC_TX bit to I40E_AQC_SET_VSI_PROMISC_RX_ONLY. Aligned unicast promiscuous with VLAN to the one without VLAN. Fixes: 6c41a7606967 ("i40e: Add promiscuous on VLAN support") Fixes: 3b1200891b7f ("i40e: When in promisc mode apply promisc mode to Tx Traffic as well") Signed-off-by: Przemyslaw Patynowski Signed-off-by: Aleksandr Loktionov Signed-off-by: Arkadiusz Kubalewski Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit b923f1247b72fc100b87792fd2129d026bb10e66 Merge: b6b178e38f40f b0294f30256bb Author: Linus Torvalds Date: Fri Aug 14 14:26:08 2020 -0700 Merge tag 'timers-urgent-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timekeeping updates from Thomas Gleixner: "A set of timekeeping/VDSO updates: - Preparatory work to allow S390 to switch over to the generic VDSO implementation. S390 requires that the VDSO data pointer is handed in to the counter read function when time namespace support is enabled. Adding the pointer is a NOOP for all other architectures because the compiler is supposed to optimize that out when it is unused in the architecture specific inline. The change also solved a similar problem for MIPS which fortunately has time namespaces not yet enabled. S390 needs to update clock related VDSO data independent of the timekeeping updates. This was solved so far with yet another sequence counter in the S390 implementation. A better solution is to utilize the already existing VDSO sequence count for this. The core code now exposes helper functions which allow to serialize against the timekeeper code and against concurrent readers. S390 needs extra data for their clock readout function. The initial common VDSO data structure did not provide a way to add that. It now has an embedded architecture specific struct embedded which defaults to an empty struct. Doing this now avoids tree dependencies and conflicts post rc1 and allows all other architectures which work on generic VDSO support to work from a common upstream base. - A trivial comment fix" * tag 'timers-urgent-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: time: Delete repeated words in comments lib/vdso: Allow to add architecture-specific vdso data timekeeping/vsyscall: Provide vdso_update_begin/end() vdso/treewide: Add vdso_data pointer argument to __arch_get_hw_counter() commit b6b178e38f40f34842b719a8786d346d4cfec5dc Merge: 1d229a65b419c 0099808553ad4 Author: Linus Torvalds Date: Fri Aug 14 14:17:51 2020 -0700 Merge tag 'timers-core-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull more timer updates from Thomas Gleixner: "A set of posix CPU timer changes which allows to defer the heavy work of posix CPU timers into task work context. The tick interrupt is reduced to a quick check which queues the work which is doing the heavy lifting before returning to user space or going back to guest mode. Moving this out is deferring the signal delivery slightly but posix CPU timers are inaccurate by nature as they depend on the tick so there is no real damage. The relevant test cases all passed. This lifts the last offender for RT out of the hard interrupt context tick handler, but it also has the general benefit that the actual heavy work is accounted to the task/process and not to the tick interrupt itself. Further optimizations are possible to break long sighand lock hold and interrupt disabled (on !RT kernels) times when a massive amount of posix CPU timers (which are unpriviledged) is armed for a task/process. This is currently only enabled for x86 because the architecture has to ensure that task work is handled in KVM before entering a guest, which was just established for x86 with the new common entry/exit code which got merged post 5.8 and is not the case for other KVM architectures" * tag 'timers-core-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Select POSIX_CPU_TIMERS_TASK_WORK posix-cpu-timers: Provide mechanisms to defer timer handling to task_work posix-cpu-timers: Split run_posix_cpu_timers() commit 1d229a65b419cf51a9921d73907f1998a0e14daa Merge: e1d74fbe50c46 f107cee94ba4d Author: Linus Torvalds Date: Fri Aug 14 14:14:28 2020 -0700 Merge tag 'irq-urgent-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "Two fixes in the core interrupt code which ensure that all error exits unlock the descriptor lock" * tag 'irq-urgent-2020-08-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq: Unlock irq descriptor after errors genirq/PM: Always unlock IRQ descriptor in rearm_wake_irq() commit 35759383133f64d90eba120a0d3efe8f71241650 Author: Florian Westphal Date: Fri Aug 14 15:56:34 2020 +0200 mptcp: sendmsg: reset iter on error Once we've copied data from the iterator we need to revert in case we end up not sending any data. This bug doesn't trigger with normal 'poll' based tests, because we only feed a small chunk of data to kernel after poll indicated POLLOUT. With blocking IO and large writes this triggers. Receiver ends up with less data than it should get. Fixes: 72511aab95c94d ("mptcp: avoid blocking in tcp_sendpages") Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 068885434ccb20542e0d759aebbefe7a6724d85f Author: Edward Cree Date: Fri Aug 14 13:26:22 2020 +0100 sfc: check hash is valid before using it On EF100, the RX hash field in the packet prefix may not be valid (e.g. if the header parse failed), and this is indicated by a one-bit flag elsewhere in the packet prefix. Only call skb_set_hash() if the RSS_HASH_VALID bit is set. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit e1d74fbe50c46253de519e772c5c2f431b2b837d Merge: 7fca4dee610df 55b2662ec665c Author: Linus Torvalds Date: Fri Aug 14 14:04:53 2020 -0700 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC updates from Stafford Horne: "A few patches all over the place during this cycle, mostly bug and sparse warning fixes for OpenRISC, but a few enhancements too. Note, there are 2 non OpenRISC specific fixups. Non OpenRISC fixes: - In init we need to align the init_task correctly to fix an issue with MUTEX_FLAGS, reviewed by Peter Z. No one picked this up so I kept it on my tree. - In asm-generic/io.h I fixed up some sparse warnings, OK'd by Arnd. Arnd asked to merge it via my tree. OpenRISC fixes: - Many fixes for OpenRISC sprase warnings. - Add support OpenRISC SMP tlb flushing rather than always flushing the entire TLB on every CPU. - Fix bug when dumping stack via /proc/xxx/stack of user threads" * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: uaccess: Add user address space check to access_ok openrisc: signal: Fix sparse address space warnings openrisc: uaccess: Remove unused macro __addr_ok openrisc: uaccess: Use static inline function in access_ok openrisc: uaccess: Fix sparse address space warnings openrisc: io: Fixup defines and move include to the end asm-generic/io.h: Fix sparse warnings on big-endian architectures openrisc: Implement proper SMP tlb flushing openrisc: Fix oops caused when dumping stack openrisc: Add support for external initrd images init: Align init_task to avoid conflict with MUTEX_FLAGS openrisc: fix __user in raw_copy_to_user()'s prototype commit e591d298cc7b9e2d82e701ab3fdfe7c97b692994 Merge: 7fca4dee610df e052d0540298b Author: David S. Miller Date: Fri Aug 14 13:57:56 2020 -0700 Merge tag 'linux-can-fixes-for-5.9-20200814' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2020-08-14 this is a pull request of 6 patches for net/master. All patches fix problems in the j1939 CAN networking stack. The first patch is by Eric Dumazet fixes a kernel-infoleak in j1939_sk_sock2sockaddr_can(). The remaining 5 patches are by Oleksij Rempel and fix recption of j1939 messages not orginated by the stack, a use-after-free in j1939_tp_txtimer(), ensure that the CAN driver has a ml_priv allocated. These problem were found by google's syzbot. Further ETP sessions with block size of less than 255 are fixed and a sanity check was added to j1939_xtp_rx_dat_one() to detect packet corruption. ==================== Signed-off-by: David S. Miller commit 7fca4dee610dffbe119714231cac0d59496bc193 Merge: 0520058d0578c 6553fb799f601 Author: Linus Torvalds Date: Fri Aug 14 13:40:27 2020 -0700 Merge tag 'powerpc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fix from Michael Ellerman: "One fix for a boot crash on some platforms introduced by the recent pkey refactoring. Thanks to Christian Zigotzky and Aneesh Kumar K.V" * tag 'powerpc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pkeys: Fix boot failures with Nemo board (A-EON AmigaOne X1000) commit 0520058d0578c2924b1571c16281f873cb4a3d2b Merge: cd94257d7a810 585c6ed738a5e Author: Linus Torvalds Date: Fri Aug 14 13:34:37 2020 -0700 Merge tag 'for-linus-5.9-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull more xen updates from Juergen Gross: - Remove support for running as 32-bit Xen PV-guest. 32-bit PV guests are rarely used, are lacking security fixes for Meltdown, and can be easily replaced by PVH mode. Another series for doing more cleanup will follow soon (removal of 32-bit-only pvops functionality). - Fixes and additional features for the Xen display frontend driver. * tag 'for-linus-5.9-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: drm/xen-front: Pass dumb buffer data offset to the backend xen: Sync up with the canonical protocol definition in Xen drm/xen-front: Add YUYV to supported formats drm/xen-front: Fix misused IS_ERR_OR_NULL checks xen/gntdev: Fix dmabuf import with non-zero sgt offset x86/xen: drop tests for highmem in pv code x86/xen: eliminate xen-asm_64.S x86/xen: remove 32-bit Xen PV guest support commit cd94257d7a8103acf136e4bd46e3d0ad698a6f3d Merge: 8ab49526b53d3 b9d8cf2eb3cee Author: Linus Torvalds Date: Fri Aug 14 13:31:25 2020 -0700 Merge tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyper-v fixes from Wei Liu: - fix oops reporting on Hyper-V - make objtool happy * tag 'hyperv-fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: x86/hyperv: Make hv_setup_sched_clock inline Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops commit 8ab49526b53d3172d1d8dd03a75c7d1f5bd21239 Author: Eric Dumazet Date: Fri Aug 14 11:16:17 2020 -0700 x86/fsgsbase/64: Fix NULL deref in 86_fsgsbase_read_task syzbot found its way in 86_fsgsbase_read_task() and triggered this oops: KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 0 PID: 6866 Comm: syz-executor262 Not tainted 5.8.0-syzkaller #0 RIP: 0010:x86_fsgsbase_read_task+0x16d/0x310 arch/x86/kernel/process_64.c:393 Call Trace: putreg32+0x3ab/0x530 arch/x86/kernel/ptrace.c:876 genregs32_set arch/x86/kernel/ptrace.c:1026 [inline] genregs32_set+0xa4/0x100 arch/x86/kernel/ptrace.c:1006 copy_regset_from_user include/linux/regset.h:326 [inline] ia32_arch_ptrace arch/x86/kernel/ptrace.c:1061 [inline] compat_arch_ptrace+0x36c/0xd90 arch/x86/kernel/ptrace.c:1198 __do_compat_sys_ptrace kernel/ptrace.c:1420 [inline] __se_compat_sys_ptrace kernel/ptrace.c:1389 [inline] __ia32_compat_sys_ptrace+0x220/0x2f0 kernel/ptrace.c:1389 do_syscall_32_irqs_on arch/x86/entry/common.c:84 [inline] __do_fast_syscall_32+0x57/0x80 arch/x86/entry/common.c:126 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:149 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c This can happen if ptrace() or sigreturn() pokes an LDT selector into FS or GS for a task with no LDT and something tries to read the base before a return to usermode notices the bad selector and fixes it. The fix is to make sure ldt pointer is not NULL. Fixes: 07e1d88adaae ("x86/fsgsbase/64: Fix ptrace() to read the FS/GS base accurately") Co-developed-by: Jann Horn Signed-off-by: Eric Dumazet Reported-by: syzbot Acked-by: Andy Lutomirski Cc: Chang S. Bae Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Markus T Metzger Cc: Peter Zijlstra Cc: Ravi Shankar Cc: Rik van Riel Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Linus Torvalds commit d9361cb285281563adada9b16708b12053bd6531 Merge: 0fd9cc6b0c722 21dfbcd1f5cbf Author: Linus Torvalds Date: Fri Aug 14 13:09:15 2020 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "This fixes a regression in af_alg" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: algif_aead - fix uninitialized ctx->init commit 0fd9cc6b0c72245375520ffc8d97ce5857b63b94 Merge: 32b2ee5cea4d2 262e6ae7081df Author: Linus Torvalds Date: Fri Aug 14 11:07:02 2020 -0700 Merge tag 'modules-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull module updates from Jessica Yu: "The most important change would be Christoph Hellwig's patch implementing proprietary taint inheritance, in an effort to discourage the creation of GPL "shim" modules that interface between GPL symbols and proprietary symbols. Summary: - Have modules that use symbols from proprietary modules inherit the TAINT_PROPRIETARY_MODULE taint, in an effort to prevent GPL shim modules that are used to circumvent _GPL exports. These are modules that claim to be GPL licensed while also using symbols from proprietary modules. Such modules will be rejected while non-GPL modules will inherit the proprietary taint. - Module export space cleanup. Unexport symbols that are unused outside of module.c or otherwise used in only built-in code" * tag 'modules-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: modules: inherit TAINT_PROPRIETARY_MODULE modules: return licensing information from find_symbol modules: rename the licence field in struct symsearch to license modules: unexport __module_address modules: unexport __module_text_address modules: mark each_symbol_section static modules: mark find_symbol static modules: mark ref_module static modules: linux/moduleparam.h: drop duplicated word in a comment commit 32b2ee5cea4d281f4f3f5a34d6363d1841422040 Merge: a1d21081a60df d4bbe8a1b55ae Author: Linus Torvalds Date: Fri Aug 14 11:04:45 2020 -0700 Merge tag 'kconfig-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kconfig updates from Masahiro Yamada: - remove '---help---' keyword support - fix mouse events for 'menuconfig' symbols in search view of qconf - code cleanups of qconf * tag 'kconfig-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (24 commits) kconfig: qconf: move setOptionMode() to ConfigList from ConfigView kconfig: qconf: do not limit the pop-up menu to the first row kconfig: qconf: refactor icon setups kconfig: qconf: remove unused voidPix, menuInvPix kconfig: qconf: remove ConfigItem::text/setText kconfig: qconf: remove ConfigList::addColumn/removeColumn kconfig: qconf: remove ConfigItem::pixmap/setPixmap kconfig: qconf: drop more localization code kconfig: qconf: remove 'parent' from ConfigList::updateMenuList() kconfig: qconf: remove unused argument from ConfigView::updateList() kconfig: qconf: remove unused argument from ConfigList::updateList() kconfig: qconf: omit parent to QHBoxLayout() kconfig: qconf: remove name from ConfigSearchWindow constructor kconfig: qconf: remove unused ConfigList::listView() kconfig: qconf: overload addToolBar() to create and insert toolbar kconfig: qconf: remove toolBar from ConfigMainWindow members kconfig: qconf: use 'menu' variable for (QMenu *) kconfig: qconf: do not use 'menu' variable for (QMenuBar *) kconfig: qconf: remove ->addSeparator() to menuBar kconfig: add 'static' to some file-local data ... commit f3db6de55e95eee6457a14912dd382a6cfc98edd Merge: f6235eb189706 f6ebbcf08f37b Author: Rafael J. Wysocki Date: Fri Aug 14 19:39:35 2020 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: cpufreq: intel_pstate: Implement passive mode with HWP enabled commit 3cda505a679ced78d69c889cfb418d1728bb2707 Author: Vinicius Costa Gomes Date: Mon Aug 3 11:32:07 2020 -0700 igc: Fix PTP initialization Right now, igc_ptp_reset() is called from igc_reset(), which is called from igc_probe() before igc_ptp_init() has a chance to run. It is detected as an attempt to use an spinlock without registering its key first. See log below. To avoid this problem, simplify the initialization: igc_ptp_init() is only called from igc_probe(), and igc_ptp_reset() is only called from igc_reset(). [ 2.736332] INFO: trying to register non-static key. [ 2.736902] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10 [ 2.737513] the code is fine but needs lockdep annotation. [ 2.737513] turning off the locking correctness validator. [ 2.737515] CPU: 8 PID: 239 Comm: systemd-udevd Tainted: G E 5.8.0-rc7+ #13 [ 2.737515] Hardware name: Gigabyte Technology Co., Ltd. Z390 AORUS ULTRA/Z390 AORUS ULTRA-CF, BIOS F7 03/14/2019 [ 2.737516] Call Trace: [ 2.737521] dump_stack+0x78/0xa0 [ 2.737524] register_lock_class+0x6b1/0x6f0 [ 2.737526] ? lockdep_hardirqs_on_prepare+0xca/0x160 [ 2.739177] ? _raw_spin_unlock_irq+0x24/0x50 [ 2.739179] ? trace_hardirqs_on+0x1c/0xf0 [ 2.740820] __lock_acquire+0x56/0x1ff0 [ 2.740823] ? __schedule+0x30c/0x970 [ 2.740825] lock_acquire+0x97/0x3e0 [ 2.740830] ? igc_ptp_reset+0x35/0xf0 [igc] [ 2.740833] ? schedule_hrtimeout_range_clock+0xb7/0x120 [ 2.742507] _raw_spin_lock_irqsave+0x3a/0x50 [ 2.742512] ? igc_ptp_reset+0x35/0xf0 [igc] [ 2.742515] igc_ptp_reset+0x35/0xf0 [igc] [ 2.742519] igc_reset+0x96/0xd0 [igc] [ 2.744148] igc_probe+0x68f/0x7d0 [igc] [ 2.745796] local_pci_probe+0x3d/0x70 [ 2.745799] pci_device_probe+0xd1/0x190 [ 2.745802] really_probe+0x15a/0x3f0 [ 2.759936] driver_probe_device+0xe1/0x150 [ 2.759937] device_driver_attach+0xa8/0xb0 [ 2.761786] __driver_attach+0x89/0x150 [ 2.761786] ? device_driver_attach+0xb0/0xb0 [ 2.761787] ? device_driver_attach+0xb0/0xb0 [ 2.761788] bus_for_each_dev+0x66/0x90 [ 2.765012] bus_add_driver+0x12e/0x1f0 [ 2.765716] driver_register+0x8b/0xe0 [ 2.766418] ? 0xffffffffc0230000 [ 2.767119] do_one_initcall+0x5a/0x310 [ 2.767826] ? kmem_cache_alloc_trace+0xe9/0x200 [ 2.768528] do_init_module+0x5c/0x260 [ 2.769206] __do_sys_finit_module+0x93/0xe0 [ 2.770048] do_syscall_64+0x46/0xa0 [ 2.770716] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 2.771396] RIP: 0033:0x7f83534589e0 [ 2.772073] Code: 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 2e 2e 2e 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 80 24 0d 00 f7 d8 64 89 01 48 [ 2.772074] RSP: 002b:00007ffd31d0ed18 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 2.774854] RAX: ffffffffffffffda RBX: 000055d52816aba0 RCX: 00007f83534589e0 [ 2.774855] RDX: 0000000000000000 RSI: 00007f83535b982f RDI: 0000000000000006 [ 2.774855] RBP: 00007ffd31d0ed60 R08: 0000000000000000 R09: 00007ffd31d0ed30 [ 2.774856] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000000 [ 2.774856] R13: 0000000000020000 R14: 00007f83535b982f R15: 000055d527f5e120 Fixes: 5f2958052c58 ("igc: Add basic skeleton for PTP") Signed-off-by: Vinicius Costa Gomes Reviewed-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 5f0b06da5cde3f0a613308b89f0afea678559fdf Author: Rob Herring Date: Fri Aug 14 09:21:41 2020 -0600 dt-bindings: Remove more cases of 'allOf' containing a '$ref' Another wack-a-mole pass of killing off unnecessary 'allOf + $ref' usage. json-schema versions draft7 and earlier have a weird behavior in that any keywords combined with a '$ref' are ignored (silently). The correct form was to put a '$ref' under an 'allOf'. This behavior is now changed in the 2019-09 json-schema spec and '$ref' can be mixed with other keywords. The json-schema library doesn't yet support this, but the tooling now does a fixup for this and either way works. This has been a constant source of review comments, so let's change this treewide so everyone copies the simpler syntax. Signed-off-by: Rob Herring commit f516fb704d02fff292cb79a6ad85c56529f7c8cf Author: Rob Herring Date: Mon Apr 20 21:24:47 2020 -0500 dt-bindings: Whitespace clean-ups in schema files Clean-up incorrect indentation, extra spaces, long lines, and missing EOF newline in schema files. Most of the clean-ups are for list indentation which should always be 2 spaces more than the preceding keyword. Found with yamllint (which I plan to integrate into the checks). Cc: linux-arm-kernel@lists.infradead.org Cc: linux-clk@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-spi@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: linux-remoteproc@vger.kernel.org Cc: linux-hwmon@vger.kernel.org Cc: linux-i2c@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Cc: linux-iio@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-media@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: linux-mmc@vger.kernel.org Cc: linux-mtd@lists.infradead.org Cc: netdev@vger.kernel.org Cc: linux-rtc@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-usb@vger.kernel.org Acked-by: Sam Ravnborg Signed-off-by: Rob Herring commit d7e673ec2c8e0ea39c4c70fc490d67d7fbda869d Author: Nicolas Saenz Julienne Date: Fri Aug 14 12:26:23 2020 +0200 dma-pool: Only allocate from CMA when in same memory zone There is no guarantee to CMA's placement, so allocating a zone specific atomic pool from CMA might return memory from a completely different memory zone. To get around this double check CMA's placement before allocating from it. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Christoph Hellwig commit 9420139f516d7fbc248ce17f35275cb005ed98ea Author: Christoph Hellwig Date: Fri Aug 14 12:26:24 2020 +0200 dma-pool: fix coherent pool allocations for IOMMU mappings When allocating coherent pool memory for an IOMMU mapping we don't care about the DMA mask. Move the guess for the initial GFP mask into the dma_direct_alloc_pages and pass dma_coherent_ok as a function pointer argument so that it doesn't get applied to the IOMMU case. Signed-off-by: Christoph Hellwig Tested-by: Amit Pundir commit 492e4edba6e2fc0620a69266d33f29c4a1f9ac1e Author: Arnaldo Carvalho de Melo Date: Fri Aug 14 09:55:33 2020 -0300 perf ftrace: Make option description initials all capital letters And improve a bit the -m description to state that a B/K/M/G suffix is needed. Cc: Changbin Du Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit c7a14fdcb3fa77368273b3daab52ad8e86d358b6 Author: Frank Ch. Eigler Date: Thu Aug 13 10:22:04 2020 +0200 perf build-ids: Fall back to debuginfod query if debuginfo not found During a perf-record, use the -ldebuginfod API to query a debuginfod server, should the debug data not be found in the usual system locations. If successful, the usual $HOME/.debug dir is populated. Tested with: $ find . . ./ctags-debuginfo-5.8-26.fc31.x86_64.rpm ./usr ./usr/lib ./usr/lib/debug ./usr/lib/debug/.build-id ./usr/lib/debug/.build-id/ca ./usr/lib/debug/.build-id/ca/46f6ae6a0cee57d85abc1d461c49074248908d ./usr/lib/debug/.build-id/ca/46f6ae6a0cee57d85abc1d461c49074248908d.debug ./usr/lib/debug/usr ./usr/lib/debug/usr/bin ./usr/lib/debug/usr/bin/ctags-5.8-26.fc31.x86_64.debug $ debuginfod -F . ... $ rm -rf ~/.debug/ ; mkdir ~/.debug $ perf record make tags BUILD: Doing 'make -j8' parallel build GEN tags [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.107 MB perf.data (1483 samples) ] $ find ~/.debug | grep ctags /home/jolsa/.debug/usr/bin/ctags /home/jolsa/.debug/usr/bin/ctags/ca46f6ae6a0cee57d85abc1d461c49074248908d /home/jolsa/.debug/usr/bin/ctags/ca46f6ae6a0cee57d85abc1d461c49074248908d/elf /home/jolsa/.debug/usr/bin/ctags/ca46f6ae6a0cee57d85abc1d461c49074248908d/probes $ rm -rf ~/.debug/ ; mkdir ~/.debug $ DEBUGINFOD_URLS=http://localhost:8002 perf record make tags BUILD: Doing 'make -j8' parallel build GEN tags [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.108 MB perf.data (1531 samples) ] $ find ~/.debug | grep ctag /home/jolsa/.debug/usr/bin/ctags /home/jolsa/.debug/usr/bin/ctags/ca46f6ae6a0cee57d85abc1d461c49074248908d /home/jolsa/.debug/usr/bin/ctags/ca46f6ae6a0cee57d85abc1d461c49074248908d/debug /home/jolsa/.debug/usr/bin/ctags/ca46f6ae6a0cee57d85abc1d461c49074248908d/elf /home/jolsa/.debug/usr/bin/ctags/ca46f6ae6a0cee57d85abc1d461c49074248908d/probes Note the 'debug' file is created in the last run. Note that currently the debuginfo data are downloaded only on record path, we still need add this support to perf build-id/report.. and test ;-) Tested-by: Jiri Olsa Signed-off-by: Jiri Olsa Signed-off-by: Frank Ch. Eigler Signed-off-by: Arnaldo Carvalho de Melo commit a508d061ef04b163a85f55ba8a748c026f89da45 Author: Peng Fan Date: Fri Aug 14 18:44:54 2020 +0800 perf bench numa: Remove dead code in parse_nodes_opt() In the function parse_nodes_opt(), the statement "return 0;" is dead code, remove it. Signed-off-by: Peng Fan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1597401894-27549-1-git-send-email-fanpeng@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 8989f5f076051f3ceb1da083181b7d69808fff0e Author: Paul A. Clarke Date: Thu Aug 13 17:21:55 2020 -0500 perf stat: Update POWER9 metrics to utilize other metrics These changes take advantage of the new capability added in merge commit 00e4db51259a5f936fec1424b884f029479d3981 "Allow using computed metrics in calculating other metrics". The net is a simplification of the expressions for a handful of metrics, but no functional change. Signed-off-by: Paul Clarke Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Jiri Olsa Cc: Madhavan Srinivasan Link: http://lore.kernel.org/lkml/20200813222155.268183-1-pc@us.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 0094024a186045ac1a48d839bdb56c42b8f8279d Author: Changbin Du Date: Sat Aug 8 10:31:41 2020 +0800 perf ftrace: Add change log Add a change log after previous enhancements. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-19-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 3c4dc21b75a74d4a8458624649a3e09af399a384 Author: Changbin Du Date: Sat Aug 8 10:31:40 2020 +0800 perf: ftrace: Add set_tracing_options() to set all trace options Now the __cmd_ftrace() becomes a bit long. This moves the trace option setting code to a separate function set_tracing_options(). Suggested-by: Namhyung Kim Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-18-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 42145d71ddf369a536940a1b0d63b9aef6468516 Author: Changbin Du Date: Sat Aug 8 10:31:39 2020 +0800 perf ftrace: Add option --tid to filter by thread id This allows us to trace single thread instead of the whole process. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-17-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 6555c2f6db2196ef1b6d7149e7d342d0ba2ec57e Author: Changbin Du Date: Sat Aug 8 10:31:38 2020 +0800 perf ftrace: Add option -D/--delay to delay tracing This adds an option '-D/--delay' to allow us to start tracing some times later after workload is launched. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-16-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit a8f87a5cb466888bb70330b9ba55cdc0b9a1c20e Author: Changbin Du Date: Sat Aug 8 10:31:37 2020 +0800 perf: ftrace: Allow set graph depth by '--graph-opts' This is to have a consistent view of all graph tracer options. The original option '--graph-depth' is marked as deprecated. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-15-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 00c85d5f45b6b366f68c876cd89b8b790f50ea0f Author: Changbin Du Date: Sat Aug 8 10:31:36 2020 +0800 perf ftrace: Add support for trace option tracing_thresh This adds an option '--graph-opts thresh' to setup trace duration threshold for funcgraph tracer. $ sudo ./perf ftrace -G '*' --graph-opts thresh=100 3) ! 184.060 us | } /* schedule */ 3) ! 185.600 us | } /* exit_to_usermode_loop */ 2) ! 225.989 us | } /* schedule_idle */ 2) # 4140.051 us | } /* do_idle */ Signed-off-by: Changbin Du Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-14-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 59486fb0c8bfda4ecd32b905d4cf2af92ec49f4c Author: Changbin Du Date: Sat Aug 8 10:31:35 2020 +0800 perf ftrace: Add option 'verbose' to show more info for graph tracer Sometimes we want ftrace display more and longer information about the trace. $ sudo perf ftrace -G '*' 2) 0.979 us | mutex_unlock(); 2) 1.540 us | __fsnotify_parent(); 2) 0.433 us | fsnotify(); $ sudo perf ftrace -G '*' --graph-opts verbose 14160.770883 | 0) <...>-47814 | .... | 1.289 us | mutex_unlock(); 14160.770886 | 0) <...>-47814 | .... | 1.624 us | __fsnotify_parent(); 14160.770887 | 0) <...>-47814 | .... | 0.636 us | fsnotify(); 14160.770888 | 0) <...>-47814 | .... | 0.328 us | __sb_end_write(); 14160.770888 | 0) <...>-47814 | d... | 0.430 us | fpregs_assert_state_consistent(); 14160.770889 | 0) <...>-47814 | d... | | do_syscall_64() { 14160.770889 | 0) <...>-47814 | .... | | __x64_sys_close() { Signed-off-by: Changbin Du Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-13-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit c81fc34e318503f28c571250d3434d8a788ca747 Author: Changbin Du Date: Sat Aug 8 10:31:34 2020 +0800 perf ftrace: Add support for tracing option 'irq-info' This adds support to display irq context info for function tracer. To do this, just specify a '--func-opts irq-info' option. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-12-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit d1bcf17cda8001e2826d409019866b33adb82219 Author: Changbin Du Date: Sat Aug 8 10:31:33 2020 +0800 perf ftrace: Add support for trace option funcgraph-irqs This adds an option '--graph-opts noirqs' to filter out functions executed in irq context. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-11-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 38988f2e7ed515784b8b19e2be265c9c6984ce6f Author: Changbin Du Date: Sat Aug 8 10:31:32 2020 +0800 perf ftrace: Add support for trace option sleep-time This adds an option '--graph-opts nosleep-time' which allow us only to measure on-CPU time. This option is function_graph tracer only. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-10-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit b1d84af6f58022a0d75f5745367624549cd0bfbf Author: Changbin Du Date: Sat Aug 8 10:31:31 2020 +0800 perf ftrace: Add support for tracing option 'func_stack_trace' This adds support to display call trace for function tracer. To do this, just specify a '--func-opts call-graph' option. Example: $ sudo perf ftrace -T vfs_read --func-opts call-graph iio-sensor-prox-855 [003] 6168.369657: vfs_read <-ksys_read iio-sensor-prox-855 [003] 6168.369677: => vfs_read => ksys_read => __x64_sys_read => do_syscall_64 => entry_SYSCALL_64_after_hwframe ... Signed-off-by: Changbin Du Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-9-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit a80abe2a9a8a420b4dd88713ba0ad3c163e7a79b Author: Changbin Du Date: Sat Aug 8 10:31:30 2020 +0800 perf tools: Add general function to parse sublevel options This factors out a general function perf_parse_sublevel_options() to parse sublevel options. The 'sublevel' options is something like the '--debug' options which allow more sublevel options. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-8-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 5b34747238686021a39495f7ae0bfadc27fe3e83 Author: Changbin Du Date: Sat Aug 8 10:31:29 2020 +0800 perf ftrace: Add option '--inherit' to trace children processes This adds an option '--inherit' to allow us trace children processes spawned by our target. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-7-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 81523c1e579bb95106e22b864fbef687d585f2b9 Author: Changbin Du Date: Sat Aug 8 10:31:28 2020 +0800 perf ftrace: Show trace column header This makes 'perf ftrace' display column header before printing trace. $ sudo perf ftrace # tracer: function # # entries-in-buffer/entries-written: 0/0 #P:8 # # TASK-PID CPU# TIMESTAMP FUNCTION # | | | | | <...>-9246 [006] 10726.262760: mutex_unlock <-rb_simple_write <...>-9246 [006] 10726.262764: __fsnotify_parent <-vfs_write <...>-9246 [006] 10726.262765: fsnotify <-vfs_write <...>-9246 [006] 10726.262766: __sb_end_write <-vfs_write <...>-9246 [006] 10726.262767: fpregs_assert_state_consistent <-do_syscall_64 Signed-off-by: Changbin Du Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-6-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 846e1939801a0893ea71a6a56d8dbe2bf46682d1 Author: Changbin Du Date: Sat Aug 8 10:31:27 2020 +0800 perf ftrace: Add option '-m/--buffer-size' to set per-cpu buffer size This adds an option '-m/--buffer-size' to allow us set the size of per-cpu tracing buffer. Committer testing: Before running with this option: # find /sys/kernel/tracing/ -name buffer_size_kb | xargs cat 1408 1408 1408 1408 1408 1408 1408 1408 1408 # Then, run: # perf ftrace -m 2048K | head -10 2) | mutex_unlock() { 2) ==========> | 2) | smp_irq_work_interrupt() { 2) | irq_enter() { 2) 0.121 us | rcu_irq_enter(); 2) 0.128 us | irqtime_account_irq(); 2) 0.719 us | } 2) | __wake_up() { 2) | __wake_up_common_lock() { 2) 0.105 us | _raw_spin_lock_irqsave(); # Now look at those tracefs knobs: # find /sys/kernel/tracing/ -name buffer_size_kb | xargs cat 2048 2048 2048 2048 2048 2048 2048 2048 2048 # This should be similar to the -m option in the other perf tools, such as 'perf record', 'perf trace', etc. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-5-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 68faab0f934d83d374b3d696d861d8502641fa19 Author: Changbin Du Date: Sat Aug 8 10:31:26 2020 +0800 perf ftrace: Factor out function write_tracing_file_int() We will reuse this function later. Signed-off-by: Changbin Du Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-4-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit d6d81bfe429ee7e3e59388d16741b354a2484f0f Author: Changbin Du Date: Sat Aug 8 10:31:25 2020 +0800 perf ftrace: Add option '-F/--funcs' to list available functions This adds an option '-F/--funcs' to list all available functions to trace, which is read from tracing file 'available_filter_functions'. $ sudo ./perf ftrace -F | head trace_initcall_finish_cb initcall_blacklisted do_one_initcall do_one_initcall trace_initcall_start_cb run_init_process try_to_run_init_process match_dev_by_label match_dev_by_uuid rootfs_init_fs_context $ Committer notes: This is the same command line option and for the same purpose as in 'perf probe'. Signed-off-by: Changbin Du Tested-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-3-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit eb6d31ae22d7767789e3c079444157ea40114884 Author: Changbin Du Date: Sat Aug 8 10:31:24 2020 +0800 perf ftrace: Select function/function_graph tracer automatically The '-g/-G' options have already implied function_graph tracer should be used instead of function tracer. So we don't need extra option '--tracer' in this case. This patch changes the behavior as below: - If '-g' or '-G' option is on, then function_graph tracer is used. - If '-T' or '-N' option is on, then function tracer is used. - The function_graph has priority over function tracer. - The option '--tracer' only take effect if neither -g/-G nor -T/-N is specified. Here are some examples. This will start tracing all functions using default tracer: $ sudo perf ftrace This will trace all functions using function graph tracer: $ sudo perf ftrace -G '*' This will trace function vfs_read using function graph tracer: $ sudo perf ftrace -G vfs_read This will trace function vfs_read using function tracer: $ sudo perf ftrace -T vfs_read Committer notes: Using '-h -G' will tell what that option is about, so to further clarify the above examples: # perf ftrace -h -G -G, --graph-funcs Set graph filter on given functions # perf ftrace -h -g -g, --nograph-funcs Set nograph filter on given functions # perf ftrace -h -T -T, --trace-funcs trace given functions only # perf ftrace -h -N -N, --notrace-funcs do not trace given functions # Signed-off-by: Changbin Du Tested-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Link: http://lore.kernel.org/lkml/20200808023141.14227-2-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit e052d0540298bfe0f6cbbecdc7e2ea9b859575b2 Author: Oleksij Rempel Date: Fri Aug 7 12:52:00 2020 +0200 can: j1939: transport: j1939_xtp_rx_dat_one(): compare own packets to detect corruptions Since the stack relays on receiving own packets, it was overwriting own transmit buffer from received packets. At least theoretically, the received echo buffer can be corrupt or changed and the session partner can request to resend previous data. In this case we will re-send bad data. With this patch we will stop to overwrite own TX buffer and use it for sanity checking. Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20200807105200.26441-6-o.rempel@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 840835c9281215341d84966a8855f267a971e6a3 Author: Oleksij Rempel Date: Fri Aug 7 12:51:59 2020 +0200 can: j1939: transport: add j1939_session_skb_find_by_offset() function Sometimes it makes no sense to search the skb by pkt.dpo, since we need next the skb within the transaction block. This may happen if we have an ETP session with CTS set to less than 255 packets. After this patch, we will be able to work with ETP sessions where the block size (ETP.CM_CTS byte 2) is less than 255 packets. Reported-by: Henrique Figueira Reported-by: https://github.com/linux-can/can-utils/issues/228 Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20200807105200.26441-5-o.rempel@pengutronix.de Signed-off-by: Marc Kleine-Budde commit af804b7826350d5af728dca4715e473338fbd7e5 Author: Oleksij Rempel Date: Fri Aug 7 12:51:58 2020 +0200 can: j1939: socket: j1939_sk_bind(): make sure ml_priv is allocated This patch adds check to ensure that the struct net_device::ml_priv is allocated, as it is used later by the j1939 stack. The allocation is done by all mainline CAN network drivers, but when using bond or team devices this is not the case. Bail out if no ml_priv is allocated. Reported-by: syzbot+f03d384f3455d28833eb@syzkaller.appspotmail.com Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Cc: linux-stable # >= v5.4 Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20200807105200.26441-4-o.rempel@pengutronix.de Signed-off-by: Marc Kleine-Budde commit cd3b3636c99fcac52c598b64061f3fe4413c6a12 Author: Oleksij Rempel Date: Fri Aug 7 12:51:57 2020 +0200 can: j1939: transport: j1939_session_tx_dat(): fix use-after-free read in j1939_tp_txtimer() The current stack implementation do not support ECTS requests of not aligned TP sized blocks. If ECTS will request a block with size and offset spanning two TP blocks, this will cause memcpy() to read beyond the queued skb (which does only contain one TP sized block). Sometimes KASAN will detect this read if the memory region beyond the skb was previously allocated and freed. In other situations it will stay undetected. The ETP transfer in any case will be corrupted. This patch adds a sanity check to avoid this kind of read and abort the session with error J1939_XTP_ABORT_ECTS_TOO_BIG. Reported-by: syzbot+5322482fe520b02aea30@syzkaller.appspotmail.com Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Cc: linux-stable # >= v5.4 Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20200807105200.26441-3-o.rempel@pengutronix.de Signed-off-by: Marc Kleine-Budde commit b43e3a82bc432c1caaed8950e7662c143470c54c Author: Oleksij Rempel Date: Fri Aug 7 12:51:56 2020 +0200 can: j1939: transport: j1939_simple_recv(): ignore local J1939 messages send not by J1939 stack In current J1939 stack implementation, we process all locally send messages as own messages. Even if it was send by CAN_RAW socket. To reproduce it use following commands: testj1939 -P -r can0:0x80 & cansend can0 18238040#0123 This step will trigger false positive not critical warning: j1939_simple_recv: Received already invalidated message With this patch we add additional check to make sure, related skb is own echo message. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Oleksij Rempel Link: https://lore.kernel.org/r/20200807105200.26441-2-o.rempel@pengutronix.de Signed-off-by: Marc Kleine-Budde commit cc172ff301d8079e941a6eb31758951a6d764084 Author: Libing Zhou Date: Fri Aug 14 11:02:36 2020 +0800 sched/debug: Fix the alignment of the show-state debug output Current sysrq(t) output task fields name are not aligned with actual task fields value, e.g.: kernel: sysrq: Show State kernel: task PC stack pid father kernel: systemd S12456 1 0 0x00000000 kernel: Call Trace: kernel: ? __schedule+0x240/0x740 To make it more readable, print fields name together with task fields value in the same line, with fixed width: kernel: sysrq: Show State kernel: task:systemd state:S stack:12920 pid: 1 ppid: 0 flags:0x00000000 kernel: Call Trace: kernel: __schedule+0x282/0x620 Signed-off-by: Libing Zhou Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200814030236.37835-1-libing.zhou@nokia-sbell.com commit bcfd218b66790243ef303c1b35ce59f786ded225 Author: Zhang Rui Date: Tue Aug 11 23:31:49 2020 +0800 perf/x86/rapl: Add support for Intel SPR platform Intel SPR platform uses fixed 16 bit energy unit for DRAM RAPL domain, and fixed 0 bit energy unit for Psys RAPL domain. After this, on SPR platform the energy counters appear in perf list. Signed-off-by: Zhang Rui Signed-off-by: Ingo Molnar Reviewed-by: Kan Liang Acked-by: Len Brown Link: https://lore.kernel.org/r/20200811153149.12242-4-rui.zhang@intel.com commit 74f41adab0f4a61857833e1b6fa8e9ad12c251b6 Author: Zhang Rui Date: Tue Aug 11 23:31:48 2020 +0800 perf/x86/rapl: Support multiple RAPL unit quirks There will be more platforms with different fixed energy units. Enhance the code to support different RAPL unit quirks for different platforms. Signed-off-by: Zhang Rui Signed-off-by: Ingo Molnar Reviewed-by: Kan Liang Reviewed-by: Len Brown Link: https://lore.kernel.org/r/20200811153149.12242-3-rui.zhang@intel.com commit 4bb5fcb97a5df0bbc0a27e0252b1e7ce140a8431 Author: Zhang Rui Date: Tue Aug 11 23:31:47 2020 +0800 perf/x86/rapl: Fix missing psys sysfs attributes This fixes a problem introduced by commit: 5fb5273a905c ("perf/x86/rapl: Use new MSR detection interface") that perf event sysfs attributes for psys RAPL domain are missing. Fixes: 5fb5273a905c ("perf/x86/rapl: Use new MSR detection interface") Signed-off-by: Zhang Rui Signed-off-by: Ingo Molnar Reviewed-by: Kan Liang Reviewed-by: Len Brown Acked-by: Jiri Olsa Link: https://lore.kernel.org/r/20200811153149.12242-2-rui.zhang@intel.com commit 38ba8b9241f5848a49b80fddac9ab5f4692e434e Author: Eric Dumazet Date: Thu Aug 13 09:18:34 2020 -0700 can: j1939: fix kernel-infoleak in j1939_sk_sock2sockaddr_can() syzbot found that at least 2 bytes of kernel information were leaked during getsockname() on AF_CAN CAN_J1939 socket. Since struct sockaddr_can has in fact two holes, simply clear the whole area before filling it with useful data. BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0x81/0x90 mm/kmsan/kmsan_hooks.c:253 CPU: 0 PID: 8466 Comm: syz-executor511 Not tainted 5.8.0-rc5-syzkaller #0 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+0x21c/0x280 lib/dump_stack.c:118 kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121 kmsan_internal_check_memory+0x238/0x3d0 mm/kmsan/kmsan.c:423 kmsan_copy_to_user+0x81/0x90 mm/kmsan/kmsan_hooks.c:253 instrument_copy_to_user include/linux/instrumented.h:91 [inline] _copy_to_user+0x18e/0x260 lib/usercopy.c:39 copy_to_user include/linux/uaccess.h:186 [inline] move_addr_to_user+0x3de/0x670 net/socket.c:237 __sys_getsockname+0x407/0x5e0 net/socket.c:1909 __do_sys_getsockname net/socket.c:1920 [inline] __se_sys_getsockname+0x91/0xb0 net/socket.c:1917 __x64_sys_getsockname+0x4a/0x70 net/socket.c:1917 do_syscall_64+0xad/0x160 arch/x86/entry/common.c:386 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x440219 Code: Bad RIP value. RSP: 002b:00007ffe5ee150c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000033 RAX: ffffffffffffffda RBX: 00000000004002c8 RCX: 0000000000440219 RDX: 0000000020000240 RSI: 0000000020000100 RDI: 0000000000000003 RBP: 00000000006ca018 R08: 0000000000000000 R09: 00000000004002c8 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401a20 R13: 0000000000401ab0 R14: 0000000000000000 R15: 0000000000000000 Local variable ----address@__sys_getsockname created at: __sys_getsockname+0x91/0x5e0 net/socket.c:1894 __sys_getsockname+0x91/0x5e0 net/socket.c:1894 Bytes 2-3 of 24 are uninitialized Memory access of size 24 starts at ffff8880ba2c7de8 Data copied to user address 0000000020000100 Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Robin van der Gracht Cc: Oleksij Rempel Cc: Pengutronix Kernel Team Cc: linux-can@vger.kernel.org Acked-by: Oleksij Rempel Link: https://lore.kernel.org/r/20200813161834.4021638-1-edumazet@google.com Signed-off-by: Marc Kleine-Budde commit 5c04da55c754c44937b3d19c6522f9023fd5c5d5 Author: Florian Westphal Date: Thu Aug 13 09:46:11 2020 +0200 netfilter: ebtables: reject bogus getopt len value syzkaller reports splat: ------------[ cut here ]------------ Buffer overflow detected (80 < 137)! Call Trace: do_ebt_get_ctl+0x2b4/0x790 net/bridge/netfilter/ebtables.c:2317 nf_getsockopt+0x72/0xd0 net/netfilter/nf_sockopt.c:116 ip_getsockopt net/ipv4/ip_sockglue.c:1778 [inline] caused by a copy-to-user with a too-large "*len" value. This adds a argument check on *len just like in the non-compat version of the handler. Before the "Fixes" commit, the reproducer fails with -EINVAL as expected: 1. core calls the "compat" getsockopt version 2. compat getsockopt version detects the *len value is possibly in 64-bit layout (*len != compat_len) 3. compat getsockopt version delegates everything to native getsockopt version 4. native getsockopt rejects invalid *len -> compat handler only sees len == sizeof(compat_struct) for GET_ENTRIES. After the refactor, event sequence is: 1. getsockopt calls "compat" version (len != native_len) 2. compat version attempts to copy *len bytes, where *len is random value from userspace Fixes: fc66de8e16ec ("netfilter/ebtables: clean up compat {get, set}sockopt handling") Reported-by: syzbot+5accb5c62faa1d346480@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Reviewed-by: Christoph Hellwig Signed-off-by: Pablo Neira Ayuso commit f70fff83cda63bbf596f99edc131b9daaba07458 Author: Mike Pozulp Date: Thu Aug 13 21:53:44 2020 -0700 ALSA: hda/realtek: Add quirk for Samsung Galaxy Flex Book The Flex Book uses the same ALC298 codec as other Samsung laptops which have the no headphone sound bug, like my Samsung Notebook. The Flex Book owner used Early Patching to confirm that this quirk fixes the bug. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207423 Signed-off-by: Mike Pozulp Cc: Link: https://lore.kernel.org/r/20200814045346.645367-1-pozulp.kernel@gmail.com Signed-off-by: Takashi Iwai commit d4bbe8a1b55aeaadfa0fa982b468eaec9b799f1a Author: Masahiro Yamada Date: Fri Aug 7 18:19:09 2020 +0900 kconfig: qconf: move setOptionMode() to ConfigList from ConfigView ConfigView::setOptionMode() only gets access to the 'list' member. Move it to the more relevant ConfigList class. Signed-off-by: Masahiro Yamada commit fa8de0a3bf3c02e6f00b7746e7e934db522cdda9 Author: Masahiro Yamada Date: Fri Aug 7 18:19:08 2020 +0900 kconfig: qconf: do not limit the pop-up menu to the first row If you right-click the first row in the option tree, the pop-up menu shows up, but if you right-click the second row or below, the event is ignored due to the following check: if (e->y() <= header()->geometry().bottom()) { Perhaps, the intention was to show the pop-menu only when the tree header was right-clicked, but this handler is not called in that case. Since the origin of e->y() starts from the bottom of the header, this check is odd. Going forward, you can right-click anywhere in the tree to get the pop-up menu. Signed-off-by: Masahiro Yamada commit 5cb255ffa1e7337669616188e1b2f4bd48305d34 Author: Masahiro Yamada Date: Fri Aug 7 18:19:07 2020 +0900 kconfig: qconf: refactor icon setups These icon data are used by ConfigItem, but stored in each instance of ConfigView. There is no point to keep the same data in each of 3 instances, "menu", "config", and "search". Move the icon data to the more relevant ConfigItem class, and make them static members. Signed-off-by: Masahiro Yamada commit 4fa91f528f344a86cdef23b17d611b479421b2c8 Author: Masahiro Yamada Date: Fri Aug 7 18:19:06 2020 +0900 kconfig: qconf: remove unused voidPix, menuInvPix These are initialized, but not used by anyone. Signed-off-by: Masahiro Yamada commit 5ca534cdf97a6ef760b94a658cafc1e40c6e3e29 Author: Masahiro Yamada Date: Fri Aug 7 18:19:05 2020 +0900 kconfig: qconf: remove ConfigItem::text/setText Use QTreeWidgetItem::text/setText directly Signed-off-by: Masahiro Yamada commit abf741a9fa4f9cee63f6c7bebc36bee44c6a8801 Author: Masahiro Yamada Date: Fri Aug 7 18:19:04 2020 +0900 kconfig: qconf: remove ConfigList::addColumn/removeColumn Use QTreeView::showColumn/hideColumn directly. Signed-off-by: Masahiro Yamada commit 711b875bcdbcd198cafbcf0bd87562f9c3725278 Author: Masahiro Yamada Date: Fri Aug 7 18:19:03 2020 +0900 kconfig: qconf: remove ConfigItem::pixmap/setPixmap Use QTreeWidgetItem::icon/setIcon directly. Signed-off-by: Masahiro Yamada commit 3c73ff040ed54b7bda754f4b016d7de31cb85207 Author: Masahiro Yamada Date: Fri Aug 7 18:19:02 2020 +0900 kconfig: qconf: drop more localization code This is a remnant of commit 694c49a7c01c ("kconfig: drop localization support"). Get it back to the code prior to commit 3b9fa0931dd8 ("[PATCH] Kconfig i18n support"). Signed-off-by: Masahiro Yamada commit 5b75a6c896bc858cd36eb7be5fbc23318cf4205c Author: Masahiro Yamada Date: Fri Aug 7 18:19:01 2020 +0900 kconfig: qconf: remove 'parent' from ConfigList::updateMenuList() All the call-sites of this function pass 'this' to the first argument. So, 'parent' is always the 'this' pointer. Signed-off-by: Masahiro Yamada commit 1031685c5ec86cc84ccaea5825566c4ed08c66b7 Author: Masahiro Yamada Date: Fri Aug 7 18:19:00 2020 +0900 kconfig: qconf: remove unused argument from ConfigView::updateList() Now that ConfigList::updateList() takes no argument, the 'item' argument ConfigView::updateList() is no longer used. Signed-off-by: Masahiro Yamada commit cb77043f061a9ec7824784d18a0c484fbfe97059 Author: Masahiro Yamada Date: Fri Aug 7 18:18:59 2020 +0900 kconfig: qconf: remove unused argument from ConfigList::updateList() This function allocates 'item' before using it, so the argument 'item' is always shadowed. Remove the meaningless argument. Signed-off-by: Masahiro Yamada commit 92641154bf6f138c37bae31cf735359f703749cc Author: Masahiro Yamada Date: Fri Aug 7 18:18:58 2020 +0900 kconfig: qconf: omit parent to QHBoxLayout() Instead of passing 0 (i.e. nullptr), leave it empty. Signed-off-by: Masahiro Yamada commit 740fdef8534f17184f0d57390be83a8a37e897f9 Author: Masahiro Yamada Date: Fri Aug 7 18:18:57 2020 +0900 kconfig: qconf: remove name from ConfigSearchWindow constructor This constructor is only called with "search" as the second argument. Hard-code the name in the constructor, and drop it from the function argument. Signed-off-by: Masahiro Yamada commit 1b4263e7507f5b9fd2f1f675f712f95c1394a18f Author: Masahiro Yamada Date: Fri Aug 7 18:18:56 2020 +0900 kconfig: qconf: remove unused ConfigList::listView() I do not know how this function can be useful. In fact, it is unsed. Signed-off-by: Masahiro Yamada commit 860ec3fbcaeba7582f3b65e2f2e805187bc78015 Author: Masahiro Yamada Date: Fri Aug 7 18:18:55 2020 +0900 kconfig: qconf: overload addToolBar() to create and insert toolbar Use the overloaded function, addToolBar(const QString &title) to create a QToolBar object, setting its window title, and inserts it into the toolbar area. Signed-off-by: Masahiro Yamada commit 2afb3e26828a2f97e98537f86d3b747a28847ddd Author: Masahiro Yamada Date: Fri Aug 7 18:18:54 2020 +0900 kconfig: qconf: remove toolBar from ConfigMainWindow members This pointer is only used in the ConfigMainWindow constructor. Drop it from the private members. Signed-off-by: Masahiro Yamada commit 93ebaacdc59bebbe99c79b69f16bfe5408d30f23 Author: Masahiro Yamada Date: Fri Aug 7 18:18:53 2020 +0900 kconfig: qconf: use 'menu' variable for (QMenu *) The variable 'config' for the file menu is inconsistent. You do not need to use different variables. Use 'menu' for every menu. Signed-off-by: Masahiro Yamada commit d4b1cea7de0c7472c6f3eb1740fc53af6ee9ded5 Author: Masahiro Yamada Date: Fri Aug 7 18:18:52 2020 +0900 kconfig: qconf: do not use 'menu' variable for (QMenuBar *) I think it is a bit confusing to use 'menu' to hold a QMenuBar pointer. I want to use 'menu' for a QMenu pointer. You do not need to use a local variable here. Use menuBar() directly. Signed-off-by: Masahiro Yamada commit 614bf0a89ae215beafe15d827a9cd983277a9b90 Author: Masahiro Yamada Date: Fri Aug 7 18:18:51 2020 +0900 kconfig: qconf: remove ->addSeparator() to menuBar I do not understand the purpose of this ->addSeparator(). It does not make any difference. Signed-off-by: Masahiro Yamada commit d41809ff7af91b3f8ed4abe1cb36e69723af00d8 Author: Masahiro Yamada Date: Wed Jul 29 12:18:37 2020 +0900 kconfig: add 'static' to some file-local data Fix some warnings from sparce like follows: warning: symbol '...' was not declared. Should it be static? Signed-off-by: Masahiro Yamada commit 7eb7c106f1538e29b5bab588b072faa7ce65fe7b Author: Maxime Chretien Date: Wed Jul 8 15:32:15 2020 +0200 kconfig: qconf: Fix mouse events in search view On menu properties mouse events didn't do anything in search view (listMode). As there are no menus in listMode we can add an exception in tests to always change the value on mouse events if we are in listMode. Signed-off-by: Maxime Chretien Signed-off-by: Masahiro Yamada commit 8410e6559412c95484b6e6d28c76cea57f753821 Author: Masahiro Yamada Date: Sat Jul 18 15:38:47 2020 +0900 kconfig: constify XPM data Constify arrays as well as strings. Signed-off-by: Masahiro Yamada commit 22a4ac026c15eba961883ed8466cb341e0447de1 Author: Masahiro Yamada Date: Wed Jun 17 12:02:20 2020 +0900 Revert "checkpatch: kconfig: prefer 'help' over '---help---'" This reverts commit 84af7a6194e493fae312a2b7fa5a3b51f76d9282. The conversion is done. Cc: Ulf Magnusson Signed-off-by: Masahiro Yamada commit f70f74d15ca80d73eca6d5a731257627fb6370c5 Author: Masahiro Yamada Date: Wed Jun 17 12:02:19 2020 +0900 kconfig: remove '---help---' support The conversion is done. No more user of '---help---'. Cc: Ulf Magnusson Signed-off-by: Masahiro Yamada commit a1d21081a60dfb7fddf4a38b66d9cef603b317a9 Merge: e764a1e32337a 1f3a090b9033f Author: Linus Torvalds Date: Thu Aug 13 20:03:11 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from David Miller: "Some merge window fallout, some longer term fixes: 1) Handle headroom properly in lapbether and x25_asy drivers, from Xie He. 2) Fetch MAC address from correct r8152 device node, from Thierry Reding. 3) In the sw kTLS path we should allow MSG_CMSG_COMPAT in sendmsg, from Rouven Czerwinski. 4) Correct fdputs in socket layer, from Miaohe Lin. 5) Revert troublesome sockptr_t optimization, from Christoph Hellwig. 6) Fix TCP TFO key reading on big endian, from Jason Baron. 7) Missing CAP_NET_RAW check in nfc, from Qingyu Li. 8) Fix inet fastreuse optimization with tproxy sockets, from Tim Froidcoeur. 9) Fix 64-bit divide in new SFC driver, from Edward Cree. 10) Add a tracepoint for prandom_u32 so that we can more easily perform usage analysis. From Eric Dumazet. 11) Fix rwlock imbalance in AF_PACKET, from John Ogness" * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (49 commits) net: openvswitch: introduce common code for flushing flows af_packet: TPACKET_V3: fix fill status rwlock imbalance random32: add a tracepoint for prandom_u32() Revert "ipv4: tunnel: fix compilation on ARCH=um" net: accept an empty mask in /sys/class/net/*/queues/rx-*/rps_cpus net: ethernet: stmmac: Disable hardware multicast filter net: stmmac: dwmac1000: provide multicast filter fallback ipv4: tunnel: fix compilation on ARCH=um vsock: fix potential null pointer dereference in vsock_poll() sfc: fix ef100 design-param checking net: initialize fastreuse on inet_inherit_port net: refactor bind_bucket fastreuse into helper net: phy: marvell10g: fix null pointer dereference net: Fix potential memory leak in proto_register() net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init ionic_lif: Use devm_kcalloc() in ionic_qcq_alloc() net/nfc/rawsock.c: add CAP_NET_RAW check. hinic: fix strncpy output truncated compile warnings drivers/net/wan/x25_asy: Added needed_headroom and a skb->len check net/tls: Fix kmap usage ... commit e764a1e32337aaf325fc5b14a5bbd06eabba4699 Merge: dddcbc139e96b b1eef236f50ba Author: Linus Torvalds Date: Thu Aug 13 18:41:00 2020 -0700 Merge branch 'i2c/for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: - bus recovery can now be given a pinctrl handle and the I2C core will do all the steps to switch to/from GPIO which can save quite some boilerplate code from drivers - "fallthrough" conversion - driver updates, mostly ID additions * 'i2c/for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (32 commits) i2c: iproc: fix race between client unreg and isr i2c: eg20t: use generic power management i2c: eg20t: Drop PCI wakeup calls from .suspend/.resume i2c: mediatek: Fix i2c_spec_values description i2c: mediatek: Add i2c compatible for MediaTek MT8192 dt-bindings: i2c: update bindings for MT8192 SoC i2c: mediatek: Add access to more than 8GB dram in i2c driver i2c: mediatek: Add apdma sync in i2c driver i2c: i801: Add support for Intel Tiger Lake PCH-H i2c: i801: Add support for Intel Emmitsburg PCH i2c: bcm2835: Replace HTTP links with HTTPS ones Documentation: i2c: dev: 'block process call' is supported i2c: at91: Move to generic GPIO bus recovery i2c: core: treat EPROBE_DEFER when acquiring SCL/SDA GPIOs i2c: core: add generic I2C GPIO recovery dt-bindings: i2c: add generic properties for GPIO bus recovery i2c: rcar: avoid race when unregistering slave i2c: tegra: Avoid tegra_i2c_init_dma() for Tegra210 vi i2c i2c: tegra: Fix runtime resume to re-init VI I2C i2c: tegra: Fix the error path in tegra_i2c_runtime_resume ... commit c8c412f976124d85b8ded85c6ac3f760c12b63a3 Author: Steve French Date: Thu Aug 13 12:38:08 2020 -0500 SMB3: Fix mkdir when idsfromsid configured on mount mkdir uses a compounded create operation which was not setting the security descriptor on create of a directory. Fix so mkdir now sets the mode and owner info properly when idsfromsid and modefromsid are configured on the mount. Signed-off-by: Steve French CC: Stable # v5.8 Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Pavel Shilovsky commit 4fccd2ff74fbad222c69c7604307e0773a37ab8d Author: Andrii Nakryiko Date: Thu Aug 13 13:49:45 2020 -0700 selftests/bpf: Make test_varlen work with 32-bit user-space arch Despite bpftool generating data section memory layout that will work for 32-bit architectures on user-space side, BPF programs should be careful to not use ambiguous types like `long`, which have different size in 32-bit and 64-bit environments. Fix that in test by using __u64 explicitly, which is a recommended approach anyway. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200813204945.1020225-10-andriin@fb.com commit 0f993845d723c87656552837b412994d6086f086 Author: Andrii Nakryiko Date: Thu Aug 13 13:49:44 2020 -0700 tools/bpftool: Generate data section struct with conservative alignment The comment in the code describes this in good details. Generate such a memory layout that would work both on 32-bit and 64-bit architectures for user-space. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200813204945.1020225-9-andriin@fb.com commit 5705d705832f74395c5465ce93192688f543006a Author: Andrii Nakryiko Date: Thu Aug 13 13:49:43 2020 -0700 selftests/bpf: Correct various core_reloc 64-bit assumptions Ensure that types are memory layout- and field alignment-compatible regardless of 32/64-bitness mix of libbpf and BPF architecture. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200813204945.1020225-8-andriin@fb.com commit 4c01925f583eaa7d9d003dc87a4b75b8140b4ff6 Author: Andrii Nakryiko Date: Thu Aug 13 13:49:42 2020 -0700 libbpf: Enforce 64-bitness of BTF for BPF object files BPF object files are always targeting 64-bit BPF target architecture, so enforce that at BTF level as well. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200813204945.1020225-7-andriin@fb.com commit eed7818adf03e874994b966aa33bc00204dd275a Author: Andrii Nakryiko Date: Thu Aug 13 13:49:41 2020 -0700 selftests/bpf: Fix btf_dump test cases on 32-bit arches Fix btf_dump test cases by hard-coding BPF's pointer size of 8 bytes for cases where it's impossible to deterimne the pointer size (no long type in BTF). In cases where it's known, validate libbpf correctly determines it as 8. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200813204945.1020225-6-andriin@fb.com commit 44ad23dfbccbcd26d6ca504eba1ac55755864969 Author: Andrii Nakryiko Date: Thu Aug 13 13:49:40 2020 -0700 libbpf: Handle BTF pointer sizes more carefully With libbpf and BTF it is pretty common to have libbpf built for one architecture, while BTF information was generated for a different architecture (typically, but not always, BPF). In such case, the size of a pointer might differ betweem architectures. libbpf previously was always making an assumption that pointer size for BTF is the same as native architecture pointer size, but that breaks for cases where libbpf is built as 32-bit library, while BTF is for 64-bit architecture. To solve this, add heuristic to determine pointer size by searching for `long` or `unsigned long` integer type and using its size as a pointer size. Also, allow to override the pointer size with a new API btf__set_pointer_size(), for cases where application knows which pointer size should be used. User application can check what libbpf "guessed" by looking at the result of btf__pointer_size(). If it's not 0, then libbpf successfully determined a pointer size, otherwise native arch pointer size will be used. For cases where BTF is parsed from ELF file, use ELF's class (32-bit or 64-bit) to determine pointer size. Fixes: 8a138aed4a80 ("bpf: btf: Add BTF support to libbpf") Fixes: 351131b51c7a ("libbpf: add btf_dump API for BTF-to-C conversion") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200813204945.1020225-5-andriin@fb.com commit 15728ad3e71c120278105f20fa65b3735e715e0f Author: Andrii Nakryiko Date: Thu Aug 13 13:49:39 2020 -0700 libbpf: Fix BTF-defined map-in-map initialization on 32-bit host arches Libbpf built in 32-bit mode should be careful about not conflating 64-bit BPF pointers in BPF ELF file and host architecture pointers. This patch fixes issue of incorrect initializating of map-in-map inner map slots due to such difference. Fixes: 646f02ffdd49 ("libbpf: Add BTF-defined map-in-map support") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200813204945.1020225-4-andriin@fb.com commit 9028bbcc3e12510cac13a9554f1a1e39667a4387 Author: Andrii Nakryiko Date: Thu Aug 13 13:49:38 2020 -0700 selftest/bpf: Fix compilation warnings in 32-bit mode Fix compilation warnings emitted when compiling selftests for 32-bit platform (x86 in my case). Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200813204945.1020225-3-andriin@fb.com commit 09f44b753a7d120becc80213c3459183c8acd26b Author: Andrii Nakryiko Date: Thu Aug 13 13:49:37 2020 -0700 tools/bpftool: Fix compilation warnings in 32-bit mode Fix few compilation warnings in bpftool when compiling in 32-bit mode. Abstract away u64 to pointer conversion into a helper function. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200813204945.1020225-2-andriin@fb.com commit 227c0c9673d86732995474d277f84e08ee763e46 Author: Jens Axboe Date: Thu Aug 13 11:51:40 2020 -0600 io_uring: internally retry short reads We've had a few application cases of not handling short reads properly, and it is understandable as short reads aren't really expected if the application isn't doing non-blocking IO. Now that we retain the iov_iter over retries, we can implement internal retry pretty trivially. This ensures that we don't return a short read, even for buffered reads on page cache conflicts. Cleanup the deep nesting and hard to read nature of io_read() as well, it's much more straight forward now to read and understand. Added a few comments explaining the logic as well. Signed-off-by: Jens Axboe commit 1f3a090b9033f69de380c03db3ea1a1015c850cf Author: Tonghao Zhang Date: Wed Aug 12 17:56:39 2020 +0800 net: openvswitch: introduce common code for flushing flows To avoid some issues, for example RCU usage warning and double free, we should flush the flows under ovs_lock. This patch refactors table_instance_destroy and introduces table_instance_flow_flush which can be invoked by __dp_destroy or ovs_flow_tbl_flush. Fixes: 50b0e61b32ee ("net: openvswitch: fix possible memleak on destroy flow-table") Reported-by: Johan Knöös Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2020-August/050489.html Signed-off-by: Tonghao Zhang Reviewed-by: Cong Wang Signed-off-by: David S. Miller commit 88fd1cb80daa20af063bce81e1fad14e945a8dc4 Author: John Ogness Date: Thu Aug 13 21:45:25 2020 +0206 af_packet: TPACKET_V3: fix fill status rwlock imbalance After @blk_fill_in_prog_lock is acquired there is an early out vnet situation that can occur. In that case, the rwlock needs to be released. Also, since @blk_fill_in_prog_lock is only acquired when @tp_version is exactly TPACKET_V3, only release it on that exact condition as well. And finally, add sparse annotation so that it is clearer that prb_fill_curr_block() and prb_clear_blk_fill_status() are acquiring and releasing @blk_fill_in_prog_lock, respectively. sparse is still unable to understand the balance, but the warnings are now on a higher level that make more sense. Fixes: 632ca50f2cbd ("af_packet: TPACKET_V3: replace busy-wait loop") Signed-off-by: John Ogness Reported-by: kernel test robot Signed-off-by: David S. Miller commit 94c7eb54c4b8e81618ec79f414fe1ca5767f9720 Author: Eric Dumazet Date: Thu Aug 13 10:06:43 2020 -0700 random32: add a tracepoint for prandom_u32() There has been some heat around prandom_u32() lately, and some people were wondering if there was a simple way to determine how often it was used, before considering making it maybe 10 times more expensive. This tracepoint exports the generated pseudo random value. Tested: perf list | grep prandom_u32 random:prandom_u32 [Tracepoint event] perf record -a [-g] [-C1] -e random:prandom_u32 sleep 1 [ perf record: Woken up 0 times to write data ] [ perf record: Captured and wrote 259.748 MB perf.data (924087 samples) ] perf report --nochildren ... 97.67% ksoftirqd/1 [kernel.vmlinux] [k] prandom_u32 | ---prandom_u32 prandom_u32 | |--48.86%--tcp_v4_syn_recv_sock | tcp_check_req | tcp_v4_rcv | ... --48.81%--tcp_conn_request tcp_v4_conn_request tcp_rcv_state_process ... perf script Signed-off-by: Eric Dumazet Cc: Willy Tarreau Cc: Sedat Dilek Tested-by: Sedat Dilek Signed-off-by: David S. Miller commit dddcbc139e96bd18d8c65ef7b7e440f0d32457c2 Merge: 990f227371a40 1edcd4675e44d Author: Linus Torvalds Date: Thu Aug 13 13:57:45 2020 -0700 Merge tag 'docs-5.9-2' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A handful of obvious fixes that wandered in during the merge window" * tag 'docs-5.9-2' of git://git.lwn.net/linux: Documentation/locking/locktypes: fix the typo doc/zh_CN: resolve undefined label warning in admin-guide index doc/zh_CN: fix title heading markup in admin-guide cpu-load docs: remove the 2.6 "Upgrading I2C Drivers" guide docs: Correct the release date of 5.2 stable mailmap: Update comments for with format and more detalis docs: cdrom: Fix a typo and rst markup Doc: admin-guide: use correct legends in kernel-parameters.txt Documentation/features: refresh RISC-V arch support files documentation: coccinelle: Improve command example for make C={1,2} Core-api: Documentation: Replace deprecated :c:func: Usage Dev-tools: Documentation: Replace deprecated :c:func: Usage Filesystems: Documentation: Replace deprecated :c:func: Usage docs: trace: fix a typo commit ff6165b2d7f66fccb7095a60ccc7a80813858665 Author: Jens Axboe Date: Thu Aug 13 09:47:43 2020 -0600 io_uring: retain iov_iter state over io_read/io_write calls Instead of maintaining (and setting/remembering) iov_iter size and segment counts, just put the iov_iter in the async part of the IO structure. This is mostly a preparation patch for doing appropriate internal retries for short reads, but it also cleans up the state handling nicely and simplifies it quite a bit. Signed-off-by: Jens Axboe commit a62f68c172c3954a78c9dbf7e68496c3e9c22aaf Author: Joe Stringer Date: Thu Aug 13 11:08:07 2020 -0700 doc: Add link to bpf helpers man page The bpf-helpers(7) man pages provide an invaluable description of the functions that an eBPF program can call at runtime. Link them here. Signed-off-by: Joe Stringer Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200813180807.2821735-1-joe@wand.net.nz commit 1edcd4675e44dc0e6e3b34e8e29000d8a05f998c Author: Huang Shijie Date: Thu Aug 13 14:02:20 2020 +0800 Documentation/locking/locktypes: fix the typo We have three categories locks, not two. Signed-off-by: Huang Shijie Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200813060220.18199-1-sjhuang@iluvatar.ai Signed-off-by: Jonathan Corbet commit 9efa9e499799f939968aff1123cc7e8184960e48 Author: John Fastabend Date: Tue Aug 11 15:05:53 2020 -0700 bpf, selftests: Add tests to sock_ops for loading sk Add tests to directly accesse sock_ops sk field. Then use it to ensure a bad pointer access will fault if something goes wrong. We do three tests: The first test ensures when we read sock_ops sk pointer into the same register that we don't fault as described earlier. Here r9 is chosen as the temp register. The xlated code is, 36: (7b) *(u64 *)(r1 +32) = r9 37: (61) r9 = *(u32 *)(r1 +28) 38: (15) if r9 == 0x0 goto pc+3 39: (79) r9 = *(u64 *)(r1 +32) 40: (79) r1 = *(u64 *)(r1 +0) 41: (05) goto pc+1 42: (79) r9 = *(u64 *)(r1 +32) The second test ensures the temp register selection does not collide with in-use register r9. Shown here r8 is chosen because r9 is the sock_ops pointer. The xlated code is as follows, 46: (7b) *(u64 *)(r9 +32) = r8 47: (61) r8 = *(u32 *)(r9 +28) 48: (15) if r8 == 0x0 goto pc+3 49: (79) r8 = *(u64 *)(r9 +32) 50: (79) r9 = *(u64 *)(r9 +0) 51: (05) goto pc+1 52: (79) r8 = *(u64 *)(r9 +32) And finally, ensure we didn't break the base case where dst_reg does not equal the source register, 56: (61) r2 = *(u32 *)(r1 +28) 57: (15) if r2 == 0x0 goto pc+1 58: (79) r2 = *(u64 *)(r1 +0) Notice it takes us an extra four instructions when src reg is the same as dst reg. One to save the reg, two to restore depending on the branch taken and a goto to jump over the second restore. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/159718355325.4728.4163036953345999636.stgit@john-Precision-5820-Tower commit 8e0c1517565f06027b68caf2875620ddf6914eee Author: John Fastabend Date: Tue Aug 11 15:05:33 2020 -0700 bpf, selftests: Add tests for sock_ops load with r9, r8.r7 registers Loads in sock_ops case when using high registers requires extra logic to ensure the correct temporary value is used. We need to ensure the temp register does not use either the src_reg or dst_reg. Lets add an asm test to force the logic is triggered. The xlated code is here, 30: (7b) *(u64 *)(r9 +32) = r7 31: (61) r7 = *(u32 *)(r9 +28) 32: (15) if r7 == 0x0 goto pc+2 33: (79) r7 = *(u64 *)(r9 +0) 34: (63) *(u32 *)(r7 +916) = r8 35: (79) r7 = *(u64 *)(r9 +32) Notice r9 and r8 are not used for temp registers and r7 is chosen. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/159718353345.4728.8805043614257933227.stgit@john-Precision-5820-Tower commit 86ed4be68fdee23df4843a59f91c1ac7fc05e860 Author: John Fastabend Date: Tue Aug 11 15:05:14 2020 -0700 bpf, selftests: Add tests for ctx access in sock_ops with single register To verify fix ("bpf: sock_ops ctx access may stomp registers in corner case") we want to force compiler to generate the following code when accessing a field with BPF_TCP_SOCK_GET_COMMON, r1 = *(u32 *)(r1 + 96) // r1 is skops ptr Rather than depend on clang to do this we add the test with inline asm to the tcpbpf test. This saves us from having to create another runner and ensures that if we break this again test_tcpbpf will crash. With above code we get the xlated code, 11: (7b) *(u64 *)(r1 +32) = r9 12: (61) r9 = *(u32 *)(r1 +28) 13: (15) if r9 == 0x0 goto pc+4 14: (79) r9 = *(u64 *)(r1 +32) 15: (79) r1 = *(u64 *)(r1 +0) 16: (61) r1 = *(u32 *)(r1 +2348) 17: (05) goto pc+1 18: (79) r9 = *(u64 *)(r1 +32) We also add the normal case where src_reg != dst_reg so we can compare code generation easily from llvm-objdump and ensure that case continues to work correctly. The normal code is xlated to, 20: (b7) r1 = 0 21: (61) r1 = *(u32 *)(r3 +28) 22: (15) if r1 == 0x0 goto pc+2 23: (79) r1 = *(u64 *)(r3 +0) 24: (61) r1 = *(u32 *)(r1 +2348) Where the temp variable is not used. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/159718351457.4728.3295119261717842496.stgit@john-Precision-5820-Tower commit 84f44df664e9f0e261157e16ee1acd77cc1bb78d Author: John Fastabend Date: Tue Aug 11 15:04:56 2020 -0700 bpf: sock_ops sk access may stomp registers when dst_reg = src_reg Similar to patch ("bpf: sock_ops ctx access may stomp registers") if the src_reg = dst_reg when reading the sk field of a sock_ops struct we generate xlated code, 53: (61) r9 = *(u32 *)(r9 +28) 54: (15) if r9 == 0x0 goto pc+3 56: (79) r9 = *(u64 *)(r9 +0) This stomps on the r9 reg to do the sk_fullsock check and then when reading the skops->sk field instead of the sk pointer we get the sk_fullsock. To fix use similar pattern noted in the previous fix and use the temp field to save/restore a register used to do sk_fullsock check. After the fix the generated xlated code reads, 52: (7b) *(u64 *)(r9 +32) = r8 53: (61) r8 = *(u32 *)(r9 +28) 54: (15) if r9 == 0x0 goto pc+3 55: (79) r8 = *(u64 *)(r9 +32) 56: (79) r9 = *(u64 *)(r9 +0) 57: (05) goto pc+1 58: (79) r8 = *(u64 *)(r9 +32) Here r9 register was in-use so r8 is chosen as the temporary register. In line 52 r8 is saved in temp variable and at line 54 restored in case fullsock != 0. Finally we handle fullsock == 0 case by restoring at line 58. This adds a new macro SOCK_OPS_GET_SK it is almost possible to merge this with SOCK_OPS_GET_FIELD, but I found the extra branch logic a bit more confusing than just adding a new macro despite a bit of duplicating code. Fixes: 1314ef561102e ("bpf: export bpf_sock for BPF_PROG_TYPE_SOCK_OPS prog type") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/159718349653.4728.6559437186853473612.stgit@john-Precision-5820-Tower commit fd09af010788a884de1c39537c288830c3d305db Author: John Fastabend Date: Tue Aug 11 15:04:37 2020 -0700 bpf: sock_ops ctx access may stomp registers in corner case I had a sockmap program that after doing some refactoring started spewing this splat at me: [18610.807284] BUG: unable to handle kernel NULL pointer dereference at 0000000000000001 [...] [18610.807359] Call Trace: [18610.807370] ? 0xffffffffc114d0d5 [18610.807382] __cgroup_bpf_run_filter_sock_ops+0x7d/0xb0 [18610.807391] tcp_connect+0x895/0xd50 [18610.807400] tcp_v4_connect+0x465/0x4e0 [18610.807407] __inet_stream_connect+0xd6/0x3a0 [18610.807412] ? __inet_stream_connect+0x5/0x3a0 [18610.807417] inet_stream_connect+0x3b/0x60 [18610.807425] __sys_connect+0xed/0x120 After some debugging I was able to build this simple reproducer, __section("sockops/reproducer_bad") int bpf_reproducer_bad(struct bpf_sock_ops *skops) { volatile __maybe_unused __u32 i = skops->snd_ssthresh; return 0; } And along the way noticed that below program ran without splat, __section("sockops/reproducer_good") int bpf_reproducer_good(struct bpf_sock_ops *skops) { volatile __maybe_unused __u32 i = skops->snd_ssthresh; volatile __maybe_unused __u32 family; compiler_barrier(); family = skops->family; return 0; } So I decided to check out the code we generate for the above two programs and noticed each generates the BPF code you would expect, 0000000000000000 : ; volatile __maybe_unused __u32 i = skops->snd_ssthresh; 0: r1 = *(u32 *)(r1 + 96) 1: *(u32 *)(r10 - 4) = r1 ; return 0; 2: r0 = 0 3: exit 0000000000000000 : ; volatile __maybe_unused __u32 i = skops->snd_ssthresh; 0: r2 = *(u32 *)(r1 + 96) 1: *(u32 *)(r10 - 4) = r2 ; family = skops->family; 2: r1 = *(u32 *)(r1 + 20) 3: *(u32 *)(r10 - 8) = r1 ; return 0; 4: r0 = 0 5: exit So we get reasonable assembly, but still something was causing the null pointer dereference. So, we load the programs and dump the xlated version observing that line 0 above 'r* = *(u32 *)(r1 +96)' is going to be translated by the skops access helpers. int bpf_reproducer_bad(struct bpf_sock_ops * skops): ; volatile __maybe_unused __u32 i = skops->snd_ssthresh; 0: (61) r1 = *(u32 *)(r1 +28) 1: (15) if r1 == 0x0 goto pc+2 2: (79) r1 = *(u64 *)(r1 +0) 3: (61) r1 = *(u32 *)(r1 +2340) ; volatile __maybe_unused __u32 i = skops->snd_ssthresh; 4: (63) *(u32 *)(r10 -4) = r1 ; return 0; 5: (b7) r0 = 0 6: (95) exit int bpf_reproducer_good(struct bpf_sock_ops * skops): ; volatile __maybe_unused __u32 i = skops->snd_ssthresh; 0: (61) r2 = *(u32 *)(r1 +28) 1: (15) if r2 == 0x0 goto pc+2 2: (79) r2 = *(u64 *)(r1 +0) 3: (61) r2 = *(u32 *)(r2 +2340) ; volatile __maybe_unused __u32 i = skops->snd_ssthresh; 4: (63) *(u32 *)(r10 -4) = r2 ; family = skops->family; 5: (79) r1 = *(u64 *)(r1 +0) 6: (69) r1 = *(u16 *)(r1 +16) ; family = skops->family; 7: (63) *(u32 *)(r10 -8) = r1 ; return 0; 8: (b7) r0 = 0 9: (95) exit Then we look at lines 0 and 2 above. In the good case we do the zero check in r2 and then load 'r1 + 0' at line 2. Do a quick cross-check into the bpf_sock_ops check and we can confirm that is the 'struct sock *sk' pointer field. But, in the bad case, 0: (61) r1 = *(u32 *)(r1 +28) 1: (15) if r1 == 0x0 goto pc+2 2: (79) r1 = *(u64 *)(r1 +0) Oh no, we read 'r1 +28' into r1, this is skops->fullsock and then in line 2 we read the 'r1 +0' as a pointer. Now jumping back to our spat, [18610.807284] BUG: unable to handle kernel NULL pointer dereference at 0000000000000001 The 0x01 makes sense because that is exactly the fullsock value. And its not a valid dereference so we splat. To fix we need to guard the case when a program is doing a sock_ops field access with src_reg == dst_reg. This is already handled in the load case where the ctx_access handler uses a tmp register being careful to store the old value and restore it. To fix the get case test if src_reg == dst_reg and in this case do the is_fullsock test in the temporary register. Remembering to restore the temporary register before writing to either dst_reg or src_reg to avoid smashing the pointer into the struct holding the tmp variable. Adding this inline code to test_tcpbpf_kern will now be generated correctly from, 9: r2 = *(u32 *)(r2 + 96) to xlated code, 12: (7b) *(u64 *)(r2 +32) = r9 13: (61) r9 = *(u32 *)(r2 +28) 14: (15) if r9 == 0x0 goto pc+4 15: (79) r9 = *(u64 *)(r2 +32) 16: (79) r2 = *(u64 *)(r2 +0) 17: (61) r2 = *(u32 *)(r2 +2348) 18: (05) goto pc+1 19: (79) r9 = *(u64 *)(r2 +32) And in the normal case we keep the original code, because really this is an edge case. From this, 9: r2 = *(u32 *)(r6 + 96) to xlated code, 22: (61) r2 = *(u32 *)(r6 +28) 23: (15) if r2 == 0x0 goto pc+2 24: (79) r2 = *(u64 *)(r6 +0) 25: (61) r2 = *(u32 *)(r2 +2348) So three additional instructions if dst == src register, but I scanned my current code base and did not see this pattern anywhere so should not be a big deal. Further, it seems no one else has hit this or at least reported it so it must a fairly rare pattern. Fixes: 9b1f3d6e5af29 ("bpf: Refactor sock_ops_convert_ctx_access") Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/159718347772.4728.2781381670567919577.stgit@john-Precision-5820-Tower commit 23ab656be263813acc3c20623757d3cd1496d9e1 Author: Toke Høiland-Jørgensen Date: Thu Aug 13 16:29:05 2020 +0200 libbpf: Prevent overriding errno when logging errors Turns out there were a few more instances where libbpf didn't save the errno before writing an error message, causing errno to be overridden by the printf() return and the error disappearing if logging is enabled. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200813142905.160381-1-toke@redhat.com commit 990f227371a400c0fbcb98b75c91a7dbd65f6132 Merge: 23c2c8c6fa325 b450eeb0c973e Author: Linus Torvalds Date: Thu Aug 13 12:38:32 2020 -0700 Merge tag 's390-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Heiko Carstens: - Allow s390 debug feature to handle finally more than 256 CPU numbers, instead of truncating the most significant bits. - Improve THP splitting required by qemu processes by making use of walk_page_vma() instead of calling follow_page() for every single page within each vma. - Add missing ZCRYPT dependency to VFIO_AP to fix potential compile problems. - Remove not required select CLOCKSOURCE_VALIDATE_LAST_CYCLE again. - Set node distance to LOCAL_DISTANCE instead of 0, since e.g. libnuma translates a node distance of 0 to "no NUMA support available". - Couple of other minor fixes and improvements. * tag 's390-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/numa: move code to arch/s390/kernel s390/time: remove select CLOCKSOURCE_VALIDATE_LAST_CYCLE again s390/debug: debug feature version 3 s390/Kconfig: add missing ZCRYPT dependency to VFIO_AP s390/numa: set node distance to LOCAL_DISTANCE s390/pkey: remove redundant variable initialization s390/test_unwind: fix possible memleak in test_unwind() s390/gmap: improve THP splitting s390/atomic: circumvent gcc 10 build regression commit 23c2c8c6fa325939f95d840f54bfdec3cb76906c Merge: 69307ade14de7 c57dd1f2f6a7c Author: Linus Torvalds Date: Thu Aug 13 12:26:18 2020 -0700 Merge tag 'for-5.9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull more btrfs updates from David Sterba: "One minor update, the rest are fixes that have arrived a bit late for the first batch. There are also some recent fixes for bugs that were discovered during the merge window and pop up during testing. User visible change: - show correct subvolume path in /proc/mounts for bind mounts Fixes: - fix compression messages when remounting with different level or compression algorithm - tree-log: fix some memory leaks on error handling paths - restore I_VERSION on remount - fix return values and error code mixups - fix umount crash with quotas enabled when removing sysfs files - fix trim range on a shrunk device" * tag 'for-5.9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: trim: fix underflow in trim length to prevent access beyond device boundary btrfs: fix return value mixup in btrfs_get_extent btrfs: sysfs: fix NULL pointer dereference at btrfs_sysfs_del_qgroups() btrfs: check correct variable after allocation in btrfs_backref_iter_alloc btrfs: make sure SB_I_VERSION doesn't get unset by remount btrfs: fix memory leaks after failure to lookup checksums during inode logging btrfs: don't show full path of bind mounts in subvol= btrfs: fix messages after changing compression level by remount btrfs: only search for left_info if there is no right_info in try_merge_free_space btrfs: inode: fix NULL pointer dereference if inode doesn't need compression commit 69307ade14de7d9e9b14961ae7a6168e7165b6ab Merge: ff419b61fd66d 96cf2a2c75567 Author: Linus Torvalds Date: Thu Aug 13 12:22:19 2020 -0700 Merge tag 'xfs-5.9-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "Two small fixes that have come in during the past week: - Fix duplicated words in comments - Fix an ubsan complaint about null pointer arithmetic" * tag 'xfs-5.9-merge-8' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: Fix UBSAN null-ptr-deref in xfs_sysfs_init xfs: delete duplicated words + other fixes commit ff419b61fd66dab6ad223e044d1c3c54bb5cef6c Merge: 9f457179244a1 7018ec68f0824 Author: Linus Torvalds Date: Thu Aug 13 12:18:07 2020 -0700 Merge tag 'exfat-for-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat updates from Namjae Jeon: - don't clear MediaFailure and VolumeDirty bit in volume flags if these were already set before mounting - write multiple dirty buffers at once in sync mode - remove unneeded EXFAT_SB_DIRTY bit set * tag 'exfat-for-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: retain 'VolumeFlags' properly exfat: optimize exfat_zeroed_cluster() exfat: add error check when updating dir-entries exfat: write multiple sectors at once exfat: remove EXFAT_SB_DIRTY flag commit 9f457179244a1c0316546b1760f8993d0d718861 Author: Johannes Weiner Date: Thu Aug 13 10:40:54 2020 -0400 mm: memcontrol: fix warning when allocating the root cgroup Commit 3e38e0aaca9e ("mm: memcg: charge memcg percpu memory to the parent cgroup") adds memory tracking to the memcg kernel structures themselves to make cgroups liable for the memory they are consuming through the allocation of child groups (which can be significant). This code is a bit awkward as it's spread out through several functions: The outermost function does memalloc_use_memcg(parent) to set up current->active_memcg, which designates which cgroup to charge, and the inner functions pass GFP_ACCOUNT to request charging for specific allocations. To make sure this dependency is satisfied at all times - to make sure we don't randomly charge whoever is calling the functions - the inner functions warn on !current->active_memcg. However, this triggers a false warning when the root memcg itself is allocated. No parent exists in this case, and so current->active_memcg is rightfully NULL. It's a false positive, not indicative of a bug. Delete the warnings for now, we can revisit this later. Fixes: 3e38e0aaca9e ("mm: memcg: charge memcg percpu memory to the parent cgroup") Signed-off-by: Johannes Weiner Reported-by: Stephen Rothwell Acked-by: Roman Gushchin Cc: Andrew Morton Signed-off-by: Linus Torvalds commit 405fa8ac89e7aaa87282df659e525992f2639e76 Author: Miaohe Lin Date: Thu Aug 13 08:21:17 2020 -0400 futex: Convert to use the preferred 'fallthrough' macro Signed-off-by: Miaohe Lin Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200813122117.51173-1-linmiaohe@huawei.com commit cb75c95c5262328bd4da3dd334f6826a3a34a979 Author: Huang Shijie Date: Thu Aug 13 14:02:20 2020 +0800 Documentation/locking/locktypes: Fix a typo We have three categories locks, not two. Signed-off-by: Huang Shijie Signed-off-by: Ingo Molnar Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200813060220.18199-1-sjhuang@iluvatar.ai commit 585c6ed738a5ed2a6fd7662fa1d82f25acfa85de Author: Oleksandr Andrushchenko Date: Thu Aug 13 14:00:38 2020 +0200 drm/xen-front: Pass dumb buffer data offset to the backend While importing a dmabuf it is possible that the data of the buffer is put with offset which is indicated by the SGT offset. Respect the offset value and forward it to the backend. Signed-off-by: Oleksandr Andrushchenko Acked-by: Noralf Trønnes Signed-off-by: Juergen Gross commit ebf0d100df0731901c16632f78d78d35f4123bc4 Author: Jens Axboe Date: Thu Aug 13 09:01:38 2020 -0600 task_work: only grab task signal lock when needed If JOBCTL_TASK_WORK is already set on the targeted task, then we need not go through {lock,unlock}_task_sighand() to set it again and queue a signal wakeup. This is safe as we're checking it _after_ adding the new task_work with cmpxchg(). The ordering is as follows: task_work_add() get_signal() -------------------------------------------------------------- STORE(task->task_works, new_work); STORE(task->jobctl); mb(); mb(); LOAD(task->jobctl); LOAD(task->task_works); This speeds up TWA_SIGNAL handling quite a bit, which is important now that io_uring is relying on it for all task_work deliveries. Cc: Peter Zijlstra Cc: Jann Horn Acked-by: Oleg Nesterov Signed-off-by: Jens Axboe commit 2db13a9b30f7e438777eb1a462c4b055ba948b89 Author: Alexander Gordeev Date: Thu Aug 13 13:32:48 2020 +0200 perf bench numa: Use numa_node_to_cpus() to bind tasks to nodes It is currently assumed that each node contains at most nr_cpus/nr_nodes CPUs and nodes' CPU ranges do not overlap. That assumption is generally incorrect as there are archs where a CPU number does not depend on to its node number. This update removes the described assumption by simply calling numa_node_to_cpus() interface and using the returned mask for binding CPUs to nodes. Also, variable types and names made consistent in functions using cpumask. Signed-off-by: Alexander Gordeev Reviewed-by: Srikar Dronamraju Cc: Alexander Shishkin Cc: Balamuruhan S Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Satheesh Rajendran Link: http://lore.kernel.org/lkml/20200813113247.GA2014@oc3871087118.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 509f68e327d0c87e9bc93cb138e445c506ae9ce9 Author: Alexander Gordeev Date: Thu Aug 13 13:30:42 2020 +0200 perf bench numa: Fix cpumask memory leak in node_has_cpus() Couple numa_allocate_cpumask() and numa_free_cpumask() functions Signed-off-by: Alexander Gordeev Reviewed-by: Srikar Dronamraju Cc: Alexander Shishkin Cc: Balamuruhan S Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Naveen N. Rao Cc: Peter Zijlstra Cc: Satheesh Rajendran Link: http://lore.kernel.org/lkml/20200813113041.GA1685@oc3871087118.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit fa5c893181ed2ca2f96552f50073786d2cfce6c0 Author: Daniel Díaz Date: Wed Aug 12 17:15:17 2020 -0500 tools build feature: Quote CC and CXX for their arguments When using a cross-compilation environment, such as OpenEmbedded, the CC an CXX variables are set to something more than just a command: there are arguments (such as --sysroot) that need to be passed on to the compiler so that the right set of headers and libraries are used. For the particular case that our systems detected, CC is set to the following: export CC="aarch64-linaro-linux-gcc --sysroot=/oe/build/tmp/work/machine/perf/1.0-r9/recipe-sysroot" Without quotes, detection is as follows: Auto-detecting system features: ... dwarf: [ OFF ] ... dwarf_getlocations: [ OFF ] ... glibc: [ OFF ] ... gtk2: [ OFF ] ... libbfd: [ OFF ] ... libcap: [ OFF ] ... libelf: [ OFF ] ... libnuma: [ OFF ] ... numa_num_possible_cpus: [ OFF ] ... libperl: [ OFF ] ... libpython: [ OFF ] ... libcrypto: [ OFF ] ... libunwind: [ OFF ] ... libdw-dwarf-unwind: [ OFF ] ... zlib: [ OFF ] ... lzma: [ OFF ] ... get_cpuid: [ OFF ] ... bpf: [ OFF ] ... libaio: [ OFF ] ... libzstd: [ OFF ] ... disassembler-four-args: [ OFF ] Makefile.config:414: *** No gnu/libc-version.h found, please install glibc-dev[el]. Stop. Makefile.perf:230: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 Makefile:69: recipe for target 'all' failed make: *** [all] Error 2 With CC and CXX quoted, some of those features are now detected. Fixes: e3232c2f39ac ("tools build feature: Use CC and CXX from parent") Signed-off-by: Daniel Díaz Reviewed-by: Thomas Hebb Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Song Liu Cc: Stephane Eranian Cc: Yonghong Song Link: http://lore.kernel.org/lkml/20200812221518.2869003-1-daniel.diaz@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit b2fe96a350deb93d080ee7136b1e9fcf6cda83e2 Author: Jiri Olsa Date: Sat Aug 8 14:26:56 2020 +0200 perf tools: Fix module symbol processing The 'dso->kernel' condition is true also for kernel modules now, and there are several places that were omited by the initial change: - we need to identify modules separately in dso__process_kernel_symbol - we need to set 'dso->kernel' for module from buildid table - there's no need to use 'dso->kernel || kmodule' in one condition Committer testing: Before: # perf test -v object Objdump command is: objdump -z -d --start-address=0xffffffff813e682f --stop-address=0xffffffff813e68af /usr/lib/debug/lib/modules/5.7.14-200.fc32.x86_64/vmlinux Bytes read match those read by objdump Reading object code for memory address: 0xffffffffc02dc257 File is: /lib/modules/5.7.14-200.fc32.x86_64/kernel/arch/x86/crypto/crc32c-intel.ko.xz On file address is: 0xffffffffc02dc2e7 dso__data_read_offset failed test child finished with -1 ---- end ---- Object code reading: FAILED! # After: # perf test object 26: Object code reading : Ok # perf test object 26: Object code reading : Ok # perf test object 26: Object code reading : Ok # perf test object 26: Object code reading : Ok # perf test object 26: Object code reading : Ok # Fixes: 02213cec64bb ("perf maps: Mark module DSOs with kernel type") Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Namhyung Kim Signed-off-by: Jiri Olsa commit 1c695c88a1092b4013e3fffbe0ca685149165403 Author: Jiri Olsa Date: Sat Aug 8 14:21:54 2020 +0200 perf tools: Rename 'enum dso_kernel_type' to 'enum dso_space_type' Rename enum dso_kernel_type to enum dso_space_type, which seems like better fit. Committer notes: This is used with 'struct dso'->kernel, which once was a boolean, so DSO_SPACE__USER is zero, !zero means some sort of kernel space, be it the host kernel space or a guest kernel space. Signed-off-by: Jiri Olsa Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit ceafdd664cae27ffd2d0a4e4e9eef7896c304046 Author: Rob Herring Date: Fri Aug 7 13:32:25 2020 -0600 MAINTAINERS: Add missing tools/lib/perf/ path to perf maintainers Commit 3ce311afb558 ("libperf: Move to tools/lib/perf") moved libperf out of tools/perf/, but failed to update MAINTAINERS. Signed-off-by: Rob Herring Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200807193225.3904108-1-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ce746d43a17493108c6754ce9450bd7317b93f7c Author: Rob Herring Date: Fri Aug 7 13:32:41 2020 -0600 libperf: Fix man page typos Fix various typos and inconsistent capitalization of CPU in the libperf man pages. Signed-off-by: Rob Herring Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200807193241.3904545-1-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 194cb6b50f57676130491341f321394bb16ee624 Author: Michael Petlan Date: Wed Jul 22 15:58:45 2020 +0200 perf test: Allow multiple probes in record+script_probe_vfs_getname.sh Sometimes when adding a kprobe by perf, it results in multiple probe points, such as the following: # ./perf probe -l probe:vfs_getname (on getname_flags:73@fs/namei.c with pathname) probe:vfs_getname_1 (on getname_flags:73@fs/namei.c with pathname) probe:vfs_getname_2 (on getname_flags:73@fs/namei.c with pathname) # cat /sys/kernel/debug/tracing/kprobe_events p:probe/vfs_getname _text+5501804 pathname=+0(+0(%gpr31)):string p:probe/vfs_getname_1 _text+5505388 pathname=+0(+0(%gpr31)):string p:probe/vfs_getname_2 _text+5508396 pathname=+0(+0(%gpr31)):string In this test, we need to record all of them and expect any of them in the perf-script output, since it's not clear which one will be used for the desired syscall: # perf stat -e probe:vfs_getname\* -- touch /tmp/nic Performance counter stats for 'touch /tmp/nic': 31 probe:vfs_getname_2 0 probe:vfs_getname_1 1 probe:vfs_getname 0.001421826 seconds time elapsed 0.001506000 seconds user 0.000000000 seconds sys If the test relies only on probe:vfs_getname, it might easily miss the relevant data. Signed-off-by: Michael Petlan Cc: Jiri Olsa LPU-Reference: 20200722135845.29958-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 1beaef29c34154ccdcb3f1ae557f6883eda18840 Author: Vincent Whitchurch Date: Mon Aug 10 15:34:04 2020 +0200 perf bench mem: Always memset source before memcpy For memcpy, the source pages are memset to zero only when --cycles is used. This leads to wildly different results with or without --cycles, since all sources pages are likely to be mapped to the same zero page without explicit writes. Before this fix: $ export cmd="./perf stat -e LLC-loads -- ./perf bench \ mem memcpy -s 1024MB -l 100 -f default" $ $cmd 2,935,826 LLC-loads 3.821677452 seconds time elapsed $ $cmd --cycles 217,533,436 LLC-loads 8.616725985 seconds time elapsed After this fix: $ $cmd 214,459,686 LLC-loads 8.674301124 seconds time elapsed $ $cmd --cycles 214,758,651 LLC-loads 8.644480006 seconds time elapsed Fixes: 47b5757bac03c338 ("perf bench mem: Move boilerplate memory allocation to the infrastructure") Signed-off-by: Vincent Whitchurch Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kernel@axis.com Link: http://lore.kernel.org/lkml/20200810133404.30829-1-vincent.whitchurch@axis.com Signed-off-by: Arnaldo Carvalho de Melo commit d566a9c2d482640abf5e602957b44e7b3bbe858d Author: David Ahern Date: Fri Aug 7 10:48:44 2020 -0600 perf sched: Prefer sched_waking event when it exists Commit fbd705a0c618 ("sched: Introduce the 'trace_sched_waking' tracepoint") added sched_waking tracepoint which should be preferred over sched_wakeup when analyzing scheduling delays. Update 'perf sched record' to collect sched_waking events if it exists and fallback to sched_wakeup if it does not. Similarly, update timehist command to skip sched_wakeup events if the session includes sched_waking (ie., sched_waking is preferred over sched_wakeup). Signed-off-by: David Ahern Acked-by: Namhyung Kim Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200807164844.44870-1-dsahern@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a6d996cbd38b42341ad3fce74506b9fdc280e395 Author: Sebastian Andrzej Siewior Date: Thu Aug 13 12:50:26 2020 +0200 x86/alternatives: Acquire pte lock with interrupts enabled pte lock is never acquired in-IRQ context so it does not require interrupts to be disabled. The lock is a regular spinlock which cannot be acquired with interrupts disabled on RT. RT complains about pte_lock() in __text_poke() because it's invoked after disabling interrupts. __text_poke() has to disable interrupts as use_temporary_mm() expects interrupts to be off because it invokes switch_mm_irqs_off() and uses per-CPU (current active mm) data. Move the PTE lock handling outside the interrupt disabled region. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by; Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20200813105026.bvugytmsso6muljw@linutronix.de commit 6f92337b6bffb3d9e509024d6ef5c3f2b112757d Author: Oleksandr Andrushchenko Date: Thu Aug 13 09:21:12 2020 +0300 xen: Sync up with the canonical protocol definition in Xen This is the sync up with the canonical definition of the display protocol in Xen. 1. Add protocol version as an integer Version string, which is in fact an integer, is hard to handle in the code that supports different protocol versions. To simplify that also add the version as an integer. 2. Pass buffer offset with XENDISPL_OP_DBUF_CREATE There are cases when display data buffer is created with non-zero offset to the data start. Handle such cases and provide that offset while creating a display buffer. 3. Add XENDISPL_OP_GET_EDID command Add an optional request for reading Extended Display Identification Data (EDID) structure which allows better configuration of the display connectors over the configuration set in XenStore. With this change connectors may have multiple resolutions defined with respect to detailed timing definitions and additional properties normally provided by displays. If this request is not supported by the backend then visible area is defined by the relevant XenStore's "resolution" property. If backend provides extended display identification data (EDID) with XENDISPL_OP_GET_EDID request then EDID values must take precedence over the resolutions defined in XenStore. 4. Bump protocol version to 2. Signed-off-by: Oleksandr Andrushchenko Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20200813062113.11030-5-andr2000@gmail.com Signed-off-by: Juergen Gross commit 129572999a1eb6e125e645d0436de7d4ab6b8a6c Author: Oleksandr Andrushchenko Date: Thu Aug 13 09:21:11 2020 +0300 drm/xen-front: Add YUYV to supported formats Add YUYV to supported formats, so the frontend can work with the formats used by cameras and other HW. Signed-off-by: Oleksandr Andrushchenko Acked-by: Noralf Trønnes Link: https://lore.kernel.org/r/20200813062113.11030-4-andr2000@gmail.com Signed-off-by: Juergen Gross commit 14dee058610446aa464254fc5c8e88c7535195e0 Author: Oleksandr Andrushchenko Date: Thu Aug 13 09:21:10 2020 +0300 drm/xen-front: Fix misused IS_ERR_OR_NULL checks The patch c575b7eeb89f: "drm/xen-front: Add support for Xen PV display frontend" from Apr 3, 2018, leads to the following static checker warning: drivers/gpu/drm/xen/xen_drm_front_gem.c:140 xen_drm_front_gem_create() warn: passing zero to 'ERR_CAST' drivers/gpu/drm/xen/xen_drm_front_gem.c 133 struct drm_gem_object *xen_drm_front_gem_create(struct drm_device *dev, 134 size_t size) 135 { 136 struct xen_gem_object *xen_obj; 137 138 xen_obj = gem_create(dev, size); 139 if (IS_ERR_OR_NULL(xen_obj)) 140 return ERR_CAST(xen_obj); Fix this and the rest of misused places with IS_ERR_OR_NULL in the driver. Fixes: c575b7eeb89f: "drm/xen-front: Add support for Xen PV display frontend" Signed-off-by: Oleksandr Andrushchenko Reported-by: Dan Carpenter Reviewed-by: Dan Carpenter Cc: Link: https://lore.kernel.org/r/20200813062113.11030-3-andr2000@gmail.com Signed-off-by: Juergen Gross commit 5fa4e6f1c2d8c9a4e47e1931b42893172d388f2b Author: Oleksandr Andrushchenko Date: Thu Aug 13 09:21:09 2020 +0300 xen/gntdev: Fix dmabuf import with non-zero sgt offset It is possible that the scatter-gather table during dmabuf import has non-zero offset of the data, but user-space doesn't expect that. Fix this by failing the import, so user-space doesn't access wrong data. Fixes: bf8dc55b1358 ("xen/gntdev: Implement dma-buf import functionality") Signed-off-by: Oleksandr Andrushchenko Acked-by: Juergen Gross Cc: Link: https://lore.kernel.org/r/20200813062113.11030-2-andr2000@gmail.com Signed-off-by: Juergen Gross commit 5a25de6df789cc805a9b8ba7ab5deef5067af47e Author: Dinghao Liu Date: Thu Aug 13 15:46:30 2020 +0800 ALSA: echoaudio: Fix potential Oops in snd_echo_resume() Freeing chip on error may lead to an Oops at the next time the system goes to resume. Fix this by removing all snd_echo_free() calls on error. Fixes: 47b5d028fdce8 ("ALSA: Echoaudio - Add suspend support #2") Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20200813074632.17022-1-dinghao.liu@zju.edu.cn Signed-off-by: Takashi Iwai commit f107cee94ba4d2c7357fde59a1d84346c73d4958 Author: Guenter Roeck Date: Tue Aug 11 11:00:12 2020 -0700 genirq: Unlock irq descriptor after errors In irq_set_irqchip_state(), the irq descriptor is not unlocked after an error is encountered. While that should never happen in practice, a buggy driver may trigger it. This would result in a lockup, so fix it. Fixes: 1d0326f352bb ("genirq: Check irq_data_get_irq_chip() return value before use") Signed-off-by: Guenter Roeck Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200811180012.80269-1-linux@roeck-us.net commit 21dfbcd1f5cbff9cf2f9e7e43475aed8d072b0dd Author: Ondrej Mosnacek Date: Wed Aug 12 14:58:25 2020 +0200 crypto: algif_aead - fix uninitialized ctx->init In skcipher_accept_parent_nokey() the whole af_alg_ctx structure is cleared by memset() after allocation, so add such memset() also to aead_accept_parent_nokey() so that the new "init" field is also initialized to zero. Without that the initial ctx->init checks might randomly return true and cause errors. While there, also remove the redundant zero assignments in both functions. Found via libkcapi testsuite. Cc: Stephan Mueller Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when ctx->more is zero") Suggested-by: Herbert Xu Signed-off-by: Ondrej Mosnacek Signed-off-by: Herbert Xu commit e15d7f2b81d2e7d93115d46fa931b366c1cdebc2 Author: Suman Anna Date: Mon Jul 27 16:10:08 2020 -0500 mfd: syscon: Use a unique name with regmap_config The DT node full name is currently being used in regmap_config which in turn is used to create the regmap debugfs directories. This name however is not guaranteed to be unique and the regmap debugfs registration can fail in the cases where the syscon nodes have the same unit-address but are present in different DT node hierarchies. Replace this logic using the syscon reg resource address instead (inspired from logic used while creating platform devices) to ensure a unique name is given for each syscon. Signed-off-by: Suman Anna Reviewed-by: Arnd Bergmann Signed-off-by: Lee Jones commit 4f4ed4543e2096dc0158ff79bd6d8bc09e27fa93 Author: Alexander A. Klimov Date: Wed Jul 22 21:24:54 2020 +0200 mfd: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Rob Herring Signed-off-by: Lee Jones commit 3d858942250820b9adc35f963a257481d6d4c81d Author: Andy Shevchenko Date: Thu Jul 23 16:02:46 2020 +0300 mfd: dln2: Run event handler loop under spinlock The event handler loop must be run with interrupts disabled. Otherwise we will have a warning: [ 1970.785649] irq 31 handler lineevent_irq_handler+0x0/0x20 enabled interrupts [ 1970.792739] WARNING: CPU: 0 PID: 0 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x162/0x170 [ 1970.860732] RIP: 0010:__handle_irq_event_percpu+0x162/0x170 ... [ 1970.946994] Call Trace: [ 1970.949446] [ 1970.951471] handle_irq_event_percpu+0x2c/0x80 [ 1970.955921] handle_irq_event+0x23/0x43 [ 1970.959766] handle_simple_irq+0x57/0x70 [ 1970.963695] generic_handle_irq+0x42/0x50 [ 1970.967717] dln2_rx+0xc1/0x210 [dln2] [ 1970.971479] ? usb_hcd_unmap_urb_for_dma+0xa6/0x1c0 [ 1970.976362] __usb_hcd_giveback_urb+0x77/0xe0 [ 1970.980727] usb_giveback_urb_bh+0x8e/0xe0 [ 1970.984837] tasklet_action_common.isra.0+0x4a/0xe0 ... Recently xHCI driver switched to tasklets in the commit 36dc01657b49 ("usb: host: xhci: Support running urb giveback in tasklet context"). The handle_irq_event_* functions are expected to be called with interrupts disabled and they rightfully complain here because we run in tasklet context with interrupts enabled. Use a event spinlock to protect event handler from being interrupted. Note, that there are only two users of this GPIO and ADC drivers and both of them are using generic_handle_irq() which makes above happen. Fixes: 338a12814297 ("mfd: Add support for Diolan DLN-2 devices") Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 77b3ddab713a2276c789a8e1beb339ce185cebc2 Author: Charles Keepax Date: Thu Jul 23 11:54:59 2020 +0100 mfd: madera: Improve handling of regulator unbinding The current unbinding process for Madera has some issues. The trouble is runtime PM is disabled as the first step of the process, but some of the drivers release IRQs causing regmap IRQ to issue a runtime get which fails. To allow runtime PM to remain enabled during mfd_remove_devices, the DCVDD regulator must remain available. In the case of external DCVDD's this is simple, the regulator can simply be disabled/put after the call to mfd_remove_devices. However, in the case of an internally supplied DCVDD the regulator needs to be released after the other MFD children depending on it. Use the new MFD mfd_remove_devices_late functionality to split the DCVDD regulator off from the other drivers. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit 114294d276279d6cda81f9c685452239ea89cdb8 Author: Charles Keepax Date: Thu Jul 23 11:54:58 2020 +0100 mfd: mfd-core: Add mechanism for removal of a subset of children Currently, the only way to remove MFD children is with a call to mfd_remove_devices, which will remove all the children. Under some circumstances it is useful to remove only a subset of the child devices. For example if some additional clean up is required between removal of certain child devices. To accomplish this a level field is added to mfd_cell, the normal mfd_remove_devices is modified to not remove devices that are set to a higher level and a corresponding mfd_remove_devices_late function is added to remove those children. See further discussion at: https://lore.kernel.org/lkml/20200616075834.GF2608702@dell/ Suggested-by: Lee Jones Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit 4ee1d9dc8073acd40f04e5fe3771a5dff978d077 Author: Xu Wang Date: Mon Jul 27 03:04:07 2020 +0000 mfd: intel_soc_pmic_mrfld: Simplify the return expression of intel_scu_ipc_dev_iowrite8() Simplify the return expression. Signed-off-by: Xu Wang Signed-off-by: Lee Jones commit 1f0fa85c07fb53d756219cf7e6e8e77eab6e75eb Author: Colin Ian King Date: Thu Jul 23 17:15:41 2020 +0100 mfd: max14577: Remove redundant initialization of variable current_bits The variable current_bits is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lee Jones commit 594f1935b373019aacaff00929ae61fec0ec83a5 Author: Andreas Kemnade Date: Fri Jul 17 23:00:02 2020 +0200 mfd: rn5t618: Fix caching of battery related registers Battery status changes dynamically, so the corresponding registers need to be considered volatile. Affected registers are: - fuel gauge - battery status - battery interrupt Signed-off-by: Andreas Kemnade Signed-off-by: Lee Jones commit e7b85500885f2a70129f5d3a72153e23b37d0fe5 Author: Randy Dunlap Date: Sat Jul 18 17:29:31 2020 -0700 mfd: max77693-private: Drop a duplicated word Drop the repeated word "in" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Lee Jones commit 23ef2b642b85f03a109fbf5958134a5e40193dbd Author: Randy Dunlap Date: Sat Jul 18 17:29:17 2020 -0700 mfd: da9055: pdata.h: Drop a duplicated word Drop the repeated word "that" in a comment. Signed-off-by: Randy Dunlap Acked-by: Adam Thomson Signed-off-by: Lee Jones commit cf84dc0bb40f4b41f7853f224b37954cf273ee24 Author: Andreas Kemnade Date: Tue Jul 21 09:34:02 2020 +0200 mfd: rn5t618: Make restart handler atomic safe The restart handler is executed during the shutdown phase which is atomic/irq-less. The i2c framework supports atomic transfers since commit 63b96983a5dd ("i2c: core: introduce callbacks for atomic transfers") to address this use case. Using i2c regmap in that situation is not allowed: [ 165.177465] [ BUG: Invalid wait context ] [ 165.181479] 5.8.0-rc3-00003-g0e9088558027-dirty #11 Not tainted [ 165.187400] ----------------------------- [ 165.191410] systemd-shutdow/1 is trying to lock: [ 165.196030] d85b4438 (rn5t618:170:(&rn5t618_regmap_config)->lock){+.+.}-{3:3}, at: regmap_update_bits_base+0x30/0x70 [ 165.206573] other info that might help us debug this: [ 165.211625] context-{4:4} [ 165.214248] 2 locks held by systemd-shutdow/1: [ 165.218691] #0: c131c47c (system_transition_mutex){+.+.}-{3:3}, at: __do_sys_reboot+0x90/0x204 [ 165.227405] #1: c131efb4 (rcu_read_lock){....}-{1:2}, at: __atomic_notifier_call_chain+0x0/0x118 [ 165.236288] stack backtrace: [ 165.239174] CPU: 0 PID: 1 Comm: systemd-shutdow Not tainted 5.8.0-rc3-00003-g0e9088558027-dirty #11 [ 165.248220] Hardware name: Freescale i.MX6 SoloLite (Device Tree) [ 165.254330] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 165.262084] [] (show_stack) from [] (dump_stack+0xe8/0x120) [ 165.269407] [] (dump_stack) from [] (__lock_acquire+0x81c/0x2ca0) [ 165.277246] [] (__lock_acquire) from [] (lock_acquire+0xe4/0x490) [ 165.285090] [] (lock_acquire) from [] (__mutex_lock+0x74/0x954) [ 165.292756] [] (__mutex_lock) from [] (mutex_lock_nested+0x1c/0x24) [ 165.300769] [] (mutex_lock_nested) from [] (regmap_update_bits_base+0x30/0x70) [ 165.309741] [] (regmap_update_bits_base) from [] (rn5t618_trigger_poweroff_sequence+0x34/0x64) [ 165.320097] [] (rn5t618_trigger_poweroff_sequence) from [] (rn5t618_restart+0xc/0x2c) [ 165.329669] [] (rn5t618_restart) from [] (notifier_call_chain+0x48/0x80) [ 165.338113] [] (notifier_call_chain) from [] (__atomic_notifier_call_chain+0x70/0x118) [ 165.347770] [] (__atomic_notifier_call_chain) from [] (atomic_notifier_call_chain+0x18/0x20) [ 165.357949] [] (atomic_notifier_call_chain) from [] (machine_restart+0x68/0x80) [ 165.367001] [] (machine_restart) from [] (__do_sys_reboot+0x11c/0x204) [ 165.375272] [] (__do_sys_reboot) from [] (ret_fast_syscall+0x0/0x28) [ 165.383364] Exception stack(0xd80a5fa8 to 0xd80a5ff0) [ 165.388420] 5fa0: 00406948 00000000 fee1dead 28121969 01234567 73299b00 [ 165.396602] 5fc0: 00406948 00000000 00000000 00000058 be91abc8 00000000 be91ab60 004056f8 [ 165.404781] 5fe0: 00000058 be91aabc b6ed4d45 b6e56746 Signed-off-by: Andreas Kemnade Signed-off-by: Lee Jones commit 564de7628dab38f2d51bac2608fe1043704622b7 Author: Stephen Rothwell Date: Fri Jul 17 13:41:54 2020 +1000 mfd: kempld-core: Fix 'assignment of read-only location' error drivers/mfd/kempld-core.c: In function 'kempld_register_cells_generic': drivers/mfd/kempld-core.c:105:13: error: assignment of read-only location 'devs[i++]' 105 | devs[i++] = kempld_devs[KEMPLD_I2C]; | ^ drivers/mfd/kempld-core.c:108:13: error: assignment of read-only location 'devs[i++]' 108 | devs[i++] = kempld_devs[KEMPLD_WDT]; | ^ drivers/mfd/kempld-core.c:111:13: error: assignment of read-only location 'devs[i++]' 111 | devs[i++] = kempld_devs[KEMPLD_GPIO]; | ^ drivers/mfd/kempld-core.c:114:13: error: assignment of read-only location 'devs[i++]' 114 | devs[i++] = kempld_devs[KEMPLD_UART]; | ^ Fixes: e49aa9a9bd22 ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes") Signed-off-by: Stephen Rothwell Signed-off-by: Lee Jones commit 85c307850784eaa0f81713edf707e6f2e4d64eb3 Author: Frank Lee Date: Wed Jul 8 15:19:36 2020 +0800 mfd: axp20x: Allow the AXP803 to be probed by I2C The AXP803 can be used both using the RSB proprietary bus, or a more traditional I2C bus. Let's add that possibility. Signed-off-by: Frank Lee Acked-by: Chen-Yu Tsai Signed-off-by: Lee Jones commit 9ece3601aed46f7b460b79cd7d60908b47b2b0d4 Author: Adam Thomson Date: Mon Jul 13 10:38:59 2020 +0100 mfd: da9063: Add support for latest DA silicon revision This update adds new regmap tables to support the latest DA silicon which will automatically be selected based on the chip and variant information read from the device. Signed-off-by: Adam Thomson Signed-off-by: Lee Jones commit 091c6110862bce4e2380e353cb062dcb6a56bcb6 Author: Adam Thomson Date: Mon Jul 13 10:38:57 2020 +0100 mfd: da9063: Fix revision handling to correctly select reg tables The current implementation performs checking in the i2c_probe() function of the variant_code but does this immediately after the containing struct has been initialised as all zero. This means the check for variant code will always default to using the BB tables and will never select AD. The variant code is subsequently set by device_init() and later used by the RTC so really it's a little fortunate this mismatch works. This update adds raw I2C read access functionality to read the chip and variant/revision information (common to all revisions) so that it can subsequently correctly choose the proper regmap tables for real initialisation. Signed-off-by: Adam Thomson Signed-off-by: Lee Jones commit a3f673d0092cee167b2a6e3d61454405d0a06b25 Author: Fabio Estevam Date: Thu Jul 2 08:32:33 2020 -0300 dt-bindings: mfd: st,stmfx: Remove I2C unit name Remove the I2C unit name to fix the following build warning with 'make dt_binding_check': Warning (unit_address_vs_reg): /example-0/i2c@0: node has a unit name, but no reg or ranges property Signed-off-by: Fabio Estevam Acked-by: Rob Herring Signed-off-by: Lee Jones commit e9faaf056d2812c0b602c3dbeb5b83756b58abc5 Author: Roger Quadros Date: Mon Jun 29 15:52:49 2020 +0300 dt-bindings: mfd: ti,j721e-system-controller.yaml: Add J721e system controller Add DT binding schema for J721e system controller. Signed-off-by: Roger Quadros Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 819e42e00d2eca536d5187de21971ed345861102 Author: Tony Lindgren Date: Mon Jul 6 11:39:34 2020 -0700 mfd: motorola-cpcap: Disable interrupt for suspend Otherwise we get spammed with errors on resume after rtcwake: cpcap-core spi0.0: Failed to read IRQ status: -108 Note that rtcwake is still capable of waking up the system with this patch. Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Signed-off-by: Tony Lindgren Signed-off-by: Lee Jones commit 7d2594cd1fa0b03b2746ce811926ee150a3a14fa Author: Michael Walle Date: Wed Jul 1 23:23:48 2020 +0200 mfd: smsc-ece1099: Remove driver This MFD driver has no user. The keypad driver of this device never made it into the kernel. Therefore, this driver is useless. Remove it. Signed-off-by: Michael Walle Cc: Sourav Poddar Signed-off-by: Lee Jones commit 44e6171ed04a0cd0378e2503f03a444ebdd4e8e3 Author: Lee Jones Date: Thu Jun 11 10:12:05 2020 +0100 mfd: core: Add OF_MFD_CELL_REG() helper Extend current list of helpers to provide support for parent drivers wishing to match specific child devices to particular OF nodes. Signed-off-by: Lee Jones commit d097965bb6682afe1f8481923b16c033f708923b Author: Lee Jones Date: Thu Jun 11 10:18:43 2020 +0100 mfd: core: Fix formatting of MFD helpers Remove unnecessary '\'s and leading tabs. This will help to clean-up future diffs when subsequent changes are made. Hint: The aforementioned changes follow this patch. Signed-off-by: Lee Jones commit 466a62d7642f02f36d37d9b30c19a725538a01ca Author: Lee Jones Date: Thu Jun 11 07:35:33 2020 +0100 mfd: core: Make a best effort attempt to match devices with the correct of_nodes Currently, when a child platform device (sometimes referred to as a sub-device) is registered via the Multi-Functional Device (MFD) API, the framework attempts to match the newly registered platform device with its associated Device Tree (OF) node. Until now, the device has been allocated the first node found with an identical OF compatible string. Unfortunately, if there are, say for example '3' devices which are to be handled by the same driver and therefore have the same compatible string, each of them will be allocated a pointer to the *first* node. An example Device Tree entry might look like this: mfd_of_test { compatible = "mfd,of-test-parent"; #address-cells = <0x02>; #size-cells = <0x02>; child@aaaaaaaaaaaaaaaa { compatible = "mfd,of-test-child"; reg = <0xaaaaaaaa 0xaaaaaaaa 0 0x11>, <0xbbbbbbbb 0xbbbbbbbb 0 0x22>; }; child@cccccccc { compatible = "mfd,of-test-child"; reg = <0x00000000 0xcccccccc 0 0x33>; }; child@dddddddd00000000 { compatible = "mfd,of-test-child"; reg = <0xdddddddd 0x00000000 0 0x44>; }; }; When used with example sub-device registration like this: static const struct mfd_cell mfd_of_test_cell[] = { OF_MFD_CELL("mfd-of-test-child", NULL, NULL, 0, 0, "mfd,of-test-child"), OF_MFD_CELL("mfd-of-test-child", NULL, NULL, 0, 1, "mfd,of-test-child"), OF_MFD_CELL("mfd-of-test-child", NULL, NULL, 0, 2, "mfd,of-test-child") }; ... the current implementation will result in all devices being allocated the first OF node found containing a matching compatible string: [0.712511] mfd-of-test-child mfd-of-test-child.0: Probing platform device: 0 [0.712710] mfd-of-test-child mfd-of-test-child.0: Using OF node: child@aaaaaaaaaaaaaaaa [0.713033] mfd-of-test-child mfd-of-test-child.1: Probing platform device: 1 [0.713381] mfd-of-test-child mfd-of-test-child.1: Using OF node: child@aaaaaaaaaaaaaaaa [0.713691] mfd-of-test-child mfd-of-test-child.2: Probing platform device: 2 [0.713889] mfd-of-test-child mfd-of-test-child.2: Using OF node: child@aaaaaaaaaaaaaaaa After this patch each device will be allocated a unique OF node: [0.712511] mfd-of-test-child mfd-of-test-child.0: Probing platform device: 0 [0.712710] mfd-of-test-child mfd-of-test-child.0: Using OF node: child@aaaaaaaaaaaaaaaa [0.713033] mfd-of-test-child mfd-of-test-child.1: Probing platform device: 1 [0.713381] mfd-of-test-child mfd-of-test-child.1: Using OF node: child@cccccccc [0.713691] mfd-of-test-child mfd-of-test-child.2: Probing platform device: 2 [0.713889] mfd-of-test-child mfd-of-test-child.2: Using OF node: child@dddddddd00000000 Which is fine if all OF nodes are identical. However if we wish to apply an attribute to particular device, we really need to ensure the correct OF node will be associated with the device containing the correct address. We accomplish this by matching the device's address expressed in DT with one provided during sub-device registration. Like this: static const struct mfd_cell mfd_of_test_cell[] = { OF_MFD_CELL_REG("mfd-of-test-child", NULL, NULL, 0, 1, "mfd,of-test-child", 0xdddddddd00000000), OF_MFD_CELL_REG("mfd-of-test-child", NULL, NULL, 0, 2, "mfd,of-test-child", 0xaaaaaaaaaaaaaaaa), OF_MFD_CELL_REG("mfd-of-test-child", NULL, NULL, 0, 3, "mfd,of-test-child", 0x00000000cccccccc) }; This will ensure a specific device (designated here using the platform_ids; 1, 2 and 3) is matched with a particular OF node: [0.712511] mfd-of-test-child mfd-of-test-child.0: Probing platform device: 0 [0.712710] mfd-of-test-child mfd-of-test-child.0: Using OF node: child@dddddddd00000000 [0.713033] mfd-of-test-child mfd-of-test-child.1: Probing platform device: 1 [0.713381] mfd-of-test-child mfd-of-test-child.1: Using OF node: child@aaaaaaaaaaaaaaaa [0.713691] mfd-of-test-child mfd-of-test-child.2: Probing platform device: 2 [0.713889] mfd-of-test-child mfd-of-test-child.2: Using OF node: child@cccccccc This implementation is still not infallible, hence the mention of "best effort" in the commit subject. Since we have not *insisted* on the existence of 'reg' properties (in some scenarios they just do not make sense) and no device currently uses the new 'of_reg' attribute, we have to make an on-the-fly judgement call whether to associate the OF node anyway. Which we do in cases where parent drivers haven't specified a particular OF node to match to. So there is a *slight* possibility of the following result (note: the implementation here is convoluted, but it shows you one means by which this process can still break): /* * First entry will match to the first OF node with matching compatible * Second will fail, since the first took its OF node and is no longer available * Third will succeed */ static const struct mfd_cell mfd_of_test_cell[] = { OF_MFD_CELL("mfd-of-test-child", NULL, NULL, 0, 1, "mfd,of-test-child"), OF_MFD_CELL_REG("mfd-of-test-child", NULL, NULL, 0, 2, "mfd,of-test-child", 0xaaaaaaaaaaaaaaaa), OF_MFD_CELL_REG("mfd-of-test-child", NULL, NULL, 0, 3, "mfd,of-test-child", 0x00000000cccccccc) }; The result: [0.753869] mfd-of-test-parent mfd_of_test: Registering 3 devices [0.756597] mfd-of-test-child: Failed to locate of_node [id: 2] [0.759999] mfd-of-test-child mfd-of-test-child.1: Probing platform device: 1 [0.760314] mfd-of-test-child mfd-of-test-child.1: Using OF node: child@aaaaaaaaaaaaaaaa [0.760908] mfd-of-test-child mfd-of-test-child.2: Probing platform device: 2 [0.761183] mfd-of-test-child mfd-of-test-child.2: No OF node associated with this device [0.761621] mfd-of-test-child mfd-of-test-child.3: Probing platform device: 3 [0.761899] mfd-of-test-child mfd-of-test-child.3: Using OF node: child@cccccccc We could code around this with some pre-parsing semantics, but the added complexity required to cover each and every corner-case is not justified. Merely patching the current failing (via this patch) is already working with some pretty small corner-cases. Other issues should be patched in the parent drivers which can be achieved simply by implementing OF_MFD_CELL_REG(). Signed-off-by: Lee Jones commit d8bb9abe21071c64d077f9db3b403823a389464f Author: Fabian Frederick Date: Fri Aug 7 21:32:20 2020 +0200 selftests: netfilter: kill running process only Avoid noise like the following: nft_flowtable.sh: line 250: kill: (4691) - No such process Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit dd08734d8aca31f8991b26cd69d6bb99b617e451 Author: Fabian Frederick Date: Fri Aug 7 21:31:50 2020 +0200 selftests: netfilter: add MTU arguments to flowtables Add some documentation, default values defined in original script and Originator/Link/Responder arguments using getopts like in tools/power/cpupower/bench/cpufreq-bench_plot.sh Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit 6d006a4e38d5a52ef27a8204ac358b96da8148ec Author: Fabian Frederick Date: Fri Aug 7 21:31:11 2020 +0200 selftests: netfilter: add checktool function avoid repeating the same test for different toolcheck Signed-off-by: Fabian Frederick Signed-off-by: Pablo Neira Ayuso commit 59136aa3b2649796a3a1fd90158675f1f640ce0e Author: Florian Westphal Date: Tue Aug 11 19:39:09 2020 +0200 netfilter: nf_tables: free chain context when BINDING flag is missing syzbot found a memory leak in nf_tables_addchain() because the chain object is not free'd correctly on error. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: syzbot+c99868fde67014f7e9f5@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 2404b73c3f1a5f15726c6ecd226b56f6f992767f Author: Florian Westphal Date: Mon Aug 10 13:52:15 2020 +0200 netfilter: avoid ipv6 -> nf_defrag_ipv6 module dependency nf_ct_frag6_gather is part of nf_defrag_ipv6.ko, not ipv6 core. The current use of the netfilter ipv6 stub indirections causes a module dependency between ipv6 and nf_defrag_ipv6. This prevents nf_defrag_ipv6 module from being removed because ipv6 can't be unloaded. Remove the indirection and always use a direct call. This creates a depency from nf_conntrack_bridge to nf_defrag_ipv6 instead: modinfo nf_conntrack depends: nf_conntrack,nf_defrag_ipv6,bridge .. and nf_conntrack already depends on nf_defrag_ipv6 anyway. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b33164f2bd1cedb094c32cb466287116164457ae Author: Jiri Olsa Date: Wed Aug 12 14:31:02 2020 +0200 bpf: Iterate through all PT_NOTE sections when looking for build id Currently when we look for build id within bpf_get_stackid helper call, we check the first NOTE section and we fail if build id is not there. However on some system (Fedora) there can be multiple NOTE sections in binaries and build id data is not always the first one, like: $ readelf -a /usr/bin/ls ... [ 2] .note.gnu.propert NOTE 0000000000000338 00000338 0000000000000020 0000000000000000 A 0 0 8358 [ 3] .note.gnu.build-i NOTE 0000000000000358 00000358 0000000000000024 0000000000000000 A 0 0 437c [ 4] .note.ABI-tag NOTE 000000000000037c 0000037c ... So the stack_map_get_build_id function will fail on build id retrieval and fallback to BPF_STACK_BUILD_ID_IP. This patch is changing the stack_map_get_build_id code to iterate through all the NOTE sections and try to get build id data from each of them. When tracing on sched_switch tracepoint that does bpf_get_stackid helper call kernel build, I can see about 60% increase of successful build id retrieval. The rest seems fails on -EFAULT. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200812123102.20032-1-jolsa@kernel.org commit 702eddc77a905782083b14ccd05b23840675fd18 Author: Jean-Philippe Brucker Date: Wed Aug 12 16:39:10 2020 +0200 libbpf: Handle GCC built-in types for Arm NEON When building Arm NEON (SIMD) code from lib/raid6/neon.uc, GCC emits DWARF information using a base type "__Poly8_t", which is internal to GCC and not recognized by Clang. This causes build failures when building with Clang a vmlinux.h generated from an arm64 kernel that was built with GCC. vmlinux.h:47284:9: error: unknown type name '__Poly8_t' typedef __Poly8_t poly8x16_t[16]; ^~~~~~~~~ The polyX_t types are defined as unsigned integers in the "Arm C Language Extension" document (101028_Q220_00_en). Emit typedefs based on standard integer types for the GCC internal types, similar to those emitted by Clang. Including linux/kernel.h to use ARRAY_SIZE() incidentally redefined max(), causing a build bug due to different types, hence the seemingly unrelated change. Reported-by: Jakov Petrina Signed-off-by: Jean-Philippe Brucker Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200812143909.3293280-1-jean-philippe@linaro.org commit 8faf7fc597d59b142af41ddd4a2d59485f75f88a Author: Andrii Nakryiko Date: Tue Aug 11 19:59:07 2020 -0700 tools/bpftool: Make skeleton code C++17-friendly by dropping typeof() Seems like C++17 standard mode doesn't recognize typeof() anymore. This can be tested by compiling test_cpp test with -std=c++17 or -std=c++1z options. The use of typeof in skeleton generated code is unnecessary, all types are well-known at the time of code generation, so remove all typeof()'s to make skeleton code more future-proof when interacting with C++ compilers. Fixes: 985ead416df3 ("bpftool: Add skeleton codegen command") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200812025907.1371956-1-andriin@fb.com commit 068d9d1eba72423e99162aad3586727180715c2a Author: Andrii Nakryiko Date: Tue Aug 11 19:29:23 2020 -0700 bpf: Fix XDP FD-based attach/detach logic around XDP_FLAGS_UPDATE_IF_NOEXIST Enforce XDP_FLAGS_UPDATE_IF_NOEXIST only if new BPF program to be attached is non-NULL (i.e., we are not detaching a BPF program). Fixes: d4baa9368a5e ("bpf, xdp: Extract common XDP program attachment logic") Reported-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Tested-by: Stanislav Fomichev Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20200812022923.1217922-1-andriin@fb.com commit dc06fe51d26efc100ac74121607c01a454867c91 Merge: 7c2a69f610e64 27006416be16b Author: Linus Torvalds Date: Wed Aug 12 17:17:00 2020 -0700 Merge tag 'rtc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Not much this cycle - mostly non urgent driver fixes: - ds1374: use watchdog core - pcf2127: add alarm and pcf2129 support" * tag 'rtc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: rtc: pcf2127: fix alarm handling rtc: pcf2127: add alarm support rtc: pcf2127: add pca2129 device id rtc: max77686: Fix wake-ups for max77620 rtc: ds1307: provide an indication that the watchdog has fired rtc: ds1374: remove unused define rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies rtc: cleanup obsolete comment about struct rtc_class_ops rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable rtc: ds1374: wdt: Use watchdog core for watchdog part rtc: Replace HTTP links with HTTPS ones rtc: goldfish: Enable interrupt in set_alarm() when necessary rtc: max77686: Do not allow interrupt to fire before system resume rtc: imxdi: fix trivial typos rtc: cpcap: fix range commit f254ac04c8744cf7bfed012717eac34eacc65dfb Author: Jens Axboe Date: Wed Aug 12 17:33:30 2020 -0600 io_uring: enable lookup of links holding inflight files When a process exits, we cancel whatever requests it has pending that are referencing the file table. However, if a link is holding a reference, then we cannot find it by simply looking at the inflight list. Enable checking of the poll and timeout list to find the link, and cancel it appropriately. Cc: stable@vger.kernel.org Reported-by: Josef Signed-off-by: Jens Axboe commit 9643609423c7667fb748cc3ccff023d761d0ac90 Author: David S. Miller Date: Wed Aug 12 13:26:37 2020 -0700 Revert "ipv4: tunnel: fix compilation on ARCH=um" This reverts commit 06a7a37be55e29961c9ba2abec4d07c8e0e21861. The bug was already fixed, this added a dup include. Reported-by: Eric Dumazet Signed-off-by: David S. Miller commit 2e0d8fef5f76bce0887c73b824d9e625a08e7406 Author: Eric Dumazet Date: Tue Aug 11 18:34:40 2020 -0700 net: accept an empty mask in /sys/class/net/*/queues/rx-*/rps_cpus We must accept an empty mask in store_rps_map(), or we are not able to disable RPS on a queue. Fixes: 07bbecb34106 ("net: Restrict receive packets queuing to housekeeping CPUs") Signed-off-by: Eric Dumazet Reported-by: Maciej Żenczykowski Cc: Alex Belits Cc: Nitesh Narayan Lal Cc: Peter Zijlstra (Intel) Reviewed-by: Maciej Żenczykowski Acked-by: Peter Zijlstra (Intel) Acked-by: Nitesh Narayan Lal Signed-off-by: David S. Miller commit ae8bd3021c34a40a5e63df90f6ac5a0efedc04fe Merge: 06a7a37be55e2 df43dd526e660 Author: David S. Miller Date: Wed Aug 12 13:12:52 2020 -0700 Merge branch 'net-stmmac-Fix-multicast-filter-on-IPQ806x' Jonathan McDowell says: ==================== net: stmmac: Fix multicast filter on IPQ806x This pair of patches are the result of discovering a failure to correctly receive IPv6 multicast packets on such a device (in particular DHCPv6 requests and RA solicitations). Putting the device into promiscuous mode, or allmulti, both resulted in such packets correctly being received. Examination of the vendor driver (nss-gmac from the qsdk) shows that it does not enable the multicast filter and instead falls back to allmulti. Extend the base dwmac1000 driver to fall back when there's no suitable hardware filter, and update the ipq806x platform to request this. ==================== Signed-off-by: David S. Miller commit df43dd526e6609769ae513a81443c7aa727c8ca3 Author: Jonathan McDowell Date: Wed Aug 12 20:37:23 2020 +0100 net: ethernet: stmmac: Disable hardware multicast filter The IPQ806x does not appear to have a functional multicast ethernet address filter. This was observed as a failure to correctly receive IPv6 packets on a LAN to the all stations address. Checking the vendor driver shows that it does not attempt to enable the multicast filter and instead falls back to receiving all multicast packets, internally setting ALLMULTI. Use the new fallback support in the dwmac1000 driver to correctly achieve the same with the mainline IPQ806x driver. Confirmed to fix IPv6 functionality on an RB3011 router. Cc: stable@vger.kernel.org Signed-off-by: Jonathan McDowell Signed-off-by: David S. Miller commit 592d751c1e174df5ff219946908b005eb48934b3 Author: Jonathan McDowell Date: Wed Aug 12 20:37:01 2020 +0100 net: stmmac: dwmac1000: provide multicast filter fallback If we don't have a hardware multicast filter available then instead of silently failing to listen for the requested ethernet broadcast addresses fall back to receiving all multicast packets, in a similar fashion to other drivers with no multicast filter. Cc: stable@vger.kernel.org Signed-off-by: Jonathan McDowell Signed-off-by: David S. Miller commit b1eef236f50ba6afea680da039ef3a2ca9c43d11 Author: Dhananjay Phadke Date: Mon Aug 10 17:42:40 2020 -0700 i2c: iproc: fix race between client unreg and isr When i2c client unregisters, synchronize irq before setting iproc_i2c->slave to NULL. (1) disable_irq() (2) Mask event enable bits in control reg (3) Erase slave address (avoid further writes to rx fifo) (4) Flush tx and rx FIFOs (5) Clear pending event (interrupt) bits in status reg (6) enable_irq() (7) Set client pointer to NULL Unable to handle kernel NULL pointer dereference at virtual address 0000000000000318 [ 371.020421] pc : bcm_iproc_i2c_isr+0x530/0x11f0 [ 371.025098] lr : __handle_irq_event_percpu+0x6c/0x170 [ 371.030309] sp : ffff800010003e40 [ 371.033727] x29: ffff800010003e40 x28: 0000000000000060 [ 371.039206] x27: ffff800010ca9de0 x26: ffff800010f895df [ 371.044686] x25: ffff800010f18888 x24: ffff0008f7ff3600 [ 371.050165] x23: 0000000000000003 x22: 0000000001600000 [ 371.055645] x21: ffff800010f18888 x20: 0000000001600000 [ 371.061124] x19: ffff0008f726f080 x18: 0000000000000000 [ 371.066603] x17: 0000000000000000 x16: 0000000000000000 [ 371.072082] x15: 0000000000000000 x14: 0000000000000000 [ 371.077561] x13: 0000000000000000 x12: 0000000000000001 [ 371.083040] x11: 0000000000000000 x10: 0000000000000040 [ 371.088519] x9 : ffff800010f317c8 x8 : ffff800010f317c0 [ 371.093999] x7 : ffff0008f805b3b0 x6 : 0000000000000000 [ 371.099478] x5 : ffff0008f7ff36a4 x4 : ffff8008ee43d000 [ 371.104957] x3 : 0000000000000000 x2 : ffff8000107d64c0 [ 371.110436] x1 : 00000000c00000af x0 : 0000000000000000 [ 371.115916] Call trace: [ 371.118439] bcm_iproc_i2c_isr+0x530/0x11f0 [ 371.122754] __handle_irq_event_percpu+0x6c/0x170 [ 371.127606] handle_irq_event_percpu+0x34/0x88 [ 371.132189] handle_irq_event+0x40/0x120 [ 371.136234] handle_fasteoi_irq+0xcc/0x1a0 [ 371.140459] generic_handle_irq+0x24/0x38 [ 371.144594] __handle_domain_irq+0x60/0xb8 [ 371.148820] gic_handle_irq+0xc0/0x158 [ 371.152687] el1_irq+0xb8/0x140 [ 371.155927] arch_cpu_idle+0x10/0x18 [ 371.159615] do_idle+0x204/0x290 [ 371.162943] cpu_startup_entry+0x24/0x60 [ 371.166990] rest_init+0xb0/0xbc [ 371.170322] arch_call_rest_init+0xc/0x14 [ 371.174458] start_kernel+0x404/0x430 Fixes: c245d94ed106 ("i2c: iproc: Add multi byte read-write support for slave mode") Signed-off-by: Dhananjay Phadke Reviewed-by: Florian Fainelli Acked-by: Ray Jui Signed-off-by: Wolfram Sang commit 06a7a37be55e29961c9ba2abec4d07c8e0e21861 Author: Johannes Berg Date: Wed Aug 12 21:08:53 2020 +0200 ipv4: tunnel: fix compilation on ARCH=um With certain configurations, a 64-bit ARCH=um errors out here with an unknown csum_ipv6_magic() function. Include the right header file to always have it. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 1980c05844830a44708c98c96d600833aa3fae08 Author: Stefano Garzarella Date: Wed Aug 12 14:56:02 2020 +0200 vsock: fix potential null pointer dereference in vsock_poll() syzbot reported this issue where in the vsock_poll() we find the socket state at TCP_ESTABLISHED, but 'transport' is null: general protection fault, probably for non-canonical address 0xdffffc0000000012: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000090-0x0000000000000097] CPU: 0 PID: 8227 Comm: syz-executor.2 Not tainted 5.8.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:vsock_poll+0x75a/0x8e0 net/vmw_vsock/af_vsock.c:1038 Call Trace: sock_poll+0x159/0x460 net/socket.c:1266 vfs_poll include/linux/poll.h:90 [inline] do_pollfd fs/select.c:869 [inline] do_poll fs/select.c:917 [inline] do_sys_poll+0x607/0xd40 fs/select.c:1011 __do_sys_poll fs/select.c:1069 [inline] __se_sys_poll fs/select.c:1057 [inline] __x64_sys_poll+0x18c/0x440 fs/select.c:1057 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This issue can happen if the TCP_ESTABLISHED state is set after we read the vsk->transport in the vsock_poll(). We could put barriers to synchronize, but this can only happen during connection setup, so we can simply check that 'transport' is valid. Fixes: c0cfa2d8a788 ("vsock: add multi-transports support") Reported-and-tested-by: syzbot+a61bac2fcc1a7c6623fe@syzkaller.appspotmail.com Signed-off-by: Stefano Garzarella Reviewed-by: Jorgen Hansen Signed-off-by: David S. Miller commit 41077c99026643c633a1f79376d369fffc757e06 Author: Edward Cree Date: Wed Aug 12 10:32:49 2020 +0100 sfc: fix ef100 design-param checking The handling of the RXQ/TXQ size granularity design-params had two problems: it had a 64-bit divide that didn't build on 32-bit platforms, and it could divide by zero if the NIC supplied 0 as the value of the design-param. Fix both by checking for 0 and for a granularity bigger than our min-size; if the granularity <= EFX_MIN_DMAQ_SIZE then it fits in 32 bits, so we can cast it to u32 for the divide. Reported-by: kernel test robot Signed-off-by: Edward Cree Reviewed-by: Guenter Roeck Signed-off-by: David S. Miller commit 7c2a69f610e64c8dec6a06a66e721f4ce1dd783a Merge: 7a02c8d45bbf6 02e37571f9e79 Author: Linus Torvalds Date: Wed Aug 12 12:51:31 2020 -0700 Merge tag 'ceph-for-5.9-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "Xiubo has completed his work on filesystem client metrics, they are sent to all available MDSes once per second now. Other than that, we have a lot of fixes and cleanups all around the filesystem, including a tweak to cut down on MDS request resends in multi-MDS setups from Yanhu and fixups for SELinux symlink labeling and MClientSession message decoding from Jeff" * tag 'ceph-for-5.9-rc1' of git://github.com/ceph/ceph-client: (22 commits) ceph: handle zero-length feature mask in session messages ceph: use frag's MDS in either mode ceph: move sb->wb_pagevec_pool to be a global mempool ceph: set sec_context xattr on symlink creation ceph: remove redundant initialization of variable mds ceph: fix use-after-free for fsc->mdsc ceph: remove unused variables in ceph_mdsmap_decode() ceph: delete repeated words in fs/ceph/ ceph: send client provided metric flags in client metadata ceph: periodically send perf metrics to MDSes ceph: check the sesion state and return false in case it is closed libceph: replace HTTP links with HTTPS ones ceph: remove unnecessary cast in kfree() libceph: just have osd_req_op_init() return a pointer ceph: do not access the kiocb after aio requests ceph: clean up and optimize ceph_check_delayed_caps() ceph: fix potential mdsc use-after-free crash ceph: switch to WARN_ON_ONCE in encode_supported_features() ceph: add global total_caps to count the mdsc's total caps number ceph: add check_session_state() helper and make it global ... commit 7a02c8d45bbf65cf432292c2032147fa7529de58 Merge: 8cd84b709647a e96ebd589debd Author: Linus Torvalds Date: Wed Aug 12 12:41:15 2020 -0700 Merge branch 'parisc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull more parisc updates from Helge Deller: - Oscar Carter contributed a patch which fixes parisc's usage of dereference_function_descriptor() and thus will allow using the -Wcast-function-type compiler option in the top-level Makefile - Sven Schnelle fixed a bug in the SBA code to prevent crashes during kexec - John David Anglin provided implementations for __smp_store_release() and __smp_load_acquire barriers() which avoids using the sync assembler instruction and thus speeds up barrier paths - Some whitespace cleanups in parisc's atomic.h header file * 'parisc-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Implement __smp_store_release and __smp_load_acquire barriers parisc: mask out enable and reserved bits from sba imask parisc: Whitespace cleanups in atomic.h parisc/kernel/ftrace: Remove function callback casts sections.h: dereference_function_descriptor() returns void pointer commit 8cd84b709647a015790a94bc809068b7a55cc05a Merge: 05a5b5d8a2cd8 e792415c5d3e0 Author: Linus Torvalds Date: Wed Aug 12 12:25:06 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull more KVM updates from Paolo Bonzini: "PPC: - Improvements and bugfixes for secure VM support, giving reduced startup time and memory hotplug support. - Locking fixes in nested KVM code - Increase number of guests supported by HV KVM to 4094 - Preliminary POWER10 support ARM: - Split the VHE and nVHE hypervisor code bases, build the EL2 code separately, allowing for the VHE code to now be built with instrumentation - Level-based TLB invalidation support - Restructure of the vcpu register storage to accomodate the NV code - Pointer Authentication available for guests on nVHE hosts - Simplification of the system register table parsing - MMU cleanups and fixes - A number of post-32bit cleanups and other fixes MIPS: - compilation fixes x86: - bugfixes - support for the SERIALIZE instruction" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (70 commits) KVM: MIPS/VZ: Fix build error caused by 'kvm_run' cleanup x86/kvm/hyper-v: Synic default SCONTROL MSR needs to be enabled MIPS: KVM: Convert a fallthrough comment to fallthrough MIPS: VZ: Only include loongson_regs.h for CPU_LOONGSON64 x86: Expose SERIALIZE for supported cpuid KVM: x86: Don't attempt to load PDPTRs when 64-bit mode is enabled KVM: arm64: Move S1PTW S2 fault logic out of io_mem_abort() KVM: arm64: Don't skip cache maintenance for read-only memslots KVM: arm64: Handle data and instruction external aborts the same way KVM: arm64: Rename kvm_vcpu_dabt_isextabt() KVM: arm: Add trace name for ARM_NISV KVM: arm64: Ensure that all nVHE hyp code is in .hyp.text KVM: arm64: Substitute RANDOMIZE_BASE for HARDEN_EL2_VECTORS KVM: arm64: Make nVHE ASLR conditional on RANDOMIZE_BASE KVM: PPC: Book3S HV: Rework secure mem slot dropping KVM: PPC: Book3S HV: Move kvmppc_svm_page_out up KVM: PPC: Book3S HV: Migrate hot plugged memory KVM: PPC: Book3S HV: In H_SVM_INIT_DONE, migrate remaining normal-GFNs to secure-GFNs KVM: PPC: Book3S HV: Track the state GFNs associated with secure VMs KVM: PPC: Book3S HV: Disable page merging in H_SVM_INIT_START ... commit 05a5b5d8a2cd82e2bf5a01ad064efa396ec7fbef Merge: 4586039427fab dd9c697a944a0 Author: Linus Torvalds Date: Wed Aug 12 12:19:49 2020 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull more clk updates from Stephen Boyd: "Here's some more updates that missed the last pull request because I happened to tag the tree at an earlier point in the history of clk-next. I must have fat fingered it and checked out an older version of clk-next on this second computer I'm using. This time it actually includes more code for Qualcomm SoCs, the AT91 major updates, and some Rockchip SoC clk driver updates as well. I've corrected this flow so this shouldn't happen again" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (83 commits) clk: bcm2835: Do not use prediv with bcm2711's PLLs clk: drop unused function __clk_get_flags clk: hsdk: Fix bad dependency on IOMEM dt-bindings: clock: Fix YAML schemas for LPASS clocks on SC7180 clk: mmp: avoid missing prototype warning clk: sparx5: Add Sparx5 SoC DPLL clock driver dt-bindings: clock: sparx5: Add bindings include file clk: qoriq: add LS1021A core pll mux options clk: clk-atlas6: fix return value check in atlas6_clk_init() clk: tegra: pll: Improve PLLM enable-state detection clk: X1000: Add support for calculat REFCLK of USB PHY. clk: JZ4780: Reformat the code to align it. clk: JZ4780: Add functions for enable and disable USB PHY. clk: Ingenic: Add RTC related clocks for Ingenic SoCs. dt-bindings: clock: Add tabs to align code. dt-bindings: clock: Add RTC related clocks for Ingenic SoCs. clk: davinci: Use fallthrough pseudo-keyword clk: imx: Use fallthrough pseudo-keyword clk: qcom: gcc-sdm660: Fix up gcc_mss_mnoc_bimc_axi_clk clk: qcom: gcc-sdm660: Add missing modem reset ... commit 4586039427fab2b8c4edd49c73002e13e04315cf Merge: 407bc8d818371 d5b29c2c5ba2b Author: Linus Torvalds Date: Wed Aug 12 12:13:44 2020 -0700 Merge tag 'linux-watchdog-5.9-rc1' of git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - f71808e_wdt imporvements - dw_wdt improvements - mlx-wdt: support new watchdog type with longer timeout period - fallthrough pseudo-keyword replacements - overall small fixes and improvements * tag 'linux-watchdog-5.9-rc1' of git://www.linux-watchdog.org/linux-watchdog: (35 commits) watchdog: rti-wdt: balance pm runtime enable calls watchdog: rti-wdt: attach to running watchdog during probe watchdog: add support for adjusting last known HW keepalive time watchdog: use __watchdog_ping in startup watchdog: softdog: Add options 'soft_reboot_cmd' and 'soft_active_on_boot' watchdog: pcwd_usb: remove needless check before usb_free_coherent() watchdog: Replace HTTP links with HTTPS ones dt-bindings: watchdog: renesas,wdt: Document r8a774e1 support watchdog: initialize device before misc_register watchdog: booke_wdt: Add common nowayout parameter driver watchdog: scx200_wdt: Use fallthrough pseudo-keyword watchdog: Use fallthrough pseudo-keyword watchdog: f71808e_wdt: do stricter parameter validation watchdog: f71808e_wdt: clear watchdog timeout occurred flag watchdog: f71808e_wdt: remove use of wrong watchdog_info option watchdog: f71808e_wdt: indicate WDIOF_CARDRESET support in watchdog_info.options docs: watchdog: codify ident.options as superset of possible status flags dt-bindings: watchdog: Add compatible for QCS404, SC7180, SDM845, SM8150 dt-bindings: watchdog: Convert QCOM watchdog timer bindings to YAML watchdog: dw_wdt: Add DebugFS files ... commit 407bc8d81837197ef02c7296f8068d3bf2c96f53 Merge: ea6ec77437274 ccd59dce1a21f Author: Linus Torvalds Date: Wed Aug 12 12:09:36 2020 -0700 Merge tag 'vfio-v5.9-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Inclusive naming updates (Alex Williamson) - Intel X550 INTx quirk (Alex Williamson) - Error path resched between unmaps (Xiang Zheng) - SPAPR IOMMU pin_user_pages() conversion (John Hubbard) - Trivial mutex simplification (Alex Williamson) - QAT device denylist (Giovanni Cabiddu) - type1 IOMMU ioctl refactor (Liu Yi L) * tag 'vfio-v5.9-rc1' of git://github.com/awilliam/linux-vfio: vfio/type1: Refactor vfio_iommu_type1_ioctl() vfio/pci: Add QAT devices to denylist vfio/pci: Add device denylist PCI: Add Intel QuickAssist device IDs vfio/pci: Hold igate across releasing eventfd contexts vfio/spapr_tce: convert get_user_pages() --> pin_user_pages() vfio/type1: Add conditional rescheduling after iommu map failed vfio/pci: Add Intel X550 to hidden INTx devices vfio: Cleanup allowed driver naming commit ea6ec774372740b024a6c27caac0d0af8960ea15 Merge: 9ad57f6dfc234 62975d27d647a Author: Linus Torvalds Date: Wed Aug 12 11:53:01 2020 -0700 Merge tag 'drm-next-2020-08-12' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This has a few vmwgfx regression fixes we hit from the merge window (one in TTM), it also has a bunch of amdgpu fixes along with a scattering everywhere else. core: - Fix drm_dp_mst_port refcount leaks in drm_dp_mst_allocate_vcpi - Remove null check for kfree in drm_dev_release. - Fix DRM_FORMAT_MOD_AMLOGIC_FBC definition. - re-added docs for drm_gem_flink_ioctl() - add orientation quirk for ASUS T103HAF ttm: - ttm: fix page-offset calculation within TTM - revert patch causing vmwgfx regressions fbcon: - Fix a fbcon OOB read in fbdev, found by syzbot. vga: - Mark vga_tryget static as it's not used elsewhere. amdgpu: - Re-add spelling typo fix - Sienna Cichlid fixes - Navy Flounder fixes - DC fixes - SMU i2c fix - Power fixes vmwgfx: - regression fixes for modesetting crashes - misc fixes xlnx: - Small fixes to xlnx. omap: - Fix mode initialization in omap_connector_mode_valid(). - force runtime PM suspend on system suspend tidss: - fix modeset init for DPI panels" * tag 'drm-next-2020-08-12' of git://anongit.freedesktop.org/drm/drm: (70 commits) drm/ttm: revert "drm/ttm: make TT creation purely optional v3" drm/vmwgfx: fix spelling mistake "Cant" -> "Can't" drm/vmwgfx: fix spelling mistake "Cound" -> "Could" drm/vmwgfx/ldu: Use drm_mode_config_reset drm/vmwgfx/sou: Use drm_mode_config_reset drm/vmwgfx/stdu: Use drm_mode_config_reset drm/vmwgfx: Fix two list_for_each loop exit tests drm/vmwgfx: Use correct vmw_legacy_display_unit pointer drm/vmwgfx: Use struct_size() helper drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume drm/amd/powerplay: put VCN/JPEG into PG ungate state before dpm table setup(V3) drm/amd/powerplay: update swSMU VCN/JPEG PG logics drm/amdgpu: use mode1 reset by default for sienna_cichlid drm/amdgpu/smu: rework i2c adpater registration drm/amd/display: Display goes blank after inst drm/amd/display: Change null plane state swizzle mode to 4kb_s drm/amd/display: Use helper function to check for HDMI signal drm/amd/display: AMD OUI (DPCD 0x00300) skipped on some sink drm/amd/display: Fix logger context drm/amd/display: populate new dml variable ... commit 9ad57f6dfc2345ed5d3a8bf4dabac0a34069c54c Merge: 24fb33d40d60b 64019a2e467a2 Author: Linus Torvalds Date: Wed Aug 12 11:24:12 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - most of the rest of MM (memcg, hugetlb, vmscan, proc, compaction, mempolicy, oom-kill, hugetlbfs, migration, thp, cma, util, memory-hotplug, cleanups, uaccess, migration, gup, pagemap), - various other subsystems (alpha, misc, sparse, bitmap, lib, bitops, checkpatch, autofs, minix, nilfs, ufs, fat, signals, kmod, coredump, exec, kdump, rapidio, panic, kcov, kgdb, ipc). * emailed patches from Andrew Morton : (164 commits) mm/gup: remove task_struct pointer for all gup code mm: clean up the last pieces of page fault accountings mm/xtensa: use general page fault accounting mm/x86: use general page fault accounting mm/sparc64: use general page fault accounting mm/sparc32: use general page fault accounting mm/sh: use general page fault accounting mm/s390: use general page fault accounting mm/riscv: use general page fault accounting mm/powerpc: use general page fault accounting mm/parisc: use general page fault accounting mm/openrisc: use general page fault accounting mm/nios2: use general page fault accounting mm/nds32: use general page fault accounting mm/mips: use general page fault accounting mm/microblaze: use general page fault accounting mm/m68k: use general page fault accounting mm/ia64: use general page fault accounting mm/hexagon: use general page fault accounting mm/csky: use general page fault accounting ... commit 64019a2e467a288a16b65ab55ddcbf58c1b00187 Author: Peter Xu Date: Tue Aug 11 18:39:01 2020 -0700 mm/gup: remove task_struct pointer for all gup code After the cleanup of page fault accounting, gup does not need to pass task_struct around any more. Remove that parameter in the whole gup stack. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Reviewed-by: John Hubbard Link: http://lkml.kernel.org/r/20200707225021.200906-26-peterx@redhat.com Signed-off-by: Linus Torvalds commit a2beb5f1efede6924a4258462a5660572e6ca864 Author: Peter Xu Date: Tue Aug 11 18:38:57 2020 -0700 mm: clean up the last pieces of page fault accountings Here're the last pieces of page fault accounting that were still done outside handle_mm_fault() where we still have regs==NULL when calling handle_mm_fault(): arch/powerpc/mm/copro_fault.c: copro_handle_mm_fault arch/sparc/mm/fault_32.c: force_user_fault arch/um/kernel/trap.c: handle_page_fault mm/gup.c: faultin_page fixup_user_fault mm/hmm.c: hmm_vma_fault mm/ksm.c: break_ksm Some of them has the issue of duplicated accounting for page fault retries. Some of them didn't do the accounting at all. This patch cleans all these up by letting handle_mm_fault() to do per-task page fault accounting even if regs==NULL (though we'll still skip the perf event accountings). With that, we can safely remove all the outliers now. There's another functional change in that now we account the page faults to the caller of gup, rather than the task_struct that passed into the gup code. More information of this can be found at [1]. After this patch, below things should never be touched again outside handle_mm_fault(): - task_struct.[maj|min]_flt - PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN] [1] https://lore.kernel.org/lkml/CAHk-=wj_V2Tps2QrMn20_W0OJF9xqNh52XSGA42s-ZJ8Y+GyKw@mail.gmail.com/ Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: Albert Ou Cc: Alexander Gordeev Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Brian Cain Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Chris Zankel Cc: Dave Hansen Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Gerald Schaefer Cc: Greentime Hu Cc: Guo Ren Cc: Heiko Carstens Cc: Helge Deller Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: James E.J. Bottomley Cc: John Hubbard Cc: Jonas Bonn Cc: Ley Foon Tan Cc: "Luck, Tony" Cc: Matt Turner Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Nick Hu Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vincent Chen Cc: Vineet Gupta Cc: Will Deacon Cc: Yoshinori Sato Link: http://lkml.kernel.org/r/20200707225021.200906-25-peterx@redhat.com Signed-off-by: Linus Torvalds commit 484e51e4af528a408b8e0f2db4865625169279cf Author: Peter Xu Date: Tue Aug 11 18:38:53 2020 -0700 mm/xtensa: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Remove the PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN] perf events because it's now also done in handle_mm_fault(). Move the PERF_COUNT_SW_PAGE_FAULTS event higher before taking mmap_sem for the fault, then it'll match with the rest of the archs. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Acked-by: Max Filippov Cc: Chris Zankel Link: http://lkml.kernel.org/r/20200707225021.200906-24-peterx@redhat.com Signed-off-by: Linus Torvalds commit 968614fc7b8410e1ee99d0111015a1bf3e955f64 Author: Peter Xu Date: Tue Aug 11 18:38:49 2020 -0700 mm/x86: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: H. Peter Anvin Link: http://lkml.kernel.org/r/20200707225021.200906-23-peterx@redhat.com Signed-off-by: Linus Torvalds commit f08147df4092dd5093b85dbccbd34a7843fb60bf Author: Peter Xu Date: Tue Aug 11 18:38:46 2020 -0700 mm/sparc64: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Acked-by: David S. Miller Link: http://lkml.kernel.org/r/20200707225021.200906-22-peterx@redhat.com Signed-off-by: Linus Torvalds commit 56e10e6ab11924b19b7c9583750fdd4e440e25c8 Author: Peter Xu Date: Tue Aug 11 18:38:43 2020 -0700 mm/sparc32: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Acked-by: David S. Miller Link: http://lkml.kernel.org/r/20200707225021.200906-21-peterx@redhat.com Signed-off-by: Linus Torvalds commit 105f886220e944b6aa01accfad59af49341703c4 Author: Peter Xu Date: Tue Aug 11 18:38:40 2020 -0700 mm/sh: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: Yoshinori Sato Cc: Rich Felker Link: http://lkml.kernel.org/r/20200707225021.200906-20-peterx@redhat.com Signed-off-by: Linus Torvalds commit 35e45f3e5a1fe652df2153f2b1c7dd234d448356 Author: Peter Xu Date: Tue Aug 11 18:38:37 2020 -0700 mm/s390: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Reviewed-by: Gerald Schaefer Acked-by: Gerald Schaefer Cc: Alexander Gordeev Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Link: http://lkml.kernel.org/r/20200707225021.200906-19-peterx@redhat.com Signed-off-by: Linus Torvalds commit 5ac365a458902214adfbe3567c94e114cc91cde6 Author: Peter Xu Date: Tue Aug 11 18:38:34 2020 -0700 mm/riscv: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Acked-by: Palmer Dabbelt Cc: Paul Walmsley Cc: Albert Ou Link: http://lkml.kernel.org/r/20200707225021.200906-18-peterx@redhat.com Signed-off-by: Linus Torvalds commit 428fdc094492e720c342f1c934e7972cbc328d13 Author: Peter Xu Date: Tue Aug 11 18:38:31 2020 -0700 mm/powerpc: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Acked-by: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Link: http://lkml.kernel.org/r/20200707225021.200906-17-peterx@redhat.com Signed-off-by: Linus Torvalds commit af8a7926273645dc81f9e7f5c3e18136abebf05b Author: Peter Xu Date: Tue Aug 11 18:38:28 2020 -0700 mm/parisc: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Add the missing PERF_COUNT_SW_PAGE_FAULTS perf events too. Note, the other two perf events (PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN]) were done in handle_mm_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: James E.J. Bottomley Cc: Helge Deller Link: http://lkml.kernel.org/r/20200707225021.200906-16-peterx@redhat.com Signed-off-by: Linus Torvalds commit 38caa902dccad61e02273c18a633fc5be91aeca5 Author: Peter Xu Date: Tue Aug 11 18:38:25 2020 -0700 mm/openrisc: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Add the missing PERF_COUNT_SW_PAGE_FAULTS perf events too. Note, the other two perf events (PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN]) were done in handle_mm_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Acked-by: Stafford Horne Cc: Jonas Bonn Cc: Stefan Kristiansson Link: http://lkml.kernel.org/r/20200707225021.200906-15-peterx@redhat.com Signed-off-by: Linus Torvalds commit 4487dcf9b75180eb5115c196ca9bd6ebefade5b3 Author: Peter Xu Date: Tue Aug 11 18:38:22 2020 -0700 mm/nios2: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Add the missing PERF_COUNT_SW_PAGE_FAULTS perf events too. Note, the other two perf events (PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN]) were done in handle_mm_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: Ley Foon Tan Link: http://lkml.kernel.org/r/20200707225021.200906-14-peterx@redhat.com Signed-off-by: Linus Torvalds commit daf7bf5d90397bc0f3d7b45030461f55eb9c74fa Author: Peter Xu Date: Tue Aug 11 18:38:19 2020 -0700 mm/nds32: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Fix PERF_COUNT_SW_PAGE_FAULTS perf event manually for page fault retries, by moving it before taking mmap_sem. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Acked-by: Greentime Hu Cc: Nick Hu Cc: Vincent Chen Link: http://lkml.kernel.org/r/20200707225021.200906-13-peterx@redhat.com Signed-off-by: Linus Torvalds commit 2558fd7f5c3eda31d4474c7cdc8dc4b3bb6526f5 Author: Peter Xu Date: Tue Aug 11 18:38:15 2020 -0700 mm/mips: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Fix PERF_COUNT_SW_PAGE_FAULTS perf event manually for page fault retries, by moving it before taking mmap_sem. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Acked-by: Thomas Bogendoerfer Link: http://lkml.kernel.org/r/20200707225021.200906-12-peterx@redhat.com Signed-off-by: Linus Torvalds commit aeb6aefc3129307858e4d5a4b73ae28f1871ae05 Author: Peter Xu Date: Tue Aug 11 18:38:12 2020 -0700 mm/microblaze: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Add the missing PERF_COUNT_SW_PAGE_FAULTS perf events too. Note, the other two perf events (PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN]) were done in handle_mm_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: Michal Simek Link: http://lkml.kernel.org/r/20200707225021.200906-11-peterx@redhat.com Signed-off-by: Linus Torvalds commit e1c17f627b4232e2c7e9edb7151fa60a746150ee Author: Peter Xu Date: Tue Aug 11 18:38:09 2020 -0700 mm/m68k: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Add the missing PERF_COUNT_SW_PAGE_FAULTS perf events too. Note, the other two perf events (PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN]) were done in handle_mm_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: Geert Uytterhoeven Link: http://lkml.kernel.org/r/20200707225021.200906-10-peterx@redhat.com Signed-off-by: Linus Torvalds commit b444eed891cf8656af1f59d239f77c5338481774 Author: Peter Xu Date: Tue Aug 11 18:38:06 2020 -0700 mm/ia64: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Add the missing PERF_COUNT_SW_PAGE_FAULTS perf events too. Note, the other two perf events (PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN]) were done in handle_mm_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: "Luck, Tony" Link: http://lkml.kernel.org/r/20200707225021.200906-9-peterx@redhat.com Signed-off-by: Linus Torvalds commit e08157c3c4239fac29879143019c96498ba9c2bc Author: Peter Xu Date: Tue Aug 11 18:38:03 2020 -0700 mm/hexagon: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Add the missing PERF_COUNT_SW_PAGE_FAULTS perf events too. Note, the other two perf events (PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN]) were done in handle_mm_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Acked-by: Brian Cain Link: http://lkml.kernel.org/r/20200707225021.200906-8-peterx@redhat.com Signed-off-by: Linus Torvalds commit a2a9e439baf8aca2af1e614fab7956c09091a6d1 Author: Peter Xu Date: Tue Aug 11 18:38:00 2020 -0700 mm/csky: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Acked-by: Guo Ren Link: http://lkml.kernel.org/r/20200707225021.200906-7-peterx@redhat.com Signed-off-by: Linus Torvalds commit 6a1bb025d28e1026fead73b7b33e2dfccba3f4d2 Author: Peter Xu Date: Tue Aug 11 18:37:57 2020 -0700 mm/arm64: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. To do this, we pass pt_regs pointer into __do_page_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Acked-by: Will Deacon Cc: Catalin Marinas Link: http://lkml.kernel.org/r/20200707225021.200906-6-peterx@redhat.com Signed-off-by: Linus Torvalds commit 79fea6c6548e28400d7870c61477d35aecb7baf8 Author: Peter Xu Date: Tue Aug 11 18:37:54 2020 -0700 mm/arm: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. To do this, we need to pass the pt_regs pointer into __do_page_fault(). Fix PERF_COUNT_SW_PAGE_FAULTS perf event manually for page fault retries, by moving it before taking mmap_sem. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: Russell King Cc: Will Deacon Link: http://lkml.kernel.org/r/20200707225021.200906-5-peterx@redhat.com Signed-off-by: Linus Torvalds commit 52e3f8d03052036ce97296915a3746421a1da1d0 Author: Peter Xu Date: Tue Aug 11 18:37:52 2020 -0700 mm/arc: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). It naturally solve the issue of multiple page fault accounting when page fault retry happened. Fix PERF_COUNT_SW_PAGE_FAULTS perf event manually for page fault retries, by moving it before taking mmap_sem. Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: Vineet Gupta Link: http://lkml.kernel.org/r/20200707225021.200906-4-peterx@redhat.com Signed-off-by: Linus Torvalds commit c0f6eda41f97dbe4e4feda914c18d019b9b9fccd Author: Peter Xu Date: Tue Aug 11 18:37:49 2020 -0700 mm/alpha: use general page fault accounting Use the general page fault accounting by passing regs into handle_mm_fault(). Add the missing PERF_COUNT_SW_PAGE_FAULTS perf events too. Note, the other two perf events (PERF_COUNT_SW_PAGE_FAULTS_[MAJ|MIN]) were done in handle_mm_fault(). Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Link: http://lkml.kernel.org/r/20200707225021.200906-3-peterx@redhat.com Signed-off-by: Linus Torvalds commit bce617edecada007aee8610fbe2c14d10b8de2f6 Author: Peter Xu Date: Tue Aug 11 18:37:44 2020 -0700 mm: do page fault accounting in handle_mm_fault Patch series "mm: Page fault accounting cleanups", v5. This is v5 of the pf accounting cleanup series. It originates from Gerald Schaefer's report on an issue a week ago regarding to incorrect page fault accountings for retried page fault after commit 4064b9827063 ("mm: allow VM_FAULT_RETRY for multiple times"): https://lore.kernel.org/lkml/20200610174811.44b94525@thinkpad/ What this series did: - Correct page fault accounting: we do accounting for a page fault (no matter whether it's from #PF handling, or gup, or anything else) only with the one that completed the fault. For example, page fault retries should not be counted in page fault counters. Same to the perf events. - Unify definition of PERF_COUNT_SW_PAGE_FAULTS: currently this perf event is used in an adhoc way across different archs. Case (1): for many archs it's done at the entry of a page fault handler, so that it will also cover e.g. errornous faults. Case (2): for some other archs, it is only accounted when the page fault is resolved successfully. Case (3): there're still quite some archs that have not enabled this perf event. Since this series will touch merely all the archs, we unify this perf event to always follow case (1), which is the one that makes most sense. And since we moved the accounting into handle_mm_fault, the other two MAJ/MIN perf events are well taken care of naturally. - Unify definition of "major faults": the definition of "major fault" is slightly changed when used in accounting (not VM_FAULT_MAJOR). More information in patch 1. - Always account the page fault onto the one that triggered the page fault. This does not matter much for #PF handlings, but mostly for gup. More information on this in patch 25. Patchset layout: Patch 1: Introduced the accounting in handle_mm_fault(), not enabled. Patch 2-23: Enable the new accounting for arch #PF handlers one by one. Patch 24: Enable the new accounting for the rest outliers (gup, iommu, etc.) Patch 25: Cleanup GUP task_struct pointer since it's not needed any more This patch (of 25): This is a preparation patch to move page fault accountings into the general code in handle_mm_fault(). This includes both the per task flt_maj/flt_min counters, and the major/minor page fault perf events. To do this, the pt_regs pointer is passed into handle_mm_fault(). PERF_COUNT_SW_PAGE_FAULTS should still be kept in per-arch page fault handlers. So far, all the pt_regs pointer that passed into handle_mm_fault() is NULL, which means this patch should have no intented functional change. Suggested-by: Linus Torvalds Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Cc: Albert Ou Cc: Alexander Gordeev Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Brian Cain Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Chris Zankel Cc: Dave Hansen Cc: David S. Miller Cc: Geert Uytterhoeven Cc: Gerald Schaefer Cc: Greentime Hu Cc: Guo Ren Cc: Heiko Carstens Cc: Helge Deller Cc: H. Peter Anvin Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: James E.J. Bottomley Cc: John Hubbard Cc: Jonas Bonn Cc: Ley Foon Tan Cc: "Luck, Tony" Cc: Matt Turner Cc: Max Filippov Cc: Michael Ellerman Cc: Michal Simek Cc: Nick Hu Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Richard Henderson Cc: Rich Felker Cc: Russell King Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vincent Chen Cc: Vineet Gupta Cc: Will Deacon Cc: Yoshinori Sato Link: http://lkml.kernel.org/r/20200707225021.200906-1-peterx@redhat.com Link: http://lkml.kernel.org/r/20200707225021.200906-2-peterx@redhat.com Signed-off-by: Linus Torvalds commit ed03d924587e7dfc54f1ace81e5f5a497a7d9666 Author: Joonsoo Kim Date: Tue Aug 11 18:37:41 2020 -0700 mm/gup: use a standard migration target allocation callback There is a well-defined migration target allocation callback. Use it. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: "Aneesh Kumar K . V" Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Link: http://lkml.kernel.org/r/1596180906-8442-3-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit bbe88753bd42b1faf1458dde8f58ff1239990436 Author: Joonsoo Kim Date: Tue Aug 11 18:37:38 2020 -0700 mm/hugetlb: make hugetlb migration callback CMA aware new_non_cma_page() in gup.c requires to allocate the new page that is not on the CMA area. new_non_cma_page() implements it by using allocation scope APIs. However, there is a work-around for hugetlb. Normal hugetlb page allocation API for migration is alloc_huge_page_nodemask(). It consists of two steps. First is dequeing from the pool. Second is, if there is no available page on the queue, allocating by using the page allocator. new_non_cma_page() can't use this API since first step (deque) isn't aware of scope API to exclude CMA area. So, new_non_cma_page() exports hugetlb internal function for the second step, alloc_migrate_huge_page(), to global scope and uses it directly. This is suboptimal since hugetlb pages on the queue cannot be utilized. This patch tries to fix this situation by making the deque function on hugetlb CMA aware. In the deque function, CMA memory is skipped if PF_MEMALLOC_NOCMA flag is found. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Mike Kravetz Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: "Aneesh Kumar K . V" Cc: Christoph Hellwig Cc: Naoya Horiguchi Cc: Roman Gushchin Link: http://lkml.kernel.org/r/1596180906-8442-2-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 41b4dc14ee807cb1bd15e67cad287534046f92dc Author: Joonsoo Kim Date: Tue Aug 11 18:37:34 2020 -0700 mm/gup: restrict CMA region by using allocation scope API We have well defined scope API to exclude CMA region. Use it rather than manipulating gfp_mask manually. With this change, we can now restore __GFP_MOVABLE for gfp_mask like as usual migration target allocation. It would result in that the ZONE_MOVABLE is also searched by page allocator. For hugetlb, gfp_mask is redefined since it has a regular allocation mask filter for migration target. __GPF_NOWARN is added to hugetlb gfp_mask filter since a new user for gfp_mask filter, gup, want to be silent when allocation fails. Note that this can be considered as a fix for the commit 9a4e9f3b2d73 ("mm: update get_user_pages_longterm to migrate pages allocated from CMA region"). However, "Fixes" tag isn't added here since it is just suboptimal but it doesn't cause any problem. Suggested-by: Michal Hocko Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Christoph Hellwig Cc: Roman Gushchin Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: "Aneesh Kumar K . V" Link: http://lkml.kernel.org/r/1596180906-8442-1-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 8b94e0b8be360cf5460331e56a2678ba265f0694 Author: Joonsoo Kim Date: Tue Aug 11 18:37:31 2020 -0700 mm/page_alloc: remove a wrapper for alloc_migration_target() There is a well-defined standard migration target callback. Use it directly. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Link: http://lkml.kernel.org/r/1594622517-20681-8-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit a097631160c3b71a12db224ece7d72208c9b6846 Author: Joonsoo Kim Date: Tue Aug 11 18:37:28 2020 -0700 mm/mempolicy: use a standard migration target allocation callback There is a well-defined migration target allocation callback. Use it. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Link: http://lkml.kernel.org/r/1594622517-20681-7-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 19fc7bed252c16ace29491e4cfa2bafb264eb505 Author: Joonsoo Kim Date: Tue Aug 11 18:37:25 2020 -0700 mm/migrate: introduce a standard migration target allocation function There are some similar functions for migration target allocation. Since there is no fundamental difference, it's better to keep just one rather than keeping all variants. This patch implements base migration target allocation function. In the following patches, variants will be converted to use this function. Changes should be mechanical, but, unfortunately, there are some differences. First, some callers' nodemask is assgined to NULL since NULL nodemask will be considered as all available nodes, that is, &node_states[N_MEMORY]. Second, for hugetlb page allocation, gfp_mask is redefined as regular hugetlb allocation gfp_mask plus __GFP_THISNODE if user provided gfp_mask has it. This is because future caller of this function requires to set this node constaint. Lastly, if provided nodeid is NUMA_NO_NODE, nodeid is set up to the node where migration source lives. It helps to remove simple wrappers for setting up the nodeid. Note that PageHighmem() call in previous function is changed to open-code "is_highmem_idx()" since it provides more readability. [akpm@linux-foundation.org: tweak patch title, per Vlastimil] [akpm@linux-foundation.org: fix typo in comment] Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Link: http://lkml.kernel.org/r/1594622517-20681-6-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 9933a0c8a5396df6dbaef809a9ee4ad64ebc3abe Author: Joonsoo Kim Date: Tue Aug 11 18:37:20 2020 -0700 mm/migrate: clear __GFP_RECLAIM to make the migration callback consistent with regular THP allocations new_page_nodemask is a migration callback and it tries to use a common gfp flags for the target page allocation whether it is a base page or a THP. The later only adds GFP_TRANSHUGE to the given mask. This results in the allocation being slightly more aggressive than necessary because the resulting gfp mask will contain also __GFP_RECLAIM_KSWAPD. THP allocations usually exclude this flag to reduce over eager background reclaim during a high THP allocation load which has been seen during large mmaps initialization. There is no indication that this is a problem for migration as well but theoretically the same might happen when migrating large mappings to a different node. Make the migration callback consistent with regular THP allocations. [akpm@linux-foundation.org: fix comment typo, per Vlastimil] Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Michal Hocko Acked-by: Vlastimil Babka Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Roman Gushchin Link: http://lkml.kernel.org/r/1594622517-20681-5-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit d92bbc2719bd2be237ee336113b63492a6baca3b Author: Joonsoo Kim Date: Tue Aug 11 18:37:17 2020 -0700 mm/hugetlb: unify migration callbacks There is no difference between two migration callback functions, alloc_huge_page_node() and alloc_huge_page_nodemask(), except __GFP_THISNODE handling. It's redundant to have two almost similar functions in order to handle this flag. So, this patch tries to remove one by introducing a new argument, gfp_mask, to alloc_huge_page_nodemask(). After introducing gfp_mask argument, it's caller's job to provide correct gfp_mask. So, every callsites for alloc_huge_page_nodemask() are changed to provide gfp_mask. Note that it's safe to remove a node id check in alloc_huge_page_node() since there is no caller passing NUMA_NO_NODE as a node id. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Reviewed-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Christoph Hellwig Cc: Naoya Horiguchi Cc: Roman Gushchin Link: http://lkml.kernel.org/r/1594622517-20681-4-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit b4b382238ed2f94f0d3860f9120b66404fa99463 Author: Joonsoo Kim Date: Tue Aug 11 18:37:14 2020 -0700 mm/migrate: move migration helper from .h to .c It's not performance sensitive function. Move it to .c. This is a preparation step for future change. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Acked-by: Mike Kravetz Acked-by: Michal Hocko Cc: Christoph Hellwig Cc: Naoya Horiguchi Cc: Roman Gushchin Link: http://lkml.kernel.org/r/1594622517-20681-3-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit c7073bab5772e0e2ab2c766a05f68174974b1ab5 Author: Joonsoo Kim Date: Tue Aug 11 18:37:11 2020 -0700 mm/page_isolation: prefer the node of the source page Patch series "clean-up the migration target allocation functions", v5. This patch (of 9): For locality, it's better to migrate the page to the same node rather than the node of the current caller's cpu. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Christoph Hellwig Cc: Mike Kravetz Cc: Naoya Horiguchi Link: http://lkml.kernel.org/r/1594622517-20681-1-git-send-email-iamjoonsoo.kim@lge.com Link: http://lkml.kernel.org/r/1594622517-20681-2-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit ce14489c8e2d327b56ff3253a3642a6d79b9bca2 Author: Liao Pingfang Date: Tue Aug 11 18:37:08 2020 -0700 ipc/shm.c: remove the superfluous break Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/1594724361-11525-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Linus Torvalds commit 00898e8599a184ae05e2c00903e85dc80d82a43d Author: Alexey Dobriyan Date: Tue Aug 11 18:37:05 2020 -0700 ipc: uninline functions Two functions are only called via function pointers, don't bother inlining them. Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Cc: Manfred Spraul Cc: Davidlohr Bueso Link: http://lkml.kernel.org/r/20200710200312.GA960353@localhost.localdomain Signed-off-by: Linus Torvalds commit a3ec9f38a97545b5923a90a1052cbdb3683b9631 Author: Nick Desaulniers Date: Tue Aug 11 18:37:02 2020 -0700 scripts/gdb: fix python 3.8 SyntaxWarning Fixes the observed warnings: scripts/gdb/linux/rbtree.py:20: SyntaxWarning: "is" with a literal. Did you mean "=="? if node is 0: scripts/gdb/linux/rbtree.py:36: SyntaxWarning: "is" with a literal. Did you mean "=="? if node is 0: It looks like this is a new warning added in Python 3.8. I've only seen this once after adding the add-auto-load-safe-path rule to my ~/.gdbinit for a new tree. Fixes: commit 449ca0c95ea2 ("scripts/gdb: add rb tree iterating utilities") Signed-off-by: Nick Desaulniers Signed-off-by: Andrew Morton Reviewed-by: Stephen Boyd Cc: Jan Kiszka Cc: Kieran Bingham Cc: Aymeric Agon-Rambosson Link: http://lkml.kernel.org/r/20200805225015.2847624-1-ndesaulniers@google.com Link: https://adamj.eu/tech/2020/01/21/why-does-python-3-8-syntaxwarning-for-is-literal/ Signed-off-by: Linus Torvalds commit fed79d057d0842d2e381632b783af30745dd7938 Author: Wei Yongjun Date: Tue Aug 11 18:36:59 2020 -0700 kcov: make some symbols static Fix sparse build warnings: kernel/kcov.c:99:1: warning: symbol '__pcpu_scope_kcov_percpu_data' was not declared. Should it be static? kernel/kcov.c:778:6: warning: symbol 'kcov_remote_softirq_start' was not declared. Should it be static? kernel/kcov.c:795:6: warning: symbol 'kcov_remote_softirq_stop' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Andrew Morton Reviewed-by: Andrey Konovalov Link: http://lkml.kernel.org/r/20200702115501.73077-1-weiyongjun1@huawei.com Signed-off-by: Linus Torvalds commit 31a1b9878c0667945b078c92bce907552f57f2b6 Author: Marco Elver Date: Tue Aug 11 18:36:56 2020 -0700 kcov: unconditionally add -fno-stack-protector to compiler options Unconditionally add -fno-stack-protector to KCOV's compiler options, as all supported compilers support the option. This saves a compiler invocation to determine if the option is supported. Because Clang does not support -fno-conserve-stack, and -fno-stack-protector was wrapped in the same cc-option, we were missing -fno-stack-protector with Clang. Unconditionally adding this option fixes this for Clang. Suggested-by: Nick Desaulniers Signed-off-by: Marco Elver Signed-off-by: Andrew Morton Reviewed-by: Nick Desaulniers Reviewed-by: Andrey Konovalov Cc: Dmitry Vyukov Cc: Alexander Potapenko Link: http://lkml.kernel.org/r/20200615184302.7591-1-elver@google.com Signed-off-by: Linus Torvalds commit 63037f74725ddd8a767ed2ad0369e60a3bf1f2ce Author: Yue Hu Date: Tue Aug 11 18:36:53 2020 -0700 panic: make print_oops_end_marker() static Since print_oops_end_marker() is not used externally, also remove it in kernel.h at the same time. Signed-off-by: Yue Hu Signed-off-by: Andrew Morton Cc: Kees Cook Link: http://lkml.kernel.org/r/20200724011516.12756-1-zbestahu@gmail.com Signed-off-by: Linus Torvalds commit 9d5b134f9f51dd5a67adf8fdc4f59af97e540ceb Author: Tiezhu Yang Date: Tue Aug 11 18:36:49 2020 -0700 lib/Kconfig.debug: fix typo in the help text of CONFIG_PANIC_TIMEOUT There exists duplicated "the" in the help text of CONFIG_PANIC_TIMEOUT, Remove it. Signed-off-by: Tiezhu Yang Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Cc: Xuefeng Li Link: http://lkml.kernel.org/r/1591103358-32087-2-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Linus Torvalds commit 79076e1241bb3bf02d0aac7d39120d8161fe07b1 Author: Tiezhu Yang Date: Tue Aug 11 18:36:46 2020 -0700 kernel/panic.c: make oops_may_print() return bool The return value of oops_may_print() is true or false, so change its type to reflect that. Signed-off-by: Tiezhu Yang Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Cc: Xuefeng Li Link: http://lkml.kernel.org/r/1591103358-32087-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Linus Torvalds commit d71375499d7b0a954e3012d4e16ccad3f28e3d1c Author: Gustavo A. R. Silva Date: Tue Aug 11 18:36:43 2020 -0700 rapidio/rio_mport_cdev: use array_size() helper in copy_{from,to}_user() Use array_size() helper instead of the open-coded version in copy_{from,to}_user(). These sorts of multiplication factors need to be wrapped in array_size(). This issue was found with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Cc: Matt Porter Cc: Alexandre Bounine Link: http://lkml.kernel.org/r/20200616183050.GA31840@embeddedor Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Linus Torvalds commit 330d5589604d7c1d08caa097a97690d2e8c5bb3f Author: Gustavo A. R. Silva Date: Tue Aug 11 18:36:40 2020 -0700 drivers/rapidio/rio-scan.c: use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, while there, use the preferred form for passing a size of a struct. The alternative form where struct name is spelled out hurts readability and introduces an opportunity for a bug when the pointer variable type is changed but the corresponding sizeof that is passed as argument is not. This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses KSPP ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Cc: Matt Porter Cc: Alexandre Bounine Link: http://lkml.kernel.org/r/20200619170445.GA22641@embeddedor Signed-off-by: Linus Torvalds commit 216ec27f3c5215d357f351fa103817c8b62ea804 Author: Gustavo A. R. Silva Date: Tue Aug 11 18:36:37 2020 -0700 drivers/rapidio/devices/rio_mport_cdev.c: use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses KSPP ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Cc: Matt Porter Cc: Alexandre Bounine Link: http://lkml.kernel.org/r/20200619170843.GA24923@embeddedor Signed-off-by: Linus Torvalds commit 0935288c6e008c0682ab6171fb5605dcc049e7bd Author: Vijay Balakrishna Date: Tue Aug 11 18:36:33 2020 -0700 kdump: append kernel build-id string to VMCOREINFO Make kernel GNU build-id available in VMCOREINFO. Having build-id in VMCOREINFO facilitates presenting appropriate kernel namelist image with debug information file to kernel crash dump analysis tools. Currently VMCOREINFO lacks uniquely identifiable key for crash analysis automation. Regarding if this patch is necessary or matching of linux_banner and OSRELEASE in VMCOREINFO employed by crash(8) meets the need -- IMO, build-id approach more foolproof, in most instances it is a cryptographic hash generated using internal code/ELF bits unlike kernel version string upon which linux_banner is based that is external to the code. I feel each is intended for a different purpose. Also OSRELEASE is not suitable when two different kernel builds from same version with different features enabled. Currently for most linux (and non-linux) systems build-id can be extracted using standard methods for file types such as user mode crash dumps, shared libraries, loadable kernel modules etc., This is an exception for linux kernel dump. Having build-id in VMCOREINFO brings some uniformity for automation tools. Tyler said: : I think this is a nice improvement over today's linux_banner approach for : correlating vmlinux to a kernel dump. : : The elf notes parsing in this patch lines up with what is described in in : the "Notes (Nhdr)" section of the elf(5) man page. : : BUILD_ID_MAX is sufficient to hold a sha1 build-id, which is the default : build-id type today in GNU ld(2). It is also sufficient to hold the : "fast" build-id, which is the default build-id type today in LLVM lld(2). Signed-off-by: Vijay Balakrishna Signed-off-by: Andrew Morton Reviewed-by: Tyler Hicks Acked-by: Baoquan He Cc: Dave Young Cc: Vivek Goyal Link: http://lkml.kernel.org/r/1591849672-34104-1-git-send-email-vijayb@linux.microsoft.com Signed-off-by: Linus Torvalds commit 0fd338b2d2cdf827091ae819ae90ad760b94ad0c Author: Kees Cook Date: Tue Aug 11 18:36:30 2020 -0700 exec: move path_noexec() check earlier The path_noexec() check, like the regular file check, was happening too late, letting LSMs see impossible execve()s. Check it earlier as well in may_open() and collect the redundant fs/exec.c path_noexec() test under the same robustness comment as the S_ISREG() check. My notes on the call path, and related arguments, checks, etc: do_open_execat() struct open_flags open_exec_flags = { .open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC, .acc_mode = MAY_EXEC, ... do_filp_open(dfd, filename, open_flags) path_openat(nameidata, open_flags, flags) file = alloc_empty_file(open_flags, current_cred()); do_open(nameidata, file, open_flags) may_open(path, acc_mode, open_flag) /* new location of MAY_EXEC vs path_noexec() test */ inode_permission(inode, MAY_OPEN | acc_mode) security_inode_permission(inode, acc_mode) vfs_open(path, file) do_dentry_open(file, path->dentry->d_inode, open) security_file_open(f) open() /* old location of path_noexec() test */ Signed-off-by: Kees Cook Signed-off-by: Andrew Morton Cc: Alexander Viro Cc: Aleksa Sarai Cc: Christian Brauner Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Tetsuo Handa Link: http://lkml.kernel.org/r/20200605160013.3954297-4-keescook@chromium.org Signed-off-by: Linus Torvalds commit 633fb6ac39801514613fbe050db6abdc3fe744d5 Author: Kees Cook Date: Tue Aug 11 18:36:26 2020 -0700 exec: move S_ISREG() check earlier The execve(2)/uselib(2) syscalls have always rejected non-regular files. Recently, it was noticed that a deadlock was introduced when trying to execute pipes, as the S_ISREG() test was happening too late. This was fixed in commit 73601ea5b7b1 ("fs/open.c: allow opening only regular files during execve()"), but it was added after inode_permission() had already run, which meant LSMs could see bogus attempts to execute non-regular files. Move the test into the other inode type checks (which already look for other pathological conditions[1]). Since there is no need to use FMODE_EXEC while we still have access to "acc_mode", also switch the test to MAY_EXEC. Also include a comment with the redundant S_ISREG() checks at the end of execve(2)/uselib(2) to note that they are present to avoid any mistakes. My notes on the call path, and related arguments, checks, etc: do_open_execat() struct open_flags open_exec_flags = { .open_flag = O_LARGEFILE | O_RDONLY | __FMODE_EXEC, .acc_mode = MAY_EXEC, ... do_filp_open(dfd, filename, open_flags) path_openat(nameidata, open_flags, flags) file = alloc_empty_file(open_flags, current_cred()); do_open(nameidata, file, open_flags) may_open(path, acc_mode, open_flag) /* new location of MAY_EXEC vs S_ISREG() test */ inode_permission(inode, MAY_OPEN | acc_mode) security_inode_permission(inode, acc_mode) vfs_open(path, file) do_dentry_open(file, path->dentry->d_inode, open) /* old location of FMODE_EXEC vs S_ISREG() test */ security_file_open(f) open() [1] https://lore.kernel.org/lkml/202006041910.9EF0C602@keescook/ Signed-off-by: Kees Cook Signed-off-by: Andrew Morton Cc: Aleksa Sarai Cc: Alexander Viro Cc: Christian Brauner Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Tetsuo Handa Link: http://lkml.kernel.org/r/20200605160013.3954297-3-keescook@chromium.org Signed-off-by: Linus Torvalds commit db19c91c3b75cf8ece3ffd92a4e84a306a7547b0 Author: Kees Cook Date: Tue Aug 11 18:36:23 2020 -0700 exec: change uselib(2) IS_SREG() failure to EACCES Patch series "Relocate execve() sanity checks", v2. While looking at the code paths for the proposed O_MAYEXEC flag, I saw some things that looked like they should be fixed up. exec: Change uselib(2) IS_SREG() failure to EACCES This just regularizes the return code on uselib(2). exec: Move S_ISREG() check earlier This moves the S_ISREG() check even earlier than it was already. exec: Move path_noexec() check earlier This adds the path_noexec() check to the same place as the S_ISREG() check. This patch (of 3): Change uselib(2)' S_ISREG() error return to EACCES instead of EINVAL so the behavior matches execve(2), and the seemingly documented value. The "not a regular file" failure mode of execve(2) is explicitly documented[1], but it is not mentioned in uselib(2)[2] which does, however, say that open(2) and mmap(2) errors may apply. The documentation for open(2) does not include a "not a regular file" error[3], but mmap(2) does[4], and it is EACCES. [1] http://man7.org/linux/man-pages/man2/execve.2.html#ERRORS [2] http://man7.org/linux/man-pages/man2/uselib.2.html#ERRORS [3] http://man7.org/linux/man-pages/man2/open.2.html#ERRORS [4] http://man7.org/linux/man-pages/man2/mmap.2.html#ERRORS Signed-off-by: Kees Cook Signed-off-by: Andrew Morton Acked-by: Christian Brauner Cc: Aleksa Sarai Cc: Alexander Viro Cc: Dmitry Vyukov Cc: Eric Biggers Cc: Tetsuo Handa Link: http://lkml.kernel.org/r/20200605160013.3954297-1-keescook@chromium.org Link: http://lkml.kernel.org/r/20200605160013.3954297-2-keescook@chromium.org Signed-off-by: Linus Torvalds commit f38c85f1ba6902e4e2e2bf1b84edf065a904cdeb Author: Lepton Wu Date: Tue Aug 11 18:36:20 2020 -0700 coredump: add %f for executable filename The document reads "%e" should be "executable filename" while actually it could be changed by things like pr_ctl PR_SET_NAME. People who uses "%e" in core_pattern get surprised when they find out they get thread name instead of executable filename. This is either a bug of document or a bug of code. Since the behavior of "%e" is there for long time, it could bring another surprise for users if we "fix" the code. So we just "fix" the document. And more, for users who really need the "executable filename" in core_pattern, we introduce a new "%f" for the real executable filename. We already have "%E" for executable path in kernel, so just reuse most of its code for the new added "%f" format. Signed-off-by: Lepton Wu Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200701031432.2978761-1-ytht.net@gmail.com Signed-off-by: Linus Torvalds commit 0776d1231bec0c7ab43baf440a3f5ef5f49dd795 Author: Tiezhu Yang Date: Tue Aug 11 18:36:16 2020 -0700 test_kmod: avoid potential double free in trigger_config_run_type() Reset the member "test_fs" of the test configuration after a call of the function "kfree_const" to a null pointer so that a double memory release will not be performed. Fixes: d9c6a72d6fa2 ("kmod: add test driver to stress test the module loader") Signed-off-by: Tiezhu Yang Signed-off-by: Luis Chamberlain Signed-off-by: Andrew Morton Acked-by: Luis Chamberlain Cc: Alexei Starovoitov Cc: Al Viro Cc: Christian Brauner Cc: Chuck Lever Cc: David Howells Cc: David S. Miller Cc: Greg Kroah-Hartman Cc: Jakub Kicinski Cc: James Morris Cc: Jarkko Sakkinen Cc: J. Bruce Fields Cc: Jens Axboe Cc: Josh Triplett Cc: Kees Cook Cc: Lars Ellenberg Cc: Nikolay Aleksandrov Cc: Philipp Reisner Cc: Roopa Prabhu Cc: "Serge E. Hallyn" Cc: Sergei Trofimovich Cc: Sergey Kvachonok Cc: Shuah Khan Cc: Tony Vroon Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20200610154923.27510-4-mcgrof@kernel.org Signed-off-by: Linus Torvalds commit 6f9e148c218641ad876845abdea4b0597468c55e Author: Tiezhu Yang Date: Tue Aug 11 18:36:12 2020 -0700 kmod: remove redundant "be an" in the comment There exists redundant "be an" in the comment, remove it. Signed-off-by: Tiezhu Yang Signed-off-by: Luis Chamberlain Signed-off-by: Andrew Morton Acked-by: Luis Chamberlain Cc: Alexei Starovoitov Cc: Al Viro Cc: Christian Brauner Cc: Chuck Lever Cc: David Howells Cc: David S. Miller Cc: Greg Kroah-Hartman Cc: Jakub Kicinski Cc: James Morris Cc: Jarkko Sakkinen Cc: J. Bruce Fields Cc: Jens Axboe Cc: Josh Triplett Cc: Kees Cook Cc: Lars Ellenberg Cc: Nikolay Aleksandrov Cc: Philipp Reisner Cc: Roopa Prabhu Cc: "Serge E. Hallyn" Cc: Sergei Trofimovich Cc: Sergey Kvachonok Cc: Shuah Khan Cc: Tony Vroon Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20200610154923.27510-3-mcgrof@kernel.org Signed-off-by: Linus Torvalds commit aaa3e7fb81d8a8598b993c8012f4b8aa18d92b20 Author: Tiezhu Yang Date: Tue Aug 11 18:36:08 2020 -0700 selftests: kmod: use variable NAME in kmod_test_0001() Patch series "kmod/umh: a few fixes". Tiezhu Yang had sent out a patch set with a slew of kmod selftest fixes, and one patch which modified kmod to return 254 when a module was not found. This opened up pandora's box about why that was being used for and low and behold its because when UMH_WAIT_PROC is used we call a kernel_wait4() call but have never unwrapped the error code. The commit log for that fix details the rationale for the approach taken. I'd appreciate some review on that, in particular nfs folks as it seems a case was never really hit before. This patch (of 5): Use the variable NAME instead of "\000" directly in kmod_test_0001(). Signed-off-by: Tiezhu Yang Signed-off-by: Luis Chamberlain Signed-off-by: Andrew Morton Acked-by: Luis Chamberlain Cc: Greg Kroah-Hartman Cc: Al Viro Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: J. Bruce Fields Cc: Chuck Lever Cc: Roopa Prabhu Cc: Nikolay Aleksandrov Cc: David S. Miller Cc: Jakub Kicinski Cc: David Howells Cc: Jarkko Sakkinen Cc: James Morris Cc: "Serge E. Hallyn" Cc: Christian Brauner Cc: Sergei Trofimovich Cc: Alexei Starovoitov Cc: Kees Cook Cc: Josh Triplett Cc: Sergey Kvachonok Cc: Tony Vroon Cc: Shuah Khan Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20200610154923.27510-1-mcgrof@kernel.org Link: http://lkml.kernel.org/r/20200610154923.27510-2-mcgrof@kernel.org Signed-off-by: Linus Torvalds commit a089e3fd5a82aea20f3d9ec4caa5f4c65cc2cfcc Author: Helge Deller Date: Tue Aug 11 18:36:04 2020 -0700 fs/signalfd.c: fix inconsistent return codes for signalfd4 The kernel signalfd4() syscall returns different error codes when called either in compat or native mode. This behaviour makes correct emulation in qemu and testing programs like LTP more complicated. Fix the code to always return -in both modes- EFAULT for unaccessible user memory, and EINVAL when called with an invalid signal mask. Signed-off-by: Helge Deller Signed-off-by: Andrew Morton Cc: Alexander Viro Cc: Laurent Vivier Link: http://lkml.kernel.org/r/20200530100707.GA10159@ls3530.fritz.box Signed-off-by: Linus Torvalds commit a090a5a7d73f79a9ae2dcc6e60d89bfc6864a65a Author: OGAWA Hirofumi Date: Tue Aug 11 18:36:01 2020 -0700 fat: fix fat_ra_init() for data clusters == 0 If data clusters == 0, fat_ra_init() calls the ->ent_blocknr() for the cluster beyond ->max_clusters. This checks the limit before initialization to suppress the warning. Reported-by: syzbot+756199124937b31a9b7e@syzkaller.appspotmail.com Signed-off-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/87mu462sv4.fsf@mail.parknet.co.jp Signed-off-by: Linus Torvalds commit 4ecfed61de766f4655025a71d79c9a0f4793a3f4 Author: Alexander A. Klimov Date: Tue Aug 11 18:35:59 2020 -0700 VFAT/FAT/MSDOS FILESYSTEM: replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `xmlns`: For each link, `http://[^# ]*(?:\w|/)`: If neither `gnu\.org/license`, nor `mozilla\.org/MPL`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Andrew Morton Acked-by: OGAWA Hirofumi Link: http://lkml.kernel.org/r/20200708200409.22293-1-grandmaster@al2klimov.de Signed-off-by: Linus Torvalds commit e348e65a081d761caf72c2753c4e3d67bfb1ef80 Author: Yubo Feng Date: Tue Aug 11 18:35:56 2020 -0700 fatfs: switch write_lock to read_lock in fat_ioctl_get_attributes There is no need to hold write_lock in fat_ioctl_get_attributes. write_lock may make an impact on concurrency of fat_ioctl_get_attributes. Signed-off-by: Yubo Feng Signed-off-by: Andrew Morton Acked-by: OGAWA Hirofumi Link: http://lkml.kernel.org/r/1593308053-12702-1-git-send-email-fengyubo3@huawei.com Signed-off-by: Linus Torvalds commit 88b2e9b06381551b707d980627ad0591191f7a2d Author: Colin Ian King Date: Tue Aug 11 18:35:53 2020 -0700 fs/ufs: avoid potential u32 multiplication overflow The 64 bit ino is being compared to the product of two u32 values, however, the multiplication is being performed using a 32 bit multiply so there is a potential of an overflow. To be fully safe, cast uspi->s_ncg to a u64 to ensure a 64 bit multiplication occurs to avoid any chance of overflow. Fixes: f3e2a520f5fb ("ufs: NFS support") Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton Cc: Evgeniy Dushistov Cc: Alexey Dobriyan Link: http://lkml.kernel.org/r/20200715170355.1081713-1-colin.king@canonical.com Addresses-Coverity: ("Unintentional integer overflow") Signed-off-by: Linus Torvalds commit a1d0747a393a079631130d61faa2a61027d1c789 Author: Joe Perches Date: Tue Aug 11 18:35:49 2020 -0700 nilfs2: use a more common logging style Add macros for nilfs_(sb, fmt, ...) and convert the uses of 'nilfs_msg(sb, KERN_, ...)' to 'nilfs_(sb, ...)' so nilfs2 uses a logging style more like the typical kernel logging style. Miscellanea: o Realign arguments for these uses Signed-off-by: Joe Perches Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/1595860111-3920-4-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Linus Torvalds commit 2987a4cfc8332b4b516f3e03d29ec0316221e45f Author: Joe Perches Date: Tue Aug 11 18:35:46 2020 -0700 nilfs2: convert __nilfs_msg to integrate the level and format Reduce object size a bit by removing the KERN_ as a separate argument and adding it to the format string. Reduce overall object size by about ~.5% (x86-64 defconfig w/ nilfs2) old: $ size -t fs/nilfs2/built-in.a | tail -1 191738 8676 44 200458 30f0a (TOTALS) new: $ size -t fs/nilfs2/built-in.a | tail -1 190971 8676 44 199691 30c0b (TOTALS) Signed-off-by: Joe Perches Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/1595860111-3920-3-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Linus Torvalds commit 1b0e31861d98920c3823c7519ae762499811df00 Author: Eric Biggers Date: Tue Aug 11 18:35:43 2020 -0700 nilfs2: only call unlock_new_inode() if I_NEW Patch series "nilfs2 updates". This patch (of 3): unlock_new_inode() is only meant to be called after a new inode has already been inserted into the hash table. But nilfs_new_inode() can call it even before it has inserted the inode, triggering the WARNING in unlock_new_inode(). Fix this by only calling unlock_new_inode() if the inode has the I_NEW flag set, indicating that it's in the table. Signed-off-by: Eric Biggers Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/1595860111-3920-1-git-send-email-konishi.ryusuke@gmail.com Link: http://lkml.kernel.org/r/1595860111-3920-2-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Linus Torvalds commit f666f9fb9a36f1c833b9d18923572f0e4d304754 Author: Eric Biggers Date: Tue Aug 11 18:35:39 2020 -0700 fs/minix: remove expected error message in block_to_path() When truncating a file to a size within the last allowed logical block, block_to_path() is called with the *next* block. This exceeds the limit, causing the "block %ld too big" error message to be printed. This case isn't actually an error; there are just no more blocks past that point. So, remove this error message. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Biggers Signed-off-by: Andrew Morton Cc: Alexander Viro Cc: Qiujun Huang Link: http://lkml.kernel.org/r/20200628060846.682158-7-ebiggers@kernel.org Signed-off-by: Linus Torvalds commit 0a12c4a8069607247cb8edc3b035a664e636fd9a Author: Eric Biggers Date: Tue Aug 11 18:35:36 2020 -0700 fs/minix: fix block limit check for V1 filesystems The minix filesystem reads its maximum file size from its on-disk superblock. This value isn't necessarily a multiple of the block size. When it's not, the V1 block mapping code doesn't allow mapping the last possible block. Commit 6ed6a722f9ab ("minixfs: fix block limit check") fixed this in the V2 mapping code. Fix it in the V1 mapping code too. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Biggers Signed-off-by: Andrew Morton Cc: Alexander Viro Cc: Qiujun Huang Link: http://lkml.kernel.org/r/20200628060846.682158-6-ebiggers@kernel.org Signed-off-by: Linus Torvalds commit 32ac86efff91a3e4ef8c3d1cadd4559e23c8e73a Author: Eric Biggers Date: Tue Aug 11 18:35:33 2020 -0700 fs/minix: set s_maxbytes correctly The minix filesystem leaves super_block::s_maxbytes at MAX_NON_LFS rather than setting it to the actual filesystem-specific limit. This is broken because it means userspace doesn't see the standard behavior like getting EFBIG and SIGXFSZ when exceeding the maximum file size. Fix this by setting s_maxbytes correctly. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Biggers Signed-off-by: Andrew Morton Cc: Alexander Viro Cc: Qiujun Huang Link: http://lkml.kernel.org/r/20200628060846.682158-5-ebiggers@kernel.org Signed-off-by: Linus Torvalds commit 270ef41094e9fa95273f288d7d785313ceab2ff3 Author: Eric Biggers Date: Tue Aug 11 18:35:30 2020 -0700 fs/minix: reject too-large maximum file size If the minix filesystem tries to map a very large logical block number to its on-disk location, block_to_path() can return offsets that are too large, causing out-of-bounds memory accesses when accessing indirect index blocks. This should be prevented by the check against the maximum file size, but this doesn't work because the maximum file size is read directly from the on-disk superblock and isn't validated itself. Fix this by validating the maximum file size at mount time. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+c7d9ec7a1a7272dd71b3@syzkaller.appspotmail.com Reported-by: syzbot+3b7b03a0c28948054fb5@syzkaller.appspotmail.com Reported-by: syzbot+6e056ee473568865f3e6@syzkaller.appspotmail.com Signed-off-by: Eric Biggers Signed-off-by: Andrew Morton Cc: Alexander Viro Cc: Qiujun Huang Cc: Link: http://lkml.kernel.org/r/20200628060846.682158-4-ebiggers@kernel.org Signed-off-by: Linus Torvalds commit facb03dddec04e4aac1bb2139accdceb04deb1f3 Author: Eric Biggers Date: Tue Aug 11 18:35:27 2020 -0700 fs/minix: don't allow getting deleted inodes If an inode has no links, we need to mark it bad rather than allowing it to be accessed. This avoids WARNINGs in inc_nlink() and drop_nlink() when doing directory operations on a fuzzed filesystem. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+a9ac3de1b5de5fb10efc@syzkaller.appspotmail.com Reported-by: syzbot+df958cf5688a96ad3287@syzkaller.appspotmail.com Signed-off-by: Eric Biggers Signed-off-by: Andrew Morton Cc: Alexander Viro Cc: Qiujun Huang Cc: Link: http://lkml.kernel.org/r/20200628060846.682158-3-ebiggers@kernel.org Signed-off-by: Linus Torvalds commit da27e0a0e5f655f0d58d4e153c3182bb2b290f64 Author: Eric Biggers Date: Tue Aug 11 18:35:24 2020 -0700 fs/minix: check return value of sb_getblk() Patch series "fs/minix: fix syzbot bugs and set s_maxbytes". This series fixes all syzbot bugs in the minix filesystem: KASAN: null-ptr-deref Write in get_block KASAN: use-after-free Write in get_block KASAN: use-after-free Read in get_block WARNING in inc_nlink KMSAN: uninit-value in get_block WARNING in drop_nlink It also fixes the minix filesystem to set s_maxbytes correctly, so that userspace sees the correct behavior when exceeding the max file size. This patch (of 6): sb_getblk() can fail, so check its return value. This fixes a NULL pointer dereference. Originally from Qiujun Huang. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+4a88b2b9dc280f47baf4@syzkaller.appspotmail.com Signed-off-by: Eric Biggers Signed-off-by: Andrew Morton Cc: Qiujun Huang Cc: Alexander Viro Cc: Link: http://lkml.kernel.org/r/20200628060846.682158-1-ebiggers@kernel.org Link: http://lkml.kernel.org/r/20200628060846.682158-2-ebiggers@kernel.org Signed-off-by: Linus Torvalds commit 2fb3244f0a58ceb3d866ac63f644dfa31cae430f Author: Randy Dunlap Date: Tue Aug 11 18:35:21 2020 -0700 autofs: fix doubled word Change doubled word "is" to "it is". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Acked-by: Ian Kent Link: http://lkml.kernel.org/r/5a82befd-40f8-8dc0-3498-cbc0436cad9b@infradead.org Signed-off-by: Linus Torvalds commit ef3c005c0eb07a60949191bc6ee407d5f43cc502 Author: Joe Perches Date: Tue Aug 11 18:35:19 2020 -0700 checkpatch: remove missing switch/case break test This test doesn't work well and newer compilers are much better at emitting this warning. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Cc: Cambda Zhu Link: http://lkml.kernel.org/r/7e25090c79f6a69d502ab8219863300790192fe2.camel@perches.com Signed-off-by: Linus Torvalds commit 1a3dcf2e6b35faa1176b9cd8200094fbce16ba19 Author: Joe Perches Date: Tue Aug 11 18:35:16 2020 -0700 checkpatch: add test for repeated words Try to avoid adding repeated words either on the same line or consecutive comment lines in a block e.g.: duplicated word in comment block /* * this is a comment block where the last word of the previous * previous line is also the first word of the next line */ and simple duplication /* test this this again */ Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/cda9b566ad67976e1acd62b053de50ee44a57250.camel@perches.com Inspired-by: Randy Dunlap Signed-off-by: Linus Torvalds commit ced69da1db0b57bbb10054bd74201babc094f408 Author: Quentin Monnet Date: Tue Aug 11 18:35:13 2020 -0700 checkpatch: fix CONST_STRUCT when const_structs.checkpatch is missing Checkpatch reports warnings when some specific structs are not declared as const in the code. The list of structs to consider was initially defined in the checkpatch.pl script itself, but it was later moved to an external file (scripts/const_structs.checkpatch), in commit bf1fa1dae68e ("checkpatch: externalize the structs that should be const"). This introduced two minor issues: - When file scripts/const_structs.checkpatch is not present (for example, if checkpatch is run outside of the kernel directory with the "--no-tree" option), a warning is printed to stderr to tell the user that "No structs that should be const will be found". This is fair, but the warning is printed unconditionally, even if the option "--ignore CONST_STRUCT" is passed. In the latter case, we explicitly ask checkpatch to skip this check, so no warning should be printed. - When scripts/const_structs.checkpatch is missing, or even when trying to silence the warning by adding an empty file, $const_structs is set to "", and the regex used for finding structs that should be const, "$line =~ /struct\s+($const_structs)(?!\s*\{)/)", matches all structs found in the code, thus reporting a number of false positives. Let's fix the first item by skipping scripts/const_structs.checkpatch processing if "CONST_STRUCT" checks are ignored, and the second one by skipping the test if $const_structs is not defined. Since we modify the read_words() function a little bit, update the checks for $typedefsfile/$typeOtherTypedefs as well. Signed-off-by: Quentin Monnet Signed-off-by: Andrew Morton Acked-by: Joe Perches Link: http://lkml.kernel.org/r/20200623221822.3727-1-quentin@isovalent.com Signed-off-by: Linus Torvalds commit 65b64b3bec3fa74937fdc18e5ccf10a48ee3a7d3 Author: Joe Perches Date: Tue Aug 11 18:35:10 2020 -0700 checkpatch: add --fix option for ASSIGN_IN_IF Add a --fix option for 2 types of single-line assignment in if statements if ((foo = bar(...)) < BAZ) { expands to: foo = bar(..); if (foo < BAZ) { and if ((foo = bar(...)) { expands to: foo = bar(...); if (foo) { if statements with assignments spanning multiple lines are not converted with the --fix option. if statements with additional logic are also not converted. e.g.: if ((foo = bar(...)) & BAZ == BAZ) { Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Cc: Julia Lawall Link: http://lkml.kernel.org/r/9bc7c782516f37948f202deba511bc95ed279bbd.camel@perches.com Signed-off-by: Linus Torvalds commit 50161266973bcc662e969e63d68fc7bff71de21b Author: Joe Perches Date: Tue Aug 11 18:35:07 2020 -0700 checkpatch: add test for possible misuse of IS_ENABLED() without CONFIG_ IS_ENABLED is almost always used with CONFIG_ defines. Add a test to verify that the #define being tested starts with CONFIG_. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Link: http://lkml.kernel.org/r/e7fda760b91b769ba82844ba282d432c0d26d709.camel@perches.com Signed-off-by: Linus Torvalds commit 6d511020e13d5d6f5f0af853e32ddef75c693ccc Author: Rikard Falkeborn Date: Tue Aug 11 18:35:03 2020 -0700 lib/test_bits.c: add tests of GENMASK Add tests of GENMASK and GENMASK_ULL. A few test cases that should fail compilation are provided under #ifdef TEST_GENMASK_FAILURES [rd.dunlap@gmail.com: add MODULE_LICENSE()] Link: http://lkml.kernel.org/r/dfc74524-0789-2827-4eff-476ddab65699@gmail.com [weiyongjun1@huawei.com: make some functions static] Link: http://lkml.kernel.org/r/20200702150336.4756-1-weiyongjun1@huawei.com Suggested-by: Andy Shevchenko Signed-off-by: Rikard Falkeborn Signed-off-by: Randy Dunlap Signed-off-by: Wei Yongjun Signed-off-by: Andrew Morton Reviewed-by: Andy Shevchenko Acked-by: William Breathitt Gray Cc: Emil Velikov Cc: Syed Nayyar Waris Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: Geert Uytterhoeven Cc: Kees Cook Cc: Linus Walleij Cc: Masahiro Yamada Link: http://lkml.kernel.org/r/20200621054210.14804-2-rikard.falkeborn@gmail.com Link: http://lkml.kernel.org/r/20200608221823.35799-2-rikard.falkeborn@gmail.com Signed-off-by: Linus Torvalds commit ef0f2685336bbc334e8b6997ce9b155e5f7edd31 Author: Kars Mulder Date: Tue Aug 11 18:34:56 2020 -0700 kstrto*: do not describe simple_strto*() as obsolete/replaced The documentation of the kstrto*() functions describes kstrto*() as "replacements" of the "obsolete" simple_strto*() functions. Both of these terms are inaccurate: they're not replacements because they have different behaviour, and the simple_strto*() are not obsolete because there are cases where they have benefits over kstrto*(). Remove usage of the terms "replacement" and "obsolete" in reference to simple_strto*(), and instead use the term "preferred over". Fixes: 4c925d6031f71 ("kstrto*: add documentation") Fixes: 885e68e8b7b13 ("kernel.h: update comment about simple_strto() functions") Signed-off-by: Kars Mulder Signed-off-by: Andrew Morton Reviewed-by: Andy Shevchenko Cc: Eldad Zack Cc: Miguel Ojeda Cc: Geert Uytterhoeven Cc: Mans Rullgard Cc: Petr Mladek Link: http://lkml.kernel.org/r/29b9-5f234c80-13-4e3aa200@244003027 Signed-off-by: Linus Torvalds commit b642e44e8ab335868b549fe5753b783ca47bf3a3 Author: Kars Mulder Date: Tue Aug 11 18:34:53 2020 -0700 kstrto*: correct documentation references to simple_strto*() The documentation of the kstrto*() functions reference the simple_strtoull function by "used as a replacement for [the obsolete] simple_strtoull". All these functions describes themselves as replacements for the function simple_strtoull, even though a function like kstrtol() would be more aptly described as a replacement of simple_strtol(). Fix these references by making the documentation of kstrto*() reference the closest simple_strto*() equivalent available. The functions kstrto[u]int() do not have direct simple_strto[u]int() equivalences, so these are made to refer to simple_strto[u]l() instead. Furthermore, add parentheses after function names, as is standard in kernel documentation. Fixes: 4c925d6031f71 ("kstrto*: add documentation") Signed-off-by: Kars Mulder Signed-off-by: Andrew Morton Reviewed-by: Andy Shevchenko Cc: Eldad Zack Cc: Miguel Ojeda Cc: Geert Uytterhoeven Cc: Mans Rullgard Cc: Petr Mladek Link: http://lkml.kernel.org/r/1ee1-5f234c00-f3-165a6440@234394593 Signed-off-by: Linus Torvalds commit d89775fc929c5a1d91ed518a71b456da0865e5ff Author: Alexander A. Klimov Date: Tue Aug 11 18:34:50 2020 -0700 lib/: replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Signed-off-by: Alexander A. Klimov Signed-off-by: Andrew Morton Acked-by: Coly Li [crc64.c] Link: http://lkml.kernel.org/r/20200726112154.16510-1-grandmaster@al2klimov.de Signed-off-by: Linus Torvalds commit 3adf3bae0d612357da516d39e1584f1547eb6e86 Author: Tiezhu Yang Date: Tue Aug 11 18:34:47 2020 -0700 lib/test_lockup.c: fix return value of test_lockup_init() Since filp_open() returns an error pointer, we should use IS_ERR() to check the return value and then return PTR_ERR() if failed to get the actual return value instead of always -EINVAL. E.g. without this patch: [root@localhost loongson]# ls no_such_file ls: cannot access no_such_file: No such file or directory [root@localhost loongson]# modprobe test_lockup file_path=no_such_file lock_sb_umount time_secs=60 state=S modprobe: ERROR: could not insert 'test_lockup': Invalid argument [root@localhost loongson]# dmesg | tail -1 [ 126.100596] test_lockup: cannot find file_path With this patch: [root@localhost loongson]# ls no_such_file ls: cannot access no_such_file: No such file or directory [root@localhost loongson]# modprobe test_lockup file_path=no_such_file lock_sb_umount time_secs=60 state=S modprobe: ERROR: could not insert 'test_lockup': Unknown symbol in module, or unknown parameter (see dmesg) [root@localhost loongson]# dmesg | tail -1 [ 95.134362] test_lockup: failed to open no_such_file: -2 Fixes: aecd42df6d39 ("lib/test_lockup.c: add parameters for locking generic vfs locks") Signed-off-by: Tiezhu Yang Signed-off-by: Andrew Morton Reviewed-by: Guenter Roeck Cc: Konstantin Khlebnikov Cc: Kees Cook Link: http://lkml.kernel.org/r/1595555407-29875-2-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Linus Torvalds commit 63646bc9f95f7faf5345e54a59fd1ecdd4ba5316 Author: Tiezhu Yang Date: Tue Aug 11 18:34:44 2020 -0700 lib/Kconfig.debug: make TEST_LOCKUP depend on module Since test_lockup is a test module to generate lockups, it is better to limit TEST_LOCKUP to module (=m) or disabled (=n) because we can not use the module parameters when CONFIG_TEST_LOCKUP=y. Signed-off-by: Tiezhu Yang Signed-off-by: Andrew Morton Reviewed-by: Guenter Roeck Cc: Konstantin Khlebnikov Cc: Kees Cook Link: http://lkml.kernel.org/r/1595555407-29875-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Linus Torvalds commit f36331770406b8e693a3d8d71ab3ccbbeabc7142 Author: Wei Yongjun Date: Tue Aug 11 18:34:41 2020 -0700 lib/test_lockup.c: make symbol 'test_works' static Fix sparse build warning: lib/test_lockup.c:403:1: warning: symbol '__pcpu_scope_test_works' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200707112252.9047-1-weiyongjun1@huawei.com Signed-off-by: Linus Torvalds commit 403f177304354990c36d5a7d125bce2b39bcbe2c Author: Geert Uytterhoeven Date: Tue Aug 11 18:34:38 2020 -0700 lib/test_bitops: do the full test during module init Currently, the bitops test consists of two parts: one part is executed during module load, the second part during module unload. This is cumbersome for the user, as he has to perform two steps to execute all tests, and is different from most (all?) other tests. Merge the two parts, so both are executed during module load. Signed-off-by: Geert Uytterhoeven Signed-off-by: Andrew Morton Reviewed-by: Andy Shevchenko Cc: Wei Yang Cc: Jesse Brandeburg Link: http://lkml.kernel.org/r/20200706112900.7097-1-geert@linux-m68k.org Signed-off-by: Linus Torvalds commit 0a650e472d2039a5f768acd82f2a7068bf338dfd Author: Luc Van Oostenryck Date: Tue Aug 11 18:34:35 2020 -0700 lib/generic-radix-tree.c: remove unneeded __rcu struct __genradix is defined as having its member 'root' annotated as __rcu. But in the corresponding API RCU is not used. Sparse reports this type mismatch as: lib/generic-radix-tree.c:56:35: warning: incorrect type in initializer (different address spaces) lib/generic-radix-tree.c:56:35: expected struct genradix_root *r lib/generic-radix-tree.c:56:35: got struct genradix_root [noderef] *__val with 6 other ones. So, correct root's type by removing this unneeded __rcu. Signed-off-by: Luc Van Oostenryck Signed-off-by: Andrew Morton Cc: Kent Overstreet Link: http://lkml.kernel.org/r/20200621161745.55396-1-luc.vanoostenryck@gmail.com Signed-off-by: Linus Torvalds commit bcb32a1d82614ffb8a56f14c648c3970bcd2cf89 Author: Stefano Brivio Date: Tue Aug 11 18:34:32 2020 -0700 lib/test_bitmap.c: add test for bitmap_cut() Inspired by an original patch from Yury Norov: introduce a test for bitmap_cut() that also makes sure functionality is as described for partially overlapping src and dst. Signed-off-by: Stefano Brivio Signed-off-by: Andrew Morton Reviewed-by: Andy Shevchenko Cc: Pablo Neira Ayuso Cc: Rasmus Villemoes Cc: Yury Norov Link: http://lkml.kernel.org/r/5fc45e6bbd4fa837cd9577f8a0c1d639df90a4ce.1592155364.git.sbrivio@redhat.com Signed-off-by: Linus Torvalds commit 5959f829a93c18ccf15715768317b58f5d9bf2d4 Author: Stefano Brivio Date: Tue Aug 11 18:34:29 2020 -0700 lib/bitmap.c: fix bitmap_cut() for partial overlapping case Patch series "lib: Fix bitmap_cut() for overlaps, add test" This patch (of 2): Yury Norov reports that bitmap_cut() will not produce the right outcome if src and dst partially overlap, with src pointing at some location after dst, because the memmove() affects src before we store the bits that we need to keep, that is, the bits preceding the cut -- as long as we the beginning of the cut is not aligned to a long. Fix this by storing those bits before the memmove(). Note that this is just a theoretical concern so far, as the only user of this function, pipapo_drop() from the nftables set back-end implemented in net/netfilter/nft_set_pipapo.c, always supplies entirely overlapping src and dst. Fixes: 2092767168f0 ("bitmap: Introduce bitmap_cut(): cut bits and shift remaining") Reported-by: Yury Norov Signed-off-by: Stefano Brivio Signed-off-by: Andrew Morton Reviewed-by: Andy Shevchenko Cc: Rasmus Villemoes Cc: Pablo Neira Ayuso Link: http://lkml.kernel.org/r/cover.1592155364.git.sbrivio@redhat.com Link: http://lkml.kernel.org/r/003e38d4428cd6091ef00b5b03354f1bd7d9091e.1592155364.git.sbrivio@redhat.com Signed-off-by: Linus Torvalds commit 25fd529c34d063d1bef23742f2e8f8341c639dc3 Author: Luc Van Oostenryck Date: Tue Aug 11 18:34:26 2020 -0700 sparse: group the defines by functionality By popular demand, reorder the defines for sparse annotations and group them by functionality. Signed-off-by: Luc Van Oostenryck Signed-off-by: Andrew Morton Acked-by: Miguel Ojeda Cc: Geert Uytterhoeven Link: lore.kernel.org/r/CAMuHMdWQsirja-h3wBcZezk+H2Q_HShhAks8Hc8ps5fTAp=ObQ@mail.gmail.com Link: http://lkml.kernel.org/r/20200621143652.53798-1-luc.vanoostenryck@gmail.com Signed-off-by: Linus Torvalds commit 9e58c5e2fcd8d8d8820ea277e0f577f563eed1f1 Author: Matthew Wilcox Date: Tue Aug 11 18:34:23 2020 -0700 include/linux/poison.h: remove obsolete comment When the definition was changed, the comment became stale. Just remove it since there isn't anything useful to say here. Fixes: b8a0255db958 ("include/linux/poison.h: use POISON_POINTER_DELTA for poison pointers") Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Cc: Vasily Kulikov Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20200730174108.GJ23808@casper.infradead.org Signed-off-by: Linus Torvalds commit 7f317d34906c1033f0752fc137dda04e43979bb8 Author: Alexander A. Klimov Date: Tue Aug 11 18:34:19 2020 -0700 include/: replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Signed-off-by: Alexander A. Klimov Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Link: http://lkml.kernel.org/r/20200726110117.16346-1-grandmaster@al2klimov.de Signed-off-by: Linus Torvalds commit 376653435dacf84a8aca87e66aff94079a817cf2 Author: Arvind Sankar Date: Tue Aug 11 18:34:16 2020 -0700 kernel.h: remove duplicate include of asm/div64.h This seems to have been added inadvertently in commit 72deb455b5ec ("block: remove CONFIG_LBDAF") Fixes: 72deb455b5ec ("block: remove CONFIG_LBDAF") Signed-off-by: Arvind Sankar Signed-off-by: Andrew Morton Reviewed-by: Christoph Hellwig Link: http://lkml.kernel.org/r/20200727034852.2813453-1-nivedita@alum.mit.edu Signed-off-by: Linus Torvalds commit 09c60546f04f732d194a171b3a4ccc9ae1e704ba Author: Feng Tang Date: Tue Aug 11 18:34:13 2020 -0700 ./Makefile: add debug option to enable function aligned on 32 bytes Recently 0day reported many strange performance changes (regression or improvement), in which there was no obvious relation between the culprit commit and the benchmark at the first look, and it causes people to doubt the test itself is wrong. Upon further check, many of these cases are caused by the change to the alignment of kernel text or data, as whole text/data of kernel are linked together, change in one domain may affect alignments of other domains. gcc has an option '-falign-functions=n' to force text aligned, and with that option enabled, some of those performance changes will be gone, like [1][2][3]. Add this option so that developers and 0day can easily find performance bump caused by text alignment change, as tracking these strange bump is quite time consuming. Though it can't help in other cases like data alignment changes like [4]. Following is some size data for v5.7 kernel built with a RHEL config used in 0day: text data bss dec filename 19738771 13292906 5554236 38585913 vmlinux.noalign 19758591 13297002 5529660 38585253 vmlinux.align32 Raw vmlinux size in bytes: v5.7 v5.7+align32 253950832 254018000 +0.02% Some benchmark data, most of them have no big change: * hackbench: [ -1.8%, +0.5%] * fsmark: [ -3.2%, +3.4%] # ext4/xfs/btrfs * kbuild: [ -2.0%, +0.9%] * will-it-scale: [ -0.5%, +1.8%] # mmap1/pagefault3 * netperf: - TCP_CRR [+16.6%, +97.4%] - TCP_RR [-18.5%, -1.8%] - TCP_STREAM [ -1.1%, +1.9%] [1] https://lore.kernel.org/lkml/20200114085637.GA29297@shao2-debian/ [2] https://lore.kernel.org/lkml/20200330011254.GA14393@feng-iot/ [3] https://lore.kernel.org/lkml/1d98d1f0-fe84-6df7-f5bd-f4cb2cdb7f45@intel.com/ [4] https://lore.kernel.org/lkml/20200205123216.GO12867@shao2-debian/ Signed-off-by: Feng Tang Signed-off-by: Andrew Morton Cc: Masahiro Yamada Cc: Michal Marek Cc: Andi Kleen Cc: Huang Ying Cc: Andy Shevchenko Link: http://lkml.kernel.org/r/1595475001-90945-1-git-send-email-feng.tang@intel.com Signed-off-by: Linus Torvalds commit 8043fc147a97ec2eefc582487f344f2cbe86d12e Author: Christoph Hellwig Date: Tue Aug 11 18:34:10 2020 -0700 kernel: add a kernel_wait helper Add a helper that waits for a pid and stores the status in the passed in kernel pointer. Use it to fix the usage of kernel_wait4 in call_usermodehelper_exec_sync that only happens to work due to the implicit set_fs(KERNEL_DS) for kernel threads. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Acked-by: "Eric W. Biederman" Cc: Luis Chamberlain Link: http://lkml.kernel.org/r/20200721130449.5008-1-hch@lst.de Signed-off-by: Linus Torvalds commit f48ff83e9c1a8fc2e8bfedb4855933eb1ed159b2 Author: Randy Dunlap Date: Tue Aug 11 18:34:07 2020 -0700 include/linux/xz.h: drop duplicated word Drop the doubled word "than" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Cc: Lasse Collin Link: http://lkml.kernel.org/r/05ebba7a-c1e4-01ae-fc7b-15c081b33f3e@infradead.org Signed-off-by: Linus Torvalds commit 121ae8da9cd49f7139bf80f26352337458e63fe1 Author: Randy Dunlap Date: Tue Aug 11 18:34:04 2020 -0700 include/linux/async_tx.h: drop duplicated word in a comment Drop the doubled word "the" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Dan Williams Link: http://lkml.kernel.org/r/e85802f7-8f48-8b4c-29b3-ea237a2c7ae9@infradead.org Signed-off-by: Linus Torvalds commit cd1a406fa46f81b1a859ef874b8413a6fa6ac7e8 Author: Randy Dunlap Date: Tue Aug 11 18:34:00 2020 -0700 include/linux/exportfs.h: drop duplicated word in a comment Drop the doubled word "a" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Alexander Viro Link: http://lkml.kernel.org/r/c61b707a-8fd8-5b1b-aab0-679122881543@infradead.org Signed-off-by: Linus Torvalds commit c5f748e2f2ad970078de11bd6b12bcd81147c636 Author: Randy Dunlap Date: Tue Aug 11 18:33:57 2020 -0700 include/linux/compiler-clang.h: drop duplicated word in a comment Drop the doubled word "the" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Nathan Chancellor Link: http://lkml.kernel.org/r/6a18c301-3505-742f-4dd7-0f38d0e537b9@infradead.org Signed-off-by: Linus Torvalds commit bd72866b8da499e60633ff28f8a4f6e09ca78efe Author: Luc Van Oostenryck Date: Tue Aug 11 18:33:54 2020 -0700 alpha: fix annotation of io{read,write}{16,32}be() These accessors must be used to read/write a big-endian bus. The value returned or written is native-endian. However, these accessors are defined using be{16,32}_to_cpu() or cpu_to_be{16,32}() to make the endian conversion but these expect a __be{16,32} when none is present. Keeping them would need a force cast that would solve nothing at all. So, do the conversion using swab{16,32}, like done in asm-generic for similar situations. Reported-by: kernel test robot Signed-off-by: Luc Van Oostenryck Signed-off-by: Andrew Morton Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Stephen Boyd Cc: Arnd Bergmann Link: http://lkml.kernel.org/r/20200622114232.80039-1-luc.vanoostenryck@gmail.com Signed-off-by: Linus Torvalds commit fe81417596fa8b6577fedb7e206ff3e4c7015c13 Author: Christoph Hellwig Date: Tue Aug 11 18:33:50 2020 -0700 exec: use force_uaccess_begin during exec and exit Both exec and exit want to ensure that the uaccess routines actually do access user pointers. Use the newly added force_uaccess_begin helper instead of an open coded set_fs for that to prepare for kernel builds where set_fs() does not exist. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Cc: Nick Hu Cc: Greentime Hu Cc: Vincent Chen Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Geert Uytterhoeven Link: http://lkml.kernel.org/r/20200710135706.537715-7-hch@lst.de Signed-off-by: Linus Torvalds commit 3d13f313ce4c34c524ccc37986fe77172f601ff3 Author: Christoph Hellwig Date: Tue Aug 11 18:33:47 2020 -0700 uaccess: add force_uaccess_{begin,end} helpers Add helpers to wrap the get_fs/set_fs magic for undoing any damange done by set_fs(KERNEL_DS). There is no real functional benefit, but this documents the intent of these calls better, and will allow stubbing the functions out easily for kernels builds that do not allow address space overrides in the future. [hch@lst.de: drop two incorrect hunks, fix a commit log typo] Link: http://lkml.kernel.org/r/20200714105505.935079-6-hch@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Acked-by: Mark Rutland Acked-by: Greentime Hu Acked-by: Geert Uytterhoeven Cc: Nick Hu Cc: Vincent Chen Cc: Paul Walmsley Cc: Palmer Dabbelt Link: http://lkml.kernel.org/r/20200710135706.537715-6-hch@lst.de Signed-off-by: Linus Torvalds commit 428e2976a5bf7e7f5554286d7a5a33b8147b106a Author: Christoph Hellwig Date: Tue Aug 11 18:33:44 2020 -0700 uaccess: remove segment_eq segment_eq is only used to implement uaccess_kernel. Just open code uaccess_kernel in the arch uaccess headers and remove one layer of indirection. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Acked-by: Greentime Hu Acked-by: Geert Uytterhoeven Cc: Nick Hu Cc: Vincent Chen Cc: Paul Walmsley Cc: Palmer Dabbelt Link: http://lkml.kernel.org/r/20200710135706.537715-5-hch@lst.de Signed-off-by: Linus Torvalds commit efbfc62e1d9ce835fd3ea5f25db1844e1496ced6 Author: Christoph Hellwig Date: Tue Aug 11 18:33:41 2020 -0700 riscv: include in To ensure TASK_SIZE is defined for USER_DS. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Acked-by: Palmer Dabbelt Cc: Nick Hu Cc: Greentime Hu Cc: Vincent Chen Cc: Paul Walmsley Cc: Geert Uytterhoeven Link: http://lkml.kernel.org/r/20200710135706.537715-4-hch@lst.de Signed-off-by: Linus Torvalds commit 9af0f90aea46081566bf2014b6dfeb87b792005c Author: Christoph Hellwig Date: Tue Aug 11 18:33:38 2020 -0700 nds32: use uaccess_kernel in show_regs Use the uaccess_kernel helper instead of duplicating it. Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Acked-by: Linus Torvalds Acked-by: Greentime Hu Cc: Nick Hu Cc: Vincent Chen Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Geert Uytterhoeven Link: http://lkml.kernel.org/r/20200710135706.537715-3-hch@lst.de Signed-off-by: Linus Torvalds commit bfe00c5bbd9ee37b99c281429556c335271d027b Author: Christoph Hellwig Date: Tue Aug 11 18:33:34 2020 -0700 syscalls: use uaccess_kernel in addr_limit_user_check Patch series "clean up address limit helpers", v2. In preparation for eventually phasing out direct use of set_fs(), this series removes the segment_eq() arch helper that is only used to implement or duplicate the uaccess_kernel() API, and then adds descriptive helpers to force the kernel address limit. This patch (of 6): Use the uaccess_kernel helper instead of duplicating it. [hch@lst.de: arm: don't call addr_limit_user_check for nommu] Link: http://lkml.kernel.org/r/20200721045834.GA9613@lst.de Signed-off-by: Christoph Hellwig Signed-off-by: Andrew Morton Tested-by: Guenter Roeck Acked-by: Linus Torvalds Cc: Nick Hu Cc: Greentime Hu Cc: Vincent Chen Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Geert Uytterhoeven Link: http://lkml.kernel.org/r/20200714105505.935079-1-hch@lst.de Link: http://lkml.kernel.org/r/20200710135706.537715-1-hch@lst.de Link: http://lkml.kernel.org/r/20200710135706.537715-2-hch@lst.de Signed-off-by: Linus Torvalds commit b956b5ac28cd709567f10c0ef67e65898ded2e45 Author: Randy Dunlap Date: Tue Aug 11 18:33:31 2020 -0700 mm/zsmalloc.c: fix duplicated words Change "as as" to "as a". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-16-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit b6aa2c83428d49f1331d89a9e3d77850ee0696ba Author: Randy Dunlap Date: Tue Aug 11 18:33:28 2020 -0700 mm/zpool.c: delete duplicated word and fix grammar Drop the repeated word "if". Fix subject/verb agreement. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-15-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 1eba09c15decaf4e390aba0cd409e8a4e821c2a8 Author: Randy Dunlap Date: Tue Aug 11 18:33:26 2020 -0700 mm/vmscan.c: delete or fix duplicated words Drop the repeated word "marked". Change "time time" to "same time". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-14-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 5ce1be0e40fe64cbf540ba54dd10824a8cef99e1 Author: Randy Dunlap Date: Tue Aug 11 18:33:23 2020 -0700 mm/usercopy.c: delete duplicated word Drop the repeated word "the". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-13-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 081a06fa29906643c62ea9477bc374c23417e6f9 Author: Randy Dunlap Date: Tue Aug 11 18:33:19 2020 -0700 mm/slab_common.c: delete duplicated word Drop the repeated word "and". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-12-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit af44c12fe7c9704c4d185446a8ffdea18792017d Author: Randy Dunlap Date: Tue Aug 11 18:33:17 2020 -0700 mm/shmem.c: delete duplicated word Drop the repeated word "the". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-11-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 047b9967d59940f9f64ed13d02e98e9ca7cb5ffb Author: Randy Dunlap Date: Tue Aug 11 18:33:14 2020 -0700 mm/page_alloc.c: delete or fix duplicated words Drop the repeated word "them" and "that". Change "the the" to "to the". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-10-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit c08b342c214c4473b329f828cdc516d2f50a192f Author: Randy Dunlap Date: Tue Aug 11 18:33:11 2020 -0700 mm/nommu.c: delete duplicated words Drop the repeated word "that" in two places. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-9-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit eaf444deed482f908395defa4d9b67ce55b72208 Author: Randy Dunlap Date: Tue Aug 11 18:33:08 2020 -0700 mm/migrate.c: delete duplicated word Drop the repeated word "and". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-8-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit a1a0aea592c1ef05283bc7af8d66ac3de87b2e07 Author: Randy Dunlap Date: Tue Aug 11 18:33:05 2020 -0700 mm/memory.c: delete duplicated words Drop the repeated word "to" in two places. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-7-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit ac5ddd0fcea9bfee1d48884e7fa94e706d213aac Author: Randy Dunlap Date: Tue Aug 11 18:33:02 2020 -0700 mm/memcontrol.c: delete duplicated words Drop the repeated word "down". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-6-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 9e7ee40097ec654d5b9c7803b8e6dc560d17bbe3 Author: Randy Dunlap Date: Tue Aug 11 18:32:59 2020 -0700 mm/hugetlb.c: delete duplicated words Drop the repeated word "the" in two places. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Mike Kravetz Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-5-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 0cb80a2fb5bcd10f8aa7747e35511b52053232ae Author: Randy Dunlap Date: Tue Aug 11 18:32:56 2020 -0700 mm/hmm.c: delete duplicated word Drop the repeated word "pages". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-4-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit ce89fddfe0b73e99b2edd8cfd21afd461258a2df Author: Randy Dunlap Date: Tue Aug 11 18:32:53 2020 -0700 mm/filemap.c: delete duplicated word Drop the repeated word "the". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-3-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit a1c1dbeb2e1a995c374d4954b36269070725f3a0 Author: Randy Dunlap Date: Tue Aug 11 18:32:49 2020 -0700 mm/compaction.c: delete duplicated word Drop the repeated word "a". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Zi Yan Link: http://lkml.kernel.org/r/20200801173822.14973-2-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 6f8c00ff5aa88c847af9af35131d72fae480b566 Author: Arvind Sankar Date: Tue Aug 11 18:32:46 2020 -0700 sparc: drop unused MAX_PHYSADDR_BITS The macro is not used anywhere, so remove the definition. Signed-off-by: Arvind Sankar Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: David Hildenbrand Acked-by: Dave Hansen Acked-by: David S. Miller Acked-by: Mike Rapoport Link: http://lkml.kernel.org/r/20200723231544.17274-4-nivedita@alum.mit.edu Signed-off-by: Linus Torvalds commit c56771b3095d4f1af82847081b6781fc03a13904 Author: Arvind Sankar Date: Tue Aug 11 18:32:43 2020 -0700 sh/mm: drop unused MAX_PHYSADDR_BITS The macro is not used anywhere, so remove the definition. Signed-off-by: Arvind Sankar Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: David Hildenbrand Acked-by: Dave Hansen Acked-by: Mike Rapoport Link: http://lkml.kernel.org/r/20200723231544.17274-3-nivedita@alum.mit.edu Signed-off-by: Linus Torvalds commit 0845f83122d93ae3bafa7ea10209de2148a3b9bc Author: Randy Dunlap Date: Tue Aug 11 18:32:40 2020 -0700 include/linux/memcontrol.h: drop duplicate word and fix spello Drop the doubled word "for" in a comment. Fix spello of "incremented". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Acked-by: Chris Down Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Link: http://lkml.kernel.org/r/b04aa2e4-7c95-12f0-599d-43d07fb28134@infradead.org Signed-off-by: Linus Torvalds commit c82f16b52cb3b50ac1b47e6c590e3dddefc5a97c Author: Randy Dunlap Date: Tue Aug 11 18:32:36 2020 -0700 include/linux/frontswap.h: drop duplicated word in a comment Drop the doubled word "in" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Konrad Rzeszutek Wilk Link: http://lkml.kernel.org/r/3af7ed91-ad62-8445-40a4-9e07a64b9523@infradead.org Signed-off-by: Linus Torvalds commit 3ecabd31341fb4307f156a2bf4467c3f8fa9101b Author: Randy Dunlap Date: Tue Aug 11 18:32:33 2020 -0700 include/linux/highmem.h: fix duplicated words in a comment Change the doubled word "is" in a comment to "it is". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/ad605959-0083-4794-8d31-6b073300dd6f@infradead.org Signed-off-by: Linus Torvalds commit 11192337206d2211bce3ba4ec1575439b6045654 Author: Randy Dunlap Date: Tue Aug 11 18:32:30 2020 -0700 mm: drop duplicated words in Drop the doubled words "to" and "the". Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Link: http://lkml.kernel.org/r/d9fae8d6-0d60-4d52-9385-3199ee98de49@infradead.org Signed-off-by: Linus Torvalds commit 1067b261cc973d68c29de54ef0587c56786e6bd5 Author: Randy Dunlap Date: Tue Aug 11 18:32:27 2020 -0700 mm: drop duplicated words in Drop the doubled words "used" and "by". Drop the repeated acronym "TLB" and make several other fixes around it. (capital letters, spellos) Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Reviewed-by: SeongJae Park Link: http://lkml.kernel.org/r/2bb6e13e-44df-4920-52d9-4d3539945f73@infradead.org Signed-off-by: Linus Torvalds commit de1193f0be66f88e2c6d0fd965137668fc2ec4a5 Author: Charan Teja Reddy Date: Tue Aug 11 18:32:24 2020 -0700 mm, memory_hotplug: update pcp lists everytime onlining a memory block When onlining a first memory block in a zone, pcp lists are not updated thus pcp struct will have the default setting of ->high = 0,->batch = 1. This means till the second memory block in a zone(if it have) is onlined the pcp lists of this zone will not contain any pages because pcp's ->count is always greater than ->high thus free_pcppages_bulk() is called to free batch size(=1) pages every time system wants to add a page to the pcp list through free_unref_page(). To put this in a word, system is not using benefits offered by the pcp lists when there is a single onlineable memory block in a zone. Correct this by always updating the pcp lists when memory block is onlined. Fixes: 1f522509c77a ("mem-hotplug: avoid multiple zones sharing same boot strapping boot_pageset") Signed-off-by: Charan Teja Reddy Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Vinayak Menon Link: http://lkml.kernel.org/r/1596372896-15336-1-git-send-email-charante@codeaurora.org Signed-off-by: Linus Torvalds commit b4223a510e2ab1bf0f971d50af7c1431014b25ad Author: Jia He Date: Tue Aug 11 18:32:20 2020 -0700 mm/memory_hotplug: fix unpaired mem_hotplug_begin/done When check_memblock_offlined_cb() returns failed rc(e.g. the memblock is online at that time), mem_hotplug_begin/done is unpaired in such case. Therefore a warning: Call Trace: percpu_up_write+0x33/0x40 try_remove_memory+0x66/0x120 ? _cond_resched+0x19/0x30 remove_memory+0x2b/0x40 dev_dax_kmem_remove+0x36/0x72 [kmem] device_release_driver_internal+0xf0/0x1c0 device_release_driver+0x12/0x20 bus_remove_device+0xe1/0x150 device_del+0x17b/0x3e0 unregister_dev_dax+0x29/0x60 devm_action_release+0x15/0x20 release_nodes+0x19a/0x1e0 devres_release_all+0x3f/0x50 device_release_driver_internal+0x100/0x1c0 driver_detach+0x4c/0x8f bus_remove_driver+0x5c/0xd0 driver_unregister+0x31/0x50 dax_pmem_exit+0x10/0xfe0 [dax_pmem] Fixes: f1037ec0cc8a ("mm/memory_hotplug: fix remove_memory() lockdep splat") Signed-off-by: Jia He Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Acked-by: Dan Williams Cc: [5.6+] Cc: Andy Lutomirski Cc: Baoquan He Cc: Borislav Petkov Cc: Catalin Marinas Cc: Chuhong Yuan Cc: Dave Hansen Cc: Dave Jiang Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Cameron Cc: Kaly Xin Cc: Logan Gunthorpe Cc: Masahiro Yamada Cc: Mike Rapoport Cc: Peter Zijlstra Cc: Rich Felker Cc: Thomas Gleixner Cc: Tony Luck Cc: Vishal Verma Cc: Will Deacon Cc: Yoshinori Sato Link: http://lkml.kernel.org/r/20200710031619.18762-3-justin.he@arm.com Signed-off-by: Linus Torvalds commit d622ecec5f57ee7e27fbc6db222d8cbaf3c59478 Author: Jia He Date: Tue Aug 11 18:32:16 2020 -0700 mm/memory_hotplug: introduce default dummy memory_add_physaddr_to_nid() This is to introduce a general dummy helper. memory_add_physaddr_to_nid() is a fallback option to get the nid in case NUMA_NO_NID is detected. After this patch, arm64/sh/s390 can simply use the general dummy version. PowerPC/x86/ia64 will still use their specific version. This is the preparation to set a fallback value for dev_dax->target_node. Signed-off-by: Jia He Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Cc: Dan Williams Cc: Michal Hocko Cc: Catalin Marinas Cc: Will Deacon Cc: Tony Luck Cc: Fenghua Yu Cc: Yoshinori Sato Cc: Rich Felker Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Vishal Verma Cc: Dave Jiang Cc: Baoquan He Cc: Chuhong Yuan Cc: Mike Rapoport Cc: Logan Gunthorpe Cc: Masahiro Yamada Cc: Jonathan Cameron Cc: Kaly Xin Link: http://lkml.kernel.org/r/20200710031619.18762-2-justin.he@arm.com Signed-off-by: Linus Torvalds commit fe124c95df9e2acf202910b0510300e37afe074b Author: Daniel Jordan Date: Tue Aug 11 18:32:12 2020 -0700 x86/mm: use max memory block size on bare metal Some of our servers spend significant time at kernel boot initializing memory block sysfs directories and then creating symlinks between them and the corresponding nodes. The slowness happens because the machines get stuck with the smallest supported memory block size on x86 (128M), which results in 16,288 directories to cover the 2T of installed RAM. The search for each memory block is noticeable even with commit 4fb6eabf1037 ("drivers/base/memory.c: cache memory blocks in xarray to accelerate lookup"). Commit 078eb6aa50dc ("x86/mm/memory_hotplug: determine block size based on the end of boot memory") chooses the block size based on alignment with memory end. That addresses hotplug failures in qemu guests, but for bare metal systems whose memory end isn't aligned to even the smallest size, it leaves them at 128M. Make kernels that aren't running on a hypervisor use the largest supported size (2G) to minimize overhead on big machines. Kernel boot goes 7% faster on the aforementioned servers, shaving off half a second. [daniel.m.jordan@oracle.com: v3] Link: http://lkml.kernel.org/r/20200714205450.945834-1-daniel.m.jordan@oracle.com Signed-off-by: Daniel Jordan Signed-off-by: Andrew Morton Acked-by: David Hildenbrand Cc: Andy Lutomirski Cc: Dave Hansen Cc: David Hildenbrand Cc: Michal Hocko Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Steven Sistare Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20200609225451.3542648-1-daniel.m.jordan@oracle.com Signed-off-by: Linus Torvalds commit d49653f35adff8c778e7c5fbd4dbdf929594eca8 Author: Krzysztof Kozlowski Date: Tue Aug 11 18:32:09 2020 -0700 mm: mmu_notifier: fix and extend kerneldoc Fix W=1 compile warnings (invalid kerneldoc): mm/mmu_notifier.c:187: warning: Function parameter or member 'interval_sub' not described in 'mmu_interval_read_bgin' mm/mmu_notifier.c:708: warning: Function parameter or member 'subscription' not described in 'mmu_notifier_registr' mm/mmu_notifier.c:708: warning: Excess function parameter 'mn' description in 'mmu_notifier_register' mm/mmu_notifier.c:880: warning: Function parameter or member 'subscription' not described in 'mmu_notifier_put' mm/mmu_notifier.c:880: warning: Excess function parameter 'mn' description in 'mmu_notifier_put' mm/mmu_notifier.c:982: warning: Function parameter or member 'ops' not described in 'mmu_interval_notifier_insert' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Reviewed-by: Jason Gunthorpe Link: http://lkml.kernel.org/r/20200728171109.28687-4-krzk@kernel.org Signed-off-by: Linus Torvalds commit af161bee93332a1ff10ba029f41936d21850ae82 Author: Waiman Long Date: Tue Aug 11 18:32:06 2020 -0700 include/linux/sched/mm.h: optimize current_gfp_context() The current_gfp_context() converts a number of PF_MEMALLOC_* per-process flags into the corresponding GFP_* flags for memory allocation. In that function, current->flags is accessed 3 times. That may lead to duplicated access of the same memory location. This is not usually a problem with minimal debug config options on as the compiler can optimize away the duplicated memory accesses. With most of the debug config options on, however, that may not be the case. For example, the x86-64 object size of the __need_fs_reclaim() in a debug kernel that calls current_gfp_context() was 309 bytes. With this patch applied, the object size is reduced to 202 bytes. This is a saving of 107 bytes and will probably be slightly faster too. Use READ_ONCE() to access current->flags to prevent the compiler from possibly accessing current->flags multiple times. Signed-off-by: Waiman Long Signed-off-by: Andrew Morton Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Mathieu Desnoyers Cc: Michel Lespinasse Link: http://lkml.kernel.org/r/20200618212936.9776-1-longman@redhat.com Signed-off-by: Linus Torvalds commit 3a5139f1c5bb76d69756fb8f13fffa173e261153 Author: Mike Kravetz Date: Tue Aug 11 18:32:03 2020 -0700 cma: don't quit at first error when activating reserved areas The routine cma_init_reserved_areas is designed to activate all reserved cma areas. It quits when it first encounters an error. This can leave some areas in a state where they are reserved but not activated. There is no feedback to code which performed the reservation. Attempting to allocate memory from areas in such a state will result in a BUG. Modify cma_init_reserved_areas to always attempt to activate all areas. The called routine, cma_activate_area is responsible for leaving the area in a valid state. No one is making active use of returned error codes, so change the routine to void. How to reproduce: This example uses kernelcore, hugetlb and cma as an easy way to reproduce. However, this is a more general cma issue. Two node x86 VM 16GB total, 8GB per node Kernel command line parameters, kernelcore=4G hugetlb_cma=8G Related boot time messages, hugetlb_cma: reserve 8192 MiB, up to 4096 MiB per node cma: Reserved 4096 MiB at 0x0000000100000000 hugetlb_cma: reserved 4096 MiB on node 0 cma: Reserved 4096 MiB at 0x0000000300000000 hugetlb_cma: reserved 4096 MiB on node 1 cma: CMA area hugetlb could not be activated # echo 8 > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI ... Call Trace: bitmap_find_next_zero_area_off+0x51/0x90 cma_alloc+0x1a5/0x310 alloc_fresh_huge_page+0x78/0x1a0 alloc_pool_huge_page+0x6f/0xf0 set_max_huge_pages+0x10c/0x250 nr_hugepages_store_common+0x92/0x120 ? __kmalloc+0x171/0x270 kernfs_fop_write+0xc1/0x1a0 vfs_write+0xc7/0x1f0 ksys_write+0x5f/0xe0 do_syscall_64+0x4d/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: c64be2bb1c6e ("drivers: add Contiguous Memory Allocator") Signed-off-by: Mike Kravetz Signed-off-by: Andrew Morton Reviewed-by: Roman Gushchin Acked-by: Barry Song Cc: Marek Szyprowski Cc: Michal Nazarewicz Cc: Kyungmin Park Cc: Joonsoo Kim Cc: Link: http://lkml.kernel.org/r/20200730163123.6451-1-mike.kravetz@oracle.com Signed-off-by: Linus Torvalds commit 29d0f41d232393482ced6a233126832df3429ad2 Author: Barry Song Date: Tue Aug 11 18:32:00 2020 -0700 mm: hugetlb: fix the name of hugetlb CMA Once we enable CMA_DEBUGFS, we will get the below errors: directory 'cma-hugetlb' with parent 'cma' already present. We should have different names for different CMA areas. Signed-off-by: Barry Song Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Acked-by: Roman Gushchin Link: http://lkml.kernel.org/r/20200616223131.33828-3-song.bao.hua@hisilicon.com Signed-off-by: Linus Torvalds commit 18e98e56f4407b8c766b6f6d9f2850fd2a081e4d Author: Barry Song Date: Tue Aug 11 18:31:57 2020 -0700 mm: cma: fix the name of CMA areas Patch series "mm: fix the names of general cma and hugetlb cma", v2. The current code of CMA can only work when users pass a const string as name parameter. we need to fix the way to handle names in CMA. On the other hand, to avoid name conflicts after enabling CMA_DEBUGFS, each hugetlb should get a different CMA name. This patch (of 2): If users give a name saved in stack, the current code will generate magic pointer. if users don't give a name(NULL), kasprintf() will always return NULL as we are at the early stage. that means cma_init_reserved_mem() will return -ENOMEM if users set name parameter as NULL. [natechancellor@gmail.com: return cma->name directly in cma_get_name] Link: https://github.com/ClangBuiltLinux/linux/issues/1063 Link: http://lkml.kernel.org/r/20200623015840.621964-1-natechancellor@gmail.com Signed-off-by: Barry Song Signed-off-by: Nathan Chancellor Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Acked-by: Roman Gushchin Link: http://lkml.kernel.org/r/20200616223131.33828-2-song.bao.hua@hisilicon.com Signed-off-by: Linus Torvalds commit 835832ba01bb444c7e45139e4b807527c119dafc Author: Jianqun Xu Date: Tue Aug 11 18:31:54 2020 -0700 mm/cma.c: fix NULL pointer dereference when cma could not be activated In some case the cma area could not be activated, but the cma_alloc be used under this case, then the kernel will crash caused by NULL pointer dereference. Add bitmap valid check in cma_alloc to avoid this issue. Signed-off-by: Jianqun Xu Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Link: http://lkml.kernel.org/r/20200615010123.15596-1-jay.xu@rock-chips.com Signed-off-by: Linus Torvalds commit 1a5bae25e3cf95c4e83a97f87a6b5280d9acbb22 Author: Anshuman Khandual Date: Tue Aug 11 18:31:51 2020 -0700 mm/vmstat: add events for THP migration without split Add following new vmstat events which will help in validating THP migration without split. Statistics reported through these new VM events will help in performance debugging. 1. THP_MIGRATION_SUCCESS 2. THP_MIGRATION_FAILURE 3. THP_MIGRATION_SPLIT In addition, these new events also update normal page migration statistics appropriately via PGMIGRATE_SUCCESS and PGMIGRATE_FAILURE. While here, this updates current trace event 'mm_migrate_pages' to accommodate now available THP statistics. [akpm@linux-foundation.org: s/hpage_nr_pages/thp_nr_pages/] [ziy@nvidia.com: v2] Link: http://lkml.kernel.org/r/C5E3C65C-8253-4638-9D3C-71A61858BB8B@nvidia.com [anshuman.khandual@arm.com: s/thp_nr_pages/hpage_nr_pages/] Link: http://lkml.kernel.org/r/1594287583-16568-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Signed-off-by: Zi Yan Signed-off-by: Andrew Morton Reviewed-by: Daniel Jordan Cc: Hugh Dickins Cc: Matthew Wilcox Cc: Zi Yan Cc: John Hubbard Cc: Naoya Horiguchi Link: http://lkml.kernel.org/r/1594080415-27924-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Linus Torvalds commit 4958e4d86ecb011a81f5d80ce2023ef9f10692d8 Author: Yang Shi Date: Tue Aug 11 18:31:48 2020 -0700 mm: thp: remove debug_cow switch Since commit 3917c80280c93a7123f ("thp: change CoW semantics for anon-THP"), the CoW page fault of THP has been rewritten, debug_cow is not used anymore. So, just remove it. Signed-off-by: Yang Shi Signed-off-by: Andrew Morton Reviewed-by: Zi Yan Cc: Kirill A. Shutemov Link: http://lkml.kernel.org/r/1592270980-116062-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Linus Torvalds commit b0fc0f3fca80cf8ea8631eaec6b922bca4c4c2dd Author: Ralph Campbell Date: Tue Aug 11 18:31:45 2020 -0700 mm/migrate: add migrate-shared test for migrate_vma_*() Add a migrate_vma_*() self test for mmap(MAP_SHARED) to verify that !vma_anonymous() ranges won't be migrated. Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Cc: Jerome Glisse Cc: John Hubbard Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: "Bharata B Rao" Cc: Shuah Khan Link: http://lkml.kernel.org/r/20200710194840.7602-3-rcampbell@nvidia.com Link: http://lkml.kernel.org/r/20200709165711.26584-3-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit 0744f2807a4ffb111a31c0769878ec8b125b5241 Author: Ralph Campbell Date: Tue Aug 11 18:31:41 2020 -0700 mm/migrate: optimize migrate_vma_setup() for holes Patch series "mm/migrate: optimize migrate_vma_setup() for holes". A simple optimization for migrate_vma_*() when the source vma is not an anonymous vma and a new test case to exercise it. This patch (of 2): When migrating system memory to device private memory, if the source address range is a valid VMA range and there is no memory or a zero page, the source PFN array is marked as valid but with no PFN. This lets the device driver allocate private memory and clear it, then insert the new device private struct page into the CPU's page tables when migrate_vma_pages() is called. migrate_vma_pages() only inserts the new page if the VMA is an anonymous range. There is no point in telling the device driver to allocate device private memory and then not migrate the page. Instead, mark the source PFN array entries as not migrating to avoid this overhead. [rcampbell@nvidia.com: v2] Link: http://lkml.kernel.org/r/20200710194840.7602-2-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Cc: Jerome Glisse Cc: John Hubbard Cc: Christoph Hellwig Cc: Jason Gunthorpe Cc: "Bharata B Rao" Cc: Shuah Khan Link: http://lkml.kernel.org/r/20200710194840.7602-1-rcampbell@nvidia.com Link: http://lkml.kernel.org/r/20200709165711.26584-1-rcampbell@nvidia.com Link: http://lkml.kernel.org/r/20200709165711.26584-2-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit 34ae204f18519f0920bd50a644abd6fefc8dbfcf Author: Mike Kravetz Date: Tue Aug 11 18:31:38 2020 -0700 hugetlbfs: remove call to huge_pte_alloc without i_mmap_rwsem Commit c0d0381ade79 ("hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization") requires callers of huge_pte_alloc to hold i_mmap_rwsem in at least read mode. This is because the explicit locking in huge_pmd_share (called by huge_pte_alloc) was removed. When restructuring the code, the call to huge_pte_alloc in the else block at the beginning of hugetlb_fault was missed. Unfortunately, that else clause is exercised when there is no page table entry. This will likely lead to a call to huge_pmd_share. If huge_pmd_share thinks pmd sharing is possible, it will traverse the mapping tree (i_mmap) without holding i_mmap_rwsem. If someone else is modifying the tree, bad things such as addressing exceptions or worse could happen. Simply remove the else clause. It should have been removed previously. The code following the else will call huge_pte_alloc with the appropriate locking. To prevent this type of issue in the future, add routines to assert that i_mmap_rwsem is held, and call these routines in huge pmd sharing routines. Fixes: c0d0381ade79 ("hugetlbfs: use i_mmap_rwsem for more pmd sharing synchronization") Suggested-by: Matthew Wilcox Signed-off-by: Mike Kravetz Signed-off-by: Andrew Morton Cc: Michal Hocko Cc: Hugh Dickins Cc: Naoya Horiguchi Cc: "Aneesh Kumar K.V" Cc: Andrea Arcangeli Cc: "Kirill A.Shutemov" Cc: Davidlohr Bueso Cc: Prakash Sangappa Cc: Link: http://lkml.kernel.org/r/e670f327-5cf9-1959-96e4-6dc7cc30d3d5@oracle.com Signed-off-by: Linus Torvalds commit 15568299b7d9988063afce60731df605ab236e2a Author: Mike Kravetz Date: Tue Aug 11 18:31:35 2020 -0700 hugetlbfs: prevent filesystem stacking of hugetlbfs syzbot found issues with having hugetlbfs on a union/overlay as reported in [1]. Due to the limitations (no write) and special functionality of hugetlbfs, it does not work well in filesystem stacking. There are no know use cases for hugetlbfs stacking. Rather than making modifications to get hugetlbfs working in such environments, simply prevent stacking. [1] https://lore.kernel.org/linux-mm/000000000000b4684e05a2968ca6@google.com/ Reported-by: syzbot+d6ec23007e951dadf3de@syzkaller.appspotmail.com Suggested-by: Amir Goldstein Signed-off-by: Mike Kravetz Signed-off-by: Andrew Morton Acked-by: Miklos Szeredi Cc: Al Viro Cc: Matthew Wilcox Cc: Colin Walters Link: http://lkml.kernel.org/r/80f869aa-810d-ef6c-8888-b46cee135907@oracle.com Signed-off-by: Linus Torvalds commit 619b5b469bcab84ea3bee1d8d04451c781d23feb Author: Yafang Shao Date: Tue Aug 11 18:31:32 2020 -0700 mm, oom: show process exiting information in __oom_kill_process() When the OOM killer finds a victim and tryies to kill it, if the victim is already exiting, the task mm will be NULL and no process will be killed. But the dump_header() has been already executed, so it will be strange to dump so much information without killing a process. We'd better show some helpful information to indicate why this happens. Suggested-by: David Rientjes Signed-off-by: Yafang Shao Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: Tetsuo Handa Cc: Qian Cai Link: http://lkml.kernel.org/r/20200721010127.17238-1-laoar.shao@gmail.com Signed-off-by: Linus Torvalds commit b1aa7c9377bdff904efa0fbde1f96e1769730d8a Author: Michal Hocko Date: Tue Aug 11 18:31:28 2020 -0700 doc, mm: clarify /proc//oom_score value range The exported value includes oom_score_adj so the range is no [0, 1000] as described in the previous section but rather [0, 2000]. Mention that fact explicitly. Signed-off-by: Michal Hocko Signed-off-by: Andrew Morton Cc: Jonathan Corbet Cc: David Rientjes Cc: Yafang Shao Link: http://lkml.kernel.org/r/20200709062603.18480-2-mhocko@kernel.org Signed-off-by: Linus Torvalds commit de3f32e1424ca5c751d4cd78cbed6d17ca261c24 Author: Michal Hocko Date: Tue Aug 11 18:31:25 2020 -0700 doc, mm: sync up oom_score_adj documentation There are at least two notes in the oom section. The 3% discount for root processes is gone since d46078b28889 ("mm, oom: remove 3% bonus for CAP_SYS_ADMIN processes"). Likewise children of the selected oom victim are not sacrificed since bbbe48029720 ("mm, oom: remove 'prefer children over parent' heuristic") Drop both of them. Signed-off-by: Michal Hocko Signed-off-by: Andrew Morton Cc: Jonathan Corbet Cc: David Rientjes Cc: Yafang Shao Link: http://lkml.kernel.org/r/20200709062603.18480-1-mhocko@kernel.org Signed-off-by: Linus Torvalds commit 9066e5cfb73cdbcdbb49e87999482ab615e9fc76 Author: Yafang Shao Date: Tue Aug 11 18:31:22 2020 -0700 mm, oom: make the calculation of oom badness more accurate Recently we found an issue on our production environment that when memcg oom is triggered the oom killer doesn't chose the process with largest resident memory but chose the first scanned process. Note that all processes in this memcg have the same oom_score_adj, so the oom killer should chose the process with largest resident memory. Bellow is part of the oom info, which is enough to analyze this issue. [7516987.983223] memory: usage 16777216kB, limit 16777216kB, failcnt 52843037 [7516987.983224] memory+swap: usage 16777216kB, limit 9007199254740988kB, failcnt 0 [7516987.983225] kmem: usage 301464kB, limit 9007199254740988kB, failcnt 0 [...] [7516987.983293] [ pid ] uid tgid total_vm rss pgtables_bytes swapents oom_score_adj name [7516987.983510] [ 5740] 0 5740 257 1 32768 0 -998 pause [7516987.983574] [58804] 0 58804 4594 771 81920 0 -998 entry_point.bas [7516987.983577] [58908] 0 58908 7089 689 98304 0 -998 cron [7516987.983580] [58910] 0 58910 16235 5576 163840 0 -998 supervisord [7516987.983590] [59620] 0 59620 18074 1395 188416 0 -998 sshd [7516987.983594] [59622] 0 59622 18680 6679 188416 0 -998 python [7516987.983598] [59624] 0 59624 1859266 5161 548864 0 -998 odin-agent [7516987.983600] [59625] 0 59625 707223 9248 983040 0 -998 filebeat [7516987.983604] [59627] 0 59627 416433 64239 774144 0 -998 odin-log-agent [7516987.983607] [59631] 0 59631 180671 15012 385024 0 -998 python3 [7516987.983612] [61396] 0 61396 791287 3189 352256 0 -998 client [7516987.983615] [61641] 0 61641 1844642 29089 946176 0 -998 client [7516987.983765] [ 9236] 0 9236 2642 467 53248 0 -998 php_scanner [7516987.983911] [42898] 0 42898 15543 838 167936 0 -998 su [7516987.983915] [42900] 1000 42900 3673 867 77824 0 -998 exec_script_vr2 [7516987.983918] [42925] 1000 42925 36475 19033 335872 0 -998 python [7516987.983921] [57146] 1000 57146 3673 848 73728 0 -998 exec_script_J2p [7516987.983925] [57195] 1000 57195 186359 22958 491520 0 -998 python2 [7516987.983928] [58376] 1000 58376 275764 14402 290816 0 -998 rosmaster [7516987.983931] [58395] 1000 58395 155166 4449 245760 0 -998 rosout [7516987.983935] [58406] 1000 58406 18285584 3967322 37101568 0 -998 data_sim [7516987.984221] oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=3aa16c9482ae3a6f6b78bda68a55d32c87c99b985e0f11331cddf05af6c4d753,mems_allowed=0-1,oom_memcg=/kubepods/podf1c273d3-9b36-11ea-b3df-246e9693c184,task_memcg=/kubepods/podf1c273d3-9b36-11ea-b3df-246e9693c184/1f246a3eeea8f70bf91141eeaf1805346a666e225f823906485ea0b6c37dfc3d,task=pause,pid=5740,uid=0 [7516987.984254] Memory cgroup out of memory: Killed process 5740 (pause) total-vm:1028kB, anon-rss:4kB, file-rss:0kB, shmem-rss:0kB [7516988.092344] oom_reaper: reaped process 5740 (pause), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB We can find that the first scanned process 5740 (pause) was killed, but its rss is only one page. That is because, when we calculate the oom badness in oom_badness(), we always ignore the negtive point and convert all of these negtive points to 1. Now as oom_score_adj of all the processes in this targeted memcg have the same value -998, the points of these processes are all negtive value. As a result, the first scanned process will be killed. The oom_socre_adj (-998) in this memcg is set by kubelet, because it is a a Guaranteed pod, which has higher priority to prevent from being killed by system oom. To fix this issue, we should make the calculation of oom point more accurate. We can achieve it by convert the chosen_point from 'unsigned long' to 'long'. [cai@lca.pw: reported a issue in the previous version] [mhocko@suse.com: fixed the issue reported by Cai] [mhocko@suse.com: add the comment in proc_oom_score()] [laoar.shao@gmail.com: v3] Link: http://lkml.kernel.org/r/1594396651-9931-1-git-send-email-laoar.shao@gmail.com Signed-off-by: Yafang Shao Signed-off-by: Andrew Morton Tested-by: Naresh Kamboju Acked-by: Michal Hocko Cc: David Rientjes Cc: Qian Cai Link: http://lkml.kernel.org/r/1594309987-9919-1-git-send-email-laoar.shao@gmail.com Signed-off-by: Linus Torvalds commit f3f3416c2234c0a9372316bec5c48cbd58b565c5 Author: Yanfei Xu Date: Tue Aug 11 18:31:19 2020 -0700 include/linux/mempolicy.h: fix typo Change "interlave" to "interleave". Signed-off-by: Yanfei Xu Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200810063454.9357-1-yanfei.xu@windriver.com Signed-off-by: Linus Torvalds commit 4605f057aace9291e80bf9982cc7c8babc917f56 Author: Wenchao Hao Date: Tue Aug 11 18:31:16 2020 -0700 mm/mempolicy.c: check parameters first in kernel_get_mempolicy Previous implementatoin calls untagged_addr() before error check, while if the error check failed and return EINVAL, the untagged_addr() call is just useless work. Signed-off-by: Wenchao Hao Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200801090825.5597-1-haowenchao22@gmail.com Signed-off-by: Linus Torvalds commit f6e92f404834698df0a7c4e1d8e07b3771cd6e46 Author: Krzysztof Kozlowski Date: Tue Aug 11 18:31:13 2020 -0700 mm: mempolicy: fix kerneldoc of numa_map_to_online_node() Fix W=1 compile warnings (invalid kerneldoc): mm/mempolicy.c:137: warning: Function parameter or member 'node' not described in 'numa_map_to_online_node' mm/mempolicy.c:137: warning: Excess function parameter 'nid' description in 'numa_map_to_online_node' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200728171109.28687-3-krzk@kernel.org Signed-off-by: Linus Torvalds commit 860b32729a21e0565585a9e2ecea2e5244d65acd Author: Alex Shi Date: Tue Aug 11 18:31:10 2020 -0700 mm/compaction: correct the comments of compact_defer_shift There is no compact_defer_limit. It should be compact_defer_shift in use. and add compact_order_failed explanation. Signed-off-by: Alex Shi Signed-off-by: Andrew Morton Reviewed-by: Alexander Duyck Link: http://lkml.kernel.org/r/3bd60e1b-a74e-050d-ade4-6e8f54e00b92@linux.alibaba.com Signed-off-by: Linus Torvalds commit d34c0a7599ea8c301bc471dfa1eb2bf2db6752d1 Author: Nitin Gupta Date: Tue Aug 11 18:31:07 2020 -0700 mm: use unsigned types for fragmentation score Proactive compaction uses per-node/zone "fragmentation score" which is always in range [0, 100], so use unsigned type of these scores as well as for related constants. Signed-off-by: Nitin Gupta Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Cc: Luis Chamberlain Cc: Kees Cook Cc: Iurii Zaikin Cc: Vlastimil Babka Cc: Joonsoo Kim Link: http://lkml.kernel.org/r/20200618010319.13159-1-nigupta@nvidia.com Signed-off-by: Linus Torvalds commit 25788738eb9ce46fe6a0fd84a3ceef5c795d41f0 Author: Nitin Gupta Date: Tue Aug 11 18:31:04 2020 -0700 mm: fix compile error due to COMPACTION_HPAGE_ORDER Fix compile error when COMPACTION_HPAGE_ORDER is assigned to HUGETLB_PAGE_ORDER. The correct way to check if this constant is defined is to check for CONFIG_HUGETLBFS. Reported-by: Nathan Chancellor Signed-off-by: Nitin Gupta Signed-off-by: Andrew Morton Tested-by: Nathan Chancellor Cc: Stephen Rothwell Link: http://lkml.kernel.org/r/20200623064544.25766-1-nigupta@nvidia.com Signed-off-by: Linus Torvalds commit facdaa917c4d5a376d09d25865f5a863f906234a Author: Nitin Gupta Date: Tue Aug 11 18:31:00 2020 -0700 mm: proactive compaction For some applications, we need to allocate almost all memory as hugepages. However, on a running system, higher-order allocations can fail if the memory is fragmented. Linux kernel currently does on-demand compaction as we request more hugepages, but this style of compaction incurs very high latency. Experiments with one-time full memory compaction (followed by hugepage allocations) show that kernel is able to restore a highly fragmented memory state to a fairly compacted memory state within <1 sec for a 32G system. Such data suggests that a more proactive compaction can help us allocate a large fraction of memory as hugepages keeping allocation latencies low. For a more proactive compaction, the approach taken here is to define a new sysctl called 'vm.compaction_proactiveness' which dictates bounds for external fragmentation which kcompactd tries to maintain. The tunable takes a value in range [0, 100], with a default of 20. Note that a previous version of this patch [1] was found to introduce too many tunables (per-order extfrag{low, high}), but this one reduces them to just one sysctl. Also, the new tunable is an opaque value instead of asking for specific bounds of "external fragmentation", which would have been difficult to estimate. The internal interpretation of this opaque value allows for future fine-tuning. Currently, we use a simple translation from this tunable to [low, high] "fragmentation score" thresholds (low=100-proactiveness, high=low+10%). The score for a node is defined as weighted mean of per-zone external fragmentation. A zone's present_pages determines its weight. To periodically check per-node score, we reuse per-node kcompactd threads, which are woken up every 500 milliseconds to check the same. If a node's score exceeds its high threshold (as derived from user-provided proactiveness value), proactive compaction is started until its score reaches its low threshold value. By default, proactiveness is set to 20, which implies threshold values of low=80 and high=90. This patch is largely based on ideas from Michal Hocko [2]. See also the LWN article [3]. Performance data ================ System: x64_64, 1T RAM, 80 CPU threads. Kernel: 5.6.0-rc3 + this patch echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/enabled echo madvise | sudo tee /sys/kernel/mm/transparent_hugepage/defrag Before starting the driver, the system was fragmented from a userspace program that allocates all memory and then for each 2M aligned section, frees 3/4 of base pages using munmap. The workload is mainly anonymous userspace pages, which are easy to move around. I intentionally avoided unmovable pages in this test to see how much latency we incur when hugepage allocations hit direct compaction. 1. Kernel hugepage allocation latencies With the system in such a fragmented state, a kernel driver then allocates as many hugepages as possible and measures allocation latency: (all latency values are in microseconds) - With vanilla 5.6.0-rc3 percentile latency –––––––––– ––––––– 5 7894 10 9496 25 12561 30 15295 40 18244 50 21229 60 27556 75 30147 80 31047 90 32859 95 33799 Total 2M hugepages allocated = 383859 (749G worth of hugepages out of 762G total free => 98% of free memory could be allocated as hugepages) - With 5.6.0-rc3 + this patch, with proactiveness=20 sysctl -w vm.compaction_proactiveness=20 percentile latency –––––––––– ––––––– 5 2 10 2 25 3 30 3 40 3 50 4 60 4 75 4 80 4 90 5 95 429 Total 2M hugepages allocated = 384105 (750G worth of hugepages out of 762G total free => 98% of free memory could be allocated as hugepages) 2. JAVA heap allocation In this test, we first fragment memory using the same method as for (1). Then, we start a Java process with a heap size set to 700G and request the heap to be allocated with THP hugepages. We also set THP to madvise to allow hugepage backing of this heap. /usr/bin/time java -Xms700G -Xmx700G -XX:+UseTransparentHugePages -XX:+AlwaysPreTouch The above command allocates 700G of Java heap using hugepages. - With vanilla 5.6.0-rc3 17.39user 1666.48system 27:37.89elapsed - With 5.6.0-rc3 + this patch, with proactiveness=20 8.35user 194.58system 3:19.62elapsed Elapsed time remains around 3:15, as proactiveness is further increased. Note that proactive compaction happens throughout the runtime of these workloads. The situation of one-time compaction, sufficient to supply hugepages for following allocation stream, can probably happen for more extreme proactiveness values, like 80 or 90. In the above Java workload, proactiveness is set to 20. The test starts with a node's score of 80 or higher, depending on the delay between the fragmentation step and starting the benchmark, which gives more-or-less time for the initial round of compaction. As t he benchmark consumes hugepages, node's score quickly rises above the high threshold (90) and proactive compaction starts again, which brings down the score to the low threshold level (80). Repeat. bpftrace also confirms proactive compaction running 20+ times during the runtime of this Java benchmark. kcompactd threads consume 100% of one of the CPUs while it tries to bring a node's score within thresholds. Backoff behavior ================ Above workloads produce a memory state which is easy to compact. However, if memory is filled with unmovable pages, proactive compaction should essentially back off. To test this aspect: - Created a kernel driver that allocates almost all memory as hugepages followed by freeing first 3/4 of each hugepage. - Set proactiveness=40 - Note that proactive_compact_node() is deferred maximum number of times with HPAGE_FRAG_CHECK_INTERVAL_MSEC of wait between each check (=> ~30 seconds between retries). [1] https://patchwork.kernel.org/patch/11098289/ [2] https://lore.kernel.org/linux-mm/20161230131412.GI13301@dhcp22.suse.cz/ [3] https://lwn.net/Articles/817905/ Signed-off-by: Nitin Gupta Signed-off-by: Andrew Morton Tested-by: Oleksandr Natalenko Reviewed-by: Vlastimil Babka Reviewed-by: Khalid Aziz Reviewed-by: Oleksandr Natalenko Cc: Vlastimil Babka Cc: Khalid Aziz Cc: Michal Hocko Cc: Mel Gorman Cc: Matthew Wilcox Cc: Mike Kravetz Cc: Joonsoo Kim Cc: David Rientjes Cc: Nitin Gupta Cc: Oleksandr Natalenko Link: http://lkml.kernel.org/r/20200616204527.19185-1-nigupta@nvidia.com Signed-off-by: Linus Torvalds commit 471e78cc7687337abd10626196f5addb30b01824 Author: Michal Koutný Date: Tue Aug 11 18:30:57 2020 -0700 /proc/PID/smaps: consistent whitespace output format The keys in smaps output are padded to fixed width with spaces. All except for THPeligible that uses tabs (only since commit c06306696f83 ("mm: thp: fix false negative of shmem vma's THP eligibility")). Unify the output formatting to save time debugging some naïve parsers. (Part of the unification is also aligning FilePmdMapped with others.) Signed-off-by: Michal Koutný Signed-off-by: Andrew Morton Acked-by: Yang Shi Cc: Alexey Dobriyan Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/20200728083207.17531-1-mkoutny@suse.com Signed-off-by: Linus Torvalds commit 4002570c5c585c4c9a889e45dd104ed663257eec Author: Joonsoo Kim Date: Tue Aug 11 18:30:54 2020 -0700 mm/vmscan: restore active/inactive ratio for anonymous LRU Now that workingset detection is implemented for anonymous LRU, we don't need large inactive list to allow detecting frequently accessed pages before they are reclaimed, anymore. This effectively reverts the temporary measure put in by commit "mm/vmscan: make active/inactive ratio as 1:1 for anon lru". Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Hugh Dickins Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Link: http://lkml.kernel.org/r/1595490560-15117-7-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit aae466b0052e1888edd1d7f473d4310d64936196 Author: Joonsoo Kim Date: Tue Aug 11 18:30:50 2020 -0700 mm/swap: implement workingset detection for anonymous LRU This patch implements workingset detection for anonymous LRU. All the infrastructure is implemented by the previous patches so this patch just activates the workingset detection by installing/retrieving the shadow entry and adding refault calculation. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Hugh Dickins Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Link: http://lkml.kernel.org/r/1595490560-15117-6-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 3852f6768ede542ed48b9077bedf482c7ecb6327 Author: Joonsoo Kim Date: Tue Aug 11 18:30:47 2020 -0700 mm/swapcache: support to handle the shadow entries Workingset detection for anonymous page will be implemented in the following patch and it requires to store the shadow entries into the swapcache. This patch implements an infrastructure to store the shadow entry in the swapcache. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Cc: Hugh Dickins Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Cc: Vlastimil Babka Link: http://lkml.kernel.org/r/1595490560-15117-5-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 170b04b7ae49634df103810dad67b22cf8a99aa6 Author: Joonsoo Kim Date: Tue Aug 11 18:30:43 2020 -0700 mm/workingset: prepare the workingset detection infrastructure for anon LRU To prepare the workingset detection for anon LRU, this patch splits workingset event counters for refault, activate and restore into anon and file variants, as well as the refaults counter in struct lruvec. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Hugh Dickins Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Link: http://lkml.kernel.org/r/1595490560-15117-4-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit b518154e59aab3ad0780a169c5cc84bd4ee4357e Author: Joonsoo Kim Date: Tue Aug 11 18:30:40 2020 -0700 mm/vmscan: protect the workingset on anonymous LRU In current implementation, newly created or swap-in anonymous page is started on active list. Growing active list results in rebalancing active/inactive list so old pages on active list are demoted to inactive list. Hence, the page on active list isn't protected at all. Following is an example of this situation. Assume that 50 hot pages on active list. Numbers denote the number of pages on active/inactive list (active | inactive). 1. 50 hot pages on active list 50(h) | 0 2. workload: 50 newly created (used-once) pages 50(uo) | 50(h) 3. workload: another 50 newly created (used-once) pages 50(uo) | 50(uo), swap-out 50(h) This patch tries to fix this issue. Like as file LRU, newly created or swap-in anonymous pages will be inserted to the inactive list. They are promoted to active list if enough reference happens. This simple modification changes the above example as following. 1. 50 hot pages on active list 50(h) | 0 2. workload: 50 newly created (used-once) pages 50(h) | 50(uo) 3. workload: another 50 newly created (used-once) pages 50(h) | 50(uo), swap-out 50(uo) As you can see, hot pages on active list would be protected. Note that, this implementation has a drawback that the page cannot be promoted and will be swapped-out if re-access interval is greater than the size of inactive list but less than the size of total(active+inactive). To solve this potential issue, following patch will apply workingset detection similar to the one that's already applied to file LRU. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Hugh Dickins Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Link: http://lkml.kernel.org/r/1595490560-15117-3-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit ccc5dc67340c109e624e07e02790e9fbdec900d6 Author: Joonsoo Kim Date: Tue Aug 11 18:30:36 2020 -0700 mm/vmscan: make active/inactive ratio as 1:1 for anon lru Patch series "workingset protection/detection on the anonymous LRU list", v7. * PROBLEM In current implementation, newly created or swap-in anonymous page is started on the active list. Growing the active list results in rebalancing active/inactive list so old pages on the active list are demoted to the inactive list. Hence, hot page on the active list isn't protected at all. Following is an example of this situation. Assume that 50 hot pages on active list and system can contain total 100 pages. Numbers denote the number of pages on active/inactive list (active | inactive). (h) stands for hot pages and (uo) stands for used-once pages. 1. 50 hot pages on active list 50(h) | 0 2. workload: 50 newly created (used-once) pages 50(uo) | 50(h) 3. workload: another 50 newly created (used-once) pages 50(uo) | 50(uo), swap-out 50(h) As we can see, hot pages are swapped-out and it would cause swap-in later. * SOLUTION Since this is what we want to avoid, this patchset implements workingset protection. Like as the file LRU list, newly created or swap-in anonymous page is started on the inactive list. Also, like as the file LRU list, if enough reference happens, the page will be promoted. This simple modification changes the above example as following. 1. 50 hot pages on active list 50(h) | 0 2. workload: 50 newly created (used-once) pages 50(h) | 50(uo) 3. workload: another 50 newly created (used-once) pages 50(h) | 50(uo), swap-out 50(uo) hot pages remains in the active list. :) * EXPERIMENT I tested this scenario on my test bed and confirmed that this problem happens on current implementation. I also checked that it is fixed by this patchset. * SUBJECT workingset detection * PROBLEM Later part of the patchset implements the workingset detection for the anonymous LRU list. There is a corner case that workingset protection could cause thrashing. If we can avoid thrashing by workingset detection, we can get the better performance. Following is an example of thrashing due to the workingset protection. 1. 50 hot pages on active list 50(h) | 0 2. workload: 50 newly created (will be hot) pages 50(h) | 50(wh) 3. workload: another 50 newly created (used-once) pages 50(h) | 50(uo), swap-out 50(wh) 4. workload: 50 (will be hot) pages 50(h) | 50(wh), swap-in 50(wh) 5. workload: another 50 newly created (used-once) pages 50(h) | 50(uo), swap-out 50(wh) 6. repeat 4, 5 Without workingset detection, this kind of workload cannot be promoted and thrashing happens forever. * SOLUTION Therefore, this patchset implements workingset detection. All the infrastructure for workingset detecion is already implemented, so there is not much work to do. First, extend workingset detection code to deal with the anonymous LRU list. Then, make swap cache handles the exceptional value for the shadow entry. Lastly, install/retrieve the shadow value into/from the swap cache and check the refault distance. * EXPERIMENT I made a test program to imitates above scenario and confirmed that problem exists. Then, I checked that this patchset fixes it. My test setup is a virtual machine with 8 cpus and 6100MB memory. But, the amount of the memory that the test program can use is about 280 MB. This is because the system uses large ram-backed swap and large ramdisk to capture the trace. Test scenario is like as below. 1. allocate cold memory (512MB) 2. allocate hot-1 memory (96MB) 3. activate hot-1 memory (96MB) 4. allocate another hot-2 memory (96MB) 5. access cold memory (128MB) 6. access hot-2 memory (96MB) 7. repeat 5, 6 Since hot-1 memory (96MB) is on the active list, the inactive list can contains roughly 190MB pages. hot-2 memory's re-access interval (96+128 MB) is more 190MB, so it cannot be promoted without workingset detection and swap-in/out happens repeatedly. With this patchset, workingset detection works and promotion happens. Therefore, swap-in/out occurs less. Here is the result. (average of 5 runs) type swap-in swap-out base 863240 989945 patch 681565 809273 As we can see, patched kernel do less swap-in/out. * OVERALL TEST (ebizzy using modified random function) ebizzy is the test program that main thread allocates lots of memory and child threads access them randomly during the given times. Swap-in will happen if allocated memory is larger than the system memory. The random function that represents the zipf distribution is used to make hot/cold memory. Hot/cold ratio is controlled by the parameter. If the parameter is high, hot memory is accessed much larger than cold one. If the parameter is low, the number of access on each memory would be similar. I uses various parameters in order to show the effect of patchset on various hot/cold ratio workload. My test setup is a virtual machine with 8 cpus, 1024 MB memory and 5120 MB ram swap. Result format is as following. param: 1-1024-0.1 - 1 (number of thread) - 1024 (allocated memory size, MB) - 0.1 (zipf distribution alpha, 0.1 works like as roughly uniform random, 1.3 works like as small portion of memory is hot and the others are cold) pswpin: smaller is better std: standard deviation improvement: negative is better * single thread param pswpin std improvement base 1-1024.0-0.1 14101983.40 79441.19 prot 1-1024.0-0.1 14065875.80 136413.01 ( -0.26 ) detect 1-1024.0-0.1 13910435.60 100804.82 ( -1.36 ) base 1-1024.0-0.7 7998368.80 43469.32 prot 1-1024.0-0.7 7622245.80 88318.74 ( -4.70 ) detect 1-1024.0-0.7 7618515.20 59742.07 ( -4.75 ) base 1-1024.0-1.3 1017400.80 38756.30 prot 1-1024.0-1.3 940464.60 29310.69 ( -7.56 ) detect 1-1024.0-1.3 945511.40 24579.52 ( -7.07 ) base 1-1280.0-0.1 22895541.40 50016.08 prot 1-1280.0-0.1 22860305.40 51952.37 ( -0.15 ) detect 1-1280.0-0.1 22705565.20 93380.35 ( -0.83 ) base 1-1280.0-0.7 13717645.60 46250.65 prot 1-1280.0-0.7 12935355.80 64754.43 ( -5.70 ) detect 1-1280.0-0.7 13040232.00 63304.00 ( -4.94 ) base 1-1280.0-1.3 1654251.40 4159.68 prot 1-1280.0-1.3 1522680.60 33673.50 ( -7.95 ) detect 1-1280.0-1.3 1599207.00 70327.89 ( -3.33 ) base 1-1536.0-0.1 31621775.40 31156.28 prot 1-1536.0-0.1 31540355.20 62241.36 ( -0.26 ) detect 1-1536.0-0.1 31420056.00 123831.27 ( -0.64 ) base 1-1536.0-0.7 19620760.60 60937.60 prot 1-1536.0-0.7 18337839.60 56102.58 ( -6.54 ) detect 1-1536.0-0.7 18599128.00 75289.48 ( -5.21 ) base 1-1536.0-1.3 2378142.40 20994.43 prot 1-1536.0-1.3 2166260.60 48455.46 ( -8.91 ) detect 1-1536.0-1.3 2183762.20 16883.24 ( -8.17 ) base 1-1792.0-0.1 40259714.80 90750.70 prot 1-1792.0-0.1 40053917.20 64509.47 ( -0.51 ) detect 1-1792.0-0.1 39949736.40 104989.64 ( -0.77 ) base 1-1792.0-0.7 25704884.40 69429.68 prot 1-1792.0-0.7 23937389.00 79945.60 ( -6.88 ) detect 1-1792.0-0.7 24271902.00 35044.30 ( -5.57 ) base 1-1792.0-1.3 3129497.00 32731.86 prot 1-1792.0-1.3 2796994.40 19017.26 ( -10.62 ) detect 1-1792.0-1.3 2886840.40 33938.82 ( -7.75 ) base 1-2048.0-0.1 48746924.40 50863.88 prot 1-2048.0-0.1 48631954.40 24537.30 ( -0.24 ) detect 1-2048.0-0.1 48509419.80 27085.34 ( -0.49 ) base 1-2048.0-0.7 32046424.40 78624.22 prot 1-2048.0-0.7 29764182.20 86002.26 ( -7.12 ) detect 1-2048.0-0.7 30250315.80 101282.14 ( -5.60 ) base 1-2048.0-1.3 3916723.60 24048.55 prot 1-2048.0-1.3 3490781.60 33292.61 ( -10.87 ) detect 1-2048.0-1.3 3585002.20 44942.04 ( -8.47 ) * multi thread param pswpin std improvement base 8-1024.0-0.1 16219822.60 329474.01 prot 8-1024.0-0.1 15959494.00 654597.45 ( -1.61 ) detect 8-1024.0-0.1 15773790.80 502275.25 ( -2.75 ) base 8-1024.0-0.7 9174107.80 537619.33 prot 8-1024.0-0.7 8571915.00 385230.08 ( -6.56 ) detect 8-1024.0-0.7 8489484.20 364683.00 ( -7.46 ) base 8-1024.0-1.3 1108495.60 83555.98 prot 8-1024.0-1.3 1038906.20 63465.20 ( -6.28 ) detect 8-1024.0-1.3 941817.80 32648.80 ( -15.04 ) base 8-1280.0-0.1 25776114.20 450480.45 prot 8-1280.0-0.1 25430847.00 465627.07 ( -1.34 ) detect 8-1280.0-0.1 25282555.00 465666.55 ( -1.91 ) base 8-1280.0-0.7 15218968.00 702007.69 prot 8-1280.0-0.7 13957947.80 492643.86 ( -8.29 ) detect 8-1280.0-0.7 14158331.20 238656.02 ( -6.97 ) base 8-1280.0-1.3 1792482.80 30512.90 prot 8-1280.0-1.3 1577686.40 34002.62 ( -11.98 ) detect 8-1280.0-1.3 1556133.00 22944.79 ( -13.19 ) base 8-1536.0-0.1 33923761.40 575455.85 prot 8-1536.0-0.1 32715766.20 300633.51 ( -3.56 ) detect 8-1536.0-0.1 33158477.40 117764.51 ( -2.26 ) base 8-1536.0-0.7 20628907.80 303851.34 prot 8-1536.0-0.7 19329511.20 341719.31 ( -6.30 ) detect 8-1536.0-0.7 20013934.00 385358.66 ( -2.98 ) base 8-1536.0-1.3 2588106.40 130769.20 prot 8-1536.0-1.3 2275222.40 89637.06 ( -12.09 ) detect 8-1536.0-1.3 2365008.40 124412.55 ( -8.62 ) base 8-1792.0-0.1 43328279.20 946469.12 prot 8-1792.0-0.1 41481980.80 525690.89 ( -4.26 ) detect 8-1792.0-0.1 41713944.60 406798.93 ( -3.73 ) base 8-1792.0-0.7 27155647.40 536253.57 prot 8-1792.0-0.7 24989406.80 502734.52 ( -7.98 ) detect 8-1792.0-0.7 25524806.40 263237.87 ( -6.01 ) base 8-1792.0-1.3 3260372.80 137907.92 prot 8-1792.0-1.3 2879187.80 63597.26 ( -11.69 ) detect 8-1792.0-1.3 2892962.20 33229.13 ( -11.27 ) base 8-2048.0-0.1 50583989.80 710121.48 prot 8-2048.0-0.1 49599984.40 228782.42 ( -1.95 ) detect 8-2048.0-0.1 50578596.00 660971.66 ( -0.01 ) base 8-2048.0-0.7 33765479.60 812659.55 prot 8-2048.0-0.7 30767021.20 462907.24 ( -8.88 ) detect 8-2048.0-0.7 32213068.80 211884.24 ( -4.60 ) base 8-2048.0-1.3 3941675.80 28436.45 prot 8-2048.0-1.3 3538742.40 76856.08 ( -10.22 ) detect 8-2048.0-1.3 3579397.80 58630.95 ( -9.19 ) As we can see, all the cases show improvement. Especially, test case with zipf distribution 1.3 show more improvements. It means that if there is a hot/cold tendency in anon pages, this patchset works better. This patch (of 6): Current implementation of LRU management for anonymous page has some problems. Most important one is that it doesn't protect the workingset, that is, pages on the active LRU list. Although, this problem will be fixed in the following patchset, the preparation is required and this patch does it. What following patch does is to implement workingset protection. After the following patchset, newly created or swap-in pages will start their lifetime on the inactive list. If inactive list is too small, there is not enough chance to be referenced and the page cannot become the workingset. In order to provide the newly anonymous or swap-in pages enough chance to be referenced again, this patch makes active/inactive LRU ratio as 1:1. This is just a temporary measure. Later patch in the series introduces workingset detection for anonymous LRU that will be used to better decide if pages should start on the active and inactive list. Afterwards this patch is effectively reverted. Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Hugh Dickins Cc: Minchan Kim Cc: Mel Gorman Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/1595490560-15117-1-git-send-email-iamjoonsoo.kim@lge.com Link: http://lkml.kernel.org/r/1595490560-15117-2-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 8ca39e6874f812a393bb66d9fdbb7598d5f0451c Author: Muchun Song Date: Tue Aug 11 18:30:32 2020 -0700 mm/hugetlb: add mempolicy check in the reservation routine In the reservation routine, we only check whether the cpuset meets the memory allocation requirements. But we ignore the mempolicy of MPOL_BIND case. If someone mmap hugetlb succeeds, but the subsequent memory allocation may fail due to mempolicy restrictions and receives the SIGBUS signal. This can be reproduced by the follow steps. 1) Compile the test case. cd tools/testing/selftests/vm/ gcc map_hugetlb.c -o map_hugetlb 2) Pre-allocate huge pages. Suppose there are 2 numa nodes in the system. Each node will pre-allocate one huge page. echo 2 > /proc/sys/vm/nr_hugepages 3) Run test case(mmap 4MB). We receive the SIGBUS signal. numactl --membind=3D0 ./map_hugetlb 4 With this patch applied, the mmap will fail in the step 3) and throw "mmap: Cannot allocate memory". [akpm@linux-foundation.org: include sched.h for `current'] Reported-by: Jianchao Guo Suggested-by: Michal Hocko Signed-off-by: Muchun Song Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Cc: David Rientjes Cc: Mel Gorman Cc: Michel Lespinasse Cc: Baoquan He Link: http://lkml.kernel.org/r/20200728034938.14993-1-songmuchun@bytedance.com Signed-off-by: Linus Torvalds commit 90631e1dea55bfc14a8ee8c594aa136b243d4c88 Author: Roman Gushchin Date: Tue Aug 11 18:30:29 2020 -0700 kselftests: cgroup: add perpcu memory accounting test Add a simple test to check the percpu memory accounting. The test creates a cgroup tree with 1000 child cgroups and checks values of memory.current and memory.stat::percpu. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Cc: Christoph Lameter Cc: David Rientjes Cc: Dennis Zhou Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Michal Hocko Cc: Pekka Enberg Cc: Shakeel Butt Cc: Tejun Heo Cc: Tobin C. Harding Cc: Vlastimil Babka Cc: Waiman Long Cc: Michal Koutný Cc: Bixuan Cui Cc: Stephen Rothwell Link: http://lkml.kernel.org/r/20200608230819.832349-6-guro@fb.com Signed-off-by: Linus Torvalds commit 3e38e0aaca9eafb12b1c4b731d1c10975cbe7974 Author: Roman Gushchin Date: Tue Aug 11 18:30:25 2020 -0700 mm: memcg: charge memcg percpu memory to the parent cgroup Memory cgroups are using large chunks of percpu memory to store vmstat data. Yet this memory is not accounted at all, so in the case when there are many (dying) cgroups, it's not exactly clear where all the memory is. Because the size of memory cgroup internal structures can dramatically exceed the size of object or page which is pinning it in the memory, it's not a good idea to simply ignore it. It actually breaks the isolation between cgroups. Let's account the consumed percpu memory to the parent cgroup. [guro@fb.com: add WARN_ON_ONCE()s, per Johannes] Link: http://lkml.kernel.org/r/20200811170611.GB1507044@carbon.DHCP.thefacebook.com Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Dennis Zhou Acked-by: Johannes Weiner Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Mel Gorman Cc: Michal Hocko Cc: Pekka Enberg Cc: Tejun Heo Cc: Tobin C. Harding Cc: Vlastimil Babka Cc: Waiman Long Cc: Bixuan Cui Cc: Michal Koutný Cc: Stephen Rothwell Link: http://lkml.kernel.org/r/20200623184515.4132564-5-guro@fb.com Signed-off-by: Linus Torvalds commit 772616b031f06e05846488b01dab46a7c832da13 Author: Roman Gushchin Date: Tue Aug 11 18:30:21 2020 -0700 mm: memcg/percpu: per-memcg percpu memory statistics Percpu memory can represent a noticeable chunk of the total memory consumption, especially on big machines with many CPUs. Let's track percpu memory usage for each memcg and display it in memory.stat. A percpu allocation is usually scattered over multiple pages (and nodes), and can be significantly smaller than a page. So let's add a byte-sized counter on the memcg level: MEMCG_PERCPU_B. Byte-sized vmstat infra created for slabs can be perfectly reused for percpu case. [guro@fb.com: v3] Link: http://lkml.kernel.org/r/20200623184515.4132564-4-guro@fb.com Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Dennis Zhou Acked-by: Johannes Weiner Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Mel Gorman Cc: Michal Hocko Cc: Pekka Enberg Cc: Tejun Heo Cc: Tobin C. Harding Cc: Vlastimil Babka Cc: Waiman Long Cc: Bixuan Cui Cc: Michal Koutný Cc: Stephen Rothwell Link: http://lkml.kernel.org/r/20200608230819.832349-4-guro@fb.com Signed-off-by: Linus Torvalds commit 3c7be18ac9a06bc67196bfdabb7c21e1bbacdc13 Author: Roman Gushchin Date: Tue Aug 11 18:30:17 2020 -0700 mm: memcg/percpu: account percpu memory to memory cgroups Percpu memory is becoming more and more widely used by various subsystems, and the total amount of memory controlled by the percpu allocator can make a good part of the total memory. As an example, bpf maps can consume a lot of percpu memory, and they are created by a user. Also, some cgroup internals (e.g. memory controller statistics) can be quite large. On a machine with many CPUs and big number of cgroups they can consume hundreds of megabytes. So the lack of memcg accounting is creating a breach in the memory isolation. Similar to the slab memory, percpu memory should be accounted by default. To implement the perpcu accounting it's possible to take the slab memory accounting as a model to follow. Let's introduce two types of percpu chunks: root and memcg. What makes memcg chunks different is an additional space allocated to store memcg membership information. If __GFP_ACCOUNT is passed on allocation, a memcg chunk should be be used. If it's possible to charge the corresponding size to the target memory cgroup, allocation is performed, and the memcg ownership data is recorded. System-wide allocations are performed using root chunks, so there is no additional memory overhead. To implement a fast reparenting of percpu memory on memcg removal, we don't store mem_cgroup pointers directly: instead we use obj_cgroup API, introduced for slab accounting. [akpm@linux-foundation.org: fix CONFIG_MEMCG_KMEM=n build errors and warning] [akpm@linux-foundation.org: move unreachable code, per Roman] [cuibixuan@huawei.com: mm/percpu: fix 'defined but not used' warning] Link: http://lkml.kernel.org/r/6d41b939-a741-b521-a7a2-e7296ec16219@huawei.com Signed-off-by: Roman Gushchin Signed-off-by: Bixuan Cui Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Dennis Zhou Cc: Christoph Lameter Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Mel Gorman Cc: Michal Hocko Cc: Pekka Enberg Cc: Tejun Heo Cc: Tobin C. Harding Cc: Vlastimil Babka Cc: Waiman Long Cc: Bixuan Cui Cc: Michal Koutný Cc: Stephen Rothwell Link: http://lkml.kernel.org/r/20200623184515.4132564-3-guro@fb.com Signed-off-by: Linus Torvalds commit 5b32af91b5de6f95ad99e4eaaf57777376af124f Author: Roman Gushchin Date: Tue Aug 11 18:30:14 2020 -0700 percpu: return number of released bytes from pcpu_free_area() Patch series "mm: memcg accounting of percpu memory", v3. This patchset adds percpu memory accounting to memory cgroups. It's based on the rework of the slab controller and reuses concepts and features introduced for the per-object slab accounting. Percpu memory is becoming more and more widely used by various subsystems, and the total amount of memory controlled by the percpu allocator can make a good part of the total memory. As an example, bpf maps can consume a lot of percpu memory, and they are created by a user. Also, some cgroup internals (e.g. memory controller statistics) can be quite large. On a machine with many CPUs and big number of cgroups they can consume hundreds of megabytes. So the lack of memcg accounting is creating a breach in the memory isolation. Similar to the slab memory, percpu memory should be accounted by default. Percpu allocations by their nature are scattered over multiple pages, so they can't be tracked on the per-page basis. So the per-object tracking introduced by the new slab controller is reused. The patchset implements charging of percpu allocations, adds memcg-level statistics, enables accounting for percpu allocations made by memory cgroup internals and provides some basic tests. To implement the accounting of percpu memory without a significant memory and performance overhead the following approach is used: all accounted allocations are placed into a separate percpu chunk (or chunks). These chunks are similar to default chunks, except that they do have an attached vector of pointers to obj_cgroup objects, which is big enough to save a pointer for each allocated object. On the allocation, if the allocation has to be accounted (__GFP_ACCOUNT is passed, the allocating process belongs to a non-root memory cgroup, etc), the memory cgroup is getting charged and if the maximum limit is not exceeded the allocation is performed using a memcg-aware chunk. Otherwise -ENOMEM is returned or the allocation is forced over the limit, depending on gfp (as any other kernel memory allocation). The memory cgroup information is saved in the obj_cgroup vector at the corresponding offset. On the release time the memcg information is restored from the vector and the cgroup is getting uncharged. Unaccounted allocations (at this point the absolute majority of all percpu allocations) are performed in the old way, so no additional overhead is expected. To avoid pinning dying memory cgroups by outstanding allocations, obj_cgroup API is used instead of directly saving memory cgroup pointers. obj_cgroup is basically a pointer to a memory cgroup with a standalone reference counter. The trick is that it can be atomically swapped to point at the parent cgroup, so that the original memory cgroup can be released prior to all objects, which has been charged to it. Because all charges and statistics are fully recursive, it's perfectly correct to uncharge the parent cgroup instead. This scheme is used in the slab memory accounting, and percpu memory can just follow the scheme. This patch (of 5): To implement accounting of percpu memory we need the information about the size of freed object. Return it from pcpu_free_area(). Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Dennis Zhou Cc: Tejun Heo Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: David Rientjes Cc: Joonsoo Kim Cc: Mel Gorman Cc: Pekka Enberg Cc: Tobin C. Harding Cc: Vlastimil Babka Cc: Waiman Long cC: Michal Koutnýutny@suse.com> Cc: Bixuan Cui Cc: Michal Koutný Cc: Stephen Rothwell Link: http://lkml.kernel.org/r/20200623184515.4132564-1-guro@fb.com Link: http://lkml.kernel.org/r/20200608230819.832349-1-guro@fb.com Link: http://lkml.kernel.org/r/20200608230819.832349-2-guro@fb.com Signed-off-by: Linus Torvalds commit 24fb33d40d60bd7d196400e7d5b26ff566fd98b7 Author: Al Viro Date: Wed Aug 12 05:15:18 2020 +0100 fix breakage in do_rmdir() syzbot reported and bisected a use-after-free due to the recent init cleanups. The putname() should happen only after we'd *not* branched to retry, same as it's done in do_unlinkat(). Reported-by: syzbot+bbeb1c88016c7db4aa24@syzkaller.appspotmail.com Fixes: e24ab0ef689d "fs: push the getname from do_rmdir into the callers" Cc: Christoph Hellwig Signed-off-by: Al Viro Signed-off-by: Linus Torvalds commit d96f27c80b65437a7b572647ecb4717ec9a50c98 Author: Kai-Heng Feng Date: Tue Aug 11 17:53:34 2020 +0800 ALSA: hda/hdmi: Use force connectivity quirk on another HP desktop There's another HP desktop has buggy BIOS which flags the Port Connectivity bit as no connection. Apply force connectivity quirk to enable DP/HDMI audio. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200811095336.32396-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 563c53e73b8b6ec842828736f77e633f7b0911e9 Author: Trond Myklebust Date: Tue Aug 11 13:36:32 2020 -0400 NFS: Fix flexfiles read failover The current mirrored read failover code is correctly resetting the mirror index between failed reads, however it is not able to actually flip the RPC call over to the next RPC client. The end result is that we keep resending the RPC call to the same client over and over. The fix is to use the pnfs_read_resend_pnfs() mechanism to schedule a new RPC call, but we need to add the ability to pass in a mirror index so that we always retry the next mirror in the list. Fixes: 166bd5b889ac ("pNFS/flexfiles: Fix layoutstats handling during read failovers") Signed-off-by: Trond Myklebust commit a36da65c46565d2527eec3efdb546251e38253fd Author: Jens Axboe Date: Tue Aug 11 09:50:19 2020 -0600 io_uring: fail poll arm on queue proc failure Check the ipt.error value, it must have been either cleared to zero or set to another error than the default -EINVAL if we don't go through the waitqueue proc addition. Just give up on poll at that point and return failure, this will fallback to async work. io_poll_add() doesn't suffer from this failure case, as it returns the error value directly. Cc: stable@vger.kernel.org # v5.7+ Reported-by: syzbot+a730016dc0bdce4f6ff5@syzkaller.appspotmail.com Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe commit a5032910c5e542dddedeaa6500e5eab3f1175384 Author: Randy Dunlap Date: Mon Aug 10 19:18:35 2020 -0700 fs: nfs: delete repeated words in comments Drop duplicated words {the, and} in comments. Signed-off-by: Randy Dunlap Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Signed-off-by: Trond Myklebust commit 8fe5db97c9d1166838538a4437a14665e8f79300 Author: Xu Wang Date: Mon Aug 10 02:46:01 2020 +0000 rpc_pipefs: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Xu Wang Signed-off-by: Trond Myklebust commit b4487b93545214a9db8cbf32e86411677b0cca21 Author: Jeffrey Mitchell Date: Wed Aug 5 12:23:19 2020 -0500 nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell [Trond: clean up duplicate test of label->len != 0] Signed-off-by: Trond Myklebust commit d474f96104bd4377573526ebae2ee212205a6839 Author: Trond Myklebust Date: Wed Aug 5 09:03:56 2020 -0400 NFS: Don't return layout segments that are in use If the NFS_LAYOUT_RETURN_REQUESTED flag is set, we want to return the layout as soon as possible, meaning that the affected layout segments should be marked as invalid, and should no longer be in use for I/O. Fixes: f0b429819b5f ("pNFS: Ignore non-recalled layouts in pnfs_layout_need_return()") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Trond Myklebust commit ff041727e9e029845857cac41aae118ead5e261b Author: Trond Myklebust Date: Tue Aug 4 16:30:30 2020 -0400 NFS: Don't move layouts to plh_return_segs list while in use If the layout segment is still in use for a read or a write, we should not move it to the layout plh_return_segs list. If we do, we can end up returning the layout while I/O is still in progress. Fixes: e0b7d420f72a ("pNFS: Don't discard layout segments that are marked for return") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Trond Myklebust commit 54898f70a8549492f2268f7cdd855fa1d8c5e0ca Author: Trond Myklebust Date: Tue Aug 4 22:16:06 2020 -0400 NFS: Add layout segment info to pnfs read/write/commit tracepoints Allow the pnfs I/O tracepoints to trace which layout segment is being used. Signed-off-by: Trond Myklebust commit e96ebd589debd9a6a793608c4ec7019c38785dea Author: John David Anglin Date: Thu Jul 30 08:59:12 2020 -0400 parisc: Implement __smp_store_release and __smp_load_acquire barriers This patch implements the __smp_store_release and __smp_load_acquire barriers using ordered stores and loads. This avoids the sync instruction present in the generic implementation. Cc: # 4.14+ Signed-off-by: Dave Anglin Signed-off-by: Helge Deller commit f9f95068266d875d1840ad90abf51773a765f41a Author: Colin Ian King Date: Wed Aug 12 07:46:47 2020 +0100 perf bench: Fix a couple of spelling mistakes in options text There are a couple of spelling mistakes in the text. Fix these. Signed-off-by: Colin King Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kernel-janitors@vger.kernel.org Link: http://lore.kernel.org/lkml/20200812064647.200132-1-colin.king@canonical.com Signed-off-by: Arnaldo Carvalho de Melo commit 85372c6974aad0e40b97513434694abe84c1017e Author: Alexander Gordeev Date: Mon Aug 10 08:22:00 2020 +0200 perf bench numa: Fix benchmark names Standard benchmark names let users know the tests specifics. For example "2x1-bw-process" name tells that two processes one thread each are run and the RAM bandwidth is measured. Several benchmarks names do not correspond to their actual running configuration. Fix that and also some whitespace and comment inconsistencies. Signed-off-by: Alexander Gordeev Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/6b6f2084f132ee8e9203dc7c32f9deb209b87a68.1597004831.git.agordeev@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 72d69c2a4ee1fe2a66c3296ad42e60d563ba9a36 Author: Alexander Gordeev Date: Mon Aug 10 08:21:59 2020 +0200 perf bench numa: Fix number of processes in "2x3-convergence" test Signed-off-by: Alexander Gordeev Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/d949f5f48e17fc816f3beecf8479f1b2480345e4.1597004831.git.agordeev@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 6016e0348792bb65719abaf4424e1e44ed09aeb2 Author: Arnaldo Carvalho de Melo Date: Wed Aug 12 09:02:40 2020 -0300 tools headers UAPI: Sync kvm.h headers with the kernel sources To pick the changes in: 3edd68399dc1 ("KVM: x86: Add a capability for GUEST_MAXPHYADDR < HOST_MAXPHYADDR support") 1aa561b1a4c0 ("kvm: x86: Add "last CPU" to some KVM_EXIT information") 23a60f834406 ("s390/kvm: diagnose 0x318 sync and reset") That do not result in any change in tooling, as the additions are not being used in any table generator. This silences these perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/kvm.h' differs from latest version at 'include/uapi/linux/kvm.h' diff -u tools/include/uapi/linux/kvm.h include/uapi/linux/kvm.h Cc: Adrian Hunter Cc: Christian Borntraeger Cc: Collin Walling Cc: Jim Mattson Cc: Jiri Olsa Cc: Mohammed Gamal Cc: Namhyung Kim Cc: Paolo Bonzini Signed-off-by: Arnaldo Carvalho de Melo commit fe452fb84329b655324d55220a8da886fc9ba6e7 Author: Arnaldo Carvalho de Melo Date: Wed Aug 12 08:57:07 2020 -0300 tools include UAPI: Sync linux/vhost.h with the kernel sources To get the changes in: 25abc060d282 ("vhost-vdpa: support IOTLB batching hints") This doesn't result in any changes in tooling, no new ioctls to be picked up by the id->string table generators, etc. Silencing this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h' diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h Cc: Adrian Hunter Cc: Jason Wang Cc: Jiri Olsa Cc: Michael S. Tsirkin Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 23db762be2eca6d3a0ee673a2bad2ce5411900f3 Author: Arnaldo Carvalho de Melo Date: Wed Aug 12 08:52:32 2020 -0300 tools headers kvm s390: Sync headers with the kernel sources To pick the changes in: 23a60f834406 ("s390/kvm: diagnose 0x318 sync and reset") None of them trigger any changes in tooling, this time this is just to silence these perf build warnings: Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/kvm.h' differs from latest version at 'arch/s390/include/uapi/asm/kvm.h' diff -u tools/arch/s390/include/uapi/asm/kvm.h arch/s390/include/uapi/asm/kvm.h Cc: Adrian Hunter Cc: Christian Borntraeger Cc: Collin Walling Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit f3cf7fa963c46391da54a0e50f54c089c9b4c450 Author: Arnaldo Carvalho de Melo Date: Wed Aug 12 08:43:51 2020 -0300 perf trace beauty: Use the autogenerated protocol family table That helps us not to lose new protocol families when they are introduced, replacing that hardcoded, dated family->string table. To recap what this allows us to do: # perf trace -e syscalls:sys_enter_socket/max-stack=10/ --filter=family==INET --max-events=1 0.000 fetchmail/41097 syscalls:sys_enter_socket(family: INET, type: DGRAM|CLOEXEC|NONBLOCK, protocol: IP) __GI___socket (inlined) reopen (/usr/lib64/libresolv-2.31.so) send_dg (/usr/lib64/libresolv-2.31.so) __res_context_send (/usr/lib64/libresolv-2.31.so) __GI___res_context_query (inlined) __GI___res_context_search (inlined) _nss_dns_gethostbyname4_r (/usr/lib64/libnss_dns-2.31.so) gaih_inet.constprop.0 (/usr/lib64/libc-2.31.so) __GI_getaddrinfo (inlined) [0x15cb2] (/usr/bin/fetchmail) # More work is still needed to allow for the more natura strace-like syscall name usage instead of the trace event name: # perf trace -e socket/max-stack=10,family==INET/ --max-events=1 I.e. to allow for modifiers to follow the syscall name and for logical expressions to be accepted as filters to use with that syscall, be it as trace event filters or BPF based ones. Using -v we can see how the trace event filter is built: # perf trace -v -e syscalls:sys_enter_socket/call-graph=dwarf/ --filter=family==INET --max-events=2 New filter for syscalls:sys_enter_socket: (family==0x2) && (common_pid != 41384 && common_pid != 2836) $ tools/perf/trace/beauty/socket.sh | grep -w 2 [2] = "INET", $ Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Signed-off-by: Arnaldo Carvalho de Melo commit 58277f502f429baee11725ca2d8cb3c43c7a6429 Author: Arnaldo Carvalho de Melo Date: Wed Aug 12 08:30:06 2020 -0300 perf trace beauty: Add script to autogenerate socket families table To use with 'perf trace', to convert the protocol families to strings, e.g: $ tools/perf/trace/beauty/socket.sh static const char *socket_families[] = { [0] = "UNSPEC", [1] = "LOCAL", [2] = "INET", [3] = "AX25", [4] = "IPX", [5] = "APPLETALK", [6] = "NETROM", [7] = "BRIDGE", [8] = "ATMPVC", [9] = "X25", [10] = "INET6", [11] = "ROSE", [12] = "DECnet", [13] = "NETBEUI", [14] = "SECURITY", [15] = "KEY", [16] = "NETLINK", [17] = "PACKET", [18] = "ASH", [19] = "ECONET", [20] = "ATMSVC", [21] = "RDS", [22] = "SNA", [23] = "IRDA", [24] = "PPPOX", [25] = "WANPIPE", [26] = "LLC", [27] = "IB", [28] = "MPLS", [29] = "CAN", [30] = "TIPC", [31] = "BLUETOOTH", [32] = "IUCV", [33] = "RXRPC", [34] = "ISDN", [35] = "PHONET", [36] = "IEEE802154", [37] = "CAIF", [38] = "ALG", [39] = "NFC", [40] = "VSOCK", [41] = "KCM", [42] = "QIPCRTR", [43] = "SMC", [44] = "XDP", }; $ This uses a copy of include/linux/socket.h that is kept in a directory to be used just for these table generation scripts and for checking if the kernel has a new file that maybe gets something new for these tables. This allows us to: - Avoid accessing files outside tools/, in the kernel sources, that may be changed in unexpected ways and thus break these scripts. - Notice when those files change and thus check if the changes don't break those scripts, update them to automatically get the new definitions, a new socket family, for instance. - Not add then to the tools/include/ where it may end up used while building the tools and end up requiring dragging yet more stuff from the kernel or plain break the build in some of the myriad environments where perf may be built. This will replace the previous static array in tools/perf/ that was dated and was already missing the AF_KCM, AF_QIPCRTR, AF_SMC and AF_XDP families. The next cset will wire this up to the perf build process. At some point this must be made into a library to be used in places such as libtraceevent, bpftrace, etc. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Signed-off-by: Arnaldo Carvalho de Melo commit 27006416be16b7887fb94b3b445f32453defb3f1 Author: Alexandre Belloni Date: Wed Aug 12 10:51:14 2020 +0200 rtc: pcf2127: fix alarm handling Fix multiple issues when handling alarms: - Use threaded interrupt to avoid scheduling when atomic - Stop matching on week day as it may not be set correctly - Avoid parsing the DT interrupt and use what is provided by the i2c or spi subsystem - Avoid returning IRQ_NONE in case of error in the interrupt handler - Never write WDTF as specified in the datasheet - Set uie_unsupported, as for the pcf85063, setting alarms every seconds is not working correctly and confuses the RTC. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200812085114.474903-1-alexandre.belloni@bootlin.com commit 8a914bac44be33623cfcf27688b18b6f81a5c7d5 Author: Liam Beguin Date: Mon Jun 29 22:42:11 2020 -0400 rtc: pcf2127: add alarm support Add alarm support for the pcf2127 RTC chip family. Tested on pca2129. Signed-off-by: Liam Beguin Signed-off-by: Alexandre Belloni Reviewed-by: Bruno Thomsen Link: https://lore.kernel.org/r/20200630024211.12782-3-liambeguin@gmail.com commit 985b30dbe2cf58c27dd81da85410439ced8ce6d7 Author: Liam Beguin Date: Mon Jun 29 22:42:10 2020 -0400 rtc: pcf2127: add pca2129 device id The PCA2129 is the automotive grade version of the PCF2129. add it to the list of compatibles. Signed-off-by: Liam Beguin Signed-off-by: Alexandre Belloni Reviewed-by: Bruno Thomsen Link: https://lore.kernel.org/r/20200630024211.12782-2-liambeguin@gmail.com commit e27b1636e9337d1a1d174b191e53d0f86421a822 Author: Guenter Roeck Date: Tue Aug 11 11:00:01 2020 -0700 genirq/PM: Always unlock IRQ descriptor in rearm_wake_irq() rearm_wake_irq() does not unlock the irq descriptor if the interrupt is not suspended or if wakeup is not enabled on it. Restucture the exit conditions so the unlock is always ensured. Fixes: 3a79bc63d9075 ("PCI: irq: Introduce rearm_wake_irq()") Signed-off-by: Guenter Roeck Signed-off-by: Thomas Gleixner Acked-by: Rafael J. Wysocki Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200811180001.80203-1-linux@roeck-us.net commit c57dd1f2f6a7cd1bb61802344f59ccdc5278c983 Author: Qu Wenruo Date: Fri Jul 31 19:29:11 2020 +0800 btrfs: trim: fix underflow in trim length to prevent access beyond device boundary [BUG] The following script can lead to tons of beyond device boundary access: mkfs.btrfs -f $dev -b 10G mount $dev $mnt trimfs $mnt btrfs filesystem resize 1:-1G $mnt trimfs $mnt [CAUSE] Since commit 929be17a9b49 ("btrfs: Switch btrfs_trim_free_extents to find_first_clear_extent_bit"), we try to avoid trimming ranges that's already trimmed. So we check device->alloc_state by finding the first range which doesn't have CHUNK_TRIMMED and CHUNK_ALLOCATED not set. But if we shrunk the device, that bits are not cleared, thus we could easily got a range starts beyond the shrunk device size. This results the returned @start and @end are all beyond device size, then we call "end = min(end, device->total_bytes -1);" making @end smaller than device size. Then finally we goes "len = end - start + 1", totally underflow the result, and lead to the beyond-device-boundary access. [FIX] This patch will fix the problem in two ways: - Clear CHUNK_TRIMMED | CHUNK_ALLOCATED bits when shrinking device This is the root fix - Add extra safety check when trimming free device extents We check and warn if the returned range is already beyond current device. Link: https://github.com/kdave/btrfs-progs/issues/282 Fixes: 929be17a9b49 ("btrfs: Switch btrfs_trim_free_extents to find_first_clear_extent_bit") CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Qu Wenruo Reviewed-by: Filipe Manana Signed-off-by: David Sterba commit e5b1d9776ad3817a8c90336038bf7a219425b57f Author: Takashi Iwai Date: Wed Aug 12 09:02:56 2020 +0200 ALSA: hda/realtek - Fix unused variable warning The previous fix forgot to remove the unused variable that triggers a compile warning now: sound/pci/hda/patch_realtek.c: In function 'alc285_fixup_hp_gpio_led': sound/pci/hda/patch_realtek.c:4163:19: warning: unused variable 'spec' [-Wunused-variable] Fix it. Fixes: 404690649e6a ("ALSA: hda - reverse the setting value in the micmute_led_set") Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20200812070256.32145-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 62975d27d647a40c58d3b96c29b911fc4f33c310 Author: Christian König Date: Wed Aug 12 13:03:49 2020 +1000 drm/ttm: revert "drm/ttm: make TT creation purely optional v3" This reverts commit 2ddef17678bc2ea1d20517dd2b4ed4aa967ffa8b. As it turned out VMWGFX needs a much wider audit to fix this. Signed-off-by: Christian König Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200811092400.188124-1-christian.koenig@amd.com commit 312d100c01e174a5528ecf9e454472f84da37533 Merge: 16e6eea29d7bc e97644ebcdc83 Author: Dave Airlie Date: Wed Aug 12 12:58:19 2020 +1000 Merge branch 'vmwgfx-next-5.9' of git://people.freedesktop.org/~sroland/linux into drm-next The drm_mode_config_reset patches are very important fixing a recently introduced kernel crash, the others fix various older issues which are a bit less serious in practice. Signed-off-by: Dave Airlie From: "Roland Scheidegger (VMware)" Link: https://patchwork.freedesktop.org/patch/msgid/20200812005941.19465-1-rscheidegger.oss@gmail.com commit 5b24993c21cbf2de11aff077a48c5cb0505a0450 Author: Sven Schnelle Date: Tue Aug 11 18:19:19 2020 +0200 parisc: mask out enable and reserved bits from sba imask When using kexec the SBA IOMMU IBASE might still have the RE bit set. This triggers a WARN_ON when trying to write back the IBASE register later, and it also makes some mask calculations fail. Cc: Signed-off-by: Sven Schnelle Signed-off-by: Helge Deller commit fb893de323e2d39f7a1f6df425703a2edbdf56ea Merge: d668e848293fb fc8cacf3fc686 Author: Linus Torvalds Date: Tue Aug 11 17:28:32 2020 -0700 Merge tag 'tag-chrome-platform-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Benson Leung: "cros_ec_typec: - Add support for switch control and alternate modes to the Chrome EC Type C port driver - Add basic suspend/resume support sensorhub: - Fix timestamp overflow issue - Fix legacy timestamp spreading on Nami systems cros_ec_proto: - After removing all users of, stop exporting cros_ec_cmd_xfer - Check for missing EC_CMD_HOST_EVENT_GET_WAKE_MASK and ignore wakeups on old ECs misc: - Documentation warning cleanup - Fix double unlock issue in ishtp" * tag 'tag-chrome-platform-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (21 commits) platform/chrome: cros_ec_proto: check for missing EC_CMD_HOST_EVENT_GET_WAKE_MASK platform/chrome: cros_ec_proto: ignore unnecessary wakeups on old ECs platform/chrome: cros_ec_sensorhub: Simplify legacy timestamp spreading platform/chrome: cros_ec_proto: Do not export cros_ec_cmd_xfer() platform/chrome: cros_ec_typec: Unregister partner on error platform/chrome: cros_ec_sensorhub: Fix EC timestamp overflow platform/chrome: cros_ec_typec: Add PM support platform/chrome: cros_ec_typec: Use workqueue for port update platform/chrome: cros_ec_typec: Add a dependency on USB_ROLE_SWITCH platform/chrome: cros_ec_ishtp: Fix a double-unlock issue platform/chrome: cros_ec_rpmsg: Document missing struct parameters platform/chrome: cros_ec_spi: Document missing function parameters platform/chrome: cros_ec_typec: Add TBT compat support platform/chrome: cros_ec: Add TBT pd_ctrl fields platform/chrome: cros_ec_typec: Make configure_mux static platform/chrome: cros_ec_typec: Support DP alt mode platform/chrome: cros_ec_typec: Add USB mux control platform/chrome: cros_ec_typec: Register PD CTRL cmd v2 platform/chrome: cros_ec: Update mux state bits platform/chrome: cros_ec_typec: Register Type C switches ... commit d668e848293fb57826771a0375a97a6cd1970a63 Merge: 57d528bfe7d72 e848643b524be Author: Linus Torvalds Date: Tue Aug 11 17:08:11 2020 -0700 Merge tag 'for-linus-5.9-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "A fix and a cleanup... The fix: Al Viro pointed out that I had broken some acl functionality with one of my previous patches. And the cleanup: Jing Xiangfeng found and removed a needless variable assignment" * tag 'for-linus-5.9-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: remove unnecessary assignment to variable ret orangefs: posix acl fix... commit 57d528bfe7d7279d7e91a9bd9803837835c09b5c Merge: bb5baaa9238ec 4c96870e58f8b Author: Linus Torvalds Date: Tue Aug 11 17:05:55 2020 -0700 Merge tag 'zonefs-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs Pull zonefs update from Damien Le Moal: "A single change for this cycle adding support for zone capacities smaller than the zone size, from Johannes" * tag 'zonefs-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/zonefs: zonefs: update documentation to reflect zone size vs capacity zonefs: add zone-capacity support commit 7018ec68f08249de17cb131b324d5a48e89ed898 Author: Tetsuhiro Kohada Date: Fri Jul 31 14:58:26 2020 +0900 exfat: retain 'VolumeFlags' properly MediaFailure and VolumeDirty should be retained if these are set before mounting. In '3.1.13.3 Media Failure Field' of exfat specification describe: If, upon mounting a volume, the value of this field is 1, implementations which scan the entire volume for media failures and record all failures as "bad" clusters in the FAT (or otherwise resolve media failures) may clear the value of this field to 0. Therefore, We should not clear MediaFailure without scanning volume. In '8.1 Recommended Write Ordering' of exfat specification describe: Clear the value of the VolumeDirty field to 0, if its value prior to the first step was 0. Therefore, We should not clear VolumeDirty after mounting. Also rename ERR_MEDIUM to MEDIA_FAILURE. Signed-off-by: Tetsuhiro Kohada Signed-off-by: Namjae Jeon commit 4dc7d35e09ba78aa0a3bcaa9fad1c19952e018a7 Author: Tetsuhiro Kohada Date: Wed Jun 24 11:30:40 2020 +0900 exfat: optimize exfat_zeroed_cluster() Replace part of exfat_zeroed_cluster() with exfat_update_bhs(). And remove exfat_sync_bhs(). Signed-off-by: Tetsuhiro Kohada Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 8b0c471773819c8201dc0b0123e1580639ee1570 Author: Tetsuhiro Kohada Date: Wed Jun 24 09:54:54 2020 +0900 exfat: add error check when updating dir-entries Add error check when synchronously updating dir-entries. Suggested-by: Sungjong Seo Signed-off-by: Tetsuhiro Kohada Signed-off-by: Namjae Jeon commit 3db3c3fb840ed4a6c7666d1464959edd40fe54f1 Author: Tetsuhiro Kohada Date: Tue Jun 23 15:22:19 2020 +0900 exfat: write multiple sectors at once Write multiple sectors at once when updating dir-entries. Add exfat_update_bhs() for that. It wait for write completion once instead of sector by sector. It's only effective if sync enabled. Signed-off-by: Tetsuhiro Kohada Signed-off-by: Namjae Jeon commit 2c7f8937ef91520a8a4bd700d5817b5e9c99803c Author: Tetsuhiro Kohada Date: Tue Jun 16 11:18:07 2020 +0900 exfat: remove EXFAT_SB_DIRTY flag This flag is set/reset in exfat_put_super()/exfat_sync_fs() to avoid sync_blockdev(). - exfat_put_super(): Before calling this, the VFS has already called sync_filesystem(), so sync is never performed here. - exfat_sync_fs(): After calling this, the VFS calls sync_blockdev(), so, it is meaningless to check EXFAT_SB_DIRTY or to bypass sync_blockdev() here. Remove the EXFAT_SB_DIRTY check to ensure synchronization. And remove the code related to the flag. Signed-off-by: Tetsuhiro Kohada Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 633f5b6bca9b93f5c346a4b3cc60ed02ddd72062 Merge: 1b8ef1423dbfd d76f3351cea2d Author: David S. Miller Date: Tue Aug 11 15:49:21 2020 -0700 Merge branch 'net-initialize-fastreuse-on-inet_inherit_port' Tim Froidcoeur says: ==================== net: initialize fastreuse on inet_inherit_port In the case of TPROXY, bind_conflict optimizations for SO_REUSEADDR or SO_REUSEPORT are broken, possibly resulting in O(n) instead of O(1) bind behaviour or in the incorrect reuse of a bind. the kernel keeps track for each bind_bucket if all sockets in the bind_bucket support SO_REUSEADDR or SO_REUSEPORT in two fastreuse flags. These flags allow skipping the costly bind_conflict check when possible (meaning when all sockets have the proper SO_REUSE option). For every socket added to a bind_bucket, these flags need to be updated. As soon as a socket that does not support reuse is added, the flag is set to false and will never go back to true, unless the bind_bucket is deleted. Note that there is no mechanism to re-evaluate these flags when a socket is removed (this might make sense when removing a socket that would not allow reuse; this leaves room for a future patch). For this optimization to work, it is mandatory that these flags are properly initialized and updated. When a child socket is created from a listen socket in __inet_inherit_port, the TPROXY case could create a new bind bucket without properly initializing these flags, thus preventing the optimization to work. Alternatively, a socket not allowing reuse could be added to an existing bind bucket without updating the flags, causing bind_conflict to never be called as it should. Patch 1/2 refactors the fastreuse update code in inet_csk_get_port into a small helper function, making the actual fix tiny and easier to understand. Patch 2/2 calls this new helper when __inet_inherit_port decides to create a new bind_bucket or use a different bind_bucket than the one of the listen socket. v4: - rebase on latest linux/net master branch v3: - remove company disclaimer from automatic signature v2: - remove unnecessary cast ==================== Signed-off-by: David S. Miller commit d76f3351cea2d927fdf70dd7c06898235035e84e Author: Tim Froidcoeur Date: Tue Aug 11 20:33:24 2020 +0200 net: initialize fastreuse on inet_inherit_port In the case of TPROXY, bind_conflict optimizations for SO_REUSEADDR or SO_REUSEPORT are broken, possibly resulting in O(n) instead of O(1) bind behaviour or in the incorrect reuse of a bind. the kernel keeps track for each bind_bucket if all sockets in the bind_bucket support SO_REUSEADDR or SO_REUSEPORT in two fastreuse flags. These flags allow skipping the costly bind_conflict check when possible (meaning when all sockets have the proper SO_REUSE option). For every socket added to a bind_bucket, these flags need to be updated. As soon as a socket that does not support reuse is added, the flag is set to false and will never go back to true, unless the bind_bucket is deleted. Note that there is no mechanism to re-evaluate these flags when a socket is removed (this might make sense when removing a socket that would not allow reuse; this leaves room for a future patch). For this optimization to work, it is mandatory that these flags are properly initialized and updated. When a child socket is created from a listen socket in __inet_inherit_port, the TPROXY case could create a new bind bucket without properly initializing these flags, thus preventing the optimization to work. Alternatively, a socket not allowing reuse could be added to an existing bind bucket without updating the flags, causing bind_conflict to never be called as it should. Call inet_csk_update_fastreuse when __inet_inherit_port decides to create a new bind_bucket or use a different bind_bucket than the one of the listen socket. Fixes: 093d282321da ("tproxy: fix hash locking issue when using port redirection in __inet_inherit_port()") Acked-by: Matthieu Baerts Signed-off-by: Tim Froidcoeur Signed-off-by: David S. Miller commit 62ffc589abb176821662efc4525ee4ac0b9c3894 Author: Tim Froidcoeur Date: Tue Aug 11 20:33:23 2020 +0200 net: refactor bind_bucket fastreuse into helper Refactor the fastreuse update code in inet_csk_get_port into a small helper function that can be called from other places. Acked-by: Matthieu Baerts Signed-off-by: Tim Froidcoeur Signed-off-by: David S. Miller commit 1b8ef1423dbfd34de2439a2db457b84480b7c8a8 Author: Marek Behún Date: Mon Aug 10 17:01:58 2020 +0200 net: phy: marvell10g: fix null pointer dereference Commit c3e302edca24 ("net: phy: marvell10g: fix temperature sensor on 2110") added a check for PHY ID via phydev->drv->phy_id in a function which is called by devres at a time when phydev->drv is already set to null by phy_remove function. This null pointer dereference can be triggered via SFP subsystem with a SFP module containing this Marvell PHY. When the SFP interface is put down, the SFP subsystem removes the PHY. Fixes: c3e302edca24 ("net: phy: marvell10g: fix temperature sensor on 2110") Signed-off-by: Marek Behún Cc: Maxime Chevallier Cc: Andrew Lunn Cc: Baruch Siach Cc: Russell King Signed-off-by: David S. Miller commit 0f5907af39137f8183ed536aaa00f322d7365130 Author: Miaohe Lin Date: Mon Aug 10 08:16:58 2020 -0400 net: Fix potential memory leak in proto_register() If we failed to assign proto idx, we free the twsk_slab_name but forget to free the twsk_slab. Add a helper function tw_prot_cleanup() to free these together and also use this helper function in proto_unregister(). Fixes: b45ce32135d1 ("sock: fix potential memory leak in proto_register()") Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit bb5baaa9238ecf8f13b112232c7bbe0d3d598ee8 Merge: 57b0779392878 3df14264ad993 Author: Linus Torvalds Date: Tue Aug 11 14:43:12 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Catalin Marinas: "Fix recordmcount build failure on non-arm64 (caused by an arm64 patch)" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: recordmcount: Fix build failure on non arm64 commit 57b077939287835b9396a1c3b40d35609cf2fcb8 Merge: ce13266d97b19 8a7c3213db068 Author: Linus Torvalds Date: Tue Aug 11 14:34:17 2020 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: - IRQ bypass support for vdpa and IFC - MLX5 vdpa driver - Endianness fixes for virtio drivers - Misc other fixes * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (71 commits) vdpa/mlx5: fix up endian-ness for mtu vdpa: Fix pointer math bug in vdpasim_get_config() vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config() vdpa/mlx5: fix memory allocation failure checks vdpa/mlx5: Fix uninitialised variable in core/mr.c vdpa_sim: init iommu lock virtio_config: fix up warnings on parisc vdpa/mlx5: Add VDPA driver for supported mlx5 devices vdpa/mlx5: Add shared memory registration code vdpa/mlx5: Add support library for mlx5 VDPA implementation vdpa/mlx5: Add hardware descriptive header file vdpa: Modify get_vq_state() to return error code net/vdpa: Use struct for set/get vq state vdpa: remove hard coded virtq num vdpasim: support batch updating vhost-vdpa: support IOTLB batching hints vhost-vdpa: support get/set backend features vhost: generialize backend features setting/getting vhost-vdpa: refine ioctl pre-processing vDPA: dont change vq irq after DRIVER_OK ... commit ce13266d97b198934e86166491bfa4938e96508f Merge: 952ace797c17d bb22d80b47d5d Author: Linus Torvalds Date: Tue Aug 11 14:30:36 2020 -0700 Merge tag 'for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem updates from James Morris: "A couple of minor documentation updates only for this release" * tag 'for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: LSM: drop duplicated words in header file comments Replace HTTP links with HTTPS ones: security commit 952ace797c17d06e50ad2a738babd27159b8d7cc Merge: 96f970feeb470 e46b3c0d011ea Author: Linus Torvalds Date: Tue Aug 11 14:13:24 2020 -0700 Merge tag 'iommu-updates-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: - Remove of the dev->archdata.iommu (or similar) pointers from most architectures. Only Sparc is left, but this is private to Sparc as their drivers don't use the IOMMU-API. - ARM-SMMU updates from Will Deacon: - Support for SMMU-500 implementation in Marvell Armada-AP806 SoC - Support for SMMU-500 implementation in NVIDIA Tegra194 SoC - DT compatible string updates - Remove unused IOMMU_SYS_CACHE_ONLY flag - Move ARM-SMMU drivers into their own subdirectory - Intel VT-d updates from Lu Baolu: - Misc tweaks and fixes for vSVA - Report/response page request events - Cleanups - Move the Kconfig and Makefile bits for the AMD and Intel drivers into their respective subdirectory. - MT6779 IOMMU Support - Support for new chipsets in the Renesas IOMMU driver - Other misc cleanups and fixes (e.g. to improve compile test coverage) * tag 'iommu-updates-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (77 commits) iommu/amd: Move Kconfig and Makefile bits down into amd directory iommu/vt-d: Move Kconfig and Makefile bits down into intel directory iommu/arm-smmu: Move Arm SMMU drivers into their own subdirectory iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu iommu: Add gfp parameter to io_pgtable_ops->map() iommu: Mark __iommu_map_sg() as static iommu/vt-d: Rename intel-pasid.h to pasid.h iommu/vt-d: Add page response ops support iommu/vt-d: Report page request faults for guest SVA iommu/vt-d: Add a helper to get svm and sdev for pasid iommu/vt-d: Refactor device_to_iommu() helper iommu/vt-d: Disable multiple GPASID-dev bind iommu/vt-d: Warn on out-of-range invalidation address iommu/vt-d: Fix devTLB flush for vSVA iommu/vt-d: Handle non-page aligned address iommu/vt-d: Fix PASID devTLB invalidation iommu/vt-d: Remove global page support in devTLB flush iommu/vt-d: Enforce PASID devTLB field mask iommu: Make some functions static iommu/amd: Remove double zero check ... commit 96f970feeb47003a8eba967f188bba4e75875c7a Merge: c636eef2ee369 7eb99a39ef767 Author: Linus Torvalds Date: Tue Aug 11 13:48:02 2020 -0700 Merge tag 'backlight-next-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "Core Framework: - Trivial: Code refactoring - New API backlight_is_blank() - New API backlight_get_brightness() - Additional/reworked documentation - Remove 'extern' labels from prototypes - Drop backlight_put() - Staticify of_find_backlight() Driver Removal: - Removal of unused OT200 driver - Removal of unused Generic Backlight driver Fix-ups - Bunch of W=1 warning fixes - Convert to GPIO descriptors; sky81452 - Move platform data handling into driver; sky81452 - Remove superfluous code; lms501kf03 - Many instances of using new APIs" * tag 'backlight-next-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: (34 commits) video: backlight: cr_bllcd: Remove unused variable 'intensity' backlight: backlight: Make of_find_backlight static backlight: backlight: Drop backlight_put() backlight: Use backlight_get_brightness() throughout backlight: jornada720_bl: Introduce backlight_is_blank() backlight: gpio_backlight: Simplify update_status() backlight: cr_bllcd: Introduce gpio-backlight semantics backlight: as3711_bl: Simplify update_status backlight: backlight: Introduce backlight_get_brightness() doc-rst: Wire-up Backlight kernel-doc documentation backlight: backlight: Add overview and update existing doc backlight: backlight: Drop extern from prototypes backlight: generic_bl: Remove this driver as it is unused backlight: backlight: Document enums in backlight.h backlight: backlight: Document inline functions in backlight.h backlight: backlight: Improve backlight_device documentation backlight: backlight: Improve backlight_properties documentation backlight: backlight: Improve backlight_ops documentation backlight: backlight: Add backlight_is_blank() backlight: backlight: Refactor fb_notifier_callback() ... commit c1e2b8422bf946c80e832cee22b3399634f87a2c Author: Ming Lei Date: Mon Aug 10 11:59:50 2020 +0800 block: fix double account of flush request's driver tag In case of none scheduler, we share data request's driver tag for flush request, so have to mark the flush request as INFLIGHT for avoiding double account of this driver tag. Fixes: 568f27006577 ("blk-mq: centralise related handling into blk_mq_get_driver_tag") Reported-by: Matthew Wilcox Signed-off-by: Ming Lei Tested-by: Matthew Wilcox Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit c636eef2ee3696f261a35f34989842701a107895 Merge: 617e7481d7bfb 35efb0e1d5c60 Author: Linus Torvalds Date: Tue Aug 11 11:53:34 2020 -0700 Merge tag 'hwlock-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull hwspinlock updates from Bjorn Andersson: "This introduces a new DT binding format to describe the Qualcomm hardware mutex block and deprecates the old, invalid, one. It also cleans up the Kconfig slightly" * tag 'hwlock-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: dt-bindings: hwlock: qcom: Remove invalid binding hwspinlock: qcom: Allow mmio usage in addition to syscon dt-bindings: hwlock: qcom: Allow device on mmio bus dt-bindings: hwlock: qcom: Migrate binding to YAML hwspinlock: Simplify Kconfig commit 617e7481d7bfb807273d0f1b1983de032a725220 Merge: dded87afdacf8 62b8f9e99329c Author: Linus Torvalds Date: Tue Aug 11 11:17:45 2020 -0700 Merge tag 'rproc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This introduces a new "detached" state for remote processors that are deemed to be running at the time Linux boots and the infrastructure for "attaching" to these. It then introduces the support for performing this operation for the STM32 platform. The coredump functionality is moved out from the core file and gains support for an optional mode where the recovery phase awaits the notification from devcoredump that the dump should be released. This allows userspace to grab the coredump in scenarios where vmalloc space is too low for creating a complete copy of the coredump before handing this to devcoredump. A new character device based interface is introduced to allow tying the stoppage of a remote processor to the termination of a user space process. This is useful in situations when such process provides crucial resources/operations for the firmware running on the remote processor. The Texas Instrument K3 driver gains support for the C66x and C71x DSPs. Qualcomm remoteprocs gains support for stashing relocation information in IMEM, to aid post mortem debugging and the crash notification mechanism is generalized to be reusable in cases where loosely coupled drivers needs to know about the status of a remote processor. One such example is the IPA hardware block, which is jointly owned with the modem and migrated to this improved interface. It also introduces a number of bug fixes and debug improvements for the Qualcomm modem remoteproc driver. And it cleans up the inconsistent interface for remoteproc drivers to implement power management" * tag 'rproc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: (56 commits) remoteproc: core: Register the character device interface remoteproc: Add remoteproc character device interface remoteproc: kill IPA notify code net: ipa: new notification infrastructure remoteproc: k3-dsp: Add support for C71x DSPs dt-bindings: remoteproc: k3-dsp: Update bindings for C71x DSPs remoteproc: k3-dsp: Add support for L2RAM loading on C66x DSPs remoteproc: k3-dsp: Add a remoteproc driver of K3 C66x DSPs dt-bindings: remoteproc: Add bindings for C66x DSPs on TI K3 SoCs remoteproc: k3: Add TI-SCI processor control helper functions remoteproc: Introduce rproc_of_parse_firmware() helper dt-bindings: arm: keystone: Add common TI SCI bindings remoteproc: qcom_q6v5_mss: Remove redundant running state remoteproc: qcom: q6v5: Update running state before requesting stop remoteproc: qcom_q6v5_mss: Add modem debug policy support remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load rpmsg: update documentation remoteproc: qcom_q6v5_mss: Add MBA log extraction support remoteproc: Add coredump debugfs entry ... commit dded87afdacf8fe129fe13fe61d0a21e2afff3f6 Merge: 4bf5e3611895e 111d1089700cd Author: Linus Torvalds Date: Tue Aug 11 11:13:17 2020 -0700 Merge tag 'rpmsg-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull rpmsg update from Bjorn Andersson: "This ensures that rpmsg uses little-endian, per the VirtIO 1.0 specification" * tag 'rpmsg-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: rpmsg: virtio: add endianness conversions commit 4bf5e3611895ede257d736b7359db669879a109f Merge: 00e4db51259a5 7f674025d9f73 Author: Linus Torvalds Date: Tue Aug 11 10:59:19 2020 -0700 Merge tag 'libnvdimm-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updayes from Vishal Verma: "You'd normally receive this pull request from Dan Williams, but he's busy watching a newborn (Congrats Dan!), so I'm watching libnvdimm this cycle. This adds a new feature in libnvdimm - 'Runtime Firmware Activation', and a few small cleanups and fixes in libnvdimm and DAX. I'd originally intended to make separate topic-based pull requests - one for libnvdimm, and one for DAX, but some of the DAX material fell out since it wasn't quite ready. Summary: - add 'Runtime Firmware Activation' support for NVDIMMs that advertise the relevant capability - misc libnvdimm and DAX cleanups" * tag 'libnvdimm-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm/security: ensure sysfs poll thread woke up and fetch updated attr libnvdimm/security: the 'security' attr never show 'overwrite' state libnvdimm/security: fix a typo ACPI: NFIT: Fix ARS zero-sized allocation dax: Fix incorrect argument passed to xas_set_err() ACPI: NFIT: Add runtime firmware activate support PM, libnvdimm: Add runtime firmware activation support libnvdimm: Convert to DEVICE_ATTR_ADMIN_RO() drivers/dax: Expand lock scope to cover the use of addresses fs/dax: Remove unused size parameter dax: print error message by pr_info() in __generic_fsdax_supported() driver-core: Introduce DEVICE_ATTR_ADMIN_{RO,RW} tools/testing/nvdimm: Emulate firmware activation commands tools/testing/nvdimm: Prepare nfit_ctl_test() for ND_CMD_CALL emulation tools/testing/nvdimm: Add command debug messages tools/testing/nvdimm: Cleanup dimm index passing ACPI: NFIT: Define runtime firmware activation commands ACPI: NFIT: Move bus_dsm_mask out of generic nvdimm_bus_descriptor libnvdimm: Validate command family indices commit 50caa777a3a24d7027748e96265728ce748b41ef Author: Wang Hai Date: Mon Aug 10 10:57:05 2020 +0800 net: qcom/emac: add missed clk_disable_unprepare in error path of emac_clks_phase1_init Fix the missing clk_disable_unprepare() before return from emac_clks_phase1_init() in the error handling case. Fixes: b9b17debc69d ("net: emac: emac gigabit ethernet controller driver") Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Timur Tabi Signed-off-by: David S. Miller commit e71642009cbd4a874c3af71a4b16b39499f58658 Author: Xu Wang Date: Mon Aug 10 02:38:07 2020 +0000 ionic_lif: Use devm_kcalloc() in ionic_qcq_alloc() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". Signed-off-by: Xu Wang Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit 26896f01467a28651f7a536143fe5ac8449d4041 Author: Qingyu Li Date: Mon Aug 10 09:51:00 2020 +0800 net/nfc/rawsock.c: add CAP_NET_RAW check. When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Qingyu Li Signed-off-by: David S. Miller commit 1dab5877e8ebb7a00fbf0e7d797c869aa37830b9 Author: Luo bin Date: Sun Aug 9 11:53:49 2020 +0800 hinic: fix strncpy output truncated compile warnings fix the compile warnings of 'strncpy' output truncated before terminating nul copying N bytes from a string of the same length Signed-off-by: Luo bin Reported-by: kernel test robot Signed-off-by: David S. Miller commit c79f428d6f14e754503fa7a3145d62039ccd05c9 Author: Xie He Date: Sat Aug 8 19:35:48 2020 -0700 drivers/net/wan/x25_asy: Added needed_headroom and a skb->len check 1. Added a skb->len check This driver expects upper layers to include a pseudo header of 1 byte when passing down a skb for transmission. This driver will read this 1-byte header. This patch added a skb->len check before reading the header to make sure the header exists. 2. Added needed_headroom When this driver transmits data, first this driver will remove a pseudo header of 1 byte, then the lapb module will prepend the LAPB header of 2 or 3 bytes. So the value of needed_headroom in this driver should be 3 - 1. Cc: Willem de Bruijn Cc: Martin Schiller Signed-off-by: Xie He Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit b06c19d9f827f6743122795570bfc0c72db482b0 Author: Ira Weiny Date: Mon Aug 10 17:02:58 2020 -0700 net/tls: Fix kmap usage When MSG_OOB is specified to tls_device_sendpage() the mapped page is never unmapped. Hold off mapping the page until after the flags are checked and the page is actually needed. Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure") Signed-off-by: Ira Weiny Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit e176b7a3054eef44a22f6ca3d14168dcf9bad21e Author: Lukas Bulwahn Date: Sun Aug 2 18:19:56 2020 +0200 doc/zh_CN: resolve undefined label warning in admin-guide index Documentation generation warns: Documentation/translations/zh_CN/admin-guide/index.rst:3: WARNING: undefined label: documentation/admin-guide/index.rst Use doc reference for .rst files to resolve the warning. Fixes: 37a607cf2318 ("doc/zh_CN: add admin-guide index") Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20200802161956.18268-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit ccfaed7bd443340d1cac7b6af7bb588766799964 Author: Lukas Bulwahn Date: Sun Aug 2 18:21:01 2020 +0200 doc/zh_CN: fix title heading markup in admin-guide cpu-load Documentation generation warns: Documentation/translations/zh_CN/admin-guide/cpu-load.rst:1: WARNING: Title overline too short. Extend title heading markup by one. It was just off by one. Fixes: e210c66d567c ("doc/zh_CN: add cpu-load Chinese version") Signed-off-by: Lukas Bulwahn Acked-by: Tao Zhou Link: https://lore.kernel.org/r/20200802162101.18875-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit 7033a95ab411db94f41b7178e52ae0e434356cb8 Author: Stephen Kitt Date: Thu Aug 6 18:14:56 2020 +0200 docs: remove the 2.6 "Upgrading I2C Drivers" guide All the drivers have long since been upgraded, and all the important information here is also included in the "Implementing I2C device drivers" guide. Signed-off-by: Stephen Kitt Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/20200806161456.8680-1-steve@sk2.org Signed-off-by: Jonathan Corbet commit cca73e4946c4a8d2ce3395207d8a0b5c565b530b Author: Billy Wilson Date: Thu Aug 6 17:17:54 2020 -0600 docs: Correct the release date of 5.2 stable A table lists the 5.2 stable release date as September 15, but it was released on July 7. This may confuse a reader who is trying to understand the stable update release cycle. Signed-off-by: Billy Wilson Link: https://lore.kernel.org/r/20200806231754.7735-1-billy_wilson@byu.edu Signed-off-by: Jonathan Corbet commit 2824a3669fb28324a76bba1d2203f2f11b126124 Author: Kees Cook Date: Sat Aug 8 00:14:36 2020 -0700 mailmap: Update comments for with format and more detalis Without having first read the git-shortlog man-page, the format of .mailmap may not be immediately obvious. Add comments with pointers to the man-page, along with other details. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/202008080013.58EBD83@keescook Signed-off-by: Jonathan Corbet commit 502b675050a506fb966c6f273d2ce42e5d8ddb07 Author: Remi Andruccioli Date: Sat Aug 8 18:31:23 2020 +0200 docs: cdrom: Fix a typo and rst markup "The capability fags" should be "The capability flags". In rst markup, a incorrect markup expression is causing bad rendering in Sphinx output. Replace the erroneous single quote by a backquote. Signed-off-by: Remi Andruccioli Link: https://lore.kernel.org/r/20200808163123.17643-1-remi.andruccioli@gmail.com Signed-off-by: Jonathan Corbet commit be3a5b0e8b8762ef2007d1c6780f273cbd7252d4 Author: Randy Dunlap Date: Sun Aug 9 19:49:41 2020 -0700 Doc: admin-guide: use correct legends in kernel-parameters.txt Documentation/admin-guide/kernel-parameters.rst includes a legend telling us what configurations or hardware platforms are relevant for certain boot options. For X86, it is spelled "X86" and for x86_64, it is spelled "X86-64", so make corrections for those. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Link: https://lore.kernel.org/r/20200810024941.30231-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit f30c3ff3f0e8305d6c1a210df6d588a13333b8f7 Author: Tobias Klauser Date: Mon Aug 10 11:50:00 2020 +0200 Documentation/features: refresh RISC-V arch support files Support for these was added by the following commits: f2c9699f6555 ("riscv: Add STACKPROTECTOR supported") 3c4697982982 ("riscv: Enable LOCKDEP_SUPPORT & fixup TRACE_IRQFLAGS_SUPPORT"). ed48b297fe21 ("riscv: Enable context tracking") cbb3d91d3bcf ("riscv: Add kmemleak support") Signed-off-by: Tobias Klauser Link: https://lore.kernel.org/r/20200810095000.32092-1-tklauser@distanz.ch Signed-off-by: Jonathan Corbet commit a5019c7f563154bec1cc4026e0883f86126fb2f4 Author: Sumera Priyadarsini Date: Tue Aug 11 05:53:50 2020 +0530 documentation: coccinelle: Improve command example for make C={1,2} Modify coccinelle documentation to further clarify the usage of the makefile C variable by coccicheck. Signed-off-by: Sumera Priyadarsini Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20200811002350.5553-1-sylphrenadin@gmail.com Signed-off-by: Jonathan Corbet commit ec8213f8900573cbbf250b240f9aebd78366b251 Author: Puranjay Mohan Date: Tue Aug 11 00:00:19 2020 +0530 Core-api: Documentation: Replace deprecated :c:func: Usage Replace :c:func: with func() as the previous usage is deprecated. Signed-off-by: Puranjay Mohan Reviewed-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20200810183019.22170-1-puranjay12@gmail.com Signed-off-by: Jonathan Corbet commit 2d88fc62d4b67cd7b3cf7ed89e4997122548ecdb Author: Puranjay Mohan Date: Tue Aug 11 00:06:13 2020 +0530 Dev-tools: Documentation: Replace deprecated :c:func: Usage Replace :c:func: with func() as the previous usage is deprecated. Signed-off-by: Puranjay Mohan Link: https://lore.kernel.org/r/20200810183613.25643-1-puranjay12@gmail.com Signed-off-by: Jonathan Corbet commit 7caf3e3f1703650ea7d7221aba3ae4b3a798b89a Author: Puranjay Mohan Date: Tue Aug 11 00:18:28 2020 +0530 Filesystems: Documentation: Replace deprecated :c:func: Usage Replace :c:func: with func() as the previous usage is deprecated. Signed-off-by: Puranjay Mohan Link: https://lore.kernel.org/r/20200810184828.29297-1-puranjay12@gmail.com Signed-off-by: Jonathan Corbet commit 1fc0fd6739bcaf282f5ffb26ca082aea5a45a7b3 Author: Bryan Brattlof Date: Tue Aug 11 16:17:12 2020 +0000 docs: trace: fix a typo emumerated -> enumerated Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/87lfili2d8.fsf@bryanbrattlof.com Signed-off-by: Jonathan Corbet commit b450eeb0c973ed4125ea91e35613f029337fd28b Author: Alexander Gordeev Date: Tue Aug 4 20:35:50 2020 +0200 s390/numa: move code to arch/s390/kernel Move all code from arch/s390/numa/ to arch/s390/kernel/ since numa.c is the only source file and all others were deleted with the fake NUMA support removal. Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 12bbf0962afa903321f28c454d7b667199ae55da Author: Heiko Carstens Date: Wed Aug 5 14:50:41 2020 +0200 s390/time: remove select CLOCKSOURCE_VALIDATE_LAST_CYCLE again Sven Schnelle reported that setting CLOCKSOURCE_VALIDATE_LAST_CYCLE doesn't make sense: even if our tod clock overflows delta calculation (now - last) with unsigned 64 bit values will still be correct. Therefore revert commit 555701a714f7 ("s390/time: select CLOCKSOURCE_VALIDATE_LAST_CYCLE"). Fixes: 555701a714f7 ("s390/time: select CLOCKSOURCE_VALIDATE_LAST_CYCLE") Reported-by: Sven Schnelle Signed-off-by: Heiko Carstens commit 0990d836cecb207071492f5679d5b07b26574205 Author: Mikhail Zaslonko Date: Tue May 5 10:34:52 2020 +0200 s390/debug: debug feature version 3 Change __debug_entry structure in the following way: - remove redundant union - Field containing cpuid is expanded to 16 bits. 8-bit width was not enough since we already support up to 512 cpus. - Field containing the timestamp is expanded to 60 bits. The timestamp itself is now stored in the absolute Unix time format in microseconds taking the Epoch Index into acount. Adjust default header for debug entries by setting minimum width for cpuid to 4 digits. Reviewed-by: Heiko Carstens Signed-off-by: Mikhail Zaslonko Signed-off-by: Heiko Carstens commit 929a343b858612100cb09443a8aaa20d4a4706d3 Author: Krzysztof Kozlowski Date: Wed Aug 5 17:50:53 2020 +0200 s390/Kconfig: add missing ZCRYPT dependency to VFIO_AP The VFIO_AP uses ap_driver_register() (and deregister) functions implemented in ap_bus.c (compiled into ap.o). However the ap.o will be built only if CONFIG_ZCRYPT is selected. This was not visible before commit e93a1695d7fb ("iommu: Enable compile testing for some of drivers") because the CONFIG_VFIO_AP depends on CONFIG_S390_AP_IOMMU which depends on the missing CONFIG_ZCRYPT. After adding COMPILE_TEST, it is possible to select a configuration with VFIO_AP and S390_AP_IOMMU but without the ZCRYPT. Add proper dependency to the VFIO_AP to fix build errors: ERROR: modpost: "ap_driver_register" [drivers/s390/crypto/vfio_ap.ko] undefined! ERROR: modpost: "ap_driver_unregister" [drivers/s390/crypto/vfio_ap.ko] undefined! Reported-by: kernel test robot Fixes: e93a1695d7fb ("iommu: Enable compile testing for some of drivers") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Heiko Carstens commit 535e4fc623fab2e09a0653fc3a3e17f382ad0251 Author: Alexander Gordeev Date: Tue Aug 4 20:35:49 2020 +0200 s390/numa: set node distance to LOCAL_DISTANCE The node distance is hardcoded to 0, which causes a trouble for some user-level applications. In particular, "libnuma" expects the distance of a node to itself as LOCAL_DISTANCE. This update removes the offending node distance override. Cc: # 4.4 Fixes: 3a368f742da1 ("s390/numa: add core infrastructure") Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 75be6b98eda46d27b4a218fdbfb034a5b0fb5b12 Author: Tianjia Zhang Date: Sun Aug 2 19:15:26 2020 +0800 s390/pkey: remove redundant variable initialization In the first place, the initialization value of `rc` is wrong. It is unnecessary to initialize `rc` variables, so remove their initialization operation. Fixes: f2bbc96e7cfad ("s390/pkey: add CCA AES cipher key support") Signed-off-by: Tianjia Zhang Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 75d3e7f4769d276a056efa1cc7f08de571fc9b4b Author: Wang Hai Date: Thu Jul 30 14:36:02 2020 +0800 s390/test_unwind: fix possible memleak in test_unwind() test_unwind() misses to call kfree(bt) in an error path. Add the missed function call to fix it. Fixes: 0610154650f1 ("s390/test_unwind: print verbose unwinding results") Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens commit ba925fa35057a062ac98c3e8138b013ce4ce351c Author: Gerald Schaefer Date: Wed Jul 29 22:22:34 2020 +0200 s390/gmap: improve THP splitting During s390_enable_sie(), we need to take care of splitting all qemu user process THP mappings. This is currently done with follow_page(FOLL_SPLIT), by simply iterating over all vma ranges, with PAGE_SIZE increment. This logic is sub-optimal and can result in a lot of unnecessary overhead, especially when using qemu and ASAN with large shadow map. Ilya reported significant system slow-down with one CPU busy for a long time and overall unresponsiveness. Fix this by using walk_page_vma() and directly calling split_huge_pmd() only for present pmds, which greatly reduces overhead. Cc: # v5.4+ Reported-by: Ilya Leoshkevich Tested-by: Ilya Leoshkevich Acked-by: Christian Borntraeger Signed-off-by: Gerald Schaefer Signed-off-by: Heiko Carstens commit f0cbd3b83ed47803df941865f720934c69abb803 Author: Vasily Gorbik Date: Thu Jul 30 16:02:28 2020 +0200 s390/atomic: circumvent gcc 10 build regression Circumvent the following gcc 10 allyesconfig build regression: CC drivers/leds/trigger/ledtrig-cpu.o In file included from ./arch/s390/include/asm/bitops.h:39, from ./include/linux/bitops.h:29, from ./include/linux/kernel.h:12, from drivers/leds/trigger/ledtrig-cpu.c:18: ./arch/s390/include/asm/atomic_ops.h: In function 'ledtrig_cpu': ./arch/s390/include/asm/atomic_ops.h:46:2: warning: 'asm' operand 1 probably does not match constraints 46 | asm volatile( \ | ^~~ ./arch/s390/include/asm/atomic_ops.h:53:2: note: in expansion of macro '__ATOMIC_CONST_OP' 53 | __ATOMIC_CONST_OP(op_name, op_type, op_string, "\n") \ | ^~~~~~~~~~~~~~~~~ ./arch/s390/include/asm/atomic_ops.h:56:1: note: in expansion of macro '__ATOMIC_CONST_OPS' 56 | __ATOMIC_CONST_OPS(__atomic_add_const, int, "asi") | ^~~~~~~~~~~~~~~~~~ ./arch/s390/include/asm/atomic_ops.h:46:2: error: impossible constraint in 'asm' 46 | asm volatile( \ | ^~~ ./arch/s390/include/asm/atomic_ops.h:53:2: note: in expansion of macro '__ATOMIC_CONST_OP' 53 | __ATOMIC_CONST_OP(op_name, op_type, op_string, "\n") \ | ^~~~~~~~~~~~~~~~~ ./arch/s390/include/asm/atomic_ops.h:56:1: note: in expansion of macro '__ATOMIC_CONST_OPS' 56 | __ATOMIC_CONST_OPS(__atomic_add_const, int, "asi") | ^~~~~~~~~~~~~~~~~~ scripts/Makefile.build:280: recipe for target 'drivers/leds/trigger/ledtrig-cpu.o' failed By swapping conditions as proposed here: https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549318.html Suggested-by: Ilya Leoshkevich Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 3bc6e3dc5a54d5842938c6f1ed78dd1add379af7 Author: Helge Deller Date: Sun Jun 14 10:50:42 2020 +0200 parisc: Whitespace cleanups in atomic.h Fix whitespace indenting and drop trailing backslashes. Cc: # 4.19+ Signed-off-by: Helge Deller commit f6ebbcf08f37b01827c51309a188e85165e498e7 Author: Rafael J. Wysocki Date: Thu Aug 6 14:03:55 2020 +0200 cpufreq: intel_pstate: Implement passive mode with HWP enabled Allow intel_pstate to work in the passive mode with HWP enabled and make it set the HWP minimum performance limit (HWP floor) to the P-state value given by the target frequency supplied by the cpufreq governor, so as to prevent the HWP algorithm and the CPU scheduler from working against each other, at least when the schedutil governor is in use, and update the intel_pstate documentation accordingly. Among other things, this allows utilization clamps to be taken into account, at least to a certain extent, when intel_pstate is in use and makes it more likely that sufficient capacity for deadline tasks will be provided. After this change, the resulting behavior of an HWP system with intel_pstate in the passive mode should be close to the behavior of the analogous non-HWP system with intel_pstate in the passive mode, except that the HWP algorithm is generally allowed to make the CPU run at a frequency above the floor P-state set by intel_pstate in the entire available range of P-states, while without HWP a CPU can run in a P-state above the requested one if the latter falls into the range of turbo P-states (referred to as the turbo range) or if the P-states of all CPUs in one package are coordinated with each other at the hardware level. [Note that in principle the HWP floor may not be taken into account by the processor if it falls into the turbo range, in which case the processor has a license to choose any P-state, either below or above the HWP floor, just like a non-HWP processor in the case when the target P-state falls into the turbo range.] With this change applied, intel_pstate in the passive mode assumes complete control over the HWP request MSR and concurrent changes of that MSR (eg. via the direct MSR access interface) are overridden by it. Signed-off-by: Rafael J. Wysocki Acked-by: Srinivas Pandruvada Reviewed-by: Francisco Jerez commit 6d816e088c359866f9867057e04f244c608c42fe Author: Jens Axboe Date: Tue Aug 11 08:04:14 2020 -0600 io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a reference to the ring itself around the task_work execution cycle. Cc: stable@vger.kernel.org # v5.7+ Reported-by: syzbot+9b260fc33297966f5a8e@syzkaller.appspotmail.com Signed-off-by: Jens Axboe commit efa8480a831673bb52400df9dbe5da0aacda97bf Author: Jens Axboe Date: Mon Aug 10 18:44:24 2020 -0600 fs: RWF_NOWAIT should imply IOCB_NOIO With the change allowing read-ahead for IOCB_NOWAIT, we changed the RWF_NOWAIT semantics of only doing cached reads. Since we know have IOCB_NOIO to manage that specific side of it, just make RWF_NOWAIT imply IOCB_NOIO as well to restore the previous behavior. Fixes: 2e85abf053b9 ("mm: allow read-ahead with IOCB_NOWAIT set") Reported-by: Dave Chinner Reviewed-by: Dave Chinner Signed-off-by: Jens Axboe commit da7bdfdd23b858e6d97a1e4b461548e23d16977f Author: Stanislav Fomichev Date: Fri Aug 7 15:38:46 2020 -0700 selftests/bpf: Fix v4_to_v6 in sk_lookup I'm getting some garbage in bytes 8 and 9 when doing conversion from sockaddr_in to sockaddr_in6 (leftover from AF_INET?). Let's explicitly clear the higher bytes. Fixes: 0ab5539f8584 ("selftests/bpf: Tests for BPF_SK_LOOKUP attach point") Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20200807223846.4190917-1-sdf@google.com commit 0390c429dbed4068bd2cd8dded937d9a5ec24cd2 Author: Jianlin Lv Date: Mon Aug 10 23:39:40 2020 +0800 selftests/bpf: Fix segmentation fault in test_progs test_progs reports the segmentation fault as below: $ sudo ./test_progs -t mmap --verbose test_mmap:PASS:skel_open_and_load 0 nsec [...] test_mmap:PASS:adv_mmap1 0 nsec test_mmap:PASS:adv_mmap2 0 nsec test_mmap:PASS:adv_mmap3 0 nsec test_mmap:PASS:adv_mmap4 0 nsec Segmentation fault This issue was triggered because mmap() and munmap() used inconsistent length parameters; mmap() creates a new mapping of 3 * page_size, but the length parameter set in the subsequent re-map and munmap() functions is 4 * page_size; this leads to the destruction of the process space. To fix this issue, first create 4 pages of anonymous mapping, then do all the mmap() with MAP_FIXED. Another issue is that when unmap the second page fails, the length parameter to delete tmp1 mappings should be 4 * page_size. Signed-off-by: Jianlin Lv Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200810153940.125508-1-Jianlin.Lv@arm.com commit fe6a8fc5ed2f0081f17375ae2005718522c392c6 Author: Lennart Poettering Date: Mon Aug 10 19:16:32 2020 +0200 loop: unset GENHD_FL_NO_PART_SCAN on LOOP_CONFIGURE When LOOP_CONFIGURE is used with LO_FLAGS_PARTSCAN we need to propagate this into the GENHD_FL_NO_PART_SCAN. LOOP_SETSTATUS does this, LOOP_CONFIGURE doesn't so far. Effect is that setting up a loopback device with partition scanning doesn't actually work when LOOP_CONFIGURE is issued, though it works fine with LOOP_SETSTATUS. Let's correct that and propagate the flag in LOOP_CONFIGURE too. Fixes: 3448914e8cc5("loop: Add LOOP_CONFIGURE ioctl") Signed-off-by: Lennart Poettering Acked-by: Martijn Coenen Signed-off-by: Jens Axboe commit 63fe3fd393dc4e7ea3948e79947362ffbb0fd616 Author: Yonghong Song Date: Mon Aug 10 20:08:52 2020 -0700 libbpf: Do not use __builtin_offsetof for offsetof Commit 5fbc220862fc ("tools/libpf: Add offsetof/container_of macro in bpf_helpers.h") added a macro offsetof() to get the offset of a structure member: #define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER) In certain use cases, size_t type may not be available so Commit da7a35062bcc ("libbpf bpf_helpers: Use __builtin_offsetof for offsetof") changed to use __builtin_offsetof which removed the dependency on type size_t, which I suggested. But using __builtin_offsetof will prevent CO-RE relocation generation in case that, e.g., TYPE is annotated with "preserve_access_info" where a relocation is desirable in case the member offset is changed in a different kernel version. So this patch reverted back to the original macro but using "unsigned long" instead of "site_t". Fixes: da7a35062bcc ("libbpf bpf_helpers: Use __builtin_offsetof for offsetof") Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Ian Rogers Link: https://lore.kernel.org/bpf/20200811030852.3396929-1-yhs@fb.com commit 796a58fe2b8c9b6668db00d92512ec84be663027 Author: Srinivas Kandagatla Date: Tue Aug 11 13:02:05 2020 +0100 ASoC: q6routing: add dummy register read/write function Most of the DAPM widgets for DSP ASoC components reuse reg field of the widgets for its internal calculations, however these are not real registers. So read/writes to these numbers are not really valid. However ASoC core will read these registers to get default state during startup. With recent changes to ASoC core, every register read/write failures are reported very verbosely. Prior to this fails to reads are totally ignored, so we never saw any error messages. To fix this add dummy read/write function to return default value. Fixes: e3a33673e845 ("ASoC: qdsp6: q6routing: Add q6routing driver") Reported-by: John Stultz Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200811120205.21805-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 56235e4bc5ae58cb8fcd9314dba4e9ab077ddda8 Author: Srinivas Kandagatla Date: Tue Aug 11 13:02:04 2020 +0100 ASoC: q6afe-dai: mark all widgets registers as SND_SOC_NOPM Looks like the q6afe-dai dapm widget registers are set as "0", which is a not correct. As this registers will be read by ASoC core during startup which will throw up errors, Fix this by making the registers as SND_SOC_NOPM as these should be never used. With recent changes to ASoC core, every register read/write failures are reported very verbosely. Prior to this fails to reads are totally ignored, so we never saw any error messages. Fixes: 24c4cbcfac09 ("ASoC: qdsp6: q6afe: Add q6afe dai driver") Reported-by: John Stultz Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200811120205.21805-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit efc913c8fb88728626759735e1b09370a6813180 Author: Takashi Iwai Date: Mon Aug 10 15:46:31 2020 +0200 ASoC: Make soc_component_read() returning an error code again Along with the recent unification of snd_soc_component_read*() functions, the behavior of snd_soc_component_read() was changed slightly; namely it returns the register read value directly, and even if an error happens, it returns zero (but it prints an error message). That said, the caller side can't know whether it's an error or not any longer. Ideally this shouldn't matter much, but in practice this seems causing a regression, as John reported. And, grepping the tree revealed that there are still plenty of callers that do check the error code, so we'll need to deal with them in anyway. As a quick band-aid over the regression, this patch changes the return value of snd_soc_component_read() again to the negative error code. It can't work, obviously, for 32bit register values, but it should be enough for the known regressions, so far. Fixes: cf6e26c71bfd ("ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32()") Reported-by: John Stultz Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200810134631.19742-1-tiwai@suse.de Signed-off-by: Mark Brown commit 404690649e6a52ee39817168f2d984726412e091 Author: Hui Wang Date: Tue Aug 11 20:24:30 2020 +0800 ALSA: hda - reverse the setting value in the micmute_led_set Before the micmute_led_set() is introduced, the function of alc_gpio_micmute_update() will set the gpio value with the !micmute_led.led_value, and the machines have the correct micmute led status. After the micmute_led_set() is introduced, it sets the gpio value with !!micmute_led.led_value, so the led status is not correct anymore, we need to set micmute_led_polarity = 1 to workaround it. Now we fix the micmute_led_set() and remove micmute_led_polarity = 1. Fixes: 87dc36482cab ("ALSA: hda/realtek - Add LED class support for micmute LED") Reported-and-suggested-by: Kai-Heng Feng Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20200811122430.6546-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 85cb905d3c5ff6107f4948314731c1b55b689cfc Author: Takashi Iwai Date: Mon Aug 3 16:39:58 2020 +0200 ALSA: echoaduio: Drop superfluous volatile modifier The dsp_registers field of struct echoaduio has the volatile modifier, but it's basically superfluous; the field is accessed only for the base pointer of readl() and writel(), hence marking with __iomem alone should suffice. OTOH, having the volatile prefix causes a compile warning like: sound/pci/echoaudio/echoaudio.c:1878:14: warning: passing argument 1 of 'iounmap' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers] So it's better to drop this superfluous modifier. Link: https://lore.kernel.org/r/20200803143958.24324-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit e792415c5d3e0eb52527cce228a72e4392f8cae2 Author: Xingxing Su Date: Tue Aug 11 07:18:37 2020 -0400 KVM: MIPS/VZ: Fix build error caused by 'kvm_run' cleanup Commit c34b26b98caca48ec9ee9 ("KVM: MIPS: clean up redundant 'kvm_run' parameters") remove the 'kvm_run' parameter in kvm_vz_gpsi_lwc2. The following build error: arch/mips/kvm/vz.c: In function 'kvm_trap_vz_handle_gpsi': arch/mips/kvm/vz.c:1243:43: error: 'run' undeclared (first use in this function) er = kvm_vz_gpsi_lwc2(inst, opc, cause, run, vcpu); ^~~ arch/mips/kvm/vz.c:1243:43: note: each undeclared identifier is reported only once for each function it appears in scripts/Makefile.build:283: recipe for target 'arch/mips/kvm/vz.o' failed make[2]: *** [arch/mips/kvm/vz.o] Error 1 scripts/Makefile.build:500: recipe for target 'arch/mips/kvm' failed make[1]: *** [arch/mips/kvm] Error 2 Makefile:1785: recipe for target 'arch/mips' failed make: *** [arch/mips] Error 2 Signed-off-by: Xingxing Su Signed-off-by: Paolo Bonzini commit b9d8cf2eb3ceecdee3434b87763492aee9e28845 Author: Michael Kelley Date: Sun Aug 9 18:29:51 2020 -0700 x86/hyperv: Make hv_setup_sched_clock inline Make hv_setup_sched_clock inline so the reference to pv_ops works correctly with objtool updates to detect noinstr violations. See https://lore.kernel.org/patchwork/patch/1283635/ Signed-off-by: Michael Kelley Acked-by: Peter Zijlstra (Intel) Acked-by: Thomas Gleixner Link: https://lore.kernel.org/r/1597022991-24088-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 881a3a11c2b858fe9b69ef79ac5ee9978a266dc9 Author: Pavel Machek Date: Mon Aug 3 11:35:06 2020 +0200 btrfs: fix return value mixup in btrfs_get_extent btrfs_get_extent() sets variable ret, but out: error path expect error to be in variable err so the error code is lost. Fixes: 6bf9e4bd6a27 ("btrfs: inode: Verify inode mode to avoid NULL pointer dereference") CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Nikolay Borisov Signed-off-by: Pavel Machek (CIP) Reviewed-by: David Sterba Signed-off-by: David Sterba commit 875102ea4b7700330a33c0db71555d91dafa9c82 Author: Oscar Carter Date: Sat Jul 4 17:50:57 2020 +0200 parisc/kernel/ftrace: Remove function callback casts In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, remove all the function callback casts. Co-developed-by: Helge Deller Signed-off-by: Oscar Carter Signed-off-by: Helge Deller commit 60e5da629a7c29e0987f6f02ec20b14c4ee0645e Author: Helge Deller Date: Sun Aug 9 07:30:06 2020 +0200 sections.h: dereference_function_descriptor() returns void pointer The function dereference_function_descriptor() takes on hppa64, ppc64 and ia64 a pointer to a function descriptor and returns a (void) pointer to the dereferenced function. To make cross-arch coding easier, on all other architectures the dereference_function_descriptor() macro should return a void pointer too. Signed-off-by: Helge Deller commit 4c96870e58f8bce1c7eba5f92ec69089ae6798f4 Author: Johannes Thumshirn Date: Tue Jul 21 21:10:27 2020 +0900 zonefs: update documentation to reflect zone size vs capacity Update the zonefs documentation to reflect the difference between a zone's size and it's capacity. The maximum file size in zonefs is the zones capacity, for ZBC and ZAC based devices, which do not have a separate zone capacity, the zone capacity is equal to the zone size. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal commit e3c3155bc95ab6a7b21ac40418bf80bedb204949 Author: Johannes Thumshirn Date: Tue Jul 21 21:10:26 2020 +0900 zonefs: add zone-capacity support In the zoned storage model, the sectors within a zone are typically all writeable. With the introduction of the Zoned Namespace (ZNS) Command Set in the NVM Express organization, the model was extended to have a specific writeable capacity. This zone capacity can be less than the overall zone size for a NVMe ZNS device or null_blk in zoned-mode. For other ZBC/ZAC devices the zone capacity is always equal to the zone size. Use the zone capacity field instead from blk_zone for determining the maximum inode size and inode blocks in zonefs. Signed-off-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal commit f2e39e8c4f0c13bc4b49f942be8fd5b4b0470412 Author: Juergen Gross Date: Fri Jul 3 09:28:15 2020 +0200 x86/xen: drop tests for highmem in pv code With support for 32-bit pv guests gone pure pv-code no longer needs to test for highmem. Dropping those tests removes the need for flushing in some places. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 56415c4c3da971abd37d0a08c5a570a510b75a7a Author: Juergen Gross Date: Fri Jul 3 09:16:19 2020 +0200 x86/xen: eliminate xen-asm_64.S With 32-bit pv-guest support removed xen-asm_64.S can be merged with xen-asm.S Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit a13f2ef168cb2a033a284eb841bcc481ffbc90cf Author: Juergen Gross Date: Mon Jun 29 10:35:39 2020 +0200 x86/xen: remove 32-bit Xen PV guest support Xen is requiring 64-bit machines today and since Xen 4.14 it can be built without 32-bit PV guest support. There is no need to carry the burden of 32-bit PV guest support in the kernel any longer, as new guests can be either HVM or PVH, or they can use a 64 bit kernel. Remove the 32-bit Xen PV support from the kernel. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross commit 16e6eea29d7bc62ae23a4918e971415d21078d6e Merge: 15f9d8b8cf668 f87812284172a Author: Dave Airlie Date: Tue Aug 11 13:08:44 2020 +1000 Merge tag 'amd-drm-fixes-5.9-2020-08-07' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-fixes-5.9-2020-08-07: amdgpu: - Re-add spelling typo fix - Sienna Cichlid fixes - Navy Flounder fixes - DC fixes - SMU i2c fix - Power fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200807222843.3909-1-alexander.deucher@amd.com commit 00e4db51259a5f936fec1424b884f029479d3981 Merge: ed3854ff994b3 1101c872c8c78 Author: Linus Torvalds Date: Mon Aug 10 19:21:38 2020 -0700 Merge tag 'perf-tools-2020-08-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools updates from Arnaldo Carvalho de Melo: "New features: - Introduce controlling how 'perf stat' and 'perf record' works via a control file descriptor, allowing starting with events configured but disabled until commands are received via the control file descriptor. This allows, for instance for tools such as Intel VTune to make further use of perf as its Linux platform driver. - Improve 'perf record' to to register in a perf.data file header the clockid used to help later correlate things like syslog files and perf events recorded. - Add basic syscall and find_next_bit benchmarks to 'perf bench'. - Allow using computed metrics in calculating other metrics. For instance: { .metric_expr = "l2_rqsts.demand_data_rd_hit + l2_rqsts.pf_hit + l2_rqsts.rfo_hit", .metric_name = "DCache_L2_All_Hits", }, { .metric_expr = "max(l2_rqsts.all_demand_data_rd - l2_rqsts.demand_data_rd_hit, 0) + l2_rqsts.pf_miss + l2_rqsts.rfo_miss", .metric_name = "DCache_L2_All_Miss", }, { .metric_expr = "dcache_l2_all_hits + dcache_l2_all_miss", .metric_name = "DCache_L2_All", } - Add suport for 'd_ratio', '>' and '<' operators to the expression resolver used in calculating metrics in 'perf stat'. Support for new kernel features: - Support TEXT_POKE and KSYMBOL_TYPE_OOL perf metadata events to cope with things like ftrace, trampolines, i.e. changes in the kernel text that gets in the way of properly decoding Intel PT hardware traces, for instance. Intel PT: - Add various knobs to reduce the volume of Intel PT traces by reducing the level of details such as decoding just some types of packets (e.g., FUP/TIP, PSB+), also filtering by time range. - Add new itrace options (log flags to the 'd' option, error flags to the 'e' one, etc), controlling how Intel PT is transformed into perf events, document some missing options (e.g., how to synthesize callchains). BPF: - Properly report BPF errors when parsing events. - Do not setup side-band events if LIBBPF is not linked, fixing a segfault. Libraries: - Improvements to the libtraceevent plugin mechanism. - Improve libtracevent support for KVM trace events SVM exit reasons. - Add a libtracevent plugins for decoding syscalls/sys_enter_futex and for tlb_flush. - Ensure sample_period is set libpfm4 events in 'perf test'. - Fixup libperf namespacing, to make sure what is in libperf has the perf_ namespace while what is now only in tools/perf/ doesn't use that prefix. Arch specific: - Improve the testing of vendor events and metrics in 'perf test'. - Allow no ARM CoreSight hardware tracer sink to be specified on command line. - Fix arm_spe_x recording when mixed with other perf events. - Add s390 idle functions 'psw_idle' and 'psw_idle_exit' to list of idle symbols. - List kernel supplied event aliases for arm64 in 'perf list'. - Add support for extended register capability in PowerPC 9 and 10. - Added nest IMC power9 metric events. Miscellaneous: - No need to setup sample_regs_intr/sample_regs_user for dummy events. - Update various copies of kernel headers, some causing perf to handle new syscalls, MSRs, etc. - Improve usage of flex and yacc, enabling warnings and addressing the fallout. - Add missing '--output' option to 'perf kmem' so that it can pass it along to 'perf record'. - 'perf probe' fixes related to adding multiple probes on the same address for the same event. - Make 'perf probe' warn if the target function is a GNU indirect function. - Remove //anon mmap events from 'perf inject jit' to fix supporting both using ELF files for generated functions and the perf-PID.map approaches" * tag 'perf-tools-2020-08-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (144 commits) perf record: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set perf tools powerpc: Add support for extended regs in power10 perf tools powerpc: Add support for extended register capability tools headers UAPI: Sync drm/i915_drm.h with the kernel sources tools arch x86: Sync asm/cpufeatures.h with the kernel sources tools arch x86: Sync the msr-index.h copy with the kernel sources tools headers UAPI: update linux/in.h copy tools headers API: Update close_range affected files perf script: Add 'tod' field to display time of day perf script: Change the 'enum perf_output_field' enumerators to be 64 bits perf data: Add support to store time of day in CTF data conversion perf tools: Move clockid_res_ns under clock struct perf header: Store clock references for -k/--clockid option perf tools: Add clockid_name function perf clockid: Move parse_clockid() to new clockid object tools lib traceevent: Handle possible strdup() error in tep_add_plugin_path() API libtraceevent: Fixed description of tep_add_plugin_path() API libtraceevent: Fixed type in PRINT_FMT_STING libtraceevent: Fixed broken indentation in parse_ip4_print_args() libtraceevent: Improve error handling of tep_plugin_add_option() API ... commit ed3854ff994b35cc11658d43d01a421bd5088d23 Merge: 97d052ea3fa85 ff131efff141f Author: Linus Torvalds Date: Mon Aug 10 19:16:26 2020 -0700 Merge tag 'ktest-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest updates from Steven Rostedt: - Have config-bisect save the good/bad configs at each step. - Show log file location even on success - Add PRE_TEST_DIE to kill test if the PRE_TEST fails - Add a NOT operator for conditionals in config file - Add the log output of the last test when emailing on failure. - Other minor clean ups and small fixes. * tag 'ktest-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest.pl: Fix spelling mistake "Cant" -> "Can't" ktest.pl: Change the logic to control the size of the log file emailed ktest.pl: Add MAIL_MAX_SIZE to limit the amount of log emailed ktest.pl: Add the log of last test in email on failure ktest.pl: Turn off buffering to the log file ktest.pl: Just open up the log file once ktest.pl: Add a NOT operator ktest.pl: Define PRE_TEST_DIE to kill the test if the PRE_TEST fails ktest.pl: Always show log file location if defined even on success ktest.pl: Have config-bisect save each config used in the bisect commit 97d052ea3fa853b9aabcc4baca1a605cb1188611 Merge: 086ba2ec163b6 0cd39f4600ed4 Author: Linus Torvalds Date: Mon Aug 10 19:07:44 2020 -0700 Merge tag 'locking-urgent-2020-08-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Thomas Gleixner: "A set of locking fixes and updates: - Untangle the header spaghetti which causes build failures in various situations caused by the lockdep additions to seqcount to validate that the write side critical sections are non-preemptible. - The seqcount associated lock debug addons which were blocked by the above fallout. seqcount writers contrary to seqlock writers must be externally serialized, which usually happens via locking - except for strict per CPU seqcounts. As the lock is not part of the seqcount, lockdep cannot validate that the lock is held. This new debug mechanism adds the concept of associated locks. sequence count has now lock type variants and corresponding initializers which take a pointer to the associated lock used for writer serialization. If lockdep is enabled the pointer is stored and write_seqcount_begin() has a lockdep assertion to validate that the lock is held. Aside of the type and the initializer no other code changes are required at the seqcount usage sites. The rest of the seqcount API is unchanged and determines the type at compile time with the help of _Generic which is possible now that the minimal GCC version has been moved up. Adding this lockdep coverage unearthed a handful of seqcount bugs which have been addressed already independent of this. While generally useful this comes with a Trojan Horse twist: On RT kernels the write side critical section can become preemtible if the writers are serialized by an associated lock, which leads to the well known reader preempts writer livelock. RT prevents this by storing the associated lock pointer independent of lockdep in the seqcount and changing the reader side to block on the lock when a reader detects that a writer is in the write side critical section. - Conversion of seqcount usage sites to associated types and initializers" * tag 'locking-urgent-2020-08-10' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits) locking/seqlock, headers: Untangle the spaghetti monster locking, arch/ia64: Reduce header dependencies by moving XTP bits into the new header x86/headers: Remove APIC headers from seqcount: More consistent seqprop names seqcount: Compress SEQCNT_LOCKNAME_ZERO() seqlock: Fold seqcount_LOCKNAME_init() definition seqlock: Fold seqcount_LOCKNAME_t definition seqlock: s/__SEQ_LOCKDEP/__SEQ_LOCK/g hrtimer: Use sequence counter with associated raw spinlock kvm/eventfd: Use sequence counter with associated spinlock userfaultfd: Use sequence counter with associated spinlock NFSv4: Use sequence counter with associated spinlock iocost: Use sequence counter with associated spinlock raid5: Use sequence counter with associated spinlock vfs: Use sequence counter with associated spinlock timekeeping: Use sequence counter with associated raw spinlock xfrm: policy: Use sequence counters with associated lock netfilter: nft_set_rbtree: Use sequence counter with associated rwlock netfilter: conntrack: Use sequence counter with associated spinlock sched: tasks: Use sequence counter with associated spinlock ... commit 15f9d8b8cf668f24c59322020d267500c48d7383 Merge: c44264f9f729f b5ac98cbb8e5e Author: Dave Airlie Date: Tue Aug 11 11:59:19 2020 +1000 Merge tag 'drm-misc-fixes-2020-08-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-next * backmerge from drm-fixes at v5.8-rc7 * add orientation quirk for ASUS T103HAF * drm/omap: force runtime PM suspend on system suspend * drm/tidss: fix modeset init for DPI panels * re-added docs for drm_gem_flink_ioctl() * ttm: fix page-offset calculation within TTM Signed-off-by: Dave Airlie From: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200804125510.GA29670@linux-uq9g commit c44264f9f729fd63bd6a81a6ac5cd6cd49af09e5 Merge: ca457ab590860 bcf876870b955 Author: Dave Airlie Date: Tue Aug 11 11:58:31 2020 +1000 Merge tag 'v5.8' into drm-next I need to backmerge 5.8 as I've got a bunch of fixes sitting on an rc7 base that I want to land. Signed-off-by: Dave Airlie commit 086ba2ec163b638abd2a90ef3e8bab0238d02e56 Merge: 8c2618a6d0f7b 828add774f0d2 Author: Linus Torvalds Date: Mon Aug 10 18:33:22 2020 -0700 Merge tag 'f2fs-for-5.9-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 two small interfaces: (a) GC_URGENT_LOW mode for performance and (b) F2FS_IOC_SEC_TRIM_FILE ioctl for security. The new GC mode allows Android to run some lower priority GCs in background, while new ioctl discards user information without race condition when the account is removed. In addition, some patches were merged to address latency-related issues. We've fixed some compression-related bug fixes as well as edge race conditions. Enhancements: - add GC_URGENT_LOW mode in gc_urgent - introduce F2FS_IOC_SEC_TRIM_FILE ioctl - bypass racy readahead to improve read latencies - shrink node_write lock coverage to avoid long latency Bug fixes: - fix missing compression flag control, i_size, and mount option - fix deadlock between quota writes and checkpoint - remove inode eviction path in synchronous path to avoid deadlock - fix to wait GCed compressed page writeback - fix a kernel panic in f2fs_is_compressed_page - check page dirty status before writeback - wait page writeback before update in node page write flow - fix a race condition between f2fs_write_end_io and f2fs_del_fsync_node_entry We've added some minor sanity checks and refactored trivial code blocks for better readability and debugging information" * tag 'f2fs-for-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (52 commits) f2fs: prepare a waiter before entering io_schedule f2fs: update_sit_entry: Make the judgment condition of f2fs_bug_on more intuitive f2fs: replace test_and_set/clear_bit() with set/clear_bit() f2fs: make file immutable even if releasing zero compression block f2fs: compress: disable compression mount option if compression is off f2fs: compress: add sanity check during compressed cluster read f2fs: use macro instead of f2fs verity version f2fs: fix deadlock between quota writes and checkpoint f2fs: correct comment of f2fs_exist_written_data f2fs: compress: delay temp page allocation f2fs: compress: fix to update isize when overwriting compressed file f2fs: space related cleanup f2fs: fix use-after-free issue f2fs: Change the type of f2fs_flush_inline_data() to void f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl f2fs: should avoid inode eviction in synchronous path f2fs: segment.h: delete a duplicated word f2fs: compress: fix to avoid memory leak on cc->cpages f2fs: use generic names for generic ioctls f2fs: don't keep meta inode pages used for compressed block migration ... commit 8c2618a6d0f7b08e2b41575a87cf568745c8860e Merge: 163c3e3dc0ddc e28c02b94f9e0 Author: Linus Torvalds Date: Mon Aug 10 18:22:43 2020 -0700 Merge tag 'gfs2-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Make sure transactions won't be started recursively in gfs2_block_zero_range (bug introduced in 5.4 when switching to iomap_zero_range) - Fix a glock holder refcount leak introduced in the iopen glock locking scheme rework merged in 5.8. - A few other small improvements (debugging, stack usage, comment fixes). * tag 'gfs2-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: When gfs2_dirty_inode gets a glock error, dump the glock gfs2: Never call gfs2_block_zero_range with an open transaction gfs2: print details on transactions that aren't properly ended gfs2: Fix inaccurate comment fs: Fix typo in comment gfs2: Fix refcount leak in gfs2_glock_poke gfs2: Pass glock holder to gfs2_file_direct_{read,write} gfs2: Add some flags missing from glock output commit 163c3e3dc0ddcea3edac51612fced13c597f37dc Merge: 4bcf69e57063c 798b7347e4f29 Author: Linus Torvalds Date: Mon Aug 10 18:20:04 2020 -0700 Merge tag 'for-linus-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull JFFS2, UBI and UBIFS updates from Richard Weinberger: "JFFS2: - Fix for a corner case while mounting - Fix for an use-after-free issue UBI: - Fix for a memory load while attaching - Don't produce an anchor PEB with fastmap being disabled UBIFS: - Fix for orphan inode logic - Spelling fixes - New mount option to specify filesystem version" * tag 'for-linus-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: jffs2: fix UAF problem jffs2: fix jffs2 mounting failure ubifs: Fix wrong orphan node deletion in ubifs_jnl_update|rename ubi: fastmap: Free fastmap next anchor peb during detach ubi: fastmap: Don't produce the initial next anchor PEB when fastmap is disabled ubifs: misc.h: delete a duplicated word ubifs: add option to specify version for new file systems commit e97644ebcdc83854e6e29e96285b25042445c28c Author: Colin Ian King Date: Mon Aug 10 11:04:01 2020 +0100 drm/vmwgfx: fix spelling mistake "Cant" -> "Can't" There is a spelling mistake in a DRM_ERROR message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Roland Scheidegger commit 1ae96fce3e4dfe769515350b7f142b3bca1e0bb6 Author: Colin Ian King Date: Wed Aug 5 12:31:55 2020 +0100 drm/vmwgfx: fix spelling mistake "Cound" -> "Could" There is a spelling mistake in a DRM_ERROR message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Roland Scheidegger commit 981243371a5d832af5bc572071172e955d02fe88 Author: Roland Scheidegger Date: Fri Aug 7 22:04:33 2020 +0200 drm/vmwgfx/ldu: Use drm_mode_config_reset Same problem as in stdu, same fix. Fixes: 51f644b40b4b ("drm/atomic-helper: reset vblank on crtc reset") Acked-by: Charmaine Lee Reviewed-by: Zack Rusin Signed-off-by: Roland Scheidegger commit 1338441cf166e2ef789af5915b961d4e13a4ec31 Author: Roland Scheidegger Date: Fri Aug 7 22:03:42 2020 +0200 drm/vmwgfx/sou: Use drm_mode_config_reset Same problem as in stdu, same fix. Fixes: 51f644b40b4b ("drm/atomic-helper: reset vblank on crtc reset") Acked-by: Charmaine Lee Reviewed-by: Zack Rusin Signed-off-by: Roland Scheidegger commit 68745d1edf1700a668c15ecbed466d18f14c7e9b Author: Daniel Vetter Date: Thu Aug 6 17:42:27 2020 +0200 drm/vmwgfx/stdu: Use drm_mode_config_reset When converting to atomic the state reset was done by directly calling the functions, and before the modeset object was fully initialized. This means the various ->dev pointers weren't set up. After commit 51f644b40b4b794b28b982fdd5d0dd8ee63f9272 Author: Daniel Vetter Date: Fri Jun 12 18:00:49 2020 +0200 drm/atomic-helper: reset vblank on crtc reset this started to oops because now we're trying to derefence drm_crtc->dev. Fix this up by entirely switching over to drm_mode_config_reset, called once everything is set up. Fixes: 51f644b40b4b ("drm/atomic-helper: reset vblank on crtc reset") Reported-by: Tetsuo Handa Cc: Tetsuo Handa Signed-off-by: Daniel Vetter Tested-by: Roland Scheidegger Signed-off-by: Roland Scheidegger commit 4437c1152ce0e57ab8f401aa696ea6291cc07ab1 Author: Dan Carpenter Date: Fri Jun 26 13:39:59 2020 +0300 drm/vmwgfx: Fix two list_for_each loop exit tests These if statements are supposed to be true if we ended the list_for_each_entry() loops without hitting a break statement but they don't work. In the first loop, we increment "i" after the "if (i == unit)" condition so we don't necessarily know that "i" is not equal to unit at the end of the loop. In the second loop we exit when mode is not pointing to a valid drm_display_mode struct so it doesn't make sense to check "mode->type". Fixes: a278724aa23c ("drm/vmwgfx: Implement fbdev on kms v2") Signed-off-by: Dan Carpenter Reviewed-by: Roland Scheidegger Signed-off-by: Roland Scheidegger commit 1d2c0c565bc0da25f5e899a862fb58e612b222df Author: Dan Carpenter Date: Fri Jun 26 13:34:37 2020 +0300 drm/vmwgfx: Use correct vmw_legacy_display_unit pointer The "entry" pointer is an offset from the list head and it doesn't point to a valid vmw_legacy_display_unit struct. Presumably the intent was to point to the last entry. Also the "i++" wasn't used so I have removed that as well. Fixes: d7e1958dbe4a ("drm/vmwgfx: Support older hardware.") Signed-off-by: Dan Carpenter Reviewed-by: Roland Scheidegger Signed-off-by: Roland Scheidegger commit 4f88b4ccb7036ce523b3c031d1226d6eda36417b Author: Gustavo A. R. Silva Date: Wed Jun 17 16:51:44 2020 -0500 drm/vmwgfx: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Roland Scheidegger commit ca457ab5908603b36be903e73977afde1ba03c84 Merge: dc100bc8fae59 a34a0a632dd99 Author: Dave Airlie Date: Tue Aug 11 10:56:11 2020 +1000 Merge tag 'drm-misc-next-fixes-2020-08-05' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next-fixes for v5.9-rc1: - Fix drm_dp_mst_port refcount leaks in drm_dp_mst_allocate_vcpi - Fix a fbcon OOB read in fbdev, found by syzbot. - Mark vga_tryget static as it's not used elsewhere. - Small fixes to xlnx. - Remove null check for kfree in drm_dev_release. - Fix DRM_FORMAT_MOD_AMLOGIC_FBC definition. - Fix mode initialization in omap_connector_mode_valid(). Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/b2043dad-f118-bd19-54a6-f23bf6264007@linux.intel.com commit 4bcf69e57063c9b1b15df1a293c969e80a1c97e6 Merge: b7b8e3689aa0b 9e8238020c5be Author: Linus Torvalds Date: Mon Aug 10 16:35:57 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - an update to Elan touchpad controller driver supporting newer ICs with enhanced precision reports and a new firmware update process - an update to EXC3000 touch controller supporting additional parts - assorted driver fixups * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (27 commits) Input: exc3000 - add support to query model and fw_version Input: exc3000 - add reset gpio support Input: exc3000 - add EXC80H60 and EXC80H84 support dt-bindings: touchscreen: Convert EETI EXC3000 touchscreen to json-schema Input: sentelic - fix error return when fsp_reg_write fails Input: alps - remove redundant assignment to variable ret Input: ims-pcu - return error code rather than -ENOMEM Input: elan_i2c - add ic type 0x15 Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary Input: uinput - fix typo in function name documentation Input: ati_remote2 - add missing newlines when printing module parameters Input: psmouse - add a newline when printing 'proto' by sysfs Input: synaptics-rmi4 - drop a duplicated word Input: elan_i2c - add support for high resolution reports Input: elan_i2c - do not constantly re-query pattern ID Input: elan_i2c - add firmware update info for ICs 0x11, 0x13, 0x14 Input: elan_i2c - handle firmware updated on newer ICs Input: elan_i2c - add support for different firmware page sizes Input: elan_i2c - fix detecting IAP version on older controllers Input: elan_i2c - handle devices with patterns above 1 ... commit b7b8e3689aa0b2def48b8c6eb1df060902eb2c0a Merge: fc80c51fd4b23 e6b6e19a4be74 Author: Linus Torvalds Date: Mon Aug 10 16:33:54 2020 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - fix for some modern devices that return multi-byte battery report, from Grant Likely - fix for devices with Resolution Multiplier, from Peter Hutterer - device probing speed increase, from Dmitry Torokhov - ThinkPad 10 Ultrabook Keyboard support, from Hans de Goede - other small assorted fixes and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: quirks: add NOGET quirk for Logitech GROUP HID: Replace HTTP links with HTTPS ones HID: udraw-ps3: Replace HTTP links with HTTPS ones HID: mcp2221: Replace HTTP links with HTTPS ones HID: input: Fix devices that return multiple bytes in battery report HID: lenovo: Fix spurious F23 key press report during resume from suspend HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard fn_lock support HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support HID: lenovo: Rename fn_lock sysfs attr handlers to make them generic HID: lenovo: Factor out generic parts of the LED code HID: lenovo: Merge tpkbd and cptkbd data structures HID: intel-ish-hid: Replace PCI_DEV_FLAGS_NO_D3 with pci_save_state HID: Wiimote: Treat the d-pad as an analogue stick HID: input: do not run GET_REPORT unless there's a Resolution Multiplier HID: usbhid: remove redundant assignment to variable retval HID: usbhid: do not sleep when opening device commit f41ed88cbd6f025f7a683a11a74f901555fba11c Author: Daniel Kolesa Date: Sat Aug 8 22:42:35 2020 +0200 drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal GFP_KERNEL may and will sleep, and this is being executed in a non-preemptible context; this will mess things up since it's called inbetween DC_FP_START/END, and rescheduling will result in the DC_FP_END later being called in a different context (or just crashing if any floating point/vector registers/instructions are used after the call is resumed in a different context). Signed-off-by: Daniel Kolesa Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 79940e4d10df9c737a394630968471c632246ee0 Author: Jaehyun Chung Date: Thu Jul 30 16:31:29 2020 -0400 drm/amd/display: Blank stream before destroying HDCP session [Why] Stream disable sequence incorretly destroys HDCP session while stream is not blanked and while audio is not muted. This sequence causes a flash of corruption during mode change and an audio click. [How] Change sequence to blank stream before destroying HDCP session. Audio will also be muted by blanking the stream. Cc: stable@vger.kernel.org Signed-off-by: Jaehyun Chung Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit b24bdc37d03a0478189e20a50286092840f414fa Author: Stylon Wang Date: Tue Jul 28 15:10:35 2020 +0800 drm/amd/display: Fix EDID parsing after resume from suspend [Why] Resuming from suspend, CEA blocks from EDID are not parsed and no video modes can support YUV420. When this happens, output bpc cannot go over 8-bit with 4K modes on HDMI. [How] In amdgpu_dm_update_connector_after_detect(), drm_add_edid_modes() is called after drm_connector_update_edid_property() to fully parse EDID and update display info. Cc: stable@vger.kernel.org Signed-off-by: Stylon Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit abba907c7a20032c2d504fd5afe3af7d440a09d0 Author: Anthony Koo Date: Wed Jul 29 17:43:10 2020 -0400 drm/amd/display: Switch to immediate mode for updating infopackets [Why] Using FRAME_UPDATE will result in infopacket to be potentially updated one frame late. In commit stream scenarios for previously active stream, some stale infopacket data from previous config might be erroneously sent out on initial frame after stream is re-enabled. [How] Switch to using IMMEDIATE_UPDATE mode Signed-off-by: Anthony Koo Reviewed-by: Ashley Thomas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit e4ed4dbbc8383d42a197da8fe7ca6434b0f14def Author: Anthony Koo Date: Wed Jul 29 17:33:27 2020 -0400 drm/amd/display: Fix LFC multiplier changing erratically [Why] 1. There is a calculation that is using frame_time_in_us instead of last_render_time_in_us to calculate whether choosing an LFC multiplier would cause the inserted frame duration to be outside of range. 2. We do not handle unsigned integer subtraction correctly and it underflows to a really large value, which causes some logic errors. [How] 1. Fix logic to calculate 'within range' using last_render_time_in_us 2. Split out delta_from_mid_point_delta_in_us calculation to ensure we don't underflow and wrap around Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit a49f6727e14caff32419cc3002b9ae9cafb750d7 Author: Aric Cyr Date: Mon Jul 27 21:21:16 2020 -0400 drm/amd/display: Fix incorrect backlight register offset for DCN [Why] Typo in backlight refactor inctroduced wrong register offset. [How] Change DCE to DCN register map for PWRSEQ_REF_DIV Cc: stable@vger.kernel.org Signed-off-by: Aric Cyr Reviewed-by: Ashley Thomas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 97a9b60fa3bf29d29d0fc253a98096c02fb8106e Author: shiwu.zhang Date: Fri Aug 7 16:43:59 2020 +0800 drm/amdgpu: update gc golden register for arcturus Update golden setting to improve performance on HPC and ML apps Signed-off-by: shiwu.zhang Tested-by: gang.long Reviewed-by: guchun.chen Signed-off-by: Alex Deucher commit 2c5b8080d810d98e3e59617680218499b17c84a1 Author: Evan Quan Date: Fri Aug 7 17:01:47 2020 +0800 drm/amd/powerplay: correct UVD/VCE PG state on custom pptable uploading The UVD/VCE PG state is managed by UVD and VCE IP. It's error-prone to assume the bootup state in SMU based on the dpm status. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 266d81d9eed30f4994d76a2b237c63ece062eefe Author: Evan Quan Date: Fri Aug 7 15:03:40 2020 +0800 drm/amd/powerplay: correct Vega20 cached smu feature state Correct the cached smu feature state on pp_features sysfs setting. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d5bbb4761c9ffbe8e3a547b74ec26fb6ce31bf32 Author: Liu ChengZhe Date: Thu Aug 6 14:54:08 2020 +0800 drm/amdgpu: Skip some registers config for SRIOV Some registers are not accessible to virtual function setup, so skip their initialization when in VF-SRIOV mode. v2: move SRIOV VF check into specify functions; modify commit description and comment. Signed-off-by: Liu ChengZhe Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 78484d7c747e30468b35bd5f19edf602f50162a7 Author: Christophe JAILLET Date: Sun Aug 9 22:34:06 2020 +0200 drm: amdgpu: Use the correct size when allocating memory When '*sgt' is allocated, we must allocated 'sizeof(**sgt)' bytes instead of 'sizeof(*sg)'. The sizeof(*sg) is bigger than sizeof(**sgt) so this wastes memory but it won't lead to corruption. Fixes: f44ffd677fb3 ("drm/amdgpu: add support for exporting VRAM using DMA-buf v3") Reviewed-by: Christian König Signed-off-by: Christophe JAILLET Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 51a4cc112c7a42b62a91bcccdfac42e7c4561729 Author: Jens Axboe Date: Mon Aug 10 10:55:56 2020 -0600 io_uring: defer file table grabbing request cleanup for locked requests If we're in the error path failing links and we have a link that has grabbed a reference to the fs_struct, then we cannot safely drop our reference to the table if we already hold the completion lock. This adds a hardirq dependency to the fs_struct->lock, which it currently doesn't have. Defer the final cleanup and free of such requests to avoid adding this dependency. Reported-by: syzbot+ef4b654b49ed7ff049bf@syzkaller.appspotmail.com Signed-off-by: Jens Axboe commit 9b7adba9eaec28e0e4343c96d0dbeb9578802f5f Author: Jens Axboe Date: Mon Aug 10 10:54:02 2020 -0600 io_uring: add missing REQ_F_COMP_LOCKED for nested requests When we traverse into failing links or timeouts, we need to ensure we propagate the REQ_F_COMP_LOCKED flag to ensure that we correctly signal to the completion side that we already hold the completion lock. Signed-off-by: Jens Axboe commit 7271ef3a93a832180068c7aade3f130b7f39b17e Author: Jens Axboe Date: Mon Aug 10 09:55:22 2020 -0600 io_uring: fix recursive completion locking on oveflow flush syszbot reports a scenario where we recurse on the completion lock when flushing an overflow: 1 lock held by syz-executor287/6816: #0: ffff888093cdb4d8 (&ctx->completion_lock){....}-{2:2}, at: io_cqring_overflow_flush+0xc6/0xab0 fs/io_uring.c:1333 stack backtrace: CPU: 1 PID: 6816 Comm: syz-executor287 Not tainted 5.8.0-syzkaller #0 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+0x1f0/0x31e lib/dump_stack.c:118 print_deadlock_bug kernel/locking/lockdep.c:2391 [inline] check_deadlock kernel/locking/lockdep.c:2432 [inline] validate_chain+0x69a4/0x88a0 kernel/locking/lockdep.c:3202 __lock_acquire+0x1161/0x2ab0 kernel/locking/lockdep.c:4426 lock_acquire+0x160/0x730 kernel/locking/lockdep.c:5005 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline] _raw_spin_lock_irq+0x67/0x80 kernel/locking/spinlock.c:167 spin_lock_irq include/linux/spinlock.h:379 [inline] io_queue_linked_timeout fs/io_uring.c:5928 [inline] __io_queue_async_work fs/io_uring.c:1192 [inline] __io_queue_deferred+0x36a/0x790 fs/io_uring.c:1237 io_cqring_overflow_flush+0x774/0xab0 fs/io_uring.c:1359 io_ring_ctx_wait_and_kill+0x2a1/0x570 fs/io_uring.c:7808 io_uring_release+0x59/0x70 fs/io_uring.c:7829 __fput+0x34f/0x7b0 fs/file_table.c:281 task_work_run+0x137/0x1c0 kernel/task_work.c:135 exit_task_work include/linux/task_work.h:25 [inline] do_exit+0x5f3/0x1f20 kernel/exit.c:806 do_group_exit+0x161/0x2d0 kernel/exit.c:903 __do_sys_exit_group+0x13/0x20 kernel/exit.c:914 __se_sys_exit_group+0x10/0x10 kernel/exit.c:912 __x64_sys_exit_group+0x37/0x40 kernel/exit.c:912 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fix this by passing back the link from __io_queue_async_work(), and then let the caller handle the queueing of the link. Take care to also punt the submission reference put to the caller, as we're holding the completion lock for the __io_queue_defer() case. Hence we need to mark the io_kiocb appropriately for that case. Reported-by: syzbot+996f91b6ec3812c48042@syzkaller.appspotmail.com Signed-off-by: Jens Axboe commit 0ba9c9edcd152158a0e321a4c13ac1dfc571ff3d Author: Jens Axboe Date: Thu Aug 6 19:41:50 2020 -0600 io_uring: use TWA_SIGNAL for task_work uncondtionally An earlier commit: b7db41c9e03b ("io_uring: fix regression with always ignoring signals in io_cqring_wait()") ensured that we didn't get stuck waiting for eventfd reads when it's registered with the io_uring ring for event notification, but we still have cases where the task can be waiting on other events in the kernel and need a bigger nudge to make forward progress. Or the task could be in the kernel and running, but on its way to blocking. This means that TWA_RESUME cannot reliably be used to ensure we make progress. Use TWA_SIGNAL unconditionally. Cc: stable@vger.kernel.org # v5.7+ Reported-by: Josef Signed-off-by: Jens Axboe commit b0294f30256bb6023b2044fd607855123863d98f Author: Randy Dunlap Date: Thu Aug 6 20:32:48 2020 -0700 time: Delete repeated words in comments Drop repeated words in kernel/time/. {when, one, into} Signed-off-by: Randy Dunlap Signed-off-by: Thomas Gleixner Acked-by: John Stultz Link: https://lore.kernel.org/r/20200807033248.8452-1-rdunlap@infradead.org commit 444da3f52407d74c9aa12187ac6b01f76ee47d62 Author: Jakub Kicinski Date: Mon Aug 10 11:21:11 2020 -0700 bitfield.h: don't compile-time validate _val in FIELD_FIT When ur_load_imm_any() is inlined into jeq_imm(), it's possible for the compiler to deduce a case where _val can only have the value of -1 at compile time. Specifically, /* struct bpf_insn: _s32 imm */ u64 imm = insn->imm; /* sign extend */ if (imm >> 32) { /* non-zero only if insn->imm is negative */ /* inlined from ur_load_imm_any */ u32 __imm = imm >> 32; /* therefore, always 0xffffffff */ if (__builtin_constant_p(__imm) && __imm > 255) compiletime_assert_XXX() This can result in tripping a BUILD_BUG_ON() in __BF_FIELD_CHECK() that checks that a given value is representable in one byte (interpreted as unsigned). FIELD_FIT() should return true or false at runtime for whether a value can fit for not. Don't break the build over a value that's too large for the mask. We'd prefer to keep the inlining and compiler optimizations though we know this case will always return false. Cc: stable@vger.kernel.org Fixes: 1697599ee301a ("bitfield.h: add FIELD_FIT() helper") Link: https://lore.kernel.org/kernel-hardening/CAK7LNASvb0UDJ0U5wkYYRzTAdnEs64HjXpEUL7d=V0CXiAXcNw@mail.gmail.com/ Reported-by: Masahiro Yamada Debugged-by: Sami Tolvanen Signed-off-by: Jakub Kicinski Signed-off-by: Nick Desaulniers Signed-off-by: David S. Miller commit f19008e676366c44e9241af57f331b6c6edf9552 Author: Jason Baron Date: Mon Aug 10 13:38:39 2020 -0400 tcp: correct read of TFO keys on big endian systems When TFO keys are read back on big endian systems either via the global sysctl interface or via getsockopt() using TCP_FASTOPEN_KEY, the values don't match what was written. For example, on s390x: # echo "1-2-3-4" > /proc/sys/net/ipv4/tcp_fastopen_key # cat /proc/sys/net/ipv4/tcp_fastopen_key 02000000-01000000-04000000-03000000 Instead of: # cat /proc/sys/net/ipv4/tcp_fastopen_key 00000001-00000002-00000003-00000004 Fix this by converting to the correct endianness on read. This was reported by Colin Ian King when running the 'tcp_fastopen_backup_key' net selftest on s390x, which depends on the read value matching what was written. I've confirmed that the test now passes on big and little endian systems. Signed-off-by: Jason Baron Fixes: 438ac88009bc ("net: fastopen: robustness and endianness fixes for SipHash") Cc: Ard Biesheuvel Cc: Eric Dumazet Reported-and-tested-by: Colin Ian King Signed-off-by: David S. Miller commit 56e287b3daa20a95e0756e016362f2e96158e1a3 Author: Jakub Kicinski Date: Mon Aug 10 10:32:04 2020 -0700 nfp: update maintainer I'm not doing much work on the NFP driver any more. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8a7f280f29a80f6e0798f5d6e07c5dd8726620fe Author: Ronak Doshi Date: Mon Aug 10 09:55:55 2020 -0700 vmxnet3: use correct tcp hdr length when packet is encapsulated Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") added support for encapsulation offload. However, while calculating tcp hdr length, it does not take into account if the packet is encapsulated or not. This patch fixes this issue by using correct reference for inner tcp header. Fixes: dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support") Signed-off-by: Ronak Doshi Acked-by: Guolin Yang Signed-off-by: David S. Miller commit 519a8a6cf91dda095be2d36216fc4ebc525270a1 Author: Christoph Hellwig Date: Mon Aug 10 18:42:14 2020 +0200 net: Revert "net: optimize the sockptr_t for unified kernel/user address spaces" This reverts commits 6d04fe15f78acdf8e32329e208552e226f7a8ae6 and a31edb2059ed4e498f9aa8230c734b59d0ad797a. It turns out the idea to share a single pointer for both kernel and user space address causes various kinds of problems. So use the slightly less optimal version that uses an extra bit, but which is guaranteed to be safe everywhere. Fixes: 6d04fe15f78a ("net: optimize the sockptr_t for unified kernel/user address spaces") Reported-by: Eric Dumazet Reported-by: John Stultz Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 8cb61d65b1c8d5bc5b37ebab498ca2f78d264ddb Merge: 0454357faaf8e 60ccb3515fc61 Author: Mark Brown Date: Mon Aug 10 19:55:35 2020 +0100 Merge series "spi: stm32: various driver fixes" from Alain Volmat : This serie is a reduced version of the serie [spi: stm32: various driver enhancements] previously sent. Alain Volmat (1): spi: stm32: always perform registers configuration prior to transfer Amelie Delaunay (3): spi: stm32: fix fifo threshold level in case of short transfer spi: stm32: fix stm32_spi_prepare_mbr in case of odd clk_rate spi: stm32: fixes suspend/resume management Antonio Borneo (1): spi: stm32h7: fix race condition at end of transfer drivers/spi/spi-stm32.c | 98 ++++++++++++++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 37 deletions(-) -- v2: fix conditional statement within [spi: stm32: fix fifo threshold level in case of short transfer] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 0454357faaf8eea07af4f01a9e7afde175377b41 Author: Geert Uytterhoeven Date: Fri Aug 7 14:10:57 2020 +0200 dt-bindings: lpspi: Add missing boolean type for fsl,spi-only-use-cs1-sel When running "make dt_binding_check" (even if restricted to an unrelated binding document using DT_SCHEMA_FILES=...): Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml: ignoring, error in schema: properties: fsl,spi-only-use-cs1-sel warning: no schema found in file: Documentation/devicetree/bindings/spi/spi-fsl-lpspi.yaml Fix this by adding a proper type definition for the vendor-specific fsl,spi-only-use-cs1-sel property. Fixes: 7ac9bbf6ab3085c2 ("dt-bindings: lpspi: New property in document DT bindings for LPSPI") Suggested-by: Rob Herring Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200807121057.14204-1-geert+renesas@glider.be Signed-off-by: Mark Brown commit 60ccb3515fc61a0124c70aa37317f75b67560024 Author: Alain Volmat Date: Mon Aug 10 09:12:38 2020 +0200 spi: stm32: always perform registers configuration prior to transfer SPI registers content may have been lost upon suspend/resume sequence. So, always compute and apply the necessary configuration in stm32_spi_transfer_one_setup routine. Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/1597043558-29668-6-git-send-email-alain.volmat@st.com Signed-off-by: Mark Brown commit db96bf976a4fc65439be0b4524c0d41427d98814 Author: Amelie Delaunay Date: Mon Aug 10 09:12:37 2020 +0200 spi: stm32: fixes suspend/resume management This patch adds pinctrl power management, and reconfigure spi controller in case of resume. Fixes: 038ac869c9d2 ("spi: stm32: add runtime PM support") Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/1597043558-29668-5-git-send-email-alain.volmat@st.com Signed-off-by: Mark Brown commit 9cc61973bf9385b19ff5dda4a2a7e265fcba85e4 Author: Amelie Delaunay Date: Mon Aug 10 09:12:36 2020 +0200 spi: stm32: fix stm32_spi_prepare_mbr in case of odd clk_rate Fix spi->clk_rate when it is odd to the nearest lowest even value because minimum SPI divider is 2. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/1597043558-29668-4-git-send-email-alain.volmat@st.com Signed-off-by: Mark Brown commit 3373e9004acc0603242622b4378c64bc01d21b5f Author: Amelie Delaunay Date: Mon Aug 10 09:12:35 2020 +0200 spi: stm32: fix fifo threshold level in case of short transfer When transfer is shorter than half of the fifo, set the data packet size up to transfer size instead of up to half of the fifo. Check also that threshold is set at least to 1 data frame. Signed-off-by: Amelie Delaunay Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/1597043558-29668-3-git-send-email-alain.volmat@st.com Signed-off-by: Mark Brown commit 135dd873d3c76d812ae64c668adef3f2c59ed27f Author: Antonio Borneo Date: Mon Aug 10 09:12:34 2020 +0200 spi: stm32h7: fix race condition at end of transfer The caller of stm32_spi_transfer_one(), spi_transfer_one_message(), is waiting for us to call spi_finalize_current_transfer() and will eventually schedule a new transfer, if available. We should guarantee that the spi controller is really available before calling spi_finalize_current_transfer(). Move the call to spi_finalize_current_transfer() _after_ the call to stm32_spi_disable(). Signed-off-by: Antonio Borneo Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/1597043558-29668-2-git-send-email-alain.volmat@st.com Signed-off-by: Mark Brown commit ff131efff141fc679cccde28bc265f4c79cbe329 Author: Colin Ian King Date: Mon Aug 10 11:07:50 2020 +0100 ktest.pl: Fix spelling mistake "Cant" -> "Can't" There is a spelling mistake in an error message. Fix it. Link: https://lkml.kernel.org/r/20200810100750.61475-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Steven Rostedt (VMware) commit 855d8abd2e8ff6d17c0b0a76be52fcd80bb6d886 Author: Steven Rostedt (VMware) Date: Thu Jul 2 09:56:15 2020 -0400 ktest.pl: Change the logic to control the size of the log file emailed If the log file for a given test is larger than the max size given then use set the seek from the end of the log file instead of from the start of the test. Signed-off-by: Steven Rostedt (VMware) commit 09dad81e0f1701ea26babe2442a1478d6ad447d3 Author: Colin Ian King Date: Mon Aug 10 10:39:31 2020 +0100 regulator: fix spelling mistake "Cant" -> "Can't" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200810093931.50624-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 709ed1bcef12398ac1a35c149f3e582db04456c2 Author: Jason Baron Date: Thu Jul 16 14:25:11 2020 -0400 EDAC/ie31200: Fallback if host bridge device is already initialized The Intel uncore driver may claim some of the pci ids from ie31200 which means that the ie31200 edac driver will not initialize them as part of pci_register_driver(). Let's add a fallback for this case to 'pci_get_device()' to get a reference on the device such that it can still be configured. This is similar in approach to other edac drivers. Signed-off-by: Jason Baron Cc: Borislav Petkov Cc: Mauro Carvalho Chehab Cc: linux-edac Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/1594923911-10885-1-git-send-email-jbaron@akamai.com commit 62ab2cc04ddc5dfab4e382ae167734fc111da5ed Author: Qu Wenruo Date: Mon Aug 3 14:20:11 2020 +0800 btrfs: sysfs: fix NULL pointer dereference at btrfs_sysfs_del_qgroups() [BUG] Unmounting a btrfs filesystem with quota disabled will cause the following NULL pointer dereference: BTRFS info (device dm-5): has skinny extents BUG: kernel NULL pointer dereference, address: 0000000000000018 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page CPU: 7 PID: 637 Comm: umount Not tainted 5.8.0-rc7-next-20200731-custom #76 RIP: 0010:kobject_del+0x6/0x20 Call Trace: btrfs_sysfs_del_qgroups+0xac/0xf0 [btrfs] btrfs_free_qgroup_config+0x63/0x70 [btrfs] close_ctree+0x1f5/0x323 [btrfs] btrfs_put_super+0x15/0x17 [btrfs] generic_shutdown_super+0x72/0x110 kill_anon_super+0x18/0x30 btrfs_kill_super+0x17/0x30 [btrfs] deactivate_locked_super+0x3b/0xa0 deactivate_super+0x40/0x50 cleanup_mnt+0x135/0x190 __cleanup_mnt+0x12/0x20 task_work_run+0x64/0xb0 exit_to_user_mode_prepare+0x18a/0x190 syscall_exit_to_user_mode+0x4f/0x270 do_syscall_64+0x45/0x50 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ---[ end trace 37b7adca5c1d5c5d ]--- [CAUSE] Commit 079ad2fb4bf9 ("kobject: Avoid premature parent object freeing in kobject_cleanup()") changed kobject_del() that it no longer accepts NULL pointer. Before that commit, kobject_del() and kobject_put() all accept NULL pointers and just ignore such NULL pointers. But that mentioned commit needs to access the parent node, killing the old NULL pointer behavior. Unfortunately btrfs is relying on that hidden feature thus we will trigger such NULL pointer dereference. [FIX] Instead of just saving several lines, do proper fs_info->qgroups_kobj check before calling kobject_del() and kobject_put(). Reviewed-by: Nikolay Borisov Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit c15c2ec07a26b251040943a1a9f90d3037f041e5 Author: Boleyn Su Date: Thu Aug 6 15:31:44 2020 +0900 btrfs: check correct variable after allocation in btrfs_backref_iter_alloc The `if (!ret)` check will always be false and it may result in ret->path being dereferenced while it is a NULL pointer. Fixes: a37f232b7b65 ("btrfs: backref: introduce the skeleton of btrfs_backref_iter") CC: stable@vger.kernel.org # 5.8+ Reviewed-by: Nikolay Borisov Reviewed-by: Qu Wenruo Signed-off-by: Boleyn Su Reviewed-by: David Sterba Signed-off-by: David Sterba commit ea7dc097826b06a9746a2e74c2d6e78d35c98088 Author: Ravulapati Vishnu vardhan rao Date: Fri Aug 7 21:40:17 2020 +0530 ASoC: amd: Replacing component->name with codec_dai->name. Replacing string compare with "codec_dai->name" instead of comparing with "codec_dai->component->name" in hw_params because, Here the component name for codec RT1015 is "i2c-10EC5682:00" and will never be "rt1015-aif1" as it is codec-dai->name. So, strcmp() always compares and fails to set the sysclk,pll,bratio for expected codec-dai="rt1015-aif1". Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/20200807161046.17932-1-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 99b48ecc8e800983b6e00a2350daaeceba1f7406 Author: Jon Doron Date: Fri Jul 17 15:52:38 2020 +0300 x86/kvm/hyper-v: Synic default SCONTROL MSR needs to be enabled Based on an analysis of the HyperV firmwares (Gen1 and Gen2) it seems like the SCONTROL is not being set to the ENABLED state as like we have thought. Also from a test done by Vitaly Kuznetsov, running a nested HyperV it was concluded that the first access to the SCONTROL MSR with a read resulted with the value of 0x1, aka HV_SYNIC_CONTROL_ENABLE. It's important to note that this diverges from the value states in the HyperV TLFS of 0. Signed-off-by: Jon Doron Message-Id: <20200717125238.1103096-2-arilou@gmail.com> Signed-off-by: Paolo Bonzini commit 30b5ae21b9a51be4366e8ba8bf5b7bf7eb298ea3 Author: Miaohe Lin Date: Sat Aug 8 16:36:37 2020 +0800 cifs: Convert to use the fallthrough macro Convert the uses of fallthrough comments to fallthrough macro. Signed-off-by: Hongxiang Lou Signed-off-by: Miaohe Lin Signed-off-by: Steve French commit faa008899a4db21a2df99833cb4ff6fa67009a20 Author: Josef Bacik Date: Thu Jul 30 11:18:09 2020 -0400 btrfs: make sure SB_I_VERSION doesn't get unset by remount There's some inconsistency around SB_I_VERSION handling with mount and remount. Since we don't really want it to be off ever just work around this by making sure we don't get the flag cleared on remount. There's a tiny cpu cost of setting the bit, otherwise all changes to i_version also change some of the times (ctime/mtime) so the inode needs to be synced. We wouldn't save anything by disabling it. Reported-by: Eric Sandeen CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add perf impact analysis ] Signed-off-by: David Sterba commit 4f26433e9b3eb7a55ed70d8f882ae9cd48ba448b Author: Filipe Manana Date: Wed Jul 29 10:17:50 2020 +0100 btrfs: fix memory leaks after failure to lookup checksums during inode logging While logging an inode, at copy_items(), if we fail to lookup the checksums for an extent we release the destination path, free the ins_data array and then return immediately. However a previous iteration of the for loop may have added checksums to the ordered_sums list, in which case we leak the memory used by them. So fix this by making sure we iterate the ordered_sums list and free all its checksums before returning. Fixes: 3650860b90cc2a ("Btrfs: remove almost all of the BUG()'s from tree-log.c") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3ef3959b29c4a5bd65526ab310a1a18ae533172a Author: Josef Bacik Date: Wed Jul 22 11:12:46 2020 -0400 btrfs: don't show full path of bind mounts in subvol= Chris Murphy reported a problem where rpm ostree will bind mount a bunch of things for whatever voodoo it's doing. But when it does this /proc/mounts shows something like /dev/sda /mnt/test btrfs rw,relatime,subvolid=256,subvol=/foo 0 0 /dev/sda /mnt/test/baz btrfs rw,relatime,subvolid=256,subvol=/foo/bar 0 0 Despite subvolid=256 being subvol=/foo. This is because we're just spitting out the dentry of the mount point, which in the case of bind mounts is the source path for the mountpoint. Instead we should spit out the path to the actual subvol. Fix this by looking up the name for the subvolid we have mounted. With this fix the same test looks like this /dev/sda /mnt/test btrfs rw,relatime,subvolid=256,subvol=/foo 0 0 /dev/sda /mnt/test/baz btrfs rw,relatime,subvolid=256,subvol=/foo 0 0 Reported-by: Chris Murphy CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 27942c9971cc405c60432eca9395e514a2ae9f5e Author: David Sterba Date: Thu Jul 23 19:08:55 2020 +0200 btrfs: fix messages after changing compression level by remount Reported by Forza on IRC that remounting with compression options does not reflect the change in level, or at least it does not appear to do so according to the messages: mount -o compress=zstd:1 /dev/sda /mnt mount -o remount,compress=zstd:15 /mnt does not print the change to the level to syslog: [ 41.366060] BTRFS info (device vda): use zstd compression, level 1 [ 41.368254] BTRFS info (device vda): disk space caching is enabled [ 41.390429] BTRFS info (device vda): disk space caching is enabled What really happens is that the message is lost but the level is actualy changed. There's another weird output, if compression is reset to 'no': [ 45.413776] BTRFS info (device vda): use no compression, level 4 To fix that, save the previous compression level and print the message in that case too and use separate message for 'no' compression. CC: stable@vger.kernel.org # 4.19+ Signed-off-by: David Sterba commit bf53d4687b8f3f6b752f091eb85f62369a515dfd Author: Josef Bacik Date: Mon Jul 27 10:28:05 2020 -0400 btrfs: only search for left_info if there is no right_info in try_merge_free_space In try_to_merge_free_space we attempt to find entries to the left and right of the entry we are adding to see if they can be merged. We search for an entry past our current info (saved into right_info), and then if right_info exists and it has a rb_prev() we save the rb_prev() into left_info. However there's a slight problem in the case that we have a right_info, but no entry previous to that entry. At that point we will search for an entry just before the info we're attempting to insert. This will simply find right_info again, and assign it to left_info, making them both the same pointer. Now if right_info _can_ be merged with the range we're inserting, we'll add it to the info and free right_info. However further down we'll access left_info, which was right_info, and thus get a use-after-free. Fix this by only searching for the left entry if we don't find a right entry at all. The CVE referenced had a specially crafted file system that could trigger this use-after-free. However with the tree checker improvements we no longer trigger the conditions for the UAF. But the original conditions still apply, hence this fix. Reference: CVE-2019-19448 Fixes: 963030817060 ("Btrfs: use hybrid extents+bitmap rb tree for free space") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 1e6e238c3002ea3611465ce5f32777ddd6a40126 Author: Qu Wenruo Date: Tue Jul 28 16:39:26 2020 +0800 btrfs: inode: fix NULL pointer dereference if inode doesn't need compression [BUG] There is a bug report of NULL pointer dereference caused in compress_file_extent(): Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries Workqueue: btrfs-delalloc btrfs_delalloc_helper [btrfs] NIP [c008000006dd4d34] compress_file_range.constprop.41+0x75c/0x8a0 [btrfs] LR [c008000006dd4d1c] compress_file_range.constprop.41+0x744/0x8a0 [btrfs] Call Trace: [c000000c69093b00] [c008000006dd4d1c] compress_file_range.constprop.41+0x744/0x8a0 [btrfs] (unreliable) [c000000c69093bd0] [c008000006dd4ebc] async_cow_start+0x44/0xa0 [btrfs] [c000000c69093c10] [c008000006e14824] normal_work_helper+0xdc/0x598 [btrfs] [c000000c69093c80] [c0000000001608c0] process_one_work+0x2c0/0x5b0 [c000000c69093d10] [c000000000160c38] worker_thread+0x88/0x660 [c000000c69093db0] [c00000000016b55c] kthread+0x1ac/0x1c0 [c000000c69093e20] [c00000000000b660] ret_from_kernel_thread+0x5c/0x7c ---[ end trace f16954aa20d822f6 ]--- [CAUSE] For the following execution route of compress_file_range(), it's possible to hit NULL pointer dereference: compress_file_extent() |- pages = NULL; |- start = async_chunk->start = 0; |- end = async_chunk = 4095; |- nr_pages = 1; |- inode_need_compress() == false; <<< Possible, see later explanation | Now, we have nr_pages = 1, pages = NULL |- cont: |- ret = cow_file_range_inline(); |- if (ret <= 0) { |- for (i = 0; i < nr_pages; i++) { |- WARN_ON(pages[i]->mapping); <<< Crash To enter above call execution branch, we need the following race: Thread 1 (chattr) | Thread 2 (writeback) --------------------------+------------------------------ | btrfs_run_delalloc_range | |- inode_need_compress = true | |- cow_file_range_async() btrfs_ioctl_set_flag() | |- binode_flags |= | BTRFS_INODE_NOCOMPRESS | | compress_file_range() | |- inode_need_compress = false | |- nr_page = 1 while pages = NULL | | Then hit the crash [FIX] This patch will fix it by checking @pages before doing accessing it. This patch is only designed as a hot fix and easy to backport. More elegant fix may make btrfs only check inode_need_compress() once to avoid such race, but that would be another story. Reported-by: Luciano Chavez Fixes: 4d3a800ebb12 ("btrfs: merge nr_pages input and output parameter in compress_pages") CC: stable@vger.kernel.org # 4.14.x: cecc8d9038d16: btrfs: Move free_pages_out label in inline extent handling branch in compress_file_range CC: stable@vger.kernel.org # 4.14+ Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 8a7c3213db068135e816a6a517157de6443290d6 Author: Michael S. Tsirkin Date: Mon Aug 10 09:13:10 2020 -0400 vdpa/mlx5: fix up endian-ness for mtu VDPA mlx5 accesses config space as native endian - this is wrong since it's a modern device and actually uses LE. It only supports modern guests so we could punt and just force LE, but let's use the full virtio APIs since people tend to copy/paste code, and this is not data path anyway. Signed-off-by: Michael S. Tsirkin commit cf16fe9243bfa2863491026fc727618c7c593c84 Author: Dan Carpenter Date: Mon Apr 6 17:45:52 2020 +0300 vdpa: Fix pointer math bug in vdpasim_get_config() If "offset" is non-zero then we end up copying from beyond the end of the config because of pointer math. We can fix this by casting the struct to a u8 pointer. Fixes: 2c53d0f64c06 ("vdpasim: vDPA device simulator") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200406144552.GF68494@mwanda Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 3df14264ad9930733a8166e5bd0eccc1727564bb Author: Christophe Leroy Date: Mon Aug 10 08:48:22 2020 +0000 recordmcount: Fix build failure on non arm64 Commit ea0eada45632 leads to the following build failure on powerpc: HOSTCC scripts/recordmcount scripts/recordmcount.c: In function 'arm64_is_fake_mcount': scripts/recordmcount.c:440: error: 'R_AARCH64_CALL26' undeclared (first use in this function) scripts/recordmcount.c:440: error: (Each undeclared identifier is reported only once scripts/recordmcount.c:440: error: for each function it appears in.) make[2]: *** [scripts/recordmcount] Error 1 Make sure R_AARCH64_CALL26 is always defined. Fixes: ea0eada45632 ("recordmcount: only record relocation of type R_AARCH64_CALL26 on arm64.") Signed-off-by: Christophe Leroy Acked-by: Steven Rostedt (VMware) Acked-by: Gregory Herrero Cc: Gregory Herrero Link: https://lore.kernel.org/r/5ca1be21fa6ebf73203b45fd9aadd2bafb5e6b15.1597049145.git.christophe.leroy@csgroup.eu Signed-off-by: Catalin Marinas commit 34dedd2a83b241ba6aeb290260313c65dc58660e Author: Kai-Heng Feng Date: Mon Aug 10 21:31:06 2020 +0800 ALSA: usb-audio: Disable Lenovo P620 Rear line-in volume control The USB device (0x17aa:0x1046) that support Lenovo P620 rear panel line-in claim to support volume control, but it doens't seem to have an AMP, so when line-in volume lowers below 80, nothing gets recorded anymore. Disable the volume control to workaround the issue. Fixes: f8c11eb7da4a ("ALSA: usb-audio: Add support for Lenovo ThinkStation P620") Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200810133108.31580-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 82c8eb22095fa747517845e7d5748ae2e4967359 Author: Vaibhav Gupta Date: Thu Aug 6 01:06:16 2020 +0530 i2c: eg20t: use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Reviewed-by: Bjorn Helgaas Signed-off-by: Wolfram Sang commit 536e785f533f5a65ce5238e202d527d70fd4ab17 Author: Vaibhav Gupta Date: Thu Aug 6 01:06:15 2020 +0530 i2c: eg20t: Drop PCI wakeup calls from .suspend/.resume The driver calls pci_enable_wake(...., false) in pch_i2c_suspend() as well as pch_i2c_resume(). Either it should enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from .suspend() and .resume(). Reported-by: Bjorn Helgaas Signed-off-by: Vaibhav Gupta Reviewed-by: Bjorn Helgaas Signed-off-by: Wolfram Sang commit 6553fb799f601497ca0703682e2aff131197dc5c Author: Aneesh Kumar K.V Date: Mon Aug 10 15:56:23 2020 +0530 powerpc/pkeys: Fix boot failures with Nemo board (A-EON AmigaOne X1000) On p6 and before we should avoid updating UAMOR SPRN. This resulted in boot failure on Nemo board. Fixes: 269e829f48a0 ("powerpc/book3s64/pkey: Disable pkey on POWER6 and before") Reported-by: Christian Zigotzky Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200810102623.685083-1-aneesh.kumar@linux.ibm.com commit 2874211fcdb751e2962d68cdb9783fa1ff8eb340 Author: Dan Carpenter Date: Sat Aug 8 12:32:41 2020 +0300 vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config() There is a pointer math bug here so if "offset" is non-zero then this will copy memory from beyond the end of the array. Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200808093241.GB115053@mwanda Signed-off-by: Michael S. Tsirkin Acked-by: Eli Cohen Cc: Jason Wang ; Parav Pandit ; virtualization@lists.linux-foundation.org; linux-kernel@vger.kernel.org; kernel-janitors@vger.kernel.org Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Dan Carpenter commit f31231bf26a523de8aad4488643a98174c0d6bb2 Author: Colin Ian King Date: Thu Aug 6 17:08:28 2020 +0100 vdpa/mlx5: fix memory allocation failure checks The memory allocation failure checking for in and out is currently checking if the pointers are valid rather than the contents of what they point to. Hence the null check on failed memory allocations is incorrect. Fix this by adding the missing indirection in the check. Also for the default case, just set the *in and *out to null as these don't have any thing allocated to kfree. Finally remove the redundant *in and *out check as these have been already done on each allocation in the case statement. Addresses-Coverity: ("Null pointer dereference") Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200806160828.90463-1-colin.king@canonical.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Acked-by: Eli Cohen commit 05acc4beb24c7e5ed3ae20a3d3ab2b29b40cb385 Author: Alex Dewar Date: Thu Aug 6 19:56:15 2020 +0100 vdpa/mlx5: Fix uninitialised variable in core/mr.c If the kernel is unable to allocate memory for the variable dmr then err will be returned without being set. Set err to -ENOMEM in this case. Fixes: 94abbccdf291 ("vdpa/mlx5: Add shared memory registration code") Addresses-Coverity: ("Uninitialized variables") Signed-off-by: Alex Dewar Link: https://lore.kernel.org/r/20200806185625.67344-1-alex.dewar@gmx.co.uk Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Acked-by: Eli Cohen commit 1e3e792650d2c0df8dd796906275b7c79e278664 Author: Michael S. Tsirkin Date: Mon Aug 10 08:44:43 2020 -0400 vdpa_sim: init iommu lock The patch adding the iommu lock did not initialize it. The struct is zero-initialized so this is mostly a problem when using lockdep. Reported-by: kernel test robot Cc: Max Gurtovoy Fixes: 0ea9ee430e74 ("vdpasim: protect concurrent access to iommu iotlb") Signed-off-by: Michael S. Tsirkin commit 2f941622fd88328ca75806c45c9e9709286a0609 Author: Florian Westphal Date: Sun Aug 9 20:28:01 2020 +0200 netfilter: nft_compat: remove flush counter optimization WARNING: CPU: 1 PID: 16059 at lib/refcount.c:31 refcount_warn_saturate+0xdf/0xf [..] __nft_mt_tg_destroy+0x42/0x50 [nft_compat] nft_target_destroy+0x63/0x80 [nft_compat] nf_tables_expr_destroy+0x1b/0x30 [nf_tables] nf_tables_rule_destroy+0x3a/0x70 [nf_tables] nf_tables_exit_net+0x186/0x3d0 [nf_tables] Happens when a compat expr is destoyed from abort path. There is no functional impact; after this work queue is flushed unconditionally if its pending. This removes the waitcount optimization. Test of repeated iptables-restore of a ~60k kubernetes ruleset doesn't indicate a slowdown. In case the counter is needed after all for some workloads we can revert this and increment the refcount for the != NFT_PREPARE_TRANS case to avoid the increment/decrement imbalance. While at it, also flush for match case, this was an oversight in the original patch. Fixes: ffe8923f109b7e ("netfilter: nft_compat: make sure xtables destructors have run") Reported-by: kernel test robot Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit b428336676dbca363262cc134b6218205df4f530 Author: Stephen Suryaputra Date: Tue Aug 4 17:44:09 2020 -0400 netfilter: nf_tables: nft_exthdr: the presence return value should be little-endian On big-endian machine, the returned register data when the exthdr is present is not being compared correctly because little-endian is assumed. The function nft_cmp_fast_mask(), called by nft_cmp_fast_eval() and nft_cmp_fast_init(), calls cpu_to_le32(). The following dump also shows that little endian is assumed: $ nft --debug=netlink add rule ip recordroute forward ip option rr exists counter ip [ exthdr load ipv4 1b @ 7 + 0 present => reg 1 ] [ cmp eq reg 1 0x01000000 ] [ counter pkts 0 bytes 0 ] Lastly, debug print in nft_cmp_fast_init() and nft_cmp_fast_eval() when RR option exists in the packet shows that the comparison fails because the assumption: nft_cmp_fast_init:189 priv->sreg=4 desc.len=8 mask=0xff000000 data.data[0]=0x10003e0 nft_cmp_fast_eval:57 regs->data[priv->sreg=4]=0x1 mask=0xff000000 priv->data=0x1000000 v2: use nft_reg_store8() instead (Florian Westphal). Also to avoid the warnings reported by kernel test robot. Fixes: dbb5281a1f84 ("netfilter: nf_tables: add support for matching IPv4 options") Fixes: c078ca3b0c5b ("netfilter: nft_exthdr: Add support for existence check") Signed-off-by: Stephen Suryaputra Signed-off-by: Pablo Neira Ayuso commit 6e8596172ee1cd46ec0bfd5adcf4ff86371478b6 Author: Hector Martin Date: Mon Aug 10 17:25:02 2020 +0900 ALSA: usb-audio: add quirk for Pioneer DDJ-RB This is just another Pioneer device with fixed endpoints. Input is dummy but used as feedback (it always returns silence). Cc: stable@vger.kernel.org Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20200810082502.225979-1-marcan@marcan.st Signed-off-by: Takashi Iwai commit 1b7ecc241a67ad6b584e071bd791a54e0cd5f097 Author: Hector Martin Date: Mon Aug 10 17:24:00 2020 +0900 ALSA: usb-audio: work around streaming quirk for MacroSilicon MS2109 Further investigation of the L-R swap problem on the MS2109 reveals that the problem isn't that the channels are swapped, but rather that they are swapped and also out of phase by one sample. In other words, the issue is actually that the very first frame that comes from the hardware is a half-frame containing only the right channel, and after that everything becomes offset. So introduce a new quirk field to drop the very first 2 bytes that come in after the format is configured and a capture stream starts. This puts the channels in phase and in the correct order. Cc: stable@vger.kernel.org Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20200810082400.225858-1-marcan@marcan.st Signed-off-by: Takashi Iwai commit b0102a890f17e965cc43283cb04218c03f85c6ff Author: Matthias Brugger Date: Fri Aug 7 15:19:04 2020 +0200 i2c: mediatek: Fix i2c_spec_values description The struct i2c_spec_values have it's members documented but is missing the starting '@', which leads to warings like: drivers/i2c/busses/i2c-mt65xx.c:267: warning: Function parameter or member 'min_low_ns' not described in 'i2c_spec_values' We also delete min_high_ns member as it is not used in the code. Signed-off-by: Matthias Brugger Reviewed-by: Qii Wang Signed-off-by: Wolfram Sang commit e6b6e19a4be74fb3b96f66d478ed69a088e4d11c Merge: ccac9cec9086d a8cbf80e9fb17 Author: Jiri Kosina Date: Mon Aug 10 11:23:07 2020 +0200 Merge branch 'for-5.9/wiimote' into for-linus commit ccac9cec9086d4d1febcc2e82e886a4302598131 Merge: cd6cad553bab9 49429428381b1 Author: Jiri Kosina Date: Mon Aug 10 11:22:21 2020 +0200 Merge branch 'for-5.9/lenovo' into for-linus - ThinkPad 10 Ultrabook Keyboard support, from Hans de Goede commit cd6cad553bab964241b4e1e50e33a4df45b23943 Merge: a66eebd702616 7e341061ddd92 Author: Jiri Kosina Date: Mon Aug 10 11:21:59 2020 +0200 Merge branch 'for-5.9/intel-ish' into for-linus commit a66eebd702616850b8b48e72ed4391a2dc0caccc Merge: 68f775ddd2a6f 4f57cace81438 Author: Jiri Kosina Date: Mon Aug 10 11:19:41 2020 +0200 Merge branch 'for-5.9/core-v2' into for-linus - fix for some modern devices that return multi-byte battery report, from Grant Likely - fix for devices with Resolution Multiplier, from Peter Hutterer - device probing speed increase, from Dmitry Torokhov commit f40a4b0512839d07be0b03dd4097de5582fa136d Author: Jiaxun Yang Date: Mon Aug 10 09:17:49 2020 +0800 MIPS: KVM: Convert a fallthrough comment to fallthrough There is a fallthrough comment being forgotten, GCC complains about it: arch/mips/kvm/emulate.c: In function kvm_mips_emulate_load: arch/mips/kvm/emulate.c:1936:21: error: this statement may fall through 1936 | vcpu->mmio_needed = 1; /* unsigned */ | ~~~~~~~~~~~~~~~~~~^~~ arch/mips/kvm/emulate.c:1939:2: note: here 1939 | case lw_op: Just fix it. Signed-off-by: Jiaxun Yang Reviewed-by: Huacai Chen Message-Id: <20200810011749.3211128-1-jiaxun.yang@flygoat.com> Signed-off-by: Paolo Bonzini commit 386a6539992b82fe9ac4f9dc3f548956fd894d8c Author: Hui Wang Date: Mon Aug 10 10:16:59 2020 +0800 ALSA: hda - fix the micmute led status for Lenovo ThinkCentre AIO After installing the Ubuntu Linux, the micmute led status is not correct. Users expect that the led is on if the capture is disabled, but with the current kernel, the led is off with the capture disabled. We tried the old linux kernel like linux-4.15, there is no this issue. It looks like we introduced this issue when switching to the led_cdev. Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20200810021659.7429-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 14a720dc1f5332f3bdf30a23a3bc549e81be974c Author: Hector Martin Date: Mon Aug 10 13:53:19 2020 +0900 ALSA: usb-audio: fix overeager device match for MacroSilicon MS2109 Matching by device matches all interfaces, which breaks the video/HID portions of the device depending on module load order. Fixes: e337bf19f6af ("ALSA: usb-audio: add quirk for MacroSilicon MS2109") Cc: stable@vger.kernel.org Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20200810045319.128745-1-marcan@marcan.st Signed-off-by: Takashi Iwai commit fc80c51fd4b23ec007e88d4c688f2cac1b8648e7 Merge: 7a6b60441f02f 132305b3b474a Author: Linus Torvalds Date: Sun Aug 9 14:10:26 2020 -0700 Merge tag 'kbuild-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - run the checker (e.g. sparse) after the compiler - remove unneeded cc-option tests for old compiler flags - fix tar-pkg to install dtbs - introduce ccflags-remove-y and asflags-remove-y syntax - allow to trace functions in sub-directories of lib/ - introduce hostprogs-always-y and userprogs-always-y syntax - various Makefile cleanups * tag 'kbuild-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: stop filtering out $(GCC_PLUGINS_CFLAGS) from cc-option base kbuild: include scripts/Makefile.* only when relevant CONFIG is enabled kbuild: introduce hostprogs-always-y and userprogs-always-y kbuild: sort hostprogs before passing it to ifneq kbuild: move host .so build rules to scripts/gcc-plugins/Makefile kbuild: Replace HTTP links with HTTPS ones kbuild: trace functions in subdirectories of lib/ kbuild: introduce ccflags-remove-y and asflags-remove-y kbuild: do not export LDFLAGS_vmlinux kbuild: always create directories of targets powerpc/boot: add DTB to 'targets' kbuild: buildtar: add dtbs support kbuild: remove cc-option test of -ffreestanding kbuild: remove cc-option test of -fno-stack-protector Revert "kbuild: Create directory for target DTB" kbuild: run the checker after the compiler commit 7a6b60441f02f6e22e7c0936ef16fa3f51832a48 Merge: 8d3e09b433129 b297fed699ad9 Author: Linus Torvalds Date: Sun Aug 9 13:58:04 2020 -0700 Merge tag 'nfsd-5.9' of git://git.linux-nfs.org/projects/cel/cel-2.6 Pull NFS server updates from Chuck Lever: "Highlights: - Support for user extended attributes on NFS (RFC 8276) - Further reduce unnecessary NFSv4 delegation recalls Notable fixes: - Fix recent krb5p regression - Address a few resource leaks and a rare NULL dereference Other: - De-duplicate RPC/RDMA error handling and other utility functions - Replace storage and display of kernel memory addresses by tracepoints" * tag 'nfsd-5.9' of git://git.linux-nfs.org/projects/cel/cel-2.6: (38 commits) svcrdma: CM event handler clean up svcrdma: Remove transport reference counting svcrdma: Fix another Receive buffer leak SUNRPC: Refresh the show_rqstp_flags() macro nfsd: netns.h: delete a duplicated word SUNRPC: Fix ("SUNRPC: Add "@len" parameter to gss_unwrap()") nfsd: avoid a NULL dereference in __cld_pipe_upcall() nfsd4: a client's own opens needn't prevent delegations nfsd: Use seq_putc() in two functions svcrdma: Display chunk completion ID when posting a rw_ctxt svcrdma: Record send_ctxt completion ID in trace_svcrdma_post_send() svcrdma: Introduce Send completion IDs svcrdma: Record Receive completion ID in svc_rdma_decode_rqst svcrdma: Introduce Receive completion IDs svcrdma: Introduce infrastructure to support completion IDs svcrdma: Add common XDR encoders for RDMA and Read segments svcrdma: Add common XDR decoders for RDMA and Read segments SUNRPC: Add helpers for decoding list discriminators symbolically svcrdma: Remove declarations for functions long removed svcrdma: Clean up trace_svcrdma_send_failed() tracepoint ... commit 8d3e09b43312991c503478bf0f5f99e92c23ccf1 Merge: 9420f1ce01869 bb1a773d5b6bf Author: Linus Torvalds Date: Sun Aug 9 13:33:54 2020 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull regset conversion fix from Al Viro: "Fix a regression from an unnoticed bisect hazard in the regset series. A bunch of old (aout, originally) primitives used by coredumps became dead code after fdpic conversion to regsets. Removal of that dead code had been the first commit in the followups to regset series; unfortunately, it happened to hide the bisect hazard on sh (extern for fpregs_get() had not been updated in the main series when it should have been; followup simply made fpregs_get() static). And without that followup commit this bisect hazard became breakage in the mainline" Tested-by: John Paul Adrian Glaubitz * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: kill unused dump_fpu() instances commit 9420f1ce01869409d78901c3e036b2c437cbc6b8 Merge: dec1fbbc1d7c4 7ee193e2dda3f Author: Linus Torvalds Date: Sun Aug 9 12:52:28 2020 -0700 Merge tag 'pinctrl-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This is the bulk of the pin control changes for the v5.9 kernel series: Core changes: - The GPIO patch "gpiolib: Introduce for_each_requested_gpio_in_range() macro" was put in an immutable branch and merged into the pinctrl tree as well. We see these changes also here. - Improved debug output for pins used as GPIO. New drivers: - Ocelot Sparx5 SoC driver. - Intel Emmitsburg SoC subdriver. - Intel Tiger Lake-H SoC subdriver. - Qualcomm PM660 SoC subdriver. - Renesas SH-PFC R8A774E1 subdriver. Driver improvements: - Linear improvement and cleanups of the Intel drivers for Cherryview, Lynxpoint, Baytrail etc. Improved locking among other things. - Renesas SH-PFC has added support for RPC pins, groups, and functions to r8a77970 and r8a77980. - The newere Freescale (now NXP) i.MX8 pin controllers have been modularized. This is driven by the Google Android GKI initiative I think. - Open drain support for pins on the Qualcomm IPQ4019. - The Ingenic driver can handle both edges IRQ detection. - A big slew of documentation fixes all over the place. - A few irqchip template conversions by yours truly. * tag 'pinctrl-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (107 commits) dt-bindings: pinctrl: add bindings for MediaTek MT6779 SoC pinctrl: stmfx: Use irqchip template pinctrl: amd: Use irqchip template pinctrl: mediatek: fix build for tristate changes pinctrl: samsung: Use bank name as irqchip name pinctrl: core: print gpio in pins debugfs file pinctrl: mediatek: add mt6779 eint support pinctrl: mediatek: add pinctrl support for MT6779 SoC pinctrl: mediatek: avoid virtual gpio trying to set reg pinctrl: mediatek: update pinmux definitions for mt6779 pinctrl: stm32: use the hwspin_lock_timeout_in_atomic() API pinctrl: mcp23s08: Use irqchip template pinctrl: sx150x: Use irqchip template dt-bindings: ingenic,pinctrl: Support pinmux/pinconf nodes pinctrl: intel: Add Intel Emmitsburg pin controller support pinctl: ti: iodelay: Replace HTTP links with HTTPS ones Revert "gpio: omap: handle pin config bias flags" pinctrl: single: Use fallthrough pseudo-keyword pinctrl: qcom: spmi-gpio: Use fallthrough pseudo-keyword pinctrl: baytrail: Use fallthrough pseudo-keyword ... commit dec1fbbc1d7c46aed9fc1d3ee1f7f4fc04d6ed51 Merge: 71fa1a4489ff9 6a1380271b75e Author: Linus Torvalds Date: Sun Aug 9 12:38:51 2020 -0700 Merge tag 'mtd/for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd updates from Miquel Raynal: "MTD core changes: - Spelling - http to https updates NAND core changes: - Drop useless 'depends on' in Kconfig - Add an extra level in the Kconfig hierarchy - Trivial spellings - Dynamic allocation of the interface configurations - Dropping the default ONFI timing mode - Various cleanup (types, structures, naming, comments) - Hide the chip->data_interface indirection - Add the generic rb-gpios property - Add the ->choose_interface_config() hook - Introduce nand_choose_best_sdr_timings() - Use default values for tPROG_max and tBERS_max - Avoid redefining tR_max and tCCS_min - Add a helper to find the closest ONFI mode - bcm63xx MTD parsers: simplify CFE detection Raw NAND controller drivers changes: - fsl-upm: Deprecation of specific DT properties - fsl_upm: Driver rework and cleanup in favor of ->exec_op() - Ingenic: Cleanup ARRAY_SIZE() vs sizeof() use - brcmnand: ECC error handling on EDU transfers - brcmnand: Don't default to EDU transfers - qcom: Set BAM mode only if not set already - qcom: Avoid write to unavailable register - gpio: Driver rework in favor of ->exec_op() - tango: ->exec_op() conversion - mtk: ->exec_op() conversion Raw NAND chip drivers changes: - toshiba: Implement ->choose_interface_config() for TH58NVG2S3HBAI4, TC58NVG0S3E, and TC58TEG5DCLTA00 - hynix: Implement ->choose_interface_config() for H27UCG8T2ATR-BC SPI NOR core changes: - Disable Quad Mode in spi_nor_restore(). - Don't abort BFPT parsing when QER reserved value is used. - Add support/update capabilities for few flashes. - Drop s70fl01gs flash: it does not support RDSR(05h) which is critical for erase/write. - Merge the SPIMEM DTR bits in spi-nor/next to avoid conflicts during the release cycle. SPI NOR controller drivers changes: - Move the cadence-quadspi driver to spi-mem. The series was taken through the SPI tree. Merge it also in spi-nor/next to avoid conflicts during the release cycle. - intel-spi: - Add new PCI IDs. - Ignore the Write Disable command, the controller doesn't support it. - Fix performance regression" * tag 'mtd/for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (79 commits) MTD: pfow.h: drop a duplicated word MTD: mtd-abi.h: drop a duplicated word mtd: rawnand: omap_elm: Replace HTTP links with HTTPS ones mtd: Replace HTTP links with HTTPS ones mtd: hyperbus: Replace HTTP links with HTTPS ones mtd: revert "spi-nor: intel: provide a range for poll_timout" mtd: spi-nor: update read capabilities for w25q64 and s25fl064k mtd: spi-nor: micron: Add SPI_NOR_DUAL_READ flag on mt25qu02g mtd: spi-nor: macronix: Add support for mx66u2g45g mtd: spi-nor: intel-spi: Simulate WRDI command mtd: spi-nor: Disable the flash quad mode in spi_nor_restore() mtd: spi-nor: Add capability to disable flash quad mode mtd: spi-nor: spansion: Remove s70fl01gs from flash_info mtd: spi-nor: sfdp: do not make invalid quad enable fatal dt-bindings: mtd: fsl-upm-nand: Deprecate chip-delay and fsl, upm-wait-flags mtd: rawnand: stm32_fmc2: get resources from parent node mtd: rawnand: stm32_fmc2: use regmap APIs memory: stm32-fmc2-ebi: add STM32 FMC2 EBI controller driver dt-bindings: memory-controller: add STM32 FMC2 EBI controller documentation dt-bindings: mtd: update STM32 FMC2 NAND controller documentation ... commit 71fa1a4489ff93ac4acd7e6c5b00098ba53a4485 Author: Stephen Rothwell Date: Tue Jun 30 15:51:50 2020 +1000 thunderbolt: merge fix for kunix_resource changes Signed-off-by: Stephen Rothwell Signed-off-by: Linus Torvalds commit cf99c505cf7a5b6d3deee91e3571871f20320d31 Author: Huacai Chen Date: Sat Aug 8 20:50:52 2020 +0800 MIPS: VZ: Only include loongson_regs.h for CPU_LOONGSON64 Only Loongson64 platform has and needs loongson_regs.h, including it unconditionally will cause build errors. Fixes: 7f2a83f1c2a941ebfee5 ("KVM: MIPS: Add CPUCFG emulation for Loongson-3") Cc: stable@vger.kernel.org Reported-by: kernel test robot Signed-off-by: Huacai Chen Message-Id: <1596891052-24052-1-git-send-email-chenhc@lemote.com> Signed-off-by: Paolo Bonzini commit 3ff0327899800a190782005483c96f4d7862ecd9 Merge: 43bd9ef42b3b8 81ab595ddd3c3 Author: Paolo Bonzini Date: Sun Aug 9 13:24:02 2020 -0400 Merge tag 'kvm-ppc-next-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into kvm-next-5.6 PPC KVM update for 5.9 - Improvements and bug-fixes for secure VM support, giving reduced startup time and memory hotplug support. - Locking fixes in nested KVM code - Increase number of guests supported by HV KVM to 4094 - Preliminary POWER10 support commit 43bd9ef42b3b862c97f1f4e86bf3ace890bef924 Author: Paolo Bonzini Date: Sun Aug 9 13:04:56 2020 -0400 x86: Expose SERIALIZE for supported cpuid The SERIALIZE instruction is supported by Tntel processors, like Sapphire Rapids. SERIALIZE is a faster serializing instruction which does not modify registers, arithmetic flags or memory, will not cause VM exit. It's availability is indicated by CPUID.(EAX=7,ECX=0):ECX[bit 14]. Expose it in KVM supported CPUID. This way, KVM could pass this information to guests and they can make use of these features accordingly. Signed-off-by: Cathy Zhang Signed-off-by: Paolo Bonzini commit 0378daef0c6cf1c2ba525bde0b529f0d4ef5233b Merge: 05487215e6b97 16314874b12b4 Author: Paolo Bonzini Date: Sun Aug 9 12:58:23 2020 -0400 Merge tag 'kvmarm-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-next-5.6 KVM/arm64 updates for Linux 5.9: - Split the VHE and nVHE hypervisor code bases, build the EL2 code separately, allowing for the VHE code to now be built with instrumentation - Level-based TLB invalidation support - Restructure of the vcpu register storage to accomodate the NV code - Pointer Authentication available for guests on nVHE hosts - Simplification of the system register table parsing - MMU cleanups and fixes - A number of post-32bit cleanups and other fixes commit 05487215e6b9732cc4ad0e83e465b33182200ad5 Author: Sean Christopherson Date: Mon Jul 13 18:57:32 2020 -0700 KVM: x86: Don't attempt to load PDPTRs when 64-bit mode is enabled Don't attempt to load PDPTRs if EFER.LME=1, i.e. if 64-bit mode is enabled. A recent change to reload the PDTPRs when CR0.CD or CR0.NW is toggled botched the EFER.LME handling and sends KVM down the PDTPR path when is_paging() is true, i.e. when the guest toggles CD/NW in 64-bit mode. Split the CR0 checks for 64-bit vs. 32-bit PAE into separate paths. The 64-bit path is specifically checking state when paging is toggled on, i.e. CR0.PG transititions from 0->1. The PDPTR path now needs to run if the new CR0 state has paging enabled, irrespective of whether paging was already enabled. Trying to shave a few cycles to make the PDPTR path an "else if" case is a mess. Fixes: d42e3fae6faed ("kvm: x86: Read PDPTEs on CR0.CD and CR0.NW changes") Cc: Jim Mattson Cc: Oliver Upton Cc: Peter Shier Signed-off-by: Sean Christopherson Reviewed-by: Jim Mattson Reviewed-by: Maxim Levitsky Message-Id: <20200714015732.32426-1-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 132305b3b474a85152302ceda4551384cce3904e Author: Masahiro Yamada Date: Sun Aug 2 00:00:50 2020 +0900 kbuild: stop filtering out $(GCC_PLUGINS_CFLAGS) from cc-option base Commit d26e94149276 ("kbuild: no gcc-plugins during cc-option tests") was neeeded because scripts/Makefile.gcc-plugins was too early. This is unneeded by including scripts/Makefile.gcc-plugins last, and being careful to not add cc-option tests after it. Signed-off-by: Masahiro Yamada commit e0fe0bbe57b8d708a18756be5bc289bdaf78d2a8 Author: Masahiro Yamada Date: Sun Aug 2 00:00:49 2020 +0900 kbuild: include scripts/Makefile.* only when relevant CONFIG is enabled Currently, the top Makefile includes all of scripts/Makefile. even if the associated CONFIG option is disabled. Do not include unneeded Makefiles in order to slightly optimize the parse stage. Include $(include-y), and ignore $(include-). Signed-off-by: Masahiro Yamada commit faabed295cccc2aba2b67f2e7b309f2892d55004 Author: Masahiro Yamada Date: Sat Aug 1 21:27:18 2020 +0900 kbuild: introduce hostprogs-always-y and userprogs-always-y To build host programs, you need to add the program names to 'hostprogs' to use the necessary build rule, but it is not enough to build them because there is no dependency. There are two types of host programs: built as the prerequisite of another (e.g. gen_crc32table in lib/Makefile), or always built when Kbuild visits the Makefile (e.g. genksyms in scripts/genksyms/Makefile). The latter is typical in Makefiles under scripts/, which contains host programs globally used during the kernel build. To build them, you need to add them to both 'hostprogs' and 'always-y'. This commit adds hostprogs-always-y as a shorthand. The same applies to user programs. net/bpfilter/Makefile builds bpfilter_umh on demand, hence always-y is unneeded. In contrast, programs under samples/ are added to both 'userprogs' and 'always-y' so they are always built when Kbuild visits the Makefiles. userprogs-always-y works as a shorthand. Signed-off-by: Masahiro Yamada Acked-by: Miguel Ojeda commit 85569d19d0f57df5e6cbb918dbddd4f82c0117b5 Author: Masahiro Yamada Date: Wed Jul 29 12:15:37 2020 +0900 kbuild: sort hostprogs before passing it to ifneq The conditional: ifneq ($(hostprogs),) ... is evaluated to true if $(hostprogs) does not contain any word but whitespace characters. ifneq ($(strip $(hostprogs)),) ... is a safe way to avoid interpreting whitespace as a non-empty value, but I'd rather want to use the side-effect of $(sort ...) to do the equivalent. $(sort ...) is used in scripts/Makefile.host in order to drop duplication in $(hostprogs). It is also useful to strip excessive spaces. Move $(sort ...) before evaluating the ifneq. Signed-off-by: Masahiro Yamada commit 42640b134bf44e3bac34808e8c39660c7ae42855 Author: Masahiro Yamada Date: Wed Jul 29 12:15:36 2020 +0900 kbuild: move host .so build rules to scripts/gcc-plugins/Makefile The host shared library rules are currently implemented in scripts/Makefile.host, but actually GCC-plugin is the only user of them. (The VDSO .so files are built for the target by different build rules) Hence, they do not need to be treewide available. Move all the relevant build rules to scripts/gcc-plugins/Makefile. I also optimized the build steps so *.so is directly built from .c because every upstream plugin is compiled from a single source file. I am still keeping the multi-file plugin support, which Kees Cook mentioned might be needed by out-of-tree plugins. (https://lkml.org/lkml/2019/1/11/1107) If the plugin, foo.so, is compiled from two files foo.c and foo2.c, then you can do like follows: foo-objs := foo.o foo2.o Single-file plugins do not need the *-objs notation. Signed-off-by: Masahiro Yamada Acked-by: Kees Cook commit 16a122c743b327f714606eff2cd8ff31c206bafc Author: Alexander A. Klimov Date: Sun Jul 19 21:46:02 2020 +0200 kbuild: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Masahiro Yamada commit b16838c608ef97c29896518117c30a2aa3931fac Author: Masahiro Yamada Date: Tue Jul 7 18:21:17 2020 +0900 kbuild: trace functions in subdirectories of lib/ ccflags-remove-$(CONFIG_FUNCTION_TRACER) += $(CC_FLAGS_FTRACE) exists here in sub-directories of lib/ to keep the behavior of commit 2464a609ded0 ("ftrace: do not trace library functions"). Since that commit, not only the objects in lib/ but also the ones in the sub-directories are excluded from ftrace (although the commit description did not explicitly mention this). However, most of library functions in sub-directories are not so hot. Re-add them to ftrace. Going forward, only the objects right under lib/ will be excluded. Cc: Ingo Molnar Signed-off-by: Masahiro Yamada Acked-by: Steven Rostedt (VMware) commit 15d5761ad31dfb194ebe76554e6af0437eb20424 Author: Masahiro Yamada Date: Tue Jul 7 18:21:16 2020 +0900 kbuild: introduce ccflags-remove-y and asflags-remove-y CFLAGS_REMOVE_.o filters out flags when compiling a particular object, but there is no convenient way to do that for every object in a directory. Add ccflags-remove-y and asflags-remove-y to make it easily. Use ccflags-remove-y to clean up some Makefiles. The add/remove order works as follows: [1] KBUILD_CFLAGS specifies compiler flags used globally [2] ccflags-y adds compiler flags for all objects in the current Makefile [3] ccflags-remove-y removes compiler flags for all objects in the current Makefile (New feature) [4] CFLAGS_ adds compiler flags per file. [5] CFLAGS_REMOVE_ removes compiler flags per file. Having [3] before [4] allows us to remove flags from most (but not all) objects in the current Makefile. For example, kernel/trace/Makefile removes $(CC_FLAGS_FTRACE) from all objects in the directory, then adds it back to trace_selftest_dynamic.o and CFLAGS_trace_kprobe_selftest.o The same applies to lib/livepatch/Makefile. Please note ccflags-remove-y has no effect to the sub-directories. In contrast, the previous notation got rid of compiler flags also from all the sub-directories. The following are not affected because they have no sub-directories: arch/arm/boot/compressed/ arch/powerpc/xmon/ arch/sh/ kernel/trace/ However, lib/ has several sub-directories. To keep the behavior, I added ccflags-remove-y to all Makefiles in subdirectories of lib/, except the following: lib/vdso/Makefile - Kbuild does not descend into this Makefile lib/raid/test/Makefile - This is not used for the kernel build I think commit 2464a609ded0 ("ftrace: do not trace library functions") excluded too much. In the next commit, I will remove ccflags-remove-y from the sub-directories of lib/. Suggested-by: Sami Tolvanen Signed-off-by: Masahiro Yamada Acked-by: Steven Rostedt (VMware) Acked-by: Michael Ellerman (powerpc) Acked-by: Brendan Higgins (KUnit) Tested-by: Anders Roxell commit 3ec8a5b33deacdeca4bef24fb15498a975e875ba Author: Masahiro Yamada Date: Thu Jul 2 04:29:36 2020 +0900 kbuild: do not export LDFLAGS_vmlinux When you clean the build tree for ARCH=arm, you may see the following error message from 'nm' command: $ make -j24 ARCH=arm clean CLEAN arch/arm/crypto CLEAN arch/arm/kernel CLEAN arch/arm/mach-at91 CLEAN arch/arm/mach-omap2 CLEAN arch/arm/vdso CLEAN certs CLEAN lib CLEAN usr CLEAN net/wireless CLEAN drivers/firmware/efi/libstub nm: 'arch/arm/boot/compressed/../../../../vmlinux': No such file /bin/sh: 1: arithmetic expression: expecting primary: " " CLEAN arch/arm/boot/compressed CLEAN drivers/scsi CLEAN drivers/tty/vt CLEAN arch/arm/boot CLEAN vmlinux.symvers modules.builtin modules.builtin.modinfo Even if you rerun the same command, the error message will not be shown despite vmlinux is already gone. To reproduce it, the parallel option -j is needed. Single thread cleaning always executes 'archclean', 'vmlinuxclean' in this order, so vmlinux still exists when arch/arm/boot/compressed/ is cleaned. Looking at arch/arm/boot/compressed/Makefile does not help understand the reason of the error message. Both KBSS_SZ and LDFLAGS_vmlinux are assigned with '=' operator, hence, they are not expanded unless used. Obviously, 'make clean' does not use them. In fact, the root cause exists in the top Makefile: export LDFLAGS_vmlinux Since LDFLAGS_vmlinux is an exported variable, LDFLAGS_vmlinux in arch/arm/boot/compressed/Makefile is expanded when scripts/Makefile.clean has a command to execute. This is why the error message shows up only when there exist build artifacts in arch/arm/boot/compressed/. Adding 'unexport LDFLAGS_vmlinux' to arch/arm/boot/compressed/Makefile will fix it as far as ARCH=arm is concerned, but I think the proper fix is to get rid of 'export LDFLAGS_vmlinux' from the top Makefile. LDFLAGS_vmlinux in the top Makefile contains linker flags for the top vmlinux. LDFLAGS_vmlinux in arch/arm/boot/compressed/Makefile is for arch/arm/boot/compressed/vmlinux. They just happen to have the same variable name, but are used for different purposes. Stop shadowing LDFLAGS_vmlinux. This commit passes LDFLAGS_vmlinux to scripts/link-vmlinux.sh via a command line parameter instead of via an environment variable. LD and KBUILD_LDFLAGS are exported, but I did the same for consistency. Anyway, they must be included in cmd_link-vmlinux to allow if_changed to detect the changes in LD or KBUILD_LDFLAGS. The following Makefiles are not affected: arch/arm/boot/compressed/Makefile arch/h8300/boot/compressed/Makefile arch/nios2/boot/compressed/Makefile arch/parisc/boot/compressed/Makefile arch/s390/boot/compressed/Makefile arch/sh/boot/compressed/Makefile arch/sh/boot/romimage/Makefile arch/x86/boot/compressed/Makefile They use ':=' or '=' to clear the LDFLAGS_vmlinux inherited from the top Makefile. We need to take a closer look at the impact to unicore32 and xtensa. arch/unicore32/boot/compressed/Makefile only uses '+=' operator for LDFLAGS_vmlinux. So, the decompressor previously inherited the linker flags from the top Makefile. However, commit 70fac51feaf2 ("unicore32 additional architecture files: boot process") was merged before commit 1f2bfbd00e46 ("kbuild: link of vmlinux moved to a script"). So, I rather consider this is a bug fix of 1f2bfbd00e46. arch/xtensa/boot/boot-elf/Makefile is also affected, but this is also considered a fix for the same reason. It did not inherit LDFLAGS_vmlinux when commit 4bedea945451 ("[PATCH] xtensa: Architecture support for Tensilica Xtensa Part 2") was merged. I deleted $(LDFLAGS_vmlinux), which is now empty. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers commit cc8a51ca6f05ade72f7dd2624bc5f9b948e216fc Author: Masahiro Yamada Date: Wed Jul 1 12:29:51 2020 +0900 kbuild: always create directories of targets Currently, the directories of objects are automatically created only for O= builds. It should not hurt to cater to this for in-tree builds too. Signed-off-by: Masahiro Yamada commit 55b2662ec665cc8b592809a011fe807b05370ab8 Author: Stafford Horne Date: Tue Aug 4 10:41:54 2020 +0900 openrisc: uaccess: Add user address space check to access_ok Now that __user annotations are fixed for openrisc uaccess api's we can add checking to the access_ok macro. This patch adds the __chk_user_ptr check, on normal builds the added check is a nop. Signed-off-by: Stafford Horne Reviewed-by: Luc Van Oostenryck commit d99596645f7d66b94b35650e732a42f4c701e11b Author: Stafford Horne Date: Tue Aug 4 09:33:57 2020 +0900 openrisc: signal: Fix sparse address space warnings The __user annotations in signal.c were mostly missing. The missing annotations caused the warnings listed below. This patch fixes them up by adding the __user annotations. arch/openrisc/kernel/signal.c:71:38: warning: incorrect type in initializer (different address spaces) arch/openrisc/kernel/signal.c:71:38: expected struct rt_sigframe *frame arch/openrisc/kernel/signal.c:71:38: got struct rt_sigframe [noderef] __user * arch/openrisc/kernel/signal.c:82:14: warning: incorrect type in argument 1 (different address spaces) arch/openrisc/kernel/signal.c:82:14: expected void const volatile [noderef] __user * arch/openrisc/kernel/signal.c:82:14: got struct rt_sigframe *frame arch/openrisc/kernel/signal.c:84:37: warning: incorrect type in argument 2 (different address spaces) arch/openrisc/kernel/signal.c:84:37: expected void const [noderef] __user *from arch/openrisc/kernel/signal.c:84:37: got struct sigset_t * arch/openrisc/kernel/signal.c:89:39: warning: incorrect type in argument 2 (different address spaces) arch/openrisc/kernel/signal.c:89:39: expected struct sigcontext [noderef] __user *sc arch/openrisc/kernel/signal.c:89:39: got struct sigcontext * arch/openrisc/kernel/signal.c:92:31: warning: incorrect type in argument 1 (different address spaces) arch/openrisc/kernel/signal.c:92:31: expected struct sigaltstack const [noderef] [usertype] __user * arch/openrisc/kernel/signal.c:92:31: got struct sigaltstack * arch/openrisc/kernel/signal.c:158:15: warning: incorrect type in assignment (different address spaces) arch/openrisc/kernel/signal.c:158:15: expected struct rt_sigframe *frame arch/openrisc/kernel/signal.c:158:15: got void [noderef] __user * arch/openrisc/kernel/signal.c:160:14: warning: incorrect type in argument 1 (different address spaces) arch/openrisc/kernel/signal.c:160:14: expected void const volatile [noderef] __user * arch/openrisc/kernel/signal.c:160:14: got struct rt_sigframe *frame arch/openrisc/kernel/signal.c:165:46: warning: incorrect type in argument 1 (different address spaces) arch/openrisc/kernel/signal.c:165:46: expected struct siginfo [noderef] [usertype] __user *to arch/openrisc/kernel/signal.c:165:46: got struct siginfo * arch/openrisc/kernel/signal.c:170:33: warning: incorrect type in argument 1 (different address spaces) arch/openrisc/kernel/signal.c:170:33: expected struct sigaltstack [noderef] [usertype] __user * arch/openrisc/kernel/signal.c:170:33: got struct sigaltstack * arch/openrisc/kernel/signal.c:171:40: warning: incorrect type in argument 2 (different address spaces) arch/openrisc/kernel/signal.c:171:40: expected struct sigcontext [noderef] __user *sc arch/openrisc/kernel/signal.c:171:40: got struct sigcontext * arch/openrisc/kernel/signal.c:173:32: warning: incorrect type in argument 1 (different address spaces) arch/openrisc/kernel/signal.c:173:32: expected void [noderef] __user *to arch/openrisc/kernel/signal.c:173:32: got struct sigset_t * Signed-off-by: Stafford Horne Reviewed-by: Luc Van Oostenryck commit aac9a9b555b9d84295d2d3637a2d83971c474a1e Author: Stafford Horne Date: Tue Aug 4 09:57:14 2020 +0900 openrisc: uaccess: Remove unused macro __addr_ok Since commit b48b2c3e5043 ("openrisc: use generic strnlen_user() function") the macro __addr_ok is no longer used. It is safe to remove so this patch removes it. Signed-off-by: Stafford Horne commit af84b16e3423bd9c1c8d81c44bc0a217f763f6b7 Author: Stafford Horne Date: Tue Aug 4 09:35:24 2020 +0900 openrisc: uaccess: Use static inline function in access_ok As suggested by Linus when reviewing commit 9cb2feb4d21d ("arch/openrisc: Fix issues with access_ok()") last year; making __range_ok an inline function also fixes the used twice issue that the commit was fixing. I agree it's a good cleanup. This patch addresses that as I am currently working on the access_ok macro to fixup sparse annotations in OpenRISC. Suggested-by: Linus Torvalds Signed-off-by: Stafford Horne Reviewed-by: Luc Van Oostenryck commit 17fcd83c2b621333eb4b4874c54a30891735700f Author: Stafford Horne Date: Tue Aug 4 08:42:20 2020 +0900 openrisc: uaccess: Fix sparse address space warnings The OpenRISC user access functions put_user(), get_user() and clear_user() were missing proper sparse annotations. This generated warnings like the below. This patch adds the annotations to fix the warnings. Example warnings: net/ipv4/ip_sockglue.c:759:29: warning: incorrect type in argument 1 (different address spaces) net/ipv4/ip_sockglue.c:759:29: expected void const volatile [noderef] __user * net/ipv4/ip_sockglue.c:759:29: got int const *__gu_addr net/ipv4/ip_sockglue.c:764:29: warning: incorrect type in initializer (different address spaces) net/ipv4/ip_sockglue.c:764:29: expected unsigned char const *__gu_addr net/ipv4/ip_sockglue.c:764:29: got unsigned char [noderef] __user * Signed-off-by: Stafford Horne Reviewed-by: Luc Van Oostenryck commit 7c7ab580db49cc7befe5f4b91bb1920cd6b07575 Author: Miaohe Lin Date: Sat Aug 8 16:23:10 2020 +0800 net: Convert to use the fallthrough macro Convert the uses of fallthrough comments to fallthrough macro. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 11f920d2aa9d4c2c2d53ccd79f4b5512f2169623 Author: Miaohe Lin Date: Thu Aug 6 19:57:18 2020 +0800 net: Use helper function ip_is_fragment() Use helper function ip_is_fragment() to check ip fragment. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 47260ba937822cd1a57ee8b520b8789bdda5964e Author: Miaohe Lin Date: Thu Aug 6 19:54:19 2020 +0800 net: Remove meaningless jump label out_fs The out_fs jump label has nothing to do but goto out. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit ce787a5a074a86f76f5d3fd804fa78e01bfb9e89 Author: Miaohe Lin Date: Thu Aug 6 19:53:16 2020 +0800 net: Set fput_needed iff FDPUT_FPUT is set We should fput() file iff FDPUT_FPUT is set. So we should set fput_needed accordingly. Fixes: 00e188ef6a7e ("sockfd_lookup_light(): switch to fdget^W^Waway from fget_light") Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 6b07edebe6d31529346e553a7b309bc5251da712 Author: Miaohe Lin Date: Thu Aug 6 19:52:24 2020 +0800 net: Use helper function fdput() Use helper function fdput() to fput() the file iff FDPUT_FPUT is set. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 06a81c1c7db9bd5de0bd38cd5acc44bb22b99150 Merge: 11030fe96b57a eaecca9e77102 Author: Linus Torvalds Date: Sat Aug 8 14:16:12 2020 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Fix tegra194-cpufreq module build failure caused by __cpu_logical_map not being exported. - Improve fixed_addresses comment regarding the fixmap buffer sizes. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Fix __cpu_logical_map undefined issue arm64/fixmap: make notes of fixed_addresses more precisely commit d02cbc46136105cf86f84ac355e16f04696f538d Author: Johan Hovold Date: Thu Aug 6 17:37:53 2020 +0200 net: phy: fix memory leak in device-create error path A recent commit introduced a late error path in phy_device_create() which fails to release the device name allocated by dev_set_name(). Fixes: 13d0ab6750b2 ("net: phy: check return code when requesting PHY driver module") Cc: Heiner Kallweit Signed-off-by: Johan Hovold Signed-off-by: David S. Miller commit eaecca9e7710281be7c31d892c9f447eafd7ddd9 Author: Kefeng Wang Date: Mon Jul 27 23:29:38 2020 +0800 arm64: Fix __cpu_logical_map undefined issue The __cpu_logical_map undefined issue occued when the new tegra194-cpufreq drvier building as a module. ERROR: modpost: "__cpu_logical_map" [drivers/cpufreq/tegra194-cpufreq.ko] undefined! The driver using cpu_logical_map() macro which will expand to __cpu_logical_map, we can't access it in a drvier. Let's turn cpu_logical_map() into a C wrapper and export it to fix the build issue. Also create a function set_cpu_logical_map(cpu, hwid) when assign a value to cpu_logical_map(cpu). Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Signed-off-by: Catalin Marinas commit 489577d7082bf2a83a7e41d1ead3e4d48ec9a599 Author: Pingfan Liu Date: Mon Aug 3 21:18:40 2020 +0800 arm64/fixmap: make notes of fixed_addresses more precisely These 'compile-time allocated' memory buffers can occupy more than one page and each enum increment is page-sized. So improve the note about it. Signed-off-by: Pingfan Liu Cc: Will Deacon Link: https://lore.kernel.org/r/1596460720-19243-1-git-send-email-kernelfans@gmail.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Catalin Marinas commit 11030fe96b57ad843518b0e9430f3cd4b3610ce2 Merge: 449dc8c97089a 634b06def11cf Author: Linus Torvalds Date: Sat Aug 8 09:32:18 2020 -0700 Merge tag 'for-linus-5.9-1' of git://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "Minor cleanups to the IPMI driver for 5.9 Nothing of any major consequence. Duplicate code, some missing \n's in sysfs files, some documentation and comment changes" * tag 'for-linus-5.9-1' of git://github.com/cminyard/linux-ipmi: ipmi/watchdog: add missing newlines when printing parameters by sysfs ipmi: remve duplicate code in __ipmi_bmc_register() ipmi: ssif: Remove finished TODO comment about SMBus alert Doc: driver-api: ipmi: Add description of alerts_broken module param commit 46d4a403a04c0ba46641452367b6a04bcf918a06 Author: Alexander A. Klimov Date: Wed Jul 8 14:56:22 2020 +0200 auxdisplay: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Miguel Ojeda commit 61ee4137b5744d9c555cd4674aae353a45f9cd2e Author: YueHaibing Date: Fri Jul 31 14:49:52 2020 +0800 ip_vti: Fix unused variable warning If CONFIG_INET_XFRM_TUNNEL is set but CONFIG_IPV6 is n, net/ipv4/ip_vti.c:493:27: warning: 'vti_ipip6_handler' defined but not used [-Wunused-variable] Signed-off-by: YueHaibing Signed-off-by: Steffen Klassert commit 449dc8c97089a6e09fb2dac4d92b1b7ac0eb7c1e Merge: b79675e15a754 46cbd0b05799e Author: Linus Torvalds Date: Fri Aug 7 21:27:37 2020 -0700 Merge tag 'for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "Power-supply core: - add COOL/WARM/HOT state from JEITA JISC8712:2015 specification - convert simple-battery DT binding to YAML - add long-life charging mode Battery/charger drivers: - bq25150: new charger driver - bq27xxx: add support for BQ27z561 and BQ28z610 - max17040: support CAPACITY_ALERT_MIN - sbs-battery: add PEC support - wilco-ec: support long-life charging mode - bq25890: fix DT binding - misc. fixes and cleanups Reset drivers: - linkstation: new reset driver" * tag 'for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (32 commits) power: supply: wilco_ec: Add long life charging mode power: supply: bq27xxx_battery: Add the BQ28z610 Battery monitor dt-bindings: power: Add BQ28z610 compatible power: supply: bq27xxx_battery: Add the BQ27Z561 Battery monitor dt-bindings: power: Add BQ27Z561 compatible power: supply: test_power: Fix battery_current initial value power: supply: Fix kerneldoc of power_supply_temp2resist_simple() power: supply: cpcap-battery: Fix kerneldoc of cpcap_battery_read_accumulated() dt-bindings: power: Convert battery.txt to battery.yaml power: supply: rt5033_battery: Fix error code in rt5033_battery_probe() power: supply: max17040: Add POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN power: supply: check if calc_soc succeeded in pm860x_init_battery power: supply: bq2xxxx: Replace HTTP links with HTTPS ones power: reset: add driver for LinkStation power off power: supply: sc27xx: prevent adc * 1000 from overflow math64: New DIV_S64_ROUND_CLOSEST helper power: fix duplicated words in bq2415x_charger.h power: Convert to DEFINE_SHOW_ATTRIBUTE power: reset: keystone-reset: Replace HTTP links with HTTPS ones power: supply: bq25150 introduce the bq25150 ... commit b79675e15a754ca51b9fc631e0961ccdd4ec3fc7 Merge: d57b2b5bc4301 6414e9b09ffd1 Author: Linus Torvalds Date: Fri Aug 7 21:14:30 2020 -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 whatsoever in those, sorry" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: define inode flags using bit numbers iov_iter: Move unnecessary inclusion of crypto/hash.h dlmfs: clean up dlmfs_file_{read,write}() a bit commit d57b2b5bc4301f37d1b07e3351d575bd634c7300 Merge: 049eb096da48d 25ccd24ffd911 Author: Linus Torvalds Date: Fri Aug 7 21:03:25 2020 -0700 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull mount leak fix from Al Viro: "Regression fix for the syscalls-for-init series - fix a leak of a 'struct path'" * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: fix a struct path leak in path_umount commit 049eb096da48db0421dd5e358b9b082a1a8a2025 Merge: 32663c78c10f8 6f119ec8d9c8f Author: Linus Torvalds Date: Fri Aug 7 18:48:15 2020 -0700 Merge tag 'pci-v5.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "Enumeration: - Fix pci_cfg_wait queue locking problem (Bjorn Helgaas) - Convert PCIe capability PCIBIOS errors to errno (Bolarinwa Olayemi Saheed) - Align PCIe capability and PCI accessor return values (Bolarinwa Olayemi Saheed) - Fix pci_create_slot() reference count leak (Qiushi Wu) - Announce device after early fixups (Tiezhu Yang) PCI device hotplug: - Make rpadlpar functions static (Wei Yongjun) Driver binding: - Add device even if driver attach failed (Rajat Jain) Virtualization: - xen: Remove redundant initialization of irq (Colin Ian King) IOMMU: - Add pci_pri_supported() to check device or associated PF (Ashok Raj) - Release IVRS table in AMD ACS quirk (Hanjun Guo) - Mark AMD Navi10 GPU rev 0x00 ATS as broken (Kai-Heng Feng) - Treat "external-facing" devices themselves as internal (Rajat Jain) MSI: - Forward MSI-X error code in pci_alloc_irq_vectors_affinity() (Piotr Stankiewicz) Error handling: - Clear PCIe Device Status errors only if OS owns AER (Jonathan Cameron) - Log correctable errors as warning, not error (Matt Jolly) - Use 'pci_channel_state_t' instead of 'enum pci_channel_state' (Luc Van Oostenryck) Peer-to-peer DMA: - Allow P2PDMA on AMD Zen and newer CPUs (Logan Gunthorpe) ASPM: - Add missing newline in sysfs 'policy' (Xiongfeng Wang) Native PCIe controllers: - Convert to devm_platform_ioremap_resource_byname() (Dejin Zheng) - Convert to devm_platform_ioremap_resource() (Dejin Zheng) - Remove duplicate error message from devm_pci_remap_cfg_resource() callers (Dejin Zheng) - Fix runtime PM imbalance on error (Dinghao Liu) - Remove dev_err() when handing an error from platform_get_irq() (Krzysztof Wilczyński) - Use pci_host_bridge.windows list directly instead of splicing in a temporary list for cadence, mvebu, host-common (Rob Herring) - Use pci_host_probe() instead of open-coding all the pieces for altera, brcmstb, iproc, mobiveil, rcar, rockchip, tegra, v3, versatile, xgene, xilinx, xilinx-nwl (Rob Herring) - Default host bridge parent device to the platform device (Rob Herring) - Use pci_is_root_bus() instead of tracking root bus number separately in aardvark, designware (imx6, keystone, designware-host), mobiveil, xilinx-nwl, xilinx, rockchip, rcar (Rob Herring) - Set host bridge bus number in pci_scan_root_bus_bridge() instead of each driver for aardvark, designware-host, host-common, mediatek, rcar, tegra, v3-semi (Rob Herring) - Move DT resource setup into devm_pci_alloc_host_bridge() (Rob Herring) - Set bridge map_irq and swizzle_irq to default functions; drivers that don't support legacy IRQs (iproc) need to undo this (Rob Herring) ARM Versatile PCIe controller driver: - Drop flag PCI_ENABLE_PROC_DOMAINS (Rob Herring) Cadence PCIe controller driver: - Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property (Kishon Vijay Abraham I) - Remove "mem" from reg binding (Kishon Vijay Abraham I) - Fix cdns_pcie_{host|ep}_setup() error path (Kishon Vijay Abraham I) - Convert all r/w accessors to perform only 32-bit accesses (Kishon Vijay Abraham I) - Add support to start link and verify link status (Kishon Vijay Abraham I) - Allow pci_host_bridge to have custom pci_ops (Kishon Vijay Abraham I) - Add new *ops* for CPU addr fixup (Kishon Vijay Abraham I) - Fix updating Vendor ID and Subsystem Vendor ID register (Kishon Vijay Abraham I) - Use bridge resources for outbound window setup (Rob Herring) - Remove private bus number and range storage (Rob Herring) Cadence PCIe endpoint driver: - Add MSI-X support (Alan Douglas) HiSilicon PCIe controller driver: - Remove non-ECAM HiSilicon hip05/hip06 driver (Rob Herring) Intel VMD host bridge driver: - Use Shadow MEMBAR registers for QEMU/KVM guests (Jon Derrick) Loongson PCIe controller driver: - Use DECLARE_PCI_FIXUP_EARLY for bridge_class_quirk() (Tiezhu Yang) Marvell Aardvark PCIe controller driver: - Indicate error in 'val' when config read fails (Pali Rohár) - Don't touch PCIe registers if no card connected (Pali Rohár) Marvell MVEBU PCIe controller driver: - Setup BAR0 in order to fix MSI (Shmuel Hazan) Microsoft Hyper-V host bridge driver: - Fix a timing issue which causes kdump to fail occasionally (Wei Hu) - Make some functions static (Wei Yongjun) NVIDIA Tegra PCIe controller driver: - Revert tegra124 raw_violation_fixup (Nicolas Chauvet) - Remove PLL power supplies (Thierry Reding) Qualcomm PCIe controller driver: - Change duplicate PCI reset to phy reset (Abhishek Sahu) - Add missing ipq806x clocks in PCIe driver (Ansuel Smith) - Add missing reset for ipq806x (Ansuel Smith) - Add ext reset (Ansuel Smith) - Use bulk clk API and assert on error (Ansuel Smith) - Add support for tx term offset for rev 2.1.0 (Ansuel Smith) - Define some PARF params needed for ipq8064 SoC (Ansuel Smith) - Add ipq8064 rev2 variant (Ansuel Smith) - Support PCI speed set for ipq806x (Sham Muthayyan) Renesas R-Car PCIe controller driver: - Use devm_pci_alloc_host_bridge() (Rob Herring) - Use struct pci_host_bridge.windows list directly (Rob Herring) - Convert rcar-gen2 to use modern host bridge probe functions (Rob Herring) TI J721E PCIe driver: - Add TI J721E PCIe host and endpoint driver (Kishon Vijay Abraham I) Xilinx Versal CPM PCIe controller driver: - Add Versal CPM Root Port driver and YAML schema (Bharat Kumar Gogada) MicroSemi Switchtec management driver: - Add missing __iomem and __user tags to fix sparse warnings (Logan Gunthorpe) Miscellaneous: - Replace http:// links with https:// (Alexander A. Klimov) - Replace lkml.org, spinics, gmane with lore.kernel.org (Bjorn Helgaas) - Remove unused pci_lost_interrupt() (Heiner Kallweit) - Move PCI_VENDOR_ID_REDHAT definition to pci_ids.h (Huacai Chen) - Fix kerneldoc warnings (Krzysztof Kozlowski)" * tag 'pci-v5.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (113 commits) PCI: Fix kerneldoc warnings PCI: xilinx-cpm: Add Versal CPM Root Port driver PCI: xilinx-cpm: Add YAML schemas for Versal CPM Root Port PCI: Set bridge map_irq and swizzle_irq to default functions PCI: Move DT resource setup into devm_pci_alloc_host_bridge() PCI: rcar-gen2: Convert to use modern host bridge probe functions PCI: Remove dev_err() when handing an error from platform_get_irq() MAINTAINERS: Add Kishon Vijay Abraham I for TI J721E SoC PCIe misc: pci_endpoint_test: Add J721E in pci_device_id table PCI: j721e: Add TI J721E PCIe driver PCI: switchtec: Add missing __iomem tag to fix sparse warnings PCI: switchtec: Add missing __iomem and __user tags to fix sparse warnings PCI: rpadlpar: Make functions static PCI/P2PDMA: Allow P2PDMA on AMD Zen and newer CPUs PCI: Release IVRS table in AMD ACS quirk PCI: Announce device after early fixups PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken PCI: Remove unused pci_lost_interrupt() dt-bindings: PCI: Add EP mode dt-bindings for TI's J721E SoC dt-bindings: PCI: Add host mode dt-bindings for TI's J721E SoC ... commit 32663c78c10f80df90b832de0428a6cb98a64e9a Merge: 7b9de97711225 38ce2a9e33db6 Author: Linus Torvalds Date: Fri Aug 7 18:29:15 2020 -0700 Merge tag 'trace-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: - The biggest news in that the tracing ring buffer can now time events that interrupted other ring buffer events. Before this change, if an interrupt came in while recording another event, and that interrupt also had an event, those events would all have the same time stamp as the event it interrupted. Now, with the new design, those events will have a unique time stamp and rightfully display the time for those events that were recorded while interrupting another event. - Bootconfig how has an "override" operator that lets the users have a default config, but then add options to override the default. - A fix was made to properly filter function graph tracing to the ftrace PIDs. This came in at the end of the -rc cycle, and needs to be backported. - Several clean ups, performance updates, and minor fixes as well. * tag 'trace-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (39 commits) tracing: Add trace_array_init_printk() to initialize instance trace_printk() buffers kprobes: Fix compiler warning for !CONFIG_KPROBES_ON_FTRACE tracing: Use trace_sched_process_free() instead of exit() for pid tracing bootconfig: Fix to find the initargs correctly Documentation: bootconfig: Add bootconfig override operator tools/bootconfig: Add testcases for value override operator lib/bootconfig: Add override operator support kprobes: Remove show_registers() function prototype tracing/uprobe: Remove dead code in trace_uprobe_register() kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler ftrace: Fix ftrace_trace_task return value tracepoint: Use __used attribute definitions from compiler_attributes.h tracepoint: Mark __tracepoint_string's __used trace : Have tracing buffer info use kvzalloc instead of kzalloc tracing: Remove outdated comment in stack handling ftrace: Do not let direct or IPMODIFY ftrace_ops be added to module and set trampolines ftrace: Setup correct FTRACE_FL_REGS flags for module tracing/hwlat: Honor the tracing_cpumask tracing/hwlat: Drop the duplicate assignment in start_kthread() tracing: Save one trace_event->type by using __TRACE_LAST_TYPE ... commit 7b9de97711225559af213dc52b6ea883ef1ea7a8 Author: Michael Ellerman Date: Sat Aug 8 09:12:03 2020 +1000 powerpc/ptrace: Fix build error in pkey_get() The merge resolution in commit 25d8d4eecace left ret no longer used, leading to: arch/powerpc/kernel/ptrace/ptrace-view.c: In function ‘pkey_get’: arch/powerpc/kernel/ptrace/ptrace-view.c:473:6: error: unused variable ‘ret’ 473 | int ret; Fix it by removing ret. Fixes: 25d8d4eecace ("Merge tag 'powerpc-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux") Signed-off-by: Michael Ellerman Signed-off-by: Linus Torvalds commit 1c3b63f155f637594268cd1add8335461691b314 Author: Rouven Czerwinski Date: Thu Aug 6 08:49:06 2020 +0200 net/tls: allow MSG_CMSG_COMPAT in sendmsg Trying to use ktls on a system with 32-bit userspace and 64-bit kernel results in a EOPNOTSUPP message during sendmsg: setsockopt(3, SOL_TLS, TLS_TX, …, 40) = 0 sendmsg(3, …, msg_flags=0}, 0) = -1 EOPNOTSUPP (Operation not supported) The tls_sw implementation does strict flag checking and does not allow the MSG_CMSG_COMPAT flag, which is set if the message comes in through the compat syscall. This patch adds MSG_CMSG_COMPAT to the flag check to allow the usage of the TLS SW implementation on systems using the compat syscall path. Note that the same check is present in the sendmsg path for the TLS device implementation, however the flag hasn't been added there for lack of testing hardware. Signed-off-by: Rouven Czerwinski Signed-off-by: David S. Miller commit 64cae2fb48ee10a84b044c516dba1b44d7f4d161 Merge: 7ee2492635d86 b8c1a3090741f Author: David S. Miller Date: Fri Aug 7 17:33:08 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2020-08-08 The following pull-request contains BPF updates for your *net* tree. We've added 11 non-merge commits during the last 2 day(s) which contain a total of 24 files changed, 216 insertions(+), 135 deletions(-). The main changes are: 1) Fix UAPI for BPF map iterator before it gets frozen to allow for more extensions/customization in future, from Yonghong Song. 2) Fix selftests build to undo verbose build output, from Andrii Nakryiko. 3) Fix inlining compilation error on bpf_do_trace_printk() due to variable argument lists, from Stanislav Fomichev. 4) Fix an uninitialized pointer warning at btf__parse_raw() in libbpf, from Daniel T. Lee. 5) Fix several compilation warnings in selftests with regards to ignoring return value, from Jianlin Lv. 6) Fix interruptions by switching off timeout for BPF tests, from Jiri Benc. ==================== Signed-off-by: David S. Miller commit 7ee2492635d862fac39bc5ef234ffd3d8e9f833b Author: Paolo Abeni Date: Fri Aug 7 19:03:53 2020 +0200 mptcp: fix warn at shutdown time for unaccepted msk sockets With commit b93df08ccda3 ("mptcp: explicitly track the fully established status"), the status of unaccepted mptcp closed in mptcp_sock_destruct() changes from TCP_SYN_RECV to TCP_ESTABLISHED. As a result mptcp_sock_destruct() does not perform the proper cleanup and inet_sock_destruct() will later emit a warn. Address the issue updating the condition tested in mptcp_sock_destruct(). Also update the related comment. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/66 Reported-and-tested-by: Christoph Paasch Fixes: b93df08ccda3 ("mptcp: explicitly track the fully established status") Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: David S. Miller commit 6bdb6211a61eaf91a22e9160b16795ee6c40f90d Author: Paolo Abeni Date: Fri Aug 7 18:31:00 2020 +0200 mptcp: more stable diag self-tests During diag self-tests we introduce long wait in the mptcp test program to give the script enough time to access the sockets dump. Such wait is introduced after shutting down one sockets end. Since commit 43b54c6ee382 ("mptcp: Use full MPTCP-level disconnect state machine") if both sides shutdown the socket is correctly transitioned into CLOSED status. As a side effect some sockets are not dumped via the diag interface, because the socket state (CLOSED) does not match the default filter, and this cause self-tests instability. Address the issue moving the above mentioned wait before shutting down the socket. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/68 Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests") Tested-and-acked-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 158b47a65aa6b1e70424c3c9c0eda8577b831ea8 Author: Paolo Abeni Date: Fri Aug 7 11:32:04 2020 +0200 selftests: mptcp: fix dependecies Since commit df62f2ec3df6 ("selftests/mptcp: add diag interface tests") the MPTCP selftests relies on the MPTCP diag interface which is enabled by a specific kconfig knob: be sure to include it. Fixes: df62f2ec3df6 ("selftests/mptcp: add diag interface tests") Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: David S. Miller commit b9b40ee4db6cb186341b97bca4f0d7aa2a042a66 Author: Thierry Reding Date: Fri Aug 7 09:36:32 2020 +0200 r8152: Use MAC address from correct device tree node Query the USB device's device tree node when looking for a MAC address. The struct device embedded into the struct net_device does not have a device tree node attached at all. The reason why this went unnoticed is because the system where this was tested was one of the few development units that had its OTP programmed, as opposed to production systems where the MAC address is stored in a separate EEPROM and is passed via device tree by the firmware. Reported-by: EJ Hsu Fixes: acb6d3771a03 ("r8152: Use MAC address from device tree if available") Signed-off-by: Thierry Reding Reviewed-by: EJ Hsu Signed-off-by: David S. Miller commit 9e8238020c5beba64e7ffafbb7ea0fb02fe68270 Merge: a50ca29523b18 d862a3068ea59 Author: Dmitry Torokhov Date: Fri Aug 7 16:41:01 2020 -0700 Merge branch 'next' into for-linus Prepare input updates for 5.9 merge window. commit 25ccd24ffd9119c452d711efa2604a7a0c35956e Author: Christoph Hellwig Date: Thu Aug 6 16:07:10 2020 +0200 fs: fix a struct path leak in path_umount Make sure we also put the dentry and vfsmnt in the illegal flags and !may_umount cases. Fixes: 41525f56e256 ("fs: refactor ksys_umount") Reported-by: Vikas Kumar Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit f87812284172a9809820d10143b573d833cd3f75 Author: Sandeep Raghuraman Date: Thu Aug 6 22:52:20 2020 +0530 drm/amdgpu: Fix bug where DPM is not enabled after hibernate and resume Reproducing bug report here: After hibernating and resuming, DPM is not enabled. This remains the case even if you test hibernate using the steps here: https://www.kernel.org/doc/html/latest/power/basic-pm-debugging.html I debugged the problem, and figured out that in the file hardwaremanager.c, in the function, phm_enable_dynamic_state_management(), the check 'if (!hwmgr->pp_one_vf && smum_is_dpm_running(hwmgr) && !amdgpu_passthrough(adev) && adev->in_suspend)' returns true for the hibernate case, and false for the suspend case. This means that for the hibernate case, the AMDGPU driver doesn't enable DPM (even though it should) and simply returns from that function. In the suspend case, it goes ahead and enables DPM, even though it doesn't need to. I debugged further, and found out that in the case of suspend, for the CIK/Hawaii GPUs, smum_is_dpm_running(hwmgr) returns false, while in the case of hibernate, smum_is_dpm_running(hwmgr) returns true. For CIK, the ci_is_dpm_running() function calls the ci_is_smc_ram_running() function, which is ultimately used to determine if DPM is currently enabled or not, and this seems to provide the wrong answer. I've changed the ci_is_dpm_running() function to instead use the same method that some other AMD GPU chips do (e.g Fiji), which seems to read the voltage controller. I've tested on my R9 390 and it seems to work correctly for both suspend and hibernate use cases, and has been stable so far. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=208839 Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 7fb133cf65558955b5fdac2458f9690dfd12a794 Author: Evan Quan Date: Wed Aug 5 17:24:41 2020 +0800 drm/amd/powerplay: put VCN/JPEG into PG ungate state before dpm table setup(V3) As VCN related dpm table setup needs VCN be in PG ungate state. Same logics applies to JPEG. V2: fix paste typo V3: code cosmetic Signed-off-by: Evan Quan Tested-by: Matt Coffin Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2c34c960cee0dfdfe33ddf1b3835c250a9503ef6 Author: Evan Quan Date: Mon Aug 3 11:15:14 2020 +0800 drm/amd/powerplay: update swSMU VCN/JPEG PG logics Add lock protections and avoid unnecessary actions if the PG state is already the same as required. Signed-off-by: Evan Quan Tested-by: Matt Coffin Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f2e2573c0823c07dc8aac4a8e0947881af2340bd Author: Likun Gao Date: Thu Aug 6 17:37:28 2020 +0800 drm/amdgpu: use mode1 reset by default for sienna_cichlid Swith default gpu reset method for sienna_cichlid to MODE1 reset. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 16c24801122e2961c588562f04707b98f9c84bbb Author: Jon Hunter Date: Thu Aug 6 13:54:31 2020 +0100 rtc: max77686: Fix wake-ups for max77620 Following commit d8f090dbeafd ("rtc: max77686: Do not allow interrupt to fire before system resume"), RTC wake-ups stopped working on Jetson TX2 and Jetson Xavier platforms. The Jetson TX2 uses the max77620 PMIC and the Jetson Xavier uses max20024 PMIC. Both of these PMICs have the same max77620 RTC controller. For the max77620 RTC, the variable 'rtc_irq_from_platform' is defined as true in the max77686 driver and because of this the IRQ passed to the max77686 driver for RTC is the PMIC IRQ and not the parent. Hence, following commit d8f090dbeafd ("rtc: max77686: Do not allow interrupt to fire before system resume"), for the max77620 the RTC IRQ within the PMIC is now getting disabled on entry to suspend and unable to wake the system up. Fix this by only disabling interrupts on entry to suspend in the max77686 RTC driver, if the interrupt is the parent interrupt. Fixes: d8f090dbeafd ("rtc: max77686: Do not allow interrupt to fire before system resume") Signed-off-by: Jon Hunter Signed-off-by: Alexandre Belloni Tested-by: Thierry Reding Reviewed-by: Thierry Reding Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200806125431.699339-1-jonathanh@nvidia.com commit 38ce2a9e33db61a3041840310077072d6210ead4 Author: Steven Rostedt (VMware) Date: Thu Aug 6 12:46:49 2020 -0400 tracing: Add trace_array_init_printk() to initialize instance trace_printk() buffers As trace_array_printk() used with not global instances will not add noise to the main buffer, they are OK to have in the kernel (unlike trace_printk()). This require the subsystem to create their own tracing instance, and the trace_array_printk() only writes into those instances. Add trace_array_init_printk() to initialize the trace_printk() buffers without printing out the WARNING message. Reported-by: Sean Paul Reviewed-by: Sean Paul Signed-off-by: Steven Rostedt (VMware) commit 30185b69a2d533c4ba6ca926b8390ce7de495e29 Merge: 0f43283be7fec 63e95849a7741 Author: Linus Torvalds Date: Fri Aug 7 13:35:51 2020 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "It looks like a smaller batch of clk updates this time around. In the core framework we just have some minor tweaks and a debugfs feature, so not much to see there. The driver updates are fairly well split between AT91 and Qualcomm clk support. Adding those two drivers together equals about 50% of the diffstat. Otherwise, the big amount of work this time was on supporting Broadcom's Raspberry Pi firmware clks. Highlights: Core: - Document clk_hw_round_rate() so it gets some more use - Remove unused __clk_get_flags() - Add a prepare/enable debugfs feature similar to rate setting New Drivers: - Add support for SAMA7G5 SoC clks - Enable CPU clks on Qualcomm IPQ6018 SoCs - Enable CPU clks on Qualcomm MSM8996 SoCs - GPU clk support for Qualcomm SM8150 and SM8250 SoCs - Audio clks on Qualcomm SC7180 SoCs - Microchip Sparx5 DPLL clk - Add support for the new Renesas RZ/G2H (R8A774E1) SoC Updates: - Make defines for bcm63xx-gate clks to use in DT - Support BCM2711 SoC firmware clks - Add HDMI clks for BCM2711 SoCs - Add RTC related clks on Ingenic SoCs - Support USB PHY clks on Ingenic SoCs - Support gate clks on BCM6318 SoCs - RMU and DMAC/GPIO clock support for Actions Semi S500 SoCs - Use poll_timeout functions in Rockchip clk driver - Support Rockchip rk3288w SoC variant - Mark mac_lbtest critical on Rockchip rk3188 - Add CAAM clock support for i.MX vf610 driver - Add MU root clock support for i.MX imx8mp driver - Amlogic g12: add neural network accelerator clock sources - Amlogic meson8: remove critical flag for main PLL divider - Amlogic meson8: add video decoder clock gates - Convert one more Renesas DT binding to json-schema - Enhance critical clock handling on Renesas platforms to only consider clocks that were enabled at boot time" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (79 commits) clk: qcom: gcc: Make disp gpll0 branch aon for sc7180/sdm845 ipq806x: gcc: add support for child probe clk: qcom: msm8996: Make symbol 'cpu_msm8996_clks' static clk: qcom: ipq8074: Add correct index for PCIe clocks clk: : drop a duplicated word clk: renesas: cpg-mssr: Add r8a774e1 support dt-bindings: clock: renesas,cpg-mssr: Document r8a774e1 clk: Drop duplicate selection in Kconfig clk: qcom: smd: Add support for MSM8992/4 rpm clocks clk: qcom: ipq8074: Add missing clocks for pcie dt-bindings: clock: qcom: ipq8074: Add missing bindings for PCIe Replace HTTP links with HTTPS ones: Common CLK framework clk: qcom: Add CPU clock driver for msm8996 dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996 soc: qcom: Separate kryo l2 accessors from PMU driver clk: meson: meson8b: add the vclk2_en gate clock clk: meson: meson8b: add the vclk_en gate clock clk: qcom: Fix return value check in apss_ipq6018_probe() clk: bcm: dvp: Add missing module informations clk: meson: meson8b: Drop CLK_IS_CRITICAL from fclk_div2 ... commit 0f43283be7fec4a76cd4ed50dc37db30719bde05 Merge: 6ba0d2e4fc2f3 1697a322e28ba Author: Linus Torvalds Date: Fri Aug 7 13:29:39 2020 -0700 Merge branch 'work.fdpic' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull fdpick coredump update from Al Viro: "Switches fdpic coredumps away from original aout dumping primitives to the same kind of regset use as regular elf coredumps do" * 'work.fdpic' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: [elf-fdpic] switch coredump to regsets [elf-fdpic] use elf_dump_thread_status() for the dumper thread as well [elf-fdpic] move allocation of elf_thread_status into elf_dump_thread_status() [elf-fdpic] coredump: don't bother with cyclic list for per-thread objects kill elf_fpxregs_t take fdpic-related parts of elf_prstatus out unexport linux/elfcore.h commit 6ba0d2e4fc2f3e8544f40fb1165c668f78fe951c Merge: 1fa2c0a0c814f 9af47666cb0f3 Author: Linus Torvalds Date: Fri Aug 7 13:24:58 2020 -0700 Merge tag 'kallsyms_show_value-fix-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull sysfs module section fix from Kees Cook: "Fix sysfs module section output overflow. About a month after my kallsyms_show_value() refactoring landed, 0day noticed that there was a path through the kernfs binattr read handlers that did not have PAGE_SIZEd buffers, and the module "sections" read handler made a bad assumption about this, resulting in it stomping on memory when reached through small-sized splice() calls. I've added a set of tests to find these kinds of regressions more quickly in the future as well" Sefltests-acked-by: Shuah Khan * tag 'kallsyms_show_value-fix-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: selftests: splice: Check behavior of full and short splices module: Correctly truncate sysfs sections output commit 1fa2c0a0c814fbae0eb3e79a510765225570d043 Merge: f6235eb189706 16b89f695313d Author: Linus Torvalds Date: Fri Aug 7 13:16:22 2020 -0700 Merge tag 'seccomp-v5.9-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp fix from Kees Cook: "This fixes my typo in the SCM_RIGHTS refactoring that broke compat handling. Thanks to Thadeu Lima de Souza Cascardo for tracking it down, and to Christian Zigotzky and Alex Xu for their reports" * tag 'seccomp-v5.9-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: net/scm: Fix typo in SCM_RIGHTS compat refactoring commit f6235eb189706bf38c82b5fa5f2db0d21bc1dcef Merge: 2f12d44085dab 0873ad923a057 Author: Linus Torvalds Date: Fri Aug 7 13:13:09 2020 -0700 Merge tag 'pm-5.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These are mostly ARM cpufreq driver updates plus a cpufreq core cleanup, an ARM-wide change to make schedutil the default scaling governor, an intel_pstate driver fix and some runtime PM changes regarding kerneldoc comments. Specifics: - Add adaptive voltage scaling (AVS) support to the brcmstb cpufreq driver and clean it up (Florian Fainelli, Markus Mayer). - Add a new Tegra cpufreq driver and clean up the existing one (Jon Hunter, Sumit Gupta). - Add bandwidth level support to the Qcom cpufreq driver along with OPP changes (Sibi Sankar). - Clean up the sti, cpufreq-dt, ap806, CPPC cpufreq drivers (Viresh Kumar, Lee Jones, Ivan Kokshaysky, Sven Auhagen, Xin Hao). - Make schedutil the default governor for ARM (Valentin Schneider). - Fix dependency issues for the imx cpufreq driver (Walter Lozano). - Clean up cached_resolved_idx handlihng in the cpufreq core (Viresh Kumar). - Fix the intel_pstate driver to use the correct maximum frequency value when MSR_TURBO_RATIO_LIMIT is 0 (Srinivas Pandruvada). - Provide kenrneldoc comments for multiple runtime PM helpers and improve the pm_runtime_get_if_active() kerneldoc (Rafael Wysocki)" * tag 'pm-5.9-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (22 commits) cpufreq: intel_pstate: Fix cpuinfo_max_freq when MSR_TURBO_RATIO_LIMIT is 0 PM: runtime: Improve kerneldoc of pm_runtime_get_if_active() PM: runtime: Add kerneldoc comments to multiple helpers cpufreq: make schedutil the default for arm and arm64 cpufreq: cached_resolved_idx can not be negative cpufreq: Add Tegra194 cpufreq driver dt-bindings: arm: Add NVIDIA Tegra194 CPU Complex binding cpufreq: imx: Select NVMEM_IMX_OCOTP cpufreq: sti-cpufreq: Fix some formatting and misspelling issues cpufreq: tegra186: Simplify probe return path cpufreq: CPPC: Reuse caps variable in few routines cpufreq: ap806: fix cpufreq driver needs ap cpu clk cpufreq: cppc: Reorder code and remove apply_hisi_workaround variable cpufreq: dt: fix oops on armada37xx cpufreq: brcmstb-avs-cpufreq: send S2_ENTER / S2_EXIT commands to AVS cpufreq: brcmstb-avs-cpufreq: Support polling AVS firmware cpufreq: brcmstb-avs-cpufreq: more flexible interface for __issue_avs_command() cpufreq: qcom: Disable fast switch when scaling DDR/L3 cpufreq: qcom: Update the bandwidth levels on frequency change OPP: Add and export helper to set bandwidth ... commit 2f12d44085dabf5fa5779ff0bb0aaa1b2cc768cb Merge: fa73e212318a3 a9cb9f4148ef6 Author: Linus Torvalds Date: Fri Aug 7 13:08:09 2020 -0700 Merge tag 'for-5.9/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - DM multipath locking fixes around m->flags tests and improvements to bio-based code so that it follows patterns established by request-based code. - Request-based DM core improvement to eliminate unnecessary call to blk_mq_queue_stopped(). - Add "panic_on_corruption" error handling mode to DM verity target. - DM bufio fix to to perform buffer cleanup from a workqueue rather than wait for IO in reclaim context from shrinker. - DM crypt improvement to optionally avoid async processing via workqueues for reads and/or writes -- via "no_read_workqueue" and "no_write_workqueue" features. This more direct IO processing improves latency and throughput with faster storage. Avoiding workqueue IO submission for writes (DM_CRYPT_NO_WRITE_WORKQUEUE) is a requirement for adding zoned block device support to DM crypt. - Add zoned block device support to DM crypt. Makes use of DM_CRYPT_NO_WRITE_WORKQUEUE and a new optional feature (DM_CRYPT_WRITE_INLINE) that allows write completion to wait for encryption to complete. This allows write ordering to be preserved, which is needed for zoned block devices. - Fix DM ebs target's check for REQ_OP_FLUSH. - Fix DM core's report zones support to not report more zones than were requested. - A few small compiler warning fixes. - DM dust improvements to return output directly to the user rather than require they scrape the system log for output. * tag 'for-5.9/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: don't call report zones for more than the user requested dm ebs: Fix incorrect checking for REQ_OP_FLUSH dm init: Set file local variable static dm ioctl: Fix compilation warning dm raid: Remove empty if statement dm verity: Fix compilation warning dm crypt: Enable zoned block device support dm crypt: add flags to optionally bypass kcryptd workqueues dm bufio: do buffer cleanup from a workqueue dm rq: don't call blk_mq_queue_stopped() in dm_stop_queue() dm dust: add interface to list all badblocks dm dust: report some message results directly back to user dm verity: add "panic_on_corruption" error handling mode dm mpath: use double checked locking in fast path dm mpath: rename current_pgpath to pgpath in multipath_prepare_ioctl dm mpath: rework __map_bio() dm mpath: factor out multipath_queue_bio dm mpath: push locking down to must_push_back_rq() dm mpath: take m->lock spinlock when testing QUEUE_IF_NO_PATH dm mpath: changes from initial m->flags locking audit commit 7303cb5bfe845f7d43cd9b2dbd37dbb266efda9b Author: Jan Kara Date: Fri Jul 31 18:21:35 2020 +0200 ext4: fix checking of directory entry validity for inline directories ext4_search_dir() and ext4_generic_delete_entry() can be called both for standard director blocks and for inline directories stored inside inode or inline xattr space. For the second case we didn't call ext4_check_dir_entry() with proper constraints that could result in accepting corrupted directory entry as well as false positive filesystem errors like: EXT4-fs error (device dm-0): ext4_search_dir:1395: inode #28320400: block 113246792: comm dockerd: bad entry in directory: directory entry too close to block end - offset=0, inode=28320403, rec_len=32, name_len=8, size=4096 Fix the arguments passed to ext4_check_dir_entry(). Fixes: 109ba779d6cc ("ext4: check for directory entries too close to block end") CC: stable@vger.kernel.org Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20200731162135.8080-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit fa73e212318a3277ae1f304febbc617c75d4d2db Merge: 75dee3b6de4ce f45882cfb152f Author: Linus Torvalds Date: Fri Aug 7 13:00:53 2020 -0700 Merge tag 'media/v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - Legacy soc_camera driver was removed from staging - New I2C sensor related drivers: dw9768, ch7322, max9271, rdacm20 - TI vpe driver code was re-organized and had new features added - Added Xilinx MIPI CSI-2 Rx Subsystem driver - Added support for Infrared Toy and IR Droid devices - Lots of random driver fixes, new features and cleanups * tag 'media/v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (318 commits) media: camss: fix memory leaks on error handling paths in probe media: davinci: vpif_capture: fix potential double free media: radio: remove redundant assignment to variable retval media: allegro: fix potential null dereference on header media: mtk-mdp: Fix a refcounting bug on error in init media: allegro: fix an error pointer vs NULL check media: meye: fix missing pm_mchip_mode field media: cafe-driver: use generic power management media: saa7164: use generic power management media: v4l2-dev/ioctl: Fix document for VIDIOC_QUERYCAP media: v4l2: Correct kernel-doc inconsistency media: v4l2: Correct kernel-doc inconsistency media: dvbdev.h: keep * together with the type media: v4l2-subdev.h: keep * together with the type media: videobuf2: Print videobuf2 buffer state by name media: colorspaces-details.rst: fix V4L2_COLORSPACE_JPEG description media: tw68: use generic power management media: meye: use generic power management media: cx88: use generic power management media: cx25821: use generic power management ... commit 75dee3b6de4ce31464ffb827b81ddb5414599159 Merge: ce615f5c1f735 884996986347d Author: Linus Torvalds Date: Fri Aug 7 12:58:11 2020 -0700 Merge tag 'mailbox-v5.9' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: "mediatek: - add support for mt6779 gce - shutdown cleanup and address shift support qcom: - add msm8994 apcs and sdm660 hmss compatibility imx: - mark PM funcs __maybe pcc: - put acpi table before bailout misc: - replace http with https links" * tag 'mailbox-v5.9' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: mediatek: cmdq: clear task in channel before shutdown mailbox: cmdq: support mt6779 gce platform definition mailbox: cmdq: variablize address shift in platform dt-binding: gce: add gce header file for mt6779 mailbox: qcom: Add msm8994 apcs compatible mailbox: qcom: Add sdm660 hmss compatible mailbox: imx: Mark PM functions as __maybe_unused mailbox: pcc: Put the PCCT table for error path mailbox: Replace HTTP links with HTTPS ones commit 377254b2cd2252c7c3151b113cbdf93a7736c2e9 Author: Xianting Tian Date: Fri Jul 31 12:10:25 2020 -0400 fs: prevent BUG_ON in submit_bh_wbc() If a device is hot-removed --- for example, when a physical device is unplugged from pcie slot or a nbd device's network is shutdown --- this can result in a BUG_ON() crash in submit_bh_wbc(). This is because the when the block device dies, the buffer heads will have their Buffer_Mapped flag get cleared, leading to the crash in submit_bh_wbc. We had attempted to work around this problem in commit a17712c8 ("ext4: check superblock mapped prior to committing"). Unfortunately, it's still possible to hit the BUG_ON(!buffer_mapped(bh)) if the device dies between when the work-around check in ext4_commit_super() and when submit_bh_wbh() is finally called: Code path: ext4_commit_super judge if 'buffer_mapped(sbh)' is false, return <== commit a17712c8 lock_buffer(sbh) ... unlock_buffer(sbh) __sync_dirty_buffer(sbh,... lock_buffer(sbh) judge if 'buffer_mapped(sbh))' is false, return <== added by this patch submit_bh(...,sbh) submit_bh_wbc(...,sbh,...) [100722.966497] kernel BUG at fs/buffer.c:3095! <== BUG_ON(!buffer_mapped(bh))' in submit_bh_wbc() [100722.966503] invalid opcode: 0000 [#1] SMP [100722.966566] task: ffff8817e15a9e40 task.stack: ffffc90024744000 [100722.966574] RIP: 0010:submit_bh_wbc+0x180/0x190 [100722.966575] RSP: 0018:ffffc90024747a90 EFLAGS: 00010246 [100722.966576] RAX: 0000000000620005 RBX: ffff8818a80603a8 RCX: 0000000000000000 [100722.966576] RDX: ffff8818a80603a8 RSI: 0000000000020800 RDI: 0000000000000001 [100722.966577] RBP: ffffc90024747ac0 R08: 0000000000000000 R09: ffff88207f94170d [100722.966578] R10: 00000000000437c8 R11: 0000000000000001 R12: 0000000000020800 [100722.966578] R13: 0000000000000001 R14: 000000000bf9a438 R15: ffff88195f333000 [100722.966580] FS: 00007fa2eee27700(0000) GS:ffff88203d840000(0000) knlGS:0000000000000000 [100722.966580] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [100722.966581] CR2: 0000000000f0b008 CR3: 000000201a622003 CR4: 00000000007606e0 [100722.966582] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [100722.966583] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [100722.966583] PKRU: 55555554 [100722.966583] Call Trace: [100722.966588] __sync_dirty_buffer+0x6e/0xd0 [100722.966614] ext4_commit_super+0x1d8/0x290 [ext4] [100722.966626] __ext4_std_error+0x78/0x100 [ext4] [100722.966635] ? __ext4_journal_get_write_access+0xca/0x120 [ext4] [100722.966646] ext4_reserve_inode_write+0x58/0xb0 [ext4] [100722.966655] ? ext4_dirty_inode+0x48/0x70 [ext4] [100722.966663] ext4_mark_inode_dirty+0x53/0x1e0 [ext4] [100722.966671] ? __ext4_journal_start_sb+0x6d/0xf0 [ext4] [100722.966679] ext4_dirty_inode+0x48/0x70 [ext4] [100722.966682] __mark_inode_dirty+0x17f/0x350 [100722.966686] generic_update_time+0x87/0xd0 [100722.966687] touch_atime+0xa9/0xd0 [100722.966690] generic_file_read_iter+0xa09/0xcd0 [100722.966694] ? page_cache_tree_insert+0xb0/0xb0 [100722.966704] ext4_file_read_iter+0x4a/0x100 [ext4] [100722.966707] ? __inode_security_revalidate+0x4f/0x60 [100722.966709] __vfs_read+0xec/0x160 [100722.966711] vfs_read+0x8c/0x130 [100722.966712] SyS_pread64+0x87/0xb0 [100722.966716] do_syscall_64+0x67/0x1b0 [100722.966719] entry_SYSCALL64_slow_path+0x25/0x25 To address this, add the check of 'buffer_mapped(bh)' to __sync_dirty_buffer(). This also has the benefit of fixing this for other file systems. With this addition, we can drop the workaround in ext4_commit_supper(). [ Commit description rewritten by tytso. ] Signed-off-by: Xianting Tian Link: https://lore.kernel.org/r/1596211825-8750-1-git-send-email-xianting_tian@126.com Signed-off-by: Theodore Ts'o commit 16b89f695313d91c99bdaf6898f28a51d0af1b17 Author: Kees Cook Date: Fri Aug 7 10:53:54 2020 -0700 net/scm: Fix typo in SCM_RIGHTS compat refactoring When refactoring the SCM_RIGHTS code, I accidentally mis-merged my native/compat diffs, which entirely broke using SCM_RIGHTS in compat mode. Use the correct helper. Reported-by: Christian Zigotzky Link: https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-August/216156.html Reported-by: "Alex Xu (Hello71)" Link: https://lore.kernel.org/lkml/1596812929.lz7fuo8r2w.none@localhost/ Suggested-by: Thadeu Lima de Souza Cascardo Fixes: c0029de50982 ("net/scm: Regularize compat handling of scm_detach_fds()") Tested-by: Alex Xu (Hello71) Acked-by: Thadeu Lima de Souza Cascardo Signed-off-by: Kees Cook commit ce615f5c1f73537c8267035d58b3d0c70e19b8da Merge: 81e11336d97e7 00043a2689232 Author: Linus Torvalds Date: Fri Aug 7 12:41:36 2020 -0700 Merge tag 'dmaengine-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "Core: - Support out of order dma completion - Support for repeating transaction New controllers: - Support for Actions S700 DMA engine - Renesas R8A774E1, r8a7742 controller binding - New driver for Xilinx DPDMA controller Other: - Support of out of order dma completion in idxd driver - W=1 warning cleanup of subsystem - Updates to ti-k3-dma, dw, idxd drivers" * tag 'dmaengine-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (68 commits) dmaengine: dw: Don't include unneeded header to platform data header dmaengine: Actions: Add support for S700 DMA engine dmaengine: Actions: get rid of bit fields from dma descriptor dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml dmaengine: idxd: add missing invalid flags field to completion dmaengine: dw: Initialize max_sg_burst capability dmaengine: dw: Introduce max burst length hw config dmaengine: dw: Initialize min and max burst DMA device capability dmaengine: dw: Set DMA device max segment size parameter dmaengine: dw: Take HC_LLP flag into account for noLLP auto-config dmaengine: Introduce DMA-device device_caps callback dmaengine: Introduce max SG burst capability dmaengine: Introduce min burst length capability dt-bindings: dma: dw: Add max burst transaction length property dt-bindings: dma: dw: Convert DW DMAC to DT binding dmaengine: ti: k3-udma: Query throughput level information from hardware dmaengine: ti: k3-udma: Use defines for capabilities register parsing dmaengine: xilinx: dpdma: Fix kerneldoc warning dmaengine: xilinx: dpdma: add missing kernel doc dmaengine: xilinx: dpdma: remove comparison of unsigned expression ... commit 96cf2a2c75567ff56195fe3126d497a2e7e4379f Author: Eiichi Tsukata Date: Thu Aug 6 15:18:48 2020 -0700 xfs: Fix UBSAN null-ptr-deref in xfs_sysfs_init If xfs_sysfs_init is called with parent_kobj == NULL, UBSAN shows the following warning: UBSAN: null-ptr-deref in ./fs/xfs/xfs_sysfs.h:37:23 member access within null pointer of type 'struct xfs_kobj' Call Trace: dump_stack+0x10e/0x195 ubsan_type_mismatch_common+0x241/0x280 __ubsan_handle_type_mismatch_v1+0x32/0x40 init_xfs_fs+0x12b/0x28f do_one_initcall+0xdd/0x1d0 do_initcall_level+0x151/0x1b6 do_initcalls+0x50/0x8f do_basic_setup+0x29/0x2b kernel_init_freeable+0x19f/0x20b kernel_init+0x11/0x1e0 ret_from_fork+0x22/0x30 Fix it by checking parent_kobj before the code accesses its member. Signed-off-by: Eiichi Tsukata Reviewed-by: Darrick J. Wong [darrick: minor whitespace edits] Signed-off-by: Darrick J. Wong commit 81e11336d97e7a4c25a65c302ef2bf9cd9808ed4 Merge: 5631c5e0eb903 912c05720f00d Author: Linus Torvalds Date: Fri Aug 7 11:39:33 2020 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc updates from Andrew Morton: - a few MM hotfixes - kthread, tools, scripts, ntfs and ocfs2 - some of MM Subsystems affected by this patch series: kthread, tools, scripts, ntfs, ocfs2 and mm (hofixes, pagealloc, slab-generic, slab, slub, kcsan, debug, pagecache, gup, swap, shmem, memcg, pagemap, mremap, mincore, sparsemem, vmalloc, kasan, pagealloc, hugetlb and vmscan). * emailed patches from Andrew Morton : (162 commits) mm: vmscan: consistent update to pgrefill mm/vmscan.c: fix typo khugepaged: khugepaged_test_exit() check mmget_still_valid() khugepaged: retract_page_tables() remember to test exit khugepaged: collapse_pte_mapped_thp() protect the pmd lock khugepaged: collapse_pte_mapped_thp() flush the right range mm/hugetlb: fix calculation of adjust_range_if_pmd_sharing_possible mm: thp: replace HTTP links with HTTPS ones mm/page_alloc: fix memalloc_nocma_{save/restore} APIs mm/page_alloc.c: skip setting nodemask when we are in interrupt mm/page_alloc: fallbacks at most has 3 elements mm/page_alloc: silence a KASAN false positive mm/page_alloc.c: remove unnecessary end_bitidx for [set|get]_pfnblock_flags_mask() mm/page_alloc.c: simplify pageblock bitmap access mm/page_alloc.c: extract the common part in pfn_to_bitidx() mm/page_alloc.c: replace the definition of NR_MIGRATETYPE_BITS with PB_migratetype_bits mm/shuffle: remove dynamic reconfiguration mm/memory_hotplug: document why shuffle_zone() is relevant mm/page_alloc: remove nr_free_pagecache_pages() mm: remove vm_total_pages ... commit 912c05720f00d039103d356a59c37dc7c3995e01 Author: Shakeel Butt Date: Thu Aug 6 23:26:32 2020 -0700 mm: vmscan: consistent update to pgrefill The vmstat pgrefill is useful together with pgscan and pgsteal stats to measure the reclaim efficiency. However vmstat's pgrefill is not updated consistently at system level. It gets updated for both global and memcg reclaim however pgscan and pgsteal are updated for only global reclaim. So, update pgrefill only for global reclaim. If someone is interested in the stats representing both system level as well as memcg level reclaim, then consult the root memcg's memory.stat instead of /proc/vmstat. Signed-off-by: Shakeel Butt Signed-off-by: Andrew Morton Acked-by: Yafang Shao Acked-by: Roman Gushchin Acked-by: Chris Down Cc: Johannes Weiner Cc: Michal Hocko Link: http://lkml.kernel.org/r/20200711011459.1159929-1-shakeelb@google.com Signed-off-by: Linus Torvalds commit 238c30468f46b16d7c22df175da11109346e769c Author: dylan-meiners Date: Thu Aug 6 23:26:29 2020 -0700 mm/vmscan.c: fix typo Change "optizimation" to "optimization". Signed-off-by: dylan-meiners Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Link: http://lkml.kernel.org/r/20200609185144.10049-1-spacct.spacct@gmail.com Signed-off-by: Linus Torvalds commit bbe98f9cadff58cdd6a4acaeba0efa8565dabe65 Author: Hugh Dickins Date: Thu Aug 6 23:26:25 2020 -0700 khugepaged: khugepaged_test_exit() check mmget_still_valid() Move collapse_huge_page()'s mmget_still_valid() check into khugepaged_test_exit() itself. collapse_huge_page() is used for anon THP only, and earned its mmget_still_valid() check because it inserts a huge pmd entry in place of the page table's pmd entry; whereas collapse_file()'s retract_page_tables() or collapse_pte_mapped_thp() merely clears the page table's pmd entry. But core dumping without mmap lock must have been as open to mistaking a racily cleared pmd entry for a page table at physical page 0, as exit_mmap() was. And we certainly have no interest in mapping as a THP once dumping core. Fixes: 59ea6d06cfa9 ("coredump: fix race condition between collapse_huge_page() and core dumping") Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Cc: Andrea Arcangeli Cc: Song Liu Cc: Mike Kravetz Cc: Kirill A. Shutemov Cc: [4.8+] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008021217020.27773@eggly.anvils Signed-off-by: Linus Torvalds commit 18e77600f7a1ed69f8ce46c9e11cad0985712dfa Author: Hugh Dickins Date: Thu Aug 6 23:26:22 2020 -0700 khugepaged: retract_page_tables() remember to test exit Only once have I seen this scenario (and forgot even to notice what forced the eventual crash): a sequence of "BUG: Bad page map" alerts from vm_normal_page(), from zap_pte_range() servicing exit_mmap(); pmd:00000000, pte values corresponding to data in physical page 0. The pte mappings being zapped in this case were supposed to be from a huge page of ext4 text (but could as well have been shmem): my belief is that it was racing with collapse_file()'s retract_page_tables(), found *pmd pointing to a page table, locked it, but *pmd had become 0 by the time start_pte was decided. In most cases, that possibility is excluded by holding mmap lock; but exit_mmap() proceeds without mmap lock. Most of what's run by khugepaged checks khugepaged_test_exit() after acquiring mmap lock: khugepaged_collapse_pte_mapped_thps() and hugepage_vma_revalidate() do so, for example. But retract_page_tables() did not: fix that. The fix is for retract_page_tables() to check khugepaged_test_exit(), after acquiring mmap lock, before doing anything to the page table. Getting the mmap lock serializes with __mmput(), which briefly takes and drops it in __khugepaged_exit(); then the khugepaged_test_exit() check on mm_users makes sure we don't touch the page table once exit_mmap() might reach it, since exit_mmap() will be proceeding without mmap lock, not expecting anyone to be racing with it. Fixes: f3f0e1d2150b ("khugepaged: add support of collapse for tmpfs/shmem pages") Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Acked-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Mike Kravetz Cc: Song Liu Cc: [4.8+] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008021215400.27773@eggly.anvils Signed-off-by: Linus Torvalds commit 119a5fc16105b2b9383a6e2a7800b2ef861b2975 Author: Hugh Dickins Date: Thu Aug 6 23:26:18 2020 -0700 khugepaged: collapse_pte_mapped_thp() protect the pmd lock When retract_page_tables() removes a page table to make way for a huge pmd, it holds huge page lock, i_mmap_lock_write, mmap_write_trylock and pmd lock; but when collapse_pte_mapped_thp() does the same (to handle the case when the original mmap_write_trylock had failed), only mmap_write_trylock and pmd lock are held. That's not enough. One machine has twice crashed under load, with "BUG: spinlock bad magic" and GPF on 6b6b6b6b6b6b6b6b. Examining the second crash, page_vma_mapped_walk_done()'s spin_unlock of pvmw->ptl (serving page_referenced() on a file THP, that had found a page table at *pmd) discovers that the page table page and its lock have already been freed by the time it comes to unlock. Follow the example of retract_page_tables(), but we only need one of huge page lock or i_mmap_lock_write to secure against this: because it's the narrower lock, and because it simplifies collapse_pte_mapped_thp() to know the hpage earlier, choose to rely on huge page lock here. Fixes: 27e1f8273113 ("khugepaged: enable collapse pmd for pte-mapped THP") Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Acked-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Mike Kravetz Cc: Song Liu Cc: [5.4+] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008021213070.27773@eggly.anvils Signed-off-by: Linus Torvalds commit 723a80dafed5c95889d48baab9aa433a6ffa0b4e Author: Hugh Dickins Date: Thu Aug 6 23:26:15 2020 -0700 khugepaged: collapse_pte_mapped_thp() flush the right range pmdp_collapse_flush() should be given the start address at which the huge page is mapped, haddr: it was given addr, which at that point has been used as a local variable, incremented to the end address of the extent. Found by source inspection while chasing a hugepage locking bug, which I then could not explain by this. At first I thought this was very bad; then saw that all of the page translations that were not flushed would actually still point to the right pages afterwards, so harmless; then realized that I know nothing of how different architectures and models cache intermediate paging structures, so maybe it matters after all - particularly since the page table concerned is immediately freed. Much easier to fix than to think about. Fixes: 27e1f8273113 ("khugepaged: enable collapse pmd for pte-mapped THP") Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Acked-by: Kirill A. Shutemov Cc: Andrea Arcangeli Cc: Mike Kravetz Cc: Song Liu Cc: [5.4+] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008021204390.27773@eggly.anvils Signed-off-by: Linus Torvalds commit 75802ca66354a39ab8e35822747cd08b3384a99a Author: Peter Xu Date: Thu Aug 6 23:26:11 2020 -0700 mm/hugetlb: fix calculation of adjust_range_if_pmd_sharing_possible This is found by code observation only. Firstly, the worst case scenario should assume the whole range was covered by pmd sharing. The old algorithm might not work as expected for ranges like (1g-2m, 1g+2m), where the adjusted range should be (0, 1g+2m) but the expected range should be (0, 2g). Since at it, remove the loop since it should not be required. With that, the new code should be faster too when the invalidating range is huge. Mike said: : With range (1g-2m, 1g+2m) within a vma (0, 2g) the existing code will only : adjust to (0, 1g+2m) which is incorrect. : : We should cc stable. The original reason for adjusting the range was to : prevent data corruption (getting wrong page). Since the range is not : always adjusted correctly, the potential for corruption still exists. : : However, I am fairly confident that adjust_range_if_pmd_sharing_possible : is only gong to be called in two cases: : : 1) for a single page : 2) for range == entire vma : : In those cases, the current code should produce the correct results. : : To be safe, let's just cc stable. Fixes: 017b1660df89 ("mm: migration: fix migration of huge PMD shared pages") Signed-off-by: Peter Xu Signed-off-by: Andrew Morton Reviewed-by: Mike Kravetz Cc: Andrea Arcangeli Cc: Matthew Wilcox Cc: Link: http://lkml.kernel.org/r/20200730201636.74778-1-peterx@redhat.com Signed-off-by: Linus Torvalds commit 42742d9bde2a8e11ec932cb5821f720a40a7c2a9 Author: Alexander A. Klimov Date: Thu Aug 6 23:26:08 2020 -0700 mm: thp: replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `xmlns`: For each link, `http://[^# ]*(?:\w|/)`: If neither `gnu\.org/license`, nor `mozilla\.org/MPL`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. [akpm@linux-foundation.org: fix amd.com URL, per Vlastimil] Signed-off-by: Alexander A. Klimov Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Vlastimil Babka Link: http://lkml.kernel.org/r/20200713164345.36088-1-grandmaster@al2klimov.de Signed-off-by: Linus Torvalds commit 8510e69c8efef82f2b37ea3e8ea19a27122c533e Author: Joonsoo Kim Date: Thu Aug 6 23:26:04 2020 -0700 mm/page_alloc: fix memalloc_nocma_{save/restore} APIs Currently, memalloc_nocma_{save/restore} API that prevents CMA area in page allocation is implemented by using current_gfp_context(). However, there are two problems of this implementation. First, this doesn't work for allocation fastpath. In the fastpath, original gfp_mask is used since current_gfp_context() is introduced in order to control reclaim and it is on slowpath. So, CMA area can be allocated through the allocation fastpath even if memalloc_nocma_{save/restore} APIs are used. Currently, there is just one user for these APIs and it has a fallback method to prevent actual problem. Second, clearing __GFP_MOVABLE in current_gfp_context() has a side effect to exclude the memory on the ZONE_MOVABLE for allocation target. To fix these problems, this patch changes the implementation to exclude CMA area in page allocation. Main point of this change is using the alloc_flags. alloc_flags is mainly used to control allocation so it fits for excluding CMA area in allocation. Fixes: d7fefcc8de91 (mm/cma: add PF flag to force non cma alloc) Signed-off-by: Joonsoo Kim Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Cc: Christoph Hellwig Cc: Roman Gushchin Cc: Mike Kravetz Cc: Naoya Horiguchi Cc: Michal Hocko Cc: "Aneesh Kumar K . V" Link: http://lkml.kernel.org/r/1595468942-29687-1-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Linus Torvalds commit 182f3d7a02fddd9e4b1181c2ba710a930e05ddbb Author: Muchun Song Date: Thu Aug 6 23:26:01 2020 -0700 mm/page_alloc.c: skip setting nodemask when we are in interrupt When we are in the interrupt context, it is irrelevant to the current task context. If we use current task's mems_allowed, we can be fair to alloc pages in the fast path and fall back to slow path memory allocation when the current node(which is the current task mems_allowed) does not have enough memory to allocate. In this case, it slows down the memory allocation speed of interrupt context. So we can skip setting the nodemask to allow any node to allocate memory, so that fast path allocation can success. Signed-off-by: Muchun Song Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Cc: David Hildenbrand Link: http://lkml.kernel.org/r/20200706025921.53683-1-songmuchun@bytedance.com Signed-off-by: Linus Torvalds commit da4156639985a9cdba9727d7f39b69a6b4268dad Author: Wei Yang Date: Thu Aug 6 23:25:58 2020 -0700 mm/page_alloc: fallbacks at most has 3 elements MIGRAGE_TYPES is used to be the mark of end and there are at most 3 elements for the one dimension array. Reduce to 3 to save little memory. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Link: http://lkml.kernel.org/r/20200625231022.18784-1-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 9e15afa5a87a3bf969a3b33c3dadfb8b46df42c0 Author: Qian Cai Date: Thu Aug 6 23:25:54 2020 -0700 mm/page_alloc: silence a KASAN false positive kernel_init_free_pages() will use memset() on s390 to clear all pages from kmalloc_order() which will override KASAN redzones because a redzone was setup from the end of the allocation size to the end of the last page. Silence it by not reporting it there. An example of the report is, BUG: KASAN: slab-out-of-bounds in __free_pages_ok Write of size 4096 at addr 000000014beaa000 Call Trace: show_stack+0x152/0x210 dump_stack+0x1f8/0x248 print_address_description.isra.13+0x5e/0x4d0 kasan_report+0x130/0x178 check_memory_region+0x190/0x218 memset+0x34/0x60 __free_pages_ok+0x894/0x12f0 kfree+0x4f2/0x5e0 unpack_to_rootfs+0x60e/0x650 populate_rootfs+0x56/0x358 do_one_initcall+0x1f4/0xa20 kernel_init_freeable+0x758/0x7e8 kernel_init+0x1c/0x170 ret_from_fork+0x24/0x28 Memory state around the buggy address: 000000014bea9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 000000014bea9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >000000014beaa000: 03 fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ^ 000000014beaa080: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe 000000014beaa100: fe fe fe fe fe fe fe fe fe fe fe fe fe fe Fixes: 6471384af2a6 ("mm: security: introduce init_on_alloc=1 and init_on_free=1 boot options") Signed-off-by: Qian Cai Signed-off-by: Andrew Morton Tested-by: Vasily Gorbik Acked-by: Vasily Gorbik Cc: Dmitry Vyukov Cc: Christian Borntraeger Cc: Alexander Potapenko Cc: Kees Cook Cc: Heiko Carstens Link: http://lkml.kernel.org/r/20200610052154.5180-1-cai@lca.pw Signed-off-by: Linus Torvalds commit 535b81e209219e03f815379746bfd1eeb82d68e5 Author: Wei Yang Date: Thu Aug 6 23:25:51 2020 -0700 mm/page_alloc.c: remove unnecessary end_bitidx for [set|get]_pfnblock_flags_mask() After previous cleanup, the end_bitidx is not necessary any more. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Cc: Mel Gorman Link: http://lkml.kernel.org/r/20200623124201.8199-4-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit d93d5ab9ca01e24efc6add60371b0d5684b5c146 Author: Wei Yang Date: Thu Aug 6 23:25:48 2020 -0700 mm/page_alloc.c: simplify pageblock bitmap access Due to commit e58469bafd05 ("mm: page_alloc: use word-based accesses for get/set pageblock bitmaps"), pageblock bitmap is accessed with word-based access. This operation could be simplified a little. Intuitively, if we want to get a bit range [start_idx, end_idx] in a word, we can do like this: mask = (1 << (end_bitidx - start_bitidx + 1)) - 1; ret = (word >> start_idx) & mask; And also if we want to set a bit range [start_idx, end_idx] with flags, we can do the same by just shift start_bitidx. By doing so we reduce some instructions for these two helper functions: Before Patched set_pfnblock_flags_mask 209 198(-5%) get_pfnblock_flags_mask 101 87(-13%) Since the syntax is changed a little, we need to check the whole 4-bit migrate_type instead of part of it. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Cc: Mel Gorman Link: http://lkml.kernel.org/r/20200623124201.8199-3-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 399b795b7a80bf703aae56fa0b66fd1949ca1fd9 Author: Wei Yang Date: Thu Aug 6 23:25:44 2020 -0700 mm/page_alloc.c: extract the common part in pfn_to_bitidx() The return value calculation is the same both for SPARSEMEM or not. Just take it out. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Cc: Mel Gorman Link: http://lkml.kernel.org/r/20200623124201.8199-2-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit d38ac97f8a7c4519ba141bbd7c2f7a8da8c9ff8d Author: Wei Yang Date: Thu Aug 6 23:25:41 2020 -0700 mm/page_alloc.c: replace the definition of NR_MIGRATETYPE_BITS with PB_migratetype_bits We already have the definition of PB_migratetype_bits and current NR_MIGRATETYPE_BITS looks like a cyclic definition. Just use PB_migratetype_bits is enough. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Cc: Mel Gorman Link: http://lkml.kernel.org/r/20200623124201.8199-1-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 839195352d8235072dcaac054b2e26b2dd2213e5 Author: David Hildenbrand Date: Thu Aug 6 23:25:38 2020 -0700 mm/shuffle: remove dynamic reconfiguration Commit e900a918b098 ("mm: shuffle initial free memory to improve memory-side-cache utilization") promised "autodetection of a memory-side-cache (to be added in a follow-on patch)" over a year ago. The original series included patches [1], however, they were dropped during review [2] to be followed-up later. Due to lack of platforms that publish an HMAT, autodetection is currently not implemented. However, manual activation is actively used [3]. Let's simplify for now and re-add when really (ever?) needed. [1] https://lkml.kernel.org/r/154510700291.1941238.817190985966612531.stgit@dwillia2-desk3.amr.corp.intel.com [2] https://lkml.kernel.org/r/154690326478.676627.103843791978176914.stgit@dwillia2-desk3.amr.corp.intel.com [3] https://lkml.kernel.org/r/CAPcyv4irwGUU2x+c6b4L=KbB1dnasNKaaZd6oSpYjL9kfsnROQ@mail.gmail.com Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Wei Yang Acked-by: Dan Williams Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Michal Hocko Cc: Minchan Kim Cc: Huang Ying Cc: Wei Yang Cc: Mel Gorman Cc: Dan Williams Link: http://lkml.kernel.org/r/20200624094741.9918-4-david@redhat.com Signed-off-by: Linus Torvalds commit 93146d98ce73fa416be3ffa147247a2454645ebc Author: David Hildenbrand Date: Thu Aug 6 23:25:35 2020 -0700 mm/memory_hotplug: document why shuffle_zone() is relevant It's not completely obvious why we have to shuffle the complete zone - introduced in commit e900a918b098 ("mm: shuffle initial free memory to improve memory-side-cache utilization") - because some sort of shuffling is already performed when onlining pages via __free_one_page(), placing MAX_ORDER-1 pages either to the head or the tail of the freelist. Let's document why we have to shuffle the complete zone when exposing larger, contiguous physical memory areas to the buddy. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Acked-by: Dan Williams Acked-by: Michal Hocko Cc: Alexander Duyck Cc: Dan Williams Cc: Michal Hocko Link: http://lkml.kernel.org/r/20200624094741.9918-3-david@redhat.com Signed-off-by: Linus Torvalds commit 56b9413bcb369f1329a438c7b61d235b4123e794 Author: David Hildenbrand Date: Thu Aug 6 23:25:30 2020 -0700 mm/page_alloc: remove nr_free_pagecache_pages() nr_free_pagecache_pages() isn't used outside page_alloc.c anymore - and the name does not really help to understand what's going on. Let's open-code it instead and add a comment. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Reviewed-by: Mike Rapoport Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Minchan Kim Cc: Huang Ying Link: http://lkml.kernel.org/r/20200619132410.23859-3-david@redhat.com Signed-off-by: Linus Torvalds commit 0a18e60788d6a39436e8b5e91001b790043fc29c Author: David Hildenbrand Date: Thu Aug 6 23:25:27 2020 -0700 mm: remove vm_total_pages The global variable "vm_total_pages" is a relic from older days. There is only a single user that reads the variable - build_all_zonelists() - and the first thing it does is update it. Use a local variable in build_all_zonelists() instead and remove the global variable. Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Wei Yang Reviewed-by: Pankaj Gupta Reviewed-by: Mike Rapoport Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Huang Ying Cc: Minchan Kim Link: http://lkml.kernel.org/r/20200619132410.23859-2-david@redhat.com Signed-off-by: Linus Torvalds commit f80b08fc44536a311a9f3182e50f318b79076425 Author: Charan Teja Reddy Date: Thu Aug 6 23:25:24 2020 -0700 mm, page_alloc: skip ->waternark_boost for atomic order-0 allocations When boosting is enabled, it is observed that rate of atomic order-0 allocation failures are high due to the fact that free levels in the system are checked with ->watermark_boost offset. This is not a problem for sleepable allocations but for atomic allocations which looks like regression. This problem is seen frequently on system setup of Android kernel running on Snapdragon hardware with 4GB RAM size. When no extfrag event occurred in the system, ->watermark_boost factor is zero, thus the watermark configurations in the system are: _watermark = ( [WMARK_MIN] = 1272, --> ~5MB [WMARK_LOW] = 9067, --> ~36MB [WMARK_HIGH] = 9385), --> ~38MB watermark_boost = 0 After launching some memory hungry applications in Android which can cause extfrag events in the system to an extent that ->watermark_boost can be set to max i.e. default boost factor makes it to 150% of high watermark. _watermark = ( [WMARK_MIN] = 1272, --> ~5MB [WMARK_LOW] = 9067, --> ~36MB [WMARK_HIGH] = 9385), --> ~38MB watermark_boost = 14077, -->~57MB With default system configuration, for an atomic order-0 allocation to succeed, having free memory of ~2MB will suffice. But boosting makes the min_wmark to ~61MB thus for an atomic order-0 allocation to be successful system should have minimum of ~23MB of free memory(from calculations of zone_watermark_ok(), min = 3/4(min/2)). But failures are observed despite system is having ~20MB of free memory. In the testing, this is reproducible as early as first 300secs since boot and with furtherlowram configurations(<2GB) it is observed as early as first 150secs since boot. These failures can be avoided by excluding the ->watermark_boost in watermark caluculations for atomic order-0 allocations. [akpm@linux-foundation.org: fix comment grammar, reflow comment] [charante@codeaurora.org: fix suggested by Mel Gorman] Link: http://lkml.kernel.org/r/31556793-57b1-1c21-1a9d-22674d9bd938@codeaurora.org Signed-off-by: Charan Teja Reddy Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Vinayak Menon Cc: Mel Gorman Link: http://lkml.kernel.org/r/1589882284-21010-1-git-send-email-charante@codeaurora.org Signed-off-by: Linus Torvalds commit f27ce0e14088b23f8d54ae4a44f70307ec420e64 Author: Jaewon Kim Date: Thu Aug 6 23:25:20 2020 -0700 page_alloc: consider highatomic reserve in watermark fast zone_watermark_fast was introduced by commit 48ee5f3696f6 ("mm, page_alloc: shortcut watermark checks for order-0 pages"). The commit simply checks if free pages is bigger than watermark without additional calculation such like reducing watermark. It considered free cma pages but it did not consider highatomic reserved. This may incur exhaustion of free pages except high order atomic free pages. Assume that reserved_highatomic pageblock is bigger than watermark min, and there are only few free pages except high order atomic free. Because zone_watermark_fast passes the allocation without considering high order atomic free, normal reclaimable allocation like GFP_HIGHUSER will consume all the free pages. Then finally order-0 atomic allocation may fail on allocation. This means watermark min is not protected against non-atomic allocation. The order-0 atomic allocation with ALLOC_HARDER unwantedly can be failed. Additionally the __GFP_MEMALLOC allocation with ALLOC_NO_WATERMARKS also can be failed. To avoid the problem, zone_watermark_fast should consider highatomic reserve. If the actual size of high atomic free is counted accurately like cma free, we may use it. On this patch just use nr_reserved_highatomic. Additionally introduce __zone_watermark_unusable_free to factor out common parts between zone_watermark_fast and __zone_watermark_ok. This is an example of ALLOC_HARDER allocation failure using v4.19 based kernel. Binder:9343_3: page allocation failure: order:0, mode:0x480020(GFP_ATOMIC), nodemask=(null) Call trace: [] dump_stack+0xb8/0xf0 [] warn_alloc+0xd8/0x12c [] __alloc_pages_nodemask+0x120c/0x1250 [] new_slab+0x128/0x604 [] ___slab_alloc+0x508/0x670 [] __kmalloc+0x2f8/0x310 [] context_struct_to_string+0x104/0x1cc [] security_sid_to_context_core+0x74/0x144 [] security_sid_to_context+0x10/0x18 [] selinux_secid_to_secctx+0x20/0x28 [] security_secid_to_secctx+0x3c/0x70 [] binder_transaction+0xe68/0x454c Mem-Info: active_anon:102061 inactive_anon:81551 isolated_anon:0 active_file:59102 inactive_file:68924 isolated_file:64 unevictable:611 dirty:63 writeback:0 unstable:0 slab_reclaimable:13324 slab_unreclaimable:44354 mapped:83015 shmem:4858 pagetables:26316 bounce:0 free:2727 free_pcp:1035 free_cma:178 Node 0 active_anon:408244kB inactive_anon:326204kB active_file:236408kB inactive_file:275696kB unevictable:2444kB isolated(anon):0kB isolated(file):256kB mapped:332060kB dirty:252kB writeback:0kB shmem:19432kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Normal free:10908kB min:6192kB low:44388kB high:47060kB active_anon:409160kB inactive_anon:325924kB active_file:235820kB inactive_file:276628kB unevictable:2444kB writepending:252kB present:3076096kB managed:2673676kB mlocked:2444kB kernel_stack:62512kB pagetables:105264kB bounce:0kB free_pcp:4140kB local_pcp:40kB free_cma:712kB lowmem_reserve[]: 0 0 Normal: 505*4kB (H) 357*8kB (H) 201*16kB (H) 65*32kB (H) 1*64kB (H) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 10236kB 138826 total pagecache pages 5460 pages in swap cache Swap cache stats: add 8273090, delete 8267506, find 1004381/4060142 This is an example of ALLOC_NO_WATERMARKS allocation failure using v4.14 based kernel. kswapd0: page allocation failure: order:0, mode:0x140000a(GFP_NOIO|__GFP_HIGHMEM|__GFP_MOVABLE), nodemask=(null) kswapd0 cpuset=/ mems_allowed=0 CPU: 4 PID: 1221 Comm: kswapd0 Not tainted 4.14.113-18770262-userdebug #1 Call trace: [<0000000000000000>] dump_backtrace+0x0/0x248 [<0000000000000000>] show_stack+0x18/0x20 [<0000000000000000>] __dump_stack+0x20/0x28 [<0000000000000000>] dump_stack+0x68/0x90 [<0000000000000000>] warn_alloc+0x104/0x198 [<0000000000000000>] __alloc_pages_nodemask+0xdc0/0xdf0 [<0000000000000000>] zs_malloc+0x148/0x3d0 [<0000000000000000>] zram_bvec_rw+0x410/0x798 [<0000000000000000>] zram_rw_page+0x88/0xdc [<0000000000000000>] bdev_write_page+0x70/0xbc [<0000000000000000>] __swap_writepage+0x58/0x37c [<0000000000000000>] swap_writepage+0x40/0x4c [<0000000000000000>] shrink_page_list+0xc30/0xf48 [<0000000000000000>] shrink_inactive_list+0x2b0/0x61c [<0000000000000000>] shrink_node_memcg+0x23c/0x618 [<0000000000000000>] shrink_node+0x1c8/0x304 [<0000000000000000>] kswapd+0x680/0x7c4 [<0000000000000000>] kthread+0x110/0x120 [<0000000000000000>] ret_from_fork+0x10/0x18 Mem-Info: active_anon:111826 inactive_anon:65557 isolated_anon:0\x0a active_file:44260 inactive_file:83422 isolated_file:0\x0a unevictable:4158 dirty:117 writeback:0 unstable:0\x0a slab_reclaimable:13943 slab_unreclaimable:43315\x0a mapped:102511 shmem:3299 pagetables:19566 bounce:0\x0a free:3510 free_pcp:553 free_cma:0 Node 0 active_anon:447304kB inactive_anon:262228kB active_file:177040kB inactive_file:333688kB unevictable:16632kB isolated(anon):0kB isolated(file):0kB mapped:410044kB d irty:468kB writeback:0kB shmem:13196kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no Normal free:14040kB min:7440kB low:94500kB high:98136kB reserved_highatomic:32768KB active_anon:447336kB inactive_anon:261668kB active_file:177572kB inactive_file:333768k B unevictable:16632kB writepending:480kB present:4081664kB managed:3637088kB mlocked:16632kB kernel_stack:47072kB pagetables:78264kB bounce:0kB free_pcp:2280kB local_pcp:720kB free_cma:0kB [ 4738.329607] lowmem_reserve[]: 0 0 Normal: 860*4kB (H) 453*8kB (H) 180*16kB (H) 26*32kB (H) 34*64kB (H) 6*128kB (H) 2*256kB (H) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 14232kB This is trace log which shows GFP_HIGHUSER consumes free pages right before ALLOC_NO_WATERMARKS. <...>-22275 [006] .... 889.213383: mm_page_alloc: page=00000000d2be5665 pfn=970744 order=0 migratetype=0 nr_free=3650 gfp_flags=GFP_HIGHUSER|__GFP_ZERO <...>-22275 [006] .... 889.213385: mm_page_alloc: page=000000004b2335c2 pfn=970745 order=0 migratetype=0 nr_free=3650 gfp_flags=GFP_HIGHUSER|__GFP_ZERO <...>-22275 [006] .... 889.213387: mm_page_alloc: page=00000000017272e1 pfn=970278 order=0 migratetype=0 nr_free=3650 gfp_flags=GFP_HIGHUSER|__GFP_ZERO <...>-22275 [006] .... 889.213389: mm_page_alloc: page=00000000c4be79fb pfn=970279 order=0 migratetype=0 nr_free=3650 gfp_flags=GFP_HIGHUSER|__GFP_ZERO <...>-22275 [006] .... 889.213391: mm_page_alloc: page=00000000f8a51d4f pfn=970260 order=0 migratetype=0 nr_free=3650 gfp_flags=GFP_HIGHUSER|__GFP_ZERO <...>-22275 [006] .... 889.213393: mm_page_alloc: page=000000006ba8f5ac pfn=970261 order=0 migratetype=0 nr_free=3650 gfp_flags=GFP_HIGHUSER|__GFP_ZERO <...>-22275 [006] .... 889.213395: mm_page_alloc: page=00000000819f1cd3 pfn=970196 order=0 migratetype=0 nr_free=3650 gfp_flags=GFP_HIGHUSER|__GFP_ZERO <...>-22275 [006] .... 889.213396: mm_page_alloc: page=00000000f6b72a64 pfn=970197 order=0 migratetype=0 nr_free=3650 gfp_flags=GFP_HIGHUSER|__GFP_ZERO kswapd0-1207 [005] ...1 889.213398: mm_page_alloc: page= (null) pfn=0 order=0 migratetype=1 nr_free=3650 gfp_flags=GFP_NOWAIT|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_MOVABLE [jaewon31.kim@samsung.com: remove redundant code for high-order] Link: http://lkml.kernel.org/r/20200623035242.27232-1-jaewon31.kim@samsung.com Reported-by: Yong-Taek Lee Suggested-by: Minchan Kim Signed-off-by: Jaewon Kim Signed-off-by: Andrew Morton Reviewed-by: Baoquan He Acked-by: Vlastimil Babka Acked-by: Mel Gorman Cc: Johannes Weiner Cc: Yong-Taek Lee Cc: Michal Hocko Link: http://lkml.kernel.org/r/20200619235958.11283-1-jaewon31.kim@samsung.com Signed-off-by: Linus Torvalds commit deba04872be44e1c005364c276495a3b425dfbe6 Author: Vlastimil Babka Date: Thu Aug 6 23:25:16 2020 -0700 mm, page_alloc: use unlikely() in task_capc() Hugh noted that task_capc() could use unlikely(), as most of the time there is no capture in progress and we are in page freeing hot path. Indeed adding unlikely() produces assembly that better matches the assumption and moves all the tests away from the hot path. I have also noticed that we don't need to test for cc->direct_compaction as the only place we set current->task_capture is compact_zone_order() which also always sets cc->direct_compaction true. Suggested-by: Hugh Dickins Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Acked-by: Hugh Dickins Acked-by: Mel Gorman Cc: Alex Shi Cc: Li Wang Link: http://lkml.kernel.org/r/4a24f7af-3aa5-6e80-4ae6-8f253b562039@suse.cz Signed-off-by: Linus Torvalds commit 51dcc81c282dc401dfd8460a7e59546bc1b30e32 Author: Andrey Konovalov Date: Thu Aug 6 23:25:12 2020 -0700 kasan: adjust kasan_stack_oob for tag-based mode Use OOB_TAG_OFF as access offset to land the access into the next granule. Suggested-by: Walter Wu Signed-off-by: Andrey Konovalov Signed-off-by: Andrew Morton Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Elena Petrova Cc: Marco Elver Cc: Vincenzo Frascino Cc: Ard Biesheuvel Link: http://lkml.kernel.org/r/403b259f1de49a7a3694531c851ac28326a586a8.1596199677.git.andreyknvl@google.com Link: http://lkml.kernel.org/r/3063ab1411e92bce36061a96e25b651212e70ba6.1596544734.git.andreyknvl@google.com Signed-off-by: Linus Torvalds commit cae9dc35ed9ff82a99754e51d57ff6c332e1f7e4 Author: Andrey Konovalov Date: Thu Aug 6 23:25:08 2020 -0700 kasan: allow enabling stack tagging for tag-based mode Use CONFIG_KASAN_STACK to enable stack tagging. Note, that HWASAN short granules [1] are disabled. Supporting those will require more kernel changes. [1] https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html Signed-off-by: Andrey Konovalov Signed-off-by: Andrew Morton Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Elena Petrova Cc: Marco Elver Cc: Vincenzo Frascino Cc: Walter Wu Cc: Ard Biesheuvel Link: http://lkml.kernel.org/r/e7febb907b539c3730780df587ce0b38dc558c3d.1596199677.git.andreyknvl@google.com Link: http://lkml.kernel.org/r/99f7d90a4237431bf5988599fb41358e92876eb0.1596544734.git.andreyknvl@google.com Signed-off-by: Linus Torvalds commit f9409d58e972cada2c524b7f1e54631bb8fa176f Author: Andrey Konovalov Date: Thu Aug 6 23:25:05 2020 -0700 kasan, arm64: don't instrument functions that enable kasan This patch prepares Software Tag-Based KASAN for stack tagging support. With stack tagging enabled, KASAN tags stack variable in each function in its prologue. In start_kernel() stack variables get tagged before KASAN is enabled via setup_arch()->kasan_init(). As the result the tags for start_kernel()'s stack variables end up in the temporary shadow memory. Later when KASAN gets enabled, switched to normal shadow, and starts checking tags, this leads to false-positive reports, as proper tags are missing in normal shadow. Disable KASAN instrumentation for start_kernel(). Also disable it for arm64's setup_arch() as a precaution (it doesn't have any stack variables right now). [andreyknvl@google.com: reorder attributes for start_kernel()] Link: http://lkml.kernel.org/r/26fb6165a17abcf61222eda5184c030fb6b133d1.1596544734.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Signed-off-by: Andrew Morton Acked-by: Catalin Marinas [arm64] Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Cc: Elena Petrova Cc: Marco Elver Cc: Vincenzo Frascino Cc: Walter Wu Cc: Ard Biesheuvel Link: http://lkml.kernel.org/r/55d432671a92e931ab8234b03dc36b14d4c21bfb.1596199677.git.andreyknvl@google.com Signed-off-by: Linus Torvalds commit 2c547f9da0539ad1f7ef7f08c8c82036d61b011a Author: Andrey Konovalov Date: Thu Aug 6 23:25:01 2020 -0700 efi: provide empty efi_enter_virtual_mode implementation When CONFIG_EFI is not enabled, we might get an undefined reference to efi_enter_virtual_mode() error, if this efi_enabled() call isn't inlined into start_kernel(). This happens in particular, if start_kernel() is annodated with __no_sanitize_address. Reported-by: kernel test robot Signed-off-by: Andrey Konovalov Signed-off-by: Andrew Morton Acked-by: Ard Biesheuvel Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Elena Petrova Cc: Marco Elver Cc: Vincenzo Frascino Cc: Walter Wu Link: http://lkml.kernel.org/r/6514652d3a32d3ed33d6eb5c91d0af63bf0d1a0c.1596544734.git.andreyknvl@google.com Signed-off-by: Linus Torvalds commit 8dcc1d34661d58a7889fb06517c8738d1412d1bc Author: Andrey Konovalov Date: Thu Aug 6 23:24:57 2020 -0700 kasan: don't tag stacks allocated with pagealloc Patch series "kasan: support stack instrumentation for tag-based mode", v2. This patch (of 5): Prepare Software Tag-Based KASAN for stack tagging support. With Tag-Based KASAN when kernel stacks are allocated via pagealloc (which happens when CONFIG_VMAP_STACK is not enabled), they get tagged. KASAN instrumentation doesn't expect the sp register to be tagged, and this leads to false-positive reports. Fix by resetting the tag of kernel stack pointers after allocation. Signed-off-by: Andrey Konovalov Signed-off-by: Andrew Morton Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Marco Elver Cc: Walter Wu Cc: Elena Petrova Cc: Vincenzo Frascino Cc: Catalin Marinas Cc: Ard Biesheuvel Link: http://lkml.kernel.org/r/cover.1596199677.git.andreyknvl@google.com Link: http://lkml.kernel.org/r/cover.1596544734.git.andreyknvl@google.com Link: http://lkml.kernel.org/r/12d8c678869268dd0884b01271ab592f30792abf.1596544734.git.andreyknvl@google.com Link: http://lkml.kernel.org/r/01c678b877755bcf29009176592402cdf6f2cb15.1596199677.git.andreyknvl@google.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=203497 Signed-off-by: Linus Torvalds commit f33a01492a24a276e0bc1c932bcefdb8c1125159 Author: Walter Wu Date: Thu Aug 6 23:24:54 2020 -0700 lib/test_kasan.c: fix KASAN unit tests for tag-based KASAN We use tag-based KASAN, then KASAN unit tests don't detect out-of-bounds memory access. They need to be fixed. With tag-based KASAN, the state of each 16 aligned bytes of memory is encoded in one shadow byte and the shadow value is tag of pointer, so we need to read next shadow byte, the shadow value is not equal to tag value of pointer, so that tag-based KASAN will detect out-of-bounds memory access. [walter-zh.wu@mediatek.com: use KASAN_SHADOW_SCALE_SIZE instead of 13] Link: http://lkml.kernel.org/r/20200708132524.11688-1-walter-zh.wu@mediatek.com Suggested-by: Dmitry Vyukov Signed-off-by: Walter Wu Signed-off-by: Andrew Morton Reviewed-by: Andrey Konovalov Acked-by: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Matthias Brugger Link: http://lkml.kernel.org/r/20200706115039.16750-1-walter-zh.wu@mediatek.com Signed-off-by: Linus Torvalds commit c0e16ab3b5887e86cd45b95e28cf66498b161ee1 Author: Vincenzo Frascino Date: Thu Aug 6 23:24:50 2020 -0700 kasan: remove kasan_unpoison_stack_above_sp_to() kasan_unpoison_stack_above_sp_to() is defined in kasan code but never used. The function was introduced as part of the commit: commit 9f7d416c36124667 ("kprobes: Unpoison stack in jprobe_return() for KASAN") ... where it was necessary because x86's jprobe_return() would leave stale shadow on the stack, and was an oddity in that regard. Since then, jprobes were removed entirely, and as of commit: commit 80006dbee674f9fa ("kprobes/x86: Remove jprobe implementation") ... there have been no callers of this function. Remove the declaration and the implementation. Signed-off-by: Vincenzo Frascino Signed-off-by: Andrew Morton Reviewed-by: Mark Rutland Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Link: http://lkml.kernel.org/r/20200706143505.23299-1-vincenzo.frascino@arm.com Signed-off-by: Linus Torvalds commit 9793b62663f54e369a3986543b296992a8a0589c Author: Walter Wu Date: Thu Aug 6 23:24:46 2020 -0700 kasan: update documentation for generic kasan Generic KASAN will support to record the last two call_rcu() call stacks and print them in KASAN report. So that need to update documentation. Signed-off-by: Walter Wu Signed-off-by: Andrew Morton Tested-by: Dmitry Vyukov Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Jonathan Corbet Cc: Matthias Brugger Cc: "Paul E . McKenney" Cc: Josh Triplett Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Link: http://lkml.kernel.org/r/20200601051111.1359-1-walter-zh.wu@mediatek.com Signed-off-by: Linus Torvalds commit 387d6e46681b0d5b64f5d13639f90e3df15e020d Author: Walter Wu Date: Thu Aug 6 23:24:42 2020 -0700 kasan: add tests for call_rcu stack recording Test call_rcu() call stack recording and verify whether it correctly is printed in KASAN report. Signed-off-by: Walter Wu Signed-off-by: Andrew Morton Tested-by: Dmitry Vyukov Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Matthias Brugger Cc: Joel Fernandes Cc: Jonathan Corbet Cc: Josh Triplett Cc: Lai Jiangshan Cc: Mathieu Desnoyers Cc: "Paul E . McKenney" Link: http://lkml.kernel.org/r/20200601051045.1294-1-walter-zh.wu@mediatek.com Signed-off-by: Linus Torvalds commit e4b7818b9aa8fa8dfd5fc7bb98f0d4c16b50fd8b Author: Walter Wu Date: Thu Aug 6 23:24:39 2020 -0700 kasan: record and print the free track Move free track from kasan_alloc_meta to kasan_free_meta in order to make struct kasan_alloc_meta and kasan_free_meta size are both 16 bytes. It is a good size because it is the minimal redzone size and a good number of alignment. For free track, we make some modifications as shown below: 1) Remove the free_track from struct kasan_alloc_meta. 2) Add the free_track into struct kasan_free_meta. 3) Add a macro KASAN_KMALLOC_FREETRACK in order to check whether it can print free stack in KASAN report. [1]https://bugzilla.kernel.org/show_bug.cgi?id=198437 [walter-zh.wu@mediatek.com: build fix] Link: http://lkml.kernel.org/r/20200710162440.23887-1-walter-zh.wu@mediatek.com Suggested-by: Dmitry Vyukov Co-developed-by: Dmitry Vyukov Signed-off-by: Walter Wu Signed-off-by: Andrew Morton Tested-by: Dmitry Vyukov Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Joel Fernandes Cc: Jonathan Corbet Cc: Josh Triplett Cc: Lai Jiangshan Cc: Mathieu Desnoyers Cc: Matthias Brugger Cc: "Paul E . McKenney" Link: http://lkml.kernel.org/r/20200601051022.1230-1-walter-zh.wu@mediatek.com Signed-off-by: Linus Torvalds commit 26e760c9a7c8ec31fa1a6bfbbce3f63f189ccef0 Author: Walter Wu Date: Thu Aug 6 23:24:35 2020 -0700 rcu: kasan: record and print call_rcu() call stack Patch series "kasan: memorize and print call_rcu stack", v8. This patchset improves KASAN reports by making them to have call_rcu() call stack information. It is useful for programmers to solve use-after-free or double-free memory issue. The KASAN report was as follows(cleaned up slightly): BUG: KASAN: use-after-free in kasan_rcu_reclaim+0x58/0x60 Freed by task 0: kasan_save_stack+0x24/0x50 kasan_set_track+0x24/0x38 kasan_set_free_info+0x18/0x20 __kasan_slab_free+0x10c/0x170 kasan_slab_free+0x10/0x18 kfree+0x98/0x270 kasan_rcu_reclaim+0x1c/0x60 Last call_rcu(): kasan_save_stack+0x24/0x50 kasan_record_aux_stack+0xbc/0xd0 call_rcu+0x8c/0x580 kasan_rcu_uaf+0xf4/0xf8 Generic KASAN will record the last two call_rcu() call stacks and print up to 2 call_rcu() call stacks in KASAN report. it is only suitable for generic KASAN. This feature considers the size of struct kasan_alloc_meta and kasan_free_meta, we try to optimize the structure layout and size, lets it get better memory consumption. [1]https://bugzilla.kernel.org/show_bug.cgi?id=198437 [2]https://groups.google.com/forum/#!searchin/kasan-dev/better$20stack$20traces$20for$20rcu%7Csort:date/kasan-dev/KQsjT_88hDE/7rNUZprRBgAJ This patch (of 4): This feature will record the last two call_rcu() call stacks and prints up to 2 call_rcu() call stacks in KASAN report. When call_rcu() is called, we store the call_rcu() call stack into slub alloc meta-data, so that the KASAN report can print rcu stack. [1]https://bugzilla.kernel.org/show_bug.cgi?id=198437 [2]https://groups.google.com/forum/#!searchin/kasan-dev/better$20stack$20traces$20for$20rcu%7Csort:date/kasan-dev/KQsjT_88hDE/7rNUZprRBgAJ [walter-zh.wu@mediatek.com: build fix] Link: http://lkml.kernel.org/r/20200710162401.23816-1-walter-zh.wu@mediatek.com Suggested-by: Dmitry Vyukov Signed-off-by: Walter Wu Signed-off-by: Andrew Morton Tested-by: Dmitry Vyukov Reviewed-by: Dmitry Vyukov Reviewed-by: Andrey Konovalov Acked-by: Paul E. McKenney Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Josh Triplett Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Jonathan Corbet Cc: Matthias Brugger Link: http://lkml.kernel.org/r/20200710162123.23713-1-walter-zh.wu@mediatek.com Link: http://lkml.kernel.org/r/20200601050847.1096-1-walter-zh.wu@mediatek.com Link: http://lkml.kernel.org/r/20200601050927.1153-1-walter-zh.wu@mediatek.com Signed-off-by: Linus Torvalds commit ac4766be5e2d103ebf5d3f2ff676f866f6a56d44 Author: Marco Elver Date: Thu Aug 6 23:24:31 2020 -0700 kasan: update required compiler versions in documentation Updates the recently changed compiler requirements for KASAN. In particular, we require GCC >= 8.3.0, and add a note that Clang 11 supports OOB detection of globals. Fixes: 7b861a53e46b ("kasan: Bump required compiler version") Fixes: acf7b0bf7dcf ("kasan: Fix required compiler version") Signed-off-by: Marco Elver Signed-off-by: Andrew Morton Reviewed-by: Andrey Konovalov Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Nick Desaulniers Cc: Walter Wu Cc: Arnd Bergmann Cc: Daniel Axtens Link: http://lkml.kernel.org/r/20200629104157.3242503-2-elver@google.com Signed-off-by: Linus Torvalds commit 7a3767f83f173f9df9af9eb04959abe2966d4cc8 Author: Marco Elver Date: Thu Aug 6 23:24:28 2020 -0700 kasan: improve and simplify Kconfig.kasan Turn 'KASAN' into a menuconfig, to avoid cluttering its parent menu with the suboptions if enabled. Use 'if KASAN ... endif' instead of having to 'depend on KASAN' for each entry. Signed-off-by: Marco Elver Signed-off-by: Andrew Morton Reviewed-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Arnd Bergmann Cc: Daniel Axtens Cc: Dmitry Vyukov Cc: Nick Desaulniers Cc: Walter Wu Link: http://lkml.kernel.org/r/20200629104157.3242503-1-elver@google.com Signed-off-by: Linus Torvalds commit 9c801f61d0e9e19b685ceb6e5f7107ad29b7837e Author: Uladzislau Rezki (Sony) Date: Thu Aug 6 23:24:24 2020 -0700 mm/vmalloc.c: remove BUG() from the find_va_links() Get rid of BUG() macro, that should be used only when a critical situation happens and a system is not able to function anymore. Replace it with WARN() macro instead, dump some extra information about start/end addresses of both VAs which overlap. Such overlap data can help to figure out what happened making further analysis easier. For example if both areas are identical it could mean a double free. A recovery process consists of declining all further steps regarding inserting of conflicting overlap range. In that sense find_va_links() now can return NULL, so its return value has to be checked by callers. Side effect of such process is it can leak memory, but it is better than just killing a machine for no good reason. Apart of that a debugging process can be done on alive system. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Cc: Hillf Danton Cc: Michal Hocko Cc: Matthew Wilcox Cc: Oleksiy Avramchenko Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20200711104531.12242-1-urezki@gmail.com Signed-off-by: Linus Torvalds commit 1a69a623d98397e3968a3bd6e9f650e8a5e8fdce Author: Mike Rapoport Date: Thu Aug 6 23:24:21 2020 -0700 mm: vmalloc: remove redundant assignment in unmap_kernel_range_noflush() 'addr' is set to 'start' and then a few lines afterwards 'start' is set to 'addr'. Remove the second asignment. Fixes: 2ba3e6947aed ("mm/vmalloc: track which page-table levels were modified") Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: David Hildenbrand Cc: Joerg Roedel Link: http://lkml.kernel.org/r/20200707163226.374685-1-rppt@kernel.org Signed-off-by: Linus Torvalds commit d758ffe6b9073ac7a21405cfdf2f7685aef8bacd Author: Uladzislau Rezki (Sony) Date: Thu Aug 6 23:24:18 2020 -0700 mm/vmalloc: update the header about KVA rework Reflect information about the author, date and year when the KVA rework was done. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200622195821.4796-1-urezki@gmail.com Signed-off-by: Linus Torvalds commit 15ae144f77027db35fad168f24a1b9469dcf70a7 Author: Uladzislau Rezki (Sony) Date: Thu Aug 6 23:24:15 2020 -0700 mm/vmalloc: switch to "propagate()" callback An augment_tree_propagate_from() function uses its own implementation that populates a tree from the specified node toward a root node. On the other hand the RB_DECLARE_CALLBACKS_MAX macro provides the "propagate()" callback that does exactly the same. Having two similar functions does not make sense and is redundant. Reuse "built in" functionality to the macros. So the code size gets reduced. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200527205054.1696-3-urezki@gmail.com Signed-off-by: Linus Torvalds commit da27c9ed17794b4741fe2858ce727ffac671877e Author: Uladzislau Rezki (Sony) Date: Thu Aug 6 23:24:12 2020 -0700 mm/vmalloc: simplify augment_tree_propagate_check() This function is for debug purpose only. Currently it uses recursion for tree traversal, checking an augmented value of each node to find out if it is valid or not. The recursion can corrupt the stack because the tree can be huge if synthetic tests are applied. To prevent it, navigate the tree from bottom to upper levels using a regular list instead, because nodes are linked among each other also. It is faster and without recursion. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200527205054.1696-2-urezki@gmail.com Signed-off-by: Linus Torvalds commit 5dd7864094033a281aeffccaf9703468cbcfccfc Author: Uladzislau Rezki (Sony) Date: Thu Aug 6 23:24:09 2020 -0700 mm/vmalloc: simplify merge_or_add_vmap_area() Currently when a VA is deallocated and is about to be placed back to the tree, it can be either: merged with next/prev neighbors or inserted if not coalesced. On those steps the tree can be populated several times. For example when both neighbors are merged. It can be avoided and simplified in fact. Therefore do it only once when VA points to final merged area, after all manipulations: merging/removing/inserting. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200527205054.1696-1-urezki@gmail.com Signed-off-by: Linus Torvalds commit 0f14599c607d32512a1d37e6d2a2d1a867f16177 Author: Matthew Wilcox (Oracle) Date: Thu Aug 6 23:24:05 2020 -0700 vmalloc: convert to XArray The radix tree of vmap blocks is simpler to express as an XArray. Reduces both the text and data sizes of the object file and eliminates a user of the radix tree preload API. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: William Kucharski Link: http://lkml.kernel.org/r/20200603171448.5894-1-willy@infradead.org Signed-off-by: Linus Torvalds commit c89ab04febf97d2db8ca4ef8e2866fadc474351b Author: Mike Rapoport Date: Thu Aug 6 23:24:02 2020 -0700 mm/sparse: cleanup the code surrounding memory_present() After removal of CONFIG_HAVE_MEMBLOCK_NODE_MAP we have two equivalent functions that call memory_present() for each region in memblock.memory: sparse_memory_present_with_active_regions() and membocks_present(). Moreover, all architectures have a call to either of these functions preceding the call to sparse_init() and in the most cases they are called one after the other. Mark the regions from memblock.memory as present during sparce_init() by making sparse_init() call memblocks_present(), make memblocks_present() and memory_present() functions static and remove redundant sparse_memory_present_with_active_regions() function. Also remove no longer required HAVE_MEMORY_PRESENT configuration option. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200712083130.22919-1-rppt@kernel.org Signed-off-by: Linus Torvalds commit 6cda72047ea46272ecb9cc71acf1231cea07167a Author: Wei Yang Date: Thu Aug 6 23:23:59 2020 -0700 mm/sparse: only sub-section aligned range would be populated There are two code path which invoke __populate_section_memmap() * sparse_init_nid() * sparse_add_section() For both case, we are sure the memory range is sub-section aligned. * we pass PAGES_PER_SECTION to sparse_init_nid() * we check range by check_pfn_span() before calling sparse_add_section() Also, the counterpart of __populate_section_memmap(), we don't do such calculation and check since the range is checked by check_pfn_span() in __remove_pages(). Clear the calculation and check to keep it simple and comply with its counterpart. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Acked-by: David Hildenbrand Link: http://lkml.kernel.org/r/20200703031828.14645-1-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit ef69bc9f689de8380688be742f9b9df615d42429 Author: Wei Yang Date: Thu Aug 6 23:23:55 2020 -0700 mm/sparse: never partially remove memmap for early section For early sections, its memmap is handled specially even sub-section is enabled. The memmap could only be populated as a whole. Quoted from the comment of section_activate(): * The early init code does not consider partially populated * initial sections, it simply assumes that memory will never be * referenced. If we hot-add memory into such a section then we * do not need to populate the memmap and can simply reuse what * is already there. While current section_deactivate() breaks this rule. When hot-remove a sub-section, section_deactivate() would depopulate its memmap. The consequence is if we hot-add this subsection again, its memmap never get proper populated. We can reproduce the case by following steps: 1. Hacking qemu to allow sub-section early section : diff --git a/hw/i386/pc.c b/hw/i386/pc.c : index 51b3050d01..c6a78d83c0 100644 : --- a/hw/i386/pc.c : +++ b/hw/i386/pc.c : @@ -1010,7 +1010,7 @@ void pc_memory_init(PCMachineState *pcms, : } : : machine->device_memory->base = : - ROUND_UP(0x100000000ULL + x86ms->above_4g_mem_size, 1 * GiB); : + 0x100000000ULL + x86ms->above_4g_mem_size; : : if (pcmc->enforce_aligned_dimm) { : /* size device region assuming 1G page max alignment per slot */ 2. Bootup qemu with PSE disabled and a sub-section aligned memory size Part of the qemu command would look like this: sudo x86_64-softmmu/qemu-system-x86_64 \ --enable-kvm -cpu host,pse=off \ -m 4160M,maxmem=20G,slots=1 \ -smp sockets=2,cores=16 \ -numa node,nodeid=0,cpus=0-1 -numa node,nodeid=1,cpus=2-3 \ -machine pc,nvdimm \ -nographic \ -object memory-backend-ram,id=mem0,size=8G \ -device nvdimm,id=vm0,memdev=mem0,node=0,addr=0x144000000,label-size=128k 3. Re-config a pmem device with sub-section size in guest ndctl create-namespace --force --reconfig=namespace0.0 --mode=devdax --size=16M Then you would see the following call trace: pmem0: detected capacity change from 0 to 16777216 BUG: unable to handle page fault for address: ffffec73c51000b4 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page PGD 81ff8067 P4D 81ff8067 PUD 81ff7067 PMD 1437cb067 PTE 0 Oops: 0002 [#1] SMP NOPTI CPU: 16 PID: 1348 Comm: ndctl Kdump: loaded Tainted: G W 5.8.0-rc2+ #24 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.4 RIP: 0010:memmap_init_zone+0x154/0x1c2 Code: 77 16 f6 40 10 02 74 10 48 03 48 08 48 89 cb 48 c1 eb 0c e9 3a ff ff ff 48 89 df 48 c1 e7 06 48f RSP: 0018:ffffbdc7011a39b0 EFLAGS: 00010282 RAX: ffffec73c5100088 RBX: 0000000000144002 RCX: 0000000000144000 RDX: 0000000000000004 RSI: 007ffe0000000000 RDI: ffffec73c5100080 RBP: 027ffe0000000000 R08: 0000000000000001 R09: ffff9f8d38f6d708 R10: ffffec73c0000000 R11: 0000000000000000 R12: 0000000000000004 R13: 0000000000000001 R14: 0000000000144200 R15: 0000000000000000 FS: 00007efe6b65d780(0000) GS:ffff9f8d3f780000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffec73c51000b4 CR3: 000000007d718000 CR4: 0000000000340ee0 Call Trace: move_pfn_range_to_zone+0x128/0x150 memremap_pages+0x4e4/0x5a0 devm_memremap_pages+0x1e/0x60 dev_dax_probe+0x69/0x160 [device_dax] really_probe+0x298/0x3c0 driver_probe_device+0xe1/0x150 ? driver_allows_async_probing+0x50/0x50 bus_for_each_drv+0x7e/0xc0 __device_attach+0xdf/0x160 bus_probe_device+0x8e/0xa0 device_add+0x3b9/0x740 __devm_create_dev_dax+0x127/0x1c0 __dax_pmem_probe+0x1f2/0x219 [dax_pmem_core] dax_pmem_probe+0xc/0x1b [dax_pmem] nvdimm_bus_probe+0x69/0x1c0 [libnvdimm] really_probe+0x147/0x3c0 driver_probe_device+0xe1/0x150 device_driver_attach+0x53/0x60 bind_store+0xd1/0x110 kernfs_fop_write+0xce/0x1b0 vfs_write+0xb6/0x1a0 ksys_write+0x5f/0xe0 do_syscall_64+0x4d/0x90 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug") Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Acked-by: David Hildenbrand Cc: Oscar Salvador Cc: Dan Williams Link: http://lkml.kernel.org/r/20200625223534.18024-1-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 7a309195d11cde854eb75559fbd6b48f9e518f25 Author: Ricardo Cañuelo Date: Thu Aug 6 23:23:51 2020 -0700 selftests: add mincore() tests Add a test suite for the mincore() syscall. It tests most of its use cases as well as its interface. Tests implemented: - basic interface test - behavior on anonymous mappings - behavior on anonymous mappings with huge tlb pages - file-backed mapping with a regular file - file-backed mapping with a tmpfs file Signed-off-by: Ricardo Cañuelo Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200728100450.4065-1-ricardo.canuelo@collabora.com Signed-off-by: Linus Torvalds commit 349d9fbb0b0a6734bcac9c08c5cc21992da5d2e6 Author: Wei Yang Date: Thu Aug 6 23:23:48 2020 -0700 mm/mremap: start addresses are properly aligned After previous cleanup, extent is the minimal step for both source and destination. This means when extent is HPAGE_PMD_SIZE or PMD_SIZE, old_addr and new_addr are properly aligned too. Since these two functions are only invoked in move_page_tables, it is safe to remove the check now. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Tested-by: Dmitry Osipenko Acked-by: Kirill A. Shutemov Cc: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Matthew Wilcox Cc: Peter Xu Cc: Sean Christopherson Cc: Thomas Hellstrom Cc: Thomas Hellstrom (VMware) Cc: Vlastimil Babka Cc: Yang Shi Link: http://lkml.kernel.org/r/20200708095028.41706-4-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 9ad9718bfa41f6ae62fb2a7244357e99ac00d25a Author: Wei Yang Date: Thu Aug 6 23:23:44 2020 -0700 mm/mremap: calculate extent in one place Page tables is moved on the base of PMD. This requires both source and destination range should meet the requirement. Current code works well since move_huge_pmd() and move_normal_pmd() would check old_addr and new_addr again. And then return to move_ptes() if the either of them is not aligned. Instead of calculating the extent separately, it is better to calculate in one place, so we know it is not necessary to try move pmd. By doing so, the logic seems a little clear. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Tested-by: Dmitry Osipenko Acked-by: Kirill A. Shutemov Cc: Aneesh Kumar K.V Cc: Anshuman Khandual Cc: Matthew Wilcox Cc: Peter Xu Cc: Sean Christopherson Cc: Thomas Hellstrom Cc: Thomas Hellstrom (VMware) Cc: Vlastimil Babka Cc: Yang Shi Link: http://lkml.kernel.org/r/20200708095028.41706-3-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit b8aa9d9d95b3b4b60d42ac95f65d33a92527aef3 Author: Wei Yang Date: Thu Aug 6 23:23:40 2020 -0700 mm/mremap: it is sure to have enough space when extent meets requirement Patch series "mm/mremap: cleanup move_page_tables() a little", v5. move_page_tables() tries to move page table by PMD or PTE. The root reason is if it tries to move PMD, both old and new range should be PMD aligned. But current code calculate old range and new range separately. This leads to some redundant check and calculation. This cleanup tries to consolidate the range check in one place to reduce some extra range handling. This patch (of 3): old_end is passed to these two functions to check whether there is enough space to do the move, while this check is done before invoking these functions. These two functions only would be invoked when extent meets the requirement and there is one check before invoking these functions: if (extent > old_end - old_addr) extent = old_end - old_addr; This implies (old_end - old_addr) won't fail the check in these two functions. Signed-off-by: Wei Yang Signed-off-by: Andrew Morton Tested-by: Dmitry Osipenko Acked-by: Kirill A. Shutemov Cc: Vlastimil Babka Cc: Yang Shi Cc: Thomas Hellstrom (VMware) Cc: Anshuman Khandual Cc: Sean Christopherson Cc: Wei Yang Cc: Peter Xu Cc: Aneesh Kumar K.V Cc: Matthew Wilcox Cc: Thomas Hellstrom Link: http://lkml.kernel.org/r/20200710092835.56368-1-richard.weiyang@linux.alibaba.com Link: http://lkml.kernel.org/r/20200710092835.56368-2-richard.weiyang@linux.alibaba.com Link: http://lkml.kernel.org/r/20200708095028.41706-1-richard.weiyang@linux.alibaba.com Link: http://lkml.kernel.org/r/20200708095028.41706-2-richard.weiyang@linux.alibaba.com Signed-off-by: Linus Torvalds commit 45e55300f11495ed58c53427da7f0d958800a30f Author: Peter Collingbourne Date: Thu Aug 6 23:23:37 2020 -0700 mm: remove unnecessary wrapper function do_mmap_pgoff() The current split between do_mmap() and do_mmap_pgoff() was introduced in commit 1fcfd8db7f82 ("mm, mpx: add "vm_flags_t vm_flags" arg to do_mmap_pgoff()") to support MPX. The wrapper function do_mmap_pgoff() always passed 0 as the value of the vm_flags argument to do_mmap(). However, MPX support has subsequently been removed from the kernel and there were no more direct callers of do_mmap(); all calls were going via do_mmap_pgoff(). Simplify the code by removing do_mmap_pgoff() and changing all callers to directly call do_mmap(), which now no longer takes a vm_flags argument. Signed-off-by: Peter Collingbourne Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: David Hildenbrand Link: http://lkml.kernel.org/r/20200727194109.1371462-1-pcc@google.com Signed-off-by: Linus Torvalds commit d70cec8983241a6aafadf78e2d65bbafac87ab6a Author: Miaohe Lin Date: Thu Aug 6 23:23:34 2020 -0700 mm: mmap: merge vma after call_mmap() if possible The vm_flags may be changed after call_mmap() because drivers may set some flags for their own purpose. As a result, we failed to merge the adjacent vma due to the different vm_flags as userspace can't pass in the same one. Try to merge vma after call_mmap() to fix this issue. Signed-off-by: Hongxiang Lou Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/1594954065-23733-1-git-send-email-linmiaohe@huawei.com Signed-off-by: Linus Torvalds commit eee07935bb52a03561d53ccc5cecf12f2faeb396 Author: Anshuman Khandual Date: Thu Aug 6 23:23:29 2020 -0700 arm64/mm: enable vmem_altmap support for vmemmap mappings Device memory ranges when getting hot added into ZONE_DEVICE, might require their vmemmap mapping's backing memory to be allocated from their own range instead of consuming system memory. This prevents large system memory usage for potentially large device memory ranges. Device driver communicates this request via vmem_altmap structure. Architecture needs to take this request into account while creating and tearing down vemmmap mappings. This enables vmem_altmap support in vmemmap_populate() and vmemmap_free() which includes vmemmap_populate_basepages() used for ARM64_16K_PAGES and ARM64_64K_PAGES configs. Signed-off-by: Anshuman Khandual Signed-off-by: Andrew Morton Tested-by: Jia He Reviewed-by: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Steve Capper Cc: David Hildenbrand Cc: Yu Zhao Cc: Hsin-Yi Wang Cc: Thomas Gleixner Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Dan Williams Cc: Dave Hansen Cc: Fenghua Yu Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Jonathan Corbet Cc: "Kirill A. Shutemov" Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: Michal Hocko Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Pavel Tatashin Cc: Peter Zijlstra Cc: Robin Murphy Cc: Tony Luck Link: http://lkml.kernel.org/r/1594004178-8861-4-git-send-email-anshuman.khandual@arm.com Signed-off-by: Linus Torvalds commit 56993b4e147e9f2ba91ac15ef9ae5ee0626a6850 Author: Anshuman Khandual Date: Thu Aug 6 23:23:24 2020 -0700 mm/sparsemem: enable vmem_altmap support in vmemmap_alloc_block_buf() There are many instances where vmemap allocation is often switched between regular memory and device memory just based on whether altmap is available or not. vmemmap_alloc_block_buf() is used in various platforms to allocate vmemmap mappings. Lets also enable it to handle altmap based device memory allocation along with existing regular memory allocations. This will help in avoiding the altmap based allocation switch in many places. To summarize there are two different methods to call vmemmap_alloc_block_buf(). vmemmap_alloc_block_buf(size, node, NULL) /* Allocate from system RAM */ vmemmap_alloc_block_buf(size, node, altmap) /* Allocate from altmap */ This converts altmap_alloc_block_buf() into a static function, drops it's entry from the header and updates Documentation/vm/memory-model.rst. Suggested-by: Robin Murphy Signed-off-by: Anshuman Khandual Signed-off-by: Andrew Morton Tested-by: Jia He Reviewed-by: Catalin Marinas Cc: Jonathan Corbet Cc: Will Deacon Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Dan Williams Cc: David Hildenbrand Cc: Fenghua Yu Cc: Hsin-Yi Wang Cc: "Kirill A. Shutemov" Cc: Mark Rutland Cc: "Matthew Wilcox (Oracle)" Cc: Michal Hocko Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Pavel Tatashin Cc: Steve Capper Cc: Tony Luck Cc: Yu Zhao Link: http://lkml.kernel.org/r/1594004178-8861-3-git-send-email-anshuman.khandual@arm.com Signed-off-by: Linus Torvalds commit 1d9cfee7535c213038a615f112c900c2d0ba8f54 Author: Anshuman Khandual Date: Thu Aug 6 23:23:19 2020 -0700 mm/sparsemem: enable vmem_altmap support in vmemmap_populate_basepages() Patch series "arm64: Enable vmemmap mapping from device memory", v4. This series enables vmemmap backing memory allocation from device memory ranges on arm64. But before that, it enables vmemmap_populate_basepages() and vmemmap_alloc_block_buf() to accommodate struct vmem_altmap based alocation requests. This patch (of 3): vmemmap_populate_basepages() is used across platforms to allocate backing memory for vmemmap mapping. This is used as a standard default choice or as a fallback when intended huge pages allocation fails. This just creates entire vmemmap mapping with base pages (PAGE_SIZE). On arm64 platforms, vmemmap_populate_basepages() is called instead of the platform specific vmemmap_populate() when ARM64_SWAPPER_USES_SECTION_MAPS is not enabled as in case for ARM64_16K_PAGES and ARM64_64K_PAGES configs. At present vmemmap_populate_basepages() does not support allocating from driver defined struct vmem_altmap while trying to create vmemmap mapping for a device memory range. It prevents ARM64_16K_PAGES and ARM64_64K_PAGES configs on arm64 from supporting device memory with vmemap_altmap request. This enables vmem_altmap support in vmemmap_populate_basepages() unlocking device memory allocation for vmemap mapping on arm64 platforms with 16K or 64K base page configs. Each architecture should evaluate and decide on subscribing device memory based base page allocation through vmemmap_populate_basepages(). Hence lets keep it disabled on all archs in order to preserve the existing semantics. A subsequent patch enables it on arm64. Signed-off-by: Anshuman Khandual Signed-off-by: Andrew Morton Tested-by: Jia He Reviewed-by: David Hildenbrand Acked-by: Will Deacon Acked-by: Catalin Marinas Cc: Mark Rutland Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Tony Luck Cc: Fenghua Yu Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Mike Rapoport Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Kirill A. Shutemov" Cc: Dan Williams Cc: Pavel Tatashin Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Hsin-Yi Wang Cc: Jonathan Corbet Cc: Michael Ellerman Cc: Paul Mackerras Cc: Robin Murphy Cc: Steve Capper Cc: Yu Zhao Link: http://lkml.kernel.org/r/1594004178-8861-1-git-send-email-anshuman.khandual@arm.com Link: http://lkml.kernel.org/r/1594004178-8861-2-git-send-email-anshuman.khandual@arm.com Signed-off-by: Linus Torvalds commit 56f3547bfa4d361148aa748ccb86073bc57f5e6c Author: Feng Tang Date: Thu Aug 6 23:23:15 2020 -0700 mm: adjust vm_committed_as_batch according to vm overcommit policy When checking a performance change for will-it-scale scalability mmap test [1], we found very high lock contention for spinlock of percpu counter 'vm_committed_as': 94.14% 0.35% [kernel.kallsyms] [k] _raw_spin_lock_irqsave 48.21% _raw_spin_lock_irqsave;percpu_counter_add_batch;__vm_enough_memory;mmap_region;do_mmap; 45.91% _raw_spin_lock_irqsave;percpu_counter_add_batch;__do_munmap; Actually this heavy lock contention is not always necessary. The 'vm_committed_as' needs to be very precise when the strict OVERCOMMIT_NEVER policy is set, which requires a rather small batch number for the percpu counter. So keep 'batch' number unchanged for strict OVERCOMMIT_NEVER policy, and lift it to 64X for OVERCOMMIT_ALWAYS and OVERCOMMIT_GUESS policies. Also add a sysctl handler to adjust it when the policy is reconfigured. Benchmark with the same testcase in [1] shows 53% improvement on a 8C/16T desktop, and 2097%(20X) on a 4S/72C/144T server. We tested with test platforms in 0day (server, desktop and laptop), and 80%+ platforms shows improvements with that test. And whether it shows improvements depends on if the test mmap size is bigger than the batch number computed. And if the lift is 16X, 1/3 of the platforms will show improvements, though it should help the mmap/unmap usage generally, as Michal Hocko mentioned: : I believe that there are non-synthetic worklaods which would benefit from : a larger batch. E.g. large in memory databases which do large mmaps : during startups from multiple threads. [1] https://lore.kernel.org/lkml/20200305062138.GI5972@shao2-debian/ Signed-off-by: Feng Tang Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: Matthew Wilcox (Oracle) Cc: Johannes Weiner Cc: Mel Gorman Cc: Qian Cai Cc: Kees Cook Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Huang Ying Cc: Christoph Lameter Cc: Dennis Zhou Cc: Haiyang Zhang Cc: kernel test robot Cc: "K. Y. Srinivasan" Cc: Tejun Heo Link: http://lkml.kernel.org/r/1589611660-89854-4-git-send-email-feng.tang@intel.com Link: http://lkml.kernel.org/r/1592725000-73486-4-git-send-email-feng.tang@intel.com Link: http://lkml.kernel.org/r/1594389708-60781-5-git-send-email-feng.tang@intel.com Signed-off-by: Linus Torvalds commit 0a4954a850b0c4d0a5d18b1a55d6e5a653e362b5 Author: Feng Tang Date: Thu Aug 6 23:23:11 2020 -0700 percpu_counter: add percpu_counter_sync() percpu_counter's accuracy is related to its batch size. For a percpu_counter with a big batch, its deviation could be big, so when the counter's batch is runtime changed to a smaller value for better accuracy, there could also be requirment to reduce the big deviation. So add a percpu-counter sync function to be run on each CPU. Reported-by: kernel test robot Signed-off-by: Feng Tang Signed-off-by: Andrew Morton Cc: Dennis Zhou Cc: Tejun Heo Cc: Christoph Lameter Cc: Michal Hocko Cc: Qian Cai Cc: Andi Kleen Cc: Huang Ying Cc: Dave Hansen Cc: Haiyang Zhang Cc: Johannes Weiner Cc: Kees Cook Cc: "K. Y. Srinivasan" Cc: Matthew Wilcox (Oracle) Cc: Mel Gorman Cc: Tim Chen Link: http://lkml.kernel.org/r/1594389708-60781-4-git-send-email-feng.tang@intel.com Signed-off-by: Linus Torvalds commit 4e2ee51e82510813969eff9feff8e570a8a28c73 Author: Feng Tang Date: Thu Aug 6 23:23:07 2020 -0700 mm/util.c: make vm_memory_committed() more accurate percpu_counter_sum_positive() will provide more accurate info. As with percpu_counter_read_positive(), in worst case the deviation could be 'batch * nr_cpus', which is totalram_pages/256 for now, and will be more when the batch gets enlarged. Its time cost is about 800 nanoseconds on a 2C/4T platform and 2~3 microseconds on a 2S/36C/72T Skylake server in normal case, and in worst case where vm_committed_as's spinlock is under severe contention, it costs 30~40 microseconds for the 2S/36C/72T Skylake sever, which should be fine for its only two users: /proc/meminfo and HyperV balloon driver's status trace per second. Signed-off-by: Feng Tang Signed-off-by: Andrew Morton Acked-by: Michal Hocko # for /proc/meminfo Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Matthew Wilcox (Oracle) Cc: Johannes Weiner Cc: Mel Gorman Cc: Qian Cai Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Huang Ying Cc: Christoph Lameter Cc: Dennis Zhou Cc: Kees Cook Cc: kernel test robot Cc: Tejun Heo Link: http://lkml.kernel.org/r/1592725000-73486-3-git-send-email-feng.tang@intel.com Link: http://lkml.kernel.org/r/1594389708-60781-3-git-send-email-feng.tang@intel.com Signed-off-by: Linus Torvalds commit 1455083c1d70f69028df0eb92b69fd24db277e4b Author: Feng Tang Date: Thu Aug 6 23:23:03 2020 -0700 proc/meminfo: avoid open coded reading of vm_committed_as Patch series "make vm_committed_as_batch aware of vm overcommit policy", v6. When checking a performance change for will-it-scale scalability mmap test [1], we found very high lock contention for spinlock of percpu counter 'vm_committed_as': 94.14% 0.35% [kernel.kallsyms] [k] _raw_spin_lock_irqsave 48.21% _raw_spin_lock_irqsave;percpu_counter_add_batch;__vm_enough_memory;mmap_region;do_mmap; 45.91% _raw_spin_lock_irqsave;percpu_counter_add_batch;__do_munmap; Actually this heavy lock contention is not always necessary. The 'vm_committed_as' needs to be very precise when the strict OVERCOMMIT_NEVER policy is set, which requires a rather small batch number for the percpu counter. So keep 'batch' number unchanged for strict OVERCOMMIT_NEVER policy, and enlarge it for not-so-strict OVERCOMMIT_ALWAYS and OVERCOMMIT_GUESS policies. Benchmark with the same testcase in [1] shows 53% improvement on a 8C/16T desktop, and 2097%(20X) on a 4S/72C/144T server. And for that case, whether it shows improvements depends on if the test mmap size is bigger than the batch number computed. We tested 10+ platforms in 0day (server, desktop and laptop). If we lift it to 64X, 80%+ platforms show improvements, and for 16X lift, 1/3 of the platforms will show improvements. And generally it should help the mmap/unmap usage,as Michal Hocko mentioned: : I believe that there are non-synthetic worklaods which would benefit : from a larger batch. E.g. large in memory databases which do large : mmaps during startups from multiple threads. Note: There are some style complain from checkpatch for patch 4, as sysctl handler declaration follows the similar format of sibling functions [1] https://lore.kernel.org/lkml/20200305062138.GI5972@shao2-debian/ This patch (of 4): Use the existing vm_memory_committed() instead, which is also convenient for future change. Signed-off-by: Feng Tang Signed-off-by: Andrew Morton Acked-by: Michal Hocko Cc: Matthew Wilcox (Oracle) Cc: Johannes Weiner Cc: Mel Gorman Cc: Qian Cai Cc: Kees Cook Cc: Andi Kleen Cc: Tim Chen Cc: Dave Hansen Cc: Huang Ying Cc: Christoph Lameter Cc: Dennis Zhou Cc: Haiyang Zhang Cc: kernel test robot Cc: "K. Y. Srinivasan" Cc: Tejun Heo Link: http://lkml.kernel.org/r/1594389708-60781-1-git-send-email-feng.tang@intel.com Link: http://lkml.kernel.org/r/1594389708-60781-2-git-send-email-feng.tang@intel.com Signed-off-by: Linus Torvalds commit 7bba8f0ea428f8a904c022b86e584009a2f87357 Author: Zhen Lei Date: Thu Aug 6 23:22:59 2020 -0700 mm/mmap: optimize a branch judgment in ksys_mmap_pgoff() Look at the pseudo code below. It's very clear that, the judgement "!is_file_hugepages(file)" at 3) is duplicated to the one at 1), we can use "else if" to avoid it. And the assignment "retval = -EINVAL" at 2) is only needed by the branch 3), because "retval" will be overwritten at 4). No functional change, but it can reduce the code size. Maybe more clearer? Before: text data bss dec hex filename 28733 1590 1 30324 7674 mm/mmap.o After: text data bss dec hex filename 28701 1590 1 30292 7654 mm/mmap.o ====pseudo code====: if (!(flags & MAP_ANONYMOUS)) { ... 1) if (is_file_hugepages(file)) len = ALIGN(len, huge_page_size(hstate_file(file))); 2) retval = -EINVAL; 3) if (unlikely(flags & MAP_HUGETLB && !is_file_hugepages(file))) goto out_fput; } else if (flags & MAP_HUGETLB) { ... } ... 4) retval = vm_mmap_pgoff(file, addr, len, prot, flags, pgoff); out_fput: ... return retval; Signed-off-by: Zhen Lei Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200705080112.1405-1-thunder.leizhen@huawei.com Signed-off-by: Linus Torvalds commit 2a681cfa5bb41e78e7bfafbb748b581374ce9b1d Author: Joerg Roedel Date: Thu Aug 6 23:22:55 2020 -0700 mm: move p?d_alloc_track to separate header file The functions are only used in two source files, so there is no need for them to be in the global header. Move them to the new header and include it only where needed. Signed-off-by: Joerg Roedel Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Cc: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Abdul Haleem Cc: Satheesh Rajendran Cc: Stephen Rothwell Cc: Steven Rostedt (VMware) Cc: Mike Rapoport Cc: Christophe Leroy Cc: Arnd Bergmann Cc: Max Filippov Cc: Stafford Horne Cc: Geert Uytterhoeven Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/20200609120533.25867-1-joro@8bytes.org Signed-off-by: Linus Torvalds commit ab05eabfa18a6a537a73408642177e4a803317dc Author: Mike Rapoport Date: Thu Aug 6 23:22:51 2020 -0700 mm: move lib/ioremap.c to mm/ The functionality in lib/ioremap.c deals with pagetables, vmalloc and caches, so it naturally belongs to mm/ Moving it there will also allow declaring p?d_alloc_track functions in an header file inside mm/ rather than having those declarations in include/linux/mm.h Suggested-by: Andrew Morton Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Cc: Abdul Haleem Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Christophe Leroy Cc: Joerg Roedel Cc: Joerg Roedel Cc: Max Filippov Cc: Peter Zijlstra (Intel) Cc: Satheesh Rajendran Cc: Stafford Horne Cc: Stephen Rothwell Cc: Steven Rostedt Cc: Geert Uytterhoeven Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/20200627143453.31835-8-rppt@kernel.org Signed-off-by: Linus Torvalds commit f9cb654cb550b7b87e8608b14fc3eca432429ffe Author: Mike Rapoport Date: Thu Aug 6 23:22:47 2020 -0700 asm-generic: pgalloc: provide generic pgd_free() Most architectures define pgd_free() as a wrapper for free_page(). Provide a generic version in asm-generic/pgalloc.h and enable its use for most architectures. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Acked-by: Geert Uytterhoeven [m68k] Cc: Abdul Haleem Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Christophe Leroy Cc: Joerg Roedel Cc: Joerg Roedel Cc: Max Filippov Cc: Peter Zijlstra (Intel) Cc: Satheesh Rajendran Cc: Stafford Horne Cc: Stephen Rothwell Cc: Steven Rostedt Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/20200627143453.31835-7-rppt@kernel.org Signed-off-by: Linus Torvalds commit d9e8b929670b4f79e07cdbcb0fb4f162a561d5c6 Author: Mike Rapoport Date: Thu Aug 6 23:22:44 2020 -0700 asm-generic: pgalloc: provide generic pud_alloc_one() and pud_free_one() Several architectures define pud_alloc_one() as a wrapper for __get_free_page() and pud_free() as a wrapper for free_page(). Provide a generic implementation in asm-generic/pgalloc.h and use it where appropriate. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Cc: Abdul Haleem Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Christophe Leroy Cc: Joerg Roedel Cc: Joerg Roedel Cc: Max Filippov Cc: Peter Zijlstra (Intel) Cc: Satheesh Rajendran Cc: Stafford Horne Cc: Stephen Rothwell Cc: Steven Rostedt Cc: Geert Uytterhoeven Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/20200627143453.31835-6-rppt@kernel.org Signed-off-by: Linus Torvalds commit 1355c31eeb7ea61a7f2f2937d17cd4e343a6b5af Author: Mike Rapoport Date: Thu Aug 6 23:22:39 2020 -0700 asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one() For most architectures that support >2 levels of page tables, pmd_alloc_one() is a wrapper for __get_free_pages(), sometimes with __GFP_ZERO and sometimes followed by memset(0) instead. More elaborate versions on arm64 and x86 account memory for the user page tables and call to pgtable_pmd_page_ctor() as the part of PMD page initialization. Move the arm64 version to include/asm-generic/pgalloc.h and use the generic version on several architectures. The pgtable_pmd_page_ctor() is a NOP when ARCH_ENABLE_SPLIT_PMD_PTLOCK is not enabled, so there is no functional change for most architectures except of the addition of __GFP_ACCOUNT for allocation of user page tables. The pmd_free() is a wrapper for free_page() in all the cases, so no functional change here. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Cc: Matthew Wilcox Cc: Abdul Haleem Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Christophe Leroy Cc: Joerg Roedel Cc: Joerg Roedel Cc: Max Filippov Cc: Peter Zijlstra (Intel) Cc: Satheesh Rajendran Cc: Stafford Horne Cc: Stephen Rothwell Cc: Steven Rostedt Cc: Geert Uytterhoeven Link: http://lkml.kernel.org/r/20200627143453.31835-5-rppt@kernel.org Signed-off-by: Linus Torvalds commit 7278914ca1fdb54ba101c8617fb86953b31348cd Author: Mike Rapoport Date: Thu Aug 6 23:22:36 2020 -0700 xtensa: switch to generic version of pte allocation xtensa clears PTEs during allocation of the page tables and pte_clear() sets the PTE to a non-zero value. Splitting ptes_clear() helper out of pte_alloc_one() and pte_alloc_one_kernel() allows reuse of base generic allocation methods (__pte_alloc_one() and __pte_alloc_one_kernel()) and the common GFP mask for page table allocations. The pte_free() and pte_free_kernel() implementations on xtensa are identical to the generic ones and can be dropped. [jcmvbkbc@gmail.com: xtensa: fix closing endif comment] Link: http://lkml.kernel.org/r/20200721024751.1257-1-jcmvbkbc@gmail.com Signed-off-by: Mike Rapoport Signed-off-by: Max Filippov Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Cc: Abdul Haleem Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Christophe Leroy Cc: Joerg Roedel Cc: Joerg Roedel Cc: Max Filippov Cc: Peter Zijlstra (Intel) Cc: Satheesh Rajendran Cc: Stafford Horne Cc: Stephen Rothwell Cc: Steven Rostedt Cc: Geert Uytterhoeven Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/20200627143453.31835-4-rppt@kernel.org Signed-off-by: Linus Torvalds commit fc2a6b837db74aed1160ebcfe8dd94bb58141401 Author: Mike Rapoport Date: Thu Aug 6 23:22:32 2020 -0700 opeinrisc: switch to generic version of pte allocation Replace pte_alloc_one(), pte_free() and pte_free_kernel() with the generic implementation. The only actual functional change is the addition of __GFP_ACCOUT for the allocation of the user page tables. The pte_alloc_one_kernel() is kept back because its implementation on openrisc is different than the generic one. Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Acked-by: Stafford Horne Cc: Abdul Haleem Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Christophe Leroy Cc: Joerg Roedel Cc: Joerg Roedel Cc: Max Filippov Cc: Peter Zijlstra (Intel) Cc: Satheesh Rajendran Cc: Stephen Rothwell Cc: Steven Rostedt Cc: Geert Uytterhoeven Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/20200627143453.31835-3-rppt@kernel.org Signed-off-by: Linus Torvalds commit ca15ca406f660ad5fab55b851d2b269ce915c88d Author: Mike Rapoport Date: Thu Aug 6 23:22:28 2020 -0700 mm: remove unneeded includes of Patch series "mm: cleanup usage of " Most architectures have very similar versions of pXd_alloc_one() and pXd_free_one() for intermediate levels of page table. These patches add generic versions of these functions in and enable use of the generic functions where appropriate. In addition, functions declared and defined in headers are used mostly by core mm and early mm initialization in arch and there is no actual reason to have the included all over the place. The first patch in this series removes unneeded includes of In the end it didn't work out as neatly as I hoped and moving pXd_alloc_track() definitions to would require unnecessary changes to arches that have custom page table allocations, so I've decided to move lib/ioremap.c to mm/ and make pgalloc-track.h local to mm/. This patch (of 8): In most cases header is required only for allocations of page table memory. Most of the .c files that include that header do not use symbols declared in and do not require that header. As for the other header files that used to include , it is possible to move that include into the .c file that actually uses symbols from and drop the include from the header file. The process was somewhat automated using sed -i -E '/[<"]asm\/pgalloc\.h/d' \ $(grep -L -w -f /tmp/xx \ $(git grep -E -l '[<"]asm/pgalloc\.h')) where /tmp/xx contains all the symbols defined in arch/*/include/asm/pgalloc.h. [rppt@linux.ibm.com: fix powerpc warning] Signed-off-by: Mike Rapoport Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Acked-by: Geert Uytterhoeven [m68k] Cc: Abdul Haleem Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Christophe Leroy Cc: Joerg Roedel Cc: Max Filippov Cc: Peter Zijlstra Cc: Satheesh Rajendran Cc: Stafford Horne Cc: Stephen Rothwell Cc: Steven Rostedt Cc: Joerg Roedel Cc: Matthew Wilcox Link: http://lkml.kernel.org/r/20200627143453.31835-1-rppt@kernel.org Link: http://lkml.kernel.org/r/20200627143453.31835-2-rppt@kernel.org Signed-off-by: Linus Torvalds commit 0c4123e3fb82d6014d0a70b52eb38153f658541c Author: Alex Zhang Date: Thu Aug 6 23:22:24 2020 -0700 mm/memory.c: make remap_pfn_range() reject unaligned addr This function implicitly assumes that the addr passed in is page aligned. A non page aligned addr could ultimately cause a kernel bug in remap_pte_range as the exit condition in the logic loop may never be satisfied. This patch documents the need for the requirement, as well as explicitly adds a check for it. Signed-off-by: Alex Zhang Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200617233512.177519-1-zhangalex@google.com Signed-off-by: Linus Torvalds commit 463b7a173d52f0b15473171fe895ab3a3d852a5e Author: Ralph Campbell Date: Thu Aug 6 23:22:21 2020 -0700 mm: remove redundant check non_swap_entry() In zap_pte_range(), the check for non_swap_entry() and is_device_private_entry() is unnecessary since the latter is sufficient to determine if the page is a device private page. Remove the test for non_swap_entry() to simplify the code and for clarity. Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Reviewed-by: Jason Gunthorpe Acked-by: David Hildenbrand Link: http://lkml.kernel.org/r/20200615175405.4613-1-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit a6f23d14ec7d7d02220ad8bb2774be3322b9aeec Author: Michal Koutný Date: Thu Aug 6 23:22:18 2020 -0700 mm/page_counter.c: fix protection usage propagation When workload runs in cgroups that aren't directly below root cgroup and their parent specifies reclaim protection, it may end up ineffective. The reason is that propagate_protected_usage() is not called in all hierarchy up. All the protected usage is incorrectly accumulated in the workload's parent. This means that siblings_low_usage is overestimated and effective protection underestimated. Even though it is transitional phenomenon (uncharge path does correct propagation and fixes the wrong children_low_usage), it can undermine the intended protection unexpectedly. We have noticed this problem while seeing a swap out in a descendant of a protected memcg (intermediate node) while the parent was conveniently under its protection limit and the memory pressure was external to that hierarchy. Michal has pinpointed this down to the wrong siblings_low_usage which led to the unwanted reclaim. The fix is simply updating children_low_usage in respective ancestors also in the charging path. Fixes: 230671533d64 ("mm: memory.low hierarchical behavior") Signed-off-by: Michal Koutný Signed-off-by: Michal Hocko Signed-off-by: Andrew Morton Acked-by: Michal Hocko Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Tejun Heo Cc: [4.18+] Link: http://lkml.kernel.org/r/20200803153231.15477-1-mhocko@kernel.org Signed-off-by: Linus Torvalds commit e22c6ed90aa91abc08f107344428ebb8c2629e98 Author: Johannes Weiner Date: Thu Aug 6 23:22:15 2020 -0700 mm: memcontrol: don't count limit-setting reclaim as memory pressure When an outside process lowers one of the memory limits of a cgroup (or uses the force_empty knob in cgroup1), direct reclaim is performed in the context of the write(), in order to directly enforce the new limit and have it being met by the time the write() returns. Currently, this reclaim activity is accounted as memory pressure in the cgroup that the writer(!) belongs to. This is unexpected. It specifically causes problems for senpai (https://github.com/facebookincubator/senpai), which is an agent that routinely adjusts the memory limits and performs associated reclaim work in tens or even hundreds of cgroups running on the host. The cgroup that senpai is running in itself will report elevated levels of memory pressure, even though it itself is under no memory shortage or any sort of distress. Move the psi annotation from the central cgroup reclaim function to callsites in the allocation context, and thereby no longer count any limit-setting reclaim as memory pressure. If the newly set limit causes the workload inside the cgroup into direct reclaim, that of course will continue to count as memory pressure. Signed-off-by: Johannes Weiner Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Reviewed-by: Roman Gushchin Acked-by: Chris Down Acked-by: Michal Hocko Link: http://lkml.kernel.org/r/20200728135210.379885-2-hannes@cmpxchg.org Signed-off-by: Linus Torvalds commit 19ce33acbbd03c371f2d4b533879c4755686f95f Author: Johannes Weiner Date: Thu Aug 6 23:22:12 2020 -0700 mm: memcontrol: restore proper dirty throttling when memory.high changes Commit 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high") inadvertently removed a callback to recalculate the writeback cache size in light of a newly configured memory.high limit. Without letting the writeback cache know about a potentially heavily reduced limit, it may permit too many dirty pages, which can cause unnecessary reclaim latencies or even avoidable OOM situations. This was spotted while reading the code, it hasn't knowingly caused any problems in practice so far. Fixes: 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high") Signed-off-by: Johannes Weiner Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Chris Down Acked-by: Michal Hocko Cc: Roman Gushchin Link: http://lkml.kernel.org/r/20200728135210.379885-1-hannes@cmpxchg.org Signed-off-by: Linus Torvalds commit 1378b37d03e8147c67fde60caf0474ea879163d8 Author: Yafang Shao Date: Thu Aug 6 23:22:08 2020 -0700 memcg, oom: check memcg margin for parallel oom Memcg oom killer invocation is synchronized by the global oom_lock and tasks are sleeping on the lock while somebody is selecting the victim or potentially race with the oom_reaper is releasing the victim's memory. This can result in a pointless oom killer invocation because a waiter might be racing with the oom_reaper P1 oom_reaper P2 oom_reap_task mutex_lock(oom_lock) out_of_memory # no victim because we have one already __oom_reap_task_mm mute_unlock(oom_lock) mutex_lock(oom_lock) set MMF_OOM_SKIP select_bad_process # finds a new victim The page allocator prevents from this race by trying to allocate after the lock can be acquired (in __alloc_pages_may_oom) which acts as a last minute check. Moreover page allocator simply doesn't block on the oom_lock and simply retries the whole reclaim process. Memcg oom killer should do the last minute check as well. Call mem_cgroup_margin to do that. Trylock on the oom_lock could be done as well but this doesn't seem to be necessary at this stage. [mhocko@kernel.org: commit log] Suggested-by: Michal Hocko Signed-off-by: Yafang Shao Signed-off-by: Andrew Morton Acked-by: Michal Hocko Acked-by: Chris Down Cc: Tetsuo Handa Cc: David Rientjes Cc: Johannes Weiner Link: http://lkml.kernel.org/r/1594735034-19190-1-git-send-email-laoar.shao@gmail.com Signed-off-by: Linus Torvalds commit 45c7f7e1ef17f09fe70bad4b705ce43772153fd7 Author: Chris Down Date: Thu Aug 6 23:22:05 2020 -0700 mm, memcg: decouple e{low,min} state mutations from protection checks mem_cgroup_protected currently is both used to set effective low and min and return a mem_cgroup_protection based on the result. As a user, this can be a little unexpected: it appears to be a simple predicate function, if not for the big warning in the comment above about the order in which it must be executed. This change makes it so that we separate the state mutations from the actual protection checks, which makes it more obvious where we need to be careful mutating internal state, and where we are simply checking and don't need to worry about that. [mhocko@suse.com - don't check protection on root memcgs] Suggested-by: Johannes Weiner Signed-off-by: Chris Down Signed-off-by: Andrew Morton Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Roman Gushchin Cc: Yafang Shao Link: http://lkml.kernel.org/r/ff3f915097fcee9f6d7041c084ef92d16aaeb56a.1594638158.git.chris@chrisdown.name Signed-off-by: Linus Torvalds commit 22f7496f0b901249f23c5251eb8a10aae126b909 Author: Yafang Shao Date: Thu Aug 6 23:22:01 2020 -0700 mm, memcg: avoid stale protection values when cgroup is above protection Patch series "mm, memcg: memory.{low,min} reclaim fix & cleanup", v4. This series contains a fix for a edge case in my earlier protection calculation patches, and a patch to make the area overall a little more robust to hopefully help avoid this in future. This patch (of 2): A cgroup can have both memory protection and a memory limit to isolate it from its siblings in both directions - for example, to prevent it from being shrunk below 2G under high pressure from outside, but also from growing beyond 4G under low pressure. Commit 9783aa9917f8 ("mm, memcg: proportional memory.{low,min} reclaim") implemented proportional scan pressure so that multiple siblings in excess of their protection settings don't get reclaimed equally but instead in accordance to their unprotected portion. During limit reclaim, this proportionality shouldn't apply of course: there is no competition, all pressure is from within the cgroup and should be applied as such. Reclaim should operate at full efficiency. However, mem_cgroup_protected() never expected anybody to look at the effective protection values when it indicated that the cgroup is above its protection. As a result, a query during limit reclaim may return stale protection values that were calculated by a previous reclaim cycle in which the cgroup did have siblings. When this happens, reclaim is unnecessarily hesitant and potentially slow to meet the desired limit. In theory this could lead to premature OOM kills, although it's not obvious this has occurred in practice. Workaround the problem by special casing reclaim roots in mem_cgroup_protection. These memcgs are never participating in the reclaim protection because the reclaim is internal. We have to ignore effective protection values for reclaim roots because mem_cgroup_protected might be called from racing reclaim contexts with different roots. Calculation is relying on root -> leaf tree traversal therefore top-down reclaim protection invariants should hold. The only exception is the reclaim root which should have effective protection set to 0 but that would be problematic for the following setup: Let's have global and A's reclaim in parallel: | A (low=2G, usage = 3G, max = 3G, children_low_usage = 1.5G) |\ | C (low = 1G, usage = 2.5G) B (low = 1G, usage = 0.5G) for A reclaim we have B.elow = B.low C.elow = C.low For the global reclaim A.elow = A.low B.elow = min(B.usage, B.low) because children_low_usage <= A.elow C.elow = min(C.usage, C.low) With the effective values resetting we have A reclaim A.elow = 0 B.elow = B.low C.elow = C.low and global reclaim could see the above and then B.elow = C.elow = 0 because children_low_usage > A.elow Which means that protected memcgs would get reclaimed. In future we would like to make mem_cgroup_protected more robust against racing reclaim contexts but that is likely more complex solution than this simple workaround. [hannes@cmpxchg.org - large part of the changelog] [mhocko@suse.com - workaround explanation] [chris@chrisdown.name - retitle] Fixes: 9783aa9917f8 ("mm, memcg: proportional memory.{low,min} reclaim") Signed-off-by: Yafang Shao Signed-off-by: Chris Down Signed-off-by: Andrew Morton Acked-by: Michal Hocko Acked-by: Johannes Weiner Acked-by: Chris Down Acked-by: Roman Gushchin Link: http://lkml.kernel.org/r/cover.1594638158.git.chris@chrisdown.name Link: http://lkml.kernel.org/r/044fb8ecffd001c7905d27c0c2ad998069fdc396.1594638158.git.chris@chrisdown.name Signed-off-by: Linus Torvalds commit d977aa939fcaff9000f1ba2cd2d516658fdd1ba8 Author: Chris Down Date: Thu Aug 6 23:21:58 2020 -0700 mm, memcg: unify reclaim retry limits with page allocator Reclaim retries have been set to 5 since the beginning of time in commit 66e1707bc346 ("Memory controller: add per cgroup LRU and reclaim"). However, we now have a generally agreed-upon standard for page reclaim: MAX_RECLAIM_RETRIES (currently 16), added many years later in commit 0a0337e0d1d1 ("mm, oom: rework oom detection"). In the absence of a compelling reason to declare an OOM earlier in memcg context than page allocator context, it seems reasonable to supplant MEM_CGROUP_RECLAIM_RETRIES with MAX_RECLAIM_RETRIES, making the page allocator and memcg internals more similar in semantics when reclaim fails to produce results, avoiding premature OOMs or throttling. Signed-off-by: Chris Down Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Tejun Heo Cc: Roman Gushchin Link: http://lkml.kernel.org/r/da557856c9c7654308eaff4eedc1952a95e8df5f.1594640214.git.chris@chrisdown.name Signed-off-by: Linus Torvalds commit b3ff92916af3b458712110bb83976a23471c12fa Author: Chris Down Date: Thu Aug 6 23:21:54 2020 -0700 mm, memcg: reclaim more aggressively before high allocator throttling Patch series "mm, memcg: reclaim harder before high throttling", v2. This patch (of 2): In Facebook production, we've seen cases where cgroups have been put into allocator throttling even when they appear to have a lot of slack file caches which should be trivially reclaimable. Looking more closely, the problem is that we only try a single cgroup reclaim walk for each return to usermode before calculating whether or not we should throttle. This single attempt doesn't produce enough pressure to shrink for cgroups with a rapidly growing amount of file caches prior to entering allocator throttling. As an example, we see that threads in an affected cgroup are stuck in allocator throttling: # for i in $(cat cgroup.threads); do > grep over_high "/proc/$i/stack" > done [<0>] mem_cgroup_handle_over_high+0x10b/0x150 [<0>] mem_cgroup_handle_over_high+0x10b/0x150 [<0>] mem_cgroup_handle_over_high+0x10b/0x150 ...however, there is no I/O pressure reported by PSI, despite a lot of slack file pages: # cat memory.pressure some avg10=78.50 avg60=84.99 avg300=84.53 total=5702440903 full avg10=78.50 avg60=84.99 avg300=84.53 total=5702116959 # cat io.pressure some avg10=0.00 avg60=0.00 avg300=0.00 total=78051391 full avg10=0.00 avg60=0.00 avg300=0.00 total=78049640 # grep _file memory.stat inactive_file 1370939392 active_file 661635072 This patch changes the behaviour to retry reclaim either until the current task goes below the 10ms grace period, or we are making no reclaim progress at all. In the latter case, we enter reclaim throttling as before. To a user, there's no intuitive reason for the reclaim behaviour to differ from hitting memory.high as part of a new allocation, as opposed to hitting memory.high because someone lowered its value. As such this also brings an added benefit: it unifies the reclaim behaviour between the two. There's precedent for this behaviour: we already do reclaim retries when writing to memory.{high,max}, in max reclaim, and in the page allocator itself. Signed-off-by: Chris Down Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Tejun Heo Cc: Michal Hocko Cc: Roman Gushchin Link: http://lkml.kernel.org/r/cover.1594640214.git.chris@chrisdown.name Link: http://lkml.kernel.org/r/a4e23b59e9ef499b575ae73a8120ee089b7d3373.1594640214.git.chris@chrisdown.name Signed-off-by: Linus Torvalds commit 536d3bf261a2fc3b05b3e91e7eef7383443015cf Author: Roman Gushchin Date: Thu Aug 6 23:21:51 2020 -0700 mm: memcontrol: avoid workload stalls when lowering memory.high Memory.high limit is implemented in a way such that the kernel penalizes all threads which are allocating a memory over the limit. Forcing all threads into the synchronous reclaim and adding some artificial delays allows to slow down the memory consumption and potentially give some time for userspace oom handlers/resource control agents to react. It works nicely if the memory usage is hitting the limit from below, however it works sub-optimal if a user adjusts memory.high to a value way below the current memory usage. It basically forces all workload threads (doing any memory allocations) into the synchronous reclaim and sleep. This makes the workload completely unresponsive for a long period of time and can also lead to a system-wide contention on lru locks. It can happen even if the workload is not actually tight on memory and has, for example, a ton of cold pagecache. In the current implementation writing to memory.high causes an atomic update of page counter's high value followed by an attempt to reclaim enough memory to fit into the new limit. To fix the problem described above, all we need is to change the order of execution: try to push the memory usage under the limit first, and only then set the new high limit. Reported-by: Domas Mituzas Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Tejun Heo Cc: Chris Down Link: http://lkml.kernel.org/r/20200709194718.189231-1-guro@fb.com Signed-off-by: Linus Torvalds commit eda330e57b26df8fabce184736ae3d11e7a104bd Author: Roman Gushchin Date: Thu Aug 6 23:21:47 2020 -0700 mm: kmem: switch to static_branch_likely() in memcg_kmem_enabled() Currently memcg_kmem_enabled() is optimized for the kernel memory accounting being off. It was so for a long time, and arguably the reason behind was that the kernel memory accounting was initially an opt-in feature. However, now it's on by default on both cgroup v1 and cgroup v2, and it's on for all cgroups. So let's switch over to static_branch_likely() to reflect this fact. Unlikely there is a significant performance difference, as the cost of a memory allocation and its accounting significantly exceeds the cost of a jump. However, the conversion makes the code look more logically. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Johannes Weiner Cc: Michal Hocko Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200707173612.124425-3-guro@fb.com Signed-off-by: Linus Torvalds commit 74d555bed5d0f8a1264f1e083183f5409b1aa36a Author: Roman Gushchin Date: Thu Aug 6 23:21:44 2020 -0700 mm: slab: rename (un)charge_slab_page() to (un)account_slab_page() charge_slab_page() and uncharge_slab_page() are not related anymore to memcg charging and uncharging. In order to make their names less confusing, let's rename them to account_slab_page() and unaccount_slab_page() respectively. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Christoph Lameter Cc: David Rientjes Cc: Johannes Weiner Cc: Joonsoo Kim Cc: Michal Hocko Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200707173612.124425-2-guro@fb.com Signed-off-by: Linus Torvalds commit 849504809f86ef43b0b12617c0a71b6c6e61cd78 Author: Roman Gushchin Date: Thu Aug 6 23:21:40 2020 -0700 mm: memcg/slab: remove unused argument by charge_slab_page() charge_slab_page() is not using the gfp argument anymore, remove it. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Vlastimil Babka Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Johannes Weiner Cc: Michal Hocko Link: http://lkml.kernel.org/r/20200707173612.124425-1-guro@fb.com Signed-off-by: Linus Torvalds commit 991e7673859ed41e7ba83c8c4e57afe8cfebe314 Author: Shakeel Butt Date: Thu Aug 6 23:21:37 2020 -0700 mm: memcontrol: account kernel stack per node Currently the kernel stack is being accounted per-zone. There is no need to do that. In addition due to being per-zone, memcg has to keep a separate MEMCG_KERNEL_STACK_KB. Make the stat per-node and deprecate MEMCG_KERNEL_STACK_KB as memcg_stat_item is an extension of node_stat_item. In addition localize the kernel stack stats updates to account_kernel_stack(). Signed-off-by: Shakeel Butt Signed-off-by: Andrew Morton Reviewed-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Link: http://lkml.kernel.org/r/20200630161539.1759185-1-shakeelb@google.com Signed-off-by: Linus Torvalds commit fbc1ac9d09d70859eee24131d667e01e3986e368 Author: Roman Gushchin Date: Thu Aug 6 23:21:34 2020 -0700 tools/cgroup: add memcg_slabinfo.py tool Add a drgn-based tool to display slab information for a given memcg. Can replace cgroup v1 memory.kmem.slabinfo interface on cgroup v2, but in a more flexiable way. Currently supports only SLUB configuration, but SLAB can be trivially added later. Output example: $ sudo ./tools/cgroup/memcg_slabinfo.py /sys/fs/cgroup/user.slice/user-111017.slice/user\@111017.service shmem_inode_cache 92 92 704 46 8 : tunables 0 0 0 : slabdata 2 2 0 eventpoll_pwq 56 56 72 56 1 : tunables 0 0 0 : slabdata 1 1 0 eventpoll_epi 32 32 128 32 1 : tunables 0 0 0 : slabdata 1 1 0 kmalloc-8 0 0 8 512 1 : tunables 0 0 0 : slabdata 0 0 0 kmalloc-96 0 0 96 42 1 : tunables 0 0 0 : slabdata 0 0 0 kmalloc-2048 0 0 2048 16 8 : tunables 0 0 0 : slabdata 0 0 0 kmalloc-64 128 128 64 64 1 : tunables 0 0 0 : slabdata 2 2 0 mm_struct 160 160 1024 32 8 : tunables 0 0 0 : slabdata 5 5 0 signal_cache 96 96 1024 32 8 : tunables 0 0 0 : slabdata 3 3 0 sighand_cache 45 45 2112 15 8 : tunables 0 0 0 : slabdata 3 3 0 files_cache 138 138 704 46 8 : tunables 0 0 0 : slabdata 3 3 0 task_delay_info 153 153 80 51 1 : tunables 0 0 0 : slabdata 3 3 0 task_struct 27 27 3520 9 8 : tunables 0 0 0 : slabdata 3 3 0 radix_tree_node 56 56 584 28 4 : tunables 0 0 0 : slabdata 2 2 0 btrfs_inode 140 140 1136 28 8 : tunables 0 0 0 : slabdata 5 5 0 kmalloc-1024 64 64 1024 32 8 : tunables 0 0 0 : slabdata 2 2 0 kmalloc-192 84 84 192 42 2 : tunables 0 0 0 : slabdata 2 2 0 inode_cache 54 54 600 27 4 : tunables 0 0 0 : slabdata 2 2 0 kmalloc-128 0 0 128 32 1 : tunables 0 0 0 : slabdata 0 0 0 kmalloc-512 32 32 512 32 4 : tunables 0 0 0 : slabdata 1 1 0 skbuff_head_cache 32 32 256 32 2 : tunables 0 0 0 : slabdata 1 1 0 sock_inode_cache 46 46 704 46 8 : tunables 0 0 0 : slabdata 1 1 0 cred_jar 378 378 192 42 2 : tunables 0 0 0 : slabdata 9 9 0 proc_inode_cache 96 96 672 24 4 : tunables 0 0 0 : slabdata 4 4 0 dentry 336 336 192 42 2 : tunables 0 0 0 : slabdata 8 8 0 filp 697 864 256 32 2 : tunables 0 0 0 : slabdata 27 27 0 anon_vma 644 644 88 46 1 : tunables 0 0 0 : slabdata 14 14 0 pid 1408 1408 64 64 1 : tunables 0 0 0 : slabdata 22 22 0 vm_area_struct 1200 1200 200 40 2 : tunables 0 0 0 : slabdata 30 30 0 Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Acked-by: Tejun Heo Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Shakeel Butt Cc: Vlastimil Babka Link: http://lkml.kernel.org/r/20200623174037.3951353-20-guro@fb.com Signed-off-by: Linus Torvalds commit 933dc80ec262ed8b1cc2ab463d989e1f59ee05c4 Author: Roman Gushchin Date: Thu Aug 6 23:21:30 2020 -0700 kselftests: cgroup: add kernel memory accounting tests Add some tests to cover the kernel memory accounting functionality. These are covering some issues (and changes) we had recently. 1) A test which allocates a lot of negative dentries, checks memcg slab statistics, creates memory pressure by setting memory.max to some low value and checks that some number of slabs was reclaimed. 2) A test which covers side effects of memcg destruction: it creates and destroys a large number of sub-cgroups, each containing a multi-threaded workload which allocates and releases some kernel memory. Then it checks that the charge ans memory.stats do add up on the parent level. 3) A test which reads /proc/kpagecgroup and implicitly checks that it doesn't crash the system. 4) A test which spawns a large number of threads and checks that the kernel stacks accounting works as expected. 5) A test which checks that living charged slab objects are not preventing the memory cgroup from being released after being deleted by a user. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Shakeel Butt Cc: Tejun Heo Cc: Vlastimil Babka Link: http://lkml.kernel.org/r/20200623174037.3951353-19-guro@fb.com Signed-off-by: Linus Torvalds commit 10befea91b61c4e2c2d1df06a2e978d182fcf792 Author: Roman Gushchin Date: Thu Aug 6 23:21:27 2020 -0700 mm: memcg/slab: use a single set of kmem_caches for all allocations Instead of having two sets of kmem_caches: one for system-wide and non-accounted allocations and the second one shared by all accounted allocations, we can use just one. The idea is simple: space for obj_cgroup metadata can be allocated on demand and filled only for accounted allocations. It allows to remove a bunch of code which is required to handle kmem_cache clones for accounted allocations. There is no more need to create them, accumulate statistics, propagate attributes, etc. It's a quite significant simplification. Also, because the total number of slab_caches is reduced almost twice (not all kmem_caches have a memcg clone), some additional memory savings are expected. On my devvm it additionally saves about 3.5% of slab memory. [guro@fb.com: fix build on MIPS] Link: http://lkml.kernel.org/r/20200717214810.3733082-1-guro@fb.com Suggested-by: Johannes Weiner Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Michal Hocko Cc: Tejun Heo Cc: Naresh Kamboju Link: http://lkml.kernel.org/r/20200623174037.3951353-18-guro@fb.com Signed-off-by: Linus Torvalds commit 15999eef7f25e2ea6a1c33f026166f472c5714e9 Author: Roman Gushchin Date: Thu Aug 6 23:21:24 2020 -0700 mm: memcg/slab: remove redundant check in memcg_accumulate_slabinfo() memcg_accumulate_slabinfo() is never called with a non-root kmem_cache as a first argument, so the is_root_cache(s) check is redundant and can be removed without any functional change. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-17-guro@fb.com Signed-off-by: Linus Torvalds commit c7094406fcb7cdf4fe1de8893f0613b75349773d Author: Roman Gushchin Date: Thu Aug 6 23:21:20 2020 -0700 mm: memcg/slab: deprecate slab_root_caches Currently there are two lists of kmem_caches: 1) slab_caches, which contains all kmem_caches, 2) slab_root_caches, which contains only root kmem_caches. And there is some preprocessor magic to have a single list if CONFIG_MEMCG_KMEM isn't enabled. It was required earlier because the number of non-root kmem_caches was proportional to the number of memory cgroups and could reach really big values. Now, when it cannot exceed the number of root kmem_caches, there is really no reason to maintain two lists. We never iterate over the slab_root_caches list on any hot paths, so it's perfectly fine to iterate over slab_caches and filter out non-root kmem_caches. It allows to remove a lot of config-dependent code and two pointers from the kmem_cache structure. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-16-guro@fb.com Signed-off-by: Linus Torvalds commit 272911a4ad18c48f8bc449a5db945a54987dd687 Author: Roman Gushchin Date: Thu Aug 6 23:21:17 2020 -0700 mm: memcg/slab: remove memcg_kmem_get_cache() The memcg_kmem_get_cache() function became really trivial, so let's just inline it into the single call point: memcg_slab_pre_alloc_hook(). It will make the code less bulky and can also help the compiler to generate a better code. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-15-guro@fb.com Signed-off-by: Linus Torvalds commit d797b7d05405c519f7b62ea69a75cea1883863b2 Author: Roman Gushchin Date: Thu Aug 6 23:21:14 2020 -0700 mm: memcg/slab: simplify memcg cache creation Because the number of non-root kmem_caches doesn't depend on the number of memory cgroups anymore and is generally not very big, there is no more need for a dedicated workqueue. Also, as there is no more need to pass any arguments to the memcg_create_kmem_cache() except the root kmem_cache, it's possible to just embed the work structure into the kmem_cache and avoid the dynamic allocation of the work structure. This will also simplify the synchronization: for each root kmem_cache there is only one work. So there will be no more concurrent attempts to create a non-root kmem_cache for a root kmem_cache: the second and all following attempts to queue the work will fail. On the kmem_cache destruction path there is no more need to call the expensive flush_workqueue() and wait for all pending works to be finished. Instead, cancel_work_sync() can be used to cancel/wait for only one work. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-14-guro@fb.com Signed-off-by: Linus Torvalds commit 9855609bde03e2472b99a95e869d29ee1e78a751 Author: Roman Gushchin Date: Thu Aug 6 23:21:10 2020 -0700 mm: memcg/slab: use a single set of kmem_caches for all accounted allocations This is fairly big but mostly red patch, which makes all accounted slab allocations use a single set of kmem_caches instead of creating a separate set for each memory cgroup. Because the number of non-root kmem_caches is now capped by the number of root kmem_caches, there is no need to shrink or destroy them prematurely. They can be perfectly destroyed together with their root counterparts. This allows to dramatically simplify the management of non-root kmem_caches and delete a ton of code. This patch performs the following changes: 1) introduces memcg_params.memcg_cache pointer to represent the kmem_cache which will be used for all non-root allocations 2) reuses the existing memcg kmem_cache creation mechanism to create memcg kmem_cache on the first allocation attempt 3) memcg kmem_caches are named -memcg, e.g. dentry-memcg 4) simplifies memcg_kmem_get_cache() to just return memcg kmem_cache or schedule it's creation and return the root cache 5) removes almost all non-root kmem_cache management code (separate refcounter, reparenting, shrinking, etc) 6) makes slab debugfs to display root_mem_cgroup css id and never show :dead and :deact flags in the memcg_slabinfo attribute. Following patches in the series will simplify the kmem_cache creation. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-13-guro@fb.com Signed-off-by: Linus Torvalds commit 0f876e4dc55db5fafef774917fd66e1373c0f390 Author: Roman Gushchin Date: Thu Aug 6 23:21:06 2020 -0700 mm: memcg/slab: move memcg_kmem_bypass() to memcontrol.h To make the memcg_kmem_bypass() function available outside of the memcontrol.c, let's move it to memcontrol.h. The function is small and nicely fits into static inline sort of functions. It will be used from the slab code. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-12-guro@fb.com Signed-off-by: Linus Torvalds commit 4330a26bc4527f1d8918c398ebc983574f761cca Author: Roman Gushchin Date: Thu Aug 6 23:21:03 2020 -0700 mm: memcg/slab: deprecate memory.kmem.slabinfo Deprecate memory.kmem.slabinfo. An empty file will be presented if corresponding config options are enabled. The interface is implementation dependent, isn't present in cgroup v2, and is generally useful only for core mm debugging purposes. In other words, it doesn't provide any value for the absolute majority of users. A drgn-based replacement can be found in tools/cgroup/memcg_slabinfo.py. It does support cgroup v1 and v2, mimics memory.kmem.slabinfo output and also allows to get any additional information without a need to recompile the kernel. If a drgn-based solution is too slow for a task, a bpf-based tracing tool can be used, which can easily keep track of all slab allocations belonging to a memory cgroup. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Christoph Lameter Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-11-guro@fb.com Signed-off-by: Linus Torvalds commit f2fe7b09a52bc898ec030d4fa6f78725439c7c2c Author: Roman Gushchin Date: Thu Aug 6 23:20:59 2020 -0700 mm: memcg/slab: charge individual slab objects instead of pages Switch to per-object accounting of non-root slab objects. Charging is performed using obj_cgroup API in the pre_alloc hook. Obj_cgroup is charged with the size of the object and the size of metadata: as now it's the size of an obj_cgroup pointer. If the amount of memory has been charged successfully, the actual allocation code is executed. Otherwise, -ENOMEM is returned. In the post_alloc hook if the actual allocation succeeded, corresponding vmstats are bumped and the obj_cgroup pointer is saved. Otherwise, the charge is canceled. On the free path obj_cgroup pointer is obtained and used to uncharge the size of the releasing object. Memcg and lruvec counters are now representing only memory used by active slab objects and do not include the free space. The free space is shared and doesn't belong to any specific cgroup. Global per-node slab vmstats are still modified from (un)charge_slab_page() functions. The idea is to keep all slab pages accounted as slab pages on system level. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-10-guro@fb.com Signed-off-by: Linus Torvalds commit 964d4bd370d559d9bd8e4abc139e85d2753956fb Author: Roman Gushchin Date: Thu Aug 6 23:20:56 2020 -0700 mm: memcg/slab: save obj_cgroup for non-root slab objects Store the obj_cgroup pointer in the corresponding place of page->obj_cgroups for each allocated non-root slab object. Make sure that each allocated object holds a reference to obj_cgroup. Objcg pointer is obtained from the memcg->objcg dereferencing in memcg_kmem_get_cache() and passed from pre_alloc_hook to post_alloc_hook. Then in case of successful allocation(s) it's getting stored in the page->obj_cgroups vector. The objcg obtaining part look a bit bulky now, but it will be simplified by next commits in the series. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-9-guro@fb.com Signed-off-by: Linus Torvalds commit 286e04b8ed7a04279ae277f0f024430246ea5eec Author: Roman Gushchin Date: Thu Aug 6 23:20:52 2020 -0700 mm: memcg/slab: allocate obj_cgroups for non-root slab pages Allocate and release memory to store obj_cgroup pointers for each non-root slab page. Reuse page->mem_cgroup pointer to store a pointer to the allocated space. This commit temporarily increases the memory footprint of the kernel memory accounting. To store obj_cgroup pointers we'll need a place for an objcg_pointer for each allocated object. However, the following patches in the series will enable sharing of slab pages between memory cgroups, which will dramatically increase the total slab utilization. And the final memory footprint will be significantly smaller than before. To distinguish between obj_cgroups and memcg pointers in case when it's not obvious which one is used (as in page_cgroup_ino()), let's always set the lowest bit in the obj_cgroup case. The original obj_cgroups pointer is marked to be ignored by kmemleak, which otherwise would report a memory leak for each allocated vector. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Johannes Weiner Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-8-guro@fb.com Signed-off-by: Linus Torvalds commit bf4f059954dcb221384b2f784677e19a13cd4bdb Author: Roman Gushchin Date: Thu Aug 6 23:20:49 2020 -0700 mm: memcg/slab: obj_cgroup API Obj_cgroup API provides an ability to account sub-page sized kernel objects, which potentially outlive the original memory cgroup. The top-level API consists of the following functions: bool obj_cgroup_tryget(struct obj_cgroup *objcg); void obj_cgroup_get(struct obj_cgroup *objcg); void obj_cgroup_put(struct obj_cgroup *objcg); int obj_cgroup_charge(struct obj_cgroup *objcg, gfp_t gfp, size_t size); void obj_cgroup_uncharge(struct obj_cgroup *objcg, size_t size); struct mem_cgroup *obj_cgroup_memcg(struct obj_cgroup *objcg); struct obj_cgroup *get_obj_cgroup_from_current(void); Object cgroup is basically a pointer to a memory cgroup with a per-cpu reference counter. It substitutes a memory cgroup in places where it's necessary to charge a custom amount of bytes instead of pages. All charged memory rounded down to pages is charged to the corresponding memory cgroup using __memcg_kmem_charge(). It implements reparenting: on memcg offlining it's getting reattached to the parent memory cgroup. Each online memory cgroup has an associated active object cgroup to handle new allocations and the list of all attached object cgroups. On offlining of a cgroup this list is reparented and for each object cgroup in the list the memcg pointer is swapped to the parent memory cgroup. It prevents long-living objects from pinning the original memory cgroup in the memory. The implementation is based on byte-sized per-cpu stocks. A sub-page sized leftover is stored in an atomic field, which is a part of obj_cgroup object. So on cgroup offlining the leftover is automatically reparented. memcg->objcg is rcu protected. objcg->memcg is a raw pointer, which is always pointing at a memory cgroup, but can be atomically swapped to the parent memory cgroup. So a user must ensure the lifetime of the cgroup, e.g. grab rcu_read_lock or css_set_lock. Suggested-by: Johannes Weiner Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Christoph Lameter Cc: Michal Hocko Cc: Tejun Heo Cc: Vlastimil Babka Link: http://lkml.kernel.org/r/20200623174037.3951353-7-guro@fb.com Signed-off-by: Linus Torvalds commit 1a3e1f40962c445b997151a542314f3c6097f8c3 Author: Johannes Weiner Date: Thu Aug 6 23:20:45 2020 -0700 mm: memcontrol: decouple reference counting from page accounting The reference counting of a memcg is currently coupled directly to how many 4k pages are charged to it. This doesn't work well with Roman's new slab controller, which maintains pools of objects and doesn't want to keep an extra balance sheet for the pages backing those objects. This unusual refcounting design (reference counts usually track pointers to an object) is only for historical reasons: memcg used to not take any css references and simply stalled offlining until all charges had been reparented and the page counters had dropped to zero. When we got rid of the reparenting requirement, the simple mechanical translation was to take a reference for every charge. More historical context can be found in commit e8ea14cc6ead ("mm: memcontrol: take a css reference for each charged page"), commit 64f219938941 ("mm: memcontrol: remove obsolete kmemcg pinning tricks") and commit b2052564e66d ("mm: memcontrol: continue cache reclaim from offlined groups"). The new slab controller exposes the limitations in this scheme, so let's switch it to a more idiomatic reference counting model based on actual kernel pointers to the memcg: - The per-cpu stock holds a reference to the memcg its caching - User pages hold a reference for their page->mem_cgroup. Transparent huge pages will no longer acquire tail references in advance, we'll get them if needed during the split. - Kernel pages hold a reference for their page->mem_cgroup - Pages allocated in the root cgroup will acquire and release css references for simplicity. css_get() and css_put() optimize that. - The current memcg_charge_slab() already hacked around the per-charge references; this change gets rid of that as well. - tcp accounting will handle reference in mem_cgroup_sk_{alloc,free} Roman: 1) Rebased on top of the current mm tree: added css_get() in mem_cgroup_charge(), dropped mem_cgroup_try_charge() part 2) I've reformatted commit references in the commit log to make checkpatch.pl happy. [hughd@google.com: remove css_put_many() from __mem_cgroup_clear_mc()] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2007302011450.2347@eggly.anvils Signed-off-by: Johannes Weiner Signed-off-by: Roman Gushchin Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Michal Hocko Cc: Christoph Lameter Cc: Tejun Heo Cc: Vlastimil Babka Link: http://lkml.kernel.org/r/20200623174037.3951353-6-guro@fb.com Signed-off-by: Linus Torvalds commit 4138fdfc8b5db5a7a4b9b50c69d475fb2ac351b7 Author: Roman Gushchin Date: Thu Aug 6 23:20:42 2020 -0700 mm: slub: implement SLUB version of obj_to_index() This commit implements SLUB version of the obj_to_index() function, which will be required to calculate the offset of obj_cgroup in the obj_cgroups vector to store/obtain the objcg ownership data. To make it faster, let's repeat the SLAB's trick introduced by commit 6a2d7a955d8d ("SLAB: use a multiply instead of a divide in obj_to_index()") and avoid an expensive division. Vlastimil Babka noticed, that SLUB does have already a similar function called slab_index(), which is defined only if SLUB_DEBUG is enabled. The function does a similar math, but with a division, and it also takes a page address instead of a page pointer. Let's remove slab_index() and replace it with the new helper __obj_to_index(), which takes a page address. obj_to_index() will be a simple wrapper taking a page pointer and passing page_address(page) into __obj_to_index(). Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Christoph Lameter Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-5-guro@fb.com Signed-off-by: Linus Torvalds commit d42f3245c7e299e017213fa028c319316bcdb7f4 Author: Roman Gushchin Date: Thu Aug 6 23:20:39 2020 -0700 mm: memcg: convert vmstat slab counters to bytes In order to prepare for per-object slab memory accounting, convert NR_SLAB_RECLAIMABLE and NR_SLAB_UNRECLAIMABLE vmstat items to bytes. To make it obvious, rename them to NR_SLAB_RECLAIMABLE_B and NR_SLAB_UNRECLAIMABLE_B (similar to NR_KERNEL_STACK_KB). Internally global and per-node counters are stored in pages, however memcg and lruvec counters are stored in bytes. This scheme may look weird, but only for now. As soon as slab pages will be shared between multiple cgroups, global and node counters will reflect the total number of slab pages. However memcg and lruvec counters will be used for per-memcg slab memory tracking, which will take separate kernel objects in the account. Keeping global and node counters in pages helps to avoid additional overhead. The size of slab memory shouldn't exceed 4Gb on 32-bit machines, so it will fit into atomic_long_t we use for vmstats. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Acked-by: Vlastimil Babka Cc: Christoph Lameter Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-4-guro@fb.com Signed-off-by: Linus Torvalds commit ea426c2a7de8e575108b7cecd3374e0c15a9f25e Author: Roman Gushchin Date: Thu Aug 6 23:20:35 2020 -0700 mm: memcg: prepare for byte-sized vmstat items To implement per-object slab memory accounting, we need to convert slab vmstat counters to bytes. Actually, out of 4 levels of counters: global, per-node, per-memcg and per-lruvec only two last levels will require byte-sized counters. It's because global and per-node counters will be counting the number of slab pages, and per-memcg and per-lruvec will be counting the amount of memory taken by charged slab objects. Converting all vmstat counters to bytes or even all slab counters to bytes would introduce an additional overhead. So instead let's store global and per-node counters in pages, and memcg and lruvec counters in bytes. To make the API clean all access helpers (both on the read and write sides) are dealing with bytes. To avoid back-and-forth conversions a new flavor of read-side helpers is introduced, which always returns values in pages: node_page_state_pages() and global_node_page_state_pages(). Actually new helpers are just reading raw values. Old helpers are simple wrappers, which will complain on an attempt to read byte value, because at the moment no one actually needs bytes. Thanks to Johannes Weiner for the idea of having the byte-sized API on top of the page-sized internal storage. Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Christoph Lameter Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-3-guro@fb.com Signed-off-by: Linus Torvalds commit eedc4e5a142cc33fbb54f8d72b929a0e123c48c4 Author: Roman Gushchin Date: Thu Aug 6 23:20:32 2020 -0700 mm: memcg: factor out memcg- and lruvec-level changes out of __mod_lruvec_state() Patch series "The new cgroup slab memory controller", v7. The patchset moves the accounting from the page level to the object level. It allows to share slab pages between memory cgroups. This leads to a significant win in the slab utilization (up to 45%) and the corresponding drop in the total kernel memory footprint. The reduced number of unmovable slab pages should also have a positive effect on the memory fragmentation. The patchset makes the slab accounting code simpler: there is no more need in the complicated dynamic creation and destruction of per-cgroup slab caches, all memory cgroups use a global set of shared slab caches. The lifetime of slab caches is not more connected to the lifetime of memory cgroups. The more precise accounting does require more CPU, however in practice the difference seems to be negligible. We've been using the new slab controller in Facebook production for several months with different workloads and haven't seen any noticeable regressions. What we've seen were memory savings in order of 1 GB per host (it varied heavily depending on the actual workload, size of RAM, number of CPUs, memory pressure, etc). The third version of the patchset added yet another step towards the simplification of the code: sharing of slab caches between accounted and non-accounted allocations. It comes with significant upsides (most noticeable, a complete elimination of dynamic slab caches creation) but not without some regression risks, so this change sits on top of the patchset and is not completely merged in. So in the unlikely event of a noticeable performance regression it can be reverted separately. The slab memory accounting works in exactly the same way for SLAB and SLUB. With both allocators the new controller shows significant memory savings, with SLUB the difference is bigger. On my 16-core desktop machine running Fedora 32 the size of the slab memory measured after the start of the system was lower by 58% and 38% with SLUB and SLAB correspondingly. As an estimation of a potential CPU overhead, below are results of slab_bulk_test01 test, kindly provided by Jesper D. Brouer. He also helped with the evaluation of results. The test can be found here: https://github.com/netoptimizer/prototype-kernel/ The smallest number in each row should be picked for a comparison. SLUB-patched - bulk-API - SLUB-patched : bulk_quick_reuse objects=1 : 187 - 90 - 224 cycles(tsc) - SLUB-patched : bulk_quick_reuse objects=2 : 110 - 53 - 133 cycles(tsc) - SLUB-patched : bulk_quick_reuse objects=3 : 88 - 95 - 42 cycles(tsc) - SLUB-patched : bulk_quick_reuse objects=4 : 91 - 85 - 36 cycles(tsc) - SLUB-patched : bulk_quick_reuse objects=8 : 32 - 66 - 32 cycles(tsc) SLUB-original - bulk-API - SLUB-original: bulk_quick_reuse objects=1 : 87 - 87 - 142 cycles(tsc) - SLUB-original: bulk_quick_reuse objects=2 : 52 - 53 - 53 cycles(tsc) - SLUB-original: bulk_quick_reuse objects=3 : 42 - 42 - 91 cycles(tsc) - SLUB-original: bulk_quick_reuse objects=4 : 91 - 37 - 37 cycles(tsc) - SLUB-original: bulk_quick_reuse objects=8 : 31 - 79 - 76 cycles(tsc) SLAB-patched - bulk-API - SLAB-patched : bulk_quick_reuse objects=1 : 67 - 67 - 140 cycles(tsc) - SLAB-patched : bulk_quick_reuse objects=2 : 55 - 46 - 46 cycles(tsc) - SLAB-patched : bulk_quick_reuse objects=3 : 93 - 94 - 39 cycles(tsc) - SLAB-patched : bulk_quick_reuse objects=4 : 35 - 88 - 85 cycles(tsc) - SLAB-patched : bulk_quick_reuse objects=8 : 30 - 30 - 30 cycles(tsc) SLAB-original- bulk-API - SLAB-original: bulk_quick_reuse objects=1 : 143 - 136 - 67 cycles(tsc) - SLAB-original: bulk_quick_reuse objects=2 : 45 - 46 - 46 cycles(tsc) - SLAB-original: bulk_quick_reuse objects=3 : 38 - 39 - 39 cycles(tsc) - SLAB-original: bulk_quick_reuse objects=4 : 35 - 87 - 87 cycles(tsc) - SLAB-original: bulk_quick_reuse objects=8 : 29 - 66 - 30 cycles(tsc) This patch (of 19): To convert memcg and lruvec slab counters to bytes there must be a way to change these counters without touching node counters. Factor out __mod_memcg_lruvec_state() out of __mod_lruvec_state(). Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Reviewed-by: Vlastimil Babka Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Christoph Lameter Cc: Michal Hocko Cc: Tejun Heo Link: http://lkml.kernel.org/r/20200623174037.3951353-1-guro@fb.com Link: http://lkml.kernel.org/r/20200623174037.3951353-2-guro@fb.com Signed-off-by: Linus Torvalds commit d648bcc7fe65f09ecd19091f68395dfb3b7a87c8 Author: Roman Gushchin Date: Thu Aug 6 23:20:28 2020 -0700 mm: kmem: make memcg_kmem_enabled() irreversible Historically the kernel memory accounting was an opt-in feature, which could be enabled for individual cgroups. But now it's not true, and it's on by default both on cgroup v1 and cgroup v2. And as long as a user has at least one non-root memory cgroup, the kernel memory accounting is on. So in most setups it's either always on (if memory cgroups are in use and kmem accounting is not disabled), either always off (otherwise). memcg_kmem_enabled() is used in many places to guard the kernel memory accounting code. If memcg_kmem_enabled() can reverse from returning true to returning false (as now), we can't rely on it on release paths and have to check if it was on before. If we'll make memcg_kmem_enabled() irreversible (always returning true after returning it for the first time), it'll make the general logic more simple and robust. It also will allow to guard some checks which otherwise would stay unguarded. Reported-by: Naresh Kamboju Signed-off-by: Roman Gushchin Signed-off-by: Andrew Morton Tested-by: Naresh Kamboju Reviewed-by: Shakeel Butt Acked-by: Vlastimil Babka Acked-by: Michal Hocko Link: http://lkml.kernel.org/r/20200702180926.1330769-1-guro@fb.com Signed-off-by: Linus Torvalds commit ea3271f7196c65ae5d3e1c7b3f733892c017dbd6 Author: Chris Down Date: Thu Aug 6 23:20:25 2020 -0700 tmpfs: support 64-bit inums per-sb The default is still set to inode32 for backwards compatibility, but system administrators can opt in to the new 64-bit inode numbers by either: 1. Passing inode64 on the command line when mounting, or 2. Configuring the kernel with CONFIG_TMPFS_INODE64=y The inode64 and inode32 names are used based on existing precedent from XFS. [hughd@google.com: Kconfig fixes] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2008011928010.13320@eggly.anvils Signed-off-by: Chris Down Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Reviewed-by: Amir Goldstein Acked-by: Hugh Dickins Cc: Al Viro Cc: Matthew Wilcox Cc: Jeff Layton Cc: Johannes Weiner Cc: Tejun Heo Link: http://lkml.kernel.org/r/8b23758d0c66b5e2263e08baf9c4b6a7565cbd8f.1594661218.git.chris@chrisdown.name Signed-off-by: Linus Torvalds commit e809d5f0b5c912fe981dce738f3283b2010665f0 Author: Chris Down Date: Thu Aug 6 23:20:20 2020 -0700 tmpfs: per-superblock i_ino support Patch series "tmpfs: inode: Reduce risk of inum overflow", v7. In Facebook production we are seeing heavy i_ino wraparounds on tmpfs. On affected tiers, in excess of 10% of hosts show multiple files with different content and the same inode number, with some servers even having as many as 150 duplicated inode numbers with differing file content. This causes actual, tangible problems in production. For example, we have complaints from those working on remote caches that their application is reporting cache corruptions because it uses (device, inodenum) to establish the identity of a particular cache object, but because it's not unique any more, the application refuses to continue and reports cache corruption. Even worse, sometimes applications may not even detect the corruption but may continue anyway, causing phantom and hard to debug behaviour. In general, userspace applications expect that (device, inodenum) should be enough to be uniquely point to one inode, which seems fair enough. One might also need to check the generation, but in this case: 1. That's not currently exposed to userspace (ioctl(...FS_IOC_GETVERSION...) returns ENOTTY on tmpfs); 2. Even with generation, there shouldn't be two live inodes with the same inode number on one device. In order to mitigate this, we take a two-pronged approach: 1. Moving inum generation from being global to per-sb for tmpfs. This itself allows some reduction in i_ino churn. This works on both 64- and 32- bit machines. 2. Adding inode{64,32} for tmpfs. This fix is supported on machines with 64-bit ino_t only: we allow users to mount tmpfs with a new inode64 option that uses the full width of ino_t, or CONFIG_TMPFS_INODE64. You can see how this compares to previous related patches which didn't implement this per-superblock: - https://patchwork.kernel.org/patch/11254001/ - https://patchwork.kernel.org/patch/11023915/ This patch (of 2): get_next_ino has a number of problems: - It uses and returns a uint, which is susceptible to become overflowed if a lot of volatile inodes that use get_next_ino are created. - It's global, with no specificity per-sb or even per-filesystem. This means it's not that difficult to cause inode number wraparounds on a single device, which can result in having multiple distinct inodes with the same inode number. This patch adds a per-superblock counter that mitigates the second case. This design also allows us to later have a specific i_ino size per-device, for example, allowing users to choose whether to use 32- or 64-bit inodes for each tmpfs mount. This is implemented in the next commit. For internal shmem mounts which may be less tolerant to spinlock delays, we implement a percpu batching scheme which only takes the stat_lock at each batch boundary. Signed-off-by: Chris Down Signed-off-by: Andrew Morton Acked-by: Hugh Dickins Cc: Amir Goldstein Cc: Al Viro Cc: Matthew Wilcox Cc: Jeff Layton Cc: Johannes Weiner Cc: Tejun Heo Link: http://lkml.kernel.org/r/cover.1594661218.git.chris@chrisdown.name Link: http://lkml.kernel.org/r/1986b9d63b986f08ec07a4aa4b2275e718e47d8a.1594661218.git.chris@chrisdown.name Signed-off-by: Linus Torvalds commit 0f190a7ab78878f9e6c6930fc0f5f92c1250b57d Author: Xianting Tian Date: Thu Aug 6 23:20:17 2020 -0700 mm/page_io.c: use blk_io_schedule() for avoiding task hung in sync io swap_readpage() does the sync io for one page, the io is not big, normally, the io can be finished quickly, but it may take long time or wait forever in case of io failure or discard. This patch uses blk_io_schedule() instead of io_schedule() to avoid task hung and crash (when set /proc/sys/kernel/hung_task_panic) when the above exception occurs. This is similar to the hung task avoidance in submit_bio_wait(), blk_execute_rq() and __blkdev_direct_IO(). Signed-off-by: Xianting Tian Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Ming Lei Cc: Bart Van Assche Cc: Hannes Reinecke Cc: Jens Axboe Cc: Hugh Dickins Link: http://lkml.kernel.org/r/1596461807-21087-1-git-send-email-xianting_tian@126.com Signed-off-by: Linus Torvalds commit 27ec4878df7bdffa4667f41d3830520597679a74 Author: Krzysztof Kozlowski Date: Thu Aug 6 23:20:14 2020 -0700 mm: swap: fix kerneldoc of swap_vma_readahead() Fix W=1 compile warnings (invalid kerneldoc): mm/swap_state.c:742: warning: Function parameter or member 'fentry' not described in 'swap_vma_readahead' mm/swap_state.c:742: warning: Excess function parameter 'entry' description in 'swap_vma_readahead' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Link: http://lkml.kernel.org/r/20200728171109.28687-2-krzk@kernel.org Signed-off-by: Linus Torvalds commit e0f3ebba97f190ce988829ccc5b527e8eef40e01 Author: Zhen Lei Date: Thu Aug 6 23:20:11 2020 -0700 mm/swap_slots.c: remove redundant check for swap_slot_cache_initialized Because enable_swap_slots_cache can only become true in enable_swap_slots_cache(), and depends on swap_slot_cache_initialized is true before. That means, when enable_swap_slots_cache is true, swap_slot_cache_initialized is true also. So the condition: "swap_slot_cache_enabled && swap_slot_cache_initialized" can be reduced to "swap_slot_cache_enabled" And in mathematics: "!swap_slot_cache_enabled || !swap_slot_cache_initialized" is equal to "!(swap_slot_cache_enabled && swap_slot_cache_initialized)" So no functional change. Signed-off-by: Zhen Lei Signed-off-by: Andrew Morton Acked-by: Tim Chen Link: http://lkml.kernel.org/r/20200430061143.450-4-thunder.leizhen@huawei.com Signed-off-by: Linus Torvalds commit d69a9575f57ef742df599f1186dcbfb28af0f846 Author: Zhen Lei Date: Thu Aug 6 23:20:08 2020 -0700 mm/swap_slots.c: simplify enable_swap_slots_cache() Whether swap_slot_cache_initialized is true or false, __reenable_swap_slots_cache() is always called. To make this meaning clear, leave only one call to __reenable_swap_slots_cache(). This also make it clearer what extra needs be done when swap_slot_cache_initialized is false. No functional change. Signed-off-by: Zhen Lei Signed-off-by: Andrew Morton Acked-by: Tim Chen Link: http://lkml.kernel.org/r/20200430061143.450-3-thunder.leizhen@huawei.com Signed-off-by: Linus Torvalds commit f90eae2a0f8ec43081c2d590004da9dd55a64791 Author: Zhen Lei Date: Thu Aug 6 23:20:05 2020 -0700 mm/swap_slots.c: simplify alloc_swap_slot_cache() Patch series "clean up some functions in mm/swap_slots.c". When I studied the code of mm/swap_slots.c, I found some places can be improved. This patch (of 3): Both "slots" and "slots_ret" are only need to be freed when cache already allocated. Make them closer, seems more clear. No functional change. Signed-off-by: Zhen Lei Signed-off-by: Andrew Morton Acked-by: Tim Chen Link: http://lkml.kernel.org/r/20200430061143.450-1-thunder.leizhen@huawei.com Link: http://lkml.kernel.org/r/20200430061143.450-2-thunder.leizhen@huawei.com Signed-off-by: Linus Torvalds commit 0a36f7f85e69ce248a89634b2d386600bc4c637b Author: Tang Yizhou Date: Thu Aug 6 23:20:01 2020 -0700 mm/gup.c: fix the comment of return value for populate_vma_page_range() The return value of populate_vma_page_range() is consistent with __get_user_pages(), and so is the function comment of return value. Signed-off-by: Tang Yizhou Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Ira Weiny Link: http://lkml.kernel.org/r/20200720034303.29920-1-tangyizhou@huawei.com Signed-off-by: Linus Torvalds commit 605cad8343721c4a53e80f87d5b1161baf1a7d2b Author: Yang Shi Date: Thu Aug 6 23:19:58 2020 -0700 mm: filemap: add missing FGP_ flags in kerneldoc comment for pagecache_get_page FGP_{WRITE|NOFS|NOWAIT} were missed in pagecache_get_page's kerneldoc comment. Signed-off-by: Yang Shi Signed-off-by: Andrew Morton Cc: Gang Deng Cc: Shakeel Butt Cc: Johannes Weiner Cc: Rik van Riel Link: http://lkml.kernel.org/r/1593031747-4249-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Linus Torvalds commit b9306a796cad8a65f4d21779524e73fe0745bae1 Author: Yang Shi Date: Thu Aug 6 23:19:55 2020 -0700 mm: filemap: clear idle flag for writes Since commit bbddabe2e436aa ("mm: filemap: only do access activations on reads"), mark_page_accessed() is called for reads only. But the idle flag is cleared by mark_page_accessed() so the idle flag won't get cleared if the page is write accessed only. Basically idle page tracking is used to estimate workingset size of workload, noticeable size of workingset might be missed if the idle flag is not maintained correctly. It seems good enough to just clear idle flag for write operations. Fixes: bbddabe2e436 ("mm: filemap: only do access activations on reads") Reported-by: Gang Deng Signed-off-by: Yang Shi Signed-off-by: Andrew Morton Reviewed-by: Shakeel Butt Cc: Johannes Weiner Cc: Rik van Riel Link: http://lkml.kernel.org/r/1593020612-13051-1-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Linus Torvalds commit 6dc5ea16c86f753951f53085aa04df49cf17cb50 Author: John Hubbard Date: Thu Aug 6 23:19:51 2020 -0700 mm, dump_page: do not crash with bad compound_mapcount() If a compound page is being split while dump_page() is being run on that page, we can end up calling compound_mapcount() on a page that is no longer compound. This leads to a crash (already seen at least once in the field), due to the VM_BUG_ON_PAGE() assertion inside compound_mapcount(). (The above is from Matthew Wilcox's analysis of Qian Cai's bug report.) A similar problem is possible, via compound_pincount() instead of compound_mapcount(). In order to avoid this kind of crash, make dump_page() slightly more robust, by providing a pair of simpler routines that don't contain assertions: head_mapcount() and head_pincount(). For debug tools, we don't want to go *too* far in this direction, but this is a simple small fix, and the crash has already been seen, so it's a good trade-off. Reported-by: Qian Cai Suggested-by: Matthew Wilcox Signed-off-by: John Hubbard Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Kirill A. Shutemov Cc: Mike Rapoport Cc: William Kucharski Link: http://lkml.kernel.org/r/20200804214807.169256-1-jhubbard@nvidia.com Signed-off-by: Linus Torvalds commit 54a75157d97976f35e63e37e31e39bda622cbf39 Author: Matthew Wilcox (Oracle) Date: Thu Aug 6 23:19:48 2020 -0700 mm/debug: print hashed address of struct page The actual address of the struct page isn't particularly helpful, while the hashed address helps match with other messages elsewhere. Add the PFN that the page refers to in order to help diagnose problems where the page is improperly aligned for the purpose. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: John Hubbard Acked-by: Mike Rapoport Cc: "Kirill A. Shutemov" Cc: Vlastimil Babka Cc: William Kucharski Link: http://lkml.kernel.org/r/20200709202117.7216-7-willy@infradead.org Signed-off-by: Linus Torvalds commit 9bdaf2cc5eb570a875c6871ef7bee86a8c5be2d7 Author: Matthew Wilcox (Oracle) Date: Thu Aug 6 23:19:45 2020 -0700 mm/debug: print the inode number in dump_page The inode number helps correlate this page with debug messages elsewhere in the kernel. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: John Hubbard Acked-by: Mike Rapoport Cc: "Kirill A. Shutemov" Cc: Vlastimil Babka Cc: William Kucharski Link: http://lkml.kernel.org/r/20200709202117.7216-6-willy@infradead.org Signed-off-by: Linus Torvalds commit 9ad3826575abd1c096cf678a87dd860395c46d78 Author: Matthew Wilcox (Oracle) Date: Thu Aug 6 23:19:42 2020 -0700 mm/debug: switch dump_page to get_kernel_nofault This is simpler to use than copy_from_kernel_nofault(). Also make some of the related error messages less verbose. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Acked-by: Mike Rapoport Acked-by: Vlastimil Babka Cc: John Hubbard Cc: "Kirill A. Shutemov" Cc: William Kucharski Link: http://lkml.kernel.org/r/20200709202117.7216-5-willy@infradead.org Signed-off-by: Linus Torvalds commit 0b93d59e90d4403dd7c6bccaf27bd5bc91396866 Author: Matthew Wilcox (Oracle) Date: Thu Aug 6 23:19:39 2020 -0700 mm/debug: print head flags in dump_page Tail page flags contain very little useful information. Print the head page's flags instead. While the flags will contain "head" for tail pages, this should not be too confusing as the previous line starts with the word "head:" and so the flags should be interpreted as belonging to the head page. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: John Hubbard Acked-by: Mike Rapoport Acked-by: Vlastimil Babka Cc: "Kirill A. Shutemov" Cc: William Kucharski Link: http://lkml.kernel.org/r/20200709202117.7216-4-willy@infradead.org Signed-off-by: Linus Torvalds commit 452b557c9500d27903a20c450ca8d2919c3742be Author: Matthew Wilcox (Oracle) Date: Thu Aug 6 23:19:35 2020 -0700 mm/debug: dump compound page information on a second line Simplify both the implementation and the output by splitting all the compound page information onto a second line. Reported-by: John Hubbard Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Tested-by: John Hubbard Reviewed-by: John Hubbard Acked-by: Mike Rapoport Acked-by: Vlastimil Babka Cc: "Kirill A. Shutemov" Cc: William Kucharski Link: http://lkml.kernel.org/r/20200709202117.7216-3-willy@infradead.org Signed-off-by: Linus Torvalds commit e1ab96f8cc713c673df4ab806bd90918e5ab6c98 Author: Matthew Wilcox (Oracle) Date: Thu Aug 6 23:19:32 2020 -0700 mm/debug: handle page->mapping better in dump_page Patch series "Improvements for dump_page()", v2. Here's a sample dump of a pagecache tail page with all of the patches applied: page:000000006d1c49ca refcount:6 mapcount:0 mapping:00000000136b8d90 index:0x109 pfn:0x6c645 head:000000008bd38076 order:2 compound_mapcount:0 compound_pincount:0 aops:xfs_address_space_operations ino:800042 dentry name:"fd" flags: 0x4000000000012014(uptodate|lru|private|head) raw: 4000000000000000 ffffd46ac1b19101 ffffffff00000202 dead000000000004 raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000 head: 4000000000012014 ffffd46ac1b1bbc8 ffffd46ac1b1bc08 ffff91976f659560 head: 0000000000000108 ffff919773220680 00000006ffffffff 0000000000000000 page dumped because: testing This patch (of 6): If we can't call page_mapping() to get the page mapping, handle the anon/ksm/movable bits correctly. [akpm@linux-foundation.org: augmented code comment from John] Link: http://lkml.kernel.org/r/15cff11a-6762-8a6a-3f0e-dd227280cd6f@nvidia.com Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Reviewed-by: John Hubbard Acked-by: Mike Rapoport Acked-by: Vlastimil Babka Cc: William Kucharski Cc: "Kirill A. Shutemov" Link: http://lkml.kernel.org/r/20200709202117.7216-1-willy@infradead.org Link: http://lkml.kernel.org/r/20200709202117.7216-2-willy@infradead.org Signed-off-by: Linus Torvalds commit b1d00007f2126e045c465daf754df43ba74ddcdd Author: Anshuman Khandual Date: Thu Aug 6 23:19:28 2020 -0700 Documentation/mm: add descriptions for arch page table helpers This adds a specific description file for all arch page table helpers which is in sync with the semantics being tested via CONFIG_DEBUG_VM_PGTABLE. All future changes either to these descriptions here or the debug test should always remain in sync. [anshuman.khandual@arm.com: fold in Mike's patch for the rst document, fix typos in the rst document] Link: http://lkml.kernel.org/r/1594610587-4172-5-git-send-email-anshuman.khandual@arm.com Suggested-by: Mike Rapoport Signed-off-by: Anshuman Khandual Signed-off-by: Andrew Morton Acked-by: Mike Rapoport Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Vineet Gupta Cc: Catalin Marinas Cc: Will Deacon Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Kirill A. Shutemov Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Zi Yan Link: http://lkml.kernel.org/r/1593996516-7186-5-git-send-email-anshuman.khandual@arm.com Signed-off-by: Linus Torvalds commit 6315df41afccf12a468ba0b17188d60b26009bc2 Author: Anshuman Khandual Date: Thu Aug 6 23:19:25 2020 -0700 mm/debug_vm_pgtable: add debug prints for individual tests This adds debug print information that enlists all tests getting executed on a given platform. With dynamic debug enabled, the following information will be splashed during boot. For compactness purpose, dropped both time stamp and prefix (i.e debug_vm_pgtable) from this sample output. [debug_vm_pgtable ]: Validating architecture page table helpers [pte_basic_tests ]: Validating PTE basic [pmd_basic_tests ]: Validating PMD basic [p4d_basic_tests ]: Validating P4D basic [pgd_basic_tests ]: Validating PGD basic [pte_clear_tests ]: Validating PTE clear [pmd_clear_tests ]: Validating PMD clear [pte_advanced_tests ]: Validating PTE advanced [pmd_advanced_tests ]: Validating PMD advanced [hugetlb_advanced_tests]: Validating HugeTLB advanced [pmd_leaf_tests ]: Validating PMD leaf [pmd_huge_tests ]: Validating PMD huge [pte_savedwrite_tests ]: Validating PTE saved write [pmd_savedwrite_tests ]: Validating PMD saved write [pmd_populate_tests ]: Validating PMD populate [pte_special_tests ]: Validating PTE special [pte_protnone_tests ]: Validating PTE protnone [pmd_protnone_tests ]: Validating PMD protnone [pte_devmap_tests ]: Validating PTE devmap [pmd_devmap_tests ]: Validating PMD devmap [pte_swap_tests ]: Validating PTE swap [swap_migration_tests ]: Validating swap migration [hugetlb_basic_tests ]: Validating HugeTLB basic [pmd_thp_tests ]: Validating PMD based THP Signed-off-by: Anshuman Khandual Signed-off-by: Andrew Morton Tested-by: Vineet Gupta [arc] Reviewed-by: Zi Yan Cc: Catalin Marinas Cc: Mike Rapoport Cc: Vineet Gupta Cc: Will Deacon Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Kirill A. Shutemov Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Jonathan Corbet Cc: Mike Rapoport Link: http://lkml.kernel.org/r/1593996516-7186-4-git-send-email-anshuman.khandual@arm.com Signed-off-by: Linus Torvalds commit a5c3b9ffb0f404ba90622ea4a25c06035dd01249 Author: Anshuman Khandual Date: Thu Aug 6 23:19:20 2020 -0700 mm/debug_vm_pgtable: add tests validating advanced arch page table helpers This adds new tests validating for these following arch advanced page table helpers. These tests create and test specific mapping types at various page table levels. 1. pxxp_set_wrprotect() 2. pxxp_get_and_clear() 3. pxxp_set_access_flags() 4. pxxp_get_and_clear_full() 5. pxxp_test_and_clear_young() 6. pxx_leaf() 7. pxx_set_huge() 8. pxx_(clear|mk)_savedwrite() 9. huge_pxxp_xxx() [anshuman.khandual@arm.com: drop RANDOM_ORVALUE from hugetlb_advanced_tests()] Link: http://lkml.kernel.org/r/1594610587-4172-3-git-send-email-anshuman.khandual@arm.com Suggested-by: Catalin Marinas Signed-off-by: Anshuman Khandual Signed-off-by: Andrew Morton Tested-by: Vineet Gupta [arc] Reviewed-by: Zi Yan Cc: Mike Rapoport Cc: Vineet Gupta Cc: Catalin Marinas Cc: Will Deacon Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Kirill A. Shutemov Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Steven Price Link: http://lkml.kernel.org/r/1593996516-7186-3-git-send-email-anshuman.khandual@arm.com Signed-off-by: Linus Torvalds commit 05289402d71736bd275902372e4b25664aeac6b8 Author: Anshuman Khandual Date: Thu Aug 6 23:19:16 2020 -0700 mm/debug_vm_pgtable: add tests validating arch helpers for core MM features Patch series "mm/debug_vm_pgtable: Add some more tests", v5. This series adds some more arch page table helper validation tests which are related to core and advanced memory functions. This also creates a documentation, enlisting expected semantics for all page table helpers as suggested by Mike Rapoport previously (https://lkml.org/lkml/2020/1/30/40). There are many TRANSPARENT_HUGEPAGE and ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD ifdefs scattered across the test. But consolidating all the fallback stubs is not very straight forward because ARCH_HAS_TRANSPARENT_HUGEPAGE_PUD is not explicitly dependent on ARCH_HAS_TRANSPARENT_HUGEPAGE. Tested on arm64, x86 platforms but only build tested on all other enabled platforms through ARCH_HAS_DEBUG_VM_PGTABLE i.e powerpc, arc, s390. The following failure on arm64 still exists which was mentioned previously. It will be fixed with the upcoming THP migration on arm64 enablement series. WARNING .... mm/debug_vm_pgtable.c:860 debug_vm_pgtable+0x940/0xa54 WARN_ON(!pmd_present(pmd_mkinvalid(pmd_mkhuge(pmd)))) This patch (of 4): This adds new tests validating arch page table helpers for these following core memory features. These tests create and test specific mapping types at various page table levels. 1. SPECIAL mapping 2. PROTNONE mapping 3. DEVMAP mapping 4. SOFTDIRTY mapping 5. SWAP mapping 6. MIGRATION mapping 7. HUGETLB mapping 8. THP mapping Suggested-by: Catalin Marinas Signed-off-by: Anshuman Khandual Signed-off-by: Andrew Morton Tested-by: Vineet Gupta [arc] Reviewed-by: Zi Yan Cc: Mike Rapoport Cc: Vineet Gupta Cc: Catalin Marinas Cc: Will Deacon Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Kirill A. Shutemov Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Jonathan Corbet Cc: Mike Rapoport Cc: Steven Price Link: http://lkml.kernel.org/r/1594610587-4172-1-git-send-email-anshuman.khandual@arm.com Link: http://lkml.kernel.org/r/1593996516-7186-1-git-send-email-anshuman.khandual@arm.com Link: http://lkml.kernel.org/r/1593996516-7186-2-git-send-email-anshuman.khandual@arm.com Signed-off-by: Linus Torvalds commit cfbe1636c3585c1e032bfac512fb8be903fbc913 Author: Marco Elver Date: Thu Aug 6 23:19:12 2020 -0700 mm, kcsan: instrument SLAB/SLUB free with "ASSERT_EXCLUSIVE_ACCESS" Provide the necessary KCSAN checks to assist with debugging racy use-after-frees. While KASAN is more reliable at generally catching such use-after-frees (due to its use of a quarantine), it can be difficult to debug racy use-after-frees. If a reliable reproducer exists, KCSAN can assist in debugging such issues. Note: ASSERT_EXCLUSIVE_ACCESS is a convenience wrapper if the size is simply sizeof(var). Instead, here we just use __kcsan_check_access() explicitly to pass the correct size. Signed-off-by: Marco Elver Signed-off-by: Andrew Morton Cc: Alexander Potapenko Cc: Andrey Konovalov Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Link: http://lkml.kernel.org/r/20200623072653.114563-1-elver@google.com Signed-off-by: Linus Torvalds commit b3cb9fc3aeaf9d52967c87d54a98f035e96279dc Author: Sebastian Andrzej Siewior Date: Thu Aug 6 23:19:09 2020 -0700 mm/slub.c: drop lockdep_assert_held() from put_map() There is no point in using lockdep_assert_held() unlock that is about to be unlocked. It works only with lockdep and lockdep will complain if spin_unlock() is used on a lock that has not been locked. Remove superfluous lockdep_assert_held(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Andrew Morton Cc: Yu Zhao Cc: Christopher Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20200618201234.795692-2-bigeasy@linutronix.de Signed-off-by: Linus Torvalds commit e42f174e43e47b623d9dbf814521c4961000c962 Author: Vlastimil Babka Date: Thu Aug 6 23:19:05 2020 -0700 mm, slab/slub: improve error reporting and overhead of cache_from_obj() cache_from_obj() was added by commit b9ce5ef49f00 ("sl[au]b: always get the cache from its page in kmem_cache_free()") to support kmemcg, where per-memcg cache can be different from the root one, so we can't use the kmem_cache pointer given to kmem_cache_free(). Prior to that commit, SLUB already had debugging check+warning that could be enabled to compare the given kmem_cache pointer to one referenced by the slab page where the object-to-be-freed resides. This check was moved to cache_from_obj(). Later the check was also enabled for SLAB_FREELIST_HARDENED configs by commit 598a0717a816 ("mm/slab: validate cache membership under freelist hardening"). These checks and warnings can be useful especially for the debugging, which can be improved. Commit 598a0717a816 changed the pr_err() with WARN_ON_ONCE() to WARN_ONCE() so only the first hit is now reported, others are silent. This patch changes it to WARN() so that all errors are reported. It's also useful to print SLUB allocation/free tracking info for the offending object, if tracking is enabled. Thus, export the SLUB print_tracking() function and provide an empty one for SLAB. For SLUB we can also benefit from the static key check in kmem_cache_debug_flags(), but we need to move this function to slab.h and declare the static key there. [1] https://lore.kernel.org/r/20200608230654.828134-18-guro@fb.com [vbabka@suse.cz: avoid bogus WARN()] Link: https://lore.kernel.org/r/20200623090213.GW5535@shao2-debian Link: http://lkml.kernel.org/r/b33e0fa7-cd28-4788-9e54-5927846329ef@suse.cz Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Acked-by: Kees Cook Acked-by: Roman Gushchin Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Matthew Garrett Cc: Jann Horn Cc: Vijayanand Jitta Cc: Vinayak Menon Link: http://lkml.kernel.org/r/afeda7ac-748b-33d8-a905-56b708148ad5@suse.cz Signed-off-by: Linus Torvalds commit d3c58f24be1bf10fa9e11977080a2398ddcd8361 Author: Vlastimil Babka Date: Thu Aug 6 23:19:01 2020 -0700 mm, slab/slub: move and improve cache_from_obj() The function cache_from_obj() was added by commit b9ce5ef49f00 ("sl[au]b: always get the cache from its page in kmem_cache_free()") to support kmemcg, where per-memcg cache can be different from the root one, so we can't use the kmem_cache pointer given to kmem_cache_free(). Prior to that commit, SLUB already had debugging check+warning that could be enabled to compare the given kmem_cache pointer to one referenced by the slab page where the object-to-be-freed resides. This check was moved to cache_from_obj(). Later the check was also enabled for SLAB_FREELIST_HARDENED configs by commit 598a0717a816 ("mm/slab: validate cache membership under freelist hardening"). These checks and warnings can be useful especially for the debugging, which can be improved. Commit 598a0717a816 changed the pr_err() with WARN_ON_ONCE() to WARN_ONCE() so only the first hit is now reported, others are silent. This patch changes it to WARN() so that all errors are reported. It's also useful to print SLUB allocation/free tracking info for the offending object, if tracking is enabled. We could export the SLUB print_tracking() function and provide an empty one for SLAB, or realize that both the debugging and hardening cases in cache_from_obj() are only supported by SLUB anyway. So this patch moves cache_from_obj() from slab.h to separate instances in slab.c and slub.c, where the SLAB version only does the kmemcg lookup and even could be completely removed once the kmemcg rework [1] is merged. The SLUB version can thus easily use the print_tracking() function. It can also use the kmem_cache_debug_flags() static key check for improved performance in kernels without the hardening and with debugging not enabled on boot. [1] https://lore.kernel.org/r/20200608230654.828134-18-guro@fb.com Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Cc: Christoph Lameter Cc: Jann Horn Cc: Kees Cook Cc: Vijayanand Jitta Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200610163135.17364-10-vbabka@suse.cz Signed-off-by: Linus Torvalds commit 8fc8d6664247a6e65cba000789e2e85e2288f6f7 Author: Vlastimil Babka Date: Thu Aug 6 23:18:58 2020 -0700 mm, slub: extend checks guarded by slub_debug static key There are few more places in SLUB that could benefit from reduced overhead of the static key introduced by a previous patch: - setup_object_debug() called on each object in newly allocated slab page - setup_page_debug() called on newly allocated slab page - __free_slab() called on freed slab page Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Acked-by: Roman Gushchin Acked-by: Christoph Lameter Cc: Jann Horn Cc: Kees Cook Cc: Vijayanand Jitta Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200610163135.17364-9-vbabka@suse.cz Signed-off-by: Linus Torvalds commit 59052e89fc89e3e6bef0151052e093566e446851 Author: Vlastimil Babka Date: Thu Aug 6 23:18:55 2020 -0700 mm, slub: introduce kmem_cache_debug_flags() There are few places that call kmem_cache_debug(s) (which tests if any of debug flags are enabled for a cache) immediately followed by a test for a specific flag. The compiler can probably eliminate the extra check, but we can make the code nicer by introducing kmem_cache_debug_flags() that works like kmem_cache_debug() (including the static key check) but tests for specific flag(s). The next patches will add more users. [vbabka@suse.cz: change return from int to bool, per Kees. Add VM_WARN_ON_ONCE() for invalid flags, per Roman] Link: http://lkml.kernel.org/r/949b90ed-e0f0-07d7-4d21-e30ec0958a7c@suse.cz Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Acked-by: Roman Gushchin Acked-by: Christoph Lameter Acked-by: Kees Cook Cc: Jann Horn Cc: Vijayanand Jitta Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200610163135.17364-8-vbabka@suse.cz Signed-off-by: Linus Torvalds commit ca0cab65ea2b8c1527dc48c8dfd38ae055f5f241 Author: Vlastimil Babka Date: Thu Aug 6 23:18:51 2020 -0700 mm, slub: introduce static key for slub_debug() One advantage of CONFIG_SLUB_DEBUG is that a generic distro kernel can be built with the option enabled, but it's inactive until simply enabled on boot, without rebuilding the kernel. With a static key, we can further eliminate the overhead of checking whether a cache has a particular debug flag enabled if we know that there are no such caches (slub_debug was not enabled during boot). We use the same mechanism also for e.g. page_owner, debug_pagealloc or kmemcg functionality. This patch introduces the static key and makes the general check for per-cache debug flags kmem_cache_debug() use it. This benefits several call sites, including (slow path but still rather frequent) __slab_free(). The next patches will add more uses. Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Acked-by: Roman Gushchin Acked-by: Christoph Lameter Cc: Jann Horn Cc: Vijayanand Jitta Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200610163135.17364-7-vbabka@suse.cz Signed-off-by: Linus Torvalds commit 8f58119ac49c03c5a0879353661c586b0436c250 Author: Vlastimil Babka Date: Thu Aug 6 23:18:48 2020 -0700 mm, slub: make reclaim_account attribute read-only The attribute reflects the SLAB_RECLAIM_ACCOUNT cache flag. It's not clear why this attribute was writable in the first place, as it's tied to how the cache is used by its creator, it's not a user tunable. Furthermore: - it affects slab merging, but that's not being checked while toggled - if affects whether __GFP_RECLAIMABLE flag is used to allocate page, but the runtime toggle doesn't update allocflags - it affects cache_vmstat_idx() so runtime toggling might lead to incosistency of NR_SLAB_RECLAIMABLE and NR_SLAB_UNRECLAIMABLE Thus make it read-only. Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Acked-by: Roman Gushchin Cc: Christoph Lameter Cc: Jann Horn Cc: Vijayanand Jitta Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200610163135.17364-6-vbabka@suse.cz Signed-off-by: Linus Torvalds commit 060807f841ac94d3826ce6fa3b4f3831cd0c015b Author: Vlastimil Babka Date: Thu Aug 6 23:18:45 2020 -0700 mm, slub: make remaining slub_debug related attributes read-only SLUB_DEBUG creates several files under /sys/kernel/slab// that can be read to check if the respective debugging options are enabled for given cache. Some options, namely sanity_checks, trace, and failslab can be also enabled and disabled at runtime by writing into the files. The runtime toggling is racy. Some options disable __CMPXCHG_DOUBLE when enabled, which means that in case of concurrent allocations, some can still use __CMPXCHG_DOUBLE and some not, leading to potential corruption. The s->flags field is also not updated or checked atomically. The simplest solution is to remove the runtime toggling. The extended slub_debug boot parameter syntax introduced by earlier patch should allow to fine-tune the debugging configuration during boot with same granularity. Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Acked-by: Roman Gushchin Cc: Christoph Lameter Cc: Jann Horn Cc: Vijayanand Jitta Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200610163135.17364-5-vbabka@suse.cz Signed-off-by: Linus Torvalds commit 32a6f409b6935d175464f26d31250ea13fda6b66 Author: Vlastimil Babka Date: Thu Aug 6 23:18:41 2020 -0700 mm, slub: remove runtime allocation order changes SLUB allows runtime changing of page allocation order by writing into the /sys/kernel/slab//order file. Jann has reported [1] that this interface allows the order to be set too small, leading to crashes. While it's possible to fix the immediate issue, closer inspection reveals potential races. Storing the new order calls calculate_sizes() which non-atomically updates a lot of kmem_cache fields while the cache is still in use. Unexpected behavior might occur even if the fields are set to the same value as they were. This could be fixed by splitting out the part of calculate_sizes() that depends on forced_order, so that we only update kmem_cache.oo field. This could still race with init_cache_random_seq(), shuffle_freelist(), allocate_slab(). Perhaps it's possible to audit and e.g. add some READ_ONCE/WRITE_ONCE accesses, it might be easier just to remove the runtime order changes, which is what this patch does. If there are valid usecases for per-cache order setting, we could e.g. extend the boot parameters to do that. [1] https://lore.kernel.org/r/CAG48ez31PP--h6_FzVyfJ4H86QYczAFPdxtJHUEEan+7VJETAQ@mail.gmail.com Reported-by: Jann Horn Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Acked-by: Christoph Lameter Acked-by: Roman Gushchin Cc: Vijayanand Jitta Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200610163135.17364-4-vbabka@suse.cz Signed-off-by: Linus Torvalds commit ad38b5b1131e2a0e5c46724847da2e1eba31fb68 Author: Vlastimil Babka Date: Thu Aug 6 23:18:38 2020 -0700 mm, slub: make some slub_debug related attributes read-only SLUB_DEBUG creates several files under /sys/kernel/slab// that can be read to check if the respective debugging options are enabled for given cache. The options can be also toggled at runtime by writing into the files. Some of those, namely red_zone, poison, and store_user can be toggled only when no objects yet exist in the cache. Vijayanand reports [1] that there is a problem with freelist randomization if changing the debugging option's state results in different number of objects per page, and the random sequence cache needs thus needs to be recomputed. However, another problem is that the check for "no objects yet exist in the cache" is racy, as noted by Jann [2] and fixing that would add overhead or otherwise complicate the allocation/freeing paths. Thus it would be much simpler just to remove the runtime toggling support. The documentation describes it's "In case you forgot to enable debugging on the kernel command line", but the neccessity of having no objects limits its usefulness anyway for many caches. Vijayanand describes an use case [3] where debugging is enabled for all but zram caches for memory overhead reasons, and using the runtime toggles was the only way to achieve such configuration. After the previous patch it's now possible to do that directly from the kernel boot option, so we can remove the dangerous runtime toggles by making the /sys attribute files read-only. While updating it, also improve the documentation of the debugging /sys files. [1] https://lkml.kernel.org/r/1580379523-32272-1-git-send-email-vjitta@codeaurora.org [2] https://lore.kernel.org/r/CAG48ez31PP--h6_FzVyfJ4H86QYczAFPdxtJHUEEan+7VJETAQ@mail.gmail.com [3] https://lore.kernel.org/r/1383cd32-1ddc-4dac-b5f8-9c42282fa81c@codeaurora.org Reported-by: Vijayanand Jitta Reported-by: Jann Horn Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Acked-by: Roman Gushchin Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Link: http://lkml.kernel.org/r/20200610163135.17364-3-vbabka@suse.cz Signed-off-by: Linus Torvalds commit e17f1dfba37b84b574ae91e809ae3804fe5b29b9 Author: Vlastimil Babka Date: Thu Aug 6 23:18:35 2020 -0700 mm, slub: extend slub_debug syntax for multiple blocks Patch series "slub_debug fixes and improvements". The slub_debug kernel boot parameter can either apply a single set of options to all caches or a list of caches. There is a use case where debugging is applied for all caches and then disabled at runtime for specific caches, for performance and memory consumption reasons [1]. As runtime changes are dangerous, extend the boot parameter syntax so that multiple blocks of either global or slab-specific options can be specified, with blocks delimited by ';'. This will also support the use case of [1] without runtime changes. For details see the updated Documentation/vm/slub.rst [1] https://lore.kernel.org/r/1383cd32-1ddc-4dac-b5f8-9c42282fa81c@codeaurora.org [weiyongjun1@huawei.com: make parse_slub_debug_flags() static] Link: http://lkml.kernel.org/r/20200702150522.4940-1-weiyongjun1@huawei.com Signed-off-by: Vlastimil Babka Signed-off-by: Andrew Morton Reviewed-by: Kees Cook Cc: Vlastimil Babka Cc: Christoph Lameter Cc: Jann Horn Cc: Roman Gushchin Cc: Vijayanand Jitta Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Link: http://lkml.kernel.org/r/20200610163135.17364-2-vbabka@suse.cz Signed-off-by: Linus Torvalds commit 221503e1281f8a7d67eacbb6dc99db95acdf806c Author: Xiao Yang Date: Thu Aug 6 23:18:31 2020 -0700 mm/slab.c: update outdated kmem_list3 in a comment kmem_list3 has been renamed to kmem_cache_node long long ago so update it. References: 6744f087ba2a ("slab: Common name for the per node structures") ce8eb6c424c7 ("slab: Rename list3/l3 to node") Signed-off-by: Xiao Yang Signed-off-by: Andrew Morton Reviewed-by: Pekka Enberg Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Link: http://lkml.kernel.org/r/20200722033355.26908-1-yangx.jy@cn.fujitsu.com Signed-off-by: Linus Torvalds commit 444050990db4abdf0c85ca6050542b888ba316a1 Author: Long Li Date: Thu Aug 6 23:18:28 2020 -0700 mm, slab: check GFP_SLAB_BUG_MASK before alloc_pages in kmalloc_order kmalloc cannot allocate memory from HIGHMEM. Allocating large amounts of memory currently bypasses the check and will simply leak the memory when page_address() returns NULL. To fix this, factor the GFP_SLAB_BUG_MASK check out of slab & slub, and call it from kmalloc_order() as well. In order to make the code clear, the warning message is put in one place. Signed-off-by: Long Li Signed-off-by: Andrew Morton Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Pekka Enberg Acked-by: David Rientjes Cc: Christoph Lameter Cc: Joonsoo Kim Link: http://lkml.kernel.org/r/20200704035027.GA62481@lilong Signed-off-by: Linus Torvalds commit dabc3e291d56e3125113101bc6d53d1a1738294d Author: Kees Cook Date: Thu Aug 6 23:18:24 2020 -0700 mm/slab: add naive detection of double free Similar to commit ce6fa91b9363 ("mm/slub.c: add a naive detection of double free or corruption"), add a very cheap double-free check for SLAB under CONFIG_SLAB_FREELIST_HARDENED. With this added, the "SLAB_FREE_DOUBLE" LKDTM test passes under SLAB: lkdtm: Performing direct entry SLAB_FREE_DOUBLE lkdtm: Attempting double slab free ... ------------[ cut here ]------------ WARNING: CPU: 2 PID: 2193 at mm/slab.c:757 ___cache _free+0x325/0x390 [keescook@chromium.org: fix misplaced __free_one()] Link: http://lkml.kernel.org/r/202006261306.0D82A2B@keescook Link: https://lore.kernel.org/lkml/7ff248c7-d447-340c-a8e2-8c02972aca70@infradead.org Signed-off-by: Kees Cook Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Acked-by: Randy Dunlap [build tested] Cc: Roman Gushchin Cc: Christoph Lameter Cc: Alexander Popov Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vinayak Menon Cc: Matthew Garrett Cc: Jann Horn Cc: Vijayanand Jitta Link: http://lkml.kernel.org/r/20200625215548.389774-3-keescook@chromium.org Signed-off-by: Linus Torvalds commit 3404be67bf73515babd74acd8525d09dafe4234d Author: Kees Cook Date: Thu Aug 6 23:18:20 2020 -0700 mm/slab: expand CONFIG_SLAB_FREELIST_HARDENED to include SLAB Patch series "mm: Expand CONFIG_SLAB_FREELIST_HARDENED to include SLAB" In reviewing Vlastimil Babka's latest slub debug series, I realized[1] that several checks under CONFIG_SLAB_FREELIST_HARDENED weren't being applied to SLAB. Fix this by expanding the Kconfig coverage, and adding a simple double-free test for SLAB. This patch (of 2): Include SLAB caches when performing kmem_cache pointer verification. A defense against such corruption[1] should be applied to all the allocators. With this added, the "SLAB_FREE_CROSS" and "SLAB_FREE_PAGE" LKDTM tests now pass on SLAB: lkdtm: Performing direct entry SLAB_FREE_CROSS lkdtm: Attempting cross-cache slab free ... ------------[ cut here ]------------ cache_from_obj: Wrong slab cache. lkdtm-heap-b but object is from lkdtm-heap-a WARNING: CPU: 2 PID: 2195 at mm/slab.h:530 kmem_cache_free+0x8d/0x1d0 ... lkdtm: Performing direct entry SLAB_FREE_PAGE lkdtm: Attempting non-Slab slab free ... ------------[ cut here ]------------ virt_to_cache: Object is not a Slab page! WARNING: CPU: 1 PID: 2202 at mm/slab.h:489 kmem_cache_free+0x196/0x1d0 Additionally clean up neighboring Kconfig entries for clarity, readability, and redundant option removal. [1] https://github.com/ThomasKing2014/slides/raw/master/Building%20universal%20Android%20rooting%20with%20a%20type%20confusion%20vulnerability.pdf Fixes: 598a0717a816 ("mm/slab: validate cache membership under freelist hardening") Signed-off-by: Kees Cook Signed-off-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Alexander Popov Cc: Christoph Lameter Cc: David Rientjes Cc: Jann Horn Cc: Joonsoo Kim Cc: Matthew Garrett Cc: Pekka Enberg Cc: Roman Gushchin Cc: Vijayanand Jitta Cc: Vinayak Menon Link: http://lkml.kernel.org/r/20200625215548.389774-1-keescook@chromium.org Link: http://lkml.kernel.org/r/20200625215548.389774-2-keescook@chromium.org Signed-off-by: Linus Torvalds commit fa9ba3aa89f9f1c003b5f5cde893bbbc140c7223 Author: William Kucharski Date: Thu Aug 6 23:18:17 2020 -0700 mm: ksize() should silently accept a NULL pointer Other mm routines such as kfree() and kzfree() silently do the right thing if passed a NULL pointer, so ksize() should do the same. Signed-off-by: William Kucharski Signed-off-by: Andrew Morton Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Link: http://lkml.kernel.org/r/20200616225409.4670-1-william.kucharski@oracle.com Signed-off-by: Linus Torvalds commit 453431a54934d917153c65211b2dabf45562ca88 Author: Waiman Long Date: Thu Aug 6 23:18:13 2020 -0700 mm, treewide: rename kzfree() to kfree_sensitive() As said by Linus: A symmetric naming is only helpful if it implies symmetries in use. Otherwise it's actively misleading. In "kzalloc()", the z is meaningful and an important part of what the caller wants. In "kzfree()", the z is actively detrimental, because maybe in the future we really _might_ want to use that "memfill(0xdeadbeef)" or something. The "zero" part of the interface isn't even _relevant_. The main reason that kzfree() exists is to clear sensitive information that should not be leaked to other future users of the same memory objects. Rename kzfree() to kfree_sensitive() to follow the example of the recently added kvfree_sensitive() and make the intention of the API more explicit. In addition, memzero_explicit() is used to clear the memory to make sure that it won't get optimized away by the compiler. The renaming is done by using the command sequence: git grep -w --name-only kzfree |\ xargs sed -i 's/kzfree/kfree_sensitive/' followed by some editing of the kfree_sensitive() kerneldoc and adding a kzfree backward compatibility macro in slab.h. [akpm@linux-foundation.org: fs/crypto/inline_crypt.c needs linux/slab.h] [akpm@linux-foundation.org: fix fs/crypto/inline_crypt.c some more] Suggested-by: Joe Perches Signed-off-by: Waiman Long Signed-off-by: Andrew Morton Acked-by: David Howells Acked-by: Michal Hocko Acked-by: Johannes Weiner Cc: Jarkko Sakkinen Cc: James Morris Cc: "Serge E. Hallyn" Cc: Joe Perches Cc: Matthew Wilcox Cc: David Rientjes Cc: Dan Carpenter Cc: "Jason A . Donenfeld" Link: http://lkml.kernel.org/r/20200616154311.12314-3-longman@redhat.com Signed-off-by: Linus Torvalds commit 57c720d4144a9c2b88105c3e8f7b0e97e4b5cc93 Author: Pavel Machek Date: Thu Aug 6 23:18:09 2020 -0700 ocfs2: fix unbalanced locking Based on what fails, function can return with nfs_sync_rwlock either locked or unlocked. That can not be right. Always return with lock unlocked on error. Fixes: 4cd9973f9ff6 ("ocfs2: avoid inode removal while nfsd is accessing it") Signed-off-by: Pavel Machek (CIP) Signed-off-by: Andrew Morton Reviewed-by: Joseph Qi Reviewed-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Link: http://lkml.kernel.org/r/20200724124443.GA28164@duo.ucw.cz Signed-off-by: Linus Torvalds commit 4510a5a98aff2d395e67890c480c0665f953ea00 Author: Alexander A. Klimov Date: Thu Aug 6 23:18:06 2020 -0700 ocfs2: replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `xmlns`: For each link, `http://[^# ]*(?:\w|/)`: If neither `gnu\.org/license`, nor `mozilla\.org/MPL`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Andrew Morton Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Link: http://lkml.kernel.org/r/20200713174456.36596-1-grandmaster@al2klimov.de Signed-off-by: Linus Torvalds commit 38d51b2dd171ad973afc1f5faab825ed05a2d5e9 Author: Junxiao Bi Date: Thu Aug 6 23:18:02 2020 -0700 ocfs2: change slot number type s16 to u16 Dan Carpenter reported the following static checker warning. fs/ocfs2/super.c:1269 ocfs2_parse_options() warn: '(-1)' 65535 can't fit into 32767 'mopt->slot' fs/ocfs2/suballoc.c:859 ocfs2_init_inode_steal_slot() warn: '(-1)' 65535 can't fit into 32767 'osb->s_inode_steal_slot' fs/ocfs2/suballoc.c:867 ocfs2_init_meta_steal_slot() warn: '(-1)' 65535 can't fit into 32767 'osb->s_meta_steal_slot' That's because OCFS2_INVALID_SLOT is (u16)-1. Slot number in ocfs2 can be never negative, so change s16 to u16. Fixes: 9277f8334ffc ("ocfs2: fix value of OCFS2_INVALID_SLOT") Reported-by: Dan Carpenter Signed-off-by: Junxiao Bi Signed-off-by: Andrew Morton Reviewed-by: Joseph Qi Reviewed-by: Gang He Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Cc: Link: http://lkml.kernel.org/r/20200627001259.19757-1-junxiao.bi@oracle.com Signed-off-by: Linus Torvalds commit 7eba77d59e0593b91af0c438594cb70700893b18 Author: Randy Dunlap Date: Thu Aug 6 23:17:59 2020 -0700 ocfs2: suballoc.h: delete a duplicated word Drop the repeated word "is" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Joseph Qi Link: http://lkml.kernel.org/r/20200720001421.28823-1-rdunlap@infradead.org Signed-off-by: Linus Torvalds commit 504ec37dfdfbf9c65166c51f7b12126d2a9b18dc Author: Gang He Date: Thu Aug 6 23:17:56 2020 -0700 ocfs2: fix remounting needed after setfacl command When use setfacl command to change a file's acl, the user cannot get the latest acl information from the file via getfacl command, until remounting the file system. e.g. setfacl -m u:ivan:rw /ocfs2/ivan getfacl /ocfs2/ivan getfacl: Removing leading '/' from absolute path names file: ocfs2/ivan owner: root group: root user::rw- group::r-- mask::r-- other::r-- The latest acl record("u:ivan:rw") cannot be returned via getfacl command until remounting. Signed-off-by: Gang He Signed-off-by: Andrew Morton Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Link: http://lkml.kernel.org/r/20200717023751.9922-1-ghe@suse.com Signed-off-by: Linus Torvalds commit 1146f7e2dc15a227a7e1ef9a1fb67182b25e687f Author: Luca Stefani Date: Thu Aug 6 23:17:53 2020 -0700 ntfs: fix ntfs_test_inode and ntfs_init_locked_inode function type Clang's Control Flow Integrity (CFI) is a security mechanism that can help prevent JOP chains, deployed extensively in downstream kernels used in Android. Its deployment is hindered by mismatches in function signatures. For this case, we make callbacks match their intended function signature, and cast parameters within them rather than casting the callback when passed as a parameter. When running `mount -t ntfs ...` we observe the following trace: Call trace: __cfi_check_fail+0x1c/0x24 name_to_dev_t+0x0/0x404 iget5_locked+0x594/0x5e8 ntfs_fill_super+0xbfc/0x43ec mount_bdev+0x30c/0x3cc ntfs_mount+0x18/0x24 mount_fs+0x1b0/0x380 vfs_kern_mount+0x90/0x398 do_mount+0x5d8/0x1a10 SyS_mount+0x108/0x144 el0_svc_naked+0x34/0x38 Signed-off-by: Luca Stefani Signed-off-by: Andrew Morton Tested-by: freak07 Reviewed-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Acked-by: Anton Altaparmakov Link: http://lkml.kernel.org/r/20200718112513.533800-1-luca.stefani.ge1@gmail.com Signed-off-by: Linus Torvalds commit 70a175e5071f9b5066413d80a96b853b73a69fc6 Author: Colin Ian King Date: Thu Aug 6 23:17:50 2020 -0700 scripts/spelling.txt: add more spellings to spelling.txt Here are some of the more common spelling mistakes and typos that I've found while fixing up spelling mistakes in the kernel since April 2020. Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200714092837.173796-1-colin.king@canonical.com Signed-off-by: Linus Torvalds commit d2b02165df683e1b05ed6e38e9051632625b528c Author: Joe Perches Date: Thu Aug 6 23:17:46 2020 -0700 const_structs.checkpatch: add regulator_ops Add regulator_ops to expected to be const list. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Cc: Pi-Hsun Shih Cc: Liam Girdwood Cc: Mark Brown Cc: Benson Leung Cc: Enric Balletbo i Serra Cc: Guenter Roeck Cc: Rikard Falkeborn Link: http://lkml.kernel.org/r/dab1ba1aa03a8236933cfb7a28937efb0b808f13.camel@perches.com Signed-off-by: Linus Torvalds commit f90dde44c57a1cf338ae01a691110eb980e48563 Author: Konstantin Khlebnikov Date: Thu Aug 6 23:17:43 2020 -0700 scripts/decode_stacktrace.sh: guess path to vmlinux by release name Add option decode_stacktrace -r to specify only release name. This is enough to guess standard paths to vmlinux and modules: $ echo -e 'schedule+0x0/0x0 tap_open+0x0/0x0 [tap]' | ./scripts/decode_stacktrace.sh -r 5.4.0-37-generic schedule (kernel/sched/core.c:4138) tap_open (drivers/net/tap.c:502) tap Signed-off-by: Konstantin Khlebnikov Signed-off-by: Andrew Morton Cc: Sasha Levin Link: http://lkml.kernel.org/r/159282923334.248444.2399153100007347838.stgit@buzz Signed-off-by: Linus Torvalds commit 431151b64af6c8ebec85ee1db3597b56a613f526 Author: Konstantin Khlebnikov Date: Thu Aug 6 23:17:41 2020 -0700 scripts/decode_stacktrace.sh: guess path to modules Try to find module in directory with vmlinux (for fresh build). Then try standard paths where debuginfo are usually placed. Pick first file which have elf section '.debug_line'. Before: $ echo 'tap_open+0x0/0x0 [tap]' | ./scripts/decode_stacktrace.sh /usr/lib/debug/boot/vmlinux-5.4.0-37-generic WARNING! Modules path isn't set, but is needed to parse this symbol tap_open+0x0/0x0 tap After: $ echo 'tap_open+0x0/0x0 [tap]' | ./scripts/decode_stacktrace.sh /usr/lib/debug/boot/vmlinux-5.4.0-37-generic tap_open (drivers/net/tap.c:502) tap Signed-off-by: Konstantin Khlebnikov Signed-off-by: Andrew Morton Cc: Sasha Levin Link: http://lkml.kernel.org/r/159282923068.248444.5461337458421616083.stgit@buzz Signed-off-by: Linus Torvalds commit ecda6e27fa834b2aa37fc9ad49f89b80e9ee8f97 Author: Konstantin Khlebnikov Date: Thu Aug 6 23:17:38 2020 -0700 scripts/decode_stacktrace.sh: guess basepath if not specified Guess path to kernel sources using known location of symbol "kernel_init". Make basepath argument optional. Before: $ echo 'vfs_open+0x0/0x0' | ./scripts/decode_stacktrace.sh vmlinux "" vfs_open (home/khlebnikov/src/linux/fs/open.c:912) After: $ echo 'vfs_open+0x0/0x0' | ./scripts/decode_stacktrace.sh vmlinux vfs_open (fs/open.c:912) Signed-off-by: Konstantin Khlebnikov Signed-off-by: Andrew Morton Cc: Sasha Levin Link: http://lkml.kernel.org/r/159282922803.248444.2379229451667913634.stgit@buzz Signed-off-by: Linus Torvalds commit f643b9ee97766e1846fab237c58a56277bf7e530 Author: Konstantin Khlebnikov Date: Thu Aug 6 23:17:35 2020 -0700 scripts/decode_stacktrace.sh: skip missing symbols For now script turns missing symbols into '0' and make bogus decode. Skip them instead. Also simplify parsing output of 'nm'. Before: $ echo 'xxx+0x0/0x0' | ./scripts/decode_stacktrace.sh vmlinux "" xxx (home/khlebnikov/src/linux/./arch/x86/include/asm/processor.h:398) After: $ echo 'xxx+0x0/0x0' | ./scripts/decode_stacktrace.sh vmlinux "" xxx+0x0/0x0 Signed-off-by: Konstantin Khlebnikov Signed-off-by: Andrew Morton Cc: Sasha Levin Link: http://lkml.kernel.org/r/159282922499.248444.4883465570858385250.stgit@buzz Signed-off-by: Linus Torvalds commit 1d35b6054a9b94b48511e23a7fab6cd1dbf3fde6 Author: Nikolay Borisov Date: Thu Aug 6 23:17:32 2020 -0700 scripts/bloat-o-meter: Support comparing library archives Library archives (.a) usually contain multiple object files so their output of nm --size-sort contains lines like: 00000000000003a8 t run_test extent-map-tests.o: bloat-o-meter currently doesn't handle them which results in errors when calling .split() on them. Fix this by simply ignoring them. This enables diffing subsystems which generate built-in.a files. Signed-off-by: Nikolay Borisov Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200603103513.3712-1-nborisov@suse.com Signed-off-by: Linus Torvalds commit 4f491bb6ea2aef2f5b184f385904a73796d98554 Author: Jialu Xu Date: Thu Aug 6 23:17:29 2020 -0700 scripts/tags.sh: collect compiled source precisely Parse compiled source from *.cmd but don't 'find' too many files that are not related to compilation. [xujialu@vimux.org: don't expand symlinks by add option -s for realpath] Link: http://lkml.kernel.org/r/5efc5bfb.1c69fb81.41bf5.7131SMTPIN_ADDED_MISSING@mx.google.com Signed-off-by: Jialu Xu Signed-off-by: Andrew Morton Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Mauro Carvalho Chehab Cc: Jonathan Corbet Cc: Joe Perches Link: http://lkml.kernel.org/r/5ee5d8e3.1c69fb81.9b804.47b2SMTPIN_ADDED_MISSING@mx.google.com Signed-off-by: Linus Torvalds commit d830020656c5b68ced962ed3cb51a90e0a89d4c4 Author: Gaurav Singh Date: Thu Aug 6 23:17:25 2020 -0700 tools/testing/selftests/cgroup/cgroup_util.c: cg_read_strcmp: fix null pointer dereference Haven't reproduced this issue. This PR is does a minor code cleanup. Signed-off-by: Gaurav Singh Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Cc: Shuah Khan Cc: Tejun Heo Cc: Michal Koutn Cc: Roman Gushchin Cc: Christian Brauner Cc: Chris Down Link: http://lkml.kernel.org/r/20200726013808.22242-1-gaurav1086@gmail.com Signed-off-by: Linus Torvalds commit 79e3ea5aab48c83de9410e43b52895406847eca7 Author: Alexander A. Klimov Date: Thu Aug 6 23:17:22 2020 -0700 tools/: replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Signed-off-by: Alexander A. Klimov Signed-off-by: Andrew Morton Link: http://lkml.kernel.org/r/20200726120752.16768-1-grandmaster@al2klimov.de Signed-off-by: Linus Torvalds commit 4ca1085c9573ea08767521dabce62456e3fc2fd0 Author: Ilias Stamatis Date: Thu Aug 6 23:17:19 2020 -0700 kthread: remove incorrect comment in kthread_create_on_cpu() Originally kthread_create_on_cpu() parked and woke up the new thread. However, since commit a65d40961dc7 ("kthread/smpboot: do not park in kthread_create_on_cpu()") this is no longer the case. This patch removes the comment that has been left behind and is now incorrect / stale. Fixes: a65d40961dc7 ("kthread/smpboot: do not park in kthread_create_on_cpu()") Signed-off-by: Ilias Stamatis Signed-off-by: Andrew Morton Reviewed-by: Petr Mladek Link: http://lkml.kernel.org/r/20200611135920.240551-1-stamatis.iliass@gmail.com Signed-off-by: Linus Torvalds commit 38cf307c1f2011d413750c5acb725456f47d9172 Author: Peter Zijlstra Date: Thu Aug 6 23:17:16 2020 -0700 mm: fix kthread_use_mm() vs TLB invalidate For SMP systems using IPI based TLB invalidation, looking at current->active_mm is entirely reasonable. This then presents the following race condition: CPU0 CPU1 flush_tlb_mm(mm) use_mm(mm) tsk->active_mm = mm; if (tsk->active_mm == mm) // flush TLBs switch_mm(old_mm,mm,tsk); Where it is possible the IPI flushed the TLBs for @old_mm, not @mm, because the IPI lands before we actually switched. Avoid this by disabling IRQs across changing ->active_mm and switch_mm(). Of the (SMP) architectures that have IPI based TLB invalidate: Alpha - checks active_mm ARC - ASID specific IA64 - checks active_mm MIPS - ASID specific flush OpenRISC - shoots down world PARISC - shoots down world SH - ASID specific SPARC - ASID specific x86 - N/A xtensa - checks active_mm So at the very least Alpha, IA64 and Xtensa are suspect. On top of this, for scheduler consistency we need at least preemption disabled across changing tsk->mm and doing switch_mm(), which is currently provided by task_lock(), but that's not sufficient for PREEMPT_RT. [akpm@linux-foundation.org: add comment] Reported-by: Andy Lutomirski Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Andrew Morton Cc: Nicholas Piggin Cc: Jens Axboe Cc: Kees Cook Cc: Jann Horn Cc: Will Deacon Cc: Christoph Hellwig Cc: Mathieu Desnoyers Cc: Link: http://lkml.kernel.org/r/20200721154106.GE10769@hirez.programming.kicks-ass.net Signed-off-by: Linus Torvalds commit 4a93025cbe4a0b19d1a25a2d763a3d2018bad0d9 Author: David Hildenbrand Date: Thu Aug 6 23:17:13 2020 -0700 mm/shuffle: don't move pages between zones and don't read garbage memmaps Especially with memory hotplug, we can have offline sections (with a garbage memmap) and overlapping zones. We have to make sure to only touch initialized memmaps (online sections managed by the buddy) and that the zone matches, to not move pages between zones. To test if this can actually happen, I added a simple BUG_ON(page_zone(page_i) != page_zone(page_j)); right before the swap. When hotplugging a 256M DIMM to a 4G x86-64 VM and onlining the first memory block "online_movable" and the second memory block "online_kernel", it will trigger the BUG, as both zones (NORMAL and MOVABLE) overlap. This might result in all kinds of weird situations (e.g., double allocations, list corruptions, unmovable allocations ending up in the movable zone). Fixes: e900a918b098 ("mm: shuffle initial free memory to improve memory-side-cache utilization") Signed-off-by: David Hildenbrand Signed-off-by: Andrew Morton Reviewed-by: Wei Yang Acked-by: Michal Hocko Acked-by: Dan Williams Cc: Andrew Morton Cc: Johannes Weiner Cc: Michal Hocko Cc: Minchan Kim Cc: Huang Ying Cc: Wei Yang Cc: Mel Gorman Cc: [5.2+] Link: http://lkml.kernel.org/r/20200624094741.9918-2-david@redhat.com Signed-off-by: Linus Torvalds commit c1a06df6ebf6ca98fb7a672fe447c7469d6c1968 Author: Ralph Campbell Date: Thu Aug 6 23:17:09 2020 -0700 mm/migrate: fix migrate_pgmap_owner w/o CONFIG_MMU_NOTIFIER On x86_64, when CONFIG_MMU_NOTIFIER is not set/enabled, there is a compiler error: mm/migrate.c: In function 'migrate_vma_collect': mm/migrate.c:2481:7: error: 'struct mmu_notifier_range' has no member named 'migrate_pgmap_owner' range.migrate_pgmap_owner = migrate->pgmap_owner; ^ Fixes: 998427b3ad2c ("mm/notifier: add migration invalidation type") Reported-by: Randy Dunlap Signed-off-by: Ralph Campbell Signed-off-by: Andrew Morton Tested-by: Randy Dunlap Acked-by: Randy Dunlap Cc: Jerome Glisse Cc: John Hubbard Cc: Christoph Hellwig Cc: "Jason Gunthorpe" Link: http://lkml.kernel.org/r/20200806193353.7124-1-rcampbell@nvidia.com Signed-off-by: Linus Torvalds commit 0f5bde1db174f6c471f0bd27198575719dabe3e5 Author: Jan Kara Date: Tue Jul 28 15:04:37 2020 +0200 ext4: correctly restore system zone info when remount fails When remounting filesystem fails late during remount handling and block_validity mount option is also changed during the remount, we fail to restore system zone information to a state matching the mount option. This is mostly harmless, just the block validity checking will not match the situation described by the mount option. Make sure these two are always consistent. Reported-by: Lukas Czerner Reviewed-by: Lukas Czerner Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20200728130437.7804-7-jack@suse.cz Signed-off-by: Theodore Ts'o commit e7bfb5c9bb3d63cb2abb3ceaf1a429d9f02f942d Author: Jan Kara Date: Tue Jul 28 15:04:36 2020 +0200 ext4: handle add_system_zone() failure in ext4_setup_system_zone() There's one place that fails to handle error from add_system_zone() call and thus we can fail to protect superblock and group-descriptor blocks properly in case of ENOMEM. Fix it. Reported-by: Lukas Czerner Reviewed-by: Lukas Czerner Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20200728130437.7804-6-jack@suse.cz Signed-off-by: Theodore Ts'o commit 3f67e7cffa6ee2d49ccb697c569c6d30e6024160 Author: Jan Kara Date: Tue Jul 28 15:04:35 2020 +0200 ext4: fold ext4_data_block_valid_rcu() into the caller After the previous patch, ext4_data_block_valid_rcu() has a single caller. Fold it into it. Reviewed-by: Lukas Czerner Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20200728130437.7804-5-jack@suse.cz Signed-off-by: Theodore Ts'o commit ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 Author: Jan Kara Date: Tue Jul 28 15:04:34 2020 +0200 ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently the journal inode but arguably we should be treating quota files or resize inode similarly. We cannot run __ext4_ext_check() on such metadata inodes when loading their extents as that would immediately trigger the validity checks and so we just hack around that and special-case the journal inode. This however leads to a situation that a journal inode which has extent tree of depth at least one can have invalid extent tree that gets unnoticed until ext4_cache_extents() crashes. To overcome this limitation, track inode number each system zone belongs to (0 is used for zones not belonging to any inode). We can then verify inode number matches the expected one when verifying extent tree and thus avoid the false errors. With this there's no need to to special-case journal inode during extent tree checking anymore so remove it. Fixes: 0a944e8a6c66 ("ext4: don't perform block validity checks on the journal inode") Reported-by: Wolfgang Frisch Reviewed-by: Lukas Czerner Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20200728130437.7804-4-jack@suse.cz Signed-off-by: Theodore Ts'o commit bf9a379d0980e7413d94cb18dac73db2bfc5f470 Author: Jan Kara Date: Tue Jul 28 15:04:33 2020 +0200 ext4: don't allow overlapping system zones Currently, add_system_zone() just silently merges two added system zones that overlap. However the overlap should not happen and it generally suggests that some unrelated metadata overlap which indicates the fs is corrupted. We should have caught such problems earlier (e.g. in ext4_check_descriptors()) but add this check as another line of defense. In later patch we also use this for stricter checking of journal inode extent tree. Reviewed-by: Lukas Czerner Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20200728130437.7804-3-jack@suse.cz Signed-off-by: Theodore Ts'o commit d176b1f62f242ab259ff665a26fbac69db1aecba Author: Jan Kara Date: Tue Jul 28 15:04:32 2020 +0200 ext4: handle error of ext4_setup_system_zone() on remount ext4_setup_system_zone() can fail. Handle the failure in ext4_remount(). Reviewed-by: Lukas Czerner Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20200728130437.7804-2-jack@suse.cz Signed-off-by: Theodore Ts'o commit 9375ac770cda6bdff829f43868d0ebcaba41f675 Author: brookxu Date: Mon Jul 27 09:54:14 2020 +0800 ext4: delete the invalid BUGON in ext4_mb_load_buddy_gfp() Delete the invalid BUGON in ext4_mb_load_buddy_gfp(), the previous code has already judged whether page is NULL. Signed-off-by: Chunguang Xu Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/ad68e8a2-5ec3-5beb-537f-f3e53f55367a@gmail.com Signed-off-by: Theodore Ts'o commit 1cf006ed19a887c22e085189c8b4a3cbf60d2246 Author: Dmitry Monakhov Date: Sat Jul 25 12:33:13 2020 +0000 ext4: export msg_count and warning_count via sysfs This numbers can be analized by system automation similar to errors_count. In ideal world it would be nice to have separate counters for different log-levels, but this makes this patch too intrusive. Signed-off-by: Dmitry Monakhov Link: https://lore.kernel.org/r/20200725123313.4467-1-dmtrmonakhov@yandex-team.ru Signed-off-by: Theodore Ts'o commit 6dbd300129089ad57de20be89ab7c122b36a4c26 Author: Shijie Luo Date: Thu Jul 23 23:29:54 2020 -0400 ext4: remove some redundant function declarations ext4 update feature functions do not exist now, remove these useless function declarations. Signed-off-by: Shijie Luo Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200724032954.22097-1-luoshijie1@huawei.com Signed-off-by: Theodore Ts'o commit f25391ebb475d3ffb3aa61bb90e3594c841749ef Author: Lukas Czerner Date: Thu Jul 23 17:05:26 2020 +0200 ext4: handle option set by mount flags correctly Currently there is a problem with mount options that can be both set by vfs using mount flags or by a string parsing in ext4. i_version/iversion options gets lost after remount, for example $ mount -o i_version /dev/pmem0 /mnt $ grep pmem0 /proc/self/mountinfo | grep i_version 310 95 259:0 / /mnt rw,relatime shared:163 - ext4 /dev/pmem0 rw,seclabel,i_version $ mount -o remount,ro /mnt $ grep pmem0 /proc/self/mountinfo | grep i_version nolazytime gets ignored by ext4 on remount, for example $ mount -o lazytime /dev/pmem0 /mnt $ grep pmem0 /proc/self/mountinfo | grep lazytime 310 95 259:0 / /mnt rw,relatime shared:163 - ext4 /dev/pmem0 rw,lazytime,seclabel $ mount -o remount,nolazytime /mnt $ grep pmem0 /proc/self/mountinfo | grep lazytime 310 95 259:0 / /mnt rw,relatime shared:163 - ext4 /dev/pmem0 rw,lazytime,seclabel Fix it by applying the SB_LAZYTIME and SB_I_VERSION flags from *flags to s_flags before we parse the option and use the resulting state of the same flags in *flags at the end of successful remount. Signed-off-by: Lukas Czerner Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200723150526.19931-1-lczerner@redhat.com Signed-off-by: Theodore Ts'o commit 60ed633f51d0c675150a117d96a45e78c3613f91 Author: Xianting Tian Date: Sat Jul 18 08:57:37 2020 -0400 jbd2: fix incorrect code style Remove unnecessary blank. Signed-off-by: Xianting Tian Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/1595077057-8048-1-git-send-email-xianting_tian@126.com Signed-off-by: Theodore Ts'o commit 3d392b2676bf3199863a1e5efb2c087ad9d442a4 Author: Theodore Ts'o Date: Fri Jul 17 00:14:40 2020 -0400 ext4: add prefetch_block_bitmaps mount option For file systems where we can afford to keep the buddy bitmaps cached, we can speed up initial writes to large file systems by starting to load the block allocation bitmaps as soon as the file system is mounted. This won't work well for _super_ large file systems, or memory constrained systems, so we only enable this when it is requested via a mount option. Addresses-Google-Bug: 159488342 Signed-off-by: Theodore Ts'o Reviewed-by: Andreas Dilger commit ab74c7b23f3770935016e3eb3ecdf1e42b73efaa Author: Theodore Ts'o Date: Wed Jul 15 11:48:55 2020 -0400 ext4: indicate via a block bitmap read is prefetched via a tracepoint Modify the ext4_read_block_bitmap_load tracepoint so that it tells us whether a block bitmap is being prefetched. Signed-off-by: Theodore Ts'o Reviewed-by: Artem Blagodarenko commit 529a781ee07aaa58be8164d75ba5998eb7dd216c Author: zhangyi (F) Date: Sat Jun 20 10:54:27 2020 +0800 jbd2: remove unused parameter in jbd2_journal_try_to_free_buffers() Parameter gfp_mask in jbd2_journal_try_to_free_buffers() is no longer used after commit <536fc240e7147> ("jbd2: clean up jbd2_journal_try_to_free_buffers()"), so just remove it. Signed-off-by: zhangyi (F) Link: https://lore.kernel.org/r/20200620025427.1756360-6-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit c044f3d8360d2ecf831ba2cc9f08cf9fb2c699fb Author: zhangyi (F) Date: Sat Jun 20 10:54:26 2020 +0800 jbd2: abort journal if free a async write error metadata buffer If we free a metadata buffer which has been failed to async write out in the background, the jbd2 checkpoint procedure will not detect this failure in jbd2_log_do_checkpoint(), so it may lead to filesystem inconsistency after cleanup journal tail. This patch abort the journal if free a buffer has write_io_error flag to prevent potential further inconsistency. Signed-off-by: zhangyi (F) Link: https://lore.kernel.org/r/20200620025427.1756360-5-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit bc71726c725767205757821df364acff87f92ac5 Author: zhangyi (F) Date: Sat Jun 20 10:54:23 2020 +0800 ext4: abort the filesystem if failed to async write metadata buffer There is a risk of filesystem inconsistency if we failed to async write back metadata buffer in the background. Because of current buffer's end io procedure is handled by end_buffer_async_write() in the block layer, and it only clear the buffer's uptodate flag and mark the write_io_error flag, so ext4 cannot detect such failure immediately. In most cases of getting metadata buffer (e.g. ext4_read_inode_bitmap()), although the buffer's data is actually uptodate, it may still read data from disk because the buffer's uptodate flag has been cleared. Finally, it may lead to on-disk filesystem inconsistency if reading old data from the disk successfully and write them out again. This patch detect bdev mapping->wb_err when getting journal's write access and mark the filesystem error if bdev's mapping->wb_err was increased, this could prevent further writing and potential inconsistency. Signed-off-by: zhangyi (F) Suggested-by: Jan Kara Link: https://lore.kernel.org/r/20200620025427.1756360-2-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 19fe87fd854a92c746ac73cb91a0bebac07a4618 Author: Akshu Agrawal Date: Fri Jul 31 19:06:04 2020 +0530 clk: x86: Support RV architecture There is minor difference between previous family of SoC and the current one. Which is the there is only 48Mh fixed clk. There is no mux and no option to select another freq as there in previous. Signed-off-by: Akshu Agrawal Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki commit 7f8802f2d2ed67ffbac9264f946a52507f749e19 Author: Akshu Agrawal Date: Fri Jul 31 19:06:03 2020 +0530 ACPI: APD: Add a fmw property is_raven Since there is slight difference in AMD RV based soc in misc clk architecture. The fmw property will help in differentiating the SoCs. Signed-off-by: Akshu Agrawal Signed-off-by: Rafael J. Wysocki commit d9b77361c1a5155e3d803d4ce9d7010269d301d3 Author: Akshu Agrawal Date: Fri Jul 31 19:06:02 2020 +0530 clk: x86: Change name from ST to FCH AMD SoC general pupose clk is present in new platforms with minor differences. We can reuse the same clk driver for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki commit d58669b093997e4e5f98c38a54f99761657c19d2 Author: Akshu Agrawal Date: Fri Jul 31 19:06:01 2020 +0530 ACPI: APD: Change name from ST to FCH AMD SoC general pupose clk is present in new platforms with same MMIO mappings. We can reuse the same clk handler support for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal Acked-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki commit 384b02d6b83bd4c5df96de00658623b4e04e2472 Author: Pu Wen Date: Fri Aug 7 17:35:29 2020 +0800 i2c: designware: Add device HID for Hygon I2C controller Add device HID HYGO0010 to match the Hygon ACPI Vendor ID (HYGO) that was registered in http://www.uefi.org/acpi_id_list, and the I2C controller on Hygon paltform will use the HID. Signed-off-by: Pu Wen Acked-by: Andy Shevchenko Acked-by: Wolfram Sang Signed-off-by: Rafael J. Wysocki commit 5631c5e0eb9035d92ceb20fcd9cdb7779a3f5cc7 Merge: e51418191f5a7 818d5a91559ff Author: Linus Torvalds Date: Fri Aug 7 10:57:29 2020 -0700 Merge tag 'xfs-5.9-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "There are quite a few changes in this release, the most notable of which is that we've made inode flushing fully asynchronous, and we no longer block memory reclaim on this. Furthermore, we have fixed a long-standing bug in the quota code where soft limit warnings and inode limits were never tracked properly. Moving further down the line, the reflink control loops have been redesigned to behave more efficiently; and numerous small bugs have been fixed (see below). The xattr and quota code have been extensively refactored in preparation for more new features coming down the line. Finally, the behavior of DAX between ext4 and xfs has been stabilized, which gets us a step closer to removing the experimental tag from that feature. We have a few new contributors this time around. Welcome, all! I anticipate a second pull request next week for a few small bugfixes that have been trickling in, but this is it for big changes. Summary: - Fix some btree block pingponging problems when swapping extents - Redesign the reflink copy loop so that we only run one remapping operation per transaction. This helps us avoid running out of block reservation on highly deduped filesystems. - Take the MMAPLOCK around filemap_map_pages. - Make inode reclaim fully async so that we avoid stalling processes on flushing inodes to disk. - Reduce inode cluster buffer RMW cycles by attaching the buffer to dirty inodes so we won't let go of the cluster buffer when we know we're going to need it soon. - Add some more checks to the realtime bitmap file scrubber. - Don't trip false lockdep warnings in fs freeze. - Remove various redundant lines of code. - Remove unnecessary calls to xfs_perag_{get,put}. - Preserve I_VERSION state across remounts. - Fix an unmount hang due to AIL going to sleep with a non-empty delwri buffer list. - Fix an error in the inode allocation space reservation macro that caused regressions in generic/531. - Fix a potential livelock when dquot flush fails because the dquot buffer is locked. - Fix a miscalculation when reserving inode quota that could cause users to exceed a hardlimit. - Refactor struct xfs_dquot to use native types for incore fields instead of abusing the ondisk struct for this purpose. This will eventually enable proper y2038+ support, but for now it merely cleans up the quota function declarations. - Actually increment the quota softlimit warning counter so that soft failures turn into hard(er) failures when they exceed the softlimit warning counter limits set by the administrator. - Split incore dquot state flags into their own field and namespace, to avoid mixing them with quota type flags. - Create a new quota type flags namespace so that we can make it obvious when a quota function takes a quota type (user, group, project) as an argument. - Rename the ondisk dquot flags field to type, as that more accurately represents what we store in it. - Drop our bespoke memory allocation flags in favor of GFP_*. - Rearrange the xattr functions so that we no longer mix metadata updates and transaction management (e.g. rolling complex transactions) in the same functions. This work will prepare us for atomic xattr operations (itself a prerequisite for directory backrefs) in future release cycles. - Support FS_DAX_FL (aka FS_XFLAG_DAX) via GETFLAGS/SETFLAGS" * tag 'xfs-5.9-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (117 commits) fs/xfs: Support that ioctl(SETXFLAGS/GETXFLAGS) can set/get inode DAX on XFS. xfs: Lift -ENOSPC handler from xfs_attr_leaf_addname xfs: Simplify xfs_attr_node_addname xfs: Simplify xfs_attr_leaf_addname xfs: Add helper function xfs_attr_node_removename_rmt xfs: Add helper function xfs_attr_node_removename_setup xfs: Add remote block helper functions xfs: Add helper function xfs_attr_leaf_mark_incomplete xfs: Add helpers xfs_attr_is_shortform and xfs_attr_set_shortform xfs: Remove xfs_trans_roll in xfs_attr_node_removename xfs: Remove unneeded xfs_trans_roll_inode calls xfs: Add helper function xfs_attr_node_shrink xfs: Pull up xfs_attr_rmtval_invalidate xfs: Refactor xfs_attr_rmtval_remove xfs: Pull up trans roll in xfs_attr3_leaf_clearflag xfs: Factor out xfs_attr_rmtval_invalidate xfs: Pull up trans roll from xfs_attr3_leaf_setflag xfs: Refactor xfs_attr_try_sf_addname xfs: Split apart xfs_attr_leaf_addname xfs: Pull up trans handling in xfs_attr3_leaf_flipflags ... commit e51418191f5a741b5f94764798c81bf69dec4806 Merge: 25d8d4eecace9 d7b461caa6cc6 Author: Linus Torvalds Date: Fri Aug 7 10:53:02 2020 -0700 Merge tag 'for-linus-5.9-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - two trivial comment fixes - a small series for the Xen balloon driver fixing some issues - a series of the Xen privcmd driver targeting elimination of using get_user_pages*() in this driver - a series for the Xen swiotlb driver cleaning it up and adding support for letting the kernel run as dom0 on Rpi4 * tag 'for-linus-5.9-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/arm: call dma_to_phys on the dma_addr_t parameter of dma_cache_maint xen/arm: introduce phys/dma translations in xen_dma_sync_for_* swiotlb-xen: introduce phys_to_dma/dma_to_phys translations swiotlb-xen: remove XEN_PFN_PHYS swiotlb-xen: add struct device * parameter to is_xen_swiotlb_buffer swiotlb-xen: add struct device * parameter to xen_dma_sync_for_device swiotlb-xen: add struct device * parameter to xen_dma_sync_for_cpu swiotlb-xen: add struct device * parameter to xen_bus_to_phys swiotlb-xen: add struct device * parameter to xen_phys_to_bus swiotlb-xen: remove start_dma_addr swiotlb-xen: use vmalloc_to_page on vmalloc virt addresses Revert "xen/balloon: Fix crash when ballooning on x86 32 bit PAE" xen/balloon: make the balloon wait interruptible xen/balloon: fix accounting in alloc_xenballooned_pages error path xen: hypercall.h: fix duplicated word xen/gntdev: gntdev.h: drop a duplicated word xen/privcmd: Convert get_user_pages*() to pin_user_pages*() xen/privcmd: Mark pages as dirty xen/privcmd: Corrected error handling path commit 9af47666cb0f331bfcd76799ee368cdfcb00882c Author: Kees Cook Date: Thu Aug 6 23:01:09 2020 -0700 selftests: splice: Check behavior of full and short splices In order to help catch regressions in splice vs read behavior in certain special files, test a few with various different kinds of internal kernel helpers. Cc: Shuah Khan Signed-off-by: Kees Cook commit 11990a5bd7e558e9203c1070fc52fb6f0488e75b Author: Kees Cook Date: Thu Aug 6 14:15:23 2020 -0700 module: Correctly truncate sysfs sections output The only-root-readable /sys/module/$module/sections/$section files did not truncate their output to the available buffer size. While most paths into the kernfs read handlers end up using PAGE_SIZE buffers, it's possible to get there through other paths (e.g. splice, sendfile). Actually limit the output to the "count" passed into the read function, and report it back correctly. *sigh* Reported-by: kernel test robot Link: https://lore.kernel.org/lkml/20200805002015.GE23458@shao2-debian Fixes: ed66f991bb19 ("module: Refactor section attr into bin attribute") Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Acked-by: Jessica Yu Signed-off-by: Kees Cook commit 0873ad923a05751a29a92229739ce2737c29d348 Merge: 9ac1fb156a40b 0abf803ef1b52 Author: Rafael J. Wysocki Date: Fri Aug 7 19:38:04 2020 +0200 Merge branch 'pm-core' * pm-core: PM: runtime: Improve kerneldoc of pm_runtime_get_if_active() PM: runtime: Add kerneldoc comments to multiple helpers commit 25d8d4eecace9de5a6a2193e4df1917afbdd3052 Merge: 60e76bb8a4e4c a7aaa2f26bfd9 Author: Linus Torvalds Date: Fri Aug 7 10:33:50 2020 -0700 Merge tag 'powerpc-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - Add support for (optionally) using queued spinlocks & rwlocks. - Support for a new faster system call ABI using the scv instruction on Power9 or later. - Drop support for the PROT_SAO mmap/mprotect flag as it will be unsupported on Power10 and future processors, leaving us with no way to implement the functionality it requests. This risks breaking userspace, though we believe it is unused in practice. - A bug fix for, and then the removal of, our custom stack expansion checking. We now allow stack expansion up to the rlimit, like other architectures. - Remove the remnants of our (previously disabled) topology update code, which tried to react to NUMA layout changes on virtualised systems, but was prone to crashes and other problems. - Add PMU support for Power10 CPUs. - A change to our signal trampoline so that we don't unbalance the link stack (branch return predictor) in the signal delivery path. - Lots of other cleanups, refactorings, smaller features and so on as usual. Thanks to: Abhishek Goel, Alastair D'Silva, Alexander A. Klimov, Alexey Kardashevskiy, Alistair Popple, Andrew Donnellan, Aneesh Kumar K.V, Anju T Sudhakar, Anton Blanchard, Arnd Bergmann, Athira Rajeev, Balamuruhan S, Bharata B Rao, Bill Wendling, Bin Meng, Cédric Le Goater, Chris Packham, Christophe Leroy, Christoph Hellwig, Daniel Axtens, Dan Williams, David Lamparter, Desnes A. Nunes do Rosario, Erhard F., Finn Thain, Frederic Barrat, Ganesh Goudar, Gautham R. Shenoy, Geoff Levand, Greg Kurz, Gustavo A. R. Silva, Hari Bathini, Harish, Imre Kaloz, Joel Stanley, Joe Perches, John Crispin, Jordan Niethe, Kajol Jain, Kamalesh Babulal, Kees Cook, Laurent Dufour, Leonardo Bras, Li RongQing, Madhavan Srinivasan, Mahesh Salgaonkar, Mark Cave-Ayland, Michal Suchanek, Milton Miller, Mimi Zohar, Murilo Opsfelder Araujo, Nathan Chancellor, Nathan Lynch, Naveen N. Rao, Nayna Jain, Nicholas Piggin, Oliver O'Halloran, Palmer Dabbelt, Pedro Miraglia Franco de Carvalho, Philippe Bergheaud, Pingfan Liu, Pratik Rajesh Sampat, Qian Cai, Qinglang Miao, Randy Dunlap, Ravi Bangoria, Sachin Sant, Sam Bobroff, Sandipan Das, Santosh Sivaraj, Satheesh Rajendran, Shirisha Ganta, Sourabh Jain, Srikar Dronamraju, Stan Johnson, Stephen Rothwell, Thadeu Lima de Souza Cascardo, Thiago Jung Bauermann, Tom Lane, Vaibhav Jain, Vladis Dronov, Wei Yongjun, Wen Xiong, YueHaibing. * tag 'powerpc-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (337 commits) selftests/powerpc: Fix pkey syscall redefinitions powerpc: Fix circular dependency between percpu.h and mmu.h powerpc/powernv/sriov: Fix use of uninitialised variable selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs powerpc/40x: Fix assembler warning about r0 powerpc/papr_scm: Add support for fetching nvdimm 'fuel-gauge' metric powerpc/papr_scm: Fetch nvdimm performance stats from PHYP cpuidle: pseries: Fixup exit latency for CEDE(0) cpuidle: pseries: Add function to parse extended CEDE records cpuidle: pseries: Set the latency-hint before entering CEDE selftests/powerpc: Fix online CPU selection powerpc/perf: Consolidate perf_callchain_user_[64|32]() powerpc/pseries/hotplug-cpu: Remove double free in error path powerpc/pseries/mobility: Add pr_debug() for device tree changes powerpc/pseries/mobility: Set pr_fmt() powerpc/cacheinfo: Warn if cache object chain becomes unordered powerpc/cacheinfo: Improve diagnostics about malformed cache lists powerpc/cacheinfo: Use name@unit instead of full DT path in debug messages powerpc/cacheinfo: Set pr_fmt() powerpc: fix function annotations to avoid section mismatch warnings with gcc-10 ... commit 60e76bb8a4e4c5398ea9053535e1fd0c9d6bb06e Merge: dbf83817315d9 fde87ebf1daa8 Author: Linus Torvalds Date: Fri Aug 7 10:18:22 2020 -0700 Merge tag 'm68knommu-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: "Fixes include: - cleanup compiler warnings (IO access functions and unused variables) - ColdFire v3 cache control fix - ColdFire MMU comment cleanup - switch to using asm-generic cmpxchg_local() - stmark platform updates" * tag 'm68knommu-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: stmark2: enable edma support for dspi m68k: use asm-generic cmpxchg_local() m68k: mcfmmu: remove stale part of comment about steal_context m68knommu: fix overwriting of bits in ColdFire V3 cache control m68k: fix ColdFire mmu init compile warning m68knommu: fix use of cpu_to_le() on IO access m68knommu: __force type casts for raw IO access m68k: stmark2: defconfig updates commit dbf83817315d9ce93b3e5b1c83a167f537245bd8 Merge: e1ec517e18acc 40284a072c42f Author: Linus Torvalds Date: Fri Aug 7 10:11:12 2020 -0700 Merge tag 'riscv-for-linus-5.9-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: "We have a lot of new kernel features for this merge window: - ARCH_SUPPORTS_ATOMIC_RMW, to allow OSQ locks to be enabled - The ability to enable NO_HZ_FULL - Support for enabling kcov, kmemleak, stack protector, and VM debugging - JUMP_LABEL support There are also a handful of cleanups" * tag 'riscv-for-linus-5.9-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (24 commits) riscv: disable stack-protector for vDSO RISC-V: Fix build warning for smpboot.c riscv: fix build warning of mm/pageattr riscv: Fix build warning for mm/init RISC-V: Setup exception vector early riscv: Select ARCH_HAS_DEBUG_VM_PGTABLE riscv: Use generic pgprot_* macros from mm: pgtable: Make generic pgprot_* macros available for no-MMU riscv: Cleanup unnecessary define in asm-offset.c riscv: Add jump-label implementation riscv: Support R_RISCV_ADD64 and R_RISCV_SUB64 relocs Replace HTTP links with HTTPS ones: RISC-V riscv: Add STACKPROTECTOR supported riscv: Fix typo in asm/hwcap.h uapi header riscv: Add kmemleak support riscv: Allow building with kcov coverage riscv: Enable context tracking riscv: Support irq_work via self IPIs riscv: Enable LOCKDEP_SUPPORT & fixup TRACE_IRQFLAGS_SUPPORT riscv: Fixup lockdep_assert_held with wrong param cpu_running ... commit b8c1a3090741f349322ad855d2b66d6e9752a60d Author: Randy Dunlap Date: Thu Aug 6 20:31:41 2020 -0700 bpf: Delete repeated words in comments Drop repeated words in kernel/bpf/: {has, the} Signed-off-by: Randy Dunlap Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200807033141.10437-1-rdunlap@infradead.org commit d5ca590525cfbd87ca307dcf498a566e2e7c1767 Author: Andrii Nakryiko Date: Thu Aug 6 20:30:57 2020 -0700 selftests/bpf: Fix silent Makefile output 99aacebecb75 ("selftests: do not use .ONESHELL") removed .ONESHELL, which changes how Makefile "silences" multi-command target recipes. selftests/bpf's Makefile relied (a somewhat unknowingly) on .ONESHELL behavior of silencing all commands within the recipe if the first command contains @ symbol. Removing .ONESHELL exposed this hack. This patch fixes the issue by explicitly silencing each command with $(Q). Also explicitly define fallback rule for building *.o from *.c, instead of relying on non-silent inherited rule. This was causing a non-silent output for bench.o object file. Fixes: 92f7440ecc93 ("selftests/bpf: More succinct Makefile output") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200807033058.848677-1-andriin@fb.com commit 7fb20f9e901e6df2f7dc032d88da5abff4117d37 Author: Alan Maguire Date: Fri Aug 7 12:50:29 2020 +0100 bpf, doc: Remove references to warning message when using bpf_trace_printk() The BPF helper bpf_trace_printk() no longer uses trace_printk(); it is now triggers a dedicated trace event. Hence the described warning is no longer present, so remove the discussion of it as it may confuse people. Fixes: ac5a72ea5c89 ("bpf: Use dedicated bpf_trace_printk event instead of trace_printk()") Signed-off-by: Alan Maguire Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1596801029-32395-1-git-send-email-alan.maguire@oracle.com commit e1ec517e18acc0aa9795ff92c15f0adabcb12db9 Merge: 19b39c38abf68 f073531070d24 Author: Linus Torvalds Date: Fri Aug 7 09:40:34 2020 -0700 Merge branch 'hch.init_path' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull init and set_fs() cleanups from Al Viro: "Christoph's 'getting rid of ksys_...() uses under KERNEL_DS' series" * 'hch.init_path' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (50 commits) init: add an init_dup helper init: add an init_utimes helper init: add an init_stat helper init: add an init_mknod helper init: add an init_mkdir helper init: add an init_symlink helper init: add an init_link helper init: add an init_eaccess helper init: add an init_chmod helper init: add an init_chown helper init: add an init_chroot helper init: add an init_chdir helper init: add an init_rmdir helper init: add an init_unlink helper init: add an init_umount helper init: add an init_mount helper init: mark create_dev as __init init: mark console_on_rootfs as __init init: initialize ramdisk_execute_command at compile time devtmpfs: refactor devtmpfsd() ... commit 19b39c38abf68591edbd698740d410c37ee075cc Merge: 995909a4e22bc ce327e1c54119 Author: Linus Torvalds Date: Fri Aug 7 09:29:25 2020 -0700 Merge branch 'work.regset' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull ptrace regset updates from Al Viro: "Internal regset API changes: - regularize copy_regset_{to,from}_user() callers - switch to saner calling conventions for ->get() - kill user_regset_copyout() The ->put() side of things will have to wait for the next cycle, unfortunately. The balance is about -1KLoC and replacements for ->get() instances are a lot saner" * 'work.regset' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (41 commits) regset: kill user_regset_copyout{,_zero}() regset(): kill ->get_size() regset: kill ->get() csky: switch to ->regset_get() xtensa: switch to ->regset_get() parisc: switch to ->regset_get() nds32: switch to ->regset_get() nios2: switch to ->regset_get() hexagon: switch to ->regset_get() h8300: switch to ->regset_get() openrisc: switch to ->regset_get() riscv: switch to ->regset_get() c6x: switch to ->regset_get() ia64: switch to ->regset_get() arc: switch to ->regset_get() arm: switch to ->regset_get() sh: convert to ->regset_get() arm64: switch to ->regset_get() mips: switch to ->regset_get() sparc: switch to ->regset_get() ... commit 995909a4e22bc7b3ea3a71388cbb62ffebd76e7b Author: Joerg Roedel Date: Fri Aug 7 10:40:13 2020 +0200 x86/mm/64: Do not dereference non-present PGD entries The code for preallocate_vmalloc_pages() was written under the assumption that the p4d_offset() and pud_offset() functions will perform present checks before dereferencing the parent entries. This assumption is wrong an leads to a bug in the code which causes the physical address found in the PGD be used as a page-table page, even if the PGD is not present. So the code flow currently is: pgd = pgd_offset_k(addr); p4d = p4d_offset(pgd, addr); if (p4d_none(*p4d)) p4d = p4d_alloc(&init_mm, pgd, addr); This lacks a check for pgd_none() at least, the correct flow would be: pgd = pgd_offset_k(addr); if (pgd_none(*pgd)) p4d = p4d_alloc(&init_mm, pgd, addr); else p4d = p4d_offset(pgd, addr); But this is the same flow that the p4d_alloc() and the pud_alloc() functions use internally, so there is no need to duplicate them. Remove the p?d_none() checks from the function and just call into p4d_alloc() and pud_alloc() to correctly pre-allocate the PGD entries. Reported-and-tested-by: Jason A. Donenfeld Reviewed-by: Mike Rapoport Fixes: 6eb82f994026 ("x86/mm: Pre-allocate P4D/PUD pages for vmalloc area") Signed-off-by: Joerg Roedel Signed-off-by: Linus Torvalds commit 9bceb80b3cc483e6763c39a4928402fa82815d3e Author: Guenter Roeck Date: Fri Aug 7 07:45:21 2020 -0700 arm64: kaslr: Use standard early random function Commit 585524081ecd ("random: random.h should include archrandom.h, not the other way around") tries to fix a problem with recursive inclusion of linux/random.h and arch/archrandom.h for arm64. Unfortunately, this results in the following compile error if ARCH_RANDOM is disabled. arch/arm64/kernel/kaslr.c: In function 'kaslr_early_init': arch/arm64/kernel/kaslr.c:128:6: error: implicit declaration of function '__early_cpu_has_rndr'; did you mean '__early_pfn_to_nid'? [-Werror=implicit-function-declaration] if (__early_cpu_has_rndr()) { ^~~~~~~~~~~~~~~~~~~~ __early_pfn_to_nid arch/arm64/kernel/kaslr.c:131:7: error: implicit declaration of function '__arm64_rndr' [-Werror=implicit-function-declaration] if (__arm64_rndr(&raw)) ^~~~~~~~~~~~ The problem is that arch/archrandom.h is only included from linux/random.h if ARCH_RANDOM is enabled. If not, __arm64_rndr() and __early_cpu_has_rndr() are undeclared, causing the problem. Use arch_get_random_seed_long_early() instead of arm64 specific functions to solve the problem. Reported-by: Qian Cai Fixes: 585524081ecd ("random: random.h should include archrandom.h, not the other way around") Cc: Qian Cai Cc: Mark Brown Reviewed-by: Mark Rutland Reviewed-by: Mark Brown Tested-by: Mark Brown Signed-off-by: Guenter Roeck Signed-off-by: Linus Torvalds commit 0f5d0a4c01cc1b7b0590baa18809a96d45a1e278 Author: Linus Torvalds Date: Fri Aug 7 09:05:02 2020 -0700 thermal: don't make THERMAL_NETLINK 'default y' We just don't do that. "default y" is for things that are needed for compatibility (when an old feature is made unconditional), or for things that are basically part of the infrastructure of a platform. And it can possibly be used for questions that don't enable code on their own, but are used to enable or disable a whole slew of other questions. A new feature that people aren't using is never 'default y', unless it cures cancer or ends world hunger. Signed-off-by: Linus Torvalds commit e28c02b94f9e039beeb5c75198caf6e17b66c520 Author: Bob Peterson Date: Thu Jul 30 12:31:38 2020 -0500 gfs2: When gfs2_dirty_inode gets a glock error, dump the glock Before this patch, if function gfs2_dirty_inode got an error when trying to lock the inode glock, it complained, but it didn't say what glock or inode had the problem. In this case, it almost always means that dinode_in found an error with the dinode in the file system. So it makes sense to dump the glock, which tells us the location of the dinode in the file system. That will allow us to analyze the corruption from the metadata. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 70499cdfeb3625c87eebe4f7a7ea06fa7447e5df Author: Bob Peterson Date: Fri Jul 24 12:06:31 2020 -0500 gfs2: Never call gfs2_block_zero_range with an open transaction Before this patch, some functions started transactions then they called gfs2_block_zero_range. However, gfs2_block_zero_range, like writes, can start transactions, which results in a recursive transaction error. For example: do_shrink trunc_start gfs2_trans_begin <------------------------------------------------ gfs2_block_zero_range iomap_zero_range(inode, from, length, NULL, &gfs2_iomap_ops); iomap_apply ... iomap_zero_range_actor iomap_begin gfs2_iomap_begin gfs2_iomap_begin_write actor (iomap_zero_range_actor) iomap_zero iomap_write_begin gfs2_iomap_page_prepare gfs2_trans_begin <------------------------ This patch reorders the callers of gfs2_block_zero_range so that they only start their transactions after the call. It also adds a BUG_ON to ensure this doesn't happen again. Fixes: 2257e468a63b ("gfs2: implement gfs2_block_zero_range using iomap_zero_range") Cc: stable@vger.kernel.org # v5.5+ Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 608a973bd52ef1705941b18f55e39655fcfe9cdb Author: Michael Kelley Date: Thu Aug 6 09:22:15 2020 -0700 Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops Hyper-V currently may be notified of a panic for any die event. But this results in false panic notifications for various user space traps that are die events. Fix this by ignoring die events that aren't oops. Fixes: 510f7aef65bb ("Drivers: hv: vmbus: prefer 'die' notification chain to 'panic'") Signed-off-by: Michael Kelley Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/1596730935-11564-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 1101c872c8c7869c78dc106ae820040f36807eda Author: Jin Yao Date: Wed Aug 5 10:29:37 2020 +0800 perf record: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set We received an error report that perf-record caused 'Segmentation fault' on a newly system (e.g. on the new installed ubuntu). (gdb) backtrace #0 __read_once_size (size=4, res=, p=0x14) at /root/0-jinyao/acme/tools/include/linux/compiler.h:139 #1 atomic_read (v=0x14) at /root/0-jinyao/acme/tools/include/asm/../../arch/x86/include/asm/atomic.h:28 #2 refcount_read (r=0x14) at /root/0-jinyao/acme/tools/include/linux/refcount.h:65 #3 perf_mmap__read_init (map=map@entry=0x0) at mmap.c:177 #4 0x0000561ce5c0de39 in perf_evlist__poll_thread (arg=0x561ce68584d0) at util/sideband_evlist.c:62 #5 0x00007fad78491609 in start_thread (arg=) at pthread_create.c:477 #6 0x00007fad7823c103 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 The root cause is, evlist__add_bpf_sb_event() just returns 0 if HAVE_LIBBPF_SUPPORT is not defined (inline function path). So it will not create a valid evsel for side-band event. But perf-record still creates BPF side band thread to process the side-band event, then the error happpens. We can reproduce this issue by removing the libelf-dev. e.g. 1. apt-get remove libelf-dev 2. perf record -a -- sleep 1 root@test:~# ./perf record -a -- sleep 1 perf: Segmentation fault Obtained 6 stack frames. ./perf(+0x28eee8) [0x5562d6ef6ee8] /lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7fbfdc65f210] ./perf(+0x342e74) [0x5562d6faae74] ./perf(+0x257e39) [0x5562d6ebfe39] /lib/x86_64-linux-gnu/libpthread.so.0(+0x9609) [0x7fbfdc990609] /lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7fbfdc73b103] Segmentation fault (core dumped) To fix this issue, 1. We either install the missing libraries to let HAVE_LIBBPF_SUPPORT be defined. e.g. apt-get install libelf-dev and install other related libraries. 2. Use this patch to skip the side-band event setup if HAVE_LIBBPF_SUPPORT is not set. Committer notes: The side band thread is not used just with BPF, it is also used with --switch-output-event, so narrow the ifdef to the BPF specific part. Fixes: 23cbb41c939a ("perf record: Move side band evlist setup to separate routine") Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200805022937.29184-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 666559865823265ad2a53f72d08d42631b3dc532 Author: Athira Rajeev Date: Fri Aug 7 06:11:19 2020 -0400 perf tools powerpc: Add support for extended regs in power10 Added support for supported regs which are new in power10 ( MMCR3, SIER2, SIER3 ) to sample_reg_mask in the tool side to use with `-I?` option. Also added PVR check to send extended mask for power10 at kernel while capturing extended regs in each sample. Signed-off-by: Athira Jajeev Reviewed-by: Kajol Jain Reviewed-by: Ravi Bangoria Tested-by: Ravi Bangoria Cc: Jiri Olsa Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Michael Neuling Cc: Ravi Bangoria Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Arnaldo Carvalho de Melo commit 33583e6950bf763d7b2be050f5df8414980459c4 Author: Anju T Sudhakar Date: Fri Aug 7 06:11:18 2020 -0400 perf tools powerpc: Add support for extended register capability Add extended regs to sample_reg_mask in the tool side to use with `-I?` option. Perf tools side uses extended mask to display the platform supported register names (with -I? option) to the user and also send this mask to the kernel to capture the extended registers in each sample. Hence decide the mask value based on the processor version. Currently definitions for `mfspr`, `SPRN_PVR` are part of `arch/powerpc/util/header.c`. Move this to a header file so that these definitions can be re-used in other source files as well. Signed-off-by: Anju T Sudhakar Reviewed-by: Kajol Jain Reviewed-by: Madhavan Srinivasan Reviewed--by: Ravi Bangoria Tested-by: Ravi Bangoria Cc: Jiri Olsa Cc: Michael Ellerman Cc: Michael Neuling Cc: Ravi Bangoria Cc: linuxppc-dev@lists.ozlabs.org [Decide extended mask at run time based on platform] Signed-off-by: Athira Jajeev Signed-off-by: Arnaldo Carvalho de Melo commit d01541d006c43abf49a944cdc2a01c2bff047314 Author: Arnaldo Carvalho de Melo Date: Fri Aug 7 09:00:03 2020 -0300 tools headers UAPI: Sync drm/i915_drm.h with the kernel sources To pick the change in: 66137f54ccd7 ("drm: i915_drm.h: delete duplicated words in comments") That don't result in any changes in tooling, just 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: Adrian Hunter Cc: Daniel Vetter Cc: Jiri Olsa Cc: Namhyung Kim Cc: Randy Dunlap Signed-off-by: Arnaldo Carvalho de Melo commit 836b194d65782aaec4485a07d2aab52d3f698505 Author: Xin He Date: Wed Jul 22 13:18:51 2020 +0800 drm/virtio: fix memory leak in virtio_gpu_cleanup_object() Before setting shmem->pages to NULL, kfree() should be called. Signed-off-by: Xin He Reviewed-by: Qi Liu Link: http://patchwork.freedesktop.org/patch/msgid/20200722051851.72662-1-hexin.op@bytedance.com Signed-off-by: Gerd Hoffmann commit dd4a5c224b7c9bdf06e5423d5cd19a9f8b9a3558 Author: Arnaldo Carvalho de Melo Date: Fri Aug 7 08:56:59 2020 -0300 tools arch x86: Sync asm/cpufeatures.h with the kernel sources To pick up the changes from: 85b23fbc7d88 ("x86/cpufeatures: Add enumeration for SERIALIZE instruction") bd657aa3dd85 ("x86/cpufeatures: Add Architectural LBRs feature bit") fbd5969d1ff2 ("x86/cpufeatures: Mark two free bits in word 3") These should't cause any changes in tooling, it just gets rebuilt by including those headers: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o LD /tmp/build/perf/bench/perf-in.o LD /tmp/build/perf/perf-in.o LINK /tmp/build/perf/perf And silences this perf 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: Borislav Petkov Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ricardo Neri Signed-off-by: Arnaldo Carvalho de Melo commit 8b6ec999b198b59ae61e86e70f5e9df73fe4754f Author: Qi Liu Date: Tue Jul 21 18:16:47 2020 +0800 drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioctl() We should put the reference count of the fence after calling virtio_gpu_cmd_submit(). So add the missing dma_fence_put(). Fixes: 2cd7b6f08bc4 ("drm/virtio: add in/out fence support for explicit synchronization") Co-developed-by: Xin He Signed-off-by: Xin He Signed-off-by: Qi Liu Reviewed-by: Muchun Song Link: http://patchwork.freedesktop.org/patch/msgid/20200721101647.42653-1-hexin.op@bytedance.com Signed-off-by: Gerd Hoffmann commit f815fe512cf71fa611016f467fde808a6ee67e35 Author: Arnaldo Carvalho de Melo Date: Fri Aug 7 08:45:47 2020 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes in: d6a162a41bfd x86/msr-index: Add bunch of MSRs for Arch LBR ed7bde7a6dab cpufreq: intel_pstate: Allow enable/disable energy efficiency 99e40204e014 (tip/x86/cleanups) x86/msr: Move the F15h MSRs where they belong 1068ed4547ad x86/msr: Lift AMD family 0x15 power-specific MSRs 5cde265384ca (tag: perf-core-2020-06-01) perf/x86/rapl: Add AMD Fam17h RAPL support Addressing these tools/perf build warnings: That makes the beautification scripts to pick some new entries: $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > before $ cp arch/x86/include/asm/msr-index.h tools/arch/x86/include/asm/msr-index.h $ tools/perf/trace/beauty/tracepoints/x86_msr.sh > after $ diff -u before after --- before 2020-08-07 08:45:18.801298854 -0300 +++ after 2020-08-07 08:45:28.654456422 -0300 @@ -271,6 +271,8 @@ [0xc0010062 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PERF_CTL", [0xc0010063 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PERF_STATUS", [0xc0010064 - x86_AMD_V_KVM_MSRs_offset] = "AMD_PSTATE_DEF_BASE", + [0xc001007a - x86_AMD_V_KVM_MSRs_offset] = "F15H_CU_PWR_ACCUMULATOR", + [0xc001007b - x86_AMD_V_KVM_MSRs_offset] = "F15H_CU_MAX_PWR_ACCUMULATOR", [0xc0010112 - x86_AMD_V_KVM_MSRs_offset] = "K8_TSEG_ADDR", [0xc0010113 - x86_AMD_V_KVM_MSRs_offset] = "K8_TSEG_MASK", [0xc0010114 - x86_AMD_V_KVM_MSRs_offset] = "VM_CR", $ And this gets rebuilt: CC /tmp/build/perf/trace/beauty/tracepoints/x86_msr.o INSTALL trace_plugins LD /tmp/build/perf/trace/beauty/tracepoints/perf-in.o LD /tmp/build/perf/trace/beauty/perf-in.o LD /tmp/build/perf/perf-in.o LINK /tmp/build/perf/perf Now one can trace systemwide asking to see backtraces to where those MSRs are being read/written with: # perf trace -e msr:*_msr/max-stack=32/ --filter="msr==F15H_CU_PWR_ACCUMULATOR || msr==F15H_CU_MAX_PWR_ACCUMULATOR" ^C# # If we use -v (verbose mode) we can see what it does behind the scenes: # perf trace -v -e msr:*_msr/max-stack=32/ --filter="msr==F15H_CU_PWR_ACCUMULATOR || msr==F15H_CU_MAX_PWR_ACCUMULATOR" Using CPUID GenuineIntel-6-8E-A 0xc001007a 0xc001007b New filter for msr:read_msr: (msr==0xc001007a || msr==0xc001007b) && (common_pid != 2448054 && common_pid != 2782) 0xc001007a 0xc001007b New filter for msr:write_msr: (msr==0xc001007a || msr==0xc001007b) && (common_pid != 2448054 && common_pid != 2782) mmap size 528384B ^C# Cc: Adrian Hunter Cc: Borislav Petkov Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Srinivas Pandruvada Cc: Stephane Eranian Signed-off-by: Arnaldo Carvalho de Melo commit 7a36b9d231355f3eff3bee868820f03bc716a6a3 Author: Arnaldo Carvalho de Melo Date: Fri Aug 7 08:43:14 2020 -0300 tools headers UAPI: update linux/in.h copy To get the changes from: eba75c587e81 ("icmp: support rfc 4884") That don't cause any changes in tooling, as we still don't have a [gs]etsockopt 'level' beautifier, will try and have one soon. This silences this tools/perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/in.h' differs from latest version at 'include/uapi/linux/in.h' diff -u tools/include/uapi/linux/in.h include/uapi/linux/in.h Cc: Adrian Hunter Cc: David S. Miller Cc: Jiri Olsa Cc: Namhyung Kim Cc: Willem de Bruijn Signed-off-by: Arnaldo Carvalho de Melo commit b0be23b23f6cdeb61d154fef72cd82f8f99f9ca4 Author: Bob Peterson Date: Thu Jul 23 13:14:07 2020 -0500 gfs2: print details on transactions that aren't properly ended If function gfs2_trans_begin is called with another transaction active it BUGs out, but it doesn't give any details about the duplicate. This patch moves function gfs2_print_trans and calls it when this situation arises for better debugging. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit b57bc0fb2fe403b687142d12fba4ad085f8be6ee Author: Bob Peterson Date: Wed Jul 22 10:19:52 2020 -0500 gfs2: Fix inaccurate comment The comment regarding journal flush thresholds is wrong. This patch fixes it. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit e2d2fded6bdf3f7bb40718a208140dba8b4ec574 Author: Kai-Heng Feng Date: Fri Aug 7 16:05:12 2020 +0800 ALSA: hda/realtek: Fix pin default on Intel NUC 8 Rugged The jack on Intel NUC 8 Rugged rear panel doesn't work. The spec [1] states that the jack supports both headphone and microphone, so override a Pin Complex which has both Amp-In and Amp-Out to make the jack work. Node 0x1b fits the requirement, and user confirmed the jack now works with new pin config. [1] https://www.intel.com/content/dam/support/us/en/documents/mini-pcs/NUC8CCH_TechProdSpec.pdf BugLink: https://bugs.launchpad.net/bugs/1875199 Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200807080514.15293-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 6a1380271b75e0d9a961e192e56b733fedf7a23a Merge: 0c84b7fc973f9 da151e3458c82 Author: Richard Weinberger Date: Fri Aug 7 08:54:16 2020 +0200 Merge tag 'nand/for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next Core changes: * Drop useless 'depends on' in Kconfig * Add an extra level in the Kconfig hierarchy * Trivial spellings * Dynamic allocation of the interface configurations * Dropping the default ONFI timing mode * Various cleanup (types, structures, naming, comments) * Hide the chip->data_interface indirection * Add the generic rb-gpios property * Add the ->choose_interface_config() hook * Introduce nand_choose_best_sdr_timings() * Use default values for tPROG_max and tBERS_max * Avoid redefining tR_max and tCCS_min * Add a helper to find the closest ONFI mode * bcm63xx MTD parsers: simplify CFE detection Raw NAND controller drivers changes: * fsl-upm: Deprecation of specific DT properties * fsl_upm: Driver rework and cleanup in favor of ->exec_op() * Ingenic: Cleanup ARRAY_SIZE() vs sizeof() use * brcmnand: ECC error handling on EDU transfers * brcmnand: Don't default to EDU transfers * qcom: Set BAM mode only if not set already * qcom: Avoid write to unavailable register * gpio: Driver rework in favor of ->exec_op() * tango: ->exec_op() conversion * mtk: ->exec_op() conversion Raw NAND chip drivers changes: * toshiba: Implement ->choose_interface_config() for TH58NVG2S3HBAI4 * toshiba: Implement ->choose_interface_config() for TC58NVG0S3E * toshiba: Implement ->choose_interface_config() for TC58TEG5DCLTA00 * hynix: Implement ->choose_interface_config() for H27UCG8T2ATR-BC commit 00043a2689232631f39ebbf6719d545b1d799086 Merge: 0b5ad7b9522e6 bc227385eb71f Author: Vinod Koul Date: Fri Aug 7 11:13:37 2020 +0530 Merge branch 'topic/xilinx' into fixes Conflicts: Documentation/driver-api/dmaengine/provider.rst include/linux/dmaengine.h commit 20b135e48cdda7a7dfccef7286def66e5c9686c3 Author: Dan Carpenter Date: Wed Aug 5 12:52:07 2020 +0300 cifs: Fix an error pointer dereference in cifs_mount() The error handling calls kfree(full_path) so we can't let it be a NULL pointer. There used to be a NULL assignment here but we accidentally deleted it. Add it back. Fixes: 7efd08158261 ("cifs: document and cleanup dfs mount") Signed-off-by: Dan Carpenter Signed-off-by: Steve French Reviewed-by: Paulo Alcantara (SUSE) commit 86cfccb66937dd6cbf26ed619958b9e587e6a115 Merge: 0e4656a299db8 055923bf6b486 Author: Linus Torvalds Date: Thu Aug 6 19:44:25 2020 -0700 Merge tag 'dlm-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This set includes a some improvements to the dlm networking layer: improving the ability to trace dlm messages for debugging, and improved handling of bad messages or disrupted connections" * tag 'dlm-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: fs: dlm: implement tcp graceful shutdown fs: dlm: change handling of reconnects fs: dlm: don't close socket on invalid message fs: dlm: set skb mark per peer socket fs: dlm: set skb mark for listen socket net: sock: add sock_set_mark dlm: Fix kobject memleak commit 0e4656a299db8484933a143259e7e5ebae2e3a01 Merge: eb65405eb6860 60263d5889e6d Author: Linus Torvalds Date: Thu Aug 6 19:35:12 2020 -0700 Merge tag 'iomap-5.9-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap updates from Darrick Wong: "The most notable changes are: - iomap no longer invalidates the page cache when performing a direct read, since doing so is unnecessary and the old directio code doesn't do that either. - iomap embraced the use of returning ENOTBLK from a direct write to trigger falling back to a buffered write since ext4 already did this and btrfs wants it for their port. - iomap falls back to buffered writes if we're doing a direct write and the page cache invalidation after the flush fails; this was necessary to handle a corner case in the btrfs port. - Remove email virus scanner detritus that was accidentally included in yesterday's pull request. Clearly I need(ed) to update my git branch checker scripts. :(" * tag 'iomap-5.9-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: fall back to buffered writes for invalidation failures xfs: use ENOTBLK for direct I/O to buffered I/O fallback iomap: Only invalidate page cache pages on direct IO writes iomap: Make sure iomap_end is called after iomap_begin commit eb65405eb6860935d54b8ba90a5e231e07378be1 Merge: 09e70bb4d89f7 8aed8cebdd973 Author: Linus Torvalds Date: Thu Aug 6 19:29:51 2020 -0700 Merge tag 'fsnotify_for_v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: - fanotify fix for softlockups when there are many queued events - performance improvement to reduce fsnotify overhead when not used - Amir's implementation of fanotify events with names. With these you can now efficiently monitor whole filesystem, eg to mirror changes to another machine. * tag 'fsnotify_for_v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: (37 commits) fanotify: compare fsid when merging name event fsnotify: create method handle_inode_event() in fsnotify_operations fanotify: report parent fid + child fid fanotify: report parent fid + name + child fid fanotify: add support for FAN_REPORT_NAME fanotify: report events with parent dir fid to sb/mount/non-dir marks fanotify: add basic support for FAN_REPORT_DIR_FID fsnotify: remove check that source dentry is positive fsnotify: send event with parent/name info to sb/mount/non-dir marks audit: do not set FS_EVENT_ON_CHILD in audit marks mask inotify: do not set FS_EVENT_ON_CHILD in non-dir mark mask fsnotify: pass dir and inode arguments to fsnotify() fsnotify: create helper fsnotify_inode() fsnotify: send event to parent and child with single callback inotify: report both events on parent and child with single callback dnotify: report both events on parent and child with single callback fanotify: no external fh buffer in fanotify_name_event fanotify: use struct fanotify_info to parcel the variable size buffer fsnotify: add object type "child" to object type iterator fanotify: use FAN_EVENT_ON_CHILD as implicit flag on sb/mount/non-dir marks ... commit 09e70bb4d89f727bafa6349155e08ce6ac0d8d9f Merge: 019c407c1dfb8 9436fb4d89933 Author: Linus Torvalds Date: Thu Aug 6 19:28:26 2020 -0700 Merge tag 'for_v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull ext2, udf, reiserfs, quota cleanups and minor fixes from Jan Kara: "A few ext2 fixups and then several (mostly comment and documentation) cleanups in ext2, udf, reiserfs, and quota" * tag 'for_v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: reiserfs: delete duplicated words udf: osta_udf.h: delete a duplicated word reiserfs: reiserfs.h: delete a duplicated word ext2: ext2.h: fix duplicated word + typos udf: Replace HTTP links with HTTPS ones quota: Fixup http links in quota doc Replace HTTP links with HTTPS ones: DISKQUOTA ext2: initialize quota info in ext2_xattr_set() ext2: fix some incorrect comments in inode.c ext2: remove nocheck option ext2: fix missing percpu_counter_inc ext2: ext2_find_entry() return -ENOENT if no entry found ext2: propagate errors up to ext2_find_entry()'s callers ext2: fix improper assignment for e_value_offs commit 019c407c1dfb81c37036323597e18cce73c84122 Merge: 327a8d76b1ac2 0e62ea33ac12e Author: Linus Torvalds Date: Thu Aug 6 19:22:51 2020 -0700 Merge tag 'erofs-for-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "This cycle mainly addresses an issue out of some extended inode with designated location, which are not generated by current mkfs but need to handled at runtime anyway. The others are quite trivial ones. - use HTTPS links instead of insecure HTTP ones; - fix crossing page boundary on specific extended inodes; - remove useless WQ_CPU_INTENSIVE flag for unbound wq; - minor cleanup" * tag 'erofs-for-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: remove WQ_CPU_INTENSIVE flag from unbound wq's erofs: fold in used-once helper erofs_workgroup_unfreeze_final() erofs: fix extended inode could cross boundary erofs: Replace HTTP links with HTTPS ones commit 327a8d76b1ac2037f87bf041f3bc076407284ffc Merge: 96e3f3c16b7ae 7efd081582619 Author: Linus Torvalds Date: Thu Aug 6 19:21:04 2020 -0700 Merge tag '5.9-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: "16 cifs/smb3 fixes, about half DFS related, two fixes for stable. Still working on and testing an additional set of fixes (including updates to mount, and some fallocate scenario improvements) for later in the merge window" * tag '5.9-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: cifs: document and cleanup dfs mount cifs: only update prefix path of DFS links in cifs_tree_connect() cifs: fix double free error on share and prefix cifs: handle RESP_GET_DFS_REFERRAL.PathConsumed in reconnect cifs: handle empty list of targets in cifs_reconnect() cifs: rename reconn_inval_dfs_target() cifs: reduce number of referral requests in DFS link lookups cifs: merge __{cifs,smb2}_reconnect[_tcon]() into cifs_tree_connect() cifs: convert to use be32_add_cpu() cifs: delete duplicated words in header files cifs: Remove the superfluous break cifs: smb1: Try failing back to SetFileInfo if SetPathInfo fails cifs`: handle ERRBaduid for SMB1 cifs: remove unused variable 'server' smb3: warn on confusing error scenario with sec=krb5 cifs: Fix leak when handling lease break for cached root fid commit 96e3f3c16b7aedcd71502ccfc5778dddfc2e7b15 Merge: ed35832648b5c c569e805c7bce Author: Linus Torvalds Date: Thu Aug 6 18:10:55 2020 -0700 Merge tag 'thermal-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal updates from Daniel Lezcano: - Add support to enable/disable the thermal zones resulting on core code and drivers cleanup (Andrzej Pietrasiewicz) - Add generic netlink support for userspace notifications: events, temperature and discovery commands (Daniel Lezcano) - Fix redundant initialization for a ret variable (Colin Ian King) - Remove the clock cooling code as it is used nowhere (Amit Kucheria) - Add the rcar_gen3_thermal's r8a774e1 support (Marian-Cristian Rotariu) - Replace all references to thermal.txt in the documentation to the corresponding yaml files (Amit Kucheria) - Add maintainer entry for the IPA (Lukasz Luba) - Add support for MSM8939 for the tsens (Shawn Guo) - Update power allocator and devfreq cooling to SPDX licensing (Lukasz Luba) - Add Cannon Lake Low Power PCH support (Sumeet Pawnikar) - Add tsensor support for V2 mediatek thermal system (Henry Yen) - Fix thermal zone lookup by ID for the core code (Thierry Reding) * tag 'thermal-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (40 commits) thermal: intel: intel_pch_thermal: Add Cannon Lake Low Power PCH support thermal: mediatek: Add tsensor support for V2 thermal system thermal: mediatek: Prepare to add support for other platforms thermal: Update power allocator and devfreq cooling to SPDX licensing MAINTAINERS: update entry to thermal governors file name prefixing thermal: core: Add thermal zone enable/disable notification thermal: qcom: tsens-v0_1: Add support for MSM8939 dt-bindings: tsens: qcom: Document MSM8939 compatible thermal: core: Fix thermal zone lookup by ID thermal: int340x: processor_thermal: fix: update Jasper Lake PCI id thermal: imx8mm: Support module autoloading thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor() MAINTAINERS: Add maintenance information for IPA thermal: rcar_gen3_thermal: Do not shadow thcode variable dt-bindings: thermal: Get rid of thermal.txt and replace references thermal: core: Move initialization after core initcall thermal: netlink: Improve the initcall ordering net: genetlink: Move initialization to core_initcall thermal: rcar_gen3_thermal: Add r8a774e1 support thermal/drivers/clock_cooling: Remove clock_cooling code ... commit ed35832648b5c22ce39fe9c476065389c6f330ef Merge: dfdf16ecfd6ab 3f03b64981723 Author: Linus Torvalds Date: Thu Aug 6 18:09:34 2020 -0700 Merge tag 'auxdisplay-for-linus-v5.9-rc1' of git://github.com/ojeda/linux Pull auxdisplay update from Miguel Ojeda: "Minor cleanup for auxdisplay: rReuse hex_to_bin() instead of custom code (Andy Shevchenko)" * tag 'auxdisplay-for-linus-v5.9-rc1' of git://github.com/ojeda/linux: auxdisplay: charlcd: Reuse hex_to_bin() instead of custom code commit d862a3068ea593dc904ef524d8548467755ce36f Author: Sebastian Reichel Date: Thu Aug 6 16:08:00 2020 -0700 Input: exc3000 - add support to query model and fw_version Expose model and fw_version via sysfs. Also query the model in probe to make sure, that the I2C communication with the device works before successfully probing the driver. This is a bit complicated, since EETI devices do not have a sync interface. Sending the commands and directly reading does not work. Sending the command and waiting for some time is also not an option, since there might be touch events in the mean time. Last but not least we do not cache the results, since this interface can be used to check the I2C communication is still working as expected. Reviewed-by: Enric Balletbo i Serra Signed-off-by: Sebastian Reichel Link: https://lore.kernel.org/r/20200805160520.456570-5-sebastian.reichel@collabora.com Signed-off-by: Dmitry Torokhov commit 27aced19e098ba00e87a09d6ba6d4518e89319c3 Author: Sebastian Reichel Date: Thu Aug 6 16:06:36 2020 -0700 Input: exc3000 - add reset gpio support Add basic support for an optional reset gpio. Reviewed-by: Enric Balletbo i Serra Signed-off-by: Sebastian Reichel Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200805160520.456570-4-sebastian.reichel@collabora.com Signed-off-by: Dmitry Torokhov commit 3bdd21c6937a07f2877409bcdafc0ae2265fc981 Author: Sebastian Reichel Date: Thu Aug 6 16:00:43 2020 -0700 Input: exc3000 - add EXC80H60 and EXC80H84 support This adds support for EXC80H60 and EXCH84 controllers, which use a different event type id and have two extra bits for the resolution (so the maximum is 16K instead of 4K). Signed-off-by: Sebastian Reichel Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200805160520.456570-3-sebastian.reichel@collabora.com Signed-off-by: Dmitry Torokhov commit 1053653ffadbe369af2b109875327ddb6bfa2c8f Author: Sebastian Reichel Date: Thu Aug 6 15:59:22 2020 -0700 dt-bindings: touchscreen: Convert EETI EXC3000 touchscreen to json-schema Convert the EETI EXC3000 binding to DT schema format using json-schema Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200805160520.456570-2-sebastian.reichel@collabora.com Signed-off-by: Dmitry Torokhov commit ea38f06e0291986eb93beb6d61fd413607a30ca4 Author: Colin Ian King Date: Thu Aug 6 15:35:34 2020 -0700 Input: sentelic - fix error return when fsp_reg_write fails Currently when the call to fsp_reg_write fails -EIO is not being returned because the count is being returned instead of the return value in retval. Fix this by returning the value in retval instead of count. Addresses-Coverity: ("Unused value") Fixes: fc69f4a6af49 ("Input: add new driver for Sentelic Finger Sensing Pad") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200603141218.131663-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov commit 47fcd0f969e98c4a82a12efb956c6f8d39aa918a Author: Colin Ian King Date: Thu Aug 6 15:35:17 2020 -0700 Input: alps - remove redundant assignment to variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200603135742.130852-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov commit d431b9e6af1903e112f5f773a0137be4fe5b17e8 Author: Colin Ian King Date: Thu Aug 6 15:34:07 2020 -0700 Input: ims-pcu - return error code rather than -ENOMEM Currently the assignment of -ENOMEM to error is redundant because error is not being read and -ENOMEM is being hard coded as an error return. Fix this by returning the error code in variable 'error'; this also allows the error code from a failed call to input_register_device to be preserved and returned to the caller rather than just returning a possibly inappropriate -ENOMEM. Kudos to Dan Carpenter for the suggestion of an improved fix. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20200603152151.139337-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov commit c7ca03c216acb14466a713fedf1b9f2c24994ef2 Author: Xie He Date: Wed Aug 5 18:50:40 2020 -0700 drivers/net/wan/lapbether: Added needed_headroom and a skb->len check 1. Added a skb->len check This driver expects upper layers to include a pseudo header of 1 byte when passing down a skb for transmission. This driver will read this 1-byte header. This patch added a skb->len check before reading the header to make sure the header exists. 2. Changed to use needed_headroom instead of hard_header_len to request necessary headroom to be allocated In net/packet/af_packet.c, the function packet_snd first reserves a headroom of length (dev->hard_header_len + dev->needed_headroom). Then if the socket is a SOCK_DGRAM socket, it calls dev_hard_header, which calls dev->header_ops->create, to create the link layer header. If the socket is a SOCK_RAW socket, it "un-reserves" a headroom of length (dev->hard_header_len), and assumes the user to provide the appropriate link layer header. So according to the logic of af_packet.c, dev->hard_header_len should be the length of the header that would be created by dev->header_ops->create. However, this driver doesn't provide dev->header_ops, so logically dev->hard_header_len should be 0. So we should use dev->needed_headroom instead of dev->hard_header_len to request necessary headroom to be allocated. This change fixes kernel panic when this driver is used with AF_PACKET SOCK_RAW sockets. Call stack when panic: [ 168.399197] skbuff: skb_under_panic: text:ffffffff819d95fb len:20 put:14 head:ffff8882704c0a00 data:ffff8882704c09fd tail:0x11 end:0xc0 dev:veth0 ... [ 168.399255] Call Trace: [ 168.399259] skb_push.cold+0x14/0x24 [ 168.399262] eth_header+0x2b/0xc0 [ 168.399267] lapbeth_data_transmit+0x9a/0xb0 [lapbether] [ 168.399275] lapb_data_transmit+0x22/0x2c [lapb] [ 168.399277] lapb_transmit_buffer+0x71/0xb0 [lapb] [ 168.399279] lapb_kick+0xe3/0x1c0 [lapb] [ 168.399281] lapb_data_request+0x76/0xc0 [lapb] [ 168.399283] lapbeth_xmit+0x56/0x90 [lapbether] [ 168.399286] dev_hard_start_xmit+0x91/0x1f0 [ 168.399289] ? irq_init_percpu_irqstack+0xc0/0x100 [ 168.399291] __dev_queue_xmit+0x721/0x8e0 [ 168.399295] ? packet_parse_headers.isra.0+0xd2/0x110 [ 168.399297] dev_queue_xmit+0x10/0x20 [ 168.399298] packet_sendmsg+0xbf0/0x19b0 ...... Cc: Willem de Bruijn Cc: Martin Schiller Cc: Brian Norris Signed-off-by: Xie He Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 929e54a989680c6f134b02293732030b897475dc Author: Jianlin Lv Date: Thu Aug 6 18:42:24 2020 +0800 bpf: Fix compilation warning of selftests Clang compiler version: 12.0.0 The following warning appears during the selftests/bpf compilation: prog_tests/send_signal.c:51:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] 51 | write(pipe_c2p[1], buf, 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ prog_tests/send_signal.c:54:3: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result] 54 | read(pipe_p2c[0], buf, 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~ ...... prog_tests/stacktrace_build_id_nmi.c:13:2: warning: ignoring return value of ‘fscanf’,declared with attribute warn_unused_result [-Wunused-resul] 13 | fscanf(f, "%llu", &sample_freq); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test_tcpnotify_user.c:133:2: warning:ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result] 133 | system(test_script); | ^~~~~~~~~~~~~~~~~~~ test_tcpnotify_user.c:138:2: warning:ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result] 138 | system(test_script); | ^~~~~~~~~~~~~~~~~~~ test_tcpnotify_user.c:143:2: warning:ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result] 143 | system(test_script); | ^~~~~~~~~~~~~~~~~~~ Add code that fix compilation warning about ignoring return value and handles any errors; Check return value of library`s API make the code more secure. Signed-off-by: Jianlin Lv Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200806104224.95306-1-Jianlin.Lv@arm.com commit 6fc5916cc256b8e92cc7ad3b34cc4d2a7efa1d5c Author: Jiri Benc Date: Thu Aug 6 20:39:59 2020 +0200 selftests: bpf: Switch off timeout Several bpf tests are interrupted by the default timeout of 45 seconds added by commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: Add 45 second timeout per test"). In my case it was test_progs, test_tunnel.sh, test_lwt_ip_encap.sh and test_xdping.sh. There's not much value in having a timeout for bpf tests, switch it off. Signed-off-by: Jiri Benc Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/7a9198ed10917f4ecab4a3dd74bcda1200791efd.1596739059.git.jbenc@redhat.com commit 0d360d64b01231cdb36e1936de889f308fd9317f Author: Stanislav Fomichev Date: Thu Aug 6 11:26:12 2020 -0700 bpf: Remove inline from bpf_do_trace_printk I get the following error during compilation on my side: kernel/trace/bpf_trace.c: In function 'bpf_do_trace_printk': kernel/trace/bpf_trace.c:386:34: error: function 'bpf_do_trace_printk' can never be inlined because it uses variable argument lists static inline __printf(1, 0) int bpf_do_trace_printk(const char *fmt, ...) ^ Fixes: ac5a72ea5c89 ("bpf: Use dedicated bpf_trace_printk event instead of trace_printk()") Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200806182612.1390883-1-sdf@google.com commit d48556f45608921fa07cb882f9dd15a8a1203427 Author: Stanislav Fomichev Date: Thu Aug 6 08:52:25 2020 -0700 bpf: Add missing return to resolve_btfids int sets_patch(struct object *obj) doesn't have a 'return 0' at the end. Fixes: fbbb68de80a4 ("bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object") Signed-off-by: Stanislav Fomichev Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200806155225.637202-1-sdf@google.com commit dfdf16ecfd6abafc22b7f02364d9bb879ca8a5ee Merge: d7806bbd22cab bf1a28f92a8b0 Author: Linus Torvalds Date: Thu Aug 6 16:50:07 2020 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "This consists of the usual driver updates (ufs, qla2xxx, tcmu, lpfc, hpsa, zfcp, scsi_debug) and minor bug fixes. We also have a huge docbook fix update like most other subsystems and no major update to the core (the few non trivial updates are either minor fixes or removing an unused feature [scsi_sdb_cache])" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (307 commits) scsi: scsi_transport_srp: Sanitize scsi_target_block/unblock sequences scsi: ufs-mediatek: Apply DELAY_AFTER_LPM quirk to Micron devices scsi: ufs: Introduce device quirk "DELAY_AFTER_LPM" scsi: virtio-scsi: Correctly handle the case where all LUNs are unplugged scsi: scsi_debug: Implement tur_ms_to_ready parameter scsi: scsi_debug: Fix request sense scsi: lpfc: Fix typo in comment for ULP scsi: ufs-mediatek: Prevent LPM operation on undeclared VCC scsi: iscsi: Do not put host in iscsi_set_flashnode_param() scsi: hpsa: Correct ctrl queue depth scsi: target: tcmu: Make TMR notification optional scsi: target: tcmu: Implement tmr_notify callback scsi: target: tcmu: Fix and simplify timeout handling scsi: target: tcmu: Factor out new helper ring_insert_padding scsi: target: tcmu: Do not queue aborted commands scsi: target: tcmu: Use priv pointer in se_cmd scsi: target: Add tmr_notify backend function scsi: target: Modify core_tmr_abort_task() scsi: target: iscsi: Fix inconsistent debug message scsi: target: iscsi: Fix login error when receiving ... commit 932ac54a3e59335a847f7682b5124a788ab3c798 Author: Daniel T. Lee Date: Thu Aug 6 07:33:59 2020 +0900 libbf: Fix uninitialized pointer at btf__parse_raw() Recently, from commit 94a1fedd63ed ("libbpf: Add btf__parse_raw() and generic btf__parse() APIs"), new API has been added to libbpf that allows to parse BTF from raw data file (btf__parse_raw()). The commit derives build failure of samples/bpf due to improper access of uninitialized pointer at btf_parse_raw(). btf.c: In function btf__parse_raw: btf.c:625:28: error: btf may be used uninitialized in this function 625 | return err ? ERR_PTR(err) : btf; | ~~~~~~~~~~~~~~~~~~~^~~~~ This commit fixes the build failure of samples/bpf by adding code of initializing btf pointer as NULL. Fixes: 94a1fedd63ed ("libbpf: Add btf__parse_raw() and generic btf__parse() APIs") Signed-off-by: Daniel T. Lee Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200805223359.32109-1-danieltimlee@gmail.com commit d7806bbd22cabc3e3b0a985cfcffa29cf156bb30 Merge: d6efb3ac3e6c1 23fcc7dee2c6a Author: Linus Torvalds Date: Thu Aug 6 16:43:36 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "A quiet cycle after the larger 5.8 effort. Substantially cleanup and driver work with a few smaller features this time. - Driver updates for hfi1, rxe, mlx5, hns, qedr, usnic, bnxt_re - Removal of dead or redundant code across the drivers - RAW resource tracker dumps to include a device specific data blob for device objects to aide device debugging - Further advance the IOCTL interface, remove the ability to turn it off. Add QUERY_CONTEXT, QUERY_MR, and QUERY_PD commands - Remove stubs related to devices with no pkey table - A shared CQ scheme to allow multiple ULPs to share the CQ rings of a device to give higher performance - Several more static checker, syzkaller and rare crashers fixed" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (121 commits) RDMA/mlx5: Fix flow destination setting for RDMA TX flow table RDMA/rxe: Remove pkey table RDMA/umem: Add a schedule point in ib_umem_get() RDMA/hns: Fix the unneeded process when getting a general type of CQE error RDMA/hns: Fix error during modify qp RTS2RTS RDMA/hns: Delete unnecessary memset when allocating VF resource RDMA/hns: Remove redundant parameters in set_rc_wqe() RDMA/hns: Remove support for HIP08_A RDMA/hns: Refactor hns_roce_v2_set_hem() RDMA/hns: Remove redundant hardware opcode definitions RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP RDMA/include: Replace license text with SPDX tags RDMA/rtrs: remove WQ_MEM_RECLAIM for rtrs_wq RDMA/rtrs-clt: add an additional random 8 seconds before reconnecting RDMA/cma: Execute rdma_cm destruction from a handler properly RDMA/cma: Remove unneeded locking for req paths RDMA/cma: Using the standard locking pattern when delivering the removal event RDMA/cma: Simplify DEVICE_REMOVAL for internal_id RDMA/efa: Add EFA 0xefa1 PCI ID RDMA/efa: User/kernel compatibility handshake mechanism ... commit 0ac10dc1888cd1a8b994f32b51f0eaeba1e803ef Merge: 6bcaf41f96132 74fc097de327b Author: Alexei Starovoitov Date: Thu Aug 6 16:39:14 2020 -0700 Merge branch 'bpf_iter-uapi-fix' Yonghong Song says: ==================== Andrii raised a concern that current uapi for bpf iterator map element is a little restrictive and not suitable for future potential complex customization. This is a valid suggestion, considering people may indeed add more complex custimization to the iterator, e.g., cgroup_id + user_id, etc. for task or task_file. Another example might be map_id plus additional control so that the bpf iterator may bail out a bucket earlier if a bucket has too many elements which may hold lock too long and impact other parts of systems. Patch #1 modified uapi with kernel changes. Patch #2 adjusted libbpf api accordingly. Changelogs: v3 -> v4: . add a forward declaration of bpf_iter_link_info in tools/lib/bpf/bpf.h in case that libbpf is built against not-latest uapi bpf.h. . target the patch set to "bpf" instead of "bpf-next" v2 -> v3: . undo "not reject iter_info.map.map_fd == 0" from v1. In the future map_fd may become optional, so let us use map_fd == 0 indicating the map_fd is not set by user space. . add link_info_len to bpf_iter_attach_opts to ensure always correct link_info_len from user. Otherwise, libbpf may deduce incorrect link_info_len if it uses different uapi header than the user app. v1 -> v2: . ensure link_create target_fd/flags == 0 since they are not used. (Andrii) . if either of iter_info ptr == 0 or iter_info_len == 0, but not both, return error to user space. (Andrii) . do not reject iter_info.map.map_fd == 0, go ahead to use it trying to get a map reference since the map_fd is required for map_elem iterator. . use bpf_iter_link_info in bpf_iter_attach_opts instead of map_fd. this way, user space is responsible to set up bpf_iter_link_info and libbpf just passes the data to the kernel, simplifying libbpf design. (Andrii) ==================== Signed-off-by: Alexei Starovoitov commit 74fc097de327b37e8fe3ff580ce7ffaa7c1740dd Author: Yonghong Song Date: Tue Aug 4 22:50:58 2020 -0700 tools/bpf: Support new uapi for map element bpf iterator Previous commit adjusted kernel uapi for map element bpf iterator. This patch adjusted libbpf API due to uapi change. bpftool and bpf_iter selftests are also changed accordingly. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200805055058.1457623-1-yhs@fb.com commit 5e7b30205cef80f6bb922e61834437ca7bff5837 Author: Yonghong Song Date: Tue Aug 4 22:50:56 2020 -0700 bpf: Change uapi for bpf iterator map elements Commit a5cbe05a6673 ("bpf: Implement bpf iterator for map elements") added bpf iterator support for map elements. The map element bpf iterator requires info to identify a particular map. In the above commit, the attr->link_create.target_fd is used to carry map_fd and an enum bpf_iter_link_info is added to uapi to specify the target_fd actually representing a map_fd: enum bpf_iter_link_info { BPF_ITER_LINK_UNSPEC = 0, BPF_ITER_LINK_MAP_FD = 1, MAX_BPF_ITER_LINK_INFO, }; This is an extensible approach as we can grow enumerator for pid, cgroup_id, etc. and we can unionize target_fd for pid, cgroup_id, etc. But in the future, there are chances that more complex customization may happen, e.g., for tasks, it could be filtered based on both cgroup_id and user_id. This patch changed the uapi to have fields __aligned_u64 iter_info; __u32 iter_info_len; for additional iter_info for link_create. The iter_info is defined as union bpf_iter_link_info { struct { __u32 map_fd; } map; }; So future extension for additional customization will be easier. The bpf_iter_link_info will be passed to target callback to validate and generic bpf_iter framework does not need to deal it any more. Note that map_fd = 0 will be considered invalid and -EBADF will be returned to user space. Fixes: a5cbe05a6673 ("bpf: Implement bpf iterator for map elements") Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200805055056.1457463-1-yhs@fb.com commit 6bcaf41f9613278cd5897fc80ab93033bda8efaa Author: Andrii Nakryiko Date: Tue Aug 4 17:47:57 2020 -0700 selftests/bpf: Prevent runqslower from racing on building bpftool runqslower's Makefile is building/installing bpftool into $(OUTPUT)/sbin/bpftool, which coincides with $(DEFAULT_BPFTOOL). In practice this means that often when building selftests from scratch (after `make clean`), selftests are racing with runqslower to simultaneously build bpftool and one of the two processes fail due to file being busy. Prevent this race by explicitly order-depending on $(BPFTOOL_DEFAULT). Fixes: a2c9652f751e ("selftests: Refactor build to remove tools/lib/bpf from include path") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200805004757.2960750-1-andriin@fb.com commit f29dfa53cc8ae6ad93bae619bcc0bf45cab344f7 Author: Pawan Gupta Date: Thu Jul 16 12:23:59 2020 -0700 x86/bugs/multihit: Fix mitigation reporting when VMX is not in use On systems that have virtualization disabled or unsupported, sysfs mitigation for X86_BUG_ITLB_MULTIHIT is reported incorrectly as: $ cat /sys/devices/system/cpu/vulnerabilities/itlb_multihit KVM: Vulnerable System is not vulnerable to DoS attack from a rogue guest when virtualization is disabled or unsupported in the hardware. Change the mitigation reporting for these cases. Fixes: b8e8c8303ff2 ("kvm: mmu: ITLB_MULTIHIT mitigation") Reported-by: Nelson Dsouza Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Pawan Gupta Signed-off-by: Ingo Molnar Reviewed-by: Tony Luck Acked-by: Thomas Gleixner Link: https://lore.kernel.org/r/0ba029932a816179b9d14a30db38f0f11ef1f166.1594925782.git.pawan.kumar.gupta@linux.intel.com commit 76d10256a97a7cab72b123d54b766a3c17da658c Author: Kan Liang Date: Mon Jul 20 06:50:51 2020 -0700 x86/fpu/xstate: Fix an xstate size check warning with architectural LBRs An xstate size check warning is triggered on machines which support Architectural LBRs. XSAVE consistency problem, dumping leaves WARNING: CPU: 0 PID: 0 at arch/x86/kernel/fpu/xstate.c:649 fpu__init_system_xstate+0x4d4/0xd0e Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted intel-arch_lbr+ RIP: 0010:fpu__init_system_xstate+0x4d4/0xd0e The xstate size check routine, init_xstate_size(), compares the size retrieved from the hardware with the size of task->fpu, which is calculated by the software. The size from the hardware is the total size of the enabled xstates in XCR0 | IA32_XSS. Architectural LBR state is a dynamic supervisor feature, which sets the corresponding bit in the IA32_XSS at boot time. The size from the hardware includes the size of the Architectural LBR state. However, a dynamic supervisor feature doesn't allocate a buffer in the task->fpu. The size of task->fpu doesn't include the size of the Architectural LBR state. The mismatch will trigger the warning. Three options as below were considered to fix the issue: - Correct the size from the hardware by subtracting the size of the dynamic supervisor features. The purpose of the check is to compare the size CPU told with the size of the XSAVE buffer, which is calculated by the software. If the software mucks with the number from hardware, it removes the value of the check. This option is not a good option. - Prevent the hardware from counting the size of the dynamic supervisor feature by temporarily removing the corresponding bits in IA32_XSS. Two extra MSR writes are required to flip the IA32_XSS. The option is not pretty, but it is workable. The check is only called once at early boot time. The synchronization or context-switching doesn't need to be worried. This option is implemented here. - Remove the check entirely, because the check hasn't found any real problems. The option may be an alternative as option 2. This option is not implemented here. Add a new function, get_xsaves_size_no_dynamic(), which retrieves the total size without the dynamic supervisor features from the hardware. The size will be used to compare with the size of task->fpu. Fixes: f0dccc9da4c0 ("x86/fpu/xstate: Support dynamic supervisor feature for LBR") Reported-by: Chang S. Bae Signed-off-by: Kan Liang Signed-off-by: Ingo Molnar Reviewed-by: Dave Hansen Link: https://lore.kernel.org/r/1595253051-75374-1-git-send-email-kan.liang@linux.intel.com commit 52416ffcf823ee11aa19792715664ab94757f111 Author: Pingfan Liu Date: Mon Aug 3 13:49:48 2020 +0800 x86/purgatory: Don't generate debug info for purgatory.ro Purgatory.ro is a standalone binary that is not linked against the rest of the kernel. Its image is copied into an array that is linked to the kernel, and from there kexec relocates it wherever it desires. Unlike the debug info for vmlinux, which can be used for analyzing crash such info is useless in purgatory.ro. And discarding them can save about 200K space. Original: 259080 kexec-purgatory.o Stripped debug info: 29152 kexec-purgatory.o Signed-off-by: Pingfan Liu Signed-off-by: Ingo Molnar Reviewed-by: Nick Desaulniers Reviewed-by: Steve Wahl Acked-by: Dave Young Link: https://lore.kernel.org/r/1596433788-3784-1-git-send-email-kernelfans@gmail.com commit 7d98585860d845e36ee612832a5ff021f201dbaf Author: Dilip Kota Date: Mon Aug 3 15:56:36 2020 +0800 x86/tsr: Fix tsc frequency enumeration bug on Lightning Mountain SoC Frequency descriptor of Lightning Mountain SoC doesn't have all the frequency entries so resulting in the below failure causing a kernel hang: Error MSR_FSB_FREQ index 15 is unknown tsc: Fast TSC calibration failed So, add all the frequency entries in the Lightning Mountain SoC frequency descriptor. Fixes: 0cc5359d8fd45 ("x86/cpu: Update init data for new Airmont CPU model") Fixes: 812c2d7506fd ("x86/tsc_msr: Use named struct initializers") Signed-off-by: Dilip Kota Signed-off-by: Ingo Molnar Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/211c643ae217604b46cbec43a2c0423946dc7d2d.1596440057.git.eswara.kota@linux.intel.com commit 475f63ae63b5102ae6423d1712333929d04d6ecc Author: Lianbo Jiang Date: Tue Aug 4 12:49:33 2020 +0800 kexec_file: Correctly output debugging information for the PT_LOAD ELF header Currently, when we enable the debugging switch to debug kexec_file, we always get the following incorrect results: kexec_file: Crash PT_LOAD elf header. phdr=00000000c988639b vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=51 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=000000003cca69a0 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=52 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=00000000c584cb9f vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=53 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=00000000cf85d57f vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=54 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=00000000a4a8f847 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=55 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=00000000272ec49f vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=56 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=00000000ea0b65de vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=57 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=000000001f5e490c vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=58 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=00000000dfe4109e vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=59 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=00000000480ed2b6 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=60 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=0000000080b65151 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=61 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=0000000024e31c5e vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=62 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=00000000332e0385 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=63 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=000000002754d5da vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=64 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=00000000783320dd vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=65 p_offset=0x0 kexec_file: Crash PT_LOAD elf header. phdr=0000000076fe5b64 vaddr=0x0, paddr=0x0, sz=0x0 e_phnum=66 p_offset=0x0 The reason is that kernel always prints the values of the next PT_LOAD instead of the current PT_LOAD. Change it to ensure that we can get the correct debugging information. [ mingo: Amended changelog, capitalized "ELF". ] Signed-off-by: Lianbo Jiang Signed-off-by: Ingo Molnar Acked-by: Dave Young Link: https://lore.kernel.org/r/20200804044933.1973-4-lijiang@redhat.com commit a2e9a95d2190ef55bf0724ecdf8a466d393a86b6 Author: Lianbo Jiang Date: Tue Aug 4 12:49:32 2020 +0800 kexec: Improve & fix crash_exclude_mem_range() to handle overlapping ranges The crash_exclude_mem_range() function can only handle one memory region a time. It will fail in the case in which the passed in area covers several memory regions. In this case, it will only exclude the first region, then return, but leave the later regions unsolved. E.g in a NEC system with two usable RAM regions inside the low 1M: ... BIOS-e820: [mem 0x0000000000000000-0x000000000003efff] usable BIOS-e820: [mem 0x000000000003f000-0x000000000003ffff] reserved BIOS-e820: [mem 0x0000000000040000-0x000000000009ffff] usable It will only exclude the memory region [0, 0x3efff], the memory region [0x40000, 0x9ffff] will still be added into /proc/vmcore, which may cause the following failure when dumping vmcore: ioremap on RAM at 0x0000000000040000 - 0x0000000000040fff WARNING: CPU: 0 PID: 665 at arch/x86/mm/ioremap.c:186 __ioremap_caller+0x2c7/0x2e0 ... RIP: 0010:__ioremap_caller+0x2c7/0x2e0 ... cp: error reading '/proc/vmcore': Cannot allocate memory kdump: saving vmcore failed In order to fix this bug, let's extend the crash_exclude_mem_range() to handle the overlapping ranges. [ mingo: Amended the changelog. ] Signed-off-by: Lianbo Jiang Signed-off-by: Ingo Molnar Acked-by: Dave Young Link: https://lore.kernel.org/r/20200804044933.1973-3-lijiang@redhat.com commit a3e1c3bb24e2ff2927af5e30c2bebe669bb84196 Author: Lianbo Jiang Date: Tue Aug 4 12:49:31 2020 +0800 x86/crash: Correct the address boundary of function parameters Let's carefully handle the boundary of the function parameter to make sure that the arguments passed doesn't exceed the address range. Signed-off-by: Lianbo Jiang Signed-off-by: Ingo Molnar Acked-by: Dave Young Link: https://lore.kernel.org/r/20200804044933.1973-2-lijiang@redhat.com commit 4c7bfa383efd837d4ab8f86ef05886959ed8bfe5 Author: Shuo Liu Date: Thu Aug 6 19:41:11 2020 +0800 x86/acrn: Remove redundant chars from ACRN signature hypervisor_cpuid_base() only handles 12 chars of the hypervisor signature string but is provided with 14 chars. Remove the redundancy. Additionally, replace the user space uint32_t with preferred kernel type u32. Signed-off-by: Shuo Liu Signed-off-by: Ingo Molnar Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20200806114111.9448-1-shuo.a.liu@intel.com commit 86d709ce30eaa65706090865662a08d7bdd30c54 Author: Shuo Liu Date: Thu Aug 6 19:38:02 2020 +0800 x86/acrn: Allow ACRN guest to use X2APIC mode The ACRN Hypervisor did not support x2APIC and thus x2APIC support was disabled by always returning false when VM checked for x2APIC support. ACRN received full support of x2APIC and exports the capability through CPUID feature bits. Let VM decide if it needs to switch to x2APIC mode according to CPUID features. Originally-by: Yakui Zhao Signed-off-by: Shuo Liu Signed-off-by: Ingo Molnar Reviewed-by: Reinette Chatre Link: https://lore.kernel.org/r/20200806113802.9325-1-shuo.a.liu@intel.com commit 905e321e21dc907c0f6ecb20225fde3d5d817422 Merge: d7aaeef293404 e8abe1de43dac Author: Jens Axboe Date: Thu Aug 6 17:23:22 2020 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.9 Pull MD fixes from Song. * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md-cluster: Fix potential error pointer dereference in resize_bitmaps() md: get sysfs entry after redundancy attr group create commit d6efb3ac3e6c19ab722b28bdb9252bae0b9676b6 Merge: c0c419c045571 f6c6eb2fe8223 Author: Linus Torvalds Date: Thu Aug 6 14:56:11 2020 -0700 Merge tag 'tty-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial updates from Greg KH: "Here is the large set of TTY and Serial driver patches for 5.9-rc1. Lots of bugfixes in here, thanks to syzbot fuzzing for serial and vt and console code. Other highlights include: - much needed vt/vc code cleanup from Jiri Slaby - 8250 driver fixes and additions - various serial driver updates and feature enhancements - locking cleanup for serial/console initializations - other minor cleanups All of these have been in linux-next with no reported issues" * tag 'tty-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (90 commits) MAINTAINERS: enlist Greg formally for console stuff vgacon: Fix for missing check in scrollback handling Revert "serial: 8250: Let serial core initialise spin lock" serial: 8250: Let serial core initialise spin lock tty: keyboard, do not speculate on func_table index serial: stm32: Add RS485 RTS GPIO control serial: 8250_dw: Fix common clocks usage race condition serial: 8250_dw: Pass the same rate to the clk round and set rate methods serial: 8250_dw: Simplify the ref clock rate setting procedure serial: 8250: Add 8250 port clock update method tty: serial: imx: add imx earlycon driver tty: serial: imx: enable imx serial console port as module tty/synclink: remove leftover bits of non-PCI card support tty: Use the preferred form for passing the size of a structure type tty: Fix identation issues in struct serial_struct32 tty: Avoid the use of one-element arrays serial: msm_serial: add sparse context annotation serial: pmac_zilog: add sparse context annotation newport_con: vc_color is now in state serial: imx: use hrtimers for rs485 delays ... commit c0c419c04557117258d184876d94091d29bbd9a6 Merge: 3f9df56480fc8 5bbd90550da8f Author: Linus Torvalds Date: Thu Aug 6 14:36:13 2020 -0700 Merge tag 'staging-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO driver updates from Greg KH: "Here is the large set of Staging and IIO driver patches for 5.9-rc1. Lots of churn here, but overall the size increase in lines added is small, while adding a load of new IIO drivers. Major things in here: - lots and lots of IIO new drivers and frameworks added - IIO driver fixes and updates - lots of tiny coding style cleanups for staging drivers - vc04_services major reworks and cleanups We had 3 set of drivers move out of staging in this round as well: - wilc1000 wireless driver moved out of staging - speakup moved out of staging - most USB driver moved out of staging Full details are in the shortlog. All of these have been in linux-next with no reported issues. The last few changes here were to resolve reported linux-next issues, and they seem to have resolved the problems" * tag 'staging-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (428 commits) staging: most: fix up movement of USB driver staging: rts5208: clear alignment style issues staging: r8188eu: replace rtw_netdev_priv define with inline function staging: netlogic: clear alignment style issues staging: android: ashmem: Fix lockdep warning for write operation drivers: most: add USB adapter driver staging: most: Use %pM format specifier for MAC addresses staging: ks7010: Use %pM format specifier for MAC addresses staging: qlge: qlge_dbg: removed comment repition staging: wfx: Use flex_array_size() helper in memcpy() staging: rtl8723bs: Align macro definitions staging: rtl8723bs: Clean up function declations staging: rtl8723bs: Fix coding style errors drivers: staging: audio: Fix the missing header file for helper file staging: greybus: audio: Enable GB codec, audio module compilation. staging: greybus: audio: Add helper APIs for dynamic audio modules staging: greybus: audio: Resolve compilation error in topology parser staging: greybus: audio: Resolve compilation errors for GB codec module staging: greybus: audio: Maintain jack list within GB Audio module staging: greybus: audio: Update snd_jack FW usage as per new APIs ... commit 3f9df56480fc8ce492fc9e988d67bdea884ed15c Merge: 921d2597abfc0 c7fabbc51352f Author: Linus Torvalds Date: Thu Aug 6 14:27:31 2020 -0700 Merge tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This became wide and scattered updates all over the sound tree as diffstat shows: lots of (still ongoing) refactoring works in ASoC, fixes and cleanups caught by static analysis, inclusive term conversions as well as lots of new drivers. Below are highlights: ASoC core: - API cleanups and conversions to the unified mute_stream() call - Simplify I/O helper functions - Use helper macros to retrieve RTD from substreams ASoC drivers: - Lots of fixes and cleanups in Intel ASoC drivers - Lots of new stuff: Freescale MQS and i.MX6sx, Intel KeemBay I2S, Maxim MAX98360A and MAX98373 SoundWire, various Mediatek boards, nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries boards, TI J721e EVM ALSA core: - Minor code refacotring for SG-buffer handling HD-audio: - Generalization of mute-LED handling with LED classdev - Intel silent stream support for HDMI - Device-specific fixes: CA0132, Loongson-3 Others: - Usual USB- and HD-audio quirks for various devices - Fixes for echoaudio DMA position handling - Various documents and trivial fixes for sparse warnings - Conversion to adopt inclusive terms" * tag 'sound-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (479 commits) ALSA: pci: delete repeated words in comments ALSA: isa: delete repeated words in comments ALSA: hda/tegra: Add 100us dma stop delay ALSA: hda: Add dma stop delay variable ASoC: hda/tegra: Set buffer alignment to 128 bytes ALSA: seq: oss: Serialize ioctls ALSA: hda/hdmi: Add quirk to force connectivity ALSA: usb-audio: add startech usb audio dock name ALSA: usb-audio: Add support for Lenovo ThinkStation P620 Revert "ALSA: hda: call runtime_allow() for all hda controllers" ALSA: hda/ca0132 - Fix AE-5 microphone selection commands. ALSA: hda/ca0132 - Add new quirk ID for Recon3D. ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value. ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops ALSA: docs: fix typo ALSA: doc: use correct config variable name ASoC: core: Two step component registration ASoC: core: Simplify snd_soc_component_initialize declaration ASoC: core: Relocate and expose snd_soc_component_initialize ASoC: sh: Replace 'select' DMADEVICES 'with depends on' ... commit 95a2687687f832a7f8fa32bdfe42a530796b71a2 Author: Alex Deucher Date: Thu Jul 30 15:21:33 2020 -0400 drm/amdgpu/smu: rework i2c adpater registration The i2c init/fini functions just register the i2c adapter. There is no need to call them during hw init/fini. They only need to be called once per driver init/fini. The previous behavior broke runtime pm because we unregistered the i2c adapter during suspend. Tested-by: Tom St Denis Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit d6a4e5e9fed072702a03f45584df7e74a8ba79ee Author: Igor Kravchenko Date: Fri Jul 24 11:10:40 2020 -0400 drm/amd/display: Display goes blank after inst [why] Display goes blank after driver installation. Aux tuning parameters must be used for 2.x only. Wrong dc_golden_table offset was used. [How] Implement a new enc3_hw_init function without VBIOS constants usage to be called for 3.x Calculate dc_golden_table offset using sum of base dce_info offset and golden table offset Signed-off-by: Igor Kravchenko Reviewed-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ab2cf4c86b24821b6a4164a20d46961da1686634 Author: George Shen Date: Fri Jul 17 13:19:27 2020 -0400 drm/amd/display: Change null plane state swizzle mode to 4kb_s [Why] During SetPathMode and UpdatePlanes, the plane state can be null. We default to linear swizzle mode when plane state is null. This resulted in bandwidth validation failing when trying to set 8K60 mode (which previously passed validation during rebuild timing list). [How] Change the default swizzle mode from linear to 4kb_s and update pitch accordingly. Signed-off-by: George Shen Reviewed-by: Dmytro Laktyushkin Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit bd42538f1f40a6de16eead6ab01a1c214e6894e4 Author: JinZe.Xu Date: Tue Jul 21 17:52:41 2020 +0800 drm/amd/display: Use helper function to check for HDMI signal [How] Use dc_is_hdmi_signal to determine signal type. Signed-off-by: JinZe.Xu Reviewed-by: Charlene Liu Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit e106c96e2e0a0b9c1305d54480b60cb670d7fd1b Author: Aric Cyr Date: Thu Jul 23 13:06:23 2020 -0400 drm/amd/display: AMD OUI (DPCD 0x00300) skipped on some sink [Why] Sink OUI supported cap is not set so driver skips programming it. [How] Revert the change the skips OUI programming if the cap is not set Signed-off-by: Aric Cyr Reviewed-by: Anthony Koo Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 7edac0d3fbf58db6a807bad5c5e264bb830906aa Author: Harry Wentland Date: Tue Jun 30 11:16:05 2020 -0400 drm/amd/display: Fix logger context [Why&How] use correct logger context Signed-off-by: Harry Wentland Reviewed-by: Roman Li Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 7c6981e7ca74be39a16a770315606d495a860275 Author: Dmytro Laktyushkin Date: Fri Jun 26 14:30:29 2020 -0400 drm/amd/display: populate new dml variable Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 098214999c8f8eea8dffddb61be5742fac2c829e Author: Igor Kravchenko Date: Sun Jul 19 20:45:28 2020 -0400 drm/amd/display: Read VBIOS Golden Settings Tbl [Why] For ver.4.4 and higher VBIOS contains default setting table. {How] Read Golden Settings Table from VBIOS, apply Aux tuning parameters. Signed-off-by: Igor Kravchenko Reviewed-by: Aric Cyr Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit c06f670f4701d3a19534eb7ca4f606b9771a94a3 Author: Eric Bernstein Date: Mon Jul 20 19:18:43 2020 -0400 drm/amd/display: Use parameter for call to set output mux Signed-off-by: Eric Bernstein Reviewed-by: Chris Park Acked-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a15383893f798c0962ab87f7e159abba9cbe3822 Author: Jiansong Chen Date: Thu Jul 30 18:09:47 2020 +0800 drm/amdgpu: enable GFXOFF for navy_flounder Enable GFXOFF for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit d392aa02db1b3ecbec49bc8bd28a132298174539 Author: Liu ChengZhe Date: Fri Jul 24 15:55:33 2020 +0800 drm amdgpu: Skip tmr load for SRIOV 1. For Navi12, CHIP_SIENNA_CICHLID, skip tmr load operation; 2. Check pointer before release firmware. v2: use CHIP_SIENNA_CICHLID instead v3: remove local "bool ret"; fix grammer issue v4: use my name instead of "root" v5: fix grammer issue and indent issue Signed-off-by: Liu ChengZhe Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 6b6124bb4a0b05fa9ac052e14dd7c37c42ab9297 Author: Liu ChengZhe Date: Fri Jul 24 17:22:15 2020 +0800 drm/amdgpu: fix PSP autoload twice in FLR Assigning false to block->status.hw overwrites PSP's previous hardware status, which causes the PSP to Resume operation after hardware init. Remove this assignment and let the PSP execute Resume operation when it is told to. v2: Remove the braces. v3: Modify the description. Signed-off-by: Liu ChengZhe Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 278a4b5f62be85fa62d4439b5fbdf15027e99606 Author: Jiansong Chen Date: Wed Jul 29 11:58:21 2020 +0800 drm/amdgpu: update GC golden setting for navy_flounder Update GC golden setting for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 0730344ee370012574fe73c2785557d0e9180430 Author: Jiansong Chen Date: Tue Jul 28 19:14:22 2020 +0800 drm/amd/powerplay: update driver if version for navy_flounder It's in accordance with pmfw 65.5.0 for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit a676a97623d399f7a2174b347d688412864d385a Author: Huang Rui Date: Mon Jul 27 16:19:45 2020 +0800 drm/amdgpu: skip crit temperature values on APU (v2) It doesn't expose PPTable descriptor on APU platform. So max/min temperature values cannot be got from APU platform. v2: Stoney needs to skip crit temperature as well. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 76d5ef4ff10bc64f84a4b301cf8c25229048edd8 Author: Aric Cyr Date: Wed Jul 22 15:40:06 2020 -0400 drm/amd/display: Fix DP Compliance tests 4.3.2.1 and 4.3.2.2 [Why] Test expects that we also read HPD_IRQ_VECTOR when checking for symbol loss as well lane status. [How] Read bytes 0x200-0x205 instead of just 0x202-0x205 Signed-off-by: Aric Cyr Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit b5fe6aa2b02cdfee75f747c68f3d303fddd09af9 Author: Wyatt Wood Date: Wed Jun 17 11:29:27 2020 -0400 drm/amd/display: Use hw lock mgr [Why] Feature requires synchronization of dig, pipe, and cursor locking between driver and fw. [How] Set flag to force psr to use hw lock mgr. Signed-off-by: Wyatt Wood Reviewed-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 8b0379a85762b516c7b46aed7dbf2a4947c00564 Author: hersen wu Date: Sun Jul 19 17:21:59 2020 -0400 drm/amd/display: dchubbub p-state warning during surface planes switch [Why] ramp_up_dispclk_with_dpp is to change dispclk, dppclk and dprefclk according to bandwidth requirement. call stack: rv1_update_clocks --> update_clocks --> dcn10_prepare_bandwidth / dcn10_optimize_bandwidth --> prepare_bandwidth / optimize_bandwidth. before change dcn hw, prepare_bandwidth will be called first to allow enough clock, watermark for change, after end of dcn hw change, optimize_bandwidth is executed to lower clock to save power for new dcn hw settings. below is sequence of commit_planes_for_stream: step 1: prepare_bandwidth - raise clock to have enough bandwidth step 2: lock_doublebuffer_enable step 3: pipe_control_lock(true) - make dchubp register change will not take effect right way step 4: apply_ctx_for_surface - program dchubp step 5: pipe_control_lock(false) - dchubp register change take effect step 6: optimize_bandwidth --> dc_post_update_surfaces_to_stream for full_date, optimize clock to save power at end of step 1, dcn clocks (dprefclk, dispclk, dppclk) may be changed for new dchubp configuration. but real dcn hub dchubps are still running with old configuration until end of step 5. this need clocks settings at step 1 should not less than that before step 1. this is checked by two conditions: 1. if (should_set_clock(safe_to_lower , new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) || new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz) 2. request_dpp_div = new_clocks->dispclk_khz > new_clocks->dppclk_khz the second condition is based on new dchubp configuration. dppclk for new dchubp may be different from dppclk before step 1. for example, before step 1, dchubps are as below: pipe 0: recout=(0,40,1920,980) viewport=(0,0,1920,979) pipe 1: recout=(0,0,1920,1080) viewport=(0,0,1920,1080) for dppclk for pipe0 need dppclk = dispclk new dchubp pipe split configuration: pipe 0: recout=(0,0,960,1080) viewport=(0,0,960,1080) pipe 1: recout=(960,0,960,1080) viewport=(960,0,960,1080) dppclk only needs dppclk = dispclk /2. dispclk, dppclk are not lock by otg master lock. they take effect after step 1. during this transition, dispclk are the same, but dppclk is changed to half of previous clock for old dchubp configuration between step 1 and step 6. This may cause p-state warning intermittently. [How] for new_clocks->dispclk_khz == clk_mgr_base->clks.dispclk_khz, we need make sure dppclk are not changed to less between step 1 and 6. for new_clocks->dispclk_khz > clk_mgr_base->clks.dispclk_khz, new display clock is raised, but we do not know ratio of new_clocks->dispclk_khz and clk_mgr_base->clks.dispclk_khz, new_clocks->dispclk_khz /2 does not guarantee equal or higher than old dppclk. we could ignore power saving different between dppclk = displck and dppclk = dispclk / 2 between step 1 and step 6. as long as safe_to_lower = false, set dpclk = dispclk to simplify condition check. CC: Stable Signed-off-by: Hersen Wu Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 471c1dd9546df81d259664ac3e2ab0e99169f755 Author: Reza Amini Date: Wed Jul 15 11:33:23 2020 -0400 drm/amd/display: Allow asic specific FSFT timing optimization [Why] Each asic can optimize best based on its capabilities [How] Optimizing timing for a new pixel clock Signed-off-by: Reza Amini Reviewed-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 6b6352dd1f96ca2464d7373557cb913f00c9e6dd Author: Jun Lei Date: Thu Jun 25 13:24:12 2020 -0400 drm/amd/display: Disable idle optimizations before programming DCN [Why] Programming DCN is explicitly forbidden during idle optimzations allowed state. Existing implemenation relies on OS/DM, which is not robust. Instead DC should sequence this. Note that DC will not re-enter idle optimized state on its own, it is only responsible for catching out of sequence calls. It is still DM responsibility to sequence appropriate for optimized power, but this change removes the requirement for DM to cover the .1% case. [How] - elevate updates during idle optimized state to full updates - disable idle power optimizations prior to programming Signed-off-by: Jun Lei Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit c5892a10218214d729699ab61bad6fc109baf0ce Author: Stylon Wang Date: Tue Jun 30 17:55:29 2020 +0800 drm/amd/display: Fix dmesg warning from setting abm level [Why] Setting abm level does not correctly update CRTC state. As a result no surface update is added to dc stream state and triggers warning. [How] Correctly update CRTC state when setting abm level property. CC: Stable Signed-off-by: Stylon Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 5eaec83a883b02c5e1d44d0537bb63444543d1e6 Author: Bhawanpreet Lakha Date: Fri Jul 24 16:36:07 2020 -0400 drm/amd/display: Use proper abm/backlight functions for DCN3 Use DCN21 functions instead of DCE110 Signed-off-by: Bhawanpreet Lakha Reviewed-by: Nicholas Kazlauskas Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5ce868fc474e8797bd16f19e435a538554c371ab Author: Bhawanpreet Lakha Date: Tue Jul 21 13:59:52 2020 -0400 drm/amd/display: Use seperate dmcub firmware for navy_flounder [Why] Currently navy_flounder is using sienna_cichlid_dmcub.bin. [How] Create a seperate define so navy_flounder will use its own firmware. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3fd20292c2352660155bbc11736dd014b2fc6e98 Author: Martin Tsai Date: Wed Jul 15 11:21:43 2020 +0800 drm/amd/display: Check lane status again after link training done [Why] Some monitors could suffer symbol unlock but cannot send HPD IRQ to notic source device to handle link loss. This makes monitor stuck in abnormal status and causes black screen. [How] According to the suggestion from scalar vendor, to check lane status again after link training done. That can improve the comaptibility from current production monitors. Signed-off-by: Martin Tsai Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit bc0cd80783ff7c2201b44d384bab4629c9cb7db9 Author: Alvin Lee Date: Tue Jul 14 15:06:40 2020 -0400 drm/amd/display: Don't compare dppclk before updating DTO [Why] In dcn3_update_clocks there are situations where dppclk is not lowered (i.e. stays the same), but DTO still needs to be increased before we program pipe frontend (i.e. in prepare_bandwidth). If we don't program the new DTO value before we program the pipe, we will underflow as soon as the pipe lock is released until the next call to dcn3_update_clocks where the DTO is updated. [How] Remove dppclk check before programming new DTO value. Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit c6851841fc877d9e4361eeaa1e3851778fa440c4 Author: Eryk Brol Date: Tue Jun 16 16:29:19 2020 -0400 drm/amd/display: Fix naming of DSC Debugfs entry [why] Fix naming and return bits rather than bytes per pixel for naming consistency. Because registers return Bytes per pixel, but DSC Config structure is expecting bits per pixel as input. So when returning the value convert from bytes into bits. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 5e061a4d020380566365e8aa8f629bbd200e9708 Author: Eryk Brol Date: Tue Jun 16 16:24:11 2020 -0400 drm/amd/display: Rename bytes_pp to the correct bits_pp [Why] Struct dcn_dsc_state is used for reading current state and parameters of DSC on a pipe, the target rate parameter uses bytes per pixel even though its reading BITS_PER_PIXEL register. [How] Changing it to Bits Per Pixel for consistency. Signed-off-by: Eryk Brol Signed-off-by: Mikita Lipski Reviewed-by: Mikita Lipski Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 7c146177b3368feda6dbb0e01b085c84d9774589 Author: Dmytro Laktyushkin Date: Mon Jul 6 10:54:37 2020 -0400 drm/amd/display: Clean up global sync param retrieval [Why] This change replaces older looping code in favor of these functions. [How] There are built in functions for extracting global sync params during mode validation now. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit c4e0dbcb201a79639e5e74f456d8313893a259f5 Author: Kevin Wang Date: Mon Jul 27 09:08:22 2020 +0800 drm/amd/swsmu: allow asic to handle sensor type by itself 1. allow asic to handle sensor type by itself. 2. if not, use smu common sensor to handle it. Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 68bb3c3ff9d92645488382c7261de7d477f638e9 Author: Dan Carpenter Date: Mon Jul 27 16:39:40 2020 +0300 drm/amd/powerplay: off by one bugs in smu_cmn_to_asic_specific_index() These tables have _COUNT number of elements so the comparisons should be >= instead of > to prevent reading one element beyond the end of the array. Fixes: 8264ee69f0d8 ("drm/amd/powerplay: drop unused code") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit a486bc3c50198a7e895eef5dc3d2a94cd6186e4f Author: Likun Gao Date: Fri Jul 24 17:24:08 2020 +0800 drm/amd/powerplay: update driver if file for sienna_cichlid Update sienna_cichlid driver if header and related files. Support new smu metrics for pre & postDS frequency. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit de273b73ca6aef31c64071b90b9c76cd9f47d5d1 Author: Changfeng Date: Fri Jul 24 13:15:10 2020 +0800 drm/amd/powerplay: drop unnecessary message support check(v2) Take back patch:drop unnecessary message support check Because the gpu reset fail problem on renoir can be fixed by: drm/amd/powerplay: skip invalid msg when smu set mp1 state It needs to remove SWSMU_CODE_LAYER_L1 in smu_cmn.h to guard a clear code layer. Signed-off-by: changfeng Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit bbf16f530cdf0e6f95e9954ca4aa7915cd3f1d99 Author: Boyuan Zhang Date: Thu Jul 23 22:34:22 2020 -0400 drm/amdgpu: update dec ring test for VCN 3.0 Signed-off-by: Boyuan Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit fa40a009001a30819097999d10cc3f51a0891564 Author: James Zhu Date: Thu Jul 23 11:07:52 2020 -0400 drm/amdgpu/jpeg3.0: remove extra asic type check jpeg ip block is already selected based on ASIC type during set_ip_blocks. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 3da0a2dfbd3a7ada2d8388775796edf12b2c7219 Author: Likun Gao Date: Thu Jul 23 15:26:27 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 518dcf959c68a33e61d78fec47a1d2a674d0120c Author: Likun Gao Date: Tue Jul 21 16:39:45 2020 +0800 drm/amd/powerplay: correct smu message for vf mode Set valid_in_vf to false for the message not support in vf mode on sienna cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ef69ab6aed16094b3d840d5863ae665f21fedf58 Author: Likun Gao Date: Tue Jul 21 13:13:39 2020 +0800 drm/amd/powerplay: add msg map for mode1 reset Mapping Mode1Reset message for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 2f32faec004319a609982859a2b47459ae838888 Author: Likun Gao Date: Tue Jul 21 14:01:53 2020 +0800 drm/amd/powerplay: skip invalid msg when smu set mp1 state Some asic may not support for some message of set mp1 state. If the return value of smu_send_smc_msg is -EINVAL, that means it failed to send msg to smc as it can not map an valid message for the ASIC. And with that case, smu_set_mp1_state should be skipped as those ASIC was in fact do not support for that. Signed-off-by: Likun Gao Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 3520b5e22809d1fe211a7375e7b220de85e383d7 Author: Kenneth Feng Date: Wed Jul 22 21:27:35 2020 +0800 drm/amd/powerplay: remove the dpm checking in the boot sequence It's not necessary to retrieve the power features status when the asic is booted up the first time. This patch can have the features enablement status still checked in suspend/resume case and removed from the first boot up sequence. Signed-off-by: Kenneth Feng Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit ffa453f05be1513a2a68df0bce530db0d13480de Author: Changfeng Date: Tue Jul 21 10:38:19 2020 +0800 Revert "drm/amd/powerplay: drop unnecessary message support check" The below 3 messages are not supported on Renoir SMU_MSG_PrepareMp1ForShutdown SMU_MSG_PrepareMp1ForUnload SMU_MSG_PrepareMp1ForReset It needs to revert patch: drm/amd/powerplay: drop unnecessary message support check to avoid set mp1 state fail during gpu reset on renoir. Signed-off-by: changfeng Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit ee10e06eb00c3b371fa17a13ee2adaee4254dd54 Author: Guchun Chen Date: Mon Jul 20 11:11:13 2020 +0800 drm/amdgpu: add printing after executing page reservation to eeprom This will tell users if the faulty page has been written to external eeprom device in dmesg log. Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ebfbd1c2ca02f1c1bc9f8f0a7783e71efb57e4cc Author: John Clements Date: Wed Jul 22 09:40:11 2020 +0800 drm/amdgpu: expand sienna chichlid reg access support Added dedicated 64bit reg read/write support Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 2342ef4e6021f5f7f2b3d4daa1ed6d1140b1378b Author: Colin Ian King Date: Fri Jul 10 09:37:58 2020 +0100 drm/amdgpu: fix spelling mistake "Falied" -> "Failed" There is a spelling mistake in a DRM_ERROR error message. Fix it. This got lost in a merge, restore the fix. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher (cherry picked from commit 4afaa61db9cf5250b5734c2531b226e7b3a3d691) commit 921d2597abfc05e303f08baa6ead8f9ab8a723e1 Merge: 7b4ea9456dd3f f3633c2683545 Author: Linus Torvalds Date: Thu Aug 6 12:59:31 2020 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "s390: - implement diag318 x86: - Report last CPU for debugging - Emulate smaller MAXPHYADDR in the guest than in the host - .noinstr and tracing fixes from Thomas - nested SVM page table switching optimization and fixes Generic: - Unify shadow MMU cache data structures across architectures" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (127 commits) KVM: SVM: Fix sev_pin_memory() error handling KVM: LAPIC: Set the TDCR settable bits KVM: x86: Specify max TDP level via kvm_configure_mmu() KVM: x86/mmu: Rename max_page_level to max_huge_page_level KVM: x86: Dynamically calculate TDP level from max level and MAXPHYADDR KVM: VXM: Remove temporary WARN on expected vs. actual EPTP level mismatch KVM: x86: Pull the PGD's level from the MMU instead of recalculating it KVM: VMX: Make vmx_load_mmu_pgd() static KVM: x86/mmu: Add separate helper for shadow NPT root page role calc KVM: VMX: Drop a duplicate declaration of construct_eptp() KVM: nSVM: Correctly set the shadow NPT root level in its MMU role KVM: Using macros instead of magic values MIPS: KVM: Fix build error caused by 'kvm_run' cleanup KVM: nSVM: remove nonsensical EXITINFO1 adjustment on nested NPF KVM: x86: Add a capability for GUEST_MAXPHYADDR < HOST_MAXPHYADDR support KVM: VMX: optimize #PF injection when MAXPHYADDR does not match KVM: VMX: Add guest physical address check in EPT violation and misconfig KVM: VMX: introduce vmx_need_pf_intercept KVM: x86: update exception bitmap on CPUID changes KVM: x86: rename update_bp_intercept to update_exception_bitmap ... commit 8912fd6a61d7474ea9b43be93f136034d28868d5 Author: Colin Ian King Date: Thu Aug 6 12:42:56 2020 +0100 net: hns3: fix spelling mistake "could'nt" -> "couldn't" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 7b4ea9456dd3f73238408126ab00f1d906963d81 Author: Linus Torvalds Date: Thu Aug 6 12:02:58 2020 -0700 Revert "x86/mm/64: Do not sync vmalloc/ioremap mappings" This reverts commit 8bb9bf242d1fee925636353807c511d54fde8986. It seems the vmalloc page tables aren't always preallocated in all situations, because Jason Donenfeld reports an oops with this commit: BUG: unable to handle page fault for address: ffffe8ffffd00608 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 0 P4D 0 Oops: 0000 [#1] PREEMPT SMP CPU: 2 PID: 22 Comm: kworker/2:0 Not tainted 5.8.0+ #154 RIP: process_one_work+0x2c/0x2d0 Code: 41 56 41 55 41 54 55 48 89 f5 53 48 89 fb 48 83 ec 08 48 8b 06 4c 8b 67 40 49 89 c6 45 30 f6 a8 04 b8 00 00 00 00 4c 0f 44 f0 <49> 8b 46 08 44 8b a8 00 01 05 Call Trace: worker_thread+0x4b/0x3b0 ? rescuer_thread+0x360/0x360 kthread+0x116/0x140 ? __kthread_create_worker+0x110/0x110 ret_from_fork+0x1f/0x30 CR2: ffffe8ffffd00608 and that page fault address is right in that vmalloc space, and we clearly don't have a PGD/P4D entry for it. Looking at the "Code:" line, the actual fault seems to come from the 'pwq->wq' dereference at the top of the process_one_work() function: struct pool_workqueue *pwq = get_work_pwq(work); struct worker_pool *pool = worker->pool; bool cpu_intensive = pwq->wq->flags & WQ_CPU_INTENSIVE; so 'struct pool_workqueue *pwq' is the allocation that hasn't been synchronized across CPUs. Just revert for now, while Joerg figures out the cause. Reported-and-bisected-by: Jason A. Donenfeld Acked-by: Ingo Molnar Acked-by: Joerg Roedel Signed-off-by: Linus Torvalds commit bb22d80b47d5dd641d09d31946c4be0f610f3f45 Author: Randy Dunlap Date: Fri Jul 17 16:36:40 2020 -0700 LSM: drop duplicated words in header file comments Drop the doubled words "the" and "and" in comments. Signed-off-by: Randy Dunlap Acked-by: Serge Hallyn Cc: linux-security-module@vger.kernel.org Signed-off-by: James Morris commit c9fecf505a3421752a598227f8ef895e97966c4b Author: Alexander A. Klimov Date: Sun Jul 5 23:45:12 2020 +0200 Replace HTTP links with HTTPS ones: security Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: John Johansen Signed-off-by: James Morris commit 6d2b84a4e5b954bd2587e06c29577256f59e0030 Merge: 4cec929370763 4fd5750af02ab Author: Linus Torvalds Date: Thu Aug 6 11:55:43 2020 -0700 Merge tag 'sched-fifo-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull sched/fifo updates from Ingo Molnar: "This adds the sched_set_fifo*() encapsulation APIs to remove static priority level knowledge from non-scheduler code. The three APIs for non-scheduler code to set SCHED_FIFO are: - sched_set_fifo() - sched_set_fifo_low() - sched_set_normal() These are two FIFO priority levels: default (high), and a 'low' priority level, plus sched_set_normal() to set the policy back to non-SCHED_FIFO. Since the changes affect a lot of non-scheduler code, we kept this in a separate tree" * tag 'sched-fifo-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) sched,tracing: Convert to sched_set_fifo() sched: Remove sched_set_*() return value sched: Remove sched_setscheduler*() EXPORTs sched,psi: Convert to sched_set_fifo_low() sched,rcutorture: Convert to sched_set_fifo_low() sched,rcuperf: Convert to sched_set_fifo_low() sched,locktorture: Convert to sched_set_fifo() sched,irq: Convert to sched_set_fifo() sched,watchdog: Convert to sched_set_fifo() sched,serial: Convert to sched_set_fifo() sched,powerclamp: Convert to sched_set_fifo() sched,ion: Convert to sched_set_normal() sched,powercap: Convert to sched_set_fifo*() sched,spi: Convert to sched_set_fifo*() sched,mmc: Convert to sched_set_fifo*() sched,ivtv: Convert to sched_set_fifo*() sched,drm/scheduler: Convert to sched_set_fifo*() sched,msm: Convert to sched_set_fifo*() sched,psci: Convert to sched_set_fifo*() sched,drbd: Convert to sched_set_fifo*() ... commit 4cec929370763c475111b1eb307df6759b6733e7 Merge: e3243e2a273d7 3db0d0c276a75 Author: Linus Torvalds Date: Thu Aug 6 11:35:57 2020 -0700 Merge tag 'integrity-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull integrity updates from Mimi Zohar: "The nicest change is the IMA policy rule checking. The other changes include allowing the kexec boot cmdline line measure policy rules to be defined in terms of the inode associated with the kexec kernel image, making the IMA_APPRAISE_BOOTPARAM, which governs the IMA appraise mode (log, fix, enforce), a runtime decision based on the secure boot mode of the system, and including errno in the audit log" * tag 'integrity-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: integrity: remove redundant initialization of variable ret ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime ima: AppArmor satisfies the audit rule requirements ima: Rename internal filter rule functions ima: Support additional conditionals in the KEXEC_CMDLINE hook function ima: Use the common function to detect LSM conditionals in a rule ima: Move comprehensive rule validation checks out of the token parser ima: Use correct type for the args_p member of ima_rule_entry.lsm elements ima: Shallow copy the args_p member of ima_rule_entry.lsm elements ima: Fail rule parsing when appraise_flag=blacklist is unsupportable ima: Fail rule parsing when the KEY_CHECK hook is combined with an invalid cond ima: Fail rule parsing when the KEXEC_CMDLINE hook is combined with an invalid cond ima: Fail rule parsing when buffer hook functions have an invalid action ima: Free the entire rule if it fails to parse ima: Free the entire rule when deleting a list of rules ima: Have the LSM free its audit rule IMA: Add audit log for failure conditions integrity: Add errno field in audit message commit e3243e2a273d79c69d821e27cd246089638c472a Merge: 1e21b5c73912a d05f94ad28c76 Author: Linus Torvalds Date: Thu Aug 6 11:34:35 2020 -0700 Merge branch 'for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux Pull coccinelle updates from Julia Lawall: "New semantic patches and semantic patch improvements from Denis Efremov" * 'for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/jlawall/linux: coccinelle: api: filter out memdup_user definitions coccinelle: api: extend memdup_user rule with vmemdup_user() coccinelle: api: extend memdup_user transformation with GFP_USER coccinelle: api: add kzfree script coccinelle: misc: add array_size_dup script to detect missed overflow checks coccinelle: api/kstrdup: fix coccinelle position coccinelle: api: add device_attr_show script commit 1e21b5c73912a516bb13aec0ff69205b0b33568f Merge: bfdd5aaa54b0a 5e4d46881f29a Author: Linus Torvalds Date: Thu Aug 6 11:33:20 2020 -0700 Merge tag 'livepatching-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching updates from Petr Mladek: "Improvements and cleanups of livepatching selftests" * tag 'livepatching-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: selftests/livepatch: adopt to newer sysctl error format selftests/livepatch: Use "comm" instead of "diff" for dmesg selftests/livepatch: add test delimiter to dmesg selftests/livepatch: refine dmesg 'taints' in dmesg comparison selftests/livepatch: Don't clear dmesg when running tests selftests/livepatch: fix mem leaks in test-klp-shadow-vars selftests/livepatch: more verification in test-klp-shadow-vars selftests/livepatch: rework test-klp-shadow-vars selftests/livepatch: simplify test-klp-callbacks busy target tests commit bfdd5aaa54b0a44d9df550fe4c9db7e1470a11b8 Merge: b62e419707ce0 42a2df3e829f3 Author: Linus Torvalds Date: Thu Aug 6 11:02:23 2020 -0700 Merge tag 'Smack-for-5.9' of git://github.com/cschaufler/smack-next Pull smack updates from Casey Schaufler: "Minor fixes to Smack for the v5.9 release. All were found by automated checkers and have straightforward resolution" * tag 'Smack-for-5.9' of git://github.com/cschaufler/smack-next: Smack: prevent underflow in smk_set_cipso() Smack: fix another vsscanf out of bounds Smack: fix use-after-free in smk_write_relabel_self() commit b62e419707ce082845c34161fe684d0c743b7953 Merge: 40ddad1913199 6c86a3029ce3b Author: Linus Torvalds Date: Thu Aug 6 10:54:07 2020 -0700 Merge tag 'mips_5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS upates from Thomas Bogendoerfer: - improvements for Loongson64 - extended ingenic support - removal of not maintained paravirt system type - cleanups and fixes * tag 'mips_5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (81 commits) MIPS: SGI-IP27: always enable NUMA in Kconfig MAINTAINERS: Update KVM/MIPS maintainers MIPS: Update default config file for Loongson-3 MIPS: KVM: Add kvm guest support for Loongson-3 dt-bindings: mips: Document Loongson kvm guest board MIPS: handle Loongson-specific GSExc exception MIPS: add definitions for Loongson-specific CP0.Diag1 register MIPS: only register FTLBPar exception handler for supported models MIPS: ingenic: Hardcode mem size for qi,lb60 board MIPS: DTS: ingenic/qi,lb60: Add model and memory node MIPS: ingenic: Use fw_passed_dtb even if CONFIG_BUILTIN_DTB MIPS: head.S: Init fw_passed_dtb to builtin DTB of: address: Fix parser address/size cells initialization of_address: Guard of_bus_pci_get_flags with CONFIG_PCI MIPS: DTS: Fix number of msi vectors for Loongson64G MIPS: Loongson64: Add ISA node for LS7A PCH MIPS: Loongson64: DTS: Fix ISA and PCI I/O ranges for RS780E PCH MIPS: Loongson64: Enlarge IO_SPACE_LIMIT MIPS: Loongson64: Process ISA Node in DeviceTree of_address: Add bus type match for pci ranges parser ... commit 40ddad19131999161c39564815b8df2faff0fc7c Merge: 2044513ffe4a9 918c950ca8b1a Author: Linus Torvalds Date: Thu Aug 6 10:17:00 2020 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - add arch/arm/Kbuild from Masahiro Yamada. - simplify act_mm macro, since it contains an open-coded get_thread_info. - VFP updates for Clang from Stefan Agner. - Fix unwinder for Clang from Nathan Huckleberry. - Remove unused it8152 PCI host controller, used by the removed cm-x2xx platforms from Mike Rapoport. - Further explanation of __range_ok(). - Remove kimage_voffset that isn't used anymore from Marc Zyngier. - Drop ancient Thumb-2 workaround for old binutils from Ard Biesheuvel. - Documentation cleanup for mach-* from Pete Zaitcev. * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8996/1: Documentation/Clean up the description of mach- ARM: 8995/1: drop Thumb-2 workaround for ancient binutils ARM: 8994/1: mm: drop kimage_voffset which was only used by KVM ARM: uaccess: add further explanation of __range_ok() ARM: 8993/1: remove it8152 PCI controller driver ARM: 8992/1: Fix unwind_frame for clang-built kernels ARM: 8991/1: use VFP assembler mnemonics if available ARM: 8990/1: use VFP assembler mnemonics in register load/store macros ARM: 8989/1: use .fpu assembler directives instead of assembler arguments ARM: 8982/1: mm: Simplify act_mm macro ARM: 8981/1: add arch/arm/Kbuild commit 2044513ffe4a9c18e6e2a64f048e05d8b62fa927 Merge: bbcf9cd157675 bdcd93ef9afb4 Author: Linus Torvalds Date: Thu Aug 6 10:15:28 2020 -0700 Merge tag 'csky-for-linus-5.9-rc1' of https://github.com/c-sky/csky-linux Pull arch/csky updates from Guo Ren: "New features: - seccomp-filter - err-injection - top-down&random mmap-layout - irq_work - show_ipi - context-tracking Fixes & Optimizations: - kprobe_on_ftrace - optimize panic print" * tag 'csky-for-linus-5.9-rc1' of https://github.com/c-sky/csky-linux: csky: Add context tracking support csky: Add arch_show_interrupts for IPI interrupts csky: Add irq_work support csky: Fixup warning by EXPORT_SYMBOL(kmap) csky: Set CONFIG_NR_CPU 4 as default csky: Use top-down mmap layout csky: Optimize the trap processing flow csky: Add support for function error injection csky: Fixup kprobes handler couldn't change pc csky: Fixup duplicated restore sp in RESTORE_REGS_FTRACE csky: Add cpu feature register hint for smp csky: Add SECCOMP_FILTER supported csky: remove unusued thread_saved_pc and *_segments functions/macros commit bbcf9cd1576752ebe8d618ad8c6500b7e262ffac Merge: 9ab9bc5115c9a a0fc1436f1f4f Author: Linus Torvalds Date: Thu Aug 6 10:07:40 2020 -0700 Merge tag 'xtensa-20200805' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa updates from Max Filippov: - add syscall audit support - add seccomp filter support - clean up make rules under arch/xtensa/boot - fix state management for exclusive access opcodes - fix build with PMU enabled * tag 'xtensa-20200805' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: add missing exclusive access state management xtensa: fix xtensa_pmu_setup prototype xtensa: add boot subdirectories build artifacts to 'targets' xtensa: add uImage and xipImage to targets xtensa: move vmlinux.bin[.gz] to boot subdirectory xtensa: initialize_mmu.h: fix a duplicated word selftests/seccomp: add xtensa support xtensa: add seccomp support xtensa: expose syscall through user_pt_regs xtensa: add audit support commit fec9008828cde0076aae595ac031bfcf49d335a4 Author: Mirko Dietrich Date: Thu Aug 6 14:48:50 2020 +0200 ALSA: usb-audio: Creative USB X-Fi Pro SB1095 volume knob support Adds an entry for Creative USB X-Fi to the rc_config array in mixer_quirks.c to allow use of volume knob on the device. Adds support for newer X-Fi Pro card, known as "Model No. SB1095" with USB ID "041e:3263" Signed-off-by: Mirko Dietrich Cc: Link: https://lore.kernel.org/r/20200806124850.20334-1-buzz@l4m1.de Signed-off-by: Takashi Iwai commit 9ab9bc5115c9a1a57ed83a143c601c31488eadd9 Merge: 47ec5303d73ea 7deff7b5b4395 Author: Linus Torvalds Date: Thu Aug 6 09:26:10 2020 -0700 Merge tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv updates from Wei Liu: - A patch series from Andrea to improve vmbus code - Two clean-up patches from Alexander and Randy * tag 'hyperv-next-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: hyperv: hyperv.h: drop a duplicated word tools: hv: change http to https in hv_kvp_daemon.c Drivers: hv: vmbus: Remove the lock field from the vmbus_channel struct scsi: storvsc: Introduce the per-storvsc_device spinlock Drivers: hv: vmbus: Remove unnecessary channel->lock critical sections (sc_list updaters) Drivers: hv: vmbus: Use channel_mutex in channel_vp_mapping_show() Drivers: hv: vmbus: Remove unnecessary channel->lock critical sections (sc_list readers) Drivers: hv: vmbus: Replace cpumask_test_cpu(, cpu_online_mask) with cpu_online() Drivers: hv: vmbus: Remove the numa_node field from the vmbus_channel struct Drivers: hv: vmbus: Remove the target_vp field from the vmbus_channel struct commit be9b54abd444c5f880f79e624362c2a986b0bf24 Author: Colin Ian King Date: Thu Aug 6 11:51:34 2020 +0100 ALSA: usb-audio: fix spelling mistake "buss" -> "bus" There is a spelling mistake in a usb_audio_dbg debug message. Also replace "param" with "parameter". Fix these. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200806105134.46447-1-colin.king@canonical.com Signed-off-by: Takashi Iwai commit b55b3fdce3e554a6bbe8f8ca6a01a892d720e64e Author: Bhupesh Sharma Date: Fri Jul 17 13:01:00 2020 +0530 hw_breakpoint: Remove unused __register_perf_hw_breakpoint() declaration Commit: b326e9560a28 ("hw-breakpoints: Use overflow handler instead of the event callback") removed __register_perf_hw_breakpoint() function usage and replaced it with register_perf_hw_breakpoint() function. Remove the left-over unused __register_perf_hw_breakpoint() declaration from as well. Signed-off-by: Bhupesh Sharma Signed-off-by: Ingo Molnar Acked-by: Mark Rutland Link: https://lore.kernel.org/r/1594971060-14180-1-git-send-email-bhsharma@redhat.com commit 09fc67b500c7f0bb1b5ed774197ac7f2c5285655 Author: Masami Hiramatsu Date: Fri Jul 17 17:42:55 2020 +0900 kprobes: Remove show_registers() function prototype Remove show_registers() function prototype because this function has been renamed by commit: 57da8b960b9a ("x86: Avoid double stack traces with show_regs()") and this commit has removed the caller in kprobes altogether: 80006dbee674 ("kprobes/x86: Remove jprobe implementation") So this doesn't exist anymore - remove the orphan prototype. Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar commit 055923bf6b48659755b5f0169e34107ee2cb9b68 Author: Alexander Aring Date: Mon Jul 27 09:13:38 2020 -0400 fs: dlm: implement tcp graceful shutdown During my code inspection I saw there is no implementation of a graceful shutdown for tcp. This patch will introduce a graceful shutdown for tcp connections. The shutdown is implemented synchronized as dlm_lowcomms_stop() is called to end all dlm communication. After shutdown is done, a lot of flush and closing functionality will be called. However I don't see a problem with that. The waitqueue for synchronize the shutdown has a timeout of 10 seconds, if timeout a force close will be exectued. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit ba3ab3ca68caafb7700c4abae357b7fb7538df11 Author: Alexander Aring Date: Mon Jul 27 09:13:37 2020 -0400 fs: dlm: change handling of reconnects This patch changes the handling of reconnects. At first we only close the connection related to the communication failure. If we get a new connection for an already existing connection we close the existing connection and take the new one. This patch improves significantly the stability of tcp connections while running "tcpkill -9 -i $IFACE port 21064" while generating a lot of dlm messages e.g. on a gfs2 mount with many files. My test setup shows that a deadlock is "more" unlikely. Before this patch I wasn't able to get not a deadlock after 5 seconds. After this patch my observation is that it's more likely to survive after 5 seconds and more, but still a deadlock occurs after certain time. My guess is that there are still "segments" inside the tcp writequeue or retransmit queue which get dropped when receiving a tcp reset [1]. Hard to reproduce because the right message need to be inside these queues, which might even be in the 5 first seconds with this patch. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv4/tcp_input.c?h=v5.8-rc6#n4122 Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 0ea47e4d2109efd61e9949d014b37ea835f20861 Author: Alexander Aring Date: Mon Jul 27 09:13:36 2020 -0400 fs: dlm: don't close socket on invalid message This patch doesn't close sockets when there is an invalid dlm message received. The connection will probably reconnect anyway so. To not close the connection will reduce the number of possible failtures. As we don't have a different strategy to react on such scenario just keep going the connection and ignore the message. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 9c9f168f5b145986535f727d259ef75f6ea26990 Author: Alexander Aring Date: Fri Jun 26 13:26:50 2020 -0400 fs: dlm: set skb mark per peer socket This patch adds support to set the skb mark value for the DLM tcp and sctp socket per peer. The mark value will be offered as per comm value of configfs. At creation time of the peer socket it will be set as socket option. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit a5b7ab6352bfaab6eec4df6618a135341d72c247 Author: Alexander Aring Date: Fri Jun 26 13:26:49 2020 -0400 fs: dlm: set skb mark for listen socket This patch adds support to set the skb mark value for the DLM listen tcp and sctp sockets. The mark value will be offered as cluster configuration. At creation time of the listen socket it will be set as socket option. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 84d1c617402e7e67fc95ab2384da8dae7d1b0efe Author: Alexander Aring Date: Fri Jun 26 13:26:48 2020 -0400 net: sock: add sock_set_mark This patch adds a new socket helper function to set the mark value for a kernel socket. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 0ffddafc3a3970ef7013696e7f36b3d378bc4c16 Author: Wang Hai Date: Mon Jun 15 11:25:33 2020 +0800 dlm: Fix kobject memleak Currently the error return path from kobject_init_and_add() is not followed by a call to kobject_put() - which means we are leaking the kobject. Set do_unreg = 1 before kobject_init_and_add() to ensure that kobject_put() can be called in its error patch. Fixes: 901195ed7f4b ("Kobject: change GFS2 to use kobject_init_and_add") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David Teigland commit 0099808553ad4f9c04ad7afd966f6d7f470f247f Author: Thomas Gleixner Date: Thu Jul 30 12:14:07 2020 +0200 x86: Select POSIX_CPU_TIMERS_TASK_WORK Move POSIX CPU timer expiry and signal delivery into task context. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Reviewed-by: Oleg Nesterov Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20200730102337.888613724@linutronix.de commit 1fb497dd003009be95ce67689ac800c446b7acc5 Author: Thomas Gleixner Date: Thu Jul 30 12:14:06 2020 +0200 posix-cpu-timers: Provide mechanisms to defer timer handling to task_work Running posix CPU timers in hard interrupt context has a few downsides: - For PREEMPT_RT it cannot work as the expiry code needs to take sighand lock, which is a 'sleeping spinlock' in RT. The original RT approach of offloading the posix CPU timer handling into a high priority thread was clumsy and provided no real benefit in general. - For fine grained accounting it's just wrong to run this in context of the timer interrupt because that way a process specific CPU time is accounted to the timer interrupt. - Long running timer interrupts caused by a large amount of expiring timers which can be created and armed by unpriviledged user space. There is no hard requirement to expire them in interrupt context. If the signal is targeted at the task itself then it won't be delivered before the task returns to user space anyway. If the signal is targeted at a supervisor process then it might be slightly delayed, but posix CPU timers are inaccurate anyway due to the fact that they are tied to the tick. Provide infrastructure to schedule task work which allows splitting the posix CPU timer code into a quick check in interrupt context and a thread context expiry and signal delivery function. This has to be enabled by architectures as it requires that the architecture specific KVM implementation handles pending task work before exiting to guest mode. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Reviewed-by: Oleg Nesterov Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20200730102337.783470146@linutronix.de commit 820903c784a01bf6e143253418508da4f5790cff Author: Thomas Gleixner Date: Thu Jul 30 12:14:05 2020 +0200 posix-cpu-timers: Split run_posix_cpu_timers() Split it up as a preparatory step to move the heavy lifting out of interrupt context. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Reviewed-by: Oleg Nesterov Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20200730102337.677439437@linutronix.de commit 0cd39f4600ed4de859383018eb10f0f724900e1b Author: Peter Zijlstra Date: Thu Aug 6 14:35:11 2020 +0200 locking/seqlock, headers: Untangle the spaghetti monster By using lockdep_assert_*() from seqlock.h, the spaghetti monster attacked. Attack back by reducing seqlock.h dependencies from two key high level headers: - : -Remove - : -Remove - : +Add The price was to add it to sched.h ... Core header fallout, we add direct header dependencies instead of gaining them parasitically from higher level headers: - : +Add - : +Add - : +Add - : +Add - : +Add - : +Add Arch headers fallout: - PARISC: : +Add - SH: : +Add - SPARC: : +Add - SPARC: : +Add , -Remove - X86: : +Add -Remove There's also a bunch of parasitic header dependency fallout in .c files, not listed separately. [ mingo: Extended the changelog, split up & fixed the original patch. ] Co-developed-by: Ingo Molnar Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200804133438.GK2674@hirez.programming.kicks-ass.net commit b3545192e2b4647234254c5122f8cbfddbcbdaa0 Author: Peter Zijlstra Date: Thu Aug 6 14:36:20 2020 +0200 locking, arch/ia64: Reduce header dependencies by moving XTP bits into the new header We want to remove the #include from , but for this we have to move the XTP bits into a separate header first (as these bits rely on definitions), and include them in the .c files that rely on those APIs. Co-developed-by: Ingo Molnar Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar commit 13c01139b17163c9b2aa543a9c39f8bbc875b625 Author: Ingo Molnar Date: Thu Aug 6 14:34:32 2020 +0200 x86/headers: Remove APIC headers from The APIC headers are relatively complex and bring in additional header dependencies - while smp.h is a relatively simple header included from high level headers. Remove the dependency and add in the missing #include's in .c files where they gained it indirectly before. Signed-off-by: Ingo Molnar commit f74441e6311a28f0ee89b9c8e296a33730f812fc Author: Jens Axboe Date: Wed Aug 5 13:00:44 2020 -0600 io_uring: account locked memory before potential error case The tear down path will always unaccount the memory, so ensure that we have accounted it before hitting any of them. Reported-by: Tomáš Chaloupka Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe commit d7aaeef293404bc41ea9d51c20a518945eb38366 Author: Guoqing Jiang Date: Thu Jul 30 11:13:58 2020 +0200 rnbd: no need to set bi_end_io in rnbd_bio_map_kern Since we always set bi_end_io after call rnbd_bio_map_kern, so the setting in rnbd_bio_map_kern is redundant. Signed-off-by: Guoqing Jiang Acked-by: Danil Kipnis Acked-by: Jack Wang Signed-off-by: Jens Axboe commit 735d77d4fd28bd47db9998a3744346302f8c1ee9 Author: Guoqing Jiang Date: Thu Jul 30 11:13:57 2020 +0200 rnbd: remove rnbd_dev_submit_io The function only has one caller, so let's open code it in process_rdma. Another bonus is we can avoid push/pop stack, since we need to pass 8 arguments to rnbd_dev_submit_io. Signed-off-by: Guoqing Jiang Acked-by: Danil Kipnis Acked-by: Jack Wang Signed-off-by: Jens Axboe commit bd74048108c179cea0ff52979506164c80f29da7 Author: Jens Axboe Date: Wed Aug 5 12:58:23 2020 -0600 io_uring: set ctx sq/cq entry count earlier If we hit an earlier error path in io_uring_create(), then we will have accounted memory, but not set ctx->{sq,cq}_entries yet. Then when the ring is torn down in error, we use those values to unaccount the memory. Ensure we set the ctx entries before we're able to hit a potential error path. Cc: stable@vger.kernel.org Reported-by: Tomáš Chaloupka Tested-by: Tomáš Chaloupka Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe commit 10de795a5addd1962406796a6e13ba6cc0fc6bee Author: Muchun Song Date: Thu Aug 6 01:20:46 2020 +0800 kprobes: Fix compiler warning for !CONFIG_KPROBES_ON_FTRACE Fix compiler warning(as show below) for !CONFIG_KPROBES_ON_FTRACE. kernel/kprobes.c: In function 'kill_kprobe': kernel/kprobes.c:1116:33: warning: statement with no effect [-Wunused-value] 1116 | #define disarm_kprobe_ftrace(p) (-ENODEV) | ^ kernel/kprobes.c:2154:3: note: in expansion of macro 'disarm_kprobe_ftrace' 2154 | disarm_kprobe_ftrace(p); Link: https://lore.kernel.org/r/20200805142136.0331f7ea@canb.auug.org.au Link: https://lkml.kernel.org/r/20200805172046.19066-1-songmuchun@bytedance.com Reported-by: Stephen Rothwell Fixes: 0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler") Acked-by: Masami Hiramatsu Acked-by: John Fastabend Signed-off-by: Muchun Song Signed-off-by: Steven Rostedt (VMware) commit 45fd22da97c6125d8d0d35bd1791e7c0c4175279 Author: Alexey Budankov Date: Wed Aug 5 10:56:56 2020 +0300 perf/core: Take over CAP_SYS_PTRACE creds to CAP_PERFMON capability Open access to per-process monitoring for CAP_PERFMON only privileged processes [1]. Extend ptrace_may_access() check in perf_events subsystem with perfmon_capable() to simplify user experience and make monitoring more secure by reducing attack surface. [1] https://lore.kernel.org/lkml/7776fa40-6c65-2aa6-1322-eb3a01201000@linux.intel.com/ Signed-off-by: Alexey Budankov Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/6e8392ff-4732-0012-2949-e1587709f0f6@linux.intel.com commit c0bde40ae0104c1fe13055b5e208053ea7729176 Author: Arnaldo Carvalho de Melo Date: Thu Aug 6 09:52:41 2020 -0300 tools headers API: Update close_range affected files To pick the changes from: 55db9c0e8534 ("net: remove compat_sys_{get,set}sockopt") 9b4feb630e8e ("arch: wire-up close_range()") That automagically add the 'close_range' syscall to tools such as 'perf trace'. Before: # perf trace -e close_range event syntax error: 'close_range' \___ 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 # After, system wide strace like tracing for this syscall: # perf trace -e close_range ^C# No calls, I need some test proggie :-) Cc: Adrian Hunter Cc: Christian Brauner Cc: Christoph Hellwig Cc: David S. Miller Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit e534bfb16415f826e6aa146b27cb071c1363e49a Author: Jiri Olsa Date: Wed Aug 5 11:34:44 2020 +0200 perf script: Add 'tod' field to display time of day Add a 'tod' field to display time of day column with time of date (wallclock) time. # perf record -k CLOCK_MONOTONIC kill kill: not enough arguments [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.033 MB perf.data (8 samples) ] # perf script perf 261340 152919.481538: 1 cycles: ffffffff8106d104 ... perf 261340 152919.481543: 1 cycles: ffffffff8106d104 ... perf 261340 152919.481545: 7 cycles: ffffffff8106d104 ... ... # perf script --ns perf 261340 152919.481538922: 1 cycles: ffffffff8106d ... perf 261340 152919.481543286: 1 cycles: ffffffff8106d ... perf 261340 152919.481545397: 7 cycles: ffffffff8106d ... ... # perf script -F+tod perf 261340 2020-07-13 18:26:55.620971 152919.481538: ... perf 261340 2020-07-13 18:26:55.620975 152919.481543: ... perf 261340 2020-07-13 18:26:55.620978 152919.481545: ... ... # perf script -F+tod --ns perf 261340 2020-07-13 18:26:55.620971621 152919.481538922: ... perf 261340 2020-07-13 18:26:55.620975985 152919.481543286: ... perf 261340 2020-07-13 18:26:55.620978096 152919.481545397: ... ... It's available only for recording with clockid specified, because it's the only case where we can get reference time to wallclock time. It's can't do that with perf clock yet. Error is display if you want to use --tod on data without clockid specified: # perf script -F+tod Can't provide 'tod' time, missing clock data. Please record with -k/--clockid option. Original-patch-by: David Ahern Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Geneviève Bastien Cc: Ian Rogers Cc: Jeremie Galarneau Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lore.kernel.org/lkml/20200805093444.314999-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 60e5eeb56a14ae101880886b0dec75b7b8e3a3e0 Author: Jiri Olsa Date: Wed Aug 5 11:34:43 2020 +0200 perf script: Change the 'enum perf_output_field' enumerators to be 64 bits So it's possible to add new values. I did not find any place where the enum values are passed through some number type, so it's safe to make this change. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Geneviève Bastien Cc: Ian Rogers Cc: Jeremie Galarneau Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lore.kernel.org/lkml/20200805093444.314999-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 88371c5898fc9e7c9faeb7f53ab9082b4e84b7a8 Author: Jiri Olsa Date: Wed Aug 5 11:34:42 2020 +0200 perf data: Add support to store time of day in CTF data conversion Adad support to convert and store time of day in CTF data conversion for 'perf data convert' subcommand. The perf.data used for conversion needs to have clock data information - must be recorded with -k/--clockid option). New --tod option is added to 'perf data convert' subcommand to convert data with timestamps converted to wall clock time. Record data with clockid set: # perf record -k CLOCK_MONOTONIC kill kill: not enough arguments [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.033 MB perf.data (8 samples) ] Convert data with TOD timestamps: # perf data convert --tod --to-ctf ./ctf [ perf data convert: Converted 'perf.data' into CTF data './ctf' ] [ perf data convert: Converted and wrote 0.000 MB (8 samples) ] Display data in perf script: # perf script -F+tod --ns perf 262150 2020-07-13 18:38:50.097678523 153633.958246159: 1 cycles: ... perf 262150 2020-07-13 18:38:50.097682941 153633.958250577: 1 cycles: ... perf 262150 2020-07-13 18:38:50.097684997 153633.958252633: 7 cycles: ... ... Display data in babeltrace: # babeltrace --clock-date ./ctf [2020-07-13 18:38:50.097678523] (+?.?????????) cycles: { cpu_id = 0 }, { perf_ip = 0xFFF ... [2020-07-13 18:38:50.097682941] (+0.000004418) cycles: { cpu_id = 0 }, { perf_ip = 0xFFF ... [2020-07-13 18:38:50.097684997] (+0.000002056) cycles: { cpu_id = 0 }, { perf_ip = 0xFFF ... ... It's available only for recording with clockid specified, because it's the only case where we can get reference time to wallclock time. It's can't do that with perf clock yet. Error is display if you want to use --tod on data without clockid specified: # perf data convert --tod --to-ctf ./ctf Can't provide --tod time, missing clock data. Please record with -k/--clockid option. Failed to setup CTF writer. Error during conversion setup. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Geneviève Bastien Cc: Ian Rogers Cc: Jeremie Galarneau Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lore.kernel.org/lkml/20200805093444.314999-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9d88a1a170edfc89cdb2ef9ca07e53d74359081e Author: Jiri Olsa Date: Wed Aug 5 11:34:41 2020 +0200 perf tools: Move clockid_res_ns under clock struct Move the clockid_res_ns struct member to the clock struct, so we have the clock related stuff in one place. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Geneviève Bastien Cc: Ian Rogers Cc: Jeremie Galarneau Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lore.kernel.org/lkml/20200805093444.314999-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d1e325cf40fec5fec9b18aa2b537de7e3680ef6c Author: Jiri Olsa Date: Wed Aug 5 11:34:40 2020 +0200 perf header: Store clock references for -k/--clockid option Add a new CLOCK_DATA feature that stores reference times when -k/--clockid option is specified. It contains the clock id and its reference time together with wall clock time taken at the 'same time', both values are in nanoseconds. The format of data is as below: struct { u32 version; /* version = 1 */ u32 clockid; u64 wall_clock_ns; u64 clockid_time_ns; }; This clock reference times will be used in following changes to display wall clock for perf events. It's available only for recording with clockid specified, because it's the only case where we can get reference time to wallclock time. It's can't do that with perf clock yet. Committer testing: $ perf record -h -k Usage: perf record [] [] or: perf record [] -- [] -k, --clockid clockid to use for events, see clock_gettime() $ perf record -k monotonic sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.017 MB perf.data (8 samples) ] $ perf report --header-only | grep clockid -A1 # event : name = cycles:u, , id = { 88815, 88816, 88817, 88818, 88819, 88820, 88821, 88822 }, size = 120, { sample_period, sample_freq } = 4000, sample_type = IP|TID|TIME|PERIOD, read_format = ID, disabled = 1, inherit = 1, exclude_kernel = 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, ksymbol = 1, bpf_event = 1, clockid = 1 # CPU_TOPOLOGY info available, use -I to display -- # clockid frequency: 1000 MHz # cpu pmu capabilities: branches=32, max_precise=3, pmu_name=skylake # clockid: monotonic (1) # reference time: 2020-08-06 09:40:21.619290 = 1596717621.619290 (TOD) = 21931.077673635 (monotonic) $ Original-patch-by: David Ahern Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Geneviève Bastien Cc: Ian Rogers Cc: Jeremie Galarneau Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lore.kernel.org/lkml/20200805093444.314999-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit cc3365bbd07c26aa2e4c7435068292e03116d4e7 Author: Jiri Olsa Date: Wed Aug 5 11:34:39 2020 +0200 perf tools: Add clockid_name function Add the clockid_name() function to get the clock name based on its clockid. It will be used in the following changes. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Geneviève Bastien Cc: Ian Rogers Cc: Jeremie Galarneau Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lore.kernel.org/lkml/20200805093444.314999-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6953beb4ddab87ad00029d8a11c1f985df09981e Author: Jiri Olsa Date: Wed Aug 5 11:34:38 2020 +0200 perf clockid: Move parse_clockid() to new clockid object Move parse_clockid and all needed clcckid related stuff into clockid object. We are going to add clockid_name function in following change, so it's better it's placed in separated object and not in builtin-record.c. No functional change is intended. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Geneviève Bastien Cc: Ian Rogers Cc: Jeremie Galarneau Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Wang Nan Link: http://lore.kernel.org/lkml/20200805093444.314999-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 7d65864b3b4fcc106d147f8a03bce7f8354f8984 Author: Tzvetomir Stoyanov (VMware) Date: Tue Jul 21 21:16:51 2020 -0400 tools lib traceevent: Handle possible strdup() error in tep_add_plugin_path() API Free allocated resources and return -1 in case strdup() fails in tep_add_plugin_path() API. Link: https://lore.kernel.org/r/CAM9d7chfvJwodpVrHGc5E2J80peRojmYV_fD8x3cpn9HFRUw2g@mail.gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200714103027.2477584-9-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200716092014.2613403-9-tz.stoyanov@gmail.com Suggested-by: Namhyung Kim Signed-off-by: Tzvetomir Stoyanov (VMware) Acked-by: Namhyung Kim Cc: Andrew Morton Cc: Jiri Olsa Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200722011755.720803193@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit db885ed481b33bb4b782ca9a76841bc9ec0e2d8f Author: Tzvetomir Stoyanov (VMware) Date: Tue Jul 21 21:16:50 2020 -0400 libtraceevent: Fixed description of tep_add_plugin_path() API Changed the description of tep_add_plugin_path() API to reflect the logic of the function. The suffix of plugin files is not hardcoded to ".so", it depends on the custom plugin loader callback. Link: https://lore.kernel.org/CAM9d7cgMgqFDvKhs6xwdBSMsaG=3ZG0RtxwgQDCTLGkML1MY4Q@mail.gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200714103027.2477584-8-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200716092014.2613403-8-tz.stoyanov@gmail.com Suggested-by: Namhyung Kim Signed-off-by: Tzvetomir Stoyanov (VMware) Acked-by: Namhyung Kim Cc: Andrew Morton Cc: Jiri Olsa Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200722011755.581468845@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 602e29fe078301e9832075009ac6e95c21fdf5d3 Author: Tzvetomir Stoyanov (VMware) Date: Tue Jul 21 21:16:49 2020 -0400 libtraceevent: Fixed type in PRINT_FMT_STING PRINT_FMT_STING -> PRINT_FMT_STRING Link: https://lore.kernel.org/r/CAM9d7cj1LJ=QO8QxhBo_oDM9APpAswX4BbTwge0JhZ3Y4-Bv9w@mail.gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200714103027.2477584-7-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200716092014.2613403-7-tz.stoyanov@gmail.com Suggested-by: Namhyung Kim Signed-off-by: Tzvetomir Stoyanov (VMware) Acked-by: Namhyung Kim Cc: Andrew Morton Cc: Jiri Olsa Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200722011755.442308322@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit d339a19a8784a4ee41d0a62d1b650d2dee6e05a0 Author: Tzvetomir Stoyanov (VMware) Date: Tue Jul 21 21:16:48 2020 -0400 libtraceevent: Fixed broken indentation in parse_ip4_print_args() Fixed the "break" indentation in a switch() inside parse_ip4_print_args() static function. Link: https://lore.kernel.org/r/CAM9d7cjboXGg+iMOA4BQo=E01iLGcJNB1MyPJ4doPP1XeGVJRA@mail.gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200714103027.2477584-6-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200716092014.2613403-6-tz.stoyanov@gmail.com Suggested-by: Namhyung Kim Signed-off-by: Tzvetomir Stoyanov (VMware) Acked-by: Namhyung Kim Cc: Andrew Morton Cc: Jiri Olsa Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200722011755.310486074@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit b796162bc4ee49d94b2cc59f98f6d32b5b517141 Author: Tzvetomir Stoyanov (VMware) Date: Tue Jul 21 21:16:47 2020 -0400 libtraceevent: Improve error handling of tep_plugin_add_option() API In case of memory error, ensure all allocated resources are freed. Do not append broken option in trace_plugin_options list. Link: https://lore.kernel.org/r/CAM9d7cizjF+fbK7YzmsBDgrx__4YAOsmEq67D3sWET8FF+YdFA@mail.gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200714103027.2477584-5-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200716092014.2613403-5-tz.stoyanov@gmail.com Suggested-by: Namhyung Kim Signed-off-by: Tzvetomir Stoyanov (VMware) Acked-by: Namhyung Kim Cc: Andrew Morton Cc: Jiri Olsa Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200722011755.158091410@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 7db6330dca8ffcc89b3d01300f4876d69ec884b7 Author: Tzvetomir Stoyanov (VMware) Date: Tue Jul 21 21:16:46 2020 -0400 libtraceevent: Fix typo in tep_plugin_add_option() description A typo "optiona" -> "optional" is fixed in description of tep_plugin_add_option() API. Link: https://lore.kernel.org/r/CAM9d7cizjF+fbK7YzmsBDgrx__4YAOsmEq67D3sWET8FF+YdFA@mail.gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200714103027.2477584-4-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200716092014.2613403-4-tz.stoyanov@gmail.com Suggested-by: Namhyung Kim Signed-off-by: Tzvetomir Stoyanov (VMware) Acked-by: Namhyung Kim Cc: Andrew Morton Cc: Jiri Olsa Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200722011755.014613924@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 058612a6f773824b6e53629855c3d811ce7906be Author: Tzvetomir Stoyanov (VMware) Date: Tue Jul 21 21:16:45 2020 -0400 libtraceevent: Handle strdup() error in parse_option_name() Modified internal function parse_option_name() to return error and handle that error in function callers in case strdup() fails. Link: https://lore.kernel.org/r/CAM9d7cizjF+fbK7YzmsBDgrx__4YAOsmEq67D3sWET8FF+YdFA@mail.gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200714103027.2477584-3-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200716092014.2613403-3-tz.stoyanov@gmail.com Suggested-by: Namhyung Kim Signed-off-by: Tzvetomir Stoyanov (VMware) Acked-by: Namhyung Kim Cc: Andrew Morton Cc: Jiri Olsa Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200722011754.869289038@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 9dc7dc75b179d341d246ce7a9b21e93ab3acd8f2 Author: Tzvetomir Stoyanov (VMware) Date: Tue Jul 21 21:16:44 2020 -0400 libtraceevent: Document tep_load_plugins_hook() Add description of tep_load_plugins_hook() traceevent API. Updated library man pages with description of the tep_load_plugins_hook() API. Link: https://lore.kernel.org/r/CAM9d7cgLBWCrEHwz+Lhv5x5EXGcNWB0QQoeGh3OKh2JfR=dV9Q@mail.gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200714103027.2477584-2-tz.stoyanov@gmail.com Link: https://lore.kernel.org/linux-trace-devel/20200716092014.2613403-2-tz.stoyanov@gmail.com Suggested-by: Namhyung Kim Signed-off-by: Tzvetomir Stoyanov (VMware) Acked-by: Namhyung Kim Cc: Andrew Morton Cc: Jiri Olsa Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200722011754.720060785@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 4b0297ef8a4ecd56ec105e49752d1378e4f8a2f4 Author: Alexey Budankov Date: Wed Aug 5 10:31:20 2020 +0300 perf evsel: Extend message to mention CAP_SYS_PTRACE and perf security doc link Adjust limited access message to mention CAP_SYS_PTRACE capability for processes of unprivileged users. Add link to perf security document in the end of the section about capabilities. The change has been inspired by this discussion: https://lore.kernel.org/lkml/20200722113007.GI77866@kernel.org/ Signed-off-by: Alexey Budankov Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/6f8a7425-6e7d-19aa-1605-e59836b9e2a6@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 347a7389a7cc9b91f80deb8d7043e9827d08b328 Author: Adrian Hunter Date: Fri Jul 10 18:11:04 2020 +0300 perf intel-pt: Add support for decoding PSB+ only A single q option decodes ip from only FUP/TIP packets. Make it so that repeating the q option (i.e. qq) decodes only PSB+, getting ip if there is a FUP packet within PSB+ (i.e. between PSB and PSBEND). Example: $ perf record -e intel_pt//u grep -rI pudding drivers [ perf record: Woken up 52 times to write data ] [ perf record: Captured and wrote 57.870 MB perf.data ] $ time perf script --itrace=bi | wc -l 58948289 real 1m23.863s user 1m23.251s sys 0m7.452s $ time perf script --itrace=biq | wc -l 3385694 real 0m4.453s user 0m4.455s sys 0m0.328s $ time perf script --itrace=biqq | wc -l 1883 real 0m0.047s user 0m0.043s sys 0m0.009s Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-13-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 7c1b16ba0e26e6802d80c99c92529f29bcdcea25 Author: Adrian Hunter Date: Fri Jul 10 18:11:03 2020 +0300 perf intel-pt: Add support for decoding FUP/TIP only Use the new itrace 'q' option to add support for a mode of decoding that ignores TNT, does not walk object code, but gets the ip from FUP and TIP packets. Example: $ perf record -e intel_pt//u grep -rI pudding drivers [ perf record: Woken up 52 times to write data ] [ perf record: Captured and wrote 57.870 MB perf.data ] $ time perf script --itrace=bi | wc -l 58948289 real 1m23.863s user 1m23.251s sys 0m7.452s $ time perf script --itrace=biq | wc -l 3385694 real 0m4.453s user 0m4.455s sys 0m0.328s Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f45882cfb152f5d3a421fd58f177f227e44843b9 Author: Evgeny Novikov Date: Thu Jul 23 19:46:51 2020 +0200 media: camss: fix memory leaks on error handling paths in probe camss_probe() does not free camss on error handling paths. The patch introduces an additional error label for this purpose. Besides, it removes call of v4l2_async_notifier_cleanup() from camss_of_parse_ports() since its caller, camss_probe(), cleans up all its resources itself. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Co-developed-by: Anton Vasilyev Signed-off-by: Anton Vasilyev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 51971536ef53478ec92cd9e8249048743169df22 Author: Adrian Hunter Date: Fri Jul 10 18:11:02 2020 +0300 perf auxtrace: Add itrace 'q' option for quicker, less detailed decoding The 'q' option is for modes of decoding that are quicker because they skip or omit decoding some aspects of trace data. If supported, the 'q' option may be repeated to increase the effect. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-11-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d4575f5fce71b47431a98096a9f74b7492854633 Author: Adrian Hunter Date: Fri Jul 10 18:11:01 2020 +0300 perf intel-pt: Time filter logged perf events Change the debug logging (when used with the --time option) to time filter logged perf events, but allow that to be overridden by using "d+a" instead of plain "d". That can reduce the size of the log file. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-10-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 8b83fccdd2fc91dfd6fc7ef6a804c1426f7a6216 Author: Adrian Hunter Date: Fri Jul 10 18:11:00 2020 +0300 perf intel-pt: Use itrace debug log flags to suppress some messages The "d" option may be followed by flags which affect what debug messages will or will not be logged. Each flag must be preceded by either '+' or '-'. The flags support by Intel PT are: -a Suppress logging of perf events Suppressing perf events is useful for decreasing the size of the log. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-9-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 935aac2d2dc42c6ea9f0143a57e8d57d976d5307 Author: Adrian Hunter Date: Fri Jul 10 18:10:59 2020 +0300 perf auxtrace: Add optional log flags to the itrace 'd' option Allow the 'd' option to be followed by flags which will affect what debug messages will or will not be reported. Each flag must be preceded by either '+' or '-'. The flags are: a all perf events Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-8-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1d846aeb86cc6e9db1cf08822404c95ecb8bd6c1 Author: Adrian Hunter Date: Fri Jul 10 18:10:58 2020 +0300 perf intel-pt: Use itrace error flags to suppress some errors The itrace "e" option may be followed by flags which affect what errors will or will not be reported. Each flag must be preceded by either '+' or '-'. The flags supported by Intel PT are: -o Suppress overflow errors -l Suppress trace data lost errors For example, for errors but not overflow or data lost errors: --itrace=e-o-l Suppressing those errors can be useful for testing and debugging because they are not due to decoding. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit cb971438b7daa986b599942987e8a4d78443ad58 Author: Adrian Hunter Date: Fri Jul 10 18:10:57 2020 +0300 perf auxtrace: Add optional error flags to the itrace 'e' option Allow the 'e' option to be followed by flags which will affect what errors will or will not be reported. Each flag must be preceded by either '+' or '-'. The flags are: o overflow l trace data lost Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-6-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1e8f786944418535543f1ddf10024789f1cf2ae4 Author: Adrian Hunter Date: Fri Jul 10 18:10:56 2020 +0300 perf auxtrace: Add missing itrace options to help text Add missing itrace options o, G and L. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-5-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2c9a11af84b19e42a8e51a3cac6e08efc546d281 Author: Adrian Hunter Date: Fri Jul 10 18:10:55 2020 +0300 perf tools: Improve aux_output not supported error For example: Before: $ perf record -e '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -- ls -l Error: branch-loads: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat' After: $ perf record -e '{intel_pt/branch=0/,branch-loads/aux-output/ppp}' -- ls -l Error: branch-loads: PMU Hardware doesn't support 'aux_output' feature Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20200710151104.15137-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a58a057ce65b52125dd355b7d8b0d540ea267a5f Author: Adrian Hunter Date: Fri Jul 10 18:10:54 2020 +0300 perf intel-pt: Fix duplicate branch after CBR CBR events can result in a duplicate branch event, because the state type defaults to a branch. Fix by clearing the state type. Example: trace 'sleep' and hope for a frequency change Before: $ perf record -e intel_pt//u sleep 0.1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.034 MB perf.data ] $ perf script --itrace=bpe > before.txt After: $ perf script --itrace=bpe > after.txt $ diff -u before.txt after.txt --- before.txt 2020-07-07 14:42:18.191508098 +0300 +++ after.txt 2020-07-07 14:42:36.587891753 +0300 @@ -29673,7 +29673,6 @@ sleep 93431 [007] 15411.619905: 1 branches:u: 0 [unknown] ([unknown]) => 7f0818abb2e0 clock_nanosleep@@GLIBC_2.17+0x0 (/usr/lib/x86_64-linux-gnu/libc-2.31.so) sleep 93431 [007] 15411.619905: 1 branches:u: 7f0818abb30c clock_nanosleep@@GLIBC_2.17+0x2c (/usr/lib/x86_64-linux-gnu/libc-2.31.so) => 0 [unknown] ([unknown]) sleep 93431 [007] 15411.720069: cbr: cbr: 15 freq: 1507 MHz ( 56%) 7f0818abb30c clock_nanosleep@@GLIBC_2.17+0x2c (/usr/lib/x86_64-linux-gnu/libc-2.31.so) - sleep 93431 [007] 15411.720069: 1 branches:u: 7f0818abb30c clock_nanosleep@@GLIBC_2.17+0x2c (/usr/lib/x86_64-linux-gnu/libc-2.31.so) => 0 [unknown] ([unknown]) sleep 93431 [007] 15411.720076: 1 branches:u: 0 [unknown] ([unknown]) => 7f0818abb30e clock_nanosleep@@GLIBC_2.17+0x2e (/usr/lib/x86_64-linux-gnu/libc-2.31.so) sleep 93431 [007] 15411.720077: 1 branches:u: 7f0818abb323 clock_nanosleep@@GLIBC_2.17+0x43 (/usr/lib/x86_64-linux-gnu/libc-2.31.so) => 7f0818ac0eb7 __nanosleep+0x17 (/usr/lib/x86_64-linux-gnu/libc-2.31.so) sleep 93431 [007] 15411.720077: 1 branches:u: 7f0818ac0ebf __nanosleep+0x1f (/usr/lib/x86_64-linux-gnu/libc-2.31.so) => 55cb7e4c2827 rpl_nanosleep+0x97 (/usr/bin/sleep) Fixes: 91de8684f1cff ("perf intel-pt: Cater for CBR change in PSB+") Fixes: abe5a1d3e4bee ("perf intel-pt: Decoder to output CBR changes immediately") Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20200710151104.15137-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 401136bb084fd021acd9f8c51b52fe0a25e326b2 Author: Adrian Hunter Date: Fri Jul 10 18:10:53 2020 +0300 perf intel-pt: Fix FUP packet state While walking code towards a FUP ip, the packet state is INTEL_PT_STATE_FUP or INTEL_PT_STATE_FUP_NO_TIP. That was mishandled resulting in the state becoming INTEL_PT_STATE_IN_SYNC prematurely. The result was an occasional lost EXSTOP event. Signed-off-by: Adrian Hunter Reviewed-by: Andi Kleen Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20200710151104.15137-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 94fb1afb14c4f0ceb8c5508ddddac6819f662e95 Merge: c4735d9902683 47ec5303d73ea Author: Arnaldo Carvalho de Melo Date: Thu Aug 6 08:15:47 2020 -0300 Mgerge remote-tracking branch 'torvalds/master' into perf/core To sync headers, for instance, in this case tools/perf was ahead of upstream till Linus merged tip/perf/core to get the PERF_RECORD_TEXT_POKE changes: Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h' diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h Signed-off-by: Arnaldo Carvalho de Melo commit 602649eadaa0c977e362e641f51ec306bc1d365d Author: Evgeny Novikov Date: Thu Jul 23 19:04:53 2020 +0200 media: davinci: vpif_capture: fix potential double free In case of errors vpif_probe_complete() releases memory for vpif_obj.sd and unregisters the V4L2 device. But then this is done again by vpif_probe() itself. The patch removes the cleaning from vpif_probe_complete(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 670f7ef5f0fccd5b6dd7da80a0f7ec6b6cf9aafa Author: Colin Ian King Date: Wed Jul 22 17:16:30 2020 +0200 media: radio: remove redundant assignment to variable retval The variable retval is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 04320b3ef90bef04df6672e3a98a266b88c35b55 Author: Colin Ian King Date: Wed Jul 22 15:09:03 2020 +0200 media: allegro: fix potential null dereference on header The pointer header is an alias to msg and msg is being null checked. However, if msg is null then header is also null and this can lead to a null pointer dereference on the assignment type = header->type. Fix this just using header->type after the null check and removing the need for type as it is only used once. Addresses-Coverity: ("Dereference before null check") Fixes: 3de16839669f ("media: allegro: add explicit mail encoding and decoding") Signed-off-by: Colin Ian King Reviewed-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dd4eddc4ba31fbf4554fc5fa12d3a553b50e1469 Author: Dan Carpenter Date: Wed Jul 22 14:39:14 2020 +0200 media: mtk-mdp: Fix a refcounting bug on error in init We need to call of_node_put(comp->dev_node); on the error paths in this function. Fixes: c8eb2d7e8202 ("[media] media: Add Mediatek MDP Driver") Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9bde425e70b6d6b49f3206a1d3817bccb92a893d Author: Dan Carpenter Date: Wed Jul 22 14:38:48 2020 +0200 media: allegro: fix an error pointer vs NULL check The allegro_mbox_init() function returns error pointers, it never returns NULL. Fixes: 94dc76560261 ("media: allegro: rework mbox handling") Signed-off-by: Dan Carpenter Reviewed-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 43663dc4f4300e6a4ff4dade9a17cef42e79232c Author: Hans Verkuil Date: Tue Jul 21 23:32:29 2020 +0200 media: meye: fix missing pm_mchip_mode field After commit 9c4a8489ab7c ("media: meye: use generic power management") the pm_mchip_mode field should now always be present, even if CONFIG_PM is not set. Signed-off-by: Hans Verkuil Reported-by: kernel test robot Fixes: 9c4a8489ab7c ("media: meye: use generic power management") Signed-off-by: Mauro Carvalho Chehab commit e3083c3f369700cd1eec3de93b8d8ec0918ff778 Author: Vaibhav Gupta Date: Tue Jul 21 06:47:45 2020 +0200 media: cafe-driver: use generic power management Drivers using legacy PM have to manage PCI states and device's PM states themselves. They also need to take care of configuration registers. With improved and powerful support of generic PM, PCI Core takes care of above mentioned, device-independent, jobs. This driver makes use of PCI helper functions like pci_save/restore_state() and pci_enable/disable_device() to do required operations. In generic mode, they are no longer needed. Change function parameter in both .suspend() and .resume() to "struct device*" type. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7aa87db5b81b0281c7493ab58e4f702525e85fe4 Author: Vaibhav Gupta Date: Mon Jul 20 12:27:01 2020 +0200 media: saa7164: use generic power management The .suspend() and .resume() callbacks are not defined for this driver. Still, their power management structure follows the legacy framework. To bring it under the generic framework, simply remove the binding of callbacks from struct "pci_driver". Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d20dcbb2ba45d8b7fa4a9cd67af8b42f1968e4a7 Author: Jian-Jia Su Date: Mon Jul 20 11:29:33 2020 +0200 media: v4l2-dev/ioctl: Fix document for VIDIOC_QUERYCAP V4L2_CAP_VIDEO_M2M is documented as 0x00004000 V4L2_CAP_VIDEO_M2M_MPLANE is documented as 0x00008000 This is different from the definition in include/uapi/linux/videodev2.h Signed-off-by: Jian-Jia Su Reviewed-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f501169842c1626bf298b9bf497bf084635c6df Author: Colton Lewis Date: Sun Jul 19 23:16:24 2020 +0200 media: v4l2: Correct kernel-doc inconsistency Silence documentation build warnings by correcting kernel-doc comment v4l2_subdev_get_fwnode_pad_1_to_1 function ./include/media/v4l2-subdev.h:1045: warning: Function parameter or member 'entity' not described in 'v4l2_subdev_get_fwnode_pad_1_to_1' ./include/media/v4l2-subdev.h:1045: warning: Function parameter or member 'endpoint' not described in 'v4l2_subdev_get_fwnode_pad_1_to_1' Signed-off-by: Colton Lewis Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6d10fc2b9bfeb34756c9f2bda135aa56105118d9 Author: Colton Lewis Date: Sun Jul 19 23:16:16 2020 +0200 media: v4l2: Correct kernel-doc inconsistency Silence documentation build warnings by correcting kernel-doc comment v4l2_create_fwnode_links_to_pad and v4l2_create_fwnode_links functions. ./include/media/v4l2-mc.h:110: warning: Function parameter or member 'src_sd' not described in 'v4l2_create_fwnode_links_to_pad' ./include/media/v4l2-mc.h:110: warning: Function parameter or member 'sink' not described in 'v4l2_create_fwnode_links_to_pad' ./include/media/v4l2-mc.h:134: warning: Function parameter or member 'src_sd' not described in 'v4l2_create_fwnode_links' ./include/media/v4l2-mc.h:134: warning: Function parameter or member 'sink_sd' not described in 'v4l2_create_fwnode_links' Signed-off-by: Colton Lewis Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d60d7de3e16d7cea998bad17d87366a359625894 Author: Sven Schnelle Date: Tue Aug 4 17:01:22 2020 +0200 lib/vdso: Allow to add architecture-specific vdso data The initial assumption that all VDSO related data can be completely generic does not hold. S390 needs architecture specific storage to access the clock steering information. Add struct arch_vdso_data to the vdso data struct. For architectures which do not need extra data this defaults to an empty struct. Architectures which require it, enable CONFIG_ARCH_HAS_VDSO_DATA and provide their specific struct in asm/vdso/data.h. Signed-off-by: Sven Schnelle Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200804150124.41692-2-svens@linux.ibm.com commit 19d0070a2792181f79df01277fe00b83b9f7eda7 Author: Thomas Gleixner Date: Tue Aug 4 17:01:23 2020 +0200 timekeeping/vsyscall: Provide vdso_update_begin/end() Architectures can have the requirement to add additional architecture specific data to the VDSO data page which needs to be updated independent of the timekeeper updates. To protect these updates vs. concurrent readers and a conflicting update through timekeeping, provide helper functions to make such updates safe. vdso_update_begin() takes the timekeeper_lock to protect against a potential update from timekeeper code and increments the VDSO sequence count to signal data inconsistency to concurrent readers. vdso_update_end() makes the sequence count even again to signal data consistency and drops the timekeeper lock. [ Sven: Add interrupt disable handling to the functions ] Signed-off-by: Thomas Gleixner Signed-off-by: Sven Schnelle Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200804150124.41692-3-svens@linux.ibm.com commit 4c5a116ada953b86125ab7c70a57c57463a55a55 Author: Thomas Gleixner Date: Tue Aug 4 22:37:48 2020 +0200 vdso/treewide: Add vdso_data pointer argument to __arch_get_hw_counter() MIPS already uses and S390 will need the vdso data pointer in __arch_get_hw_counter(). This works nicely as long as the architecture does not support time namespaces in the VDSO. With time namespaces enabled the regular accessor to the vdso data pointer __arch_get_vdso_data() will return the namespace specific VDSO data page for tasks which are part of a non-root time namespace. This would cause the architectures which need the vdso data pointer in __arch_get_hw_counter() to access the wrong vdso data page. Add a vdso_data pointer argument to __arch_get_hw_counter() and hand it in from the call sites in the core code. For architectures which do not need the data pointer in their counter accessor function the compiler will just optimize it out. Fix up all existing architecture implementations and make MIPS utilize the pointer instead of invoking the accessor function. No functional change and no change in the resulting object code (except MIPS). Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/draft-87wo2ekuzn.fsf@nanos.tec.linutronix.de commit a703f3633ff1d982bc4adfe7e0921bedb1701216 Merge: a7ef9b28aa8d7 b5e6a027bd327 Author: Ingo Molnar Date: Thu Aug 6 10:16:38 2020 +0200 Merge branch 'WIP.locking/seqlocks' into locking/urgent Pick up the full seqlock series PeterZ is working on. Signed-off-by: Ingo Molnar commit a1bd06853ee478d37fae9435c5521e301de94c67 Author: Phil Auld Date: Wed Aug 5 16:31:38 2020 -0400 sched: Fix use of count for nr_running tracepoint The count field is meant to tell if an update to nr_running is an add or a subtract. Make it do so by adding the missing minus sign. Fixes: 9d246053a691 ("sched: Add a tracepoint to track rq->nr_running") Signed-off-by: Phil Auld Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200805203138.1411-1-pauld@redhat.com commit c7fabbc51352f50cc58242a6dc3b9c1a3599849b Author: Randy Dunlap Date: Wed Aug 5 19:19:26 2020 -0700 ALSA: pci: delete repeated words in comments Drop duplicated words in sound/pci/. {and, the, at} Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20200806021926.32418-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai commit c7293858131c3f52d6a18321553c4650bf57462a Author: Randy Dunlap Date: Wed Aug 5 19:19:16 2020 -0700 ALSA: isa: delete repeated words in comments Drop duplicated words in sound/isa/. {be, bit} Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20200806021916.32369-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai commit c1d2c7d47e15482bb23cda83a5021e60f624a09c Author: Alex Zhuravlev Date: Fri Jun 19 22:08:56 2020 -0400 ext4: skip non-loaded groups at cr=0/1 when scanning for good groups cr=0 is supposed to be an optimization to save CPU cycles, but if buddy data (in memory) is not initialized then all this makes no sense as we have to do sync IO taking a lot of cycles. Also, at cr=0 mballoc doesn't choose any available chunk. cr=1 also skips groups using heuristic based on avg. fragment size. It's more useful to skip such groups and switch to cr=2 where groups will be scanned for available chunks. However, we always read the first block group in a flex_bg so metadata blocks will get read into the first flex_bg if possible. Using sparse image and dm-slow virtual device of 120TB was simulated, then the image was formatted and filled using debugfs to mark ~85% of available space as busy. mount process w/o the patch couldn't complete in half an hour (according to vmstat it would take ~10-11 hours). With the patch applied mount took ~20 seconds. Lustre-bug-id: https://jira.whamcloud.com/browse/LU-12988 Signed-off-by: Alex Zhuravlev Reviewed-by: Andreas Dilger Reviewed-by: Artem Blagodarenko commit cfd73237722135807967f389bcbda558a60a30d6 Author: Alex Zhuravlev Date: Tue Apr 21 10:54:07 2020 +0300 ext4: add prefetching for block allocation bitmaps This should significantly improve bitmap loading, especially for flex groups as it tries to load all bitmaps within a flex.group instead of one by one synchronously. Prefetching is done in 8 * flex_bg groups, so it should be 8 read-ahead reads for a single allocating thread. At the end of allocation the thread waits for read-ahead completion and initializes buddy information so that read-aheads are not lost in case of memory pressure. At cr=0 the number of prefetching IOs is limited per allocation context to prevent a situation when mballoc loads thousands of bitmaps looking for a perfect group and ignoring groups with good chunks. Together with the patch "ext4: limit scanning of uninitialized groups" the mount time (which includes few tiny allocations) of a 1PB filesystem is reduced significantly: 0% full 50%-full unpatched patched mount time 33s 9279s 563s [ Restructured by tytso; removed the state flags in the allocation context, so it can be used to lazily prefetch the allocation bitmaps immediately after the file system is mounted. Skip prefetching block groups which are uninitialized. Finally pass in the REQ_RAHEAD flag to the block layer while prefetching. ] Signed-off-by: Alex Zhuravlev Reviewed-by: Andreas Dilger Signed-off-by: Theodore Ts'o commit 273108fa5015eeffc4bacfa5ce272af3434b96e4 Author: Lukas Czerner Date: Fri Jul 17 11:06:05 2020 +0200 ext4: handle read only external journal device Ext4 uses blkdev_get_by_dev() to get the block_device for journal device which does check to see if the read-only block device was opened read-only. As a result ext4 will hapily proceed mounting the file system with external journal on read-only device. This is bad as we would not be able to use the journal leading to errors later on. Instead of simply failing to mount file system in this case, treat it in a similar way we treat internal journal on read-only device. Allow to mount with -o noload in read-only mode. This can be reproduced easily like this: mke2fs -F -O journal_dev $JOURNAL_DEV 100M mkfs.$FSTYPE -F -J device=$JOURNAL_DEV $FS_DEV blockdev --setro $JOURNAL_DEV mount $FS_DEV $MNT touch $MNT/file umount $MNT leading to error like this [ 1307.318713] ------------[ cut here ]------------ [ 1307.323362] generic_make_request: Trying to write to read-only block-device dm-2 (partno 0) [ 1307.331741] WARNING: CPU: 36 PID: 3224 at block/blk-core.c:855 generic_make_request_checks+0x2c3/0x580 [ 1307.341041] Modules linked in: ext4 mbcache jbd2 rfkill intel_rapl_msr intel_rapl_common isst_if_commd [ 1307.419445] CPU: 36 PID: 3224 Comm: jbd2/dm-2 Tainted: G W I 5.8.0-rc5 #2 [ 1307.427359] Hardware name: Dell Inc. PowerEdge R740/01KPX8, BIOS 2.3.10 08/15/2019 [ 1307.434932] RIP: 0010:generic_make_request_checks+0x2c3/0x580 [ 1307.440676] Code: 94 03 00 00 48 89 df 48 8d 74 24 08 c6 05 cf 2b 18 01 01 e8 7f a4 ff ff 48 c7 c7 50e [ 1307.459420] RSP: 0018:ffffc0d70eb5fb48 EFLAGS: 00010286 [ 1307.464646] RAX: 0000000000000000 RBX: ffff9b33b2978300 RCX: 0000000000000000 [ 1307.471780] RDX: ffff9b33e12a81e0 RSI: ffff9b33e1298000 RDI: ffff9b33e1298000 [ 1307.478913] RBP: ffff9b7b9679e0c0 R08: 0000000000000837 R09: 0000000000000024 [ 1307.486044] R10: 0000000000000000 R11: ffffc0d70eb5f9f0 R12: 0000000000000400 [ 1307.493177] R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000000 [ 1307.500308] FS: 0000000000000000(0000) GS:ffff9b33e1280000(0000) knlGS:0000000000000000 [ 1307.508396] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1307.514142] CR2: 000055eaf4109000 CR3: 0000003dee40a006 CR4: 00000000007606e0 [ 1307.521273] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1307.528407] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1307.535538] PKRU: 55555554 [ 1307.538250] Call Trace: [ 1307.540708] generic_make_request+0x30/0x340 [ 1307.544985] submit_bio+0x43/0x190 [ 1307.548393] ? bio_add_page+0x62/0x90 [ 1307.552068] submit_bh_wbc+0x16a/0x190 [ 1307.555833] jbd2_write_superblock+0xec/0x200 [jbd2] [ 1307.560803] jbd2_journal_update_sb_log_tail+0x65/0xc0 [jbd2] [ 1307.566557] jbd2_journal_commit_transaction+0x2ae/0x1860 [jbd2] [ 1307.572566] ? check_preempt_curr+0x7a/0x90 [ 1307.576756] ? update_curr+0xe1/0x1d0 [ 1307.580421] ? account_entity_dequeue+0x7b/0xb0 [ 1307.584955] ? newidle_balance+0x231/0x3d0 [ 1307.589056] ? __switch_to_asm+0x42/0x70 [ 1307.592986] ? __switch_to_asm+0x36/0x70 [ 1307.596918] ? lock_timer_base+0x67/0x80 [ 1307.600851] kjournald2+0xbd/0x270 [jbd2] [ 1307.604873] ? finish_wait+0x80/0x80 [ 1307.608460] ? commit_timeout+0x10/0x10 [jbd2] [ 1307.612915] kthread+0x114/0x130 [ 1307.616152] ? kthread_park+0x80/0x80 [ 1307.619816] ret_from_fork+0x22/0x30 [ 1307.623400] ---[ end trace 27490236265b1630 ]--- Signed-off-by: Lukas Czerner Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20200717090605.2612-1-lczerner@redhat.com Signed-off-by: Theodore Ts'o commit 3cb77bd241a48c54bca7bd8510516939264944c5 Author: brookxu Date: Wed Jul 15 11:00:44 2020 +0800 ext4: fix spelling typos in ext4_mb_initialize_context Fix spelling typos in ext4_mb_initialize_context. Signed-off-by: Chunguang Xu Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/883b523c-58ec-7f38-0bb8-cd2ea4393684@gmail.com Signed-off-by: Theodore Ts'o commit cb29a02d3a9d51c749f556b3bbf6551fbc0454eb Author: Eric Biggers Date: Tue Jul 14 16:09:09 2020 -0700 ext4: use generic names for generic ioctls Don't define EXT4_IOC_* aliases to ioctls that already have a generic FS_IOC_* name. These aliases are unnecessary, and they make it unclear which ioctls are ext4-specific and which are generic. Exception: leave EXT4_IOC_GETVERSION_OLD and EXT4_IOC_SETVERSION_OLD as-is for now, since renaming them to FS_IOC_GETVERSION and FS_IOC_SETVERSION would probably make them more likely to be confused with EXT4_IOC_GETVERSION and EXT4_IOC_SETVERSION which also exist. Signed-off-by: Eric Biggers Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200714230909.56349-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 2a12e147da38807f8aab03c92de99a70ab983a96 Author: Eric Biggers Date: Sun Jul 12 20:10:12 2020 -0700 ext4: don't hardcode bit values in EXT4_FL_USER_* Define the EXT4_FL_USER_* constants by OR-ing together the appropriate flags, rather than hard-coding a numeric value. This makes it much easier to see which flags are listed. No change in the actual values. Signed-off-by: Eric Biggers Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200713031012.192440-1-ebiggers@kernel.org Signed-off-by: Theodore Ts'o commit 11215630aada28307ba555a43138db6ac54fa825 Author: Jan Kara Date: Fri Jul 10 16:07:59 2020 +0200 ext4: don't BUG on inconsistent journal feature A customer has reported a BUG_ON in ext4_clear_journal_err() hitting during an LTP testing. Either this has been caused by a test setup issue where the filesystem was being overwritten while LTP was mounting it or the journal replay has overwritten the superblock with invalid data. In either case it is preferable we don't take the machine down with a BUG_ON. So handle the situation of unexpectedly missing has_journal feature more gracefully. We issue warning and fail the mount in the cases where the race window is narrow and the failed check is most likely a programming error. In cases where fs corruption is more likely, we do full ext4_error() handling before failing mount / remount. Reviewed-by: Lukas Czerner Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20200710140759.18031-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 0b3171b6d195637f84ddf8b59bae818ea20bc8ac Author: Jan Kara Date: Wed Jul 8 17:35:16 2020 +0200 ext4: do not block RWF_NOWAIT dio write on unallocated space Since commit 378f32bab371 ("ext4: introduce direct I/O write using iomap infrastructure") we don't properly bail out of RWF_NOWAIT direct IO write if underlying blocks are not allocated. Also ext4_dio_write_checks() does not honor RWF_NOWAIT when re-acquiring i_rwsem. Fix both issues. Fixes: 378f32bab371 ("ext4: introduce direct I/O write using iomap infrastructure") Cc: stable@kernel.org Reported-by: Filipe Manana Signed-off-by: Jan Kara Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200708153516.9507-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit e65bf6e468c39a60c1dfae439198ad875bb8a870 Author: Alexander A. Klimov Date: Mon Jul 6 21:03:39 2020 +0200 ext4: replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200706190339.20709-1-grandmaster@al2klimov.de Signed-off-by: Theodore Ts'o commit e5f78159d62f79eb7923561275290b7c95e7f03f Author: Yi Zhuang Date: Mon Jun 29 20:26:21 2020 +0800 ext4: lost matching-pair of trace in ext4_unlink If dquot_initialize() return non-zero and trace of ext4_unlink_enter/exit enabled then the matching-pair of trace_exit will lost in log. Signed-off-by: Yi Zhuang Reviewed-by: Andreas Dilger Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200629122621.129953-1-zhuangyi1@huawei.com Signed-off-by: Theodore Ts'o commit 9a5d265fed014115f35e598022c956e5d2fb863e Author: zhengliang Date: Wed Jul 1 16:30:27 2020 +0800 ext4: lost matching-pair of trace in ext4_truncate It should call trace exit in all return path for ext4_truncate. Signed-off-by: zhengliang Reviewed-by: Andreas Dilger Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20200701083027.45996-1-zhengliang6@huawei.com Signed-off-by: Theodore Ts'o commit ef3f5830b859604eda8723c26d90ab23edc027a4 Author: zhangyi (F) Date: Sat Jun 20 14:19:48 2020 +0800 jbd2: add the missing unlock_buffer() in the error path of jbd2_write_superblock() jbd2_write_superblock() is under the buffer lock of journal superblock before ending that superblock write, so add a missing unlock_buffer() in in the error path before submitting buffer. Fixes: 742b06b5628f ("jbd2: check superblock mapped prior to committing") Signed-off-by: zhangyi (F) Reviewed-by: Ritesh Harjani Cc: stable@kernel.org Link: https://lore.kernel.org/r/20200620061948.2049579-1-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 5872331b3d91820e14716632ebb56b1399b34fe1 Author: Eric Sandeen Date: Wed Jun 17 14:19:04 2020 -0500 ext4: fix potential negative array index in do_split() If for any reason a directory passed to do_split() does not have enough active entries to exceed half the size of the block, we can end up iterating over all "count" entries without finding a split point. In this case, count == move, and split will be zero, and we will attempt a negative index into map[]. Guard against this by detecting this case, and falling back to split-to-half-of-count instead; in this case we will still have plenty of space (> half blocksize) in each split block. Fixes: ef2b02d3e617 ("ext34: ensure do_split leaves enough free space in both blocks") Signed-off-by: Eric Sandeen Reviewed-by: Andreas Dilger Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/f53e246b-647c-64bb-16ec-135383c70ad7@redhat.com Signed-off-by: Theodore Ts'o commit 24dc9864914eb5813173cfa53313fcd02e4aea7d Author: Lukas Czerner Date: Wed Jun 17 11:25:49 2020 +0200 jbd2: make sure jh have b_transaction set in refile/unfile_buffer Callers of __jbd2_journal_unfile_buffer() and __jbd2_journal_refile_buffer() assume that the b_transaction is set. In fact if it's not, we can end up with journal_head refcounting errors leading to crash much later that might be very hard to track down. Add asserts to make sure that is the case. We also make sure that b_next_transaction is NULL in __jbd2_journal_unfile_buffer() since the callers expect that as well and we should not get into that stage in this state anyway, leading to problems later on if we do. Tested with fstests. Signed-off-by: Lukas Czerner Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200617092549.6712-1-lczerner@redhat.com Signed-off-by: Theodore Ts'o commit e030a28810daf48b43ef6e92fa502ae410b12c8c Author: Dio Putra Date: Sun Jun 14 11:45:44 2020 +0700 ext4: fix coding style in file.c Fixed a few coding style issues in file.c Signed-off-by: Dio Putra Link: https://lore.kernel.org/r/239fcd8f-d33f-8621-9e82-0416dd3f9c94@gmail.com Signed-off-by: Theodore Ts'o commit e0f49d270d9d04beec113aa7cfacac6bddcb5765 Author: Markus Elfring Date: Sat Jun 13 19:12:24 2020 +0200 ext4: delete unnecessary checks before brelse() The brelse() function tests whether its argument is NULL and then returns immediately. Thus remove the tests which are not needed around the shown calls. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/0d713702-072f-a89c-20ec-ca70aa83a432@web.de Signed-off-by: Theodore Ts'o commit 47ec5303d73ea344e84f46660fff693c57641386 Merge: 8186749621ed6 c1055b76ad00a Author: Linus Torvalds Date: Wed Aug 5 20:13:21 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from David Miller: 1) Support 6Ghz band in ath11k driver, from Rajkumar Manoharan. 2) Support UDP segmentation in code TSO code, from Eric Dumazet. 3) Allow flashing different flash images in cxgb4 driver, from Vishal Kulkarni. 4) Add drop frames counter and flow status to tc flower offloading, from Po Liu. 5) Support n-tuple filters in cxgb4, from Vishal Kulkarni. 6) Various new indirect call avoidance, from Eric Dumazet and Brian Vazquez. 7) Fix BPF verifier failures on 32-bit pointer arithmetic, from Yonghong Song. 8) Support querying and setting hardware address of a port function via devlink, use this in mlx5, from Parav Pandit. 9) Support hw ipsec offload on bonding slaves, from Jarod Wilson. 10) Switch qca8k driver over to phylink, from Jonathan McDowell. 11) In bpftool, show list of processes holding BPF FD references to maps, programs, links, and btf objects. From Andrii Nakryiko. 12) Several conversions over to generic power management, from Vaibhav Gupta. 13) Add support for SO_KEEPALIVE et al. to bpf_setsockopt(), from Dmitry Yakunin. 14) Various https url conversions, from Alexander A. Klimov. 15) Timestamping and PHC support for mscc PHY driver, from Antoine Tenart. 16) Support bpf iterating over tcp and udp sockets, from Yonghong Song. 17) Support 5GBASE-T i40e NICs, from Aleksandr Loktionov. 18) Add kTLS RX HW offload support to mlx5e, from Tariq Toukan. 19) Fix the ->ndo_start_xmit() return type to be netdev_tx_t in several drivers. From Luc Van Oostenryck. 20) XDP support for xen-netfront, from Denis Kirjanov. 21) Support receive buffer autotuning in MPTCP, from Florian Westphal. 22) Support EF100 chip in sfc driver, from Edward Cree. 23) Add XDP support to mvpp2 driver, from Matteo Croce. 24) Support MPTCP in sock_diag, from Paolo Abeni. 25) Commonize UDP tunnel offloading code by creating udp_tunnel_nic infrastructure, from Jakub Kicinski. 26) Several pci_ --> dma_ API conversions, from Christophe JAILLET. 27) Add FLOW_ACTION_POLICE support to mlxsw, from Ido Schimmel. 28) Add SK_LOOKUP bpf program type, from Jakub Sitnicki. 29) Refactor a lot of networking socket option handling code in order to avoid set_fs() calls, from Christoph Hellwig. 30) Add rfc4884 support to icmp code, from Willem de Bruijn. 31) Support TBF offload in dpaa2-eth driver, from Ioana Ciornei. 32) Support XDP_REDIRECT in qede driver, from Alexander Lobakin. 33) Support PCI relaxed ordering in mlx5 driver, from Aya Levin. 34) Support TCP syncookies in MPTCP, from Flowian Westphal. 35) Fix several tricky cases of PMTU handling wrt. briding, from Stefano Brivio. * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2056 commits) net: thunderx: initialize VF's mailbox mutex before first usage usb: hso: remove bogus check for EINPROGRESS usb: hso: no complaint about kmalloc failure hso: fix bailout in error case of probe ip_tunnel_core: Fix build for archs without _HAVE_ARCH_IPV6_CSUM selftests/net: relax cpu affinity requirement in msg_zerocopy test mptcp: be careful on subflow creation selftests: rtnetlink: make kci_test_encap() return sub-test result selftests: rtnetlink: correct the final return value for the test net: dsa: sja1105: use detected device id instead of DT one on mismatch tipc: set ub->ifindex for local ipv6 address ipv6: add ipv6_dev_find() net: openvswitch: silence suspicious RCU usage warning Revert "vxlan: fix tos value before xmit" ptp: only allow phase values lower than 1 period farsync: switch from 'pci_' to 'dma_' API wan: wanxl: switch from 'pci_' to 'dma_' API hv_netvsc: do not use VF device if link is down dpaa2-eth: Fix passing zero to 'PTR_ERR' warning net: macb: Properly handle phylink on at91sam9x ... commit 8186749621ed6b8fc42644c399e8c755a2b6f630 Merge: e4a7b2dc35d95 dc100bc8fae59 Author: Linus Torvalds Date: Wed Aug 5 19:50:06 2020 -0700 Merge tag 'drm-next-2020-08-06' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "New xilinx displayport driver, AMD support for two new GPUs (more header files), i915 initial support for RocketLake and some work on their DG1 (discrete chip). The core also grew some lockdep annotations to try and constrain what drivers do with dma-fences, and added some documentation on why the idea of indefinite fences doesn't work. The long list is below. I do have some fixes trees outstanding, but I'll follow up with those later. core: - add user def flag to cmd line modes - dma_fence_wait added might_sleep - dma-fence lockdep annotations - indefinite fences are bad documentation - gem CMA functions used in more drivers - struct mutex removal - more drm_ debug macro usage - set/drop master api fixes - fix for drm/mm hole size comparison - drm/mm remove invalid entry optimization - optimise drm/mm hole handling - VRR debugfs added - uncompressed AFBC modifier support - multiple display id blocks in EDID - multiple driver sg handling fixes - __drm_atomic_helper_crtc_reset in all drivers - managed vram helpers ttm: - ttm_mem_reg handling cleanup - remove bo offset field - drop CMA memtype flag - drop mappable flag xilinx: - New Xilinx ZynqMP DisplayPort Subsystem driver nouveau: - add CRC support - start using NVIDIA published class header files - convert all push buffer emission to new macros - Proper push buffer space management for EVO/NVD channels. - firmware loading fixes - 2MiB system memory pages support on Pascal and newer vkms: - larger cursor support i915: - Rocketlake platform enablement - Early DG1 enablement - Numerous GEM refactorings - DP MST fixes - FBC, PSR, Cursor, Color, Gamma fixes - TGL, RKL, EHL workaround updates - TGL 8K display support fixes - SDVO/HDMI/DVI fixes amdgpu: - Initial support for Sienna Cichlid GPU - Initial support for Navy Flounder GPU - SI UVD/VCE support - expose rotation property - Add support for unique id on Arcturus - Enable runtime PM on vega10 boards that support BACO - Skip BAR resizing if the bios already did id - Major swSMU code cleanup - Fixes for DCN bandwidth calculations amdkfd: - Track SDMA usage per process - SMI events interface radeon: - Default to on chip GART for AGP boards on all arches - Runtime PM reference count fixes msm: - headers regenerated causing churn - a650/a640 display and GPU enablement - dpu dither support for 6bpc panels - dpu cursor fix - dsi/mdp5 enablement for sdm630/sdm636/sdm66 tegra: - video capture prep support - reflection support mediatek: - convert mtk_dsi to bridge API meson: - FBC support sun4i: - iommu support rockchip: - register locking fix - per-pixel alpha support PX30 VOP mgag200: - ported to simple and shmem helpers - device init cleanups - use managed pci functions - dropped hw cursor support ast: - use managed pci functions - use managed VRAM helpers - rework cursor support malidp: - dev_groups support hibmc: - refactor hibmc_drv_vdac: vc4: - create TXP CRTC imx: - error path fixes and cleanups etnaviv: - clock handling and error handling cleanups - use pin_user_pages" * tag 'drm-next-2020-08-06' of git://anongit.freedesktop.org/drm/drm: (1747 commits) drm/msm: use kthread_create_worker instead of kthread_run drm/msm/mdp5: Add MDP5 configuration for SDM636/660 drm/msm/dsi: Add DSI configuration for SDM660 drm/msm/mdp5: Add MDP5 configuration for SDM630 drm/msm/dsi: Add phy configuration for SDM630/636/660 drm/msm/a6xx: add A640/A650 hwcg drm/msm/a6xx: hwcg tables in gpulist drm/msm/dpu: add SM8250 to hw catalog drm/msm/dpu: add SM8150 to hw catalog drm/msm/dpu: intf timing path for displayport drm/msm/dpu: set missing flush bits for INTF_2 and INTF_3 drm/msm/dpu: don't use INTF_INPUT_CTRL feature on sdm845 drm/msm/dpu: move some sspp caps to dpu_caps drm/msm/dpu: update UBWC config for sm8150 and sm8250 drm/msm/dpu: use right setup_blend_config for sm8150 and sm8250 drm/msm/a6xx: set ubwc config for A640 and A650 drm/msm/adreno: un-open-code some packets drm/msm: sync generated headers drm/msm/a6xx: add build_bw_table for A640/A650 drm/msm/a6xx: fix crashstate capture for A650 ... commit e4a7b2dc35d9582c253cf5e6d6c3605aabc7284d Merge: fffe3ae0ee84e bba37471de2d7 Author: Linus Torvalds Date: Wed Aug 5 19:24:27 2020 -0700 Merge tag 'leds-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "Okay, so... this one is interesting. RGB LEDs are very common, and we need to have some kind of support for them. Multicolor is for arbitrary set of LEDs in one package, RGB is for LEDs that can produce full range of colors. We do not have real multicolor LED that is not RGB in the pipeline, so that one is disabled for now. You can expect this saga to continue with next pull requests" * tag 'leds-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: (37 commits) MAINTAINERS: Remove myself as LED subsystem maintainer leds: disallow /sys/class/leds/*:multi:* for now leds: add RGB color option, as that is different from multicolor. Make LEDS_LP55XX_COMMON depend on I2C to fix build errors: Documentation: ABI: leds-turris-omnia: document sysfs attribute leds: initial support for Turris Omnia LEDs dt-bindings: leds: add cznic,turris-omnia-leds binding leds: pattern trigger -- check pattern for validity leds: Replace HTTP links with HTTPS ones leds: trigger: add support for LED-private device triggers leds: lp5521: Add multicolor framework multicolor brightness support leds: lp5523: Update the lp5523 code to add multicolor brightness function leds: lp55xx: Add multicolor framework support to lp55xx leds: lp55xx: Convert LED class registration to devm_* dt-bindings: leds: Convert leds-lp55xx to yaml leds: multicolor: Introduce a multicolor class definition leds: Add multicolor ID to the color ID list dt: bindings: Add multicolor class dt bindings documention leds: lp5523: Fix various formatting issues in the code leds: lp55xx: Fix file permissions to use DEVICE_ATTR macros ... commit c1055b76ad00aed0e8b79417080f212d736246b6 Author: Dean Nelson Date: Wed Aug 5 13:18:48 2020 -0500 net: thunderx: initialize VF's mailbox mutex before first usage A VF's mailbox mutex is not getting initialized by nicvf_probe() until after it is first used. And such usage is resulting in... [ 28.270927] ------------[ cut here ]------------ [ 28.270934] DEBUG_LOCKS_WARN_ON(lock->magic != lock) [ 28.270980] WARNING: CPU: 9 PID: 675 at kernel/locking/mutex.c:938 __mutex_lock+0xdac/0x12f0 [ 28.270985] Modules linked in: ast(+) nicvf(+) i2c_algo_bit drm_vram_helper drm_ttm_helper ttm nicpf(+) drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm ixgbe(+) sg thunder_bgx mdio i2c_thunderx mdio_thunder thunder_xcv mdio_cavium dm_mirror dm_region_hash dm_log dm_mod [ 28.271064] CPU: 9 PID: 675 Comm: systemd-udevd Not tainted 4.18.0+ #1 [ 28.271070] Hardware name: GIGABYTE R120-T34-00/MT30-GS2-00, BIOS F02 08/06/2019 [ 28.271078] pstate: 60000005 (nZCv daif -PAN -UAO) [ 28.271086] pc : __mutex_lock+0xdac/0x12f0 [ 28.271092] lr : __mutex_lock+0xdac/0x12f0 [ 28.271097] sp : ffff800d42146fb0 [ 28.271103] x29: ffff800d42146fb0 x28: 0000000000000000 [ 28.271113] x27: ffff800d24361180 x26: dfff200000000000 [ 28.271122] x25: 0000000000000000 x24: 0000000000000002 [ 28.271132] x23: ffff20001597cc80 x22: ffff2000139e9848 [ 28.271141] x21: 0000000000000000 x20: 1ffff001a8428e0c [ 28.271151] x19: ffff200015d5d000 x18: 1ffff001ae0f2184 [ 28.271160] x17: 0000000000000000 x16: 0000000000000000 [ 28.271170] x15: ffff800d70790c38 x14: ffff20001597c000 [ 28.271179] x13: ffff20001597cc80 x12: ffff040002b2f779 [ 28.271189] x11: 1fffe40002b2f778 x10: ffff040002b2f778 [ 28.271199] x9 : 0000000000000000 x8 : 00000000f1f1f1f1 [ 28.271208] x7 : 00000000f2f2f2f2 x6 : 0000000000000000 [ 28.271217] x5 : 1ffff001ae0f2186 x4 : 1fffe400027eb03c [ 28.271227] x3 : dfff200000000000 x2 : ffff1001a8428dbe [ 28.271237] x1 : c87fdfac7ea11d00 x0 : 0000000000000000 [ 28.271246] Call trace: [ 28.271254] __mutex_lock+0xdac/0x12f0 [ 28.271261] mutex_lock_nested+0x3c/0x50 [ 28.271297] nicvf_send_msg_to_pf+0x40/0x3a0 [nicvf] [ 28.271316] nicvf_register_misc_interrupt+0x20c/0x328 [nicvf] [ 28.271334] nicvf_probe+0x508/0xda0 [nicvf] [ 28.271344] local_pci_probe+0xc4/0x180 [ 28.271352] pci_device_probe+0x3ec/0x528 [ 28.271363] driver_probe_device+0x21c/0xb98 [ 28.271371] device_driver_attach+0xe8/0x120 [ 28.271379] __driver_attach+0xe0/0x2a0 [ 28.271386] bus_for_each_dev+0x118/0x190 [ 28.271394] driver_attach+0x48/0x60 [ 28.271401] bus_add_driver+0x328/0x558 [ 28.271409] driver_register+0x148/0x398 [ 28.271416] __pci_register_driver+0x14c/0x1b0 [ 28.271437] nicvf_init_module+0x54/0x10000 [nicvf] [ 28.271447] do_one_initcall+0x18c/0xc18 [ 28.271457] do_init_module+0x18c/0x618 [ 28.271464] load_module+0x2bc0/0x4088 [ 28.271472] __se_sys_finit_module+0x110/0x188 [ 28.271479] __arm64_sys_finit_module+0x70/0xa0 [ 28.271490] el0_svc_handler+0x15c/0x380 [ 28.271496] el0_svc+0x8/0xc [ 28.271502] irq event stamp: 52649 [ 28.271513] hardirqs last enabled at (52649): [] _raw_spin_unlock_irqrestore+0xc0/0xd8 [ 28.271522] hardirqs last disabled at (52648): [] _raw_spin_lock_irqsave+0x3c/0xf0 [ 28.271530] softirqs last enabled at (52330): [] __do_softirq+0xacc/0x117c [ 28.271540] softirqs last disabled at (52313): [] irq_exit+0x3cc/0x500 [ 28.271545] ---[ end trace a9b90324c8a0d4ee ]--- This problem is resolved by moving the call to mutex_init() up earlier in nicvf_probe(). Fixes: 609ea65c65a0 ("net: thunderx: add mutex to protect mailbox from concurrent calls for same VF") Signed-off-by: Dean Nelson Signed-off-by: David S. Miller commit 0063fc3db476d924fa54bc347032b351f28c4b92 Merge: 8ed54f167abda abaf00ff04625 Author: David S. Miller Date: Wed Aug 5 17:43:39 2020 -0700 Merge branch 'misc-bug-fixes-for-the-hso-driver' Oliver Neukum says: ==================== misc bug fixes for the hso driver 1. Code reuse led to an unregistration of a net driver that has not been registered 2. The kernel complains generically if kmalloc with GFP_KERNEL fails 3. A race that can lead to an URB that is in use being reused or a use after free ==================== Signed-off-by: David S. Miller commit abaf00ff04625275a40e407fc8da04948ae4f95b Author: Oliver Neukum Date: Wed Aug 5 14:07:09 2020 +0200 usb: hso: remove bogus check for EINPROGRESS This check an inherent race. It opens a race where an error code has already been set or cleared yet the URB has not been given back. We cannot do such an optimization and must unlink unconditionally. Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller commit 11c5f6d2f2a8f34f64dfcdec4090d2c17539c2c3 Author: Oliver Neukum Date: Wed Aug 5 14:07:08 2020 +0200 usb: hso: no complaint about kmalloc failure If this fails, kmalloc() will print a report including a stack trace. There is no need for a separate complaint. Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller commit 5fcfb6d0bfcda17f0d0656e4e5b3710af2bbaae5 Author: Oliver Neukum Date: Wed Aug 5 14:07:07 2020 +0200 hso: fix bailout in error case of probe The driver tries to reuse code for disconnect in case of a failed probe. If resources need to be freed after an error in probe, the netdev must not be freed because it has never been registered. Fix it by telling the helper which path we are in. Signed-off-by: Oliver Neukum Signed-off-by: David S. Miller commit 23fcc7dee2c6aba1060558683988263851e74bab Author: Michael Guralnik Date: Mon Aug 3 08:58:49 2020 +0300 RDMA/mlx5: Fix flow destination setting for RDMA TX flow table For RDMA TX flow table, set destination type to be 'port' and prevent creation of flows with TIR destination. As RDMA TX is an egress flow table the rules on this flow table should not forward traffic back to the NIC and should set the destination to be the port. Without the setting of this destination type flow rules on the RDMA TX flow tables are not created as FW invokes a syndrome for undefined destination for the rule. Fixes: 24670b1a3166 ("net/mlx5: Add support for RDMA TX steering") Link: https://lore.kernel.org/r/20200803055849.14947-1-leon@kernel.org Signed-off-by: Michael Guralnik Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e8abe1de43dac658dacbd04a4543e0c988a8d386 Author: Dan Carpenter Date: Tue Aug 4 13:16:45 2020 +0300 md-cluster: Fix potential error pointer dereference in resize_bitmaps() The error handling calls md_bitmap_free(bitmap) which checks for NULL but will Oops if we pass an error pointer. Let's set "bitmap" to NULL on this error path. Fixes: afd756286083 ("md-cluster/raid10: resize all the bitmaps before start reshape") Signed-off-by: Dan Carpenter Reviewed-by: Guoqing Jiang Signed-off-by: Song Liu commit c84f91e2622235bb742f9f20b8675cf095157026 Author: Michael S. Tsirkin Date: Wed Aug 5 19:55:50 2020 -0400 virtio_config: fix up warnings on parisc Apparently, on parisc le16_to_cpu returns an int. virtio_cread_le is very strict about type sizes so it causes a warning. Fix it up by casting to the correct type. Reported-by: kernel test robot Signed-off-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20200805235550.1451637-1-mst@redhat.com commit 6f119ec8d9c8f68c0432d902312045a699c3e52a Merge: 65c2bc6ce972e caecb05c80008 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:22 2020 -0500 Merge branch 'pci/irq-error' - Remove redundant logging for platform_get_irq() errors (Krzysztof Wilczyński) * pci/irq-error: PCI: Remove dev_err() when handing an error from platform_get_irq() commit 65c2bc6ce972e7aee1523a0702d0eeac0570a01f Merge: 49e427e6bdd19 9b41d19aff409 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:22 2020 -0500 Merge branch 'pci/doc' - Fix several kerneldoc warnings (Krzysztof Kozlowski) * pci/doc: PCI: Fix kerneldoc warnings commit 49e427e6bdd19aa41c725819f53f381eaea1bf06 Merge: f8917db956670 b64aa11eb2ddb Author: Bjorn Helgaas Date: Wed Aug 5 18:24:21 2020 -0500 Merge branch 'pci/host-probe-refactor' - Use pci_host_bridge.windows list directly instead of splicing in a temporary list for cadence, mvebu, host-common (Rob Herring) - Use pci_host_probe() instead of open-coding all the pieces for altera, brcmstb, iproc, mobiveil, rcar, rockchip, tegra, v3, versatile, xgene, xilinx, xilinx-nwl (Rob Herring) - Convert to devm_platform_ioremap_resource_byname() instead of open-coding platform_get_resource_byname() and devm_ioremap_resource() for altera, cadence, mediatek, rockchip, tegra, xgene (Dejin Zheng) - Convert to devm_platform_ioremap_resource() instead of open-coding platform_get_resource() and devm_ioremap_resource() for aardvark, brcmstb, exynos, ftpci100, versatile (Dejin Zheng) - Remove redundant error messages from devm_pci_remap_cfg_resource() callers (Dejin Zheng) - Drop useless PCI_ENABLE_PROC_DOMAINS from versatile driver (Rob Herring) - Default host bridge parent device to the platform device (Rob Herring) - Drop unnecessary zeroing of host bridge fields (Rob Herring) - Use pci_is_root_bus() instead of tracking root bus number separately in aardvark, designware (imx6, keystone, designware-host), mobiveil, xilinx-nwl, xilinx, rockchip, rcar (Rob Herring) - Set host bridge bus number in pci_scan_root_bus_bridge() instead of each driver for aardvark, designware-host, host-common, mediatek, rcar, tegra, v3-semi (Rob Herring) - Use bridge resources instead of parsing DT 'ranges' again for cadence (Rob Herring) - Remove private bus number and range from cadence (Rob Herring) - Use devm_pci_alloc_host_bridge() to simplify rcar (Rob Herring) - Use struct pci_host_bridge.windows list directly rather than a temporary (Rob Herring) - Reduce OF "missing non-prefetchable window" from error to warning message (Rob Herring) - Convert rcar-gen2 from old Arm-specific pci_common_init_dev() to new arch-independent interfaces (Rob Herring) - Move DT resource setup into devm_pci_alloc_host_bridge() (Rob Herring) - Set bridge map_irq and swizzle_irq to default functions; drivers that don't support legacy IRQs (iproc) need to undo this (Rob Herring) * pci/host-probe-refactor: PCI: Set bridge map_irq and swizzle_irq to default functions PCI: Move DT resource setup into devm_pci_alloc_host_bridge() PCI: rcar-gen2: Convert to use modern host bridge probe functions PCI: of: Reduce missing non-prefetchable memory region to a warning PCI: rcar: Use struct pci_host_bridge.windows list directly PCI: rcar: Use devm_pci_alloc_host_bridge() PCI: cadence: Remove private bus number and range storage PCI: cadence: Use bridge resources for outbound window setup PCI: Move setting pci_host_bridge.busnr out of host drivers PCI: rcar: Use pci_is_root_bus() to check if bus is root bus PCI: rockchip: Use pci_is_root_bus() to check if bus is root bus PCI: xilinx: Use pci_is_root_bus() to check if bus is root bus PCI: xilinx-nwl: Use pci_is_root_bus() to check if bus is root bus PCI: mobiveil: Use pci_is_root_bus() to check if bus is root bus PCI: designware: Use pci_is_root_bus() to check if bus is root bus PCI: aardvark: Use pci_is_root_bus() to check if bus is root bus PCI: Drop unnecessary zeroing of bridge fields PCI: Set default bridge parent device PCI: versatile: Drop flag PCI_ENABLE_PROC_DOMAINS PCI: controller: Remove duplicate error message PCI: controller: Convert to devm_platform_ioremap_resource() PCI: controller: Convert to devm_platform_ioremap_resource_byname() PCI: xilinx: Use pci_host_probe() to register host PCI: xilinx-nwl: Use pci_host_probe() to register host PCI: rockchip: Use pci_host_probe() to register host PCI: rcar: Use pci_host_probe() to register host PCI: iproc: Use pci_host_probe() to register host PCI: altera: Use pci_host_probe() to register host PCI: xgene: Use pci_host_probe() to register host PCI: versatile: Use pci_host_probe() to register host PCI: v3: Use pci_host_probe() to register host PCI: tegra: Use pci_host_probe() to register host PCI: mobiveil: Use pci_host_probe() to register host PCI: brcmstb: Use pci_host_probe() to register host PCI: host-common: Use struct pci_host_bridge.windows list directly PCI: mvebu: Use struct pci_host_bridge.windows list directly PCI: cadence: Use struct pci_host_bridge.windows list directly # Conflicts: # drivers/pci/controller/cadence/pcie-cadence-host.c commit f8917db9566703bab02778b1836c5ae0c4aa46ec Merge: 3f379177e44fb 508f610648b97 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:21 2020 -0500 Merge branch 'pci/xilinx-cpm' * pci/xilinx-cpm: PCI: xilinx-cpm: Add Versal CPM Root Port driver PCI: xilinx-cpm: Add YAML schemas for Versal CPM Root Port commit 3f379177e44fba2c92b7ec3df79fca2e14d6be22 Merge: fa6cc79a3edf4 51f939b11cb1c Author: Bjorn Helgaas Date: Wed Aug 5 18:24:20 2020 -0500 Merge branch 'remotes/lorenzo/pci/vmd' - Use Shadow MEMBAR registers for QEMU/KVM guests (Jon Derrick) * remotes/lorenzo/pci/vmd: PCI: vmd: Use Shadow MEMBAR registers for QEMU/KVM guests commit fa6cc79a3edf46038afcd274082c8385d60dcdfc Merge: 21c04e050e5c2 a6fbb4a4a7f0a Author: Bjorn Helgaas Date: Wed Aug 5 18:24:20 2020 -0500 Merge branch 'remotes/lorenzo/pci/tegra' - Revert tegra RAW fixup that caused a regression (Nicolas Chauvet) - Remove PLL power supplies from tegra driver and DT binding (Thierry Reding) * remotes/lorenzo/pci/tegra: PCI: tegra: Remove PLL power supplies dt-bindings: pci: tegra: Remove PLL power supplies PCI: tegra: Revert tegra124 raw_violation_fixup commit 21c04e050e5c2c694b8d643d8ec62b0704627fad Merge: a07a20b191c67 a68e06e729b1b Author: Bjorn Helgaas Date: Wed Aug 5 18:24:20 2020 -0500 Merge branch 'remotes/lorenzo/pci/runtime-pm' - Fix runtime power management imbalance for cadence, dra7xx, qcom, rcar (Dinghao Liu) * remotes/lorenzo/pci/runtime-pm: PCI: rcar: Fix runtime PM imbalance on error PCI: qcom: Fix runtime PM imbalance on error PCI: cadence: Fix runtime PM imbalance on error PCI: dwc: pci-dra7xx: Fix runtime PM imbalance on error commit a07a20b191c678be2cf1deec7db826e0aba08749 Merge: 64d293d8ac878 216f8e95aacc8 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:19 2020 -0500 Merge branch 'remotes/lorenzo/pci/mvebu' - Set up mvebu BAR 0 so MSI works even if bootloader doesn't do this (Shmuel Hazan) * remotes/lorenzo/pci/mvebu: PCI: mvebu: Setup BAR0 in order to fix MSI commit 64d293d8ac878a31cd009f3f1ae8aa71d55d2389 Merge: 98f5c57a4e8fe 14110af606965 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:19 2020 -0500 Merge branch 'remotes/lorenzo/pci/loongson' - Fix loongson class code quirk so it happens early enough (Tiezhu Yang) * remotes/lorenzo/pci/loongson: PCI: loongson: Use DECLARE_PCI_FIXUP_EARLY for bridge_class_quirk() commit 98f5c57a4e8fe3a0a28f9189a42694917ef9e87f Merge: 26418025ce0b8 a459d9e107887 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:19 2020 -0500 Merge branch 'remotes/lorenzo/pci/hv' - Fix hv timing issue that causes kdump failures (Wei Hu) - Make some hv functions static (Wei Yongjun) * remotes/lorenzo/pci/hv: PCI: hv: Make some functions static PCI: hv: Fix a timing issue which causes kdump to fail occasionally commit 26418025ce0b8afd10a19e507171bfa42ea62a30 Merge: 13a77336f4f56 c2fa6cf76d204 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:18 2020 -0500 Merge branch 'remotes/lorenzo/pci/dwc' - Add qcom ipq806x support (Ansuel Smith) - Support max-link-speed DT property for qcom (Sham Muthayyan) - Use PCI core #defines instead of adding qcom-specific ones (Ansuel Smith) - Convert to devm_platform_ioremap_resource_byname() instead of open-coding platform_get_resource_byname() and devm_ioremap_resource() for dra7xx, keystone, artpec6, designware-plat, histb, intel-gw, kirin, qcom, uniphier (Dejin Zheng) - Remove non-ECAM HiSilicon hip05/hip06 driver (Rob Herring) * remotes/lorenzo/pci/dwc: PCI: dwc: hisi: Remove non-ECAM HiSilicon hip05/hip06 driver PCI: dwc: Convert to devm_platform_ioremap_resource_byname() PCI: qcom: Replace define with standard value PCI: qcom: Support pci speed set for ipq806x dt-bindings: PCI: qcom: Add ipq8064 rev 2 variant PCI: qcom: Add ipq8064 rev2 variant PCI: qcom: Add support for tx term offset for rev 2.1.0 PCI: qcom: Define some PARF params needed for ipq8064 SoC PCI: qcom: Use bulk clk api and assert on error dt-bindings: PCI: qcom: Add ext reset PCI: qcom: Add missing reset for ipq806x PCI: qcom: Change duplicate PCI reset to phy reset dt-bindings: PCI: qcom: Add missing clks PCI: qcom: Add missing ipq806x clocks in PCIe driver commit 13a77336f4f5681068bbaa4eac3ba8adff684a54 Merge: 5b17dbab26303 0dbe77c9d2f8e Author: Bjorn Helgaas Date: Wed Aug 5 18:24:18 2020 -0500 Merge branch 'remotes/lorenzo/pci/cadence' - Convert cadence to use standard "dma-ranges" DT property instead of its own "cdns,no-bar-match-nbits" (Kishon Vijay Abraham I) - Fix pm_runtime_put_sync() issues in cadence error paths (Kishon Vijay Abraham I) - Add PTR_ALIGN_DOWN macro (Kishon Vijay Abraham I) - Convert cadence r/w accessors to only 32-bit accesses (Kishon Vijay Abraham I) - Add cadence support to start Link and check Link status (Kishon Vijay Abraham I) - Allow custom PCI ops for cadence-based drivers (Kishon Vijay Abraham I) - Remove "mem" from cadence reg binding since it's not memory and it overlaps the PCIe config and memory region (Kishon Vijay Abraham I) - Add cadence ->cpu_addr_fixup() for platforms that require absolute addresses in the ATU, not just offsets (Kishon Vijay Abraham I) - Update cadence Vendor IDs using local management registers, not architected config space (Kishon Vijay Abraham I) - Add cadence endpoint driver MSI-X support (Kishon Vijay Abraham I) - Add bindings and driver for TI J721E SoC, supporting both host and endpoint mode (Kishon Vijay Abraham I) * remotes/lorenzo/pci/cadence: MAINTAINERS: Add Kishon Vijay Abraham I for TI J721E SoC PCIe misc: pci_endpoint_test: Add J721E in pci_device_id table PCI: j721e: Add TI J721E PCIe driver dt-bindings: PCI: Add EP mode dt-bindings for TI's J721E SoC dt-bindings: PCI: Add host mode dt-bindings for TI's J721E SoC PCI: cadence: Add MSI-X support to Endpoint driver PCI: cadence: Fix updating Vendor ID and Subsystem Vendor ID register PCI: cadence: Add new *ops* for CPU addr fixup dt-bindings: PCI: cadence: Remove "mem" from reg binding PCI: cadence: Allow pci_host_bridge to have custom pci_ops PCI: cadence: Add support to start link and verify link status PCI: cadence: Convert all r/w accessors to perform only 32-bit accesses linux/kernel.h: Add PTR_ALIGN_DOWN macro PCI: cadence: Fix cdns_pcie_{host|ep}_setup() error path PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property commit 5b17dbab263035aa1dc8e61637bc719f47c60daa Merge: 06f3506e54dc4 70e380250c362 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:18 2020 -0500 Merge branch 'remotes/lorenzo/pci/aardvark' - Indicate error in 'val' when config read fails (Pali Rohár) - Don't touch PCIe registers if no card connected (Pali Rohár) * remotes/lorenzo/pci/aardvark: PCI: aardvark: Don't touch PCIe registers if no card connected PCI: aardvark: Indicate error in 'val' when config read fails commit 06f3506e54dc4bc5eda284083071a847d32476cf Merge: 6585a1a14ed0a 42dae8937406c Author: Bjorn Helgaas Date: Wed Aug 5 18:24:17 2020 -0500 Merge branch 'pci/switchtec' - Add __iomem and __user tags to switchtec driver (Logan Gunthorpe) * pci/switchtec: PCI: switchtec: Add missing __iomem tag to fix sparse warnings PCI: switchtec: Add missing __iomem and __user tags to fix sparse warnings commit 6585a1a14ed0ace5a3ec0f8cab3bd227864877e9 Merge: 4f7adb6ee74cc 090688fa4e448 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:17 2020 -0500 Merge branch 'pci/virtualization' - Remove redundant variable init in xen (Colin Ian King) - Add pci_pri_supported() to check device or associated PF for PRI support (Ashok Raj) - Mark AMD Navi10 GPU rev 0x00 ATS as broken (Kai-Heng Feng) - Release IVRS table in AMD ACS quirk (Hanjun Guo) * pci/virtualization: PCI: Release IVRS table in AMD ACS quirk PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken PCI/ATS: Add pci_pri_supported() to check device or associated PF xen: Remove redundant initialization of irq commit 4f7adb6ee74ccb1c745eec17e5ce89cfd09cd1e9 Merge: d697552f52f31 dea286bb71bad Author: Bjorn Helgaas Date: Wed Aug 5 18:24:17 2020 -0500 Merge branch 'pci/peer-to-peer' - Allow P2PDMA on AMD Zen and newer CPUs (Logan Gunthorpe) * pci/peer-to-peer: PCI/P2PDMA: Allow P2PDMA on AMD Zen and newer CPUs commit d697552f52f31f3b46050522c2e93f5c3aed3046 Merge: 0caa17f5f2bbd 30ff3e8c28745 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:16 2020 -0500 Merge branch 'pci/msi' - Forward MSI-X error code in pci_alloc_irq_vectors_affinity() (Piotr Stankiewicz) * pci/msi: PCI/MSI: Forward MSI-X error code in pci_alloc_irq_vectors_affinity() commit 0caa17f5f2bbd3b4734a1a80d4403493e747ed4c Merge: e8c4a76524303 2167c40657981 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:16 2020 -0500 Merge branch 'pci/misc' - Convert PCIe capability PCIBIOS errors to errno (Bolarinwa Olayemi Saheed) - Align PCIe capability and PCI accessor return values (Bolarinwa Olayemi Saheed) - Replace http:// links with https:// (Alexander A. Klimov) - Replace lkml.org, spinics, gmane with lore.kernel.org (Bjorn Helgaas) - Update panic message to mention kzalloc(), not kmalloc() (Liao Pingfang) - Move PCI_VENDOR_ID_REDHAT definition to pci_ids.h (Huacai Chen) - Remove unused pci_lost_interrupt() (Heiner Kallweit) * pci/misc: PCI: Remove unused pci_lost_interrupt() PCI: Move PCI_VENDOR_ID_REDHAT definition to pci_ids.h PCI: Fix error in panic message PCI: Replace lkml.org, spinics, gmane with lore.kernel.org PCI: Replace http:// links with https:// PCI: Align PCIe capability and PCI accessor return values PCI: Convert PCIe capability PCIBIOS errors to errno commit e8c4a7652430319896d6383d0f3729fa6f91f0f9 Merge: b0735e8d2c360 2e4770a5661a7 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:15 2020 -0500 Merge branch 'pci/hotplug' - Fix pci_create_slot() reference count leak in failure path (Qiushi Wu) - Make rpadlpar functions static (Wei Yongjun) * pci/hotplug: PCI: rpadlpar: Make functions static PCI: Fix pci_create_slot() reference count leak commit b0735e8d2c360b7b1343f299fb22df39f2a7797e Merge: 3f906da760596 068c29a248b6d Author: Bjorn Helgaas Date: Wed Aug 5 18:24:15 2020 -0500 Merge branch 'pci/error' - Use pci_channel_state_t instead of enum pci_channel_state (Luc Van Oostenryck) - Simplify __aer_print_error() (Bjorn Helgaas) - Log AER correctable errors as warning, not error (Matt Jolly) - Rename pci_aer_clear_device_status() to pcie_clear_device_status() (Bjorn Helgaas) - Clear PCIe Device Status errors only if OS owns AER (Jonathan Cameron) * pci/error: PCI/ERR: Clear PCIe Device Status errors only if OS owns AER PCI/ERR: Rename pci_aer_clear_device_status() to pcie_clear_device_status() PCI/AER: Log correctable errors as warning, not error PCI/AER: Simplify __aer_print_error() PCI: Use 'pci_channel_state_t' instead of 'enum pci_channel_state' commit 3f906da760596b9a9551cd9243ece42f05e1a579 Merge: 0dfcabe9c6405 b7360f609f5fa Author: Bjorn Helgaas Date: Wed Aug 5 18:24:15 2020 -0500 Merge branch 'pci/enumeration' - Fix pci_cfg_wait queue locking problem (Xiang Zheng, Bjorn Helgaas) - Keep device in system even if driver attach fails (Rajat Jain) - Cache ACS capability offset in device (Rajat Jain) - Treat "external-facing" devices themselves as internal, not external (Rajat Jain) - Announce device after early fixups (Tiezhu Yang) * pci/enumeration: PCI: Announce device after early fixups PCI: Treat "external-facing" devices themselves as internal PCI: Cache ACS capability offset in device PCI: Reorder pci_enable_acs() and dependencies PCI: Add device even if driver attach failed PCI: Fix pci_cfg_wait queue locking problem commit 0dfcabe9c640591808de483fadcd823dd24c37fb Merge: b3a9e3b9622ae 3167e3d340c09 Author: Bjorn Helgaas Date: Wed Aug 5 18:24:14 2020 -0500 Merge branch 'pci/aspm' - Add newline to ASPM sysfs "policy" file (Xiongfeng Wang) * pci/aspm: PCI/ASPM: Add missing newline in sysfs 'policy' commit 9b41d19aff40907bdd64ae230aaadbb3de3db710 Author: Krzysztof Kozlowski Date: Wed Jul 29 22:12:19 2020 +0200 PCI: Fix kerneldoc warnings Fix kerneldoc warnings, e.g., $ make W=1 drivers/pci/ drivers/pci/ats.c:196: warning: Function parameter or member 'pdev' not described in 'pci_enable_pri' drivers/pci/ats.c:196: warning: Function parameter or member 'reqs' not described in 'pci_enable_pri' ... Link: https://lore.kernel.org/r/20200729201224.26799-2-krzk@kernel.org Link: https://lore.kernel.org/r/20200729201224.26799-3-krzk@kernel.org Link: https://lore.kernel.org/r/20200729201224.26799-4-krzk@kernel.org Link: https://lore.kernel.org/r/20200729201224.26799-5-krzk@kernel.org Link: https://lore.kernel.org/r/20200729201224.26799-6-krzk@kernel.org Link: https://lore.kernel.org/r/20200729201224.26799-7-krzk@kernel.org Signed-off-by: Krzysztof Kozlowski Signed-off-by: Bjorn Helgaas commit b35fd7422c2f8e04496f5a770bd4e1a205414b3f Author: Coly Li Date: Thu Aug 6 01:25:03 2020 +0800 block: check queue's limits.discard_granularity in __blkdev_issue_discard() If create a loop device with a backing NVMe SSD, current loop device driver doesn't correctly set its queue's limits.discard_granularity and leaves it as 0. If a discard request at LBA 0 on this loop device, in __blkdev_issue_discard() the calculated req_sects will be 0, and a zero length discard request will trigger a BUG() panic in generic block layer code at block/blk-mq.c:563. [ 955.565006][ C39] ------------[ cut here ]------------ [ 955.559660][ C39] invalid opcode: 0000 [#1] SMP NOPTI [ 955.622171][ C39] CPU: 39 PID: 248 Comm: ksoftirqd/39 Tainted: G E 5.8.0-default+ #40 [ 955.622171][ C39] Hardware name: Lenovo ThinkSystem SR650 -[7X05CTO1WW]-/-[7X05CTO1WW]-, BIOS -[IVE160M-2.70]- 07/17/2020 [ 955.622175][ C39] RIP: 0010:blk_mq_end_request+0x107/0x110 [ 955.622177][ C39] Code: 48 8b 03 e9 59 ff ff ff 48 89 df 5b 5d 41 5c e9 9f ed ff ff 48 8b 35 98 3c f4 00 48 83 c7 10 48 83 c6 19 e8 cb 56 c9 ff eb cb <0f> 0b 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 41 56 41 54 [ 955.622179][ C39] RSP: 0018:ffffb1288701fe28 EFLAGS: 00010202 [ 955.749277][ C39] RAX: 0000000000000001 RBX: ffff956fffba5080 RCX: 0000000000004003 [ 955.749278][ C39] RDX: 0000000000000003 RSI: 0000000000000000 RDI: 0000000000000000 [ 955.749279][ C39] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 955.749279][ C39] R10: ffffb1288701fd28 R11: 0000000000000001 R12: ffffffffa8e05160 [ 955.749280][ C39] R13: 0000000000000004 R14: 0000000000000004 R15: ffffffffa7ad3a1e [ 955.749281][ C39] FS: 0000000000000000(0000) GS:ffff95bfbda00000(0000) knlGS:0000000000000000 [ 955.749282][ C39] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 955.749282][ C39] CR2: 00007f6f0ef766a8 CR3: 0000005a37012002 CR4: 00000000007606e0 [ 955.749283][ C39] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 955.749284][ C39] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 955.749284][ C39] PKRU: 55555554 [ 955.749285][ C39] Call Trace: [ 955.749290][ C39] blk_done_softirq+0x99/0xc0 [ 957.550669][ C39] __do_softirq+0xd3/0x45f [ 957.550677][ C39] ? smpboot_thread_fn+0x2f/0x1e0 [ 957.550679][ C39] ? smpboot_thread_fn+0x74/0x1e0 [ 957.550680][ C39] ? smpboot_thread_fn+0x14e/0x1e0 [ 957.550684][ C39] run_ksoftirqd+0x30/0x60 [ 957.550687][ C39] smpboot_thread_fn+0x149/0x1e0 [ 957.886225][ C39] ? sort_range+0x20/0x20 [ 957.886226][ C39] kthread+0x137/0x160 [ 957.886228][ C39] ? kthread_park+0x90/0x90 [ 957.886231][ C39] ret_from_fork+0x22/0x30 [ 959.117120][ C39] ---[ end trace 3dacdac97e2ed164 ]--- This is the procedure to reproduce the panic, # modprobe scsi_debug delay=0 dev_size_mb=2048 max_queue=1 # losetup -f /dev/nvme0n1 --direct-io=on # blkdiscard /dev/loop0 -o 0 -l 0x200 This patch fixes the issue by checking q->limits.discard_granularity in __blkdev_issue_discard() before composing the discard bio. If the value is 0, then prints a warning oops information and returns -EOPNOTSUPP to the caller to indicate that this buggy device driver doesn't support discard request. Fixes: 9b15d109a6b2 ("block: improve discard bio alignment in __blkdev_issue_discard()") Fixes: c52abf563049 ("loop: Better discard support for block devices") Reported-and-suggested-by: Ming Lei Signed-off-by: Coly Li Reviewed-by: Ming Lei Reviewed-by: Hannes Reinecke Reviewed-by: Jack Wang Cc: Bart Van Assche Cc: Christoph Hellwig Cc: Darrick J. Wong Cc: Enzo Matsumiya Cc: Evan Green Cc: Jens Axboe Cc: Martin K. Petersen Cc: Xiao Ni Signed-off-by: Jens Axboe commit e8efa9b88e3c20a20ff34bb33e2e94bf6896016a Author: Junxiao Bi Date: Tue Aug 4 17:27:18 2020 -0700 md: get sysfs entry after redundancy attr group create "sync_completed" and "degraded" belongs to redundancy attr group, it was not exist yet when md device was created. Reported-by: kernel test robot Fixes: e1a86dbbbd6a ("md: fix deadlock causing by sysfs_notify") Signed-off-by: Junxiao Bi Signed-off-by: Song Liu commit 1a86b377aa2147a7c866b03142e848c18e5f3cb8 Author: Eli Cohen Date: Tue Aug 4 19:20:48 2020 +0300 vdpa/mlx5: Add VDPA driver for supported mlx5 devices Add a front end VDPA driver that registers in the VDPA bus and provides networking to a guest. The VDPA driver creates the necessary resources on the VF it is driving such that data path will be offloaded. Notifications are being communicated through the driver. Currently, only VFs are supported. In subsequent patches we will have devlink support to control which VF is used for VDPA and which function is used for regular networking. Reviewed-by: Parav Pandit Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20200804162048.22587-13-eli@mellanox.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 94abbccdf2916cb03f9626f2d36c6e9971490c12 Author: Eli Cohen Date: Tue Aug 4 19:20:47 2020 +0300 vdpa/mlx5: Add shared memory registration code Add code to support registering address space region for the device. The virtio driver can run as either: 1. Guest virtio driver 2. Userspace virtio driver on the host 3. Kernel virtio driver on the host In any case a memory key object is required to provide access to memory for the device. This code will be shared by network or block driver implementations. Reviewed-by: Parav Pandit Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20200804162048.22587-12-eli@mellanox.com Signed-off-by: Michael S. Tsirkin commit 29064bfdabd5ef49eac6909d3a36a075e3b52255 Author: Eli Cohen Date: Tue Aug 4 19:20:46 2020 +0300 vdpa/mlx5: Add support library for mlx5 VDPA implementation Following patches introduce VDPA network driver for Mellanox Connectx6 devices. This patch provides functionality that will be used by those patches. Reviewed-by: Parav Pandit Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20200804162048.22587-11-eli@mellanox.com Signed-off-by: Michael S. Tsirkin commit 89349be659d63767cf79e23767da84408a33cd73 Author: Eli Cohen Date: Tue Aug 4 19:20:45 2020 +0300 vdpa/mlx5: Add hardware descriptive header file Keep all vdpa related hardware definitions in this file. Reviewed-by: Parav Pandit Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20200804162048.22587-10-eli@mellanox.com Signed-off-by: Michael S. Tsirkin commit 23750e39d57433d0e3d89658f0bc448f9c42ff49 Author: Eli Cohen Date: Tue Aug 4 19:20:44 2020 +0300 vdpa: Modify get_vq_state() to return error code Modify get_vq_state() so it returns an error code. In case of hardware acceleration, the available index may be retrieved from the device, an operation that can possibly fail. Reviewed-by: Parav Pandit Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20200804162048.22587-9-eli@mellanox.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit aac50c0bd434794b9950181349099e709ca4edad Author: Eli Cohen Date: Tue Aug 4 19:20:43 2020 +0300 net/vdpa: Use struct for set/get vq state For now VQ state involves 16 bit available index value encoded in u64 variable. In the future it will be extended to contain more fields. Use struct to contain the state, now containing only a single u16 for the available index. In the future we can add fields to this struct. Reviewed-by: Parav Pandit Acked-by: Jason Wang Signed-off-by: Eli Cohen Link: https://lore.kernel.org/r/20200804162048.22587-8-eli@mellanox.com Signed-off-by: Michael S. Tsirkin commit a9974489b61c09c702c85c6cba3d1a3fd1be7a15 Author: Max Gurtovoy Date: Tue Aug 4 19:20:42 2020 +0300 vdpa: remove hard coded virtq num This will enable vdpa providers to add support for multi queue feature and publish it to upper layers (vhost and virtio). Signed-off-by: Max Gurtovoy Reviewed-by: Jason Wang Link: https://lore.kernel.org/r/20200804162048.22587-7-eli@mellanox.com Signed-off-by: Michael S. Tsirkin commit de91a4d0e725db34db64502fad84e8fb1026146b Author: Jason Wang Date: Tue Aug 4 19:20:41 2020 +0300 vdpasim: support batch updating The vDPA simulator support both set_map() and dma_map()/dma_unmap() operations. But vhost-vdpa can only use one of them. So this patch introduce a module parameter (batch_mapping) that let vpda_sim to support only one of those dma operations. The batched mapping via set_map() is enabled by default. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20200804162048.22587-6-eli@mellanox.com Signed-off-by: Michael S. Tsirkin commit 25abc060d282132ea5c945392f900dca0a7e9bbb Author: Jason Wang Date: Tue Aug 4 19:20:40 2020 +0300 vhost-vdpa: support IOTLB batching hints This patches extend the vhost IOTLB API to accept batch updating hints form userspace. When userspace wants update the device IOTLB in a batch, it may do: 1) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_BEGIN flag 2) Perform a batch of IOTLB updating via VHOST_IOTLB_UPDATE/INVALIDATE 3) Write vhost_iotlb_msg with VHOST_IOTLB_BATCH_END flag Vhost-vdpa may decide to batch the IOMMU/IOTLB updating in step 3 when vDPA device support set_map() ops. This is useful for the vDPA device that want to know all the mappings to tweak their own DMA translation logic. For vDPA device that doesn't require set_map(), no behavior changes. This capability is advertised via VHOST_BACKEND_F_IOTLB_BATCH capability. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20200804162048.22587-5-eli@mellanox.com Signed-off-by: Michael S. Tsirkin commit 653055b9acd45d602435f2f70b7a85cb3130f018 Author: Jason Wang Date: Tue Aug 4 19:20:39 2020 +0300 vhost-vdpa: support get/set backend features This patch makes userspace can get and set backend features to vhost-vdpa. Signed-off-by: Cindy Lu Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20200804162048.22587-4-eli@mellanox.com Signed-off-by: Michael S. Tsirkin commit 460f7ce19f50e612a80b8cd0d2e38f2e14e765f6 Author: Jason Wang Date: Tue Aug 4 19:20:38 2020 +0300 vhost: generialize backend features setting/getting Move the backend features setting/getting from net.c to vhost.c to be reused by vhost-vdpa. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20200804162048.22587-3-eli@mellanox.com Signed-off-by: Michael S. Tsirkin commit b0bd82bf729dbd05757e599f20df38dff5b97091 Author: Jason Wang Date: Tue Aug 4 19:20:37 2020 +0300 vhost-vdpa: refine ioctl pre-processing Switch to use 'switch' to make the codes more easier to be extended. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20200804162048.22587-2-eli@mellanox.com Signed-off-by: Michael S. Tsirkin commit 0a9d74d1f01eee0aafd2e98d061ef169fdf138d7 Merge: 4c05433bc6fb4 042dd05bddbd8 Author: Michael S. Tsirkin Date: Wed Aug 5 18:32:05 2020 -0400 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into HEAD Merge shared code that's necessary for mlx5 vdpa bits to build. The branch itself includes a small number of patches and is also independently merged by a couple of other trees. That shouldn't cause any conflicts by itself. Saeed Mahameed says: --- mlx5-next is a very small branch based on a very early rc that includes mlx5 shared stuff between rdma and net-next, and now virtio as well. --- Signed-off-by: Michael S. Tsirkin commit 508f610648b97012d39f97590e3f3f1059471607 Author: Bharat Kumar Gogada Date: Tue Jun 16 18:26:54 2020 +0530 PCI: xilinx-cpm: Add Versal CPM Root Port driver Add support for Versal CPM as Root Port. The Versal ACAP devices include CCIX-PCIe Module (CPM). The integrated block for CPM along with the integrated bridge can function as PCIe Root Port. Bridge error and legacy interrupts in Versal CPM are handled using Versal CPM specific interrupt line. [bhelgaas: fold in kerneldoc fix from https://lore.kernel.org/linux-acpi/20200729201224.26799-7-krzk@kernel.org/] Link: https://lore.kernel.org/r/1592312214-9347-3-git-send-email-bharat.kumar.gogada@xilinx.com Signed-off-by: Bharat Kumar Gogada Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring commit e22fadb1d014e0fd7e43a3af667b2e3ec1a85c1f Author: Bharat Kumar Gogada Date: Tue Jun 16 18:26:53 2020 +0530 PCI: xilinx-cpm: Add YAML schemas for Versal CPM Root Port Add YAML schemas documentation for Versal CPM Root Port driver. Link: https://lore.kernel.org/r/1592312214-9347-2-git-send-email-bharat.kumar.gogada@xilinx.com Signed-off-by: Bharat Kumar Gogada Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring commit 789e67ba5454c0fa78471a6cc5ae143794fb8033 Author: Qii Wang Date: Wed Aug 5 18:52:22 2020 +0800 i2c: mediatek: Add i2c compatible for MediaTek MT8192 Add i2c compatible for MT8192. Compare to MT8183 i2c controller, MT8192 support more then 8GB DMA mode. Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit 311df9d580306cbfd98b6f7c860175a2471e2130 Author: Qii Wang Date: Wed Aug 5 18:52:21 2020 +0800 dt-bindings: i2c: update bindings for MT8192 SoC Add a DT binding documentation for the MT8192 soc. Acked-by: Rob Herring Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit 6c86a3029ce3b44597526909f2e39a77a497f640 Author: Mike Rapoport Date: Wed Aug 5 15:51:41 2020 +0300 MIPS: SGI-IP27: always enable NUMA in Kconfig When a configuration has NUMA disabled and SGI_IP27 enabled, the build fails: CC kernel/bounds.s CC arch/mips/kernel/asm-offsets.s In file included from arch/mips/include/asm/topology.h:11, from include/linux/topology.h:36, from include/linux/gfp.h:9, from include/linux/slab.h:15, from include/linux/crypto.h:19, from include/crypto/hash.h:11, from include/linux/uio.h:10, from include/linux/socket.h:8, from include/linux/compat.h:15, from arch/mips/kernel/asm-offsets.c:12: include/linux/topology.h: In function 'numa_node_id': arch/mips/include/asm/mach-ip27/topology.h:16:27: error: implicit declaration of function 'cputonasid'; did you mean 'cpu_vpe_id'? [-Werror=implicit-function-declaration] #define cpu_to_node(cpu) (cputonasid(cpu)) ^~~~~~~~~~ include/linux/topology.h:119:9: note: in expansion of macro 'cpu_to_node' return cpu_to_node(raw_smp_processor_id()); ^~~~~~~~~~~ include/linux/topology.h: In function 'cpu_cpu_mask': arch/mips/include/asm/mach-ip27/topology.h:19:7: error: implicit declaration of function 'hub_data' [-Werror=implicit-function-declaration] &hub_data(node)->h_cpus) ^~~~~~~~ include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node' return cpumask_of_node(cpu_to_node(cpu)); ^~~~~~~~~~~~~~~ arch/mips/include/asm/mach-ip27/topology.h:19:21: error: invalid type argument of '->' (have 'int') &hub_data(node)->h_cpus) ^~ include/linux/topology.h:210:9: note: in expansion of macro 'cpumask_of_node' return cpumask_of_node(cpu_to_node(cpu)); ^~~~~~~~~~~~~~~ Before switch from discontigmem to sparsemem, there always was CONFIG_NEED_MULTIPLE_NODES=y because it was selected by DISCONTIGMEM. Without DISCONTIGMEM it is possible to have SPARSEMEM without NUMA for SGI_IP27 and as many things there rely on custom node definition, the build breaks. As Thomas noted "... there are right now too many places in IP27 code, which assumes NUMA enabled", the simplest solution would be to always enable NUMA for SGI-IP27 builds. Reported-by: kernel test robot Fixes: 397dc00e249e ("mips: sgi-ip27: switch from DISCONTIGMEM to SPARSEMEM") Cc: stable@vger.kernel.org Signed-off-by: Mike Rapoport Signed-off-by: Thomas Bogendoerfer commit 908d984336daeb0cad65ba015ab0ade132f2e315 Author: Qii Wang Date: Wed Aug 5 18:52:20 2020 +0800 i2c: mediatek: Add access to more than 8GB dram in i2c driver Newer MTK chip support more than 8GB of dram. Replace support_33bits with more general dma_max_support and remove mtk_i2c_set_4g_mode. Reviewed-by: Yingjoe Chen Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit 8426fe70cfa4e4545c6a3709918638a7f613d528 Author: Qii Wang Date: Wed Aug 5 18:52:19 2020 +0800 i2c: mediatek: Add apdma sync in i2c driver With the apdma remove hand-shake signal, it need to keep i2c and apdma in sync manually. Reviewed-by: Yingjoe Chen Reviewed-by: Matthias Brugger Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit bba37471de2d7733b0deef57e03c47fa97a284a7 Author: Jacek Anaszewski Date: Tue Aug 4 12:15:25 2020 +0200 MAINTAINERS: Remove myself as LED subsystem maintainer It don't have enough time for reviewing patches and thus don't want to be listed as regular LED maintainer. Nonetheless I may still give a review from time to time. Signed-off-by: Jacek Anaszewski Signed-off-by: Pavel Machek commit 045838bc7f47f142df82a5a95a1ced73d80705e1 Author: Stafford Horne Date: Tue Aug 4 08:40:57 2020 +0900 openrisc: io: Fixup defines and move include to the end This didn't seem to cause any issues, but while working on fixing up sparse annotations for OpenRISC I noticed this. This patch moves the include of asm-generic/io.h to the end of the file. Also, we add defines of ioremap and iounmap, that way we don't get duplicate definitions from asm-generic/io.h. Signed-off-by: Stafford Horne commit fffe3ae0ee84e25d2befe2ae59bc32aa2b6bc77b Merge: 8f7be62915290 7d17e83abec1b Author: Linus Torvalds Date: Wed Aug 5 13:28:50 2020 -0700 Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull hmm updates from Jason Gunthorpe: "Ralph has been working on nouveau's use of hmm_range_fault() and migrate_vma() which resulted in this small series. It adds reporting of the page table order from hmm_range_fault() and some optimization of migrate_vma(): - Report the size of the page table mapping out of hmm_range_fault(). This makes it easier to establish a large/huge/etc mapping in the device's page table. - Allow devices to ignore the invalidations during migration in cases where the migration is not going to change pages. For instance migrating pages to a device does not require the device to invalidate pages already in the device. - Update nouveau and hmm_tests to use the above" * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: mm/hmm/test: use the new migration invalidation nouveau/svm: use the new migration invalidation mm/notifier: add migration invalidation type mm/migrate: add a flags parameter to migrate_vma nouveau: fix storing invalid ptes nouveau/hmm: support mapping large sysmem pages nouveau: fix mapping 2MB sysmem pages nouveau/hmm: fault one page at a time mm/hmm: add tests for hmm_pfn_to_map_order() mm/hmm: provide the page mapping order in hmm_range_fault() commit 8f7be6291529011a58856bf178f52ed5751c68ac Merge: 9aebd3254c184 7f4bc2e8687ec Author: Linus Torvalds Date: Wed Aug 5 13:23:24 2020 -0700 Merge tag 'mmc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Add a new host cap bit and a corresponding DT property, to support power cycling of the card by FW at system suspend/resume. - Fix clock rate setting for SDIO in SDR12/SDR25 speed-mode - Fix switch to 1/4-bit mode at system suspend/resume for SD-combo cards - Convert the mmc-pwrseq DT bindings to the json-schema - Always allow the card detect uevent to be consumed by userspace MMC host controllers: - Convert a few DT bindings to the json-schema - mtk-sd: - Add support for command queue through cqhci - Add support for the MT6779 variant - renesas_sdhi_internal_dmac: - Fix dma unmapping in the error path - sdhci_am654: - Add support for the AM65x PG2.0 variant - Extend support for phys/clocks - sdhci-cadence: - Drop incorrect HW tuning for SD mode - sdhci-msm: - Add support for interconnect bandwidth scaling - Enable internal voltage control - Enable low power state for pinctrls - sdhci-of-at91: - Ludovic Desroches handovers maintenance to Eugen Hristev - sdhci-pci-gli: - Improve clock handling for GL975x - sdhci-pci-o2micro: - Add HW tuning for SDR104 mode - Fix support for O2 host controller Seabird1" * tag 'mmc-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (66 commits) mmc: mediatek: make function msdc_cqe_disable() static MAINTAINERS: mmc: sdhci-of-at91: handover maintenance to Eugen Hristev dt-bindings: mmc: mediatek: Add document for mt6779 mmc: mediatek: command queue support mmc: mediatek: refine msdc timeout api mmc: mediatek: add MT6779 MMC driver support mmc: sdhci-pci-o2micro: Add HW tuning for SDR104 mode mmc: sdhci-pci-o2micro: Bug fix for O2 host controller Seabird1 mmc: via-sdmmc: use generic power management memstick: jmb38x_ms: use generic power management mmc: sdhci-cadence: do not use hardware tuning for SD mode mmc: sdhci-pci-gli: Set SDR104's clock to 205MHz and enable SSC for GL975x mmc: cqhci: Fix a print format for the task descriptor mmc: sdhci-of-arasan: fix timings allocation code mmc: sdhci: Fix a potential uninitialized variable dt-bindings: mmc: renesas,sdhi: convert to YAML dt-bindings: mmc: convert arasan sdhci bindings to yaml mmc: sdhci: Fix potential null pointer access while accessing vqmmc mmc: core: Add MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND dt-bindings: mmc: Add full-pwr-cycle-in-suspend property ... commit 9aebd3254c184fb6c731548b8347193bf882b6f7 Merge: 441977979a78b e2f75e6b5d766 Author: Linus Torvalds Date: Wed Aug 5 13:13:57 2020 -0700 Merge tag 'hwmon-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "Highlights: - New driver for Sparx5 SoC temperature sensot - New driver for Corsair Commander Pro - MAX20710 support added to max20730 driver Enhancements: - max6697: Allow max6581 to create tempX_offset attributes - gsc (Gateworks System Controller): add 16bit pre-scaled voltage mode - adm1275: Enable adm1278 ADM1278_TEMP1_EN - dell-smm: Add Latitude 5480 to fan control whitelist Fixes: - adc128d818: Fix advanced configuration register init - pmbus/core: Use s64 instead of long for calculations to fix overflow issues with 32-bit architectures Plus various cleanups in several drivers" * tag 'hwmon-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (32 commits) hwmon: (adc128d818) Fix advanced configuration register init hwmon: (axi-fan-control) remove duplicate macros hwmon: (i5k_amb, vt8231) Drop uses of pci_read_config_*() return value hwmon: (sparx5) Make symbol 's5_temp_match' static hwmon: (corsair-cpro) add reading pwm values hwmon: sparx5: Add Sparx5 SoC temperature driver dt-bindings: hwmon: Add Sparx5 temperature sensor hwmon: (tmp401) Replace HTTP links with HTTPS ones hwmon: (lm95234) Replace HTTP links with HTTPS ones hwmon: (lm90) Replace HTTP links with HTTPS ones hwmon: (k8temp) Replace HTTP links with HTTPS ones hwmon: (jc42) Replace HTTP links with HTTPS ones hwmon: (ina2xx) Replace HTTP links with HTTPS ones hwmon: (ina209) Replace HTTP links with HTTPS ones hwmon: Replace HTTP links with HTTPS ones docs: hwmon: Replace HTTP links with HTTPS ones hwmon: (adm1025) Replace HTTP links with HTTPS ones hwmon: add Corsair Commander Pro driver hwmon: (max6697) Allow max6581 to create tempX_offset hwmon: (tmmp513) Replace HTTP links with HTTPS links ... commit 441977979a78bffe51b13932d353919b1fb20c14 Merge: 1d8ce0e093019 6f1188b4ac757 Author: Linus Torvalds Date: Wed Aug 5 13:02:45 2020 -0700 Merge tag 'devicetree-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree updates from Rob Herring: - Improve device links cycle detection and breaking. Add more bindings for device link dependencies. - Refactor parsing 'no-map' in __reserved_mem_alloc_size() - Improve DT unittest 'ranges' and 'dma-ranges' test case to check differing cell sizes - Various http to https link conversions - Add a schema check to prevent 'syscon' from being used by itself without a more specific compatible - A bunch more DT binding conversions to schema * tag 'devicetree-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (55 commits) of: reserved-memory: remove duplicated call to of_get_flat_dt_prop() for no-map node of: unittest: Use bigger address cells to catch parser regressions dt-bindings: memory-controllers: Convert mmdc to json-schema dt-bindings: mtd: Convert imx nand to json-schema dt-bindings: mtd: Convert gpmi nand to json-schema dt-bindings: iio: io-channel-mux: Fix compatible string in example code of: property: Add device link support for pinctrl-0 through pinctrl-8 of: property: Add device link support for multiple DT bindings dt-bindings: phy: ti: phy-gmii-sel: convert bindings to json-schema dt-bindings: mux: mux.h: drop a duplicated word dt-bindings: misc: Convert olpc,xo1.75-ec to json-schema dt-bindings: aspeed-lpc: Replace HTTP links with HTTPS ones dt-bindings: drm/bridge: Replace HTTP links with HTTPS ones drm/tilcdc: Replace HTTP links with HTTPS ones dt-bindings: iommu: renesas,ipmmu-vmsa: Add r8a774e1 support dt-bindings: fpga: Replace HTTP links with HTTPS ones dt-bindings: virtio: Replace HTTP links with HTTPS ones dt-bindings: media: imx274: Add optional input clock and supplies dt-bindings: i2c-gpio: Use 'deprecated' keyword on deprecated properties dt-bindings: interrupt-controller: Fix typos in loongson,liointc.yaml ... commit 1d8ce0e09301920454234a4096dee96a670a8e32 Merge: 585524081ecdc 22cc422070d9a Author: Linus Torvalds Date: Wed Aug 5 12:56:27 2020 -0700 Merge tag 'gpio-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v5.9 kernel cycle. There is nothing too exciting in it, but a new macro that fixes a build failure on a minor ARM32 platform that appeared yesterday is part of it so we better merge it. Core changes: - Introduce the for_each_requested_gpio() macro to help in dependent code all over the place. Also patch a few locations to use it while we are at it. - Split out the sysfs code into its own file. - Split out the character device code into its own file, then make a set of refactorings and improvements to this code. We are setting the stage to revamp the userspace API a bit in the next cycle. - Fix a whole slew of kerneldoc that was wrong or missing. New drivers: - The PCA953x driver now supports the PCAL9535. Driver improvements: - A host of incremental modernizations and improvements to the PCA953x driver. - Incremental improvements to the Xilinx Zynq driver. - Some improvements to the GPIO aggregator driver. - I ran all over the place switching all threaded and other drivers requesting their own IRQ while using the core GPIO IRQ helpers to pass the GPIO irq chip as a template instead of calling the explicit set-up functions. Next merge window we may retire the old code altogether" * tag 'gpio-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (97 commits) gpio: wcove: Request IRQ after all initialisation done gpio: crystalcove: Free IRQ on error path gpio: pca953x: Request IRQ after all initialisation done gpio: don't use same lockdep class for all devm_gpiochip_add_data users gpio: max732x: Use irqchip template gpio: stmpe: Move chip registration gpio: rcar: Use irqchip template gpio: regmap: fix type clash gpio: Correct kernel-doc inconsistency gpio: pci-idio-16: Use irqchip template gpio: pcie-idio-24: Use irqchip template gpio: 104-idio-16: Use irqchip template gpio: 104-idi-48: Use irqchip template gpio: 104-dio-48e: Use irqchip template gpio: ws16c48: Use irqchip template gpio: omap: improve coding style for pin config flags gpio: dln2: Use irqchip template gpio: sch: Add a blank line between declaration and code gpio: sch: changed every 'unsigned' to 'unsigned int' gpio: ich: changed every 'unsigned' to 'unsigned int' ... commit 585524081ecdcde1c719e63916c514866d898217 Author: Linus Torvalds Date: Wed Aug 5 12:39:48 2020 -0700 random: random.h should include archrandom.h, not the other way around This is hopefully the final piece of the crazy puzzle with random.h dependencies. And by "hopefully" I obviously mean "Linus is a hopeless optimist". Reported-and-tested-by: Daniel Díaz Acked-by: Guenter Roeck Signed-off-by: Linus Torvalds commit 8ed54f167abda44da48498876953f5b7843378df Author: Stefano Brivio Date: Wed Aug 5 15:39:31 2020 +0200 ip_tunnel_core: Fix build for archs without _HAVE_ARCH_IPV6_CSUM On architectures defining _HAVE_ARCH_IPV6_CSUM, we get csum_ipv6_magic() defined by means of arch checksum.h headers. On other architectures, we actually need to include net/ip6_checksum.h to be able to use it. Without this include, building with defconfig breaks at least for s390. Reported-by: Stephen Rothwell Fixes: 4cb47a8644cc ("tunnels: PMTU discovery support for directly bridged IP packets") Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller commit 16f6458f2478b55e2b628797bc81a4455045c74e Author: Willem de Bruijn Date: Wed Aug 5 04:40:45 2020 -0400 selftests/net: relax cpu affinity requirement in msg_zerocopy test The msg_zerocopy test pins the sender and receiver threads to separate cores to reduce variance between runs. But it hardcodes the cores and skips core 0, so it fails on machines with the selected cores offline, or simply fewer cores. The test mainly gives code coverage in automated runs. The throughput of zerocopy ('-z') and non-zerocopy runs is logged for manual inspection. Continue even when sched_setaffinity fails. Just log to warn anyone interpreting the data. Fixes: 07b65c5b31ce ("test: add msg_zerocopy test") Reported-by: Colin Ian King Signed-off-by: Willem de Bruijn Acked-by: Colin Ian King Signed-off-by: David S. Miller commit adf7341064982de923a1f8a11bcdec48be6b3004 Author: Paolo Abeni Date: Tue Aug 4 18:31:06 2020 +0200 mptcp: be careful on subflow creation Nicolas reported the following oops: [ 1521.392541] BUG: kernel NULL pointer dereference, address: 00000000000000c0 [ 1521.394189] #PF: supervisor read access in kernel mode [ 1521.395376] #PF: error_code(0x0000) - not-present page [ 1521.396607] PGD 0 P4D 0 [ 1521.397156] Oops: 0000 [#1] SMP PTI [ 1521.398020] CPU: 0 PID: 22986 Comm: kworker/0:2 Not tainted 5.8.0-rc4+ #109 [ 1521.399618] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1ubuntu1 04/01/2014 [ 1521.401728] Workqueue: events mptcp_worker [ 1521.402651] RIP: 0010:mptcp_subflow_create_socket+0xf1/0x1c0 [ 1521.403954] Code: 24 08 89 44 24 04 48 8b 7a 18 e8 2a 48 d4 ff 8b 44 24 04 85 c0 75 7a 48 8b 8b 78 02 00 00 48 8b 54 24 08 48 8d bb 80 00 00 00 <48> 8b 89 c0 00 00 00 48 89 8a c0 00 00 00 48 8b 8b 78 02 00 00 8b [ 1521.408201] RSP: 0000:ffffabc4002d3c60 EFLAGS: 00010246 [ 1521.409433] RAX: 0000000000000000 RBX: ffffa0b9ad8c9a00 RCX: 0000000000000000 [ 1521.411096] RDX: ffffa0b9ae78a300 RSI: 00000000fffffe01 RDI: ffffa0b9ad8c9a80 [ 1521.412734] RBP: ffffa0b9adff2e80 R08: ffffa0b9af02d640 R09: ffffa0b9ad923a00 [ 1521.414333] R10: ffffabc4007139f8 R11: fefefefefefefeff R12: ffffabc4002d3cb0 [ 1521.415918] R13: ffffa0b9ad91fa58 R14: ffffa0b9ad8c9f9c R15: 0000000000000000 [ 1521.417592] FS: 0000000000000000(0000) GS:ffffa0b9af000000(0000) knlGS:0000000000000000 [ 1521.419490] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1521.420839] CR2: 00000000000000c0 CR3: 000000002951e006 CR4: 0000000000160ef0 [ 1521.422511] Call Trace: [ 1521.423103] __mptcp_subflow_connect+0x94/0x1f0 [ 1521.425376] mptcp_pm_create_subflow_or_signal_addr+0x200/0x2a0 [ 1521.426736] mptcp_worker+0x31b/0x390 [ 1521.431324] process_one_work+0x1fc/0x3f0 [ 1521.432268] worker_thread+0x2d/0x3b0 [ 1521.434197] kthread+0x117/0x130 [ 1521.435783] ret_from_fork+0x22/0x30 on some unconventional configuration. The MPTCP protocol is trying to create a subflow for an unaccepted server socket. That is allowed by the RFC, even if subflow creation will likely fail. Unaccepted sockets have still a NULL sk_socket field, avoid the issue by failing earlier. Reported-and-tested-by: Nicolas Rybowski Fixes: 7d14b0d2b9b3 ("mptcp: set correct vfs info for subflows") Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts Signed-off-by: David S. Miller commit 889579d00b74085c494c4616e9a27c372c81b695 Merge: 0b0e299720bb9 72f70c159b53e Author: David S. Miller Date: Wed Aug 5 12:23:29 2020 -0700 Merge branch 'selftests-rtnetlink-Fix-for-false-negative-return-values' Po-Hsu Lin says: ==================== selftests: rtnetlink: Fix for false-negative return values This patchset will address the false-negative return value issue caused by the following: 1. The return value "ret" in this script will be reset to 0 from the beginning of each sub-test in rtnetlink.sh, therefore this rtnetlink test will always pass if the last sub-test has passed. 2. The test result from two sub-tests in kci_test_encap() were not being processed, thus they will not affect the final test result of this test. ==================== Signed-off-by: David S. Miller commit 72f70c159b53e1363191953875e0223ed959e143 Author: Po-Hsu Lin Date: Tue Aug 4 18:18:03 2020 +0800 selftests: rtnetlink: make kci_test_encap() return sub-test result kci_test_encap() is actually composed by two different sub-tests, kci_test_encap_vxlan() and kci_test_encap_fou() Therefore we should check the test result of these two in kci_test_encap() to let the script be aware of the pass / fail status. Otherwise it will generate false-negative result like below: $ sudo ./test.sh PASS: policy routing PASS: route get PASS: preferred_lft addresses have expired PASS: promote_secondaries complete PASS: tc htb hierarchy PASS: gre tunnel endpoint PASS: gretap PASS: ip6gretap PASS: erspan PASS: ip6erspan PASS: bridge setup PASS: ipv6 addrlabel PASS: set ifalias 5b193daf-0a08-46d7-af2c-e7aadd422ded for test-dummy0 PASS: vrf PASS: vxlan FAIL: can't add fou port 7777, skipping test PASS: macsec PASS: bridge fdb get PASS: neigh get $ echo $? 0 Signed-off-by: Po-Hsu Lin Signed-off-by: David S. Miller commit c2a4d2747996ee6a1397e2064d44a4f57ac442e6 Author: Po-Hsu Lin Date: Tue Aug 4 18:18:02 2020 +0800 selftests: rtnetlink: correct the final return value for the test The return value "ret" will be reset to 0 from the beginning of each sub-test in rtnetlink.sh, therefore this test will always pass if the last sub-test has passed: $ sudo ./rtnetlink.sh PASS: policy routing PASS: route get PASS: preferred_lft addresses have expired PASS: promote_secondaries complete PASS: tc htb hierarchy PASS: gre tunnel endpoint PASS: gretap PASS: ip6gretap PASS: erspan PASS: ip6erspan PASS: bridge setup PASS: ipv6 addrlabel PASS: set ifalias a39ee707-e36b-41d3-802f-63179ed4d580 for test-dummy0 PASS: vrf PASS: vxlan FAIL: can't add fou port 7777, skipping test PASS: macsec PASS: ipsec 3,7c3,7 < sa[0] spi=0x00000009 proto=0x32 salt=0x64636261 crypt=1 < sa[0] key=0x31323334 35363738 39303132 33343536 < sa[1] rx ipaddr=0x00000000 00000000 00000000 c0a87b03 < sa[1] spi=0x00000009 proto=0x32 salt=0x64636261 crypt=1 < sa[1] key=0x31323334 35363738 39303132 33343536 --- > sa[0] spi=0x00000009 proto=0x32 salt=0x61626364 crypt=1 > sa[0] key=0x34333231 38373635 32313039 36353433 > sa[1] rx ipaddr=0x00000000 00000000 00000000 037ba8c0 > sa[1] spi=0x00000009 proto=0x32 salt=0x61626364 crypt=1 > sa[1] key=0x34333231 38373635 32313039 36353433 FAIL: ipsec_offload incorrect driver data FAIL: ipsec_offload PASS: bridge fdb get PASS: neigh get $ echo $? 0 Make "ret" become a local variable for all sub-tests. Also, check the sub-test results in kci_test_rtnl() and return the final result for this test. Signed-off-by: Po-Hsu Lin Signed-off-by: David S. Miller commit 0b0e299720bb99428892a23ecbd2b4b7f61ccf6d Author: Vladimir Oltean Date: Mon Aug 3 19:48:23 2020 +0300 net: dsa: sja1105: use detected device id instead of DT one on mismatch Although we can detect the chip revision 100% at runtime, it is useful to specify it in the device tree compatible string too, because otherwise there would be no way to assess the correctness of device tree bindings statically, without booting a board (only some switch versions have internal RGMII delays and/or an SGMII port). But for testing the P/Q/R/S support, what I have is a reworked board with the SJA1105T replaced by a pin-compatible SJA1105Q, and I don't want to keep a separate device tree blob just for this one-off board. Since just the chip has been replaced, its RGMII delay setup is inherently the same (meaning: delays added by the PHY on the slave ports, and by PCB traces on the fixed-link CPU port). For this board, I'd rather have the driver shout at me, but go ahead and use what it found even if it doesn't match what it's been told is there. [ 2.970826] sja1105 spi0.1: Device tree specifies chip SJA1105T but found SJA1105Q, please fix it! [ 2.980010] sja1105 spi0.1: Probed switch chip: SJA1105Q [ 3.005082] sja1105 spi0.1: Enabled switch tagging Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 273d405b4d5657dd2ad9aa6381e94ef63bb71423 Merge: 5845589ed652d 5a6f6f579178d Author: David S. Miller Date: Wed Aug 5 12:19:52 2020 -0700 Merge branch 'net-fix-a-mcast-issue-for-tipc-udp-media' Xin Long says: ==================== net: fix a mcast issue for tipc udp media Patch 1 is to add a function to get the dev by source address, which will be used by Patch 2. ==================== Signed-off-by: David S. Miller commit 5a6f6f579178dbeb33002d93b4f646c31348fac9 Author: Xin Long Date: Mon Aug 3 23:34:47 2020 +0800 tipc: set ub->ifindex for local ipv6 address Without ub->ifindex set for ipv6 address in tipc_udp_enable(), ipv6_sock_mc_join() may make the wrong dev join the multicast address in enable_mcast(). This causes that tipc links would never be created. So fix it by getting the right netdev and setting ub->ifindex, as it does for ipv4 address. Reported-by: Shuang Li Signed-off-by: Xin Long Acked-by: Ying Xue Signed-off-by: David S. Miller commit 81f6cb31222d286dab65579d61f96664eeb99e0b Author: Xin Long Date: Mon Aug 3 23:34:46 2020 +0800 ipv6: add ipv6_dev_find() This is to add an ip_dev_find like function for ipv6, used to find the dev by saddr. It will be used by TIPC protocol. So also export it. Signed-off-by: Xin Long Acked-by: Ying Xue Signed-off-by: David S. Miller commit ecfd7940b8641da6e41ca94eba36876dc2ba827b Merge: dd27111e32572 e3ee0e740c388 Author: Linus Torvalds Date: Wed Aug 5 12:13:10 2020 -0700 Merge tag 'usb-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB/Thunderbolt updates from Greg KH: "Here is the large set of USB and Thunderbolt patches for 5.9-rc1. Nothing really magic/major in here, just lots of little changes and updates: - clean up language usages in USB core and some drivers - Thunderbolt driver updates and additions - USB Gadget driver updates - dwc3 driver updates (like always...) - build with "W=1" warning fixups - mtu3 driver updates - usb-serial driver updates and device ids - typec additions and updates for new hardware - xhci debug code updates for future platforms - cdns3 driver updates - lots of other minor driver updates and fixes and cleanups All of these have been in linux-next for a while with no reported issues" * tag 'usb-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (330 commits) usb: common: usb-conn-gpio: Register charger usb: mtu3: simplify mtu3_req_complete() usb: mtu3: clear dual mode of u3port when disable device usb: mtu3: use MTU3_EP_WEDGE flag usb: mtu3: remove useless member @busy in mtu3_ep struct usb: mtu3: remove repeated error log usb: mtu3: add ->udc_set_speed() usb: mtu3: introduce a funtion to check maximum speed usb: mtu3: clear interrupts status when disable interrupts usb: mtu3: reinitialize CSR registers usb: mtu3: fix macro for maximum number of packets usb: mtu3: remove unnecessary pointer checks usb: xhci: Fix ASMedia ASM1142 DMA addressing usb: xhci: define IDs for various ASMedia host controllers usb: musb: convert to devm_platform_ioremap_resource_byname usb: gadget: tegra-xudc: convert to devm_platform_ioremap_resource_byname usb: gadget: r8a66597: convert to devm_platform_ioremap_resource_byname usb: dwc3: convert to devm_platform_ioremap_resource_byname usb: cdns3: convert to devm_platform_ioremap_resource_byname usb: phy: am335x: convert to devm_platform_ioremap_resource_byname ... commit 5845589ed652da9b65833044bd2d0bcb1d676ed0 Author: Tonghao Zhang Date: Wed Aug 5 15:19:11 2020 +0800 net: openvswitch: silence suspicious RCU usage warning ovs_flow_tbl_destroy always is called from RCU callback or error path. It is no need to check if rcu_read_lock or lockdep_ovsl_is_held was held. ovs_dp_cmd_fill_info always is called with ovs_mutex, So use the rcu_dereference_ovsl instead of rcu_dereference in ovs_flow_tbl_masks_cache_size. Fixes: 9bf24f594c6a ("net: openvswitch: make masks cache size configurable") Cc: Eelco Chaudron Reported-by: syzbot+c0eb9e7cdde04e4eb4be@syzkaller.appspotmail.com Reported-by: syzbot+f612c02823acb02ff9bc@syzkaller.appspotmail.com Signed-off-by: Tonghao Zhang Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit a0dced17ad9dc08b1b25e0065b54c97a318e6e8b Author: Hangbin Liu Date: Wed Aug 5 10:41:31 2020 +0800 Revert "vxlan: fix tos value before xmit" This reverts commit 71130f29979c7c7956b040673e6b9d5643003176. In commit 71130f29979c ("vxlan: fix tos value before xmit") we want to make sure the tos value are filtered by RT_TOS() based on RFC1349. 0 1 2 3 4 5 6 7 +-----+-----+-----+-----+-----+-----+-----+-----+ | PRECEDENCE | TOS | MBZ | +-----+-----+-----+-----+-----+-----+-----+-----+ But RFC1349 has been obsoleted by RFC2474. The new DSCP field defined like 0 1 2 3 4 5 6 7 +-----+-----+-----+-----+-----+-----+-----+-----+ | DS FIELD, DSCP | ECN FIELD | +-----+-----+-----+-----+-----+-----+-----+-----+ So with IPTOS_TOS_MASK 0x1E RT_TOS(tos) ((tos)&IPTOS_TOS_MASK) the first 3 bits DSCP info will get lost. To take all the DSCP info in xmit, we should revert the patch and just push all tos bits to ip_tunnel_ecn_encap(), which will handling ECN field later. Fixes: 71130f29979c ("vxlan: fix tos value before xmit") Signed-off-by: Hangbin Liu Acked-by: Guillaume Nault Signed-off-by: David S. Miller commit c29f9aa35016729fc0cf72994e8b57f33466b64c Author: Vladimir Oltean Date: Wed Aug 5 03:10:47 2020 +0300 ptp: only allow phase values lower than 1 period The way we define the phase (the difference between the time of the signal's rising edge, and the closest integer multiple of the period), it doesn't make sense to have a phase value equal or larger than 1 period. So deny these settings coming from the user. Signed-off-by: Vladimir Oltean Acked-by: Richard Cochran Acked-by: Jacob Keller Signed-off-by: David S. Miller commit dd27111e32572fdd3aaae98ba2817df6d202357a Merge: 1785d116124fc 76acb5ee76b1a Author: Linus Torvalds Date: Wed Aug 5 11:52:17 2020 -0700 Merge tag 'driver-core-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the "big" set of changes to the driver core, and some drivers using the changes, for 5.9-rc1. "Biggest" thing in here is the device link exposure in sysfs, to help to tame the madness that is SoC device tree representations and driver interactions with it. Other stuff in here that is interesting is: - device probe log helper so that drivers can report problems in a unified way easier. - devres functions added - DEVICE_ATTR_ADMIN_* macro added to make it harder to write incorrect sysfs file permissions - documentation cleanups - ability for debugfs to be present in the kernel, yet not exposed to userspace. Needed for systems that want it enabled, but do not trust users, so they can still use some kernel functions that were otherwise disabled. - other minor fixes and cleanups The patches outside of drivers/base/ all have acks from the respective subsystem maintainers to go through this tree instead of theirs. All of these have been in linux-next with no reported issues" * tag 'driver-core-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (39 commits) drm/bridge: lvds-codec: simplify error handling drm/bridge/sii8620: fix resource acquisition error handling driver core: add deferring probe reason to devices_deferred property driver core: add device probe log helper driver core: Avoid binding drivers to dead devices Revert "test_firmware: Test platform fw loading on non-EFI systems" firmware_loader: EFI firmware loader must handle pre-allocated buffer selftest/firmware: Add selftest timeout in settings test_firmware: Test platform fw loading on non-EFI systems driver core: Change delimiter in devlink device's name to "--" debugfs: Add access restriction option tracefs: Remove unnecessary debug_fs checks. driver core: Fix probe_count imbalance in really_probe() kobject: remove unused KOBJ_MAX action driver core: Fix sleeping in invalid context during device link deletion driver core: Add waiting_for_supplier sysfs file for devices driver core: Add state_synced sysfs file for devices that support it driver core: Expose device link details in sysfs driver core: Drop mention of obsolete bus rwsem from kernel-doc debugfs: file: Remove unnecessary cast in kfree() ... commit 1785d116124fc33f2c265243f3f59da3dc2a2576 Merge: 060a72a268577 22362aa30bad6 Author: Linus Torvalds Date: Wed Aug 5 11:43:47 2020 -0700 Merge tag 'char-misc-5.9-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 large set of char and misc and other driver subsystem patches for 5.9-rc1. Lots of new driver submissions in here, and cleanups and features for existing drivers. Highlights are: - habanalabs driver updates - coresight driver updates - nvmem driver updates - huge number of "W=1" build warning cleanups from Lee Jones - dyndbg updates - virtbox driver fixes and updates - soundwire driver updates - mei driver updates - phy driver updates - fpga driver updates - lots of smaller individual misc/char driver cleanups and fixes Full details are in the shortlog. All of these have been in linux-next with no reported issues" * tag 'char-misc-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (322 commits) habanalabs: remove unused but set variable 'ctx_asid' nvmem: qcom-spmi-sdam: Enable multiple devices dt-bindings: nvmem: SID: add binding for A100's SID controller nvmem: update Kconfig description nvmem: qfprom: Add fuse blowing support dt-bindings: nvmem: Add properties needed for blowing fuses dt-bindings: nvmem: qfprom: Convert to yaml nvmem: qfprom: use NVMEM_DEVID_AUTO for multiple instances nvmem: core: add support to auto devid nvmem: core: Add nvmem_cell_read_u8() nvmem: core: Grammar fixes for help text nvmem: sc27xx: add sc2730 efuse support nvmem: Enforce nvmem stride in the sysfs interface MAINTAINERS: Add git tree for NVMEM FRAMEWORK nvmem: sprd: Fix return value of sprd_efuse_probe() drivers: android: Fix the SPDX comment style drivers: android: Fix a variable declaration coding style issue drivers: android: Remove braces for a single statement if-else block drivers: android: Remove the use of else after return drivers: android: Fix a variable declaration coding style issue ... commit 060a72a268577cf27733d9e8eb03b3ca427f45e6 Merge: 22fcffebedf0a 1a1206dc4cf02 Author: Linus Torvalds Date: Wed Aug 5 11:12:34 2020 -0700 Merge tag 'for-5.9/block-merge-20200804' of git://git.kernel.dk/linux-block Pull block stacking updates from Jens Axboe: "The stacking related fixes depended on both the core block and drivers branches, so here's a topic branch with that change. Outside of that, a late fix from Johannes for zone revalidation" * tag 'for-5.9/block-merge-20200804' of git://git.kernel.dk/linux-block: block: don't do revalidate zones on invalid devices block: remove blk_queue_stack_limits block: remove bdev_stack_limits block: inherit the zoned characteristics in blk_stack_limits commit 22fcffebedf0a208f97dbf9d898c53b844ff153d Author: Russell King Date: Wed Aug 5 15:34:31 2020 +0100 MAINTAINERS: update phylink/sfp keyword matching syzbot has revealed that the "phylink" keyword exists in non-phylink related contexts in the bluetooth stack. To avoid receiving inappropriate notifications, change the keyword matching regexp to something which avoids this, while still allowing changes to networking drivers that make use of phylink to be detected. Signed-off-by: Russell King Signed-off-by: Linus Torvalds commit e0fc99e21e6e299673f1640105ac0c1d829c2d93 Merge: 4834ce9d8e074 f59589fc89665 Author: Linus Torvalds Date: Wed Aug 5 10:51:40 2020 -0700 Merge tag 'for-5.9/drivers-20200803' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: - NVMe: - ZNS support (Aravind, Keith, Matias, Niklas) - Misc cleanups, optimizations, fixes (Baolin, Chaitanya, David, Dongli, Max, Sagi) - null_blk zone capacity support (Aravind) - MD: - raid5/6 fixes (ChangSyun) - Warning fixes (Damien) - raid5 stripe fixes (Guoqing, Song, Yufen) - sysfs deadlock fix (Junxiao) - raid10 deadlock fix (Vitaly) - struct_size conversions (Gustavo) - Set of bcache updates/fixes (Coly) * tag 'for-5.9/drivers-20200803' of git://git.kernel.dk/linux-block: (117 commits) md/raid5: Allow degraded raid6 to do rmw md/raid5: Fix Force reconstruct-write io stuck in degraded raid5 raid5: don't duplicate code for different paths in handle_stripe raid5-cache: hold spinlock instead of mutex in r5c_journal_mode_show md: print errno in super_written md/raid5: remove the redundant setting of STRIPE_HANDLE md: register new md sysfs file 'uuid' read-only md: fix max sectors calculation for super 1.0 nvme-loop: remove extra variable in create ctrl nvme-loop: set ctrl state connecting after init nvme-multipath: do not fall back to __nvme_find_path() for non-optimized paths nvme-multipath: fix logic for non-optimized paths nvme-rdma: fix controller reset hang during traffic nvme-tcp: fix controller reset hang during traffic nvmet: introduce the passthru Kconfig option nvmet: introduce the passthru configfs interface nvmet: Add passthru enable/disable helpers nvmet: add passthru code to process commands nvme: export nvme_find_get_ns() and nvme_put_ns() nvme: introduce nvme_ctrl_get_by_path() ... commit 4834ce9d8e074bb7ae197632e0708219b9f389b5 Merge: 53e5504bdbdb1 850d0cc64c8e2 Author: Linus Torvalds Date: Wed Aug 5 10:28:25 2020 -0700 Merge tag 'linux-kselftest-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates form Shuah Khan: - TAP output reporting related fixes from Paolo Bonzini and Kees Cook. These fixes make it skip reporting consistent with TAP format. - Cleanup fixes to framework run_tests from Yauheni Kaliuta * tag 'linux-kselftest-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (23 commits) selftests/harness: Limit step counter reporting selftests/seccomp: Check ENOSYS under tracing selftests/seccomp: Refactor to use fixture variants selftests/harness: Clean up kern-doc for fixtures selftests: kmod: Add module address visibility test Replace HTTP links with HTTPS ones: KMOD KERNEL MODULE LOADER - USERMODE HELPER selftests: fix condition in run_tests selftests: do not use .ONESHELL selftests: pidfd: skip test if unshare fails with EPERM selftests: pidfd: do not use ksft_exit_skip after ksft_set_plan selftests/harness: Report skip reason selftests/harness: Display signed values correctly selftests/harness: Refactor XFAIL into SKIP selftests/harness: Switch to TAP output selftests: Add header documentation and helpers selftests/binderfs: Fix harness API usage selftests: Remove unneeded selftest API headers selftests/clone3: Reorder reporting output selftests: sync_test: do not use ksft_exit_skip after ksft_set_plan selftests: sigaltstack: do not use ksft_exit_skip after ksft_set_plan ... commit 53e5504bdbdb16548e39a4834c97742693964197 Merge: 2324d50d051ec d43c7fb057651 Author: Linus Torvalds Date: Wed Aug 5 10:07:39 2020 -0700 Merge tag 'linux-kselftest-kunit-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kunit updates from Shuah Khan: - Add a generic kunit_resource API extending it to support resources that are passed in to kunit in addition kunit allocated resources. In addition, KUnit resources are now refcounted to avoid passed in resources being released while in use by kunit. - Add support for named resources. - Important bug fixes from Brendan Higgins and Will Chen * tag 'linux-kselftest-kunit-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: tool: fix improper treatment of file location kunit: tool: fix broken default args in unit tests kunit: capture stderr on all make subprocess calls Documentation: kunit: Remove references to --defconfig kunit: add support for named resources kunit: generalize kunit_resource API beyond allocated resources commit d5b29c2c5ba2bd5bbdb5b744659984185d17d079 Author: Tero Kristo Date: Fri Jul 17 16:29:58 2020 +0300 watchdog: rti-wdt: balance pm runtime enable calls PM runtime should be disabled in the fail path of probe and when the driver is removed. Fixes: 2d63908bdbfb ("watchdog: Add K3 RTI watchdog support") Signed-off-by: Tero Kristo Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200717132958.14304-5-t-kristo@ti.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5527483f8f7c8edadb5ad4fe8fcb569f565369ea Author: Tero Kristo Date: Fri Jul 17 16:29:57 2020 +0300 watchdog: rti-wdt: attach to running watchdog during probe If the RTI watchdog is running already during probe, the driver must configure itself to match the HW. Window size and timeout is probed from hardware, and the last keepalive ping is adjusted to match it also. Signed-off-by: Tero Kristo Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200717132958.14304-4-t-kristo@ti.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit cef9572e9af373cefd1adc9e771e89670da5da3c Author: Tero Kristo Date: Fri Jul 17 16:29:56 2020 +0300 watchdog: add support for adjusting last known HW keepalive time Certain watchdogs require the watchdog only to be pinged within a specific time window, pinging too early or too late cause the watchdog to fire. In cases where this sort of watchdog has been started before kernel comes up, we must adjust the watchdog keepalive window to match the actually running timer, so add a new driver API for this purpose. Signed-off-by: Tero Kristo Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200717132958.14304-3-t-kristo@ti.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit fbbe35dfcf949f4d6cf987648e52a85fc0c2a23a Author: Tero Kristo Date: Fri Jul 17 16:29:55 2020 +0300 watchdog: use __watchdog_ping in startup Current watchdog startup functionality does not respect the minimum hw heartbeat setup and the last watchdog ping timeframe when watchdog is already running and userspace process attaches to it. Fix this by using the __watchdog_ping from the startup also. For this code path, we can also let the __watchdog_ping handle the bookkeeping for the worker and last keepalive times. Signed-off-by: Tero Kristo Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200717132958.14304-2-t-kristo@ti.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 36a8947c6b5423b2fb867a7af87ae40eb12f4123 Author: Woody Lin Date: Wed Jul 8 16:32:19 2020 +0800 watchdog: softdog: Add options 'soft_reboot_cmd' and 'soft_active_on_boot' Add module parameters 'soft_reboot_cmd' and 'soft_active_on_boot' for customizing softdog configuration; config reboot command by assigning soft_reboot_cmd, and set soft_active_on_boot to start up softdog timer at module initialization stage. Signed-off-by: Woody Lin Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200708083218.3157213-1-woodylin@google.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit f1889c9066722f56428978ce9431a6cacabecb57 Author: Xu Wang Date: Mon Jul 13 05:53:48 2020 +0000 watchdog: pcwd_usb: remove needless check before usb_free_coherent() usb_free_coherent() is safe with NULL usb_pcwd->intr_buffer and this check is not required. Signed-off-by: Xu Wang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200713055348.21620-1-vulab@iscas.ac.cn Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 2ab77a34d070b1611a52b50c7cfae074153d475b Author: Alexander A. Klimov Date: Mon Jul 13 22:58:21 2020 +0200 watchdog: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Reviewed-by: Guenter Roeck Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200713205821.38223-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d821ab28dfd2fa85a9aed133e9bfd368c156cc04 Author: Lad Prabhakar Date: Wed Jul 15 12:09:06 2020 +0100 dt-bindings: watchdog: renesas,wdt: Document r8a774e1 support RZ/G2H (a.k.a. R8A774E1) watchdog implementation is compatible with R-Car Gen3, therefore add the relevant documentation. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Guenter Roeck Acked-by: Rob Herring Link: https://lore.kernel.org/r/1594811350-14066-17-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit cb36e29bb0e4b0c33c3d5866a0a4aebace4c99b7 Author: Krzysztof Sobota Date: Fri Jul 17 12:31:09 2020 +0200 watchdog: initialize device before misc_register When watchdog device is being registered, it calls misc_register that makes watchdog available for systemd to open. This is a data race scenario, because when device is open it may still have device struct not initialized - this in turn causes a crash. This patch moves device initialization before misc_register call and it solves the problem printed below. ------------[ cut here ]------------ WARNING: CPU: 3 PID: 1 at lib/kobject.c:612 kobject_get+0x50/0x54 kobject: '(null)' ((ptrval)): is not initialized, yet kobject_get() is being called. Modules linked in: k2_reset_status(O) davinci_wdt(+) sfn_platform_hwbcn(O) fsmddg_sfn(O) clk_misc_mmap(O) clk_sw_bcn(O) fsp_reset(O) cma_mod(O) slave_sup_notif(O) fpga_master(O) latency(O+) evnotify(O) enable_arm_pmu(O) xge(O) rio_mport_cdev br_netfilter bridge stp llc nvrd_checksum(O) ipv6 CPU: 3 PID: 1 Comm: systemd Tainted: G O 4.19.113-g2579778-fsm4_k2 #1 Hardware name: Keystone [] (unwind_backtrace) from [] (show_stack+0x18/0x1c) [] (show_stack) from [] (dump_stack+0xb4/0xe8) [] (dump_stack) from [] (__warn+0xfc/0x114) [] (__warn) from [] (warn_slowpath_fmt+0x50/0x74) [] (warn_slowpath_fmt) from [] (kobject_get+0x50/0x54) [] (kobject_get) from [] (get_device+0x1c/0x24) [] (get_device) from [] (watchdog_open+0x90/0xf0) [] (watchdog_open) from [] (misc_open+0x130/0x17c) [] (misc_open) from [] (chrdev_open+0xec/0x1a8) [] (chrdev_open) from [] (do_dentry_open+0x204/0x3cc) [] (do_dentry_open) from [] (path_openat+0x330/0x1148) [] (path_openat) from [] (do_filp_open+0x78/0xec) [] (do_filp_open) from [] (do_sys_open+0x130/0x1f4) [] (do_sys_open) from [] (ret_fast_syscall+0x0/0x28) Exception stack(0xd2ceffa8 to 0xd2cefff0) ffa0: b6f69968 00000000 ffffff9c b6ebd210 000a0001 00000000 ffc0: b6f69968 00000000 00000000 00000142 fffffffd ffffffff 00b65530 bed7bb78 ffe0: 00000142 bed7ba70 b6cc2503 b6cc41d6 ---[ end trace 7b16eb105513974f ]--- ------------[ cut here ]------------ WARNING: CPU: 3 PID: 1 at lib/refcount.c:153 kobject_get+0x24/0x54 refcount_t: increment on 0; use-after-free. Modules linked in: k2_reset_status(O) davinci_wdt(+) sfn_platform_hwbcn(O) fsmddg_sfn(O) clk_misc_mmap(O) clk_sw_bcn(O) fsp_reset(O) cma_mod(O) slave_sup_notif(O) fpga_master(O) latency(O+) evnotify(O) enable_arm_pmu(O) xge(O) rio_mport_cdev br_netfilter bridge stp llc nvrd_checksum(O) ipv6 CPU: 3 PID: 1 Comm: systemd Tainted: G W O 4.19.113-g2579778-fsm4_k2 #1 Hardware name: Keystone [] (unwind_backtrace) from [] (show_stack+0x18/0x1c) [] (show_stack) from [] (dump_stack+0xb4/0xe8) [] (dump_stack) from [] (__warn+0xfc/0x114) [] (__warn) from [] (warn_slowpath_fmt+0x50/0x74) [] (warn_slowpath_fmt) from [] (kobject_get+0x24/0x54) [] (kobject_get) from [] (get_device+0x1c/0x24) [] (get_device) from [] (watchdog_open+0x90/0xf0) [] (watchdog_open) from [] (misc_open+0x130/0x17c) [] (misc_open) from [] (chrdev_open+0xec/0x1a8) [] (chrdev_open) from [] (do_dentry_open+0x204/0x3cc) [] (do_dentry_open) from [] (path_openat+0x330/0x1148) [] (path_openat) from [] (do_filp_open+0x78/0xec) [] (do_filp_open) from [] (do_sys_open+0x130/0x1f4) [] (do_sys_open) from [] (ret_fast_syscall+0x0/0x28) Exception stack(0xd2ceffa8 to 0xd2cefff0) ffa0: b6f69968 00000000 ffffff9c b6ebd210 000a0001 00000000 ffc0: b6f69968 00000000 00000000 00000142 fffffffd ffffffff 00b65530 bed7bb78 ffe0: 00000142 bed7ba70 b6cc2503 b6cc41d6 ---[ end trace 7b16eb1055139750 ]--- Fixes: 72139dfa2464 ("watchdog: Fix the race between the release of watchdog_core_data and cdev") Reviewed-by: Guenter Roeck Reviewed-by: Alexander Sverdlin Signed-off-by: Krzysztof Sobota Link: https://lore.kernel.org/r/20200717103109.14660-1-krzysztof.sobota@nokia.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ee86a03a5dc64899edb39fe1ce21429fed98d107 Author: Timothy Myers Date: Mon Jul 6 16:33:31 2020 +0000 watchdog: booke_wdt: Add common nowayout parameter driver Add the common "nowayout" parameter to booke_wdt to make this behavior selectable at runtime and to make the implementation more consistent with many other watchdog drivers. Signed-off-by: Timothy Myers Reviewed-by: Guenter Roeck [groeck: Dropped version data, cleaned up subject line] Link: https://lore.kernel.org/r/CH2PR19MB359059AA5C8917D8D24633FF9D690@CH2PR19MB3590.namprd19.prod.outlook.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 55a1b87e07fdac9194d8b0c3ded3c4d01e9234ad Author: Gustavo A. R. Silva Date: Fri Jul 17 11:40:59 2020 -0500 watchdog: scx200_wdt: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7-rc7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200717164059.GA26947@embeddedor Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit bd490f8222510dea748b495a502910119060e869 Author: Gustavo A. R. Silva Date: Tue Jul 7 12:11:21 2020 -0500 watchdog: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200707171121.GA13472@embeddedor Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5edc8c687357b40469d90e3dab0b59b72eaabf59 Author: Ahmad Fatoum Date: Thu Jun 11 21:17:46 2020 +0200 watchdog: f71808e_wdt: do stricter parameter validation We check the f71862fg_pin module parameter every time a watchdog device for the f71862fg is opened, but the parameter can't change at runtime. If we move the check to the start of init: - We catch userspace passing invalid, but unused, values - We check the condition only once - We simplify the code Do so. Signed-off-by: Ahmad Fatoum Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200611191750.28096-6-a.fatoum@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4f39d575844148fbf3081571a1f3b4ae04150958 Author: Ahmad Fatoum Date: Thu Jun 11 21:17:45 2020 +0200 watchdog: f71808e_wdt: clear watchdog timeout occurred flag The flag indicating a watchdog timeout having occurred normally persists till Power-On Reset of the Fintek Super I/O chip. The user can clear it by writing a `1' to the bit. The driver doesn't offer a restart method, so regular system reboot might not reset the Super I/O and if the watchdog isn't enabled, we won't touch the register containing the bit on the next boot. In this case all subsequent regular reboots will be wrongly flagged by the driver as being caused by the watchdog. Fix this by having the flag cleared after read. This is also done by other drivers like those for the i6300esb and mpc8xxx_wdt. Fixes: b97cb21a4634 ("watchdog: f71808e_wdt: Fix WDTMOUT_STS register read") Cc: stable@vger.kernel.org Signed-off-by: Ahmad Fatoum Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200611191750.28096-5-a.fatoum@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 802141462d844f2e6a4d63a12260d79b7afc4c34 Author: Ahmad Fatoum Date: Thu Jun 11 21:17:44 2020 +0200 watchdog: f71808e_wdt: remove use of wrong watchdog_info option The flags that should be or-ed into the watchdog_info.options by drivers all start with WDIOF_, e.g. WDIOF_SETTIMEOUT, which indicates that the driver's watchdog_ops has a usable set_timeout. WDIOC_SETTIMEOUT was used instead, which expands to 0xc0045706, which equals: WDIOF_FANFAULT | WDIOF_EXTERN1 | WDIOF_PRETIMEOUT | WDIOF_ALARMONLY | WDIOF_MAGICCLOSE | 0xc0045000 These were so far indicated to userspace on WDIOC_GETSUPPORT. As the driver has not yet been migrated to the new watchdog kernel API, the constant can just be dropped without substitute. Fixes: 96cb4eb019ce ("watchdog: f71808e_wdt: new watchdog driver for Fintek F71808E and F71882FG") Cc: stable@vger.kernel.org Signed-off-by: Ahmad Fatoum Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200611191750.28096-4-a.fatoum@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit e871e93fb08a619dfc015974a05768ed6880fd82 Author: Ahmad Fatoum Date: Thu Jun 11 21:17:43 2020 +0200 watchdog: f71808e_wdt: indicate WDIOF_CARDRESET support in watchdog_info.options The driver supports populating bootstatus with WDIOF_CARDRESET, but so far userspace couldn't portably determine whether absence of this flag meant no watchdog reset or no driver support. Or-in the bit to fix this. Fixes: b97cb21a4634 ("watchdog: f71808e_wdt: Fix WDTMOUT_STS register read") Cc: stable@vger.kernel.org Signed-off-by: Ahmad Fatoum Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200611191750.28096-3-a.fatoum@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d51d3852d1fd28409107274dc1d8077022cc0dc2 Author: Ahmad Fatoum Date: Thu Jun 11 21:17:42 2020 +0200 docs: watchdog: codify ident.options as superset of possible status flags The FIXME comment has been in-tree since the very first git commit. The described behavior has been since relied on by some userspace, e.g. the util-linux wdctl command and has been ignored by some kernelspace, like the f71808e_wdt driver. The functionality is useful to have to be able to differentiate between a driver that doesn't support WDIOF_CARDRESET and one that does, but hasn't had a watchdog reset, thus drop the FIXME to encourage drivers adopting this convention. Signed-off-by: Ahmad Fatoum Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200611191750.28096-2-a.fatoum@pengutronix.de Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a4fd26f6187b13cace0f90029fe790799e34e4e2 Author: Sai Prakash Ranjan Date: Fri Jun 26 00:59:05 2020 +0530 dt-bindings: watchdog: Add compatible for QCS404, SC7180, SDM845, SM8150 Add missing compatible for watchdog timer on QCS404, SC7180, SDM845 and SM8150 SoCs. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Stephen Boyd Acked-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/09da1ba319dc4a27ef4e4e177e67e68f1cb4f35b.1593112534.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 137e9e68dd3805deb9fa43b3eb1a963a2d093746 Author: Sai Prakash Ranjan Date: Fri Jun 26 00:59:04 2020 +0530 dt-bindings: watchdog: Convert QCOM watchdog timer bindings to YAML Convert QCOM watchdog timer bindings to DT schema format using json-schema. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/77b47aad9d17cb4ec8359bdbbb30c33d818117e6.1593112534.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4105f19fd0ce51b571f8112457182dfad142768e Author: Serge Semin Date: Sat May 30 10:35:57 2020 +0300 watchdog: dw_wdt: Add DebugFS files For the sake of the easier device-driver debug procedure, we added a DebugFS file with the controller registers state. It's available only if kernel is configured with DebugFS support. Signed-off-by: Serge Semin Reviewed-by: Guenter Roeck Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-mips@vger.kernel.org Cc: devicetree@vger.kernel.org Link: https://lore.kernel.org/r/20200530073557.22661-8-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 46a1946314bfe7db46e1f28e0ce2b6f701fae50b Author: Serge Semin Date: Sat May 30 10:35:56 2020 +0300 watchdog: dw_wdt: Add pre-timeouts support DW Watchdog can rise an interrupt in case if IRQ request mode is enabled and timer reaches the zero value. In this case the IRQ lane is left pending until either the next watchdog kick event (watchdog restart) or until the WDT_EOI register is read or the device/system reset. This interface can be used to implement the pre-timeout functionality optionally provided by the Linux kernel watchdog devices. IRQ mode provides a two stages timeout interface. It means the IRQ is raised when the counter reaches zero, while the system reset occurs only after subsequent timeout if the timer restart is not performed. Due to this peculiarity the pre-timeout value is actually set to the achieved hardware timeout, while the real watchdog timeout is considered to be twice as much of it. This applies a significant limitation on the pre-timeout values, so current implementation supports either zero value, which disables the pre-timeout events, or non-zero values, which imply the pre-timeout to be at least half of the current watchdog timeout. Note that we ask the interrupt controller to detect the rising-edge pre-timeout interrupts to prevent the high-level-IRQs flood, since if the pre-timeout happens, the IRQ lane will be left pending until it's cleared by the timer restart. Signed-off-by: Serge Semin Reviewed-by: Guenter Roeck Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-mips@vger.kernel.org Cc: devicetree@vger.kernel.org Link: https://lore.kernel.org/r/20200530073557.22661-7-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit a16f58bf154cdf589cf72cb1596b6217da5872a1 Author: Serge Semin Date: Sat May 30 10:35:55 2020 +0300 watchdog: dw_wdt: Support devices with asynch clocks DW Watchdog IP core can be synthesised with asynchronous timer/APB clocks support (WDT_ASYNC_CLK_MODE_ENABLE == 1). In this case separate clock signals are supposed to be used to feed watchdog timer and APB interface of the device. Currently the driver supports the synchronous mode only. Since there is no way to determine which mode was actually activated for device from its registers, we have to rely on the platform device configuration data. If optional "pclk" clock source is supplied, we consider the device working in asynchronous mode, otherwise the driver falls back to the synchronous configuration. Signed-off-by: Serge Semin Reviewed-by: Guenter Roeck Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-mips@vger.kernel.org Cc: devicetree@vger.kernel.org Link: https://lore.kernel.org/r/20200530073557.22661-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 86445535887e580036d0094a849126703a33fd62 Author: Serge Semin Date: Sat May 30 10:35:54 2020 +0300 watchdog: dw_wdt: Support devices with non-fixed TOP values In case if the DW Watchdog IP core is synthesised with WDT_USE_FIX_TOP == false, the TOP interval indexes make the device to load a custom periods to the counter. These periods are hardwired at the IP synthesis stage and can be within [2^8, 2^(WDT_CNT_WIDTH - 1)]. Alas their values can't be detected at runtime and must be somehow supplied to the driver so one could properly determine the watchdog timeout intervals. For this purpose we suggest to have a vendor- specific dts property "snps,watchdog-tops" utilized, which would provide an array of sixteen counter values. At device probe stage they will be used to initialize the watchdog device timeouts determined from the array values and current clocks source rate. In order to have custom TOP values supported the driver must be altered in the following way. First of all the fixed-top values ready-to-use array must be determined for compatibility with currently supported devices, which were synthesised with WDT_USE_FIX_TOP == true. It will be used if either fixed TOP feature is detected being enabled or no custom TOPs are fetched from the device dt node. Secondly at the probe stage we must initialize an array of the watchdog timeouts corresponding to the detected TOPs list and the reference clock rate. For generality the procedure of initialization is designed in a way to support the TOPs array with no limitations on the items order or value. Finally the watchdog period search methods should be altered to support the new timeouts data structure. Signed-off-by: Serge Semin Reviewed-by: Guenter Roeck Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: Rob Herring Cc: linux-mips@vger.kernel.org Cc: devicetree@vger.kernel.org Link: https://lore.kernel.org/r/20200530073557.22661-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 4ce4e7fdc3c924ea3e6d5d68178127b46568d8df Author: Serge Semin Date: Sat May 30 10:35:53 2020 +0300 dt-bindings: watchdog: dw-wdt: Add watchdog TOPs array property In case if DW Watchdog IP core is built with WDT_USE_FIX_TOP == false, a custom timeout periods are used to preset the timer counter. In this case that periods should be specified in a new "snps,watchdog-tops" property of the DW watchdog dts node. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: linux-mips@vger.kernel.org Link: https://lore.kernel.org/r/20200530073557.22661-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 5b4f68f808ff96a0a48456ff8da250a2caf3f545 Author: Serge Semin Date: Sat May 30 10:35:52 2020 +0300 dt-bindings: watchdog: dw-wdt: Support devices with asynch clocks DW Watchdog IP core can be synthesised with asynchronous timer/APB clocks support (WDT_ASYNC_CLK_MODE_ENABLE == 1). In this case separate clock signals are supposed to be used to feed watchdog timer and APB interface of the device. Let's update the DW Watchdog DT node schema so it would support the optional APB3 bus clock specified along with the mandatory watchdog timer reference clock. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: linux-mips@vger.kernel.org Link: https://lore.kernel.org/r/20200530073557.22661-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 9807a8884143148f2ee5a882d6273806403e9345 Author: Serge Semin Date: Sat May 30 10:35:51 2020 +0300 dt-bindings: watchdog: Convert DW WDT binding to DT schema Modern device tree bindings are supposed to be created as YAML-files in accordance with dt-schema. This commit replaces the DW Watchdog legacy bare text bindings with YAML file. As before the binding states that the corresponding dts node is supposed to have a registers range, a watchdog timer references clock source, optional reset line and pre-timeout interrupt. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Reviewed-by: Guenter Roeck Cc: Alexey Malahov Cc: Thomas Bogendoerfer Cc: Arnd Bergmann Cc: linux-mips@vger.kernel.org Link: https://lore.kernel.org/r/20200530073557.22661-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 04daa8c049bc0cd4747d671d8b855f3d0fa39997 Author: Lukas Bulwahn Date: Tue Jun 2 07:21:04 2020 +0200 MAINTAINERS: rectify entry in ARM SMC WATCHDOG DRIVER Commit 5c24a28b4eb8 ("dt-bindings: watchdog: Add ARM smc wdt for mt8173 watchdog") added the new ARM SMC WATCHDOG DRIVER entry in MAINTAINERS, but slipped in a minor mistake. Luckily, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: devicetree/bindings/watchdog/arm-smc-wdt.yaml Update file entry to intended file location. Signed-off-by: Lukas Bulwahn Reviewed-by: Guenter Roeck Reviewed-by: Julius Werner Reviewed-by: Evan Benn Link: https://lore.kernel.org/r/20200602052104.7795-1-lukas.bulwahn@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 893c3d82b425d8d448da030c80420072ff4edbf1 Author: Wang Qing Date: Fri Jun 12 15:03:04 2020 +0800 watchdog: Use kobj_to_dev() API Use kobj_to_dev() API instead of container_of(). Signed-off-by: Wang Qing Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1591945384-14587-1-git-send-email-wangqing@vivo.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit fd998972458f06d3fadbf4e55a3725c4edc17c12 Author: Tiezhu Yang Date: Mon May 25 15:31:04 2020 +0800 watchdog: bcm_kona_wdt: Use correct return value for bcm_kona_wdt_probe() When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Signed-off-by: Tiezhu Yang Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1590391864-308-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit ff01cb1ca1f9e02e54e562bb97999e4bf1726a9e Author: Martin Wu Date: Fri May 29 17:45:14 2020 +0800 watchdog: sunxi_wdt: fix improper error exit code sunxi_wdt_probe() should return -ENOMEM when devm_kzalloc() fails. Signed-off-by: Martin Wu Signed-off-by: Frank Lee Acked-by: Maxime Ripard Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200529094514.26374-1-frank@allwinnertech.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 0be01476dd527dfa00976911208332c706a1b752 Author: Bumsik Kim Date: Fri May 29 10:24:28 2020 +0900 watchdog: test_bit() => watchdog_active() Use the dedicated function watchdog_active() instead of the generic test_bit() function. It is done using the following Coccinelle script: @@ identifier wdd; @@ - test_bit(WDOG_ACTIVE, &wdd->status) + watchdog_active(wdd) Signed-off-by: Bumsik Kim Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200529012428.84684-1-k.bumsik@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit d6e6d5627f0aaa16d6b6e94238d62a594a35b5ce Author: Michael Shych Date: Mon May 4 17:14:27 2020 +0300 docs: watchdog: mlx-wdt: Add description of new watchdog type 3 Add documentation with details of new type of Mellanox watchdog driver. Signed-off-by: Michael Shych Reviewed-by: Vadim Pasternak Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20200504141427.17685-5-michaelsh@mellanox.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit eee851143bca4422eeee3bb2e104b85537ba449d Author: Michael Shych Date: Mon May 4 17:14:26 2020 +0300 watchdog: mlx-wdt: support new watchdog type with longer timeout period New programmable logic device can have watchdog type 3 implementation. It's same as Type 2 with extended maximum timeout period. Maximum timeout is up-to 65535 sec. Type 3 HW watchdog implementation can exist on all Mellanox systems. It is differentiated by WD capability bit. Signed-off-by: Michael Shych Reviewed-by: Vadim Pasternak Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20200504141427.17685-4-michaelsh@mellanox.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 7772b993fd96dc8f776356b1d5e18a4df7e68268 Author: Michael Shych Date: Mon May 4 17:14:25 2020 +0300 platform/x86: mlx-platform: support new watchdog type with longer timeout Add verification of WD capability in order to distinguish between the existing WD types and new type, implemented in CPLD. Add configuration for a new WD type. Change access mode for watchdog registers. Signed-off-by: Michael Shych Reviewed-by: Vadim Pasternak Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200504141427.17685-3-michaelsh@mellanox.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 923a3a863ae0c26876d704fb3453069e11ebdcb6 Author: Michael Shych Date: Mon May 4 17:14:24 2020 +0300 platform_data/mlxreg: support new watchdog type with longer timeout period Add new watchdog type 3 with longer timeout period. Extend size of health_cntr field that that can be used to init watchdog timeout period. Signed-off-by: Michael Shych Reviewed-by: Vadim Pasternak Acked-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200504141427.17685-2-michaelsh@mellanox.com Signed-off-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck commit 60263d5889e6dc5987dc51b801be4955ff2e4aa7 Author: Christoph Hellwig Date: Thu Jul 23 22:45:59 2020 -0700 iomap: fall back to buffered writes for invalidation failures Failing to invalid the page cache means data in incoherent, which is a very bad state for the system. Always fall back to buffered I/O through the page cache if we can't invalidate mappings. Signed-off-by: Christoph Hellwig Acked-by: Dave Chinner Reviewed-by: Goldwyn Rodrigues Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Bob Peterson Acked-by: Damien Le Moal Reviewed-by: Theodore Ts'o # for ext4 Reviewed-by: Andreas Gruenbacher # for gfs2 Reviewed-by: Ritesh Harjani commit 80e543ae24db8f03241004136cb5bb37586fba70 Author: Christoph Hellwig Date: Thu Jul 23 22:45:58 2020 -0700 xfs: use ENOTBLK for direct I/O to buffered I/O fallback This is what the classic fs/direct-io.c implementation and thuse other file systems use. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 54752de928c40028e5575ab6b49be9ec3c24b466 Author: Dave Chinner Date: Thu Jul 23 22:45:58 2020 -0700 iomap: Only invalidate page cache pages on direct IO writes The historic requirement for XFS to invalidate cached pages on direct IO reads has been lost in the twisty pages of history - it was inherited from Irix, which implemented page cache invalidation on read as a method of working around problems synchronising page cache state with uncached IO. XFS has carried this ever since. In the initial linux ports it was necessary to get mmap and DIO to play "ok" together and not immediately corrupt data. This was the state of play until the linux kernel had infrastructure to track unwritten extents and synchronise page faults with allocations and unwritten extent conversions (->page_mkwrite infrastructure). IOws, the page cache invalidation on DIO read was necessary to prevent trivial data corruptions. This didn't solve all the problems, though. There were peformance problems if we didn't invalidate the entire page cache over the file on read - we couldn't easily determine if the cached pages were over the range of the IO, and invalidation required taking a serialising lock (i_mutex) on the inode. This serialising lock was an issue for XFS, as it was the only exclusive lock in the direct Io read path. Hence if there were any cached pages, we'd just invalidate the entire file in one go so that subsequent IOs didn't need to take the serialising lock. This was a problem that prevented ranged invalidation from being particularly useful for avoiding the remaining coherency issues. This was solved with the conversion of i_mutex to i_rwsem and the conversion of the XFS inode IO lock to use i_rwsem. Hence we could now just do ranged invalidation and the performance problem went away. However, page cache invalidation was still needed to serialise sub-page/sub-block zeroing via direct IO against buffered IO because bufferhead state attached to the cached page could get out of whack when direct IOs were issued. We've removed bufferheads from the XFS code, and we don't carry any extent state on the cached pages anymore, and so this problem has gone away, too. IOWs, it would appear that we don't have any good reason to be invalidating the page cache on DIO reads anymore. Hence remove the invalidation on read because it is unnecessary overhead, not needed to maintain coherency between mmap/buffered access and direct IO anymore, and prevents anyone from using direct IO reads from intentionally invalidating the page cache of a file. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit ae1ba50f1e706dfd7ce402ac52c1f1f10becad68 Author: Tobias Schramm Date: Tue Aug 4 21:51:36 2020 +0200 spi: stm32: clear only asserted irq flags on interrupt Previously the stm32h7 interrupt thread cleared all non-masked interrupts. If an interrupt was to occur during the handling of another interrupt its flag would be unset, resulting in a lost interrupt. This patches fixes the issue by clearing only the currently set interrupt flags. Signed-off-by: Tobias Schramm Link: https://lore.kernel.org/r/20200804195136.1485392-1-t.schramm@manjaro.org Signed-off-by: Mark Brown commit b63da6c8dfa9b2ab3554e8c59ef294d1f28bb9bd Author: Randy Dunlap Date: Wed Aug 5 08:49:58 2020 -0700 xfs: delete duplicated words + other fixes Delete repeated words in fs/xfs/. {we, that, the, a, to, fork} Change "it it" to "it is" in one location. Signed-off-by: Randy Dunlap To: linux-fsdevel@vger.kernel.org Cc: Darrick J. Wong Cc: linux-xfs@vger.kernel.org Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 02e37571f9e79022498fd0525c073b07e9d9ac69 Author: Jeff Layton Date: Tue Aug 4 12:31:56 2020 -0400 ceph: handle zero-length feature mask in session messages Most session messages contain a feature mask, but the MDS will routinely send a REJECT message with one that is zero-length. Commit 0fa8263367db ("ceph: fix endianness bug when handling MDS session feature bits") fixed the decoding of the feature mask, but failed to account for the MDS sending a zero-length feature mask. This causes REJECT message decoding to fail. Skip trying to decode a feature mask if the word count is zero. Cc: stable@vger.kernel.org URL: https://tracker.ceph.com/issues/46823 Fixes: 0fa8263367db ("ceph: fix endianness bug when handling MDS session feature bits") Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Tested-by: Patrick Donnelly Signed-off-by: Ilya Dryomov commit 4c05433bc6fb4ae172270f0279be8ba89a3da64f Author: Zhu Lingshan Date: Tue Aug 4 18:21:23 2020 +0800 vDPA: dont change vq irq after DRIVER_OK IRQ of a vq is not expected to be changed in a DRIVER_OK ~ !DRIVER_OK period for irq offloading purposes. Place this comment at the side of bus ops get_vq_irq than in set_status in vhost_vdpa. Signed-off-by: Zhu Lingshan Link: https://lore.kernel.org/r/20200804102123.69978-1-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 46af9adefd2fd44afa9e8a5020c520812151f849 Author: Liao Pingfang Date: Mon Aug 3 19:52:24 2020 +0800 virtio_pci_modern: Fix the comment of virtio_pci_find_capability() Fix the comment of virtio_pci_find_capability() by adding missing comment for the last parameter: bars. Fixes: 59a5b0f7bf74 ("virtio-pci: alloc only resources actually used.") Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang Link: https://lore.kernel.org/r/1596455545-43556-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit a979a6aa009f3c99689432e0cdb5402a4463fb88 Author: Zhu Lingshan Date: Fri Jul 31 14:55:33 2020 +0800 irqbypass: do not start cons/prod when failed connect If failed to connect, there is no need to start consumer nor producer. Signed-off-by: Zhu Lingshan Suggested-by: Jason Wang Link: https://lore.kernel.org/r/20200731065533.4144-7-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 3597a2fba672cfd4112bbdbe6220127f280c8dba Author: Zhu Lingshan Date: Fri Jul 31 14:55:32 2020 +0800 ifcvf: implement vdpa_config_ops.get_vq_irq() This commit implemented vdpa_config_ops.get_vq_irq() in ifcvf, and initialized vq irq to -EINVAL. So that ifcvf can report irq number of a vq, or -EINVAL if the vq is not assigned an irq number. Signed-off-by: Zhu Lingshan Suggested-by: Jason Wang Link: https://lore.kernel.org/r/20200731065533.4144-6-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 2cf1ba9a4d15cb78b96ea97f727b93382c3f9a60 Author: Zhu Lingshan Date: Fri Jul 31 14:55:31 2020 +0800 vhost_vdpa: implement IRQ offloading in vhost_vdpa This patch introduce a set of functions for setup/unsetup and update irq offloading respectively by register/unregister and re-register the irq_bypass_producer. With these functions, this commit can setup/unsetup irq offloading through setting DRIVER_OK/!DRIVER_OK, and update irq offloading through SET_VRING_CALL. Signed-off-by: Zhu Lingshan Suggested-by: Jason Wang Link: https://lore.kernel.org/r/20200731065533.4144-5-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 7164675ab5caf46867d6a5448f4ff3af92d80a30 Author: Zhu Lingshan Date: Fri Jul 31 14:55:30 2020 +0800 vDPA: add get_vq_irq() in vdpa_config_ops This commit adds a new function get_vq_irq() in struct vdpa_config_ops, which will return the irq number of a virtqueue. Signed-off-by: Zhu Lingshan Suggested-by: Jason Wang Link: https://lore.kernel.org/r/20200731065533.4144-4-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 2edd9cb79fb31b0907c6e0cdce2824780cf9b153 Author: Zhu Lingshan Date: Fri Jul 31 14:55:29 2020 +0800 kvm: detect assigned device via irqbypass manager vDPA devices has dedicated backed hardware like passthrough-ed devices. Then it is possible to setup irq offloading to vCPU for vDPA devices. Thus this patch tries to manipulated assigned device counters by kvm_arch_start/end_assignment() in irqbypass manager, so that assigned devices could be detected in update_pi_irte() We will increase/decrease the assigned device counter in kvm/x86. Both vDPA and VFIO would go through this code path. Only X86 uses these counters and kvm_arch_start/end_assignment(), so this code path only affect x86 for now. Signed-off-by: Zhu Lingshan Suggested-by: Jason Wang Link: https://lore.kernel.org/r/20200731065533.4144-3-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 265a0ad8731dc04fccb76cd1abf5a85a9359e62e Author: Zhu Lingshan Date: Fri Jul 31 14:55:28 2020 +0800 vhost: introduce vhost_vring_call This commit introduces struct vhost_vring_call which replaced raw struct eventfd_ctx *call_ctx in struct vhost_virtqueue. Besides eventfd_ctx, it contains a spin lock and an irq_bypass_producer in its structure. Signed-off-by: Zhu Lingshan Suggested-by: Jason Wang Link: https://lore.kernel.org/r/20200731065533.4144-2-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit bf11d71a0a919c32158dd89891d95f6f91a323b2 Author: Gustavo A. R. Silva Date: Fri Jul 31 08:09:56 2020 -0500 vhost: Use flex_array_size() helper in copy_from_user() Make use of the flex_array_size() helper to calculate the size of a flexible array member within an enclosing structure. This helper offers defense-in-depth against potential integer overflows, while at the same time makes it explicitly clear that we are dealing with a flexible array member. Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200731130956.GA30525@embeddedor Signed-off-by: Michael S. Tsirkin commit 0ea9ee430e74b16c6b17e70757d1c26d8d140e1f Author: Max Gurtovoy Date: Fri Jul 31 15:38:22 2020 +0800 vdpasim: protect concurrent access to iommu iotlb Iommu iotlb can be accessed by different cores for performing IO using multiple virt queues. Add a spinlock to synchronize iotlb accesses. This could be easily reproduced when using more than 1 pktgen threads to inject traffic to vdpa simulator. Fixes: 2c53d0f64c06f("vdpasim: vDPA device simulator") Cc: stable@vger.kernel.org Signed-off-by: Max Gurtovoy Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20200731073822.13326-1-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 6234f80574d7569444d8718355fa2838e92b158b Author: Jason Wang Date: Mon Jul 20 16:50:43 2020 +0800 vhost: vdpa: remove per device feature whitelist We used to have a per device feature whitelist to filter out the unsupported virtio features. But this seems unnecessary since: - the main idea behind feature whitelist is to block control vq feature until we finalize the control virtqueue API. But the current vhost-vDPA uAPI is sufficient to support control virtqueue. For device that has hardware control virtqueue, the vDPA device driver can just setup the hardware virtqueue and let userspace to use hardware virtqueue directly. For device that doesn't have a control virtqueue, the vDPA device driver need to use e.g vringh to emulate a software control virtqueue. - we don't do it in virtio-vDPA driver So remove this limitation. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20200720085043.16485-1-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 481a0d7422db26fb63e2d64f0652667a5c6d0f3e Author: Mao Wenan Date: Sun Aug 2 15:44:09 2020 +0800 virtio_ring: Avoid loop when vq is broken in virtqueue_poll The loop may exist if vq->broken is true, virtqueue_get_buf_ctx_packed or virtqueue_get_buf_ctx_split will return NULL, so virtnet_poll will reschedule napi to receive packet, it will lead cpu usage(si) to 100%. call trace as below: virtnet_poll virtnet_receive virtqueue_get_buf_ctx virtqueue_get_buf_ctx_packed virtqueue_get_buf_ctx_split virtqueue_napi_complete virtqueue_poll //return true virtqueue_napi_schedule //it will reschedule napi to fix this, return false if vq is broken in virtqueue_poll. Signed-off-by: Mao Wenan Acked-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/1596354249-96204-1-git-send-email-wenan.mao@linux.alibaba.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 64ffa39dc860fb9772225c694353f73eca5801c6 Author: Michael S. Tsirkin Date: Wed Aug 5 05:39:36 2020 -0400 virtio_net: use LE accessors for speed/duplex Speed and duplex config fields depend on VIRTIO_NET_F_SPEED_DUPLEX which being 63>31 depends on VIRTIO_F_VERSION_1. Accordingly, use LE accessors for these fields. Reported-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin commit 83eb9db95eb453f1db651909ad4598c3d44ef1e1 Author: Michael S. Tsirkin Date: Wed Aug 5 07:29:12 2020 -0400 virtio_config: drop LE option from config space All drivers now use virtio_cread/write_le for LE config space fields. Drop LE option from virtio_cread/write, only leaving the option to access transitional fields. Signed-off-by: Michael S. Tsirkin commit d83c67c4a669a4b396239c338bef802cae72e648 Author: Michael S. Tsirkin Date: Wed Aug 5 05:39:36 2020 -0400 virtio-iommu: convert to LE accessors Virtio iommu is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin commit 99e0d0488ba6a03c493fef5492696cdee07457ec Author: Michael S. Tsirkin Date: Wed Aug 5 05:39:36 2020 -0400 virtio_mem: convert to LE accessors Virtio mem is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin commit 115a71d8045d8571fb05df45088837621510ba57 Author: Michael S. Tsirkin Date: Wed Aug 5 05:39:36 2020 -0400 drm/virtio: convert to LE accessors Virtgpu is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin commit 02e715b7fadb5674e94b71de6424a07f6d4d493f Author: Michael S. Tsirkin Date: Wed Aug 5 05:39:36 2020 -0400 virtio_pmem: convert to LE accessors Virtio pmem is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin commit b13a54070cea06d122b3bdc56e5ce024fff4d2d2 Author: Michael S. Tsirkin Date: Wed Aug 5 05:39:36 2020 -0400 virtio_crypto: convert to LE accessors Virtio crypto is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin commit 2c0349ec1a8ee6f20eb164a3a691bf661043fd24 Author: Michael S. Tsirkin Date: Wed Aug 5 05:39:36 2020 -0400 virtio_fs: convert to LE accessors Virtio fs is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin commit b025584098e621d88894d28e80af686958e273af Author: Michael S. Tsirkin Date: Wed Aug 5 05:39:36 2020 -0400 virtio_input: convert to LE accessors Virtio input is modern-only. Use LE accessors for config space. Signed-off-by: Michael S. Tsirkin commit 805769d7c0ddc4dd07a35f81c8b7a0a20f90dd05 Author: Michael S. Tsirkin Date: Tue Aug 4 17:51:35 2020 -0400 virtio_balloon: use LE config space accesses Balloon is LE, it's cleaner to access it as such directly. Signed-off-by: Michael S. Tsirkin commit 035ce4210be1257dd417785ff7818b5c0f2205fb Author: Michael S. Tsirkin Date: Wed Aug 5 09:17:38 2020 -0400 virtio_config: add virtio_cread_le_feature Mirrors virtio_cread_feature but for LE fields. Signed-off-by: Michael S. Tsirkin commit e3e7994d53082e48d2a6a248376683d3be3dff9d Author: Michael S. Tsirkin Date: Tue Aug 4 18:02:39 2020 -0400 virtio_caif: correct tags for config space fields Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin commit e598960ff5e511b76a0eb8dff25207d35c2442c8 Author: Michael S. Tsirkin Date: Tue Aug 4 17:33:08 2020 -0400 virtio_config: LE config space accessors To be used by modern code, as well as to handle LE only fields such as balloon. Signed-off-by: Michael S. Tsirkin commit 14191c15ab9d87e60d2ebbfbf6df83d546152af1 Author: Michael S. Tsirkin Date: Fri Jul 10 07:55:52 2020 -0400 virtio_config: disallow native type fields (again) _Generic version allowed __uXX types but that is no longer necessary: Transitional devices should all use __virtioXX types (and __leXX for fields not present in the legacy devices). Modern ones should use __leXX. _uXX type would be a bug. Let's prevent that. Signed-off-by: Michael S. Tsirkin commit a5b90f2db8e0ef6504695cbd36a65fd8296338ee Author: Michael S. Tsirkin Date: Mon Aug 3 16:08:11 2020 -0400 virtio_config: rewrite using _Generic Min compiler version has been raised, so that's ok now. Signed-off-by: Michael S. Tsirkin commit cacaf775c699e9e8473491197587535f1c10ac8f Author: Michael S. Tsirkin Date: Thu Jul 30 16:12:40 2020 -0400 virtio_config: cread/write cleanup Use vars of the correct type instead of casting. Signed-off-by: Michael S. Tsirkin commit 5d7d0f387ae1b933ff9771dc921f5e2f65271df9 Author: Michael S. Tsirkin Date: Sun Jul 12 10:57:02 2020 -0400 vdpa_sim: fix endian-ness of config space VDPA sim accesses config space as native endian - this is wrong since it's a modern device and actually uses LE. It only supports modern guests so we could punt and just force LE, but let's use the full virtio APIs since people tend to copy/paste code, and this is not data path anyway. Signed-off-by: Michael S. Tsirkin commit 639916734754b20fc34d956515a67b6a05776534 Author: Michael S. Tsirkin Date: Mon Jul 27 10:59:02 2020 -0400 virtio_vdpa: legacy features handling We normally expect vdpa to use the modern interface. However for consistency, let's use same APIs as vhost for legacy guests. Signed-off-by: Michael S. Tsirkin commit 0d234007a5f8914ba94388b2ed93e0fd9b12e68c Author: Michael S. Tsirkin Date: Mon Jul 27 10:58:18 2020 -0400 vhost/vdpa: switch to new helpers For new helpers handling legacy features to be effective, vhost needs to invoke them. Tie them in. Signed-off-by: Michael S. Tsirkin commit 452639a64ad880792652b6d20cc5c8dd4ecf27d9 Author: Michael S. Tsirkin Date: Mon Jul 27 10:51:55 2020 -0400 vdpa: make sure set_features is invoked for legacy Some legacy guests just assume features are 0 after reset. We detect that config space is accessed before features are set and set features to 0 automatically. Note: some legacy guests might not even access config space, if this is reported in the field we might need to catch a kick to handle these. Signed-off-by: Michael S. Tsirkin commit 03bea764bf61c9f9918324bda7362616024386e8 Author: Michael S. Tsirkin Date: Sun Jul 12 10:56:34 2020 -0400 mlxbf-tmfifo: sparse tags for config access mlxbf-tmfifo accesses config space using native types - which works for it since the legacy virtio native types. This will break if it ever needs to support modern virtio, so with new tags previously introduced for virtio net config, sparse now warns for this in drivers. Since this is a legacy only device, fix it up using virtio_legacy_is_little_endian for now. No functional changes. Signed-off-by: Michael S. Tsirkin Acked-by: Cornelia Huck Acked-by: Andy Shevchenko Acked-by: Andy Shevchenko commit 4a04cfb0eb5e00432f9ff978f2b81bd1736e85db Author: Michael S. Tsirkin Date: Fri Jul 10 07:55:52 2020 -0400 virtio_config: disallow native type fields Transitional devices should all use __virtioXX types (and __leXX for fields not present in legacy devices). Modern ones should use __leXX. _uXX type would be a bug. Let's prevent that. Signed-off-by: Michael S. Tsirkin commit 965b5350514b597dc6347b733127e180844aeb43 Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_scsi: correct tags for config space fields Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck commit a28feb855cc0ad452acd3dfe2b8f2841927da5f1 Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_pmem: correct tags for config space fields Since this is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck commit 577e677a785357542311a645eeb1756cd83988be Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_net: correct tags for config space fields Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin commit 79268954424771185fb4ca304786dd561a272246 Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_mem: correct tags for config space fields Since this is a modern-only device, tag config space fields as having little endian-ness. TODO: check other uses of __virtioXX types in this header, should probably be __leXX. Signed-off-by: Michael S. Tsirkin Acked-by: David Hildenbrand Reviewed-by: Cornelia Huck commit 0ebcffcc2731682777bab19b51a512d8f31e1bdd Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_iommu: correct tags for config space fields Since this is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Jean-Philippe Brucker Reviewed-by: Jean-Philippe Brucker Reviewed-by: Cornelia Huck commit 924b59a6dfa85dc9eac4c7f2fe1857bba2cb2510 Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_input: correct tags for config space fields Since this is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Gerd Hoffmann Reviewed-by: Gerd Hoffmann Reviewed-by: Cornelia Huck commit f378444b7c97e39358de5d50d01fb0e92f259073 Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_gpu: correct tags for config space fields Since gpu is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck commit fc4a1accbb4ef372bb55b7ab161cf88e3b631935 Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_fs: correct tags for config space fields Since fs is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Acked-by: Vivek Goyal Acked-by: Vivek Goyal Reviewed-by: Cornelia Huck commit 24bcf35b695ef5228f3035eb979cc2de571d560b Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_crypto: correct tags for config space fields Since crypto is a modern-only device, tag config space fields as having little endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck commit dbe2dc8c5838ef415620a4fe691570b062ab046f Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_console: correct tags for config space fields Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck commit 40e04c488bd6ab1859778d40bf9bb3ca294ab97b Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_blk: correct tags for config space fields Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Reviewed-by: Stefano Garzarella Reviewed-by: Stefano Garzarella commit 0b5ad7b9522e6172342511fac6114fd8b7eb622a Merge: 87730ccbddcb4 6bd0dffa1a6e1 Author: Vinod Koul Date: Wed Aug 5 19:02:07 2020 +0530 Merge branch 'for-linus' into fixes Signed-off-by: Vinod Koul Conflicts: drivers/dma/idxd/sysfs.c commit c73cb10cc4421baa669c1edd8211086280273216 Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_balloon: correct tags for config space fields Tag config space fields as having little endian-ness. Note that balloon is special: LE even when using the legacy interface. Signed-off-by: Michael S. Tsirkin Acked-by: David Hildenbrand Reviewed-by: Cornelia Huck commit cae19a6386c86dec8ec2810a96d7497a2eec8d38 Author: Michael S. Tsirkin Date: Fri Jul 10 07:17:13 2020 -0400 virtio_9p: correct tags for config space fields Tag config space fields as having virtio endian-ness. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck commit a4235ec06acf05c58081700cda02dcd480d9e9cb Author: Michael S. Tsirkin Date: Fri Jul 10 03:20:21 2020 -0400 virtio: allow __virtioXX, __leXX in config space Currently all config space fields are of the type __uXX. This confuses people and some drivers (notably vdpa) access them using CPU endian-ness - which only works well for legacy or LE platforms. Update virtio_cread/virtio_cwrite macros to allow __virtioXX and __leXX field types. Follow-up patches will convert config space to use these types. Signed-off-by: Michael S. Tsirkin Acked-by: Cornelia Huck commit 5487196878bc926a1ee15069c13aa48b9a894fab Author: Michael S. Tsirkin Date: Fri Jul 10 06:46:04 2020 -0400 virtio_ring: sparse warning fixup virtio_store_mb was built with split ring in mind so it accepts __virtio16 arguments. Packed ring uses __le16 values, so sparse complains. It's just a store with some barriers so let's convert it to a macro, we don't loose too much type safety by doing that. Signed-off-by: Michael S. Tsirkin Acked-by: Cornelia Huck commit 8875bbba97087bf4a677071723d04fc00730f1e7 Author: Michael S. Tsirkin Date: Fri Jul 10 06:34:49 2020 -0400 virtio_balloon: fix sparse warning balloon uses virtio32_to_cpu instead of cpu_to_virtio32 to convert a native endian number to virtio. No practical difference but makes sparse warn. Fix it up. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Acked-by: David Hildenbrand Reviewed-by: Cornelia Huck commit 2dd2111d0d383df104b144e0d1f6b5a00cb7cd88 Author: Guoyu Huang Date: Wed Aug 5 03:53:50 2020 -0700 io_uring: Fix NULL pointer dereference in loop_rw_iter() loop_rw_iter() does not check whether the file has a read or write function. This can lead to NULL pointer dereference when the user passes in a file descriptor that does not have read or write function. The crash log looks like this: [ 99.834071] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 99.835364] #PF: supervisor instruction fetch in kernel mode [ 99.836522] #PF: error_code(0x0010) - not-present page [ 99.837771] PGD 8000000079d62067 P4D 8000000079d62067 PUD 79d8c067 PMD 0 [ 99.839649] Oops: 0010 [#2] SMP PTI [ 99.840591] CPU: 1 PID: 333 Comm: io_wqe_worker-0 Tainted: G D 5.8.0 #2 [ 99.842622] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1 04/01/2014 [ 99.845140] RIP: 0010:0x0 [ 99.845840] Code: Bad RIP value. [ 99.846672] RSP: 0018:ffffa1c7c01ebc08 EFLAGS: 00010202 [ 99.848018] RAX: 0000000000000000 RBX: ffff92363bd67300 RCX: ffff92363d461208 [ 99.849854] RDX: 0000000000000010 RSI: 00007ffdbf696bb0 RDI: ffff92363bd67300 [ 99.851743] RBP: ffffa1c7c01ebc40 R08: 0000000000000000 R09: 0000000000000000 [ 99.853394] R10: ffffffff9ec692a0 R11: 0000000000000000 R12: 0000000000000010 [ 99.855148] R13: 0000000000000000 R14: ffff92363d461208 R15: ffffa1c7c01ebc68 [ 99.856914] FS: 0000000000000000(0000) GS:ffff92363dd00000(0000) knlGS:0000000000000000 [ 99.858651] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 99.860032] CR2: ffffffffffffffd6 CR3: 000000007ac66000 CR4: 00000000000006e0 [ 99.861979] Call Trace: [ 99.862617] loop_rw_iter.part.0+0xad/0x110 [ 99.863838] io_write+0x2ae/0x380 [ 99.864644] ? kvm_sched_clock_read+0x11/0x20 [ 99.865595] ? sched_clock+0x9/0x10 [ 99.866453] ? sched_clock_cpu+0x11/0xb0 [ 99.867326] ? newidle_balance+0x1d4/0x3c0 [ 99.868283] io_issue_sqe+0xd8f/0x1340 [ 99.869216] ? __switch_to+0x7f/0x450 [ 99.870280] ? __switch_to_asm+0x42/0x70 [ 99.871254] ? __switch_to_asm+0x36/0x70 [ 99.872133] ? lock_timer_base+0x72/0xa0 [ 99.873155] ? switch_mm_irqs_off+0x1bf/0x420 [ 99.874152] io_wq_submit_work+0x64/0x180 [ 99.875192] ? kthread_use_mm+0x71/0x100 [ 99.876132] io_worker_handle_work+0x267/0x440 [ 99.877233] io_wqe_worker+0x297/0x350 [ 99.878145] kthread+0x112/0x150 [ 99.878849] ? __io_worker_unuse+0x100/0x100 [ 99.879935] ? kthread_park+0x90/0x90 [ 99.880874] ret_from_fork+0x22/0x30 [ 99.881679] Modules linked in: [ 99.882493] CR2: 0000000000000000 [ 99.883324] ---[ end trace 4453745f4673190b ]--- [ 99.884289] RIP: 0010:0x0 [ 99.884837] Code: Bad RIP value. [ 99.885492] RSP: 0018:ffffa1c7c01ebc08 EFLAGS: 00010202 [ 99.886851] RAX: 0000000000000000 RBX: ffff92363acd7f00 RCX: ffff92363d461608 [ 99.888561] RDX: 0000000000000010 RSI: 00007ffe040d9e10 RDI: ffff92363acd7f00 [ 99.890203] RBP: ffffa1c7c01ebc40 R08: 0000000000000000 R09: 0000000000000000 [ 99.891907] R10: ffffffff9ec692a0 R11: 0000000000000000 R12: 0000000000000010 [ 99.894106] R13: 0000000000000000 R14: ffff92363d461608 R15: ffffa1c7c01ebc68 [ 99.896079] FS: 0000000000000000(0000) GS:ffff92363dd00000(0000) knlGS:0000000000000000 [ 99.898017] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 99.899197] CR2: ffffffffffffffd6 CR3: 000000007ac66000 CR4: 00000000000006e0 Fixes: 32960613b7c3 ("io_uring: correctly handle non ->{read,write}_iter() file_operations") Cc: stable@vger.kernel.org Signed-off-by: Guoyu Huang Signed-off-by: Jens Axboe commit 638037b158df00a860251772239778a25a692b8c Author: Trond Myklebust Date: Tue Aug 4 11:02:44 2020 -0400 NFS: Add tracepoints for layouterror and layoutstats. Allow tracing of the NFSv4.2 layouterror and layoutstats operations. Signed-off-by: Trond Myklebust commit a19b4785d9eec9b7915a3944f279d73db80ee8f8 Author: Trond Myklebust Date: Mon Aug 3 18:32:28 2020 -0400 NFS: Report the stateid + status in trace_nfs4_layoutreturn_on_close() Ensure we correctly report the stateid and status in the layoutreturn on close tracepoint. Signed-off-by: Trond Myklebust commit ed4d0a4aaf568a4694f6b85c534f31fcb9d7cfbf Author: Mohan Kumar Date: Wed Aug 5 15:22:21 2020 +0530 ALSA: hda/tegra: Add 100us dma stop delay Tegra HDA has audio data buffer for upto tens of frames, this buffer can help to avoid underflow. HW will keep issuing new data fetch request when buffers are not full and current BDL is not done. When SW disable DMA RUN bit for a stream, HW can't cancel the already issued data fetch request and hence it can't stop DMA. HW has to wait for all issued data fetch request get data returned before it stops DMA. This HW behavior is not in sync with HDA spec which says DMA RUN bit should be cleared within 1 audio frame. For Tegra, DMA RUN bit was active for more than one audio frame, due to this the timeout in snd_hdac_stream_sync function is not helping. When Stream reset set and clear happens during DMA RUN bit active state it results in Memory Decode error. Unfortunately, there is no way to detect when these data accesses have completed, but testing has shown that a 100us delay between Stream reset set and clear operation for Tegra avoids the memory decode error. Therefore, adding a 100us dma stop delay. Signed-off-by: Mohan Kumar Link: https://lore.kernel.org/r/20200805095221.5476-4-mkumard@nvidia.com Signed-off-by: Takashi Iwai commit 4106820b90ab0f963571d14bdbf9a2587ca80532 Author: Mohan Kumar Date: Wed Aug 5 15:22:20 2020 +0530 ALSA: hda: Add dma stop delay variable A variable dma_stop_delay is added as a new member in hdac_bus structure to avoid memory decode error incase DMA RUN bit is not disabled in the given timeout from snd_hdac_stream_sync function and followed by stream reset which results in memory decode error between reset set and clear operation. Signed-off-by: Mohan Kumar Link: https://lore.kernel.org/r/20200805095221.5476-3-mkumard@nvidia.com Signed-off-by: Takashi Iwai commit 6c17e9dd5cdd352276180f47c0a8b24a1d4661af Author: Mohan Kumar Date: Wed Aug 5 15:22:19 2020 +0530 ASoC: hda/tegra: Set buffer alignment to 128 bytes Set chip->align_buffer_size to 1 for Tegra platforms to make the buffer alignment to be multiple of 128 bytes. This fix is applied as gstreamer alsasink gets stuck with the default buffer-time and latency-time parameters with 4 byte buffer alignment. Signed-off-by: Mohan Kumar Link: https://lore.kernel.org/r/20200805095221.5476-2-mkumard@nvidia.com Signed-off-by: Takashi Iwai commit f46efbcad97bfb2caded0397eccce7c71402868c Author: Jarkko Nikula Date: Thu Jun 18 16:42:40 2020 +0300 i2c: i801: Add support for Intel Tiger Lake PCH-H Add SMBus PCI ID on Intel Tiger Lake PCH-H. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 12745b071e2b6b43e623e6cce521a1cb3c4c28dc Author: Mika Westerberg Date: Thu Jun 18 16:42:39 2020 +0300 i2c: i801: Add support for Intel Emmitsburg PCH Add support for SMBus controller on Intel Emmitsburg PCH. This is the same IP as used in Cannon Lake and derivatives. Signed-off-by: Mika Westerberg Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit db4694e66286b691bf67cb2d1280e42d3604ea79 Author: Alexander A. Klimov Date: Fri Jul 17 20:52:47 2020 +0200 i2c: bcm2835: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Signed-off-by: Alexander A. Klimov [wsa: shortened commit message] Signed-off-by: Wolfram Sang commit cee807cf9e5beb3e7dbdd6804773f5b8749baa25 Author: Wolfram Sang Date: Sun Aug 2 10:21:22 2020 +0200 Documentation: i2c: dev: 'block process call' is supported And it has been for a while (since 2012 at least), only it was not documented. Add it. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 543aa2c4da8b2421633ec225cd2d4110115415f2 Author: Codrin Ciubotariu Date: Tue Aug 4 12:59:26 2020 +0300 i2c: at91: Move to generic GPIO bus recovery Make the Microchip at91 driver the first to use the generic GPIO bus recovery support from the I2C core and discard the driver implementation. Signed-off-by: Codrin Ciubotariu Signed-off-by: Wolfram Sang commit 23a698fe65eca15fbdf925e8d70c5bf20ebf989e Author: Codrin Ciubotariu Date: Tue Aug 4 12:59:25 2020 +0300 i2c: core: treat EPROBE_DEFER when acquiring SCL/SDA GPIOs Even if I2C bus GPIO recovery is optional, devm_gpiod_get() can return -EPROBE_DEFER, so we should at least treat that. This ends up with i2c_register_adapter() to be able to return -EPROBE_DEFER. Signed-off-by: Codrin Ciubotariu Signed-off-by: Wolfram Sang commit 75820314de26b00aaea0d0e79269c0d17914c5c4 Author: Codrin Ciubotariu Date: Tue Aug 4 12:59:24 2020 +0300 i2c: core: add generic I2C GPIO recovery Multiple I2C bus drivers use similar bindings to obtain information needed for I2C recovery. For example, for platforms using device-tree, the properties look something like this: &i2c { ... pinctrl-names = "default", "gpio"; pinctrl-0 = <&pinctrl_i2c_default>; pinctrl-1 = <&pinctrl_i2c_gpio>; sda-gpios = <&pio 0 GPIO_ACTIVE_HIGH>; scl-gpios = <&pio 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ... } For this reason, we can add this common initialization in the core. This way, other I2C bus drivers will be able to support GPIO recovery just by providing a pointer to platform's pinctrl and calling i2c_recover_bus() when SDA is stuck low. Signed-off-by: Codrin Ciubotariu [wsa: inverted one logic for better readability, minor update to kdoc] Signed-off-by: Wolfram Sang commit db36e827d8762eaa6aacd2c918a55ac487aa2501 Author: Codrin Ciubotariu Date: Tue Aug 4 12:59:23 2020 +0300 dt-bindings: i2c: add generic properties for GPIO bus recovery The I2C GPIO bus recovery properties consist of two GPIOS and one extra pinctrl state ("gpio" or "recovery"). "recovery" pinctrl state is considered deprecated and "gpio" should be used instead. Not all are mandatory for recovery. Signed-off-by: Codrin Ciubotariu Reviewed-by: Rob Herring [wsa: kept sorting, minor whitespace change] Signed-off-by: Wolfram Sang commit 262e6ae7081df304fc625cf368d5c2cbba2bb991 Author: Christoph Hellwig Date: Tue Jul 28 23:33:33 2020 +0200 modules: inherit TAINT_PROPRIETARY_MODULE If a TAINT_PROPRIETARY_MODULE exports symbol, inherit the taint flag for all modules importing these symbols, and don't allow loading symbols from TAINT_PROPRIETARY_MODULE modules if the module previously imported gplonly symbols. Add a anti-circumvention devices so people don't accidentally get themselves into trouble this way. Comment from Greg: "Ah, the proven-to-be-illegal "GPL Condom" defense :)" [jeyu: pr_info -> pr_err and pr_warn as per discussion] Link: http://lore.kernel.org/r/20200730162957.GA22469@lst.de Acked-by: Daniel Vetter Reviewed-by: Greg Kroah-Hartman Signed-off-by: Christoph Hellwig Signed-off-by: Jessica Yu commit 9436fb4d899333f612e051a6940af52028f7168b Author: Randy Dunlap Date: Tue Aug 4 19:49:25 2020 -0700 reiserfs: delete duplicated words Delete repeated words in fs/reiserfs/. {from, not, we, are} Link: https://lore.kernel.org/r/20200805024925.12281-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap To: linux-fsdevel@vger.kernel.org Cc: Jan Kara Cc: Jeff Mahoney Cc: Andrew Morton Cc: reiserfs-devel@vger.kernel.org Signed-off-by: Jan Kara commit 7f4bc2e8687ecea52177aac30fb153cc076f7022 Author: Wei Yongjun Date: Tue Jul 28 01:11:29 2020 +0800 mmc: mediatek: make function msdc_cqe_disable() static The sparse tool complains as follows: drivers/mmc/host/mtk-sd.c:2269:6: warning: symbol 'msdc_cqe_disable' was not declared. Should it be static? This function is not used outside of mtk-sd.c, so this commit marks it static. Fixes: 88bd652b3c74 ("mmc: mediatek: command queue support") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Chun-Hung Wu Link: https://lore.kernel.org/r/20200727171129.2945-1-weiyongjun1@huawei.com Signed-off-by: Ulf Hansson commit 80982c7e834e5d4e325b6ce33757012ecafdf0bb Author: Takashi Iwai Date: Tue Aug 4 20:58:15 2020 +0200 ALSA: seq: oss: Serialize ioctls Some ioctls via OSS sequencer API may race and lead to UAF when the port create and delete are performed concurrently, as spotted by a couple of syzkaller cases. This patch is an attempt to address it by serializing the ioctls with the existing register_mutex. Basically OSS sequencer API is an obsoleted interface and was designed without much consideration of the concurrency. There are very few applications with it, and the concurrent performance isn't asked, hence this "big hammer" approach should be good enough. Reported-by: syzbot+1a54a94bd32716796edd@syzkaller.appspotmail.com Reported-by: syzbot+9d2abfef257f3e2d4713@syzkaller.appspotmail.com Suggested-by: Hillf Danton Cc: Link: https://lore.kernel.org/r/20200804185815.2453-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 804f178612afa1dffe0c7b84596ef97374944eb6 Author: Ludovic Desroches Date: Thu Jul 9 10:53:31 2020 +0200 MAINTAINERS: mmc: sdhci-of-at91: handover maintenance to Eugen Hristev As Eugen handles the software for bootloaders and new products, handover the maintenance to him. Signed-off-by: Ludovic Desroches Acked-by: Eugen Hristev Link: https://lore.kernel.org/r/20200709085331.8145-1-ludovic.desroches@microchip.com Signed-off-by: Ulf Hansson commit 2324d50d051ec0f14a548e78554fb02513d6dcef Merge: a754292348bf8 2c12c8103d8f1 Author: Linus Torvalds Date: Tue Aug 4 22:47:54 2020 -0700 Merge tag 'docs-5.9' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "It's been a busy cycle for documentation - hopefully the busiest for a while to come. Changes include: - Some new Chinese translations - Progress on the battle against double words words and non-HTTPS URLs - Some block-mq documentation - More RST conversions from Mauro. At this point, that task is essentially complete, so we shouldn't see this kind of churn again for a while. Unless we decide to switch to asciidoc or something...:) - Lots of typo fixes, warning fixes, and more" * tag 'docs-5.9' of git://git.lwn.net/linux: (195 commits) scripts/kernel-doc: optionally treat warnings as errors docs: ia64: correct typo mailmap: add entry for doc/zh_CN: add cpu-load Chinese version Documentation/admin-guide: tainted-kernels: fix spelling mistake MAINTAINERS: adjust kprobes.rst entry to new location devices.txt: document rfkill allocation PCI: correct flag name docs: filesystems: vfs: correct flag name docs: filesystems: vfs: correct sync_mode flag names docs: path-lookup: markup fixes for emphasis docs: path-lookup: more markup fixes docs: path-lookup: fix HTML entity mojibake CREDITS: Replace HTTP links with HTTPS ones docs: process: Add an example for creating a fixes tag doc/zh_CN: add Chinese translation prefer section doc/zh_CN: add clearing-warn-once Chinese version doc/zh_CN: add admin-guide index doc:it_IT: process: coding-style.rst: Correct __maybe_unused compiler label futex: MAINTAINERS: Re-add selftests directory ... commit a754292348bf88ec6b55563eca4faba7dcfe2ae7 Merge: 95ffa676583b2 57e60db3bc4d2 Author: Linus Torvalds Date: Tue Aug 4 22:22:25 2020 -0700 Merge tag 'printk-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - Herbert Xu made printk header file self-contained. - Andy Shevchenko and Sergey Senozhatsky cleaned up console->setup() error handling. - Andy Shevchenko did some cleanups (e.g. sparse warning) in vsprintf code. - Minor documentation updates. * tag 'printk-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: lib/vsprintf: Force type of flags value for gfp_t lib/vsprintf: Replace custom spec to print decimals with generic one lib/vsprintf: Replace hidden BUILD_BUG_ON() with static_assert() printk: Make linux/printk.h self-contained doc:kmsg: explicitly state the return value in case of SEEK_CUR Replace HTTP links with HTTPS ones: vsprintf hvc: unify console setup naming console: Fix trivia typo 'change' -> 'chance' console: Propagate error code from console ->setup() tty: hvc: Return proper error code from console ->setup() hook serial: sunzilog: Return proper error code from console ->setup() hook serial: sunsab: Return proper error code from console ->setup() hook mips: Return proper error code from console ->setup() hook commit 95ffa676583b23baed40861d30b65fe31397da00 Merge: 4da9f3302615f e2693ec1e0a12 Author: Linus Torvalds Date: Tue Aug 4 22:02:47 2020 -0700 Merge branch 'parisc-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: "The majority of the patches are reverts of previous commits regarding the parisc-specific low level spinlocking code and barrier handling, with which we tried to fix CPU stalls on our build servers. In the end John David Anglin found the culprit: We missed a define for atomic64_set_release(). This seems to have fixed our issues, so now it's good to remove the unnecessary code again. Other than that it's trivial stuff: Spelling fixes, constifications and such" * 'parisc-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: make the log level string for register dumps const parisc: Do not use an ordered store in pa_tlb_lock() Revert "parisc: Revert "Release spinlocks using ordered store"" Revert "parisc: Use ldcw instruction for SMP spinlock release barrier" Revert "parisc: Drop LDCW barrier in CAS code when running UP" Revert "parisc: Improve interrupt handling in arch_spin_lock_flags()" parisc: Replace HTTP links with HTTPS ones parisc: elf.h: delete a duplicated word parisc: Report bad pages as HardwareCorrupted parisc: Convert to BIT_MASK() and BIT_WORD() commit 4da9f3302615f4191814f826054846bf843e24fa Merge: 125cfa0d4d143 d029bff60aa6c Author: Linus Torvalds Date: Tue Aug 4 21:16:22 2020 -0700 Merge tag 'x86-fsgsbase-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fsgsbase from Thomas Gleixner: "Support for FSGSBASE. Almost 5 years after the first RFC to support it, this has been brought into a shape which is maintainable and actually works. This final version was done by Sasha Levin who took it up after Intel dropped the ball. Sasha discovered that the SGX (sic!) offerings out there ship rogue kernel modules enabling FSGSBASE behind the kernels back which opens an instantanious unpriviledged root hole. The FSGSBASE instructions provide a considerable speedup of the context switch path and enable user space to write GSBASE without kernel interaction. This enablement requires careful handling of the exception entries which go through the paranoid entry path as they can no longer rely on the assumption that user GSBASE is positive (as enforced via prctl() on non FSGSBASE enabled systemn). All other entries (syscalls, interrupts and exceptions) can still just utilize SWAPGS unconditionally when the entry comes from user space. Converting these entries to use FSGSBASE has no benefit as SWAPGS is only marginally slower than WRGSBASE and locating and retrieving the kernel GSBASE value is not a free operation either. The real benefit of RD/WRGSBASE is the avoidance of the MSR reads and writes. The changes come with appropriate selftests and have held up in field testing against the (sanitized) Graphene-SGX driver" * tag 'x86-fsgsbase-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) x86/fsgsbase: Fix Xen PV support x86/ptrace: Fix 32-bit PTRACE_SETREGS vs fsbase and gsbase selftests/x86/fsgsbase: Add a missing memory constraint selftests/x86/fsgsbase: Fix a comment in the ptrace_write_gsbase test selftests/x86: Add a syscall_arg_fault_64 test for negative GSBASE selftests/x86/fsgsbase: Test ptracer-induced GS base write with FSGSBASE selftests/x86/fsgsbase: Test GS selector on ptracer-induced GS base write Documentation/x86/64: Add documentation for GS/FS addressing mode x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2 x86/cpu: Enable FSGSBASE on 64bit by default and add a chicken bit x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit x86/entry/64: Introduce the FIND_PERCPU_BASE macro x86/entry/64: Switch CR3 before SWAPGS in paranoid entry x86/speculation/swapgs: Check FSGSBASE in enabling SWAPGS mitigation x86/process/64: Use FSGSBASE instructions on thread copy and ptrace x86/process/64: Use FSBSBASE in switch_to() if available x86/process/64: Make save_fsgs_for_kvm() ready for FSGSBASE x86/fsgsbase/64: Enable FSGSBASE instructions in helper functions x86/fsgsbase/64: Add intrinsics for FSGSBASE instructions x86/cpu: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE ... commit 125cfa0d4d143416ae217c26a72003baae93233d Merge: 3f0d6ecdf1ab3 adb334d17858d Author: Linus Torvalds Date: Tue Aug 4 21:05:46 2020 -0700 Merge tag 'x86-entry-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 conversion to generic entry code from Thomas Gleixner: "The conversion of X86 syscall, interrupt and exception entry/exit handling to the generic code. Pretty much a straight-forward 1:1 conversion plus the consolidation of the KVM handling of pending work before entering guest mode" * tag 'x86-entry-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kvm: Use __xfer_to_guest_mode_work_pending() in kvm_run_vcpu() x86/kvm: Use generic xfer to guest work function x86/entry: Cleanup idtentry_enter/exit x86/entry: Use generic interrupt entry/exit code x86/entry: Cleanup idtentry_entry/exit_user x86/entry: Use generic syscall exit functionality x86/entry: Use generic syscall entry function x86/ptrace: Provide pt_regs helper for entry/exit x86/entry: Move user return notifier out of loop x86/entry: Consolidate 32/64 bit syscall entry x86/entry: Consolidate check_user_regs() x86: Correct noinstr qualifiers x86/idtentry: Remove stale comment commit 3f0d6ecdf1ab35ac54cabb759f748fb0bffd26a5 Merge: 442489c219235 3135f5b735929 Author: Linus Torvalds Date: Tue Aug 4 21:00:11 2020 -0700 Merge tag 'core-entry-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull generic kernel entry/exit code from Thomas Gleixner: "Generic implementation of common syscall, interrupt and exception entry/exit functionality based on the recent X86 effort to ensure correctness of entry/exit vs RCU and instrumentation. As this functionality and the required entry/exit sequences are not architecture specific, sharing them allows other architectures to benefit instead of copying the same code over and over again. This branch was kept standalone to allow others to work on it. The conversion of x86 comes in a seperate pull request which obviously is based on this branch" * tag 'core-entry-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: entry: Correct __secure_computing() stub entry: Correct 'noinstr' attributes entry: Provide infrastructure for work before transitioning to guest mode entry: Provide generic interrupt entry/exit code entry: Provide generic syscall exit function entry: Provide generic syscall entry functionality seccomp: Provide stub for __secure_computing() commit 35efb0e1d5c60e334ea719586ff2509fde2e613b Author: Bjorn Andersson Date: Tue Jul 28 17:47:57 2020 -0700 dt-bindings: hwlock: qcom: Remove invalid binding The Qualcomm hwlock is described in DeviceTree either directly on the mmio bus or split between a syscon and a mutex node, but as noted in [1] the latter is not valid DT, so remove any traces of this from the binding. [1] https://lore.kernel.org/r/CAL_JsqLa9GBtbgN6aL7AQ=A6V-YRtPgYqh6XgM2kpx532+r4Gg@mail.gmail.com/ Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200729004757.1901107-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 7de62bc09fe6d100ebd6c931c3f9a6fa7e6ed10f Author: Olga Kornievskaia Date: Wed Jul 15 13:17:52 2020 -0400 SUNRPC dont update timeout value on connection reset Current behaviour: every time a v3 operation is re-sent to the server we update (double) the timeout. There is no distinction between whether or not the previous timer had expired before the re-sent happened. Here's the scenario: 1. Client sends a v3 operation 2. Server RST-s the connection (prior to the timeout) (eg., connection is immediately reset) 3. Client re-sends a v3 operation but the timeout is now 120sec. As a result, an application sees 2mins pause before a retry in case server again does not reply. Instead, this patch proposes to keep track off when the minor timeout should happen and if it didn't, then don't update the new timeout. Value is updated based on the previous value to make timeouts predictable. Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit 62b8f9e99329c92286534d05dac9dc0a6e0ba0cf Author: Siddharth Gupta Date: Wed Jul 29 10:40:01 2020 -0700 remoteproc: core: Register the character device interface Add the character device during rproc_add. This would create a character device node at /dev/remoteproc. Userspace applications can interact with the remote processor using this interface. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Rishabh Bhatnagar Signed-off-by: Siddharth Gupta Link: https://lore.kernel.org/r/1596044401-22083-3-git-send-email-sidgup@codeaurora.org Signed-off-by: Bjorn Andersson commit 4476770881d7ac647e3bcae0943f37e00b9c3f3c Author: Siddharth Gupta Date: Wed Jul 29 10:40:00 2020 -0700 remoteproc: Add remoteproc character device interface Add the character device interface into remoteproc framework. This interface can be used in order to boot/shutdown remote subsystems and provides a basic ioctl based interface to implement supplementary functionality. An ioctl call is implemented to enable the shutdown on release feature which will allow remote processors to be shutdown when the controlling userspace application crashes or hangs. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Rishabh Bhatnagar Signed-off-by: Siddharth Gupta Link: https://lore.kernel.org/r/1596044401-22083-2-git-send-email-sidgup@codeaurora.org [bjorn: s/int32_t/s32/ per checkpatch] Signed-off-by: Bjorn Andersson commit ce368536dd614452407dc31e2449eb84681a06af Author: Scott Mayhew Date: Sat Aug 1 07:10:39 2020 -0400 nfs: nfs_file_write() should check for writeback errors The NFS_CONTEXT_ERROR_WRITE flag (as well as the check of said flag) was removed by commit 6fbda89b257f. The absence of an error check allows writes to be continually queued up for a server that may no longer be able to handle them. Fix it by adding an error check using the generic error reporting functions. Fixes: 6fbda89b257f ("NFS: Replace custom error reporting mechanism with generic one") Signed-off-by: Scott Mayhew Signed-off-by: Trond Myklebust commit 442489c219235991de86d0277b5d859ede6d8792 Merge: f8b036a7fc231 31cd0e119d50c Author: Linus Torvalds Date: Tue Aug 4 18:17:37 2020 -0700 Merge tag 'timers-core-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "Time, timers and related driver updates: - Prevent unnecessary timer softirq invocations by extending the tracking of the next expiring timer in the timer wheel beyond the existing NOHZ functionality. The tracking overhead at enqueue time is within the noise, but on sensitive workloads the avoidance of the soft interrupt invocation is a measurable improvement. - The obligatory new clocksource driver for Ingenic X100 OST - The usual fixes, improvements, cleanups and extensions for newer chip variants all over the driver space" * tag 'timers-core-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (28 commits) timers: Recalculate next timer interrupt only when necessary clocksource/drivers/ingenic: Add support for the Ingenic X1000 OST. dt-bindings: timer: Add Ingenic X1000 OST bindings. clocksource/drivers: Replace HTTP links with HTTPS ones clocksource/drivers/nomadik-mtu: Handle 32kHz clock clocksource/drivers/sh_cmt: Use "kHz" for kilohertz clocksource/drivers/imx: Add support for i.MX TPM driver with ARM64 clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT. timers: Lower base clock forwarding threshold timers: Remove must_forward_clk timers: Spare timer softirq until next expiry timers: Expand clk forward logic beyond nohz timers: Reuse next expiry cache after nohz exit timers: Always keep track of next expiry timers: Optimize _next_timer_interrupt() level iteration timers: Add comments about calc_index() ceiling work timers: Move trigger_dyntick_cpu() to enqueue_timer() timers: Use only bucket expiry for base->next_expiry value timers: Preserve higher bits of expiration on index calculation clocksource/drivers/timer-atmel-tcb: Add sama5d2 support ... commit f8b036a7fc231fe6e8297daddee5dffdbbf2581f Merge: 2ed90dbbf7be3 3d5128c1deb5d Author: Linus Torvalds Date: Tue Aug 4 18:11:58 2020 -0700 Merge tag 'irq-core-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "The usual boring updates from the interrupt subsystem: - Infrastructure to allow building irqchip drivers as modules - Consolidation of irqchip ACPI probing - Removal of the EOI-preflow interrupt handler which was required for SPARC support and became obsolete after SPARC was converted to use sparse interrupts. - Cleanups, fixes and improvements all over the place" * tag 'irq-core-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (51 commits) irqchip/loongson-pch-pic: Fix the misused irq flow handler irqchip/loongson-htvec: Support 8 groups of HT vectors irqchip/loongson-liointc: Fix misuse of gc->mask_cache dt-bindings: interrupt-controller: Update Loongson HTVEC description irqchip/imx-intmux: Fix irqdata regs save in imx_intmux_runtime_suspend() irqchip/imx-intmux: Implement intmux runtime power management irqchip/gic-v4.1: Use GFP_ATOMIC flag in allocate_vpe_l1_table() irqchip: Fix IRQCHIP_PLATFORM_DRIVER_* compilation by including module.h irqchip/stm32-exti: Map direct event to irq parent irqchip/mtk-cirq: Convert to a platform driver irqchip/mtk-sysirq: Convert to a platform driver irqchip/qcom-pdc: Switch to using IRQCHIP_PLATFORM_DRIVER helper macros irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros irqchip: irq-bcm2836.h: drop a duplicated word irqchip/gic-v4.1: Ensure accessing the correct RD when writing INVALLR irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map irqchip/gic-v3: Remove unused register definition irqchip/qcom-pdc: Allow QCOM_PDC to be loadable as a permanent module genirq: Export irq_chip_retrigger_hierarchy and irq_chip_set_vcpu_affinity_parent irqdomain: Export irq_domain_update_bus_token ... commit f073531070d24bbb82cb2658952d949f4851024b Author: Christoph Hellwig Date: Tue Jul 28 17:49:47 2020 +0200 init: add an init_dup helper Add a simple helper to grab a reference to a file and install it at the next available fd, and switch the early init code over to it. Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit 7e0e8be3a1fd1399373224e22d77487e63566704 Author: Dick Kennedy Date: Mon Aug 3 14:02:29 2020 -0700 scsi: lpfc: Update lpfc version to 12.8.0.3 Update lpfc version to 12.8.0.3 Link: https://lore.kernel.org/r/20200803210229.23063-9-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 00081c5ca4d52fe787bf7a5fbb3fb5939dd7818e Author: Dick Kennedy Date: Mon Aug 3 14:02:28 2020 -0700 scsi: lpfc: Fix LUN loss after cable pull On devices that support FCP sequence error recovery, which attempts to preserve the devices login across link bounce, adisc is used for device validation. Turns out the device fc4 type is cleared as part of the link bounce, but the ADISC handling doesn't restore the FC4 support as it normally would with a PRLI. This caused situations where the device wasn't reregistered with the transport thus scan logic and LUN discovery never kicked in. In the ADISC completion handling, reset the fc4 type so that transport port reregistration occurs with the remote port. Link: https://lore.kernel.org/r/20200803210229.23063-8-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit feb3cc57fb63a2b3d3254e8c8ca3fe776c767d38 Author: Dick Kennedy Date: Mon Aug 3 14:02:27 2020 -0700 scsi: lpfc: Fix validation of bsg reply lengths There are a couple of code areas which validate sufficient reply buffer length, but the checks are using the request elements rather than the reply elements. Rework to validate using the reply structures. Link: https://lore.kernel.org/r/20200803210229.23063-7-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 678768da988081a922b0645b9bd552f6cdd982cc Author: Dick Kennedy Date: Mon Aug 3 14:02:26 2020 -0700 scsi: lpfc: Fix retry of PRLI when status indicates its unsupported With port bounce/address swaps and timing between initiator GID queries vs remote port FC4 support registrations, the driver may be in a situation where it sends PRLIs for both FCP and NVME even though the target may not support one of the protocols. In this case, the remote port will reject the PRLI and usually indicate it does not support the request. However, the driver currently ignores the status of the failure and immediately retries the PRLI, which is pointless. In the case of this one remote port, the reception of the PRLI retry caused it to decide to send a LOGO. The LOGO restarted the process and the same results happened. It made the remote port undiscoverable to either protocol. Add logic to detect the non-support status and not attempt the retry of the PRLI. Link: https://lore.kernel.org/r/20200803210229.23063-6-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 24411fcd6fe7b55d1a48b80a9ffeb3564ff029a7 Author: Dick Kennedy Date: Mon Aug 3 14:02:25 2020 -0700 scsi: lpfc: Fix oops when unloading driver while running mds diags While mds diagnostic tests are running, if the driver is requested to be unloaded, oops or hangs are observed. The driver doesn't terminate the processing of diag frames when the unload is started. As such: oops may be seen for __lpfc_sli_release_iocbq_s4 because ring memory is referenced that was already freed; or hangs see in lpfc_nvme_wait_for_io_drain as ios no longer complete. If unloading, don't process diag frames. Just clean them up. Link: https://lore.kernel.org/r/20200803210229.23063-5-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 8ccd6926db7dd865dd6eabe3c25ae2696bffc07e Author: Dick Kennedy Date: Mon Aug 3 14:02:24 2020 -0700 scsi: lpfc: Fix RSCN timeout due to incorrect gidft counter In configs with a large number of initiators in the same zone (>250), RSCN timeouts are seen when creating or deleting vports: lpfc 0000:07:00.1: 5:(0):0231 RSCN timeout Data: x0 x3 During RSCN processing driver issues GID_FT command to nameserver. A counter for number of simultaneous GID_FT commands is maintained (an unsigned value). The counter is incremented when the GID_FT is issued. If the GID_FT command fails for some reason the driver retries the GID_FT from the completion call back. But the counter was decremented before the retry was issued. When the second GID_FT completes, the callback again tries to decrement the counter, possibly wrapping to a very large non-zero value, which causes the RSCN cleanup code to not execute. Thus the RSCN timeout failure. Do not decrement the counter on a retry. Also add defensive checks to ensure the counter is not decremented if already zero. Link: https://lore.kernel.org/r/20200803210229.23063-4-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9e3e365a92d329e5e69e3f92037537be6276992b Author: Dick Kennedy Date: Mon Aug 3 14:02:23 2020 -0700 scsi: lpfc: Fix no message shown for lpfc_hdw_queue out of range value If module parameters override the default configuration settings for hardware queues or irqs, the driver was not notifying the change from defaults. Revise such that any changes will result in a kernel log message. Link: https://lore.kernel.org/r/20200803210229.23063-3-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit a1e4d3d8aef92d0099b1a559e21aad4789dbe13c Author: Dick Kennedy Date: Mon Aug 3 14:02:22 2020 -0700 scsi: lpfc: Fix FCoE speed reporting Current Link speed was shown as "unknown" in sysfs for FCoE ports. In this scenario, the port was working in 20G speed, which happens to not be a speed handled by the driver. Add support for all possible link speeds that could get reported from port_speed field in link state ACQE. Additionally, as supported_speeds can't be manipulated via the FCoE driver on a converged ethernet port (it must be managed by the nic function), don't fill out the supported_speeds field for the fc host object in sysfs. Revise debug logging to report Link speed mgmt valuess. Link: https://lore.kernel.org/r/20200803210229.23063-2-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 1eaff53649b83aca01d46e034b0590dd0504360a Author: Jing Xiangfeng Date: Fri Jul 31 14:56:39 2020 +0800 scsi: lpfc: Add missing misc_deregister() for lpfc_init() lpfc_init() misses a call misc_deregister() in an error path. Add a label 'unregister' to fix it. Link: https://lore.kernel.org/r/20200731065639.190646-1-jingxiangfeng@huawei.com Reviewed-by: James Smart Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit af6de8c60fe9433afa73cea6fcccdccd98ad3e5e Author: Ewan D. Milne Date: Wed Jul 29 19:10:11 2020 -0400 scsi: lpfc: nvmet: Avoid hang / use-after-free again when destroying targetport We cannot wait on a completion object in the lpfc_nvme_targetport structure in the _destroy_targetport() code path because the NVMe/fc transport will free that structure immediately after the .targetport_delete() callback. This results in a use-after-free, and a crash if slub_debug=FZPU is enabled. An earlier fix put put the completion on the stack, but commit 2a0fb340fcc8 ("scsi: lpfc: Correct localport timeout duration error") subsequently changed the code to reference the completion through a pointer in the object rather than the local stack variable. Fix this by using the stack variable directly. Link: https://lore.kernel.org/r/20200729231011.13240-1-emilne@redhat.com Fixes: 2a0fb340fcc8 ("scsi: lpfc: Correct localport timeout duration error") Reviewed-by: James Smart Signed-off-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 8a8fb8977ea2bdf160b9e475cf2350abbad4f0e7 Author: Xiang Chen Date: Mon Aug 3 19:34:02 2020 +0800 scsi: scsi_transport_sas: Add spaces around binary operator "|" According to the kernel coding style, use one space around the binary "|" operator. Add spaces around it. Link: https://lore.kernel.org/r/1596454442-220565-1-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Xiang Chen Signed-off-by: Martin K. Petersen commit a3d8a2573687bc8955986e4e011ebfe19cc71054 Author: Damien Le Moal Date: Fri Jul 31 14:49:28 2020 +0900 scsi: sd_zbc: Improve zone revalidation Currently, for zoned disks, since blk_revalidate_disk_zones() requires the disk capacity to be set already to operate correctly, zones revalidation can only be done on the second revalidate scan once the gendisk capacity is set at the end of the first scan. As a result, if zone revalidation fails, there is no second chance to recover from the failure and the disk capacity is changed to 0, with the disk left unusable. This can be improved by shuffling around code, specifically, by moving the call to sd_zbc_revalidate_zones() from sd_zbc_read_zones() to the end of sd_revalidate_disk(), after set_capacity_revalidate_and_notify() is called to set the gendisk capacity. With this change, if sd_zbc_revalidate_zones() fails on the first scan, the second scan will call it again to recover, if possible. Using the new struct scsi_disk fields rev_nr_zones and rev_zone_blocks, sd_zbc_revalidate_zones() does actual work only if it detects a change with the disk zone configuration. This means that for a successful zones revalidation on the first scan, the second scan will not cause another heavy full check. While at it, remove the unecesary "extern" declaration of sd_zbc_read_zones(). Link: https://lore.kernel.org/r/20200731054928.668547-1-damien.lemoal@wdc.com Reviewed-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit ec007ef40abb6a164d148b0dc19789a7a2de2cc8 Author: Javed Hasan Date: Wed Jul 29 01:18:23 2020 -0700 scsi: libfc: Free skb in fc_disc_gpn_id_resp() for valid cases In fc_disc_gpn_id_resp(), skb is supposed to get freed in all cases except for PTR_ERR. However, in some cases it didn't. This fix is to call fc_frame_free(fp) before function returns. Link: https://lore.kernel.org/r/20200729081824.30996-2-jhasan@marvell.com Reviewed-by: Girish Basrur Reviewed-by: Santosh Vernekar Reviewed-by: Saurav Kashyap Reviewed-by: Shyam Sundar Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit e95b4789ff4380733006836d28e554dc296b2298 Author: Javed Hasan Date: Wed Jul 29 01:18:24 2020 -0700 scsi: fcoe: Memory leak fix in fcoe_sysfs_fcf_del() In fcoe_sysfs_fcf_del(), we first deleted the fcf from the list and then freed it if ctlr_dev was not NULL. This was causing a memory leak. Free the fcf even if ctlr_dev is NULL. Link: https://lore.kernel.org/r/20200729081824.30996-3-jhasan@marvell.com Reviewed-by: Girish Basrur Reviewed-by: Santosh Vernekar Reviewed-by: Saurav Kashyap Reviewed-by: Shyam Sundar Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit a8ac78357d9b71a5608c609094ad3b114a46ccd4 Author: Max Gurtovoy Date: Mon Aug 3 18:00:08 2020 +0300 scsi: target: Make iscsit_register_transport() return void This function always returns 0. We can make it return void to simplify the code. Also, no caller ever checks the return value of this function. Link: https://lore.kernel.org/r/20200803150008.83920-1-maxg@mellanox.com Signed-off-by: Max Gurtovoy Signed-off-by: Martin K. Petersen commit 2ed90dbbf7be3b7cd2790fc6fa946c478ab496b8 Merge: 9fa867d2acbca 274b3f7bf3441 Author: Linus Torvalds Date: Tue Aug 4 17:29:57 2020 -0700 Merge tag 'dma-mapping-5.9' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - make support for dma_ops optional - move more code out of line - add generic support for a dma_ops bypass mode - misc cleanups * tag 'dma-mapping-5.9' of git://git.infradead.org/users/hch/dma-mapping: dma-contiguous: cleanup dma_alloc_contiguous dma-debug: use named initializers for dir2name powerpc: use the generic dma_ops_bypass mode dma-mapping: add a dma_ops_bypass flag to struct device dma-mapping: make support for dma ops optional dma-mapping: inline the fast path dma-direct calls dma-mapping: move the remaining DMA API calls out of line commit afcab636657421f7ebfa0783a91f90256bba0091 Author: Steven Rostedt (VMware) Date: Tue Aug 4 20:00:02 2020 -0400 tracing: Use trace_sched_process_free() instead of exit() for pid tracing On exit, if a process is preempted after the trace_sched_process_exit() tracepoint but before the process is done exiting, then when it gets scheduled in, the function tracers will not filter it properly against the function tracing pid filters. That is because the function tracing pid filters hooks to the sched_process_exit() tracepoint to remove the exiting task's pid from the filter list. Because the filtering happens at the sched_switch tracepoint, when the exiting task schedules back in to finish up the exit, it will no longer be in the function pid filtering tables. This was noticeable in the notrace self tests on a preemptable kernel, as the tests would fail as it exits and preempted after being taken off the notrace filter table and on scheduling back in it would not be in the notrace list, and then the ending of the exit function would trace. The test detected this and would fail. Cc: stable@vger.kernel.org Cc: Namhyung Kim Fixes: 1e10486ffee0a ("ftrace: Add 'function-fork' trace option") Fixes: c37775d57830a ("tracing: Add infrastructure to allow set_event_pid to follow children" Signed-off-by: Steven Rostedt (VMware) commit a7aaa2f26bfd932a654706b19859e7adf802bee2 Author: Sandipan Das Date: Tue Aug 4 23:01:37 2020 +0530 selftests/powerpc: Fix pkey syscall redefinitions On distros using older glibc versions, the pkey tests encounter build failures due to redefinition of the pkey syscall numbers. For compatibility, commit 743f3544fffb added a wrapper for the gettid() syscall and included syscall.h if the version of glibc used is older than 2.30. This leads to different definitions of SYS_pkey_* as the ones in the pkey test header set numeric constants where as the ones from syscall.h reuse __NR_pkey_*. The compiler complains about redefinitions since they are different. This replaces SYS_pkey_* definitions with __NR_pkey_* such that the definitions in both syscall.h and pkeys.h are alike. This way, if syscall.h has to be included for compatibility reasons, builds will still succeed. Fixes: 743f3544fffb ("selftests/powerpc: Add wrapper for gettid") Reported-by: Sachin Sant Suggested-by: David Laight Suggested-by: Michael Ellerman Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a4956d838bf59b0a71a2553c5ca81131ea8b49b9.1596561758.git.sandipan@linux.ibm.com commit 9fa867d2acbca6c4cd317ab75c0e94e1703af2b0 Merge: 4f30a60aa7841 3c8387d234f75 Author: Linus Torvalds Date: Tue Aug 4 17:10:11 2020 -0700 Merge tag 'uuid-for-5.9' of git://git.infradead.org/users/hch/uuid Pull uuid update from Christoph Hellwig: "Remove a now unused helper (Andy Shevchenko)" * tag 'uuid-for-5.9' of git://git.infradead.org/users/hch/uuid: uuid: remove unused uuid_le_to_bin() definition commit 4c900a6b4e057fc9623240682988e203ae98ca94 Author: Christophe JAILLET Date: Tue Aug 4 22:19:24 2020 +0200 farsync: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'fst_add_one()', GFP_KERNEL can be used because it is a probe function and no lock is acquired. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 24dd377a76b08145782e6f81edf7e2dafca406bd Author: Christophe JAILLET Date: Tue Aug 4 22:08:09 2020 +0200 wan: wanxl: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'wanxl_pci_init_one()', GFP_KERNEL can be used because it is a probe function and no lock is acquired. Moreover, just a few lines above, GFP_KERNEL is already used. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 7c9864bbccc23e1812ac82966555d68c13ea4006 Author: Stephen Hemminger Date: Tue Aug 4 09:54:15 2020 -0700 hv_netvsc: do not use VF device if link is down If the accelerated networking SRIOV VF device has lost carrier use the synthetic network device which is available as backup path. This is a rare case since if VF link goes down, normally the VMBus device will also loose external connectivity as well. But if the communication is between two VM's on the same host the VMBus device will still work. Reported-by: "Shah, Ashish N" Fixes: 0c195567a8f6 ("netvsc: transparent VF management") Signed-off-by: Stephen Hemminger Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller commit 02afa9c66bb954c6959877c70d9e128dcf0adce7 Author: YueHaibing Date: Tue Aug 4 21:26:43 2020 +0800 dpaa2-eth: Fix passing zero to 'PTR_ERR' warning Fix smatch warning: drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c:2419 alloc_channel() warn: passing zero to 'ERR_PTR' setup_dpcon() should return ERR_PTR(err) instead of zero in error handling case. Fixes: d7f5a9d89a55 ("dpaa2-eth: defer probe on object allocate") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 9bf1306257589b3a5ad46175538af9922d94e26f Author: Chris Packham Date: Mon Jul 27 15:46:14 2020 +1200 rtc: ds1307: provide an indication that the watchdog has fired There's not much feedback when the ds1388 watchdog fires. Generally it yanks on the reset line and the board reboots. Capture the fact that the watchdog has fired in the past so that userspace can retrieve it via WDIOC_GETBOOTSTATUS. This should help distinguish a watchdog triggered reset from a power interruption. Signed-off-by: Chris Packham Signed-off-by: Alexandre Belloni Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200727034615.19755-1-chris.packham@alliedtelesis.co.nz commit f7ba7dbf4f7af67b5936ff1cbd40a3254b409ebf Author: Stefan Roese Date: Tue Aug 4 14:17:16 2020 +0200 net: macb: Properly handle phylink on at91sam9x I just recently noticed that ethernet does not work anymore since v5.5 on the GARDENA smart Gateway, which is based on the AT91SAM9G25. Debugging showed that the "GEM bits" in the NCFGR register are now unconditionally accessed, which is incorrect for the !macb_is_gem() case. This patch adds the macb_is_gem() checks back to the code (in macb_mac_config() & macb_mac_link_up()), so that the GEM register bits are not accessed in this case any more. Fixes: 7897b071ac3b ("net: macb: convert to phylink") Signed-off-by: Stefan Roese Cc: Reto Schneider Cc: Alexandre Belloni Cc: Nicolas Ferre Cc: David S. Miller Signed-off-by: David S. Miller commit 4f30a60aa78410496e5ffe632a371c00f0d83a8d Merge: 74858abbb1032 a5161eeef97cb Author: Linus Torvalds Date: Tue Aug 4 15:12:02 2020 -0700 Merge tag 'close-range-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull close_range() implementation from Christian Brauner: "This adds the close_range() syscall. It allows to efficiently close a range of file descriptors up to all file descriptors of a calling task. This is coordinated with the FreeBSD folks which have copied our version of this syscall and in the meantime have already merged it in April 2019: https://reviews.freebsd.org/D21627 https://svnweb.freebsd.org/base?view=revision&revision=359836 The syscall originally came up in a discussion around the new mount API and making new file descriptor types cloexec by default. During this discussion, Al suggested the close_range() syscall. First, it helps to close all file descriptors of an exec()ing task. This can be done safely via (quoting Al's example from [1] verbatim): /* that exec is sensitive */ unshare(CLONE_FILES); /* we don't want anything past stderr here */ close_range(3, ~0U); execve(....); The code snippet above is one way of working around the problem that file descriptors are not cloexec by default. This is aggravated by the fact that we can't just switch them over without massively regressing userspace. For a whole class of programs having an in-kernel method of closing all file descriptors is very helpful (e.g. demons, service managers, programming language standard libraries, container managers etc.). Second, it allows userspace to avoid implementing closing all file descriptors by parsing through /proc//fd/* and calling close() on each file descriptor and other hacks. From looking at various large(ish) userspace code bases this or similar patterns are very common in service managers, container runtimes, and programming language runtimes/standard libraries such as Python or Rust. In addition, the syscall will also work for tasks that do not have procfs mounted and on kernels that do not have procfs support compiled in. In such situations the only way to make sure that all file descriptors are closed is to call close() on each file descriptor up to UINT_MAX or RLIMIT_NOFILE, OPEN_MAX trickery. Based on Linus' suggestion close_range() also comes with a new flag CLOSE_RANGE_UNSHARE to more elegantly handle file descriptor dropping right before exec. This would usually be expressed in the sequence: unshare(CLONE_FILES); close_range(3, ~0U); as pointed out by Linus it might be desirable to have this be a part of close_range() itself under a new flag CLOSE_RANGE_UNSHARE which gets especially handy when we're closing all file descriptors above a certain threshold. Test-suite as always included" * tag 'close-range-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: tests: add CLOSE_RANGE_UNSHARE tests close_range: add CLOSE_RANGE_UNSHARE tests: add close_range() tests arch: wire-up close_range() open: add close_range() commit dc100bc8fae59aafd2ea2e1a1a43ef1f65f8a8bc Merge: 418eda8f3fe29 1041dee2178ff Author: Dave Airlie Date: Wed Aug 5 07:41:23 2020 +1000 Merge tag 'drm-msm-next-2020-07-30' of https://gitlab.freedesktop.org/drm/msm into drm-next Take 2 of msm-next pull, this version drops the OPP patch due to [1], so I'll send the gpu opp/bw scaling patch after the OPP patch lands. Since I had to force-push I took the opportunity to rebase on drm-next, and since you already merged in 5.8-rc6 a few fixes from the last cycle dropped out. This time around: * A bunch more a650/a640 (sm8150/sm8250) display and GPU enablement and fixes * Enable dpu dither block for 6bpc panels * dpu suspend fixes * dpu fix for cursor on 2nd display * dsi/mdp5 enablement for sdm630/sdm636/sdm660 I also regenerated the register headers, which accounts for a good bit of the size this time, because we hadn't re-synced the register headers since the early days of a6xx bringup. Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Wed Jul 29 09:51:29 2020 +0200 riscv: disable stack-protector for vDSO Currently, building the vDSO with clang leads assembler errors like the following: /tmp/vgettimeofday-1ae0d2.s: Assembler messages: /tmp/vgettimeofday-1ae0d2.s:28: Error: bad expression /tmp/vgettimeofday-1ae0d2.s:28: Error: illegal operands `auipc a2,%got_pcrel_hi(__stack_chk_guard)' Disable the stack-protector for vDSO to fix these. Link: https://github.com/ClangBuiltLinux/linux/issues/1112 Signed-off-by: Tobias Klauser Signed-off-by: Palmer Dabbelt commit 635093e306a3e4543937b079dc797c2ee0bafa09 Author: Atish Patra Date: Wed Jul 29 17:25:35 2020 -0700 RISC-V: Fix build warning for smpboot.c The following warnings are reported by kbuild with W=1. >> arch/riscv/kernel/smpboot.c:109:5: warning: no previous prototype for 'start_secondary_cpu' [-Wmissing-prototypes] 109 | int start_secondary_cpu(int cpu, struct task_struct *tidle) | ^~~~~~~~~~~~~~~~~~~ arch/riscv/kernel/smpboot.c:146:34: warning: no previous prototype for 'smp_callin' [-Wmissing-prototypes] 146 | asmlinkage __visible void __init smp_callin(void) | ^~~~~~~~~~ Fix the warnings by marking the local functions static and adding the prototype for the global function. Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 74858abbb1032222f922487fd1a24513bbed80f9 Merge: 9ba27414f2ec2 1d27a0be16d6c Author: Linus Torvalds Date: Tue Aug 4 15:02:07 2020 -0700 Merge tag 'cap-checkpoint-restore-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull checkpoint-restore updates from Christian Brauner: "This enables unprivileged checkpoint/restore of processes. Given that this work has been going on for quite some time the first sentence in this summary is hopefully more exciting than the actual final code changes required. Unprivileged checkpoint/restore has seen a frequent increase in interest over the last two years and has thus been one of the main topics for the combined containers & checkpoint/restore microconference since at least 2018 (cf. [1]). Here are just the three most frequent use-cases that were brought forward: - The JVM developers are integrating checkpoint/restore into a Java VM to significantly decrease the startup time. - In high-performance computing environment a resource manager will typically be distributing jobs where users are always running as non-root. Long-running and "large" processes with significant startup times are supposed to be checkpointed and restored with CRIU. - Container migration as a non-root user. In all of these scenarios it is either desirable or required to run without CAP_SYS_ADMIN. The userspace implementation of checkpoint/restore CRIU already has the pull request for supporting unprivileged checkpoint/restore up (cf. [2]). To enable unprivileged checkpoint/restore a new dedicated capability CAP_CHECKPOINT_RESTORE is introduced. This solution has last been discussed in 2019 in a talk by Google at Linux Plumbers (cf. [1] "Update on Task Migration at Google Using CRIU") with Adrian and Nicolas providing the implementation now over the last months. In essence, this allows the CRIU binary to be installed with the CAP_CHECKPOINT_RESTORE vfs capability set thereby enabling unprivileged users to restore processes. To make this possible the following permissions are altered: - Selecting a specific PID via clone3() set_tid relaxed from userns CAP_SYS_ADMIN to CAP_CHECKPOINT_RESTORE. - Selecting a specific PID via /proc/sys/kernel/ns_last_pid relaxed from userns CAP_SYS_ADMIN to CAP_CHECKPOINT_RESTORE. - Accessing /proc/pid/map_files relaxed from init userns CAP_SYS_ADMIN to init userns CAP_CHECKPOINT_RESTORE. - Changing /proc/self/exe from userns CAP_SYS_ADMIN to userns CAP_CHECKPOINT_RESTORE. Of these four changes the /proc/self/exe change deserves a few words because the reasoning behind even restricting /proc/self/exe changes in the first place is just full of historical quirks and tracking this down was a questionable version of fun that I'd like to spare others. In short, it is trivial to change /proc/self/exe as an unprivileged user, i.e. without userns CAP_SYS_ADMIN right now. Either via ptrace() or by simply intercepting the elf loader in userspace during exec. Nicolas was nice enough to even provide a POC for the latter (cf. [3]) to illustrate this fact. The original patchset which introduced PR_SET_MM_MAP had no permissions around changing the exe link. They too argued that it is trivial to spoof the exe link already which is true. The argument brought up against this was that the Tomoyo LSM uses the exe link in tomoyo_manager() to detect whether the calling process is a policy manager. This caused changing the exe links to be guarded by userns CAP_SYS_ADMIN. All in all this rather seems like a "better guard it with something rather than nothing" argument which imho doesn't qualify as a great security policy. Again, because spoofing the exe link is possible for the calling process so even if this were security relevant it was broken back then and would be broken today. So technically, dropping all permissions around changing the exe link would probably be possible and would send a clearer message to any userspace that relies on /proc/self/exe for security reasons that they should stop doing this but for now we're only relaxing the exe link permissions from userns CAP_SYS_ADMIN to userns CAP_CHECKPOINT_RESTORE. There's a final uapi change in here. Changing the exe link used to accidently return EINVAL when the caller lacked the necessary permissions instead of the more correct EPERM. This pr contains a commit fixing this. I assume that userspace won't notice or care and if they do I will revert this commit. But since we are changing the permissions anyway it seems like a good opportunity to try this fix. With these changes merged unprivileged checkpoint/restore will be possible and has already been tested by various users" [1] LPC 2018 1. "Task Migration at Google Using CRIU" https://www.youtube.com/watch?v=yI_1cuhoDgA&t=12095 2. "Securely Migrating Untrusted Workloads with CRIU" https://www.youtube.com/watch?v=yI_1cuhoDgA&t=14400 LPC 2019 1. "CRIU and the PID dance" https://www.youtube.com/watch?v=LN2CUgp8deo&list=PLVsQ_xZBEyN30ZA3Pc9MZMFzdjwyz26dO&index=9&t=2m48s 2. "Update on Task Migration at Google Using CRIU" https://www.youtube.com/watch?v=LN2CUgp8deo&list=PLVsQ_xZBEyN30ZA3Pc9MZMFzdjwyz26dO&index=9&t=1h2m8s [2] https://github.com/checkpoint-restore/criu/pull/1155 [3] https://github.com/nviennot/run_as_exe * tag 'cap-checkpoint-restore-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: selftests: add clone3() CAP_CHECKPOINT_RESTORE test prctl: exe link permission error changed from -EINVAL to -EPERM prctl: Allow local CAP_CHECKPOINT_RESTORE to change /proc/self/exe proc: allow access in init userns for map_files with CAP_CHECKPOINT_RESTORE pid_namespace: use checkpoint_restore_ns_capable() for ns_last_pid pid: use checkpoint_restore_ns_capable() for set_tid capabilities: Introduce CAP_CHECKPOINT_RESTORE commit 9ba27414f2ec2bfb019d9e9170fd2308aebab63a Merge: 0a72761b27fe3 714acdbd1c94e Author: Linus Torvalds Date: Tue Aug 4 14:47:45 2020 -0700 Merge tag 'fork-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull fork cleanups from Christian Brauner: "This is cleanup series from when we reworked a chunk of the process creation paths in the kernel and switched to struct {kernel_}clone_args. High-level this does two main things: - Remove the double export of both do_fork() and _do_fork() where do_fork() used the incosistent legacy clone calling convention. Now we only export _do_fork() which is based on struct kernel_clone_args. - Remove the copy_thread_tls()/copy_thread() split making the architecture specific HAVE_COYP_THREAD_TLS config option obsolete. This switches all remaining architectures to select HAVE_COPY_THREAD_TLS and thus to the copy_thread_tls() calling convention. The current split makes the process creation codepaths more convoluted than they need to be. Each architecture has their own copy_thread() function unless it selects HAVE_COPY_THREAD_TLS then it has a copy_thread_tls() function. The split is not needed anymore nowadays, all architectures support CLONE_SETTLS but quite a few of them never bothered to select HAVE_COPY_THREAD_TLS and instead simply continued to use copy_thread() and use the old calling convention. Removing this split cleans up the process creation codepaths and paves the way for implementing clone3() on such architectures since it requires the copy_thread_tls() calling convention. After having made each architectures support copy_thread_tls() this series simply renames that function back to copy_thread(). It also switches all architectures that call do_fork() directly over to _do_fork() and the struct kernel_clone_args calling convention. This is a corollary of switching the architectures that did not yet support it over to copy_thread_tls() since do_fork() is conditional on not supporting copy_thread_tls() (Mostly because it lacks a separate argument for tls which is trivial to fix but there's no need for this function to exist.). The do_fork() removal is in itself already useful as it allows to to remove the export of both do_fork() and _do_fork() we currently have in favor of only _do_fork(). This has already been discussed back when we added clone3(). The legacy clone() calling convention is - as is probably well-known - somewhat odd: # # ABI hall of shame # config CLONE_BACKWARDS config CLONE_BACKWARDS2 config CLONE_BACKWARDS3 that is aggravated by the fact that some architectures such as sparc follow the CLONE_BACKWARDSx calling convention but don't really select the corresponding config option since they call do_fork() directly. So do_fork() enforces a somewhat arbitrary calling convention in the first place that doesn't really help the individual architectures that deviate from it. They can thus simply be switched to _do_fork() enforcing a single calling convention. (I really hope that any new architectures will __not__ try to implement their own calling conventions...) Most architectures already have made a similar switch (m68k comes to mind). Overall this removes more code than it adds even with a good portion of added comments. It simplifies a chunk of arch specific assembly either by moving the code into C or by simply rewriting the assembly. Architectures that have been touched in non-trivial ways have all been actually boot and stress tested: sparc and ia64 have been tested with Debian 9 images. They are the two architectures which have been touched the most. All non-trivial changes to architectures have seen acks from the relevant maintainers. nios2 with a custom built buildroot image. h8300 I couldn't get something bootable to test on but the changes have been fairly automatic and I'm sure we'll hear people yell if I broke something there. All other architectures that have been touched in trivial ways have been compile tested for each single patch of the series via git rebase -x "make ..." v5.8-rc2. arm{64} and x86{_64} have been boot tested even though they have just been trivially touched (removal of the HAVE_COPY_THREAD_TLS macro from their Kconfig) because well they are basically "core architectures" and since it is trivial to get your hands on a useable image" * tag 'fork-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: arch: rename copy_thread_tls() back to copy_thread() arch: remove HAVE_COPY_THREAD_TLS unicore: switch to copy_thread_tls() sh: switch to copy_thread_tls() nds32: switch to copy_thread_tls() microblaze: switch to copy_thread_tls() hexagon: switch to copy_thread_tls() c6x: switch to copy_thread_tls() alpha: switch to copy_thread_tls() fork: remove do_fork() h8300: select HAVE_COPY_THREAD_TLS, switch to kernel_clone_args nios2: enable HAVE_COPY_THREAD_TLS, switch to kernel_clone_args ia64: enable HAVE_COPY_THREAD_TLS, switch to kernel_clone_args sparc: unconditionally enable HAVE_COPY_THREAD_TLS sparc: share process creation helpers between sparc and sparc64 sparc64: enable HAVE_COPY_THREAD_TLS fork: fold legacy_clone_args_valid() into _do_fork() commit 0a72761b27fe3b10e3f336bf2f2aa22635504cdd Merge: 3950e975431bc 55d9ad97e417c Author: Linus Torvalds Date: Tue Aug 4 14:40:07 2020 -0700 Merge tag 'threads-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread updates from Christian Brauner: "This contains the changes to add the missing support for attaching to time namespaces via pidfds. Last cycle setns() was changed to support attaching to multiple namespaces atomically. This requires all namespaces to have a point of no return where they can't fail anymore. Specifically, _install() is allowed to perform permission checks and install the namespace into the new struct nsset that it has been given but it is not allowed to make visible changes to the affected task. Once _install() returns, anything that the given namespace type additionally requires to be setup needs to ideally be done in a function that can't fail or if it fails the failure must be non-fatal. For time namespaces the relevant functions that fell into this category were timens_set_vvar_page() and vdso_join_timens(). The latter could still fail although it didn't need to. This function is only implemented for vdso_join_timens() in current mainline. As discussed on-list (cf. [1]), in order to make setns() support time namespaces when attaching to multiple namespaces at once properly we changed vdso_join_timens() to always succeed. So vdso_join_timens() replaces the mmap_write_lock_killable() with mmap_read_lock(). Please note that arm is about to grow vdso support for time namespaces (possibly this merge window). We've synced on this change and arm64 also uses mmap_read_lock(), i.e. makes vdso_join_timens() a function that can't fail. Once the changes here and the arm64 changes have landed, vdso_join_timens() should be turned into a void function so it's obvious to callers and implementers on other architectures that the expectation is that it can't fail. We didn't do this right away because it would've introduced unnecessary merge conflicts between the two trees for no major gain. As always, tests included" [1]: https://lore.kernel.org/lkml/20200611110221.pgd3r5qkjrjmfqa2@wittgenstein * tag 'threads-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: tests: add CLONE_NEWTIME setns tests nsproxy: support CLONE_NEWTIME with setns() timens: add timens_commit() helper timens: make vdso_join_timens() always succeed commit e2f75e6b5d766195d2ca584d92995a0dfe467fc7 Author: Roy van Doormaal Date: Tue Jul 28 17:18:45 2020 +0200 hwmon: (adc128d818) Fix advanced configuration register init If the operation mode is non-zero and an external reference voltage is set, first the operation mode is written to the advanced configuration register, followed by the externel reference enable bit, resetting the configuration mode to 0. To fix this, first compose the value of the advanced configuration register based on the configuration mode and the external reference voltage. The advanced configuration register is then written to the device, if it is different from the default register value (0x0). Signed-off-by: Roy van Doormaal Link: https://lore.kernel.org/r/20200728151846.231785-1-roy.van.doormaal@prodrive-technologies.com Signed-off-by: Guenter Roeck commit 3950e975431bc914f7e81b8f2a2dbdf2064acb0f Merge: fd76a74d940ae 7fce69dff8db3 Author: Linus Torvalds Date: Tue Aug 4 14:27:25 2020 -0700 Merge branch 'exec-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull execve updates from Eric Biederman: "During the development of v5.7 I ran into bugs and quality of implementation issues related to exec that could not be easily fixed because of the way exec is implemented. So I have been diggin into exec and cleaning up what I can. This cycle I have been looking at different ideas and different implementations to see what is possible to improve exec, and cleaning the way exec interfaces with in kernel users. Only cleaning up the interfaces of exec with rest of the kernel has managed to stabalize and make it through review in time for v5.9-rc1 resulting in 2 sets of changes this cycle. - Implement kernel_execve - Make the user mode driver code a better citizen With kernel_execve the code size got a little larger as the copying of parameters from userspace and copying of parameters from userspace is now separate. The good news is kernel threads no longer need to play games with set_fs to use exec. Which when combined with the rest of Christophs set_fs changes should security bugs with set_fs much more difficult" * 'exec-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (23 commits) exec: Implement kernel_execve exec: Factor bprm_stack_limits out of prepare_arg_pages exec: Factor bprm_execve out of do_execve_common exec: Move bprm_mm_init into alloc_bprm exec: Move initialization of bprm->filename into alloc_bprm exec: Factor out alloc_bprm exec: Remove unnecessary spaces from binfmts.h umd: Stop using split_argv umd: Remove exit_umh bpfilter: Take advantage of the facilities of struct pid exit: Factor thread_group_exited out of pidfd_poll umd: Track user space drivers with struct pid bpfilter: Move bpfilter_umh back into init data exec: Remove do_execve_file umh: Stop calling do_execve_file umd: Transform fork_usermode_blob into fork_usermode_driver umd: Rename umd_info.cmdline umd_info.driver_name umd: For clarity rename umh_info umd_info umh: Separate the user mode driver and the user mode helper support umh: Remove call_usermodehelper_setup_file. ... commit dfddc57c9971b213214cada1dcf26ef27f419b5c Author: Alexandru Ardelean Date: Mon Aug 3 08:43:11 2020 +0300 hwmon: (axi-fan-control) remove duplicate macros These macros are also present in the "include/linux/fpga/adi-axi-common.h" file which is included in this driver. This patch removes them from the AXI Fan Control driver. No sense in having them in 2 places. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20200803054311.98174-1-alexandru.ardelean@analog.com Signed-off-by: Guenter Roeck commit 2207515db60a6885e11069251d4f4ca4bf3abb6b Author: Saheed O. Bolarinwa Date: Sat Aug 1 13:24:39 2020 +0200 hwmon: (i5k_amb, vt8231) Drop uses of pci_read_config_*() return value The return value of pci_read_config_*() may not indicate a device error. However, the value read by these functions is more likely to indicate this kind of error. This presents two overlapping ways of reporting errors and complicates error checking. It is possible to move to one single way of checking for error if the dependency on the return value of these functions is removed, then it can later be made to return void. Remove all uses of the return value of pci_read_config_*(). Check the actual value read for ~0. In this case, ~0 is an invalid value thus it indicates some kind of error. Suggested-by: Bjorn Helgaas Signed-off-by: Saheed O. Bolarinwa Link: https://lore.kernel.org/r/20200801112446.149549-11-refactormyself@gmail.com Signed-off-by: Guenter Roeck commit fd76a74d940ae3d6b8b2395cd12914630c7e1739 Merge: 49e917deeb81e b43870c74f3fd Author: Linus Torvalds Date: Tue Aug 4 14:20:26 2020 -0700 Merge tag 'audit-pr-20200803' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "Aside from some smaller bug fixes, here are the highlights: - add a new backlog wait metric to the audit status message, this is intended to help admins determine how long processes have been waiting for the audit backlog queue to clear - generate audit records for nftables configuration changes - generate CWD audit records for for the relevant LSM audit records" * tag 'audit-pr-20200803' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: report audit wait metric in audit status reply audit: purge audit_log_string from the intra-kernel audit API audit: issue CWD record to accompany LSM_AUDIT_DATA_* records audit: use the proper gfp flags in the audit_log_nfcfg() calls audit: remove unused !CONFIG_AUDITSYSCALL __audit_inode* stubs audit: add gfp parameter to audit_log_nfcfg audit: log nftables configuration change events audit: Use struct_size() helper in alloc_chunk commit 49e917deeb81e263bcdb4b20e61ca18111995ffe Merge: 9ecc6ea491f0c 54b27f9287a7b Author: Linus Torvalds Date: Tue Aug 4 14:18:01 2020 -0700 Merge tag 'selinux-pr-20200803' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: "Beyond the usual smattering of bug fixes, we've got three small improvements worth highlighting: - improved SELinux policy symbol table performance due to a reworking of the insert and search functions - allow reading of SELinux labels before the policy is loaded, allowing for some more "exotic" initramfs approaches - improved checking an error reporting about process class/permissions during SELinux policy load" * tag 'selinux-pr-20200803' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: complete the inlining of hashtab functions selinux: prepare for inlining of hashtab functions selinux: specialize symtab insert and search functions selinux: Fix spelling mistakes in the comments selinux: fixed a checkpatch warning with the sizeof macro selinux: log error messages on required process class / permissions scripts/selinux/mdp: fix initial SID handling selinux: allow reading labels before policy is loaded commit 9ecc6ea491f0c0531ad81ef9466284df260b2227 Merge: 99ea1521a097d c97aedc52dce4 Author: Linus Torvalds Date: Tue Aug 4 14:11:08 2020 -0700 Merge tag 'seccomp-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: "There are a bunch of clean ups and selftest improvements along with two major updates to the SECCOMP_RET_USER_NOTIF filter return: EPOLLHUP support to more easily detect the death of a monitored process, and being able to inject fds when intercepting syscalls that expect an fd-opening side-effect (needed by both container folks and Chrome). The latter continued the refactoring of __scm_install_fd() started by Christoph, and in the process found and fixed a handful of bugs in various callers. - Improved selftest coverage, timeouts, and reporting - Add EPOLLHUP support for SECCOMP_RET_USER_NOTIF (Christian Brauner) - Refactor __scm_install_fd() into __receive_fd() and fix buggy callers - Introduce 'addfd' command for SECCOMP_RET_USER_NOTIF (Sargun Dhillon)" * tag 'seccomp-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: (30 commits) selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD seccomp: Introduce addfd ioctl to seccomp user notifier fs: Expand __receive_fd() to accept existing fd pidfd: Replace open-coded receive_fd() fs: Add receive_fd() wrapper for __receive_fd() fs: Move __scm_install_fd() to __receive_fd() net/scm: Regularize compat handling of scm_detach_fds() pidfd: Add missing sock updates for pidfd_getfd() net/compat: Add missing sock updates for SCM_RIGHTS selftests/seccomp: Check ENOSYS under tracing selftests/seccomp: Refactor to use fixture variants selftests/harness: Clean up kern-doc for fixtures seccomp: Use -1 marker for end of mode 1 syscall list seccomp: Fix ioctl number for SECCOMP_IOCTL_NOTIF_ID_VALID selftests/seccomp: Rename user_trap_syscall() to user_notif_syscall() selftests/seccomp: Make kcmp() less required seccomp: Use pr_fmt selftests/seccomp: Improve calibration loop selftests/seccomp: use 90s as timeout selftests/seccomp: Expand benchmark to per-filter measurements ... commit 477d08478170469d10b533624342d13701e24b34 Author: Masami Hiramatsu Date: Tue Aug 4 11:52:13 2020 +0900 bootconfig: Fix to find the initargs correctly Since the parse_args() stops parsing at '--', bootconfig_params() will never get the '--' as param and initargs_found never be true. In the result, if we pass some init arguments via the bootconfig, those are always appended to the kernel command line with '--' even if the kernel command line already has '--'. To fix this correctly, check the return value of parse_args() and set initargs_found true if the return value is not an error but a valid address. Link: https://lkml.kernel.org/r/159650953285.270383.14822353843556363851.stgit@devnote2 Fixes: f61872bb58a1 ("bootconfig: Use parse_args() to find bootconfig and '--'") Cc: stable@vger.kernel.org Reported-by: Arvind Sankar Suggested-by: Arvind Sankar Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 99ea1521a097db51f0f04f54cfbd3b0ed119d2f1 Merge: 427714f258a37 63a0895d960aa Author: Linus Torvalds Date: Tue Aug 4 13:49:43 2020 -0700 Merge tag 'uninit-macro-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull uninitialized_var() macro removal from Kees Cook: "This is long overdue, and has hidden too many bugs over the years. The series has several "by hand" fixes, and then a trivial treewide replacement. - Clean up non-trivial uses of uninitialized_var() - Update documentation and checkpatch for uninitialized_var() removal - Treewide removal of uninitialized_var()" * tag 'uninit-macro-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: compiler: Remove uninitialized_var() macro treewide: Remove uninitialized_var() usage checkpatch: Remove awareness of uninitialized_var() macro mm/debug_vm_pgtable: Remove uninitialized_var() usage f2fs: Eliminate usage of uninitialized_var() macro media: sur40: Remove uninitialized_var() usage KVM: PPC: Book3S PR: Remove uninitialized_var() usage clk: spear: Remove uninitialized_var() usage clk: st: Remove uninitialized_var() usage spi: davinci: Remove uninitialized_var() usage ide: Remove uninitialized_var() usage rtlwifi: rtl8192cu: Remove uninitialized_var() usage b43: Remove uninitialized_var() usage drbd: Remove uninitialized_var() usage x86/mm/numa: Remove uninitialized_var() usage docs: deprecated.rst: Add uninitialized_var() commit d05f94ad28c76cbd98aecee8e617f18454050f57 Author: Denis Efremov Date: Mon Jul 20 19:22:16 2020 +0300 coccinelle: api: filter out memdup_user definitions Don't match memdup_user/vmemdup_user. Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 9c568dbd677bcfc975220d3157c89c48669a23e3 Author: Denis Efremov Date: Mon Jul 20 19:22:15 2020 +0300 coccinelle: api: extend memdup_user rule with vmemdup_user() Add vmemdup_user() transformations to the memdup_user.cocci rule. Commit 50fd2f298bef ("new primitive: vmemdup_user()") introduced vmemdup_user(). The function uses kvmalloc with GPF_USER flag. Signed-off-by: Denis Efremov commit 547ade42ced037db77a82e67d70b55c0eecc49e0 Author: Denis Efremov Date: Mon Jul 20 19:22:14 2020 +0300 coccinelle: api: extend memdup_user transformation with GFP_USER Match GFP_USER and optional __GFP_NOWARN allocations with memdup_user.cocci rule. Commit 6c2c97a24f09 ("memdup_user(): switch to GFP_USER") switched memdup_user() from GFP_KERNEL to GFP_USER. In almost all cases it is still a good idea to recommend memdup_user() for GFP_KERNEL allocations. The motivation behind altering memdup_user() to GFP_USER: https://lkml.org/lkml/2018/1/6/333 Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 7cf4be68b177855b620dbc045bf26606eed197ac Author: Denis Efremov Date: Fri Jul 17 14:57:09 2020 +0300 coccinelle: api: add kzfree script Check for memset()/memzero_explicit() followed by kfree()/vfree()/kvfree(). Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit de50862520480b90ec2fcaed6ad1ad41462fbf30 Author: Denis Efremov Date: Tue Jun 23 01:10:56 2020 +0300 coccinelle: misc: add array_size_dup script to detect missed overflow checks Detect an opencoded expression that is used before or after array_size()/array3_size()/struct_size() to compute the same size. Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 2fbecb7dfefdbe8250a86f92bb81d87deebc0488 Author: Denis Efremov Date: Fri Jun 19 16:23:07 2020 +0300 coccinelle: api/kstrdup: fix coccinelle position There is a typo in rule r2. Position p1 should be attached to kzalloc() call. Fixes: 29a36d4dec6c ("scripts/coccinelle: improve the coverage of some semantic patches") Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit abfc19ff202d287742483e15fd478ddd6ada2187 Author: Denis Efremov Date: Mon Jun 15 16:02:42 2020 +0300 coccinelle: api: add device_attr_show script According to the documentation[1] show() methods of device attributes should return the number of bytes printed into the buffer. This is the return value of scnprintf(). show() must not use snprintf() when formatting the value to be returned to user space. snprintf() returns the length the resulting string would be, assuming it all fit into the destination array[2]. scnprintf() return the length of the string actually created in buf. If one can guarantee that an overflow will never happen sprintf() can be used otherwise scnprintf(). [1] Documentation/filesystems/sysfs.txt [2] "snprintf() confusion" https://lwn.net/Articles/69419/ Signed-off-by: Denis Efremov Signed-off-by: Julia Lawall commit 427714f258a3783b15e33d6daa34d57824f28bab Merge: 5b5d3be5d690a 12cc923f1ccc1 Author: Linus Torvalds Date: Tue Aug 4 13:40:35 2020 -0700 Merge tag 'tasklets-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull tasklets API update from Kees Cook: "These are the infrastructure updates needed to support converting the tasklet API to something more modern (and hopefully for removal further down the road). There is a 300-patch series waiting in the wings to get set out to subsystem maintainers, but these changes need to be present in the kernel first. Since this has some treewide changes, I carried this series for -next instead of paining Thomas with it in -tip, but it's got his Ack. This is similar to the timer_struct modernization from a while back, but not nearly as messy (I hope). :) - Prepare for tasklet API modernization (Romain Perier, Allen Pais, Kees Cook)" * tag 'tasklets-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: tasklet: Introduce new initialization API treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() usb: gadget: udc: Avoid tasklet passing a global commit 5b5d3be5d690a94be390ccf3e4db8dcb7409bf75 Merge: 3e4a12a1bafaf f0fe00d4972a8 Author: Linus Torvalds Date: Tue Aug 4 13:38:35 2020 -0700 Merge tag 'var-init-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull automatic variable initialization updates from Kees Cook: "This adds the "zero" init option from Clang, which is being used widely in production builds of Android and Chrome OS (though it also keeps the "pattern" init, which is better for debug builds). - Introduce CONFIG_INIT_STACK_ALL_ZERO (Alexander Potapenko)" * tag 'var-init-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: security: allow using Clang's zero initialization for stack variables commit ee895a30ef463e3ebaa5cbe464346d9fbbce1860 Merge: bab9693a9a8c6 4203b19c27967 Author: David S. Miller Date: Tue Aug 4 13:32:39 2020 -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 net: 1) Flush the cleanup xtables worker to make sure destructors have completed, from Florian Westphal. 2) iifgroup is matching erroneously, also from Florian. 3) Add selftest for meta interface matching, from Florian Westphal. 4) Move nf_ct_offload_timeout() to header, from Roi Dayan. 5) Call nf_ct_offload_timeout() from flow_offload_add() to make sure garbage collection does not evict offloaded flow, from Roi Dayan. ==================== Signed-off-by: David S. Miller commit a9cb9f4148ef6bb8fabbdaa85c42b2171fbd5a0d Author: Johannes Thumshirn Date: Tue Aug 4 18:25:01 2020 +0900 dm: don't call report zones for more than the user requested Don't call report zones for more zones than the user actually requested, otherwise this can lead to out-of-bounds accesses in the callback functions. Such a situation can happen if the target's ->report_zones() callback function returns 0 because we've reached the end of the target and then restart the report zones on the second target. We're again calling into ->report_zones() and ultimately into the user supplied callback function but when we're not subtracting the number of zones already processed this may lead to out-of-bounds accesses in the user callbacks. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Fixes: d41003513e61 ("block: rework zone reporting") Cc: stable@vger.kernel.org # v5.5+ Signed-off-by: Mike Snitzer commit 3e4a12a1bafafecaf1631f02099e82b424967718 Merge: 19a93823cf63d 496b24ec6d47f Author: Linus Torvalds Date: Tue Aug 4 13:26:06 2020 -0700 Merge tag 'gcc-plugins-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull gcc plugin updates from Kees Cook: "Primarily improvements to STACKLEAK from Alexander Popov, along with some additional cleanups. - Update URLs for HTTPS scheme where available (Alexander A. Klimov) - Improve STACKLEAK code generation on x86 (Alexander Popov)" * tag 'gcc-plugins-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: gcc-plugins: Replace HTTP links with HTTPS ones gcc-plugins/stackleak: Add 'verbose' plugin parameter gcc-plugins/stackleak: Use asm instrumentation to avoid useless register saving ARM: vdso: Don't use gcc plugins for building vgettimeofday.c gcc-plugins/stackleak: Don't instrument itself commit 19a93823cf63d44d04c7571152087f12cb2199e6 Merge: c0842fbc1b18c fd49e03280e59 Author: Linus Torvalds Date: Tue Aug 4 13:22:38 2020 -0700 Merge tag 'pstore-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore update from Kees Cook: "A tiny pstore update which fixes a very corner-case build failure: - Fix linking when crypto API disabled (Matteo Croce)" * tag 'pstore-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: Fix linking when crypto API disabled commit bab9693a9a8c6dd19f670408ec1e78e12a320682 Author: Xin Long Date: Tue Aug 4 15:02:30 2020 +0800 net: thunderx: use spin_lock_bh in nicvf_set_rx_mode_task() A dead lock was triggered on thunderx driver: CPU0 CPU1 ---- ---- [01] lock(&(&nic->rx_mode_wq_lock)->rlock); [11] lock(&(&mc->mca_lock)->rlock); [12] lock(&(&nic->rx_mode_wq_lock)->rlock); [02] lock(&(&mc->mca_lock)->rlock); The path for each is: [01] worker_thread() -> process_one_work() -> nicvf_set_rx_mode_task() [02] mld_ifc_timer_expire() [11] ipv6_add_dev() -> ipv6_dev_mc_inc() -> igmp6_group_added() -> [12] dev_mc_add() -> __dev_set_rx_mode() -> nicvf_set_rx_mode() To fix it, it needs to disable bh on [1], so that the timer on [2] wouldn't be triggered until rx_mode_wq_lock is released. So change to use spin_lock_bh() instead of spin_lock(). Thanks to Paolo for helping with this. v1->v2: - post to netdev. Reported-by: Rafael P. Tested-by: Dean Nelson Fixes: 469998c861fa ("net: thunderx: prevent concurrent data re-writing by nicvf_set_rx_mode") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 2ac24d6d685cb1c0e0fbb189dc607b05720fb5d1 Merge: cabf06e5a275d 7b53682c94032 Author: David S. Miller Date: Tue Aug 4 13:01:46 2020 -0700 Merge branch 'Support-PMTU-discovery-with-bridged-UDP-tunnels' Stefano Brivio says: ==================== Support PMTU discovery with bridged UDP tunnels Currently, PMTU discovery for UDP tunnels only works if packets are routed to the encapsulating interfaces, not bridged. This results from the fact that we generally don't have valid routes to the senders we can use to relay ICMP and ICMPv6 errors, and makes PMTU discovery completely non-functional for VXLAN and GENEVE ports of both regular bridges and Open vSwitch instances. If the sender is local, and packets are forwarded to the port by a regular bridge, all it takes is to generate a corresponding route exception on the encapsulating device. The bridge then finds the route exception carrying the PMTU value estimate as it forwards frames, and relays ICMP messages back to the socket of the local sender. Patch 1/6 fixes this case. If the sender resides on another node, we actually need to reply to IP and IPv6 packets ourselves and send these ICMP or ICMPv6 errors back, using the same encapsulating device. Patch 2/6, based on an original idea by Florian Westphal, adds the needed functionality, while patches 3/6 and 4/6 add matching support for VXLAN and GENEVE. Finally, 5/6 and 6/6 introduce selftests for all combinations of inner and outer IP versions, covering both VXLAN and GENEVE, with both regular bridges and Open vSwitch instances. v2: Add helper to check for any bridge port, skip oif check for PMTU routes for bridge ports only, split IPv4 and IPv6 helpers and functions (all suggested by David Ahern) ==================== Signed-off-by: David S. Miller commit 7b53682c94032a7a7adec400400c65d0af7fea5a Author: Stefano Brivio Date: Tue Aug 4 07:53:47 2020 +0200 selftests: pmtu.sh: Add tests for UDP tunnels handled by Open vSwitch The new tests check that IP and IPv6 packets exceeding the local PMTU estimate, forwarded by an Open vSwitch instance from another node, result in the correct route exceptions being created, and that communication with end-to-end fragmentation, over GENEVE and VXLAN Open vSwitch ports, is now possible as a result of PMTU discovery. Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller commit df40e39c0df025da38dd819152a877a07ab1c115 Author: Stefano Brivio Date: Tue Aug 4 07:53:46 2020 +0200 selftests: pmtu.sh: Add tests for bridged UDP tunnels The new tests check that IP and IPv6 packets exceeding the local PMTU estimate, both locally generated and forwarded by a bridge from another node, result in the correct route exceptions being created, and that communication with end-to-end fragmentation over VXLAN and GENEVE tunnels is now possible as a result of PMTU discovery. Part of the existing setup functions aren't generic enough to simply add a namespace and a bridge to the existing routing setup. This rework is in progress and we can easily shrink this once more generic topology functions are available. Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller commit c1a800e88dbffca4ef48000cb3f9ad618dc7ad89 Author: Stefano Brivio Date: Tue Aug 4 07:53:45 2020 +0200 geneve: Support for PMTU discovery on directly bridged links If the interface is a bridge or Open vSwitch port, and we can't forward a packet because it exceeds the local PMTU estimate, trigger an ICMP or ICMPv6 reply to the sender, using the same interface to forward it back. If metadata collection is enabled, set destination and source addresses for the flow as if we were receiving the packet, so that Open vSwitch can match the ICMP error against the existing association. v2: Use netif_is_any_bridge_port() (David Ahern) Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller commit fc68c99577cc66e38d11b3e29304efb83fa08d53 Author: Stefano Brivio Date: Tue Aug 4 07:53:44 2020 +0200 vxlan: Support for PMTU discovery on directly bridged links If the interface is a bridge or Open vSwitch port, and we can't forward a packet because it exceeds the local PMTU estimate, trigger an ICMP or ICMPv6 reply to the sender, using the same interface to forward it back. If metadata collection is enabled, reverse destination and source addresses, so that Open vSwitch is able to match this packet against the existing, reverse flow. v2: Use netif_is_any_bridge_port() (David Ahern) Signed-off-by: Stefano Brivio Signed-off-by: David S. Miller commit 4cb47a8644cc9eb8ec81190a50e79e6530d0297f Author: Stefano Brivio Date: Tue Aug 4 07:53:43 2020 +0200 tunnels: PMTU discovery support for directly bridged IP packets It's currently possible to bridge Ethernet tunnels carrying IP packets directly to external interfaces without assigning them addresses and routes on the bridged network itself: this is the case for UDP tunnels bridged with a standard bridge or by Open vSwitch. PMTU discovery is currently broken with those configurations, because the encapsulation effectively decreases the MTU of the link, and while we are able to account for this using PMTU discovery on the lower layer, we don't have a way to relay ICMP or ICMPv6 messages needed by the sender, because we don't have valid routes to it. On the other hand, as a tunnel endpoint, we can't fragment packets as a general approach: this is for instance clearly forbidden for VXLAN by RFC 7348, section 4.3: VTEPs MUST NOT fragment VXLAN packets. Intermediate routers may fragment encapsulated VXLAN packets due to the larger frame size. The destination VTEP MAY silently discard such VXLAN fragments. The same paragraph recommends that the MTU over the physical network accomodates for encapsulations, but this isn't a practical option for complex topologies, especially for typical Open vSwitch use cases. Further, it states that: Other techniques like Path MTU discovery (see [RFC1191] and [RFC1981]) MAY be used to address this requirement as well. Now, PMTU discovery already works for routed interfaces, we get route exceptions created by the encapsulation device as they receive ICMP Fragmentation Needed and ICMPv6 Packet Too Big messages, and we already rebuild those messages with the appropriate MTU and route them back to the sender. Add the missing bits for bridged cases: - checks in skb_tunnel_check_pmtu() to understand if it's appropriate to trigger a reply according to RFC 1122 section 3.2.2 for ICMP and RFC 4443 section 2.4 for ICMPv6. This function is already called by UDP tunnels - a new function generating those ICMP or ICMPv6 replies. We can't reuse icmp_send() and icmp6_send() as we don't see the sender as a valid destination. This doesn't need to be generic, as we don't cover any other type of ICMP errors given that we only provide an encapsulation function to the sender While at it, make the MTU check in skb_tunnel_check_pmtu() accurate: we might receive GSO buffers here, and the passed headroom already includes the inner MAC length, so we don't have to account for it a second time (that would imply three MAC headers on the wire, but there are just two). This issue became visible while bridging IPv6 packets with 4500 bytes of payload over GENEVE using IPv4 with a PMTU of 4000. Given the 50 bytes of encapsulation headroom, we would advertise MTU as 3950, and we would reject fragmented IPv6 datagrams of 3958 bytes size on the wire. We're exclusively dealing with network MTU here, though, so we could get Ethernet frames up to 3964 octets in that case. v2: - moved skb_tunnel_check_pmtu() to ip_tunnel_core.c (David Ahern) - split IPv4/IPv6 functions (David Ahern) Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller commit df23bb18b44b9a1f2b54358201730e710a9df57f Author: Stefano Brivio Date: Tue Aug 4 07:53:42 2020 +0200 ipv4: route: Ignore output interface in FIB lookup for PMTU route Currently, processes sending traffic to a local bridge with an encapsulation device as a port don't get ICMP errors if they exceed the PMTU of the encapsulated link. David Ahern suggested this as a hack, but it actually looks like the correct solution: when we update the PMTU for a given destination by means of updating or creating a route exception, the encapsulation might trigger this because of PMTU discovery happening either on the encapsulation device itself, or its lower layer. This happens on bridged encapsulations only. The output interface shouldn't matter, because we already have a valid destination. Drop the output interface restriction from the associated route lookup. For UDP tunnels, we will now have a route exception created for the encapsulation itself, with a MTU value reflecting its headroom, which allows a bridge forwarding IP packets originated locally to deliver errors back to the sending socket. The behaviour is now consistent with IPv6 and verified with selftests pmtu_ipv{4,6}_br_{geneve,vxlan}{4,6}_exception introduced later in this series. v2: - reset output interface only for bridge ports (David Ahern) - add and use netif_is_any_bridge_port() helper (David Ahern) Suggested-by: David Ahern Signed-off-by: Stefano Brivio Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 4cb6f22612511ff2aba4c33fb0f281cae7c23772 Author: John Dorminy Date: Fri Jul 31 18:46:45 2020 -0400 dm ebs: Fix incorrect checking for REQ_OP_FLUSH REQ_OP_FLUSH was being treated as a flag, but the operation part of bio->bi_opf must be treated as a whole. Change to accessing the operation part via bio_op(bio) and checking for equality. Signed-off-by: John Dorminy Acked-by: Heinz Mauelshagen Fixes: d3c7b35c20d60 ("dm: add emulated block size target") Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit cabf06e5a275dde2a336c71536465b30ccf2ae4d Merge: 93f4ddd64b7dc 2cfd71f1a43e9 Author: David S. Miller Date: Tue Aug 4 12:57:02 2020 -0700 Merge tag 'wireless-drivers-next-2020-08-04' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.9 Second set of patches for v5.9. mt76 has most of patches this time. Otherwise it's just smaller fixes and cleanups to other drivers. There was a major conflict in mt76 driver between wireless-drivers and wireless-drivers-next. I solved that by merging the former to the latter. Major changes: rtw88 * add support for ieee80211_ops::change_interface * add support for enabling and disabling beacon * add debugfs file for testing h2c mt76 * ARP filter offload for 7663 * runtime power management for 7663 * testmode support for mfg calibration * support for more channels ==================== Signed-off-by: David S. Miller commit 93f4ddd64b7dca8279ad052e0d58d92b67c33907 Author: Joe Perches Date: Mon Aug 3 20:23:13 2020 -0700 via-velocity: Use more typical logging styles Use netdev_ in place of VELOCITY_PRT. Use pr_ in place of printk(KERN_. Miscellanea: o Add pr_fmt to prefix pr_ output with "via-velocity: " o Remove now unused functions and macros o Realign some logging lines o Remove devname where pr_ is also used Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit 90e6bf0659f11f3d8ffa7ae1d7a4fa2af015747a Author: Damien Le Moal Date: Thu Jul 16 13:38:15 2020 +0900 dm init: Set file local variable static Declare dm_allowed_targets as static to avoid the warning: drivers/md/dm-init.c:39:12: warning: symbol 'dm_allowed_targets' was not declared. Should it be static? when compiling with C=1. Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit 1aeb6e7cd118b90f1a227c79b26100af6a15960e Author: Damien Le Moal Date: Thu Jul 16 13:38:14 2020 +0900 dm ioctl: Fix compilation warning In retrieve_status(), when copying the target type name in the target_type string field of struct dm_target_spec, copy at most DM_MAX_TYPE_NAME - 1 character to avoid the compilation warning: warning: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] when compiling with W-1. Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit 04dc5330e5deebde2c88f8422c446e8212090ba3 Author: Damien Le Moal Date: Thu Jul 16 13:38:13 2020 +0900 dm raid: Remove empty if statement In super_init_validation(), remove a body-less if statement testing only variables to avoid a compilation warning when compiling with W=1. Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit a84c4308333a2cbd54593649a8b144df95c68227 Author: Damien Le Moal Date: Thu Jul 16 13:38:12 2020 +0900 dm verity: Fix compilation warning For the case !CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG, declare the functions verity_verify_root_hash(), verity_verify_is_sig_opt_arg(), verity_verify_sig_parse_opt_args() and verity_verify_sig_opts_cleanup() as inline to avoid a "no previous prototype for xxx" compilation warning when compiling with W=1. Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit a79da6953e2f5dcc8a4611ce8ebe809d6fe70459 Merge: da7955405fb25 c8c29ec3c5fa0 Author: David S. Miller Date: Tue Aug 4 12:17:06 2020 -0700 Merge branch 'hinic-mailbox-channel-enhancement' Luo bin says: ==================== hinic: mailbox channel enhancement add support to generate mailbox random id for VF to ensure that the mailbox message from VF is valid and PF should check whether the cmd from VF is supported before passing it to hw. ==================== Signed-off-by: David S. Miller commit c8c29ec3c5fa04137a0e1afa43e1b23ba509c3c4 Author: Luo bin Date: Tue Aug 4 10:19:12 2020 +0800 hinic: add check for mailbox msg from VF PF should check whether the cmd from VF is supported and its content is right before passing it to hw. Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 088c5f0d1a7c7f01e668d9d2d75e7d93b43b7690 Author: Luo bin Date: Tue Aug 4 10:19:11 2020 +0800 hinic: add generating mailbox random index support add support to generate mailbox random id of VF to ensure that mailbox messages PF received are from the correct VF. Signed-off-by: Luo bin Signed-off-by: David S. Miller commit e848643b524be9c10826c2cf36eebb74eef643d2 Author: Jing Xiangfeng Date: Fri Jul 17 17:52:59 2020 +0800 orangefs: remove unnecessary assignment to variable ret The variable ret is guaranteed to be 0 in this if (). So we can remove this assignement. Signed-off-by: Jing Xiangfeng Signed-off-by: Mike Marshall commit cd72c317a0a11f64225b9a3f1fe503bb8c7327b5 Author: Kai-Heng Feng Date: Tue Aug 4 23:58:34 2020 +0800 ALSA: hda/hdmi: Add quirk to force connectivity HDMI on some platforms doesn't enable audio support because its Port Connectivity [31:30] is set to AC_JACK_PORT_NONE: Node 0x05 [Pin Complex] wcaps 0x40778d: 8-Channels Digital Amp-Out CP Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x0b000094: OUT Detect HBR HDMI DP Pin Default 0x58560010: [N/A] Digital Out at Int HDMI Conn = Digital, Color = Unknown DefAssociation = 0x1, Sequence = 0x0 Pin-ctls: 0x40: OUT Unsolicited: tag=00, enabled=0 Power states: D0 D3 EPSS Power: setting=D0, actual=D0 Devices: 0 Connection: 3 0x02 0x03* 0x04 For now, use a quirk to force connectivity based on SSID. If there are more platforms affected by the same issue, we can eye for a more generic solution. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200804155836.16252-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 224c7b6778fe08e1880ef88867051bec0a154d6c Author: Yanhu Cao Date: Fri Jul 31 16:25:13 2020 +0800 ceph: use frag's MDS in either mode When doing some tests with multiple mds, we were seeing many mds forwarding requests between them, causing clients to resend. If the request is a modification operation and the mode is set to USE_AUTH_MDS, then the auth mds should be selected to handle the request. If auth mds for frag is already set, then it should be returned directly without further processing. The current logic is wrong because it only returns directly if mode is USE_AUTH_MDS, but we want to do that for all modes. If we don't, then when the frag's mds is not equal to cap session's mds, the request will get sent to the wrong MDS needlessly. Drop the mode check in this condition. Signed-off-by: Yanhu Cao Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit a0102bda5bc0991c5c8c7c07770b236894a810fd Author: Jeff Layton Date: Thu Jul 30 11:03:55 2020 -0400 ceph: move sb->wb_pagevec_pool to be a global mempool When doing some testing recently, I hit some page allocation failures on mount, when creating the wb_pagevec_pool for the mount. That requires 128k (32 contiguous pages), and after thrashing the memory during an xfstests run, sometimes that would fail. 128k for each mount seems like a lot to hold in reserve for a rainy day, so let's change this to a global mempool that gets allocated when the module is plugged in. Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit b748fc7a8763a5b3f8149f12c45711cd73ef8176 Author: Jeff Layton Date: Tue Jul 28 10:34:20 2020 -0400 ceph: set sec_context xattr on symlink creation Symlink inodes should have the security context set in their xattrs on creation. We already set the context on creation, but we don't attach the pagelist. The effect is that symlink inodes don't get an SELinux context set on them at creation, so they end up unlabeled instead of inheriting the proper context. Make it do so. Cc: stable@vger.kernel.org Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit a34a0a632dd991a371fec56431d73279f9c54029 Author: Xin Xiong Date: Sun Jul 19 23:45:45 2020 +0800 drm: fix drm_dp_mst_port refcount leaks in drm_dp_mst_allocate_vcpi drm_dp_mst_allocate_vcpi() invokes drm_dp_mst_topology_get_port_validated(), which increases the refcount of the "port". These reference counting issues take place in two exception handling paths separately. Either when “slots” is less than 0 or when drm_dp_init_vcpi() returns a negative value, the function forgets to reduce the refcnt increased drm_dp_mst_topology_get_port_validated(), which results in a refcount leak. Fix these issues by pulling up the error handling when "slots" is less than 0, and calling drm_dp_mst_topology_put_port() before termination when drm_dp_init_vcpi() returns a negative value. Fixes: 1e797f556c61 ("drm/dp: Split drm_dp_mst_allocate_vcpi") Cc: # v4.12+ Signed-off-by: Xiyu Yang Signed-off-by: Xin Tan Signed-off-by: Xin Xiong Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200719154545.GA41231@xin-virtual-machine commit b64aa11eb2ddb0600361178286d7b7ed5a069fd8 Author: Rob Herring Date: Tue Jul 21 20:25:14 2020 -0600 PCI: Set bridge map_irq and swizzle_irq to default functions The majority of DT based host drivers use the default .map_irq() and .swizzle_irq() functions, so let's initialize the function pointers to the default and drop setting them in the host drivers. Drivers like iProc which don't support legacy interrupts need to set .map_irq() back to NULL. Link: https://lore.kernel.org/r/20200722022514.1283916-20-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 669cbc708122fc7a02282058a09f096200cee090 Author: Rob Herring Date: Tue Jul 21 20:25:13 2020 -0600 PCI: Move DT resource setup into devm_pci_alloc_host_bridge() Now that pci_parse_request_of_pci_ranges() callers just setup pci_host_bridge.windows and dma_ranges directly and don't need the bus range returned, we can just initialize them when allocating the pci_host_bridge struct. With this, pci_parse_request_of_pci_ranges() becomes a static function. Link: https://lore.kernel.org/r/20200722022514.1283916-19-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 4a957563fe0231e0b7764bbb35c135a468643d5f Author: Rob Herring Date: Tue Jul 21 20:25:12 2020 -0600 PCI: rcar-gen2: Convert to use modern host bridge probe functions The rcar-gen2 host driver still uses the old Arm PCI setup function pci_common_init_dev(). Let's update it to use the modern devm_pci_alloc_host_bridge(), pci_parse_request_of_pci_ranges() and pci_host_probe() functions. Link: https://lore.kernel.org/r/20200722022514.1283916-18-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Marek Vasut Cc: Yoshihiro Shimoda Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: linux-renesas-soc@vger.kernel.org commit 57e60db3bc4d2755aefe5abd1024662f478770ac Merge: 30d497a0e1aad 6f2fdb298bf8e Author: Petr Mladek Date: Tue Aug 4 16:27:43 2020 +0200 Merge branch 'for-5.9-console-return-codes' into for-linus commit e2693ec1e0a12a6dc601e4dfe9b6f714b92f6954 Author: Rolf Eike Beer Date: Mon Jun 22 20:47:50 2020 +0200 parisc: make the log level string for register dumps const Signed-off-by: Rolf Eike Beer Signed-off-by: Helge Deller commit 0c83b277ada72b585e6a3e52b067669df15bcedb Author: Michael Ellerman Date: Tue Aug 4 22:44:06 2020 +1000 powerpc: Fix circular dependency between percpu.h and mmu.h Recently random.h started including percpu.h (see commit f227e3ec3b5c ("random32: update the net random state on interrupt and activity")), which broke corenet64_smp_defconfig: In file included from /linux/arch/powerpc/include/asm/paca.h:18, from /linux/arch/powerpc/include/asm/percpu.h:13, from /linux/include/linux/random.h:14, from /linux/lib/uuid.c:14: /linux/arch/powerpc/include/asm/mmu.h:139:22: error: unknown type name 'next_tlbcam_idx' 139 | DECLARE_PER_CPU(int, next_tlbcam_idx); This is due to a circular header dependency: asm/mmu.h includes asm/percpu.h, which includes asm/paca.h, which includes asm/mmu.h Which means DECLARE_PER_CPU() isn't defined when mmu.h needs it. We can fix it by moving the include of paca.h below the include of asm-generic/percpu.h. This moves the include of paca.h out of the #ifdef __powerpc64__, but that is OK because paca.h is almost entirely inside #ifdef CONFIG_PPC64 anyway. It also moves the include of paca.h out of the #ifdef CONFIG_SMP, which could possibly break something, but seems to have no ill effects. Fixes: f227e3ec3b5c ("random32: update the net random state on interrupt and activity") Cc: stable@vger.kernel.org # v5.8 Reported-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200804130558.292328-1-mpe@ellerman.id.au commit ce4109005770ff6f160e1424928b9cc696e8c8f2 Author: Axel Lin Date: Sun Aug 2 11:25:09 2020 +0800 regulator: cros-ec-regulator: Add NULL test for devm_kmemdup call Fix possible NULL pointer dereference. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200802032509.305425-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit c4735d990268399da9133b0ad445e488ece009ad Author: Jin Yao Date: Mon Jul 20 09:00:13 2020 +0800 perf evsel: Don't set sample_regs_intr/sample_regs_user for dummy event Since commit 0a892c1c9472 ("perf record: Add dummy event during system wide synthesis"), a dummy event is added to capture mmaps. But if we run perf-record as, # perf record -e cycles:p -IXMM0 -a -- sleep 1 Error: dummy:HG: PMU Hardware doesn't support sampling/overflow-interrupts. Try 'perf stat' The issue is, if we enable the extended regs (-IXMM0), but the pmu->capabilities is not set with PERF_PMU_CAP_EXTENDED_REGS, the kernel will return -EOPNOTSUPP error. See following code: /* in kernel/events/core.c */ static int perf_try_init_event(struct pmu *pmu, struct perf_event *event) { .... if (!(pmu->capabilities & PERF_PMU_CAP_EXTENDED_REGS) && has_extended_regs(event)) ret = -EOPNOTSUPP; .... } For software dummy event, the PMU should not be set with PERF_PMU_CAP_EXTENDED_REGS. But unfortunately now, the dummy event has possibility to be set with PERF_REG_EXTENDED_MASK bit. In evsel__config, /* tools/perf/util/evsel.c */ if (opts->sample_intr_regs) { attr->sample_regs_intr = opts->sample_intr_regs; } If we use -IXMM0, the attr>sample_regs_intr will be set with PERF_REG_EXTENDED_MASK bit. It doesn't make sense to set attr->sample_regs_intr for a software dummy event. This patch adds dummy event checking before setting attr->sample_regs_intr and attr->sample_regs_user. After: # ./perf record -e cycles:p -IXMM0 -a -- sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.413 MB perf.data (45 samples) ] Committer notes: Adrian said this when providing his Acked-by: " This is fine. It will not break PT. no_aux_samples is useful for evsels that have been added by the code rather than requested by the user. For old kernels PT adds sched_switch tracepoint to track context switches (before the current context switch event was added) and having auxiliary sample information unnecessarily uses up space in the perf buffer. " Fixes: 0a892c1c9472 ("perf record: Add dummy event during system wide synthesis") Signed-off-by: Jin Yao Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200720010013.18238-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1d078ccb33807546c73e07a79fca6a976b7ecac8 Author: Alexey Budankov Date: Fri Jul 17 10:08:23 2020 +0300 perf record: Introduce --control fd:ctl-fd[,ack-fd] options Introduce --control fd:ctl-fd[,ack-fd] options to pass open file descriptors numbers from command line. Extend perf-record.txt file with --control fd:ctl-fd[,ack-fd] options description. Document possible usage model introduced by --control fd:ctl-fd[,ack-fd] options by providing example bash shell script. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/8dc01e1a-3a80-3f67-5385-4bc7112b0dd3@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit acce02239420e38369df7a69687f000c6822460b Author: Alexey Budankov Date: Fri Jul 17 10:07:50 2020 +0300 perf record: Implement control commands handling Implement handling of 'enable' and 'disable' control commands coming from control file descriptor. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/f0fde590-1320-dca1-39ff-da3322704d3b@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 68cd3b45b93d07f7e7d853f330d3a37b560b04f2 Author: Alexey Budankov Date: Fri Jul 17 10:07:03 2020 +0300 perf record: Extend -D,--delay option with -1 value Extend -D,--delay option with -1 to start collection with events disabled to be enabled later by 'enable' command provided via control file descriptor. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/3e7d362c-7973-ee5d-e81e-c60ea22432c3@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 27e9769aad3c435993a2e0cd91f5d868294145d0 Author: Alexey Budankov Date: Fri Jul 17 10:05:41 2020 +0300 perf stat: Introduce --control fd:ctl-fd[,ack-fd] options Introduce --control fd:ctl-fd[,ack-fd] options to pass open file descriptors numbers from command line. Extend perf-stat.txt file with --control fd:ctl-fd[,ack-fd] options description. Document possible usage model introduced by --control fd:ctl-fd[,ack-fd] options by providing example bash shell script. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/feabd5cf-0155-fb0a-4587-c71571f2d517@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2cfd71f1a43e9e1053db6c84f2dc33fe88128f67 Merge: 3dc05ffb04436 1cfd3426ef989 Author: Kalle Valo Date: Tue Aug 4 14:02:54 2020 +0300 Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git mt76 driver had major conflicts within mt7615 directory. To make it easier for every merge wireless-drivers to wireless-drivers-next and solve those conflicts. commit 9ac1fb156a40b88fddb2e2b8c36e127b0d01fb8e Merge: 4daca379c703f f259eab3ea0e7 Author: Rafael J. Wysocki Date: Tue Aug 4 12:44:53 2020 +0200 Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull ARM cpufreq driver changes for v5.9-rc1 from Viresh Kumar: "Here are the details: - Adaptive voltage scaling (AVS) support and minor cleanups for brcmstb driver (Florian Fainelli and Markus Mayer). - A new tegra driver and cleanup for the existing one (Sumit Gupta and Jon Hunter). - Bandwidth level support for Qcom driver along with OPP changes (Sibi Sankar). - Cleanups to sti, cpufreq-dt, ap806, CPPC drivers (Viresh Kumar, Lee Jones, Ivan Kokshaysky, Sven Auhagen, and Xin Hao). - Make schedutil default governor for ARM (Valentin Schneider). - Fix dependency issues for imx (Walter Lozano). - Cleanup around cached_resolved_idx in cpufreq core (Viresh Kumar)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: make schedutil the default for arm and arm64 cpufreq: cached_resolved_idx can not be negative cpufreq: Add Tegra194 cpufreq driver dt-bindings: arm: Add NVIDIA Tegra194 CPU Complex binding cpufreq: imx: Select NVMEM_IMX_OCOTP cpufreq: sti-cpufreq: Fix some formatting and misspelling issues cpufreq: tegra186: Simplify probe return path cpufreq: CPPC: Reuse caps variable in few routines cpufreq: ap806: fix cpufreq driver needs ap cpu clk cpufreq: cppc: Reorder code and remove apply_hisi_workaround variable cpufreq: dt: fix oops on armada37xx cpufreq: brcmstb-avs-cpufreq: send S2_ENTER / S2_EXIT commands to AVS cpufreq: brcmstb-avs-cpufreq: Support polling AVS firmware cpufreq: brcmstb-avs-cpufreq: more flexible interface for __issue_avs_command() cpufreq: qcom: Disable fast switch when scaling DDR/L3 cpufreq: qcom: Update the bandwidth levels on frequency change OPP: Add and export helper to set bandwidth cpufreq: blacklist SC7180 in cpufreq-dt-platdev cpufreq: blacklist SDM845 in cpufreq-dt-platdev commit 4daca379c703ff55edc065e8e5173dcfeecf0148 Author: Srinivas Pandruvada Date: Mon Aug 3 11:37:20 2020 -0700 cpufreq: intel_pstate: Fix cpuinfo_max_freq when MSR_TURBO_RATIO_LIMIT is 0 The MSR_TURBO_RATIO_LIMIT can be 0. This is not an error. User can update this MSR via BIOS settings on some systems or can use msr tools to update. Also some systems boot with value = 0. This results in display of cpufreq/cpuinfo_max_freq wrong. This value will be equal to cpufreq/base_frequency, even though turbo is enabled. But platform will still function normally in HWP mode as we get max 1-core frequency from the MSR_HWP_CAPABILITIES. This MSR is already used to calculate cpu->pstate.turbo_freq, which is used for to set policy->cpuinfo.max_freq. But some other places cpu->pstate.turbo_pstate is used. For example to set policy->max. To fix this, also update cpu->pstate.turbo_pstate when updating cpu->pstate.turbo_freq. Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 0abf803ef1b52cd3d33fceb7d7c3cd2f4d519ec9 Author: Rafael J. Wysocki Date: Fri Jul 31 19:04:11 2020 +0200 PM: runtime: Improve kerneldoc of pm_runtime_get_if_active() The kerneldoc comment of pm_runtime_get_if_active() doesn't list the second argument of the function properly, so fix that and while at it clarify that comment somewhat and add some markup to it. Signed-off-by: Rafael J. Wysocki Reviewed-by: Sakari Ailus commit 403d2d116ec011942a8505068b943c5c6cd91176 Author: Rafael J. Wysocki Date: Fri Jul 31 19:03:26 2020 +0200 PM: runtime: Add kerneldoc comments to multiple helpers Add kerneldoc comments to multiple PM-runtime helper functions defined as static inline wrappers around lower-level routines to provide quick reference decumentation of their behavior. Some of them are similar to each other with subtle differences only and the behavior of some of them may appear as counter-intuitive, so clarify all that to avoid confusion. Signed-off-by: Rafael J. Wysocki Acked-by: Alan Stern Reviewed-by: Sakari Ailus commit b5ac98cbb8e5e30c34ebc837d1e5a3982d2b5f5c Author: Marius Iacob Date: Sat Aug 1 15:34:46 2020 +0300 drm: Added orientation quirk for ASUS tablet model T103HAF Signed-off-by: Marius Iacob Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200801123445.1514567-1-themariusus@gmail.com commit c569e805c7bcebdd069e5c97ce5f8543f6d02433 Author: Sumeet Pawnikar Date: Thu Jul 30 13:55:03 2020 +0530 thermal: intel: intel_pch_thermal: Add Cannon Lake Low Power PCH support Add LP (Low Power) PCH id for Cannon Lake (CNL) based platforms. Signed-off-by: Sumeet Pawnikar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1596097503-27924-1-git-send-email-sumeet.r.pawnikar@intel.com commit ecfdedd7da5d54416db5ca0f851264dca8736f59 Author: Tomi Valkeinen Date: Thu Jun 18 12:51:52 2020 +0300 drm/omap: force runtime PM suspend on system suspend Use SET_LATE_SYSTEM_SLEEP_PM_OPS in DSS submodules to force runtime PM suspend and resume. We use suspend late version so that omapdrm's system suspend callback is called first, as that will disable all the display outputs after which it's safe to force DSS into suspend. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200618095153.611071-1-tomi.valkeinen@ti.com Acked-by: Tony Lindgren Fixes: cef766300353 ("drm/omap: Prepare DSS for probing without legacy platform data") Cc: stable@vger.kernel.org # v5.7+ Tested-by: Tony Lindgren commit a72a6a16d51034045cb6355924b62221a8221ca3 Author: Tomi Valkeinen Date: Thu Jun 4 11:02:14 2020 +0300 drm/tidss: fix modeset init for DPI panels The connector type for DISPC's DPI videoport was set the LVDS instead of DPI. This causes any DPI panel setup to fail with tidss, making all DPI panels unusable. Fix this by using correct connector type. Signed-off-by: Tomi Valkeinen Fixes: 32a1795f57eecc39749017 ("drm/tidss: New driver for TI Keystone platform Display SubSystem") Cc: stable@vger.kernel.org # v5.7+ Link: https://patchwork.freedesktop.org/patch/msgid/20200604080214.107159-1-tomi.valkeinen@ti.com Reviewed-by: Jyri Sarha commit f6c6eb2fe8223f8e64babcdaad2838ba6ede277d Author: Daniel Vetter Date: Mon Aug 3 16:11:42 2020 +0200 MAINTAINERS: enlist Greg formally for console stuff I did a few greps for main console data structures, and there's a few places outside of drivers/video/console: - a braille driver - a sisusbvga driver - fbcon, but I think that's fine if we leave that officially under fbdev maintainership - lots of stuff in drivers/tty/vt, which is already under Greg's maintainership. So I think this match gives reasonably useful Cc: lists for the files and places I've tested. Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Daniel Vetter Acked-by: Bartlomiej Zolnierkiewicz Link: https://lore.kernel.org/r/20200803141142.1606661-1-daniel.vetter@ffwll.ch Signed-off-by: Greg Kroah-Hartman commit ebfdfeeae8c01fcb2b3b74ffaf03876e20835d2d Author: Yunhai Zhang Date: Tue Jul 28 09:58:03 2020 +0800 vgacon: Fix for missing check in scrollback handling vgacon_scrollback_update() always leaves enbough room in the scrollback buffer for the next call, but if the console size changed that room might not actually be enough, and so we need to re-check. The check should be in the loop since vgacon_scrollback_cur->tail is updated in the loop and count may be more than 1 when triggered by CSI M, as Jiri's PoC: #include #include #include #include #include #include #include int main(int argc, char** argv) { int fd = open("/dev/tty1", O_RDWR); unsigned short size[3] = {25, 200, 0}; ioctl(fd, 0x5609, size); // VT_RESIZE write(fd, "\e[1;1H", 6); for (int i = 0; i < 30; i++) write(fd, "\e[10M", 5); } It leads to various crashes as vgacon_scrollback_update writes out of the buffer: BUG: unable to handle page fault for address: ffffc900001752a0 #PF: supervisor write access in kernel mode #PF: error_code(0x0002) - not-present page RIP: 0010:mutex_unlock+0x13/0x30 ... Call Trace: n_tty_write+0x1a0/0x4d0 tty_write+0x1a0/0x2e0 Or to KASAN reports: BUG: KASAN: slab-out-of-bounds in vgacon_scroll+0x57a/0x8ed This fixes CVE-2020-14331. Reported-by: 张云海 Reported-by: Yang Yingliang Reported-by: Kyungtae Kim Fixes: 15bdab959c9b ([PATCH] vgacon: Add support for soft scrollback) Cc: stable@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Cc: Linus Torvalds Cc: Solar Designer Cc: "Srivatsa S. Bhat" Cc: Anthony Liguori Cc: Yang Yingliang Cc: Bartlomiej Zolnierkiewicz Cc: Jiri Slaby Signed-off-by: Yunhai Zhang Link: https://lore.kernel.org/r/9fb43895-ca91-9b07-ebfd-808cf854ca95@nsfocus.com Signed-off-by: Greg Kroah-Hartman commit 82ad03db050597ee62a7eab8c300871f78734ed9 Author: Huacai Chen Date: Wed Jul 29 14:58:39 2020 +0800 MAINTAINERS: Update KVM/MIPS maintainers James Hogan has become inactive for a long time and leaves KVM for MIPS orphan. I'm working on KVM/Loongson and attempt to make it upstream both in kernel and QEMU, while Aleksandar Markovic is already a maintainer of QEMU/MIPS. We are both interested in QEMU/KVM/MIPS, and we have already made some contributions in kernel and QEMU. If possible, we want to take the KVM/MIPS maintainership. Reviewed-by: Jiaxun Yang Reviewed-by: Aleksandar Markovic Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 70b838292bef4e385579c7d0871bd457935a569a Author: Huacai Chen Date: Wed Jul 29 14:58:38 2020 +0800 MIPS: Update default config file for Loongson-3 Update Loongson-3's default config file: 1, Adjust NR_CPUS to 16; 2, Add a built-in cmdline "ieee754=relaxed"; 3, Enable MSA, CGROUPS, NAMESPACES, KVM, and XFS support; 4, Enable all possible virtio drivers to support KVM Host/Guest; 5, Enable all necessary netfilter modules to support virtual network; Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 39c1485c8baa47aa20caefc1ec0a3410fbad6c81 Author: Huacai Chen Date: Wed Jul 29 14:58:37 2020 +0800 MIPS: KVM: Add kvm guest support for Loongson-3 Loongson-3 KVM guest is based on virtio, it use liointc as its interrupt controller and use GPEX as the pci controller. Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit a84a334f03c59fa9c0d682d13368611f7ca4f8ac Author: Huacai Chen Date: Wed Jul 29 14:58:36 2020 +0800 dt-bindings: mips: Document Loongson kvm guest board Document loongson64v-4core-virtio, a virtio based kvm guest board for Loongson-3. Signed-off-by: Huacai Chen Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit c0842fbc1b18c7a044e6ff3e8fa78bfa822c7d1a Author: Linus Torvalds Date: Fri Jul 31 07:51:14 2020 +0200 random32: move the pseudo-random 32-bit definitions to prandom.h The addition of percpu.h to the list of includes in random.h revealed some circular dependencies on arm64 and possibly other platforms. This include was added solely for the pseudo-random definitions, which have nothing to do with the rest of the definitions in this file but are still there for legacy reasons. This patch moves the pseudo-random parts to linux/prandom.h and the percpu.h include with it, which is now guarded by _LINUX_PRANDOM_H and protected against recursive inclusion. A further cleanup step would be to remove this from entirely, and make people who use the prandom infrastructure include just the new header file. That's a bit of a churn patch, but grepping for "prandom_" and "next_pseudo_random32" "struct rnd_state" should catch most users. But it turns out that that nice cleanup step is fairly painful, because a _lot_ of code currently seems to depend on the implicit include of , which can currently come in a lot of ways, including such fairly core headfers as . So the "nice cleanup" part may or may never happen. Fixes: 1c9df907da83 ("random: fix circular include dependency on arm64 after addition of percpu.h") Tested-by: Guenter Roeck Acked-by: Willy Tarreau Signed-off-by: Linus Torvalds commit 559ff03fa33cf7d1b023c3d365e67738f429ead7 Author: Curtis Malainey Date: Mon Aug 3 18:06:16 2020 -0700 ALSA: usb-audio: add startech usb audio dock name The dock sold from startech (PID: ICUSBAUDIO7D) has no friendly name and shows up currently as "USB Sound Device" in ALSA. Signed-off-by: Curtis Malainey Link: https://lore.kernel.org/r/20200804010616.3399256-1-cujomalainey@chromium.org Signed-off-by: Takashi Iwai commit d7b461caa6cc64dd190577b46b0ec892a8d5e7c0 Author: Stefano Stabellini Date: Fri Jul 10 15:34:27 2020 -0700 xen/arm: call dma_to_phys on the dma_addr_t parameter of dma_cache_maint dma_cache_maint is getting called passing a dma address which could be different from a physical address. Add a struct device* parameter to dma_cache_maint. Translate the dma_addr_t parameter of dma_cache_maint by calling dma_to_phys. Do it for the first page and all the following pages, in case of multipage handling. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Tested-by: Corey Minyard Tested-by: Roman Shaposhnik Link: https://lore.kernel.org/r/20200710223427.6897-11-sstabellini@kernel.org Signed-off-by: Juergen Gross commit 63f0620cc552c4cd5bb2747f77efce407487cb12 Author: Stefano Stabellini Date: Fri Jul 10 15:34:26 2020 -0700 xen/arm: introduce phys/dma translations in xen_dma_sync_for_* xen_dma_sync_for_cpu, xen_dma_sync_for_device, xen_arch_need_swiotlb are getting called passing dma addresses. On some platforms dma addresses could be different from physical addresses. Before doing any operations on these addresses we need to convert them back to physical addresses using dma_to_phys. Move the arch_sync_dma_for_cpu and arch_sync_dma_for_device calls from xen_dma_sync_for_cpu/device to swiotlb-xen.c, and add a call dma_to_phys to do address translations there. dma_cache_maint is fixed by the next patch. Signed-off-by: Stefano Stabellini Tested-by: Corey Minyard Tested-by: Roman Shaposhnik Acked-by: Juergen Gross Link: https://lore.kernel.org/r/20200710223427.6897-10-sstabellini@kernel.org Signed-off-by: Juergen Gross commit 91ffe4ad534ab2262cbcfb339c5ae190c7ac0e7c Author: Stefano Stabellini Date: Fri Jul 10 15:34:25 2020 -0700 swiotlb-xen: introduce phys_to_dma/dma_to_phys translations With some devices physical addresses are different than dma addresses. To be able to deal with these cases, we need to call phys_to_dma on physical addresses (including machine addresses in Xen terminology) before returning them from xen_swiotlb_alloc_coherent and xen_swiotlb_map_page. We also need to convert dma addresses back to physical addresses using dma_to_phys in xen_swiotlb_free_coherent and xen_swiotlb_unmap_page if we want to do any operations on them. Call dma_to_phys in is_xen_swiotlb_buffer. Introduce xen_phys_to_dma and call phys_to_dma in its implementation. Introduce xen_dma_to_phys and call dma_to_phys in its implementation. Call xen_phys_to_dma/xen_dma_to_phys instead of xen_phys_to_bus/xen_bus_to_phys through swiotlb-xen.c. Everything is taken care of by these changes except for xen_swiotlb_alloc_coherent and xen_swiotlb_free_coherent, which need a few explicit phys_to_dma/dma_to_phys calls. Signed-off-by: Stefano Stabellini Tested-by: Corey Minyard Tested-by: Roman Shaposhnik Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20200710223427.6897-9-sstabellini@kernel.org Signed-off-by: Juergen Gross commit e9aab7e4ffbbf6eba8eaa66e351557c0c7562cff Author: Stefano Stabellini Date: Fri Jul 10 15:34:24 2020 -0700 swiotlb-xen: remove XEN_PFN_PHYS XEN_PFN_PHYS is only used in one place in swiotlb-xen making things more complex than need to be. Remove the definition of XEN_PFN_PHYS and open code the cast in the one place where it is needed. Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20200710223427.6897-8-sstabellini@kernel.org Signed-off-by: Juergen Gross commit 38ba51de46767cbcef04305c3e8a99f0965fc9df Author: Stefano Stabellini Date: Fri Jul 10 15:34:23 2020 -0700 swiotlb-xen: add struct device * parameter to is_xen_swiotlb_buffer No functional changes. The parameter is unused in this patch but will be used by next patches. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Tested-by: Corey Minyard Tested-by: Roman Shaposhnik Link: https://lore.kernel.org/r/20200710223427.6897-7-sstabellini@kernel.org Signed-off-by: Juergen Gross commit 995d3556694edd3c6dda7671b46ad4a6b3043f2f Author: Stefano Stabellini Date: Fri Jul 10 15:34:22 2020 -0700 swiotlb-xen: add struct device * parameter to xen_dma_sync_for_device No functional changes. The parameter is unused in this patch but will be used by next patches. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Tested-by: Corey Minyard Tested-by: Roman Shaposhnik Link: https://lore.kernel.org/r/20200710223427.6897-6-sstabellini@kernel.org Signed-off-by: Juergen Gross commit 297f7f82636115d6db4211b8d81764223baf2908 Author: Stefano Stabellini Date: Fri Jul 10 15:34:21 2020 -0700 swiotlb-xen: add struct device * parameter to xen_dma_sync_for_cpu No functional changes. The parameter is unused in this patch but will be used by next patches. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Tested-by: Corey Minyard Tested-by: Roman Shaposhnik Link: https://lore.kernel.org/r/20200710223427.6897-5-sstabellini@kernel.org Signed-off-by: Juergen Gross commit d900781a170da5ed0fc9840c260384bac0710c09 Author: Stefano Stabellini Date: Fri Jul 10 15:34:20 2020 -0700 swiotlb-xen: add struct device * parameter to xen_bus_to_phys No functional changes. The parameter is unused in this patch but will be used by next patches. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Tested-by: Corey Minyard Tested-by: Roman Shaposhnik Link: https://lore.kernel.org/r/20200710223427.6897-4-sstabellini@kernel.org Signed-off-by: Juergen Gross commit 2cf6a91347b94528c646cbdd9d295770ea7d447d Author: Stefano Stabellini Date: Fri Jul 10 15:34:19 2020 -0700 swiotlb-xen: add struct device * parameter to xen_phys_to_bus No functional changes. The parameter is unused in this patch but will be used by next patches. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Tested-by: Corey Minyard Tested-by: Roman Shaposhnik Link: https://lore.kernel.org/r/20200710223427.6897-3-sstabellini@kernel.org Signed-off-by: Juergen Gross commit ae4f0a17ee591c15efbee87746290d22aea81617 Author: Stefano Stabellini Date: Fri Jul 10 15:34:18 2020 -0700 swiotlb-xen: remove start_dma_addr It is not strictly needed. Call virt_to_phys on xen_io_tlb_start instead. It will be useful not to have a start_dma_addr around with the next patches. Note that virt_to_phys is not the same as xen_virt_to_bus but actually it is used to compared again __pa(xen_io_tlb_start) as passed to swiotlb_init_with_tbl, so virt_to_phys is actually what we want. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Tested-by: Corey Minyard Tested-by: Roman Shaposhnik Link: https://lore.kernel.org/r/20200710223427.6897-2-sstabellini@kernel.org Signed-off-by: Juergen Gross commit 8b1e868f66076490189a36d984fcce286cdd6295 Author: Boris Ostrovsky Date: Fri Jul 10 15:34:17 2020 -0700 swiotlb-xen: use vmalloc_to_page on vmalloc virt addresses xen_alloc_coherent_pages might return pages for which virt_to_phys and virt_to_page don't work, e.g. ioremap'ed pages. So in xen_swiotlb_free_coherent we can't assume that virt_to_page works. Instead add a is_vmalloc_addr check and use vmalloc_to_page on vmalloc virt addresses. This patch fixes the following crash at boot on RPi4 (the underlying issue is not RPi4 specific): https://marc.info/?l=xen-devel&m=158862573216800 Signed-off-by: Boris Ostrovsky Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Tested-by: Corey Minyard Tested-by: Roman Shaposhnik Link: https://lore.kernel.org/r/20200710223427.6897-1-sstabellini@kernel.org Signed-off-by: Juergen Gross commit d88ca7e1a27eb2df056bbf37ddef62e1c73d37ea Author: Tetsuo Handa Date: Thu Jul 30 19:47:14 2020 +0900 fbmem: pull fbcon_update_vcs() out of fb_set_var() syzbot is reporting OOB read bug in vc_do_resize() [1] caused by memcpy() based on outdated old_{rows,row_size} values, for resize_screen() can recurse into vc_do_resize() which changes vc->vc_{cols,rows} that outdates old_{rows,row_size} values which were saved before calling resize_screen(). Daniel Vetter explained that resize_screen() should not recurse into fbcon_update_vcs() path due to FBINFO_MISC_USEREVENT being still set when calling resize_screen(). Instead of masking FBINFO_MISC_USEREVENT before calling fbcon_update_vcs(), we can remove FBINFO_MISC_USEREVENT by calling fbcon_update_vcs() only if fb_set_var() returned 0. This change assumes that it is harmless to call fbcon_update_vcs() when fb_set_var() returned 0 without reaching fb_notifier_call_chain(). [1] https://syzkaller.appspot.com/bug?id=c70c88cfd16dcf6e1d3c7f0ab8648b3144b5b25e Reported-and-tested-by: syzbot Suggested-by: Daniel Vetter Signed-off-by: Tetsuo Handa Reported-by: kernel test robot for missing #include Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/075b7e37-3278-cd7d-31ab-c5073cfa8e92@i-love.sakura.ne.jp commit 884996986347dbe3b735cfa9bc041dd98a533796 Author: Dennis YC Hsieh Date: Sun Jul 5 14:37:16 2020 +0800 mailbox: mediatek: cmdq: clear task in channel before shutdown Do success callback in channel when shutdown. For those task not finish, callback with error code thus client has chance to cleanup or reset. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu Reviewed-by: Bibby Hsieh Signed-off-by: Jassi Brar commit bb2b06e08157c1f542506ce3ed59cc3309eacb78 Author: Dennis YC Hsieh Date: Sun Jul 5 14:37:15 2020 +0800 mailbox: cmdq: support mt6779 gce platform definition Add gce v4 hardware support with different thread number and shift. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu Reviewed-by: Matthias Brugger Reviewed-by: Bibby Hsieh Signed-off-by: Jassi Brar commit 0858fde496f84fff2fdae53d9e33c7b308195f74 Author: Dennis YC Hsieh Date: Sun Jul 5 14:37:14 2020 +0800 mailbox: cmdq: variablize address shift in platform Some gce hardware shift pc and end address in register to support large dram addressing. Implement gce address shift when write or read pc and end register. And add shift bit in platform definition. Signed-off-by: Dennis YC Hsieh Signed-off-by: Jassi Brar commit 6cb4f3b055fe42bb0f20c6ad6401d325b39d1e2a Author: Dennis YC Hsieh Date: Sun Jul 5 14:37:13 2020 +0800 dt-binding: gce: add gce header file for mt6779 Add documentation for the mt6779 gce. Add gce header file defined the gce hardware event, subsys number and constant for mt6779. Signed-off-by: Dennis YC Hsieh Reviewed-by: Rob Herring Reviewed-by: CK Hu Reviewed-by: Bibby Hsieh Signed-off-by: Jassi Brar commit dde6805690cd8f156e93b0ed4cf1172a5ffbefdd Author: Konrad Dybcio Date: Wed Jun 24 17:01:03 2020 +0200 mailbox: qcom: Add msm8994 apcs compatible MSM8994 has an APCS block similar to 8916, but with a different clock driver due to the former one having 2 clusters. Signed-off-by: Konrad Dybcio Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Jassi Brar commit cfbf813e598125293493341bc2238acdf6ba6a6f Author: Konrad Dybcio Date: Mon Jun 22 21:25:57 2020 +0200 mailbox: qcom: Add sdm660 hmss compatible The Qualcomm SDM660 platform has a APCS HMSS GLOBAL block, add the compatible for this. Signed-off-by: Konrad Dybcio Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Jassi Brar commit 03b70130abb4e37796d22617e9d0a2843e7621bd Author: Nathan Chancellor Date: Mon Jun 22 18:04:03 2020 -0700 mailbox: imx: Mark PM functions as __maybe_unused When CONFIG_PM and CONFIG_PM_SLEEP are unset, the following warnings occur: drivers/mailbox/imx-mailbox.c:638:12: warning: 'imx_mu_runtime_resume' defined but not used [-Wunused-function] 638 | static int imx_mu_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~ drivers/mailbox/imx-mailbox.c:629:12: warning: 'imx_mu_runtime_suspend' defined but not used [-Wunused-function] 629 | static int imx_mu_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/mailbox/imx-mailbox.c:611:12: warning: 'imx_mu_resume_noirq' defined but not used [-Wunused-function] 611 | static int imx_mu_resume_noirq(struct device *dev) | ^~~~~~~~~~~~~~~~~~~ drivers/mailbox/imx-mailbox.c:601:12: warning: 'imx_mu_suspend_noirq' defined but not used [-Wunused-function] 601 | static int imx_mu_suspend_noirq(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~ Mark these functions as __maybe_unused, which is the standard procedure for PM functions. Fixes: bb2b2624dbe2 ("mailbox: imx: Add runtime PM callback to handle MU clocks") Signed-off-by: Nathan Chancellor Reviewed-by: Dong Aisheng Signed-off-by: Jassi Brar commit 425ab036754af08bb0dc8273efad686484c98f3c Author: Hanjun Guo Date: Wed Jul 22 17:40:40 2020 +0800 mailbox: pcc: Put the PCCT table for error path The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used at runtime to release the table mapping. In acpi_pcc_probe(), the PCCT table entries will be used as private data for communication chan at runtime, but the table should be put for error path. Signed-off-by: Hanjun Guo Signed-off-by: Jassi Brar commit c3917df54cf925754e74e48748493ac5f232a2f1 Author: Alexander A. Klimov Date: Mon Jul 13 17:11:37 2020 +0200 mailbox: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Jassi Brar commit 828add774f0d2bf930cdeca6c982c1fbcdd846bb Author: Jaegeuk Kim Date: Mon Aug 3 19:37:12 2020 -0700 f2fs: prepare a waiter before entering io_schedule This is to avoid sleep() in the waiter thread. [ 20.157753] ------------[ cut here ]------------ [ 20.158393] do not call blocking ops when !TASK_RUNNING; state=2 set at [<0000000096354225>] prepare_to_wait+0xcd/0x430 [ 20.159858] WARNING: CPU: 1 PID: 1152 at kernel/sched/core.c:7142 __might_sleep+0x149/0x1a0 ... [ 20.176110] __submit_merged_write_cond+0x191/0x310 [ 20.176739] f2fs_submit_merged_write+0x18/0x20 [ 20.177323] f2fs_wait_on_all_pages+0x269/0x2d0 [ 20.177899] ? block_operations+0x980/0x980 [ 20.178441] ? __kasan_check_read+0x11/0x20 [ 20.178975] ? finish_wait+0x260/0x260 [ 20.179488] ? percpu_counter_set+0x147/0x230 [ 20.180049] do_checkpoint+0x1757/0x2a50 [ 20.180558] f2fs_write_checkpoint+0x840/0xaf0 [ 20.181126] f2fs_sync_fs+0x287/0x4a0 Reported-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c1d55d50139bea6bfe964458272a93dd899efb83 Author: Stafford Horne Date: Wed Jul 29 21:03:14 2020 +0900 asm-generic/io.h: Fix sparse warnings on big-endian architectures On big-endian architectures like OpenRISC, sparse outputs below warnings on asm-generic/io.h. This is due to io statements like: __raw_writel(cpu_to_le32(value), PCI_IOBASE + addr); The __raw_writel() function expects native endianness, however cpu_to_le32() returns __le32. On little-endian machines these match up and there is no issue. However, on big-endian we get warnings, for IO that is defined as little-endian the mismatch is expected. The fix I propose is to __force to native endian. Warnings: ./include/asm-generic/io.h:166:15: warning: cast to restricted __le16 ./include/asm-generic/io.h:166:15: warning: cast to restricted __le16 ./include/asm-generic/io.h:166:15: warning: cast to restricted __le16 ./include/asm-generic/io.h:166:15: warning: cast to restricted __le16 ./include/asm-generic/io.h:179:15: warning: cast to restricted __le32 ./include/asm-generic/io.h:179:15: warning: cast to restricted __le32 ./include/asm-generic/io.h:179:15: warning: cast to restricted __le32 ./include/asm-generic/io.h:179:15: warning: cast to restricted __le32 ./include/asm-generic/io.h:179:15: warning: cast to restricted __le32 ./include/asm-generic/io.h:179:15: warning: cast to restricted __le32 ./include/asm-generic/io.h:215:22: warning: incorrect type in argument 1 (different base types) ./include/asm-generic/io.h:215:22: expected unsigned short [usertype] value ./include/asm-generic/io.h:215:22: got restricted __le16 [usertype] ./include/asm-generic/io.h:225:22: warning: incorrect type in argument 1 (different base types) ./include/asm-generic/io.h:225:22: expected unsigned int [usertype] value ./include/asm-generic/io.h:225:22: got restricted __le32 [usertype] Signed-off-by: Stafford Horne Acked-by: Arnd Bergmann commit 2baa85d6927d11b8d946da2e4ad00dddca5b8da2 Merge: 04084978003c1 db1da2f52ea54 Author: Linus Torvalds Date: Mon Aug 3 20:37:22 2020 -0700 Merge tag 'acpi-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These eliminate significant AML processing overhead related to using operation regions in system memory, update the ACPICA code in the kernel to upstream revision 20200717 (including a fix to prevent operation region reference counts from overflowing in some cases), remove the last bits of the (long deprecated) ACPI procfs interface and do some assorted cleanups. Specifics: - Eliminate significant AML processing overhead related to using operation regions in system memory by reworking the management of memory mappings in the ACPI code to defer unmap operations (to do them outside of the ACPICA locks, among other things) and making the memory operation reagion handler avoid releasing memory mappings created by it too early (Rafael Wysocki). - Update the ACPICA code in the kernel to upstream revision 20200717: * Prevent operation region reference counts from overflowing in some cases (Erik Kaneda). * Replace one-element array with flexible-array (Gustavo A. R. Silva). - Fix ACPI PCI hotplug reference counting (Rafael Wysocki). - Drop last bits of the ACPI procfs interface (Thomas Renninger). - Drop some redundant checks from the code parsing ACPI tables related to NUMA (Hanjun Guo). - Avoid redundant object evaluation in the ACPI device properties handling code (Heikki Krogerus). - Avoid unecessary memory overhead related to storing the signatures of the ACPI tables recognized by the kernel (Ard Biesheuvel). - Add missing newline characters when printing module parameter values in some places (Xiongfeng Wang). - Update the link to the ACPI specifications in some places (Tiezhu Yang). - Use the fallthrough pseudo-keyword in the ACPI code (Gustavo A. R. Silva). - Drop redundant variable initialization from the APEI code (Colin Ian King). - Drop uninitialized_var() from the ACPI PAD driver (Jason Yan). - Replace HTTP links with HTTPS ones in the ACPI code (Alexander A. Klimov)" * tag 'acpi-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (22 commits) ACPI: APEI: remove redundant assignment to variable rc ACPI: NUMA: Remove the useless 'node >= MAX_NUMNODES' check ACPI: NUMA: Remove the useless sub table pointer check ACPI: tables: Remove the duplicated checks for acpi_parse_entries_array() ACPICA: Update version to 20200717 ACPICA: Do not increment operation_region reference counts for field units ACPICA: Replace one-element array with flexible-array ACPI: Replace HTTP links with HTTPS ones ACPI: Use valid link to the ACPI specification ACPI: OSL: Clean up the removal of unused memory mappings ACPI: OSL: Use deferred unmapping in acpi_os_unmap_iomem() ACPI: OSL: Use deferred unmapping in acpi_os_unmap_generic_address() ACPICA: Preserve memory opregion mappings ACPI: OSL: Implement deferred unmapping of ACPI memory ACPI: Use fallthrough pseudo-keyword PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context() ACPI: tables: avoid relocations for table signature array ACPI: PAD: Eliminate usage of uninitialized_var() macro ACPI: sysfs: add newlines when printing module parameters ACPI: EC: add newline when printing 'ec_event_clearing' module parameter ... commit 04084978003c1a1810a0b1fea581078106394a32 Merge: d516840629ccc 86ba54fb08164 Author: Linus Torvalds Date: Mon Aug 3 20:28:08 2020 -0700 Merge tag 'pm-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "The most significant change here is the extension of the Energy Model to cover non-CPU devices (as well as CPUs) from Lukasz Luba. There is also some new hardware support (Ice Lake server idle states table for intel_idle, Sapphire Rapids and Power Limit 4 support in the RAPL driver), some new functionality in the existing drivers (eg. a new switch to disable/enable CPU energy-efficiency optimizations in intel_pstate, delayed timers in devfreq), some assorted fixes (cpufreq core, intel_pstate, intel_idle) and cleanups (eg. cpuidle-psci, devfreq), including the elimination of W=1 build warnings from cpufreq done by Lee Jones. Specifics: - Make the Energy Model cover non-CPU devices (Lukasz Luba). - Add Ice Lake server idle states table to the intel_idle driver and eliminate a redundant static variable from it (Chen Yu, Rafael Wysocki). - Eliminate all W=1 build warnings from cpufreq (Lee Jones). - Add support for Sapphire Rapids and for Power Limit 4 to the Intel RAPL power capping driver (Sumeet Pawnikar, Zhang Rui). - Fix function name in kerneldoc comments in the idle_inject power capping driver (Yangtao Li). - Fix locking issues with cpufreq governors and drop a redundant "weak" function definition from cpufreq (Viresh Kumar). - Rearrange cpufreq to register non-modular governors at the core_initcall level and allow the default cpufreq governor to be specified in the kernel command line (Quentin Perret). - Extend, fix and clean up the intel_pstate driver (Srinivas Pandruvada, Rafael Wysocki): * Add a new sysfs attribute for disabling/enabling CPU energy-efficiency optimizations in the processor. * Make the driver avoid enabling HWP if EPP is not supported. * Allow the driver to handle numeric EPP values in the sysfs interface and fix the setting of EPP via sysfs in the active mode. * Eliminate a static checker warning and clean up a kerneldoc comment. - Clean up some variable declarations in the powernv cpufreq driver (Wei Yongjun). - Fix up the ->enter_s2idle callback definition to cover the case when it points to the same function as ->idle correctly (Neal Liu). - Rearrange and clean up the PSCI cpuidle driver (Ulf Hansson). - Make the PM core emit "changed" uevent when adding/removing the "wakeup" sysfs attribute of devices (Abhishek Pandit-Subedi). - Add a helper macro for declaring PM callbacks and use it in the MMC jz4740 driver (Paul Cercueil). - Fix white space in some places in the hibernate code and make the system-wide PM code use "const char *" where appropriate (Xiang Chen, Alexey Dobriyan). - Add one more "unsafe" helper macro to the freezer to cover the NFS use case (He Zhe). - Change the language in the generic PM domains framework to use parent/child terminology and clean up a typo and some comment fromatting in that code (Kees Cook, Geert Uytterhoeven). - Update the operating performance points OPP framework (Lukasz Luba, Andrew-sh.Cheng, Valdis Kletnieks): * Refactor dev_pm_opp_of_register_em() and update related drivers. * Add a missing function export. * Allow disabled OPPs in dev_pm_opp_get_freq(). - Update devfreq core and drivers (Chanwoo Choi, Lukasz Luba, Enric Balletbo i Serra, Dmitry Osipenko, Kieran Bingham, Marc Zyngier): * Add support for delayed timers to the devfreq core and make the Samsung exynos5422-dmc driver use it. * Unify sysfs interface to use "df-" as a prefix in instance names consistently. * Fix devfreq_summary debugfs node indentation. * Add the rockchip,pmu phandle to the rk3399_dmc driver DT bindings. * List Dmitry Osipenko as the Tegra devfreq driver maintainer. * Fix typos in the core devfreq code. - Update the pm-graph utility to version 5.7 including a number of fixes related to suspend-to-idle (Todd Brandt). - Fix coccicheck errors and warnings in the cpupower utility (Shuah Khan). - Replace HTTP links with HTTPs ones in multiple places (Alexander A. Klimov)" * tag 'pm-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (71 commits) cpuidle: ACPI: fix 'return' with no value build warning cpufreq: intel_pstate: Fix EPP setting via sysfs in active mode cpufreq: intel_pstate: Rearrange the storing of new EPP values intel_idle: Customize IceLake server support PM / devfreq: Fix the wrong end with semicolon PM / devfreq: Fix indentaion of devfreq_summary debugfs node PM / devfreq: Clean up the devfreq instance name in sysfs attr memory: samsung: exynos5422-dmc: Add module param to control IRQ mode memory: samsung: exynos5422-dmc: Adjust polling interval and uptreshold memory: samsung: exynos5422-dmc: Use delayed timer as default PM / devfreq: Add support delayed timer for polling mode dt-bindings: devfreq: rk3399_dmc: Add rockchip,pmu phandle PM / devfreq: tegra: Add Dmitry as a maintainer PM / devfreq: event: Fix trivial spelling PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent cpuidle: change enter_s2idle() prototype cpuidle: psci: Prevent domain idlestates until consumers are ready cpuidle: psci: Convert PM domain to platform driver cpuidle: psci: Fix error path via converting to a platform driver cpuidle: psci: Fail cpuidle registration if set OSI mode failed ... commit d516840629ccc1aa6b59a0886134688f9b5531a0 Merge: b171373902b06 c9fadf212afd4 Author: Linus Torvalds Date: Mon Aug 3 20:13:06 2020 -0700 Merge tag 'regmap-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "This release we've seen a couple of updates to make some DT based APIs use fwnode instead, allowing their use with ACPI systems, and a few cleanups" * tag 'regmap-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: fix duplicated word in regmap: Switch to use fwnode instead of OF one regmap-irq: use fwnode instead of device node in add_irq_chip() regmap: remove stray space regmap: convert all regmap_update_bits() and co. macros to static inlines commit b171373902b06d1b5a775de74178bf1527fee6cc Merge: bbb839901fe86 11ba28229f825 Author: Linus Torvalds Date: Mon Aug 3 20:08:51 2020 -0700 Merge tag 'spi-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "A fairly quiet release for SPI, nothing really going on in the core although there's been quite a bit of driver related activity. This includes the addition of some shared code in drivers/memory for the Renesas RPC-IF which is used by a newly added SPI driver, the memory subsystem doesn't seem to have a fixed maintainer at the minute and this seemed like the most sensible way to get that hardware supported. - Quite a few cleanups and optimizations for the Altera, Qualcomm GENI, sun6i and lantiq drivers. - Several more GPIO descriptor conversions. - Move the Cadence QuadSPI driver from drivers/mtd to drivers/spi. - New support for Mediatek MT8192 and Renesas RPC-IF, R8A7742 and R8A774e1" * tag 'spi-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (119 commits) dt-bindings: lpspi: New property in document DT bindings for LPSPI spi: lpspi: fix using CS discontinuously on i.MX8DXLEVK spi: lpspi: remove unused fsl_lpspi->chipselect spi: lpspi: Fix kernel warning dump when probe fail after calling spi_register spi: rockchip: Fix error in SPI slave pio read spi: rockchip: Support 64-location deep FIFOs spi: rockchip: Config spi rx dma burst size depend on xfer length spi: spi-topcliff-pch: drop call to wakeup-disable spi: spidev: Align buffers for DMA spi: correct kernel-doc inconsistency spi: sun4i: update max transfer size reported spi: imx: enable runtime pm support spi: update bindings for MT8192 SoC spi: mediatek: add spi support for mt8192 IC spi: Add bindings for Lightning Mountain SoC spi: lantiq: Add support to Lightning Mountain SoC spi: lantiq: Move interrupt configuration to SoC specific data structure spi: lantiq: Add fifo size bit mask in SoC specific data structure spi: lantiq: Add support to acknowledge interrupt spi: lantiq: Move interrupt control register offesets to SoC specific data structure ... commit bbb839901fe865a56d91aa88d70908a7d16268a1 Merge: f8851cb2d0cc2 3f02794888213 Author: Linus Torvalds Date: Mon Aug 3 20:05:44 2020 -0700 Merge tag 'regulator-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "This time around the bulk of the work on the regulator API has been cleanups of various kinds, partly but not entirely inspired by the W=1 stuff that 0day turned on. There's also been a fairly large crop of new drivers, and a few bugfixes for existing drivers. - Mode setting support for MT6397 and DA9211. - New drivers for ChromeOS embedded controllers, Fairchild FAN53880, NXP PCA9450, Qualcomm LABIBB, MP5496, and VBUS booster, and Silergy SY8827N" * tag 'regulator-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (67 commits) regulator: add the sub node names for the MP5496 PMIC regulator: cros-ec-regulator: Fix double free of desc->name. platform/chrome: cros_ec: Fix host command for regulator control. regulator: pca9450: Convert to use module_i2c_driver regulator: fix memory leak on error path of regulator_register() regulator: Replace HTTP links with HTTPS ones regulator: convert QCOM SMD-RPM regulator document to YAML schema regulator: gpio: Honor regulator-boot-on property regulator: core: Add destroy_regulator() regulator: Correct kernel-doc inconsistency regulator: Add labibb regulator binding regulator: qcom: Add labibb driver regulator: Allow regulators to verify enabled during enable() regulator: cros-ec: Constify cros_ec_regulator_voltage_ops regulator: devres: Standardise on function documentation headers regulator: of_regulator: Add missing colon for rdev kerneldoc argument regulator: devres: Fix issues with kerneldoc headers regulator: fan53880: Add support for COMPILE_TEST regulator: fan53880: Add missing .owner field in regulator_desc dt-bindings: regulator: add pca9450 regulator yaml ... commit f8851cb2d0cc2b4f8ac5dadb03148d6b58609b1c Merge: d4db4e553249e 0f959e19fadf0 Author: Linus Torvalds Date: Mon Aug 3 20:01:00 2020 -0700 Merge tag 'edac_updates_for_5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Tony Luck: "Boris is on vacation and aske me to send you the EDAC changes" * tag 'edac_updates_for_5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC: Fix reference count leaks EDAC: Remove edac_get_dimm_by_index() EDAC/ghes: Scan the system once on driver init EDAC/ghes: Remove unused members of struct ghes_edac_pvt, rename it to ghes_pvt EDAC/ghes: Setup DIMM label from DMI and use it in error reports EDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations EDAC/mc: Call edac_inc_ue_error() before panic EDAC, pnd2: Set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier commit d4db4e553249eda9016fab2e363c26e52c47926f Merge: 822ef14e9dc73 892900a70b6c6 Author: Linus Torvalds Date: Mon Aug 3 19:38:30 2020 -0700 Merge tag 'arm-newsoc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull new ARM SoC support from Arnd Bergmann: "There are three SoC families newly dded to the 32-bit and 64-bit Arm architecture code in the kernel this time: - Daniel Palmer adds initial support for two chips made by MStar, a taiwanese SoC manufacturer that became part of Mediatek in 2012. For now, the added support is fairly minimal, with just two of its Cortex-A7 based 32-bit camera chips getting support for a limited set of on-chip peripherals. - Lars Povlsen from Microchip adds support for their new Sparx5 family of ethernet switch chips using 64-bit Cortex-A53 cores. These are descended from earlier VSC7xxx SparX and Ocelot chips using 32-bit MIPS cores. - Daniele Alessandrelli from Intel adds support for the new Keem Bay SoC for computer vision, built around a Movidius VPU with Linux running on Arm Cortex-A53 cores" * tag 'arm-newsoc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (38 commits) ARM: mstar: Correct the compatible string for pmsleep dt-bindings: arm: mstar: remove the binding description for mstar,pmsleep dt-bindings: mfd: syscon: add compatible string for mstar,msc313-pmsleep ARM: mstar: Add reboot support ARM: mstar: Add "pmsleep" node to base dtsi ARM: mstar: Add PMU ARM: mstar: Adjust IMI size for infinity3 ARM: mstar: Adjust IMI size for mercury5 ARM: mstar: Adjust IMI size of infinity ARM: mstar: Add IMI SRAM region dt-bindings: arm: mstar: Move existing MStar binding descriptions dt-bindings: arm: mstar: Add binding details for mstar, pmsleep ARM: mstar: Fix dts filename for 70mai midrive d08 ARM: mstar: Add dts for 70mai midrive d08 ARM: mstar: Add dts for msc313(e) based BreadBee boards ARM: mstar: Add mercury5 series dtsis ARM: mstar: Add infinity/infinity3 family dtsis ARM: mstar: Add Armv7 base dtsi ARM: mstar: Add binding details for mstar,l3bridge ARM: mstar: Add machine for MStar/Sigmastar Armv7 SoCs ... commit 822ef14e9dc73079c646d33aa77e2ac42361b39e Merge: 6ce076f4159fc d76cfc7c3ad23 Author: Linus Torvalds Date: Mon Aug 3 19:30:59 2020 -0700 Merge tag 'arm-drivers-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Arnd Bergmann: "A couple of subsystems have their own subsystem maintainers but choose to have the code merged through the soc tree as upstream, as the code tends to be used across multiple SoCs or has SoC specific drivers itself: - memory controllers: Krzysztof Kozlowski takes ownership of the drivers/memory subsystem and its drivers, starting out with a set of cleanup patches. A larger driver for the Tegra memory controller that was accidentally missed for v5.8 is now added. - reset controllers: Only minor updates to drivers/reset this time - firmware: The "turris mox" firmware driver gains support for signed firmware blobs The tegra firmware driver gets extended to export some debug information Various updates to i.MX firmware drivers, mostly cosmetic - ARM SCMI/SCPI: A new mechanism for platform notifications is added, among a number of minor changes. - optee: Probing of the TEE bus is rewritten to better support detection of devices that depend on the tee-supplicant user space. A new firmware based trusted platform module (fTPM) driver is added based on OP-TEE - SoC attributes: A new driver is added to provide a generic soc_device for identifying a machine through the SMCCC ARCH_SOC_ID firmware interface rather than by probing SoC family specific registers. The series also contains some cleanups to the common soc_device code. There are also a number of updates to SoC specific drivers, the main ones are: - Mediatek cmdq driver gains a few in-kernel interfaces - Minor updates to Qualcomm RPMh, socinfo, rpm drivers, mostly adding support for additional SoC variants - The Qualcomm GENI core code gains interconnect path voting and performance level support, and integrating this into a number of device drivers. - A new driver for Samsung Exynos5800 voltage coupler for - Renesas RZ/G2H (R8A774E1) SoC support gets added to a couple of SoC specific device drivers - Updates to the TI K3 Ring Accelerator driver" * tag 'arm-drivers-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (164 commits) soc: qcom: geni: Fix unused label warning soc: qcom: smd-rpm: Fix kerneldoc memory: jz4780_nemc: Only request IO memory the driver will use soc: qcom: pdr: Reorder the PD state indication ack MAINTAINERS: Add Git repository for memory controller drivers memory: brcmstb_dpfe: Fix language typo memory: samsung: exynos5422-dmc: Correct white space issues memory: samsung: exynos-srom: Correct alignment memory: pl172: Enclose macro argument usage in parenthesis memory: of: Correct kerneldoc memory: omap-gpmc: Fix language typo memory: omap-gpmc: Correct white space issues memory: omap-gpmc: Use 'unsigned int' for consistency memory: omap-gpmc: Enclose macro argument usage in parenthesis memory: omap-gpmc: Correct kerneldoc memory: mvebu-devbus: Align with open parenthesis memory: mvebu-devbus: Add missing braces to all arms of if statement memory: bt1-l2-ctl: Add blank lines after declarations soc: TI knav_qmss: make symbol 'knav_acc_range_ops' static firmware: ti_sci: Replace HTTP links with HTTPS ones ... commit 6ce076f4159fcf7436cce1299b05eabe200592f4 Merge: 2f3fbfdaf77f3 a04e84c57e9c5 Author: Linus Torvalds Date: Mon Aug 3 19:24:55 2020 -0700 Merge tag 'arm-soc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC updates from Arnd Bergmann: "These are mostly cosmetic changes and minor bugfixes for the SoC specific code, across the 32-bit at91, mvebu, davinci, samsung, and omap platforms. The main notable changes are for the Samsung Exynos platform, which sees a rewrite of gpio handling and a change to restore and adds a workaround for a problem with cpuidle support" * tag 'arm-soc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh() MAINTAINERS: arm/amlogic: add designated reviewers ARM: davinci: dm646x-evm: Simplify error handling in 'evm_sw_setup()' ARM: davinci: Fix trivial spelling ARM: davinci: Replace HTTP links with HTTPS ones ARM: s3c24xx: Replace HTTP links with HTTPS ones ARM: orion/gpio: Make use of for_each_requested_gpio() ARM: at91: Replace HTTP links with HTTPS ones ARM: at91: pm: add missing put_device() call in at91_pm_sram_init() ARM: rpc: Change blacklist to quirklist in ecode.c file ARM: OMAP: Replace HTTP links with HTTPS ones ARM: s3c24xx: leds: Convert to use GPIO descriptors udc: lpc32xx: mark local function static ARM: exynos: MCPM: Restore big.LITTLE cpuidle support ARM: exynos: clear L310_AUX_CTRL_FULL_LINE_ZERO in default l2c_aux_val commit 2f3fbfdaf77f3ac417d0511fac221f76af79f6fc Merge: 92c59e126b21f f510ca05271b6 Author: Linus Torvalds Date: Mon Aug 3 19:19:34 2020 -0700 Merge tag 'arm-dt-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC DT updates from Arnd Bergmann: "As usual, there are many patches addressing minor issues in existing DTS files, such as DTC warnings, or adding support for additional peripherals. There are three added SoCs in existing product families: - Amazon: Alpine v3 is a 16-core Cortex-A72 SoC from Amazon's Annapurna Labs, otherwise known as AL73400 or first-generation Graviton, and following the already supported Cortex-A1`5 and Cortex-A57 based Alpine chips. This one is added together with the official Evaluation platform. - Qualcomm: The Snapdragon SDM630 platform is a family of mid-range mobile phone chips from 2017 based on Cortex-A53 or Kryo 260 CPUs. A total of five end-user products are added based on these, all Android phones from Sony: Xperia 10, 10 Plus, XA2, XA2 Plus and XA2 Ultra. - Renesas: RZ/G2H (r8a774e1) is currently the top model in the Renesas RZ/G family, and apparently closely related to the RZ/G2N and RZ/G2M models we already support but has a faster GPU and additional on-chip peripherals. It is added along with the HopeRun HiHope RZ/G2H development board A small number of new boards for already supported SoCs also debut: - Allwinner sunxi: Only one new machine, revision v1.2 of the Pine64 PinePhone (non-Android) smartphone, containing minor changes compared to earlier versions. - Amlogic Meson: WeTek Core2 is an Amlogic S912 (GXM) based Set-top-box - Aspeed: EthanolX is AMD's EPYC data center rerence platform, using an ASpeed AST2600 baseboard management controller. - Mediatek: Lenovo IdeaPad Duet 10.1" (kukui/krane) is a new Chromebook based on the MT8183 (Helio P60t) SoC. - Nvidia Tegra: ASUS Google Nexus 7 and Acer Iconia Tab A500 are two Android tablets from around 2012 using Tegra 3 and Tegra 2, respectively. Thanks to PostmarketOS, these can now run mainline kernels and become useful again. The Jetson Xavier NX Developer Kit uses a SoM and carrier board for the Tegra194, their latest 64-bit chip based on Carmel CPU cores and Volta graphics. - NXP i.MX: Five new boards based on the 32-bit i.MX6 series are added: The MYiR MYS-6ULX single-board computer, and four different models of industrial computers from Protonic. - Qualcomm: MikroTik RouterBoard 3011 is a rackmounted router based on the 32-bit IPQ8064 networking SoC Three older phones get added, the Snapdragon 808 (msm8992) based Xiaomi Libra (Mi 4C) and Microsoft Lumia 950, originally running Windows Phone, and the Snapdragon 810 (msm8994) based Sony Xperia Z5. - Renesas: In addition to the HiHope RZ/G2H board mentioned above, we gain support for board versions 3.0 and 4.0 of the earlier RZ/G2M and RZ/G2N reference boards. Beacon EmbeddedWorks adds another SoM+Carrier development board for RZ/G2M. - Rockchips: Radxa Rock Pi N8 development board and the VMARC RK3288 SoM it is based on, using the high-end 32-bit rk3288 SoC. Notable updates to existing platforms are usually for added on-chip peripherals, including: - ASpeed AST2xxx (various) - Allwinner (cpufreq, thermal, Pinephone touchscreen) - Amlogic Meson (audio, gpu dvdfs, board updates) - Arm Versatile - Broadcom (board updates for switch ports, Raspberry pi clock updates) - Hisilicon (various) - Intel/Altera SoCFPGA (various) - Marvell Armada 7xxx/8xxx (smmu) - Marvell MMP (GPU on mmp2/mmp3) - Mediatek mt8183 (USB, pericfg) - NXP Layerscape (VPU, thermal, DSPI) - NXP i.MX (VPU, bindings, board updates) - Nvidia Tegra194 (GPU) - Qualcomm (GPU, Interconnect, ...) - Renesas R-Car (SPI, IPMMU, board updates) - STMicroelectronics STM32 (various) - Samsung Exynos (various) - Socionext Uniphier (updates to serial, and pcie) - TI K3 (serdes, usb3, audio, sd, chipid) - TI OMAP (IPU/DSP remoteproc changes, dropping platform data)" * tag 'arm-dt-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (605 commits) arm64: dts: meson: odroid-n2: add jack audio output support arm64: dts: meson: odroid-n2: enable audio loopback ARM: dts: berlin: Align L2 cache-controller nodename with dtschema arm64: dts: qcom: Add Microsoft Lumia 950 (Talkman) device tree arm64: dts: qcom: Add Xiaomi Libra (Mi 4C) device tree arm64: dts: qcom: msm8992: Add RPMCC node arm64: dts: qcom: msm8992: Add PSCI support. arm64: dts: qcom: msm8992: Add PMU node arm64: dts: qcom: msm8992: Add BLSP2_UART2 and I2C nodes arm64: dts: qcom: msm8992: Add SPMI PMIC arbiter device arm64: dts: qcom: msm8992: Add a SCM node arm64: dts: qcom: msm8992: Add a proper CPU map arm64: dts: qcom: bullhead: Move UART pinctrl to SoC arm64: dts: qcom: bullhead: Add qcom,msm-id arm64: dts: qcom: msm8992: Fix SDHCI1 arm64: dts: qcom: msm8992: Modernize the DTS style arm64: dts: qcom: Add support for Sony Xperia Z5 (SoMC Sumire-RoW) arm64: dts: qcom: Move msm8994-smd-rpm contents to lg-bullhead. arm64: dts: qcom: msm8994: Add support for SMD RPM arm64: dts: qcom: msm8992: Add a label to rpm-requests ... commit 92c59e126b21fd212195358a0d296e787e444087 Merge: 09a0bd0776435 66d3037898efc Author: Linus Torvalds Date: Mon Aug 3 19:17:58 2020 -0700 Merge tag 'arm-defconfig-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM defconfig updates from Arnd Bergmann: "These are the usual updates to arm/arm64 defconfig files, enabling newly added drivers and addressing changes to Kconfig files" * tag 'arm-defconfig-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (38 commits) ARM: configs: at91: sama5: enable CAN PLATFORM driver ARM: configs: at91: sama5: enable bridge and VLAN filtering ARM: configs: at91: sama5: add support for KSZ ethernet switches arm64: defconfig: Enable AM654x SDHCI controller arm64: arch_k3: enable chipid driver arm/arm64: defconfig: Update configs to use the new CROS_EC options ARM: tegra_defconfig: Enable options useful for Nexus 7 and Acer A500 ARM: tegra: Enable CPUFREQ userspace governor arm64: defconfig: enable CONFIG_FSL_ENETC_QOS arm64: defconfig: enable TSN features for ENETC and similiar hardware ARM: imx_v6_v7_defconfig: Support i.MX8MM arm64: defconfig: enable RTC and audio support on Kontron sl28 boards arm64: defconfig: add pca9450 pmic driver ARM: configs: sunxi: Enable crypto related options ARM: sunxi: configs: Enable the Mailbox driver ARM: configs: sunxi: Enable the PS/2 controller ARM: configs: sunxi: Enable Lima ARM: configs: sunxi: Add DRM output-related options ARM: configs: sunxi: Enable ASoC options ARM: configs: sunxi: Enable Cedrus ... commit c28b27416da91659ad580074db6756b2ab7e62da Author: Stafford Horne Date: Wed Jun 24 04:44:05 2020 +0900 openrisc: Implement proper SMP tlb flushing Up until now when flushing pages from the TLB on SMP OpenRISC was always resorting to flush the entire TLB on all CPUs. This patch adds the mechanics for flushing specific ranges and pages based on the usage. The function switch_mm is updated to account for cpu usage by updating mm_struct's cpumask. This is used in the SMP flush routines. This mostly follows the riscv implementation. Signed-off-by: Stafford Horne commit 57b8e277c33620e115633cdf700a260b55095460 Author: Stafford Horne Date: Tue Jun 16 06:19:46 2020 +0900 openrisc: Fix oops caused when dumping stack When dumping a stack with 'cat /proc/#/stack' the kernel would oops. For example: # cat /proc/690/stack Unable to handle kernel access at virtual address 0x7fc60f58 Oops#: 0000 CPU #: 0 PC: c00097fc SR: 0000807f SP: d6f09b9c GPR00: 00000000 GPR01: d6f09b9c GPR02: d6f09bb8 GPR03: d6f09bc4 GPR04: 7fc60f5c GPR05: c00099b4 GPR06: 00000000 GPR07: d6f09ba3 GPR08: ffffff00 GPR09: c0009804 GPR10: d6f08000 GPR11: 00000000 GPR12: ffffe000 GPR13: dbb86000 GPR14: 00000001 GPR15: dbb86250 GPR16: 7fc60f63 GPR17: 00000f5c GPR18: d6f09bc4 GPR19: 00000000 GPR20: c00099b4 GPR21: ffffffc0 GPR22: 00000000 GPR23: 00000000 GPR24: 00000001 GPR25: 000002c6 GPR26: d78b6850 GPR27: 00000001 GPR28: 00000000 GPR29: dbb86000 GPR30: ffffffff GPR31: dbb862fc RES: 00000000 oGPR11: ffffffff Process cat (pid: 702, stackpage=d79d6000) Stack: Call trace: [<598977f2>] save_stack_trace_tsk+0x40/0x74 [<95063f0e>] stack_trace_save_tsk+0x44/0x58 [] proc_pid_stack+0xd0/0x13c [] proc_single_show+0x6c/0xf0 [] seq_read+0x1b4/0x688 [<2d6c7480>] do_iter_read+0x208/0x248 [<2182a2fb>] vfs_readv+0x64/0x90 This was caused by the stack trace code in save_stack_trace_tsk using the wrong stack pointer. It was using the user stack pointer instead of the kernel stack pointer. Fix this by using the right stack. Also for good measure we add try_get_task_stack/put_task_stack to ensure the task is not lost while we are walking it's stack. Fixes: eecac38b0423a ("openrisc: support framepointers and STACKTRACE_SUPPORT") Signed-off-by: Stafford Horne commit ff6c923dbec332dd6c6f649b754f4edd8f0a3c50 Author: Stafford Horne Date: Sun Jul 5 05:53:49 2020 +0900 openrisc: Add support for external initrd images In OpenRISC we set the initrd_start and initrd_end based on the symbols we setup in vmlinux.lds.S. However, this is not needed if we use the generic linker description in INIT_DATA_SECTION. Removing our own initrd setup reduces code, but also the generic code supports loading external initrd images. A bootloader can load a rootfs image into memory and we can configure devicetree to load it with: chosen { bootargs = "earlycon"; stdout-path = "uart0:115200"; linux,initrd-start = < 0x08000100 >; linux,initrd-end = < 0x08200000 >; }; Reported-by: Mateusz Holenko Signed-off-by: Stafford Horne commit d0b7213f895cd0e209ff5ba89998aeb09267bdc7 Author: Stafford Horne Date: Fri Jun 26 05:24:24 2020 +0900 init: Align init_task to avoid conflict with MUTEX_FLAGS When booting on 32-bit machines (seen on OpenRISC) I saw this warning with CONFIG_DEBUG_MUTEXES turned on. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/locking/mutex.c:1242 __mutex_unlock_slowpath+0x328/0x3ec DEBUG_LOCKS_WARN_ON(__owner_task(owner) != current) Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 5.8.0-rc1-simple-smp-00005-g2864e2171db4-dirty #179 Call trace: [<(ptrval)>] dump_stack+0x34/0x48 [<(ptrval)>] __warn+0x104/0x158 [<(ptrval)>] ? __mutex_unlock_slowpath+0x328/0x3ec [<(ptrval)>] warn_slowpath_fmt+0x7c/0x94 [<(ptrval)>] __mutex_unlock_slowpath+0x328/0x3ec [<(ptrval)>] mutex_unlock+0x18/0x28 [<(ptrval)>] __cpuhp_setup_state_cpuslocked.part.0+0x29c/0x2f4 [<(ptrval)>] ? page_alloc_cpu_dead+0x0/0x30 [<(ptrval)>] ? start_kernel+0x0/0x684 [<(ptrval)>] __cpuhp_setup_state+0x4c/0x5c [<(ptrval)>] page_alloc_init+0x34/0x68 [<(ptrval)>] ? start_kernel+0x1a0/0x684 [<(ptrval)>] ? early_init_dt_scan_nodes+0x60/0x70 irq event stamp: 0 I traced this to kernel/locking/mutex.c storing 3 bits of MUTEX_FLAGS in the task_struct pointer (mutex.owner). There is a comment saying that task_structs are always aligned to L1_CACHE_BYTES. This is not true for the init_task. On 64-bit machines this is not a problem because symbol addresses are naturally aligned to 64-bits providing 3 bits for MUTEX_FLAGS. Howerver, for 32-bit machines the symbol address only has 2 bits available. Fix this by setting init_task alignment to at least L1_CACHE_BYTES. Signed-off-by: Stafford Horne Acked-by: Peter Zijlstra (Intel) commit 9e9da64124ff37e064a75fabdbd6010787a1e0ea Author: Luc Van Oostenryck Date: Mon Jun 22 14:11:24 2020 +0200 openrisc: fix __user in raw_copy_to_user()'s prototype raw_copy_to_user()'s prototype seems to be a copy & paste of raw_copy_from_user() and as such has the __user annotation in the 'from' argument instead of the 'to'. So, move the __user annotation in the prototype to the 'to'. Reported-by: kernel test robot Signed-off-by: Luc Van Oostenryck Signed-off-by: Stafford Horne commit da7955405fb25c11a541234b32d06d9c09f81be6 Author: David S. Miller Date: Mon Aug 3 18:29:39 2020 -0700 sfc: Fix build with CONFIG_RFS_ACCEL disabled. drivers/net/ethernet/sfc/ef100_nic.c:835:3: error: 'const struct efx_nic_type' has no member named 'filter_rfs_expire_one' 835 | .filter_rfs_expire_one = efx_mcdi_filter_rfs_expire_one, | ^~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/sfc/ef100_nic.c:835:27: error: initialization of 'void (*)(struct efx_nic *, u32)' {aka 'void (*)(struct efx_nic *, unsigned int)'} from incompatible pointer type 'bool (*)(struct efx_nic *, u32, unsigned int)' {aka '_Bool (*)(struct efx_nic *, unsigned int, unsigned int)'} [-Werror=incompatible-pointer-types] 835 | .filter_rfs_expire_one = efx_mcdi_filter_rfs_expire_one, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reported-by: kernel test robot Signed-off-by: David S. Miller commit 2e7199bd773bff3220184d071ed9c9cd34950e51 Merge: 76769c38b45d9 21594c44083c3 Author: David S. Miller Date: Mon Aug 3 18:27:40 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2020-08-04 The following pull-request contains BPF updates for your *net-next* tree. We've added 73 non-merge commits during the last 9 day(s) which contain a total of 135 files changed, 4603 insertions(+), 1013 deletions(-). The main changes are: 1) Implement bpf_link support for XDP. Also add LINK_DETACH operation for the BPF syscall allowing processes with BPF link FD to force-detach, from Andrii Nakryiko. 2) Add BPF iterator for map elements and to iterate all BPF programs for efficient in-kernel inspection, from Yonghong Song and Alexei Starovoitov. 3) Separate bpf_get_{stack,stackid}() helpers for perf events in BPF to avoid unwinder errors, from Song Liu. 4) Allow cgroup local storage map to be shared between programs on the same cgroup. Also extend BPF selftests with coverage, from YiFei Zhu. 5) Add BPF exception tables to ARM64 JIT in order to be able to JIT BPF_PROBE_MEM load instructions, from Jean-Philippe Brucker. 6) Follow-up fixes on BPF socket lookup in combination with reuseport group handling. Also add related BPF selftests, from Jakub Sitnicki. 7) Allow to use socket storage in BPF_PROG_TYPE_CGROUP_SOCK-typed programs for socket create/release as well as bind functions, from Stanislav Fomichev. 8) Fix an info leak in xsk_getsockopt() when retrieving XDP stats via old struct xdp_statistics, from Peilin Ye. 9) Fix PT_REGS_RC{,_CORE}() macros in libbpf for MIPS arch, from Jerry Crunchtime. 10) Extend BPF kernel test infra with skb->family and skb->{local,remote}_ip{4,6} fields and allow user space to specify skb->dev via ifindex, from Dmitry Yakunin. 11) Fix a bpftool segfault due to missing program type name and make it more robust to prevent them in future gaps, from Quentin Monnet. 12) Consolidate cgroup helper functions across selftests and fix a v6 localhost resolver issue, from John Fastabend. ==================== Signed-off-by: David S. Miller commit 76769c38b45d94f5492ff9be363ac7007fd8e58b Merge: c4b83061dc860 6c4e9bcfb4893 Author: David S. Miller Date: Mon Aug 3 18:24:30 2020 -0700 Merge tag 'mlx5-updates-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-08-03 This patchset introduces some updates to mlx5 driver. 1) Jakub converts mlx5 to use the new udp tunnel infrastructure. Starting with a hack to allow drivers to request a static configuration of the default vxlan port, and then a patch that converts mlx5. 2) Parav implements change_carrier ndo for VF eswitch representors, to speedup link state control of representors netdevices. 3) Alex Vesker, makes a simple update to software steering to fix an issue with push vlan action sequence 4) Leon removes a redundant dump stack on error flow. ==================== Signed-off-by: David S. Miller commit c4b83061dc860767188390a44f035da5dbcdb29e Merge: 215602a8d2120 d61592a112928 Author: David S. Miller Date: Mon Aug 3 18:22:55 2020 -0700 Merge branch 'sfc-driver-for-EF100-family-NICs-part-2' Edward Cree says: ==================== sfc: driver for EF100 family NICs, part 2 This series implements the data path and various other functionality for Xilinx/Solarflare EF100 NICs. Changed from v2: * Improved error handling of design params (patch #3) * Removed 'inline' from .c file in patch #4 * Don't report common stats to ethtool -S (patch #8) Changed from v1: * Fixed build errors on CONFIG_RFS_ACCEL=n (patch #5) and 32-bit (patch #8) * Dropped patch #10 (ethtool ops) as it's buggy and will need a bigger rework to fix. ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit d61592a112928a11cd04081adf51ba4f752859ed Author: Edward Cree Date: Mon Aug 3 21:40:01 2020 +0100 sfc_ef100: add nic-type for VFs, and bind to them We don't yet have a .sriov_configure() to create them, though. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit ef2c57b956143c300adef4b89438e1da3db4cf32 Author: Edward Cree Date: Mon Aug 3 21:38:49 2020 +0100 sfc_ef100: read pf_index at probe time We'll need it later, for VF representors. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 43c3df0d56474dd27e1f2a1ca70e9060d341e695 Author: Edward Cree Date: Mon Aug 3 21:37:50 2020 +0100 sfc_ef100: functions for selftests Self-tests for event and interrupt reception and NVRAM. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit b593b6f1b4921700c00394d35e098259e3d04913 Author: Edward Cree Date: Mon Aug 3 21:37:20 2020 +0100 sfc_ef100: statistics gathering MAC stats work much the same as on EF10, with a periodic DMA to a region specified via an MCDI. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit b780feac367e5b77028b8088829b7958944bd71a Author: Edward Cree Date: Mon Aug 3 21:36:44 2020 +0100 sfc_ef100: plumb in fini_dmaq Bring down the TX and RX queues at ifdown, so that we can then fini the EVQs (otherwise the MC would return EBUSY because they're still in use). Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 8e57daf70671e482209b5d231a181f04845cf73e Author: Edward Cree Date: Mon Aug 3 21:36:28 2020 +0100 sfc_ef100: RX path for EF100 Includes RSS spreading. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit a9dc3d5612ce6b48bd1d230d0e3c21478a9538b3 Author: Edward Cree Date: Mon Aug 3 21:34:47 2020 +0100 sfc_ef100: RX filter table management and related gubbins Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit d19a5372186336df8a90391c1ae2011e03310dca Author: Edward Cree Date: Mon Aug 3 21:34:00 2020 +0100 sfc_ef100: TX path for EF100 NICs Includes checksum offload and TSO, so declare those in our netdev features. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit adcfc3482ffff813fa2c34e5902005853f79c2aa Author: Edward Cree Date: Mon Aug 3 21:33:20 2020 +0100 sfc_ef100: read Design Parameters at probe time Several parts of the EF100 architecture are parameterised (to allow varying capabilities on FPGAs according to resource constraints), and these parameters are exposed to the driver through a TLV-encoded region of the BAR. For the most part we either don't care about these values at all or just need to sanity-check them against the driver's assumptions, but there are a number of TSO limits which we record so that we will be able to check against them in the TX path when handling GSO skbs. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 4496363bec32df36df51db7f915a11d3b38615e3 Author: Edward Cree Date: Mon Aug 3 21:32:16 2020 +0100 sfc_ef100: fail the probe if NIC uses unsol_ev credits In the future, EF100 is planned to have a credit-based scheme for handling unsolicited events, which drivers will need to use in order to function correctly. However, current EF100 hardware does not yet generate unsolicited events and the credit scheme has not yet been implemented in firmware. To prevent compatibility problems later if the current driver is used with future firmware which does implement it, we check for the corresponding capability flag (which that future firmware will set), and if found, we refuse to probe. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 8e737145e8b27f04fe1c348ac99644f6cad4cfbb Author: Edward Cree Date: Mon Aug 3 21:32:05 2020 +0100 sfc_ef100: check firmware version at start-of-day Early in EF100 development there was a different format of event descriptor; if the NIC is somehow running the very old firmware which will use that format, fail the probe. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 215602a8d21209545923d39b92e9839093b1dcec Author: Jiafei Pan Date: Mon Aug 3 23:10:09 2020 +0300 enetc: use napi_schedule to be compatible with PREEMPT_RT The driver calls napi_schedule_irqoff() from a context where, in RT, hardirqs are not disabled, since the IRQ handler is force-threaded. In the call path of this function, __raise_softirq_irqoff() is modifying its per-CPU mask of pending softirqs that must be processed, using or_softirq_pending(). The or_softirq_pending() function is not atomic, but since interrupts are supposed to be disabled, nobody should be preempting it, and the operation should be safe. Nonetheless, when running with hardirqs on, as in the PREEMPT_RT case, it isn't safe, and the pending softirqs mask can get corrupted, resulting in softirqs being lost and never processed. To have common code that works with PREEMPT_RT and with mainline Linux, we can use plain napi_schedule() instead. The difference is that napi_schedule() (via __napi_schedule) also calls local_irq_save, which disables hardirqs if they aren't already. But, since they already are disabled in non-RT, this means that in practice we don't see any measurable difference in throughput or latency with this patch. Signed-off-by: Jiafei Pan Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6c33ae1ad58434133e2f0b7770bfb670428abda7 Author: Jiafei Pan Date: Mon Aug 3 23:10:08 2020 +0300 dpaa2-eth: use napi_schedule to be compatible with PREEMPT_RT The driver calls napi_schedule_irqoff() from a context where, in RT, hardirqs are not disabled, since the IRQ handler is force-threaded. In the call path of this function, __raise_softirq_irqoff() is modifying its per-CPU mask of pending softirqs that must be processed, using or_softirq_pending(). The or_softirq_pending() function is not atomic, but since interrupts are supposed to be disabled, nobody should be preempting it, and the operation should be safe. Nonetheless, when running with hardirqs on, as in the PREEMPT_RT case, it isn't safe, and the pending softirqs mask can get corrupted, resulting in softirqs being lost and never processed. To have common code that works with PREEMPT_RT and with mainline Linux, we can use plain napi_schedule() instead. The difference is that napi_schedule() (via __napi_schedule) also calls local_irq_save, which disables hardirqs if they aren't already. But, since they already are disabled in non-RT, this means that in practice we don't see any measurable difference in throughput or latency with this patch. Signed-off-by: Jiafei Pan Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d8f375ea463eca032c02251ded8abb1941f0d9de Merge: 59b328cf56600 947b6ef9f7aeb Author: David S. Miller Date: Mon Aug 3 18:19:23 2020 -0700 Merge branch 'net-dsa-loop-Preparatory-changes-for-802-1Q-data-path' net: dsa: loop: Preparatory changes for 802.1Q data path Florian Fainelli says: ==================== These patches are all meant to help pave the way for a 802.1Q data path added to the mockup driver, making it more useful than just testing for configuration. Sending those out now since there is no real need to wait. ==================== Signed-off-by: David S. Miller commit 947b6ef9f7aeb2c9ebf63dcd6619068f3cec353a Author: Florian Fainelli Date: Mon Aug 3 13:03:54 2020 -0700 net: dsa: loop: Set correct number of ports We only support DSA_LOOP_NUM_PORTS in the switch, do not tell the DSA core to allocate up to DSA_MAX_PORTS which is nearly the double (6 vs. 11). Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c99194eded25deb58f606e59b3101ba05e786021 Author: Florian Fainelli Date: Mon Aug 3 13:03:53 2020 -0700 net: dsa: loop: Wire-up MTU callbacks For now we simply store the port MTU into a per-port member. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 6c84a589972f6458da3168a68e7d65f6ca8687f8 Author: Florian Fainelli Date: Mon Aug 3 13:03:52 2020 -0700 net: dsa: loop: Move data structures to header In preparation for adding support for a mockup data path, move the driver data structures to include/linux/dsa/loop.h such that we can share them between net/dsa/ and drivers/net/dsa/ later on. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 916a8d168e8aea52e6f7eb2e323d5dcbd5dc23d5 Author: Florian Fainelli Date: Mon Aug 3 13:03:51 2020 -0700 net: dsa: loop: Support 4K VLANs Allocate a 4K array of VLANs instead of limiting ourselves to just 5 which is arbitrary. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 81d4e8e0731408c7fc66409cbf97f10f38964dc1 Author: Florian Fainelli Date: Mon Aug 3 13:03:50 2020 -0700 net: dsa: loop: PVID should be per-port The PVID should be per-port, this is a preliminary change to support a 802.1Q data path in the driver. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 59b328cf566001fce32c33375ea9bc570625af2f Author: Rahul Lakkireddy Date: Tue Aug 4 00:00:08 2020 +0530 cxgb4: add TC-MATCHALL IPv6 support Matching IPv6 traffic require allocating their own individual slots in TCAM. So, fetch additional slots to insert IPv6 rules. Also, fetch the cumulative stats of all the slots occupied by the Matchall rule. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit af9fdd2bf8b135bcef0cd1872ab67124e9e1a3a9 Author: Vladimir Oltean Date: Mon Aug 3 20:51:58 2020 +0300 net: dsa: sja1105: poll for extts events from a timer The current poll interval is enough to ensure that rising and falling edge events are not lost for a 1 PPS signal with 50% duty cycle. But when we deliver the events to user space, it will try to infer if they were corresponding to a rising or to a falling edge (the kernel driver doesn't know that either). User space will try to make that inference based on the time at which the PPS master had emitted the pulse (i.e. if it's a .0 time, it's rising edge, if it's .5 time, it's falling edge). But there is no in-kernel API for retrieving the precise timestamp corresponding to a PPS master (aka perout) pulse. So user space has to guess even that. It will read the PTP time on the PPS master right after we've delivered the extts event, and declare that the PPS master time was just the closest integer second, based on 2 thresholds (lower than .25, or higher than .75, and ignore anything else). Except that, if we poll for extts events (and our hardware doesn't really help us, by not providing an interrupt), then there is a risk that the poll period (and therefore the time at which the event is delivered) might confuse user space. Because we are always scheduling the next extts poll at SJA1105_EXTTS_INTERVAL "from now" (that's the only thing that the schedule_delayed_work() API gives us), it means that the start time of the next delayed workqueue will always be shifted to the right a little bit (shifted with the SPI access duration of this workqueue run). In turn, because user space sees extts events that are non-periodic compared to the PPS master's time, this means that it might start making wrong guesses about rising/falling edge. To understand the effect, here is the output of ts2phc currently. Notice the 'src' timestamps of the 'SKIP extts' events, and how they have a large wander. They keep increasing until the upper limit for the ignore threshold (.75 seconds), after which the application starts ignoring the _other_ edge. ts2phc[26.624]: /dev/ptp3 SKIP extts index 0 at 21.449898912 src 21.657784518 ts2phc[27.133]: adding tstamp 21.949894240 to clock /dev/ptp3 ts2phc[27.133]: adding tstamp 22.000000000 to clock /dev/ptp1 ts2phc[27.133]: /dev/ptp3 offset 640 s2 freq +5112 ts2phc[27.636]: /dev/ptp3 SKIP extts index 0 at 22.449889360 src 22.669398022 ts2phc[28.140]: adding tstamp 22.949884376 to clock /dev/ptp3 ts2phc[28.140]: adding tstamp 23.000000000 to clock /dev/ptp1 ts2phc[28.140]: /dev/ptp3 offset 96 s2 freq +4760 ts2phc[28.644]: /dev/ptp3 SKIP extts index 0 at 23.449879504 src 23.677420422 ts2phc[29.153]: adding tstamp 23.949874704 to clock /dev/ptp3 ts2phc[29.153]: adding tstamp 24.000000000 to clock /dev/ptp1 ts2phc[29.153]: /dev/ptp3 offset -264 s2 freq +4429 ts2phc[29.656]: /dev/ptp3 SKIP extts index 0 at 24.449870008 src 24.689407238 ts2phc[30.160]: adding tstamp 24.949865376 to clock /dev/ptp3 ts2phc[30.160]: adding tstamp 25.000000000 to clock /dev/ptp1 ts2phc[30.160]: /dev/ptp3 offset -280 s2 freq +4334 ts2phc[30.664]: /dev/ptp3 SKIP extts index 0 at 25.449860760 src 25.697449926 ts2phc[31.168]: adding tstamp 25.949856176 to clock /dev/ptp3 ts2phc[31.168]: adding tstamp 26.000000000 to clock /dev/ptp1 ts2phc[31.168]: /dev/ptp3 offset -176 s2 freq +4354 ts2phc[31.672]: /dev/ptp3 SKIP extts index 0 at 26.449851584 src 26.705433606 ts2phc[32.180]: adding tstamp 26.949846992 to clock /dev/ptp3 ts2phc[32.180]: adding tstamp 27.000000000 to clock /dev/ptp1 ts2phc[32.180]: /dev/ptp3 offset -80 s2 freq +4397 ts2phc[32.684]: /dev/ptp3 SKIP extts index 0 at 27.449842384 src 27.717415110 ts2phc[33.192]: adding tstamp 27.949837768 to clock /dev/ptp3 ts2phc[33.192]: adding tstamp 28.000000000 to clock /dev/ptp1 ts2phc[33.192]: /dev/ptp3 offset 0 s2 freq +4453 ts2phc[33.696]: /dev/ptp3 SKIP extts index 0 at 28.449833128 src 28.729412902 ts2phc[34.200]: adding tstamp 28.949828472 to clock /dev/ptp3 ts2phc[34.200]: adding tstamp 29.000000000 to clock /dev/ptp1 ts2phc[34.200]: /dev/ptp3 offset 8 s2 freq +4461 ts2phc[34.704]: /dev/ptp3 SKIP extts index 0 at 29.449823816 src 29.737416038 ts2phc[35.208]: adding tstamp 29.949819152 to clock /dev/ptp3 ts2phc[35.208]: adding tstamp 30.000000000 to clock /dev/ptp1 ts2phc[35.208]: /dev/ptp3 offset -8 s2 freq +4447 ts2phc[35.712]: /dev/ptp3 SKIP extts index 0 at 30.449814496 src 30.745554982 ts2phc[36.216]: adding tstamp 30.949809840 to clock /dev/ptp3 ts2phc[36.216]: adding tstamp 31.000000000 to clock /dev/ptp1 ts2phc[36.216]: /dev/ptp3 offset -8 s2 freq +4445 ts2phc[36.468]: /dev/ptp3 SKIP extts index 0 at 31.449805184 src 31.501109446 ts2phc[36.972]: adding tstamp 31.949800536 to clock /dev/ptp3 ts2phc[36.972]: adding tstamp 32.000000000 to clock /dev/ptp1 ts2phc[36.972]: /dev/ptp3 offset -8 s2 freq +4442 ts2phc[37.480]: /dev/ptp3 SKIP extts index 0 at 32.449795896 src 32.513320070 ts2phc[37.984]: adding tstamp 32.949791248 to clock /dev/ptp3 ts2phc[37.984]: adding tstamp 33.000000000 to clock /dev/ptp1 ts2phc[37.984]: /dev/ptp3 offset 0 s2 freq +4448 Fix that by taking the following measures: - Schedule the poll from a timer. Because we are really scheduling the timer periodically, the extts events delivered to user space are periodic too, and don't suffer from the "shift-to-the-right" effect. - Increase the poll period to 6 times a second. This imposes a smaller upper bound to the shift that can occur to the delivery time of extts events, and makes user space (ts2phc) to always interpret correctly which events should be skipped and which shouldn't. - Move the SPI readout itself to the main PTP kernel thread, instead of the generic workqueue. This is because the timer runs in atomic context, but is also better than before, because if needed, we can chrt & taskset this kernel thread, to ensure it gets enough priority under load. After this patch, one can notice that the wander is greatly reduced, and that the latencies of one extts poll are not propagated to the next. The 'src' timestamp that is skipped is never larger than .65 seconds (which means .15 seconds larger than the time at which the real event occurred at, and .10 seconds smaller than the .75 upper threshold for ignoring the falling edge): ts2phc[40.076]: adding tstamp 34.949261296 to clock /dev/ptp3 ts2phc[40.076]: adding tstamp 35.000000000 to clock /dev/ptp1 ts2phc[40.076]: /dev/ptp3 offset 48 s2 freq +4631 ts2phc[40.568]: /dev/ptp3 SKIP extts index 0 at 35.449256496 src 35.595791078 ts2phc[41.064]: adding tstamp 35.949251744 to clock /dev/ptp3 ts2phc[41.064]: adding tstamp 36.000000000 to clock /dev/ptp1 ts2phc[41.064]: /dev/ptp3 offset -224 s2 freq +4374 ts2phc[41.552]: /dev/ptp3 SKIP extts index 0 at 36.449247088 src 36.579825574 ts2phc[42.044]: adding tstamp 36.949242456 to clock /dev/ptp3 ts2phc[42.044]: adding tstamp 37.000000000 to clock /dev/ptp1 ts2phc[42.044]: /dev/ptp3 offset -240 s2 freq +4290 ts2phc[42.536]: /dev/ptp3 SKIP extts index 0 at 37.449237848 src 37.563828774 ts2phc[43.028]: adding tstamp 37.949233264 to clock /dev/ptp3 ts2phc[43.028]: adding tstamp 38.000000000 to clock /dev/ptp1 ts2phc[43.028]: /dev/ptp3 offset -144 s2 freq +4314 ts2phc[43.520]: /dev/ptp3 SKIP extts index 0 at 38.449228656 src 38.547823238 ts2phc[44.012]: adding tstamp 38.949224048 to clock /dev/ptp3 ts2phc[44.012]: adding tstamp 39.000000000 to clock /dev/ptp1 ts2phc[44.012]: /dev/ptp3 offset -80 s2 freq +4335 ts2phc[44.508]: /dev/ptp3 SKIP extts index 0 at 39.449219432 src 39.535846118 ts2phc[44.996]: adding tstamp 39.949214816 to clock /dev/ptp3 ts2phc[44.996]: adding tstamp 40.000000000 to clock /dev/ptp1 ts2phc[44.996]: /dev/ptp3 offset -32 s2 freq +4359 ts2phc[45.488]: /dev/ptp3 SKIP extts index 0 at 40.449210192 src 40.515824678 ts2phc[45.980]: adding tstamp 40.949205568 to clock /dev/ptp3 ts2phc[45.980]: adding tstamp 41.000000000 to clock /dev/ptp1 ts2phc[45.980]: /dev/ptp3 offset 8 s2 freq +4390 ts2phc[46.636]: /dev/ptp3 SKIP extts index 0 at 41.449200928 src 41.664176902 ts2phc[47.132]: adding tstamp 41.949196288 to clock /dev/ptp3 ts2phc[47.132]: adding tstamp 42.000000000 to clock /dev/ptp1 ts2phc[47.132]: /dev/ptp3 offset 0 s2 freq +4384 ts2phc[47.620]: /dev/ptp3 SKIP extts index 0 at 42.449191656 src 42.648117190 ts2phc[48.112]: adding tstamp 42.949187016 to clock /dev/ptp3 ts2phc[48.112]: adding tstamp 43.000000000 to clock /dev/ptp1 ts2phc[48.112]: /dev/ptp3 offset 0 s2 freq +4384 ts2phc[48.604]: /dev/ptp3 SKIP extts index 0 at 43.449182384 src 43.632112582 ts2phc[49.100]: adding tstamp 43.949177736 to clock /dev/ptp3 ts2phc[49.100]: adding tstamp 44.000000000 to clock /dev/ptp1 ts2phc[49.100]: /dev/ptp3 offset -8 s2 freq +4376 ts2phc[49.588]: /dev/ptp3 SKIP extts index 0 at 44.449173096 src 44.616136774 ts2phc[50.080]: adding tstamp 44.949168464 to clock /dev/ptp3 ts2phc[50.080]: adding tstamp 45.000000000 to clock /dev/ptp1 ts2phc[50.080]: /dev/ptp3 offset 8 s2 freq +4390 ts2phc[50.572]: /dev/ptp3 SKIP extts index 0 at 45.449163816 src 45.600134662 ts2phc[51.064]: adding tstamp 45.949159160 to clock /dev/ptp3 ts2phc[51.064]: adding tstamp 46.000000000 to clock /dev/ptp1 ts2phc[51.064]: /dev/ptp3 offset -8 s2 freq +4376 ts2phc[51.556]: /dev/ptp3 SKIP extts index 0 at 46.449154528 src 46.584588550 ts2phc[52.048]: adding tstamp 46.949149896 to clock /dev/ptp3 ts2phc[52.048]: adding tstamp 47.000000000 to clock /dev/ptp1 ts2phc[52.048]: /dev/ptp3 offset 0 s2 freq +4382 ts2phc[52.540]: /dev/ptp3 SKIP extts index 0 at 47.449145256 src 47.568132198 ts2phc[53.032]: adding tstamp 47.949140616 to clock /dev/ptp3 ts2phc[53.032]: adding tstamp 48.000000000 to clock /dev/ptp1 ts2phc[53.032]: /dev/ptp3 offset 0 s2 freq +4382 ts2phc[53.524]: /dev/ptp3 SKIP extts index 0 at 48.449135968 src 48.552121446 ts2phc[54.016]: adding tstamp 48.949131320 to clock /dev/ptp3 ts2phc[54.016]: adding tstamp 49.000000000 to clock /dev/ptp1 ts2phc[54.016]: /dev/ptp3 offset 0 s2 freq +4382 ts2phc[54.512]: /dev/ptp3 SKIP extts index 0 at 49.449126680 src 49.540147014 ts2phc[55.000]: adding tstamp 49.949122040 to clock /dev/ptp3 ts2phc[55.000]: adding tstamp 50.000000000 to clock /dev/ptp1 ts2phc[55.000]: /dev/ptp3 offset 0 s2 freq +4382 ts2phc[55.492]: /dev/ptp3 SKIP extts index 0 at 50.449117400 src 50.520119078 ts2phc[55.988]: adding tstamp 50.949112768 to clock /dev/ptp3 ts2phc[55.988]: adding tstamp 51.000000000 to clock /dev/ptp1 ts2phc[55.988]: /dev/ptp3 offset 8 s2 freq +4390 ts2phc[56.476]: /dev/ptp3 SKIP extts index 0 at 51.449108120 src 51.504175910 ts2phc[57.132]: adding tstamp 51.949103480 to clock /dev/ptp3 ts2phc[57.132]: adding tstamp 52.000000000 to clock /dev/ptp1 ts2phc[57.132]: /dev/ptp3 offset 0 s2 freq +4384 ts2phc[57.624]: /dev/ptp3 SKIP extts index 0 at 52.449098840 src 52.651833574 ts2phc[58.116]: adding tstamp 52.949094200 to clock /dev/ptp3 ts2phc[58.116]: adding tstamp 53.000000000 to clock /dev/ptp1 ts2phc[58.116]: /dev/ptp3 offset 8 s2 freq +4392 ts2phc[58.612]: /dev/ptp3 SKIP extts index 0 at 53.449089560 src 53.639826918 ts2phc[59.100]: adding tstamp 53.949084920 to clock /dev/ptp3 ts2phc[59.100]: adding tstamp 54.000000000 to clock /dev/ptp1 ts2phc[59.100]: /dev/ptp3 offset 8 s2 freq +4394 ts2phc[59.592]: /dev/ptp3 SKIP extts index 0 at 54.449080272 src 54.619842278 ts2phc[60.084]: adding tstamp 54.949075624 to clock /dev/ptp3 ts2phc[60.084]: adding tstamp 55.000000000 to clock /dev/ptp1 ts2phc[60.084]: /dev/ptp3 offset 8 s2 freq +4397 ts2phc[60.576]: /dev/ptp3 SKIP extts index 0 at 55.449070968 src 55.603885542 ts2phc[61.068]: adding tstamp 55.949066312 to clock /dev/ptp3 ts2phc[61.068]: adding tstamp 56.000000000 to clock /dev/ptp1 ts2phc[61.068]: /dev/ptp3 offset 0 s2 freq +4391 ts2phc[61.560]: /dev/ptp3 SKIP extts index 0 at 56.449061680 src 56.587885798 ts2phc[62.052]: adding tstamp 56.949057032 to clock /dev/ptp3 ts2phc[62.052]: adding tstamp 57.000000000 to clock /dev/ptp1 ts2phc[62.052]: /dev/ptp3 offset -8 s2 freq +4383 Signed-off-by: Vladimir Oltean Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 8555c6bfd5fddb1cf363d3cd157d70a1bb27f718 Author: Paolo Abeni Date: Mon Aug 3 18:40:39 2020 +0200 mptcp: fix bogus sendmsg() return code under pressure In case of memory pressure, mptcp_sendmsg() may call sk_stream_wait_memory() after succesfully xmitting some bytes. If the latter fails we currently return to the user-space the error code, ignoring the succeful xmit. Address the issue always checking for the xmitted bytes before mptcp_sendmsg() completes. Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests") Reviewed-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit f8deaea06fb5002a9ebb7a366ef4066e2d7e0944 Merge: 80fbbb1672e78 8fb6ac457d5be Author: David S. Miller Date: Mon Aug 3 18:06:47 2020 -0700 Merge branch 'mlxsw-Add-support-for-buffer-drop-traps' Ido Schimmel says: ==================== mlxsw: Add support for buffer drop traps Petr says: A recent patch set added the ability to mirror buffer related drops (e.g., early drops) through a netdev. This patch set adds the ability to trap such packets to the local CPU for analysis. The trapping towards the CPU is configured by using tc-trap action instead of tc-mirred as was done when the packets were mirrored through a netdev. A future patch set will also add the ability to sample the dropped packets using tc-sample action. The buffer related drop traps are added to devlink, which means that the dropped packets can be reported to user space via the kernel's drop_monitor module. Patch set overview: Patch #1 adds the early_drop trap to devlink Patch #2 adds extack to a few devlink operations to facilitate better error reporting to user space. This is necessary - among other things - because the action of buffer drop traps cannot be changed in mlxsw Patch #3 performs a small refactoring in mlxsw, patch #4 fixes a bug that this patchset would trigger. Patches #5-#6 add the infrastructure required to support different traps / trap groups in mlxsw per-ASIC. This is required because buffer drop traps are not supported by Spectrum-1 Patch #7 extends mlxsw to register the early_drop trap Patch #8 adds the offload logic for the "trap" action at a qevent block. Patch #9 adds a mlxsw-specific selftest. ==================== Signed-off-by: David S. Miller commit 8fb6ac457d5be8516eeed2b92342f7f95c448275 Author: Petr Machata Date: Mon Aug 3 19:11:41 2020 +0300 selftests: mlxsw: RED: Test offload of trapping on RED qevents Add a selftest for RED early_drop and mark qevents when a trap action is attached at the associated block. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 54a9238589c533690c241fd3667a67d376d0a9cf Author: Petr Machata Date: Mon Aug 3 19:11:40 2020 +0300 mlxsw: spectrum_qdisc: Offload action trap for qevents When offloading action trap on a qevent, pass to_dev of NULL to the SPAN module to trigger the mirror to the CPU port. Query the buffer drops policer and use it for policing of the trapped traffic. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6687e953f44fdb4683adb899a963adba45cffa5d Author: Ido Schimmel Date: Mon Aug 3 19:11:39 2020 +0300 mlxsw: spectrum_trap: Add early_drop trap As previously explained, packets that are dropped due to buffer related reasons (e.g., tail drop, early drop) can be mirrored to the CPU port. These packets are then trapped with one of the "mirror session" traps and their CQE includes the reason for which the packet was mirrored. Register with devlink a new trap, early_drop, and initialize the corresponding Rx listener with the appropriate mirror reason. Return an error in case user tries to change the traps' action, as this is not supported. Since Spectrum-1 does not support these traps, the above is only done for Spectrum-2 onwards. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 869c7be940e50aa14845fcdb7a9d67c18be7e27a Author: Ido Schimmel Date: Mon Aug 3 19:11:38 2020 +0300 mlxsw: spectrum_trap: Allow for per-ASIC traps initialization Subsequent patches will need to register different traps for Spectrum-1 and Spectrum-2 onwards. Enable that by invoking a per-ASIC operation during traps initialization. Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 36d1fd687d56d807cc65210f14712349919c13e8 Author: Ido Schimmel Date: Mon Aug 3 19:11:37 2020 +0300 mlxsw: spectrum_trap: Allow for per-ASIC trap groups initialization Subsequent patches will need to register different trap groups for Spectrum-1 and Spectrum-2 onwards. Enable that by invoking a per-ASIC operation during trap groups initialization. Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 928345c08b72dd175d4eefa24900f09706a9a3b5 Author: Petr Machata Date: Mon Aug 3 19:11:36 2020 +0300 mlxsw: spectrum_span: On policer_id_base_ref_count, use dec_and_test When unsetting policer base, the SPAN code currently uses refcount_dec(). However that function splats when the counter reaches zero, because reaching zero without actually testing is in general indicative of a missing cleanup. There is no cleanup to be done here, but nonetheless, use refcount_dec_and_test() as required. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 76ba292cc7d7b760ee3e25aba353fb7ab86e64d3 Author: Ido Schimmel Date: Mon Aug 3 19:11:35 2020 +0300 mlxsw: spectrum_trap: Use 'size_t' for array sizes Use 'size_t' instead of 'u64' for array sizes, as this this is correct type to use for expressions involving sizeof(). Suggested-by: Petr Machata Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit c88e11e04716ab4ed51d5972ea04c7b70b6e9d8a Author: Ido Schimmel Date: Mon Aug 3 19:11:34 2020 +0300 devlink: Pass extack when setting trap's action and group's parameters A later patch will refuse to set the action of certain traps in mlxsw and also to change the policer binding of certain groups. Pass extack so that failure could be communicated clearly to user space. Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 08e335f6ad35a019f4cb1a74badc2f4bceb63bcf Author: Amit Cohen Date: Mon Aug 3 19:11:33 2020 +0300 devlink: Add early_drop trap Add the packet trap that can report packets that were ECN marked due to RED AQM. Signed-off-by: Amit Cohen Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 9feffe14661bb6f5200bc5712999378832d129c5 Author: Zhihao Cheng Date: Sat Aug 1 11:24:50 2020 +0800 f2fs: update_sit_entry: Make the judgment condition of f2fs_bug_on more intuitive Current judgment condition of f2fs_bug_on in function update_sit_entry(): new_vblocks >> (sizeof(unsigned short) << 3) || new_vblocks > sbi->blocks_per_seg which equivalents to: new_vblocks < 0 || new_vblocks > sbi->blocks_per_seg The latter is more intuitive. Signed-off-by: Zhihao Cheng Reported-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 58f7e00ffb45a4115ba701a32467c2aeb944c855 Author: Yufen Yu Date: Fri Jul 31 02:18:13 2020 -0400 f2fs: replace test_and_set/clear_bit() with set/clear_bit() Since set/clear_inode_flag() don't need to return value to show if flag is set, we can just call set/clear_bit() here. Signed-off-by: Yufen Yu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 567c4bf54a85a14af4ca9be19d7dc327e56a15f9 Author: Daeho Jeong Date: Thu Jul 30 14:09:28 2020 +0900 f2fs: make file immutable even if releasing zero compression block When we use F2FS_IOC_RELEASE_COMPRESS_BLOCKS ioctl, if we can't find any compressed blocks in the file even with large file size, the ioctl just ends up without changing the file's status as immutable. It makes the user, who expects that the file is immutable when it returns successfully, confused. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 09a0bd07764359650d41dbcb723f81321e523217 Merge: e53bc3ff99b41 67186653c9036 Author: Linus Torvalds Date: Mon Aug 3 18:02:53 2020 -0700 Merge tag 'platform-drivers-x86-v5.9-1' of git://git.infradead.org/linux-platform-drivers-x86 Pull x86 platform driver updates from Andy Shevchenko: - ASUS WMI driver honors BAT1 name of the battery (quite a few new laptops are using it) - Dell WMI driver supports new key codes and backlight events - ThinkPad ACPI driver now may use standard charge threshold interface, it also has been updated to provide Laptop or Desktop mode to the user - Intel Speed Select Technology gained support on Sapphire Rapids platform - Regular update of Speed Select Technology tools - Mellanox has been updated to support complex attributes - PMC core driver has been fixed to show correct names for LPM0 register - HTTP links were replaced by HTTPS ones where it applies - Miscellaneous fixes and cleanups here and there * tag 'platform-drivers-x86-v5.9-1' of git://git.infradead.org/linux-platform-drivers-x86: (42 commits) platform/x86: asus-nb-wmi: Drop duplicate DMI quirk structures platform/x86: thinkpad_acpi: Make some symbols static platform/x86: thinkpad_acpi: add documentation for battery charge control platform/x86: thinkpad_acpi: use standard charge control attribute names platform/x86: thinkpad_acpi: remove unused defines platform/x86: ISST: drop a duplicated word in isst_if.h tools/power/x86/intel-speed-select: Update version for v5.9 tools/power/x86/intel-speed-select: Add retries for mail box commands tools/power/x86/intel-speed-select: Add option to delay mbox commands tools/power/x86/intel-speed-select: Ignore -o option processing on error tools/power/x86/intel-speed-select: Change path for caching topology info platform/x86: acerhdf: Replace HTTP links with HTTPS ones platform/x86: apple-gmux: Replace HTTP links with HTTPS ones platform/x86: pcengines-apuv2: revert wiring up simswitch GPIO as LED platform/x86: mlx-platform: Extend FAN platform data description platform_data/mlxreg: Add presence register field for FAN devices Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces platform/mellanox: mlxreg-io: Add support for complex attributes platform/x86: mlx-platform: Add more definitions for system attributes platform_data/mlxreg: Add support for complex attributes ... commit 80fbbb1672e7815a15d7329638537961d65c453d Author: YueHaibing Date: Mon Aug 3 21:19:48 2020 +0800 fib: Fix undef compile warning net/core/fib_rules.c:26:7: warning: "CONFIG_IP_MULTIPLE_TABLES" is not defined, evaluates to 0 [-Wundef] #elif CONFIG_IP_MULTIPLE_TABLES ^~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 8b66a6fd34f5 ("fib: fix another fib_rules_ops indirect call wrapper problem") Signed-off-by: YueHaibing Acked-By: Brian Vazquez Signed-off-by: David S. Miller commit 190f8b060ee38fcea885e08b2fe0e3fdd428a618 Author: Geliang Tang Date: Mon Aug 3 21:00:44 2020 +0800 mptcp: use mptcp_for_each_subflow in mptcp_stream_accept Use mptcp_for_each_subflow in mptcp_stream_accept instead of open-coding. Signed-off-by: Geliang Tang Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit ee494f42a356527c73b0a5f63c8b95656240f47c Merge: 01f4d47a5b55a 0b91111fb1a16 Author: David S. Miller Date: Mon Aug 3 18:00:22 2020 -0700 Merge tag 'mac80211-next-for-davem-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== A few more changes, notably: * handle new SAE (WPA3 authentication) status codes in the correct way * fix a while that should be an if instead, avoiding infinite loops * handle beacon filtering changing better ==================== Signed-off-by: David S. Miller commit 01f4d47a5b55a8b6cc053a7516ad976ad45534ce Author: Jisheng Zhang Date: Mon Aug 3 16:56:47 2020 +0800 net: stmmac: fix failed to suspend if phy based WOL is enabled With the latest net-next tree, if test suspend/resume after enabling WOL, we get error as below: [ 487.086365] dpm_run_callback(): mdio_bus_suspend+0x0/0x30 returns -16 [ 487.086375] PM: Device stmmac-0:00 failed to suspend: error -16 -16 means -EBUSY, this is because I didn't enable wakeup of the correct device when implementing phy based WOL feature. To be honest, I caught the issue when implementing phy based WOL and then fix it locally, but forgot to amend the phy based wol patch. Today, I found the issue by testing net-next tree. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller commit 88fab21c691bb1ff164e540735237a385e3afeaf Author: Ioana-Ruxandra Stăncioi Date: Mon Aug 3 07:33:33 2020 +0000 seg6_iptunnel: Refactor seg6_lwt_headroom out of uapi header Refactor the function seg6_lwt_headroom out of the seg6_iptunnel.h uapi header, because it is only used in seg6_iptunnel.c. Moreover, it is only used in the kernel code, as indicated by the "#ifdef __KERNEL__". Suggested-by: David Miller Signed-off-by: Ioana-Ruxandra Stăncioi Signed-off-by: David S. Miller commit 7f674025d9f7321dea11b802cc0ab3f09cbe51c5 Author: Jane Chu Date: Mon Aug 3 16:41:39 2020 -0600 libnvdimm/security: ensure sysfs poll thread woke up and fetch updated attr commit 7d988097c546 ("acpi/nfit, libnvdimm/security: Add security DSM overwrite support") adds a sysfs_notify_dirent() to wake up userspace poll thread when the "overwrite" operation has completed. But the notification is issued before the internal dimm security state and flags have been updated, so the userspace poll thread wakes up and fetches the not-yet-updated attr and falls back to sleep, forever. But if user from another terminal issue "ndctl wait-overwrite nmemX" again, the command returns instantly. Link: https://lore.kernel.org/r/1596494499-9852-3-git-send-email-jane.chu@oracle.com Fixes: 7d988097c546 ("acpi/nfit, libnvdimm/security: Add security DSM overwrite support") Cc: Dave Jiang Cc: Dan Williams Reviewed-by: Dave Jiang Signed-off-by: Jane Chu Signed-off-by: Vishal Verma commit 7c02d53dfe4db08cd7b4d4be8c7f1b801cf8b899 Author: Jane Chu Date: Mon Aug 3 16:41:38 2020 -0600 libnvdimm/security: the 'security' attr never show 'overwrite' state 'security' attribute displays the security state of an nvdimm. During normal operation, the nvdimm state maybe one of 'disabled', 'unlocked' or 'locked'. When an admin issues # ndctl sanitize-dimm nmem0 --overwrite the attribute is expected to change to 'overwrite' until the overwrite operation completes. But tests on our systems show that 'overwrite' is never shown during the overwrite operation. i.e. # cat /sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/nmem0/security unlocked the attribute remain 'unlocked' through out the operation, consequently "ndctl wait-overwrite nmem0" command doesn't wait at all. The driver tracks the state in 'nvdimm->sec.flags': when the operation starts, it adds an overwrite bit to the flags; and when the operation completes, it removes the bit. Hence security_show() should check the 'overwrite' bit first, in order to indicate the actual state when multiple bits are set in the flags. Link: https://lore.kernel.org/r/1596494499-9852-2-git-send-email-jane.chu@oracle.com Reviewed-by: Dave Jiang Signed-off-by: Jane Chu Signed-off-by: Vishal Verma commit dad42d17558f316e9e807698cd4207359b636084 Author: Jane Chu Date: Mon Aug 3 16:41:37 2020 -0600 libnvdimm/security: fix a typo commit d78c620a2e82 ("libnvdimm/security: Introduce a 'frozen' attribute") introduced a typo, causing a 'nvdimm->sec.flags' update being overwritten by the subsequent update meant for 'nvdimm->sec.ext_flags'. Link: https://lore.kernel.org/r/1596494499-9852-1-git-send-email-jane.chu@oracle.com Fixes: d78c620a2e82 ("libnvdimm/security: Introduce a 'frozen' attribute") Cc: Dan Williams Reviewed-by: Dave Jiang Signed-off-by: Jane Chu Signed-off-by: Vishal Verma commit 730e700e2c19d87e578ff0e7d8cb1d4a02b036d2 Author: Jianfeng Wang Date: Thu Jul 30 23:49:16 2020 +0000 tcp: apply a floor of 1 for RTT samples from TCP timestamps For retransmitted packets, TCP needs to resort to using TCP timestamps for computing RTT samples. In the common case where the data and ACK fall in the same 1-millisecond interval, TCP senders with millisecond- granularity TCP timestamps compute a ca_rtt_us of 0. This ca_rtt_us of 0 propagates to rs->rtt_us. This value of 0 can cause performance problems for congestion control modules. For example, in BBR, the zero min_rtt sample can bring the min_rtt and BDP estimate down to 0, reduce snd_cwnd and result in a low throughput. It would be hard to mitigate this with filtering in the congestion control module, because the proper floor to apply would depend on the method of RTT sampling (using timestamp options or internally-saved transmission timestamps). This fix applies a floor of 1 for the RTT sample delta from TCP timestamps, so that seq_rtt_us, ca_rtt_us, and rs->rtt_us will be at least 1 * (USEC_PER_SEC / TCP_TS_HZ). Note that the receiver RTT computation in tcp_rcv_rtt_measure() and min_rtt computation in tcp_update_rtt_min() both already apply a floor of 1 timestamp tick, so this commit makes the code more consistent in avoiding this edge case of a value of 0. Signed-off-by: Jianfeng Wang Signed-off-by: Neal Cardwell Signed-off-by: Eric Dumazet Acked-by: Kevin Yang Acked-by: Yuchung Cheng Signed-off-by: David S. Miller commit e53bc3ff99b413083bfef80d0fdbf7da3a09fc0c Merge: a92ad11fb209c bb2de0adca217 Author: Linus Torvalds Date: Mon Aug 3 17:42:23 2020 -0700 Merge tag 'ras-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS updates from Ingo Molnar: "Boris is on vacation and he asked us to send you the pending RAS bits: - Print the PPIN field on CPUs that fill them out - Fix an MCE injection bug - Simplify a kzalloc in dev_mcelog_init_device()" * tag 'ras-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce, EDAC/mce_amd: Print PPIN in machine check records x86/mce/dev-mcelog: Use struct_size() helper in kzalloc() x86/mce/inject: Fix a wrong assignment of i_mce.status commit a92ad11fb209c8de0d358b78415fda5f01308202 Merge: 5183a617ecbf0 898ec52d2ba05 Author: Linus Torvalds Date: Mon Aug 3 17:41:06 2020 -0700 Merge tag 'x86-timers-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 timer update from Ingo Molnar: "Set the X86_FEATURE_TSC_KNOWN_FREQ flag for Xen guests, to avoid recalibration" * tag 'x86-timers-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/xen/time: Set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz() commit 5183a617ecbf01805c4abb33c3165a276eec7234 Merge: e96ec8cf9ca12 3bcf25a40b018 Author: Linus Torvalds Date: Mon Aug 3 17:38:43 2020 -0700 Merge tag 'x86-platform-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Ingo Molnar: "The biggest change is the removal of SGI UV1 support, which allowed the removal of the legacy EFI old_mmap code as well. This removes quite a bunch of old code & quirks" * tag 'x86-platform-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/efi: Remove unused EFI_UV1_MEMMAP code x86/platform/uv: Remove uv bios and efi code related to EFI_UV1_MEMMAP x86/efi: Remove references to no-longer-used efi_have_uv1_memmap() x86/efi: Delete SGI UV1 detection. x86/platform/uv: Remove efi=old_map command line option x86/platform/uv: Remove vestigial mention of UV1 platform from bios header x86/platform/uv: Remove support for UV1 platform from uv x86/platform/uv: Remove support for uv1 platform from uv_hub x86/platform/uv: Remove support for UV1 platform from uv_bau x86/platform/uv: Remove support for UV1 platform from uv_mmrs x86/platform/uv: Remove support for UV1 platform from x2apic_uv_x x86/platform/uv: Remove support for UV1 platform from uv_tlb x86/platform/uv: Remove support for UV1 platform from uv_time commit e96ec8cf9ca12a8d6b3b896a2eccd4b92a1893ab Merge: c813e8c9dff34 2b32ab031e82a Author: Linus Torvalds Date: Mon Aug 3 17:25:42 2020 -0700 Merge tag 'x86-mm-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 mmm update from Ingo Molnar: "The biggest change is to not sync the vmalloc and ioremap ranges for x86-64 anymore" * tag 'x86-mm-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm/64: Make sync_global_pgds() static x86/mm/64: Do not sync vmalloc/ioremap mappings x86/mm: Pre-allocate P4D/PUD pages for vmalloc area commit c813e8c9dff344a3b46bc9bba8aff5a7ebbc67e7 Merge: 69094c20323c5 a7e1f67ed29f0 Author: Linus Torvalds Date: Mon Aug 3 17:23:49 2020 -0700 Merge tag 'x86-misc-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 MSR filtering from Ingo Molnar: "Filter MSR writes from user-space by default, and print a syslog entry if they happen outside the allowed set of MSRs, which is a single one for now, MSR_IA32_ENERGY_PERF_BIAS. The plan is to eventually disable MSR writes by default (they can still be enabled via allow_writes=on)" * tag 'x86-misc-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/msr: Filter MSR writes commit 69094c20323c5efff462a2e02d0bb7b6608779ad Merge: 0a897743ac258 c8a59a4d8e3c9 Author: Linus Torvalds Date: Mon Aug 3 17:22:13 2020 -0700 Merge tag 'x86-microcode-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode update from Ingo Molnar: "Remove the microcode loader's FW_LOADER coupling" * tag 'x86-microcode-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode: Do not select FW_LOADER commit 0a897743ac258927dd29bb91ac663b568f53429d Merge: 335ad94c218e9 4185b3b92792e Author: Linus Torvalds Date: Mon Aug 3 17:21:10 2020 -0700 Merge tag 'x86-fpu-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 FPU selftest from Ingo Molnar: "Add the /sys/kernel/debug/selftest_helpers/test_fpu FPU self-test" * tag 'x86-fpu-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/fpu: Add an FPU selftest commit 335ad94c218e96ef12f56d93eadc884731aa23b1 Merge: 4ee48103151bb f69ca629d89d6 Author: Linus Torvalds Date: Mon Aug 3 17:08:02 2020 -0700 Merge tag 'x86-cpu-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cpu updates from Ingo Molar: - prepare for Intel's new SERIALIZE instruction - enable split-lock debugging on more CPUs - add more Intel CPU models - optimize stack canary initialization a bit - simplify the Spectre logic a bit * tag 'x86-cpu-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/cpu: Refactor sync_core() for readability x86/cpu: Relocate sync_core() to sync_core.h x86/cpufeatures: Add enumeration for SERIALIZE instruction x86/split_lock: Enable the split lock feature on Sapphire Rapids and Alder Lake CPUs x86/cpu: Add Lakefield, Alder Lake and Rocket Lake models to the to Intel CPU family x86/stackprotector: Pre-initialize canary for secondary CPUs x86/speculation: Merge one test in spectre_v2_user_select_mitigation() commit 4ee48103151bbce7ae319b477109eba4216b20d2 Merge: 37e88224c0003 ef2ff0f5d6008 Author: Linus Torvalds Date: Mon Aug 3 17:00:00 2020 -0700 Merge tag 'x86-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 debug fixlets from Ingo Molnar: "Improve x86 debuggability: print registers with the same log level as the backtrace" * tag 'x86-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/dumpstack: Show registers dump with trace's log level x86/dumpstack: Add log_lvl to __show_regs() x86/dumpstack: Add log_lvl to show_iret_regs() commit 37e88224c0003822b5309b7cab793064be803a3e Merge: 1ff9b20b47bf1 90fc73928fec2 Author: Linus Torvalds Date: Mon Aug 3 16:53:28 2020 -0700 Merge tag 'x86-cleanups-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanups from Ingo Molnar: "Misc cleanups all around the place" * tag 'x86-cleanups-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioperm: Initialize pointer bitmap with NULL rather than 0 x86: uv: uv_hub.h: Delete duplicated word x86: cmpxchg_32.h: Delete duplicated word x86: bootparam.h: Delete duplicated word x86/mm: Remove the unused mk_kernel_pgd() #define x86/tsc: Remove unused "US_SCALE" and "NS_SCALE" leftover macros x86/ioapic: Remove unused "IOAPIC_AUTO" define x86/mm: Drop unused MAX_PHYSADDR_BITS x86/msr: Move the F15h MSRs where they belong x86/idt: Make idt_descr static initrd: Remove erroneous comment x86/mm/32: Fix -Wmissing prototypes warnings for init.c cpu/speculation: Add prototype for cpu_show_srbds() x86/mm: Fix -Wmissing-prototypes warnings for arch/x86/mm/init.c x86/asm: Unify __ASSEMBLY__ blocks x86/cpufeatures: Mark two free bits in word 3 x86/msr: Lift AMD family 0x15 power-specific MSRs commit 1ff9b20b47bf12f4b87596cd549aa8b98917ba5a Merge: c0dfadfed8748 1d0e12fd3a848 Author: Linus Torvalds Date: Mon Aug 3 16:51:34 2020 -0700 Merge tag 'x86-build-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build updates from Ingo Molnar: "Misc changes: refresh defconfigs and simplify the boot image link stage" * tag 'x86-build-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/defconfigs: Refresh defconfig files x86/build: Move max-page-size option to LDFLAGS_vmlinux x86/defconfigs: Remove CONFIG_CRYPTO_AES_586 from i386_defconfig commit c1dd91d16246b168b80af9b64c5cc35a66410455 Author: Jens Axboe Date: Mon Aug 3 16:43:59 2020 -0600 io_uring: add comments on how the async buffered read retry works The retry based logic here isn't easy to follow unless you're already familiar with how io_uring does task_work based retries. Add some comments explaining the flow a little better. Suggested-by: Linus Torvalds Signed-off-by: Jens Axboe commit cbd287c09351f1d3a4b3cb9167a2616a11390d32 Author: Jens Axboe Date: Mon Aug 3 17:06:21 2020 -0600 io_uring: io_async_buf_func() need not test page bit Since we don't do exclusive waits or wakeups, we know that the bit is always going to be set. Kill the test. Also see commit: 2a9127fcf229 ("mm: rewrite wait_on_page_bit_common() logic") Signed-off-by: Jens Axboe commit 7ee193e2dda3f48b692fad46ab9df90e99e7b811 Author: Andy Teng Date: Thu Jul 30 21:30:14 2020 +0800 dt-bindings: pinctrl: add bindings for MediaTek MT6779 SoC Add devicetree bindings for MediaTek MT6779 pinctrl driver. Signed-off-by: Andy Teng Signed-off-by: Hanks Chen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1596115816-11758-2-git-send-email-hanks.chen@mediatek.com Signed-off-by: Linus Walleij commit 1de39b64bfd9a674f9c5ee21abe8b8ae33fa5a07 Author: Linus Walleij Date: Tue Jul 21 15:18:14 2020 +0200 pinctrl: stmfx: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Cc: Amelie Delaunay Cc: Benjamin Gaignard Link: https://lore.kernel.org/r/20200721131814.357182-1-linus.walleij@linaro.org commit e81376ebbafc679a5cea65f25f5ab242172f52df Author: Linus Walleij Date: Wed Jul 22 12:15:45 2020 +0200 pinctrl: amd: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Cc: Shyam Sundar S K Cc: Sandeep Singh Link: https://lore.kernel.org/r/20200722101545.144373-1-linus.walleij@linaro.org commit 047cd9a6bd8a2a73e8d92eb97a1b50c7bcd59279 Author: Randy Dunlap Date: Mon Jul 27 22:55:45 2020 -0700 pinctrl: mediatek: fix build for tristate changes Export mtk_is_virt_gpio() for the case when CONFIG_PINCTRL_MTK=y CONFIG_PINCTRL_MTK_V2=y CONFIG_PINCTRL_MTK_MOORE=y CONFIG_PINCTRL_MTK_PARIS=m to fix this build error: ERROR: modpost: "mtk_is_virt_gpio" [drivers/pinctrl/mediatek/pinctrl-paris.ko] undefined! Signed-off-by: Randy Dunlap Cc: Sean Wang Cc: linux-mediatek@lists.infradead.org Link: https://lore.kernel.org/r/d15827a3-d0c8-e231-9f61-8507b3d7be3a@infradead.org Signed-off-by: Linus Walleij commit 85745c870a757c21f880b7e73d2b6fd1e5113a03 Author: Marek Szyprowski Date: Mon Jul 20 16:54:12 2020 +0200 pinctrl: samsung: Use bank name as irqchip name Use the bank name as the irqchip name. This name is later visible in /proc/interrupts, what makes it possible to easily identify each GPIO interrupt. /proc/interrupts before this patch: 143: 0 exynos4210_wkup_irq_chip 7 Edge hdmi 144: 0 exynos4210_wkup_irq_chip 6 Level wm8994 145: 1 exynos4210_wkup_irq_chip 7 Edge max77686-pmic, max77686-rtc 146: 1 exynos_gpio_irq_chip 3 Edge 3-0048 /proc/interrupts after this patch: 143: 0 gpx3 7 Edge hdmi 144: 0 gpx3 6 Level wm8994 145: 1 gpx0 7 Edge max77686-pmic, max77686-rtc 146: 1 gpm2 3 Edge 3-0048 Handling of the eint_wake_mask_value has been reworked, because each bank has now its own exynos_irq_chip structure allocated. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200720145412.24221-1-krzk@kernel.org Signed-off-by: Linus Walleij commit f1b206cf7c57561ea156798f323b0541a783bd2f Author: Drew Fustini Date: Wed Jul 22 14:27:52 2020 +0200 pinctrl: core: print gpio in pins debugfs file If there is a gpio range mapping for the pin, then print out the gpio chip and line index for the pin in the debugfs 'pins' file with the format: "[line-index]:[gpio-label]" Here is example output on the BeagleBoard.org PocketBeagle (AM3358): /sys/kernel/debug/pinctrl/44e10800.pinmux-pinctrl-single/pins pin 25 (PIN25) 25:gpio-32-63 44e10864 00000037 pinctrl-single pin 26 (PIN26) 26:gpio-32-63 44e10868 00000037 pinctrl-single pin 27 (PIN27) 27:gpio-32-63 44e1086c 00000037 pinctrl-single pin 28 (PIN28) 0:? 44e10870 00000036 pinctrl-single pin 29 (PIN29) 0:? 44e10874 00000006 pinctrl-single pin 30 (PIN30) 28:gpio-32-63 44e10878 00000027 pinctrl-single pin 31 (PIN31) 29:gpio-32-63 44e1087c 00000037 pinctrl-single pin 32 (PIN32) 30:gpio-32-63 44e10880 00000037 pinctrl-single pin 33 (PIN33) 31:gpio-32-63 44e10884 00000037 pinctrl-single pin 34 (PIN34) 0:gpio-64-95 44e10888 00000037 pinctrl-single pin 35 (PIN35) 1:gpio-64-95 44e1088c 00000037 pinctrl-single Suggested-by: Andy Shevchenko Suggested-by: Tony Lindgren Signed-off-by: Drew Fustini Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200722122751.266440-1-drew@beagleboard.org Signed-off-by: Linus Walleij commit c1282ae87882aff2a1adbc8d168c8fb3391d288a Author: Hanks Chen Date: Thu Jul 23 19:19:55 2020 +0800 pinctrl: mediatek: add mt6779 eint support add driver setting to support mt6779 eint Signed-off-by: Mars Cheng Signed-off-by: Hanks Chen Acked-by: Sean Wang Link: https://lore.kernel.org/r/1595503197-15246-6-git-send-email-hanks.chen@mediatek.com Signed-off-by: Linus Walleij commit 920e469e15c820a432c8dc21f7c5221f9dfdf716 Author: Hanks Chen Date: Thu Jul 23 19:19:54 2020 +0800 pinctrl: mediatek: add pinctrl support for MT6779 SoC This adds MT6779 pinctrl driver based on MediaTek pinctrl-paris core. Signed-off-by: Mars Cheng Signed-off-by: Andy Teng Signed-off-by: Hanks Chen Acked-by: Sean Wang Link: https://lore.kernel.org/r/1595503197-15246-5-git-send-email-hanks.chen@mediatek.com Signed-off-by: Linus Walleij commit edd546465002621665a3a275abe908a30efdce5b Author: Hanks Chen Date: Thu Jul 23 19:19:53 2020 +0800 pinctrl: mediatek: avoid virtual gpio trying to set reg for virtual gpios, they should not do reg setting and should behave as expected for eint function. Signed-off-by: Mars Cheng Signed-off-by: Hanks Chen Acked-by: Sean Wang Link: https://lore.kernel.org/r/1595503197-15246-4-git-send-email-hanks.chen@mediatek.com Signed-off-by: Linus Walleij commit 22cc422070d9a9a399f8a70b89f1b852945444cb Author: Andy Shevchenko Date: Tue Jul 28 15:55:04 2020 +0300 gpio: wcove: Request IRQ after all initialisation done There is logically better to request IRQ when we initialise all structures. Align the driver with the rest on the same matter. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200728125504.27786-3-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit a1cdaa64aab217a282fc3577f7c560ffaa75dcd0 Author: Andy Shevchenko Date: Tue Jul 28 15:55:03 2020 +0300 gpio: crystalcove: Free IRQ on error path It appears that all, but request_irq(), calls in the driver are device managed. In unlikely case of devm_gpiochip_add_data() failure the IRQ left requested. Free IRQ on error path by switching to devm_request_threaded_irq() API. Byproduct of this change is a drop of ->remove() callback completely. Fixes: 945e72db36bd ("gpio: crystalcove: Use irqchip template") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200728125504.27786-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 2a93a0da06f8fcee96a7c49c756fd7c5891b0b0d Author: Andy Shevchenko Date: Tue Jul 28 15:55:02 2020 +0300 gpio: pca953x: Request IRQ after all initialisation done There is logically better to request IRQ when we initialise all structures. Align the driver with the rest on the same matter. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200728125504.27786-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 5f402bb17533113c21d61c2d4bc4ef4a6fa1c9a5 Author: Ahmad Fatoum Date: Fri Jul 31 14:38:36 2020 +0200 gpio: don't use same lockdep class for all devm_gpiochip_add_data users Commit 959bc7b22bd2 ("gpio: Automatically add lockdep keys") documents in its commits message its intention to "create a unique class key for each driver". It does so by having gpiochip_add_data add in-place the definition of two static lockdep classes for LOCKDEP use. That way, every caller of the macro adds their gpiochip with unique lockdep classes. There are many indirect callers of gpiochip_add_data, however, via use of devm_gpiochip_add_data. devm_gpiochip_add_data has external linkage and all its users will share the same lockdep classes, which probably is not intended. Fix this by replicating the gpio_chip_add_data statics-in-macro for the devm_ version as well. Fixes: 959bc7b22bd2 ("gpio: Automatically add lockdep keys") Signed-off-by: Ahmad Fatoum Reviewed-by: Andy Shevchenko Reviewed-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200731123835.8003-1-a.fatoum@pengutronix.de Signed-off-by: Linus Walleij commit fbc97de84ef88bc38874c41be151cf220c72a865 Author: Huang Guobin Date: Sun Aug 2 22:00:55 2020 -0400 tipc: Use is_broadcast_ether_addr() instead of memcmp() Using is_broadcast_ether_addr() instead of directly use memcmp() to determine if the ethernet address is broadcast address. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Huang Guobin Acked-by: Ying Xue Signed-off-by: David S. Miller commit 6c09b484377cc8f135a20390c99d7e0d71b1b888 Merge: f2e0b29a9ac77 3207f715c3431 Author: David S. Miller Date: Mon Aug 3 16:20:15 2020 -0700 Merge branch 'DPAA-FMan-driver-fixes' Florinel Iordache says: ==================== DPAA FMan driver fixes Here are several fixes for the DPAA FMan driver. v2 changes: * corrected patch 4 by removing the line added by mistake * used longer fixes tags with the first 12 characters of the SHA-1 ID v3 changes: * remove the empty line inserted after fixes tag ==================== Acked-by: Madalin Bucur Signed-off-by: David S. Miller commit 3207f715c34317d08e798e11a10ce816feb53c0f Author: Florinel Iordache Date: Mon Aug 3 10:07:34 2020 +0300 fsl/fman: fix eth hash table allocation Fix memory allocation for ethernet address hash table. The code was wrongly allocating an array for eth hash table which is incorrect because this is the main structure for eth hash table (struct eth_hash_t) that contains inside a number of elements. Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support") Signed-off-by: Florinel Iordache Signed-off-by: David S. Miller commit cc5d229a122106733a85c279d89d7703f21e4d4f Author: Florinel Iordache Date: Mon Aug 3 10:07:33 2020 +0300 fsl/fman: check dereferencing null pointer Add a safe check to avoid dereferencing null pointer Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support") Signed-off-by: Florinel Iordache Signed-off-by: David S. Miller commit cc79fd8f557767de90ff199d3b6fb911df43160a Author: Florinel Iordache Date: Mon Aug 3 10:07:32 2020 +0300 fsl/fman: fix unreachable code The parameter 'priority' is incorrectly forced to zero which ultimately induces logically dead code in the subsequent lines. Fixes: 57ba4c9b56d8 ("fsl/fman: Add FMan MAC support") Signed-off-by: Florinel Iordache Signed-off-by: David S. Miller commit 0572054617f32670abab4b4e89a876954d54b704 Author: Florinel Iordache Date: Mon Aug 3 10:07:31 2020 +0300 fsl/fman: fix dereference null return value Check before using returned value to avoid dereferencing null pointer. Fixes: 18a6c85fcc78 ("fsl/fman: Add FMan Port Support") Signed-off-by: Florinel Iordache Signed-off-by: David S. Miller commit 99f47abd9f7bf6e365820d355dc98f6955a562df Author: Florinel Iordache Date: Mon Aug 3 10:07:30 2020 +0300 fsl/fman: use 32-bit unsigned integer Potentially overflowing expression (ts_freq << 16 and intgr << 16) declared as type u32 (32-bit unsigned) is evaluated using 32-bit arithmetic and then used in a context that expects an expression of type u64 (64-bit unsigned) which ultimately is used as 16-bit unsigned by typecasting to u16. Fixed by using an unsigned 32-bit integer since the value is truncated anyway in the end. Fixes: 414fd46e7762 ("fsl/fman: Add FMan support") Signed-off-by: Florinel Iordache Signed-off-by: David S. Miller commit bb58a47a120b888de6b996472b282fea02210f38 Author: Linus Walleij Date: Mon Jul 27 00:12:59 2020 +0200 gpio: max732x: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Tested-by: Sam Protsenko Reviewed-by: Sam Protsenko Cc: Sam Protsenko Link: https://lore.kernel.org/r/20200726221259.133536-1-linus.walleij@linaro.org commit beb3fb41659a3cff2121f126a83fd7167b601a63 Author: Linus Walleij Date: Tue Jul 28 09:27:06 2020 +0200 gpio: stmpe: Move chip registration Make sure to register the GPIO chip after requesting the interrupt and setting up the IRQ members of the irqchip. Fixes: 9745079609df ("gpio: stmpe: Use irqchip template") Reported-by: Serge Semin Signed-off-by: Linus Walleij Cc: Patrice Chotard Link: https://lore.kernel.org/r/20200728072706.348725-1-linus.walleij@linaro.org commit c0dfadfed87489fa6126ece161a14c2d15dbdc79 Merge: ba77c568f3160 1ac1efa5f6950 Author: Linus Torvalds Date: Mon Aug 3 16:03:23 2020 -0700 Merge tag 'x86-boot-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: "The main change in this cycle was to add support for ZSTD-compressed kernel and initrd images. ZSTD has a very fast decompressor, yet it compresses better than gzip" * tag 'x86-boot-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation: dontdiff: Add zstd compressed files .gitignore: Add ZSTD-compressed files x86: Add support for ZSTD compressed kernel x86: Bump ZO_z_extra_bytes margin for zstd usr: Add support for zstd compressed initramfs init: Add support for zstd compressed kernel lib: Add zstd support to decompress lib: Prepare zstd for preboot environment, improve performance commit f2e0b29a9ac7766799360eb6cd72ba83889f616a Merge: c23cf402d0bb0 77a92189ecfd0 Author: David S. Miller Date: Mon Aug 3 16:03:18 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next 1) UAF in chain binding support from previous batch, from Dan Carpenter. 2) Queue up delayed work to expire connections with no destination, from Andrew Sy Kim. 3) Use fallthrough pseudo-keyword, from Gustavo A. R. Silva. 4) Replace HTTP links with HTTPS, from Alexander A. Klimov. 5) Remove superfluous null header checks in ip6tables, from Gaurav Singh. 6) Add extended netlink error reporting for expression. 7) Report EEXIST on overlapping chain, set elements and flowtable devices. ==================== Signed-off-by: David S. Miller commit c23cf402d0bb069310ce75bbf2758ff9c23fbe73 Author: Christophe JAILLET Date: Sun Aug 2 15:53:48 2020 +0200 net: spider_net: Remove a useless memset Avoid a memset after a call to 'dma_alloc_coherent()'. This is useless since commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 36f28f7687a9ce665479cce5d64ce7afaa9e77ae Author: Christophe JAILLET Date: Sun Aug 2 15:53:33 2020 +0200 net: spider_net: Fix the size used in a 'dma_free_coherent()' call Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()', in 'spider_net_init_chain()'. Fixes: d4ed8f8d1fb7 ("Spidernet DMA coalescing") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit edab74e9cb1d073c70add0f9b75e17aebf0598ff Author: Christophe JAILLET Date: Sun Aug 2 15:52:04 2020 +0200 net: sgi: ioc3-eth: Fix the size used in some 'dma_free_coherent()' calls Update the size used in 'dma_free_coherent()' in order to match the one used in the corresponding 'dma_alloc_coherent()'. Fixes: 369a782af0f1 ("net: sgi: ioc3-eth: ensure tx ring is 16k aligned.") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit ba77c568f3160657a5f7905289c07d18c2dfde78 Merge: 97c6f57dc9265 158807de5822d Author: Linus Torvalds Date: Mon Aug 3 15:58:06 2020 -0700 Merge tag 'x86-asm-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "A couple of changes, concentrated into the percpu code, to enable Clang support on i386 kernels too" [ And cleans up the macros to generate percpu ops a lot too - Linus ] * tag 'x86-asm-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/uaccess: Make __get_user_size() Clang compliant on 32-bit x86/percpu: Remove unused PER_CPU() macro x86/percpu: Clean up percpu_stable_op() x86/percpu: Clean up percpu_cmpxchg_op() x86/percpu: Clean up percpu_xchg_op() x86/percpu: Clean up percpu_add_return_op() x86/percpu: Remove "e" constraint from XADD x86/percpu: Clean up percpu_add_op() x86/percpu: Clean up percpu_from_op() x86/percpu: Clean up percpu_to_op() x86/percpu: Introduce size abstraction macros commit aa027850a292ea65524b8fab83eb91a124ad362c Author: Tianjia Zhang Date: Sun Aug 2 19:15:44 2020 +0800 liquidio: Fix wrong return value in cn23xx_get_pf_num() On an error exit path, a negative error code should be returned instead of a positive return value. Fixes: 0c45d7fe12c7e ("liquidio: fix use of pf in pass-through mode in a virtual machine") Cc: Rick Farrington Signed-off-by: Tianjia Zhang Signed-off-by: David S. Miller commit bace287c55aa7b66b217701d290801ed810702b1 Author: Tianjia Zhang Date: Sun Aug 2 19:15:38 2020 +0800 net/enetc: Fix wrong return value in enetc_psfp_parse_clsflower() In the case of invalid rule, a positive value EINVAL is returned here. I think this is a typo error. It is necessary to return an error value. Cc: Po Liu Signed-off-by: Tianjia Zhang Signed-off-by: David S. Miller commit 0470a48880f8bc42ce26962b79c7b802c5a695ec Author: Tianjia Zhang Date: Sun Aug 2 19:15:37 2020 +0800 net: ethernet: aquantia: Fix wrong return value In function hw_atl_a0_hw_multicast_list_set(), when an invalid request is encountered, a negative error code should be returned. Fixes: bab6de8fd180b ("net: ethernet: aquantia: Atlantic A0 and B0 specific functions") Cc: David VomLehn Signed-off-by: Tianjia Zhang Signed-off-by: David S. Miller commit 97c6f57dc9265a1587895a2d97ba1b1e612c750e Merge: e4cbce4d13175 1b2e335ebfa22 Author: Linus Torvalds Date: Mon Aug 3 15:56:37 2020 -0700 Merge tag 'x86-alternatives-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86/alternatives update from Ingo Molnar: "A single commit that improves the alternatives patching syslog debug output" * tag 'x86-alternatives-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/alternatives: Add pr_fmt() to debug macros commit cbbb64f62acd97429f517bd382ada9d618c8856a Author: Jia-Ju Bai Date: Sun Aug 2 17:33:40 2020 +0800 atm: idt77252: avoid accessing the data mapped to streaming DMA In queue_skb(), skb->data is mapped to streaming DMA on line 850: dma_map_single(..., skb->data, ...); Then skb->data is accessed on lines 862 and 863: tbd->word_4 = (skb->data[0] << 24) | (skb->data[1] << 16) | (skb->data[2] << 8) | (skb->data[3] << 0); and on lines 893 and 894: tbd->word_4 = (skb->data[0] << 24) | (skb->data[1] << 16) | (skb->data[2] << 8) | (skb->data[3] << 0); These accesses may cause data inconsistency between CPU cache and hardware. To fix this problem, the calculation result of skb->data is stored in a local variable before DMA mapping, and then the driver accesses this local variable instead of skb->data. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller commit 6f1188b4ac7577c29a4883d5618fa2231396fe9d Author: Yue Hu Date: Thu Jul 30 17:23:53 2020 +0800 of: reserved-memory: remove duplicated call to of_get_flat_dt_prop() for no-map node Just use nomap instead of the second call to of_get_flat_dt_prop(). And change nomap as a bool type due to != NULL operator. Also, correct comment about node of 'align' -> 'alignment'. Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20200730092353.15644-1-zbestahu@gmail.com Signed-off-by: Rob Herring commit a45a9e8a768c32103ffec67f9b173968a6154a11 Author: Jia-Ju Bai Date: Sun Aug 2 17:16:11 2020 +0800 atm: eni: avoid accessing the data mapped to streaming DMA In do_tx(), skb->data is mapped to streaming DMA on line 1111: paddr = dma_map_single(...,skb->data,DMA_TO_DEVICE); Then skb->data is accessed on line 1153: (skb->data[3] & 0xf) This access may cause data inconsistency between CPU cache and hardware. To fix this problem, skb->data[3] is assigned to a local variable before DMA mapping, and then the driver accesses this local variable instead of skb->data[3]. Signed-off-by: Jia-Ju Bai Signed-off-by: David S. Miller commit 6d78e473e018e15065d3004ee73ac77acf82baa2 Author: Bartosz Golaszewski Date: Sun Aug 2 09:49:53 2020 +0200 net: phy: mdio-mvusb: select MDIO_DEVRES in Kconfig PHYLIB is not selected by the mvusb driver but it uses mdio devres helpers. Explicitly select MDIO_DEVRES in this driver's Kconfig entry. Reported-by: kernel test robot Fixes: 1814cff26739 ("net: phy: add a Kconfig option for mdio_devres") Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d0f6ba2ef2c1c95069509e71402e7d6d43452512 Author: Vincent Duvert Date: Sun Aug 2 07:06:51 2020 +0200 appletalk: Fix atalk_proc_init() return path Add a missing return statement to atalk_proc_init so it doesn't return -ENOMEM when successful. This allows the appletalk module to load properly. Fixes: e2bcd8b0ce6e ("appletalk: use remove_proc_subtree to simplify procfs code") Link: https://www.downtowndougbrown.com/2020/08/hacking-up-a-fix-for-the-broken-appletalk-kernel-module-in-linux-5-1-and-newer/ Reported-by: Christopher KOBAYASHI Reported-by: Doug Brown Signed-off-by: Vincent Duvert [lukas: add missing tags] Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v5.1+ Cc: Yue Haibing Signed-off-by: David S. Miller commit 69462fe6a39048ec186f60178a3a6ea23ae16e0c Author: Jonathan McDowell Date: Sat Aug 1 18:06:46 2020 +0100 net: dsa: qca8k: Add 802.1q VLAN support This adds full 802.1q VLAN support to the qca8k, allowing the use of vlan_filtering and more complicated bridging setups than allowed by basic port VLAN support. Tested with a number of untagged ports with separate VLANs and then a trunk port with all the VLANs tagged on it. v3: - Pull QCA8K_PORT_VID_DEF changes into separate cleanup patch - Reverse Christmas tree notation for variable definitions - Use untagged instead of tagged for consistency v2: - Return sensible errnos on failure rather than -1 (rmk) - Style cleanups based on Florian's feedback - Silently allow VLAN 0 as device correctly treats this as no tag Signed-off-by: Jonathan McDowell Reviewed-by: Florian Fainelli Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit e9d204fde5fd7d8ca1d6490d1b5c3d8d963bcd1a Author: Jonathan McDowell Date: Sat Aug 1 18:05:54 2020 +0100 net: dsa: qca8k: Add define for port VID Rather than using a magic value of 1 when configuring the port VIDs add a QCA8K_PORT_VID_DEF define and use that instead. Also fix up the bitmask in the process; the top 4 bits are reserved so this wasn't a problem, but only masking 12 bits is the correct approach. Signed-off-by: Jonathan McDowell Reviewed-by: Florian Fainelli Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit ac6d1835ca964b053f051ecedd44ecb3de0f1b33 Merge: 2f631133c40cd 7dbc63f0a5402 Author: David S. Miller Date: Mon Aug 3 15:43:59 2020 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2020-08-01 This series contains updates to the ice driver only. Wei Yongjun marks power management functions with __maybe_unused. Nick disables VLAN pruning in promiscuous mode and renames grst_delay to grst_timeout. Kiran modifies the check for linearization and corrects the vsi_id mask value. Vignesh replaces the use of flow profile locks to RSS profile locks for RSS rule removal. Destroys flow profile lock on clearing XLT table and clears extraction sequence entries. Jesse adds some statistics and removes an unreported one. Brett allows for 2 queue configuration for VFs. Surabhi adds a check for failed allocation of an extraction sequence table. Tony updates the PTYPE lookup table and makes other trivial fixes. Victor extends profile ID locks to be held until all references are completed. ==================== Signed-off-by: David S. Miller commit 2f631133c40cd8e311ae393518c3e651e476ab66 Author: Miaohe Lin Date: Sat Aug 1 17:36:05 2020 +0800 net: Pass NULL to skb_network_protocol() when we don't care about vlan depth When we don't care about vlan depth, we could pass NULL instead of the address of a unused local variable to skb_network_protocol() as a param. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit c15fc199b3757496325c4855662fad89bd1efdad Author: Miaohe Lin Date: Sat Aug 1 17:30:23 2020 +0800 net: Use __skb_pagelen() directly in skb_cow_data() In fact, skb_pagelen() - skb_headlen() is equal to __skb_pagelen(), use it directly to avoid unnecessary skb_headlen() call. Also fix the CHECK note of checkpatch.pl: Comparison to NULL could be written "!__pskb_pull_tail" Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 8340303670d895407ab02885f1fc5a38cc7b044f Author: Miaohe Lin Date: Sat Aug 1 17:14:41 2020 +0800 net: qed: use eth_zero_addr() to clear mac address Use eth_zero_addr() to clear mac address instead of memset(). Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 7ad9c26f7512917819b0b3590062c34f22d128bf Author: Miaohe Lin Date: Sat Aug 1 17:13:54 2020 +0800 net: qede: use eth_zero_addr() to clear mac address Use eth_zero_addr() to clear mac address instead of memset(). Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 29b3705facb3d2b9f51383aa5ad3962a9105d06b Author: Rahul Lakkireddy Date: Sat Aug 1 02:23:40 2020 +0530 cxgb4: fix extracting IP addresses in TC-FLOWER rules commit c8729cac2a11 ("cxgb4: add ethtool n-tuple filter insertion") has removed checking control key for determining IP address types for TC-FLOWER rules, which causes all the rules being inserted to hardware to become IPv6 rule type always. So, add back the check to select the correct IP address type to extract and hence fix the correct rule type being inserted to hardware. Also, ethtool_rx_flow_key doesn't have any control key and instead directly sets the IPv4/IPv6 address keys. So, explicitly set the IP address type for ethtool n-tuple filters to reuse the same code. Fixes: c8729cac2a11 ("cxgb4: add ethtool n-tuple filter insertion") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit fd4ec07631b13438c148af973ecd461cf440ee2e Author: Rahul Lakkireddy Date: Sat Aug 1 02:20:52 2020 +0530 cxgb4: fix check for running offline ethtool selftest The flag indicating the selftest to run is a bitmask. So, fix the check. Also, the selftests will fail if adapter initialization has not been completed yet. So, add appropriate check and bail sooner. Fixes: 7235ffae3d2c ("cxgb4: add loopback ethtool self-test") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 38bd9d9f6287ae7e39101e7e11a278daf4b56a68 Merge: 622e32b7d4a64 fe8c30b508354 Author: David S. Miller Date: Mon Aug 3 15:32:02 2020 -0700 Merge branch 'ionic-txrx-updates' Shannon Nelson says: ==================== ionic txrx updates These are a few patches to do some cleanup in the packet handling and give us more flexibility in tuning performance by allowing us to put Tx handling on separate interrupts when it makes sense for particular traffic loads. v3: simplified queue count change logging, removed unnecessary check for no count change v2: dropped the original patch 2 for ringsize change changed the separated tx/rx interrupts to use ethtool -L ==================== Signed-off-by: David S. Miller commit fe8c30b50835436152a4d2319f834acb36b3b659 Author: Shannon Nelson Date: Fri Jul 31 13:15:36 2020 -0700 ionic: separate interrupt for Tx and Rx Add the capability to split the Tx queues onto their own interrupts with their own napi contexts. This gives the opportunity for more direct control of Tx interrupt handling, such as CPU affinity and interrupt coalescing, useful for some traffic loads. v2: use ethtool -L, not a vendor specific priv-flag v3: simplify logging, drop unnecessary "no-change" tests Reviewed-by: Jakub Kicinski Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit b14e4e95f9ec5acf2cf65bcc4fab2fe8ded81ac3 Author: Shannon Nelson Date: Fri Jul 31 13:15:35 2020 -0700 ionic: tx separate servicing We give the tx clean path its own budget and service routine in order to give a little more leeway to be more aggressive, and in preparation for coming changes. We've found this gives us a little better performance in some packet processing scenarios without hurting other scenarios. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 155f15ad6760718288c914962bff8acd39942573 Author: Shannon Nelson Date: Fri Jul 31 13:15:34 2020 -0700 ionic: use fewer firmware doorbells on rx fill We really don't need to hit the Rx queue doorbell so many times, we can wait to the end and cause a little less thrash. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 622e32b7d4a6492cf5c1f759ef833f817418f7b3 Author: Lorenzo Bianconi Date: Fri Jul 31 20:12:05 2020 +0200 net: gre: recompute gre csum for sctp over gre tunnels The GRE tunnel can be used to transport traffic that does not rely on a Internet checksum (e.g. SCTP). The issue can be triggered creating a GRE or GRETAP tunnel and transmitting SCTP traffic ontop of it where CRC offload has been disabled. In order to fix the issue we need to recompute the GRE csum in gre_gso_segment() not relying on the inner checksum. The issue is still present when we have the CRC offload enabled. In this case we need to disable the CRC offload if we require GRE checksum since otherwise skb_checksum() will report a wrong value. Fixes: 90017accff61 ("sctp: Add GSO support") Signed-off-by: Lorenzo Bianconi Reviewed-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit fd65e5a95d08389444e8591a20538b3edece0e15 Author: Nikolay Aleksandrov Date: Fri Jul 31 19:26:16 2020 +0300 net: bridge: clear bridge's private skb space on xmit We need to clear all of the bridge private skb variables as they can be stale due to the packet being recirculated through the stack and then transmitted through the bridge device. Similar memset is already done on bridge's input. We've seen cases where proxyarp_replied was 1 on routed multicast packets transmitted through the bridge to ports with neigh suppress which were getting dropped. Same thing can in theory happen with the port isolation bit as well. Fixes: 821f1b21cabb ("bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit bda2127827e9dd2781ae095cda0b8e5bf685c458 Author: Nicolas Saenz Julienne Date: Mon Aug 3 16:25:47 2020 +0200 of: unittest: Use bigger address cells to catch parser regressions Getting address and size cells for dma-ranges/ranges parsing is tricky and shouldn't rely on the node's count_cells() method. The function starts looking for cells on the parent node, as its supposed to work with device nodes, which doesn't work when input with bus nodes, as generally done when parsing ranges. Add test to catch regressions on that specific quirk as developers will be tempted to edit it out in favor of the default method. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/9200970a917a9cabdc5b17483b5a8725111eb9d0.camel@suse.de Signed-off-by: Rob Herring commit ae79dbf60905a09a5cca63c02300b2a0f1befbad Author: Florent Fourcot Date: Fri Jul 31 15:32:07 2020 +0200 ipv6/addrconf: use a boolean to choose between UNREGISTER/DOWN "how" was used as a boolean. Change the type to bool, and improve variable name Signed-off-by: Florent Fourcot Signed-off-by: David S. Miller commit d208a42a62e70b9c86b46b7bad126eb862891314 Author: Florent Fourcot Date: Fri Jul 31 15:32:06 2020 +0200 ipv6/addrconf: call addrconf_ifdown with consistent values Second parameter of addrconf_ifdown "how" is used as a boolean internally. It does not make sense to call it with something different of 0 or 1. This value is set to 2 in all git history. Signed-off-by: Florent Fourcot Signed-off-by: David S. Miller commit b90a1269184a3ff374562d243419ad2fa9d3b1aa Merge: d6526926de739 9bf24f594c6ac Author: David S. Miller Date: Mon Aug 3 15:17:48 2020 -0700 Merge branch 'net-openvswitch-masks-cache-enhancements' Eelco Chaudron says: ==================== net: openvswitch: masks cache enhancements This patchset adds two enhancements to the Open vSwitch masks cache. Changes in v4 [patch 2/2 only]: - Remove null check before calling free_percpu() - Make ovs_dp_change() return appropriate error codes Changes in v3 [patch 2/2 only]: - Use is_power_of_2() function - Use array_size() function - Fix remaining sparse errors Changes in v2 [patch 2/2 only]: - Fix sparse warnings - Fix netlink policy items reported by Florian Westphal ==================== Signed-off-by: Eelco Chaudron Signed-off-by: David S. Miller commit 9bf24f594c6acf676fb8c229f152c21bfb915ddb Author: Eelco Chaudron Date: Fri Jul 31 14:21:34 2020 +0200 net: openvswitch: make masks cache size configurable This patch makes the masks cache size configurable, or with a size of 0, disable it. Reviewed-by: Paolo Abeni Reviewed-by: Tonghao Zhang Signed-off-by: Eelco Chaudron Signed-off-by: David S. Miller commit 9d2f627b7ec9d5d3246b6cec17f290ee6778c83b Author: Eelco Chaudron Date: Fri Jul 31 14:20:56 2020 +0200 net: openvswitch: add masks cache hit counter Add a counter that counts the number of masks cache hits, and export it through the megaflow netlink statistics. Reviewed-by: Paolo Abeni Reviewed-by: Tonghao Zhang Signed-off-by: Eelco Chaudron Signed-off-by: David S. Miller commit d6526926de7397a97308780911565e31a6b67b59 Author: Lorenzo Bianconi Date: Fri Jul 31 10:38:32 2020 +0200 net: mvpp2: fix memory leak in mvpp2_rx Release skb memory in mvpp2_rx() if mvpp2_rx_refill routine fails Fixes: b5015854674b ("net: mvpp2: fix refilling BM pools in RX path") Signed-off-by: Lorenzo Bianconi Acked-by: Matteo Croce Signed-off-by: David S. Miller commit 71fed0bc8665969f4681fc5772e5df42bfcc472e Author: Gaurav Singh Date: Fri Jul 31 00:58:44 2020 -0400 ethtool: ethnl_set_linkmodes: remove redundant null check info cannot be NULL here since its being accessed earlier in the function: nlmsg_parse(info->nlhdr...). Remove this redundant NULL check. Signed-off-by: Gaurav Singh Reviewed-by: Michal Kubecek Signed-off-by: David S. Miller commit 9aba6c5b49254d5bee927d81593ed4429e91d4ae Author: Peilin Ye Date: Fri Jul 31 00:48:38 2020 -0400 openvswitch: Prevent kernel-infoleak in ovs_ct_put_key() ovs_ct_put_key() is potentially copying uninitialized kernel stack memory into socket buffers, since the compiler may leave a 3-byte hole at the end of `struct ovs_key_ct_tuple_ipv4` and `struct ovs_key_ct_tuple_ipv6`. Fix it by initializing `orig` with memset(). Fixes: 9dd7f8907c37 ("openvswitch: Add original direction conntrack tuple to sw_flow_key.") Suggested-by: Dan Carpenter Signed-off-by: Peilin Ye Signed-off-by: David S. Miller commit dd9c697a944a02066877404b01e9fb7dcb3a2218 Merge: 1a91e318c0977 53727eb6b3c21 4aeccdf067112 6cfde88418fe9 cb783bbbcf54c Author: Stephen Boyd Date: Mon Aug 3 15:07:18 2020 -0700 Merge branches 'clk-microchip', 'clk-mmp', 'clk-unused' and 'clk-at91' into clk-next - Add support for SAMA7G5 SoC clks - Microchip Sparx5 DPLL clk * clk-microchip: clk: sparx5: Add Sparx5 SoC DPLL clock driver dt-bindings: clock: sparx5: Add bindings include file * clk-mmp: clk: mmp: avoid missing prototype warning * clk-unused: clk: drop unused function __clk_get_flags * clk-at91: clk: at91: sama7g5: add clock support for sama7g5 clk: at91: clk-utmi: add utmi support for sama7g5 clk: at91: clk-sam9x60-pll: re-factor to support plls with multiple outputs clk: at91: add macro for pll ids mask clk: at91: clk-programmable: add mux_table option clk: at91: clk-peripheral: add support for changeable parent rate clk: at91: clk-master: add master clock support for SAMA7G5 clk: at91: clk-generated: add mux_table option clk: at91: clk-generated: pass the id of changeable parent at registration clk: at91: replace conditional operator with double logical not clk: at91: sckc: register slow_rc with accuracy option clk: at91: sam9x60: fix main rc oscillator frequency clk: at91: sam9x60-pll: use frac when setting frequency clk: at91: sam9x60-pll: check fcore against ranges clk: at91: sam9x60-pll: use logical or for range check clk: at91: clk-sam9x60-pll: fix mul mask clk: at91: clk-generated: check best_rate against ranges clk: at91: clk-generated: continue if __clk_determine_rate() returns error clk: at91: fix possible dead lock in new drivers commit 1a91e318c09777f4708c38d6fb98f4da47d9e067 Merge: 53e07424eca92 7a346a37e46ab 810797c14508d fa64023763cf1 12b90b40854a8 92df3a9bf3fd9 Author: Stephen Boyd Date: Mon Aug 3 15:07:08 2020 -0700 Merge branches 'clk-fallthru', 'clk-ingenic', 'clk-tegra', 'clk-sirf' and 'clk-qoriq' into clk-next - Add RTC related clks on Ingenic SoCs - Support USB PHY clks on Ingenic SoCs * clk-fallthru: clk: davinci: Use fallthrough pseudo-keyword clk: imx: Use fallthrough pseudo-keyword * clk-ingenic: clk: X1000: Add support for calculat REFCLK of USB PHY. clk: JZ4780: Reformat the code to align it. clk: JZ4780: Add functions for enable and disable USB PHY. clk: Ingenic: Add RTC related clocks for Ingenic SoCs. dt-bindings: clock: Add tabs to align code. dt-bindings: clock: Add RTC related clocks for Ingenic SoCs. * clk-tegra: clk: tegra: pll: Improve PLLM enable-state detection * clk-sirf: clk: clk-atlas6: fix return value check in atlas6_clk_init() * clk-qoriq: clk: qoriq: add LS1021A core pll mux options commit 53e07424eca922fb7a15f34ad9767b73fced8a05 Merge: 987106e5f2f03 cb7c6677bfb5c aab58ace0d145 9f7d5042a6416 d310124cd99df 03111b1088f18 Author: Stephen Boyd Date: Mon Aug 3 15:06:53 2020 -0700 Merge branches 'clk-actions', 'clk-rockchip', 'clk-iproc', 'clk-intel' and 'clk-debugfs' into clk-next - RMU and DMAC/GPIO clock support for Actions Semi S500 SoCs * clk-actions: MAINTAINERS: Add reset binding entry for Actions Semi Owl SoCs clk: actions: Add Actions S500 SoC Reset Management Unit support dt-bindings: reset: Add binding constants for Actions S500 RMU clk: actions: Add APB, DMAC, GPIO clock support for Actions S500 SoC dt-bindings: clock: Add APB, DMAC, GPIO bindings for Actions S500 SoC clk: actions: Fix h_clk for Actions S500 SoC * clk-rockchip: clk: rockchip: add sclk_mac_lbtest to rk3188_critical_clocks clk: rockchip: Revert "fix wrong mmc sample phase shift for rk3328" clk: rockchip: use separate compatibles for rk3288w-cru dt-bindings: clocks: add rk3288w variant compatible clk: rockchip: Handle clock tree for rk3288w variant clk: rockchip: convert rk3036 pll type to use internal lock status clk: rockchip: convert basic pll lock_wait to use regmap_read_poll_timeout clk: rockchip: convert rk3399 pll type to use readl_relaxed_poll_timeout * clk-iproc: clk: iproc: round clock rate to the closest * clk-intel: clk: intel: Avoid unnecessary memset by improving code clk: intel: Improve locking in the driver clk: intel: Use devm_clk_hw_register() instead of clk_hw_register() * clk-debugfs: clk: Add support for enabling/disabling clocks from debugfs commit 987106e5f2f03fc0b6450804dc8423bea2bbc47c Merge: c63e2a7af3f48 5f1d8970d4cdb 210f7240029dd bd8548d0dcdab bfd35bf9cebc3 22b1408b0d282 Author: Stephen Boyd Date: Mon Aug 3 15:06:45 2020 -0700 Merge branches 'clk-https', 'clk-renesas', 'clk-kconfig', 'clk-amlogic' and 'clk-imx' into clk-next * clk-https: Replace HTTP links with HTTPS ones: Common CLK framework * clk-renesas: clk: renesas: cpg-mssr: Add r8a774e1 support dt-bindings: clock: renesas,cpg-mssr: Document r8a774e1 clk: renesas: Add r8a774e1 CPG Core Clock Definitions dt-bindings: power: Add r8a774e1 SYSC power domain definitions clk: renesas: rzg2: Mark RWDT clocks as critical clk: renesas: rcar-gen3: Mark RWDT clocks as critical clk: renesas: cpg-mssr: Mark clocks as critical only if on at boot dt-bindings: clock: renesas: cpg: Convert to json-schema * clk-kconfig: clk: hsdk: Fix bad dependency on IOMEM clk: Specify IOMEM dependency for HSDK pll driver clk: Drop duplicate selection in Kconfig clk: AST2600: Add mux for EMMC clock clk: mvebu: ARMADA_AP_CPU_CLK needs to select ARMADA_AP_CP_HELPER * clk-amlogic: clk: meson: meson8b: add the vclk2_en gate clock clk: meson: meson8b: add the vclk_en gate clock clk: meson: meson8b: Drop CLK_IS_CRITICAL from fclk_div2 clk: meson: g12a: Add support for NNA CLK source clocks dt-bindings: clk: g12a-clkc: Add NNA CLK Source clock IDs * clk-imx: clk: imx: vf610: add CAAM clock clk: imx8mp: add mu root clk commit c63e2a7af3f486df8b8f04e0369497b64166a9bb Merge: 44a7f3e8222a7 6378cfdcc32d3 9f4db31ea09e3 3bca66b08ec83 f34e4651ce66a Author: Stephen Boyd Date: Mon Aug 3 15:06:16 2020 -0700 Merge branches 'clk-socfpga', 'clk-doc', 'clk-qcom', 'clk-vc5' and 'clk-bcm' into clk-next - Enable CPU clks on Qualcomm IPQ6018 SoCs - Enable CPU clks on Qualcomm MSM8996 SoCs - GPU clk support for Qualcomm SM8150 and SM8250 SoCs - Audio clks on Qualcomm SC7180 SoCs - Make defines for bcm63xx-gate clks to use in DT - Support gate clks on BCM6318 SoCs - Add HDMI clks for BCM2711 SoCs - Support BCM2711 SoC firmware clks * clk-socfpga: clk: socfpga: agilex: mpu_l2ram_clk should be mpu_ccu_clk clk: socfpga: agilex: add nand_x_clk and nand_ecc_clk dt-bindings: agilex: add NAND_X_CLK and NAND_ECC_CLK * clk-doc: clk: Clean up kernel-doc errors clk: : drop a duplicated word clk: add function documentation for clk_hw_round_rate() * clk-qcom: (38 commits) dt-bindings: clock: Fix YAML schemas for LPASS clocks on SC7180 clk: qcom: gcc-sdm660: Fix up gcc_mss_mnoc_bimc_axi_clk clk: qcom: gcc-sdm660: Add missing modem reset clk: qcom: lpass: Add support for LPASS clock controller for SC7180 clk: qcom: gcc: Add support for GCC LPASS clock for SC7180 dt-bindings: clock: Add YAML schemas for LPASS clocks on SC7180 clk: qcom: gdsc: Add support to enable retention of GSDCR clk: qcom: Export gdsc_gx_do_nothing_enable() to modules clk: qcom: Add graphics clock controller driver for SM8250 clk: qcom: Add graphics clock controller driver for SM8150 clk: qcom: add common gdsc_gx_do_nothing_enable for gpucc drivers dt-bindings: clock: add SM8250 QCOM Graphics clock bindings dt-bindings: clock: add SM8150 QCOM Graphics clock bindings dt-bindings: clock: combine qcom,sdm845-gpucc and qcom,sc7180-gpucc clk: qcom: gcc: remove unnecessary vco_table from SM8150 clk: qcom: clk-alpha-pll: use the right PCAL_DONE value for lucid pll clk: qcom: clk-alpha-pll: same regs and ops for trion and lucid clk: qcom: clk-alpha-pll: remove unused/incorrect PLL_CAL_VAL clk: qcom: gcc: fix sm8150 GPU and NPU clocks dt-bindings: clock: Fix qcom,msm8996-apcc yaml syntax ... * clk-vc5: clk: vc5: use a dedicated struct to describe the output drivers dt-bindings: clk: versaclock5: convert to yaml MAINTAINERS: take over IDT VersaClock 5 clock driver dt-bindings: clk: versaclock5: fix 'idt' prefix typos clk: vc5: Add memory check to prevent oops clk: vc5: fix use of memory after it has been kfree'd clk: vc5: Enable addition output configurations of the Versaclock dt: Add additional option bindings for IDT VersaClock clk: vc5: Allow Versaclock driver to support multiple instances * clk-bcm: (44 commits) clk: bcm2835: Do not use prediv with bcm2711's PLLs dt-bindings: arm: bcm: Add a select to the RPI Firmware binding clk: bcm: dvp: Add missing module informations clk: bcm: rpi: Remove the quirks for the CPU clock clk: bcm2835: Don't cache the PLLB rate clk: bcm2835: Allow custom CCF flags for the PLLs Revert "clk: bcm2835: remove pllb" clk: bcm: rpi: Give firmware clocks a name clk: bcm: rpi: Discover the firmware clocks clk: bcm: rpi: Add an enum for the firmware clocks clk: bcm: rpi: Add DT provider for the clocks clk: bcm: rpi: Make the PLLB registration function return a clk_hw clk: bcm: rpi: Split pllb clock hooks clk: bcm: rpi: Rename is_prepared function clk: bcm: rpi: Pass the clocks data to the firmware function clk: bcm: rpi: Add clock id to data clk: bcm: rpi: Create a data structure for the clocks clk: bcm: rpi: Use CCF boundaries instead of rolling our own clk: bcm: rpi: Make sure the clkdev lookup is removed clk: bcm: rpi: Switch to clk_hw_register_clkdev ... commit 038ebb1a713d114d54dbf14868a73181c0c92758 Author: wenxu Date: Fri Jul 31 10:45:01 2020 +0800 net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct When openvswitch conntrack offload with act_ct action. Fragment packets defrag in the ingress tc act_ct action and miss the next chain. Then the packet pass to the openvswitch datapath without the mru. The over mtu packet will be dropped in output action in openvswitch for over mtu. "kernel: net2: dropped over-mtu packet: 1528 > 1500" This patch add mru in the tc_skb_ext for adefrag and miss next chain situation. And also add mru in the qdisc_skb_cb. The act_ct set the mru to the qdisc_skb_cb when the packet defrag. And When the chain miss, The mru is set to tc_skb_ext which can be got by ovs datapath. Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct") Signed-off-by: wenxu Reviewed-by: Cong Wang Signed-off-by: David S. Miller commit 530fe9d433b9e60251bb8fdc5dddecbc486a50ef Merge: bd0b33b24897b e4d5efdd0bc43 Author: David S. Miller Date: Mon Aug 3 15:01:02 2020 -0700 Merge branch 'Improve-MDIO-Ethernet-PHY-reset' Bruno Thomsen says: ==================== Improve MDIO Ethernet PHY reset This patch series is a result of trying to upstream a new device tree for a TQMa7D based board[1][2]. Initial this DTS used some deprecated PHY reset properties on the FEC device; NXP Ethernet MAC also known as Freescale Fast Ethernet Controller. When switching from FEC properties[3]: "phy-reset-gpios" "phy-reset-duration" "phy-reset-post-delay" To MDIO PHY properties[4]: "reset-gpios" "reset-assert-us" "reset-deassert-us" The result was that no Ethernet PHY device was detected on boot. This issue could be worked around by disabling PHY type ID auto- detection by using "ethernet-phy-id0022.1560" as compatible string and not "ethernet-phy-ieee802.3-c22". Upstreaming a DTS with this workaround was not accepted, so I digged into the MDIO reset flow and found that it had a few missing parts compared to the deprecated FEC reset function. After some more testing and logic analyzer traces it was revealed that the failed PHY communication was due to missing initial device reset. I was suggested[5] in a earlier mail thread to use MDIO bus reset as that was performed before auto-detection, but current device tree binding was limited to reset assert in usec. Microchip/Micrel Ethernet PHYs recommended reset circuit[8], figure 7-12, is a little "slow" after reset deassert as that is left to a RC circuit with a tau of ~100ms; using a 10k PU resistor together with a 10uF decoupling capacitor. The diode in serie of the reset signal converts the GPIO push-pull output into a open-drain output. So a post reset delay in the range of 500-1000ms is needed, depending on component tolerances and general hardware design margins. In the first version of this patch series[6] I reused the "reset-delay-us" property for reset deassert in usec as that would cause 50/50% duty-cycle, but that would always apply. The solution in this patch series is to add a new MDIO bus property, so post reset delay is optional and configured separately. MDIO bus properties[7]: "reset-delay-us" "reset-post-delay-us" (new) I have not marked this with "Fixes:" as no single commit is the cause and historically this code has only supported MDIO devices that need reset after auto-detection. The patch series also uses a new flexible sleep helper function that was introduced in 5.8-rc1, so the driver uses the optimal sleep function depending on value loaded from device tree. Future work in this area could add new properties on the MDIO device, so reset points are configurable, e.g. no reset, before/after auto-detection or both. [1] https://lore.kernel.org/linux-devicetree/20200629114927.17379-2-bruno.thomsen@gmail.com/ [2] https://lore.kernel.org/linux-devicetree/20200716172611.5349-2-bruno.thomsen@gmail.com/ [3] https://elixir.bootlin.com/linux/v5.7.8/source/Documentation/devicetree/bindings/net/fsl-fec.txt#L44 [4] https://elixir.bootlin.com/linux/v5.8-rc4/source/Documentation/devicetree/bindings/net/mdio.yaml#L78 [5] https://lore.kernel.org/netdev/CAOMZO5DtYDomD8FDCZDwYCSr2AwNT81Ay4==aDxXyBxtyvPiJA@mail.gmail.com/ [6] https://lore.kernel.org/netdev/20200728090203.17313-1-bruno.thomsen@gmail.com/ [7] https://elixir.bootlin.com/linux/v5.8-rc4/source/Documentation/devicetree/bindings/net/mdio.yaml#L36 [8] http://ww1.microchip.com/downloads/en/DeviceDoc/00002202C.pdf ==================== Signed-off-by: David S. Miller commit e4d5efdd0bc43c63c64021147175800a1d58114f Author: Bruno Thomsen Date: Thu Jul 30 21:57:49 2020 +0200 net: mdio device: use flexible sleeping in reset function MDIO device reset assert and deassert length was created by usleep_range() but that does not ensure optimal handling of all the different values from device tree properties. By switching to the new flexible sleeping helper function, fsleep(), the correct delay function is called depending on delay length, e.g. udelay(), usleep_range() or msleep(). Signed-off-by: Bruno Thomsen Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit bb3831294cd50750806f2ce8d73317dc8feeda09 Author: Bruno Thomsen Date: Thu Jul 30 21:57:48 2020 +0200 net: mdiobus: add reset-post-delay-us handling Load new "reset-post-delay-us" value from MDIO properties, and if configured to a greater then zero delay do a flexible sleeping delay after MDIO bus reset deassert. This allows devices to exit reset state before start bus communication. Signed-off-by: Bruno Thomsen Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 6259e0f5478d7a7e4ff3e38bc739b612b8907246 Author: Bruno Thomsen Date: Thu Jul 30 21:57:47 2020 +0200 net: mdiobus: use flexible sleeping for reset-delay-us MDIO bus reset pulse width is created by using udelay() and that function might not be optimal depending on device tree value. By switching to the new fsleep() helper the correct delay function is called depending on delay length, e.g. udelay(), usleep_range() or msleep(). Signed-off-by: Bruno Thomsen Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c44a1b91753e54a9e9381ac6411ec36389d21453 Author: Bruno Thomsen Date: Thu Jul 30 21:57:46 2020 +0200 dt-bindings: net: mdio: add reset-post-delay-us property Add "reset-post-delay-us" parameter to MDIO bus properties, so it's possible to add a delay after reset deassert. This is optional in case external hardware slows down release of the reset signal. Signed-off-by: Bruno Thomsen Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e4cbce4d131753eca271d9d67f58c6377f27ad21 Merge: b34133fec882d 949bcb8135a96 Author: Linus Torvalds Date: Mon Aug 3 14:58:38 2020 -0700 Merge tag 'sched-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: - Improve uclamp performance by using a static key for the fast path - Add the "sched_util_clamp_min_rt_default" sysctl, to optimize for better power efficiency of RT tasks on battery powered devices. (The default is to maximize performance & reduce RT latencies.) - Improve utime and stime tracking accuracy, which had a fixed boundary of error, which created larger and larger relative errors as the values become larger. This is now replaced with more precise arithmetics, using the new mul_u64_u64_div_u64() helper in math64.h. - Improve the deadline scheduler, such as making it capacity aware - Improve frequency-invariant scheduling - Misc cleanups in energy/power aware scheduling - Add sched_update_nr_running tracepoint to track changes to nr_running - Documentation additions and updates - Misc cleanups and smaller fixes * tag 'sched-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (54 commits) sched/doc: Factorize bits between sched-energy.rst & sched-capacity.rst sched/doc: Document capacity aware scheduling sched: Document arch_scale_*_capacity() arm, arm64: Fix selection of CONFIG_SCHED_THERMAL_PRESSURE Documentation/sysctl: Document uclamp sysctl knobs sched/uclamp: Add a new sysctl to control RT default boost value sched/uclamp: Fix a deadlock when enabling uclamp static key sched: Remove duplicated tick_nohz_full_enabled() check sched: Fix a typo in a comment sched/uclamp: Remove unnecessary mutex_init() arm, arm64: Select CONFIG_SCHED_THERMAL_PRESSURE sched: Cleanup SCHED_THERMAL_PRESSURE kconfig entry arch_topology, sched/core: Cleanup thermal pressure definition trace/events/sched.h: fix duplicated word linux/sched/mm.h: drop duplicated words in comments smp: Fix a potential usage of stale nr_cpus sched/fair: update_pick_idlest() Select group with lowest group_util when idle_cpus are equal sched: nohz: stop passing around unused "ticks" parameter. sched: Better document ttwu() sched: Add a tracepoint to track rq->nr_running ... commit b34133fec882d2717f2d61a2a010edd3422368c8 Merge: 9dee86896c596 d903b6d029d66 Author: Linus Torvalds Date: Mon Aug 3 14:51:09 2020 -0700 Merge tag 'perf-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf event updates from Ingo Molnar: "HW support updates: - Add uncore support for Intel Comet Lake - Add RAPL support for Hygon Fam18h - Add Intel "IIO stack to PMON mapping" support on Skylake-SP CPUs, which enumerates per device performance counters via sysfs and enables the perf stat --iiostat functionality - Add support for Intel "Architectural LBRs", which generalized the model specific LBR hardware tracing feature into a model-independent, architected performance monitoring feature. Usage is mostly seamless to tooling, as the pre-existing LBR features are kept, but there's a couple of advantages under the hood, such as faster context-switching, faster LBR reads, cleaner exposure of LBR features to guest kernels, etc. ( Since architectural LBRs are supported via XSAVE, there's related changes to the x86 FPU code as well. ) ftrace/perf updates: - Add support to add a text poke event to record changes to kernel text (i.e. self-modifying code) in order to support tracers like Intel PT decoding through jump labels, kprobes and ftrace trampolines. Misc cleanups, smaller fixes..." * tag 'perf-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (47 commits) perf/x86/rapl: Add Hygon Fam18h RAPL support kprobes: Remove unnecessary module_mutex locking from kprobe_optimizer() x86/perf: Fix a typo perf: : drop a duplicated word perf/x86/intel/lbr: Support XSAVES for arch LBR read perf/x86/intel/lbr: Support XSAVES/XRSTORS for LBR context switch x86/fpu/xstate: Add helpers for LBR dynamic supervisor feature x86/fpu/xstate: Support dynamic supervisor feature for LBR x86/fpu: Use proper mask to replace full instruction mask perf/x86: Remove task_ctx_size perf/x86/intel/lbr: Create kmem_cache for the LBR context data perf/core: Use kmem_cache to allocate the PMU specific data perf/core: Factor out functions to allocate/free the task_ctx_data perf/x86/intel/lbr: Support Architectural LBR perf/x86/intel/lbr: Factor out intel_pmu_store_lbr perf/x86/intel/lbr: Factor out rdlbr_all() and wrlbr_all() perf/x86/intel/lbr: Mark the {rd,wr}lbr_{to,from} wrappers __always_inline perf/x86/intel/lbr: Unify the stored format of LBR information perf/x86/intel/lbr: Support LBR_CTL perf/x86: Expose CPUID enumeration bits for arch LBR ... commit 9dee86896c5968a928e56828236af41c136bdfbd Merge: 9ba19ccd2d283 d832c0051f4e9 Author: Linus Torvalds Date: Mon Aug 3 14:45:33 2020 -0700 Merge tag 'objtool-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool updates from Ingo Molnar: - Add support for non-rela relocations, in preparation to merge 'recordmcount' functionality into objtool - Fix assumption that broke under --ffunction-sections (LTO) builds - Misc cleanups * tag 'objtool-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Add support for relocations without addends objtool: Rename rela to reloc objtool: Use sh_info to find the base for .rela sections objtool: Do not assume order of parent/child functions commit 9ba19ccd2d283a79dd29e8130819c59beca80f62 Merge: 8f0cb6660acb0 992414a18cd4d Author: Linus Torvalds Date: Mon Aug 3 14:39:35 2020 -0700 Merge tag 'locking-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: - LKMM updates: mostly documentation changes, but also some new litmus tests for atomic ops. - KCSAN updates: the most important change is that GCC 11 now has all fixes in place to support KCSAN, so GCC support can be enabled again. Also more annotations. - futex updates: minor cleanups and simplifications - seqlock updates: merge preparatory changes/cleanups for the 'associated locks' facilities. - lockdep updates: - simplify IRQ trace event handling - add various new debug checks - simplify header dependencies, split out , decouple lockdep from other low level headers some more - fix NMI handling - misc cleanups and smaller fixes * tag 'locking-core-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (60 commits) kcsan: Improve IRQ state trace reporting lockdep: Refactor IRQ trace events fields into struct seqlock: lockdep assert non-preemptibility on seqcount_t write lockdep: Add preemption enabled/disabled assertion APIs seqlock: Implement raw_seqcount_begin() in terms of raw_read_seqcount() seqlock: Add kernel-doc for seqcount_t and seqlock_t APIs seqlock: Reorder seqcount_t and seqlock_t API definitions seqlock: seqcount_t latch: End read sections with read_seqcount_retry() seqlock: Properly format kernel-doc code samples Documentation: locking: Describe seqlock design and usage locking/qspinlock: Do not include atomic.h from qspinlock_types.h locking/atomic: Move ATOMIC_INIT into linux/types.h lockdep: Move list.h inclusion into lockdep.h locking/lockdep: Fix TRACE_IRQFLAGS vs. NMIs futex: Remove unused or redundant includes futex: Consistently use fshared as boolean futex: Remove needless goto's futex: Remove put_futex_key() rwsem: fix commas in initialisation docs: locking: Replace HTTP links with HTTPS ones ... commit 21594c44083c375697d418729c4b2e4522cf9f70 Author: Dmitry Yakunin Date: Mon Aug 3 12:05:45 2020 +0300 bpf: Allow to specify ifindex for skb in bpf_prog_test_run_skb Now skb->dev is unconditionally set to the loopback device in current net namespace. But if we want to test bpf program which contains code branch based on ifindex condition (eg filters out localhost packets) it is useful to allow specifying of ifindex from userspace. This patch adds such option through ctx_in (__sk_buff) parameter. Signed-off-by: Dmitry Yakunin Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200803090545.82046-3-zeil@yandex-team.ru commit fa5cb548ced61b9d3095f32f8a7e427a248c65ee Author: Dmitry Yakunin Date: Mon Aug 3 12:05:44 2020 +0300 bpf: Setup socket family and addresses in bpf_prog_test_run_skb Now it's impossible to test all branches of cgroup_skb bpf program which accesses skb->family and skb->{local,remote}_ip{4,6} fields because they are zeroed during socket allocation. This commit fills socket family and addresses from related fields in constructed skb. Signed-off-by: Dmitry Yakunin Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200803090545.82046-2-zeil@yandex-team.ru commit 8f0cb6660acb0d4756df880a3e60e73daa9c244e Merge: 5ece08178d656 c1cc4784ce6e8 Author: Linus Torvalds Date: Mon Aug 3 14:31:33 2020 -0700 Merge tag 'core-rcu-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: - kfree_rcu updates - RCU tasks updates - Read-side scalability tests - SRCU updates - Torture-test updates - Documentation updates - Miscellaneous fixes * tag 'core-rcu-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (109 commits) torture: Remove obsolete "cd $KVM" torture: Avoid duplicate specification of qemu command torture: Dump ftrace at shutdown only if requested torture: Add kvm-tranform.sh script for qemu-cmd files torture: Add more tracing crib notes to kvm.sh torture: Improve diagnostic for KCSAN-incapable compilers torture: Correctly summarize build-only runs torture: Pass --kmake-arg to all make invocations rcutorture: Check for unwatched readers torture: Abstract out console-log error detection torture: Add a stop-run capability torture: Create qemu-cmd in --buildonly runs rcu/rcutorture: Replace 0 with false torture: Add --allcpus argument to the kvm.sh script torture: Remove whitespace from identify_qemu_vcpus output rcutorture: NULL rcu_torture_current earlier in cleanup code rcutorture: Handle non-statistic bang-string error messages torture: Set configfile variable to current scenario rcutorture: Add races with task-exit processing locktorture: Use true and false to assign to bool variables ... commit f34e4651ce66a754f41203284acf09b28b9dd955 Author: Nicolas Saenz Julienne Date: Thu Jul 30 20:26:19 2020 +0200 clk: bcm2835: Do not use prediv with bcm2711's PLLs Contrary to previous SoCs, bcm2711 doesn't have a prescaler in the PLL feedback loop. Bypass it by zeroing fb_prediv_mask when running on bcm2711. Note that, since the prediv configuration bits were re-purposed, this was triggering miscalculations on all clocks hanging from the VPU clock, notably the aux UART, making its output unintelligible. Fixes: 42de9ad400af ("clk: bcm2835: Add BCM2711_CLOCK_EMMC2 support") Reported-by: Nathan Chancellor Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200730182619.23246-1-nsaenzjulienne@suse.de Tested-by: Nathan Chancellor Reviewed-by: Florian Fainelli Signed-off-by: Stephen Boyd commit 5ece08178d6567db5ef0090b1ae7f795c3c36161 Merge: c8e69391d046a d19e789f068b3 Author: Linus Torvalds Date: Mon Aug 3 14:25:40 2020 -0700 Merge tag 'core-headers-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull header cleanup from Ingo Molnar: "Separate out the instrumentation_begin()/end() bits from compiler.h" * tag 'core-headers-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: compiler.h: Move instrumentation_begin()/end() to new header commit c8e69391d046a6acaa6a4cf72f9952ecd77d3085 Merge: 3b4b84b2ea993 0f85c48051847 Author: Linus Torvalds Date: Mon Aug 3 14:24:18 2020 -0700 Merge tag 'core-debugobjects-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull debugobjects cleanup from Ingo Molnar: "A single commit which simplifies a debugfs attribute definition" * tag 'core-debugobjects-2020-08-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: debugobjects: Convert to DEFINE_SHOW_ATTRIBUTE commit 3b4b84b2ea9938e44fffa356c7b95f496b4246ab Merge: 145ff1ec090dc aa251fc5b936d Author: Linus Torvalds Date: Mon Aug 3 14:21:52 2020 -0700 Merge tag 'irq-urgent-2020-08-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "Fix a recent IRQ affinities regression, add in a missing debugfs printout that helps the debugging of IRQ affinity logic bugs, and fix a memory leak" * tag 'irq-urgent-2020-08-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: genirq/debugfs: Add missing irqchip flags genirq/affinity: Make affinity setting if activated opt-in irqdomain/treewide: Free firmware node after domain removal commit 145ff1ec090dce9beb5a9590b5dc288e7bb2e65d Merge: 8c4e1c027ae63 0e4cd9f265491 Author: Linus Torvalds Date: Mon Aug 3 14:11:08 2020 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 and cross-arch updates from Catalin Marinas: "Here's a slightly wider-spread set of updates for 5.9. Going outside the usual arch/arm64/ area is the removal of read_barrier_depends() series from Will and the MSI/IOMMU ID translation series from Lorenzo. The notable arm64 updates include ARMv8.4 TLBI range operations and translation level hint, time namespace support, and perf. Summary: - Removal of the tremendously unpopular read_barrier_depends() barrier, which is a NOP on all architectures apart from Alpha, in favour of allowing architectures to override READ_ONCE() and do whatever dance they need to do to ensure address dependencies provide LOAD -> LOAD/STORE ordering. This work also offers a potential solution if compilers are shown to convert LOAD -> LOAD address dependencies into control dependencies (e.g. under LTO), as weakly ordered architectures will effectively be able to upgrade READ_ONCE() to smp_load_acquire(). The latter case is not used yet, but will be discussed further at LPC. - Make the MSI/IOMMU input/output ID translation PCI agnostic, augment the MSI/IOMMU ACPI/OF ID mapping APIs to accept an input ID bus-specific parameter and apply the resulting changes to the device ID space provided by the Freescale FSL bus. - arm64 support for TLBI range operations and translation table level hints (part of the ARMv8.4 architecture version). - Time namespace support for arm64. - Export the virtual and physical address sizes in vmcoreinfo for makedumpfile and crash utilities. - CPU feature handling cleanups and checks for programmer errors (overlapping bit-fields). - ACPI updates for arm64: disallow AML accesses to EFI code regions and kernel memory. - perf updates for arm64. - Miscellaneous fixes and cleanups, most notably PLT counting optimisation for module loading, recordmcount fix to ignore relocations other than R_AARCH64_CALL26, CMA areas reserved for gigantic pages on 16K and 64K configurations. - Trivial typos, duplicate words" Link: http://lkml.kernel.org/r/20200710165203.31284-1-will@kernel.org Link: http://lkml.kernel.org/r/20200619082013.13661-1-lorenzo.pieralisi@arm.com * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (82 commits) arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack arm64/mm: save memory access in check_and_switch_context() fast switch path arm64: sigcontext.h: delete duplicated word arm64: ptrace.h: delete duplicated word arm64: pgtable-hwdef.h: delete duplicated words bus: fsl-mc: Add ACPI support for fsl-mc bus/fsl-mc: Refactor the MSI domain creation in the DPRC driver of/irq: Make of_msi_map_rid() PCI bus agnostic of/irq: make of_msi_map_get_device_domain() bus agnostic dt-bindings: arm: fsl: Add msi-map device-tree binding for fsl-mc bus of/device: Add input id to of_dma_configure() of/iommu: Make of_map_rid() PCI agnostic ACPI/IORT: Add an input ID to acpi_dma_configure() ACPI/IORT: Remove useless PCI bus walk ACPI/IORT: Make iort_msi_map_rid() PCI agnostic ACPI/IORT: Make iort_get_device_domain IRQ domain agnostic ACPI/IORT: Make iort_match_node_callback walk the ACPI namespace for NC arm64: enable time namespace support arm64/vdso: Restrict splitting VVAR VMA arm64/vdso: Handle faults on timens page ... commit 8c4e1c027ae63c67c523d695e4e8565ff78af1ba Merge: 05119217a9bd1 382f429bb559f Author: Linus Torvalds Date: Mon Aug 3 14:05:50 2020 -0700 Merge tag 'm68k-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - several Kbuild improvements - several Mac fixes - minor cleanups and fixes - defconfig updates * tag 'm68k-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: defconfig: Update defconfigs for v5.8-rc3 m68k: Use CLEAN_FILES to clean up files m68k: mac: Improve IOP debug messages m68k: mac: Don't send uninitialized data in IOP message reply m68k: mac: Fix IOP status/control register writes m68k: mac: Don't send IOP message until channel is idle m68k: atari: Annotate dummy read in ROM port IO code as __maybe_unused m68k: Use sizeof_field() helper m68k: Pass -D options to KBUILD_CPPFLAGS instead of KBUILD_{A,C}FLAGS m68k: Optimize cc-option calls for cpuflags-y m68k: sun3: Descend to prom from arch/m68k/sun3 m68k: Add arch/m68k/Kbuild commit 05119217a9bd199c4b8b12c01f86df09108b109b Merge: 45365a06aa305 3346dd99fb4cd Author: Linus Torvalds Date: Mon Aug 3 14:00:16 2020 -0700 Merge tag 'rm-unicore32' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux Pull unicore32 removal from Mike Rapoport: "Remove unicore32 support. The unicore32 port do not seem maintained for a long time now, there is no upstream toolchain that can create unicore32 binaries and all the links to prebuilt toolchains for unicore32 are dead. Even compilers that were available are not supported by the kernel anymore. Guenter Roeck says: "I have stopped building unicore32 images since v4.19 since there is no available compiler that is still supported by the kernel. I am surprised that support for it has not been removed from the kernel" However, it's worth pointing out two things: - Guan Xuetao is still listed as maintainer and asked for the port to be kept around the last time Arnd suggested removing it two years ago. He promised that there would be compiler sources (presumably llvm), but has not made those available since. - https://github.com/gxt has patches to linux-4.9 and qemu-2.7, both released in 2016, with patches dated early 2019. These patches mainly restore a syscall ABI that was never part of mainline Linux but apparently used in production. qemu-2.8 removed support for that ABI and newer kernels (4.19+) can no longer be built with the old toolchain, so apparently there will not be any future updates to that git tree" * tag 'rm-unicore32' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux: MAINTAINERS: remove "PKUNITY SOC DRIVERS" entry rtc: remove fb-puv3 driver video: fbdev: remove fb-puv3 driver pwm: remove pwm-puv3 driver input: i8042: remove support for 8042-unicore32io i2c/buses: remove i2c-puv3 driver cpufreq: remove unicore32 driver arch: remove unicore32 port commit 45365a06aa305c9eca1cbf48aef48a7a0cea3b4e Merge: cdc8fcb49905c 9a996c67a65d9 Author: Linus Torvalds Date: Mon Aug 3 13:58:10 2020 -0700 Merge tag 's390-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Heiko Carstens: - Add support for function error injection. - Add support for custom exception handlers, as required by BPF_PROBE_MEM. - Add support for BPF_PROBE_MEM. - Add trace events for idle enter / exit for the s390 specific idle implementation. - Remove unused zcore memmmap device. - Remove unused "raw view" from s390 debug feature. - AP bus + zcrypt device driver code refactoring. - Provide cex4 cca sysfs attributes for cex3 for zcrypt device driver. - Expose only minimal interface to walk physmem for mm/memblock. This is a common code change and it has been agreed on with Mike Rapoport and Andrew Morton that this can go upstream via the s390 tree. - Rework of the s390 vmem/vmmemap code to allow for future memory hot remove. - Get rid of FORCE_MAX_ZONEORDER to finally allow for order-10 allocations again, instead of only order-8 allocations. - Various small improvements and fixes. * tag 's390-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (48 commits) s390/vmemmap: coding style updates s390/vmemmap: avoid memset(PAGE_UNUSED) when adding consecutive sections s390/vmemmap: remember unused sub-pmd ranges s390/vmemmap: fallback to PTEs if mapping large PMD fails s390/vmem: cleanup empty page tables s390/vmemmap: take the vmem_mutex when populating/freeing s390/vmemmap: cleanup when vmemmap_populate() fails s390/vmemmap: extend modify_pagetable() to handle vmemmap s390/vmem: consolidate vmem_add_range() and vmem_remove_range() s390/vmem: rename vmem_add_mem() to vmem_add_range() s390: enable HAVE_FUNCTION_ERROR_INJECTION s390/pci: clarify comment in s390_mmio_read/write s390/time: improve comparison for tod steering s390/time: select CLOCKSOURCE_VALIDATE_LAST_CYCLE s390/time: use CLOCKSOURCE_MASK s390/bpf: implement BPF_PROBE_MEM s390/kernel: expand exception table logic to allow new handling options s390/kernel: unify EX_TABLE* implementations s390/mm: allow order 10 allocations s390/mm: avoid trimming to MAX_ORDER ... commit 6cfde88418fe95240e32d2955b51988360ee0942 Author: Julia Lawall Date: Sat Aug 1 10:53:42 2020 +0200 clk: drop unused function __clk_get_flags The function __clk_get_flags has not been used since the April 2019 commit a348f05361c9 ("ARM: omap2+: hwmod: drop CLK_IS_BASIC flag usage"). Other uses were removed in June 2015, eg by commit 98d8a60eccee ("clk: Convert __clk_get_flags() to clk_hw_get_flags()"), which shows how clk_hw_get_flags can easily be used instead. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1596272022-14173-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Stephen Boyd commit bd8548d0dcdab514e08e35a3451667486d879dae Author: Geert Uytterhoeven Date: Mon Aug 3 10:48:35 2020 +0200 clk: hsdk: Fix bad dependency on IOMEM CONFIG_IOMEM does not exist. The correct symbol to depend on is CONFIG_HAS_IOMEM. Fixes: 1e7468bd9d30a21e ("clk: Specify IOMEM dependency for HSDK pll driver") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200803084835.21838-1-geert+renesas@glider.be Signed-off-by: Stephen Boyd commit ba857b212210df018adb5885656c9e890062f883 Merge: b545b9c393cb4 1e7468bd9d30a Author: Stephen Boyd Date: Mon Aug 3 13:52:05 2020 -0700 Merge branch 'clk-fixes' into clk-kconfig Need to merge this up to get the IOMEM dependency patch on top that is broken and fixed in the next commit. * clk-fixes: clk: Specify IOMEM dependency for HSDK pll driver clk: AST2600: Add mux for EMMC clock clk: mvebu: ARMADA_AP_CPU_CLK needs to select ARMADA_AP_CP_HELPER commit c58b46cba71750c6e969625abb1cf3ddabb15e06 Author: Masami Hiramatsu Date: Thu Jul 16 01:00:47 2020 +0900 Documentation: bootconfig: Add bootconfig override operator Add a sentence about bootconfig override operator (":=") to bootconfig.rst. Link: https://lkml.kernel.org/r/159482884682.126704.7198860675721719878.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 81464192839de0b5bc84c5739381101e04d94f62 Author: Masami Hiramatsu Date: Thu Jul 16 01:00:38 2020 +0900 tools/bootconfig: Add testcases for value override operator Add some testcases and examples for value override operator. Link: https://lkml.kernel.org/r/159482883824.126704.2166030493721357163.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit a2de2f86ae3831736dc906f9559b600f186403fe Author: Masami Hiramatsu Date: Thu Jul 16 01:00:29 2020 +0900 lib/bootconfig: Add override operator support Add the value override operator (":=") support to the bootconfig. This value override operator will be useful for the bootloaders which will only update the existing bootconfig according to the bootloader boot options. Without this override operator, the bootloader needs to parse the existing bootconfig and update it. However, with this assignment, it can just append the updated (partial) bootconfig text at the tail of existing one without parsing it. (Of course, it must update the size, checksum and magic, but that will be done easily) Link: https://lkml.kernel.org/r/159482882954.126704.16209517125614438640.stgit@devnote2 Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 80a6e707dd9742390776a9306b400b1fbe405b4a Author: Masami Hiramatsu Date: Fri Jul 17 17:42:55 2020 +0900 kprobes: Remove show_registers() function prototype Remove show_registers() function prototype because this function has been renamed by commit 57da8b960b9a ("x86: Avoid double stack traces with show_regs()"), and commit 80006dbee674 ("kprobes/x86: Remove jprobe implementation") has removed the caller in kprobes. So this doesn't exist anymore. Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 231621d0c570765d5cebd95c582f1c8df5c46028 Author: Peng Fan Date: Fri Jul 24 11:24:24 2020 +0800 tracing/uprobe: Remove dead code in trace_uprobe_register() In the function trace_uprobe_register(), the statement "return 0;" out of switch case is dead code, remove it. Link: https://lkml.kernel.org/r/1595561064-29186-1-git-send-email-fanpeng@loongson.cn Signed-off-by: Peng Fan Signed-off-by: Steven Rostedt (VMware) commit 0cb2f1372baa60af8456388a574af6133edd7d80 Author: Muchun Song Date: Tue Jul 28 14:45:36 2020 +0800 kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler We found a case of kernel panic on our server. The stack trace is as follows(omit some irrelevant information): BUG: kernel NULL pointer dereference, address: 0000000000000080 RIP: 0010:kprobe_ftrace_handler+0x5e/0xe0 RSP: 0018:ffffb512c6550998 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff8e9d16eea018 RCX: 0000000000000000 RDX: ffffffffbe1179c0 RSI: ffffffffc0535564 RDI: ffffffffc0534ec0 RBP: ffffffffc0534ec1 R08: ffff8e9d1bbb0f00 R09: 0000000000000004 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff8e9d1f797060 R14: 000000000000bacc R15: ffff8e9ce13eca00 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000080 CR3: 00000008453d0005 CR4: 00000000003606e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ftrace_ops_assist_func+0x56/0xe0 ftrace_call+0x5/0x34 tcpa_statistic_send+0x5/0x130 [ttcp_engine] The tcpa_statistic_send is the function being kprobed. After analysis, the root cause is that the fourth parameter regs of kprobe_ftrace_handler is NULL. Why regs is NULL? We use the crash tool to analyze the kdump. crash> dis tcpa_statistic_send -r : callq 0xffffffffbd8018c0 The tcpa_statistic_send calls ftrace_caller instead of ftrace_regs_caller. So it is reasonable that the fourth parameter regs of kprobe_ftrace_handler is NULL. In theory, we should call the ftrace_regs_caller instead of the ftrace_caller. After in-depth analysis, we found a reproducible path. Writing a simple kernel module which starts a periodic timer. The timer's handler is named 'kprobe_test_timer_handler'. The module name is kprobe_test.ko. 1) insmod kprobe_test.ko 2) bpftrace -e 'kretprobe:kprobe_test_timer_handler {}' 3) echo 0 > /proc/sys/kernel/ftrace_enabled 4) rmmod kprobe_test 5) stop step 2) kprobe 6) insmod kprobe_test.ko 7) bpftrace -e 'kretprobe:kprobe_test_timer_handler {}' We mark the kprobe as GONE but not disarm the kprobe in the step 4). The step 5) also do not disarm the kprobe when unregister kprobe. So we do not remove the ip from the filter. In this case, when the module loads again in the step 6), we will replace the code to ftrace_caller via the ftrace_module_enable(). When we register kprobe again, we will not replace ftrace_caller to ftrace_regs_caller because the ftrace is disabled in the step 3). So the step 7) will trigger kernel panic. Fix this problem by disarming the kprobe when the module is going away. Link: https://lkml.kernel.org/r/20200728064536.24405-1-songmuchun@bytedance.com Cc: stable@vger.kernel.org Fixes: ae6aa16fdc16 ("kprobes: introduce ftrace based optimization") Acked-by: Masami Hiramatsu Signed-off-by: Muchun Song Co-developed-by: Chengming Zhou Signed-off-by: Chengming Zhou Signed-off-by: Steven Rostedt (VMware) commit c58b6b0372de0d4cd0536d6585addd1b36b151ae Author: Josef Bacik Date: Fri Jul 24 20:50:48 2020 -0400 ftrace: Fix ftrace_trace_task return value I was attempting to use pid filtering with function_graph, but it wasn't allowing anything to make it through. Turns out ftrace_trace_task returns false if ftrace_ignore_pid is not-empty, which isn't correct anymore. We're now setting it to FTRACE_PID_IGNORE if we need to ignore that pid, otherwise it's set to the pid (which is weird considering the name) or to FTRACE_PID_TRACE. Fix the check to check for != FTRACE_PID_IGNORE. With this we can now use function_graph with pid filtering. Link: https://lkml.kernel.org/r/20200725005048.1790-1-josef@toxicpanda.com Fixes: 717e3f5ebc82 ("ftrace: Make function trace pid filtering a bit more exact") Signed-off-by: Josef Bacik Signed-off-by: Steven Rostedt (VMware) commit 24b6842ade6925199e182988259761504aacfbc0 Author: Michael S. Tsirkin Date: Wed Jun 24 19:17:04 2020 -0400 virtio: virtio_has_iommu_quirk -> virtio_has_dma_quirk Now that the corresponding feature bit has been renamed, rename the quirk too - it's about special ways to do DMA, not necessarily about the IOMMU. Signed-off-by: Michael S. Tsirkin commit 321bd212619a7269308696e4ddc446930ea73fad Author: Michael S. Tsirkin Date: Wed Jun 24 18:24:33 2020 -0400 virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORM Rename the bit to match latest virtio spec. Add a compat macro to avoid breaking existing userspace. Signed-off-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand commit cdc8fcb49905c0b67e355e027cb462ee168ffaa3 Merge: 382625d0d4325 fa15bafb71fd7 Author: Linus Torvalds Date: Mon Aug 3 13:01:22 2020 -0700 Merge tag 'for-5.9/io_uring-20200802' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: "Lots of cleanups in here, hardening the code and/or making it easier to read and fixing bugs, but a core feature/change too adding support for real async buffered reads. With the latter in place, we just need buffered write async support and we're done relying on kthreads for the fast path. In detail: - Cleanup how memory accounting is done on ring setup/free (Bijan) - sq array offset calculation fixup (Dmitry) - Consistently handle blocking off O_DIRECT submission path (me) - Support proper async buffered reads, instead of relying on kthread offload for that. This uses the page waitqueue to drive retries from task_work, like we handle poll based retry. (me) - IO completion optimizations (me) - Fix race with accounting and ring fd install (me) - Support EPOLLEXCLUSIVE (Jiufei) - Get rid of the io_kiocb unionizing, made possible by shrinking other bits (Pavel) - Completion side cleanups (Pavel) - Cleanup REQ_F_ flags handling, and kill off many of them (Pavel) - Request environment grabbing cleanups (Pavel) - File and socket read/write cleanups (Pavel) - Improve kiocb_set_rw_flags() (Pavel) - Tons of fixes and cleanups (Pavel) - IORING_SQ_NEED_WAKEUP clear fix (Xiaoguang)" * tag 'for-5.9/io_uring-20200802' of git://git.kernel.dk/linux-block: (127 commits) io_uring: flip if handling after io_setup_async_rw fs: optimise kiocb_set_rw_flags() io_uring: don't touch 'ctx' after installing file descriptor io_uring: get rid of atomic FAA for cq_timeouts io_uring: consolidate *_check_overflow accounting io_uring: fix stalled deferred requests io_uring: fix racy overflow count reporting io_uring: deduplicate __io_complete_rw() io_uring: de-unionise io_kiocb io-wq: update hash bits io_uring: fix missing io_queue_linked_timeout() io_uring: mark ->work uninitialised after cleanup io_uring: deduplicate io_grab_files() calls io_uring: don't do opcode prep twice io_uring: clear IORING_SQ_NEED_WAKEUP after executing task works io_uring: batch put_task_struct() tasks: add put_task_struct_many() io_uring: return locked and pinned page accounting io_uring: don't miscount pinned memory io_uring: don't open-code recv kbuf managment ... commit 382625d0d4325fb14a29444eb8dce8dcc2eb9b51 Merge: 99f6cf61f175c d958e343bdc3d Author: Linus Torvalds Date: Mon Aug 3 11:57:03 2020 -0700 Merge tag 'for-5.9/block-20200802' of git://git.kernel.dk/linux-block Pull core block updates from Jens Axboe: "Good amount of cleanups and tech debt removals in here, and as a result, the diffstat shows a nice net reduction in code. - Softirq completion cleanups (Christoph) - Stop using ->queuedata (Christoph) - Cleanup bd claiming (Christoph) - Use check_events, moving away from the legacy media change (Christoph) - Use inode i_blkbits consistently (Christoph) - Remove old unused writeback congestion bits (Christoph) - Cleanup/unify submission path (Christoph) - Use bio_uninit consistently, instead of bio_disassociate_blkg (Christoph) - sbitmap cleared bits handling (John) - Request merging blktrace event addition (Jan) - sysfs add/remove race fixes (Luis) - blk-mq tag fixes/optimizations (Ming) - Duplicate words in comments (Randy) - Flush deferral cleanup (Yufen) - IO context locking/retry fixes (John) - struct_size() usage (Gustavo) - blk-iocost fixes (Chengming) - blk-cgroup IO stats fixes (Boris) - Various little fixes" * tag 'for-5.9/block-20200802' of git://git.kernel.dk/linux-block: (135 commits) block: blk-timeout: delete duplicated word block: blk-mq-sched: delete duplicated word block: blk-mq: delete duplicated word block: genhd: delete duplicated words block: elevator: delete duplicated word and fix typos block: bio: delete duplicated words block: bfq-iosched: fix duplicated word iocost_monitor: start from the oldest usage index iocost: Fix check condition of iocg abs_vdebt block: Remove callback typedefs for blk_mq_ops block: Use non _rcu version of list functions for tag_set_list blk-cgroup: show global disk stats in root cgroup io.stat blk-cgroup: make iostat functions visible to stat printing block: improve discard bio alignment in __blkdev_issue_discard() block: change REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL to be odd numbers block: defer flush request no matter whether we have elevator block: make blk_timeout_init() static block: remove retry loop in ioc_release_fn() block: remove unnecessary ioc nested locking block: integrate bd_start_claiming into __blkdev_get ... commit 99f6cf61f175c1239ed8e86d4a1757c380da52d1 Merge: f9bf352224d7d f7e6b19bc7647 Author: Linus Torvalds Date: Mon Aug 3 11:46:22 2020 -0700 Merge branch 'mtd/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd fix from Richard Weinberger. * 'mtd/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: properly check all write ioctls for permissions commit 9f1048d47e8ae4cc21e80facf2ba4b01a6623b67 Author: Dan Williams Date: Fri Jul 31 18:38:26 2020 -0700 ACPI: NFIT: Fix ARS zero-sized allocation Pending commit in -next "devres: handle zero size in devm_kmalloc()" triggers a boot regression due to the ARS implementation expecting NULL from a zero-sized allocation. Avoid the zero-sized allocation by skipping ARS, otherwise crashes with the following signature when de-referencing ZERO_SIZE_PTR. BUG: kernel NULL pointer dereference, address: 0000000000000018 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page RIP: 0010:__acpi_nfit_scrub+0x28a/0x350 [nfit] [..] Call Trace: ? acpi_nfit_query_poison+0x6a/0x180 [nfit] acpi_nfit_scrub+0x36/0xb0 [nfit] process_one_work+0x23c/0x580 worker_thread+0x50/0x3b0 Otherwise the implementation correctly aborts when NULL is returned from devm_kzalloc() in ars_status_alloc(). Link: https://lore.kernel.org/r/159624590643.3037264.14157533719042907758.stgit@dwillia2-desk3.amr.corp.intel.com Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit f9bf352224d7d4612b55b8d0cd0eaa981a3246cf Author: Linus Torvalds Date: Sun Aug 2 10:42:31 2020 -0700 userfaultfd: simplify fault handling Instead of waiting in a loop for the userfaultfd condition to become true, just wait once and return VM_FAULT_RETRY. We've already dropped the mmap lock, we know we can't really successfully handle the fault at this point and the caller will have to retry anyway. So there's no point in making the wait any more complicated than it needs to be - just schedule away. And once you don't have that complexity with explicit looping, you can also just lose all the 'userfaultfd_signal_pending()' complexity, because once we've set the correct process sleeping state, and don't loop, the act of scheduling itself will be checking if there are any pending signals before going to sleep. We can also drop the VM_FAULT_MAJOR games, since we'll be treating all retried faults as major soon anyway (series to regularize and share more of fault handling across architectures in a separate series by Peter Xu, and in the meantime we won't worry about the possible minor - I'll be here all week, try the veal - accounting difference). Cc: Andrea Arcangeli Cc: Peter Xu Signed-off-by: Linus Torvalds commit e3914ed6cf44bfe1f169e26241f8314556fd1ac1 Author: Tom Rix Date: Sun Aug 2 07:23:39 2020 -0700 ieee802154/adf7242: check status of adf7242_read_reg Clang static analysis reports this error adf7242.c:887:6: warning: Assigned value is garbage or undefined len = len_u8; ^ ~~~~~~ len_u8 is set in adf7242_read_reg(lp, 0, &len_u8); When this call fails, len_u8 is not set. So check the return code. Fixes: 7302b9d90117 ("ieee802154/adf7242: Driver for ADF7242 MAC IEEE802154") Signed-off-by: Tom Rix Acked-by: Michael Hennerich Link: https://lore.kernel.org/r/20200802142339.21091-1-trix@redhat.com Signed-off-by: Stefan Schmidt commit f3633c2683545213de4a00a9b0c3fba741321fb2 Merge: ff2bd9ff11521 23a60f834406c Author: Paolo Bonzini Date: Mon Aug 3 14:19:13 2020 -0400 Merge tag 'kvm-s390-next-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into kvm-next-5.6 KVM: s390: Enhancement for 5.9 - implement diagnose 318 commit 3208167a865e862fff5045d7910387941ff7e114 Merge: ab5c60b79ab6c 5ef1596813096 Author: Linus Torvalds Date: Mon Aug 3 10:46:41 2020 -0700 Merge tag 'filelock-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking fix from Jeff Layton: "Just a single, one-line patch to fix an inefficiency in the posix locking code that can lead to it doing more wakeups than necessary" * tag 'filelock-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: locks: add locks_move_blocks in posix_lock_inode commit ab5c60b79ab6cc50b39bbb21b2f9fb55af900b84 Merge: 5577416c39652 3cbfe80737c18 Author: Linus Torvalds Date: Mon Aug 3 10:40:14 2020 -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: - Add support for allocating transforms on a specific NUMA Node - Introduce the flag CRYPTO_ALG_ALLOCATES_MEMORY for storage users Algorithms: - Drop PMULL based ghash on arm64 - Fixes for building with clang on x86 - Add sha256 helper that does the digest in one go - Add SP800-56A rev 3 validation checks to dh Drivers: - Permit users to specify NUMA node in hisilicon/zip - Add support for i.MX6 in imx-rngc - Add sa2ul crypto driver - Add BA431 hwrng driver - Add Ingenic JZ4780 and X1000 hwrng driver - Spread IRQ affinity in inside-secure and marvell/cesa" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (157 commits) crypto: sa2ul - Fix inconsistent IS_ERR and PTR_ERR hwrng: core - remove redundant initialization of variable ret crypto: x86/curve25519 - Remove unused carry variables crypto: ingenic - Add hardware RNG for Ingenic JZ4780 and X1000 dt-bindings: RNG: Add Ingenic RNG bindings. crypto: caam/qi2 - add module alias crypto: caam - add more RNG hw error codes crypto: caam/jr - remove incorrect reference to caam_jr_register() crypto: caam - silence .setkey in case of bad key length crypto: caam/qi2 - create ahash shared descriptors only once crypto: caam/qi2 - fix error reporting for caam_hash_alloc crypto: caam - remove deadcode on 32-bit platforms crypto: ccp - use generic power management crypto: xts - Replace memcpy() invocation with simple assignment crypto: marvell/cesa - irq balance crypto: inside-secure - irq balance crypto: ecc - SP800-56A rev 3 local public key validation crypto: dh - SP800-56A rev 3 local public key validation crypto: dh - check validity of Z before export lib/mpi: Add mpi_sub_ui() ... commit 1c39d761ff5c90227fc582c45018d5922efaa253 Author: Nick Desaulniers Date: Thu Jul 30 15:45:55 2020 -0700 tracepoint: Use __used attribute definitions from compiler_attributes.h Just a small cleanup while I was touching this header. compiler_attributes.h does feature detection of these __attributes__(()) and provides more concise ways to invoke them. Link: https://lkml.kernel.org/r/20200730224555.2142154-3-ndesaulniers@google.com Acked-by: Miguel Ojeda Signed-off-by: Nick Desaulniers Signed-off-by: Steven Rostedt (VMware) commit f3751ad0116fb6881f2c3c957d66a9327f69cefb Author: Nick Desaulniers Date: Thu Jul 30 15:45:54 2020 -0700 tracepoint: Mark __tracepoint_string's __used __tracepoint_string's have their string data stored in .rodata, and an address to that data stored in the "__tracepoint_str" section. Functions that refer to those strings refer to the symbol of the address. Compiler optimization can replace those address references with references directly to the string data. If the address doesn't appear to have other uses, then it appears dead to the compiler and is removed. This can break the /tracing/printk_formats sysfs node which iterates the addresses stored in the "__tracepoint_str" section. Like other strings stored in custom sections in this header, mark these __used to inform the compiler that there are other non-obvious users of the address, so they should still be emitted. Link: https://lkml.kernel.org/r/20200730224555.2142154-2-ndesaulniers@google.com Cc: Ingo Molnar Cc: Miguel Ojeda Cc: stable@vger.kernel.org Fixes: 102c9323c35a8 ("tracing: Add __tracepoint_string() to export string pointers") Reported-by: Tim Murray Reported-by: Simon MacMullen Suggested-by: Greg Hackmann Signed-off-by: Nick Desaulniers Signed-off-by: Steven Rostedt (VMware) commit 1f0b067b6e4927f06f5ffaea8eccdf722e563819 Author: Chao Yu Date: Wed Jul 29 21:21:36 2020 +0800 f2fs: compress: disable compression mount option if compression is off If CONFIG_F2FS_FS_COMPRESSION is off, don't allow to configure or show compression related mount option. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a86d27dd3dbed4d870c6582b8d4bf1fd0f653914 Author: Chao Yu Date: Wed Jul 29 21:21:35 2020 +0800 f2fs: compress: add sanity check during compressed cluster read In f2fs_read_multi_pages(), we don't have to check cluster's type again, since overwrite or partial truncation need page lock in cluster which has already been held by reader, so cluster's type is stable, let's change check condition to sanity check. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8fa41016f098b5ea5b48ffc6042ecaf0282b809b Author: Jack Qiu Date: Wed Jul 29 09:29:01 2020 +0800 f2fs: use macro instead of f2fs verity version Because fsverity_descriptor_location.version is constant, so use macro for better reading. Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1fd280188d1f1e7318264a34aba435f3b69e71e8 Author: Jaegeuk Kim Date: Tue Jul 28 08:26:11 2020 -0700 f2fs: fix deadlock between quota writes and checkpoint f2fs_write_data_pages(quota_mapping) __f2fs_write_data_pages f2fs_write_checkpoint * blk_start_plug(&plug); * add bio in write_io[DATA] - block_operations - skip syncing quota by >DEFAULT_RETRY_QUOTA_FLUSH_COUNT - down_write(&sbi->node_write); - f2fs_write_single_data_page - down_read(node_write) - f2fs_wait_on_all_pages(F2FS_WB_CP_DATA); Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1f07cc58bc92bdea261b7cca12eec2f2827edab6 Author: Jack Qiu Date: Sat Jul 25 18:05:27 2020 +0800 f2fs: correct comment of f2fs_exist_written_data Function parameter mode could be TRANS_DIR_INO. Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5577416c39652d395a6045677f4f598564aba1cf Merge: 690b25675f5c9 f3db0bed45831 Author: Linus Torvalds Date: Mon Aug 3 10:19:35 2020 -0700 Merge tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fsverity update from Eric Biggers: "One fix for fs/verity/ to strengthen a memory barrier which might be too weak. This mirrors a similar fix in fs/crypto/" * tag 'fsverity-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fs-verity: use smp_load_acquire() for ->i_verity_info commit 6c4e9bcfb48933d533ff975e152757991556294a Author: Leon Romanovsky Date: Sun Jul 19 11:04:30 2020 +0300 net/mlx5: Delete extra dump stack that gives nothing The WARN_*() macros are intended to catch impossible situations from the SW point of view. They gave a little in case HW<->SW interface is out-of-sync. Such out-of-sync scenario can be due to SW errors that are not part of this flow or because some HW errors, where dump stack won't help either. This specific WARN_ON() is useless because mlx5_core code is prepared to handle such situations and will unfold everything correctly while providing enough information to the users to understand why FS is not working. WARNING: CPU: 0 PID: 3222 at drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:825 connect_fts_in_prio.isra.20+0x1dd/0x260 linux/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:825 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 3222 Comm: syz-executor861 Not tainted 5.5.0-rc6+ #2 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack linux/lib/dump_stack.c:77 [inline] dump_stack+0x94/0xce linux/lib/dump_stack.c:118 panic+0x234/0x56f linux/kernel/panic.c:221 __warn+0x1cc/0x1e1 linux/kernel/panic.c:582 report_bug+0x200/0x310 linux/lib/bug.c:195 fixup_bug.part.11+0x32/0x80 linux/arch/x86/kernel/traps.c:174 fixup_bug linux/arch/x86/kernel/traps.c:273 [inline] do_error_trap+0xd3/0x100 linux/arch/x86/kernel/traps.c:267 do_invalid_op+0x31/0x40 linux/arch/x86/kernel/traps.c:286 invalid_op+0x1e/0x30 linux/arch/x86/entry/entry_64.S:1027 RIP: 0010:connect_fts_in_prio.isra.20+0x1dd/0x260 linux/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:825 Code: 00 00 48 c7 c2 60 8c 31 84 48 c7 c6 00 81 31 84 48 8b 38 e8 3c a8 cb ff 41 83 fd 01 8b 04 24 0f 8e 29 ff ff ff e8 83 7b bc fe <0f> 0b 8b 04 24 e9 1a ff ff ff 89 04 24 e8 c1 20 e0 fe 8b 04 24 eb RSP: 0018:ffffc90004bb7858 EFLAGS: 00010293 RAX: ffff88805de98e80 RBX: 0000000000000c96 RCX: ffffffff827a853d RDX: 0000000000000000 RSI: 0000000000000000 RDI: fffff52000976efa RBP: 0000000000000007 R08: ffffed100da060e3 R09: ffffed100da060e3 R10: 0000000000000001 R11: ffffed100da060e2 R12: dffffc0000000000 R13: 0000000000000002 R14: ffff8880683a1a10 R15: ffffed100d07bc1c connect_prev_fts linux/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:844 [inline] connect_flow_table linux/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:975 [inline] __mlx5_create_flow_table+0x8f8/0x1710 linux/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1064 mlx5_create_flow_table linux/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1094 [inline] mlx5_create_auto_grouped_flow_table+0xe1/0x210 linux/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c:1136 _get_prio linux/drivers/infiniband/hw/mlx5/main.c:3286 [inline] get_flow_table+0x2ea/0x760 linux/drivers/infiniband/hw/mlx5/main.c:3376 mlx5_ib_create_flow+0x331/0x11c0 linux/drivers/infiniband/hw/mlx5/main.c:3896 ib_uverbs_ex_create_flow+0x13e8/0x1b40 linux/drivers/infiniband/core/uverbs_cmd.c:3311 ib_uverbs_write+0xaa5/0xdf0 linux/drivers/infiniband/core/uverbs_main.c:769 __vfs_write+0x7c/0x100 linux/fs/read_write.c:494 vfs_write+0x168/0x4a0 linux/fs/read_write.c:558 ksys_write+0xc8/0x200 linux/fs/read_write.c:611 do_syscall_64+0x9c/0x390 linux/arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45a059 Code: 00 00 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 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fcc17564c98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007fcc17564ca0 RCX: 000000000045a059 RDX: 0000000000000030 RSI: 00000000200003c0 RDI: 0000000000000005 RBP: 0000000000000007 R08: 0000000000000002 R09: 0000000000003131 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006e636c R13: 0000000000000000 R14: 00000000006e6360 R15: 00007ffdcbdaf6a0 Dumping ftrace buffer: (ftrace buffer empty) Kernel Offset: disabled Rebooting in 1 seconds.. Fixes: f90edfd279f3 ("net/mlx5_core: Connect flow tables") Reviewed-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Leon Romanovsky commit 18a2b7f969c9b6386a506a5d026962e53dc0bb14 Author: Jakub Kicinski Date: Tue Jul 28 14:47:59 2020 -0700 net/mlx5: convert to new udp_tunnel infrastructure Allocate nic_info dynamically - n_entries is not constant. Attach the tunnel offload info only to the uplink representor. We expect the "main" netdev to be unregistered in switchdev mode, and there to be only one uplink representor. Drop the udp_tunnel_drop_rx_info() call, it was not there until commit b3c2ed21c0bd ("net/mlx5e: Fix VXLAN configuration restore after function reload") so the device doesn't need it, and core should handle reloads and reset just fine. v2: - don't drop the ndos on reprs, and register info on uplink repr. v4: - Move netdev tunnel structure handling to en_main.c Signed-off-by: Jakub Kicinski Signed-off-by: Saeed Mahameed commit 966e50597666d530b69de2abb9c83ff0a9bd3ee6 Author: Jakub Kicinski Date: Tue Jul 28 14:47:58 2020 -0700 udp_tunnel: add the ability to hard-code IANA VXLAN mlx5 has the IANA VXLAN port (4789) hard coded by the device, instead of being added dynamically when tunnels are created. To support this add a workaround flag to struct udp_tunnel_nic_info. Skipping updates for the port is fairly trivial, dumping the hard coded port via ethtool requires some code duplication. The port is not a part of any real table, we dump it in a special table which has no tunnel types supported and only one entry. This is the last known workaround / hack needed to convert all drivers to the new infra. Signed-off-by: Jakub Kicinski Signed-off-by: Saeed Mahameed commit b206490940216542c68563699b279eed3c55107c Author: Alex Vesker Date: Mon Jul 13 14:09:04 2020 +0300 net/mlx5: DR, Change push vlan action sequence The DR TX state machine supports the following order: modify header, push vlan and encapsulation. Instead fs_dr would pass: push vlan, modify header and encapsulation. The above caused the rule creation to fail on invalid action sequence provided error. Fixes: 6a48faeeca10 ("net/mlx5: Add direct rule fs_cmd implementation") Signed-off-by: Alex Vesker Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed commit 45d252ca803b9aa232c455a7c3d0c9e14b89247f Author: Parav Pandit Date: Sun Jun 21 06:57:03 2020 +0300 net/mlx5e: Enable users to change VF/PF representors carrier state Currently PF and VF representor netdevice carrier is always controlled by controlling the representor netdevice device state as up/down. Representor netdevice state change undergoes one or more txq/rxq destroy/create commands to firmware, skb and its rx buffer allocation, health reporters creation and more. Due to this limitation users do not have the ability to just change the carrier of the non uplink representors without modifying the device state. In one use case when the eswitch physical port carrier is down/up, user needs to update the VF link state to same as physical port carrier. Example of updating VF representor carrier state: $ ip link set enp0s8f0npf0vf0 carrier off $ ip link set enp0s8f0npf0vf0 carrier on This enhancement results into VF link state change which is represented by the VF representor netdevice carrier. This enables users to modify the representor carrier without modifying the representor netdevice state. A simple test is run using [1] to calculate the time difference between updating carrier vs updating device state (to update just the carrier) with one VF to simulate 255 VFs. Time taken to update the carrier using device up/down: $ time ./calculate.sh dev enp0s8f0npf0vf0 real 0m30.913s user 0m0.200s sys 0m11.168s Time taken to update just the carrier using carrier iproute2 command: $ time ./calculate.sh carrier enp0s8f0npf0vf0 real 0m2.142s user 0m0.160s sys 0m2.021s Test shows that its better to use carrier on/off user interface to notify link up/down event to VF compare to device up/down interface, because carrier user interface delivers the same event 15 times faster. [1] https://github.com/paravmellanox/myscripts/blob/master/calculate_carrier_time.sh Signed-off-by: Parav Pandit Acked-by: Jiri Pirko Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 690b25675f5c9c082cb1b902e6d21dd956754e7e Merge: 6dec9f406c1f2 55e32c54bbd57 Author: Linus Torvalds Date: Mon Aug 3 10:09:59 2020 -0700 Merge tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt Pull fscrypt updates from Eric Biggers: "This release, we add support for inline encryption via the blk-crypto framework which was added in 5.8. Now when an ext4 or f2fs filesystem is mounted with '-o inlinecrypt', the contents of encrypted files will be encrypted/decrypted via blk-crypto, instead of directly using the crypto API. This model allows taking advantage of the inline encryption hardware that is integrated into the UFS or eMMC host controllers on most mobile SoCs. Note that this is just an alternate implementation; the ciphertext written to disk stays the same. (This pull request does *not* include support for direct I/O on encrypted files, which blk-crypto makes possible, since that part is still being discussed.) Besides the above feature update, there are also a few fixes and cleanups, e.g. strengthening some memory barriers that may be too weak. All these patches have been in linux-next with no reported issues. I've also tested them with the fscrypt xfstests, as usual. It's also been tested that the inline encryption support works with the support for Qualcomm and Mediatek inline encryption hardware that will be in the scsi pull request for 5.9. Also, several SoC vendors are already using a previous, functionally equivalent version of these patches" * tag 'fscrypt-for-linus' of git://git.kernel.org/pub/scm/fs/fscrypt/fscrypt: fscrypt: don't load ->i_crypt_info before it's known to be valid fscrypt: document inline encryption support fscrypt: use smp_load_acquire() for ->i_crypt_info fscrypt: use smp_load_acquire() for ->s_master_keys fscrypt: use smp_load_acquire() for fscrypt_prepared_key fscrypt: switch fscrypt_do_sha256() to use the SHA-256 library fscrypt: restrict IV_INO_LBLK_* to AES-256-XTS fscrypt: rename FS_KEY_DERIVATION_NONCE_SIZE fscrypt: add comments that describe the HKDF info strings ext4: add inline encryption support f2fs: add inline encryption support fscrypt: add inline encryption support fs: introduce SB_INLINECRYPT commit 6dec9f406c1f2de6d750de0fc9d19872d9c4bf0d Merge: 92b7e4923fdbe 5e548b32018d9 Author: Linus Torvalds Date: Mon Aug 3 09:41:48 2020 -0700 Merge tag 'for-5.9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "We don't have any big feature updates this time, there are lots of small enhacements or fixes. A highlight perhaps is the parallel fsync performance improvements, numbers below. Regarding the dio/iomap that was reverted last time, the required API changes are likely to land in the upcoming cycle, the btrfs part will be updated afterwards. User visible changes: - new mount option rescue= to group all recovery-related mount options so we don't have many specific options, currently introducing only aliases for existing options, future extensions are in development to allow read-only mount with partially damaged structures: - usebackuproot is an alias for rescue=usebackuproot - nologreplay is an alias for rescue=nologreplay - start deprecation of mount option inode_cache, removal scheduled to v5.11 - removed deprecated mount options alloc_start and subvolrootid - device stats corruption counter gets incremented when a checksum mismatch is found - qgroup information exported in /sys/fs/btrfs//qgroups/ using sysfs - add link /sys/fs/btrfs//bdi pointing to the associated backing dev info - FS_INFO ioctl enhancements: - add flags to request/describe newly added items - new item: numeric checksum type and checksum size - new item: generation - new item: metadata_uuid - seed device: with one new read-write device added, print the new device information in /proc/mounts - balance: detect cancellation by Ctrl-C in existing cancellation points Performance improvements: - optimized versions of various helpers on little-endian architectures, where we don't have to do LE/BE conversion from on-disk format - tree-log/fsync optimizations leading to lower max latency reported by dbench, reduced by about 12% - all chunk tree leaves are prefetched at mount time, can improve mount time on large (terabyte-sized) filesystems - speed up parallel fsync of files with reflinked/deduped extents, with jobs 16 to 1024 the throughput gets improved roughly by 50% on average and runtime decreased roughly by 30% on average, notable outlier is 128 jobs with +121.2% on throughput and -54.6% runtime - another speed up of parallel fsync, reduce number of checksum tree lookups and contention, the improvements start to show up with 2 tasks with +20% throughput and -16% runtime up to 64 with +200% throughput and -66% runtime Core: - umount-time qgroup leak checker - qgroups - add a way to unreserve partial range after failure, avoiding some EDQUOT errors - improved flushing logic when EDQUOT is hit - possible EINTR interruption caused by failed reservations after transaction start is better handled and documented - transaction abort errors are unified to EROFS in case it's not the original reason of abort or we don't have other way to determine the reason Fixes: - make truncate succeed on a NOCOW file even if data space is exhausted - fix cancelling balance on filesystem with exhausted metadata space - anon block device: - preallocate anon bdev when subvolume is created to report failure early - shorten time the anon bdev id is allocated - don't allocate anon bdev for internal roots - minor memory leak in ref-verify - refuse invalid combinations of compression and NOCOW file flags - lockdep fixes, updating the device locks - remove obsolete fallback logic for block group profile adjustments when switching from 1 to more devices, causing allocation of unwanted block groups Other cleanups, refactoring, simplifications: - conversions from struct inode to struct btrfs_inode in internal functions - removal of unused struct members" * tag 'for-5.9-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (151 commits) btrfs: do not set the full sync flag on the inode during page release btrfs: release old extent maps during page release btrfs: fix race between page release and a fast fsync btrfs: open-code remount flag setting in btrfs_remount btrfs: if we're restriping, use the target restripe profile btrfs: don't adjust bg flags and use default allocation profiles btrfs: fix lockdep splat from btrfs_dump_space_info btrfs: move the chunk_mutex in btrfs_read_chunk_tree btrfs: open device without device_list_mutex btrfs: sysfs: use NOFS for device creation btrfs: return EROFS for BTRFS_FS_STATE_ERROR cases btrfs: document special case error codes for fs errors btrfs: don't WARN if we abort a transaction with EROFS btrfs: reduce contention on log trees when logging checksums btrfs: remove done label in writepage_delalloc btrfs: add comments for btrfs_reserve_flush_enum btrfs: relocation: review the call sites which can be interrupted by signal btrfs: avoid possible signal interruption of btrfs_drop_snapshot() on relocation tree btrfs: relocation: allow signal to cancel balance btrfs: raid56: remove out label in __raid56_parity_recover ... commit 92b7e4923fdbeda9b86b1398127449d5353f9123 Merge: c6fe44d96fc15 85467f63a05c4 Author: Linus Torvalds Date: Mon Aug 3 09:34:09 2020 -0700 Merge tag 'tpmdd-next-v5.9' of git://git.infradead.org/users/jjs/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "An issue was fixed with the TPM space buffer size. The buffer is used to store in-TPM objects while swapped out of the TPM for a /dev/tpmrm0 session. The code incorrectly used PAGE_SIZE, which obviously can vary. With these changes the buffer has a fixed size of 16 kB. In addition, this contains support for acquiring TPM even log from TPM2 ACPI table. This method is used by QEMU in particular" * tag 'tpmdd-next-v5.9' of git://git.infradead.org/users/jjs/linux-tpmdd: tpm: Add support for event log pointer found in TPM2 ACPI table acpi: Extend TPM2 ACPI table with missing log fields tpm: Unify the mismatching TPM space buffer sizes tpm: Require that all digests are present in TCG_PCR_EVENT2 structures commit 0f69dae4d1069963fdcc16e63655927d83281006 Author: Zhaoyang Huang Date: Fri Jul 31 08:27:45 2020 +0800 trace : Have tracing buffer info use kvzalloc instead of kzalloc High order memory stuff within trace could introduce OOM, use kvzalloc instead. Please find the bellowing for the call stack we run across in an android system. The scenario happens when traced_probes is woken up to get a large quantity of trace even if free memory is even higher than watermark_low.  traced_probes invoked oom-killer: gfp_mask=0x140c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO), nodemask=(null), order=2, oom_score_adj=-1 traced_probes cpuset=system-background mems_allowed=0 CPU: 3 PID: 588 Comm: traced_probes Tainted: G W O 4.14.181 #1 Hardware name: Generic DT based system (unwind_backtrace) from [] (show_stack+0x20/0x24) (show_stack) from [] (dump_stack+0xa8/0xec) (dump_stack) from [] (dump_header+0x9c/0x220) (dump_header) from [] (oom_kill_process+0xc0/0x5c4) (oom_kill_process) from [] (out_of_memory+0x220/0x310) (out_of_memory) from [] (__alloc_pages_nodemask+0xff8/0x13a4) (__alloc_pages_nodemask) from [] (kmalloc_order+0x30/0x48) (kmalloc_order) from [] (kmalloc_order_trace+0x30/0x118) (kmalloc_order_trace) from [] (tracing_buffers_open+0x50/0xfc) (tracing_buffers_open) from [] (do_dentry_open+0x278/0x34c) (do_dentry_open) from [] (vfs_open+0x50/0x70) (vfs_open) from [] (path_openat+0x5fc/0x169c) (path_openat) from [] (do_filp_open+0x94/0xf8) (do_filp_open) from [] (do_sys_open+0x168/0x26c) (do_sys_open) from [] (SyS_openat+0x34/0x38) (SyS_openat) from [] (ret_fast_syscall+0x0/0x28) Link: https://lkml.kernel.org/r/1596155265-32365-1-git-send-email-zhaoyang.huang@unisoc.com Signed-off-by: Zhaoyang Huang Signed-off-by: Steven Rostedt (VMware) commit ddf75be47ca748f8b12d28ac64d624354fddf189 Author: Lukas Wunner Date: Mon Aug 3 13:09:01 2020 +0200 spi: Prevent adding devices below an unregistering controller CONFIG_OF_DYNAMIC and CONFIG_ACPI allow adding SPI devices at runtime using a DeviceTree overlay or DSDT patch. CONFIG_SPI_SLAVE allows the same via sysfs. But there are no precautions to prevent adding a device below a controller that's being removed. Such a device is unusable and may not even be able to unbind cleanly as it becomes inaccessible once the controller has been torn down. E.g. it is then impossible to quiesce the device's interrupt. of_spi_notify() and acpi_spi_notify() do hold a ref on the controller, but otherwise run lockless against spi_unregister_controller(). Fix by holding the spi_add_lock in spi_unregister_controller() and bailing out of spi_add_device() if the controller has been unregistered concurrently. Fixes: ce79d54ae447 ("spi/of: Add OF notifier handler") Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v3.19+ Cc: Geert Uytterhoeven Cc: Octavian Purdila Cc: Pantelis Antoniou Link: https://lore.kernel.org/r/a8c3205088a969dc8410eec1eba9aface60f36af.1596451035.git.lukas@wunner.de Signed-off-by: Mark Brown commit 58ff5f4db1ae07bae553f07f7ba049db2dcf10ae Merge: 9493755d7c115 823279c374669 Author: Mark Brown Date: Mon Aug 3 16:25:49 2020 +0100 Merge series "ASoC: tegra: Fix compile warning with CONFIG_PM=n" from Takashi Iwai : Hi, this is a trivial patch set to add the missing __maybe_unused for covering the compile warnings with CONFIG_PM=n. Takashi === Takashi Iwai (5): ASoC: tegra: tegra186_dspk: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_admaif: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_ahub: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_dmic: Fix compile warning with CONFIG_PM=n ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=n sound/soc/tegra/tegra186_dspk.c | 4 ++-- sound/soc/tegra/tegra210_admaif.c | 4 ++-- sound/soc/tegra/tegra210_ahub.c | 4 ++-- sound/soc/tegra/tegra210_dmic.c | 4 ++-- sound/soc/tegra/tegra210_i2s.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) -- 2.16.4 commit 9493755d7c1156b00b58376752d4c3df7c0a01ec Author: Takashi Iwai Date: Mon Aug 3 16:46:30 2020 +0200 ASoC: fsl: Fix unused variable warning The variable rtd was left unused in psc_dma_free(), even unnoticed during conversion to a new style: sound/soc/fsl/mpc5200_dma.c:342:30: warning: unused variable 'rtd' [-Wunused-variable] Drop the superfluous one. Fixes: 6d1048bc1152 ("ASoC: fsl: mpc5200_dma: remove snd_pcm_ops") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200803144630.9615-1-tiwai@suse.de Signed-off-by: Mark Brown commit 1a1206dc4cf02cee4b5cbce583ee4c22368b4c28 Author: Johannes Thumshirn Date: Thu Jul 30 20:25:17 2020 +0900 block: don't do revalidate zones on invalid devices When we loose a device for whatever reason while (re)scanning zones, we trip over a NULL pointer in blk_revalidate_zone_cb, like in the following log: sd 0:0:0:0: [sda] 3418095616 4096-byte logical blocks: (14.0 TB/12.7 TiB) sd 0:0:0:0: [sda] 52156 zones of 65536 logical blocks sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 37 00 00 08 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sd 0:0:0:0: [sda] REPORT ZONES start lba 1065287680 failed sd 0:0:0:0: [sda] REPORT ZONES: Result: hostbyte=0x00 driverbyte=0x08 sd 0:0:0:0: [sda] Sense Key : 0xb [current] sd 0:0:0:0: [sda] ASC=0x0 ASCQ=0x6 sda: failed to revalidate zones sd 0:0:0:0: [sda] 0 4096-byte logical blocks: (0 B/0 B) sda: detected capacity change from 14000519643136 to 0 ================================================================== BUG: KASAN: null-ptr-deref in blk_revalidate_zone_cb+0x1b7/0x550 Write of size 8 at addr 0000000000000010 by task kworker/u4:1/58 CPU: 1 PID: 58 Comm: kworker/u4:1 Not tainted 5.8.0-rc1 #692 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4-rebuilt.opensuse.org 04/01/2014 Workqueue: events_unbound async_run_entry_fn Call Trace: dump_stack+0x7d/0xb0 ? blk_revalidate_zone_cb+0x1b7/0x550 kasan_report.cold+0x5/0x37 ? blk_revalidate_zone_cb+0x1b7/0x550 check_memory_region+0x145/0x1a0 blk_revalidate_zone_cb+0x1b7/0x550 sd_zbc_parse_report+0x1f1/0x370 ? blk_req_zone_write_trylock+0x200/0x200 ? sectors_to_logical+0x60/0x60 ? blk_req_zone_write_trylock+0x200/0x200 ? blk_req_zone_write_trylock+0x200/0x200 sd_zbc_report_zones+0x3c4/0x5e0 ? sd_dif_config_host+0x500/0x500 blk_revalidate_disk_zones+0x231/0x44d ? _raw_write_lock_irqsave+0xb0/0xb0 ? blk_queue_free_zone_bitmaps+0xd0/0xd0 sd_zbc_read_zones+0x8cf/0x11a0 sd_revalidate_disk+0x305c/0x64e0 ? __device_add_disk+0x776/0xf20 ? read_capacity_16.part.0+0x1080/0x1080 ? blk_alloc_devt+0x250/0x250 ? create_object.isra.0+0x595/0xa20 ? kasan_unpoison_shadow+0x33/0x40 sd_probe+0x8dc/0xcd2 really_probe+0x20e/0xaf0 __driver_attach_async_helper+0x249/0x2d0 async_run_entry_fn+0xbe/0x560 process_one_work+0x764/0x1290 ? _raw_read_unlock_irqrestore+0x30/0x30 worker_thread+0x598/0x12f0 ? __kthread_parkme+0xc6/0x1b0 ? schedule+0xed/0x2c0 ? process_one_work+0x1290/0x1290 kthread+0x36b/0x440 ? kthread_create_worker_on_cpu+0xa0/0xa0 ret_from_fork+0x22/0x30 ================================================================== When the device is already gone we end up with the following scenario: The device's capacity is 0 and thus the number of zones will be 0 as well. When allocating the bitmap for the conventional zones, we then trip over a NULL pointer. So if we encounter a zoned block device with a 0 capacity, don't dare to revalidate the zones sizes. Fixes: 6c6b35491422 ("block: set the zone size in blk_revalidate_disk_zones atomically") Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Signed-off-by: Jens Axboe commit 823279c374669a15a139a29b891dc0d7460262c6 Author: Takashi Iwai Date: Mon Aug 3 16:18:50 2020 +0200 ASoC: tegra: tegra210_i2s: Fix compile warning with CONFIG_PM=n Fix trivial compile warnings wrt unused functions by adding __maybe_unused prefix: sound/soc/tegra/tegra210_i2s.c:167:12: warning: 'tegra210_i2s_runtime_suspend' defined but not used [-Wunused-function] sound/soc/tegra/tegra210_i2s.c:179:12: warning: 'tegra210_i2s_runtime_resume' defined but not used [-Wunused-function] Fixes: c0bfa98349d1 ("ASoC: tegra: Add Tegra210 based I2S driver") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200803141850.23713-6-tiwai@suse.de Signed-off-by: Mark Brown commit 7543f16a04465db95e83e8409e246f49f35c874a Author: Takashi Iwai Date: Mon Aug 3 16:18:49 2020 +0200 ASoC: tegra: tegra210_dmic: Fix compile warning with CONFIG_PM=n Fix trivial compile warnings wrt unused functions by adding __maybe_unused prefix: sound/soc/tegra/tegra210_dmic.c:43:12: warning: 'tegra210_dmic_runtime_suspend' defined but not used [-Wunused-function] sound/soc/tegra/tegra210_dmic.c:55:12: warning: 'tegra210_dmic_runtime_resume' defined but not used [-Wunused-function] Fixes: 8c8ff982e9e2 ("ASoC: tegra: Add Tegra210 based DMIC driver") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200803141850.23713-5-tiwai@suse.de Signed-off-by: Mark Brown commit fafac559604bd2e74f5f6febd58682df3738cdd9 Author: Takashi Iwai Date: Mon Aug 3 16:18:48 2020 +0200 ASoC: tegra: tegra210_ahub: Fix compile warning with CONFIG_PM=n Fix trivial compile warnings wrt unused functions by adding __maybe_unused prefix: sound/soc/tegra/tegra210_ahub.c:567:12: warning: 'tegra_ahub_runtime_suspend' defined but not used [-Wunused-function] sound/soc/tegra/tegra210_ahub.c:579:12: warning: 'tegra_ahub_runtime_resume' defined but not used [-Wunused-function] Fixes: 16e1bcc2caf4 ("ASoC: tegra: Add Tegra210 based AHUB driver") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200803141850.23713-4-tiwai@suse.de Signed-off-by: Mark Brown commit 1337f2c5f104c84d5a943b2eb644db3eaf4a64e0 Author: Takashi Iwai Date: Mon Aug 3 16:18:47 2020 +0200 ASoC: tegra: tegra210_admaif: Fix compile warning with CONFIG_PM=n Fix trivial compile warnings wrt unused functions by adding __maybe_unused prefix: sound/soc/tegra/tegra210_admaif.c:232:12: warning: 'tegra_admaif_runtime_resume' defined but not used [-Wunused-function] sound/soc/tegra/tegra210_ahub.c:567:12: warning: 'tegra_ahub_runtime_suspend' defined but not used [-Wunused-function] Fixes: f74028e159bb ("ASoC: tegra: Add Tegra210 based ADMAIF driver") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200803141850.23713-3-tiwai@suse.de Signed-off-by: Mark Brown commit b191f01a3756f8d5d0b92bad0a07dac7e373d8be Author: Takashi Iwai Date: Mon Aug 3 16:18:46 2020 +0200 ASoC: tegra: tegra186_dspk: Fix compile warning with CONFIG_PM=n Fix trivial compile warnings wrt unused functions by adding __maybe_unused prefix: sound/soc/tegra/tegra186_dspk.c:74:12: warning: 'tegra186_dspk_runtime_suspend' defined but not used [-Wunused-function] sound/soc/tegra/tegra186_dspk.c:86:12: warning: 'tegra186_dspk_runtime_resume' defined but not used [-Wunused-function] Fixes: 327ef6470266 ("ASoC: tegra: Add Tegra186 based DSPK driver") Signed-off-by: Takashi Iwai Link: https://lore.kernel.org/r/20200803141850.23713-2-tiwai@suse.de Signed-off-by: Mark Brown commit cfa3eb65a7d6da5664d4c9275fbb568a2446d6d9 Merge: 041549b7b2c78 f86ca3cffef15 Author: Daniel Borkmann Date: Mon Aug 3 16:39:48 2020 +0200 Merge branch 'bpf-libbpf-btf-parsing' Andrii Nakryiko says: ==================== It's pretty common for applications to want to parse raw (binary) BTF data from file, as opposed to parsing it from ELF sections. It's also pretty common for tools to not care whether given file is ELF or raw BTF format. This patch series exposes internal raw BTF parsing API and adds generic variant of BTF parsing, which will efficiently determine the format of a given fail and will parse BTF appropriately. Patches #2 and #3 removes re-implementations of such APIs from bpftool and resolve_btfids tools. ==================== Signed-off-by: Daniel Borkmann commit f86ca3cffef153555a3f4755b3a44881d962754f Author: Andrii Nakryiko Date: Sat Aug 1 18:32:19 2020 -0700 tools/resolve_btfids: Use libbpf's btf__parse() API Instead of re-implementing generic BTF parsing logic, use libbpf's API. Also add .gitignore for resolve_btfids's build artifacts. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200802013219.864880-4-andriin@fb.com commit 8526df04570f5698c97ac661ad1f2f35293557a7 Author: Andrii Nakryiko Date: Sat Aug 1 18:32:18 2020 -0700 tools/bpftool: Use libbpf's btf__parse() API for parsing BTF from file Use generic libbpf API to parse BTF data from file, instead of re-implementing it in bpftool. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200802013219.864880-3-andriin@fb.com commit 94a1fedd63edb672933bef44ca9213937e377c05 Author: Andrii Nakryiko Date: Sat Aug 1 18:32:17 2020 -0700 libbpf: Add btf__parse_raw() and generic btf__parse() APIs Add public APIs to parse BTF from raw data file (e.g., /sys/kernel/btf/vmlinux), as well as generic btf__parse(), which will try to determine correct format, currently either raw or ELF. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200802013219.864880-2-andriin@fb.com commit f8c11eb7da4a99f7777d5afd7ed80dec8a593064 Author: Kai-Heng Feng Date: Mon Aug 3 22:26:08 2020 +0800 ALSA: usb-audio: Add support for Lenovo ThinkStation P620 Lenovo ThinkStation P620 is like other TRX40 boards, is equipped with two USB audio cards. USB device (17aa:104d) provides functionality for Internal Speaker and Front Headset. It's UAC v2, so it supports insertion control (jack detection). However, when trying to get the connector status of the speaker, an error occurs: [ 5.787405] usb 3-1: cannot get connectors status: req = 0x81, wValue = 0x200, wIndex = 0x1000, type = 0 Since the insertion control works perfectly for the headset, the error for speaker is probably casued by connecting internally. So let's relax the error for a bit if it's a speaker, and always reports it's connected. USB device (17aa:1046) is for rear Line-in, Line-out and Microphone. The insertion control works for all three jacks. However, there's an Function Unit that doesn't work: [ 5.905415] usb 3-6: cannot get ctl value: req = 0x83, wValue = 0xc00, wIndex = 0x1300, type = 4 [ 5.905418] usb 3-6: 19:0: cannot get min/max values for control 12 (id 19) So turn off the FU to avoid the error. Also, add specific card name for both devices, so userspace can easily indentify both cards. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200803142612.17156-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 041549b7b2c7811ec40e705c439211f00ade2dda Author: Tianjia Zhang Date: Sun Aug 2 19:15:40 2020 +0800 tools, bpftool: Fix wrong return value in do_dump() In case of btf_id does not exist, a negative error code -ENOENT should be returned. Fixes: c93cc69004df3 ("bpftool: add ability to dump BTF types") Signed-off-by: Tianjia Zhang Signed-off-by: Daniel Borkmann Reviewed-by: Tobias Klauser Acked-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200802111540.5384-1-tianjia.zhang@linux.alibaba.com commit caecb05c800081c57907749f787f05f62011564e Author: Krzysztof Wilczyński Date: Sun Aug 2 14:25:53 2020 +0000 PCI: Remove dev_err() when handing an error from platform_get_irq() There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure. This change is as per suggestions from Coccinelle, e.g., drivers/pci/controller/dwc/pcie-armada8k.c:252:2-9: line 252 is redundant because platform_get_irq() already prints an error [bhelgaas: squashed into one commit] Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20200802142601.1635926-2-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-3-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-4-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-5-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-6-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-7-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-8-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-9-kw@linux.com Link: https://lore.kernel.org/r/20200802142601.1635926-10-kw@linux.com Link: https://lore.kernel.org/r/20200803071040.1663662-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Reviewed-by: Ley Foon Tan # altera Acked-by: Jesper Nilsson # dwc commit a278f3d8191228212c553a5d4303fa603214b717 Author: Andrii Nakryiko Date: Thu Jul 30 19:42:44 2020 -0700 tools, build: Propagate build failures from tools/build/Makefile.build The '&&' command seems to have a bad effect when $(cmd_$(1)) exits with non-zero effect: the command failure is masked (despite `set -e`) and all but the first command of $(dep-cmd) is executed (successfully, as they are mostly printfs), thus overall returning 0 in the end. This means in practice that despite compilation errors, tools's build Makefile will return success. We see this very reliably with libbpf's Makefile, which doesn't get compilation error propagated properly. This in turns causes issues with selftests build, as well as bpftool and other projects that rely on building libbpf. The fix is simple: don't use &&. Given `set -e`, we don't need to chain commands with &&. The shell will exit on first failure, giving desired behavior and propagating error properly. Fixes: 275e2d95591e ("tools build: Move dependency copy into function") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20200731024244.872574-1-andriin@fb.com commit 0dbe77c9d2f8e6ef1792db99e150dd0025a977eb Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:17 2020 +0530 MAINTAINERS: Add Kishon Vijay Abraham I for TI J721E SoC PCIe Add Kishon Vijay Abraham I as MAINTAINER for TI J721E SoC PCIe. Link: https://lore.kernel.org/r/20200722110317.4744-16-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring commit 6546ae29964e85af909f366ebeec25c47adbc95d Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:16 2020 +0530 misc: pci_endpoint_test: Add J721E in pci_device_id table Add J721E in pci_device_id table so that pci-epf-test can be used for testing PCIe EP in J721E. Link: https://lore.kernel.org/r/20200722110317.4744-15-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit f3e25911a430ed16ec209929183df762fe9c785b Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:15 2020 +0530 PCI: j721e: Add TI J721E PCIe driver Add support for PCIe controller in J721E SoC. The controller uses the Cadence PCIe core programmed by pcie-cadence*.c. The PCIe controller will work in both host mode and device mode. Some of the features of the controller are: *) Supports both RC mode and EP mode *) Supports MSI and MSI-X support *) Supports upto GEN3 speed mode *) Supports SR-IOV capability *) Ability to route all transactions via SMMU (support will be added in a later patch). Link: https://lore.kernel.org/r/20200722110317.4744-14-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit ccff7bd468d5e0595176656a051ef67c01f01968 Author: Hui Wang Date: Thu Jul 30 20:31:38 2020 +0800 ASoC: amd: renoir: restore two more registers during resume Recently we found an issue about the suspend and resume. If dmic is recording the sound, and we run suspend and resume, after the resume, the dmic can't work well anymore. we need to close the app and reopen the app, then the dmic could record the sound again. For example, we run "arecord -D hw:CARD=acp,DEV=0 -f S32_LE -c 2 -r 48000 test.wav", then suspend and resume, after the system resume back, we speak to the dmic. then stop the arecord, use aplay to play the test.wav, we could hear the sound recorded after resume is weird, it is not what we speak to the dmic. I found two registers are set in the dai_hw_params(), if the two registers are set during the resume, this issue could be fixed. Move the code of the dai_hw_params() into the pdm_dai_trigger(), then these two registers will be set during resume since pdm_dai_trigger() will be called during resume. And delete the empty function dai_hw_params(). Signed-off-by: Hui Wang Reviewed-by: Vijendar Mukunda Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200730123138.5659-1-hui.wang@canonical.com Signed-off-by: Mark Brown commit b023666e6c0165651de18cabcbb65ba14f2db153 Author: Fabio Estevam Date: Mon Aug 3 08:52:33 2020 -0300 ASoC: wm8962: Do not remove ADDITIONAL_CONTROL_4 from readable register list Removing ADDITIONAL_CONTROL_4 from the list of readable registers cause audio distortion. This change was sent as a comment below the --- line when submitting commit 658bb297e393 ("ASoC: wm8962: Do not access WM8962_GPIO_BASE"), so it was not supposed to get merged. Keep WM8962_ADDITIONAL_CONTROL_4 inside wm8962_readable_register() to fix the regression. Fixes: 658bb297e393 ("ASoC: wm8962: Do not access WM8962_GPIO_BASE") Reported-by: Shengjiu Wang Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20200803115233.19034-1-festevam@gmail.com Signed-off-by: Mark Brown commit f36e8edb95734c03134db628afa25ee23b8e0d95 Author: Shengjiu Wang Date: Mon Aug 3 10:13:31 2020 +0800 ASoC: fsl-asoc-card: Remove fsl_asoc_card_set_bias_level function With this case: aplay -Dhw:x 16khz.wav 24khz.wav There is sound distortion for 24khz.wav. The reason is that setting PLL of WM8962 with set_bias_level function, the bias level is not changed when 24khz.wav is played, then the PLL won't be reset, the clock is not correct, so distortion happens. The resolution of this issue is to remove fsl_asoc_card_set_bias_level. Move PLL configuration to hw_params and hw_free. After removing fsl_asoc_card_set_bias_level, also test WM8960 case, it can work. Fixes: 708b4351f08c ("ASoC: fsl: Add Freescale Generic ASoC Sound Card with ASRC support") Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1596420811-16690-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 0e62ea33ac12ebde876b67eca113630805191a66 Author: Gao Xiang Date: Fri Jul 31 10:40:49 2020 +0800 erofs: remove WQ_CPU_INTENSIVE flag from unbound wq's The documentation [1] says that WQ_CPU_INTENSIVE is "meaningless" for unbound wq. I remove this flag from places where unbound queue is allocated. This is supposed to improve code readability. [1] https://www.kernel.org/doc/html/latest/core-api/workqueue.html#flags Signed-off-by: Maksym Planeta [Gao Xiang: since the original treewide patch [2] hasn't been merged yet, handling the EROFS part only for the next cycle. ] [2] https://lore.kernel.org/r/20200213141823.2174236-1-mplaneta@os.inf.tu-dresden.de Link: https://lore.kernel.org/r/20200731024049.16495-1-hsiangkao@aol.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit ee4bf86c69d1e86ee0505f4824b95a74704d433f Author: Gao Xiang Date: Thu Jul 30 02:02:35 2020 +0800 erofs: fold in used-once helper erofs_workgroup_unfreeze_final() It's expected that erofs_workgroup_unfreeze_final() won't be used in other places. Let's fold it to simplify the code. Link: https://lore.kernel.org/r/20200729180235.25443-1-hsiangkao@redhat.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 0dcd3c94e02438f4a571690e26f4ee997524102a Author: Gao Xiang Date: Thu Jul 30 01:58:01 2020 +0800 erofs: fix extended inode could cross boundary Each ondisk inode should be aligned with inode slot boundary (32-byte alignment) because of nid calculation formula, so all compact inodes (32 byte) cannot across page boundary. However, extended inode is now 64-byte form, which can across page boundary in principle if the location is specified on purpose, although it's hard to be generated by mkfs due to the allocation policy and rarely used by Android use case now mainly for > 4GiB files. For now, only two fields `i_ctime_nsec` and `i_nlink' couldn't be read from disk properly and cause out-of-bound memory read with random value. Let's fix now. Fixes: 431339ba9042 ("staging: erofs: add inode operations") Cc: # 4.19+ Link: https://lore.kernel.org/r/20200729175801.GA23973@xiangao.remote.csb Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 592e7cd00bb9d48742ff402b74b79244e4a765dd Author: Alexander A. Klimov Date: Mon Jul 13 15:09:44 2020 +0200 erofs: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713130944.34419-1-grandmaster@al2klimov.de Signed-off-by: Gao Xiang commit 103f528d3bc35d2b6e726a3fffd879e492d191c2 Merge: 07c9983b567d0 84569f329f7fc Author: Takashi Iwai Date: Mon Aug 3 14:41:43 2020 +0200 Merge tag 'asoc-v5.9' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.9 The biggest changes here one again come from Mormioto-san who has continued his dilligent work cleaning up long standing issues in the APIs, it's particularly nice to see the transition from digital_mute() to mute_stream() finally completed. There's also been a lot of work on the x86 code again, this time a big focus has been on cleaning up some issues identified by various static tests, and on the Freescale systems. Otherwise the biggest thing has been a lot of driver additions: - Convert users of digital_mute() to mute_stream(). - Simplify I/O helper functions. - Add a helper for getting the RTD from a substream. - Many, many fixes and cleanups to the x86 code. - New drivers for Freescale MQS and i.MX6sx, Intel KeemBay I2S, Maxim MAX98360A and MAX98373 Soundwire, several Mediatek boards, nVidia Tegra 186 and 210, RealTek RL6231, Samsung Midas and Aries boards (some of the first phones I worked on!) and TI J721e EVM. commit f59589fc89665102923725e80e12f782d5f74f67 Merge: a9e8e18aaf914 45a4d8fd6c792 Author: Jens Axboe Date: Mon Aug 3 06:38:44 2020 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.9/drivers Pull MD fixes from Song. * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid5: Allow degraded raid6 to do rmw md/raid5: Fix Force reconstruct-write io stuck in degraded raid5 raid5: don't duplicate code for different paths in handle_stripe raid5-cache: hold spinlock instead of mutex in r5c_journal_mode_show md: print errno in super_written md/raid5: remove the redundant setting of STRIPE_HANDLE md: register new md sysfs file 'uuid' read-only md: fix max sectors calculation for super 1.0 commit b1aa3db2c13ec0c63a73bd8fc5dfbfb112e3ff56 Merge: 7c43b0c1d499c bcf876870b955 Author: Arnaldo Carvalho de Melo Date: Mon Aug 3 09:37:31 2020 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core Minor conflict in tools/perf/arch/arm/util/auxtrace.c as one fix there was cherry-picked for the last perf/urgent pull req to Linus, so was already there. Signed-off-by: Arnaldo Carvalho de Melo commit 3d5128c1deb5d27993fb11ba5e517798f8021046 Merge: 8fa88a88d5730 ac62460c24126 Author: Thomas Gleixner Date: Mon Aug 3 14:33:23 2020 +0200 Merge tag 'irqchip-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates from Marc Zyngier: - Add infrastructure to allow DT irqchip platform drivers to be built as modules - Allow qcom-pdc, mtk-cirq and mtk-sysirq to be built as module - Fix ACPI probing to avoid abusing function pointer casting - Allow bcm7120-l2 and brcmstb-l2 to be used as wake-up sources - Teach NXP's IMX INTMUX some power management - Allow stm32-exti to be used as a hierarchical irqchip - Let stm32-exti use the hw spinlock API in its full glory - A couple of GICv4.1 fixes - Tons of cleanups (mtk-sysirq, aic5, bcm7038-l1, imx-intmux, brcmstb-l2, ativic32, ti-sci-inta, lonsoon, MIPS GIC, GICv3) commit 2075ec9896c5aef01e837198381d04cfa6452317 Author: Oliver O'Halloran Date: Mon Aug 3 17:54:08 2020 +1000 powerpc/powernv/sriov: Fix use of uninitialised variable Initialising the value before using it is generally regarded as a good idea so do that. Fixes: 4c51f3e1e870 ("powerpc/powernv/sriov: Make single PE mode a per-BAR setting") Reported-by: Nathan Chancellor Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200803075408.132601-1-oohall@gmail.com commit 872d11bca9c29ed19595c993b9f552ffe9b63dcb Author: Michael Ellerman Date: Mon Aug 3 12:07:19 2020 +1000 selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs Some of our tests use VSX or newer VMX instructions, so need to be skipped on older CPUs to avoid SIGILL'ing. Similarly TAR was added in v2.07, and the PMU event used in the stcx fail test only works on Power8 or later. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200803020719.96114-1-mpe@ellerman.id.au commit 8d8a629d00a5283874b81b594f31f8d436dc57d8 Author: Michael Ellerman Date: Wed Jul 22 12:24:22 2020 +1000 powerpc/40x: Fix assembler warning about r0 The assembler says: arch/powerpc/kernel/head_40x.S:623: Warning: invalid register expression It's objecting to the use of r0 as the RA argument. That's because when RA = 0 the literal value 0 is used, rather than the content of r0, making the use of r0 in the source potentially confusing. Fix it to use a literal 0, the generated code is identical. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722022422.825197-1-mpe@ellerman.id.au commit c9dff08485a6c11449307abde1d7bb404fcee481 Author: Andreas Gruenbacher Date: Thu Jul 9 14:49:30 2020 +0200 fs: Fix typo in comment The comment for function filemap_check_wb_err accidentally refers to it as filemap_check_wb_error. Signed-off-by: Andreas Gruenbacher commit 77dce3a22e8941552a15046d4113df9ce132fb3d Author: Pavel Machek Date: Mon Aug 3 14:00:06 2020 +0200 leds: disallow /sys/class/leds/*:multi:* for now All the LEDs in the queue are RGB, so they should not use multi for their color. Make sure we don't add such LED by mistake (and make it part of ABI). Signed-off-by: Pavel Machek commit c07bfb4d8fa1ee11c6d18b093d0bb6c8832d3626 Author: Andreas Gruenbacher Date: Mon Jul 27 19:18:57 2020 +0200 gfs2: Fix refcount leak in gfs2_glock_poke In gfs2_glock_poke, make sure gfs2_holder_uninit is called on the local glock holder. Without that, we're leaking a glock and a pid reference. Fixes: 9e8990dea926 ("gfs2: Smarter iopen glock waiting") Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Andreas Gruenbacher commit 54212f5a1ba3123281877e54c1e5f672bf7563d8 Author: Pavel Machek Date: Mon Aug 3 13:20:06 2020 +0200 leds: add RGB color option, as that is different from multicolor. Multicolor is a bit too abstract. Yes, we can have Green-Magenta-Ultraviolet LED, but so far all the LEDs we support are RGB, and not even RGB-White or RGB-Yellow variants emerged. Multicolor is not a good fit for RGB LED. It does not really know about LED color. In particular, there's no way to make LED "white". Userspace is interested in knowing "this LED can produce arbitrary color", which not all multicolor LEDs can. Signed-off-by: Pavel Machek commit 4c5c3010408d872359134cfa209619778d8f15e6 Author: Andreas Gruenbacher Date: Mon Jun 29 17:47:15 2020 -0500 gfs2: Pass glock holder to gfs2_file_direct_{read,write} Pass a pointer to the existing glock holder from gfs2_file_{read,write}_iter to gfs2_file_direct_{read,write} to save some stack space. Suggested-by: Matthew Wilcox Signed-off-by: Andreas Gruenbacher commit 5deaf1f63bafcec48e70e70669c567072c574f69 Author: Bob Peterson Date: Tue Jun 9 13:29:08 2020 -0400 gfs2: Add some flags missing from glock output Before this patch, three flags were not represented in the glock output. This patch adds them in: c - GLF_INODE_CREATING P - GLF_PENDING_DELETE x - GLF_FREEING (both f and F are already used) Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit db1da2f52ea5477e917957dd80c1da63affa60e6 Merge: 3fa5faf61774d 5003ad7172651 5b1e80204db6a eb27e5a314d1e 4ce7796632a13 Author: Rafael J. Wysocki Date: Mon Aug 3 13:14:42 2020 +0200 Merge branches 'acpi-mm', 'acpi-tables', 'acpi-apei' and 'acpi-misc' * acpi-mm: ACPI: OSL: Clean up the removal of unused memory mappings ACPI: OSL: Use deferred unmapping in acpi_os_unmap_iomem() ACPI: OSL: Use deferred unmapping in acpi_os_unmap_generic_address() ACPICA: Preserve memory opregion mappings ACPI: OSL: Implement deferred unmapping of ACPI memory * acpi-tables: ACPI: NUMA: Remove the useless 'node >= MAX_NUMNODES' check ACPI: NUMA: Remove the useless sub table pointer check ACPI: tables: Remove the duplicated checks for acpi_parse_entries_array() ACPI: tables: avoid relocations for table signature array * acpi-apei: ACPI: APEI: remove redundant assignment to variable rc * acpi-misc: ACPI: Replace HTTP links with HTTPS ones ACPI: Use valid link to the ACPI specification ACPI: Use fallthrough pseudo-keyword commit 3fa5faf61774dc7e9d31b65387c559584ece3752 Merge: 2861ba7a0c6c4 8830280a69ddf da85a855104d6 134043cd64c96 fc293b7a0ede6 dae68d7fd4930 cbdd865a94aee Author: Rafael J. Wysocki Date: Mon Aug 3 13:14:09 2020 +0200 Merge branches 'acpi-proc', 'acpi-sysfs', 'acpi-pad', 'acpi-ec', 'acpi-pci' and 'acpi-prop' * acpi-proc: ACPI: procfs: Remove last dirs after being marked deprecated for a decade * acpi-sysfs: ACPI: sysfs: add newlines when printing module parameters * acpi-pad: ACPI: PAD: Eliminate usage of uninitialized_var() macro * acpi-ec: ACPI: EC: add newline when printing 'ec_event_clearing' module parameter * acpi-pci: PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context() * acpi-prop: ACPI: property: use cached name in acpi_fwnode_get_named_child_node() commit 86ba54fb0816480941cda78a99f107ab2bbd4249 Merge: c81b30c895ca1 02d7f4005e942 afb0367a80553 8365a898fe53f 68f9b22842897 Author: Rafael J. Wysocki Date: Mon Aug 3 13:12:44 2020 +0200 Merge branches 'pm-sleep', 'pm-domains', 'powercap' and 'pm-tools' * pm-sleep: PM: sleep: spread "const char *" correctness PM: hibernate: fix white space in a few places freezer: Add unsafe version of freezable_schedule_timeout_interruptible() for NFS PM: sleep: core: Emit changed uevent on wakeup_sysfs_add/remove * pm-domains: PM: domains: Restore comment indentation for generic_pm_domain.child_links PM: domains: Fix up terminology with parent/child * powercap: powercap: Add Power Limit4 support powercap: idle_inject: Replace play_idle() with play_idle_precise() in comments powercap: intel_rapl: add support for Sapphire Rapids * pm-tools: pm-graph v5.7 - important s2idle fixes cpupower: Replace HTTP links with HTTPS ones cpupower: Fix NULL but dereferenced coccicheck errors cpupower: Fix comparing pointer to 0 coccicheck warns commit c81b30c895ca1aa65a692505a9d6c4c9494afb40 Merge: 2d5c80bcf8646 de002c55cadfc Author: Rafael J. Wysocki Date: Mon Aug 3 13:12:36 2020 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: (24 commits) cpufreq: intel_pstate: Fix EPP setting via sysfs in active mode cpufreq: intel_pstate: Rearrange the storing of new EPP values cpufreq: intel_pstate: Avoid enabling HWP if EPP is not supported cpufreq: intel_pstate: Clean up aperf_mperf_shift description cpufreq: powernv: Make some symbols static cpufreq: amd_freq_sensitivity: Mark sometimes used ID structs as __maybe_unused cpufreq: intel_pstate: Supply struct attribute description for get_aperf_mperf_shift() cpufreq: pcc-cpufreq: Mark sometimes used ID structs as __maybe_unused cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as __always_unused cpufreq: acpi-cpufreq: Mark sometimes used ID structs as __maybe_unused cpufreq: acpi-cpufreq: Mark 'dummy' variable as __always_unused cpufreq: powernv-cpufreq: Fix a bunch of kerneldoc related issues cpufreq: pasemi: Include header file for {check,restore}_astate prototypes cpufreq: cpufreq_governor: Demote store_sampling_rate() header to standard comment block cpufreq: cpufreq: Demote lots of function headers unworthy of kerneldoc status cpufreq: freq_table: Demote obvious misuse of kerneldoc to standard comment blocks cpufreq: Replace HTTP links with HTTPS ones cpufreq: intel_pstate: Fix static checker warning for epp variable cpufreq: Remove the weakly defined cpufreq_default_governor() cpufreq: Specify default governor on command line ... commit 2d5c80bcf86466d1f0b640b28aca44c691328160 Merge: 5b5642075c317 0a398945d6f3e Author: Rafael J. Wysocki Date: Mon Aug 3 13:12:29 2020 +0200 Merge branch 'pm-cpuidle' * pm-cpuidle: cpuidle: ACPI: fix 'return' with no value build warning intel_idle: Customize IceLake server support cpuidle: change enter_s2idle() prototype cpuidle: psci: Prevent domain idlestates until consumers are ready cpuidle: psci: Convert PM domain to platform driver cpuidle: psci: Fix error path via converting to a platform driver cpuidle: psci: Fail cpuidle registration if set OSI mode failed cpuidle: psci: Split into two separate build objects intel_idle: Eliminate redundant static variable commit 5b5642075c317e67ea342a2fb8023a8e754a5002 Merge: 9c8cc4d7c4127 0e0ffa855d159 02fd86b661794 Author: Rafael J. Wysocki Date: Mon Aug 3 13:11:39 2020 +0200 Merge branches 'pm-em' and 'pm-core' * pm-em: OPP: refactor dev_pm_opp_of_register_em() and update related drivers Documentation: power: update Energy Model description PM / EM: change name of em_pd_energy to em_cpu_energy PM / EM: remove em_register_perf_domain PM / EM: add support for other devices than CPUs in Energy Model PM / EM: update callback structure and add device pointer PM / EM: introduce em_dev_register_perf_domain function PM / EM: change naming convention from 'capacity' to 'performance' * pm-core: mmc: jz4740: Use pm_ptr() macro PM: Make *_DEV_PM_OPS macros use __maybe_unused PM: core: introduce pm_ptr() macro commit 9c8cc4d7c4127759eb84ba067b5e749410e2b512 Merge: f46cf335311c2 a7ee88c3d3d19 Author: Rafael J. Wysocki Date: Mon Aug 3 13:11:01 2020 +0200 Merge branch 'pm-devfreq' * pm-devfreq: PM / devfreq: Fix the wrong end with semicolon PM / devfreq: Fix indentaion of devfreq_summary debugfs node PM / devfreq: Clean up the devfreq instance name in sysfs attr memory: samsung: exynos5422-dmc: Add module param to control IRQ mode memory: samsung: exynos5422-dmc: Adjust polling interval and uptreshold memory: samsung: exynos5422-dmc: Use delayed timer as default PM / devfreq: Add support delayed timer for polling mode dt-bindings: devfreq: rk3399_dmc: Add rockchip,pmu phandle PM / devfreq: tegra: Add Dmitry as a maintainer PM / devfreq: event: Fix trivial spelling PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent commit 0b91111fb1a164fedbb68a9263afafd10ffa6ec3 Author: Loic Poulain Date: Thu Jun 18 11:17:42 2020 +0200 mac80211: Do not report beacon loss if beacon filtering enabled mac80211.h says: Beacon filter support is advertised with the IEEE80211_VIF_BEACON_FILTER interface capability. The driver needs to enable beacon filter support whenever power save is enabled, that is IEEE80211_CONF_PS is set. When power save is enabled, the stack will not check for beacon loss and the driver needs to notify about loss of beacons with ieee80211_beacon_loss(). Some controllers may want to dynamically enable the beacon filter capabilities on power save entry (CONF_PS) and disable it on exit. This is the case for the wcn36xx driver which only supports beacon filtering in PS mode (no CONNECTION_MONITOR support). When the mac80211 beacon monitor timer expires, the beacon filter flag must be checked again in case it as been changed in between (e.g. vif moved to PS mode). Signed-off-by: Loic Poulain Link: https://lore.kernel.org/r/1592471863-31402-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Johannes Berg commit 992414a18cd4de05fa3f8ff7e1c29af758bdee1a Merge: a68415c27ff36 ed00495333ccc Author: Ingo Molnar Date: Mon Aug 3 13:00:27 2020 +0200 Merge branch 'locking/nmi' into locking/core, to pick up completed topic branch Signed-off-by: Ingo Molnar commit 4203b19c27967d9eff6928f6a733f81892ffc592 Author: Roi Dayan Date: Mon Aug 3 10:33:05 2020 +0300 netfilter: flowtable: Set offload timeout when adding flow On heavily loaded systems the GC can take time to go over all existing conns and reset their timeout. At that time other calls like from nf_conntrack_in() can call of nf_ct_is_expired() and see the conn as expired. To fix this when we set the offload bit we should also reset the timeout instead of counting on GC to finish first iteration over all conns before the initial timeout. Fixes: 90964016e5d3 ("netfilter: nf_conntrack: add IPS_OFFLOAD status bit") Signed-off-by: Roi Dayan Signed-off-by: Pablo Neira Ayuso commit 73f9407b3eb893bc8a82293cc8d4dfa3db079c0b Author: Roi Dayan Date: Mon Aug 3 10:33:04 2020 +0300 netfilter: conntrack: Move nf_ct_offload_timeout to header file To be used by callers from other modules. [ Rename DAY to NF_CT_DAY to avoid possible symbol name pollution issue --Pablo ] Signed-off-by: Roi Dayan Reviewed-by: Oz Shlomo Signed-off-by: Pablo Neira Ayuso commit 2ef740da4fef947fb4614808fb61ca8ccb313e0b Author: Florian Westphal Date: Sun Aug 2 03:26:21 2020 +0200 selftests: netfilter: add meta iif/oif match test simple test case, but would have caught this: FAIL: iifgroupcount, want "packets 2", got table inet filter { counter iifgroupcount { packets 0 bytes 0 } } Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 2c81ef286c42c5bfc0d0a60219b781791d4bd55c Author: Colin Ian King Date: Thu Jul 23 16:22:40 2020 +0100 ceph: remove redundant initialization of variable mds The variable mds is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit a7caa88f8b72c136f9a401f498471b8a8e35370d Author: Xiubo Li Date: Thu Jul 23 15:32:25 2020 +0800 ceph: fix use-after-free for fsc->mdsc If the ceph_mdsc_init() fails, it will free the mdsc already. Reported-by: syzbot+b57f46d8d6ea51960b8c@syzkaller.appspotmail.com Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 8e298deb8d8c449d87acceab8c8bfef71b67b08d Author: Jia Yang Date: Thu Jul 23 10:25:52 2020 +0800 ceph: remove unused variables in ceph_mdsmap_decode() Fix build warnings: fs/ceph/mdsmap.c: In function ‘ceph_mdsmap_decode’: fs/ceph/mdsmap.c:192:7: warning: variable ‘info_cv’ set but not used [-Wunused-but-set-variable] fs/ceph/mdsmap.c:177:7: warning: variable ‘state_seq’ set but not used [-Wunused-but-set-variable] fs/ceph/mdsmap.c:123:15: warning: variable ‘mdsmap_cv’ set but not used [-Wunused-but-set-variable] Note that p is increased in ceph_decode_*. Signed-off-by: Jia Yang Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit f1f565a26976612121f97464f9245307422d0ce8 Author: Randy Dunlap Date: Fri Jul 17 16:36:04 2020 -0700 ceph: delete repeated words in fs/ceph/ Drop duplicated words "down" and "the" in fs/ceph/. [ idryomov: merge into a single patch ] Signed-off-by: Randy Dunlap Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 3b4168dd8b1d3e0bb129cf41e6bb50e217fe7781 Author: Xiubo Li Date: Thu Jul 16 10:05:58 2020 -0400 ceph: send client provided metric flags in client metadata Send metric flags to the MDS, indicating what metrics the client supports. Currently that consists of cap statistics, and read, write and metadata latencies. URL: https://tracker.ceph.com/issues/43435 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 18f473b384a64cef69f166a3e2b73d3d2eca82c6 Author: Xiubo Li Date: Thu Jul 16 10:05:57 2020 -0400 ceph: periodically send perf metrics to MDSes This will send the caps/read/write/metadata metrics to any available MDS once per second, which will be the same as the userland client. It will skip the MDS sessions which don't support the metric collection, as the MDSs will close socket connections when they get an unknown type message. We can disable the metric sending via the disable_send_metrics module parameter. [ jlayton: fix up endianness bug in ceph_mdsc_send_metrics() ] URL: https://tracker.ceph.com/issues/43215 Signed-off-by: Xiubo Li Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit aaf5a476201bf93bdab75d6922340516ee63f7e2 Author: Xiubo Li Date: Fri Jul 17 09:25:13 2020 -0400 ceph: check the sesion state and return false in case it is closed If the session is already in closed state, we should skip it. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 94f17c00d6687993101372f996cf6690ec9adf83 Author: Alexander A. Klimov Date: Wed Jul 8 08:53:28 2020 +0200 libceph: replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. [ idryomov: Do the same for the CRUSH paper and replace ceph.newdream.net with ceph.io. ] Signed-off-by: Alexander A. Klimov Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit c00e4522adff010141ce86839bb4fe494c853077 Author: Xu Wang Date: Wed Jul 8 07:03:22 2020 +0000 ceph: remove unnecessary cast in kfree() Remove unnecassary casts in the argument to kfree. Signed-off-by: Xu Wang Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 042f649810f61c4a834f3d6d866c567f7f6b3f8c Author: Jeff Layton Date: Wed Jul 1 11:54:43 2020 -0400 libceph: just have osd_req_op_init() return a pointer The caller can just ignore the return. No need for this wrapper that just casts the other function to void. [ idryomov: argument alignment ] Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit d1d9655052606fd9078e896668ec90191372d513 Author: Xiubo Li Date: Mon Jul 6 08:51:35 2020 -0400 ceph: do not access the kiocb after aio requests In aio case, if the completion comes very fast just before the ceph_read_iter() returns to fs/aio.c, the kiocb will be freed in the completion callback, then if ceph_read_iter() access again we will potentially hit the use-after-free bug. [ jlayton: initialize direct_lock early, and use it everywhere ] URL: https://tracker.ceph.com/issues/45649 Signed-off-by: Xiubo Li Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 585d72f33e7083972030fac7792ea3050a4a8dff Author: Jeff Layton Date: Tue Jun 30 15:36:21 2020 -0400 ceph: clean up and optimize ceph_check_delayed_caps() Make this loop look a bit more sane. Also optimize away the spinlock release/reacquire if we can't get an inode reference. Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit fa9967734227b44acb1b6918033f9122dc7825b9 Author: Xiubo Li Date: Wed Jul 1 01:52:48 2020 -0400 ceph: fix potential mdsc use-after-free crash Make sure the delayed work stopped before releasing the resources. cancel_delayed_work_sync() will only guarantee that the work finishes executing if the work is already in the ->worklist. That means after the cancel_delayed_work_sync() returns, it will leave the work requeued if it was rearmed at the end. That can lead to a use after free once the work struct is freed. Fix it by flushing the delayed work instead of trying to cancel it, and ensure that the work doesn't rearm if the mdsc is stopping. URL: https://tracker.ceph.com/issues/46293 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit b682c6d41bc23353b5d80e02ca4961ac67624f4c Author: Xiubo Li Date: Tue Jun 30 03:52:18 2020 -0400 ceph: switch to WARN_ON_ONCE in encode_supported_features() ...and let the errnos bubble up to the callers. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 4f1d756def68588b88068af1d5a4a3b6dc7e6e2a Author: Xiubo Li Date: Tue Jun 30 03:52:16 2020 -0400 ceph: add global total_caps to count the mdsc's total caps number This will help to reduce using the global mdsc->mutex lock in many places. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 3e699bd865527004773012da38febdf444fd5fa8 Author: Xiubo Li Date: Tue Jun 30 03:52:15 2020 -0400 ceph: add check_session_state() helper and make it global And remove the unsed mdsc parameter to simplify the code. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 5981fe5b0529ba25d95f37d7faa434183ad618c5 Author: Johannes Berg Date: Mon Aug 3 11:02:10 2020 +0200 mac80211: fix misplaced while instead of if This never was intended to be a 'while' loop, it should've just been an 'if' instead of 'while'. Fix this. I noticed this while applying another patch from Ben that intended to fix a busy loop at this spot. Cc: stable@vger.kernel.org Fixes: b16798f5b907 ("mac80211: mark station unauthorized before key removal") Reported-by: Ben Greear Link: https://lore.kernel.org/r/20200803110209.253009ae41ff.I3522aad099392b31d5cf2dcca34cbac7e5832dde@changeid Signed-off-by: Johannes Berg commit 6e6f0f0116079d6be42080064fe7079283a507ed Author: Ilya Dryomov Date: Tue Jun 16 09:58:49 2020 +0200 libceph: dump class and method names on method calls Signed-off-by: Ilya Dryomov commit 5133ba8f15911e98567cdb6b767be8080a636b0b Author: Ilya Dryomov Date: Wed Jun 10 14:41:30 2020 +0200 libceph: use target_copy() in send_linger() Instead of copying just oloc, oid and flags, copy the entire linger target. This is more for consistency than anything else, as send_linger() -> submit_request() -> __submit_request() sends the request regardless of what calc_target() says (i.e. both on CALC_TARGET_NO_ACTION and CALC_TARGET_NEED_RESEND). Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton commit 3b1648f10961ce41bb709dfcadfdb9836c9a8ab8 Author: Miaohe Lin Date: Sat Aug 1 17:15:49 2020 +0800 nl80211: use eth_zero_addr() to clear mac address Use eth_zero_addr() to clear mac address instead of memset(). Signed-off-by: Miaohe Lin Link: https://lore.kernel.org/r/1596273349-24333-1-git-send-email-linmiaohe@huawei.com Signed-off-by: Johannes Berg commit 47d76e31908d8fdb06c6c75e4f3c4d4a08c9c850 Author: Miaohe Lin Date: Sat Aug 1 17:12:38 2020 +0800 mac80211: use eth_zero_addr() to clear mac address Use eth_zero_addr() to clear mac address instead of memset(). Signed-off-by: Miaohe Lin Link: https://lore.kernel.org/r/1596273158-24183-1-git-send-email-linmiaohe@huawei.com Signed-off-by: Johannes Berg commit 6628d00116b37bd5ef44cc69f5a8df6b0d4e14b7 Author: John Crispin Date: Mon Aug 3 10:45:40 2020 +0200 mac8211: fix struct initialisation Sparse showed up with the following error. net/mac80211/agg-rx.c:480:43: warning: Using plain integer as NULL pointer Fixes: 2ab45876756f (mac80211: add support for the ADDBA extension element) Signed-off-by: John Crispin Link: https://lore.kernel.org/r/20200803084540.179908-1-john@phrozen.org Signed-off-by: Johannes Berg commit 4e56cde15f7d68cf86ff8efff8504497de152475 Author: Jouni Malinen Date: Fri Jul 31 21:38:30 2020 +0300 mac80211: Handle special status codes in SAE commit SAE authentication has been extended with H2E (IEEE 802.11 REVmd) and PK (WFA) options. Those extensions use special status code values in the SAE commit messages (Authentication frame with transaction sequence number 1) to identify which extension is in use. mac80211 was interpreting those new values as the AP denying authentication and that resulted in failure to complete SAE authentication in some cases. Fix this by adding exceptions for the new status code values 126 and 127. Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20200731183830.18735-1-jouni@codeaurora.org Signed-off-by: Johannes Berg commit 07c9983b567d0ef33aefc063299de95a987e12a8 Author: Hui Wang Date: Mon Aug 3 14:46:38 2020 +0800 Revert "ALSA: hda: call runtime_allow() for all hda controllers" This reverts commit 9a6418487b56 ("ALSA: hda: call runtime_allow() for all hda controllers"). The reverted patch already introduced some regressions on some machines: - on gemini-lake machines, the error of "azx_get_response timeout" happens in the hda driver. - on the machines with alc662 codec, the audio jack detection doesn't work anymore. Fixes: 9a6418487b56 ("ALSA: hda: call runtime_allow() for all hda controllers") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=208511 Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20200803064638.6139-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 45a4d8fd6c7926e7991a1b29233d725fe12935da Author: ChangSyun Peng Date: Fri Jul 31 17:50:31 2020 +0800 md/raid5: Allow degraded raid6 to do rmw Degraded raid6 always do reconstruct-write now. With raid6 xor supported, we can do rmw in degraded raid6. This patch can reduce many read IOs to improve performance. If the failed disk is P, Q or the disk we want to write to, we may need to do reconstruct-write in max degraded raid6. In this situation we can not read enough data from handle_stripe_dirtying() so we have to set force_rcw in handle_stripe_fill() to read all data. Reviewed-by: Alex Wu Reviewed-by: BingJing Chang Reviewed-by: Danny Shih Signed-off-by: ChangSyun Peng Signed-off-by: Song Liu commit a1c6ae3d9f3dd6aa5981a332a6f700cf1c25edef Author: ChangSyun Peng Date: Fri Jul 31 17:50:17 2020 +0800 md/raid5: Fix Force reconstruct-write io stuck in degraded raid5 In degraded raid5, we need to read parity to do reconstruct-write when data disks fail. However, we can not read parity from handle_stripe_dirtying() in force reconstruct-write mode. Reproducible Steps: 1. Create degraded raid5 mdadm -C /dev/md2 --assume-clean -l5 -n3 /dev/sda2 /dev/sdb2 missing 2. Set rmw_level to 0 echo 0 > /sys/block/md2/md/rmw_level 3. IO to raid5 Now some io may be stuck in raid5. We can use handle_stripe_fill() to read the parity in this situation. Cc: # v4.4+ Reviewed-by: Alex Wu Reviewed-by: BingJing Chang Reviewed-by: Danny Shih Signed-off-by: ChangSyun Peng Signed-off-by: Song Liu commit f5ec6723269d9652ce42927cc03485061d663b23 Author: Roger Pau Monne Date: Mon Jul 27 11:13:41 2020 +0200 Revert "xen/balloon: Fix crash when ballooning on x86 32 bit PAE" This reverts commit dfd74a1edfaba5864276a2859190a8d242d18952. This has been fixed by commit dca4436d1cf9e0d237c which added the out of bounds check to __add_memory, so that trying to add blocks past MAX_PHYSMEM_BITS will fail. Note the check in the Xen balloon driver was bogus anyway, as it checked the start address of the resource, but it should instead test the end address to assert the whole resource falls below MAX_PHYSMEM_BITS. Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20200727091342.52325-4-roger.pau@citrix.com Signed-off-by: Juergen Gross commit 88a479ff6ef8af7f07e11593d58befc644244ff7 Author: Roger Pau Monne Date: Mon Jul 27 11:13:40 2020 +0200 xen/balloon: make the balloon wait interruptible So it can be killed, or else processes can get hung indefinitely waiting for balloon pages. Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200727091342.52325-3-roger.pau@citrix.com Signed-off-by: Juergen Gross commit 1951fa33ec259abdf3497bfee7b63e7ddbb1a394 Author: Roger Pau Monne Date: Mon Jul 27 11:13:39 2020 +0200 xen/balloon: fix accounting in alloc_xenballooned_pages error path target_unpopulated is incremented with nr_pages at the start of the function, but the call to free_xenballooned_pages will only subtract pgno number of pages, and thus the rest need to be subtracted before returning or else accounting will be skewed. Signed-off-by: Roger Pau Monné Reviewed-by: Juergen Gross Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200727091342.52325-2-roger.pau@citrix.com Signed-off-by: Juergen Gross commit 7fe3530427e52dd53cd7366914864e29215180a4 Author: Connor McAdams Date: Sun Aug 2 20:29:27 2020 -0400 ALSA: hda/ca0132 - Fix AE-5 microphone selection commands. The ca0113 command had the wrong group_id, 0x48 when it should've been 0x30. The front microphone selection should now work. Signed-off-by: Connor McAdams Cc: Link: https://lore.kernel.org/r/20200803002928.8638-3-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit cc5edb1bd3f7bfe450f767b12423f6673822427b Author: Connor McAdams Date: Sun Aug 2 20:29:26 2020 -0400 ALSA: hda/ca0132 - Add new quirk ID for Recon3D. Add a new quirk ID for the Recon3D, as tested by me. Signed-off-by: Connor McAdams Cc: Link: https://lore.kernel.org/r/20200803002928.8638-2-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit a00dc409de455b64e6cb2f6d40cdb8237cdb2e83 Author: Connor McAdams Date: Sun Aug 2 20:29:25 2020 -0400 ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value. When the ZxR headphone gain control was added, the ca0132_switch_get function was not updated, which meant that the changes to the control state were not saved when entering/exiting alsamixer. Signed-off-by: Connor McAdams Cc: Link: https://lore.kernel.org/r/20200803002928.8638-1-conmanx360@gmail.com Signed-off-by: Takashi Iwai commit 3b5d1afd1f13bcab85eaa28223ad396694f929e3 Merge: f1ec5be17b9aa 2ac82e20e2377 Author: Takashi Iwai Date: Mon Aug 3 08:10:08 2020 +0200 Merge branch 'for-next' into for-linus commit 3a31cf3d210f85d57fd302d83514832ebacb3ca7 Author: Guoqing Jiang Date: Tue Jul 28 12:01:43 2020 +0200 raid5: don't duplicate code for different paths in handle_stripe As we can see, R5_LOCKED is set and s.locked is increased whether R5_ReWrite is set or not, so move it to common path. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 01b5d32a57fe83820d014485a4c41965bc3b5ce4 Author: Guoqing Jiang Date: Tue Jul 28 12:01:42 2020 +0200 raid5-cache: hold spinlock instead of mutex in r5c_journal_mode_show Replace mddev_lock with spin_lock to align with other show methods in raid5_attrs. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit b3db8a216393cc228ab4add580f488da55177b66 Author: Guoqing Jiang Date: Tue Jul 28 12:01:41 2020 +0200 md: print errno in super_written It is better to print errno instead of bi_status. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit e3914d596f79742ce3038ffdf66e4fa585ad7cd5 Author: Guoqing Jiang Date: Tue Jul 28 12:01:40 2020 +0200 md/raid5: remove the redundant setting of STRIPE_HANDLE The flag is already set before compare rcw with rmw, so it is not necessary to do it again. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit ec164d07aa771370c7c24c1fa7f7692ad30f01cb Author: Sebastian Parschauer Date: Tue Jul 28 12:01:39 2020 +0200 md: register new md sysfs file 'uuid' read-only Report the UUID of the MD array in the following format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx This is useful if you don't want to wait for udev to identify array. And it is also easy for script to monitor it with the format. Signed-off-by: Sebastian Parschauer [Guoqing: mention the change in md.rst] Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit d9c0fa509eafb31605bddda34e2e39f4354563b6 Author: Xiao Ni Date: Tue Jun 30 15:55:36 2020 +0800 md: fix max sectors calculation for super 1.0 To grow size of super 1.0 raid array, it is necessary to check the device max usable size. Now it uses rdev->sectors for max usable size. If one disk is 500G and the raid device only uses the 100GB of this disk. rdev->sectors can't tell the real max usable size. The max usable size should be dev_size-(superblock_size+bitmap_size+badblock_size). Also, remove unnecessary sb_start update in super_1_rdev_size_change(). Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit 4e722d4fe27899f90491065edb0bb0a757f0b955 Author: Randy Dunlap Date: Sat Jul 25 17:17:31 2020 -0700 xen: hypercall.h: fix duplicated word Change the repeated word "as" to "as a". Signed-off-by: Randy Dunlap Reviewed-by: Juergen Gross Cc: Boris Ostrovsky Cc: Juergen Gross Cc: xen-devel@lists.xenproject.org Link: https://lore.kernel.org/r/20200726001731.19540-1-rdunlap@infradead.org Signed-off-by: Juergen Gross commit e5a52fd2b8cdb700b3c07b030e050a49ef3156b9 Author: Randy Dunlap Date: Sat Jul 18 17:33:17 2020 -0700 xen/gntdev: gntdev.h: drop a duplicated word Drop the repeated word "of" in a comment. Signed-off-by: Randy Dunlap Reviewed-by: Juergen Gross Cc: Boris Ostrovsky Cc: Juergen Gross Cc: xen-devel@lists.xenproject.org Link: https://lore.kernel.org/r/20200719003317.21454-1-rdunlap@infradead.org Signed-off-by: Juergen Gross commit ff669aa8124035a432d2b7eecdd876b308cd48ee Author: Souptick Joarder Date: Sun Jul 12 09:09:55 2020 +0530 xen/privcmd: Convert get_user_pages*() to pin_user_pages*() In 2019, we introduced pin_user_pages*() and now we are converting get_user_pages*() to the new API as appropriate. [1] & [2] could be referred for more information. This is case 5 as per document [1]. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Reviewed-by: Juergen Gross Reviewed-by: Paul Durrant Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant Link: https://lore.kernel.org/r/1594525195-28345-4-git-send-email-jrdr.linux@gmail.com Signed-off-by: Juergen Gross commit a0c34d225183fd4aca61dccb50e5783fa2f26db1 Author: Souptick Joarder Date: Sun Jul 12 09:09:54 2020 +0530 xen/privcmd: Mark pages as dirty pages need to be marked as dirty before unpinned it in unlock_pages() which was oversight. This is fixed now. Signed-off-by: Souptick Joarder Suggested-by: John Hubbard Reviewed-by: Juergen Gross Reviewed-by: Paul Durrant Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant Link: https://lore.kernel.org/r/1594525195-28345-3-git-send-email-jrdr.linux@gmail.com Signed-off-by: Juergen Gross commit e398fb4bdf522abdeb8ddb61235bbf66065fc105 Author: Souptick Joarder Date: Sun Jul 12 09:09:53 2020 +0530 xen/privcmd: Corrected error handling path Previously, if lock_pages() end up partially mapping pages, it used to return -ERRNO due to which unlock_pages() have to go through each pages[i] till *nr_pages* to validate them. This can be avoided by passing correct number of partially mapped pages & -ERRNO separately, while returning from lock_pages() due to error. With this fix unlock_pages() doesn't need to validate pages[i] till *nr_pages* for error scenario and few condition checks can be ignored. Signed-off-by: Souptick Joarder Reviewed-by: Juergen Gross Reviewed-by: Paul Durrant Cc: John Hubbard Cc: Boris Ostrovsky Cc: Paul Durrant Link: https://lore.kernel.org/r/1594525195-28345-2-git-send-email-jrdr.linux@gmail.com Signed-off-by: Juergen Gross commit c6fe44d96fc1536af5b11cd859686453d1b7bfd1 Author: Linus Torvalds Date: Thu Jul 23 12:33:41 2020 -0700 list: add "list_del_init_careful()" to go with "list_empty_careful()" That gives us ordering guarantees around the pair. Signed-off-by: Linus Torvalds commit 2a9127fcf2296674d58024f83981f40b128fffea Author: Linus Torvalds Date: Thu Jul 23 10:16:49 2020 -0700 mm: rewrite wait_on_page_bit_common() logic It turns out that wait_on_page_bit_common() had several problems, ranging from just unfair behavioe due to re-queueing at the end of the wait queue when re-trying, and an outright bug that could result in missed wakeups (but probably never happened in practice). This rewrites the whole logic to avoid both issues, by simply moving the logic to check (and possibly take) the bit lock into the wakeup path instead. That makes everything much more straightforward, and means that we never need to re-queue the wait entry: if we get woken up, we'll be notified through WQ_FLAG_WOKEN, and the wait queue entry will have been removed, and everything will have been done for us. Link: https://lore.kernel.org/lkml/CAHk-=wjJA2Z3kUFb-5s=6+n0qbTs8ELqKFt9B3pH85a8fGD73w@mail.gmail.com/ Link: https://lore.kernel.org/lkml/alpine.LSU.2.11.2007221359450.1017@eggly.anvils/ Reported-by: Oleg Nesterov Reported-by: Hugh Dickins Cc: Michal Hocko Reviewed-by: Oleg Nesterov Signed-off-by: Linus Torvalds commit 7efd081582619e7c270d1c0a422385dcaa99fa9f Author: Paulo Alcantara Date: Tue Jul 21 09:36:44 2020 -0300 cifs: document and cleanup dfs mount cifs_mount() for DFS mounts is for a long time way too complex to follow, mostly because it lacks some documentation, does a lot of operations like resolving DFS roots and links, checking for path components, perform failover, crap code, etc. Besides adding some documentation to it, do some cleanup and ensure that the following is implemented and supported: * non-DFS mounts * DFS failover * DFS root mounts - tcon and cifs_sb must contain DFS path (NOT including prefix) - if prefix path, then save it in cifs_sb and it must not be changed * DFS link mounts - tcon and cifs_sb must contain DFS path (including prefix) - if prefix path, then save it in cifs_sb and it may be changed * prevent recursion on broken link referrals (MAX_NESTED_LINKS) * check every path component of the currently resolved target (including prefix), and chase them accordingly * make sure that DFS referrals go through newly resolved root servers Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 11375a59a99ca05086a1837c27d79e92dd8d4aed Author: Paulo Alcantara Date: Tue Jul 21 09:36:43 2020 -0300 cifs: only update prefix path of DFS links in cifs_tree_connect() For DFS root mounts that contain a prefix path, do not change them after failover. E.g., if the user mounts //srvA/root/dir1 and then lost connection to srvA, it will reconnect to //srvB/root/dir1 In case of DFS links, which may resolve to different prefix paths depending on their list of targets, the following must be supported: - mount //srvA/root/link/bar - connect to //srvA/share - set prefix path to "bar" - lost connection to srvA - reconnect to next target: //srvB/share/foo - set new prefix path to "foo/bar" In cifs_tree_connect(), check the server_type field of the cached DFS referral to determine whether or not prefix path should be updated. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit c6a80e1ff4106755b8e72a88e767deb7c9d45050 Author: Colin Ian King Date: Fri Jul 31 18:13:42 2020 +0100 cifs: fix double free error on share and prefix Currently if the call dfs_cache_get_tgt_share fails we cannot fully guarantee that share and prefix are set to NULL and the next iteration of the loop can end up potentially double freeing these pointers. Since the semantics of dfs_cache_get_tgt_share are ambiguous for failure cases with the setting of share and prefix (currently now and the possibly the future), it seems prudent to set the pointers to NULL when the objects are free'd to avoid any double frees. Addresses-Coverity: ("Double free") Fixes: 96296c946a2a ("cifs: handle RESP_GET_DFS_REFERRAL.PathConsumed in reconnect") Signed-off-by: Colin Ian King Signed-off-by: Steve French Reviewed-by: Paulo Alcantara (SUSE) commit 7548e1da8d2d345debb9c0f141c47e4077d6085b Author: Paulo Alcantara Date: Tue Jul 21 09:36:42 2020 -0300 cifs: handle RESP_GET_DFS_REFERRAL.PathConsumed in reconnect Use PathConsumed field when parsing prefixes of referral paths that either match a cache entry or are a complete prefix path of an existing entry. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit a52930353eaf443489a350a135c5525a4acbbf56 Author: Paulo Alcantara Date: Tue Jul 21 09:36:41 2020 -0300 cifs: handle empty list of targets in cifs_reconnect() In case there were no cached DFS referrals in reconn_setup_dfs_targets(), set cifs_sb to NULL prior to calling reconn_set_next_dfs_target() so it would not try to access an empty tgt_list. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 7d397a034d5c45528c7bdf7fc3752c4793029cce Author: Paulo Alcantara Date: Tue Jul 21 09:36:40 2020 -0300 cifs: rename reconn_inval_dfs_target() This function has nothing to do with *invalidation* but setting up the next target server from a cached referral. Rename it to reconn_set_next_dfs_target(). While at it, get rid of some meaningless checks. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 2e5de42445217c7c1310af8f4b3fe6f66bd865b1 Author: Paulo Alcantara Date: Tue Jul 21 09:36:39 2020 -0300 cifs: reduce number of referral requests in DFS link lookups When looking up the DFS cache with a referral path that has more than two path components, and is a complete prefix of an existing cache entry, do not request another referral and just return the matched entry as specified in MS-DFSC 3.2.5.5 Receiving a Root Referral Request or Link Referral Request. Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 565674d613d7f45d87284ba9f0be730ce4b335d0 Author: Stefan Metzmacher Date: Tue Jul 21 09:36:38 2020 -0300 cifs: merge __{cifs,smb2}_reconnect[_tcon]() into cifs_tree_connect() They were identical execpt to CIFSTCon() vs. SMB2_tcon(). These are also available via ops->tree_connect(). Signed-off-by: Stefan Metzmacher Signed-off-by: Paulo Alcantara (SUSE) Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 1a0e7f7c3c573a79bcd787d8a05e80651041b815 Author: Qinglang Miao Date: Sat Jul 25 16:56:01 2020 +0800 cifs: convert to use be32_add_cpu() Convert cpu_to_be32(be32_to_cpu(E1) + E2) to use be32_add_cpu(). Signed-off-by: Qinglang Miao Signed-off-by: Steve French commit a03f507de5f44673cd7c67e24f64b479057c2ce0 Author: Randy Dunlap Date: Sun Jul 19 17:13:16 2020 -0700 cifs: delete duplicated words in header files Drop repeated words in multiple comments. (be, use, the, See) Signed-off-by: Randy Dunlap Cc: Steve French Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Steve French commit 60e5e4b3bc8eccbcda9511fea7141963030d5af7 Author: Liao Pingfang Date: Tue Jul 14 18:59:12 2020 +0800 cifs: Remove the superfluous break Remove the superfuous break, as there is a 'return' before it. Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang Signed-off-by: Steve French commit 8e408fc9fd48664495147a4213467d99a8922c9d Author: Ronnie Sahlberg Date: Wed Jul 15 08:18:05 2020 +1000 cifs: smb1: Try failing back to SetFileInfo if SetPathInfo fails RHBZ 1145308 Some very old server may not support SetPathInfo to adjust the timestamps of directories. For these servers, try to open the directory and use SetFileInfo. Minor correction to patch included that was Reported-by: kernel test robot Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Tested-by: Kenneth D'souza commit a3713ec3d775ff9da2e46f6652b23ff598c3ed36 Author: Roberto Bergantinos Corpas Date: Fri Jul 3 11:29:32 2020 +0200 cifs`: handle ERRBaduid for SMB1 If server returns ERRBaduid but does not reset transport connection, we'll keep sending command with a non-valid UID for the server as long as transport is healthy, without actually recovering. This have been observed on the field. This patch adds ERRBaduid handling so that we set CifsNeedReconnect. map_and_check_smb_error() can be modified to extend use cases. Signed-off-by: Roberto Bergantinos Corpas Signed-off-by: Steve French Reviewed-by: Ronnie Sahlberg commit 66a4bbc327e740c65b19a471fb9911f7f4b876fb Author: Wei Yongjun Date: Tue Jul 7 19:27:41 2020 +0800 cifs: remove unused variable 'server' Fix build warning by removing unused variable 'server': fs/cifs/inode.c:1089:26: warning: variable server set but not used [-Wunused-but-set-variable] 1089 | struct TCP_Server_Info *server; | ^~~~~~ Signed-off-by: Wei Yongjun Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit 0a018944eee913962bce8ffebbb121960d5125d9 Author: Steve French Date: Thu Jul 16 00:34:21 2020 -0500 smb3: warn on confusing error scenario with sec=krb5 When mounting with Kerberos, users have been confused about the default error returned in scenarios in which either keyutils is not installed or the user did not properly acquire a krb5 ticket. Log a warning message in the case that "ENOKEY" is returned from the get_spnego_key upcall so that users can better understand why mount failed in those two cases. CC: Stable Signed-off-by: Steve French commit baf57b56d3604880ccb3956ec6c62ea894f5de99 Author: Paul Aurich Date: Thu Jul 9 22:01:16 2020 -0700 cifs: Fix leak when handling lease break for cached root fid Handling a lease break for the cached root didn't free the smb2_lease_break_work allocation, resulting in a leak: unreferenced object 0xffff98383a5af480 (size 128): comm "cifsd", pid 684, jiffies 4294936606 (age 534.868s) hex dump (first 32 bytes): c0 ff ff ff 1f 00 00 00 88 f4 5a 3a 38 98 ff ff ..........Z:8... 88 f4 5a 3a 38 98 ff ff 80 88 d6 8a ff ff ff ff ..Z:8........... backtrace: [<0000000068957336>] smb2_is_valid_oplock_break+0x1fa/0x8c0 [<0000000073b70b9e>] cifs_demultiplex_thread+0x73d/0xcc0 [<00000000905fa372>] kthread+0x11c/0x150 [<0000000079378e4e>] ret_from_fork+0x22/0x30 Avoid this leak by only allocating when necessary. Fixes: a93864d93977 ("cifs: add lease tracking to the cached root fid") Signed-off-by: Paul Aurich CC: Stable # v4.18+ Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 798b7347e4f29553db4b996393caf12f5b233daf Author: Zhe Li Date: Fri Jun 19 17:06:35 2020 +0800 jffs2: fix UAF problem The log of UAF problem is listed below. BUG: KASAN: use-after-free in jffs2_rmdir+0xa4/0x1cc [jffs2] at addr c1f165fc Read of size 4 by task rm/8283 ============================================================================= BUG kmalloc-32 (Tainted: P B O ): kasan: bad access detected ----------------------------------------------------------------------------- INFO: Allocated in 0xbbbbbbbb age=3054364 cpu=0 pid=0 0xb0bba6ef jffs2_write_dirent+0x11c/0x9c8 [jffs2] __slab_alloc.isra.21.constprop.25+0x2c/0x44 __kmalloc+0x1dc/0x370 jffs2_write_dirent+0x11c/0x9c8 [jffs2] jffs2_do_unlink+0x328/0x5fc [jffs2] jffs2_rmdir+0x110/0x1cc [jffs2] vfs_rmdir+0x180/0x268 do_rmdir+0x2cc/0x300 ret_from_syscall+0x0/0x3c INFO: Freed in 0x205b age=3054364 cpu=0 pid=0 0x2e9173 jffs2_add_fd_to_list+0x138/0x1dc [jffs2] jffs2_add_fd_to_list+0x138/0x1dc [jffs2] jffs2_garbage_collect_dirent.isra.3+0x21c/0x288 [jffs2] jffs2_garbage_collect_live+0x16bc/0x1800 [jffs2] jffs2_garbage_collect_pass+0x678/0x11d4 [jffs2] jffs2_garbage_collect_thread+0x1e8/0x3b0 [jffs2] kthread+0x1a8/0x1b0 ret_from_kernel_thread+0x5c/0x64 Call Trace: [c17ddd20] [c02452d4] kasan_report.part.0+0x298/0x72c (unreliable) [c17ddda0] [d2509680] jffs2_rmdir+0xa4/0x1cc [jffs2] [c17dddd0] [c026da04] vfs_rmdir+0x180/0x268 [c17dde00] [c026f4e4] do_rmdir+0x2cc/0x300 [c17ddf40] [c001a658] ret_from_syscall+0x0/0x3c The root cause is that we don't get "jffs2_inode_info.sem" before we scan list "jffs2_inode_info.dents" in function jffs2_rmdir. This patch add codes to get "jffs2_inode_info.sem" before we scan "jffs2_inode_info.dents" to slove the UAF problem. Signed-off-by: Zhe Li Reviewed-by: Hou Tao Signed-off-by: Richard Weinberger commit a68005a36dc3a351957821d8820ffbfacb21dd36 Author: Zhe Li Date: Tue Jun 9 10:09:27 2020 +0800 jffs2: fix jffs2 mounting failure Thanks for the advice mentioned in the email. This is my v3 patch for this problem. Mounting jffs2 on nand flash will get message "failed: I/O error" with the steps listed below. 1.umount jffs2 2.erase nand flash 3.mount jffs2 on it (this mounting operation will be successful) 4.do chown or chmod to the mount point directory 5.umount jffs2 6.mount jffs2 on nand flash After step 6, we will get message "mount ... failed: I/O error". Typical image of this problem is like: Empty space found from 0x00000000 to 0x008a0000 Inode node at xx, totlen 0x00000044, #ino 1, version 1, isize 0... The reason for this mounting failure is that at the end of function jffs2_scan_medium(), jffs2 will check the used_size and some info of nr_blocks.If conditions are met, it will return -EIO. The detail is that, in the steps listed above, step 4 will write jffs2_raw_inode into flash without jffs2_raw_dirent, which will cause that there are some jffs2_raw_inode but no jffs2_raw_dirent on flash. This will meet the condition at the end of function jffs2_scan_medium() and return -EIO if we umount jffs2 and mount it again. We notice that jffs2 add the value of c->unchecked_size if we find an inode node while mounting. And jffs2 will never add the value of c->unchecked_size in other situations. So this patch add one more condition about c->unchecked_size of the judgement to fix this problem. Signed-off-by: Zhe Li Signed-off-by: Richard Weinberger commit 094b6d1295474f338201b846a1f15e72eb0b12cf Author: Zhihao Cheng Date: Tue Jul 7 20:51:40 2020 +0800 ubifs: Fix wrong orphan node deletion in ubifs_jnl_update|rename There a wrong orphan node deleting in error handling path in ubifs_jnl_update() and ubifs_jnl_rename(), which may cause following error msg: UBIFS error (ubi0:0 pid 1522): ubifs_delete_orphan [ubifs]: missing orphan ino 65 Fix this by checking whether the node has been operated for adding to orphan list before being deleted, Signed-off-by: Zhihao Cheng Fixes: 823838a486888cf484e ("ubifs: Add hashes to the tree node cache") Signed-off-by: Richard Weinberger commit c3fc1a3919e35a9d8157ed3ae6fd0a478293ba2c Author: Zhihao Cheng Date: Tue Jul 7 21:41:01 2020 +0800 ubi: fastmap: Free fastmap next anchor peb during detach ubi_wl_entry related with the fm_next_anchor PEB is not freed during detach, which causes a memory leak. Don't forget to release fm_next_anchor PEB while detaching ubi from mtd when CONFIG_MTD_UBI_FASTMAP is enabled. Signed-off-by: Zhihao Cheng Fixes: 4b68bf9a69d22d ("ubi: Select fastmap anchor PEBs considering...") Signed-off-by: Richard Weinberger commit 3b185255bb2f34fa6927619b9ef27f192a3d9f5a Author: Zhihao Cheng Date: Tue Jul 7 21:41:00 2020 +0800 ubi: fastmap: Don't produce the initial next anchor PEB when fastmap is disabled Following process triggers a memleak caused by forgetting to release the initial next anchor PEB (CONFIG_MTD_UBI_FASTMAP is disabled): 1. attach -> __erase_worker -> produce the initial next anchor PEB 2. detach -> ubi_fastmap_close (Do nothing, it should have released the initial next anchor PEB) Don't produce the initial next anchor PEB in __erase_worker() when fastmap is disabled. Signed-off-by: Zhihao Cheng Suggested-by: Sascha Hauer Fixes: f9c34bb529975fe ("ubi: Fix producing anchor PEBs") Reported-by: syzbot+d9aab50b1154e3d163f5@syzkaller.appspotmail.com Signed-off-by: Richard Weinberger commit 0c84b7fc973f9220ef8732c430ccc7c92d083184 Author: Randy Dunlap Date: Sat Jul 18 17:29:54 2020 -0700 MTD: pfow.h: drop a duplicated word Drop the repeated word "can" in a comment. Signed-off-by: Randy Dunlap Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Richard Weinberger commit f8951902b9daa65ba240ce8a054c727748df2147 Author: Randy Dunlap Date: Sat Jul 18 17:32:08 2020 -0700 MTD: mtd-abi.h: drop a duplicated word Drop the repeated word "mode" in a comment. Signed-off-by: Randy Dunlap Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: linux-mtd@lists.infradead.org Signed-off-by: Richard Weinberger commit fcf44196305788b173748356a4f3ac2630454ba0 Author: Randy Dunlap Date: Sun Jul 19 17:14:44 2020 -0700 ubifs: misc.h: delete a duplicated word Drop the repeated word "as" in a comment. Signed-off-by: Randy Dunlap Cc: Richard Weinberger Cc: linux-mtd@lists.infradead.org Signed-off-by: Richard Weinberger commit a7a8f4a1e6b309b5365be784a07bbda1ceab2d9e Author: Martin Kaistra Date: Tue Jul 7 12:31:59 2020 +0200 ubifs: add option to specify version for new file systems Instead of creating ubifs file systems with UBIFS_FORMAT_VERSION by default, add a module parameter ubifs.default_version to allow the user to specify the desired version. Valid values are 4 to UBIFS_FORMAT_VERSION (currently 5). This way, one can for example create a file system with version 4 on kernel 4.19 which can still be mounted rw when downgrading to kernel 4.9. Signed-off-by: Martin Kaistra Signed-off-by: Richard Weinberger commit 3d19792a7d7279b1aece733c2605a3671c6459c9 Author: Alexander A. Klimov Date: Mon Jul 13 19:04:20 2020 +0200 mtd: rawnand: omap_elm: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Richard Weinberger commit c13ac5552546c8971c0a4a3e947e25b0f8786aa9 Author: Alexander A. Klimov Date: Mon Jul 13 18:54:08 2020 +0200 mtd: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Rob Herring Signed-off-by: Richard Weinberger commit 614a895fc69497d99cc02c076fa712c75194eab3 Author: Alexander A. Klimov Date: Thu Jul 9 20:07:33 2020 +0200 mtd: hyperbus: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Richard Weinberger commit cb413909ae849bd2126122fcc11838e905c34951 Merge: fbd9b5437b668 e93a977367b2a Author: Richard Weinberger Date: Sun Aug 2 21:36:34 2020 +0200 Merge tag 'spi-nor/for-5.9' of https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next SPI NOR core changes: - Disable Quad Mode in spi_nor_restore(). - Don't abort BFPT parsing when QER reserved value is used. - Add support/update capabilities for few flashes. - Drop s70fl01gs flash: it does not support RDSR(05h) which is critical for erase/write. - Merge the SPIMEM DTR bits in spi-nor/next to avoid conflicts during the release cycle. SPI NOR controller drivers changes: - Move the cadence-quadspi driver to spi-mem. The series was taken through the SPI tree. Merge it also in spi-nor/next to avoid conflicts during the release cycle. - intel-spi: - Add new PCI IDs. - Ignore the Write Disable command, the controller doesn't support it. - Fix performance regression. commit 77a92189ecfd061616ad531d386639aab7baaad9 Author: Pablo Neira Ayuso Date: Sun Aug 2 03:05:25 2020 +0200 netfilter: nf_tables: report EEXIST on overlaps Replace EBUSY by EEXIST in the following cases: - If the user adds a chain with a different configuration such as different type, hook and priority. - If the user adds a non-base chain that clashes with an existing basechain. - If the user adds a { key : value } mapping element and the key exists but the value differs. - If the device already belongs to an existing flowtable. User describe that this error reporting is confusing: - https://bugzilla.netfilter.org/show_bug.cgi?id=1176 - https://bugzilla.netfilter.org/show_bug.cgi?id=1413 Signed-off-by: Pablo Neira Ayuso commit 3dc05ffb04436020f63138186dbc4f37bd938552 Author: Nicolas Saenz Julienne Date: Tue Jul 21 13:23:02 2020 +0200 brcmfmac: Set timeout value when configuring power save Set the timeout value as per cfg80211's set_power_mgmt() request. If the requested value value is left undefined we set it to 2 seconds, the maximum supported value. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200721112302.22718-1-nsaenzjulienne@suse.de commit a080ecb11ae22f8433b8f88554f1f43e93a97a78 Author: Linus Walleij Date: Wed Jul 22 13:17:25 2020 +0200 bcma: gpio: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Cc: Rafał Miłecki Cc: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200722111725.210923-1-linus.walleij@linaro.org commit 92d26d1abf8e4b563bb8d98ce1bf31681364e4a8 Author: Zheng Yongjun Date: Tue Jul 21 16:39:35 2020 +0800 drivers: bcma: remove set but not used variable `addrh` and `sizeh` Fixes gcc '-Wunused-but-set-variable' warning: drivers/bcma/scan.c: In function 'bcma_erom_get_addr_desc': drivers/bcma/scan.c:219 warning: variable `addrh` and `sizeh` set but not used [-Wunused-but-set-variable] Signed-off-by: Zheng Yongjun Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200721083935.13306-1-zhengyongjun3@huawei.com commit 20e6421344b5bc2f97b8e2db47b6994368417904 Author: Wang Hai Date: Thu Jul 30 15:39:39 2020 +0800 wl1251: fix always return 0 error wl1251_event_ps_report() should not always return 0 because wl1251_ps_set_mode() may fail. Change it to return 'ret'. Fixes: f7ad1eed4d4b ("wl1251: retry power save entry") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200730073939.33704-1-wanghai38@huawei.com commit c3ab1804b168867974a4da541f6e77487a1074f5 Author: Vaibhav Gupta Date: Tue Jul 28 17:11:28 2020 +0530 airo: use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200728114128.1218310-1-vaibhavgupta40@gmail.com commit 4dd9e7e08bc39ef34be40be8a0ddc6469fec8ff6 Author: Flavio Suligoi Date: Thu Jul 23 15:52:54 2020 +0200 intersil: fix wiki website url In some Intersil files, the wiki url is still the old "wireless.kernel.org" instead of the new "wireless.wiki.kernel.org" Signed-off-by: Flavio Suligoi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723135254.594984-1-f.suligoi@asem.it commit 141bc9abbbffa89d020957caa9ac4a61d0ef1e26 Author: Wang Hai Date: Thu Jul 30 14:49:10 2020 +0800 qtnfmac: Missing platform_device_unregister() on error in qtnf_core_mac_alloc() Add the missing platform_device_unregister() before return from qtnf_core_mac_alloc() in the error handling case. Fixes: 616f5701f4ab ("qtnfmac: assign each wiphy to its own virtual platform device") Reported-by: Hulk Robot Signed-off-by: Wang Hai Reviewed-by: Sergey Matyukevich Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200730064910.37589-1-wanghai38@huawei.com commit e52525c0c320076deab35409a6b2cff6388959b8 Author: Christophe JAILLET Date: Wed Jul 22 12:17:16 2020 +0200 ipw2x00: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'ipw2100_msg_allocate()' (ipw2100.c), GFP_KERNEL can be used because it is called from the probe function. The call chain is: ipw2100_pci_init_one (the probe function) --> ipw2100_queues_allocate --> ipw2100_msg_allocate Moreover, 'ipw2100_msg_allocate()' already uses GFP_KERNEL for some other memory allocations. When memory is allocated in 'status_queue_allocate()' (ipw2100.c), GFP_KERNEL can be used because it is called from the probe function. The call chain is: ipw2100_pci_init_one (the probe function) --> ipw2100_queues_allocate --> ipw2100_rx_allocate --> status_queue_allocate Moreover, 'ipw2100_rx_allocate()' already uses GFP_KERNEL for some other memory allocations. When memory is allocated in 'bd_queue_allocate()' (ipw2100.c), GFP_KERNEL can be used because it is called from the probe function. The call chain is: ipw2100_pci_init_one (the probe function) --> ipw2100_queues_allocate --> ipw2100_rx_allocate --> bd_queue_allocate Moreover, 'ipw2100_rx_allocate()' already uses GFP_KERNEL for some other memory allocations. When memory is allocated in 'ipw2100_tx_allocate()' (ipw2100.c), GFP_KERNEL can be used because it is called from the probe function. The call chain is: ipw2100_pci_init_one (the probe function) --> ipw2100_queues_allocate --> ipw2100_tx_allocate Moreover, 'ipw2100_tx_allocate()' already uses GFP_KERNEL for some other memory allocations. When memory is allocated in 'ipw_queue_tx_init()' (ipw2200.c), GFP_KERNEL can be used because it is called from a call chain that already uses GFP_KERNEL and no spin_lock is taken in the between. The call chain is: ipw_up --> ipw_load --> ipw_queue_reset --> ipw_queue_tx_init 'ipw_up()' already uses GFP_KERNEL for some other memory allocations. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200722101716.26185-1-christophe.jaillet@wanadoo.fr commit 9130559cf8dbc34b3d54a2ab5f2a746b964c46a4 Author: Christophe JAILLET Date: Wed Jul 22 12:17:01 2020 +0200 ipw2100: Use GFP_KERNEL instead of GFP_ATOMIC in some memory allocation The call chain is: ipw2100_pci_init_one (the probe function) --> ipw2100_queues_allocate --> ipw2100_tx_allocate No lock is taken in the between. So it is safe to use GFP_KERNEL in 'ipw2100_tx_allocate()'. BTW, 'ipw2100_queues_allocate()' also calls 'ipw2100_msg_allocate()' which already allocates some memory using GFP_KERNEL. Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200722101701.26126-1-christophe.jaillet@wanadoo.fr commit 99aaa1aafa5c745c0d01f6f980f990ed0edd88ba Author: Vaibhav Gupta Date: Tue Jul 21 20:35:48 2020 +0530 hostap: use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions as through the generic framework, PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200721150547.371763-1-vaibhavgupta40@gmail.com commit 140c6026167b2b394bf3a8a882f3bfbca0726111 Author: Alexander A. Klimov Date: Sun Jul 19 13:11:24 2020 +0200 b43legacy: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200719111124.58167-1-grandmaster@al2klimov.de commit 2d96c1ed4bab52e2dced98746ecc978a1ac0eeb7 Author: Alexander A. Klimov Date: Sun Jul 19 13:01:15 2020 +0200 b43: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200719110115.58085-1-grandmaster@al2klimov.de commit 348cb5dc4d702e071efb4f70c4dacfe2473c815d Author: Alexander A. Klimov Date: Sat Jul 18 12:02:40 2020 +0200 ipw2x00: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200718100240.98593-1-grandmaster@al2klimov.de commit 560a218d1ce6ea36df6fb943a1065181df90a4d6 Author: Vaibhav Gupta Date: Fri Jul 17 16:39:29 2020 +0530 rt2x00: pci: use generic power management Drivers using legacy PM have to manage PCI states and device's PM states themselves. They also need to take care of configuration registers. With improved and powerful support of generic PM, PCI Core takes care of above mentioned, device-independent, jobs. The callbacks make use of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device() and pci_set_power_state() to do required operations. In generic mode, they are no longer needed. Change function parameter in both .suspend() and .resume() to "struct device*" type. Use dev_get_drvdata() to get drv data. The .suspend() callback is invoking rt2x00lib_suspend() which needs to be modified as generic rt2x00pci_suspend() has no pm_message_t type argument, passed to it, which is required by it according to its declaration. Although this variable remained unused in the function body. Hence, remove it from the function definition & declaration. rt2x00lib_suspend() is also invoked by rt2x00usb_suspend() and rt2x00soc_suspend(). Thus, modify the functional call accordingly in their function body. Earlier, .suspend() & .resume() were exported and were used by the following drivers: - drivers/net/wireless/ralink/rt2x00/rt2400pci.c - drivers/net/wireless/ralink/rt2x00/rt2500pci.c - drivers/net/wireless/ralink/rt2x00/rt2800pci.c - drivers/net/wireless/ralink/rt2x00/rt61pci.c Now, we only need to bind "struct dev_pm_ops" variable to "struct pci_driver". Thus, make the callbacks static. Declare an "extern const struct dev_pm_ops" variable and bind PM callbacks to it. Now, export the variable instead and use it in respective drivers. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200717110928.454867-1-vaibhavgupta40@gmail.com commit c83e2a6e2fbbb7d47ea46fd7cb1f01292f2d0b6e Author: Ajay Singh Date: Fri Jul 17 05:11:38 2020 +0000 wilc1000: Move wilc1000 SDIO ID's from driver source to common header file Moved macros used for Vendor/Device ID from wilc1000 driver to common header file and changed macro name for consistency with other macros. Signed-off-by: Ajay Singh Acked-by: Ulf Hansson Acked-by: Pali Rohár Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200717051134.19160-1-ajay.kathat@microchip.com commit 880e21490be68ef9cc8185962e9b5722a0f1fc4d Author: Navid Emamdoost Date: Sat Jul 18 00:26:29 2020 -0500 mt7601u: add missing release on skb in mt7601u_mcu_msg_send In the implementation of mt7601u_mcu_msg_send(), skb is supposed to be consumed on all execution paths. Release skb before returning if test_bit() fails. Signed-off-by: Navid Emamdoost Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200718052630.11032-1-navid.emamdoost@gmail.com commit 3f4600de8c93917594a8b3c9ca713160ee4d563c Author: Wolfram Sang Date: Thu Jun 25 18:52:10 2020 +0200 iwlwifi: yoyo: don't print failure if debug firmware is missing Missing this firmware is not fatal, my wifi card still works. Even more, I couldn't find any documentation what it is or where to get it. So, I don't think the users should be notified if it is missing. If you browse the net, you see the message is present is in quite some logs. Better remove it. Signed-off-by: Wolfram Sang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200625165210.14904-1-wsa@kernel.org commit 7b080e085943eb9b2862a04b0450afe17e286a21 Author: Ping-Cheng Chen Date: Fri Jul 24 13:42:08 2020 +0800 rtw88: 8821c: coex: add functions and parameters Without this patch, RTL8821CE will not have coex support, and will crash the system because of the NULL pointers for the coex functions. While RTL8822C series are WiFi + BT combo chips, it needs the co-existence mechanism for the device to work on both WiFi and BT without interfering each other. And the coex support has already been added before, most of the mechanisms are implemented. The driver should just add corresponding functions to operate on different types of chips and its coex parameters. Fixes: f745eb9ca5bf ("rtw88: 8821c: Add 8821CE to Kconfig and Makefile") Signed-off-by: Ping-Cheng Chen Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200724054208.31115-1-yhchuang@realtek.com commit 9de6959f8584064de8c1d7392e3a6bb50a4a9c18 Author: Wei Yongjun Date: Tue Jul 21 21:49:01 2020 +0800 rtw88: 8821c: make symbol 'rtw8821c_rtw_pwr_track_tbl' static The sparse tool complains as follows: drivers/net/wireless/realtek/rtw88/rtw8821c.c:1374:32: warning: symbol 'rtw8821c_rtw_pwr_track_tbl' was not declared. Should it be static? This variable is not used outside of rtw8821c.c, so this commit marks it static. Fixes: 3a4312828ce1 ("rtw88: 8821c: add power tracking") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200721134901.33968-1-weiyongjun1@huawei.com commit c376c1fc87b77ae06ed6fa18d424ab548ac3a8fc Author: Tzu-En Huang Date: Fri Jul 17 14:49:37 2020 +0800 rtw88: add h2c command in debugfs It's very useful to send H2C command for debug usage. Add an entry for sending H2C command to firmware. usage example: echo 42,00,00,43,02,00,00,00 > /sys/kernel/debug/ieee80211/phyX/rtw88 Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200717064937.27966-8-yhchuang@realtek.com commit 752310ed2b406831d71aeaf493b488f90c673a3c Author: Yan-Hsuan Chuang Date: Fri Jul 17 14:49:36 2020 +0800 rtw88: allows driver to enable/disable beacon Enable/disable beacon accordingly when the BSS info changed. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200717064937.27966-7-yhchuang@realtek.com commit 40b788d15832f5947b6d4e4ff3afea9af267bac6 Author: Yan-Hsuan Chuang Date: Fri Jul 17 14:49:35 2020 +0800 rtw88: add ieee80211_ops::change_interface Sometimes mac80211 will just ask driver to change the interface instead of to remove and then add a new one. And for driver, to change the interface is just simply to remove and add a new one but change the type of it. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200717064937.27966-6-yhchuang@realtek.com commit 3f194bd4ca1cd9b8eef34d37d562279dbeb80319 Author: Yan-Hsuan Chuang Date: Fri Jul 17 14:49:34 2020 +0800 rtw88: coex: only skip coex triggered by BT info The coex mechanism used to skip upon the freeze flag is raised. That will cause the coex mechanism being skipped unexpectedly. Coex only wanted to keep the TDMA table from being changed by BT side. So, check the freeze and reason, if the coex reason is coming from BT info, skip it, to make sure the coex triggered by Wifi itself can work. This is required for the AP mode, while the control flow is different with STA mode. When starting an AP mode, the AP mode needs to start working immedaitely after leaving IPS, and the freeze flag could be raised. If the coex info is skipped, then the AP mode will not set the antenna owner, leads to TX stuck. Fixes: 4136214f7c46 ("rtw88: add BT co-existence support") Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200717064937.27966-5-yhchuang@realtek.com commit d8e030c74e8394a9a452b34e3a8d95d9236b45c3 Author: Tzu-En Huang Date: Fri Jul 17 14:49:33 2020 +0800 rtw88: update tx descriptor of mgmt and reserved page packets Previous settings for TX descriptors of and reserved page packets are insufficient. For the sequence number of packets downloaded to reserved page, it should be filled by hardware. And for ps-poll packets in reserved page, to prevent AID being changed by hardware, NAVUSEHDR should be set. Additionally, the rate should be adjusted based on the current band for mgmt and reserved page packets. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200717064937.27966-4-yhchuang@realtek.com commit 4dd86b901d1373ef8446ecb50a7ca009f3475211 Author: Tsang-Shian Lin Date: Fri Jul 17 14:49:32 2020 +0800 rtw88: fix short GI capability based on current bandwidth Fix the transmission is not sent with short GI under some conditions even if the receiver supports short GI. If VHT capability IE exists in the beacon, the original code uses the short GI for 80M field as driver's short GI setting for transmission, even the current bandwidth is not 80MHz. Short GI supported fields for 20M/40M are informed in HT capability information element, and short GI supported field for 80M is informed in VHT capability information element. These three fields may be set to different values. Driver needs to record each short GI support field for each bandwidth, and send correct info depends on current bandwidth to the WiFi firmware. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Tsang-Shian Lin Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200717064937.27966-3-yhchuang@realtek.com commit ae44fa993e8e6c1a1d22e5ca03d9eadd53b2745b Author: Tsang-Shian Lin Date: Fri Jul 17 14:49:31 2020 +0800 rtw88: fix LDPC field for RA info Convert the type of LDPC field to boolen because LDPC field of RA info H2C command to firmware is only one bit. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Tsang-Shian Lin Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200717064937.27966-2-yhchuang@realtek.com commit 84d47961a02c4568774b0a4e4b1373377786691c Author: Christophe JAILLET Date: Wed Jul 22 12:45:34 2020 +0200 prism54: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'islpci_alloc_memory()' (islpci_dev.c), GFP_KERNEL can be used because it is only called from a probe function and no spin_lock is taken in the between. The call chain is: prism54_probe (probe function, in 'islpci_hotplug.c') --> islpci_setup (in 'islpci_dev.c') --> islpci_alloc_memory (in 'islpci_dev.c') @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200722104534.30760-1-christophe.jaillet@wanadoo.fr commit 81cf72b74671ab945bed00ef8da78078c04998ce Author: Vaibhav Gupta Date: Tue Jul 21 18:25:15 2020 +0530 prism54: islpci_hotplug: use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions as through the generic framework, PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200721125514.145607-1-vaibhavgupta40@gmail.com commit 87b589a19901552a6d4b9976c17530d73e3c2dcf Author: Alexander A. Klimov Date: Sun Jul 19 14:12:24 2020 +0200 prism54: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200719121224.58581-1-grandmaster@al2klimov.de commit ba78405ecaac382d65d16dcd6798d8c64e264432 Author: Christophe JAILLET Date: Wed Jul 22 12:27:07 2020 +0200 p54: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'p54p_probe()', GFP_KERNEL can be used because it is the probe function and no spin_lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200722102707.27486-1-christophe.jaillet@wanadoo.fr commit 614946480f8f7de9ad077bca36e0c433e426a3dd Author: Xu Wang Date: Mon Jul 27 02:04:05 2020 +0000 mwifiex: 11n_rxreorder: Remove unnecessary cast in kfree() Remove unnecassary casts in the argument to kfree. Signed-off-by: Xu Wang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200727020405.8476-1-vulab@iscas.ac.cn commit 1751a7352b632991600c3e7e604be3920a82b386 Author: Andy Shevchenko Date: Thu Jul 30 18:40:26 2020 +0300 rtlwifi: btcoex: use %*ph to print small buffer Use %*ph format to print small buffer as hex string. Signed-off-by: Andy Shevchenko Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200730154026.39901-1-andriy.shevchenko@linux.intel.com commit 56b06d4da8128a73dd1568cf65cb57725cc71968 Author: Colin Ian King Date: Thu Jul 23 17:32:14 2020 +0100 rtlwifi: btcoex: remove redundant initialization of variables ant_num and single_ant_path The variables ant_num and single_ant_path are being initialized with a value that is never read and are being updated later with a new value. The initializations are redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200723163214.995226-1-colin.king@canonical.com commit 98f80899e16832d05f58a7ee6cdbf6c708f5d120 Merge: dfecd3e00cd32 5648d1c9cadb0 Author: Kalle Valo Date: Sun Aug 2 17:46:30 2020 +0300 Merge tag 'mt76-for-kvalo-2020-07-21' of https://github.com/nbd168/wireless mt76 patches for 5.9 * locking fixes * tx queue mapping fixes for 7615/7915 * ARP filter offload for 7663 * runtime power management for 7663 * testmode support for mfg calibration * memory leak fixes * support for more channels # gpg: Signature made Tue 21 Jul 2020 08:01:28 PM EEST using DSA key ID 02A76EF5 # gpg: Good signature from "Felix Fietkau " # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 75D1 1A7D 91A7 710F 4900 42EF D77D 141D 02A7 6EF5 commit 81f0f78965ebfe48c4997801050f64687cebea48 Author: Andy Shevchenko Date: Sun Aug 2 14:16:12 2020 +0300 Revert "serial: 8250: Let serial core initialise spin lock" This reverts commit 679193b7baf8d88e41cbeb397ca17f797654947d. It appears that in QEmu the lock has been initialised differently (it wasn't obvious on real hardware during testing). Let's revert the change until the better approach will be developed. Reported-by: kernel test robot Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200802111612.36189-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 67186653c90360922e3965d0376a61dbf6c42711 Author: Andy Shevchenko Date: Sun Aug 2 14:07:04 2020 +0300 platform/x86: asus-nb-wmi: Drop duplicate DMI quirk structures There is no need to repeat the same data structure for a quirk. Drop a duplicate and rename to be more generic. Signed-off-by: Andy Shevchenko commit 5bbd90550da8f7bdac769b5825597e67183c9411 Author: Greg Kroah-Hartman Date: Sun Aug 2 11:21:39 2020 +0200 staging: most: fix up movement of USB driver When moving the most usb driver out of staging, we forgot to remove the subdirectory out of the staging Makefile as well. Fixes: 97a6f772f36b ("drivers: most: add USB adapter driver") Cc: Christian Gromm Reported-by: Michael Straube Link: https://lore.kernel.org/r/20200802092139.GA140088@kroah.com Signed-off-by: Greg Kroah-Hartman commit 54c4f6f8de62e6c0be80e7e023437ff0bbae089b Author: Tomer Samara Date: Sun Aug 2 00:00:56 2020 +0300 staging: rts5208: clear alignment style issues Clear checkpatch alignment style issues in rtsx_transport.c. CHECK: Alignment should match open parenthesis Signed-off-by: Tomer Samara Link: https://lore.kernel.org/r/20200801210056.GA305272@tsnow Signed-off-by: Greg Kroah-Hartman commit 5df9de5a40b00c965febad655773d6fb9a7961d5 Author: Ivan Safonov Date: Sat Aug 1 21:02:35 2020 +0300 staging: r8188eu: replace rtw_netdev_priv define with inline function The function guarantees type checking of arguments and return value. Result of rtw_netdev_priv macro can be assigned to pointer with incompatible type without warning. The function allow compiler to perform this check. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20200801180235.34116-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit d47cecef7116d9c32efb254f7aa91ae5fb2df545 Author: Tomer Samara Date: Fri Jul 31 21:23:30 2020 +0300 staging: netlogic: clear alignment style issues Clear checkpatch alignment style issues in xlr_net.c. CHECK: Alignment should match open parenthesis Signed-off-by: Tomer Samara Link: https://lore.kernel.org/r/20200731182330.GA3176@tsnow Signed-off-by: Greg Kroah-Hartman commit f1ec5be17b9aafbc5f573da023850566b43d8e5e Author: Huacai Chen Date: Sun Aug 2 17:26:40 2020 +0800 ALSA: hda/realtek: Add alc269/alc662 pin-tables for Loongson-3 laptops There are several Loongson-3 based laptops produced by CZC or Lemote, they use alc269/alc662 codecs and need specific pin-tables, this patch add their pin-tables. Signed-off-by: Huacai Chen Cc: Link: https://lore.kernel.org/r/1596360400-32425-1-git-send-email-chenhc@lemote.com Signed-off-by: Takashi Iwai commit ff2bd9ff115218c144441e1df0370d9083b82866 Author: Dan Carpenter Date: Tue Jul 14 17:23:51 2020 +0300 KVM: SVM: Fix sev_pin_memory() error handling The sev_pin_memory() function was modified to return error pointers instead of NULL but there are two problems. The first problem is that if "npages" is zero then it still returns NULL. Secondly, several of the callers were not updated to check for error pointers instead of NULL. Either one of these issues will lead to an Oops. Fixes: a8d908b5873c ("KVM: x86: report sev_pin_memory errors with PTR_ERR") Signed-off-by: Dan Carpenter Message-Id: <20200714142351.GA315374@mwanda> Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit bd0b33b24897ba9ddad221e8ac5b6f0e38a2e004 Merge: 7126bd5c8bcbc ac3a0c8472969 Author: David S. Miller Date: Sun Aug 2 01:02:12 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Resolved kernel/bpf/btf.c using instructions from merge commit 69138b34a7248d2396ab85c8652e20c0c39beaba Signed-off-by: David S. Miller commit b5cc46cdff76cdfe2cb45ab2636d847efb1012cc Author: Andrii Nakryiko Date: Fri Jul 31 13:49:57 2020 -0700 selftests/bpf: Fix spurious test failures in core_retro selftest core_retro selftest uses BPF program that's triggered on sys_enter system-wide, but has no protection from some unrelated process doing syscall while selftest is running. This leads to occasional test failures with unexpected PIDs being returned. Fix that by filtering out all processes that are not test_progs process. Fixes: fcda189a5133 ("selftests/bpf: Add test relying only on CO-RE and no recent kernel features") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200731204957.2047119-1-andriin@fb.com commit 5a6b1a206d1f399c9ea19173bd9a945a657f1fbf Merge: 4939b2847d26c e85f99aa7760e Author: Alexei Starovoitov Date: Sat Aug 1 20:38:29 2020 -0700 Merge branch 'link_detach' Andrii Nakryiko says: ==================== This patch set adds new BPF link operation, LINK_DETACH, allowing processes with BPF link FD to force-detach it from respective BPF hook, similarly how BPF link is auto-detached when such BPF hook (e.g., cgroup, net_device, netns, etc) is removed. This facility allows admin to forcefully undo BPF link attachment, while process that created BPF link in the first place is left intact. Once force-detached, BPF link stays valid in the kernel as long as there is at least one FD open against it. It goes into defunct state, just like auto-detached BPF link. bpftool also got `link detach` command to allow triggering this in non-programmatic fashion. v1->v2: - improve error reporting in `bpftool link detach` (Song). ==================== Signed-off-by: Alexei Starovoitov commit e85f99aa7760e74bb5a7e8515948f99c264a275f Author: Andrii Nakryiko Date: Fri Jul 31 11:28:30 2020 -0700 tools/bpftool: Add documentation and bash-completion for `link detach` Add info on link detach sub-command to man page. Add detach to bash-completion as well. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: John Fastabend Date: Fri Jul 31 11:28:29 2020 -0700 tools/bpftool: Add `link detach` subcommand Add ability to force-detach BPF link. Also add missing error message, if specified link ID is wrong. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200731182830.286260-5-andriin@fb.com commit 90806ccc90bbd0150267a97ae4003269597a6a6c Author: Andrii Nakryiko Date: Fri Jul 31 11:28:28 2020 -0700 selftests/bpf: Add link detach tests for cgroup, netns, and xdp bpf_links Add bpf_link__detach() testing to selftests for cgroup, netns, and xdp bpf_links. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200731182830.286260-4-andriin@fb.com commit 2e49527e52486dac910460b1b3f6fce6e21c6b48 Author: Andrii Nakryiko Date: Fri Jul 31 11:28:27 2020 -0700 libbpf: Add bpf_link detach APIs Add low-level bpf_link_detach() API. Also add higher-level bpf_link__detach() one. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200731182830.286260-3-andriin@fb.com commit 73b11c2ab072d5b0599d1e12cc126f55ee306daf Author: Andrii Nakryiko Date: Fri Jul 31 11:28:26 2020 -0700 bpf: Add support for forced LINK_DETACH command Add LINK_DETACH command to force-detach bpf_link without destroying it. It has the same behavior as auto-detaching of bpf_link due to cgroup dying for bpf_cgroup_link or net_device being destroyed for bpf_xdp_link. In such case, bpf_link is still a valid kernel object, but is defuncts and doesn't hold BPF program attached to corresponding BPF hook. This functionality allows users with enough access rights to manually force-detach attached bpf_link without killing respective owner process. This patch implements LINK_DETACH for cgroup, xdp, and netns links, mostly re-using existing link release handling code. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200731182830.286260-2-andriin@fb.com commit 4939b2847d26c025e2e2118744226967f239a1ac Author: John Fastabend Date: Fri Jul 31 15:09:14 2020 -0700 bpf, selftests: Use single cgroup helpers for both test_sockmap/progs Nearly every user of cgroup helpers does the same sequence of API calls. So push these into a single helper cgroup_setup_and_join. The cases that do a bit of extra logic are test_progs which currently uses an env variable to decide if it needs to setup the cgroup environment or can use an existingi environment. And then tests that are doing cgroup tests themselves. We skip these cases for now. Signed-off-by: John Fastabend Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/159623335418.30208.15807461815525100199.stgit@john-XPS-13-9370 commit 78470d9d0d9f2f8d16f28382a4071568e839c0d5 Author: Florian Westphal Date: Sun Aug 2 03:27:03 2020 +0200 netfilter: nft_meta: fix iifgroup matching iifgroup matching erroneously checks the output interface. Fixes: 8724e819cc9a ("netfilter: nft_meta: move all interface related keys to helper") Reported-by: Demi M. Obenour Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 83d9dcba06c53e24e7dc47d51607d5cf9b50e5f9 Author: Pablo Neira Ayuso Date: Sun Aug 2 02:56:37 2020 +0200 netfilter: nf_tables: extended netlink error reporting for expressions This patch extends 36dd1bcc07e5 ("netfilter: nf_tables: initial support for extended ACK reporting") to include netlink extended error reporting for expressions. This allows userspace to identify what rule expression is triggering the error. Signed-off-by: Pablo Neira Ayuso commit 67dd23f9e6fbaf163431912ef5599c5e0693476c Author: Scott Mayhew Date: Sat Aug 1 07:10:38 2020 -0400 nfs: ensure correct writeback errors are returned on close() nfs_wb_all() calls filemap_write_and_wait(), which uses filemap_check_errors() to determine the error to return. filemap_check_errors() only looks at the mapping->flags and will therefore only return either -ENOSPC or -EIO. To ensure that the correct error is returned on close(), nfs{,4}_file_flush() should call filemap_check_wb_err() which looks at the errseq value in mapping->wb_err without consuming it. Fixes: 6fbda89b257f ("NFS: Replace custom error reporting mechanism with generic one") Signed-off-by: Scott Mayhew Signed-off-by: Trond Myklebust commit 7126bd5c8bcbc015cf89864cf71d750e8f33f924 Author: Florian Westphal Date: Sat Aug 1 16:39:59 2020 +0200 mptcp: fix syncookie build error on UP kernel test robot says: net/mptcp/syncookies.c: In function 'mptcp_join_cookie_init': include/linux/kernel.h:47:38: warning: division by zero [-Wdiv-by-zero] #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) I forgot that spinock_t size is 0 on UP, so ARRAY_SIZE cannot be used. Fixes: 9466a1ccebbe54 ("mptcp: enable JOIN requests even if cookies are in use") Reported-by: kernel test robot Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 8b66a6fd34f519f4ad42c4ab0152c3c0782a7dbd Author: Brian Vazquez Date: Fri Jul 31 20:01:10 2020 -0700 fib: fix another fib_rules_ops indirect call wrapper problem It turns out that on commit 41d707b7332f ("fib: fix fib_rules_ops indirect calls wrappers") I forgot to include the case when CONFIG_IP_MULTIPLE_TABLES is not set. Fixes: 41d707b7332f ("fib: fix fib_rules_ops indirect calls wrappers") Reported-by: Randy Dunlap Cc: Stephen Rothwell Signed-off-by: Brian Vazquez Acked-by: Randy Dunlap # build-tested Signed-off-by: David S. Miller commit 0e8642cf369a37b718c15effa6ffd52c00fd7d15 Author: Eric Dumazet Date: Fri Jul 31 19:09:29 2020 -0700 tcp: fix build fong CONFIG_MPTCP=n Fixes these errors: net/ipv4/syncookies.c: In function 'tcp_get_cookie_sock': net/ipv4/syncookies.c:216:19: error: 'struct tcp_request_sock' has no member named 'drop_req' 216 | if (tcp_rsk(req)->drop_req) { | ^~ net/ipv4/syncookies.c: In function 'cookie_tcp_reqsk_alloc': net/ipv4/syncookies.c:289:27: warning: unused variable 'treq' [-Wunused-variable] 289 | struct tcp_request_sock *treq; | ^~~~ make[3]: *** [scripts/Makefile.build:280: net/ipv4/syncookies.o] Error 1 make[3]: *** Waiting for unfinished jobs.... Fixes: 9466a1ccebbe ("mptcp: enable JOIN requests even if cookies are in use") Signed-off-by: Eric Dumazet Cc: Florian Westphal Acked-by: Florian Westphal Signed-off-by: David S. Miller commit fa15bafb71fd7a4d6018dae87cfaf890fd4ab47f Author: Pavel Begunkov Date: Sat Aug 1 13:50:02 2020 +0300 io_uring: flip if handling after io_setup_async_rw As recently done with with send/recv, flip the if after rw_verify_aread() in io_{read,write}() and tabulise left bits left. This removes mispredicted by a compiler jump on the success/fast path. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1752f0adea98ef859978c090e0726844348758f9 Author: Pavel Begunkov Date: Sat Aug 1 13:36:33 2020 +0300 fs: optimise kiocb_set_rw_flags() Use a local var to collect flags in kiocb_set_rw_flags(). That spares some memory writes and allows to replace most of the jumps with MOVEcc. Signed-off-by: Pavel Begunkov Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Jens Axboe commit 7dbc63f0a5402293e887e89a7974c5e48405565d Author: Tony Nguyen Date: Wed Jul 29 17:19:22 2020 -0700 ice: Misc minor fixes This is a collection of minor fixes including typos, white space, and style. No functional changes. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers commit 6a2c2b2c1bcbc3bc3ad484916d84c16eb58a6f70 Author: Victor Raj Date: Wed Jul 29 17:19:21 2020 -0700 ice: adjust profile ID map locks The profile ID map lock should be held till the caller completes all references of that profile entries. The current code releases the lock right after the match search. This caused a driver issue when the profile map entries were referenced after it was freed in other thread after the lock was released earlier. Signed-off-by: Victor Raj Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit eddbee9b949a00675e19bf84eda52023da0059ef Author: Tony Nguyen Date: Wed Jul 29 17:19:20 2020 -0700 ice: update PTYPE lookup table Update the PTYPE lookup table to reflect values that can be set by the hardware. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers commit 68d210a609a048dde1b7c23385d9bafb0061acb3 Author: Nick Nunley Date: Wed Jul 29 17:19:19 2020 -0700 ice: Disable VLAN pruning in promiscuous mode Disable VLAN pruning when entering promiscuous mode, and re-enable it when exiting. Without this VLAN-over-bridge topologies created on the device won't be functional unless rx-vlan-filter is explicitly disabled with ethtool. Signed-off-by: Nick Nunley Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit bcc46cb8a077c6189b44f1555b8659837f748eb2 Author: Surabhi Boob Date: Wed Jul 29 17:19:18 2020 -0700 ice: Graceful error handling in HW table calloc failure In the ice_init_hw_tbls, if the devm_kcalloc for es->written fails, catch that error and bail out gracefully, instead of continuing with a NULL pointer. Fixes: 32d63fa1e9f3 ("ice: Initialize DDP package structures") Signed-off-by: Surabhi Boob Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 0a37abfa017a90cf0708f69022368cca6869416f Author: Kiran Patil Date: Wed Jul 29 17:19:17 2020 -0700 ice: port fix for chk_linearlize This is a port of commit 248de22e638f ("i40e/i40evf: Account for frags split over multiple descriptors in check linearize") As part of testing workloads (read/write) using larger IO size (128K) tx_timeout is observed and whenever it happens, it was due to tx_linearize. Signed-off-by: Kiran Patil Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit f34f55557ac9a4dfbfbf36c70585d1648ab5cd90 Author: Brett Creeley Date: Wed Jul 29 17:19:16 2020 -0700 ice: Allow 2 queue pairs per VF on SR-IOV initialization Currently VFs are only allowed to get 16, 4, and 1 queue pair by default, which require 17, 5, and 2 MSI-X vectors respectively. This is because each VF needs a MSI-X per data queue and a MSI-X for its other interrupt. The calculation is based on the number of VFs created, MSI-X available, and queue pairs available at the time of VF creation. Unfortunately the values above exclude 2 queue pairs when only 3 MSI-X are available to each VF based on resource constraints. The current calculation would default to 2 MSI-X and 1 queue pair. This is a waste of resources, so fix this by allowing 2 queue pairs per VF when there are between 2 and 5 MSI-X available per VF. Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit ec1d1d2302067e3ccbc4d0adcd36d72410933b70 Author: Vignesh Sridhar Date: Wed Jul 29 17:19:15 2020 -0700 ice: Clear and free XLT entries on reset This fix has been added to address memory leak issues resulting from triggering a sudden driver reset which does not allow us to follow our normal removal flows for SW XLT entries for advanced features. - Adding call to destroy flow profile locks when clearing SW XLT tables. - Extraction sequence entries were not correctly cleared previously which could cause ownership conflicts for repeated reset-replay calls. Fixes: 31ad4e4ee1e4 ("ice: Allocate flow profile") Signed-off-by: Vignesh Sridhar Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit a8fffd7ae9a538fde8eb8ed528a93575ddc2a122 Author: Jesse Brandeburg Date: Wed Jul 29 17:19:14 2020 -0700 ice: add useful statistics Display and count some useful hot-path statistics. The usefulness is as follows: - tx_restart: use to determine if the transmit ring size is too small or if the transmit interrupt rate is too low. - rx_gro_dropped: use to count drops from GRO layer, which previously were completely uncounted when occurring. - tx_busy: use to determine when the driver is miscounting number of descriptors needed for an skb. - tx_timeout: as our other drivers, count the number of times we've reset due to timeout because the kernel only prints a warning once per netdev. Several of these were already counted but not displayed. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit a4c493fea5b7c65fbe0e1bea68007c6c27dd9f75 Author: Jesse Brandeburg Date: Wed Jul 29 17:19:13 2020 -0700 ice: remove page_reuse statistic The page reuse statistic wasn't even being displayed to the user, even though the driver counted it. Don't waste the struct space and hot-path cycles since the driver doesn't display it. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit cdedbab92db4697f5a1d222d2d022cd6af3930e3 Author: Vignesh Sridhar Date: Wed Jul 29 17:19:12 2020 -0700 ice: Fix RSS profile locks Replacing flow profile locks with RSS profile locks in the function to remove all RSS rules for a given VSI. This is to align the locks used for RSS rule addition to VSI and removal during VSI teardown to avoid a race condition owing to several iterations of the above operations. In function to get RSS rules for given VSI and protocol header replacing the pointer reference of the RSS entry with a copy of hash value to ensure thread safety. Signed-off-by: Vignesh Sridhar Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit f07d134d3772d8b9546e3eb3cf4d13848d3af6e1 Author: Kiran Patil Date: Wed Jul 29 17:19:11 2020 -0700 ice: fix the vsi_id mask to be 10 bit for set_rss_lut set_rss_lut can fail due to incorrect vsi_id mask. vsi_id is 10 bit but mask was 0x1FF whereas it should be 0x3FF. For vsi_num >= 512, FW set_rss_lut can fail with return code EACCESS (VSI ownership issue) because software was providing incorrect vsi_num (dropping 10th bit due to incorrect mask) for set_rss_lut admin command Signed-off-by: Kiran Patil Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 585cdabdfdb73b4434fcb100f5adf588dd777f2e Author: Nick Nunley Date: Wed Jul 29 17:19:10 2020 -0700 ice: rename misleading grst_delay variable The grst_delay variable in ice_check_reset contains the maximum time (in 100 msec units) that the driver will wait for a reset event to transition to the Device Active state. The value is the sum of three separate components: 1) The maximum time it may take for the firmware to process its outstanding command before handling the reset request. 2) The value in RSTCTL.GRSTDEL (the delay firmware inserts between first seeing the driver reset request and the actual hardware assertion). 3) The maximum expected reset processing time in hardware. Referring to this total time as "grst_delay" is misleading and potentially confusing to someone checking the code and cross-referencing the hardware specification. Fix this by renaming the variable to "grst_timeout", which is more descriptive of its actual use. Signed-off-by: Nick Nunley Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 65c72291f709fe8a82e1df3d7b8d2e65d4d861a6 Author: Wei Yongjun Date: Tue Jul 28 09:41:53 2020 +0800 ice: mark PM functions as __maybe_unused In certain configurations without power management support, the following warnings happen: drivers/net/ethernet/intel/ice/ice_main.c:4214:12: warning: 'ice_resume' defined but not used [-Wunused-function] 4214 | static int ice_resume(struct device *dev) | ^~~~~~~~~~ drivers/net/ethernet/intel/ice/ice_main.c:4150:12: warning: 'ice_suspend' defined but not used [-Wunused-function] 4150 | static int ice_suspend(struct device *dev) | ^~~~~~~~~~~ Mark these functions as __maybe_unused to make it clear to the compiler that this is going to happen based on the configuration, which is the standard for these types of functions. Fixes: 769c500dcc1e ("ice: Add advanced power mgmt for WoL") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit ef1dac6021cc8ec5de02ce31722bf26ac4ed5523 Author: Christoph Hellwig Date: Thu Jul 30 08:10:26 2020 +0200 modules: return licensing information from find_symbol Report the GPLONLY status through a new argument. Signed-off-by: Christoph Hellwig Signed-off-by: Jessica Yu commit cd8732cdcc37d7077c4fa2c966b748c0662b607e Author: Christoph Hellwig Date: Thu Jul 30 08:10:25 2020 +0200 modules: rename the licence field in struct symsearch to license Use the same spelling variant as the rest of the file. Signed-off-by: Christoph Hellwig Signed-off-by: Jessica Yu commit 34e64705ad415ed7a816e60ef62b42fe6d1729d9 Author: Christoph Hellwig Date: Thu Jul 30 08:10:24 2020 +0200 modules: unexport __module_address __module_address is only used by built-in code. Signed-off-by: Christoph Hellwig Signed-off-by: Jessica Yu commit 3fe1e56d0e68b623dd62d8d38265d2a052e7e185 Author: Christoph Hellwig Date: Thu Jul 30 08:10:23 2020 +0200 modules: unexport __module_text_address __module_text_address is only used by built-in code. Signed-off-by: Christoph Hellwig Signed-off-by: Jessica Yu commit a54e04914c211b5678602a46b3ede5d82ec1327d Author: Christoph Hellwig Date: Thu Jul 30 08:10:22 2020 +0200 modules: mark each_symbol_section static each_symbol_section is only used inside of module.c. Signed-off-by: Christoph Hellwig Signed-off-by: Jessica Yu commit 773110470e2fa3839523384ae014f8a723c4d178 Author: Christoph Hellwig Date: Thu Jul 30 08:10:21 2020 +0200 modules: mark find_symbol static find_symbol is only used in module.c. Signed-off-by: Christoph Hellwig Signed-off-by: Jessica Yu commit 7ef5264de773279b9f23b6cc8afb5addb30e970b Author: Christoph Hellwig Date: Thu Jul 30 08:10:20 2020 +0200 modules: mark ref_module static ref_module isn't used anywhere outside of module.c. Signed-off-by: Christoph Hellwig Signed-off-by: Jessica Yu commit 066d7f32cc7c9ade76f0d7d5fa4af4015a32acea Author: Wei Yongjun Date: Wed Jul 29 23:59:14 2020 +0800 platform/x86: thinkpad_acpi: Make some symbols static The sparse tool complains as follows: drivers/platform/x86/thinkpad_acpi.c:9636:25: warning: symbol 'dev_attr_charge_start_threshold' was not declared. Should it be static? drivers/platform/x86/thinkpad_acpi.c:9642:25: warning: symbol 'dev_attr_charge_stop_threshold' was not declared. Should it be static? Those variables are not used outside of thinkpad_acpi.c, so this commit marks them static. Fixes: e33929537b76 ("platform/x86: thinkpad_acpi: use standard charge control attribute names") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Andy Shevchenko commit 2ac82e20e2377fb0b63ce40bba56558f2df7cd3e Author: Julia Lawall Date: Fri Jul 31 21:35:29 2020 +0200 ALSA: docs: fix typo GFP_KRENEL -> GFP_KERNEL Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1596224129-7699-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Takashi Iwai commit 7f3ecf47591afab3d44248f3e656025a2fcd086a Author: Julia Lawall Date: Fri Jul 31 21:28:21 2020 +0200 ALSA: doc: use correct config variable name CONFIG_PCM_XRUN_DEBUG should be CONFIG_SND_PCM_XRUN_DEBUG Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1596223701-7558-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Takashi Iwai commit f369bc3f9096f5d355e8b80540bc30ac9a602912 Author: Christoph Hellwig Date: Sat Aug 1 08:17:13 2020 +0200 vgaarb: mark vga_tryget static This symbols isn't used anywhere outside of vgaarb.c. Signed-off-by: Christoph Hellwig Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200801061713.307434-1-hch@lst.de commit bdcd93ef9afb42a6051e472fa62c693b1f9edbd8 Author: Guo Ren Date: Fri Jul 31 09:13:51 2020 +0000 csky: Add context tracking support This patch support context tracking with no hz full. Here is the test result with dynticks-testing (see tick_stop): cat /sys/kernel/debug/tracing/per_cpu/cpu0/trace tracer: nop entries-in-buffer/entries-written: 356/356 #P:1 _-----=> irqs-off / _----=> need-resched | / _---=> hardirq/softirq || / _--=> preempt-depth ||| / delay TASK-PID CPU# |||| TIMESTAMP FUNCTION | | | |||| | | ... sleep-192 [000] d.h. 167.088270: hrtimer_expire_entry: hrtimer=(ptrval) function=tick_sched_timer now=166436355700 sleep-192 [000] d.h. 167.092279: hrtimer_expire_entry: hrtimer=(ptrval) function=tick_sched_timer now=166440365700 -0 [000] d.h2 167.096492: hrtimer_expire_entry: hrtimer=(ptrval) function=tick_sched_timer now=166444578400 -0 [000] d..1 167.097876: tick_stop: success=1 dependency=NONE ^^^^^^^^^ -0 [000] d.h1 168.818206: hrtimer_expire_entry: hrtimer=(ptrval) function=tick_sched_timer now=168166280900 kworker/u2:0-7 [000] .... 168.821760: workqueue_execute_start: work struct (ptrval): function wb_workfn kworker/u2:0-7 [000] d.h1 168.824464: hrtimer_expire_entry: hrtimer=(ptrval) function=tick_sched_timer now=168172547100 kworker/0:1-18 [000] .... 168.825053: workqueue_execute_start: work struct (ptrval): function vmstat_update kworker/0:1-18 [000] .... 168.825238: workqueue_execute_start: work struct (ptrval): function vmstat_shepherd kworker/0:1-18 [000] .... 168.825516: workqueue_execute_start: work struct (ptrval): function neigh_periodic_work -0 [000] d..1 168.826121: tick_stop: success=1 dependency=NONE kworker/u2:0-7 [000] .... 169.377327: workqueue_execute_start: work struct (ptrval): function flush_to_ldisc -0 [000] d..1 169.379832: tick_stop: success=1 dependency=NONE kworker/u2:0-7 [000] .... 169.607935: workqueue_execute_start: work struct (ptrval): function flush_to_ldisc kworker/u2:0-7 [000] d.h1 169.608148: hrtimer_expire_entry: hrtimer=(ptrval) function=tick_sched_timer now=168956235500 -0 [000] d..1 169.608654: tick_stop: success=1 dependency=NONE Signed-off-by: Guo Ren Cc: Greentime Hu Cc: Arnd Bergmann commit a68415c27ff366970be132c266aa859ad706af33 Merge: 63722bbca662b 5ef0a07a79285 Author: Ingo Molnar Date: Sat Aug 1 09:27:22 2020 +0200 Merge branch 'lkmm' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/core Pull v5.9 LKMM changes from Paul E. McKenney. Mostly documentation changes, but also some new litmus tests for atomic ops. Signed-off-by: Ingo Molnar commit 63722bbca662b19eb39fe709c11a5fa3994b4c3f Merge: 28cff52eaeb5c 61d56d7aa5eca Author: Ingo Molnar Date: Sat Aug 1 09:25:21 2020 +0200 Merge branch 'kcsan' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/core Pull v5.9 KCSAN bits from Paul E. McKenney. Perhaps the most important change is that GCC 11 now has all fixes in place to support KCSAN, so GCC support can be enabled again. Signed-off-by: Ingo Molnar commit 949bcb8135a96a6923e676646bd29cbe69e8350f Author: Valentin Schneider Date: Fri Jul 31 20:20:16 2020 +0100 sched/doc: Factorize bits between sched-energy.rst & sched-capacity.rst Documentation/scheduler/sched-capacity.rst ought to be the canonical place to blabber about SD_ASYM_CPUCAPACITY, so remove its explanation from sched-energy.rst and point to sched-capacity.rst instead. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200731192016.7484-4-valentin.schneider@arm.com commit 65065fd70b5a0f0bbe3f9f1e82c1d38c2db620d0 Author: Valentin Schneider Date: Fri Jul 31 20:20:15 2020 +0100 sched/doc: Document capacity aware scheduling Add some documentation detailing the concepts, requirements and implementation of capacity aware scheduling across the different scheduler classes. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200731192016.7484-3-valentin.schneider@arm.com commit f4470cdf108f00533e8079b19434e6cb48c17fa3 Author: Valentin Schneider Date: Fri Jul 31 20:20:14 2020 +0100 sched: Document arch_scale_*_capacity() Rather that hide their purpose in some dark, damp corner of Documentation/, add some documentation to the default implementations. Signed-off-by: Valentin Schneider Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200731192016.7484-2-valentin.schneider@arm.com commit 30d497a0e1aadd904867081246c310dd0284eb41 Author: Andy Shevchenko Date: Fri Jul 31 21:08:24 2020 +0300 lib/vsprintf: Force type of flags value for gfp_t Sparse is not happy about restricted type being assigned: lib/vsprintf.c:1940:23: warning: incorrect type in assignment (different base types) lib/vsprintf.c:1940:23: expected unsigned long [assigned] flags lib/vsprintf.c:1940:23: got restricted gfp_t [usertype] Force type of flags value to make sparse happy. Signed-off-by: Andy Shevchenko Reviewed-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20200731180825.30575-3-andriy.shevchenko@linux.intel.com Signed-off-by: Sergey Senozhatsky commit 09ceb8d76e6fa2c6a5bfc22eabd0cebe599e1690 Author: Andy Shevchenko Date: Fri Jul 31 21:08:23 2020 +0300 lib/vsprintf: Replace custom spec to print decimals with generic one When printing phandle via %pOFp the custom spec is used. First of all, it has a SMALL flag which makes no sense for decimal numbers. Second, we have already default spec for decimal numbers. Use the latter in the %pOFp case as well. Signed-off-by: Andy Shevchenko Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Sergey Senozhatsky Cc: Pantelis Antoniou Cc: Rob Herring Cc: Joe Perches Cc: Grant Likely Link: https://lore.kernel.org/r/20200731180825.30575-2-andriy.shevchenko@linux.intel.com Signed-off-by: Sergey Senozhatsky commit b886690d1bf050525367f552842e3c89567c8ec6 Author: Andy Shevchenko Date: Fri Jul 31 21:08:22 2020 +0300 lib/vsprintf: Replace hidden BUILD_BUG_ON() with static_assert() First of all, there is no compile time check for the SMALL to be ' ' (0x20, i.e. space). Second, for ZEROPAD the check is hidden in the code. For better maintenance replace BUILD_BUG_ON() with static_assert() for ZEROPAD and move it closer to the definition. While at it, introduce check for SMALL. Signed-off-by: Andy Shevchenko Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Sergey Senozhatsky Link: https://lore.kernel.org/r/20200731180825.30575-1-andriy.shevchenko@linux.intel.com Signed-off-by: Sergey Senozhatsky commit 70c8b4b8ab3714fb2d075be22aec05ae9c9a6a09 Author: Hyun Kwon Date: Wed Jul 29 16:30:45 2020 -0700 drm: xlnx: zynqmp: Use switch - case for link rate downshift Use switch - case to downshift from the current link rate. It's a small loop now, so fine to be replaced with switch - case. With a loop, it is confusing and hard to follow as reported below. The patch d76271d22694: "drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem" from Jul 7, 2018, leads to the following static checker warning: drivers/gpu/drm/xlnx/zynqmp_dp.c:594 zynqmp_dp_mode_configure() error: iterator underflow 'bws' (-1)-2 Reported-by: Dan Carpenter Signed-off-by: Hyun Kwon Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/1596065445-4630-1-git-send-email-hyun.kwon@xilinx.com commit 6f3de75cdf60c1b859bc8c1904d25889c00d7bbe Merge: 829eb208e80d6 c8ad010665c0b Author: David S. Miller Date: Fri Jul 31 18:51:40 2020 -0700 Merge tag 'mac80211-next-for-davem-2020-07-31' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== We have a number of changes * code cleanups and fixups as usual * AQL & internal TXQ improvements from Felix * some mesh 802.1X support bits * some injection improvements from Mathy of KRACK fame, so we'll see what this results in ;-) * some more initial S1G supports bits, this time (some of?) the userspace APIs ==================== Signed-off-by: David S. Miller commit 829eb208e80d6db95c0201cb8fa00c2f9ad87faf Author: Roopa Prabhu Date: Fri Jul 31 17:34:01 2020 -0700 rtnetlink: add support for protodown reason netdev protodown is a mechanism that allows protocols to hold an interface down. It was initially introduced in the kernel to hold links down by a multihoming protocol. There was also an attempt to introduce protodown reason at the time but was rejected. protodown and protodown reason is supported by almost every switching and routing platform. It was ok for a while to live without a protodown reason. But, its become more critical now given more than one protocol may need to keep a link down on a system at the same time. eg: vrrp peer node, port security, multihoming protocol. Its common for Network operators and protocol developers to look for such a reason on a networking box (Its also known as errDisable by most networking operators) This patch adds support for link protodown reason attribute. There are two ways to maintain protodown reasons. (a) enumerate every possible reason code in kernel - A protocol developer has to make a request and have that appear in a certain kernel version (b) provide the bits in the kernel, and allow user-space (sysadmin or NOS distributions) to manage the bit-to-reasonname map. - This makes extending reason codes easier (kind of like the iproute2 table to vrf-name map /etc/iproute2/rt_tables.d/) This patch takes approach (b). a few things about the patch: - It treats the protodown reason bits as counter to indicate active protodown users - Since protodown attribute is already an exposed UAPI, the reason is not enforced on a protodown set. Its a no-op if not used. the patch follows the below algorithm: - presence of reason bits set indicates protodown is in use - user can set protodown and protodown reason in a single or multiple setlink operations - setlink operation to clear protodown, will return -EBUSY if there are active protodown reason bits - reason is not included in link dumps if not used example with patched iproute2: $cat /etc/iproute2/protodown_reasons.d/r.conf 0 mlag 1 evpn 2 vrrp 3 psecurity $ip link set dev vxlan0 protodown on protodown_reason vrrp on $ip link set dev vxlan0 protodown_reason mlag on $ip link show 14: vxlan0: mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether f6:06:be:17:91:e7 brd ff:ff:ff:ff:ff:ff protodown on $ip link set dev vxlan0 protodown_reason mlag off $ip link set dev vxlan0 protodown off protodown_reason vrrp off Signed-off-by: Roopa Prabhu Signed-off-by: David S. Miller commit 8f3f330da28ede9d106cd9d5c5ccd6a3e7e9b50b Author: Jason Wang Date: Fri Jul 31 00:17:20 2020 -0400 tun: add missing rcu annotation in tun_set_ebpf() We expecte prog_p to be protected by rcu, so adding the rcu annotation to fix the following sparse warning: drivers/net/tun.c:3003:36: warning: incorrect type in argument 2 (different address spaces) drivers/net/tun.c:3003:36: expected struct tun_prog [noderef] __rcu **prog_p drivers/net/tun.c:3003:36: got struct tun_prog **prog_p drivers/net/tun.c:3292:42: warning: incorrect type in argument 2 (different address spaces) drivers/net/tun.c:3292:42: expected struct tun_prog **prog_p drivers/net/tun.c:3292:42: got struct tun_prog [noderef] __rcu ** drivers/net/tun.c:3296:42: warning: incorrect type in argument 2 (different address spaces) drivers/net/tun.c:3296:42: expected struct tun_prog **prog_p drivers/net/tun.c:3296:42: got struct tun_prog [noderef] __rcu ** Reported-by: Michael S. Tsirkin Signed-off-by: Jason Wang Signed-off-by: David S. Miller commit 48040793fa6003d211f021c6ad273477bcd90d91 Author: Yousuk Seung Date: Thu Jul 30 15:44:40 2020 -0700 tcp: add earliest departure time to SCM_TIMESTAMPING_OPT_STATS This change adds TCP_NLA_EDT to SCM_TIMESTAMPING_OPT_STATS that reports the earliest departure time(EDT) of the timestamped skb. By tracking EDT values of the skb from different timestamps, we can observe when and how much the value changed. This allows to measure the precise delay injected on the sender host e.g. by a bpf-base throttler. Signed-off-by: Yousuk Seung Signed-off-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Acked-by: Yuchung Cheng Signed-off-by: David S. Miller commit c6886957d2d959d5217994cd08d59c816fc23e70 Merge: d9790bc2fea58 8698fb64cc77b Author: David S. Miller Date: Fri Jul 31 16:59:13 2020 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2020-07-30 This series contains updates to e100, e1000, e1000e, igb, igbvf, ixgbe, ixgbevf, iavf, and driver documentation. Vaibhav Gupta converts legacy .suspend() and .resume() to generic PM callbacks for e100, igbvf, ixgbe, ixgbevf, and iavf. Suraj Upadhyay replaces 1 byte memsets with assignments for e1000, e1000e, igb, and ixgbe. Alexander Klimov replaces http links with https. Miaohe Lin replaces uses of memset to clear MAC addresses with eth_zero_addr(). ==================== Signed-off-by: David S. Miller commit d9790bc2fea58739506a97e260c706bcbfed0d44 Merge: 77aec5e1c4935 00587187ad301 Author: David S. Miller Date: Fri Jul 31 16:55:32 2020 -0700 Merge branch 'mptcp-syncookies' Florian Westphal says: ==================== mptcp: add syncookie support Changes in v2: - first patch renames req->ts_cookie to req->syncookie instead of removing ts_cookie member. - patch to add 'want_cookie' arg to init_req() functions has been dropped. All users of that arg were changed to check 'req->syncookie' instead. v1 cover letter: When syn-cookies are used the SYN?ACK never contains a MPTCP option, because the code path that creates a request socket based on a valid cookie ACK lacks the needed changes to construct MPTCP request sockets. After this series, if SYN carries MP_CAPABLE option, the option is not cleared anymore and request socket will be reconstructed using the MP_CAPABLE option data that is re-sent with the ACK. This means that no additional state gets encoded into the syn cookie or the TCP timestamp. There are two caveats for SYN-Cookies with MPTCP: 1. When syn-cookies are used, the server-generated key is not stored. The drawback is that the next connection request that comes in before the cookie-ACK has a small chance that it will generate the same local_key. If this happens, the cookie ACK that comes in second will (re)compute the token hash and then detects that this is already in use. Unlike normal case, where the server will pick a new key value and then re-tries, we can't do that because we already committed to the key value (it was sent to peer already). Im this case, MPTCP cannot be used and late TCP fallback happens. 2). SYN packets with a MP_JOIN requests cannot be handled without storing state. This is because the SYN contains a nonce value that is needed to verify the HMAC of the MP_JOIN ACK that completes the three-way handshake. Also, a local nonce is generated and used in the cookie SYN/ACK. There are only 2 ways to solve this: a) Do not support JOINs when cookies are in effect. b) Store the nonces somewhere. The approach chosen here is b). Patch 8 adds a fixed-size (1024 entries) state table to store the information required to validate the MP_JOIN ACK and re-build the request socket. State gets stored when syn-cookies are active and the token in the JOIN request referred to an established MPTCP connection that can also accept a new subflow. State is restored if the ACK cookie is valid, an MP_JOIN option is present and the state slot contains valid data from a previous SYN. After the request socket has been re-build, normal HMAC check is done just as without syn cookies. Largely identical to last RFC, except patch #8 which follows Paolos suggestion to use a private table storage area rather than keeping request sockets around. This also means I dropped the patch to remove const qualifier from sk_listener pointers. ==================== Signed-off-by: David S. Miller commit 00587187ad3016382bd8d3fad0f3bba0a518ab40 Author: Florian Westphal Date: Thu Jul 30 21:25:58 2020 +0200 selftests: mptcp: add test cases for mptcp join tests with syn cookies Also add test cases with MP_JOIN when tcp_syncookies sysctl is 2 (i.e., syncookies are always-on). While at it, also print the test number and add the test number to the pcap files that can be generated optionally. This makes it easier to match the pcap to the test case. Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit fed61c4b584c5839543fe46a2ee55e21dd1bbf80 Author: Florian Westphal Date: Thu Jul 30 21:25:57 2020 +0200 selftests: mptcp: make 2nd net namespace use tcp syn cookies unconditionally check we can establish connections also when syn cookies are in use. Check that MPTcpExtMPCapableSYNRX and MPTcpExtMPCapableACKRX increase for each MPTCP test. Check TcpExtSyncookiesSent and TcpExtSyncookiesRecv increase in netns2. Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 9466a1ccebbe54ac57fb8a89c2b4b854826546a8 Author: Florian Westphal Date: Thu Jul 30 21:25:56 2020 +0200 mptcp: enable JOIN requests even if cookies are in use JOIN requests do not work in syncookie mode -- for HMAC validation, the peers nonce and the mptcp token (to obtain the desired connection socket the join is for) are required, but this information is only present in the initial syn. So either we need to drop all JOIN requests once a listening socket enters syncookie mode, or we need to store enough state to reconstruct the request socket later. This adds a state table (1024 entries) to store the data present in the MP_JOIN syn request and the random nonce used for the cookie syn/ack. When a MP_JOIN ACK passed cookie validation, the table is consulted to rebuild the request socket from it. An alternate approach would be to "cancel" syn-cookie mode and force MP_JOIN to always use a syn queue entry. However, doing so brings the backlog over the configured queue limit. v2: use req->syncookie, not (removed) want_cookie arg Suggested-by: Paolo Abeni Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 6fc8c827dd4fa615965c4eac9bbfd465f6eb8fb4 Author: Florian Westphal Date: Thu Jul 30 21:25:55 2020 +0200 tcp: syncookies: create mptcp request socket for ACK cookies with MPTCP option If SYN packet contains MP_CAPABLE option, keep it enabled. Syncokie validation and cookie-based socket creation is changed to instantiate an mptcp request sockets if the ACK contains an MPTCP connection request. Rather than extend both cookie_v4/6_check, add a common helper to create the (mp)tcp request socket. Suggested-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit c83a47e50d8fd3825a4758158e9edd5acdc74185 Author: Florian Westphal Date: Thu Jul 30 21:25:54 2020 +0200 mptcp: subflow: add mptcp_subflow_init_cookie_req helper Will be used to initialize the mptcp request socket when a MP_CAPABLE request was handled in syncookie mode, i.e. when a TCP ACK containing a MP_CAPABLE option is a valid syncookie value. Normally (non-cookie case), MPTCP will generate a unique 32 bit connection ID and stores it in the MPTCP token storage to be able to retrieve the mptcp socket for subflow joining. In syncookie case, we do not want to store any state, so just generate the unique ID and use it in the reply. This means there is a small window where another connection could generate the same token. When Cookie ACK comes back, we check that the token has not been registered in the mean time. If it was, the connection needs to fall back to TCP. Changes in v2: - use req->syncookie instead of passing 'want_cookie' arg to ->init_req() (Eric Dumazet) Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 08b8d080982fec354173d3fd28a3106a719b8950 Author: Florian Westphal Date: Thu Jul 30 21:25:53 2020 +0200 mptcp: rename and export mptcp_subflow_request_sock_ops syncookie code path needs to create an mptcp request sock. Prepare for this and add mptcp prefix plus needed export of ops struct. Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 78d8b7bc4b32e2d32ac19d3b217166224c4342d0 Author: Florian Westphal Date: Thu Jul 30 21:25:52 2020 +0200 mptcp: subflow: split subflow_init_req When syncookie support is added, we will need to add a variant of subflow_init_req() helper. It will do almost same thing except that it will not compute/add a token to the mptcp token tree. To avoid excess copy&paste, this commit splits away part of the code into a new helper, __subflow_init_req, that can then be re-used from the 'no insert' function added in a followup change. Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 535fb8152f313dd5d30ef84ce55b01ad9cbae3cf Author: Florian Westphal Date: Thu Jul 30 21:25:51 2020 +0200 mptcp: token: move retry to caller Once syncookie support is added, no state will be stored anymore when the syn/ack is generated in syncookie mode. When the ACK comes back, the generated key will be taken from the TCP ACK, the token is re-generated and inserted into the token tree. This means we can't retry with a new key when the token is already taken in the syncookie case. Therefore, move the retry logic to the caller to prepare for syncookie support in mptcp. Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit f8ace8d915b88bd1bbaac695de94650dbb25c7b4 Author: Florian Westphal Date: Thu Jul 30 21:25:50 2020 +0200 tcp: rename request_sock cookie_ts bit to syncookie Nowadays output function has a 'synack_type' argument that tells us when the syn/ack is emitted via syncookies. The request already tells us when timestamps are supported, so check both to detect special timestamp for tcp option encoding is needed. We could remove cookie_ts altogether, but a followup patch would otherwise need to adjust function signatures to pass 'want_cookie' to mptcp core. This way, the 'existing' bit can be used. Suggested-by: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 77aec5e1c4935e37c8cbb818a69f2f7d3433ede5 Author: Gustavo A. R. Silva Date: Thu Jul 30 11:03:14 2020 -0500 net/sched: cls_u32: Use struct_size() helper Make use of the struct_size() helper, in multiple places, instead of an open-coded version in order to avoid any potential type mistakes and protect against potential integer overflows. Also, remove unnecessary object identifier size. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 26b4b2d99c3a0abe7b6ff4969f48afdda0931573 Author: Andy Shevchenko Date: Thu Jul 30 19:00:57 2020 +0300 qede: Use %pM format specifier for MAC addresses Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit b03c3bacf58fdb9774cf209a5773ae500556115f Author: Andy Shevchenko Date: Thu Jul 30 18:59:20 2020 +0300 qed: Use %pM format specifier for MAC addresses Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit cc0b065fd550aee840dbca84e1c3ff667099b461 Author: Andy Shevchenko Date: Thu Jul 30 18:09:04 2020 +0300 hsr: Use %pM format specifier for MAC addresses Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko Signed-off-by: David S. Miller commit fdc229819d3d707f3d0134e789e62283b2af9253 Merge: 9fc95f50eedb5 9e7d92e0b0ace Author: David S. Miller Date: Fri Jul 31 16:44:36 2020 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2020-07-30 please apply the following patch series for qeth to netdev's net-next tree. This primarily brings some modernization to the RX path, laying the groundwork for smarter RX refill policies. Some of the patches are tagged as fixes, but really target only rare / theoretical issues. So given where we are in the release cycle and that we touch the main RX path, taking them through net-next seems more appropriate. ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9e7d92e0b0ace7546d338a44172063ccae36a8f1 Author: Julian Wiedmann Date: Thu Jul 30 17:01:21 2020 +0200 s390/qeth: use all configured RX buffers The (misplaced) comment doesn't make any sense, enforcing an uninitialized RX buffer won't help with IRQ reduction. So make the best use of all available RX buffers. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 02472e28b9a45471c6d8729ff2c7422baa9be46a Author: Julian Wiedmann Date: Thu Jul 30 17:01:20 2020 +0200 s390/qeth: don't process empty bridge port events Discard events that don't contain any entries. This shouldn't happen, but subsequent code relies on being able to use entry 0. So better be safe than accessing garbage. Fixes: b4d72c08b358 ("qeth: bridgeport support - basic control") Signed-off-by: Julian Wiedmann Reviewed-by: Alexandra Winter Signed-off-by: David S. Miller commit 7c94a88295008f66e9a0efc1c15d8511f73a0366 Author: Julian Wiedmann Date: Thu Jul 30 17:01:19 2020 +0200 s390/qeth: integrate RX refill worker with NAPI Running a RX refill outside of NAPI context is inherently racy, even though the worker is only started for an entirely idle RX ring. >From the moment that the worker has replenished parts of the RX ring, the HW can use those RX buffers, raise an IRQ and cause our NAPI code to run concurrently to the RX refill worker. Instead let the worker schedule our NAPI instance, and refill the RX ring from there. Keeping accurate count of how many buffers still need to be refilled also removes some quirky arithmetic from the low-level code. Fixes: b333293058aa ("qeth: add support for af_iucv HiperSockets transport") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit eff73e16ee116f6eafa2be48fab42659a27cb453 Author: Julian Wiedmann Date: Thu Jul 30 17:01:18 2020 +0200 s390/qeth: tolerate pre-filled RX buffer When preparing a buffer for RX refill, tolerate that it already has a pool_entry attached. Otherwise we could easily leak such a pool_entry when re-driving the RX refill after an error (from eg. do_qdio()). This needs some minor adjustment in the code that drains RX buffer(s) prior to RX refill and during teardown, so that ->pool_entry is NULLed accordingly. Fixes: 4a71df50047f ("qeth: new qeth device driver") Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 9fc95f50eedb5cfe5d53a9c970c47ed680fc4e54 Author: Miaohe Lin Date: Thu Jul 30 19:02:36 2020 +0800 net: Pass NULL to skb_network_protocol() when we don't care about vlan depth When we don't care about vlan depth, we could pass NULL instead of the address of a unused local variable to skb_network_protocol() as a param. Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 9f4db31ea09e3c1e25b60b1d93e549fd38360197 Author: Douglas Anderson Date: Fri Jul 31 13:30:10 2020 -0700 dt-bindings: clock: Fix YAML schemas for LPASS clocks on SC7180 The YAML schemas that landed forgot one clock: "bi_tcxo". Presumably the bindings were developed against the v4 version of the driver and when the ".name" was removed in v5 of the driver things broke. While touching this, add the needed includes in each example. I believe both examples are supposed to be independent of each other. Let's fix the bindings. Fixes: 381cc6f97cda ("dt-bindings: clock: Add YAML schemas for LPASS clocks on SC7180") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200731133006.1.Iee81b115f5be50d6d69500fe1bda11bba6e16143@changeid Signed-off-by: Stephen Boyd commit 83a33b248763f081bbccc7f7f61264883a9e3338 Author: David S. Miller Date: Fri Jul 31 16:15:03 2020 -0700 bluetooth: sco: Fix sockptr reference. net/bluetooth/sco.c: In function ‘sco_sock_setsockopt’: net/bluetooth/sco.c:862:3: error: cannot convert to a pointer type 862 | if (get_user(opt, (u32 __user *)optval)) { | ^~ Signed-off-by: David S. Miller commit 7cc3d5020bdaaa9ca216081be93c51db3546e199 Author: Anson Huang Date: Fri Jul 31 10:06:24 2020 +0800 dt-bindings: memory-controllers: Convert mmdc to json-schema Convert the MMDC memory controller binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596161184-24266-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit f69f15a3c3f0f9ad049c5e0ef3f3bfd6c791df06 Author: Anson Huang Date: Thu Jul 30 20:43:24 2020 +0800 dt-bindings: mtd: Convert imx nand to json-schema Convert the i.MX nand controller binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596113004-15548-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 493d37ce559da6daeb0770bb35ad45790c947a65 Author: Anson Huang Date: Thu Jul 30 20:43:23 2020 +0800 dt-bindings: mtd: Convert gpmi nand to json-schema Convert the gpmi nand controller binding to DT schema format using json-schema. Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1596113004-15548-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit d958e343bdc3de2643ce25225bed082dc222858d Author: Randy Dunlap Date: Thu Jul 30 18:42:33 2020 -0700 block: blk-timeout: delete duplicated word Drop the repeated word "request". Change to the correct kernel-doc notation for function name separtor. Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Jens Axboe commit c4aecaa256904bb1f46a8d898034b0c725b45015 Author: Randy Dunlap Date: Thu Jul 30 18:42:32 2020 -0700 block: blk-mq-sched: delete duplicated word Drop the repeated word "to". Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Jens Axboe commit 70f15a4fd9a334f5f138045526f0035e77394e40 Author: Randy Dunlap Date: Thu Jul 30 18:42:31 2020 -0700 block: blk-mq: delete duplicated word Drop the repeated word "the". Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Jens Axboe commit 0d20dcc277cfb50ec1de4db0d758f30e8f597d30 Author: Randy Dunlap Date: Thu Jul 30 18:42:30 2020 -0700 block: genhd: delete duplicated words Drop the repeated word "to" in multiple places. Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Jens Axboe commit 5b8f65e1f9664171a4f4c07f8cdc212650f00e77 Author: Randy Dunlap Date: Thu Jul 30 18:42:29 2020 -0700 block: elevator: delete duplicated word and fix typos Drop the repeated word "the". Fix typos of "features" and "specified". Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Jens Axboe commit 3cf148891799d46542d8880c678e931c7ac5b32e Author: Randy Dunlap Date: Thu Jul 30 18:42:28 2020 -0700 block: bio: delete duplicated words Drop the repeated words "a" and "the". Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Jens Axboe commit f06678af91a42c27002a70148fe95899a34afb07 Author: Randy Dunlap Date: Thu Jul 30 18:42:27 2020 -0700 block: bfq-iosched: fix duplicated word Change "at at" to "at a". Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Jens Axboe commit 4bb540dbe442ec5e4b48af8aed12663e0754bbe2 Merge: bd69058f50d5f 075f77324f901 Author: David S. Miller Date: Fri Jul 31 15:11:52 2020 -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 2020-07-31 Here's the main bluetooth-next pull request for 5.9: - Fix firmware filenames for Marvell chipsets - Several suspend-related fixes - Addedd mgmt commands for runtime configuration - Multiple fixes for Qualcomm-based controllers - Add new monitoring feature for mgmt - Fix handling of legacy cipher (E4) together with security level 4 - Add support for Realtek 8822CE controller - Fix issues with Chinese controllers using fake VID/PID values - Multiple other smaller fixes & improvements ==================== Signed-off-by: David S. Miller commit a0fc1436f1f4f84e93144480bf30e0c958d135b6 Author: Max Filippov Date: Fri Jul 31 12:38:05 2020 -0700 xtensa: add missing exclusive access state management The result of the s32ex opcode is recorded in the ATOMCTL special register and must be retrieved with the getex opcode. Context switch between s32ex and getex may trash the ATOMCTL register and result in duplicate update or missing update of the atomic variable. Add atomctl8 field to the struct thread_info and use getex to swap ATOMCTL bit 8 as a part of context switch. Clear exclusive access monitor on kernel entry. Cc: stable@vger.kernel.org Fixes: f7c34874f04a ("xtensa: add exclusive atomics support") Signed-off-by: Max Filippov commit 6d65d3769d1910379e1cfa61ebf387efc6bfb22c Author: Max Filippov Date: Fri Jul 31 12:37:32 2020 -0700 xtensa: fix xtensa_pmu_setup prototype Fix the following build error in configurations with CONFIG_XTENSA_VARIANT_HAVE_PERF_EVENTS=y: arch/xtensa/kernel/perf_event.c:420:29: error: passing argument 3 of ‘cpuhp_setup_state’ from incompatible pointer type Cc: stable@vger.kernel.org Fixes: 25a77b55e74c ("xtensa/perf: Convert the hotplug notifier to state machine callbacks") Signed-off-by: Max Filippov commit add48ba425192c6e04ce70549129cacd01e2a09e Author: Christian Eggers Date: Mon Jul 27 12:16:05 2020 +0200 dt-bindings: iio: io-channel-mux: Fix compatible string in example code The correct compatible string is "gpio-mux" (see bindings/mux/gpio-mux.txt). Cc: stable@vger.kernel.org # v4.13+ Reviewed-by: Peter Rosin Signed-off-by: Christian Eggers Link: https://lore.kernel.org/r/20200727101605.24384-1-ceggers@arri.de Signed-off-by: Rob Herring commit 76251e15ea73898b62ed0da3210189e50e1fe3c9 Author: Kamal Heib Date: Tue Jul 21 13:16:18 2020 +0300 RDMA/rxe: Remove pkey table The RoCE spec requires RoCE devices to support only the default pkey. However the rxe driver maintains a 64 enties pkey table and uses only the first entry. Remove the pkey table and hard code a table of length one hard wired with the default pkey. Replace all checks of the pkey_table with a comparison to the default_pkey instead. Link: https://lore.kernel.org/r/20200721101618.686110-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 84569f329f7fcb40b7b1860f273b2909dabf2a2b Merge: c8f7dbdbaa15c 8e34f1e867b57 Author: Mark Brown Date: Fri Jul 31 19:54:03 2020 +0100 Merge remote-tracking branch 'asoc/for-5.9' into asoc-next commit c8f7dbdbaa15c700ea02abf92b8d9bda2e91050b Merge: 92ed301919932 5aef1ff2397d0 Author: Mark Brown Date: Fri Jul 31 19:54:01 2020 +0100 Merge remote-tracking branch 'asoc/for-5.8' into asoc-linus commit 8e34f1e867b572f1e20b5250c2897fe5f041c99f Merge: 2dbf11ec7d3a6 ea029dd8d0124 Author: Mark Brown Date: Fri Jul 31 19:36:00 2020 +0100 Merge series "ASoC: core: Two step component registration" from Cezary Rojewski : Provide a mechanism for true two-step component registration. This mimics device registration flow where initialization is the first step while addition goes as second in line. Drivers may choose to modify component's fields before registering component to ASoC subsystem via snd_soc_add_component. Patchset achieves status quo - behavior of snd_soc_register_component remains unchanged. Cezary Rojewski (3): ASoC: core: Relocate and expose snd_soc_component_initialize ASoC: core: Simplify snd_soc_component_initialize declaration ASoC: core: Two step component registration include/sound/soc-component.h | 3 -- include/sound/soc.h | 11 +++--- sound/soc/soc-component.c | 16 --------- sound/soc/soc-core.c | 52 +++++++++++++++++---------- sound/soc/soc-generic-dmaengine-pcm.c | 14 +++++--- sound/soc/stm/stm32_adfsdm.c | 9 +++-- 6 files changed, 55 insertions(+), 50 deletions(-) -- 2.17.1 commit ea029dd8d0124fcd5db1c7003e87a7bd4ddb3bad Author: Cezary Rojewski Date: Fri Jul 31 16:41:46 2020 +0200 ASoC: core: Two step component registration Modify snd_soc_add_component so it calls snd_soc_component_initialize no longer and thus providing true two-step registration. Drivers may choose to change component's fields before actually adding it to ASoC subsystem. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20200731144146.6678-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 7274d4cd8506bbff9bf2d7c2f73b2febff99abef Author: Cezary Rojewski Date: Fri Jul 31 16:41:45 2020 +0200 ASoC: core: Simplify snd_soc_component_initialize declaration Move 'name' field initialization responsibility back to snd_soc_component_initialize to prepare snd_soc_add_component function for being called separatelly as a second registration step. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20200731144146.6678-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 08ff7209faf21daa01bf66c91c321ce52d4b4bdb Author: Cezary Rojewski Date: Fri Jul 31 16:41:44 2020 +0200 ASoC: core: Relocate and expose snd_soc_component_initialize To allow for two-step component registration, expose snd_soc_component_initialize function and move it back to soc-core.c. Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20200731144146.6678-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 679193b7baf8d88e41cbeb397ca17f797654947d Author: Andy Shevchenko Date: Fri Jul 31 15:37:32 2020 +0300 serial: 8250: Let serial core initialise spin lock Since the serial core handles spin lock initialisation, let the driver rely on it. Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200731123733.22754-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f3af1b68fc96b14b93d1013ce7965723dc53ebbc Author: Jiri Slaby Date: Thu Jul 30 12:55:46 2020 +0200 tty: keyboard, do not speculate on func_table index It is very unlikely for processor to speculate on the func_table index. The index is uchar and func_table is of size 256. So the compiler would need to screw up and generate a really bad code. But to stay on the safe side, forbid speculation on this user passed index. Signed-off-by: Jiri Slaby Cc: Jiri Kosina Link: https://lore.kernel.org/r/20200730105546.24268-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 2dbf11ec7d3a63ebde946b5747ad6bd74d45adb1 Author: Laurent Pinchart Date: Fri Jul 31 18:24:32 2020 +0300 ASoC: sh: Replace 'select' DMADEVICES 'with depends on' Enabling a whole subsystem from a single driver 'select' is frowned upon and won't be accepted in new drivers, that need to use 'depends on' instead. Existing selection of DMADEVICES will then cause circular dependencies. Replace them with a dependency. Signed-off-by: Laurent Pinchart Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20200731152433.1297-3-laurent.pinchart@ideasonboard.com Signed-off-by: Mark Brown commit 5aef1ff2397d021f93d874b57dff032fdfac73de Author: Shengjiu Wang Date: Fri Jul 31 14:28:15 2020 +0800 ASoC: fsl_sai: Fix value of FSL_SAI_CR1_RFW_MASK The fifo_depth is 64 on i.MX8QM/i.MX8QXP, 128 on i.MX8MQ, 16 on i.MX7ULP. Original FSL_SAI_CR1_RFW_MASK value 0x1F is not suitable for these platform, the FIFO watermark mask should be updated according to the fifo_depth. Fixes: a860fac42097 ("ASoC: fsl_sai: Add support for imx7ulp/imx8mq") Signed-off-by: Shengjiu Wang Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1596176895-28724-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit da3f23fde9d7b4a7e0ca9a9a096cec3104df1b82 Author: Jerome Brunet Date: Fri Jul 31 14:06:03 2020 +0200 ASoC: meson: cards: deal dpcm flag change Commit b73287f0b074 ("ASoC: soc-pcm: dpcm: fix playback/capture checks") changed the meaning of dpcm_playback/dpcm_capture and now requires the CPU DAI BE to aligned with those flags. This broke all Amlogic cards with uni-directional backends (All gx and most axg cards). While I'm still confused as to how this change is an improvement, those cards can't remain broken forever. Hopefully, next time an API change is done like that, all the users will be updated as part of the change, and not left to fend for themselves. Fixes: b73287f0b074 ("ASoC: soc-pcm: dpcm: fix playback/capture checks") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200731120603.2243261-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 4f8721542f7b75954bfad98c51aa59d683d35b50 Author: Pierre-Louis Bossart Date: Thu Jul 23 13:05:33 2020 -0500 ASoC: core: use less strict tests for dailink capabilities Previous updates to set dailink capabilities and check dailink capabilities were based on a flawed assumption that all dais support the same capabilities as the dailink. This is true for TDM configurations but existing configurations use an amplifier and a capture device on the same dailink, and the tests would prevent the card from probing. This patch modifies the snd_soc_dai_link_set_capabilities() helper so that the dpcm_playback (resp. dpcm_capture) dailink capabilities are set if at least one dai supports playback (resp. capture). Likewise the checks are modified so that an error is reported only when dpcm_playback (resp. dpcm_capture) is set but none of the CPU DAIs support playback (resp. capture). Fixes: 25612477d20b5 ('ASoC: soc-dai: set dai_link dpcm_ flags with a helper') Fixes: b73287f0b0745 ('ASoC: soc-pcm: dpcm: fix playback/capture checks') Suggested-by: Jerome Brunet Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200723180533.220312-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ffe8923f109b7ea92c0842c89e61300eefa11c94 Author: Florian Westphal Date: Fri Jul 24 13:34:46 2020 +0200 netfilter: nft_compat: make sure xtables destructors have run Pablo Neira found that after recent update of xt_IDLETIMER the iptables-nft tests sometimes show an error. He tracked this down to the delayed cleanup used by nf_tables core: del rule (transaction A) add rule (transaction B) Its possible that by time transaction B (both in same netns) runs, the xt target destructor has not been invoked yet. For native nft expressions this is no problem because all expressions that have such side effects make sure these are handled from the commit phase, rather than async cleanup. For nft_compat however this isn't true. Instead of forcing synchronous behaviour for nft_compat, keep track of the number of outstanding destructor calls. When we attempt to create a new expression, flush the cleanup worker to make sure destructors have completed. With lots of help from Pablo Neira. Reported-by: Pablo Neira Ayso Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 928da37a229f344424ffc89c9a58feb2368bb018 Author: Eric Dumazet Date: Wed Jul 29 18:57:55 2020 -0700 RDMA/umem: Add a schedule point in ib_umem_get() Mapping as little as 64GB can take more than 10 seconds, triggering issues on kernels with CONFIG_PREEMPT_NONE=y. ib_umem_get() already splits the work in 2MB units on x86_64, adding a cond_resched() in the long-lasting loop is enough to solve the issue. Note that sg_alloc_table() can still use more than 100 ms, which is also problematic. This might be addressed later in ib_umem_add_sg_table(), adding new blocks in sgl on demand. Link: https://lore.kernel.org/r/20200730015755.1827498-1-edumazet@google.com Signed-off-by: Eric Dumazet Signed-off-by: Jason Gunthorpe commit 2c12c8103d8f15790cf880f1545dafa36acb004a Author: Pierre-Louis Bossart Date: Tue Jul 28 11:20:40 2020 -0500 scripts/kernel-doc: optionally treat warnings as errors The kbuild bot recently added the W=1 option, which triggered documentation cleanups to squelch hundreds of kernel-doc warnings. To make sure new kernel contributions don't add regressions to kernel-doc descriptors, this patch suggests an option to treat warnings as errors in CI/automated tests. A -Werror command-line option is added to the kernel-doc script. When this option is set, the script will return the number of warnings found. The caller can then treat this positive return value as an error and stop the build. Using this command line option is however not straightforward when the kernel-doc script is called from other scripts. To align with typical kernel compilation or documentation generation, the Werror option is also set by checking the KCFLAGS environment variable, or if KDOC_WERROR is defined, as in the following examples: KCFLAGS="-Wall -Werror" make W=1 sound/ KCFLAGS="-Wall -Werror" make W=1 drivers/soundwire/ KDOC_WERROR=1 make htmldocs Note that in the last example the documentation build does not stop, only an additional log is provided. Credits to Randy Dunlap for suggesting the use of environment variables. Suggested-by: Randy Dunlap Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200728162040.92467-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Jonathan Corbet commit 0e4cd9f2654915be8d09a1bd1b405ce5426e64c4 Merge: 18aa3bd58b142 5f1f7f6c205a2 Author: Catalin Marinas Date: Fri Jul 31 18:09:57 2020 +0100 Merge branch 'for-next/read-barrier-depends' into for-next/core * for-next/read-barrier-depends: : Allow architectures to override __READ_ONCE() arm64: Reduce the number of header files pulled into vmlinux.lds.S compiler.h: Move compiletime_assert() macros into compiler_types.h checkpatch: Remove checks relating to [smp_]read_barrier_depends() include/linux: Remove smp_read_barrier_depends() from comments tools/memory-model: Remove smp_read_barrier_depends() from informal doc Documentation/barriers/kokr: Remove references to [smp_]read_barrier_depends() Documentation/barriers: Remove references to [smp_]read_barrier_depends() locking/barriers: Remove definitions for [smp_]read_barrier_depends() alpha: Replace smp_read_barrier_depends() usage with smp_[r]mb() vhost: Remove redundant use of read_barrier_depends() barrier asm/rwonce: Don't pull into 'asm-generic/rwonce.h' asm/rwonce: Remove smp_read_barrier_depends() invocation alpha: Override READ_ONCE() with barriered implementation asm/rwonce: Allow __READ_ONCE to be overridden by the architecture compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h tools: bpf: Use local copy of headers including uapi/linux/filter.h commit 18aa3bd58b1428d1927fe11f85ad444423d4fc59 Merge: 4557062da7ebf d1d3aa98b1d48 Author: Catalin Marinas Date: Fri Jul 31 18:09:50 2020 +0100 Merge branch 'for-next/tlbi' into for-next/core * for-next/tlbi: : Support for TTL (translation table level) hint in the TLB operations arm64: tlb: Use the TLBI RANGE feature in arm64 arm64: enable tlbi range instructions arm64: tlb: Detect the ARMv8.4 TLBI RANGE feature arm64: tlb: don't set the ttl value in flush_tlb_page_nosync arm64: Shift the __tlbi_level() indentation left arm64: tlb: Set the TTL field in flush_*_tlb_range arm64: tlb: Set the TTL field in flush_tlb_range tlb: mmu_gather: add tlb_flush_*_range APIs arm64: Add tlbi_user_level TLB invalidation helper arm64: Add level-hinted TLB invalidation helper arm64: Document SW reserved PTE/PMD bits in Stage-2 descriptors arm64: Detect the ARMv8.4 TTL feature commit 4557062da7ebfa9236af83fcb4323a1838ae533e Merge: 338c11e94e160 bbdbc11804ff0 c6c83d757a13a 325f5585ec369 55fdc1f44cd6b 9614cc576d76a 6305166c8771c 1a9ea25d1874c Author: Catalin Marinas Date: Fri Jul 31 18:09:39 2020 +0100 Merge branches 'for-next/misc', 'for-next/vmcoreinfo', 'for-next/cpufeature', 'for-next/acpi', 'for-next/perf', 'for-next/timens', 'for-next/msi-iommu' and 'for-next/trivial' into for-next/core * for-next/misc: : Miscellaneous fixes and cleanups arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack arm64/mm: save memory access in check_and_switch_context() fast switch path recordmcount: only record relocation of type R_AARCH64_CALL26 on arm64. arm64: Reserve HWCAP2_MTE as (1 << 18) arm64/entry: deduplicate SW PAN entry/exit routines arm64: s/AMEVTYPE/AMEVTYPER arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs arm64: stacktrace: Move export for save_stack_trace_tsk() smccc: Make constants available to assembly arm64/mm: Redefine CONT_{PTE, PMD}_SHIFT arm64/defconfig: Enable CONFIG_KEXEC_FILE arm64: Document sysctls for emulated deprecated instructions arm64/panic: Unify all three existing notifier blocks arm64/module: Optimize module load time by optimizing PLT counting * for-next/vmcoreinfo: : Export the virtual and physical address sizes in vmcoreinfo arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo * for-next/cpufeature: : CPU feature handling cleanups arm64/cpufeature: Validate feature bits spacing in arm64_ftr_regs[] arm64/cpufeature: Replace all open bits shift encodings with macros arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR2 register arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR1 register arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR0 register * for-next/acpi: : ACPI updates for arm64 arm64/acpi: disallow writeable AML opregion mapping for EFI code regions arm64/acpi: disallow AML memory opregions to access kernel memory * for-next/perf: : perf updates for arm64 arm64: perf: Expose some new events via sysfs tools headers UAPI: Update tools's copy of linux/perf_event.h arm64: perf: Add cap_user_time_short perf: Add perf_event_mmap_page::cap_user_time_short ABI arm64: perf: Only advertise cap_user_time for arch_timer arm64: perf: Implement correct cap_user_time time/sched_clock: Use raw_read_seqcount_latch() sched_clock: Expose struct clock_read_data arm64: perf: Correct the event index in sysfs perf/smmuv3: To simplify code for ioremap page in pmcg * for-next/timens: : Time namespace support for arm64 arm64: enable time namespace support arm64/vdso: Restrict splitting VVAR VMA arm64/vdso: Handle faults on timens page arm64/vdso: Add time namespace page arm64/vdso: Zap vvar pages when switching to a time namespace arm64/vdso: use the fault callback to map vvar pages * for-next/msi-iommu: : Make the MSI/IOMMU input/output ID translation PCI agnostic, augment the : MSI/IOMMU ACPI/OF ID mapping APIs to accept an input ID bus-specific parameter : and apply the resulting changes to the device ID space provided by the : Freescale FSL bus bus: fsl-mc: Add ACPI support for fsl-mc bus/fsl-mc: Refactor the MSI domain creation in the DPRC driver of/irq: Make of_msi_map_rid() PCI bus agnostic of/irq: make of_msi_map_get_device_domain() bus agnostic dt-bindings: arm: fsl: Add msi-map device-tree binding for fsl-mc bus of/device: Add input id to of_dma_configure() of/iommu: Make of_map_rid() PCI agnostic ACPI/IORT: Add an input ID to acpi_dma_configure() ACPI/IORT: Remove useless PCI bus walk ACPI/IORT: Make iort_msi_map_rid() PCI agnostic ACPI/IORT: Make iort_get_device_domain IRQ domain agnostic ACPI/IORT: Make iort_match_node_callback walk the ACPI namespace for NC * for-next/trivial: : Trivial fixes arm64: sigcontext.h: delete duplicated word arm64: ptrace.h: delete duplicated word arm64: pgtable-hwdef.h: delete duplicated words commit d4210f7013321dc6e5796445823935693ac3d83b Author: Julia Lawall Date: Thu Jul 30 12:17:30 2020 +0200 docs: ia64: correct typo Replace RTC_WKLAM_RD with RTC_WKALM_RD. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1596104250-32673-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Jonathan Corbet commit da2f0060d857da25a9e3ab5cb56a4b145f85c98a Author: Alexander Lobakin Date: Thu Jul 30 16:59:45 2020 +0000 mailmap: add entry for My Marvell account has been suspended, map the address to my private mail. Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/9xzFiqHAFGYuKfUycRaCQSIgsqmeL9E9SA3lSoqOMUPhFVaAgSgvukCUWO7iRbjtiUrFjK46fhu7dJ5TaCv1EjaNFm5yF_H3y5S1s_QALCA=@pm.me Signed-off-by: Jonathan Corbet commit 338c11e94e160f80d8352bf9b5da82dd1a910d2f Author: Maninder Singh Date: Fri Jul 31 17:19:50 2020 +0530 arm64: use IRQ_STACK_SIZE instead of THREAD_SIZE for irq stack IRQ_STACK_SIZE can be made different from THREAD_SIZE, and as IRQ_STACK_SIZE is used while irq stack allocation, same define should be used while printing information of irq stack. Signed-off-by: Maninder Singh Acked-by: Mark Rutland Link: https://lore.kernel.org/r/1596196190-14141-1-git-send-email-maninder1.s@samsung.com Signed-off-by: Catalin Marinas commit 42dae8937406c98ce0cb6ff0d683765c854098d9 Author: Logan Gunthorpe Date: Tue Jul 28 13:24:34 2020 -0600 PCI: switchtec: Add missing __iomem tag to fix sparse warnings Fix a missing __iomem tag in the init_pfn() function. This fixes a sparse warning of the form: $ make C=2 drivers/pci/switch/ drivers/pci/switch/switchtec.c:... incorrect type assignment(different address spaces) Fixes: 080b47def5e5 ("MicroSemi Switchtec management interface driver") Link: https://lore.kernel.org/r/20200728192434.18993-2-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit 5f11723b204aaf461e7a5242fc732222d2f0aa17 Author: Logan Gunthorpe Date: Tue Jul 28 13:24:33 2020 -0600 PCI: switchtec: Add missing __iomem and __user tags to fix sparse warnings Fix a number of missing __iomem and __user tags in the ioctl functions of the switchtec driver. This fixes a number of sparse warnings of the form: $ make C=2 drivers/pci/switch/ drivers/pci/switch/switchtec.c:... incorrect type in ... (different address spaces) Fixes: 52eabba5bcdb ("switchtec: Add IOCTLs to the Switchtec driver") Link: https://lore.kernel.org/r/20200728192434.18993-1-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas commit ffba964e4d1126bef5d636e8af70f052e50342fc Author: Tiezhu Yang Date: Fri Jul 31 16:29:02 2020 +0800 Documentation/bpf: Use valid and new links in index.rst There exists an error "404 Not Found" when I click the html link of "Documentation/networking/filter.rst" in the BPF documentation [1], fix it. Additionally, use the new links about "BPF and XDP Reference Guide" and "bpf(2)" to avoid redirects. [1] https://www.kernel.org/doc/html/latest/bpf/ Fixes: d9b9170a2653 ("docs: bpf: Rename README.rst to index.rst") Fixes: cb3f0d56e153 ("docs: networking: convert filter.txt to ReST") Signed-off-by: Tiezhu Yang Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1596184142-18476-1-git-send-email-yangtiezhu@loongson.cn commit bc6e8dc112133a60efbede8acde36dd5d1e748a1 Author: WANG Xuerui Date: Wed Jul 29 21:14:17 2020 +0800 MIPS: handle Loongson-specific GSExc exception Newer Loongson cores (Loongson-3A R2 and newer) use the implementation-dependent ExcCode 16 to signal Loongson-specific exceptions. The extended cause is put in the non-standard CP0.Diag1 register which is CP0 Register 22 Select 1, called GSCause in Loongson manuals. Inside is an exception code bitfield called GSExcCode, only codes 0 to 6 inclusive are documented (so far, in the Loongson 3A3000 User Manual, Volume 2). During experiments, it was found that some undocumented unprivileged instructions can trigger the also-undocumented GSExcCode 8 on Loongson 3A4000. Processor state is not corrupted, but we cannot continue without further knowledge, and Loongson is not providing that information as of this writing. So we send SIGILL on seeing this exception code to thwart easy local DoS attacks. Other exception codes are made fatal, partly because of insufficient knowledge, also partly because they are not as easily reproduced. None of them are encountered in the wild with upstream kernels and userspace so far. Some older cores (Loongson-3A1000 and Loongson-3B1500) have ExcCode 16 too, but the semantic is equivalent to GSExcCode 0. Because the respective manuals did not mention the CP0.Diag1 register or its read behavior, these cores are not covered in this patch, as MFC0 from non-existent CP0 registers is UNDEFINED according to the MIPS architecture spec. Reviewed-by: Huacai Chen Signed-off-by: WANG Xuerui Cc: Huacai Chen Cc: Jiaxun Yang Cc: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 2480c914699ecdf8b560f7af23b1a9c521084e04 Author: WANG Xuerui Date: Wed Jul 29 21:14:16 2020 +0800 MIPS: add definitions for Loongson-specific CP0.Diag1 register This 32-bit CP0 register is named GSCause in Loongson manuals. It carries Loongson extended exception information. We name it Diag1 because we fear the "GSCause" name might get changed in the future. Reviewed-by: Huacai Chen Signed-off-by: WANG Xuerui Cc: Huacai Chen Cc: Jiaxun Yang Cc: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit efd1b4ad3d5178a74387bc5ff69a2d4585f586c6 Author: WANG Xuerui Date: Wed Jul 29 21:14:15 2020 +0800 MIPS: only register FTLBPar exception handler for supported models Previously ExcCode 16 is unconditionally treated as the FTLB parity exception (FTLBPar), but in fact its semantic is implementation- dependent. Looking at various manuals it seems the FTLBPar exception is only present on some recent MIPS Technologies cores, so only register the handler on these. Fixes: 75b5b5e0a262790f ("MIPS: Add support for FTLBs") Reviewed-by: Huacai Chen Signed-off-by: WANG Xuerui Cc: Paul Burton Signed-off-by: Thomas Bogendoerfer commit 48f5dd56cf2980ff932c6fd98ff5a2c503cde97b Author: Paul Cercueil Date: Thu Jul 30 18:12:33 2020 +0200 MIPS: ingenic: Hardcode mem size for qi,lb60 board Old Device Tree for the qi,lb60 (aka. Ben Nanonote) did not have a 'memory' node. The kernel would then read the memory controller registers to know how much RAM was available. Since every other supported board has had a 'memory' node from the beginning, we can just hardcode a RAM size of 32 MiB when running with an old Device Tree without the 'memory' node. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 714b649dc7123c23f5082e8d11d2b81acf5b7a78 Author: Paul Cercueil Date: Thu Jul 30 18:12:32 2020 +0200 MIPS: DTS: ingenic/qi,lb60: Add model and memory node Add a memory node, which was missing until now, and use the retail name "Ben Nanonote" as the model, as it is way more known under that name than under the name "LB60". Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 199c5f080ed695c4b01236e06743a28952403d17 Author: Paul Cercueil Date: Thu Jul 30 18:12:31 2020 +0200 MIPS: ingenic: Use fw_passed_dtb even if CONFIG_BUILTIN_DTB The fw_passed_dtb is now properly initialized even when CONFIG_BUILTIN_DTB is used, so there's no need to handle it in any particular way here. Note that the behaviour is slightly different, as the previous code used the built-in Device Tree unconditionally, while now the built-in Device Tree is only used when the bootloader did not provide one. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 37e5c69ffd4195c35aeb24978701f40ac82af7b1 Author: Paul Cercueil Date: Thu Jul 30 18:12:30 2020 +0200 MIPS: head.S: Init fw_passed_dtb to builtin DTB Init the 'fw_passed_dtb' pointer to the buit-in Device Tree blob when it has been compiled in with CONFIG_BUILTIN_DTB. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit c3028b951ed15b7c3409c6d9a69dad615de23d3f Author: Nicolas Saenz Julienne Date: Fri Jul 31 12:02:48 2020 +0200 of: address: Fix parser address/size cells initialization bus->count_cells() parses cells starting from the node's parent. This is not good enough for parser_init() which is generally parsing a bus node. Revert to previous behavior using of_bus_n_*_cells(). Fixes: 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser") Reported-by: Nathan Chancellor Signed-off-by: Nicolas Saenz Julienne Acked-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 0fc0ead3488836503573286bcaa56f9743ea2bcc Author: Jiaxun Yang Date: Thu Jul 30 08:56:14 2020 +0800 of_address: Guard of_bus_pci_get_flags with CONFIG_PCI After 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser"), the last user of of_bus_pci_get_flags when CONFIG_PCI is disabled had gone. This caused unused function warning when compiling without CONFIG_PCI. Fix by guarding it with CONFIG_PCI. Signed-off-by: Jiaxun Yang Reported-by: Stephen Rothwell Fixes: 2f96593ecc37 ("of_address: Add bus type match for pci ranges parser") Acked-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 1acf8f90ea7ee59006d0474275922145ac291331 Author: Jerry Crunchtime Date: Fri Jul 31 17:08:01 2020 +0200 libbpf: Fix register in PT_REGS MIPS macros The o32, n32 and n64 calling conventions require the return value to be stored in $v0 which maps to $2 register, i.e., the register 2. Fixes: c1932cd ("bpf: Add MIPS support to samples/bpf.") Signed-off-by: Jerry Crunchtime Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/43707d31-0210-e8f0-9226-1af140907641@web.de commit d1719f70d0a5b83b12786a7dbc5b9fe396469016 Author: Jens Axboe Date: Thu Jul 30 13:43:53 2020 -0600 io_uring: don't touch 'ctx' after installing file descriptor As soon as we install the file descriptor, we have to assume that it can get arbitrarily closed. We currently account memory (and note that we did) after installing the ring fd, which means that it could be a potential use-after-free condition if the fd is closed right after being installed, but before we fiddle with the ctx. In fact, syzbot reported this exact scenario: BUG: KASAN: use-after-free in io_account_mem fs/io_uring.c:7397 [inline] BUG: KASAN: use-after-free in io_uring_create fs/io_uring.c:8369 [inline] BUG: KASAN: use-after-free in io_uring_setup+0x2797/0x2910 fs/io_uring.c:8400 Read of size 1 at addr ffff888087a41044 by task syz-executor.5/18145 CPU: 0 PID: 18145 Comm: syz-executor.5 Not tainted 5.8.0-rc7-next-20200729-syzkaller #0 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+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x497 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 io_account_mem fs/io_uring.c:7397 [inline] io_uring_create fs/io_uring.c:8369 [inline] io_uring_setup+0x2797/0x2910 fs/io_uring.c:8400 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45c429 Code: 8d b6 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 5b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8f121d0c78 EFLAGS: 00000246 ORIG_RAX: 00000000000001a9 RAX: ffffffffffffffda RBX: 0000000000008540 RCX: 000000000045c429 RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000196 RBP: 000000000078bf38 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000078bf0c R13: 00007fff86698cff R14: 00007f8f121d19c0 R15: 000000000078bf0c Move the accounting of the ring used locked memory before we get and install the ring file descriptor. Cc: stable@vger.kernel.org Reported-by: syzbot+9d46305e76057f30c74e@syzkaller.appspotmail.com Fixes: 309758254ea6 ("io_uring: report pinned memory usage") Reviewed-by: Stefano Garzarella Signed-off-by: Jens Axboe commit c7c9e914f9a0478fba4dc6f227cfd69cf84a4063 Author: Wolfram Sang Date: Sun Jul 26 18:16:06 2020 +0200 i2c: rcar: avoid race when unregistering slave Due to the lockless design of the driver, it is theoretically possible to access a NULL pointer, if a slave interrupt was running while we were unregistering the slave. To make this rock solid, disable the interrupt for a short time while we are clearing the interrupt_enable register. This patch is purely based on code inspection. The OOPS is super-hard to trigger because clearing SAR (the address) makes interrupts even more unlikely to happen as well. While here, reinit SCR to SDBS because this bit should always be set according to documentation. There is no effect, though, because the interface is disabled. Fixes: 7b814d852af6 ("i2c: rcar: avoid race when unregistering slave client") Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang commit 073d398dc4841f62488ac6060ffeb9dfce6e0a98 Merge: afca861bc6a31 92ed301919932 Author: Wolfram Sang Date: Fri Jul 31 15:54:27 2020 +0200 Merge tag 'v5.8-rc7' into i2c/for-5.9 commit 1041dee2178ffd59e2c693426475c21594f9db86 Author: Bernard Date: Tue Jul 21 09:33:03 2020 +0800 drm/msm: use kthread_create_worker instead of kthread_run Use kthread_create_worker to simplify the code and optimise the manager struct: msm_drm_thread. With this change, we could remove struct element (struct task_struct *thread & struct kthread_worker worker), instead, use one point (struct kthread_worker *worker). Signed-off-by: Bernard Zhao Signed-off-by: Rob Clark commit 974b7115a73d8d3ff77cfd6f69408d20c1bb7d06 Author: Konrad Dybcio Date: Sun Jul 26 13:12:04 2020 +0200 drm/msm/mdp5: Add MDP5 configuration for SDM636/660 This commit adds support for the MDP5 IP on Snapdragon 636/660. Signed-off-by: Konrad Dybcio Signed-off-by: Rob Clark commit 033f47f7f12168b39c10158551576b15dec61505 Author: Konrad Dybcio Date: Sun Jul 26 13:12:03 2020 +0200 drm/msm/dsi: Add DSI configuration for SDM660 This also applies to sdm630/636 and their SDA counterparts. Signed-off-by: Konrad Dybcio Signed-off-by: Rob Clark commit 75c1437ceb77ffcdb9358688b3b56245c6ba3851 Author: Konrad Dybcio Date: Sun Jul 26 13:12:02 2020 +0200 drm/msm/mdp5: Add MDP5 configuration for SDM630 This commit adds support for the MDP5 IP on Snapdragon 630. The configuration is different from SDM660's, as the latter one has two DSI outputs. Signed-off-by: Konrad Dybcio Signed-off-by: Rob Clark commit 694dd304cc294b69db7191cec1d83e5a29c6a4b0 Author: Konrad Dybcio Date: Sun Jul 26 13:12:01 2020 +0200 drm/msm/dsi: Add phy configuration for SDM630/636/660 These SoCs make use of the 14nm phy, but at different addresses than other 14nm units. Signed-off-by: Konrad Dybcio Signed-off-by: Rob Clark commit 66ffb9150b00f3fdf50d08153df36d6ea052dbd4 Author: Jonathan Marek Date: Fri Jul 10 19:04:10 2020 -0400 drm/msm/a6xx: add A640/A650 hwcg Initialize hardware clock-gating registers on A640 and A650 GPUs. At least for A650, this solves some performance issues. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit b1c53a2a2d395d404c8f9e2d416872ae053c9d2b Author: Jonathan Marek Date: Fri Jul 10 19:04:09 2020 -0400 drm/msm/a6xx: hwcg tables in gpulist This will allow supporting different hwcg tables for a6xx. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit af776a3e1c304bf0409106cd2306173885e415f2 Author: Jonathan Marek Date: Fri Jul 10 20:47:31 2020 -0400 drm/msm/dpu: add SM8250 to hw catalog This brings up basic video mode functionality for SM8250 DPU. Command mode and dual mixer/intf configurations are not working, future patches will address this. Scaler functionality and multiple planes is also untested. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 386fced3f76f6ba400adaad13c90b66453ede9ee Author: Jonathan Marek Date: Fri Jul 10 20:47:30 2020 -0400 drm/msm/dpu: add SM8150 to hw catalog This brings up basic video mode functionality for SM8150 DPU. Command mode and dual mixer/intf configurations are not working, future patches will address this. Scaler functionality and multiple planes is also untested. Signed-off-by: Jonathan Marek [fixup max_linewidth warning] Signed-off-by: Rob Clark commit fc3a69ec68d37dabaa0c2044197a01c4db7c8046 Author: Jonathan Marek Date: Fri Jul 10 20:47:29 2020 -0400 drm/msm/dpu: intf timing path for displayport Calculate the correct timings for displayport, from downstream driver. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 4376f2e5087d196a274952dadfdcc20abc874425 Author: Jonathan Marek Date: Fri Jul 10 20:47:28 2020 -0400 drm/msm/dpu: set missing flush bits for INTF_2 and INTF_3 This fixes flushing of INTF_2 and INTF_3 on SM8150 and SM8250 hardware. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit cace3ac4bc08c5261aa4360a7d7aacc45a362fc2 Author: Jonathan Marek Date: Fri Jul 10 20:47:27 2020 -0400 drm/msm/dpu: don't use INTF_INPUT_CTRL feature on sdm845 The INTF_INPUT_CTRL feature is not available on sdm845, so don't set it. This also adds separate feature bits for INTF (based on downstream) instead of using CTL feature bit for it, and removes the unnecessary NULL check in the added bind_pingpong_blk function. Fixes: 73bfb790ac786ca55fa2786a06f59 ("msm:disp:dpu1: setup display datapath for SC7180 target") Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 7e9d4cdd653a4e9de6474fbca05c095f15798188 Author: Jonathan Marek Date: Fri Jul 10 20:47:26 2020 -0400 drm/msm/dpu: move some sspp caps to dpu_caps This isn't something that ever changes between planes, so move it to dpu_caps struct. Making this change will allow more re-use in the "SSPP sub blocks config" part of the catalog, in particular when adding support for SM8150 and SM8250 which have different max_linewidth. This also sets max_hdeci_exp/max_vdeci_exp to 0 for sc7180, as decimation is not supported on the newest DPU versions. (note that decimation is not implemented, so this changes nothing) Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 544d8b96150dea3d439dcaf66ac01eca58f4016c Author: Jonathan Marek Date: Fri Jul 10 20:47:25 2020 -0400 drm/msm/dpu: update UBWC config for sm8150 and sm8250 Update the UBWC registers to the right values for sm8150 and sm8250. This removes broken dpu_hw_reset_ubwc, which doesn't work because the "force blk offset to zero to access beginning of register region" hack is copied from downstream, where mapped region starts 0x1000 below what is used in the upstream driver. Also simplifies the overly complicated change that was introduced in e4f9bbe9f8beab9a1ce4 to work around dpu_hw_reset_ubwc being broken. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit de321dcc23d51b791ccba6479fcebc797927efbf Author: Jonathan Marek Date: Fri Jul 10 20:47:24 2020 -0400 drm/msm/dpu: use right setup_blend_config for sm8150 and sm8250 All DPU versions starting from 4.0 use the sdm845 version, so check for that instead of checking each version individually. This chooses the right function for sm8150 and sm8250. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit d0bac4e9cd66fe0c0f5d7fbbf2d0f9956a3d8916 Author: Jonathan Marek Date: Mon May 25 23:25:13 2020 -0400 drm/msm/a6xx: set ubwc config for A640 and A650 This is required for A640 and A650 to be able to share UBWC-compressed images with other HW such as display, which expect this configuration. Signed-off-by: Jonathan Marek Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit b5e02e117b3472c1d5c9602c3efb8d978057aeea Author: Rob Clark Date: Tue Jul 7 13:35:00 2020 -0700 drm/msm/adreno: un-open-code some packets Small cleanup, lets not open-code bits/bitfields that are properly defined in the rnndb xml (and therefore have builders in the generated headers) Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit c28c82e9db8584b15ae3754dfd80385949938a8b Author: Rob Clark Date: Tue Jul 7 13:34:59 2020 -0700 drm/msm: sync generated headers We haven't sync'd for a while.. pull in updates to get definitions for some fields in pkt7 payloads. Signed-off-by: Rob Clark Acked-by: Jordan Crouse Signed-off-by: Rob Clark commit 51dd427192ac47e7d075b562e386963cb7aabcfa Author: Jonathan Marek Date: Tue Jun 30 23:09:57 2020 -0400 drm/msm/a6xx: add build_bw_table for A640/A650 This sets up bw tables for A640/A650 similar to A618/A630, 0 DDR bandwidth vote, and the CNOC vote. A640 has the same CNOC addresses as A630 and was working, but this is required for A650 to work. Eventually the bw table should be filled by querying the interconnect driver for each BW in the dts, but use these dummy tables for now. Signed-off-by: Jonathan Marek Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 142639a52a01e90c512a9a8d2156997e02a65b53 Author: Jonathan Marek Date: Mon Jun 29 20:10:06 2020 -0400 drm/msm/a6xx: fix crashstate capture for A650 A650 has a separate RSCC region, so dump RSCC registers separately, reading them from the RSCC base. Without this change a GPU hang will cause a system reset if CONFIG_DEV_COREDUMP is enabled. Signed-off-by: Jonathan Marek Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 62a35e81c2c1bae04fdefde56f2a92dd3e56164d Author: Eric Anholt Date: Mon Jun 29 11:19:21 2020 -0700 drm/msm: Quiet error during failure in optional resource mappings. We don't expect to find vbif_nrt or regdma on sdm845, but were clogging up dmesg with errors about it. Signed-off-by: Eric Anholt Reported-by: kernel test robot Signed-off-by: Rob Clark commit ecf9cd48994afaa1cb9f1ff5e5575ab468b10a3a Author: Eric Anholt Date: Mon Jun 29 11:19:20 2020 -0700 drm/msm: Garbage collect unused resource _len fields. Nothing was using the lengths of these ioremaps. Signed-off-by: Eric Anholt Signed-off-by: Rob Clark commit b8afe9f87c7b98cae8ee87786080026b61c64e60 Author: Rob Clark Date: Wed Jul 15 15:19:51 2020 -0700 drm/msm/dpu: fix/enable 6bpc dither with split-lm If split-lm is used (for ex, on sdm845), we can have multiple ping- pongs, but only a single phys encoder. We need to configure dithering on each of them. Signed-off-by: Rob Clark Tested-by: Steev Klimaszewski Reviewed-by: Kalyan Thota Signed-off-by: Rob Clark commit 57c0bd517c06b088106b0236ed604056c8e06da5 Author: Akhil P Oommen Date: Fri Jul 17 20:04:18 2020 +0530 drm: msm: a6xx: fix gpu failure after system resume On targets where GMU is available, GMU takes over the ownership of GX GDSC during its initialization. So, move the refcount-get on GX PD before we initialize the GMU. This ensures that nobody can collapse the GX GDSC once GMU owns the GX GDSC. This patch fixes some GMU OOB errors seen during GPU wake up during a system resume. Reported-by: Matthias Kaehlcke Signed-off-by: Akhil P Oommen Tested-by: Matthias Kaehlcke Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 32d3e0feccfe2d07e73aaa322766ab04b3c9d594 Author: Rajendra Nayak Date: Thu Jul 9 16:34:32 2020 +0530 drm/msm: dsi: Use OPP API to set clk/perf state On SDM845 and SC7180 DSI needs to express a performance state requirement on a power domain depending on the clock rates. Use OPP table from DT to register with OPP framework and use dev_pm_opp_set_rate() to set the clk/perf state. dev_pm_opp_set_rate() is designed to be equivalent to clk_set_rate() for devices without an OPP table, hence the change works fine on devices/platforms which only need to set a clock rate. Signed-off-by: Rajendra Nayak Reviewed-by: Matthias Kaehlcke Signed-off-by: Rob Clark commit b0530eb1191307e9038d75e5c83973a396137681 Author: Rajendra Nayak Date: Thu Jul 9 16:34:31 2020 +0530 drm/msm/dpu: Use OPP API to set clk/perf state On some qualcomm platforms DPU needs to express a performance state requirement on a power domain depending on the clock rates. Use OPP table from DT to register with OPP framework and use dev_pm_opp_set_rate() to set the clk/perf state. Signed-off-by: Rajendra Nayak Reviewed-by: Rob Clark Reviewed-by: Matthias Kaehlcke Signed-off-by: Rob Clark commit 5e16372b5940b1fecc3cc887fc02a50ba148d373 Author: Rob Clark Date: Wed Jul 1 13:36:00 2020 -0700 drm/msm: ratelimit crtc event overflow error This can happen a lot when things go pear shaped. Lets not flood dmesg when this happens. Signed-off-by: Rob Clark Reviewed-by: Abhinav Kumar Signed-off-by: Rob Clark commit 1f60d11423db7152508f965fcf2db13a1094f7f3 Author: Sharat Masetty Date: Mon Jul 13 18:11:42 2020 +0530 drm: msm: a6xx: send opp instead of a frequency This patch changes the plumbing to send the devfreq recommended opp rather than the frequency. Also consolidate and rearrange the code in a6xx to set the GPU frequency and the icc vote in preparation for the upcoming changes for GPU->DDR scaling votes. Signed-off-by: Sharat Masetty Signed-off-by: Akhil P Oommen Signed-off-by: Rob Clark commit 369c4ef4330f395835f63fe62e4110f4608c9459 Author: Sharat Masetty Date: Mon Jul 13 18:11:41 2020 +0530 dt-bindings: drm/msm/gpu: Document gpu opp table Update documentation to list the gpu opp table bindings including the newly added "opp-peak-kBps" needed for GPU-DDR bandwidth scaling. Signed-off-by: Sharat Masetty Acked-by: Rob Herring Signed-off-by: Akhil P Oommen Signed-off-by: Rob Clark commit 3cbdc8d8b7f39a7af3ea7b8dfa75caaebfda4e56 Author: Akhil P Oommen Date: Fri Jul 10 02:01:55 2020 +0530 drm/msm: Fix a null pointer access in msm_gem_shrinker_count() Adding an msm_gem_object object to the inactive_list before completing its initialization is a bad idea because shrinker may pick it up from the inactive_list. Fix this by making sure that the initialization is complete before moving the msm_obj object to the inactive list. This patch fixes the below error: [10027.553044] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000068 [10027.573305] Mem abort info: [10027.590160] ESR = 0x96000006 [10027.597905] EC = 0x25: DABT (current EL), IL = 32 bits [10027.614430] SET = 0, FnV = 0 [10027.624427] EA = 0, S1PTW = 0 [10027.632722] Data abort info: [10027.638039] ISV = 0, ISS = 0x00000006 [10027.647459] CM = 0, WnR = 0 [10027.654345] user pgtable: 4k pages, 39-bit VAs, pgdp=00000001e3a6a000 [10027.672681] [0000000000000068] pgd=0000000198c31003, pud=0000000198c31003, pmd=0000000000000000 [10027.693900] Internal error: Oops: 96000006 [#1] PREEMPT SMP [10027.738261] CPU: 3 PID: 214 Comm: kswapd0 Tainted: G S 5.4.40 #1 [10027.745766] Hardware name: Qualcomm Technologies, Inc. SC7180 IDP (DT) [10027.752472] pstate: 80c00009 (Nzcv daif +PAN +UAO) [10027.757409] pc : mutex_is_locked+0x14/0x2c [10027.761626] lr : msm_gem_shrinker_count+0x70/0xec [10027.766454] sp : ffffffc011323ad0 [10027.769867] x29: ffffffc011323ad0 x28: ffffffe677e4b878 [10027.775324] x27: 0000000000000cc0 x26: 0000000000000000 [10027.780783] x25: ffffff817114a708 x24: 0000000000000008 [10027.786242] x23: ffffff8023ab7170 x22: 0000000000000001 [10027.791701] x21: ffffff817114a080 x20: 0000000000000119 [10027.797160] x19: 0000000000000068 x18: 00000000000003bc [10027.802621] x17: 0000000004a34210 x16: 00000000000000c0 [10027.808083] x15: 0000000000000000 x14: 0000000000000000 [10027.813542] x13: ffffffe677e0a3c0 x12: 0000000000000000 [10027.819000] x11: 0000000000000000 x10: ffffff8174b94340 [10027.824461] x9 : 0000000000000000 x8 : 0000000000000000 [10027.829919] x7 : 00000000000001fc x6 : ffffffc011323c88 [10027.835373] x5 : 0000000000000001 x4 : ffffffc011323d80 [10027.840832] x3 : ffffffff0477b348 x2 : 0000000000000000 [10027.846290] x1 : ffffffc011323b68 x0 : 0000000000000068 [10027.851748] Call trace: [10027.854264] mutex_is_locked+0x14/0x2c [10027.858121] msm_gem_shrinker_count+0x70/0xec [10027.862603] shrink_slab+0xc0/0x4b4 [10027.866187] shrink_node+0x4a8/0x818 [10027.869860] kswapd+0x624/0x890 [10027.873097] kthread+0x11c/0x12c [10027.876424] ret_from_fork+0x10/0x18 [10027.880102] Code: f9000bf3 910003fd aa0003f3 d503201f (f9400268) [10027.886362] ---[ end trace df5849a1a3543251 ]--- [10027.891518] Kernel panic - not syncing: Fatal exception Signed-off-by: Akhil P Oommen Signed-off-by: Rob Clark commit 3c128638a07d74666e43e7b827b69f78878caa8f Author: Kalyan Thota Date: Thu Jun 25 17:46:59 2020 +0530 drm/msm/dpu: add support for dither block in display This change enables dither block for primary interface in display. Enabled for 6bpc in the current version. Changes in v1: - Remove redundant error checks (Rob). Signed-off-by: Kalyan Thota Tested-by: Douglas Anderson Tested-by: Kristian H. Kristensen Signed-off-by: Rob Clark commit 520c651f3b209b667a8a9cec43348868d6c24b4d Author: Rob Clark Date: Wed Jul 15 12:07:30 2020 -0700 drm/msm/adreno: fix gpu probe if no interconnect-names If there is no interconnect-names, but there is an interconnects property, then of_icc_get(dev, "gfx-mem"); would return an error rather than NULL. Also, if there is no interconnect-names property, there will never be a ocmem path. But of_icc_get(dev, "ocmem") would return -EINVAL instead of -ENODATA. Just don't bother trying in this case. v2: explicity check for interconnect-names property Fixes: 08af4769c7d2 ("drm/msm: handle for EPROBE_DEFER for of_icc_get") Fixes: 00bb9243d346 ("drm/msm/gpu: add support for ocmem interconnect path") Signed-off-by: Rob Clark Reviewed-by: Jordan Crouse Signed-off-by: Rob Clark commit 075f77324f90149bac12c8a705dae5786a1d24fb Author: Herbert Xu Date: Fri Jul 31 17:41:58 2020 +1000 Bluetooth: Remove CRYPTO_ALG_INTERNAL flag The flag CRYPTO_ALG_INTERNAL is not meant to be used outside of the Crypto API. It isn't needed here anyway. Signed-off-by: Herbert Xu Signed-off-by: Johan Hedberg commit 79bf118957a1966344b247d240434d8047d02ac9 Author: Marcel Holtmann Date: Thu Jul 30 19:40:11 2020 +0200 Bluetooth: Increment management interface revision Increment the mgmt revision due to the recently added new commands. Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit af0870c4e75655b1931d0a5ffde2f448a2794362 Author: Vaibhav Jain Date: Fri Jul 31 12:11:53 2020 +0530 powerpc/papr_scm: Add support for fetching nvdimm 'fuel-gauge' metric We add support for reporting 'fuel-gauge' NVDIMM metric via PAPR_PDSM_HEALTH pdsm payload. 'fuel-gauge' metric indicates the usage life remaining of a papr-scm compatible NVDIMM. PHYP exposes this metric via the H_SCM_PERFORMANCE_STATS. The metric value is returned from the pdsm by extending the return payload 'struct nd_papr_pdsm_health' without breaking the ABI. A new field 'dimm_fuel_gauge' to hold the metric value is introduced at the end of the payload struct and its presence is indicated by by extension flag PDSM_DIMM_HEALTH_RUN_GAUGE_VALID. The patch introduces a new function papr_pdsm_fuel_gauge() that is called from papr_pdsm_health(). If fetching NVDIMM performance stats is supported then 'papr_pdsm_fuel_gauge()' allocated an output buffer large enough to hold the performance stat and passes it to drc_pmem_query_stats() that issues the HCALL to PHYP. The return value of the stat is then populated in the 'struct nd_papr_pdsm_health.dimm_fuel_gauge' field with extension flag 'PDSM_DIMM_HEALTH_RUN_GAUGE_VALID' set in 'struct nd_papr_pdsm_health.extension_flags' Signed-off-by: Vaibhav Jain Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200731064153.182203-3-vaibhav@linux.ibm.com commit 2d02bf835e5731de632c8a13567905fa7c0da01c Author: Vaibhav Jain Date: Fri Jul 31 12:11:52 2020 +0530 powerpc/papr_scm: Fetch nvdimm performance stats from PHYP Update papr_scm.c to query dimm performance statistics from PHYP via H_SCM_PERFORMANCE_STATS hcall and export them to user-space as PAPR specific NVDIMM attribute 'perf_stats' in sysfs. The patch also provide a sysfs ABI documentation for the stats being reported and their meanings. During NVDIMM probe time in papr_scm_nvdimm_init() a special variant of H_SCM_PERFORMANCE_STATS hcall is issued to check if collection of performance statistics is supported or not. If successful then a PHYP returns a maximum possible buffer length needed to read all performance stats. This returned value is stored in a per-nvdimm attribute 'stat_buffer_len'. The layout of request buffer for reading NVDIMM performance stats from PHYP is defined in 'struct papr_scm_perf_stats' and 'struct papr_scm_perf_stat'. These structs are used in newly introduced drc_pmem_query_stats() that issues the H_SCM_PERFORMANCE_STATS hcall. The sysfs access function perf_stats_show() uses value 'stat_buffer_len' to allocate a buffer large enough to hold all possible NVDIMM performance stats and passes it to drc_pmem_query_stats() to populate. Finally statistics reported in the buffer are formatted into the sysfs access function output buffer. Signed-off-by: Vaibhav Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200731064153.182203-2-vaibhav@linux.ibm.com commit 3e338d3c95c735dc3265a86016bb4c022ec7cadc Author: Suren Baghdasaryan Date: Thu Jul 30 12:26:32 2020 -0700 staging: android: ashmem: Fix lockdep warning for write operation syzbot report [1] describes a deadlock when write operation against an ashmem fd executed at the time when ashmem is shrinking its cache results in the following lock sequence: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(&sb->s_type->i_mutex_key#13); lock(fs_reclaim); lock(&sb->s_type->i_mutex_key#13); kswapd takes fs_reclaim and then inode_lock while generic_perform_write takes inode_lock and then fs_reclaim. However ashmem does not support writing into backing shmem with a write syscall. The only way to change its content is to mmap it and operate on mapped memory. Therefore the race that lockdep is warning about is not valid. Resolve this by introducing a separate lockdep class for the backing shmem inodes. [1]: https://lkml.kernel.org/lkml/0000000000000b5f9d059aa2037f@google.com/ Reported-by: syzbot+7a0d9d0b26efefe61780@syzkaller.appspotmail.com Signed-off-by: Suren Baghdasaryan Cc: stable Reviewed-by: Joel Fernandes (Google) Link: https://lore.kernel.org/r/20200730192632.3088194-1-surenb@google.com Signed-off-by: Greg Kroah-Hartman commit 97a6f772f36b7f52bcfa56a581bbd2470cffe23d Author: Christian Gromm Date: Fri Jul 31 14:20:58 2020 +0200 drivers: most: add USB adapter driver This patch adds the USB driver source file most_usb.c and modifies the Makefile and Kconfig accordingly. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1596198058-26541-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 46cbd0b05799e8234b719d18f3a4b27679c4c92e Author: Crag Wang Date: Thu Jul 30 11:26:09 2020 +0800 power: supply: wilco_ec: Add long life charging mode This is a long life mode set in the factory for extended warranty battery, the power charging rate is customized so that battery at work last longer. Presently switching to a different battery charging mode is through EC PID 0x0710 to configure the battery firmware, this operation will be blocked by EC with failure code 0x01 when PLL mode is already in use. Signed-off-by: Crag Wang Reviewed-by: Mario Limonciello Signed-off-by: Sebastian Reichel commit 7c43b0c1d499c790cdb5623d27fdcef544ddb566 Author: Ian Rogers Date: Wed Jul 29 15:00:34 2020 -0700 perf bench: Add benchmark of find_next_bit for_each_set_bit, or similar functions like for_each_cpu, may be hot within the kernel. If many bits were set then one could imagine on Intel a "bt" instruction with every bit may be faster than the function call and word length find_next_bit logic. Add a benchmark to measure this. This benchmark on AMD rome and Intel skylakex shows "bt" is not a good option except for very small bitmaps. Committer testing: # perf bench Usage: perf bench [] [] # List of all available benchmark collections: sched: Scheduler and IPC benchmarks syscall: System call benchmarks mem: Memory access benchmarks numa: NUMA scheduling and MM benchmarks futex: Futex stressing benchmarks epoll: Epoll stressing benchmarks internals: Perf-internals benchmarks all: All benchmarks # perf bench mem # List of available benchmarks for collection 'mem': memcpy: Benchmark for memcpy() functions memset: Benchmark for memset() functions find_bit: Benchmark for find_bit() functions all: Run all memory access benchmarks # perf bench mem find_bit # Running 'mem/find_bit' benchmark: 100000 operations 1 bits set of 1 bits Average for_each_set_bit took: 730.200 usec (+- 6.468 usec) Average test_bit loop took: 366.200 usec (+- 4.652 usec) 100000 operations 1 bits set of 2 bits Average for_each_set_bit took: 781.000 usec (+- 24.247 usec) Average test_bit loop took: 550.200 usec (+- 4.152 usec) 100000 operations 2 bits set of 2 bits Average for_each_set_bit took: 1113.400 usec (+- 112.340 usec) Average test_bit loop took: 1098.500 usec (+- 182.834 usec) 100000 operations 1 bits set of 4 bits Average for_each_set_bit took: 843.800 usec (+- 8.772 usec) Average test_bit loop took: 948.800 usec (+- 10.278 usec) 100000 operations 2 bits set of 4 bits Average for_each_set_bit took: 1185.800 usec (+- 114.345 usec) Average test_bit loop took: 1473.200 usec (+- 175.498 usec) 100000 operations 4 bits set of 4 bits Average for_each_set_bit took: 1769.667 usec (+- 233.177 usec) Average test_bit loop took: 1864.933 usec (+- 187.470 usec) 100000 operations 1 bits set of 8 bits Average for_each_set_bit took: 898.000 usec (+- 21.755 usec) Average test_bit loop took: 1768.400 usec (+- 23.672 usec) 100000 operations 2 bits set of 8 bits Average for_each_set_bit took: 1244.900 usec (+- 116.396 usec) Average test_bit loop took: 2201.800 usec (+- 145.398 usec) 100000 operations 4 bits set of 8 bits Average for_each_set_bit took: 1822.533 usec (+- 231.554 usec) Average test_bit loop took: 2569.467 usec (+- 168.453 usec) 100000 operations 8 bits set of 8 bits Average for_each_set_bit took: 2845.100 usec (+- 441.365 usec) Average test_bit loop took: 3023.300 usec (+- 219.575 usec) 100000 operations 1 bits set of 16 bits Average for_each_set_bit took: 923.400 usec (+- 17.560 usec) Average test_bit loop took: 3240.000 usec (+- 16.492 usec) 100000 operations 2 bits set of 16 bits Average for_each_set_bit took: 1264.300 usec (+- 114.034 usec) Average test_bit loop took: 3714.400 usec (+- 158.898 usec) 100000 operations 4 bits set of 16 bits Average for_each_set_bit took: 1817.867 usec (+- 222.199 usec) Average test_bit loop took: 4015.333 usec (+- 154.162 usec) 100000 operations 8 bits set of 16 bits Average for_each_set_bit took: 2826.350 usec (+- 433.457 usec) Average test_bit loop took: 4460.350 usec (+- 210.762 usec) 100000 operations 16 bits set of 16 bits Average for_each_set_bit took: 4615.600 usec (+- 809.350 usec) Average test_bit loop took: 5129.960 usec (+- 320.821 usec) 100000 operations 1 bits set of 32 bits Average for_each_set_bit took: 904.400 usec (+- 14.250 usec) Average test_bit loop took: 6194.000 usec (+- 29.254 usec) 100000 operations 2 bits set of 32 bits Average for_each_set_bit took: 1252.700 usec (+- 116.432 usec) Average test_bit loop took: 6652.400 usec (+- 154.352 usec) 100000 operations 4 bits set of 32 bits Average for_each_set_bit took: 1824.200 usec (+- 229.133 usec) Average test_bit loop took: 6961.733 usec (+- 154.682 usec) 100000 operations 8 bits set of 32 bits Average for_each_set_bit took: 2823.950 usec (+- 432.296 usec) Average test_bit loop took: 7351.900 usec (+- 193.626 usec) 100000 operations 16 bits set of 32 bits Average for_each_set_bit took: 4552.560 usec (+- 785.141 usec) Average test_bit loop took: 7998.360 usec (+- 305.629 usec) 100000 operations 32 bits set of 32 bits Average for_each_set_bit took: 7557.067 usec (+- 1407.702 usec) Average test_bit loop took: 9072.400 usec (+- 513.209 usec) 100000 operations 1 bits set of 64 bits Average for_each_set_bit took: 896.800 usec (+- 14.389 usec) Average test_bit loop took: 11927.200 usec (+- 68.862 usec) 100000 operations 2 bits set of 64 bits Average for_each_set_bit took: 1230.400 usec (+- 111.731 usec) Average test_bit loop took: 12478.600 usec (+- 189.382 usec) 100000 operations 4 bits set of 64 bits Average for_each_set_bit took: 1844.733 usec (+- 244.826 usec) Average test_bit loop took: 12911.467 usec (+- 206.246 usec) 100000 operations 8 bits set of 64 bits Average for_each_set_bit took: 2779.300 usec (+- 413.612 usec) Average test_bit loop took: 13372.650 usec (+- 239.623 usec) 100000 operations 16 bits set of 64 bits Average for_each_set_bit took: 4423.920 usec (+- 748.240 usec) Average test_bit loop took: 13995.800 usec (+- 318.427 usec) 100000 operations 32 bits set of 64 bits Average for_each_set_bit took: 7580.600 usec (+- 1462.407 usec) Average test_bit loop took: 15063.067 usec (+- 516.477 usec) 100000 operations 64 bits set of 64 bits Average for_each_set_bit took: 13391.514 usec (+- 2765.371 usec) Average test_bit loop took: 16974.914 usec (+- 916.936 usec) 100000 operations 1 bits set of 128 bits Average for_each_set_bit took: 1153.800 usec (+- 124.245 usec) Average test_bit loop took: 26959.000 usec (+- 714.047 usec) 100000 operations 2 bits set of 128 bits Average for_each_set_bit took: 1445.200 usec (+- 113.587 usec) Average test_bit loop took: 25798.800 usec (+- 512.908 usec) 100000 operations 4 bits set of 128 bits Average for_each_set_bit took: 1990.933 usec (+- 219.362 usec) Average test_bit loop took: 25589.400 usec (+- 348.288 usec) 100000 operations 8 bits set of 128 bits Average for_each_set_bit took: 2963.000 usec (+- 419.487 usec) Average test_bit loop took: 25690.050 usec (+- 262.025 usec) 100000 operations 16 bits set of 128 bits Average for_each_set_bit took: 4585.200 usec (+- 741.734 usec) Average test_bit loop took: 26125.040 usec (+- 274.127 usec) 100000 operations 32 bits set of 128 bits Average for_each_set_bit took: 7626.200 usec (+- 1404.950 usec) Average test_bit loop took: 27038.867 usec (+- 442.554 usec) 100000 operations 64 bits set of 128 bits Average for_each_set_bit took: 13343.371 usec (+- 2686.460 usec) Average test_bit loop took: 28936.543 usec (+- 883.257 usec) 100000 operations 128 bits set of 128 bits Average for_each_set_bit took: 23442.950 usec (+- 4880.541 usec) Average test_bit loop took: 32484.125 usec (+- 1691.931 usec) 100000 operations 1 bits set of 256 bits Average for_each_set_bit took: 1183.000 usec (+- 32.073 usec) Average test_bit loop took: 50114.600 usec (+- 198.880 usec) 100000 operations 2 bits set of 256 bits Average for_each_set_bit took: 1550.000 usec (+- 124.550 usec) Average test_bit loop took: 50334.200 usec (+- 128.425 usec) 100000 operations 4 bits set of 256 bits Average for_each_set_bit took: 2164.333 usec (+- 246.359 usec) Average test_bit loop took: 49959.867 usec (+- 188.035 usec) 100000 operations 8 bits set of 256 bits Average for_each_set_bit took: 3211.200 usec (+- 454.829 usec) Average test_bit loop took: 50140.850 usec (+- 176.046 usec) 100000 operations 16 bits set of 256 bits Average for_each_set_bit took: 5181.640 usec (+- 882.726 usec) Average test_bit loop took: 51003.160 usec (+- 419.601 usec) 100000 operations 32 bits set of 256 bits Average for_each_set_bit took: 8369.333 usec (+- 1513.150 usec) Average test_bit loop took: 52096.700 usec (+- 573.022 usec) 100000 operations 64 bits set of 256 bits Average for_each_set_bit took: 13866.857 usec (+- 2649.393 usec) Average test_bit loop took: 53989.600 usec (+- 938.808 usec) 100000 operations 128 bits set of 256 bits Average for_each_set_bit took: 23588.350 usec (+- 4724.222 usec) Average test_bit loop took: 57300.625 usec (+- 1625.962 usec) 100000 operations 256 bits set of 256 bits Average for_each_set_bit took: 42752.200 usec (+- 9202.084 usec) Average test_bit loop took: 64426.933 usec (+- 3402.326 usec) 100000 operations 1 bits set of 512 bits Average for_each_set_bit took: 1632.000 usec (+- 229.954 usec) Average test_bit loop took: 98090.000 usec (+- 1120.435 usec) 100000 operations 2 bits set of 512 bits Average for_each_set_bit took: 1937.700 usec (+- 148.902 usec) Average test_bit loop took: 100364.100 usec (+- 1433.219 usec) 100000 operations 4 bits set of 512 bits Average for_each_set_bit took: 2528.000 usec (+- 243.654 usec) Average test_bit loop took: 99932.067 usec (+- 955.868 usec) 100000 operations 8 bits set of 512 bits Average for_each_set_bit took: 3734.100 usec (+- 512.359 usec) Average test_bit loop took: 98944.750 usec (+- 812.070 usec) 100000 operations 16 bits set of 512 bits Average for_each_set_bit took: 5551.400 usec (+- 846.605 usec) Average test_bit loop took: 98691.600 usec (+- 654.753 usec) 100000 operations 32 bits set of 512 bits Average for_each_set_bit took: 8594.500 usec (+- 1446.072 usec) Average test_bit loop took: 99176.867 usec (+- 579.990 usec) 100000 operations 64 bits set of 512 bits Average for_each_set_bit took: 13840.743 usec (+- 2527.055 usec) Average test_bit loop took: 100758.743 usec (+- 833.865 usec) 100000 operations 128 bits set of 512 bits Average for_each_set_bit took: 23185.925 usec (+- 4532.910 usec) Average test_bit loop took: 103786.700 usec (+- 1475.276 usec) 100000 operations 256 bits set of 512 bits Average for_each_set_bit took: 40322.400 usec (+- 8341.802 usec) Average test_bit loop took: 109433.378 usec (+- 2742.615 usec) 100000 operations 512 bits set of 512 bits Average for_each_set_bit took: 71804.540 usec (+- 15436.546 usec) Average test_bit loop took: 120255.440 usec (+- 5252.777 usec) 100000 operations 1 bits set of 1024 bits Average for_each_set_bit took: 1859.600 usec (+- 27.969 usec) Average test_bit loop took: 187676.000 usec (+- 1337.770 usec) 100000 operations 2 bits set of 1024 bits Average for_each_set_bit took: 2273.600 usec (+- 139.420 usec) Average test_bit loop took: 188176.000 usec (+- 684.357 usec) 100000 operations 4 bits set of 1024 bits Average for_each_set_bit took: 2940.400 usec (+- 268.213 usec) Average test_bit loop took: 189172.600 usec (+- 593.295 usec) 100000 operations 8 bits set of 1024 bits Average for_each_set_bit took: 4224.200 usec (+- 547.933 usec) Average test_bit loop took: 190257.250 usec (+- 621.021 usec) 100000 operations 16 bits set of 1024 bits Average for_each_set_bit took: 6090.560 usec (+- 877.975 usec) Average test_bit loop took: 190143.880 usec (+- 503.753 usec) 100000 operations 32 bits set of 1024 bits Average for_each_set_bit took: 9178.800 usec (+- 1475.136 usec) Average test_bit loop took: 190757.100 usec (+- 494.757 usec) 100000 operations 64 bits set of 1024 bits Average for_each_set_bit took: 14441.457 usec (+- 2545.497 usec) Average test_bit loop took: 192299.486 usec (+- 795.251 usec) 100000 operations 128 bits set of 1024 bits Average for_each_set_bit took: 23623.825 usec (+- 4481.182 usec) Average test_bit loop took: 194885.550 usec (+- 1300.817 usec) 100000 operations 256 bits set of 1024 bits Average for_each_set_bit took: 40194.956 usec (+- 8109.056 usec) Average test_bit loop took: 200259.311 usec (+- 2566.085 usec) 100000 operations 512 bits set of 1024 bits Average for_each_set_bit took: 70983.560 usec (+- 15074.982 usec) Average test_bit loop took: 210527.460 usec (+- 4968.980 usec) 100000 operations 1024 bits set of 1024 bits Average for_each_set_bit took: 136530.345 usec (+- 31584.400 usec) Average test_bit loop took: 233329.691 usec (+- 10814.036 usec) 100000 operations 1 bits set of 2048 bits Average for_each_set_bit took: 3077.600 usec (+- 76.376 usec) Average test_bit loop took: 402154.400 usec (+- 518.571 usec) 100000 operations 2 bits set of 2048 bits Average for_each_set_bit took: 3508.600 usec (+- 148.350 usec) Average test_bit loop took: 403814.500 usec (+- 1133.027 usec) 100000 operations 4 bits set of 2048 bits Average for_each_set_bit took: 4219.333 usec (+- 285.844 usec) Average test_bit loop took: 404312.533 usec (+- 985.751 usec) 100000 operations 8 bits set of 2048 bits Average for_each_set_bit took: 5670.550 usec (+- 615.238 usec) Average test_bit loop took: 405321.800 usec (+- 1038.487 usec) 100000 operations 16 bits set of 2048 bits Average for_each_set_bit took: 7785.080 usec (+- 992.522 usec) Average test_bit loop took: 406746.160 usec (+- 1015.478 usec) 100000 operations 32 bits set of 2048 bits Average for_each_set_bit took: 11163.800 usec (+- 1627.320 usec) Average test_bit loop took: 406124.267 usec (+- 898.785 usec) 100000 operations 64 bits set of 2048 bits Average for_each_set_bit took: 16964.629 usec (+- 2806.130 usec) Average test_bit loop took: 406618.514 usec (+- 798.356 usec) 100000 operations 128 bits set of 2048 bits Average for_each_set_bit took: 27219.625 usec (+- 4988.458 usec) Average test_bit loop took: 410149.325 usec (+- 1705.641 usec) 100000 operations 256 bits set of 2048 bits Average for_each_set_bit took: 45138.578 usec (+- 8831.021 usec) Average test_bit loop took: 415462.467 usec (+- 2725.418 usec) 100000 operations 512 bits set of 2048 bits Average for_each_set_bit took: 77450.540 usec (+- 15962.238 usec) Average test_bit loop took: 426089.180 usec (+- 5171.788 usec) 100000 operations 1024 bits set of 2048 bits Average for_each_set_bit took: 138023.636 usec (+- 29826.959 usec) Average test_bit loop took: 446346.636 usec (+- 9904.417 usec) 100000 operations 2048 bits set of 2048 bits Average for_each_set_bit took: 251072.600 usec (+- 55947.692 usec) Average test_bit loop took: 484855.983 usec (+- 18970.431 usec) # Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Link: http://lore.kernel.org/lkml/20200729220034.1337168-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e3232c2f39acafd5a29128425bc30b9884642cfa Author: Thomas Hebb Date: Sun Jul 26 21:08:14 2020 -0700 tools build feature: Use CC and CXX from parent commit c8c188679ccf ("tools build: Use the same CC for feature detection and actual build") changed these assignments from unconditional (:=) to conditional (?=) so that they wouldn't clobber values from the environment. However, conditional assignment does not work properly for variables that Make implicitly sets, among which are CC and CXX. To quote tools/scripts/Makefile.include, which handles this properly: # Makefiles suck: This macro sets a default value of $(2) for the # variable named by $(1), unless the variable has been set by # environment or command line. This is necessary for CC and AR # because make sets default values, so the simpler ?= approach # won't work as expected. In other words, the conditional assignments will not run even if the variables are not overridden in the environment; Make will set CC to "cc" and CXX to "g++" when it starts[1], meaning the variables are not empty by the time the conditional assignments are evaluated. This breaks cross-compilation when CROSS_COMPILE is set but CC isn't, since "cc" gets used for feature detection instead of the cross compiler (and likewise for CXX). To fix the issue, just pass down the values of CC and CXX computed by the parent Makefile, which gets included by the Makefile that actually builds whatever we're detecting features for and so is guaranteed to have good values. This is a better solution anyway, since it means we aren't trying to replicate the logic of the parent build system and so don't risk it getting out of sync. Leave PKG_CONFIG alone, since 1) there's no common logic to compute it in Makefile.include, and 2) it's not an implicit variable, so conditional assignment works properly. [1] https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html Fixes: c8c188679ccf ("tools build: Use the same CC for feature detection and actual build") Signed-off-by: Thomas Hebb Acked-by: Jiri Olsa Cc: David Carrillo-Cisneros Cc: Ian Rogers Cc: Igor Lubashev Cc: Namhyung Kim Cc: Quentin Monnet Cc: Song Liu Cc: Stephane Eranian Cc: thomas hebb Link: http://lore.kernel.org/lkml/0a6e69d1736b0fa231a648f50b0cce5d8a6734ef.1595822871.git.tommyhebb@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 0a398945d6f3e54f9f88ba2a17908674c659bfa4 Author: Neal Liu Date: Fri Jul 31 11:39:04 2020 +0800 cpuidle: ACPI: fix 'return' with no value build warning Add return value to fix return-type build warning introduced by commit efe9711214e6 ("cpuidle: change enter_s2idle() prototype"). Fixes: efe9711214e6 ("cpuidle: change enter_s2idle() prototype") Signed-off-by: Neal Liu [ rjw: Subject & changelog edits, make acpi_idle_enter_s2idle() return 0 in all cases ] Signed-off-by: Rafael J. Wysocki commit fc8cacf3fc68664e30a6df2b361ae05b9769585e Author: Brian Norris Date: Fri Jul 24 12:08:41 2020 -0700 platform/chrome: cros_ec_proto: check for missing EC_CMD_HOST_EVENT_GET_WAKE_MASK As with cros_ec_cmd_xfer_status(), etc., it's not enough to simply check for the return status of send_command() -- that only covers transport or other similarly-fatal errors. One must also check the ->result field, to see whether the command really succeeded. If not, we can't use the data it returns. The caller of cros_ec_get_host_event_wake_mask() ignores this, and so for example, on EC's where the command is not implemented, we're using junk (or in practice, all zeros) for our wake-mask. We should be using a non-zero default (currently, it's supposed to be all-1's). Fix this by checking the ->result field and returning -EPROTO for errors. I might label this as fixing commit 29d99b966d60 ("cros_ec: Don't signal wake event for non-wake host events"), except that this fix alone actually may make things worse, as it now allows for a lot more spurious wakeups. The patch "platform/chrome: cros_ec_proto: ignore battery/AC wakeups on old ECs" helps to mitigate this. Signed-off-by: Brian Norris Signed-off-by: Enric Balletbo i Serra commit c214e564acb2ad9463293ab9c109bfdae91fbeaf Author: Brian Norris Date: Fri Jul 24 12:08:40 2020 -0700 platform/chrome: cros_ec_proto: ignore unnecessary wakeups on old ECs ECs that don't implement EC_CMD_HOST_EVENT_GET_WAKE_MASK should still have some reasonable default mask -- otherwise, they'll treat a variety of EC signals as spurious wakeups. Battery and AC events can be especially common, for devices that have been sitting at full charge plugged into AC for a long time, as they may cycle their charging off and on, or their battery may start reporting failures as it ages. Treating these as wakeups does not serve a useful purpose, and is instead often counterproductive. And indeed, later ECs (that implement the mask) don't include these events in their wake-mask. Note that this patch doesn't do anything without the subsequent patch ("platform/chrome: cros_ec_proto: check for missing EC_CMD_HOST_EVENT_GET_WAKE_MASK"), because cros_ec_get_host_event_wake_mask() currently does not return an error if EC_CMD_HOST_EVENT_GET_WAKE_MASK is not implemented. Some additional notes: While the EC typically knows not to wake the CPU for these unimportant events once the CPU reaches a sleep state, it doesn't really have a way to know that the CPU is "almost" asleep, unless it has support for EC_CMD_HOST_SLEEP_EVENT. Alas, these older ECs do not support that command either, so this solution is not 100% complete. Signed-off-by: Brian Norris Signed-off-by: Enric Balletbo i Serra commit 28cff52eaeb5c43144d0c730080aff0d6bc1e5d5 Merge: 92c209ac6d3d3 d8b9faec54ae4 Author: Ingo Molnar Date: Fri Jul 31 11:58:05 2020 +0200 Merge branch 'linus' into locking/core, to resolve conflict Conflicts: arch/arm/include/asm/percpu.h As Stephen Rothwell noted, there's a conflict between this commit in locking/core: a21ee6055c30 ("lockdep: Change hardirq{s_enabled,_context} to per-cpu variables") and this fresh upstream commit: aa54ea903abb ("ARM: percpu.h: fix build error") a21ee6055c30 is a simpler solution to the dependency problem and doesn't further increase header hell - so this conflict resolution effectively reverts aa54ea903abb and uses the a21ee6055c30 solution. Signed-off-by: Ingo Molnar commit adb334d17858d8b679a41f7f2cd230e5c6accc0a Merge: f3020b8891b89 f87032aec41e0 Author: Ingo Molnar Date: Fri Jul 31 12:12:21 2020 +0200 Merge branch 'WIP.x86/entry' into x86/entry, to merge the latest generic code and resolve conflicts Pick up and resolve the NMI entry code changes from the locking tree, and also pick up the latest two fixes from tip:core/entry. Signed-off-by: Ingo Molnar commit 92c209ac6d3d35783c16c8a717547183e6e11162 Author: Marco Elver Date: Wed Jul 29 13:09:16 2020 +0200 kcsan: Improve IRQ state trace reporting To improve the general usefulness of the IRQ state trace events with KCSAN enabled, save and restore the trace information when entering and exiting the KCSAN runtime as well as when generating a KCSAN report. Without this, reporting the IRQ trace events (whether via a KCSAN report or outside of KCSAN via a lockdep report) is rather useless due to continuously being touched by KCSAN. This is because if KCSAN is enabled, every instrumented memory access causes changes to IRQ trace events (either by KCSAN disabling/enabling interrupts or taking report_lock when generating a report). Before "lockdep: Prepare for NMI IRQ state tracking", KCSAN avoided touching the IRQ trace events via raw_local_irq_save/restore() and lockdep_off/on(). Fixes: 248591f5d257 ("kcsan: Make KCSAN compatible with new IRQ state tracking") Signed-off-by: Marco Elver Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200729110916.3920464-2-elver@google.com Signed-off-by: Ingo Molnar commit 0584df9c12f449124d0bfef9899e5365604ee7a9 Author: Marco Elver Date: Wed Jul 29 13:09:15 2020 +0200 lockdep: Refactor IRQ trace events fields into struct Refactor the IRQ trace events fields, used for printing information about the IRQ trace events, into a separate struct 'irqtrace_events'. This improves readability by separating the information only used in reporting, as well as enables (simplified) storing/restoring of irqtrace_events snapshots. No functional change intended. Signed-off-by: Marco Elver Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200729110916.3920464-1-elver@google.com Signed-off-by: Ingo Molnar commit 7f4784f1881cbf7d3e6367e1c4341c1ab2ccdb5b Author: Gwendal Grignou Date: Tue Jul 28 02:13:55 2020 -0700 platform/chrome: cros_ec_sensorhub: Simplify legacy timestamp spreading On some machines (nami), interrupt latency cause samples to appear to be from the future and are pegged to the current time. We would see samples with this pattern: [t, t + ~5ms, t + ~10ms, t + ~10ms + 100us, t + ~10ms + 200us], (current now) (current now) (t is the last timestamp time) Last 2 samples would be barely spread, causing applications to complain. We now spread the entire sequence. This is not great: in the example the sensor was supposed to send samples every 5ms, it now appears to send one every 2.5ms, but it is slightly closer to reality: sampling time in the example above At sensor level 1 2 3 4 5 +-----5ms-----+-----5ms-----+-----5ms-----+----5ms-----+---> t Before, at host level 1 2 3 4 5 --interrupt delay------+-----5ms-----+-----5ms-----+-+-+---> t Afer, at host level 1 2 3 4 5 --interrupt delay------+-2.5ms-+-2.5ms-+-2.5ms-+-2.5ms-+---> t Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra commit 1ac1efa5f6950f8f126f2c1921bb699ce009ec7d Author: Nick Terrell Date: Thu Jul 30 12:08:41 2020 -0700 Documentation: dontdiff: Add zstd compressed files For now, that's arch/x86/boot/compressed/vmlinux.bin.zst but probably more will come, thus let's be consistent with all other compressors. Signed-off-by: Nick Terrell Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200730190841.2071656-9-nickrterrell@gmail.com commit 6f3decabaff032e5fcc6cf56f0851ee259359232 Author: Adam Borowski Date: Thu Jul 30 12:08:40 2020 -0700 .gitignore: Add ZSTD-compressed files For now, that's arch/x86/boot/compressed/vmlinux.bin.zst but probably more will come, thus let's be consistent with all other compressors. Signed-off-by: Adam Borowski Signed-off-by: Nick Terrell Signed-off-by: Ingo Molnar Tested-by: Sedat Dilek Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200730190841.2071656-8-nickrterrell@gmail.com commit fb46d057db824693994b048d3a8c869892afaa3f Author: Nick Terrell Date: Thu Jul 30 12:08:39 2020 -0700 x86: Add support for ZSTD compressed kernel - Add support for zstd compressed kernel - Define __DISABLE_EXPORTS in Makefile - Remove __DISABLE_EXPORTS definition from kaslr.c - Bump the heap size for zstd. - Update the documentation. Integrates the ZSTD decompression code to the x86 pre-boot code. Zstandard requires slightly more memory during the kernel decompression on x86 (192 KB vs 64 KB), and the memory usage is independent of the window size. __DISABLE_EXPORTS is now defined in the Makefile, which covers both the existing use in kaslr.c, and the use needed by the zstd decompressor in misc.c. This patch has been boot tested with both a zstd and gzip compressed kernel on i386 and x86_64 using buildroot and QEMU. Additionally, this has been tested in production on x86_64 devices. We saw a 2 second boot time reduction by switching kernel compression from xz to zstd. Signed-off-by: Nick Terrell Signed-off-by: Ingo Molnar Tested-by: Sedat Dilek Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200730190841.2071656-7-nickrterrell@gmail.com commit 0fe4f4ef8cc8e15a8f29f08f4be6128395f125f6 Author: Nick Terrell Date: Thu Jul 30 12:08:38 2020 -0700 x86: Bump ZO_z_extra_bytes margin for zstd Bump the ZO_z_extra_bytes margin for zstd. Zstd needs 3 bytes per 128 KB, and has a 22 byte fixed overhead. Zstd needs to maintain 128 KB of space at all times, since that is the maximum block size. See the comments regarding in-place decompression added in lib/decompress_unzstd.c for details. The existing code is written so that all the compression algorithms use the same ZO_z_extra_bytes. It is taken to be the maximum of the growth rate plus the maximum fixed overhead. The comments just above this diff state that: Signed-off-by: Nick Terrell Signed-off-by: Ingo Molnar Tested-by: Sedat Dilek Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200730190841.2071656-6-nickrterrell@gmail.com commit a30d8a39f0571425a459816ed8680e987a2ff279 Author: Nick Terrell Date: Thu Jul 30 12:08:37 2020 -0700 usr: Add support for zstd compressed initramfs - Add support for a zstd compressed initramfs. - Add compression for compressing built-in initramfs with zstd. I have tested this patch by boot testing with buildroot and QEMU. Specifically, I booted the kernel with both a zstd and gzip compressed initramfs, both built into the kernel and separate. I ensured that the correct compression algorithm was used. I tested on arm, aarch64, i386, and x86_64. This patch has been tested in production on aarch64 and x86_64 devices. Additionally, I have performance measurements from internal use in production. On an aarch64 device we saw 19 second boot time improvement from switching from lzma to zstd (27 seconds to 8 seconds). On an x86_64 device we saw a 9 second boot time reduction from switching from xz to zstd. Signed-off-by: Nick Terrell Signed-off-by: Ingo Molnar Tested-by: Sedat Dilek Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200730190841.2071656-5-nickrterrell@gmail.com commit 48f7ddf785af24aa380f3282d8d4400883d0099e Author: Nick Terrell Date: Thu Jul 30 12:08:36 2020 -0700 init: Add support for zstd compressed kernel - Add the zstd and zstd22 cmds to scripts/Makefile.lib - Add the HAVE_KERNEL_ZSTD and KERNEL_ZSTD options Architecture specific support is still needed for decompression. Signed-off-by: Nick Terrell Signed-off-by: Ingo Molnar Tested-by: Sedat Dilek Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200730190841.2071656-4-nickrterrell@gmail.com commit 4963bb2b89884bbdb7e33e6a09c159551e9627aa Author: Nick Terrell Date: Thu Jul 30 12:08:35 2020 -0700 lib: Add zstd support to decompress - Add unzstd() and the zstd decompress interface. - Add zstd support to decompress_method(). The decompress_method() and unzstd() functions are used to decompress the initramfs and the initrd. The __decompress() function is used in the preboot environment to decompress a zstd compressed kernel. The zstd decompression function allows the input and output buffers to overlap because that is used by x86 kernel decompression. Signed-off-by: Nick Terrell Signed-off-by: Ingo Molnar Tested-by: Sedat Dilek Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200730190841.2071656-3-nickrterrell@gmail.com commit 6d25a633ea68a103c7293d16eb69a7d4689075ad Author: Nick Terrell Date: Thu Jul 30 12:08:34 2020 -0700 lib: Prepare zstd for preboot environment, improve performance These changes are necessary to get the build to work in the preboot environment, and to get reasonable performance: - Remove a double definition of the CHECK_F macro when the zstd library is amalgamated. - Switch ZSTD_copy8() to __builtin_memcpy(), because in the preboot environment on x86 gcc can't inline `memcpy()` otherwise. - Limit the gcc hack in ZSTD_wildcopy() to the broken gcc version. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81388. ZSTD_copy8() and ZSTD_wildcopy() are in the core of the zstd hot loop. So outlining these calls to memcpy(), and having an extra branch are very detrimental to performance. Signed-off-by: Nick Terrell Signed-off-by: Ingo Molnar Tested-by: Sedat Dilek Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200730190841.2071656-2-nickrterrell@gmail.com commit a9e10b169e65f0f7061233ebe843a4b4f488dbae Author: Steve Cohen Date: Wed Jul 29 01:35:52 2020 -0400 drm: re-add deleted doc for drm_gem_open_ioctl Add back the removed documentation for drm_gem_open_ioctl. This patch is submitted in response to [1]. [1] https://lore.kernel.org/linux-arm-msm/20200728085244.GY6419@phenom.ffwll.local/ Signed-off-by: Steve Cohen Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1596000952-27621-1-git-send-email-cohens@codeaurora.org commit 892900a70b6c6664fe9ce0d4e2a5b6b4c821c0e3 Author: Daniel Palmer Date: Thu Jul 30 00:07:48 2020 +0900 ARM: mstar: Correct the compatible string for pmsleep The compatible string for the pmsleep region has changed. Update the MStar/Sigmastar v7 base dtsi with the new string. Link: https://lore.kernel.org/r/20200729150748.1945589-4-daniel@0x0f.com Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 1eb47d0a80281decf9b5c8cd08a6da932746a908 Author: Daniel Palmer Date: Thu Jul 30 00:07:47 2020 +0900 dt-bindings: arm: mstar: remove the binding description for mstar,pmsleep Remove the unneeded binding description. Compatible string is in mfd/syscon.yaml now. Link: https://lore.kernel.org/r/20200729150748.1945589-3-daniel@0x0f.com Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 4b4b27e4330e8fd0e3b96a2fd801f3ac188f5e79 Author: Daniel Palmer Date: Thu Jul 30 00:07:46 2020 +0900 dt-bindings: mfd: syscon: add compatible string for mstar,msc313-pmsleep Add a compatible string for the pmsleep register region in the MStar MSC313 SoC. Link: https://lore.kernel.org/r/20200729150748.1945589-2-daniel@0x0f.com Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit f510ca05271b6f71bd532fe743b39f628110223f Merge: 6fc013ffb1b60 9d56a1c21f1ca Author: Arnd Bergmann Date: Fri Jul 31 10:41:55 2020 +0200 Merge tag 'qcom-arm64-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 DT additional updates for 5.9 For SC7180 this adds the necessary properties for blowing fuses in qfprom, Coresight fixes, GPU interconnect votes and specifies max speed for USB controller. SM8150 and SM8250 gains Adreno SMMU, the graphics management unit and the GPU nodes, to enable headless GPU usage. SDM845 gains tracing support for deep idle, GPU bus bandwidth scaling and DB845c gains the LT9611 HDMI bridge wired up. MSM8994 gains SMD RPM and SCM support and a new dts for the Sony Xperia Z5. MSM8992 is refactored and modernized and gets support for SCM, SPMI, BLSP2 UART and I2C nodes, PMU, RPM clock controller, PSCI and proper CPU definitions. Support for the Xiaomi Libra and Microsoft Lumia 950 are added. * tag 'qcom-arm64-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (31 commits) arm64: dts: qcom: Add Microsoft Lumia 950 (Talkman) device tree arm64: dts: qcom: Add Xiaomi Libra (Mi 4C) device tree arm64: dts: qcom: msm8992: Add RPMCC node arm64: dts: qcom: msm8992: Add PSCI support. arm64: dts: qcom: msm8992: Add PMU node arm64: dts: qcom: msm8992: Add BLSP2_UART2 and I2C nodes arm64: dts: qcom: msm8992: Add SPMI PMIC arbiter device arm64: dts: qcom: msm8992: Add a SCM node arm64: dts: qcom: msm8992: Add a proper CPU map arm64: dts: qcom: bullhead: Move UART pinctrl to SoC arm64: dts: qcom: bullhead: Add qcom,msm-id arm64: dts: qcom: msm8992: Fix SDHCI1 arm64: dts: qcom: msm8992: Modernize the DTS style arm64: dts: qcom: Add support for Sony Xperia Z5 (SoMC Sumire-RoW) arm64: dts: qcom: Move msm8994-smd-rpm contents to lg-bullhead. arm64: dts: qcom: msm8994: Add support for SMD RPM arm64: dts: qcom: msm8992: Add a label to rpm-requests arm64: dts: qcom: msm8994: Add SCM node arm64: dts: qcom: sdm845-db845c: Add hdmi bridge nodes arm64: dts: qcom: add sm8250 GPU nodes ... Link: https://lore.kernel.org/r/20200730052003.649940-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 6fc013ffb1b601802654c7724574fe51451b5b6a Merge: dae29d661d25a 67d141c1f8e60 Author: Arnd Bergmann Date: Fri Jul 31 10:40:44 2020 +0200 Merge tag 'amlogic-dt64-4' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt arm64: dts: Amlogic updates for v5.9 (round 4) - odroid-n2: add audio output * tag 'amlogic-dt64-4' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: odroid-n2: add jack audio output support arm64: dts: meson: odroid-n2: enable audio loopback Link: https://lore.kernel.org/r/7ho8nx2b0t.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit d76cfc7c3ad23a79eaf348a1b483e89f8ac3041a Merge: d7c6dbc02e999 0fec8617a1df7 Author: Arnd Bergmann Date: Fri Jul 31 10:38:36 2020 +0200 Merge tag 'qcom-drivers-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers Qualcomm driver additional updates for 5.9 This fixes a potential race condition with remoteprocs by not sending acknowledgements until after registered drivers has processed the event. It adds IPQ6018 support to the SMD RPM driver, fixes kerneldoc in the same and converts the related DT binding to YAML. Finally it fixes a compilation warning in the geni serial engine driver when compiled without CONFIG_SERIAL_EARLYCON. * tag 'qcom-drivers-for-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: geni: Fix unused label warning soc: qcom: smd-rpm: Fix kerneldoc soc: qcom: pdr: Reorder the PD state indication ack dt-bindings: soc: qcom: smd-rpm: Convert binding to YAML schema soc: qcom: smd-rpm: Add IPQ6018 compatible dt-bindings: soc: qcom: smd-rpm: Add IPQ6018 compatible Link: https://lore.kernel.org/r/20200730051852.649761-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit d7c6dbc02e9990b67258571d33d2defa9d9b755a Merge: 9c52a2647a39f f046e4a3f0b95 Author: Arnd Bergmann Date: Fri Jul 31 10:36:24 2020 +0200 Merge tag 'memory-controller-drv-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.9, part 2 1. Minor cleanups and fixes of multiple memory controller drivers, mostly around code quality and readability, 2. Add Git repository to drivers/memory entry in MAINTAINERS, 3. Allow MIPS jz4780 FUSE driver to probe by removing conflicting memory region with jz4780_nemc. * tag 'memory-controller-drv-5.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: jz4780_nemc: Only request IO memory the driver will use MAINTAINERS: Add Git repository for memory controller drivers memory: brcmstb_dpfe: Fix language typo memory: samsung: exynos5422-dmc: Correct white space issues memory: samsung: exynos-srom: Correct alignment memory: pl172: Enclose macro argument usage in parenthesis memory: of: Correct kerneldoc memory: omap-gpmc: Fix language typo memory: omap-gpmc: Correct white space issues memory: omap-gpmc: Use 'unsigned int' for consistency memory: omap-gpmc: Enclose macro argument usage in parenthesis memory: omap-gpmc: Correct kerneldoc memory: mvebu-devbus: Align with open parenthesis memory: mvebu-devbus: Add missing braces to all arms of if statement memory: bt1-l2-ctl: Add blank lines after declarations Link: https://lore.kernel.org/r/20200729163008.5820-1-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 3cbfe80737c18ac6e635421ab676716a393d3074 Author: Gustavo A. R. Silva Date: Fri Jul 24 11:50:27 2020 -0500 crypto: sa2ul - Fix inconsistent IS_ERR and PTR_ERR Fix inconsistent IS_ERR and PTR_ERR in sa_dma_init(). The proper pointer to be passed as argument to PTR_ERR() is dd->dma_tx. This bug was detected with the help of Coccinelle. Fixes: 7694b6ca649f ("crypto: sa2ul - Add crypto driver") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Herbert Xu commit 45645709704f94d2625ef15fbf7bcae51aeab975 Author: Colin Ian King Date: Fri Jul 24 11:10:01 2020 +0100 hwrng: core - remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit 054a5540fb8f7268e2c79e9deab4242db15c8cba Author: Herbert Xu Date: Thu Jul 23 17:50:48 2020 +1000 crypto: x86/curve25519 - Remove unused carry variables The carry variables are assigned but never used, which upsets the compiler. This patch removes them. Signed-off-by: Herbert Xu Reviewed-by: Karthikeyan Bhargavan Acked-by: Jason A. Donenfeld Signed-off-by: Herbert Xu commit 190873a0ea4500433ae818521cad20d37f9ee059 Author: 周琰杰 (Zhou Yanjie) Date: Thu Jul 23 14:24:46 2020 +0800 crypto: ingenic - Add hardware RNG for Ingenic JZ4780 and X1000 Add JZ4780 SoC and X1000 SoC random number generator driver, based on PrasannaKumar Muralidharan's JZ4780 RNG driver. Tested-by: 周正 (Zhou Zheng) Tested-by: Mathieu Malaterre Suggested-by: Jeffrey Walton Signed-off-by: PrasannaKumar Muralidharan Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Herbert Xu commit d86f4431bbfb8cd69b83e0c42456143290cebb12 Author: 周琰杰 (Zhou Yanjie) Date: Thu Jul 23 14:24:45 2020 +0800 dt-bindings: RNG: Add Ingenic RNG bindings. Add the RNG bindings for the JZ4780 SoC and the X1000 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit e4d6efef01fc4d774ccba20c09544ce08649c88b Author: Horia Geantă Date: Wed Jul 22 15:14:58 2020 +0300 crypto: caam/qi2 - add module alias Add a module alias, to enable udev-based module autoloading: $ modinfo -F alias drivers/crypto/caam/dpaa2_caam.ko fsl-mc:v00001957ddpseci Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit ee0a6de9aa3755617e12dc5629617d27250b5846 Author: Horia Geantă Date: Wed Jul 22 15:14:57 2020 +0300 crypto: caam - add more RNG hw error codes In some cases, e.g. when TRNG is not properly configured, the RNG module could issue a "Hardware error" at runtime. "Continuos check" error is emitted when some of the BISTs fail. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 26c4a51fdec857bc418bc6040e7b29662ce36f00 Author: Dan Douglass Date: Wed Jul 22 15:14:56 2020 +0300 crypto: caam/jr - remove incorrect reference to caam_jr_register() caam_jr_register() function is no longer part of the driver since commit 6dad41158db6 ("crypto: caam - Remove unused functions from Job Ring") This patch removes a comment referencing the function. Signed-off-by: Dan Douglass Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit da6a66853a381864f4b040832cf11f0dbba0a097 Author: Horia Geantă Date: Wed Jul 22 15:14:55 2020 +0300 crypto: caam - silence .setkey in case of bad key length In case of bad key length, driver emits "key size mismatch" messages, but only for xts(aes) algorithms. Reduce verbosity by making them visible only when debugging. This way crypto fuzz testing log cleans up a bit. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit b7ec41da3b8314d262aef7be09b5684c5f9dd43a Author: Horia Geantă Date: Wed Jul 22 15:14:54 2020 +0300 crypto: caam/qi2 - create ahash shared descriptors only once For keyed hash algorithms, shared descriptors are currently generated twice: -at tfm initialization time, in cra_init() callback -in setkey() callback Since it's mandatory to call setkey() for keyed algorithms, drop the generation in cra_init(). This is similar to the change in caamhash (caam/jr top-level library) commit 9a2537d0ebc9 ("crypto: caam - create ahash shared descriptors only once") Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit d9f2d010302e858cada492c99da301858916ff28 Author: Horia Geantă Date: Wed Jul 22 15:14:53 2020 +0300 crypto: caam/qi2 - fix error reporting for caam_hash_alloc Fix error reporting when preparation of an hmac algorithm for registration fails: print the hmac algorithm name, not the unkeyed hash algorithm name. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 81f2288805ca7f00f8f10e249488f0c6c2abf2aa Author: Franck LENORMAND Date: Wed Jul 22 15:14:52 2020 +0300 crypto: caam - remove deadcode on 32-bit platforms When building on a platform with a 32bit DMA address, taking the upper 32 bits makes no sense. Signed-off-by: Franck LENORMAND Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit f892a21f51162d2c443c972d450f73ffa7fb49bb Author: Vaibhav Gupta Date: Wed Jul 22 15:00:58 2020 +0530 crypto: ccp - use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions as through the generic framework, PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Acked-by: John Allen Signed-off-by: Herbert Xu commit a04e84c57e9c5a98ba541f37961174ffe3abeb57 Merge: 552c0e308b7cf 3ad7b4e8f89d6 Author: Arnd Bergmann Date: Fri Jul 31 10:11:58 2020 +0200 Merge tag 'socfpga_update_for_v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/soc SoCFPGA update for v5.9, part 2 - Add missing put_device() call in socfpga base power management support * tag 'socfpga_update_for_v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh() ARM: dts: socfpga: add the temperature sensor to the Arria10 devkit arm: dts: socfpga: add reset-names to spi node arm64: dts: agilex: add nand clocks arm64: dts: agilex: populate clock dts entries for Intel SoCFPGA Agilex Link: https://lore.kernel.org/r/20200729165037.3099-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 958ea4e0d64e39d039245e6450f625108833e522 Author: Ard Biesheuvel Date: Tue Jul 21 09:05:54 2020 +0300 crypto: xts - Replace memcpy() invocation with simple assignment Colin reports that the memcpy() call in xts_cts_final() trigggers a "Overlapping buffer in memory copy" warning in Coverity, which is a false postive, given that tail is guaranteed to be smaller than or equal to the distance between source and destination. However, given that any additional bytes that we copy will be ignored anyway, we can simply copy XTS_BLOCK_SIZE unconditionally, which means we can use struct assignment of the array members instead, which is likely to be more efficient as well. Addresses-Coverity: ("Overlapping buffer in memory copy") Fixes: 8083b1bf8163 ("crypto: xts - add support for ciphertext stealing") Reported-by: Colin Ian King Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 28ee8b0912ca2ff68c2c03ff97bf1c22634c7942 Author: Sven Auhagen Date: Tue Jul 21 06:40:27 2020 +0200 crypto: marvell/cesa - irq balance Balance the irqs of the marvell cesa driver over all available cpus. Currently all interrupts are handled by the first CPU. From my testing with IPSec AES 256 SHA256 on my clearfog base with 2 Cores I get a 2x speed increase: Before the patch: 26.74 Kpps With the patch: 56.11 Kpps Signed-off-by: Sven Auhagen Signed-off-by: Herbert Xu commit c6720415907f21b9c53efbe679b96c3cc9d06404 Author: Sven Auhagen Date: Tue Jul 21 06:37:59 2020 +0200 crypto: inside-secure - irq balance Balance the irqs of the inside secure driver over all available cpus. Currently all interrupts are handled by the first CPU. From my testing with IPSec AES-GCM 256 on my MCbin with 4 Cores I get a 50% speed increase: Before the patch: 99.73 Kpps With the patch: 151.25 Kpps Signed-off-by: Sven Auhagen Signed-off-by: Herbert Xu commit 6914dd53eb7af7cbc66edf7992d600b1e952c40d Author: Stephan Müller Date: Mon Jul 20 19:09:23 2020 +0200 crypto: ecc - SP800-56A rev 3 local public key validation After the generation of a local public key, SP800-56A rev 3 section 5.6.2.1.3 mandates a validation of that key with a full validation compliant to section 5.6.2.3.3. Only if the full validation passes, the key is allowed to be used. The patch adds the full key validation compliant to 5.6.2.3.3 and performs the required check on the generated public key. Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu commit 2ed5ba61cc78f102656eedc0b4c80fd14a5e8c7c Author: Stephan Müller Date: Mon Jul 20 19:08:52 2020 +0200 crypto: dh - SP800-56A rev 3 local public key validation After the generation of a local public key, SP800-56A rev 3 section 5.6.2.1.3 mandates a validation of that key with a full validation compliant to section 5.6.2.3.1. Only if the full validation passes, the key is allowed to be used. Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu commit 90fa9ae51c1f2fa932bfa0a4d19163d49f0c1c46 Author: Stephan Müller Date: Mon Jul 20 19:08:32 2020 +0200 crypto: dh - check validity of Z before export SP800-56A rev3 section 5.7.1.1 step 2 mandates that the validity of the calculated shared secret is verified before the data is returned to the caller. This patch adds the validation check. Signed-off-by: Stephan Mueller Acked-by: Neil Horman Signed-off-by: Herbert Xu commit 4278e9d99e38938a7611b927fa4d73e6c86cb4fc Author: Marcelo Henrique Cerri Date: Mon Jul 20 19:08:09 2020 +0200 lib/mpi: Add mpi_sub_ui() Add mpi_sub_ui() based on Gnu MP mpz_sub_ui() function from file mpz/aors_ui.h[1] from change id 510b83519d1c adapting the code to the kernel's data structures, helper functions and coding style and also removing the defines used to produce mpz_sub_ui() and mpz_add_ui() from the same code. [1] https://gmplib.org/repo/gmp-6.2/file/510b83519d1c/mpz/aors.h Signed-off-by: Marcelo Henrique Cerri Signed-off-by: Stephan Mueller Signed-off-by: Herbert Xu commit e7d2b41e5c773c1e00f0f30519b9790ba7e4a58c Author: Stephan Müller Date: Mon Jul 20 19:07:48 2020 +0200 crypto: ecdh - check validity of Z before export SP800-56A rev3 section 5.7.1.2 step 2 mandates that the validity of the calculated shared secret is verified before the data is returned to the caller. Thus, the export function and the validity check functions are reversed. In addition, the sensitive variables of priv and rand_z are zeroized. Signed-off-by: Stephan Mueller Reviewed-by: Vitaly Chikunov Acked-by: Neil Horman Signed-off-by: Herbert Xu commit 89945047b1666c021c4222ef285239c1275f8e24 Author: Henry Yen Date: Thu Apr 30 17:14:34 2020 +0800 thermal: mediatek: Add tsensor support for V2 thermal system This patch adds full support for ver 2 thermal system (e.g., MT7622 SoC). The new changes include reading calibration data, converting temperature and hardware initialization which are specific for version 2 system. Each platform decides which function to call according to its version. Fixes: 3966be3c08c3 ("thermal: mediatek: add support for MT7622 SoC") Signed-off-by: Henry Yen Reviewed-by: Matthias Brugger Tested-By: Frank Wunderlich Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1588238074-19338-3-git-send-email-henry.yen@mediatek.com commit 54bf1e5a629dfbd0ee1b1e286d4e8119be23b902 Author: Henry Yen Date: Thu Apr 30 17:14:33 2020 +0800 thermal: mediatek: Prepare to add support for other platforms It is known that Mediatek owns two thermal systems, which only differ in the way of reading calibration data and converting temperature. MT8173, MT8183, MT2701 and MT2712 belongs to version 1 thermal system, and MT7622 belongs to version 2. In order to handle both systems, the suffix _V1 is appended to the current code, and then the second patch will add _V2 functions with the same purpose but different implementation. Signed-off-by: Henry Yen Reviewed-by: Matthias Brugger Tested-By: Frank Wunderlich Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1588238074-19338-2-git-send-email-henry.yen@mediatek.com commit 11c416e3f0ea437661514fa68967a5dba3cdf886 Author: Andy Shevchenko Date: Thu Jul 30 18:15:06 2020 +0300 staging: most: Use %pM format specifier for MAC addresses Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730151506.38827-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 536a4f75d48146ddf8beb97eaf454f616b6bf4b2 Author: Andy Shevchenko Date: Thu Jul 30 18:23:12 2020 +0300 staging: ks7010: Use %pM format specifier for MAC addresses Convert to %pM instead of using custom code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200730152312.39076-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c8ad010665c0b85c6a35466b2159e907b8dd85d1 Author: Johannes Berg Date: Thu Jul 30 15:52:13 2020 +0200 mac80211: warn only once in check_sdata_in_driver() at each caller Ben Greear has repeatedly reported in the past (for a few years probably) that this triggers repeatedly in certain scenarios. Make this a macro so that each callsite can trigger the warning only once - that will still give us an idea of what's going on and what paths can reach it, but avoids being too noisy. Link: https://lore.kernel.org/r/20200730155212.06fd3a95dbfb.I0b16829aabfaf5f642bce401502a29d16e2dd444@changeid Signed-off-by: Johannes Berg commit f96622749a67d40ad5efe8a58d5fc95313097aa0 Author: Chung-Hsien Hsu Date: Tue Jun 23 08:49:35 2020 -0500 nl80211: support 4-way handshake offloading for WPA/WPA2-PSK in AP mode Let drivers advertise support for AP-mode WPA/WPA2-PSK 4-way handshake offloading with a new NL80211_EXT_FEATURE_4WAY_HANDSHAKE_AP_PSK flag. Extend use of NL80211_ATTR_PMK attribute indicating it might be passed as part of NL80211_CMD_START_AP command, and contain the PSK (which is the PMK, hence the name). The driver is assumed to handle the 4-way handshake by itself in this case, instead of relying on userspace. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-Hsien Lin Link: https://lore.kernel.org/r/20200623134938.39997-2-chi-hsien.lin@cypress.com Signed-off-by: Johannes Berg commit 75e6b594bbaeeb3f8287a2e6eb8811384b8c7195 Author: Johannes Berg Date: Thu Jul 30 13:00:52 2020 +0200 cfg80211: invert HE BSS color 'disabled' to 'enabled' This is in fact 'disabled' in the spec, but there it's in a place where that actually makes sense. In our internal data structures, it doesn't really make sense, and in fact the previous commit just fixed a bug in that area. Make this safer by inverting the polarity from 'disabled' to 'enabled'. Link: https://lore.kernel.org/r/20200730130051.5d8399545bd9.Ie62fdcd1a6cd9c969315bc124084a494ca6c8df3@changeid Signed-off-by: Johannes Berg commit c5d1686b314ea44c5f210990dee05caf98cb068f Author: Felix Fietkau Date: Sun Jul 26 13:06:11 2020 +0200 mac80211: add a function for running rx without passing skbs to the stack This can be used to run mac80211 rx processing on a batch of frames in NAPI poll before passing them to the network stack in a large batch. This can improve icache footprint, or it can be used to pass frames via netif_receive_skb_list. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200726110611.46886-1-nbd@nbd.name Signed-off-by: Johannes Berg commit cb17ed29a7a5fea8c9bf70e8a05757d71650e025 Author: Mathy Vanhoef Date: Thu Jul 23 14:01:53 2020 +0400 mac80211: parse radiotap header when selecting Tx queue Already parse the radiotap header in ieee80211_monitor_select_queue. In a subsequent commit this will allow us to add a radiotap flag that influences the queue on which injected packets will be sent. This also fixes the incomplete validation of the injected frame in ieee80211_monitor_select_queue: currently an out of bounds memory access may occur in in the called function ieee80211_select_queue_80211 if the 802.11 header is too small. Note that in ieee80211_monitor_start_xmit the radiotap header is parsed again, which is necessairy because ieee80211_monitor_select_queue is not always called beforehand. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20200723100153.31631-6-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit 08aca29aa8b18dec2e84bc97d27dabe133b75822 Author: Mathy Vanhoef Date: Thu Jul 23 14:01:52 2020 +0400 mac80211: remove unused flags argument in transmit functions The flags argument in transmit functions is no longer being used and can be removed. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20200723100153.31631-5-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit 2b3dab1353209256cb3d7e07f14584eac8c82508 Author: Mathy Vanhoef Date: Thu Jul 23 14:01:51 2020 +0400 mac80211: use same flag everywhere to avoid sequence number overwrite Use the IEEE80211_TX_CTRL_NO_SEQNO flag in ieee80211_tx_info to mark probe requests whose sequence number must not be overwritten. This provides consistency with the radiotap flag that can be set to indicate that the sequence number of an injected frame should not be overwritten. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20200723100153.31631-4-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit 29c3e95f79adcef9d7999ec643639033585dba08 Author: Mathy Vanhoef Date: Thu Jul 23 14:01:50 2020 +0400 mac80211: do not overwrite the sequence number if requested Check if the Tx control flag is set to prevent sequence number overwrites, and if so, do not assign a new sequence number to the transmitted frame. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20200723100153.31631-3-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit e02281e7a5c524aaf6a52bb01afc4cc49addb908 Author: Mathy Vanhoef Date: Thu Jul 23 14:01:49 2020 +0400 mac80211: add radiotap flag to prevent sequence number overwrite The radiotap specification contains a flag to indicate that the sequence number of an injected frame should not be overwritten. Parse this flag and define and set a corresponding Tx control flag. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20200723100153.31631-2-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit 1df2bdba528b5a7a30f1b107b6924aa79af5e00e Author: Mathy Vanhoef Date: Thu Jul 23 14:01:48 2020 +0400 mac80211: never drop injected frames even if normally not allowed In ieee80211_tx_dequeue there is a check to see if the dequeued frame is allowed in the current state. Injected frames that are normally not allowed are being be dropped here. Fix this by checking if a frame was injected and if so always allowing it. Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20200723100153.31631-1-Mathy.Vanhoef@kuleuven.be Signed-off-by: Johannes Berg commit fd17dba1c860d39f655a3a08387c21e3ceca8c55 Author: Veerendranath Jakkam Date: Mon Jul 20 13:12:25 2020 +0530 cfg80211: Add support to advertize OCV support Add a new feature flag that drivers can use to advertize support for Operating Channel Validation (OCV) when using driver's SME for RSNA handshakes. Signed-off-by: Veerendranath Jakkam Link: https://lore.kernel.org/r/20200720074225.8990-1-vjakkam@codeaurora.org Signed-off-by: Johannes Berg commit 322cd27c06450b2db2cb6bdc68f3814149baf767 Author: P Praneesh Date: Thu Jul 9 08:16:21 2020 +0530 cfg80211/mac80211: avoid bss color setting in non-HE modes Adding bss-color configuration is only valid in HE mode. Earlier we have enabled it by default, irrespective of capabilities/mode. Fix that. Reported-by: kernel test robot Reported-by: Rajkumar Manoharan Signed-off-by: P Praneesh Link: https://lore.kernel.org/r/1594262781-21444-1-git-send-email-ppranees@codeaurora.org [fix up commit message] Signed-off-by: Johannes Berg commit 180ac48ee62f53c26787350a956c5ac371cbe0b7 Author: Felix Fietkau Date: Sun Jul 26 15:09:47 2020 +0200 mac80211: calculate skb hash early when using itxq This avoids flow separation issues when using software encryption. Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200726130947.88145-2-nbd@nbd.name Signed-off-by: Johannes Berg commit 48a54f6bc456859dabbd1fbd805e233d260754cf Author: Felix Fietkau Date: Sun Jul 26 15:09:46 2020 +0200 net/fq_impl: use skb_get_hash instead of skb_get_hash_perturb This avoids unnecessarily regenerating the skb flow hash Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200726130947.88145-1-nbd@nbd.name [small commit message fixup] Signed-off-by: Johannes Berg commit 3ff901cb5df1d2102e924d75d91347a2a3070fa5 Author: Felix Fietkau Date: Fri Jul 24 20:28:16 2020 +0200 mac80211: improve AQL tx airtime estimation AQL does not take into account that most HT/VHT/HE traffic is A-MPDU aggregated. Because of that, the per-packet airtime overhead is vastly overestimated. Improve it by assuming an average aggregation length of 16 for non-legacy traffic if not using the VO AC queue. This should improve performance with high data rates, especially with multiple stations Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20200724182816.18678-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 1303a51c24100b3b1915d6f9072fe5ae5bb4c5f6 Author: Markus Theil Date: Thu Jun 11 16:02:38 2020 +0200 cfg80211/mac80211: add connected to auth server to station info This patch adds the necessary bits to later query the auth server flag for every peer from iw. Signed-off-by: Markus Theil Link: https://lore.kernel.org/r/20200611140238.427461-2-markus.theil@tu-ilmenau.de Signed-off-by: Johannes Berg commit 184eebe664f0e11c485f6d309fe56297b3f75e9e Author: Markus Theil Date: Thu Jun 11 16:02:37 2020 +0200 cfg80211/mac80211: add connected to auth server to meshconf Besides information about num of peerings and gate connectivity, the mesh formation byte also contains a flag for authentication server connectivity, that currently cannot be set in the mesh conf. This patch adds this capability, which is necessary to implement 802.1X authentication in mesh mode. Signed-off-by: Markus Theil Link: https://lore.kernel.org/r/20200611140238.427461-1-markus.theil@tu-ilmenau.de Signed-off-by: Johannes Berg commit e3718a611470d311a92c60d4eb535270b49a7108 Author: Linus Lüssing Date: Wed Jun 17 09:30:33 2020 +0200 cfg80211/mac80211: add mesh_param "mesh_nolearn" to skip path discovery Currently, before being able to forward a packet between two 802.11s nodes, both a PLINK handshake is performed upon receiving a beacon and then later a PREQ/PREP exchange for path discovery is performed on demand upon receiving a data frame to forward. When running a mesh protocol on top of an 802.11s interface, like batman-adv, we do not need the multi-hop mesh routing capabilities of 802.11s and usually set mesh_fwding=0. However, even with mesh_fwding=0 the PREQ/PREP path discovery is still performed on demand. Even though in this scenario the next hop PREQ/PREP will determine is always the direct 11s neighbor node. The new mesh_nolearn parameter allows to skip the PREQ/PREP exchange in this scenario, leading to a reduced delay, reduced packet buffering and simplifies HWMP in general. mesh_nolearn is still rather conservative in that if the packet destination is not a direct 11s neighbor, it will fall back to PREQ/PREP path discovery. For normal, multi-hop 802.11s mesh routing it is usually not advisable to enable mesh_nolearn as a transmission to a direct but distant neighbor might be worse than reaching that same node via a more robust / higher throughput etc. multi-hop path. Cc: Sven Eckelmann Cc: Simon Wunderlich Signed-off-by: Linus Lüssing Link: https://lore.kernel.org/r/20200617073034.26149-1-linus.luessing@c0d3.blue [fix nl80211 policy to range 0/1 only] Signed-off-by: Johannes Berg commit 2f1805ea209a146669e0b660633ed22f49e1dd49 Author: Emmanuel Grumbach Date: Thu Jun 25 14:15:24 2020 +0300 cfg80211: allow the low level driver to flush the BSS table The low level driver adds its own opaque information in the BSS table in the cfg80211_bss structure. The low level driver may need to signal that this information is no longer relevant and needs to be recreated. Add an API to allow the low level driver to do that. iwlwifi needs this because it keeps there an information about the firmware's internal clock. This is kept in mac80211's struct ieee80211_bss::sync_device_ts. This information is populated while we scan, we add the internal firmware's clock to each beacon which allows us to program the firmware correctly after association so that it'll know when (in terms of its internal clock) the DTIM and TBTT will happen. When the firmware is reset this internal clock is reset as well and ieee80211_bss::sync_device_ts is no longer accurate. iwlwifi will call this new API any time the firmware is started. Signed-off-by: Emmanuel Grumbach Link: https://lore.kernel.org/r/20200625111524.3992-1-emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg commit fc0561dc6a9c61613ea703f54f9cf1c6bb2e0b68 Author: Gustavo A. R. Silva Date: Tue Jul 7 15:45:48 2020 -0500 mac80211: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200707204548.GA9320@embeddedor Signed-off-by: Johannes Berg commit 504776be46cb61bc0606e0e943fd6a04c38f2130 Author: Christophe JAILLET Date: Sun Jul 12 19:35:51 2020 +0200 nl80211: Simplify error handling path in 'nl80211_trigger_scan()' Re-write the end of 'nl80211_trigger_scan()' with a more standard, easy to understand and future proof version. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20200712173551.274448-1-christophe.jaillet@wanadoo.fr Signed-off-by: Johannes Berg commit 8328685682965cbf9348f6f85cadc8c0598771d9 Author: Christophe JAILLET Date: Sun Jul 12 19:35:39 2020 +0200 nl80211: Remove a misleading label in 'nl80211_trigger_scan()' Since commit 5fe231e87372 ("cfg80211: vastly simplify locking"), the 'unlock' label at the end of 'nl80211_trigger_scan()' is useless and misleading, because nothing is unlocked there. Direct return can be used instead of 'err = -; goto unlock;' construction. Remove this label and simplify code accordingly. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20200712173539.274395-1-christophe.jaillet@wanadoo.fr Signed-off-by: Johannes Berg commit dec4ca931244632eeca46f406b2ce7f5a1fe723f Author: Randy Dunlap Date: Wed Jul 15 09:43:25 2020 -0700 net/wireless: regulatory.h: drop duplicate word in comment Drop doubled word "of" in a comment. Signed-off-by: Randy Dunlap Cc: netdev@vger.kernel.org Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: Johannes Berg Link: https://lore.kernel.org/r/20200715164325.9109-5-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 66b239d28c7524324d2474b3faf206d00eadcd78 Author: Randy Dunlap Date: Wed Jul 15 09:43:24 2020 -0700 net/wireless: mac80211.h: drop duplicate words in comments Drop doubled words "are" and "by" in comments. Change doubled "to to" to "to the". Signed-off-by: Randy Dunlap Cc: netdev@vger.kernel.org Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: Johannes Berg Link: https://lore.kernel.org/r/20200715164325.9109-4-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 085a6c109b9dbcb6dfc0c7d1001f554a6d513342 Author: Randy Dunlap Date: Wed Jul 15 09:43:23 2020 -0700 net/wireless: cfg80211.h: drop duplicate words in comments Drop doubled word "by" in a comment. Change "operate in in" to "operate with in" as is used below. Signed-off-by: Randy Dunlap Cc: netdev@vger.kernel.org Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: Johannes Berg Link: https://lore.kernel.org/r/20200715164325.9109-3-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 0f55c0c500f2bbfc5cc5590cdf6973b3f64dc195 Author: Randy Dunlap Date: Wed Jul 15 09:43:22 2020 -0700 net/wireless: wireless.h: drop duplicate word in comments Drop doubled word "threshold" in a comment. Signed-off-by: Randy Dunlap Cc: netdev@vger.kernel.org Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: Johannes Berg Link: https://lore.kernel.org/r/20200715164325.9109-2-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 987021726f9f41a1daf335c57cd7b6261109cdb2 Author: Randy Dunlap Date: Wed Jul 15 09:43:21 2020 -0700 net/wireless: nl80211.h: drop duplicate words in comments Drop doubled words in several comments. Signed-off-by: Randy Dunlap Cc: netdev@vger.kernel.org Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Cc: Johannes Berg Link: https://lore.kernel.org/r/20200715164325.9109-1-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 9c167b2ddc1a89e6f6378e65bfd20e8c0ddf65f1 Author: Julian Squires Date: Mon Jul 20 12:20:35 2020 -0230 cfg80211: allow vendor dumpit to terminate by returning 0 nl80211 vendor netlink dumpit, like netlink_callback->dump, should signal successful completion by returning 0. Currently, that will just cause dumpit to be called again, possibly many times until an error occurs. Since skb->len is never going to be 0 by the time dumpit is called, the only way for dumpit to signal completion is by returning an error. If it returns a positive value, the current message is cancelled, but that positive value is returned and nl80211_vendor_cmd_dump gets called again. Fix that by passing a return value of 0 through. Signed-off-by: Julian Squires Link: https://lore.kernel.org/r/20200720145033.401307-1-julian@cipht.net [reword commit message] Signed-off-by: Johannes Berg commit f2a0c18759072dbd5135f72a8035f6fb838df425 Author: Colin Ian King Date: Wed Jul 22 16:38:30 2020 +0100 mac80211: remove the need for variable rates_idx Currently rates_idx is being initialized with the value -1 and this value is never read so the initialization is redundant and can be removed. The next time the variable is used it is assigned a value that is returned a few statements later. Just return i - 1 and remove the need for rates_idx. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200722153830.959010-1-colin.king@canonical.com Signed-off-by: Johannes Berg commit df78a0c0b67de58934877aad61e0431a2bd0caf1 Author: Thomas Pedersen Date: Mon Jun 1 23:22:47 2020 -0700 nl80211: S1G band and channel definitions Gives drivers the definitions needed to advertise support for S1G bands. Signed-off-by: Thomas Pedersen Link: https://lore.kernel.org/r/20200602062247.23212-1-thomas@adapt-ip.com Link: https://lore.kernel.org/r/20200731055636.795173-1-thomas@adapt-ip.com Signed-off-by: Johannes Berg commit a445fc457d2886a1264ec09c34f4000d1b30784d Author: Wanpeng Li Date: Fri Jul 31 11:12:20 2020 +0800 KVM: LAPIC: Set the TDCR settable bits It is a little different between Intel and AMD, Intel's bit 2 is 0 and AMD is reserved. On bare-metal, Intel will refuse to set APIC_TDCR once bits except 0, 1, 3 are setting, however, AMD will accept bits 0, 1, 3 and ignore other bits setting as patch does. Before the patch, we can get back anything what we set to the APIC_TDCR, this patch improves it. Signed-off-by: Wanpeng Li Message-Id: <1596165141-28874-2-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 9a9373ffc7338377c3837ce0ccd40f5c4402c9d1 Author: Alain Michaud Date: Fri Jul 31 01:05:34 2020 +0000 Bluetooth: use the proper scan params when conn is pending When an LE connection is requested and an RPA update is needed via hci_connect_le_scan, the default scanning parameters are used rather than the connect parameters. This leads to significant delays in the connection establishment process when using lower duty cycle scanning parameters. The patch simply looks at the pended connection list when trying to determine which scanning parameters should be used. Before: < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8                             #378 [hci0] 1659.247156         Own address type: Public (0x00)         Filter policy: Ignore not in white list (0x01)         PHYs: 0x01         Entry 0: LE 1M           Type: Passive (0x00)           Interval: 367.500 msec (0x024c)           Window: 37.500 msec (0x003c) After: < HCI Command: LE Set Extended Scan Parameters (0x08|0x0041) plen 8                               #39 [hci0] 7.422109         Own address type: Public (0x00)         Filter policy: Ignore not in white list (0x01)         PHYs: 0x01         Entry 0: LE 1M           Type: Passive (0x00)           Interval: 60.000 msec (0x0060)           Window: 60.000 msec (0x0060) Signed-off-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Yu Liu Signed-off-by: Marcel Holtmann commit 235e57935bf328c4cce371ffc4dd1d8fab4885cd Author: Christoph Hellwig Date: Tue Jul 21 16:05:31 2020 +0200 init: add an init_utimes helper Add a simple helper to set timestamps with a kernel space file name and switch the early init code over to it. Signed-off-by: Christoph Hellwig commit 716308a5331bf907b819f9db8dc942b19568f925 Author: Christoph Hellwig Date: Wed Jul 22 11:15:40 2020 +0200 init: add an init_stat helper Add a simple helper to stat with a kernel space file name and switch the early init code over to it. Signed-off-by: Christoph Hellwig commit 5fee64fcde0770c41e926ff981022eaa512d8980 Author: Christoph Hellwig Date: Wed Jul 22 11:41:20 2020 +0200 init: add an init_mknod helper Add a simple helper to mknod with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_mknod. Signed-off-by: Christoph Hellwig commit 83ff98c3e9cd2b82b4289e185f2ce7d635a9cbd3 Author: Christoph Hellwig Date: Wed Jul 22 11:14:59 2020 +0200 init: add an init_mkdir helper Add a simple helper to mkdir with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_mkdir. Signed-off-by: Christoph Hellwig commit cd3acb6a79349f346714ab3d26d203a0c6ca5ab0 Author: Christoph Hellwig Date: Wed Jul 22 11:14:36 2020 +0200 init: add an init_symlink helper Add a simple helper to symlink with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_symlink. Signed-off-by: Christoph Hellwig commit 812931d693da58cc24d2bb8dec01c2b4a7f4668f Author: Christoph Hellwig Date: Wed Jul 22 11:14:19 2020 +0200 init: add an init_link helper Add a simple helper to link with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_link. Signed-off-by: Christoph Hellwig commit eb9d7d390e51108b4c6a9a7993ed9be92548c8f7 Author: Christoph Hellwig Date: Wed Jul 22 11:14:02 2020 +0200 init: add an init_eaccess helper Add a simple helper to check if a file exists based on kernel space file name and switch the early init code over to it. Note that this theoretically changes behavior as it always is based on the effective permissions. But during early init that doesn't make a difference. Signed-off-by: Christoph Hellwig commit 1097742efc643ffc667c5c6684635b2663145a7d Author: Christoph Hellwig Date: Wed Jul 22 11:41:02 2020 +0200 init: add an init_chmod helper Add a simple helper to chmod with a kernel space file name and switch the early init code over to it. Signed-off-by: Christoph Hellwig commit b873498f99c77e7b5be3aa5ffe9ca67437232fe0 Author: Christoph Hellwig Date: Wed Jul 22 11:13:26 2020 +0200 init: add an init_chown helper Add a simple helper to chown with a kernel space file name and switch the early init code over to it. Signed-off-by: Christoph Hellwig commit 4b7ca5014cbef51cdb99fd644eae4f3773747a05 Author: Christoph Hellwig Date: Wed Jul 22 11:26:13 2020 +0200 init: add an init_chroot helper Add a simple helper to chroot with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_chroot. Signed-off-by: Christoph Hellwig commit db63f1e315384590b979f8f74abd1b5363b69894 Author: Christoph Hellwig Date: Wed Jul 22 11:25:21 2020 +0200 init: add an init_chdir helper Add a simple helper to chdir with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_chdir. Signed-off-by: Christoph Hellwig commit 20cce026c3e0972017b9cb4a7cccfb8cacf187d5 Author: Christoph Hellwig Date: Wed Jul 22 11:11:45 2020 +0200 init: add an init_rmdir helper Add a simple helper to rmdir with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_rmdir. Signed-off-by: Christoph Hellwig commit 8fb9f73e5a539ab3aa4785f30fb52c65fa98600c Author: Christoph Hellwig Date: Thu Jul 23 08:23:40 2020 +0200 init: add an init_unlink helper Add a simple helper to unlink with a kernel space file name and switch the early init code over to it. Remove the now unused ksys_unlink. Signed-off-by: Christoph Hellwig commit 09267defa36aaff6ff829bd2fc8b043ec151cc3e Author: Christoph Hellwig Date: Thu Jul 23 08:23:08 2020 +0200 init: add an init_umount helper Like ksys_umount, but takes a kernel pointer for the destination path. Switch over the umount in the init code, which just happen to work due to the implicit set_fs(KERNEL_DS) during early init right now. Signed-off-by: Christoph Hellwig commit c60166f04283ffba7b88b45d824bbfb2bfccee24 Author: Christoph Hellwig Date: Tue Jul 21 11:12:08 2020 +0200 init: add an init_mount helper Like do_mount, but takes a kernel pointer for the destination path. Switch over the mounts in the init code and devtmpfs to it, which just happen to work due to the implicit set_fs(KERNEL_DS) during early init right now. Signed-off-by: Christoph Hellwig commit 09cbcec07b578c04ab4ab0e31940c20126f79c4b Author: Christoph Hellwig Date: Tue Jul 21 12:20:16 2020 +0200 init: mark create_dev as __init This helper is only used for the early init code. Signed-off-by: Christoph Hellwig commit a94b5214487b626a148c6aab86809fbeb8fcd6b1 Author: Christoph Hellwig Date: Tue Jul 28 18:23:21 2020 +0200 init: mark console_on_rootfs as __init This helper is only used for the early init code. Signed-off-by: Christoph Hellwig commit 916db733deca5dc1e14ea8e3acfc121600a9f462 Author: Christoph Hellwig Date: Sun Jun 7 09:06:29 2020 +0200 init: initialize ramdisk_execute_command at compile time Set ramdisk_execute_command to "/init" at compile time. The command line can still override it, but this saves a few instructions and removes a NULL check. Signed-off-by: Christoph Hellwig commit bcbacc4909f1b93242ba2894d0282c151c9d0e68 Author: Christoph Hellwig Date: Wed Jul 22 10:48:25 2020 +0200 devtmpfs: refactor devtmpfsd() Split the main worker loop into a separate function. This allows devtmpfsd_setup to be marked __init, which will allows us to call __init routines for the setup work. devtmpfѕ itself needs a __ref marker for that to work, and a comment explaining why it works. Signed-off-by: Christoph Hellwig commit e24ab0ef689de43649327f54cd1088f3dad25bb3 Author: Christoph Hellwig Date: Tue Jul 21 10:48:15 2020 +0200 fs: push the getname from do_rmdir into the callers This mirrors do_unlinkat and will make life a little easier for the init code to reuse the whole function with a kernel filename. Signed-off-by: Christoph Hellwig commit 41525f56e2564c2feff4fb2824823900efb3a39f Author: Christoph Hellwig Date: Tue Jul 21 10:54:34 2020 +0200 fs: refactor ksys_umount Factor out a path_umount helper that takes a struct path * instead of the actual file name. This will allow to convert the init and devtmpfs code to properly mount based on a kernel pointer instead of relying on the implicit set_fs(KERNEL_DS) during early init. Signed-off-by: Christoph Hellwig commit a1e6aaa3743a3daa98d0f9275df8243eef8bb666 Author: Christoph Hellwig Date: Thu Jun 4 09:41:08 2020 +0200 fs: refactor do_mount Factor out a path_mount helper that takes a struct path * instead of the actual file name. This will allow to convert the init and devtmpfs code to properly mount based on a kernel pointer instead of relying on the implicit set_fs(KERNEL_DS) during early init. Signed-off-by: Christoph Hellwig commit 38b082236e77d403fed23ac2d30d570598744ec3 Author: Christoph Hellwig Date: Thu Jul 30 08:19:00 2020 +0200 initramfs: use vfs_utimes in do_copy Don't bother saving away the pathname and just use the new struct path based utimes helper instead. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit fd5ad30c782351ab4d4a15941fc61e743a1bd66c Author: Christoph Hellwig Date: Wed Jul 15 08:19:55 2020 +0200 fs: expose utimes_common Rename utimes_common to vfs_utimes and make it available outside of utimes.c. This will be used by the initramfs unpacking code. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 27eb11c9632c66754ea7f67512b3516f998ed213 Author: Christoph Hellwig Date: Wed Jul 15 08:15:36 2020 +0200 fs: move timespec validation into utimes_common Consolidate the validation of the timespec from the two callers into utimes_common. That means it is done a little later (e.g. after the path lookup), but I can't find anything that requires a specific order of processing the errors. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 9d4b74aee80436d067d79a6c32ebb544b0ae5460 Author: Christoph Hellwig Date: Sun Jun 7 18:26:37 2020 +0200 fs: refactor do_utimes Split out one helper each for path vs fd based operations. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 863b67e15177a7cd0c27b3e36e42fe7907dec9bd Author: Christoph Hellwig Date: Tue Jul 14 09:00:51 2020 +0200 fs: remove ksys_ioctl Fold it into the only remaining caller. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit b25ba7c3c9acdc4cf69f5bd69989819cabfc4e3b Author: Christoph Hellwig Date: Tue Jul 14 08:59:57 2020 +0200 fs: remove ksys_fchmod Fold it into the only remaining caller. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit bc1cd99a9ad7e2c768e7ea92ae9c6ad4a4e0f7f7 Author: Christoph Hellwig Date: Tue Jul 14 08:58:49 2020 +0200 fs: remove ksys_dup Fold it into the only remaining caller. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 166e07c37c6417c9713666268fc0eb89a9ce48b9 Author: Christoph Hellwig Date: Sat Jun 6 15:03:21 2020 +0200 fs: remove ksys_open Just open code it in the two callers. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit fb2da16cd70a5140acdd7a102e5cd3b697c3404f Author: Christoph Hellwig Date: Tue Jul 14 09:02:07 2020 +0200 fs: remove ksys_getdents64 Just open code it in the only caller. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 8f740636d9049a3f9665a0ec87a00822ec1120b4 Author: Christoph Hellwig Date: Sun Jun 7 17:44:28 2020 +0200 init: open code setting up stdin/stdout/stderr Don't rely on the implicit set_fs(KERNEL_DS) for ksys_open to work, but instead open a struct file for /dev/console and then install it as FD 0/1/2 manually. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit bf6419e4d5440c6d414a320506c5488857a5b001 Author: Christoph Hellwig Date: Tue Jul 14 08:56:19 2020 +0200 initramfs: switch initramfs unpacking to struct file based APIs There is no good reason to mess with file descriptors from in-kernel code, switch the initramfs unpacking to struct file based write instead. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 2ed0b7578170c3bab10cde09d4440897b305e40c Author: Li Heng Date: Wed Jul 29 16:59:00 2020 +0800 9p: Remove unneeded cast from memory allocation Remove kmem_cache_alloc return value cast. Coccinelle emits the following warning: ./fs/9p/vfs_inode.c:226:12-29: WARNING: casting value returned by memory allocation function to (struct v9fs_inode *) is useless. Link: http://lkml.kernel.org/r/1596013140-49744-1-git-send-email-liheng40@huawei.com Signed-off-by: Li Heng [Dominique: commit message wording] Signed-off-by: Dominique Martinet commit 418eda8f3fe292782c150266d693d55d284c0c98 Merge: 5de5b6ecf97a0 e57bd05ec0d2d Author: Dave Airlie Date: Fri Jul 31 05:25:42 2020 +1000 Merge tag 'drm-intel-next-2020-07-15' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 features for v5.9, batch #2 Highlights: - Very early DG1 enabling (Abdiel, Lucas, Anusha) Gem/GT: - Fix spinlock recursion on signaling a signaled request (Chris) - Perf: Use GTT when saving/restoring engine GPR (Umesh Nerlige Ramappa) - SSEU refactoring, debugfs move under gt/ (Daniele, Venkata Sandeep Dhanalakota) - Various GT refactoring and cleanup, preparation for future changes (Daniele) - Adjust HuC state accordingly after GuC fetch error (Michał Winiarski) - UC debugfs updates (Michał Winiarski) - Only revoke the GGTT mmappings on aperture detiling changes (Chris) - Only revoke mmap handlers if active (Chris) - Split the context's obj:vma lut into its own mutex (Chris) - Various memory, mmap and performance optimisations (Chris) - Improve system stability in case of false CS events (Chris) - Various refactorings and cleanup (Chris) - Always reset the engine on execlist failures (Chris) - Trace placement of timeline HWSP (Chris) - Update dma-attributes for our sg DMA (Chris) Display: - TGL CDCLK workaround tweaks to unbreak 8K display support (Stanislav) - A number of FBC fixes, along with i865 FBC enabling (Ville) - Validate MST modes against PBN limits (Lyude, Shawn Lee) - Do not access non-existing swizzle registers (Lucas) - Revert GEN11+ HBR3 rate fix that caused issues on TGL (Matt Atwood) - Update TGL+ combo phy initialization to match spec update (José) - Fix HDCP Content Protection property state machine (Anshuman) - Fix HDCP revoked keys handling (Ram) - Improve DDI BUF status checks and waits (Manasi) - Various SDVO+HDMI+DVI fixes around colorimetry, clocking, pixel repeat etc. (Ville) - DP voltage swing function refactoring (José) - WARN if max vswing/pre-emphasis violates the DP spec (Ville) Other: - Add new EHL PCI IDs (José) - Unify struct intel_digital_port variable naming (Lucas) - Various taint updates to aid debugging and improve CI (Michał Winiarski) - Straggler conversions to new mmio register accessors (Daniele) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87a70029vz.fsf@intel.com commit ee896ee8051a618ea4fe3d91c58d3e6ef9faf705 Author: Vincent Whitchurch Date: Mon Jul 27 11:28:40 2020 +0200 tracing: Remove outdated comment in stack handling This comment describes the behaviour before commit 2a820bf74918 ("tracing: Use percpu stack trace buffer more intelligently"). Since that commit, interrupts and NMIs do use the per-cpu stacks so the comment is no longer correct. Remove it. (Note that the FTRACE_STACK_SIZE mentioned in the comment has never existed, it probably should have said FTRACE_STACK_ENTRIES.) Link: https://lkml.kernel.org/r/20200727092840.18659-1-vincent.whitchurch@axis.com Signed-off-by: Vincent Whitchurch Signed-off-by: Steven Rostedt (VMware) commit c5f51572a7fdff5be9e67c231de593155f394ab3 Author: Chengming Zhou Date: Wed Jul 29 02:05:54 2020 +0800 ftrace: Do not let direct or IPMODIFY ftrace_ops be added to module and set trampolines When inserting a module, we find all ftrace_ops referencing it on the ftrace_ops_list. But FTRACE_OPS_FL_DIRECT and FTRACE_OPS_FL_IPMODIFY flags are special, and should not be set automatically. So warn and skip ftrace_ops that have these two flags set and adding new code. Also check if only one ftrace_ops references the module, in which case we can use a trampoline as an optimization. Link: https://lkml.kernel.org/r/20200728180554.65203-2-zhouchengming@bytedance.com Signed-off-by: Chengming Zhou Signed-off-by: Muchun Song Signed-off-by: Steven Rostedt (VMware) commit e6169c4b4413f97cc36ceebc8dd6d2518f341d0f Author: Guo Ren Date: Fri Jul 31 00:21:41 2020 +0000 csky: Add arch_show_interrupts for IPI interrupts Here is the result: cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 15: 1348 1299 952 1076 C-SKY SMP Intc 15 IPI Interrupt 16: 1203 1825 1598 1307 C-SKY SMP Intc 16 csky_mp_timer 43: 292 0 0 0 C-SKY SMP Intc 43 ttyS0 57: 106 0 0 0 C-SKY SMP Intc 57 virtio0 IPI0: 0 0 0 0 Empty interrupts IPI1: 19 41 45 27 Rescheduling interrupts IPI2: 1330 1259 908 1050 Function call interrupts IPI3: 0 0 0 0 Irq work interrupts Signed-off-by: Guo Ren Cc: Arnd Bergmann commit 2c81b0768297fb2fb4d2f39eac49a55f3598375b Author: Guo Ren Date: Thu Jul 30 17:05:51 2020 +0000 csky: Add irq_work support Running work in hardware interrupt context for csky. Implement: - arch_irq_work_raise() - arch_irq_work_has_interrupt() Signed-off-by: Guo Ren Cc: Arnd Bergmann commit 667b9324bd83d79abd64ee21bf5fa17ccc9ec246 Author: Guo Ren Date: Thu Jul 30 13:14:08 2020 +0000 csky: Fixup warning by EXPORT_SYMBOL(kmap) This a wrong code, and no kmap symbol for export. Signed-off-by: Guo Ren Cc: Arnd Bergmann commit 50d23a1c89051957a67ecaa40b5f833dd9b86c4c Author: Guo Ren Date: Thu Jul 30 13:12:00 2020 +0000 csky: Set CONFIG_NR_CPU 4 as default The C860 processors support 4 cores smp for maximum, so set NR_CPU to 4 as default Signed-off-by: Guo Ren Cc: Arnd Bergmann commit 953131e5b5a5bb1b493fab413be41e4944f3c75d Author: Guo Ren Date: Thu Jul 30 12:44:12 2020 +0000 csky: Use top-down mmap layout Follow riscv mmap layout with commit "riscv: make mmap allocation top-down by default (54c95a11cc1b)". Before: cat /proc/self/maps 00008000-000dc000 r-xp 00000000 fe:00 17 /bin/busybox 000dc000-000dd000 r--p 000d3000 fe:00 17 /bin/busybox 000dd000-000de000 rw-p 000d4000 fe:00 17 /bin/busybox 2aaa8000-2aac6000 r-xp 00000000 fe:00 196 /lib/ld-2.28.9000.so 2aac6000-2aac7000 r-xp 00000000 00:00 0 [vdso] 2aac7000-2aac8000 r--p 0001e000 fe:00 196 /lib/ld-2.28.9000.so 2aac8000-2aac9000 rw-p 0001f000 fe:00 196 /lib/ld-2.28.9000.so 2aac9000-2aad9000 r-xp 00000000 fe:00 219 /lib/libresolv-2.28.9000.so 2aad9000-2aada000 r--p 0000f000 fe:00 219 /lib/libresolv-2.28.9000.so 2aada000-2aadb000 rw-p 00010000 fe:00 219 /lib/libresolv-2.28.9000.so 2aadb000-2aadd000 rw-p 00000000 00:00 0 2aadd000-2ac27000 r-xp 00000000 fe:00 203 /lib/libc-2.28.9000.so 2ac27000-2ac28000 ---p 0014a000 fe:00 203 /lib/libc-2.28.9000.so 2ac28000-2ac2a000 r--p 0014a000 fe:00 203 /lib/libc-2.28.9000.so 2ac2a000-2ac2b000 rw-p 0014c000 fe:00 203 /lib/libc-2.28.9000.so 2ac2b000-2ac2e000 rw-p 00000000 00:00 0 7fb99000-7fbba000 rwxp 00000000 00:00 0 [stack] After: cat /proc/self/maps 00008000-000dc000 r-xp 00000000 fe:00 17 /bin/busybox 000dc000-000dd000 r--p 000d3000 fe:00 17 /bin/busybox 000dd000-000de000 rw-p 000d4000 fe:00 17 /bin/busybox 77e13000-77f5d000 r-xp 00000000 fe:00 203 /lib/libc-2.28.9000.so 77f5d000-77f5e000 ---p 0014a000 fe:00 203 /lib/libc-2.28.9000.so 77f5e000-77f60000 r--p 0014a000 fe:00 203 /lib/libc-2.28.9000.so 77f60000-77f61000 rw-p 0014c000 fe:00 203 /lib/libc-2.28.9000.so 77f61000-77f66000 rw-p 00000000 00:00 0 77f66000-77f76000 r-xp 00000000 fe:00 219 /lib/libresolv-2.28.9000.so 77f76000-77f77000 r--p 0000f000 fe:00 219 /lib/libresolv-2.28.9000.so 77f77000-77f78000 rw-p 00010000 fe:00 219 /lib/libresolv-2.28.9000.so 77f78000-77f96000 r-xp 00000000 fe:00 196 /lib/ld-2.28.9000.so 77f96000-77f97000 r-xp 00000000 00:00 0 [vdso] 77f97000-77f98000 r--p 0001e000 fe:00 196 /lib/ld-2.28.9000.so 77f98000-77f99000 rw-p 0001f000 fe:00 196 /lib/ld-2.28.9000.so 7fd7b000-7fd9c000 rwxp 00000000 00:00 0 [stack] Signed-off-by: Guo Ren Cc: Arnd Bergmann commit 5bc46ce26cfc42fa066b2206621587f9dea9a8a8 Author: Guo Ren Date: Thu Jul 30 11:09:51 2020 +0000 csky: Optimize the trap processing flow - Seperate different trap functions - Add trap_no() - Remove panic code print - Redesign die_if_kerenl to die with riscv's - Print exact trap info for app segment fault [ 17.389321] gzip[126]: unhandled signal 11 code 0x3 at 0x0007835a in busybox[8000+d4000] [ 17.393882] [ 17.393882] CURRENT PROCESS: [ 17.393882] [ 17.394309] COMM=gzip PID=126 [ 17.394513] TEXT=00008000-000db2e4 DATA=000dcf14-000dd1ad BSS=000dd1ad-000ff000 [ 17.395499] USER-STACK=7f888e50 KERNEL-STACK=bf130300 [ 17.395499] [ 17.396801] PC: 0x0007835a (0x7835a) [ 17.397048] LR: 0x000058b4 (0x58b4) [ 17.397285] SP: 0xbe519f68 [ 17.397555] orig_a0: 0x00002852 [ 17.397886] PSR: 0x00020341 [ 17.398356] a0: 0x00002852 a1: 0x000f2f5a a2: 0x0000d7ae a3: 0x0000005d [ 17.399289] r4: 0x000de150 r5: 0x00000002 r6: 0x00000102 r7: 0x00007efa [ 17.399800] r8: 0x7f888bc4 r9: 0x00000001 r10: 0x000002eb r11: 0x0000aac1 [ 17.400166] r12: 0x00002ef2 r13: 0x00000007 r15: 0x000058b4 [ 17.400531] r16: 0x0000004c r17: 0x00000031 r18: 0x000f5816 r19: 0x000e8068 [ 17.401006] r20: 0x000f5818 r21: 0x000e8068 r22: 0x000f5918 r23: 0x90000000 [ 17.401721] r24: 0x00000031 r25: 0x000000c8 r26: 0x00000000 r27: 0x00000000 [ 17.402199] r28: 0x2ac2a000 r29: 0x00000000 r30: 0x00000000 tls: 0x2aadbaa8 [ 17.402686] hi: 0x00120340 lo: 0x7f888bec /etc/init.ci/ntfs3g_run: line 61: 126 Segmentation fault gzip -c -9 /mnt/test.bin > /mnt/test_bin.gz Signed-off-by: Guo Ren Cc: Arnd Bergmann commit 71e193d7cbcfc988c3802e15261bd807171adb6b Author: Guo Ren Date: Tue Jul 28 16:30:46 2020 +0000 csky: Add support for function error injection Inspired by the commit 42d038c4fb00 ("arm64: Add support for function error injection"), this patch supports function error injection for csky. This patch mainly support two functions: one is regs_set_return_value() which is used to overwrite the return value; the another function is override_function_with_return() which is to override the probed function returning and jump to its caller. Test log: cd /sys/kernel/debug/fail_function/ echo sys_clone > inject echo 100 > probability echo 1 > interval ls / [ 108.644163] FAULT_INJECTION: forcing a failure. [ 108.644163] name fail_function, interval 1, probability 100, space 0, times 1 [ 108.647799] CPU: 0 PID: 104 Comm: sh Not tainted 5.8.0-rc5+ #46 [ 108.648384] Call Trace: [ 108.649339] [<8005eed4>] walk_stackframe+0x0/0xf0 [ 108.649679] [<8005f16a>] show_stack+0x32/0x5c [ 108.649927] [<8040f9d2>] dump_stack+0x6e/0x9c [ 108.650271] [<80406f7e>] should_fail+0x15e/0x1ac [ 108.650720] [<80118ba8>] fei_kprobe_handler+0x28/0x5c [ 108.651519] [<80754110>] kprobe_breakpoint_handler+0x144/0x1cc [ 108.652289] [<8005d6da>] trap_c+0x8e/0x110 [ 108.652816] [<8005ce8c>] csky_trap+0x5c/0x70 -sh: can't fork: Invalid argument Signed-off-by: Guo Ren Cc: Arnd Bergmann commit a5447fb9b32eb33b2f0f09a63e4852b46af5b056 Author: Guo Ren Date: Tue Jul 28 16:25:23 2020 +0000 csky: Fixup kprobes handler couldn't change pc The "Changing Execution Path" section in the Documentation/kprobes.txt said: Since kprobes can probe into a running kernel code, it can change the register set, including instruction pointer. Signed-off-by: Guo Ren Cc: Arnd Bergmann commit f788bb2fb915a79eae0a160580766ba52984d61f Author: Guo Ren Date: Tue Jul 28 16:18:54 2020 +0000 csky: Fixup duplicated restore sp in RESTORE_REGS_FTRACE There is no user return for RESTORE_REGS_FTRACE, so it's no need to save sp into ss0 as RESTORE_REGS_ALL. Signed-off-by: Guo Ren Cc: Arnd Bergmann commit 8077e66bc381988d0ef6f60d2eb71d8812b26333 Author: Guo Ren Date: Tue Jul 28 10:44:57 2020 +0000 csky: Add cpu feature register hint for smp CPU features registers are setup by customers' bootloader, but Linux must help transfer them from the primary to secondary cores. This patch add hint2 CPU feature register supported. Signed-off-by: Guo Ren Cc: Arnd Bergmann commit e95a4f8cb985e759648b32ed0b721a472deb86a5 Author: Guo Ren Date: Tue May 26 08:11:52 2020 +0000 csky: Add SECCOMP_FILTER supported secure_computing() is called first in syscall_trace_enter() so that a system call will be aborted quickly without doing succeeding syscall tracing if seccomp rules want to deny that system call. TODO: - Update https://github.com/seccomp/libseccomp csky support Signed-off-by: Guo Ren Cc: Arnd Bergmann commit c23dd2405fc2054345be33f8bb1d04b3b805202d Author: Tobias Klauser Date: Wed Jun 10 17:39:35 2020 +0200 csky: remove unusued thread_saved_pc and *_segments functions/macros These are used nowhere in the tree (except for some architectures which define them for their own use) and were already removed for other architectures in: commit 6474924e2b5d ("arch: remove unused macro/function thread_saved_pc()") commit c17c02040bf0 ("arch: remove unused *_segments() macros/functions") Remove them from arch/csky as well. Signed-off-by: Tobias Klauser Signed-off-by: Guo Ren Cc: Arnd Bergmann commit bf1a28f92a8b00ee8ce48cc11338980e31ddb7b3 Author: Hannes Reinecke Date: Tue Jul 28 15:48:33 2020 +0200 scsi: scsi_transport_srp: Sanitize scsi_target_block/unblock sequences The SCSI midlayer does not allow state transitions from SDEV_BLOCK to SDEV_BLOCK so calling scsi_target_block() from __rport_fast_io_fail() is wrong as the port is already blocked. Similarly, we don't need to call scsi_target_unblock() afterwards as the function has already done this. Link: https://lore.kernel.org/r/20200728134833.42547-1-hare@suse.de Reviewed-by: Bart Van Assche Reviewed-by: Laurence Oberman Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit d61fa5bc3e521211d68d00c9199a61a7504b4dab Author: Stanley Chu Date: Wed Jul 29 13:18:40 2020 +0800 scsi: ufs-mediatek: Apply DELAY_AFTER_LPM quirk to Micron devices Micron UFS devices require DELAY_AFTER_LPM device quirk in MediaTek platforms. Link: https://lore.kernel.org/r/20200729051840.31318-3-stanley.chu@mediatek.com Acked-by: Avri Altman Reviewed-by: Andy Teng Reviewed-by: Peter Wang Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit c4df6eed972e001a206a173738bec8c5f903257a Author: Stanley Chu Date: Wed Jul 29 13:18:39 2020 +0800 scsi: ufs: Introduce device quirk "DELAY_AFTER_LPM" Some UFS devices require delay after VCC power rail is turned off. Introduce a device quirk "DELAY_AFTER_LPM" to add 5ms delay after VCC power-off during suspend flow. Link: https://lore.kernel.org/r/20200729051840.31318-2-stanley.chu@mediatek.com Reviewed-by: Andy Teng Reviewed-by: Peter Wang Reviewed-by: Can Guo Acked-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit bb2e33146876306d5623080e008f61e96e407590 Author: Maxim Levitsky Date: Wed Jul 29 22:48:06 2020 +0300 scsi: virtio-scsi: Correctly handle the case where all LUNs are unplugged Commit 5ff843721467 ("scsi: virtio_scsi: unplug LUNs when events missed") missed a corner case in which all the LUNs are unplugged at the same time. In this case INQUIRY returns DID_BAD_TARGET. Detect this and unplug the LUN. Link: https://lore.kernel.org/r/20200729194806.4933-2-mlevitsk@redhat.com Acked-by: Paolo Bonzini Signed-off-by: Maxim Levitsky Signed-off-by: Martin K. Petersen commit bd69058f50d5ffa659423bcfa6fe6280ce9c760a Author: Wang Hai Date: Thu Jul 30 15:24:19 2020 +0800 net: ll_temac: Use devm_platform_ioremap_resource_byname() platform_get_resource() may fail and return NULL, so we had better check its return value to avoid a NULL pointer dereference a bit later in the code. Fix it to use devm_platform_ioremap_resource_byname() instead of calling platform_get_resource_byname() and devm_ioremap(). Fixes: 8425c41d1ef7 ("net: ll_temac: Extend support to non-device-tree platforms") Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 3ce38d39ee2c7fe7557901c445683edec5f10d6d Merge: bbf1b94a733d8 04db64652e01d Author: David S. Miller Date: Thu Jul 30 17:43:02 2020 -0700 Merge branch 'net-ethernet-use-generic-power-management' Vaibhav Gupta says: ==================== net: ethernet: use generic power management Linux Kernel Mentee: Remove Legacy Power Management. The purpose of this patch series is to upgrade power management in net ethernet drivers. This has been done by upgrading .suspend() and .resume() callbacks. The upgrade makes sure that the involvement of PCI Core does not change the order of operations executed in a driver. Thus, does not change its behavior. In general, drivers with legacy PM, .suspend() and .resume() make use of PCI helper functions like pci_enable/disable_device_mem(), pci_set_power_state(), pci_save/restore_state(), pci_enable/disable_device(), etc. to complete their job. The conversion requires the removal of those function calls, change the callbacks' definition accordingly and make use of dev_pm_ops structure. All patches are compile-tested only. Test tools: - Compiler: gcc (GCC) 10.1.0 - allmodconfig build: make -j$(nproc) W=1 all ==================== Signed-off-by: David S. Miller commit 04db64652e01deb8d3568df22799e02c155377b5 Author: Vaibhav Gupta Date: Thu Jul 30 12:23:36 2020 +0530 tlan: use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 7fa8bb48a45091dba1f8e7163451538b34314e1e Author: Vaibhav Gupta Date: Thu Jul 30 12:23:35 2020 +0530 sis900: use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit bfc6c183cb820bfca22c6f075bd81be7ef84d774 Author: Vaibhav Gupta Date: Thu Jul 30 12:23:34 2020 +0530 sc92031: use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit bbf1b94a733d823f195d9e9f960a2e60718acc3e Author: Li Heng Date: Thu Jul 30 14:43:50 2020 +0800 bnxt_en: Remove superfluous memset() Fixes coccicheck warning: ./drivers/net/ethernet/broadcom/bnxt/bnxt.c:3730:19-37: WARNING: dma_alloc_coherent use in stats -> hw_stats already zeroes out memory, so memset is not needed dma_alloc_coherent use in status already zeroes out memory, so memset is not needed Reported-by: Hulk Robot Signed-off-by: Li Heng Signed-off-by: David S. Miller commit 1e51f9358af513c1620b527d1e8c90b8820591a2 Author: Wang Hai Date: Thu Jul 30 14:11:40 2020 +0800 liquidio: Replace vmalloc with kmalloc in octeon_register_dispatch_fn() The size of struct octeon_dispatch is too small, it is better to use kmalloc instead of vmalloc. Suggested-by: Joe Perches Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit a0d716d8e42abcb973afed27c6fa44bd146d2616 Author: Gustavo A. R. Silva Date: Wed Jul 29 22:17:00 2020 -0500 net/sched: act_pedit: Use flex_array_size() helper in memcpy() Make use of the flex_array_size() helper to calculate the size of a flexible array member within an enclosing structure. This helper offers defense-in-depth against potential integer overflows, while at the same time makes it explicitly clear that we are dealing with a flexible array member. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 10470c0d7e921a46e126ff8f8a3b60fdb944b3d0 Author: Gustavo A. R. Silva Date: Wed Jul 29 17:58:03 2020 -0500 mlxsw: spectrum_cnt: Use flex_array_size() helper in memcpy() Make use of the flex_array_size() helper to calculate the size of a flexible array member within an enclosing structure. This helper offers defense-in-depth against potential integer overflows, while at the same time makes it explicitly clear that we are dealing witha flexible array member. Also, remove unnecessary pointer identifier sub_pool. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Ido Schimmel Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit 49688e654e48ae176b5bfda33d2416b68e607ce8 Author: Hao Li Date: Wed Jul 29 11:44:36 2020 +0800 dax: Fix incorrect argument passed to xas_set_err() The argument passed to xas_set_err() to indicate an error should be negative. Otherwise, xas_error() will return 0, and grab_mapping_entry() will return the found entry instead of 'SIGBUS' when the entry is not in fact valid. This would result in problems in subsequent code paths. Link: https://lore.kernel.org/r/20200729034436.24267-1-lihao2018.fnst@cn.fujitsu.com Reviewed-by: Pankaj Gupta Signed-off-by: Hao Li Signed-off-by: Vishal Verma commit c64c9c282a9a7ec0515b725d5aaed68c32e403a4 Author: Jakub Sitnicki Date: Sun Jul 26 14:02:28 2020 +0200 udp, bpf: Ignore connections in reuseport group after BPF sk lookup When BPF sk lookup invokes reuseport handling for the selected socket, it should ignore the fact that reuseport group can contain connected UDP sockets. With BPF sk lookup this is not relevant as we are not scoring sockets to find the best match, which might be a connected UDP socket. Fix it by unconditionally accepting the socket selected by reuseport. This fixes the following two failures reported by test_progs. # ./test_progs -t sk_lookup ... #73/14 UDP IPv4 redir and reuseport with conns:FAIL ... #73/20 UDP IPv6 redir and reuseport with conns:FAIL ... Fixes: a57066b1a019 ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net") Reported-by: Alexei Starovoitov Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200726120228.1414348-1-jakub@cloudflare.com commit b04e55d641c0d8c6b7305b9cfc7d000f2d305849 Author: YueHaibing Date: Wed Jul 29 02:19:50 2020 +0000 sfc_ef100: remove duplicated include from ef100_netdev.c Remove duplicated include. Signed-off-by: YueHaibing Acked-by: Edward Cree Signed-off-by: David S. Miller commit 7ea5fda2b1325e17528e2648b913244c8be0bcc7 Author: Min Li Date: Tue Jul 28 16:00:30 2020 -0400 ptp: ptp_clockmatrix: update to support 4.8.7 firmware With 4.8.7 firmware, adjtime can change delta instead of absolute time, which greately increases snap accuracy. PPS alignment doesn't have to be set for every single TOD change. Other minor changes includes: adding more debug logs, increasing snap accuracy for pre 4.8.7 firmware and supporting new tcs2bin format. Signed-off-by: Min Li Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 2a043e9cec73765b150a3685b09baef93b09f2e4 Merge: d3239425351a2 340bb1ac450ba Author: David S. Miller Date: Thu Jul 30 16:45:31 2020 -0700 Merge branch 'l2tp-tidy-up-l2tp-core-API' Tom Parkin says: ==================== l2tp: tidy up l2tp core API This short series makes some minor tidyup changes to the L2TP core API. ==================== Signed-off-by: David S. Miller commit 340bb1ac450ba21cc4dabd368791fa49b39c858a Author: Tom Parkin Date: Tue Jul 28 18:20:33 2020 +0100 l2tp: improve API documentation in l2tp_core.h * Improve the description of the key l2tp subsystem data structures. * Add high-level description of the main APIs for interacting with l2tp core. * Add documentation for the l2tp netlink session command callbacks. * Document the session pseudowire callbacks. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit ca7885dbcd899e63e47c33707c1615d9dd281c7f Author: Tom Parkin Date: Tue Jul 28 18:20:32 2020 +0100 l2tp: tweak exports for l2tp_recv_common and l2tp_ioctl All of the l2tp subsystem's exported symbols are exported using EXPORT_SYMBOL_GPL, except for l2tp_recv_common and l2tp_ioctl. These functions alone are not useful without the rest of the l2tp infrastructure, so there's no practical benefit to these symbols using a different export policy. Change these exports to use EXPORT_SYMBOL_GPL for consistency with the rest of l2tp. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 2dedab6ff57edd29848391fa917a8f96c4f82583 Author: Tom Parkin Date: Tue Jul 28 18:20:31 2020 +0100 l2tp: remove build_header callback in struct l2tp_session The structure of an L2TP data packet header varies depending on the version of the L2TP protocol being used. struct l2tp_session used to have a build_header callback to abstract this difference away. It's clearer to simply choose the correct function to use when building the data packet (and we save on the function pointer in the session structure). This approach does mean dereferencing the parent tunnel structure in order to determine the tunnel version, but we're doing that in the transmit path in any case. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 628703f59dcc832a0bd04b4fa41d856e5df98112 Author: Tom Parkin Date: Tue Jul 28 18:20:30 2020 +0100 l2tp: return void from l2tp_session_delete l2tp_session_delete is used to schedule a session instance for deletion. The function itself always returns zero, and none of its direct callers check its return value, so have the function return void. This change de-facto changes the l2tp netlink session_delete callback prototype since all pseudowires currently use l2tp_session_delete for their implementation of that operation. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 52016e259bab98613453e29d42f2ffe456feee11 Author: Tom Parkin Date: Tue Jul 28 18:20:29 2020 +0100 l2tp: don't export tunnel and session free functions Tunnel and session instances are reference counted, and shouldn't be directly freed by pseudowire code. Rather than exporting l2tp_tunnel_free and l2tp_session_free, make them private to l2tp_core.c, and export the refcount functions instead. In order to do this, the refcount functions cannot be declared as inline. Since the codepaths which take and drop tunnel and session references are not directly in the datapath this shouldn't cause performance issues. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit b2aecfe8e49059a69379a521aa68b4f55516780f Author: Tom Parkin Date: Tue Jul 28 18:20:28 2020 +0100 l2tp: don't export __l2tp_session_unhash When __l2tp_session_unhash was first added it was used outside of l2tp_core.c, but that's no longer the case. As such, there's no longer a need to export the function. Make it private inside l2tp_core.c, and relocate it to avoid having to declare the function prototype in l2tp_core.h. Since the function is no longer used outside l2tp_core.c, remove the "__" prefix since we don't need to indicate anything special about its expected use to callers. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit d3239425351a219ec779488ffb125352449c4106 Author: Jian Yang Date: Mon Jul 27 14:14:38 2020 -0700 selftests: txtimestamp: add flag for timestamp validation tolerance. The txtimestamp selftest sets a fixed 500us tolerance. This value was arrived at experimentally. Some platforms have higher variances. Make this adjustable by adding the following flag: -t N: tolerance (usec) for timestamp validation. Signed-off-by: Jian Yang Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 8a224ffb3f52b0027f6b7279854c71a31c48fc97 Author: Chengming Zhou Date: Wed Jul 29 02:05:53 2020 +0800 ftrace: Setup correct FTRACE_FL_REGS flags for module When module loaded and enabled, we will use __ftrace_replace_code for module if any ftrace_ops referenced it found. But we will get wrong ftrace_addr for module rec in ftrace_get_addr_new, because rec->flags has not been setup correctly. It can cause the callback function of a ftrace_ops has FTRACE_OPS_FL_SAVE_REGS to be called with pt_regs set to NULL. So setup correct FTRACE_FL_REGS flags for rec when we call referenced_filters to find ftrace_ops references it. Link: https://lkml.kernel.org/r/20200728180554.65203-1-zhouchengming@bytedance.com Cc: stable@vger.kernel.org Fixes: 8c4f3c3fa9681 ("ftrace: Check module functions being traced on reload") Signed-off-by: Chengming Zhou Signed-off-by: Muchun Song Signed-off-by: Steven Rostedt (VMware) commit 96b4833b6827a62c295b149213c68b559514c929 Author: Kevin Hao Date: Thu Jul 30 16:23:18 2020 +0800 tracing/hwlat: Honor the tracing_cpumask In calculation of the cpu mask for the hwlat kernel thread, the wrong cpu mask is used instead of the tracing_cpumask, this causes the tracing/tracing_cpumask useless for hwlat tracer. Fixes it. Link: https://lkml.kernel.org/r/20200730082318.42584-2-haokexin@gmail.com Cc: Ingo Molnar Cc: stable@vger.kernel.org Fixes: 0330f7aa8ee6 ("tracing: Have hwlat trace migrate across tracing_cpumask CPUs") Signed-off-by: Kevin Hao Signed-off-by: Steven Rostedt (VMware) commit a9d0ba6772a0056457838022b624c3d2a17cee21 Author: Kevin Hao Date: Thu Jul 30 16:23:17 2020 +0800 tracing/hwlat: Drop the duplicate assignment in start_kthread() We have set 'current_mask' to '&save_cpumask' in its declaration, so there is no need to assign again. Link: https://lkml.kernel.org/r/20200730082318.42584-1-haokexin@gmail.com Signed-off-by: Kevin Hao Signed-off-by: Steven Rostedt (VMware) commit 50450fc716c1a570ee8d8bfe198ef5d3cfca36e4 Author: Andrii Nakryiko Date: Wed Jul 29 16:21:48 2020 -0700 libbpf: Make destructors more robust by handling ERR_PTR(err) cases Most of libbpf "constructors" on failure return ERR_PTR(err) result encoded as a pointer. It's a common mistake to eventually pass such malformed pointers into xxx__destroy()/xxx__free() "destructors". So instead of fixing up clean up code in selftests and user programs, handle such error pointers in destructors themselves. This works beautifully for NULL pointers passed to destructors, so might as well just work for error pointers. Suggested-by: Song Liu Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200729232148.896125-1-andriin@fb.com commit a6599abdeac30063baf89df166068b20758e0e86 Author: Jakub Sitnicki Date: Thu Jul 30 14:53:25 2020 +0200 selftests/bpf: Omit nodad flag when adding addresses to loopback Setting IFA_F_NODAD flag for IPv6 addresses to add to loopback is unnecessary. Duplicate Address Detection does not happen on loopback device. Also, passing 'nodad' flag to 'ip address' breaks libbpf CI, which runs in an environment with BusyBox implementation of 'ip' command, that doesn't understand this flag. Fixes: 0ab5539f8584 ("selftests/bpf: Tests for BPF_SK_LOOKUP attach point") Reported-by: Andrii Nakryiko Signed-off-by: Jakub Sitnicki Signed-off-by: Daniel Borkmann Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200730125325.1869363-1-jakub@cloudflare.com commit 80546ac4586c0bd326aa7ce80f076646db02bcd0 Author: Andrii Nakryiko Date: Tue Jul 28 21:50:56 2020 -0700 selftests/bpf: Don't destroy failed link Check that link is NULL or proper pointer before invoking bpf_link__destroy(). Not doing this causes crash in test_progs, when cg_storage_multi selftest fails. Fixes: 3573f384014f ("selftests/bpf: Test CGROUP_STORAGE behavior on shared egress + ingress") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200729045056.3363921-1-andriin@fb.com commit dfdb0d93e5bc351af5b286ae9c630d3cf869b810 Author: Hangbin Liu Date: Wed Jul 29 16:56:58 2020 +0800 selftests/bpf: Add xdpdrv mode for test_xdp_redirect This patch add xdpdrv mode for test_xdp_redirect.sh since veth has support native mode. After update here is the test result: # ./test_xdp_redirect.sh selftests: test_xdp_redirect xdpgeneric [PASS] selftests: test_xdp_redirect xdpdrv [PASS] Signed-off-by: Hangbin Liu Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: William Tu Link: https://lore.kernel.org/bpf/20200729085658.403794-1-liuhangbin@gmail.com commit 4fb5f94911405b6d2645d4384c2ae1215bfc6a76 Author: Stanislav Fomichev Date: Tue Jul 28 17:31:04 2020 -0700 selftests/bpf: Verify socket storage in cgroup/sock_{create, release} Augment udp_limit test to set and verify socket storage value. That should be enough to exercise the changes from the previous patch. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200729003104.1280813-2-sdf@google.com commit f7c6cb1d9728dea9d9f131ef57303d6821afb0f8 Author: Stanislav Fomichev Date: Tue Jul 28 17:31:03 2020 -0700 bpf: Expose socket storage to BPF_PROG_TYPE_CGROUP_SOCK This lets us use socket storage from the following hooks: * BPF_CGROUP_INET_SOCK_CREATE * BPF_CGROUP_INET_SOCK_RELEASE * BPF_CGROUP_INET4_POST_BIND * BPF_CGROUP_INET6_POST_BIND Using existing 'bpf_sk_storage_get_proto' doesn't work because second argument is ARG_PTR_TO_SOCKET. Even though BPF_PROG_TYPE_CGROUP_SOCK hooks operate on 'struct bpf_sock', the verifier still considers it as a PTR_TO_CTX. That's why I'm adding another 'bpf_sk_storage_get_cg_sock_proto' definition strictly for BPF_PROG_TYPE_CGROUP_SOCK which accepts ARG_PTR_TO_CTX which is really 'struct sock' for this program type. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200729003104.1280813-1-sdf@google.com commit 12e6196fb15953605be54ac9320ac54371aecab7 Author: Yonghong Song Date: Tue Jul 28 15:18:01 2020 -0700 selftests/bpf: Test bpf_iter buffer access with negative offset Commit afbf21dce668 ("bpf: Support readonly/readwrite buffers in verifier") added readonly/readwrite buffer support which is currently used by bpf_iter tracing programs. It has a bug with incorrect parameter ordering which later fixed by Commit f6dfbe31e8fa ("bpf: Fix swapped arguments in calls to check_buffer_access"). This patch added a test case with a negative offset access which will trigger the error path. Without Commit f6dfbe31e8fa, running the test case in the patch, the error message looks like: R1_w=rdwr_buf(id=0,off=0,imm=0) R10=fp0 ; value_sum += *(__u32 *)(value - 4); 2: (61) r1 = *(u32 *)(r1 -4) R1 invalid (null) buffer access: off=-4, size=4 With the above commit, the error message looks like: R1_w=rdwr_buf(id=0,off=0,imm=0) R10=fp0 ; value_sum += *(__u32 *)(value - 4); 2: (61) r1 = *(u32 *)(r1 -4) R1 invalid rdwr buffer access: off=-4, size=4 Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200728221801.1090406-1-yhs@fb.com commit 4fc00b79b85d4c34bef06ad49f109ad7cd9e5d83 Author: Yonghong Song Date: Tue Jul 28 15:18:01 2020 -0700 bpf: Add missing newline characters in verifier error messages Newline characters are added in two verifier error messages, refactored in Commit afbf21dce668 ("bpf: Support readonly/readwrite buffers in verifier"). This way, they do not mix with messages afterwards. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200728221801.1090349-1-yhs@fb.com commit 800834285361dcf8e98b018e891df876472a4fac Author: Jean-Philippe Brucker Date: Tue Jul 28 17:21:26 2020 +0200 bpf, arm64: Add BPF exception tables When a tracing BPF program attempts to read memory without using the bpf_probe_read() helper, the verifier marks the load instruction with the BPF_PROBE_MEM flag. Since the arm64 JIT does not currently recognize this flag it falls back to the interpreter. Add support for BPF_PROBE_MEM, by appending an exception table to the BPF program. If the load instruction causes a data abort, the fixup infrastructure finds the exception table and fixes up the fault, by clearing the destination register and jumping over the faulting instruction. To keep the compact exception table entry format, inspect the pc in fixup_exception(). A more generic solution would add a "handler" field to the table entry, like on x86 and s390. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200728152122.1292756-2-jean-philippe@linaro.org commit 3f02794888213efb224ef8e38d5d0e0f74b95416 Merge: 92ed301919932 bcb3b2a7639db Author: Mark Brown Date: Thu Jul 30 23:27:08 2020 +0100 Merge remote-tracking branch 'regulator/for-5.9' into regulator-next commit 83013059bdc5486dcbcd33b5c4abf8431766e06c Author: Sean Christopherson Date: Wed Jul 15 20:41:22 2020 -0700 KVM: x86: Specify max TDP level via kvm_configure_mmu() Capture the max TDP level during kvm_configure_mmu() instead of using a kvm_x86_ops hook to do it at every vCPU creation. Signed-off-by: Sean Christopherson Message-Id: <20200716034122.5998-10-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 1d92d2e8e70697e92bdc1f5ff5c80216fbcd1774 Author: Sean Christopherson Date: Wed Jul 15 20:41:21 2020 -0700 KVM: x86/mmu: Rename max_page_level to max_huge_page_level Rename max_page_level to explicitly call out that it tracks the max huge page level so as to avoid confusion when a future patch moves the max TDP level, i.e. max root level, into the MMU and kvm_configure_mmu(). Signed-off-by: Sean Christopherson Message-Id: <20200716034122.5998-9-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit d468d94b7bafa7a2dd9bc72e5f7868469be3f7c4 Author: Sean Christopherson Date: Wed Jul 15 20:41:20 2020 -0700 KVM: x86: Dynamically calculate TDP level from max level and MAXPHYADDR Calculate the desired TDP level on the fly using the max TDP level and MAXPHYADDR instead of doing the same when CPUID is updated. This avoids the hidden dependency on cpuid_maxphyaddr() in vmx_get_tdp_level() and also standardizes the "use 5-level paging iff MAXPHYADDR > 48" behavior across x86. Suggested-by: Paolo Bonzini Signed-off-by: Sean Christopherson Message-Id: <20200716034122.5998-8-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit f83a4a6932f002701db19f968938ada1289f5e3c Author: Sean Christopherson Date: Wed Jul 15 20:41:19 2020 -0700 KVM: VXM: Remove temporary WARN on expected vs. actual EPTP level mismatch Remove the WARN in vmx_load_mmu_pgd() that was temporarily added to aid bisection/debug in the event the current MMU's shadow root level didn't match VMX's computed EPTP level. Signed-off-by: Sean Christopherson Message-Id: <20200716034122.5998-7-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 2a40b9001ec210e51a2bc8647629d7906779fb0b Author: Sean Christopherson Date: Wed Jul 15 20:41:18 2020 -0700 KVM: x86: Pull the PGD's level from the MMU instead of recalculating it Use the shadow_root_level from the current MMU as the root level for the PGD, i.e. for VMX's EPTP. This eliminates the weird dependency between VMX and the MMU where both must independently calculate the same root level for things to work correctly. Temporarily keep VMX's calculation of the level and use it to WARN if the incoming level diverges. Opportunistically refactor kvm_mmu_load_pgd() to avoid indentation hell, and rename a 'cr3' param in the load_mmu_pgd prototype that managed to survive the cr3 purge. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200716034122.5998-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit c1cc4784ce6e8cceff1013709abd74bcbf7fbf24 Merge: 92ed301919932 13625c0a4074d Author: Ingo Molnar Date: Fri Jul 31 00:15:53 2020 +0200 Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull the v5.9 RCU bits from Paul E. McKenney: - Documentation updates - Miscellaneous fixes - kfree_rcu updates - RCU tasks updates - Read-side scalability tests - SRCU updates - Torture-test updates Signed-off-by: Ingo Molnar commit 812f8058369f81be2d7e13a78e398d9425e830d8 Author: Sean Christopherson Date: Wed Jul 15 20:41:17 2020 -0700 KVM: VMX: Make vmx_load_mmu_pgd() static Make vmx_load_mmu_pgd() static as it is no longer invoked directly by nested VMX (or any code for that matter). No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200716034122.5998-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 59505b55aa0957bcad84e74bb80153d5c77916f6 Author: Sean Christopherson Date: Wed Jul 15 20:41:15 2020 -0700 KVM: x86/mmu: Add separate helper for shadow NPT root page role calc Refactor the shadow NPT role calculation into a separate helper to better differentiate it from the non-nested shadow MMU, e.g. the NPT variant is never direct and derives its root level from the TDP level. Signed-off-by: Sean Christopherson Message-Id: <20200716034122.5998-3-sean.j.christopherson@intel.com> Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit f291a358e0d88e3b20431266d8f78fc5eda1aec7 Author: Sean Christopherson Date: Wed Jul 15 20:41:16 2020 -0700 KVM: VMX: Drop a duplicate declaration of construct_eptp() Remove an extra declaration of construct_eptp() from vmx.h. Signed-off-by: Sean Christopherson Message-Id: <20200716034122.5998-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 096586fda522957881379cfe7870a373ab783c87 Author: Sean Christopherson Date: Wed Jul 15 20:41:14 2020 -0700 KVM: nSVM: Correctly set the shadow NPT root level in its MMU role Move the initialization of shadow NPT MMU's shadow_root_level into kvm_init_shadow_npt_mmu() and explicitly set the level in the shadow NPT MMU's role to be the TDP level. This ensures the role and MMU levels are synchronized and also initialized before __kvm_mmu_new_pgd(), which consumes the level when attempting a fast PGD switch. Cc: Vitaly Kuznetsov Fixes: 9fa72119b24db ("kvm: x86: Introduce kvm_mmu_calc_root_page_role()") Fixes: a506fdd223426 ("KVM: nSVM: implement nested_svm_load_cr3() and use it for host->guest switch") Signed-off-by: Sean Christopherson Message-Id: <20200716034122.5998-2-sean.j.christopherson@intel.com> Reviewed-by: Vitaly Kuznetsov Tested-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit bcb3b2a7639db2412875520cddc3abd179068793 Author: Kathiravan T Date: Thu Jul 30 14:19:23 2020 +0530 regulator: add the sub node names for the MP5496 PMIC MP5496 PMIC is found on IPQ6018 SoC. SMPA2 regulator controls the APSS voltage scaling. Document the sub node name for the same. Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1596098964-19878-3-git-send-email-kathirav@codeaurora.org Signed-off-by: Mark Brown commit 14e5ad7d118997741aa567dfc4398f72762ff08a Merge: d0508b4f16049 a383308e50244 Author: Mark Brown Date: Thu Jul 30 22:54:40 2020 +0100 Merge series "drop unnecessary list_empty" from Julia Lawall : The various list iterators are able to handle an empty list. The only effect of avoiding the loop is not initializing some index variables. Drop list_empty tests in cases where these variables are not used. The semantic patch that makes these changes is as follows: (http://coccinelle.lip6.fr/) @@ expression x,e; iterator name list_for_each_entry; statement S; identifier i; @@ -if (!(list_empty(x))) { list_for_each_entry(i,x,...) S - } ... when != i ? i = e @@ expression x,e; iterator name list_for_each_entry_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_entry_safe(i,j,x,...) S - } ... when != i when != j ( i = e; | ? j = e; ) @@ expression x,e; iterator name list_for_each; statement S; identifier i; @@ -if (!(list_empty(x))) { list_for_each(i,x) S - } ... when != i ? i = e @@ expression x,e; iterator name list_for_each_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_safe(i,j,x) S - } ... when != i when != j ( i = e; | ? j = e; ) // ------------------- @@ expression x,e; statement S; identifier i; @@ -if (!(list_empty(x))) list_for_each_entry(i,x,...) S ... when != i ? i = e @@ expression x,e; statement S; identifier i,j; @@ -if (!(list_empty(x))) list_for_each_entry_safe(i,j,x,...) S ... when != i when != j ( i = e; | ? j = e; ) @@ expression x,e; statement S; identifier i; @@ -if (!(list_empty(x))) list_for_each(i,x) S ... when != i ? i = e @@ expression x,e; statement S; identifier i,j; @@ -if (!(list_empty(x))) list_for_each_safe(i,j,x) S ... when != i when != j ( i = e; | ? j = e; ) --- drivers/media/pci/saa7134/saa7134-core.c | 14 ++--- drivers/media/usb/cx231xx/cx231xx-core.c | 16 ++---- drivers/media/usb/tm6000/tm6000-core.c | 24 +++------- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_matcher.c | 13 ++--- drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c | 5 -- drivers/net/ethernet/sfc/ptp.c | 20 +++----- drivers/net/wireless/ath/dfs_pattern_detector.c | 15 ++---- sound/soc/intel/atom/sst/sst_loader.c | 10 +--- sound/soc/intel/skylake/skl-pcm.c | 8 +-- sound/soc/intel/skylake/skl-topology.c | 5 -- 10 files changed, 53 insertions(+), 77 deletions(-) commit d0508b4f16049a658d68a7c276ba08296c5a76bc Author: Alper Nebi Yasak Date: Tue Jul 21 21:27:10 2020 +0300 ASoC: rk3399_gru_sound: Add DAPM pins, kcontrols for jack detection PulseAudio (and perhaps other userspace utilities) can not detect any jack for rk3399_gru_sound as the driver doesn't expose related Jack kcontrols. This patch adds two DAPM pins to the headset jack, where the snd_soc_card_jack_new() call automatically creates "Headphones Jack" and "Headset Mic Jack" kcontrols from them. With an appropriate ALSA UCM config specifying JackControl fields for the "Headphones" and "Headset" (mic) devices, PulseAudio can detect plug/unplug events for both of them after this patch. Signed-off-by: Alper Nebi Yasak Link: https://lore.kernel.org/r/20200721182709.6895-1-alpernebiyasak@gmail.com Signed-off-by: Mark Brown commit 658bb297e3930b90f80c08ddff18b4065b89a132 Author: Fabio Estevam Date: Fri Jul 17 10:59:59 2020 -0300 ASoC: wm8962: Do not access WM8962_GPIO_BASE According to the WM8962 datasheet, there is no register at address 0x200. WM8962_GPIO_BASE is just a base address for the GPIO registers and not a real register, so remove it from wm8962_readable_register(). Also, Register 515 (WM8962_GPIO_BASE + 3) does not exist, so skip its access. This fixes the following errors: wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 wm8962 0-001a: ASoC: error at soc_component_read_no_lock on wm8962.0-001a: -16 Signed-off-by: Fabio Estevam Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200717135959.19212-1-festevam@gmail.com Signed-off-by: Mark Brown commit afd842c031408f9eaf689ff417071eed15afa05e Author: Julia Lawall Date: Sun Jul 26 10:25:33 2020 +0200 ASoC: SOF: imx: use resource_size Use resource_size rather than a verbose computation on the end and start fields. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ struct resource ptr; @@ - (ptr.end - ptr.start + 1) + resource_size(&ptr) Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1595751933-4952-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit 3c2d19cb8d8f7459635b96e12c477d772508293b Merge: 41d707b7332f1 b328ecc468f8f Author: David S. Miller Date: Thu Jul 30 14:39:31 2020 -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 2020-07-30 Please note that I did the first time now --no-ff merges of my testing branch into the master branch to include the [PATCH 0/n] message of a patchset. Please let me know if this is desirable, or if I should do it any different. 1) Introduce a oseq-may-wrap flag to disable anti-replay protection for manually distributed ICVs as suggested in RFC 4303. From Petr Vaněk. 2) Patchset to fully support IPCOMP for vti4, vti6 and xfrm interfaces. From Xin Long. 3) Switch from a linear list to a hash list for xfrm interface lookups. From Eyal Birger. 4) Fixes to not register one xfrm(6)_tunnel object twice. From Xin Long. 5) Fix two compile errors that were introduced with the IPCOMP support for vti and xfrm interfaces. Also from Xin Long. 6) Make the policy hold queue work with VTI. This was forgotten when VTI was implemented. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit a383308e50244a28fe927b9c1acbe0a963bf186b Author: Julia Lawall Date: Sun Jul 26 12:58:26 2020 +0200 ASoC: Intel: drop unnecessary list_empty list_for_each_entry_safe is able to handle an empty list. The only effect of avoiding the loop is not initializing the index variable. Drop list_empty tests in cases where these variables are not used. Note that list_for_each_entry_safe is defined in terms of list_first_entry, which indicates that it should not be used on an empty list. But in list_for_each_entry_safe, the element obtained by list_first_entry is not really accessed, only the address of its list_head field is compared to the address of the list head, so the list_first_entry is safe. The semantic patch that makes this change is as follows (with another variant for the no brace case): (http://coccinelle.lip6.fr/) @@ expression x,e; iterator name list_for_each_entry_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_entry_safe(i,j,x,...) S - } ... when != i when != j ( i = e; | ? j = e; ) Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1595761112-11003-2-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit 55e32c54bbd5741cad462c9ee00c453c72fa74b9 Author: Eric Biggers Date: Mon Jul 27 10:41:58 2020 -0700 fscrypt: don't load ->i_crypt_info before it's known to be valid In fscrypt_set_bio_crypt_ctx(), ->i_crypt_info isn't known to be non-NULL until we check fscrypt_inode_uses_inline_crypto(). So, load ->i_crypt_info after the check rather than before. This makes no difference currently, but it prevents people from introducing bugs where the pointer is dereferenced when it may be NULL. Suggested-by: Dave Chinner Cc: Satya Tangirala Link: https://lore.kernel.org/r/20200727174158.121456-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 7b149f2bbf8cded435a182fa308066d077926470 Author: Kalyan Thota Date: Thu Jun 25 18:15:53 2020 +0530 drm/msm/dpu: enumerate second cursor pipe for external interface Setup an RGB HW pipe as cursor which can be used on secondary interface. For SC7180 2 HW pipes are enumerated as cursors 1 - primary interface 2 - secondary interface Signed-off-by: Kalyan Thota Signed-off-by: Rob Clark commit ca8199f1349800da375c06299e2c75e407e42bd7 Author: Kalyan Thota Date: Thu Jun 18 19:31:24 2020 +0530 drm/msm/dpu: ensure device suspend happens during PM sleep "The PM core always increments the runtime usage counter before calling the ->suspend() callback and decrements it after calling the ->resume() callback" DPU and DSI are managed as runtime devices. When suspend is triggered, PM core adds a refcount on all the devices and calls device suspend, since usage count is already incremented, runtime suspend was not getting called and it kept the clocks on which resulted in target not entering into XO shutdown. Add changes to force suspend on runtime devices during pm sleep. Changes in v1: - Remove unnecessary checks in the function _dpu_kms_disable_dpu (Rob Clark). Changes in v2: - Avoid using suspend_late to reset the usagecount as suspend_late might not be called during suspend call failures (Doug). Changes in v3: - Use force suspend instead of managing device usage_count via runtime put and get API's to trigger callbacks (Doug). Changes in v4: - Check the return values of pm_runtime_force_suspend and pm_runtime_force_resume API's and pass appropriately (Doug). Changes in v5: - With v4 patch, test cycle has uncovered issues in device resume. On bubs: cmd tx failures were seen as SW is sending panel off commands when the dsi resources are turned off. Upon suspend, DRM driver will issue a NULL composition to the dpu, followed by turning off all the HW blocks. v5 changes will serialize the NULL commit and resource unwinding by handling them under PM prepare and PM complete phases there by ensuring that clks are on when panel off commands are being processed. Changes in v6: - Use drm_mode_config_helper_suspend/resume() instead of legacy API drm_atomic_helper_suspend/resume() (Doug). Trigger runtime callbacks from the suspend/resume call to turn off the resources. Changes in v7: - Add "__maybe_unused" to the functions to avoid compilation failures. Cleanup unnecessary configs (Doug). Signed-off-by: Kalyan Thota Reviewed-by: Douglas Anderson Signed-off-by: Rob Clark commit 08af4769c7d211ff800a143b60855ad7146befc8 Author: Jonathan Marek Date: Mon Jul 13 18:53:42 2020 -0400 drm/msm: handle for EPROBE_DEFER for of_icc_get Check for errors instead of silently not using icc if the msm driver probes before the interconnect driver. Allow ENODATA for ocmem path, as it is optional and this error is returned when "gfx-mem" path is provided but not "ocmem". Because msm_gpu_cleanup assumes msm_gpu_init has been called, the icc path init needs to be after msm_gpu_init for the error path to work. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 0ded520b182e13277e1076f84ca16247eb9bf150 Author: Jonathan Marek Date: Mon Jul 13 18:53:41 2020 -0400 drm/msm: reset devfreq freq_table/max_state before devfreq_add_device These never get set back to 0 when probing fails, so an attempt to probe again results in broken behavior. Fix the problem by setting thse to zero before they are used. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 17e822f7591fb66162aca07685dc0b01468e5480 Author: Jonathan Marek Date: Mon Jul 13 18:53:40 2020 -0400 drm/msm: fix unbalanced pm_runtime_enable in adreno_gpu_{init, cleanup} adreno_gpu_init calls pm_runtime_enable, so adreno_gpu_cleanup needs to call pm_runtime_disable. Signed-off-by: Jonathan Marek Signed-off-by: Rob Clark commit 18641fd9fa5f540007fdf792cd74c3997694872e Author: Huacai Chen Date: Thu Jul 30 16:51:27 2020 +0800 MIPS: DTS: Fix number of msi vectors for Loongson64G HT irqs vectors are 8 groups, each group has 32 irqs, Loongson64C CPUs can use only 4 groups and Loongson64G CPUs can use all 8 groups. So the number of msi vectors of Loongson64G is 192 (32*8 - 64 = 192). Fixes: 24af105962c8004edb9f5bf84 ("MIPS: Loongson64: DeviceTree for LS7A PCH") Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 39473c2cbd6e915abe4dac439f18b770d6ed1c2c Merge: 3d026a8a590f9 d13389849caf0 Author: Mark Brown Date: Thu Jul 30 21:00:38 2020 +0100 Merge series "ASoC: Intel: KMB: TDM Enablement patches" from Michael Sit Wei Hong : This patch series is to enable multiple features on the Keembay Platform Michael Sit Wei Hong (4): ASoC: Intel: KMB: Add 8kHz audio support ASoC: Intel: KMB: Rework disable channel function ASoC: Intel: KMB: Enable TDM audio capture dt-bindings: sound: intel,keembay-i2s: Add channel-max property .../bindings/sound/intel,keembay-i2s.yaml | 8 + sound/soc/intel/keembay/kmb_platform.c | 137 +++++++++++++----- sound/soc/intel/keembay/kmb_platform.h | 1 + 3 files changed, 112 insertions(+), 34 deletions(-) -- 2.17.1 commit 3d026a8a590f9fb657e8aed00bb76dc1e0e37c08 Merge: 4d1976c79946c e44815a295a50 Author: Mark Brown Date: Thu Jul 30 21:00:36 2020 +0100 Merge series "ASoC: meson: tdm fixes" from Jerome Brunet : This patcheset is collection of fixes for the TDM input and output the axg audio architecture. Its fixes: - slave mode format setting - g12 and sm1 skew offset - tdm clock inversion - standard daifmt props names which don't require a specific prefix Jerome Brunet (4): ASoC: meson: axg-tdm-interface: fix link fmt setup ASoC: meson: axg-tdmin: fix g12a skew ASoC: meson: axg-tdm-formatters: fix sclk inversion ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties sound/soc/meson/axg-tdm-formatter.c | 11 ++++++----- sound/soc/meson/axg-tdm-formatter.h | 1 - sound/soc/meson/axg-tdm-interface.c | 26 +++++++++++++++++--------- sound/soc/meson/axg-tdmin.c | 16 +++++++++++++++- sound/soc/meson/axg-tdmout.c | 3 --- sound/soc/meson/meson-card-utils.c | 2 +- 6 files changed, 39 insertions(+), 20 deletions(-) -- 2.25.4 commit 4d1976c79946cdf6ba3b53e26992ea0c0abf03da Author: Kuninori Morimoto Date: Thu Jul 30 13:28:37 2020 +0900 ASoC: dt-bindings: ak4613: switch to yaml base Documentation This patch switches from .txt base to .yaml base Document. Signed-off-by: Kuninori Morimoto Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/87mu4cxlo2.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87o8pf3923.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/873659bpbk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c3936ba9e0e4f472221320c33e20be3a8b795616 Author: Ravulapati Vishnu vardhan rao Date: Tue Jul 28 21:32:55 2020 +0530 ASoC: amd: Added hw_params support for ALC1015 Adding rt1015 hw_params which set Bit-clock ratio, PLL and appropriate sys clk specific with RTK1015. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/20200728160255.31020-6-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit f7b2651b96717f54d666a61aa3fa0b3d4e79d81a Author: Ravulapati Vishnu vardhan rao Date: Tue Jul 28 21:32:54 2020 +0530 ASoC: amd: Adding DAI LINK for rt1015 codec DAI link support for RTK 1015 and providing the codec details depending on the snd_soc_card selected by ACPI ID. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/20200728160255.31020-5-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 414e3cab7d3e60395d23f76acdf95d5d81425b48 Author: Ravulapati Vishnu vardhan rao Date: Tue Jul 28 21:32:53 2020 +0530 ASoC: amd: Adding support for ALC1015 codec in machine driver Adding support for ALC1015 RTK codec in machine driver. Passing specific card structure based on its ACPI ID. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/20200728160255.31020-4-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 0fe4b561f7df6c338c6f4c95ba949fc5abe5c4e5 Author: Ravulapati Vishnu vardhan rao Date: Tue Jul 28 21:32:52 2020 +0530 ASoC: amd: Passing card structure based on codec Passing specific snd_soc_card structure depending on the ACPI ID. In future we can add other IDs in the ACPI table and pass the structure. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/20200728160255.31020-3-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit 9c04b5a48fca1facff07f28ba6d87de900238beb Author: Ravulapati Vishnu vardhan rao Date: Tue Jul 28 21:32:51 2020 +0530 ASoC: amd: Renaming snd-soc-card structure and fields As in future our machine driver supports multiple codecs So changing naming convention of snd_soc_card struct and its fields. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/20200728160255.31020-2-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit fd0ea9cd9698edd8e9dab7dfe86163d00897b000 Author: Simon Shields Date: Tue Jul 28 15:11:10 2020 +0200 ASoC: samsung: Add sound support for Midas boards This patch adds support for voice and BT calls, along with standard audio output via the speaker, earpiece, headphone jack, HDMI, and any accessories compatible with Midas boards. This patch also supports headphone/headset detection and headsets with inline buttons. [m.szyprowski: adaptation to v5.1+ kernels (DAI links initialization)] [s.nawrocki: removal of the clk API calls for CODEC MCLK, the jack data structure moved to struct midas_priv, coding style and typo fixes, conversion to new cpu/codec/dai-node binding] Signed-off-by: Simon Shields Signed-off-by: Marek Szyprowski Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200728131111.14334-2-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit f61d06ae99468e3f02b8af4b464945290c0cf2cc Author: Sylwester Nawrocki Date: Tue Jul 28 15:11:09 2020 +0200 ASoC: samsung: Document DT bindings for Midas sound subsystem This patch adds documentation of DT biding for the Midas sound complex. Partially based on the *txt version by Simon Shields . Signed-off-by: Sylwester Nawrocki Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200728131111.14334-1-s.nawrocki@samsung.com Signed-off-by: Mark Brown commit 982f4a4134893cd48c466e7a56422d7c65837d10 Author: Dan Murphy Date: Thu Jul 30 09:24:19 2020 -0500 ASoC: tlv320adcx140: Move device reset to before programming Reset the device before programming the registers or all programming will be lost as the device resets registers to default settings. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200730142419.28205-2-dmurphy@ti.com Signed-off-by: Mark Brown commit 806a8afedef82c5f156b1c9b1de1205f9abfd21e Author: Dan Murphy Date: Thu Jul 30 09:24:18 2020 -0500 ASoC: tlv320adcx140: Fix GPO register start address The header was updated to align with the data sheet to start the GPO_CFG at GPO_CFG0. The code was not updated to the change and therefore the GPO_CFG0 register was not written to. Fixes: 6617cff6a05e ("ASoC: tlv320adcx140: Add GPO configuration and drive output config") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200730142419.28205-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 048c397aa88b8c6ebbcce8b5c480ae53773f14b9 Author: Frank van der Linden Date: Tue Jul 28 20:17:22 2020 +0000 NFSv4.2: xattr cache: get rid of cache discard work queue Caches should be small enough to discard them inline, so do that instead of using a work queue. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit d13389849caf05d79141d317bdf2f6b318e65f87 Author: Michael Sit Wei Hong Date: Thu Jul 30 13:53:17 2020 +0800 ASoC: Intel: KMB: Rework disable channel function All channels are enabled at boot up, this patch ensures that all channels are disabled at boot and whenever the function is called. Signed-off-by: Michael Sit Wei Hong Reviewed-by: Sia Jee Heng Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200730055319.1522-3-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown commit b81f8df8039e6dca8f9533fe0b549139b907e61f Author: Michael Sit Wei Hong Date: Thu Jul 30 13:53:16 2020 +0800 ASoC: Intel: KMB: Add 8kHz audio support Enable 8kHz audio support for Intel Keem Bay platform. Signed-off-by: Michael Sit Wei Hong Reviewed-by: Sia Jee Heng Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200730055319.1522-2-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown commit 20196e0e3840a36defd79e036d4430c482e3ce8d Merge: 5c74c9d34aec1 0d3f01dcdc234 Author: Mark Brown Date: Thu Jul 30 19:57:10 2020 +0100 Merge series "ASoC: meson: tdm fixes" from Jerome Brunet : This patcheset is collection of fixes for the TDM input and output the axg audio architecture. Its fixes: - slave mode format setting - g12 and sm1 skew offset - tdm clock inversion - standard daifmt props names which don't require a specific prefix Jerome Brunet (4): ASoC: meson: axg-tdm-interface: fix link fmt setup ASoC: meson: axg-tdmin: fix g12a skew ASoC: meson: axg-tdm-formatters: fix sclk inversion ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties sound/soc/meson/axg-tdm-formatter.c | 11 ++++++----- sound/soc/meson/axg-tdm-formatter.h | 1 - sound/soc/meson/axg-tdm-interface.c | 26 +++++++++++++++++--------- sound/soc/meson/axg-tdmin.c | 16 +++++++++++++++- sound/soc/meson/axg-tdmout.c | 3 --- sound/soc/meson/meson-card-utils.c | 2 +- 6 files changed, 39 insertions(+), 20 deletions(-) -- 2.25.4 commit 5c74c9d34aec1ac756de6979dd5580096aba8643 Author: Charles Keepax Date: Thu Jul 30 13:07:14 2020 +0100 ASoC: soc-core: Fix regression causing sysfs entries to disappear The allocation order of things in soc_new_pcm_runtime was changed to move the device_register before the allocation of the rtd structure. This was to allow the rtd allocation to be managed by devm. However currently the sysfs entries are added by device_register and their visibility depends on variables within the rtd structure, this causes the pmdown_time and dapm_widgets sysfs entries to be missing for all rtds. Correct this issue by manually calling device_add_groups after the appropriate information is available. Fixes: d918a37610b1 ("ASoC: soc-core: tidyup soc_new_pcm_runtime() alloc order") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200730120715.637-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit e44815a295a50027a9953f3ef62827d14631b96b Author: Jerome Brunet Date: Wed Jul 29 17:44:56 2020 +0200 ASoC: meson: cards: remove DT_PREFIX for standard daifmt properties Standard dai format property don't need the "amlogic," prefix. There nothing amlogic specific about them. Just remove it. Fixes: 435857e015dc ("ASoC: meson: align axg card driver with DT bindings documentation") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200729154456.1983396-5-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 0d3f01dcdc234001f979a0af0b6b31cb9f25b6c1 Author: Jerome Brunet Date: Wed Jul 29 17:44:55 2020 +0200 ASoC: meson: axg-tdm-formatters: fix sclk inversion After carefully checking, it appears that both tdmout and tdmin require the rising edge of the sclk they get to be synchronized with the frame sync event (which should be a rising edge of lrclk). TDMIN was improperly set before this patch. Remove the sclk_invert quirk which is no longer needed and fix the sclk phase. Fixes: 1a11d88f499c ("ASoC: meson: add tdm formatter base driver") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200729154456.1983396-4-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 80a254394fcfe55450b0351da298ca7231889219 Author: Jerome Brunet Date: Wed Jul 29 17:44:54 2020 +0200 ASoC: meson: axg-tdmin: fix g12a skew After carefully checking the result provided by the TDMIN on the g12a and sm1 SoC families, the TDMIN skew offset appears to be 3 instead of 2 on the axg. Fixes: f01bc67f58fd ("ASoC: meson: axg-tdm-formatter: rework quirks settings") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200729154456.1983396-3-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 6878ba91ce84f7a07887a0615af70f969508839f Author: Jerome Brunet Date: Wed Jul 29 17:44:53 2020 +0200 ASoC: meson: axg-tdm-interface: fix link fmt setup The .set_fmt() callback of the axg tdm interface incorrectly test the content of SND_SOC_DAIFMT_MASTER_MASK as if it was a bitfield, which it is not. Implement the test correctly. Fixes: d60e4f1e4be5 ("ASoC: meson: add tdm interface driver") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200729154456.1983396-2-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 8698fb64cc77bf103ab582970965ae851f5f4d72 Author: Miaohe Lin Date: Mon Jul 20 16:29:14 2020 +0800 igb: use eth_zero_addr() to clear mac address Use eth_zero_addr() to clear mac address instead of memset(). Signed-off-by: Miaohe Lin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 935f73bd51de35fa01f39098e970ecf4405b8593 Author: Miaohe Lin Date: Mon Jul 20 16:27:41 2020 +0800 ixgbe: use eth_zero_addr() to clear mac address Use eth_zero_addr() to clear mac address instead of memset(). Signed-off-by: Miaohe Lin Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 3843aca0521d039efce0240f54b37bea23ba9f16 Author: Zong Li Date: Thu Jul 16 14:15:27 2020 +0800 riscv: fix build warning of mm/pageattr Add hearder for missing prototype. Also, static keyword should be at beginning of declaration. Signed-off-by: Zong Li Reviewed-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit e3ef4d69456e3977117bd11edf0161a9200c1a78 Author: Zong Li Date: Thu Jul 16 14:15:26 2020 +0800 riscv: Fix build warning for mm/init Add static keyword for resource_init, this function is only used in this object file. Signed-off-by: Zong Li Signed-off-by: Palmer Dabbelt commit 79b1feba54558bfb7df7c516dab29a7c9dba093c Author: Atish Patra Date: Wed Jul 15 16:30:06 2020 -0700 RISC-V: Setup exception vector early The trap vector is set only in trap_init which may be too late in some cases. Early ioremap/efi spits many warning messages which may be useful. Setup the trap vector early so that any warning/bug can be handled before generic code invokes trap_init. Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 925ac7b6636b6d6a195e93b2179741d3589f4be1 Author: Emil Renner Berthing Date: Tue Jul 14 23:26:11 2020 +0200 riscv: Select ARCH_HAS_DEBUG_VM_PGTABLE This allows the pgtable tests to be built. Signed-off-by: Emil Renner Berthing Signed-off-by: Palmer Dabbelt commit 89b03cc1dff0654fc01958f3bdd5005c9a510e2e Author: Pekka Enberg Date: Wed Jul 15 08:33:40 2020 +0300 riscv: Use generic pgprot_* macros from The header now defines generic pgprot_ macros also for the no-MMU configuration, so let's use them. Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit 63bb76de4aeec833ae7ba05d85a7819ac4558126 Author: Pekka Enberg Date: Wed Jul 15 08:33:39 2020 +0300 mm: pgtable: Make generic pgprot_* macros available for no-MMU The header defines some generic pgprot_* implementations, but they are only available when CONFIG_MMU is enabled. The RISC-V architecture, for example, therefore defines some of these pgprot_* macros for !NOMMU. Let's make the pgprot_* generic available even for !NOMMU so we can remove the RISC-V specific definitions. Compile-tested with x86 defconfig, and riscv defconfig and !MMU defconfig. Suggested-by: Palmer Dabbelt Reviewed-by: Mike Rapoport Acked-by: David Rientjes Signed-off-by: Pekka Enberg Signed-off-by: Palmer Dabbelt commit 3e7b669c6c5375131db751e6e748af27bab318f6 Author: Guo Ren Date: Sun Jul 12 13:41:49 2020 +0000 riscv: Cleanup unnecessary define in asm-offset.c - TASK_THREAD_SP is duplicated define - TASK_STACK is no use at all - Don't worry about thread_info's offset in task_struct, have a look on comment in include/linux/sched.h: struct task_struct { /* * For reasons of header soup (see current_thread_info()), this * must be the first element of task_struct. */ struct thread_info thread_info; Signed-off-by: Guo Ren Signed-off-by: Palmer Dabbelt commit ebc00dde8a975a543f5e1a7cdac93fef89fefe58 Author: Emil Renner Berthing Date: Tue Jul 14 09:40:44 2020 +0200 riscv: Add jump-label implementation Add jump-label implementation based on the ARM64 version and add CONFIG_JUMP_LABEL=y to the defconfigs. Signed-off-by: Emil Renner Berthing Reviewed-by: Björn Töpel Tested-by: Björn Töpel Signed-off-by: Palmer Dabbelt commit 11a54f422b0d2680be57bbb9f85696ef89d9cda1 Author: Emil Renner Berthing Date: Tue Jul 14 09:40:43 2020 +0200 riscv: Support R_RISCV_ADD64 and R_RISCV_SUB64 relocs These are needed for the __jump_table in modules using static keys/jump-labels with the layout from HAVE_ARCH_JUMP_LABEL_RELATIVE on 64bit kernels. Signed-off-by: Emil Renner Berthing Reviewed-by: Björn Töpel Tested-by: Björn Töpel Signed-off-by: Palmer Dabbelt commit 8e0c02f27253cde5400f7e57b1369690c6e614a0 Author: Alexander A. Klimov Date: Mon Jul 6 00:02:36 2020 +0200 Replace HTTP links with HTTPS ones: RISC-V Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Palmer Dabbelt commit f2c9699f65557a31fed4ddb9e5b4d9489b1bf32f Author: Guo Ren Date: Fri Jul 10 16:19:57 2020 +0000 riscv: Add STACKPROTECTOR supported The -fstack-protector & -fstack-protector-strong features are from gcc. The patch only add basic kernel support to stack-protector feature and some arch could have its own solution such as ARM64_PTR_AUTH. After enabling STACKPROTECTOR and STACKPROTECTOR_STRONG, the .text size is expanded from 0x7de066 to 0x81fb32 (only 5%) to add canary checking code. Signed-off-by: Guo Ren Reviewed-by: Kees Cook Signed-off-by: Palmer Dabbelt commit 08b5985e7be54d15d058191adda2722bd395df32 Author: Tobias Klauser Date: Fri Jul 3 15:49:11 2020 +0200 riscv: Fix typo in asm/hwcap.h uapi header s/userpsace/userspace/ Signed-off-by: Tobias Klauser Signed-off-by: Palmer Dabbelt commit cbb3d91d3bcff7eae3e9c63ffa436fbb4c6c657e Author: Tobias Klauser Date: Sat Jun 27 12:50:50 2020 +0200 riscv: Add kmemleak support Tested using syzkaller in QEMU's riscv64 virt machine. Signed-off-by: Tobias Klauser Signed-off-by: Palmer Dabbelt commit 20d38f7c45a44e4b762b586a7bcacbc93ddb3153 Author: Tobias Klauser Date: Fri Jun 26 14:40:56 2020 +0200 riscv: Allow building with kcov coverage Add ARCH_HAS_KCOV and HAVE_GCC_PLUGINS to the riscv Kconfig. Also disable instrumentation of some early boot code and vdso. Boot-tested on QEMU's riscv64 virt machine. Signed-off-by: Tobias Klauser Acked-by: Dmitry Vyukov Signed-off-by: Palmer Dabbelt commit ed48b297fe211400531a129c592165958d661def Author: Greentime Hu Date: Wed Jun 24 17:03:16 2020 +0800 riscv: Enable context tracking This patch implements and enables context tracking for riscv (which is a prerequisite for CONFIG_NO_HZ_FULL support) It adds checking for previous state in the entry that all excepttions and interrupts goes to and calls context_tracking_user_exit() if it comes from user space. It also calls context_tracking_user_enter() if it will return to user space before restore_all. This patch is tested with the dynticks-testing testcase in qemu-system-riscv64 virt machine and Unleashed board. git://git.kernel.org/pub/scm/linux/kernel/git/frederic/dynticks-testing.git We can see the log here. The tick got mostly stopped during the execution of the user loop. _-----=> irqs-off / _----=> need-resched | / _---=> hardirq/softirq || / _--=> preempt-depth ||| / delay TASK-PID CPU# |||| TIMESTAMP FUNCTION | | | |||| | | -0 [001] d..2 604.183512: sched_switch: prev_comm=swapper/1 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=taskset next_pid=273 next_prio=120 user_loop-273 [001] d.h1 604.184788: hrtimer_expire_entry: hrtimer=000000002eda5fab function=tick_sched_timer now=604176096300 user_loop-273 [001] d.s2 604.184897: workqueue_queue_work: work struct=00000000383402c2 function=vmstat_update workqueue=00000000f36d35d4 req_cpu=1 cpu=1 user_loop-273 [001] dns2 604.185039: tick_stop: success=0 dependency=SCHED user_loop-273 [001] dn.1 604.185103: tick_stop: success=0 dependency=SCHED user_loop-273 [001] d..2 604.185154: sched_switch: prev_comm=taskset prev_pid=273 prev_prio=120 prev_state=R+ ==> next_comm=kworker/1:1 next_pid=46 next_prio=120 <...>-46 [001] .... 604.185194: workqueue_execute_start: work struct 00000000383402c2: function vmstat_update <...>-46 [001] d..2 604.185266: sched_switch: prev_comm=kworker/1:1 prev_pid=46 prev_prio=120 prev_state=I ==> next_comm=taskset next_pid=273 next_prio=120 user_loop-273 [001] d.h1 604.188812: hrtimer_expire_entry: hrtimer=000000002eda5fab function=tick_sched_timer now=604180133400 user_loop-273 [001] d..1 604.189050: tick_stop: success=1 dependency=NONE user_loop-273 [001] d..2 614.251386: sched_switch: prev_comm=user_loop prev_pid=273 prev_prio=120 prev_state=X ==> next_comm=swapper/1 next_pid=0 next_prio=120 -0 [001] d..2 614.315391: sched_switch: prev_comm=swapper/1 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=taskset next_pid=276 next_prio=120 Signed-off-by: Greentime Hu Signed-off-by: Palmer Dabbelt commit 298447928bb1c6bda9ad6f2ce3958d15c329816b Author: Greentime Hu Date: Wed Jun 24 17:03:15 2020 +0800 riscv: Support irq_work via self IPIs Support for arch_irq_work_raise() and arch_irq_work_has_interrupt() was missing from riscv (a prerequisite for FULL_NOHZ). Signed-off-by: Greentime Hu Signed-off-by: Palmer Dabbelt commit 3c46979829824da5af8766d89fa877976bdae884 Author: Guo Ren Date: Sat Jun 27 13:57:08 2020 +0000 riscv: Enable LOCKDEP_SUPPORT & fixup TRACE_IRQFLAGS_SUPPORT Lockdep is needed by proving the spinlocks and rwlocks. To suupport it, we need fixup TRACE_IRQFLAGS_SUPPORT in kernel/entry.S. This patch follow Documentation/irqflags-tracing.txt. Signed-off-by: Guo Ren Signed-off-by: Palmer Dabbelt commit c15959921f8d31bd332c9572650896941bb094c0 Author: Zong Li Date: Sat Jun 27 13:57:07 2020 +0000 riscv: Fixup lockdep_assert_held with wrong param cpu_running The cpu_running is not a lock-class, it lacks the dep_map member in completion. It causes the error as follow: arch/riscv/kernel/smpboot.c: In function '__cpu_up': ./include/linux/lockdep.h:364:52: error: 'struct completion' has no member named 'dep_map' 364 | #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map) | ^~ ./include/asm-generic/bug.h:113:25: note: in definition of macro 'WARN_ON' 113 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ ./include/linux/lockdep.h:390:27: note: in expansion of macro 'lockdep_is_held' 390 | WARN_ON(debug_locks && !lockdep_is_held(l)); \ | ^~~~~~~~~~~~~~~ arch/riscv/kernel/smpboot.c:118:2: note: in expansion of macro 'lockdep_assert_held' 118 | lockdep_assert_held(&cpu_running); There are a lot of archs which use cpu_running in smpboot.c (arm, arm64, openrisc, xtensa, s390, x86, mips), but none of them try lockdep_assert_held(&cpu_running.wait.lock). So Just remove it. Signed-off-by: Zong Li Signed-off-by: Guo Ren Signed-off-by: Palmer Dabbelt commit 6184358da0004c8fd940afda6c0a0fa4027dc911 Author: Guo Ren Date: Sat Jun 27 13:57:06 2020 +0000 riscv: Fixup static_obj() fail When enable LOCKDEP, static_obj() will cause error. Because some __initdata static variables is before _stext: static int static_obj(const void *obj) { unsigned long start = (unsigned long) &_stext, end = (unsigned long) &_end, addr = (unsigned long) obj; /* * static variable? */ if ((addr >= start) && (addr < end)) return 1; [ 0.067192] INFO: trying to register non-static key. [ 0.067325] the code is fine but needs lockdep annotation. [ 0.067449] turning off the locking correctness validator. [ 0.067718] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.7.0-rc7-dirty #44 [ 0.067945] Call Trace: [ 0.068369] [] walk_stackframe+0x0/0xa4 [ 0.068506] [] show_stack+0x2a/0x34 [ 0.068631] [] dump_stack+0x94/0xca [ 0.068757] [] register_lock_class+0x5b8/0x5bc [ 0.068969] [] __lock_acquire+0x6c/0x1d5c [ 0.069101] [] lock_acquire+0xae/0x312 [ 0.069228] [] _raw_spin_lock_irqsave+0x40/0x5a [ 0.069357] [] complete+0x1e/0x50 [ 0.069479] [] rest_init+0x1b0/0x28a [ 0.069660] [] 0xffffffe0000016a2 [ 0.069779] [] 0xffffffe000001b84 [ 0.069953] [] 0xffffffe000001092 static __initdata DECLARE_COMPLETION(kthreadd_done); noinline void __ref rest_init(void) { ... complete(&kthreadd_done); Signed-off-by: Guo Ren Signed-off-by: Palmer Dabbelt commit 12cc923f1ccc1df467e046b02a72c2b3b321b6a2 Author: Romain Perier Date: Sun Sep 29 18:30:13 2019 +0200 tasklet: Introduce new initialization API Nowadays, modern kernel subsystems that use callbacks pass the data structure associated with a given callback as argument to the callback. The tasklet subsystem remains one which passes an arbitrary unsigned long to the callback function. This has several problems: - This keeps an extra field for storing the argument in each tasklet data structure, it bloats the tasklet_struct structure with a redundant .data field - No type checking can be performed on this argument. Instead of using container_of() like other callback subsystems, it forces callbacks to do explicit type cast of the unsigned long argument into the required object type. - Buffer overflows can overwrite the .func and the .data field, so an attacker can easily overwrite the function and its first argument to whatever it wants. Add a new tasklet initialization API, via DECLARE_TASKLET() and tasklet_setup(), which will replace the existing ones. This work is greatly inspired by the timer_struct conversion series, see commit e99e88a9d2b0 ("treewide: setup_timer() -> timer_setup()") To avoid problems with both -Wcast-function-type (which is enabled in the kernel via -Wextra is several subsystems), and with mismatched function prototypes when build with Control Flow Integrity enabled, this adds the "use_callback" member to let the tasklet caller choose which union member to call through. Once all old API uses are removed, this and the .data member will be removed as well. (On 64-bit this does not grow the struct size as the new member fills the hole after atomic_t, which is also "int" sized.) Signed-off-by: Romain Perier Co-developed-by: Allen Pais Signed-off-by: Allen Pais Reviewed-by: Greg Kroah-Hartman Acked-by: Thomas Gleixner Co-developed-by: Kees Cook Signed-off-by: Kees Cook commit b13fecb1c3a603c4b8e99b306fecf4f668c11b32 Author: Kees Cook Date: Mon Jul 13 15:01:26 2020 -0700 treewide: Replace DECLARE_TASKLET() with DECLARE_TASKLET_OLD() This converts all the existing DECLARE_TASKLET() (and ...DISABLED) macros with DECLARE_TASKLET_OLD() in preparation for refactoring the tasklet callback type. All existing DECLARE_TASKLET() users had a "0" data argument, it has been removed here as well. Reviewed-by: Greg Kroah-Hartman Acked-by: Thomas Gleixner Signed-off-by: Kees Cook commit f9dc3713df1229aa8168169e9cf1010fbac68de5 Author: Kees Cook Date: Mon Jul 13 15:01:33 2020 -0700 usb: gadget: udc: Avoid tasklet passing a global There's no reason for the tasklet callback to set an argument since it always uses a global. Instead, use the global directly, in preparation for converting the tasklet subsystem to modern callback conventions. Reviewed-by: Greg Kroah-Hartman Acked-by: Thomas Gleixner Signed-off-by: Kees Cook commit 395f2e8fd340c5bfad026f5968b56ec34cf20dd1 Author: Xi Wang Date: Tue Jul 28 18:42:21 2020 +0800 RDMA/hns: Fix the unneeded process when getting a general type of CQE error If the hns ROCEE reports a general error CQE (types not specified by the IB General Specifications), it's no need to change the QP state to error, and the driver should just skip it. Fixes: 7c044adca272 ("RDMA/hns: Simplify the cqe code of poll cq") Link: https://lore.kernel.org/r/1595932941-40613-8-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 4327bd2c41412657ee2c8c0d8d3d1945268b4238 Author: Lang Cheng Date: Tue Jul 28 18:42:20 2020 +0800 RDMA/hns: Fix error during modify qp RTS2RTS One qp state migrations legal configuration was deleted mistakenly. Fixes: 357f34294686 ("RDMA/hns: Simplify the state judgment code of qp") Link: https://lore.kernel.org/r/1595932941-40613-7-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit a5531e9b70ffa086cfad553be189baf4c2673220 Author: Lang Cheng Date: Tue Jul 28 18:42:19 2020 +0800 RDMA/hns: Delete unnecessary memset when allocating VF resource The hns_roce_cmq_setup_basic_desc() can clear the whole desc, so removes these redundant memset operations. Link: https://lore.kernel.org/r/1595932941-40613-6-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 09a071f52bbedddef626e71c0fd210838532f347 Author: Alexander A. Klimov Date: Thu Jul 23 09:07:20 2020 -0700 Documentation: intel: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Tony Nguyen commit 7ba068d12844e8ad2615aa4c9ffbbf023c46a92c Author: Suraj Upadhyay Date: Wed Jul 15 01:12:13 2020 +0530 ixgbe: Remove unnecessary usages of memset Replace memsets of 1 byte with simple assignment. Issue found with checkpatch.pl Signed-off-by: Suraj Upadhyay Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 90105264a60d39f7a332b7acfe8038c2a01e1ae2 Author: Suraj Upadhyay Date: Wed Jul 15 01:11:47 2020 +0530 igb: Remove unnecessary usages of memset Replace memsets of 1 byte with simple assignment. Issue found with checkpatch.pl Signed-off-by: Suraj Upadhyay Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit c5b369651b582128c0d2aa74b934844270b13050 Author: Suraj Upadhyay Date: Wed Jul 15 01:11:17 2020 +0530 e1000e: Remove unnecessary usages of memset Replace memsets of 1 byte with simple assignments. Issue found with checkpatch.pl Signed-off-by: Suraj Upadhyay Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 4b6bafb9e1d4d1eb16df0942abf455726c88c811 Author: Suraj Upadhyay Date: Wed Jul 15 01:10:35 2020 +0530 e1000: Remove unnecessary usages of memset Replace memsets of 1 byte with simple assignments. Issue reported by checkpatch.pl. Signed-off-by: Suraj Upadhyay Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 69a74aef8a18eef20fb0044b5e164af41b84db21 Author: Vaibhav Gupta Date: Mon Jun 29 14:59:43 2020 +0530 e100: use generic power management With legacy PM hooks, it was the responsibility of a driver to manage PCI states and also the device's power state. The generic approach is to let PCI core handle the work. e100_suspend() calls __e100_shutdown() to perform intermediate tasks. __e100_shutdown() calls pci_save_state() which is not recommended. e100_suspend() also calls __e100_power_off() which is calling PCI helper functions, pci_prepare_to_sleep(), pci_set_power_state(), along with pci_wake_from_d3(...,false). Hence, the functin call is removed and wol is disabled as earlier using device_wakeup_disable(). Compile-tested only. Signed-off-by: Vaibhav Gupta Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 1bf6ece5731db14f1556637494d2048a8bb15a41 Author: Chengming Zhou Date: Thu Jul 30 20:31:04 2020 +0800 iocost_monitor: start from the oldest usage index iocg usage_idx is the latest usage index, we should start from the oldest usage index to show the consecutive NR_USAGE_SLOTS usages. Signed-off-by: Chengming Zhou Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit d9012a59db54442d5b2fcfdfcded35cf566397d3 Author: Chengming Zhou Date: Thu Jul 30 17:03:21 2020 +0800 iocost: Fix check condition of iocg abs_vdebt We shouldn't skip iocg when its abs_vdebt is not zero. Fixes: 0b80f9866e6b ("iocost: protect iocg->abs_vdebt with iocg->waitq.lock") Signed-off-by: Chengming Zhou Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 01cec8c18f5ad9c27eee9f21439072832181039e Author: Pavel Begunkov Date: Thu Jul 30 18:43:50 2020 +0300 io_uring: get rid of atomic FAA for cq_timeouts If ->cq_timeouts modifications are done under ->completion_lock, we don't really nee any fetch-and-add and other complex atomics. Replace it with non-atomic FAA, that saves an implicit full memory barrier. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 4693014340808e7f099e302c1dc40e9d79ff7667 Author: Pavel Begunkov Date: Thu Jul 30 18:43:49 2020 +0300 io_uring: consolidate *_check_overflow accounting Add a helper to mark ctx->{cq,sq}_check_overflow to get rid of duplicates, and it's clearer to check cq_overflow_list directly anyway. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit dd9dfcdf5a603680458f5e7b0d2273c66e5417db Author: Pavel Begunkov Date: Thu Jul 30 18:43:48 2020 +0300 io_uring: fix stalled deferred requests Always do io_commit_cqring() after completing a request, even if it was accounted as overflowed on the CQ side. Failing to do that may lead to not to pushing deferred requests when needed, and so stalling the whole ring. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b2bd1cf99f3e7c8fbf12ea07af2c6998e1209e25 Author: Pavel Begunkov Date: Thu Jul 30 18:43:47 2020 +0300 io_uring: fix racy overflow count reporting All ->cq_overflow modifications should be under completion_lock, otherwise it can report a wrong number to the userspace. Fix it in io_uring_cancel_files(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 81b68a5ca0ab5d92229a7b76332b9ce88bd6dbd1 Author: Pavel Begunkov Date: Thu Jul 30 18:43:46 2020 +0300 io_uring: deduplicate __io_complete_rw() Call __io_complete_rw() in io_iopoll_queue() instead of hand coding it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 010e8e6be2194678f7e4bb3044c088bbee779f57 Author: Pavel Begunkov Date: Thu Jul 30 18:43:45 2020 +0300 io_uring: de-unionise io_kiocb As io_kiocb have enough space, move ->work out of a union. It's safer this way and removes ->work memcpy bouncing. By the way make tabulation in struct io_kiocb consistent. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0de967f24e6c26fca3845e5a5970866ae59ac766 Author: Lukasz Luba Date: Thu Jul 30 17:51:17 2020 +0100 thermal: Update power allocator and devfreq cooling to SPDX licensing Update the license to the SPDX licensing format. Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200730165117.13998-1-lukasz.luba@arm.com commit a7ee88c3d3d19d90d41a2f4e49bb0637cc927572 Merge: 92ed301919932 27a69714450f5 Author: Rafael J. Wysocki Date: Thu Jul 30 18:52:15 2020 +0200 Merge tag 'devfreq-next-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for v5.9 from Chanwoo Choi: 1. Update devfreq core - Add delayed timer support for polling mode. Until now, devfreq supported only deferrable timer to avoid unneeded CPU wakeups. However, it has a problem for non-CPU devices, like DMC, doing DMA. Such devices need to monitor continuously regardless of the CPU state, so delayed timer support for the polling mode to facilitate the continuous monitoring. - Fix indentation of result of devfreq_summary debugfs node. - Fix the wrong end of code with a semicolon instead of a comma. - Clean-up code to use a unified local variable name in sysfs-related internal funcitons. - Fix trivial spelling mistake in devfreq-event.c. 2. Update devfreq drivers - Add the exception handling code to control when rockchip,pmu property is absent for rk3399_dmc.c. - Add missing 'rockchip,pmu' property to dt-binding document for rk3399_dmc.c. - Change the type of timer in exynos5422-dmc.c from deferrable to delayed in order to monitor the DMC (Dynamic Memory Controller) status regardless of the CPU idle state. Also adjust the polling interval and upthreshold value in order to react faster and make better decisions when benchmarking testing for the memory behavior. - Add module parameter to either enable or disable the IRQ mode for DMC behavior monitoring. exynos5422-dmc.c can operate in both the polling and the IRQ mode. The user can choose the monitoring mode via a module param. The default monitoring mode is the polling mode with a delayed timer. 3. Add maintainer entry - Add Dmitry Osipenko as maintainer for memory frequency scaling drivers for Nvidia Tegra. He has developed and reviewed tegra*-devfreq.c. * tag 'devfreq-next-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: Fix the wrong end with semicolon PM / devfreq: Fix indentaion of devfreq_summary debugfs node PM / devfreq: Clean up the devfreq instance name in sysfs attr memory: samsung: exynos5422-dmc: Add module param to control IRQ mode memory: samsung: exynos5422-dmc: Adjust polling interval and uptreshold memory: samsung: exynos5422-dmc: Use delayed timer as default PM / devfreq: Add support delayed timer for polling mode dt-bindings: devfreq: rk3399_dmc: Add rockchip,pmu phandle PM / devfreq: tegra: Add Dmitry as a maintainer PM / devfreq: event: Fix trivial spelling PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent commit de002c55cadfc2f6cdf0ed427526f6085d240238 Author: Rafael J. Wysocki Date: Tue Jul 28 19:09:32 2020 +0200 cpufreq: intel_pstate: Fix EPP setting via sysfs in active mode Because intel_pstate_set_energy_pref_index() reads and writes the MSR_HWP_REQUEST register without using the cached value of it used by intel_pstate_hwp_boost_up() and intel_pstate_hwp_boost_down(), those functions may overwrite the value written by it and so the EPP value set via sysfs may be lost. To avoid that, make intel_pstate_set_energy_pref_index() take the cached value of MSR_HWP_REQUEST just like the other two routines mentioned above and update it with the new EPP value coming from user space in addition to updating the MSR. Note that the MSR itself still needs to be updated too in case hwp_boost is unset or the boosting mechanism is not active at the EPP change time. Fixes: e0efd5be63e8 ("cpufreq: intel_pstate: Add HWP boost utility and sched util hooks") Reported-by: Francisco Jerez Cc: 4.18+ # 4.18+: 3da97d4db8ee cpufreq: intel_pstate: Rearrange ... Signed-off-by: Rafael J. Wysocki Reviewed-by: Francisco Jerez commit 3a9571760665817a269eb8f74749cbc231e7af45 Author: Rafael J. Wysocki Date: Mon Jul 27 17:15:43 2020 +0200 cpufreq: intel_pstate: Rearrange the storing of new EPP values Move the locking away from intel_pstate_set_energy_pref_index() into its only caller and drop the (now redundant) return_pref label from it. Also move the "raw" EPP value check into the caller of that function, so as to do it before acquiring the mutex, and reduce code duplication related to the "raw" EPP values processing somewhat. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Francisco Jerez commit 2e4770a5661a727be1ccb65ebc97baec3fa863a0 Author: Wei Yongjun Date: Tue Jul 21 23:17:35 2020 +0800 PCI: rpadlpar: Make functions static The sparse tool report build warnings as follows: drivers/pci/hotplug/rpadlpar_core.c:355:5: warning: symbol 'dlpar_remove_pci_slot' was not declared. Should it be static? drivers/pci/hotplug/rpadlpar_core.c:461:12: warning: symbol 'rpadlpar_io_init' was not declared. Should it be static? drivers/pci/hotplug/rpadlpar_core.c:473:6: warning: symbol 'rpadlpar_io_exit' was not declared. Should it be static? Those functions are not used outside of this file, so mark them static. Also mark rpadlpar_io_exit() as __exit. Link: https://lore.kernel.org/r/20200721151735.41181-1-weiyongjun1@huawei.com Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Bjorn Helgaas commit bac66317284350176b087ac44b0e4266770a659e Author: Vaibhav Gupta Date: Mon Jun 29 14:59:42 2020 +0530 ixgbevf: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. The driver was invoking PCI helper functions like pci_save/restore_state(), and pci_enable/disable_device(), which is not recommended. Compile-tested only. Signed-off-by: Vaibhav Gupta Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 6f82b25587354ce7c9c42e0b53d8b0770b900847 Author: Vaibhav Gupta Date: Mon Jun 29 14:59:41 2020 +0530 ixgbe: use generic power management With legacy PM hooks, it was the responsibility of a driver to manage PCI states and also the device's power state. The generic approach is to let PCI core handle the work. ixgbe_suspend() calls __ixgbe_shutdown() to perform intermediate tasks. __ixgbe_shutdown() modifies the value of "wake" (device should be wakeup enabled or not), responsible for controlling the flow of legacy PM. Since, PCI core has no idea about the value of "wake", new code for generic PM may produce unexpected results. Thus, use "device_set_wakeup_enable()" to wakeup-enable the device accordingly. Compile-tested only. Signed-off-by: Vaibhav Gupta Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit a472ad2bcea479ba068880125d7273fc95c14b70 Author: Chen Yu Date: Fri Jul 10 12:12:01 2020 +0800 intel_idle: Customize IceLake server support On ICX platform, the C1E auto-promotion is enabled by default. As a result, the CPU might fall into C1E more offen than previous platforms. Besides, the C1E is not exposed to sysfs on ICX, which is inconsistent with previous server platforms. So disable C1E auto-promotion and expose C1E as a separate idle state, so the C1E and C6 can be disabled via sysfs when necessary. Beside C1 and C1E, the exit latency of C6 was measured by a dedicated tool. However the exit latency(41us) exposed by _CST is much smaller than the one we measured(128us). This is probably due to the _CST uses the exit latency when woken up from PC0+C6, rather than PC6+C6 when C6 was measured. Choose the latter as we need the longest latency in theory. Reported-by: kernel test robot Tested-by: Artem Bityutskiy Acked-by: Artem Bityutskiy Reviewed-by: Zhang Rui Signed-off-by: Chen Yu Signed-off-by: Rafael J. Wysocki commit e9c971bdabb0ab008f443a92bcc35a2ccce99256 Author: Vaibhav Gupta Date: Mon Jun 29 14:59:40 2020 +0530 igbvf: use generic power management Remove legacy PM callbacks and use generic operations. With legacy code, drivers were responsible for handling PCI PM operations like pci_save_state(). In generic code, all these are handled by PCI core. The generic suspend() and resume() are called at the same point the legacy ones were called. Thus, it does not affect the normal functioning of the driver. __maybe_unused attribute is used with .resume() but not with .suspend(), as .suspend() is called by .shutdown(). Compile-tested only. Signed-off-by: Vaibhav Gupta Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit bc5cbd73eb493944b8665dc517f684c40eb18a4a Author: Vaibhav Gupta Date: Mon Jun 29 14:59:39 2020 +0530 iavf: use generic power management With the support of generic PM callbacks, drivers no longer need to use legacy .suspend() and .resume() in which they had to maintain PCI states changes and device's power state themselves. The required operations are done by PCI core. PCI drivers are not expected to invoke PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), pci_set_power_state(), etc. Their tasks are completed by PCI core itself. Compile-tested only. Signed-off-by: Vaibhav Gupta Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit f46cf335311c2c414eb3c54e40d22a81e327bc26 Merge: 92ed301919932 06a8a059e88bd Author: Rafael J. Wysocki Date: Thu Jul 30 17:27:46 2020 +0200 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull operating performance points (OPP) framework updates for v5.9 from Viresh Kumar: "This contains following changes: - Fix HTTP links (Alexander A. Klimov). - Allow disabled OPPs in dev_pm_opp_get_freq() (Andrew-sh.Cheng). - Add missing export (Valdis Kletnieks)." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: opp: Allow disabled OPPs in dev_pm_opp_get_freq() opp: ti-opp-supply: Replace HTTP links with HTTPS ones opp: core: Add missing export for dev_pm_opp_adjust_voltage commit dea286bb71baded7d2fb4f090e3b9fd2c1ccac58 Author: Logan Gunthorpe Date: Wed Jul 29 17:18:44 2020 -0600 PCI/P2PDMA: Allow P2PDMA on AMD Zen and newer CPUs Allow P2PDMA if the CPU vendor is AMD and family is 0x17 (Zen) or greater. [bhelgaas: commit log, simplify #if/#else/#endif] Link: https://lore.kernel.org/r/20200729231844.4653-1-logang@deltatee.com Signed-off-by: Logan Gunthorpe Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Deucher Cc: Christian König Cc: Huang Rui commit 16314874b12b451bd5a1df86bcb69745eb487502 Merge: 236a559919c44 022c8328dc802 Author: Marc Zyngier Date: Thu Jul 30 16:13:04 2020 +0100 Merge branch 'kvm-arm64/misc-5.9' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 022c8328dc8021248047b373b9f67790641b8f2d Author: Will Deacon Date: Wed Jul 29 11:28:21 2020 +0100 KVM: arm64: Move S1PTW S2 fault logic out of io_mem_abort() To allow for re-injection of stage-2 faults on stage-1 page-table walks due to either a missing or read-only memslot, move the triage logic out of io_mem_abort() and into kvm_handle_guest_abort(), where these aborts can be handled before anything else. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200729102821.23392-5-will@kernel.org commit 54dc0d2404dd7aa0dd4e4f388a65622b68c6eaff Author: Will Deacon Date: Wed Jul 29 11:28:20 2020 +0100 KVM: arm64: Don't skip cache maintenance for read-only memslots If a guest performs cache maintenance on a read-only memslot, we should inform userspace rather than skip the instruction altogether. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200729102821.23392-4-will@kernel.org commit 84b951a803a5464b0bff2fb1366e96f07f75b066 Author: Will Deacon Date: Wed Jul 29 11:28:19 2020 +0100 KVM: arm64: Handle data and instruction external aborts the same way If the guest generates a synchronous external abort which is not handled by the host, we inject it back into the guest as a virtual SError, but only if the original fault was reported on the data side. Instruction faults are reported as "Unsupported FSC", causing the vCPU run loop to bail with -EFAULT. Although synchronous external aborts from a guest are pretty unusual, treat them the same regardless of whether they are taken as data or instruction aborts by EL2. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200729102821.23392-3-will@kernel.org commit c9a636f29b5f236441ff059cef0b2fe734c05afd Author: Will Deacon Date: Wed Jul 29 11:28:18 2020 +0100 KVM: arm64: Rename kvm_vcpu_dabt_isextabt() kvm_vcpu_dabt_isextabt() is not specific to data aborts and, unlike kvm_vcpu_dabt_issext(), has nothing to do with sign extension. Rename it to 'kvm_vcpu_abt_issea()'. Signed-off-by: Will Deacon Signed-off-by: Marc Zyngier Cc: Marc Zyngier Cc: Quentin Perret Link: https://lore.kernel.org/r/20200729102821.23392-2-will@kernel.org commit 236a559919c44999ae64826fb1743e18ab4bc25c Merge: a394cf6e854d4 bdbc0c7a070c0 Author: Marc Zyngier Date: Thu Jul 30 15:56:49 2020 +0100 Merge branch 'kvm-arm64/el2-obj-v4.1' into kvmarm-master/next Signed-off-by: Marc Zyngier commit eaaa98dedf280afea15ad3552460bf142fecb9af Author: Weihang Li Date: Tue Jul 28 18:42:18 2020 +0800 RDMA/hns: Remove redundant parameters in set_rc_wqe() There are some functions called by set_rc_wqe() use two parameters: "void *wqe" and "struct hns_roce_v2_rc_send_wqe *rc_sq_wqe", but the first one can be got from the second one. So remove the redundant wqe from related functions. Link: https://lore.kernel.org/r/1595932941-40613-5-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit a247fd28c19bdc97530ce147a23266eff9a39786 Author: Lang Cheng Date: Tue Jul 28 18:42:17 2020 +0800 RDMA/hns: Remove support for HIP08_A HIP08_A is an temporary version and all features of it are supported by HIP08_B. So remove the relevant code. Link: https://lore.kernel.org/r/1595932941-40613-4-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit cdc1f3e9465640ceb2cae106732ede0812e15f3a Author: Weihang Li Date: Tue Jul 28 18:42:16 2020 +0800 RDMA/hns: Refactor hns_roce_v2_set_hem() The parts about preparing and sending mailbox to hardware is not strongly related to other codes in hns_roce_v2_set_hem(), and can be encapsulated into a separate function. Link: https://lore.kernel.org/r/1595932941-40613-3-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 57005c96b7cb21f66c4e31446547694eb7f3d894 Author: Lang Cheng Date: Tue Jul 28 18:42:15 2020 +0800 RDMA/hns: Remove redundant hardware opcode definitions HNS_ROCE_SQ_OPCODE_XXXs and HNS_ROCE_V2_WQE_OP_XXXs have same values, so remove a set of redundant definitions. In addition, remove the suffix of HNS_ROCE_V2_WQE_OP_BIND_MW_TYPE. Link: https://lore.kernel.org/r/1595932941-40613-2-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 1ccf2fe35c30f79102ad129c5aa71059daaaed7f Author: Alexander Graf Date: Thu Jul 30 11:44:41 2020 +0200 KVM: arm: Add trace name for ARM_NISV Commit c726200dd106d ("KVM: arm/arm64: Allow reporting non-ISV data aborts to userspace") introduced a mechanism to deflect MMIO traffic the kernel can not handle to user space. For that, it introduced a new exit reason. However, it did not update the trace point array that gives human readable names to these exit reasons inside the trace log. Let's fix that up after the fact, so that trace logs are pretty even when we get user space MMIO traps on ARM. Fixes: c726200dd106d ("KVM: arm/arm64: Allow reporting non-ISV data aborts to userspace") Signed-off-by: Alexander Graf Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200730094441.18231-1-graf@amazon.com commit bdbc0c7a070c0cbe3009cd271c6ec8d87d69cc7a Author: David Brazdil Date: Thu Jul 30 14:25:19 2020 +0100 KVM: arm64: Ensure that all nVHE hyp code is in .hyp.text Some compilers may put a subset of generated functions into '.text.*' ELF sections and the linker may leverage this division to optimize ELF layout. Unfortunately, the recently introduced HYPCOPY command assumes that all executable code (with the exception of specialized sections such as '.hyp.idmap.text') is in the '.text' section. If this assumption is broken, code in '.text.*' will be merged into kernel proper '.text' instead of the '.hyp.text' that is mapped in EL2. To ensure that this cannot happen, insert an OBJDUMP assertion into HYPCOPY. The command dumps a list of ELF sections in the input object file and greps for '.text.'. If found, compilation fails. Tested with both binutils' and LLVM's objdump (the output format is different). GCC offers '-fno-reorder-functions' to disable this behaviour. Select the flag if it is available. From inspection of GCC source (latest Git in July 2020), this flag does force all code into '.text'. By default, GCC uses profile data, heuristics and attributes to select a subsection. LLVM/Clang currently does not have a similar optimization pass. It can place static constructors into '.text.startup' and it's optimizer can be provided with profile data to reorder hot/cold functions. Neither of these is applicable to nVHE hyp code. If this changes in the future, the OBJDUMP assertion should alert users to the problem. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200730132519.48787-1-dbrazdil@google.com commit d947fb4c965cdb7242f3f91124ea16079c49fa8b Author: Gautham R. Shenoy Date: Thu Jul 30 11:02:57 2020 +0530 cpuidle: pseries: Fixup exit latency for CEDE(0) We are currently assuming that CEDE(0) has exit latency 10us, since there is no way for us to query from the platform. However, if the wakeup latency of an Extended CEDE state is smaller than 10us, then we can be sure that the exit latency of CEDE(0) cannot be more than that. In this patch, we fix the exit latency of CEDE(0) if we discover an Extended CEDE state with wakeup latency smaller than 10us. Benchmark results: On POWER8, this patch does not have any impact since the advertized latency of Extended CEDE (1) is 30us which is higher than the default latency of CEDE (0) which is 10us. On POWER9 we see improvement the single-threaded performance of ebizzy, and no regression in the wakeup latency or the number of context-switches. ebizzy: 2 ebizzy threads bound to the same big-core. 25% improvement in the avg records/s with patch. x without_patch * with_patch N Min Max Median Avg Stddev x 10 2491089 5834307 5398375 4244335 1596244.9 * 10 2893813 5834474 5832448 5327281.3 1055941.4 context_switch2: There is no major regression observed with this patch as seen from the context_switch2 benchmark. context_switch2 across CPU0 CPU1 (Both belong to same big-core, but different small cores). We observe a minor 0.14% regression in the number of context-switches (higher is better). x without_patch * with_patch N Min Max Median Avg Stddev x 500 348872 362236 354712 354745.69 2711.827 * 500 349422 361452 353942 354215.4 2576.9258 Difference at 99.0% confidence -530.288 +/- 430.963 -0.149484% +/- 0.121485% (Student's t, pooled s = 2645.24) context_switch2 across CPU0 CPU8 (Different big-cores). We observe a 0.37% improvement in the number of context-switches (higher is better). x without_patch * with_patch N Min Max Median Avg Stddev x 500 287956 294940 288896 288977.23 646.59295 * 500 288300 294646 289582 290064.76 1161.9992 Difference at 99.0% confidence 1087.53 +/- 153.194 0.376337% +/- 0.0530125% (Student's t, pooled s = 940.299) schbench: No major difference could be seen until the 99.9th percentile. Without-patch: Latency percentiles (usec) 50.0th: 29 75.0th: 39 90.0th: 49 95.0th: 59 *99.0th: 13104 99.5th: 14672 99.9th: 15824 min=0, max=17993 With-patch: Latency percentiles (usec) 50.0th: 29 75.0th: 40 90.0th: 50 95.0th: 61 *99.0th: 13648 99.5th: 14768 99.9th: 15664 min=0, max=29812 Signed-off-by: Gautham R. Shenoy [mpe: Minor formatting] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1596087177-30329-4-git-send-email-ego@linux.vnet.ibm.com commit 054e44ba99ae36918631fcbf5f034e466c2f1b73 Author: Gautham R. Shenoy Date: Thu Jul 30 11:02:56 2020 +0530 cpuidle: pseries: Add function to parse extended CEDE records Currently we use CEDE with latency-hint 0 as the only other idle state on a dedicated LPAR apart from the polling "snooze" state. The platform might support additional extended CEDE idle states, which can be discovered through the "ibm,get-system-parameter" rtas-call made with CEDE_LATENCY_TOKEN. This patch adds a function to obtain information about the extended CEDE idle states from the platform and parse the contents to populate an array of extended CEDE states. These idle states thus discovered will be added to the cpuidle framework in the next patch. dmesg on a POWER8 and POWER9 LPAR, demonstrating the output of parsing the extended CEDE latency parameters are as follows POWER8 [ 10.093279] xcede : xcede_record_size = 10 [ 10.093285] xcede : Record 0 : hint = 1, latency = 0x3c00 tb ticks, Wake-on-irq = 1 [ 10.093291] xcede : Record 1 : hint = 2, latency = 0x4e2000 tb ticks, Wake-on-irq = 0 [ 10.093297] cpuidle : Skipping the 2 Extended CEDE idle states POWER9 [ 5.913180] xcede : xcede_record_size = 10 [ 5.913183] xcede : Record 0 : hint = 1, latency = 0x400 tb ticks, Wake-on-irq = 1 [ 5.913188] xcede : Record 1 : hint = 2, latency = 0x3e8000 tb ticks, Wake-on-irq = 0 [ 5.913193] cpuidle : Skipping the 2 Extended CEDE idle states Signed-off-by: Gautham R. Shenoy [mpe: Make space for 16 records, drop memset, minor cleanup & formatting] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1596087177-30329-3-git-send-email-ego@linux.vnet.ibm.com commit 3af0ada7dd98c6da35c1fd7f107af3b9aa5e904c Author: Gautham R. Shenoy Date: Thu Jul 30 11:02:55 2020 +0530 cpuidle: pseries: Set the latency-hint before entering CEDE As per the PAPR, each H_CEDE call is associated with a latency-hint to be passed in the VPA field "cede_latency_hint". The CEDE states that we were implicitly entering so far is CEDE with latency-hint = 0. This patch explicitly sets the latency hint corresponding to the CEDE state that we are currently entering. While at it, we save the previous hint, to be restored once we wakeup from CEDE. This will be required in the future when we expose extended-cede states through the cpuidle framework, where each of them will have a different cede-latency hint. Signed-off-by: Gautham R. Shenoy [mpe: Make cede_latency_hint static] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1596087177-30329-2-git-send-email-ego@linux.vnet.ibm.com commit dfa03fff86027e58c8dba5c03ae68150d4e513ad Author: Sandipan Das Date: Thu Jul 30 10:38:46 2020 +0530 selftests/powerpc: Fix online CPU selection The size of the CPU affinity mask must be large enough for systems with a very large number of CPUs. Otherwise, tests which try to determine the first online CPU by calling sched_getaffinity() will fail. This makes sure that the size of the allocated affinity mask is dependent on the number of CPUs as reported by get_nprocs_conf(). Fixes: 3752e453f6ba ("selftests/powerpc: Add tests of PMU EBBs") Reported-by: Shirisha Ganta Signed-off-by: Sandipan Das Reviewed-by: Kamalesh Babulal Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a408c4b8e9a23bb39b539417a21eb0ff47bb5127.1596084858.git.sandipan@linux.ibm.com commit d3a133aa0e029e0bbb67170f5f18c8fcd4701370 Author: Michal Suchanek Date: Mon Apr 6 23:00:22 2020 +0200 powerpc/perf: Consolidate perf_callchain_user_[64|32]() perf_callchain_user_64() and perf_callchain_user_32() are nearly identical. Consolidate into one function with thin wrappers. Suggested-by: Nicholas Piggin Signed-off-by: Michal Suchanek [mpe: Adapt to copy_from_user_nofault(), minor formatting] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200406210022.32265-1-msuchanek@suse.de commit a0ff72f9f5a780341e7ff5e9ba50a0dad5fa1980 Author: Nathan Lynch Date: Thu Sep 19 18:16:33 2019 -0500 powerpc/pseries/hotplug-cpu: Remove double free in error path In the unlikely event that the device tree lacks a /cpus node, find_dlpar_cpus_to_add() oddly frees the cpu_drcs buffer it has been passed before returning an error. Its only caller also frees the buffer on error. Remove the less conventional kfree() of a caller-supplied buffer from find_dlpar_cpus_to_add(). Fixes: 90edf184b9b7 ("powerpc/pseries: Add CPU dlpar add functionality") Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190919231633.1344-1-nathanl@linux.ibm.com commit 5d8b1f9dea17b4bf5e5f088f39eeab32c7e487be Author: Nathan Lynch Date: Thu Jun 27 00:30:44 2019 -0500 powerpc/pseries/mobility: Add pr_debug() for device tree changes When investigating issues with partition migration or resource reassignments it is helpful to have a log of which nodes and properties in the device tree have changed. Use pr_debug() so it's easy to enable these at runtime with the dynamic debug facility. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190627053044.9238-3-nathanl@linux.ibm.com commit 494a66f34e00b6a1897b5a1ab150a19265696b17 Author: Nathan Lynch Date: Thu Jun 27 00:30:43 2019 -0500 powerpc/pseries/mobility: Set pr_fmt() The pr_err() callsites in mobility.c already manually include a "mobility:" prefix, let's make it official for the benefit of messages to be added later. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190627053044.9238-2-nathanl@linux.ibm.com commit 6ec54363f198aae9c1343f82ff5b865546944a73 Author: Nathan Lynch Date: Thu Jun 27 00:15:37 2019 -0500 powerpc/cacheinfo: Warn if cache object chain becomes unordered This can catch cases where the device tree has gotten mishandled into an inconsistent state at runtime, e.g. the cache nodes for both the source and the destination are present after a migration. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190627051537.7298-5-nathanl@linux.ibm.com commit 1b3da8ffaa158e9a95c19b17c14d7259d58bc0cd Author: Nathan Lynch Date: Thu Jun 27 00:15:36 2019 -0500 powerpc/cacheinfo: Improve diagnostics about malformed cache lists If we have a bug which causes us to start with the wrong kind of OF node when linking up the cache tree, it's helpful for debugging to print information about what we found vs what we expected. So replace uses of WARN_ON_ONCE with WARN_ONCE, which lets us include an informative message instead of a contentless backtrace. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190627051537.7298-4-nathanl@linux.ibm.com commit be6f885e97e9304541057fbf25148685847ef310 Author: Nathan Lynch Date: Thu Jun 27 00:15:35 2019 -0500 powerpc/cacheinfo: Use name@unit instead of full DT path in debug messages We know that every OF node we deal with in this code is under /cpus, so we can make the debug messages a little less verbose without losing information. E.g. cacheinfo: creating L1 dcache and icache for /cpus/PowerPC,POWER8@0 cacheinfo: creating L2 ucache for /cpus/l2-cache@2006 cacheinfo: creating L3 ucache for /cpus/l3-cache@3106 becomes cacheinfo: creating L1 dcache and icache for PowerPC,POWER8@0 cacheinfo: creating L2 ucache for l2-cache@2006 cacheinfo: creating L3 ucache for l3-cache@3106 Replace all '%pOF' specifiers with '%pOFP'. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190627051537.7298-3-nathanl@linux.ibm.com commit c4885bbb3afee80f41d39a33e49881a18e500f47 Author: Pingfan Liu Date: Fri Jul 10 22:04:12 2020 +0800 arm64/mm: save memory access in check_and_switch_context() fast switch path On arm64, smp_processor_id() reads a per-cpu `cpu_number` variable, using the per-cpu offset stored in the tpidr_el1 system register. In some cases we generate a per-cpu address with a sequence like: cpu_ptr = &per_cpu(ptr, smp_processor_id()); Which potentially incurs a cache miss for both `cpu_number` and the in-memory `__per_cpu_offset` array. This can be written more optimally as: cpu_ptr = this_cpu_ptr(ptr); Which only needs the offset from tpidr_el1, and does not need to load from memory. The following two test cases show a small performance improvement measured on a 46-cpus qualcomm machine with 5.8.0-rc4 kernel. Test 1: (about 0.3% improvement) #cat b.sh make clean && make all -j138 #perf stat --repeat 10 --null --sync sh b.sh - before this patch Performance counter stats for 'sh b.sh' (10 runs): 298.62 +- 1.86 seconds time elapsed ( +- 0.62% ) - after this patch Performance counter stats for 'sh b.sh' (10 runs): 297.734 +- 0.954 seconds time elapsed ( +- 0.32% ) Test 2: (about 1.69% improvement) 'perf stat -r 10 perf bench sched messaging' Then sum the total time of 'sched/messaging' by manual. - before this patch total 0.707 sec for 10 times - after this patch totol 0.695 sec for 10 times Signed-off-by: Pingfan Liu Acked-by: Mark Rutland Cc: Will Deacon Cc: Steve Capper Cc: Mark Rutland Cc: Vladimir Murzin Cc: Jean-Philippe Brucker Link: https://lore.kernel.org/r/1594389852-19949-1-git-send-email-kernelfans@gmail.com Signed-off-by: Catalin Marinas commit ac62460c24126eb2442e3653a266ebbf05b004d8 Author: Huacai Chen Date: Thu Jul 30 16:51:30 2020 +0800 irqchip/loongson-pch-pic: Fix the misused irq flow handler Loongson PCH PIC is a standard level triggered PIC, and it need to clear interrupt during unmask. Fixes: ef8c01eb64ca6719da449dab0 ("irqchip: Add Loongson PCH PIC controller") Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Tested-by: Jiaxun Yang Link: https://lore.kernel.org/r/1596099090-23516-6-git-send-email-chenhc@lemote.com commit c47e388cfc648421bd821f5d9fda9e76eefe29cd Author: Huacai Chen Date: Thu Jul 30 16:51:29 2020 +0800 irqchip/loongson-htvec: Support 8 groups of HT vectors The original version can only used by old Loongson-3 which only use 4 groups of HT vectors. Now Loongson-3A R4 can use 8 groups, so improve the driver to support all 8 groups. Fixes: 818e915fbac518e8c78e1877a ("irqchip: Add Loongson HyperTransport Vector support") Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Reviewed-by: Jiaxun Yang Link: https://lore.kernel.org/r/1596099090-23516-5-git-send-email-chenhc@lemote.com commit c9c73a05413ea4a465cae1cb3593b01b190a233f Author: Huacai Chen Date: Thu Jul 30 16:51:28 2020 +0800 irqchip/loongson-liointc: Fix misuse of gc->mask_cache In gc->mask_cache bits, 1 means enabled and 0 means disabled, but in the loongson-liointc driver mask_cache is misused by reverting its meaning. This patch fix the bug and update the comments as well. Fixes: dbb152267908c4b2c3639492a ("irqchip: Add driver for Loongson I/O Local Interrupt Controller") Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Reviewed-by: Jiaxun Yang Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1596099090-23516-4-git-send-email-chenhc@lemote.com commit 8fea4b2e804ab8ff93bd0d67a3dadee1d1a3e24f Author: Huacai Chen Date: Thu Jul 30 16:51:26 2020 +0800 dt-bindings: interrupt-controller: Update Loongson HTVEC description Loongson HTVEC support 8 parents interrupts in maximum, so update the maxItems description. Signed-off-by: Huacai Chen Signed-off-by: Marc Zyngier Reviewed-by: Jiaxun Yang Link: https://lore.kernel.org/r/1596099090-23516-2-git-send-email-chenhc@lemote.com commit c0001213d195d1bac83e0744c06ff06dd5a8ba53 Author: Felix Kuehling Date: Tue Jul 28 14:27:04 2020 -0400 drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access VMAs with a pg_offs that's offset from the start of the vma_node need to adjust the offset within the BO accordingly. This matches the offset calculation in ttm_bo_vm_fault_reserved. Signed-off-by: Felix Kuehling Tested-by: Laurent Morichetti Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/381169/ commit 1a9ea25d1874ca457a596738b40fa4f3bec6fc8f Author: Randy Dunlap Date: Sat Jul 25 17:32:07 2020 -0700 arm64: sigcontext.h: delete duplicated word Drop the repeated word "the". Signed-off-by: Randy Dunlap Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20200726003207.20253-4-rdunlap@infradead.org Signed-off-by: Catalin Marinas commit c4b5abba008399dc4450ab6f62b2deb5acd3697e Author: Randy Dunlap Date: Sat Jul 25 17:32:06 2020 -0700 arm64: ptrace.h: delete duplicated word Drop the repeated word "the". Signed-off-by: Randy Dunlap Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20200726003207.20253-3-rdunlap@infradead.org Signed-off-by: Catalin Marinas commit c4334d576cf420a7d0f4349ce0b0a8ed0de3938f Author: Randy Dunlap Date: Sat Jul 25 17:32:05 2020 -0700 arm64: pgtable-hwdef.h: delete duplicated words Drop the repeated words "at" and "the". Signed-off-by: Randy Dunlap Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20200726003207.20253-2-rdunlap@infradead.org Signed-off-by: Catalin Marinas commit f3020b8891b890b48d9e1a83241e3cce518427c1 Author: Thomas Gleixner Date: Thu Jul 30 09:19:01 2020 +0200 x86/kvm: Use __xfer_to_guest_mode_work_pending() in kvm_run_vcpu() The comments explicitely explain that the work flags check and handling in kvm_run_vcpu() is done with preemption and interrupts enabled as KVM invokes the check again right before entering guest mode with interrupts disabled which guarantees that the work flags are observed and handled before VMENTER. Nevertheless the flag pending check in kvm_run_vcpu() uses the helper variant which requires interrupts to be disabled triggering an instant lockdep splat. This was caught in testing before and then not fixed up in the patch before applying. :( Use the relaxed and intentionally racy __xfer_to_guest_mode_work_pending() instead. Fixes: 72c3c0fe54a3 ("x86/kvm: Use generic xfer to guest work function") Reported-by: Qian Cai writes: Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/87bljxa2sa.fsf@nanos.tec.linutronix.de commit 119e521a9633862ec2ddf5c9d908bc167d6f0433 Author: Jiri Olsa Date: Sun Jul 19 20:13:20 2020 +0200 perf metric: Rename group_list to metric_list Following the previous change that rename egroup to metric, there's no reason to call the list 'group_list' anymore, renaming it to metric_list. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-20-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a0c05b363827461a5762065c1c0f348c8ce6aa13 Author: Jiri Olsa Date: Sun Jul 19 20:13:19 2020 +0200 perf metric: Rename struct egroup to metric Renaming struct egroup to metric, because it seems to make more sense. Plus renaming all the variables that hold egroup to appropriate names. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-19-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit dfce77c580e02c19efacfe9110261c935d1ddb60 Author: Jiri Olsa Date: Sun Jul 19 20:13:18 2020 +0200 perf metric: Add metric group test Adding test for metric group plus compute_metric_group function to get metrics values within the group. Committer notes: Fixed this; tests/parse-metric.c:327:7: error: missing field 'val' initializer [-Werror,-Wmissing-field-initializers] { 0 }, ^ Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-18-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b81ef466ace6bf9bfd7e63a4c2bc89721ee0d495 Author: Jiri Olsa Date: Sun Jul 19 20:13:17 2020 +0200 perf metric: Make compute_single function more precise So far compute_single function relies on the fact, that there's only single metric defined within evlist in all tests. In following patch we will add test for metric group, so we need to be able to compute metric by given name. Adding the name argument to compute_single and iterating evlist and evsel's expression to find the given metric. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: John Garry Cc: Kajol Jain Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-17-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f6fb0960f920e3040088992f32bbceded7a74322 Author: Jiri Olsa Date: Sun Jul 19 20:13:16 2020 +0200 perf metric: Add recursion check when processing nested metrics Keeping the stack of nested metrics via 'struct expr_id' objects and checking if we are in recursion via already processed metric. The stack is implemented as static array within the struct egroup with 100 entries, which should be enough nesting depth for any metric we have or plan to have at the moment. Adding test that simulates the recursion and checks we can detect it. Committer notes: Bumped RECURSION_ID_MAX to 1000 as per Jiri's reply to Paul Clark on the patch series e-mail discussion. Fixed these: tests/parse-metric.c:308:7: error: missing field 'val' initializer [-Werror,-Wmissing-field-initializers] { 0 }, ^ util/metricgroup.c:924:28: error: missing field 'parent' initializer [-Werror,-Wmissing-field-initializers] struct expr_ids ids = { 0 }; ^ util/metricgroup.c:924:26: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] struct expr_ids ids = { 0 }; ^ {} util/metricgroup.c:924:26: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] struct expr_ids ids = { 0 }; ^ {} util/metricgroup.c:924:28: error: missing field 'cnt' initializer [-Werror,-Wmissing-field-initializers] struct expr_ids ids = { 0 }; ^ Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-16-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5a606f3b9c85ea024a8071765a523c85df93c454 Author: Jiri Olsa Date: Sun Jul 19 20:13:15 2020 +0200 perf metric: Add DCache_L2 to metric parse test Adding test that compute DCache_L2 metrics with other related metrics in it. Committer notes: Fixed up this: tests/parse-metric.c:285:7: error: missing field 'val' initializer [-Werror,-Wmissing-field-initializers] { 0 }, ^ Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-15-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 55f30d68397df7d67367a0643d9dea7cbbcda061 Author: Jiri Olsa Date: Sun Jul 19 20:13:14 2020 +0200 perf metric: Add cache_miss_cycles to metric parse test Adding test that compute metric with other metrics in it. cache_miss_cycles = metric:dcache_miss_cpi + metric:icache_miss_cycles Committer notes: Fixed up initializer to cope with: tests/parse-metric.c:242:7: error: missing field 'val' initializer [-Werror,-Wmissing-field-initializers] { 0 }, Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-14-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 98461d9dc115a2ef555ad114866e8acdc6377aaa Author: Jiri Olsa Date: Sun Jul 19 20:13:13 2020 +0200 perf metric: Add events for the current list There's no need to iterate the whole list of groups, when adding new events. The currently created groups are the ones we want to add. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-13-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit acf71b05d1a19726594a8436ba9d8af871941e6c Author: Jiri Olsa Date: Sun Jul 19 20:13:12 2020 +0200 perf metric: Compute referenced metrics Adding computation (expr__parse call) of referenced metric at the point when it needs to be resolved during the parent metric computation. Once the inner metric is computed, the result is stored and used if there's another usage of that metric. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-12-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fc393839c11bbe2c7f1a44ab34e5f2a219d8366e Author: Jiri Olsa Date: Sun Jul 19 20:13:11 2020 +0200 perf metric: Add referenced metrics to hash data Adding referenced metrics to the parsing context so they can be resolved during the metric processing. Adding expr__add_ref function to store referenced metrics into parse context. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-11-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4ea2896715e6743ea79426106f3d078d78a80f9f Author: Jiri Olsa Date: Sun Jul 19 20:13:10 2020 +0200 perf metric: Collect referenced metrics in struct metric_expr Add referenced metrics into struct metric_expr object, so they are accessible when computing the metric. Storing just name and expression itself, so the metric can be resolved and computed. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 83de0b7d535deeffcbea2f1c3defce912e0206a7 Author: Jiri Olsa Date: Sun Jul 19 20:13:09 2020 +0200 perf metric: Collect referenced metrics in struct metric_ref_node Collecting referenced metrics in struct metric_ref_node object, so we can process them later on. The change will parse nested metric names out of expression and 'resolve' them. All referenced metrics are dissolved into one context, meaning all nested metrics events and added to the parent context. Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e7e1badd80282ff7ee07a5176f0620f57c798934 Author: Jiri Olsa Date: Sun Jul 19 20:13:08 2020 +0200 perf metric: Rename __metricgroup__add_metric to __add_metric Renaming __metricgroup__add_metric to __add_metric to fit in the current function names. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a29c164aa3163f8ffbc36db3e57296eff95a8087 Author: Jiri Olsa Date: Sun Jul 19 20:13:07 2020 +0200 perf metric: Add add_metric function Decouple metric adding logging into add_metric function, so it can be used from other places in following changes. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ce39194034008e6736646efb52230627972f1049 Author: Jiri Olsa Date: Sun Jul 19 20:13:06 2020 +0200 perf metric: Add macros for iterating map events Adding following macros to iterate events and metric: map_for_each_event(__pe, __idx, __map) - iterates over all pmu_events_map events map_for_each_metric(__pe, __idx, __map, __metric) - iterates over all metrics that match __metric argument and use it in metricgroup__add_metric function. Macros will be be used from other places in following changes. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3fd29fa6c1644026ec7adbe017cacdf03724e6bc Author: Jiri Olsa Date: Sun Jul 19 20:13:05 2020 +0200 perf metric: Add expr__del_id function Adding expr__del_id function to remove ID from hashmap. It will save us few lines in following changes. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 5c5f5e835f7e40e74f4a8370abb32647b11c3366 Author: Jiri Olsa Date: Sun Jul 19 20:13:04 2020 +0200 perf metric: Change expr__get_id to return struct expr_id_data Changing expr__get_id to use and return struct expr_id_data pointer as value for the ID. This way we can access data other than value for given ID in following changes. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 332603c2aa1a3be92720343269e670f8118a8831 Author: Jiri Olsa Date: Sun Jul 19 20:13:03 2020 +0200 perf metric: Add expr__add_id function Add the expr__add_id() function to data for ID with zero value, which is used when scanning the expression for IDs. Signed-off-by: Jiri Olsa Reviewed-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 60e10c0037d0159f886c8592b761ee31ab3b7e21 Author: Jiri Olsa Date: Sun Jul 19 20:13:02 2020 +0200 perf metric: Fix memory leak in expr__add_id function Arnaldo found that we don't release value data in case the hashmap__set fails. Releasing it in case of an error. Reported-by: Arnaldo Carvalho de Melo Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Kajol Jain Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200719181320.785305-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1b98c6e3ba8be09a2f988dc4b80de9b4b029b93f Author: Ian Rogers Date: Tue Jul 28 01:57:32 2020 -0700 perf test: Ensure sample_period is set libpfm4 events Test that a command line option doesn't override the period set on a libpfm4 event. Without libpfm4 test passes as unsupported. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andi Kleen Cc: Andrii Nakryiko Cc: Athira Jajeev Cc: Daniel Borkmann Cc: Jiri Olsa Cc: John Fastabend Cc: KP Singh Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20200728085734.609930-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 4929e95a1400e45b4b5a87fd3ce10273444187d4 Author: Jiri Olsa Date: Sun Jul 26 09:52:44 2020 +0200 perf tools: Fix term parsing for raw syntax Jin Yao reported issue with possible conflict between raw events and term values in pmu event syntax. Currently following syntax is resolved as raw event with 0xead value: uncore_imc_free_running/read/ instead of using 'read' term from uncore_imc_free_running pmu, because 'read' is correct raw event syntax with 0xead value. To solve this issue we do following: - check existing terms during rXXXX syntax processing and make them priority in case of conflict - allow pmu/r0x1234/ syntax to be able to specify conflicting raw event (implemented in previous patch) Also add automated tests for this and perf_pmu__parse_cleanup call to parse_events_terms, so the test gets properly cleaned up. Fixes: 3a6c51e4d66c ("perf parser: Add support to specify rXXX event with pmu") Reported-by: Jin Yao Signed-off-by: Jiri Olsa Tested-by: Jin Yao Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Richter Link: http://lore.kernel.org/lkml/20200726075244.1191481-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit c33cdf541181fae3dbcfbd79e40b11b0efe8c3d8 Author: Jiri Olsa Date: Sat Jul 25 14:19:58 2020 +0200 perf tools: Allow r0x event syntax Add support to specify raw event with 'r0' syntax within pmu term syntax like: -e cpu/r0xdead/ It will be used to specify raw events in cases where they conflict with real pmu terms, like 'read', which is valid raw event syntax, but also a possible pmu term name as reported by Jin Yao. Reported-by: Jin Yao Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Richter Link: http://lore.kernel.org/lkml/20200725121959.1181869-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 34ec58b9fd1c0a353892e962fb0d4834d0d7283d Author: Abhishek Pandit-Subedi Date: Wed Jul 29 16:17:43 2020 -0700 Revert "Bluetooth: btusb: Disable runtime suspend on Realtek devices" This reverts commit 7ecacafc240638148567742cca41aa7144b4fe1e. Testing this change on a board with RTL8822CE, I found that enabling autosuspend has no effect on the stability of the system. The board continued working after autosuspend, suspend and reboot. The original commit makes it impossible to enable autosuspend on working systems so it should be reverted. Disabling autosuspend should be done via module param or udev in userspace instead. Signed-off-by: Abhishek Pandit-Subedi Acked-by: Kai-Heng Feng Signed-off-by: Marcel Holtmann commit 6ced5ff0be8e94871ba846dfbddf69d21363f3d7 Author: Rayagonda Kokatanur Date: Fri Jul 17 21:46:06 2020 -0700 pwm: bcm-iproc: handle clk_get_rate() return Handle clk_get_rate() returning 0 to avoid possible division by zero. Fixes: daa5abc41c80 ("pwm: Add support for Broadcom iProc PWM controller") Signed-off-by: Rayagonda Kokatanur Signed-off-by: Scott Branden Reviewed-by: Ray Jui Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 216a094de2521099e4ae04c5d07d8603ef9b24f1 Author: Alexander A. Klimov Date: Wed Jul 8 19:59:24 2020 +0200 pwm: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit dfd9b6154d5df4160f2c196d54dcf9223a7df959 Author: Lee Jones Date: Mon Jun 29 13:47:52 2020 +0100 pwm: omap-dmtimer: Repair pwm_omap_dmtimer_chip's broken kerneldoc header Argument descriptions must be prepended with a '@' to be understood by the kerneldoc tooling/parsers/validators. Fixes the following W=1 warning: drivers/pwm/pwm-omap-dmtimer.c:70: warning: Function parameter or member 'dm_timer_pdev' not described in 'pwm_omap_dmtimer_chip' Cc: Tony Lindgren Cc: Joachim Eastwood Cc: NeilBrown Cc: Grant Erickson Signed-off-by: Lee Jones Signed-off-by: Thierry Reding commit fc810e7c7918416668d8801593c3e108db2da3d4 Author: Lee Jones Date: Mon Jun 29 13:47:51 2020 +0100 pwm: mediatek: Provide missing kerneldoc description for 'soc' arg Kerneldoc syntax is used, but not complete. Descriptions are required for all arguments. Fixes the following W=1 build warning: drivers/pwm/pwm-mediatek.c:57: warning: Function parameter or member 'soc' not described in 'pwm_mediatek_chip' Cc: Matthias Brugger Cc: John Crispin Cc: Zhi Mao Cc: linux-pwm@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 75de72591aa8ffa3acdc14cc1d3708ce8ac09245 Author: Lee Jones Date: Mon Jun 29 13:47:50 2020 +0100 pwm: bcm-kona: Remove impossible comparison when validating duty cycle 'dc' here is an unsigned long, thus checking for <0 will always evaluate to false. Fixes the following W=1 warning: drivers/pwm/pwm-bcm-kona.c:141:35: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-pwm@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Thierry Reding commit 9443f2c88ad916cad7efcd40fabc3e8c33c98594 Author: Lee Jones Date: Mon Jun 29 13:47:49 2020 +0100 pwm: bcm-iproc: Remove impossible comparison when validating duty cycle 'duty' here is an unsigned int, thus checking for <0 will always evaluate to false. Fixes the following W=1 warning: drivers/pwm/pwm-bcm-iproc.c:147:12: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Cc: Ray Jui Cc: Scott Branden Cc: Yendapally Reddy Dhananjaya Reddy Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-pwm@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Thierry Reding commit cbbdfa6f331980c6786b4ca5df53c37b90df3246 Author: Sathish Narasimman Date: Thu Jul 23 18:09:03 2020 +0530 Bluetooth: Enable controller RPA resolution using Experimental feature This patch adds support to enable the use of RPA Address resolution using expermental feature mgmt command. Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann commit 27a69714450f5c9288cec2b20f1ae4f7ad34dacf Author: Chanwoo Choi Date: Mon Jul 27 11:32:31 2020 +0900 PM / devfreq: Fix the wrong end with semicolon Fix the wrong grammar at the end of code line by using semicolon. Cc: stable vger.kernel.org Fixes: 490a421bc575 ("PM / devfreq: Add debugfs support with devfreq_summary file") Signed-off-by: Chanwoo Choi commit 0aae11bcdefb4894b6100656ad24cbd85ff34b52 Author: Chanwoo Choi Date: Thu Jul 9 15:51:34 2020 +0900 PM / devfreq: Fix indentaion of devfreq_summary debugfs node The commit 66d0e797bf09 ("Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"") roll back the device name from 'devfreqX' to device name explained in DT. After applied commit 66d0e797bf09, the indentation of devfreq_summary debugfs node was broken. So, fix indentaion of devfreq_summary debugfs node as following: For example on Exynos5422-based Odroid-XU3 board, $ cat /sys/kernel/debug/devfreq/devfreq_summary dev parent_dev governor polling_ms cur_freq_Hz min_freq_Hz max_freq_Hz ------------------------------ ------------------------------ --------------- ---------- ------------ ------------ ------------ 10c20000.memory-controller null simple_ondemand 0 413000000 165000000 825000000 soc:bus_wcore null simple_ondemand 50 88700000 88700000 532000000 soc:bus_noc soc:bus_wcore passive 0 66600000 66600000 111000000 soc:bus_fsys_apb soc:bus_wcore passive 0 111000000 111000000 222000000 soc:bus_fsys soc:bus_wcore passive 0 75000000 75000000 200000000 soc:bus_fsys2 soc:bus_wcore passive 0 75000000 75000000 200000000 soc:bus_mfc soc:bus_wcore passive 0 83250000 83250000 333000000 soc:bus_gen soc:bus_wcore passive 0 88700000 88700000 266000000 soc:bus_peri soc:bus_wcore passive 0 66600000 66600000 66600000 soc:bus_g2d soc:bus_wcore passive 0 83250000 83250000 333000000 soc:bus_g2d_acp soc:bus_wcore passive 0 0 66500000 266000000 soc:bus_jpeg soc:bus_wcore passive 0 0 75000000 300000000 soc:bus_jpeg_apb soc:bus_wcore passive 0 0 83250000 166500000 soc:bus_disp1_fimd soc:bus_wcore passive 0 0 120000000 200000000 soc:bus_disp1 soc:bus_wcore passive 0 0 120000000 300000000 soc:bus_gscl_scaler soc:bus_wcore passive 0 0 150000000 300000000 soc:bus_mscl soc:bus_wcore passive 0 0 84000000 666000000 Cc: stable@vger.kernel.org Fixes: 66d0e797bf09 ("Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"") Signed-off-by: Chanwoo Choi commit 483d557ee9a3df5f21db4e4485705b17ed1a9e1e Author: Chanwoo Choi Date: Mon Jul 13 17:31:12 2020 +0900 PM / devfreq: Clean up the devfreq instance name in sysfs attr The sysfs attr interface used eithere 'df' or 'devfreq' for devfreq instance name. In order to keep the consistency and to improve the readabilty, unify the instance name as 'df'. Add add the missing conditional statement to prevent the fault. Signed-off-by: Chanwoo Choi commit 4fc9a0470d2dc370289e9d883feb41e5dd2c6303 Author: Lukasz Luba Date: Fri Jul 10 20:11:22 2020 +0100 memory: samsung: exynos5422-dmc: Add module param to control IRQ mode The driver can operate in two modes relaying on devfreq monitoring mechanism which periodically checks the device status or it can use interrupts when they are provided by loaded Device Tree. The newly introduced module parameter can be used to choose between devfreq monitoring and internal interrupts without modifying the Device Tree. It also sets devfreq monitoring as default when the parameter is not set (also the case for default when the driver is not built as a module). Reported-by: Willy Wolff Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lukasz Luba Signed-off-by: Chanwoo Choi commit 74ca9e46107879551e2625bfbfbfd71da1881b82 Author: Lukasz Luba Date: Fri Jul 10 20:11:21 2020 +0100 memory: samsung: exynos5422-dmc: Adjust polling interval and uptreshold In order to react faster and make better decisions under some workloads, benchmarking the memory subsystem behavior, adjust the polling interval and upthreshold value used by the simple_ondemand governor. Reported-by: Willy Wolff Reviewed-by: Chanwoo Choi Reviewed-by: Krzysztof Kozlowski Signed-off-by: Lukasz Luba Signed-off-by: Chanwoo Choi commit ae8eb8ba521c8e72e9e5504765929e55c038ee3a Author: Chanwoo Choi Date: Fri Jul 3 15:04:50 2020 +0900 memory: samsung: exynos5422-dmc: Use delayed timer as default Use delayed timer as default instead of deferrable timer in order to monitor the DMC status regardless of CPU idle. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Lukasz Luba Signed-off-by: Chanwoo Choi commit 4dc3bab8687f1ea11322611de6d4138b43eccdcd Author: Chanwoo Choi Date: Thu Jul 2 20:41:28 2020 +0900 PM / devfreq: Add support delayed timer for polling mode Until now, the devfreq driver using polling mode like simple_ondemand governor have used only deferrable timer for reducing the redundant power consumption. It reduces the CPU wake-up from idle due to polling mode which check the status of Non-CPU device. But, it has a problem for Non-CPU device like DMC device with DMA operation. Some Non-CPU device need to do monitor continuously regardless of CPU state in order to decide the proper next status of Non-CPU device. So, add support the delayed timer for polling mode to support the repetitive monitoring. The devfreq driver and user can select the kind of timer on either deferrable and delayed timer. For example, change the timer type of DMC device based on Exynos5422-based Odroid-XU3 as following: - If want to use deferrable timer as following: echo deferrable > /sys/class/devfreq/10c20000.memory-controller/timer - If want to use delayed timer as following: echo delayed > /sys/class/devfreq/10c20000.memory-controller/timer Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Lukasz Luba Signed-off-by: Chanwoo Choi commit ed279529754d0c94115de5317e369d25468547c9 Author: Enric Balletbo i Serra Date: Thu Jul 9 11:05:29 2020 +0200 dt-bindings: devfreq: rk3399_dmc: Add rockchip,pmu phandle The Rockchip DMC (Dynamic Memory Interface) needs to access to the PMU general register files to know the DRAM type, so add a phandle to the syscon that manages these registers. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Chanwoo Choi Acked-by: Rob Herring Signed-off-by: Gaël PORTAY Acked-by: MyungJoo Ham Signed-off-by: Chanwoo Choi commit 24948479be8b99b97996afd96c0d48e3263d9693 Author: Dmitry Osipenko Date: Fri Jul 3 09:43:06 2020 +0900 PM / devfreq: tegra: Add Dmitry as a maintainer I was contributing to the NVIDIA Tegra20+ devfreq drivers recently and want to help keep them working and evolving in the future. Acked-by: Chanwoo Choi Signed-off-by: Dmitry Osipenko Signed-off-by: Chanwoo Choi commit ada795966a9ff7da2d5b4cd66dd5e1e17edd28a5 Author: Kieran Bingham Date: Tue Jun 9 13:46:05 2020 +0100 PM / devfreq: event: Fix trivial spelling The word 'descriptor' is misspelled throughout the tree. Fix it up accordingly: decriptors -> descriptors Signed-off-by: Kieran Bingham Signed-off-by: Chanwoo Choi commit 63ef91f24f9bfc70b6446319f6cabfd094481372 Author: Marc Zyngier Date: Tue Jun 30 11:05:46 2020 +0100 PM / devfreq: rk3399_dmc: Fix kernel oops when rockchip,pmu is absent Booting a recent kernel on a rk3399-based system (nanopc-t4), equipped with a recent u-boot and ATF results in an Oops due to a NULL pointer dereference. This turns out to be due to the rk3399-dmc driver looking for an *undocumented* property (rockchip,pmu), and happily using a NULL pointer when the property isn't there. Instead, make most of what was brought in with 9173c5ceb035 ("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters to TF-A.") conditioned on finding this property in the device-tree, preventing the driver from exploding. Cc: stable@vger.kernel.org Fixes: 9173c5ceb035 ("PM / devfreq: rk3399_dmc: Pass ODT and auto power down parameters to TF-A.") Signed-off-by: Marc Zyngier Signed-off-by: Chanwoo Choi commit 5b6570bbb26f1dfad5663d99351820865e8c5c7e Author: Wei Yongjun Date: Wed Jul 29 23:58:49 2020 +0800 irqchip/imx-intmux: Fix irqdata regs save in imx_intmux_runtime_suspend() Gcc report warning as follows: drivers/irqchip/irq-imx-intmux.c:316:29: warning: variable 'irqchip_data' set but not used [-Wunused-but-set-variable] 316 | struct intmux_irqchip_data irqchip_data; | ^~~~~~~~~~~~ irqdata regs is stored to this variable on the stack in imx_intmux_runtime_suspend(), which means a nop. this commit fix to save regs to the right place. Fixes: bb403111e017 ("irqchip/imx-intmux: Implement intmux runtime power management") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200729155849.33919-1-weiyongjun1@huawei.com commit b2cc23398e8166b38f8715026273503b081c2a7a Author: Sathish Narasimman Date: Thu Jul 23 18:09:02 2020 +0530 Bluetooth: Enable RPA Timeout Enable RPA timeout during bluetooth initialization. The RPA timeout value is used from hdev, which initialized from debug_fs Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann commit 5c49bcce5c124406920843af65574104aaaa3309 Author: Sathish Narasimman Date: Thu Jul 23 18:09:01 2020 +0530 Bluetooth: Enable/Disable address resolution during le create conn In this patch if le_create_conn process is started restrict to disable address resolution and same is disabled during le_enh_connection_complete Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann commit d03c759e391901ed8584117abd52ca4381a652c9 Author: Sathish Narasimman Date: Thu Jul 23 18:09:00 2020 +0530 Bluetooth: Let controller creates RPA during le create conn When address resolution is enabled and set_privacy is enabled let's use own address type as 0x03 Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann commit b31bc00bfe3a4881e48e196b93cec1efb491ef2b Author: Sathish Narasimman Date: Thu Jul 23 18:08:59 2020 +0530 Bluetooth: Translate additional address type during le_conn When using controller based address resolution, then the new address types 0x02 and 0x03 are used. These types need to be converted back into either public address or random address types. This patch is specially during LE_CREATE_CONN if using own_add_type as 0x02 or 0x03. Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann commit 0eee35bdfa3b472cc986ecc6ad76293fdcda59e2 Author: Marcel Holtmann Date: Thu Jul 23 18:08:58 2020 +0530 Bluetooth: Update resolving list when updating whitelist When the whitelist is updated, then also update the entries of the resolving list for devices where IRKs are available. Signed-off-by: Marcel Holtmann Signed-off-by: Sathish Narsimman Signed-off-by: Marcel Holtmann commit e1d572357599d142df5764b39731b6eb55a22beb Author: Marcel Holtmann Date: Thu Jul 23 18:08:57 2020 +0530 Bluetooth: Configure controller address resolution if available When the LL Privacy support is available, then as part of enabling or disabling passive background scanning, it is required to set up the controller based address resolution as well. Since only passive background scanning is utilizing the whitelist, the address resolution is now bound to the whitelist and passive background scanning. All other resolution can be easily done by the host stack. Signed-off-by: Marcel Holtmann Signed-off-by: Sathish Narsimman Signed-off-by: Marcel Holtmann commit 6540351e6f27ef718e3cf5b46349633f3ec57859 Author: Marcel Holtmann Date: Thu Jul 23 18:08:56 2020 +0530 Bluetooth: Translate additional address type correctly When using controller based address resolution, then the new address types 0x02 and 0x03 are used. These types need to be converted back into either public address or random address types. Signed-off-by: Marcel Holtmann Signed-off-by: Sathish Narsimman Signed-off-by: Marcel Holtmann commit 76acb5ee76b1ae5870cac9c8125ca09e9106d5b2 Author: Andrzej Hajda Date: Mon Jul 13 16:43:24 2020 +0200 drm/bridge: lvds-codec: simplify error handling Using dev_err_probe code has following advantages: - shorter code, - recorded defer probe reason for debugging, - uniform error code logging. Signed-off-by: Andrzej Hajda Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200713144324.23654-5-a.hajda@samsung.com Signed-off-by: Greg Kroah-Hartman commit a60294d2b0bc015658ce66b134cc8070fa1151b0 Author: Andrzej Hajda Date: Mon Jul 13 16:43:23 2020 +0200 drm/bridge/sii8620: fix resource acquisition error handling In case of error during resource acquisition driver should print error message only in case it is not deferred probe, using dev_err_probe helper solves the issue. Moreover it records defer probe reason for debugging. Signed-off-by: Andrzej Hajda Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200713144324.23654-4-a.hajda@samsung.com Signed-off-by: Greg Kroah-Hartman commit d090b70ede02370014a1cf8acd211d1ed0fa9fd9 Author: Andrzej Hajda Date: Mon Jul 13 16:43:22 2020 +0200 driver core: add deferring probe reason to devices_deferred property /sys/kernel/debug/devices_deferred property contains list of deferred devices. This list does not contain reason why the driver deferred probe, the patch improves it. The natural place to set the reason is dev_err_probe function introduced recently, ie. if dev_err_probe will be called with -EPROBE_DEFER instead of printk the message will be attached to a deferred device and printed when user reads devices_deferred property. Signed-off-by: Andrzej Hajda Reviewed-by: Mark Brown Reviewed-by: Javier Martinez Canillas Reviewed-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20200713144324.23654-3-a.hajda@samsung.com Signed-off-by: Greg Kroah-Hartman commit a787e5400a1ceeb0ef92d71ec43aeb35b1fa1334 Author: Andrzej Hajda Date: Mon Jul 13 16:43:21 2020 +0200 driver core: add device probe log helper During probe every time driver gets resource it should usually check for error printk some message if it is not -EPROBE_DEFER and return the error. This pattern is simple but requires adding few lines after any resource acquisition code, as a result it is often omitted or implemented only partially. dev_err_probe helps to replace such code sequences with simple call, so code: if (err != -EPROBE_DEFER) dev_err(dev, ...); return err; becomes: return dev_err_probe(dev, err, ...); Signed-off-by: Andrzej Hajda Reviewed-by: Rafael J. Wysocki Reviewed-by: Mark Brown Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200713144324.23654-2-a.hajda@samsung.com Signed-off-by: Greg Kroah-Hartman commit 654888327e9f655a9d55ad477a9583e90e8c9b5c Author: Lukas Wunner Date: Wed Jul 8 15:27:01 2020 +0200 driver core: Avoid binding drivers to dead devices Commit 3451a495ef24 ("driver core: Establish order of operations for device_add and device_del via bitflag") sought to prevent asynchronous driver binding to a device which is being removed. It added a per-device "dead" flag which is checked in the following code paths: * asynchronous binding in __driver_attach_async_helper() * synchronous binding in device_driver_attach() * asynchronous binding in __device_attach_async_helper() It did *not* check the flag upon: * synchronous binding in __device_attach() However __device_attach() may also be called asynchronously from: deferred_probe_work_func() bus_probe_device() device_initial_probe() __device_attach() So if the commit's intention was to check the "dead" flag in all asynchronous code paths, then a check is also necessary in __device_attach(). Add the missing check. Fixes: 3451a495ef24 ("driver core: Establish order of operations for device_add and device_del via bitflag") Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v5.1+ Cc: Alexander Duyck Link: https://lore.kernel.org/r/de88a23a6fe0ef70f7cfd13c8aea9ab51b4edab6.1594214103.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit 7df5081cbf5e1c342acd30850a483ef504519937 Author: Marek Vasut Date: Sat Jul 25 16:49:47 2020 +0200 serial: stm32: Add RS485 RTS GPIO control While the STM32 does support RS485 drive-enable control within the UART IP itself, some systems have the drive-enable line connected to a pin which cannot be pinmuxed as RTS. Add support for toggling the RTS GPIO line using the modem control GPIOs to provide at least some sort of emulation. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Andy Shevchenko Cc: Manivannan Sadhasivam Cc: Fabrice Gasnier Cc: Greg Kroah-Hartman Cc: linux-stm32@st-md-mailman.stormreply.com Link: https://lore.kernel.org/r/20200725144947.537007-1-marex@denx.de Signed-off-by: Greg Kroah-Hartman commit e3ee0e740c3887d2293e8d54a8707218d70d86ca Author: Paul Cercueil Date: Mon Jul 27 19:04:13 2020 +0200 usb: common: usb-conn-gpio: Register charger Register a power supply charger, whose online state depends on whether the USB role is set to device or not. This is useful when the USB role is the only way to know if the device is charging from USB. The API is the standard power supply charger API, you get a /sys/class/power_supply/xxx/online node which tells you the state of the charger. The sole purpose of this is to give userspace applications a way to know whether or not the charger is plugged. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200727170413.23131-1-paul@crapouillou.net Signed-off-by: Greg Kroah-Hartman commit d8a0f85d394a0cc5dec2b290ebcf8ed3cfdc1a70 Author: Dhiraj Sharma Date: Tue Jul 28 23:56:10 2020 +0530 staging: qlge: qlge_dbg: removed comment repition Inside function ql_get_dump comment statement had a repition of word "to" which I removed and checkpatch.pl ouputs zero error or warnings now. Signed-off-by: Dhiraj Sharma Link: https://lore.kernel.org/r/20200728182610.2538-1-dhiraj.sharma0024@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3e1f8882a9f2a792f2627e7aac711d42bc809afe Author: Gustavo A. R. Silva Date: Wed Jul 29 18:35:57 2020 -0500 staging: wfx: Use flex_array_size() helper in memcpy() Make use of the flex_array_size() helper to calculate the size of a flexible array member within an enclosing structure. This helper offers defense-in-depth against potential integer overflows, while at the same time makes it explicitly clear that we are dealing with a flexible array member. Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200729233557.GA17693@embeddedor Signed-off-by: Greg Kroah-Hartman commit 051d2d09def02ef2508e69b64bb304a02af69c84 Author: Aditya Jain Date: Thu Jul 30 00:51:36 2020 +0530 staging: rtl8723bs: Align macro definitions Adjust spacing in macro definitions to align them and improve readbility Signed-off-by: Aditya Jain Link: https://lore.kernel.org/r/20200729192136.23828-4-aditya.jainadityajain.jain@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0b64587a09f32475b3630d18cbaf88be51fb0583 Author: Aditya Jain Date: Thu Jul 30 00:51:35 2020 +0530 staging: rtl8723bs: Clean up function declations Clean up multiline function declartions in hal_phy_cfg.h to improve code readablility Signed-off-by: Aditya Jain Link: https://lore.kernel.org/r/20200729192136.23828-3-aditya.jainadityajain.jain@gmail.com Signed-off-by: Greg Kroah-Hartman commit d737e2891a922ae17f56dd5b0662821c6080524a Author: Aditya Jain Date: Thu Jul 30 00:51:34 2020 +0530 staging: rtl8723bs: Fix coding style errors Fixing ERROR: "foo * bar" should be "foo *bar" in hal_phy_cfg.h as reported by checkpatch.pl Signed-off-by: Aditya Jain Link: https://lore.kernel.org/r/20200729192136.23828-2-aditya.jainadityajain.jain@gmail.com Signed-off-by: Greg Kroah-Hartman commit 873a3a14a47e819bb2d1e3cf4dc8c59c200ec32b Author: Jingle Wu Date: Wed Jul 29 23:31:33 2020 -0700 Input: elan_i2c - add ic type 0x15 The update firmware flow of ic type 0x15 is same with ic type 0x14. Signed-off-by: Jingle Wu Link: https://lore.kernel.org/r/20200730060526.12439-1-jingle.wu@emc.com.tw Signed-off-by: Dmitry Torokhov commit b2a74d5f9d446ae33a381ed7ba5f283f09bed726 Author: Christoph Hellwig Date: Sat Jun 6 13:59:54 2020 +0200 initramfs: remove clean_rootfs There is no point in trying to clean up after unpacking the initramfs failed, as it should never get past the magic number check. In addition the current code only removes file that are direct children of the root entry, which wasn't complete anyway Fixes: df52092f3c97 ("fastboot: remove duplicate unpack_to_rootfs()") Reported-by: Marek Szyprowski Signed-off-by: Christoph Hellwig commit 9ab6b718491b1a3c3eeb52f32a428dc0cbf5bb80 Author: Christoph Hellwig Date: Sat Jun 6 13:51:52 2020 +0200 initramfs: remove the populate_initrd_image and clean_rootfs stubs If initrd support is not enable just print the warning directly instead of hiding the fact that we just failed behind two stub functions. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 9acc17baf1fd6369cf969b1130bcf8c4b616ecfb Author: Christoph Hellwig Date: Wed Jul 8 18:18:54 2020 +0200 initrd: mark initrd support as deprecated The classic initial ramdisk has been replaced by the much more flexible and efficient initramfs a long time. Warn about it being removed soon. Includes a spelling fix from Colin Ian King . Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit f0ea68f1390ca11aae9e08a042c6dba5bc48eea2 Author: Christoph Hellwig Date: Sat Jun 6 15:54:39 2020 +0200 initrd: mark init_linuxrc as __init Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit bef173299613404f55b11180d9a865861637f31d Author: Christoph Hellwig Date: Sat Jun 6 14:49:58 2020 +0200 initrd: switch initrd loading to struct file based APIs There is no good reason to mess with file descriptors from in-kernel code, switch the initrd loading to struct file based read and writes instead. Also Pass an explicit offset instead of ->f_pos, and to make that easier, use file scope file structs and offsets everywhere except for identify_ramdisk_image instead of the current strange mix. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit 899ac10cc0bdaaee3b908e390bf94d2f1ba5d512 Author: Christoph Hellwig Date: Sun Jun 7 17:40:30 2020 +0200 initrd: remove the BLKFLSBUF call in handle_initrd BLKFLSBUF used to be overloaded for the ramdisk driver to free the whole ramdisk, which was completely different behavior compared to all other drivers. But this magic overload got removed in commit ff26956875c2 ("brd: remove support for BLKFLSBUF"), so this call is entirely pointless now. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit c8376994c86c4eb02b9a1032cd3a8d44c911d671 Author: Christoph Hellwig Date: Thu Jun 4 10:23:14 2020 +0200 initrd: remove support for multiple floppies Remove the special handling for multiple floppies in the initrd code. No one should be using floppies for booting these days. (famous last words..) Includes a spelling fix from Colin Ian King . Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit f259eab3ea0e7ed73db91f6358274dd3a9a27d79 Author: Valentin Schneider Date: Wed Jul 22 10:37:32 2020 +0100 cpufreq: make schedutil the default for arm and arm64 schedutil is already a hard-requirement for EAS, which has lead to making it default on arm (when CONFIG_BIG_LITTLE), see: commit 8fdcca8e254a ("cpufreq: Select schedutil when using big.LITTLE") One thing worth pointing out is that schedutil isn't only relevant for asymmetric CPU capacity systems; for instance, schedutil is the only governor that honours util-clamp performance requests. Another good example of this is x86 switching to using it by default in: commit a00ec3874e7d ("cpufreq: intel_pstate: Select schedutil as the default governor") Arguably it should be made the default for all architectures, but it seems better to wait for them to also gain frequency invariance powers. Make it the default for arm && arm64 for now. Signed-off-by: Valentin Schneider Signed-off-by: Ionela Voinescu Cc: Catalin Marinas Cc: Will Deacon Cc: Russell King Cc: Rafael J. Wysocki Cc: Viresh Kumar Signed-off-by: Viresh Kumar commit 292072c38768bb2321cf643b27cdf8fd8282d028 Author: Viresh Kumar Date: Thu Jul 30 08:59:40 2020 +0530 cpufreq: cached_resolved_idx can not be negative It is not possible for cached_resolved_idx to be invalid here as the cpufreq core always sets index to a positive value. Change its type to unsigned int and fix qcom usage a bit. Signed-off-by: Viresh Kumar commit df320f89359c0cc22ff552da3ffd07171f7754a6 Author: Sumit Gupta Date: Thu Jul 16 14:00:01 2020 +0530 cpufreq: Add Tegra194 cpufreq driver Add support for CPU frequency scaling on Tegra194. The frequency of each core can be adjusted by writing a clock divisor value to a MSR on the core. The range of valid divisors is queried from the BPMP. Signed-off-by: Mikko Perttunen Signed-off-by: Sumit Gupta Signed-off-by: Viresh Kumar commit 9b25d3f425d25262b22d4c2df682b04785236d1d Author: Sumit Gupta Date: Wed Jul 15 19:01:23 2020 +0530 dt-bindings: arm: Add NVIDIA Tegra194 CPU Complex binding Add device-tree binding documentation to represent Tegra194 CPU Complex with compatible string under 'cpus' node. This can be used by drivers like cpufreq which don't have their node or CPU Complex node to bind to. Also, documenting 'nvidia,bpmp' property which points to BPMP device. Signed-off-by: Sumit Gupta Reviewed-by: Rob Herring Signed-off-by: Viresh Kumar commit 2782ef34ed230e1b8dbea9ad46e5fc2ca6cfecfb Author: Walter Lozano Date: Tue Jul 14 15:43:56 2020 -0300 cpufreq: imx: Select NVMEM_IMX_OCOTP When probing cpufreq for iMX6 the values in the efuse needs to be read which requires NVMEM_IMX_OCOTP. If this option is not enabled, the probe will be deferred forever and cpufreq won't be available. This patch forces the selection of the required configuration option. Signed-off-by: Walter Lozano Signed-off-by: Viresh Kumar commit 34adbcbd0acc1dfa0d40dc1be1c69ba0df555d1a Author: Lee Jones Date: Tue Jul 14 15:50:40 2020 +0100 cpufreq: sti-cpufreq: Fix some formatting and misspelling issues Kerneldoc format for attribute descriptions should be '@.*: '. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/sti-cpufreq.c:49: warning: cannot understand function prototype: 'struct sti_cpufreq_ddata ' Signed-off-by: Lee Jones Cc: Patrice Chotard Cc: Pal Singh Signed-off-by: Viresh Kumar commit 02fd918097f998234c6e9c50c8afad73e7b946e4 Author: Jon Hunter Date: Sun Jul 12 11:06:45 2020 +0100 cpufreq: tegra186: Simplify probe return path We always put the reference to BPMP device on exit of the Tegra186 CPUFREQ driver and so there is no need to have separate exit paths for success and failure. Therefore, simplify the probe return path in the Tegra186 CPUFREQ driver by combining the success and failure paths. Signed-off-by: Jon Hunter Signed-off-by: Viresh Kumar commit 4264e02d3e1865549952abe2b6d7c61a1e07ca62 Author: Xin Hao Date: Wed Jul 1 11:26:10 2020 +0800 cpufreq: CPPC: Reuse caps variable in few routines The 'caps' variable has been defined in cppc_cpufreq_khz_to_perf() and cppc_cpufreq_perf_to_khz() routines, so there is no need to get 'highest_perf' value through 'cpu->caps.highest_perf', we can use 'caps->highest_perf' instead. Signed-off-by: Xin Hao [ Viresh: Updated commit log ] Signed-off-by: Viresh Kumar commit 8c37ad2f523396e15cf002b29f8f796447c71932 Author: Sven Auhagen Date: Mon Jun 22 14:01:23 2020 +0200 cpufreq: ap806: fix cpufreq driver needs ap cpu clk The Armada 8K cpufreq driver needs the Armada AP CPU CLK to work. This dependency is currently not satisfied and the ARMADA_AP_CPU_CLK can not be selected independently. Add it to the cpufreq Armada8k driver. Fixes: f525a670533d ("cpufreq: ap806: add cpufreq driver for Armada 8K") Signed-off-by: Sven Auhagen Signed-off-by: Viresh Kumar commit d88b0f0edb9041be6feff98e83cd6002e4ab534e Author: Viresh Kumar Date: Tue Jun 23 10:38:47 2020 +0530 cpufreq: cppc: Reorder code and remove apply_hisi_workaround variable With the current approach we have an extra check in the cppc_cpufreq_get_rate() callback, which checks if hisilicon's get rate implementation should be used instead. While it works fine, the approach isn't very straight forward, over that we have an extra check in the routine. Rearrange code and update the cpufreq driver's get() callback pointer directly for the hisilicon case. This gets the extra variable is removed and the extra check isn't required anymore as well. Tested-by: Xiongfeng Wang Signed-off-by: Viresh Kumar commit 10470dec3decaf5ed3c596f85debd7c42777ae12 Author: Ivan Kokshaysky Date: Sat Jun 20 17:44:49 2020 +0100 cpufreq: dt: fix oops on armada37xx Commit 0c868627e617e43a295d8 (cpufreq: dt: Allow platform specific intermediate callbacks) added two function pointers to the struct cpufreq_dt_platform_data. However, armada37xx_cpufreq_driver_init() has this struct (pdata) located on the stack and uses only "suspend" and "resume" fields. So these newly added "get_intermediate" and "target_intermediate" pointers are uninitialized and contain arbitrary non-null values, causing all kinds of trouble. For instance, here is an oops on espressobin after an attempt to change the cpefreq governor: [ 29.174554] Unable to handle kernel execute from non-executable memory at virtual address ffff00003f87bdc0 ... [ 29.269373] pc : 0xffff00003f87bdc0 [ 29.272957] lr : __cpufreq_driver_target+0x138/0x580 ... Fixed by zeroing out pdata before use. Cc: # v5.7+ Signed-off-by: Ivan Kokshaysky Reviewed-by: Andrew Lunn Signed-off-by: Viresh Kumar commit d48461b2c7c39c89dec598e6ea6e188fdaf418e7 Author: Markus Mayer Date: Thu May 28 11:20:14 2020 -0700 cpufreq: brcmstb-avs-cpufreq: send S2_ENTER / S2_EXIT commands to AVS On suspend we send AVS_CMD_S2_ENTER and on resume AVS_CMD_S2_EXIT. These are best effort calls, so we don't check the return code or take any action if either of the calls fails. Signed-off-by: Markus Mayer Acked-by: Florian Fainelli Signed-off-by: Viresh Kumar commit 08535ccdd787a146c1a03808215572af95d8c8c1 Author: Florian Fainelli Date: Thu May 28 11:20:13 2020 -0700 cpufreq: brcmstb-avs-cpufreq: Support polling AVS firmware In case the interrupt towards the host is never raised, yet the AVS firmware responds correctly within the alloted time, allow supporting a polling mode. Signed-off-by: Florian Fainelli Signed-off-by: Markus Mayer Signed-off-by: Viresh Kumar commit b75acfb45e4248c0b130a3fca64754ad0bb2753f Author: Markus Mayer Date: Thu May 28 11:20:12 2020 -0700 cpufreq: brcmstb-avs-cpufreq: more flexible interface for __issue_avs_command() We are changing how parameters are passed to __issue_avs_command(), so we can pass input *and* output arguments with the same command, rather than just one or the other. Signed-off-by: Markus Mayer Acked-by: Florian Fainelli Signed-off-by: Viresh Kumar commit afdb219bab58dc2935e2c16adae2b2ce2a242386 Author: Sibi Sankar Date: Mon Jun 22 13:46:49 2020 +0530 cpufreq: qcom: Disable fast switch when scaling DDR/L3 Disable fast switch when the opp-tables required for scaling DDR/L3 are populated. Signed-off-by: Sibi Sankar Reviewed-by: Matthias Kaehlcke Signed-off-by: Viresh Kumar commit 51c843cf77bb52db6df947c4fedcfc62ae3b7b30 Author: Sibi Sankar Date: Mon Jun 22 13:46:48 2020 +0530 cpufreq: qcom: Update the bandwidth levels on frequency change Add support to parse optional OPP table attached to the cpu node when the OPP bandwidth values are populated. This allows for scaling of DDR/L3 bandwidth levels with frequency change. Signed-off-by: Sibi Sankar Reviewed-by: Matthias Kaehlcke Signed-off-by: Viresh Kumar commit 3ae1f39aef08c5c584b0d0ce2186273be3f14d16 Author: Sibi Sankar Date: Sat Jun 6 03:03:30 2020 +0530 OPP: Add and export helper to set bandwidth Add and export 'dev_pm_opp_set_bw' to set the bandwidth levels associated with an OPP. Signed-off-by: Sibi Sankar Signed-off-by: Viresh Kumar commit 0fec8617a1df7b676b8a1d7afea2c4af1f4f963e Author: YueHaibing Date: Wed Jul 22 10:06:19 2020 +0800 soc: qcom: geni: Fix unused label warning If CONFIG_SERIAL_EARLYCON is not set, gcc warns this: drivers/soc/qcom/qcom-geni-se.c: In function 'geni_se_probe' drivers/soc/qcom/qcom-geni-se.c:914:1: warning: label 'exit' defined but not used [-Wunused-label] exit: ^~~~ Fixes: 048eb908a1f2 ("soc: qcom-geni-se: Add interconnect support to fix earlycon crash") Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200722020619.25988-1-yuehaibing@huawei.com Signed-off-by: Bjorn Andersson commit e2b3c165f27a6bdb197b0dc86683ed36f61c5527 Author: Nathan Lynch Date: Thu Jun 27 00:15:34 2019 -0500 powerpc/cacheinfo: Set pr_fmt() Set pr_fmt() so we get a nice prefix on messages. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20190627051537.7298-2-nathanl@linux.ibm.com commit aff779515a070df7e23da9e86f1096f7d10d647e Author: Vladis Dronov Date: Wed Jul 29 15:37:41 2020 +0200 powerpc: fix function annotations to avoid section mismatch warnings with gcc-10 Certain warnings are emitted for powerpc code when building with a gcc-10 toolset: WARNING: modpost: vmlinux.o(.text.unlikely+0x377c): Section mismatch in reference from the function remove_pmd_table() to the function .meminit.text:split_kernel_mapping() The function remove_pmd_table() references the function __meminit split_kernel_mapping(). This is often because remove_pmd_table lacks a __meminit annotation or the annotation of split_kernel_mapping is wrong. Add the appropriate __init and __meminit annotations to make modpost not complain. In all the cases there are just a single callsite from another __init or __meminit function: __meminit remove_pagetable() -> remove_pud_table() -> remove_pmd_table() __init prom_init() -> setup_secure_guest() __init xive_spapr_init() -> xive_spapr_disabled() Signed-off-by: Vladis Dronov Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200729133741.62789-1-vdronov@redhat.com commit 2d889db7626d2b6d67f402e2478b11f9a49b44e3 Author: Wei Yongjun Date: Sat Jul 25 06:34:29 2020 +0000 drm: xlnx: Fix typo in parameter description Fix typo in parameter description. Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Laurent Pinchart Reviewed-by: Hyun Kwon Signed-off-by: Hyun Kwon Link: https://patchwork.freedesktop.org/patch/msgid/20200725063429.172139-1-weiyongjun1@huawei.com commit be13d94b7d7f1a3e7290573faa16267941917106 Author: Colin Ian King Date: Fri Jul 24 12:12:58 2020 +0100 drm: xlnx: fix spelling mistake "failes" -> "failed" There is a spelling mistake in a dev_dbg messages. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Laurent Pinchart Reviewed-by: Hyun Kwon Signed-off-by: Hyun Kwon Link: https://patchwork.freedesktop.org/patch/msgid/20200724111258.14762-1-colin.king@canonical.com commit 090688fa4e448284aaa16136372397d7d10814db Author: Hanjun Guo Date: Wed Jul 22 17:44:28 2020 +0800 PCI: Release IVRS table in AMD ACS quirk The acpi_get_table() should be coupled with acpi_put_table() if the mapped table is not used at runtime to release the table mapping. In pci_quirk_amd_sb_acs(), IVRS table is just used for checking AMD IOMMU is supported, not used at runtime, so put the table after using it. Fixes: 15b100dfd1c9 ("PCI: Claim ACS support for AMD southbridge devices") Link: https://lore.kernel.org/r/1595411068-15440-1-git-send-email-guohanjun@huawei.com Signed-off-by: Hanjun Guo Signed-off-by: Bjorn Helgaas commit b7360f609f5fa0537667dc1b8036c96bf7e03023 Author: Tiezhu Yang Date: Mon Jul 27 15:06:55 2020 +0800 PCI: Announce device after early fixups Announce the device, e.g., pci 0000:00:00.0: [8086:5910] type 00 class 0x060000 after running early fixups, so the log message reflects any device type or class code fixups. [bhelgaas: commit log] Link: https://lore.kernel.org/r/1595833615-8049-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Tiezhu Yang Signed-off-by: Bjorn Helgaas commit b470cef1ffac1acc327fe3343a2ce3ef3a526a21 Author: Linus Walleij Date: Wed Jul 22 13:31:41 2020 +0200 gpio: rcar: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Cc: Biju Das Cc: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200722113141.243163-1-linus.walleij@linaro.org commit 3e43d79da1dc9731aee24d8b3e8059a4d2297bfc Author: Wei Li Date: Fri Jul 24 15:11:11 2020 +0800 perf tools: No need to cache the PMUs in ARM SPE auxtrace init routine - auxtrace_record__init() is called only once, so there is no point in using a static variable to cache the results of find_all_arm_spe_pmus(), make it local and free the results after use. - Another reason is, even though SPE is micro-architecture dependent, but so far it only supports "statistical-profiling-extension-v1" and we have no chance to use multiple SPE's PMU events in Perf command. So remove the useless check code to make it clear. Signed-off-by: Wei Li Reviewed-by: Mathieu Poirier Cc: Alexander Shishkin Cc: Hanjun Guo Cc: Jiri Olsa Cc: Kim Phillips Cc: Leo Yan Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20200724071111.35593-3-liwei391@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 31e81e0bed8b4a9c2bb6914c36cf6a8b4ef8a9b7 Author: Wei Li Date: Fri Jul 24 15:11:10 2020 +0800 perf tools: Fix record failure when mixed with ARM SPE event When recording with cache-misses and arm_spe_x event, I found that it will just fail without showing any error info if i put cache-misses after 'arm_spe_x' event. [root@localhost 0620]# perf record -e cache-misses \ -e arm_spe_0/ts_enable=1,pct_enable=1,pa_enable=1,load_filter=1,jitter=1,store_filter=1,min_latency=0/ sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.067 MB perf.data ] [root@localhost 0620]# [root@localhost 0620]# perf record -e arm_spe_0/ts_enable=1,pct_enable=1,pa_enable=1,load_filter=1,jitter=1,store_filter=1,min_latency=0/ \ -e cache-misses sleep 1 [root@localhost 0620]# The current code can only work if the only event to be traced is an 'arm_spe_x', or if it is the last event to be specified. Otherwise the last event type will be checked against all the arm_spe_pmus[i]->types, none will match and an out of bound 'i' index will be used in arm_spe_recording_init(). We don't support concurrent multiple arm_spe_x events currently, that is checked in arm_spe_recording_options(), and it will show the relevant info. So add the check and record of the first found 'arm_spe_pmu' to fix this issue here. Fixes: ffd3d18c20b8 ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support") Signed-off-by: Wei Li Reviewed-by: Mathieu Poirier Tested-by-by: Leo Yan Cc: Alexander Shishkin Cc: Hanjun Guo Cc: Jiri Olsa Cc: Kim Phillips Cc: Mark Rutland Cc: Mike Leach Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20200724071111.35593-2-liwei391@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit e434e0c41f1a6208b8e66612718ee89768e0fbc2 Author: Krzysztof Kozlowski Date: Wed Jul 29 09:44:15 2020 +0200 soc: qcom: smd-rpm: Fix kerneldoc Fix W=1 compile warnings (invalid kerneldoc): drivers/soc/qcom/smd-rpm.c:35: warning: Function parameter or member 'dev' not described in 'qcom_smd_rpm' drivers/soc/qcom/smd-rpm.c:99: warning: Function parameter or member 'state' not described in 'qcom_rpm_smd_write' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200729074415.28393-2-krzk@kernel.org Signed-off-by: Bjorn Andersson commit 707d678a5c7c5e80d1caac6c6b021171f5ecde58 Author: Dan Murphy Date: Wed Jul 29 13:31:45 2020 -0500 power: supply: bq27xxx_battery: Add the BQ28z610 Battery monitor Add the Texas Instruments BQ28z610 battery monitor. The register address map is laid out the same as compared to other devices within the file. The battery status register bits are similar to the bq27z561 but they are different compared to other fuel gauge devices within this file. Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel commit 0827425db7a65259db50c188a26aa2ad74a3cc3a Author: Dan Murphy Date: Wed Jul 29 13:31:44 2020 -0500 dt-bindings: power: Add BQ28z610 compatible Add the Texas Instruments bq28z610 battery monitor to the bq27xxx binding. Acked-by: Rob Herring Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel commit 6f24ff97e3231a5303841c5196a6f460f8485eb4 Author: Dan Murphy Date: Wed Jul 29 13:31:43 2020 -0500 power: supply: bq27xxx_battery: Add the BQ27Z561 Battery monitor Add the Texas Instruments BQ27Z561 battery monitor. The register address map is laid out the same as compared to other devices within the file. The battery status register has differing bits to determine if the battery is full, discharging or dead. Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel commit 36d1b6997dd6a4f3be194dde6553c3dcc2f7f07a Author: Dan Murphy Date: Wed Jul 29 13:31:42 2020 -0500 dt-bindings: power: Add BQ27Z561 compatible Add the Texas Instruments bq27z561 battery monitor to the bq27xxx binding. Acked-by: Rob Herring Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel commit 41d707b7332f1386642c47eb078110ca368a46f5 Author: Brian Vazquez Date: Wed Jul 29 11:10:18 2020 -0700 fib: fix fib_rules_ops indirect calls wrappers This patch fixes: commit b9aaec8f0be5 ("fib: use indirect call wrappers in the most common fib_rules_ops") which didn't consider the case when CONFIG_IPV6_MULTIPLE_TABLES is not set. Reported-by: Stephen Rothwell Fixes: b9aaec8f0be5 ("fib: use indirect call wrappers in the most common fib_rules_ops") Signed-off-by: Brian Vazquez Signed-off-by: David S. Miller commit a41cf09b8edff84c5294da3f52271b1f8f965932 Merge: 5ba2254b04f9f 6221595fc5fd5 Author: David S. Miller Date: Wed Jul 29 13:15:30 2020 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2020-07-29 This series contains updates to the ice driver only. Dave works around LFC settings not being preserved through link events. Fixes link issues with GLOBR reset and handling of multiple link events. Nick restores VF MSI-X after PCI reset. Kiran corrects the error code returned in ice_aq_sw_rules if the rule does not exist. Paul prevents overwriting of user set descriptors. Tarun adds masking before accessing rate limiting profile types and corrects queue bandwidth configuration. Victor modifies Tx queue scheduler distribution to spread more evenly across queue group nodes. Krzysztof sets need_wakeup flag for Tx AF_XDP. Brett allows VLANs in safe mode. Marcin cleans up VSIs on probe failure. Bruce reduces the scope of a variable. Ben removes a FW workaround. Tony fixes an unused parameter warning. ==================== Signed-off-by: David S. Miller commit e4d7f2d3593e703a4d58b813f332a5c2aef5106f Author: Keyur Patel Date: Wed Jun 10 23:19:46 2020 -0400 ext4: fix spelling mistakes in extents.c Fix spelling issues over the comments in the code. requsted ==> requested deterimined ==> determined insde ==> inside neet ==> need somthing ==> something Signed-off-by: Keyur Patel Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20200611031947.165079-1-iamkeyur96@gmail.com Signed-off-by: Theodore Ts'o commit 45beb31d3afb651bb5c41897e46bd4fa9980c51c Author: Kai-Heng Feng Date: Tue Jul 28 18:45:53 2020 +0800 PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken We are seeing AMD Radeon Pro W5700 doesn't work when IOMMU is enabled: iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=63:00.0 address=0x42b5b01a0] iommu ivhd0: AMD-Vi: Event logged [IOTLB_INV_TIMEOUT device=63:00.0 address=0x42b5b01c0] The error also makes graphics driver fail to probe the device. It appears to be the same issue as commit 5e89cd303e3a ("PCI: Mark AMD Navi14 GPU rev 0xc5 ATS as broken") addresses, and indeed the same ATS quirk can workaround the issue. See-also: 5e89cd303e3a ("PCI: Mark AMD Navi14 GPU rev 0xc5 ATS as broken") See-also: d28ca864c493 ("PCI: Mark AMD Stoney Radeon R7 GPU ATS as broken") See-also: 9b44b0b09dec ("PCI: Mark AMD Stoney GPU ATS as broken") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=208725 Link: https://lore.kernel.org/r/20200728104554.28927-1-kai.heng.feng@canonical.com Signed-off-by: Kai-Heng Feng Signed-off-by: Bjorn Helgaas Acked-by: Alex Deucher Cc: stable@vger.kernel.org commit 4aeccdf0671125adee903b651fb134a4759ce161 Author: Arnd Bergmann Date: Wed Jul 29 13:34:39 2020 +0200 clk: mmp: avoid missing prototype warning The kernel test robot points out two harmless warnings in the mmp clk drivers: drivers/clk/mmp/clk-pxa168.c:68:13: warning: no previous prototype for 'pxa168_clk_init' [-Wmissing-prototypes] drivers/clk/mmp/clk-pxa910.c:66:13: warning: no previous prototype for 'pxa910_clk_init' [-Wmissing-prototypes] Fix these by including corresponding header file. Reported-by: kernel test robot Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200729113456.4072290-1-arnd@arndb.de Signed-off-by: Stephen Boyd commit 2167c40657981f8a3d1ff1f04d4bda6b4a64f8e2 Author: Heiner Kallweit Date: Tue Jul 28 23:03:41 2020 +0200 PCI: Remove unused pci_lost_interrupt() 388c8c16abaf ("PCI: add routines for debugging and handling lost interrupts") added pci_lost_interrupt() that apparently never has had a single user. Remove it. Link: https://lore.kernel.org/r/e328d059-3068-6a40-28df-f81f616d15a0@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit 67d141c1f8e604a9c02d6a60f7827443d7f44762 Author: Jerome Brunet Date: Wed Jul 1 11:45:56 2020 +0200 arm64: dts: meson: odroid-n2: add jack audio output support Add support for audio on jack socket of the odroid-n2 Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200701094556.194498-3-jbrunet@baylibre.com commit a7a80474069842c27282a5e991704a0a1f26f243 Author: Jerome Brunet Date: Wed Jul 1 11:45:55 2020 +0200 arm64: dts: meson: odroid-n2: enable audio loopback Add capture pcm interfaces and loopback routes to the odroid-n2 Signed-off-by: Jerome Brunet Signed-off-by: Kevin Hilman Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200701094556.194498-2-jbrunet@baylibre.com commit 5ba2254b04f9f606bafb8b0091bea2d0cd9f5dd0 Author: Jisheng Zhang Date: Wed Jul 29 17:49:09 2020 +0800 net: mvneta: fix comment about phylink_speed_down mvneta has switched to phylink, so the comment should look like "We may have called phylink_speed_down before". Signed-off-by: Jisheng Zhang Reviewed-by: Russell King Signed-off-by: David S. Miller commit 1d70ad0f85435a7262de802b104e49e6598c50ff Author: Mark Zhang Date: Mon Jul 27 12:58:28 2020 +0300 RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP When dumping QPs bound to a counter, raw QPs should be allowed to dump without the CAP_NET_RAW privilege. This is consistent with what "rdma res show qp" does. Fixes: c4ffee7c9bdb ("RDMA/netlink: Implement counter dumpit calback") Link: https://lore.kernel.org/r/20200727095828.496195-1-leon@kernel.org Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 42f36eba71c4f0c532d6de761c154d00f9f1900d Author: Gaurav Singh Date: Sun Jul 26 21:52:05 2020 -0400 netfilter: ip6tables: Remove redundant null checks Remove superfluous check for NULL pointer to header. Signed-off-by: Gaurav Singh Signed-off-by: Pablo Neira Ayuso commit 50935339c394adfb3d7253055e3bc10ee70264b0 Author: Alexander A. Klimov Date: Sat Jul 25 19:02:25 2020 +0200 netfilter: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Pablo Neira Ayuso commit 6bf9d8f6f0df3f7aa852dc111c960bc04578c7c5 Author: Leon Romanovsky Date: Sun Jul 19 10:25:21 2020 +0300 RDMA/include: Replace license text with SPDX tags The header files in RDMA subsystem are dual licensed and can be described by simple SPDX tag, so replace all of them at once together with making them use the same coding style for header guard defines. Link: https://lore.kernel.org/r/20200719072521.135260-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c365ee561ee343b587df9f5ba191c1a090d4f43e Author: LH Lin Date: Wed Jul 29 20:14:00 2020 +0800 power: supply: test_power: Fix battery_current initial value Since default battery_status is POWER_SUPPLY_STATUS_DISCHARGING, we should change default battery_current to a negative value. Signed-off-by: LH Lin Signed-off-by: Sebastian Reichel commit 03ed5a8cda659e3c71d106b0dd4ce6520e4dcd6e Author: Jack Wang Date: Fri Jul 24 16:45:08 2020 +0530 RDMA/rtrs: remove WQ_MEM_RECLAIM for rtrs_wq lockdep triggers a warning from time to time when running a regression test: rnbd_client L685: Device disconnected. rnbd_client L1756: Unloading module workqueue: WQ_MEM_RECLAIM rtrs_client_wq:rtrs_clt_reconnect_work [rtrs_client] is flushing !WQ_MEM_RECLAIM ib_addr:process_one_req [ib_core] WARNING: CPU: 2 PID: 18824 at kernel/workqueue.c:2517 check_flush_dependency+0xad/0x130 The root cause is workqueue core expect flushing should not be done for a !WQ_MEM_RECLAIM wq from a WQ_MEM_RECLAIM workqueue. In above case ib_addr workqueue without WQ_MEM_RECLAIM, but rtrs_wq WQ_MEM_RECLAIM. To avoid the warning, remove the WQ_MEM_RECLAIM flag. Fixes: 9cb837480424 ("RDMA/rtrs: server: main functionality") Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20200724111508.15734-4-haris.iqbal@cloud.ionos.com Signed-off-by: Jack Wang Signed-off-by: Md Haris Iqbal Signed-off-by: Jason Gunthorpe commit 09e0dbbeed82e35ce2cd21e086a6fac934163e2a Author: Danil Kipnis Date: Fri Jul 24 16:45:06 2020 +0530 RDMA/rtrs-clt: add an additional random 8 seconds before reconnecting In order to avoid all the clients to start reconnecting at the same time schedule the reconnect dwork with a random jitter of +[0,8] seconds. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20200724111508.15734-2-haris.iqbal@cloud.ionos.com Signed-off-by: Danil Kipnis Signed-off-by: Md Haris Iqbal Signed-off-by: Jason Gunthorpe commit a9e8e18aaf914bf273ed63480c4c3d8dd626c95f Merge: c5be1f2c5bab1 b6cec06d19d90 Author: Jens Axboe Date: Wed Jul 29 11:22:40 2020 -0600 Merge branch 'nvme-5.9' of git://git.infradead.org/nvme into for-5.9/drivers Pull NVMe updates from Christoph. * 'nvme-5.9' of git://git.infradead.org/nvme: (30 commits) nvme-loop: remove extra variable in create ctrl nvme-loop: set ctrl state connecting after init nvme-multipath: do not fall back to __nvme_find_path() for non-optimized paths nvme-multipath: fix logic for non-optimized paths nvme-rdma: fix controller reset hang during traffic nvme-tcp: fix controller reset hang during traffic nvmet: introduce the passthru Kconfig option nvmet: introduce the passthru configfs interface nvmet: Add passthru enable/disable helpers nvmet: add passthru code to process commands nvme: export nvme_find_get_ns() and nvme_put_ns() nvme: introduce nvme_ctrl_get_by_path() nvme: introduce nvme_execute_passthru_rq to call nvme_passthru_[start|end]() nvme: create helper function to obtain command effects nvme: clear any SGL flags in passthru commands nvmet-fc: remove redundant del_work_active flag nvmet-fc: check successful reference in nvmet_fc_find_target_assoc nvme-fc: set max_segments to lldd max value nvme-fc: drop a duplicated word in a comment nvme-hwmon: log the controller device name ... commit f6a9d47ae6854980fc4b1676f1fe9f9fa45ea4e2 Author: Jason Gunthorpe Date: Thu Jul 23 10:07:07 2020 +0300 RDMA/cma: Execute rdma_cm destruction from a handler properly When a rdma_cm_id needs to be destroyed after a handler callback fails, part of the destruction pattern is open coded into each call site. Unfortunately the blind assignment to state discards important information needed to do cma_cancel_operation(). This results in active operations being left running after rdma_destroy_id() completes, and the use-after-free bugs from KASAN. Consolidate this entire pattern into destroy_id_handler_unlock() and manage the locking correctly. The state should be set to RDMA_CM_DESTROYING under the handler_lock to atomically ensure no futher handlers are called. Link: https://lore.kernel.org/r/20200723070707.1771101-5-leon@kernel.org Reported-by: syzbot+08092148130652a6faae@syzkaller.appspotmail.com Reported-by: syzbot+a929647172775e335941@syzkaller.appspotmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit cc9c037343898eb7a775e6b81d092ee21eeff218 Author: Jason Gunthorpe Date: Thu Jul 23 10:07:06 2020 +0300 RDMA/cma: Remove unneeded locking for req paths The REQ flows are concerned that once the handler is called on the new cm_id the ULP can choose to trigger a rdma_destroy_id() concurrently at any time. However, this is not true, while the ULP can call rdma_destroy_id(), it immediately blocks on the handler_mutex which prevents anything harmful from running concurrently. Remove the confusing extra locking and refcounts and make the handler_mutex protecting state during destroy more clear. Link: https://lore.kernel.org/r/20200723070707.1771101-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3647a28de1ada8708efc78d956619b9df5004478 Author: Jason Gunthorpe Date: Thu Jul 23 10:07:05 2020 +0300 RDMA/cma: Using the standard locking pattern when delivering the removal event Whenever an event is delivered to the handler it should be done under the handler_mutex and upon any non-zero return from the handler it should trigger destruction of the cm_id. cma_process_remove() skips some steps here, it is not necessarily wrong since the state change should prevent any races, but it is confusing and unnecessary. Follow the standard pattern here, with the slight twist that the transition to RDMA_CM_DEVICE_REMOVAL includes a cma_cancel_operation(). Link: https://lore.kernel.org/r/20200723070707.1771101-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d54f23c09ec62670901f1a2a4712a5218522ca2b Author: Jason Gunthorpe Date: Thu Jul 23 10:07:04 2020 +0300 RDMA/cma: Simplify DEVICE_REMOVAL for internal_id cma_process_remove() triggers an unconditional rdma_destroy_id() for internal_id's and skips the event deliver and transition through RDMA_CM_DEVICE_REMOVAL. This is confusing and unnecessary. internal_id always has cma_listen_handler() as the handler, have it catch the RDMA_CM_DEVICE_REMOVAL event and directly consume it and signal removal. This way the FSM sequence never skips the DEVICE_REMOVAL case and the logic in this hard to test area is simplified. Link: https://lore.kernel.org/r/20200723070707.1771101-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 152ee3d1afbee08c88dc37048ee26a3edacbef90 Author: Krzysztof Kozlowski Date: Wed Jul 29 09:43:48 2020 +0200 power: supply: Fix kerneldoc of power_supply_temp2resist_simple() Fix W=1 compile warnings (invalid kerneldoc): drivers/power/supply/power_supply_core.c:747: warning: Function parameter or member 'temp' not described in 'power_supply_temp2resist_simple' drivers/power/supply/power_supply_core.c:747: warning: Excess function parameter 'ocv' description in 'power_supply_temp2resist_simple' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 362fd2ecc3f118b09a56a54752c5310ebb9f7c54 Author: Krzysztof Kozlowski Date: Wed Jul 29 09:43:47 2020 +0200 power: supply: cpcap-battery: Fix kerneldoc of cpcap_battery_read_accumulated() Fix W=1 compile warnings (invalid kerneldoc): drivers/power/supply/cpcap-battery.c:292: warning: Function parameter or member 'ccd' not described in 'cpcap_battery_read_accumulated' drivers/power/supply/cpcap-battery.c:292: warning: Excess function parameter 'regs' description in 'cpcap_battery_read_accumulated' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit efe9711214e6138a5a2a46ca4068bfce50c03444 Author: Neal Liu Date: Mon Jul 27 11:25:46 2020 +0800 cpuidle: change enter_s2idle() prototype Control Flow Integrity(CFI) is a security mechanism that disallows changes to the original control flow graph of a compiled binary, making it significantly harder to perform such attacks. init_state_node() assign same function callback to different function pointer declarations. static int init_state_node(struct cpuidle_state *idle_state, const struct of_device_id *matches, struct device_node *state_node) { ... idle_state->enter = match_id->data; ... idle_state->enter_s2idle = match_id->data; } Function declarations: struct cpuidle_state { ... int (*enter) (struct cpuidle_device *dev, struct cpuidle_driver *drv, int index); void (*enter_s2idle) (struct cpuidle_device *dev, struct cpuidle_driver *drv, int index); }; In this case, either enter() or enter_s2idle() would cause CFI check failed since they use same callee. Align function prototype of enter() since it needs return value for some use cases. The return value of enter_s2idle() is no need currently. Signed-off-by: Neal Liu Reviewed-by: Sami Tolvanen Signed-off-by: Rafael J. Wysocki commit 81f94ddfeceddb3b8ffa6cfe5ddd3b896711d9ad Author: Ulf Hansson Date: Tue Jul 7 14:58:04 2020 +0200 cpuidle: psci: Prevent domain idlestates until consumers are ready Depending on the SoC/platform, additional devices may be part of the PSCI PM domain topology. This is the case with 'qcom,rpmh-rsc' device, for example, even if this is not yet visible in the corresponding DTS-files. Without going into too much details, a device like the 'qcom,rpmh-rsc' may have HW constraints that needs to be obeyed to, before a domain idlestate can be picked. Therefore, let's implement the ->sync_state() callback to receive a notification when all consumers of the PSCI PM domain providers have been attached/probed to it. In this way, we can make sure all constraints from all relevant devices, are taken into account before allowing a domain idlestate to be picked. Acked-by: Saravana Kannan Signed-off-by: Ulf Hansson Reviewed-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit ee7c34caac3892af08f9c4c91b834d2cb2871eb0 Author: Ulf Hansson Date: Tue Jul 7 14:58:03 2020 +0200 cpuidle: psci: Convert PM domain to platform driver To enable support for deferred probing and to allow implementation of the ->sync_state() callback from subsequent changes, let's convert into a platform driver. Reviewed-by: Lina Iyer Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 166bf83529c47ddcd4854ff2047f4f980dc492c8 Author: Ulf Hansson Date: Tue Jul 7 14:58:02 2020 +0200 cpuidle: psci: Fix error path via converting to a platform driver The current error paths for the cpuidle-psci driver, may leak memory or possibly leave CPU devices attached to their PM domains. These are quite harmless issues, but still deserves to be taken care of. Although, rather than fixing them by keeping track of allocations that needs to be freed, which tends to become a bit messy, let's convert into a platform driver. In this way, it gets easier to fix the memory leaks as we can rely on the devm_* functions. Moreover, converting to a platform driver also enables support for deferred probe, which subsequent changes takes benefit from. Signed-off-by: Ulf Hansson Reviewed-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 4b072cd6ace3fcc5fd0688980a74592a7ddee5e5 Author: Ulf Hansson Date: Tue Jul 7 14:58:01 2020 +0200 cpuidle: psci: Fail cpuidle registration if set OSI mode failed Currently we allow the cpuidle driver registration to succeed, even if we failed to enable the OSI mode when the hierarchical DT layout is used. This means running in a degraded mode, by using the available idle states per CPU, while also preventing the domain idle states. Moving forward, this behaviour looks quite questionable to maintain, as complexity seems to grow around it, especially when trying to add support for deferred probe, for example. Therefore, let's make the cpuidle driver registration to fail in this situation, thus relying on the default architectural cpuidle backend for WFI to be used. Reviewed-by: Lina Iyer Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 0317561912d90cf06457c255351549576953704d Author: Ulf Hansson Date: Tue Jul 7 14:58:00 2020 +0200 cpuidle: psci: Split into two separate build objects The combined build object for the PSCI cpuidle driver and the PSCI PM domain, is a bit messy. Therefore let's split it up by adding a new Kconfig ARM_PSCI_CPUIDLE_DOMAIN and convert into two separate objects. Reviewed-by: Lina Iyer Reviewed-by: Sudeep Holla Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 471dec8023d14e2b6e817b811a37b65e3cc0661a Author: Dan Murphy Date: Tue Jul 28 15:08:12 2020 -0500 dt-bindings: power: Convert battery.txt to battery.yaml Convert the battery.txt file to yaml and fix up the examples. Signed-off-by: Dan Murphy Reviewed-by: Rob Herring [Fixed the regex for ocv-capacity-table and the DT example for it] Signed-off-by: Sebastian Reichel commit 22362aa30bad6f03b5bcbbeee3cdc61950d40086 Author: Wei Yongjun Date: Wed Jul 29 23:59:02 2020 +0800 habanalabs: remove unused but set variable 'ctx_asid' Gcc report warning as follows: drivers/misc/habanalabs/common/command_submission.c:373:6: warning: variable 'ctx_asid' set but not used [-Wunused-but-set-variable] 373 | int ctx_asid, rc; | ^~~~~~~~ This variable is not used in function cs_timedout(), this commit remove it to fix the warning. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200729155902.33976-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 6221595fc5fd55a457d0439a381c388d967f2011 Author: Tony Nguyen Date: Mon Jul 13 13:53:18 2020 -0700 ice: fix unused parameter warning Depending on PAGE_SIZE, the following unused parameter warning can be reported: drivers/net/ethernet/intel/ice/ice_txrx.c: In function ‘ice_rx_frame_truesize’: drivers/net/ethernet/intel/ice/ice_txrx.c:513:21: warning: unused parameter ‘size’ [-Wunused-parameter] unsigned int size) The 'size' variable is used only when PAGE_SIZE >= 8192. Add __maybe_unused to remove the warning. Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers commit 7dfff9ffe8df7181c2840de2dc861795cf8d8147 Author: Ben Shelton Date: Mon Jul 13 13:53:17 2020 -0700 ice: disable no longer needed workaround for FW logging For the FW logging info AQ command, we currently set the ICE_AQ_FLAG_RD in order to work around a FW issue. This issue has been fixed so remove the workaround. Signed-off-by: Ben Shelton Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit e923f04d660dd1dde872be8d63527fc2fd257874 Author: Bruce Allan Date: Mon Jul 13 13:53:16 2020 -0700 ice: reduce scope of variable The scope of the macro local variable 'i' can be reduced. Do so to avoid static analysis tools from complaining. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 78116e979ddc4928398420aa986fd283db23c361 Author: Marcin Szycik Date: Mon Jul 13 13:53:15 2020 -0700 ice: cleanup VSI on probe fail As part of ice_setup_pf_sw() a PF VSI is setup; release the VSI in case of failure. Signed-off-by: Marcin Szycik Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit cd1f56f4291a1bc949bc922e862a45d8cf6b8990 Author: Brett Creeley Date: Mon Jul 13 13:53:14 2020 -0700 ice: Allow all VLANs in safe mode Currently the PF VSI's context parameters are left in a bad state when going into safe mode. This is causing VLAN traffic to not pass. Fix this by configuring the PF VSI to allow all VLAN tagged traffic. Also, remove redundant comment explaining the safe mode flow in ice_probe(). Signed-off-by: Brett Creeley Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 682dfedcee2fa9a50cb53e3b30ff1ebe1f7dd659 Author: Krzysztof Kazimierczak Date: Mon Jul 13 13:53:13 2020 -0700 ice: need_wakeup flag might not be set for Tx This is a port of i40e commit 705639572e8c ("i40e: need_wakeup flag might not be set for Tx"). Quoting the original commit message: "The need_wakeup flag for Tx might not be set for AF_XDP sockets that are only used to send packets. This happens if there is at least one outstanding packet that has not been completed by the hardware and we get that corresponding completion (which will not generate an interrupt since interrupts are disabled in the napi poll loop) between the time we stopped processing the Tx completions and interrupts are enabled again. In this case, the need_wakeup flag will have been cleared at the end of the Tx completion processing as we believe we will get an interrupt from the outstanding completion at a later point in time. But if this completion interrupt occurs before interrupts are enable, we lose it and should at that point really have set the need_wakeup flag since there are no more outstanding completions that can generate an interrupt to continue the processing. When this happens, user space will see a Tx queue need_wakeup of 0 and skip issuing a syscall, which means will never get into the Tx processing again and we have a deadlock." As a result, packet processing stops. This patch introduces a fix for this issue, by always setting the need_wakeup flag at the end of an interrupt processing. This ensures that the deadlock will not happen. Signed-off-by: Krzysztof Kazimierczak Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 4043818c13ef5e610e6555b02d69dfd8d0a6b32d Author: Victor Raj Date: Mon Jul 13 13:53:12 2020 -0700 ice: distribute Tx queues evenly Distribute the Tx queues evenly across all queue groups. This will help the queues to get more equal sharing among the queues when all are in use. In the previous algorithm, the next queue group node will be picked up only after the previous one filled with max children. For example: if VSI is configured with 9 queues, the first 8 queues will be assigned to queue group 1 and the 9th queue will be assigned to queue group 2. The 2 queue groups split the bandwidth between them equally (50:50). The first queue group node will share the 50% bandwidth with all of its children (8 queues). And the second queue group node will share the entire 50% bandwidth with its only children. The new algorithm will fix this issue. Signed-off-by: Victor Raj Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 984824a210d4b21868d2f96219637587bdb37719 Author: Tarun Singh Date: Mon Jul 13 13:53:11 2020 -0700 ice: Adjust scheduler default BW weight By default the queues are configured in legacy mode. The default BW settings for legacy/advanced modes are different. The existing code was using the advanced mode default value of 1 which was incorrect. This caused the unbalanced BW sharing among siblings. The recommended default value is applied. Signed-off-by: Tarun Singh Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit b3b93d6ce1bd5f42c49dd8e0b059e1dca7fa8f61 Author: Tarun Singh Date: Mon Jul 13 13:53:10 2020 -0700 ice: Add RL profile bit mask check Mask bits before accessing the profile type field. Signed-off-by: Tarun Singh Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit a02016de00f84a9e8a1a8ab1d8b9720c97fb3fdc Author: Paul M Stillwell Jr Date: Mon Jul 13 13:53:09 2020 -0700 ice: fix overwriting TX/RX descriptor values when rebuilding VSI If a user sets the value of the TX or RX descriptors to some non-default value using 'ethtool -G' then we need to not overwrite the values when we rebuild the VSI. The VSI rebuild could happen as a result of a user setting the number of queues via the 'ethtool -L' command. Fix this by checking to see if the value we have stored is non-zero and if it is then don't change the value. Signed-off-by: Paul M Stillwell Jr Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit ca1fdb885e5fe794a2f6171f9b7c7c064a461486 Author: Kiran Patil Date: Mon Jul 13 13:53:08 2020 -0700 ice: return correct error code from ice_aq_sw_rules Return ICE_ERR_DOES_NOT_EXIST return code if admin command error code is ICE_AQ_RC_ENOENT (not exist). ice_aq_sw_rules is used when switch rule is getting added/deleted/updated. In case of delete/update switch rule, admin command can return ICE_AQ_RC_ENOENT error code if such rule does not exist, hence return ICE_ERR_DOES_NOT_EXIST error code from ice_aq_sw_rule, so that caller of this function can decide how to handle ICE_ERR_DOES_NOT_EXIST. Signed-off-by: Kiran Patil Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit a54a0b24f4f5a361abaf1c0e6591c57816d4cfa7 Author: Nick Nunley Date: Mon Jul 13 13:53:07 2020 -0700 ice: restore VF MSI-X state during PCI reset During a PCI FLR the MSI-X Enable flag in the VF PCI MSI-X capability register will be cleared. This can lead to issues when a VF is assigned to a VM because in these cases the VF driver receives no indication of the PF PCI error/reset and additionally it is incapable of restoring the cleared flag in the hypervisor configuration space without fully reinitializing the driver interrupt functionality. Since the VF driver is unable to easily resolve this condition on its own, restore the VF MSI-X flag during the PF PCI reset handling. Signed-off-by: Nick Nunley Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 0ce6c34a8f6f5b63c9ed5f2ee9be52ece1428350 Author: Dave Ertman Date: Mon Jul 13 13:53:06 2020 -0700 ice: fix link event handling timing When the driver experiences a link event (especially link up) there can be multiple events generated. Some of these are link fault and still have a state of DOWN set. The problem happens when the link comes UP during the PF driver handling one of the LINK DOWN events. The status of the link is updated and is now seen as UP, so when the actual LINK UP event comes, the port information has already been updated to be seen as UP, even though none of the UP activities have been completed. After the link information has been updated in the link handler and evaluated for MEDIA PRESENT, if the state of the link has been changed to UP, treat the DOWN event as an UP event since the link is now UP. Signed-off-by: Dave Ertman Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit b767ca650f9e9cc3308d8714137264f4a6d908ce Author: Dave Ertman Date: Mon Jul 13 13:53:05 2020 -0700 ice: Fix link broken after GLOBR reset After a GLOBR, the link was broken so that a link up situation was being seen as a link down. The problem was that the rebuild process was updating the port_info link status without doing any of the other things that need to be done when link changes. This was causing the port_info struct to have current "UP" information so that any further UP interrupts were skipped as redundant. The rebuild flow should *not* be updating the port_info struct link information, so eliminate this and leave it to the link event handling code. Signed-off-by: Dave Ertman Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 7d9c9b791f9e275b49870b6b10a1ea4d49209de8 Author: Dave Ertman Date: Mon Jul 13 13:53:04 2020 -0700 ice: Implement LFC workaround There is a bug where the LFC settings are not being preserved through a link event. The registers in question are the ones that are touched (and restored) when a set_local_mib AQ command is performed. On a link-up event, make sure that a set_local_mib is being performed. Move the function ice_aq_set_lldp_mib() from the DCB specific ice_dcb.c to ice_common.c so that the driver always has access to this AQ command. Signed-off-by: Dave Ertman Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit cc816969d7b5973d2720d9afd381f06f0eac6885 Author: Serge Semin Date: Thu Jul 23 03:33:57 2020 +0300 serial: 8250_dw: Fix common clocks usage race condition The race condition may happen if the UART reference clock is shared with some other device (on Baikal-T1 SoC it's another DW UART port). In this case if that device changes the clock rate while serial console is using it the DW 8250 UART port might not only end up with an invalid uartclk value saved, but may also experience a distorted output data since baud-clock could have been changed. In order to fix this lets at least try to adjust the 8250 port setting like UART clock rate in case if the reference clock rate change is discovered. The driver will call the new method to update 8250 UART port clock rate settings. It's done by means of the clock event notifier registered at the port startup and unregistered in the shutdown callback method. Note 1. In order to avoid deadlocks we had to execute the UART port update method in a dedicated deferred work. This is due to (in my opinion redundant) the clock update implemented in the dw8250_set_termios() method. Note 2. Before the ref clock is manually changed by the custom set_termios() function we swap the port uartclk value with new rate adjusted to be suitable for the requested baud. It is necessary in order to effectively disable a functionality of the ref clock events handler for the current UART port, since uartclk update will be done a bit further in the generic serial8250_do_set_termios() function. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200723003357.26897-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Greg Kroah-Hartman commit 0be160cf86f96dbc2d1cb74f9eef3581a2ad7971 Author: Serge Semin Date: Thu Jul 23 03:33:56 2020 +0300 serial: 8250_dw: Pass the same rate to the clk round and set rate methods Indeed according to the clk API if clk_round_rate() has successfully accepted a rate, then in order setup the clock with value returned by the clk_round_rate() the clk_set_rate() method must be called with the original rate value. Suggested-by: Russell King Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200723003357.26897-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Greg Kroah-Hartman commit 442fdef1b931181a45ce4fce68b7675f7a78ec3a Author: Serge Semin Date: Thu Jul 23 03:33:55 2020 +0300 serial: 8250_dw: Simplify the ref clock rate setting procedure Really instead of twice checking the clk_round_rate() return value we could do it once, and if it isn't error the clock rate can be changed. By doing so we decrease a number of ret-value tests and remove a weird goto-based construction implemented in the dw8250_set_termios() method. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200723003357.26897-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Greg Kroah-Hartman commit 868f3ee6e452bc2b89e68183a1700fcbbe0807b1 Author: Serge Semin Date: Thu Jul 23 03:33:54 2020 +0300 serial: 8250: Add 8250 port clock update method Some platforms can be designed in a way so the UART port reference clock might be asynchronously changed at some point. In Baikal-T1 SoC this may happen due to the reference clock being shared between two UART ports, on the Allwinner SoC the reference clock is derived from the CPU clock, so any CPU frequency change should get to be known/reflected by/in the UART controller as well. But it's not enough to just update the uart_port->uartclk field of the corresponding UART port, the 8250 controller reference clock divisor should be altered so to preserve current baud rate setting. All of these things is done in a coherent way by calling the serial8250_update_uartclk() method provided in this patch. Though note that it isn't supposed to be called from within the UART port callbacks because the locks using to the protect the UART port data are already taken in there. Signed-off-by: Serge Semin Link: https://lore.kernel.org/r/20200723003357.26897-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Greg Kroah-Hartman commit 8f042191d430f4144d23ebc2206e8cf73e6b1cbf Author: Guru Das Srinagesh Date: Wed Jul 22 11:07:05 2020 +0100 nvmem: qcom-spmi-sdam: Enable multiple devices Using pdev->id as the nvmem's config ID (which, by default, is NVMEM_DEVID_NONE) prevents multiple instances of this driver from probing because of the following error: sysfs: cannot create duplicate filename '/bus/nvmem/devices/spmi_sdam' Use NVMEM_DEVID_AUTO as the NVMEM config ID to fix the issue. Signed-off-by: Guru Das Srinagesh Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-15-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit fa2dc6049afbd90301de5c26e0626dc695000589 Author: Yangtao Li Date: Wed Jul 22 11:07:04 2020 +0100 dt-bindings: nvmem: SID: add binding for A100's SID controller Add a binding for A100's SID controller. Signed-off-by: Yangtao Li Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-14-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit b7194ba1e19fe029e7f6cc2db017a3001dc03086 Author: Matteo Croce Date: Wed Jul 22 11:07:03 2020 +0100 nvmem: update Kconfig description nvmem can't be built as module anymore, update its Kconfig description. Fixes: 2a37ce25d9f2 ("nvmem: disallow modular CONFIG_NVMEM") Signed-off-by: Matteo Croce Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-13-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 93b4e49f8c861cb701bfb57bac703c846b83db3b Author: Ravi Kumar Bokka Date: Wed Jul 22 11:07:02 2020 +0100 nvmem: qfprom: Add fuse blowing support This patch adds support for blowing fuses to the qfprom driver if the required properties are defined in the device tree. [Srini: Fixed merge conflict with AUTO ID] Signed-off-by: Ravi Kumar Bokka Signed-off-by: Douglas Anderson Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-12-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a37a15f748b41a66e1e8895f8841ab1c87e83233 Author: Ravi Kumar Bokka Date: Wed Jul 22 11:07:01 2020 +0100 dt-bindings: nvmem: Add properties needed for blowing fuses On some systems it's possible to actually blow the fuses in the qfprom from the kernel. Add properties to support that. NOTE: Whether this is possible depends on the BIOS settings and whether the kernel has permissions here, so not all boards will be able to blow fuses in the kernel. Signed-off-by: Ravi Kumar Bokka Signed-off-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 83281b7e22f785b831c49c93cce1a8e28dc93787 Author: Ravi Kumar Bokka Date: Wed Jul 22 11:07:00 2020 +0100 dt-bindings: nvmem: qfprom: Convert to yaml This switches the bindings over from txt to yaml. Signed-off-by: Ravi Kumar Bokka Signed-off-by: Douglas Anderson Reviewed-by: Rob Herring Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3f07c658330f2bc00a5e86ac2c8ec2c659d73760 Author: Srinivas Kandagatla Date: Wed Jul 22 11:06:59 2020 +0100 nvmem: qfprom: use NVMEM_DEVID_AUTO for multiple instances There could be multiple qfprom devices on some SoCs. For example, on MSM8939, qfprom@58000 holds efuse bits for Core Power Reduction (CPR), and qfprom@5c000 holds bits for TSENS. Registering multiple nvmem devices with the same id results in the following failure on the second device. [ 1.682731] sysfs: cannot create duplicate filename /bus/nvmem/devices/qfprom0 [ 1.685889] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.19.107-00567-g11c887ce2838-dirty #334 [ 1.693191] Hardware name: Square, Inc. T2 Devkit (DT) [ 1.701610] Call trace: [ 1.706673] dump_backtrace+0x0/0x158 [ 1.708987] show_stack+0x14/0x20 [ 1.712810] dump_stack+0x98/0xbc [ 1.716114] sysfs_warn_dup+0x60/0x78 [ 1.719401] sysfs_do_create_link_sd.isra.0+0xdc/0xe8 [ 1.723047] sysfs_create_link+0x20/0x40 [ 1.728088] bus_add_device+0x68/0x130 [ 1.732083] device_add+0x3f8/0x628 [ 1.735639] nvmem_register.part.4+0x150/0x348 [ 1.739018] devm_nvmem_register+0x4c/0xa8 [ 1.743532] qfprom_probe+0x94/0xb8 [ 1.747615] platform_drv_probe+0x50/0xa0 [ 1.750998] really_probe+0x1b8/0x298 [ 1.755164] driver_probe_device+0x58/0x100 [ 1.758810] __driver_attach+0xe0/0xe8 [ 1.762802] bus_for_each_dev+0x74/0xc8 [ 1.766622] driver_attach+0x20/0x28 [ 1.770354] bus_add_driver+0x1ac/0x218 [ 1.774175] driver_register+0x60/0x110 [ 1.777734] __platform_driver_register+0x40/0x48 [ 1.781570] qfprom_driver_init+0x18/0x20 [ 1.786416] do_one_initcall+0x5c/0x178 [ 1.790418] kernel_init_freeable+0x198/0x244 [ 1.794062] kernel_init+0x10/0x108 [ 1.798567] ret_from_fork+0x10/0x18 [ 1.802084] qcom,qfprom: probe of 5c000.qfprom failed with error -17 Fix this issue by using NVMEM_DEVID_AUTO. Reported-by: Shawn Guo Signed-off-by: Srinivas Kandagatla Tested-by: Shawn Guo Link: https://lore.kernel.org/r/20200722100705.7772-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 731aa3fae8137ebca83a01d20fbf3effb4798fc8 Author: Srinivas Kandagatla Date: Wed Jul 22 11:06:58 2020 +0100 nvmem: core: add support to auto devid For nvmem providers which have multiple instances, it is required to suffix the provider name with proper id, so that they do not confict for the same name. Currently the core does not handle this case properly eventhough core already has logic to generate the id. This patch add new devid type NVMEM_DEVID_AUTO for providers to be able to allow core to assign id and append it to provier name. Reported-by: Shawn Guo Signed-off-by: Srinivas Kandagatla Tested-by: Shawn Guo Link: https://lore.kernel.org/r/20200722100705.7772-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5037d368b2c2c90e9432d477e5562dce1c33d5c9 Author: Andreas Färber Date: Wed Jul 22 11:06:57 2020 +0100 nvmem: core: Add nvmem_cell_read_u8() Complement the u16, u32 and u64 helpers with a u8 variant to ease accessing byte-sized values. This helper will be useful for Realtek Digital Home Center platforms, which store some byte and sub-byte sized values in non-volatile memory. Signed-off-by: Andreas Färber Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3a7580710b0344fd2d2fc9e988620fddd187b83e Author: Andreas Färber Date: Wed Jul 22 11:06:56 2020 +0100 nvmem: core: Grammar fixes for help text It's "an unsigned" but "a U". Similarly, "an entry" but "a binary entry". While at it, also drop superfluous articles for negative and zero. Signed-off-by: Andreas Färber Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2eef018efb9624b8717945f5e2ea0a1965520956 Author: Freeman Liu Date: Wed Jul 22 11:06:55 2020 +0100 nvmem: sc27xx: add sc2730 efuse support Add support to the new efuse IP which is integrated in the SC2730 which includes multiple blocks in a single chip. Signed-off-by: Freeman Liu Signed-off-by: Chunyan Zhang Reviewed-by: Baolin Wang Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 835667157461e65399654cb726bad2075ddab26c Author: Douglas Anderson Date: Wed Jul 22 11:06:54 2020 +0100 nvmem: Enforce nvmem stride in the sysfs interface The 'struct nvmem_config' has a stride attribute that specifies the needed alignment for accesses into the nvmem. This is used in nvmem_cell_info_to_nvmem_cell() but not in the sysfs read/write functions. If the alignment is important in one place it's important everywhere, so let's add enforcement. For now we'll consider it totally invalid to access with the wrong alignment. We could relax this in the read case where we could just read some extra bytes and throw them away. Relaxing it in the write case seems harder (and less safe?) since we'd have to read some data first and then write it back. To keep it symmetric we'll just disallow it in both cases. Reported-by: Ravi Kumar Bokka Signed-off-by: Douglas Anderson Reviewed-by: Ravi Kumar Bokka Tested-by: Ravi Kumar Bokka Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a9c4a155d2d4619eb39798891fb5fc81739c58fd Author: Tiezhu Yang Date: Wed Jul 22 11:06:53 2020 +0100 MAINTAINERS: Add git tree for NVMEM FRAMEWORK There is no git tree for NVMEM FRAMEWORK in MAINTAINERS, it is not convinent to rebase, add it. Signed-off-by: Tiezhu Yang Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit bcd14bb7a68520bf88e45e91d354e43535624f82 Author: Tiezhu Yang Date: Wed Jul 22 11:06:52 2020 +0100 nvmem: sprd: Fix return value of sprd_efuse_probe() When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes: 096030e7f449 ("nvmem: sprd: Add Spreadtrum SoCs eFuse support") Signed-off-by: Tiezhu Yang Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200722100705.7772-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 699cc4dfd14071e4843e2fde8ce01f09871eb318 Author: Fugang Duan Date: Fri Jul 24 15:08:15 2020 +0800 tty: serial: imx: add imx earlycon driver Split imx earlycon driver from imx serial driver "imx.c" as separated driver. imx serial driver can be built as module, but earlycon driver only support build in. Signed-off-by: Fugang Duan Link: https://lore.kernel.org/r/20200724070815.11445-3-fugang.duan@nxp.com Signed-off-by: Greg Kroah-Hartman commit 0db4f9b91c86bfe9d33e191a31b0150879e2acee Author: Fugang Duan Date: Fri Jul 24 15:08:14 2020 +0800 tty: serial: imx: enable imx serial console port as module Add support for building i.MX serial driver as module. The changes of the patch: - imx console driver can be built as module. - move out earlycon code to separated driver like imx_earlycon.c, and imx earlycon driver only support build-in. Signed-off-by: Fugang Duan Link: https://lore.kernel.org/r/20200724070815.11445-2-fugang.duan@nxp.com Signed-off-by: Greg Kroah-Hartman commit a5e0691fd9f610eb46ab4cd070fa7b08ee780bf4 Author: Christoph Hellwig Date: Mon Jul 27 15:05:01 2020 +0200 tty/synclink: remove leftover bits of non-PCI card support Since commit 1355cba9c3ba ("tty/synclink: remove ISA support"), the synlink driver only supports PCI card. Remove any leftover dead code to support other cards. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20200727130501.31005-1-hch@lst.de Signed-off-by: Greg Kroah-Hartman commit a32418919dd5e863ce47db1bac9051a5364e44a0 Author: Gustavo A. R. Silva Date: Thu Jul 23 17:34:22 2020 -0500 tty: Use the preferred form for passing the size of a structure type Use the preferred form for passing the size of a structure type. The alternative form where the structure type is spelled out hurts readability and introduces an opportunity for a bug when the object type is changed but the corresponding object identifier to which the sizeof operator is applied is not. Signed-off-by: Gustavo A. R. Silva Acked-by: Jiri Slaby Link: https://lore.kernel.org/r/b04dd8cdd67bd6ffde3fd12940aeef35fdb824a6.1595543280.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman commit 52b52e91899bc5a76a77b42ec1bdf245aee0286e Author: Gustavo A. R. Silva Date: Thu Jul 23 17:32:25 2020 -0500 tty: Fix identation issues in struct serial_struct32 Fix the following checkpatch.pl warnings together with all the identation issues in struct serial_struct32: ERROR: code indent should use tabs where possible + char reserved_char;$ WARNING: please, no spaces at the start of a line + char reserved_char;$ ERROR: code indent should use tabs where possible + compat_int_t reserved;$ WARNING: please, no spaces at the start of a line + compat_int_t reserved;$ Acked-by: Jiri Slaby Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/77576843397aeab0af8aa0423a9768f3ca8dedfb.1595543280.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman commit e5b9f4b1dc3e73f8a327b242c783551c4bf15bbd Author: Gustavo A. R. Silva Date: Thu Jul 23 17:31:27 2020 -0500 tty: Avoid the use of one-element arrays One-element arrays are being deprecated[1]. Replace the one-element arrays with simple value types 'char reserved_char' and 'compat_int_t reserved'[2], once it seems these are just placeholders for alignment. [1] https://github.com/KSPP/linux/issues/79 [2] https://github.com/KSPP/linux/issues/86 Tested-by: kernel test robot Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/tty-20200716.md Acked-by: Jiri Slaby Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/f49bf0e27eaac396c96d21392c8c284f9f5ef52a.1595543280.git.gustavoars@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7e84522cd089c6ef3e6adc7f1c9a5b2f705ccd9b Author: Mrinal Pandey Date: Fri Jul 24 18:44:49 2020 +0530 drivers: android: Fix the SPDX comment style C source files should have `//` as SPDX comment and not `/**/`. Fix this by running checkpatch on the file. Signed-off-by: Mrinal Pandey Link: https://lore.kernel.org/r/20200724131449.zvjutbemg3vqhrzh@mrinalpandey Signed-off-by: Greg Kroah-Hartman commit 81195f9689ac16c01c894c756b925e28e546b123 Author: Mrinal Pandey Date: Fri Jul 24 18:44:33 2020 +0530 drivers: android: Fix a variable declaration coding style issue Add a blank line after variable declarations as suggested by checkpatch. Signed-off-by: Mrinal Pandey Link: https://lore.kernel.org/r/20200724131433.stf3ycooogawyzb3@mrinalpandey Signed-off-by: Greg Kroah-Hartman commit 8df5b9492202e9cac9917465e945fcf478d55404 Author: Mrinal Pandey Date: Fri Jul 24 18:44:03 2020 +0530 drivers: android: Remove braces for a single statement if-else block Remove braces for both if and else block as suggested by checkpatch. Signed-off-by: Mrinal Pandey Link: https://lore.kernel.org/r/20200724131403.dahfhdwa3wirzkxj@mrinalpandey Signed-off-by: Greg Kroah-Hartman commit 72b93c79dbbe261371abb1bf3cf7302cfe31e8d9 Author: Mrinal Pandey Date: Fri Jul 24 18:43:48 2020 +0530 drivers: android: Remove the use of else after return Remove the unnecessary else branch after return statement as suggested by checkpatch. Signed-off-by: Mrinal Pandey Link: https://lore.kernel.org/r/20200724131348.haz4ocxcferdcsgn@mrinalpandey Signed-off-by: Greg Kroah-Hartman commit 4df9772c8489b7d626db0ee307e029aea66db260 Author: Mrinal Pandey Date: Fri Jul 24 18:42:54 2020 +0530 drivers: android: Fix a variable declaration coding style issue Add a blank line after variable declarations as suggested by checkpatch. Signed-off-by: Mrinal Pandey Link: https://lore.kernel.org/r/20200724131254.qxbvderrws36dzzq@mrinalpandey Signed-off-by: Greg Kroah-Hartman commit 4b836a1426cb0f1ef2a6e211d7e553221594f8fc Author: Jann Horn Date: Mon Jul 27 14:04:24 2020 +0200 binder: Prevent context manager from incrementing ref 0 Binder is designed such that a binder_proc never has references to itself. If this rule is violated, memory corruption can occur when a process sends a transaction to itself; see e.g. . There is a remaining edgecase through which such a transaction-to-self can still occur from the context of a task with BINDER_SET_CONTEXT_MGR access: - task A opens /dev/binder twice, creating binder_proc instances P1 and P2 - P1 becomes context manager - P2 calls ACQUIRE on the magic handle 0, allocating index 0 in its handle table - P1 dies (by closing the /dev/binder fd and waiting a bit) - P2 becomes context manager - P2 calls ACQUIRE on the magic handle 0, allocating index 1 in its handle table [this triggers a warning: "binder: 1974:1974 tried to acquire reference to desc 0, got 1 instead"] - task B opens /dev/binder once, creating binder_proc instance P3 - P3 calls P2 (via magic handle 0) with (void*)1 as argument (two-way transaction) - P2 receives the handle and uses it to call P3 (two-way transaction) - P3 calls P2 (via magic handle 0) (two-way transaction) - P2 calls P2 (via handle 1) (two-way transaction) And then, if P2 does *NOT* accept the incoming transaction work, but instead closes the binder fd, we get a crash. Solve it by preventing the context manager from using ACQUIRE on ref 0. There shouldn't be any legitimate reason for the context manager to do that. Additionally, print a warning if someone manages to find another way to trigger a transaction-to-self bug in the future. Cc: stable@vger.kernel.org Fixes: 457b9a6f09f0 ("Staging: android: add binder driver") Acked-by: Todd Kjos Signed-off-by: Jann Horn Reviewed-by: Martijn Coenen Link: https://lore.kernel.org/r/20200727120424.1627555-1-jannh@google.com Signed-off-by: Greg Kroah-Hartman commit 37b8b73f641cc151a58eef8b9a73dac2f273146e Author: Gustavo A. R. Silva Date: Mon Jul 27 13:32:58 2020 -0500 greybus: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727183258.GA28571@embeddedor Signed-off-by: Greg Kroah-Hartman commit ab4dc051d7b39ce31dd7a7c1d7c64fef69178050 Author: Chunfeng Yun Date: Mon Jul 27 15:15:00 2020 +0800 usb: mtu3: simplify mtu3_req_complete() Use argument req directly instead of mreq->request, they are the same usb request. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-11-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit f1e51e99ed498d4aa9ae5df28e43d558ea627781 Author: Chunfeng Yun Date: Mon Jul 27 15:14:59 2020 +0800 usb: mtu3: clear dual mode of u3port when disable device If not clear u3port's dual mode when disable device, the IP will fail to enter sleep mode when suspend. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-10-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 54402373c45e440f2e71f7a02cd5c8889abec085 Author: Chunfeng Yun Date: Mon Jul 27 15:14:58 2020 +0800 usb: mtu3: use MTU3_EP_WEDGE flag Use MTU3_EP_WEDGE flag instead of the member @wedged in mtu3_ep struct, then @wedged can be removed. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-9-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit bf77804b1cbdeb78b89a0584b7e225ceba862183 Author: Chunfeng Yun Date: Mon Jul 27 15:14:57 2020 +0800 usb: mtu3: remove useless member @busy in mtu3_ep struct The member @busy in mtu3_ep struct is unnecessary, so remove it. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-8-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit ba428976a8827f596093ed1c55fc8cabac21249e Author: Chunfeng Yun Date: Mon Jul 27 15:14:56 2020 +0800 usb: mtu3: remove repeated error log The caller already print error log. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-7-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit dc4c1aa7eae99d7a69717247cc6bd1c071407104 Author: Chunfeng Yun Date: Mon Jul 27 15:14:55 2020 +0800 usb: mtu3: add ->udc_set_speed() Make use of the method to make sure connect on speeds supported by the gadget driver. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-6-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 1258450ef38af7ea5b27a0a14195bb406f59cda8 Author: Chunfeng Yun Date: Mon Jul 27 15:14:54 2020 +0800 usb: mtu3: introduce a funtion to check maximum speed The max_speed got from DTS may be not supported by the hardware, so need check it, and assign a proper default value. And make it clear by introducing a funtion. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-5-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit b7d5c3cabcec4191e22e962867904e661cb9bc84 Author: Chunfeng Yun Date: Mon Jul 27 15:14:53 2020 +0800 usb: mtu3: clear interrupts status when disable interrupts When disable interrupts, will also want to clear their status, ensure it by calling mtu3_intr_status_clear() in mtu3_intr_disable(). Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit f55df11e3164e4aab1832bfe5a2f5997ee243f04 Author: Chunfeng Yun Date: Mon Jul 27 15:14:52 2020 +0800 usb: mtu3: reinitialize CSR registers The CSR registers will be reset as default value if the ports are disabled, so reinitialize them when the ports are enabled again. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit c0a8d952cf0d26b01ff2929165eabd0b8707c307 Author: Chunfeng Yun Date: Mon Jul 27 15:14:51 2020 +0800 usb: mtu3: fix macro for maximum number of packets The bits field for maximum number of packets is 8 bits. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit fde9156ad5f0db3be9acad4de52e35dc1a3243be Author: Chunfeng Yun Date: Mon Jul 27 15:14:50 2020 +0800 usb: mtu3: remove unnecessary pointer checks The class driver will ensure the parameters are valid pointers before call the hook function of usb_ep_ops, so no need check them again. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595834101-13094-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit ec37198acca7b4c17b96247697406e47aafe0605 Author: Forest Crossman Date: Mon Jul 27 23:24:08 2020 -0500 usb: xhci: Fix ASMedia ASM1142 DMA addressing I've confirmed that the ASMedia ASM1142 has the same problem as the ASM2142/ASM3142, in that it too reports that it supports 64-bit DMA addresses when in fact it does not. As with the ASM2142/ASM3142, this can cause problems on systems where the upper bits matter, and adding the XHCI_NO_64BIT_SUPPORT quirk completely fixes the issue. Acked-by: Mathias Nyman Signed-off-by: Forest Crossman Cc: stable Link: https://lore.kernel.org/r/20200728042408.180529-3-cyrozap@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1841cb255da41e87bed9573915891d056f80e2e7 Author: Forest Crossman Date: Mon Jul 27 23:24:07 2020 -0500 usb: xhci: define IDs for various ASMedia host controllers Not all ASMedia host controllers have a device ID that matches its part number. #define some of these IDs to make it clearer at a glance which chips require what quirks. Acked-by: Mathias Nyman Signed-off-by: Forest Crossman Link: https://lore.kernel.org/r/20200728042408.180529-2-cyrozap@gmail.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 2d30e408a2a6b3443d3232593e3d472584a3e9f8 Author: Chunfeng Yun Date: Wed Jul 22 15:51:15 2020 +0800 usb: musb: convert to devm_platform_ioremap_resource_byname Use devm_platform_ioremap_resource_byname() to simplify code Cc: Bin Liu Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595404275-8449-7-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 9d4ee5bd8298a2a8c2487c4d4a105fe9ddef1d81 Author: Chunfeng Yun Date: Wed Jul 22 15:51:14 2020 +0800 usb: gadget: tegra-xudc: convert to devm_platform_ioremap_resource_byname Use devm_platform_ioremap_resource_byname() to simplify code Cc: Nagarjuna Kristam Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595404275-8449-6-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit c94622683443a8eab17df07b9124304f8c40c01c Author: Chunfeng Yun Date: Wed Jul 22 15:51:13 2020 +0800 usb: gadget: r8a66597: convert to devm_platform_ioremap_resource_byname Use devm_platform_ioremap_resource_byname() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595404275-8449-5-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit db123bea96252d2f9eb0dc8e53f7b2e54856b31c Author: Chunfeng Yun Date: Wed Jul 22 15:51:12 2020 +0800 usb: dwc3: convert to devm_platform_ioremap_resource_byname Use devm_platform_ioremap_resource_byname() to simplify code Cc: Patrice Chotard Reviewed-by: Patrice Chotard Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595404275-8449-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 7e8b59c1fc6bf78b8117efd8d354bcb99efed2ea Author: Chunfeng Yun Date: Wed Jul 22 15:51:11 2020 +0800 usb: cdns3: convert to devm_platform_ioremap_resource_byname Use devm_platform_ioremap_resource_byname() to simplify code Cc: Peter Chen Reviewed-by: Peter Chen Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595404275-8449-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 6ce7b97cfae2264687b29ae84f63fa3b57282f29 Author: Chunfeng Yun Date: Wed Jul 22 15:51:10 2020 +0800 usb: phy: am335x: convert to devm_platform_ioremap_resource_byname Use devm_platform_ioremap_resource_byname() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595404275-8449-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 5ad91812ea4b86f8740cfa433465825fdefa554e Author: Chunfeng Yun Date: Wed Jul 22 15:51:09 2020 +0800 usb: mtu3: convert to devm_platform_ioremap_resource_byname Use devm_platform_ioremap_resource_byname() to simplify code Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1595404275-8449-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 0ed9498f9ecfde50c93f3f3dd64b4cd5414d9944 Author: Bastien Nocera Date: Mon Jul 27 12:46:42 2020 +0200 USB: Simplify USB ID table match usb_device_match_id() supports being passed NULL tables, so no need to check for it. Signed-off-by: Bastien Nocera Link: https://lore.kernel.org/r/20200727104644.149873-1-hadess@hadess.net Signed-off-by: Greg Kroah-Hartman commit dbc676e722db28ab8cfb6cc857ac49d8808a5be4 Author: Vaibhav Agarwal Date: Thu Jul 9 15:57:23 2020 +0530 drivers: staging: audio: Fix the missing header file for helper file This patch fixes the warning reported for missing prototypes due to missing header file. Also, it includes changes to remove unused_but_set_variables. Reported-by: kernel test robot Signed-off-by: Vaibhav Agarwal Link: https://lore.kernel.org/r/6341df9b0b5985047af0bbbc8e136481ac515b25.1594290158.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman commit c9a57eddb235d53b0a8b9d740e454ef466086fc8 Author: Vaibhav Agarwal Date: Thu Jul 9 15:57:22 2020 +0530 staging: greybus: audio: Enable GB codec, audio module compilation. Currently you can't enable the Gey Bus Audio Codec because there is no entry for it in the Kconfig file. Originally the config name was going to be AUDIO_MSM8994 but that's not correct because other types of hardware are supported now. I have chosen the name AUDIO_APB_CODEC instead. Also I had to update the dependencies for GREYBUS_AUDIO to make the compile work. Signed-off-by: Vaibhav Agarwal Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/2b50959ccffe5a4372880d27e79ef3be1873372c.1594290158.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman commit 510e340efe0cbd379cf1ff3490d088c3299749b1 Author: Vaibhav Agarwal Date: Thu Jul 9 15:57:21 2020 +0530 staging: greybus: audio: Add helper APIs for dynamic audio modules Greybus Codec driver allows modules to be dynamically added and removed, which further requires updating the DAPM configurations as well. With current snd_soc architecture, dynamic audio modules is not yet supported. This patch provides helper APIs to update DAPM configurations in response to modules which are dynamically added or removed. The source is primarily based on snd_dapm.c Signed-off-by: Vaibhav Agarwal Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/35e1baaae10a3f2162e71be4c2f75a701584f0e6.1594290158.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman commit c4bb7dcf143f89c024ad439871f75d4a9f72cbc1 Author: Vaibhav Agarwal Date: Thu Jul 9 15:57:20 2020 +0530 staging: greybus: audio: Resolve compilation error in topology parser Fix compilation errors for GB Audio topology parser code with recent kernel versions. Signed-off-by: Vaibhav Agarwal Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/2542330352ae1d01469a616ea45edb461615e072.1594290158.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman commit ce7bd8325dc75c873caa65c88861b3f5a58898bd Author: Vaibhav Agarwal Date: Thu Jul 9 15:57:19 2020 +0530 staging: greybus: audio: Resolve compilation errors for GB codec module Due to dependencies on ASoC framework changes, GB dummy codec module compilation is currently disabled. This patch updates codec driver as per the latest ASoC APIs. Signed-off-by: Vaibhav Agarwal Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/dd66a960fca186da055600fe1e622b7a814cb543.1594290158.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman commit ac40b4d1e409971fe40e69761d0c80ffbbb21938 Author: Vaibhav Agarwal Date: Thu Jul 9 15:57:18 2020 +0530 staging: greybus: audio: Maintain jack list within GB Audio module As per the current implementation for GB codec driver, a jack list is maintained for each module. And it expects the list to be populated by the snd_soc_jack structure which would require modifications in mainstream code. However, this is not a necessary requirement and the list can be easily maintained within gbaudio_module_info as well. This patch provides the relevant changes for the same. Signed-off-by: Vaibhav Agarwal Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/4ee030af7a8e203f89a6e513313e36f4e2991e5b.1594290158.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman commit b503aef30e45ad29f8dd7f53e22240ea6e527590 Author: Vaibhav Agarwal Date: Thu Jul 9 15:57:17 2020 +0530 staging: greybus: audio: Update snd_jack FW usage as per new APIs snd_soc_jack APIs are modified in recent kernel versions. This patch updates the codec driver to resolve the compilation errors related to jack framework. Signed-off-by: Vaibhav Agarwal Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/896b8e24d990f2bca5aafaebd26e37095042951e.1594290158.git.vaibhav.sr@gmail.com Signed-off-by: Greg Kroah-Hartman commit dae29d661d25a605bab8dd5b49c53dfbb8d688a2 Merge: 9141b3ca7fedc f1bb924e8f5b5 Author: Arnd Bergmann Date: Wed Jul 29 16:22:06 2020 +0200 Merge tag 'amlogic-dt64-3' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt arm64: dts: amlogic updates for v5.9 (round3) - minor fixes * tag 'amlogic-dt64-3' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: fix mmc0 tuning error on Khadas VIM3 arm64: dts: meson: misc fixups for w400 dtsi Link: https://lore.kernel.org/r/7h5za746al.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 2f79d3d1f7f0885d574811f80c6e0473ab8ef5ab Author: Alexander Usyskin Date: Tue Jul 28 22:22:42 2020 +0300 mei: add device kind to sysfs Some of the mei device heads are not generic and have a specific purpose, we need to announce it to the user space so it is possible to detect the correct device node via matching attributes. Generic heads are marked as 'mei' while special purpose heads have their own names. Currently we are adding 'itouch' string for Intel IPTS 1.0, 2.0 devices. This is done via new sysfs attribute 'kind'. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200728192242.3117779-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 9bb01fe1b685d9521b8a0aa59412f91f9a17a030 Author: Tomas Winkler Date: Wed Jul 29 14:05:40 2020 +0300 MAINTAINERS: Fix maintainer entry for mei driver mei driver has sub modules, those are not listed via scripts/get_maintainer.pl when using asterisk: drivers/misc/mei/* The correct notation is: drivers/misc/mei/ Cc: Joe Perches Signed-off-by: Tomas Winkler Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200729110540.3205585-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit b5e6a027bd327daa679ca55182a920659e2cbb90 Author: Peter Zijlstra Date: Thu Jul 23 12:11:49 2020 +0200 seqcount: More consistent seqprop names Attempt uniformity and brevity. Signed-off-by: Peter Zijlstra (Intel) commit 0efc94c5d15c3da0a69543d86ad2180f39256ed6 Author: Peter Zijlstra Date: Thu Jul 23 12:03:13 2020 +0200 seqcount: Compress SEQCNT_LOCKNAME_ZERO() Less is more. Signed-off-by: Peter Zijlstra (Intel) commit e4e9ab3f9f91ad3b88d12363f890e8ad9b59b645 Author: Peter Zijlstra Date: Thu Jul 23 12:00:53 2020 +0200 seqlock: Fold seqcount_LOCKNAME_init() definition Manual repetition is boring and error prone. Signed-off-by: Peter Zijlstra (Intel) commit a8772dccb2ec7b139db1b3ba782ecb12ed92d7c3 Author: Peter Zijlstra Date: Thu Jul 23 11:56:49 2020 +0200 seqlock: Fold seqcount_LOCKNAME_t definition Manual repetition is boring and error prone. Signed-off-by: Peter Zijlstra (Intel) commit e55687fe5c1e4849e5559a0a49199c9ca3fff36e Author: Peter Zijlstra Date: Thu Jul 23 11:56:22 2020 +0200 seqlock: s/__SEQ_LOCKDEP/__SEQ_LOCK/g __SEQ_LOCKDEP() is an expression gate for the seqcount_LOCKNAME_t::lock member. Rename it to be about the member, not the gate condition. Later (PREEMPT_RT) patches will make the member available for !LOCKDEP configs. Signed-off-by: Peter Zijlstra (Intel) commit af5a06b582ec3d7b0160b4faaa65f73d8dcf989f Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:30 2020 +0200 hrtimer: Use sequence counter with associated raw spinlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_raw_spinlock_t data type, which allows to associate a raw spinlock with the sequence counter. This enables lockdep to verify that the raw spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-25-a.darwish@linutronix.de commit 5c73b9a2b1b4ecc809a914aa64970157b3d8c936 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:29 2020 +0200 kvm/eventfd: Use sequence counter with associated spinlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_spinlock_t data type, which allows to associate a spinlock with the sequence counter. This enables lockdep to verify that the spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Acked-by: Paolo Bonzini Link: https://lkml.kernel.org/r/20200720155530.1173732-24-a.darwish@linutronix.de commit 2ca97ac8bdcc31fdc868f40c73c017f0a648dc07 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:28 2020 +0200 userfaultfd: Use sequence counter with associated spinlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_spinlock_t data type, which allows to associate a spinlock with the sequence counter. This enables lockdep to verify that the spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-23-a.darwish@linutronix.de commit 76246c9219726c71e3f470344d8c6a566fa2535b Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:27 2020 +0200 NFSv4: Use sequence counter with associated spinlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_spinlock_t data type, which allows to associate a spinlock with the sequence counter. This enables lockdep to verify that the spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-22-a.darwish@linutronix.de commit 67b7b641ca69cafb467f7560316b09b8ff0fa5c9 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:26 2020 +0200 iocost: Use sequence counter with associated spinlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_spinlock_t data type, which allows to associate a spinlock with the sequence counter. This enables lockdep to verify that the spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Daniel Wagner Link: https://lkml.kernel.org/r/20200720155530.1173732-21-a.darwish@linutronix.de commit 0a87b25ff2eb6169403c88b0d5f3c97bdaa3c930 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:25 2020 +0200 raid5: Use sequence counter with associated spinlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_spinlock_t data type, which allows to associate a spinlock with the sequence counter. This enables lockdep to verify that the spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Acked-by: Song Liu Link: https://lkml.kernel.org/r/20200720155530.1173732-20-a.darwish@linutronix.de commit 26475371976c69489d3a8e6c8bbf35afbbc25055 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:24 2020 +0200 vfs: Use sequence counter with associated spinlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_spinlock_t data type, which allows to associate a spinlock with the sequence counter. This enables lockdep to verify that the spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-19-a.darwish@linutronix.de commit 025e82bcbc34cd071390e72fd0b31593282f9425 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:23 2020 +0200 timekeeping: Use sequence counter with associated raw spinlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_raw_spinlock_t data type, which allows to associate a raw spinlock with the sequence counter. This enables lockdep to verify that the raw spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-18-a.darwish@linutronix.de commit 77cc278f7b202e4f16f8596837219d02cb090b96 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:22 2020 +0200 xfrm: policy: Use sequence counters with associated lock A sequence counter write side critical section must be protected by some form of locking to serialize writers. If the serialization primitive is not disabling preemption implicitly, preemption has to be explicitly disabled before entering the sequence counter write side critical section. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_spinlock_t and seqcount_mutex_t data types instead, which allow to associate a lock with the sequence counter. This enables lockdep to verify that the lock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-17-a.darwish@linutronix.de commit b901892b51317b321c7bc96e2ccd2f522d1380ee Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:21 2020 +0200 netfilter: nft_set_rbtree: Use sequence counter with associated rwlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_rwlock_t data type, which allows to associate a rwlock with the sequence counter. This enables lockdep to verify that the rwlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-16-a.darwish@linutronix.de commit 8201d923f492703a7d6c980cff3034759a452b86 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:20 2020 +0200 netfilter: conntrack: Use sequence counter with associated spinlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_spinlock_t data type, which allows to associate a spinlock with the sequence counter. This enables lockdep to verify that the spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-15-a.darwish@linutronix.de commit b75058614fdd3140074a640b514f6a0b4d485a2d Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:19 2020 +0200 sched: tasks: Use sequence counter with associated spinlock A sequence counter write side critical section must be protected by some form of locking to serialize writers. A plain seqcount_t does not contain the information of which lock must be held when entering a write side critical section. Use the new seqcount_spinlock_t data type, which allows to associate a spinlock with the sequence counter. This enables lockdep to verify that the spinlock used for writer serialization is held when the write side critical section is entered. If lockdep is disabled this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-14-a.darwish@linutronix.de commit cd29f22019ec4ab998d2e1e8c831c7c42db4aa7d Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:18 2020 +0200 dma-buf: Use sequence counter with associated wound/wait mutex A sequence counter write side critical section must be protected by some form of locking to serialize writers. If the serialization primitive is not disabling preemption implicitly, preemption has to be explicitly disabled before entering the sequence counter write side critical section. The dma-buf reservation subsystem uses plain sequence counters to manage updates to reservations. Writer serialization is accomplished through a wound/wait mutex. Acquiring a wound/wait mutex does not disable preemption, so this needs to be done manually before and after the write side critical section. Use the newly-added seqcount_ww_mutex_t instead: - It associates the ww_mutex with the sequence count, which enables lockdep to validate that the write side critical section is properly serialized. - It removes the need to explicitly add preempt_disable/enable() around the write side critical section because the write_begin/end() functions for this new data type automatically do this. If lockdep is disabled this ww_mutex lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Acked-by: Daniel Vetter Link: https://lkml.kernel.org/r/20200720155530.1173732-13-a.darwish@linutronix.de commit 318ce71f3e3ae4108c1665f3860afa8a2a4c9f02 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:17 2020 +0200 dma-buf: Remove custom seqcount lockdep class key Commit 3c3b177a9369 ("reservation: add support for read-only access using rcu") introduced a sequence counter to manage updates to reservations. Back then, the reservation object initializer reservation_object_init() was always inlined. Having the sequence counter initialization inlined meant that each of the call sites would have a different lockdep class key, which would've broken lockdep's deadlock detection. The aforementioned commit thus introduced, and exported, a custom seqcount lockdep class key and name. The commit 8735f16803f00 ("dma-buf: cleanup reservation_object_init...") transformed the reservation object initializer to a normal non-inlined C function. seqcount_init(), which automatically defines the seqcount lockdep class key and must be called non-inlined, can now be safely used. Remove the seqcount custom lockdep class key, name, and export. Use seqcount_init() inside the dma reservation object initializer. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Sebastian Andrzej Siewior Acked-by: Daniel Vetter Link: https://lkml.kernel.org/r/20200720155530.1173732-12-a.darwish@linutronix.de commit ec8702da570ebb59f38471007bf71359c51b027b Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:16 2020 +0200 seqlock: Align multi-line macros newline escapes at 72 columns Parent commit, "seqlock: Extend seqcount API with associated locks", introduced a big number of multi-line macros that are newline-escaped at 72 columns. For overall cohesion, align the earlier-existing macros similarly. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-11-a.darwish@linutronix.de commit 55f3560df975f557c48aa6afc636808f31ecb87a Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:15 2020 +0200 seqlock: Extend seqcount API with associated locks A sequence counter write side critical section must be protected by some form of locking to serialize writers. If the serialization primitive is not disabling preemption implicitly, preemption has to be explicitly disabled before entering the write side critical section. There is no built-in debugging mechanism to verify that the lock used for writer serialization is held and preemption is disabled. Some usage sites like dma-buf have explicit lockdep checks for the writer-side lock, but this covers only a small portion of the sequence counter usage in the kernel. Add new sequence counter types which allows to associate a lock to the sequence counter at initialization time. The seqcount API functions are extended to provide appropriate lockdep assertions depending on the seqcount/lock type. For sequence counters with associated locks that do not implicitly disable preemption, preemption protection is enforced in the sequence counter write side functions. This removes the need to explicitly add preempt_disable/enable() around the write side critical sections: the write_begin/end() functions for these new sequence counter types automatically do this. Introduce the following seqcount types with associated locks: seqcount_spinlock_t seqcount_raw_spinlock_t seqcount_rwlock_t seqcount_mutex_t seqcount_ww_mutex_t Extend the seqcount read and write functions to branch out to the specific seqcount_LOCKTYPE_t implementation at compile-time. This avoids kernel API explosion per each new seqcount_LOCKTYPE_t added. Add such compile-time type detection logic into a new, internal, seqlock header. Document the proper seqcount_LOCKTYPE_t usage, and rationale, at Documentation/locking/seqlock.rst. If lockdep is disabled, this lock association is compiled out and has neither storage size nor runtime overhead. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-10-a.darwish@linutronix.de commit 859247d39fb008ea812e8f0c398a58a20c12899e Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:14 2020 +0200 seqlock: lockdep assert non-preemptibility on seqcount_t write Preemption must be disabled before entering a sequence count write side critical section. Failing to do so, the seqcount read side can preempt the write side section and spin for the entire scheduler tick. If that reader belongs to a real-time scheduling class, it can spin forever and the kernel will livelock. Assert through lockdep that preemption is disabled for seqcount writers. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-9-a.darwish@linutronix.de commit 8fd8ad5c5dfcb09cf62abadd4043eaf1afbbd0ce Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:13 2020 +0200 lockdep: Add preemption enabled/disabled assertion APIs Asserting that preemption is enabled or disabled is a critical sanity check. Developers are usually reluctant to add such a check in a fastpath as reading the preemption count can be costly. Extend the lockdep API with macros asserting that preemption is disabled or enabled. If lockdep is disabled, or if the underlying architecture does not support kernel preemption, this assert has no runtime overhead. References: f54bb2ec02c8 ("locking/lockdep: Add IRQs disabled/enabled assertion APIs: ...") Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-8-a.darwish@linutronix.de commit 932e46365226324d2cf26d8bdec8b51ceb296948 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:12 2020 +0200 seqlock: Implement raw_seqcount_begin() in terms of raw_read_seqcount() raw_seqcount_begin() has the same code as raw_read_seqcount(), with the exception of masking the sequence counter's LSB before returning it to the caller. Note, raw_seqcount_begin() masks the counter's LSB before returning it to the caller so that read_seqcount_retry() can fail if the counter is odd -- without the overhead of an extra branching instruction. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-7-a.darwish@linutronix.de commit 89b88845e05752b3d684eaf147f457c8dfa99c5f Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:11 2020 +0200 seqlock: Add kernel-doc for seqcount_t and seqlock_t APIs seqlock.h is now included by kernel's RST documentation, but a small number of the the exported seqlock.h functions are kernel-doc annotated. Add kernel-doc for all seqlock.h exported APIs. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-6-a.darwish@linutronix.de commit f4a27cbcec90ac04ee60e04b222e1449dcdba0bd Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:10 2020 +0200 seqlock: Reorder seqcount_t and seqlock_t API definitions The seqlock.h seqcount_t and seqlock_t API definitions are presented in the chronological order of their development rather than the order that makes most sense to readers. This makes it hard to follow and understand the header file code. Group and reorder all of the exported seqlock.h functions according to their function. First, group together the seqcount_t standard read path functions: - __read_seqcount_begin() - raw_read_seqcount_begin() - read_seqcount_begin() since each function is implemented exactly in terms of the one above it. Then, group the special-case seqcount_t readers on their own as: - raw_read_seqcount() - raw_seqcount_begin() since the only difference between the two functions is that the second one masks the sequence counter LSB while the first one does not. Note that raw_seqcount_begin() can actually be implemented in terms of raw_read_seqcount(), which will be done in a follow-up commit. Then, group the seqcount_t write path functions, instead of injecting unrelated seqcount_t latch functions between them, and order them as: - raw_write_seqcount_begin() - raw_write_seqcount_end() - write_seqcount_begin_nested() - write_seqcount_begin() - write_seqcount_end() - raw_write_seqcount_barrier() - write_seqcount_invalidate() which is the expected natural order. This also isolates the seqcount_t latch functions into their own area, at the end of the sequence counters section, and before jumping to the next one: sequential locks (seqlock_t). Do a similar grouping and reordering for seqlock_t "locking" readers vs. the "conditionally locking or lockless" ones. No implementation code was changed in any of the reordering above. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-5-a.darwish@linutronix.de commit d3b35b87f436c1b226a8061bee9c8875ba6658bd Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:09 2020 +0200 seqlock: seqcount_t latch: End read sections with read_seqcount_retry() The seqcount_t latch reader example at the raw_write_seqcount_latch() kernel-doc comment ends the latch read section with a manual smp memory barrier and sequence counter comparison. This is technically correct, but it is suboptimal: read_seqcount_retry() already contains the same logic of an smp memory barrier and sequence counter comparison. End the latch read critical section example with read_seqcount_retry(). Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-4-a.darwish@linutronix.de commit 15cbe67bbd3adeb4854c42713dbeaf2ff876beee Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:08 2020 +0200 seqlock: Properly format kernel-doc code samples Align the code samples and note sections inside kernel-doc comments with tabs. This way they can be properly parsed and rendered by Sphinx. It also makes the code samples easier to read from text editors. Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-3-a.darwish@linutronix.de commit 0d24f65e933ca89d55d17f6dbdb2a72ca88f0992 Author: Ahmed S. Darwish Date: Mon Jul 20 17:55:07 2020 +0200 Documentation: locking: Describe seqlock design and usage Proper documentation for the design and usage of sequence counters and sequential locks does not exist. Complete the seqlock.h documentation as follows: - Divide all documentation on a seqcount_t vs. seqlock_t basis. The description for both mechanisms was intermingled, which is incorrect since the usage constrains for each type are vastly different. - Add an introductory paragraph describing the internal design of, and rationale for, sequence counters. - Document seqcount_t writer non-preemptibility requirement, which was not previously documented anywhere, and provide a clear rationale. - Provide template code for seqcount_t and seqlock_t initialization and reader/writer critical sections. - Recommend using seqlock_t by default. It implicitly handles the serialization and non-preemptibility requirements of writers. At seqlock.h: - Remove references to brlocks as they've long been removed from the kernel. - Remove references to gcc-3.x since the kernel's minimum supported gcc version is 4.9. References: 0f6ed63b1707 ("no need to keep brlock macros anymore...") References: 6ec4476ac825 ("Raise gcc version requirement to 4.9") Signed-off-by: Ahmed S. Darwish Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200720155530.1173732-2-a.darwish@linutronix.de commit f05d67179def83545d257aaff40b974e5915af38 Merge: c84d53051fcb4 459e39538e612 Author: Peter Zijlstra Date: Wed Jul 29 16:14:21 2020 +0200 Merge branch 'locking/header' commit 459e39538e612b8dd130d34b93c9bfc89ecc836c Author: Herbert Xu Date: Wed Jul 29 22:33:16 2020 +1000 locking/qspinlock: Do not include atomic.h from qspinlock_types.h This patch breaks a header loop involving qspinlock_types.h. The issue is that qspinlock_types.h includes atomic.h, which then eventually includes kernel.h which could lead back to the original file via spinlock_types.h. As ATOMIC_INIT is now defined by linux/types.h, there is no longer any need to include atomic.h from qspinlock_types.h. This also allows the CONFIG_PARAVIRT hack to be removed since it was trying to prevent exactly this loop. Signed-off-by: Herbert Xu Signed-off-by: Peter Zijlstra (Intel) Acked-by: Waiman Long Link: https://lkml.kernel.org/r/20200729123316.GC7047@gondor.apana.org.au commit 7ca8cf5347f720b07a0b32a924b768f5710547e7 Author: Herbert Xu Date: Wed Jul 29 22:31:05 2020 +1000 locking/atomic: Move ATOMIC_INIT into linux/types.h This patch moves ATOMIC_INIT from asm/atomic.h into linux/types.h. This allows users of atomic_t to use ATOMIC_INIT without having to include atomic.h as that way may lead to header loops. Signed-off-by: Herbert Xu Signed-off-by: Peter Zijlstra (Intel) Acked-by: Waiman Long Link: https://lkml.kernel.org/r/20200729123105.GB7047@gondor.apana.org.au commit fcd7c9c3c35aed58aba2eea6d375f0e5b03bd6d6 Author: Valentin Schneider Date: Wed Jul 29 14:57:18 2020 +0100 arm, arm64: Fix selection of CONFIG_SCHED_THERMAL_PRESSURE Qian reported that the current setup forgoes the Kconfig dependencies and results in warnings such as: WARNING: unmet direct dependencies detected for SCHED_THERMAL_PRESSURE Depends on [n]: SMP [=y] && CPU_FREQ_THERMAL [=n] Selected by [y]: - ARM64 [=y] Revert commit e17ae7fea871 ("arm, arm64: Select CONFIG_SCHED_THERMAL_PRESSURE") and re-implement it by making the option default to 'y' for arm64 and arm, which respects Kconfig dependencies (i.e. will remain 'n' if CPU_FREQ_THERMAL=n). Fixes: e17ae7fea871 ("arm, arm64: Select CONFIG_SCHED_THERMAL_PRESSURE") Reported-by: Qian Cai Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200729135718.1871-1-valentin.schneider@arm.com commit 11ba28229f8258164731e42f4c3e93762cb6578e Merge: 8ade0c2fabd3f 1d5cd4e7773c8 Author: Mark Brown Date: Wed Jul 29 14:52:00 2020 +0100 Merge remote-tracking branch 'spi/for-5.9' into spi-next commit 8ade0c2fabd3f15e334cc1b8e3780477ae7b9662 Merge: 92ed301919932 affe93dd5b35b Author: Mark Brown Date: Wed Jul 29 14:51:58 2020 +0100 Merge remote-tracking branch 'spi/for-5.8' into spi-linus commit 1d5cd4e7773c834db011f6f0989b1882adbf13c9 Merge: 7ac9bbf6ab308 2a052590d453b Author: Mark Brown Date: Wed Jul 29 14:51:14 2020 +0100 Merge series "Some bug fix for lpspi" from Clark Wang : Hi, This patchset mainly fixes some recently discovered problems about CS for LPSPI module on i.MX8DXLEVK. Add the dt-bindings description for the new property. Clark Wang (4): spi: lpspi: Fix kernel warning dump when probe fail after calling spi_register spi: lpspi: remove unused fsl_lpspi->chipselect spi: lpspi: fix using CS discontinuously on i.MX8DXLEVK dt-bindings: lpspi: New property in document DT bindings for LPSPI .../bindings/spi/spi-fsl-lpspi.yaml | 7 ++++++ drivers/spi/spi-fsl-lpspi.c | 25 +++++++++++-------- 2 files changed, 21 insertions(+), 11 deletions(-) -- 2.17.1 commit 7ac9bbf6ab3085c2be21c90faf111930b8bdb5b2 Author: Clark Wang Date: Mon Jul 27 11:15:13 2020 +0800 dt-bindings: lpspi: New property in document DT bindings for LPSPI Add "fsl,spi-only-use-cs1-sel" to fit i.MX8DXL-EVK. Spi common code does not support use of CS signals discontinuously. It only uses CS1 without using CS0. So, add this property to re-config chipselect value. Signed-off-by: Clark Wang Link: https://lore.kernel.org/r/20200727031513.31774-1-xiaoning.wang@nxp.com Signed-off-by: Mark Brown commit 2e6bd221d96fcfd9bd1eed5cd9c008e7959daed7 Author: Hari Bathini Date: Wed Jul 29 17:14:06 2020 +0530 powerpc/kexec_file: Enable early kernel OPAL calls Kernels built with CONFIG_PPC_EARLY_DEBUG_OPAL enabled expects r8 & r9 to be filled with OPAL base & entry addresses respectively. Setting these registers allows the kernel to perform OPAL calls before the device tree is parsed. Signed-off-by: Hari Bathini Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602303975.575379.5032301944162937479.stgit@hbathini commit b5667d13be8d0928a02b46e0c6f7ab891d32f697 Author: Hari Bathini Date: Wed Jul 29 17:13:49 2020 +0530 powerpc/kexec_file: Fix kexec load failure with lack of memory hole The kexec purgatory has to run in real mode. Only the first memory block maybe accessible in real mode. And, unlike the case with panic kernel, no memory is set aside for regular kexec load. Another thing to note is, the memory for crashkernel is reserved at an offset of 128MB. So, when crashkernel memory is reserved, the memory ranges to load kexec segments shrink further as the generic code only looks for memblock free memory ranges and in all likelihood only a tiny bit of memory from 0 to 128MB would be available to load kexec segments. With kdump being used by default in general, kexec file load is likely to fail almost always. This can be fixed by changing the memory hole lookup logic for regular kexec to use the same method as kdump. This would mean that most kexec segments will overlap with crashkernel memory region. That should still be ok as the pages, whose destination address isn't available while loading, are placed in an intermediate location till a flush to the actual destination address happens during kexec boot sequence. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602302326.575379.14038896654942043093.stgit@hbathini commit 6ecd0163d36049b5f2435a8658f1320c9f3f2924 Author: Hari Bathini Date: Wed Jul 29 17:13:33 2020 +0530 powerpc/kexec_file: Add appropriate regions for memory reserve map While initrd, elfcorehdr and backup regions are already added to the reserve map, there are a few missing regions that need to be added to the memory reserve map. Add them here. And now that all the changes to load panic kernel are in place, claim likewise. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602300473.575379.4218568032039284448.stgit@hbathini commit cb350c1f1f867db16725f1bb06be033ece19e998 Author: Hari Bathini Date: Wed Jul 29 17:13:14 2020 +0530 powerpc/kexec_file: Prepare elfcore header for crashing kernel Prepare elf headers for the crashing kernel's core file using crash_prepare_elf64_headers() and pass on this info to kdump kernel by updating its command line with elfcorehdr parameter. Also, add elfcorehdr location to reserve map to avoid it from being stomped on while booting. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann [mpe: Ensure cmdline is nul terminated] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602298855.575379.15819225623219909517.stgit@hbathini commit 1a1cf93c200581c72a3cd521e1e0a1a3b5d0077d Author: Hari Bathini Date: Wed Jul 29 17:12:58 2020 +0530 powerpc/kexec_file: Setup backup region for kdump kernel Though kdump kernel boots from loaded address, the first 64KB of it is copied down to real 0. So, setup a backup region and let purgatory copy the first 64KB of crashed kernel into this backup region before booting into kdump kernel. Update reserve map with backup region and crashed kernel's memory to avoid kdump kernel from accidentially using that memory. Signed-off-by: Hari Bathini Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602294718.575379.16216507537038008623.stgit@hbathini commit 7c64e21a1c5a5bcd651d895b8faa68e9cdcc433d Author: Hari Bathini Date: Wed Jul 29 17:12:16 2020 +0530 powerpc/kexec_file: Restrict memory usage of kdump kernel Kdump kernel, used for capturing the kernel core image, is supposed to use only specific memory regions to avoid corrupting the image to be captured. The regions are crashkernel range - the memory reserved explicitly for kdump kernel, memory used for the tce-table, the OPAL region and RTAS region as applicable. Restrict kdump kernel memory to use only these regions by setting up usable-memory DT property. Also, tell the kdump kernel to run at the loaded address by setting the magic word at 0x5c. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602284284.575379.6962016255404325493.stgit@hbathini commit adfefc609e55edc5dce18a68d1526af6d70aaf86 Author: Hari Bathini Date: Wed Jul 29 17:10:32 2020 +0530 powerpc/drmem: Make LMB walk a bit more flexible Currently, numa & prom are the only users of drmem LMB walk code. Loading kdump with kexec_file also needs to walk the drmem LMBs to setup the usable memory ranges for kdump kernel. But there are couple of issues in using the code as is. One, walk_drmem_lmb() code is built into the .init section currently, while kexec_file needs it later. Two, there is no scope to pass data to the callback function for processing and/or erroring out on certain conditions. Fix that by, moving drmem LMB walk code out of .init section, adding scope to pass data to the callback function and bailing out when an error is encountered in the callback function. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602282727.575379.3979857013827701828.stgit@hbathini commit b8e55a3e5c208862eacded5aad822184f89f85d9 Author: Hari Bathini Date: Wed Jul 29 17:10:16 2020 +0530 powerpc/kexec_file: Avoid stomping memory used by special regions crashkernel region could have an overlap with special memory regions like OPAL, RTAS, TCE table & such. These regions are referred to as excluded memory ranges. Setup these ranges during image probe in order to avoid them while finding the buffer for different kdump segments. Override arch_kexec_locate_mem_hole() to locate a memory hole taking these ranges into account. Signed-off-by: Hari Bathini Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602281047.575379.6636807148335160795.stgit@hbathini commit 180adfc532a83c1d74146449f7385f767d4b8059 Author: Hari Bathini Date: Wed Jul 29 17:10:00 2020 +0530 powerpc/kexec_file: Add helper functions for getting memory ranges In kexec case, the kernel to be loaded uses the same memory layout as the running kernel. So, passing on the DT of the running kernel would be good enough. But in case of kdump, different memory ranges are needed to manage loading the kdump kernel, booting into it and exporting the elfcore of the crashing kernel. The ranges are exclude memory ranges, usable memory ranges, reserved memory ranges and crash memory ranges. Exclude memory ranges specify the list of memory ranges to avoid while loading kdump segments. Usable memory ranges list the memory ranges that could be used for booting kdump kernel. Reserved memory ranges list the memory regions for the loading kernel's reserve map. Crash memory ranges list the memory ranges to be exported as the crashing kernel's elfcore. Add helper functions for setting up the above mentioned memory ranges. This helpers facilitate in understanding the subsequent changes better and make it easy to setup the different memory ranges listed above, as and when appropriate. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602279194.575379.8526552316948643550.stgit@hbathini commit 19031275a5881233b4fc31b7dee68bf0b0758bbc Author: Hari Bathini Date: Wed Jul 29 17:09:41 2020 +0530 powerpc/kexec_file: Mark PPC64 specific code Some of the kexec_file_load code isn't PPC64 specific. Move PPC64 specific code from kexec/file_load.c to kexec/file_load_64.c. Also, rename purgatory/trampoline.S to purgatory/trampoline_64.S in the same spirit. No functional changes. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu Reviewed-by: Laurent Dufour Reviewed-by: Thiago Jung Bauermann Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602276920.575379.10390965946438306388.stgit@hbathini commit f891f19736bdf404845f97d8038054be37160ea8 Author: Hari Bathini Date: Wed Jul 29 17:09:19 2020 +0530 kexec_file: Allow archs to handle special regions while locating memory hole Some architectures may have special memory regions, within the given memory range, which can't be used for the buffer in a kexec segment. Implement weak arch_kexec_locate_mem_hole() definition which arch code may override, to take care of special regions, while trying to locate a memory hole. Also, add the missing declarations for arch overridable functions and and drop the __weak descriptors in the declarations to avoid non-weak definitions from becoming weak. Signed-off-by: Hari Bathini Tested-by: Pingfan Liu Reviewed-by: Thiago Jung Bauermann Acked-by: Dave Young Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159602273603.575379.17665852963340380839.stgit@hbathini commit fdaa7ce2016ccd09a538b05bace5f4479662ddcb Author: Anton Blanchard Date: Wed Jul 29 14:08:28 2020 +1000 powerpc/configs: Add BLK_DEV_NVME to pseries_defconfig I've forgotten to manually enable NVME when building pseries kernels for machines with NVME adapters. Since it's a reasonably common configuration, enable it by default. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200729040828.2312966-1-anton@ozlabs.org commit ada68a66b72687e6b74e35c42efd1783e84b01fd Author: Mahesh Salgaonkar Date: Tue Jun 23 15:57:50 2020 +0530 powerpc/64s: Move HMI IRQ stat from percpu variable to paca. With the proposed change in percpu bootmem allocator to use page mapping [1], the percpu first chunk memory area can come from vmalloc ranges. This makes the HMI (Hypervisor Maintenance Interrupt) handler crash the kernel whenever percpu variable is accessed in real mode. This patch fixes this issue by moving the HMI IRQ stat inside paca for safe access in realmode. [1] https://lore.kernel.org/linuxppc-dev/20200608070904.387440-1-aneesh.kumar@linux.ibm.com/ Suggested-by: Aneesh Kumar K.V Signed-off-by: Mahesh Salgaonkar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/159290806973.3642154.5244613424529764050.stgit@jupiter commit d3c61954fc1827df571e235b9a98e10108ef5c3d Author: David Lamparter Date: Fri Sep 21 01:04:22 2018 +0200 powerpc/fsl/dts: add missing P4080DS I2C devices This just adds the zl2006 voltage regulators / power monitors and the onboard I2C eeproms. The ICS9FG108 clock chip doesn't seem to have a driver, so it is left in the DTS as a comment. And for good measure, the SPD eeproms are tagged as such. Signed-off-by: David Lamparter Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20180920230422.GK487685@eidolon.nox.tf commit 3591538a31af37cf6a2d83f1da99e651a822af8b Author: Alastair D'Silva Date: Wed Apr 15 11:23:43 2020 +1000 ocxl: Address kernel doc errors & warnings This patch addresses warnings and errors from the kernel doc scripts for the OpenCAPI driver. It also makes minor tweaks to make the docs more consistent. Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200415012343.919255-3-alastair@d-silva.org commit c75d42e4c768c403f259f6c7f6217c850cf11be9 Author: Alastair D'Silva Date: Wed Apr 15 11:23:42 2020 +1000 ocxl: Remove unnecessary externs Function declarations don't need externs, remove the existing ones so they are consistent with newer code Signed-off-by: Alastair D'Silva Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200415012343.919255-2-alastair@d-silva.org commit f3054ffd71b5afd44832b2207e6e90267e1cd2d1 Author: Thadeu Lima de Souza Cascardo Date: Tue Jul 28 12:50:39 2020 -0300 selftests/powerpc: Return skip code for spectre_v2 When running under older versions of qemu of under newer versions with old machine types, some security features will not be reported to the guest. This will lead the guest OS to consider itself Vulnerable to spectre_v2. So, spectre_v2 test fails in such cases when the host is mitigated and miss predictions cannot be detected as expected by the test. Make it return the skip code instead, for this particular case. We don't want to miss the case when the test fails and the system reports as mitigated or not affected. But it is not a problem to miss failures when the system reports as Vulnerable. Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200728155039.401445-1-cascardo@canonical.com commit b859c95cf4b936b5e8019e7ab68ee2740e609ffd Author: Balamuruhan S Date: Tue Jul 28 18:33:08 2020 +0530 powerpc/test_emulate_step: Add testcases for divde[.] and divdeu[.] instructions Add testcases for divde, divde., divdeu, divdeu. emulated instructions to cover few scenarios, - with same dividend and divisor to have undefine RT for divdeu[.] - with divide by zero to have undefine RT for both divde[.] and divdeu[.] - with negative dividend to cover -|divisor| < r <= 0 if the dividend is negative for divde[.] - normal case with proper dividend and divisor for both divde[.] and divdeu[.] Signed-off-by: Balamuruhan S Reviewed-by: Sandipan Das Acked-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200728130308.1790982-4-bala24@linux.ibm.com commit 151c32bf5ebdd41114267717dc4b53d2632cbd30 Author: Balamuruhan S Date: Tue Jul 28 18:33:07 2020 +0530 powerpc/sstep: Add support for divde[.] and divdeu[.] instructions This patch adds emulation support for divde, divdeu instructions, - Divide Doubleword Extended (divde[.]) - Divide Doubleword Extended Unsigned (divdeu[.]) Signed-off-by: Balamuruhan S Reviewed-by: Sandipan Das Acked-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200728130308.1790982-3-bala24@linux.ibm.com commit 8902c6f96364d1117236948d6c7b9178f428529c Author: Balamuruhan S Date: Tue Jul 28 18:33:06 2020 +0530 powerpc/ppc-opcode: Add divde and divdeu opcodes Include instruction opcodes for divde and divdeu as macros. Signed-off-by: Balamuruhan S Reviewed-by: Sandipan Das Acked-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200728130308.1790982-2-bala24@linux.ibm.com commit 2a052590d453b701a9902b68a141ecf408bd42b0 Author: Clark Wang Date: Mon Jul 27 11:14:48 2020 +0800 spi: lpspi: fix using CS discontinuously on i.MX8DXLEVK SPI common code does not support using CS discontinuously for now. However, i.MX8DXL-EVK only uses CS1 without CS0. Therefore, add a flag is_only_cs1 to set the correct TCR[PCS]. Signed-off-by: Clark Wang Link: https://lore.kernel.org/r/20200727031448.31661-4-xiaoning.wang@nxp.com Signed-off-by: Mark Brown commit 768ba4909a1ee4c2be4437c763c7095cc58c0362 Author: Clark Wang Date: Mon Jul 27 11:14:47 2020 +0800 spi: lpspi: remove unused fsl_lpspi->chipselect The cs-gpio is initailized by spi_get_gpio_descs() now. Remove the chipselect. Signed-off-by: Clark Wang Link: https://lore.kernel.org/r/20200727031448.31661-3-xiaoning.wang@nxp.com Signed-off-by: Mark Brown commit 16d791851a8d4f490aca6467196b47178ea4d779 Author: Clark Wang Date: Mon Jul 27 11:14:46 2020 +0800 spi: lpspi: Fix kernel warning dump when probe fail after calling spi_register Calling devm_spi_register_controller() too early will cause problem. When probe failed occurs after calling devm_spi_register_controller(), the call of spi_controller_put() will trigger the following warning dump. [ 2.092138] ------------[ cut here ]------------ [ 2.096876] kernfs: can not remove 'uevent', no directory [ 2.102440] WARNING: CPU: 0 PID: 181 at fs/kernfs/dir.c:1503 kernfs_remove_by_name_ns+0xa0/0xb0 [ 2.111142] Modules linked in: [ 2.114207] CPU: 0 PID: 181 Comm: kworker/0:7 Not tainted 5.4.24-05024-g775c6e8a738c-dirty #1314 [ 2.122991] Hardware name: Freescale i.MX8DXL EVK (DT) [ 2.128141] Workqueue: events deferred_probe_work_func [ 2.133281] pstate: 60000005 (nZCv daif -PAN -UAO) [ 2.138076] pc : kernfs_remove_by_name_ns+0xa0/0xb0 [ 2.142958] lr : kernfs_remove_by_name_ns+0xa0/0xb0 [ 2.147837] sp : ffff8000122bba70 [ 2.151145] x29: ffff8000122bba70 x28: ffff8000119d6000 [ 2.156462] x27: 0000000000000000 x26: ffff800011edbce8 [ 2.161779] x25: 0000000000000000 x24: ffff00003ae4f700 [ 2.167096] x23: ffff000010184c10 x22: ffff00003a3d6200 [ 2.172412] x21: ffff800011a464a8 x20: ffff000010126a68 [ 2.177729] x19: ffff00003ae5c800 x18: 000000000000000e [ 2.183046] x17: 0000000000000001 x16: 0000000000000019 [ 2.188362] x15: 0000000000000004 x14: 000000000000004c [ 2.193679] x13: 0000000000000000 x12: 0000000000000001 [ 2.198996] x11: 0000000000000000 x10: 00000000000009c0 [ 2.204313] x9 : ffff8000122bb7a0 x8 : ffff00003a3d6c20 [ 2.209630] x7 : ffff00003a3d6380 x6 : 0000000000000001 [ 2.214946] x5 : 0000000000000001 x4 : ffff00003a05eb18 [ 2.220263] x3 : 0000000000000005 x2 : ffff8000119f1c48 [ 2.225580] x1 : 2bcbda323bf5a800 x0 : 0000000000000000 [ 2.230898] Call trace: [ 2.233345] kernfs_remove_by_name_ns+0xa0/0xb0 [ 2.237879] sysfs_remove_file_ns+0x14/0x20 [ 2.242065] device_del+0x12c/0x348 [ 2.245555] device_unregister+0x14/0x30 [ 2.249492] spi_unregister_controller+0xac/0x120 [ 2.254201] devm_spi_unregister+0x10/0x18 [ 2.258304] release_nodes+0x1a8/0x220 [ 2.262055] devres_release_all+0x34/0x58 [ 2.266069] really_probe+0x1b8/0x318 [ 2.269733] driver_probe_device+0x54/0xe8 [ 2.273833] __device_attach_driver+0x80/0xb8 [ 2.278194] bus_for_each_drv+0x74/0xc0 [ 2.282034] __device_attach+0xdc/0x138 [ 2.285876] device_initial_probe+0x10/0x18 [ 2.290063] bus_probe_device+0x90/0x98 [ 2.293901] deferred_probe_work_func+0x64/0x98 [ 2.298442] process_one_work+0x198/0x320 [ 2.302451] worker_thread+0x1f0/0x420 [ 2.306208] kthread+0xf0/0x120 [ 2.309352] ret_from_fork+0x10/0x18 [ 2.312927] ---[ end trace 58abcdfae01bd3c7 ]--- So put this function at the end of the probe sequence. Signed-off-by: Clark Wang Link: https://lore.kernel.org/r/20200727031448.31661-2-xiaoning.wang@nxp.com Signed-off-by: Mark Brown commit 6617cff6a05e7e7a679499cb1d5cd2d3bc6390c3 Author: Dan Murphy Date: Tue Jul 28 11:08:33 2020 -0500 ASoC: tlv320adcx140: Add GPO configuration and drive output config Add General Purpose Output (GPO) configuration and driver output configuration. The GPOs can be configured as a GPO, IRQ, SDOUT or a PDMCLK output. In addition the output drive can be configured with various configurations. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200728160833.24130-2-dmurphy@ti.com Signed-off-by: Mark Brown commit 63b0383f3c1c32d7ff958bf3a58c58a84cbd7450 Author: Dan Murphy Date: Tue Jul 28 11:08:32 2020 -0500 dt-bindings: tlv320adcx140: Add GPO config and drive config Add properties for configuring the General Purpose Outputs (GPO). The GPOs. There are 2 settings for each GPO, configuration and the output drive type. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200728160833.24130-1-dmurphy@ti.com Signed-off-by: Mark Brown commit e46b3c0d011eab9933c183d5b47569db8e377281 Merge: 56fbacc9bf23d e86d1aa8b60f7 Author: Joerg Roedel Date: Wed Jul 29 14:47:37 2020 +0200 Merge tag 'arm-smmu-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into next More Arm SMMU updates for 5.9 - Move Arm SMMU driver files into their own subdirectory commit 56fbacc9bf23d372d78eef3809c1ac93d88e11f4 Merge: 92ed301919932 f3e048b78ad37 e725a00a8f2e1 fc492f339f766 dee9d154f40c5 9314006dc3324 ee79e5fbc19c3 f5e383ac8b58f b1012ca8dc4f9 092550eacd040 cbe94c6e1a7d1 Author: Joerg Roedel Date: Wed Jul 29 14:42:00 2020 +0200 Merge branches 'arm/renesas', 'arm/qcom', 'arm/mediatek', 'arm/omap', 'arm/exynos', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd' and 'core' into next commit 854eb5022be04f81e318765f089f41a57c8e5d83 Author: Harish Date: Tue Jun 9 13:44:23 2020 +0530 selftests/powerpc: Fix CPU affinity for child process On systems with large number of cpus, test fails trying to set affinity by calling sched_setaffinity() with smaller size for affinity mask. This patch fixes it by making sure that the size of allocated affinity mask is dependent on the number of CPUs as reported by get_nprocs(). Fixes: 00b7ec5c9cf3 ("selftests/powerpc: Import Anton's context_switch2 benchmark") Reported-by: Shirisha Ganta Signed-off-by: Sandipan Das Signed-off-by: Harish Reviewed-by: Kamalesh Babulal Reviewed-by: Satheesh Rajendran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200609081423.529664-1-harish@linux.ibm.com commit cf1ae052e073c7ef6cf1a783a6427f7228253bd3 Author: Wei Yongjun Date: Tue Jul 28 01:11:12 2020 +0800 powerpc/powernv/sriov: Remove unused but set variable 'phb' Gcc report warning as follows: arch/powerpc/platforms/powernv/pci-sriov.c:602:25: warning: variable 'phb' set but not used [-Wunused-but-set-variable] 602 | struct pnv_phb *phb; | ^~~ This variable is not used, so this commit removing it. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200727171112.2781-1-weiyongjun1@huawei.com commit b6ac59d39a348af29477d7bfdc3ba23526e3f4ea Author: Qinglang Miao Date: Tue Jul 28 10:28:07 2020 +0800 powerpc: use for_each_child_of_node() macro Use for_each_child_of_node() macro instead of open coding it. Signed-off-by: Qinglang Miao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200728022807.87815-1-miaoqinglang@huawei.com commit d4f9cb5c5b224dca3ff752c1bb854250bf114944 Author: Gal Pressman Date: Wed Jul 22 17:03:12 2020 +0300 RDMA/efa: Add EFA 0xefa1 PCI ID Add support for 0xefa1 devices. Link: https://lore.kernel.org/r/20200722140312.3651-5-galpress@amazon.com Reviewed-by: Shadi Ammouri Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit a5d87b698547233321466b2dc91271f5855a4df6 Author: Gal Pressman Date: Wed Jul 22 17:03:11 2020 +0300 RDMA/efa: User/kernel compatibility handshake mechanism Introduce a mechanism that performs an handshake between the userspace provider and kernel driver which verifies that the user supports all required features in order to operate correctly. The handshake verifies the needed functionality by comparing the reported device caps and the provider caps. If the device reports a non-zero capability the appropriate comp mask is required from the userspace provider in order to allocate the context. Link: https://lore.kernel.org/r/20200722140312.3651-4-galpress@amazon.com Reviewed-by: Shadi Ammouri Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit da2924bdca99768442c5e0ed0a9024ae79d62765 Author: Gal Pressman Date: Wed Jul 22 17:03:10 2020 +0300 RDMA/efa: Expose minimum SQ size The device reports the minimum SQ size required for creation. This patch queries the min SQ size and reports it back to the userspace library. Link: https://lore.kernel.org/r/20200722140312.3651-3-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Shadi Ammouri Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 556c811f24b30cc883733a2eaf9e939817589231 Author: Gal Pressman Date: Wed Jul 22 17:03:09 2020 +0300 RDMA/efa: Expose maximum TX doorbell batch The device reports the maximum number of bytes to be written before ringing the doorbell (zero means unlimited). This patch queries the max batch size and reports it back to the userspace library. Link: https://lore.kernel.org/r/20200722140312.3651-2-galpress@amazon.com Reviewed-by: Daniel Kranzdorf Reviewed-by: Firas JahJah Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit cbe94c6e1a7d11050050c4d5b89bb278c163e8d6 Author: Jerry Snitselaar Date: Tue Jun 30 13:06:36 2020 -0700 iommu/amd: Move Kconfig and Makefile bits down into amd directory Move AMD Kconfig and Makefile bits down into the amd directory with the rest of the AMD specific files. Signed-off-by: Jerry Snitselaar Cc: Joerg Roedel Cc: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20200630200636.48600-3-jsnitsel@redhat.com Signed-off-by: Joerg Roedel commit ab65ba57e3acb55920999f96a6152228b52a2f49 Author: Jerry Snitselaar Date: Tue Jun 30 13:06:35 2020 -0700 iommu/vt-d: Move Kconfig and Makefile bits down into intel directory Move Intel Kconfig and Makefile bits down into intel directory with the rest of the Intel specific files. Signed-off-by: Jerry Snitselaar Reviewed-by: Lu Baolu Cc: Joerg Roedel Cc: Lu Baolu Link: https://lore.kernel.org/r/20200630200636.48600-2-jsnitsel@redhat.com Signed-off-by: Joerg Roedel commit 754498c1d6369d47b6433e9a05ba926255c2d699 Author: Hans de Goede Date: Fri Jul 24 19:47:02 2020 +0200 usb: typec: tcpm: Add WARN_ON ensure we are not trying to send 2 VDM packets at the same time The tcpm.c code for sending VDMs assumes that there will only be one VDM in flight at the time. The "queue" used by tcpm_queue_vdm is only 1 entry deep. This assumes that the higher layers (tcpm state-machine and alt-mode drivers) ensure that queuing a new VDM before the old one has been completely send (or it timed out) add a WARN_ON to check for this. Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200724174702.61754-6-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit a37241d83465dbcb1981093e139701a0755156e3 Author: Hans de Goede Date: Fri Jul 24 19:47:01 2020 +0200 usb: typec: tcpm: Fix AB BA lock inversion between tcpm code and the alt-mode drivers When we receive a PD data packet which ends up being for the alt-mode driver we have the following lock order: 1. tcpm_pd_rx_handler take the tcpm-port lock 2. We call into the alt-mode driver which takes the alt-mode's lock And when the alt-mode driver initiates communication we have the following lock order: 3. alt-mode driver takes the alt-mode's lock 4. alt-mode driver calls tcpm_altmode_enter which takes the tcpm-port lock This is a classic AB BA lock inversion issue. With the refactoring of tcpm_handle_vdm_request() done before this patch, we don't rely on, or need to make changes to the tcpm-port data by the time we make call 2. from above. All data to be passed to the alt-mode driver sits on our stack at this point, and thus does not need locking. So after the refactoring we can simply fix this by releasing the tcpm-port lock before calling into the alt-mode driver. This fixes the following lockdep warning: [ 191.454238] ====================================================== [ 191.454240] WARNING: possible circular locking dependency detected [ 191.454244] 5.8.0-rc5+ #1 Not tainted [ 191.454246] ------------------------------------------------------ [ 191.454248] kworker/u8:5/794 is trying to acquire lock: [ 191.454251] ffff9bac8e30d4a8 (&dp->lock){+.+.}-{3:3}, at: dp_altmode_vdm+0x30/0xf0 [typec_displayport] [ 191.454263] but task is already holding lock: [ 191.454264] ffff9bac9dc240a0 (&port->lock#2){+.+.}-{3:3}, at: tcpm_pd_rx_handler+0x43/0x12c0 [tcpm] [ 191.454273] which lock already depends on the new lock. [ 191.454275] the existing dependency chain (in reverse order) is: [ 191.454277] -> #1 (&port->lock#2){+.+.}-{3:3}: [ 191.454286] __mutex_lock+0x7b/0x820 [ 191.454290] tcpm_altmode_enter+0x23/0x90 [tcpm] [ 191.454293] dp_altmode_work+0xca/0xe0 [typec_displayport] [ 191.454299] process_one_work+0x23f/0x570 [ 191.454302] worker_thread+0x55/0x3c0 [ 191.454305] kthread+0x138/0x160 [ 191.454309] ret_from_fork+0x22/0x30 [ 191.454311] -> #0 (&dp->lock){+.+.}-{3:3}: [ 191.454317] __lock_acquire+0x1241/0x2090 [ 191.454320] lock_acquire+0xa4/0x3d0 [ 191.454323] __mutex_lock+0x7b/0x820 [ 191.454326] dp_altmode_vdm+0x30/0xf0 [typec_displayport] [ 191.454330] tcpm_pd_rx_handler+0x11ae/0x12c0 [tcpm] [ 191.454333] process_one_work+0x23f/0x570 [ 191.454336] worker_thread+0x55/0x3c0 [ 191.454338] kthread+0x138/0x160 [ 191.454341] ret_from_fork+0x22/0x30 [ 191.454343] other info that might help us debug this: [ 191.454345] Possible unsafe locking scenario: [ 191.454347] CPU0 CPU1 [ 191.454348] ---- ---- [ 191.454350] lock(&port->lock#2); [ 191.454353] lock(&dp->lock); [ 191.454355] lock(&port->lock#2); [ 191.454357] lock(&dp->lock); [ 191.454360] *** DEADLOCK *** Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200724174702.61754-5-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 95b4d51c96a87cd760c2a4f27fb28a59a27b6368 Author: Hans de Goede Date: Fri Jul 24 19:47:00 2020 +0200 usb: typec: tcpm: Refactor tcpm_handle_vdm_request Refactor tcpm_handle_vdm_request and its tcpm_pd_svdm helper function so that reporting the results of the vdm to the altmode-driver is separated out into a clear separate step inside tcpm_handle_vdm_request, instead of being scattered over various places inside the tcpm_pd_svdm helper. This is a preparation patch for fixing an AB BA lock inversion between the tcpm code and some altmode drivers. Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200724174702.61754-4-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 8afe9a3548f9d1805dcea6d97978f2179c8403a3 Author: Hans de Goede Date: Fri Jul 24 19:46:59 2020 +0200 usb: typec: tcpm: Refactor tcpm_handle_vdm_request payload handling Refactor the tcpm_handle_vdm_request payload handling by doing the endianness conversion only once directly inside tcpm_handle_vdm_request itself instead of doing it multiple times inside various helper functions called by tcpm_handle_vdm_request. This is a preparation patch for some further refactoring to fix an AB BA lock inversion between the tcpm code and some altmode drivers. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200724174702.61754-3-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 03eafcfb60c0da4f08a638f0dd5926fc2fc1d64a Author: Hans de Goede Date: Fri Jul 24 19:46:58 2020 +0200 usb: typec: tcpm: Add tcpm_queue_vdm_unlocked() helper Various callers (all the typec_altmode_ops) take the port-lock just for the tcpm_queue_vdm() call. Add a new tcpm_queue_vdm_unlocked() helper which takes the lock, so that its callers don't have to do this themselves. This is a preparation patch for fixing an AB BA lock inversion between the tcpm code and some altmode drivers. Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200724174702.61754-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 5f2b8d87bca528616e04344d1fc4032dc5ec0f3d Author: Hans de Goede Date: Fri Jul 24 19:46:57 2020 +0200 usb: typec: tcpm: Move mod_delayed_work(&port->vdm_state_machine) call into tcpm_queue_vdm() All callers of tcpm_queue_vdm() immediately follow the tcpm_queue_vdm() vdm call with a: mod_delayed_work(port->wq, &port->vdm_state_machine, 0); Call, fold this into tcpm_queue_vdm() itself. Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200724174702.61754-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit c804af2c1d3152c0cf877eeb50d60c2d49ac0cf0 Author: Yamin Friedman Date: Wed Jul 22 16:56:29 2020 +0300 IB/srpt: use new shared CQ mechanism Have the driver use shared CQs provided by the rdma core driver. This provides the advantage of improved efficiency handling interrupts. Link: https://lore.kernel.org/r/20200722135629.49467-3-maxg@mellanox.com Signed-off-by: Yamin Friedman Reviewed-by: Max Gurtovoy Reviewed-by: Bart Van Assche Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit c6e663072333581364a9833a8bc895c699fb85ec Author: Yamin Friedman Date: Wed Jul 22 16:56:28 2020 +0300 IB/isert: use new shared CQ mechanism Have the driver use shared CQs provided by the rdma core driver. Since this provides similar functionality to iser_comp it has been removed. Now there is no reason to allocate very large CQs when the driver is loaded while gaining the advantage of shared CQs. Previously when a single connection was opened a CQ was opened for every core with enough space for eight connections, this is a very large overhead that in most cases will not be utilized. Link: https://lore.kernel.org/r/20200722135629.49467-2-maxg@mellanox.com Signed-off-by: Yamin Friedman Signed-off-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit d56a7852ec4d194aa07e45adf5586343a4ed0b59 Author: Yamin Friedman Date: Wed Jul 22 16:56:27 2020 +0300 IB/iser: use new shared CQ mechanism Have the driver use shared CQs provided by the rdma core driver. Since this provides similar functionality to iser_comp it has been removed. Now there is no reason to allocate very large CQs when the driver is loaded while gaining the advantage of shared CQs. Link: https://lore.kernel.org/r/20200722135629.49467-1-maxg@mellanox.com Signed-off-by: Yamin Friedman Acked-by: Max Gurtovoy Reviewed-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit 2067fd92d75b6d9085a43caf050bca5d88c491b8 Author: Samuel Thibault Date: Wed Jul 29 02:35:31 2020 +0200 staging/speakup: Move out of staging The nasty TODO items are done. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20200729003531.907370-1-samuel.thibault@ens-lyon.org Signed-off-by: Greg Kroah-Hartman commit 408a68c5f64fe2f7921449d655ffef5038144f06 Author: Vaibhav Gupta Date: Tue Jul 28 18:03:49 2020 +0530 staging: sm750fb: use generic power management Drivers using legacy power management .suspen()/.resume() callbacks have to manage PCI states and device's PM states themselves. They also need to take care of standard configuration registers. Switch to generic power management framework using a single "struct dev_pm_ops" variable to take the unnecessary load from the driver. This also avoids the need for the driver to directly call most of the PCI helper functions and device power state control functions, as through the generic framework PCI Core takes care of the necessary operations, and drivers are required to do only device-specific jobs. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200728123349.1331679-1-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit 341a8f866e7252e7c0410fdd53fe513a9c12f3d2 Author: Ankit Baluni Date: Wed Jul 29 13:15:41 2020 +0530 Staging: rtl8712: Fixed a coding sytle issue Removed braces for a 'if' condition as it contain only single line & there is no need for braces for such case according to coding style rules. Signed-off-by: Ankit Baluni Link: https://lore.kernel.org/r/20200729074541.1972-1-b18007@students.iitmandi.ac.in Signed-off-by: Greg Kroah-Hartman commit 100a149ff153702f8fc7b005df7e9ea9aba5f79e Author: Colin Ian King Date: Wed Jul 29 11:05:25 2020 +0100 staging: rtl8723bs: remove redundant assignment to variable ret The variable ret is being assigned an error return value that is never read, the control passes to a return statement and ret is never referenced. Remove the redundant assignment. Also remove an empty line. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200729100525.573500-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 7f921e92e72a52e6390207d3ebeb8f3b5966ebde Author: Christian Gromm Date: Tue Jul 28 11:07:55 2020 +0200 staging: most: usb: remove NET dependency This patch removes the dependency to NET as it is no longer needed. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1595927275-27462-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 107c89497545232acac83d71600d8030b7361ca2 Merge: fa56dd9152ef9 d6f93d21001e4 Author: Greg Kroah-Hartman Date: Wed Jul 29 13:57:09 2020 +0200 Merge tag 'usb-ci-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: ENDIAN issue fix and one query controller role API is introduced. * tag 'usb-ci-v5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: imx: get available runtime dr mode for wakeup setting usb: chipidea: add query_available_role interface Documentation: ABI: usb: chipidea: Update Li Jun's e-mail usb: chipidea: udc: fix the ENDIAN issue commit 1f73d1abe5836bd8ffe747ff5cb7561b17ce5bc6 Author: Qais Yousef Date: Thu Jul 16 12:03:46 2020 +0100 Documentation/sysctl: Document uclamp sysctl knobs Uclamp exposes 3 sysctl knobs: * sched_util_clamp_min * sched_util_clamp_max * sched_util_clamp_min_rt_default Document them in sysctl/kernel.rst. Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200716110347.19553-3-qais.yousef@arm.com commit 13685c4a08fca9dd76bf53bfcbadc044ab2a08cb Author: Qais Yousef Date: Thu Jul 16 12:03:45 2020 +0100 sched/uclamp: Add a new sysctl to control RT default boost value RT tasks by default run at the highest capacity/performance level. When uclamp is selected this default behavior is retained by enforcing the requested uclamp.min (p->uclamp_req[UCLAMP_MIN]) of the RT tasks to be uclamp_none(UCLAMP_MAX), which is SCHED_CAPACITY_SCALE; the maximum value. This is also referred to as 'the default boost value of RT tasks'. See commit 1a00d999971c ("sched/uclamp: Set default clamps for RT tasks"). On battery powered devices, it is desired to control this default (currently hardcoded) behavior at runtime to reduce energy consumed by RT tasks. For example, a mobile device manufacturer where big.LITTLE architecture is dominant, the performance of the little cores varies across SoCs, and on high end ones the big cores could be too power hungry. Given the diversity of SoCs, the new knob allows manufactures to tune the best performance/power for RT tasks for the particular hardware they run on. They could opt to further tune the value when the user selects a different power saving mode or when the device is actively charging. The runtime aspect of it further helps in creating a single kernel image that can be run on multiple devices that require different tuning. Keep in mind that a lot of RT tasks in the system are created by the kernel. On Android for instance I can see over 50 RT tasks, only a handful of which created by the Android framework. To control the default behavior globally by system admins and device integrator, introduce the new sysctl_sched_uclamp_util_min_rt_default to change the default boost value of the RT tasks. I anticipate this to be mostly in the form of modifying the init script of a particular device. To avoid polluting the fast path with unnecessary code, the approach taken is to synchronously do the update by traversing all the existing tasks in the system. This could race with a concurrent fork(), which is dealt with by introducing sched_post_fork() function which will ensure the racy fork will get the right update applied. Tested on Juno-r2 in combination with the RT capacity awareness [1]. By default an RT task will go to the highest capacity CPU and run at the maximum frequency, which is particularly energy inefficient on high end mobile devices because the biggest core[s] are 'huge' and power hungry. With this patch the RT task can be controlled to run anywhere by default, and doesn't cause the frequency to be maximum all the time. Yet any task that really needs to be boosted can easily escape this default behavior by modifying its requested uclamp.min value (p->uclamp_req[UCLAMP_MIN]) via sched_setattr() syscall. [1] 804d402fb6f6: ("sched/rt: Make RT capacity-aware") Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200716110347.19553-2-qais.yousef@arm.com commit e65855a52b479f98674998cb23b21ef5a8144b04 Author: Qais Yousef Date: Thu Jul 16 12:03:47 2020 +0100 sched/uclamp: Fix a deadlock when enabling uclamp static key The following splat was caught when setting uclamp value of a task: BUG: sleeping function called from invalid context at ./include/linux/percpu-rwsem.h:49 cpus_read_lock+0x68/0x130 static_key_enable+0x1c/0x38 __sched_setscheduler+0x900/0xad8 Fix by ensuring we enable the key outside of the critical section in __sched_setscheduler() Fixes: 46609ce22703 ("sched/uclamp: Protect uclamp fast path code with static key") Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200716110347.19553-4-qais.yousef@arm.com commit f2af201002a8bc22500c04cc474ea480bf361351 Author: Nicholas Piggin Date: Tue Mar 3 11:27:48 2020 +1000 powerpc/build: vdso linker warning for orphan sections Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200303012748.4190929-1-npiggin@gmail.com commit 5e66a0cb5fbdc76f9ad86a1e8f43256dbad29ef7 Author: Gustavo A. R. Silva Date: Mon Jul 27 17:42:01 2020 -0500 powerpc: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200727224201.GA10133@embeddedor commit bf6b7661f41615c0815fce0a3f27acb5fc005470 Author: Aneesh Kumar K.V Date: Mon Jul 27 14:29:08 2020 +0530 powerpc/book3s64/radix: Add kernel command line option to disable radix GTSE This adds a kernel command line option that can be used to disable GTSE support. Disabling GTSE implies kernel will make hcalls to invalidate TLB entries. This was done so that we can do VM migration between configs that enable/disable GTSE support via hypervisor. To migrate a VM from a system that supports GTSE to a system that doesn't, we can boot the guest with radix_hcall_invalidate=on, thereby forcing the guest to use hcalls for TLB invalidates. The check for hcall availability is done in pSeries_setup_arch so that the panic message appears on the console. This should only happen on a hypervisor that doesn't force the guest to hash translation even though it can't handle the radix GTSE=0 request via CAS. With radix_hcall_invalidate=on if the hypervisor doesn't support hcall_rpt_invalidate hcall it should force the LPAR to hash translation. Signed-off-by: Aneesh Kumar K.V Tested-by: Bharata B Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200727085908.420806-1-aneesh.kumar@linux.ibm.com commit a5a8b258da7861009240b57687dfef47af91b406 Author: Aneesh Kumar K.V Date: Mon Jul 13 20:37:49 2020 +0530 powerpc/kvm/cma: Improve kernel log during boot Current kernel gives: [ 0.000000] cma: Reserved 26224 MiB at 0x0000007959000000 [ 0.000000] hugetlb_cma: reserve 65536 MiB, up to 16384 MiB per node [ 0.000000] cma: Reserved 16384 MiB at 0x0000001800000000 With the fix [ 0.000000] kvm_cma_reserve: reserving 26214 MiB for global area [ 0.000000] cma: Reserved 26224 MiB at 0x0000007959000000 [ 0.000000] hugetlb_cma: reserve 65536 MiB, up to 16384 MiB per node [ 0.000000] cma: Reserved 16384 MiB at 0x0000001800000000 Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200713150749.25245-2-aneesh.kumar@linux.ibm.com commit ef26b76d1af61b90eb0dd3da58ad4f97d8e028f8 Author: Aneesh Kumar K.V Date: Mon Jul 13 20:37:48 2020 +0530 powerpc/hugetlb/cma: Allocate gigantic hugetlb pages using CMA commit: cf11e85fc08c ("mm: hugetlb: optionally allocate gigantic hugepages using cma") added support for allocating gigantic hugepages using CMA. This patch enables the same for powerpc Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200713150749.25245-1-aneesh.kumar@linux.ibm.com commit 81a413259a224f0d1783c41a74f18864d4f3d67e Author: Balamuruhan S Date: Mon Mar 30 13:29:54 2020 +0530 powerpc/xmon: Use `dcbf` inplace of `dcbi` instruction for 64bit Book3S Data Cache Block Invalidate (dcbi) instruction implemented back in PowerPC architecture version 2.03. But as per Power Processor Users Manual it is obsolete and not supported by POWER8/POWER9 core. Attempt to use of this illegal instruction results in a hypervisor emulation assistance interrupt. So, ifdef it out the option `i` in xmon for 64bit Book3S. 0:mon> fi cpu 0x0: Vector: 700 (Program Check) at [c000000003be74a0] pc: c000000000102030: cacheflush+0x180/0x1a0 lr: c000000000101f3c: cacheflush+0x8c/0x1a0 sp: c000000003be7730 msr: 8000000000081033 current = 0xc0000000035e5c00 paca = 0xc000000001910000 irqmask: 0x03 irq_happened: 0x01 pid = 1025, comm = bash Linux version 5.6.0-rc5-g5aa19adac (root@ltc-wspoon6) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #1 SMP Tue Mar 10 04:38:41 CDT 2020 cpu 0x0: Exception 700 (Program Check) in xmon, returning to main loop [c000000003be7c50] c00000000084abb0 __handle_sysrq+0xf0/0x2a0 [c000000003be7d00] c00000000084b3c0 write_sysrq_trigger+0xb0/0xe0 [c000000003be7d30] c0000000004d1edc proc_reg_write+0x8c/0x130 [c000000003be7d60] c00000000040dc7c __vfs_write+0x3c/0x70 [c000000003be7d80] c000000000410e70 vfs_write+0xd0/0x210 [c000000003be7dd0] c00000000041126c ksys_write+0xdc/0x130 [c000000003be7e20] c00000000000b9d0 system_call+0x5c/0x68 --- Exception: c01 (System Call) at 00007fffa345e420 SP (7ffff0b08ab0) is in userspace Signed-off-by: Balamuruhan S Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200330075954.538773-1-bala24@linux.ibm.com commit ee36d867b2fefeb6fb6661b27e62e29c9ca5e7e5 Author: Michael Ellerman Date: Fri Jul 24 23:17:28 2020 +1000 powerpc: Drop old comment about CONFIG_POWER There's a comment in time.h referring to CONFIG_POWER, which doesn't exist. That confuses scripts/checkkconfigsymbols.py. Presumably the comment was referring to a CONFIG_POWER vs CONFIG_PPC, in which case for CONFIG_POWER we would #define __USE_RTC to 1. But instead we have CONFIG_PPC_BOOK3S_601, and these days we have IS_ENABLED(). So the comment is no longer relevant, drop it. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131728.1643966-9-mpe@ellerman.id.au commit 157dad8678ad910ef7579c3f8ba93cc2940b014b Author: Michael Ellerman Date: Fri Jul 24 23:17:27 2020 +1000 powerpc/kvm: Use correct CONFIG symbol in comment This comment refers to the non-existent CONFIG_PPC_BOOK3S_XX, which confuses scripts/checkkconfigsymbols.py. Change it to use the correct symbol. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131728.1643966-8-mpe@ellerman.id.au commit e5eff89657e72a9050d95fde146b54c7dc165981 Author: Michael Ellerman Date: Fri Jul 24 23:17:26 2020 +1000 powerpc/boot: Fix CONFIG_PPC_MPC52XX references Commit 866bfc75f40e ("powerpc: conditionally compile platform-specific serial drivers") made some code depend on CONFIG_PPC_MPC52XX, which doesn't exist. Fix it to use CONFIG_PPC_MPC52xx. Fixes: 866bfc75f40e ("powerpc: conditionally compile platform-specific serial drivers") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131728.1643966-7-mpe@ellerman.id.au commit 69eeff022433b54390a359c629f6457d7d1a8e94 Author: Michael Ellerman Date: Fri Jul 24 23:17:25 2020 +1000 powerpc/32s: Remove TAUException wart in traps.c All 32 and 64-bit builds that don't have CONFIG_TAU_INT enabled (all of them), get a definition of TAUException() in traps.c. On 64-bit it's completely useless, and just wastes ~120 bytes of text. On 32-bit it allows the kernel to link because head_32.S calls it unconditionally. Instead follow the example of altivec_assist_exception(), and if CONFIG_TAU_INT is not enabled just point it at unknown_exception using the preprocessor. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131728.1643966-6-mpe@ellerman.id.au commit df4d4ef22446b3a789a4efd74d34f2ec1e24deb2 Author: Michael Ellerman Date: Fri Jul 24 23:17:24 2020 +1000 powerpc/32s: Fix CONFIG_BOOK3S_601 uses We have two uses of CONFIG_BOOK3S_601, which doesn't exist. Fix them to use CONFIG_PPC_BOOK3S_601 which is the correct symbol. Fixes: 12c3f1fd87bf ("powerpc/32s: get rid of CPU_FTR_601 feature") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131728.1643966-5-mpe@ellerman.id.au commit 07e571ea59eef518730f983f4203651ea413f2cf Author: Michael Ellerman Date: Fri Jul 24 23:17:23 2020 +1000 powerpc/64e: Drop dead BOOK3E_MMU_TLB_STATS code This code was merged 11 years ago in commit 13363ab9b9d0 ("powerpc: Add definitions used by exception handling on 64-bit Book3E") but was never able to be built because CONFIG_BOOK3E_MMU_TLB_STATS never existed. Remove it. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131728.1643966-4-mpe@ellerman.id.au commit 8cdcde5f76a42d53a50d1fc9e1fbfc9b90102323 Author: Michael Ellerman Date: Fri Jul 24 23:17:22 2020 +1000 powerpc/52xx: Fix comment about CONFIG_BDI* There's a comment in lite5200_sleep.S that refers to "CONFIG_BDI*". This confuses scripts/checkkconfigsymbols.py, which thinks it should be able to find CONFIG_BDI. Change the comment to refer to CONFIG_BDI_SWITCH which is presumably roughly what it was referring to. AFAICS there never has been a CONFIG_BDI. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131728.1643966-3-mpe@ellerman.id.au commit 0fcce25b7743d634cc1ddce83382f51333933f76 Author: Michael Ellerman Date: Fri Jul 24 23:17:21 2020 +1000 powerpc/configs: Remove dead symbols Remove references to symbols that no longer exist as reported by scripts/checkkconfigsymbols.py. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131728.1643966-2-mpe@ellerman.id.au commit fbb44c9a08ef994109947c5439e649b18ad509ac Author: Michael Ellerman Date: Fri Jul 24 23:17:20 2020 +1000 powerpc/configs: Drop old symbols from ppc6xx_defconfig ppc6xx_defconfig refers to quite a few symbols that no longer exist, as reported by scripts/checkkconfigsymbols.py, remove them. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131728.1643966-1-mpe@ellerman.id.au commit 55548a86ebde2b3691b6a84baef1b02933408994 Author: Bharata B Rao Date: Mon Jul 27 15:27:04 2020 +0530 powerpc/mm: Limit resize_hpt_for_hotplug() call to hash guests only During memory hotplug and unplug, resize_hpt_for_hotplug() gets called for both hash and radix guests but it should be called only for hash guests. Though the call does nothing in the radix guest case, it is cleaner to push this call into hash specific memory hotplug routines. Reported-by: Nathan Lynch Signed-off-by: Bharata B Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200727095704.1432916-1-bharata@linux.ibm.com commit 73da08f6966b81feb429af4fb3229da4cf21d6d9 Author: Michael Ellerman Date: Fri Jul 24 19:25:28 2020 +1000 selftests/powerpc: Remove powerpc special cases from stack expansion test Now that the powerpc code behaves the same as other architectures we can drop the special cases we had. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724092528.1578671-5-mpe@ellerman.id.au commit 773b3e53df5b84e73bf64998e4019f50a6662ad1 Author: Michael Ellerman Date: Fri Jul 24 19:25:27 2020 +1000 powerpc/mm: Remove custom stack expansion checking We have powerpc specific logic in our page fault handling to decide if an access to an unmapped address below the stack pointer should expand the stack VMA. The logic aims to prevent userspace from doing bad accesses below the stack pointer. However as long as the stack is < 1MB in size, we allow all accesses without further checks. Adding some debug I see that I can do a full kernel build and LTP run, and not a single process has used more than 1MB of stack. So for the majority of processes the logic never even fires. We also recently found a nasty bug in this code which could cause userspace programs to be killed during signal delivery. It went unnoticed presumably because most processes use < 1MB of stack. The generic mm code has also grown support for stack guard pages since this code was originally written, so the most heinous case of the stack expanding into other mappings is now handled for us. Finally although some other arches have special logic in this path, from what I can tell none of x86, arm64, arm and s390 impose any extra checks other than those in expand_stack(). So drop our complicated logic and like other architectures just let the stack expand as long as its within the rlimit. Signed-off-by: Michael Ellerman Tested-by: Daniel Axtens Link: https://lore.kernel.org/r/20200724092528.1578671-4-mpe@ellerman.id.au commit 9ee571d84bf8cfdd587a1acbf3490ca90fc40c9d Author: Michael Ellerman Date: Fri Jul 24 19:25:26 2020 +1000 selftests/powerpc: Update the stack expansion test Update the stack expansion load/store test to take into account the new allowance of 4224 bytes below the stack pointer. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724092528.1578671-3-mpe@ellerman.id.au commit 63dee5df43a31f3844efabc58972f0a206ca4534 Author: Michael Ellerman Date: Fri Jul 24 19:25:25 2020 +1000 powerpc: Allow 4224 bytes of stack expansion for the signal frame We have powerpc specific logic in our page fault handling to decide if an access to an unmapped address below the stack pointer should expand the stack VMA. The code was originally added in 2004 "ported from 2.4". The rough logic is that the stack is allowed to grow to 1MB with no extra checking. Over 1MB the access must be within 2048 bytes of the stack pointer, or be from a user instruction that updates the stack pointer. The 2048 byte allowance below the stack pointer is there to cover the 288 byte "red zone" as well as the "about 1.5kB" needed by the signal delivery code. Unfortunately since then the signal frame has expanded, and is now 4224 bytes on 64-bit kernels with transactional memory enabled. This means if a process has consumed more than 1MB of stack, and its stack pointer lies less than 4224 bytes from the next page boundary, signal delivery will fault when trying to expand the stack and the process will see a SEGV. The total size of the signal frame is the size of struct rt_sigframe (which includes the red zone) plus __SIGNAL_FRAMESIZE (128 bytes on 64-bit). The 2048 byte allowance was correct until 2008 as the signal frame was: struct rt_sigframe { struct ucontext uc; /* 0 1440 */ /* --- cacheline 11 boundary (1408 bytes) was 32 bytes ago --- */ long unsigned int _unused[2]; /* 1440 16 */ unsigned int tramp[6]; /* 1456 24 */ struct siginfo * pinfo; /* 1480 8 */ void * puc; /* 1488 8 */ struct siginfo info; /* 1496 128 */ /* --- cacheline 12 boundary (1536 bytes) was 88 bytes ago --- */ char abigap[288]; /* 1624 288 */ /* size: 1920, cachelines: 15, members: 7 */ /* padding: 8 */ }; 1920 + 128 = 2048 Then in commit ce48b2100785 ("powerpc: Add VSX context save/restore, ptrace and signal support") (Jul 2008) the signal frame expanded to 2304 bytes: struct rt_sigframe { struct ucontext uc; /* 0 1696 */ <-- /* --- cacheline 13 boundary (1664 bytes) was 32 bytes ago --- */ long unsigned int _unused[2]; /* 1696 16 */ unsigned int tramp[6]; /* 1712 24 */ struct siginfo * pinfo; /* 1736 8 */ void * puc; /* 1744 8 */ struct siginfo info; /* 1752 128 */ /* --- cacheline 14 boundary (1792 bytes) was 88 bytes ago --- */ char abigap[288]; /* 1880 288 */ /* size: 2176, cachelines: 17, members: 7 */ /* padding: 8 */ }; 2176 + 128 = 2304 At this point we should have been exposed to the bug, though as far as I know it was never reported. I no longer have a system old enough to easily test on. Then in 2010 commit 320b2b8de126 ("mm: keep a guard page below a grow-down stack segment") caused our stack expansion code to never trigger, as there was always a VMA found for a write up to PAGE_SIZE below r1. That meant the bug was hidden as we continued to expand the signal frame in commit 2b0a576d15e0 ("powerpc: Add new transactional memory state to the signal context") (Feb 2013): struct rt_sigframe { struct ucontext uc; /* 0 1696 */ /* --- cacheline 13 boundary (1664 bytes) was 32 bytes ago --- */ struct ucontext uc_transact; /* 1696 1696 */ <-- /* --- cacheline 26 boundary (3328 bytes) was 64 bytes ago --- */ long unsigned int _unused[2]; /* 3392 16 */ unsigned int tramp[6]; /* 3408 24 */ struct siginfo * pinfo; /* 3432 8 */ void * puc; /* 3440 8 */ struct siginfo info; /* 3448 128 */ /* --- cacheline 27 boundary (3456 bytes) was 120 bytes ago --- */ char abigap[288]; /* 3576 288 */ /* size: 3872, cachelines: 31, members: 8 */ /* padding: 8 */ /* last cacheline: 32 bytes */ }; 3872 + 128 = 4000 And commit 573ebfa6601f ("powerpc: Increase stack redzone for 64-bit userspace to 512 bytes") (Feb 2014): struct rt_sigframe { struct ucontext uc; /* 0 1696 */ /* --- cacheline 13 boundary (1664 bytes) was 32 bytes ago --- */ struct ucontext uc_transact; /* 1696 1696 */ /* --- cacheline 26 boundary (3328 bytes) was 64 bytes ago --- */ long unsigned int _unused[2]; /* 3392 16 */ unsigned int tramp[6]; /* 3408 24 */ struct siginfo * pinfo; /* 3432 8 */ void * puc; /* 3440 8 */ struct siginfo info; /* 3448 128 */ /* --- cacheline 27 boundary (3456 bytes) was 120 bytes ago --- */ char abigap[512]; /* 3576 512 */ <-- /* size: 4096, cachelines: 32, members: 8 */ /* padding: 8 */ }; 4096 + 128 = 4224 Then finally in 2017, commit 1be7107fbe18 ("mm: larger stack guard gap, between vmas") exposed us to the existing bug, because it changed the stack VMA to be the correct/real size, meaning our stack expansion code is now triggered. Fix it by increasing the allowance to 4224 bytes. Hard-coding 4224 is obviously unsafe against future expansions of the signal frame in the same way as the existing code. We can't easily use sizeof() because the signal frame structure is not in a header. We will either fix that, or rip out all the custom stack expansion checking logic entirely. Fixes: ce48b2100785 ("powerpc: Add VSX context save/restore, ptrace and signal support") Cc: stable@vger.kernel.org # v2.6.27+ Reported-by: Tom Lane Tested-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724092528.1578671-2-mpe@ellerman.id.au commit c9938a9dac95be7650218cdd8e9d1f882e7b5691 Author: Michael Ellerman Date: Fri Jul 24 19:25:24 2020 +1000 selftests/powerpc: Add test of stack expansion logic We have custom stack expansion checks that it turns out are extremely badly tested and contain bugs, surprise. So add some tests that exercise the code and capture the current boundary conditions. The signal test currently fails on 64-bit kernels because the 2048 byte allowance for the signal frame is too small, we will fix that in a subsequent patch. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724092528.1578671-1-mpe@ellerman.id.au commit 5f8cf6475828b600ff6d000e580c961ac839cc61 Author: Oliver O'Halloran Date: Mon Jul 27 11:01:27 2020 +1000 selftests/powerpc: Squash spurious errors due to device removal For drivers that don't have the error handling callbacks we implement recovery by removing the device and re-probing it. This causes the sysfs directory for the PCI device to be removed which causes the following spurious error to be printed when checking the PE state: Breaking 0005:03:00.0... ./eeh-basic.sh: line 13: can't open /sys/bus/pci/devices/0005:03:00.0/eeh_pe_state: no such file 0005:03:00.0, waited 0/60 0005:03:00.0, waited 1/60 0005:03:00.0, waited 2/60 0005:03:00.0, waited 3/60 0005:03:00.0, waited 4/60 0005:03:00.0, waited 5/60 0005:03:00.0, waited 6/60 0005:03:00.0, waited 7/60 0005:03:00.0, Recovered after 8 seconds We currently try to avoid this by checking if the PE state file exists before reading from it. This is however inherently racy so re-work the state checking so that we only read from the file once, and we squash any errors that occur while reading. Fixes: 85d86c8aa52e ("selftests/powerpc: Add basic EEH selftest") Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200727010127.23698-1-oohall@gmail.com commit c27f2fd1705a7e19ef2dc2b986c0d1cde3c3dbe7 Author: Sandipan Das Date: Mon Jul 27 09:30:40 2020 +0530 selftests/powerpc: Add test for pkey siginfo verification Commit c46241a370a61 ("powerpc/pkeys: Check vma before returning key fault error to the user") fixes a bug which causes the kernel to set the wrong pkey in siginfo when a pkey fault occurs after two competing threads that have allocated different pkeys, one fully permissive and the other restrictive, attempt to protect a common page at the same time. This adds a test to detect the bug. Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ce40b6ee270bda52e8f4088578ed2faf7d1d509a.1595821792.git.sandipan@linux.ibm.com commit 743f3544fffb9662aaf550c8358a8c1b6fcae707 Author: Sandipan Das Date: Mon Jul 27 09:30:39 2020 +0530 selftests/powerpc: Add wrapper for gettid The gettid() syscall wrapper was first introduced in glibc 2.30. This adds a wrapper for use in distros running older versions. Suggested-by: Christophe Leroy Suggested-by: Michael Ellerman Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8ca3b0eeda989707815d1cf337cc33f090408965.1595821792.git.sandipan@linux.ibm.com commit e3333c599482245d08002725cc1b353e4963fa26 Author: Sandipan Das Date: Mon Jul 27 09:30:38 2020 +0530 selftests/powerpc: Add helper to exit on failure This adds a helper similar to FAIL_IF() which lets a program exit with code 1 (to indicate failure) when the given condition is true. Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/dac282d5c2e96e7816dc522e4e20d56d7c79c898.1595821792.git.sandipan@linux.ibm.com commit 03634bbf5d8a6f2d97e6150a1b8ff03675badac3 Author: Sandipan Das Date: Mon Jul 27 09:30:37 2020 +0530 selftests/powerpc: Harden test for execute-disabled pkeys Commit 192b6a7805989 ("powerpc/book3s64/pkeys: Fix pkey_access_permitted() for execute disable pkey") fixed a bug that caused repetitive faults for pkeys with no execute rights alongside some combination of read and write rights. This removes the last two cases of the test, which check the behaviour of pkeys with read, write but no execute rights and all the rights, in favour of checking all the possible combinations of read, write and execute rights to be able to detect bugs like the one mentioned above. Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/db467500f8af47727bba6b35796e8974a78b71e5.1595821792.git.sandipan@linux.ibm.com commit 264d7fccc4711328a19f07e6bd57aee4c68803aa Author: Sandipan Das Date: Mon Jul 27 09:30:36 2020 +0530 selftests/powerpc: Add pkey helpers for rights This adds some new pkey-related helper to print access rights of a pkey in the "rwx" format and to generate different valid combinations of pkey rights starting from a given combination. Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6cc1c7d1f686618668a3e090f1d0c2a4cd9dea3f.1595821792.git.sandipan@linux.ibm.com commit 128d3d0210076232b7d54c361082c8ee17e4b669 Author: Sandipan Das Date: Mon Jul 27 09:30:35 2020 +0530 selftests/powerpc: Move pkey helpers to headers This moves all the pkey-related helpers to a new header file and also a helper to print error messages in signal handlers to the existing utils header file. Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/28e633fa9ec1a6500c12188e09ea1887b10a10c1.1595821792.git.sandipan@linux.ibm.com commit 107c55005fbd5243ee31fb13b6f166cde9e3ade1 Author: Nicholas Piggin Date: Sun Jul 26 13:51:55 2020 +1000 powerpc/pseries: Add KVM guest doorbell restrictions KVM guests have certain restrictions and performance quirks when using doorbells. This patch moves the EPAPR KVM guest test so it can be shared with PSERIES, and uses that in doorbell setup code to apply the KVM guest quirks and improves IPI performance for two cases: - PowerVM guests may now use doorbells even if they are secure. - KVM guests no longer use doorbells if XIVE is available. There is a valid complaint that "KVM guest" is not a very reasonable thing to test for, it's preferable for the hypervisor to advertise particular behaviours to the guest so they could change if the hypervisor implementation or configuration changes. However in this case we were already assuming a KVM guest worst case, so this patch is about containing those quirks. If KVM later advertises fast doorbells, we should test for that and override the quirks. Signed-off-by: Nicholas Piggin Tested-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726035155.1424103-4-npiggin@gmail.com commit 5b06d1679f2fe874ef49ea11324cd893ec9e2da8 Author: Nicholas Piggin Date: Sun Jul 26 13:51:54 2020 +1000 powerpc/pseries: Use doorbells even if XIVE is available KVM supports msgsndp in guests by trapping and emulating the instruction, so it was decided to always use XIVE for IPIs if it is available. However on PowerVM systems, msgsndp can be used and gives better performance. On large systems, high XIVE interrupt rates can have sub-linear scaling, and using msgsndp can reduce the load on the interrupt controller. So switch to using core local doorbells even if XIVE is available. This reduces performance for KVM guests with an SMT topology by about 50% for ping-pong context switching between SMT vCPUs. An option vector (or dt-cpu-ftrs) could be defined to disable msgsndp to get KVM performance back. Signed-off-by: Nicholas Piggin Tested-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726035155.1424103-3-npiggin@gmail.com commit 1f0ce497433f8944045ee1baae218e31a0d295ee Author: Nicholas Piggin Date: Sun Jul 26 13:51:53 2020 +1000 powerpc: Inline doorbell sending functions These are only called in one place for a given platform, so inline them for performance. Signed-off-by: Nicholas Piggin Tested-by: Cédric Le Goater [mpe: Fix build errors related to KVM] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726035155.1424103-2-npiggin@gmail.com commit 443359aebce0e17148251c0e316801fe69aa7d33 Author: Athira Rajeev Date: Wed Jul 29 00:16:54 2020 -0400 powerpc/perf: Fix MMCRA_BHRB_DISABLE define for binutils < 2.28 Commit 9908c826d5ed ("powerpc/perf: Add Power10 PMU feature to DT CPU features") defines MMCRA_BHRB_DISABLE as `0x2000000000UL`. Binutils version less than 2.28 doesn't support UL suffix. arch/powerpc/kernel/cpu_setup_power.S: Assembler messages: arch/powerpc/kernel/cpu_setup_power.S:250: Error: found 'L', expected: ')' arch/powerpc/kernel/cpu_setup_power.S:250: Error: junk at end of line, first unrecognized character is `L' arch/powerpc/kernel/cpu_setup_power.S:250: Error: found 'L', expected: ')' arch/powerpc/kernel/cpu_setup_power.S:250: Error: found 'L', expected: ')' arch/powerpc/kernel/cpu_setup_power.S:250: Error: junk at end of line, first unrecognized character is `L' arch/powerpc/kernel/cpu_setup_power.S:250: Error: found 'L', expected: ')' arch/powerpc/kernel/cpu_setup_power.S:250: Error: found 'L', expected: ')' arch/powerpc/kernel/cpu_setup_power.S:250: Error: operand out of range (0x0000002000000000 is not between 0xffffffffffff8000 and 0x000000000000ffff) Fix this by wrapping it with the `_UL` macro. Fixes: 9908c826d5ed ("Add Power10 PMU feature to DT CPU features") Suggested-by: Michael Ellerman Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1595996214-5833-1-git-send-email-atrajeev@linux.vnet.ibm.com commit e5448d7ec656e6c5ed59f4adfc979742fd1f9b07 Author: Dan Murphy Date: Tue Jul 28 11:43:39 2020 -0500 ASoC: tlv320adcx140: Fix various style errors and warnings Fix white space issues and remove else case where it was not needed. Convert "static const char *" to "static const char * const" Fixes: 689c7655b50 ("ASoC: tlv320adcx140: Add the tlv320adcx140 codec driver family") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200728164339.16841-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 4fd5750af02ab7bba7c58a073060cc1da8a69173 Author: Peter Zijlstra Date: Mon Jul 20 23:49:18 2020 +0200 sched,tracing: Convert to sched_set_fifo() One module user of sched_setscheduler() was overlooked and is obviously causing build failures. Convert ring_buffer_benchmark to use sched_set_fifo_low() when fifo==1 and sched_set_fifo() when fifo==2. This is a bit of an abuse, but it makes the thing 'work' again. Specifically, it enables all combinations that were previously possible: producer higher than consumer consumer higher than producer Fixes: 616d91b68cd5 ("sched: Remove sched_setscheduler*() EXPORTs") Reported-by: kernel test robot Reported-by: Stephen Rothwell Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Steven Rostedt (VMware) Link: https://lkml.kernel.org/r/20200720214918.GM5523@worktop.programming.kicks-ass.net commit 09e91cdedaa5f736c398e6b0ca8ab76fd7a71afa Author: Lukas Bulwahn Date: Tue Jul 28 06:58:50 2020 +0200 MAINTAINERS: update entry to thermal governors file name prefixing Commit 0015d9a2a727 ("thermal/governors: Prefix all source files with gov_") renamed power_allocator.c to gov_power_allocator.c in ./drivers/thermal amongst some other file renames, but missed to adjust the MAINTAINERS entry. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: drivers/thermal/power_allocator.c Update the file entry in MAINTAINERS to the new file name. Signed-off-by: Lukas Bulwahn Acked-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200728045850.22661-1-lukas.bulwahn@gmail.com commit 25be77e588a63b064e8d9c1b59975e6882abc2f9 Author: Daniel Lezcano Date: Tue Jul 28 01:10:33 2020 +0200 thermal: core: Add thermal zone enable/disable notification Now the calls to enable/disable a thermal zone are centralized in a call to a function, we can add in these the corresponding netlink notifications. Signed-off-by: Daniel Lezcano Acked-by: Zhang Rui Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20200727231033.26512-1-daniel.lezcano@linaro.org commit bb34bf798ce7d53cf68a801a3cd96b47874ff867 Author: kernel test robot Date: Wed Jul 29 08:03:13 2020 +0800 habanalabs: goya_ctx_init() can be static Signed-off-by: kernel test robot Link: https://lore.kernel.org/r/20200729000313.GA14680@e442e3f624c4 Signed-off-by: Greg Kroah-Hartman commit 9e7c0efadb86ddb58965561bbca638d44792d78f Author: Colin Xu Date: Thu Jul 9 15:09:57 2020 +0800 drm/i915/gvt: Do not reset pv_notified when vGPU transit from D3->D0 Unlike full initialization like normal boot, guest driver won't pv_notified GVT when vGPU transit from D3->D0. If pv_notified is reset, later vGPU operations will trigger enter into failsafe mode. Considering the fact that vGPU will at least notify GVT pv_notified once before D3/D0 transition, it's safe to skip reset pv_notified in D3->D0. To test this feature, make sure S3 is enabled in QEMU parameters: i440fx: PIIX4_PM.disable_s3=0 q35: ICH9-LPC.disable_s3=0 Also need enable sleep option in guest OS if it's disabled. v2: - Revise commit message to more accurate description. (Kevin) - Split patch by logic. (Zhenyu) Reviewed-by: Zhenyu Wang Signed-off-by: Hang Yuan Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200709071002.247960-3-colin.xu@intel.com commit ba25d977571e1551b7032d6104e49efd6f88f8ad Author: Colin Xu Date: Thu Jul 9 15:09:56 2020 +0800 drm/i915/gvt: Do not destroy ppgtt_mm during vGPU D3->D0. When system enters S3 state, device enters D3 state while RAM remains powered. From vGPU/GVT perspective, ppgtt_mm is residual in guest memory during vGPU in D3 state, so that when guest state transits from S3->S0, ppgtt_mm can be re-used and no need rebuild. Previous implementation invalidate and destroy ppgtt_mm at DMLR, regardless the power state transition is S0->S3->S0 (guest suspend or resume) or OFF->S0 (normal boot/reboot), invalidate and destroy ppgtt_mm is unnecessary in the former transition case. The patch saves the vGPU D3/D0 transition state when guest writes the PCI_PM_CTRL in vGPU's configure space, then in later DMLR, GVT can decide whether or not invalidate and destroy ppgtt_mm is required. The d3_entered flags is reset after DMLR. To test this feature, make sure S3 is enabled in QEMU parameters: i440fx: PIIX4_PM.disable_s3=0 q35: ICH9-LPC.disable_s3=0 Also need enable sleep option in guest OS if it's disabled. v2: - Revise commit message to more accurate description. (Kevin) - Split patch by logic. (Zhenyu) Reviewed-by: Zhenyu Wang Signed-off-by: Hang Yuan Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20200709071002.247960-2-colin.xu@intel.com commit 7b16a15524d5db449cf5e529602610cdf04eddab Author: Greg Kroah-Hartman Date: Tue Jul 28 19:18:51 2020 +0200 habanalabs: fix up absolute include instructions There's no need to try to be cute with the include file locations in the Makefile, so just specify exactly where the files are. Bonus is this fixes the problem of building with O= as well as trying to just build the subdirectory alone. Reported-by: Stephen Rothwell Cc: Oded Gabbay Cc: Omer Shpigelman Cc: Tomer Tayar Cc: Moti Haimovski Cc: Ofir Bitton Cc: Ben Segal Cc: Christine Gharzuzi Cc: Pawel Piskorski Link: https://lore.kernel.org/r/20200728171851.55842-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b6cec06d19d90db5dbcc50034fb33983f6259b8b Author: Chaitanya Kulkarni Date: Tue Jul 28 19:36:48 2020 -0700 nvme-loop: remove extra variable in create ctrl We can call the nvme_change_ctrl_state() directly and have WARN_ON_ONCE(1) call instead of having to use an extra variable which matches the name of the function. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 64d452b3560b7a55277c8d9ef0a8635e62136580 Author: Chaitanya Kulkarni Date: Tue Jul 28 19:36:47 2020 -0700 nvme-loop: set ctrl state connecting after init When creating a loop controller (ctrl) in nvme_loop_create_ctrl() -> nvme_init_ctrl() we set the ctrl state to NVME_CTRL_NEW. Prior to [1] NVME_CTRL_NEW state was allowed in nvmf_check_ready() for fabrics command type connect. Now, this fails in the following code path for fabrics connect command when creating admin queue :- nvme_loop_create_ctrl() nvme_loo_configure_admin_queue() nvmf_connect_admin_queue() __nvme_submit_sync_cmd() blk_execute_rq() nvme_loop_queue_rq() nvmf_check_ready() # echo "transport=loop,nqn=fs" > /dev/nvme-fabrics [ 6047.741327] nvmet: adding nsid 1 to subsystem fs [ 6048.756430] nvme nvme1: Connect command failed, error wo/DNR bit: 880 We need to set the ctrl state to NVME_CTRL_CONNECTING after :- nvme_loop_create_ctrl() nvme_init_ctrl() so that the above mentioned check for nvmf_check_ready() will return true. This patch sets the ctrl state to connecting after we init the ctrl in nvme_loop_create_ctrl() nvme_init_ctrl() . [1] commit aa63fa6776a7 ("nvme-fabrics: allow to queue requests for live queues") Fixes: aa63fa6776a7 ("nvme-fabrics: allow to queue requests for live queues") Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Tested-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit fbd6a42d8932e172921c7de10468a2e12c34846b Author: Hannes Reinecke Date: Mon Jul 27 18:08:03 2020 +0200 nvme-multipath: do not fall back to __nvme_find_path() for non-optimized paths When nvme_round_robin_path() finds a valid namespace we should be using it; falling back to __nvme_find_path() for non-optimized paths will cause the result from nvme_round_robin_path() to be ignored for non-optimized paths. Fixes: 75c10e732724 ("nvme-multipath: round-robin I/O policy") Signed-off-by: Martin Wilck Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 3f6e3246db0e6f92e784965d9d0edb8abe6c6b74 Author: Martin Wilck Date: Mon Jul 27 18:08:02 2020 +0200 nvme-multipath: fix logic for non-optimized paths Handle the special case where we have exactly one optimized path, which we should keep using in this case. Fixes: 75c10e732724 ("nvme-multipath: round-robin I/O policy") Signed off-by: Martin Wilck Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 9f98772ba307dd89a3d17dc2589f213d3972fc64 Author: Sagi Grimberg Date: Mon Jul 27 17:32:09 2020 -0700 nvme-rdma: fix controller reset hang during traffic commit fe35ec58f0d3 ("block: update hctx map when use multiple maps") exposed an issue where we may hang trying to wait for queue freeze during I/O. We call blk_mq_update_nr_hw_queues which in case of multiple queue maps (which we have now for default/read/poll) is attempting to freeze the queue. However we never started queue freeze when starting the reset, which means that we have inflight pending requests that entered the queue that we will not complete once the queue is quiesced. So start a freeze before we quiesce the queue, and unfreeze the queue after we successfully connected the I/O queues (and make sure to call blk_mq_update_nr_hw_queues only after we are sure that the queue was already frozen). This follows to how the pci driver handles resets. Fixes: fe35ec58f0d3 ("block: update hctx map when use multiple maps") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 2875b0aecabe2f081a8432e2bc85b85df0529490 Author: Sagi Grimberg Date: Fri Jul 24 15:10:12 2020 -0700 nvme-tcp: fix controller reset hang during traffic commit fe35ec58f0d3 ("block: update hctx map when use multiple maps") exposed an issue where we may hang trying to wait for queue freeze during I/O. We call blk_mq_update_nr_hw_queues which in case of multiple queue maps (which we have now for default/read/poll) is attempting to freeze the queue. However we never started queue freeze when starting the reset, which means that we have inflight pending requests that entered the queue that we will not complete once the queue is quiesced. So start a freeze before we quiesce the queue, and unfreeze the queue after we successfully connected the I/O queues (and make sure to call blk_mq_update_nr_hw_queues only after we are sure that the queue was already frozen). This follows to how the pci driver handles resets. Fixes: fe35ec58f0d3 ("block: update hctx map when use multiple maps") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit d9174c1a5da02cf7477b2aae0bcc1a236d3c0262 Author: Chaitanya Kulkarni Date: Fri Jul 24 11:25:20 2020 -0600 nvmet: introduce the passthru Kconfig option This patch updates KConfig file for the NVMeOF target where we add new option so that user can selectively enable/disable passthru code. Signed-off-by: Chaitanya Kulkarni [logang@deltatee.com: fixed some of the wording in the help message] Signed-off-by: Logan Gunthorpe Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit cae5b01a2afc2058bee94b4b8f873d3a4a9ec41e Author: Logan Gunthorpe Date: Fri Jul 24 11:25:19 2020 -0600 nvmet: introduce the passthru configfs interface When CONFIG_NVME_TARGET_PASSTHRU as 'passthru' directory will be added to each subsystem. The directory is similar to a namespace and has two attributes: device_path and enable. The user must set the path to the nvme controller's char device and write '1' to enable the subsystem to use passthru. Any given subsystem is prevented from enabling both a regular namespace and the passthru device. If one is enabled, enabling the other will produce an error. Signed-off-by: Logan Gunthorpe Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit ba76af676cd0514614b5a99b8adad9d3956f5d7d Author: Logan Gunthorpe Date: Fri Jul 24 11:25:18 2020 -0600 nvmet: Add passthru enable/disable helpers This patch adds helper functions which are used in the NVMeOF configfs when the user is configuring the passthru subsystem. Here we ensure that only one subsys is assigned to each nvme_ctrl by using an xarray on the cntlid. The subsystem's version number is overridden by the passed through controller's version. However, if that version is less than 1.2.1, then we bump the advertised version to that and print a warning in dmesg. Based-on-a-patch-by: Chaitanya Kulkarni Signed-off-by: Logan Gunthorpe Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit c1fef73f793b7fd9d2ffcb5ef85807ea55bf7adb Author: Logan Gunthorpe Date: Fri Jul 24 11:25:17 2020 -0600 nvmet: add passthru code to process commands Add passthru command handling capability for the NVMeOF target and export passthru APIs which are used to integrate passthru code with nvmet-core. The new file passthru.c handles passthru cmd parsing and execution. In the passthru mode, we create a block layer request from the nvmet request and map the data on to the block layer request. Admin commands and features are on an allow list as there are a number of each that don't make too much sense with passthrough. We use an allow list such that new commands can be considered before being blindly passed through. In both cases, vendor specific commands are always allowed. We also reject reservation IO commands as the underlying device cannot differentiate between multiple hosts behind a fabric. Based-on-a-patch-by: Chaitanya Kulkarni Signed-off-by: Logan Gunthorpe Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 24493b8b854a67234c5c142a7ea075e2174a3084 Author: Logan Gunthorpe Date: Fri Jul 24 11:25:16 2020 -0600 nvme: export nvme_find_get_ns() and nvme_put_ns() nvme_find_get_ns() and nvme_put_ns() are required by the target passthru code and are exported under the NVME_TARGET_PASSTHRU namespace. Based-on-a-patch-by: Chaitanya Kulkarni Signed-off-by: Logan Gunthorpe Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit f783f444ceaa7eab043a7a5ae0e34c68743c0358 Author: Logan Gunthorpe Date: Fri Jul 24 11:25:15 2020 -0600 nvme: introduce nvme_ctrl_get_by_path() nvme_ctrl_get_by_path() is analogous to blkdev_get_by_path() except it gets a struct nvme_ctrl from the path to its char dev (/dev/nvme0). It makes use of filp_open() to open the file and uses the private data to obtain a pointer to the struct nvme_ctrl. If the fops of the file do not match, -EINVAL is returned. The purpose of this function is to support NVMe-OF target passthru and is exported under the NVME_TARGET_PASSTHRU namespace. Signed-off-by: Logan Gunthorpe Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig commit 17365ae6975c7f7494a2d1cd0bf18b5ed238e072 Author: Logan Gunthorpe Date: Fri Jul 24 11:25:14 2020 -0600 nvme: introduce nvme_execute_passthru_rq to call nvme_passthru_[start|end]() Introduce a new nvme_execute_passthru_rq() helper which calls nvme_passthru_[start|end]() around blk_execute_rq(). This ensures all passthru calls (including nvme_submit_io()) will be wrapped appropriately. nvme_execute_passthru_rq() will also be useful for the nvmet passthru code and is exported in the NVME_TARGET_PASSTHRU namespace. Signed-off-by: Logan Gunthorpe Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit df21b6b1934e89c2cc2bb1332146ed6c2df1321c Author: Logan Gunthorpe Date: Fri Jul 24 11:25:13 2020 -0600 nvme: create helper function to obtain command effects Separate the code to obtain command effects from the code to start a passthru request and move the nvme_passthru_start() and nvme_passthru_end() functions up above nvme_submit_user_cmd() in order that they may be used in a new helper a subsequent patch. The new helper function will be necessary for nvmet passthru code to determine if we need to change out of interrupt context to handle the effects. It is exported in the NVME_TARGET_PASSTHRU namespace. Signed-off-by: Logan Gunthorpe Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit 2bf5d3bbffad06639db518c8dcf8a14c7dce770e Author: Logan Gunthorpe Date: Fri Jul 24 11:25:12 2020 -0600 nvme: clear any SGL flags in passthru commands The host driver should decide whether to use SGLs or PRPs and they currently assume the flags are cleared after the call to nvme_setup_cmd(). However, passed-through commands may erroneously set these bits; so clear them for all cases. Signed-off-by: Logan Gunthorpe Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit ece0278c1c96905c53a6cbb253927530fc707cfa Author: James Smart Date: Fri Jul 24 09:40:48 2020 -0700 nvmet-fc: remove redundant del_work_active flag The transport has a del_work_active flag to avoid duplicate scheduling of the del_work item. This is redundant with the checks that schedule_work() makes. Remove the del_work_active flag. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 34efa23234c8b55dd178bba2216ca9ae9b50e1c9 Author: James Smart Date: Fri Jul 24 09:40:00 2020 -0700 nvmet-fc: check successful reference in nvmet_fc_find_target_assoc When searching for an association based on an association id, when there is a match, the code takes a reference. However, it is not validating that the reference taking was successful. Check the status of the reference. If unsuccessful, the device is being deleted and should be ignored. Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 237480760c5050e8e897846b93ba9ffdb6444301 Author: James Smart Date: Tue Jul 14 12:03:36 2020 -0700 nvme-fc: set max_segments to lldd max value Currently the FC transport is set max_hw_sectors based on the lldds max sgl segment count. However, the block queue max segments is set based on the controller's max_segments count, which the transport does not set. As such, the lldd is receiving sgl lists that are exceeding its max segment count. Set the controller max segment count and derive max_hw_sectors from the max segment count. Signed-off-by: James Smart Reviewed-by: Max Gurtovoy Reviewed-by: Himanshu Madhani Reviewed-by: Ewan D. Milne Signed-off-by: Christoph Hellwig commit fe5e26a70cc544004b9aa9c3b96cb1d1cc132e09 Author: Randy Dunlap Date: Sat Jul 18 17:30:15 2020 -0700 nvme-fc: drop a duplicated word in a comment Drop the repeated word "a" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Christoph Hellwig commit 653303f21682916dc3a70c24f68233b4392d52d6 Author: Sagi Grimberg Date: Thu Jul 23 18:14:10 2020 -0700 nvme-hwmon: log the controller device name Stay consistent with the rest of the driver Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit ecca390e80561debbfdb4dc96bf94595136889fa Author: Sagi Grimberg Date: Wed Jul 22 16:32:19 2020 -0700 nvme: fix deadlock in disconnect during scan_work and/or ana_work A deadlock happens in the following scenario with multipath: 1) scan_work(nvme0) detects a new nsid while nvme0 is an optimized path to it, path nvme1 happens to be inaccessible. 2) Before scan_work is complete nvme0 disconnect is initiated nvme_delete_ctrl_sync() sets nvme0 state to NVME_CTRL_DELETING 3) scan_work(1) attempts to submit IO, but nvme_path_is_optimized() observes nvme0 is not LIVE. Since nvme1 is a possible path IO is requeued and scan_work hangs. -- Workqueue: nvme-wq nvme_scan_work [nvme_core] kernel: Call Trace: kernel: __schedule+0x2b9/0x6c0 kernel: schedule+0x42/0xb0 kernel: io_schedule+0x16/0x40 kernel: do_read_cache_page+0x438/0x830 kernel: read_cache_page+0x12/0x20 kernel: read_dev_sector+0x27/0xc0 kernel: read_lba+0xc1/0x220 kernel: efi_partition+0x1e6/0x708 kernel: check_partition+0x154/0x244 kernel: rescan_partitions+0xae/0x280 kernel: __blkdev_get+0x40f/0x560 kernel: blkdev_get+0x3d/0x140 kernel: __device_add_disk+0x388/0x480 kernel: device_add_disk+0x13/0x20 kernel: nvme_mpath_set_live+0x119/0x140 [nvme_core] kernel: nvme_update_ns_ana_state+0x5c/0x60 [nvme_core] kernel: nvme_set_ns_ana_state+0x1e/0x30 [nvme_core] kernel: nvme_parse_ana_log+0xa1/0x180 [nvme_core] kernel: nvme_mpath_add_disk+0x47/0x90 [nvme_core] kernel: nvme_validate_ns+0x396/0x940 [nvme_core] kernel: nvme_scan_work+0x24f/0x380 [nvme_core] kernel: process_one_work+0x1db/0x380 kernel: worker_thread+0x249/0x400 kernel: kthread+0x104/0x140 -- 4) Delete also hangs in flush_work(ctrl->scan_work) from nvme_remove_namespaces(). Similiarly a deadlock with ana_work may happen: if ana_work has started and calls nvme_mpath_set_live and device_add_disk, it will trigger I/O. When we trigger disconnect I/O will block because our accessible (optimized) path is disconnecting, but the alternate path is inaccessible, so I/O blocks. Then disconnect tries to flush the ana_work and hangs. [ 605.550896] Workqueue: nvme-wq nvme_ana_work [nvme_core] [ 605.552087] Call Trace: [ 605.552683] __schedule+0x2b9/0x6c0 [ 605.553507] schedule+0x42/0xb0 [ 605.554201] io_schedule+0x16/0x40 [ 605.555012] do_read_cache_page+0x438/0x830 [ 605.556925] read_cache_page+0x12/0x20 [ 605.557757] read_dev_sector+0x27/0xc0 [ 605.558587] amiga_partition+0x4d/0x4c5 [ 605.561278] check_partition+0x154/0x244 [ 605.562138] rescan_partitions+0xae/0x280 [ 605.563076] __blkdev_get+0x40f/0x560 [ 605.563830] blkdev_get+0x3d/0x140 [ 605.564500] __device_add_disk+0x388/0x480 [ 605.565316] device_add_disk+0x13/0x20 [ 605.566070] nvme_mpath_set_live+0x5e/0x130 [nvme_core] [ 605.567114] nvme_update_ns_ana_state+0x2c/0x30 [nvme_core] [ 605.568197] nvme_update_ana_state+0xca/0xe0 [nvme_core] [ 605.569360] nvme_parse_ana_log+0xa1/0x180 [nvme_core] [ 605.571385] nvme_read_ana_log+0x76/0x100 [nvme_core] [ 605.572376] nvme_ana_work+0x15/0x20 [nvme_core] [ 605.573330] process_one_work+0x1db/0x380 [ 605.574144] worker_thread+0x4d/0x400 [ 605.574896] kthread+0x104/0x140 [ 605.577205] ret_from_fork+0x35/0x40 [ 605.577955] INFO: task nvme:14044 blocked for more than 120 seconds. [ 605.579239] Tainted: G OE 5.3.5-050305-generic #201910071830 [ 605.580712] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 605.582320] nvme D 0 14044 14043 0x00000000 [ 605.583424] Call Trace: [ 605.583935] __schedule+0x2b9/0x6c0 [ 605.584625] schedule+0x42/0xb0 [ 605.585290] schedule_timeout+0x203/0x2f0 [ 605.588493] wait_for_completion+0xb1/0x120 [ 605.590066] __flush_work+0x123/0x1d0 [ 605.591758] __cancel_work_timer+0x10e/0x190 [ 605.593542] cancel_work_sync+0x10/0x20 [ 605.594347] nvme_mpath_stop+0x2f/0x40 [nvme_core] [ 605.595328] nvme_stop_ctrl+0x12/0x50 [nvme_core] [ 605.596262] nvme_do_delete_ctrl+0x3f/0x90 [nvme_core] [ 605.597333] nvme_sysfs_delete+0x5c/0x70 [nvme_core] [ 605.598320] dev_attr_store+0x17/0x30 Fix this by introducing a new state: NVME_CTRL_DELETE_NOIO, which will indicate the phase of controller deletion where I/O cannot be allowed to access the namespace. NVME_CTRL_DELETING still allows mpath I/O to be issued to the bottom device, and only after we flush the ana_work and scan_work (after nvme_stop_ctrl and nvme_prep_remove_namespaces) we change the state to NVME_CTRL_DELETING_NOIO. Also we prevent ana_work from re-firing by aborting early if we are not LIVE, so we should be safe here. In addition, change the transport drivers to follow the updated state machine. Fixes: 0d0b660f214d ("nvme: add ANA support") Reported-by: Anton Eidelman Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 4212f4e94633f3403c3871d11213badc50b3f6e4 Author: Sagi Grimberg Date: Wed Jul 22 16:32:18 2020 -0700 nvme: document nvme controller states We are starting to see some non-trivial states so lets start documenting them. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 7774e77ebedcfeeac8cce61533b590269650dcf7 Author: Chaitanya Kulkarni Date: Sun Jul 19 20:32:02 2020 -0700 nvmet: use xarray for ctrl ns storing This patch replaces the ctrl->namespaces tracking from linked list to xarray and improves the performance when accessing one namespce :- XArray vs Default:- IOPS and BW (more the better) increase BW (~1.8%):- --------------------------------------------------- XArray :- read: IOPS=160k, BW=626MiB/s (656MB/s)(18.3GiB/30001msec) read: IOPS=160k, BW=626MiB/s (656MB/s)(18.3GiB/30001msec) read: IOPS=162k, BW=631MiB/s (662MB/s)(18.5GiB/30001msec) Default:- read: IOPS=156k, BW=609MiB/s (639MB/s)(17.8GiB/30001msec) read: IOPS=157k, BW=613MiB/s (643MB/s)(17.0GiB/30001msec) read: IOPS=160k, BW=626MiB/s (656MB/s)(18.3GiB/30001msec) Submission latency (less the better) decrease (~8.3%):- ------------------------------------------------------- XArray:- slat (usec): min=7, max=8386, avg=11.19, stdev=5.96 slat (usec): min=7, max=441, avg=11.09, stdev=4.48 slat (usec): min=7, max=1088, avg=11.21, stdev=4.54 Default :- slat (usec): min=8, max=2826.5k, avg=23.96, stdev=3911.50 slat (usec): min=8, max=503, avg=12.52, stdev=5.07 slat (usec): min=8, max=2384, avg=12.50, stdev=5.28 CPU Usage (less the better) decrease (~5.2%):- ---------------------------------------------- XArray:- cpu : usr=1.84%, sys=18.61%, ctx=949471, majf=0, minf=250 cpu : usr=1.83%, sys=18.41%, ctx=950262, majf=0, minf=237 cpu : usr=1.82%, sys=18.82%, ctx=957224, majf=0, minf=234 Default:- cpu : usr=1.70%, sys=19.21%, ctx=858196, majf=0, minf=251 cpu : usr=1.82%, sys=19.98%, ctx=929720, majf=0, minf=227 cpu : usr=1.83%, sys=20.33%, ctx=947208, majf=0, minf=235. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit ca0f1a8055be2a04073af435dc68419334481638 Author: Yamin Friedman Date: Mon Jul 13 11:53:30 2020 +0300 nvmet-rdma: use new shared CQ mechanism Has the driver use shared CQs providing ~10%-20% improvement when multiple disks are used. Instead of opening a CQ for each QP per controller, a CQ for each core will be provided by the RDMA core driver that will be shared between the QPs on that core reducing interrupt overhead. Signed-off-by: Yamin Friedman Signed-off-by: Max Gurtovoy Reviewed-by: Or Gerlitz Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 287f329e3131a4e7d7ce9a7e8e6189698d1763f8 Author: Yamin Friedman Date: Mon Jul 13 11:53:29 2020 +0300 nvme-rdma: use new shared CQ mechanism Has the driver use shared CQs providing ~10%-20% improvement as seen in the patch introducing shared CQs. Instead of opening a CQ for each QP per controller connected, a CQ for each QP will be provided by the RDMA core driver that will be shared between the QPs on that core reducing interrupt overhead. Signed-off-by: Yamin Friedman Signed-off-by: Max Gurtovoy Reviewed-by: Or Gerlitz Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit df4f9bc4fb9cb338b1c21cf99c6e905d3b78e91d Author: David E. Box Date: Thu Jul 9 11:43:33 2020 -0700 nvme-pci: add support for ACPI StorageD3Enable property This patch implements a solution for a BIOS hack used on some currently shipping Intel systems to change driver power management policy for PCIe NVMe drives. Some newer Intel platforms, like some Comet Lake systems, require that PCIe devices use D3 when doing suspend-to-idle in order to allow the platform to realize maximum power savings. This is particularly needed to support ATX power supply shutdown on desktop systems. In order to ensure this happens for root ports with storage devices, Microsoft apparently created this ACPI _DSD property as a way to influence their driver policy. To my knowledge this property has not been discussed with the NVME specification body. Though the solution is not ideal, it addresses a problem that also affects Linux since the NVMe driver's default policy of using NVMe APST during suspend-to-idle prevents the PCI root port from going to D3 and leads to higher power consumption for these platforms. The power consumption difference may be negligible on laptop systems, but many watts on desktop systems when the ATX power supply is blocked from powering down. The patch creates a new nvme_acpi_storage_d3 function to check for the StorageD3Enable property during probe and enables D3 as a quirk if set. It also provides a 'noacpi' module parameter to allow skipping the quirk if needed. Tested with: - PM961 NVMe SED Samsung 512GB - INTEL SSDPEKKF512G8 Link: https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro Signed-off-by: David E. Box Reviewed-by: Rafael J. Wysocki Signed-off-by: Christoph Hellwig commit b13c6393be7dfa780835fd4400d16d0ec1cf128f Author: Chaitanya Kulkarni Date: Mon Jul 20 15:23:37 2020 +0200 nvme-pci: use max of PRP or SGL for iod size >From the initial implementation of NVMe SGL kernel support commit a7a7cbe353a5 ("nvme-pci: add SGL support") with addition of the commit 943e942e6266 ("nvme-pci: limit max IO size and segments to avoid high order allocations") now there is only caller left for nvme_pci_iod_alloc_size() which statically passes true for last parameter that calculates allocation size based on SGL since we need size of biggest command supported for mempool allocation. This patch modifies the helper functions nvme_pci_iod_alloc_size() such that it is now uses maximum of PRP and SGL size for iod allocation size calculation. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 6c3c05b087ada8947cd31895f67e433070446234 Author: Chaitanya Kulkarni Date: Thu Jul 16 17:51:37 2020 -0700 nvme-core: replace ctrl page size with a macro Saving the nvme controller's page size was from a time when the driver tried to use different sized pages, but this value is always set to a constant, and has been this way for some time. Remove the 'page_size' field and replace its usage with the constant value. This also lets the compiler make some micro-optimizations in the io path, and that's always a good thing. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 5887450b69e72d4b472a7d049773f6a01bc24cd7 Author: Baolin Wang Date: Mon Jul 13 14:25:21 2020 +0800 nvme: remove redundant validation in nvme_start_ctrl() We've already validated the 'kato' in nvme_start_keep_alive(), thus no need to validate it again in nvme_start_ctrl(). Remove it. Signed-off-by: Baolin Wang Signed-off-by: Christoph Hellwig commit eca9e8271e596b73e3ccefdcd26eb85b46b21a34 Author: Dan Carpenter Date: Tue Jul 14 13:57:32 2020 +0300 nvme: remove an unnecessary condition "v" is an unsigned int so it can't be more than UINT_MAX. Removing this check makes it easier to preserve the error code as well. Signed-off-by: Dan Carpenter Signed-off-by: Christoph Hellwig commit fc13638ae92ee9eb861732d642d922d577b82a9e Author: Douglas Gilbert Date: Fri Jul 24 11:55:31 2020 -0400 scsi: scsi_debug: Implement tur_ms_to_ready parameter The current driver responds to TEST UNIT READY (TUR) with a GOOD status immediately after a scsi_debug device (LU) is created. This is unrealistic as even SSDs take some time after power-on before accepting media access commands. Add the tur_ms_to_ready parameter whose unit is milliseconds (default 0) and is the period before which a TUR (or any media access command) will set the CHECK CONDITION status with a sense key of NOT READY and an additional sense of "Logical unit is in process of becoming ready". The period starts when each scsi_debug device is created. This patch was prompted by T10 proposal 20-061r2 which was accepted on 2020716. It adds that a TUR in the situation described in the previous paragraph may set the INFO field (or descriptor) in the sense data to the estimated number in milliseconds before a subsequent TUR will yield a GOOD status. This patch follows that advice. Link: https://lore.kernel.org/r/20200724155531.668144-1-dgilbert@interlog.com Reported-by: kernel test robot Signed-off-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 84905d34f14987687ab1be64f15b453d11a41e55 Author: Douglas Gilbert Date: Thu Jul 23 15:48:19 2020 -0400 scsi: scsi_debug: Fix request sense The SCSI REQUEST SENSE command emulation was found to be broken. It is a quite complex command so try and make it do a subset of what it should do. Remove the attempt to mimic SCSI-1 REQUEST SENSE (i.e. return the sense data for the previous failed command). Add some reporting of "pollable" sense data [see spc6r02: 5.12.2]. Keep the IEC mode page MRIE=6 TEST=1 predictive failure reporting. Link: https://lore.kernel.org/r/20200723194819.545573-1-dgilbert@interlog.com Signed-off-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 02e3e588f0e1176e89c46b7aa27aebb947ec4ccd Author: Ferruh Yigit Date: Tue Jul 28 15:56:06 2020 +0100 scsi: lpfc: Fix typo in comment for ULP UPL -> ULP for "Upper Layer Protocol" Link: https://lore.kernel.org/r/20200728145606.1601726-1-ferruh.yigit@intel.com Signed-off-by: Ferruh Yigit Signed-off-by: Martin K. Petersen commit 818d5a91559ffe1e1f2095dcbbdb96c13fdb94ec Author: Xiao Yang Date: Tue Jul 28 08:57:21 2020 -0700 fs/xfs: Support that ioctl(SETXFLAGS/GETXFLAGS) can set/get inode DAX on XFS. 1) FS_DAX_FL has been introduced by commit b383a73f2b83. 2) In future, chattr/lsattr command from e2fsprogs can set/get inode DAX on XFS by calling ioctl(SETXFLAGS/GETXFLAGS). Signed-off-by: Xiao Yang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0f89edcd8e8484dd1790ec474a650dd774c6b75e Author: Allison Collins Date: Mon Jul 20 21:47:31 2020 -0700 xfs: Lift -ENOSPC handler from xfs_attr_leaf_addname Lift -ENOSPC handler from xfs_attr_leaf_addname. This will help to reorganize transitions between the attr forms later. Signed-off-by: Allison Collins Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit bf4a5cfffee096624764d5aed82f786c708dfe90 Author: Allison Collins Date: Mon Jul 20 21:47:31 2020 -0700 xfs: Simplify xfs_attr_node_addname Invert the rename logic in xfs_attr_node_addname to simplify the delayed attr logic later. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 5fdca0ad5c95464a60c5954f853c22127f8bb64f Author: Allison Collins Date: Mon Jul 20 21:47:31 2020 -0700 xfs: Simplify xfs_attr_leaf_addname Invert the rename logic in xfs_attr_leaf_addname to simplify the delayed attr logic later. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 72b97ea40d23b333175323251d6afecb565a0b53 Author: Allison Collins Date: Mon Jul 20 21:47:30 2020 -0700 xfs: Add helper function xfs_attr_node_removename_rmt This patch adds another new helper function xfs_attr_node_removename_rmt. This will also help modularize xfs_attr_node_removename when we add delay ready attributes later. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Chandan Rajendra Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 674eb548cf0ced1487ee229f96af2c7cf0099d2a Author: Allison Collins Date: Mon Jul 20 21:47:30 2020 -0700 xfs: Add helper function xfs_attr_node_removename_setup This patch adds a new helper function xfs_attr_node_removename_setup. This will help modularize xfs_attr_node_removename when we add delay ready attributes later. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Chandan Rajendra [darrick: fix unused variable complaints by 0day robot] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner Reported-by: kernel test robot commit 410c19885db5f7c4fca55b437e199e18252142b6 Author: Allison Collins Date: Mon Jul 20 21:47:29 2020 -0700 xfs: Add remote block helper functions This patch adds two new helper functions xfs_attr_store_rmt_blk and xfs_attr_restore_rmt_blk. These two helpers assist to remove redundant code associated with storing and retrieving remote blocks during the attr set operations. Signed-off-by: Allison Collins Reviewed-by: Chandan Rajendra Reviewed-by: Amir Goldstein Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit f44df68c82dc060b9b9942e204096447e1efc677 Author: Allison Collins Date: Mon Jul 20 21:47:28 2020 -0700 xfs: Add helper function xfs_attr_leaf_mark_incomplete This patch helps to simplify xfs_attr_node_removename by modularizing the code around the transactions into helper functions. This will make the function easier to follow when we introduce delayed attributes. Signed-off-by: Allison Collins Reviewed-by: Amir Goldstein Reviewed-by: Chandan Rajendra Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit db1a28cc591c1abe5470bedca1a489bb165c4c7c Author: Allison Collins Date: Mon Jul 20 21:47:28 2020 -0700 xfs: Add helpers xfs_attr_is_shortform and xfs_attr_set_shortform In this patch, we hoist code from xfs_attr_set_args into two new helpers xfs_attr_is_shortform and xfs_attr_set_shortform. These two will help to simplify xfs_attr_set_args when we get into delayed attrs later. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Chandan Rajendra Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit a237f2ddae4b79797fcb4290116acda38323da16 Author: Allison Collins Date: Mon Jul 20 21:47:28 2020 -0700 xfs: Remove xfs_trans_roll in xfs_attr_node_removename A transaction roll is not necessary immediately after setting the INCOMPLETE flag when removing a node xattr entry with remote value blocks. The remote block invalidation that immediately follows setting the flag is an in-core only change. The next step after that is to start unmapping the remote blocks from the attr fork, but the xattr remove transaction reservation includes reservation for full tree splits of the dabtree and bmap tree. The remote block unmap code will roll the transaction as extents are unmapped and freed. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 0feaef17db9ddf0d97676eaa258dc55ff504cfb6 Author: Allison Collins Date: Mon Jul 20 21:47:27 2020 -0700 xfs: Remove unneeded xfs_trans_roll_inode calls Some calls to xfs_trans_roll_inode and xfs_defer_finish routines are not needed. If they are the last operations executed in these functions, and no further changes are made, then higher level routines will roll or commit the transactions. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 3f6e011ee2bfcf5b70c5f8978673cd0e5bc64a33 Author: Allison Collins Date: Mon Jul 20 21:47:27 2020 -0700 xfs: Add helper function xfs_attr_node_shrink This patch adds a new helper function xfs_attr_node_shrink used to shrink an attr name into an inode if it is small enough. This helps to modularize the greater calling function xfs_attr_node_removename. Signed-off-by: Allison Collins Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit d4034c4662af5d40de0655c641ddc6eccde0e8fc Author: Allison Collins Date: Mon Jul 20 21:47:26 2020 -0700 xfs: Pull up xfs_attr_rmtval_invalidate This patch pulls xfs_attr_rmtval_invalidate out of xfs_attr_rmtval_remove and into the calling functions. Eventually __xfs_attr_rmtval_remove will replace xfs_attr_rmtval_remove when we introduce delayed attributes. These functions are exepcted to return -EAGAIN when they need a new transaction. Because the invalidate does not need a new transaction, we need to separate it from the rest of the function that does. This will enable __xfs_attr_rmtval_remove to smoothly replace xfs_attr_rmtval_remove later. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 8b8e0cc0208befc5971d552a8798c8f5537afa45 Author: Allison Collins Date: Mon Jul 20 21:47:26 2020 -0700 xfs: Refactor xfs_attr_rmtval_remove Refactor xfs_attr_rmtval_remove to add helper function __xfs_attr_rmtval_remove. We will use this later when we introduce delayed attributes. This function will eventually replace xfs_attr_rmtval_remove Signed-off-by: Allison Collins Reviewed-by: Chandan Rajendra Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 1fc618d76266750230f19e4053f5422a58b84141 Author: Allison Collins Date: Mon Jul 20 21:47:26 2020 -0700 xfs: Pull up trans roll in xfs_attr3_leaf_clearflag New delayed allocation routines cannot be handling transactions so pull them out into the calling functions Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Rajendra Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 795141099abc2ef4c801ca847190757880371390 Author: Allison Collins Date: Mon Jul 20 21:47:25 2020 -0700 xfs: Factor out xfs_attr_rmtval_invalidate Because new delayed attribute routines cannot roll transactions, we carve off the parts of xfs_attr_rmtval_remove that we can use. This will help to reduce repetitive code later when we introduce delayed attributes. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Rajendra Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 0949d317aee051fcb7ad9c8c7ec5d60b5cc412eb Author: Allison Collins Date: Mon Jul 20 21:47:25 2020 -0700 xfs: Pull up trans roll from xfs_attr3_leaf_setflag New delayed allocation routines cannot be handling transactions so pull them up into the calling functions Signed-off-by: Allison Collins Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Chandan Rajendra Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 6cc5b5f89840cfe85cbd14e20500f25353a7f241 Author: Allison Collins Date: Mon Jul 20 21:47:24 2020 -0700 xfs: Refactor xfs_attr_try_sf_addname To help pre-simplify xfs_attr_set_args, we need to hoist transaction handling up, while modularizing the adjacent code down into helpers. In this patch, hoist the commit in xfs_attr_try_sf_addname up into the calling function, and also pull the attr list creation down. Signed-off-by: Allison Collins Reviewed-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Brian Foster Reviewed-by: Chandan Rajendra Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 7c93d4a8fc39cf209c6a67ff26fc83646c9f7d61 Author: Allison Collins Date: Mon Jul 20 21:47:24 2020 -0700 xfs: Split apart xfs_attr_leaf_addname Split out new helper function xfs_attr_leaf_try_add from xfs_attr_leaf_addname. Because new delayed attribute routines cannot roll transactions, we split off the parts of xfs_attr_leaf_addname that we can use, and move the commit into the calling function. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Chandan Rajendra Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit e3be1272ddaf5f7482008578b467cf0ca8c35695 Author: Allison Collins Date: Mon Jul 20 21:47:23 2020 -0700 xfs: Pull up trans handling in xfs_attr3_leaf_flipflags Since delayed operations cannot roll transactions, pull up the transaction handling into the calling function Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Rajendra Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 1a485fc1e96533587e2eab0e4d60798035528b7a Author: Allison Collins Date: Mon Jul 20 21:47:23 2020 -0700 xfs: Factor out new helper functions xfs_attr_rmtval_set Break xfs_attr_rmtval_set into two helper functions xfs_attr_rmt_find_hole and xfs_attr_rmtval_set_value. xfs_attr_rmtval_set rolls the transaction between the helpers, but delayed operations cannot. We will use the helpers later when constructing new delayed attribute routines. Signed-off-by: Allison Collins Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Chandan Rajendra Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit deed9512872d094ad1eae4abd0ff1c674df251d5 Author: Allison Collins Date: Mon Jul 20 21:47:23 2020 -0700 xfs: Check for -ENOATTR or -EEXIST Delayed operations cannot return error codes. So we must check for these conditions first before starting set or remove operations Signed-off-by: Allison Collins Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner commit 07120f1abdff80f3d1351f733661abe28d609535 Author: Allison Collins Date: Mon Jul 20 21:47:22 2020 -0700 xfs: Add xfs_has_attr and subroutines This patch adds a new functions to check for the existence of an attribute. Subroutines are also added to handle the cases of leaf blocks, nodes or shortform. Common code that appears in existing attr add and remove functions have been factored out to help reduce the appearance of duplicated code. We will need these routines later for delayed attributes since delayed operations cannot return error codes. Signed-off-by: Allison Collins Reviewed-by: Chandan Rajendra Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong [darrick: fix a leak-on-error bug reported by Dan Carpenter] [darrick: fix unused variable warning reported by 0day] Signed-off-by: Darrick J. Wong Acked-by: Dave Chinner Reported-by: dan.carpenter@oracle.com Reported-by: kernel test robot commit 4491a3dd7192fb0db54117c42f785a8eb524607d Author: Carlos Maiolino Date: Wed Jul 22 09:23:18 2020 -0700 xfs: Refactor xfs_da_state_alloc() helper Every call to xfs_da_state_alloc() also requires setting up state->args and state->mp Change xfs_da_state_alloc() to receive an xfs_da_args_t as argument and return a xfs_da_state_t with both args and mp already set. Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong [darrick: reduce struct typedef usage] Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit bae633a4a283afc8ceff5672c1f4f096d0558d70 Author: Carlos Maiolino Date: Wed Jul 22 09:23:17 2020 -0700 xfs: remove xfs_zone_{alloc,zalloc} helpers All their users have been converted to use MM API directly, no need to keep them around anymore. Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit ca4f2589905954b155e920b543e13a370d578511 Author: Carlos Maiolino Date: Wed Jul 22 09:23:17 2020 -0700 xfs: Modify xlog_ticket_alloc() to use kernel's MM API xlog_ticket_alloc() is always called under NOFS context, except from unmount path, which eitherway is holding many FS locks, so, there is no need for its callers to keep passing allocation flags into it. change xlog_ticket_alloc() to use default kmem_cache_zalloc(), remove its alloc_flags argument, and always use GFP_NOFS | __GFP_NOFAIL flags. Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 32a2b11f467642ea700bc0b01f4693e52ec0fabd Author: Carlos Maiolino Date: Wed Jul 22 09:23:10 2020 -0700 xfs: Remove kmem_zone_zalloc() usage Use kmem_cache_zalloc() directly. With the exception of xlog_ticket_alloc() which will be dealt on the next patch for readability. Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 3050bd0bfe706381c36e4b48bf4de465b0ab94f7 Author: Carlos Maiolino Date: Wed Jul 22 09:23:04 2020 -0700 xfs: Remove kmem_zone_alloc() usage Use kmem_cache_alloc() directly. All kmem_zone_alloc() users pass 0 as flags, which are translated into: GFP_KERNEL | __GFP_NOWARN, and kmem_zone_alloc() loops forever until the allocation succeeds. We can use __GFP_NOFAIL to tell the allocator to loop forever rather than doing it ourself, and because the allocation will never fail, we do not need to use __GFP_NOWARN anymore. Hence, all callers can be converted to use GFP_KERNEL | __GFP_NOFAIL Signed-off-by: Carlos Maiolino Reviewed-by: Darrick J. Wong [darrick: add a comment back in about nofail] Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Dave Chinner commit 26270c9f4cf77815397e749f38a343732c28c4a5 Author: Randy Dunlap Date: Sun Jul 19 18:31:27 2020 -0700 xfs: xfs_btree_staging.h: delete duplicated words Drop the repeated words "with" and "be" in comments. Signed-off-by: Randy Dunlap Cc: "Darrick J. Wong" Cc: linux-xfs@vger.kernel.org Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit d8c1af0d6ad617df4563e78bbee70691f25ace58 Author: Darrick J. Wong Date: Wed Jul 15 18:05:39 2020 -0700 xfs: rename the ondisk dquot d_flags to d_type The ondisk dquot stores the quota record type in the flags field. Rename this field to d_type to make the _type relationship between the ondisk and incore dquot more obvious. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit a990f7a84edc9941956ea3c1dfb89733c80f9ad0 Author: Darrick J. Wong Date: Wed Jul 15 18:39:51 2020 -0700 xfs: improve ondisk dquot flags checking Create an XFS_DQTYPE_ANY mask for ondisk dquots flags, and use that to ensure that we never accept any garbage flags when we're loading dquots. While we're at it, restructure the quota type flag checking to use the proper masking. Note that I plan to add y2038 support soon, which will require a new xfs_dqtype_t flag for extended timestamp support, hence all the work to make the type masking work correctly. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 1a7ed271653a4f418a6398465f861ee795d34468 Author: Darrick J. Wong Date: Wed Jul 15 17:53:43 2020 -0700 xfs: create xfs_dqtype_t to represent quota types Create a new type (xfs_dqtype_t) to represent the type of an incore dquot (user, group, project, or none). Rename the incore dquot's dq_flags field to q_type. This allows us to replace all the "uint type" arguments to the quota functions with "xfs_dqtype_t type", to make it obvious when we're passing a quota type argument into a function. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 74ddd6b3dd553a48c294d671a6cfe02e57cfa4c7 Author: Darrick J. Wong Date: Wed Jul 15 17:53:18 2020 -0700 xfs: replace a few open-coded XFS_DQTYPE_REC_MASK uses Fix a few places where we open-coded this mask constant. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit af1db8f12e2dc5a172f2e35cfcd8cc4cf57dbb6e Author: Darrick J. Wong Date: Wed Jul 15 17:52:57 2020 -0700 xfs: remove unnecessary quota type masking When XFS' quota functions take a parameter for the quota type, they only care about the three quota record types (user, group, project). Internal state flags and whatnot should never be passed by callers and are an error. Now that we've moved responsibility for filtering out internal state to the callers, we can drop the masking everywhere else. In other words, if you call a quota function, you must only pass in one of XFS_DQTYPE_{USER,GROUP,PROJ}. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 0b04dd5d7ca79ccb88e258641b328fe4f548272a Author: Darrick J. Wong Date: Wed Jul 15 17:51:47 2020 -0700 xfs: always use xfs_dquot_type when extracting type from a dquot Always use the xfs_dquot_type helper to extract the quota type from an incore dquot. This moves responsibility for filtering internal state information and whatnot to anybody passing around a struct xfs_dquot. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit e6eb603c7e4f39cbd41042c7ceb7141dffc08096 Author: Darrick J. Wong Date: Wed Jul 15 17:50:57 2020 -0700 xfs: refactor quota type testing Certain functions can only act upon one quota type, so refactor those functions to use switch statements, in keeping with all the other high level xfs quota api calls. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 00a342e4965ee91fff06e01949fa27db53c0bb1c Author: Darrick J. Wong Date: Wed Jul 15 17:47:13 2020 -0700 xfs: remove the XFS_QM_IS[UGP]DQ macros Remove these macros and use xfs_dquot_type() for everything. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit dbcbc7b90e8a43aa00412bfa601a2d110a29086a Author: Darrick J. Wong Date: Wed Jul 15 17:48:31 2020 -0700 xfs: refactor testing if a particular dquot is being enforced Create a small helper to test if enforcement is enabled for a given incore dquot and replace the open-code logic testing. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 8cd4901da56caadc16b4e8d6b434291a8ce31d7c Author: Darrick J. Wong Date: Wed Jul 15 17:42:36 2020 -0700 xfs: rename XFS_DQ_{USER,GROUP,PROJ} to XFS_DQTYPE_* We're going to split up the incore dquot state flags from the ondisk dquot flags (eventually renaming this "type") so start by renaming the three flags and the bitmask that are going to participate in this. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit f9751c4ad3d17fa93773c187732f10c8a49940e3 Author: Darrick J. Wong Date: Wed Jul 15 17:41:24 2020 -0700 xfs: drop the type parameter from xfs_dquot_verify xfs_qm_reset_dqcounts (aka quotacheck) is the only xfs_dqblk_verify caller that actually knows the specific quota type that it's looking for. Since everything else just pass in type==0 (including the buffer verifier), drop the parameter and open-code the check like xfs_dquot_from_disk already does. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 2cb91bab4fa4effe56da1c7fe2fc5723c4935db1 Author: Darrick J. Wong Date: Tue Jul 14 10:37:35 2020 -0700 xfs: add more dquot tracepoints Add all the xfs_dquot fields to the tracepoint for that type; add a new tracepoint type for the qtrx structure (dquot transaction deltas); and use our new tracepoints. This makes it easier for the author to trace changes to dquot counters for debugging. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit 4b8628d57b725b32616965e66975fcdebe008fe7 Author: Darrick J. Wong Date: Tue Jul 14 10:37:35 2020 -0700 xfs: actually bump warning counts when we send warnings Currently, xfs quotas have the ability to send netlink warnings when a user exceeds the limits. They also have all the support code necessary to convert softlimit warnings into failures if the number of warnings exceeds a limit set by the administrator. Unfortunately, we never actually increase the warning counter, so this never actually happens. Make it so we actually do something useful with the warning counts. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R commit 12d720fb864547922ad4bf53120de72a91807999 Author: Darrick J. Wong Date: Tue Jul 14 10:37:34 2020 -0700 xfs: assume the default quota limits are always set in xfs_qm_adjust_dqlimits We always initialize the default quota limits to something nowadays, so we don't need to check that the defaults are set to something before using them. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R commit d92c881538c40a18d0a86193898fc0b6e2598aa0 Author: Darrick J. Wong Date: Tue Jul 14 10:37:34 2020 -0700 xfs: refactor xfs_trans_apply_dquot_deltas Hoist the code that adjusts the incore quota reservation count adjustments into a separate function, both to reduce the level of indentation and also to reduce the amount of open-coded logic. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit 292b47b4fcfad2b8b2bc749d68c8baa63fc8bf36 Author: Darrick J. Wong Date: Tue Jul 14 10:37:34 2020 -0700 xfs: refactor xfs_trans_dqresv Now that we've refactored the resource usage and limits into per-resource structures, we can refactor some of the open-coded reservation limit checking in xfs_trans_dqresv. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Allison Collins Reviewed-by: Christoph Hellwig commit d1520deab039ca1bac50c53b941a3df3b3a680de Author: Darrick J. Wong Date: Tue Jul 14 10:37:33 2020 -0700 xfs: refactor xfs_qm_scall_setqlim Now that we can pass around quota resource and limit structures, clean up the open-coded field setting in xfs_qm_scall_setqlim. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins Reviewed-by: Chandan Babu R commit ea0cc6fa8f89a0089c561b65b909ceab48463338 Author: Darrick J. Wong Date: Tue Jul 14 10:37:33 2020 -0700 xfs: refactor quota exceeded test Refactor the open-coded test for whether or not we're over quota. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit c8c753e19a76507a2b686d9c521d5266351c75d0 Author: Darrick J. Wong Date: Tue Jul 14 10:37:33 2020 -0700 xfs: remove unnecessary arguments from quota adjust functions struct xfs_dquot already has a pointer to the xfs mount, so remove the redundant parameter from xfs_qm_adjust_dq*. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit 438769e31e4410a20ea0df0ed1769516ae80740d Author: Darrick J. Wong Date: Tue Jul 14 10:37:32 2020 -0700 xfs: refactor default quota limits by resource Now that we've split up the dquot resource fields into separate structs, do the same for the default limits to enable further refactoring. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit 51dbb1be52fedfe7f612854bfcba3400043a7a75 Author: Darrick J. Wong Date: Tue Jul 14 10:37:32 2020 -0700 xfs: remove qcore from incore dquots Now that we've stopped using qcore entirely, drop it from the incore dquot. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit 19dce7eaef7f8fdecab965afacc7a7bf3eb4e0a1 Author: Darrick J. Wong Date: Tue Jul 14 10:37:32 2020 -0700 xfs: stop using q_core timers in the quota code Add timers fields to the incore dquot, and use that instead of the ones in qcore. This eliminates a bunch of endian conversions and will eventually allow us to remove qcore entirely. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins commit c8c45fb2f614e1d30526c5aa304352923ad76416 Author: Darrick J. Wong Date: Tue Jul 14 10:37:31 2020 -0700 xfs: stop using q_core warning counters in the quota code Add warning counter fields to the incore dquot, and use that instead of the ones in qcore. This eliminates a bunch of endian conversions and will eventually allow us to remove qcore entirely. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins commit be37d40c1ba0b5484ea2f8c109a9eda13e4c690a Author: Darrick J. Wong Date: Tue Jul 14 10:37:31 2020 -0700 xfs: stop using q_core counters in the quota code Add counter fields to the incore dquot, and use that instead of the ones in qcore. This eliminates a bunch of endian conversions and will eventually allow us to remove qcore entirely. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins commit d3537cf93e5e2f8b4e95cfe8bc8fa03b58c88e32 Author: Darrick J. Wong Date: Tue Jul 14 10:37:31 2020 -0700 xfs: stop using q_core limits in the quota code Add limits fields in the incore dquot, and use that instead of the ones in qcore. This eliminates a bunch of endian conversions and will eventually allow us to remove qcore entirely. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins commit 784e80f5640db9a925af1143a25e9bb98624350d Author: Darrick J. Wong Date: Tue Jul 14 10:37:30 2020 -0700 xfs: use a per-resource struct for incore dquot data Introduce a new struct xfs_dquot_res that we'll use to track all the incore data for a particular resource type (block, inode, rt block). This will help us (once we've eliminated q_core) to declutter quota functions that currently open-code field access or pass around fields around explicitly. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins commit c51df7334167e445f2cafc5511d6e2407a32e8f1 Author: Darrick J. Wong Date: Tue Jul 14 10:37:30 2020 -0700 xfs: stop using q_core.d_id in the quota code Add a dquot id field to the incore dquot, and use that instead of the one in qcore. This eliminates a bunch of endian conversions and will eventually allow us to remove qcore entirely. We also rearrange the start of xfs_dquot to remove padding holes, saving 8 bytes. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Allison Collins commit 0b0fa1d1d16794ce48188cc6434ec38f6e1f1b4b Author: Darrick J. Wong Date: Tue Jul 14 10:37:22 2020 -0700 xfs: stop using q_core.d_flags in the quota code Use the incore dq_flags to figure out the dquot type. This is the first step towards removing xfs_disk_dquot from the incore dquot. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R commit cb64e1299364a51bf60e96f2a35df31f47aa2eee Author: Darrick J. Wong Date: Tue Jul 14 10:37:13 2020 -0700 xfs: make XFS_DQUOT_CLUSTER_SIZE_FSB part of the ondisk format Move the dquot cluster size #define to xfs_format.h. It is an important part of the ondisk format because the ondisk dquot record size is not an even power of two, which means that the buffer size we use is significant here because the kernel leaves slack space at the end of the buffer to avoid having to deal with a dquot record crossing a block boundary. This is also an excuse to fix one of the longstanding discrepancies between kernel and userspace libxfs headers. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R commit 985a78fdde15e1730383f99867ca38b5648444bf Author: Darrick J. Wong Date: Tue Jul 14 10:37:13 2020 -0700 xfs: rename dquot incore state flags Rename the existing incore dquot "dq_flags" field to "q_flags" to match everything else in the structure, then move the two actual dquot state flags to the XFS_DQFLAG_ namespace from XFS_DQ_. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R commit 0dcc0728c119cb1b295c18c379bb39416ce86aeb Author: Darrick J. Wong Date: Tue Jul 14 10:37:12 2020 -0700 xfs: refactor quotacheck flags usage We only use the XFS_QMOPT flags in quotacheck to signal the quota type, so rip out all the flags handling and just pass the type all the way through. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R commit 41ed4a5f2ba41882d8fbdf4cf455855e80ab6b90 Author: Darrick J. Wong Date: Tue Jul 14 10:36:09 2020 -0700 xfs: move the flags argument of xfs_qm_scall_trunc_qfiles to XFS_QMOPT_* Since xfs_qm_scall_trunc_qfiles can take a bitset of quota types that we want to truncate, change the flags argument to take XFS_QMOPT_[UGP}QUOTA so that the next patch can start to deprecate XFS_DQ_*. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R commit afeda6000b0cb6d873920be4ce67f351f017a654 Author: Darrick J. Wong Date: Tue Jul 14 10:36:09 2020 -0700 xfs: validate ondisk/incore dquot flags While loading dquot records off disk, make sure that the quota type flags are the same between the incore dquot and the ondisk dquot. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Chandan Babu R commit f959b5d037e71a4d69b5bf71faffa065d9269b4a Author: Darrick J. Wong Date: Tue Jul 14 10:36:09 2020 -0700 xfs: fix inode quota reservation checks xfs_trans_dqresv is the function that we use to make reservations against resource quotas. Each resource contains two counters: the q_core counter, which tracks resources allocated on disk; and the dquot reservation counter, which tracks how much of that resource has either been allocated or reserved by threads that are working on metadata updates. For disk blocks, we compare the proposed reservation counter against the hard and soft limits to decide if we're going to fail the operation. However, for inodes we inexplicably compare against the q_core counter, not the incore reservation count. Since the q_core counter is always lower than the reservation count and we unlock the dquot between reservation and transaction commit, this means that multiple threads can reserve the last inode count before we hit the hard limit, and when they commit, we'll be well over the hard limit. Fix this by checking against the incore inode reservation counter, since we would appear to maintain that correctly (and that's what we report in GETQUOTA). Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit c97738a960a86081a147e7d436138e6481757445 Author: Darrick J. Wong Date: Tue Jul 14 10:36:08 2020 -0700 xfs: clear XFS_DQ_FREEING if we can't lock the dquot buffer to flush In commit 8d3d7e2b35ea, we changed xfs_qm_dqpurge to bail out if we can't lock the dquot buf to flush the dquot. This prevents the AIL from blocking on the dquot, but it also forgets to clear the FREEING flag on its way out. A subsequent purge attempt will see the FREEING flag is set and bail out, which leads to dqpurge_all failing to purge all the dquots. (copy-pasting from Dave Chinner's identical patch) This was found by inspection after having xfs/305 hang 1 in ~50 iterations in a quotaoff operation: [ 8872.301115] xfs_quota D13888 92262 91813 0x00004002 [ 8872.302538] Call Trace: [ 8872.303193] __schedule+0x2d2/0x780 [ 8872.304108] ? do_raw_spin_unlock+0x57/0xd0 [ 8872.305198] schedule+0x6e/0xe0 [ 8872.306021] schedule_timeout+0x14d/0x300 [ 8872.307060] ? __next_timer_interrupt+0xe0/0xe0 [ 8872.308231] ? xfs_qm_dqusage_adjust+0x200/0x200 [ 8872.309422] schedule_timeout_uninterruptible+0x2a/0x30 [ 8872.310759] xfs_qm_dquot_walk.isra.0+0x15a/0x1b0 [ 8872.311971] xfs_qm_dqpurge_all+0x7f/0x90 [ 8872.313022] xfs_qm_scall_quotaoff+0x18d/0x2b0 [ 8872.314163] xfs_quota_disable+0x3a/0x60 [ 8872.315179] kernel_quotactl+0x7e2/0x8d0 [ 8872.316196] ? __do_sys_newstat+0x51/0x80 [ 8872.317238] __x64_sys_quotactl+0x1e/0x30 [ 8872.318266] do_syscall_64+0x46/0x90 [ 8872.319193] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 8872.320490] RIP: 0033:0x7f46b5490f2a [ 8872.321414] Code: Bad RIP value. Returning -EAGAIN from xfs_qm_dqpurge() without clearing the XFS_DQ_FREEING flag means the xfs_qm_dqpurge_all() code can never free the dquot, and we loop forever waiting for the XFS_DQ_FREEING flag to go away on the dquot that leaked it via -EAGAIN. Fixes: 8d3d7e2b35ea ("xfs: trylock underlying buffer on dquot flush") Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Dave Chinner Reviewed-by: Dave Chinner commit b2a8864728683443f34a9fd33a2b78b860934cc1 Author: Brian Foster Date: Wed Jul 15 18:44:50 2020 -0700 xfs: fix inode allocation block res calculation precedence The block reservation calculation for inode allocation is supposed to consist of the blocks required for the inode chunk plus (maxlevels-1) of the inode btree multiplied by the number of inode btrees in the fs (2 when finobt is enabled, 1 otherwise). Instead, the macro returns (ialloc_blocks + 2) due to a precedence error in the calculation logic. This leads to block reservation overruns via generic/531 on small block filesystems with finobt enabled. Add braces to fix the calculation and reserve the appropriate number of blocks. Fixes: 9d43b180af67 ("xfs: update inode allocation/free transaction reservations for finobt") Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit f376b45e861d8b7b34bf0eceeecfdd00dbe65cde Author: Brian Foster Date: Thu Jul 16 07:39:29 2020 -0700 xfs: drain the buf delwri queue before xfsaild idles xfsaild is racy with respect to transaction abort and shutdown in that the task can idle or exit with an empty AIL but buffers still on the delwri queue. This was partly addressed by cancelling the delwri queue before the task exits to prevent memory leaks, but it's also possible for xfsaild to empty and idle with buffers on the delwri queue. For example, a transaction that pins a buffer that also happens to sit on the AIL delwri queue will explicitly remove the associated log item from the AIL if the transaction aborts. The side effect of this is an unmount hang in xfs_wait_buftarg() as the associated buffers remain held by the delwri queue indefinitely. This is reproduced on repeated runs of generic/531 with an fs format (-mrmapbt=1 -bsize=1k) that happens to also reproduce transaction aborts. Update xfsaild to not idle until both the AIL and associated delwri queue are empty and update the push code to continue delwri queue submission attempts even when the AIL is empty. This allows the AIL to eventually release aborted buffers stranded on the delwri queue when they are unlocked by the associated transaction. This should have no significant effect on normal runtime behavior because the xfsaild currently idles only when the AIL is empty and in practice the AIL is rarely empty with a populated delwri queue. The items must be AIL resident to land in the queue in the first place and generally aren't removed until writeback completes. Note that the pre-existing delwri queue cancel logic in the exit path is retained because task stop is external, could technically come at any point, and xfsaild is still responsible to release its buffer references before it exits. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0255b1e3d84962f8f8d19f9e2768a8a4f0de7487 Author: Stanley Chu Date: Fri Jul 24 22:16:27 2020 +0800 scsi: ufs-mediatek: Prevent LPM operation on undeclared VCC In some platforms, VCC regulator may not be declared in device tree to keep itself "always-on". In this case, hba->vreg_info.vcc is NULL and shall not be operated during any flow. Prevent possible NULL hba->vreg_info.vcc access in LPM mode by checking if it is valid first. Link: https://lore.kernel.org/r/20200724141627.20094-1-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 68e12e5f61354eb42cfffbc20a693153fc39738e Author: Jing Xiangfeng Date: Mon Jun 15 16:12:26 2020 +0800 scsi: iscsi: Do not put host in iscsi_set_flashnode_param() If scsi_host_lookup() fails we will jump to put_host which may cause a panic. Jump to exit_set_fnode instead. Link: https://lore.kernel.org/r/20200615081226.183068-1-jingxiangfeng@huawei.com Reviewed-by: Mike Christie Signed-off-by: Jing Xiangfeng Signed-off-by: Martin K. Petersen commit 5759ff1131cd420aad7eae639719a473154b2e37 Author: Don Brace Date: Fri Jul 24 16:25:08 2020 -0500 scsi: hpsa: Correct ctrl queue depth Need to set queue depth for controller devices. Link: https://lore.kernel.org/r/159562590819.17915.12766718094041027754.stgit@brunhilda Fixes: 30bda7848a23 ("scsi: hpsa: Increase controller error handling timeout") Reviewed-by: Scott Teel Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 59526d7a187f4340bfc9b91f8a9ecb7cb39f982c Author: Bodo Stroesser Date: Sun Jul 26 17:35:10 2020 +0200 scsi: target: tcmu: Make TMR notification optional Add "tmr_notification" configfs attribute to tcmu devices. If the default value 0 is used, tcmu only removes aborted commands from qfull_queue. If user changes tmr_notification to 1, additionally TMR notifications will be written to the cmd ring. Link: https://lore.kernel.org/r/20200726153510.13077-9-bstroesser@ts.fujitsu.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit bc2d214af5dbcf1e53be9a23d95905a585657ff4 Author: Bodo Stroesser Date: Sun Jul 26 17:35:09 2020 +0200 scsi: target: tcmu: Implement tmr_notify callback This patch implements the tmr_notify callback for tcmu. When the callback is called, tcmu checks the list of aborted commands it received as parameter: - aborted commands in the qfull_queue are removed from the queue and target_complete_command is called - from the cmd_ids of aborted commands currently uncompleted in cmd ring it creates a list of aborted cmd_ids. Finally a TMR notification is written to cmd ring containing TMR type and cmd_id list. If there is no space in ring, the TMR notification is queued on a TMR specific queue. The TMR specific queue 'tmr_queue' can be seen as a extension of the cmd ring. At the end of each iexecution of tcmu_complete_commands() we check whether tmr_queue contains TMRs and try to move them onto the ring. If tmr_queue is not empty after that, we don't call run_qfull_queue() because commands must not overtake TMRs. This way we guarantee that cmd_ids in TMR notification received by userspace either match an active, not yet completed command or are no longer valid due to userspace having complete some cmd_ids meanwhile. New commands that were assigned to an aborted cmd_id will always appear on the cmd ring _after_ the TMR. Link: https://lore.kernel.org/r/20200726153510.13077-8-bstroesser@ts.fujitsu.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit ed212ca878972d6de88ee7f175f84399fc2e3f01 Author: Bodo Stroesser Date: Sun Jul 26 17:35:08 2020 +0200 scsi: target: tcmu: Fix and simplify timeout handling During cmd timeout handling in check_timedout_devices(), due to a race, it can happen that tcmu_set_next_deadline() does not start a timer as expected: 1) Either tcmu_check_expired_ring_cmd() checks the inflight_queue or tcmu_check_expired_queue_cmd() checks the qfull_queue while jiffies has the value X 2) At the end of the check the queue contains one remaining command with deadline X (time_after(X, X) is false and thus the command is not handled as being timed out). 3) After tcmu_check_expired_xxxxx_cmd() a timer interrupt happens and jiffies is incremented to X+1. 4) Now tcmu_set_next_deadline() is called, but it skips the command, since time_after(X+1, X) is true. Therefore tcmu_set_next_deadline() finds no new deadline and stops the timer, which it shouldn't. Since commands that time out are removed from inflight_queue or qfull_queue, we don't need the check with time_after() in tcmu_set_next_deadline() but can use the deadline from the first cmd in the queue. Additionally, replace the remaining time_after() calls in tcmu_check_expired_xxxxx_cmd() with time_after_eq(), because it is not useful to set the timeout to deadline but then check for jiffies being greater than deadline. Simplify the end of tcmu_handle_completions() and change the check for no more pending commands from mb->cmd_tail == mb->cmd_head to idr_is_empty(&udev->commands) because the old check doesn't work correctly if paddings or in the future TMRs are in the ring. Finally tcmu_set_next_deadline() was shifted in the source as preparation for later implementation of tmr_notify callback. Link: https://lore.kernel.org/r/20200726153510.13077-7-bstroesser@ts.fujitsu.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 3d3f9d56a57014174ea9b997c95b71b50fdc4cc3 Author: Bodo Stroesser Date: Sun Jul 26 17:35:07 2020 +0200 scsi: target: tcmu: Factor out new helper ring_insert_padding The new helper ring_insert_padding is split off from and then called by queue_cmd_ring. It inserts a padding if necessary. The new helper will in a subsequent patch be used during writing of TMR notifications to command ring. Link: https://lore.kernel.org/r/20200726153510.13077-6-bstroesser@ts.fujitsu.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit c96849276211496305c3297913635e68d08f827e Author: Bodo Stroesser Date: Sun Jul 26 17:35:06 2020 +0200 scsi: target: tcmu: Do not queue aborted commands If tcmu receives an already aborted command, tcmu_queue_cmd() should reject it. Link: https://lore.kernel.org/r/20200726153510.13077-5-bstroesser@ts.fujitsu.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit a35129024e88cbb96c6fe93233a625be5b122311 Author: Bodo Stroesser Date: Sun Jul 26 17:35:05 2020 +0200 scsi: target: tcmu: Use priv pointer in se_cmd We initialize and clean up the se_cmd's priv pointer under cmd_ring_lock to point to the corresponding tcmu_cmd. In the patch that implements tmr_notify callback in tcmu we will use the priv pointer. Link: https://lore.kernel.org/r/20200726153510.13077-4-bstroesser@ts.fujitsu.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 2e45a1a9c75d39f85df3f288e205fecb6f788e02 Author: Bodo Stroesser Date: Sun Jul 26 17:35:04 2020 +0200 scsi: target: Add tmr_notify backend function Target core is modified to call an optional backend callback function if a TMR is received or commands are aborted implicitly after a PR command was received. The backend function takes as parameters the se_dev, the type of the TMR, and the list of aborted commands. If no commands were aborted, an empty list is supplied. Link: https://lore.kernel.org/r/20200726153510.13077-3-bstroesser@ts.fujitsu.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit f5e2714ad1a62d23cd8e8af07d438912d8115fae Author: Bodo Stroesser Date: Sun Jul 26 17:35:03 2020 +0200 scsi: target: Modify core_tmr_abort_task() This patch modifies core_tmr_abort_task() to use same looping and locking scheme as core_tmr_drain_state_list() does. This frees the state_list element in se_cmd for later use by tmr notification handling. Note: __target_check_io_state() now is called with param 0 instead of dev->dev_attrib.emulate_tas, because tas is not relevant since we always get ABRT on same session like the aborted command. Link: https://lore.kernel.org/r/20200726153510.13077-2-bstroesser@ts.fujitsu.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit df2de6f2862984b55e93931faf7b481a7b98396d Author: Hou Pu Date: Thu Jul 16 06:02:12 2020 -0400 scsi: target: iscsi: Fix inconsistent debug message Commit 25cdda95fda7 ("iscsi-target: Fix initial login PDU asynchronous socket close OOPs") changed the return value of __iscsi_target_sk_check_close(). However, pr_debug is still printing FALSE when returning TRUE which is a little confusing. Link: https://lore.kernel.org/r/20200716100212.4237-3-houpu@bytedance.com Reviewed-by: Mike Christie Signed-off-by: Hou Pu Signed-off-by: Martin K. Petersen commit 4e108d4f281609a4f6e413d736be7364671016c5 Author: Hou Pu Date: Thu Jul 16 06:02:11 2020 -0400 scsi: target: iscsi: Fix login error when receiving iscsi_target_sk_data_ready() could be invoked indirectly by iscsi_target_do_login_rx() from the workqueue like this: iscsi_target_do_login_rx() iscsi_target_do_login() iscsi_target_do_tx_login_io() iscsit_put_login_tx() iscsi_login_tx_data() tx_data() sock_sendmsg_nosec() tcp_sendmsg() release_sock() sk_backlog_rcv() tcp_v4_do_rcv() tcp_data_ready() iscsi_target_sk_data_ready() At that time LOGIN_FLAGS_READ_ACTIVE is not cleared and iscsi_target_sk_data_ready will not read data from the socket. Some iscsi initiators (libiscsi) will wait forever for a reply. LOGIN_FLAGS_READ_ACTIVE should be cleared early just after doing the receive and before writing to the socket in iscsi_target_do_login_rx. Unfortunately, LOGIN_FLAGS_READ_ACTIVE is also used by sk_state_change to do login cleanup if a socket was closed at login time. It is supposed to be cleared after the login PDU is successfully processed and replied. Introduce another flag, LOGIN_FLAGS_WRITE_ACTIVE, to cover the transmit part. Link: https://lore.kernel.org/r/20200716100212.4237-2-houpu@bytedance.com Reviewed-by: Mike Christie Signed-off-by: Hou Pu Signed-off-by: Martin K. Petersen commit 74d905d2d38ad00246e1f22c6ccad7ebb5731839 Author: Nick Dyer Date: Tue Jul 28 18:25:29 2020 -0700 Input: atmel_mxt_ts - only read messages in mxt_acquire_irq() when necessary The workaround of reading all messages until an invalid is received is a way of forcing the CHG line high, which means that when using edge-triggered interrupts the interrupt can be acquired. With level-triggered interrupts the workaround is unnecessary. Also, most recent maXTouch chips have a feature called RETRIGEN which, when enabled, reasserts the interrupt line every cycle if there are messages waiting. This also makes the workaround unnecessary. Note: the RETRIGEN feature is only in some firmware versions/chips, it's not valid simply to enable the bit. Signed-off-by: Nick Dyer Acked-by: Benson Leung Acked-by: Yufeng Shen (cherry picked from ndyer/linux/for-upstream commit 1ae4e8281e491b22442cd5acdfca1862555f8ecb) [gdavis: Fix conflicts due to v4.6-rc7 commit eb43335c4095 ("Input: atmel_mxt_ts - use mxt_acquire_irq in mxt_soft_reset").] Signed-off-by: George G. Davis [jiada: reset use_retrigen_workaround at beginning of mxt_check_retrigen() call mxt_check_retrigen() after mxt_acquire_irq() in mxt_initialize() replace white-spaces with tab for MXT_COMMS_RETRIGEN Changed to check if IRQ is level type] Signed-off-by: Jiada Wang Link: https://lore.kernel.org/r/20200727151637.23810-1-jiada_wang@mentor.com Signed-off-by: Dmitry Torokhov commit cbeb0310cfda7b6148f417e36b96539101d7f449 Merge: f4013ca680304 a1facc1fffc17 Author: Vishal Verma Date: Tue Jul 28 12:22:26 2020 -0600 Merge branch 'for-5.9/firmware-activate' into libnvdimm-for-next This branch adds support for runtime firmware activation for NVDIMMs that support it: https://lore.kernel.org/linux-nvdimm/20200721104442.GF1676612@kroah.com/T/#m253296a85b1cd4ab8ad00efba4c3df2436437bf4 commit a1facc1fffc17a65e2c12a8de7434b9325ec0324 Author: Dan Williams Date: Mon Jul 20 15:08:24 2020 -0700 ACPI: NFIT: Add runtime firmware activate support Plumb the platform specific backend for the generic libnvdimm firmware activate interface. Register dimm level operations to arm/disarm activation, and register bus level operations to report the dynamic platform-quiesce time relative to the number of dimms armed for firmware activation. A new nfit-specific bus attribute "firmware_activate_noidle" is added to allow the activation to switch between platform enforced, and OS opportunistic device quiesce. In other words, let the hibernate cycle handle in-flight device-dma rather than the platform attempting to increase PCI-E timeouts and the like. Cc: Dave Jiang Cc: Ira Weiny Cc: Vishal Verma Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit 48001ea50d17f3eb06a552e9ecf21f7fc01b25da Author: Dan Williams Date: Mon Jul 20 15:08:18 2020 -0700 PM, libnvdimm: Add runtime firmware activation support Abstract platform specific mechanics for nvdimm firmware activation behind a handful of generic ops. At the bus level ->activate_state() indicates the unified state (idle, busy, armed) of all DIMMs on the bus, and ->capability() indicates the system state expectations for activate. At the DIMM level ->activate_state() indicates the per-DIMM state, ->activate_result() indicates the outcome of the last activation attempt, and ->arm() attempts to transition the DIMM from 'idle' to 'armed'. A new hibernate_quiet_exec() facility is added to support firmware activation in an OS defined system quiesce state. It leverages the fact that the hibernate-freeze state wants to assert that a memory hibernation snapshot can be taken. This is in contrast to a platform firmware defined quiesce state that may forcefully quiet the memory controller independent of whether an individual device-driver properly supports hibernate-freeze. The libnvdimm sysfs interface is extended to support detection of a firmware activate capability. The mechanism supports enumeration and triggering of firmware activate, optionally in the hibernate_quiet_exec() context. [rafael: hibernate_quiet_exec() proposal] [vishal: fix up sparse warning, grammar in Documentation/] Cc: Pavel Machek Cc: Ira Weiny Cc: Len Brown Cc: Jonathan Corbet Cc: Dave Jiang Cc: Vishal Verma Reported-by: kernel test robot Co-developed-by: "Rafael J. Wysocki" Signed-off-by: "Rafael J. Wysocki" Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit bbca4d34bcb9a1abbd60af10f2fac933d2501680 Author: Pavel Machek Date: Fri Jul 24 10:36:06 2020 -0700 Input: uinput - fix typo in function name documentation Fix non-existing constant in documentation. Signed-off-by: Pavel Machek (CIP) Link: https://lore.kernel.org/r/20200724084025.GB31930@amd Signed-off-by: Dmitry Torokhov commit 53727eb6b3c210e826bb4c9d0aa89f65a5ae9342 Author: Lars Povlsen Date: Mon Jul 27 10:42:09 2020 +0200 clk: sparx5: Add Sparx5 SoC DPLL clock driver This adds a device driver for the Sparx5 SoC DPLL clock Signed-off-by: Lars Povlsen Link: https://lore.kernel.org/r/20200727084211.6632-9-lars.povlsen@microchip.com Signed-off-by: Stephen Boyd commit 4299f85a67480cdb43a3c4c1840a05259727e83c Author: Lars Povlsen Date: Mon Jul 27 10:42:08 2020 +0200 dt-bindings: clock: sparx5: Add bindings include file The Sparx5 support 9 different clock outputs. This include file has defines for each supported clock ordinal. Signed-off-by: Lars Povlsen Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200727084211.6632-8-lars.povlsen@microchip.com Signed-off-by: Stephen Boyd commit 490ed0b908d371cd9ab63fc142213e5d02d810ee Merge: f11df0454f8ed 77b2898394e3b Author: David S. Miller Date: Tue Jul 28 17:48:20 2020 -0700 Merge branch 'net-stmmac-improve-WOL' Jisheng Zhang says: ==================== net: stmmac: improve WOL Currently, stmmac driver relies on the HW PMT to support WOL. We want to support phy based WOL. patch1 is a small improvement to disable WAKE_MAGIC for PMT case if no pmt_magic_frame. patch2 and patch3 are two prepation patches. patch4 implement the phy based WOL patch5 tries to save a bit energy if WOL is enabled. ==================== Signed-off-by: David S. Miller commit 77b2898394e3bb843228ee6f90066a23cf67e8a1 Author: Jisheng Zhang Date: Mon Jul 27 19:05:20 2020 +0800 net: stmmac: Speed down the PHY if WoL to save energy When WoL is enabled and the machine is powered off, the PHY remains waiting for wakeup events at max speed, which is a waste of energy. Slow down the PHY speed before stopping the ethernet if WoL is enabled, Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller commit 1d8e5b0f3f2c6d05697f8192aac7255e6be1e715 Author: Jisheng Zhang Date: Mon Jul 27 19:03:09 2020 +0800 net: stmmac: Support WOL with phy Currently, the stmmac driver WOL implementation relies on MAC's PMT feature. We have a case: the MAC HW doesn't enable PMT, instead, we rely on the phy to support WOL. Implement the support for this case. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller commit e8377e7a29efbe80668b638eccd58f8db3c9ecb7 Author: Jisheng Zhang Date: Mon Jul 27 19:02:48 2020 +0800 net: stmmac: only call pmt() during suspend/resume if HW enables PMT This is to prepare WOL support with phy. Compared with WOL implementation which relies on the MAC's PMT features, in phy supported WOL case, device_may_wakeup() may also be true, but we should not call mac's pmt() function if HW doesn't enable PMT. And during resume, we should call phylink_start() if PMT is disabled. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller commit 2f45f7a13e99ef2d05ef3afecaee30f314c9b8b2 Author: Jisheng Zhang Date: Mon Jul 27 19:02:13 2020 +0800 net: stmmac: Move device_can_wakeup() check earlier in set_wol If !device_can_wakeup(), there's no need to futher check. And return -EOPNOTSUPP rather than -EINVAL if !device_can_wakeup(). Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller commit 1057d685c6eb4ef5dbc03f97ff25da8ca2418a86 Author: Jisheng Zhang Date: Mon Jul 27 19:01:48 2020 +0800 net: stmmac: Remove WAKE_MAGIC if HW shows no pmt_magic_frame Remove WAKE_MAGIC from supported modes if the HW capability register shows no support for pmt_magic_frame. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller commit f11df0454f8ed6a83641c0dc1a9f6e9609516216 Merge: b9aaec8f0be51 788abc6d9d278 Author: David S. Miller Date: Tue Jul 28 17:44:23 2020 -0700 Merge branch 'RTL8366-VLAN-callback-fixes' Linus Walleij says: ==================== RTL8366 VLAN callback fixes While we are pondering how to make the core set up the VLANs the right way, let's merge the uncontroversial fixes. ==================== Signed-off-by: David S. Miller commit 788abc6d9d278ed6fa1fa94db2098481a04152b7 Author: Linus Walleij Date: Mon Jul 27 01:34:40 2020 +0200 net: dsa: rtl8366: Fix VLAN set-up Alter the rtl8366_vlan_add() to call rtl8366_set_vlan() inside the loop that goes over all VIDs since we now properly support calling that function more than once. Augment the loop to postincrement as this is more intuitive. The loop moved past the last VID but called rtl8366_set_vlan() with the port number instead of the VID, assuming a 1-to-1 correspondence between ports and VIDs. This was also a bug. Cc: DENG Qingfang Cc: Mauri Sandberg Reviewed-by: Florian Fainelli Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit 15ab7906cc9290afb006df1bb1074907fbcc7061 Author: Linus Walleij Date: Mon Jul 27 01:34:39 2020 +0200 net: dsa: rtl8366: Fix VLAN semantics The RTL8366 would not handle adding new members (ports) to a VLAN: the code assumed that ->port_vlan_add() was only called once for a single port. When intializing the switch with .configure_vlan_while_not_filtering set to true, the function is called numerous times for adding all ports to VLAN1, which was something the code could not handle. Alter rtl8366_set_vlan() to just |= new members and untagged flags to 4k and MC VLAN table entries alike. This makes it possible to just add new ports to a VLAN. Put in some helpful debug code that can be used to find any further bugs here. Cc: DENG Qingfang Cc: Mauri Sandberg Reviewed-by: Florian Fainelli Fixes: d8652956cf37 ("net: dsa: realtek-smi: Add Realtek SMI driver") Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit b9aaec8f0be518096d1377082e0abe6a85e86ff3 Author: Brian Vazquez Date: Sun Jul 26 15:48:16 2020 -0700 fib: use indirect call wrappers in the most common fib_rules_ops This avoids another inderect call per RX packet which save us around 20-40 ns. Changelog: v1 -> v2: - Move declaraions to fib_rules.h to remove warnings Reported-by: kernel test robot Signed-off-by: Brian Vazquez Signed-off-by: David S. Miller commit 608b4adab17889576c6636311f495b1a52418c69 Author: Cong Wang Date: Sat Jul 25 13:17:07 2020 -0700 net_sched: initialize timer earlier in red_init() When red_init() fails, red_destroy() is called to clean up. If the timer is not initialized yet, del_timer_sync() will complain. So we have to move timer_setup() before any failure. Reported-and-tested-by: syzbot+6e95a4fabf88dc217145@syzkaller.appspotmail.com Fixes: aee9caa03fc3 ("net: sched: sch_red: Add qevents "early_drop" and "mark"") Cc: Petr Machata Cc: Jamal Hadi Salim Cc: Jiri Pirko Signed-off-by: Cong Wang Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 1255457429309e723b1ee619bb6bb94a9be2a939 Merge: aff7543126df2 90f86b8a36c06 Author: David S. Miller Date: Tue Jul 28 17:22:03 2020 -0700 Merge branch 'hinic-add-some-error-messages-for-debug' Luo bin says: ==================== hinic: add some error messages for debug patch #1: support to handle hw abnormal event patch #2: improve the error messages when functions return failure and dump relevant registers in some exception handling processes ==================== Signed-off-by: David S. Miller commit 90f86b8a36c065286b743eed29661fc5cd00d342 Author: Luo bin Date: Sat Jul 25 15:11:19 2020 +0800 hinic: add log in exception handling processes improve the error message when functions return failure and dump relevant registers in some exception handling processes Signed-off-by: Luo bin Signed-off-by: David S. Miller commit c15850c709eb5c7771785c9174e4908d1806a0f0 Author: Luo bin Date: Sat Jul 25 15:11:18 2020 +0800 hinic: add support to handle hw abnormal event add support to handle hw abnormal event such as hardware failure, cable unplugged,link error Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 2f3ee5e481ce850b5b51a306b01a5e9187b206ae Author: Alex Elder Date: Fri Jul 24 13:11:42 2020 -0500 remoteproc: kill IPA notify code The IPA code now uses the generic remoteproc SSR notification mechanism. This makes the original IPA notification code unused and unnecessary, so get rid of it. This is effectively a revert of commit d7f5f3c89c1a ("remoteproc: add IPA notification to q6v5 driver"). Reviewed-by: Bjorn Andersson Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20200724181142.13581-3-elder@linaro.org Signed-off-by: Bjorn Andersson commit 30eb3fbee3da7892b98283f9d68667fc59bc390e Author: Alex Elder Date: Fri Jul 24 13:11:41 2020 -0500 net: ipa: new notification infrastructure Use the new SSR notifier infrastructure to request notifications of modem events, rather than the remoteproc IPA notification system. The latter was put in place temporarily with the knowledge that the new mechanism would become available. Acked-by: David S. Miller Reviewed-by: Bjorn Andersson Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20200724181142.13581-2-elder@linaro.org Signed-off-by: Bjorn Andersson commit 87218f96c21a992817f3841078df873a1b037a58 Author: Suman Anna Date: Fri Jun 12 17:53:57 2020 -0500 remoteproc: k3-dsp: Add support for C71x DSPs The Texas Instrument's K3 J721E SoCs have a newer next-generation C71x DSP Subsystem in the MAIN voltage domain in addition to the previous generation C66x DSP subsystems. The C71x DSP subsystem is based on the TMS320C71x DSP CorePac module. The C71x CPU is a true 64-bit machine including 64-bit memory addressing and single-cycle 64-bit base arithmetic operations and supports vector signal processing providing a significant lift in DSP processing power over C66x DSPs. J721E SoCs use a C711 (a one-core 512-bit vector width CPU core) DSP that is cache coherent with the A72 Arm cores. Each subsystem has one or more Fixed/Floating-Point DSP CPUs, with 32 KB of L1P Cache, 48 KB of L1D SRAM that can be configured and partitioned as either RAM and/or Cache, and 512 KB of L2 SRAM configurable as either RAM and/or Cache. The CorePac also includes a Matrix Multiplication Accelerator (MMA), a Stream Engine (SE) and a C71x Memory Management Unit (CMMU), an Interrupt Controller (INTC) and a Powerdown Management Unit (PMU) modules. Update the existing K3 DSP remoteproc driver to add support for this C71x DSP subsystem. The firmware loading support is provided by using the newly added 64-bit ELF loader support, and is limited to images using only external DDR memory at the moment. The L1D and L2 SRAMs are used as scratch memory when using as RAMs, and cannot be used for loadable segments. The CMMU is also not supported to begin with, and the driver is designed to treat the MMU as if it is in bypass mode. Signed-off-by: Suman Anna Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200612225357.8251-3-s-anna@ti.com Signed-off-by: Bjorn Andersson commit c6caf22eaa2347e75ef639ccfafd277ce466e1ca Author: Suman Anna Date: Fri Jun 12 17:53:56 2020 -0500 dt-bindings: remoteproc: k3-dsp: Update bindings for C71x DSPs Some Texas Instruments K3 family of SoCs have one of more newer generation TMS320C71x CorePac processor subsystem in addition to the existing TMS320C66x CorePac processor subsystems. Update the device tree bindings document for the C71x DSP devices. The example is also updated to show the single C71 DSP present on J721E SoCs. Reviewed-by: Rob Herring Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20200612225357.8251-2-s-anna@ti.com Signed-off-by: Bjorn Andersson commit aff7543126df2006f9eb44859b11c8615de6967d Merge: 323410ef74198 d69ea414c9b49 Author: David S. Miller Date: Tue Jul 28 17:07:06 2020 -0700 Merge branch 'introduce-PLDM-firmware-update-library' Jacob Keller says: ==================== introduce PLDM firmware update library This series goal is to enable support for updating the ice hardware flash using the devlink flash command. The ice firmware update files are distributed using the file format described by the "PLDM for Firmware Update" standard: https://www.dmtf.org/documents/pmci/pldm-firmware-update-specification-100 Because this file format is standard, this series introduces a new library that handles the generic logic for parsing the PLDM file header. The library uses a design that is very similar to the Mellanox mlxfw module. That is, a simple ops table is setup and device drivers instantiate an instance of the pldmfw library with the device specific operations. Doing so allows for each device to implement the low level behavior for how to interact with its firmware. This series includes the library and an implementation for the ice hardware. I've removed all of the parameters, and the proposed changes to support overwrite mode. I'll be working on the overwrite mask suggestion from Jakub as a follow-up series. Because the PLDM file format is a standard and not something that is specific to the Intel hardware, I opted to place this update library in lib/pldmfw. I should note that while I tried to make the library generic, it does not attempt to mimic the complete "Update Agent" as defined in the standard. This is mostly due to the fact that the actual interfaces exposed to software for the ice hardware would not allow this. This series depends on some work just recently and is based on top of the patch series sent by Tony published at: https://lore.kernel.org/netdev/20200723234720.1547308-1-anthony.l.nguyen@intel.com/T/#t Changes since v2 RFC * Removed overwrite mode patches, as this can become a follow up series with a separate discussion * Fixed a minor bug in the pldm_timestamp structure not being packed. * Dropped Cc for other driver maintainers, as this series no longer includes changes to the core flash update command. * Re-ordered patches slightly. Changes since v1 RFC * Removed the "allow_downgrade_on_flash_update" parameter. Instead, the driver will always attempt to flash the device, even when firmware indicates that it would be a downgrade. A dev_warn is used to indicate when this occurs. * Removed the "ignore_pending_flash_update". Instead, the driver will always check for and cancel any previous pending update. A devlink flash status message will be sent when this cancellation occurs. * Removed the "reset_after_flash_update" parameter. This will instead be implemented as part of a devlink reset interface, work left for a future change. * Replaced the "flash_update_preservation_level" parameter with a new "overwrite" mode attribute on the flash update command. For ice, this mode will select the preservation level. For all other drivers, I modified them to check that the mode is "OVERWRITE_NOTHING", and have Cc'd the maintainers to get their input. ==================== Signed-off-by: David S. Miller commit d69ea414c9b498064d4cd3ebbe2fd4b8298568bc Author: Jacob Keller Date: Thu Jul 23 17:22:03 2020 -0700 ice: implement device flash update via devlink Use the newly added pldmfw library to implement device flash update for the Intel ice networking device driver. This support uses the devlink flash update interface. The main parts of the flash include the Option ROM, the netlist module, and the main NVM data. The PLDM firmware file contains modules for each of these components. Using the pldmfw library, the provided firmware file will be scanned for the three major components, "fw.undi" for the Option ROM, "fw.mgmt" for the main NVM module containing the primary device firmware, and "fw.netlist" containing the netlist module. The flash is separated into two banks, the active bank containing the running firmware, and the inactive bank which we use for update. Each module is updated in a staged process. First, the inactive bank is erased, preparing the device for update. Second, the contents of the component are copied to the inactive portion of the flash. After all components are updated, the driver signals the device to switch the active bank during the next EMP reset (which would usually occur during the next reboot). Although the firmware AdminQ interface does report an immediate status for each command, the NVM erase and NVM write commands receive status asynchronously. The driver must not continue writing until previous erase and write commands have finished. The real status of the NVM commands is returned over the receive AdminQ. Implement a simple interface that uses a wait queue so that the main update thread can sleep until the completion status is reported by firmware. For erasing the inactive banks, this can take quite a while in practice. To help visualize the process to the devlink application and other applications based on the devlink netlink interface, status is reported via the devlink_flash_update_status_notify. While we do report status after each 4k block when writing, there is no real status we can report during erasing. We simply must wait for the complete module erasure to finish. With this implementation, basic flash update for the ice hardware is supported. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit 2ab560a78e3b2f6b19626dcd47790f35b28cc5db Author: Jacob Keller Date: Thu Jul 23 17:22:02 2020 -0700 ice: add flags indicating pending update of firmware module After a flash update, the pending status of the update can be determined from the device capabilities. Read the appropriate device capability and store whether there is a pending update awaiting a reboot. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit 544cd2ac1328451fdbbd60e5cce52aa1b6fe11a8 Author: Cudzilo, Szymon T Date: Thu Jul 23 17:22:01 2020 -0700 ice: Add AdminQ commands for FW update Add structures, identifiers, and helper functions for several AdminQ commands related to performing a firmware update for the ice hardware. These will be used in future code for implementing the devlink .flash_update handler. Signed-off-by: Cudzilo, Szymon T Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit de9b277ee0321100ee3299a79e6f09dec56aa05e Author: Jacek Naczyk Date: Thu Jul 23 17:22:00 2020 -0700 ice: Add support for unified NVM update flow capability Extends function parsing response from Discover Device Capability AQC to check if the device supports unified NVM update flow. Signed-off-by: Jacek Naczyk Signed-off-by: David S. Miller commit b8265621f4888af9494e1d685620871ec81bc33d Author: Jacob Keller Date: Thu Jul 23 17:21:59 2020 -0700 Add pldmfw library for PLDM firmware update The pldmfw library is used to implement common logic needed to flash devices based on firmware files using the format described by the PLDM for Firmware Update standard. This library consists of logic to parse the PLDM file format from a firmware file object, as well as common logic for sending the relevant PLDM header data to the device firmware. A simple ops table is provided so that device drivers can implement device specific hardware interactions while keeping the common logic to the pldmfw library. This library will be used by the Intel ice networking driver as part of implementing device flash update via devlink. The library aims to be vendor and device agnostic. For this reason, it has been placed in lib/pldmfw, in the hopes that other devices which use the PLDM firmware file format may benefit from it in the future. However, do note that not all features defined in the PLDM standard have been implemented. Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit 21a4d7386e7e8b5f6fb97ced6af3b8181f2c9bd5 Author: Suman Anna Date: Tue Jul 21 17:36:17 2020 -0500 remoteproc: k3-dsp: Add support for L2RAM loading on C66x DSPs The resets for the DSP processors on K3 SoCs are managed through the Power and Sleep Controller (PSC) module. Each DSP typically has two resets - a global module reset for powering on the device, and a local reset that affects only the CPU while allowing access to the other sub-modules within the DSP processor sub-systems. The C66x DSPs have two levels of internal RAMs that can be used to boot from, and the firmware loading into these RAMs require the local reset to be asserted with the device powered on/enabled using the module reset. Enhance the K3 DSP remoteproc driver to add support for loading into the internal RAMs. The local reset is deasserted on SoC power-on-reset, so logic has to be added in probe in remoteproc mode to balance the remoteproc state-machine. Note that the local resets are a no-op on C71x cores, and the hardware does not supporting loading into its internal RAMs. Signed-off-by: Suman Anna Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200721223617.20312-7-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 6edbe024ba17777b065e0d0b8aeca9789a4d880b Author: Suman Anna Date: Tue Jul 21 17:36:16 2020 -0500 remoteproc: k3-dsp: Add a remoteproc driver of K3 C66x DSPs The Texas Instrument's K3 J721E SoCs have two C66x DSP Subsystems in MAIN voltage domain that are based on the TI's standard TMS320C66x DSP CorePac module. Each subsystem has a Fixed/Floating-Point DSP CPU, with 32 KB each of L1P & L1D SRAMs that can be configured and partitioned as either RAM and/or Cache, and 288 KB of L2 SRAM with 256 KB of memory configurable as either RAM and/or Cache. The CorePac also includes an Internal DMA (IDMA), External Memory Controller (EMC), Extended Memory Controller (XMC) with a Region Address Translator (RAT) unit for 32-bit to 48-bit address extension/translations, an Interrupt Controller (INTC) and a Powerdown Controller (PDC). A new remoteproc module is added to perform the device management of these DSP devices. The support is limited to images using only external DDR memory at the moment, the loading support to internal memories and any on-chip RAM memories will be added in a subsequent patch. RAT support is also left for a future patch, and as such the reserved memory carveout regions are all expected to be using memory regions within the first 2 GB. Error Recovery and Power Management features are not currently supported. The C66x remote processors do not have an MMU, and so require fixed memory carveout regions matching the firmware image addresses. Support for this is provided by mandating multiple memory regions to be attached to the remoteproc device. The first memory region will be used to serve as the DMA pool for all dynamic allocations like the vrings and vring buffers. The remaining memory regions are mapped into the kernel at device probe time, and are used to provide address translations for firmware image segments without the need for any RSC_CARVEOUT entries. Any firmware image using memory outside of the supplied reserved memory carveout regions will be errored out. The driver uses various TI-SCI interfaces to talk to the System Controller (DMSC) for managing configuration, power and reset management of these cores. IPC between the A72 cores and the DSP cores is supported through the virtio rpmsg stack using shared memory and OMAP Mailboxes. Signed-off-by: Suman Anna Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200721223617.20312-6-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 2a2180206ab62b42c6a7fd3d77c47c3675cbc893 Author: Suman Anna Date: Tue Jul 21 17:36:15 2020 -0500 dt-bindings: remoteproc: Add bindings for C66x DSPs on TI K3 SoCs Some Texas Instruments K3 family of SoCs have one of more Digital Signal Processor (DSP) subsystems that are comprised of either a TMS320C66x CorePac and/or a next-generation TMS320C71x CorePac processor subsystem. Add the device tree bindings document for the C66x DSP devices on these SoCs. The added example illustrates the DT nodes for the first C66x DSP device present on the K3 J721E family of SoCs. Signed-off-by: Suman Anna Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200721223617.20312-5-s-anna@ti.com Signed-off-by: Bjorn Andersson commit cf7acb49083658be69d6ef83d06865fc9cc51426 Author: Suman Anna Date: Tue Jul 21 17:36:14 2020 -0500 remoteproc: k3: Add TI-SCI processor control helper functions Texas Instruments' K3 generation SoCs have specific modules/register spaces used for configuring the various aspects of a remote processor. These include power, reset, boot vector and other configuration features specific to each compute processor present on the SoC. These registers are managed by the System Controller such as DMSC on K3 AM65x SoCs. The Texas Instrument's System Control Interface (TI-SCI) Message Protocol is used to communicate to the System Controller from various compute processors to invoke specific services provided by the firmware running on the System Controller. Add a common processor control interface header file that can be used by multiple remoteproc drivers. The helper functions within this header file abstract the various TI SCI protocol ops for the remoteproc drivers, and allow them to request the System Controller to be able to program and manage various remote processors on the SoC. The remoteproc drivers are expected to manage the life-cycle of their ti_sci_proc_dev local structures. Signed-off-by: Suman Anna Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200721223617.20312-4-s-anna@ti.com Signed-off-by: Bjorn Andersson commit a8aa5ee100df45f4988975822f5af7c2b67ee9e6 Author: Suman Anna Date: Tue Jul 21 17:36:13 2020 -0500 remoteproc: Introduce rproc_of_parse_firmware() helper Add a new helper function rproc_of_parse_firmware() to the remoteproc core that can be used by various remoteproc drivers to look up the the "firmware-name" property from a rproc device node. This property is already being used by multiple drivers, so this helper can avoid repeating equivalent code in remoteproc drivers. Signed-off-by: Suman Anna Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200721223617.20312-3-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 5de5b6ecf97a021f29403aa272cb4e03318ef586 Author: Dave Airlie Date: Tue Jul 28 14:17:36 2020 +1000 drm/ttm/nouveau: don't call tt destroy callback on alloc failure. This is confusing, and from my reading of all the drivers only nouveau got this right. Just make the API act under driver control of it's own allocation failing, and don't call destroy, if the page table fails to create there is nothing to cleanup here. (I'm willing to believe I've missed something here, so please review deeply). Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200728041736.20689-1-airlied@gmail.com commit 44aa656f22d287b33f33bdb28dfb900846e1fc60 Author: Suman Anna Date: Tue Jul 21 17:36:12 2020 -0500 dt-bindings: arm: keystone: Add common TI SCI bindings Add a bindings document that defines the common TI SCI properties used by various K3 device management nodes such as clock controllers, interrupt controllers, reset controllers or remoteproc devices. The required properties for each device management node shall be specified in the respective binding document. Reviewed-by: Rob Herring Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20200721223617.20312-2-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 323410ef74198303729405ed1ad5ea543a525b52 Merge: 0003041e7a0bf 721e9089905ab Author: David S. Miller Date: Tue Jul 28 17:02:42 2020 -0700 Merge branch 'mptcp-Exchange-MPTCP-DATA_FIN-DATA_ACK-before-TCP-FIN' Mat Martineau says: ==================== mptcp: Exchange MPTCP DATA_FIN/DATA_ACK before TCP FIN This series allows the MPTCP-level connection to be closed with the peers exchanging DATA_FIN and DATA_ACK according to the state machine in appendix D of RFC 8684. The process is very similar to the TCP disconnect state machine. The prior code sends DATA_FIN only when TCP FIN packets are sent, and does not allow for the MPTCP-level connection to be half-closed. Patch 8 ("mptcp: Use full MPTCP-level disconnect state machine") is the core of the series. Earlier patches in the series have some small fixes and helpers in preparation, and the final four small patches do some cleanup. ==================== Signed-off-by: David S. Miller commit 721e9089905ab7aebd5364b86b5f068f632a0e49 Author: Mat Martineau Date: Tue Jul 28 15:12:10 2020 -0700 mptcp: Safely store sequence number when sending data The MPTCP socket's write_seq member can be read without the msk lock held, so use WRITE_ONCE() to store it. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit c75293925f24630326abdf79751d980ec3878f65 Author: Mat Martineau Date: Tue Jul 28 15:12:09 2020 -0700 mptcp: Safely read sequence number when lock isn't held The MPTCP socket's write_seq member should be read with READ_ONCE() when the msk lock is not held. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 06827b348b1d43850a63c3e490fe9712c124fa0c Author: Mat Martineau Date: Tue Jul 28 15:12:08 2020 -0700 mptcp: Skip unnecessary skb extension allocation for bare acks Bare TCP ack skbs are freed right after MPTCP sees them, so the work to allocate, zero, and populate the MPTCP skb extension is wasted. Detect these skbs and do not add skb extensions to them. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 067a0b3dc52f0f79b9fe64ff8d9bcbb0ffbcf8fc Author: Mat Martineau Date: Tue Jul 28 15:12:07 2020 -0700 mptcp: Only use subflow EOF signaling on fallback connections The MPTCP state machine handles disconnections on non-fallback connections, but the mptcp_sock still needs to get notified when fallback subflows disconnect. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 43b54c6ee382f026fc93babf5301ec79e1c9614a Author: Mat Martineau Date: Tue Jul 28 15:12:06 2020 -0700 mptcp: Use full MPTCP-level disconnect state machine RFC 8684 appendix D describes the connection state machine for MPTCP. This patch implements the DATA_FIN / DATA_ACK exchanges and MPTCP-level socket state changes described in that appendix, rather than simply sending DATA_FIN along with TCP FIN when disconnecting subflows. DATA_FIN is now sent and acknowledged before shutting down the subflows. Received DATA_FIN information (if not part of a data packet) is written to the MPTCP socket when the incoming DSS option is parsed by the subflow, and the MPTCP worker is scheduled to process the flag. DATA_FIN received as part of a full DSS mapping will be handled when the mapping is processed. The DATA_FIN is acknowledged by the worker if the reader is caught up. If there is still data to be moved to the MPTCP-level queue, ack_seq will be incremented to account for the DATA_FIN when it reaches the end of the stream and a DATA_ACK will be sent to the peer. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 16a9a9da17234797b01ca05024d33269872a0ae0 Author: Mat Martineau Date: Tue Jul 28 15:12:05 2020 -0700 mptcp: Add helper to process acks of DATA_FIN After DATA_FIN has been sent, the peer will acknowledge it. An ack of the relevant MPTCP-level sequence number will update the MPTCP connection state appropriately. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 6920b851584cc69a61ebf2cff3948bb153bcef20 Author: Mat Martineau Date: Tue Jul 28 15:12:04 2020 -0700 mptcp: Add mptcp_close_state() helper This will be used to transition to the appropriate state on close and determine if a DATA_FIN needs to be sent for that state transition. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 3721b9b64676b3377a966f3d96acafd70bb32dd9 Author: Mat Martineau Date: Tue Jul 28 15:12:03 2020 -0700 mptcp: Track received DATA_FIN sequence number and add related helpers Incoming DATA_FIN headers need to propagate the presence of the DATA_FIN bit and the associated sequence number to the MPTCP layer, even when arriving on a bare ACK that does not get added to the receive queue. Add structure members to store the DATA_FIN information and helpers to set and check those values. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 7279da6145bbb2e41a61def5d9bca5b65f12de9d Author: Mat Martineau Date: Tue Jul 28 15:12:02 2020 -0700 mptcp: Use MPTCP-level flag for sending DATA_FIN Since DATA_FIN information is the same for every subflow, store it only in the mptcp_sock. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 242e63f651e94da5fa3cbe6ae0a62dd219226418 Author: Mat Martineau Date: Tue Jul 28 15:12:01 2020 -0700 mptcp: Remove outdated and incorrect comment mptcp_close() acquires the msk lock, so it clearly should not be held before the function is called. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 57baaf2875404b555587391608da1625863086fa Author: Mat Martineau Date: Tue Jul 28 15:12:00 2020 -0700 mptcp: Return EPIPE if sending is shut down during a sendmsg A MPTCP socket where sending has been shut down should not attempt to send additional data, since DATA_FIN has already been sent. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 0bac966a1f2ae0e3cbc259c5bb10aab7bbcf8f4b Author: Mat Martineau Date: Tue Jul 28 15:11:59 2020 -0700 mptcp: Allow DATA_FIN in headers without TCP FIN RFC 8684-compliant DATA_FIN needs to be sent and ack'd before subflows are closed with TCP FIN, so write DATA_FIN DSS headers whenever their transmission has been enabled by the MPTCP connection-level socket. Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit ec731e516acf22ce870b735721c6f59e39d0ed44 Author: Dave Airlie Date: Tue Jul 28 13:42:54 2020 +1000 drm/ttm: ttm_bo_swapout_all doesn't use it's argument. Just drop the argument from this. This does ask the question if this is the function vmwgfx should be using or should it be doing an evict all like the other drivers. Reviewed-by: Christian König Reviewed-by: Zack Rusin Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200728034254.20114-1-airlied@gmail.com commit 9d66a3ee25eff9815375812c442e00899c9b7a50 Author: Dave Airlie Date: Tue Jul 28 14:51:29 2020 +1000 drm/ttm: drop unusued function declaration This was removed in f5a9a9383f279 ("drm/ttm: remove TTM_MEMTYPE_FLAG_CMA") but the the declaration was left dangling. Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200728045129.21065-1-airlied@gmail.com commit 08bb88cfc4f0c5ac9053197ced139bf116a91280 Author: Dave Airlie Date: Tue Jul 28 14:00:03 2020 +1000 drm/ttm: make ttm_tt unbind function return void. The return value just led to BUG_ON, I think if a driver wants to BUG_ON here it can do it itself. (don't BUG_ON). Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200728040003.20398-1-airlied@gmail.com commit 310ad7970a0dec847563dc6dba9e7e587d545622 Author: Andrii Nakryiko Date: Tue Jul 28 12:05:27 2020 -0700 bpf: Fix build without CONFIG_NET when using BPF XDP link Entire net/core subsystem is not built without CONFIG_NET. linux/netdevice.h just assumes that it's always there, so the easiest way to fix this is to conditionally compile out bpf_xdp_link_attach() use in bpf/syscall.c. Fixes: aa8d3a716b59 ("bpf, xdp: Add bpf_link-based XDP attachment API") Reported-by: Randy Dunlap Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Randy Dunlap # build-tested Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200728190527.110830-1-andriin@fb.com commit ca5cd355b7f0372da0d50fce5b12a3367e417290 Author: John Fastabend Date: Tue Jul 28 07:39:02 2020 -0700 bpf, selftests: use :: 1 for localhost in tcp_server.py Using localhost requires the host to have a /etc/hosts file with that specific line in it. By default my dev box did not, they used ip6-localhost, so the test was failing. To fix remove the need for any /etc/hosts and use ::1. I could just add the line, but this seems easier. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/159594714197.21431.10113693935099326445.stgit@john-Precision-5820-Tower commit b91aff3b84c10c55bf848d94eda7889a8d0d171d Author: Jiaxun Yang Date: Tue Jul 28 23:36:59 2020 +0800 MIPS: Loongson64: Add ISA node for LS7A PCH Although currently we're not enabling any ISA device in devicetree, but this node is required to express the ranges of address reserved for ISA. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 99b02abbcd59dffff464dc58aa21128705662ca5 Author: Jiaxun Yang Date: Tue Jul 28 23:36:58 2020 +0800 MIPS: Loongson64: DTS: Fix ISA and PCI I/O ranges for RS780E PCH Ranges should express the actual physical address on bus. Also enlarge the PCI I/O size to the actual hardware limit. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 21a379a8cf917e4c45a3c50d8203859ea318c450 Author: Jiaxun Yang Date: Tue Jul 28 23:36:57 2020 +0800 MIPS: Loongson64: Enlarge IO_SPACE_LIMIT It can be very big on LS7A PCH systems. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 6d0068ad15e4f771b35d76adc4e6747649ac4961 Author: Jiaxun Yang Date: Tue Jul 28 23:36:56 2020 +0800 MIPS: Loongson64: Process ISA Node in DeviceTree Previously, we're hardcoding reserved ISA I/O Space in, now we're processing it I/O via DeviceTree directly. The ranges property if ISA node is used to determine the size and address of reserved I/O space. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 2f96593ecc37e98bf99525f0629128080533867f Author: Jiaxun Yang Date: Tue Jul 28 23:36:55 2020 +0800 of_address: Add bus type match for pci ranges parser So the parser can be used to parse range property of ISA bus. As they're all using PCI-like method of range property, there is no need start a new parser. Signed-off-by: Jiaxun Yang Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit aa35a5eee58cce7863b7c0d5e94e3e2e6de59d08 Author: Krzysztof Kozlowski Date: Tue Jul 28 12:45:02 2020 +0200 memory: jz4780-nemc: Do not build by default Enabling the JZ4780_NEMC driver makes sense only for specific hardware - the Ingenic SoC architecture. It is not an essential driver for the SoC support so do not enable it by default. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thomas Bogendoerfer commit 6bc9c1619de3a8a03b412c925404440566568a64 Author: Krzysztof Kozlowski Date: Tue Jul 28 12:45:03 2020 +0200 MIPS: ingenic: Enable JZ4780_NEMC manually The CONFIG_JZ4780_NEMC was previously a default on MIPS but now it has to be enabled manually. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Paul Cercueil Acked-by: Thomas Bogendoerfer Signed-off-by: Thomas Bogendoerfer commit 0003041e7a0bf24594e5d66fe217bbbefdac44ab Merge: 21db923eae812 a31edb2059ed4 Author: David S. Miller Date: Tue Jul 28 13:43:40 2020 -0700 Merge branch 'sockptr_t-fixes-v2' Christoph Hellwig says: ==================== sockptr_t fixes v2 a bunch of fixes for the sockptr_t conversion Changes since v1: - fix a user pointer dereference braino in bpfilter ==================== Signed-off-by: David S. Miller commit a31edb2059ed4e498f9aa8230c734b59d0ad797a Author: Christoph Hellwig Date: Tue Jul 28 18:38:36 2020 +0200 net: improve the user pointer check in init_user_sockptr Make sure not just the pointer itself but the whole range lies in the user address space. For that pass the length and then use the access_ok helper to do the check. Fixes: 6d04fe15f78a ("net: optimize the sockptr_t for unified kernel/user address spaces") Reported-by: David Laight Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit d3c48151512922dd35f1f393b30b9138e4441d14 Author: Christoph Hellwig Date: Tue Jul 28 18:38:35 2020 +0200 net: remove sockptr_advance sockptr_advance never properly worked. Replace it with _offset variants of copy_from_sockptr and copy_to_sockptr. Fixes: ba423fdaa589 ("net: add a new sockptr_t type") Reported-by: Jason A. Donenfeld Reported-by: Ido Schimmel Signed-off-by: Christoph Hellwig Acked-by: Jason A. Donenfeld Tested-by: Ido Schimmel Signed-off-by: David S. Miller commit 035bfd051eae5b365368be915dfaf916aa501a52 Author: Christoph Hellwig Date: Tue Jul 28 18:38:34 2020 +0200 net: make sockptr_is_null strict aliasing safe While the kernel in general is not strict aliasing safe we can trivially do that in sockptr_is_null without affecting code generation, so always check the actually assigned union member. Reported-by: Jan Engelhardt Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit a3ad434ad782085670d74e1a35c4c3f6043749f0 Author: Christoph Hellwig Date: Tue Jul 28 18:38:33 2020 +0200 netfilter: arp_tables: restore a SPDX identifier This was accidentally removed in an unrelated commit. Fixes: c2f12630c60f ("netfilter: switch nf_setsockopt to sockptr_t") Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 21db923eae812cf594d53f6519e113ee1b051f2c Merge: 0082dd8ae18f5 f152b41ba6cf4 Author: David S. Miller Date: Tue Jul 28 13:28:02 2020 -0700 Merge branch 'mlxsw-Add-support-for-QSFP-DD-transceiver-type' Ido Schimmel says: ==================== mlxsw: Add support for QSFP-DD transceiver type This patch set from Vadim adds support for Quad Small Form Factor Pluggable Double Density (QSFP-DD) modules in mlxsw. Patch #1 enables dumping of QSFP-DD module information through ethtool. Patch #2 enables reading of temperature thresholds from QSFP-DD modules for hwmon and thermal zone purposes. Changes since v1 [1]: Only rebase on top of net-next. After discussing with Andrew and Adrian we agreed that current approach is OK and that in the future we can follow Andrew's suggestion to "make a new API where user space can request any pages it want, and specify the size of the page". This should allow us "to work around known issues when manufactures get their EEPROM wrong". [1] https://lore.kernel.org/netdev/20200626144724.224372-1-idosch@idosch.org/#t ==================== Signed-off-by: David S. Miller commit f152b41ba6cf43a3a5a87c7b45e6a2722a6195dc Author: Vadim Pasternak Date: Tue Jul 28 13:20:16 2020 +0300 mlxsw: core: Add support for temperature thresholds reading for QSFP-DD transceivers Allow QSFP-DD transceivers temperature thresholds reading for hardware monitoring and thermal control. For this type, the thresholds are located in page 02h according to the "Module and Lane Thresholds" description from Common Management Interface Specification. Signed-off-by: Vadim Pasternak Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6af496adcbb8d4656b90a85401eeceb88d520c0d Author: Vadim Pasternak Date: Tue Jul 28 13:20:15 2020 +0300 mlxsw: core: Add ethtool support for QSFP-DD transceivers The Quad Small Form Factor Pluggable Double Density (QSFP-DD) hardware specification defines a form factor that supports up to 400 Gbps in aggregate over an 8x50-Gbps electrical interface. The QSFP-DD supports both optical and copper interfaces. Implementation is based on Common Management Interface Specification; Rev 4.0 May 8, 2019. Table 8-2 "Identifier and Status Summary (Lower Page)" from this spec defines "Id and Status" fields located at offsets 00h - 02h. Bit 2 at offset 02h ("Flat_mem") specifies QSFP EEPROM memory mode, which could be "upper memory flat" or "paged". Flat memory mode is coded "1", and indicates that only page 00h is implemented in EEPROM. Paged memory is coded "0" and indicates that pages 00h, 01h, 02h, 10h and 11h are implemented. Pages 10h and 11h are currently not supported by the driver. "Flat" memory mode is used for the passive copper transceivers. For this type only page 00h (256 bytes) is available. "Paged" memory is used for the optical transceivers. For this type pages 00h (256 bytes), 01h (128 bytes) and 02h (128 bytes) are available. Upper page 01h contains static advertising field, while upper page 02h contains the module-defined thresholds and lane-specific monitors. Extend enumerator 'mlxsw_reg_mcia_eeprom_module_info_id' with additional field 'MLXSW_REG_MCIA_EEPROM_MODULE_INFO_TYPE_ID'. This field is used to indicate for QSFP-DD transceiver type which memory mode is to be used. Expose 256 bytes buffer for QSFP-DD passive copper transceiver and 512 bytes buffer for optical. Signed-off-by: Vadim Pasternak Signed-off-by: Ido Schimmel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0082dd8ae18f5d17c0cf223edea3a072f918a6be Merge: f21bbd63308f6 22f9d2f4ee810 Author: David S. Miller Date: Tue Jul 28 13:23:31 2020 -0700 Merge tag 'mlx5-updates-2020-07-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-07-28 Misc and small update to mlx5 driver: 1) Aya adds PCIe relaxed ordering support for mlx5 netdev queues. 2) Eran Refactors pages data base to be per vf/function to speedup unload time. 3) Parav changes eswitch steering initialization to account for tota_vports rather than for only active vports and Link non uplink representors to PCI device, for uniform naming scheme. 4) Tariq, trivial RX code improvements and missing inidirect calls wrappers. 5) Small cleanup patches ==================== Signed-off-by: David S. Miller commit f21bbd63308f677f0f32471cfa7dcdae17fd14da Author: Vaibhav Gupta Date: Tue Jul 28 09:58:10 2020 +0530 farsync: use generic power management The .suspend() and .resume() callbacks are not defined for this driver. Still, their power management structure follows the legacy framework. To bring it under the generic framework, simply remove the binding of callbacks from "struct pci_driver". Change code indentation from space to tab in "struct pci_driver". Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 71cab8ef5c9e53ae2359c4130f4365428ba10136 Author: Leon Romanovsky Date: Mon Jul 27 12:57:46 2020 +0300 RDMA/mlx5: Delete unreachable code Delete two occurrences of unreachable code discovered by the Coverity. Link: https://lore.kernel.org/r/20200727095746.495915-1-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7d17e83abec1be3355260b3e4812044c65c32907 Author: Ralph Campbell Date: Thu Jul 23 15:30:03 2020 -0700 mm/hmm/test: use the new migration invalidation Use the new MMU_NOTIFY_MIGRATE event to skip MMU invalidations of device private memory and handle the invalidation in the driver as part of migrating device private memory. Link: https://lore.kernel.org/r/20200723223004.9586-6-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit f8477ce6b5923ef9829e32f2165ea9c2b4b754d2 Author: Ralph Campbell Date: Thu Jul 23 15:30:02 2020 -0700 nouveau/svm: use the new migration invalidation Use the new MMU_NOTIFY_MIGRATE event to skip GPU MMU invalidations of device private memory and handle the invalidation in the driver as part of migrating device private memory. Link: https://lore.kernel.org/r/20200723223004.9586-5-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit 998427b3ad2c769082853880cf353557ec0ec77d Author: Ralph Campbell Date: Thu Jul 23 15:30:01 2020 -0700 mm/notifier: add migration invalidation type Currently migrate_vma_setup() calls mmu_notifier_invalidate_range_start() which flushes all device private page mappings whether or not a page is being migrated to/from device private memory. In order to not disrupt device mappings that are not being migrated, shift the responsibility for clearing device private mappings to the device driver and leave CPU page table unmapping handled by migrate_vma_setup(). To support this, the caller of migrate_vma_setup() should always set struct migrate_vma::pgmap_owner to a non NULL value that matches the device private page->pgmap->owner. This value is then passed to the struct mmu_notifier_range with a new event type which the driver's invalidation function can use to avoid device MMU invalidations. Link: https://lore.kernel.org/r/20200723223004.9586-4-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit 5143192cd410c4fc83be09a2e73423765aee072b Author: Ralph Campbell Date: Thu Jul 23 15:30:00 2020 -0700 mm/migrate: add a flags parameter to migrate_vma The src_owner field in struct migrate_vma is being used for two purposes, it acts as a selection filter for which types of pages are to be migrated and it identifies device private pages owned by the caller. Split this into separate parameters so the src_owner field can be used just to identify device private pages owned by the caller of migrate_vma_setup(). Rename the src_owner field to pgmap_owner to reflect it is now used only to identify which device private pages to migrate. Link: https://lore.kernel.org/r/20200723223004.9586-3-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Reviewed-by: Bharata B Rao Signed-off-by: Jason Gunthorpe commit 3ad7b4e8f89d6bcc9887ca701cf2745a6aedb1a0 Author: Yu Kuai Date: Tue Jul 21 21:45:51 2020 +0800 ARM: socfpga: PM: add missing put_device() call in socfpga_setup_ocram_self_refresh() if of_find_device_by_node() succeed, socfpga_setup_ocram_self_refresh doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: 44fd8c7d4005 ("ARM: socfpga: support suspend to ram") Signed-off-by: Yu Kuai Signed-off-by: Dinh Nguyen commit 1a77decd0caed0bc5b6f5e474981d574076f0841 Author: Ralph Campbell Date: Thu Jul 23 15:29:59 2020 -0700 nouveau: fix storing invalid ptes When migrating a range of system memory to device private memory, some of the pages in the address range may not be migrating. In this case, the non migrating pages won't have a new GPU MMU entry to store but the nvif_object_ioctl() NVIF_VMM_V0_PFNMAP method doesn't check the input and stores a bad valid GPU page table entry. Fix this by skipping the invalid input PTEs when updating the GPU page tables. Link: https://lore.kernel.org/r/20200723223004.9586-2-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit 58789a1990c1a849a461ac912e72a698a771951a Author: Venkata Lakshmi Narayana Gubba Date: Tue Jul 28 21:23:00 2020 +0530 Bluetooth: hci_qca: Stop collecting memdump again for command timeout during SSR Setting memdump state to idle prior to setting of callback function pointer for command timeout to NULL,causing the issue.Now moved the initialisation of memdump state to qca_setup(). Fixes: d841502c79e3 ("Bluetooth: hci_qca: Collect controller memory dump during SSR") Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann commit 4e8c36c3b0d73d46aa27cfd4308aaa445a1067df Author: Abhishek Pandit-Subedi Date: Tue Jul 28 09:58:07 2020 -0700 Bluetooth: Fix suspend notifier race Unregister from suspend notifications and cancel suspend preparations before running hci_dev_do_close. Otherwise, the suspend notifier may race with unregister and cause cmd_timeout even after hdev has been freed. Below is the trace from when this panic was seen: [ 832.578518] Bluetooth: hci_core.c:hci_cmd_timeout() hci0: command 0x0c05 tx timeout [ 832.586200] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 832.586203] #PF: supervisor read access in kernel mode [ 832.586205] #PF: error_code(0x0000) - not-present page [ 832.586206] PGD 0 P4D 0 [ 832.586210] PM: suspend exit [ 832.608870] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 832.613232] CPU: 3 PID: 10755 Comm: kworker/3:7 Not tainted 5.4.44-04894-g1e9dbb96a161 #1 [ 832.630036] Workqueue: events hci_cmd_timeout [bluetooth] [ 832.630046] RIP: 0010:__queue_work+0xf0/0x374 [ 832.630051] RSP: 0018:ffff9b5285f1fdf8 EFLAGS: 00010046 [ 832.674033] RAX: ffff8a97681bac00 RBX: 0000000000000000 RCX: ffff8a976a000600 [ 832.681162] RDX: 0000000000000000 RSI: 0000000000000009 RDI: ffff8a976a000748 [ 832.688289] RBP: ffff9b5285f1fe38 R08: 0000000000000000 R09: ffff8a97681bac00 [ 832.695418] R10: 0000000000000002 R11: ffff8a976a0006d8 R12: ffff8a9745107600 [ 832.698045] usb 1-6: new full-speed USB device number 119 using xhci_hcd [ 832.702547] R13: ffff8a9673658850 R14: 0000000000000040 R15: 000000000000001e [ 832.702549] FS: 0000000000000000(0000) GS:ffff8a976af80000(0000) knlGS:0000000000000000 [ 832.702550] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 832.702550] CR2: 0000000000000000 CR3: 000000010415a000 CR4: 00000000003406e0 [ 832.702551] Call Trace: [ 832.702558] queue_work_on+0x3f/0x68 [ 832.702562] process_one_work+0x1db/0x396 [ 832.747397] worker_thread+0x216/0x375 [ 832.751147] kthread+0x138/0x140 [ 832.754377] ? pr_cont_work+0x58/0x58 [ 832.758037] ? kthread_blkcg+0x2e/0x2e [ 832.761787] ret_from_fork+0x22/0x40 [ 832.846191] ---[ end trace fa93f466da517212 ]--- Fixes: 9952d90ea2885 ("Bluetooth: Handle PM_SUSPEND_PREPARE and PM_POST_SUSPEND") Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Miao-chen Chou Signed-off-by: Marcel Holtmann commit 5cf81ce1893da01fede18c6749eafd4bc1c5ae9b Author: Dan Williams Date: Mon Jul 20 15:08:13 2020 -0700 libnvdimm: Convert to DEVICE_ATTR_ADMIN_RO() Move libnvdimm sysfs attributes that currently use an open coded DEVICE_ATTR() to hide sensitive root-only information (physical memory layout) to the new DEVICE_ATTR_ADMIN_RO() helper. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit f4013ca6803049665a11aab07909eb0e04f22f12 Merge: 48778464bb7d3 eedfd73d401b5 Author: Vishal Verma Date: Tue Jul 28 12:03:03 2020 -0600 Merge branch 'for-5.9/dax' into libnvdimm-for-next This contains a handful of dax changes for v5.9. Of the three commits, one is a print verbosity change, and two are independent fixes that fell out of the PKS work [1]. [1]: https://lore.kernel.org/linux-nvdimm/20200717072056.73134-1-ira.weiny@intel.com commit eedfd73d401b5584ab270b5f9f80079e56c7807e Author: Ira Weiny Date: Fri Jul 17 00:20:50 2020 -0700 drivers/dax: Expand lock scope to cover the use of addresses The addition of PKS protection to dax read lock/unlock will require that the address returned by dax_direct_access() be protected by this lock. Correct the locking by ensuring that the use of kaddr and end_kaddr are covered by the dax read lock/unlock. Link: https://lore.kernel.org/r/20200717072056.73134-12-ira.weiny@intel.com Reviewed-by: Dan Williams Signed-off-by: Ira Weiny Signed-off-by: Vishal Verma commit c7fe193f1877e80e905a39e494ff53bd20c97970 Author: Ira Weiny Date: Fri Jul 17 00:20:49 2020 -0700 fs/dax: Remove unused size parameter Passing size to copy_user_dax implies it can copy variable sizes of data when in fact it calls copy_user_page() which is exactly a page. We are safe because the only caller uses PAGE_SIZE anyway so just remove the variable for clarity. While we are at it change copy_user_dax() to copy_cow_page_dax() to make it clear it is a singleton helper for this one case not implementing what dax_iomap_actor() does. Link: https://lore.kernel.org/r/20200717072056.73134-11-ira.weiny@intel.com Reviewed-by: Ben Widawsky Reviewed-by: Dan Williams Signed-off-by: Ira Weiny Signed-off-by: Vishal Verma commit 231609785cbfb341e7d6d24a74d6ab8cc518835f Author: Coly Li Date: Sun Jul 26 00:24:50 2020 +0800 dax: print error message by pr_info() in __generic_fsdax_supported() In struct dax_operations, the callback routine dax_supported() returns a bool type result. For false return value, the caller has no idea whether the device does not support dax at all, or it is just some mis- configuration issue. An example is formatting an Ext4 file system on pmem device on top of a NVDIMM namespace by, # mkfs.ext4 /dev/pmem0 If the fs block size does not match kernel space memory page size (which is possible on non-x86 platform), mount this Ext4 file system will fail, # mount -o dax /dev/pmem0 /mnt mount: /mnt: wrong fs type, bad option, bad superblock on /dev/pmem0, missing codepage or helper program, or other error. And from the dmesg output there is only the following information, [ 307.853148] EXT4-fs (pmem0): DAX unsupported by block device. The above information is quite confusing. Because definitely the pmem0 device supports dax operation, and the super block is consistent as how it was created by mkfs.ext4. Indeed the failure is from __generic_fsdax_supported() by the following code piece, if (blocksize != PAGE_SIZE) { pr_debug("%s: error: unsupported blocksize for dax\n", bdevname(bdev, buf)); return false; } It is because the Ext4 block size is 4KB and kernel page size is 8KB or 16KB. It is not simple to make dax_supported() from struct dax_operations or __generic_fsdax_supported() to return exact failure type right now. So the simplest fix is to use pr_info() to print all the error messages inside __generic_fsdax_supported(). Then users may find informative clue from the kernel message at least. Message printed by pr_debug() is very easy to be ignored by users. This patch prints error message by pr_info() in __generic_fsdax_supported(), when then mount fails, following lines can be found from dmesg output, [ 2705.500885] pmem0: error: unsupported blocksize for dax [ 2705.500888] EXT4-fs (pmem0): DAX unsupported by block device. Now the users may have idea the mount failure is from pmem driver for unsupported block size. Link: https://lore.kernel.org/r/20200725162450.95999-1-colyli@suse.de Cc: Dan Williams Cc: Anthony Iliopoulos Reported-by: Michal Suchanek Suggested-by: Jan Kara Reviewed-by: Jan Kara Reviewed-by: Ira Weiny Reviewed-by: Pankaj Gupta Signed-off-by: Coly Li Signed-off-by: Vishal Verma commit e72b23dec1da5e62a0090c5da1d926778284e230 Author: John David Anglin Date: Tue Jul 28 19:13:20 2020 +0200 parisc: Do not use an ordered store in pa_tlb_lock() No need to use an ordered store in pa_tlb_lock() and update the comment regarng usage of the sid register to unlocak a spinlock in tlb_unlock0(). Signed-off-by: John David Anglin Signed-off-by: Helge Deller Cc: # v5.0+ commit 157e9afcc4fa25068b0e8743bc254a9b56010e13 Author: Helge Deller Date: Tue Jul 28 18:56:14 2020 +0200 Revert "parisc: Revert "Release spinlocks using ordered store"" This reverts commit 86d4d068df573a8c2105554624796c086d6bec3d. Signed-off-by: Helge Deller Cc: # v5.0+ commit 6e9f06ee6c9566f3606d93182ac8f803a148504b Author: Helge Deller Date: Tue Jul 28 18:54:40 2020 +0200 Revert "parisc: Use ldcw instruction for SMP spinlock release barrier" This reverts commit 9e5c602186a692a7e848c0da17aed40f49d30519. No need to use the ldcw instruction as SMP spinlock release barrier. Revert it to gain back speed again. Signed-off-by: Helge Deller Cc: # v5.2+ commit 462fb756c7de1ffe5bc6099149136031c2d9c02a Author: Helge Deller Date: Tue Jul 28 18:52:58 2020 +0200 Revert "parisc: Drop LDCW barrier in CAS code when running UP" This reverts commit e6eb5fe9123f05dcbf339ae5c0b6d32fcc0685d5. We need to optimize it differently. A follow up patch will correct it. Signed-off-by: Helge Deller Cc: # v5.2+ commit 476af91933ce81d534761d31382459f6e9eb6c6d Author: Mike Marshall Date: Thu Jul 9 15:02:32 2020 -0400 orangefs: posix acl fix... Al Viro pointed out that I broke some acl functionality... * ACLs could not be fully removed * posix_acl_chmod would be called while the old ACL was still cached * new mode propagated to orangefs server before ACL. ... when I tried to make sure that modes that got changed as a result of ACL-sets would be sent back to the orangefs server. Not wanting to try and change the code without having some cases to test it with, I began to hunt for setfacl examples that were expressible in pure mode. Along the way I found examples like the following which confused me: user A had a file (/home/A/asdf) with mode 740 user B was in user A's group user C was not in user A's group setfacl -m u:C:rwx /home/A/asdf The above setfacl caused ls -l /home/A/asdf to show a mode of 770, making it appear that all users in user A's group now had full access to /home/A/asdf, however, user B still only had read acces. Madness. Anywho, I finally found that the above (whacky as it is) appears to be "posixly on purpose" and explained in acl(5): If the ACL has an ACL_MASK entry, the group permissions correspond to the permissions of the ACL_MASK entry. Signed-off-by: Mike Marshall commit 3d05b8aebc5f10ee3ab129b61100196855dd7249 Author: Helge Deller Date: Tue Jul 28 18:49:45 2020 +0200 Revert "parisc: Improve interrupt handling in arch_spin_lock_flags()" This reverts commit 2772f0efd5bbd5413db3d22e363b779ca0fa5310. It turns out that we want to implement the spinlock code differently. Signed-off-by: Helge Deller Cc: # v5.7+ commit e0c6ecf2d859c6a2c7697ebb8973d11b74e70754 Author: Mark Brown Date: Tue Jul 28 17:34:35 2020 +0100 ASoC: ak4613: Undo conversion to YAML bindings Revert 5b235b5522bf38 ("ASoC: dt-bindings: ak4613: switch to yaml base Documentation") for the time being since it depends on other conversions. Reported-by: Rob Herring Signed-off-by: Mark Brown commit afca861bc6a3141c858d08279eb9afca76584fa6 Author: Sowjanya Komatineni Date: Mon Jul 27 13:57:23 2020 -0700 i2c: tegra: Avoid tegra_i2c_init_dma() for Tegra210 vi i2c VI I2C is on host1x bus so APB DMA can't be used for Tegra210 VI I2C and there are no tx and rx dma channels for VI I2C. So, avoid attempt of requesting DMA channels. Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Wolfram Sang commit 0d722620986722208c6bc2a67f5d68aa73b7cd5f Author: Sowjanya Komatineni Date: Mon Jul 27 13:57:22 2020 -0700 i2c: tegra: Fix runtime resume to re-init VI I2C VI I2C is on host1x bus and is part of VE power domain. During suspend/resume VE power domain goes through power off/on. So, controller reset followed by i2c re-initialization is required after the domain power up. This patch fixes it. Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Wolfram Sang commit 42aa38b54e35216351e52bb03382a38edc6f1bb8 Author: Sowjanya Komatineni Date: Mon Jul 27 13:57:21 2020 -0700 i2c: tegra: Fix the error path in tegra_i2c_runtime_resume tegra_i2c_runtime_resume does not disable prior enabled clocks properly. This patch fixes it. Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Wolfram Sang commit 7232f53e73839bec4a2747d0c01d29994f9f39b9 Author: Sowjanya Komatineni Date: Mon Jul 27 13:57:20 2020 -0700 i2c: tegra: Remove NULL pointer check before clk_enable/disable/prepare/unprepare clk_enable, clk_disable, clk_prepare, and clk_unprepare APIs have implementation for checking clk pointer not NULL and clock consumers can safely call these APIs without NULL pointer check. So, this patch cleans up Tegra i2c driver to remove explicit checks before these APIs. Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Wolfram Sang commit 9e29420ddb1331de1f86fe544a460d8f2c6d11c6 Author: Sowjanya Komatineni Date: Mon Jul 27 13:57:19 2020 -0700 i2c: tegra: Don't mark VI I2C as IRQ safe runtime PM Tegra VI I2C is part of VE power domain and typically used for camera usecases. VE power domain is not always on and is non-IRQ safe. So, IRQ safe device cannot be attached to a non-IRQ safe domain as it prevents powering off the PM domain and generic power domain driver will warn. Current driver marks all I2C devices as IRQ safe and VI I2C device does not require IRQ safe as it will not be used for atomic transfers. This patch has fix to make VI I2C as non-IRQ safe. Reviewed-by: Dmitry Osipenko Signed-off-by: Sowjanya Komatineni Signed-off-by: Wolfram Sang commit 4294e4accf8d695ea5605f6b189008b692e3e82c Author: Jon Lin Date: Thu Jul 23 08:43:56 2020 +0800 spi: rockchip: Fix error in SPI slave pio read The RXFLR is possible larger than rx_left in Rockchip SPI, fix it. Fixes: 01b59ce5dac8 ("spi: rockchip: use irq rather than polling") Signed-off-by: Jon Lin Tested-by: Emil Renner Berthing Reviewed-by: Heiko Stuebner Reviewed-by: Emil Renner Berthing Link: https://lore.kernel.org/r/20200723004356.6390-3-jon.lin@rock-chips.com Signed-off-by: Mark Brown commit 13a96935e6f66bafb6da92791120546a4bf20889 Author: Jon Lin Date: Thu Jul 23 08:43:55 2020 +0800 spi: rockchip: Support 64-location deep FIFOs The FIFO depth of SPI V2 is 64 instead of 32, add support for it. Signed-off-by: Jon Lin Tested-by: Emil Renner Berthing Reviewed-by: Emil Renner Berthing Link: https://lore.kernel.org/r/20200723004356.6390-2-jon.lin@rock-chips.com Signed-off-by: Mark Brown commit 4d9ca632c847ab88f2f7e7e2747aea966f1390ce Author: Jon Lin Date: Thu Jul 23 08:43:54 2020 +0800 spi: rockchip: Config spi rx dma burst size depend on xfer length The burst length can be adjusted according to the transmission length to improve the transmission rate Signed-off-by: Jon Lin Tested-by: Emil Renner Berthing Reviewed-by: Emil Renner Berthing Link: https://lore.kernel.org/r/20200723004356.6390-1-jon.lin@rock-chips.com Signed-off-by: Mark Brown commit 15b413d93ccd0d26c29f005df82c299c8f14cbd6 Author: Vaibhav Gupta Date: Mon Jul 27 22:59:37 2020 +0530 spi: spi-topcliff-pch: drop call to wakeup-disable Before generic upgrade, both .suspend() and .resume() were invoking pci_enable_wake(pci_dev, PCI_D3hot, 0). Hence, disabling wakeup in both states. (Normal trend is .suspend() enables and .resume() disables the wakeup.) This was ambiguous and may be buggy. Instead of replicating the legacy behavior, drop the wakeup-disable call. Fixes: f185bcc77980 ("spi: spi-topcliff-pch: use generic power management") Reported-by: Andy Shevchenko Signed-off-by: Vaibhav Gupta Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200727172936.661567-1-vaibhavgupta40@gmail.com Signed-off-by: Mark Brown commit aa9e862d7d5bcecd4dca9f39e8b684b93dd84ee7 Author: Christian Eggers Date: Tue Jul 28 12:08:32 2020 +0200 spi: spidev: Align buffers for DMA Simply copying all xfers from userspace into one bounce buffer causes alignment problems if the SPI controller uses DMA. Ensure that all transfer data blocks within the rx and tx bounce buffers are aligned for DMA (according to ARCH_KMALLOC_MINALIGN). Alignment may increase the usage of the bounce buffers. In some cases, the buffers may need to be increased using the "bufsiz" module parameter. Signed-off-by: Christian Eggers Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200728100832.24788-1-ceggers@arri.de Signed-off-by: Mark Brown commit 0516c2f6ae6570a0c4a081189d71a48cfadc34a7 Author: Daniel Wagner Date: Tue Jul 28 18:20:36 2020 +0200 block: Remove callback typedefs for blk_mq_ops No need to define typedefs for the callbacks, because there is not a single user except blk_mq_ops. Signed-off-by: Daniel Wagner Signed-off-by: Jens Axboe commit 92a007944e37a6de8820dca83e802f35c6faca3a Author: Seung-Woo Kim Date: Fri Jul 24 13:19:31 2020 +0900 ASoC: bcm2835: Silence clk_get() error on -EPROBE_DEFER Silence clk_get() error with dev_dbg() on -EPROBE_DEFER. Signed-off-by: Seung-Woo Kim Link: https://lore.kernel.org/r/1595564371-13692-1-git-send-email-sw0312.kim@samsung.com Signed-off-by: Mark Brown commit 176cf704425f3d22603d379ffa4a1033a24a779d Author: Pi-Hsun Shih Date: Tue Jul 28 17:19:09 2020 +0800 regulator: cros-ec-regulator: Fix double free of desc->name. The desc->name field is allocated with devm_kstrdup, but is also kfreed on the error path, causing it to be double freed. Remove the kfree on the error path. Fixes: 8d9f8d57e023 ("regulator: Add driver for cros-ec-regulator") Signed-off-by: Pi-Hsun Shih Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200728091909.2009771-1-pihsun@chromium.org Signed-off-by: Mark Brown commit 483e20a01a961cd97fbc0e4fabf42b82b23b7950 Merge: e35cf9f5edb18 79560b8aeb01a Author: Mark Brown Date: Tue Jul 28 16:43:36 2020 +0100 Merge series "SOF Fixes for S0iX suspend/resume sequence" from Ranjani Sridharan : This set of patches is required for facilitating system S0ix entry when the DSP is in D0I3. This first patch adds the missing CORB/RIRB DMA stop and restart to the suspend/resume sequence along with powering up/down the links. The second patch ensures that the FW traces are disabled when the system enters S0ix with the DSP in D0I3. Marcin Rajwa (2): ASoC: SOF: Intel: fix the suspend procedure to support s0ix entry ASoC: SOF: Intel: disable traces when switching to S0Ix D0I3 sound/soc/sof/intel/hda-dsp.c | 48 ++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) -- 2.25.1 commit e35cf9f5edb18fd9daf1c6ba7a89f463334526c4 Author: Dan Murphy Date: Thu Jul 23 11:08:37 2020 -0500 ASoC: tas2562: Convert the tas2562 binding to yaml Convert the TAS2562 text file to yaml format. Signed-off-by: Dan Murphy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200723160838.9738-1-dmurphy@ti.com Signed-off-by: Mark Brown commit f78a97003b8babb1c49e2e4a6b46f15ac31ecf49 Author: Dan Murphy Date: Thu Jul 23 11:08:38 2020 -0500 ASoC: tas2562: Update shutdown GPIO property Update the shutdown GPIO property to be shutdown from shut-down. Fixes: c173dba44c2d2 ("ASoC: tas2562: Introduce the TAS2562 amplifier") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200723160838.9738-2-dmurphy@ti.com Signed-off-by: Mark Brown commit 92e67a9c4f206dc9c859c405e67448a8be59ac5d Author: Katsuhiro Suzuki Date: Sat Jul 25 00:59:33 2020 +0900 ASoC: convert Everest ES8316 binding to yaml This patch converts Everest Semiconductor ES8316 low power audio CODEC binding to DT schema. Signed-off-by: Katsuhiro Suzuki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200724155933.1040501-1-katsuhiro@katsuster.net Signed-off-by: Mark Brown commit 3570922c4d6d6c98ae840b8725d69d58b14864fc Author: Charles Keepax Date: Tue Jul 28 15:41:41 2020 +0100 ASoC: madera: Add channel numbers to AIFs Set the channel number on each AIF widget to allow unused channels not to be powered up across AIFs. Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200728144141.16104-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 08c875cbf481d74db82d6bba2fbcf580087dee24 Author: Daniel Wagner Date: Tue Jul 28 15:29:51 2020 +0200 block: Use non _rcu version of list functions for tag_set_list tag_set_list is only accessed under the tag_set_lock lock. There is no need for using the _rcu list functions. The _rcu list function were introduced to allow read access to the tag_set_list protected under RCU, see 705cda97ee3a ("blk-mq: Make it safe to use RCU to iterate over blk_mq_tag_set.tag_list") and 05b79413946d ("Revert "blk-mq: don't handle TAG_SHARED in restart""). Those changes got reverted later but the cleanup commit missed a couple of places to undo the changes. Fixes: 97889f9ac24f ("blk-mq: remove synchronize_rcu() from blk_mq_del_queue_tag_set()" Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Cc: Ming Lei Signed-off-by: Jens Axboe commit f046e4a3f0b95bcc410116acbe7e04e648d48f97 Author: Paul Cercueil Date: Tue Jul 28 17:26:29 2020 +0200 memory: jz4780_nemc: Only request IO memory the driver will use The driver only uses the registers up to offset 0x54. Since the EFUSE registers are in the middle of the NEMC registers, we only request the registers we will use for now - that way the EFUSE driver can probe too. Signed-off-by: Paul Cercueil Tested-by: H. Nikolaus Schaller Link: https://lore.kernel.org/r/20200728152629.28878-1-paul@crapouillou.net Signed-off-by: Krzysztof Kozlowski commit fa56dd9152ef955bd21082c5330e4dff8621bca6 Merge: 25252919a1050 d2a4309c1ab6d Author: Greg Kroah-Hartman Date: Tue Jul 28 17:33:10 2020 +0200 Merge tag 'usb-serial-5.9-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.9-rc1 Here are the USB-serial updates for 5.9-rc1, including: - console flow-control support - simulated line-breaks on some ch341 - hardware flow-control fixes for cp210x - break-detection and sysrq fixes for ftdi_sio - sysrq optimisations - input parity checking for cp210x Included are also some new device ids and various clean ups. All have been in linux-next with no reported issues. * tag 'usb-serial-5.9-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: (31 commits) USB: serial: qcserial: add EM7305 QDL product ID USB: serial: iuu_phoenix: fix led-activity helpers USB: serial: sierra: clean up special-interface handling USB: serial: cp210x: use in-kernel types in port data USB: serial: cp210x: drop unnecessary packed attributes USB: serial: cp210x: add support for TIOCGICOUNT USB: serial: cp210x: add support for line-status events USB: serial: cp210x: disable interface on errors in open USB: serial: drop redundant transfer-buffer casts USB: serial: drop extern keyword from function declarations USB: serial: drop unnecessary sysrq include USB: serial: add sysrq break-handler dummy USB: serial: inline sysrq dummy function USB: serial: only process sysrq when enabled USB: serial: only set sysrq timestamp for consoles USB: serial: ftdi_sio: fix break and sysrq handling USB: serial: ftdi_sio: clean up receive processing USB: serial: ftdi_sio: make process-packet buffer unsigned USB: serial: use fallthrough pseudo-keyword USB: serial: ch341: fix missing simulated-break margin ... commit a394cf6e854d40968d43693597532a242019e337 Merge: c9dc95005a681 a59a2edbbba73 Author: Marc Zyngier Date: Tue Jul 28 16:26:16 2020 +0100 Merge branch 'kvm-arm64/misc-5.9' into kvmarm-master/next-WIP Signed-off-by: Marc Zyngier commit 79560b8aeb01a715f75060e40085e641248bee51 Author: Marcin Rajwa Date: Mon Jul 27 11:36:13 2020 -0700 ASoC: SOF: Intel: disable traces when switching to S0Ix D0I3 We should always disable DMA trace on S0Ix. When staying at S0-D0I3, we should enable DMA trace while both DMA Trace debug is enabled and hda_enable_trace_D0I3_S0 is set. This commit corrects the existed logic errors about that. Signed-off-by: Marcin Rajwa Signed-off-by: Keyon Jie Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200727183613.1419005-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 195f101980dc4c0d0093007d7daac68ec2270f95 Author: Marcin Rajwa Date: Mon Jul 27 11:36:12 2020 -0700 ASoC: SOF: Intel: fix the suspend procedure to support s0ix entry This patch fixes the suspend & resume procedure to allow entry into the low power states with some streams being active as a wake source - wake on voice is a perfect example. The current implementation does not stop the CORB/RIRB DMA and does not power down the HDA links. With firmware's help, the platform has been able to still enter s0ix state on older platforms, but the sequence is still incorrect, and the additional driver actions are needed to ensure correct s0ix behaviour. Signed-off-by: Marcin Rajwa Signed-off-by: Keyon Jie Signed-off-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200727183613.1419005-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit c5be1f2c5bab1538aa29cd42e226d6b80391e3ff Author: Coly Li Date: Tue Jul 28 21:59:20 2020 +0800 bcache: use disk_{start,end}_io_acct() to count I/O for bcache device This patch is a fix to patch "bcache: fix bio_{start,end}_io_acct with proper device". The previous patch uses a hack to temporarily set bi_disk to bcache device, which is mistaken too. As Christoph suggests, this patch uses disk_{start,end}_io_acct() to count I/O for bcache device in the correct way. Fixes: 85750aeb748f ("bcache: use bio_{start,end}_io_acct") Signed-off-by: Coly Li Cc: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe commit c9dc95005a681cf93c4012f7cc75eaa0ad12bfdc Merge: fc279329a8aec 750ed56693803 Author: Marc Zyngier Date: Tue Jul 28 16:10:32 2020 +0100 Merge branch 'kvm-arm64/target-table-no-more' into kvmarm-master/next-WIP Signed-off-by: Marc Zyngier commit 9a74a2b87f4ca6c987039b3fb96d32093584afc2 Author: Colin Ian King Date: Fri Jul 24 11:44:41 2020 +0100 NFS: remove redundant initialization of variable result The variable result is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Trond Myklebust commit fc279329a8aecfee50e010312c2dc373ab6810fb Merge: 300dca6853392 11ac16a4290b7 Author: Marc Zyngier Date: Tue Jul 28 16:02:21 2020 +0100 Merge branch 'kvm-arm64/ptrauth-nvhe' into kvmarm-master/next-WIP Signed-off-by: Marc Zyngier commit 6305166c8771c33a8d5992fb53f93cfecedc14fd Author: Makarand Pawagi Date: Fri Jun 19 09:20:13 2020 +0100 bus: fsl-mc: Add ACPI support for fsl-mc Add ACPI support in the fsl-mc driver. Driver parses MC DSDT table to extract memory and other resources. Interrupt (GIC ITS) information is extracted from the MADT table by drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c. IORT table is parsed to configure DMA. Signed-off-by: Makarand Pawagi Signed-off-by: Diana Craciun Signed-off-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20200619082013.13661-13-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit 998fb7badf0362a2057694878098642ef363d899 Author: Diana Craciun Date: Fri Jun 19 09:20:12 2020 +0100 bus/fsl-mc: Refactor the MSI domain creation in the DPRC driver The DPRC driver is not taking into account the msi-map property and assumes that the icid is the same as the stream ID. Although this assumption is correct, generalize the code to include a translation between icid and streamID. Furthermore do not just copy the MSI domain from parent (for child containers), but use the information provided by the msi-map property. If the msi-map property is missing from the device tree retain the old behaviour for backward compatibility ie the child DPRC objects inherit the MSI domain from the parent. Signed-off-by: Diana Craciun Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20200619082013.13661-12-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit 2bcdd8f2c07f1aa1bfd34fa0dab8e06949e34846 Author: Lorenzo Pieralisi Date: Fri Jun 19 09:20:11 2020 +0100 of/irq: Make of_msi_map_rid() PCI bus agnostic There is nothing PCI bus specific in the of_msi_map_rid() implementation other than the requester ID tag for the input ID space. Rename requester ID to a more generic ID so that the translation code can be used by all busses that require input/output ID translations. No functional change intended. Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Cc: Bjorn Helgaas Cc: Rob Herring Cc: Marc Zyngier Link: https://lore.kernel.org/r/20200619082013.13661-11-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit 6f881aba01109a01a43e4f135673c19190f61133 Author: Diana Craciun Date: Fri Jun 19 09:20:10 2020 +0100 of/irq: make of_msi_map_get_device_domain() bus agnostic of_msi_map_get_device_domain() is PCI specific but it need not be and can be easily changed to be bus agnostic in order to be used by other busses by adding an IRQ domain bus token as an input parameter. Signed-off-by: Diana Craciun Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Bjorn Helgaas # pci/msi.c Cc: Bjorn Helgaas Cc: Rob Herring Cc: Marc Zyngier Link: https://lore.kernel.org/r/20200619082013.13661-10-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit 5bda70c6162de9536cc983eacd24261c9c5de596 Author: Laurentiu Tudor Date: Fri Jun 19 09:20:09 2020 +0100 dt-bindings: arm: fsl: Add msi-map device-tree binding for fsl-mc bus The existing bindings cannot be used to specify the relationship between fsl-mc devices and GIC ITSes. Add a generic binding for mapping fsl-mc devices to GIC ITSes, using msi-map property. In addition, deprecate msi-parent property which no longer makes sense now that we support translating the MSIs. Signed-off-by: Laurentiu Tudor Signed-off-by: Diana Craciun Reviewed-by: Rob Herring Cc: Rob Herring Link: https://lore.kernel.org/r/20200619082013.13661-9-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit a081bd4af4ce80d845a0bab355ab5d0822db8058 Author: Lorenzo Pieralisi Date: Fri Jun 19 09:20:08 2020 +0100 of/device: Add input id to of_dma_configure() Devices sitting on proprietary busses have a device ID space that is owned by the respective bus and related firmware bindings. In order to let the generic OF layer handle the input translations to an IOMMU id, for such busses the current of_dma_configure() interface should be extended in order to allow the bus layer to provide the device input id parameter - that is retrieved/assigned in bus specific code and firmware. Augment of_dma_configure() to add an optional input_id parameter, leaving current functionality unchanged. Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Cc: Rob Herring Cc: Robin Murphy Cc: Joerg Roedel Cc: Laurentiu Tudor Link: https://lore.kernel.org/r/20200619082013.13661-8-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit 746a71d02b5d15817fcb13c956ba999a87773952 Author: Lorenzo Pieralisi Date: Fri Jun 19 09:20:07 2020 +0100 of/iommu: Make of_map_rid() PCI agnostic There is nothing PCI specific (other than the RID - requester ID) in the of_map_rid() implementation, so the same function can be reused for input/output IDs mapping for other busses just as well. Rename the RID instances/names to a generic "id" tag. No functionality change intended. Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Joerg Roedel Cc: Rob Herring Cc: Joerg Roedel Cc: Robin Murphy Cc: Marc Zyngier Link: https://lore.kernel.org/r/20200619082013.13661-7-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit b8e069a2a8da02137605ba585837a3a0c45df01a Author: Lorenzo Pieralisi Date: Fri Jun 19 09:20:06 2020 +0100 ACPI/IORT: Add an input ID to acpi_dma_configure() Some HW devices are created as child devices of proprietary busses, that have a bus specific policy defining how the child devices wires representing the devices ID are translated into IOMMU and IRQ controllers device IDs. Current IORT code provides translations for: - PCI devices, where the device ID is well identified at bus level as the requester ID (RID) - Platform devices that are endpoint devices where the device ID is retrieved from the ACPI object IORT mappings (Named components single mappings). A platform device is represented in IORT as a named component node For devices that are child devices of proprietary busses the IORT firmware represents the bus node as a named component node in IORT and it is up to that named component node to define in/out bus specific ID translations for the bus child devices that are allocated and created in a bus specific manner. In order to make IORT ID translations available for proprietary bus child devices, the current ACPI (and IORT) code must be augmented to provide an additional ID parameter to acpi_dma_configure() representing the child devices input ID. This ID is bus specific and it is retrieved in bus specific code. By adding an ID parameter to acpi_dma_configure(), the IORT code can map the child device ID to an IOMMU stream ID through the IORT named component representing the bus in/out ID mappings. Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Robin Murphy Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20200619082013.13661-6-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit 3a3d208beede7ae03f8c80bed01f47d6b98d4ceb Author: Lorenzo Pieralisi Date: Fri Jun 19 09:20:05 2020 +0100 ACPI/IORT: Remove useless PCI bus walk The PCI bus domain number (used in the iort_match_node_callback() - pci_domain_nr() call) is cascaded through the PCI bus hierarchy at PCI bus enumeration time, therefore there is no need in iort_find_dev_node() to walk the PCI bus upwards to grab the root bus to be passed to iort_scan_node(), the device->bus PCI bus pointer will do. Remove this useless code. Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Robin Murphy Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20200619082013.13661-5-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit 39c3cf566ceafa7c1ae331a5f26fbb685d670001 Author: Lorenzo Pieralisi Date: Fri Jun 19 09:20:04 2020 +0100 ACPI/IORT: Make iort_msi_map_rid() PCI agnostic There is nothing PCI specific in iort_msi_map_rid(). Rename the function using a bus protocol agnostic name, iort_msi_map_id(), and convert current callers to it. Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Will Deacon Cc: Hanjun Guo Cc: Bjorn Helgaas Cc: Sudeep Holla Cc: Robin Murphy Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20200619082013.13661-4-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit d1718a1b7a86743b9c517bf9521695ba909c734f Author: Lorenzo Pieralisi Date: Fri Jun 19 09:20:03 2020 +0100 ACPI/IORT: Make iort_get_device_domain IRQ domain agnostic iort_get_device_domain() is PCI specific but it need not be, since it can be used to retrieve IRQ domain nexus of any kind by adding an irq_domain_bus_token input to it. Make it PCI agnostic by also renaming the requestor ID input to a more generic ID name. Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas # pci/msi.c Cc: Will Deacon Cc: Hanjun Guo Cc: Bjorn Helgaas Cc: Sudeep Holla Cc: Robin Murphy Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20200619082013.13661-3-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit 07d2e59f27cd728e6982b52441673886a6d04267 Author: Lorenzo Pieralisi Date: Fri Jun 19 09:20:02 2020 +0100 ACPI/IORT: Make iort_match_node_callback walk the ACPI namespace for NC When the iort_match_node_callback is invoked for a named component the match should be executed upon a device with an ACPI companion. For devices with no ACPI companion set-up the ACPI device tree must be walked in order to find the first parent node with a companion set and check the parent node against the named component entry to check whether there is a match and therefore an IORT node describing the in/out ID translation for the device has been found. Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon Cc: Hanjun Guo Cc: Sudeep Holla Cc: Robin Murphy Cc: "Rafael J. Wysocki" Link: https://lore.kernel.org/r/20200619082013.13661-2-lorenzo.pieralisi@arm.com Signed-off-by: Catalin Marinas commit 300dca6853392829522be2ffb5d9a837b7c82296 Merge: c199a009fe0e8 41ce82f63c062 Author: Marc Zyngier Date: Tue Jul 28 15:48:27 2020 +0100 Merge branch 'kvm-arm64/pre-nv-5.9' into kvmarm-master/next-WIP Signed-off-by: Marc Zyngier commit c199a009fe0e84acf2d5b90bb265e72b672b0f9b Merge: 9ebcfadb06103 6de7dd31ded07 Author: Marc Zyngier Date: Tue Jul 28 15:48:13 2020 +0100 Merge branch 'kvm-arm64/el2-obj-v4.1' into kvmarm-master/next-WIP Signed-off-by: Marc Zyngier commit b297fed699ad9e50315b27e78de42ac631c9990d Author: Chuck Lever Date: Tue Jun 30 17:16:35 2020 -0400 svcrdma: CM event handler clean up Now that there's a core tracepoint that reports these events, there's no need to maintain dprintk() call sites in each arm of the switch statements. We also refresh the documenting comments. Signed-off-by: Chuck Lever commit 365e9992b90fbbfda89f72866783fd52bbd58e64 Author: Chuck Lever Date: Tue Jun 30 13:25:41 2020 -0400 svcrdma: Remove transport reference counting Jason tells me that a ULP cannot rely on getting an ESTABLISHED and DISCONNECTED event pair for each connection, so transport reference counting in the CM event handler will never be reliable. Now that we have ib_drain_qp(), svcrdma should no longer need to hold transport references while Sends and Receives are posted. So remove the get/put call sites in the CM event handlers. This eliminates a significant source of locked memory bus traffic. Signed-off-by: Chuck Lever commit 64d26422516b2e347b32e6d9b1d40b3c19a62aae Author: Chuck Lever Date: Tue Jun 30 15:55:45 2020 -0400 svcrdma: Fix another Receive buffer leak During a connection tear down, the Receive queue is flushed before the device resources are freed. Typically, all the Receives flush with IB_WR_FLUSH_ERR. However, any pending successful Receives flush with IB_WR_SUCCESS, and the server automatically posts a fresh Receive to replace the completing one. This happens even after the connection has closed and the RQ is drained. Receives that are posted after the RQ is drained appear never to complete, causing a Receive resource leak. The leaked Receive buffer is left DMA-mapped. To prevent these late-posted recv_ctxt's from leaking, block new Receive posting after XPT_CLOSE is set. Signed-off-by: Chuck Lever commit f4a1692491b5cce8978cea19cb8946bc2c6f14bc Merge: 8490d6a7e0a0a 0d7869805a82b Author: Thomas Zimmermann Date: Tue Jul 28 15:35:50 2020 +0200 Merge remote-tracking branch 'drm/drm-fixes' into drm-misc-fixes Updating drm-misc-fixes to v5.8-rc7. commit c2a08203052f8975af59b59d991e210268d806ba Author: Davidlohr Bueso Date: Fri Mar 8 10:17:47 2019 -0800 perf bench: Add basic syscall benchmark The usefulness of having a standard way of testing syscall performance has come up from time to time[0]. Furthermore, some of our testing machinery (such as 'mmtests') already makes use of a simplified version of the microbenchmark. This patch mainly takes the same idea to measure syscall throughput compatible with 'perf-bench' via getppid(2), yet without any of the additional template stuff from Ingo's version (based on numa.c). The code is identical to what mmtests uses. [0] https://lore.kernel.org/lkml/20160201074156.GA27156@gmail.com/ Committer notes: Add mising stdlib.h and unistd.h to get the prototypes for exit() and getppid(). Committer testing: $ perf bench Usage: perf bench [] [] # List of all available benchmark collections: sched: Scheduler and IPC benchmarks syscall: System call benchmarks mem: Memory access benchmarks numa: NUMA scheduling and MM benchmarks futex: Futex stressing benchmarks epoll: Epoll stressing benchmarks internals: Perf-internals benchmarks all: All benchmarks $ $ perf bench syscall # List of available benchmarks for collection 'syscall': basic: Benchmark for basic getppid(2) calls all: Run all syscall benchmarks $ perf bench syscall basic # Running 'syscall/basic' benchmark: # Executed 10000000 getppid() calls Total time: 3.679 [sec] 0.367957 usecs/op 2717708 ops/sec $ perf bench syscall all # Running syscall/basic benchmark... # Executed 10000000 getppid() calls Total time: 3.644 [sec] 0.364456 usecs/op 2743815 ops/sec $ Signed-off-by: Davidlohr Bueso Acked-by: Josh Poimboeuf Acked-by: Mel Gorman Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20190308181747.l36zqz2avtivrr3c@linux-r8p5 Signed-off-by: Arnaldo Carvalho de Melo commit 274b3f7bf34415eed106e479e4815e897ce5d763 Author: Christoph Hellwig Date: Wed Jul 22 16:33:43 2020 +0200 dma-contiguous: cleanup dma_alloc_contiguous Split out a cma_alloc_aligned helper to deal with the "interesting" calling conventions for cma_alloc, which then allows to the main function to be written straight forward. This also takes advantage of the fact that NULL dev arguments have been gone from the DMA API for a while. Signed-off-by: Christoph Hellwig Reviewed-by: Nicolin Chen Reviewed-by: Barry Song commit d903b6d029d66e6478562d75ea18d89098f7b7e8 Author: Pu Wen Date: Mon Jul 20 16:22:05 2020 +0800 perf/x86/rapl: Add Hygon Fam18h RAPL support Hygon Family 18h(Dhyana) support RAPL in bit 14 of CPUID 0x80000007 EDX, and has MSRs RAPL_PWR_UNIT/CORE_ENERGY_STAT/PKG_ENERGY_STAT. So add Hygon Dhyana Family 18h support for RAPL. The output is available via the energy-pkg pseudo event: $ perf stat -a -I 1000 --per-socket -e power/energy-pkg/ [ mingo: Tidied up the initializers. ] Signed-off-by: Pu Wen Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200720082205.1307-1-puwen@hygon.cn commit 21a6ee14a8f277766618ef07154432b46528113e Author: Miaohe Lin Date: Tue Jul 28 19:17:55 2020 +0800 sched: Remove duplicated tick_nohz_full_enabled() check In sched_update_tick_dependency() there's two calls that check whether nohz_full is enabled: tick_nohz_full_cpu() does it implicitly, while there's also an explicit call to tick_nohz_full_enabled(). Remove the duplicated, open coded check. [ mingo: Amended the changelog. ] Signed-off-by: Miaohe Lin Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/1595935075-14223-1-git-send-email-linmiaohe@huawei.com commit 112a0e4171e111e963aada3fe790c71accf4d705 Author: Masami Hiramatsu Date: Tue Jul 28 16:34:00 2020 +0900 kprobes: Remove unnecessary module_mutex locking from kprobe_optimizer() Since we already lock both kprobe_mutex and text_mutex in the optimizer, text will not be changed and the module unloading will be stopped inside kprobes_module_callback(). The mutex_lock() has originally been introduced to avoid conflict with text modification, at that point we didn't hold text_mutex. But after: f1c6ece23729 ("kprobes: Fix potential deadlock in kprobe_optimizer()") We started holding the text_mutex and don't need the modules mutex anyway. So remove the module_mutex locking. [ mingo: Amended the changelog. ] Suggested-by: Ingo Molnar Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Cc: Jarkko Sakkinen Link: https://lore.kernel.org/r/20200728163400.e00b09c594763349f99ce6cb@kernel.org commit e89d4ca1df630378bde3e36c42001b755b0044fe Merge: 2ac5413e5edca 92ed301919932 Author: Ingo Molnar Date: Tue Jul 28 13:18:01 2020 +0200 Merge tag 'v5.8-rc7' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar commit 7e836785bc11aca306ce6acbb43f8a5b5d0a9880 Author: Daniel Palmer Date: Tue Jul 28 19:03:21 2020 +0900 ARM: mstar: Add reboot support MStar v7 SoCs support reset by writing a magic value to a register in the "pmsleep" area. This adds a node for using the syscon reboot driver to trigger a reset. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 9345a99710aa3a7ad600b2089672cb0f2088f1ff Author: Daniel Palmer Date: Tue Jul 28 19:03:20 2020 +0900 ARM: mstar: Add "pmsleep" node to base dtsi This patch adds a node for the pmsleep area so that other drivers can access registers contained within it. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit d7f1d81b0fe80a2fdd4485427921b04dbd0ab062 Author: Daniel Palmer Date: Tue Jul 28 19:03:19 2020 +0900 ARM: mstar: Add PMU Adds the ARM PMU to the base MStar v7 dtsi. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 6e17d1316d5cdd771f9cd40496d5d740d69ae990 Author: Daniel Palmer Date: Tue Jul 28 19:03:18 2020 +0900 ARM: mstar: Adjust IMI size for infinity3 infinity3 has 128KB of SRAM at the IMI region. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit e709252cac13d9fbba34c6e9d1624f258bf80e89 Author: Daniel Palmer Date: Tue Jul 28 19:03:17 2020 +0900 ARM: mstar: Adjust IMI size for mercury5 mercury5 family chips have 128KB of SRAM in the IMI region. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit ab6be2008673c6ee5cd7b77946d992bf53ab91db Author: Daniel Palmer Date: Tue Jul 28 19:03:16 2020 +0900 ARM: mstar: Adjust IMI size of infinity infinity has 88KB of SRAM at the IMI region. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 7f6348b6a5096c46cf5b833d8ea0ae5eeb61e336 Author: Daniel Palmer Date: Tue Jul 28 19:03:15 2020 +0900 ARM: mstar: Add IMI SRAM region All MStar v7 SoCs have an internal SRAM region that is between 64KB (infinity2m) and 128KB(infinity3, mercury5). The region is always at the same base address and is used for the second stage loader (MStar IPL or u-boot SPL) and will be used for the DDR self-refresh entry code within the kernel eventually. This patch adds a 128KB region to the SoC and the minimum 64KB SRAM region to the base dtsi. Families with more SRAM will override the size in their family level dtsi. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 9e30b098f25f525af048e685ccb79fc958cfd200 Author: Daniel Palmer Date: Tue Jul 28 19:03:14 2020 +0900 dt-bindings: arm: mstar: Move existing MStar binding descriptions Now there is an mstar directory move the existing MStar specific descriptions into that directory. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 33cabc0bc679022160c48f96e2d358e666710f58 Author: Daniel Palmer Date: Tue Jul 28 19:03:13 2020 +0900 dt-bindings: arm: mstar: Add binding details for mstar, pmsleep This adds a YAML description of the pmsleep node used by MStar/SigmaStar Armv7 SoCs. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 25252919a1050e4e013a40e4c5d2645e677157a0 Author: Wei Yongjun Date: Tue Jul 28 01:11:49 2020 +0800 xhci: dbgtty: Make some functions static The sparse tool complains as follows: drivers/usb/host/xhci-dbgtty.c:401:5: warning: symbol 'xhci_dbc_tty_register_device' was not declared. Should it be static? drivers/usb/host/xhci-dbgtty.c:452:6: warning: symbol 'xhci_dbc_tty_unregister_device' was not declared. Should it be static? After commit 6ae6470bfa33 ("xhci: dbc: Add a operations structure to access driver functions"), those functions are not used outside of xhci-dbgtty.c, so this commit marks them static. Fixes: 6ae6470bfa33 ("xhci: dbc: Add a operations structure to access driver functions") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200727171149.3011-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit b0e02550346e676e104a47d1f050dc21d46cd35d Author: Wei Yongjun Date: Tue Jul 28 01:12:07 2020 +0800 xhci: dbc: Make function xhci_dbc_ring_alloc() static The sparse tool complains as follows: drivers/usb/host/xhci-dbgcap.c:422:18: warning: symbol 'xhci_dbc_ring_alloc' was not declared. Should it be static? This function is not used outside ofxhci-dbgcap.c, so this commit marks it static. Fixes: ac286428c69f ("xhci: dbc: don't use generic xhci ring allocation functions for dbc.") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200727171207.3101-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3c4f850e8441ac8b3b6dbaa6107604c4199ef01f Author: Peilin Ye Date: Tue Jul 28 01:36:04 2020 -0400 xdp: Prevent kernel-infoleak in xsk_getsockopt() xsk_getsockopt() is copying uninitialized stack memory to userspace when 'extra_stats' is 'false'. Fix it. Doing '= {};' is sufficient since currently 'struct xdp_statistics' is defined as follows: struct xdp_statistics { __u64 rx_dropped; __u64 rx_invalid_descs; __u64 tx_invalid_descs; __u64 rx_ring_full; __u64 rx_fill_ring_empty_descs; __u64 tx_ring_empty_descs; }; When being copied to the userspace, 'stats' will not contain any uninitialized 'holes' between struct fields. Fixes: 8aa5a33578e9 ("xsk: Add new statistics") Suggested-by: Dan Carpenter Signed-off-by: Peilin Ye Signed-off-by: Daniel Borkmann Acked-by: Björn Töpel Acked-by: Song Liu Acked-by: Arnd Bergmann Link: https://lore.kernel.org/bpf/20200728053604.404631-1-yepeilin.cs@gmail.com commit f6dfbe31e8fa5cbd5bc89df9d7f0fa0af7e69981 Author: Colin Ian King Date: Mon Jul 27 18:54:11 2020 +0100 bpf: Fix swapped arguments in calls to check_buffer_access There are a couple of arguments of the boolean flag zero_size_allowed and the char pointer buf_info when calling to function check_buffer_access that are swapped by mistake. Fix these by swapping them to correct the argument ordering. Fixes: afbf21dce668 ("bpf: Support readonly/readwrite buffers in verifier") Addresses-Coverity: ("Array compared to 0") Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200727175411.155179-1-colin.king@canonical.com commit 45b39e928966fe520de9f4bab6c39a8eca4d3180 Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:14 2020 +0530 dt-bindings: PCI: Add EP mode dt-bindings for TI's J721E SoC Add PCIe EP mode dt-bindings for TI's J721E SoC. Link: https://lore.kernel.org/r/20200722110317.4744-13-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 431b53b81cdc9912041285f25c35a0924c5a4929 Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:13 2020 +0530 dt-bindings: PCI: Add host mode dt-bindings for TI's J721E SoC Add host mode dt-bindings for TI's J721E SoC. Link: https://lore.kernel.org/r/20200722110317.4744-12-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 3ef5d16f50f8c32abd73e0c3bf4af690c9911cc7 Author: Alan Douglas Date: Wed Jul 22 16:33:12 2020 +0530 PCI: cadence: Add MSI-X support to Endpoint driver Implement ->set_msix() and ->get_msix() callback functions in order to configure MSIX capability in the PCIe endpoint controller. Add cdns_pcie_ep_send_msix_irq() to send MSIX interrupts to Host. cdns_pcie_ep_send_msix_irq() gets the MSIX table address (virtual address) from "struct cdns_pcie_epf" that gets initialized in ->set_bar() call back function. [kishon@ti.com: Re-implement MSIX support in accordance with the re-designed core MSI-X interfaces] Link: https://lore.kernel.org/r/20200722110317.4744-11-kishon@ti.com Signed-off-by: Alan Douglas Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 2742b4192a279c6ec72e55d5474c4c07756c7845 Author: Randy Dunlap Date: Tue Jul 28 12:26:13 2020 +0200 Make LEDS_LP55XX_COMMON depend on I2C to fix build errors: leds-lp55xx-common.c:(.text+0x9d): undefined reference to `i2c_smbus_read_byte_data' leds-lp55xx-common.c:(.text+0x8fc): undefined reference to `i2c_smbus_write_byte_data' These errors happened when I2C=m and LEDS_LP55XX_COMMON=y, so prevent that from being possible. Signed-off-by: Randy Dunlap Cc: Jacek Anaszewski Cc: Pavel Machek Cc: Dan Murphy Cc: linux-leds@vger.kernel.org Cc: Milo Kim Cc: Mathias Nyman Signed-off-by: Pavel Machek commit 363885d7c62e293fb093c7c355bf5f05fa0a25a9 Author: Andrii Nakryiko Date: Mon Jul 27 16:33:45 2020 -0700 selftests/bpf: Add new bpf_iter context structs to fix build on old kernels Add bpf_iter__bpf_map_elem and bpf_iter__bpf_sk_storage_map to bpf_iter.h. Fixes: 3b1c420bd882 ("selftests/bpf: Add a test for bpf sk_storage_map iterator") Fixes: 2a7c2fff7dd6 ("selftests/bpf: Add test for bpf hash map iterators") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200727233345.1686358-1-andriin@fb.com commit a459d9e107887a1fef32d5c6d0951241876812d9 Author: Wei Yongjun Date: Mon Jul 6 21:52:34 2020 +0800 PCI: hv: Make some functions static sparse report build warning as follows: drivers/pci/controller/pci-hyperv.c:941:5: warning: symbol 'hv_read_config_block' was not declared. Should it be static? drivers/pci/controller/pci-hyperv.c:1021:5: warning: symbol 'hv_write_config_block' was not declared. Should it be static? drivers/pci/controller/pci-hyperv.c:1090:5: warning: symbol 'hv_register_block_invalidate' was not declared. Should it be static? Those functions are not used outside of this file, so mark them static. Link: https://lore.kernel.org/r/20200706135234.80758-1-weiyongjun1@huawei.com Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Lorenzo Pieralisi commit e1613b5714ee6c186c9628e9958edf65e9d9cddd Author: Andrii Nakryiko Date: Mon Jul 27 15:47:15 2020 -0700 bpf: Fix bpf_ringbuf_output() signature to return long Due to bpf tree fix merge, bpf_ringbuf_output() signature ended up with int as a return type, while all other helpers got converted to returning long. So fix it in bpf-next now. Fixes: b0659d8a950d ("bpf: Fix definition of bpf_ringbuf_output() helper in UAPI comments") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20200727224715.652037-1-andriin@fb.com commit a6fbb4a4a7f0afeec287a7b1e6bdb9e48c75c4d0 Author: Thierry Reding Date: Tue Jun 23 16:55:28 2020 +0200 PCI: tegra: Remove PLL power supplies The Tegra PCI controller driver doesn't need to control the PLL power supplies directly, but rather uses the pads provided by the XUSB pad controller, which in turn is responsible for supplying power to the PLLs. Link: https://lore.kernel.org/r/20200623145528.1658337-2-thierry.reding@gmail.com Signed-off-by: Thierry Reding Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 980d1f2f3db618b58f9d1dab82534286e9e3cff1 Author: Thierry Reding Date: Tue Jun 23 16:55:27 2020 +0200 dt-bindings: pci: tegra: Remove PLL power supplies The XUSB pad controller, which provides access to various USB, PCI and SATA pads (or PHYs), needs to bring up the PLLs associated with these pads. In order to properly do so, it needs to control the power supplied to these PLLs. Remove the PLL power supplies from the PCIe controller because it does not need direct access to them. Instead it will only use the configured pads provided by the XUSB pad controller. Link: https://lore.kernel.org/r/20200623145528.1658337-1-thierry.reding@gmail.com Signed-off-by: Thierry Reding Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 918c950ca8b1a3aa93727c1adb4fa9caa231ea3b Author: Pete Zaitcev Date: Tue Jul 21 20:30:09 2020 +0100 ARM: 8996/1: Documentation/Clean up the description of mach- Polish the description of machine classes a little bit, remove the duplicate directory name, so the reader does not feel compelled to dig through the output of "git blame". Signed-off-by: Pete Zaitcev Signed-off-by: Russell King commit 67b0141bd12d3a609d47ebbb53a4df67e3fdf4c4 Author: Ard Biesheuvel Date: Tue Jul 21 09:21:08 2020 +0100 ARM: 8995/1: drop Thumb-2 workaround for ancient binutils The CONFIG_THUMB2_AVOID_R_ARM_THM_JUMP11 workaround addresses an issue which was fixed before the oldest supported binutils (2.23 at this time) were released. So we can remove it now. Acked-by: Dave Martin Reviewed-by: Linus Walleij Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit 4d44a399b5c3814292be8eb3c936be5d95a9a5d6 Author: Ard Biesheuvel Date: Tue Jul 21 09:19:15 2020 +0100 ARM: 8994/1: mm: drop kimage_voffset which was only used by KVM Now that KVM support has been removed from the 32-bit ARM port, drop the export kimage_voffset symbol, which no longer has any users. Acked-by: Marc Zyngier Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit a59a2edbbba7397fede86e40a3da17e5beebf98b Author: David Brazdil Date: Tue Jul 21 10:44:45 2020 +0100 KVM: arm64: Substitute RANDOMIZE_BASE for HARDEN_EL2_VECTORS The HARDEN_EL2_VECTORS config maps vectors at a fixed location on cores which are susceptible to Spector variant 3a (A57, A72) to prevent defeating hyp layout randomization by leaking the value of VBAR_EL2. Since this feature is only applicable when EL2 layout randomization is enabled, unify both behind the same RANDOMIZE_BASE Kconfig. Majority of code remains conditional on a capability selected for the affected cores. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200721094445.82184-3-dbrazdil@google.com commit 24f69c0fa4e252f706884114b7d6353aa07678b5 Author: David Brazdil Date: Tue Jul 21 10:44:44 2020 +0100 KVM: arm64: Make nVHE ASLR conditional on RANDOMIZE_BASE If there are spare bits in non-VHE hyp VA, KVM unconditionally replaces them with a random tag chosen at init. Disable this if the kernel is built without RANDOMIZE_BASE to align with kernel behavior. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200721094445.82184-2-dbrazdil@google.com commit 22f9d2f4ee810e6442185ba7ecab37e24de1b413 Author: Julia Lawall Date: Sun Jul 26 12:58:29 2020 +0200 net/mlx5: drop unnecessary list_empty list_for_each_entry is able to handle an empty list. The only effect of avoiding the loop is not initializing the index variable. Drop list_empty tests in cases where these variables are not used. Note that list_for_each_entry is defined in terms of list_first_entry, which indicates that it should not be used on an empty list. But in list_for_each_entry, the element obtained by list_first_entry is not really accessed, only the address of its list_head field is compared to the address of the list head, so the list_first_entry is safe. The semantic patch that makes this change is as follows (with another variant for the no brace case): (http://coccinelle.lip6.fr/) @@ expression x,e; iterator name list_for_each_entry; statement S; identifier i; @@ -if (!(list_empty(x))) { list_for_each_entry(i,x,...) S - } ... when != i ? i = e Signed-off-by: Julia Lawall Signed-off-by: Saeed Mahameed commit c8b838d108bca05d759f0131db960ddf305cc255 Author: Gustavo A. R. Silva Date: Mon Jul 27 13:03:56 2020 -0500 net/mlx5: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Saeed Mahameed commit ffdc8ec0b79f499c21284f4229de02d70204bf6a Author: Alex Vesker Date: Mon Jul 6 16:32:11 2020 +0300 net/mlx5: DR, Reduce print level for matcher print There is no need to print on each unsuccessful matcher ip_version combination since it probably will happen when trying to create all the possible combinations. On a real failure we have a print in the calling function. Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 17347d5430c4e4e1a3c58ffa2732746bd26a9c02 Author: Aya Levin Date: Thu Mar 26 14:03:19 2020 +0200 net/mlx5e: Add support for PCI relaxed ordering The concept of Relaxed Ordering in the PCI Express environment allows switches in the path between the Requester and Completer to reorder some transactions just received before others that were previously enqueued. In ETH driver, there is no question of write integrity since each memory segment is written only once per cycle. In addition, the driver doesn't access the memory shared with the hardware until the corresponding CQE arrives indicating all PCI transactions are done. Running TCP single stream over ConnectX-4 LX, ARM CPU on remote-numa has 300% improvement in the bandwidth. With relaxed ordering turned off: BW:10 [GB/s] With relaxed ordering turned on: BW:40 [GB/s] The driver turns relaxed ordering with respect to the firmware capabilities and the return value from pcie_relaxed_ordering_enabled(). Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit 5d0b84769477fd647a491e882d5aea402c5fafa8 Author: Tariq Toukan Date: Sun Jul 12 18:22:39 2020 +0300 net/mlx5e: Use indirect call wrappers for RX post WQEs functions Use the indirect call wrapper API macros for declaration and scope of the RX post WQEs functions. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit b307f7f163e351833cf6aa41585be8f5a1617901 Author: Tariq Toukan Date: Thu Apr 30 17:02:56 2020 +0300 net/mlx5e: Move exposure of datapath function to txrx header Move them from the generic header file "en.h", to the datapath header file "txrx.h". Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 5adf4c475aaa037d8f787d08c7699954cf78b19b Author: Tariq Toukan Date: Thu Apr 30 15:54:17 2020 +0300 net/mlx5e: RX, Re-work initializaiton of RX function pointers Instead of exposing the RQ datapath handlers (from en_rx.c) so that they are set in the control path (in en_main.c), wrap this logic in a single function in en_rx.c and expose it alone. Every profile will now have a pointer to the new mlx5e_rx_handlers structure, instead of directly pointing to the previously-exposed RQ handlers. This significantly improves locality and modularity of the driver, and allows many functions in en_rx.c to become static. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 123f0f53dd64b67e34142485fe866a8a581f12f1 Author: Parav Pandit Date: Fri Jun 12 12:16:51 2020 +0300 net/mlx5e: Link non uplink representors to PCI device Currently PF and VF representors are exposed as virtual device. They are not linked to its parent PCI device like how uplink representor is linked. Due to this, PF and VF representors cannot benefit of the systemd defined naming scheme. This requires special handling by the users. Hence, link the PF and VF representors to their parent PCI device similar to existing uplink representor netdevice. Example: udevadm output before linking to PCI device: $ udevadm test-builtin net_id /sys/class/net/eth6 Load module index Network interface NamePolicy= disabled on kernel command line, ignoring. Parsed configuration file /usr/lib/systemd/network/99-default.link Created link configuration context. Using default interface naming scheme 'v243'. ID_NET_NAMING_SCHEME=v243 Unload module index Unloaded link configuration context. udevadm output after linking to PCI device: $ udevadm test-builtin net_id /sys/class/net/eth6 Load module index Network interface NamePolicy= disabled on kernel command line, ignoring. Parsed configuration file /usr/lib/systemd/network/99-default.link Created link configuration context. Using default interface naming scheme 'v243'. ID_NET_NAMING_SCHEME=v243 ID_NET_NAME_PATH=enp0s8f0npf0vf0 Unload module index Unloaded link configuration context. In past there was little concern over seeing 10,000 lines output showing up at thread [1] is not applicable as ndo ops for VF handling is not exposed for all the 100 repesentors for mlx5 devices. Additionally alternative device naming [2] to overcome shorter device naming is also part of the latest systemd release v245. [1] https://marc.info/?l=linux-netdev&m=152657949117904&w=2 [2] https://lwn.net/Articles/814068/ Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Acked-by: Jiri Pirko Signed-off-by: Saeed Mahameed commit 8d6bd3c339a723ff2b21c432b2054f7dd96205ae Author: Parav Pandit Date: Mon Jul 20 14:27:54 2020 +0300 net/mlx5: E-switch, Use eswitch total_vports Currently steering table and rx group initialization helper routines works on the total_vports passed as input parameter. Both eswitch helpers work on the mlx5_eswitch and thereby have access to esw->total_vports. Hence use it directly instead of passing it via function input arguments. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed commit 0da3c12dd6fc08e40802fc102b00a37b5b415eeb Author: Parav Pandit Date: Mon Jul 20 14:10:16 2020 +0300 net/mlx5: E-switch, Reuse total_vports and avoid duplicate nvports Total e-switch vports are already stored in mlx5_eswitch total_vports. Avoid copy of it in nvports and reuse existing total_vports calculation. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed commit 8b95bda47c73625a06561657c7b21e5874833567 Author: Parav Pandit Date: Mon Jul 20 14:02:15 2020 +0300 net/mlx5: E-switch, Consider maximum vf vports for steering init When eswitch is enabled, VFs might not be enabled. Hence, consider maximum number of VFs. This further closes the gap between handling VF vports between ECPF and PF. Fixes: ea2128fd632c ("net/mlx5: E-switch, Reduce dependency on num_vfs during mode set") Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Reviewed-by: Bodong Wang Signed-off-by: Saeed Mahameed commit c1a0969ee829154cfc3e3721d8a94607636ce4a6 Author: Avihu Hagag Date: Mon Jun 8 13:53:09 2020 +0300 net/mlx5: Add function ID to reclaim pages debug log Add function ID to reclaim pages debug log for better user visibility. Signed-off-by: Avihu Hagag Reviewed-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed commit d6945242f45d4745a8169fdab7afeb40f4e36f06 Author: Eran Ben Elisha Date: Mon May 18 11:13:52 2020 +0300 net/mlx5: Hold pages RB tree per VF Per page request event, FW request to allocated or release pages for a single function. Driver maintains FW pages object per function, so there is no need to hold one global page data-base. Instead, have a page data-base per function, which will improve performance release flow in all cases, especially for "release all pages". As the range of function IDs is large and not sequential, use xarray to store a per function ID page data-base, where the function ID is the key. Upon first allocation of a page to a function ID, create the page data-base per function. This data-base will be released only at pagealloc mechanism cleanup. NIC: ConnectX-4 Lx CPU: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz Test case: 32 VFs, measure release pages on one VF as part of FLR Before: 0.021 Sec After: 0.014 Sec The improvement depends on amount of VFs and memory utilization by them. Time measurements above were taken from idle system. Signed-off-by: Eran Ben Elisha Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 61781298521eb59be6dd82f84c50e64afc77cd24 Author: Barnabás Pőcze Date: Mon Jul 27 19:31:25 2020 +0000 platform/x86: thinkpad_acpi: add documentation for battery charge control Add a section to the Thinkpad ACPI extras driver documentation detailing the provided features that may be used to modify battery charge related state. As of yet, only charge_control_{start,end}_threshold attributes are supported and documented. Signed-off-by: Barnabás Pőcze Signed-off-by: Andy Shevchenko commit 693a06543379709a7c20a9a6d04f005cf00572f9 Author: Alexander A. Klimov Date: Mon Jul 13 20:15:25 2020 +0200 parisc: Replace HTTP links with HTTPS ones Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Signed-off-by: Alexander A. Klimov Signed-off-by: Helge Deller commit 961b658fea67b56af14b531ed6e9743d2fb38152 Author: Randy Dunlap Date: Tue Jul 21 14:00:22 2020 -0700 parisc: elf.h: delete a duplicated word Drop the repeated word "the". Signed-off-by: Randy Dunlap Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Signed-off-by: Helge Deller commit 0e5a7ff6e36ad58933d076ddcac36ff14d014692 Author: Helge Deller Date: Fri Jul 24 19:17:52 2020 +0200 parisc: Report bad pages as HardwareCorrupted The /proc/meminfo file reports physically broken memory pages in the HardwareCorrupted field. When the parisc kernel boots report physically bad pages which were recorded in the page deallocation table (PDT) as HardwareCorrupted too. Signed-off-by: Helge Deller commit 98895d5e9e195b3f660afd9f04e24d2b307cb660 Author: Daniel Palmer Date: Sat Jul 25 15:36:39 2020 +0900 ARM: mstar: Fix dts filename for 70mai midrive d08 Fixes the filename for the 70mai midrive d08 dts. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 8484515b96a54ddb3bcaf1f074d52f3af07933d6 Author: Daniel Palmer Date: Fri Jul 10 18:45:44 2020 +0900 ARM: mstar: Add dts for 70mai midrive d08 Adds initial support for the 70mai midrive d08 dash camera. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit caa3c193c9dca7b7c672f75c8cb67ee9a7802ffc Author: Daniel Palmer Date: Fri Jul 10 18:45:43 2020 +0900 ARM: mstar: Add dts for msc313(e) based BreadBee boards BreadBee is an opensource development board based on the MStar msc313(e) SoC. Hardware details, schematics and so on can be found at: https://github.com/breadbee/breadbee Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 3e54698c1ae1eaa60d213dc11bede651d9bacb8a Author: Daniel Palmer Date: Fri Jul 10 18:45:42 2020 +0900 ARM: mstar: Add mercury5 series dtsis This adds a family level dtsi for the mercury5 and then a chip level dtsi for the ssc8336n chip. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 952c0ed6f96339ae5d0f22154d05f8eac2742c94 Author: Daniel Palmer Date: Fri Jul 10 18:45:41 2020 +0900 ARM: mstar: Add infinity/infinity3 family dtsis This adds two family level dtsis for the infinity and infinity3 and then adds a chip level dtsi each for a chip in those families. infinity3.dtsi includes infinity.dtsi as these SoCs share most of their memory map and we would have a lot of duplication otherwise. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit b0d0bb1b6f8700deaf23e8ea42eaca9c54488fc9 Author: Daniel Palmer Date: Fri Jul 10 18:45:40 2020 +0900 ARM: mstar: Add Armv7 base dtsi Adds initial dtsi for the base MStar/Sigmastar Armv7 SoCs. These SoCs have very similar memory maps and this will avoid duplicating nodes across multiple dtsis. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 09220c579c7873a89a07f4f55da9662b1b95355f Author: Daniel Palmer Date: Fri Jul 10 18:45:39 2020 +0900 ARM: mstar: Add binding details for mstar,l3bridge This adds a YAML description of the l3bridge node needed by the platform code for the MStar/SigmaStar Armv7 SoCs. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann Reviewed-by: Rob Herring Signed-off-by: Arnd Bergmann commit 312b62b6610cabea4cb535fd4889c41e9a84afca Author: Daniel Palmer Date: Fri Jul 10 18:45:38 2020 +0900 ARM: mstar: Add machine for MStar/Sigmastar Armv7 SoCs Initial support for the MStar/Sigmastar Armv7 based IP camera and dashcam SoCs. These chips are interesting in that they contain a Cortex-A7, peripherals and system memory in a single tiny QFN package that can be hand soldered allowing almost anyone to embed Linux in their projects. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann commit 343e8f7286e87f60ef7cc8c8b140e254f550886f Author: Daniel Palmer Date: Fri Jul 10 18:45:37 2020 +0900 dt-bindings: arm: Add mstar YAML schema Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann Reviewed-by: Rob Herring Signed-off-by: Arnd Bergmann commit d1b6e3bd85f02e7ead020de9cd87fcd0326ae9ad Author: Daniel Palmer Date: Fri Jul 10 18:45:36 2020 +0900 dt-bindings: vendor-prefixes: Add thingy.jp prefix Add prefix for thingy.jp Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann Acked-by: Rob Herring Signed-off-by: Arnd Bergmann commit cdef4702e2799a58e32021c345c3a43ca72f9c27 Author: Daniel Palmer Date: Fri Jul 10 18:45:35 2020 +0900 dt-bindings: vendor-prefixes: Add 70mai vendor prefix Add prefix for 70mai Co., Ltd Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann Acked-by: Rob Herring Signed-off-by: Arnd Bergmann commit 108fc78f16fb070d4e809229e180bcf4effc797e Author: Daniel Palmer Date: Fri Jul 10 18:45:34 2020 +0900 dt-bindings: vendor-prefixes: Add sstar vendor prefix Add prefix for Xiamen Xingchen Technology Co., Ltd Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann Acked-by: Rob Herring Signed-off-by: Arnd Bergmann commit f7d85e73f92026e436b0068066cf862c08521818 Author: Daniel Palmer Date: Fri Jul 10 18:45:33 2020 +0900 dt-bindings: vendor-prefixes: Add mstar vendor prefix Add prefix for MStar Semiconductor, Inc. Signed-off-by: Daniel Palmer Signed-off-by: Arnd Bergmann Acked-by: Rob Herring Signed-off-by: Arnd Bergmann commit 623910f4b9f5a4db49c8cc4b824c1f32236a6f33 Author: Lars Povlsen Date: Mon Jun 15 15:32:42 2020 +0200 arm64: dts: sparx5: Add i2c devices, i2c muxes This patch adds i2c devices and muxes to the Sparx5 reference boards. Link: https://lore.kernel.org/r/20200615133242.24911-11-lars.povlsen@microchip.com Reviewed-by: Alexandre Belloni Signed-off-by: Lars Povlsen Signed-off-by: Arnd Bergmann commit e4e06a50b04296d17a4cf098a515fb452106ecf0 Author: Lars Povlsen Date: Mon Jun 15 15:32:41 2020 +0200 arm64: dts: sparx5: Add Sparx5 SoC DPLL clock This adds a DPLL clock to the Sparx5 SoC. It is used to generate clock to misc peripherals, specifically the SDHCI/eMMC controller. Link: https://lore.kernel.org/r/20200615133242.24911-10-lars.povlsen@microchip.com Signed-off-by: Lars Povlsen Signed-off-by: Arnd Bergmann commit 8aed8cebdd973e95d20743e00e35467c7b467d0d Author: Jan Kara Date: Tue Jul 28 10:58:07 2020 +0200 fanotify: compare fsid when merging name event When merging name events, fsids of the two involved events have to match. Otherwise we could merge events from two different filesystems and thus effectively loose the second event. Backporting note: Although the commit cacfb956d46e introducing this bug was merged for 5.7, the relevant code didn't get used in the end until 7e8283af6ede ("fanotify: report parent fid + name + child fid") which will be merged with this patch. So there's no need for backporting this. Fixes: cacfb956d46e ("fanotify: record name info for FAN_DIR_MODIFY event") Reported-by: Amir Goldstein Signed-off-by: Jan Kara commit e885d5d94793ef342e49d55672baabbc16e32bb1 Author: Herbert Xu Date: Thu Jul 16 16:36:50 2020 +1000 lockdep: Move list.h inclusion into lockdep.h Currently lockdep_types.h includes list.h without actually using any of its macros or functions. All it needs are the type definitions which were moved into types.h long ago. This potentially causes inclusion loops because both are included by many core header files. This patch moves the list.h inclusion into lockdep.h. Note that we could probably remove it completely but that could potentially result in compile failures should any end users not include list.h directly and also be unlucky enough to not get list.h via some other header file. Reported-by: Petr Mladek Signed-off-by: Herbert Xu Signed-off-by: Peter Zijlstra (Intel) Tested-by: Petr Mladek Link: https://lkml.kernel.org/r/20200716063649.GA23065@gondor.apana.org.au commit e93a977367b2aefff3c1fb426bbdfc6e2980815f Author: Luis Alberto Herrera Date: Wed Jun 10 22:46:49 2020 +0000 mtd: revert "spi-nor: intel: provide a range for poll_timout" This change reverts aba3a882a178: "mtd: spi-nor: intel: provide a range for poll_timout". That change introduces a performance regression when reading sequentially from flash. Logging calls to intel_spi_read without this change we get: Start MTD read [ 20.045527] intel_spi_read(from=1800000, len=400000) [ 20.045527] intel_spi_read(from=1800000, len=400000) [ 282.199274] intel_spi_read(from=1c00000, len=400000) [ 282.199274] intel_spi_read(from=1c00000, len=400000) [ 544.351528] intel_spi_read(from=2000000, len=400000) [ 544.351528] intel_spi_read(from=2000000, len=400000) End MTD read With this change: Start MTD read [ 21.942922] intel_spi_read(from=1c00000, len=400000) [ 21.942922] intel_spi_read(from=1c00000, len=400000) [ 23.784058] intel_spi_read(from=2000000, len=400000) [ 23.784058] intel_spi_read(from=2000000, len=400000) [ 25.625006] intel_spi_read(from=2400000, len=400000) [ 25.625006] intel_spi_read(from=2400000, len=400000) End MTD read Signed-off-by: Luis Alberto Herrera Tested-by: Alexander Sverdlin Acked-by: Mika Westerberg Link: https://lore.kernel.org/r/20200610224652.64336-1-luisalberto@google.com Signed-off-by: Tudor Ambarus commit 0889a67a9e7a56ba39af223d536630b20b877fda Author: Paul Cercueil Date: Mon Jul 27 20:11:28 2020 +0200 MIPS: qi_lb60: Fix routing to audio amplifier The ROUT (right channel output of audio codec) was connected to INL (left channel of audio amplifier) instead of INR (right channel of audio amplifier). Fixes: 8ddebad15e9b ("MIPS: qi_lb60: Migrate to devicetree") Cc: stable@vger.kernel.org # v5.3 Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit a4aec0f3f506ae5435e03aa9ed4fca31019985d0 Author: Paul Cercueil Date: Sun Jul 26 18:58:28 2020 +0200 MIPS: Remove legacy MIPS_MACHINE option The CONFIG_MIPS_MACHINE option is dead code that hasn't been used in years. The Kconfig option is not selected anywhere, and the is not included anywhere either. To make things worse, for years it co-existed with a separate MIPS machine implementation as . The two defined the 'mips_machine' structure with different fields, and the 'MIPS_MACHINE' macro with different parameters. The two used the same memory area (defined by the linker script) to store data, and you could totally use the two at the same time for all kinds of funny results. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 64aa9fd01459bbdc51a7400552ba4741df37089d Author: Paul Cercueil Date: Sun Jul 26 18:58:27 2020 +0200 MIPS: ath79: Remove unused include Since commit 3a77e0d75eed ("MIPS: ath79: drop machfiles"), this header is not used anymore. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 75afbf4917c265eaf6766bbc17efae61ba418796 Author: Thomas Bogendoerfer Date: Sun Jul 26 13:30:54 2020 +0200 MIPS: cpu-feature-overrides: Remove not needed overrides Clean up cpu-feature-overrides, which only repeat the default. Signed-off-by: Thomas Bogendoerfer commit 11536442a3b4e1de6890ea5e805908debb74f94a Author: Dinghao Liu Date: Tue Jul 28 15:21:51 2020 +0800 Staging: rtl8188eu: rtw_mlme: Fix uninitialized variable authmode The variable authmode can be uninitialized. The danger would be if it equals to _WPA_IE_ID_ (0xdd) or _WPA2_IE_ID_ (0x33). We can avoid this by setting it to zero instead. This is the approach that was used in the rtl8723bs driver. Fixes: 7b464c9fa5cc ("staging: r8188eu: Add files for new driver - part 4") Co-developed-by: Dan Carpenter Signed-off-by: Dan Carpenter Signed-off-by: Dinghao Liu Cc: stable Link: https://lore.kernel.org/r/20200728072153.9202-1-dinghao.liu@zju.edu.cn Signed-off-by: Greg Kroah-Hartman commit 53754e432c0cdcb56a082fb1c06ed1ac403f3cdf Author: Samuel Thibault Date: Sun Jul 26 18:54:52 2020 +0200 staging/speakup: Update TODO list Thanks to Okash's latest work, the TODO list is essentially empty, so the way out from staging now seems open. The status of the remaining issue mentioned in TODO is not clear, we asked the speakup user mailing list for reproducer cases, but didn't get a really specific scenario. One serious bug was fixed by 9d32c0cde4e2 ("staging/speakup: fix get_word non-space look-ahead"), which does not seem to really be related to the bug mentioned in TODO. Possibly the bug mentioned in TODO has been fixed long ago and people have been thinking that it was not because they can not distinguish the symptoms mentioned in TODO from the symptoms of the bug fixed by 9d32c0cde4e2. Signed-off-by: Samuel Thibault Link: https://lore.kernel.org/r/20200726165452.qhos3wrjcm6jmcmx@function Signed-off-by: Greg Kroah-Hartman commit 9038c6ac407ab751c0f9f5ab61d6e8772e0b8b24 Author: Gustavo A. R. Silva Date: Mon Jul 27 13:37:34 2020 -0500 staging: vc04_services: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727183734.GA28824@embeddedor Signed-off-by: Greg Kroah-Hartman commit 02a25c9bbba5cbbc6da325e6c1fdfb2541a37bae Author: Gustavo A. R. Silva Date: Mon Jul 27 13:40:42 2020 -0500 staging: qlge: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727184042.GA29074@embeddedor Signed-off-by: Greg Kroah-Hartman commit 848e28b4dc505ccd6058186f827c0b07b95d459e Author: Gustavo A. R. Silva Date: Mon Jul 27 13:42:47 2020 -0500 staging: comedi: s526: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727184247.GA29207@embeddedor Signed-off-by: Greg Kroah-Hartman commit 8dda212c69c9a42d062b36fdf6dd09cf6d3cd392 Author: Gustavo A. R. Silva Date: Mon Jul 27 13:58:38 2020 -0500 staging: rtl8712: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727185838.GA29595@embeddedor Signed-off-by: Greg Kroah-Hartman commit 29ca39b5b8c62e23833a72794247097333f5b7f9 Author: Gustavo A. R. Silva Date: Mon Jul 27 14:04:17 2020 -0500 staging: ks7010: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727190417.GA29944@embeddedor Signed-off-by: Greg Kroah-Hartman commit 52a1d9d4bec4d7690d71277c2fb5dcf9a909d8d1 Author: Gustavo A. R. Silva Date: Mon Jul 27 14:06:57 2020 -0500 staging: rtl8723bs: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727190657.GA30194@embeddedor Signed-off-by: Greg Kroah-Hartman commit 43feb001cbaf38b35fc6036a2cdebe721a27e080 Author: Gustavo A. R. Silva Date: Mon Jul 27 14:08:29 2020 -0500 staging: gdm724x: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727190829.GA30332@embeddedor Signed-off-by: Greg Kroah-Hartman commit 49e86ae1324e55200e87605b8922542e12f96492 Author: Gustavo A. R. Silva Date: Mon Jul 27 14:10:06 2020 -0500 staging: rtl8192e: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727191006.GA30474@embeddedor Signed-off-by: Greg Kroah-Hartman commit b031d10abfeeffc5d015a3d135babce16930bf62 Author: Sumera Priyadarsini Date: Sun Jul 26 18:37:20 2020 +0530 staging: wfx: Remove unnecessary return variable Remove redundant variable in file fwio.c used for returning value. Issue was found using Coccinelle: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Sumera Priyadarsini Link: https://lore.kernel.org/r/20200726130720.12993-1-sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 01713f0d58322f0029f5ac99ce60dd44414b4902 Author: Ivan Safonov Date: Mon Jul 27 00:02:46 2020 +0300 staging: r8188eu: use proper type for second argiment of rtw_(aes|tkip|wep)_(decrypt|encrypt) rtw_aes_decrypt, rtw_tkip_decrypt, rtw_wep_decrypt, rtw_aes_encrypt, rtw_tkip_encrypt, rtw_wep_encrypt are takes (u8 *) second argiment and always uses it as (struct recv_frame *) or (struct xmit_frame *). This is causes a lot of unnecessary type casts and complicates refactoring. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20200726210246.68633-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8750d02d1acebcb472673399b7315b0f74f5b3cf Author: Linus Walleij Date: Wed Jul 22 09:44:14 2020 +0200 staging: greybus: gpio: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Cc: Nishad Kamdar Cc: Johan Hovold Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200722074414.48457-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 50b2677c4e276771a6383382929180b1589b835f Author: Dan Carpenter Date: Wed Jul 22 16:06:51 2020 +0300 staging: vchiq: Fix refcounting bug in buffer_from_host() If we fail to queue the buffer then it can never be dequeued. This can lead to a forever loop in stop_streaming() when we wait for everything to finish. Fixes: 70ec64ccdaac ("staging: bcm2835-camera: Ensure all buffers are returned on disable") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200722130651.GC220681@mwanda Signed-off-by: Greg Kroah-Hartman commit 8824c1af3af28c7b5c16307c1b8c6d842794e4ed Author: Masahiro Yamada Date: Wed Jul 22 09:47:07 2020 +0900 xtensa: add boot subdirectories build artifacts to 'targets' Xtensa always rebuilds the following even if nothing in the source code has been changed. Passing V=2 shows the reason. AS arch/xtensa/boot/boot-elf/bootstrap.o - due to bootstrap.o not in $(targets) LDS arch/xtensa/boot/boot-elf/boot.lds - due to boot.lds not in $(targets) They are built by if_changed(_dep). Add them to 'targets' so .*.cmd files are included. Signed-off-by: Masahiro Yamada Message-Id: <20200722004707.779601-1-masahiroy@kernel.org> Signed-off-by: Max Filippov commit 7424d9fa8477f259893599d38cccc379bdd0ffac Author: Max Filippov Date: Tue Jul 21 22:26:27 2020 -0700 xtensa: add uImage and xipImage to targets uImage and xipImage are always rebuilt in the xtensa kernel build process. Add them to 'targets' to avoid that. Reviewed-by: Masahiro Yamada Signed-off-by: Max Filippov commit 65898b375659f2556da9ac22ea5649407f6f6447 Author: Max Filippov Date: Tue Jul 21 22:20:19 2020 -0700 xtensa: move vmlinux.bin[.gz] to boot subdirectory vmlinux.bin and vmlinux.bin.gz are always rebuilt in the kernel build process. Add them to 'targets' and move them to the boot subdirectory where their rules are. Update make rules that refer to them. Reviewed-by: Masahiro Yamada Signed-off-by: Max Filippov commit 10b60595ddd53728e6975e50524841bb8c0339a8 Author: Randy Dunlap Date: Tue Jul 21 14:00:44 2020 -0700 xtensa: initialize_mmu.h: fix a duplicated word Change "The the" to "For the". Signed-off-by: Randy Dunlap Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Message-Id: <20200721210044.15458-1-rdunlap@infradead.org> Signed-off-by: Max Filippov commit 768877beed015bcb215dae11f8ed5644bb7f12ec Author: Max Filippov Date: Fri Nov 29 00:43:58 2019 -0800 selftests/seccomp: add xtensa support Xtensa syscall number can be obtained and changed through the struct user_pt_regs. Syscall return value register is fixed relatively to the current register window in the user_pt_regs, so it needs a bit of special treatment. Signed-off-by: Max Filippov commit da94a40f72859ce24dc72de9292981513a33e427 Author: Max Filippov Date: Wed Nov 13 20:47:17 2019 -0800 xtensa: add seccomp support Add SECCOMP to xtensa Kconfig, select HAVE_ARCH_SECCOMP_FILTER, add TIF_SECCOMP and call secure_computing from do_syscall_trace_enter. Signed-off-by: Max Filippov commit 8b7a87a03f7c15c7a1e1647c3527292604e80f6f Author: Max Filippov Date: Sat Jul 18 17:47:43 2020 -0700 xtensa: expose syscall through user_pt_regs Use one of the reserved slots in struct user_pt_regs to return syscall number in the GPR regset. Update syscall number from the GPR regset only when it's non-zero. Signed-off-by: Max Filippov commit ef1a935c08ea97436f62edb0b1427d60e31b777b Author: Max Filippov Date: Mon May 1 06:17:47 2017 -0700 xtensa: add audit support All bits needed for syscall audit are present on xtensa. Add audit_syscall_entry and audit_syscall_exit calls and select HAVE_ARCH_AUDITSYSCALL in Kconfig. Signed-off-by: Max Filippov commit 9141b3ca7fedcdc18d9147287913bf80c9c432ba Author: Krzysztof Kozlowski Date: Fri Jun 26 10:06:41 2020 +0200 ARM: dts: berlin: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache-controller@ac0000: $nodename:0: 'l2-cache-controller@ac0000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200626080642.4244-1-krzk@kernel.org' Signed-off-by: Arnd Bergmann commit 202798db9570104728dce8bb57dfeed47ce764bc Author: Nicolas Boichat Date: Tue Jul 21 10:37:16 2020 +0800 Bluetooth: hci_serdev: Only unregister device if it was registered We should not call hci_unregister_dev if the device was not successfully registered. Fixes: c34dc3bfa7642fd ("Bluetooth: hci_serdev: Introduce hci_uart_unregister_device()") Signed-off-by: Nicolas Boichat Signed-off-by: Marcel Holtmann commit 24b065727ceba53cc5bec0e725672417154df24f Author: Max Chou Date: Thu Jul 23 18:47:42 2020 +0800 Bluetooth: Return NOTIFY_DONE for hci_suspend_notifier The original return is NOTIFY_STOP, but notifier_call_chain would stop the future call for register_pm_notifier even registered on other Kernel modules with the same priority which value is zero. Signed-off-by: Max Chou Signed-off-by: Marcel Holtmann commit a7ad4b6119d740b1ec5788f1b98be0fd1c1b5a5a Author: Nicolas Boichat Date: Tue Jul 21 10:37:15 2020 +0800 Bluetooth: hci_h5: Set HCI_UART_RESET_ON_INIT to correct flags HCI_UART_RESET_ON_INIT belongs in hdev_flags, not flags. Fixes: ce945552fde4a09 ("Bluetooth: hci_h5: Add support for serdev enumerated devices") Signed-off-by: Nicolas Boichat Reviewed-by: Hans de Goede Signed-off-by: Marcel Holtmann commit 73bf2131d057cdbebf5e79901f8017015ecbd3e6 Merge: 7fbdc6afd02b2 2c887638a5fa1 Author: Arnd Bergmann Date: Tue Jul 28 09:10:01 2020 +0200 Merge tag 'aspeed-5.9-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed into arm/dt ASPEED device tree updates for 5.9 There is one new machine; AMD's EthanolX reference platform with an AST2600 BMC. Misc updates for Rainier, Tacoma, Wedge and Mihawk machines. * tag 'aspeed-5.9-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed: (26 commits) ARM: dts: Aspeed: tacoma: Enable EHCI controller ARM: dts: aspeed: rainier: Enable EHCI controller ARM: dts: aspeed: rainier: Switch OCCs to P10 ARM: dts: aspeed: rainier: Add FSI I2C masters ARM: dts: aspeed: rainier: Add CFAM SPI controllers ARM: dts: aspeed: rainier: Add I2C buses for NVMe use ARM: dts: aspeed: Initial device tree for AMD EthanolX ARM: dts: rainier: Describe GPIO mux on I2C3 ARM: dts: aspeed: wedge40: Enable pwm_tacho device ARM: dts: aspeed: wedge40: Enable ADC device ARM: dts: aspeed: wedge40: Disable unused i2c controllers ARM: dts: aspeed: cmm: Fixup I2C tree ARM: dts: aspeed: tacoma: Add CFAM reset GPIO ARM: dts: aspeed: rainier: Add CFAM reset GPIO ARM: dts: aspeed: tacoma: Fix gpio-key definitions ARM: dts: rainier: Configure ball Y23 as GPIOP7 for MCLR_VPP ARM: dts: aspeed: rainier: Add second cfam on the hub ARM: dts: aspeed: rainier: Add line-name checkstop ARM: dts: aspeed: tacoma: Remove checkstop gpio-key ARM: dts: aspeed: tacoma: Enable XDMA engine ... Link: https://lore.kernel.org/r/CACPK8Xf_Np7LtcDFhywi6Uk1EgUpb0pVVa+Lr9YEwBRjbjOKCQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit cde1a8a992875a7479c4321b2a4a190c2e92ec2a Author: Ismael Ferreras Morezuelas Date: Sun Jul 26 23:12:28 2020 +0200 Bluetooth: btusb: Fix and detect most of the Chinese Bluetooth controllers For some reason they tend to squat on the very first CSR/ Cambridge Silicon Radio VID/PID instead of paying fees. This is an extremely common problem; the issue goes as back as 2013 and these devices are only getting more popular, even rebranded by reputable vendors and sold by retailers everywhere. So, at this point in time there are hundreds of modern dongles reusing the ID of what originally was an early Bluetooth 1.1 controller. Linux is the only place where they don't work due to spotty checks in our detection code. It only covered a minimum subset. So what's the big idea? Take advantage of the fact that all CSR chips report the same internal version as both the LMP sub-version and HCI revision number. It always matches, couple that with the manufacturer code, that rarely lies, and we now have a good idea of who is who. Additionally, by compiling a list of user-reported HCI/lsusb dumps, and searching around for legit CSR dongles in similar product ranges we can find what CSR BlueCore firmware supported which Bluetooth versions. That way we can narrow down ranges of fakes for each of them. e.g. Real CSR dongles with LMP subversion 0x73 are old enough that support BT 1.1 only; so it's a dead giveaway when some third-party BT 4.0 dongle reuses it. So, to sum things up; there are multiple classes of fake controllers reusing the same 0A12:0001 VID/PID. This has been broken for a while. Known 'fake' bcdDevices: 0x0100, 0x0134, 0x1915, 0x2520, 0x7558, 0x8891 IC markings on 0x7558: FR3191AHAL 749H15143 (???) https://bugzilla.kernel.org/show_bug.cgi?id=60824 Fixes: 81cac64ba258ae (Deal with USB devices that are faking CSR vendor) Reported-by: Michał Wiśniewski Tested-by: Mike Johnson Tested-by: Ricardo Rodrigues Tested-by: M.Hanny Sabbagh Tested-by: Oussama BEN BRAHIM Tested-by: Ismael Ferreras Morezuelas Signed-off-by: Ismael Ferreras Morezuelas Signed-off-by: Marcel Holtmann commit 9d56a1c21f1caf52ca4f6f578e98a0503aa8001d Author: Konrad Dybcio Date: Thu Jun 25 20:21:17 2020 +0200 arm64: dts: qcom: Add Microsoft Lumia 950 (Talkman) device tree Add device tree support for the Microsoft Lumia 950 smartphone. It is based on msm8992 and supports booting Linux via a custom EDK2 port. Currently it supports: * Screen console via EFIFB * Booting via EFI_STUB * SDHCI * I2C * PSCI core bringup Please note that there is an implementation of EL2 startup on this board, but it requires the user to resign from PSCI and use spin-table instead. This revision sticks with PSCI. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-14-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 0f5cdb31e850e113af341a9f05e3b7b0d732b866 Author: Konrad Dybcio Date: Thu Jun 25 20:21:16 2020 +0200 arm64: dts: qcom: Add Xiaomi Libra (Mi 4C) device tree This commit adds support for the Xiaomi Libra (Mi 4C) smartphone. It's based on the Qualcomm msm8992 SoC. It currently supports: * Screen console from bootloader * SDHCI * Regulator configuration * Serial console * I2C Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-13-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 75c8a10d9c19938313ed670bbbcdd80ef178732e Author: Konrad Dybcio Date: Thu Jun 25 20:21:15 2020 +0200 arm64: dts: qcom: msm8992: Add RPMCC node This lets us use clocks provided by RPM. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-12-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 329e16d5f8fcdcbe323c0f01c37f8fbba22d21d2 Author: Konrad Dybcio Date: Thu Jun 25 20:21:14 2020 +0200 arm64: dts: qcom: msm8992: Add PSCI support. This SoC's firmware does not fully support the PSCI spec, but it's good enough to bring the cores up. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-11-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 0835375212681cdf26d120a4fb792ed524f24447 Author: Konrad Dybcio Date: Thu Jun 25 20:21:13 2020 +0200 arm64: dts: qcom: msm8992: Add PMU node Add the PMU so we can get proper perf event support on this SoC. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-10-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 7f8bcc0c4cfec4ea0340a4fc1e39f55126ebbece Author: Konrad Dybcio Date: Thu Jun 25 20:21:12 2020 +0200 arm64: dts: qcom: msm8992: Add BLSP2_UART2 and I2C nodes Add support for I2C to enable support for peripherals such as touchscreens or sensors. Also add BLSP_UART2 interface. Please note that the naming scheme follows downstream and as abominable as it is, that's what we get. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-9-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit ce13edfb7bfe1c9cf8d43c00fcdc49f4439b4341 Author: Konrad Dybcio Date: Thu Jun 25 20:21:11 2020 +0200 arm64: dts: qcom: msm8992: Add SPMI PMIC arbiter device Add SPMI PMIC arbiter device to communicate with PMICs attached to SPMI bus. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-8-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit be577b8125f89af549111a648ed66d63b29c666d Author: Konrad Dybcio Date: Thu Jun 25 20:21:10 2020 +0200 arm64: dts: qcom: msm8992: Add a SCM node Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-7-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 2912215f53919645da7149670d731729faba77fd Author: Konrad Dybcio Date: Thu Jun 25 20:21:09 2020 +0200 arm64: dts: qcom: msm8992: Add a proper CPU map This commit adds cpu nodes for all 6 cores present on this SoC and the cpu-map. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-6-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit d54df2210d2fc41fa094a415faa801be6d350d77 Author: Konrad Dybcio Date: Thu Jun 25 20:21:08 2020 +0200 arm64: dts: qcom: bullhead: Move UART pinctrl to SoC This pinout is common for every 8992-based device and should therefore reside in the SoC device tree. Also convert addresses into phandles. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-5-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 4acc8d64e56e70d0af319d7decafad2ad4e10f58 Author: Konrad Dybcio Date: Thu Jun 25 20:21:07 2020 +0200 arm64: dts: qcom: bullhead: Add qcom,msm-id Add the property required for the bootloader to select the correct device tree blob. It has been removed from the SoC device tree as it should be set on a per-device basis. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-4-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit c83e0951bcad645df15b348ebb43e34b687baf78 Author: Konrad Dybcio Date: Thu Jun 25 20:21:06 2020 +0200 arm64: dts: qcom: msm8992: Fix SDHCI1 This commit ensures the correct IRQ type is set and disables the device by default. The mmc-hs400-1_8v property is also moved to Bullhead as it might not be present on all boards. The node has been renamed to sdhci@ instead of mmc@ and the phandle was changed to sdhc_1 to comply with the newer DTS style. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-3-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit d99c1c2a1acb7f0b56fdf0e8db36d4983d36a578 Author: Konrad Dybcio Date: Thu Jun 25 20:21:05 2020 +0200 arm64: dts: qcom: msm8992: Modernize the DTS style Following changes have been made: - remove name, compatible and msm-id - wrap clocks in clocks{} - order nodes by name and by address - clock_gcc -> gcc - msmgpio -> tlmm - retire msm8992-pins.dtsi - add some of the missing pins - make comments C-style - make apcs a mailbox Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200625182118.131476-2-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 551969ad9b6d6b6a69750edb3bec50ed07741d1c Author: Konrad Dybcio Date: Wed Jun 24 17:01:06 2020 +0200 arm64: dts: qcom: Add support for Sony Xperia Z5 (SoMC Sumire-RoW) Add device tree support for the Sony Xperia Z5 smartphone. It's based on Sony Kitakami platform (msm8994) and hence a Kitakami-common DTSI has been created so as to reduce clutter when remaining devices are added. The board currently supports * Serial * SDHCI * I2C * Regulator configuration * pstore log dump * GPIO keys Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200624150107.76234-9-konradybcio@gmail.com [bjorn: Changed vendor identifier in board compatible from somc to sony] Signed-off-by: Bjorn Andersson commit f007210d96be51700d7dce2ccaeedb15e01ce33d Author: Konrad Dybcio Date: Wed Jun 24 17:01:02 2020 +0200 arm64: dts: qcom: Move msm8994-smd-rpm contents to lg-bullhead. This was the only device using that dtsi, so no point keeping it separate AND with a confusing name (bullhead is based on msm8992 and the file contains regulator values for that specific board). Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200624150107.76234-8-konradybcio@gmail.com [bjorn: Squashed with change that remove regulators from msm8992.dtsi] Signed-off-by: Bjorn Andersson commit 01104518b4162ba889c0ca7eb8f882cbad865171 Author: Konrad Dybcio Date: Wed Jun 24 17:01:04 2020 +0200 arm64: dts: qcom: msm8994: Add support for SMD RPM Add support for SMD RPM, including pm8994 and pmi8994 regulators. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200624150107.76234-7-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 95087f61639e2c167752f05eeed7b7e87876c417 Author: Konrad Dybcio Date: Wed Jun 24 17:01:01 2020 +0200 arm64: dts: qcom: msm8992: Add a label to rpm-requests This enables the node to be referenced directly from other DTs. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200624150107.76234-4-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit e4faf75d6c2465dc878acaeb1c22cd87a308c2f1 Author: Konrad Dybcio Date: Wed Jun 24 17:01:00 2020 +0200 arm64: dts: qcom: msm8994: Add SCM node Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200624150107.76234-3-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit aef9a119dfb91706a71399ca39f61dfe79bdc027 Author: Bjorn Andersson Date: Mon Jul 27 13:25:32 2020 +0530 arm64: dts: qcom: sdm845-db845c: Add hdmi bridge nodes Enable MDSS and DSI and add the LT9611 HDMI bridge. Also add the HDMI audio nodes. Signed-off-by: Bjorn Andersson Co-developed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200727075532.1932134-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 04a3605b184e151744b6adecd1a60654e46f3d2e Author: Jonathan Marek Date: Thu Jul 9 09:52:45 2020 -0400 arm64: dts: qcom: add sm8250 GPU nodes This brings up the GPU. Tested on HDK865 by running vulkan CTS. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200709135251.643-15-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit f30ac26def181e655d1f1d40b9ec2c9e3b333bb5 Author: Jonathan Marek Date: Thu Jul 9 09:52:44 2020 -0400 arm64: dts: qcom: add sm8150 GPU nodes This brings up the GPU. Tested on HDK855 by running vulkan CTS. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200709135251.643-14-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 87b517a80419346a44319dc21cad9472a01b9204 Author: Jonathan Marek Date: Thu Jul 9 09:52:43 2020 -0400 dt-bindings: power: Add missing rpmpd rpmh regulator level Add RPMH_REGULATOR_LEVEL_SVS_L0, used by sm8250. Acked-by: Rob Herring Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200709135251.643-13-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit c8c6c187d05876c41d5c2ed09a2a13077f38ae1f Author: Sharat Masetty Date: Fri Jul 17 18:59:39 2020 +0530 arm64: dts: qcom: sc7180: Add opp-peak-kBps to GPU opp Add opp-peak-kBps bindings to the GPU opp table, listing the peak GPU -> DDR bandwidth requirement for each opp level. This will be used to scale the DDR bandwidth along with the GPU frequency dynamically. Signed-off-by: Sharat Masetty Reviewed-by: Matthias Kaehlcke Signed-off-by: Akhil P Oommen Link: https://lore.kernel.org/r/1594992579-20662-7-git-send-email-akhilpo@codeaurora.org Signed-off-by: Bjorn Andersson commit dd7dc299f303f215bb7ab9b2105ee50f591e5013 Author: Sharat Masetty Date: Fri Jul 17 18:59:38 2020 +0530 arm64: dts: qcom: sc7180: Add interconnects property for GPU This patch adds the interconnects property to the GPU node. This enables the GPU->DDR path bandwidth voting. Signed-off-by: Sharat Masetty Signed-off-by: Akhil P Oommen Link: https://lore.kernel.org/r/1594992579-20662-6-git-send-email-akhilpo@codeaurora.org Signed-off-by: Bjorn Andersson commit 338bdbcc598a7c2228739f41c697f126c9db384c Author: Sharat Masetty Date: Fri Jul 17 18:59:37 2020 +0530 arm64: dts: qcom: SDM845: Enable GPU DDR bw scaling This patch adds the interconnects property for the gpu node and the opp-peak-kBps property to the opps of the gpu opp table. This should help enable DDR bandwidth scaling dynamically and proportionally to the GPU frequency. Signed-off-by: Sharat Masetty Signed-off-by: Akhil P Oommen Link: https://lore.kernel.org/r/1594992579-20662-5-git-send-email-akhilpo@codeaurora.org Signed-off-by: Bjorn Andersson commit 8aa6ac22e52693173a71b3e58cb9f361b0bd6d3c Author: Sai Prakash Ranjan Date: Tue Jun 9 19:00:30 2020 +0530 arm64: dts: qcom: sc7180: Add support for context losing replicator Add "qcom,replicator-loses-context" property to the replicator in Always-on domain in SC7180 SoC to enable coresight replicator driver to handle this variation of replicator designs. Reviewed-by: Mathieu Poirier Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/5072d94849cfaee46748d26ac997212fb2d783c2.1591708204.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 42a51c7504945caa08ee73faff3862e740c094e1 Author: Sibi Sankar Date: Tue Jun 2 22:02:57 2020 +0530 remoteproc: qcom_q6v5_mss: Remove redundant running state Remove the redundant running state, as an equivalent is maintained in the common q6v5 resource handling helpers. Reviewed-by: Bjorn Andersson Reviewed-by: Evan Green Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200602163257.26978-2-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 5b7be880074c73540948f8fc597e0407b98fabfa Author: Sibi Sankar Date: Tue Jun 2 22:02:56 2020 +0530 remoteproc: qcom: q6v5: Update running state before requesting stop Sometimes the stop triggers a watchdog rather than a stop-ack. Update the running state to false on requesting stop to skip the watchdog instead. Error Logs: $ echo stop > /sys/class/remoteproc/remoteproc0/state ipa 1e40000.ipa: received modem stopping event remoteproc-modem: watchdog received: sys_m_smsm_mpss.c:291:APPS force stop qcom-q6v5-mss 4080000.remoteproc-modem: port failed halt ipa 1e40000.ipa: received modem offline event remoteproc0: stopped remote processor 4080000.remoteproc-modem Reviewed-by: Evan Green Fixes: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource handling") Cc: stable@vger.kernel.org Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200602163257.26978-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit fe6a5dc4b03171653d217e6dc7c1739e90c660bb Author: Sibi Sankar Date: Thu Jul 23 01:40:47 2020 +0530 remoteproc: qcom_q6v5_mss: Add modem debug policy support Add modem debug policy support which will enable coredumps and live debug support when the msadp firmware is present on secure devices. Reviewed-by: Bjorn Andersson Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200722201047.12975-4-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 135b9e8d1cd8ba5ac9ad9bcf24b464b7b052e5b8 Author: Sibi Sankar Date: Thu Jul 23 01:40:46 2020 +0530 remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load The following mem abort is observed when one of the modem blob firmware size exceeds the allocated mpss region. Fix this by restricting the copy size to segment size using request_firmware_into_buf before load. Err Logs: Unable to handle kernel paging request at virtual address Mem abort info: ... Call trace: __memcpy+0x110/0x180 rproc_start+0xd0/0x190 rproc_boot+0x404/0x550 state_store+0x54/0xf8 dev_attr_store+0x44/0x60 sysfs_kf_write+0x58/0x80 kernfs_fop_write+0x140/0x230 vfs_write+0xc4/0x208 ksys_write+0x74/0xf8 ... Reviewed-by: Bjorn Andersson Fixes: 051fb70fd4ea4 ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Cc: stable@vger.kernel.org Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200722201047.12975-3-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit e013f455d95add874f310dc47c608e8c70692ae5 Author: Sibi Sankar Date: Thu Jul 23 01:40:45 2020 +0530 remoteproc: qcom_q6v5_mss: Validate MBA firmware size before load The following mem abort is observed when the mba firmware size exceeds the allocated mba region. MBA firmware size is restricted to a maximum size of 1M and remaining memory region is used by modem debug policy firmware when available. Hence verify whether the MBA firmware size lies within the allocated memory region and is not greater than 1M before loading. Err Logs: Unable to handle kernel paging request at virtual address Mem abort info: ... Call trace: __memcpy+0x110/0x180 rproc_start+0x40/0x218 rproc_boot+0x5b4/0x608 state_store+0x54/0xf8 dev_attr_store+0x44/0x60 sysfs_kf_write+0x58/0x80 kernfs_fop_write+0x140/0x230 vfs_write+0xc4/0x208 ksys_write+0x74/0xf8 __arm64_sys_write+0x24/0x30 ... Reviewed-by: Bjorn Andersson Fixes: 051fb70fd4ea4 ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Cc: stable@vger.kernel.org Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200722201047.12975-2-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit d6f93d21001e4388a25b0b922e02e64bc6004d2f Author: Peter Chen Date: Tue Jul 28 14:12:11 2020 +0800 usb: chipidea: imx: get available runtime dr mode for wakeup setting If runtime dr_mode is not dual-role, it doesn't need to enable ID wakeup interrupt. If runtime dr_mode is host, it doesn't need to enable VBUS wakeup interrupt. With these changes, the user will not get the unexpected wakeup for single role use case. For example, the host-only use case at Micro-AB port, the controller should not be waken up by only plug in Micro-AB cable or the Micro-B cable with host. Signed-off-by: Peter Chen commit 72fe996f9643043c8f84e32c0610975b01aa555b Author: Sibi Sankar Date: Thu Jul 2 01:29:54 2020 +0530 soc: qcom: pdr: Reorder the PD state indication ack The Protection Domains (PD) have a mechanism to keep its resources enabled until the PD down indication is acked. Reorder the PD state indication ack so that clients get to release the relevant resources before the PD goes down. Reviewed-by: Bjorn Andersson Reviewed-by: Rishabh Bhatnagar Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Reported-by: Rishabh Bhatnagar Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200701195954.9007-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 62b9825827518843f0f93dec6730ddcde14eb5b2 Author: Peter Chen Date: Mon Feb 17 09:26:43 2020 +0800 usb: chipidea: add query_available_role interface The glue layer may need to know current available role to do some setting, eg, the wakeup setting. So we add ci_hdrc_query_available_role for that. Signed-off-by: Peter Chen commit 81ab595ddd3c3036806b460526e1fbc5b271ff33 Author: Laurent Dufour Date: Mon Jul 27 12:24:29 2020 -0700 KVM: PPC: Book3S HV: Rework secure mem slot dropping When a secure memslot is dropped, all the pages backed in the secure device (aka really backed by secure memory by the Ultravisor) should be paged out to a normal page. Previously, this was achieved by triggering the page fault mechanism which is calling kvmppc_svm_page_out() on each pages. This can't work when hot unplugging a memory slot because the memory slot is flagged as invalid and gfn_to_pfn() is then not trying to access the page, so the page fault mechanism is not triggered. Since the final goal is to make a call to kvmppc_svm_page_out() it seems simpler to call directly instead of triggering such a mechanism. This way kvmppc_uvmem_drop_pages() can be called even when hot unplugging a memslot. Since kvmppc_uvmem_drop_pages() is already holding kvm->arch.uvmem_lock, the call to __kvmppc_svm_page_out() is made. As __kvmppc_svm_page_out needs the vma pointer to migrate the pages, the VMA is fetched in a lazy way, to not trigger find_vma() all the time. In addition, the mmap_sem is held in read mode during that time, not in write mode since the virual memory layout is not impacted, and kvm->arch.uvmem_lock prevents concurrent operation on the secure device. Reviewed-by: Bharata B Rao Signed-off-by: Laurent Dufour [modified check on the VMA in kvmppc_uvmem_drop_pages] Signed-off-by: Ram Pai [modified the changelog description] Signed-off-by: Paul Mackerras commit f1b87ea8784b8c79d9bffad60fe0720c2cb21ec7 Author: Laurent Dufour Date: Mon Jul 27 12:24:28 2020 -0700 KVM: PPC: Book3S HV: Move kvmppc_svm_page_out up kvmppc_svm_page_out() will need to be called by kvmppc_uvmem_drop_pages() so move it up earlier in this file. Furthermore it will be interesting to call this function when already holding the kvm->arch.uvmem_lock, so prefix the original function with __ and remove the locking in it, and introduce a wrapper which call that function with the lock held. There is no functional change. Reviewed-by: Bharata B Rao Signed-off-by: Laurent Dufour Signed-off-by: Ram Pai Signed-off-by: Paul Mackerras commit a2ce72003863d0dcf680f0c49de4678ab2c6812b Author: Laurent Dufour Date: Mon Jul 27 11:07:18 2020 -0700 KVM: PPC: Book3S HV: Migrate hot plugged memory When a memory slot is hot plugged to a SVM, PFNs associated with the GFNs in that slot must be migrated to the secure-PFNs, aka device-PFNs. Call kvmppc_uv_migrate_mem_slot() to accomplish this. Disable page-merge for all pages in the memory slot. Reviewed-by: Bharata B Rao Signed-off-by: Ram Pai [rearranged the code, and modified the commit log] Signed-off-by: Laurent Dufour Signed-off-by: Paul Mackerras commit dfaa973ae9605e1731eaef9f30c2b056346a4efc Author: Ram Pai Date: Mon Jul 27 11:07:17 2020 -0700 KVM: PPC: Book3S HV: In H_SVM_INIT_DONE, migrate remaining normal-GFNs to secure-GFNs The Ultravisor is expected to explicitly call H_SVM_PAGE_IN for all the pages of the SVM before calling H_SVM_INIT_DONE. This causes a huge delay in tranistioning the VM to SVM. The Ultravisor is only interested in the pages that contain the kernel, initrd and other important data structures. The rest contain throw-away content. However if not all pages are requested by the Ultravisor, the Hypervisor continues to consider the GFNs corresponding to the non-requested pages as normal GFNs. This can lead to data-corruption and undefined behavior. In H_SVM_INIT_DONE handler, move all the PFNs associated with the SVM's GFNs to secure-PFNs. Skip the GFNs that are already Paged-in or Shared or Paged-in followed by a Paged-out. Reviewed-by: Bharata B Rao Signed-off-by: Ram Pai Signed-off-by: Paul Mackerras commit 651a6310111ef8e09394e77d6d959ab3d066930d Author: Ram Pai Date: Mon Jul 27 11:07:16 2020 -0700 KVM: PPC: Book3S HV: Track the state GFNs associated with secure VMs During the life of SVM, its GFNs transition through normal, secure and shared states. Since the kernel does not track GFNs that are shared, it is not possible to disambiguate a shared GFN from a GFN whose PFN has not yet been migrated to a secure-PFN. Also it is not possible to disambiguate a secure-GFN from a GFN whose GFN has been pagedout from the ultravisor. The ability to identify the state of a GFN is needed to skip migration of its PFN to secure-PFN during ESM transition. The code is re-organized to track the states of a GFN as explained below. ************************************************************************ 1. States of a GFN --------------- The GFN can be in one of the following states. (a) Secure - The GFN is secure. The GFN is associated with a Secure VM, the contents of the GFN is not accessible to the Hypervisor. This GFN can be backed by a secure-PFN, or can be backed by a normal-PFN with contents encrypted. The former is true when the GFN is paged-in into the ultravisor. The latter is true when the GFN is paged-out of the ultravisor. (b) Shared - The GFN is shared. The GFN is associated with a a secure VM. The contents of the GFN is accessible to Hypervisor. This GFN is backed by a normal-PFN and its content is un-encrypted. (c) Normal - The GFN is a normal. The GFN is associated with a normal VM. The contents of the GFN is accesible to the Hypervisor. Its content is never encrypted. 2. States of a VM. --------------- (a) Normal VM: A VM whose contents are always accessible to the hypervisor. All its GFNs are normal-GFNs. (b) Secure VM: A VM whose contents are not accessible to the hypervisor without the VM's consent. Its GFNs are either Shared-GFN or Secure-GFNs. (c) Transient VM: A Normal VM that is transitioning to secure VM. The transition starts on successful return of H_SVM_INIT_START, and ends on successful return of H_SVM_INIT_DONE. This transient VM, can have GFNs in any of the three states; i.e Secure-GFN, Shared-GFN, and Normal-GFN. The VM never executes in this state in supervisor-mode. 3. Memory slot State. ------------------ The state of a memory slot mirrors the state of the VM the memory slot is associated with. 4. VM State transition. -------------------- A VM always starts in Normal Mode. H_SVM_INIT_START moves the VM into transient state. During this time the Ultravisor may request some of its GFNs to be shared or secured. So its GFNs can be in one of the three GFN states. H_SVM_INIT_DONE moves the VM entirely from transient state to secure-state. At this point any left-over normal-GFNs are transitioned to Secure-GFN. H_SVM_INIT_ABORT moves the transient VM back to normal VM. All its GFNs are moved to Normal-GFNs. UV_TERMINATE transitions the secure-VM back to normal-VM. All the secure-GFN and shared-GFNs are tranistioned to normal-GFN Note: The contents of the normal-GFN is undefined at this point. 5. GFN state implementation: ------------------------- Secure GFN is associated with a secure-PFN; also called uvmem_pfn, when the GFN is paged-in. Its pfn[] has KVMPPC_GFN_UVMEM_PFN flag set, and contains the value of the secure-PFN. It is associated with a normal-PFN; also called mem_pfn, when the GFN is pagedout. Its pfn[] has KVMPPC_GFN_MEM_PFN flag set. The value of the normal-PFN is not tracked. Shared GFN is associated with a normal-PFN. Its pfn[] has KVMPPC_UVMEM_SHARED_PFN flag set. The value of the normal-PFN is not tracked. Normal GFN is associated with normal-PFN. Its pfn[] has no flag set. The value of the normal-PFN is not tracked. 6. Life cycle of a GFN -------------------- -------------------------------------------------------------- | | Share | Unshare | SVM |H_SVM_INIT_DONE| | |operation |operation | abort/ | | | | | | terminate | | ------------------------------------------------------------- | | | | | | | Secure | Shared | Secure |Normal |Secure | | | | | | | | Shared | Shared | Secure |Normal |Shared | | | | | | | | Normal | Shared | Secure |Normal |Secure | -------------------------------------------------------------- 7. Life cycle of a VM -------------------- -------------------------------------------------------------------- | | start | H_SVM_ |H_SVM_ |H_SVM_ |UV_SVM_ | | | VM |INIT_START|INIT_DONE|INIT_ABORT |TERMINATE | | | | | | | | --------- ---------------------------------------------------------- | | | | | | | | Normal | Normal | Transient|Error |Error |Normal | | | | | | | | | Secure | Error | Error |Error |Error |Normal | | | | | | | | |Transient| N/A | Error |Secure |Normal |Normal | -------------------------------------------------------------------- ************************************************************************ Reviewed-by: Bharata B Rao Reviewed-by: Thiago Jung Bauermann Signed-off-by: Ram Pai Signed-off-by: Paul Mackerras commit 2027a24a75ce32cf48a22cc25a9d87b8c5b19328 Author: Ram Pai Date: Mon Jul 27 11:07:15 2020 -0700 KVM: PPC: Book3S HV: Disable page merging in H_SVM_INIT_START Page-merging of pages in memory-slots associated with a Secure VM is disabled in H_SVM_PAGE_IN handler. This operation should have been done the much earlier; the moment the VM is initiated for secure-transition. Delaying this operation increases the probability for those pages to acquire new references, making it impossible to migrate those pages in H_SVM_PAGE_IN handler. Disable page-migration in H_SVM_INIT_START handling. Reviewed-by: Bharata B Rao Signed-off-by: Ram Pai Signed-off-by: Paul Mackerras commit 48908a3833cc76c56e626e8e80ba8f808c8d03a5 Author: Ram Pai Date: Mon Jul 27 11:07:14 2020 -0700 KVM: PPC: Book3S HV: Fix function definition in book3s_hv_uvmem.c Without this fix, git is confused. It generates wrong function context for code changes in subsequent patches. Weird, but true. Signed-off-by: Ram Pai Signed-off-by: Paul Mackerras commit 92df3a9bf3fd975949122b1779c142c2d007a7dc Author: Michael Krummsdorf Date: Wed Jun 10 13:38:37 2020 +0200 clk: qoriq: add LS1021A core pll mux options This allows to clock the cores with 1 GHz, 500 MHz and 250 MHz. Signed-off-by: Michael Krummsdorf Signed-off-by: Matthias Schiffer Link: https://lore.kernel.org/r/20200610113837.27117-1-matthias.schiffer@ew.tq-group.com Signed-off-by: Stephen Boyd commit 12b90b40854a8461a02ef19f6f4474cc88d64b66 Author: Xu Wang Date: Mon Jul 13 03:21:43 2020 +0000 clk: clk-atlas6: fix return value check in atlas6_clk_init() In case of error, the function clk_register() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20200713032143.21362-1-vulab@iscas.ac.cn Acked-by: Barry Song Fixes: 7bf21bc81f28 ("clk: sirf: re-arch to make the codes support both prima2 and atlas6") Signed-off-by: Stephen Boyd commit fa64023763cf1a3da8bf3341df6c2a47e54fcead Author: Dmitry Osipenko Date: Thu Jul 9 20:20:57 2020 +0300 clk: tegra: pll: Improve PLLM enable-state detection Power Management Controller (PMC) can override the PLLM clock settings, including the enable-state. Although PMC could only act as a second level gate, meaning that PLLM needs to be enabled by the Clock and Reset Controller (CaR) anyways if we want it to be enabled. Hence, when PLLM is overridden by PMC, it needs to be enabled by CaR and ungated by PMC in order to be functional. Please note that this patch doesn't fix any known problem, and thus, it's merely a minor improvement. Link: https://lore.kernel.org/linux-arm-kernel/20191210120909.GA2703785@ulmo/T/ Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20200709172057.13951-1-digetx@gmail.com Reviewed-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Stephen Boyd commit 810797c14508dae3c80eacaa483a900b03fdb780 Author: 周琰杰 (Zhou Yanjie) Date: Wed Jul 1 00:38:52 2020 +0800 clk: X1000: Add support for calculat REFCLK of USB PHY. Add functions for calculat the rate of REFCLK, which is needed by USB PHY in Ingenic X1000 SoC. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20200630163852.47267-4-zhouyanjie@wanyeetech.com Signed-off-by: Stephen Boyd commit beb61eb06880c06005b9855873d77547d43bab4b Author: 周琰杰 (Zhou Yanjie) Date: Wed Jul 1 00:38:51 2020 +0800 clk: JZ4780: Reformat the code to align it. Reformat the code (add one level of indentation before the values), to align the code in the macro definition section. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20200630163852.47267-3-zhouyanjie@wanyeetech.com Signed-off-by: Stephen Boyd commit dcd062a88e46d4d2aeaf701e82e128117fc0f3a1 Author: 周琰杰 (Zhou Yanjie) Date: Wed Jul 1 00:38:50 2020 +0800 clk: JZ4780: Add functions for enable and disable USB PHY. Add new functions to "jz4780_otg_phy_ops" to enable or disable the USB PHY in the JZ4780 SoC. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20200630163852.47267-2-zhouyanjie@wanyeetech.com Signed-off-by: Stephen Boyd commit 82df5b7329aaeb21b3e8fc86fa2d62a3d68602aa Author: 周琰杰 (Zhou Yanjie) Date: Sat Jul 25 13:11:36 2020 +0800 clk: Ingenic: Add RTC related clocks for Ingenic SoCs. The RTC unit in the Ingenic SoCs has two clock sources, one is from an external 32.768kHz clock, and the other is from an external 24MHz/48MHz main clock that is divided by 512. The choice of these two clocks is controlled by the ERCS bit in the OPCR register. The RNG unit will also use this clock. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20200725051136.58220-4-zhouyanjie@wanyeetech.com Signed-off-by: Stephen Boyd commit acb3b78de3f7698724e59719fbe50b8c92928e83 Author: 周琰杰 (Zhou Yanjie) Date: Sat Jul 25 13:11:35 2020 +0800 dt-bindings: clock: Add tabs to align code. The "JZ4780_CLK_LCD0PIXCLK" and the "JZ4780_CLK_LCD1PIXCLK" in the "jz4780.h" and the new added "JZ4780_CLK_EXCLK_DIV512" in the previous patch is too long, add tabs to other lines to align them. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20200725051136.58220-3-zhouyanjie@wanyeetech.com Signed-off-by: Stephen Boyd commit 316810e883fbcfd88167fd53858294bf0c2bcd40 Author: 周琰杰 (Zhou Yanjie) Date: Sat Jul 25 13:11:34 2020 +0800 dt-bindings: clock: Add RTC related clocks for Ingenic SoCs. Add RTC related clocks bindings for the JZ4780 SoC, the X1000 SoC, and the X1830 SoC from Ingenic. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Link: https://lore.kernel.org/r/20200725051136.58220-2-zhouyanjie@wanyeetech.com Signed-off-by: Stephen Boyd commit 466bf93153b871f9fed93aea1389673c17d253e7 Author: Peng Fan Date: Thu Jul 2 16:58:52 2020 +0800 power: supply: rt5033_battery: Fix error code in rt5033_battery_probe() In the function rt5033_battery_probe(), it should return -ENOMEM instead of -EINVAL when call function devm_kzalloc() failed. Signed-off-by: Peng Fan Signed-off-by: Sebastian Reichel commit 2f38dc4d9190cd97b8ceb88be5b835ee5feb44d1 Author: Matheus Castello Date: Sun Jul 5 21:10:03 2020 -0300 power: supply: max17040: Add POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN Adds the property POWER_SUPPLY_PROP_CAPACITY_ALERT_MIN to export the chip->low_soc_alert and add the property as writeable, implementing max17040_prop_writeable and max17040_set_property, so with that the user space can readjust the alerts. Signed-off-by: Matheus Castello Signed-off-by: Sebastian Reichel commit ccf193dee1f0fff55b556928591f7818bac1b3b1 Author: Tom Rix Date: Sun Jul 12 12:23:51 2020 -0700 power: supply: check if calc_soc succeeded in pm860x_init_battery clang static analysis flags this error 88pm860x_battery.c:522:19: warning: Assigned value is garbage or undefined [core.uninitialized.Assign] info->start_soc = soc; ^ ~~~ soc is set by calling calc_soc. But calc_soc can return without setting soc. So check the return status and bail similarly to other checks in pm860x_init_battery and initialize soc to silence the warning. Fixes: a830d28b48bf ("power_supply: Enable battery-charger for 88pm860x") Signed-off-by: Tom Rix Signed-off-by: Sebastian Reichel commit 81bd45fc36e3d01db66c17fa5ed5f39a61e67477 Author: Alexander A. Klimov Date: Mon Jul 13 21:16:38 2020 +0200 power: supply: bq2xxxx: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov [also update recently added ti.com http links] Signed-off-by: Sebastian Reichel commit a7f79f99541eff4e6bcae0014eb08d3019337565 Author: Daniel González Cabanelas Date: Wed Jul 15 15:35:14 2020 +0200 power: reset: add driver for LinkStation power off Some Buffalo LinkStations perform the power off operation, at restart time, depending on the state of an output pin (LED2/INTn) at the ethernet PHY. This pin is also used to wake the machine when a WoL packet is received by the PHY. The driver is required by the Buffalo LinkStation LS421DE (ARM MVEBU), and other models. Without it, the board remains forever halted if a power off command is executed, unless the PSU is disconnected and connected again. Add the driver to provide the power off function and also make the WoL feature to be available. Signed-off-by: Daniel González Cabanelas Signed-off-by: Sebastian Reichel commit 2c887638a5fa1ac5e2491ae911f50d554b604985 Author: Eddie James Date: Tue Jun 16 08:57:24 2020 -0500 ARM: dts: Aspeed: tacoma: Enable EHCI controller Enable the second EHCI controller on the AST2600. Also add a line-name for the GPIO that controls power to the USB port. The power control is in place to allow the port to be disabled, for those that are worried about rogue USB sticks. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit ffade9f7b83b522094a8e4736c373742bb901147 Author: Eddie James Date: Tue Jun 16 08:57:23 2020 -0500 ARM: dts: aspeed: rainier: Enable EHCI controller Enable the second EHCI controller on the AST2600. Also add a line-name for the GPIO that controls power to the USB port. The power control is in place to allow the port to be disabled, for those that are worried about rogue USB sticks. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit 6036d968abb5ee7f7ad03d98455d39e29b8cad9c Author: Eddie James Date: Thu Jul 2 09:09:11 2020 -0500 ARM: dts: aspeed: rainier: Switch OCCs to P10 Rainier uses the P10 processor so the OCC binding should reflect that. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit da51a0f285e0d38a31f22eb1c134e53de4108d52 Author: Joel Stanley Date: Mon Jul 27 13:39:02 2020 +0930 ARM: dts: aspeed: rainier: Add FSI I2C masters The host processor contains i2c masters on each cfam. Signed-off-by: Joel Stanley commit baf78f5dd6e627524fd2f770b521a0afb5247fda Author: Eddie James Date: Wed Mar 18 11:09:55 2020 -0500 ARM: dts: aspeed: rainier: Add CFAM SPI controllers Add the four SPI masters on each CFAM. Each master has four 128KB EEPROM devices attached to it. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit a92532ece75d061a1f950e62e17700eebaffe573 Author: Jet Li Date: Tue Jul 21 20:00:31 2020 +0800 ARM: dts: aspeed: rainier: Add I2C buses for NVMe use Adding pca9552 exposes the presence detect lines for the cards and tca9554 exposes the presence details for the cards. Signed-off-by: Jet Li Signed-off-by: Joel Stanley commit 8596ed1502ee2aed39910e58cb2622e98dd433a2 Author: Supreeth Venkatesh Date: Fri Jul 24 14:28:18 2020 -0500 ARM: dts: aspeed: Initial device tree for AMD EthanolX Initial introduction of AMD EthanolX platform equipped with an Aspeed ast2500 BMC manufactured by AMD. AMD EthanolX platform is an AMD customer reference board with an Aspeed ast2500 BMC manufactured by AMD. This adds AMD EthanolX device tree file including the flash layout used by EthanolX BMC machines. Signed-off-by: Supreeth Venkatesh Signed-off-by: Joel Stanley commit c5b6bdabceffcdc5058fb0048592e5a68bb814d9 Author: Andrew Jeffery Date: Fri Jul 24 16:22:27 2020 +0930 ARM: dts: rainier: Describe GPIO mux on I2C3 We have a 4-bus mux whose output is selected by two GPIO inputs. Wire it up in the devicetree and ensure the output is enabled by hogging the appropriate line. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley commit ac31585fca317b29b6b7093a5a6775137a852f94 Author: Chunyan Zhang Date: Fri Jul 24 20:21:48 2020 +0800 power: supply: sc27xx: prevent adc * 1000 from overflow The input parameter is int type, cause adc * 1000 could overflow. Change to use s64 to avoid this issue. Signed-off-by: Chen Yongzhi Signed-off-by: Chunyan Zhang Signed-off-by: Sebastian Reichel commit af60459a543483c5ad155a92daa8c3a6c00a0829 Author: Chunyan Zhang Date: Fri Jul 24 20:21:47 2020 +0800 math64: New DIV_S64_ROUND_CLOSEST helper Provide DIV_S64_ROUND_CLOSEST helper which uses div_s64 to perform division rounded to the closest integer using signed 64bit dividend and signed 32bit divisor. Signed-off-by: Chunyan Zhang Signed-off-by: Sebastian Reichel commit e210c66d567c6dbd6b29bc89dc72b5327909bab1 Author: Tao Zhou Date: Fri Jul 24 10:47:42 2020 +0800 doc/zh_CN: add cpu-load Chinese version Add cpu-load Chinese version and link it into admin-guide. Based on Alex's recent thread: https://lkml.kernel.org/r/20200713115807.56362-1-alex.shi@linux.alibaba.com Reviewed-by: Alex Shi Signed-off-by: Tao Zhou Link: https://lore.kernel.org/r/BL0PR14MB37798BBF2307910DE73EF6D49A770@BL0PR14MB3779.namprd14.prod.outlook.com Signed-off-by: Jonathan Corbet commit 2cb3188bcc1d19219680c2d305c1df898196493e Author: Yue Hu Date: Sat Jul 25 10:24:44 2020 +0800 Documentation/admin-guide: tainted-kernels: fix spelling mistake Fix typo "tis" -> "this". Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20200725022444.10976-1-zbestahu@gmail.com Signed-off-by: Jonathan Corbet commit b4adc7df719e4d5426ece667a43483023dc9f53f Author: Lukas Bulwahn Date: Sun Jul 26 07:58:43 2020 +0200 MAINTAINERS: adjust kprobes.rst entry to new location Commit 2165b82fde82 ("docs: Move kprobes.rst from staging/ to trace/") moved kprobes.rst, but missed to adjust the MAINTAINERS entry. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: Documentation/staging/kprobes.rst Adjust the entry to the new file location. Signed-off-by: Lukas Bulwahn Acked-by: Naveen N. Rao Link: https://lore.kernel.org/r/20200726055843.10783-1-lukas.bulwahn@gmail.com Signed-off-by: Jonathan Corbet commit 5569f8967f888bee07dcda700683e4f2ad64f3df Author: Pavel Machek Date: Sun Jul 26 09:53:27 2020 +0200 devices.txt: document rfkill allocation Document rfkill allocation. Signed-off-by: Pavel Machek (CIP) Link: https://lore.kernel.org/r/20200726075327.GA25647@duo.ucw.cz Signed-off-by: Jonathan Corbet commit 7a346a37e46abd9bfe0e24aa2aabb68d832280b8 Author: Gustavo A. R. Silva Date: Mon Jul 27 15:11:22 2020 -0500 clk: davinci: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727201122.GA2593@embeddedor Reviewed-by: David Lechner Signed-off-by: Stephen Boyd commit d388e18f63b90a1256af490a856d67abd6558a38 Author: Gustavo A. R. Silva Date: Mon Jul 27 15:09:22 2020 -0500 clk: imx: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200727200922.GA2326@embeddedor Signed-off-by: Stephen Boyd commit e3363a0d7146427b136c73c60a635a36cbfe89ef Author: Julia Lawall Date: Sun Jul 26 17:47:35 2020 +0200 PCI: correct flag name RESOURCE_IO does not exist. Rename to IORESOURCE_IO. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1595778455-12132-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Jonathan Corbet commit cb56ecae4c991947aa1dcf0ff876705ccab2e442 Author: Julia Lawall Date: Sun Jul 26 20:43:40 2020 +0200 docs: filesystems: vfs: correct flag name There is no flag REMAP_CAN_SHORTEN. Commit eca3654e3cc7 ("vfs: enable remap callers that can handle short operations") that introduces this text also introduces the flag REMAP_FILE_CAN_SHORTEN. Change the name in the documentation accordingly. Signed-off-by: Julia Lawall Fixes: eca3654e3cc7 ("vfs: enable remap callers that can handle short operations") Link: https://lore.kernel.org/r/1595789020-12941-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Jonathan Corbet commit 3386af51d3bcebcba3f7becdb1ef2e384abe90cf Author: Konrad Dybcio Date: Sun Jul 26 13:12:05 2020 +0200 clk: qcom: gcc-sdm660: Fix up gcc_mss_mnoc_bimc_axi_clk Add missing halt_check, hwcg_reg and hwcg_bit properties. These were likely omitted when porting the driver upstream. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200726111215.22361-9-konradybcio@gmail.com Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for SDM660") Signed-off-by: Stephen Boyd commit b538304da7855f4e31f91f915f259936eb67a1e6 Author: Konrad Dybcio Date: Sun Jul 26 13:11:58 2020 +0200 clk: qcom: gcc-sdm660: Add missing modem reset This will be required in order to support the modem upstream. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200726111215.22361-2-konradybcio@gmail.com Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for SDM660") Signed-off-by: Stephen Boyd commit e9b2f15b85d78f05b30eb789263403b738231f78 Author: Julia Lawall Date: Sun Jul 26 21:22:21 2020 +0200 docs: filesystems: vfs: correct sync_mode flag names Change the nonexistent flag names WBC_SYNC_ALL and WBC_SYNC_NONE to WB_SYNC_ALL and WB_SYNC_NONE, respectively, as used in the code with wbc->sync_mode. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1595791341-13209-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Jonathan Corbet commit 286b7e24ae319163a4f84f3ea30f8e2d99625386 Author: Vegard Nossum Date: Mon Jul 27 14:15:25 2020 +0200 docs: path-lookup: markup fixes for emphasis Underscores were being used for emphasis, but these are rendered verbatim in HTML output. reStructuredText uses asterisks for emphasis. I *think* I caught all of them. Signed-off-by: Vegard Nossum Link: https://lore.kernel.org/r/20200727121525.28103-2-vegard.nossum@oracle.com Signed-off-by: Jonathan Corbet commit 87b92d4b86983cee776c78c1a8a08d863128626a Author: Vegard Nossum Date: Mon Jul 27 14:15:24 2020 +0200 docs: path-lookup: more markup fixes "xxx``at``" makes the `` appear verbatim in the HTML output. I've opted for changing this into ``*at()`` to harmonise this with the use of * seen later in the same document (and add the parentheses to clarify that this is a system/function call). ``path_``* also makes `` appear in the HTML output, but we can fix it by moving the * into the ``. Also add the parantheses here. Signed-off-by: Vegard Nossum Link: https://lore.kernel.org/r/20200727121525.28103-1-vegard.nossum@oracle.com Signed-off-by: Jonathan Corbet commit ad551a21caade79bfebe9f33afa2d975ec9c0387 Author: Vegard Nossum Date: Mon Jul 27 13:45:27 2020 +0200 docs: path-lookup: fix HTML entity mojibake Two cases of "<" somehow turned into "<". I noticed it on . I've verified that the HTML output is correct with this patch. Signed-off-by: Vegard Nossum Link: https://lore.kernel.org/r/20200727114527.23944-1-vegard.nossum@oracle.com Signed-off-by: Jonathan Corbet commit c1b7b8d42b5422627b0a8268416a60748f8d000f Author: 王文虎 Date: Mon Jul 27 21:39:51 2020 +0800 sched: Fix a typo in a comment Change the comment typo: "direcly" -> "directly". Signed-off-by: Wang Wenhu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/AAcAXwBTDSpsKN-5iyIOtaqk.1.1595857191899.Hmail.wenhu.wang@vivo.com commit b9a1b9772509cbc6f6aa8bcd0b019f6347a2b631 Author: Amir Goldstein Date: Wed Jul 22 15:58:48 2020 +0300 fsnotify: create method handle_inode_event() in fsnotify_operations The method handle_event() grew a lot of complexity due to the design of fanotify and merging of ignore masks. Most backends do not care about this complex functionality, so we can hide this complexity from them. Introduce a method handle_inode_event() that serves those backends and passes a single inode mark and less arguments. This change converts all backends except fanotify and inotify to use the simplified handle_inode_event() method. In pricipal, inotify could have also used the new method, but that would require passing more arguments on the simple helper (data, data_type, cookie), so we leave it with the handle_event() method. Link: https://lore.kernel.org/r/20200722125849.17418-9-amir73il@gmail.com Suggested-by: Jan Kara Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 691d976352c73f9b55486092625adbcedd5ca5c5 Author: Amir Goldstein Date: Thu Jul 16 11:42:30 2020 +0300 fanotify: report parent fid + child fid Add support for FAN_REPORT_FID | FAN_REPORT_DIR_FID. Internally, it is implemented as a private case of reporting both parent and child fids and name, the parent and child fids are recorded in a variable length fanotify_name_event, but there is no name. It should be noted that directory modification events are recorded in fixed size fanotify_fid_event when not reporting name, just like with group flags FAN_REPORT_FID. Link: https://lore.kernel.org/r/20200716084230.30611-23-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 7e8283af6edeb7dd9f8f18a429e6738c07f00ce4 Author: Amir Goldstein Date: Thu Jul 16 11:42:29 2020 +0300 fanotify: report parent fid + name + child fid For a group with fanotify_init() flag FAN_REPORT_DFID_NAME, the parent fid and name are reported for events on non-directory objects with an info record of type FAN_EVENT_INFO_TYPE_DFID_NAME. If the group also has the init flag FAN_REPORT_FID, the child fid is also reported with another info record that follows the first info record. The second info record is the same info record that would have been reported to a group with only FAN_REPORT_FID flag. When the child fid needs to be recorded, the variable size struct fanotify_name_event is preallocated with enough space to store the child fh between the dir fh and the name. Link: https://lore.kernel.org/r/20200716084230.30611-22-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 929943b38daf817f2e6d303ea04401651fc3bc05 Author: Amir Goldstein Date: Thu Jul 16 11:42:28 2020 +0300 fanotify: add support for FAN_REPORT_NAME Introduce a new fanotify_init() flag FAN_REPORT_NAME. It requires the flag FAN_REPORT_DIR_FID and there is a constant for setting both flags named FAN_REPORT_DFID_NAME. For a group with flag FAN_REPORT_NAME, the parent fid and name are reported for directory entry modification events (create/detete/move) and for events on non-directory objects. Events on directories themselves are reported with their own fid and "." as the name. The parent fid and name are reported with an info record of type FAN_EVENT_INFO_TYPE_DFID_NAME, similar to the way that parent fid is reported with into type FAN_EVENT_INFO_TYPE_DFID, but with an appended null terminated name string. Link: https://lore.kernel.org/r/20200716084230.30611-21-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 5128063739d293b9faf8ffaa9a5dfd622bc954f5 Author: Amir Goldstein Date: Thu Jul 16 11:42:27 2020 +0300 fanotify: report events with parent dir fid to sb/mount/non-dir marks In a group with flag FAN_REPORT_DIR_FID, when adding an inode mark with FAN_EVENT_ON_CHILD, events on non-directory children are reported with the fid of the parent. When adding a filesystem or mount mark or mark on a non-dir inode, we want to report events that are "possible on child" (e.g. open/close) also with fid of the parent, as if the victim inode's parent is interested in events "on child". Some events, currently only FAN_MOVE_SELF, should be reported to a sb/mount/non-dir mark with parent fid even though they are not reported to a watching parent. To get the desired behavior we set the flag FAN_EVENT_ON_CHILD on all the sb/mount/non-dir mark masks in a group with FAN_REPORT_DIR_FID. Link: https://lore.kernel.org/r/20200716084230.30611-20-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 83b7a59896dd24015a34b7f00027f0ff3747972f Author: Amir Goldstein Date: Thu Jul 16 11:42:26 2020 +0300 fanotify: add basic support for FAN_REPORT_DIR_FID For now, the flag is mutually exclusive with FAN_REPORT_FID. Events include a single info record of type FAN_EVENT_INFO_TYPE_DFID with a directory file handle. For now, events are only reported for: - Directory modification events - Events on children of a watching directory - Events on directory objects Soon, we will add support for reporting the parent directory fid for events on non-directories with filesystem/mount mark and support for reporting both parent directory fid and child fid. Link: https://lore.kernel.org/r/20200716084230.30611-19-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 79cb299c7e181fad683bf6191edb8224b2412512 Author: Amir Goldstein Date: Thu Jul 16 11:42:24 2020 +0300 fsnotify: remove check that source dentry is positive Remove the unneeded check for positive source dentry in fsnotify_move(). fsnotify_move() hook is mostly called from vfs_rename() under lock_rename() and vfs_rename() starts with may_delete() test that verifies positive source dentry. The only other caller of fsnotify_move() - debugfs_rename() also verifies positive source. Link: https://lore.kernel.org/r/20200716084230.30611-17-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 9b93f33105f5f9bd3d016ff870eb6000c9d89eff Author: Amir Goldstein Date: Thu Jul 16 11:42:23 2020 +0300 fsnotify: send event with parent/name info to sb/mount/non-dir marks Similar to events "on child" to watching directory, send event with parent/name info if sb/mount/non-dir marks are interested in parent/name info. The FS_EVENT_ON_CHILD flag can be set on sb/mount/non-dir marks to specify interest in parent/name info for events on non-directory inodes. Events on "orphan" children (disconnected dentries) are sent without parent/name info. Events on directories are sent with parent/name info only if the parent directory is watching. After this change, even groups that do not subscribe to events on children could get an event with mark iterator type TYPE_CHILD and without mark iterator type TYPE_INODE if fanotify has marks on the same objects. dnotify and inotify event handlers can already cope with that situation. audit does not subscribe to events that are possible on child, so won't get to this situation. nfsd does not access the marks iterator from its event handler at the moment, so it is not affected. This is a bit too fragile, so we should prepare all groups to cope with mark type TYPE_CHILD preferably using a generic helper. Link: https://lore.kernel.org/r/20200716084230.30611-16-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 7dbe6080167860df0bf8627e55fd5154f366cc7a Author: Amir Goldstein Date: Wed Jul 22 15:58:43 2020 +0300 audit: do not set FS_EVENT_ON_CHILD in audit marks mask The audit group marks mask does not contain any events possible on a child so setting the flag FS_EVENT_ON_CHILD in the mask is counter productive. It may lead to the undesired outcome of setting the dentry flag DCACHE_FSNOTIFY_PARENT_WATCHED on a directory inode even though it is not watching children, because the audit mark contribute the flag FS_EVENT_ON_CHILD to the inode's fsnotify_mask and another mark could be contributing an event that is possible on child to the inode's mask. Furthermore in the following patches we want to use FS_EVENT_ON_CHILD for non-dir inodes for other purposes so stop using the flag. Link: https://lore.kernel.org/r/20200722125849.17418-4-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 957f7b472c6b6de4214bf5144b811ab83a9b9465 Author: Amir Goldstein Date: Wed Jul 22 15:58:42 2020 +0300 inotify: do not set FS_EVENT_ON_CHILD in non-dir mark mask FS_EVENT_ON_CHILD has currently no meaning for non-dir inode marks. In the following patches we want to use that bit to mean that mark's notification group cares about parent and name information. So stop setting FS_EVENT_ON_CHILD for non-dir marks. Link: https://lore.kernel.org/r/20200722125849.17418-3-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 40a100d3adc1ad7f0a34875468c499fcecd20ba4 Author: Amir Goldstein Date: Wed Jul 22 15:58:46 2020 +0300 fsnotify: pass dir and inode arguments to fsnotify() The arguments of fsnotify() are overloaded and mean different things for different event types. Replace the to_tell argument with separate arguments @dir and @inode, because we may be sending to both dir and child. Using the @data argument to pass the child is not enough, because dirent events pass this argument (for audit), but we do not report to child. Document the new fsnotify() function argumenets. Link: https://lore.kernel.org/r/20200722125849.17418-7-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 82ace1efb3cb1d49a1681cc6e31156047d5ae1f2 Author: Amir Goldstein Date: Wed Jul 22 15:58:44 2020 +0300 fsnotify: create helper fsnotify_inode() Simple helper to consolidate biolerplate code. Link: https://lore.kernel.org/r/20200722125849.17418-5-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit fb820b494acb70e3a20e50935118239c7e5c94dd Author: Saravana Kannan Date: Fri Jul 24 16:44:15 2020 -0700 of: property: Add device link support for pinctrl-0 through pinctrl-8 Add support for pinctrl-0 through pinctrl-8 explicitly instead of trying to add support for pinctrl-%d properties. Of all the pinctrl-* properties in dts files (20322), only 47% (9531) are pinctrl-%d properties. Of all the pinctrl-%d properties, 99.5% (9486) are made up of pinctrl-[0-2]. 'pinctrl-8' is the current maximum found in dts files. Trying to parse all pinctrl-* properties and checking for pinctrl-%d is unnecessarily complicated. So, just add support for pinctrl-[0-8] for now. In the unlikely event we ever exceed pinctrl-8, we can come back and improve this. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200724234415.1651639-2-saravanak@google.com Signed-off-by: Rob Herring commit 53e6a671f70abc2c30fa94ae33c0f1c2fe24985e Author: Saravana Kannan Date: Fri Jul 24 16:44:14 2020 -0700 of: property: Add device link support for multiple DT bindings Add support for creating device links out of the following DT bindings: - interrupts-extended - nvmem-cells - phys - wakeup-parent Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200724234415.1651639-1-saravanak@google.com Signed-off-by: Rob Herring commit 015156e689aa1f0c836f9ef4d342b6f6897afd74 Author: Sai Prakash Ranjan Date: Tue Jun 9 19:00:29 2020 +0530 arm64: dts: qcom: sc7180: Add iommus property to ETR Define iommus property for Coresight ETR component in SC7180 SoC with the SID and mask to enable SMMU translation for this master. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/2312c9a10e7251d69e31e4f51c0f1d70e6f2f2f5.1591708204.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 072ce1722684f3da8e16bc1ee6471a2a8affb9bd Author: Sai Prakash Ranjan Date: Tue Jun 9 19:00:28 2020 +0530 arm64: dts: qcom: sc7180: Add support to skip powering up of ETM Add "qcom,skip-power-up" property to skip powering up ETM on SC7180 SoC to workaround a hardware errata where CPU watchdog counter is stopped when ETM power up bit is set (i.e., when TRCPDCR.PU = 1). Reviewed-by: Mathieu Poirier Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/8c5ff297d8c89d9d451352f189baf26c8938842a.1591708204.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 3db0d0c276a752af39beb5ca7424cb659aa005bb Author: Colin Ian King Date: Wed Jul 1 14:46:34 2020 +0100 integrity: remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Fixes: eb5798f2e28f ("integrity: convert digsig to akcipher api") Signed-off-by: Colin Ian King Acked-by: James Morris Addresses-Coverity: ("Unused value") Signed-off-by: Mimi Zohar commit be45eac21294845ca56694377fe20b36f119718f Author: Ravi Kumar Bokka Date: Fri Jul 10 07:35:20 2020 -0700 arm64: dts: qcom: sc7180: Add properties to qfprom for fuse blowing This patch adds properties to the qfprom node to enable fuse blowing. Signed-off-by: Ravi Kumar Bokka Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200710073439.v5.4.I70c17309f8b433e900656d7c53a2e6b61888bb68@changeid Signed-off-by: Bjorn Andersson commit 9a97c9d2af5ca798377342debf7f0f44281d050e Author: Quentin Monnet Date: Fri Jul 24 10:06:18 2020 +0100 tools, bpftool: Add LSM type to array of prog names Assign "lsm" as a printed name for BPF_PROG_TYPE_LSM in bpftool, so that it can use it when listing programs loaded on the system or when probing features. Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200724090618.16378-3-quentin@isovalent.com commit 70cfab1d871c771bd1963dd898f4f9b2731590c2 Author: Quentin Monnet Date: Fri Jul 24 10:06:17 2020 +0100 tools, bpftool: Skip type probe if name is not found For probing program and map types, bpftool loops on type values and uses the relevant type name in prog_type_name[] or map_type_name[]. To ensure the name exists, we exit from the loop if we go over the size of the array. However, this is not enough in the case where the arrays have "holes" in them, program or map types for which they have no name, but not at the end of the list. This is currently the case for BPF_PROG_TYPE_LSM, not known to bpftool and which name is a null string. When probing for features, bpftool attempts to strlen() that name and segfaults. Let's fix it by skipping probes for "unknown" program and map types, with an informational message giving the numeral value in that case. Fixes: 93a3545d812a ("tools/bpftool: Add name mappings for SK_LOOKUP prog and attach type") Reported-by: Paul Chaignon Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200724090618.16378-2-quentin@isovalent.com commit 42a2df3e829f3c5562090391b33714b2e2e5ad4a Author: Dan Carpenter Date: Thu Jul 23 18:23:05 2020 +0300 Smack: prevent underflow in smk_set_cipso() We have an upper bound on "maplevel" but forgot to check for negative values. Fixes: e114e473771c ("Smack: Simplified Mandatory Access Control Kernel") Signed-off-by: Dan Carpenter Signed-off-by: Casey Schaufler commit a6bd4f6d9b07452b0b19842044a6c3ea384b0b88 Author: Dan Carpenter Date: Thu Jul 23 18:22:19 2020 +0300 Smack: fix another vsscanf out of bounds This is similar to commit 84e99e58e8d1 ("Smack: slab-out-of-bounds in vsscanf") where we added a bounds check on "rule". Reported-by: syzbot+a22c6092d003d6fe1122@syzkaller.appspotmail.com Fixes: f7112e6c9abf ("Smack: allow for significantly longer Smack labels v4") Signed-off-by: Dan Carpenter Signed-off-by: Casey Schaufler commit 8682dc1245099cccd7e75f72ffb911341bf45ba7 Author: Wolfram Sang Date: Wed Jul 1 10:23:18 2020 +0200 i2c: core: do not use logical device when creating irq domain Let's rather use its physical parent device to give proper namings and connections in debugfs. Signed-off-by: Wolfram Sang Reviewed-by: Benjamin Tissoires Signed-off-by: Wolfram Sang commit 5e619d73e6797ed9f2554a1bf996d52d8c91ca50 Author: Gustavo A. R. Silva Date: Mon Jul 27 12:55:26 2020 -0500 net/mlx4: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit a02d26fe48f580ba1e9f88ad6f22aae9a6eca0db Merge: 3540669761b8a 360d749e0c8e6 Author: David S. Miller Date: Mon Jul 27 13:11:57 2020 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2020-07-27 This series contains updates to igc driver only. Sasha cleans up double definitions, unneeded and non applicable registers, and removes unused fields in structs. Ensures the Receive Descriptor Minimum Threshold Count is cleared and fixes a static checker error. v2: Remove fields from hw_stats in patches that removed their uses. Reworded patch descriptions for patches 1, 2, and 4. ==================== Signed-off-by: David S. Miller commit 175233f92e80d09f78be51e5b9abf5ca1fc9dc26 Author: Li Heng Date: Thu Jul 23 11:27:42 2020 +0800 drm: Remove redundant NULL check Fix below warnings reported by coccicheck: ./drivers/gpu/drm/drm_drv.c:819:2-7: WARNING: NULL check before some freeing functions is not needed. Fixes: 5dad34f3c444 ("drm: Cleanups after drmm_add_final_kfree rollout") Signed-off-by: Li Heng Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1595474863-33112-1-git-send-email-liheng40@huawei.com commit 3540669761b8a26cd5a4ffb9b6c737bc8b941f00 Author: Colin Ian King Date: Mon Jul 27 15:17:12 2020 +0100 qed: fix assignment of n_rq_elems to incorrect params field Currently n_rq_elems is being assigned to params.elem_size instead of the field params.num_elems. Coverity is detecting this as a double assingment to params.elem_size and reporting this as an usused value on the first assignment. Fix this. Addresses-Coverity: ("Unused value") Fixes: b6db3f71c976 ("qed: simplify chain allocation with init params struct") Signed-off-by: Colin Ian King Acked-by: Alexander Lobakin Signed-off-by: David S. Miller commit ccd59dce1a21f473518bf273bdf5b182bab955b3 Author: Liu Yi L Date: Sun Jul 12 04:20:56 2020 -0700 vfio/type1: Refactor vfio_iommu_type1_ioctl() This patch refactors the vfio_iommu_type1_ioctl() to use switch instead of if-else, and each command got a helper function. Cc: Kevin Tian CC: Jacob Pan Cc: Alex Williamson Cc: Eric Auger Cc: Jean-Philippe Brucker Cc: Joerg Roedel Cc: Lu Baolu Reviewed-by: Eric Auger Suggested-by: Christoph Hellwig Signed-off-by: Liu Yi L Signed-off-by: Alex Williamson commit 50173329c8cc0c892eaa7a9d0f0692ac39cd7b04 Author: Giovanni Cabiddu Date: Mon Jul 27 13:43:40 2020 -0600 vfio/pci: Add QAT devices to denylist The current generation of Intel® QuickAssist Technology devices are not designed to run in an untrusted environment because of the following issues reported in the document "Intel® QuickAssist Technology (Intel® QAT) Software for Linux" (document number 336211-014): QATE-39220 - GEN - Intel® QAT API submissions with bad addresses that trigger DMA to invalid or unmapped addresses can cause a platform hang QATE-7495 - GEN - An incorrectly formatted request to Intel® QAT can hang the entire Intel® QAT Endpoint The document is downloadable from https://01.org/intel-quickassist-technology at the following link: https://01.org/sites/default/files/downloads/336211-014-qatforlinux-releasenotes-hwv1.7_0.pdf This patch adds the following QAT devices to the denylist: DH895XCC, C3XXX and C62X. Signed-off-by: Giovanni Cabiddu Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Alex Williamson commit 1f97970e6c8e60349b045599f4525608db895009 Author: Giovanni Cabiddu Date: Mon Jul 27 13:43:40 2020 -0600 vfio/pci: Add device denylist Add denylist of devices that by default are not probed by vfio-pci. Devices in this list may be susceptible to untrusted application, even if the IOMMU is enabled. To be accessed via vfio-pci, the user has to explicitly disable the denylist. The denylist can be disabled via the module parameter disable_denylist. Signed-off-by: Giovanni Cabiddu Reviewed-by: Cornelia Huck Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Alex Williamson commit 8b7beaf9f185249f29912b5e2d7bc4147c5c2a6a Author: Giovanni Cabiddu Date: Mon Jul 27 13:43:39 2020 -0600 PCI: Add Intel QuickAssist device IDs Add device IDs for the following Intel QuickAssist devices: DH895XCC, C3XXX and C62X. The defines in this patch are going to be referenced in two independent drivers, qat and vfio-pci. Signed-off-by: Giovanni Cabiddu Acked-by: Bjorn Helgaas Reviewed-by: Fiona Trahe Reviewed-by: Andy Shevchenko Signed-off-by: Alex Williamson commit 924b51abf961f1d888143fcfa3d63c92dc517679 Author: Alex Williamson Date: Mon Jul 27 13:43:38 2020 -0600 vfio/pci: Hold igate across releasing eventfd contexts No need to release and immediately re-acquire igate while clearing out the eventfd ctxs. Reviewed-by: Cornelia Huck Signed-off-by: Alex Williamson commit 9d532f286914add61e02312881733a90355f153c Author: John Hubbard Date: Mon Jul 27 13:43:38 2020 -0600 vfio/spapr_tce: convert get_user_pages() --> pin_user_pages() This code was using get_user_pages*(), in a "Case 2" scenario (DMA/RDMA), using the categorization from [1]. That means that it's time to convert the get_user_pages*() + put_page() calls to pin_user_pages*() + unpin_user_pages() calls. There is some helpful background in [2]: basically, this is a small part of fixing a long-standing disconnect between pinning pages, and file systems' use of those pages. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Cc: Alex Williamson Cc: Cornelia Huck Cc: kvm@vger.kernel.org Signed-off-by: John Hubbard Signed-off-by: Alex Williamson commit e1907d6752a26ccfcda1573b5a7542b056553046 Author: Xiang Zheng Date: Mon Jul 27 13:43:37 2020 -0600 vfio/type1: Add conditional rescheduling after iommu map failed Commit c5e6688752c2 ("vfio/type1: Add conditional rescheduling") missed a "cond_resched()" in vfio_iommu_map if iommu map failed. This is a very tiny optimization and the case can hardly happen. Signed-off-by: Xiang Zheng Signed-off-by: Alex Williamson commit bf3551e150e5a231ac60f2bd750f63ab5484010a Author: Alex Williamson Date: Mon Jul 27 13:43:37 2020 -0600 vfio/pci: Add Intel X550 to hidden INTx devices Intel document 333717-008, "Intel® Ethernet Controller X550 Specification Update", version 2.7, dated June 2020, includes errata #22, added in version 2.1, May 2016, indicating X550 NICs suffer from the same implementation deficiency as the 700-series NICs: "The Interrupt Status bit in the Status register of the PCIe configuration space is not implemented and is not set as described in the PCIe specification." Without the interrupt status bit, vfio-pci cannot determine when these devices signal INTx. They are therefore added to the nointx quirk. Cc: Jesse Brandeburg Signed-off-by: Alex Williamson commit 26afdd98821bd36e4e1de88dd00a8c70d83accdf Author: Alex Williamson Date: Mon Jul 27 13:43:36 2020 -0600 vfio: Cleanup allowed driver naming No functional change, avoid non-inclusive naming schemes. Signed-off-by: Alex Williamson commit 86f968a09810b5eb72a88bebac3ff4e0a6154ca5 Merge: 65ccbbda52288 1c74884387e5b Author: David S. Miller Date: Mon Jul 27 12:26:56 2020 -0700 Merge branch 'sfc-driver-for-EF100-family-NICs-part-1' Edward Cree says: ==================== sfc: driver for EF100 family NICs, part 1 EF100 is a new NIC architecture under development at Xilinx, based partly on existing Solarflare technology. As many of the hardware interfaces resemble EF10, support is implemented within the 'sfc' driver, which previous patch series "commonised" for this purpose. In order to maintain bisectability while splitting into patches of a reasonable size, I had to do a certain amount of back-and-forth with stubs for things that the common code may try to call, mainly because we can't do them until we've set up MCDI, but we can't set up MCDI without probing the event queues, at which point a lot of the common machinery becomes reachable from event handlers. Consequently, this first series doesn't get as far as actually sending and receiving packets. I have a second series ready to follow it which implements the datapath (and a few other things like ethtool). Changes from v4: * Fix build on CONFIG_RETPOLINE=n by using plain prototypes instead of INDIRECT_CALLABLE_DECLARE. Changes from v3: * combine both drivers (sfc_ef100 and sfc) into a single module, to make non-modular builds work. Patch #4 now adds a few indirections to support this; the ones in the RX and TX path use indirect-call- wrappers to minimise the performance impact. Changes from v2: * remove MODULE_VERSION. * call efx_destroy_reset_workqueue() from ef100_exit_module(). * correct uint32_ts to u32s. While I was at it, I fixed a bunch of other style issues in the function-control-window code. All in patch #4. Changes from v1: * kernel test robot spotted a link error when sfc_ef100 was built without mdio. It turns out the thing we were trying to link to was a bogus thing to do on anything but Falcon, so new patch #1 removes it from this driver. * fix undeclared symbols in patch #4 by shuffling around prototypes and #includes and adding 'static' where appropriate. * fix uninitialised variable 'rc2' in patch #7. ==================== Signed-off-by: David S. Miller commit 1c74884387e5b6d599316eff7d51d484b3f6dcca Author: Edward Cree Date: Mon Jul 27 13:05:48 2020 +0100 sfc_ef100: implement ndo_get_phys_port_{id,name} Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 29ec1b27e73990cf32aedd9208aa6eff2d4a1e5e Author: Edward Cree Date: Mon Jul 27 13:05:31 2020 +0100 sfc_ef100: read device MAC address at probe time Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 99a23c1168b7a6b8d1d1b228788b32749b06cbfe Author: Edward Cree Date: Mon Jul 27 13:05:08 2020 +0100 sfc_ef100: probe the PHY and configure the MAC Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 4e5675bbabd69f1f30feef56f670527f3330b6df Author: Edward Cree Date: Mon Jul 27 13:04:57 2020 +0100 sfc_ef100: actually perform resets In ef100_reset(), make the MCDI call to do the reset. Also, do a reset at start-of-day during probe, to put the function in a clean state. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit d802b0ae652fb8aa917205c3ad29998e0e097b61 Author: Edward Cree Date: Mon Jul 27 12:59:18 2020 +0100 sfc_ef100: extend ef100_check_caps to cover datapath_caps3 MC_CMD_GET_CAPABILITIES now has a third word of flags; extend the efx_has_cap() machinery to cover it. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit f65731207d99c0858e38563a17b480adbd45e4a2 Author: Edward Cree Date: Mon Jul 27 12:58:26 2020 +0100 sfc_ef100: read datapath caps, implement check_caps Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 5e4ef67346ee8f64b3cac4cbc1c866fd8f18dcd7 Author: Edward Cree Date: Mon Jul 27 12:58:02 2020 +0100 sfc_ef100: process events for MCDI completions Currently RX and TX-completion events are unhandled, as neither the RX nor the TX path has been implemented yet. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 965b549f3c20dba97c206937f163379ee44c9c04 Author: Edward Cree Date: Mon Jul 27 12:57:34 2020 +0100 sfc_ef100: implement ndo_open/close and EVQ probing Channels are probed, but actual event handling is still stubbed out. Stub implementation of check_caps is needed because ptp.c will call into it from efx_ptp_use_mac_tx_timestamps() to decide if it wants TXQs. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 2200e6d92e05ed00adda1a58bc438dbfc5a7b8e2 Author: Edward Cree Date: Mon Jul 27 12:57:09 2020 +0100 sfc_ef100: implement MCDI transport Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 35a36af88f65c2ea0558a2456ccb42fc99c5229f Author: Edward Cree Date: Mon Jul 27 12:56:40 2020 +0100 sfc_ef100: don't call efx_reset_down()/up() on EF100 We handle everything ourselves in ef100_reset(), rather than relying on the generic down/up routines. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit aa86a75fed03bca1372cbaf0c3587f6707453a52 Author: Edward Cree Date: Mon Jul 27 12:56:26 2020 +0100 sfc_ef100: PHY probe stub We can't actually do the MCDI to probe it fully until we have working MCDI, which comes later, but we need efx->phy_data to be allocated so that when we get MCDI events the link-state change handler doesn't NULL-dereference. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit c027f2a72a3149a28387a67a58a6cfc585bbcd53 Author: Edward Cree Date: Mon Jul 27 12:56:11 2020 +0100 sfc_ef100: reset-handling stub We don't actually do the efx_mcdi_reset() because we don't have MCDI yet. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 51b35a454efdcd86f578e61ec8bf7596299c5f80 Author: Edward Cree Date: Mon Jul 27 12:55:55 2020 +0100 sfc: skeleton EF100 PF driver No TX or RX path, no MCDI, not even an ifup/down handler. Besides stubs, the bulk of the patch deals with reading the Xilinx extended PCIe capability, which tells us where to find our BAR. Though in the same module, EF100 has its own struct pci_driver, which is named sfc_ef100. A small number of additional nic_type methods are added; those in the TX (tx_enqueue) and RX (rx_packet) paths are called through indirect call wrappers to minimise the performance impact. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 61060c5dc5c5734942528f31c094606539fffb8b Author: Edward Cree Date: Mon Jul 27 12:55:41 2020 +0100 sfc_ef100: register accesses on EF100 EF100 adds a few new valid addresses for efx_writed_page(), as well as a Function Control Window in the BAR whose location is variable. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit adf72ee3f741d4188d1d731b878601ca11fbda5a Author: Edward Cree Date: Mon Jul 27 12:55:28 2020 +0100 sfc_ef100: add EF100 register definitions Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 0ccf267e3477157a91766ca5175b5624936e7491 Author: Edward Cree Date: Mon Jul 27 12:54:55 2020 +0100 sfc: remove efx_ethtool_nway_reset() An MDIO-based n-way restart does not make sense for any of the NICs supported by this driver, nor for the coming EF100. Unlike on Falcon (which was already split off into a separate driver), the PHY on all of Siena, EF10 and EF100 is managed by MC firmware. While Siena can talk to the PHY over MDIO, doing so for anything other than debugging purposes (mdio_mii_ioctl) is likely to confuse the firmware. (According to the SFC firmware team, this support was originally added to the Siena driver early in the development of that product, before it was decided to have firmware manage the PHY.) Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 497b0c5a7c0688c1b100a9c2e267337f677c198e Author: Amir Goldstein Date: Thu Jul 16 11:42:22 2020 +0300 fsnotify: send event to parent and child with single callback Instead of calling fsnotify() twice, once with parent inode and once with child inode, if event should be sent to parent inode, send it with both parent and child inodes marks in object type iterator and call the backend handle_event() callback only once. The parent inode is assigned to the standard "inode" iterator type and the child inode is assigned to the special "child" iterator type. In that case, the bit FS_EVENT_ON_CHILD will be set in the event mask, the dir argument to handle_event will be the parent inode, the file_name argument to handle_event is non NULL and refers to the name of the child and the child inode can be accessed with fsnotify_data_inode(). This will allow fanotify to make decisions based on child or parent's ignored mask. For example, when a parent is interested in a specific event on its children, but a specific child wishes to ignore this event, the event will not be reported. This is not what happens with current code, but according to man page, it is the expected behavior. Link: https://lore.kernel.org/r/20200716084230.30611-15-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit c8f3446c66d810e21af61cf889e7b0e3bc921b9d Author: Amir Goldstein Date: Thu Jul 16 11:42:20 2020 +0300 inotify: report both events on parent and child with single callback fsnotify usually calls inotify_handle_event() once for watching parent to report event with child's name and once for watching child to report event without child's name. Do the same thing with a single callback instead of two callbacks when marks iterator contains both inode and child entries. Link: https://lore.kernel.org/r/20200716084230.30611-13-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 62cb0af4cea871e80015dd45b200033002f23a95 Author: Amir Goldstein Date: Thu Jul 16 11:42:19 2020 +0300 dnotify: report both events on parent and child with single callback For some events (e.g. DN_ATTRIB on sub-directory) fsnotify may call dnotify_handle_event() once for watching parent and once again for the watching sub-directory. Do the same thing with a single callback instead of two callbacks when marks iterator contains both inode and child entries. Link: https://lore.kernel.org/r/20200716084230.30611-12-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit f35c41567867e06bb0a1d6b74c5bf323be1026e5 Author: Amir Goldstein Date: Thu Jul 16 11:42:18 2020 +0300 fanotify: no external fh buffer in fanotify_name_event The fanotify_fh struct has an inline buffer of size 12 which is enough to store the most common local filesystem file handles (e.g. ext4, xfs). For file handles that do not fit in the inline buffer (e.g. btrfs), an external buffer is allocated to store the file handle. When allocating a variable size fanotify_name_event, there is no point in allocating also an external fh buffer when file handle does not fit in the inline buffer. Check required size for encoding fh, preallocate an event buffer sufficient to contain both file handle and name and store the name after the file handle. At this time, when not reporting name in event, we still allocate the fixed size fanotify_fid_event and an external buffer for large file handles, but fanotify_alloc_name_event() has already been prepared to accept a NULL file_name. Link: https://lore.kernel.org/r/20200716084230.30611-11-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit f454fa610a69b93e7ed4de739e736f988d95c2d2 Author: Amir Goldstein Date: Thu Jul 16 11:42:17 2020 +0300 fanotify: use struct fanotify_info to parcel the variable size buffer An fanotify event name is always recorded relative to a dir fh. Encapsulate the name_len member of fanotify_name_event in a new struct fanotify_info, which describes the parceling of the variable size buffer of an fanotify_name_event. The dir_fh member of fanotify_name_event is renamed to _dir_fh and is not accessed directly, but via the fanotify_info_dir_fh() accessor. Although the dir_fh len information is already available in struct fanotify_fh, we store it also in dif_fh_totlen member of fanotify_info, including the size of fanotify_fh header, so we know the offset of the name in the buffer without looking inside the dir_fh. We also add a file_fh_totlen member to allow packing another file handle in the variable size buffer after the dir_fh and before the name. We are going to use that space to store the child fid. Link: https://lore.kernel.org/r/20200716084230.30611-10-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 6ba8d7107f27c1bde60a80bc5def027979af3e8e Author: Amir Goldstein Date: Thu Jul 16 11:42:16 2020 +0300 fsnotify: add object type "child" to object type iterator The object type iterator is used to collect all the marks of a specific group that have interest in an event. It is used by fanotify to get a single handle_event callback when an event has a match to either of inode/sb/mount marks of the group. The nature of fsnotify events is that they are associated with at most one sb at most one mount and at most one inode. When a parent and child are both watching, two events are sent to backend, one associated to parent inode and one associated to the child inode. This results in duplicate events in fanotify, which usually get merged before user reads them, but this is sub-optimal. It would be better if the same event is sent to backend with an object type iterator that has both the child inode and its parent, and let the backend decide if the event should be reported once (fanotify) or twice (inotify). Link: https://lore.kernel.org/r/20200716084230.30611-9-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 85af5d9258cc5862167c578c63c65ac700a3fa19 Author: Amir Goldstein Date: Thu Jul 16 11:42:15 2020 +0300 fanotify: use FAN_EVENT_ON_CHILD as implicit flag on sb/mount/non-dir marks Up to now, fanotify allowed to set the FAN_EVENT_ON_CHILD flag on sb/mount marks and non-directory inode mask, but the flag was ignored. Mask out the flag if it is provided by user on sb/mount/non-dir marks and define it as an implicit flag that cannot be removed by user. This flag is going to be used internally to request for events with parent and name info. Link: https://lore.kernel.org/r/20200716084230.30611-8-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 4ed6814a91cc71202e3de12cd1cb7cc59f3cee57 Author: Amir Goldstein Date: Thu Jul 16 11:42:14 2020 +0300 fanotify: prepare for implicit event flags in mark mask So far, all flags that can be set in an fanotify mark mask can be set explicitly by a call to fanotify_mark(2). Prepare for defining implicit event flags that cannot be set by user with fanotify_mark(2), similar to how inotify/dnotify implicitly set the FS_EVENT_ON_CHILD flag. Implicit event flags cannot be removed by user and mark gets destroyed when only implicit event flags remain in the mask. Link: https://lore.kernel.org/r/20200716084230.30611-7-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 3ef866536645ce1b4f0516e8723d803d0fa6ca26 Author: Amir Goldstein Date: Thu Jul 16 11:42:13 2020 +0300 fanotify: mask out special event flags from ignored mask The special event flags (FAN_ONDIR, FAN_EVENT_ON_CHILD) never had any meaning in ignored mask. Mask them out explicitly. Link: https://lore.kernel.org/r/20200716084230.30611-6-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit d809daf1b6add51eec001bf60b17885d697a299d Author: Amir Goldstein Date: Thu Jul 16 11:42:12 2020 +0300 fanotify: generalize test for FAN_REPORT_FID As preparation for new flags that report fids, define a bit set of flags for a group reporting fids, currently containing the only bit FAN_REPORT_FID. Link: https://lore.kernel.org/r/20200716084230.30611-5-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 6ad1aadd970460d81d5e803ac38c0f63f85c0a00 Author: Amir Goldstein Date: Thu Jul 16 11:42:11 2020 +0300 fanotify: distinguish between fid encode error and null fid In fanotify_encode_fh(), both cases of NULL inode and failure to encode ended up with fh type FILEID_INVALID. Distiguish the case of NULL inode, by setting fh type to FILEID_ROOT. This is just a semantic difference at this point. Remove stale comment and unneeded check from fid event compare helpers. Link: https://lore.kernel.org/r/20200716084230.30611-4-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 103ff6a554923e0da54e0a28a686c91facf5bffd Author: Amir Goldstein Date: Thu Jul 16 11:42:10 2020 +0300 fanotify: generalize merge logic of events on dir An event on directory should never be merged with an event on non-directory regardless of the event struct type. This change has no visible effect, because currently, with struct fanotify_path_event, the relevant events will not be merged because event path of dir will be different than event path of non-dir. Link: https://lore.kernel.org/r/20200716084230.30611-3-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 0badfa029e5fd6d5462adb767937319335637c83 Author: Amir Goldstein Date: Thu Jul 16 11:42:09 2020 +0300 fanotify: generalize the handling of extra event flags In fanotify_group_event_mask() there is logic in place to make sure we are not going to handle an event with no type and just FAN_ONDIR flag. Generalize this logic to any FANOTIFY_EVENT_FLAGS. There is only one more flag in this group at the moment - FAN_EVENT_ON_CHILD. We never report it to user, but we do pass it in to fanotify_alloc_event() when group is reporting fid as indication that event happened on child. We will have use for this indication later on. Link: https://lore.kernel.org/r/20200716084230.30611-2-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 08b95c338e0c5a96e47f4ca314ea1e7580ecb5d7 Author: Amir Goldstein Date: Wed Jul 8 14:11:52 2020 +0300 fanotify: remove event FAN_DIR_MODIFY It was never enabled in uapi and its functionality is about to be superseded by events FAN_CREATE, FAN_DELETE, FAN_MOVE with group flag FAN_REPORT_NAME. Keep a place holder variable name_event instead of removing the name recording code since it will be used by the new events. Link: https://lore.kernel.org/r/20200708111156.24659-17-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 65ccbbda52288527b7c48087eb33bb0757975875 Merge: 1775da47c34a5 795ec4f572509 Author: David S. Miller Date: Mon Jul 27 12:20:40 2020 -0700 Merge branch 'Add-PRP-driver' Murali Karicheri says: ==================== Add PRP driver This series is dependent on the following patches sent out to netdev list. All (1-3) are already merged to net/master as of sending this, but not on the net-next master branch. So need to apply them to net-next before applying this series. v3 of the iproute2 patches can be merged to work with this series as there are no updates since then. [1] https://marc.info/?l=linux-netdev&m=159526378131542&w=2 [2] https://marc.info/?l=linux-netdev&m=159499772225350&w=2 [3] https://marc.info/?l=linux-netdev&m=159499772425352&w=2 This series adds support for Parallel Redundancy Protocol (PRP) in the Linux HSR driver as defined in IEC-62439-3. PRP Uses a Redundancy Control Trailer (RCT) the format of which is similar to HSR Tag. This is used for implementing redundancy. RCT consists of 6 bytes similar to HSR tag and contain following fields:- - 16-bit sequence number (SeqNr); - 4-bit LAN identifier (LanId); - 12 bit frame size (LSDUsize); - 16-bit suffix (PRPsuffix). The PRPsuffix identifies PRP frames and distinguishes PRP frames from other protocols that also append a trailer to their useful data. The LSDUsize field allows the receiver to distinguish PRP frames from random, nonredundant frames as an additional check. LSDUsize is the size of the Ethernet payload inclusive of the RCT. Sequence number along with LanId is used for duplicate detection and discard. PRP node is also known as Dual Attached Node (DAN-P) since it is typically attached to two different LAN for redundancy. DAN-P duplicates each of L2 frames and send it over the two Ethernet links. Each outgoing frame is appended with RCT. Unlike HSR, these are added to the end of L2 frame and will be treated as pad by bridges and therefore would be work with traditional bridges or switches, where as HSR wouldn't as Tag is prefixed to the Ethenet frame. At the remote end, these are received and the duplicate frame is discarded before the stripped frame is send up the networking stack. Like HSR, PRP also sends periodic Supervision frames to the network. These frames are received and MAC address from the SV frames are populated in a database called Node Table. The above functions are grouped into a block called Link Redundancy Entity (LRE) in the IEC spec. As there are many similarities between HSR and PRP protocols, this patch re-uses the code from HSR driver to implement PRP driver. As per feedback from the RFC series, the implementation uses the existing HSR Netlink socket interface to create the PRP interface by adding a new proto parameter to the ip link command to identify the PRP protocol. iproute2 is enhanced to implement this new parameter. The hsr_netlink.c is enhanced to handle the new proto parameter. As suggested during the RFC review, the driver introduced a proto_ops structure to hold protocol specfic functions to handle HSR and PRP specific function pointers and use them in the code based on the protocol to handle protocol specific part differently in the driver. Please review this and provide me feedback so that I can work to incorporate them and spin the next version if needed. The patch was tested using two TI AM57x IDK boards for PRP which are connected back to back over two CPSW Ethernet ports. PRP Test setup --------------- --------eth0 eth0 -------- |AM572x|----------------------|AM572x| | |----------------------| | --------eth1 eth1 -------- To build, enable CONFIG_HSR=y or m make omap2plus_defconfig make zImage; make modules; make dtbs Copy the zImage and dtb files to the file system on SD card and power on the AM572x boards. This can be tested on any platforms with 2 Ethernet interfaces. So will appreciate if you can give it a try and provide your Tested-by. Command to create PRP interface ------------------------------- ifconfig eth0 0.0.0.0 down ifconfig eth1 0.0.0.0 down ifconfig eth0 hw ether 70:FF:76:1C:0E:8C ifconfig eth1 hw ether 70:FF:76:1C:0E:8C ifconfig eth0 up ifconfig eth1 up ip link add name prp0 type hsr slave1 eth0 slave2 eth1 supervision 45 proto 1 ifconfig prp0 192.168.2.10 ifconfig eth0 0.0.0.0 down ifconfig eth1 0.0.0.0 down ifconfig eth0 hw ether 70:FF:76:1C:0E:8D ifconfig eth1 hw ether 70:FF:76:1C:0E:8D ifconfig eth0 up ifconfig eth1 up ip link add name prp0 type hsr slave1 eth0 slave2 eth1 supervision 45 proto 1 ifconfig prp0 192.168.2.20 command to show node table ---------------------------- Ping the peer board after the prp0 interface is up. The remote node (DAN-P) will be shown in the node table as below. root@am57xx-evm:~# cat /sys/kernel/debug/hsr/prp0/node_table Node Table entries for (PRP) device MAC-Address-A, MAC-Address-B, time_in[A], time_in[B], Address-B port, SAN-A, SAN-B, DAN-P 70:ff:76:1c:0e:8c 00:00:00:00:00:00 ffffe83f, ffffe83f, 0, 0, 0, 1 Try to capture the raw PRP frames at the eth0 interface as tcpdump -i eth0 -xxx Sample Supervision frames and ARP frames shown below. ================================================================================== Successive Supervision frames captured with tcpdump (with RCT at the end): 03:43:29.500999 70:ff:76:1c:0e:8d (oui Unknown) > 01:15:4e:00:01:2d (oui Unknown), ethertype Unknown (0x88f 0x0000: 0115 4e00 012d 70ff 761c 0e8d 88fb 0001 0x0010: 7e0a 1406 70ff 761c 0e8d 0000 0000 0000 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000 0x0030: 0000 0000 0000 0000 0000 0000 fc2b a034 0x0040: 88fb 03:43:31.581025 70:ff:76:1c:0e:8d (oui Unknown) > 01:15:4e:00:01:2d (oui Unknown), ethertype Unknown (0x88f 0x0000: 0115 4e00 012d 70ff 761c 0e8d 88fb 0001 0x0010: 7e0b 1406 70ff 761c 0e8d 0000 0000 0000 0x0020: 0000 0000 0000 0000 0000 0000 0000 0000 0x0030: 0000 0000 0000 0000 0000 0000 fc2c a034 0x0040: 88fb ICMP Echo request frame with RCT 03:43:33.805354 IP 192.168.2.20 > 192.168.2.10: ICMP echo request, id 63748, seq 1, length 64 0x0000: 70ff 761c 0e8c 70ff 761c 0e8d 0800 4500 0x0010: 0054 26a4 4000 4001 8e96 c0a8 0214 c0a8 0x0020: 020a 0800 c28e f904 0001 202e 1c3d 0000 0x0030: 0000 0000 0000 0000 0000 0000 0000 0000 0x0040: 0000 0000 0000 0000 0000 0000 0000 0000 0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 0x0060: 0000 fc31 a05a 88fb ================================================================================== The iperf3 traffic test logs can be accessed at the links below. DUT-1: https://pastebin.ubuntu.com/p/8SkQzWJMn8/ DUT-2: https://pastebin.ubuntu.com/p/j2BZvvs7p4/ Other tests done. - Connect a SAN (eth0 and eth1 without prp interface) and do ping test from eth0 (192.168.2.40) to prp0 (192.168.2.10) verify the SAN node shows at the correct link A and B as shown in the node table dump - Regress HSR interface using 3 nodes connected in a ring topology. create hsr link version 0. Do iperf3 test between all nodes create hsr link version 1. Do iperf3 test between all nodes. --------eth0 eth1 --------eth0 eth1-------| |AM572x|----------------------|AM572x|--------------|AM572x| | | | | ------| | --------eth1---| ------- | eth0 ------- |------------------------------- command used for HSR interface HSR V0 ifconfig eth0 0.0.0.0 down ifconfig eth1 0.0.0.0 down ifconfig eth0 hw ether 70:FF:76:1C:0E:8C ifconfig eth1 hw ether 70:FF:76:1C:0E:8C ifconfig eth0 up ifconfig eth1 up ip link add name hsr0 type hsr slave1 eth0 slave2 eth1 supervision 45 version 0 ifconfig hsr0 192.168.2.10 HSR V1 ifconfig eth0 0.0.0.0 down ifconfig eth1 0.0.0.0 down ifconfig eth0 hw ether 70:FF:76:1C:0E:8C ifconfig eth1 hw ether 70:FF:76:1C:0E:8C ifconfig eth0 up ifconfig eth1 up ip link add name hsr0 type hsr slave1 eth0 slave2 eth1 supervision 45 version 1 ifconfig hsr0 192.168.2.10 Logs at DUT-1 : https://pastebin.ubuntu.com/p/6PSJbZwQ6y/ DUT-2 : https://pastebin.ubuntu.com/p/T8TqJsPRHc/ DUT-3 : https://pastebin.ubuntu.com/p/VNzpv6HzKj/ - Build tests :- Build with CONFIG_HSR=m allmodconfig build build with CONFIG_HSR=y and rebuild with sparse checker make C=1 zImage; make modules Version history: v5 : Fixed comments about Kconfig changes on Patch 1/7 against v4 Rebased to netnext/master branch. v4 : fixed following vs v3 reverse xmas tree for local variables check for return type in call to skb_put_padto() v3 : Separated bug fixes from this series and send them for immediate merge But for that this is same as v2. v2 : updated comments on RFC. Following are the main changes:- - Removed the hsr_prp prefix - Added PRP information in header files to indicate the support for PRP explicitely - Re-use netlink socket interface with an added parameter proto for identifying PRP. - Use function pointers using a proto_ops struct to do things differently for PRP vs HSR. RFC: initial version posted and discussed at https://www.spinics.net/lists/netdev/msg656229.html ==================== Signed-off-by: David S. Miller commit 795ec4f572509979442b9f2d269487dd58e3595c Author: Murali Karicheri Date: Wed Jul 22 10:40:22 2020 -0400 net: prp: enhance debugfs to display PRP info Print PRP specific information from node table as part of debugfs node table display. Also display the node as DAN-H or DAN-P depending on the info from node table. Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller commit 451d8123f89791bb628277c0bdb4cae34a3563e6 Author: Murali Karicheri Date: Wed Jul 22 10:40:21 2020 -0400 net: prp: add packet handling support DAN-P (Dual Attached Nodes PRP) nodes are expected to receive traditional IP packets as well as PRP (Parallel Redundancy Protocol) tagged (trailer) packets. PRP trailer is 6 bytes of PRP protocol unit called RCT, Redundancy Control Trailer (RCT) similar to HSR tag. PRP network can have traditional devices such as bridges/switches or PC attached to it and should be able to communicate. Regular Ethernet devices treat the RCT as pads. This patch adds logic to format L2 frames from network stack to add a trailer (RCT) and send it as duplicates over the slave interfaces when the protocol is PRP as per IEC 62439-3. At the ingress, it strips the trailer, do duplicate detection and rejection and forward a stripped frame up the network stack. PRP device should accept frames from Singly Attached Nodes (SAN) and thus the driver mark the link where the frame came from in the node table. Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller commit fa4dc89531360de760359bf94086b04dada98d4e Author: Murali Karicheri Date: Wed Jul 22 10:40:20 2020 -0400 net: hsr: define and use proto_ops ptrs to handle hsr specific frames As a preparatory patch to introduce PRP, refactor the code specific to handling HSR frames into separate functions and call them through proto_ops function pointers. Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller commit c643ff0383c858b9af09f582ed2947810e4cf407 Author: Murali Karicheri Date: Wed Jul 22 10:40:19 2020 -0400 net: prp: add supervision frame generation utility function Add support for generation of PRP supervision frames. For PRP, supervision frame format is similar to HSR version 0, but have a PRP Redundancy Control Trailer (RCT) added and uses a different message type, PRP_TLV_LIFE_CHECK_DD. Also update is_supervision_frame() to include the new message type used for PRP supervision frame. Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller commit 28e458e097f32af4f89f02e078a6d6b4ea7a52ed Author: Murali Karicheri Date: Wed Jul 22 10:40:18 2020 -0400 net: hsr: introduce protocol specific function pointers As a preparatory patch to introduce support for PRP protocol, add a protocol ops ptr in the private hsr structure to hold function pointers as some of the functions at protocol level packet handling is different for HSR vs PRP. It is expected that PRP will add its of set of functions for protocol handling. Modify existing hsr_announce() function to call proto_ops->send_sv_frame() to send supervision frame for HSR. This is expected to be different for PRP. So introduce a ops function ptr, send_sv_frame() for the same and initialize it to send_hsr_supervsion_frame(). Modify hsr_announce() to call proto_ops->send_sv_frame(). Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller commit 121c33b07b3127f501b366bc23d2a590e2f2b8ef Author: Murali Karicheri Date: Wed Jul 22 10:40:17 2020 -0400 net: hsr: introduce common code for skb initialization As a preparatory patch to introduce PRP protocol support in the driver, refactor the skb init code to a separate function. Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller commit 8f4c0e01789c18674acdf17cae3822b3dc3db715 Author: Murali Karicheri Date: Wed Jul 22 10:40:16 2020 -0400 hsr: enhance netlink socket interface to support PRP Parallel Redundancy Protocol (PRP) is another redundancy protocol introduced by IEC 63439 standard. It is similar to HSR in many aspects:- - Use a pair of Ethernet interfaces to created the PRP device - Use a 6 byte redundancy protocol part (RCT, Redundancy Check Trailer) similar to HSR Tag. - Has Link Redundancy Entity (LRE) that works with RCT to implement redundancy. Key difference is that the protocol unit is a trailer instead of a prefix as in HSR. That makes it inter-operable with tradition network components such as bridges/switches which treat it as pad bytes, whereas HSR nodes requires some kind of translators (Called redbox) to talk to regular network devices. This features allows regular linux box to be converted to a DAN-P box. DAN-P stands for Dual Attached Node - PRP similar to DAN-H (Dual Attached Node - HSR). Add a comment at the header/source code to explicitly state that the driver files also handles PRP protocol as well. Signed-off-by: Murali Karicheri Signed-off-by: David S. Miller commit 1775da47c34a520108bea02dd4cbc21ee2e1b6c2 Author: Alexander Lobakin Date: Mon Jul 27 14:51:33 2020 +0300 qed: fix the allocation of the chains with an external PBL Dan reports static checker warning: "The patch 9b6ee3cf95d3: "qed: sanitize PBL chains allocation" from Jul 23, 2020, leads to the following static checker warning: drivers/net/ethernet/qlogic/qed/qed_chain.c:299 qed_chain_alloc_pbl() error: uninitialized symbol 'pbl_virt'. drivers/net/ethernet/qlogic/qed/qed_chain.c 249 static int qed_chain_alloc_pbl(struct qed_dev *cdev, struct qed_chain *chain) 250 { 251 struct device *dev = &cdev->pdev->dev; 252 struct addr_tbl_entry *addr_tbl; 253 dma_addr_t phys, pbl_phys; 254 __le64 *pbl_virt; ^^^^^^^^^^^^^^^^ [...] 271 if (chain->b_external_pbl) 272 goto alloc_pages; ^^^^^^^^^^^^^^^^ uninitialized [...] 298 /* Fill the PBL table with the physical address of the page */ 299 pbl_virt[i] = cpu_to_le64(phys); ^^^^^^^^^^^ [...] " This issue was introduced with commit c3a321b06a80 ("qed: simplify initialization of the chains with an external PBL"), when chain->pbl_sp.table_virt initialization was moved up to qed_chain_init_params(). Fix it by initializing pbl_virt with an already filled chain struct field. Fixes: c3a321b06a80 ("qed: simplify initialization of the chains with an external PBL") Reported-by: Dan Carpenter Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit f1bb924e8f5b50752a80fa5b48c43003680a7b64 Author: Christian Hewitt Date: Tue Jul 21 01:59:50 2020 +0000 arm64: dts: meson: fix mmc0 tuning error on Khadas VIM3 Similar to other G12B devices using the W400 dtsi, I see reports of mmc0 tuning errors on VIM3 after a few hours uptime: [12483.917391] mmc0: tuning execution failed: -5 [30535.551221] mmc0: tuning execution failed: -5 [35359.953671] mmc0: tuning execution failed: -5 [35561.875332] mmc0: tuning execution failed: -5 [61733.348709] mmc0: tuning execution failed: -5 I do not see the same on VIM3L, so remove sd-uhs-sdr50 from the common dtsi to silence the error, then (re)add it to the VIM3L dts. Fixes: 4f26cc1c96c9 ("arm64: dts: khadas-vim3: move common nodes into meson-khadas-vim3.dtsi") Fixes: 700ab8d83927 ("arm64: dts: khadas-vim3: add support for the SM1 based VIM3L") Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200721015950.11816-1-christianshewitt@gmail.com commit 2fa17dd09533d5d83201be3229a28c1010a8ea3e Author: Christian Hewitt Date: Tue Jul 21 01:39:52 2020 +0000 arm64: dts: meson: misc fixups for w400 dtsi Current devices using the W400 dtsi show mmc tuning errors: [12483.917391] mmc0: tuning execution failed: -5 [30535.551221] mmc0: tuning execution failed: -5 [35359.953671] mmc0: tuning execution failed: -5 [35561.875332] mmc0: tuning execution failed: -5 [61733.348709] mmc0: tuning execution failed: -5 Removing "sd-uhs-sdr50" from the SDIO node prevents this. We also add keep-power-in-suspend to the SDIO node and fix an indentation. Fixes: 3cb74db9b256 ("arm64: dts: meson: convert ugoos-am6 to common w400 dtsi") Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200721013952.11635-1-christianshewitt@gmail.com commit 43e7a0e5adacf1c31cf1dc63fe32b2665a6ebffd Merge: 350e7ab92da84 b5d600b027eb2 Author: David S. Miller Date: Mon Jul 27 11:47:33 2020 -0700 Merge branch 'bnxt_en-update' Michael Chan says: ==================== bnxt_en update. This patchset removes the PCIe histogram and other debug register data from ethtool -S. The removed data are not counters and they have very large and constantly fluctuating values that are not suitable for the ethtool -S decimal counter display. The rest of the patches implement counter rollover for all hardware counters that are not 64-bit counters. Different generations of hardware have different counter widths. The driver will now query the counter widths of all counters from firmware and implement rollover support on all non-64-bit counters. The last patch adds the PCIe histogram and other PCIe register data back using the ethtool -d interface. v2: Fix bnxt_re RDMA driver compile issue. ==================== Signed-off-by: David S. Miller commit b5d600b027eb2733a1d7d253b84efb96c40f6a9d Author: Vasundhara Volam Date: Mon Jul 27 05:40:45 2020 -0400 bnxt_en: Add support for 'ethtool -d' Add support to dump PXP registers and PCIe statistics. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit a0c30621c28c6d8e9c572cd6139881f15c806792 Author: Michael Chan Date: Mon Jul 27 05:40:44 2020 -0400 bnxt_en: Switch over to use the 64-bit software accumulated counters. Now we can report all the full 64-bit CPU endian software accumulated counters instead of the hw counters, some of which may be less than 64-bit wide. Define the necessary macros to access the software counters. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit fea6b3335527f41bc729466fb2a95e48a98827ac Author: Michael Chan Date: Mon Jul 27 05:40:43 2020 -0400 bnxt_en: Accumulate all counters. Now that we have the infrastructure in place, add the new function bnxt_accumulate_all_stats() to periodically accumulate and check for counter rollover of all ring stats and port stats. A chip bug was also discovered that could cause some ring counters to become 0 during DMA. Workaround by ignoring zeros on the affected chips. Some older frimware will reset port counters during ifdown. We need to check for that and free the accumulated port counters during ifdown to prevent bogus counter overflow detection during ifup. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 531d1d269c1d432d691026c82d04b7bb5f1ae318 Author: Michael Chan Date: Mon Jul 27 05:40:42 2020 -0400 bnxt_en: Retrieve hardware masks for port counters. If supported by newer firmware, make the firmware call to query all the port counter masks. If not supported, assume 40-bit port counter masks. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d752d0536c979068084e0c60ff506c07e1cf613e Author: Michael Chan Date: Mon Jul 27 05:40:41 2020 -0400 bnxt_en: Retrieve hardware counter masks from firmware if available. Newer firmware has a new call HWRM_FUNC_QSTATS_EXT to retrieve the masks of all ring counters. Make this call when supported to initialize the hardware masks of all ring counters. If the call is not available, assume 48-bit ring counter masks on P5 chips. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit a37120b22e540b4eb068addf9be3f63b64dca690 Author: Michael Chan Date: Mon Jul 27 05:40:40 2020 -0400 bnxt_en: Allocate additional memory for all statistics blocks. Some of these DMAed hardware counters are not full 64-bit counters and so we need to accumulate them as they overflow. Allocate copies of these DMA statistics memory blocks with the same size for accumulation. The hardware counter widths are also counter specific so we allocate memory for masks that correspond to each counter. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 177a6cde47fcf23e5826c6224fc53038480451c2 Author: Michael Chan Date: Mon Jul 27 05:40:39 2020 -0400 bnxt_en: Refactor statistics code and structures. The driver manages multiple statistics structures of different sizes. They are all allocated, freed, and handled practically the same. Define a new bnxt_stats_mem structure and common allocation and free functions for all staistics memory blocks. Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 24c93443fe21ca3ec87b7b121548daa3b57a34af Author: Michael Chan Date: Mon Jul 27 05:40:38 2020 -0400 bnxt_en: Use macros to define port statistics size and offset. The port statistics structures have hard coded padding and offset. Define macros to make this look cleaner. Reviewed-by: Pavan Chebbi Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit bfc6e5fbcbbf75967a7f673ad67fa227d77f2541 Author: Michael Chan Date: Mon Jul 27 05:40:37 2020 -0400 bnxt_en: Update firmware interface to 1.10.1.54. Main changes are 200G support and fixing the definitions of discard and error counters to match the hardware definitions. Because the HWRM_PORT_PHY_QCFG message size has now exceeded the max. encapsulated response message size of 96 bytes from the PF to the VF, we now need to cap this message to 96 bytes for forwarding. The forwarded response only needs to contain the basic link status and speed information and can be capped without adding the new information. v2: Fix bnxt_re compile error. Cc: Selvin Xavier Reviewed-by: Vasundhara Volam Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit dfe64de974f8c8391776a376cc01c582064e8a46 Author: Vasundhara Volam Date: Mon Jul 27 05:40:36 2020 -0400 bnxt_en: Remove PCIe non-counters from ethtool statistics Remove PCIe non-counters display from ethtool statistics, as they are not simple counters but register dump. The next few patches will add logic to detect counter roll-over and it won't work with these PCIe non-counters. There will be a follow up patch to get PCIe information via ethtool register dump. Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 350e7ab92da8420fe97e1edf040db8c9bab750f8 Author: Martin Varghese Date: Mon Jul 27 13:09:19 2020 +0530 net: Removed the device type check to add mpls support for devices MPLS has no dependency with the device type of underlying devices. Hence the device type check to add mpls support for devices can be avoided. Signed-off-by: Martin Varghese Signed-off-by: David S. Miller commit 73cb11933c414b744193d9de660010082bc0a944 Author: Ido Schimmel Date: Mon Jul 27 10:18:34 2020 +0300 ipmr: Copy option to correct variable Cited commit mistakenly copied provided option to 'val' instead of to 'mfc': ``` - if (copy_from_user(&mfc, optval, sizeof(mfc))) { + if (copy_from_sockptr(&val, optval, sizeof(val))) { ``` Fix this by copying the option to 'mfc'. selftest router_multicast.sh before: $ ./router_multicast.sh smcroutectl: Unknown or malformed IPC message 'a' from client. smcroutectl: failed removing multicast route, does not exist. TEST: mcast IPv4 [FAIL] Multicast not received on first host TEST: mcast IPv6 [ OK ] smcroutectl: Unknown or malformed IPC message 'a' from client. smcroutectl: failed removing multicast route, does not exist. TEST: RPF IPv4 [FAIL] Multicast not received on first host TEST: RPF IPv6 [ OK ] selftest router_multicast.sh after: $ ./router_multicast.sh TEST: mcast IPv4 [ OK ] TEST: mcast IPv6 [ OK ] TEST: RPF IPv4 [ OK ] TEST: RPF IPv6 [ OK ] Fixes: 01ccb5b48f08 ("net/ipv4: switch ip_mroute_setsockopt to sockptr_t") Signed-off-by: Ido Schimmel Reviewed-by: Christoph Hellwig Signed-off-by: David S. Miller commit 6414e9b09ffd197803f8e86ce2fafdaf1de4e8e4 Author: Eric Biggers Date: Sun Jul 12 20:09:52 2020 -0700 fs: define inode flags using bit numbers Define the VFS inode flags using bit numbers instead of hardcoding powers of 2, which has become unwieldy now that we're up to 65536. No change in the actual values. Signed-off-by: Eric Biggers Signed-off-by: Al Viro commit bb1a773d5b6bf018bf84fdb3fbba01d3ef54e2c9 Author: Al Viro Date: Fri May 22 20:02:02 2020 -0400 kill unused dump_fpu() instances dump_fpu() is used only on the architectures that support elf and have neither CORE_DUMP_USE_REGSET nor ELF_CORE_COPY_FPREGS defined. Currently that's csky, m68k, microblaze, nds32 and unicore32. The rest of the instances are dead code. NB: THIS MUST GO AFTER ELF_FDPIC CONVERSION Signed-off-by: Al Viro commit 5d2c56ec0e5f68ef907a85ebd8028a5ce1114351 Merge: ce327e1c54119 1697a322e28ba Author: Al Viro Date: Mon Jul 27 14:32:44 2020 -0400 Merge branch 'work.fdpic' into regset.followup commit ce327e1c54119179066d6f3573a28001febc9265 Author: Al Viro Date: Wed Jun 17 13:40:03 2020 -0400 regset: kill user_regset_copyout{,_zero}() no callers left Signed-off-by: Al Viro commit c522401e0656b51e6a65ec112489cb078801aa9c Author: Al Viro Date: Wed Jun 17 09:57:08 2020 -0400 regset(): kill ->get_size() not used anymore Signed-off-by: Al Viro commit 1e6986c9db21265bac1435a344b4446c51a3f4d8 Author: Al Viro Date: Tue Jun 16 15:34:20 2020 -0400 regset: kill ->get() no instances left Signed-off-by: Al Viro commit dcad7854fcce6a2d49b6a3ead5bbefeff047e559 Author: Al Viro Date: Tue Jun 16 15:28:29 2020 -0400 csky: switch to ->regset_get() NB: WTF is fpregs_get() playing at??? Signed-off-by: Al Viro commit a6ea5b458815405e06df32a55aae7d2fa2f98c76 Author: Al Viro Date: Tue Jun 16 14:43:54 2020 -0400 xtensa: switch to ->regset_get() Signed-off-by: Al Viro commit bd0409a856bf62d7eeb3807dba534abde067143d Author: Al Viro Date: Tue Jun 16 14:40:05 2020 -0400 parisc: switch to ->regset_get() Signed-off-by: Al Viro commit 1b5b456e39a0c9271575746197dd463be27463f6 Author: Al Viro Date: Tue Jun 16 14:30:59 2020 -0400 nds32: switch to ->regset_get() Signed-off-by: Al Viro commit 6bda7688878b3e7bc328ae26e7df4f4298c63dc9 Author: Al Viro Date: Tue Jun 16 14:28:44 2020 -0400 nios2: switch to ->regset_get() Signed-off-by: Al Viro commit 8320514c91beaef4aa9994a638ff90d7d3a279d6 Author: Al Viro Date: Tue Jun 16 14:21:50 2020 -0400 hexagon: switch to ->regset_get() Signed-off-by: Al Viro commit 4e5e7ea48e817a6bc8156ed78f819fc70eb6eca2 Author: Al Viro Date: Tue Jun 16 14:13:39 2020 -0400 h8300: switch to ->regset_get() Signed-off-by: Al Viro commit f04b2b7cde01cecad58e1792ea5ae8576c1e8bee Author: Al Viro Date: Tue Jun 16 14:09:18 2020 -0400 openrisc: switch to ->regset_get() Signed-off-by: Al Viro commit 2cb6cd495d1780eb257e1626f82d4557c4b88ed5 Author: Al Viro Date: Tue Jun 16 14:04:53 2020 -0400 riscv: switch to ->regset_get() Note: riscv_fpr_get() used to forget to zero-pad at the end. Not worth -stable... Signed-off-by: Al Viro commit c7a0faa21e7e795778a978e8f894d3ae0fce60cf Author: Al Viro Date: Tue Jun 16 11:36:14 2020 -0400 c6x: switch to ->regset_get() Signed-off-by: Al Viro commit 4ff8a356daafaafbf90141ee7a3b8fdc18e560a8 Author: Al Viro Date: Tue Jun 16 11:20:51 2020 -0400 ia64: switch to ->regset_get() Signed-off-by: Al Viro commit 5a806e0a1c4d7c1800453686efafa4410cc137cf Author: Al Viro Date: Tue Jun 16 02:01:10 2020 -0400 arc: switch to ->regset_get() NB: it used to do short store; fix is needed earlier in the series. Signed-off-by: Al Viro commit 3598e9f09608608eea425bf228b98345967dc028 Author: Al Viro Date: Tue Jun 16 01:10:27 2020 -0400 arm: switch to ->regset_get() Signed-off-by: Al Viro commit 3399d90ce63edf7439900db50b5c02aa822f190b Author: Al Viro Date: Tue Jun 16 00:54:51 2020 -0400 sh: convert to ->regset_get() NB: there's a direct call of fpregs_get() left in dump_fpu(). To be taken out once we convert ELF_FDPIC to use of regset. Signed-off-by: Al Viro commit 759de58f28b1cd90a485d3bf1ce49236a153ce51 Author: Al Viro Date: Wed May 27 19:09:44 2020 -0400 arm64: switch to ->regset_get() Signed-off-by: Al Viro commit a0faf966a44134b56eee732d25717fad2993b0bc Author: Al Viro Date: Fri May 22 17:06:56 2020 -0400 mips: switch to ->regset_get() Signed-off-by: Al Viro commit 4d617aaae4e81067777c95978e1bce4f8363d06a Author: Al Viro Date: Sat Feb 22 00:19:46 2020 -0500 sparc: switch to ->regset_get() Signed-off-by: Al Viro commit b69c6320528a7def8b696fc4383b505588440787 Author: Al Viro Date: Mon May 11 18:35:55 2020 -0400 s390: switch to ->regset_get() NB: compat NT_S390_LAST_BREAK might be better as compat_long_t rather than long. User-visible ABI, again... Signed-off-by: Al Viro commit 47e12855a91d2a9ca18d8fe10382e5a8d87b1417 Author: Al Viro Date: Sat Feb 22 11:01:44 2020 -0500 powerpc: switch to ->regset_get() Note: compat variant of REGSET_TM_CGPR is almost certainly wrong; it claims to be 48*64bit, but just as compat REGSET_GPR it stores 44*32bit of (truncated) registers + 4 32bit zeros... followed by 48 more 32bit zeroes. Might be too late to change - it's a userland ABI, after all ;-/ Signed-off-by: Al Viro commit 0557d64d983e3dedead2d4b4e8abc49620d5f5d2 Author: Al Viro Date: Tue Feb 18 12:14:34 2020 -0500 x86: switch to ->regset_get() All instances of ->get() in arch/x86 switched; that might or might not be worth splitting up. Notes: * for xstateregs_get() the amount we want to store is determined at the boot time; see init_xstate_size() and update_regset_xstate_info() for details. task->thread.fpu.state.xsave ends with a flexible array member and the amount of data in it depends upon the FPU features supported/enabled. * fpregs_get() writes slightly less than full ->thread.fpu.state.fsave (the last word is not copied); we pass the full size of state.fsave and let membuf_write() trim to the amount declared by regset - __regset_get() will make sure that the space in buffer is no more than that. * copy_xstate_to_user() and its helpers are gone now. * fpregs_soft_get() was getting user_regset_copyout() arguments wrong. Since "x86: x86 user_regset math_emu" back in 2008... I really doubt that it's worth splitting out for -stable, though - you need a 486SX box for that to trigger... [Kevin's braino fix for copy_xstate_to_kernel() essentially duplicated here] Signed-off-by: Al Viro commit 7717cb9bdd0421faa432a4e0d499fdba6e2394c8 Author: Al Viro Date: Thu Feb 20 20:48:16 2020 -0500 regset: new method and helpers for it ->regset_get() takes task+regset+buffer, returns the amount of free space left in the buffer on success and -E... on error. buffer is represented as struct membuf - a pair of (kernel) pointer and amount of space left Primitives for writing to such: * membuf_write(buf, data, size) * membuf_zero(buf, size) * membuf_store(buf, value) These are implemented as inlines (in case of membuf_store - a macro). All writes are sequential; they become no-ops when there's no space left. Return value of all primitives is the amount of space left after the operation, so they can be used as return values of ->regset_get(). Example of use: // stores pt_regs of task + 64 bytes worth of zeroes + 32bit PID of task int foo_get(struct task_struct *task, const struct regset *regset, struct membuf to) { membuf_write(&to, task_pt_regs(task), sizeof(struct pt_regs)); membuf_zero(&to, 64); return membuf_store(&to, (u32)task_tgid_vnr(task)); } regset_get()/regset_get_alloc() taught to use that thing if present. By the end of the series all users of ->get() will be converted; then ->get() and ->get_size() can go. Note that unlike ->get() this thing always starts at offset 0 and, since it only writes to kernel buffer, can't fail on copyout. It can, of course, fail for other reasons, but those tend to be less numerous. The caller guarantees that the buffer size won't be bigger than regset->n * regset->size. That simplifies life for quite a few instances. Signed-off-by: Al Viro commit dc12d7968f9c9540494deb1285854b18ca4465ec Author: Al Viro Date: Mon Feb 17 12:25:14 2020 -0500 copy_regset_to_user(): do all copyout at once. Turn copy_regset_to_user() into regset_get_alloc() + copy_to_user(). Now all ->get() calls have a kernel buffer as destination. Note that we'd already eliminated the callers of copy_regset_to_user() with non-zero offset; now that argument is simply unused. Uninlined, while we are at it. Signed-off-by: Al Viro commit 1e56f6d28954248f01849c359b1b7210bb6c1add Merge: b4e9c9549f623 4dfa103e82aef e3fdfa37a3fab b7e46c527d226 d547175b54fa8 Author: Al Viro Date: Mon Jul 27 14:30:51 2020 -0400 Merge branches 'regset.x86', 'regset.ia64', 'regset.sparc' and 'regset.arm64' into work.regset commit 1697a322e28ba96d35953c5d824540d172546d36 Author: Al Viro Date: Mon Jun 15 11:22:55 2020 -0400 [elf-fdpic] switch coredump to regsets similar to how elf coredump is working on architectures that have regsets, and all architectures with elf-fdpic support *do* have that. Signed-off-by: Al Viro commit d2f581684a292ece5c10cd56ad51bf4f702b7beb Author: Al Viro Date: Mon Jun 15 11:03:28 2020 -0400 [elf-fdpic] use elf_dump_thread_status() for the dumper thread as well the only reason to have it open-coded for the first (dumper) thread is that coredump has a couple of process-wide notes stuck right after the first (NT_PRSTATUS) note of the first thread. But we don't need to make the data collection side irregular for the first thread to handle that - it's only the logics ordering the calls of writenote() that needs to take care of that. Signed-off-by: Al Viro commit 38a62779ae8e7a3b5fcf0ed3ee0bd6620809891c Author: Al Viro Date: Mon Jun 15 10:41:08 2020 -0400 [elf-fdpic] move allocation of elf_thread_status into elf_dump_thread_status() Signed-off-by: Al Viro commit 5074c7f69f9e86a8f83955bc9ca4f2634261917e Author: Al Viro Date: Mon Jun 15 10:19:31 2020 -0400 [elf-fdpic] coredump: don't bother with cyclic list for per-thread objects plain single-linked list is just fine here... Signed-off-by: Al Viro commit 7a896028adcfbff4552e6748e8fc8d06036c132c Author: Al Viro Date: Sat Jun 13 00:23:31 2020 -0400 kill elf_fpxregs_t all uses are conditional upon ELF_CORE_COPY_XFPREGS, which has not been defined on any architecture since 2010 Signed-off-by: Al Viro commit 16aead81018ca404efe9bd928786824e7168151f Author: Al Viro Date: Sun Jun 14 09:52:06 2020 -0400 take fdpic-related parts of elf_prstatus out The only architecture where we might end up using both is arm, and there we definitely don't want fdpic-related fields in elf_prstatus - coredump layout of ELF binaries should not depend upon having the kernel built with the support of ELF_FDPIC ones. Just move the fdpic-modified variant into binfmt_elf_fdpic.c (and call it elf_prstatus_fdpic there) [name stolen from nico] Signed-off-by: Al Viro commit 1e6b57d6421f0343dd11619612e5ff8930cddf38 Author: Al Viro Date: Thu Jun 11 11:11:32 2020 -0400 unexport linux/elfcore.h It's unusable from userland - it uses elf_gregset_t, which is not provided by exported headers. glibc has it in sys/procfs.h, but the same file defines struct elf_prstatus, so linux/elfcore.h can't be included once sys/procfs.h has been pulled. Same goes for uclibc and dietlibc simply doesn't have elf_gregset_t defined anywhere. IOW, no userland source is including that thing. Signed-off-by: Al Viro commit b4e9c9549f62329d2412f899635fddc5212b9cd4 Author: Al Viro Date: Mon Jun 1 19:42:40 2020 -0400 introduction of regset ->get() wrappers, switching ELF coredumps to those Two new helpers: given a process and regset, dump into a buffer. regset_get() takes a buffer and size, regset_get_alloc() takes size and allocates a buffer. Return value in both cases is the amount of data actually dumped in case of success or -E... on error. In both cases the size is capped by regset->n * regset->size, so ->get() is called with offset 0 and size no more than what regset expects. binfmt_elf.c callers of ->get() are switched to using those; the other caller (copy_regset_to_user()) will need some preparations to switch. Signed-off-by: Al Viro commit a4e3ee7d20efba343e5846c8b0b17cc778c30c65 Merge: d21a06d5d8268 72b7f6c48708e Author: David S. Miller Date: Mon Jul 27 10:30:01 2020 -0700 Merge branch 'net-smc-show-unique-rsn-code-for-exceeded-max-dmb-count' Karsten Graul says: ==================== net/smc: show unique rsn code for exceeded max dmb count Resolve some confusion at the user side when the reason code shows out-of-memory but actually there is enough memory left. ==================== Signed-off-by: David S. Miller commit 72b7f6c48708e4524765a2f1316063207d8e0cd5 Author: Karsten Graul Date: Sun Jul 26 20:34:28 2020 +0200 net/smc: unique reason code for exceeded max dmb count When the maximum dmb buffer limit for an ism device is reached no more dmb buffers can be registered. When this happens the reason code is set to SMC_CLC_DECL_MEM indicating out-of-memory. This is the same reason code that is used when no memory could be allocated for the new dmb buffer. This is confusing for users when they see this error but there is more memory available. To solve this set a separate new reason code when the maximum dmb limit exceeded. Reviewed-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 211e5b7a0007e6a172eafdb89c512768f82d73bf Author: Karsten Graul Date: Sun Jul 26 20:34:27 2020 +0200 s390/ism: indicate correct error reason in ism_alloc_dmb() When the ism driver allocates a new dmb in ism_alloc_dmb() it must first check for and reserve a slot in the sba bitmap. When find_next_zero_bit() finds no free slot then the return code is -ENOMEM. This code conflicts with the error when the alloc() fails later in the code. As a result of that the caller can not differentiate between out-of-memory conditions and sba-bitmap-full conditions. Fix that by using the return code -ENOSPC when the sba slot reservation failed. Reviewed-by: Ursula Braun Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit d21a06d5d8268fb2d5e542c9e189db0556fc534c Author: Julia Lawall Date: Sun Jul 26 12:58:27 2020 +0200 sfc: drop unnecessary list_empty list_for_each_safe is able to handle an empty list. The only effect of avoiding the loop is not initializing the index variable. Drop list_empty tests in cases where these variables are not used. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) @@ expression x,e; iterator name list_for_each_safe; statement S; identifier i,j; @@ -if (!(list_empty(x))) { list_for_each_safe(i,j,x) S - } ... when != i when != j ( i = e; | ? j = e; ) Signed-off-by: Julia Lawall Acked-by: Edward Cree Signed-off-by: David S. Miller commit 2e5a8e1527a8cea26c973ee4aa1840ceb674101e Author: Xu Wang Date: Mon Jul 27 02:52:08 2020 +0000 ALSA: usb-audio: endpoint : remove needless check before usb_free_coherent() usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20200727025208.8739-1-vulab@iscas.ac.cn Signed-off-by: Takashi Iwai commit b54cecf5e2293d15620f7b3f8d1bf486243d5643 Author: Amir Goldstein Date: Sun Jun 7 12:10:40 2020 +0300 fsnotify: pass dir argument to handle_event() callback The 'inode' argument to handle_event(), sometimes referred to as 'to_tell' is somewhat obsolete. It is a remnant from the times when a group could only have an inode mark associated with an event. We now pass an iter_info array to the callback, with all marks associated with an event. Most backends ignore this argument, with two exceptions: 1. dnotify uses it for sanity check that event is on directory 2. fanotify uses it to report fid of directory on directory entry modification events Remove the 'inode' argument and add a 'dir' argument. The callback function signature is deliberately changed, because the meaning of the argument has changed and the arguments have been documented. The 'dir' argument is set to when 'file_name' is specified and it is referring to the directory that the 'file_name' entry belongs to. Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 880253eacd304dad1143aeaed0a6f7bd389a783a Author: Satya Tangirala Date: Fri Jul 24 18:45:00 2020 +0000 fscrypt: document inline encryption support Update the fscrypt documentation file for inline encryption support. Signed-off-by: Satya Tangirala Reviewed-by: Eric Biggers Reviewed-by: Jaegeuk Kim Link: https://lore.kernel.org/r/20200724184501.1651378-7-satyat@google.com Signed-off-by: Eric Biggers commit c2fa6cf76d204e296e2e295d821500e0b291697d Author: Rob Herring Date: Fri Jul 24 16:42:04 2020 -0600 PCI: dwc: hisi: Remove non-ECAM HiSilicon hip05/hip06 driver The HiSilicon non-ECAM PCIe has been broken since March 2016 commit 7e57fd1444bf ("PCI: designware: Move Root Complex setup code to dw_pcie_setup_rc()"). The reason is this commit moved the iATU setup code from dw_pcie_host_init() to dw_pcie_setup_rc(), but the hisi driver never calls dw_pcie_setup_rc(). The result is the PCI memory space is never configured and the driver can't work. It's also clear it has an iATU as the config space accesses use it. There's also no dts file using either "hisilicon,hip05-pcie" or "hisilicon,hip06-pcie". Link: https://lore.kernel.org/r/20200724224204.3249055-1-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Zhou Wang Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 360d749e0c8e689414d9a583102a59f795a6892d Author: Sasha Neftin Date: Thu Jul 9 10:34:16 2020 +0300 igc: Fix static checker warning drivers/net/ethernet/intel/igc/igc_mac.c:424 igc_check_for_copper_link() error: uninitialized symbol 'link'. This patch come to fix this warning and initialize the 'link' symbol. Reported-by: Dan Carpenter Fixes: 707abf069548 ("igc: Add initial LTR support") Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit db02bee2ec1d74eb4b0ab48b3f995673d6faa3c6 Author: Sasha Neftin Date: Sun Jul 26 13:52:18 2020 -0700 igc: Clean up the hw_stats structure Remove ictxptc, ictxatc, cbtmpc, cbrdpc, cbrmpc and htcbdpc fields from the hw_stats structure. Accordance to the i225 device specification these fields not in use. This patch come to clean up the driver code. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 4a9e9b8feed9513fb31d5d6db95a6633b93da77f Author: Sasha Neftin Date: Tue Jul 7 14:05:03 2020 +0300 igc: Clean up the mac_info structure collision_delta, tx_packet_delta, txcw, adaptive_ifs and has_fwsm fields not in use. This patch come to clean up the driver code. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 643e5c2e8c61fb21fe7a2221528016b9d712526b Author: Sasha Neftin Date: Wed Jul 1 14:30:43 2020 +0300 igc: Remove ledctl_ fields from the mac_info structure LED control currently not implemented. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 94a5181f4bc418a5701e476b65aa347695f9dab3 Author: Sasha Neftin Date: Mon Jun 29 17:59:44 2020 +0300 igc: Fix registers definition IGC_ICTXPTC and IGC_ICTXATC are already defined elsewhere, remove this double definition. Also, remove unneeded registers as they are not applicable to i225 devices. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit ed6ab19adf493ec5043318a3e4e7eac2cc0a032a Author: Sasha Neftin Date: Mon Jun 22 10:43:34 2020 +0300 igc: Remove unneeded ICTXQMTC register Tx Queue Min Threshold Count register no applicable for the i225 device. This patch comes to clean up it. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 60f7bb824133ee3820b94957c89e2321fd5aec3f Author: Sasha Neftin Date: Mon Jun 22 10:20:30 2020 +0300 igc: Add Receive Descriptor Minimum Threshold Count to clear HW counters The statistics of this register are being tracked, however, the register was inadvertently missed when implementing igc_clear_hw_cntrs_base(). The register is clear on read, so add it to the function so that the register is cleared when requested so the tracked count is accurate. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit d9f0c8e457c059cc72a3ff240aae48c0bf387988 Author: Sasha Neftin Date: Mon Jun 22 10:20:17 2020 +0300 igc: Remove unneeded variable Though we are populating and tracking ictxqec, the value is not being used for anything so remove it altogether and save the register read. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit b7e46c527d226bb654df615d742c41b7920d387e Author: Al Viro Date: Sun Jun 7 00:34:26 2020 -0400 sparc64: get rid of odd callers of copy_regset_from_user() Signed-off-by: Al Viro commit 98a7fbf391dbef6b11bc0a9039de0e81994ff923 Author: Al Viro Date: Sat Jun 6 23:56:53 2020 -0400 sparc32: get rid of odd callers of copy_regset_from_user() [a couple of unused variables left behind by the previous version spotted by kernel test robot ] Signed-off-by: Al Viro commit 7fbdc6afd02b284441515beda0cde670fbae58a3 Merge: 4a775263fcdad 7dbf4bbf1c320 Author: Arnd Bergmann Date: Mon Jul 27 17:28:52 2020 +0200 Merge tag 'at91-dt-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 DT for 5.9 - ClassD pull down fixes - Enable RTT as RTC on sam9x60ek - Fix phy-mode for sama5d3_xplained * tag 'at91-dt-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama5d3_xplained: change phy-mode ARM: dts: at91: sama5d2_xplained: Remove pdmic node ARM: dts: sam9x60: add rtt dt-bindings: rtc: add microchip,sam9x60-rtt ARM: dts: at91: sam9x60ek: classd: pull-down the L1 and L3 lines ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines Link: https://lore.kernel.org/r/20200726193207.GA182066@piout.net Signed-off-by: Arnd Bergmann commit 552c0e308b7cff51fa6e02f2b89d344e3c2509d6 Merge: 5f3991b97ff6b f3a49f17845d8 Author: Arnd Bergmann Date: Mon Jul 27 17:26:55 2020 +0200 Merge tag 'at91-soc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/soc AT91 SoC for 5.9 - Two small fixes * tag 'at91-soc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: Replace HTTP links with HTTPS ones ARM: at91: pm: add missing put_device() call in at91_pm_sram_init() Link: https://lore.kernel.org/r/20200726193335.GA182444@piout.net Signed-off-by: Arnd Bergmann commit 47fda651d5af2506deac57d54887cf55ce26e244 Author: Li Heng Date: Sat Jul 25 10:56:27 2020 +0800 RDMA/core: Fix return error value in _ib_modify_qp() to negative The error codes in _ib_modify_qp() are supposed to be negative errno. Fixes: 7a5c938b9ed0 ("IB/core: Check for rdma_protocol_ib only after validating port_num") Link: https://lore.kernel.org/r/1595645787-20375-1-git-send-email-liheng40@huawei.com Reported-by: Hulk Robot Signed-off-by: Li Heng Reviewed-by: Parav Pandit Signed-off-by: Jason Gunthorpe commit e3bca37d15dca118f2ef1f0a068bb6e07846ea20 Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:11 2020 +0530 PCI: cadence: Fix updating Vendor ID and Subsystem Vendor ID register Commit 1b79c5284439 ("PCI: cadence: Add host driver for Cadence PCIe controller") in order to update Vendor ID, directly wrote to PCI_VENDOR_ID register. However PCI_VENDOR_ID in root port configuration space is read-only register and writing to it will have no effect. Use local management register to configure Vendor ID and Subsystem Vendor ID. Link: https://lore.kernel.org/r/20200722110317.4744-10-kishon@ti.com Fixes: 1b79c5284439 ("PCI: cadence: Add host driver for Cadence PCIe controller") Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit d07701a17aec3e3a777b882b46b0af6650f7cd1d Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:10 2020 +0530 PCI: cadence: Add new *ops* for CPU addr fixup Cadence driver uses "mem" memory resource to obtain the offset of configuration space address region, memory space address region and message space address region. The obtained offset is used to program the Address Translation Unit (ATU). However certain platforms like TI's J721E SoC require the absolute address to be programmed in the ATU and not just the offset. Add new *ops* for CPU addr fixup for the platform drivers to provide the correct address to be programmed in the ATU. Link: https://lore.kernel.org/r/20200722110317.4744-9-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit f87b8383da6022cf2e42fc7f40f4d782cc85144b Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:09 2020 +0530 dt-bindings: PCI: cadence: Remove "mem" from reg binding "mem" is not a memory resource and it overlaps with PCIe config space and memory region. Remove "mem" from reg binding. Link: https://lore.kernel.org/r/20200722110317.4744-8-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit c4c10c0125a705c606cb0cc85e18f13b490d026f Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:08 2020 +0530 PCI: cadence: Allow pci_host_bridge to have custom pci_ops Certain platforms like TI's J721E allows only 32-bit configuration space access. In such cases pci_generic_config_read and pci_generic_config_write cannot be used. Add support in Cadence core to let pci_host_bridge have custom pci_ops. Link: https://lore.kernel.org/r/20200722110317.4744-7-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 40d957e6f9eb3a8a585007b8b730340c829afbdb Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:07 2020 +0530 PCI: cadence: Add support to start link and verify link status Add cdns_pcie_ops to start link and verify link status. The registers to start link and to check link status is in Platform specific PCIe wrapper. Add support for platform specific drivers to add callback functions for the PCIe Cadence core to start link and verify link status. Link: https://lore.kernel.org/r/20200722110317.4744-6-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit a8b661eb50abaac97401625d3ff28761bcf1822d Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:06 2020 +0530 PCI: cadence: Convert all r/w accessors to perform only 32-bit accesses Certain platforms like TI's J721E using Cadence PCIe IP can perform only 32-bit accesses for reading or writing to Cadence registers. Convert all read and write accesses to 32-bit in Cadence PCIe driver in preparation for adding PCIe support in TI's J721E SoC. Also add spin lock to disable interrupts while modifying PCI_STATUS register while raising legacy interrupt since PCI_STATUS is accessible by both remote RC and EP and time between read and write should be minimized. Link: https://lore.kernel.org/r/20200722110317.4744-5-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 229f5879facf96e5640c0385f62b8cb5f27b8a43 Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:05 2020 +0530 linux/kernel.h: Add PTR_ALIGN_DOWN macro Add a macro for aligning down a pointer. This is useful to get an aligned register address when a device allows only word access and doesn't allow half word or byte access. Link: https://lore.kernel.org/r/20200722110317.4744-4-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring commit 19abcd790b51b26d775e1170ba2ac086823cceeb Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:04 2020 +0530 PCI: cadence: Fix cdns_pcie_{host|ep}_setup() error path commit bd22885aa188 ("PCI: cadence: Refactor driver to use as a core library") while refactoring the Cadence PCIe driver to be used as library, removed pm_runtime_get_sync() from cdns_pcie_ep_setup() and cdns_pcie_host_setup() but missed to remove the corresponding pm_runtime_put_sync() in the error path. Fix it here. Link: https://lore.kernel.org/r/20200722110317.4744-3-kishon@ti.com Fixes: bd22885aa188 ("PCI: cadence: Refactor driver to use as a core library") Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 5d3d063abb27687941bff206dc6e4a2402d24933 Author: Kishon Vijay Abraham I Date: Wed Jul 22 16:33:03 2020 +0530 PCI: cadence: Use "dma-ranges" instead of "cdns,no-bar-match-nbits" property Cadence PCIe core driver (host mode) uses "cdns,no-bar-match-nbits" property to configure the number of bits passed through from PCIe address to internal address in Inbound Address Translation register. This only used the NO MATCH BAR. However standard PCI dt-binding already defines "dma-ranges" to describe the address ranges accessible by PCIe controller. Add support in Cadence PCIe host driver to parse dma-ranges and configure the inbound regions for BAR0, BAR1 and NO MATCH BAR. Cadence IP specifies maximum size for BAR0 as 256GB, maximum size for BAR1 as 2 GB. This adds support to take the next biggest region in "dma-ranges" and find the smallest BAR that each of the regions fit in and if there is no BAR big enough to hold the region, split the region to see if it can be fitted using multiple BARs. "dma-ranges" of J721E will be dma-ranges = <0x02000000 0x0 0x0 0x0 0x0 0x10000 0x0>; Since there is no BAR which can hold 2^48 size, NO_MATCH_BAR will be used here. Legacy device tree binding compatibility is maintained by retaining support for "cdns,no-bar-match-nbits". Link: https://lore.kernel.org/r/20200722110317.4744-2-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 79237743687178a56b282e6a8b9845ab0a54e598 Merge: 8b603d0715a37 896ec9735336f Author: Jason Gunthorpe Date: Mon Jul 27 11:44:36 2020 -0300 Merge branch 'mlx5_uar' into rdma.git /for-next Meir Lichtinger says: ==================== ConnectX-7 supports setting relaxed ordering read/write mkey attribute by UMR, indicated by new HCA capabilities, so extend mlx5_ib driver to configure UMR control segment ==================== Based on the mlx5-next branch at git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux due to dependencies. * branch 'mlx5_uar': RDMA/mlx5: Set mkey relaxed ordering by UMR with ConnectX-7 RDMA/mlx5: Use MLX5_SET macro instead of local structure RDMA/mlx5: ConnectX-7 new capabilities to set relaxed ordering by UMR commit 9c2475f3e46a1de22bcae3b2c98c398937261c8a Author: Haiwei Li Date: Tue Jul 21 16:23:54 2020 +0800 KVM: Using macros instead of magic values Instead of using magic values, use macros. Signed-off-by: Haiwei Li Message-Id: <4c072161-80dd-b7ed-7adb-02acccaa0701@gmail.com> Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit aa251fc5b936d3ddb4b4c4b36427eb9aa3347c82 Author: Marc Zyngier Date: Sat Jul 25 13:30:55 2020 +0100 genirq/debugfs: Add missing irqchip flags Recently introduced irqchip flags lack the corresponding printouts in debugfs. Add them. Signed-off-by: Marc Zyngier Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/874kpvydxc.wl-maz@kernel.org commit f0c7baca180046824e07fc5f1326e83a8fd150c7 Author: Thomas Gleixner Date: Fri Jul 24 22:44:41 2020 +0200 genirq/affinity: Make affinity setting if activated opt-in John reported that on a RK3288 system the perf per CPU interrupts are all affine to CPU0 and provided the analysis: "It looks like what happens is that because the interrupts are not per-CPU in the hardware, armpmu_request_irq() calls irq_force_affinity() while the interrupt is deactivated and then request_irq() with IRQF_PERCPU | IRQF_NOBALANCING. Now when irq_startup() runs with IRQ_STARTUP_NORMAL, it calls irq_setup_affinity() which returns early because IRQF_PERCPU and IRQF_NOBALANCING are set, leaving the interrupt on its original CPU." This was broken by the recent commit which blocked interrupt affinity setting in hardware before activation of the interrupt. While this works in general, it does not work for this particular case. As contrary to the initial analysis not all interrupt chip drivers implement an activate callback, the safe cure is to make the deferred interrupt affinity setting at activation time opt-in. Implement the necessary core logic and make the two irqchip implementations for which this is required opt-in. In hindsight this would have been the right thing to do, but ... Fixes: baedb87d1b53 ("genirq/affinity: Handle affinity setting on inactive interrupts correctly") Reported-by: John Keeping Signed-off-by: Thomas Gleixner Tested-by: Marc Zyngier Acked-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/87blk4tzgm.fsf@nanos.tec.linutronix.de commit 896ec9735336f5adb576d372ed7e411bce2fc74c Author: Meir Lichtinger Date: Thu Jul 16 13:52:48 2020 +0300 RDMA/mlx5: Set mkey relaxed ordering by UMR with ConnectX-7 Up to ConnectX-7 UMR is not used when user passes relaxed ordering access flag. ConnectX-7 supports setting relaxed ordering read/write mkey attribute by UMR, indicated by new HCA capabilities. With ConnectX-7 driver uses UMR when user set relaxed ordering access flag, in contrast to previous silicon models. Specifically it includes setting relvant flags of mkey context mask in UMR control segment, and relaxed ordering write and read flags in UMR mkey context segment. Link: https://lore.kernel.org/r/20200716105248.1423452-4-leon@kernel.org Signed-off-by: Meir Lichtinger Reviewed-by: Michael Guralnik Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2224635938814fc63004e30f7c41943812bd6f1c Author: Meir Lichtinger Date: Thu Jul 16 13:52:47 2020 +0300 RDMA/mlx5: Use MLX5_SET macro instead of local structure Use generic mlx5 structure defined in mlx5_ifc.h to represent ConnectX device data structures instead of using structure defined specifically for mlx5_ib module. Link: https://lore.kernel.org/r/20200716105248.1423452-3-leon@kernel.org Signed-off-by: Meir Lichtinger Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit cfd97f94d036bf36122fa19d075c5741347aa178 Author: Colton Lewis Date: Sat Jul 25 05:02:57 2020 +0000 spi: correct kernel-doc inconsistency Silence documentation build warnings by correcting kernel-doc comment for spi_transfer struct. Signed-off-by: Colton Lewis Link: https://lore.kernel.org/r/20200725050242.279548-1-colton.w.lewis@protonmail.com Signed-off-by: Mark Brown commit 241b888791ee2fa47b97b3b9dc0e857d241db18d Author: Jonathan Liu Date: Mon Jul 27 17:23:28 2020 +1000 spi: sun4i: update max transfer size reported The spi-sun4i driver already has the ability to do large transfers. However, the max transfer size reported is still fifo depth - 1. Update the max transfer size reported to the max value possible. Fixes: 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size") Signed-off-by: Jonathan Liu Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200727072328.510798-1-net147@gmail.com Signed-off-by: Mark Brown commit 525c9e5a32bd7951eae3f06d9d077fea51718a6c Author: Clark Wang Date: Mon Jul 27 14:33:54 2020 +0800 spi: imx: enable runtime pm support Enable runtime pm support for spi-imx driver. Signed-off-by: Clark Wang Link: https://lore.kernel.org/r/20200727063354.17031-1-xiaoning.wang@nxp.com Signed-off-by: Mark Brown commit 033555f6eb60787bd40e34d7abeacaebdcd4c54e Author: Huacai Chen Date: Sun Jul 19 18:23:27 2020 +0800 MIPS: KVM: Fix build error caused by 'kvm_run' cleanup Commit c34b26b98caca48ec9ee9 ("KVM: MIPS: clean up redundant 'kvm_run' parameters") remove the 'kvm_run' parameter in kvm_mips_complete_mmio_ load(), but forget to update all callers. Fixes: c34b26b98caca48ec9ee9 ("KVM: MIPS: clean up redundant 'kvm_run' parameters") Reported-by: kernel test robot Cc: Tianjia Zhang Signed-off-by: Huacai Chen Message-Id: <1595154207-9787-1-git-send-email-chenhc@lemote.com> Signed-off-by: Paolo Bonzini commit e33929537b76486d2ed576a0d9ce3ebff51bf851 Author: Thomas Weißschuh Date: Mon Feb 3 13:01:32 2020 +0100 platform/x86: thinkpad_acpi: use standard charge control attribute names The standard attributes were only introduced after the ones from thinkpad_acpi in commit 813cab8f3994 ("power: supply: core: Add CHARGE_CONTROL_{START_THRESHOLD,END_THRESHOLD} properties"). The new standard attributes are aliased to their previous names, preserving backwards compatibility. Signed-off-by: Thomas Weißschuh Signed-off-by: Andy Shevchenko commit c1c04fbcb96ddacb27b54ade3931cc32b897dbbb Author: Thomas Weißschuh Date: Mon Feb 3 13:01:31 2020 +0100 platform/x86: thinkpad_acpi: remove unused defines They were never used. Signed-off-by: Thomas Weißschuh Signed-off-by: Andy Shevchenko commit a233547660a3915973d41e2a9a0923d0cf317a62 Author: Pi-Hsun Shih Date: Fri Jul 24 16:03:55 2020 +0800 platform/chrome: cros_ec: Fix host command for regulator control. Since the host command number 0x012B conflicts with other EC host command, add one to all regulator control related host command. Also fix a wrong alignment on struct and sync the comment with the one in ChromeOS EC codebase. Fixes: dff08caf35ec ("platform/chrome: cros_ec: Add command for regulator control.") Signed-off-by: Pi-Hsun Shih Acked-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200724080358.619245-1-pihsun@chromium.org Signed-off-by: Mark Brown commit 3bda44ffd93bf91fb3326336acf7ff163b1ce97d Author: Axel Lin Date: Sat Jul 25 09:44:14 2020 +0800 regulator: pca9450: Convert to use module_i2c_driver Use module_i2c_driver to simplify driver init boilerplate. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200725014414.1825183-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit ca6377900974c3e22c379c48057aac51139d29fc Author: Greg Kroah-Hartman Date: Mon Jul 27 15:34:15 2020 +0200 Revert "usb: dwc2: override PHY input signals with usb role switch support" This reverts commit bc0f0d4a5853e32ba97a0318f774570428fc5634. It was not meant to be applied yet. Cc: Minas Harutyunyan Cc: Amelie Delaunay Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit 50c8a002bfd43798768ad07833b2b9d4b4d5274f Author: Randy Dunlap Date: Sat Jul 18 17:29:03 2020 -0700 platform/x86: ISST: drop a duplicated word in isst_if.h Drop the repeated word "for" in a comment. Signed-off-by: Randy Dunlap Cc: Srinivas Pandruvada Cc: platform-driver-x86@vger.kernel.org Cc: Darren Hart Cc: Andy Shevchenko Acked-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 09df709cb5aeb2b648576f4b089d3fb869311e28 Author: Greg Kroah-Hartman Date: Mon Jul 27 15:33:12 2020 +0200 Revert "usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15 SoCs" This reverts commit 916f8b627288039d9e771a9b2ab1b3c79b303039. This was not meant to be applied as-is at the moment. Cc: Minas Harutyunyan Cc: Amelie Delaunay Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman commit eb27e5a314d1e2c303ac0df3384552743c3dfcda Author: Colin Ian King Date: Wed Jul 22 18:06:08 2020 +0100 ACPI: APEI: remove redundant assignment to variable rc The variable rc is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki commit 950039fcb3f0e99822ca5b5af4120bed899cc193 Merge: 34facb04228b3 2ab9a40966393 Author: Mark Brown Date: Mon Jul 27 14:21:10 2020 +0100 Merge series "ASoC: intel: use asoc_substream_to_rtd()" from Kuninori Morimoto : Hi Mark I have posted "ASoC: add asoc_substream_to_rtd() macro" patch-set to ALSA SoC ML (= see Link), and then Pierre-Louis wanted that Intel patch was separated for boards. The patches which are not for Intel were already accepted. This is for Intel, and Intel boards. Link: https://lore.kernel.org/r/87y2nf0yw2.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/877duz0ysw.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (2): ASoC: intel/boards: use asoc_substream_to_rtd() ASoC: intel: use asoc_substream_to_rtd() sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +++--- sound/soc/intel/baytrail/sst-baytrail-pcm.c | 16 ++++++++-------- sound/soc/intel/boards/bdw-rt5650.c | 2 +- sound/soc/intel/boards/bdw-rt5677.c | 4 ++-- sound/soc/intel/boards/broadwell.c | 2 +- sound/soc/intel/boards/bxt_rt298.c | 2 +- sound/soc/intel/boards/byt-rt5640.c | 2 +- sound/soc/intel/boards/bytcht_da7213.c | 4 ++-- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 2 +- sound/soc/intel/boards/cht_bsw_nau8824.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- sound/soc/intel/boards/cml_rt1011_rt5682.c | 4 ++-- sound/soc/intel/boards/ehl_rt5660.c | 2 +- sound/soc/intel/boards/glk_rt5682_max98357a.c | 2 +- sound/soc/intel/boards/haswell.c | 2 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 8 ++++---- sound/soc/intel/boards/kbl_rt5660.c | 2 +- sound/soc/intel/boards/kbl_rt5663_max98927.c | 4 ++-- .../intel/boards/kbl_rt5663_rt5514_max98927.c | 4 ++-- sound/soc/intel/boards/skl_nau88l25_max98357a.c | 2 +- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 2 +- sound/soc/intel/boards/skl_rt286.c | 2 +- sound/soc/intel/boards/sof_da7219_max98373.c | 2 +- sound/soc/intel/boards/sof_maxim_common.c | 4 ++-- sound/soc/intel/boards/sof_pcm512x.c | 4 ++-- sound/soc/intel/boards/sof_rt5682.c | 4 ++-- sound/soc/intel/boards/sof_sdw_rt1308.c | 2 +- sound/soc/intel/boards/sof_wm8804.c | 2 +- sound/soc/intel/haswell/sst-haswell-pcm.c | 12 ++++++------ sound/soc/intel/keembay/kmb_platform.c | 2 +- sound/soc/intel/skylake/skl-pcm.c | 8 ++++---- 34 files changed, 62 insertions(+), 62 deletions(-) -- 2.25.1 commit 34facb04228b36006a37727fddee59cf069d95d4 Author: Stephan Gerhold Date: Mon Jul 27 10:25:02 2020 +0200 ASoC: dt-bindings: q6asm: Add Q6ASM_DAI_{TX_RX, TX, RX} defines Right now the direction of a DAI has to be specified as a literal number in the device tree, e.g.: dai@0 { reg = <0>; direction = <2>; }; but this does not make it immediately clear that this is a playback/RX-only DAI. Actually, q6asm-dai.c has useful defines for this. Move them to the dt-bindings header to allow using them in the dts(i) files. The example above then becomes: dai@0 { reg = <0>; direction = ; }; which is immediately recognizable as playback/RX-only DAI. Signed-off-by: Stephan Gerhold Reviewed-by: Srinivas Kandagatla Cc: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200727082502.2341-1-stephan@gerhold.net Signed-off-by: Mark Brown commit 1255296cf0233780b7b9af90f374983fbcdef7bb Author: Akshu Agrawal Date: Sat Jul 25 01:25:52 2020 +0530 ASoC: AMD: Restore PME_EN state at Power On PME_EN state needs to restored to the value set by fmw. For the devices which are not using I2S wake event which gets enabled by PME_EN bit, keeping PME_EN enabled burns considerable amount of power as it blocks low power state. For the devices using I2S wake event, PME_EN gets enabled in fmw and the state should be maintained after ACP Power On. Signed-off-by: Akshu Agrawal Link: https://lore.kernel.org/r/20200724195600.11798-1-akshu.agrawal@amd.com Signed-off-by: Mark Brown commit 5b1e80204db6a4e05db3dfb594e8682857af1e69 Author: Hanjun Guo Date: Tue Jul 21 17:59:06 2020 +0800 ACPI: NUMA: Remove the useless 'node >= MAX_NUMNODES' check acpi_map_pxm_to_node() will never return a NUMA node greater than MAX_NUMNODES, so the 'node >= MAX_NUMNODES' check is not needed. Remove it. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 1c60f91c319d55058da3a0f6a361b6e6ee6b8c58 Author: Hanjun Guo Date: Tue Jul 21 17:59:05 2020 +0800 ACPI: NUMA: Remove the useless sub table pointer check In acpi_parse_entries_array(), the subtable entries (entry.hdr) will never be NULL, so for ACPI subtable handler in struct acpi_subtable_proc, will never handle NULL subtable entries. Remove those useless subtable pointer checks in the callback handlers. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit 24194a7e03f46f08579e3094417e448a92aff2b4 Author: Hanjun Guo Date: Tue Jul 21 17:59:04 2020 +0800 ACPI: tables: Remove the duplicated checks for acpi_parse_entries_array() acpi_disabled, pointer id and table_header are checked in acpi_table_parse_entries_array(), and acpi_parse_entries_array() is only called by acpi_table_parse_entries_array(), so those checks in acpi_parse_entries_array() are duplicate. Remove those duplicated checks and move the table_size check to acpi_table_parse_entries_array() as well. Signed-off-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki commit ed00495333ccc80fc8fb86fb43773c3c2a499466 Author: peterz@infradead.org Date: Mon Jul 27 14:48:52 2020 +0200 locking/lockdep: Fix TRACE_IRQFLAGS vs. NMIs Prior to commit: 859d069ee1dd ("lockdep: Prepare for NMI IRQ state tracking") IRQ state tracking was disabled in NMIs due to nmi_enter() doing lockdep_off() -- with the obvious requirement that NMI entry call nmi_enter() before trace_hardirqs_off(). [ AFAICT, PowerPC and SH violate this order on their NMI entry ] However, that commit explicitly changed lockdep_hardirqs_*() to ignore lockdep_off() and breaks every architecture that has irq-tracing in it's NMI entry that hasn't been fixed up (x86 being the only fixed one at this point). The reason for this change is that by ignoring lockdep_off() we can: - get rid of 'current->lockdep_recursion' in lockdep_assert_irqs*() which was going to to give header-recursion issues with the seqlock rework. - allow these lockdep_assert_*() macros to function in NMI context. Restore the previous state of things and allow an architecture to opt-in to the NMI IRQ tracking support, however instead of relying on lockdep_off(), rely on in_nmi(), both are part of nmi_enter() and so over-all entry ordering doesn't need to change. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200727124852.GK119549@hirez.programming.kicks-ass.net commit 2ab9a4096639337b88132529d39420576098e187 Author: Kuninori Morimoto Date: Mon Jul 27 10:08:42 2020 +0900 ASoC: intel: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87tuxtydcz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2207b93bc7866e5ece41b5bad46ddfed995b2137 Author: Kuninori Morimoto Date: Mon Jul 27 10:08:29 2020 +0900 ASoC: intel/boards: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87v9i9yddc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2861ba7a0c6c4ba835347686c19304c32ee15961 Author: Bob Moore Date: Mon Jul 20 10:31:21 2020 -0700 ACPICA: Update version to 20200717 ACPICA commit c1adb9a2a775df7a85df0103342ebf090e1b2016 Version 20200717. Link: https://github.com/acpica/acpica/commit/c1adb9a2 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 6a54ebae6d047c988a31f5ac5a64ab5cf83797a2 Author: Erik Kaneda Date: Mon Jul 20 10:31:20 2020 -0700 ACPICA: Do not increment operation_region reference counts for field units ACPICA commit e17b28cfcc31918d0db9547b6b274b09c413eb70 Object reference counts are used as a part of ACPICA's garbage collection mechanism. This mechanism keeps track of references to heap-allocated structures such as the ACPI operand objects. Recent server firmware has revealed that this reference count can overflow on large servers that declare many field units under the same operation_region. This occurs because each field unit declaration will add a reference count to the source operation_region. This change solves the reference count overflow for operation_regions objects by preventing fieldunits from incrementing their operation_region's reference count. Each operation_region's reference count will not be changed by named objects declared under the Field operator. During namespace deletion, the operation_region namespace node will be deleted and each fieldunit will be deleted without touching the deleted operation_region object. Link: https://github.com/acpica/acpica/commit/e17b28cf Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 10cfde5dc695856c4fe93f0679d2fdd8e0d2a147 Author: Gustavo A. R. Silva Date: Mon Jul 20 10:31:19 2020 -0700 ACPICA: Replace one-element array with flexible-array ACPICA commit 7ba2f3d91a32f104765961fda0ed78b884ae193d The current codebase makes use of one-element arrays in the following form: struct something { int length; u8 data[1]; }; struct something *instance; instance = kmalloc(sizeof(*instance) + size, GFP_KERNEL); instance->length = size; memcpy(instance->data, source, size); but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the linux codebase from now on. This issue was found with the help of Coccinelle and audited _manually_. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Link: https://github.com/acpica/acpica/commit/7ba2f3d9 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 4ce7796632a13d252f9c11b84342cc2d35903536 Author: Alexander A. Klimov Date: Fri Jul 17 20:24:36 2020 +0200 ACPI: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Vishal Verma Acked-by: Sakari Ailus Signed-off-by: Rafael J. Wysocki commit 66d3037898efc84ee241f593ffba244591bca328 Merge: 2ee61200b7d78 c12b539787eff Author: Arnd Bergmann Date: Mon Jul 27 14:35:28 2020 +0200 Merge tag 'at91-defconfig-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig AT91 defconfig for 5.9 - Add ClassD, KSZ ethernet switches, brdige, vlan to sama5_defconfig - Reenable CAN support in sama5_defconfig * tag 'at91-defconfig-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: at91: sama5: enable CAN PLATFORM driver ARM: configs: at91: sama5: enable bridge and VLAN filtering ARM: configs: at91: sama5: add support for KSZ ethernet switches ARM: configs: at91: sama5: Enable CLASSD Link: https://lore.kernel.org/r/20200726192810.GA181818@piout.net Signed-off-by: Arnd Bergmann commit 9c52a2647a39f4df6bbeadeefa556908ac24383b Merge: ab274a7ec8355 09241e61103d8 Author: Arnd Bergmann Date: Mon Jul 27 14:24:50 2020 +0200 Merge tag 'drivers_soc_for_5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone into arm/drivers SOC: TI Keystone driver update for v5.9 - TI K3 Ring Accelerator updates - Few non critical warining fixes * tag 'drivers_soc_for_5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ssantosh/linux-keystone: soc: TI knav_qmss: make symbol 'knav_acc_range_ops' static firmware: ti_sci: Replace HTTP links with HTTPS ones soc: ti/ti_sci_protocol.h: drop a duplicated word + clarify soc: ti: k3: fix semicolon.cocci warnings soc: ti: k3-ringacc: fix: warn: variable dereferenced before check 'ring' dmaengine: ti: k3-udma: Switch to k3_ringacc_request_rings_pair soc: ti: k3-ringacc: separate soc specific initialization soc: ti: k3-ringacc: add request pair of rings api. soc: ti: k3-ringacc: add ring's flags to dump soc: ti: k3-ringacc: Move state tracking variables under a struct dt-bindings: soc: ti: k3-ringacc: convert bindings to json-schema Link: https://lore.kernel.org/r/1595711814-7015-1-git-send-email-santosh.shilimkar@oracle.com Signed-off-by: Arnd Bergmann commit 8365a898fe53f85529566501d3b3d88640b3975e Author: Sumeet Pawnikar Date: Thu Jul 16 23:14:55 2020 +0530 powercap: Add Power Limit4 support Modern Intel Mobile platforms support power limit4 (PL4), which is the SoC package level maximum power limit (in Watts). It can be used to preemptively limits potential SoC power to prevent power spikes from tripping the power adapter and battery over-current protection. This patch enables this feature by exposing package level peak power capping control to userspace via RAPL sysfs interface. With this, application like DTPF can modify PL4 power limit, the similar way of other package power limit (PL1). As this feature is not tested on previous generations, here it is enabled only for the platform that has been verified to work, for safety concerns. Signed-off-by: Sumeet Pawnikar Co-developed-by: Zhang Rui Signed-off-by: Zhang Rui Reviewed-by: Srinivas Pandruvada Tested-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 0585c1c06a550c2a606c33ad45954892245512f6 Author: Tiezhu Yang Date: Mon Jul 27 17:29:38 2020 +0800 ACPI: Use valid link to the ACPI specification Currently, acpi.info is an invalid link to access ACPI specification, the new valid link is https://uefi.org/specifications. Signed-off-by: Tiezhu Yang Signed-off-by: Rafael J. Wysocki commit e86d1aa8b60f7ea18d36f50296d7d20eb2852e7e Author: Will Deacon Date: Fri Jul 24 12:43:20 2020 +0100 iommu/arm-smmu: Move Arm SMMU drivers into their own subdirectory The Arm SMMU drivers are getting fat on vendor value-add, so move them to their own subdirectory out of the way of the other IOMMU drivers. Suggested-by: Joerg Roedel Signed-off-by: Will Deacon commit 02fd86b661794677839fe47faf43ab3a9435e082 Author: Paul Cercueil Date: Thu Jul 16 14:42:50 2020 +0200 mmc: jz4740: Use pm_ptr() macro Use the newly introduced pm_ptr() macro to simplify the code. Signed-off-by: Paul Cercueil Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 756a64ce349cf2646c60456b110f7f1756bb8699 Author: Paul Cercueil Date: Thu Jul 16 14:42:49 2020 +0200 PM: Make *_DEV_PM_OPS macros use __maybe_unused This way, when the dev_pm_ops instance is not referenced anywhere, it will simply be dropped by the compiler without a warning. Signed-off-by: Paul Cercueil Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 7a82e97a11b91a78e9da06ab3f70545953c07b5c Author: Paul Cercueil Date: Thu Jul 16 14:42:48 2020 +0200 PM: core: introduce pm_ptr() macro This macro is analogous to the infamous of_match_ptr(). If CONFIG_PM is enabled, this macro will resolve to its argument, otherwise to NULL. Signed-off-by: Paul Cercueil Reviewed-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 17a82716587e9d7c3b246a789add490b2b5dcab6 Author: Greg Kroah-Hartman Date: Sun Jul 26 11:49:39 2020 +0200 USB: iowarrior: fix up report size handling for some devices In previous patches that added support for new iowarrior devices, the handling of the report size was not done correct. Fix that up and update the copyright date for the driver Reworked from an original patch written by Christoph Jung. Fixes: bab5417f5f01 ("USB: misc: iowarrior: add support for the 100 device") Fixes: 5f6f8da2d7b5 ("USB: misc: iowarrior: add support for the 28 and 28L devices") Fixes: 461d8deb26a7 ("USB: misc: iowarrior: add support for 2 OEMed devices") Cc: stable Reported-by: Christoph Jung Link: https://lore.kernel.org/r/20200726094939.1268978-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e98ba8cc3f8a897e4dcbf02cac5c2cf2470cd8e5 Merge: c97793089b11f f5e46aa4a124b Author: Greg Kroah-Hartman Date: Mon Jul 27 13:16:18 2020 +0200 Merge tag 'usb-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: USB: changes for v5.9 merge window CDNS3 got several improvements, most of which are non-critical fixes. DWC3 has a reset fix for the meson platform, while dwc2 has improvements for role switch on STM32MP15 SoCs. Apart from these, we have the usual set of non-critical fixes all over the place and support for new Ingenic SoC to their PHY driver. * tag 'usb-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb: (38 commits) usb: dwc3: gadget: when the started list is empty stop the active xfer usb: dwc3: gadget: make starting isoc transfers more robust usb: dwc3: gadget: add frame number mask usb: gadget: function: printer: Interface is disabled and returns error usb: gadget: f_uac2: fix AC Interface Header Descriptor wTotalLength dt-bindings: usb: ti,keystone-dwc3.yaml: Improve schema usb: bdc: Use devm_clk_get_optional() usb: bdc: Halt controller on suspend usb: bdc: driver runs out of buffer descriptors on large ADB transfers usb: bdc: Adb shows offline after resuming from S2 bdc: Fix bug causing crash after multiple disconnects usb: bdc: Add compatible string for new style USB DT nodes dt-bindings: usb: bdc: Update compatible strings USB: PHY: JZ4770: Reformat the code to align it. USB: PHY: JZ4770: Add support for new Ingenic SoCs. USB: PHY: JZ4770: Unify code style and simplify code. dt-bindings: USB: Add bindings for new Ingenic SoCs. usb: gadget: net2280: fix memory leak on probe error handling paths usb: cdns3: drd: simplify *switch_gadet and *switch_host usb: cdns3: core: removed overwriting some error code ... commit d6af2ed29c7c1c311b96dac989dcb991e90ee195 Author: Wei Hu Date: Mon Jul 27 15:17:31 2020 +0800 PCI: hv: Fix a timing issue which causes kdump to fail occasionally Kdump could fail sometime on Hyper-V guest because the retry in hv_pci_enter_d0() releases child device structures in hv_pci_bus_exit(). Although there is a second asynchronous device relations message sending from the host, if this message arrives to the guest after hv_send_resource_allocated() is called, the retry would fail. Fix the problem by moving retry to hv_pci_probe() and start the retry from hv_pci_query_relations() call. This will cause a device relations message to arrive to the guest synchronously; the guest would then be able to rebuild the child device structures before calling hv_send_resource_allocated(). Link: https://lore.kernel.org/r/20200727071731.18516-1-weh@microsoft.com Fixes: c81992e7f4aa ("PCI: hv: Retry PCI bus D0 entry on invalid device state") Signed-off-by: Wei Hu [lorenzo.pieralisi@arm.com: fixed a comment and commit log] Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley commit 68f9b22842897087895230964776083e168415de Author: Todd Brandt Date: Mon Jul 20 18:02:49 2020 -0700 pm-graph v5.7 - important s2idle fixes Important fixes: - in s2idle, use timekeeping_freeze trace mark instead of machine_suspend to denote entry into s2idle mode. - in s2idle, use machine_suspend trace mark to create a new virtual device called "s2idle_enter_x". It denotes an s2idle_enter call loop of iterations where s2idle was never actually achieved. It isn't counted as "freeze time" in the header. - in s2idle, only show multiple freeze times if s2idle went in and out of resume_noirq. Otherwise multiple freezes are shown with "waking" time subtracted (waking time is time spent outside s2idle dealing with wakeups). - in s2idle summaries, include "FREEZEWAKE" as an issue when at least 1ms is spent waking from s2idle. A clean run should only wake for the rtc timer. - add support for device callbacks with matching names in the same phase. In rare cases some devices register multiple callbacks from separate drivers using the same name. Without this fix only one is shown. - add kparamsfmt string back to fix bootgraph General updates: - when suspend_machine is missing, error says "failed in suspend_machine" - extract target count/time and add to summary title if -multi used - include any instances of "timeout" in dmesg as issues to be logged. - fix ftrace parse to handle any number of flags (instead of just 4). - remove sync/async_device string from device detail, remains in hover. - when using callgraph (-f) add driver name to callgraph titles. Signed-off-by: Todd Brandt Signed-off-by: Rafael J. Wysocki commit 5e548b32018d96c377fda4bdac2bf511a448ca67 Author: Filipe Manana Date: Wed Jul 22 12:29:01 2020 +0100 btrfs: do not set the full sync flag on the inode during page release When removing an extent map at try_release_extent_mapping(), called through the page release callback (btrfs_releasepage()), we always set the full sync flag on the inode, which forces the next fsync to use a slower code path. This hurts performance for workloads that dirty an amount of data that exceeds or is very close to the system's RAM memory and do frequent fsync operations (like database servers can for example). In particular if there are concurrent fsyncs against different files, by falling back to a full fsync we do a lot more checksum lookups in the checksums btree, as we do it for all the extents created in the current transaction, instead of only the new ones since the last fsync. These checksums lookups not only take some time but, more importantly, they also cause contention on the checksums btree locks due to the concurrency with checksum insertions in the btree by ordered extents from other inodes. We actually don't need to set the full sync flag on the inode, because we only remove extent maps that are in the list of modified extents if they were created in a past transaction, in which case an fsync skips them as it's pointless to log them. So stop setting the full fsync flag on the inode whenever we remove an extent map. This patch is part of a patchset that consists of 3 patches, which have the following subjects: 1/3 btrfs: fix race between page release and a fast fsync 2/3 btrfs: release old extent maps during page release 3/3 btrfs: do not set the full sync flag on the inode during page release Performance tests were ran against a branch (misc-next) containing the whole patchset. The test exercises a workload where there are multiple processes writing to files and fsyncing them (each writing and fsyncing its own file), and in total the amount of data dirtied ranges from 2x to 4x the system's RAM memory (16GiB), so that the page release callback is invoked frequently. The following script, using fio, was used to perform the tests: $ cat test-fsync.sh #!/bin/bash DEV=/dev/sdk MNT=/mnt/sdk MOUNT_OPTIONS="-o ssd" MKFS_OPTIONS="-d single -m single" if [ $# -ne 3 ]; then echo "Use $0 NUM_JOBS FILE_SIZE FSYNC_FREQ" exit 1 fi NUM_JOBS=$1 FILE_SIZE=$2 FSYNC_FREQ=$3 cat < /tmp/fio-job.ini [writers] rw=write fsync=$FSYNC_FREQ fallocate=none group_reporting=1 direct=0 bs=64k ioengine=sync size=$FILE_SIZE directory=$MNT numjobs=$NUM_JOBS thread EOF echo "Using config:" echo cat /tmp/fio-job.ini echo mkfs.btrfs -f $MKFS_OPTIONS $DEV &> /dev/null mount $MOUNT_OPTIONS $DEV $MNT fio /tmp/fio-job.ini umount $MNT The tests were performed for different numbers of jobs, file sizes and fsync frequency. A qemu VM using kvm was used, with 8 cores (the host has 12 cores, with cpu governance set to performance mode on all cores), 16GiB of ram (the host has 64GiB) and using a NVMe device directly (without an intermediary filesystem in the host). While running the tests, the host was not used for anything else, to avoid disturbing the tests. The obtained results were the following, and the last line printed by fio is pasted (includes aggregated throughput and test run time). ***************************************************** **** 1 job, 32GiB file, fsync frequency 1 **** ***************************************************** Before patchset: WRITE: bw=29.1MiB/s (30.5MB/s), 29.1MiB/s-29.1MiB/s (30.5MB/s-30.5MB/s), io=32.0GiB (34.4GB), run=1127557-1127557msec After patchset: WRITE: bw=29.3MiB/s (30.7MB/s), 29.3MiB/s-29.3MiB/s (30.7MB/s-30.7MB/s), io=32.0GiB (34.4GB), run=1119042-1119042msec (+0.7% throughput, -0.8% run time) ***************************************************** **** 2 jobs, 16GiB files, fsync frequency 1 **** ***************************************************** Before patchset: WRITE: bw=33.5MiB/s (35.1MB/s), 33.5MiB/s-33.5MiB/s (35.1MB/s-35.1MB/s), io=32.0GiB (34.4GB), run=979000-979000msec After patchset: WRITE: bw=39.9MiB/s (41.8MB/s), 39.9MiB/s-39.9MiB/s (41.8MB/s-41.8MB/s), io=32.0GiB (34.4GB), run=821283-821283msec (+19.1% throughput, -16.1% runtime) ***************************************************** **** 4 jobs, 8GiB files, fsync frequency 1 **** ***************************************************** Before patchset: WRITE: bw=52.1MiB/s (54.6MB/s), 52.1MiB/s-52.1MiB/s (54.6MB/s-54.6MB/s), io=32.0GiB (34.4GB), run=629130-629130msec After patchset: WRITE: bw=71.8MiB/s (75.3MB/s), 71.8MiB/s-71.8MiB/s (75.3MB/s-75.3MB/s), io=32.0GiB (34.4GB), run=456357-456357msec (+37.8% throughput, -27.5% runtime) ***************************************************** **** 8 jobs, 4GiB files, fsync frequency 1 **** ***************************************************** Before patchset: WRITE: bw=76.1MiB/s (79.8MB/s), 76.1MiB/s-76.1MiB/s (79.8MB/s-79.8MB/s), io=32.0GiB (34.4GB), run=430708-430708msec After patchset: WRITE: bw=133MiB/s (140MB/s), 133MiB/s-133MiB/s (140MB/s-140MB/s), io=32.0GiB (34.4GB), run=245458-245458msec (+74.7% throughput, -43.0% run time) ***************************************************** **** 16 jobs, 2GiB files, fsync frequency 1 **** ***************************************************** Before patchset: WRITE: bw=74.7MiB/s (78.3MB/s), 74.7MiB/s-74.7MiB/s (78.3MB/s-78.3MB/s), io=32.0GiB (34.4GB), run=438625-438625msec After patchset: WRITE: bw=184MiB/s (193MB/s), 184MiB/s-184MiB/s (193MB/s-193MB/s), io=32.0GiB (34.4GB), run=177864-177864msec (+146.3% throughput, -59.5% run time) ***************************************************** **** 32 jobs, 2GiB files, fsync frequency 1 **** ***************************************************** Before patchset: WRITE: bw=72.6MiB/s (76.1MB/s), 72.6MiB/s-72.6MiB/s (76.1MB/s-76.1MB/s), io=64.0GiB (68.7GB), run=902615-902615msec After patchset: WRITE: bw=227MiB/s (238MB/s), 227MiB/s-227MiB/s (238MB/s-238MB/s), io=64.0GiB (68.7GB), run=288936-288936msec (+212.7% throughput, -68.0% run time) ***************************************************** **** 64 jobs, 1GiB files, fsync frequency 1 **** ***************************************************** Before patchset: WRITE: bw=98.8MiB/s (104MB/s), 98.8MiB/s-98.8MiB/s (104MB/s-104MB/s), io=64.0GiB (68.7GB), run=663126-663126msec After patchset: WRITE: bw=294MiB/s (308MB/s), 294MiB/s-294MiB/s (308MB/s-308MB/s), io=64.0GiB (68.7GB), run=222940-222940msec (+197.6% throughput, -66.4% run time) Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit fbc2bd7e7ab95704a96dade6a7d00ea99a68b015 Author: Filipe Manana Date: Wed Jul 22 12:28:52 2020 +0100 btrfs: release old extent maps during page release When removing an extent map at try_release_extent_mapping(), called through the page release callback (btrfs_releasepage()), we never release an extent map that is in the list of modified extents. This is to prevent races with a concurrent fsync using the fast path, which could lead to not logging an extent created in the current transaction. However we can safely remove an extent map created in a past transaction that is still in the list of modified extents (because no one fsynced yet the inode after that transaction got commited), because such extents are skipped during an fsync as it is pointless to log them. This change does that. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 3d6448e631591756da36efb3ea6355ff6f383c3a Author: Filipe Manana Date: Wed Jul 22 12:28:37 2020 +0100 btrfs: fix race between page release and a fast fsync When releasing an extent map, done through the page release callback, we can race with an ongoing fast fsync and cause the fsync to miss a new extent and not log it. The steps for this to happen are the following: 1) A page is dirtied for some inode I; 2) Writeback for that page is triggered by a path other than fsync, for example by the system due to memory pressure; 3) When the ordered extent for the extent (a single 4K page) finishes, we unpin the corresponding extent map and set its generation to N, the current transaction's generation; 4) The btrfs_releasepage() callback is invoked by the system due to memory pressure for that no longer dirty page of inode I; 5) At the same time, some task calls fsync on inode I, joins transaction N, and at btrfs_log_inode() it sees that the inode does not have the full sync flag set, so we proceed with a fast fsync. But before we get into btrfs_log_changed_extents() and lock the inode's extent map tree: 6) Through btrfs_releasepage() we end up at try_release_extent_mapping() and we remove the extent map for the new 4Kb extent, because it is neither pinned anymore nor locked. By calling remove_extent_mapping(), we remove the extent map from the list of modified extents, since the extent map does not have the logging flag set. We unlock the inode's extent map tree; 7) The task doing the fast fsync now enters btrfs_log_changed_extents(), locks the inode's extent map tree and iterates its list of modified extents, which no longer has the 4Kb extent in it, so it does not log the extent; 8) The fsync finishes; 9) Before transaction N is committed, a power failure happens. After replaying the log, the 4K extent of inode I will be missing, since it was not logged due to the race with try_release_extent_mapping(). So fix this by teaching try_release_extent_mapping() to not remove an extent map if it's still in the list of modified extents. Fixes: ff44c6e36dc9dc ("Btrfs: do not hold the write_lock on the extent tree while logging") CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 88c4703f00a9e8ab60133690cfdaccea6c07e560 Author: Johannes Thumshirn Date: Thu Jul 23 00:18:04 2020 +0900 btrfs: open-code remount flag setting in btrfs_remount When we're (re)mounting a btrfs filesystem we set the BTRFS_FS_STATE_REMOUNTING state in fs_info to serialize against async reclaim or defrags. This flag is set in btrfs_remount_prepare() called by btrfs_remount(). As btrfs_remount_prepare() does nothing but setting this flag and doesn't have a second caller, we can just open-code the flag setting in btrfs_remount(). Similarly do for so clearing of the flag by moving it out of btrfs_remount_cleanup() into btrfs_remount() to be symmetrical. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 162e0a16b7d93629c8325ea32d99b38d17bc03eb Author: Josef Bacik Date: Tue Jul 21 10:48:46 2020 -0400 btrfs: if we're restriping, use the target restripe profile Previously we depended on some weird behavior in our chunk allocator to force the allocation of new stripes, so by the time we got to doing the reduce we would usually already have a chunk with the proper target. However that behavior causes other problems and needs to be removed. First however we need to remove this check to only restripe if we already have those available profiles, because if we're allocating our first chunk it obviously will not be available. Simply use the target as specified, and if that fails it'll be because we're out of space. Tested-by: Holger Hoffstätte Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 349e120ecebeb984376c8edb89bf0bfb85bc16f7 Author: Josef Bacik Date: Tue Jul 21 10:48:45 2020 -0400 btrfs: don't adjust bg flags and use default allocation profiles btrfs/061 has been failing consistently for me recently with a transaction abort. We run out of space in the system chunk array, which means we've allocated way too many system chunks than we need. Chris added this a long time ago for balance as a poor mans restriping. If you had a single disk and then added another disk and then did a balance, update_block_group_flags would then figure out which RAID level you needed. Fast forward to today and we have restriping behavior, so we can explicitly tell the fs that we're trying to change the raid level. This is accomplished through the normal get_alloc_profile path. Furthermore this code actually causes btrfs/061 to fail, because we do things like mkfs -m dup -d single with multiple devices. This trips this check alloc_flags = update_block_group_flags(fs_info, cache->flags); if (alloc_flags != cache->flags) { ret = btrfs_chunk_alloc(trans, alloc_flags, CHUNK_ALLOC_FORCE); in btrfs_inc_block_group_ro. Because we're balancing and scrubbing, but not actually restriping, we keep forcing chunk allocation of RAID1 chunks. This eventually causes us to run out of system space and the file system aborts and flips read only. We don't need this poor mans restriping any more, simply use the normal get_alloc_profile helper, which will get the correct alloc_flags and thus make the right decision for chunk allocation. This keeps us from allocating a billion system chunks and falling over. Tested-by: Holger Hoffstätte Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit ab0db043c35da3477e57d4d516492b2d51a5ca0f Author: Josef Bacik Date: Fri Jul 17 15:12:29 2020 -0400 btrfs: fix lockdep splat from btrfs_dump_space_info When running with -o enospc_debug you can get the following splat if one of the dump_space_info's trip ====================================================== WARNING: possible circular locking dependency detected 5.8.0-rc5+ #20 Tainted: G OE ------------------------------------------------------ dd/563090 is trying to acquire lock: ffff9e7dbf4f1e18 (&ctl->tree_lock){+.+.}-{2:2}, at: btrfs_dump_free_space+0x2b/0xa0 [btrfs] but task is already holding lock: ffff9e7e2284d428 (&cache->lock){+.+.}-{2:2}, at: btrfs_dump_space_info+0xaa/0x120 [btrfs] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&cache->lock){+.+.}-{2:2}: _raw_spin_lock+0x25/0x30 btrfs_add_reserved_bytes+0x3c/0x3c0 [btrfs] find_free_extent+0x7ef/0x13b0 [btrfs] btrfs_reserve_extent+0x9b/0x180 [btrfs] btrfs_alloc_tree_block+0xc1/0x340 [btrfs] alloc_tree_block_no_bg_flush+0x4a/0x60 [btrfs] __btrfs_cow_block+0x122/0x530 [btrfs] btrfs_cow_block+0x106/0x210 [btrfs] commit_cowonly_roots+0x55/0x300 [btrfs] btrfs_commit_transaction+0x4ed/0xac0 [btrfs] sync_filesystem+0x74/0x90 generic_shutdown_super+0x22/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x36/0x70 cleanup_mnt+0x104/0x160 task_work_run+0x5f/0x90 __prepare_exit_to_usermode+0x1bd/0x1c0 do_syscall_64+0x5e/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #2 (&space_info->lock){+.+.}-{2:2}: _raw_spin_lock+0x25/0x30 btrfs_block_rsv_release+0x1a6/0x3f0 [btrfs] btrfs_inode_rsv_release+0x4f/0x170 [btrfs] btrfs_clear_delalloc_extent+0x155/0x480 [btrfs] clear_state_bit+0x81/0x1a0 [btrfs] __clear_extent_bit+0x25c/0x5d0 [btrfs] clear_extent_bit+0x15/0x20 [btrfs] btrfs_invalidatepage+0x2b7/0x3c0 [btrfs] truncate_cleanup_page+0x47/0xe0 truncate_inode_pages_range+0x238/0x840 truncate_pagecache+0x44/0x60 btrfs_setattr+0x202/0x5e0 [btrfs] notify_change+0x33b/0x490 do_truncate+0x76/0xd0 path_openat+0x687/0xa10 do_filp_open+0x91/0x100 do_sys_openat2+0x215/0x2d0 do_sys_open+0x44/0x80 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&tree->lock#2){+.+.}-{2:2}: _raw_spin_lock+0x25/0x30 find_first_extent_bit+0x32/0x150 [btrfs] write_pinned_extent_entries.isra.0+0xc5/0x100 [btrfs] __btrfs_write_out_cache+0x172/0x480 [btrfs] btrfs_write_out_cache+0x7a/0xf0 [btrfs] btrfs_write_dirty_block_groups+0x286/0x3b0 [btrfs] commit_cowonly_roots+0x245/0x300 [btrfs] btrfs_commit_transaction+0x4ed/0xac0 [btrfs] close_ctree+0xf9/0x2f5 [btrfs] generic_shutdown_super+0x6c/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x36/0x70 cleanup_mnt+0x104/0x160 task_work_run+0x5f/0x90 __prepare_exit_to_usermode+0x1bd/0x1c0 do_syscall_64+0x5e/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&ctl->tree_lock){+.+.}-{2:2}: __lock_acquire+0x1240/0x2460 lock_acquire+0xab/0x360 _raw_spin_lock+0x25/0x30 btrfs_dump_free_space+0x2b/0xa0 [btrfs] btrfs_dump_space_info+0xf4/0x120 [btrfs] btrfs_reserve_extent+0x176/0x180 [btrfs] __btrfs_prealloc_file_range+0x145/0x550 [btrfs] cache_save_setup+0x28d/0x3b0 [btrfs] btrfs_start_dirty_block_groups+0x1fc/0x4f0 [btrfs] btrfs_commit_transaction+0xcc/0xac0 [btrfs] btrfs_alloc_data_chunk_ondemand+0x162/0x4c0 [btrfs] btrfs_check_data_free_space+0x4c/0xa0 [btrfs] btrfs_buffered_write.isra.0+0x19b/0x740 [btrfs] btrfs_file_write_iter+0x3cf/0x610 [btrfs] new_sync_write+0x11e/0x1b0 vfs_write+0x1c9/0x200 ksys_write+0x68/0xe0 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Chain exists of: &ctl->tree_lock --> &space_info->lock --> &cache->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&cache->lock); lock(&space_info->lock); lock(&cache->lock); lock(&ctl->tree_lock); *** DEADLOCK *** 6 locks held by dd/563090: #0: ffff9e7e21d18448 (sb_writers#14){.+.+}-{0:0}, at: vfs_write+0x195/0x200 #1: ffff9e7dd0410ed8 (&sb->s_type->i_mutex_key#19){++++}-{3:3}, at: btrfs_file_write_iter+0x86/0x610 [btrfs] #2: ffff9e7e21d18638 (sb_internal#2){.+.+}-{0:0}, at: start_transaction+0x40b/0x5b0 [btrfs] #3: ffff9e7e1f05d688 (&cur_trans->cache_write_mutex){+.+.}-{3:3}, at: btrfs_start_dirty_block_groups+0x158/0x4f0 [btrfs] #4: ffff9e7e2284ddb8 (&space_info->groups_sem){++++}-{3:3}, at: btrfs_dump_space_info+0x69/0x120 [btrfs] #5: ffff9e7e2284d428 (&cache->lock){+.+.}-{2:2}, at: btrfs_dump_space_info+0xaa/0x120 [btrfs] stack backtrace: CPU: 3 PID: 563090 Comm: dd Tainted: G OE 5.8.0-rc5+ #20 Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./890FX Deluxe5, BIOS P1.40 05/03/2011 Call Trace: dump_stack+0x96/0xd0 check_noncircular+0x162/0x180 __lock_acquire+0x1240/0x2460 ? wake_up_klogd.part.0+0x30/0x40 lock_acquire+0xab/0x360 ? btrfs_dump_free_space+0x2b/0xa0 [btrfs] _raw_spin_lock+0x25/0x30 ? btrfs_dump_free_space+0x2b/0xa0 [btrfs] btrfs_dump_free_space+0x2b/0xa0 [btrfs] btrfs_dump_space_info+0xf4/0x120 [btrfs] btrfs_reserve_extent+0x176/0x180 [btrfs] __btrfs_prealloc_file_range+0x145/0x550 [btrfs] ? btrfs_qgroup_reserve_data+0x1d/0x60 [btrfs] cache_save_setup+0x28d/0x3b0 [btrfs] btrfs_start_dirty_block_groups+0x1fc/0x4f0 [btrfs] btrfs_commit_transaction+0xcc/0xac0 [btrfs] ? start_transaction+0xe0/0x5b0 [btrfs] btrfs_alloc_data_chunk_ondemand+0x162/0x4c0 [btrfs] btrfs_check_data_free_space+0x4c/0xa0 [btrfs] btrfs_buffered_write.isra.0+0x19b/0x740 [btrfs] ? ktime_get_coarse_real_ts64+0xa8/0xd0 ? trace_hardirqs_on+0x1c/0xe0 btrfs_file_write_iter+0x3cf/0x610 [btrfs] new_sync_write+0x11e/0x1b0 vfs_write+0x1c9/0x200 ksys_write+0x68/0xe0 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This is because we're holding the block_group->lock while trying to dump the free space cache. However we don't need this lock, we just need it to read the values for the printk, so move the free space cache dumping outside of the block group lock. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 01d01caf19ff7c537527d352d169c4368375c0a1 Author: Josef Bacik Date: Fri Jul 17 15:12:28 2020 -0400 btrfs: move the chunk_mutex in btrfs_read_chunk_tree We are currently getting this lockdep splat in btrfs/161: ====================================================== WARNING: possible circular locking dependency detected 5.8.0-rc5+ #20 Tainted: G E ------------------------------------------------------ mount/678048 is trying to acquire lock: ffff9b769f15b6e0 (&fs_devs->device_list_mutex){+.+.}-{3:3}, at: clone_fs_devices+0x4d/0x170 [btrfs] but task is already holding lock: ffff9b76abdb08d0 (&fs_info->chunk_mutex){+.+.}-{3:3}, at: btrfs_read_chunk_tree+0x6a/0x800 [btrfs] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&fs_info->chunk_mutex){+.+.}-{3:3}: __mutex_lock+0x8b/0x8f0 btrfs_init_new_device+0x2d2/0x1240 [btrfs] btrfs_ioctl+0x1de/0x2d20 [btrfs] ksys_ioctl+0x87/0xc0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&fs_devs->device_list_mutex){+.+.}-{3:3}: __lock_acquire+0x1240/0x2460 lock_acquire+0xab/0x360 __mutex_lock+0x8b/0x8f0 clone_fs_devices+0x4d/0x170 [btrfs] btrfs_read_chunk_tree+0x330/0x800 [btrfs] open_ctree+0xb7c/0x18ce [btrfs] btrfs_mount_root.cold+0x13/0xfa [btrfs] legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 do_mount+0x7de/0xb30 __x64_sys_mount+0x8e/0xd0 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&fs_info->chunk_mutex); lock(&fs_devs->device_list_mutex); lock(&fs_info->chunk_mutex); lock(&fs_devs->device_list_mutex); *** DEADLOCK *** 3 locks held by mount/678048: #0: ffff9b75ff5fb0e0 (&type->s_umount_key#63/1){+.+.}-{3:3}, at: alloc_super+0xb5/0x380 #1: ffffffffc0c2fbc8 (uuid_mutex){+.+.}-{3:3}, at: btrfs_read_chunk_tree+0x54/0x800 [btrfs] #2: ffff9b76abdb08d0 (&fs_info->chunk_mutex){+.+.}-{3:3}, at: btrfs_read_chunk_tree+0x6a/0x800 [btrfs] stack backtrace: CPU: 2 PID: 678048 Comm: mount Tainted: G E 5.8.0-rc5+ #20 Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./890FX Deluxe5, BIOS P1.40 05/03/2011 Call Trace: dump_stack+0x96/0xd0 check_noncircular+0x162/0x180 __lock_acquire+0x1240/0x2460 ? asm_sysvec_apic_timer_interrupt+0x12/0x20 lock_acquire+0xab/0x360 ? clone_fs_devices+0x4d/0x170 [btrfs] __mutex_lock+0x8b/0x8f0 ? clone_fs_devices+0x4d/0x170 [btrfs] ? rcu_read_lock_sched_held+0x52/0x60 ? cpumask_next+0x16/0x20 ? module_assert_mutex_or_preempt+0x14/0x40 ? __module_address+0x28/0xf0 ? clone_fs_devices+0x4d/0x170 [btrfs] ? static_obj+0x4f/0x60 ? lockdep_init_map_waits+0x43/0x200 ? clone_fs_devices+0x4d/0x170 [btrfs] clone_fs_devices+0x4d/0x170 [btrfs] btrfs_read_chunk_tree+0x330/0x800 [btrfs] open_ctree+0xb7c/0x18ce [btrfs] ? super_setup_bdi_name+0x79/0xd0 btrfs_mount_root.cold+0x13/0xfa [btrfs] ? vfs_parse_fs_string+0x84/0xb0 ? rcu_read_lock_sched_held+0x52/0x60 ? kfree+0x2b5/0x310 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 fc_mount+0xe/0x40 vfs_kern_mount.part.0+0x71/0x90 btrfs_mount+0x13b/0x3e0 [btrfs] ? cred_has_capability+0x7c/0x120 ? rcu_read_lock_sched_held+0x52/0x60 ? legacy_get_tree+0x30/0x50 legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 do_mount+0x7de/0xb30 ? memdup_user+0x4e/0x90 __x64_sys_mount+0x8e/0xd0 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 This is because btrfs_read_chunk_tree() can come upon DEV_EXTENT's and then read the device, which takes the device_list_mutex. The device_list_mutex needs to be taken before the chunk_mutex, so this is a problem. We only really need the chunk mutex around adding the chunk, so move the mutex around read_one_chunk. An argument could be made that we don't even need the chunk_mutex here as it's during mount, and we are protected by various other locks. However we already have special rules for ->device_list_mutex, and I'd rather not have another special case for ->chunk_mutex. CC: stable@vger.kernel.org # 4.19+ Reviewed-by: Anand Jain Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 18c850fdc5a801bad4977b0f1723761d42267e45 Author: Josef Bacik Date: Fri Jul 17 15:12:27 2020 -0400 btrfs: open device without device_list_mutex There's long existed a lockdep splat because we open our bdev's under the ->device_list_mutex at mount time, which acquires the bd_mutex. Usually this goes unnoticed, but if you do loopback devices at all suddenly the bd_mutex comes with a whole host of other dependencies, which results in the splat when you mount a btrfs file system. ====================================================== WARNING: possible circular locking dependency detected 5.8.0-0.rc3.1.fc33.x86_64+debug #1 Not tainted ------------------------------------------------------ systemd-journal/509 is trying to acquire lock: ffff970831f84db0 (&fs_info->reloc_mutex){+.+.}-{3:3}, at: btrfs_record_root_in_trans+0x44/0x70 [btrfs] but task is already holding lock: ffff97083144d598 (sb_pagefaults){.+.+}-{0:0}, at: btrfs_page_mkwrite+0x59/0x560 [btrfs] which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #6 (sb_pagefaults){.+.+}-{0:0}: __sb_start_write+0x13e/0x220 btrfs_page_mkwrite+0x59/0x560 [btrfs] do_page_mkwrite+0x4f/0x130 do_wp_page+0x3b0/0x4f0 handle_mm_fault+0xf47/0x1850 do_user_addr_fault+0x1fc/0x4b0 exc_page_fault+0x88/0x300 asm_exc_page_fault+0x1e/0x30 -> #5 (&mm->mmap_lock#2){++++}-{3:3}: __might_fault+0x60/0x80 _copy_from_user+0x20/0xb0 get_sg_io_hdr+0x9a/0xb0 scsi_cmd_ioctl+0x1ea/0x2f0 cdrom_ioctl+0x3c/0x12b4 sr_block_ioctl+0xa4/0xd0 block_ioctl+0x3f/0x50 ksys_ioctl+0x82/0xc0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #4 (&cd->lock){+.+.}-{3:3}: __mutex_lock+0x7b/0x820 sr_block_open+0xa2/0x180 __blkdev_get+0xdd/0x550 blkdev_get+0x38/0x150 do_dentry_open+0x16b/0x3e0 path_openat+0x3c9/0xa00 do_filp_open+0x75/0x100 do_sys_openat2+0x8a/0x140 __x64_sys_openat+0x46/0x70 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #3 (&bdev->bd_mutex){+.+.}-{3:3}: __mutex_lock+0x7b/0x820 __blkdev_get+0x6a/0x550 blkdev_get+0x85/0x150 blkdev_get_by_path+0x2c/0x70 btrfs_get_bdev_and_sb+0x1b/0xb0 [btrfs] open_fs_devices+0x88/0x240 [btrfs] btrfs_open_devices+0x92/0xa0 [btrfs] btrfs_mount_root+0x250/0x490 [btrfs] legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 vfs_kern_mount.part.0+0x71/0xb0 btrfs_mount+0x119/0x380 [btrfs] legacy_get_tree+0x30/0x50 vfs_get_tree+0x28/0xc0 do_mount+0x8c6/0xca0 __x64_sys_mount+0x8e/0xd0 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #2 (&fs_devs->device_list_mutex){+.+.}-{3:3}: __mutex_lock+0x7b/0x820 btrfs_run_dev_stats+0x36/0x420 [btrfs] commit_cowonly_roots+0x91/0x2d0 [btrfs] btrfs_commit_transaction+0x4e6/0x9f0 [btrfs] btrfs_sync_file+0x38a/0x480 [btrfs] __x64_sys_fdatasync+0x47/0x80 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&fs_info->tree_log_mutex){+.+.}-{3:3}: __mutex_lock+0x7b/0x820 btrfs_commit_transaction+0x48e/0x9f0 [btrfs] btrfs_sync_file+0x38a/0x480 [btrfs] __x64_sys_fdatasync+0x47/0x80 do_syscall_64+0x52/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #0 (&fs_info->reloc_mutex){+.+.}-{3:3}: __lock_acquire+0x1241/0x20c0 lock_acquire+0xb0/0x400 __mutex_lock+0x7b/0x820 btrfs_record_root_in_trans+0x44/0x70 [btrfs] start_transaction+0xd2/0x500 [btrfs] btrfs_dirty_inode+0x44/0xd0 [btrfs] file_update_time+0xc6/0x120 btrfs_page_mkwrite+0xda/0x560 [btrfs] do_page_mkwrite+0x4f/0x130 do_wp_page+0x3b0/0x4f0 handle_mm_fault+0xf47/0x1850 do_user_addr_fault+0x1fc/0x4b0 exc_page_fault+0x88/0x300 asm_exc_page_fault+0x1e/0x30 other info that might help us debug this: Chain exists of: &fs_info->reloc_mutex --> &mm->mmap_lock#2 --> sb_pagefaults Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_pagefaults); lock(&mm->mmap_lock#2); lock(sb_pagefaults); lock(&fs_info->reloc_mutex); *** DEADLOCK *** 3 locks held by systemd-journal/509: #0: ffff97083bdec8b8 (&mm->mmap_lock#2){++++}-{3:3}, at: do_user_addr_fault+0x12e/0x4b0 #1: ffff97083144d598 (sb_pagefaults){.+.+}-{0:0}, at: btrfs_page_mkwrite+0x59/0x560 [btrfs] #2: ffff97083144d6a8 (sb_internal){.+.+}-{0:0}, at: start_transaction+0x3f8/0x500 [btrfs] stack backtrace: CPU: 0 PID: 509 Comm: systemd-journal Not tainted 5.8.0-0.rc3.1.fc33.x86_64+debug #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Call Trace: dump_stack+0x92/0xc8 check_noncircular+0x134/0x150 __lock_acquire+0x1241/0x20c0 lock_acquire+0xb0/0x400 ? btrfs_record_root_in_trans+0x44/0x70 [btrfs] ? lock_acquire+0xb0/0x400 ? btrfs_record_root_in_trans+0x44/0x70 [btrfs] __mutex_lock+0x7b/0x820 ? btrfs_record_root_in_trans+0x44/0x70 [btrfs] ? kvm_sched_clock_read+0x14/0x30 ? sched_clock+0x5/0x10 ? sched_clock_cpu+0xc/0xb0 btrfs_record_root_in_trans+0x44/0x70 [btrfs] start_transaction+0xd2/0x500 [btrfs] btrfs_dirty_inode+0x44/0xd0 [btrfs] file_update_time+0xc6/0x120 btrfs_page_mkwrite+0xda/0x560 [btrfs] ? sched_clock+0x5/0x10 do_page_mkwrite+0x4f/0x130 do_wp_page+0x3b0/0x4f0 handle_mm_fault+0xf47/0x1850 do_user_addr_fault+0x1fc/0x4b0 exc_page_fault+0x88/0x300 ? asm_exc_page_fault+0x8/0x30 asm_exc_page_fault+0x1e/0x30 RIP: 0033:0x7fa3972fdbfe Code: Bad RIP value. Fix this by not holding the ->device_list_mutex at this point. The device_list_mutex exists to protect us from modifying the device list while the file system is running. However it can also be modified by doing a scan on a device. But this action is specifically protected by the uuid_mutex, which we are holding here. We cannot race with opening at this point because we have the ->s_mount lock held during the mount. Not having the ->device_list_mutex here is perfectly safe as we're not going to change the devices at this point. CC: stable@vger.kernel.org # 4.19+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add some comments ] Signed-off-by: David Sterba commit a47bd78d0c44621efb98b525d04d60dc4d1a79b0 Author: Josef Bacik Date: Tue Jul 21 10:17:50 2020 -0400 btrfs: sysfs: use NOFS for device creation Dave hit this splat during testing btrfs/078: ====================================================== WARNING: possible circular locking dependency detected 5.8.0-rc6-default+ #1191 Not tainted ------------------------------------------------------ kswapd0/75 is trying to acquire lock: ffffa040e9d04ff8 (&delayed_node->mutex){+.+.}-{3:3}, at: __btrfs_release_delayed_node.part.0+0x3f/0x310 [btrfs] but task is already holding lock: ffffffff8b0c8040 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x5/0x30 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (fs_reclaim){+.+.}-{0:0}: __lock_acquire+0x56f/0xaa0 lock_acquire+0xa3/0x440 fs_reclaim_acquire.part.0+0x25/0x30 __kmalloc_track_caller+0x49/0x330 kstrdup+0x2e/0x60 __kernfs_new_node.constprop.0+0x44/0x250 kernfs_new_node+0x25/0x50 kernfs_create_link+0x34/0xa0 sysfs_do_create_link_sd+0x5e/0xd0 btrfs_sysfs_add_devices_dir+0x65/0x100 [btrfs] btrfs_init_new_device+0x44c/0x12b0 [btrfs] btrfs_ioctl+0xc3c/0x25c0 [btrfs] ksys_ioctl+0x68/0xa0 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x50/0xe0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 -> #1 (&fs_info->chunk_mutex){+.+.}-{3:3}: __lock_acquire+0x56f/0xaa0 lock_acquire+0xa3/0x440 __mutex_lock+0xa0/0xaf0 btrfs_chunk_alloc+0x137/0x3e0 [btrfs] find_free_extent+0xb44/0xfb0 [btrfs] btrfs_reserve_extent+0x9b/0x180 [btrfs] btrfs_alloc_tree_block+0xc1/0x350 [btrfs] alloc_tree_block_no_bg_flush+0x4a/0x60 [btrfs] __btrfs_cow_block+0x143/0x7a0 [btrfs] btrfs_cow_block+0x15f/0x310 [btrfs] push_leaf_right+0x150/0x240 [btrfs] split_leaf+0x3cd/0x6d0 [btrfs] btrfs_search_slot+0xd14/0xf70 [btrfs] btrfs_insert_empty_items+0x64/0xc0 [btrfs] __btrfs_commit_inode_delayed_items+0xb2/0x840 [btrfs] btrfs_async_run_delayed_root+0x10e/0x1d0 [btrfs] btrfs_work_helper+0x2f9/0x650 [btrfs] process_one_work+0x22c/0x600 worker_thread+0x50/0x3b0 kthread+0x137/0x150 ret_from_fork+0x1f/0x30 -> #0 (&delayed_node->mutex){+.+.}-{3:3}: check_prev_add+0x98/0xa20 validate_chain+0xa8c/0x2a00 __lock_acquire+0x56f/0xaa0 lock_acquire+0xa3/0x440 __mutex_lock+0xa0/0xaf0 __btrfs_release_delayed_node.part.0+0x3f/0x310 [btrfs] btrfs_evict_inode+0x3bf/0x560 [btrfs] evict+0xd6/0x1c0 dispose_list+0x48/0x70 prune_icache_sb+0x54/0x80 super_cache_scan+0x121/0x1a0 do_shrink_slab+0x175/0x420 shrink_slab+0xb1/0x2e0 shrink_node+0x192/0x600 balance_pgdat+0x31f/0x750 kswapd+0x206/0x510 kthread+0x137/0x150 ret_from_fork+0x1f/0x30 other info that might help us debug this: Chain exists of: &delayed_node->mutex --> &fs_info->chunk_mutex --> fs_reclaim Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(&fs_info->chunk_mutex); lock(fs_reclaim); lock(&delayed_node->mutex); *** DEADLOCK *** 3 locks held by kswapd0/75: #0: ffffffff8b0c8040 (fs_reclaim){+.+.}-{0:0}, at: __fs_reclaim_acquire+0x5/0x30 #1: ffffffff8b0b50b8 (shrinker_rwsem){++++}-{3:3}, at: shrink_slab+0x54/0x2e0 #2: ffffa040e057c0e8 (&type->s_umount_key#26){++++}-{3:3}, at: trylock_super+0x16/0x50 stack backtrace: CPU: 2 PID: 75 Comm: kswapd0 Not tainted 5.8.0-rc6-default+ #1191 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014 Call Trace: dump_stack+0x78/0xa0 check_noncircular+0x16f/0x190 check_prev_add+0x98/0xa20 validate_chain+0xa8c/0x2a00 __lock_acquire+0x56f/0xaa0 lock_acquire+0xa3/0x440 ? __btrfs_release_delayed_node.part.0+0x3f/0x310 [btrfs] __mutex_lock+0xa0/0xaf0 ? __btrfs_release_delayed_node.part.0+0x3f/0x310 [btrfs] ? __lock_acquire+0x56f/0xaa0 ? __btrfs_release_delayed_node.part.0+0x3f/0x310 [btrfs] ? lock_acquire+0xa3/0x440 ? btrfs_evict_inode+0x138/0x560 [btrfs] ? btrfs_evict_inode+0x2fe/0x560 [btrfs] ? __btrfs_release_delayed_node.part.0+0x3f/0x310 [btrfs] __btrfs_release_delayed_node.part.0+0x3f/0x310 [btrfs] btrfs_evict_inode+0x3bf/0x560 [btrfs] evict+0xd6/0x1c0 dispose_list+0x48/0x70 prune_icache_sb+0x54/0x80 super_cache_scan+0x121/0x1a0 do_shrink_slab+0x175/0x420 shrink_slab+0xb1/0x2e0 shrink_node+0x192/0x600 balance_pgdat+0x31f/0x750 kswapd+0x206/0x510 ? _raw_spin_unlock_irqrestore+0x3e/0x50 ? finish_wait+0x90/0x90 ? balance_pgdat+0x750/0x750 kthread+0x137/0x150 ? kthread_stop+0x2a0/0x2a0 ret_from_fork+0x1f/0x30 This is because we're holding the chunk_mutex while adding this device and adding its sysfs entries. We actually hold different locks in different places when calling this function, the dev_replace semaphore for instance in dev replace, so instead of moving this call around simply wrap it's operations in NOFS. CC: stable@vger.kernel.org # 4.14+ Reported-by: David Sterba Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit fbabd4a36faaf74c83142d0b3d950c11ec14fda1 Author: Josef Bacik Date: Tue Jul 21 10:38:37 2020 -0400 btrfs: return EROFS for BTRFS_FS_STATE_ERROR cases Eric reported seeing this message while running generic/475 BTRFS: error (device dm-3) in btrfs_sync_log:3084: errno=-117 Filesystem corrupted Full stack trace: BTRFS: error (device dm-0) in btrfs_commit_transaction:2323: errno=-5 IO failure (Error while writing out transaction) BTRFS info (device dm-0): forced readonly BTRFS warning (device dm-0): Skipping commit of aborted transaction. ------------[ cut here ]------------ BTRFS: error (device dm-0) in cleanup_transaction:1894: errno=-5 IO failure BTRFS: Transaction aborted (error -117) BTRFS warning (device dm-0): direct IO failed ino 3555 rw 0,0 sector 0x1c6480 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3555 rw 0,0 sector 0x1c6488 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3555 rw 0,0 sector 0x1c6490 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3555 rw 0,0 sector 0x1c6498 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3555 rw 0,0 sector 0x1c64a0 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3555 rw 0,0 sector 0x1c64a8 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3555 rw 0,0 sector 0x1c64b0 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3555 rw 0,0 sector 0x1c64b8 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3555 rw 0,0 sector 0x1c64c0 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3572 rw 0,0 sector 0x1b85e8 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3572 rw 0,0 sector 0x1b85f0 len 4096 err no 10 WARNING: CPU: 3 PID: 23985 at fs/btrfs/tree-log.c:3084 btrfs_sync_log+0xbc8/0xd60 [btrfs] BTRFS warning (device dm-0): direct IO failed ino 3548 rw 0,0 sector 0x1d4288 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3548 rw 0,0 sector 0x1d4290 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3548 rw 0,0 sector 0x1d4298 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3548 rw 0,0 sector 0x1d42a0 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3548 rw 0,0 sector 0x1d42a8 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3548 rw 0,0 sector 0x1d42b0 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3548 rw 0,0 sector 0x1d42b8 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3548 rw 0,0 sector 0x1d42c0 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3548 rw 0,0 sector 0x1d42c8 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 3548 rw 0,0 sector 0x1d42d0 len 4096 err no 10 CPU: 3 PID: 23985 Comm: fsstress Tainted: G W L 5.8.0-rc4-default+ #1181 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba527-rebuilt.opensuse.org 04/01/2014 RIP: 0010:btrfs_sync_log+0xbc8/0xd60 [btrfs] RSP: 0018:ffff909a44d17bd0 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000001 RCX: 0000000000000001 RDX: ffff8f3be41cb940 RSI: ffffffffb0108d2b RDI: ffffffffb0108ff7 RBP: ffff909a44d17e70 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000037988 R12: ffff8f3bd20e4000 R13: ffff8f3bd20e4428 R14: 00000000ffffff8b R15: ffff909a44d17c70 FS: 00007f6a6ed3fb80(0000) GS:ffff8f3c3dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f6a6ed3e000 CR3: 00000000525c0003 CR4: 0000000000160ee0 Call Trace: ? finish_wait+0x90/0x90 ? __mutex_unlock_slowpath+0x45/0x2a0 ? lock_acquire+0xa3/0x440 ? lockref_put_or_lock+0x9/0x30 ? dput+0x20/0x4a0 ? dput+0x20/0x4a0 ? do_raw_spin_unlock+0x4b/0xc0 ? _raw_spin_unlock+0x1f/0x30 btrfs_sync_file+0x335/0x490 [btrfs] do_fsync+0x38/0x70 __x64_sys_fsync+0x10/0x20 do_syscall_64+0x50/0xe0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f6a6ef1b6e3 Code: Bad RIP value. RSP: 002b:00007ffd01e20038 EFLAGS: 00000246 ORIG_RAX: 000000000000004a RAX: ffffffffffffffda RBX: 000000000007a120 RCX: 00007f6a6ef1b6e3 RDX: 00007ffd01e1ffa0 RSI: 00007ffd01e1ffa0 RDI: 0000000000000003 RBP: 0000000000000003 R08: 0000000000000001 R09: 00007ffd01e2004c R10: 0000000000000000 R11: 0000000000000246 R12: 000000000000009f R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 irq event stamp: 0 hardirqs last enabled at (0): [<0000000000000000>] 0x0 hardirqs last disabled at (0): [] copy_process+0x67b/0x1b00 softirqs last enabled at (0): [] copy_process+0x67b/0x1b00 softirqs last disabled at (0): [<0000000000000000>] 0x0 ---[ end trace af146e0e38433456 ]--- BTRFS: error (device dm-0) in btrfs_sync_log:3084: errno=-117 Filesystem corrupted This ret came from btrfs_write_marked_extents(). If we get an aborted transaction via EIO before, we'll see it in btree_write_cache_pages() and return EUCLEAN, which gets printed as "Filesystem corrupted". Except we shouldn't be returning EUCLEAN here, we need to be returning EROFS because EUCLEAN is reserved for actual corruption, not IO errors. We are inconsistent about our handling of BTRFS_FS_STATE_ERROR elsewhere, but we want to use EROFS for this particular case. The original transaction abort has the real error code for why we ended up with an aborted transaction, all subsequent actions just need to return EROFS because they may not have a trans handle and have no idea about the original cause of the abort. After patch "btrfs: don't WARN if we abort a transaction with EROFS" the stacktrace will not be dumped either. Reported-by: Eric Sandeen CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add full test stacktrace ] Signed-off-by: David Sterba commit 59131393434b49a313cfeb11ae880e13149d13b6 Author: Josef Bacik Date: Tue Jul 21 11:24:28 2020 -0400 btrfs: document special case error codes for fs errors We've had some discussions about what to do in certain scenarios for error codes, specifically EUCLEAN and EROFS. Document these near the error handling code so its clear what their intentions are. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit f95ebdbed46a4d8b9fdb7bff109fdbb6fc9a6dc8 Author: Josef Bacik Date: Tue Jul 21 11:24:27 2020 -0400 btrfs: don't WARN if we abort a transaction with EROFS If we got some sort of corruption via a read and call btrfs_handle_fs_error() we'll set BTRFS_FS_STATE_ERROR on the fs and complain. If a subsequent trans handle trips over this it'll get EROFS and then abort. However at that point we're not aborting for the original reason, we're aborting because we've been flipped read only. We do not need to WARN_ON() here. CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3ebac17ce593490bff48d8eb0b4b97b97d8609fa Author: Filipe Manana Date: Wed Jul 15 12:30:43 2020 +0100 btrfs: reduce contention on log trees when logging checksums The possibility of extents being shared (through clone and deduplication operations) requires special care when logging data checksums, to avoid having a log tree with different checksum items that cover ranges which overlap (which resulted in missing checksums after replaying a log tree). Such problems were fixed in the past by the following commits: commit 40e046acbd2f ("Btrfs: fix missing data checksums after replaying a log tree") commit e289f03ea79b ("btrfs: fix corrupt log due to concurrent fsync of inodes with shared extents") Test case generic/588 exercises the scenario solved by the first commit (purely sequential and deterministic) while test case generic/457 often triggered the case fixed by the second commit (not deterministic, requires specific timings under concurrency). The problems were addressed by deleting, from the log tree, any existing checksums before logging the new ones. And also by doing the deletion and logging of the cheksums while locking the checksum range in an extent io tree (root->log_csum_range), to deal with the case where we have concurrent fsyncs against files with shared extents. That however causes more contention on the leaves of a log tree where we store checksums (and all the nodes in the paths leading to them), even when we do not have shared extents, or all the shared extents were created by past transactions. It also adds a bit of contention on the spin lock of the log_csums_range extent io tree of the log root. This change adds a 'last_reflink_trans' field to the inode to keep track of the last transaction where a new extent was shared between inodes (through clone and deduplication operations). It is updated for both the source and destination inodes of reflink operations whenever a new extent (created in the current transaction) becomes shared by the inodes. This field is kept in memory only, not persisted in the inode item, similar to other existing fields (last_unlink_trans, logged_trans). When logging checksums for an extent, if the value of 'last_reflink_trans' is smaller then the current transaction's generation/id, we skip locking the extent range and deletion of checksums from the log tree, since we know we do not have new shared extents. This reduces contention on the log tree's leaves where checksums are stored. The following script, which uses fio, was used to measure the impact of this change: $ cat test-fsync.sh #!/bin/bash DEV=/dev/sdk MNT=/mnt/sdk MOUNT_OPTIONS="-o ssd" MKFS_OPTIONS="-d single -m single" if [ $# -ne 3 ]; then echo "Use $0 NUM_JOBS FILE_SIZE FSYNC_FREQ" exit 1 fi NUM_JOBS=$1 FILE_SIZE=$2 FSYNC_FREQ=$3 cat < /tmp/fio-job.ini [writers] rw=write fsync=$FSYNC_FREQ fallocate=none group_reporting=1 direct=0 bs=64k ioengine=sync size=$FILE_SIZE directory=$MNT numjobs=$NUM_JOBS EOF echo "Using config:" echo cat /tmp/fio-job.ini echo mkfs.btrfs -f $MKFS_OPTIONS $DEV mount $MOUNT_OPTIONS $DEV $MNT fio /tmp/fio-job.ini umount $MNT The tests were performed for different numbers of jobs, file sizes and fsync frequency. A qemu VM using kvm was used, with 8 cores (the host has 12 cores, with cpu governance set to performance mode on all cores), 16GiB of ram (the host has 64GiB) and using a NVMe device directly (without an intermediary filesystem in the host). While running the tests, the host was not used for anything else, to avoid disturbing the tests. The obtained results were the following (the last line of fio's output was pasted). Starting with 16 jobs is where a significant difference is observable in this particular setup and hardware (differences highlighted below). The very small differences for tests with less than 16 jobs are possibly just noise and random. **** 1 job, file size 1G, fsync frequency 1 **** before this change: WRITE: bw=23.8MiB/s (24.9MB/s), 23.8MiB/s-23.8MiB/s (24.9MB/s-24.9MB/s), io=1024MiB (1074MB), run=43075-43075msec after this change: WRITE: bw=24.4MiB/s (25.6MB/s), 24.4MiB/s-24.4MiB/s (25.6MB/s-25.6MB/s), io=1024MiB (1074MB), run=41938-41938msec **** 2 jobs, file size 1G, fsync frequency 1 **** before this change: WRITE: bw=37.7MiB/s (39.5MB/s), 37.7MiB/s-37.7MiB/s (39.5MB/s-39.5MB/s), io=2048MiB (2147MB), run=54351-54351msec after this change: WRITE: bw=37.7MiB/s (39.5MB/s), 37.6MiB/s-37.6MiB/s (39.5MB/s-39.5MB/s), io=2048MiB (2147MB), run=54428-54428msec **** 4 jobs, file size 1G, fsync frequency 1 **** before this change: WRITE: bw=67.5MiB/s (70.8MB/s), 67.5MiB/s-67.5MiB/s (70.8MB/s-70.8MB/s), io=4096MiB (4295MB), run=60669-60669msec after this change: WRITE: bw=68.6MiB/s (71.0MB/s), 68.6MiB/s-68.6MiB/s (71.0MB/s-71.0MB/s), io=4096MiB (4295MB), run=59678-59678msec **** 8 jobs, file size 1G, fsync frequency 1 **** before this change: WRITE: bw=128MiB/s (134MB/s), 128MiB/s-128MiB/s (134MB/s-134MB/s), io=8192MiB (8590MB), run=64048-64048msec after this change: WRITE: bw=129MiB/s (135MB/s), 129MiB/s-129MiB/s (135MB/s-135MB/s), io=8192MiB (8590MB), run=63405-63405msec **** 16 jobs, file size 1G, fsync frequency 1 **** before this change: WRITE: bw=78.5MiB/s (82.3MB/s), 78.5MiB/s-78.5MiB/s (82.3MB/s-82.3MB/s), io=16.0GiB (17.2GB), run=208676-208676msec after this change: WRITE: bw=110MiB/s (115MB/s), 110MiB/s-110MiB/s (115MB/s-115MB/s), io=16.0GiB (17.2GB), run=149295-149295msec (+40.1% throughput, -28.5% runtime) **** 32 jobs, file size 1G, fsync frequency 1 **** before this change: WRITE: bw=58.8MiB/s (61.7MB/s), 58.8MiB/s-58.8MiB/s (61.7MB/s-61.7MB/s), io=32.0GiB (34.4GB), run=557134-557134msec after this change: WRITE: bw=76.1MiB/s (79.8MB/s), 76.1MiB/s-76.1MiB/s (79.8MB/s-79.8MB/s), io=32.0GiB (34.4GB), run=430550-430550msec (+29.4% throughput, -22.7% runtime) **** 64 jobs, file size 512M, fsync frequency 1 **** before this change: WRITE: bw=65.8MiB/s (68.0MB/s), 65.8MiB/s-65.8MiB/s (68.0MB/s-68.0MB/s), io=32.0GiB (34.4GB), run=498055-498055msec after this change: WRITE: bw=85.1MiB/s (89.2MB/s), 85.1MiB/s-85.1MiB/s (89.2MB/s-89.2MB/s), io=32.0GiB (34.4GB), run=385116-385116msec (+29.3% throughput, -22.7% runtime) **** 128 jobs, file size 256M, fsync frequency 1 **** before this change: WRITE: bw=54.7MiB/s (57.3MB/s), 54.7MiB/s-54.7MiB/s (57.3MB/s-57.3MB/s), io=32.0GiB (34.4GB), run=599373-599373msec after this change: WRITE: bw=121MiB/s (126MB/s), 121MiB/s-121MiB/s (126MB/s-126MB/s), io=32.0GiB (34.4GB), run=271907-271907msec (+121.2% throughput, -54.6% runtime) **** 256 jobs, file size 256M, fsync frequency 1 **** before this change: WRITE: bw=69.2MiB/s (72.5MB/s), 69.2MiB/s-69.2MiB/s (72.5MB/s-72.5MB/s), io=64.0GiB (68.7GB), run=947536-947536msec after this change: WRITE: bw=121MiB/s (127MB/s), 121MiB/s-121MiB/s (127MB/s-127MB/s), io=64.0GiB (68.7GB), run=541916-541916msec (+74.9% throughput, -42.8% runtime) **** 512 jobs, file size 128M, fsync frequency 1 **** before this change: WRITE: bw=85.4MiB/s (89.5MB/s), 85.4MiB/s-85.4MiB/s (89.5MB/s-89.5MB/s), io=64.0GiB (68.7GB), run=767734-767734msec after this change: WRITE: bw=141MiB/s (147MB/s), 141MiB/s-141MiB/s (147MB/s-147MB/s), io=64.0GiB (68.7GB), run=466022-466022msec (+65.1% throughput, -39.3% runtime) **** 1024 jobs, file size 128M, fsync frequency 1 **** before this change: WRITE: bw=115MiB/s (120MB/s), 115MiB/s-115MiB/s (120MB/s-120MB/s), io=128GiB (137GB), run=1143775-1143775msec after this change: WRITE: bw=171MiB/s (180MB/s), 171MiB/s-171MiB/s (180MB/s-180MB/s), io=128GiB (137GB), run=764843-764843msec (+48.7% throughput, -33.1% runtime) Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit b69d1ee923ec59533672ff4953ab45c57576bce0 Author: Nikolay Borisov Date: Thu Jul 16 18:17:19 2020 +0300 btrfs: remove done label in writepage_delalloc Since there is not common cleanup run after the label it makes it somewhat redundant. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit fd7fb634d69a7d8c91aa3166b77351b96954aae4 Author: Qu Wenruo Date: Mon Jul 13 09:03:22 2020 +0800 btrfs: add comments for btrfs_reserve_flush_enum This enum is the interface exposed to developers. Although we have a detailed comment explaining the whole idea of space flushing at the beginning of space-info.c, the exposed enum interface doesn't have any comment. Some corner cases, like BTRFS_RESERVE_FLUSH_ALL and BTRFS_RESERVE_FLUSH_ALL_STEAL can be interrupted by fatal signals, are not explained at all. So add some simple comments for these enums as a quick reference. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 44d354abf33e92a5e73b965c84caf5a5d5e58a0b Author: Qu Wenruo Date: Mon Jul 13 09:03:21 2020 +0800 btrfs: relocation: review the call sites which can be interrupted by signal Since most metadata reservation calls can return -EINTR when get interrupted by fatal signal, we need to review the all the metadata reservation call sites. In relocation code, the metadata reservation happens in the following sites: - btrfs_block_rsv_refill() in merge_reloc_root() merge_reloc_root() is a pretty critical section, we don't want to be interrupted by signal, so change the flush status to BTRFS_RESERVE_FLUSH_LIMIT, so it won't get interrupted by signal. Since such change can be ENPSPC-prone, also shrink the amount of metadata to reserve least amount avoid deadly ENOSPC there. - btrfs_block_rsv_refill() in reserve_metadata_space() It calls with BTRFS_RESERVE_FLUSH_LIMIT, which won't get interrupted by signal. - btrfs_block_rsv_refill() in prepare_to_relocate() - btrfs_block_rsv_add() in prepare_to_relocate() - btrfs_block_rsv_refill() in relocate_block_group() - btrfs_delalloc_reserve_metadata() in relocate_file_extent_cluster() - btrfs_start_transaction() in relocate_block_group() - btrfs_start_transaction() in create_reloc_inode() Can be interrupted by fatal signal and we can handle it easily. For these call sites, just catch the -EINTR value in btrfs_balance() and count them as canceled. CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit f3e3d9cc35252a70a2fd698762c9687718268ec6 Author: Qu Wenruo Date: Mon Jul 13 09:03:20 2020 +0800 btrfs: avoid possible signal interruption of btrfs_drop_snapshot() on relocation tree [BUG] There is a bug report about bad signal timing could lead to read-only fs during balance: BTRFS info (device xvdb): balance: start -d -m -s BTRFS info (device xvdb): relocating block group 73001861120 flags metadata BTRFS info (device xvdb): found 12236 extents, stage: move data extents BTRFS info (device xvdb): relocating block group 71928119296 flags data BTRFS info (device xvdb): found 3 extents, stage: move data extents BTRFS info (device xvdb): found 3 extents, stage: update data pointers BTRFS info (device xvdb): relocating block group 60922265600 flags metadata BTRFS: error (device xvdb) in btrfs_drop_snapshot:5505: errno=-4 unknown BTRFS info (device xvdb): forced readonly BTRFS info (device xvdb): balance: ended with status: -4 [CAUSE] The direct cause is the -EINTR from the following call chain when a fatal signal is pending: relocate_block_group() |- clean_dirty_subvols() |- btrfs_drop_snapshot() |- btrfs_start_transaction() |- btrfs_delayed_refs_rsv_refill() |- btrfs_reserve_metadata_bytes() |- __reserve_metadata_bytes() |- wait_reserve_ticket() |- prepare_to_wait_event(); |- ticket->error = -EINTR; Normally this behavior is fine for most btrfs_start_transaction() callers, as they need to catch any other error, same for the signal, and exit ASAP. However for balance, especially for the clean_dirty_subvols() case, we're already doing cleanup works, getting -EINTR from btrfs_drop_snapshot() could cause a lot of unexpected problems. From the mentioned forced read-only report, to later balance error due to half dropped reloc trees. [FIX] Fix this problem by using btrfs_join_transaction() if btrfs_drop_snapshot() is called from relocation context. Since btrfs_join_transaction() won't get interrupted by signal, we can continue the cleanup. CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba 3 Signed-off-by: David Sterba commit 5cb502f4ab6469c3d02bd787a3ff58a7b624ba67 Author: Qu Wenruo Date: Mon Jul 13 09:03:19 2020 +0800 btrfs: relocation: allow signal to cancel balance Although btrfs balance can be canceled with "btrfs balance cancel" command, it's still almost muscle memory to press Ctrl-C to cancel a long running btrfs balance. So allow btrfs balance to check signal to determine if it should exit. The cancellation points are in known location and we're only adding one more reason, so this should be safe. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 813f8a0e268bbc9bee3667f68ab9a3d8ea9df3a1 Author: Nikolay Borisov Date: Wed Jul 15 14:02:17 2020 +0300 btrfs: raid56: remove out label in __raid56_parity_recover There's no cleanup that occurs so we can simply return 0 directly. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit f37c563bab4297024c300b05c8f48430e323809d Author: David Sterba Date: Fri Jul 10 09:49:56 2020 +0200 btrfs: add missing check for nocow and compression inode flags User Forza reported on IRC that some invalid combinations of file attributes are accepted by chattr. The NODATACOW and compression file flags/attributes are mutually exclusive, but they could be set by 'chattr +c +C' on an empty file. The nodatacow will be in effect because it's checked first in btrfs_run_delalloc_range. Extend the flag validation to catch the following cases: - input flags are conflicting - old and new flags are conflicting - initialize the local variable with inode flags after inode ls locked Inode attributes take precedence over mount options and are an independent setting. Nocompress would be a no-op with nodatacow, but we don't want to mix any compression-related options with nodatacow. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: David Sterba commit 4faf55b03823e96c44dc4e364520000ed3b12fdb Author: Anand Jain Date: Fri Jul 10 14:37:38 2020 +0800 btrfs: don't traverse into the seed devices in show_devname ->show_devname currently shows the lowest devid in the list. As the seed devices have the lowest devid in the sprouted filesystem, the userland tool such as findmnt end up seeing seed device instead of the device from the read-writable sprouted filesystem. As shown below. mount /dev/sda /btrfs mount: /btrfs: WARNING: device write-protected, mounted read-only. findmnt --output SOURCE,TARGET,UUID /btrfs SOURCE TARGET UUID /dev/sda /btrfs 899f7027-3e46-4626-93e7-7d4c9ad19111 btrfs dev add -f /dev/sdb /btrfs umount /btrfs mount /dev/sdb /btrfs findmnt --output SOURCE,TARGET,UUID /btrfs SOURCE TARGET UUID /dev/sda /btrfs 899f7027-3e46-4626-93e7-7d4c9ad19111 All sprouts from a single seed will show the same seed device and the same fsid. That's confusing. This is causing problems in our prototype as there isn't any reference to the sprout file-system(s) which is being used for actual read and write. This was added in the patch which implemented the show_devname in btrfs commit 9c5085c14798 ("Btrfs: implement ->show_devname"). I tried to look for any particular reason that we need to show the seed device, there isn't any. So instead, do not traverse through the seed devices, just show the lowest devid in the sprouted fsid. After the patch: mount /dev/sda /btrfs mount: /btrfs: WARNING: device write-protected, mounted read-only. findmnt --output SOURCE,TARGET,UUID /btrfs SOURCE TARGET UUID /dev/sda /btrfs 899f7027-3e46-4626-93e7-7d4c9ad19111 btrfs dev add -f /dev/sdb /btrfs mount -o rw,remount /dev/sdb /btrfs findmnt --output SOURCE,TARGET,UUID /btrfs SOURCE TARGET UUID /dev/sdb /btrfs 595ca0e6-b82e-46b5-b9e2-c72a6928be48 mount /dev/sda /btrfs1 mount: /btrfs1: WARNING: device write-protected, mounted read-only. btrfs dev add -f /dev/sdc /btrfs1 findmnt --output SOURCE,TARGET,UUID /btrfs1 SOURCE TARGET UUID /dev/sdc /btrfs1 ca1dbb7a-8446-4f95-853c-a20f3f82bdbb cat /proc/self/mounts | grep btrfs /dev/sdb /btrfs btrfs rw,relatime,noacl,space_cache,subvolid=5,subvol=/ 0 0 /dev/sdc /btrfs1 btrfs ro,relatime,noacl,space_cache,subvolid=5,subvol=/ 0 0 Reported-by: Martin K. Petersen CC: stable@vger.kernel.org # 4.19+ Tested-by: Martin K. Petersen Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit a3cf0e4342b6af9e6b34a4b913c630fbd03a82ea Author: Qu Wenruo Date: Tue Jul 14 09:12:20 2020 +0800 btrfs: qgroup: free per-trans reserved space when a subvolume gets dropped [BUG] Sometime fsstress could lead to qgroup warning for case like generic/013: BTRFS warning (device dm-3): qgroup 0/259 has unreleased space, type 1 rsv 81920 ------------[ cut here ]------------ WARNING: CPU: 9 PID: 24535 at fs/btrfs/disk-io.c:4142 close_ctree+0x1dc/0x323 [btrfs] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:close_ctree+0x1dc/0x323 [btrfs] Call Trace: btrfs_put_super+0x15/0x17 [btrfs] generic_shutdown_super+0x72/0x110 kill_anon_super+0x18/0x30 btrfs_kill_super+0x17/0x30 [btrfs] deactivate_locked_super+0x3b/0xa0 deactivate_super+0x40/0x50 cleanup_mnt+0x135/0x190 __cleanup_mnt+0x12/0x20 task_work_run+0x64/0xb0 __prepare_exit_to_usermode+0x1bc/0x1c0 __syscall_return_slowpath+0x47/0x230 do_syscall_64+0x64/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ---[ end trace 6c341cdf9b6cc3c1 ]--- BTRFS error (device dm-3): qgroup reserved space leaked While that subvolume 259 is no longer in that filesystem. [CAUSE] Normally per-trans qgroup reserved space is freed when a transaction is committed, in commit_fs_roots(). However for completely dropped subvolume, that subvolume is completely gone, thus is no longer in the fs_roots_radix, and its per-trans reserved qgroup will never be freed. Since the subvolume is already gone, leaked per-trans space won't cause any trouble for end users. [FIX] Just call btrfs_qgroup_free_meta_all_pertrans() before a subvolume is completely dropped. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit d60ba8de1164e1b42e296ff270c622a070ef8fe7 Author: Tom Rix Date: Tue Jul 7 06:29:08 2020 -0700 btrfs: ref-verify: fix memory leak in add_block_entry clang static analysis flags this error fs/btrfs/ref-verify.c:290:3: warning: Potential leak of memory pointed to by 're' [unix.Malloc] kfree(be); ^~~~~ The problem is in this block of code: if (root_objectid) { struct root_entry *exist_re; exist_re = insert_root_entry(&exist->roots, re); if (exist_re) kfree(re); } There is no 'else' block freeing when root_objectid is 0. Add the missing kfree to the else branch. Fixes: fd708b81d972 ("Btrfs: add a extent ref verify tool") CC: stable@vger.kernel.org # 4.19+ Signed-off-by: Tom Rix Reviewed-by: David Sterba Signed-off-by: David Sterba commit d85327b1d8b74ec168ed34c798a424de82fdc001 Author: David Sterba Date: Wed Jul 8 22:55:14 2020 +0200 btrfs: prefetch chunk tree leaves at mount The whole chunk tree is read at mount time so we can utilize readahead to get the tree blocks to memory before we read the items. The idea is from Robbie, but instead of updating search slot readahead, this patch implements the chunk tree readahead manually from nodes on level 1. We've decided to do specific readahead optimizations and then unify them under a common API so we don't break everything by changing the search slot readahead logic. Higher chunk trees grow on large filesystems (many terabytes), and prefetching just level 1 seems to be sufficient. Provided example was from a 200TiB filesystem with chunk tree level 2. CC: Robbie Ko Reviewed-by: Josef Bacik Signed-off-by: David Sterba commit 49bac897683340457a0ab1f76b924a1220bdb604 Author: Johannes Thumshirn Date: Mon Jul 13 21:29:00 2020 +0900 btrfs: add metadata_uuid to FS_INFO ioctl Add retrieval of the filesystem's metadata UUID to the fsinfo ioctl. This is driven by setting the BTRFS_FS_INFO_FLAG_METADATA_UUID flag in btrfs_ioctl_fs_info_args::flags. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0fb408a558aadbaa58beb75b02c95741e1fbb514 Author: Johannes Thumshirn Date: Mon Jul 13 21:28:59 2020 +0900 btrfs: add filesystem generation to FS_INFO ioctl Add retrieval of the filesystem's generation to the fsinfo ioctl. This is driven by setting the BTRFS_FS_INFO_FLAG_GENERATION flag in btrfs_ioctl_fs_info_args::flags. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 137c541821a83debb63b3fa8abdd1cbc41bdf3a1 Author: Johannes Thumshirn Date: Mon Jul 13 21:28:58 2020 +0900 btrfs: pass checksum type via BTRFS_IOC_FS_INFO ioctl With the recent addition of filesystem checksum types other than CRC32c, it is not anymore hard-coded which checksum type a btrfs filesystem uses. Up to now there is no good way to read the filesystem checksum, apart from reading the filesystem UUID and then query sysfs for the checksum type. Add a new csum_type and csum_size fields to the BTRFS_IOC_FS_INFO ioctl command which usually is used to query filesystem features. Also add a flags member indicating that the kernel responded with a set csum_type and csum_size field. For compatibility reasons, only return the csum_type and csum_size if the BTRFS_FS_INFO_FLAG_CSUM_INFO flag was passed to the kernel. Also clear any unknown flags so we don't pass false positives to user-space newer than the kernel. To simplify further additions to the ioctl, also switch the padding to a u8 array. Pahole was used to verify the result of this switch: The csum members are added before flags, which might look odd, but this is to keep the alignment requirements and not to introduce holes in the structure. $ pahole -C btrfs_ioctl_fs_info_args fs/btrfs/btrfs.ko struct btrfs_ioctl_fs_info_args { __u64 max_id; /* 0 8 */ __u64 num_devices; /* 8 8 */ __u8 fsid[16]; /* 16 16 */ __u32 nodesize; /* 32 4 */ __u32 sectorsize; /* 36 4 */ __u32 clone_alignment; /* 40 4 */ __u16 csum_type; /* 44 2 */ __u16 csum_size; /* 46 2 */ __u64 flags; /* 48 8 */ __u8 reserved[968]; /* 56 968 */ /* size: 1024, cachelines: 16, members: 10 */ }; Fixes: 3951e7f050ac ("btrfs: add xxhash64 to checksumming algorithms") Fixes: 3831bf0094ab ("btrfs: add sha256 to checksumming algorithm") CC: stable@vger.kernel.org # 5.5+ Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit adca4d945c8dca28a85df45c5b117e6dac2e77f1 Author: Qu Wenruo Date: Mon Jul 13 18:50:49 2020 +0800 btrfs: qgroup: remove ASYNC_COMMIT mechanism in favor of reserve retry-after-EDQUOT commit a514d63882c3 ("btrfs: qgroup: Commit transaction in advance to reduce early EDQUOT") tries to reduce the early EDQUOT problems by checking the qgroup free against threshold and tries to wake up commit kthread to free some space. The problem of that mechanism is, it can only free qgroup per-trans metadata space, can't do anything to data, nor prealloc qgroup space. Now since we have the ability to flush qgroup space, and implemented retry-after-EDQUOT behavior, such mechanism can be completely replaced. So this patch will cleanup such mechanism in favor of retry-after-EDQUOT. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit c53e9653605dbf708f5be02902de51831be4b009 Author: Qu Wenruo Date: Mon Jul 13 18:50:48 2020 +0800 btrfs: qgroup: try to flush qgroup space when we get -EDQUOT [PROBLEM] There are known problem related to how btrfs handles qgroup reserved space. One of the most obvious case is the the test case btrfs/153, which do fallocate, then write into the preallocated range. btrfs/153 1s ... - output mismatch (see xfstests-dev/results//btrfs/153.out.bad) --- tests/btrfs/153.out 2019-10-22 15:18:14.068965341 +0800 +++ xfstests-dev/results//btrfs/153.out.bad 2020-07-01 20:24:40.730000089 +0800 @@ -1,2 +1,5 @@ QA output created by 153 +pwrite: Disk quota exceeded +/mnt/scratch/testfile2: Disk quota exceeded +/mnt/scratch/testfile2: Disk quota exceeded Silence is golden ... (Run 'diff -u xfstests-dev/tests/btrfs/153.out xfstests-dev/results//btrfs/153.out.bad' to see the entire diff) [CAUSE] Since commit c6887cd11149 ("Btrfs: don't do nocow check unless we have to"), we always reserve space no matter if it's COW or not. Such behavior change is mostly for performance, and reverting it is not a good idea anyway. For preallcoated extent, we reserve qgroup data space for it already, and since we also reserve data space for qgroup at buffered write time, it needs twice the space for us to write into preallocated space. This leads to the -EDQUOT in buffered write routine. And we can't follow the same solution, unlike data/meta space check, qgroup reserved space is shared between data/metadata. The EDQUOT can happen at the metadata reservation, so doing NODATACOW check after qgroup reservation failure is not a solution. [FIX] To solve the problem, we don't return -EDQUOT directly, but every time we got a -EDQUOT, we try to flush qgroup space: - Flush all inodes of the root NODATACOW writes will free the qgroup reserved at run_dealloc_range(). However we don't have the infrastructure to only flush NODATACOW inodes, here we flush all inodes anyway. - Wait for ordered extents This would convert the preallocated metadata space into per-trans metadata, which can be freed in later transaction commit. - Commit transaction This will free all per-trans metadata space. Also we don't want to trigger flush multiple times, so here we introduce a per-root wait list and a new root status, to ensure only one thread starts the flushing. Fixes: c6887cd11149 ("Btrfs: don't do nocow check unless we have to") Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 263da812e87bac4098a4778efaa32c54275641db Author: Qu Wenruo Date: Wed Jul 8 14:24:45 2020 +0800 btrfs: qgroup: allow to unreserve range without releasing other ranges [PROBLEM] Before this patch, when btrfs_qgroup_reserve_data() fails, we free all reserved space of the changeset. For example: ret = btrfs_qgroup_reserve_data(inode, changeset, 0, SZ_1M); ret = btrfs_qgroup_reserve_data(inode, changeset, SZ_1M, SZ_1M); ret = btrfs_qgroup_reserve_data(inode, changeset, SZ_2M, SZ_1M); If the last btrfs_qgroup_reserve_data() failed, it will release the entire [0, 3M) range. This behavior is kind of OK for now, as when we hit -EDQUOT, we normally go error handling and need to release all reserved ranges anyway. But this also means the following call is not possible: ret = btrfs_qgroup_reserve_data(); if (ret == -EDQUOT) { /* Do something to free some qgroup space */ ret = btrfs_qgroup_reserve_data(); } As if the first btrfs_qgroup_reserve_data() fails, it will free all reserved qgroup space. [CAUSE] This is because we release all reserved ranges when btrfs_qgroup_reserve_data() fails. [FIX] This patch will implement a new function, qgroup_unreserve_range(), to iterate through the ulist nodes, to find any nodes in the failure range, and remove the EXTENT_QGROUP_RESERVED bits from the io_tree, and decrease the extent_changeset::bytes_changed, so that we can revert to previous state. This allows later patches to retry btrfs_qgroup_reserve_data() if EDQUOT happens. Suggested-by: Josef Bacik Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 48aaeebe4e1f3c76a703dc40e9245af1753dcefe Author: Josef Bacik Date: Mon Jul 6 09:14:11 2020 -0400 btrfs: convert block group refcount to refcount_t We have refcount_t now with the associated library to handle refcounts, which gives us extra debugging around reference count mistakes that may be made. For example it'll warn on any transition from 0->1 or 0->-1, which is handy for noticing cases where we've messed up reference counting. Convert the block group ref counting from an atomic_t to refcount_t and use the appropriate helpers. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 60f8667b618e1cb2ded148a7b767bbb70d6c191c Author: Marcos Paulo de Souza Date: Mon Jul 6 11:59:36 2020 -0300 btrfs: add multi-statement protection to btrfs_set/clear_and_info macros Multi-statement macros should be enclosed in do/while(0) block to make their use safe in single statement if conditions. All current uses of the macros are safe, so this change is for future protection. Reviewed-by: Anand Jain Signed-off-by: Marcos Paulo de Souza Reviewed-by: David Sterba Signed-off-by: David Sterba commit 93c4c033ec66d1de90d03bc11b7b338a01188954 Author: Nikolay Borisov Date: Thu Jul 2 16:46:47 2020 +0300 btrfs: remove fail label in check_compressed_csum Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit b7d2083a368332b40309c16bb2e7d48ecc920489 Author: Nikolay Borisov Date: Thu Jul 2 16:46:46 2020 +0300 btrfs: raid56: don't opencode swap() in __raid_recover_end_io Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 830258632757cad2ffb5cbc86f266ca475caf4af Author: Nikolay Borisov Date: Thu Jul 2 16:46:45 2020 +0300 btrfs: raid56: use in_range where applicable While at it use the opportunity to simplify find_logical_bio_stripe by reducing the scope of 'stripe_start' variable and squash the sector-to-bytes conversion on one line. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit bf28a605e626a7c0169584f22f5dc96ce92ae813 Author: Nikolay Borisov Date: Thu Jul 2 16:46:43 2020 +0300 btrfs: raid56: assign bio in while() when using bio_list_pop Unify the style in the file such that return value of bio_list_pop is assigned directly in the while loop. This is in line with the rest of the kernel. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit f90ae76a5c2c746c06f11a1709e9149ab2666ea4 Author: Nikolay Borisov Date: Thu Jul 2 16:46:42 2020 +0300 btrfs: raid56: remove redundant device check in rbio_add_io_page The merging logic is always executed if the current stripe's device is not missing. So there's no point in duplicating the check. Simply remove it, while at it reduce the scope of the 'last_end' variable. If the current stripe's device is missing we fail the stripe early on. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 608769a4e41cceca6908f1807ebe95e0a07a21d3 Author: Nikolay Borisov Date: Thu Jul 2 16:46:41 2020 +0300 btrfs: always initialize btrfs_bio::tgtdev_map/raid_map pointers Since btrfs_bio always contains the extra space for the tgtdev_map and raid_maps it's pointless to make the assignment iff specific conditions are met. Instead, always assign the pointers to their correct value at allocation time. To accommodate this change also move code a bit in __btrfs_map_block so that btrfs_bio::stripes array is always initialized before the raid_map, subsequently move the call to sort_parity_stripes in the 'if' building the raid_map, retaining the old behavior. To better understand the change, there are 2 aspects to this: 1. The original code is harder to grasp because the calculations for initializing raid_map/tgtdev ponters are apart from the initial allocation of memory. Having them predicated on 2 separate checks doesn't help that either... So by moving the initialisation in alloc_btrfs_bio puts everything together. 2. tgtdev/raid_maps are now always initialized despite sometimes they might be equal i.e __btrfs_map_block_for_discard calls alloc_btrfs_bio with tgtdev = 0 but their usage should be predicated on external checks i.e. just because those pointers are non-null doesn't mean they are valid per-se. And actually while taking another look at __btrfs_map_block I saw a discrepancy: Original code initialised tgtdev_map if the following check is true: if (dev_replace_is_ongoing && dev_replace->tgtdev != NULL) However, further down tgtdev_map is only used if the following check is true: if (dev_replace_is_ongoing && dev_replace->tgtdev != NULL && need_full_stripe(op)) e.g. the additional need_full_stripe(op) predicate is there. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ copy more details from mail discussion ] Signed-off-by: David Sterba commit 3092c68fc58c7bd54a6dde8d42ef05beb41890f5 Author: Nikolay Borisov Date: Fri Jul 3 11:13:15 2020 +0300 btrfs: sysfs: add bdi link to the fsid directory Since BTRFS uses a private bdi it makes sense to create a link to this bdi under /sys/fs/btrfs//bdi. This allows size of read ahead to be controlled. Without this patch it's not possible to uniquely identify which bdi pertains to which btrfs filesystem in the case of multiple btrfs filesystems. It's fine to simply call sysfs_remove_link without checking if the link indeed has been created. The call path sysfs_remove_link kernfs_remove_by_name kernfs_remove_by_name_ns will simply return -ENOENT in case it doesn't exist. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5a9472fe7ffecf7390ddcb379fc4d65d392e2373 Author: Nikolay Borisov Date: Thu Jul 2 15:23:34 2020 +0300 btrfs: increment corrupt device counter during compressed read If a compressed read fails due to checksum error only a line is printed to dmesg, device corrupt counter is not modified. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 26056eab4bf7b7b1a690c0242bd1cc21e050349a Author: Nikolay Borisov Date: Thu Jul 2 15:23:33 2020 +0300 btrfs: remove needless ASSERT check of orig_bio in end_compressed_bio_read compressed_bio::orig_bio is always set in btrfs_submit_compressed_read before any bio submission is performed. Since that function is always called with a valid bio it renders the ASSERT unnecessary. Reviewed-by: Josef Bacik Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 814723e0a55a9576b1d17f4fa8811086a24dd3e8 Author: Nikolay Borisov Date: Thu Jul 2 15:23:32 2020 +0300 btrfs: increment device corruption error in case of checksum error Now that btrfs_io_bio have access to btrfs_device we can safely increment the device corruption counter on error. There is one notable exception - repair bios for raid. Since those don't go through the normal submit_stripe_bio callpath but through raid56_parity_recover thus repair bios won't have their device set. Scrub increments the corruption counter for checksum mismatch as well but does not call this function. Link: https://lore.kernel.org/linux-btrfs/4857863.FCrPRfMyHP@liv/ Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3eee86c8fd9a9cdeba7afa943ae00bd166e2899a Author: Nikolay Borisov Date: Thu Jul 2 15:23:31 2020 +0300 btrfs: don't check for btrfs_device::bdev in btrfs_end_bio btrfs_map_bio ensures that all submitted bios to devices have valid btrfs_device::bdev so this check can be removed from btrfs_end_bio. This check was added in june 2012 597a60fadedf ("Btrfs: don't count I/O statistic read errors for missing devices") but then in October of the same year another commit de1ee92ac3bc ("Btrfs: recheck bio against block device when we map the bio") started checking for the presence of btrfs_device::bdev before actually issuing the bio. Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c31efbdf23a09468c9352f05443d5624dbbfd3c7 Author: Nikolay Borisov Date: Fri Jul 3 11:14:27 2020 +0300 btrfs: record btrfs_device directly in btrfs_io_bio Instead of recording stripe_index and using that to access correct btrfs_device from btrfs_bio::stripes record the btrfs_device in btrfs_io_bio. This will enable endio handlers to increment device error counters on checksum errors. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3526302f26162ae738926d44eb39e2e0780b11bc Author: Nikolay Borisov Date: Thu Jul 2 15:23:29 2020 +0300 btrfs: streamline btrfs_get_io_failure_record logic Make the function directly return a pointer to a failure record and adjust callers to handle it. Also refactor the logic inside so that the case which allocates the failure record for the first time is not handled in an 'if' arm, saving us a level of indentation. Finally make the function static as it's not used outside of extent_io.c . Reviewed-by: Josef Bacik Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2279a270534c678e78f961fed8e09c9c69611ceb Author: Nikolay Borisov Date: Thu Jul 2 15:23:28 2020 +0300 btrfs: make get_state_failrec return failrec directly Only failure that get_state_failrec can get is if there is no failure for the given address. There is no reason why the function should return a status code and use a separate parameter for returning the actual failure rec (if one is found). Simplify it by making the return type a pointer and return ERR_PTR value in case of errors. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit b90a4ab6ba9cce79a1ac06a250d5fc8c3dff382b Author: David Sterba Date: Wed Jul 1 17:08:43 2020 +0200 btrfs: remove deprecated mount option subvolrootid The option subvolrootid used to be a workaround for mounting subvolumes and ineffective since 5e2a4b25da23 ("btrfs: deprecate subvolrootid mount option"). We have subvol= that works and we don't need to keep the cruft, let's remove it. Signed-off-by: David Sterba commit d801e7a3557ecc995bdfd6f142a36f0bb774c737 Author: David Sterba Date: Wed Jul 1 17:02:34 2020 +0200 btrfs: remove deprecated mount option alloc_start The mount option alloc_start has no effect since 0d0c71b31720 ("btrfs: obsolete and remove mount option alloc_start") which has details why it's been deprecated. We can remove it. Signed-off-by: David Sterba commit a93e01682e283f6de09d6ce8f805dc52a2e942fb Author: Filipe Manana Date: Thu Jul 2 12:32:40 2020 +0100 btrfs: remove no longer needed use of log_writers for the log root tree When syncing the log, we used to update the log root tree without holding neither the log_mutex of the subvolume root nor the log_mutex of log root tree. We used to have two critical sections delimited by the log_mutex of the log root tree, so in the first one we incremented the log_writers of the log root tree and on the second one we decremented it and waited for the log_writers counter to go down to zero. This was because the update of the log root tree happened between the two critical sections. The use of two critical sections allowed a little bit more of parallelism and required the use of the log_writers counter, necessary to make sure we didn't miss any log root tree update when we have multiple tasks trying to sync the log in parallel. However after commit 06989c799f0481 ("Btrfs: fix race updating log root item during fsync") the log root tree update was moved into a critical section delimited by the subvolume's log_mutex. Later another commit moved the log tree update from that critical section into the second critical section delimited by the log_mutex of the log root tree. Both commits addressed different bugs. The end result is that the first critical section delimited by the log_mutex of the log root tree became pointless, since there's nothing done between it and the second critical section, we just have an unlock of the log_mutex followed by a lock operation. This means we can merge both critical sections, as the first one does almost nothing now, and we can stop using the log_writers counter of the log root tree, which was incremented in the first critical section and decremented in the second criticial section, used to make sure no one in the second critical section started writeback of the log root tree before some other task updated it. So just remove the mutex_unlock() followed by mutex_lock() of the log root tree, as well as the use of the log_writers counter for the log root tree. This patch is part of a series that has the following patches: 1/4 btrfs: only commit the delayed inode when doing a full fsync 2/4 btrfs: only commit delayed items at fsync if we are logging a directory 3/4 btrfs: stop incremening log_batch for the log root tree when syncing log 4/4 btrfs: remove no longer needed use of log_writers for the log root tree After the entire patchset applied I saw about 12% decrease on max latency reported by dbench. The test was done on a qemu vm, with 8 cores, 16Gb of ram, using kvm and using a raw NVMe device directly (no intermediary fs on the host). The test was invoked like the following: mkfs.btrfs -f /dev/sdk mount -o ssd -o nospace_cache /dev/sdk /mnt/sdk dbench -D /mnt/sdk -t 300 8 umount /mnt/dsk CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 28a9579561bcb9082715e720eac93012e708ab94 Author: Filipe Manana Date: Thu Jul 2 12:32:31 2020 +0100 btrfs: stop incremening log_batch for the log root tree when syncing log We are incrementing the log_batch atomic counter of the root log tree but we never use that counter, it's used only for the log trees of subvolume roots. We started doing it when we moved the log_batch and log_write counters from the global, per fs, btrfs_fs_info structure, into the btrfs_root structure in commit 7237f1833601dc ("Btrfs: fix tree logs parallel sync"). So just stop doing it for the log root tree and add a comment over the field declaration so inform it's used only for log trees of subvolume roots. This patch is part of a series that has the following patches: 1/4 btrfs: only commit the delayed inode when doing a full fsync 2/4 btrfs: only commit delayed items at fsync if we are logging a directory 3/4 btrfs: stop incremening log_batch for the log root tree when syncing log 4/4 btrfs: remove no longer needed use of log_writers for the log root tree After the entire patchset applied I saw about 12% decrease on max latency reported by dbench. The test was done on a qemu vm, with 8 cores, 16Gb of ram, using kvm and using a raw NVMe device directly (no intermediary fs on the host). The test was invoked like the following: mkfs.btrfs -f /dev/sdk mount -o ssd -o nospace_cache /dev/sdk /mnt/sdk dbench -D /mnt/sdk -t 300 8 umount /mnt/dsk CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 5aa7d1a7f4a2f8ca6be1f32415e9365d026e8fa7 Author: Filipe Manana Date: Thu Jul 2 12:32:20 2020 +0100 btrfs: only commit delayed items at fsync if we are logging a directory When logging an inode we are committing its delayed items if either the inode is a directory or if it is a new inode, created in the current transaction. We need to do it for directories, since new directory indexes are stored as delayed items of the inode and when logging a directory we need to be able to access all indexes from the fs/subvolume tree in order to figure out which index ranges need to be logged. However for new inodes that are not directories, we do not need to do it because the only type of delayed item they can have is the inode item, and we are guaranteed to always log an up to date version of the inode item: *) for a full fsync we do it by committing the delayed inode and then copying the item from the fs/subvolume tree with copy_inode_items_to_log(); *) for a fast fsync we always log the inode item based on the contents of the in-memory struct btrfs_inode. We guarantee this is always done since commit e4545de5b035c7 ("Btrfs: fix fsync data loss after append write"). So stop running delayed items for a new inodes that are not directories, since that forces committing the delayed inode into the fs/subvolume tree, wasting time and adding contention to the tree when a full fsync is not required. We will only do it in case a fast fsync is needed. This patch is part of a series that has the following patches: 1/4 btrfs: only commit the delayed inode when doing a full fsync 2/4 btrfs: only commit delayed items at fsync if we are logging a directory 3/4 btrfs: stop incremening log_batch for the log root tree when syncing log 4/4 btrfs: remove no longer needed use of log_writers for the log root tree After the entire patchset applied I saw about 12% decrease on max latency reported by dbench. The test was done on a qemu vm, with 8 cores, 16Gb of ram, using kvm and using a raw NVMe device directly (no intermediary fs on the host). The test was invoked like the following: mkfs.btrfs -f /dev/sdk mount -o ssd -o nospace_cache /dev/sdk /mnt/sdk dbench -D /mnt/sdk -t 300 8 umount /mnt/dsk CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 8c8648dd1f6d62aeb912deeb788b6ac33cb782e7 Author: Filipe Manana Date: Thu Jul 2 12:31:59 2020 +0100 btrfs: only commit the delayed inode when doing a full fsync Commit 2c2c452b0cafdc ("Btrfs: fix fsync when extend references are added to an inode") forced a commit of the delayed inode when logging an inode in order to ensure we would end up logging the inode item during a full fsync. By committing the delayed inode, we updated the inode item in the fs/subvolume tree and then later when copying items from leafs modified in the current transaction into the log tree (with copy_inode_items_to_log()) we ended up copying the inode item from the fs/subvolume tree into the log tree. Logging an up to date version of the inode item is required to make sure at log replay time we get the link count fixup triggered among other things (replay xattr deletes, etc). The test case generic/040 from fstests exercises the bug which that commit fixed. However for a fast fsync we don't need to commit the delayed inode because we always log an up to date version of the inode item based on the struct btrfs_inode we have in-memory. We started doing this for fast fsyncs since commit e4545de5b035c7 ("Btrfs: fix fsync data loss after append write"). So just stop committing the delayed inode if we are doing a fast fsync, we are only wasting time and adding contention on fs/subvolume tree. This patch is part of a series that has the following patches: 1/4 btrfs: only commit the delayed inode when doing a full fsync 2/4 btrfs: only commit delayed items at fsync if we are logging a directory 3/4 btrfs: stop incremening log_batch for the log root tree when syncing log 4/4 btrfs: remove no longer needed use of log_writers for the log root tree After the entire patchset applied I saw about 12% decrease on max latency reported by dbench. The test was done on a qemu vm, with 8 cores, 16Gb of ram, using kvm and using a raw NVMe device directly (no intermediary fs on the host). The test was invoked like the following: mkfs.btrfs -f /dev/sdk mount -o ssd -o nospace_cache /dev/sdk /mnt/sdk dbench -D /mnt/sdk -t 300 8 umount /mnt/dsk CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 2dfb1e43f57dd3aeaa66f7cf05d068db2d4c8788 Author: Qu Wenruo Date: Tue Jun 16 10:17:36 2020 +0800 btrfs: preallocate anon block device at first phase of snapshot creation [BUG] When the anonymous block device pool is exhausted, subvolume/snapshot creation fails with EMFILE (Too many files open). This has been reported by a user. The allocation happens in the second phase during transaction commit where it's only way out is to abort the transaction BTRFS: Transaction aborted (error -24) WARNING: CPU: 17 PID: 17041 at fs/btrfs/transaction.c:1576 create_pending_snapshot+0xbc4/0xd10 [btrfs] RIP: 0010:create_pending_snapshot+0xbc4/0xd10 [btrfs] Call Trace: create_pending_snapshots+0x82/0xa0 [btrfs] btrfs_commit_transaction+0x275/0x8c0 [btrfs] btrfs_mksubvol+0x4b9/0x500 [btrfs] btrfs_ioctl_snap_create_transid+0x174/0x180 [btrfs] btrfs_ioctl_snap_create_v2+0x11c/0x180 [btrfs] btrfs_ioctl+0x11a4/0x2da0 [btrfs] do_vfs_ioctl+0xa9/0x640 ksys_ioctl+0x67/0x90 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x5a/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ---[ end trace 33f2f83f3d5250e9 ]--- BTRFS: error (device sda1) in create_pending_snapshot:1576: errno=-24 unknown BTRFS info (device sda1): forced readonly BTRFS warning (device sda1): Skipping commit of aborted transaction. BTRFS: error (device sda1) in cleanup_transaction:1831: errno=-24 unknown [CAUSE] When the global anonymous block device pool is exhausted, the following call chain will fail, and lead to transaction abort: btrfs_ioctl_snap_create_v2() |- btrfs_ioctl_snap_create_transid() |- btrfs_mksubvol() |- btrfs_commit_transaction() |- create_pending_snapshot() |- btrfs_get_fs_root() |- btrfs_init_fs_root() |- get_anon_bdev() [FIX] Although we can't enlarge the anonymous block device pool, at least we can preallocate anon_dev for subvolume/snapshot in the first phase, outside of transaction context and exactly at the moment the user calls the creation ioctl. Reported-by: Greed Rong Link: https://lore.kernel.org/linux-btrfs/CA+UqX+NTrZ6boGnWHhSeZmEY5J76CTqmYjO2S+=tHJX7nb9DPw@mail.gmail.com/ CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 082b6c970f02fefd278c7833880cda29691a5f34 Author: Qu Wenruo Date: Tue Jun 16 10:17:37 2020 +0800 btrfs: free anon block device right after subvolume deletion [BUG] When a lot of subvolumes are created, there is a user report about transaction aborted caused by slow anonymous block device reclaim: BTRFS: Transaction aborted (error -24) WARNING: CPU: 17 PID: 17041 at fs/btrfs/transaction.c:1576 create_pending_snapshot+0xbc4/0xd10 [btrfs] RIP: 0010:create_pending_snapshot+0xbc4/0xd10 [btrfs] Call Trace: create_pending_snapshots+0x82/0xa0 [btrfs] btrfs_commit_transaction+0x275/0x8c0 [btrfs] btrfs_mksubvol+0x4b9/0x500 [btrfs] btrfs_ioctl_snap_create_transid+0x174/0x180 [btrfs] btrfs_ioctl_snap_create_v2+0x11c/0x180 [btrfs] btrfs_ioctl+0x11a4/0x2da0 [btrfs] do_vfs_ioctl+0xa9/0x640 ksys_ioctl+0x67/0x90 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x5a/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ---[ end trace 33f2f83f3d5250e9 ]--- BTRFS: error (device sda1) in create_pending_snapshot:1576: errno=-24 unknown BTRFS info (device sda1): forced readonly BTRFS warning (device sda1): Skipping commit of aborted transaction. BTRFS: error (device sda1) in cleanup_transaction:1831: errno=-24 unknown [CAUSE] The anonymous device pool is shared and its size is 1M. It's possible to hit that limit if the subvolume deletion is not fast enough and the subvolumes to be cleaned keep the ids allocated. [WORKAROUND] We can't avoid the anon device pool exhaustion but we can shorten the time the id is attached to the subvolume root once the subvolume becomes invisible to the user. Reported-by: Greed Rong Link: https://lore.kernel.org/linux-btrfs/CA+UqX+NTrZ6boGnWHhSeZmEY5J76CTqmYjO2S+=tHJX7nb9DPw@mail.gmail.com/ CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 851fd730a743e072badaf67caf39883e32439431 Author: Qu Wenruo Date: Tue Jun 16 10:17:34 2020 +0800 btrfs: don't allocate anonymous block device for user invisible roots [BUG] When a lot of subvolumes are created, there is a user report about transaction aborted: BTRFS: Transaction aborted (error -24) WARNING: CPU: 17 PID: 17041 at fs/btrfs/transaction.c:1576 create_pending_snapshot+0xbc4/0xd10 [btrfs] RIP: 0010:create_pending_snapshot+0xbc4/0xd10 [btrfs] Call Trace: create_pending_snapshots+0x82/0xa0 [btrfs] btrfs_commit_transaction+0x275/0x8c0 [btrfs] btrfs_mksubvol+0x4b9/0x500 [btrfs] btrfs_ioctl_snap_create_transid+0x174/0x180 [btrfs] btrfs_ioctl_snap_create_v2+0x11c/0x180 [btrfs] btrfs_ioctl+0x11a4/0x2da0 [btrfs] do_vfs_ioctl+0xa9/0x640 ksys_ioctl+0x67/0x90 __x64_sys_ioctl+0x1a/0x20 do_syscall_64+0x5a/0x110 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ---[ end trace 33f2f83f3d5250e9 ]--- BTRFS: error (device sda1) in create_pending_snapshot:1576: errno=-24 unknown BTRFS info (device sda1): forced readonly BTRFS warning (device sda1): Skipping commit of aborted transaction. BTRFS: error (device sda1) in cleanup_transaction:1831: errno=-24 unknown [CAUSE] The error is EMFILE (Too many files open) and comes from the anonymous block device allocation. The ids are in a shared pool of size 1<<20. The ids are assigned to live subvolumes, ie. the root structure exists in memory (eg. after creation or after the root appears in some path). The pool could be exhausted if the numbers are not reclaimed fast enough, after subvolume deletion or if other system component uses the anon block devices. [WORKAROUND] Since it's not possible to completely solve the problem, we can only minimize the time the id is allocated to a subvolume root. Firstly, we can reduce the use of anon_dev by trees that are not subvolume roots, like data reloc tree. This patch will do extra check on root objectid, to skip roots that don't need anon_dev. Currently it's only data reloc tree and orphan roots. Reported-by: Greed Rong Link: https://lore.kernel.org/linux-btrfs/CA+UqX+NTrZ6boGnWHhSeZmEY5J76CTqmYjO2S+=tHJX7nb9DPw@mail.gmail.com/ CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 49e5fb46211de0744170928466e68166eabbd8b3 Author: Qu Wenruo Date: Sun Jun 28 13:07:15 2020 +0800 btrfs: qgroup: export qgroups in sysfs This patch will add the following sysfs interface: /sys/fs/btrfs//qgroups//referenced /sys/fs/btrfs//qgroups//exclusive /sys/fs/btrfs//qgroups//max_referenced /sys/fs/btrfs//qgroups//max_exclusive /sys/fs/btrfs//qgroups//limit_flags Which is also available in output of "btrfs qgroup show". /sys/fs/btrfs//qgroups//rsv_data /sys/fs/btrfs//qgroups//rsv_meta_pertrans /sys/fs/btrfs//qgroups//rsv_meta_prealloc The last 3 rsv related members are not visible to users, but can be very useful to debug qgroup limit related bugs. Also, to avoid '/' used in , the separator between qgroup level and qgroup id is changed to '_'. The interface is not hidden behind 'debug' as we want this interface to be included into production build and to provide another way to read the qgroup information besides the ioctls. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 06f67c47076e5c3ee65276171596479dcc3a3941 Author: Qu Wenruo Date: Sun Jun 28 13:07:14 2020 +0800 btrfs: use __u16 for the return value of btrfs_qgroup_level() The qgroup level is limited to u16, so no need to use u64 for it. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit cfdd45921571eb24073e0737fa0bd44b4218f914 Author: Nikolay Borisov Date: Wed Jun 3 08:55:46 2020 +0300 btrfs: make btrfs_qgroup_check_reserved_leak take btrfs_inode vfs_inode is used only for the inode number everything else requires btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ use btrfs_ino ] Signed-off-by: David Sterba commit d90944141b4a7704fac7f2b8fcc566511176e4b4 Author: Nikolay Borisov Date: Fri Jun 5 10:41:13 2020 +0300 btrfs: make btrfs_set_inode_last_trans take btrfs_inode Instead of making multiple calls to BTRFS_I simply take btrfs_inode as an input paramter. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 056d9beca3e5052134f9834dd2a159f3f113981c Author: Nikolay Borisov Date: Wed Jun 3 08:55:44 2020 +0300 btrfs: make prealloc_file_extent_cluster take btrfs_inode The vfs inode is only used for a pair of inode_lock/unlock calls all other uses call for btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 65d87f7918ef11a4040f87393cba7b8dff0d9fc8 Author: Nikolay Borisov Date: Fri Jun 5 10:51:51 2020 +0300 btrfs: remove BTRFS_I calls in btrfs_writepage_fixup_worker All of its children functions use btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit e5b7231e2009967b63a39ce0ec6a022307616b82 Author: Nikolay Borisov Date: Wed Jun 3 08:55:42 2020 +0300 btrfs: make btrfs_delalloc_reserve_space take btrfs_inode All of its children take btrfs_inode so bubble up this requirement to btrfs_delalloc_reserve_space's interface and stop calling BTRFS_I internally. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 36ea6f3e931391c2adbb38af8c5dd4a043d26ac5 Author: Nikolay Borisov Date: Wed Jun 3 08:55:41 2020 +0300 btrfs: make btrfs_check_data_free_space take btrfs_inode Instead of calling BTRFS_I on the passed vfs_inode take btrfs_inode directly. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 86d52921a2ba51a78e5bfb71c75aedcbd9e61a5c Author: Nikolay Borisov Date: Wed Jun 3 08:55:40 2020 +0300 btrfs: make btrfs_delalloc_release_space take btrfs_inode It needs btrfs_inode so take it as a parameter directly. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 25ce28caaa1ddc2ef8848c5a09e63a9bc0a5d455 Author: Nikolay Borisov Date: Wed Jun 3 08:55:39 2020 +0300 btrfs: make btrfs_free_reserved_data_space take btrfs_inode It only uses btrfs_inode internally so take it as a parameter. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9db5d510ac5bfeaedd1e05e6afa300dda1ea7f4f Author: Nikolay Borisov Date: Wed Jun 3 08:55:38 2020 +0300 btrfs: make btrfs_free_reserved_data_space_noquota take btrfs_fs_info No point in taking an inode only to get btrfs_fs_info from it, instead take btrfs_fs_info directly. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7661a3e033ab782366e0e1f4b6aad0df3555fcbd Author: Nikolay Borisov Date: Wed Jun 3 08:55:37 2020 +0300 btrfs: make btrfs_qgroup_reserve_data take btrfs_inode There's only a single use of vfs_inode in a tracepoint so let's take btrfs_inode directly. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 088545f6e442605d4b897456ef0b34eae06bdc07 Author: Nikolay Borisov Date: Wed Jun 3 08:55:36 2020 +0300 btrfs: make btrfs_dirty_pages take btrfs_inode There is a single use of the generic vfs_inode so let's take btrfs_inode as a parameter and remove couple of redundant BTRFS_I() calls. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c2566f22893c8b8cdf443505c043b2ca9f5023f6 Author: Nikolay Borisov Date: Wed Jun 3 08:55:35 2020 +0300 btrfs: make btrfs_set_extent_delalloc take btrfs_inode Preparation to make btrfs_dirty_pages take btrfs_inode as parameter. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit cd4c0bf94292b60ab6b0f5dfa5e1297572800f1f Author: Nikolay Borisov Date: Fri Jun 5 10:42:10 2020 +0300 btrfs: make writepage_delalloc take btrfs_inode Only find_lock_delalloc_range uses vfs_inode so let's take the btrfs_inode as a parameter. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit d4580fe25dd397b6f15bfc3eb628d28944ffd26b Author: Nikolay Borisov Date: Wed Jun 3 08:55:33 2020 +0300 btrfs: make __extent_writepage_io take btrfs_inode It has only a single use for a generic vfs inode vs 3 for btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9fc6f911a014fab57ed661b6918b7f730fa60c59 Author: Nikolay Borisov Date: Wed Jun 3 08:55:32 2020 +0300 btrfs: make btrfs_new_extent_direct take btrfs_inode This function really needs a btrfs_inode and not a generic vfs one. Take it as a parameter and get rid of superfluous BTRFS_I() calls. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 64f54188ea4309a22eaf09df169ea5d0f0021640 Author: Nikolay Borisov Date: Wed Jun 3 08:55:31 2020 +0300 btrfs: make btrfs_create_dio_extent take btrfs_inode Take btrfs_inode directly and stop using superfulous BTRFS_I calls. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c1e095202caae87ac4a5c353691a492692d61857 Author: Nikolay Borisov Date: Wed Jun 3 08:55:30 2020 +0300 btrfs: make btrfs_add_ordered_extent_dio take btrfs_inode Simply forwards its argument so let's get rid of one extra BTRFS_I by taking btrfs_inode directly. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 98456b9c46c140275b0fe81970ddfad250c68ed4 Author: Nikolay Borisov Date: Wed Jun 3 08:55:29 2020 +0300 btrfs: make btrfs_run_delalloc_range take btrfs_inode All children now take btrfs_inode so convert it to taking it as a parameter as well. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0c4942258cc1de265619b48a50a29d81f85b86eb Author: Nikolay Borisov Date: Wed Jun 3 08:55:28 2020 +0300 btrfs: make need_force_cow take btrfs_inode Gets rid of superfulous BTRFS_I() calls and prepare for converting btrfs_run_delalloc_range to using btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 808a12923203ee1b992a278b6f8d4e53b69d1508 Author: Nikolay Borisov Date: Wed Jun 3 08:55:27 2020 +0300 btrfs: make inode_need_compress take btrfs_inode Simply gets rid of superfluous BTRFS_I() calls. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 99c88dc71cae52050892798e20c63d5d7053bb94 Author: Nikolay Borisov Date: Wed Jun 3 08:55:26 2020 +0300 btrfs: make inode_can_compress take btrfs_inode Gets rid of superfluous BTRFS_I() calls. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 64e1db566deb5fd5bd9ece981b609de7c540c12a Author: Nikolay Borisov Date: Wed Jun 3 08:55:25 2020 +0300 btrfs: make btrfs_cleanup_ordered_extents take btrfs_inode Preparation to converting btrfs_run_delalloc_range to using btrfs_inode without BTRFS_I() calls. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit b672b5c1563094d890e8a9c8545bce36d98baf12 Author: Nikolay Borisov Date: Wed Jun 3 08:55:24 2020 +0300 btrfs: make __endio_write_update_ordered take btrfs_inode It really wants btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7095821ee1f57d9d4b179463738776e0fcd28d38 Author: Nikolay Borisov Date: Wed Jun 3 08:55:23 2020 +0300 btrfs: make btrfs_dec_test_first_ordered_pending take btrfs_inode It doesn't really need vfs_inode but btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 751b64318d4c6b09f6bb9be4313ed742ec2293f9 Author: Nikolay Borisov Date: Wed Jun 3 08:55:22 2020 +0300 btrfs: make cow_file_range_async take btrfs_inode It only uses vfs inode for assigning it to the async_chunk function. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 968322c8c6d593fb15f26f73cb630c820c1a20f5 Author: Nikolay Borisov Date: Wed Jun 3 08:55:21 2020 +0300 btrfs: make run_delalloc_nocow take btrfs_inode It only really uses btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8ba96f3dd6a0b2dac1a3c48ece76885aa5e40e66 Author: Nikolay Borisov Date: Wed Jun 3 08:55:20 2020 +0300 btrfs: make fallback_to_cow take btrfs_inode It really wants btrfs_inode and is prepration to converting run_delalloc_nocow to taking btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c553f94df4d1c5f37ec253b0ff40a2362af03fc1 Author: Nikolay Borisov Date: Wed Jun 3 08:55:19 2020 +0300 btrfs: make insert_reserved_file_extent take btrfs_inode Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba c Signed-off-by: David Sterba commit 72b7d15bf1e1ee7b71da81e6c5d9afcd2e86c426 Author: Nikolay Borisov Date: Wed Jun 3 08:55:18 2020 +0300 btrfs: make btrfs_qgroup_release_data take btrfs_inode It just forwards its argument to __btrfs_qgroup_release_data. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit a0ff10dcc4a5185e9df2e9d5349f8b03cc909b23 Author: Nikolay Borisov Date: Wed Jun 3 08:55:17 2020 +0300 btrfs: make submit_compressed_extents take btrfs_inode All but 3 uses require vfs_inode so convert the logic to have btrfs_inode be the main inode struct. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c7ee1819dc7169348eb93a088970ae143aa27435 Author: Nikolay Borisov Date: Wed Jun 3 08:55:16 2020 +0300 btrfs: make btrfs_submit_compressed_write take btrfs_inode Majority of its uses are for btrfs_inode so take it as an argument directly. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4cc612090ba5828fb301623fa8cdf0d7a165f91c Author: Nikolay Borisov Date: Wed Jun 3 08:55:15 2020 +0300 btrfs: make btrfs_add_ordered_extent_compress take btrfs_inode It simpy forwards its inode argument to __btrfs_add_ordered_extent which already takes btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6e26c442233b9e2ecdebdfb5b75fd114b15884df Author: Nikolay Borisov Date: Wed Jun 3 08:55:14 2020 +0300 btrfs: make cow_file_range take btrfs_inode All its children functions take btrfs_inode so convert it to taking btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit e7fbf60453a7eae2a36ac9096c84ccb1067dabdf Author: Nikolay Borisov Date: Wed Jun 3 08:55:13 2020 +0300 btrfs: make btrfs_add_ordered_extent take btrfs_inode Preparation to converting its callers to taking btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit a0349401c14f507990bbe052406498fd527f7df7 Author: Nikolay Borisov Date: Wed Jun 3 08:55:12 2020 +0300 btrfs: make cow_file_range_inline take btrfs_inode It has only 2 uses for the vfs_inode - insert_inline_extent and i_size_read. On the flipside it will allow converting its callers to btrfs_inode, so convert it to taking btrfs_inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8b8a979f1fc69054f99abab80daeae89aba3f19b Author: Nikolay Borisov Date: Wed Jun 3 08:55:11 2020 +0300 btrfs: make btrfs_qgroup_free_data take btrfs_inode It passes btrfs_inode to its callee so change the interface. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8769af96cf6355ae96c808265a05171226b4b6e7 Author: Nikolay Borisov Date: Wed Jun 3 08:55:10 2020 +0300 btrfs: make __btrfs_qgroup_release_data take btrfs_inode It uses vfs_inode only for a tracepoint so convert its interface to take btrfs_inode directly. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit df2cfd131fd33dbef1ce33be8b332b1f3d645f35 Author: Nikolay Borisov Date: Wed Jun 3 08:55:09 2020 +0300 btrfs: make qgroup_free_reserved_data take btrfs_inode It only uses btrfs_inode so can just as easily take it as an argument. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit f0cdd15c219dd0be8cae47f60b773efe1361336e Author: Nikolay Borisov Date: Fri Jun 19 15:24:51 2020 +0300 btrfs: tracepoints: convert flush states to using EM macros Only 6 out of all flush states were being printed correctly since only they were exported via the TRACE_DEFINE_ENUM macro. This patch converts all flush states to use the newly introduced EM macro so that they can all be printed correctly. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c92bb3046ff639df5c39fea6cfedea6e9885e36d Author: Nikolay Borisov Date: Fri Jun 19 15:24:50 2020 +0300 btrfs: tracepoints: switch extent_io_tree_owner to using EM macro This fixes correct pint out of the extent io tree owner in btrfs_set_extent_bit/btrfs_clear_extent_bit/btrfs_convert_extent_bit tracepoints. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1cb1f0b2486b0893a3ebf20c42f2df27649ae2b4 Author: Nikolay Borisov Date: Fri Jun 19 15:24:49 2020 +0300 btrfs: tracepoints: fix qgroup reservation type printing Since qgroup's reservation types are define in a macro they must be exported to user space in order for user space tools to convert raw binary data to symbolic names. Currently trace-cmd report produces the following output: kworker/u8:2-459 [003] 1208.543587: qgroup_update_reserve: 2b742cae-e0e5-4def-9ef7-28a9b34a951e: qgid=5 type=0x2 cur_reserved=54870016 diff=-32768 With this fix the output is: kworker/u8:2-459 [003] 1208.543587: qgroup_update_reserve: 2b742cae-e0e5-4def-9ef7-28a9b34a951e: qgid=5 type=BTRFS_QGROUP_RSV_META_PREALLOC cur_reserved=54870016 diff=-32768 Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5bca2c952c609b128b00a238fadb99cc0d3b65ab Author: Nikolay Borisov Date: Fri Jun 19 15:24:48 2020 +0300 btrfs: tracepoints: move FLUSH_ACTIONS define Since all enums used in btrfs' tracepoints are going to be redefined to allow proper parsing of their values by userspace tools let's rearrange when they are defined. This will allow to use only a single set of #define EM/#undef EM sequence. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0840dd28b52f0ceba91265ec62bffdcedb82b4a9 Author: Nikolay Borisov Date: Fri Jun 19 15:24:47 2020 +0300 btrfs: tracepoints: fix extent type symbolic name print extent's type is an enum and this requires that the enum values be exported to user space so that user space tools can correctly map raw binary data to the symbolic name. Currently tracepoints using btrfs__file_extent_item_regular or btrfs__file_extent_item_inline result in the following output: fio-443 [002] 586.609450: btrfs_get_extent_show_fi_regular: f0c3bf8e-0174-4bcc-92aa-6c2d62430420:i root=5(FS_TREE) inode=258 size=2136457216 disk_isize=0 file extent range=[2126946304 2136457216] (num_bytes=9510912 ram_bytes=9510912 disk_bytenr=0 disk_num_bytes=0 extent_offset=0 type=0x1 compression=0 E.g type is 0x1 . With this patch applie the output is: disk_bytenr=141348864 disk_num_bytes=4096 extent_offset=0 type=REG compression=0 Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 45e31869cc4fa8d7c7d2b890965b1b3abf0cfd6d Author: Nikolay Borisov Date: Fri Jun 19 15:24:46 2020 +0300 btrfs: tracepoints: fix btrfs_trigger_flush symbolic string for flags When tracepoints use __print_symbolic to print textual representation of a value that comes from an ENUM each enum value needs to be exported to user space so that user space tools can convert the binary value data to the trings as user space does not know what those enums are about. Doing a trace-cmd record && trace-cmd report currently results in: kworker/u8:1-61 [000] 66.299527: btrfs_flush_space: 5302ee13-c65e-45bb-98ef-8fe3835bd943: state=3(0x3) flags=4(METADATA) num_bytes=2621440 ret=0 I.e state is not translated to its symbolic counterpart. With this patch applied the output is: fio-370 [002] 56.762402: btrfs_trigger_flush: d04cd7ac-38e2-452f-a7f5-8157529fd5f0: preempt: flush=3(BTRFS_RESERVE_FLUSH_ALL) flags=4(METADATA) bytes=655360 See also 190f0b76ca49 ("mm: tracing: Export enums in tracepoints to user space"). Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3502a8c0dc1bd4b4970b59b06e348f22a1c05581 Author: David Sterba Date: Thu Jun 25 12:35:28 2020 +0200 btrfs: allow use of global block reserve for balance item deletion On a filesystem with exhausted metadata, but still enough to start balance, it's possible to hit this error: [324402.053842] BTRFS info (device loop0): 1 enospc errors during balance [324402.060769] BTRFS info (device loop0): balance: ended with status: -28 [324402.172295] BTRFS: error (device loop0) in reset_balance_state:3321: errno=-28 No space left It fails inside reset_balance_state and turns the filesystem to read-only, which is unnecessary and should be fixed too, but the problem is caused by lack for space when the balance item is deleted. This is a one-time operation and from the same rank as unlink that is allowed to use the global block reserve. So do the same for the balance item. Status of the filesystem (100GiB) just after the balance fails: $ btrfs fi df mnt Data, single: total=80.01GiB, used=38.58GiB System, single: total=4.00MiB, used=16.00KiB Metadata, single: total=19.99GiB, used=19.48GiB GlobalReserve, single: total=512.00MiB, used=50.11MiB CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba commit 38d37aa9c32938214ca071fe02762f55b89937fd Author: Qu Wenruo Date: Wed Jun 24 07:23:52 2020 +0800 btrfs: refactor btrfs_check_can_nocow() into two variants The function btrfs_check_can_nocow() now has two completely different call patterns. For nowait variant, callers don't need to do any cleanup. While for wait variant, callers need to release the lock if they can do nocow write. This is somehow confusing, and is already a problem for the exported btrfs_check_can_nocow(). So this patch will separate the different patterns into different functions. For nowait variant, the function will be called check_nocow_nolock(). For wait variant, the function pair will be btrfs_check_nocow_lock() btrfs_check_nocow_unlock(). Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit e4ecaf90bc13e2a9c351d5cd86d4094844d7d7bd Author: Qu Wenruo Date: Wed Jun 24 07:23:51 2020 +0800 btrfs: add comments for btrfs_check_can_nocow() and can_nocow_extent() These two functions have extra conditions that their callers need to meet, and some not-that-common parameters used for return value. So adding some comments may save reviewers some time. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6d4572a9d71d5fc2affee0258d8582d39859188c Author: Qu Wenruo Date: Wed Jun 24 07:23:50 2020 +0800 btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation [BUG] When the data space is exhausted, even if the inode has NOCOW attribute, we will still refuse to truncate unaligned range due to ENOSPC. The following script can reproduce it pretty easily: #!/bin/bash dev=/dev/test/test mnt=/mnt/btrfs umount $dev &> /dev/null umount $mnt &> /dev/null mkfs.btrfs -f $dev -b 1G mount -o nospace_cache $dev $mnt touch $mnt/foobar chattr +C $mnt/foobar xfs_io -f -c "pwrite -b 4k 0 4k" $mnt/foobar > /dev/null xfs_io -f -c "pwrite -b 4k 0 1G" $mnt/padding &> /dev/null sync xfs_io -c "fpunch 0 2k" $mnt/foobar umount $mnt Currently this will fail at the fpunch part. [CAUSE] Because btrfs_truncate_block() always reserves space without checking the NOCOW attribute. Since the writeback path follows NOCOW bit, we only need to bother the space reservation code in btrfs_truncate_block(). [FIX] Make btrfs_truncate_block() follow btrfs_buffered_write() to try to reserve data space first, and fall back to NOCOW check only when we don't have enough space. Such always-try-reserve is an optimization introduced in btrfs_buffered_write(), to avoid expensive btrfs_check_can_nocow() call. This patch will export check_can_nocow() as btrfs_check_can_nocow(), and use it in btrfs_truncate_block() to fix the problem. Reported-by: Martin Doucha Reviewed-by: Filipe Manana Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit b547a88ea5776a8092f7f122ddc20d6720528782 Author: David Sterba Date: Thu Jun 18 14:54:56 2020 +0200 btrfs: start deprecation of mount option inode_cache Estimated time of removal of the functionality is 5.11, the option will be still parsed but will have no effect. Reasons for deprecation and removal: - very poor naming choice of the mount option, it's supposed to cache and reuse the inode _numbers_, but it sounds a some generic cache for inodes - the only known usecase where this option would make sense is on a 32bit architecture where inode numbers in one subvolume would be exhausted due to 32bit inode::i_ino - the cache is stored on disk, consumes space, needs to be loaded and written back - new inode number allocation is slower due to lookups into the cache (compared to a simple increment which is the default) - uses the free-space-cache code that is going to be deprecated as well in the future Known problems: - since 2011, returning EEXIST when there's not enough space in a page to store all checksums, see commit 4b9465cb9e38 ("Btrfs: add mount -o inode_cache") Remaining issues: - if the option was enabled, new inodes created, the option disabled again, the cache is still stored on the devices and there's currently no way to remove it Signed-off-by: David Sterba commit a2570ef330b959eb37e3a437b9884d9cc4b6a3d9 Author: David Sterba Date: Tue Jun 23 21:23:54 2020 +0200 btrfs: remove unused btrfs_root::defrag_trans_start Last touched in 2013 by commit de78b51a2852 ("btrfs: remove cache only arguments from defrag path") that was the only code that used the value. Now it's only set but never used for anything, so we can remove it. Reviewed-by: Nikolay Borisov Reviewed-by: Anand Jain Signed-off-by: David Sterba commit bab16e21e8bbd644067289cfa328f8a67f3e333d Author: David Sterba Date: Tue Jun 23 20:56:12 2020 +0200 btrfs: don't use UAPI types for fiemap callback The fiemap callback is not part of UAPI interface and the prototypes don't have the __u64 types either. Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 5af9d6ef3f6fe62c60f23ef3fd437e0843bea679 Author: Denis Efremov Date: Mon Jun 22 23:18:41 2020 +0300 btrfs: tests: remove if duplicate in __check_free_space_extents() num_extents is already checked in the next if condition and can be safely removed. Signed-off-by: Denis Efremov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 923eb5236597c90b11114926025e0c04e4c1da32 Author: Johannes Thumshirn Date: Tue Jun 23 17:40:07 2020 +0900 btrfs: use free_root_extent_buffer to free root In btrfs_put_root() we're freeing a btrfs_root's 'node' and 'commit_root' extent buffers manually via kfree(), while we're using free_root_extent_buffers() in the free_root_pointers() function above. free_root_extent_buffers() also NULLs the pointers after freeing, which mitigates potential double frees. Reviewed-by: Anand Jain Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4e9d0d0109d6b7ababf4d121168b0e97e4ae2f9d Author: Nikolay Borisov Date: Wed Jun 17 12:10:44 2020 +0300 btrfs: use for loop in prealloc_file_extent_cluster This function iterates all extents in the extent cluster, make this intention obvious by using a for loop. No functional chanes. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 214e61d07e1ab9e497c081d1bad78d05f7c33abf Author: Nikolay Borisov Date: Wed Jun 17 12:10:43 2020 +0300 btrfs: perform data management operations outside of inode lock btrfs_alloc_data_chunk_ondemand and btrfs_free_reserved_data_space_noquota don't really use the guts of the inodes being passed to them. This implies it's not required to call them under extent lock. Move code around in prealloc_file_extent_cluster to do the heavy, data alloc/free operations outside of the lock. This also makes the 'out' label unnecessary, so remove it. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit c171edd5c8e164bbcb46c61016ef4e88c8130edf Author: Nikolay Borisov Date: Wed Jun 17 12:10:42 2020 +0300 btrfs: remove hole check in prealloc_file_extent_cluster Extents in the extent cluster are guaranteed to be contiguous as such the hole check inside the loop can never trigger. In fact this check was never functional since it was added in 18513091af94 ("btrfs: update btrfs_space_info's bytes_may_use timely") which came after the commit introducing clustered/contiguous extents 0257bb82d21b ("Btrfs: relocate file extents in clusters"). Let's just remove it as it adds noise to the source. Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 906c448c3dc3189d83bf644ec453d49737371b00 Author: Nikolay Borisov Date: Wed Jun 3 08:55:08 2020 +0300 btrfs: make __btrfs_drop_extents take btrfs_inode It has only 4 uses of a vfs_inode for inode_sub_bytes but unifies the interface with the non __ prefixed version. Will also makes converting its callers to btrfs_inode easier. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit bd242a08a690e98d9e9eb7ab51580d4a86b76c6c Author: Nikolay Borisov Date: Wed Jun 3 08:55:07 2020 +0300 btrfs: make btrfs_csum_one_bio takae btrfs_inode Will enable converting btrfs_submit_compressed_write to btrfs_inode more easily. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit ad7ff17b65a0567b826c88009d3ea080431816c3 Author: Nikolay Borisov Date: Wed Jun 3 08:55:06 2020 +0300 btrfs: make extent_clear_unlock_delalloc take btrfs_inode It has one VFS and 1 btrfs inode usages but converting it to btrfs_inode interface will allow seamless conversion of its callers. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4b67c11dd19cd6443944d888b027017bb7872514 Author: Nikolay Borisov Date: Wed Jun 3 08:55:05 2020 +0300 btrfs: make create_io_em take btrfs_inode It really wants a btrfs_inode and will allow submit_compressed_extents to be completely converted to btrfs_inode in follow up patches. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7bfa9535019b1ca0696d0a0590a3fd657224ae2f Author: Nikolay Borisov Date: Wed Jun 3 08:55:04 2020 +0300 btrfs: make btrfs_reloc_clone_csums take btrfs_inode It really wants btrfs_inode and not a vfs inode. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit c3504372699bff6daeda207b4e30256c39f584c1 Author: Nikolay Borisov Date: Wed Jun 3 08:55:03 2020 +0300 btrfs: make btrfs_lookup_ordered_extent take btrfs_inode It doesn't use the generic vfs inode for anything use btrfs_inode directly. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 43c69849ae78d83adc2a9ed077bc4c6353b09bc5 Author: Nikolay Borisov Date: Wed Jun 3 08:55:02 2020 +0300 btrfs: make get_extent_allocation_hint take btrfs_inode It doesn't use the vfs inode for anything, can just as easily take btrfs_inode. Follow up patches will convert callers as well. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit da69fea9f785d8460059dd1ff8d654cea22e26df Author: Nikolay Borisov Date: Wed Jun 3 08:55:01 2020 +0300 btrfs: make __btrfs_add_ordered_extent take struct btrfs_inode This is internal btrfs function what really needs the vfs_inode only for igrab and a tracepoint. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3ef64143a7963fd882ab52fee1cc1c9ba2e408e0 Author: Filipe Manana Date: Mon Jun 15 10:36:58 2020 +0100 btrfs: remove no longer used trans_list member of struct btrfs_ordered_extent The 'trans_list' member of an ordered extent was used to keep track of the ordered extents for which a transaction commit had to wait. These were ordered extents that were started and logged by an fsync. However we don't do that anymore and before we stopped doing it we changed the approach to wait for the ordered extents in commit 161c3549b45aee ("Btrfs: change how we wait for pending ordered extents"), which stopped using that list and therefore the 'trans_list' member is not used anymore since that commit. So just remove it since it's doing nothing and making each ordered extent structure waste memory (2 pointers). Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit cd8d39f4aeb3b69af2478112366584256248eb2b Author: Filipe Manana Date: Mon Jun 15 10:36:48 2020 +0100 btrfs: remove no longer used log_list member of struct btrfs_ordered_extent The 'log_list' member of an ordered extent was used keep track of which ordered extents we needed to wait after logging metadata, but is not used anymore since commit 5636cf7d6dc86f ("btrfs: remove the logged extents infrastructure"), as we now always wait on ordered extent completion before logging metadata. So just remove it since it's doing nothing and making each ordered extent structure waste more memory (2 pointers). Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ce6ef5abe68251cb60c4585df2cc73e218ec0dba Author: David Sterba Date: Mon Jun 8 16:06:07 2020 +0200 btrfs: add little-endian optimized key helpers The CPU and on-disk keys are mapped to two different structures because of the endianness. There's an intermediate buffer used to do the conversion, but this is not necessary when CPU and on-disk endianness match. Add optimized versions of helpers that take disk_key and use the buffer directly for CPU keys or drop the intermediate buffer and conversion. This saves a lot of stack space accross many functions and removes about 6K of generated binary code: text data bss dec hex filename 1090439 17468 14912 1122819 112203 pre/btrfs.ko 1084613 17456 14912 1116981 110b35 post/btrfs.ko Delta: -5826 Reviewed-by: Johannes Thumshirn Reviewed-by: Nikolay Borisov Signed-off-by: David Sterba commit 5958253cf65de42493f17f36877a901486a90365 Author: Qu Wenruo Date: Wed Jun 10 09:04:44 2020 +0800 btrfs: qgroup: catch reserved space leaks at unmount time Before this patch, qgroup completely relies on per-inode extent io tree to detect reserved data space leak. However previous bug has already shown how release page before btrfs_finish_ordered_io() could lead to leak, and since it's QGROUP_RESERVED bit cleared without triggering qgroup rsv, it can't be detected by per-inode extent io tree. So this patch adds another (and hopefully the final) safety net to catch qgroup data reserved space leak. At least the new safety net catches all the leaks during development, so it should be pretty useful in the real world. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7dbeaad0af7d0a1a2a8e41d04e90964368ddfcc5 Author: Qu Wenruo Date: Wed Jun 10 09:04:43 2020 +0800 btrfs: change timing for qgroup reserved space for ordered extents to fix reserved space leak [BUG] The following simple workload from fsstress can lead to qgroup reserved data space leak: 0/0: creat f0 x:0 0 0 0/0: creat add id=0,parent=-1 0/1: write f0[259 1 0 0 0 0] [600030,27288] 0 0/4: dwrite - xfsctl(XFS_IOC_DIOINFO) f0[259 1 0 0 64 627318] return 25, fallback to stat() 0/4: dwrite f0[259 1 0 0 64 627318] [610304,106496] 0 This would cause btrfs qgroup to leak 20480 bytes for data reserved space. If btrfs qgroup limit is enabled, such leak can lead to unexpected early EDQUOT and unusable space. [CAUSE] When doing direct IO, kernel will try to writeback existing buffered page cache, then invalidate them: generic_file_direct_write() |- filemap_write_and_wait_range(); |- invalidate_inode_pages2_range(); However for btrfs, the bi_end_io hook doesn't finish all its heavy work right after bio ends. In fact, it delays its work further: submit_extent_page(end_io_func=end_bio_extent_writepage); end_bio_extent_writepage() |- btrfs_writepage_endio_finish_ordered() |- btrfs_init_work(finish_ordered_fn); <<< Work queue execution >>> finish_ordered_fn() |- btrfs_finish_ordered_io(); |- Clear qgroup bits This means, when filemap_write_and_wait_range() returns, btrfs_finish_ordered_io() is not guaranteed to be executed, thus the qgroup bits for related range are not cleared. Now into how the leak happens, this will only focus on the overlapping part of buffered and direct IO part. 1. After buffered write The inode had the following range with QGROUP_RESERVED bit: 596 616K |///////////////| Qgroup reserved data space: 20K 2. Writeback part for range [596K, 616K) Write back finished, but btrfs_finish_ordered_io() not get called yet. So we still have: 596K 616K |///////////////| Qgroup reserved data space: 20K 3. Pages for range [596K, 616K) get released This will clear all qgroup bits, but don't update the reserved data space. So we have: 596K 616K | | Qgroup reserved data space: 20K That number doesn't match the qgroup bit range anymore. 4. Dio prepare space for range [596K, 700K) Qgroup reserved data space for that range, we got: 596K 616K 700K |///////////////|///////////////////////| Qgroup reserved data space: 20K + 104K = 124K 5. btrfs_finish_ordered_range() gets executed for range [596K, 616K) Qgroup free reserved space for that range, we got: 596K 616K 700K | |///////////////////////| We need to free that range of reserved space. Qgroup reserved data space: 124K - 20K = 104K 6. btrfs_finish_ordered_range() gets executed for range [596K, 700K) However qgroup bit for range [596K, 616K) is already cleared in previous step, so we only free 84K for qgroup reserved space. 596K 616K 700K | | | We need to free that range of reserved space. Qgroup reserved data space: 104K - 84K = 20K Now there is no way to release that 20K unless disabling qgroup or unmounting the fs. [FIX] This patch will change the timing of btrfs_qgroup_release/free_data() call. Here it uses buffered COW write as an example. The new timing | The old timing ----------------------------------------+--------------------------------------- btrfs_buffered_write() | btrfs_buffered_write() |- btrfs_qgroup_reserve_data() | |- btrfs_qgroup_reserve_data() | btrfs_run_delalloc_range() | btrfs_run_delalloc_range() |- btrfs_add_ordered_extent() | |- btrfs_qgroup_release_data() | The reserved is passed into | btrfs_ordered_extent structure | | btrfs_finish_ordered_io() | btrfs_finish_ordered_io() |- The reserved space is passed to | |- btrfs_qgroup_release_data() btrfs_qgroup_record | The resereved space is passed | to btrfs_qgroup_recrod | btrfs_qgroup_account_extents() | btrfs_qgroup_account_extents() |- btrfs_qgroup_free_refroot() | |- btrfs_qgroup_free_refroot() The point of such change is to ensure, when ordered extents are submitted, the qgroup reserved space is already released, to keep the timing aligned with file_write_and_wait_range(). So that qgroup data reserved space is all bound to btrfs_ordered_extent and solve the timing mismatch. Fixes: f695fdcef83a ("btrfs: qgroup: Introduce functions to release/free qgroup reserve data space") Suggested-by: Josef Bacik Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit a7f8b1c2ac21bf081b41264c9cfd6260dffa6246 Author: Qu Wenruo Date: Wed Jun 10 09:04:42 2020 +0800 btrfs: file: reserve qgroup space after the hole punch range is locked The incoming qgroup reserved space timing will move the data reservation to ordered extent completely. However in btrfs_punch_hole_lock_range() will call btrfs_invalidate_page(), which will clear QGROUP_RESERVED bit for the range. In current stage it's OK, but if we're making ordered extents handle the reserved space, then btrfs_punch_hole_lock_range() can clear the QGROUP_RESERVED bit before we submit ordered extent, leading to qgroup reserved space leakage. So here change the timing to make reserve data space after btrfs_punch_hole_lock_range(). The new timing is fine for either current code or the new code. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 9729f10a608f235779f060636f32c87766ec615d Author: Qu Wenruo Date: Wed Jun 10 09:04:41 2020 +0800 btrfs: inode: move qgroup reserved space release to the callers of insert_reserved_file_extent() This is to prepare for the incoming timing change of qgroup reserved data space and ordered extent. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 203f44c51982b80c437b49b32c843597c112f287 Author: Qu Wenruo Date: Wed Jun 10 09:04:40 2020 +0800 btrfs: inode: refactor the parameters of insert_reserved_file_extent() Function insert_reserved_file_extent() takes a long list of parameters, which are all for btrfs_file_extent_item, even including two reserved members, encryption and other_encoding. This makes the parameter list unnecessary long for a function which only gets called twice. This patch will refactor the parameter list, by using btrfs_file_extent_item as parameter directly to hugely reduce the number of parameters. Also, since there are only two callers, one in btrfs_finish_ordered_io() which inserts file extent for ordered extent, and one __btrfs_prealloc_file_range(). These two call sites have completely different context, where ordered extent can be compressed, but will always be regular extent, while the preallocated one is never going to be compressed and always has PREALLOC type. So use two small wrapper for these two different call sites to improve readability. Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 100aa5d9f9f9d1163218bbbaad21bffbd8ee3e8d Author: David Sterba Date: Fri May 29 16:20:35 2020 +0200 btrfs: scrub: clean up temporary page variables in scrub_checksum_tree_block Add proper variable for the scrub page and use it instead of repeatedly dereferencing the other structures. Signed-off-by: David Sterba commit 521e1022274000af1981411673e4019d44bdea7f Author: David Sterba Date: Fri May 29 15:54:41 2020 +0200 btrfs: scrub: simplify tree block checksum calculation Use a simpler iteration over tree block pages, same what csum_tree_block does: first page always exists, loop over the rest. Signed-off-by: David Sterba commit d41ebef2005f3b1669da334183088668c168c74a Author: David Sterba Date: Fri May 29 16:20:35 2020 +0200 btrfs: scrub: clean up temporary page variables in scrub_checksum_data Add proper variable for the scrub page and use it instead of repeatedly dereferencing the other structures. Signed-off-by: David Sterba commit 771aba0d12dd945132e2c3bbb512f96edc0efbaa Author: David Sterba Date: Fri May 29 15:54:41 2020 +0200 btrfs: scrub: simplify data block checksum calculation We have sectorsize same as PAGE_SIZE, the checksum can be calculated in one go. Signed-off-by: David Sterba commit c7460541093494f108adb6388351636d353715fb Author: David Sterba Date: Fri May 29 15:47:05 2020 +0200 btrfs: scrub: clean up temporary page variables in scrub_checksum_super Add proper variable for the scrub page and use it instead of repeatedly dereferencing the other structures. Signed-off-by: David Sterba commit 74710cf1fbdc74b1593be953e85b3f392c9f43a4 Author: David Sterba Date: Fri May 29 15:43:14 2020 +0200 btrfs: scrub: remove temporary csum array in scrub_checksum_super The page contents with the checksum is available during the entire function so we don't need to make a copy. Signed-off-by: David Sterba commit 83cf6d5eae54eb40727210e825f8d656a33e7d30 Author: David Sterba Date: Fri May 29 15:40:36 2020 +0200 btrfs: scrub: simplify superblock checksum calculation BTRFS_SUPER_INFO_SIZE is 4096, and fits to a page on all supported architectures, so we can calculate the checksum in one go. Signed-off-by: David Sterba commit b04852520ec260dd4080864cd2b309d163f76b5e Author: David Sterba Date: Fri May 29 15:32:51 2020 +0200 btrfs: scrub: unify naming of page address variables As the page mapping has been removed, rename the variables to 'kaddr' that we use everywhere else. The type is changed to 'char *' so pointer arithmetic works without casts. Signed-off-by: David Sterba commit a8b3a89074f8677533cdb3843da121d697c1938c Author: David Sterba Date: Fri May 29 15:26:07 2020 +0200 btrfs: scrub: remove kmap/kunmap of pages All pages that scrub uses in the scrub_block::pagev array are allocated with GFP_KERNEL and never part of any mapping, so kmap is not necessary, we only need to know the page address. In scrub_write_page_to_dev_replace we don't even need to call flush_dcache_page because of the same reason as above. Signed-off-by: David Sterba commit 74ef00185eb864252156022ff129b01549504175 Author: Qu Wenruo Date: Thu Jun 4 15:18:06 2020 +0800 btrfs: introduce "rescue=" mount option This patch introduces a new "rescue=" mount option group for all mount options for data recovery. Different rescue sub options are seperated by ':'. E.g "ro,rescue=nologreplay:usebackuproot". The original plan was to use ';', but ';' needs to be escaped/quoted, or it will be interpreted by bash, similar to '|'. And obviously, user can specify rescue options one by one like: "ro,rescue=nologreplay,rescue=usebackuproot". The following mount options are converted to "rescue=", old mount options are deprecated but still available for compatibility purpose: - usebackuproot Now it's "rescue=usebackuproot" - nologreplay Now it's "rescue=nologreplay" Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit a89ef455dd2b59f476bdda4786cca54ed03cad14 Author: Filipe Manana Date: Tue Jun 9 11:19:42 2020 +0100 btrfs: use btrfs_alloc_data_chunk_ondemand() when allocating space for relocation We currently use btrfs_check_data_free_space() when allocating space for relocating data extents, but that is not necessary because that function combines btrfs_alloc_data_chunk_ondemand(), which does the actual space reservation, and btrfs_qgroup_reserve_data(). We can use btrfs_alloc_data_chunk_ondemand() directly because we know we do not need to reserve qgroup space since we are dealing with a relocation tree, which can never have qgroups (btrfs_qgroup_reserve_data() does nothing as is_fstree() returns false for a relocation tree). Conversely we can use btrfs_free_reserved_data_space_noquota() directly instead of btrfs_free_reserved_data_space(), since we had no qgroup reservation when allocating space. This change is preparatory work for another patch in this series that makes relocation reserve the exact amount of space it needs to relocate a data block group. The function btrfs_check_data_free_space() has the incovenient of requiring a start offset argument and we will want to be able to allocate space for multiple ranges, which are not consecutive, at once. Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 46d4dac888ebe083d61f18acb16a6988e9062268 Author: Filipe Manana Date: Tue Jun 9 11:19:33 2020 +0100 btrfs: remove the start argument from btrfs_free_reserved_data_space_noquota() The start argument for btrfs_free_reserved_data_space_noquota() is only used to make sure the amount of bytes we decrement from the bytes_may_use counter of the data space_info object is aligned to the filesystem's sector size. It serves no other purpose. All its current callers always pass a length argument that is already aligned to the sector size, so we can make the start argument go away. In fact its presence makes it impossible to use it in a context where we just want to free a number of bytes for a range for which either we do not know its start offset or for freeing multiple ranges at once (which are not contiguous). This change is preparatory work for a patch (third patch in this series) that makes relocation of data block groups that are not full reserve less data space. Reviewed-by: Anand Jain Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ab483009216ed556fb124176cae75242f8da0e2e Author: Liao Pingfang Date: Thu Jun 11 08:40:36 2020 +0800 btrfs: check-integrity: remove unnecessary failure messages during memory allocation As there is a dump_stack() done on memory allocation failures, these messages might as well be deleted instead. Signed-off-by: Liao Pingfang Reviewed-by: David Sterba [ minor tweaks ] Signed-off-by: David Sterba commit b5790d51809b3b0b5f0d012fa667b4e6cafd676e Author: Anand Jain Date: Wed Jun 3 18:10:20 2020 +0800 btrfs: use helper btrfs_get_block_group Use the helper function where it is open coded to increment the block_group reference count As btrfs_get_block_group() is a one-liner we could have open-coded it, but its partner function btrfs_put_block_group() isn't one-liner which does the free part in it. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 69b0e093c7859681e8012727d75f639154a7cfb3 Author: Anand Jain Date: Wed Jun 3 18:10:18 2020 +0800 btrfs: let btrfs_return_cluster_to_free_space() return void __btrfs_return_cluster_to_free_space() returns only 0. And all its parent functions don't need the return value either so make this a void function. Further, as none of the callers of btrfs_return_cluster_to_free_space() is actually using the return from this function, make this function also return void. Reviewed-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit f22f457a1a58b95c22a870f5e45b3fd7b23ebe7b Author: Filipe Manana Date: Mon Jun 1 19:12:27 2020 +0100 btrfs: remove no longer necessary chunk mutex locking cases Initially when the 'removed' flag was added to a block group to avoid races between block group removal and fitrim, by commit 04216820fe83d5 ("Btrfs: fix race between fs trimming and block group remove/allocation"), we had to lock the chunks mutex because we could be moving the block group from its current list, the pending chunks list, into the pinned chunks list, or we could just be adding it to the pinned chunks if it was not in the pending chunks list. Both lists were protected by the chunk mutex. However we no longer have those lists since commit 1c11b63eff2a67 ("btrfs: replace pending/pinned chunks lists with io tree"), and locking the chunk mutex is no longer necessary because of that. The same happens at btrfs_unfreeze_block_group(), we lock the chunk mutex because the block group's extent map could be part of the pinned chunks list and the call to remove_extent_mapping() could be deleting it from that list, which used to be protected by that mutex. So just remove those lock and unlock calls as they are not needed anymore. Reviewed-by: Nikolay Borisov Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit e3ba67a108ff5a2657990014d3ed4488bd665be6 Author: Johannes Thumshirn Date: Tue Jun 2 19:05:57 2020 +0900 btrfs: factor out reading of bg from find_frist_block_group When find_first_block_group() finds a block group item in the extent-tree, it does a lookup of the object in the extent mapping tree and does further checks on the item. Factor out this step from find_first_block_group() so we can further simplify the code. While we're at it, we can also just return early in find_first_block_group(), if the tree slot isn't found. Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit 89d7da9bc592aa6a341d00f2d949615a89bb1eb7 Author: Johannes Thumshirn Date: Tue Jun 2 19:05:56 2020 +0900 btrfs: get mapping tree directly from fsinfo in find_first_block_group We already have an fs_info in our function parameters, there's no need to do the maths again and get fs_info from the extent_root just to get the mapping_tree. Instead directly grab the mapping_tree from fs_info. Reviewed-by: Nikolay Borisov Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit 96f9b0f2fa01c96e90abd4e981208a341a5da66e Author: Nikolay Borisov Date: Fri Apr 3 16:40:35 2020 +0300 btrfs: simplify checks when adding excluded ranges Adresses held in 'logical' array are always guaranteed to fall within the boundaries of the block group. That is, 'start' can never be smaller than cache->start. This invariant follows from the way the address are calculated in btrfs_rmap_block: stripe_nr = physical - map->stripes[i].physical; stripe_nr = div64_u64(stripe_nr, map->stripe_len); bytenr = chunk_start + stripe_nr * io_stripe_size; I.e it's always some IO stripe within the given chunk. Exploit this invariant to simplify the body of the loop by removing the unnecessary 'if' since its 'else' part is the one always executed. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 9e22b925985e71c6acf0dba03f9b99a56806a137 Author: Nikolay Borisov Date: Fri Apr 3 16:40:34 2020 +0300 btrfs: read stripe len directly in btrfs_rmap_block extent_map::orig_block_len contains the size of a physical stripe when it's used to describe block groups (calculated in read_one_chunk via calc_stripe_length or calculated in decide_stripe_size and then assigned to extent_map::orig_block_len in create_chunk). Exploit this fact to get the size directly rather than opencoding the calculations. No functional changes. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 6a3c7f5c87854e948c3c234e5f5e745c7c553722 Author: Nikolay Borisov Date: Thu May 28 11:05:13 2020 +0300 btrfs: don't balance btree inode pages from buffered write path The call to btrfs_btree_balance_dirty has been there since the early days of BTRFS, when the btree was directly modified from the write path, hence dirtied btree inode pages. With the implementation of b888db2bd7b6 ("Btrfs: Add delayed allocation to the extent based page tree code") 13 years ago the btree is no longer modified from the write path, hence there is no point in calling this function. Just remove it. Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit 671be01ca28456d8ce8d7f59e7fdcb1e05571322 Merge: 92ed301919932 fa0866a1d1be8 Author: Rafael J. Wysocki Date: Mon Jul 27 12:42:17 2020 +0200 Merge tag 'linux-cpupower-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux Pull cpupower utility updates for v5.9 from Shuah Khan: "This cpupower update for Linux 5.9-rc1 consists of 2 fixes to coccicheck warnings and one change to replacing HTTP links with HTTPS ones." * tag 'linux-cpupower-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux: cpupower: Replace HTTP links with HTTPS ones cpupower: Fix NULL but dereferenced coccicheck errors cpupower: Fix comparing pointer to 0 coccicheck warns commit 908e757daecf2120c3019fa630ae5d4c3cd7165b Merge: 58b1d3f864b1f 92ed301919932 Author: Greg Kroah-Hartman Date: Mon Jul 27 12:42:15 2020 +0200 Merge 5.8-rc7 into staging-next We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit f69ca629d89d65737537e05308ac531f7bb07d5c Author: Ricardo Neri Date: Sun Jul 26 21:31:31 2020 -0700 x86/cpu: Refactor sync_core() for readability Instead of having #ifdef/#endif blocks inside sync_core() for X86_64 and X86_32, implement the new function iret_to_self() with two versions. In this manner, avoid having to use even more more #ifdef/#endif blocks when adding support for SERIALIZE in sync_core(). Co-developed-by: Tony Luck Signed-off-by: Tony Luck Signed-off-by: Ricardo Neri Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200727043132.15082-4-ricardo.neri-calderon@linux.intel.com commit 9998a9832c4027e907353e5e05fde730cf624b77 Author: Ricardo Neri Date: Sun Jul 26 21:31:30 2020 -0700 x86/cpu: Relocate sync_core() to sync_core.h Having sync_core() in processor.h is problematic since it is not possible to check for hardware capabilities via the *cpu_has() family of macros. The latter needs the definitions in processor.h. It also looks more intuitive to relocate the function to sync_core.h. This changeset does not make changes in functionality. Signed-off-by: Ricardo Neri Signed-off-by: Ingo Molnar Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20200727043132.15082-3-ricardo.neri-calderon@linux.intel.com commit 85b23fbc7d88f8c6e3951721802d7845bc39663d Author: Ricardo Neri Date: Sun Jul 26 21:31:29 2020 -0700 x86/cpufeatures: Add enumeration for SERIALIZE instruction The Intel architecture defines a set of Serializing Instructions (a detailed definition can be found in Vol.3 Section 8.3 of the Intel "main" manual, SDM). However, these instructions do more than what is required, have side effects and/or may be rather invasive. Furthermore, some of these instructions are only available in kernel mode or may cause VMExits. Thus, software using these instructions only to serialize execution (as defined in the manual) must handle the undesired side effects. As indicated in the name, SERIALIZE is a new Intel architecture Serializing Instruction. Crucially, it does not have any of the mentioned side effects. Also, it does not cause VMExit and can be used in user mode. This new instruction is currently documented in the latest "extensions" manual (ISE). It will appear in the "main" manual in the future. Signed-off-by: Ricardo Neri Signed-off-by: Ingo Molnar Reviewed-by: Tony Luck Acked-by: Dave Hansen Link: https://lore.kernel.org/r/20200727043132.15082-2-ricardo.neri-calderon@linux.intel.com commit 538b10856b1eb60bd6305fa2f20191b12d997ba1 Merge: 3aae57f0c3ba5 92ed301919932 Author: Ingo Molnar Date: Mon Jul 27 12:41:13 2020 +0200 Merge tag 'v5.8-rc7' into x86/cpu, to pick up fixes Signed-off-by: Ingo Molnar commit dbaab9469b257f98723ff9eacddaac68706033a1 Merge: ca45b5cd55d2e 92ed301919932 Author: Greg Kroah-Hartman Date: Mon Jul 27 12:40:56 2020 +0200 Merge 5.8-rc7 into tty-next we need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit eea2c51f81df9df5123c042f07c7c6c33bf5fabb Merge: 280c7f95f858b 92ed301919932 Author: Greg Kroah-Hartman Date: Mon Jul 27 12:39:54 2020 +0200 Merge 5.8-rc7 into driver-core-next We want the driver core fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 80e30368669e0387d9778b15bd1b985074725a2e Merge: 39a188b883325 7aa1031223bc0 Author: Rafael J. Wysocki Date: Mon Jul 27 12:34:55 2020 +0200 Merge back cpufreq material for v5.9. commit 2b32ab031e82a109e2c5b0d30ce563db0fe286b4 Author: Joerg Roedel Date: Tue Jul 21 11:59:53 2020 +0200 x86/mm/64: Make sync_global_pgds() static The function is only called from within init_64.c and can be static. Also remove it from pgtable_64.h. Signed-off-by: Joerg Roedel Signed-off-by: Ingo Molnar Reviewed-by: Mike Rapoport Link: https://lore.kernel.org/r/20200721095953.6218-4-joro@8bytes.org commit 8bb9bf242d1fee925636353807c511d54fde8986 Author: Joerg Roedel Date: Tue Jul 21 11:59:52 2020 +0200 x86/mm/64: Do not sync vmalloc/ioremap mappings Remove the code to sync the vmalloc and ioremap ranges for x86-64. The page-table pages are all pre-allocated now so that synchronization is no longer necessary. Signed-off-by: Joerg Roedel Signed-off-by: Ingo Molnar Reviewed-by: Mike Rapoport Link: https://lore.kernel.org/r/20200721095953.6218-3-joro@8bytes.org commit 6eb82f9940267d3af260989d077a2833f588beae Author: Joerg Roedel Date: Tue Jul 21 11:59:51 2020 +0200 x86/mm: Pre-allocate P4D/PUD pages for vmalloc area Pre-allocate the page-table pages for the vmalloc area at the level which needs synchronization on x86-64, which is P4D for 5-level and PUD for 4-level paging. Doing this at boot makes sure no synchronization of that area is necessary at runtime. The synchronization takes the pgd_lock and iterates over all page-tables in the system, so it can take quite long and is better avoided. Signed-off-by: Joerg Roedel Signed-off-by: Ingo Molnar Reviewed-by: Mike Rapoport Link: https://lore.kernel.org/r/20200721095953.6218-2-joro@8bytes.org commit 5003ad7172651e550103389b59b0dbeaebf65d00 Author: Rafael J. Wysocki Date: Thu Jul 2 14:14:05 2020 +0200 ACPI: OSL: Clean up the removal of unused memory mappings Fold acpi_os_map_cleanup_deferred() into acpi_os_map_remove() and pass the latter to INIT_RCU_WORK() in acpi_os_drop_map_ref() to make the code more straightforward. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit a968fba29733af162d9543b422d035c8869b9298 Author: Rafael J. Wysocki Date: Thu Jul 2 14:13:46 2020 +0200 ACPI: OSL: Use deferred unmapping in acpi_os_unmap_iomem() There is no reason (knwon to me) why any of the existing users of acpi_os_unmap_iomem() would need to wait for the unused memory mappings left by it to actually go away, so use the deferred unmapping of ACPI memory introduced previously in that function. While at it, fold __acpi_os_unmap_iomem() back into acpi_os_unmap_iomem(), which has become a simple wrapper around it, and make acpi_os_unmap_memory() call the latter. Signed-off-by: Rafael J. Wysocki commit f4334efb11a01b37af90e2ad459ee3bb6337211d Author: Rafael J. Wysocki Date: Thu Jul 2 14:11:12 2020 +0200 ACPI: OSL: Use deferred unmapping in acpi_os_unmap_generic_address() There is no reason (knwon to me) why any of the existing users of acpi_os_unmap_generic_address() would need to wait for the unused memory mappings left by it to actually go away, so use the deferred unmapping of ACPI memory introduced previously in that function. Signed-off-by: Rafael J. Wysocki commit b8fcd0e588fc256bed3d65a4e23017c5582ecf48 Author: Rafael J. Wysocki Date: Tue Jun 30 13:40:59 2020 +0200 ACPICA: Preserve memory opregion mappings The ACPICA's strategy with respect to the handling of memory mappings associated with memory operation regions is to avoid mapping the entire region at once which may be problematic at least in principle (for example, it may lead to conflicts with overlapping mappings having different attributes created by drivers). It may also be wasteful, because memory opregions on some systems take up vast chunks of address space while the fields in those regions actually accessed by AML are sparsely distributed. For this reason, a one-page "window" is mapped for a given opregion on the first memory access through it and if that "window" does not cover an address range accessed through that opregion subsequently, it is unmapped and a new "window" is mapped to replace it. Next, if the new "window" is not sufficient to acess memory through the opregion in question in the future, it will be replaced with yet another "window" and so on. That may lead to a suboptimal sequence of memory mapping and unmapping operations, for example if two fields in one opregion separated from each other by a sufficiently wide chunk of unused address space are accessed in an alternating pattern. The situation may still be suboptimal if the deferred unmapping introduced previously is supported by the OS layer. For instance, the alternating memory access pattern mentioned above may produce a relatively long list of mappings to release with substantial duplication among the entries in it, which could be avoided if acpi_ex_system_memory_space_handler() did not release the mapping used by it previously as soon as the current access was not covered by it. In order to improve that, modify acpi_ex_system_memory_space_handler() to preserve all of the memory mappings created by it until the memory regions associated with them go away. Accordingly, update acpi_ev_system_memory_region_setup() to unmap all memory associated with memory opregions that go away. Reported-by: Dan Williams Tested-by: Xiang Li Signed-off-by: Rafael J. Wysocki commit 1757659d022b7369b6a4b9a34ad992866a1bcbb0 Author: Rafael J. Wysocki Date: Thu Jul 2 13:19:12 2020 +0200 ACPI: OSL: Implement deferred unmapping of ACPI memory The ACPI OS layer in Linux uses RCU to protect the walkers of the list of ACPI memory mappings from seeing an inconsistent state while it is being updated. Among other situations, that list can be walked in (NMI and non-NMI) interrupt context, so using a sleeping lock to protect it is not an option. However, performance issues related to the RCU usage in there appear, as described by Dan Williams: "Recently a performance problem was reported for a process invoking a non-trival ASL program. The method call in this case ends up repetitively triggering a call path like: acpi_ex_store acpi_ex_store_object_to_node acpi_ex_write_data_to_field acpi_ex_insert_into_field acpi_ex_write_with_update_rule acpi_ex_field_datum_io acpi_ex_access_region acpi_ev_address_space_dispatch acpi_ex_system_memory_space_handler acpi_os_map_cleanup.part.14 _synchronize_rcu_expedited.constprop.89 schedule The end result of frequent synchronize_rcu_expedited() invocation is tiny sub-millisecond spurts of execution where the scheduler freely migrates this apparently sleepy task. The overhead of frequent scheduler invocation multiplies the execution time by a factor of 2-3X." The source of this is that acpi_ex_system_memory_space_handler() unmaps the memory mapping currently cached by it at the access time if that mapping doesn't cover the memory area being accessed. Consequently, if there is a memory opregion with two fields separated from each other by an unused chunk of address space that is large enough for not being covered by a single mapping, and they happen to be used in an alternating pattern, the unmapping will occur on every acpi_ex_system_memory_space_handler() invocation for that memory opregion and that will lead to significant overhead. Moreover, acpi_ex_system_memory_space_handler() carries out the memory unmapping with the namespace and interpreter mutexes held which may lead to additional latency, because all of the tasks wanting to acquire on of these mutexes need to wait for the memory unmapping operation to complete. To address that, rework acpi_os_unmap_memory() so that it does not release the memory mapping covering the given address range right away and instead make it queue up the mapping at hand for removal via queue_rcu_work(). Reported-by: Dan Williams Tested-by: Xiang Li Signed-off-by: Rafael J. Wysocki commit 280c7f95f858b103e62d84cae2d5ed9f5cf54d41 Author: Greg Kroah-Hartman Date: Mon Jul 27 12:14:28 2020 +0200 Revert "test_firmware: Test platform fw loading on non-EFI systems" This reverts commit 2d38dbf89a06d0f689daec9842c5d3295c49777f as it broke the build in linux-next Reported-by: Stephen Rothwell Fixes: 2d38dbf89a06 ("test_firmware: Test platform fw loading on non-EFI systems") Cc: stable@vger.kernel.org Cc: Scott Branden Cc: Kees Cook Link: https://lore.kernel.org/r/20200727165539.0e8797ab@canb.auug.org.au Signed-off-by: Greg Kroah-Hartman commit 65a9bde6ed484880987a6d88de6e372eca52059f Merge: 860e73b49cd93 92ed301919932 Author: Greg Kroah-Hartman Date: Mon Jul 27 11:49:37 2020 +0200 Merge 5.8-rc7 into char-misc-next This should resolve the merge/build issues reported when trying to create linux-next. Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman commit 6bd0dffa1a6e19e73964ae47c964f57c625cce05 Author: Andy Shevchenko Date: Tue Jul 21 16:08:44 2020 +0300 dmaengine: dw: Don't include unneeded header to platform data header Including device.h is too much for the dma-dw.h platform data header. Replace it with the headers of which dma-dw.h is direct user. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200721130844.64162-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 4cd87f5bfded0404fa4463c8a3de8abe5327268c Author: Krzysztof Kozlowski Date: Sun Jul 26 18:26:44 2020 +0200 MAINTAINERS: Add Git repository for memory controller drivers Add dedicated Krzysztof Kozlowski's Git repository on @kernel.org for memory controller drivers. Signed-off-by: Krzysztof Kozlowski commit f7fa245a1a97aa7aa16c1d57f345b49bd874efe7 Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:23 2020 +0200 memory: brcmstb_dpfe: Fix language typo Fix firwmare -> firmware. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli commit 331b828ceba33cfbff5246d12c1577ade1d103d3 Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:28 2020 +0200 memory: samsung: exynos5422-dmc: Correct white space issues Remove unneeded blank line and align indentation with open parenthesis. Signed-off-by: Krzysztof Kozlowski commit 90de1c75d8acd83e9a699b93153307a1e411ef3a Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:27 2020 +0200 memory: samsung: exynos-srom: Correct alignment Align indentation with open parenthesis (or fix existing alignment). Signed-off-by: Krzysztof Kozlowski commit f0557d99dfa774ef4b525ee0563b0ebd9192428a Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:26 2020 +0200 memory: pl172: Enclose macro argument usage in parenthesis Macros arguments should be enclosed by parenthesis for safety. Signed-off-by: Krzysztof Kozlowski commit 46c711187385d8a9a1e2b2e367bfb6c98674e9b7 Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:25 2020 +0200 memory: of: Correct kerneldoc Use proper kerneldoc to fix GCC warnings like: drivers/memory/of_memory.c:30: warning: Function parameter or member 'dev' not described in 'of_get_min_tck' Signed-off-by: Krzysztof Kozlowski commit 858432c7e41b05364f155414178495ce266da67b Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:21 2020 +0200 memory: omap-gpmc: Fix language typo Fix arbitary -> arbitrary. Signed-off-by: Krzysztof Kozlowski commit cdd1aeae83ac60fe61ea8e8c65ba219f8576570d Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:19 2020 +0200 memory: omap-gpmc: Correct white space issues Remove some unneeded blank lines, align indentation with open parenthesis (or fix existing alignment). Signed-off-by: Krzysztof Kozlowski commit 1cd534584a976b49d694c038df0075552814054d Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:18 2020 +0200 memory: omap-gpmc: Use 'unsigned int' for consistency Driver uses 'unsigned int' in other places instead of 'unsigned'. Signed-off-by: Krzysztof Kozlowski commit 98397f1ccc23985cd22c99d575da38bee9048a6f Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:17 2020 +0200 memory: omap-gpmc: Enclose macro argument usage in parenthesis Macros arguments should be enclosed by parenthesis for safety. Signed-off-by: Krzysztof Kozlowski commit 80c4f5a824cb24902edc5345919b0f0870584cdf Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:16 2020 +0200 memory: omap-gpmc: Correct kerneldoc Use proper kerneldoc to fix GCC warnings like: drivers/memory/omap-gpmc.c:299: warning: Function parameter or member 'cs' not described in 'gpmc_get_clk_period' drivers/memory/omap-gpmc.c:432: warning: Excess function parameter 'ma' description in 'get_gpmc_timing_reg' Signed-off-by: Krzysztof Kozlowski commit 0abbec7eed5b945922ef682bcb1a1576f684fe5e Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:15 2020 +0200 memory: mvebu-devbus: Align with open parenthesis The line continuation contained spaces but still failed to properly align with open parenthesis. Signed-off-by: Krzysztof Kozlowski commit bf8fba45983b0a44db0d5d208d2faab4164cc3bf Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:14 2020 +0200 memory: mvebu-devbus: Add missing braces to all arms of if statement Add missing braces to all arms of if statement to align with coding convention. Signed-off-by: Krzysztof Kozlowski commit 7f04614b6710b59b18e2a4474cf5d3488ca975d2 Author: Krzysztof Kozlowski Date: Fri Jul 24 20:23:13 2020 +0200 memory: bt1-l2-ctl: Add blank lines after declarations Add blank lines to improve code readability. No functional change. Signed-off-by: Krzysztof Kozlowski commit 6f9e40d4ce0bf322c95c2155d99d90ae96c58777 Author: Amit Singh Tomar Date: Sun Jul 19 23:12:00 2020 +0530 dmaengine: Actions: Add support for S700 DMA engine DMA controller present on S700 SoC is compatible with the one on S900 (as most of registers are same), but it has different DMA descriptor structure where registers "fcnt" and "ctrlb" uses different encoding. For instance, on S900 "fcnt" starts at offset 0x0c and uses upper 12 bits whereas on S700, it starts at offset 0x1c and uses lower 12 bits. This commit adds support for DMA controller present on S700. Signed-off-by: Amit Singh Tomar Link: https://lore.kernel.org/r/1595180527-11320-4-git-send-email-amittomer25@gmail.com Signed-off-by: Vinod Koul commit 57937faeed386a1d0617f99157e358ebd510e4cd Author: Amit Singh Tomar Date: Sun Jul 19 23:11:59 2020 +0530 dmaengine: Actions: get rid of bit fields from dma descriptor At the moment, Driver uses bit fields to describe registers of the DMA descriptor structure that makes it less portable and maintainable, and Andre suugested(and even sketched important bits for it) to make use of array to describe this DMA descriptors instead. It gives the flexibility while extending support for other platform such as Actions S700. This commit removes the "owl_dma_lli_hw" (that includes bit-fields) and uses array to describe DMA descriptor. Suggested-by: Andre Przywara Signed-off-by: Amit Singh Tomar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1595180527-11320-3-git-send-email-amittomer25@gmail.com Signed-off-by: Vinod Koul commit bbeeb861971e5af5bea36818334522094878be77 Author: Amit Singh Tomar Date: Sun Jul 19 23:11:58 2020 +0530 dt-bindings: dmaengine: convert Actions Semi Owl SoCs bindings to yaml Converts the device tree bindings for the Actions Semi Owl SoCs DMA Controller over to YAML schemas. It also adds new compatible string "actions,s700-dma". Signed-off-by: Amit Singh Tomar Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1595180527-11320-2-git-send-email-amittomer25@gmail.com Signed-off-by: Vinod Koul commit 1a0c02ba643ed05c07ddf14d87c3bec640666836 Author: Dave Jiang Date: Mon Jul 20 08:50:58 2020 -0700 dmaengine: idxd: add missing invalid flags field to completion Add missing "invalid flags" field to completion record struct. Reported-by: Nikhil Rao Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/159526025819.49266.13176787210106133664.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 0f9d5f008e2f096b14ff1f218a870199dd5264f4 Author: Serge Semin Date: Thu Jul 23 03:58:48 2020 +0300 dmaengine: dw: Initialize max_sg_burst capability Multi-block support provides a way to map the kernel-specific SG-table so the DW DMA device would handle it as a whole instead of handling the SG-list items or so called LLP block items one by one. So if true LLP list isn't supported by the DW DMA engine, then soft-LLP mode will be utilized to load and execute each LLP-block one by one. The soft-LLP mode of the DMA transactions execution might not work well for some DMA consumers like SPI due to its Tx and Rx buffers inter-dependency. Let's initialize the max_sg_burst DMA channels capability based on the nollp flag state. If it's true, no hardware accelerated LLP is available and max_sg_burst should be set with 1, which means that the DMA engine can handle only a single SG list entry at a time. If noLLP is set to false, then hardware accelerated LLP is supported and the DMA engine can handle infinite number of SG entries in a single DMA transaction. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200723005848.31907-11-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit ca7f2851712e7072e8f327882dc4bdaaae3a8079 Author: Serge Semin Date: Thu Jul 23 03:58:47 2020 +0300 dmaengine: dw: Introduce max burst length hw config IP core of the DW DMA controller may be synthesized with different max burst length of the transfers per each channel. According to Synopsis having the fixed maximum burst transactions length may provide some performance gain. At the same time setting up the source and destination multi size exceeding the max burst length limitation may cause a serious problems. In our case the DMA transaction just hangs up. In order to fix this lets introduce the max burst length platform config of the DW DMA controller device and don't let the DMA channels configuration code exceed the burst length hardware limitation. Note the maximum burst length parameter can be detected either in runtime from the DWC parameter registers or from the dedicated DT property. Depending on the IP core configuration the maximum value can vary from channel to channel so by overriding the channel slave max_burst capability we make sure a DMA consumer will get the channel-specific max burst length. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200723005848.31907-10-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit 585d35451e94b2e1b0bf59ef55d3b4a1c8ab3d77 Author: Serge Semin Date: Thu Jul 23 03:58:46 2020 +0300 dmaengine: dw: Initialize min and max burst DMA device capability According to the DW APB DMAC data book the minimum burst transaction length is 1 and it's true for any version of the controller since isn't parametrised in the coreAssembler so can't be changed at the IP-core synthesis stage. The maximum burst transaction can vary from channel to channel and from controller to controller depending on a IP-core parameter the system engineer activated during the IP-core synthesis. Let's initialise both min_burst and max_burst members of the DMA controller descriptor with extreme values so the DMA clients could use them to properly optimize the DMA requests. The channels and controller-specific max_burst length initialization will be introduced by the follow-up patches. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200723005848.31907-9-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit e6fe5767961dbdcabbdfcc570993a91eebca4586 Author: Serge Semin Date: Thu Jul 23 03:58:45 2020 +0300 dmaengine: dw: Set DMA device max segment size parameter Maximum block size DW DMAC configuration corresponds to the max segment size DMA parameter in the DMA core subsystem notation. Lets set it with a value specific to the probed DW DMA controller. It shall help the DMA clients to create size-optimized SG-list items for the controller. This in turn will cause less dw_desc allocations, less LLP reinitializations, better DMA device performance. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200723005848.31907-8-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit ef3e515a87df2881db66f05b576804ca6f03e1ff Author: Serge Semin Date: Thu Jul 23 03:58:44 2020 +0300 dmaengine: dw: Take HC_LLP flag into account for noLLP auto-config Full multi-block transfers functionality is enabled in DW DMA controller only if CHx_MULTI_BLK_EN is set. But LLP-based transfers can be executed only if hardcode channel x LLP register feature isn't enabled, which can be switched on at the IP core synthesis for optimization. If it's enabled then the LLP register is hardcoded to zero, so the blocks chaining based on the LLPs is unsupported. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200723005848.31907-7-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit 3b6d694eb3eebd86ec44a119e730943ac8e03a6b Author: Serge Semin Date: Thu Jul 23 03:58:43 2020 +0300 dmaengine: Introduce DMA-device device_caps callback There are DMA devices (like ours version of Synopsys DW DMAC) which have DMA capabilities non-uniformly redistributed between the device channels. In order to provide a way of exposing the channel-specific parameters to the DMA engine consumers, we introduce a new DMA-device callback. In case if provided it gets called from the dma_get_slave_caps() method and is able to override the generic DMA-device capabilities. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200723005848.31907-6-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit b1b40b8fe7e8fb26e33bad1766ce322d2c63a6c7 Author: Serge Semin Date: Thu Jul 23 03:58:42 2020 +0300 dmaengine: Introduce max SG burst capability Some devices may lack the support of the hardware accelerated SG list entries automatic walking through and execution. In this case a burden of the SG list traversal and DMA engine re-initialization lies on the DMA engine driver (normally implemented by using a DMA transfer completion IRQ to recharge the DMA device with a next SG list entry). But such solution may not be suitable for some DMA consumers. In particular SPI devices need both Tx and Rx DMA channels work synchronously in order to avoid the Rx FIFO overflow. In case if Rx DMA channel is paused for some time while the Tx DMA channel works implicitly pulling data into the Rx FIFO, the later will be eventually overflown, which will cause the data loss. So if SG list entries aren't automatically fetched by the DMA engine, but are one-by-one manually selected for execution in the ISRs/deferred work/etc., such problem will eventually happen due to the non-deterministic latencies of the service execution. In order to let the DMA consumer know about the DMA device capabilities regarding the hardware accelerated SG list traversal we introduce the max_sg_burst capability. It is supposed to be initialized by the DMA engine driver with 0 if there is no limitation of the number of SG entries atomically executed and with non-zero value if there is such constraints, so the upper limit is determined by the number set to the property. Suggested-by: Andy Shevchenko Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200723005848.31907-5-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit d97758e048e5fe91c7d8ff9ce5f030ee88d92161 Author: Serge Semin Date: Thu Jul 23 03:58:41 2020 +0300 dmaengine: Introduce min burst length capability Some hardware aside from default 0/1 may have greater minimum burst transactions length constraints. Here we introduce the DMA device and slave capability, which if required can be initialized by the DMA engine driver with the device-specific value. Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200723005848.31907-4-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit 2e7d74214d03b40e4ca123b834f189b08e40a6b7 Author: Serge Semin Date: Thu Jul 23 03:58:40 2020 +0300 dt-bindings: dma: dw: Add max burst transaction length property This array property is used to indicate the maximum burst transaction length supported by each DMA channel. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20200723005848.31907-3-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit be464133cd77c95d13df3369e63255b881d84200 Author: Serge Semin Date: Thu Jul 23 03:58:39 2020 +0300 dt-bindings: dma: dw: Convert DW DMAC to DT binding Modern device tree bindings are supposed to be created as YAML-files in accordance with dt-schema. This commit replaces the Synopsis Designware DMA controller legacy bare text bindings with YAML file. The only required prorties are "compatible", "reg", "#dma-cells" and "interrupts", which will be used by the driver to correctly find the controller memory region and handle its events. The rest of the properties are optional, since in case if either "dma-channels" or "dma-masters" isn't specified, the driver will attempt to auto-detect the IP core configuration. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20200723005848.31907-2-Sergey.Semin@baikalelectronics.ru Signed-off-by: Vinod Koul commit dcec10a5d16b1238056ee73a6964ce8eacebc4e4 Author: Randy Dunlap Date: Sun Jul 19 17:14:55 2020 -0700 udf: osta_udf.h: delete a duplicated word Drop the repeated word "struct" in a comment. Link: https://lore.kernel.org/r/20200720001455.31882-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Jan Kara Signed-off-by: Jan Kara commit 269f00a950cd93c2251fd90909518a069679854c Author: Randy Dunlap Date: Sun Jul 19 17:14:31 2020 -0700 reiserfs: reiserfs.h: delete a duplicated word Drop the repeated word "than" in a comment. Link: https://lore.kernel.org/r/20200720001431.29718-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Jan Kara Cc: Jeff Mahoney Cc: reiserfs-devel@vger.kernel.org Signed-off-by: Jan Kara commit 17a0445e7b5d0238c01a7e9b9885a4464408eb5d Author: Randy Dunlap Date: Sun Jul 19 17:13:27 2020 -0700 ext2: ext2.h: fix duplicated word + typos Change the repeated word "the" in "it the the" to "it is the". Fix typo "recentl" to "recently". Fix verb "give" to "gives". Link: https://lore.kernel.org/r/20200720001327.23603-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Jan Kara Cc: linux-ext4@vger.kernel.org Signed-off-by: Jan Kara commit daf4ad0499aa4f75c6f32493829acdbe48110b32 Author: Peter Ujfalusi Date: Fri Jul 17 15:09:03 2020 +0300 dmaengine: ti: k3-udma: Query throughput level information from hardware The CAP3 register contains information about the number of HCHAN (High Capacity) and UCHAN (Ultra High Capacity) channels in UDMAP. Based on this information the start indexes of the levels can be calculated without a need of a table in the match data. On am654 the CAP3 does not contain information about the number different channels. Set up the tpl information based on the available documentation. This change will allow to use the same compatible for different SoCs where the only difference is the number of channel types. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200717120903.8774-3-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 44385c4171d03b1aa030f3f21a6fce2f6edcfdab Author: Peter Ujfalusi Date: Fri Jul 17 15:09:02 2020 +0300 dmaengine: ti: k3-udma: Use defines for capabilities register parsing Add defines for the CAP register fields to make the code self explaining. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200717120903.8774-2-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit b4a461e72bcb28a512bbdd29a4cb70aede2d68d3 Author: Herbert Xu Date: Tue Jul 21 16:22:48 2020 +1000 printk: Make linux/printk.h self-contained As it stands if you include printk.h by itself it will fail to compile because it requires definitions from ratelimit.h. However, simply including ratelimit.h from printk.h does not work due to inclusion loops involving sched.h and kernel.h. This patch solves this by moving bits from ratelimit.h into a new header file which can then be included by printk.h without any worries about header loops. The build bot then revealed some intriguing failures arising out of this patch. On s390 there is an inclusion loop with asm/bug.h and linux/kernel.h that triggers a compile failure, because kernel.h will cause asm-generic/bug.h to be included before s390's own asm/bug.h has finished processing. This has been fixed by not including kernel.h in arch/s390/include/asm/bug.h. Signed-off-by: Herbert Xu Reviewed-by: Andy Shevchenko Reviewed-by: Sergey Senozhatsky Acked-by: Petr Mladek Acked-by: Steven Rostedt (VMware) Signed-off-by: Sergey Senozhatsky Link: https://lore.kernel.org/r/20200721062248.GA18383@gondor.apana.org.au commit 9a996c67a65d937b23408e56935ef23404c9418e Author: Heiko Carstens Date: Thu Jul 23 21:42:36 2020 +0200 s390/vmemmap: coding style updates Signed-off-by: Heiko Carstens commit 2c114df071935762ffa88144cdab03d84beaa702 Author: David Hildenbrand Date: Wed Jul 22 11:45:58 2020 +0200 s390/vmemmap: avoid memset(PAGE_UNUSED) when adding consecutive sections Let's avoid memset(PAGE_UNUSED) when adding consecutive sections, whereby the vmemmap of a single section does not span full PMDs. Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: David Hildenbrand Message-Id: <20200722094558.9828-10-david@redhat.com> Signed-off-by: Heiko Carstens commit cd5781d63eaf6dbf89532d8c7c214786b767ee16 Author: David Hildenbrand Date: Wed Jul 22 11:45:57 2020 +0200 s390/vmemmap: remember unused sub-pmd ranges With a memmap size of 56 bytes or 72 bytes per page, the memmap for a 256 MB section won't span full PMDs. As we populate single sections and depopulate single sections, the depopulation step would not be able to free all vmemmap pmds anymore. Do it similarly to x86, marking the unused memmap ranges in a special way (pad it with 0xFD). This allows us to add/remove sections, cleaning up all allocated vmemmap pages even if the memmap size is not multiple of 16 bytes per page. A 56 byte memmap can, for example, be created with !CONFIG_MEMCG and !CONFIG_SLUB. Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: David Hildenbrand Message-Id: <20200722094558.9828-9-david@redhat.com> Signed-off-by: Heiko Carstens commit f2057b4266a6be469ea0630971cf3cd933e42cce Author: David Hildenbrand Date: Wed Jul 22 11:45:56 2020 +0200 s390/vmemmap: fallback to PTEs if mapping large PMD fails Let's fallback to single pages if short on huge pages. No need to stop memory hotplug. Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: David Hildenbrand Message-Id: <20200722094558.9828-8-david@redhat.com> Signed-off-by: Heiko Carstens commit b9ff81003cf1a0b12b8d60b6ef33a34e84dfe7ac Author: David Hildenbrand Date: Wed Jul 22 11:45:55 2020 +0200 s390/vmem: cleanup empty page tables Let's cleanup empty page tables. Consider only page tables that fully fall into the idendity mapping and the vmemmap range. As there are no valid accesses to vmem/vmemmap within non-populated ranges, the single tlb flush at the end should be sufficient. Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: David Hildenbrand Message-Id: <20200722094558.9828-7-david@redhat.com> Signed-off-by: Heiko Carstens commit aa18e0e65800bf3250b23914a28e0e3fd9cadec2 Author: David Hildenbrand Date: Wed Jul 22 11:45:54 2020 +0200 s390/vmemmap: take the vmem_mutex when populating/freeing Let's synchronize all accesses to the 1:1 and vmemmap mappings. This will be especially relevant when wanting to cleanup empty page tables that could be shared by both. Avoid races when removing tables that might be just about to get reused. Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: David Hildenbrand Message-Id: <20200722094558.9828-6-david@redhat.com> Signed-off-by: Heiko Carstens commit c00f05a92424c7788fdbf0909b823f8027596d66 Author: David Hildenbrand Date: Wed Jul 22 11:45:53 2020 +0200 s390/vmemmap: cleanup when vmemmap_populate() fails Cleanup what we partially added in case vmemmap_populate() fails. For vmem, this is already handled by vmem_add_mapping(). Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: David Hildenbrand Message-Id: <20200722094558.9828-5-david@redhat.com> Signed-off-by: Heiko Carstens commit 332bc8ebab2c0d00e80dd23377ec23ad3de83214 Author: Shawn Guo Date: Mon Jun 29 22:49:26 2020 +0800 thermal: qcom: tsens-v0_1: Add support for MSM8939 The TSENS integrated on MSM8939 is a v0_1 device with 10 sensors. Different from its predecessor MSM8916, where 'calib_sel' bits sit in separate qfprom word, MSM8939 has 'cailb' and 'calib_sel' bits mixed and spread on discrete offsets. That's why all qfprom bits are read as one go and later mapped to calibration data for MSM8939. Signed-off-by: Shawn Guo Acked-by: Amit Kucheria Tested-by: Konrad Dybcio /* on Asus Z00T smartphone */ Acked-by: Konrad Dybcio Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629144926.665-3-shawn.guo@linaro.org commit 9ec8fa8dc331be6b63726be696b2b21d0031a09b Author: David Hildenbrand Date: Wed Jul 22 11:45:52 2020 +0200 s390/vmemmap: extend modify_pagetable() to handle vmemmap Extend our shiny new modify_pagetable() to handle !direct (vmemmap) mappings. Convert vmemmap_populate() and implement vmemmap_free(). Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: David Hildenbrand Message-Id: <20200722094558.9828-4-david@redhat.com> Signed-off-by: Heiko Carstens commit 3e0d3e408e63839625b210e5eb7269c45b870a38 Author: David Hildenbrand Date: Wed Jul 22 11:45:51 2020 +0200 s390/vmem: consolidate vmem_add_range() and vmem_remove_range() We want to have only a single pagetable walker and reuse the same functionality for vmemmap handling. Let's start by consolidating vmem_add_range() and vmem_remove_range(), converting it into a recursive implementation. A recursive implementation makes it easier to expand individual cases without harming readability. In addition, we minimize traversing the whole hierarchy over and over again. One change is that we don't unmap large PMDs/PUDs when not completely covered by the request, something that should never happen with direct mappings, unless one would be removing in other granularity than added, which would be broken already. Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: David Hildenbrand Message-Id: <20200722094558.9828-3-david@redhat.com> Signed-off-by: Heiko Carstens commit 8398b226b8f01df902450658a139ee01d9f4c482 Author: David Hildenbrand Date: Wed Jul 22 11:45:50 2020 +0200 s390/vmem: rename vmem_add_mem() to vmem_add_range() Let's match the name to vmem_remove_range(). Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Gerald Schaefer Signed-off-by: David Hildenbrand Message-Id: <20200722094558.9828-2-david@redhat.com> Signed-off-by: Heiko Carstens commit 73d6eb48d26930f0cbdc8bf1ccb0ad964e7d2b90 Author: Ilya Leoshkevich Date: Wed Jul 22 23:58:54 2020 +0200 s390: enable HAVE_FUNCTION_ERROR_INJECTION This kernel feature is required for enabling BPF_KPROBE_OVERRIDE. Define override_function_with_return() and regs_set_return_value() functions, and fix compile errors in syscall_wrapper.h. Signed-off-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens commit 4631f3ca493a7c8f9f31aef45fc0fc0e182155b7 Author: Niklas Schnelle Date: Tue Jul 7 16:42:19 2020 +0200 s390/pci: clarify comment in s390_mmio_read/write The existing comment was talking about reading in the write part and vice versa. While we are here make it more clear why restricting the syscalls to MIO capable devices is okay. Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit ec99756ae139482715c467b406358227dfaa2885 Author: Konrad Dybcio Date: Mon Jun 29 22:49:25 2020 +0800 dt-bindings: tsens: qcom: Document MSM8939 compatible It adds compatible for MSM8939 TSENS device. Signed-off-by: Konrad Dybcio Reviewed-by: Amit Kucheria Acked-by: Rob Herring Signed-off-by: Shawn Guo Tested-by: Konrad Dybcio /* on Asus Z00T smartphone */ Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629144926.665-2-shawn.guo@linaro.org commit bb403111e017a327737242eca40311921f833627 Author: Joakim Zhang Date: Mon Jul 27 22:17:34 2020 +0800 irqchip/imx-intmux: Implement intmux runtime power management When the system is suspended, we can explicitly disable clock to save power. To achieve this, we need save registers' state since it could be lost after power off. Implement power management which will: - Turn the clock off after probing - Disable clock and save registers' state on system suspend, as well as enable clock and restore registers' state on resume - Rely on the Power Domain framework to shutdown the intmux power domain Without CONFIG_PM, the clock is always on after probe stage. Signed-off-by: Joakim Zhang [maz: revamped commit message] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200727141734.24890-2-qiangqing.zhang@nxp.com commit d1bd7e0ba533a2a6f313579ec9b504f6614c35c4 Author: Zenghui Yu Date: Tue Jun 30 21:37:46 2020 +0800 irqchip/gic-v4.1: Use GFP_ATOMIC flag in allocate_vpe_l1_table() Booting the latest kernel with DEBUG_ATOMIC_SLEEP=y on a GICv4.1 enabled box, I get the following kernel splat: [ 0.053766] BUG: sleeping function called from invalid context at mm/slab.h:567 [ 0.053767] in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/1 [ 0.053769] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.8.0-rc3+ #23 [ 0.053770] Call trace: [ 0.053774] dump_backtrace+0x0/0x218 [ 0.053775] show_stack+0x2c/0x38 [ 0.053777] dump_stack+0xc4/0x10c [ 0.053779] ___might_sleep+0xfc/0x140 [ 0.053780] __might_sleep+0x58/0x90 [ 0.053782] slab_pre_alloc_hook+0x7c/0x90 [ 0.053783] kmem_cache_alloc_trace+0x60/0x2f0 [ 0.053785] its_cpu_init+0x6f4/0xe40 [ 0.053786] gic_starting_cpu+0x24/0x38 [ 0.053788] cpuhp_invoke_callback+0xa0/0x710 [ 0.053789] notify_cpu_starting+0xcc/0xd8 [ 0.053790] secondary_start_kernel+0x148/0x200 # ./scripts/faddr2line vmlinux its_cpu_init+0x6f4/0xe40 its_cpu_init+0x6f4/0xe40: allocate_vpe_l1_table at drivers/irqchip/irq-gic-v3-its.c:2818 (inlined by) its_cpu_init_lpis at drivers/irqchip/irq-gic-v3-its.c:3138 (inlined by) its_cpu_init at drivers/irqchip/irq-gic-v3-its.c:5166 It turned out that we're allocating memory using GFP_KERNEL (may sleep) within the CPU hotplug notifier, which is indeed an atomic context. Bad thing may happen if we're playing on a system with more than a single CommonLPIAff group. Avoid it by turning this into an atomic allocation. Fixes: 5e5168461c22 ("irqchip/gic-v4.1: VPE table (aka GICR_VPROPBASER) allocation") Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200630133746.816-1-yuzenghui@huawei.com commit 762a21fd45e056e9ccd2ef5787b4ee0c5af9bec8 Author: Marc Zyngier Date: Sun Jul 26 11:12:36 2020 +0100 irqchip: Fix IRQCHIP_PLATFORM_DRIVER_* compilation by including module.h The newly introduced IRQCHIP_PLATFORM_DRIVER_* macros expand into module-related macros, but do so without including module.h. Depending on the driver and/or architecture, this happens to work, or not. Unconditionnaly include linux/module.h to sort it out. Fixes: f3b5e608ed6d ("irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros") Reported-by: kernel test robot Cc: Saravana Kannan Signed-off-by: Marc Zyngier commit 9d6a5fe1757cbbd9323a62bfb8df0a714b757903 Author: Alexandre Torgue Date: Fri Jul 17 16:07:17 2020 +0200 irqchip/stm32-exti: Map direct event to irq parent EXTI lines are mainly used to wake-up system from CStop low power mode. Currently, if a device wants to use a EXTI (direct) line as wakeup line, it has to declare 2 interrupts: - one for EXTI used to wake-up system (with dedicated_wake_irq api). - one for GIC used to get the wake up reason inside the concerned IP. This split is not really needed as each EXTI line is actually "linked " to a GIC. So to avoid this useless double interrupt management in each wake-up driver, this patch lets the STM32 EXTI driver abstract it by mapping each EXTI line to his corresponding GIC. Signed-off-by: Alexandre Torgue Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200717140717.29606-1-alexandre.torgue@st.com commit 920ecb8c35cb2e114858606c9a17e8e679a25454 Author: Saravana Kannan Date: Fri Jul 17 17:06:37 2020 -0700 irqchip/mtk-cirq: Convert to a platform driver This driver can work as a platform driver. So covert it to a platform driver. Signed-off-by: Saravana Kannan Signed-off-by: Marc Zyngier Reviewed-by: Hanks Chen Link: https://lore.kernel.org/r/20200718000637.3632841-5-saravanak@google.com commit f97dbf48ca43009e8b8bcdf07f47fc9f06149b36 Author: Saravana Kannan Date: Fri Jul 17 17:06:36 2020 -0700 irqchip/mtk-sysirq: Convert to a platform driver This driver can work as a platform driver. So covert it to a platform driver. Signed-off-by: Saravana Kannan Signed-off-by: Marc Zyngier Reviewed-by: Hanks Chen Link: https://lore.kernel.org/r/20200718000637.3632841-4-saravanak@google.com commit 5be57099d44550d2c4cf44a86c44df87edb79a57 Author: Saravana Kannan Date: Fri Jul 17 17:06:35 2020 -0700 irqchip/qcom-pdc: Switch to using IRQCHIP_PLATFORM_DRIVER helper macros Switch the driver to use the helper macros. In addition to reducing the number of lines, this also adds module unload protection (if the driver is compiled as a module) by switching from module_platform_driver to builtin_platform_driver. Signed-off-by: Saravana Kannan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200718000637.3632841-3-saravanak@google.com commit f8410e626569324cfe831aaecc0504cafc12b471 Author: Saravana Kannan Date: Fri Jul 17 17:06:34 2020 -0700 irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros Compiling an irqchip driver as a platform driver needs to bunch of things to be done right: - Making sure the parent domain is initialized first - Making sure the device can't be unbound from sysfs - Disallowing module unload if it's built as a module - Finding the parent node - Etc. Instead of trying to make sure all future irqchip platform drivers get this right, provide boilerplate macros that take care of all of this. An example use would look something like this. Where acme_foo_init and acme_bar_init are similar to what would be passed to IRQCHIP_DECLARE. IRQCHIP_PLATFORM_DRIVER_BEGIN(acme_irq) IRQCHIP_MATCH("acme,foo", acme_foo_init) IRQCHIP_MATCH("acme,bar", acme_bar_init) IRQCHIP_PLATFORM_DRIVER_END(acme_irq) Signed-off-by: Saravana Kannan Signed-off-by: Marc Zyngier Cc: John Stultz Link: https://lore.kernel.org/r/20200718000637.3632841-2-saravanak@google.com commit b7640d765dbbde794c49198c9851f6026fb6e43e Author: Randy Dunlap Date: Sat Jul 18 17:28:53 2020 -0700 irqchip: irq-bcm2836.h: drop a duplicated word Drop the repeated word "the" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Marc Zyngier Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Link: https://lore.kernel.org/r/20200719002853.20419-1-rdunlap@infradead.org commit 3af9571cd585efafc2facbd8dbd407317ff898cf Author: Zenghui Yu Date: Mon Jul 20 17:23:28 2020 +0800 irqchip/gic-v4.1: Ensure accessing the correct RD when writing INVALLR The GICv4.1 spec tells us that it's CONSTRAINED UNPREDICTABLE to issue a register-based invalidation operation for a vPEID not mapped to that RD, or another RD within the same CommonLPIAff group. To follow this rule, commit f3a059219bc7 ("irqchip/gic-v4.1: Ensure mutual exclusion between vPE affinity change and RD access") tried to address the race between the RD accesses and the vPE affinity change, but somehow forgot to take GICR_INVALLR into account. Let's take the vpe_lock before evaluating vpe->col_idx to fix it. Fixes: f3a059219bc7 ("irqchip/gic-v4.1: Ensure mutual exclusion between vPE affinity change and RD access") Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200720092328.708-1-yuzenghui@huawei.com commit 9808357ff2e5bfe1e0dcafef5e78cc5b617a7078 Author: Florian Fainelli Date: Fri Jul 24 11:41:56 2020 -0700 irqchip/irq-bcm7038-l1: Guard uses of cpu_logical_map cpu_logical_map is only defined for CONFIG_SMP builds, when we are in an UP configuration, the boot CPU is 0. Fixes: 6468fc18b006 ("irqchip/irq-bcm7038-l1: Add PM support") Reported-by: kernel test robot Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200724184157.29150-1-f.fainelli@gmail.com commit 6d4c4479f80141a2a24ac798a86942b1225206df Author: Zenghui Yu Date: Tue Jun 30 21:41:26 2020 +0800 irqchip/gic-v3: Remove unused register definition [maz: The GICv3 spec has evolved quite a bit since the draft the Linux driver was written against, and some register definitions are simply gone] As per the GICv3 specification, GIC{D,R}_SEIR are not assigned and the locations (0x0068) are actually Reserved. GICR_MOV{LPI,ALL}R are two IMP DEF registers and might be defined by some specific micro-architecture. As they're not used anywhere in the kernel, just drop all of them. Signed-off-by: Zenghui Yu [maz: added context explaination] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200630134126.880-1-yuzenghui@huawei.com commit 95bf9305d2e38b6d47eb91abfdc7472f05e0f5bd Author: John Stultz Date: Fri Jul 10 23:18:24 2020 +0000 irqchip/qcom-pdc: Allow QCOM_PDC to be loadable as a permanent module Allows qcom-pdc driver to be loaded as a permanent module Also, due to the fact that IRQCHIP_DECLARE becomes a no-op when building as a module, we have to replace it with platform driver hooks explicitly. Thanks to Saravana for his help on pointing out the IRQCHIP_DECLARE issue and guidance on a solution. Signed-off-by: John Stultz Signed-off-by: Marc Zyngier Reviewed-by: Linus Walleij Cc: Andy Gross Cc: Bjorn Andersson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Linus Walleij Cc: Maulik Shah Cc: Lina Iyer Cc: Saravana Kannan Cc: Todd Kjos Cc: Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: linux-gpio@vger.kernel.org Link: https://lore.kernel.org/r/20200710231824.60699-4-john.stultz@linaro.org commit 8d16f5b979660c0fdcfa21a418cc03f1fde60cf7 Author: John Stultz Date: Fri Jul 10 23:18:23 2020 +0000 genirq: Export irq_chip_retrigger_hierarchy and irq_chip_set_vcpu_affinity_parent Add EXPORT_SYMBOL_GPL entries for irq_chip_retrigger_hierarchy() and irq_chip_set_vcpu_affinity_parent() so that we can allow drivers like the qcom-pdc driver to be loadable as a module. Signed-off-by: John Stultz Signed-off-by: Marc Zyngier Reviewed-by: Linus Walleij Cc: Andy Gross Cc: Bjorn Andersson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Linus Walleij Cc: Maulik Shah Cc: Lina Iyer Cc: Saravana Kannan Cc: Todd Kjos Cc: Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: linux-gpio@vger.kernel.org Link: https://lore.kernel.org/r/20200710231824.60699-3-john.stultz@linaro.org commit 8a667928cfae337b85bee4fb0dbc09f3c2715856 Author: John Stultz Date: Fri Jul 10 23:18:22 2020 +0000 irqdomain: Export irq_domain_update_bus_token Add export for irq_domain_update_bus_token() so that we can allow drivers like the qcom-pdc driver to be loadable as a module. Signed-off-by: John Stultz Signed-off-by: Marc Zyngier Reviewed-by: Linus Walleij Cc: Andy Gross Cc: Bjorn Andersson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier Cc: Linus Walleij Cc: Maulik Shah Cc: Lina Iyer Cc: Saravana Kannan Cc: Todd Kjos Cc: Greg Kroah-Hartman Cc: linux-arm-msm@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: linux-gpio@vger.kernel.org Link: https://lore.kernel.org/r/20200710231824.60699-2-john.stultz@linaro.org commit b0e453ffdd194f9632ca88783b0e5d582b088679 Author: Wei Yongjun Date: Tue Jul 14 22:22:45 2020 +0800 irqchip/mips-gic: Make local symbols static The sparse tool complains as follows: drivers/irqchip/irq-mips-gic.c:49:1: warning: symbol '__pcpu_scope_pcpu_masks' was not declared. Should it be static? drivers/irqchip/irq-mips-gic.c:620:6: warning: symbol 'gic_ipi_domain_free' was not declared. Should it be static? drivers/irqchip/irq-mips-gic.c:634:5: warning: symbol 'gic_ipi_domain_match' was not declared. Should it be static? Those symbols are not used outside of irq-mips-gic.c, so marks them static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200714142245.16124-1-weiyongjun1@huawei.com commit 45e9504f109b84986ba9d25a273a5d5bd3f3e9d9 Author: Zenghui Yu Date: Thu Jul 16 16:39:05 2020 +0800 genirq/irqdomain: Remove redundant NULL pointer check on fwnode The is_fwnode_irqchip() helper will check if the fwnode_handle is empty. There is no need to perform a redundant check outside of it. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200716083905.287-1-yuzenghui@huawei.com commit 57a744e9553fb9f4900650bc24e523d4979b44d9 Author: Masahiro Yamada Date: Wed Jul 15 02:38:57 2020 +0900 irqchip/ativic32: Constify irq_domain_ops This is passed to irq_domain_add_linear(), which accepts a pointer to a const structure. Signed-off-by: Masahiro Yamada Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200714173857.477422-1-masahiroy@kernel.org commit 5257169ade8c428e9eed4718103b0215eb6c5810 Author: Fabien Dessenne Date: Mon Jul 6 10:11:15 2020 +0200 irqchip/stm32-exti: Use the hwspin_lock_timeout_in_atomic() API Now that the hwspin_lock_timeout_in_atomic() API is available use it. Signed-off-by: Fabien Dessenne Signed-off-by: Alexandre Torgue Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200706081115.25180-1-alexandre.torgue@st.com commit da3a9e9a6aa96ef589c153078f66e0646bf06b55 Author: Neil Armstrong Date: Thu Jul 23 11:05:50 2020 +0200 drm/fourcc: fix Amlogic Video Framebuffer Compression macro Fix the Amlogic Video Framebuffer Compression modifier macro to correctly add the layout options, a pair of parenthesis was missing. Fixes: d6528ec88309 ("drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression") Signed-off-by: Neil Armstrong Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200723090551.27529-1-narmstrong@baylibre.com commit 5f987caec521cbb00d4ba2dc641ac8074626b762 Author: Michael Ellerman Date: Mon Jul 27 13:44:36 2020 +1000 powerpc/fadump: Fix build error with CONFIG_PRESERVE_FA_DUMP=y skiroot_defconfig fails: arch/powerpc/kernel/fadump.c:48:17: error: ‘cpus_in_fadump’ defined but not used 48 | static atomic_t cpus_in_fadump; Fix it by moving the definition into the #ifdef where it's used. Fixes: ba608c4fa12c ("powerpc/fadump: fix race between pstore write and fadump crash trigger") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200727070341.595634-1-mpe@ellerman.id.au commit c97793089b11f736287b65abe3d530d5ffd3857b Merge: 9a360a7cae114 92ed301919932 Author: Greg Kroah-Hartman Date: Mon Jul 27 08:17:14 2020 +0200 Merge 5.8-rc7 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 99eae48fd4c5c59a76de17bc036a2dbd7f698bfd Author: Rayagonda Kokatanur Date: Fri May 29 12:46:55 2020 +0530 mtd: spi-nor: update read capabilities for w25q64 and s25fl064k Both w25q64 and s25fl064k nor flash support QUAD and DUAL read command, hence update the same in flash_info table. This is tested on Broadcom Stingray SoC (bcm958742t). s25fl064k and w25q64 share the same JEDEC ID. The search alg will return the first hit, so s25fl064k even for the winbond parts. We should differentiate between these flashes, but it's not in the scope of this patch. Related discussion at: Link: https://lore.kernel.org/patchwork/patch/628090/ Signed-off-by: Rayagonda Kokatanur Link: https://lore.kernel.org/r/20200529071655.739-1-rayagonda.kokatanur@broadcom.com [tudor.ambarus@microchip.com: Update commit message and indicate that s25fl064k and w25q64 share the same JEDEC ID] Signed-off-by: Tudor Ambarus commit 1371a80cac33d5b0df4c33f918b9dd810cf4edab Author: David Clear Date: Mon Jul 20 09:36:56 2020 -0700 mtd: spi-nor: micron: Add SPI_NOR_DUAL_READ flag on mt25qu02g The Micron mt25qu02g supports both x2 and x4 transactions. Add the SPI_NOR_DUAL_READ flag to its spi_nor_ids[] table entry. Tested on Pensando SoC hardware with a cadence quadspi controller via drivers/spi/spi-cadence-quadspi.c, in x2 mode at 50MHz. - random data write, erase, read - verified erase operations - random data write, read/compare - verified write/read operations Signed-off-by: David Clear Acked-by: Shannon Nelson Link: https://lore.kernel.org/r/20200720163656.38006-3-dac2@pensando.io Signed-off-by: Tudor Ambarus commit 48029e620decc185c88041e12156e4f5d871b28a Author: David Clear Date: Mon Jul 20 09:36:55 2020 -0700 mtd: spi-nor: macronix: Add support for mx66u2g45g The Macronix mx66u2g45g is a 1.8V, 2Gbit (256MB) device that supports x1, x2, or x4 operation. Tested on Pensando SoC hardware with a cadence quadspi controller via drivers/spi/spi-cadence-quadspi.c, in x2 mode at 50MHz. - random data write, erase, read - verified erase operations - random data write, read/compare - verified write/read operations Signed-off-by: David Clear Acked-by: Shannon Nelson Link: https://lore.kernel.org/r/20200720163656.38006-2-dac2@pensando.io Signed-off-by: Tudor Ambarus commit 44a80df4bfce02f5d51fe5040bdbdf10d0d78f4e Author: Alexander Sverdlin Date: Wed Jul 22 16:01:36 2020 +0200 mtd: spi-nor: intel-spi: Simulate WRDI command After spi_nor_write_disable() return code checks were introduced in the spi-nor front end intel-spi backend stopped to work because WRDI was never supported and always failed. Just pretend it was sucessful and ignore the command itself. HW sequencer shall do the right thing automatically, while with SW sequencer we cannot do it anyway, because the only tool we had was preopcode and it makes no sense for WRDI. Fixes: bce679e5ae3a ("mtd: spi-nor: Check for errors after each Register Operation") Signed-off-by: Alexander Sverdlin Reviewed-by: Mika Westerberg Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/282e1305-fd08-e446-1a22-eb4dff78cfb4@nokia.com Signed-off-by: Tudor Ambarus commit 92be42392256b30296843aa4d987ad8d175c0e10 Merge: fc01d1f10b15f 922e7455bb612 Author: Dave Airlie Date: Mon Jul 27 12:32:12 2020 +1000 Merge tag 'amd-drm-next-5.9-2020-07-24' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.9-2020-07-24: amdgpu: - Misc sienna cichlid fixes - Final bits of swSMU cleanup - Misc display fixes - Misc VCN fixes - Eeprom i2c cleanup - Drop amd vrr_range debugfs in favor of core drm Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200724205712.3913-1-alexander.deucher@amd.com commit fde87ebf1daa8d96e4412aa06536da4b55103e02 Author: Angelo Dureghello Date: Fri Jul 3 01:53:38 2020 +0200 m68k: stmark2: enable edma support for dspi Enable edma support for stmark2. Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer commit f944814eea028be6cc489d3080ed2901525ded1d Author: Greg Ungerer Date: Mon Jun 15 14:20:47 2020 +1000 m68k: use asm-generic cmpxchg_local() Use the asm-generic version of the cmpxchg_local() macro. Although not all target types use asm-generic/cmpxchg.h, for those that do the local cmpxchg_local() is the same as the asm-generic/cmpxchg.h one. So no need to define the local one. Signed-off-by: Greg Ungerer commit 58f80fa56d8b493f52cbec64a86ba61e6cf384f1 Author: Mike Rapoport Date: Thu Jun 18 11:17:27 2020 +0300 m68k: mcfmmu: remove stale part of comment about steal_context The comment about steal_context() came from powerpc and a part of it addresses differences between powerpc variants that are not really relevant to m68k. Remove that part of the comment. Signed-off-by: Mike Rapoport Signed-off-by: Greg Ungerer commit bdee0e793cea10c516ff48bf3ebb4ef1820a116b Author: Greg Ungerer Date: Sat Jun 13 17:17:52 2020 +1000 m68knommu: fix overwriting of bits in ColdFire V3 cache control The Cache Control Register (CACR) of the ColdFire V3 has bits that control high level caching functions, and also enable/disable the use of the alternate stack pointer register (the EUSP bit) to provide separate supervisor and user stack pointer registers. The code as it is today will blindly clear the EUSP bit on cache actions like invalidation. So it is broken for this case - and that will result in failed booting (interrupt entry and exit processing will be completely hosed). This only affects ColdFire V3 parts that support the alternate stack register (like the 5329 for example) - generally speaking new parts do, older parts don't. It has no impact on ColdFire V3 parts with the single stack pointer, like the 5307 for example. Fix the cache bit defines used, so they maintain the EUSP bit when carrying out cache actions through the CACR register. Signed-off-by: Greg Ungerer commit 416426ab79b713a40c8f8d0428dfbfd2e0f7c080 Author: Greg Ungerer Date: Mon Jun 15 10:41:08 2020 +1000 m68k: fix ColdFire mmu init compile warning Compiling for MMU enabled ColdFire targets gives a warning: CC arch/m68k/mm/mcfmmu.o arch/m68k/mm/mcfmmu.c: In function ‘paging_init’: arch/m68k/mm/mcfmmu.c:42:17: warning: unused variable ‘zone’ [-Wunused-variable] enum zone_type zone; ^~~~ This was caused by changes in commit fa3354e4ea39 ("mm: free_area_init: use maximal zone PFNs rather than zone sizes") leaving around a now unused variable declaration. Remove the unused variable. Signed-off-by: Greg Ungerer commit d4aa8affa1e9e51c237a1ec47a97e96dce76c98c Author: Greg Ungerer Date: Mon Jun 15 16:13:44 2020 +1000 m68knommu: fix use of cpu_to_le() on IO access Due to the different data endian requirements of different buses on m68knommu variants we sometimes need to byte swap results for readX() or values to writeX(). Currently the code uses cpu_to_le to do this, resulting in sparse warnings like: arch/m68k/include/asm/io_no.h:78:16: sparse: sparse: cast to restricted __le32 Some casting to force __le32 types would resolve but it looks to be simpler to just switch to using the underlying swab32() to resolve. Similarly handle the 16bit cases in these functions as well. Reported-by: kernel test robot CC: Marc Kleine-Budde Reviewed-by: Luc Van Oostenryck Signed-off-by: Greg Ungerer commit 005b73d0dd83c9cb9420a196bea8070cde30ecac Author: Greg Ungerer Date: Mon Jun 15 08:44:17 2020 +1000 m68knommu: __force type casts for raw IO access Bring the m68knommu raw IO functions into line with the m68k raw IO access functions and __force casting of the address component. This is primarily to fix sparse warnings on use of these raw macros. Reported-by: kernel test robot CC: Marc Kleine-Budde Reviewed-by: Luc Van Oostenryck Signed-off-by: Greg Ungerer commit cc0fec180d30212095cd0f5a99157c2268df6367 Author: Angelo Dureghello Date: Sun Jun 7 21:12:15 2020 +0200 m68k: stmark2: defconfig updates Some defconfig updates for stmark2 board, mainly to enable sdcard and mmu. Signed-off-by: Angelo Dureghello Signed-off-by: Greg Ungerer commit fc01d1f10b15f0ae008e6a4aca112a95aa06a382 Merge: 3afe676684f42 0059a9081ac37 Author: Dave Airlie Date: Mon Jul 27 12:03:52 2020 +1000 Merge branch 'linux-5.9' of git://github.com/skeggsb/linux into drm-next - Conversion of all push buffer emission to a new set of macros, with better safety, sanity-checking, debug ability, and the use of NVIDIA's class headers. The headers have been trimmed to just what we use as they're rather extensive, the full versions can be found on NVIDIA's github[1]. - Proper push buffer space management for EVO/NVD channels. - Fixes to firmware loading behaviour in odd situations (various combinations of missing/incompatible FW). - runpm reference leak fixes - crc compile fixes without debugfs - 2MiB system memory pages support on Pascal and newer - misc other cleanups Signed-off-by: Dave Airlie From: Ben Skeggs Link: https://patchwork.freedesktop.org/patch/msgid/ Date: Sun Jul 26 01:23:37 2020 +0200 gpio: regmap: fix type clash GPIO_REGMAP_ADDR_ZERO() cast to unsigned long but the actual config parameters are unsigned int. We use unsigned int here because that is the type which is used by the underlying regmap. Fixes: ebe363197e52 ("gpio: add a reusable generic gpio_chip using regmap") Reported-by: kernel test robot Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20200725232337.27581-1-michael@walle.cc Signed-off-by: Linus Walleij commit ab92ffd5f6ac3ebd4a7650ef906702ab86127b45 Author: Randy Dunlap Date: Wed Jul 15 18:30:01 2020 -0700 power: fix duplicated words in bq2415x_charger.h Drop the doubled word "for". Change "It it" to "If it". Signed-off-by: Randy Dunlap Cc: linux-pm@vger.kernel.org Acked-by: Pali Rohár Signed-off-by: Sebastian Reichel commit 9d832cd36c606e176f06eaf97f0c54b02359d95a Author: Yongqiang Liu Date: Thu Jul 16 16:58:49 2020 +0800 power: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yongqiang Liu Signed-off-by: Sebastian Reichel commit f03a3497fbf865d8eeab6d3cfc677f778862b435 Author: Alexander A. Klimov Date: Sat Jul 18 11:43:40 2020 +0200 power: reset: keystone-reset: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Sebastian Reichel commit a68d5a502bbacfbd31f98371f777d574b3a91baf Author: Chuck Lever Date: Fri Jul 24 15:26:47 2020 -0400 SUNRPC: Refresh the show_rqstp_flags() macro Ensure that show_rqstp_flags() can recognize and display the RQ_AUTHERR flag, added in commit 83dd59a0b9af ("SUNRPC/nfs: Fix return value for nfs4_callback_compound()") and the RQ_DATA flag, added in commit ff3ac5c3dc23 ("SUNRPC: Add a server side per-connection limit"). Signed-off-by: Chuck Lever commit 90fc73928fec2f62bbee1476781754c7392a7b61 Author: Colin Ian King Date: Tue Jul 21 11:02:17 2020 +0100 x86/ioperm: Initialize pointer bitmap with NULL rather than 0 The pointer bitmap is being initialized with a plain integer 0, fix this by initializing it with a NULL instead. Cleans up sparse warning: arch/x86/xen/enlighten_pv.c:876:27: warning: Using plain integer as NULL pointer Signed-off-by: Colin Ian King Signed-off-by: Ingo Molnar Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20200721100217.407975-1-colin.king@canonical.com commit 2d65685a4a6ff6ef6bfe42717222db92c04224c2 Merge: de0038bfaf53a fbe0d451bcea5 Author: Ingo Molnar Date: Sun Jul 26 19:52:16 2020 +0200 Merge branch 'x86/urgent' into x86/cleanups Refresh the branch for a dependent commit. Signed-off-by: Ingo Molnar commit f87032aec41e0b00ae5fa9103eb8e7b2d1f8416b Merge: d25c8be67481a ba1f2b2eaa2a5 Author: Ingo Molnar Date: Sat Jul 25 10:14:55 2020 +0200 Merge branch 'locking/nmi' into x86/entry Resolve conflicts with ongoing lockdep work that fixed the NMI entry code. Conflicts: arch/x86/entry/common.c arch/x86/include/asm/idtentry.h Signed-off-by: Ingo Molnar commit d25c8be67481aaaa060782d7e8b84bc0d0355922 Merge: 72c3c0fe54a3f 3135f5b735929 Author: Ingo Molnar Date: Sun Jul 26 18:15:14 2020 +0200 Merge branch 'core/entry' into x86/entry Pick up generic entry code fixes. Signed-off-by: Ingo Molnar commit 3135f5b73592988af0eb1b11ccbb72a8667be201 Author: Thomas Gleixner Date: Sun Jul 26 18:14:43 2020 +0200 entry: Correct __secure_computing() stub The original version of that used secure_computing() which has no arguments. Review requested to switch to __secure_computing() which has one. The function name was correct, but no argument added and of course compiling without SECCOMP was deemed overrated. Add the missing function argument. Fixes: 6823ecabf030 ("seccomp: Provide stub for __secure_computing()") Reported-by: Ingo Molnar Signed-off-by: Thomas Gleixner commit b2f57a8e6bc987ba2c8defb507c98aff66c94fc5 Author: Chao Yu Date: Sat Jul 25 09:17:48 2020 +0800 f2fs: compress: delay temp page allocation Currently, we allocate temp pages which is used to pad hole in cluster during read IO submission, it may take long time before releasing them in f2fs_decompress_pages(), since they are only used as temp output buffer in decompression context, so let's just do the allocation in that context to reduce time of memory pool resource occupation. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 944dd22ea4475bd11180fd2f431a4a547ca4d8f5 Author: Chao Yu Date: Fri Jul 24 18:21:36 2020 +0800 f2fs: compress: fix to update isize when overwriting compressed file We missed to update isize of compressed file in write_end() with below case: cluster size is 16KB - write 14KB data from offset 0 - overwrite 16KB data from offset 0 Fixes: 4c8ff7095bef ("f2fs: support data compression") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a87aff1d491f6d824d9cc53303544361d7eaae75 Author: Jack Qiu Date: Fri Jul 24 16:55:28 2020 +0800 f2fs: space related cleanup Just for code style, no logic change 1. delete useless space 2. change spaces into tab Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 86052e407e8e1964c81965de25832258875a0e6d Author: Randy Dunlap Date: Sat Jul 25 17:38:09 2020 -0700 powerpc/powernv/pci.h: delete duplicated word Drop the repeated word "for". Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726003809.20454-10-rdunlap@infradead.org commit 3b56ed4b461fd92b66f6ea44d81837e12878031f Author: Randy Dunlap Date: Sat Jul 25 17:38:08 2020 -0700 powerpc/smu.h: delete duplicated word Drop the repeated word "the". Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726003809.20454-9-rdunlap@infradead.org commit 850659392abc303d41c3f9217d45ab4fa79d201c Author: Randy Dunlap Date: Sat Jul 25 17:38:07 2020 -0700 powerpc/reg.h: delete duplicated word Drop the repeated word "a". Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726003809.20454-8-rdunlap@infradead.org commit db10f5500004268b29e3c5bfd1e44ef53a1e25c9 Author: Randy Dunlap Date: Sat Jul 25 17:38:06 2020 -0700 powerpc/ppc_asm.h: delete duplicated word Drop the repeated word "in". Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726003809.20454-7-rdunlap@infradead.org commit 028cc22d29959b501add32fc62660e5484c8092d Author: Randy Dunlap Date: Sat Jul 25 17:38:05 2020 -0700 powerpc/hw_breakpoint.h: delete duplicated word Drop the repeated word "the". Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726003809.20454-6-rdunlap@infradead.org commit 8965aa4b684f022c4d0bc6429097ddb38a26eaef Author: Randy Dunlap Date: Sat Jul 25 17:38:04 2020 -0700 powerpc/epapr_hcalls.h: delete duplicated words Drop the repeated words "file" and "the". Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726003809.20454-5-rdunlap@infradead.org commit dc9bf323d6b8996d22c111add0ac8b0c895dcf52 Author: Randy Dunlap Date: Sat Jul 25 17:38:03 2020 -0700 powerpc/cputime.h: delete duplicated word Drop the repeated word "use". Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726003809.20454-4-rdunlap@infradead.org commit 92be1fca08eabe8ab083b1dfccd3e932b4fb6f1a Author: Randy Dunlap Date: Sat Jul 25 17:38:02 2020 -0700 powerpc/book3s/radix-4k.h: delete duplicated word Drop the repeated word "per". Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726003809.20454-3-rdunlap@infradead.org commit 10a4a016d6a882ba7601159b0f719330b102c41b Author: Randy Dunlap Date: Sat Jul 25 17:38:01 2020 -0700 powerpc/book3s/mmu-hash.h: delete duplicated word Drop the repeated word "below". Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726003809.20454-2-rdunlap@infradead.org commit e2802618970566277cf5cf5c99df66f21ee83766 Author: Li RongQing Date: Fri Apr 26 19:36:30 2019 +0800 powerpc/lib: remove memcpy_flushcache redundant return Align it with other architectures and none of the callers has been interested its return Signed-off-by: Li RongQing Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1556278590-14727-1-git-send-email-lirongqing@baidu.com commit e54e30bca40233139290aecfce932dea9b996516 Author: Christophe Leroy Date: Mon Jun 29 11:17:19 2020 +0000 powerpc/ptdump: Refactor update of pg_state In note_page(), the pg_state is updated the same way in two places. Add note_page_update_state() to do it. Also include the display of boundary markers there as it is missing "no level" leg, leading to a mismatch when the first two markers are at the same address and the first displayed area uses that address. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a284a809f01c705bbaab303b06fda216f147a99a.1593429426.git.christophe.leroy@csgroup.eu commit 846feeace51bce13f5c645d5bf162455b89841fd Author: Christophe Leroy Date: Mon Jun 29 11:17:18 2020 +0000 powerpc/ptdump: Refactor update of st->last_pa st->last_pa is always updated in note_page() so it can be done outside the if/elseif/else block. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/610d6b1a60ad0bedef865a90153c1110cfaa507e.1593429426.git.christophe.leroy@csgroup.eu commit 6ca055322da8fe25ff9ac50db6f3b7b59b6f961c Author: Christophe Leroy Date: Mon Jun 29 11:15:26 2020 +0000 powerpc/32s: Use dedicated segment for modules with STRICT_KERNEL_RWX When STRICT_KERNEL_RWX is set, we want to set NX bit on vmalloc segments. But modules require exec. Use a dedicated segment for modules. There is not much space above kernel, and we don't waste vmalloc space to do alignment. Therefore, we take the segment before PAGE_OFFSET for modules. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/eb8faba9148b6cf17c696ba776b4e8ee2f6313bf.1593428200.git.christophe.leroy@csgroup.eu commit f1a1f7a15eb0e13b84791ff2738b84e414501718 Author: Christophe Leroy Date: Mon Jun 29 11:15:24 2020 +0000 powerpc/32s: Kernel space starts at TASK_SIZE Kernel space starts at TASK_SIZE. Select kernel page table when address is over TASK_SIZE. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/893425e32cd0a003539573b2d115e0ffa98bc26c.1593428200.git.christophe.leroy@csgroup.eu commit b6be1bb7f7216b9e9f33f57abe6e3290c0e66bd4 Author: Christophe Leroy Date: Mon Jun 29 11:15:23 2020 +0000 powerpc/32: Set user/kernel boundary at TASK_SIZE instead of PAGE_OFFSET User space stops at TASK_SIZE. At the moment, kernel space starts at PAGE_OFFSET. In order to use space between TASK_SIZE and PAGE_OFFSET for modules, make TASK_SIZE the limit between user and kernel space. Note that fault.c already considers TASK_SIZE as the boundary between user and kernel space. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b38b52cd8dabbb56fbd6f9219d6f3cdccbb43b44.1593428200.git.christophe.leroy@csgroup.eu commit c496433197154144c310a17939736bc5c155914d Author: Christophe Leroy Date: Mon Jun 29 11:15:22 2020 +0000 powerpc/32s: Only leave NX unset on segments used for modules Instead of leaving NX unset on all segments above the start of vmalloc space, only leave NX unset on segments used for modules. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7172c0f5253419315e434a1816ee3d6ed6505bc0.1593428200.git.christophe.leroy@csgroup.eu commit 7fbc22ce29931630da200cfc90fe5a454f54a794 Author: Christophe Leroy Date: Mon Jun 29 11:15:21 2020 +0000 powerpc: Use MODULES_VADDR if defined In order to allow allocation of modules outside of vmalloc space, use MODULES_VADDR and MODULES_END when MODULES_VADDR is defined. Redefine module_alloc() when MODULES_VADDR defined. Unmap corresponding KASAN shadow memory. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7ecf5fff1eef67d450e73fc412b6ec3818483d75.1593428200.git.christophe.leroy@csgroup.eu commit ccc8fcf72a6953fbfd6998999d622295f522b952 Author: Christophe Leroy Date: Mon Jun 29 11:15:20 2020 +0000 powerpc/lib: Prepare code-patching for modules allocated outside vmalloc space Use is_vmalloc_or_module_addr() instead of is_vmalloc_addr() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7d884db0e5a6f521331639d8c0f13e520d5a4fef.1593428200.git.christophe.leroy@csgroup.eu commit 19a551b254e6c308348a46a65332aa03c01767ed Author: Wei Yongjun Date: Sat Jul 25 17:19:49 2020 +0800 powerpc/papr_scm: Make some symbols static The sparse tool complains as follows: arch/powerpc/platforms/pseries/papr_scm.c:97:1: warning: symbol 'papr_nd_regions' was not declared. Should it be static? arch/powerpc/platforms/pseries/papr_scm.c:98:1: warning: symbol 'papr_ndr_lock' was not declared. Should it be static? Those variables are not used outside of papr_scm.c, so this commit marks them static. Fixes: 85343a8da2d9 ("powerpc/papr/scm: Add bad memory ranges to nvdimm bad ranges") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725091949.75234-1-weiyongjun1@huawei.com commit faedc380129501bdd7f669bf14e9c7ee3e7a2feb Author: Bill Wendling Date: Fri Jul 24 15:49:01 2020 -0700 powerpc/64s: allow for clang's objdump differences Clang's objdump emits slightly different output from GNU's objdump, causing a list of warnings to be emitted during relocatable builds. E.g., clang's objdump emits this: c000000000000004: 2c 00 00 48 b 0xc000000000000030 ... c000000000005c6c: 10 00 82 40 bf 2, 0xc000000000005c7c while GNU objdump emits: c000000000000004: 2c 00 00 48 b c000000000000030 <__start+0x30> ... c000000000005c6c: 10 00 82 40 bne c000000000005c7c Adjust llvm-objdump's output to remove the extraneous '0x' and convert 'bf' and 'bt' to 'bne' and 'beq' resp. to more closely match GNU objdump's output. Note that clang's objdump doesn't yet output the relocation symbols on PPC. Signed-off-by: Bill Wendling Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/191c67db31264b69cf6b566fd69851beb3dd0abb.1595630874.git.morbo@google.com commit 49a7d46a06c30c7beabbf9d1a8ea1de0f9e4fdfe Author: Nicholas Piggin Date: Fri Jul 24 23:14:23 2020 +1000 powerpc: Implement smp_cond_load_relaxed() This implements smp_cond_load_relaxed() with the slowpath busy loop using the preferred SMT priority pattern. Signed-off-by: Nicholas Piggin Acked-by: Waiman Long [mpe: Make it 64-bit only to fix build errors on 32-bit] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131423.1362108-7-npiggin@gmail.com commit 2f6560e652dfdbdb59df28b45a3458bf36d3c580 Author: Nicholas Piggin Date: Fri Jul 24 23:14:22 2020 +1000 powerpc/qspinlock: Optimised atomic_try_cmpxchg_lock() that adds the lock hint This brings the behaviour of the uncontended fast path back to roughly equivalent to simple spinlocks -- a single atomic op with lock hint. Signed-off-by: Nicholas Piggin Acked-by: Waiman Long Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131423.1362108-6-npiggin@gmail.com commit 20c0e8269e9d515e677670902c7e1cc0209d6ad9 Author: Nicholas Piggin Date: Fri Jul 24 23:14:21 2020 +1000 powerpc/pseries: Implement paravirt qspinlocks for SPLPAR This implements the generic paravirt qspinlocks using H_PROD and H_CONFER to kick and wait. This uses an un-directed yield to any CPU rather than the directed yield to a pre-empted lock holder that paravirtualised simple spinlocks use, that requires no kick hcall. This is something that could be investigated and improved in future. Performance results can be found in the commit which added queued spinlocks. Signed-off-by: Nicholas Piggin Acked-by: Peter Zijlstra (Intel) Acked-by: Waiman Long Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131423.1362108-5-npiggin@gmail.com commit aa65ff6b18e0366db1790609956a4ac7308c5668 Author: Nicholas Piggin Date: Fri Jul 24 23:14:20 2020 +1000 powerpc/64s: Implement queued spinlocks and rwlocks These have shown significantly improved performance and fairness when spinlock contention is moderate to high on very large systems. With this series including subsequent patches, on a 16 socket 1536 thread POWER9, a stress test such as same-file open/close from all CPUs gets big speedups, 11620op/s aggregate with simple spinlocks vs 384158op/s (33x faster), where the difference in throughput between the fastest and slowest thread goes from 7x to 1.4x. Thanks to the fast path being identical in terms of atomics and barriers (after a subsequent optimisation patch), single threaded performance is not changed (no measurable difference). On smaller systems, performance and fairness seems to be generally improved. Using dbench on tmpfs as a test (that starts to run into kernel spinlock contention), a 2-socket OpenPOWER POWER9 system was tested with bare metal and KVM guest configurations. Results can be found here: https://github.com/linuxppc/issues/issues/305#issuecomment-663487453 Observations are: - Queued spinlocks are equal when contention is insignificant, as expected and as measured with microbenchmarks. - When there is contention, on bare metal queued spinlocks have better throughput and max latency at all points. - When virtualised, queued spinlocks are slightly worse approaching peak throughput, but significantly better throughput and max latency at all points beyond peak, until queued spinlock maximum latency rises when clients are 2x vCPUs. The regressions haven't been analysed very well yet, there are a lot of things that can be tuned, particularly the paravirtualised locking, but the numbers already look like a good net win even on relatively small systems. Signed-off-by: Nicholas Piggin Acked-by: Peter Zijlstra (Intel) Acked-by: Waiman Long Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131423.1362108-4-npiggin@gmail.com commit aadfc2f957cb470a5a7e52cc41a2fa86e784bcd2 Author: Ingo Molnar Date: Sat Jul 25 11:19:51 2020 +0200 entry: Correct 'noinstr' attributes The noinstr attribute is to be specified before the return type in the same way 'inline' is used. Similar cases were recently fixed for x86 in commit 7f6fa101dfac ("x86: Correct noinstr qualifiers"), but the generic entry code was based on the the original version and did not carry the fix over. Fixes: a5497bab5f72 ("entry: Provide generic interrupt entry/exit code") Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200725091951.744848-3-mingo@kernel.org commit 12d0b9d6c843e7dbe739ebefcf16c7e4a45e4e78 Author: Nicholas Piggin Date: Fri Jul 24 23:14:19 2020 +1000 powerpc: Move spinlock implementation to simple_spinlock To prepare for queued spinlocks. This is a simple rename except to update preprocessor guard name and a file reference. Signed-off-by: Nicholas Piggin Acked-by: Waiman Long Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131423.1362108-3-npiggin@gmail.com commit 20d444d06f97504d165b08558678b4737dcefb02 Author: Nicholas Piggin Date: Fri Jul 24 23:14:18 2020 +1000 powerpc/pseries: Move some PAPR paravirt functions to their own file These functions will be used by the queued spinlock implementation, and may be useful elsewhere too, so move them out of spinlock.h. Signed-off-by: Nicholas Piggin Acked-by: Waiman Long Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131423.1362108-2-npiggin@gmail.com commit dbce456280857f329af9069af5e48a9b6ebad146 Author: Srikar Dronamraju Date: Fri Jul 24 16:28:09 2020 +0530 powerpc/numa: Limit possible nodes to within num_possible_nodes MAX_NUMNODES is a theoretical maximum number of nodes thats is supported by the kernel. Device tree properties exposes the number of possible nodes on the current platform. The kernel would detected this and would use it for most of its resource allocations. If the platform now increases the nodes to over what was already exposed, then it may lead to inconsistencies. Hence limit it to the already exposed nodes. Suggested-by: Nathan Lynch Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724105809.24733-1-srikar@linux.vnet.ibm.com commit 3327e58a04501e06aa531cdb4044aab214a6254a Author: Finn Thain Date: Sun Jun 28 14:23:12 2020 +1000 macintosh/via-macii: Clarify definition of macii_init() The function prototype correctly specifies the 'static' storage class. Let the function definition match the declaration for better readability. Signed-off-by: Finn Thain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c025aed0b1506399b73ff1d1bfa40ed641fcb3e3.1593318192.git.fthain@telegraphics.com.au commit 046ace8256489f32740da07de55a913ca09ce5cf Author: Finn Thain Date: Sun Jun 28 14:23:12 2020 +1000 macintosh/via-macii: Use the stack for reset request storage The adb_request struct can be stored on the stack because the request is synchronous and is completed before the function returns. Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a40f80dde90991757007b6962c386a208c970586.1593318192.git.fthain@telegraphics.com.au commit 5c0c15a1953a7de2878d7e6f5711fd3322b11faa Author: Finn Thain Date: Sun Jun 28 14:23:12 2020 +1000 macintosh/via-macii: Use unsigned type for autopoll_devs variable Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ca5be30ba745c08c2b7a1f0618f99c61b303e983.1593318192.git.fthain@telegraphics.com.au commit f87a162572c9f7c839a207c7de6c73ffe54a777c Author: Finn Thain Date: Sun Jun 28 14:23:12 2020 +1000 macintosh/via-macii: Use bool type for reading_reply variable Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/779551219a11b19e574dfcd87e4ef60af08c4fc3.1593318192.git.fthain@telegraphics.com.au commit 624cf5b538b507293ec761797bd8ce0702fefe64 Author: Finn Thain Date: Sun Jun 28 14:23:12 2020 +1000 macintosh/via-macii: Handle poll replies correctly Userspace applications may use /dev/adb to send Talk requests. Such requests always have req->reply_expected == 1. The same is true of Talk requests sent by the kernel, except for poll requests queued internally by the via-macii driver. Those requests have req->reply_expected == 0. Consequently, poll reply packets get treated like autopoll reply packets. (It doesn't make sense to try to distinguish them.) Always enter 'reading' state after a poll request, so that the reply gets collected and passed to adb_input(), and none go missing. All Talk replies passed to adb_input() come from polling or autopolling, so call adb_input() with the autopoll parameter set to 1. Fixes: d95fd5fce88f0 ("m68k: Mac II ADB fixes") # v5.0+ Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/754cddfa045e5bfa53e5da199831de02e7d2f27f.1593318192.git.fthain@telegraphics.com.au commit b16b67689baa01a5616b651356df7ad3e47a8763 Author: Finn Thain Date: Sun Jun 28 14:23:12 2020 +1000 macintosh/via-macii: Remove read_done state The driver state machine may enter the 'read_done' state when leaving the 'idle' or 'reading' state. This transition is pointless, as is the extra interrupt it requires. The interrupt is produced by the transceiver (even when it has no data to send) because an extra EVEN/ODD toggle was signalled by the driver. Drop the extra state to simplify the code. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") # v5.0+ Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0253194363af4426f9788796811a6a29fb87c713.1593318192.git.fthain@telegraphics.com.au commit b4d76c28eca369b8105fe3a0a9f396e3fbcd0dd5 Author: Finn Thain Date: Sun Jun 28 14:23:12 2020 +1000 macintosh/via-macii: Handle /CTLR_IRQ signal correctly I'm told that the /CTLR_IRQ signal from the ADB transceiver gets interpreted by MacOS to mean SRQ, bus timeout or end-of-packet depending on the circumstances, and that Linux's via-macii driver does not correctly interpret this signal. Instead, the via-macii driver interprets certain received byte values (0x00 and 0xFF) as signalling end of packet and bus timeout (respectively). Problem is, those values can also appear under other circumstances. This patch changes the bus timeout, end of packet and SRQ detection logic to bring it closer to the logic that MacOS reportedly uses. Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") # v5.0+ Reported-by: Mark Cave-Ayland Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6541fda1d8db3ae87c3abe17d189a10dc96e2382.1593318192.git.fthain@telegraphics.com.au commit f93bfeb55255bddaa16597e187a99ae6131b964a Author: Finn Thain Date: Sun Jun 28 14:23:12 2020 +1000 macintosh/via-macii: Poll the device most likely to respond Poll the most recently polled device by default, rather than the lowest device address that happens to be enabled in autopoll_devs. This improves input latency. Re-use macii_queue_poll() rather than duplicate that logic. This eliminates a static struct and function. Fixes: d95fd5fce88f0 ("m68k: Mac II ADB fixes") # v5.0+ Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5836f80886ebcfbe5be5fb7e0dc49feed6469712.1593318192.git.fthain@telegraphics.com.au commit 59ea38f6b3af5636edf541768a1ed721eeaca99e Author: Finn Thain Date: Sun Jun 28 14:23:12 2020 +1000 macintosh/via-macii: Access autopoll_devs when inside lock The interrupt handler should be excluded when accessing the autopoll_devs variable. Fixes: d95fd5fce88f0 ("m68k: Mac II ADB fixes") # v5.0+ Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5952dd8a9bc9de90f1acc4790c51dd42b4c98065.1593318192.git.fthain@telegraphics.com.au commit c66da95a39ec2bb95544c3def974d96e8c178f57 Author: Finn Thain Date: Sun May 31 09:17:03 2020 +1000 macintosh/adb-iop: Implement SRQ autopolling The adb_driver.autopoll method is needed during ADB bus scan and device address assignment. Implement this method so that the IOP's list of device addresses can be updated. When the list is empty, disable SRQ autopolling. Signed-off-by: Finn Thain Tested-by: Stan Johnson Acked-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0fb7fdcd99d7820bb27faf1f27f7f6f1923914ef.1590880623.git.fthain@telegraphics.com.au commit e2954e5f727fad126258e83259b513988973c166 Author: Finn Thain Date: Sun May 31 09:17:03 2020 +1000 macintosh/adb-iop: Implement sending -> idle state transition On leaving the 'sending' state, proceed to the 'idle' state if no reply is expected. Drop redundant test for adb_iop_state == sending && current_req. Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6991996dd4aaf0b52cfd650172bf0f6fbe37a452.1590880623.git.fthain@telegraphics.com.au commit 32226e81704398317e1cc5a82d24c0ef3cc25e5e Author: Finn Thain Date: Sun May 31 09:17:03 2020 +1000 macintosh/adb-iop: Implement idle -> sending state transition In the present algorithm, the 'idle' state transition does not take place until there's a bus timeout. Once idle, the driver does not automatically proceed with the next request. Change the algorithm so that queued ADB requests will be sent as soon as the driver becomes idle. This is to take place after the current IOP message is completed. Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/dedcdfc62f43e85cc4c2a8d211a7e2fec7bc7c1a.1590880623.git.fthain@telegraphics.com.au commit 56b732edda96b1942fff974fd298ea2a2c543b94 Author: Finn Thain Date: Sun May 31 09:17:03 2020 +1000 macintosh/adb-iop: Resolve static checker warnings drivers/macintosh/adb-iop.c:215:28: warning: Using plain integer as NULL pointer drivers/macintosh/adb-iop.c:170:5: warning: symbol 'adb_iop_probe' was not declared. Should it be static? drivers/macintosh/adb-iop.c:177:5: warning: symbol 'adb_iop_init' was not declared. Should it be static? drivers/macintosh/adb-iop.c:184:5: warning: symbol 'adb_iop_send_request' was not declared. Should it be static? drivers/macintosh/adb-iop.c:230:5: warning: symbol 'adb_iop_autopoll' was not declared. Should it be static? drivers/macintosh/adb-iop.c:236:6: warning: symbol 'adb_iop_poll' was not declared. Should it be static? drivers/macintosh/adb-iop.c:241:5: warning: symbol 'adb_iop_reset_bus' was not declared. Should it be static? Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/25edf4450abd20e002b166ba3a11189dc1efa906.1590880623.git.fthain@telegraphics.com.au commit aac840eca8fec02d594560647130d4e4447e10d9 Author: Finn Thain Date: Sun May 31 09:17:03 2020 +1000 macintosh/adb-iop: Access current_req and adb_iop_state when inside lock Drop the redundant local_irq_save/restore() from adb_iop_start() because the caller has to do it anyway. This is the pattern used in via-macii. Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bbe32b087c7e04d68e2425f6a2df4a414d167c32.1590880623.git.fthain@telegraphics.com.au commit 303511edb859b1fbf48b3c1d1d53b33a6ebd2a2b Author: Finn Thain Date: Sun May 31 09:17:03 2020 +1000 macintosh/adb-iop: Adopt bus reset algorithm from via-macii driver This algorithm is slightly shorter and avoids the surprising adb_iop_start() call in adb_iop_poll(). Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b63d56ecb6e75f11a0bf02231f3b2db656a528a3.1590880623.git.fthain@telegraphics.com.au commit ff785e179faf4bb06a2f73b8dcde6dabb66a83d2 Author: Finn Thain Date: Sun May 31 09:17:03 2020 +1000 macintosh/adb-iop: Correct comment text This patch improves comment style and corrects some misunderstandings in the text. Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/996f835d2f3d90baaaf9ee954e252d06e8886c6f.1590880623.git.fthain@telegraphics.com.au commit 8384c82ab0860cd7db2ce4ec403e574f4ee54b6e Author: Finn Thain Date: Sun May 31 09:17:03 2020 +1000 macintosh/adb-iop: Remove dead and redundant code Signed-off-by: Finn Thain Tested-by: Stan Johnson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7720ffb559c334504e16b24d9c2f3b8973d2d674.1590880623.git.fthain@telegraphics.com.au commit 65156f2b1d9d5bf3fd0eac54b0a7fd515c92773c Author: Athira Rajeev Date: Thu Jul 23 03:32:37 2020 -0400 powerpc/perf: Initialize power10 PMU registers in cpu setup routine Initialize Monitor Mode Control Register 3 (MMCR3) SPR which is new in power10. For PowerISA v3.1, BHRB disable is controlled via Monitor Mode Control Register A (MMCRA) bit, namely "BHRB Recording Disable (BHRBRD)". This patch also initializes MMCRA BHRBRD to disable BHRB feature at boot for power10. Reported-by: kernel test robot Signed-off-by: Athira Rajeev Reviewed-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1595489557-2047-1-git-send-email-atrajeev@linux.vnet.ibm.com commit 84d8505ed1dafb2e62d49fca5e7aa7d96cfcec49 Author: Oliver O'Halloran Date: Wed Jul 22 16:57:15 2020 +1000 powerpc/powernv/sriov: Remove vfs_expanded Previously iov->vfs_expanded was used for two purposes. 1) To work out how much we need to multiple the per-VF BAR size to figure out the total space required for the IOV BAR. 2) To indicate that IOV is not usable with this device (vfs_expanded == 0). We don't really need the field for either since the multiple in 1) is always the number PEs supported by the PHB. Similarly, we don't really need it in 2) either since the IOV data field will be NULL if we can't use IOV with the device. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-16-oohall@gmail.com commit 4c51f3e1e8702cbd0e53159fc3d1f54c20c70574 Author: Oliver O'Halloran Date: Wed Jul 22 16:57:14 2020 +1000 powerpc/powernv/sriov: Make single PE mode a per-BAR setting Using single PE BARs to map an SR-IOV BAR is really a choice about what strategy to use when mapping a BAR. It doesn't make much sense for this to be a global setting since a device might have one large BAR which needs to be mapped with single PE windows and another smaller BAR that can be mapped with a regular segmented window. Make the segmented vs single decision a per-BAR setting and clean up the logic that decides which mode to use. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-15-oohall@gmail.com commit a0be516f8160fdb4836237cba037229e88a1de7d Author: Oliver O'Halloran Date: Wed Jul 22 16:57:13 2020 +1000 powerpc/powernv/sriov: Refactor M64 BAR setup Split up the logic so that we have one branch that handles setting up a segmented window and another that handles setting up single PE windows for each VF. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-14-oohall@gmail.com commit 39efc03e3ee8f41909b7542be70b4061b38ca277 Author: Oliver O'Halloran Date: Wed Jul 22 16:57:12 2020 +1000 powerpc/powernv/sriov: Move M64 BAR allocation into a helper I want to refactor the loop this code is currently inside of. Hoist it on out. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-13-oohall@gmail.com commit 052da31d45fc71238ea8bed7e9a84648a1ee0bf3 Author: Oliver O'Halloran Date: Wed Jul 22 16:57:11 2020 +1000 powerpc/powernv/sriov: De-indent setup and teardown Remove the IODA2 PHB checks. We already assume IODA2 in several places so there's not much point in wrapping most of the setup and teardown process in an if block. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-12-oohall@gmail.com commit d29a2488d2c020032fdb1fe052347a6021e3591d Author: Oliver O'Halloran Date: Wed Jul 22 16:57:10 2020 +1000 powerpc/powernv/sriov: Drop iov->pe_num_map[] Currently the iov->pe_num_map[] does one of two things depending on whether single PE mode is being used or not. When it is, this contains an array which maps a vf_index to the corresponding PE number. When single PE mode is not being used this contains a scalar which is the base PE for the set of enabled VFs (for for VFn is base + n). The array was necessary because when calling pnv_ioda_alloc_pe() there is no guarantee that the allocated PEs would be contigious. We can now allocate contigious blocks of PEs so this is no longer an issue. This allows us to drop the if (single_mode) {} .. else {} block scattered through the SR-IOV code which is a nice clean up. This also fixes a bug in pnv_pci_sriov_disable() which is the non-atomic bitmap_clear() to manipulate the PE allocation map. Other users of the map assume it will be accessed with atomic ops. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-11-oohall@gmail.com commit a4bc676ed5c3f53781cc342b73097eb7e8d43fa5 Author: Oliver O'Halloran Date: Wed Jul 22 16:57:09 2020 +1000 powerpc/powernv/pci: Refactor pnv_ioda_alloc_pe() Rework the PE allocation logic to allow allocating blocks of PEs rather than individually. We'll use this to allocate contigious blocks of PEs for the SR-IOVs. This patch also adds code to pnv_ioda_alloc_pe() and pnv_ioda_reserve_pe() to use the existing, but unused, phb->pe_alloc_mutex. Currently these functions use atomic bit ops to release a currently allocated PE number. However, the pnv_ioda_alloc_pe() wants to have exclusive access to the bit map while scanning for hole large enough to accomodate the allocation size. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-10-oohall@gmail.com commit a610d35cc8780e781321ea8d002d5fef8484bf59 Author: Oliver O'Halloran Date: Wed Jul 22 16:57:08 2020 +1000 powerpc/powernv/sriov: Factor out M64 BAR setup The sequence required to use the single PE BAR mode is kinda janky and requires a little explanation. The API was designed with P7-IOC style windows where the setup process is something like: 1. Configure the window start / end address 2. Enable the window 3. Map the segments of each window to the PE For Single PE BARs the process is: 1. Set the PE for segment zero on a disabled window 2. Set the range 3. Enable the window Move the OPAL calls into their own helper functions where the quirks can be contained. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-9-oohall@gmail.com commit ad9add529d99d195195c27abf99e42d4965d35e2 Author: Oliver O'Halloran Date: Wed Jul 22 16:57:07 2020 +1000 powerpc/powernv/sriov: Simplify used window tracking No need for the multi-dimensional arrays, just use a bitmap. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-8-oohall@gmail.com commit fac248f8119170e3f8f54900985498ff6ee560bf Author: Oliver O'Halloran Date: Wed Jul 22 16:57:06 2020 +1000 powerpc/powernv/sriov: Rename truncate_iov This prevents SR-IOV being used by making the SR-IOV BAR resources unallocatable. Rename it to reflect what it actually does. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-7-oohall@gmail.com commit ff79e11af0979b25ecb38e4c843779d4a759a4e2 Author: Oliver O'Halloran Date: Wed Jul 22 16:57:05 2020 +1000 powerpc/powernv/sriov: Explain how SR-IOV works on PowerNV SR-IOV support on PowerNV is a byzantine maze of hooks. I have no idea how anyone is supposed to know how it works except through a lot of stuffering. Write up some docs about the overall story to help out the next sucker^Wperson who needs to tinker with it. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-6-oohall@gmail.com commit 37b59ef08c546c6f54cdc52eed749f494619a102 Author: Oliver O'Halloran Date: Wed Jul 22 16:57:04 2020 +1000 powerpc/powernv/sriov: Move SR-IOV into a separate file pci-ioda.c is getting a bit unwieldly due to the amount of stuff jammed in there. The SR-IOV support can be extracted easily enough and is mostly standalone, so move it into a separate file. This patch also moves the PowerNV SR-IOV specific fields from pci_dn and moves them into a platform specific structure. I'm not sure how they ended up in there in the first place, but leaking platform specifics into common code has proven to be a terrible idea so far so lets stop doing that. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-5-oohall@gmail.com commit 369633654fcb9639cd4cd0e1a448ffde3533d776 Author: Oliver O'Halloran Date: Wed Jul 22 16:57:03 2020 +1000 powerpc/powernv/pci: Initialise M64 for IODA1 as a 1-1 window We pre-configure the m64 window for IODA1 as a 1-1 segment-PE mapping, similar to PHB3. Currently the actual mapping of segments occurs in pnv_ioda_pick_m64_pe(), but we can move it into pnv_ioda1_init_m64() and drop the IODA1 specific code paths in the PE setup / teardown. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-4-oohall@gmail.com commit 01e12629af4e0e4864ed4d83e07783d7cb5b06be Author: Oliver O'Halloran Date: Wed Jul 22 16:57:02 2020 +1000 powerpc/powernv/pci: Add explicit tracking of the DMA setup state There's an optimisation in the PE setup which skips performing DMA setup for a PE if we only have bridges in a PE. The assumption being that only "real" devices will DMA to system memory, which is probably fair. However, if we start off with only bridge devices in a PE then add a non-bridge device the new device won't be able to use DMA because we never configured it. Fix this (admittedly pretty weird) edge case by tracking whether we've done the DMA setup for the PE or not. If a non-bridge device is added to the PE (via rescan or hotplug, or whatever) we can set up DMA on demand. This also means the only remaining user of the old "DMA Weight" code is the IODA1 DMA setup code that it was originally added for, which is good. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-3-oohall@gmail.com commit 7a52ffabe867c0d93e47af113e5107340974047a Author: Oliver O'Halloran Date: Wed Jul 22 16:57:01 2020 +1000 powerpc/powernv/pci: Always tear down DMA windows on PE release Currently we have these two functions: pnv_pci_ioda2_release_dma_pe(), and pnv_pci_ioda2_release_pe_dma() The first is used when tearing down VF PEs and the other is used for normal devices. There's very little difference between the two though. The latter (non-VF) will skip a call to pnv_pci_ioda2_unset_window() unless CONFIG_IOMMU_API=y is set. There's no real point in doing this so fold the two together. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-2-oohall@gmail.com commit 5609ffddd19dd52019d78b197e86b0331aeef8ae Author: Oliver O'Halloran Date: Wed Jul 22 16:57:00 2020 +1000 powerpc/powernv/pci: Add pci_bus_to_pnvhb() helper Add a helper to go from a pci_bus structure to the pnv_phb that hosts that bus. There's a lot of instances of the following pattern: struct pci_controller *hose = pci_bus_to_host(pdev->bus); struct pnv_phb *phb = hose->private_data; Without any other uses of the pci_controller inside the function. This is hard to read since it requires you to memorise the contents of the private data fields and kind of error prone since it involves blindly assigning a void pointer. Add a helper to make it more concise and explicit. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722065715.1432738-1-oohall@gmail.com commit a131bfc69bc868083a6c7f9b5dad1331902a3534 Author: Oliver O'Halloran Date: Sat Jul 25 18:12:31 2020 +1000 powerpc/eeh: Move PE tree setup into the platform The EEH core has a concept of a "PE tree" to support PowerNV. The PE tree follows the PCI bus structures because a reset asserted on an upstream bridge will be propagated to the downstream bridges. On pseries there's a 1-1 correspondence between what the guest sees are a PHB and a PE so the "tree" is really just a single node. Current the EEH core is reponsible for setting up this PE tree which it does by traversing the pci_dn tree. The structure of the pci_dn tree matches the bus tree on PowerNV which leads to the PE tree being "correct" this setup method doesn't make a whole lot of sense and it's actively confusing for the pseries case where it doesn't really do anything. We want to remove the dependence on pci_dn anyway so this patch move choosing where to insert a new PE into the platform code rather than being part of the generic EEH code. For PowerNV this simplifies the tree building logic and removes the use of pci_dn. For pseries we keep the existing logic. I'm not really convinced it does anything due to the 1-1 PE-to-PHB correspondence so every device under that PHB should be in the same PE, but I'd rather not remove it entirely until we've had a chance to look at it more deeply. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-14-oohall@gmail.com commit 31595ae5aece519be5faa2e2013278ce45894d26 Author: Oliver O'Halloran Date: Sat Jul 25 18:12:30 2020 +1000 powerpc/eeh: Drop pdn use in eeh_pe_tree_insert() This is mostly just to make the subsequent diffs less noisy. No functional changes. One thing that needs calling out is the removal of the "config_addr" variable and replacing it with edev->bdfn. The contents of edev->bdfn are the same, however it's worth pointing out that what RTAS calls a "config_addr" isn't the same as the bdfn. The config_addr is supposed to be: with each field being an 8 bit number. Various parts of the EEH code use BDFN and "config_addr" as interchangeable quantities even though they aren't really. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-13-oohall@gmail.com commit d923ab7a96fcc2b46aac9b2fc38ffdca72436fd1 Author: Oliver O'Halloran Date: Sat Jul 25 18:12:29 2020 +1000 powerpc/eeh: Rename eeh_{add_to|remove_from}_parent_pe() The naming of eeh_{add_to|remove_from}_parent_pe() doesn't really reflect what they actually do. If the PE referred to be edev->pe_config_addr already exists under that PHB then the edev is added to that PE. However, if the PE doesn't exist the a new one is created for the edev. The bulk of the implementation of eeh_add_to_parent_pe() covers that second case. Similarly, most of eeh_remove_from_parent_pe() is determining when it's safe to delete a PE. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-12-oohall@gmail.com commit 768a42845b9ecdb28ba1991e17088b7eeb23a3eb Author: Oliver O'Halloran Date: Sat Jul 25 18:12:28 2020 +1000 powerpc/eeh: Remove class code field from edev The edev->class_code field is never referenced anywhere except for the platform specific probe functions. The same information is available in the pci_dev for PowerNV and in the pci_dn on pseries so we can remove the field. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-11-oohall@gmail.com commit 1a303d8844d082ef58ff5fc3005b99621a3263ba Author: Oliver O'Halloran Date: Sat Jul 25 18:12:27 2020 +1000 powerpc/eeh: Remove spurious use of pci_dn in eeh_dump_dev_log Retrieve the domain, bus, device, and function numbers from the edev. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-10-oohall@gmail.com commit 17d2a4870467bc8e8966304c08980571da943558 Author: Oliver O'Halloran Date: Sat Jul 25 18:12:26 2020 +1000 powerpc/eeh: Pass eeh_dev to eeh_ops->{read|write}_config() Mechanical conversion of the eeh_ops interfaces to use eeh_dev to reference a specific device rather than pci_dn. No functional changes. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-9-oohall@gmail.com commit 8225d543dc0170e5b61af8559af07ec4f26f0bd6 Author: Oliver O'Halloran Date: Sat Jul 25 18:12:25 2020 +1000 powerpc/eeh: Pass eeh_dev to eeh_ops->resume_notify() Mechanical conversion of the eeh_ops interfaces to use eeh_dev to reference a specific device rather than pci_dn. No functional changes. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-8-oohall@gmail.com commit 0c2c76523c04ac184c7d7bbb8756f603375b7fc4 Author: Oliver O'Halloran Date: Sat Jul 25 18:12:24 2020 +1000 powerpc/eeh: Pass eeh_dev to eeh_ops->restore_config() Mechanical conversion of the eeh_ops interfaces to use eeh_dev to reference a specific device rather than pci_dn. No functional changes. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-7-oohall@gmail.com commit 21b43bd59c7838825b94eea288333affb53dd399 Author: Oliver O'Halloran Date: Sat Jul 25 18:12:23 2020 +1000 powerpc/eeh: Remove VF config space restoration There's a bunch of strange things about this code. First up is that none of the fields being written to are functional for a VF. The SR-IOV specification lists then as "Reserved, but OS should preserve" so writing new values to them doesn't do anything and is clearly wrong from a correctness perspective. However, since VFs are designed to be managed by the OS there is an argument to be made that we should be saving and restoring some parts of config space. We already sort of do that by saving the first 64 bytes of config space in the eeh_dev (see eeh_dev->config_space[]). This is inadequate since it doesn't even consider saving and restoring the PCI capability structures. However, this is a problem with EEH in general and that needs to be fixed for non-VF devices too. There's no real reason to keep around this around so delete it. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-6-oohall@gmail.com commit a40db934312cb2a4bef16b3edc962bc8c7f6462f Author: Oliver O'Halloran Date: Sat Jul 25 18:12:22 2020 +1000 powerpc/eeh: Kill off eeh_ops->get_pe_addr() This is used in precisely one place which is in pseries specific platform code. There's no need to have the callback in eeh_ops since the platform chooses the EEH PE addresses anyway. The PowerNV implementation has always been a stub too so remove it. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-5-oohall@gmail.com commit c408ce9075b8e1533f30fd3a113b75fb745f722f Author: Oliver O'Halloran Date: Sat Jul 25 18:12:21 2020 +1000 powerpc/pseries: Stop using pdn->pe_number The pci_dn->pe_number field is mainly used to track the IODA PE number of a device on PowerNV. At some point it grew a user in the pseries SR-IOV support which muddies the waters a bit, so remove it. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-4-oohall@gmail.com commit dffa91539e80355402c0716a91af17fc8ddd1abf Author: Oliver O'Halloran Date: Sat Jul 25 18:12:20 2020 +1000 powerpc/eeh: Move vf_index out of pci_dn and into eeh_dev Drivers that do not support the PCI error handling callbacks are handled by tearing down the device and re-probing them. If the device being removed is a virtual function then we need to know the VF index so it can be removed using the pci_iov_{add|remove}_virtfn() API. Currently this is handled by looking up the pci_dn, and using the vf_index that was stashed there when the pci_dn for the VF was created in pcibios_sriov_enable(). We would like to eliminate the use of pci_dn outside of pseries though so we need to provide the generic EEH code with some other way to find the vf_index. The easiest thing to do here is move the vf_index field out of pci_dn and into eeh_dev. Currently pci_dn and eeh_dev are allocated and initialized together so this is a fairly minimal change in preparation for splitting pci_dn and eeh_dev in the future. Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-3-oohall@gmail.com commit d74ee8e9d12e2071014ecec96a1ce2744f77639d Author: Oliver O'Halloran Date: Sat Jul 25 18:12:19 2020 +1000 powerpc/eeh: Remove eeh_dev.c The only thing in this file is eeh_dev_init() which is allocates and initialises an eeh_dev based on a pci_dn. This is only ever called from pci_dn.c so move it into there and remove the file. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-2-oohall@gmail.com commit 475028efc708880e16e61cc4cbbc00af784cb39b Author: Oliver O'Halloran Date: Sat Jul 25 18:12:18 2020 +1000 powerpc/eeh: Remove eeh_dev_phb_init_dynamic() This function is a one line wrapper around eeh_phb_pe_create() and despite the name it doesn't create any eeh_dev structures. Replace it with direct calls to eeh_phb_pe_create() since that does what it says on the tin and removes a layer of indirection. Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200725081231.39076-1-oohall@gmail.com commit 3f31e49dc4588d396023028791e36c23235e1334 Author: Ravi Bangoria Date: Thu Jul 23 14:38:13 2020 +0530 powerpc/watchpoint: Remove 512 byte boundary Power10 has removed 512 bytes boundary from match criteria i.e. the watch range can cross 512 bytes boundary. Note: ISA 3.1 Book III 9.4 match criteria includes 512 byte limit but that is a documentation mistake and hopefully will be fixed in the next version of ISA. Though, ISA 3.1 change log mentions about removal of 512B boundary: Multiple DEAW: Added a second Data Address Watchpoint. [H]DAR is set to the first byte of overlap. 512B boundary is removed. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200723090813.303838-11-ravi.bangoria@linux.ibm.com commit deb2bd9bcc8428d4b65b6ba640ba8b57c1b20b17 Author: Ravi Bangoria Date: Thu Jul 23 14:38:12 2020 +0530 powerpc/watchpoint: Return available watchpoints dynamically So far Book3S Powerpc supported only one watchpoint. Power10 is introducing 2nd DAWR. Enable 2nd DAWR support for Power10. Availability of 2nd DAWR will depend on CPU_FTR_DAWR1. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200723090813.303838-10-ravi.bangoria@linux.ibm.com commit 03f3e54abd95061ea11bdb4eedbe3cab6553704f Author: Ravi Bangoria Date: Thu Jul 23 14:38:11 2020 +0530 powerpc/watchpoint: Guest support for 2nd DAWR hcall 2nd DAWR can be set/unset using H_SET_MODE hcall with resource value 5. Enable powervm guest support with that. This has no effect on kvm guest because kvm will return error if guest does hcall with resource value 5. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200723090813.303838-9-ravi.bangoria@linux.ibm.com commit 6f3fe297f95134e9b2386dae0067bf530e1ddca0 Author: Ravi Bangoria Date: Thu Jul 23 14:38:10 2020 +0530 powerpc/watchpoint: Rename current H_SET_MODE DAWR macro Current H_SET_MODE hcall macro name for setting/resetting DAWR0 is H_SET_MODE_RESOURCE_SET_DAWR. Add suffix 0 to macro name as well. Signed-off-by: Ravi Bangoria Reviewed-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200723090813.303838-8-ravi.bangoria@linux.ibm.com commit 8f45ca3f8b87c4810674fbfe65de6d041ee0baee Author: Ravi Bangoria Date: Thu Jul 23 14:38:09 2020 +0530 powerpc/watchpoint: Set CPU_FTR_DAWR1 based on pa-features bit As per the PAPR, bit 0 of byte 64 in pa-features property indicates availability of 2nd DAWR registers. i.e. If this bit is set, 2nd DAWR is present, otherwise not. Host generally uses "cpu-features", which masks "pa-features". But "cpu-features" are still not used for guests and thus this change is mostly applicable for guests only. Signed-off-by: Ravi Bangoria Tested-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200723090813.303838-7-ravi.bangoria@linux.ibm.com commit dc1cedca54704d336c333b5398daaf13b23e391b Author: Ravi Bangoria Date: Thu Jul 23 14:38:08 2020 +0530 powerpc/dt_cpu_ftrs: Add feature for 2nd DAWR Add new device-tree feature for 2nd DAWR. If this feature is present, 2nd DAWR is supported, otherwise not. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200723090813.303838-6-ravi.bangoria@linux.ibm.com commit 8f460a8175e6d85537d581734e9fa7ef97036b1a Author: Ravi Bangoria Date: Thu Jul 23 14:38:07 2020 +0530 powerpc/watchpoint: Enable watchpoint functionality on power10 guest CPU_FTR_DAWR is by default enabled for host via CPU_FTRS_DT_CPU_BASE (controlled by CONFIG_PPC_DT_CPU_FTRS). But cpu-features device-tree node is not PAPR compatible and thus not yet used by kvm or pHyp guests. Enable watchpoint functionality on power10 guest (both kvm and powervm) by adding CPU_FTR_DAWR to CPU_FTRS_POWER10. Note that this change does not enable 2nd DAWR support. Signed-off-by: Ravi Bangoria Tested-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200723090813.303838-5-ravi.bangoria@linux.ibm.com commit f3c832f1350bcf1e6906113ee3168066f4235dbe Author: Ravi Bangoria Date: Thu Jul 23 14:38:06 2020 +0530 powerpc/watchpoint: Fix DAWR exception for CACHEOP 'ea' returned by analyse_instr() needs to be aligned down to cache block size for CACHEOP instructions. analyse_instr() does not set size for CACHEOP, thus size also needs to be calculated manually. Fixes: 27985b2a640e ("powerpc/watchpoint: Don't ignore extraneous exceptions blindly") Fixes: 74c6881019b7 ("powerpc/watchpoint: Prepare handler to handle more than one watchpoint") Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200723090813.303838-4-ravi.bangoria@linux.ibm.com commit f6780ce619f8daa285760302d56e95892087bd1f Author: Ravi Bangoria Date: Thu Jul 23 14:38:05 2020 +0530 powerpc/watchpoint: Fix DAWR exception constraint Pedro Miraglia Franco de Carvalho noticed that on p8/p9, DAR value is inconsistent with different type of load/store. Like for byte,word etc. load/stores, DAR is set to the address of the first byte of overlap between watch range and real access. But for quadword load/ store it's sometime set to the address of the first byte of real access whereas sometime set to the address of the first byte of overlap. This issue has been fixed in p10. In p10(ISA 3.1), DAR is always set to the address of the first byte of overlap. Commit 27985b2a640e ("powerpc/watchpoint: Don't ignore extraneous exceptions blindly") wrongly assumes that DAR is set to the address of the first byte of overlap for all load/stores on p8/p9 as well. Fix that. With the fix, we now rely on 'ea' provided by analyse_instr(). If analyse_instr() fails, generate event unconditionally on p8/p9, and on p10 generate event only if DAR is within a DAWR range. Note: 8xx is not affected. Fixes: 27985b2a640e ("powerpc/watchpoint: Don't ignore extraneous exceptions blindly") Fixes: 74c6881019b7 ("powerpc/watchpoint: Prepare handler to handle more than one watchpoint") Reported-by: Pedro Miraglia Franco de Carvalho Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200723090813.303838-3-ravi.bangoria@linux.ibm.com commit 3190ecbfeeb2ab17778887ce3fa964615d6460fd Author: Ravi Bangoria Date: Thu Jul 23 14:38:04 2020 +0530 powerpc/watchpoint: Fix 512 byte boundary limit Milton Miller reported that we are aligning start and end address to wrong size SZ_512M. It should be SZ_512. Fix that. While doing this change I also found a case where ALIGN() comparison fails. Within a given aligned range, ALIGN() of two addresses does not match when start address is pointing to the first byte and end address is pointing to any other byte except the first one. But that's not true for ALIGN_DOWN(). ALIGN_DOWN() of any two addresses within that range will always point to the first byte. So use ALIGN_DOWN() instead of ALIGN(). Fixes: e68ef121c1f4 ("powerpc/watchpoint: Use builtin ALIGN*() macros") Reported-by: Milton Miller Signed-off-by: Ravi Bangoria Tested-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200723090813.303838-2-ravi.bangoria@linux.ibm.com commit 269e829f48a0d0d27667abe25ca5c9e5b6ab08e2 Author: Aneesh Kumar K.V Date: Sun Jul 26 18:55:17 2020 +0530 powerpc/book3s64/pkey: Disable pkey on POWER6 and before POWER6 only supports AMR update via privileged mode (MSR[PR] = 0, SPRN_AMR=29) The PR=1 (userspace) alias for that SPR (SPRN_AMR=13) was only supported from POWER7. Since we don't allow userspace modifying of AMR value we should disable pkey support on P6 and before. The hypervisor will still report pkey support via "ibm,processor-storage-keys". Hence also check for P7 CPU_FTR bit to decide on pkey support. Fixes: f491fe3fb41e ("powerpc/book3s64/pkeys: Simplify the key initialization") Reported-by: Michael Ellerman Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200726132517.399076-1-aneesh.kumar@linux.ibm.com commit 99f0975d760b6320dd5490bd0bc3a31900284757 Author: Lad Prabhakar Date: Wed Jul 15 12:09:02 2020 +0100 dt-bindings: i2c: renesas,iic: Document r8a774e1 support Document IIC controller for RZ/G2H (R8A774E1) SoC, which is compatible with R-Car Gen3 SoC family. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit 471fb8c55c24a1b50a07d7708aa2d7c202ec896e Author: Lad Prabhakar Date: Wed Jul 15 12:09:01 2020 +0100 dt-bindings: i2c: renesas,i2c: Document r8a774e1 support Document i2c controller for RZ/G2H (R8A774E1) SoC, which is compatible with R-Car Gen3 SoC family. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit 314139f9f0abdba61ed9a8463bbcb0bf900ac5a2 Author: Wolfram Sang Date: Mon Jun 29 17:38:07 2020 +0200 i2c: rcar: slave: only send STOP event when we have been addressed When the SSR interrupt is activated, it will detect every STOP condition on the bus, not only the ones after we have been addressed. So, enable this interrupt only after we have been addressed, and disable it otherwise. Fixes: de20d1857dd6 ("i2c: rcar: add slave support") Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit b1ce9716f3b5ed3b49badf1f003b9e34b7ead0f9 Author: Jinyang He Date: Sat Jul 25 13:56:38 2020 +0800 MIPS: Fix unable to reserve memory for Crash kernel Use 0 as the align parameter in memblock_find_in_range() is incorrect when we reserve memory for Crash kernel. The environment as follows: [ 0.000000] MIPS: machine is loongson,loongson64c-4core-rs780e ... [ 1.951016] crashkernel=64M@128M The warning as follows: [ 0.000000] Invalid memory region reserved for crash kernel And the iomem as follows: 00200000-0effffff : System RAM 04000000-0484009f : Kernel code 048400a0-04ad7fff : Kernel data 04b40000-05c4c6bf : Kernel bss 1a000000-1bffffff : pci@1a000000 ... The align parameter may be finally used by round_down() or round_up(). Like the following call tree: mips-next: mm/memblock.c memblock_find_in_range └── memblock_find_in_range_node ├── __memblock_find_range_bottom_up │ └── round_up └── __memblock_find_range_top_down └── round_down \#define round_up(x, y) ((((x)-1) | __round_mask(x, y))+1) \#define round_down(x, y) ((x) & ~__round_mask(x, y)) \#define __round_mask(x, y) ((__typeof__(x))((y)-1)) The round_down(or round_up)'s second parameter must be a power of 2. If the second parameter is 0, it both will return 0. Use 1 as the parameter to fix the bug and the iomem as follows: 00200000-0effffff : System RAM 04000000-0484009f : Kernel code 048400a0-04ad7fff : Kernel data 04b40000-05c4c6bf : Kernel bss 08000000-0bffffff : Crash kernel 1a000000-1bffffff : pci@1a000000 ... Signed-off-by: Jinyang He Reviewed-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit de0038bfaf53af0e8bc4961b7aacdcb79f43bf08 Author: Randy Dunlap Date: Sat Jul 25 17:41:24 2020 -0700 x86: uv: uv_hub.h: Delete duplicated word Delete the repeated word "the". [ mingo: While at it, also capitalize CPU properly. ] Signed-off-by: Randy Dunlap Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200726004124.20618-4-rdunlap@infradead.org commit 8b9fd48eb73ec854c2877735e96c91127cc78a1d Author: Randy Dunlap Date: Sat Jul 25 17:41:23 2020 -0700 x86: cmpxchg_32.h: Delete duplicated word Delete the repeated word "you". Signed-off-by: Randy Dunlap Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200726004124.20618-3-rdunlap@infradead.org commit ddeddd0811ffeb43937aca2d5479f323234f17cd Author: Randy Dunlap Date: Sat Jul 25 17:41:22 2020 -0700 x86: bootparam.h: Delete duplicated word Delete the repeated word "for". Signed-off-by: Randy Dunlap Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200726004124.20618-2-rdunlap@infradead.org commit 9cce844abf07b683cff5f0273977d5f8d0af94c7 Author: Huacai Chen Date: Thu Jul 16 18:40:23 2020 +0800 MIPS: CPU#0 is not hotpluggable Now CPU#0 is not hotpluggable on MIPS, so prevent to create /sys/devices /system/cpu/cpu0/online which confuses some user-space tools. Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit d8727385f4ab1f1603ac8e3219c0e830e1b38e90 Author: Paul Cercueil Date: Sat Jul 25 19:43:07 2020 +0200 MIPS: ingenic: JZ4725B: Add IPU node Add a devicetree node for the Image Processing Unit (IPU) found in the JZ4725B. Connect it with graph nodes to the LCD node. The LCD driver will expect the IPU node to be accessed through graph port #8, as stated in the bindings documentation. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 0bfdf92a9754eee2f83e7dcb201d8b150d0ecce9 Author: Randy Dunlap Date: Sat Jul 25 17:34:29 2020 -0700 mips: octeon: octeon.h: delete duplicated word Delete the repeated word "as". Signed-off-by: Randy Dunlap Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit c7e33709421c843548ca4eaa85c3e0c76fa5a9c9 Author: Randy Dunlap Date: Sat Jul 25 17:34:28 2020 -0700 mips: octeon: cvmx-pow.h: fix duplicated words Delete the repeated words "Returns" and convert to kernel-doc notation by adding a ':'. Signed-off-by: Randy Dunlap Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit 37cbd2b3cb6ecb0c7b7198d551a723a55ee05c1e Author: Randy Dunlap Date: Sat Jul 25 17:34:27 2020 -0700 mips: octeon: cvmx-pkoh: fix duplicated words Delete the repeated word "command". Delete the repeated words "returns" and convert to kernel-doc notation by adding a ':'. Signed-off-by: Randy Dunlap Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit 0390de410db90fa8e5f550a49c3ae7a74b8e93ba Author: Randy Dunlap Date: Sat Jul 25 17:34:26 2020 -0700 mips: octeon: cvmx-pip.h: delete duplicated word Delete the repeated word "the". Signed-off-by: Randy Dunlap Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit 108cff579bafb523668ceecf0debb219e4fd4cfa Author: Randy Dunlap Date: Sat Jul 25 17:34:25 2020 -0700 mips: octeon: cvmx-l2c.h: delete duplicated word Delete the repeated word "Returns". Signed-off-by: Randy Dunlap Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit f2790db134df7e8b672644b35312b9e00ef1c032 Author: Randy Dunlap Date: Sat Jul 25 17:34:24 2020 -0700 mips: io.h: delete duplicated word Delete the repeated word "on". Signed-off-by: Randy Dunlap Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit 47960ad614d0c162e03f8ec10bca7086fde284ed Merge: 2b9b305fcdda1 e8407fdeb9a68 Author: Alexei Starovoitov Date: Sat Jul 25 20:37:02 2020 -0700 Merge branch 'bpf_link-XDP' Andrii Nakryiko says: ==================== Following cgroup and netns examples, implement bpf_link support for XDP. The semantics is described in patch #2. Program and link attachments are mutually exclusive, in the sense that neither link can replace attached program nor program can replace attached link. Link can't replace attached link as well, as is the case for any other bpf_link implementation. Patch #1 refactors existing BPF program-based attachment API and centralizes high-level query/attach decisions in generic kernel code, while drivers are kept simple and are instructed with low-level decisions about attaching and detaching specific bpf_prog. This also makes QUERY command unnecessary, and patch #8 removes support for it from all kernel drivers. If that's a bad idea, we can drop that patch altogether. With refactoring in patch #1, adding bpf_xdp_link is completely transparent to drivers, they are still functioning at the level of "effective" bpf_prog, that should be called in XDP data path. Corresponding libbpf support for BPF XDP link is added in patch #5. v3->v4: - fix a compilation warning in one of drivers (Jakub); v2->v3: - fix build when CONFIG_BPF_SYSCALL=n (kernel test robot); v1->v2: - fix prog refcounting bug (David); - split dev_change_xdp_fd() changes into 2 patches (David); - add extack messages to all user-induced errors (David). ==================== Signed-off-by: Alexei Starovoitov commit e8407fdeb9a6866784e249881f6c786a0835faba Author: Andrii Nakryiko Date: Tue Jul 21 23:46:02 2020 -0700 bpf, xdp: Remove XDP_QUERY_PROG and XDP_QUERY_PROG_HW XDP commands Now that BPF program/link management is centralized in generic net_device code, kernel code never queries program id from drivers, so XDP_QUERY_PROG/XDP_QUERY_PROG_HW commands are unnecessary. This patch removes all the implementations of those commands in kernel, along the xdp_attachment_query(). This patch was compile-tested on allyesconfig. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200722064603.3350758-10-andriin@fb.com commit fe48230cf2ae27c9e3b96d29908e22e2926fd1ab Author: Andrii Nakryiko Date: Tue Jul 21 23:46:01 2020 -0700 selftests/bpf: Add BPF XDP link selftests Add selftest validating all the attachment logic around BPF XDP link. Test also link updates and get_obj_info() APIs. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200722064603.3350758-9-andriin@fb.com commit dc8698cac7aada9b61a612cb819341d84591163e Author: Andrii Nakryiko Date: Tue Jul 21 23:46:00 2020 -0700 libbpf: Add support for BPF XDP link Sync UAPI header and add support for using bpf_link-based XDP attachment. Make xdp/ prog type set expected attach type. Kernel didn't enforce attach_type for XDP programs before, so there is no backwards compatiblity issues there. Also fix section_names selftest to recognize that xdp prog types now have expected attach type. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200722064603.3350758-8-andriin@fb.com commit c1931c9784ebb5787c0784c112fb8baa5e8455b3 Author: Andrii Nakryiko Date: Tue Jul 21 23:45:59 2020 -0700 bpf: Implement BPF XDP link-specific introspection APIs Implement XDP link-specific show_fdinfo and link_info to emit ifindex. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200722064603.3350758-7-andriin@fb.com commit 026a4c28e1db3b0cb99cd9a3e495d4a8b632fa74 Author: Andrii Nakryiko Date: Tue Jul 21 23:45:58 2020 -0700 bpf, xdp: Implement LINK_UPDATE for BPF XDP link Add support for LINK_UPDATE command for BPF XDP link to enable reliable replacement of underlying BPF program. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200722064603.3350758-6-andriin@fb.com commit aa8d3a716b59db6c1ad6c68fb8aa05e31980da60 Author: Andrii Nakryiko Date: Tue Jul 21 23:45:57 2020 -0700 bpf, xdp: Add bpf_link-based XDP attachment API Add bpf_link-based API (bpf_xdp_link) to attach BPF XDP program through BPF_LINK_CREATE command. bpf_xdp_link is mutually exclusive with direct BPF program attachment, previous BPF program should be detached prior to attempting to create a new bpf_xdp_link attachment (for a given XDP mode). Once BPF link is attached, it can't be replaced by other BPF program attachment or link attachment. It will be detached only when the last BPF link FD is closed. bpf_xdp_link will be auto-detached when net_device is shutdown, similarly to how other BPF links behave (cgroup, flow_dissector). At that point bpf_link will become defunct, but won't be destroyed until last FD is closed. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200722064603.3350758-5-andriin@fb.com commit d4baa9368a5e4d694e787e0442ddd6ab95d6fd96 Author: Andrii Nakryiko Date: Tue Jul 21 23:45:56 2020 -0700 bpf, xdp: Extract common XDP program attachment logic Further refactor XDP attachment code. dev_change_xdp_fd() is split into two parts: getting bpf_progs from FDs and attachment logic, working with bpf_progs. This makes attachment logic a bit more straightforward and prepares code for bpf_xdp_link inclusion, which will share the common logic. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200722064603.3350758-4-andriin@fb.com commit 7f0a838254bdd9114b978ef2541a6ce330307e9e Author: Andrii Nakryiko Date: Tue Jul 21 23:45:55 2020 -0700 bpf, xdp: Maintain info on attached XDP BPF programs in net_device Instead of delegating to drivers, maintain information about which BPF programs are attached in which XDP modes (generic/skb, driver, or hardware) locally in net_device. This effectively obsoletes XDP_QUERY_PROG command. Such re-organization simplifies existing code already. But it also allows to further add bpf_link-based XDP attachments without drivers having to know about any of this at all, which seems like a good setup. XDP_SETUP_PROG/XDP_SETUP_PROG_HW are just low-level commands to driver to install/uninstall active BPF program. All the higher-level concerns about prog/link interaction will be contained within generic driver-agnostic logic. All the XDP_QUERY_PROG calls to driver in dev_xdp_uninstall() were removed. It's not clear for me why dev_xdp_uninstall() were passing previous prog_flags when resetting installed programs. That seems unnecessary, plus most drivers don't populate prog_flags anyways. Having XDP_SETUP_PROG vs XDP_SETUP_PROG_HW should be enough of an indicator of what is required of driver to correctly reset active BPF program. dev_xdp_uninstall() is also generalized as an iteration over all three supported mode. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200722064603.3350758-3-andriin@fb.com commit 6cc7d1e8e9e06d45f9d1a39a5f465288d7cd8f9a Author: Andrii Nakryiko Date: Tue Jul 21 23:45:54 2020 -0700 bpf: Make bpf_link API available indepently of CONFIG_BPF_SYSCALL Similarly to bpf_prog, make bpf_link and related generic API available unconditionally to make it easier to have bpf_link support in various parts of the kernel. Stub out init/prime/settle/cleanup and inc/put APIs. Reported-by: kernel test robot Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200722064603.3350758-2-andriin@fb.com commit 2b9b305fcdda1810bdffeb599361174eb2cd0b7c Author: Song Liu Date: Fri Jul 24 13:05:02 2020 -0700 bpf: Fix build on architectures with special bpf_user_pt_regs_t Architectures like s390, powerpc, arm64, riscv have speical definition of bpf_user_pt_regs_t. So we need to cast the pointer before passing it to bpf_get_stack(). This is similar to bpf_get_stack_tp(). Fixes: 03d42fd2d83f ("bpf: Separate bpf_get_[stack|stackid] for perf events BPF") Reported-by: kernel test robot Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200724200503.3629591-1-songliubraving@fb.com commit dfcdf0e9ad2e006196986f363c99b2097aec5ef0 Author: YiFei Zhu Date: Fri Jul 24 16:17:53 2020 -0500 bpf/local_storage: Fix build without CONFIG_CGROUP local_storage.o has its compile guard as CONFIG_BPF_SYSCALL, which does not imply that CONFIG_CGROUP is on. Including cgroup-internal.h when CONFIG_CGROUP is off cause a compilation failure. Fixes: f67cfc233706 ("bpf: Make cgroup storages shared between programs on the same cgroup") Reported-by: kernel test robot Signed-off-by: YiFei Zhu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200724211753.902969-1-zhuyifei1999@gmail.com commit 36f72484820abcaede242a53fde965217e718b2e Merge: 90065c0647efd 4e15f460be6d1 Author: Alexei Starovoitov Date: Thu Jul 23 23:01:16 2020 -0700 Merge branch 'shared-cgroup-storage' YiFei Zhu says: ==================== To access the storage in a CGROUP_STORAGE map, one uses bpf_get_local_storage helper, which is extremely fast due to its use of per-CPU variables. However, its whole code is built on the assumption that one map can only be used by one program at any time, and this prohibits any sharing of data between multiple programs using these maps, eliminating a lot of use cases, such as some per-cgroup configuration storage, written to by a setsockopt program and read by a cg_sock_addr program. Why not use other map types? The great part of CGROUP_STORAGE map is that it is isolated by different cgroups its attached to. When one program uses bpf_get_local_storage, even on the same map, it gets different storages if it were run as a result of attaching to different cgroups. The kernel manages the storages, simplifying BPF program or userspace. In theory, one could probably use other maps like array or hash to do the same thing, but it would be a major overhead / complexity. Userspace needs to know when a cgroup is being freed in order to free up a space in the replacement map. This patch set introduces a significant change to the semantics of CGROUP_STORAGE map type. Instead of each storage being tied to one single attachment, it is shared across different attachments to the same cgroup, and persists until either the map or the cgroup attached to is being freed. User may use u64 as the key to the map, and the result would be that the attach type become ignored during key comparison, and programs of different attach types will share the same storage if the cgroups they are attached to are the same. How could this break existing users? * Users that uses detach & reattach / program replacement as a shortcut to zeroing the storage. Since we need sharing between programs, we cannot zero the storage. Users that expect this behavior should either attach a program with a new map, or explicitly zero the map with a syscall. This case is dependent on undocumented implementation details, so the impact should be very minimal. Patch 1 introduces a test on the old expected behavior of the map type. Patch 2 introduces a test showing how two programs cannot share one such map. Patch 3 implements the change of semantics to the map. Patch 4 amends the new test such that it yields the behavior we expect from the change. Patch 5 documents the map type. Changes since RFC: * Clarify commit message in patch 3 such that it says the lifetime of the storage is ended at the freeing of the cgroup_bpf, rather than the cgroup itself. * Restored an -ENOMEM check in __cgroup_bpf_attach. * Update selftests for recent change in network_helpers API. Changes since v1: * s/CHECK_FAIL/CHECK/ * s/bpf_prog_attach/bpf_program__attach_cgroup/ * Moved test__start_subtest to test_cg_storage_multi. * Removed some redundant CHECK_FAIL where they are already CHECK-ed. Changes since v2: * Lock cgroup_mutex during map_free. * Publish new storages only if attach is successful, by tracking exactly which storages are reused in an array of bools. * Mention bpftool map dump showing a value of zero for attach_type in patch 3 commit message. Changes since v3: * Use a much simpler lookup and allocate-if-not-exist from the fact that cgroup_mutex is locked during attach. * Removed an unnecessary spinlock hold. Changes since v4: * Changed semantics so that if the key type is struct bpf_cgroup_storage_key the map retains isolation between different attach types. Sharing between different attach types only occur when key type is u64. * Adapted tests and docs for the above change. Changes since v5: * Removed redundant NULL check before bpf_link__destroy. * Free BPF object explicitly, after asserting that object failed to load, in the event that the object did not fail to load. * Rename variable in bpf_cgroup_storage_key_cmp for clarity. * Added a lot of information to Documentation, more or less copied from what Martin KaFai Lau wrote. ==================== Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 4e15f460be6d14c3fe80ef3221bde759f6b94d9d Author: YiFei Zhu Date: Thu Jul 23 23:47:45 2020 -0500 Documentation/bpf: Document CGROUP_STORAGE map type The machanics and usage are not very straightforward. Given the changes it's better to document how it works and how to use it, rather than having to rely on the examples and implementation to infer what is going on. Signed-off-by: YiFei Zhu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/b412edfbb05cb1077c9e2a36a981a54ee23fa8b3.1595565795.git.zhuyifei@google.com commit 3573f384014f51fd5289df0e8369b63ae7fdc244 Author: YiFei Zhu Date: Thu Jul 23 23:47:44 2020 -0500 selftests/bpf: Test CGROUP_STORAGE behavior on shared egress + ingress This mirrors the original egress-only test. The cgroup_storage is now extended to have two packet counters, one for egress and one for ingress. We also extend to have two egress programs to test that egress will always share with other egress origrams in the same cgroup. The behavior of the counters are exactly the same as the original egress-only test. The test is split into two, one "isolated" test that when the key type is struct bpf_cgroup_storage_key, which contains the attach type, programs of different attach types will see different storages. The other, "shared" test that when the key type is u64, programs of different attach types will see the same storage if they are attached to the same cgroup. Signed-off-by: YiFei Zhu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/c756f5f1521227b8e6e90a453299dda722d7324d.1595565795.git.zhuyifei@google.com commit 90065c0647efd6e2ec8983a702c4ba813af51b93 Merge: 909e446b32046 346938e9380cc Author: Alexei Starovoitov Date: Thu Jul 23 22:20:32 2020 -0700 Merge branch 'fix-bpf_get_stack-with-PEBS' Song Liu says: ==================== Calling get_perf_callchain() on perf_events from PEBS entries may cause unwinder errors. To fix this issue, perf subsystem fetches callchain early, and marks perf_events are marked with __PERF_SAMPLE_CALLCHAIN_EARLY. Similar issue exists when BPF program calls get_perf_callchain() via helper functions. For more information about this issue, please refer to discussions in [1]. This set fixes this issue with helper proto bpf_get_stackid_pe and bpf_get_stack_pe. [1] https://lore.kernel.org/lkml/ED7B9430-6489-4260-B3C5-9CFA2E3AA87A@fb.com/ Changes v4 => v5: 1. Return -EPROTO instead of -EINVAL on PERF_EVENT_IOC_SET_BPF errors. (Alexei) 2. Let libbpf print a hint message when PERF_EVENT_IOC_SET_BPF returns -EPROTO. (Alexei) Changes v3 => v4: 1. Fix error check logic in bpf_get_stackid_pe and bpf_get_stack_pe. (Alexei) 2. Do not allow attaching BPF programs with bpf_get_stack|stackid to perf_event with precise_ip > 0, but not proper callchain. (Alexei) 3. Add selftest get_stackid_cannot_attach. Changes v2 => v3: 1. Fix handling of stackmap skip field. (Andrii) 2. Simplify the code in a few places. (Andrii) Changes v1 => v2: 1. Simplify the design and avoid introducing new helper function. (Andrii) ==================== Signed-off-by: Alexei Starovoitov commit 7d9c3427894fe70d1347b4820476bf37736d2ff0 Author: YiFei Zhu Date: Thu Jul 23 23:47:43 2020 -0500 bpf: Make cgroup storages shared between programs on the same cgroup This change comes in several parts: One, the restriction that the CGROUP_STORAGE map can only be used by one program is removed. This results in the removal of the field 'aux' in struct bpf_cgroup_storage_map, and removal of relevant code associated with the field, and removal of now-noop functions bpf_free_cgroup_storage and bpf_cgroup_storage_release. Second, we permit a key of type u64 as the key to the map. Providing such a key type indicates that the map should ignore attach type when comparing map keys. However, for simplicity newly linked storage will still have the attach type at link time in its key struct. cgroup_storage_check_btf is adapted to accept u64 as the type of the key. Third, because the storages are now shared, the storages cannot be unconditionally freed on program detach. There could be two ways to solve this issue: * A. Reference count the usage of the storages, and free when the last program is detached. * B. Free only when the storage is impossible to be referred to again, i.e. when either the cgroup_bpf it is attached to, or the map itself, is freed. Option A has the side effect that, when the user detach and reattach a program, whether the program gets a fresh storage depends on whether there is another program attached using that storage. This could trigger races if the user is multi-threaded, and since nondeterminism in data races is evil, go with option B. The both the map and the cgroup_bpf now tracks their associated storages, and the storage unlink and free are removed from cgroup_bpf_detach and added to cgroup_bpf_release and cgroup_storage_map_free. The latter also new holds the cgroup_mutex to prevent any races with the former. Fourth, on attach, we reuse the old storage if the key already exists in the map, via cgroup_storage_lookup. If the storage does not exist yet, we create a new one, and publish it at the last step in the attach process. This does not create a race condition because for the whole attach the cgroup_mutex is held. We keep track of an array of new storages that was allocated and if the process fails only the new storages would get freed. Signed-off-by: YiFei Zhu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/d5401c6106728a00890401190db40020a1f84ff1.1595565795.git.zhuyifei@google.com commit 346938e9380cc0b2ad8e2566389cdc570386fe22 Author: Song Liu Date: Thu Jul 23 11:06:48 2020 -0700 selftests/bpf: Add get_stackid_cannot_attach This test confirms that BPF program that calls bpf_get_stackid() cannot attach to perf_event with precise_ip > 0 but not PERF_SAMPLE_CALLCHAIN; and cannot attach if the perf_event has exclude_callchain_kernel. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723180648.1429892-6-songliubraving@fb.com commit 9e5bd1f7633bc1c3c8b25496eedfeced6d2675ff Author: YiFei Zhu Date: Thu Jul 23 23:47:42 2020 -0500 selftests/bpf: Test CGROUP_STORAGE map can't be used by multiple progs The current assumption is that the lifetime of a cgroup storage is tied to the program's attachment. The storage is created in cgroup_bpf_attach, and released upon cgroup_bpf_detach and cgroup_bpf_release. Because the current semantics is that each attachment gets a completely independent cgroup storage, and you can have multiple programs attached to the same (cgroup, attach type) pair, the key of the CGROUP_STORAGE map, looking up the map with this pair could yield multiple storages, and that is not permitted. Therefore, the kernel verifier checks that two programs cannot share the same CGROUP_STORAGE map, even if they have different expected attach types, considering that the actual attach type does not always have to be equal to the expected attach type. The test creates a CGROUP_STORAGE map and make it shared across two different programs, one cgroup_skb/egress and one /ingress. It asserts that the two programs cannot be both loaded, due to verifier failure from the above reason. Signed-off-by: YiFei Zhu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/30a6b0da67ae6b0296c4d511bfb19c5f3d035916.1595565795.git.zhuyifei@google.com commit 1da4864c2b20f81afbb18b2a0b914d0c776331fc Author: Song Liu Date: Thu Jul 23 11:06:47 2020 -0700 selftests/bpf: Add callchain_stackid This tests new helper function bpf_get_stackid_pe and bpf_get_stack_pe. These two helpers have different implementation for perf_event with PEB entries. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200723180648.1429892-5-songliubraving@fb.com commit d4a89c1eb81431479664029bcdec593dbf23385f Author: YiFei Zhu Date: Thu Jul 23 23:47:41 2020 -0500 selftests/bpf: Add test for CGROUP_STORAGE map on multiple attaches This test creates a parent cgroup, and a child of that cgroup. It attaches a cgroup_skb/egress program that simply counts packets, to a global variable (ARRAY map), and to a CGROUP_STORAGE map. The program is first attached to the parent cgroup only, then to parent and child. The test cases sends a message within the child cgroup, and because the program is inherited across parent / child cgroups, it will trigger the egress program for both the parent and child, if they exist. The program, when looking up a CGROUP_STORAGE map, uses the cgroup and attach type of the attachment parameters; therefore, both attaches uses different cgroup storages. We assert that all packet counts returns what we expects. Signed-off-by: YiFei Zhu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/5a20206afa4606144691c7caa0d1b997cd60dec0.1595565795.git.zhuyifei@google.com commit d4b4dd6ce7709c2d2fe56dcfc15074ee18505bcb Author: Song Liu Date: Thu Jul 23 11:06:46 2020 -0700 libbpf: Print hint when PERF_EVENT_IOC_SET_BPF returns -EPROTO The kernel prevents potential unwinder warnings and crashes by blocking BPF program with bpf_get_[stack|stackid] on perf_event without PERF_SAMPLE_CALLCHAIN, or with exclude_callchain_[kernel|user]. Print a hint message in libbpf to help the user debug such issues. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723180648.1429892-4-songliubraving@fb.com commit 909e446b3204642bdb54ab2f225652be89d91268 Merge: a228a64fc1e44 9efcc4ad7a15e Author: Alexei Starovoitov Date: Thu Jul 23 22:05:46 2020 -0700 Merge branch 'bpf_iter-for-map-elems' Yonghong Song says: ==================== Bpf iterator has been implemented for task, task_file, bpf_map, ipv6_route, netlink, tcp and udp so far. For map elements, there are two ways to traverse all elements from user space: 1. using BPF_MAP_GET_NEXT_KEY bpf subcommand to get elements one by one. 2. using BPF_MAP_LOOKUP_BATCH bpf subcommand to get a batch of elements. Both these approaches need to copy data from kernel to user space in order to do inspection. This patch implements bpf iterator for map elements. User can have a bpf program in kernel to run with each map element, do checking, filtering, aggregation, modifying values etc. without copying data to user space. Patch #1 and #2 are refactoring. Patch #3 implements readonly/readwrite buffer support in verifier. Patches #4 - #7 implements map element support for hash, percpu hash, lru hash lru percpu hash, array, percpu array and sock local storage maps. Patches #8 - #9 are libbpf and bpftool support. Patches #10 - #13 are selftests for implemented map element iterators. Changelogs: v3 -> v4: . fix a kasan failure triggered by a failed bpf_iter link_create, not just free_link but need cleanup_link. (Alexei) v2 -> v3: . rebase on top of latest bpf-next v1 -> v2: . support to modify map element values. (Alexei) . map key/values can be used with helper arguments for those arguments with ARG_PTR_TO_MEM or ARG_PTR_TO_INIT_MEM register type. (Alexei) . remove usused variable. (kernel test robot) ==================== Signed-off-by: Alexei Starovoitov commit 5d99cb2c86775b4780c02a339a9578bf9471ead9 Author: Song Liu Date: Thu Jul 23 11:06:45 2020 -0700 bpf: Fail PERF_EVENT_IOC_SET_BPF when bpf_get_[stack|stackid] cannot work bpf_get_[stack|stackid] on perf_events with precise_ip uses callchain attached to perf_sample_data. If this callchain is not presented, do not allow attaching BPF program that calls bpf_get_[stack|stackid] to this event. In the error case, -EPROTO is returned so that libbpf can identify this error and print proper hint message. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723180648.1429892-3-songliubraving@fb.com commit 9efcc4ad7a15ea50550c53fbf62457c309216051 Author: Yonghong Song Date: Thu Jul 23 11:41:24 2020 -0700 selftests/bpf: Add a test for out of bound rdonly buf access If the bpf program contains out of bound access w.r.t. a particular map key/value size, the verification will be still okay, e.g., it will be accepted by verifier. But it will be rejected during link_create time. A test is added here to ensure link_create failure did happen if out of bound access happened. $ ./test_progs -n 4 ... #4/23 rdonly-buf-out-of-bound:OK ... Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184124.591700-1-yhs@fb.com commit 7b04d6d60fcfb5b2200ffebb9cfb90927bdfeec7 Author: Song Liu Date: Thu Jul 23 11:06:44 2020 -0700 bpf: Separate bpf_get_[stack|stackid] for perf events BPF Calling get_perf_callchain() on perf_events from PEBS entries may cause unwinder errors. To fix this issue, the callchain is fetched early. Such perf_events are marked with __PERF_SAMPLE_CALLCHAIN_EARLY. Similarly, calling bpf_get_[stack|stackid] on perf_events from PEBS may also cause unwinder errors. To fix this, add separate version of these two helpers, bpf_get_[stack|stackid]_pe. These two hepers use callchain in bpf_perf_event_data_kern->data->callchain. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723180648.1429892-2-songliubraving@fb.com commit 3b1c420bd882115eb7a3d2335cc00d7b9974eb0b Author: Yonghong Song Date: Thu Jul 23 11:41:22 2020 -0700 selftests/bpf: Add a test for bpf sk_storage_map iterator Added one test for bpf sk_storage_map_iterator. $ ./test_progs -n 4 ... #4/22 bpf_sk_storage_map:OK ... Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184122.591591-1-yhs@fb.com commit 60dd49ea65390986a665c462da704927e861e67e Author: Yonghong Song Date: Thu Jul 23 11:41:21 2020 -0700 selftests/bpf: Add test for bpf array map iterators Two subtests are added. $ ./test_progs -n 4 ... #4/20 bpf_array_map:OK #4/21 bpf_percpu_array_map:OK ... The bpf_array_map subtest also tested bpf program changing array element values and send key/value to user space through bpf_seq_write() interface. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184121.591367-1-yhs@fb.com commit 2a7c2fff7dd6e87634e47ddb2d2c7f272708dbbf Author: Yonghong Song Date: Thu Jul 23 11:41:20 2020 -0700 selftests/bpf: Add test for bpf hash map iterators Two subtests are added. $ ./test_progs -n 4 ... #4/18 bpf_hash_map:OK #4/19 bpf_percpu_hash_map:OK ... Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184120.590916-1-yhs@fb.com commit d8793aca708602c676372b03d6493972457524af Author: Yonghong Song Date: Thu Jul 23 11:41:19 2020 -0700 tools/bpftool: Add bpftool support for bpf map element iterator The optional parameter "map MAP" can be added to "bpftool iter" command to create a bpf iterator for map elements. For example, bpftool iter pin ./prog.o /sys/fs/bpf/p1 map id 333 For map element bpf iterator "map MAP" parameter is required. Otherwise, bpf link creation will return an error. Quentin Monnet kindly provided bash-completion implementation for new "map MAP" option. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184119.590799-1-yhs@fb.com commit cd31039a7347610863aa8b77a9162048999723d0 Author: Yonghong Song Date: Thu Jul 23 11:41:17 2020 -0700 tools/libbpf: Add support for bpf map element iterator Add map_fd to bpf_iter_attach_opts and flags to bpf_link_create_opts. Later on, bpftool or selftest will be able to create a bpf map element iterator by passing map_fd to the kernel during link creation time. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184117.590673-1-yhs@fb.com commit 5ce6e77c7edf7310a0ff9532fd6b9693c082ab32 Author: Yonghong Song Date: Thu Jul 23 11:41:16 2020 -0700 bpf: Implement bpf iterator for sock local storage map The bpf iterator for bpf sock local storage map is implemented. User space interacts with sock local storage map with fd as a key and storage value. In kernel, passing fd to the bpf program does not really make sense. In this case, the sock itself is passed to bpf program. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184116.590602-1-yhs@fb.com commit d3cc2ab546adc6e52b65f36f7c34820d2830d0c9 Author: Yonghong Song Date: Thu Jul 23 11:41:15 2020 -0700 bpf: Implement bpf iterator for array maps The bpf iterators for array and percpu array are implemented. Similar to hash maps, for percpu array map, bpf program will receive values from all cpus. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184115.590532-1-yhs@fb.com commit d6c4503cc29638f328e1a6e6fefbdbda401c28fc Author: Yonghong Song Date: Thu Jul 23 11:41:14 2020 -0700 bpf: Implement bpf iterator for hash maps The bpf iterators for hash, percpu hash, lru hash and lru percpu hash are implemented. During link time, bpf_iter_reg->check_target() will check map type and ensure the program access key/value region is within the map defined key/value size limit. For percpu hash and lru hash maps, the bpf program will receive values for all cpus. The map element bpf iterator infrastructure will prepare value properly before passing the value pointer to the bpf program. This patch set supports readonly map keys and read/write map values. It does not support deleting map elements, e.g., from hash tables. If there is a user case for this, the following mechanism can be used to support map deletion for hashtab, etc. - permit a new bpf program return value, e.g., 2, to let bpf iterator know the map element should be removed. - since bucket lock is taken, the map element will be queued. - once bucket lock is released after all elements under this bucket are traversed, all to-be-deleted map elements can be deleted. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184114.590470-1-yhs@fb.com commit a228a64fc1e4428e2b96dc68e9ad3c447095c9e7 Author: Alexei Starovoitov Date: Wed Jul 1 18:10:18 2020 -0700 bpf: Add bpf_prog iterator It's mostly a copy paste of commit 6086d29def80 ("bpf: Add bpf_map iterator") that is use to implement bpf_seq_file opreations to traverse all bpf programs. v1->v2: Tweak to use build time btf_id Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Acked-by: Daniel Borkmann commit a5cbe05a6673b85bed2a63ffcfea6a96c6410cff Author: Yonghong Song Date: Thu Jul 23 11:41:12 2020 -0700 bpf: Implement bpf iterator for map elements The bpf iterator for map elements are implemented. The bpf program will receive four parameters: bpf_iter_meta *meta: the meta data bpf_map *map: the bpf_map whose elements are traversed void *key: the key of one element void *value: the value of the same element Here, meta and map pointers are always valid, and key has register type PTR_TO_RDONLY_BUF_OR_NULL and value has register type PTR_TO_RDWR_BUF_OR_NULL. The kernel will track the access range of key and value during verification time. Later, these values will be compared against the values in the actual map to ensure all accesses are within range. A new field iter_seq_info is added to bpf_map_ops which is used to add map type specific information, i.e., seq_ops, init/fini seq_file func and seq_file private data size. Subsequent patches will have actual implementation for bpf_map_ops->iter_seq_info. In user space, BPF_ITER_LINK_MAP_FD needs to be specified in prog attr->link_create.flags, which indicates that attr->link_create.target_fd is a map_fd. The reason for such an explicit flag is for possible future cases where one bpf iterator may allow more than one possible customization, e.g., pid and cgroup id for task_file. Current kernel internal implementation only allows the target to register at most one required bpf_iter_link_info. To support the above case, optional bpf_iter_link_info's are needed, the target can be extended to register such link infos, and user provided link_info needs to match one of target supported ones. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184112.590360-1-yhs@fb.com commit 3f9969f2c040ba2ba635b6b5a7051f404bcc634d Author: Yonghong Song Date: Wed Jul 22 12:51:56 2020 -0700 bpf: Fix pos computation for bpf_iter seq_ops->start() Currently, the pos pointer in bpf iterator map/task/task_file seq_ops->start() is always incremented. This is incorrect. It should be increased only if *pos is 0 (for SEQ_START_TOKEN) since these start() function actually returns the first real object. If *pos is not 0, it merely found the object based on the state in seq->private, and not really advancing the *pos. This patch fixed this issue by only incrementing *pos if it is 0. Note that the old *pos calculation, although not correct, does not affect correctness of bpf_iter as bpf_iter seq_file->read() does not support llseek. This patch also renamed "mid" in bpf_map iterator seq_file private data to "map_id" for better clarity. Fixes: 6086d29def80 ("bpf: Add bpf_map iterator") Fixes: eaaacd23910f ("bpf: Add task and task/file iterator targets") Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200722195156.4029817-1-yhs@fb.com commit afbf21dce668ef59482037596eaffbe5041e094c Author: Yonghong Song Date: Thu Jul 23 11:41:11 2020 -0700 bpf: Support readonly/readwrite buffers in verifier Readonly and readwrite buffer register states are introduced. Totally four states, PTR_TO_RDONLY_BUF[_OR_NULL] and PTR_TO_RDWR_BUF[_OR_NULL] are supported. As suggested by their respective names, PTR_TO_RDONLY_BUF[_OR_NULL] are for readonly buffers and PTR_TO_RDWR_BUF[_OR_NULL] for read/write buffers. These new register states will be used by later bpf map element iterator. New register states share some similarity to PTR_TO_TP_BUFFER as it will calculate accessed buffer size during verification time. The accessed buffer size will be later compared to other metrics during later attach/link_create time. Similar to reg_state PTR_TO_BTF_ID_OR_NULL in bpf iterator programs, PTR_TO_RDONLY_BUF_OR_NULL or PTR_TO_RDWR_BUF_OR_NULL reg_types can be set at prog->aux->bpf_ctx_arg_aux, and bpf verifier will retrieve the values during btf_ctx_access(). Later bpf map element iterator implementation will show how such information will be assigned during target registeration time. The verifier is also enhanced such that PTR_TO_RDONLY_BUF can be passed to ARG_PTR_TO_MEM[_OR_NULL] helper argument, and PTR_TO_RDWR_BUF can be passed to ARG_PTR_TO_MEM[_OR_NULL] or ARG_PTR_TO_UNINIT_MEM. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184111.590274-1-yhs@fb.com commit 86176a1821a1237ad163d312ba0f2d7598757894 Author: Jakub Sitnicki Date: Wed Jul 22 18:17:20 2020 +0200 selftests/bpf: Test BPF socket lookup and reuseport with connections Cover the case when BPF socket lookup returns a socket that belongs to a reuseport group, and the reuseport group contains connected UDP sockets. Ensure that the presence of connected UDP sockets in reuseport group does not affect the socket lookup result. Socket selected by reuseport should always be used as result in such case. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Kuniyuki Iwashima Link: https://lore.kernel.org/bpf/20200722161720.940831-3-jakub@cloudflare.com commit f9c792729581bd8b8473af163e8ab426c2c61d89 Author: Yonghong Song Date: Thu Jul 23 11:41:10 2020 -0700 bpf: Refactor to provide aux info to bpf_iter_init_seq_priv_t This patch refactored target bpf_iter_init_seq_priv_t callback function to accept additional information. This will be needed in later patches for map element targets since a particular map should be passed to traverse elements for that particular map. In the future, other information may be passed to target as well, e.g., pid, cgroup id, etc. to customize the iterator. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184110.590156-1-yhs@fb.com commit 14fc6bd6b79c430f615500d0fe6cea4722110db8 Author: Yonghong Song Date: Thu Jul 23 11:41:09 2020 -0700 bpf: Refactor bpf_iter_reg to have separate seq_info member There is no functionality change for this patch. Struct bpf_iter_reg is used to register a bpf_iter target, which includes information for both prog_load, link_create and seq_file creation. This patch puts fields related seq_file creation into a different structure. This will be useful for map elements iterator where one iterator covers different map types and different map types may have different seq_ops, init/fini private_data function and private_data size. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200723184109.590030-1-yhs@fb.com commit c8a2983c4df06c4cd11bea6abfa7e2947bd3113b Author: Jakub Sitnicki Date: Wed Jul 22 18:17:19 2020 +0200 udp: Don't discard reuseport selection when group has connections When BPF socket lookup prog selects a socket that belongs to a reuseport group, and the reuseport group has connected sockets in it, the socket selected by reuseport will be discarded, and socket returned by BPF socket lookup will be used instead. Modify this behavior so that the socket selected by reuseport running after BPF socket lookup always gets used. Ignore the fact that the reuseport group might have connections because it is only relevant when scoring sockets during regular hashtable-based lookup. Fixes: 72f7e9440e9b ("udp: Run SK_LOOKUP BPF program on socket lookup") Fixes: 6d4201b1386b ("udp6: Run SK_LOOKUP BPF program on socket lookup") Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Kuniyuki Iwashima Link: https://lore.kernel.org/bpf/20200722161720.940831-2-jakub@cloudflare.com commit f3c93a93b564d25cab715cd71a6c3417e77b19f3 Author: Andrii Nakryiko Date: Tue Jul 21 21:38:04 2020 -0700 tools/bpftool: Strip BPF .o files before skeleton generation Strip away DWARF info from .bpf.o files, before generating BPF skeletons. This reduces bpftool binary size from 3.43MB to 2.58MB. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200722043804.2373298-1-andriin@fb.com commit 60d360acddc54344409a710af07c561e025f13f5 Author: Dan Williams Date: Mon Jul 20 15:08:07 2020 -0700 driver-core: Introduce DEVICE_ATTR_ADMIN_{RO,RW} A common pattern for using plain DEVICE_ATTR() instead of DEVICE_ATTR_RO() and DEVICE_ATTR_RW() is for attributes that want to limit read to only root. I.e. many users of DEVICE_ATTR() are specifying 0400 or 0600 for permissions. Given the expectation that CAP_SYS_ADMIN is needed to access these sensitive attributes add an explicit helper with the _ADMIN_ identifier for DEVICE_ATTR_ADMIN_{RO,RW}. Cc: "Rafael J. Wysocki" Reviewed-by: Greg Kroah-Hartman Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit 916566ae78462636fe4de59b3f59a4a0c8f70205 Author: Dan Williams Date: Mon Jul 20 15:08:02 2020 -0700 tools/testing/nvdimm: Emulate firmware activation commands Augment the existing firmware update emulation to track activations and validate proper update vs activate sequencing. The DIMM firmware activate capability has a concept of a maximum amount of time platform firmware will quiesce the system relative to how many DIMMs are being activated in parallel. Simulate that DIMM activation happens serially, 1 second per-DIMM, and limit the max at 3 seconds. The nfit_test0 bus emulates 5 DIMMs so it will take 2 activations to update all DIMMs. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Reported-by: Andy Shevchenko Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit abfd4d9c828b9e1d5ff38c19eed036f707e4e213 Author: Dan Williams Date: Mon Jul 20 15:07:57 2020 -0700 tools/testing/nvdimm: Prepare nfit_ctl_test() for ND_CMD_CALL emulation In preparation for adding a mocked implementation of the firmware-activate bus-info command, rework nfit_ctl_test() to operate on a local command payload wrapped in a 'struct nd_cmd_pkg'. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit 0d47c4dfe5431abd04951a65845b3d989a704f63 Author: Dan Williams Date: Mon Jul 20 15:07:51 2020 -0700 tools/testing/nvdimm: Add command debug messages Arrange the for nfit_test_ctl() path to dump command payloads similarly to the acpi_nfit_ctl() path. This is useful for comparing the sequence of command events between an emulated ACPI-NFIT platform and a real one. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit 24770658dc03bc568dd217b470cba827aeaed582 Author: Dan Williams Date: Mon Jul 20 15:07:46 2020 -0700 tools/testing/nvdimm: Cleanup dimm index passing The ND_CMD_CALL path only applies to the nfit_test0 emulated DIMMs. Cleanup occurrences of (i - t->dcr_idx) since that offset fixup only applies to cases where nfit_test1 needs a bus-local index. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit 6450ddbd5d8e83ea9927c7f9076a21f829699e0f Author: Dan Williams Date: Mon Jul 20 15:07:40 2020 -0700 ACPI: NFIT: Define runtime firmware activation commands Platform reboots are expensive. Towards reducing downtime to apply firmware updates the Intel NVDIMM command definition is growing support for applying live firmware updates that only require temporarily suspending memory traffic instead of a full reboot. Follow-on commits add support for triggering firmware activation, this patch only defines the commands, adds probe support, and validates that they are blocked via the ioctl path. The ioctl-path block ensures that the OS is in charge since these commands have side effects only the OS can handle. Specifically firmware activation may cause the memory controller to be quiesced on the order of 100s of milliseconds. In that case Linux ensure the activation only takes place while the OS is in a suspend state. Link: https://pmem.io/documents/IntelOptanePMem_DSM_Interface-V2.0.pdf Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Cc: "Rafael J. Wysocki" Cc: Len Brown Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit d46e6a2176f8edf7030db34aeb54a4f016fabe0a Author: Dan Williams Date: Mon Jul 20 15:07:35 2020 -0700 ACPI: NFIT: Move bus_dsm_mask out of generic nvdimm_bus_descriptor DSMs are strictly an ACPI mechanism, evict the bus_dsm_mask concept from the generic 'struct nvdimm_bus_descriptor' object. As a side effect the test facility ->bus_nfit_cmd_force_en is no longer necessary. The test infrastructure can communicate that information directly in ->bus_dsm_mask. Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit 92fe2aa859f52ce6aa595ca97fec110dc7100e63 Author: Dan Williams Date: Mon Jul 20 15:07:30 2020 -0700 libnvdimm: Validate command family indices The ND_CMD_CALL format allows for a general passthrough of passlisted commands targeting a given command set. However there is no validation of the family index relative to what the bus supports. - Update the NFIT bus implementation (the only one that supports ND_CMD_CALL passthrough) to also passlist the valid set of command family indices. - Update the generic __nd_ioctl() path to validate that field on behalf of all implementations. Fixes: 31eca76ba2fc ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism") Cc: Vishal Verma Cc: Dave Jiang Cc: Ira Weiny Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Signed-off-by: Dan Williams Signed-off-by: Vishal Verma commit a57066b1a01977a646145f4ce8dfb4538b08368a Merge: dfecd3e00cd32 04300d66f0a06 Author: David S. Miller Date: Sat Jul 25 17:49:04 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net The UDP reuseport conflict was a little bit tricky. The net-next code, via bpf-next, extracted the reuseport handling into a helper so that the BPF sk lookup code could invoke it. At the same time, the logic for reuseport handling of unconnected sockets changed via commit efc6b6f6c3113e8b203b9debfb72d81e0f3dcace which changed the logic to carry on the reuseport result into the rest of the lookup loop if we do not return immediately. This requires moving the reuseport_has_conns() logic into the callers. While we are here, get rid of inline directives as they do not belong in foo.c files. The other changes were cases of more straightforward overlapping modifications. Signed-off-by: David S. Miller commit c84d53051fcb4f3d14d5a245e1d7ee8512bcb199 Merge: 9a71df495c3d2 ba47d845d715a Author: Ingo Molnar Date: Sat Jul 25 21:49:36 2020 +0200 Merge tag 'v5.8-rc6' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit a7ef9b28aa8d72a1656fa6f0a01bbd1493886317 Author: Chris Wilson Date: Sat Jul 25 19:51:10 2020 +0100 locking/lockdep: Fix overflow in presentation of average lock-time Though the number of lock-acquisitions is tracked as unsigned long, this is passed as the divisor to div_s64() which interprets it as a s32, giving nonsense values with more than 2 billion acquisitons. E.g. acquisitions holdtime-min holdtime-max holdtime-total holdtime-avg ------------------------------------------------------------------------- 2350439395 0.07 353.38 649647067.36 0.-32 Signed-off-by: Chris Wilson Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20200725185110.11588-1-chris@chris-wilson.co.uk commit b089ed390b5c9bc248a32168709cfa01099caf9d Author: Pavel Begunkov Date: Sat Jul 25 14:42:00 2020 +0300 io-wq: update hash bits Linked requests are hashed, remove a comment stating otherwise. Also move hash bits to emphasise that we don't carry it through loop iteration and set it every time. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f063c5477eb392c315aa25ad538b4920b367ea05 Author: Pavel Begunkov Date: Sat Jul 25 14:41:59 2020 +0300 io_uring: fix missing io_queue_linked_timeout() Whoever called io_prep_linked_timeout() should also do io_queue_linked_timeout(). __io_queue_sqe() doesn't follow that for the punting path leaving linked timeouts prepared but never queued. Fixes: 6df1db6b54243 ("io_uring: fix mis-refcounting linked timeouts") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b65e0dd6a2de050d3fc4c0db4969a245f4e7273e Author: Pavel Begunkov Date: Sat Jul 25 14:41:58 2020 +0300 io_uring: mark ->work uninitialised after cleanup Remove REQ_F_WORK_INITIALIZED after io_req_clean_work(). That's a cold path but is safer for those using io_req_clean_work() out of *dismantle_req()/*io_free(). And for the same reason zero work.fs Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 898ec52d2ba05915aaedcdb21bff2e944c883cb8 Author: Hayato Ohhashi Date: Tue Jul 21 16:12:31 2020 +0000 x86/xen/time: Set the X86_FEATURE_TSC_KNOWN_FREQ flag in xen_tsc_khz() If the TSC frequency is known from the pvclock page, the TSC frequency does not need to be recalibrated. We can avoid recalibration by setting X86_FEATURE_TSC_KNOWN_FREQ. Signed-off-by: Hayato Ohhashi Signed-off-by: Ingo Molnar Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20200721161231.6019-1-o8@vmm.dev commit a2f32ee8fd853cec8860f883d98afc3a339546de Author: Coly Li Date: Sat Jul 25 20:00:39 2020 +0800 bcache: fix bio_{start,end}_io_acct with proper device Commit 85750aeb748f ("bcache: use bio_{start,end}_io_acct") moves the io account code to the location after bio_set_dev(bio, dc->bdev) in cached_dev_make_request(). Then the account is performed incorrectly on backing device, indeed the I/O should be counted to bcache device like /dev/bcache0. With the mistaken I/O account, iostat does not display I/O counts for bcache device and all the numbers go to backing device. In writeback mode, the hard drive may have 340K+ IOPS which is impossible and wrong for spinning disk. This patch introduces bch_bio_start_io_acct() and bch_bio_end_io_acct(), which switches bio->bi_disk to bcache device before calling bio_start_io_acct() or bio_end_io_acct(). Now the I/Os are counted to bcache device, and bcache device, cache device and backing device have their correct I/O count information back. Fixes: 85750aeb748f ("bcache: use bio_{start,end}_io_acct") Signed-off-by: Coly Li Cc: Christoph Hellwig Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe commit 4e4d4e0962262c97ba4580716d11623384effdfd Author: Coly Li Date: Sat Jul 25 20:00:38 2020 +0800 bcache: avoid extra memory consumption in struct bbio for large bucket size Bcache uses struct bbio to do I/Os for meta data pages like uuids, disk_buckets, prio_buckets, and btree nodes. Example writing a btree node onto cache device, the process is, - Allocate a struct bbio from mempool c->bio_meta. - Inside struct bbio embedded a struct bio, initialize bi_inline_vecs for this embedded bio. - Call bch_bio_map() to map each meta data page to each bv from the inlined bi_io_vec table. - Call bch_submit_bbio() to submit the bio into underlying block layer. - When the I/O completed, only release the struct bbio, don't touch the reference counter of the meta data pages. The struct bbio is defined as, 738 struct bbio { 739 unsigned int submit_time_us; [snipped] 748 struct bio bio; 749 }; Because struct bio is embedded at the end of struct bbio, therefore the actual size of struct bbio is sizeof(struct bio) + size of the embedded bio->bi_inline_vecs. Now all the meta data bucket size are limited to meta_bucket_pages(), if the bucket size is large than meta_bucket_pages()*PAGE_SECTORS, rested space in the bucket is unused. Therefore the most used space in meta bucket is (1<bio_meta as, mempool_init_kmalloc_pool(&c->bio_meta, 2, sizeof(struct bbio) + sizeof(struct bio_vec) * bucket_pages(c)) It is too large, neither the Linux buddy allocator cannot allocate so much continuous pages, nor the extra allocated pages are wasted. This patch replace bucket_pages() to meta_bucket_pages() in two places, - In bch_cache_set_alloc(), when initialize mempool c->bio_meta, uses sizeof(struct bbio) + sizeof(struct bio_vec) * bucket_pages(c) to set the allocating object size. - In bch_bbio_alloc(), when calling bio_init() to set inline bvec talbe bi_inline_bvecs, uses meta_bucket_pages() to indicate number of the inline bio vencs number. Now the maximum size of embedded bio inside struct bbio exactly matches the limit of meta_bucket_pages(), no extra page wasted. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 6907dc498f79543e5a32e632135e51b960331316 Author: Coly Li Date: Sat Jul 25 20:00:37 2020 +0800 bcache: avoid extra memory allocation from mempool c->fill_iter Mempool c->fill_iter is used to allocate memory for struct btree_iter in bch_btree_node_read_done() to iterate all keys of a read-in btree node. The allocation size is defined in bch_cache_set_alloc() by, mempool_init_kmalloc_pool(&c->fill_iter, 1, iter_size)) where iter_size is defined by a calculation, (sb->bucket_size / sb->block_size + 1) * sizeof(struct btree_iter_set) For 16bit width bucket_size the calculation is OK, but now the bucket size is extended to 32bit, the bucket size can be 2GB. By the above calculation, iter_size can be 2048 pages (order 11 is still accepted by buddy allocator). But the actual size holds the bkeys in meta data bucket is limited to meta_bucket_pages() already, which is 16MB. By the above calculation, if replace sb->bucket_size by meta_bucket_pages() * PAGE_SECTORS, the result is 16 pages. This is the size large enough for the mempool allocation to struct btree_iter. Therefore in worst case every time mempool c->fill_iter allocates, at most 4080 pages are wasted and won't be used. Therefore this patch uses meta_bucket_pages() * PAGE_SECTORS to calculate the iter size in bch_cache_set_alloc(), to avoid extra memory allocation from mempool c->fill_iter. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 092bd54d69230b4a4a7f640a4cdcdeb004d3546e Author: Coly Li Date: Sat Jul 25 20:00:36 2020 +0800 bcache: add sysfs file to display feature sets information of cache set The following three sysfs files are created to display according feature set information of bcache: /sys/fs/bcache//internal/feature_compat /sys/fs/bcache//internal/feature_ro_compat /sys/fs/bcache//internal/feature_incompat is added by this patch, to display feature sets information of the cache set. Now only an incompat feature 'large_bucket' added in bcache, the sysfs file content is: [large_bucket] string large_bucket means the running bcache drive supports incompat feature 'large_bucket', the wrapping [] means the 'large_bucket' feature is currently enabled on this cache set. This patch is ready to display compat and ro_compat features, in future once bcache code implements such feature sets, the according feature strings will be displayed in their sysfs files too. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit ffa470327572b8f85dceda48fd0676d9658cb8c5 Author: Coly Li Date: Sat Jul 25 20:00:35 2020 +0800 bcache: add bucket_size_hi into struct cache_sb_disk for large bucket The large bucket feature is to extend bucket_size from 16bit to 32bit. When create cache device on zoned device (e.g. zoned NVMe SSD), making a single bucket cover one or more zones of the zoned device is the simplest way to support zoned device as cache by bcache. But current maximum bucket size is 16MB and a typical zone size of zoned device is 256MB, this is the major motiviation to extend bucket size to a larger bit width. This patch is the basic and first change to support large bucket size, the major changes it makes are, - Add BCH_FEATURE_INCOMPAT_LARGE_BUCKET for the large bucket feature, INCOMPAT means it introduces incompatible on-disk format change. - Add BCH_FEATURE_INCOMPAT_FUNCS(large_bucket, LARGE_BUCKET) routines. - Adds __le16 bucket_size_hi into struct cache_sb_disk at offset 0x8d0 for the on-disk super block format. - For the in-memory super block struct cache_sb, member bucket_size is extended from __u16 to __32. - Add get_bucket_size() to combine the bucket_size and bucket_size_hi from struct cache_sb_disk into an unsigned int value. Since we already have large bucket size helpers meta_bucket_pages(), meta_bucket_bytes() and alloc_meta_bucket_pages(), they make sure when bucket size > 8MB, the memory allocation for bcache meta data bucket won't fail no matter how large the bucket size extended. So these meta data buckets are handled properly when the bucket size width increase from 16bit to 32bit, we don't need to worry about them. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit f9c32a5a900c6a9032b064aae9a5784af9d24453 Author: Coly Li Date: Sat Jul 25 20:00:34 2020 +0800 bcache: handle btree node memory allocation properly for bucket size > 8MB Currently the bcache internal btree node occupies a whole bucket. When loading the btree node from cache device into memory, mca_data_alloc() will call bch_btree_keys_alloc() to allocate memory for the whole bucket size, ilog2(b->c->btree_pages) is send to bch_btree_keys_alloc() as the parameter 'page_order'. c->btree_pages is set as bucket_pages() in bch_cache_set_alloc(), for bucket size > 8MB, ilog2(b->c->btree_pages) is 12 for 4KB page size. By default the maximum page order __get_free_pages() accepts is MAX_ORDER (11), in this condition bch_btree_keys_alloc() will always fail. Because of other over-page-order allocation failure fails the cache device registration, such btree node allocation failure wasn't observed during runtime. After other blocking page allocation failures for bucket size > 8MB, this btree node allocation issue may trigger potentical risk e.g. infinite dead-loop to retry btree node allocation after failure. This patch fixes the potential problem by setting c->btree_pages to meta_bucket_pages() in bch_cache_set_alloc(). In the condition that bucket size > 8MB, meta_bucket_pages() will always return a number which won't exceed the maximum page order of the buddy allocator. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit bf6af17065079d29b9bd4e59de27cc2965e6fabf Author: Coly Li Date: Sat Jul 25 20:00:33 2020 +0800 bcache: handle cache set verify_ondisk properly for bucket size > 8MB In bch_btree_cache_alloc() when CONFIG_BCACHE_DEBUG is configured, allocate memory for c->verify_ondisk may fail if the bucket size > 8MB, which will require __get_free_pages() to allocate continuous pages with order > 11 (the default MAX_ORDER of Linux buddy allocator). Such over size allocation will fail, and cause 2 problems, - When CONFIG_BCACHE_DEBUG is configured, bch_btree_verify() does not work, because c->verify_ondisk is NULL and bch_btree_verify() returns immediately. - bch_btree_cache_alloc() will fail due to c->verify_ondisk allocation failed, then the whole cache device registration fails. And because of this failure, the first problem of bch_btree_verify() has no chance to be triggered. This patch fixes the above problem by two means, 1) If pages allocation of c->verify_ondisk fails, set it to NULL and returns bch_btree_cache_alloc() with -ENOMEM. 2) When calling __get_free_pages() to allocate c->verify_ondisk pages, use ilog2(meta_bucket_pages(&c->sb)) to make sure ilog2() will always generate a pages order <= MAX_ORDER (or CONFIG_FORCE_MAX_ZONEORDER). Then the buddy system won't directly reject the allocation request. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit c954ac8d6610255b2fb11a30fb9ebb206f3da48d Author: Coly Li Date: Sat Jul 25 20:00:32 2020 +0800 bcache: handle cache prio_buckets and disk_buckets properly for bucket size > 8MB Similar to c->uuids, struct cache's prio_buckets and disk_buckets also have the potential memory allocation failure during cache registration if the bucket size > 8MB. ca->prio_buckets can be stored on cache device in multiple buckets, its in-memory space is allocated by kzalloc() interface but normally allocated by alloc_pages() because the size > KMALLOC_MAX_CACHE_SIZE. So allocation of ca->prio_buckets has the MAX_ORDER restriction too. If the bucket size > 8MB, by default the page allocator will fail because the page order > 11 (default MAX_ORDER value). ca->prio_buckets should also use meta_bucket_bytes(), meta_bucket_pages() to decide its memory size and use alloc_meta_bucket_pages() to allocate pages, to avoid the allocation failure during cache set registration when bucket size > 8MB. ca->disk_buckets is a single bucket size memory buffer, it is used to iterate each bucket of ca->prio_buckets, and compose the bio based on memory of ca->disk_buckets, then write ca->disk_buckets memory to cache disk one-by-one for each bucket of ca->prio_buckets. ca->disk_buckets should have in-memory size exact to the meta_bucket_pages(), this is the size that ca->prio_buckets will be stored into each on-disk bucket. This patch fixes the above issues and handle cache's prio_buckets and disk_buckets properly for bucket size larger than 8MB. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 21e478ddb29372158746185cc75f5c8e2f4a679a Author: Coly Li Date: Sat Jul 25 20:00:31 2020 +0800 bcache: handle c->uuids properly for bucket size > 8MB Bcache allocates a whole bucket to store c->uuids on cache device, and allocates continuous pages to store it in-memory. When the bucket size exceeds maximum allocable continuous pages, bch_cache_set_alloc() will fail and cache device registration will fail. This patch allocates c->uuids by alloc_meta_bucket_pages(), and uses ilog2(meta_bucket_pages(c)) to indicate order of c->uuids pages when free it. When writing c->uuids to cache device, its size is decided by meta_bucket_pages(c) * PAGE_SECTORS. Now c->uuids is properly handled for bucket size > 8MB. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit de1fafab649f944d97e45fc043b55a3a5a371744 Author: Coly Li Date: Sat Jul 25 20:00:30 2020 +0800 bcache: introduce meta_bucket_pages() related helper routines Currently the in-memory meta data like c->uuids or c->disk_buckets are allocated by alloc_bucket_pages(). The macro alloc_bucket_pages() calls __get_free_pages() to allocated continuous pages with order indicated by ilog2(bucket_pages(c)), #define alloc_bucket_pages(gfp, c) \ ((void *) __get_free_pages(__GFP_ZERO|gfp, ilog2(bucket_pages(c)))) The maximum order is defined as MAX_ORDER, the default value is 11 (and can be overwritten by CONFIG_FORCE_MAX_ZONEORDER). In bcache code the maximum bucket size width is 16bits, this is restricted both by KEY_SIZE size and bucket_size size from struct cache_sb_disk. The maximum 16bits width and power-of-2 value is (1<<15) in unit of sector (512byte). It means the maximum value of bucket size in bytes is (1<<24) bytes a.k.a 4096 pages. When the bucket size is set to maximum permitted value, ilog2(4096) is 12, which exceeds the default maximum order __get_free_pages() can accepted, the failed pages allocation will fail cache set registration procedure and print a kernel oops message for the exceeded pages order. This patch introduces meta_bucket_pages(), meta_bucket_bytes(), and alloc_bucket_pages() helper routines. meta_bucket_pages() indicates the maximum pages can be allocated to meta data bucket, meta_bucket_bytes() indicates the according maximum bytes, and alloc_bucket_pages() does the pages allocation for meta bucket. Because meta_bucket_pages() chooses the smaller value among the bucket size and MAX_ORDER_NR_PAGES, it still works when MAX_ORDER overwritten by CONFIG_FORCE_MAX_ZONEORDER. Following patches will use these helper routines to decide maximum pages can be allocated for different meta data buckets. If the bucket size is larger than meta_bucket_bytes(), the bcache registration can continue to success, just the space more than meta_bucket_bytes() inside the bucket is wasted. Comparing bcache failed for large bucket size, wasting some space for meta data buckets is acceptable at this moment. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 4c1ccd0896d6a45f2159280d957afd441a7aeaba Author: Coly Li Date: Sat Jul 25 20:00:29 2020 +0800 bcache: struct cache_sb is only for in-memory super block now We have struct cache_sb_disk for on-disk super block already, it is unnecessary to keep the in-memory super block format exactly mapping to the on-disk struct layout. This patch adds code comments to notice that struct cache_sb is not exactly mapping to cache_sb_disk, and removes the useless member csum and pad[5]. Although struct cache_sb does not belong to uapi, but there are still some on-disk format related macros reference it and it is unncessary to get rid of such dependency now. So struct cache_sb will continue to stay in include/uapi/linux/bache.h for now. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 198efa35c526d1616e4e8b2ce5299878412e2693 Author: Coly Li Date: Sat Jul 25 20:00:28 2020 +0800 bcache: move bucket related code into read_super_common() Setting sb->first_bucket and checking sb->keys indeed are only for cache device, it does not make sense to do them in read_super() for backing device too. This patch moves the related code piece into read_super_common() explicitly for cache device and avoid the confusion. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit d721a43ff69cd473019c3b77aacb76b09102aca3 Author: Coly Li Date: Sat Jul 25 20:00:27 2020 +0800 bcache: increase super block version for cache device and backing device The new added super block version BCACHE_SB_VERSION_BDEV_WITH_FEATURES (5) BCACHE_SB_VERSION_CDEV_WITH_FEATURES value (6), is for the feature set bits. Devices have super block version equal to the new version will have three new members for feature set bits in the on-disk super block, __le64 feature_compat; __le64 feature_incompat; __le64 feature_ro_compat; They are used for further new features which may introduce on-disk format change, and avoid unncessary super block version increase. The very basic features handling code skeleton is also initialized in this patch. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 117f636ea695270fe492d0c0c9dfadc7a662af47 Author: Coly Li Date: Sat Jul 25 20:00:26 2020 +0800 bcache: fix super block seq numbers comparision in register_cache_set() In register_cache_set(), c is pointer to struct cache_set, and ca is pointer to struct cache, if ca->sb.seq > c->sb.seq, it means this registering cache has up to date version and other members, the in- memory version and other members should be updated to the newer value. But current implementation makes a cache set only has a single cache device, so the above assumption works well except for a special case. The execption is when a cache device new created and both ca->sb.seq and c->sb.seq are 0, because the super block is never flushed out yet. In the location for the following if() check, 2156 if (ca->sb.seq > c->sb.seq) { 2157 c->sb.version = ca->sb.version; 2158 memcpy(c->sb.set_uuid, ca->sb.set_uuid, 16); 2159 c->sb.flags = ca->sb.flags; 2160 c->sb.seq = ca->sb.seq; 2161 pr_debug("set version = %llu\n", c->sb.version); 2162 } c->sb.version is not initialized yet and valued 0. When ca->sb.seq is 0, the if() check will fail (because both values are 0), and the cache set version, set_uuid, flags and seq won't be updated. The above problem is hiden for current code, because the bucket size is compatible among different super block version. And the next time when running cache set again, ca->sb.seq will be larger than 0 and cache set super block version will be updated properly. But if the large bucket feature is enabled, sb->bucket_size is the low 16bits of the bucket size. For a power of 2 value, when the actual bucket size exceeds 16bit width, sb->bucket_size will always be 0. Then read_super_common() will fail because the if() check to is_power_of_2(sb->bucket_size) is false. This is how the long time hidden bug is triggered. This patch modifies the if() check to the following way, 2156 if (ca->sb.seq > c->sb.seq || c->sb.seq == 0) { Then cache set's version, set_uuid, flags and seq will always be updated corectly including for a new created cache device. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit a42d3c642cf9582e5bb633e32a07c7aff61d5311 Author: Coly Li Date: Sat Jul 25 20:00:25 2020 +0800 bcache: disassemble the big if() checks in bch_cache_set_alloc() In bch_cache_set_alloc() there is a big if() checks combined by 11 items together. When this big if() statement fails, it is difficult to tell exactly which item fails indeed. This patch disassembles this big if() checks into 11 single if() checks, which makes code debug more easier. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit c557a5f7bb2558f1386038549c289d7a20c78730 Author: Coly Li Date: Sat Jul 25 20:00:24 2020 +0800 bcache: add more accurate error information in read_super_common() The improperly set bucket or block size will trigger error in read_super_common(). For large bucket size, a more accurate error message for invalid bucket or block size is necessary. This patch disassembles the combined if() checks into multiple single if() check, and provide more accurate error message for each check failure condition. Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Signed-off-by: Jens Axboe commit 5b21403c7f48b7d2312b302ab9e8468ec2c711a3 Author: Coly Li Date: Sat Jul 25 20:00:23 2020 +0800 bcache: add read_super_common() to read major part of super block Later patches will introduce feature set bits to on-disk super block and increase super block version. Current code in read_super() which reads common part of super block for version BCACHE_SB_VERSION_CDEV and version BCACHE_SB_VERSION_CDEV_WITH_UUID will be shared with the new version. Therefore this patch moves the reusable part into read_super_common(), this preparation patch will make later patches more simplier and only focus on new feature set bits. Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 7a1481267999c02abf4a624515c1b5c7c1fccbd6 Author: Coly Li Date: Sat Jul 25 20:00:22 2020 +0800 bcache: fix overflow in offset_to_stripe() offset_to_stripe() returns the stripe number (in type unsigned int) from an offset (in type uint64_t) by the following calculation, do_div(offset, d->stripe_size); For large capacity backing device (e.g. 18TB) with small stripe size (e.g. 4KB), the result is 4831838208 and exceeds UINT_MAX. The actual returned value which caller receives is 536870912, due to the overflow. Indeed in bcache_device_init(), bcache_device->nr_stripes is limited in range [1, INT_MAX]. Therefore all valid stripe numbers in bcache are in range [0, bcache_dev->nr_stripes - 1]. This patch adds a upper limition check in offset_to_stripe(): the max valid stripe number should be less than bcache_device->nr_stripes. If the calculated stripe number from do_div() is equal to or larger than bcache_device->nr_stripe, -EINVAL will be returned. (Normally nr_stripes is less than INT_MAX, exceeding upper limitation doesn't mean overflow, therefore -EOVERFLOW is not used as error code.) This patch also changes nr_stripes' type of struct bcache_device from 'unsigned int' to 'int', and return value type of offset_to_stripe() from 'unsigned int' to 'int', to match their exact data ranges. All locations where bcache_device->nr_stripes and offset_to_stripe() are referenced also get updated for the above type change. Reported-and-tested-by: Ken Raeburn Signed-off-by: Coly Li Cc: stable@vger.kernel.org Link: https://bugzilla.redhat.com/show_bug.cgi?id=1783075 Signed-off-by: Jens Axboe commit 65f0f017e7be8c70330372df23bcb2a407ecf02d Author: Coly Li Date: Sat Jul 25 20:00:21 2020 +0800 bcache: avoid nr_stripes overflow in bcache_device_init() For some block devices which large capacity (e.g. 8TB) but small io_opt size (e.g. 8 sectors), in bcache_device_init() the stripes number calcu- lated by, DIV_ROUND_UP_ULL(sectors, d->stripe_size); might be overflow to the unsigned int bcache_device->nr_stripes. This patch uses the uint64_t variable to store DIV_ROUND_UP_ULL() and after the value is checked to be available in unsigned int range, sets it to bache_device->nr_stripes. Then the overflow is avoided. Reported-and-tested-by: Ken Raeburn Signed-off-by: Coly Li Cc: stable@vger.kernel.org Link: https://bugzilla.redhat.com/show_bug.cgi?id=1783075 Signed-off-by: Jens Axboe commit 29f1d5caced9c2db96f169422bade787ff45d584 Author: Gustavo A. R. Silva Date: Sat Jul 25 20:00:20 2020 +0800 bcache: Use struct_size() in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 6706ad56436c9d54c9e5812aabe25186b43b4199 Author: Gustavo A. R. Silva Date: Sat Jul 25 20:00:19 2020 +0800 bcache: movinggc: Use struct_size() helper in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 7236657c6b3abf25f8b0a2465cd8f51728d0196b Author: Xu Wang Date: Sat Jul 25 20:00:18 2020 +0800 bcache: writeback: Remove unneeded variable i Remove unneeded variable i in bch_dirty_init_thread(). Signed-off-by: Xu Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit ef4eeb855f741586ed120d3f08ed53bb0968244e Author: Xu Wang Date: Sat Jul 25 20:00:17 2020 +0800 bcache: journel: use for_each_clear_bit() to simplify the code Using for_each_clear_bit() to simplify the code. Signed-off-by: Xu Wang Signed-off-by: Coly Li Signed-off-by: Jens Axboe commit 5fe48867856367142d91a82f2cbf7a57a24cbb70 Author: Coly Li Date: Sat Jul 25 20:00:16 2020 +0800 bcache: allocate meta data pages as compound pages There are some meta data of bcache are allocated by multiple pages, and they are used as bio bv_page for I/Os to the cache device. for example cache_set->uuids, cache->disk_buckets, journal_write->data, bset_tree->data. For such meta data memory, all the allocated pages should be treated as a single memory block. Then the memory management and underlying I/O code can treat them more clearly. This patch adds __GFP_COMP flag to all the location allocating >0 order pages for the above mentioned meta data. Then their pages are treated as compound pages now. Signed-off-by: Coly Li Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe commit 6acd193b2654a9ccdeb18a51f1348c17b97e1d78 Author: Jean Delvare Date: Sat Jul 25 20:00:15 2020 +0800 bcache: Fix typo in Kconfig name registraion -> registration Fixes: 0c8d3fceade2 ("bcache: configure the asynchronous registertion to be experimental") Signed-off-by: Jean Delvare Reviewed-by: Coly Li Cc: Jens Axboe Cc: Kent Overstreet Signed-off-by: Jens Axboe commit 58b1d3f864b1f32521d60642e240face22e9ee68 Author: Alexander A. Klimov Date: Tue Jul 21 20:35:45 2020 +0200 staging: comedi: addi: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200721183545.67500-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 411adf23ceab9d570b61696f7c9516b3599c4862 Author: Alexander A. Klimov Date: Tue Jul 21 20:46:13 2020 +0200 staging: comedi: amplc: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200721184613.67596-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit a5dfb77533484026a8452dc9418784636131e14d Author: Alexander A. Klimov Date: Tue Jul 21 20:56:33 2020 +0200 staging: comedi: das: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200721185633.67671-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit f8cdbd4f4dd5b72b7e448849e63d041994d89fff Author: Alexander A. Klimov Date: Tue Jul 21 21:06:53 2020 +0200 staging: comedi: dt: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200721190653.67751-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 3659743d481f67453ca409f4502f3b51dbf1c3e1 Author: Alexander A. Klimov Date: Tue Jul 21 21:17:29 2020 +0200 staging: comedi: ni: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200721191729.67847-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 2c183944ac857e1a0b02678e9784aca9e5e1cadd Author: Alexander A. Klimov Date: Tue Jul 21 21:27:50 2020 +0200 staging: comedi: pcl: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200721192750.67925-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit e3913b6e062d6e653e83faa91efd1830380e66ba Author: Alexander A. Klimov Date: Tue Jul 21 21:38:06 2020 +0200 staging: comedi: pcm: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200721193806.68010-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit a5fc6f6d39a642444ce703cc616ea1ada522d486 Author: Alexander A. Klimov Date: Thu Jul 23 21:08:13 2020 +0200 staging: comedi: adl: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200723190813.71971-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit d761e90e6ab0f414321079a1f8e3d4912d731651 Author: Alexander A. Klimov Date: Thu Jul 23 21:18:27 2020 +0200 staging: comedi: adv: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200723191827.72047-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 28ce4c5b1930080b74ae52504f3a4756e5a7a968 Author: Alexander A. Klimov Date: Thu Jul 23 21:28:42 2020 +0200 staging: comedi: cb: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200723192842.72124-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 13d8b1f3c032462cdda0906978f9fb74ae41f80a Author: Alexander A. Klimov Date: Thu Jul 23 21:40:53 2020 +0200 staging: comedi: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200723194053.72227-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit d8cc6b5664b40b10bd2896f0bbbfe451a02c8457 Author: Anant Thazhemadam Date: Sat Jul 25 17:50:38 2020 +0530 STAGING - REALTEK RTL8188EU DRIVERS: Fix Coding Style Error Running the checkpatch.pl script on the file for which patch was created, the following error was found to exist. ERROR: space required after that ',' (ctx:VxV) Fixed the above error which was found on line #721 by inserting a blank space at the appropriate position. Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20200725122041.5663-1-anant.thazhemadam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3aae57f0c3ba57715cf89201b5a5f290684078a5 Author: Fenghua Yu Date: Fri Jul 24 16:45:20 2020 -0700 x86/split_lock: Enable the split lock feature on Sapphire Rapids and Alder Lake CPUs Add Sapphire Rapids and Alder Lake processors to CPU list to enumerate and enable the split lock feature. Signed-off-by: Fenghua Yu Signed-off-by: Ingo Molnar Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/1595634320-79689-1-git-send-email-fenghua.yu@intel.com commit e00b62f0b06d0ae2b844049f216807617aff0cdb Author: Tony Luck Date: Mon Jul 20 21:37:49 2020 -0700 x86/cpu: Add Lakefield, Alder Lake and Rocket Lake models to the to Intel CPU family Add three new Intel CPU models. Signed-off-by: Tony Luck Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200721043749.31567-1-tony.luck@intel.com commit fb4405ae6e1c66277b7d69d2c7a34215671da585 Merge: c9a1ff316bc9b ba47d845d715a Author: Ingo Molnar Date: Sat Jul 25 12:16:16 2020 +0200 Merge tag 'v5.8-rc6' into x86/cpu, to refresh the branch before adding new commits Signed-off-by: Ingo Molnar commit 13efa616124f7eec7d6a58adeeef31864aa03879 Author: Qinglang Miao Date: Sat Jul 25 16:56:29 2020 +0800 sched/uclamp: Remove unnecessary mutex_init() The uclamp_mutex lock is initialized statically via DEFINE_MUTEX(), it is unnecessary to initialize it runtime via mutex_init(). Signed-off-by: Qinglang Miao Signed-off-by: Ingo Molnar Cc: Patrick Bellasi Cc: Peter Zijlstra Cc: Vincent Guittot Cc: Dietmar Eggemann Link: https://lore.kernel.org/r/20200725085629.98292-1-miaoqinglang@huawei.com commit 4fb60b158afd3ac9e0fe9975aa476213f5cc0a4d Author: Kees Cook Date: Fri Jul 24 14:36:24 2020 -0700 firmware_loader: EFI firmware loader must handle pre-allocated buffer The EFI platform firmware fallback would clobber any pre-allocated buffers. Instead, correctly refuse to reallocate when too small (as already done in the sysfs fallback), or perform allocation normally when needed. Fixes: e4c2c0ff00ec ("firmware: Add new platform fallback mechanism and firmware_request_platform()") Cc: stable@vger.kernel.org Acked-by: Scott Branden Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200724213640.389191-4-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 4505e2154e8f3896da5ba63818082746b3026c59 Author: Kees Cook Date: Fri Jul 24 14:36:23 2020 -0700 selftest/firmware: Add selftest timeout in settings The firmware tests would always time out for me. Add a correct timeout, including details on how the value was reached. Additionally allow the test harness to skip comments in settings files and report how long a given timeout was. Reviewed-by: SeongJae Park Acked-by: Scott Branden Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200724213640.389191-3-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 2d38dbf89a06d0f689daec9842c5d3295c49777f Author: Kees Cook Date: Fri Jul 24 14:36:22 2020 -0700 test_firmware: Test platform fw loading on non-EFI systems On non-EFI systems, it wasn't possible to test the platform firmware loader because it will have never set "checked_fw" during __init. Instead, allow the test code to override this check. Additionally split the declarations into a private header file so it there is greater enforcement of the symbol visibility. Fixes: 548193cba2a7 ("test_firmware: add support for firmware_request_platform") Cc: stable@vger.kernel.org Acked-by: Scott Branden Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200724213640.389191-2-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 1d0e12fd3a848199f973d42677cde423b76cafaf Author: Ingo Molnar Date: Fri Jul 24 15:06:38 2020 +0200 x86/defconfigs: Refresh defconfig files Perform a 'make savedefconfig' pass over our main defconfig files, which keeps the defconfig result the same, but compresses the file where defaults were changed, options removed or reordered. Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200724130638.645844-2-mingo@kernel.org commit 4b8e0328e56e177663645a96ea4c5c0401ecd78f Author: Ingo Molnar Date: Fri Jul 24 13:44:18 2020 +0200 x86/mm: Remove the unused mk_kernel_pgd() #define AFAICS the last uses of directly 'making' kernel PGDs was removed 7 years ago: 8b78c21d72d9: ("x86, 64bit, mm: hibernate use generic mapping_init") Where the explicit PGD walking loop was replaced with kernel_ident_mapping_init() calls. This was then (unnecessarily) carried over through the 5-level paging conversion. Also clean up the 'level' comments a bit, to convey the original, meanwhile somewhat bit-rotten notion, that these are empty comment blocks with no methods to handle any of the levels except the PTE level. Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200724114418.629021-4-mingo@kernel.org commit 161449bad5053d66f2310744ba8498158ab12c89 Author: Ingo Molnar Date: Fri Jul 24 13:44:17 2020 +0200 x86/tsc: Remove unused "US_SCALE" and "NS_SCALE" leftover macros Last use of them was removed 13 years ago, when the code was converted to use CYC2NS_SCALE_FACTOR: 53d517cdbaac: ("x86: scale cyc_2_nsec according to CPU frequency") The current TSC code uses the 'struct cyc2ns_data' scaling abstraction, the old fixed scaling approach is long gone. This cleanup also removes the 'arbitralrily' typo from the comment, so win-win. ;-) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200724114418.629021-3-mingo@kernel.org commit 8cd591aeb1d650f79a49d8704c35a78bf18f5de9 Author: Ingo Molnar Date: Fri Jul 24 13:44:16 2020 +0200 x86/ioapic: Remove unused "IOAPIC_AUTO" define Last use was removed more than 5 years ago, in: 5ad274d41c1b: ("x86/irq: Remove unused old IOAPIC irqdomain interfaces") Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200724114418.629021-2-mingo@kernel.org commit dfecd3e00cd32b2a6d1cfdb30b513dd42575ada3 Merge: 9b964f1654616 1baf0fac10fbe Author: David S. Miller Date: Fri Jul 24 20:03:28 2020 -0700 Merge branch 'net-dsa-mv88e6xxx-port-mtu-support' Chris Packham says: ==================== net: dsa: mv88e6xxx: port mtu support This series connects up the mv88e6xxx switches to the dsa infrastructure for configuring the port MTU. The first patch is also a bug fix which might be a candiatate for stable. I've rebased this series on top of net-next/master to pick up Andrew's change for the gigabit switches. Patch 1 and 2 are unchanged (aside from adding Andrew's Reviewed-by). Patch 3 is reworked to make use of the existing mtu support. ==================== Signed-off-by: David S. Miller commit 1baf0fac10fbe3084975d7cb0a4378eb18871482 Author: Chris Packham Date: Fri Jul 24 11:21:22 2020 +1200 net: dsa: mv88e6xxx: Use chip-wide max frame size for MTU Some of the chips in the mv88e6xxx family don't support jumbo configuration per port. But they do have a chip-wide max frame size that can be used. Use this to approximate the behaviour of configuring a port based MTU. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e8b34c67d6c10ee3f187469958af3fb36c9c3361 Author: Chris Packham Date: Fri Jul 24 11:21:21 2020 +1200 net: dsa: mv88e6xxx: Support jumbo configuration on 6190/6190X The MV88E6190 and MV88E6190X both support per port jumbo configuration just like the other GE switches. Install the appropriate ops. Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0f3c66a3c7b4e8b9f654b3c998e9674376a51b0f Author: Chris Packham Date: Fri Jul 24 11:21:20 2020 +1200 net: dsa: mv88e6xxx: MV88E6097 does not support jumbo configuration The MV88E6097 chip does not support configuring jumbo frames. Prior to commit 5f4366660d65 only the 6352, 6351, 6165 and 6320 chips configured jumbo mode. The refactor accidentally added the function for the 6097. Remove the erroneous function pointer assignment. Fixes: 5f4366660d65 ("net: dsa: mv88e6xxx: Refactor setting of jumbo frames") Signed-off-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 6eaa862747eadbec42600031c93e6e52a2d1edda Author: Lee Jones Date: Tue Jul 21 17:41:47 2020 +0100 scsi: mvsas: Move 'core_nr' inside #ifdef and remove unused variable 'res_flag' Only declare 'core_nr' if its conditions for use are met. Fixes the following W=1 kernel build warning(s): drivers/scsi/mvsas/mv_init.c: In function ‘mvs_interrupt’: drivers/scsi/mvsas/mv_init.c:180:6: warning: variable ‘core_nr’ set but not used [-Wunused-but-set-variable] drivers/scsi/mvsas/mv_init.c: In function ‘mvs_ioremap’: drivers/scsi/mvsas/mv_init.c:302:36: warning: variable ‘res_flag’ set but not used [-Wunused-but-set-variable] [mkp: applied follow-up fixup patch] Link: https://lore.kernel.org/r/20200721164148.2617584-40-lee.jones@linaro.org Cc: Jason Yan Cc: Marvell Cc: Jeff Garzik Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e3903d31826fc1732bc5745fb9a8686bfa49444f Author: Lee Jones Date: Thu Jul 23 13:24:46 2020 +0100 scsi: esas2r: Demote a few non-conformant kerneldoc headers Fixes the following W=1 kernel build warning(s): drivers/scsi/esas2r/esas2r_log.c:86: warning: Function parameter or member 'level' not described in 'translate_esas2r_event_level_to_kernel' drivers/scsi/esas2r/esas2r_log.c:120: warning: Function parameter or member 'level' not described in 'esas2r_log_master' drivers/scsi/esas2r/esas2r_log.c:120: warning: Function parameter or member 'dev' not described in 'esas2r_log_master' drivers/scsi/esas2r/esas2r_log.c:120: warning: Function parameter or member 'format' not described in 'esas2r_log_master' drivers/scsi/esas2r/esas2r_log.c:120: warning: Function parameter or member 'args' not described in 'esas2r_log_master' drivers/scsi/esas2r/esas2r_log.c:183: warning: Function parameter or member 'level' not described in 'esas2r_log' drivers/scsi/esas2r/esas2r_log.c:183: warning: Function parameter or member 'format' not described in 'esas2r_log' drivers/scsi/esas2r/esas2r_log.c:211: warning: Function parameter or member 'level' not described in 'esas2r_log_dev' drivers/scsi/esas2r/esas2r_log.c:211: warning: Function parameter or member 'dev' not described in 'esas2r_log_dev' drivers/scsi/esas2r/esas2r_log.c:211: warning: Function parameter or member 'format' not described in 'esas2r_log_dev' drivers/scsi/esas2r/esas2r_log.c:237: warning: Function parameter or member 'level' not described in 'esas2r_log_hexdump' drivers/scsi/esas2r/esas2r_log.c:237: warning: Function parameter or member 'buf' not described in 'esas2r_log_hexdump' drivers/scsi/esas2r/esas2r_log.c:237: warning: Function parameter or member 'len' not described in 'esas2r_log_hexdump' Link: https://lore.kernel.org/r/20200723122446.1329773-41-lee.jones@linaro.org Cc: Bradley Grove Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a8b6d0ee6e9ecd58224191bcd0c63975f3bc0809 Author: Lee Jones Date: Thu Jul 23 13:24:45 2020 +0100 scsi: bnx2i: Add parameter description and rename another Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2i/bnx2i_iscsi.c:1288: warning: Function parameter or member 'cmds_max' not described in 'bnx2i_session_create' drivers/scsi/bnx2i/bnx2i_iscsi.c:2176: warning: Function parameter or member 'params' not described in 'bnx2i_nl_set_path' drivers/scsi/bnx2i/bnx2i_iscsi.c:2176: warning: Excess function parameter 'buf' description in 'bnx2i_nl_set_path' Link: https://lore.kernel.org/r/20200723122446.1329773-40-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Cc: Anil Veerabhadrappa Cc: Eddie Wai Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 64332c13d0d130a0e95d1eeb8df20a9ca7887534 Author: Lee Jones Date: Thu Jul 23 13:24:44 2020 +0100 scsi: bfa: Ensure a blank line precedes next function/header Fixes the following checkpatch warning: CHECK: Please use a blank line after function/struct/union/enum declarations #129: FILE: drivers/scsi/bfa/bfa_ioc.c:6913: } +/* Link: https://lore.kernel.org/r/20200723122446.1329773-39-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 010f7c2ab4ad8e17d0a4f3b12b74076c8bddd0c2 Author: Lee Jones Date: Thu Jul 23 13:24:43 2020 +0100 scsi: qedi: Staticify non-external function 'qedi_get_iscsi_error' Fixes the following W=1 kernel build warning(s): drivers/scsi/qedi/qedi_iscsi.c:1549:7: warning: no previous prototype for ‘qedi_get_iscsi_error’ [-Wmissing-prototypes] Link: https://lore.kernel.org/r/20200723122446.1329773-38-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3db05fed8b5825937233aeeb3cb57ab84b1d41c6 Author: Lee Jones Date: Thu Jul 23 13:24:42 2020 +0100 scsi: qedi: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the source file and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/scsi/qedi/qedi_main.c:1969: warning: Function parameter or member 'qedi' not described in 'qedi_get_nvram_block' Link: https://lore.kernel.org/r/20200723122446.1329773-37-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 20e73cb1d03cbb131799e7e5b6abb7b0359e81b2 Author: Lee Jones Date: Thu Jul 23 13:24:41 2020 +0100 scsi: bfa: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the source file and no descriptions are provided. Also demote standard comment. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_svc.c:3847: warning: Function parameter or member 'bfa' not described in 'bfa_fcport_get_cfg_topology' Link: https://lore.kernel.org/r/20200723122446.1329773-36-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 310531ffc3c87e9de0bad35094becc3ffb1c9585 Author: Lee Jones Date: Thu Jul 23 13:24:40 2020 +0100 scsi: bfa: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the source file and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_core.c:1245: warning: Function parameter or member 'bfa' not described in 'bfa_iocfc_qreg' drivers/scsi/bfa/bfa_core.c:1245: warning: Function parameter or member 'qreg' not described in 'bfa_iocfc_qreg' Link: https://lore.kernel.org/r/20200723122446.1329773-35-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit b1a187f2615a3fb4b832163903db0d92f367da07 Author: Lee Jones Date: Thu Jul 23 13:24:39 2020 +0100 scsi: bfa: Demote non-kerneldoc headers down to standard comment blocks This is probably historical (Doxygen?). Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_ioc.c:6646: warning: Cannot understand * @brief hardware error definition drivers/scsi/bfa/bfa_ioc.c:6661: warning: Cannot understand * @brief flash command register data structure drivers/scsi/bfa/bfa_ioc.c:6685: warning: Cannot understand * @brief flash device status register data structure drivers/scsi/bfa/bfa_ioc.c:6711: warning: Cannot understand * @brief flash address register data structure drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'pci_bar' not described in 'bfa_flash_set_cmd' drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'wr_cnt' not described in 'bfa_flash_set_cmd' drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'rd_cnt' not described in 'bfa_flash_set_cmd' drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'ad_cnt' not described in 'bfa_flash_set_cmd' drivers/scsi/bfa/bfa_ioc.c:6732: warning: Function parameter or member 'op' not described in 'bfa_flash_set_cmd' drivers/scsi/bfa/bfa_ioc.c:6768: warning: Cannot understand * @brief drivers/scsi/bfa/bfa_ioc.c:6807: warning: Cannot understand * @brief drivers/scsi/bfa/bfa_ioc.c:6852: warning: Cannot understand * @brief drivers/scsi/bfa/bfa_ioc.c:6898: warning: Cannot understand * @brief drivers/scsi/bfa/bfa_ioc.c:6914: warning: Cannot understand * @brief drivers/scsi/bfa/bfa_ioc.c:6940: warning: Cannot understand * @brief Link: https://lore.kernel.org/r/20200723122446.1329773-34-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e36e0427a46a95961238115efe450b2399a6cc9b Author: Lee Jones Date: Thu Jul 23 13:24:38 2020 +0100 scsi: esas2r: Add braces around the one-line if() In certain configurations esas2r_bugon() is sometimes NULLed by the compiler. Fixes the following W=1 kernel build warning(s): In file included from drivers/scsi/esas2r/esas2r_log.c:44: drivers/scsi/esas2r/esas2r.h: In function ‘esas2r_rq_init_request’: drivers/scsi/esas2r/esas2r.h:1229:17: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 1229 | esas2r_bugon(); | ^ NB: Lots of these - snipped for brevity Link: https://lore.kernel.org/r/20200723122446.1329773-33-lee.jones@linaro.org Cc: Bradley Grove Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 56d244fe89c972ebb8dcf40175d8fdd8cfa25743 Author: Lee Jones Date: Thu Jul 23 13:24:37 2020 +0100 scsi: qedi: Remove set but unused variable 'tmp' Fixes the following W=1 kernel build warning(s): drivers/scsi/qedi/qedi_fw.c: In function ‘qedi_put_rq_bdq_buf’: drivers/scsi/qedi/qedi_fw.c:355:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200723122446.1329773-32-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit c4b68559edf5849973686bc95c0df11433a147b7 Author: Lee Jones Date: Thu Jul 23 13:24:36 2020 +0100 scsi: be2iscsi: Correct misdocumentation of function param 'ep' Fixes the following W=1 kernel build warning(s): drivers/scsi/be2iscsi/be_iscsi.c:1042: warning: Function parameter or member 'ep' not described in 'beiscsi_open_conn' drivers/scsi/be2iscsi/be_iscsi.c:1042: warning: Excess function parameter 'beiscsi_ep' description in 'beiscsi_open_conn' Link: https://lore.kernel.org/r/20200723122446.1329773-31-lee.jones@linaro.org Cc: Subbu Seetharaman Cc: Ketan Mukadam Cc: Jitendra Bhivare Cc: linux-drivers@broadcom.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 89c19a8e5ec34ee26c02ff76ee3a50530d5bb6bd Author: Lee Jones Date: Thu Jul 23 13:24:35 2020 +0100 scsi: bnx2i: Add, remove and edit some function parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2i/bnx2i_iscsi.c:241: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_bind_conn_to_iscsi_cid' drivers/scsi/bnx2i/bnx2i_iscsi.c:241: warning: Excess function parameter 'conn' description in 'bnx2i_bind_conn_to_iscsi_cid' drivers/scsi/bnx2i/bnx2i_iscsi.c:470: warning: Excess function parameter 'cmd' description in 'bnx2i_destroy_cmd_pool' drivers/scsi/bnx2i/bnx2i_iscsi.c:595: warning: Function parameter or member 'cls_session' not described in 'bnx2i_drop_session' drivers/scsi/bnx2i/bnx2i_iscsi.c:595: warning: Excess function parameter 'hba' description in 'bnx2i_drop_session' drivers/scsi/bnx2i/bnx2i_iscsi.c:595: warning: Excess function parameter 'session' description in 'bnx2i_drop_session' drivers/scsi/bnx2i/bnx2i_iscsi.c:1290: warning: Function parameter or member 'ep' not described in 'bnx2i_session_create' drivers/scsi/bnx2i/bnx2i_iscsi.c:1979: warning: Function parameter or member 'bnx2i_ep' not described in 'bnx2i_ep_tcp_conn_active' drivers/scsi/bnx2i/bnx2i_iscsi.c:1979: warning: Excess function parameter 'ep' description in 'bnx2i_ep_tcp_conn_active' drivers/scsi/bnx2i/bnx2i_iscsi.c:2178: warning: Function parameter or member 'shost' not described in 'bnx2i_nl_set_path' drivers/scsi/bnx2i/bnx2i_iscsi.c:2178: warning: Function parameter or member 'params' not described in 'bnx2i_nl_set_path' drivers/scsi/bnx2i/bnx2i_iscsi.c:2178: warning: Excess function parameter 'buf' description in 'bnx2i_nl_set_path' Link: https://lore.kernel.org/r/20200723122446.1329773-30-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Cc: Anil Veerabhadrappa Cc: Eddie Wai Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit dd3273c9b10f6998899539c29feb997dd6d2d7fa Author: Lee Jones Date: Thu Jul 23 13:24:34 2020 +0100 scsi: bnx2i: Fix a whole host of kerneldoc issues Mainly renames and docrot issues. Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2i/bnx2i_hwi.c:194: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_get_rq_buf' drivers/scsi/bnx2i/bnx2i_hwi.c:194: warning: Excess function parameter 'conn' description in 'bnx2i_get_rq_buf' drivers/scsi/bnx2i/bnx2i_hwi.c:232: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_put_rq_buf' drivers/scsi/bnx2i/bnx2i_hwi.c:232: warning: Excess function parameter 'conn' description in 'bnx2i_put_rq_buf' drivers/scsi/bnx2i/bnx2i_hwi.c:269: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_ring_sq_dbell' drivers/scsi/bnx2i/bnx2i_hwi.c:269: warning: Excess function parameter 'conn' description in 'bnx2i_ring_sq_dbell' drivers/scsi/bnx2i/bnx2i_hwi.c:293: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_ring_dbell_update_sq_params' drivers/scsi/bnx2i/bnx2i_hwi.c:293: warning: Excess function parameter 'conn' description in 'bnx2i_ring_dbell_update_sq_params' drivers/scsi/bnx2i/bnx2i_hwi.c:331: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_send_iscsi_login' drivers/scsi/bnx2i/bnx2i_hwi.c:331: warning: Function parameter or member 'task' not described in 'bnx2i_send_iscsi_login' drivers/scsi/bnx2i/bnx2i_hwi.c:331: warning: Excess function parameter 'conn' description in 'bnx2i_send_iscsi_login' drivers/scsi/bnx2i/bnx2i_hwi.c:331: warning: Excess function parameter 'cmd' description in 'bnx2i_send_iscsi_login' drivers/scsi/bnx2i/bnx2i_hwi.c:384: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_send_iscsi_tmf' drivers/scsi/bnx2i/bnx2i_hwi.c:384: warning: Excess function parameter 'conn' description in 'bnx2i_send_iscsi_tmf' drivers/scsi/bnx2i/bnx2i_hwi.c:458: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_send_iscsi_text' drivers/scsi/bnx2i/bnx2i_hwi.c:458: warning: Excess function parameter 'conn' description in 'bnx2i_send_iscsi_text' drivers/scsi/bnx2i/bnx2i_hwi.c:506: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_send_iscsi_scsicmd' drivers/scsi/bnx2i/bnx2i_hwi.c:506: warning: Excess function parameter 'conn' description in 'bnx2i_send_iscsi_scsicmd' drivers/scsi/bnx2i/bnx2i_hwi.c:533: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_send_iscsi_nopout' drivers/scsi/bnx2i/bnx2i_hwi.c:533: warning: Function parameter or member 'task' not described in 'bnx2i_send_iscsi_nopout' drivers/scsi/bnx2i/bnx2i_hwi.c:533: warning: Excess function parameter 'conn' description in 'bnx2i_send_iscsi_nopout' drivers/scsi/bnx2i/bnx2i_hwi.c:533: warning: Excess function parameter 'cmd' description in 'bnx2i_send_iscsi_nopout' drivers/scsi/bnx2i/bnx2i_hwi.c:590: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_send_iscsi_logout' drivers/scsi/bnx2i/bnx2i_hwi.c:590: warning: Function parameter or member 'task' not described in 'bnx2i_send_iscsi_logout' drivers/scsi/bnx2i/bnx2i_hwi.c:590: warning: Excess function parameter 'conn' description in 'bnx2i_send_iscsi_logout' drivers/scsi/bnx2i/bnx2i_hwi.c:590: warning: Excess function parameter 'cmd' description in 'bnx2i_send_iscsi_logout' drivers/scsi/bnx2i/bnx2i_hwi.c:686: warning: Function parameter or member 't' not described in 'bnx2i_ep_ofld_timer' drivers/scsi/bnx2i/bnx2i_hwi.c:686: warning: Excess function parameter 'data' description in 'bnx2i_ep_ofld_timer' drivers/scsi/bnx2i/bnx2i_hwi.c:1672: warning: Function parameter or member 'bnx2i_conn' not described in 'bnx2i_unsol_pdu_adjust_rq' drivers/scsi/bnx2i/bnx2i_hwi.c:1672: warning: Excess function parameter 'conn' description in 'bnx2i_unsol_pdu_adjust_rq' drivers/scsi/bnx2i/bnx2i_hwi.c:1900: warning: Function parameter or member 'session' not described in 'bnx2i_queue_scsi_cmd_resp' drivers/scsi/bnx2i/bnx2i_hwi.c:1900: warning: Function parameter or member 'cqe' not described in 'bnx2i_queue_scsi_cmd_resp' drivers/scsi/bnx2i/bnx2i_hwi.c:2476: warning: Function parameter or member 'context' not described in 'bnx2i_indicate_kcqe' drivers/scsi/bnx2i/bnx2i_hwi.c:2476: warning: Function parameter or member 'kcqe' not described in 'bnx2i_indicate_kcqe' drivers/scsi/bnx2i/bnx2i_hwi.c:2476: warning: Function parameter or member 'num_cqe' not described in 'bnx2i_indicate_kcqe' drivers/scsi/bnx2i/bnx2i_hwi.c:2476: warning: Excess function parameter 'hba' description in 'bnx2i_indicate_kcqe' drivers/scsi/bnx2i/bnx2i_hwi.c:2476: warning: Excess function parameter 'update_kcqe' description in 'bnx2i_indicate_kcqe' drivers/scsi/bnx2i/bnx2i_hwi.c:2624: warning: Function parameter or member 'cm_sk' not described in 'bnx2i_cm_remote_close' drivers/scsi/bnx2i/bnx2i_hwi.c:2624: warning: Excess function parameter 'hba' description in 'bnx2i_cm_remote_close' drivers/scsi/bnx2i/bnx2i_hwi.c:2624: warning: Excess function parameter 'update_kcqe' description in 'bnx2i_cm_remote_close' drivers/scsi/bnx2i/bnx2i_hwi.c:2641: warning: Function parameter or member 'cm_sk' not described in 'bnx2i_cm_remote_abort' drivers/scsi/bnx2i/bnx2i_hwi.c:2641: warning: Excess function parameter 'hba' description in 'bnx2i_cm_remote_abort' drivers/scsi/bnx2i/bnx2i_hwi.c:2641: warning: Excess function parameter 'update_kcqe' description in 'bnx2i_cm_remote_abort' drivers/scsi/bnx2i/bnx2i_hwi.c:2677: warning: cannot understand function prototype: 'struct cnic_ulp_ops bnx2i_cnic_cb = ' Link: https://lore.kernel.org/r/20200723122446.1329773-29-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Cc: Anil Veerabhadrappa Cc: Eddie Wai Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e95fcb77921c9b2800b10886bbe339e5d08efbf0 Author: Lee Jones Date: Thu Jul 23 13:24:33 2020 +0100 scsi: bfa: Remove unused variable 'adisc' Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_fcs_rport.c: In function ‘bfa_fcs_rport_process_adisc’: drivers/scsi/bfa/bfa_fcs_rport.c:2243:21: warning: variable ‘adisc’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200723122446.1329773-28-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit eaefa33014bfdf77299ef34263d68cb844bbef37 Author: Lee Jones Date: Thu Jul 23 13:24:31 2020 +0100 scsi: bfa: Demote non-compliant kerneldoc headers to standard comments Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_ioc_ct.c:504: warning: Function parameter or member 'ioc' not described in 'bfa_ioc_set_ctx_hwif' drivers/scsi/bfa/bfa_ioc_ct.c:504: warning: Function parameter or member 'hwif' not described in 'bfa_ioc_set_ctx_hwif' drivers/scsi/bfa/bfa_ioc_ct.c:525: warning: Function parameter or member 'ioc' not described in 'bfa_ioc_set_ct_hwif' drivers/scsi/bfa/bfa_ioc_ct.c:540: warning: Function parameter or member 'ioc' not described in 'bfa_ioc_set_ct2_hwif' Link: https://lore.kernel.org/r/20200723122446.1329773-26-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f5816509a2f227df4eab83c8c991e77e11da3c0c Author: Lee Jones Date: Thu Jul 23 13:24:30 2020 +0100 scsi: csiostor: Add missing description for csio_rnode_fwevt_handler()'s 'fwevt' param Fixes the following W=1 kernel build warning(s): drivers/scsi/csiostor/csio_rnode.c:869: warning: Function parameter or member 'fwevt' not described in 'csio_rnode_fwevt_handler' Link: https://lore.kernel.org/r/20200723122446.1329773-25-lee.jones@linaro.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 00025fc7e676bcd1a6f22fa0422cb7016f5e7448 Author: Lee Jones Date: Thu Jul 23 13:24:29 2020 +0100 scsi: bfa: Staticify non-external functions Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_ioc.c:5023:1: warning: no previous prototype for ‘bfa_diag_intr’ [-Wmissing-prototypes] 5023 | bfa_diag_intr(void *diagarg, struct bfi_mbmsg_s *msg) | ^~~~~~~~~~~~~ drivers/scsi/bfa/bfa_ioc.c:6966:1: warning: no previous prototype for ‘bfa_flash_sem_get’ [-Wmissing-prototypes] 6966 | bfa_flash_sem_get(void __iomem *bar) | ^~~~~~~~~~~~~~~~~ drivers/scsi/bfa/bfa_ioc.c:6979:1: warning: no previous prototype for ‘bfa_flash_sem_put’ [-Wmissing-prototypes] 6979 | bfa_flash_sem_put(void __iomem *bar) | ^~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200723122446.1329773-24-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f11106c93fc92c5bfb3d0f3ae25d58e20c8836c5 Author: Lee Jones Date: Thu Jul 23 13:24:28 2020 +0100 scsi: csiostor: Remove 2 unused variables {mc,edc}_bist_status_rdata_reg Fixes the following W=1 kernel build warning(s): drivers/scsi/csiostor/csio_hw_t5.c: In function ‘csio_t5_mc_read’: drivers/scsi/csiostor/csio_hw_t5.c:151:11: warning: variable ‘mc_bist_status_rdata_reg’ set but not used [-Wunused-but-set-variable] 151 | uint32_t mc_bist_status_rdata_reg, mc_bist_data_pattern_reg; | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/csiostor/csio_hw_t5.c: In function ‘csio_t5_edc_read’: drivers/scsi/csiostor/csio_hw_t5.c:199:38: warning: variable ‘edc_bist_status_rdata_reg’ set but not used [-Wunused-but-set-variable] 199 | uint32_t edc_bist_cmd_data_pattern, edc_bist_status_rdata_reg; | ^~~~~~~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200723122446.1329773-23-lee.jones@linaro.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 085d46fd22022adcce1c288611f94d7949d59ab4 Author: Lee Jones Date: Thu Jul 23 13:24:27 2020 +0100 scsi: csiostor: Mark known unused variable as __always_unused Fixes the following W=1 kernel build warning(s): drivers/scsi/csiostor/csio_hw.c: In function ‘csio_hw_get_vpd_params’: drivers/scsi/csiostor/csio_hw.c:309:8: warning: variable ‘s’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200723122446.1329773-22-lee.jones@linaro.org Cc: Arkadiusz Drabczyk Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit c7ccd038b72978810fce4117fe61d651a2e95397 Author: Lee Jones Date: Thu Jul 23 13:24:26 2020 +0100 scsi: bfa: Remove a few unused variables 'pgoff' and 't' Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_iocpf_sm_fwcheck_entry’: drivers/scsi/bfa/bfa_ioc.c:704:27: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_ioc_fwver_get’: drivers/scsi/bfa/bfa_ioc.c:1443:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_ioc_fwsig_invalidate’: drivers/scsi/bfa/bfa_ioc.c:1665:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_ioc_download_fw’: drivers/scsi/bfa/bfa_ioc.c:1866:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_diag_memtest_done’: drivers/scsi/bfa/bfa_ioc.c:4766:13: warning: variable ‘pgoff’ set but not used [-Wunused-but-set-variable] drivers/scsi/bfa/bfa_ioc.c: In function ‘bfa_flash_fifo_flush’: drivers/scsi/bfa/bfa_ioc.c:6787:6: warning: variable ‘t’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200723122446.1329773-21-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 22f8c077411b81b35af4e990d77573418556fbf4 Author: Lee Jones Date: Thu Jul 23 13:24:25 2020 +0100 scsi: lpfc: Add description for lpfc_release_rpi()'s 'ndlpl param Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_nportdisc.c:1079: warning: Function parameter or member 'ndlp' not described in 'lpfc_release_rpi' Link: https://lore.kernel.org/r/20200723122446.1329773-20-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 012d019f5a5040a52a8726e367c55b2dd08aedc7 Author: Lee Jones Date: Thu Jul 23 13:24:24 2020 +0100 scsi: lpfc: Fix a bunch of kerneldoc misdemeanors Adding, removing and correcting function parameter descriptions. Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_mbox.c:886: warning: Function parameter or member 'vport' not described in 'lpfc_reg_vpi' drivers/scsi/lpfc/lpfc_mbox.c:886: warning: Excess function parameter 'phba' description in 'lpfc_reg_vpi' drivers/scsi/lpfc/lpfc_mbox.c:886: warning: Excess function parameter 'vpi' description in 'lpfc_reg_vpi' drivers/scsi/lpfc/lpfc_mbox.c:886: warning: Excess function parameter 'sid' description in 'lpfc_reg_vpi' drivers/scsi/lpfc/lpfc_mbox.c:1218: warning: Function parameter or member 'ring' not described in 'lpfc_config_ring' drivers/scsi/lpfc/lpfc_mbox.c:1626: warning: Function parameter or member 'mboxq' not described in 'lpfc_mbox_tmo_val' drivers/scsi/lpfc/lpfc_mbox.c:1626: warning: Excess function parameter 'cmd' description in 'lpfc_mbox_tmo_val' drivers/scsi/lpfc/lpfc_mbox.c:1710: warning: Function parameter or member 'sge' not described in 'lpfc_sli4_mbx_sge_get' drivers/scsi/lpfc/lpfc_mbox.c:1780: warning: Function parameter or member 'emb' not described in 'lpfc_sli4_config' drivers/scsi/lpfc/lpfc_mbox.c:2027: warning: Function parameter or member 'mboxq' not described in 'lpfc_sli4_mbx_read_fcf_rec' drivers/scsi/lpfc/lpfc_mbox.c:2078: warning: Function parameter or member 'phba' not described in 'lpfc_request_features' Link: https://lore.kernel.org/r/20200723122446.1329773-19-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit d10d1df6301dd64397a70c0009334251736aa6d9 Author: Lee Jones Date: Thu Jul 23 13:24:23 2020 +0100 scsi: qla4xxx: Rename function parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_bsg.c:811: warning: Function parameter or member 'bsg_job' not described in 'qla4xxx_process_vendor_specific' drivers/scsi/qla4xxx/ql4_bsg.c:811: warning: Excess function parameter 'job' description in 'qla4xxx_process_vendor_specific' drivers/scsi/qla4xxx/ql4_bsg.c:858: warning: Function parameter or member 'bsg_job' not described in 'qla4xxx_bsg_request' drivers/scsi/qla4xxx/ql4_bsg.c:858: warning: Excess function parameter 'job' description in 'qla4xxx_bsg_request' Link: https://lore.kernel.org/r/20200723122446.1329773-18-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit fe614acd583f5e05a23437437c2684fdc7395e87 Author: Lee Jones Date: Thu Jul 23 13:24:22 2020 +0100 scsi: lpfc: Add and rename a whole bunch of function parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_init.c:1136: warning: Function parameter or member 't' not described in 'lpfc_hb_timeout' drivers/scsi/lpfc/lpfc_init.c:1136: warning: Excess function parameter 'ptr' description in 'lpfc_hb_timeout' drivers/scsi/lpfc/lpfc_init.c:1170: warning: Function parameter or member 't' not described in 'lpfc_rrq_timeout' drivers/scsi/lpfc/lpfc_init.c:1170: warning: Excess function parameter 'ptr' description in 'lpfc_rrq_timeout' drivers/scsi/lpfc/lpfc_init.c:1232: warning: Function parameter or member 'work' not described in 'lpfc_idle_stat_delay_work' drivers/scsi/lpfc/lpfc_init.c:1817: warning: Function parameter or member 'en_rn_msg' not described in 'lpfc_sli4_port_sta_fn_reset' drivers/scsi/lpfc/lpfc_init.c:3033: warning: Function parameter or member 'mbx_action' not described in 'lpfc_block_mgmt_io' drivers/scsi/lpfc/lpfc_init.c:3481: warning: Function parameter or member 'mbx_action' not described in 'lpfc_offline_prep' drivers/scsi/lpfc/lpfc_init.c:4150: warning: Function parameter or member 'phba' not described in 'lpfc_new_io_buf' drivers/scsi/lpfc/lpfc_init.c:4150: warning: Function parameter or member 'num_to_alloc' not described in 'lpfc_new_io_buf' drivers/scsi/lpfc/lpfc_init.c:4150: warning: Excess function parameter 'vport' description in 'lpfc_new_io_buf' drivers/scsi/lpfc/lpfc_init.c:4150: warning: Excess function parameter 'num_to_allocate' description in 'lpfc_new_io_buf' drivers/scsi/lpfc/lpfc_init.c:4736: warning: Function parameter or member 't' not described in 'lpfc_sli4_fcf_redisc_wait_tmo' drivers/scsi/lpfc/lpfc_init.c:4736: warning: Excess function parameter 'ptr' description in 'lpfc_sli4_fcf_redisc_wait_tmo' drivers/scsi/lpfc/lpfc_init.c:5103: warning: Excess function parameter 'evt_code' description in 'lpfc_async_link_speed_to_read_top' drivers/scsi/lpfc/lpfc_init.c:5377: warning: Function parameter or member 'acqe_sli' not described in 'lpfc_sli4_async_sli_evt' drivers/scsi/lpfc/lpfc_init.c:5377: warning: Excess function parameter 'acqe_fc' description in 'lpfc_sli4_async_sli_evt' drivers/scsi/lpfc/lpfc_init.c:5634: warning: Function parameter or member 'phba' not described in 'lpfc_sli4_perform_all_vport_cvl' drivers/scsi/lpfc/lpfc_init.c:5634: warning: Excess function parameter 'vport' description in 'lpfc_sli4_perform_all_vport_cvl' drivers/scsi/lpfc/lpfc_init.c:5655: warning: Function parameter or member 'acqe_fip' not described in 'lpfc_sli4_async_fip_evt' drivers/scsi/lpfc/lpfc_init.c:5655: warning: Excess function parameter 'acqe_link' description in 'lpfc_sli4_async_fip_evt' drivers/scsi/lpfc/lpfc_init.c:5908: warning: Function parameter or member 'acqe_dcbx' not described in 'lpfc_sli4_async_dcbx_evt' drivers/scsi/lpfc/lpfc_init.c:5908: warning: Excess function parameter 'acqe_link' description in 'lpfc_sli4_async_dcbx_evt' drivers/scsi/lpfc/lpfc_init.c:5927: warning: Function parameter or member 'acqe_grp5' not described in 'lpfc_sli4_async_grp5_evt' drivers/scsi/lpfc/lpfc_init.c:5927: warning: Excess function parameter 'acqe_link' description in 'lpfc_sli4_async_grp5_evt' drivers/scsi/lpfc/lpfc_init.c:7279: warning: Function parameter or member 'iocb_count' not described in 'lpfc_init_iocb_list' drivers/scsi/lpfc/lpfc_init.c:8227: warning: Function parameter or member 'if_type' not described in 'lpfc_sli4_bar1_register_memmap' drivers/scsi/lpfc/lpfc_init.c:8414: warning: Excess function parameter 'phba' description in 'LINK_FLAGS_DEF' drivers/scsi/lpfc/lpfc_init.c:8414: warning: Excess function parameter 'rdconf' description in 'LINK_FLAGS_DEF' drivers/scsi/lpfc/lpfc_init.c:10734: warning: Function parameter or member 'cfg_mode' not described in 'lpfc_sli_enable_intr' drivers/scsi/lpfc/lpfc_init.c:11241: warning: Function parameter or member 'eqlist' not described in 'lpfc_cpuhp_get_eq' drivers/scsi/lpfc/lpfc_init.c:11726: warning: Function parameter or member 'cfg_mode' not described in 'lpfc_sli4_enable_intr' drivers/scsi/lpfc/lpfc_init.c:12997: warning: Excess function parameter 'ret' description in 'lpfc_write_firmware' drivers/scsi/lpfc/lpfc_init.c:13103: warning: Function parameter or member 'fw_upgrade' not described in 'lpfc_sli4_request_firmware_update' Link: https://lore.kernel.org/r/20200723122446.1329773-17-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 7fa03c77cd54e1ff8fc58bb85f787ff67910ec48 Author: Lee Jones Date: Thu Jul 23 13:24:21 2020 +0100 scsi: lpfc: Use __printf() format notation Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_init.c: In function ‘lpfc_dbg_print’: drivers/scsi/lpfc/lpfc_init.c:14212:6: warning: function ‘lpfc_dbg_print’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 14212 | sizeof(phba->dbg_log[idx].log), fmt, args); | ^~~~~~ Link: https://lore.kernel.org/r/20200723122446.1329773-16-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 6e3f4f68821ba4f17c38655e72698b4323b7f756 Author: Lee Jones Date: Thu Jul 23 13:24:20 2020 +0100 scsi: qla4xxx: Remove set but unused variable 'status' Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_83xx.c: In function ‘qla4_83xx_dump_pause_control_regs’: drivers/scsi/qla4xxx/ql4_83xx.c:1409:9: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 1409 | int i, status = QLA_SUCCESS; | ^~~~~~ Link: https://lore.kernel.org/r/20200723122446.1329773-15-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 00e245655e753e15d46a50558bee967f99922236 Author: Lee Jones Date: Thu Jul 23 13:24:19 2020 +0100 scsi: ips: Convert strnlen() to memcpy() since result should not be NUL terminated Fixes the following W=1 kernel build warning(s): In file included from arch/arm/include/asm/io.h:23, from drivers/scsi/ips.c:164: In function ‘strncpy’, inlined from ‘ips_send_cmd’ at drivers/scsi/ips.c:3522:6: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output truncated before terminating nul cop ying 4 bytes from a string of the same length [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ NB: Lots of these - snipping for brevity Link: https://lore.kernel.org/r/20200723122446.1329773-14-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: ipslinux@adaptec.com Cc: Christoph Hellwig Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ffe1757e45aa937a556936217c3c9b8f33ff4782 Author: Lee Jones Date: Thu Jul 23 13:24:18 2020 +0100 scsi: ips: Remove some set but unused variables Intentionally keeping all register reads/writes. Fixes the following W=1 kernel build warning(s): drivers/scsi/ips.c: In function ‘ips_init_copperhead’: drivers/scsi/ips.c:4700:10: warning: variable ‘ConfigByte’ set but not used [-Wunused-but-set-variable] 4700 | uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES]; | ^~~~~~~~~~ drivers/scsi/ips.c: In function ‘ips_init_copperhead_memio’: drivers/scsi/ips.c:4794:10: warning: variable ‘ConfigByte’ set but not used [-Wunused-but-set-variable] 4794 | uint8_t ConfigByte[IPS_MAX_CONFIG_BYTES]; | ^~~~~~~~~~ drivers/scsi/ips.c: In function ‘ips_init_phase1’: drivers/scsi/ips.c:6839:10: warning: variable ‘func’ set but not used [-Wunused-but-set-variable] 6839 | uint8_t func; | ^~~~ drivers/scsi/ips.c:6838:10: warning: variable ‘bus’ set but not used [-Wunused-but-set-variable] 6838 | uint8_t bus; | ^~~ Link: https://lore.kernel.org/r/20200723122446.1329773-13-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: ipslinux@adaptec.com Cc: Christoph Hellwig Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e4020e0835ed8fe2488beb2b60d3494c20c1129b Author: Lee Jones Date: Thu Jul 23 13:24:17 2020 +0100 scsi: qedi: Remove 2 set but unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/qedi/qedi_main.c: In function ‘qedi_queue_cqe’: drivers/scsi/qedi/qedi_main.c:1158:21: warning: variable ‘conn’ set but not used [-Wunused-but-set-variable] 1158 | struct iscsi_conn *conn; | ^~~~ drivers/scsi/qedi/qedi_main.c: In function ‘__qedi_probe’: drivers/scsi/qedi/qedi_main.c:2432:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] 2432 | u16 tmp; | ^~~ Link: https://lore.kernel.org/r/20200723122446.1329773-12-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 7106de1d8a75c9e6f6316b7360e6dc11ecb9e076 Author: Lee Jones Date: Thu Jul 23 13:24:16 2020 +0100 scsi: bfa: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the source file and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_fcpim.c:3829: warning: Function parameter or member 'bfa' not described in 'bfa_fcpim_get_throttle_cfg' drivers/scsi/bfa/bfa_fcpim.c:3829: warning: Function parameter or member 'drv_cfg_param' not described in 'bfa_fcpim_get_throttle_cfg' Link: https://lore.kernel.org/r/20200723122446.1329773-11-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 70b4de0bb928c61ba66c41c424a06bef1beb1bd8 Author: Lee Jones Date: Thu Jul 23 13:24:15 2020 +0100 scsi: bfa: Remove set but unused variable 'rp' This change subsequently makes 'rp_fcs' unused also. Remove that too. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_fcpim.c: In function ‘bfa_fcpim_lunmask_delete’: drivers/scsi/bfa/bfa_fcpim.c:2338:22: warning: variable ‘rp’ set but not used [-Wunused-but-set-variable] 2338 | struct bfa_rport_s *rp = NULL; | ^~ Link: https://lore.kernel.org/r/20200723122446.1329773-10-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 2ad6e0c339d278458b46ff716fec0a7739ca3cf5 Author: Lee Jones Date: Thu Jul 23 13:24:14 2020 +0100 scsi: bnx2i: Add missing descriptions for 'attr' parameter Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2i/bnx2i_sysfs.c:40: warning: Function parameter or member 'attr' not described in 'bnx2i_show_sq_info' drivers/scsi/bnx2i/bnx2i_sysfs.c:60: warning: Function parameter or member 'attr' not described in 'bnx2i_set_sq_info' drivers/scsi/bnx2i/bnx2i_sysfs.c:96: warning: Function parameter or member 'attr' not described in 'bnx2i_show_ccell_info' drivers/scsi/bnx2i/bnx2i_sysfs.c:114: warning: Function parameter or member 'attr' not described in 'bnx2i_set_ccell_info' Link: https://lore.kernel.org/r/20200723122446.1329773-9-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Cc: Anil Veerabhadrappa Cc: Eddie Wai Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 0aaaa04a7a7995912aa4ee5f0dd71441b6569472 Author: Lee Jones Date: Thu Jul 23 13:24:13 2020 +0100 scsi: bfa: Staticify local functions These calls are not invoked externally. Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_port.c:760:1: warning: no previous prototype for ‘bfa_cee_isr’ [-Wmissing-prototypes] 760 | bfa_cee_isr(void *cbarg, struct bfi_mbmsg_s *m) | ^~~~~~~~~~~ drivers/scsi/bfa/bfa_port.c:796:1: warning: no previous prototype for ‘bfa_cee_notify’ [-Wmissing-prototypes] 796 | bfa_cee_notify(void *arg, enum bfa_ioc_event_e event) | ^~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200723122446.1329773-8-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit b44cc4a40bd66400f1c548ec8ba8b9596b5bbfea Author: Lee Jones Date: Thu Jul 23 13:24:12 2020 +0100 scsi: ufs: ufs-exynos: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the source file and no descriptions are provided. Fixes the following W=1 kernel build warning(s): In file included from drivers/scsi/ufs/ufs-exynos.c:23: drivers/scsi/ufs/ufs-exynos.c:234: warning: Function parameter or member 'ufs' not described in 'exynos_ufs_auto_ctrl_hcc' drivers/scsi/ufs/ufs-exynos.c:234: warning: Function parameter or member 'en' not described in 'exynos_ufs_auto_ctrl_hcc' Link: https://lore.kernel.org/r/20200723122446.1329773-7-lee.jones@linaro.org Cc: Alim Akhtar Cc: Avri Altman Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Seungwon Jeon Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit b4688a7e01e54322a06289d3b4e42043aaf089e4 Author: Lee Jones Date: Thu Jul 23 13:24:10 2020 +0100 scsi: bnx2i: Fix parameter misnaming in function header Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2i/bnx2i_init.c:83: warning: Function parameter or member 'dev' not described in 'bnx2i_identify_device' drivers/scsi/bnx2i/bnx2i_init.c:83: warning: Excess function parameter 'cnic' description in 'bnx2i_identify_device' Link: https://lore.kernel.org/r/20200723122446.1329773-5-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Cc: Anil Veerabhadrappa Cc: Eddie Wai Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit bc5b681614ccf77a863e639fe4af4adda1537c8c Author: Lee Jones Date: Thu Jul 23 13:24:09 2020 +0100 scsi: ufs: ufs-qcom: Demote nonconformant kerneldoc headers Fixes the following W=1 kernel build warning(s): drivers/scsi/ufs/ufs-qcom.c:253: warning: Function parameter or member 'hba' not described in 'ufs_qcom_host_reset' drivers/scsi/ufs/ufs-qcom.c:383: warning: Function parameter or member 'hba' not described in 'ufs_qcom_cfg_timers' drivers/scsi/ufs/ufs-qcom.c:383: warning: Function parameter or member 'gear' not described in 'ufs_qcom_cfg_timers' drivers/scsi/ufs/ufs-qcom.c:383: warning: Function parameter or member 'hs' not described in 'ufs_qcom_cfg_timers' drivers/scsi/ufs/ufs-qcom.c:383: warning: Function parameter or member 'rate' not described in 'ufs_qcom_cfg_timers' drivers/scsi/ufs/ufs-qcom.c:383: warning: Function parameter or member 'update_link_startup_timer' not described in 'ufs_qcom_cfg_timers' drivers/scsi/ufs/ufs-qcom.c:1738: error: Cannot parse struct or union! Link: https://lore.kernel.org/r/20200723122446.1329773-4-lee.jones@linaro.org Cc: Andy Gross Cc: Bjorn Andersson Cc: Alim Akhtar Cc: Avri Altman Cc: Philipp Zabel Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e415f2a2acd9f61510120d8ce823ef92a63c8046 Author: Lee Jones Date: Thu Jul 23 13:24:08 2020 +0100 scsi: lpfc: Fix kerneldoc parameter formatting/misnaming/missing issues Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_hbadisc.c:1209: warning: Function parameter or member 'phba' not described in 'lpfc_sli4_clear_fcf_rr_bmask' drivers/scsi/lpfc/lpfc_hbadisc.c:1309: warning: Function parameter or member 'sw_name' not described in 'lpfc_sw_name_match' drivers/scsi/lpfc/lpfc_hbadisc.c:1309: warning: Excess function parameter 'fab_name' description in 'lpfc_sw_name_match' drivers/scsi/lpfc/lpfc_hbadisc.c:1397: warning: Function parameter or member 'fcf_rec' not described in 'lpfc_copy_fcf_record' drivers/scsi/lpfc/lpfc_hbadisc.c:1397: warning: Excess function parameter 'fcf' description in 'lpfc_copy_fcf_record' drivers/scsi/lpfc/lpfc_hbadisc.c:1956: warning: Cannot understand lpfc_sli4_fcf_record_match - testing new FCF record for matching existing FCF on line 1956 - I thought it was a doc line drivers/scsi/lpfc/lpfc_hbadisc.c:2078: warning: Function parameter or member 'fcf_index' not described in 'lpfc_sli4_fcf_pri_list_del' drivers/scsi/lpfc/lpfc_hbadisc.c:2109: warning: Function parameter or member 'fcf_index' not described in 'lpfc_sli4_set_fcf_flogi_fail' drivers/scsi/lpfc/lpfc_hbadisc.c:2135: warning: Function parameter or member 'fcf_index' not described in 'lpfc_sli4_fcf_pri_list_add' drivers/scsi/lpfc/lpfc_hbadisc.c:2135: warning: Function parameter or member 'new_fcf_record' not described in 'lpfc_sli4_fcf_pri_list_add' Link: https://lore.kernel.org/r/20200723122446.1329773-3-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a0e4a64f8650c07d7cb43ff9a9a1276a1bc9a575 Author: Lee Jones Date: Thu Jul 23 13:24:07 2020 +0100 scsi: lpfc: Fix some function parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_els.c:3619: warning: Function parameter or member 't' not described in 'lpfc_els_retry_delay' drivers/scsi/lpfc/lpfc_els.c:3619: warning: Excess function parameter 'ptr' description in 'lpfc_els_retry_delay' drivers/scsi/lpfc/lpfc_els.c:4877: warning: Function parameter or member 'rejectError' not described in 'lpfc_els_rsp_reject' drivers/scsi/lpfc/lpfc_els.c:7900: warning: Function parameter or member 't' not described in 'lpfc_els_timeout' drivers/scsi/lpfc/lpfc_els.c:7900: warning: Excess function parameter 'ptr' description in 'lpfc_els_timeout' drivers/scsi/lpfc/lpfc_els.c:8272: warning: Function parameter or member 'payload' not described in 'lpfc_send_els_event' drivers/scsi/lpfc/lpfc_els.c:8272: warning: Excess function parameter 'cmd' description in 'lpfc_send_els_event' drivers/scsi/lpfc/lpfc_els.c:8355: warning: Function parameter or member 'tlv' not described in 'lpfc_els_rcv_fpin_li' drivers/scsi/lpfc/lpfc_els.c:8355: warning: Excess function parameter 'lnk_not' description in 'lpfc_els_rcv_fpin_li' drivers/scsi/lpfc/lpfc_els.c:9688: warning: Function parameter or member 't' not described in 'lpfc_fabric_block_timeout' drivers/scsi/lpfc/lpfc_els.c:9688: warning: Excess function parameter 'ptr' description in 'lpfc_fabric_block_timeout' Link: https://lore.kernel.org/r/20200723122446.1329773-2-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f27e1bbc5cb205097c007b620edd1123d64101d8 Author: Lee Jones Date: Tue Jul 21 17:41:48 2020 +0100 scsi: cxgb3i: Remove bad documentation and demote kerneldoc header Also move the header block above the correct function. Fixes the following W=1 kernel build warning(s): drivers/scsi/cxgbi/cxgb3i/cxgb3i.c:390: warning: Function parameter or member 'dev' not described in 'arp_failure_skb_discard' drivers/scsi/cxgbi/cxgb3i/cxgb3i.c:390: warning: Function parameter or member 'skb' not described in 'arp_failure_skb_discard' drivers/scsi/cxgbi/cxgb3i/cxgb3i.c:390: warning: Excess function parameter 'c3cn' description in 'arp_failure_skb_discard' drivers/scsi/cxgbi/cxgb3i/cxgb3i.c:390: warning: Excess function parameter 'req_completion' description in 'arp_failure_skb_discard' drivers/scsi/cxgbi/cxgb3i/cxgb3i.c:895: warning: Function parameter or member 'csk' not described in 'l2t_put' drivers/scsi/cxgbi/cxgb3i/cxgb3i.c:895: warning: Excess function parameter 'c3cn' description in 'l2t_put' Link: https://lore.kernel.org/r/20200721164148.2617584-41-lee.jones@linaro.org Cc: Karen Xie Cc: Dimitris Michailidis Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 101706dc0a46c08a4efa33c8d05303b002668e30 Author: Lee Jones Date: Tue Jul 21 17:41:46 2020 +0100 scsi: sym53c8xx_2: Ensure variable has the same stipulations as code using it Only declare 'tp' and 'lp' if they are going to be used. Fixes the following W=1 kernel build warning(s): drivers/scsi/sym53c8xx_2/sym_hipd.c: In function ‘sym_complete_error’: drivers/scsi/sym53c8xx_2/sym_hipd.c:5356:18: warning: variable ‘lp’ set but not used [-Wunused-but-set-variable] drivers/scsi/sym53c8xx_2/sym_hipd.c: In function ‘sym_complete_ok’: drivers/scsi/sym53c8xx_2/sym_hipd.c:5485:18: warning: variable ‘lp’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200721164148.2617584-39-lee.jones@linaro.org Cc: Matthew Wilcox Cc: Gerard Roudier Cc: Wolfgang Stanglmeier Cc: Stefan Esser Cc: Richard Waltham Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 633e19b571105385ec1091d5a9ed14eb51878fc1 Author: Lee Jones Date: Tue Jul 21 17:41:45 2020 +0100 scsi: sym53c8xx_2: Add missing description for 'pdev' Fixes the following W=1 kernel build warning(s): drivers/scsi/sym53c8xx_2/sym_glue.c:1784: warning: Function parameter or member 'pdev' not described in 'sym2_reset_workarounds' Link: https://lore.kernel.org/r/20200721164148.2617584-38-lee.jones@linaro.org Cc: Matthew Wilcox Cc: Gerard Roudier Cc: Wolfgang Stanglmeier Cc: Stefan Esser Cc: Richard Waltham Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 11d8e56bfd3fbfd470e21e447fedbd0f6e3414a9 Author: Lee Jones Date: Tue Jul 21 17:41:44 2020 +0100 scsi: lpfc: Ensure variable has the same stipulations as code using it 'pg_addr' is only used when CONFIG_X86 is defined. So only declare it if CONFIG_X86 is defined. Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_sli.c: In function ‘lpfc_wq_create’: drivers/scsi/lpfc/lpfc_sli.c:15813:16: warning: unused variable ‘pg_addr’ [-Wunused-variable] 15813 | unsigned long pg_addr; | ^~~~~~~ Link: https://lore.kernel.org/r/20200721164148.2617584-37-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3bbd8ef9f780749426d4e52be0dfa3f70656d92b Author: Lee Jones Date: Tue Jul 21 17:41:43 2020 +0100 scsi: bfa: Staticify all local functions Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfad_bsg.c:19:1: warning: no previous prototype for ‘bfad_iocmd_ioc_enable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:42:1: warning: no previous prototype for ‘bfad_iocmd_ioc_disable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:150:1: warning: no previous prototype for ‘bfad_iocmd_ioc_get_fwstats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:180:1: warning: no previous prototype for ‘bfad_iocmd_ioc_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:198:1: warning: no previous prototype for ‘bfad_iocmd_ioc_set_name’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:212:1: warning: no previous prototype for ‘bfad_iocmd_iocfc_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:223:1: warning: no previous prototype for ‘bfad_iocmd_ioc_fw_sig_inv’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:235:1: warning: no previous prototype for ‘bfad_iocmd_iocfc_set_intr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:248:1: warning: no previous prototype for ‘bfad_iocmd_port_enable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:269:1: warning: no previous prototype for ‘bfad_iocmd_port_disable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:319:1: warning: no previous prototype for ‘bfad_iocmd_port_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:353:1: warning: no previous prototype for ‘bfad_iocmd_port_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:374:1: warning: no previous prototype for ‘bfad_iocmd_set_port_cfg’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:394:1: warning: no previous prototype for ‘bfad_iocmd_port_cfg_maxfrsize’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:408:1: warning: no previous prototype for ‘bfad_iocmd_port_cfg_bbcr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:431:1: warning: no previous prototype for ‘bfad_iocmd_port_get_bbcr_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:469:1: warning: no previous prototype for ‘bfad_iocmd_lport_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:493:1: warning: no previous prototype for ‘bfad_iocmd_lport_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:527:1: warning: no previous prototype for ‘bfad_iocmd_lport_get_iostats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:552:1: warning: no previous prototype for ‘bfad_iocmd_lport_get_rports’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:594:1: warning: no previous prototype for ‘bfad_iocmd_rport_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:680:1: warning: no previous prototype for ‘bfad_iocmd_rport_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:721:1: warning: no previous prototype for ‘bfad_iocmd_rport_clr_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:757:1: warning: no previous prototype for ‘bfad_iocmd_rport_set_speed’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:793:1: warning: no previous prototype for ‘bfad_iocmd_vport_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:816:1: warning: no previous prototype for ‘bfad_iocmd_vport_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:844:1: warning: no previous prototype for ‘bfad_iocmd_vport_clr_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:911:1: warning: no previous prototype for ‘bfad_iocmd_qos_set_bw’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:924:1: warning: no previous prototype for ‘bfad_iocmd_ratelim’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:953:1: warning: no previous prototype for ‘bfad_iocmd_ratelim_speed’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:982:1: warning: no previous prototype for ‘bfad_iocmd_cfg_fcpim’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:995:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_get_modstats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1017:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_clr_modstats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1039:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_get_del_itn_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1164:1: warning: no previous prototype for ‘bfad_iocmd_fcport_enable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1177:1: warning: no previous prototype for ‘bfad_iocmd_fcport_disable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1190:1: warning: no previous prototype for ‘bfad_iocmd_ioc_get_pcifn_cfg’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1212:1: warning: no previous prototype for ‘bfad_iocmd_pcifn_create’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1235:1: warning: no previous prototype for ‘bfad_iocmd_pcifn_delete’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1257:1: warning: no previous prototype for ‘bfad_iocmd_pcifn_bw’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1281:1: warning: no previous prototype for ‘bfad_iocmd_adapter_cfg_mode’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1304:1: warning: no previous prototype for ‘bfad_iocmd_port_cfg_mode’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1328:1: warning: no previous prototype for ‘bfad_iocmd_ablk_optrom’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1354:1: warning: no previous prototype for ‘bfad_iocmd_faa_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1377:1: warning: no previous prototype for ‘bfad_iocmd_cee_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1413:1: warning: no previous prototype for ‘bfad_iocmd_cee_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1450:1: warning: no previous prototype for ‘bfad_iocmd_cee_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1464:1: warning: no previous prototype for ‘bfad_iocmd_sfp_media’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1486:1: warning: no previous prototype for ‘bfad_iocmd_sfp_speed’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1507:1: warning: no previous prototype for ‘bfad_iocmd_flash_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1528:1: warning: no previous prototype for ‘bfad_iocmd_flash_erase_part’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1548:1: warning: no previous prototype for ‘bfad_iocmd_flash_update_part’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1580:1: warning: no previous prototype for ‘bfad_iocmd_flash_read_part’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1612:1: warning: no previous prototype for ‘bfad_iocmd_diag_temp’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1634:1: warning: no previous prototype for ‘bfad_iocmd_diag_memtest’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1657:1: warning: no previous prototype for ‘bfad_iocmd_diag_loopback’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1680:1: warning: no previous prototype for ‘bfad_iocmd_diag_fwping’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1704:1: warning: no previous prototype for ‘bfad_iocmd_diag_queuetest’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1725:1: warning: no previous prototype for ‘bfad_iocmd_diag_sfp’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1748:1: warning: no previous prototype for ‘bfad_iocmd_diag_led’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1761:1: warning: no previous prototype for ‘bfad_iocmd_diag_beacon_lport’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1776:1: warning: no previous prototype for ‘bfad_iocmd_diag_lb_stat’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1791:1: warning: no previous prototype for ‘bfad_iocmd_diag_dport_enable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1813:1: warning: no previous prototype for ‘bfad_iocmd_diag_dport_disable’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1833:1: warning: no previous prototype for ‘bfad_iocmd_diag_dport_start’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1858:1: warning: no previous prototype for ‘bfad_iocmd_diag_dport_show’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1873:1: warning: no previous prototype for ‘bfad_iocmd_phy_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1894:1: warning: no previous prototype for ‘bfad_iocmd_phy_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1915:1: warning: no previous prototype for ‘bfad_iocmd_phy_read’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1947:1: warning: no previous prototype for ‘bfad_iocmd_vhba_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1966:1: warning: no previous prototype for ‘bfad_iocmd_phy_update’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:1996:1: warning: no previous prototype for ‘bfad_iocmd_porglog_get’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2016:1: warning: no previous prototype for ‘bfad_iocmd_debug_fw_core’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2050:1: warning: no previous prototype for ‘bfad_iocmd_debug_ctl’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2071:1: warning: no previous prototype for ‘bfad_iocmd_porglog_ctl’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2085:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_cfg_profile’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2129:1: warning: no previous prototype for ‘bfad_iocmd_fcport_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2154:1: warning: no previous prototype for ‘bfad_iocmd_fcport_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2178:1: warning: no previous prototype for ‘bfad_iocmd_boot_cfg’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2200:1: warning: no previous prototype for ‘bfad_iocmd_boot_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2222:1: warning: no previous prototype for ‘bfad_iocmd_preboot_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2241:1: warning: no previous prototype for ‘bfad_iocmd_ethboot_cfg’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2264:1: warning: no previous prototype for ‘bfad_iocmd_ethboot_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2287:1: warning: no previous prototype for ‘bfad_iocmd_cfg_trunk’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2327:1: warning: no previous prototype for ‘bfad_iocmd_trunk_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2350:1: warning: no previous prototype for ‘bfad_iocmd_qos’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2378:1: warning: no previous prototype for ‘bfad_iocmd_qos_get_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2404:1: warning: no previous prototype for ‘bfad_iocmd_qos_get_vc_attr’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2436:1: warning: no previous prototype for ‘bfad_iocmd_qos_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2468:1: warning: no previous prototype for ‘bfad_iocmd_qos_reset_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2499:1: warning: no previous prototype for ‘bfad_iocmd_vf_get_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2522:1: warning: no previous prototype for ‘bfad_iocmd_vf_clr_stats’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2559:1: warning: no previous prototype for ‘bfad_iocmd_lunmask’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2582:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_lunmask_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2596:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_cfg_lunmask’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2615:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_throttle_query’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2630:1: warning: no previous prototype for ‘bfad_iocmd_fcpim_throttle_set’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2645:1: warning: no previous prototype for ‘bfad_iocmd_tfru_read’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2667:1: warning: no previous prototype for ‘bfad_iocmd_tfru_write’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2689:1: warning: no previous prototype for ‘bfad_iocmd_fruvpd_read’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2711:1: warning: no previous prototype for ‘bfad_iocmd_fruvpd_update’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:2733:1: warning: no previous prototype for ‘bfad_iocmd_fruvpd_get_max_size’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3181:1: warning: no previous prototype for ‘bfad_fcxp_get_req_sgaddr_cb’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3193:1: warning: no previous prototype for ‘bfad_fcxp_get_req_sglen_cb’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3203:1: warning: no previous prototype for ‘bfad_fcxp_get_rsp_sgaddr_cb’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3215:1: warning: no previous prototype for ‘bfad_fcxp_get_rsp_sglen_cb’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3225:1: warning: no previous prototype for ‘bfad_send_fcpt_cb’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3240:1: warning: no previous prototype for ‘bfad_fcxp_map_sg’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3284:1: warning: no previous prototype for ‘bfad_fcxp_free_mem’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3302:1: warning: no previous prototype for ‘bfad_fcxp_bsg_send’ [-Wmissing-prototypes] drivers/scsi/bfa/bfad_bsg.c:3342:1: warning: no previous prototype for ‘bfad_im_bsg_els_ct_request’ [-Wmissing-prototypes] Link: https://lore.kernel.org/r/20200721164148.2617584-36-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit fd4cdf6488d1eb83e68b32478cf706a979d4ada4 Author: Lee Jones Date: Tue Jul 21 17:41:42 2020 +0100 scsi: csiostor: Demote kerneldoc that fails to meet the criteria This matches some of the other headers in the file. Fixes the following W=1 kernel build warning(s): drivers/scsi/csiostor/csio_lnode.c:2079: warning: Function parameter or member 'hw' not described in 'csio_lnode_init' drivers/scsi/csiostor/csio_lnode.c:2079: warning: Function parameter or member 'pln' not described in 'csio_lnode_init' Link: https://lore.kernel.org/r/20200721164148.2617584-35-lee.jones@linaro.org Cc: Sumit Semwal Cc: "Christian König" Cc: Dan Carpenter Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 653557df36e0765057f4cb78b8b1ac122c4de4a2 Author: Lee Jones Date: Tue Jul 21 17:41:41 2020 +0100 scsi: qla4xxx: Supply description for 'code' Demote other headers which are clearly not kerneldoc. Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_nx.c:983: warning: Function parameter or member 'ha' not described in 'qla4_82xx_pinit_from_rom' drivers/scsi/qla4xxx/ql4_nx.c:983: warning: Function parameter or member 'verbose' not described in 'qla4_82xx_pinit_from_rom' drivers/scsi/qla4xxx/ql4_nx.c:3225: warning: Function parameter or member 'code' not described in 'qla4_8xxx_uevent_emit' drivers/scsi/qla4xxx/ql4_nx.c:3697: warning: Function parameter or member 'ha' not described in 'qla4_82xx_read_optrom_data' drivers/scsi/qla4xxx/ql4_nx.c:3697: warning: Function parameter or member 'buf' not described in 'qla4_82xx_read_optrom_data' drivers/scsi/qla4xxx/ql4_nx.c:3697: warning: Function parameter or member 'offset' not described in 'qla4_82xx_read_optrom_data' drivers/scsi/qla4xxx/ql4_nx.c:3697: warning: Function parameter or member 'length' not described in 'qla4_82xx_read_optrom_data' Link: https://lore.kernel.org/r/20200721164148.2617584-34-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f67e81641db71de4d4f2ace2ce05f4bdee3ded44 Author: Lee Jones Date: Tue Jul 21 17:41:40 2020 +0100 scsi: qla4xxx: Remove three set but unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_nx.c: In function ‘qla4_84xx_minidump_process_rddfe’: drivers/scsi/qla4xxx/ql4_nx.c:2648:23: warning: variable ‘data_size’ set but not used [-Wunused-but-set-variable] 2648 | uint32_t poll, mask, data_size, modify_mask; | ^~~~~~~~~ drivers/scsi/qla4xxx/ql4_nx.c: In function ‘qla4_84xx_minidump_process_rdmdio’: drivers/scsi/qla4xxx/ql4_nx.c:2745:11: warning: variable ‘poll’ set but not used [-Wunused-but-set-variable] 2745 | uint32_t poll, mask; | ^~~~ drivers/scsi/qla4xxx/ql4_nx.c: In function ‘qla4_84xx_minidump_process_pollwr’: drivers/scsi/qla4xxx/ql4_nx.c:2816:47: warning: variable ‘mask’ set but not used [-Wunused-but-set-variable] 2816 | uint32_t addr1, addr2, value1, value2, poll, mask, r_value; | ^~~~ Link: https://lore.kernel.org/r/20200721164148.2617584-33-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 5446a91d84015f1d986232653936126ed92fdb2f Author: Lee Jones Date: Tue Jul 21 17:41:39 2020 +0100 scsi: csiostor: Fix misnamed function parameter Fixes the following W=1 kernel build warning(s): drivers/scsi/csiostor/csio_init.c:595: warning: Function parameter or member 'pln' not described in 'csio_shost_init' drivers/scsi/csiostor/csio_init.c:595: warning: Excess function parameter 'os_pln' description in 'csio_shost_init' Link: https://lore.kernel.org/r/20200721164148.2617584-32-lee.jones@linaro.org Cc: Saurav Girepunje Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 6265bc4a41cd86966410c1157046ef7a3218ae16 Author: Lee Jones Date: Tue Jul 21 17:41:38 2020 +0100 scsi: lpfc: Fix-up formatting/docrot where appropriate Other headers have been demoted as they are too far out of sync and ideally require effort from the authors. Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_ct.c:321: warning: Function parameter or member 'usr_flg' not described in 'lpfc_gen_req' drivers/scsi/lpfc/lpfc_ct.c:321: warning: Function parameter or member 'num_entry' not described in 'lpfc_gen_req' drivers/scsi/lpfc/lpfc_ct.c:321: warning: Function parameter or member 'tmo' not described in 'lpfc_gen_req' drivers/scsi/lpfc/lpfc_ct.c:321: warning: Function parameter or member 'retry' not described in 'lpfc_gen_req' drivers/scsi/lpfc/lpfc_ct.c:413: warning: Function parameter or member 'rsp_size' not described in 'lpfc_ct_cmd' drivers/scsi/lpfc/lpfc_ct.c:413: warning: Function parameter or member 'retry' not described in 'lpfc_ct_cmd' drivers/scsi/lpfc/lpfc_ct.c:3030: warning: Function parameter or member 'cmdcode' not described in 'lpfc_fdmi_cmd' drivers/scsi/lpfc/lpfc_ct.c:3030: warning: Function parameter or member 'new_mask' not described in 'lpfc_fdmi_cmd' drivers/scsi/lpfc/lpfc_ct.c:3272: warning: Function parameter or member 't' not described in 'lpfc_delayed_disc_tmo' Link: https://lore.kernel.org/r/20200721164148.2617584-31-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit c0ad04b4b6d78d6370495e80c321f375ff2ea9a6 Author: Lee Jones Date: Tue Jul 21 17:41:37 2020 +0100 scsi: qla4xxx: Document qla4xxx_process_ddb()'s 'conn_err' Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_init.c:1170: warning: Function parameter or member 'conn_err' not described in 'qla4xxx_process_ddb_changed' Link: https://lore.kernel.org/r/20200721164148.2617584-30-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit c734de98a7bc3d2d60377a0cee2b5b7ccdfc0444 Author: Lee Jones Date: Tue Jul 21 17:41:36 2020 +0100 scsi: lpfc: Provide description for lpfc_mem_alloc()'s 'align' param Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_mem.c:85: warning: Function parameter or member 'align' not described in 'lpfc_mem_alloc' Link: https://lore.kernel.org/r/20200721164148.2617584-29-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit fc5fba6e2ae29f556aba0e7a3be21bdaad475037 Author: Lee Jones Date: Tue Jul 21 17:41:35 2020 +0100 scsi: qla4xxx: Repair function documentation headers Fix one formatting issue, one misspelling and three missing descriptions. Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_isr.c:588: warning: Excess function parameter 'ret' description in 'qla4_83xx_loopback_in_progress' drivers/scsi/qla4xxx/ql4_isr.c:661: warning: Function parameter or member 'mbox_status' not described in 'qla4xxx_isr_decode_mailbox' drivers/scsi/qla4xxx/ql4_isr.c:661: warning: Excess function parameter 'mailbox_status' description in 'qla4xxx_isr_decode_mailbox' drivers/scsi/qla4xxx/ql4_isr.c:1053: warning: Function parameter or member 'intr_status' not described in 'qla4_82xx_interrupt_service_routine' drivers/scsi/qla4xxx/ql4_isr.c:1078: warning: Function parameter or member 'intr_status' not described in 'qla4xxx_interrupt_service_routine' Link: https://lore.kernel.org/r/20200721164148.2617584-28-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit cdeeb36d8f24dd2f231a33674b28ed0fba14a214 Author: Lee Jones Date: Tue Jul 21 17:41:34 2020 +0100 scsi: qla4xxx: Fix some kerneldoc parameter documentation issues Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_os.c:4551: warning: Function parameter or member 't' not described in 'qla4xxx_timer' drivers/scsi/qla4xxx/ql4_os.c:4551: warning: Excess function parameter 'ha' description in 'qla4xxx_timer' drivers/scsi/qla4xxx/ql4_os.c:5312: warning: Function parameter or member 'work' not described in 'qla4xxx_do_dpc' drivers/scsi/qla4xxx/ql4_os.c:5312: warning: Excess function parameter 'data' description in 'qla4xxx_do_dpc' drivers/scsi/qla4xxx/ql4_os.c:8627: warning: Function parameter or member 'ent' not described in 'qla4xxx_probe_adapter' drivers/scsi/qla4xxx/ql4_os.c:8627: warning: Excess function parameter 'pci_device_id' description in 'qla4xxx_probe_adapter' drivers/scsi/qla4xxx/ql4_os.c:9008: warning: Function parameter or member 'pdev' not described in 'qla4xxx_remove_adapter' drivers/scsi/qla4xxx/ql4_os.c:9008: warning: Excess function parameter 'pci_dev' description in 'qla4xxx_remove_adapter' drivers/scsi/qla4xxx/ql4_os.c:9181: warning: Function parameter or member 'stgt' not described in 'qla4xxx_eh_wait_for_commands' drivers/scsi/qla4xxx/ql4_os.c:9181: warning: Function parameter or member 'sdev' not described in 'qla4xxx_eh_wait_for_commands' drivers/scsi/qla4xxx/ql4_os.c:9181: warning: Excess function parameter 't' description in 'qla4xxx_eh_wait_for_commands' drivers/scsi/qla4xxx/ql4_os.c:9181: warning: Excess function parameter 'l' description in 'qla4xxx_eh_wait_for_commands' drivers/scsi/qla4xxx/ql4_os.c:9646: warning: Function parameter or member 'pdev' not described in 'qla4xxx_pci_mmio_enabled' Link: https://lore.kernel.org/r/20200721164148.2617584-27-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ea310f574e73ccb3e63d399dcb473de0d6309848 Author: Lee Jones Date: Tue Jul 21 17:41:33 2020 +0100 scsi: pm8001: Staticify 'pm80xx_pci_mem_copy' and 'mpi_set_phy_profile_req' These are not invoked externally. Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm80xx_hwi.c:69:6: warning: no previous prototype for ‘pm80xx_pci_mem_copy’ [-Wmissing-prototypes] 69 | void pm80xx_pci_mem_copy(struct pm8001_hba_info *pm8001_ha, u32 soffset, | ^~~~~~~~~~~~~~~~~~~ drivers/scsi/pm8001/pm80xx_hwi.c:5016:6: warning: no previous prototype for ‘mpi_set_phy_profile_req’ [-Wmissing-prototypes] 5016 | void mpi_set_phy_profile_req(struct pm8001_hba_info *pm8001_ha, | ^~~~~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200721164148.2617584-26-lee.jones@linaro.org Cc: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 7af29d455362eabc58c614ff1f2dd7e256f85a85 Author: Lee Jones Date: Tue Jul 21 17:41:31 2020 +0100 scsi: lpfc: Fix-up around 120 documentation issues Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_sli.c:257: warning: Function parameter or member 'mqe' not described in 'lpfc_sli4_mq_put' drivers/scsi/lpfc/lpfc_sli.c:257: warning: Excess function parameter 'wqe' description in 'lpfc_sli4_mq_put' drivers/scsi/lpfc/lpfc_sli.c:675: warning: Function parameter or member 'hq' not described in 'lpfc_sli4_rq_put' drivers/scsi/lpfc/lpfc_sli.c:675: warning: Function parameter or member 'dq' not described in 'lpfc_sli4_rq_put' drivers/scsi/lpfc/lpfc_sli.c:675: warning: Function parameter or member 'hrqe' not described in 'lpfc_sli4_rq_put' drivers/scsi/lpfc/lpfc_sli.c:675: warning: Function parameter or member 'drqe' not described in 'lpfc_sli4_rq_put' drivers/scsi/lpfc/lpfc_sli.c:675: warning: Excess function parameter 'q' description in 'lpfc_sli4_rq_put' drivers/scsi/lpfc/lpfc_sli.c:675: warning: Excess function parameter 'wqe' description in 'lpfc_sli4_rq_put' drivers/scsi/lpfc/lpfc_sli.c:738: warning: Function parameter or member 'hq' not described in 'lpfc_sli4_rq_release' drivers/scsi/lpfc/lpfc_sli.c:738: warning: Function parameter or member 'dq' not described in 'lpfc_sli4_rq_release' drivers/scsi/lpfc/lpfc_sli.c:738: warning: Excess function parameter 'q' description in 'lpfc_sli4_rq_release' drivers/scsi/lpfc/lpfc_sli.c:1021: warning: Function parameter or member 'xritag' not described in 'lpfc_test_rrq_active' drivers/scsi/lpfc/lpfc_sli.c:1132: warning: Function parameter or member 'piocbq' not described in '__lpfc_sli_get_els_sglq' drivers/scsi/lpfc/lpfc_sli.c:1132: warning: Excess function parameter 'piocb' description in '__lpfc_sli_get_els_sglq' drivers/scsi/lpfc/lpfc_sli.c:1207: warning: Function parameter or member 'piocbq' not described in '__lpfc_sli_get_nvmet_sglq' drivers/scsi/lpfc/lpfc_sli.c:1207: warning: Excess function parameter 'piocb' description in '__lpfc_sli_get_nvmet_sglq' drivers/scsi/lpfc/lpfc_sli.c:2243: warning: Function parameter or member 'rb_list' not described in 'lpfc_sli_hbqbuf_get' drivers/scsi/lpfc/lpfc_sli.c:2243: warning: Excess function parameter 'phba' description in 'lpfc_sli_hbqbuf_get' drivers/scsi/lpfc/lpfc_sli.c:2243: warning: Excess function parameter 'hbqno' description in 'lpfc_sli_hbqbuf_get' drivers/scsi/lpfc/lpfc_sli.c:2262: warning: Function parameter or member 'hrq' not described in 'lpfc_sli_rqbuf_get' drivers/scsi/lpfc/lpfc_sli.c:2262: warning: Excess function parameter 'hbqno' description in 'lpfc_sli_rqbuf_get' drivers/scsi/lpfc/lpfc_sli.c:3429: warning: Function parameter or member 't' not described in 'lpfc_poll_eratt' drivers/scsi/lpfc/lpfc_sli.c:3429: warning: Excess function parameter 'ptr' description in 'lpfc_poll_eratt' drivers/scsi/lpfc/lpfc_sli.c:4115: warning: Excess function parameter 'pring' description in 'lpfc_sli_abort_fcp_rings' drivers/scsi/lpfc/lpfc_sli.c:5331: warning: Excess function parameter 'mboxq' description in 'lpfc_sli4_read_fcoe_params' drivers/scsi/lpfc/lpfc_sli.c:5879: warning: Function parameter or member 'extnt_cnt' not described in 'lpfc_sli4_cfg_post_extnts' drivers/scsi/lpfc/lpfc_sli.c:5879: warning: Function parameter or member 'type' not described in 'lpfc_sli4_cfg_post_extnts' drivers/scsi/lpfc/lpfc_sli.c:5879: warning: Function parameter or member 'emb' not described in 'lpfc_sli4_cfg_post_extnts' drivers/scsi/lpfc/lpfc_sli.c:5879: warning: Function parameter or member 'mbox' not described in 'lpfc_sli4_cfg_post_extnts' drivers/scsi/lpfc/lpfc_sli.c:6459: warning: Function parameter or member 'pmb' not described in 'lpfc_sli4_ras_mbox_cmpl' drivers/scsi/lpfc/lpfc_sli.c:6459: warning: Excess function parameter 'pmboxq' description in 'lpfc_sli4_ras_mbox_cmpl' drivers/scsi/lpfc/lpfc_sli.c:6912: warning: Function parameter or member 'extnt_cnt' not described in 'lpfc_sli4_get_allocated_extnts' drivers/scsi/lpfc/lpfc_sli.c:6912: warning: Excess function parameter 'extnt_count' description in 'lpfc_sli4_get_allocated_extnts' drivers/scsi/lpfc/lpfc_sli.c:7064: warning: Excess function parameter 'pring' description in 'lpfc_sli4_repost_sgl_list' drivers/scsi/lpfc/lpfc_sli.c:7312: warning: Function parameter or member 'phba' not described in 'lpfc_init_idle_stat_hb' drivers/scsi/lpfc/lpfc_sli.c:8022: warning: Function parameter or member 't' not described in 'lpfc_mbox_timeout' drivers/scsi/lpfc/lpfc_sli.c:8022: warning: Excess function parameter 'ptr' description in 'lpfc_mbox_timeout' drivers/scsi/lpfc/lpfc_sli.c:8902: warning: Function parameter or member 'mboxq' not described in 'lpfc_sli_issue_mbox_s4' drivers/scsi/lpfc/lpfc_sli.c:8902: warning: Excess function parameter 'pmbox' description in 'lpfc_sli_issue_mbox_s4' drivers/scsi/lpfc/lpfc_sli.c:9413: warning: Function parameter or member 'piocbq' not described in 'lpfc_sli4_bpl2sgl' drivers/scsi/lpfc/lpfc_sli.c:9413: warning: Excess function parameter 'piocb' description in 'lpfc_sli4_bpl2sgl' drivers/scsi/lpfc/lpfc_sli.c:9518: warning: Function parameter or member 'iocbq' not described in 'lpfc_sli4_iocb2wqe' drivers/scsi/lpfc/lpfc_sli.c:9518: warning: Excess function parameter 'piocb' description in 'lpfc_sli4_iocb2wqe' drivers/scsi/lpfc/lpfc_sli.c:10212: warning: Function parameter or member 'phba' not described in '__lpfc_sli_issue_iocb' drivers/scsi/lpfc/lpfc_sli.c:10212: warning: Function parameter or member 'ring_number' not described in '__lpfc_sli_issue_iocb' drivers/scsi/lpfc/lpfc_sli.c:10212: warning: Function parameter or member 'piocb' not described in '__lpfc_sli_issue_iocb' drivers/scsi/lpfc/lpfc_sli.c:10212: warning: Function parameter or member 'flag' not described in '__lpfc_sli_issue_iocb' drivers/scsi/lpfc/lpfc_sli.c:10300: warning: Function parameter or member 'ring_number' not described in 'lpfc_sli_issue_iocb' drivers/scsi/lpfc/lpfc_sli.c:10300: warning: Excess function parameter 'pring' description in 'lpfc_sli_issue_iocb' drivers/scsi/lpfc/lpfc_sli.c:11807: warning: Function parameter or member 'cmd' not described in 'lpfc_sli_abort_taskmgmt' drivers/scsi/lpfc/lpfc_sli.c:11807: warning: Excess function parameter 'taskmgmt_cmd' description in 'lpfc_sli_abort_taskmgmt' drivers/scsi/lpfc/lpfc_sli.c:12067: warning: Function parameter or member 'ring_number' not described in 'lpfc_sli_issue_iocb_wait' drivers/scsi/lpfc/lpfc_sli.c:12067: warning: Excess function parameter 'pring' description in 'lpfc_sli_issue_iocb_wait' drivers/scsi/lpfc/lpfc_sli.c:12262: warning: Function parameter or member 'mbx_action' not described in 'lpfc_sli_mbox_sys_shutdown' drivers/scsi/lpfc/lpfc_sli.c:13219: warning: Function parameter or member 'irspiocbq' not described in 'lpfc_sli4_els_wcqe_to_rspiocbq' drivers/scsi/lpfc/lpfc_sli.c:13219: warning: Excess function parameter 'wcqe' description in 'lpfc_sli4_els_wcqe_to_rspiocbq' drivers/scsi/lpfc/lpfc_sli.c:13285: warning: Function parameter or member 'mcqe' not described in 'lpfc_sli4_sp_handle_async_event' drivers/scsi/lpfc/lpfc_sli.c:13285: warning: Excess function parameter 'cqe' description in 'lpfc_sli4_sp_handle_async_event' drivers/scsi/lpfc/lpfc_sli.c:13318: warning: Function parameter or member 'mcqe' not described in 'lpfc_sli4_sp_handle_mbox_event' drivers/scsi/lpfc/lpfc_sli.c:13318: warning: Excess function parameter 'cqe' description in 'lpfc_sli4_sp_handle_mbox_event' drivers/scsi/lpfc/lpfc_sli.c:13441: warning: Function parameter or member 'cq' not described in 'lpfc_sli4_sp_handle_mcqe' drivers/scsi/lpfc/lpfc_sli.c:13768: warning: Function parameter or member 'speq' not described in 'lpfc_sli4_sp_handle_eqe' drivers/scsi/lpfc/lpfc_sli.c:14126: warning: Function parameter or member 'cq' not described in 'lpfc_sli4_nvmet_handle_rcqe' drivers/scsi/lpfc/lpfc_sli.c:14235: warning: Function parameter or member 'cqe' not described in 'lpfc_sli4_fp_handle_cqe' drivers/scsi/lpfc/lpfc_sli.c:14235: warning: Excess function parameter 'eqe' description in 'lpfc_sli4_fp_handle_cqe' drivers/scsi/lpfc/lpfc_sli.c:14336: warning: Function parameter or member 'eq' not described in 'lpfc_sli4_hba_handle_eqe' drivers/scsi/lpfc/lpfc_sli.c:14808: warning: Function parameter or member 'entry_count' not described in 'lpfc_sli4_queue_alloc' drivers/scsi/lpfc/lpfc_sli.c:15185: warning: Function parameter or member 'type' not described in 'lpfc_cq_create' drivers/scsi/lpfc/lpfc_sli.c:15185: warning: Function parameter or member 'subtype' not described in 'lpfc_cq_create' drivers/scsi/lpfc/lpfc_sli.c:15333: warning: Function parameter or member 'type' not described in 'lpfc_cq_create_set' drivers/scsi/lpfc/lpfc_sli.c:15333: warning: Function parameter or member 'subtype' not described in 'lpfc_cq_create_set' drivers/scsi/lpfc/lpfc_sli.c:16063: warning: Function parameter or member 'subtype' not described in 'lpfc_rq_create' drivers/scsi/lpfc/lpfc_sli.c:16353: warning: Function parameter or member 'subtype' not described in 'lpfc_mrq_create' drivers/scsi/lpfc/lpfc_sli.c:16533: warning: Function parameter or member 'phba' not described in 'lpfc_eq_destroy' drivers/scsi/lpfc/lpfc_sli.c:16590: warning: Function parameter or member 'phba' not described in 'lpfc_cq_destroy' drivers/scsi/lpfc/lpfc_sli.c:16644: warning: Function parameter or member 'phba' not described in 'lpfc_mq_destroy' drivers/scsi/lpfc/lpfc_sli.c:16644: warning: Function parameter or member 'mq' not described in 'lpfc_mq_destroy' drivers/scsi/lpfc/lpfc_sli.c:16644: warning: Excess function parameter 'qm' description in 'lpfc_mq_destroy' drivers/scsi/lpfc/lpfc_sli.c:16698: warning: Function parameter or member 'phba' not described in 'lpfc_wq_destroy' drivers/scsi/lpfc/lpfc_sli.c:16754: warning: Function parameter or member 'phba' not described in 'lpfc_rq_destroy' drivers/scsi/lpfc/lpfc_sli.c:16754: warning: Function parameter or member 'hrq' not described in 'lpfc_rq_destroy' drivers/scsi/lpfc/lpfc_sli.c:16754: warning: Function parameter or member 'drq' not described in 'lpfc_rq_destroy' drivers/scsi/lpfc/lpfc_sli.c:16754: warning: Excess function parameter 'rq' description in 'lpfc_rq_destroy' drivers/scsi/lpfc/lpfc_sli.c:16940: warning: Function parameter or member 'xri' not described in '__lpfc_sli4_free_xri' drivers/scsi/lpfc/lpfc_sli.c:16955: warning: Function parameter or member 'xri' not described in 'lpfc_sli4_free_xri' drivers/scsi/lpfc/lpfc_sli.c:17002: warning: Function parameter or member 'post_cnt' not described in 'lpfc_sli4_post_sgl_list' drivers/scsi/lpfc/lpfc_sli.c:17002: warning: Excess function parameter 'count' description in 'lpfc_sli4_post_sgl_list' drivers/scsi/lpfc/lpfc_sli.c:17221: warning: Function parameter or member 'sb_count' not described in 'lpfc_sli4_post_io_sgl_list' drivers/scsi/lpfc/lpfc_sli.c:17451: warning: Function parameter or member 'did' not described in 'lpfc_fc_frame_to_vport' drivers/scsi/lpfc/lpfc_sli.c:17590: warning: Function parameter or member 'vport' not described in 'lpfc_fc_frame_add' drivers/scsi/lpfc/lpfc_sli.c:17817: warning: Function parameter or member 'vport' not described in 'lpfc_sli4_seq_abort_rsp' drivers/scsi/lpfc/lpfc_sli.c:17817: warning: Function parameter or member 'aborted' not described in 'lpfc_sli4_seq_abort_rsp' drivers/scsi/lpfc/lpfc_sli.c:17817: warning: Excess function parameter 'phba' description in 'lpfc_sli4_seq_abort_rsp' drivers/scsi/lpfc/lpfc_sli.c:18060: warning: Function parameter or member 'seq_dmabuf' not described in 'lpfc_prep_seq' drivers/scsi/lpfc/lpfc_sli.c:18060: warning: Excess function parameter 'dmabuf' description in 'lpfc_prep_seq' drivers/scsi/lpfc/lpfc_sli.c:18332: warning: Function parameter or member 'dmabuf' not described in 'lpfc_sli4_handle_received_buffer' drivers/scsi/lpfc/lpfc_sli.c:18655: warning: Function parameter or member 'rpi' not described in '__lpfc_sli4_free_rpi' drivers/scsi/lpfc/lpfc_sli.c:18683: warning: Function parameter or member 'rpi' not described in 'lpfc_sli4_free_rpi' drivers/scsi/lpfc/lpfc_sli.c:18714: warning: Function parameter or member 'ndlp' not described in 'lpfc_sli4_resume_rpi' drivers/scsi/lpfc/lpfc_sli.c:18714: warning: Function parameter or member 'cmpl' not described in 'lpfc_sli4_resume_rpi' drivers/scsi/lpfc/lpfc_sli.c:18714: warning: Function parameter or member 'arg' not described in 'lpfc_sli4_resume_rpi' drivers/scsi/lpfc/lpfc_sli.c:18714: warning: Excess function parameter 'phba' description in 'lpfc_sli4_resume_rpi' drivers/scsi/lpfc/lpfc_sli.c:19103: warning: Function parameter or member 'phba' not described in 'lpfc_check_next_fcf_pri_level' drivers/scsi/lpfc/lpfc_sli.c:19266: warning: Function parameter or member 'fcf_index' not described in 'lpfc_sli4_fcf_rr_index_set' drivers/scsi/lpfc/lpfc_sli.c:19295: warning: Function parameter or member 'fcf_index' not described in 'lpfc_sli4_fcf_rr_index_clear' drivers/scsi/lpfc/lpfc_sli.c:19331: warning: Function parameter or member 'mbox' not described in 'lpfc_mbx_cmpl_redisc_fcf_table' drivers/scsi/lpfc/lpfc_sli.c:20027: warning: Function parameter or member 'pwqeq' not described in 'lpfc_wqe_bpl2sgl' drivers/scsi/lpfc/lpfc_sli.c:20027: warning: Excess function parameter 'pwqe' description in 'lpfc_wqe_bpl2sgl' drivers/scsi/lpfc/lpfc_sli.c:20141: warning: Function parameter or member 'qp' not described in 'lpfc_sli4_issue_wqe' drivers/scsi/lpfc/lpfc_sli.c:20141: warning: Excess function parameter 'ring_number' description in 'lpfc_sli4_issue_wqe' drivers/scsi/lpfc/lpfc_sli.c:20434: warning: Function parameter or member 'qp' not described in '_lpfc_move_xri_pbl_to_pvt' drivers/scsi/lpfc/lpfc_sli.c:20552: warning: Function parameter or member 'hwqid' not described in 'lpfc_keep_pvt_pool_above_lowwm' drivers/scsi/lpfc/lpfc_sli.c:20552: warning: Excess function parameter 'qp' description in 'lpfc_keep_pvt_pool_above_lowwm' drivers/scsi/lpfc/lpfc_sli.c:20682: warning: Function parameter or member 'qp' not described in 'lpfc_get_io_buf_from_private_pool' Link: https://lore.kernel.org/r/20200721164148.2617584-24-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 67b8b93a559f311270b5a53fb826bde11d921387 Author: Lee Jones Date: Tue Jul 21 17:41:30 2020 +0100 scsi: qla4xxx: Fix incorrectly named function parameter Fixes the following W=1 kernel build warning(s): from drivers/scsi/qla4xxx/ql4_iocb.c:8: drivers/scsi/qla4xxx/ql4_iocb.c:87: warning: Function parameter or member 'mrkr_mod' not described in 'qla4xxx_send_marker_iocb' drivers/scsi/qla4xxx/ql4_iocb.c:87: warning: Excess function parameter 'marker_type' description in 'qla4xxx_send_marker_iocb' Link: https://lore.kernel.org/r/20200721164148.2617584-23-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 0d5fea42989ed2ed09e4e63a16c74e01057d540e Author: Lee Jones Date: Tue Jul 21 17:41:29 2020 +0100 scsi: qla4xxx: Fix-up incorrectly documented parameter Also demote incomplete header from kerneldoc. Fixes the following W=1 kernel build warning(s): from drivers/scsi/qla4xxx/ql4_mbx.c:9: drivers/scsi/qla4xxx/ql4_mbx.c:53: warning: Excess function parameter 'ret' description in 'qla4xxx_is_intr_poll_mode' drivers/scsi/qla4xxx/ql4_mbx.c:832: warning: Function parameter or member 'fw_ddb_entry_dma' not described in 'qla4xxx_get_fwddb_entry' drivers/scsi/qla4xxx/ql4_mbx.c:832: warning: Function parameter or member 'conn_err_detail' not described in 'qla4xxx_get_fwddb_entry' drivers/scsi/qla4xxx/ql4_mbx.c:832: warning: Function parameter or member 'tcp_source_port_num' not described in 'qla4xxx_get_fwddb_entry' drivers/scsi/qla4xxx/ql4_mbx.c:832: warning: Function parameter or member 'connection_id' not described in 'qla4xxx_get_fwddb_entry' drivers/scsi/qla4xxx/ql4_mbx.c:1271: warning: Function parameter or member 'ddb_entry' not described in 'qla4xxx_reset_target' drivers/scsi/qla4xxx/ql4_mbx.c:1271: warning: Excess function parameter 'db_entry' description in 'qla4xxx_reset_target' drivers/scsi/qla4xxx/ql4_mbx.c:1271: warning: Excess function parameter 'un_entry' description in 'qla4xxx_reset_target' Link: https://lore.kernel.org/r/20200721164148.2617584-22-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3c1311ad837e1538f470e593e822e92eb5eb55a6 Author: Lee Jones Date: Tue Jul 21 17:41:28 2020 +0100 scsi: lpfc: Remove unused variable 'pg_addr' Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_sli.c: In function ‘lpfc_wq_create’: drivers/scsi/lpfc/lpfc_sli.c:15810:16: warning: variable ‘pg_addr’ set but not used [-Wunused-but-set-variable] 15810 | unsigned long pg_addr; | ^~~~~~~ Link: https://lore.kernel.org/r/20200721164148.2617584-21-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f30554c2711224a6ecf6e875c964183fbc4c5445 Author: Lee Jones Date: Tue Jul 21 17:41:27 2020 +0100 scsi: qla4xxx: Move 'qla4_82xx_reg_tbl' to the only place its used Fixes the following W=1 kernel build warning(s): In file included from drivers/scsi/qla4xxx/ql4_def.h:43, from drivers/scsi/qla4xxx/ql4_mbx.c:9: drivers/scsi/qla4xxx/ql4_nx.h:602:23: warning: ‘qla4_82xx_reg_tbl’ defined but not used [-Wunused-const-variable=] 602 | static const uint32_t qla4_82xx_reg_tbl[] = { | ^~~~~~~~~~~~~~~~~ [...] NB: Lots of these Link: https://lore.kernel.org/r/20200721164148.2617584-20-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 685f94794f9a6705f5630a261e9b24553c969b11 Author: Lee Jones Date: Tue Jul 21 17:41:26 2020 +0100 scsi: pm8001: Remove a bunch of set but unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_eh_cmd_timed_out’: drivers/scsi/qla4xxx/ql4_os.c:1865:24: warning: variable ‘sess’ set but not used [-Wunused-but-set-variable] 1865 | struct iscsi_session *sess; | ^~~~ drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_session_create’: drivers/scsi/qla4xxx/ql4_os.c:3079:19: warning: variable ‘dst_addr’ set but not used [-Wunused-but-set-variable] 3079 | struct sockaddr *dst_addr; | ^~~~~~~~ drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4_8xxx_iospace_config’: drivers/scsi/qla4xxx/ql4_os.c:5512:44: warning: variable ‘db_len’ set but not used [-Wunused-but-set-variable] 5512 | unsigned long mem_base, mem_len, db_base, db_len; | ^~~~~~ drivers/scsi/qla4xxx/ql4_os.c:5512:35: warning: variable ‘db_base’ set but not used [-Wunused-but-set-variable] 5512 | unsigned long mem_base, mem_len, db_base, db_len; | ^~~~~~~ drivers/scsi/qla4xxx/ql4_os.c: In function ‘qla4xxx_get_param_ddb’: drivers/scsi/qla4xxx/ql4_os.c:6269:24: warning: variable ‘ha’ set but not used [-Wunused-but-set-variable] 6269 | struct scsi_qla_host *ha; | ^~ Link: https://lore.kernel.org/r/20200721164148.2617584-19-lee.jones@linaro.org Cc: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 6ad4a51764a0326a4962ca49d780ccdcde345f11 Author: Lee Jones Date: Tue Jul 21 17:41:25 2020 +0100 scsi: pm8001: Fix some function documentation issues Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm80xx_hwi.c:918: warning: Function parameter or member 'number' not described in 'update_inbnd_queue_table' drivers/scsi/pm8001/pm80xx_hwi.c:954: warning: Function parameter or member 'number' not described in 'update_outbnd_queue_table' drivers/scsi/pm8001/pm80xx_hwi.c:1717: warning: Function parameter or member 'vec' not described in 'pm80xx_chip_interrupt_enable' drivers/scsi/pm8001/pm80xx_hwi.c:1735: warning: Function parameter or member 'vec' not described in 'pm80xx_chip_interrupt_disable' drivers/scsi/pm8001/pm80xx_hwi.c:4830: warning: Excess function parameter 'num' description in 'pm80xx_chip_phy_start_req' drivers/scsi/pm8001/pm80xx_hwi.c:4872: warning: Excess function parameter 'num' description in 'pm80xx_chip_phy_stop_req' drivers/scsi/pm8001/pm80xx_hwi.c:4892: warning: Function parameter or member 'pm8001_ha' not described in 'pm80xx_chip_reg_dev_req' drivers/scsi/pm8001/pm80xx_hwi.c:4892: warning: Function parameter or member 'pm8001_dev' not described in 'pm80xx_chip_reg_dev_req' drivers/scsi/pm8001/pm80xx_hwi.c:4892: warning: Function parameter or member 'flag' not described in 'pm80xx_chip_reg_dev_req' drivers/scsi/pm8001/pm80xx_hwi.c:4966: warning: Function parameter or member 'phyId' not described in 'pm80xx_chip_phy_ctl_req' drivers/scsi/pm8001/pm80xx_hwi.c:4966: warning: Function parameter or member 'phy_op' not described in 'pm80xx_chip_phy_ctl_req' drivers/scsi/pm8001/pm80xx_hwi.c:4966: warning: Excess function parameter 'num' description in 'pm80xx_chip_phy_ctl_req' drivers/scsi/pm8001/pm80xx_hwi.c:4966: warning: Excess function parameter 'phy_id' description in 'pm80xx_chip_phy_ctl_req' drivers/scsi/pm8001/pm80xx_hwi.c:5006: warning: Function parameter or member 'vec' not described in 'pm80xx_chip_isr' drivers/scsi/pm8001/pm80xx_hwi.c:5006: warning: Excess function parameter 'irq' description in 'pm80xx_chip_isr' drivers/scsi/pm8001/pm80xx_hwi.c:5006: warning: Excess function parameter 'stat' description in 'pm80xx_chip_isr' Link: https://lore.kernel.org/r/20200721164148.2617584-18-lee.jones@linaro.org Cc: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 083645bab2212901da2418baefed5b5c583e851e Author: Lee Jones Date: Tue Jul 21 17:41:24 2020 +0100 scsi: pm8001: Fix a bunch of kerneldoc issues Provide lots of missing descriptions, remove some superfluous ones (probably due to docrot) and demote one header which does not provide many descriptions, and the ones it does provide are incorrect. Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_hwi.c:339: warning: Function parameter or member 'number' not described in 'update_inbnd_queue_table' drivers/scsi/pm8001/pm8001_hwi.c:360: warning: Function parameter or member 'number' not described in 'update_outbnd_queue_table' drivers/scsi/pm8001/pm8001_hwi.c:480: warning: Function parameter or member 'interval' not described in 'mpi_set_open_retry_interval_reg' drivers/scsi/pm8001/pm8001_hwi.c:1238: warning: Function parameter or member 'int_vec_idx' not described in 'pm8001_chip_msix_interrupt_enable' drivers/scsi/pm8001/pm8001_hwi.c:1256: warning: Function parameter or member 'int_vec_idx' not described in 'pm8001_chip_msix_interrupt_disable' drivers/scsi/pm8001/pm8001_hwi.c:1270: warning: Function parameter or member 'vec' not described in 'pm8001_chip_interrupt_enable' drivers/scsi/pm8001/pm8001_hwi.c:1284: warning: Function parameter or member 'vec' not described in 'pm8001_chip_interrupt_disable' drivers/scsi/pm8001/pm8001_hwi.c:4508: warning: Excess function parameter 'num' description in 'pm8001_chip_phy_start_req' drivers/scsi/pm8001/pm8001_hwi.c:4544: warning: Excess function parameter 'num' description in 'pm8001_chip_phy_stop_req' drivers/scsi/pm8001/pm8001_hwi.c:4564: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_chip_reg_dev_req' drivers/scsi/pm8001/pm8001_hwi.c:4564: warning: Function parameter or member 'pm8001_dev' not described in 'pm8001_chip_reg_dev_req' drivers/scsi/pm8001/pm8001_hwi.c:4564: warning: Function parameter or member 'flag' not described in 'pm8001_chip_reg_dev_req' drivers/scsi/pm8001/pm8001_hwi.c:4624: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_chip_dereg_dev_req' drivers/scsi/pm8001/pm8001_hwi.c:4624: warning: Function parameter or member 'device_id' not described in 'pm8001_chip_dereg_dev_req' drivers/scsi/pm8001/pm8001_hwi.c:4650: warning: Function parameter or member 'phyId' not described in 'pm8001_chip_phy_ctl_req' drivers/scsi/pm8001/pm8001_hwi.c:4650: warning: Function parameter or member 'phy_op' not described in 'pm8001_chip_phy_ctl_req' drivers/scsi/pm8001/pm8001_hwi.c:4650: warning: Excess function parameter 'num' description in 'pm8001_chip_phy_ctl_req' drivers/scsi/pm8001/pm8001_hwi.c:4650: warning: Excess function parameter 'phy_id' description in 'pm8001_chip_phy_ctl_req' drivers/scsi/pm8001/pm8001_hwi.c:4687: warning: Function parameter or member 'vec' not described in 'pm8001_chip_isr' drivers/scsi/pm8001/pm8001_hwi.c:4687: warning: Excess function parameter 'irq' description in 'pm8001_chip_isr' drivers/scsi/pm8001/pm8001_hwi.c:4687: warning: Excess function parameter 'stat' description in 'pm8001_chip_isr' drivers/scsi/pm8001/pm8001_hwi.c:4727: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_chip_abort_task' drivers/scsi/pm8001/pm8001_hwi.c:4727: warning: Function parameter or member 'pm8001_dev' not described in 'pm8001_chip_abort_task' drivers/scsi/pm8001/pm8001_hwi.c:4727: warning: Function parameter or member 'task_tag' not described in 'pm8001_chip_abort_task' drivers/scsi/pm8001/pm8001_hwi.c:4727: warning: Function parameter or member 'cmd_tag' not described in 'pm8001_chip_abort_task' drivers/scsi/pm8001/pm8001_hwi.c:4727: warning: Excess function parameter 'task' description in 'pm8001_chip_abort_task' drivers/scsi/pm8001/pm8001_hwi.c:4966: warning: Function parameter or member 'tag' not described in 'pm8001_chip_fw_flash_update_build' Link: https://lore.kernel.org/r/20200721164148.2617584-17-lee.jones@linaro.org Cc: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 0683550b54c40b06746c28a9844839392597d783 Author: Lee Jones Date: Tue Jul 21 17:41:23 2020 +0100 scsi: aic7xxx: Remove set but unused variables 'targ_info' and 'value' Also remove 'tstate' which became unused after this patch. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_handle_seqint’: drivers/scsi/aic7xxx/aic79xx_core.c:1907:32: warning: variable ‘targ_info’ set but not used [-Wunused-but-set-variable] 1907 | struct ahd_initiator_tinfo *targ_info; | ^~~~~~~~~ drivers/scsi/pm8001/pm8001_hwi.c: In function ‘mpi_set_phys_g3_with_ssc’: drivers/scsi/pm8001/pm8001_hwi.c:413:6: warning: variable ‘value’ set but not used [-Wunused-but-set-variable] 413 | u32 value, offset, i; | ^~~~~ Link: https://lore.kernel.org/r/20200721164148.2617584-16-lee.jones@linaro.org Cc: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3ca2c203ed99944da2e687e49acad7a9935c1610 Author: Lee Jones Date: Tue Jul 21 17:41:22 2020 +0100 scsi: qla4xxx: Move 'qla4_83xx_reg_tbl' from shared header 'qla4_83xx_reg_tbl' is only used in 'drivers/scsi/qla4xxx/ql4_os.c', move it there. Fixes the following W=1 kernel build warning(s): In file included from drivers/scsi/qla4xxx/ql4_def.h:46, from drivers/scsi/qla4xxx/ql4_init.c:9: At top level: drivers/scsi/qla4xxx/ql4_83xx.h:90:23: warning: ‘qla4_83xx_reg_tbl’ defined but not used [-Wunused-const-variable=] 90 | static const uint32_t qla4_83xx_reg_tbl[] = { | ^~~~~~~~~~~~~~~~~ In file included from drivers/scsi/qla4xxx/ql4_def.h:46, from drivers/scsi/qla4xxx/ql4_mbx.c:9: drivers/scsi/qla4xxx/ql4_83xx.h:90:23: warning: ‘qla4_83xx_reg_tbl’ defined but not used [-Wunused-const-variable=] 90 | static const uint32_t qla4_83xx_reg_tbl[] = { | ^~~~~~~~~~~~~~~~~ [...] NB: Lots of these - snipped for brevity. Link: https://lore.kernel.org/r/20200721164148.2617584-15-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit b854460053ec44cc78f6514673dcfad3045c5a56 Author: Lee Jones Date: Tue Jul 21 17:41:21 2020 +0100 scsi: qla4xxx: Check return value of pci_set_mwi() pci_set_mwi() has 'warn_unused_result' so the result should be checked. Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_init.c: In function ‘qla4xxx_pci_config’: drivers/scsi/qla4xxx/ql4_init.c:664:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] And if 'status' is removed: drivers/scsi/qla4xxx/ql4_init.c: In function ‘qla4xxx_pci_config’: drivers/scsi/qla4xxx/ql4_init.c:666:2: warning: ignoring return value of ‘pci_set_mwi’, declared with attribute warn_unused_result [-Wunused-result] 666 | pci_set_mwi(ha->pdev); | ^~~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200721164148.2617584-14-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 4c2de9c54112fae35cd3e5879bb58020eb452798 Author: Lee Jones Date: Tue Jul 21 17:41:20 2020 +0100 scsi: qla4xxx: Remove set but unused variable 'func_number' Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_init.c: In function ‘ql4xxx_set_mac_number’: drivers/scsi/qla4xxx/ql4_init.c:17:10: warning: variable ‘func_number’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200721164148.2617584-13-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit cd2eebfd40289a685f9e2109beb39f04de633a8c Author: Lee Jones Date: Tue Jul 21 17:41:19 2020 +0100 scsi: pm8001: Add descriptions for unused 'attr' function parameters Clean-up some whitespace issues too whilst we're here. Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_ctl.c:102: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_fw_version_show' drivers/scsi/pm8001/pm8001_ctl.c:331: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_logging_level_show' drivers/scsi/pm8001/pm8001_ctl.c:400: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_ib_queue_log_show' drivers/scsi/pm8001/pm8001_ctl.c:433: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_ob_queue_log_show' drivers/scsi/pm8001/pm8001_ctl.c:464: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_bios_version_show' drivers/scsi/pm8001/pm8001_ctl.c:623: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_gsm_log_show' Link: https://lore.kernel.org/r/20200721164148.2617584-12-lee.jones@linaro.org Cc: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a0cf5ce40d125a5d30e39134fc66a376a5defc54 Author: Lee Jones Date: Tue Jul 21 17:41:18 2020 +0100 scsi: pm8001: Move function header and supply some missing parameter descriptions Functions must follow directly after the header that documents them. Fixes the following W=1 kernel build warning(s): from drivers/scsi/pm8001/pm8001_sas.c:41: inlined from ‘pm8001_issue_ssp_tmf’ at drivers/scsi/pm8001/pm8001_sas.c:919:2: drivers/scsi/pm8001/pm8001_sas.c:379: warning: Function parameter or member 'pm8001_dev' not described in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'task' description in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'num' description in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'gfp_flags' description in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'is_tmf' description in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:379: warning: Excess function parameter 'tmf' description in 'DEV_IS_GONE' drivers/scsi/pm8001/pm8001_sas.c:583: warning: Function parameter or member 'device_id' not described in 'pm8001_find_dev' drivers/scsi/pm8001/pm8001_sas.c:1000: warning: Function parameter or member 'dev' not described in 'pm8001_I_T_nexus_reset' Link: https://lore.kernel.org/r/20200721164148.2617584-11-lee.jones@linaro.org Cc: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 45c21cec386703a81e545b4c195f43e3bd255abb Author: Lee Jones Date: Tue Jul 21 17:41:16 2020 +0100 scsi: aic94xx: Fix kerneldoc formatting issue with 'task' Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic94xx/aic94xx_tmf.c:685: warning: Function parameter or member 'task' not described in 'asd_query_task' Link: https://lore.kernel.org/r/20200721164148.2617584-9-lee.jones@linaro.org Cc: Luben Tuikov Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a13689118f6364fcbb85f6f03553662b06989509 Author: Lee Jones Date: Tue Jul 21 17:41:15 2020 +0100 scsi: aacraid: Add descriptions for missing parameters Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p2' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p3' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p4' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p5' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'p6' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'status' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'r1' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'r2' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'r3' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Function parameter or member 'r4' not described in 'src_sync_cmd' drivers/scsi/aacraid/src.c:203: warning: Excess function parameter 'ret' description in 'src_sync_cmd' drivers/scsi/aacraid/src.c:609: warning: Function parameter or member 'dev' not described in 'aac_src_ioremap' drivers/scsi/aacraid/src.c:639: warning: Function parameter or member 'dev' not described in 'aac_srcv_ioremap' Link: https://lore.kernel.org/r/20200721164148.2617584-8-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ee37a6e6d2a19eedb69545ff8348265d2041101c Author: Lee Jones Date: Tue Jul 21 17:41:14 2020 +0100 scsi: aic94xx: Fix a couple of kerneldoc formatting issues Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic94xx/aic94xx_dev.c:246: warning: Function parameter or member 'dev' not described in 'asd_init_sata_pm_port_ddb' drivers/scsi/aic94xx/aic94xx_dev.c:290: warning: Function parameter or member 'dev' not described in 'asd_init_sata_pm_ddb' Link: https://lore.kernel.org/r/20200721164148.2617584-7-lee.jones@linaro.org Cc: Luben Tuikov Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 5d9d46b93d0a159fb94f964e14025b6cc7e67743 Author: Lee Jones Date: Tue Jul 21 17:41:13 2020 +0100 scsi: aacraid: Add missing description for 'dev' Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/nark.c:31: warning: Function parameter or member 'dev' not described in 'aac_nark_ioremap' Link: https://lore.kernel.org/r/20200721164148.2617584-6-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3c4538f80b0936cba5e7202c37f85563d61c25ac Author: Lee Jones Date: Tue Jul 21 17:41:12 2020 +0100 scsi: aacraid: Add missing description for 'dev' And clean-up a couple of whitespace issues while we're here. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/rkt.c:64: warning: Function parameter or member 'dev' not described in 'aac_rkt_ioremap' Link: https://lore.kernel.org/r/20200721164148.2617584-5-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit baef36891460d63914a8abf36d283c5b9cd2b890 Author: Lee Jones Date: Tue Jul 21 17:41:11 2020 +0100 scsi: aacraid: Add descriptions for missing parameters Also clean-up some white space issues while we're here. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p2' not described in 'sa_sync_cmd' drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p3' not described in 'sa_sync_cmd' drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p4' not described in 'sa_sync_cmd' drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p5' not described in 'sa_sync_cmd' drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'p6' not described in 'sa_sync_cmd' drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'r1' not described in 'sa_sync_cmd' drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'r2' not described in 'sa_sync_cmd' drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'r3' not described in 'sa_sync_cmd' drivers/scsi/aacraid/sa.c:147: warning: Function parameter or member 'r4' not described in 'sa_sync_cmd' drivers/scsi/aacraid/sa.c:290: warning: Function parameter or member 'dev' not described in 'aac_sa_ioremap' Link: https://lore.kernel.org/r/20200721164148.2617584-4-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 84dc1a1d54590340172e72c4cfffa05a1cce6b4c Author: Lee Jones Date: Tue Jul 21 17:41:10 2020 +0100 scsi: aic7xxx: aic79xx_core: Remove a bunch of unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_dump_sglist’: drivers/scsi/aic7xxx/aic79xx_core.c:1738:14: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] 1738 | uint32_t len; | ^~~ drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_handle_seqint’: drivers/scsi/aic7xxx/aic79xx_core.c:1911:26: warning: variable ‘tinfo’ set but not used [-Wunused-but-set-variable] 1911 | struct ahd_transinfo *tinfo; | ^~~~~ drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_handle_transmission_error’: drivers/scsi/aic7xxx/aic79xx_core.c:2672:8: warning: variable ‘lqistat2’ set but not used [-Wunused-but-set-variable] 2672 | u_int lqistat2; | ^~~~~~~~ drivers/scsi/aic7xxx/aic79xx_core.c: In function ‘ahd_update_pending_scbs’: drivers/scsi/aic7xxx/aic79xx_core.c:4221:31: warning: variable ‘tinfo’ set but not used [-Wunused-but-set-variable] 4221 | struct ahd_initiator_tinfo *tinfo; | ^~~~~ Link: https://lore.kernel.org/r/20200721164148.2617584-3-lee.jones@linaro.org Cc: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 7c7ef829ad080958643c1c768c029ed6bd421181 Author: Lee Jones Date: Tue Jul 21 17:41:09 2020 +0100 scsi: arcmsr: arcmsr_hba: Remove statement with no effect According to LKP, commit 18bc435e0a1d ("scsi: arcmsr: Remove some set but unused variables") can be furthered to remove the entire statement and not just the unused variable read into. Snipped LKP report: config: x86_64-randconfig-m001-20200719 compiler: gcc-9 (Debian 9.3.0-14) 9.3.0 New smatch warnings: drivers/scsi/arcmsr/arcmsr_hba.c:1490 arcmsr_done4abort_postqueue() warn: statement has no effect 8 drivers/scsi/arcmsr/arcmsr_hba.c:2459 arcmsr_hbaD_postqueue_isr() warn: statement has no effect 8 drivers/scsi/arcmsr/arcmsr_hba.c:3526 arcmsr_hbaD_polling_ccbdone() warn: statement has no effect 8 1a4f550a09f89e Nick Cheng 2007-09-13 1401 static void arcmsr_done4abort_postqueue(struct AdapterControlBlock *acb) 1a4f550a09f89e Nick Cheng 2007-09-13 1402 { [...] 18bc435e0a1de2 Lee Jones 2020-07-13 @1490 pmu->done_qbuffer[doneq_index & 0xFFF].addressHigh; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Delete this line. [...] Link: https://lore.kernel.org/r/20200721164148.2617584-2-lee.jones@linaro.org Cc: support@areca.com.tw Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 003015b890e1629a703af95823d16346798f835c Author: Wang Hai Date: Sat Jul 18 20:32:24 2020 +0800 scsi: dpt_i2o: Remove superfluous memset() Fixes coccicheck warning: ./drivers/scsi/dpt_i2o.c:3070:11-29: WARNING: dma_alloc_coherent use in sys_tbl already zeroes out memory, so memset is not needed ./drivers/scsi/dpt_i2o.c:2780:10-28: WARNING: dma_alloc_coherent use in status already zeroes out memory, so memset is not needed ./drivers/scsi/dpt_i2o.c:2834:20-38: WARNING: dma_alloc_coherent use in pHba -> reply_pool already zeroes out memory, so memset is not needed ./drivers/scsi/dpt_i2o.c:1328:10-28: WARNING: dma_alloc_coherent use in status already zeroes out memory, so memset is not needed Link: https://lore.kernel.org/r/20200718123224.1202-1-wanghai38@huawei.com Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: Martin K. Petersen commit 811f39479c0c2d4da959b8d915f2f699d70ab143 Author: Ye Bin Date: Fri Jul 17 17:09:21 2020 +0800 scsi: core: Delete unnecessary buffer allocation for every loop iteration No need to allocate buffer every loop iteration. Allocate buffer once and reuse it. Link: https://lore.kernel.org/r/20200717090921.29243-2-yebin10@huawei.com Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit f30785db7546520acd53aac7497d42352ff031e0 Author: Ye Bin Date: Fri Jul 17 17:09:20 2020 +0800 scsi: core: Add missing scsi_device_put() in scsi_host_block() The scsi_host_block() case was missing in commit 4dea170f4fb2 ("scsi: core: Fix incorrect usage of shost_for_each_device"). Link: https://lore.kernel.org/r/20200717090921.29243-1-yebin10@huawei.com Fixes: 2bb955840c1d ("scsi: core: add scsi_host_(block,unblock) helper function") Fixes: 4dea170f4fb2 ("scsi: core: Fix incorrect usage of shost_for_each_device") Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit e73a5e8e8003978e65d368f5475e36e1e2a0613b Author: Hannes Reinecke Date: Mon Jun 22 08:30:22 2020 +0200 scsi: core: Only return started requests from scsi_host_find_tag() scsi_host_find_tag() is used by the drivers to return a scsi command based on the command tag. Typically it's used from the interrupt handler to fetch the command associated with a value returned from hardware. Some drivers like fnic or qla4xxx, however, also use it also to traverse outstanding commands. With the current implementation scsi_host_find_tag() will return commands even if they are not started (i.e. passed to the driver). This will result in random errors with those drivers. With this patch scsi_host_find_tag() will only return 'started' commands (i.e. commands which have been passed to the drivers) thus avoiding the above issue. The other use cases will be unaffected as the interrupt handler naturally will only ever return 'started' requests. Link: https://lore.kernel.org/r/20200622063022.67891-1-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit e2289db1ccc6f217287227d5570b40fb7ce6ae89 Author: Miaohe Lin Date: Mon Jul 20 16:39:04 2020 +0800 scsi: fcoe: Use eth_zero_addr() to clear mac address Use eth_zero_addr() to clear mac address insetad of memset(). Link: https://lore.kernel.org/r/1595234344-13955-1-git-send-email-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Signed-off-by: Martin K. Petersen commit 51d263cbdd769eea65da2f13e393b542085af10d Author: Miaohe Lin Date: Mon Jul 20 16:24:58 2020 +0800 scsi: fnic: Use eth_broadcast_addr() to assign broadcast address Use eth_broadcast_addr() to assign broadcast address insetad of memset(). Link: https://lore.kernel.org/r/1595233498-13628-1-git-send-email-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Signed-off-by: Martin K. Petersen commit 584d902eb10e845cf3e1828b63b184b35ac2e023 Author: Colin Ian King Date: Thu Jul 23 15:26:14 2020 +0100 scsi: isci: Remove redundant initialization of variable 'status' The variable 'status' is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Link: https://lore.kernel.org/r/20200723142614.991416-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Unused value") commit 61965bf6c142bae20bee2cea01b1796f1a18595a Author: Varun Prakash Date: Thu Jul 23 17:26:31 2020 +0530 scsi: libcxgbi: Remove unnecessary NULL checks for 'tdata' pointer 'tdata' pointer will never be NULL so remove NULL checks. Link: https://lore.kernel.org/r/1595505391-3335-1-git-send-email-varun@chelsio.com Reported-by: Dan Carpenter Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit edd7dd2292ab9c3628b65c4d04514c3068ad54f6 Author: Finn Thain Date: Thu Jul 23 09:25:51 2020 +1000 scsi: mesh: Fix panic after host or bus reset Booting Linux with a Conner CP3200 drive attached to the MESH SCSI bus results in EH measures and a panic: [ 25.499838] mesh: configured for synchronous 5 MB/s [ 25.787154] mesh: performing initial bus reset... [ 29.867115] scsi host0: MESH [ 29.929527] mesh: target 0 synchronous at 3.6 MB/s [ 29.998763] scsi 0:0:0:0: Direct-Access CONNER CP3200-200mb-3.5 4040 PQ: 0 ANSI: 1 CCS [ 31.989975] sd 0:0:0:0: [sda] 415872 512-byte logical blocks: (213 MB/203 MiB) [ 32.070975] sd 0:0:0:0: [sda] Write Protect is off [ 32.137197] sd 0:0:0:0: [sda] Mode Sense: 5b 00 00 08 [ 32.209661] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [ 32.332708] sda: [mac] sda1 sda2 sda3 [ 32.417733] sd 0:0:0:0: [sda] Attached SCSI disk ... snip ... [ 76.687067] mesh_abort((ptrval)) [ 76.743606] mesh: state at (ptrval), regs at (ptrval), dma at (ptrval) [ 76.810798] ct=6000 seq=86 bs=4017 fc= 0 exc= 0 err= 0 im= 7 int= 0 sp=85 [ 76.880720] dma stat=84e0 cmdptr=1f73d000 [ 76.941387] phase=4 msgphase=0 conn_tgt=0 data_ptr=24576 [ 77.005567] dma_st=1 dma_ct=0 n_msgout=0 [ 77.065456] target 0: req=(ptrval) goes_out=0 saved_ptr=0 [ 77.130512] mesh_abort((ptrval)) [ 77.187670] mesh: state at (ptrval), regs at (ptrval), dma at (ptrval) [ 77.255594] ct=6000 seq=86 bs=4017 fc= 0 exc= 0 err= 0 im= 7 int= 0 sp=85 [ 77.325778] dma stat=84e0 cmdptr=1f73d000 [ 77.387239] phase=4 msgphase=0 conn_tgt=0 data_ptr=24576 [ 77.453665] dma_st=1 dma_ct=0 n_msgout=0 [ 77.515900] target 0: req=(ptrval) goes_out=0 saved_ptr=0 [ 77.582902] mesh_host_reset [ 88.187083] Kernel panic - not syncing: mesh: double DMA start ! [ 88.254510] CPU: 0 PID: 358 Comm: scsi_eh_0 Not tainted 5.6.13-pmac #1 [ 88.323302] Call Trace: [ 88.378854] [e16ddc58] [c0027080] panic+0x13c/0x308 (unreliable) [ 88.446221] [e16ddcb8] [c02b2478] mesh_start.part.12+0x130/0x414 [ 88.513298] [e16ddcf8] [c02b2fc8] mesh_queue+0x54/0x70 [ 88.577097] [e16ddd18] [c02a1848] scsi_send_eh_cmnd+0x374/0x384 [ 88.643476] [e16dddc8] [c02a1938] scsi_eh_tur+0x5c/0xb8 [ 88.707878] [e16dddf8] [c02a1ab8] scsi_eh_test_devices+0x124/0x178 [ 88.775663] [e16dde28] [c02a2094] scsi_eh_ready_devs+0x588/0x8a8 [ 88.843124] [e16dde98] [c02a31d8] scsi_error_handler+0x344/0x520 [ 88.910697] [e16ddf08] [c00409c8] kthread+0xe4/0xe8 [ 88.975166] [e16ddf38] [c000f234] ret_from_kernel_thread+0x14/0x1c [ 89.044112] Rebooting in 180 seconds.. In theory, a panic can happen after a bus or host reset with dma_started flag set. Fix this by halting the DMA before reinitializing the host. Don't assume that ms->current_req is set when halt_dma() is invoked as it may not hold for bus or host reset. BTW, this particular Conner drive can be made to work by inhibiting disconnect/reselect with 'mesh.resel_targets=0'. Link: https://lore.kernel.org/r/3952bc691e150a7128b29120999b6092071b039a.1595460351.git.fthain@telegraphics.com.au Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: Paul Mackerras Reported-and-tested-by: Stan Johnson Signed-off-by: Finn Thain Signed-off-by: Martin K. Petersen commit 55eb809f5e1c6d2a57e4c24a574fe09065e62534 Author: Colin Ian King Date: Wed Jul 22 16:44:04 2020 +0100 scsi: libsas: Remove redundant assignment to variable res The variable 'res' is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Link: https://lore.kernel.org/r/20200722154404.959267-1-colin.king@canonical.com Reviewed-by: John Garry Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Unused value") commit 386533796574bcdfe25ef3b8c520bc5f3a9d7c89 Author: Luo Jiaxing Date: Wed Jul 22 17:04:03 2020 +0800 scsi: libsas: Check link status in ATA prereset() libata currently attempts to reset even if the SATA disk is unplugged. To avoid the meaningless reset of a missing disk, libsas should report offline status to libata. libata already provides a .prereset callback for this purpose. This is called by ata_eh_reset() and can be used to influence whether a reset attempt should be made. Add sas_ata_preset callback to check status of phy and disk. If the disk is already offline or phy is disabled, we return -ENOENT to libata to avoid the reset. Link: https://lore.kernel.org/r/1595408643-63011-3-git-send-email-luojiaxing@huawei.com Reviewed-by: John Garry Reviewed-by: Jason Yan Signed-off-by: Luo Jiaxing Signed-off-by: Martin K. Petersen commit 3a243c2c35002f51ff1e62a4337cffe39b17f3d6 Author: Luo Jiaxing Date: Wed Jul 22 17:04:02 2020 +0800 scsi: libsas: Remove postreset from sas_sata_ops sas_sata_ops uses ata_std_postreset as .postreset callback. However, ata_std_postreset() calls sata_scr_read()/sata_scr_write() which need to access the ATA SCR register. This register not available in the libsas case and the functions always return -EOPNOTSUPP. Drop the .postreset callback. Link: https://lore.kernel.org/r/1595408643-63011-2-git-send-email-luojiaxing@huawei.com Reviewed-by: John Garry Reviewed-by: Jason Yan Signed-off-by: Luo Jiaxing Signed-off-by: Martin K. Petersen commit e3d2bf6505ddd4d11226dc2ad2071981564a35db Author: Guenter Roeck Date: Tue Jul 21 19:30:27 2020 -0700 scsi: lpfc: Add dependency on CPU_FREQ Since commit 317aeb83c92b ("scsi: lpfc: Add blk_io_poll support for latency improvment"), the lpfc driver depends on CPUFREQ. Without it, builds fail with drivers/scsi/lpfc/lpfc_sli.c: In function 'lpfc_init_idle_stat_hb': drivers/scsi/lpfc/lpfc_sli.c:7329:26: error: implicit declaration of function 'get_cpu_idle_time' Add the missing dependency. Link: https://lore.kernel.org/r/20200722023027.36866-1-linux@roeck-us.net Fixes: 317aeb83c92b ("scsi: lpfc: Add blk_io_poll support for latency improvment") Cc: Dick Kennedy Cc: James Smart Reviewed-by: James Smart Signed-off-by: Guenter Roeck Signed-off-by: Martin K. Petersen commit 6671eebd672c50814fa09d23ba9cc117506aa67c Author: Liao Pingfang Date: Tue Jul 14 18:59:31 2020 +0800 scsi: ppa: Remove superfluous breaks Remove superfluous breaks, as there is a "return" before them. Link: https://lore.kernel.org/r/1594724371-11677-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang Signed-off-by: Martin K. Petersen commit b54dc46cbe7123e68e7cafe2ef2f5fca41603b4e Author: Liao Pingfang Date: Tue Jul 14 18:59:27 2020 +0800 scsi: imm: Remove superfluous breaks Remove superfluous breaks, as there is a "return" before them. Link: https://lore.kernel.org/r/1594724367-11593-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang Signed-off-by: Martin K. Petersen commit 8f38f8e0a30e1c33cdfc48eba2bd63ac2eae373a Author: Alan Stern Date: Mon Jul 6 11:14:36 2020 -0400 scsi: block: pm: Simplify resume handling Commit 05d18ae1cc8a ("scsi: pm: Balance pm_only counter of request queue during system resume") fixed a problem in the block layer's runtime-PM code: blk_set_runtime_active() failed to call blk_clear_pm_only(). However, the commit's implementation was awkward; it forced the SCSI system-resume handler to choose whether to call blk_post_runtime_resume() or blk_set_runtime_active(), depending on whether or not the SCSI device had previously been runtime suspended. This patch simplifies the situation considerably by adding the missing function call directly into blk_set_runtime_active() (under the condition that the queue is not already in the RPM_ACTIVE state). This allows the SCSI routine to revert back to its original form. Furthermore, making this change reveals that blk_post_runtime_resume() (in its success pathway) does exactly the same thing as blk_set_runtime_active(). The duplicate code is easily removed by making one routine call the other. No functional changes are intended. Link: https://lore.kernel.org/r/20200706151436.GA702867@rowland.harvard.edu CC: Can Guo CC: Bart Van Assche Reviewed-by: Bart Van Assche Signed-off-by: Alan Stern Signed-off-by: Martin K. Petersen commit df4ec2fa7a4dc20bed62a407f77b5c57f1afbbc8 Author: Eric Biggers Date: Fri Jul 10 00:20:12 2020 -0700 scsi: ufs-qcom: Add Inline Crypto Engine support Add support for Qualcomm Inline Crypto Engine (ICE) to ufs-qcom. The standards-compliant parts, such as querying the crypto capabilities and enabling crypto for individual UFS requests, are already handled by ufshcd-crypto.c, which itself is wired into the blk-crypto framework. However, ICE requires vendor-specific init, enable, and resume logic, and it requires that keys be programmed and evicted by vendor-specific SMC calls. Make the ufs-qcom driver handle these details. I tested this on Dragonboard 845c, which is a publicly available development board that uses the Snapdragon 845 SoC and runs the upstream Linux kernel. This is the same SoC used in the Pixel 3 and Pixel 3 XL phones. This testing included (among other things) verifying that the expected ciphertext was produced, both manually using ext4 encryption and automatically using a block layer self-test I've written. I've also tested that this driver works nearly as-is on the Snapdragon 765 and Snapdragon 865 SoCs. And others have tested it on Snapdragon 850, Snapdragon 855, and Snapdragon 865 (see the Tested-by tags). This is based very loosely on the vendor-provided driver in the kernel source code for the Pixel 3, but I've greatly simplified it. Also, for now I've only included support for major version 3 of ICE, since that's all I have the hardware to test with the mainline kernel. Plus it appears that version 3 is easier to use than older versions of ICE. For now, only allow using AES-256-XTS. The hardware also declares support for AES-128-XTS, AES-{128,256}-ECB, and AES-{128,256}-CBC (BitLocker variant). But none of these others are really useful, and they'd need to be individually tested to be sure they worked properly. This commit also changes the name of the loadable module from "ufs-qcom" to "ufs_qcom", as this is necessary to compile it from multiple source files (unless we were to rename ufs-qcom.c). Link: https://lore.kernel.org/r/20200710072013.177481-6-ebiggers@kernel.org Tested-by: Steev Klimaszewski # Lenovo Yoga C630 Tested-by: Thara Gopinath # db845c, sm8150-mtp, sm8250-mtp Reviewed-by: Avri Altman Acked-by: Bjorn Andersson Signed-off-by: Eric Biggers Signed-off-by: Martin K. Petersen commit 1bc726e26ef317579274b4aa9e32425bdf4301db Author: Eric Biggers Date: Fri Jul 10 00:20:11 2020 -0700 scsi: ufs: Add program_key() variant op On Snapdragon SoCs, the Linux kernel isn't permitted to directly access the standard UFS crypto configuration registers. Instead, programming and evicting keys must be done through vendor-specific SMC calls. To support this hardware, add a ->program_key() method to 'struct ufs_hba_variant_ops'. This allows overriding the UFS standard key programming / eviction procedure. Link: https://lore.kernel.org/r/20200710072013.177481-5-ebiggers@kernel.org Reviewed-by: Avri Altman Signed-off-by: Eric Biggers Signed-off-by: Martin K. Petersen commit 083dd788e4c12aea12fd9367e2f7c5ee2949b690 Author: Eric Biggers Date: Fri Jul 10 00:20:09 2020 -0700 scsi: ufs-qcom: Name the dev_ref_clk_ctrl registers In preparation for adding another optional register range to the ufs-qcom driver, name the existing optional register range "dev_ref_clk_ctrl_mem". This allows the driver to refer to the optional register ranges by name rather than index. No device-tree files actually have to be updated due to this change, since none of them actually declares these registers. Link: https://lore.kernel.org/r/20200710072013.177481-3-ebiggers@kernel.org Reviewed-by: Avri Altman Reviewed-by: Bjorn Andersson Signed-off-by: Eric Biggers Signed-off-by: Martin K. Petersen commit 0f206514749be9988a083ca364b889a7fcff7f78 Author: Eric Biggers Date: Fri Jul 10 00:20:08 2020 -0700 scsi: firmware: qcom_scm: Add support for programming inline crypto keys Add support for the Inline Crypto Engine (ICE) key programming interface that's needed for the ufs-qcom driver to use inline encryption on Snapdragon SoCs. This interface consists of two SCM calls: one to program a key into a keyslot, and one to invalidate a keyslot. Although the UFS specification defines a standard way to do this, on these SoCs the Linux kernel isn't permitted to access the needed crypto configuration registers directly; these SCM calls must be used instead. Link: https://lore.kernel.org/r/20200710072013.177481-2-ebiggers@kernel.org Acked-by: Bjorn Andersson Signed-off-by: Eric Biggers Signed-off-by: Martin K. Petersen commit 3eef38a14370c673134600130094472e2c3f4041 Author: Hannes Reinecke Date: Tue Jul 14 18:03:01 2020 +0200 scsi: aic79xx: Restore modes when exiting ahd_linux_queue_abort_cmd() ahd_linux_queue_abort_cmd() calls ahd_save_modes() without calling ahd_restore_modes() before exiting. Link: https://lore.kernel.org/r/20200714160301.4482-1-hare@suse.de Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 1eb81df5c53b1e785fdef298d533feab991381e4 Author: Tomas Henzl Date: Thu Jul 9 15:31:44 2020 +0200 scsi: megaraid_sas: Clear affinity hint To avoid a warning in free_irq, clear the affinity hint. Link: https://lore.kernel.org/r/20200709133144.8363-1-thenzl@redhat.com Fixes: f0b9e7bdc309 ("scsi: megaraid_sas: Set affinity for high IOPS reply queues") Acked-by: Sumit Saxena Signed-off-by: Tomas Henzl Signed-off-by: Martin K. Petersen commit 654cc541a949e971e7a500710b7dacc7031ee9cc Author: Don Brace Date: Mon Jul 20 16:53:09 2020 -0500 scsi: hpsa: Bump version Link: https://lore.kernel.org/r/159528198909.24772.9189002306398058371.stgit@brunhilda Reviewed-by: Gerry Morong Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 30bda7848a23980c7eecda4a1148e093d3e98de0 Author: Don Brace Date: Mon Jul 20 16:53:03 2020 -0500 scsi: hpsa: Increase controller error handling timeout The controller can become slow to respond to SCSI INQUIRY requests resulting in the SCSI midlayer offlining the controller device. Increase the timeout value for commands sent to the controller device. Link: https://lore.kernel.org/r/159528198335.24772.7963614374905470122.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 9bb872a725f6ff34e83a6d3e7ada118f2a1da684 Author: Don Brace Date: Mon Jul 20 16:52:57 2020 -0500 scsi: hpsa: Increase queue depth for external LUNs Increase queue_depth for PTRAID devices to improve performance. Link: https://lore.kernel.org/r/159528197765.24772.15623281371636788406.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 27e1b94dc9af605a9a611a75ab88f773e9dc6f88 Author: Don Brace Date: Mon Jul 20 16:52:51 2020 -0500 scsi: hpsa: Correct rare oob condition There are some rare conditions where a spare is first in the device list causing an array out-of-bounds condition. Link: https://lore.kernel.org/r/159528197176.24772.14659026352708896249.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit e6b9489acc7e679fe6107a98ab315b28977c0553 Author: Randy Dunlap Date: Sat Jul 18 17:32:32 2020 -0700 scsi: scsi_transport_iscsi: Drop a duplicated word Drop the repeated word "the" in a comment. Link: https://lore.kernel.org/r/20200719003232.21301-1-rdunlap@infradead.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit ede74559ed8b1e1d1ac5611db1057ab0ec5b213b Author: Xiongfeng Wang Date: Fri Jul 17 16:44:32 2020 +0800 scsi: scsi_transport_sas: Add missing newline in sysfs 'enable' attribute Add newline when formatting SAS transport class phy 'enable' attribute. [root@localhost ~]# cat /sys/devices/pci0000:00/0000:00:0d.0/0000:0f:00.0/host3/phy-3:2/sas_phy/phy-3:2/enable 1[root@localhost ~]# Link: https://lore.kernel.org/r/1594975472-12486-1-git-send-email-wangxiongfeng2@huawei.com Reviewed-by: John Garry Reviewed-by: Bart van Assche Signed-off-by: Xiongfeng Wang Signed-off-by: Martin K. Petersen commit b9245385f73c11c908e0f652b7c5b9bda3b36374 Author: Johannes Thumshirn Date: Thu Jul 16 18:16:06 2020 +0900 scsi: sd_zbc: Don't limit max_zone_append sectors to max_hw_sectors Don't clamp the maximum number of zone append sectors to the maximum number of hardware sectors in sd as the block layer is already enforcing this limit when setting max_zone_append_sectors. Link: https://lore.kernel.org/r/20200716091606.38316-1-johannes.thumshirn@wdc.com Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen commit 9b964f16546167fd1d5dfcf4d66f5cc9bf608525 Author: Wang Hai Date: Fri Jul 24 21:46:30 2020 +0800 net: hix5hd2_gmac: Remove unneeded cast from memory allocation Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: ./drivers/net/ethernet/hisilicon/hix5hd2_gmac.c:1027:9-23: WARNING: casting value returned by memory allocation function to (struct sg_desc *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit a8cf7d03319eca9abfb5d890283be0de2e692179 Merge: fb92f57b4a4e1 ab6934e084e5e Author: David S. Miller Date: Fri Jul 24 17:19:14 2020 -0700 Merge branch 'l2tp-avoid-multiple-assignment-remove-BUG_ON' Tom Parkin says: ==================== l2tp: avoid multiple assignment, remove BUG_ON l2tp hasn't been kept up to date with the static analysis checks offered by checkpatch.pl. This patchset builds on the series: "l2tp: cleanup checkpatch.pl warnings" and "l2tp: further checkpatch.pl cleanups" to resolve some of the remaining checkpatch warnings in l2tp. ==================== Signed-off-by: David S. Miller commit ab6934e084e5eee665adf6e834e5096ebae4a95f Author: Tom Parkin Date: Fri Jul 24 16:31:57 2020 +0100 l2tp: WARN_ON rather than BUG_ON in l2tp_session_free l2tp_session_free called BUG_ON if the tunnel magic feather value wasn't correct. The intent of this was to catch lifetime bugs; for example early tunnel free due to incorrect use of reference counts. Since the tunnel magic feather being wrong indicates either early free or structure corruption, we can avoid doing more damage by simply leaving the tunnel structure alone. If the tunnel refcount isn't dropped when it should be, the tunnel instance will remain in the kernel, resulting in the tunnel structure and socket leaking. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 0dd62f69d898de3cf31a2f8b59e9a62bb5448457 Author: Tom Parkin Date: Fri Jul 24 16:31:56 2020 +0100 l2tp: remove BUG_ON refcount value in l2tp_session_free l2tp_session_free is only called by l2tp_session_dec_refcount when the reference count reaches zero, so it's of limited value to validate the reference count value in l2tp_session_free itself. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 493048f5dfcd0093880414928717f68613ba9157 Author: Tom Parkin Date: Fri Jul 24 16:31:55 2020 +0100 l2tp: WARN_ON rather than BUG_ON in l2tp_session_queue_purge l2tp_session_queue_purge is used during session shutdown to drop any skbs queued for reordering purposes according to L2TP dataplane rules. The BUG_ON in this function checks the session magic feather in an attempt to catch lifetime bugs. Rather than crashing the kernel with a BUG_ON, we can simply WARN_ON and refuse to do anything more -- in the worst case this could result in a leak. However this is highly unlikely given that the session purge only occurs from codepaths which have obtained the session by means of a lookup via. the parent tunnel and which check the session "dead" flag to protect against shutdown races. While we're here, have l2tp_session_queue_purge return void rather than an integer, since neither of the callsites checked the return value. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit ebb4f5e6e4cd68a856aeea5d319a76f47543c3a9 Author: Tom Parkin Date: Fri Jul 24 16:31:54 2020 +0100 l2tp: don't BUG_ON seqfile checks in l2tp_ppp checkpatch advises that WARN_ON and recovery code are preferred over BUG_ON which crashes the kernel. l2tp_ppp has a BUG_ON check of struct seq_file's private pointer in pppol2tp_seq_start prior to accessing data through that pointer. Rather than crashing, we can simply bail out early and return NULL in order to terminate the seq file processing in much the same way as we do when reaching the end of tunnel/session instances to render. Retain a WARN_ON to help trace possible bugs in this area. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 1aa646ac71feb987a9571e1d70980d10ff495fbc Author: Tom Parkin Date: Fri Jul 24 16:31:53 2020 +0100 l2tp: don't BUG_ON session magic checks in l2tp_ppp checkpatch advises that WARN_ON and recovery code are preferred over BUG_ON which crashes the kernel. l2tp_ppp.c's BUG_ON checks of the l2tp session structure's "magic" field occur in code paths where it's reasonably easy to recover: * In the case of pppol2tp_sock_to_session, we can return NULL and the caller will bail out appropriately. There is no change required to any of the callsites of this function since they already handle pppol2tp_sock_to_session returning NULL. * In the case of pppol2tp_session_destruct we can just avoid decrementing the reference count on the suspect session structure. In the worst case scenario this results in a memory leak, which is preferable to a crash. Convert these uses of BUG_ON to WARN_ON accordingly. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit cd3e29b333cc2571a5875d1b45c460dc948a2f95 Author: Tom Parkin Date: Fri Jul 24 16:31:52 2020 +0100 l2tp: remove BUG_ON in l2tp_tunnel_closeall l2tp_tunnel_closeall is only called from l2tp_core.c, and it's easy to statically analyse the code path calling it to validate that it should never be passed a NULL tunnel pointer. Having a BUG_ON checking the tunnel pointer triggers a checkpatch warning. Since the BUG_ON is of no value, remove it to avoid the warning. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit ce2f86ae253de3f3e961d4f91438604a97c29752 Author: Tom Parkin Date: Fri Jul 24 16:31:51 2020 +0100 l2tp: remove BUG_ON in l2tp_session_queue_purge l2tp_session_queue_purge is only called from l2tp_core.c, and it's easy to statically analyse the code paths calling it to validate that it should never be passed a NULL session pointer. Having a BUG_ON checking the session pointer triggers a checkpatch warning. Since the BUG_ON is of no value, remove it to avoid the warning. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 7a379558c28c435681221aa5d84ead8ff19211be Author: Tom Parkin Date: Fri Jul 24 16:31:50 2020 +0100 l2tp: WARN_ON rather than BUG_ON in l2tp_dfs_seq_start l2tp_dfs_seq_start had a BUG_ON to catch a possible programming error in l2tp_dfs_seq_open. Since we can easily bail out of l2tp_dfs_seq_start, prefer to do that and flag the error with a WARN_ON rather than crashing the kernel. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 95075150d0bdaa78cc350efc606e6ed02fa2a991 Author: Tom Parkin Date: Fri Jul 24 16:31:49 2020 +0100 l2tp: avoid multiple assignments checkpatch warns about multiple assignments. Update l2tp accordingly. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit fb92f57b4a4e1bde03373d4f218a67f8ac44e8d5 Merge: 623b57bec7c8d 01370434df85e Author: David S. Miller Date: Fri Jul 24 17:12:41 2020 -0700 Merge branch 'icmp6-support-rfc-4884' Willem de Bruijn says: ==================== icmp6: support rfc 4884 Extend the feature merged earlier this week for IPv4 to IPv6. I expected this to be a single patch, but patch 1 seemed better to be stand-alone patch 1: small fix in length calculation patch 2: factor out ipv4-specific patch 3: add ipv6 changes v1->v2: add missing static keyword in patch 3 ==================== Signed-off-by: David S. Miller commit 01370434df85eb76ecb1527a4466013c4aca2436 Author: Willem de Bruijn Date: Fri Jul 24 09:03:10 2020 -0400 icmp6: support rfc 4884 Extend the rfc 4884 read interface introduced for ipv4 in commit eba75c587e81 ("icmp: support rfc 4884") to ipv6. Add socket option SOL_IPV6/IPV6_RECVERR_RFC4884. Changes v1->v2: - make ipv6_icmp_error_rfc4884 static (file scope) Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 178c49d9f9a4b5ade00c93480d714708fe971e24 Author: Willem de Bruijn Date: Fri Jul 24 09:03:09 2020 -0400 icmp: prepare rfc 4884 for ipv6 The RFC 4884 spec is largely the same between IPv4 and IPv6. Factor out the IPv4 specific parts in preparation for IPv6 support: - icmp types supported - icmp header size, and thus offset to original datagram start - datagram length field offset in icmp(6)hdr. - datagram length field word size: 4B for IPv4, 8B for IPv6. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit c4e9e09f5589f9afe6b8f8c4fb078e0559bca667 Author: Willem de Bruijn Date: Fri Jul 24 09:03:08 2020 -0400 icmp: revise rfc4884 tests 1) Only accept packets with original datagram len field >= header len. The extension header must start after the original datagram headers. The embedded datagram len field is compared against the 128B minimum stipulated by RFC 4884. It is unlikely that headers extend beyond this. But as we know the exact header length, check explicitly. 2) Remove the check that datagram length must be <= 576B. This is a send constraint. There is no value in testing this on rx. Within private networks it may be known safe to send larger packets. Process these packets. This test was also too lax. It compared original datagram length rather than entire icmp packet length. The stand-alone fix would be: - if (hlen + skb->len > 576) + if (-skb_network_offset(skb) + skb->len > 576) Fixes: eba75c587e81 ("icmp: support rfc 4884") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 623b57bec7c8daf89623c95cd9cc919e4090c9da Author: Colin Ian King Date: Fri Jul 24 14:09:19 2020 +0100 sctp: remove redundant initialization of variable status The variable status is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Also put the variable declarations into reverse christmas tree order. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit a65878d6f00bb2d791348ae90dcc2ede1dbe2b91 Author: Eelco Chaudron Date: Fri Jul 24 10:20:59 2020 +0200 net: openvswitch: fixes potential deadlock in dp cleanup code The previous patch introduced a deadlock, this patch fixes it by making sure the work is canceled without holding the global ovs lock. This is done by moving the reorder processing one layer up to the netns level. Fixes: eac87c413bf9 ("net: openvswitch: reorder masks array based on usage") Reported-by: syzbot+2c4ff3614695f75ce26c@syzkaller.appspotmail.com Reported-by: syzbot+bad6507e5db05017b008@syzkaller.appspotmail.com Reviewed-by: Paolo Signed-off-by: Eelco Chaudron Signed-off-by: David S. Miller commit dfd3d5266dc1d9a2b06e5a09bbff4cee547eeb5f Author: Christoph Hellwig Date: Fri Jul 24 08:48:55 2020 +0200 sctp: fix slab-out-of-bounds in SCTP_DELAYED_SACK processing This sockopt accepts two kinds of parameters, using struct sctp_sack_info and struct sctp_assoc_value. The mentioned commit didn't notice an implicit cast from the smaller (latter) struct to the bigger one (former) when copying the data from the user space, which now leads to an attempt to write beyond the buffer (because it assumes the storing buffer is bigger than the parameter itself). Fix it by allocating a sctp_sack_info on stack and filling it out based on the small struct for the compat case. Changelog stole from an earlier patch from Marcelo Ricardo Leitner. Fixes: ebb25defdc17 ("sctp: pass a kernel pointer to sctp_setsockopt_delayed_ack") Reported-by: syzbot+0e4699d000d8b874d8dc@syzkaller.appspotmail.com Signed-off-by: Christoph Hellwig Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit aab99b62b4d007346bff277c82cdc3e64f3e4121 Merge: 2d6be17d85f43 c2b352262af43 Author: David S. Miller Date: Fri Jul 24 16:39:28 2020 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2020-07-23 This series contains updates to ice driver only. Jake refactors ice_discover_caps() to reduce the number of AdminQ calls made. Splits ice_parse_caps() to separate functions to update function and device capabilities separately to allow for updating outside of initialization. Akeem adds power management support. Paul G refactors FC and FEC code to aid in restoring of PHY settings on media insertion. Implements lenient mode and link override support. Adds link debug info and formats existing debug info to be more readable. Adds support to check and report additional autoneg capabilities. Implements the capability to detect media cage in order to differentiate AUI types as Direct Attach or backplane. Bruce implements Total Port Shutdown for devices that support it. Lev renames low_power_ctrl field to lower_power_ctrl_an to be more descriptive of the field. Doug reports AOC types as media type fiber. Paul S adds code to handle 1G SGMII PHY type. ==================== Signed-off-by: David S. Miller commit 2d6be17d85f43cdd74901571f2d1a3955a33d027 Author: David S. Miller Date: Fri Jul 24 16:36:13 2020 -0700 mISDN: Don't try to print a sockptr_t from debug logging code. drivers/isdn/mISDN/socket.c: In function ‘data_sock_setsockopt’: ./include/linux/kern_levels.h:5:18: warning: format ‘%p’ expects argument of type ‘void *’, but argument 6 has type ‘sockptr_t’ [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ./include/linux/kern_levels.h:15:20: note: in expansion of macro ‘KERN_SOH’ 15 | #define KERN_DEBUG KERN_SOH "7" /* debug-level messages */ | ^~~~~~~~ drivers/isdn/mISDN/socket.c:410:10: note: in expansion of macro ‘KERN_DEBUG’ 410 | printk(KERN_DEBUG "%s(%p, %d, %x, %p, %d)\n", __func__, sock, | ^~~~~~~~~~ drivers/isdn/mISDN/socket.c:410:38: note: format string is defined here 410 | printk(KERN_DEBUG "%s(%p, %d, %x, %p, %d)\n", __func__, sock, | ~^ | | | void * Signed-off-by: David S. Miller commit 7c4c24168014f250241b6df66ca5bae37eda7ffc Merge: 197569f72a1a3 6d04fe15f78ac Author: David S. Miller Date: Fri Jul 24 15:41:54 2020 -0700 Merge branch 'get-rid-of-the-address_space-override-in-setsockopt-v2' Christoph Hellwig says: ==================== get rid of the address_space override in setsockopt v2 setsockopt is the last place in architecture-independ code that still uses set_fs to force the uaccess routines to operate on kernel pointers. This series adds a new sockptr_t type that can contained either a kernel or user pointer, and which has accessors that do the right thing, and then uses it for setsockopt, starting by refactoring some low-level helpers and moving them over to it before finally doing the main setsockopt method. Note that apparently the eBPF selftests do not even cover this path, so the series has been tested with a testing patch that always copies the data first and passes a kernel pointer. This is something that works for most common sockopts (and is something that the ePBF support relies on), but unfortunately in various corner cases we either don't use the passed in length, or in one case actually copy data back from setsockopt, or in case of bpfilter straight out do not work with kernel pointers at all. Against net-next/master. Changes since v1: - check that users don't pass in kernel addresses - more bpfilter cleanups - cosmetic mptcp tweak ==================== Signed-off-by: David S. Miller commit 6d04fe15f78acdf8e32329e208552e226f7a8ae6 Author: Christoph Hellwig Date: Thu Jul 23 08:09:08 2020 +0200 net: optimize the sockptr_t for unified kernel/user address spaces For architectures like x86 and arm64 we don't need the separate bit to indicate that a pointer is a kernel pointer as the address spaces are unified. That way the sockptr_t can be reduced to a union of two pointers, which leads to nicer calling conventions. The only caveat is that we need to check that users don't pass in kernel address and thus gain access to kernel memory. Thus the USER_SOCKPTR helper is replaced with a init_user_sockptr function that does this check and returns an error if it fails. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit a7b75c5a8c41445f33efb663887ff5f5c3b4454b Author: Christoph Hellwig Date: Thu Jul 23 08:09:07 2020 +0200 net: pass a sockptr_t into ->setsockopt Rework the remaining setsockopt code to pass a sockptr_t instead of a plain user pointer. This removes the last remaining set_fs(KERNEL_DS) outside of architecture specific code. Signed-off-by: Christoph Hellwig Acked-by: Stefan Schmidt [ieee802154] Acked-by: Matthieu Baerts Signed-off-by: David S. Miller commit d38d2b00ba64b3f2f30d70a7929000606d2c4509 Author: Christoph Hellwig Date: Thu Jul 23 08:09:06 2020 +0200 net/tcp: switch do_tcp_setsockopt to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit d4c19c49142ddb2efcc34cff6379d03edb3553bd Author: Christoph Hellwig Date: Thu Jul 23 08:09:05 2020 +0200 net/tcp: switch ->md5_parse to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 91ac1ccaff597d06b1e16801e1a4c99b8a78dcbe Author: Christoph Hellwig Date: Thu Jul 23 08:09:04 2020 +0200 net/udp: switch udp_lib_setsockopt to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 894cfbc0cf3ea447e486fca99852893a155b6a81 Author: Christoph Hellwig Date: Thu Jul 23 08:09:03 2020 +0200 net/ipv6: switch do_ipv6_setsockopt to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit b84d2b73af401dc00d9f03c5d78ccf71369a5707 Author: Christoph Hellwig Date: Thu Jul 23 08:09:02 2020 +0200 net/ipv6: factor out a ipv6_set_opt_hdr helper Factour out a helper to set the IPv6 option headers from do_ipv6_setsockopt. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 86298285c9ae3a41ce21c2d00ebdde51dd2abc73 Author: Christoph Hellwig Date: Thu Jul 23 08:09:01 2020 +0200 net/ipv6: switch ipv6_flowlabel_opt to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Note that the get case is pretty weird in that it actually copies data back to userspace from setsockopt. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit ff6a4cf214effa0f600fff0eff70c60bcab94ecb Author: Christoph Hellwig Date: Thu Jul 23 08:09:00 2020 +0200 net/ipv6: split up ipv6_flowlabel_opt Split ipv6_flowlabel_opt into a subfunction for each action and a small wrapper. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit b43c6153132c92745317f92174af84f57b160b76 Author: Christoph Hellwig Date: Thu Jul 23 08:08:59 2020 +0200 net/ipv6: switch ip6_mroute_setsockopt to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 89654c5fcd511d9fe26ec376f5e855581aa44802 Author: Christoph Hellwig Date: Thu Jul 23 08:08:58 2020 +0200 net/ipv4: switch do_ip_setsockopt to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit de40a3e88311b6f0fc79b876a4768bf2d99f9aae Author: Christoph Hellwig Date: Thu Jul 23 08:08:57 2020 +0200 net/ipv4: merge ip_options_get and ip_options_get_from_user Use the sockptr_t type to merge the versions. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 01ccb5b48f08f59ca3746d59221f4990aec1b194 Author: Christoph Hellwig Date: Thu Jul 23 08:08:56 2020 +0200 net/ipv4: switch ip_mroute_setsockopt to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit b03afaa82ece13b2a008f0e3a7127bead578e3e6 Author: Christoph Hellwig Date: Thu Jul 23 08:08:55 2020 +0200 bpfilter: switch bpfilter_ip_set_sockopt to sockptr_t This is mostly to prepare for cleaning up the callers, as bpfilter by design can't handle kernel pointers. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit c2f12630c60ff33a9cafd221646053fc10ec59b6 Author: Christoph Hellwig Date: Thu Jul 23 08:08:54 2020 +0200 netfilter: switch nf_setsockopt to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit ab214d1bf8c7ef1ed7af803a72491cb29edfa8f5 Author: Christoph Hellwig Date: Thu Jul 23 08:08:53 2020 +0200 netfilter: switch xt_copy_counters to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 7e4b9dbabb2ad0d108d12939e34d4d330104ac6d Author: Christoph Hellwig Date: Thu Jul 23 08:08:52 2020 +0200 netfilter: remove the unused user argument to do_update_counters Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit c6d1b26a8fd4940fe5d4199311838f6c2aef0174 Author: Christoph Hellwig Date: Thu Jul 23 08:08:51 2020 +0200 net/xfrm: switch xfrm_user_policy to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit c8c1bbb6eb498109286739f8b6090e99313dd104 Author: Christoph Hellwig Date: Thu Jul 23 08:08:50 2020 +0200 net: switch sock_set_timeout to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Acked-by: Matthieu Baerts Signed-off-by: David S. Miller commit c34645ac25484968ddace9a6b140b70e72dc49b3 Author: Christoph Hellwig Date: Thu Jul 23 08:08:49 2020 +0200 net: switch sock_set_timeout to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 5790642b4748acbb5560f7a6fcb19f572297cf63 Author: Christoph Hellwig Date: Thu Jul 23 08:08:48 2020 +0200 net: switch sock_setbindtodevice to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit b1ea9ff6aff2deae84eccaf0a07cd14912669680 Author: Christoph Hellwig Date: Thu Jul 23 08:08:47 2020 +0200 net: switch copy_bpf_fprog_from_user to sockptr_t Pass a sockptr_t to prepare for set_fs-less handling of the kernel pointer from bpf-cgroup. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit ba423fdaa589d972473083defedf9e862626d268 Author: Christoph Hellwig Date: Thu Jul 23 08:08:46 2020 +0200 net: add a new sockptr_t type Add a uptr_t type that can hold a pointer to either a user or kernel memory region, and simply helpers to copy to and from it. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit d200cf624c9247ab52b67d34d9e198262a23df31 Author: Christoph Hellwig Date: Thu Jul 23 08:08:45 2020 +0200 bpfilter: reject kernel addresses The bpfilter user mode helper processes the optval address using process_vm_readv. Don't send it kernel addresses fed under set_fs(KERNEL_DS) as that won't work. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit c9ffebdde8deccf9ea3a7a97bcd84de0a35ddad7 Author: Christoph Hellwig Date: Thu Jul 23 08:08:44 2020 +0200 net/bpfilter: split __bpfilter_process_sockopt Split __bpfilter_process_sockopt into a low-level send request routine and the actual setsockopt hook to split the init time ping from the actual setsockopt processing. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit e024e008186bf9f4109c86b66dd60d0f926bc1fb Author: Christoph Hellwig Date: Thu Jul 23 08:08:43 2020 +0200 bpfilter: fix up a sparse annotation The __user doesn't make sense when casting to an integer type, just switch to a uintptr_t cast which also removes the need for the __force. Signed-off-by: Christoph Hellwig Reviewed-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit 197569f72a1a3512ef294bae68d100d613f38f6a Merge: 4a062d66b5a53 5923b8f7fa218 Author: David S. Miller Date: Fri Jul 24 15:23:31 2020 -0700 Merge branch 'TC-datapath-hash-api' Ariel Levkovich says: ==================== TC datapath hash api Hash based packet classification allows user to set up rules that provide load balancing of traffic across multiple vports and for ECMP path selection while keeping the number of rule at minimum. Instead of matching on exact flow spec, which requires a rule per flow, user can define rules based on a their hash value and distribute the flows to different buckets. The number of rules in this case will be constant and equal to the number of buckets. The series introduces an extention to the cls flower classifier and allows user to add rules that match on the hash value that is stored in skb->hash while assuming the value was set prior to the classification. Setting the skb->hash can be done in various ways and is not defined in this series - for example: 1. By the device driver upon processing an rx packet. 2. Using tc action bpf with a program which computes and sets the skb->hash value. $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 2 proto ip \ flower hash 0x0/0xf \ action mirred egress redirect dev ens1f0_1 $ tc filter add dev ens1f0_0 ingress \ prio 1 chain 2 proto ip \ flower hash 0x1/0xf \ action mirred egress redirect dev ens1f0_2 v3 -> v4: *Drop hash setting code leaving only the classidication parts. Setting the hash will be possible via existing tc action bpf. v2 -> v3: *Split hash algorithm option into 2 different actions. Asym_l4 available via act_skbedit and bpf via new act_hash. ==================== Signed-off-by: David S. Miller commit 5923b8f7fa218a9bccd730c0a9692635eb2fc740 Author: Ariel Levkovich Date: Thu Jul 23 01:03:01 2020 +0300 net/sched: cls_flower: Add hash info to flow classification Adding new cls flower keys for hash value and hash mask and dissect the hash info from the skb into the flow key towards flow classication. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 0cb09aff9d49d92305c3969fc84b785117412968 Author: Ariel Levkovich Date: Thu Jul 23 01:03:00 2020 +0300 net/flow_dissector: add packet hash dissection Retreive a hash value from the SKB and store it in the dissector key for future matching. Signed-off-by: Ariel Levkovich Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 4a062d66b5a532a9da9bdae643e498b035173794 Author: Chi Song Date: Thu Jul 23 21:14:26 2020 -0700 net: hyperv: dump TX indirection table to ethtool regs An imbalanced TX indirection table causes netvsc to have low performance. This table is created and managed during runtime. To help better diagnose performance issues caused by imbalanced tables, it needs make TX indirection tables visible. Because TX indirection table is driver specified information, so display it via ethtool register dump. Signed-off-by: Chi Song Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller commit 2e49f51aba2bb2e1b249f28fc47e7d5cdb625ae0 Merge: ef67744e7a4c8 83c3e5e17b5e3 Author: Jens Axboe Date: Fri Jul 24 16:15:02 2020 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.9/drivers Pull MD fix from Song. * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid5: use do_div() for 64 bit divisions in raid5_sync_request commit c12b539787efff5b4fc5abac1debf3ea1901348e Author: Cristian Birsan Date: Thu Jul 23 19:24:34 2020 +0300 ARM: configs: at91: sama5: enable CAN PLATFORM driver CAN_M_CAN_PLATFORM is needed to probe the driver on sama5 platforms after the driver was split into multiple files. Signed-off-by: Cristian Birsan Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200723162434.1983643-3-codrin.ciubotariu@microchip.com commit 33d8c87ef47f5303dca851f320611552bc84e32f Author: Razvan Stefanescu Date: Thu Jul 23 19:24:33 2020 +0300 ARM: configs: at91: sama5: enable bridge and VLAN filtering These modules are needed to configure bridges in Linux, to take full advantage of the KSZ switch capabilities. Signed-off-by: Razvan Stefanescu Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200723162434.1983643-2-codrin.ciubotariu@microchip.com commit 6dadeab7d260eaa410649a48d8368e4d3237377d Author: Razvan Stefanescu Date: Thu Jul 23 19:24:32 2020 +0300 ARM: configs: at91: sama5: add support for KSZ ethernet switches Enable DSA and KSZ9477 support as modules. Ethernet switches are used by the SAMA5D2-ICP board. Signed-off-by: Razvan Stefanescu Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200723162434.1983643-1-codrin.ciubotariu@microchip.com commit 09241e61103d89abf9134849b9d0dc46ac4f9cb3 Author: Wei Yongjun Date: Fri Jul 24 14:47:10 2020 -0700 soc: TI knav_qmss: make symbol 'knav_acc_range_ops' static The sparse tool complains as follows: drivers/soc/ti/knav_qmss_acc.c:453:23: warning: symbol 'knav_acc_range_ops' was not declared. Should it be static? 'knav_acc_range_ops' is not used outside of knav_qmss_acc.c, so marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Santosh Shilimkar commit a6df49f4224324dd8588f6a0d9cff53cd61a196b Author: Alexander A. Klimov Date: Fri Jul 24 14:43:48 2020 -0700 firmware: ti_sci: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Rob Herring Signed-off-by: Santosh Shilimkar commit 2ea17d504a0ee9b357a5fd2bde257c2ec37ceca7 Author: Randy Dunlap Date: Fri Jul 24 14:42:03 2020 -0700 soc: ti/ti_sci_protocol.h: drop a duplicated word + clarify Drop the repeated word "an" in a comment. Insert "and" between "source" and "destination" as is done a few lines earlier. Signed-off-by: Randy Dunlap Reviewed-by: Tero Kristo Signed-off-by: Santosh Shilimkar commit 1d0360161c851f3b35f5688f34fa9714a074b1aa Author: kernel test robot Date: Fri Jul 24 14:39:47 2020 -0700 soc: ti: k3: fix semicolon.cocci warnings drivers/soc/ti/k3-ringacc.c:616:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 3277e8aa2504 ("soc: ti: k3: add navss ringacc driver") CC: Grygorii Strashko Signed-off-by: kernel test robot Signed-off-by: Santosh Shilimkar commit 80ff73f75848d3fdb9bc7b55b1dd9f2125243275 Author: Grygorii Strashko Date: Fri Jul 24 14:39:40 2020 -0700 soc: ti: k3-ringacc: fix: warn: variable dereferenced before check 'ring' Fix build warning in k3_ringacc_ring_cfg(): smatch warnings: drivers/soc/ti/k3-ringacc.c:562 k3_ringacc_ring_cfg() warn: variable dereferenced before check 'ring' (see line 559) 557 int k3_ringacc_ring_cfg(struct k3_ring *ring, struct k3_ring_cfg *cfg) 558 { @559 struct k3_ringacc *ringacc = ring->parent; ^^^^^^^^^^^^ Dereference. 560 int ret = 0; 561 @562 if (!ring || !cfg) ^^^^ Check too late. Delete it? Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit 94a4beaa6b3756dbb661bc9a748574b9bc0cb4ae Author: Randy Dunlap Date: Sun Jul 19 17:14:03 2020 -0700 nfsd: netns.h: delete a duplicated word Drop the repeated word "the" in a comment. Signed-off-by: Randy Dunlap Cc: "J. Bruce Fields" Cc: Chuck Lever Cc: linux-nfs@vger.kernel.org Signed-off-by: Chuck Lever commit 4927b1ab2047dc12b3c16f7b84ab95145cd3b79d Author: Peter Ujfalusi Date: Fri Jul 24 14:20:24 2020 -0700 dmaengine: ti: k3-udma: Switch to k3_ringacc_request_rings_pair We only request ring pairs via K3 DMA driver, switch to use the new k3_ringacc_request_rings_pair() to simplify the code. Signed-off-by: Peter Ujfalusi Signed-off-by: Grygorii Strashko Acked-by: Vinod Koul Signed-off-by: Santosh Shilimkar commit 40a2a7c395cf5d95c35847ee2ec907e63593ea45 Author: Grygorii Strashko Date: Fri Jul 24 14:19:43 2020 -0700 soc: ti: k3-ringacc: separate soc specific initialization Separate SoC specific initialization and and OF mach data in preparation of adding support for more K3 SoCs Signed-off-by: Grygorii Strashko Reviewed-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit 43148b1cab44dbabf91cb70749ef3f9b24592e91 Author: Grygorii Strashko Date: Fri Jul 24 14:19:12 2020 -0700 soc: ti: k3-ringacc: add request pair of rings api. Add new API k3_ringacc_request_rings_pair() to request pair of rings at once, as in the most cases Rings are used with DMA channels, which need to request pair of rings - one to feed DMA with descriptors (TX/RX FDQ) and one to receive completions (RX/TX CQ). This will allow to simplify Ringacc API users. Signed-off-by: Grygorii Strashko Reviewed-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit 175e663f70d67945980dba7e998380a7c9b2b29c Author: Grygorii Strashko Date: Fri Jul 24 14:18:34 2020 -0700 soc: ti: k3-ringacc: add ring's flags to dump Add struct k3_ring *ring->flags to the ring dump. Signed-off-by: Grygorii Strashko Reviewed-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit 6b3da0b475b877e5d69f1230b1cc4a6de3f1918c Author: Peter Ujfalusi Date: Fri Jul 24 14:17:55 2020 -0700 soc: ti: k3-ringacc: Move state tracking variables under a struct Move the free, occ, windex and rindex under a struct. We can use memset to zero them and it will allow a cleaner way to extend driver functionality in the future, Signed-off-by: Peter Ujfalusi Signed-off-by: Grygorii Strashko Signed-off-by: Santosh Shilimkar commit 19e3b58d04694b3a7d46509dc2cb608acb3a1d83 Author: Grygorii Strashko Date: Fri Jul 24 14:16:59 2020 -0700 dt-bindings: soc: ti: k3-ringacc: convert bindings to json-schema Convert the K3 NavigatorSS Ring Accelerator bindings documentation to json-schema. Cc: Rob Herring Signed-off-by: Grygorii Strashko Reviewed-by: Peter Ujfalusi Signed-off-by: Santosh Shilimkar commit 986a4b63d3bc5f2c0eb4083b05aff2bf883b7b2f Author: Chuck Lever Date: Fri Jul 24 17:08:57 2020 -0400 SUNRPC: Fix ("SUNRPC: Add "@len" parameter to gss_unwrap()") Braino when converting "buf->len -=" to "buf->len = len -". The result is under-estimation of the ralign and rslack values. On krb5p mounts, this has caused READDIR to fail with EIO, and KASAN splats when decoding READLINK replies. As a result of fixing this oversight, the gss_unwrap method now returns a buf->len that can be shorter than priv_len for small RPC messages. The additional adjustment done in unwrap_priv_data() can underflow buf->len. This causes the nfsd_request_too_large check to fail during some NFSv3 operations. Reported-by: Marian Rainer-Harbach Reported-by: Pierre Sauter BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1886277 Fixes: 31c9590ae468 ("SUNRPC: Add "@len" parameter to gss_unwrap()") Reviewed-by: J. Bruce Fields Signed-off-by: Chuck Lever commit f7e6b19bc76471ba03725fe58e0c218a3d6266c3 Author: Greg Kroah-Hartman Date: Thu Jul 16 13:53:46 2020 +0200 mtd: properly check all write ioctls for permissions When doing a "write" ioctl call, properly check that we have permissions to do so before copying anything from userspace or anything else so we can "fail fast". This includes also covering the MEMWRITE ioctl which previously missed checking for this. Cc: Miquel Raynal Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: stable Signed-off-by: Greg Kroah-Hartman [rw: Fixed locking issue] Signed-off-by: Richard Weinberger commit edab812d802d248e3d07719c036a865c67ad3a87 Author: Taniya Das Date: Fri Jul 24 21:37:58 2020 +0530 clk: qcom: lpass: Add support for LPASS clock controller for SC7180 The Low Power Audio subsystem clocks are required for Audio client to be able to request for the clocks and power domains. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1595606878-2664-5-git-send-email-tdas@codeaurora.org [sboyd@kernel.org: Drop unused ret in probe function] Signed-off-by: Stephen Boyd commit 47110b6aa5c8269da4a3b5129b066211f978aa86 Author: Taniya Das Date: Fri Jul 24 21:37:57 2020 +0530 clk: qcom: gcc: Add support for GCC LPASS clock for SC7180 Add the GCC lpass clock which is required to access the LPASS core clocks. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1595606878-2664-4-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 381cc6f97cdaf15dabceb1b48fa82c9de0163e58 Author: Taniya Das Date: Fri Jul 24 21:37:56 2020 +0530 dt-bindings: clock: Add YAML schemas for LPASS clocks on SC7180 The LPASS(Low Power Audio Subsystem) clock provider have a bunch of generic properties that are needed in a device tree. Also add clock ids for GCC LPASS and LPASS Core clock IDs for LPASS client to request for the clocks. Signed-off-by: Taniya Das Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1595606878-2664-3-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 173722995cdb7c22d21abd484a5001c903df1e20 Author: Taniya Das Date: Fri Jul 24 21:37:55 2020 +0530 clk: qcom: gdsc: Add support to enable retention of GSDCR Add support for the RETAIN_FF_ENABLE feature which enables the usage of retention registers. These registers maintain their state after disabling and re-enabling a GDSC. Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/1595606878-2664-2-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd commit 8b603d0715a372f5827d3a6b19d9568bf854b687 Author: Pavel Machek Date: Fri Jul 24 10:41:12 2020 +0200 RDMA/mlx5: Fix typo in enum name Nnothing uses the enum name, so this is harmless. Fixes: 322694412400 ("IB/mlx5: Introduce driver create and destroy flow methods") Link: https://lore.kernel.org/r/20200724084112.GC31930@amd Signed-off-by: Pavel Machek (CIP) Signed-off-by: Jason Gunthorpe commit 7d98404c8162b7f1d1b22eccce92f5ee7f93cab8 Author: Ville Syrjälä Date: Fri Jul 24 22:07:18 2020 +0300 drm/omap: Use {} to zero initialize the mode The first member of drm_display_mode is no longer a structure, but the code is still using {{0}} to zero initialize it. Make that just {} so it works regardless of what lies inside. Cc: Dave Airlie Cc: Laurent Pinchart Cc: Tomi Valkeinen Fixes: 42acb06b01b1 ("drm: pahole struct drm_display_mode") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200724190718.23567-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit 6f24b15925ec83e65d4a143ef560368b5b6bd8ad Author: Gustavo A. R. Silva Date: Tue Jul 21 08:34:55 2020 -0500 IB/hfi1: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7-rc7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Link: https://lore.kernel.org/r/20200721133455.GA14363@embeddedor Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jason Gunthorpe commit 9b8d846924856570625b93f83ae0624391193bce Author: Leon Romanovsky Date: Mon Jul 20 20:56:27 2020 +0300 RDMA/uverbs: Silence shiftTooManyBitsSigned warning Fix reported by kbuild warning. drivers/infiniband/core/uverbs_cmd.c:1897:47: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] BUILD_BUG_ON(IB_USER_LAST_QP_ATTR_MASK == (1 << 31)); ^ Link: https://lore.kernel.org/r/20200720175627.1273096-3-leon@kernel.org Reported-by: kernel test robot Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 29f3fe1d6854053b32432d01f9810d6fff152ece Author: Leon Romanovsky Date: Mon Jul 20 20:56:26 2020 +0300 RDMA/uverbs: Remove redundant assignments The kbuild reported the following warning, so clean whole uverbs_cmd.c file. drivers/infiniband/core/uverbs_cmd.c:1066:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = uverbs_request(attrs, &cmd, sizeof(cmd)); ^ drivers/infiniband/core/uverbs_cmd.c:1064:0: note: Variable 'ret' is reassigned a value before the old one has been used. int ret = -EINVAL; ^ Link: https://lore.kernel.org/r/20200720175627.1273096-2-leon@kernel.org Reported-by: kernel test robot Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0c2a34937f7e4c4776bb261114c475392da2355c Author: Wolfram Sang Date: Tue Jun 30 18:24:40 2020 +0200 i2c: revert "i2c: core: Allow drivers to disable i2c-core irq mapping" This manually reverts commit d1d84bb95364ed604015c2b788caaf3dbca0262f. The only user has gone two years ago with commit 589edb56b424 ("ACPI / scan: Create platform device for INT33FE ACPI nodes") and no new user has showed up. Remove and hope we will never need it again. Signed-off-by: Wolfram Sang Acked-by: Hans de Goede Signed-off-by: Wolfram Sang commit d4d7f59643f795ae2f3233e3dddce3b4f549dcdc Author: Maor Gottlieb Date: Sun Jul 19 09:57:47 2020 +0300 RDMA/mlx5: Add missing srcu_read_lock in ODP implicit flow According to the locking scheme, mlx5_ib_update_xlt() should be called with srcu_read_lock(dev->odp->srcu). Prefetch missed this. This fixes the below WARN from lockdep_assert_held(): WARNING: CPU: 1 PID: 1130 at drivers/infiniband/hw/mlx5/odp.c:132 mlx5_odp_populate_xlt+0x175/0x180 [mlx5_ib] Modules linked in: xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter overlay ib_srp scsi_transport_srp rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi rdma_cm iw_cm ib_umad ib_ipoib ib_cm mlx5_ib ib_uverbs ib_core mlx5_core mlxfw ptp pps_core CPU: 1 PID: 1130 Comm: kworker/u16:11 Tainted: G W 5.8.0-rc5_for_upstream_debug_2020_07_13_11_04 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Workqueue: events_unbound mlx5_ib_prefetch_mr_work [mlx5_ib] RIP: 0010:mlx5_odp_populate_xlt+0x175/0x180 [mlx5_ib] Code: 08 e2 85 c0 0f 84 65 ff ff ff 49 8b 87 60 01 00 00 be ff ff ff ff 48 8d b8 b0 39 00 00 e8 93 e0 50 e1 85 c0 0f 85 45 ff ff ff <0f> 0b e9 3e ff ff ff 0f 0b eb c7 0f 1f 44 00 00 48 8b 87 98 0f 00 RSP: 0018:ffff88840f44fc68 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88840cc9d000 RCX: ffff88840efcd940 RDX: 0000000000000000 RSI: ffff88844871b9b0 RDI: ffff88840efce100 RBP: ffff88840cc9d040 R08: 0000000000000040 R09: 0000000000000001 R10: ffff88846ced3068 R11: 0000000000000000 R12: 00000000000156ec R13: 0000000000000004 R14: 0000000000000004 R15: ffff888439941000 FS: 0000000000000000(0000) GS:ffff88846fa80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f8536d12430 CR3: 0000000437a5e006 CR4: 0000000000360ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: mlx5_ib_update_xlt+0x37c/0x7c0 [mlx5_ib] pagefault_mr+0x315/0x440 [mlx5_ib] mlx5_ib_prefetch_mr_work+0x56/0xa0 [mlx5_ib] process_one_work+0x215/0x5c0 worker_thread+0x3c/0x380 ? process_one_work+0x5c0/0x5c0 kthread+0x133/0x150 ? kthread_park+0x90/0x90 ret_from_fork+0x1f/0x30 Hold the SRCU during prefetch, even though it strictly isn't needed since prefetch is holding the num_deferred_work it does make it easier to reason about. Fixes: 5256edcb98a1 ("RDMA/mlx5: Rework implicit ODP destroy") Link: https://lore.kernel.org/r/20200719065747.131157-1-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 4a775263fcdad67d2ad72e7abcd6172793ea8a29 Merge: 33c56edacd9f2 916a0edc43f03 Author: Arnd Bergmann Date: Fri Jul 24 21:42:56 2020 +0200 Merge tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt arm64: dts: amlogic: updates for v5.9 (round 2) - new board: WeTek Core2 - audio playback support on more boards - add GPU DVFS * tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: amlogic: meson-g12: add the Mali OPP table and use DVFS arm64: dts: amlogic: meson-gxm: add the Mali OPP table and use DVFS arm64: dts: amlogic: meson-gx: add the Mali-450 OPP table and use DVFS arm64: dts: meson: add support for the WeTek Core 2 dt-bindings: arm: amlogic: add support for the WeTek Core 2 arm64: dts: meson: add audio playback to khadas-vim3l arm64: dts: meson: add audio playback to odroid-c4 arm64: dts: meson: update spifc node name on Khadas VIM3/VIM3L ARM: dts: meson: Align L2 cache-controller nodename with dtschema arm64: dts: meson-gxl-s805x: reduce initial Mali450 core frequency arm64: dts: meson: add missing gxl rng clock soc: amlogic: meson-gx-socinfo: Fix S905X3 and S905D3 ID's Link: https://lore.kernel.org/r/7h8sf8671u.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 58031a26bf2b0c458511df146143c78ab569f4da Author: Eddie James Date: Tue Jun 9 15:15:55 2020 -0500 i2c: fsi: Prevent adding adapters for ports without dts nodes Ports should be defined in the devicetree if they are to be enabled on the system. Signed-off-by: Eddie James Signed-off-by: Joel Stanley Signed-off-by: Wolfram Sang commit 042dd05bddbd84e6a52b337a65d1994003c9b9bb Author: Meir Lichtinger Date: Thu Jun 4 08:49:38 2020 +0300 RDMA/mlx5: ConnectX-7 new capabilities to set relaxed ordering by UMR Up to ConnectX-7 setting mkey relaxed ordering read/write attributes by UMR is not supported. ConnectX-7 supports this option, which is indicated by two new HCA capabilities - relaxed_ordering_write_umr and relaxed_ordering_read_umr. Signed-off-by: Meir Lichtinger Signed-off-by: Leon Romanovsky commit 16e51f78a9db3645d2d2dd7c0a78e7e7776b630e Author: Leon Romanovsky Date: Sun Jul 19 08:22:23 2020 +0300 RDMA/core: Update write interface to use automatic object lifetime The automatic object lifetime model allows us to change the write() interface to have the same logic as the ioctl() path. Update the create/alloc functions to be in the following format, so the code flow will be the same: * Allocate objects * Initialize them * Call to the drivers, this is last step that is allowed to fail * Finalize object * Return response and allow to core code to handle abort/commit respectively. Link: https://lore.kernel.org/r/20200719052223.75245-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f56040b81999871973d21f334b4657957422c90e Author: Pavel Begunkov Date: Thu Jul 23 20:25:21 2020 +0300 io_uring: deduplicate io_grab_files() calls Move io_req_init_async() into io_grab_files(), it's safer this way. Note that io_queue_async_work() does *init_async(), so it's valid to move out of __io_queue_sqe() punt path. Also, add a helper around io_grab_files(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ae34817bd93e373a03203a4c6892735c430a14e1 Author: Pavel Begunkov Date: Thu Jul 23 20:25:20 2020 +0300 io_uring: don't do opcode prep twice Calling into opcode prep handlers may be dangerous, as they re-read SQE but might not re-initialise requests completely. If io_req_defer() passed fast checks and is done with preparations, punt it async. As all other cases are covered with nulling @sqe, this guarantees that io_[opcode]_prep() are visited only once per request. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 23b3628e45924419399da48c2b3a522b05557c91 Author: Xiaoguang Wang Date: Thu Jul 23 20:57:24 2020 +0800 io_uring: clear IORING_SQ_NEED_WAKEUP after executing task works In io_sq_thread(), if there are task works to handle, current codes will skip schedule() and go on polling sq again, but forget to clear IORING_SQ_NEED_WAKEUP flag, fix this issue. Also add two helpers to set and clear IORING_SQ_NEED_WAKEUP flag, Signed-off-by: Xiaoguang Wang Signed-off-by: Jens Axboe commit 5af1d13e8f0d8839db04a71ec786f369b0e67234 Author: Pavel Begunkov Date: Sat Jul 18 11:32:52 2020 +0300 io_uring: batch put_task_struct() As every iopoll request have a task ref, it becomes expensive to put them one by one, instead we can put several at once integrating that into io_req_free_batch(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit dd6f843a9fca8f225c86fee5f50da429c369c045 Author: Pavel Begunkov Date: Sat Jul 18 11:32:51 2020 +0300 tasks: add put_task_struct_many() put_task_struct_many() is as put_task_struct() but puts several references at once. Useful to batching it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit cbcf72148da4af55ea81cfb351ea7c026ff1014f Author: Pavel Begunkov Date: Sat Jul 18 11:31:21 2020 +0300 io_uring: return locked and pinned page accounting Locked and pinned memory accounting in io_{,un}account_mem() depends on having ->sqo_mm, which is NULL after a recent change for non SQPOLL'ed io_ring. That disables the accounting. Return ->sqo_mm initialisation back, and do __io_sq_thread_acquire_mm() based on IORING_SETUP_SQPOLL flag. Fixes: 8eb06d7e8dd85 ("io_uring: fix missing ->mm on exit") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 5dbcad51f78434e782d0470b8b5fc4380700c35f Author: Pavel Begunkov Date: Sat Jul 18 11:31:20 2020 +0300 io_uring: don't miscount pinned memory io_sqe_buffer_unregister() uses cxt->sqo_mm for memory accounting, but io_ring_ctx_free() drops ->sqo_mm before leaving pinned_vm over-accounted. Postpone mm cleanup for when it's not needed anymore. Fixes: 309758254ea62 ("io_uring: report pinned memory usage") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7fbb1b541f4286cc337b9bca1e5bad0ce4ee978c Author: Pavel Begunkov Date: Thu Jul 16 23:28:05 2020 +0300 io_uring: don't open-code recv kbuf managment Don't implement fast path of kbuf freeing and management inlined into io_recv{,msg}(), that's error prone and duplicates handling. Replace it with a helper io_put_recv_kbuf(), which mimics io_put_rw_kbuf() in the io_read/write(). This also keeps cflags calculation in one place, removing duplication between rw and recv/send. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8ff069bf2efd7b7aeb90b56ea8edc165c93d8940 Author: Pavel Begunkov Date: Thu Jul 16 23:28:04 2020 +0300 io_uring: extract io_put_kbuf() helper Extract a common helper for cleaning up a selected buffer, this will be used shortly. By the way, correct cflags types to unsigned and, as kbufs are anyway tracked by a flag, remove useless zeroing req->rw.addr. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit bc02ef3325e3ef524ef29b65681ca4207b781224 Author: Pavel Begunkov Date: Thu Jul 16 23:28:03 2020 +0300 io_uring: move BUFFER_SELECT check into *recv[msg] Move REQ_F_BUFFER_SELECT flag check out of io_recv_buffer_select(), and do that in its call sites That saves us from double error checking and possibly an extra function call. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0e1b6fe3d1e5f1b79c5bec37881c98febfba7718 Author: Pavel Begunkov Date: Thu Jul 16 23:28:02 2020 +0300 io_uring: free selected-bufs if error'ed io_clean_op() may be skipped even if there is a selected io_buffer, that's because *select_buffer() funcions never set REQ_F_NEED_CLEANUP. Trigger io_clean_op() when REQ_F_BUFFER_SELECTED is set as well, and and clear the flag if was freed out of it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 14c32eee9286621dd437b53460e44bd11e5bc08d Author: Pavel Begunkov Date: Thu Jul 16 23:28:01 2020 +0300 io_uring: don't forget cflags in io_recv() Instead of returning error from io_recv(), go through generic cleanup path, because it'll retain cflags for userspace. Do the same for io_send() for consistency. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6b754c8b912a164fbb15b7b839d51709c3d9ee6f Author: Pavel Begunkov Date: Thu Jul 16 23:28:00 2020 +0300 io_uring: remove extra checks in send/recv With the return on a bad socket, kmsg is always non-null by the end of the function, prune left extra checks and initialisations. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7a7cacba8b4560403615b04d57bdcd1f93f90f10 Author: Pavel Begunkov Date: Thu Jul 16 23:27:59 2020 +0300 io_uring: indent left {send,recv}[msg]() Flip over "if (sock)" condition with return on error, the upper layer will take care. That change will be handy later, but already removes an extra jump from hot path. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 06ef3608b0eed673fcbc62cf74c8d3ad0007a337 Author: Pavel Begunkov Date: Thu Jul 16 23:28:33 2020 +0300 io_uring: simplify file ref tracking in submission state Currently, file refs in struct io_submit_state are tracked with 2 vars: @has_refs -- how many refs were initially taken @used_refs -- number of refs used Replace it with a single variable counting how many refs left at the current moment. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 57f1a64958543fe18a7fe0addbfb31bb2ceeaea2 Author: Pavel Begunkov Date: Wed Jul 15 12:46:52 2020 +0300 io_uring/io-wq: move RLIMIT_FSIZE to io-wq RLIMIT_SIZE in needed only for execution from an io-wq context, hence move all preparations from hot path to io-wq work setup. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 327d6d968b195cfc48ff97c49b56520aac922f65 Author: Pavel Begunkov Date: Wed Jul 15 12:46:51 2020 +0300 io_uring: alloc ->io in io_req_defer_prep() Every call to io_req_defer_prep() is prepended with allocating ->io, just do that in the function. And while we're at it, mark error paths with unlikey and replace "if (ret < 0)" with "if (ret)". There is only one change in the observable behaviour, that's instead of killing the head request right away on error, it postpones it until the link is assembled, that looks more preferable. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1c2da9e8839d6437b43f2c805411d1a0cbd70165 Author: Pavel Begunkov Date: Wed Jul 15 12:46:50 2020 +0300 io_uring: remove empty cleanup of OP_OPEN* reqs A switch in __io_clean_op() doesn't have default, it's pointless to list opcodes that doesn't do any cleanup. Remove IORING_OP_OPEN* from there. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit dca9cf8b87f55c96f072c1fc6bc90e2b97a8e19f Author: Pavel Begunkov Date: Wed Jul 15 12:46:49 2020 +0300 io_uring: inline io_req_work_grab_env() The only caller of io_req_work_grab_env() is io_prep_async_work(), and they are both initialising req->work. Inline grab_env(), it's easier to keep this way, moreover there already were bugs with misplacing io_req_init_async(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0f63ef1dd581de1655075e2dbdf2ef302514a983 Author: Leon Romanovsky Date: Sun Jul 19 08:22:22 2020 +0300 RDMA/core: Align abort/commit object scheme for write() and ioctl() paths Create the same logic flow for the write() interface as we have for the ioctl() path by making sure that the object is committed or aborted automatically after HW object creation. Link: https://lore.kernel.org/r/20200719052223.75245-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0f7e466b393abab86be96ffcf00af383afddc0d1 Author: Pavel Begunkov Date: Mon Jul 13 23:37:16 2020 +0300 io_uring: place cflags into completion data req->cflags is used only for defer-completion path, just use completion data to store it. With the 4 bytes from the ->sequence patch and compacting io_kiocb, this frees 8 bytes. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9cf7c104deaef52d6fd7c103a716e31d9815ede8 Author: Pavel Begunkov Date: Mon Jul 13 23:37:15 2020 +0300 io_uring: remove sequence from io_kiocb req->sequence is used only for deferred (i.e. DRAIN) requests, but initialised for every request. Remove req->sequence from io_kiocb together with its initialisation in io_init_req(). Replace it with a new field in struct io_defer_entry, that will be calculated only when needed in io_req_defer(), which is a slow path. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 27dc8338e5fb0e0ed5b272e792f4ffad7f3bc03e Author: Pavel Begunkov Date: Mon Jul 13 23:37:14 2020 +0300 io_uring: use non-intrusive list for defer The only left user of req->list is DRAIN, hence instead of keeping a separate per request list for it, do that with old fashion non-intrusive lists allocated on demand. That's a really slow path, so that's OK. This removes req->list and so sheds 16 bytes from io_kiocb. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7d6ddea6beaf6639cf3a2b291dcdac6fe1edc584 Author: Pavel Begunkov Date: Mon Jul 13 23:37:13 2020 +0300 io_uring: remove init for unused list poll*() doesn't use req->list, don't init it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 135fcde8496b03d31648171dbc038990112e41d5 Author: Pavel Begunkov Date: Mon Jul 13 23:37:12 2020 +0300 io_uring: add req->timeout.list Instead of using shared req->list, hang timeouts up on their own list entry. struct io_timeout have enough extra space for it, but if that will be a problem ->inflight_entry can reused for that. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 40d8ddd4facb80760d5a0c61a7cf026d5ff73ff0 Author: Pavel Begunkov Date: Mon Jul 13 23:37:11 2020 +0300 io_uring: use completion list for CQ overflow As with the completion path, also use compl.list for overflowed requests. If cleaned up properly, nobody needs per-op data there anymore. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit d21ffe7eca82d47b489760899912f81e30456e2e Author: Pavel Begunkov Date: Mon Jul 13 23:37:10 2020 +0300 io_uring: use inflight_entry list for iopoll'ing req->inflight_entry is used to track requests that grabbed files_struct. Let's share it with iopoll list, because the only iopoll'ed ops are reads and writes, which don't need a file table. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 540e32a0855e700affa29b1112bf2dbb1fa7702a Author: Pavel Begunkov Date: Mon Jul 13 23:37:09 2020 +0300 io_uring: rename ctx->poll into ctx->iopoll It supports both polling and I/O polling. Rename ctx->poll to clearly show that it's only in I/O poll case. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 3ca405ebfc1c3445b049dd25ca3338cbc99837d1 Author: Pavel Begunkov Date: Mon Jul 13 23:37:08 2020 +0300 io_uring: share completion list w/ per-op space Calling io_req_complete(req) means that the request is done, and there is nothing left but to clean it up. That also means that per-op data after that should not be used, so we're free to reuse it in completion path, e.g. to store overflow_list as done in this patch. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 252917c30f551e8e4377faac81d7fcf8e9629df1 Author: Pavel Begunkov Date: Mon Jul 13 22:59:20 2020 +0300 io_uring: follow **iovec idiom in io_import_iovec As for import_iovec(), return !=NULL iovec from io_import_iovec() only when it should be freed. That includes returning NULL when iovec is already in req->io, because it should be deallocated by other means, e.g. inside op handler. After io_setup_async_rw() local iovec to ->io, just mark it NULL, to follow the idea in io_{read,write} as well. That's easier to follow, and especially useful if we want to reuse per-op space for completion data. Signed-off-by: Pavel Begunkov [axboe: only call kfree() on non-NULL pointer] Signed-off-by: Jens Axboe commit c3e330a493740a2a8312dcb7b1cffceaec7f619a Author: Pavel Begunkov Date: Mon Jul 13 22:59:19 2020 +0300 io_uring: add a helper for async rw iovec prep Preparing reads/writes for async is a bit tricky. Extract a helper to not repeat it twice. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b64e3444d4e1c71fe148a4f4535395b1fdd73200 Author: Pavel Begunkov Date: Mon Jul 13 22:59:18 2020 +0300 io_uring: simplify io_req_map_rw() Don't deref req->io->rw every time, but put it in a local variable. This looks prettier, generates less instructions, and doesn't break alias analysis. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e73751225bae1e9b67e957afb273366fbb6ca136 Author: Pavel Begunkov Date: Sun Jul 12 20:42:04 2020 +0300 io_uring: replace rw->task_work with rq->task_work io_kiocb::task_work was de-unionised, and is not planned to be shared back, because it's too useful and commonly used. Hence, instead of keeping a separate task_work in struct io_async_rw just reuse req->task_work. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2ae523ed07f14391d685651f671a7858fe8c368a Author: Pavel Begunkov Date: Sun Jul 12 20:41:06 2020 +0300 io_uring: extract io_sendmsg_copy_hdr() Don't repeat send msg initialisation code, it's error prone. Extract and use a helper function. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1400e69705baf98d1c9cb73b592a3a68aab1d852 Author: Pavel Begunkov Date: Sun Jul 12 20:41:05 2020 +0300 io_uring: use more specific type in rcv/snd msg cp send/recv msghdr initialisation works with struct io_async_msghdr, but pulls the whole struct io_async_ctx for no reason. That complicates it with composite accessing, e.g. io->msg. Use and pass the most specific type, which is struct io_async_msghdr. It is the larget field in union io_async_ctx and doesn't save stack space, but looks clearer. The most of the changes are replacing "io->msg." with "iomsg->" Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 270a5940700bb6cf9abf36ea10cf1fa0d453aa7a Author: Pavel Begunkov Date: Sun Jul 12 20:41:04 2020 +0300 io_uring: rename sr->msg into umsg Every second field in send/recv is called msg, make it a bit more understandable by renaming ->msg, which is a user provided ptr, to ->umsg. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b36200f543ff07a1cb346aa582349141df2c8068 Author: Dmitry Vyukov Date: Sat Jul 11 11:31:11 2020 +0200 io_uring: fix sq array offset calculation rings_size() sets sq_offset to the total size of the rings (the returned value which is used for memory allocation). This is wrong: sq array should be located within the rings, not after them. Set sq_offset to where it should be. Fixes: 75b28affdd6a ("io_uring: allocate the two rings together") Signed-off-by: Dmitry Vyukov Acked-by: Hristo Venev Cc: io-uring@vger.kernel.org Signed-off-by: Jens Axboe commit 90b109d50da09ddaa179732c01ccba7f759c125d Author: Saravana Kannan Date: Fri Jul 24 11:05:22 2020 -0700 driver core: Change delimiter in devlink device's name to "--" The devlink device name is of the form "supplier:consumer". But ":" is fairly common in device names and makes it visually hard to distinguish supplier and consumer. So, replace it with "--" to make it easier. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200724180523.1393383-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 760618f7a8e3b63aa06266efb301719c374e29d4 Merge: 4349f30ecb806 4ae6dbd683860 Author: Jens Axboe Date: Fri Jul 24 12:53:31 2020 -0600 Merge branch 'io_uring-5.8' into for-5.9/io_uring Merge in io_uring-5.8 fixes, as changes/cleanups to how we do locked mem accounting require a fixup, and only one of the spots are noticed by git as the other merges cleanly. The flags fix from io_uring-5.8 also causes a merge conflict, the leak fix for recvmsg, the double poll fix, and the link failure locking fix. * io_uring-5.8: io_uring: fix lockup in io_fail_links() io_uring: fix ->work corruption with poll_add io_uring: missed req_init_async() for IOSQE_ASYNC io_uring: always allow drain/link/hardlink/async sqe flags io_uring: ensure double poll additions work with both request types io_uring: fix recvmsg memory leak with buffer selection io_uring: fix not initialised work->flags io_uring: fix missing msg_name assignment io_uring: account user memory freed when exit has been queued io_uring: fix memleak in io_sqe_files_register() io_uring: fix memleak in __io_sqe_files_update() io_uring: export cq overflow status to userspace Signed-off-by: Jens Axboe commit ab274a7ec83556381f8990658896a5570b792d28 Merge: 1d4eadaf1717d 8a9ff87581594 Author: Arnd Bergmann Date: Fri Jul 24 20:51:00 2020 +0200 Merge tag 'memory-controller-drv-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/drivers Memory controller drivers for v5.9 The drivers/memory directory with memory controller drivers, over the last days grew in numbers but lacked any coordinated care. The generic part (device tree helpers) were pulled in through various trees, depending on driver needs. The patchset is a first try to improve code quality of memory controller drivers. Mostly these are non-intrusive fixes for GCC, checkpatch or sparse warnings. This also fixes missing SPDX tags or improves generic code quality (whitespace, const correctness). Last commit appoints also Krzysztof Kozlowski as a maintainer. * tag 'memory-controller-drv-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (22 commits) MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory controllers memory: samsung: exynos-srom: Describe the Kconfig entry memory: Describe the MEMORY Kconfig entry memory: da8xx-ddrctl: Remove unused 'node' variable memory: fsl_ifc: Fix whitespace issues memory: pl172: Add GPLv2 SPDX license header memory: omap-gpmc: Fix whitespace issue memory: omap-gpmc: Include for SZ_16M memory: mtk-smi: Add argument to function pointer definition memory: brcmstb_dpfe: Remove unneeded braces memory: brcmstb_dpfe: Constify the contents of string memory: ti-emif-pm: Fix cast to iomem pointer memory: ti-aemif: Rename SS to SSTROBE to avoid name conflicts memory: emif: Silence platform_get_irq() error in driver memory: emif: Fix whitespace coding style violations memory: emif: Put constant in comparison on the right side memory: emif-asm-offsets: Add GPLv2 SPDX license header memory: of: Remove unneeded extern from function declarations memory: of: Correct indentation memory: of: Remove __func__ in device related messages ... Link: https://lore.kernel.org/r/20200724160314.8543-1-krzk@kernel.org Signed-off-by: Arnd Bergmann commit c94e272b57abb0cade9addcafc93ac1f566305cf Author: Maor Gottlieb Date: Thu Jul 16 13:54:16 2020 +0300 RDMA/mlx5: Allow SQ modification Currently the SQ is set to a ready state when the RAW QP is modified to INIT. When the TIS is modified, e.g. to change the lag_tx_affinity, then SQs which are already in the ready state will not be affected. Open a window to modify the SQ behavior by setting the SQ as ready only when QP was modified to RTS. Link: https://lore.kernel.org/r/20200716105416.1423826-1-leon@kernel.org Signed-off-by: Maor Gottlieb Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5f3991b97ff6bf8b249a7c1991e008e446f4d5ae Author: Kevin Hilman Date: Fri Jul 24 11:41:07 2020 -0700 MAINTAINERS: arm/amlogic: add designated reviewers It's already been the case for some time that Neil, Jerome and Martin are doing the bulk of the important reviewing. Update MAINTAINERS to reflect reality. Link: https://lore.kernel.org/r/20200724184107.24600-1-khilman@baylibre.com Cc: Neil Armstrong Cc: Jerome Brunet Cc: Martin Blumenstingl Signed-off-by: Kevin Hilman Signed-off-by: Arnd Bergmann commit 860e73b49cd933c708e3e1e1e07cdea81b6acd1c Merge: 54918b8ed1e52 94f8be9eb0654 Author: Greg Kroah-Hartman Date: Fri Jul 24 20:22:25 2020 +0200 Merge tag 'misc-habanalabs-next-2020-07-24' of git://people.freedesktop.org/~gabbayo/linux into char-misc-next Oded writes: This tag contains the following changes for kernel 5.9-rc1: - Remove rate limiters from GAUDI configuration (no longer needed). - Set maximum amount of in-flight CS per ASIC type and increase the maximum amount for GAUDI. - Refactor signal/wait command submissions code - Calculate trace frequency from PLLs to show accurate profiling data - Rephrase error messages to make them more clear to the common user - Add statistics of dropped CS (counter per possible reason for drop) - Get ECC information from firmware - Remove support for partial SoC reset in Gaudi - Halt device CPU only when reset is certain to happen. Sometimes we abort the reset procedure and in that case we can't leave device CPU in halt mode. - set each CQ to its own work queue to prevent a race between completions on different CQs. - Use queue pi/ci in order to determine queue occupancy. This is done to make the code reusable between current and future ASICs. - Add more validations for user inputs. - Refactor PCIe controller configuration to make the code reusable between current and future ASICs. - Update firmware interface headers to latest version - Move all common code to a dedicated common sub-folder * tag 'misc-habanalabs-next-2020-07-24' of git://people.freedesktop.org/~gabbayo/linux: (28 commits) habanalabs: Fix memory leak in error flow of context initialization habanalabs: use no flags on MMU cache invalidation habanalabs: enable device before hw_init() habanalabs: create internal CB pool habanalabs: update hl_boot_if.h from firmware habanalabs: create common folder habanalabs: check for DMA errors when clearing memory habanalabs: verify queue can contain all cs jobs habanalabs: Assign each CQ with its own work queue habanalabs: halt device CPU only upon certain reset habanalabs: remove unused hash habanalabs: use queue pi/ci in order to determine queue occupancy habanalabs: configure maximum queues per asic habanalabs: remove soft-reset support from GAUDI habanalabs: PCIe iATU refactoring habanalabs: Extract ECC information from FW habanalabs: Add dropped cs statistics info struct habanalabs: extract cpu boot status lookup habanalabs: rephrase error messages habanalabs: Increase queues depth ... commit 94f8be9eb065412cf069efd45053d33e8911fa9e Author: Tomer Tayar Date: Thu Jul 23 09:17:57 2020 +0300 habanalabs: Fix memory leak in error flow of context initialization Add a missing free of the cs_pending array in the error flow of context initialization. Fixes: c16d45f42b64 ("habanalabs: Use pending CS amount per ASIC") Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 644883ef1aa53af1efecf3f84df9951c448b876b Author: Tomer Tayar Date: Sun Jul 19 11:00:03 2020 +0300 habanalabs: use no flags on MMU cache invalidation gaudi_mmu_invalidate_cache() doesn't use the flags parameter, and thus it can be set to 0 when the function is called in the gaudi only files. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 8df8cb1efc1962356c97656839ea9c41e1ed4ba9 Author: Oded Gabbay Date: Wed Jul 15 21:59:32 2020 +0300 habanalabs: enable device before hw_init() Device is now enabled before the hw_init() because part of the initialization requires communication with the device firmware to get information that is required for the initialization itself Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit a04b7cd97eef13a489ca44c979cf91e24cfa7b55 Author: Ofir Bitton Date: Mon Jul 13 13:36:55 2020 +0300 habanalabs: create internal CB pool Create a device MMU-mapped internal command buffer pool, in order to allow the driver to allocate CBs for the signal/wait operations that are fetched by the queues when they are configured with the user's address space ID. We must pre-map this internal pool due to performance issues. This pool is needed for future ASIC support and it is currently unused in GOYA and GAUDI. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit eb8b293e794bbbafa9d615ea939982a19bf92867 Author: Oded Gabbay Date: Mon Jul 13 13:11:33 2020 +0300 habanalabs: update hl_boot_if.h from firmware Update the boot interface file from the latest version from firmware. Defines for secure boot were added. Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit 70b2f993ea4a79c298aac4ec1c58089020536ba5 Author: Oded Gabbay Date: Mon Jul 13 12:21:04 2020 +0300 habanalabs: create common folder For internal needs of our CI we need to move all the common code into a common folder instead of putting them in the root folder of the driver. Same applies to the common header files under include/ Signed-off-by: Oded Gabbay Reviewed-by: Omer Shpigelman commit a9855a2d91531001f1a952a042f17cc42ef30cb7 Author: Moti Haimovski Date: Wed Jun 24 19:40:57 2020 +0300 habanalabs: check for DMA errors when clearing memory In GAUDI we use QMAN0 DMA for clearing the MMU memory region at initialization. if this operation fails it places the DMA in an error state and then when trying to initialize QMAN0 we fail and erroneously assume its the QMAN that failed. This commit adds a check and clear of such DMA errors at initialization so we will have a better understanding of what went wrong. Signed-off-by: Moti Haimovski Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 22cb855598ed9aa7812941eb29218dc6033b4b43 Author: Ofir Bitton Date: Wed Jul 8 10:16:27 2020 +0300 habanalabs: verify queue can contain all cs jobs In order for the user to be aware of wrong inputs, we must return error in case the amount of jobs per cs exceeds the corresponding queue size. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5574cb2194b13de78df68cd32655ddbe619b1251 Author: Ofir Bitton Date: Sun Jul 5 13:35:51 2020 +0300 habanalabs: Assign each CQ with its own work queue We identified a possible race during job completion when working with a single multi-threaded work queue. In order to overcome this race we suggest using a single threaded work queue per completion queue, hence we guarantee jobs completion in order. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c83c4171933bc4ebd147efb6bbdb787b25d1907d Author: Oded Gabbay Date: Sun Jul 5 15:48:34 2020 +0300 habanalabs: halt device CPU only upon certain reset Currently the driver halts the device CPU in the halt engines function, which halts all the engines of the ASIC. The problem is that if later on we stop the reset process (due to inability to clean memory mappings in time), the CPU will remain in halt mode. This creates many issues, such as thermal/power control and FLR handling. Therefore, move the halting of the device CPU to the very end of the reset process, just before writing to the registers to initiate the reset. In addition, the driver now needs to send a message to the device F/W to disable it from sending interrupts to the host machine because during halt engines function the driver disables the MSI/MSI-X interrupts. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit 9158c47e2059967038b19d051a1afd87954fbba4 Author: Omer Shpigelman Date: Wed Jul 8 00:29:54 2020 +0300 habanalabs: remove unused hash Remove an old hash that is not in use anymore. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 79b1894c419468607ce547855e8636d42b456149 Author: Ofir Bitton Date: Wed Jun 24 14:49:43 2020 +0300 habanalabs: use queue pi/ci in order to determine queue occupancy Instead of using the free slots amount on the compute CQ to determine whether we can submit work to queues, use the queues pi/ci. This is needed in future ASICs where we don't have CQ per queue. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 3abc99bb7dcbc0704972dae6c6ba92fbb1fbf191 Author: Ofir Bitton Date: Tue Jun 23 14:50:39 2020 +0300 habanalabs: configure maximum queues per asic Currently the amount of maximum queues is statically configured. Using a static value is causing redundunt cycles when traversing all queues and consumes more memory than actually needed. In this patch we configure each asic with the exact number of queues needed. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 12ae3133d2df4d5091cbf6a966a98f5e07c31b56 Author: Oded Gabbay Date: Fri Jul 3 20:58:23 2020 +0300 habanalabs: remove soft-reset support from GAUDI Soft-reset isn't supported in GAUDI. Remove the code that performs it and print error in case the user wants to do it via sysfs. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit f4cbfd2445ffa3415023899e43ac9c8334171cf4 Author: Ofir Bitton Date: Mon Jun 15 17:45:12 2020 +0300 habanalabs: PCIe iATU refactoring Divide iATU initialization into inbound/outbound methods. We must separate it in order to enable different match mode per PCIe region. In addition, added support for PCI address match mode. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit fcc6a4e606787be775b032f96c57472592f76300 Author: Oded Gabbay Date: Sun May 17 08:20:35 2020 +0300 habanalabs: Extract ECC information from FW ECC (Error Correcting Code) interrupts are going to be handled by the FW. Hence, we define an interface in which the driver can obtain the relevant ECC information. This information is needed for monitoring and can also lead to a hard reset if ECC error is not correctable. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit db491e4f08a9fd84ebb1ebd22a6b0b988a81a0d8 Author: Ofir Bitton Date: Thu Jun 18 09:51:16 2020 +0300 habanalabs: Add dropped cs statistics info struct Add command submission statistics structure which can be obtained through the info ioctl. Each drop counter describes the reason for which the command submission was dropped. This information is needed for the user to be aware of the specific reason for which the submitted work was dropped. The user can then utilize the driver more efficiently. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c8f9b49d2db7e98df534c6e666b26c64da4cb667 Author: Christine Gharzuzi Date: Tue Jun 23 19:21:22 2020 +0300 habanalabs: extract cpu boot status lookup Extract detection of the cpu boot status to a function to allow code reuse Signed-off-by: Christine Gharzuzi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0eab4f89d64c1639a1b9288f316bbfa292bd9413 Author: Oded Gabbay Date: Mon Jun 22 09:52:22 2020 +0300 habanalabs: rephrase error messages rephrase some error/warning/notice messages to make them more accessible to ordinary users. There is no need to print context ASID as the driver currently doesn't support multiple contexts. Signed-off-by: Oded Gabbay Reviewed-by: Tomer Tayar commit dd9efabd0a5ae6dab255737c808d5ab6af1e8f91 Author: Ofir Bitton Date: Mon Jun 15 12:09:50 2020 +0300 habanalabs: Increase queues depth After recent concurrent cs amount increase, we must also increase queues depth since much more concurrent work can be done. All external queue depths were increased to 4096 as gaudi's internal queue depths were also increased to 1024. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 917b79b09671740ce2e2c702641e50f890b27a67 Author: Omer Shpigelman Date: Sat Jul 4 22:51:16 2020 +0300 habanalabs: rephrase error message Rephrase F/W error message to make it more understandable to ordinary users. Signed-off-by: Omer Shpigelman Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e8edded6939e4c194ab302d4913cb1a9319561d9 Author: Adam Aharon Date: Tue May 26 11:04:30 2020 +0300 habanalabs: calculate trace frequency from PLL The profiler needs to know the PLL values for correctly showing the profiling data. Because our firmware can use different PLL configurations, we need to read the PLL values from the ASIC to pass them to the profiler. Signed-off-by: Adam Aharon Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6ced91170df88ff03b7d4c9ec87c185ebf8443be Author: Oded Gabbay Date: Tue Jun 9 19:58:44 2020 +0300 habanalabs: align armcp_packet structure to 8 bytes Once there is a 64-bit field in a structure, GCC compiler for ARM aligns the structure to 8 bytes. In order to avoid confusion when these structures are being passed between CPUs from different architectures, we explicitly align the structure to 8 bytes. Reviewed-by: Omer Shpigelman Signed-off-by: Oded Gabbay commit 3bf1c021e36e7269c71dceafec713b0181f413a9 Author: Oded Gabbay Date: Tue Jun 9 16:14:55 2020 +0300 uapi/habanalabs: fix some comments MAP/UNMAP are done also for device memory. Reviewed-by: Omer Shpigelman Signed-off-by: Oded Gabbay commit 6c07bab34b07eee62cfdc4a0bcce2732986b4288 Author: Ofir Bitton Date: Mon Jun 1 10:38:46 2020 +0300 habanalabs: Use mask instead of shift in sync stream registers Use proper bitfield masks instead of shifting values when configuring packets sent to device. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 21e7a34634495939b195e5dea51e7628c3d7ab3a Author: Ofir Bitton Date: Thu May 14 18:25:47 2020 +0300 habanalabs: sync stream generic functionality Currently sync stream is limited only for external queues. We want to remove this constraint by adding a new queue property dedicated for sync stream. In addition we move the initialization and reset methods to the common code since we can re-use them with slight changes. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit c16d45f42b64e91895f4bc1cf19febeb5e0c52b6 Author: Ofir Bitton Date: Tue Jun 2 12:28:27 2020 +0300 habanalabs: Use pending CS amount per ASIC Training schemes requires much more concurrent command submissions than inference does. In addition, training command submissions can be completed in a non serialized manner. Hence, we add support in which each ASIC will be able to configure the amount of concurrent pending command submissions, rather than use a predefined amount. This change will enhance performance by allowing the user to add more concurrent work without waiting for the previous work to be completed. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 0b168c8f1d21f87003fb28b4c87c32335d7fc94b Author: Oded Gabbay Date: Mon Jun 15 19:25:57 2020 +0300 habanalabs: remove rate limiters from GAUDI We no longer need to initialize the rate limiters in GAUDI A1. Reviewed-by: Omer Shpigelman Signed-off-by: Oded Gabbay commit 82aa68afa16819d9f05b899a5fcf174c2f1fb889 Author: Thierry Reding Date: Fri Jul 24 19:01:05 2020 +0200 thermal: core: Fix thermal zone lookup by ID When a thermal zone is looked up by an ID and no zone is found matching that ID, the thermal_zone_get_by_id() function will return a pointer to the thermal zone list head which isn't actually a valid thermal zone. This can lead to a subsequent crash because a valid pointer is returned to the called, but dereferencing that pointer as struct thermal_zone is not safe. Fixes: 329b064fbd13 ("thermal: core: Get thermal zone by id") Signed-off-by: Thierry Reding Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200724170105.2705467-1-thierry.reding@gmail.com commit 9614cc576d76a7449cd51b60ef81fd0ce19ee694 Author: Andrei Vagin Date: Wed Jun 24 01:33:21 2020 -0700 arm64: enable time namespace support CONFIG_TIME_NS is dependes on GENERIC_VDSO_TIME_NS. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Link: https://lore.kernel.org/r/20200624083321.144975-7-avagin@gmail.com Signed-off-by: Catalin Marinas commit bcf996434240c611f0fdab2c18cd75dd59cfa3c2 Author: Andrei Vagin Date: Wed Jun 24 01:33:20 2020 -0700 arm64/vdso: Restrict splitting VVAR VMA Forbid splitting VVAR VMA resulting in a stricter ABI and reducing the amount of corner-cases to consider while working further on VDSO time namespace support. As the offset from timens to VVAR page is computed compile-time, the pages in VVAR should stay together and not being partically mremap()'ed. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Link: https://lore.kernel.org/r/20200624083321.144975-6-avagin@gmail.com Signed-off-by: Catalin Marinas commit ee3cda8e46060b021087b6ef451e1cd9fa648af6 Author: Andrei Vagin Date: Wed Jun 24 01:33:19 2020 -0700 arm64/vdso: Handle faults on timens page If a task belongs to a time namespace then the VVAR page which contains the system wide VDSO data is replaced with a namespace specific page which has the same layout as the VVAR page. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Link: https://lore.kernel.org/r/20200624083321.144975-5-avagin@gmail.com Signed-off-by: Catalin Marinas commit 3aecfc72d7ad73330e7a6ebd0005738a8fd417ab Author: Tzung-Bi Shih Date: Fri Jul 24 15:07:31 2020 +0800 ASoC: dapm: don't call pm_runtime_* on card device runtime_usage of sound card has been observed to grow without bound. For example: $ cat /sys/devices/platform/sound/power/runtime_usage 46 $ sox -n -t s16 -r 48000 -c 2 - synth 1 sine 440 vol 0.1 | \ aplay -q -D hw:0,0 -f S16_LE -r 48000 -c 2 $ cat /sys/devices/platform/sound/power/runtime_usage 52 Commit 4e872a46823c ("ASoC: dapm: Don't force card bias level to be updated") stops to force update bias_level on card. If card doesn't provide set_bias_level callback, the snd_soc_dapm_set_bias_level() is equivalent to NOP for card device. As a result, dapm_pre_sequence_async() doesn't change the bias_level of card device correctly. Thus, pm_runtime_get_sync() would be called in dapm_pre_sequence_async() without symmetric pm_runtime_put() in dapm_post_sequence_async(). Don't call pm_runtime_* on card device. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200724070731.451377-1-tzungbi@google.com Signed-off-by: Mark Brown commit 54918b8ed1e52ae5f2a521bdf014e4fba797c920 Merge: 4c0d77828d4f1 12a400b016ab9 Author: Greg Kroah-Hartman Date: Fri Jul 24 17:24:09 2020 +0200 Merge tag 'icc-5.9-rc1' of https://git.linaro.org/people/georgi.djakov/linux into char-misc-next Georgi writes: interconnect changes for 5.9 Here are the interconnect changes for the 5.9-rc1 merge window consisting mostly of changes that give the core more flexibility in order to support some new provider drivers. Core changes: - Export of_icc_get_from_provider() - Relax requirement in of_icc_get_from_provider() - Allow inter-provider pairs to be configured - Mark all dummy functions as static inline Signed-off-by: Georgi Djakov * tag 'icc-5.9-rc1' of https://git.linaro.org/people/georgi.djakov/linux: interconnect: Mark all dummy functions as static inline interconnect: Allow inter-provider pairs to be configured interconnect: Relax requirement in of_icc_get_from_provider() interconnect: Export of_icc_get_from_provider() commit 4c0d77828d4f17ecae3e662728b997c0f0276204 Author: Jim Cromie Date: Sun Jul 19 17:10:58 2020 -0600 dyndbg: export ddebug_exec_queries Export ddebug_exec_queries() for use by modules. This will allow module authors to control all their *pr_debug*s dynamically. And since ddebug_exec_queries() is what implements "echo $query >control", it gives the same per-callsite control. Virtues of this: - simplicity. just an export. - full control over any/all subsets of callsites. - same "query/command-string" in code and console - full callsite selectivity with module file line format Format in particular deserves special attention; it is where low-hanging fruit will be found. Consider: drivers/gpu/drm/amd/display/include/logger_types.h: #define DC_LOG_SURFACE(...) pr_debug("[SURFACE]:"__VA_ARGS__) #define DC_LOG_HW_LINK_TRAINING(...) pr_debug("[HW_LINK_TRAINING]:"__VA_ARGS__) .. 9 more .. Thats 11 string prefixes, used in 804 places in drivers/gpu/** Clearly this is a systematized classification of those callsites. And one I'd expect to see repeated often. Using ddebug_exec_queries(), authors can select on those prefixes as a unitary set, equivalent to: echo "module=MODULE_NAME format=^[SURFACE]: +p" >control Trivially, those sets can be subsected with the other query terms too, say file=foo, should the author see fit. Perhaps as important, users can modify the set of enabled callsites, presumably to aid debugging by enabling helpful debug callsites, and disabling those that just clutter the info. Authors could even alter [fmlt] flags, though I dont see a good reason why they would. Perhaps harnessed by bug-logging automation to get fuller, or more minimal bug-reports. DRM drm has both drm.debug, which defines 32 categories of drm_printk logging, and entirely separate uses of pr_debug, which are dynamic on this i915 laptop, running mainline. So I can observe and report on both. The i915 driver has 118 dyndbg callsites, with following "classifications" defined in drivers/gpu/drm/i915/gvt/** $ grep 915 /proc/dynamic_debug/control | cut -d= -f2 | cut -d: -f1,2 | sort -u _ "gvt: cmd _ "gvt: core _ "gvt: dpy _ "gvt: el _ "gvt: irq _ "gvt: mm _ "gvt: mmio _ "gvt: render _ "gvt: sched _ "%s for root hub!\012" _ "Vendor defined info completion code %u\012" This classification is entirely out-of-band for control by drm.debug, and is only available to root user at the console. But module authors can activate them with ddebug_exec_queries(sprintf("format=^%s +p")), and then decide how to expose the groups to the user for max utility. drm.debug drm.debug has 32 bit-flags, and matching enum drm_debug_category values to classify the ~2943 DRM_DEBUG*() callsites in drivers/gpu The drm.debug callback could invoke ddebug_exec_queries() with 32 different hardcoded query strings, needing only (bit) ? " +p" : " -p" added. I briefly enabled drm.debug=0xff on my i915 laptop, which yielded these unique prefixes: (dmesg | cut -c17- | cut -d\] -f1 | sort -u) [drm:drm_atomic_check_only [drm [drm:drm_atomic_get_crtc_state [drm [drm:drm_atomic_get_plane_state [drm [drm:drm_atomic_nonblocking_commit [drm [drm:drm_atomic_set_fb_for_plane [drm [drm:drm_atomic_state_default_clear [drm [drm:__drm_atomic_state_free [drm [drm:drm_atomic_state_init [drm [drm:drm_crtc_vblank_helper_get_vblank_timestamp_internal [drm [drm:drm_handle_vblank [drm [drm:drm_ioctl [drm [drm:drm_mode_addfb2 [drm [drm:drm_mode_object_get [drm [drm:drm_mode_object_put.part.0 [drm [drm:drm_update_vblank_count [drm [drm:drm_vblank_enable [drm [drm:drm_vblank_restore [drm [drm:vblank_disable_fn [drm i915 0000:00:02.0: [drm:gen9_set_dc_state [i915 i915 0000:00:02.0: [drm:intel_atomic_get_global_obj_state [i915 i915 0000:00:02.0: [drm:__intel_display_power_get_domain.part.0 [i915 i915 0000:00:02.0: [drm:__intel_display_power_put_domain [i915 i915 0000:00:02.0: [drm:intel_plane_atomic_calc_changes [i915 i915 0000:00:02.0: [drm:skl_enable_dc6 [i915 Several good format=^prefixes are apparent there, and some misses. ^[drm:drm_atomic_ # misses: [drm:__drm_atomic_state_free [drm ^[drm:drm_ioctl ^[drm:drm_mode ^[drm:drm_vblank_ # misses: [drm:drm_update_vblank_count & [drm:vblank_disable_fn Its not a perfect 1:1 single format-match per class, but the misses above can be covered with 1 & 2 additional queries, which can be concatenated together with ";" separators and submitted with 1 call. Benefits: For drm, adapting DRM_DEBUG to use dynamic-debug inside could replicate (and thereby obsolete) lots of bit-checking in current DRM_DEBUG callsites, at least with JUMP_LABEL optimized code. ddebug_exec_queries() and a handful of fixed query-strings can select and thereby control the already classified callsites. With the classes mapped to queries, the enum type and parameter can be eliminated (folded away with macro magic), at least for DYNAMIC_DEBUG & JUMP_LABEL builds. Is it safe ? ddebug_exec_queries() is currently exposed to user space in several limited ways; 1 it is called from module-load callback, where it implements the $modname.dyndbg=+p "fake" parameter provided to all modules. 2 it handles query input via >control directly IOW, it is "fully" exposed to local root user; exposing the same functionality to other kernel modules is no additional risk. The other standard issue to check is locking: dyndbg has a single mutex, taken by ddebug_change to handle >control, and by ddebug_proc_(start|stop) to span `cat control`. Queries submitted via export will typically have module specified, which dramatically cuts the scan by ddebug_change vs "module=* +p". ISTM this proposed export presents no locking problems. TLDR; It would be interesting to see how drm.dyndbg=$QUERY and drm.debug=$HEXY would interact; it might be order dependent, as if given as modprobe args or in /etc/modprobe.d/ Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-19-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5aa9ffbbaeb3aba22a5d2b6a6eead1f0bcd38254 Author: Jim Cromie Date: Sun Jul 19 17:10:57 2020 -0600 dyndbg: shorten our logging prefix, drop __func__ For log-message output, reduce column space consumed by current pr_fmt by dropping __func__ and shortening "dynamic_debug" to "dyndbg". This improves readability on narrow consoles, and better matches other kernel boot info messages. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-18-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4b334484fa7f44baa369db0bbab534f853520f64 Author: Jim Cromie Date: Sun Jul 19 17:10:56 2020 -0600 dyndbg: allow anchored match on format query term This should work: echo module=amd* format=^[IF_TRACE]: +p >/proc/dynamic_debug/control consider drivers/gpu/drm/amd/display/include/logger_types.h: It has 11 defines like: #define DC_LOG_IF_TRACE(...) pr_debug("[IF_TRACE]:"__VA_ARGS__) These defines are used 804 times at recent count; they are a good use case to evaluate existing format-message based classifications of *pr_debug*. Those macros prefix the supplied format with a fixed string, I'd expect most existing message classification schemes to do something similar. Hence we want to be able to anchor our match to the beginning of the format string, allowing easy construction of clear and precise queries, leveraging the existing classification scheme to enable and disable those callsites. Note that unlike other search terms, formats are implicitly floating substring matches, without the need for explicit wildcards. This makes no attempt at wider regex features, just the one we need. TLDR: Using the anchor also means the []s are less helpful for disamiguating the prefix from a random in-message occurrence, allowing shorter prefixes. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-17-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 84da83a6ffc0b730f64604d869e0697ad106fd42 Author: Jim Cromie Date: Sun Jul 19 17:10:55 2020 -0600 dyndbg: combine flags & mask into a struct, simplify with it flags & mask are used together everywhere, and are passed around together between multiple functions; they belong together in a struct, call that struct flag_settings. Use struct flag_settings to rework 3 functions: - ddebug_exec_query - declares query and flag-settings, calls other 2, passing flags - ddebug_parse_flags - fills flag_settings and returns - ddebug_change - test all callsites against query, modify passing sites. benefits: - bit-banging always needs flags & mask, best together. - simpler function signatures - 1 less parameter, less stack overhead no functional changes Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-16-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 14775b04964264189caa4a0862eac05dab8c0502 Author: Jim Cromie Date: Sun Jul 19 17:10:54 2020 -0600 dyndbg: accept query terms like file=bar and module=foo Current code expects "keyword" "arg" as 2 words, space separated. Change to also accept "keyword=arg" form as well, and drop !(nwords%2) requirement. Then in rest of function, use new keyword, arg variables instead of word[i], word[i+1] Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-15-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit aaebe329bff0d84e04e74915a828b12a40b55456 Author: Jim Cromie Date: Sun Jul 19 17:10:53 2020 -0600 dyndbg: accept 'file foo.c:func1' and 'file foo.c:10-100' Accept these additional query forms: echo "file $filestr +_" > control path/to/file.c:100 # as from control, column 1 path/to/file.c:1-100 # or any legal line-range path/to/file.c:func_A # as from an editor/browser path/to/file.c:drm_* # wildcards still work path/to/file.c:*_foo # lead wildcard too 1st 2 examples are treated as line-ranges, 3-5 are treated as func's Doc these changes, and sprinkle in a few extra wild-card examples and trailing # explanation texts. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-14-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8037072d8139da435f3fcf9369a1ccc388431a2a Author: Jim Cromie Date: Sun Jul 19 17:10:52 2020 -0600 dyndbg: refactor parse_linerange out of ddebug_parse_query Make the code-block reusable to later handle "file foo.c:101-200" etc. This is a 99% code move, with reindent, function wrap&call, +pr_debug. no functional changes. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-13-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit f62fc08fdc51d18292eb13bd345dfb159f024746 Author: Jim Cromie Date: Sun Jul 19 17:10:51 2020 -0600 dyndbg: use gcc ?: to reduce word count reduce word count via gcc ?: extension, no actual code change. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-12-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 47e9f5a82329696b31e7e0672653954f6e9b0f54 Author: Jim Cromie Date: Sun Jul 19 17:10:50 2020 -0600 dyndbg: make ddebug_tables list LIFO for add/remove_module loadable modules are the last in on this list, and are the only modules that could be removed. ddebug_remove_module() searches from head, but ddebug_add_module() uses list_add_tail(). Change it to list_add() for a micro-optimization. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-11-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9c9d0acbe2793315fa6945a19685ad2a51fb281b Author: Jim Cromie Date: Sun Jul 19 17:10:49 2020 -0600 dyndbg: prefer declarative init in caller, to memset in callee ddebug_exec_query declares an auto var, and passes it to ddebug_parse_query, which memsets it before using it. Drop that memset, instead initialize the variable in the caller; let the compiler decide how to do it. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-10-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0b8f96be9bd41521b6379b403cfce78934f8274c Author: Jim Cromie Date: Sun Jul 19 17:10:48 2020 -0600 dyndbg: fix pr_err with empty string this pr_err attempts to print the string after the OP, but the string has been parsed and chopped up, so looks empty. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-9-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit f678ce8cc3cb2ad29df75d8824c74f36398ba871 Author: Jim Cromie Date: Sun Jul 19 17:10:47 2020 -0600 dyndbg: fix a BUG_ON in ddebug_describe_flags ddebug_describe_flags() currently fills a caller provided string buffer, after testing its size (also passed) in a BUG_ON. Fix this by replacing them with a known-big-enough string buffer wrapped in a struct, and passing that instead. Also simplify ddebug_describe_flags() flags parameter from a struct to a member in that struct, and hoist the member deref up to the caller. This makes the function reusable (soon) where flags are unpacked. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-8-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 81d0c2c60942cf35daf3fc18d42606f669fcf44c Author: Jim Cromie Date: Sun Jul 19 17:10:46 2020 -0600 dyndbg: fix overcounting of ram used by dyndbg during dyndbg init, verbose logging prints its ram overhead. It counted strlens of struct _ddebug's 4 string members, in all callsite entries, which would be approximately correct if each had been mallocd. But they are pointers into shared .rodata; for example, all 10 kobject callsites have identical filename, module values. Its best not to count that memory at all, since we cannot know they were linked in because of CONFIG_DYNAMIC_DEBUG=y, and we want to report a number that reflects what ram is saved by deconfiguring it. Also fix wording and size under-reporting of the __dyndbg section. Heres my overhead, on a virtme-run VM on a fedora-31 laptop: dynamic_debug:dynamic_debug_init: 260 modules, 2479 entries \ and 10400 bytes in ddebug tables, 138824 bytes in __dyndbg section Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-7-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit e5ebffe18e5add85acb23c7a0f74509749967204 Author: Jim Cromie Date: Sun Jul 19 17:10:45 2020 -0600 dyndbg: rename __verbose section to __dyndbg dyndbg populates its callsite info into __verbose section, change that to a more specific and descriptive name, __dyndbg. Also, per checkpatch: simplify __attribute(..) to __section(__dyndbg) declaration. and 1 spelling fix, decriptor Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-6-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 481c0e33f1e71a7ad934bab07b6f3f77243ef0e5 Author: Jim Cromie Date: Sun Jul 19 17:10:44 2020 -0600 dyndbg: refine debug verbosity; 1 is basic, 2 more chatty The verbose/debug logging done for `cat $MNT/dynamic_debug/control` is voluminous (2 per control file entry + 2 per PAGE). Moreover, it just prints pointer and sequence, which is not useful to a dyndbg user. So just drop them. Also require verbose>=2 for several other debug printks that are a bit too chatty for typical needs; ddebug_change() prints changes, once per modified callsite. Since queries like "+p" will enable ~2300 callsites in a typical laptop, a user probably doesn't need to see them often. ddebug_exec_queries() still summarizes with verbose=1. ddebug_(add|remove)_module() also print 1 line per action on a module, not needed by typical modprobe user. This leaves verbose=1 better focussed on the >control parsing process. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-5-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1ff838487d6fcd013f2bde44c8e486f9d6758271 Author: Jim Cromie Date: Sun Jul 19 17:10:43 2020 -0600 dyndbg: drop obsolete comment on ddebug_proc_open commit 4bad78c55002 ("lib/dynamic_debug.c: use seq_open_private() instead of seq_open()")' The commit was one of a tree-wide set which replaced open-coded boilerplate with a single tail-call. It therefore obsoleted the comment about that boilerplate, clean that up now. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-4-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit fa0805207066ce3bdc414fb14fda95a3b7ba87bb Author: Jim Cromie Date: Sun Jul 19 17:10:42 2020 -0600 dyndbg-docs: initialization is done early, not arch since cf964976484 in 2012, initialization is done with early_initcall, update the Docs, which still say arch_initcall. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-3-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit e20e310c8195ef36d46cd4a768a79e1ea93c20a4 Author: Jim Cromie Date: Sun Jul 19 17:10:41 2020 -0600 dyndbg-docs: eschew file /full/path query in docs Regarding: commit 2b6783191da7 ("dynamic_debug: add trim_prefix() to provide source-root relative paths") commit a73619a845d5 ("kbuild: use -fmacro-prefix-map to make __FILE__ a relative path") 2nd commit broke dynamic-debug's "file $fullpath" query form, but nobody noticed because 1st commit had trimmed prefixes from control-file output, so the click-copy-pasting of fullpaths into new queries had ceased; that query form became unused. Removing the function is cleanest, but it could be useful in old-compiler corner cases, where __FILE__ still has /full/path, and it safely does nothing otherwize. So instead, quietly deprecate "file /full/path" query form, by removing all /full/paths examples in the docs. I skipped adding a back-compat note. Acked-by: Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20200719231058.1586423-2-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3f9a7a13fe4cb6e119e4e4745fbf975d30bfac9b Author: Ashok Raj Date: Thu Jul 23 15:37:29 2020 -0700 PCI/ATS: Add pci_pri_supported() to check device or associated PF For SR-IOV, the PF PRI is shared between the PF and any associated VFs, and the PRI Capability is allowed for PFs but not for VFs. Searching for the PRI Capability on a VF always fails, even if its associated PF supports PRI. Add pci_pri_supported() to check whether device or its associated PF supports PRI. [bhelgaas: commit log, avoid "!!"] Fixes: b16d0cb9e2fc ("iommu/vt-d: Always enable PASID/PRI PCI capabilities before ATS") Link: https://lore.kernel.org/r/1595543849-19692-1-git-send-email-ashok.raj@intel.com Signed-off-by: Ashok Raj Signed-off-by: Bjorn Helgaas Reviewed-by: Lu Baolu Acked-by: Joerg Roedel Cc: stable@vger.kernel.org # v4.4+ commit 1c026a18d40bdd904d3ae1f7737cd08b376286d6 Author: Colin Ian King Date: Thu Jun 11 13:31:34 2020 +0100 xen: Remove redundant initialization of irq The variable irq is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20200611123134.922395-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Bjorn Helgaas commit 2fdf8f7f086712bbe296d1d4d4049ca88e7a662d Author: Wei Yongjun Date: Tue Jul 21 21:49:19 2020 +0800 hwmon: (sparx5) Make symbol 's5_temp_match' static The sparse tool complains as follows: drivers/hwmon/sparx5-temp.c:150:27: warning: symbol 's5_temp_match' was not declared. Should it be static? This variable is not used outside of sparx5-temp.c, this commit marks it static. Fixes: c2cb4b5777e1 ("hwmon: sparx5: Add Sparx5 SoC temperature driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200721134919.34033-1-weiyongjun1@huawei.com Signed-off-by: Guenter Roeck commit fa4dac3e1bf7fadb4c5e098dcd721eafe3cd80c5 Author: Marius Zachmann Date: Tue Jul 21 10:54:47 2020 +0200 hwmon: (corsair-cpro) add reading pwm values This adds the possibility for reading pwm values. These can not be read if the device is controlled via fan_target or a fan curve and will return an error in this case. Since an error is expected, this adds some rudimentary error handling. Changes: - add CTL_GET_FAN_PWM and use it via get_data - pwm returns -ENODATA if the device returns error 0x12 - fan_target now returns -ENODATA when the driver is started or a pwm value is set. - add ccp_get_errno to determine errno from device error. - get_data now has a parameter to determine whether to read one or two bytes of data. - update documentation - fix missing surname in MAINTAINERS Signed-off-by: Marius Zachmann Signed-off-by: Guenter Roeck commit e4922176e1669f174e101d321d76fdc1a134f7ac Author: Lars Povlsen Date: Thu Jun 18 15:59:51 2020 +0200 hwmon: sparx5: Add Sparx5 SoC temperature driver This patch adds a temperature sensor driver to the Sparx5 SoC. Signed-off-by: Lars Povlsen Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200618135951.25441-4-lars.povlsen@microchip.com Signed-off-by: Guenter Roeck commit f5520753c16f2b24610f5f3cef4cc3e8f589b95e Author: Lars Povlsen Date: Thu Jun 18 15:59:49 2020 +0200 dt-bindings: hwmon: Add Sparx5 temperature sensor This add the DT binding specification for the Sparx5 temperature sensor. Signed-off-by: Lars Povlsen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200618135951.25441-2-lars.povlsen@microchip.com Signed-off-by: Guenter Roeck commit e53ee186b31e6b6bcf8682c54c40b83461947e7e Author: Alexander A. Klimov Date: Sun Jul 19 21:25:44 2020 +0200 hwmon: (tmp401) Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719192544.61247-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit fdf416450395cca1dcbd49a81520c359537694e7 Author: Alexander A. Klimov Date: Sun Jul 19 21:15:34 2020 +0200 hwmon: (lm95234) Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719191534.61181-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit 6c7b66bed0d21329fe844f67ab0167f0cc19b226 Author: Alexander A. Klimov Date: Sun Jul 19 21:05:25 2020 +0200 hwmon: (lm90) Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719190525.61112-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit f4753560377b84fe4d8369e696f566e3f7a53f1b Author: Alexander A. Klimov Date: Sun Jul 19 20:35:48 2020 +0200 hwmon: (k8temp) Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719183548.61011-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit d38b7e4a877eae25ac22f8d362b7a113743931e6 Author: Alexander A. Klimov Date: Sun Jul 19 20:25:39 2020 +0200 hwmon: (jc42) Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719182539.60944-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit 49dc2fb0e04679422369f54ff3ed720616ee7eb3 Author: Alexander A. Klimov Date: Sun Jul 19 20:15:30 2020 +0200 hwmon: (ina2xx) Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719181530.60878-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit 009f429f6b0d8636a38b91545f373c752e320e64 Author: Alexander A. Klimov Date: Sun Jul 19 20:05:21 2020 +0200 hwmon: (ina209) Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719180521.60811-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit ad736c1a4dcc6f0a26483619d7b4b232152c38fc Author: Alexander A. Klimov Date: Sun Jul 19 19:55:12 2020 +0200 hwmon: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719175512.60745-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit f12d634f90f6b4fbe79bd89c2238efe6fabb0858 Author: Alexander A. Klimov Date: Sun Jul 19 19:04:20 2020 +0200 docs: hwmon: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719170420.60399-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit 0303d06315564e113ffa345799ae2bbfbca6716e Author: Alexander A. Klimov Date: Mon Jul 13 16:00:28 2020 +0200 hwmon: (adm1025) Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713140028.34775-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit 40c3a445422579db8ad96c234dbe6c0ab3f6b936 Author: Marius Zachmann Date: Fri Jun 26 07:59:36 2020 +0200 hwmon: add Corsair Commander Pro driver This is v7 of a driver for the Corsair Commander Pro. It provides sysfs attributes for: - Reading fan speed - Reading temp sensors - Reading voltage values - Writing pwm and reading last written pwm - Reading fan and temp connection status It is an usb driver, so it needs to be ignored by usbhid. The Corsair Commander Pro is a fan controller and provides no means for user interaction. The two device numbers are there, because there is a slightly different version of the same device. (Only difference seem to be in some presets.) Squashed: hwmon: (corsair-cpro) add fan_target This adds fan_target entries to the corsair-cpro driver. Reading the attribute from the device does not seem possible, so it returns the last set value (same as pwm). send_usb_cmd now has one more argument, which is needed for the fan_target command. hwmon: corsair-cpro: Change to HID driver This changes corsair-cpro to a hid driver using hid reports. Signed-off-by: Marius Zachmann Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200626055936.4441-1-mail@mariuszachmann.de Link: https://lore.kernel.org/r/20200709141413.30790-1-mail@mariuszachmann.de [groeck: Squashed follow-up patches to avoid changes in HID code] Signed-off-by: Guenter Roeck commit a686024e18bdce5724468c7f1703c35de299dd80 Author: Chu Lin Date: Tue Jul 7 17:15:28 2020 +0000 hwmon: (max6697) Allow max6581 to create tempX_offset Add tempX_offset attribute support to max6697 driver. Temperature offsets are only supported for MAX6581. Testing: echo 16250 > temp2_offset cat temp2_offset 16250 echo 17500 > temp3_offset cat temp3_offset 17500 cat temp4_offset 0 cat temp2_offset 17500 echo 0 > temp2_offset cat temp2_offset 0 cat temp3_offset 17500 echo -0 > temp2_offset cat temp2_offset 0 echo -100000 > temp2_offset cat temp2_input 4875 echo 10000 > temp2_offset cat temp2_input 47125 echo -2000 > temp2_offset cat temp2_input 34875 echo -0 > temp2_offset cat temp2_input 37000 Signed-off-by: Chu Lin Link: https://lore.kernel.org/r/20200707171528.2929275-1-linchuyuan@google.com [groeck: Fixed checkpatch warning (unnecessary { })] Signed-off-by: Guenter Roeck commit e263f2d3c2bc0985025d4996b4f92cb4f18265b7 Author: Alexander A. Klimov Date: Fri Jul 3 20:56:57 2020 +0200 hwmon: (tmmp513) Replace HTTP links with HTTPS links Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200703185657.15329-1-grandmaster@al2klimov.de Signed-off-by: Guenter Roeck commit 0505aca8cbc8b31aaae1e87873f9492278dd208d Author: Randy Dunlap Date: Fri Jul 3 13:56:49 2020 -0700 Documentation: hwmon/w83l786ng: drop duplicate words Drop the doubled word "readings". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Link: https://lore.kernel.org/r/20200703205649.30125-6-rdunlap@infradead.org Acked-by: Mike Rapoport Signed-off-by: Guenter Roeck commit f8c963e57d55e6cbea636d05dee6f582889a4d37 Author: Randy Dunlap Date: Fri Jul 3 13:56:48 2020 -0700 Documentation: hwmon/w83627ehf: drop duplicate words Drop the doubled word "and". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Link: https://lore.kernel.org/r/20200703205649.30125-5-rdunlap@infradead.org Acked-by: Mike Rapoport Signed-off-by: Guenter Roeck commit e5754c1e677a61fed261fb22557ab72d7984c225 Author: Randy Dunlap Date: Fri Jul 3 13:56:47 2020 -0700 Documentation: hwmon/nct7665: drop duplicate words Drop the doubled word "be". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Link: https://lore.kernel.org/r/20200703205649.30125-4-rdunlap@infradead.org Acked-by: Mike Rapoport Signed-off-by: Guenter Roeck commit bb21eb10715d45619acba1449c3797a8f78aebe1 Author: Randy Dunlap Date: Fri Jul 3 13:56:46 2020 -0700 Documentation: hwmon/lm93: drop duplicate words Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Link: https://lore.kernel.org/r/20200703205649.30125-3-rdunlap@infradead.org Acked-by: Mike Rapoport Signed-off-by: Guenter Roeck commit 3cdeccb5f0721491278d09333d16c1d0d1970fc3 Author: Randy Dunlap Date: Fri Jul 3 13:56:45 2020 -0700 Documentation: hwmon/f71882fg: drop duplicate words Drop the doubled word "to". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jean Delvare Cc: Guenter Roeck Cc: linux-hwmon@vger.kernel.org Link: https://lore.kernel.org/r/20200703205649.30125-2-rdunlap@infradead.org Acked-by: Mike Rapoport Signed-off-by: Guenter Roeck commit 8ba75b2028496777a7d595ed5ba03cc85f86bdbb Author: Josh Lehan Date: Thu Jun 25 17:13:43 2020 -0700 hwmon: (pmbus/core) Use s64 instead of long for calculations Using s64 type, instead of long type, for internal calculations and for the sysfs interface. This allows 64-bit values to appear correctly on 32-bit kernels. As wattage is reported in microwatts, monitoring a power supply over 2KW requires this. Although it may seem unlikely to run a 32-bit kernel on such a large machine, enterprise servers often include a BMC, and the BMC might be running a 32-bit kernel. Signed-off-by: Josh Lehan [groeck: Removed Change-Id and other tags, reformatted description] Signed-off-by: Guenter Roeck commit 5c9353f5f81340f350320b5fcfc4c09756ba6da4 Author: Ugur Usug Date: Mon Jun 15 23:49:14 2020 +0000 hwmon: (pmbus/max20730) Add max20710 support Add support for max20710 into the existing max20730 driver. Signed-off-by: Ugur Usug Link: https://lore.kernel.org/r/BYAPR11MB317423C13909AE6F1913BBD7FD9C0@BYAPR11MB3174.namprd11.prod.outlook.com [groeck: Fixed various whitespace errors] Signed-off-by: Guenter Roeck commit 587af649bcc04eb016822f209a975005c0092151 Author: Arvind Sankar Date: Wed Jul 22 14:43:34 2020 -0400 x86/build: Move max-page-size option to LDFLAGS_vmlinux This option is only required for vmlinux on 64-bit, to enforce 2MiB alignment, so set it in LDFLAGS_vmlinux instead of KBUILD_LDFLAGS. Also drop the ld-option check: this option was added in binutils-2.18 and all the other places that use it already don't have the check. This reduces the size of the intermediate ELF files arch/x86/boot/setup.elf and arch/x86/realmode/rm/realmode.elf by about 2MiB each. The binary versions are unchanged. Move the LDFLAGS settings to all be together and just after CFLAGS settings are done. Signed-off-by: Arvind Sankar Signed-off-by: Ingo Molnar Tested-by: Sedat Dilek Cc: Masahiro Yamada Cc: Michal Marek Link: https://lore.kernel.org/r/20200722184334.3785418-1-nivedita@alum.mit.edu commit 9177514ce34902b3adb2abd490b6ad05d1cfcb43 Author: Vladimir Zapolskiy Date: Fri Jul 24 03:50:13 2020 +0300 regulator: fix memory leak on error path of regulator_register() The change corrects registration and deregistration on error path of a regulator, the problem was manifested by a reported memory leak on deferred probe: as3722-regulator as3722-regulator: regulator 13 register failed -517 # cat /sys/kernel/debug/kmemleak unreferenced object 0xecc43740 (size 64): comm "swapper/0", pid 1, jiffies 4294937640 (age 712.880s) hex dump (first 32 bytes): 72 65 67 75 6c 61 74 6f 72 2e 32 34 00 5a 5a 5a regulator.24.ZZZ 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZZZZZZZZZ backtrace: [<0c4c3d1c>] __kmalloc_track_caller+0x15c/0x2c0 [<40c0ad48>] kvasprintf+0x64/0xd4 [<109abd29>] kvasprintf_const+0x70/0x84 [] kobject_set_name_vargs+0x34/0xa8 [<62282ea2>] dev_set_name+0x40/0x64 [] regulator_register+0x3a4/0x1344 [<16a9543f>] devm_regulator_register+0x4c/0x84 [<51a4c6a1>] as3722_regulator_probe+0x294/0x754 ... The memory leak problem was introduced as a side ef another fix in regulator_register() error path, I believe that the proper fix is to decouple device_register() function into its two compounds and initialize a struct device before assigning any values to its fields and then using it before actual registration of a device happens. This lets to call put_device() safely after initialization, and, since now a release callback is called, kfree(rdev->constraints) shall be removed to exclude a double free condition. Fixes: a3cde9534ebd ("regulator: core: fix regulator_register() error paths to properly release rdev") Signed-off-by: Vladimir Zapolskiy Cc: Wen Yang Link: https://lore.kernel.org/r/20200724005013.23278-1-vz@mleia.com Signed-off-by: Mark Brown commit aa2d1ee76660edd4072c9cf8f83ffde4b58a1dd0 Merge: 62f2c7797de37 a63419beafd4e Author: Mark Brown Date: Fri Jul 24 15:22:35 2020 +0100 Merge series "ASoC: qcom: Use qcom_snd_parse_of() for apq8016_sbc" from Stephan Gerhold : At the moment we have two separate functions to parse the sound card properties from the device tree: qcom_snd_parse_of() for DPCM and apq8016_sbc_parse_of() without DPCM. These functions are almost identical except for a few minor differences. This patch set extends qcom_snd_parse_of() to handle links without DPCM, so that we can use one common function for all (qcom) machine drivers. Stephan Gerhold (7): ASoC: qcom: Use devm for resource management ASoC: qcom: common: Use snd_soc_dai_link_set_capabilities() ASoC: q6afe: Remove unused q6afe_is_rx_port() function ASoC: qcom: common: Support parsing links without DPCM ASoC: qcom: common: Parse properties with "qcom," prefix ASoC: qcom: apq8016_sbc: Use qcom_snd_parse_of() ASoC: qcom: common: Avoid printing errors for -EPROBE_DEFER sound/soc/qcom/Kconfig | 1 + sound/soc/qcom/apq8016_sbc.c | 120 ++++------------------------------- sound/soc/qcom/apq8096.c | 28 +------- sound/soc/qcom/common.c | 58 ++++++++++------- sound/soc/qcom/qdsp6/q6afe.c | 8 --- sound/soc/qcom/qdsp6/q6afe.h | 1 - sound/soc/qcom/sdm845.c | 40 ++---------- 7 files changed, 59 insertions(+), 197 deletions(-) -- 2.27.0 commit 62f2c7797de376e39bca5630a0f80209ffb4c70f Author: Steve Lee Date: Fri Jul 24 17:56:44 2020 +0900 ASoC: max98390: update dsm param bin max size MAX98390_DSM_PARAM_MAX_SIZE is changed to support extended register update. Signed-off-by: Steve Lee Link: https://lore.kernel.org/r/20200724085644.9837-1-steves.lee@maximintegrated.com Signed-off-by: Mark Brown commit aa785705685e583215f598bc538703388267e76e Author: Steve Lee Date: Fri Jul 24 15:01:49 2020 +0900 ASoC: max98390: Update dsm init sequence and condition. Modify dsm_init sequence and dsm param bin check condition. - Move dsm_init() to after amp init setting to make sure dsm init is last setting. - dsm param bin check condition changed for extended register setting. Signed-off-by: Steve Lee Link: https://lore.kernel.org/r/20200724060149.19261-1-steves.lee@maximintegrated.com Signed-off-by: Mark Brown commit cc4d8cebbf2a1239aab71a8077fbe20f24ec2165 Author: Jerome Brunet Date: Thu Jul 23 16:20:20 2020 +0200 ASoC: soc-component: don't report of_xlate_dai_name failures With commit e2329eeba45f ("ASoC: soc-component: add soc_component_err()") every error different for ENOTSUPP or EPROBE_DEFER will log an error. However, as explained in snd_soc_get_dai_name(), this callback may error to indicate that the DAI is not matched by the component tested. If the device provides other components, those may still match. Logging an error in this case is misleading. Don't use soc_component_ret() in snd_soc_component_of_xlate_dai_name() to avoid spamming the log. Fixes: e2329eeba45f ("ASoC: soc-component: add soc_component_err()") Signed-off-by: Jerome Brunet Cc: Kuninori Morimoto Link: https://lore.kernel.org/r/20200723142020.1338740-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 8a9ff875815944046903199e94eb6127dc0b22c1 Author: Krzysztof Kozlowski Date: Thu Jul 23 18:01:23 2020 +0200 MAINTAINERS: Add Krzysztof Kozlowski as maintainer of memory controllers The generic parts of memory controllers (of_memory.[ch]) lacked any care. The memory controller drivers were not abandoned (usually picked up by architecture maintainers) but in such case I can take care about them as well. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli commit 5ec2914af672615d9ae86cc0a53239d6020e0dbd Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:38 2020 +0200 memory: samsung: exynos-srom: Describe the Kconfig entry Write short description about the Exynos SROM controller driver. Signed-off-by: Krzysztof Kozlowski commit 2664a0758a68df1f68059c691475e7aec701cbbc Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:37 2020 +0200 memory: Describe the MEMORY Kconfig entry Write short description about the entire memory controllers section. Signed-off-by: Krzysztof Kozlowski commit 6b16f369b62b85f3cf731a906b65c94ba3657a20 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:36 2020 +0200 memory: da8xx-ddrctl: Remove unused 'node' variable The variable 'node' is not used. Remove it to silence compile warning: drivers/memory/da8xx-ddrctl.c: In function 'da8xx_ddrctl_probe': drivers/memory/da8xx-ddrctl.c:105:22: warning: variable 'node' set but not used [-Wunused-but-set-variable] Signed-off-by: Krzysztof Kozlowski commit a269ff3433f30d63a6ef3c7fc25a2de4575fb9da Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:35 2020 +0200 memory: fsl_ifc: Fix whitespace issues Fix minor whitespace and comment issues. Do not break message strings. No functional changes. Signed-off-by: Krzysztof Kozlowski commit a6159740fde08d3b1e0d5437dedb84426217a492 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:32 2020 +0200 memory: pl172: Add GPLv2 SPDX license header Add GPLv2 license header and remove GPL boiler plate text. Signed-off-by: Krzysztof Kozlowski commit 1a1e7580e771eb6973ec5ffe93e6cdeecad98f66 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:31 2020 +0200 memory: omap-gpmc: Fix whitespace issue Fix minor whitespace and comment issues. No functional changes. Signed-off-by: Krzysztof Kozlowski commit 07852c3f7f87191e6b293fac6651885aa230e642 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:12 2020 +0200 memory: omap-gpmc: Include for SZ_16M The driver uses SZ_16M which is defined in include/linux/sizes.h. On ARM it was pulled by other headers but its inclusion is necessary for compile testing on other architectures. This fixes build error when compile testing on i386 architecture: drivers/memory/omap-gpmc.c: In function ‘gpmc_cs_remap’: drivers/memory/omap-gpmc.c:961:12: error: ‘SZ_16M’ undeclared (first use in this function) Signed-off-by: Krzysztof Kozlowski commit 3aa5a6c2d9a0921c7816f0497ac14a1ca8e61a04 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:28 2020 +0200 memory: mtk-smi: Add argument to function pointer definition Fix checkpatch warning: WARNING: function definition argument 'struct device *' should also have an identifier name Signed-off-by: Krzysztof Kozlowski commit bf77f3f4659959c60be0a12cdb1a14c4b1825124 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:27 2020 +0200 memory: brcmstb_dpfe: Remove unneeded braces Single statement blocks don't need braces. Fixes checkpatch warning: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Acked-by: Markus Mayer commit a6ca67a838826ebabe9f1c1434140459928ee5b5 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:26 2020 +0200 memory: brcmstb_dpfe: Constify the contents of string The string itself can be made const for safety. Signed-off-by: Krzysztof Kozlowski Acked-by: Florian Fainelli Acked-by: Markus Mayer commit 96424aa976bf8254ced65812e3bd081a7e25caa2 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:24 2020 +0200 memory: ti-emif-pm: Fix cast to iomem pointer Cast pointer to iomem memory properly to fix sparse warning: drivers/memory/ti-emif-pm.c:251:38: warning: incorrect type in argument 1 (different address spaces) drivers/memory/ti-emif-pm.c:251:38: expected void const volatile [noderef] __iomem *addr drivers/memory/ti-emif-pm.c:251:38: got void * Signed-off-by: Krzysztof Kozlowski commit fdc482ff73215f8b76f23998375cd06ea4c5f812 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:13 2020 +0200 memory: ti-aemif: Rename SS to SSTROBE to avoid name conflicts SS conflicts with compile test build on i386: drivers/memory/ti-aemif.c:40:0: warning: "SS" redefined In file included from arch/x86/include/uapi/asm/ptrace.h:6:0, from arch/x86/include/asm/ptrace.h:7, from arch/x86/include/asm/math_emu.h:5, from arch/x86/include/asm/processor.h:13, from include/linux/mutex.h:19, from include/linux/notifier.h:14, from include/linux/clk.h:14, from drivers/memory/ti-aemif.c:12: arch/x86/include/uapi/asm/ptrace-abi.h:23:0: note: this is the location of the previous definition #define SS 16 Use more descriptive name (SSTROBE) to avoid the conflict. Signed-off-by: Krzysztof Kozlowski commit e79f3849377d86ad9f73e173e07521ef778586b6 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:23 2020 +0200 memory: emif: Silence platform_get_irq() error in driver The platform_get_irq() already prints error message so there is no need to do it again in the driver. Signed-off-by: Krzysztof Kozlowski commit 28dc76f1ed099651d63edd5cfb350bbb3dad8f8d Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:22 2020 +0200 memory: emif: Fix whitespace coding style violations Make the code and printed messages slightly more readable. Fixes checkpatch warnings: WARNING: quoted string split across lines ERROR: space prohibited before that ',' (ctx:WxW) Signed-off-by: Krzysztof Kozlowski commit ec6652bda5c5fbf37d9245e980761a4d2dbd6fec Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:21 2020 +0200 memory: emif: Put constant in comparison on the right side Fixes checkpatch warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Krzysztof Kozlowski commit a53f7f08c07f7900e7388eaff9a83a858dcc9c79 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:20 2020 +0200 memory: emif-asm-offsets: Add GPLv2 SPDX license header Add GPLv2 license header and remove GPL boiler plate text. Signed-off-by: Krzysztof Kozlowski commit df30727336636b79ef77b37523ae58c8283c5814 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:19 2020 +0200 memory: of: Remove unneeded extern from function declarations Function declarations in headers do not need to come with extern keyword. Remove them to make the declaration slightly shorter. Signed-off-by: Krzysztof Kozlowski commit 9825095a094970f535a7ecaf4ca5009845137460 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:18 2020 +0200 memory: of: Correct indentation Correct indentation to match open parenthesis. Signed-off-by: Krzysztof Kozlowski commit efc4646327ca9d65f55636d0d2465063ba02f2c4 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:17 2020 +0200 memory: of: Remove __func__ in device related messages Messages printed by generic of_memory code will still be using device context so their location/meaning will be known. Printing __func__ is not needed. Signed-off-by: Krzysztof Kozlowski commit a4022f6a2187e13f5dfb1a8ec4e8dd167fa1fdd4 Author: Krzysztof Kozlowski Date: Fri Jul 24 09:40:16 2020 +0200 memory: of: Remove unused headers The of_memory.c does not use platform_device nor linked list. Signed-off-by: Krzysztof Kozlowski commit 2ee61200b7d7881b5bcad4a2e70c987393ee2f9d Merge: a1224fdc5c27b 3506ddd676a3c Author: Arnd Bergmann Date: Fri Jul 24 16:13:17 2020 +0200 Merge tag 'ti-k3-config-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into arm/defconfig Texas Instruments K3 SoC config updates for v5.9 - Enable chipid driver for j721e/am65x - Enable SDHCI driver for am65x * tag 'ti-k3-config-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: arm64: defconfig: Enable AM654x SDHCI controller arm64: arch_k3: enable chipid driver Link: https://lore.kernel.org/r/c3e68831-c9ec-db06-d855-808ba3da3364@ti.com Signed-off-by: Arnd Bergmann commit 1d4eadaf1717dfd1423988f794ef351f13e3cbb5 Merge: 18517746d732a e6e57b663ea13 Author: Arnd Bergmann Date: Fri Jul 24 16:11:54 2020 +0200 Merge tag 'mvebu-drivers-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/drivers mvebu drivers for 5.9 (part 1) For firmware on the Turris MOX (Armada 3720 based board), add support ECDSA signatures via debugfs. * tag 'mvebu-drivers-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: firmware: turris-mox-rwtm: add debugfs documentation firmware: turris-mox-rwtm: support ECDSA signatures via debugfs Signed-off-by: Arnd Bergmann commit 0e3a4cb128121dce841d84bbff7509b2a36cdb7b Merge: 92607f8a4451b 01b5e34518675 Author: Arnd Bergmann Date: Fri Jul 24 16:10:57 2020 +0200 Merge tag 'mvebu-arm-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/soc mvebu arm for 5.9 (part 1) Use of for_each_requested_gpio() for gpio driver still in plat-orion for non DT platform. * tag 'mvebu-arm-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: orion/gpio: Make use of for_each_requested_gpio() Signed-off-by: Arnd Bergmann commit 92607f8a4451b5836f3add699633d35bb8aa5ffe Merge: 5644f690b92c2 951e395686327 Author: Arnd Bergmann Date: Fri Jul 24 16:09:16 2020 +0200 Merge tag 'davinci-for-v5.9/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into arm/soc DaVinci SoC updates for v5.9 This pull requests contains some clean-ups for SoC support. No functional changes included. * tag 'davinci-for-v5.9/soc' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci: dm646x-evm: Simplify error handling in 'evm_sw_setup()' ARM: davinci: Fix trivial spelling ARM: davinci: Replace HTTP links with HTTPS ones Link: https://lore.kernel.org/r/348578af-71ea-812e-ec42-31afe7847b85@ti.com Signed-off-by: Arnd Bergmann commit 33c56edacd9f2ff72b669d026df9c9f1c6eb1142 Merge: a127fdac2397b 83a3545d9c377 Author: Arnd Bergmann Date: Fri Jul 24 16:07:45 2020 +0200 Merge tag 'mvebu-dt64-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt64 for 5.9 (part 1) Add SMMU support for the Marvell AP806 based SoCs (Armada 70xx and Armada 80xx) * tag 'mvebu-dt64-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: marvell: add SMMU support commit a127fdac2397b75ad7a4a37089d381d5cbcce711 Merge: cf8182fc9d3d5 43bf2025452d2 Author: Arnd Bergmann Date: Fri Jul 24 16:02:32 2020 +0200 Merge tag 'mvebu-dt-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt for 5.9 (part 1) - Fix the reg-init PHY for the dlink-dns327l (Armada 370) - Replace HTTP links with HTTPS one in device tree of the Excito Bubba B3 (Kirkwood) * tag 'mvebu-dt-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: dts: dlink-dns327l: fix reg-init PHY ARM: dts: kirkwood: Replace HTTP links with HTTPS ones Signed-off-by: Arnd Bergmann commit cf8182fc9d3d5baf5b8be9043c956aa894b2581d Merge: 0183b9b0e9a1e 04fe6477efce9 Author: Arnd Bergmann Date: Fri Jul 24 15:54:39 2020 +0200 Merge tag 'ti-k3-dt-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux into arm/dt Texas Instruments K3 SoC DT updates for v5.9 - Add platforms chipid nodes for am65x and j721e - Update latest data sheet values for MMC on am65x - Add serdes and usb3 support for j721e - Add analog audio support for j721e - Add SD card support for am65x - Rename DT nodes for gic-its/smmu to their standard counterparts am65x/j721e - HTTP links replaced with HTTPS ones * tag 'ti-k3-dt-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/kristo/linux: arm64: dts: k3-j721e-proc-board: Add wait time for sampling Type-C DIR line arm64: dts: ti: k3-j721e: Enable Super-Speed support for USB0 arm64: dts: ti: k3-j721e-main.dtsi: Add USB to SERDES MUX arm64: dts: ti: k3-j721e-main: Add system controller node and SERDES lane mux arm64: dts: ti: k3-j721e-main: Add WIZ and SERDES PHY nodes dt-bindings: mfd: ti,j721e-system-controller.yaml: Add J721e system controller arm64: dts: ti: k3-am65/j721e-main: rename gic-its node to msi-controller arm64: dts: ti: k3-j721e-main: rename smmu node to iommu arm64: dts: ti: k3-*: Replace HTTP links with HTTPS ones arm64: dts: ti: k3-am654-base-board: Add support for SD card arm64: dts: ti: k3-am65-main: Add support for sdhci1 arm64: dts: ti: j721e-common-proc-board: Analog audio support arm64: dts: ti: k3-j721e-common-proc-board: Remove duplicated main_i2c1_exp4_pins_default arm64: dts: ti: k3-am654-main: Update otap-del-sel values arm64: dts: ti: k3-j721e-mcu-wakeup: add k3 platforms chipid module node arm64: dts: ti: k3-am65-wakeup: add k3 platforms chipid module node Link: https://lore.kernel.org/r/3b3b9214-769d-ba1b-db5e-44414a8c5756@ti.com Signed-off-by: Arnd Bergmann commit a63419beafd4edf20761c37dbefd639a0b1b481e Author: Stephan Gerhold Date: Thu Jul 23 20:39:04 2020 +0200 ASoC: qcom: common: Avoid printing errors for -EPROBE_DEFER qcom_snd_parse_of() tends to produce lots of error messages during bootup: MultiMedia1: error getting cpu dai name This happens because the DAIs are not probed until the ADSP remoteproc has booted, which takes a while. Until it is ready, snd_soc_of_get_dai_name() returns -EDEFER_PROBE to retry probing later. This is perfectly normal, so cleanup the kernel log a bit by not printing in case of -EPROBE_DEFER. Signed-off-by: Stephan Gerhold Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Cc: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200723183904.321040-8-stephan@gerhold.net Signed-off-by: Mark Brown commit 118205d241ef6fec395086c34f85717a41a8b4a1 Author: Stephan Gerhold Date: Thu Jul 23 20:39:03 2020 +0200 ASoC: qcom: apq8016_sbc: Use qcom_snd_parse_of() Now that we have updated qcom_snd_parse_of() to handle the device tree bindings used for apq8016_sbc, update the apq8016_sbc driver to use the common function and remove the duplicated code. Signed-off-by: Stephan Gerhold Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Cc: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200723183904.321040-7-stephan@gerhold.net Signed-off-by: Mark Brown commit f0d67fdba5dcf48865fc79f2d63b49bd75d36671 Author: Stephan Gerhold Date: Thu Jul 23 20:39:02 2020 +0200 ASoC: qcom: common: Parse properties with "qcom," prefix The apq8016_sbc device tree binding uses a "qcom," vendor prefix for all device tree properties, while qcom_snd_parse_of() uses the same properties without a prefix. In the future it would be nice to make this consistent, however, for backwards compatibility we need to parse both names to allow apq8016_sbc to use the common qcom_snd_parse_of() function. Signed-off-by: Stephan Gerhold Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Cc: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200723183904.321040-6-stephan@gerhold.net Signed-off-by: Mark Brown commit 47ea88488209226e03559bb8baaa0156b4025fee Author: Stephan Gerhold Date: Thu Jul 23 20:39:01 2020 +0200 ASoC: qcom: common: Support parsing links without DPCM So far qcom_snd_parse_of() was only used to parse the device tree for boards using the QDSP6 driver together with DPCM. apq8016_sbc uses an almost identical version (apq8016_sbc_parse_of()) which parses links without DPCM. Given the similarity of the two functions it is useful to combine these two. To allow using qcom_snd_parse_of() in apq8016_sbc we need to support parsing links without DPCM as well. This is pretty simple: A DPCM link in the device tree is defined using: - DPCM frontend: "cpu" - DPCM backend: "cpu", "platform" and "codec" ... while a link without DPCM has "cpu" and "codec" (but no "platform"). Add a few more if conditions to handle links without DPCM correctly. Signed-off-by: Stephan Gerhold Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Cc: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200723183904.321040-5-stephan@gerhold.net Signed-off-by: Mark Brown commit 0a8c336a1e020be3832b02e1ddbb92d61da87512 Author: Stephan Gerhold Date: Thu Jul 23 20:39:00 2020 +0200 ASoC: q6afe: Remove unused q6afe_is_rx_port() function This reverts commit 4a95737440d ("ASoc: q6afe: add support to get port direction"), since the function is not needed anymore. q6afe-dai already exposes the possible directions for a DAI through the DAI capabilities (playback/capture-only DAI). Now we use snd_soc_dai_link_set_capabilities() to infer the information directly from the DAI capabilities. Signed-off-by: Stephan Gerhold Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Cc: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200723183904.321040-4-stephan@gerhold.net Signed-off-by: Mark Brown commit 627ab55d745b2a413e0a2856f2ad2e422a697971 Author: Stephan Gerhold Date: Thu Jul 23 20:38:59 2020 +0200 ASoC: qcom: common: Use snd_soc_dai_link_set_capabilities() Commit a2120089251f ("ASoC: qcom: common: set correct directions for dailinks") introduced a call to q6afe_is_rx_port() to set the dpcm_playback/capture parameters correctly. This is necessary because those parameters are now validated to match the capabilities of the DAIs. [1] The disadvantage of introducing the call to q6afe_is_rx_port() is that it makes the qcom_snd_parse_of() helper dependent on the QDSP6 driver. When the ADSP is bypassed (e.g. in apq8016-sbc) QDSP6 is not used. There is a generic solution for this now: The correct direction for the links is already defined by the DAI capabilities (e.g. rx ports only support playback). Commit 25612477d20b ("ASoC: soc-dai: set dai_link dpcm_ flags with a helper") introduced the snd_soc_dai_link_set_capabilities() function that we can use to set dpcm_playback/dpcm_capture according to the capabilities of the DAIs. Use that for both FE/BE DAI links to avoid the dependency on the QDSP6 driver. [1]: https://lore.kernel.org/alsa-devel/20200616085409.GA110999@gerhold.net/ Signed-off-by: Stephan Gerhold Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Cc: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200723183904.321040-3-stephan@gerhold.net Signed-off-by: Mark Brown commit ed3b53e7ffe91c32a1277de435e3fcb3ad5e852a Author: Stephan Gerhold Date: Thu Jul 23 20:38:58 2020 +0200 ASoC: qcom: Use devm for resource management Simplify the machine drivers for newer SoCs a bit by using the devm_* function calls that automatically release the resources when the driver is removed or when probing fails. Signed-off-by: Stephan Gerhold Tested-by: Srinivas Kandagatla Reviewed-by: Srinivas Kandagatla Cc: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200723183904.321040-2-stephan@gerhold.net Signed-off-by: Mark Brown commit 0183b9b0e9a1e21740ca44afa7fb590551aa8988 Author: Ronen Krupnik Date: Fri Jul 24 16:26:54 2020 +0300 arm64: dts: amazon: add Amazon's Annapurna Labs Alpine v3 support This patch adds the initial support for the Amazon's Annapurna Labs Alpine v3 Soc and Evaluation Platform (EVP). Link: https://lore.kernel.org/r/20200724132654.16549-7-hhhawa@amazon.com Signed-off-by: Ronen Krupnik Signed-off-by: Talel Shenhar Signed-off-by: Hanna Hawa Acked-by: Antoine Tenart Signed-off-by: Arnd Bergmann commit b29dd113130671c714830dedf25677bdcdabfaf9 Author: Hanna Hawa Date: Fri Jul 24 16:26:53 2020 +0300 dt-bindings: arm: amazon: add Amazon Annapurna Labs Alpine V3 This patch adds DT bindings info for Amazon Annapurna Labs Alpine V3. Link: https://lore.kernel.org/r/20200724132654.16549-6-hhhawa@amazon.com Signed-off-by: Hanna Hawa Reviewed-by: Rob Herring Acked-by: Antoine Tenart Signed-off-by: Arnd Bergmann commit 81079390fab2f5342e6e54e17213577c6514e74c Author: Hanna Hawa Date: Fri Jul 24 16:26:52 2020 +0300 dt-bindings: arm: amazon: add missing alpine-v2 DT binding Amazon Annapurna Labs Alpine family includes: Alpine-v1, Alpine-v2. This patch adds the missing DT binding of Alpine-v2 in amazon,al.yaml. Link: https://lore.kernel.org/r/20200724132654.16549-5-hhhawa@amazon.com Signed-off-by: Hanna Hawa Reviewed-by: Rob Herring Acked-by: Antoine Tenart Signed-off-by: Arnd Bergmann commit e6293d123a85a013ba54735f809b344e2480723b Author: Hanna Hawa Date: Fri Jul 24 16:26:51 2020 +0300 dt-bindings: arm: amazon: update maintainers of amazon,al DT bindings Update maintainers of amazon,al DT bindings. Link: https://lore.kernel.org/r/20200724132654.16549-4-hhhawa@amazon.com Signed-off-by: Hanna Hawa Acked-by: Rob Herring Acked-by: Antoine Tenart Signed-off-by: Arnd Bergmann commit 39889b8294c506d6acf17abad041632c10bbe45c Author: Hanna Hawa Date: Fri Jul 24 16:26:50 2020 +0300 arm64: dts: amazon: rename al folder to be amazon As preparation to add device tree binding for Amazon's Annapurna Labs Alpine v3 support. Rename al device tree folder to be amazon. Link: https://lore.kernel.org/r/20200724132654.16549-3-hhhawa@amazon.com Signed-off-by: Hanna Hawa Acked-by: Antoine Tenart Signed-off-by: Arnd Bergmann commit 34d8ddb4d451a5a4c343d05811df20473701ab7d Author: Hanna Hawa Date: Fri Jul 24 16:26:49 2020 +0300 dt-bindings: arm: amazon: rename al,alpine DT binding to amazon,al As preparation to add device tree binding for Amazon's Annapurna Labs Alpine v3 support. Rename al,alpine DT binding to amazon,al. Link: https://lore.kernel.org/r/20200724132654.16549-2-hhhawa@amazon.com Signed-off-by: Hanna Hawa Acked-by: Rob Herring Acked-by: Antoine Tenart Signed-off-by: Arnd Bergmann commit f5e46aa4a124bfac34a770c4cfe5023de99380d4 Author: Michael Grzeschik Date: Wed Jul 1 20:24:53 2020 +0200 usb: dwc3: gadget: when the started list is empty stop the active xfer When we have nothing left to be queued after handling the last trb we have to stop the current transfer. This way we can ensure that the next request will be queued with a new and valid timestamp and will not directly run into an missed xfer. Reviewed-by: Thinh Nguyen Signed-off-by: Michael Grzeschik Signed-off-by: Felipe Balbi commit c5a7092f401535d8a9159be963b0c318393c2a78 Author: Michael Olbrich Date: Wed Jul 1 20:24:52 2020 +0200 usb: dwc3: gadget: make starting isoc transfers more robust Currently __dwc3_gadget_start_isoc must be called very shortly after XferNotReady. Otherwise the frame number is outdated and start transfer will fail, even with several retries. DSTS provides the lower 14 bit of the frame number. Use it in combination with the frame number provided by XferNotReady to guess the current frame number. This will succeed unless more than one 14 rollover has happened since XferNotReady. Start transfer might still fail if the frame number is increased immediately after DSTS is read. So retries are still needed. Don't drop the current request if this happens. This way it is not lost and can be used immediately to try again with the next frame number. With this change, __dwc3_gadget_start_isoc is still not successfully in all cases bit it increases the acceptable delay after XferNotReady significantly. Reviewed-by: Thinh Nguyen Signed-off-by: Michael Olbrich Signed-off-by: Michael Tretter Signed-off-by: Michael Grzeschik Signed-off-by: Felipe Balbi commit ca14378560db5440893404a639d69846f46eb70e Author: Michael Grzeschik Date: Wed Jul 1 20:24:51 2020 +0200 usb: dwc3: gadget: add frame number mask This patch adds a define DWC3_FRNUMBER_MASK for the commonly used 0x3fff mask and uses it. Signed-off-by: Michael Grzeschik Signed-off-by: Felipe Balbi commit 7f2ca14d2f9b99e1579c8148dbabf92374ffc69a Author: Zqiang Date: Tue Jun 30 13:23:31 2020 +0800 usb: gadget: function: printer: Interface is disabled and returns error After the device is disconnected from the host side, the interface of the device is reset. If the userspace operates the device again, an error code should be returned. Signed-off-by: Zqiang Signed-off-by: Felipe Balbi commit a9cf8715180b18c62addbfe6f6267b8101903119 Author: Ruslan Bilovol Date: Fri Jul 3 16:49:03 2020 +0300 usb: gadget: f_uac2: fix AC Interface Header Descriptor wTotalLength As per UAC2 spec (ch. 4.7.2), wTotalLength of AC Interface Header Descriptor "includes the combined length of this descriptor header and all Clock Source, Unit and Terminal descriptors." Thus add its size to its wTotalLength. Also after recent changes wTotalLength is calculated dynamically, update static definition of uac2_ac_header_descriptor accordingly Fixes: 132fcb460839 ("usb: gadget: Add Audio Class 2.0 Driver") Signed-off-by: Ruslan Bilovol Signed-off-by: Felipe Balbi commit ec3966268c67c4ff2fde2de5df2cb34e0ec57248 Author: Roger Quadros Date: Fri Jul 10 14:33:37 2020 +0300 dt-bindings: usb: ti,keystone-dwc3.yaml: Improve schema There were some review comments after the patch was integrated. Address those. Fixes: 1883a934e156 ("dt-bindings: usb: convert keystone-usb.txt to YAML") Reviewed-by: Rob Herring Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi commit 1fa645b1c92795b090ea8de314b5cecc22dbfb03 Author: Florian Fainelli Date: Wed Jul 22 13:07:46 2020 -0400 usb: bdc: Use devm_clk_get_optional() The BDC clock is optional and we may get an -EPROBE_DEFER error code which would not be propagated correctly, fix this by using devm_clk_get_optional(). Signed-off-by: Florian Fainelli Signed-off-by: Al Cooper Signed-off-by: Felipe Balbi commit 5fc453d7de3d0c345812453823a3a56783c5f82c Author: Danesh Petigara Date: Wed Jul 22 13:07:45 2020 -0400 usb: bdc: Halt controller on suspend GISB bus error kernel panics have been observed during S2 transition tests on the 7271t platform. The errors are a result of the BDC interrupt handler trying to access BDC register space after the system's suspend callbacks have completed. Adding a suspend hook to the BDC driver that halts the controller before S2 entry thus preventing unwanted access to the BDC register space during this transition. Signed-off-by: Danesh Petigara Signed-off-by: Al Cooper Acked-by: Florian Fainelli Signed-off-by: Felipe Balbi commit b10d33c4f068ebb70a607d644b7ace259127aa18 Author: Al Cooper Date: Wed Jul 22 13:07:44 2020 -0400 usb: bdc: driver runs out of buffer descriptors on large ADB transfers Version v1.0.40 of the Android host ADB software increased maximum transfer sizes from 256K to 1M. Since the STB ADB gadget driver requests only 16K at a time, the BDC driver ran out of buffer descriptors (BDs) if the queuing happens faster than the incoming 16K transfers. This issue is fixed by doubling the number of BDs that can be queued so that the entire 1M request can be queued without running out of buffers. Signed-off-by: Al Cooper Acked-by: Florian Fainelli Signed-off-by: Felipe Balbi commit 33d1c71832b7b7e56ca82b2f19c5df31297657e6 Author: Al Cooper Date: Wed Jul 22 13:07:43 2020 -0400 usb: bdc: Adb shows offline after resuming from S2 On Android systems, After temporarily putting device to S2 by short pressing the power button on the remote, the display turns off. Then press the power button to turn the display back up. Adb devices would show the devices is offline. It needs a physical disconnect of the usb cable or power cycle to bring the device back online. The device is operational otherwise. The problem is that during S2 resume, the ADB gadget driver could not link back with the BDC driver because the endpoint flags were cleared. The fix is to clear the endpoint flags for the disconnect case only and not for S2 exit. Signed-off-by: Al Cooper Acked-by: Florian Fainelli Signed-off-by: Felipe Balbi commit a95bdfd22076497288868c028619bc5995f5cc7f Author: Sasi Kumar Date: Wed Jul 22 13:07:42 2020 -0400 bdc: Fix bug causing crash after multiple disconnects Multiple connects/disconnects can cause a crash on the second disconnect. The driver had a problem where it would try to send endpoint commands after it was disconnected which is not allowed by the hardware. The fix is to only allow the endpoint commands when the endpoint is connected. This will also fix issues that showed up when using configfs to create gadgets. Signed-off-by: Sasi Kumar Signed-off-by: Al Cooper Acked-by: Florian Fainelli Signed-off-by: Felipe Balbi commit 4e3a765ba03c065e5ee71ea309f1933102af7a33 Author: Al Cooper Date: Wed Jul 22 13:07:41 2020 -0400 usb: bdc: Add compatible string for new style USB DT nodes Add compatible string for some newer boards that only have this as their match sting. Remove unused compatible string "brcm,bdc-v0.16". Signed-off-by: Al Cooper Acked-by: Florian Fainelli Signed-off-by: Felipe Balbi commit 4e33ba7f82234041b677609203a784006c848e0e Author: Al Cooper Date: Wed Jul 22 13:07:40 2020 -0400 dt-bindings: usb: bdc: Update compatible strings Remove "brcm,bdc-v0.16" because it was never used on any system. Add "brcm,bdc-udc-v2" which exists for any STB system with BDC. Acked-by: Rob Herring Signed-off-by: Al Cooper Acked-by: Florian Fainelli Signed-off-by: Felipe Balbi commit f7e764cba28e49fd22dbe106e819ae592780feb8 Author: 周琰杰 (Zhou Yanjie) Date: Thu Jul 23 14:13:01 2020 +0800 USB: PHY: JZ4770: Reformat the code to align it. Reformat the code (add one level of indentation before the values), to align the code in the macro definition section. Tested-by: 周正 (Zhou Zheng) Co-developed-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Felipe Balbi commit 2a6c0b82e65128c73b5102e00e031c5e58bb3504 Author: 周琰杰 (Zhou Yanjie) Date: Thu Jul 23 14:13:00 2020 +0800 USB: PHY: JZ4770: Add support for new Ingenic SoCs. Add support for probing the phy-jz4770 driver on the JZ4780 SoC, the X1000 SoC and the X1830 SoC from Ingenic. Tested-by: 周正 (Zhou Zheng) Co-developed-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Felipe Balbi commit 6e5478aeb3184cb37035550f82527b27c064eef9 Author: 周琰杰 (Zhou Yanjie) Date: Thu Jul 23 14:12:59 2020 +0800 USB: PHY: JZ4770: Unify code style and simplify code. 1.Modify the macro definition to unify "#define USBPCR_XXXX n" into the "#define USBPCR_XXXX (n << USBPCR_XXXX_LSB)" style, so as to unify the code style in the "jz4770_phy_init()" and simplify the code. 2.Remove unused macro definitions to simplify the code. Tested-by: 周正 (Zhou Zheng) Suggested-by: Paul Cercueil Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Felipe Balbi commit 4afd6fe4a3e331952e133a5fd01e9ad5377fdd1d Author: 周琰杰 (Zhou Yanjie) Date: Thu Jul 23 14:12:58 2020 +0800 dt-bindings: USB: Add bindings for new Ingenic SoCs. Add the USB PHY bindings for the JZ4780 SoC, the X1000 SoC and the X1830 SoC from Ingenic. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Rob Herring Signed-off-by: Felipe Balbi commit 2468c877da428ebfd701142c4cdfefcfb7d4c00e Author: Evgeny Novikov Date: Tue Jul 21 23:15:58 2020 +0300 usb: gadget: net2280: fix memory leak on probe error handling paths Driver does not release memory for device on error handling paths in net2280_probe() when gadget_release() is not registered yet. The patch fixes the bug like in other similar drivers. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Felipe Balbi commit b2aeb6da3d6ee562e57ad3a7d73a7de0c36ce8eb Author: Pawel Laszczak Date: Mon Jul 13 12:05:54 2020 +0200 usb: cdns3: drd: simplify *switch_gadet and *switch_host Patch split function cdns3_drd_switch_gadget and cdns3_drd_switch_host into: - cdns3_drd_host_on - cdns3_drd_host_off - cdns3_drd_gadget_on - cdns3_drd_gadgett_off These functions don't have any shared code so it's better to have smaller, faster and easier functions. Signed-off-by: Pawel Laszczak Reviewed-by: Peter Chen Signed-off-by: Felipe Balbi commit f41ca26b8b178d0b7005c9bfeda88814179203b3 Author: Pawel Laszczak Date: Mon Jul 13 12:05:53 2020 +0200 usb: cdns3: core: removed overwriting some error code Some error code can be preserved, so we can remove overwriting error code returned by some functions. Signed-off-by: Pawel Laszczak Reviewed-by: Peter Chen Signed-off-by: Felipe Balbi commit 5c2cf30f14cc3973f2d288e33b0153f5d9a357fb Author: Pawel Laszczak Date: Mon Jul 13 12:05:52 2020 +0200 usb: cdns3: core: removed 'goto not_otg' Patch removes 'goto not_otg' instruction from cdns3_hw_role_state_machine function. Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi commit 08c35dd3cc2184dcc952fc845329dcae1ee302d3 Author: Pawel Laszczak Date: Mon Jul 13 12:05:51 2020 +0200 usb: cdns3: Added CDNS3_ID_PERIPHERAL and CDNS3_ID_HOST Patch adds 2 definitions that make it easier to understand the code. Reviewed-by: Peter Chen Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi commit 245258495a5157e4428bd944189e4062d852dcdd Author: Pawel Laszczak Date: Mon Jul 13 12:05:50 2020 +0200 usb: cdns3: drd: changed return type from int to bool Patch changes return type from int to bool for cdns3_is_host and cdns3_is_device functions. Reviewed-by: Peter Chen Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi commit 03cce68a828dba13b3715033e5133839820218c3 Author: Pawel Laszczak Date: Mon Jul 13 12:05:49 2020 +0200 usb: cdns3: drd: return IRQ_NONE explicitly. IRQ_NONE can be returned indirect. Reviewed-by: Peter Chen Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi commit ecf4f823fb7050e4f450bb56cd403cbb6d41ca7c Author: Pawel Laszczak Date: Mon Jul 13 12:05:48 2020 +0200 usb: cnds3: drd: deleted != Patch deletes unnecessary != from condition statement in cdns3_drd_init function. Reviewed-by: Peter Chen Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi commit 27afe1661275213adee3f8dc08b3610abcbca678 Author: Pawel Laszczak Date: Mon Jul 13 12:05:47 2020 +0200 usb: cdns3: drd: removed not needed variables initialization Patch remove some variables initialization from core.c and drd.c file. Reviewed-by: Peter Chen Signed-off-by: Pawel Laszczak Signed-off-by: Felipe Balbi commit b20aecff99a2335731bb2ae69c8368dfc356aef7 Author: Pawel Laszczak Date: Mon Jul 13 12:05:46 2020 +0200 usb: cdns3: core: removed cdns3_get_current_role_driver function Function is not used in driver so it can be removed. Signed-off-by: Pawel Laszczak Reviewed-by: Peter Chen Signed-off-by: Felipe Balbi commit 95f5acfc4f58f01a22b66d8c9c0ffb72aa96271c Author: Peter Chen Date: Wed Jul 22 11:06:19 2020 +0800 usb: cdns3: gadget: always zeroed TRB buffer when enable endpoint During the endpoint dequeue operation, it changes dequeued TRB as link TRB, when the endpoint is disabled and re-enabled, the DMA fetches the TRB before the link TRB, after it handles current TRB, the DMA pointer will advance to the TRB after link TRB, but enqueue and dequene variables don't know it due to no hardware interrupt at the time, when the next TRB is added to link TRB position, the DMA will not handle this TRB due to its pointer is already at the next TRB. See the trace log like below: file-storage-675 [001] d..1 86.585657: usb_ep_queue: ep0: req 00000000df9b3a4f length 0/0 sgs 0/0 stream 0 zsI status 0 --> 0 file-storage-675 [001] d..1 86.585663: cdns3_ep_queue: ep1out: req: 000000002ebce364, req buff 00000000f5bc96b4, length: 0/1024 zsi, status: -115, trb: [start:0, end:0: virt addr (null)], flags:0 SID: 0 file-storage-675 [001] d..1 86.585671: cdns3_prepare_trb: ep1out: trb 000000007f770303, dma buf: 0xbd195800, size: 1024, burst: 128 ctrl: 0x00000425 (C=1, T=0, ISP, IOC, Normal) SID:0 LAST_SID:0 file-storage-675 [001] d..1 86.585676: cdns3_ring: Ring contents for ep1out: Ring deq index: 0, trb: 000000007f770303 (virt), 0xc4003000 (dma) Ring enq index: 1, trb: 0000000049c1ba21 (virt), 0xc400300c (dma) free trbs: 38, CCS=1, PCS=1 @0x00000000c4003000 bd195800 80020400 00000425 @0x00000000c400300c c4003018 80020400 00001811 @0x00000000c4003018 bcfcc000 0000001f 00000426 @0x00000000c4003024 bcfce800 0000001f 00000426 ... irq/144-5b13000-698 [000] d... 87.619286: usb_gadget_giveback_request: ep1in: req 0000000031b832eb length 13/13 sgs 0/0 stream 0 zsI status 0 --> 0 file-storage-675 [001] d..1 87.619287: cdns3_ep_queue: ep1out: req: 000000002ebce364, req buff 00000000f5bc96b4, length: 0/1024 zsi, status: -115, trb: [start:0, end:0: virt addr 0x80020400c400300c], flags:0 SID: 0 file-storage-675 [001] d..1 87.619294: cdns3_prepare_trb: ep1out: trb 0000000049c1ba21, dma buf: 0xbd198000, size: 1024, burst: 128 ctrl: 0x00000425 (C=1, T=0, ISP, IOC, Normal) SID:0 LAST_SID:0 file-storage-675 [001] d..1 87.619297: cdns3_ring: Ring contents for ep1out: Ring deq index: 1, trb: 0000000049c1ba21 (virt), 0xc400300c (dma) Ring enq index: 2, trb: 0000000059b34b67 (virt), 0xc4003018 (dma) free trbs: 38, CCS=1, PCS=1 @0x00000000c4003000 bd195800 0000001f 00000427 @0x00000000c400300c bd198000 80020400 00000425 @0x00000000c4003018 bcfcc000 0000001f 00000426 @0x00000000c4003024 bcfce800 0000001f 00000426 ... file-storage-675 [001] d..1 87.619305: cdns3_doorbell_epx: ep1out, ep_trbaddr c4003018 file-storage-675 [001] .... 87.619308: usb_ep_queue: ep1out: req 000000002ebce364 length 0/1024 sgs 0/0 stream 0 zsI status -115 --> 0 irq/144-5b13000-698 [000] d..1 87.619315: cdns3_epx_irq: IRQ for ep1out: 01000c80 TRBERR , ep_traddr: c4003018 ep_last_sid: 00000000 use_streams: 0 irq/144-5b13000-698 [000] d..1 87.619395: cdns3_usb_irq: IRQ 00000008 = Hot Reset Fixes: f616c3bda47e ("usb: cdns3: Fix dequeue implementation") Cc: stable Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 33c4b00b85a9855de47e498a15e21515320cc442 Author: Peter Chen Date: Wed Jul 22 12:29:52 2020 +0800 usb: cdns3: ep0: delete the unnecessary operation It doesn't need to enable/disable L1 on the fly for EP0 transfer, we only need to enable L1 after SET_CONFIGURATION. This code may be introduced by careless. Cc: Pawel Laszczak Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit ae90cc8237bf4ee416a326c51052ddcc7918ee43 Author: Evgeny Novikov Date: Wed Jul 15 19:40:09 2020 +0300 usb: gadget: net2272: skip BAR1 on error handling paths in probe net2272_rdk1_probe() skips "i == 1" (BAR1) during allocation of resources. The patch does this on error hanling paths as well. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Felipe Balbi commit 75ae051efc9b3cceaed525e7ecb9cf19780e0af5 Author: Chunfeng Yun Date: Mon Jul 13 14:48:01 2020 +0800 usb: gadget: bdc: use readl_poll_timeout() to simplify code Use readl_poll_timeout() to poll register status Cc: Florian Fainelli Reviewed-by: Stephen Boyd Signed-off-by: Chunfeng Yun Reviewed-by: Florian Fainelli Signed-off-by: Felipe Balbi commit 33a06f1300a79cfd461cea0268f05e969d4f34ec Author: Marek Szyprowski Date: Thu Jul 16 14:09:48 2020 +0200 usb: dwc2: Fix error path in gadget registration When gadget registration fails, one should not call usb_del_gadget_udc(). Ensure this by setting gadget->udc to NULL. Also in case of a failure there is no need to disable low-level hardware, so return immiedetly instead of jumping to error_init label. This fixes the following kernel NULL ptr dereference on gadget failure (can be easily triggered with g_mass_storage without any module parameters): dwc2 12480000.hsotg: dwc2_check_params: Invalid parameter besl=1 dwc2 12480000.hsotg: dwc2_check_params: Invalid parameter g_np_tx_fifo_size=1024 dwc2 12480000.hsotg: EPs: 16, dedicated fifos, 7808 entries in SPRAM Mass Storage Function, version: 2009/09/11 LUN: removable file: (no medium) no file given for LUN0 g_mass_storage 12480000.hsotg: failed to start g_mass_storage: -22 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 00000104 pgd = (ptrval) [00000104] *pgd=00000000 Internal error: Oops: 805 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.8.0-rc5 #3133 Hardware name: Samsung Exynos (Flattened Device Tree) Workqueue: events deferred_probe_work_func PC is at usb_del_gadget_udc+0x38/0xc4 LR is at __mutex_lock+0x31c/0xb18 ... Process kworker/0:1 (pid: 12, stack limit = 0x(ptrval)) Stack: (0xef121db0 to 0xef122000) ... [] (usb_del_gadget_udc) from [] (dwc2_hsotg_remove+0x10/0x20) [] (dwc2_hsotg_remove) from [] (dwc2_driver_probe+0x57c/0x69c) [] (dwc2_driver_probe) from [] (platform_drv_probe+0x6c/0xa4) [] (platform_drv_probe) from [] (really_probe+0x200/0x48c) [] (really_probe) from [] (driver_probe_device+0x78/0x1fc) [] (driver_probe_device) from [] (bus_for_each_drv+0x74/0xb8) [] (bus_for_each_drv) from [] (__device_attach+0xd4/0x16c) [] (__device_attach) from [] (bus_probe_device+0x88/0x90) [] (bus_probe_device) from [] (deferred_probe_work_func+0x3c/0xd0) [] (deferred_probe_work_func) from [] (process_one_work+0x234/0x7dc) [] (process_one_work) from [] (worker_thread+0x44/0x51c) [] (worker_thread) from [] (kthread+0x158/0x1a0) [] (kthread) from [] (ret_from_fork+0x14/0x20) Exception stack(0xef121fb0 to 0xef121ff8) ... ---[ end trace 9724c2fc7cc9c982 ]--- While fixing this also fix the double call to dwc2_lowlevel_hw_disable() if dr_mode is set to USB_DR_MODE_PERIPHERAL. In such case low-level hardware is already disabled before calling usb_add_gadget_udc(). That function correctly preserves low-level hardware state, there is no need for the second unconditional dwc2_lowlevel_hw_disable() call. Fixes: 207324a321a8 ("usb: dwc2: Postponed gadget registration to the udc class driver") Acked-by: Minas Harutyunyan Signed-off-by: Marek Szyprowski Signed-off-by: Felipe Balbi commit abac8a85c8196c2a098048ad78552c8b1a236c4d Author: Michał Mirosław Date: Wed Jul 8 20:04:10 2020 +0200 usb: gadget: udc: atmel: implement .pullup callback Implement udc->pullup callback, so that udc_connect/disconnect work. This is needed for composite gadget, as it assumes udc_disconnect() actually works and calls its ->disconnect callback. Acked-by: Cristian Birsan Acked-by: Alexandre Belloni Signed-off-by: Michał Mirosław Signed-off-by: Felipe Balbi commit 37d9453b052dec46f6439658536ca8f301566559 Author: Marek Szyprowski Date: Thu Jul 16 13:55:25 2020 +0200 usb: gadget: udc: Flush pending work also in error path When binding an UDC driver to the pending gadget fails in check_pending_gadget_drivers(), the usb_add_gadget_udc_release() function ends without waiting for the usb_gadget_state_work to finish, what in turn might cause the whole struct usb_gadget being freed by the caller before the usb_gadget_state_work being executed. This can be observed on some boards with USB Mass Storage gadget compiled-in and kernel booted without the needed module parameters: dwc2 12480000.hsotg: dwc2_check_params: Invalid parameter besl=1 dwc2 12480000.hsotg: dwc2_check_params: Invalid parameter g_np_tx_fifo_size=1024 dwc2 12480000.hsotg: EPs: 16, dedicated fifos, 7808 entries in SPRAM Mass Storage Function, version: 2009/09/11 LUN: removable file: (no medium) no file given for LUN0 g_mass_storage 12480000.hsotg: failed to start g_mass_storage: -22 dwc2: probe of 12480000.hsotg failed with error -22 8<--- cut here --- Unable to handle kernel NULL pointer dereference at virtual address 00000004 pgd = (ptrval) [00000004] *pgd=00000000 Internal error: Oops: 5 [#1] PREEMPT SMP ARM Modules linked in: CPU: 1 PID: 88 Comm: kworker/1:2 Not tainted 5.8.0-rc5-next-20200715-00062-gc5bb489ae825-dirty #8792 Hardware name: Samsung Exynos (Flattened Device Tree) Workqueue: 0x0 (rcu_gp) PC is at process_one_work+0x44/0x7dc ... Process kworker/1:2 (pid: 88, stack limit = 0x(ptrval)) Stack: (0xed9f1f00 to 0xed9f2000) ... [] (process_one_work) from [] (worker_thread+0x44/0x51c) [] (worker_thread) from [] (kthread+0x158/0x1a0) [] (kthread) from [] (ret_from_fork+0x14/0x20) Exception stack(0xed9f1fb0 to 0xed9f1ff8) ... ---[ end trace 5033c1326a62e5f3 ]--- note: kworker/1:2[88] exited with preempt_count 1 Fix this by flushing pending work in error path. Reviewed-by: Peter Chen Signed-off-by: Marek Szyprowski Signed-off-by: Felipe Balbi commit f4cfe5ce607dd87873956453a7775c102a18fc62 Author: Peter Chen Date: Fri Jul 17 18:13:17 2020 +0800 usb: cdns3: gadget: improve the set_configuration handling - Delete the duplicated EP_CMD_ERDY and EP_CMD_REQ_CMPL setting - Prepare the next setup before setting EP_CMD_ERDY and EP_CMD_REQ_CMPL, it could avoid a bug that DMA hang at EP0 OUT for DEV_VER_NXP_V1 - Delete the duplicated cdns3_set_hw_configuration calling at cdns3_req_ep0_set_configuration, the composite.c will handle this request, and call .ep0_queue back, and at .ep_queue it will call cdns3_set_hw_configuration. - Move cdns3_allow_enable_l1 into cdns3_set_hw_configuration since it is part of this function. Signed-off-by: Peter Chen Signed-off-by: Felipe Balbi commit 7a410953d1fb4dbe91ffcfdee9cbbf889d19b0d7 Author: Dan Robertson Date: Mon Jul 13 12:05:22 2020 -0400 usb: dwc3: meson-g12a: fix shared reset control use The reset is a shared reset line, but reset_control_reset is still used and reset_control_deassert is not guaranteed to have been called before the first reset_control_assert call. When suspending the following warning may be seen: WARNING: CPU: 1 PID: 5530 at drivers/reset/core.c:355 reset_control_assert+0x184/0x19c Hardware name: Hardkernel ODROID-N2 (DT) [..] pc : reset_control_assert+0x184/0x19c lr : dwc3_meson_g12a_suspend+0x68/0x7c [..] Call trace: reset_control_assert+0x184/0x19c dwc3_meson_g12a_suspend+0x68/0x7c platform_pm_suspend+0x28/0x54 __device_suspend+0x590/0xabc dpm_suspend+0x104/0x404 dpm_suspend_start+0x84/0x1bc suspend_devices_and_enter+0xc4/0x4fc pm_suspend+0x198/0x2d4 Fixes: 6d9fa35a347a87 ("usb: dwc3: meson-g12a: get the reset as shared") Signed-off-by: Dan Robertson Signed-off-by: Felipe Balbi commit dc5fb6d2e8dff0dd61c9b55508c46e73a67e9ea8 Author: Steve Lee Date: Fri Jul 24 15:00:58 2020 +0900 ASoC: max98390: Fix dac event dapm mixer. Global EN register guide to off before AMP_EN register when amp disable sequence. - remove AMP_EN control before max98390_dac_event call Signed-off-by: Steve Lee Link: https://lore.kernel.org/r/20200724060058.19201-1-steves.lee@maximintegrated.com Signed-off-by: Mark Brown commit 826b07b190c8ca69ce674f13b4dc9be2bc536fcd Author: Michael Ellerman Date: Fri Jul 24 20:42:54 2020 +1000 powerpc/sstep: Fix incorrect CONFIG symbol in scv handling When I "fixed" the ppc64e build in Nick's recent patch, I typoed the CONFIG symbol, resulting in one that doesn't exist. Fix it to use the correct symbol. Reported-by: Christophe Leroy Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv instructions") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724131609.1640533-1-mpe@ellerman.id.au commit 72c3c0fe54a3f3ddea8f5ca468ddf9deaf2100b7 Author: Thomas Gleixner Date: Thu Jul 23 00:00:09 2020 +0200 x86/kvm: Use generic xfer to guest work function Use the generic infrastructure to check for and handle pending work before transitioning into guest mode. This now handles TIF_NOTIFY_RESUME as well which was ignored so far. Handling it is important as this covers task work and task work will be used to offload the heavy lifting of POSIX CPU timers to thread context. Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200722220520.979724969@linutronix.de commit a27a0a55495cdde4b8d98f82460dc46eb44777fd Author: Thomas Gleixner Date: Thu Jul 23 00:00:08 2020 +0200 x86/entry: Cleanup idtentry_enter/exit Remove the temporary defines and fixup all references. Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200722220520.855839271@linutronix.de commit bdcd178ada90d2413bcc9df4211dcdd511a47586 Author: Thomas Gleixner Date: Thu Jul 23 00:00:07 2020 +0200 x86/entry: Use generic interrupt entry/exit code Replace the x86 code with the generic variant. Use temporary defines for idtentry_* which will be cleaned up in the next step. Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200722220520.711492752@linutronix.de commit 517e499227bed34acc69166691e2db5df3dc859a Author: Thomas Gleixner Date: Thu Jul 23 00:00:06 2020 +0200 x86/entry: Cleanup idtentry_entry/exit_user Cleanup the temporary defines and use irqentry_ instead of idtentry_. Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200722220520.602603691@linutronix.de commit 167fd210ec0555d371a20435dac7c2c7052df7ed Author: Thomas Gleixner Date: Thu Jul 23 00:00:05 2020 +0200 x86/entry: Use generic syscall exit functionality Replace the x86 variant with the generic version. Provide the relevant architecture specific helper functions and defines. Use a temporary define for idtentry_exit_user which will be cleaned up seperately. Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Link: https://lkml.kernel.org/r/20200722220520.494648601@linutronix.de commit 27d6b4d14f5c3ab21c4aef87dd04055a2d7adf14 Author: Thomas Gleixner Date: Thu Jul 23 00:00:04 2020 +0200 x86/entry: Use generic syscall entry function Replace the syscall entry work handling with the generic version. Provide the necessary helper inlines to handle the real architecture specific parts, e.g. ptrace. Use a temporary define for idtentry_enter_user which will be cleaned up seperately. Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200722220520.376213694@linutronix.de commit 0bf019ea59e330770883ede4499d7f711d8c3adf Author: Thomas Gleixner Date: Thu Jul 23 00:00:03 2020 +0200 x86/ptrace: Provide pt_regs helper for entry/exit As a preparatory step for moving the syscall and interrupt entry/exit handling into generic code, provide a pt_regs helper which retrieves the interrupt state from pt_regs. This is required to check whether interrupts are reenabled by return from interrupt/exception. Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200722220520.258511584@linutronix.de commit a377ac1cd9d7b9ac8d546dceb3d74956fbfd443f Author: Thomas Gleixner Date: Thu Jul 23 00:00:02 2020 +0200 x86/entry: Move user return notifier out of loop Guests and user space share certain MSRs. KVM sets these MSRs to guest values once and does not set them back to user space values on every VM exit to spare the costly MSR operations. User return notifiers ensure that these MSRs are set back to the correct values before returning to user space in exit_to_usermode_loop(). There is no reason to evaluate the TIF flag indicating that user return notifiers need to be invoked in the loop. The important point is that they are invoked before returning to user space. Move the invocation out of the loop into the section which does the last preperatory steps before returning to user space. That section is not preemptible and runs with interrupts disabled until the actual return. Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200722220520.159112003@linutronix.de commit 0b085e68f4072024ecaa3889aeeaab5f6c8eba5c Author: Thomas Gleixner Date: Thu Jul 23 00:00:01 2020 +0200 x86/entry: Consolidate 32/64 bit syscall entry 64bit and 32bit entry code have the same open coded syscall entry handling after the bitwidth specific bits. Move it to a helper function and share the code. Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200722220520.051234096@linutronix.de commit 8d5ea35c5e9139dbd19a3d73985d008d36c9968f Author: Thomas Gleixner Date: Thu Jul 23 00:00:00 2020 +0200 x86/entry: Consolidate check_user_regs() The user register sanity check is sprinkled all over the place. Move it into enter_from_user_mode(). Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200722220519.943016204@linutronix.de commit b35ad8405d3951721126c3942d863056c2f39c64 Merge: 7f6fa101dfac8 935ace2fb5cc4 Author: Thomas Gleixner Date: Fri Jul 24 15:03:59 2020 +0200 Merge branch 'core/entry' into x86/entry Pick up generic entry code to migrate x86 over. commit 935ace2fb5cc49ae88bd1f1735ddc51cdc2ebfb3 Author: Thomas Gleixner Date: Wed Jul 22 23:59:59 2020 +0200 entry: Provide infrastructure for work before transitioning to guest mode Entering a guest is similar to exiting to user space. Pending work like handling signals, rescheduling, task work etc. needs to be handled before that. Provide generic infrastructure to avoid duplication of the same handling code all over the place. The transfer to guest mode handling is different from the exit to usermode handling, e.g. vs. rseq and live patching, so a separate function is used. The initial list of work items handled is: TIF_SIGPENDING, TIF_NEED_RESCHED, TIF_NOTIFY_RESUME Architecture specific TIF flags can be added via defines in the architecture specific include files. The calling convention is also different from the syscall/interrupt entry functions as KVM invokes this from the outer vcpu_run() loop with interrupts and preemption enabled. To prevent missing a pending work item it invokes a check for pending TIF work from interrupt disabled code right before transitioning to guest mode. The lockdep, RCU and tracing state handling is also done directly around the switch to and from guest mode. Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200722220519.833296398@linutronix.de commit a5497bab5f72dce38a259a53fd3ac1239a7ecf40 Author: Thomas Gleixner Date: Wed Jul 22 23:59:58 2020 +0200 entry: Provide generic interrupt entry/exit code Like the syscall entry/exit code interrupt/exception entry after the real low level ASM bits should not be different accross architectures. Provide a generic version based on the x86 code. irqentry_enter() is called after the low level entry code and irqentry_exit() must be invoked right before returning to the low level code which just contains the actual return logic. The code before irqentry_enter() and irqentry_exit() must not be instrumented. Code after irqentry_enter() and before irqentry_exit() can be instrumented. irqentry_enter() invokes irqentry_enter_from_user_mode() if the interrupt/exception came from user mode. If if entered from kernel mode it handles the kernel mode variant of establishing state for lockdep, RCU and tracing depending on the kernel context it interrupted (idle, non-idle). Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200722220519.723703209@linutronix.de commit a9f3a74a29af095f3e1b89e9176f8127912ae0f0 Author: Thomas Gleixner Date: Wed Jul 22 23:59:57 2020 +0200 entry: Provide generic syscall exit function Like syscall entry all architectures have similar and pointlessly different code to handle pending work before returning from a syscall to user space. 1) One-time syscall exit work: - rseq syscall exit - audit - syscall tracing - tracehook (single stepping) 2) Preparatory work - Exit to user mode loop (common TIF handling). - Architecture specific one time work arch_exit_to_user_mode_prepare() - Address limit and lockdep checks 3) Final transition (lockdep, tracing, context tracking, RCU). Invokes arch_exit_to_user_mode() to handle e.g. speculation mitigations Provide a generic version based on the x86 code which has all the RCU and instrumentation protections right. Provide a variant for interrupt return to user mode as well which shares the above #2 and #3 work items. After syscall_exit_to_user_mode() and irqentry_exit_to_user_mode() the architecture code just has to return to user space. The code after returning from these functions must not be instrumented. Signed-off-by: Thomas Gleixner Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/20200722220519.613977173@linutronix.de commit 142781e108b13b2b0e8f035cfb5bfbbc8f14d887 Author: Thomas Gleixner Date: Wed Jul 22 23:59:56 2020 +0200 entry: Provide generic syscall entry functionality On syscall entry certain work needs to be done: - Establish state (lockdep, context tracking, tracing) - Conditional work (ptrace, seccomp, audit...) This code is needlessly duplicated and different in all architectures. Provide a generic version based on the x86 implementation which has all the RCU and instrumentation bits right. As interrupt/exception entry from user space needs parts of the same functionality, provide a function for this as well. syscall_enter_from_user_mode() and irqentry_enter_from_user_mode() must be called right after the low level ASM entry. The calling code must be non-instrumentable. After the functions returns state is correct and the subsequent functions can be instrumented. Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Link: https://lkml.kernel.org/r/20200722220519.513463269@linutronix.de commit 6823ecabf03031d610a6c5afe7ed4b4fd659a99f Author: Thomas Gleixner Date: Wed Jul 22 23:59:55 2020 +0200 seccomp: Provide stub for __secure_computing() To avoid #ifdeffery in the upcoming generic syscall entry work code provide a stub for __secure_computing() as this is preferred over secure_computing() because the TIF flag is already evaluated. Signed-off-by: Thomas Gleixner Acked-by: Kees Cook Link: https://lkml.kernel.org/r/20200722220519.404974280@linutronix.de commit 6526b12de07588253a52577f42ec99fc7ca26a1f Author: Sedat Dilek Date: Thu Jul 23 19:11:14 2020 +0200 x86/defconfigs: Remove CONFIG_CRYPTO_AES_586 from i386_defconfig Initially CONFIG_CRYPTO_AES_586=y was added to the i386_defconfig file in: c1b362e3b4d3: ("x86: update defconfigs") The code and Kconfig for CONFIG_CRYPTO_AES_586 was removed in: 1d2c3279311e: ("crypto: x86/aes - drop scalar assembler implementations") Remove the leftover from the i386_defconfig file as well. Signed-off-by: Sedat Dilek Signed-off-by: Ingo Molnar Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20200723171119.9881-1-sedat.dilek@gmail.com commit b1012ca8dc4f9b1a1fe8e2cb1590dd6d43ea3849 Author: Lu Baolu Date: Thu Jul 23 09:34:37 2020 +0800 iommu/vt-d: Skip TE disabling on quirky gfx dedicated iommu The VT-d spec requires (10.4.4 Global Command Register, TE field) that: Hardware implementations supporting DMA draining must drain any in-flight DMA read/write requests queued within the Root-Complex before completing the translation enable command and reflecting the status of the command through the TES field in the Global Status register. Unfortunately, some integrated graphic devices fail to do so after some kind of power state transition. As the result, the system might stuck in iommu_disable_translation(), waiting for the completion of TE transition. This provides a quirk list for those devices and skips TE disabling if the qurik hits. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=208363 Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=206571 Signed-off-by: Lu Baolu Tested-by: Koba Ko Tested-by: Jun Miao Cc: Ashok Raj Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200723013437.2268-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit f34ce7a7018c2f71d78fc7f512f6daf01e487114 Author: Baolin Wang Date: Fri Jun 12 11:39:55 2020 +0800 iommu: Add gfp parameter to io_pgtable_ops->map() Now the ARM page tables are always allocated by GFP_ATOMIC parameter, but the iommu_ops->map() function has been added a gfp_t parameter by commit 781ca2de89ba ("iommu: Add gfp parameter to iommu_ops::map"), thus io_pgtable_ops->map() should use the gfp parameter passed from iommu_ops->map() to allocate page pages, which can avoid wasting the memory allocators atomic pools for some non-atomic contexts. Signed-off-by: Baolin Wang Acked-by: Will Deacon Link: https://lore.kernel.org/r/3093df4cb95497aaf713fca623ce4ecebb197c2e.1591930156.git.baolin.wang@linux.alibaba.com Signed-off-by: Joerg Roedel commit 9930264fd997dad4c2cd8914cec7acab7c0ed984 Author: Baolin Wang Date: Fri Jun 12 11:39:54 2020 +0800 iommu: Mark __iommu_map_sg() as static Now __iommu_map_sg() is used only in iommu.c file, so mark it static. Signed-off-by: Baolin Wang Acked-by: Will Deacon Link: https://lore.kernel.org/r/ab722e9970739929738066777b8ee7930e32abd5.1591930156.git.baolin.wang@linux.alibaba.com Signed-off-by: Joerg Roedel commit 3503d56cc7233ced602e38a4c13caa64f00ab2aa Author: Andrei Vagin Date: Wed Jun 24 01:33:18 2020 -0700 arm64/vdso: Add time namespace page Allocate the time namespace page among VVAR pages. Provide __arch_get_timens_vdso_data() helper for VDSO code to get the code-relative position of VVARs on that special page. If a task belongs to a time namespace then the VVAR page which contains the system wide VDSO data is replaced with a namespace specific page which has the same layout as the VVAR page. That page has vdso_data->seq set to 1 to enforce the slow path and vdso_data->clock_mode set to VCLOCK_TIMENS to enforce the time namespace handling path. The extra check in the case that vdso_data->seq is odd, e.g. a concurrent update of the VDSO data is in progress, is not really affecting regular tasks which are not part of a time namespace as the task is spin waiting for the update to finish and vdso_data->seq to become even again. If a time namespace task hits that code path, it invokes the corresponding time getter function which retrieves the real VVAR page, reads host time and then adds the offset for the requested clock which is stored in the special VVAR page. The time-namespace page isn't allocated on !CONFIG_TIME_NAMESPACE, but vma is the same size, which simplifies criu/vdso migration between different kernel configs. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Cc: Mark Rutland Link: https://lore.kernel.org/r/20200624083321.144975-4-avagin@gmail.com Signed-off-by: Catalin Marinas commit 1b6867d2916bb91e94ddcc9c709e4779419fe391 Author: Andrei Vagin Date: Wed Jun 24 01:33:17 2020 -0700 arm64/vdso: Zap vvar pages when switching to a time namespace The order of vvar pages depends on whether a task belongs to the root time namespace or not. In the root time namespace, a task doesn't have a per-namespace page. In a non-root namespace, the VVAR page which contains the system-wide VDSO data is replaced with a namespace specific page that contains clock offsets. Whenever a task changes its namespace, the VVAR page tables are cleared and then they will be re-faulted with a corresponding layout. A task can switch its time namespace only if its ->mm isn't shared with another task. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Reviewed-by: Christian Brauner Link: https://lore.kernel.org/r/20200624083321.144975-3-avagin@gmail.com Signed-off-by: Catalin Marinas commit d53b5c013e1e7c3b43a7487171a84ee2acdd9597 Author: Andrei Vagin Date: Wed Jun 24 01:33:16 2020 -0700 arm64/vdso: use the fault callback to map vvar pages Currently the vdso has no awareness of time namespaces, which may apply distinct offsets to processes in different namespaces. To handle this within the vdso, we'll need to expose a per-namespace data page. As a preparatory step, this patch separates the vdso data page from the code pages, and has it faulted in via its own fault callback. Subsquent patches will extend this to support distinct pages per time namespace. The vvar vma has to be installed with the VM_PFNMAP flag to handle faults via its vma fault callback. Signed-off-by: Andrei Vagin Reviewed-by: Vincenzo Frascino Reviewed-by: Dmitry Safonov Link: https://lore.kernel.org/r/20200624083321.144975-2-avagin@gmail.com Signed-off-by: Catalin Marinas commit d19e789f068b3d633cbac430764962f404198022 Author: Ingo Molnar Date: Fri Jul 24 13:50:25 2020 +0200 compiler.h: Move instrumentation_begin()/end() to new header Linus pointed out that compiler.h - which is a key header that gets included in every single one of the 28,000+ kernel files during a kernel build - was bloated in: 655389666643: ("vmlinux.lds.h: Create section for protection against instrumentation") Linus noted: > I have pulled this, but do we really want to add this to a header file > that is _so_ core that it gets included for basically every single > file built? > > I don't even see those instrumentation_begin/end() things used > anywhere right now. > > It seems excessive. That 53 lines is maybe not a lot, but it pushed > that header file to over 12kB, and while it's mostly comments, it's > extra IO and parsing basically for _every_ single file compiled in the > kernel. > > For what appears to be absolutely zero upside right now, and I really > don't see why this should be in such a core header file! Move these primitives into a new header: , and include that header in the headers that make use of it. Unfortunately one of these headers is asm-generic/bug.h, which does get included in a lot of places, similarly to compiler.h. So the de-bloating effect isn't as good as we'd like it to be - but at least the interfaces are defined separately. No change to functionality intended. Reported-by: Linus Torvalds Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20200604071921.GA1361070@gmail.com Cc: Thomas Gleixner Cc: Borislav Petkov Cc: Peter Zijlstra commit ea0eada45632f4807b2f49de951072283e2d781c Author: Gregory Herrero Date: Fri Jul 17 16:33:38 2020 +0200 recordmcount: only record relocation of type R_AARCH64_CALL26 on arm64. Currently, if a section has a relocation to '_mcount' symbol, a new __mcount_loc entry will be added whatever the relocation type is. This is problematic when a relocation to '_mcount' is in the middle of a section and is not a call for ftrace use. Such relocation could be generated with below code for example: bool is_mcount(unsigned long addr) { return (target == (unsigned long) &_mcount); } With this snippet of code, ftrace will try to patch the mcount location generated by this code on module load and fail with: Call trace: ftrace_bug+0xa0/0x28c ftrace_process_locs+0x2f4/0x430 ftrace_module_init+0x30/0x38 load_module+0x14f0/0x1e78 __do_sys_finit_module+0x100/0x11c __arm64_sys_finit_module+0x28/0x34 el0_svc_common+0x88/0x194 el0_svc_handler+0x38/0x8c el0_svc+0x8/0xc ---[ end trace d828d06b36ad9d59 ]--- ftrace failed to modify [] 0xffffa2dbf3a3a41c actual: 66:a9:3c:90 Initializing ftrace call sites ftrace record flags: 2000000 (0) expected tramp: ffffa2dc6cf66724 So Limit the relocation type to R_AARCH64_CALL26 as in perl version of recordmcount. Fixes: af64d2aa872a ("ftrace: Add arm64 support to recordmcount") Signed-off-by: Gregory Herrero Acked-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20200717143338.19302-1-gregory.herrero@oracle.com Signed-off-by: Catalin Marinas commit 287d959558357e155c889bc35579eb35691a8fcb Author: Sumeet Pawnikar Date: Fri Jul 24 13:22:26 2020 +0530 thermal: int340x: processor_thermal: fix: update Jasper Lake PCI id Update PCI device id for Jasper Lake processor thermal device. With this proc_thermal driver is getting loaded and processor thermal functionality works on Jasper Lake system. Fixes: f64a6583d3f5 ("thermal: int340x: processor_thermal: Add Jasper Lake support") Signed-off-by: Sumeet Pawnikar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1595577146-1221-1-git-send-email-sumeet.r.pawnikar@intel.com commit 45c2818f78d31d7f6732ad07baa7902f33c269d3 Author: Marek Behún Date: Thu Jul 23 14:53:20 2020 +0200 Documentation: ABI: leds-turris-omnia: document sysfs attribute Document the global brightness attribute for the Turris Omnia LED controller. Signed-off-by: Marek Behún Signed-off-by: Pavel Machek commit 089381b27abe28a54b1e73e1ab975c2d5b24f8f3 Author: Marek Behún Date: Thu Jul 23 14:53:19 2020 +0200 leds: initial support for Turris Omnia LEDs This adds basic support for LEDs on the front side of CZ.NIC's Turris Omnia router. There are 12 RGB LEDs. The controller supports HW triggering mode for the LEDs, but this driver does not support it yet, and sets all the LEDs defined in device-tree into SW mode upon probe. This driver uses the multicolor LED framework. Signed-off-by: Marek Behún Reviewed-by: Dan Murphy Signed-off-by: Pavel Machek commit ae036f9fb6cd66035a45a1ce1b94db59a7e021ae Author: Marek Behún Date: Thu Jul 23 14:53:18 2020 +0200 dt-bindings: leds: add cznic,turris-omnia-leds binding Add device-tree bindings documentation for Turris Omnia RGB LEDs. Signed-off-by: Marek Behún Reviewed-by: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Pavel Machek commit a46cec12f4a53ee5113f42b327cbb8d4cda074d2 Author: Catalin Marinas Date: Fri Jul 24 10:41:31 2020 +0100 arm64: Reserve HWCAP2_MTE as (1 << 18) While MTE is not supported in the upstream kernel yet, add a comment that HWCAP2_MTE as (1 << 18) is reserved. Glibc makes use of it for the resolving (ifunc) of the MTE-safe string routines. Signed-off-by: Catalin Marinas commit ac42e4e906b64be68434452c3ad14cb6ef2d1774 Author: Chun-Hung Wu Date: Mon Jul 20 08:42:39 2020 +0800 dt-bindings: mmc: mediatek: Add document for mt6779 Add compatible node for mt6779 mmc. Signed-off-by: Chun-Hung Wu Acked-by: Rob Herring Link: https://lore.kernel.org/r/1595205759-5825-5-git-send-email-chun-hung.wu@mediatek.com Signed-off-by: Ulf Hansson commit 88bd652b3c74997bb436adf6131acf445066243e Author: Chun-Hung Wu Date: Mon Jul 20 08:42:38 2020 +0800 mmc: mediatek: command queue support Support command queue for mt6779 platform. a. Add msdc_set_busy_timeout() to calculate emmc write timeout. b. Connect mtk msdc driver to cqhci driver through host->cq_host->ops = &msdc_cmdq_ops; c. msdc_cmdq_irq() will link up with cqchi_irq(). Besides, it provides more irq error messages like RSPCRCERR/CMDTO/DATACRCERR/DATTMO. d. Select kernel config MMC_CQHCI for MMC_MTK Signed-off-by: Chun-Hung Wu Acked-by: Yong Mao Link: https://lore.kernel.org/r/1595205759-5825-4-git-send-email-chun-hung.wu@mediatek.com Signed-off-by: Ulf Hansson commit 557011b6b8c87c10d8bd2ec4366d4b2a0614ffc8 Author: Chun-Hung Wu Date: Mon Jul 20 08:42:37 2020 +0800 mmc: mediatek: refine msdc timeout api Extract msdc timeout api common part to have better code architecture and avoid redundant code. Signed-off-by: Chun-Hung Wu Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/1595205759-5825-3-git-send-email-chun-hung.wu@mediatek.com Signed-off-by: Ulf Hansson commit 7d176b0ea6f0d45e32564770316df6671183136e Author: Chun-Hung Wu Date: Mon Jul 20 08:42:36 2020 +0800 mmc: mediatek: add MT6779 MMC driver support Add new code to support MT6779 mmc driver. Signed-off-by: Chun-Hung Wu Link: https://lore.kernel.org/r/1595205759-5825-2-git-send-email-chun-hung.wu@mediatek.com Signed-off-by: Ulf Hansson commit 31cd0e119d50cf27ebe214d1a8f7ca36692f13a5 Author: Frederic Weisbecker Date: Thu Jul 23 17:16:41 2020 +0200 timers: Recalculate next timer interrupt only when necessary The nohz tick code recalculates the timer wheel's next expiry on each idle loop iteration. On the other hand, the base next expiry is now always cached and updated upon timer enqueue and execution. Only timer dequeue may leave base->next_expiry out of date (but then its stale value won't ever go past the actual next expiry to be recalculated). Since recalculating the next_expiry isn't a free operation, especially when the last wheel level is reached to find out that no timer has been enqueued at all, reuse the next expiry cache when it is known to be reliable, which it is most of the time. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200723151641.12236-1-frederic@kernel.org commit feff72735b316e268da4ccc04091977e8f89a721 Author: Pavel Machek Date: Fri Jul 24 12:43:47 2020 +0200 leds: pattern trigger -- check pattern for validity Don't allow invalid brightness in the pattern. Signed-off-by: Pavel Machek commit 7b7d897e8898603ac014ba07f203b9f8c4fa7952 Author: shirley her Date: Mon Jul 20 18:27:00 2020 -0700 mmc: sdhci-pci-o2micro: Add HW tuning for SDR104 mode Add HW tuning support for SD host controller in SDR104 mode Signed-off-by: Shirley Her Link: https://lore.kernel.org/r/20200721012700.8564-1-shirley.her@bayhubtech.com Signed-off-by: Ulf Hansson commit cdd2b769789ae1a030e1a26f6c37c5833cabcb34 Author: shirley her Date: Mon Jul 20 18:17:33 2020 -0700 mmc: sdhci-pci-o2micro: Bug fix for O2 host controller Seabird1 To fix support for the O2 host controller Seabird1, set the quirk SDHCI_QUIRK2_PRESET_VALUE_BROKEN and the capability bit MMC_CAP2_NO_SDIO. Moreover, assign the ->get_cd() callback. Signed-off-by: Shirley Her Link: https://lore.kernel.org/r/20200721011733.8416-1-shirley.her@bayhubtech.com [Ulf: Updated the commit message] Signed-off-by: Ulf Hansson commit 0d776e5bede6d375c617a03262eee9d2a8a58b75 Author: Vaibhav Gupta Date: Mon Jul 20 19:56:04 2020 +0530 mmc: via-sdmmc: use generic power management Drivers using legacy PM have to manage PCI states and device's PM states themselves. They also need to take care of configuration registers. With improved and powerful support of generic PM, PCI Core takes care of above mentioned, device-independent, jobs. This driver makes use of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), pci_enable_wake() and pci_set_power_state() and to do required operations. In generic mode, they are no longer needed. Change function parameter in both .suspend() and .resume() to "struct device*" type. Use dev_get_drvdata() to get drv data. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200720142603.577323-1-vaibhavgupta40@gmail.com Signed-off-by: Ulf Hansson commit c4e5e22b3b4895821b7e7a9f5b2f7c820fb48ca3 Author: Vaibhav Gupta Date: Mon Jul 20 16:46:26 2020 +0530 memstick: jmb38x_ms: use generic power management Drivers using legacy PM have to manage PCI states and device's PM states themselves. They also need to take care of configuration registers. With improved and powerful support of generic PM, PCI Core takes care of above mentioned, device-independent, jobs. This driver makes use of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), pci_set_power_state() and pci_set_master() to do required operations. In generic mode, they are no longer needed. Change function parameter in both .suspend() and .resume() to "struct device*" type. Use to_pci_dev() and dev_get_drvdata() to get "struct pci_dev*" variable and drv data. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200720111625.306681-1-vaibhavgupta40@gmail.com Signed-off-by: Ulf Hansson commit adc40a5179df30421a5537bfeb4545100ab97d5e Author: Masahiro Yamada Date: Mon Jul 20 15:11:41 2020 +0900 mmc: sdhci-cadence: do not use hardware tuning for SD mode As commit ef6b75671b5f ("mmc: sdhci-cadence: send tune request twice to work around errata") stated, this IP has an errata. This commit applies the second workaround for the SD mode. Due to the errata, it is not possible to use the hardware tuning provided by SDHCI_HOST_CONTROL2. Use the software-controlled tuning like the eMMC mode. Set sdhci_host_ops::platform_execute_tuning instead of overriding mmc_host_ops::execute_tuning. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200720061141.172944-1-yamada.masahiro@socionext.com Signed-off-by: Ulf Hansson commit 786d33c887e15061ff95942db68fe5c6ca98e5fc Author: Ben Chuang Date: Fri Jul 17 11:33:50 2020 +0800 mmc: sdhci-pci-gli: Set SDR104's clock to 205MHz and enable SSC for GL975x Set SDR104's clock to 205MHz and enable SSC for GL9750 and GL9755 Signed-off-by: Ben Chuang Link: https://lore.kernel.org/r/20200717033350.13006-1-benchuanggli@gmail.com Signed-off-by: Ulf Hansson commit a2eec1099bc34557cab59edb6821404272b9b3d8 Author: Jiri Slaby Date: Thu Jul 23 11:42:35 2020 +0200 mips: traps, add __init to parity_protection_init It references __initdata and is called only from an __init function: trap_init. This avoids section mismatches (which I am seeing with gcc 10). Signed-off-by: Jiri Slaby Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit e27e1cc9d360a347dbd5a398e9df21cfb4e60e3c Author: Álvaro Fernández Rojas Date: Mon Jun 8 11:28:35 2020 +0200 MIPS: BCM63xx: improve CFE version detection There are some CFE variants that start with 'cfe-vd' instead of 'cfe-v', such as the one used in the Huawei HG556a: "cfe-vd081.5003". In this case, the CFE version is stored as is (string vs number bytes). Some newer devices have an additional version number, such as the Comtrend VR-3032u: "1.0.38-112.118-11". Finally, print the string as is if the version doesn't start with "cfe-v" or "cfe-vd", but starts with "cfe-". Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Thomas Bogendoerfer commit 90508658d713c0469c056cea618c21b5610c3452 Author: Ben Chuang Date: Wed Jul 15 15:33:44 2020 +0800 mmc: cqhci: Fix a print format for the task descriptor The format string of the task descriptor should be "%016llx". Signed-off-by: Ben Chuang Link: https://lore.kernel.org/r/20200715073344.8965-1-benchuanggli@gmail.com Signed-off-by: Ulf Hansson commit 88e1d0b175ec0bfa775c8629eae2a728726e2c6a Author: Manish Narani Date: Wed Jul 15 00:42:33 2020 +0530 mmc: sdhci-of-arasan: fix timings allocation code The initial code that was adding delays was doing a cast over undefined memory. This meant that the delays would be all gibberish. This change, allocates all delays on the stack, and assigns them from the ZynqMP & Versal macros/phase-list. And then finally copies them over the common iclk_phase & oclk_phase variables. Signed-off-by: Manish Narani Link: https://lore.kernel.org/r/1594753953-62980-1-git-send-email-manish.narani@xilinx.com Signed-off-by: Ulf Hansson commit 907be2a62e4522c3dc3c298a213ccc741bd22732 Author: Dan Carpenter Date: Tue Jul 14 17:14:10 2020 +0300 mmc: sdhci: Fix a potential uninitialized variable Smatch complains that "ret" can be used without being initialized. drivers/mmc/host/sdhci.c 4383 if (!IS_ERR(mmc->supply.vqmmc)) { 4384 if (enable_vqmmc) { ^^^^^^^^^^^^ 4385 ret = regulator_enable(mmc->supply.vqmmc); ^^^^^ 4386 host->sdhci_core_to_disable_vqmmc = !ret; 4387 } "ret" is only initialized when "enable_vqmmc" is true. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200714141410.GB314989@mwanda Signed-off-by: Ulf Hansson commit a1c76734095344fdbe43cbfe4940020e13151679 Author: Yoshihiro Shimoda Date: Fri Jul 10 15:51:23 2020 +0900 dt-bindings: mmc: renesas,sdhi: convert to YAML Convert Renesas SDHI SD/MMC controller document to YAML. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1594363883-22154-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Ulf Hansson commit 6378cfdcc32d3790b04c953e7766324d8ee04a90 Author: Stephen Boyd Date: Mon Jun 22 02:09:35 2020 -0700 clk: Clean up kernel-doc errors Two things aren't documented causing kernel-doc to fail when checking the core clk.c file. Fix them so that this file is clean. Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200622090935.213833-1-sboyd@kernel.org commit 413d84b88bee08ed59713e782053ff38d206c606 Author: Stephen Boyd Date: Fri Jul 24 02:40:25 2020 -0700 clk: qcom: Export gdsc_gx_do_nothing_enable() to modules A clk driver can be a module but the gdsc code is in the common module. Export this symbol so that allmodconfig builds keep working. Cc: Jonathan Marek Fixes: 0638226dd095 ("clk: qcom: add common gdsc_gx_do_nothing_enable for gpucc drivers") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200724094025.3261266-1-sboyd@kernel.org commit cb783bbbcf54c36256006895c215e86c5e7266d8 Author: Claudiu Beznea Date: Wed Jul 22 10:38:26 2020 +0300 clk: at91: sama7g5: add clock support for sama7g5 Add clock support for SAMA7G5. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-19-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit ef396df99251b848596c717b63ff4fe74a941193 Author: Claudiu Beznea Date: Wed Jul 22 10:38:25 2020 +0300 clk: at91: clk-utmi: add utmi support for sama7g5 Add UTMI support for SAMA7G5. SAMA7G5's UTMI control is done via XTALF register. Values written at bits 2..0 in this register correspond to the on board crystal oscillator frequency. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-18-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 43b1bb4a9b3e183af12225f56c27164c10d06223 Author: Claudiu Beznea Date: Wed Jul 22 10:38:24 2020 +0300 clk: at91: clk-sam9x60-pll: re-factor to support plls with multiple outputs Some of the SAMA7G5 PLLs support multiple outputs (e.g. AUDIO PLL). For these, split the PLL clock in two: fractional clock and divider clock. In case PLLs supports multiple outputs (since these outputs are dividers (with different settings) sharing the same fractional part), it will register one fractional clock and multiple divider clocks (dividers sharing the fractional clock). Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-17-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 0416824edca1cdcb6e00e6f909423bf0fc529eef Author: Claudiu Beznea Date: Wed Jul 22 10:38:23 2020 +0300 clk: at91: add macro for pll ids mask Add macro for PLL IDs mask. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-16-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit c57aaaa28cf1a123c0029a36361a809eae2b1960 Author: Claudiu Beznea Date: Wed Jul 22 10:38:22 2020 +0300 clk: at91: clk-programmable: add mux_table option Add mux table option. This is necessary for IP versions that has gaps in the range of available clock sources (e.g. SAMA7G5). Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-15-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit b4c115c76184f2c56a295579161652fd5eb2dcc1 Author: Claudiu Beznea Date: Wed Jul 22 10:38:21 2020 +0300 clk: at91: clk-peripheral: add support for changeable parent rate Some peripheral clocks on SAMA7G5 supports requesting parent to change its rate (image related clocks: csi, csi2dc, isc). Add support so that if registered with this option the clock rate to be requested from parent. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-14-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 75c88143f3b879664cc5bf68b91854c1a98f5e5b Author: Claudiu Beznea Date: Wed Jul 22 10:38:20 2020 +0300 clk: at91: clk-master: add master clock support for SAMA7G5 Add master clock support (MCK1..4) for SAMA7G5. SAMA7G5's PMC has multiple master clocks feeding different subsystems. One of them feeds image subsystem and is changeable based on image subsystem needs. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-13-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 22a1dfe93bf496d03cb1d76b1fbd23a7ff4a062c Author: Claudiu Beznea Date: Wed Jul 22 10:38:19 2020 +0300 clk: at91: clk-generated: add mux_table option Add mux table option. This is necessary for IP versions that has gaps in the range of available clock sources (e.g. SAMA7G5). Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-12-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 64c9247b9e87e96e41cea545eb64727cee10c55c Author: Claudiu Beznea Date: Wed Jul 22 10:38:18 2020 +0300 clk: at91: clk-generated: pass the id of changeable parent at registration Pass the ID of changeable parent at registration. This will allow the scalability of this clock driver with regards to the changeable parent ID for versions of this IP where changeable parent is not the last one in the parents list (e.g. SAMA7G5). With this the clock flags are set to zero in case we have no changeable parent. Also in clk_generated_best_diff() the *best_diff variable is check against tmp_diff variable using ">=" operator instead of ">" so that in case the requested frequency could be obtained using fix parents + gck dividers but the clock also supports changeable parent to be able to force the usage of the changeable parent. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-11-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 42324d953b38e74cf5cb05a02c81d4922a2ddcd5 Author: Claudiu Beznea Date: Wed Jul 22 10:38:17 2020 +0300 clk: at91: replace conditional operator with double logical not Replace conditional operator with double logical not as code may be simpler to read. Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-10-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit e1e3e7008a90f9ffe0161191bd64a4c06f0d417a Author: Claudiu Beznea Date: Wed Jul 22 10:38:16 2020 +0300 clk: at91: sckc: register slow_rc with accuracy option Chapter 57.7.5 of SAM9X60 datasheet specifies that the maximum drift of this oscillator is +- 3KHz. Use that value and the formula at [1] or the calculator at [2] to compute the PPB value. [1] https://www.everythingrf.com/rf-calculators/ppm-to-hz-calculator [2] https://www.changpuak.ch/electronics/ppm_to_Hz_converter.php Fixes: 04bcc4275e601 ("clk: at91: sckc: add support for SAM9X60") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-9-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 172e7ddeeafd95caa809b7b1a140bfd7f20597d9 Author: Claudiu Beznea Date: Wed Jul 22 10:38:15 2020 +0300 clk: at91: sam9x60: fix main rc oscillator frequency Main RC oscillator frequency is 12MHz according to datasheet (chapter 27.2). Fixes: 01e2113de9a52 ("clk: at91: add sam9x60 pmc driver") Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/1595403506-8209-8-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 35d06f74785cc8d108dcb1e3324b2404fb39df0b Author: Claudiu Beznea Date: Wed Jul 22 10:38:14 2020 +0300 clk: at91: sam9x60-pll: use frac when setting frequency In commit a436c2a447e59 ("clk: at91: add sam9x60 PLL driver") the fractional part of PLL wasn't set on registers but it was calculated and taken into account for determining div and mul (see sam9x60_pll_get_best_div_mul()). Fixes: a436c2a447e59 ("clk: at91: add sam9x60 PLL driver") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-7-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 390227dca870cd0b8b0961da9e293551015c0007 Author: Claudiu Beznea Date: Wed Jul 22 10:38:13 2020 +0300 clk: at91: sam9x60-pll: check fcore against ranges According to datasheet the range of 600-1200MHz is for the frequency generated by the fractional part of the PLL (namely Fcorepllck according to datasheet). With this in mind the output range of the PLL itself (fractional + div), taking into account that the divider is 8 bits wide, is 600/256-1200Hz=2.3-1200MHz. Fixes: a436c2a447e59 ("clk: at91: add sam9x60 PLL driver") Signed-off-by: Claudiu Beznea Link: https://lore.kernel.org/r/1595403506-8209-6-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 1bef0986b125942d65d39c10cbfa75b20c3b94b3 Author: Claudiu Beznea Date: Wed Jul 22 10:38:12 2020 +0300 clk: at91: sam9x60-pll: use logical or for range check Use logical or for range check. In case bestrate is not in characteristics->output[0].min..characteristics->output[0].max range we should return -ERANGE. Fixes: a436c2a447e59 ("clk: at91: add sam9x60 PLL driver") Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/1595403506-8209-5-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 3bf639a611a8deca7e4daa57a4df9ba4c6025249 Author: Claudiu Beznea Date: Wed Jul 22 10:38:11 2020 +0300 clk: at91: clk-sam9x60-pll: fix mul mask According to datasheet mul mask is on bits 31..24. Fixes: a436c2a447e59 ("clk: at91: add sam9x60 PLL driver") Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/1595403506-8209-4-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 83331bfcc021a24da79f38a2452e86182c7ae94b Author: Claudiu Beznea Date: Wed Jul 22 10:38:10 2020 +0300 clk: at91: clk-generated: check best_rate against ranges Check best_rate against available clock ranges. Fixes: df70aeef6083 ("clk: at91: add generated clock driver") Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/1595403506-8209-3-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 3a5c42b18a6ddc0de77dde017baf45262fbf1ced Author: Claudiu Beznea Date: Wed Jul 22 10:38:09 2020 +0300 clk: at91: clk-generated: continue if __clk_determine_rate() returns error __clk_determine_rate() may return error. Skip the current step in case of error. Fixes: 1a1a36d72e3d3 ("clk: at91: clk-generated: make gclk determine audio_pll rate") Signed-off-by: Claudiu Beznea Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/1595403506-8209-2-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd commit 153bc1c66a8814e621ca0483098ac722be860aaf Author: Ahmad Fatoum Date: Fri Jul 3 09:32:35 2020 +0200 clk: at91: fix possible dead lock in new drivers syscon_node_to_regmap() will make the created regmap get and enable the first clock it can parse from the device tree. This clock is not needed to access the registers and should not be enabled at that time. Use device_node_to_regmap to resolve this as it looks up the regmap in the same list but doesn't care about the clocks. This issue is detected by lockdep when booting the sama5d3 with a device tree containing the new clk bindings. This fix already happened in 6956eb33abb5 ("clk: at91: fix possible deadlock") for the drivers that had been migrated to the new clk binding back then. This does the same for the new drivers as well. Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver") Signed-off-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20200703073236.23923-1-a.fatoum@pengutronix.de Acked-by: Alexandre Belloni Signed-off-by: Stephen Boyd commit 0d10d17bac3d5d4e97d6f008aa3c329a83d3b283 Author: 周琰杰 (Zhou Yanjie) Date: Wed Jul 22 13:21:19 2020 +0800 MIPS: X2000: Add X2000 system type. 1.Add "PRID_COMP_INGENIC_13" and "PRID_IMP_XBURST2" for X2000. 2.Add X2000 system type for cat /proc/cpuinfo to give out X2000. Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Thomas Bogendoerfer commit e8b9fc10f2615b9a525fce56981e40b489528355 Author: Yu Kuai Date: Tue Jul 21 21:47:18 2020 +0800 MIPS: OCTEON: add missing put_device() call in dwc3_octeon_device_init() if of_find_device_by_node() succeed, dwc3_octeon_device_init() doesn't have a corresponding put_device(). Thus add put_device() to fix the exception handling for this function implementation. Fixes: 93e502b3c2d4 ("MIPS: OCTEON: Platform support for OCTEON III USB controller") Signed-off-by: Yu Kuai Signed-off-by: Thomas Bogendoerfer commit 03111b1088f18f93d38e888c41e8a1e6aba9f8bb Author: Mike Tipton Date: Mon Jun 29 17:30:24 2020 -0700 clk: Add support for enabling/disabling clocks from debugfs For test and debug purposes, it's simple enough to enable or disable clocks from shell. Add a new debugfs file 'clk_prepare_enable' that calls clk_prepare_enable() when writing "1" and clk_disable_unprepare() when writing "0". This can have security implications, so only support it when the code has been modified to #define CLOCK_ALLOW_WRITE_DEBUGFS. Signed-off-by: Mike Tipton Link: https://lore.kernel.org/r/20200630003024.6282-1-mdtipton@codeaurora.org [sboyd@kernel.org: Reword commit text and remove comment update] Signed-off-by: Stephen Boyd commit d310124cd99df5e5011d79f36a6d16d3452de348 Author: Rahul Tanwar Date: Thu Jul 16 14:30:32 2020 +0800 clk: intel: Avoid unnecessary memset by improving code memset can be avoided in a loop if the variables used are declared inside the loop. Move such variables declaration inside the loop to avoid memset. Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/26624b65d0e6b958c4765a406b9929d1a9ce1c2c.1594880946.git.rahul.tanwar@linux.intel.com [sboyd@kernel.org: Drop NULL assignment that is overwritten] Signed-off-by: Stephen Boyd commit c9e28fe649f76ee13a9bcc09f89ae0189f85801b Author: Rahul Tanwar Date: Thu Jul 16 14:30:31 2020 +0800 clk: intel: Improve locking in the driver Remove/reduce unnecessary spin locking of the code. Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/79c0f5f9f5bc512a7e2b5f3c91f6341f28b5854c.1594880946.git.rahul.tanwar@linux.intel.com Signed-off-by: Stephen Boyd commit 8529fc0aaa704c6618e69e8d35834aa977b6ece9 Author: Rahul Tanwar Date: Thu Jul 16 14:30:30 2020 +0800 clk: intel: Use devm_clk_hw_register() instead of clk_hw_register() To ensure that clks are unregistered in case of any failure, use devm_clk_hw_register() instead of clk_hw_register(). Signed-off-by: Rahul Tanwar Link: https://lore.kernel.org/r/7ef7009b4e9f986fd6dfbf487c0e85de68a4ba9b.1594880946.git.rahul.tanwar@linux.intel.com Signed-off-by: Stephen Boyd commit 9f7d5042a64160e20c73d734f9ed5dd8c6bba205 Author: Lori Hikichi Date: Fri Jun 12 15:52:12 2020 -0700 clk: iproc: round clock rate to the closest Change from 'DIV_ROUND_UP' to 'DIV_ROUND_CLOSEST' when calculating the clock divisor in the iProc ASIU clock driver to allow to get to the closest clock rate. Fixes: 5fe225c105fd ("clk: iproc: add initial common clock support") Signed-off-by: Lori Hikichi Signed-off-by: Ray Jui Link: https://lore.kernel.org/r/20200612225212.124301-1-ray.jui@broadcom.com Signed-off-by: Stephen Boyd commit 35546aeede8ee9f93b404eeb6caefb46ee211ae8 Author: Jiaxun Yang Date: Fri Jul 10 14:30:16 2020 +0800 MIPS: Retire kvm paravirt paravirt machine was introduced for Cavium's partial virtualization technology, however, it's host side support and QEMU support never landed in upstream. As Cavium was acquired by Marvel and they have no intention to maintain their MIPS product line, also paravirt is unlikely to be utilized by community users, it's time to retire it if nobody steps in to maintain it. Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 28f0769c772bb0c431e2833978474d4dfe3754a7 Author: Jonathan Marek Date: Thu Jul 9 09:52:42 2020 -0400 clk: qcom: Add graphics clock controller driver for SM8250 Add support for the graphics clock controller found on SM8250 based devices. This is initially copied from the downstream kernel, but has been modified to more closely match the upstream sc7180 driver. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-12-jonathan@marek.ca Signed-off-by: Stephen Boyd commit 0cef71f2ccc84dd85a60b312343f1973f149e2d3 Author: Jonathan Marek Date: Thu Jul 9 09:52:41 2020 -0400 clk: qcom: Add graphics clock controller driver for SM8150 Add support for the graphics clock controller found on SM8150 based devices. This is initially copied from the downstream kernel, but has been modified to more closely match the upstream sc7180 driver. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-11-jonathan@marek.ca Signed-off-by: Stephen Boyd commit 0638226dd0953c0c34f8df203b6c32d6066ceb65 Author: Jonathan Marek Date: Thu Jul 9 09:52:40 2020 -0400 clk: qcom: add common gdsc_gx_do_nothing_enable for gpucc drivers All gpucc drivers need this, so move it to common code instead of duplicating it in every gpucc driver. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-10-jonathan@marek.ca Signed-off-by: Stephen Boyd commit 324e0bfcfb005f161bbb31ea21ddad0f1bc8f400 Author: Jonathan Marek Date: Thu Jul 9 09:52:39 2020 -0400 dt-bindings: clock: add SM8250 QCOM Graphics clock bindings Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM8250 SoCs. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-9-jonathan@marek.ca Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 02f3effddfd04f3f08a24d23a82d1c1c6d89b777 Author: Lu Baolu Date: Fri Jul 24 09:49:25 2020 +0800 iommu/vt-d: Rename intel-pasid.h to pasid.h As Intel VT-d files have been moved to its own subdirectory, the prefix makes no sense. No functional changes. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20200724014925.15523-13-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 8b73712115ebd603b75876f7d96d59e41d9107ad Author: Lu Baolu Date: Fri Jul 24 09:49:24 2020 +0800 iommu/vt-d: Add page response ops support After page requests are handled, software must respond to the device which raised the page request with the result. This is done through the iommu ops.page_response if the request was reported to outside of vendor iommu driver through iommu_report_device_fault(). This adds the VT-d implementation of page_response ops. Co-developed-by: Jacob Pan Co-developed-by: Liu Yi L Signed-off-by: Jacob Pan Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20200724014925.15523-12-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit eb8d93ea3c1d35b0baf693dd0b7c87ec62358fc9 Author: Lu Baolu Date: Fri Jul 24 09:49:23 2020 +0800 iommu/vt-d: Report page request faults for guest SVA A pasid might be bound to a page table from a VM guest via the iommu ops.sva_bind_gpasid. In this case, when a DMA page fault is detected on the physical IOMMU, we need to inject the page fault request into the guest. After the guest completes handling the page fault, a page response need to be sent back via the iommu ops.page_response(). This adds support to report a page request fault. Any external module which is interested in handling this fault should regiester a notifier with iommu_register_device_fault_handler(). Co-developed-by: Jacob Pan Co-developed-by: Liu Yi L Signed-off-by: Jacob Pan Signed-off-by: Liu Yi L Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20200724014925.15523-11-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 19abcf70c2b16834a607db515b26a32b233c79eb Author: Lu Baolu Date: Fri Jul 24 09:49:22 2020 +0800 iommu/vt-d: Add a helper to get svm and sdev for pasid There are several places in the code that need to get the pointers of svm and sdev according to a pasid and device. Add a helper to achieve this for code consolidation and readability. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20200724014925.15523-10-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit dd6692f1b883bac46036000a1e3a0b3785f89e87 Author: Lu Baolu Date: Fri Jul 24 09:49:21 2020 +0800 iommu/vt-d: Refactor device_to_iommu() helper It is refactored in two ways: - Make it global so that it could be used in other files. - Make bus/devfn optional so that callers could ignore these two returned values when they only want to get the coresponding iommu pointer. Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20200724014925.15523-9-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit d315e9e684d1efd4cb2e8cd70b8d71dec02fcf1f Author: Jacob Pan Date: Fri Jul 24 09:49:20 2020 +0800 iommu/vt-d: Disable multiple GPASID-dev bind For the unlikely use case where multiple aux domains from the same pdev are attached to a single guest and then bound to a single process (thus same PASID) within that guest, we cannot easily support this case by refcounting the number of users. As there is only one SL page table per PASID while we have multiple aux domains thus multiple SL page tables for the same PASID. Extra unbinding guest PASID can happen due to race between normal and exception cases. Termination of one aux domain may affect others unless we actively track and switch aux domains to ensure the validity of SL page tables and TLB states in the shared PASID entry. Support for sharing second level PGDs across domains can reduce the complexity but this is not available due to the limitations on VFIO container architecture. We can revisit this decision once sharing PGDs are available. Overall, the complexity and potential glitch do not warrant this unlikely use case thereby removed by this patch. Fixes: 56722a4398a30 ("iommu/vt-d: Add bind guest PASID support") Signed-off-by: Liu Yi L Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu Reviewed-by: Eric Auger Cc: Kevin Tian Link: https://lore.kernel.org/r/20200724014925.15523-8-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 1ff00279655d95ae9c285c39878aedf9ff008d25 Author: Jacob Pan Date: Fri Jul 24 09:49:19 2020 +0800 iommu/vt-d: Warn on out-of-range invalidation address For guest requested IOTLB invalidation, address and mask are provided as part of the invalidation data. VT-d HW silently ignores any address bits below the mask. SW shall also allow such case but give warning if address does not align with the mask. This patch relax the fault handling from error to warning and proceed with invalidation request with the given mask. Fixes: 6ee1b77ba3ac0 ("iommu/vt-d: Add svm/sva invalidate function") Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20200724014925.15523-7-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 0fa1a15fa9b37be3899d7fec552c77b67baa8ac7 Author: Liu Yi L Date: Fri Jul 24 09:49:18 2020 +0800 iommu/vt-d: Fix devTLB flush for vSVA For guest SVA usage, in order to optimize for less VMEXIT, guest request of IOTLB flush also includes device TLB. On the host side, IOMMU driver performs IOTLB and implicit devTLB invalidation. When PASID-selective granularity is requested by the guest we need to derive the equivalent address range for devTLB instead of using the address information in the UAPI data. The reason for that is, unlike IOTLB flush, devTLB flush does not support PASID-selective granularity. This is to say, we need to set the following in the PASID based devTLB invalidation descriptor: - entire 64 bit range in address ~(0x1 << 63) - S bit = 1 (VT-d CH 6.5.2.6). Without this fix, device TLB flush range is not set properly for PASID selective granularity. This patch also merged devTLB flush code for both implicit and explicit cases. Fixes: 6ee1b77ba3ac ("iommu/vt-d: Add svm/sva invalidate function") Signed-off-by: Liu Yi L Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20200724014925.15523-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 288d08e78008828416ffaa85ef274b4e29ef3dae Author: Liu Yi L Date: Fri Jul 24 09:49:17 2020 +0800 iommu/vt-d: Handle non-page aligned address Address information for device TLB invalidation comes from userspace when device is directly assigned to a guest with vIOMMU support. VT-d requires page aligned address. This patch checks and enforce address to be page aligned, otherwise reserved bits can be set in the invalidation descriptor. Unrecoverable fault will be reported due to non-zero value in the reserved bits. Fixes: 61a06a16e36d8 ("iommu/vt-d: Support flushing more translation cache types") Signed-off-by: Liu Yi L Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20200724014925.15523-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit f793e45494586f742410f17539f1ea4156ea7bf9 Author: Jonathan Marek Date: Thu Jul 9 09:52:38 2020 -0400 dt-bindings: clock: add SM8150 QCOM Graphics clock bindings Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM8150 SoCs. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-8-jonathan@marek.ca Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit e7e69461a83264dbce2b4ff480f858f3f1454db7 Author: Jacob Pan Date: Fri Jul 24 09:49:16 2020 +0800 iommu/vt-d: Fix PASID devTLB invalidation DevTLB flush can be used for both DMA request with and without PASIDs. The former uses PASID#0 (RID2PASID), latter uses non-zero PASID for SVA usage. This patch adds a check for PASID value such that devTLB flush with PASID is used for SVA case. This is more efficient in that multiple PASIDs can be used by a single device, when tearing down a PASID entry we shall flush only the devTLB specific to a PASID. Fixes: 6f7db75e1c46 ("iommu/vt-d: Add second level page table") Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20200724014925.15523-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 78df6c86f0691f5b6e325006aeb470de443351ea Author: Jacob Pan Date: Fri Jul 24 09:49:15 2020 +0800 iommu/vt-d: Remove global page support in devTLB flush Global pages support is removed from VT-d spec 3.0 for dev TLB invalidation. This patch is to remove the bits for vSVA. Similar change already made for the native SVA. See the link below. Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu Reviewed-by: Eric Auger Link: https://lore.kernel.org/linux-iommu/20190830142919.GE11578@8bytes.org/T/ Link: https://lore.kernel.org/r/20200724014925.15523-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 5f77d6ca5ca74e4b4a5e2e010f7ff50c45dea326 Author: Liu Yi L Date: Fri Jul 24 09:49:14 2020 +0800 iommu/vt-d: Enforce PASID devTLB field mask Set proper masks to avoid invalid input spillover to reserved bits. Signed-off-by: Liu Yi L Signed-off-by: Jacob Pan Signed-off-by: Lu Baolu Reviewed-by: Eric Auger Link: https://lore.kernel.org/r/20200724014925.15523-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 23e2653ee649125d1fddd1b16c2d2ca95c684631 Author: Jonathan Marek Date: Thu Jul 9 09:52:37 2020 -0400 dt-bindings: clock: combine qcom,sdm845-gpucc and qcom,sc7180-gpucc These two bindings are almost identical, so combine them into one. This will make it easier to add the sm8150 and sm8250 gpucc bindings. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-7-jonathan@marek.ca Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit 3f6b25062587cd18ef01bf67ca67e601e6abde94 Author: Jonathan Marek Date: Thu Jul 9 09:52:36 2020 -0400 clk: qcom: gcc: remove unnecessary vco_table from SM8150 The fixed alpha pll ops only use it for clamping in round_rate, which is unnecessary. This is consistent with SM8250 GCC not using vco_table. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-6-jonathan@marek.ca Signed-off-by: Stephen Boyd commit d28b503c248df8a3b4c73b504a043bdf7e2d5207 Author: Jonathan Marek Date: Thu Jul 9 09:52:35 2020 -0400 clk: qcom: clk-alpha-pll: use the right PCAL_DONE value for lucid pll Lucid PCAL_DONE is different from trion. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-5-jonathan@marek.ca Signed-off-by: Stephen Boyd commit 0b01489475c655f8ccce8fa13cc4088954ac5503 Author: Jonathan Marek Date: Thu Jul 9 09:52:34 2020 -0400 clk: qcom: clk-alpha-pll: same regs and ops for trion and lucid Fixed ops were already identical, this adds support for non-fixed ops by sharing between trion and lucid. This also changes the names for trion ops to be consistent with the rest. Note LUCID_PCAL_DONE is renamed to TRION_PCAL_DONE because it is wrong for lucid, LUCID_PCAL_DONE should be BIT(27). Next patch will address this. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-4-jonathan@marek.ca Signed-off-by: Stephen Boyd commit 0059a9081ac37b4513c98ce443b03c1b1f196810 Author: Lyude Paul Date: Mon Jul 20 16:56:56 2020 -0400 drm/nouveau/kms/nv50-: Fix CRC-related compile errors with debugfs disabled Looks like I made the mistake of forgetting to check whether or not this would build without CONFIG_DEBUG_FS, as the Kbuild bot reported some issues building with tegra_defconfig: In file included from drivers/gpu/drm/nouveau/nouveau_display.c:47: ./drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_head_crc_late_register’: ./drivers/gpu/drm/nouveau/dispnv50/crc.h:106:47: error: parameter name omitted 106 | static inline int nv50_head_crc_late_register(struct nv50_head *) {} | ^~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h:106:54: warning: no return statement in function returning non-void [-Wreturn-type] 106 | static inline int nv50_head_crc_late_register(struct nv50_head *) {} | ^~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_handle_vblank’: ./drivers/gpu/drm/nouveau/dispnv50/crc.h:108:57: warning: ‘return’ with a value, in function returning void [-Wreturn-type] 108 | nv50_crc_handle_vblank(struct nv50_head *head) { return 0; } | ^ ./drivers/gpu/drm/nouveau/dispnv50/crc.h:108:1: note: declared here 108 | nv50_crc_handle_vblank(struct nv50_head *head) { return 0; } | ^~~~~~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_check’: ./drivers/gpu/drm/nouveau/dispnv50/crc.h:111:23: error: parameter name omitted 111 | nv50_crc_atomic_check(struct nv50_head *, struct nv50_head_atom *, | ^~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h:111:43: error: parameter name omitted 111 | nv50_crc_atomic_check(struct nv50_head *, struct nv50_head_atom *, | ^~~~~~~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h:112:9: error: parameter name omitted 112 | struct nv50_head_atom *) {} | ^~~~~~~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h:112:16: warning: no return statement in function returning non-void [-Wreturn-type] 112 | struct nv50_head_atom *) {} | ^~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_stop_reporting’: ./drivers/gpu/drm/nouveau/dispnv50/crc.h:114:32: error: parameter name omitted 114 | nv50_crc_atomic_stop_reporting(struct drm_atomic_state *) {} | ^~~~~~~~~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_prepare_notifier_contexts’: ./drivers/gpu/drm/nouveau/dispnv50/crc.h:116:43: error: parameter name omitted 116 | nv50_crc_atomic_prepare_notifier_contexts(struct drm_atomic_state *) {} | ^~~~~~~~~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_start_reporting’: ./drivers/gpu/drm/nouveau/dispnv50/crc.h:118:33: error: parameter name omitted 118 | nv50_crc_atomic_start_reporting(struct drm_atomic_state *) {} | ^~~~~~~~~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_set’: ./drivers/gpu/drm/nouveau/dispnv50/crc.h:120:21: error: parameter name omitted 120 | nv50_crc_atomic_set(struct nv50_head *, struct nv50_head_atom *) {} | ^~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h:120:41: error: parameter name omitted 120 | nv50_crc_atomic_set(struct nv50_head *, struct nv50_head_atom *) {} | ^~~~~~~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/nouveau/dispnv50/crc.h: In function ‘nv50_crc_atomic_clr’: ./drivers/gpu/drm/nouveau/dispnv50/crc.h:122:21: error: parameter name omitted 122 | nv50_crc_atomic_clr(struct nv50_head *) {} | ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm/nouveau/nouveau_display.c: In function ‘nouveau_framebuffer_new’: drivers/gpu/drm/nouveau/nouveau_display.c:286:15: warning: variable ‘width’ set but not used [-Wunused-but-set-variable] 286 | unsigned int width, height, i; | ^~~~~ So, fix the inline function declarations we use in drm/drivers/gpu/drm/nouveau/dispnv50/crc.h when CONFIG_DEBUG_FS is enabled. Fixes: 12885ecbfe62 ("drm/nouveau/kms/nvd9-: Add CRC support") Reported-by: kernel test robot Signed-off-by: Lyude Paul Signed-off-by: Ben Skeggs commit 2bd43e0ad0f06bb902579294849194a818a0ff96 Author: Ben Skeggs Date: Wed Jul 22 17:21:59 2020 +1000 drm/nouveau/fence: use NVIDIA's headers for read() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 40f1171e7c26e57d71aa2800fb8ad213b4efb09c Author: Ben Skeggs Date: Mon Jul 20 11:19:26 2020 +1000 drm/nouveau/fence: use NVIDIA's headers for sync() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 60cdadace3208001b4e24a1a4b102f767d5df3c2 Author: Ben Skeggs Date: Mon Jul 20 11:19:14 2020 +1000 drm/nouveau/fence: use NVIDIA's headers for emit() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit c47fceca2ef3718cee09bbf2941de44b3701c873 Author: Ben Skeggs Date: Mon Jun 22 19:27:00 2020 +1000 drm/nouveau/svm: use NVIDIA's headers for migrate_clear() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 66c3bdd4e7fa248c188478e05dbe74ab342732e6 Author: Ben Skeggs Date: Mon Jun 22 19:16:31 2020 +1000 drm/nouveau/svm: use NVIDIA's headers for migrate_copy() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 6c75137274b050e9baaa5b2904b165a49c671273 Author: Ben Skeggs Date: Mon Jun 22 17:07:31 2020 +1000 drm/nouveau/bo: use NVIDIA's headers for move move() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit e767835a52cd6d427a4ab6941118e530cbfa638c Author: Ben Skeggs Date: Mon Jun 22 16:29:45 2020 +1000 drm/nouveau/bo: use NVIDIA's headers for move init() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit a38f83d9014d14b7c6d0b53fd669b62684a11059 Author: Ben Skeggs Date: Mon Jun 22 14:27:41 2020 +1000 drm/nouveau/fbcon/nv50-: use NVIDIA's headers for fillrect() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 95b1469e5cbaad02bc48043d4e159c6562b556b4 Author: Ben Skeggs Date: Mon Jun 22 14:16:03 2020 +1000 drm/nouveau/fbcon/nv50-: use NVIDIA's headers for copyarea() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit c7acff989428533f5877f02f57c97743ece6f1f0 Author: Ben Skeggs Date: Mon Jun 22 14:12:07 2020 +1000 drm/nouveau/fbcon/nv50-: use NVIDIA's headers for imageblit() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 5755b1eac0192fb50b69cd40e48078907628f915 Author: Ben Skeggs Date: Mon Jul 20 07:59:22 2020 +1000 drm/nouveau/fbcon/nv50-: use NVIDIA's headers for accel_init() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 1fad04ceef14eed22a8f52fab9ff9ab031f24057 Author: Ben Skeggs Date: Mon Jul 20 09:49:39 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core crc_set_ctx() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 6162638e196f8cf46cc63cb0f5327f7c6ae7d62b Author: Ben Skeggs Date: Mon Jul 20 07:56:31 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core crc_set_src() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit c854bf9464500d195f1a1a2c79ef887291b9300b Author: Ben Skeggs Date: Sun Jun 21 12:46:31 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_or() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 29ace860ecdf716164d9059545bbaae14cced901 Author: Ben Skeggs Date: Sun Jun 21 12:40:59 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_procamp() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit f801efb127ad02e2cc6ddb1bf1e30bfe001fb4fe Author: Ben Skeggs Date: Sun Jun 21 12:35:48 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_dither() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit c8b9002f44e4a1d2771b2f59f6de900864b1f9d7 Author: Jonathan Marek Date: Thu Jul 9 09:52:33 2020 -0400 clk: qcom: clk-alpha-pll: remove unused/incorrect PLL_CAL_VAL 0x44 isn't a register offset, it is the value that goes into CAL_L_VAL. Fixes: 548a909597d5 ("clk: qcom: clk-alpha-pll: Add support for Trion PLLs") Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-3-jonathan@marek.ca Signed-off-by: Stephen Boyd commit 35cefc538be76348dcd04378cef626b7c76f156e Author: Ben Skeggs Date: Sun Jun 21 12:31:42 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_ovly() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 2aa934ca04bc93e7cf5133cb44a751be13b9df9e Author: Ben Skeggs Date: Sun Jun 21 12:31:24 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_base() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 916722fce5a25a1ffefac616f8f0213de9ce0353 Author: Ben Skeggs Date: Sun Jun 21 12:16:24 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_curs_clr() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit ed0b86a90bf91d0c41f6b373befd2ce98658b49e Author: Ben Skeggs Date: Sun Jun 21 12:10:42 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_curs_set() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit dbb23f544e9c0dd364fd5e3a027c8aebe9dae75e Author: Ben Skeggs Date: Sun Jun 21 11:59:54 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_core_clr() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 1302634f793110fc272f9de4568164737c2539cd Author: Ben Skeggs Date: Sun Jun 21 11:59:09 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_core_set() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit a66a096d784843f6d4c8e4c0b028524baf747f4c Author: Ben Skeggs Date: Sun Jun 21 11:47:21 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_olut_clr() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit a41ef363f5e8a1608d5dd970aa706601145a142f Author: Ben Skeggs Date: Sun Jun 21 11:44:39 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_olut_set() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit c4c751885efb951a65f3a4df123fe08464dddbba Author: Ben Skeggs Date: Sun Jun 21 11:25:06 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_mode() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit fb3939e232f6120387f20a26510894a17680db3a Author: Ben Skeggs Date: Sun Jun 21 10:55:21 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core head_view() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit ca31b0c01a2759d5ac40695e51287962e08826fe Author: Ben Skeggs Date: Sun Jun 21 17:40:51 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_get_caps() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 344c2e5a47960a95ef0504d8f0852005d1e199f0 Author: Ben Skeggs Date: Sat Jun 20 18:09:59 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core or_ctrl() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 8e650ecbcd5d769afa03618cb4c7f4a21498ecd5 Author: Ben Skeggs Date: Sat Jun 20 17:59:39 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core wndw_owner() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 2806280a0cd7b9b2fb97fa5fbd5ae69a8f4d46a1 Author: Ben Skeggs Date: Sat Jun 20 17:39:00 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core update() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 4daef27cb802d3425dee3ef712cb4c0f013e2b71 Author: Ben Skeggs Date: Sun Jun 21 17:24:27 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core ntfy_wait_done() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit d8b24526ef68059b91b4c2ea6c4ff8a0e39eb926 Author: Ben Skeggs Date: Sat Jun 20 17:55:22 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core caps_init() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 38a323b0076c4c0fa330c92751967ef51936588d Author: Ben Skeggs Date: Sun Jun 21 17:21:16 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core ntfy_init() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit b11d8ca151d08e9ce8f0d8fa3cac561a7e76cf63 Author: Ben Skeggs Date: Sat Jun 20 17:51:49 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for core init() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 9f7ffb49ee6b80a339191a8c282fdf1c89fc01f7 Author: Ben Skeggs Date: Sat Jun 20 15:53:59 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw update() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit fbc318bdbb43a151b4f60ff3b86d577daeb63791 Author: Ben Skeggs Date: Sat Jun 20 15:46:52 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw blend_set() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 5329dbd4a3bf97a96c54fe46cba9c604d932bb14 Author: Ben Skeggs Date: Sat Jun 20 14:24:57 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw scale_set() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 1070832b1eab7309c59d9564ed26f84932fed817 Author: Ben Skeggs Date: Sat Jun 20 14:21:59 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_clr() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit f844eb485eb056ad3b67e49f95cbc6c685a73db4 Author: Ben Skeggs Date: Sat Jun 20 13:08:47 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw image_set() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 66f7b7bddfe60a708c7711e47c95d20db05e2110 Author: Ben Skeggs Date: Sat Jun 20 11:58:58 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw xlut_clr() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 6833d2a0c778252929805fabfdc89e4e181fcb82 Author: Ben Skeggs Date: Sat Jun 20 11:52:44 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw xlut_set() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 2740edb3c640e7a13fdfe752bb17154fd824f28d Author: Ben Skeggs Date: Sat Jun 20 11:36:58 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw csc_clr() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 84e1d06b06777d76a420d4e5eff5ab1c178bd77a Author: Ben Skeggs Date: Sat Jun 20 11:35:28 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw csc_set() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 75bd8304e61c01d2bc5df46fcf9c2e9838b3a246 Author: Ben Skeggs Date: Sun Jun 21 17:12:19 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw ntfy_wait_begun() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 9562e564abbf3670c5e7dc9b1fcf8d853fb9d850 Author: Ben Skeggs Date: Sat Jun 20 11:26:49 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw ntfy_clr() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit d4793bc39f03b7016667779d35a591b4850c9914 Author: Ben Skeggs Date: Sat Jun 20 11:25:25 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw ntfy_set() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 0ecaefc14423b86f1fe7b5eda1cc1da001da982b Author: Ben Skeggs Date: Sun Jun 21 17:04:16 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw ntfy_reset() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 941522b7fe641c276b3dcc430f34908a26b64789 Author: Ben Skeggs Date: Sat Jun 20 11:17:59 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw sema_clr() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit fccc858003f3f3e7a8fa272f118eb71d218a2b32 Author: Ben Skeggs Date: Sat Jun 20 10:24:41 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw sema_set() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 852dfbde915cb68e577e6e2cac9b3db08a4f81c7 Author: Ben Skeggs Date: Sun Jun 21 10:36:33 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wimm update() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 937014086af8a09caf0f61353aba8884dfa54699 Author: Ben Skeggs Date: Sun Jun 21 10:25:58 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wimm point() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 2a0d40bbd6880f680c7f879a40bdc6d99fc8d70a Author: Ben Skeggs Date: Mon Jun 22 09:18:57 2020 +1000 drm/nouveau/kms/nv50-: use NVIDIA's headers for wimm space() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 2f5bfd1c0aad53d7033950f0c8b7a142ddeb0827 Author: Ben Skeggs Date: Mon Jun 22 20:26:07 2020 +1000 drm/nouveau/fence: convert sync() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 7aa638cfdb285946f989ac1e132e9c3378f26db6 Author: Ben Skeggs Date: Mon Jun 22 20:18:06 2020 +1000 drm/nouveau/fence: convert emit() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 183b70bbdf61c89afa4aa5945a5cda85d005a2ed Author: Ben Skeggs Date: Mon Jun 22 20:01:38 2020 +1000 drm/nouveau/gem: convert indirect pushbufs to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit cd346a89d249a045f23aac28b9cc61db5f4d34d9 Author: Ben Skeggs Date: Mon Jun 22 19:54:50 2020 +1000 drm/nouveau/chan: convert nvsw init to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 0d2bdf2b0a73170cf7bc814aa44852a1d37387da Author: Ben Skeggs Date: Mon Jun 22 19:51:21 2020 +1000 drm/nouveau: convert nvsw init to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 2bf00037c47f3252b75de3cc15da247c61d16fce Author: Ben Skeggs Date: Mon Jun 22 19:48:59 2020 +1000 drm/nouveau/kms/nv04-: no need for multiple nvsw objects Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit c548b25cab50883082cc10dcb2f81dfdc4aef3be Author: Ben Skeggs Date: Mon Jun 22 19:39:36 2020 +1000 drm/nouveau/kms/nv04: convert page_flip() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 105f756c503846442537016dedeab0e433820041 Author: Ben Skeggs Date: Mon Jun 22 19:36:18 2020 +1000 drm/nouveau/kms/nv04: convert page_flip_emit() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 44517aa8d787243dad59c0b55131ae4b6dc100f7 Author: Ben Skeggs Date: Mon Jun 22 19:04:55 2020 +1000 drm/nouveau/svm: convert migrate_clear to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 71e741ad124d07b15d7f1cd481f98d69867ca0a2 Author: Ben Skeggs Date: Mon Jun 22 19:04:43 2020 +1000 drm/nouveau/svm: convert migrate_copy to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit fe4249afd6a94363e2ef7334d5257171da474bb6 Author: Ben Skeggs Date: Mon Jun 22 16:20:32 2020 +1000 drm/nouveau/bo: convert move move() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 01c43a66eb7aac48b3a978158cfb45674b18a48e Author: Ben Skeggs Date: Mon Jun 22 15:54:52 2020 +1000 drm/nouveau/bo: convert move init() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 8b9d5d63a7193156b6b397c4f5078efbc200695f Author: Ben Skeggs Date: Mon Jun 22 15:37:19 2020 +1000 drm/nouveau/bo: split buffer move functions into their own source files Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit a535aa677521f63acbca3804ae42e062a912add0 Author: Ben Skeggs Date: Mon Jun 22 11:31:45 2020 +1000 drm/nouveau/fbcon: convert copyarea() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 9ec525729f59e2885e6f06f6c1cd56665d519b1b Author: Ben Skeggs Date: Mon Jun 22 11:31:56 2020 +1000 drm/nouveau/fbcon: convert fillrect() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 1d04a64a0a7a0ae5162ce42f27cfad37f6bc60ee Author: Ben Skeggs Date: Mon Jun 22 11:22:28 2020 +1000 drm/nouveau/fbcon: convert imageblit() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit d9a91300ae21bb886b05014cfb1a3ad0dfff04b8 Author: Ben Skeggs Date: Mon Jun 22 11:08:51 2020 +1000 drm/nouveau/fbcon: convert accel_init() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit fdb06e2b2a18b3650526857ccb1ea95333282b90 Author: Ben Skeggs Date: Sat Jul 18 18:06:30 2020 +1000 drm/nouveau: interop with new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 0a96099691c8cd1ac0744ef30b6846869dc2b566 Author: Ben Skeggs Date: Tue Jul 21 11:34:07 2020 +1000 drm/nouveau/kms/nv50-: implement proper push buffer control logic We had a, what was supposed to be temporary, hack in the KMS code where we'd completely drain an EVO/NVD channel's push buffer when wrapping to the start again, instead of treating it as a ring buffer. Let's fix that, finally. Signed-off-by: Ben Skeggs commit ae09163ac27ce7d576d7bd2e941eacaef8d491c1 Author: Ben Skeggs Date: Sat Jul 18 17:42:27 2020 +1000 drm/nouveau/kms/nv50-: convert core crc_set_ctx() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit c4b27bc8682c5d919a7e95c7cb3e2021d8b37c92 Author: Ben Skeggs Date: Sat Jul 18 17:39:15 2020 +1000 drm/nouveau/kms/nv50-: convert core crc_set_src() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit ff37116ea421ed62e99e310b793214f95f1f8eb0 Author: Ben Skeggs Date: Sun Jun 21 09:28:36 2020 +1000 drm/nouveau/kms/nv50-: convert core head_or() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 246db5fd38b934fb6aefc31172e3afc3e613d20d Author: Ben Skeggs Date: Sun Jun 21 09:25:19 2020 +1000 drm/nouveau/kms/nv50-: convert core head_procamp() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 2f819f2be061c984005020f8dc45aee1e6af19a4 Author: Ben Skeggs Date: Sun Jun 21 09:22:47 2020 +1000 drm/nouveau/kms/nv50-: convert core head_dither() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit db2a20693ef9e3cd1d7a2b6c5695f572b29b1251 Author: Ben Skeggs Date: Sun Jun 21 09:20:29 2020 +1000 drm/nouveau/kms/nv50-: convert core head_ovly() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 93f7f054574271a9254d90e2906a34520d59b722 Author: Ben Skeggs Date: Sun Jun 21 09:19:28 2020 +1000 drm/nouveau/kms/nv50-: convert core head_base() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit bc5af56a8f184dd8acdaa7faea245cdf677f4a03 Author: Ben Skeggs Date: Sun Jun 21 09:17:11 2020 +1000 drm/nouveau/kms/nv50-: convert core head_curs_clr() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 9549c14b32295a483bbd7604c46aa7b7f2bc0a8b Author: Ben Skeggs Date: Sun Jun 21 09:14:25 2020 +1000 drm/nouveau/kms/nv50-: convert core head_curs_set() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit aabe253e382444996a20463c6822e8f6a0343b60 Author: Ben Skeggs Date: Sun Jun 21 09:07:28 2020 +1000 drm/nouveau/kms/nv50-: convert core head_core_clr() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit a38870a21c16a6acf0c7827905be072b0785ae9c Author: Ben Skeggs Date: Sun Jun 21 09:06:18 2020 +1000 drm/nouveau/kms/nv50-: convert core head_core_set() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 4fbf03a32fd8625749059b21a1b3e6501d4912d4 Author: Ben Skeggs Date: Sun Jun 21 09:00:52 2020 +1000 drm/nouveau/kms/nv50-: convert core head_olut_clr() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit a5df76301caedcb60bc5db6909547391277e7950 Author: Ben Skeggs Date: Sun Jun 21 08:58:11 2020 +1000 drm/nouveau/kms/nv50-: convert core head_olut_set() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit caa966a7a6e57c61181e38de34d145df76a4f00b Author: Ben Skeggs Date: Sun Jun 21 08:51:03 2020 +1000 drm/nouveau/kms/nv50-: convert core head_mode() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 1f772f5a08b28fd3d6fc385af70133952a202725 Author: Ben Skeggs Date: Sat Jun 20 18:34:00 2020 +1000 drm/nouveau/kms/nv50-: convert core head_view() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 9ec5e8204053a46f9e0b6107844641eb4b3426a4 Author: Ben Skeggs Date: Sat Jun 20 17:20:39 2020 +1000 drm/nouveau/kms/nv50-: convert core or_ctrl() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit b505935e56b299a82e153ddd4cacebb8fc9697ec Author: Ben Skeggs Date: Sat Jun 20 17:12:16 2020 +1000 drm/nouveau/kms/nv50-: convert core wndw_owner() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 203f6eaf4182bce0031888c5b7505750b8836758 Author: Ben Skeggs Date: Sat Jun 20 17:10:46 2020 +1000 drm/nouveau/kms/nv50-: convert core update() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 3c43c362b3a50a0e7d2cd5d6dc721a74d9e27694 Author: Ben Skeggs Date: Sat Jun 20 17:06:41 2020 +1000 drm/nouveau/kms/nv50-: convert core caps_init() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 5e691222eac66e730e0fa6bd10e7564f3db202d5 Author: Ben Skeggs Date: Sat Jun 20 17:04:57 2020 +1000 drm/nouveau/kms/nv50-: convert core init() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 3afb4db782a3bf4e6f14912d7aeb534264d2d2e3 Author: Ben Skeggs Date: Sat Jun 20 09:32:58 2020 +1000 drm/nouveau/kms/nv50-: convert wndw update() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 85bdfcd4358832fd7185b27343ad305bf78b4269 Author: Ben Skeggs Date: Sat Jun 20 09:25:55 2020 +1000 drm/nouveau/kms/nv50-: convert wndw blend_set() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 0a4693e80dc9a57f2133439e58a697f2d7730c4d Author: Ben Skeggs Date: Sat Jun 20 09:24:21 2020 +1000 drm/nouveau/kms/nv50-: convert wndw scale_set() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 8944d8b37ac9eecfff5706e9a11d5fcb3df64dbb Author: Ben Skeggs Date: Sat Jun 20 09:23:10 2020 +1000 drm/nouveau/kms/nv50-: convert wndw image_clr() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 6d6e11e2844015a5f6c3d0373966fd4a459add8b Author: Ben Skeggs Date: Sat Jun 20 09:20:17 2020 +1000 drm/nouveau/kms/nv50-: convert wndw image_set() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 34838908f62a0160d2c12c12be6c3be910d17b85 Author: Ben Skeggs Date: Sat Jun 20 08:50:50 2020 +1000 drm/nouveau/kms/nv50-: convert wndw xlut_clr() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 222439ebe6d4ec94b013968b07334a55612f641b Author: Ben Skeggs Date: Sat Jun 20 08:47:20 2020 +1000 drm/nouveau/kms/nv50-: convert wndw xlut_set() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit cfb4120dae34538e0ac14c9f972d4b3b80159224 Author: Ben Skeggs Date: Sat Jun 20 08:44:11 2020 +1000 drm/nouveau/kms/nv50-: convert wndw csc_clr() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 72587dca9658a0428518e658247c4490a0e0a09f Author: Ben Skeggs Date: Sat Jun 20 08:39:21 2020 +1000 drm/nouveau/kms/nv50-: convert wndw csc_set() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit bcae99c282aad70d5aaf7b34f878c465a675089e Author: Ben Skeggs Date: Sat Jun 20 08:32:28 2020 +1000 drm/nouveau/kms/nv50-: convert wndw ntfy_clr() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit fe8a2eec7dd654636102dfe348aa9d37971133be Author: Ben Skeggs Date: Sat Jun 20 08:29:31 2020 +1000 drm/nouveau/kms/nv50-: convert wndw ntfy_set() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit c686051a5a01ed7d14ff652229af02c545d9895c Author: Ben Skeggs Date: Sat Jun 20 08:04:01 2020 +1000 drm/nouveau/kms/nv50-: convert wndw sema_clr() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 34cf8cae288e3d2cee08ab17fe458aec636d9def Author: Ben Skeggs Date: Sat Jun 20 07:57:12 2020 +1000 drm/nouveau/kms/nv50-: convert wndw sema_set() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 9659be21e8034528839216b21794da73fdbedec2 Author: Ben Skeggs Date: Sun Jun 21 10:22:35 2020 +1000 drm/nouveau/kms/nv50-: convert wimm update() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit bea8395ccf175b599fd3e36df56dd8a67adcea9e Author: Ben Skeggs Date: Sun Jun 21 10:19:40 2020 +1000 drm/nouveau/kms/nv50-: convert wimm point() to new push macros Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 2853ccf09255aa7eb7122dd8816dedfd0f5d3724 Author: Ben Skeggs Date: Sat Jun 20 07:52:26 2020 +1000 drm/nouveau/kms/nv50-: wrap existing command submission in nvif_push interface This commit pulls in a bunch of new push buffer macros which are able to support NVIDIA's class headers, and provide more useful debug output and error checking (compile-time, where possible) than we had previously. Will incrementally transition each function over to the unified interfaces. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 3e176fd0600439a8a1e0b3e95e2f0545660ab59c Author: Ben Skeggs Date: Mon Jun 29 20:49:15 2020 +1000 drm/nouveau/nvif: add support for object-level debug output Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit f7a7d22ad6781a34ffc718865700883d3cbf6c06 Author: Ben Skeggs Date: Mon Jun 8 14:47:37 2020 +1000 drm/nouveau/nvif: give every notify object a human-readable name Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 54d44bfc56308d105b0da37392d8398bdc9d4745 Author: Ben Skeggs Date: Mon Mar 30 14:03:20 2020 +1000 drm/nouveau/nvif: give every disp object a human-readable identifier Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 64a0f59ab12467ace3e86b98ca47255827049d02 Author: Ben Skeggs Date: Mon Mar 30 14:01:57 2020 +1000 drm/nouveau/nvif: give every usermode object a human-readable identifier Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 45faf3d7b64ff0abfce735d4b2cd2f2edd357485 Author: Ben Skeggs Date: Mon Mar 30 13:59:39 2020 +1000 drm/nouveau/nvif: give every vmm object a human-readable identifier Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit e79c9a0ba5e7e0905d191f5d75e5ead50776c64a Author: Ben Skeggs Date: Mon Mar 30 13:56:55 2020 +1000 drm/nouveau/nvif: give every mem object a human-readable identifier Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 667f39b59b494d96ae70f4217637db2ebbee3df0 Author: Jonathan Marek Date: Thu Jul 9 09:52:32 2020 -0400 clk: qcom: gcc: fix sm8150 GPU and NPU clocks Fix the parents and set BRANCH_HALT_SKIP. From the downstream driver it should be a 500us delay and not skip, however this matches what was done for other clocks that had 500us delay in downstream. Fixes: f73a4230d5bb ("clk: qcom: gcc: Add GPU and NPU clocks for SM8150") Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200709135251.643-2-jonathan@marek.ca Signed-off-by: Stephen Boyd commit b495396cc9ccf579e5c7bba47137c0f867ddf580 Author: Ben Skeggs Date: Mon Mar 30 13:51:38 2020 +1000 drm/nouveau/nvif: give every mmu object a human-readable identifier Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit bd21080eb6ca476cd64afbc3f8e5228a83080ddb Author: Ben Skeggs Date: Mon Mar 30 13:49:05 2020 +1000 drm/nouveau/nvif: give every device object a human-readable identifier Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 9ac596a4e875e28bb1fa4b2e00549fadfaf4784e Author: Ben Skeggs Date: Mon Mar 30 09:51:33 2020 +1000 drm/nouveau/nvif: give every object a human-readable identifier Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 6db25fb13abaec0c2f1fa876824bf3c2a9a3e1d4 Author: Ben Skeggs Date: Mon Mar 30 13:45:33 2020 +1000 drm/nouveau/nvif: rename client ctor/dtor Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul commit 188e905ce4fe53fa984fe57357679168f5d7a091 Author: Ben Skeggs Date: Fri Jul 24 10:13:21 2020 +1000 drm/nouveau/kms/tu102: set NVC57D_HEAD_SET_HEAD_USAGE_BOUNDS_UPSCALING_ALLOWED to TRUE Fixes issues when switching between scaling modes. Signed-off-by: Ben Skeggs commit f6e7393edefada6abf7d0b6cd3f81f09d2f22fbf Author: Gustavo A. R. Silva Date: Tue Jul 7 12:36:28 2020 -0500 drm/nouveau: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Ben Skeggs commit 7763d24f3ba0e5e30daf047cfa6e6bcfd9d7de75 Author: Ralph Campbell Date: Tue Jun 30 12:57:35 2020 -0700 drm/nouveau/vmm/gp100-: fix mapping 2MB sysmem pages The nvif_object_ioctl() method NVIF_VMM_V0_PFNMAP wasn't correctly setting the hardware specific GPU page table entries for 2MB sized pages. Fix this by adding functions to set and clear PD0 GPU page table entries. Signed-off-by: Ralph Campbell Signed-off-by: Ben Skeggs commit e5c7864f6297c2f6256369bff2f2ef9f1d5edd5e Author: Ralph Campbell Date: Mon Jun 22 16:38:54 2020 -0700 drm/nouveau/mmu: make nvkm_vmm_ctor() static The function nvkm_vmm_ctor() is not called outside of the file defining it, so make it static. Signed-off-by: Ralph Campbell Reviewed-by: John Hubbard Signed-off-by: Ben Skeggs commit 8f29432417b11039ef960ab18987c7d61b2b5396 Author: Aditya Pakki Date: Sat Jun 13 20:48:37 2020 -0500 drm/nouveau: fix reference count leak in nouveau_debugfs_strap_peek nouveau_debugfs_strap_peek() calls pm_runtime_get_sync() that increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki Signed-off-by: Ben Skeggs commit 990a1162986e8eff7ca18cc5a0e03b4304392ae2 Author: Aditya Pakki Date: Sat Jun 13 20:22:23 2020 -0500 drm/nouveau: Fix reference count leak in nouveau_connector_detect nouveau_connector_detect() calls pm_runtime_get_sync and in turn increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki Signed-off-by: Ben Skeggs commit a2cdf39536b0d21fb06113f5e16692513d7bcb9c Author: Aditya Pakki Date: Sat Jun 13 20:29:18 2020 -0500 drm/nouveau: fix reference count leak in nv50_disp_atomic_commit nv50_disp_atomic_commit() calls calls pm_runtime_get_sync and in turn increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki Signed-off-by: Ben Skeggs commit 659fb5f154c3434c90a34586f3b7aa1c39cf6062 Author: Aditya Pakki Date: Sat Jun 13 20:41:56 2020 -0500 drm/nouveau: fix multiple instances of reference count leaks On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki Signed-off-by: Ben Skeggs commit bfad51c7633325b5d4b32444efe04329d53297b2 Author: Aditya Pakki Date: Sat Jun 13 20:33:42 2020 -0500 drm/nouveau/drm/noveau: fix reference count leak in nouveau_fbcon_open nouveau_fbcon_open() calls calls pm_runtime_get_sync() that increments the reference count. In case of failure, decrement the ref count before returning the error. Signed-off-by: Aditya Pakki Signed-off-by: Ben Skeggs commit eddb04732992982169cd40068cd231e63b30065b Author: Ben Skeggs Date: Tue Jun 16 10:41:49 2020 +1000 drm/nouveau/sec2/gp102: allow module to load when LSFW is missing Signed-off-by: Ben Skeggs commit b9c246ad3b54c50c787409c37a5ccc2e940ac7a9 Author: Ben Skeggs Date: Tue Jun 16 11:30:04 2020 +1000 drm/nouveau/gr/gm200-: explicitly handle nofw Signed-off-by: Ben Skeggs commit 38fd546beb48afdefdcec2ce2c0e5beda71400a3 Author: Ben Skeggs Date: Tue Jun 16 15:26:20 2020 +1000 drm/nouveau/pmu/gm200-: explicitly handle nofw Signed-off-by: Ben Skeggs commit 46fc98bfb8bcfb3ba2e5af51ecbbdb394ed67501 Author: Ben Skeggs Date: Tue Jun 16 15:15:58 2020 +1000 drm/nouveau/pmu/gm20x: don't pretend we support loading with our custom FW It technically loads, and runs, but is ultimately pointless outside of a very narrow window (fanless systems where one wants to attempt using the, broken for a lot of gm20x, memory reclocking code). It's also potentially dangerous to override the VBIOS-provided "Pre-OS" PMU, which would be responsible for fan control otherwise. Signed-off-by: Ben Skeggs commit de088372da017df35f6545516815ee012ec92ff6 Author: Ben Skeggs Date: Tue Jun 16 14:57:31 2020 +1000 drm/nouveau/acr: store a mask of LS falcons the controlling LSFW can bootstrap This will prevent some pain with broken firmware trees, as under some circumstances the HSFW can fail and leave the GPU in a state we don't know how to recover from. Signed-off-by: Ben Skeggs commit 587debc9a79b84fd61674f2c42f5a1b2c89ebd5f Author: Ben Skeggs Date: Tue Jun 16 14:19:35 2020 +1000 drm/nouveau/acr: store a mask of LS falcons the HSFW can bootstrap This will prevent reloading of HS FW where it's pointless, and bypass hitting some timeouts. Not a situation one should generally hit, but can occur with a messed up firmware installation. Signed-off-by: Ben Skeggs commit 90e9cf749a61deabd1cb167759ff93ee9f0ab01f Author: Ben Skeggs Date: Tue Jun 16 10:47:07 2020 +1000 drm/nouveau/acr: allow module to load when HSFW(s) are missing Signed-off-by: Ben Skeggs commit 8fdc45e4b61501bbd201006f97902d5e6ecac7ee Author: Ben Skeggs Date: Tue Jun 16 11:38:47 2020 +1000 drm/nouveau/acr: refuse to load LSFW if HSFW is missing Signed-off-by: Ben Skeggs commit 8140f92c277ffe75083117f90a6417c043aef97d Author: Ben Skeggs Date: Tue Jun 16 11:14:41 2020 +1000 drm/nouveau/core: drop error message when no compatible FW found This is less than useful with some subdevs having _nofw variants in their FWIF lists - it's cleaner to handle them all in the same way. Signed-off-by: Ben Skeggs commit b9f327f1afc7c061233adf585736857d20c6ac06 Author: Ben Skeggs Date: Wed Jun 10 14:46:01 2020 +1000 drm/nouveau/mmu/gp100-: enable mmu invalidate depth optimisation This causes us to invalidate MMU only at the level we made modifications - ie: if we've only modified PTEs, there's no need to have MMU dump the PDs it's fetched into L2. Signed-off-by: Ben Skeggs commit b448a266cc4a2a960a65108a4a36d36c17cd74b2 Author: Timur Tabi Date: Tue Jun 9 07:52:04 2020 -0500 drm/nouveau/nvfw: firmware structures should begin with nvfw_ Rename all structures that are used directly by firmware to have a nvfw_ prefix. This makes it easier to identify structures that have a fixed, specific layout. A future patch will define several more such structures, so it's important to be consistent now. Signed-off-by: Timur Tabi Signed-off-by: Ben Skeggs commit 804f570502289f9ccb31660da8d041fa14af6c65 Author: Timur Tabi Date: Tue Jun 9 07:52:03 2020 -0500 drm/nouveau/tmr: fix nvkm_usec/nvkm_msec definitions nvkm_timer_wait_init() takes a u64 as a duration parameter, but the expression "(m) * 1000" will be promoted only to a 32-bit integer, if 'm' is also an integer. Changing the 1000 to 1000ULL ensures that the expression will be 64 bits. This change currently has no effect as there are no callers of nvkm_msec() that exceed 2000ms. Signed-off-by: Timur Tabi Signed-off-by: Ben Skeggs commit 9c64a8dbcb4671df868d7214442c62269e8b671c Author: Ben Skeggs Date: Sat May 30 09:55:19 2020 +1000 drm/nouveau/therm/gt215: make gt215_therm_init static Signed-off-by: Ben Skeggs commit 3b54befd49dc526284312e6d481b08246943197f Author: Ben Skeggs Date: Sat May 30 09:54:26 2020 +1000 drm/nouveau/mmu: make a couple of functions static Signed-off-by: Ben Skeggs commit 94cad89ae4505672ae65457d12f77c44ca87655b Author: Ben Skeggs Date: Sat May 30 09:53:57 2020 +1000 drm/nouveau/mc/gp10b: make gp10b_mc_init static Signed-off-by: Ben Skeggs commit 8b962dc4ece7177ad7f5357f4694df1ed5558e44 Author: Ben Skeggs Date: Sat May 30 09:35:55 2020 +1000 drm/nouveau/nvfw/acr: make lsb_header_tail_dump static Signed-off-by: Ben Skeggs commit f612b0f66cbe300230bd3465a08205e71072467d Author: Ben Skeggs Date: Sat May 30 09:34:08 2020 +1000 drm/nouveau/gr/gf100-: make some functions static Signed-off-by: Ben Skeggs commit 8869dff1bdb3337594e50e66e594a027b1ac7fb5 Author: Ben Skeggs Date: Fri May 29 15:14:49 2020 +1000 drm/nouveau/disp/gm200-: remove 'head' parameter from nvkm_ior_func.hdmi.scdc() It's no longer required. Signed-off-by: Ben Skeggs commit ca45b5cd55d2ea2e4f2ddec1175cc9bdb5b74e07 Author: Johan Hovold Date: Thu Jul 23 14:33:27 2020 +0200 serial: msm_serial: add sparse context annotation Add sparse context annotation to the receive handlers, which release and reacquire the port lock, to silence sparse warnings: drivers/tty/serial/msm_serial.c:748:25: warning: context imbalance in 'msm_handle_rx_dm' - unexpected unlock drivers/tty/serial/msm_serial.c:814:28: warning: context imbalance in 'msm_handle_rx' - unexpected unlock Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200723123327.5843-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit de5b2c9d16924ad0d9e2bfd9a5da16fe6ea54f22 Author: Johan Hovold Date: Thu Jul 23 14:33:26 2020 +0200 serial: pmac_zilog: add sparse context annotation Add sparse context annotation to the receive handler, which releases and reacquires the port lock, to silence a sparse warning: drivers/tty/serial/pmac_zilog.c:255:36: sparse: sparse: context imbalance in 'pmz_receive_chars' - unexpected unlock Reported-by: kernel test robot Signed-off-by: Johan Hovold Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200723123327.5843-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 118499e70ecec5ca816ebeb6119b9aa16aefb66c Author: Jiri Slaby Date: Fri Jul 24 08:27:35 2020 +0200 newport_con: vc_color is now in state Since commit 28bc24fc46f9 (vc: separate state), vc->vc_color is known as vc->state.color. Somehow both me and 0-day bot missed this driver during the conversion. So fix the driver now. Reported-by: kernel test robot Fixes: 28bc24fc46f9 ("vc: separate state") Signed-off-by: Jiri Slaby Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-mips@vger.kernel.org Link: https://lore.kernel.org/r/20200724062735.18229-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 7f6fa101dfac8739764e47751d314551f6160c98 Author: Ira Weiny Date: Thu Jul 23 09:14:05 2020 -0700 x86: Correct noinstr qualifiers The noinstr qualifier is to be specified before the return type in the same way inline is used. These 2 cases were missed by previous patches. Signed-off-by: Ira Weiny Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20200723161405.852613-1-ira.weiny@intel.com commit 0a787b28b7a375ad9d5c77bc3922ae1a8305239e Author: Arvind Sankar Date: Thu Jul 23 19:15:42 2020 -0400 x86/mm: Drop unused MAX_PHYSADDR_BITS The macro is not used anywhere, and has an incorrect value (going by the comment) on x86_64 since commit c898faf91b3e ("x86: 46 bit physical address support on 64 bits") To avoid confusion, just remove the definition. Signed-off-by: Arvind Sankar Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200723231544.17274-2-nivedita@alum.mit.edu commit c4f16e96d8fdd62ef12898fc0965c42093bed237 Author: Krzysztof Kozlowski Date: Mon Jul 20 13:03:01 2020 +0200 memory: samsung: exynos5422-dmc: Do not ignore return code of regmap_read() Check for regmap_read() return code before using the read value in following write in exynos5_switch_timing_regs(). Pass reading error code to the callers. This does not introduce proper error handling for such failed reads (and obviously regmap_write() error is still ignored) because the driver ignored this in all places. Therefor it only fixes reported issue while matching current driver coding style: drivers/memory/samsung/exynos5422-dmc.c: In function 'exynos5_switch_timing_regs': >> drivers/memory/samsung/exynos5422-dmc.c:216:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski commit 85467f63a05c43364ba0b90d0c05bb89191543fa Author: Stefan Berger Date: Mon Jul 6 19:58:07 2020 -0400 tpm: Add support for event log pointer found in TPM2 ACPI table In case a TPM2 is attached, search for a TPM2 ACPI table when trying to get the event log from ACPI. If one is found, use it to get the start and length of the log area. This allows non-UEFI systems, such as SeaBIOS, to pass an event log when using a TPM2. Cc: Peter Huewe Cc: Jason Gunthorpe Signed-off-by: Stefan Berger Reviewed-by: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen commit 18306111e65bb99b6ec676d51728bbfe85fdacae Author: Stefan Berger Date: Mon Jul 6 19:58:06 2020 -0400 acpi: Extend TPM2 ACPI table with missing log fields Recent extensions of the TPM2 ACPI table added 3 more fields including 12 bytes of start method specific parameters and Log Area Minimum Length (u32) and Log Area Start Address (u64). So, we define a new structure acpi_tpm2_phy that holds these optional new fields. The new fields allow non-UEFI systems to access the TPM2's log. The specification that has the new fields is the following: TCG ACPI Specification Family "1.2" and "2.0" Version 1.2, Revision 8 https://trustedcomputinggroup.org/wp-content/uploads/TCG_ACPIGeneralSpecification_v1.20_r8.pdf Cc: linux-acpi@vger.kernel.org Cc: Len Brown Signed-off-by: Stefan Berger Acked-by: Rafael J. Wysocki Reviewed-by: Jarkko Sakkinen Reviewed-by: Jerry Snitselaar Signed-off-by: Jarkko Sakkinen commit 6c4e79d99e6f42b79040f1a33cd4018f5425030b Author: Jarkko Sakkinen Date: Fri Jul 3 01:55:59 2020 +0300 tpm: Unify the mismatching TPM space buffer sizes The size of the buffers for storing context's and sessions can vary from arch to arch as PAGE_SIZE can be anything between 4 kB and 256 kB (the maximum for PPC64). Define a fixed buffer size set to 16 kB. This should be enough for most use with three handles (that is how many we allow at the moment). Parametrize the buffer size while doing this, so that it is easier to revisit this later on if required. Cc: stable@vger.kernel.org Reported-by: Stefan Berger Fixes: 745b361e989a ("tpm: infrastructure for TPM spaces") Reviewed-by: Jerry Snitselaar Tested-by: Stefan Berger Signed-off-by: Jarkko Sakkinen commit e6873087cce622bf5af5b519bdf781d086f6b2f4 Author: Tao Ren Date: Thu Jul 23 16:05:39 2020 -0700 ARM: dts: aspeed: wedge40: Enable pwm_tacho device Enable pwm_tacho device for fan control and monitoring in Wedge40. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit acd0093062a3edb8bdb7a6a30e668945d7650adf Author: Tao Ren Date: Thu Jul 23 16:05:38 2020 -0700 ARM: dts: aspeed: wedge40: Enable ADC device Enable ADC controller and corresponding voltage sensoring channels for Wedge40. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit a4bf24d4db1c82a6b0093c8d02def21b1a928e12 Author: Tao Ren Date: Thu Jul 23 16:05:37 2020 -0700 ARM: dts: aspeed: wedge40: Disable unused i2c controllers Disable i2c bus #9, #10 and #13 as these i2c controllers are not used on Wedge40. Signed-off-by: Tao Ren Signed-off-by: Joel Stanley commit a5d28390d6460ac851536cba0478e20e1b61d810 Author: Tao Ren Date: Thu Jul 23 16:08:22 2020 -0700 ARM: dts: aspeed: cmm: Fixup I2C tree Create all the i2c switches in device tree and use aliases to assign child channels with consistent bus numbers. Besides, "i2c-mux-idle-disconnect" is set for all the i2c switches to avoid potential conflicts when multiple devices (beind the switches) use the same device address. Signed-off-by: Tao Ren Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit f17af8953b7df32254d56442db026209855f2e4d Author: Joel Stanley Date: Fri Jul 24 12:00:36 2020 +0930 ARM: dts: aspeed: tacoma: Add CFAM reset GPIO The GPIO on Q0 is used for resetting the CFAM of the processor that the ASPEED master is connected to. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit b23b2b842002424147b820f22d52a8306bd7b2ac Author: Joel Stanley Date: Fri Jul 24 12:00:35 2020 +0930 ARM: dts: aspeed: rainier: Add CFAM reset GPIO The GPIO on Q0 is used for resetting the CFAM of the processor that the ASPEED master is connected to. The signal is wired as active high on the first pass systems. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 7f3d176f5f7e3f0477bf82df0f600fcddcdcc4e4 Author: Tyler Hicks Date: Fri Jul 10 14:29:55 2020 -0500 tpm: Require that all digests are present in TCG_PCR_EVENT2 structures Require that the TCG_PCR_EVENT2.digests.count value strictly matches the value of TCG_EfiSpecIdEvent.numberOfAlgorithms in the event field of the TCG_PCClientPCREvent event log header. Also require that TCG_EfiSpecIdEvent.numberOfAlgorithms is non-zero. The TCG PC Client Platform Firmware Profile Specification section 9.1 (Family "2.0", Level 00 Revision 1.04) states: For each Hash algorithm enumerated in the TCG_PCClientPCREvent entry, there SHALL be a corresponding digest in all TCG_PCR_EVENT2 structures. Note: This includes EV_NO_ACTION events which do not extend the PCR. Section 9.4.5.1 provides this description of TCG_EfiSpecIdEvent.numberOfAlgorithms: The number of Hash algorithms in the digestSizes field. This field MUST be set to a value of 0x01 or greater. Enforce these restrictions, as required by the above specification, in order to better identify and ignore invalid sequences of bytes at the end of an otherwise valid TPM2 event log. Firmware doesn't always have the means necessary to inform the kernel of the actual event log size so the kernel's event log parsing code should be stringent when parsing the event log for resiliency against firmware bugs. This is true, for example, when firmware passes the event log to the kernel via a reserved memory region described in device tree. POWER and some ARM systems use the "linux,sml-base" and "linux,sml-size" device tree properties to describe the memory region used to pass the event log from firmware to the kernel. Unfortunately, the "linux,sml-size" property describes the size of the entire reserved memory region rather than the size of the event long within the memory region and the event log format does not include information describing the size of the event log. tpm_read_log_of(), in drivers/char/tpm/eventlog/of.c, is where the "linux,sml-size" property is used. At the end of that function, log->bios_event_log_end is pointing at the end of the reserved memory region. That's typically 0x10000 bytes offset from "linux,sml-base", depending on what's defined in the device tree source. The firmware event log only fills a portion of those 0x10000 bytes and the rest of the memory region should be zeroed out by firmware. Even in the case of a properly zeroed bytes in the remainder of the memory region, the only thing allowing the kernel's event log parser to detect the end of the event log is the following conditional in __calc_tpm2_event_size(): if (event_type == 0 && event_field->event_size == 0) size = 0; If that wasn't there, __calc_tpm2_event_size() would think that a 16 byte sequence of zeroes, following an otherwise valid event log, was a valid event. However, problems can occur if a single bit is set in the offset corresponding to either the TCG_PCR_EVENT2.eventType or TCG_PCR_EVENT2.eventSize fields, after the last valid event log entry. This could confuse the parser into thinking that an additional entry is present in the event log and exposing this invalid entry to userspace in the /sys/kernel/security/tpm0/binary_bios_measurements file. Such problems have been seen if firmware does not fully zero the memory region upon a warm reboot. This patch significantly raises the bar on how difficult it is for stale/invalid memory to confuse the kernel's event log parser but there's still, ultimately, a reliance on firmware to properly initialize the remainder of the memory region reserved for the event log as the parser cannot be expected to detect a stale but otherwise properly formatted firmware event log entry. Fixes: fd5c78694f3f ("tpm: fix handling of the TPM 2.0 event logs") Signed-off-by: Tyler Hicks Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 99c787cfd2bd04926f1f553b30bd7dcea2caaba1 Author: Li Guifu Date: Fri Jul 24 09:38:11 2020 +0800 f2fs: fix use-after-free issue During umount, f2fs_put_super() unregisters procfs entries after f2fs_destroy_segment_manager(), it may cause use-after-free issue when umount races with procfs accessing, fix it by relocating f2fs_unregister_sysfs(). [Chao Yu: change commit title/message a bit] Signed-off-by: Li Guifu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 68e79baf41f89fcdf9edf9bf3d65a71b667d066c Author: Jia Yang Date: Tue Jul 21 11:49:14 2020 +0800 f2fs: Change the type of f2fs_flush_inline_data() to void The return value of f2fs_flush_inline_data() is not used, so delete it. Signed-off-by: Jia Yang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 06a8a059e88bd73ee81a4ad19e97c04766f84def Author: Andrew-sh.Cheng Date: Mon Jul 20 16:55:26 2020 +0800 opp: Allow disabled OPPs in dev_pm_opp_get_freq() Allow dev_pm_opp_get_freq() to work for disabled OPPs. Signed-off-by: Andrew-sh.Cheng [ Viresh: Massaged commit log ] Signed-off-by: Viresh Kumar commit 0e510bf1b881e872a59033634e6226cd4c501e77 Author: Alexander A. Klimov Date: Mon Jul 13 20:05:16 2020 +0200 opp: ti-opp-supply: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Viresh Kumar commit 036491542aa47633a7c9a1b01a0c19f2c5e67f04 Author: Valdis Kletnieks Date: Sat Jun 20 13:03:22 2020 -0400 opp: core: Add missing export for dev_pm_opp_adjust_voltage Export dev_pm_opp_adjust_voltage() as it may be used by modules later on. Signed-off-by: Valdis Kletnieks [ Viresh: Rewrote commit log ] Signed-off-by: Viresh Kumar commit 1b6687e31a2df9fbdb12d25c1d1d372777bf96a8 Author: David Ahern Date: Thu Jul 23 17:23:09 2020 -0600 vrf: Handle CONFIG_SYSCTL not set Randy reported compile failure when CONFIG_SYSCTL is not set/enabled: ERROR: modpost: "sysctl_vals" [drivers/net/vrf.ko] undefined! Fix by splitting out the sysctl init and cleanup into helpers that can be set to do nothing when CONFIG_SYSCTL is disabled. In addition, move vrf_strict_mode and vrf_strict_mode_change to above vrf_shared_table_handler (code move only) and wrap all of it in the ifdef CONFIG_SYSCTL. Update the strict mode tests to check for the existence of the /proc/sys entry. Fixes: 33306f1aaf82 ("vrf: add sysctl parameter for strict mode") Cc: Andrea Mayer Reported-by: Randy Dunlap Signed-off-by: David Ahern Acked-by: Randy Dunlap # build-tested Signed-off-by: David S. Miller commit 70cc062c47e7851335ff4c44ba9b362174baf7d4 Author: Michael Ellerman Date: Fri Jul 24 09:02:26 2020 +1000 powerpc/test_emulate_sstep: Fix build error ppc64_book3e_allmodconfig fails with: arch/powerpc/lib/test_emulate_step.c: In function 'test_pld': arch/powerpc/lib/test_emulate_step.c:113:7: error: implicit declaration of function 'cpu_has_feature' 113 | if (!cpu_has_feature(CPU_FTR_ARCH_31)) { | ^~~~~~~~~~~~~~~ Add an include of cpu_has_feature.h to fix it. Fixes: b6b54b42722a ("powerpc/sstep: Add tests for prefixed integer load/stores") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200724004109.1461709-1-mpe@ellerman.id.au commit 3afe676684f424d39a44924d3c3e166fc6eb7483 Merge: 395be0f47a001 a9d9fea74be28 Author: Dave Airlie Date: Fri Jul 24 09:41:48 2020 +1000 Merge tag 'mediatek-drm-next-5.9' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 5.9 This include converting mtk_dsi to drm_bridge API. Signed-off-by: Dave Airlie From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20200716233102.566-1-chunkuang.hu@kernel.org commit 395be0f47a001a975d25a3e2a0bfe4f08ee193fa Merge: 41206a073ceeb 4fba6d22ca9ad Author: Dave Airlie Date: Fri Jul 24 09:38:44 2020 +1000 Merge tag 'drm/tegra/for-5.9-rc1' of ssh://git.freedesktop.org/git/tegra/linux into drm-next drm/tegra: Changes for v5.9-rc1 This set of patches contains a few preparatory patches to enable video capture support from external camera modules. This is a dependency for the V4L2 driver patches that will likely be merged in v5.9 or v5.10. On top of that there are a couple of fixes across the board as well as some improvements. From a feature point of view this also adds support for horizontal reflection and 180° rotation of planes. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20200717162011.1661788-1-thierry.reding@gmail.com commit 41206a073ceebc517245677a19f52ba6379b33a9 Merge: 206739119508d ba47d845d715a Author: Dave Airlie Date: Fri Jul 24 08:28:09 2020 +1000 Merge v5.8-rc6 into drm-next I've got a silent conflict + two trees based on fixes to merge. Fixes a silent merge with amdgpu Signed-off-by: Dave Airlie commit c2b352262af4360e9a8aefc62bde9bd7012839a8 Author: Paul M Stillwell Jr Date: Thu Jul 9 09:16:14 2020 -0700 ice: add 1G SGMII PHY type There isn't a case for 1G SGMII in ice_get_media_type() so add the handling for it. Also handle the special case where some direct attach cables may report that they support 1G SGMII, but that is erroneous since SGMII is supposed to be a backplane media type (between a MAC and a PHY). If the driver doesn't handle this special case then a user could see the 'Port' in ethtool change from 'Direct attach Copper' to 'Backplane' when they have forced the speed to 1G, but the cable hasn't changed. Lastly, change ice_aq_get_phy_caps() to save the module_type info if the function was called with ICE_AQC_REPORT_TOPO_CAP. This call uses the media information to populate the module_type. If no media is present then the values in module_type will be 0. Signed-off-by: Paul M Stillwell Jr Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit c1eb3b6b68686d7a5dce7c6d795b7eedf6b0671c Author: Doug Dziggel Date: Thu Jul 9 09:16:13 2020 -0700 ice: Report AOC PHY Types as Fiber Report AOC types as fiber instead of unknown. Signed-off-by: Doug Dziggel Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 3bca66b08ec833c4506e97371f2c74e7de00792a Author: Luca Ceresoli Date: Thu Jul 23 09:26:03 2020 +0200 clk: vc5: use a dedicated struct to describe the output drivers Reusing the generic struct vc5_hw_data for all blocks is handy. However it implies we allocate space the div_int and div_frc fields even for the output drivers where they are unused, and the clk_output_cfg0 and clk_output_cfg0_mask fields for all components even though they are used only for the output drivers. Use a dedicated struct for the output drivers so that each block uses exactly the fields it needs, not more. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20200723072603.1795-1-luca@lucaceresoli.net Signed-off-by: Stephen Boyd commit 45c940184b501fc65592432a269b7a34cf2237b6 Author: Luca Ceresoli Date: Thu Jul 23 09:41:12 2020 +0200 dt-bindings: clk: versaclock5: convert to yaml Convert to yaml the VersaClock bindings document. The mapping between clock specifier and physical pins cannot be described formally in yaml schema, then keep it verbatim in the description field. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20200723074112.3159-4-luca@lucaceresoli.net Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit db136ac978ffbcc9a07b69906d7f6d2c49e033c0 Author: Luca Ceresoli Date: Thu Jul 23 09:41:11 2020 +0200 MAINTAINERS: take over IDT VersaClock 5 clock driver Marek has been the primary developer of this driver (thanks!). Now as he is not working on it anymore he suggested I take over maintainership. Cc: Marek Vasut Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20200723074112.3159-3-luca@lucaceresoli.net Signed-off-by: Stephen Boyd commit 3ba72c35cf1c79cb95eebd7fa20f416c4fa952eb Author: Luca Ceresoli Date: Thu Jul 23 09:41:10 2020 +0200 dt-bindings: clk: versaclock5: fix 'idt' prefix typos 'idt' is misspelled 'itd' in a few places, fix it. Fixes: 34662f6e3084 ("dt: Add additional option bindings for IDT VersaClock") Signed-off-by: Luca Ceresoli Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200723074112.3159-2-luca@lucaceresoli.net Signed-off-by: Stephen Boyd commit 8ea1da593b25b4b3251c43753e233efe5f06a3f0 Author: Paul Greenwalt Date: Thu Jul 9 09:16:12 2020 -0700 ice: add AQC get link topology handle support Add AQC get link topology handle support. This is needed to determine Direct Attach (DA) or backplane media type for PHY types that support either. Get link topology handle cage node type request can be used to determine if a cage is present or not. If a cage is present for PHY types that supports both DA and backplane media type, then the media type is DA, else the media type is backplane. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 2a08a9232ba2e6103843870e68edae8e381eb02a Author: Maxime Ripard Date: Fri Jun 26 13:54:33 2020 +0200 dt-bindings: arm: bcm: Add a select to the RPI Firmware binding The RaspberryPi firmware binding uses two compatible, include simple-bus. The select statement generated by default will thus select any node that has simple-bus, not all of them being the raspberrypi firmware node. This results in warnings being wrongfully reported. Let's add a custom select statement to fix that. Fixes: d4c708c032df ("dt-bindings: arm: bcm: Convert BCM2835 firmware binding to YAML") Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200626115433.125735-1-maxime@cerno.tech Acked-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit bdeff9718a1b13032357165df7dd97bc18b41b9e Author: Lev Faerman Date: Thu Jul 9 09:16:11 2020 -0700 ice: Rename low_power_ctrl Rename the low_power_ctrl field to low_power_ctrl_an to be properly descriptive of it being an autoneg field. Signed-off-by: Lev Faerman Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 5ee30564c85c94b7dc78aa6cce09e9712b2ad70d Author: Paul Greenwalt Date: Thu Jul 9 09:16:10 2020 -0700 ice: update reporting of autoneg capabilities Firmware now reports AN28, AN32, and AN73. Add a helper and check these new values and report PHY autoneg capability. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 55df52a0bcc0e2fd7ac1f050c8d2ab76b3df8dfd Author: Paul Greenwalt Date: Thu Jul 9 09:16:09 2020 -0700 ice: add ice_aq_get_phy_caps() debug logs Add debug logs for ice_aq_get_phy_caps(), and format ice_aq_set_phy_cfg() and ice_aq_get_link_info() debug logs to make them more readable. Signed-off-by: Paul Greenwalt Signed-off-by: Paul M Stillwell Jr Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit b4e813dd04e87610503f1972ecd74d87ea062be9 Author: Bruce Allan Date: Thu Jul 9 09:16:08 2020 -0700 ice: support Total Port Shutdown on devices that support it When the Port Disable bit is set in the Link Default Override Mask TLV PFA module in the NVM, Total Port Shutdown mode is supported and enabled. In this mode, the driver should act as if the link-down-on-close ethtool private flag is always enabled and dis-allow any change to that flag. Signed-off-by: Bruce Allan Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit ea78ce4dab05f435b1eff178a5b79d98e1847b2d Author: Paul Greenwalt Date: Thu Jul 9 09:16:07 2020 -0700 ice: add link lenient and default override support Adds functions to check for link override firmware support and get the override settings for a port. The previously supported/default link mode was strict mode. In strict mode link is configured based on get PHY capabilities PHY types with media. Lenient mode is now the default link mode. In lenient mode the link is configured based on get PHY capabilities PHY types without media. This allows the user to configure link that the media does not report. Limit the minimum supported link mode to 25G for devices that support 100G, and 1G for devices that support less than 100G. Default override is only supported in lenient mode. If default override is supported and enabled, then default override values are used for configuring speed and FEC. Default override provide persistent link settings in the NVM. Signed-off-by: Paul Greenwalt Signed-off-by: Evan Swanson Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 1a3571b5938cfb069903262c4821affeeeb7fe23 Author: Paul Greenwalt Date: Thu Jul 9 09:16:06 2020 -0700 ice: restore PHY settings on media insertion After the transition from no media to media FW will clear the set-phy-cfg data set by the user. Save initial PHY settings and any settings later requested by the user and use that data to restore PHY settings on media insertion. Since PHY configuration is now being stored, replace calls that were calling FW to get the configuration with the saved copy. Signed-off-by: Paul Greenwalt Signed-off-by: Chinh T Cao Signed-off-by: Paul M Stillwell Jr Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 5df5661a1387e829c901d009cdd1fccc376cdb74 Author: Vladimir Oltean Date: Thu Jul 23 01:43:12 2020 +0300 net: dsa: stop overriding master's ndo_get_phys_port_name The purpose of this override is to give the user an indication of what the number of the CPU port is (in DSA, the CPU port is a hardware implementation detail and not a network interface capable of traffic). However, it has always failed (by design) at providing this information to the user in a reliable fashion. Prior to commit 3369afba1e46 ("net: Call into DSA netdevice_ops wrappers"), the behavior was to only override this callback if it was not provided by the DSA master. That was its first failure: if the DSA master itself was a DSA port or a switchdev, then the user would not see the number of the CPU port in /sys/class/net/eth0/phys_port_name, but the number of the DSA master port within its respective physical switch. But that was actually ok in a way. The commit mentioned above changed that behavior, and now overrides the master's ndo_get_phys_port_name unconditionally. That comes with problems of its own, which are worse in a way. The idea is that it's typical for switchdev users to have udev rules for consistent interface naming. These are based, among other things, on the phys_port_name attribute. If we let the DSA switch at the bottom to start randomly overriding ndo_get_phys_port_name with its own CPU port, we basically lose any predictability in interface naming, or even uniqueness, for that matter. So, there are reasons to let DSA override the master's callback (to provide a consistent interface, a number which has a clear meaning and must not be interpreted according to context), and there are reasons to not let DSA override it (it breaks udev matching for the DSA master). But, there is an alternative method for users to retrieve the number of the CPU port of each DSA switch in the system: $ devlink port pci/0000:00:00.5/0: type eth netdev swp0 flavour physical port 0 pci/0000:00:00.5/2: type eth netdev swp2 flavour physical port 2 pci/0000:00:00.5/4: type notset flavour cpu port 4 spi/spi2.0/0: type eth netdev sw0p0 flavour physical port 0 spi/spi2.0/1: type eth netdev sw0p1 flavour physical port 1 spi/spi2.0/2: type eth netdev sw0p2 flavour physical port 2 spi/spi2.0/4: type notset flavour cpu port 4 spi/spi2.1/0: type eth netdev sw1p0 flavour physical port 0 spi/spi2.1/1: type eth netdev sw1p1 flavour physical port 1 spi/spi2.1/2: type eth netdev sw1p2 flavour physical port 2 spi/spi2.1/3: type eth netdev sw1p3 flavour physical port 3 spi/spi2.1/4: type notset flavour cpu port 4 So remove this duplicated, unreliable and troublesome method. From this patch on, the phys_port_name attribute of the DSA master will only contain information about itself (if at all). If the users need reliable information about the CPU port they're probably using devlink anyway. Signed-off-by: Vladimir Oltean Acked-by: florian Fainelli Signed-off-by: David S. Miller commit 61cf42e71abcb13950c6cc32805defb0fb3b658e Author: Paul Greenwalt Date: Thu Jul 9 09:16:05 2020 -0700 ice: move auto FEC checks into ice_cfg_phy_fec() The call to ice_cfg_phy_fec() requires the caller to perform certain actions before calling it. Instead of imposing these preconditions move the operations into the function and perform them ourselves. Also, fix some style issues in nearby touched code. Signed-off-by: Paul Greenwalt Signed-off-by: Chinh T Cao Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 2ffb60856ac857ecae3e87a69c0a977e4a608ae0 Author: Paul Greenwalt Date: Thu Jul 9 09:16:04 2020 -0700 ice: refactor FC functions Create a helper function for configuring requested flow control so that it can be utilized by other functions looking to configure flow control settings. Utilize the existing helper ice_copy_phy_caps_to_cfg() to copy a PHY capability to configuration instead duplicating the code for it. Signed-off-by: Paul Greenwalt Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 769c500dcc1edb6e65f84b2a7304589b748a3e35 Author: Akeem G Abodunrin Date: Thu Jul 9 09:16:03 2020 -0700 ice: Add advanced power mgmt for WoL Add callbacks needed to support advanced power management for Wake on LAN. Also make ice_pf_state_is_nominal function available for all configurations not just CONFIG_PCI_IOV. Signed-off-by: Akeem G Abodunrin Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 81aed6475dbe90b45e8da4b476a4c985d4890042 Author: Jacob Keller Date: Thu Jul 9 09:16:02 2020 -0700 ice: split ice_discover_caps into two functions Using the new ice_aq_list_caps and ice_parse_(dev|func)_caps functions, replace ice_discover_caps with two functions that each take a pointer to the dev_caps and func_caps structures respectively. This makes the side effect of updating the hw->dev_caps and hw->func_caps obvious from reading the implementation of the function. Additionally, it opens the way for enabling reading of device capabilities outside of the initialization flow. By passing in a pointer, another caller will be able to read the capabilities without modifying the HW capabilities structures. As there are no other callers, it is safe to now remove ice_aq_discover_caps and ice_parse_caps. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 595b13e228443239a7a7b04ed7546847023d6115 Author: Jacob Keller Date: Thu Jul 9 09:16:01 2020 -0700 ice: split ice_parse_caps into separate functions The ice_parse_caps function is used to convert the capability block data coming from firmware into a structured format used by other parts of the code. The current implementation directly updates the hw->func_caps and hw->dev_caps structures. It is directly called from within ice_aq_discover_caps. This causes the discover_caps function to have the side effect of modifying the HW capability structures, which is not intuitive. Split this function into ice_parse_dev_caps and ice_parse_func_caps. These functions will take a pointer to the dev_caps and func_caps respectively. Also create an ice_parse_common_caps for sharing the capability logic that is common to device and function. Doing so enables a future refactor to allow reading and parsing capabilities into a local caps structure instead of modifying the members of the HW structure directly. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit ec799c0f16b81fb42f974fc28172c084de30a4a5 Author: Grygorii Strashko Date: Wed Jul 22 01:52:47 2020 +0300 dt-bindings: phy: ti: phy-gmii-sel: convert bindings to json-schema Convert the CPSW Port's Interface Mode Selection PHY bindings documentation to json-schema. Signed-off-by: Grygorii Strashko Link: https://lore.kernel.org/r/20200721225247.31034-1-grygorii.strashko@ti.com Signed-off-by: Rob Herring commit 1082b360e3f6c0c7ce46417f3ecd5517a11abf60 Author: Jacob Keller Date: Thu Jul 9 09:16:00 2020 -0700 ice: refactor ice_discover_caps to avoid need to retry The ice_discover_caps function is used to read the device and function capabilities, updating the hardware capabilities structures with relevant data. The exact number of capabilities returned by the hardware is unknown ahead of time. The AdminQ command will report the total number of capabilities in the return buffer. The current implementation involves requesting capabilities once, reading this returned size, and then re-requested with that size. This isn't really necessary. The firmware interface has a maximum size of ICE_AQ_MAX_BUF_LEN. Firmware can never return more than ICE_AQ_MAX_BUF_LEN / sizeof(struct ice_aqc_list_caps_elem) capabilities. Avoid the retry loop by simply allocating a buffer of size ICE_AQ_MAX_BUF_LEN. This is significantly simpler than retrying. The extra allocation isn't a big deal, as it will be released after we finish parsing the capabilities. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 80d7f913de00383722315c3aa9a246ad7333e6cc Author: Randy Dunlap Date: Sat Jul 18 17:28:16 2020 -0700 dt-bindings: mux: mux.h: drop a duplicated word Drop the repeated word "the" in a comment. Cc: Peter Rosin Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20200719002816.20263-1-rdunlap@infradead.org Signed-off-by: Rob Herring commit 0386e81d26d4677a067107b2fdb49993443e01c5 Author: Lubomir Rintel Date: Sat Jul 18 23:12:44 2020 +0200 dt-bindings: misc: Convert olpc,xo1.75-ec to json-schema Convert the OLPC XO-1.75 Embedded Controller binding to DT schema format using json-schema. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200718211244.187938-1-lkundrak@v3.sk Signed-off-by: Rob Herring commit 76bd58f3c867f5a6b20d2e30c1c4bb4f9ff0e275 Author: Alexander A. Klimov Date: Tue Jul 14 19:55:28 2020 +0200 CREDITS: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200714175528.46712-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 5b5bbb8cc51be3c70993ddabfd216c5c769e8585 Author: Tom Rix Date: Fri Jul 10 13:01:15 2020 -0700 docs: process: Add an example for creating a fixes tag To make it a little clearer how to create a fixes tag, add an example based on the preceeding gitconfig setup. Signed-off-by: Tom Rix Link: https://lore.kernel.org/r/20200710200115.21176-1-trix@redhat.com Signed-off-by: Jonathan Corbet commit ed85ae502ee5a20ccd8b57efcaded3a1a81dd815 Author: Alex Shi Date: Mon Jul 13 19:58:07 2020 +0800 doc/zh_CN: add Chinese translation prefer section The add words is: Tranlation plan: Welcome for any part of kernel doc Chinese translation, expecially for admin-guide part. Signed-off-by: Alex Shi Cc: Harry Wei Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20200713115807.56362-3-alex.shi@linux.alibaba.com Signed-off-by: Jonathan Corbet commit 71fc2eb8b47dc2f0714e6071ba5e0b635c85135d Author: Alex Shi Date: Mon Jul 13 19:58:06 2020 +0800 doc/zh_CN: add clearing-warn-once Chinese version and link it into admin-guide. Signed-off-by: Alex Shi Cc: Harry Wei Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20200713115807.56362-2-alex.shi@linux.alibaba.com Signed-off-by: Jonathan Corbet commit 37a607cf2318b5ab93353c064a7bb41c3ab12131 Author: Alex Shi Date: Mon Jul 13 19:58:05 2020 +0800 doc/zh_CN: add admin-guide index Translate the admin-guide index.rst file into Chinese. and link it into Chinese top index file. Signed-off-by: Alex Shi Cc: Harry Wei Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20200713115807.56362-1-alex.shi@linux.alibaba.com Signed-off-by: Jonathan Corbet commit 542dbc7e589cda5af7cd617f88b486af38729bf7 Author: Lee Jones Date: Wed Jul 15 13:23:28 2020 +0100 doc:it_IT: process: coding-style.rst: Correct __maybe_unused compiler label Flag is __maybe_unused, not __maybe_used. Cc: Federico Vaga Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: clang-built-linux@googlegroups.com Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200715122328.3882187-1-lee.jones@linaro.org Signed-off-by: Jonathan Corbet commit 9d3d6d0be041ebe47721aca8a16b632f56ee72a4 Author: André Almeida Date: Wed Jul 15 10:10:36 2020 -0300 futex: MAINTAINERS: Re-add selftests directory Commit 95ca6d73a8a97 ("docs: move locking-specific documents to locking/") accidentally replaced the selftests line for a duplicated documentation one. Revert this change. Signed-off-by: André Almeida Fixes: 95ca6d73a8a97 ("docs: move locking-specific documents to locking/") Link: https://lore.kernel.org/r/20200715131036.9692-1-andrealmeid@collabora.com Signed-off-by: Jonathan Corbet commit 61ebd0d0ae097c3d644904baef73abd86dafd351 Author: Julia Lawall Date: Sat Jul 18 18:08:38 2020 +0200 docs: timers: drop documentation about LB_BIAS The LB_BIAS feature was removed in commit 1c1b8a7b03ef ("sched/fair: Replace source_load() & target_load() with weighted_cpuload()"), so drop the mention that it is disabled in the no_hz case. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/1595088518-28116-1-git-send-email-Julia.Lawall@inria.fr Signed-off-by: Jonathan Corbet commit b7f419950c51f2a7e3957f5c8db9e9903997c474 Author: Daniel W. S. Almeida Date: Sat Jul 18 13:51:02 2020 -0300 docs: core-api/printk-formats.rst: use literal block syntax Fix the following warning: WARNING: Definition list ends without a blank line; unexpected unindent. By switching to the literal block syntax. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20200718165107.625847-8-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 009abf5bb88bf96247dbb7404fd0dc83c99aafab Author: Daniel W. S. Almeida Date: Sat Jul 18 13:51:00 2020 -0300 docs: bpf/bpf_devel_QA.rst: fix reference to nonexistent document Fix the following sphinx warning: bpf_devel_QA.rst:444: WARNING: Unknown target name: "documentation/bpf/btf.rst" No target was defined for 'btf.rst' in the document. Fix it. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20200718165107.625847-6-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit b6667585c28d46017030198403c18d803e0c9e90 Author: Daniel W. S. Almeida Date: Sat Jul 18 13:50:59 2020 -0300 docs: process/index.rst: Fix reference to nonexistent document Fix the following warning: WARNING: toctree contains reference to nonexistent document 'process/unaligned-memory-access' The path to the document was wrong. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20200718165107.625847-5-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 9a32500a346d754a4485a5de9af63759124c2833 Author: Daniel W. S. Almeida Date: Sat Jul 18 13:50:58 2020 -0300 docs: staging/tee.rst: convert into definition list Fix the following warnings: tee.rst:65: WARNING: Unexpected indentation. tee.rst:69: WARNING: Block quote ends without a blank line; unexpected unindent. By switching to the 'definition list' syntax. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20200718165107.625847-4-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 2b7295c086b8f497149166aadef513e6e2ac5a74 Author: Daniel W. S. Almeida Date: Sat Jul 18 13:50:55 2020 -0300 docs: admin-guide/mm/index: Fix reference to nonexistent document Fix the following warning: WARNING: toctree contains reference to nonexistent document 'admin-guide/mm/nommu-map' This was due to a typo. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20200718165107.625847-1-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 00d7c1e55aff1a92e42c845dca9830f9f7b2de69 Author: Daniel W. S. Almeida Date: Sat Jul 18 13:51:03 2020 -0300 docs: admin-guide/index.rst: Add pstore-blk.rst Fix the following warning: Documentation/admin-guide/pstore-blk.rst: WARNING: document isn't included in any toctree By adding 'pstore-blk.rst' to the index Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20200718165107.625847-9-dwlsalmeida@gmail.com Acked-by: Kees Cook Signed-off-by: Jonathan Corbet commit 5fe52b3865eacce7206ff7e28455c686e6bf8920 Author: Daniel W. S. Almeida Date: Sat Jul 18 13:51:04 2020 -0300 docs: bpf/index.rst: Add ringbuf.rst Fix the following warning Documentation/bpf/ringbuf.rst: WARNING: document isn't included in any toctree By adding it to the index. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20200718165107.625847-10-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit f2ea95289a79b81aa6c9b0daf8bec60a76b7e78d Author: Daniel W. S. Almeida Date: Sat Jul 18 13:51:06 2020 -0300 docs: trace/index.rst: add histogram-design.rst Fix the following warning: Documentation/trace/histogram-design.rst: WARNING: document isn't included in any toctree By adding 'histogram-design.rst' to the index. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20200718165107.625847-12-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 3657c3eba8956260f0ee50419bc2b5fdfd53ec47 Author: Daniel W. S. Almeida Date: Sat Jul 18 13:51:07 2020 -0300 docs: index.rst: Add watch_queue Fix the following sphinx warning: Documentation/watch_queue.rst: WARNING: document isn't included in any toctree By adding watch_queue.rst to the index. Signed-off-by: Daniel W. S. Almeida Link: https://lore.kernel.org/r/20200718165107.625847-13-dwlsalmeida@gmail.com Signed-off-by: Jonathan Corbet commit 00bafa574673fd94ac2a5aa5354877d33f2488de Author: Mike Rapoport Date: Sun Jul 19 18:36:41 2020 +0300 docs/core-api: memory-allocation: describe reclaim behaviour Changelog of commit dcda9b04713c ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic") has very nice description of GFP flags that affect reclaim behaviour of the page allocator. It would be pity to keep this description buried in the log so let's expose it in the Documentation/ as well. Cc: Michal Hocko Acked-by: Michal Hocko Signed-off-by: Mike Rapoport Link: https://lore.kernel.org/r/20200719153641.231131-1-rppt@kernel.org Signed-off-by: Jonathan Corbet commit 2ed1761fab136ec3aefa3641a3048dd8ba09a067 Author: Wang Long Date: Mon Jul 20 15:24:12 2020 +0800 Documentation: driver-api: update kernel connector This patch changes: 1) Fix typo in kernel connector documentation. s/cn_netlink_send_multi/cn_netlink_send_mult/ 2) update definition of struct cn_msg Signed-off-by: Wang Long Link: https://lore.kernel.org/r/1595229852-114071-1-git-send-email-w@laoqinren.net Signed-off-by: Jonathan Corbet commit f6655c75610ebf17461f6667c034a892c99be292 Author: Alexander A. Klimov Date: Mon Jul 20 23:12:31 2020 +0200 arm64: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200720211231.63831-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 4db7e1786db505eee86e6301cd42967f4da43be8 Author: Gustavo A. R. Silva Date: Tue Jul 21 18:05:10 2020 -0500 i2c: busses: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Acked-by: Baruch Siach Reviewed-by: Jean Delvare Reviewed-by: Brendan Higgins Reviewed-by: Gregory CLEMENT Reviewed-by: Andy Shevchenko Signed-off-by: Gustavo A. R. Silva Signed-off-by: Wolfram Sang commit cb66eb11da6500f8a0fb37260be0e714b5093496 Author: Bhaskar Chowdhury Date: Tue Jul 21 16:52:51 2020 +0530 docs/mm: concepts.rst: remove unnecessary word Signed-off-by: Bhaskar Chowdhury Acked-by: Mike Rapoport Link: https://lore.kernel.org/r/20200721112251.6100-1-unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit 2165b82fde82eb504fc69f1d7ef69cde2b48764d Author: Naveen N. Rao Date: Tue Jul 21 17:18:22 2020 +0530 docs: Move kprobes.rst from staging/ to trace/ Kprobes contitutes a dynamic tracing technology and as such can be moved alongside documentation of other tracing technologies. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/8a09c01c64b2e003d5486c4f0c89740618f1bae4.1595331824.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Jonathan Corbet commit 0c75f127311bc97ef7125bfe51cd307d832783fb Author: Naveen N. Rao Date: Tue Jul 21 17:18:21 2020 +0530 docs: staging/kprobes.rst: Move references to a separate appendix Kprobes references are currently listed right after kretprobes example, and appears to be part of the same section. Move this out to a separate appendix for clarity. Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/2bba61cd60eec87fbcca3e4343b7f95afa1178cd.1595331824.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Jonathan Corbet commit 6e652f889b49a2ef10483c7f108a5d633abfc327 Author: Naveen N. Rao Date: Tue Jul 21 17:18:20 2020 +0530 docs: staging/kprobes.rst: Update some of the references Some of the kprobes references are not valid anymore. Update the URLs to point to their changed locations, where appropriate. Drop two URLs which do not exist anymore. Reported-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/ae96223716e61185870244d8f9dff6678de12fa1.1595331824.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Jonathan Corbet commit 241c9eb36b8d976fecd2ebae83bf9b6ede398cdb Author: Yaohui Wang Date: Wed Jul 22 15:38:18 2020 +0800 Documentation: fix typo for core-api/cpu_hotplug documentation fix typo for core-api/cpu_hotplug documentation Signed-off-by: Yaohui Wang Link: https://lore.kernel.org/r/20200722073818.20605-1-dillionmango@gmail.com Signed-off-by: Jonathan Corbet commit bf51388a757387a26e4b7a32743db96b1b90a420 Author: Jiri Slaby Date: Thu Jul 23 12:34:54 2020 +0200 Documentation: fb, fix path to modedb.c modedb.c was moved twice since the modedb documentation was written. Update the path to the current one. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200723103454.26167-1-jslaby@suse.cz Signed-off-by: Jonathan Corbet commit 1b7efaa6154960396f414551841f1886d99b6872 Merge: 36cd28a4cdd05 5ecafc120bbea Author: Thomas Gleixner Date: Thu Jul 23 21:04:05 2020 +0200 Merge tag 'timers-v5.9' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clock event/surce driver changes from Daniel Lezcano: - Add sama5d2 support and rework the 32kHz clock handling (Alexandre Belloni) - Add the high resolution support for SMP/SMT on the Ingenic timer (Zhou Yanjie) - Add support for i.MX TPM driver with ARM64 (Anson Huang) - Fix typo by replacing KHz to kHz (Geert Uytterhoeven) - Add 32kHz support by setting the minimum ticks to 5 on Nomadik MTU (Linus Walleij) - Replace HTTP links with HTTPS ones for security reasons (Alexander A. Klimov) - Add support for the Ingenic X1000 OST (Zhou Yanjie) commit 7235ffae3d2cd3dd02ea840b1f51eeb394e40b0d Author: Vishal Kulkarni Date: Thu Jul 23 18:19:50 2020 +0530 cxgb4: add loopback ethtool self-test In this test, loopback pkt is created and sent on default queue. The packet goes until the Multi Port Switch (MPS) just before the MAC and based on the specified channel number, it either goes outside the wire on one of the physical ports or looped back to Rx path by MPS. In this case, we're specifying loopback channel, instead of physical ports, so the packet gets looped back to Rx path, instead of getting transmitted on the wire. v3: - Modify commit message to include test details. v2: - Add only loopback self-test. Signed-off-by: Vishal Kulkarni Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 15be4ea3f07034a50eee2db6f3fefd2bec582170 Merge: 49b0aa1b65857 70c05bfa4a3d3 Author: David S. Miller Date: Thu Jul 23 11:54:41 2020 -0700 Merge branch 'l2tp-further-checkpatch-pl-cleanups' Tom Parkin says: ==================== l2tp: further checkpatch.pl cleanups l2tp hasn't been kept up to date with the static analysis checks offered by checkpatch.pl. This patchset builds on the series "l2tp: cleanup checkpatch.pl warnings". It includes small refactoring changes which improve code quality and resolve a subset of the checkpatch warnings for the l2tp codebase. ==================== Reviewed-by: James Chapman Signed-off-by: David S. Miller commit 70c05bfa4a3d36c0d8e7cef86b0f6c8a9cbb8881 Author: Tom Parkin Date: Thu Jul 23 12:29:55 2020 +0100 l2tp: cleanup kzalloc calls Passing "sizeof(struct blah)" in kzalloc calls is less readable, potentially prone to future bugs if the type of the pointer is changed, and triggers checkpatch warnings. Tweak the kzalloc calls in l2tp which use this form to avoid the warning. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 0787840dad4ce7875f1e85eb8b72a54e9d87f9db Author: Tom Parkin Date: Thu Jul 23 12:29:54 2020 +0100 l2tp: cleanup netlink tunnel create address handling When creating an L2TP tunnel using the netlink API, userspace must either pass a socket FD for the tunnel to use (for managed tunnels), or specify the tunnel source/destination address (for unmanaged tunnels). Since source/destination addresses may be AF_INET or AF_INET6, the l2tp netlink code has conditionally compiled blocks to support IPv6. Rather than embedding these directly into l2tp_nl_cmd_tunnel_create (where it makes the code difficult to read and confuses checkpatch to boot) split the handling of address-related attributes into a separate function. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 584ca31f469dece9a83cdce33953ba23b115945c Author: Tom Parkin Date: Thu Jul 23 12:29:53 2020 +0100 l2tp: cleanup netlink send of tunnel address information l2tp_nl_tunnel_send has conditionally compiled code to support AF_INET6, which makes the code difficult to follow and triggers checkpatch warnings. Split the code out into functions to handle the AF_INET v.s. AF_INET6 cases, which both improves readability and resolves the checkpatch warnings. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 26d9a2710616c4499b661cada35ac5e4b125ebe8 Author: Tom Parkin Date: Thu Jul 23 12:29:52 2020 +0100 l2tp: check socket address type in l2tp_dfs_seq_tunnel_show checkpatch warns about indentation and brace balancing around the conditionally compiled code for AF_INET6 support in l2tp_dfs_seq_tunnel_show. By adding another check on the socket address type we can make the code more readable while removing the checkpatch warning. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 6c0ec37b82834630cfe99ef42690beef18d2b400 Author: Tom Parkin Date: Thu Jul 23 12:29:51 2020 +0100 l2tp: cleanup unnecessary braces in if statements These checks are all simple and don't benefit from extra braces to clarify intent. Remove them for easier-reading code. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 0febc7b3cd17bd2323a036356c2ae6514acf9010 Author: Tom Parkin Date: Thu Jul 23 12:29:50 2020 +0100 l2tp: cleanup comparisons to NULL checkpatch warns about comparisons to NULL, e.g. CHECK: Comparison to NULL could be written "!rt" #474: FILE: net/l2tp/l2tp_ip.c:474: + if (rt == NULL) { These sort of comparisons are generally clearer and more readable the way checkpatch suggests, so update l2tp accordingly. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit d1e2a97b36131607d33ac3d02e569b494900f1bd Merge: 7349885d87c66 382683c4a1c36 Author: Mark Brown Date: Thu Jul 23 19:52:30 2020 +0100 Merge series "ASoC: add asoc_substream_to_rtd() macro" from Kuninori Morimoto : Hi Mark Many ASoC drivers are getting rtd from substream by rtd = substream->private_data OTOH, we have snd_pcm_substream_chip() macro for it. #define snd_pcm_substream_chip(substream) ((substream)->private_data) But, both are not understandable for reader. This patch adds new asoc_substream_to_rtd() which is easy to understand. These are not important, but for readable code. Kuninori Morimoto (29): ASoC: soc-xxx: add asoc_substream_to_rtd() ASoC: ux500: use asoc_substream_to_rtd() ASoC: ti: use asoc_substream_to_rtd() ASoC: tegra: use asoc_substream_to_rtd() ASoC: sunxi: use asoc_substream_to_rtd() ASoC: stm: use asoc_substream_to_rtd() ASoC: sof: use asoc_substream_to_rtd() ASoC: sh: use asoc_substream_to_rtd() ASoC: samsung: use asoc_substream_to_rtd() ASoC: pxa: use asoc_substream_to_rtd() ASoC: cirrus: use asoc_substream_to_rtd() ASoC: rockchip: use asoc_substream_to_rtd() ASoC: amd: use asoc_substream_to_rtd() ASoC: fsl: use asoc_substream_to_rtd() ASoC: mediatek: use asoc_substream_to_rtd() ASoC: atmel: use asoc_substream_to_rtd() ASoC: qcom: use asoc_substream_to_rtd() ASoC: dwc: use asoc_substream_to_rtd() ASoC: intel: use asoc_substream_to_rtd() ASoC: meson: use asoc_substream_to_rtd() ASoC: au1x: use asoc_substream_to_rtd() ASoC: bcm: use asoc_substream_to_rtd() ASoC: codecs: use asoc_substream_to_rtd() ASoC: generic: use asoc_substream_to_rtd() ASoC: sprd: use asoc_substream_to_rtd() ASoC: kirkwood: use asoc_substream_to_rtd() ASoC: xtensa: use asoc_substream_to_rtd() ASoC: mxs: use asoc_substream_to_rtd() ASoC: uniphier: use asoc_substream_to_rtd() include/sound/soc.h | 2 + sound/soc/amd/acp-da7219-max98357a.c | 12 ++-- sound/soc/amd/acp-pcm-dma.c | 2 +- sound/soc/amd/acp-rt5645.c | 2 +- sound/soc/amd/acp3x-rt5682-max9836.c | 8 +-- sound/soc/amd/raven/acp3x-i2s.c | 2 +- sound/soc/amd/raven/acp3x-pcm-dma.c | 6 +- sound/soc/atmel/atmel-classd.c | 8 +-- sound/soc/atmel/atmel-pcm-dma.c | 4 +- sound/soc/atmel/atmel-pcm-pdc.c | 2 +- sound/soc/atmel/atmel-pdmic.c | 10 +-- sound/soc/atmel/atmel_wm8904.c | 2 +- sound/soc/au1x/db1200.c | 2 +- sound/soc/au1x/dbdma2.c | 2 +- sound/soc/au1x/dma.c | 2 +- sound/soc/bcm/bcm63xx-pcm-whistler.c | 12 ++-- sound/soc/bcm/cygnus-pcm.c | 16 ++--- sound/soc/cirrus/edb93xx.c | 2 +- sound/soc/cirrus/snappercl15.c | 2 +- sound/soc/codecs/rt5677-spi.c | 4 +- sound/soc/dwc/dwc-pcm.c | 2 +- sound/soc/fsl/eukrea-tlv320.c | 2 +- sound/soc/fsl/fsl-asoc-card.c | 2 +- sound/soc/fsl/fsl_asrc_dma.c | 4 +- sound/soc/fsl/fsl_dma.c | 2 +- sound/soc/fsl/fsl_spdif.c | 10 +-- sound/soc/fsl/fsl_ssi.c | 8 +-- sound/soc/fsl/imx-audmix.c | 6 +- sound/soc/fsl/imx-mc13783.c | 2 +- sound/soc/fsl/mpc5200_dma.c | 8 +-- sound/soc/fsl/mpc5200_psc_i2s.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/mx27vis-aic32x4.c | 2 +- sound/soc/fsl/p1022_ds.c | 2 +- sound/soc/fsl/p1022_rdk.c | 2 +- sound/soc/fsl/wm1133-ev1.c | 2 +- sound/soc/generic/simple-card-utils.c | 6 +- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 6 +- sound/soc/intel/baytrail/sst-baytrail-pcm.c | 16 ++--- sound/soc/intel/boards/bdw-rt5650.c | 2 +- sound/soc/intel/boards/bdw-rt5677.c | 4 +- sound/soc/intel/boards/broadwell.c | 2 +- sound/soc/intel/boards/bxt_rt298.c | 2 +- sound/soc/intel/boards/byt-rt5640.c | 2 +- sound/soc/intel/boards/bytcht_da7213.c | 4 +- sound/soc/intel/boards/bytcr_rt5640.c | 2 +- sound/soc/intel/boards/bytcr_rt5651.c | 2 +- sound/soc/intel/boards/cht_bsw_max98090_ti.c | 2 +- sound/soc/intel/boards/cht_bsw_nau8824.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5645.c | 2 +- sound/soc/intel/boards/cht_bsw_rt5672.c | 2 +- sound/soc/intel/boards/cml_rt1011_rt5682.c | 4 +- sound/soc/intel/boards/ehl_rt5660.c | 2 +- sound/soc/intel/boards/glk_rt5682_max98357a.c | 2 +- sound/soc/intel/boards/haswell.c | 2 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 8 +-- sound/soc/intel/boards/kbl_rt5660.c | 2 +- sound/soc/intel/boards/kbl_rt5663_max98927.c | 4 +- .../intel/boards/kbl_rt5663_rt5514_max98927.c | 4 +- .../soc/intel/boards/skl_nau88l25_max98357a.c | 2 +- sound/soc/intel/boards/skl_nau88l25_ssm4567.c | 2 +- sound/soc/intel/boards/skl_rt286.c | 2 +- sound/soc/intel/boards/sof_da7219_max98373.c | 2 +- sound/soc/intel/boards/sof_maxim_common.c | 4 +- sound/soc/intel/boards/sof_pcm512x.c | 4 +- sound/soc/intel/boards/sof_rt5682.c | 4 +- sound/soc/intel/boards/sof_sdw_rt1308.c | 2 +- sound/soc/intel/boards/sof_wm8804.c | 2 +- sound/soc/intel/haswell/sst-haswell-pcm.c | 12 ++-- sound/soc/intel/keembay/kmb_platform.c | 2 +- sound/soc/intel/skylake/skl-pcm.c | 8 +-- sound/soc/kirkwood/armada-370-db.c | 2 +- sound/soc/mediatek/common/mtk-afe-fe-dai.c | 12 ++-- .../mediatek/common/mtk-afe-platform-driver.c | 2 +- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 +- sound/soc/mediatek/mt2701/mt2701-cs42448.c | 2 +- sound/soc/mediatek/mt2701/mt2701-wm8960.c | 2 +- sound/soc/mediatek/mt6797/mt6797-afe-pcm.c | 4 +- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 2 +- sound/soc/mediatek/mt8173/mt8173-max98090.c | 2 +- .../mediatek/mt8173/mt8173-rt5650-rt5514.c | 2 +- .../mediatek/mt8173/mt8173-rt5650-rt5676.c | 2 +- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 2 +- sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 4 +- .../mediatek/mt8183/mt8183-da7219-max98357.c | 8 +-- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 12 ++-- sound/soc/meson/axg-card.c | 2 +- sound/soc/meson/gx-card.c | 2 +- sound/soc/meson/meson-card-utils.c | 2 +- sound/soc/meson/meson-codec-glue.c | 2 +- sound/soc/mxs/mxs-sgtl5000.c | 2 +- sound/soc/pxa/brownstone.c | 2 +- sound/soc/pxa/corgi.c | 4 +- sound/soc/pxa/hx4700.c | 2 +- sound/soc/pxa/imote2.c | 2 +- sound/soc/pxa/magician.c | 6 +- sound/soc/pxa/mmp-pcm.c | 2 +- sound/soc/pxa/poodle.c | 4 +- sound/soc/pxa/pxa2xx-i2s.c | 2 +- sound/soc/pxa/spitz.c | 4 +- sound/soc/pxa/tosa.c | 2 +- sound/soc/pxa/z2.c | 2 +- sound/soc/pxa/zylonite.c | 2 +- sound/soc/qcom/apq8096.c | 2 +- sound/soc/qcom/lpass-platform.c | 14 ++--- sound/soc/qcom/qdsp6/q6asm-dai.c | 6 +- sound/soc/qcom/qdsp6/q6routing.c | 2 +- sound/soc/qcom/sdm845.c | 14 ++--- sound/soc/qcom/storm.c | 2 +- sound/soc/rockchip/rk3288_hdmi_analog.c | 2 +- sound/soc/rockchip/rk3399_gru_sound.c | 8 +-- sound/soc/rockchip/rockchip_i2s.c | 2 +- sound/soc/rockchip/rockchip_max98090.c | 2 +- sound/soc/rockchip/rockchip_rt5645.c | 2 +- sound/soc/samsung/aries_wm8994.c | 4 +- sound/soc/samsung/arndale.c | 4 +- sound/soc/samsung/h1940_uda1380.c | 2 +- sound/soc/samsung/i2s.c | 2 +- sound/soc/samsung/jive_wm8750.c | 2 +- sound/soc/samsung/littlemill.c | 2 +- sound/soc/samsung/neo1973_wm8753.c | 8 +-- sound/soc/samsung/odroid.c | 6 +- sound/soc/samsung/pcm.c | 4 +- sound/soc/samsung/rx1950_uda1380.c | 2 +- sound/soc/samsung/s3c-i2s-v2.c | 2 +- sound/soc/samsung/s3c24xx_simtec.c | 2 +- sound/soc/samsung/s3c24xx_uda134x.c | 6 +- sound/soc/samsung/smartq_wm8987.c | 2 +- sound/soc/samsung/smdk_spdif.c | 2 +- sound/soc/samsung/smdk_wm8580.c | 2 +- sound/soc/samsung/smdk_wm8994.c | 2 +- sound/soc/samsung/smdk_wm8994pcm.c | 2 +- sound/soc/samsung/snow.c | 2 +- sound/soc/samsung/spdif.c | 6 +- sound/soc/samsung/tm2_wm5110.c | 8 +-- sound/soc/sh/dma-sh7760.c | 12 ++-- sound/soc/sh/fsi.c | 2 +- sound/soc/sh/migor.c | 4 +- sound/soc/sh/rcar/core.c | 4 +- sound/soc/soc-component.c | 20 +++--- sound/soc/soc-dai.c | 8 +-- sound/soc/soc-dapm.c | 6 +- sound/soc/soc-generic-dmaengine-pcm.c | 4 +- sound/soc/soc-link.c | 12 ++-- sound/soc/soc-pcm.c | 62 +++++++++---------- sound/soc/soc-utils.c | 2 +- sound/soc/sof/intel/hda-dai.c | 10 +-- sound/soc/sof/intel/hda-dsp.c | 2 +- sound/soc/sof/intel/hda-pcm.c | 2 +- sound/soc/sof/pcm.c | 18 +++--- sound/soc/sprd/sprd-pcm-dma.c | 2 +- sound/soc/stm/stm32_adfsdm.c | 12 ++-- sound/soc/stm/stm32_sai_sub.c | 2 +- sound/soc/sunxi/sun4i-codec.c | 12 ++-- sound/soc/sunxi/sun4i-spdif.c | 2 +- sound/soc/tegra/tegra_alc5632.c | 2 +- sound/soc/tegra/tegra_max98090.c | 2 +- sound/soc/tegra/tegra_rt5640.c | 2 +- sound/soc/tegra/tegra_rt5677.c | 2 +- sound/soc/tegra/tegra_sgtl5000.c | 2 +- sound/soc/tegra/tegra_wm8753.c | 2 +- sound/soc/tegra/tegra_wm8903.c | 2 +- sound/soc/tegra/trimslice.c | 2 +- sound/soc/ti/davinci-evm.c | 6 +- sound/soc/ti/davinci-vcif.c | 4 +- sound/soc/ti/j721e-evm.c | 6 +- sound/soc/ti/n810.c | 4 +- sound/soc/ti/omap-abe-twl6040.c | 4 +- sound/soc/ti/omap-mcbsp.c | 4 +- sound/soc/ti/omap-twl4030.c | 2 +- sound/soc/ti/omap3pandora.c | 2 +- sound/soc/ti/osk5912.c | 2 +- sound/soc/ti/rx51.c | 4 +- sound/soc/uniphier/aio-dma.c | 6 +- sound/soc/ux500/mop500_ab8500.c | 8 +-- sound/soc/ux500/ux500_pcm.c | 2 +- sound/soc/xtensa/xtfpga-i2s.c | 2 +- 177 files changed, 397 insertions(+), 395 deletions(-) -- 2.25.1 commit 7349885d87c66cfd5bd99332283d92ff509f15ff Author: Katsuhiro Suzuki Date: Thu Jul 23 02:42:15 2020 +0900 ASoC: convert ROHM BD28623 amplifier binding to yaml This patch converts ROHM BD28623UMV class D speaker amplifier binding to DT schema. Signed-off-by: Katsuhiro Suzuki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200722174215.988974-1-katsuhiro@katsuster.net Signed-off-by: Mark Brown commit ca168352cf94bbbc523794f2a2972adcf84d8639 Author: Shengjiu Wang Date: Tue Jul 21 11:41:50 2020 +0800 ASoC: bindings: fsl-asoc-card: Support properties for configuring dai fmt In order to support configuring dai fmt through DT, add some properties. These properiese are same as the properties in simple card. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1595302910-19688-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 08b54b5e38e67b7e99f71b35cb8841b53e006759 Author: Shengjiu Wang Date: Tue Jul 21 11:41:49 2020 +0800 ASoC: fsl-asoc-card: Support configuring dai fmt from DT Support same propeties as simple card for configuring fmt from DT. In order to make this change compatible with old DT, these properties are optional. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1595302910-19688-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit c8361757a712dff4db49e18b736635e367b0f473 Author: Shengjiu Wang Date: Thu Jul 23 12:00:08 2020 +0800 ASoC: fsl_esai: add IRQF_SHARED for devm_request_irq ESAI interfaces may share same interrupt line with EDMA on some platforms (e.g. i.MX8QXP, i.MX8QM). Add IRQF_SHARED flag to allow sharing the irq among several devices Signed-off-by: Shengjiu Wang Signed-off-by: Viorel Suman Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1595476808-28927-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit f9ec176cd684c83a60638123da0b34c7c82f0c74 Author: Sameer Pujar Date: Thu Jul 23 13:43:31 2020 +0530 ASoC: tegra: Fix build error due to 64-by-32 division Build errors are seen on 32-bit platforms because of a plain 64-by-32 division. For example, following build erros were reported. "ERROR: modpost: "__udivdi3" [sound/soc/tegra/snd-soc-tegra210-dmic.ko] undefined!" "ERROR: modpost: "__divdi3" [sound/soc/tegra/snd-soc-tegra210-dmic.ko] undefined!" This can be fixed by using div_u64() helper from 'math64.h' header. Fixes: 8c8ff982e9e2 ("ASoC: tegra: Add Tegra210 based DMIC driver") Reported-by: Geert Uytterhoeven Reported-by: Randy Dunlap Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1595492011-2411-1-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 83249952ffab43b82487c1c497f1b49324c602d4 Author: Randy Dunlap Date: Mon Jul 20 11:32:21 2020 -0700 ASoC: ti: fix SND_SOC_J721E_EVM warnings & errors SND_SOC_J721E_EVM should not select SND_SOC_PCM3168A_I2C when I2C is not enabled. That causes build errors, so make this driver's symbol depend on I2C. WARNING: unmet direct dependencies detected for SND_SOC_PCM3168A_I2C Depends on [n]: SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && I2C [=n] Selected by [m]: - SND_SOC_J721E_EVM [=m] && SOUND [=m] && !UML && SND [=m] && SND_SOC [=m] && (DMA_OMAP [=y] || TI_EDMA [=m] || TI_K3_UDMA [=n] || COMPILE_TEST [=y]) && (ARCH_K3_J721E_SOC [=n] || COMPILE_TEST [=y]) ../sound/soc/codecs/pcm3168a-i2c.c:59:1: warning: data definition has no type or storage class module_i2c_driver(pcm3168a_i2c_driver); ^~~~~~~~~~~~~~~~~ ../sound/soc/codecs/pcm3168a-i2c.c:59:1: error: type defaults to ‘int’ in declaration of ‘module_i2c_driver’ [-Werror=implicit-int] ../sound/soc/codecs/pcm3168a-i2c.c:59:1: warning: parameter names (without types) in function declaration ../sound/soc/codecs/pcm3168a-i2c.c:49:26: warning: ‘pcm3168a_i2c_driver’ defined but not used [-Wunused-variable] static struct i2c_driver pcm3168a_i2c_driver = { ^~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors Fixes: 6748d0559059 ("ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)") Signed-off-by: Randy Dunlap Acked-by: Peter Ujfalusi Cc: Peter Ujfalusi Cc: Mark Brown Link: https://lore.kernel.org/r/e74c690c-c7f8-fd42-e461-4f33571df4ef@infradead.org Signed-off-by: Mark Brown commit 3323a148fd79a6c6c8809bb793708bcfa626081d Author: Alexander A. Klimov Date: Sat Jul 18 13:24:03 2020 +0200 ASoC: omap: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200718112403.13709-1-grandmaster@al2klimov.de Signed-off-by: Mark Brown commit 779bedff9bfaf34cae6bfcbdd98d972149f687e5 Author: James Schulman Date: Thu Jul 23 12:03:21 2020 +0100 ASoC: wm_adsp: Support new metadata block ID's Coefficient files now support additional metadata blocks, these contain machine parsable text strings describing the parameters contained in the coefficient file. Signed-off-by: James Schulman Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20200723110321.16382-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 1ce8f643ed875d754ff09bf2096dfac3b905ab80 Author: Alexander A. Klimov Date: Sat Jul 18 13:12:09 2020 +0200 ASoC: fsl: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200718111209.11760-1-grandmaster@al2klimov.de Signed-off-by: Mark Brown commit f68440508deac56a715a0b48c375f557e10692ac Author: Alexander A. Klimov Date: Sat Jul 18 13:08:57 2020 +0200 ASoC: ti: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200718110857.11520-1-grandmaster@al2klimov.de Signed-off-by: Mark Brown commit 49b0aa1b6585705de4a08971602cd2726d9027f0 Author: Miaohe Lin Date: Thu Jul 23 19:13:43 2020 +0800 net/ncsi: use eth_zero_addr() to clear mac address Use eth_zero_addr() to clear mac address insetad of memset(). Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit 8bf9d8eabb88d9eae963a035e58826d3b6a65b53 Author: Miaohe Lin Date: Thu Jul 23 19:05:00 2020 +0800 cxgb4: use eth_zero_addr() to clear mac address Use eth_zero_addr() to clear mac address insetad of memset(). Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller commit a3c8c7f467313f6af15c73d118896291fc7712a4 Merge: 205a55f4e6535 4cf8b7e48a097 Author: David S. Miller Date: Thu Jul 23 11:47:25 2020 -0700 Merge branch 'mptcp-non-backup-subflows-pre-reqs' Paolo Abeni says: ==================== mptcp: non backup subflows pre-reqs This series contains a bunch of MPTCP improvements loosely related to concurrent subflows xmit usage, currently under development. The first 3 patches are actually bugfixes for issues that will become apparent as soon as we will enable the above feature. The later patches improve the handling of incoming additional subflows, improving significantly the performances in stress tests based on a high new connection rate. ==================== Signed-off-by: David S. Miller commit 4cf8b7e48a09745145881b311fe6a9154ba69ebc Author: Paolo Abeni Date: Thu Jul 23 13:02:36 2020 +0200 subflow: introduce and use mptcp_can_accept_new_subflow() So that we can easily perform some basic PM-related adimission checks before creating the child socket. Reviewed-by: Mat Martineau Tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 97e617518cbc318113b034a5fb33f49c81701278 Author: Paolo Abeni Date: Thu Jul 23 13:02:35 2020 +0200 subflow: use rsk_ops->send_reset() tcp_send_active_reset() is more prone to transient errors (memory allocation or xmit queue full): in stress conditions the kernel may drop the egress packet, and the client will be stuck. Reviewed-by: Mat Martineau Tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit b7514694ed2952684a1e4fc44d83682140fd8cef Author: Paolo Abeni Date: Thu Jul 23 13:02:34 2020 +0200 subflow: explicitly check for plain tcp rsk When syncookie are in use, the TCP stack may feed into subflow_syn_recv_sock() plain TCP request sockets. We can't access mptcp_subflow_request_sock-specific fields on such sockets. Explicitly check the rsk ops to do safe accesses. Reviewed-by: Mat Martineau Tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit fa25e815d963115eb06036a8f6a50e724bc259e2 Author: Paolo Abeni Date: Thu Jul 23 13:02:33 2020 +0200 mptcp: cleanup subflow_finish_connect() The mentioned function has several unneeded branches, handle each case - MP_CAPABLE, MP_JOIN, fallback - under a single conditional and drop quite a bit of duplicate code. Reviewed-by: Mat Martineau Tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit b93df08ccda326ef89a6e80fb796588b9a30a980 Author: Paolo Abeni Date: Thu Jul 23 13:02:32 2020 +0200 mptcp: explicitly track the fully established status Currently accepted msk sockets become established only after accept() returns the new sk to user-space. As MP_JOIN request are refused as per RFC spec on non fully established socket, the above causes mp_join self-tests instabilities. This change lets the msk entering the established status as soon as it receives the 3rd ack and propagates the first subflow fully established status on the msk socket. Finally we can change the subflow acceptance condition to take in account both the sock state and the msk fully established flag. Reviewed-by: Mat Martineau Tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 0235d075a592dfde575df81f150feb0d95a5ef5c Author: Paolo Abeni Date: Thu Jul 23 13:02:31 2020 +0200 mptcp: mark as fallback even early ones In the unlikely event of a failure at connect time, we currently clear the request_mptcp flag - so that the MPC handshake is not started at all, but the msk is not explicitly marked as fallback. This would lead to later insertion of wrong DSS options in the xmitted packets, in violation of RFC specs and possibly fooling the peer. Fixes: e1ff9e82e2ea ("net: mptcp: improve fallback to TCP") Reviewed-by: Mat Martineau Tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 53eb4c383deb97b59f1755fe3035ec7992488375 Author: Paolo Abeni Date: Thu Jul 23 13:02:30 2020 +0200 mptcp: avoid data corruption on reinsert When updating a partially acked data fragment, we actually corrupt it. This is irrelevant till we send data on a single subflow, as retransmitted data, if any are discarded by the peer as duplicate, but it will cause data corruption as soon as we will start creating non backup subflows. Reviewed-by: Mat Martineau Tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit b0977bb268db1df6decd3405903ca500721cdc5f Author: Paolo Abeni Date: Thu Jul 23 13:02:29 2020 +0200 subflow: always init 'rel_write_seq' Currently we do not init the subflow write sequence for MP_JOIN subflows. This will cause bad mapping being generated as soon as we will use non backup subflow. Reviewed-by: Mat Martineau Tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 205a55f4e65353dd4846547d376a6f85cdda3d04 Author: Jakub Kicinski Date: Wed Jul 22 12:05:10 2020 -0700 sfc: convert to new udp_tunnel infrastructure Check MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED, before setting the info, which will hopefully protect us from -EPERM errors the previous code was gracefully ignoring. Ed reports this is not the 100% correct bit, but it's the best approximation we have. Shared code reports the port information back to user space, so we really want to know what was added and what failed. Ignoring -EPERM is not an option. The driver does not call udp_tunnel_get_rx_info(), so its own management of table state is not really all that problematic, we can leave it be. This allows the driver to continue with its copious table syncing, and matching the ports to TX frames, which it will reportedly do one day. Leave the feature checking in the callbacks, as the device may remove the capabilities on reset. Inline the loop from __efx_ef10_udp_tnl_lookup_port() into efx_ef10_udp_tnl_has_port(), since it's the only caller now. With new infra this driver gains port replace - when space frees up in a full table a new port will be selected for offload. Plus efx will no longer sleep in an atomic context. v2: - amend the commit message about TRUSTED not being 100% - add TUNNEL_ENCAP_UDP_PORT_ENTRY_INVALID to mark unsed entries Signed-off-by: Jakub Kicinski Acked-By: Edward Cree Signed-off-by: David S. Miller commit b5dbbadb0eb93aaca51d5effeed96b94af150e07 Author: Priti Chattopadhyay Date: Thu Jul 23 14:51:55 2020 +0530 Staging: rtl8188eu: Fix a constant comparison coding style issue Modify equality comparison involving constants by shifting the constant operand to the right side of the comparison as suggested by scripts/checkpatch.pl Signed-off-by: Priti Chattopadhyay Link: https://lore.kernel.org/r/20200723092150.y34bentngeeci2oc@pritichattopadhyay Signed-off-by: Greg Kroah-Hartman commit b311b98d80a9b961cf7a699d03b69661275635e2 Author: Fox Chen Date: Thu Jul 23 17:30:02 2020 +0800 staging: rtl8723bs: Cleanup open brace issues This cleans up open brace issues reported by checkpatch.pl Signed-off-by: Fox Chen Link: https://lore.kernel.org/r/20200723093002.6175-1-foxhlchen@gmail.com Signed-off-by: Greg Kroah-Hartman commit d05c9a9eefd73d3cf4cccb69d859a7f260f8b64e Author: Muhammad Usama Anjum Date: Thu Jul 23 18:21:23 2020 +0500 staging: octeon: Indent with tabs instead of spaces Remove a coding style error. It makes code more readable. Signed-off-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20200723132123.GA26221@musamaanjum Signed-off-by: Greg Kroah-Hartman commit fa74af6b128cc238bf851f0235d4ae5b42108a66 Author: Colin Ian King Date: Thu Jul 23 16:54:15 2020 +0100 staging: unisys: visorhba: remove redundant initialization of variables scsicmd_id and rc The variables scsicmd_id and rc is being initialized with a value that is never read and are being updated later with a new value. The initializations are redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200723155415.994036-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 20a2d16d22f28d27a3312b66d7b276d96e0af271 Author: Muhammad Usama Anjum Date: Thu Jul 23 23:07:23 2020 +0500 staging: octeon: Add the license identifier This patch fixes the checkpatch.pl warning: WARNING: Missing or malformed SPDX-License-Identifier tag Add a the SPDX-License-Identifier tag on line 1 Other files in this folder have GPL-2.0 license. So this file should have the same license which was missing before and checkpatch.pl was giving the warning. Signed-off-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20200723180723.GA30699@musamaanjum Signed-off-by: Greg Kroah-Hartman commit 382683c4a1c36408e352775e8e0e5dd9b4dbf233 Author: Kuninori Morimoto Date: Mon Jul 20 10:19:55 2020 +0900 ASoC: uniphier: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sgdnyoea.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3359128d7fe30be5836ae3e7a257d5b3733bd9b1 Author: Kuninori Morimoto Date: Mon Jul 20 10:19:51 2020 +0900 ASoC: mxs: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tuy3yoef.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8d08d9b00a9f38083b5864e438eda2acba6d55dd Author: Kuninori Morimoto Date: Mon Jul 20 10:19:46 2020 +0900 ASoC: xtensa: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v9ijyoek.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6501cad63ac12eb908fc547ba2a37ccd94d65785 Author: Kuninori Morimoto Date: Mon Jul 20 10:19:41 2020 +0900 ASoC: kirkwood: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wo2zyoeo.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1581db969ca0331af69de0dfd42e7b7b4d2a11e8 Author: Kuninori Morimoto Date: Mon Jul 20 10:19:37 2020 +0900 ASoC: sprd: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y2nfyoes.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9ae035e289379ba31f918198fb6bc789dda7a768 Author: Kuninori Morimoto Date: Mon Jul 20 10:19:32 2020 +0900 ASoC: generic: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zh7vyoex.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3e3b62950ad02758626070b0a023ce9318bd8b63 Author: Kuninori Morimoto Date: Mon Jul 20 10:19:27 2020 +0900 ASoC: codecs: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871rl70yse.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0359c834a2e801bb51c137cf4b008fb5897371fa Author: Kuninori Morimoto Date: Mon Jul 20 10:19:23 2020 +0900 ASoC: bcm: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87365n0ysi.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e287d0464be03212f1c2e1cd258cc9720f228024 Author: Kuninori Morimoto Date: Mon Jul 20 10:19:19 2020 +0900 ASoC: au1x: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874kq30ysm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 371a014d4260e119b5ae9df782af88cc58557df1 Author: Kuninori Morimoto Date: Mon Jul 20 10:19:14 2020 +0900 ASoC: meson: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875zaj0ysr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a7c7ff1a47ff6974b6fc4ab30632cd0ad02797b1 Author: Kuninori Morimoto Date: Mon Jul 20 10:19:05 2020 +0900 ASoC: dwc: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878sff0yt0.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit fdc9a2e469e9e7b7aac7a3cd054cef64d0ca4e0f Author: Kuninori Morimoto Date: Mon Jul 20 10:19:00 2020 +0900 ASoC: qcom: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6zv0yt5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b1839ebf13bbc23f6cce87e9c25f51338db69166 Author: Kuninori Morimoto Date: Mon Jul 20 10:18:52 2020 +0900 ASoC: atmel: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blkb0ytd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0cd08b10ae3b5226ff3433139d56ce6e9f218788 Author: Kuninori Morimoto Date: Mon Jul 20 10:18:48 2020 +0900 ASoC: mediatek: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87d04r0yth.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9f5f078aed9d4dc024c397507a97bbf07e3ac4f3 Author: Kuninori Morimoto Date: Mon Jul 20 10:18:38 2020 +0900 ASoC: fsl: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eep70ytr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ded0054359ddc1bbd9893ce39af22e1ce7a03357 Author: Kuninori Morimoto Date: Mon Jul 20 10:18:34 2020 +0900 ASoC: amd: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ft9n0ytv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5c5eb29e8a68ef3ab523fe75179dde5710cae6de Author: Kuninori Morimoto Date: Mon Jul 20 10:18:28 2020 +0900 ASoC: rockchip: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7u30yu1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d42df9400f1d46453abddb5c626fc24f306d8607 Author: Kuninori Morimoto Date: Mon Jul 20 10:18:24 2020 +0900 ASoC: cirrus: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87imej0yu5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 83b95c2fc0283976c5dab77ef930597219fa61a4 Author: Kuninori Morimoto Date: Mon Jul 20 10:18:20 2020 +0900 ASoC: pxa: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0yz0yua.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c101ce8883be49e971f6cb06bad589d24c0cbf46 Author: Kuninori Morimoto Date: Mon Jul 20 10:18:14 2020 +0900 ASoC: samsung: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfjf0yuf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 28ec78b0f4cc8ee62e0dfe29ea9b2e78c4aad1f9 Author: Kuninori Morimoto Date: Mon Jul 20 10:18:10 2020 +0900 ASoC: sh: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mu3v0yuj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1205300af9dba3ef9f44cf6a02d6ed6ebfa6b8c6 Author: Kuninori Morimoto Date: Mon Jul 20 10:18:06 2020 +0900 ASoC: sof: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/87o8ob0yun.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ddb4f06d620f442c444e010b8af8c001fb4e3d9b Author: Kuninori Morimoto Date: Mon Jul 20 10:18:01 2020 +0900 ASoC: stm: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pn8r0yus.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c09e34b799ee78a673676e71e14ee4fb0145db5e Author: Kuninori Morimoto Date: Mon Jul 20 10:17:57 2020 +0900 ASoC: sunxi: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r1t70yuw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 95ebd023e1c963ef8727776ca158f69ad83ddd92 Author: Kuninori Morimoto Date: Mon Jul 20 10:17:53 2020 +0900 ASoC: tegra: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sgdn0yv1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 02cde14ab59de4f578c8c949483514c22a80273d Author: Kuninori Morimoto Date: Mon Jul 20 10:17:48 2020 +0900 ASoC: ti: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tuy30yv5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3e44c47979b743e02c6af8203c530695c9837c89 Author: Kuninori Morimoto Date: Mon Jul 20 10:17:44 2020 +0900 ASoC: ux500: use asoc_substream_to_rtd() Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v9ij0yv9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0ceef681e34a61afcd77af0837b2132925c5bad4 Author: Kuninori Morimoto Date: Mon Jul 20 10:17:39 2020 +0900 ASoC: soc-xxx: add asoc_substream_to_rtd() Current soc-xxx are getting rtd from substream by rtd = substream->private_data; But, getting data from "private_data" is very unclear. This patch adds asoc_substream_to_rtd() macro which is easy to understand that rtd from substream. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wo2z0yve.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7deff7b5b4395784b194bae3631b8333d3423938 Author: Randy Dunlap Date: Sat Jul 18 17:28:41 2020 -0700 hyperv: hyperv.h: drop a duplicated word Drop the repeated word "the" in a comment. Signed-off-by: Randy Dunlap Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Wei Liu Cc: linux-hyperv@vger.kernel.org Link: https://lore.kernel.org/r/20200719002841.20369-1-rdunlap@infradead.org Signed-off-by: Wei Liu commit 92ca3dd4867bafbfd026b06d53737d61ded1bd27 Author: Tomas Winkler Date: Thu Jul 23 17:59:27 2020 +0300 mei: hw: don't use one element arrays Replace the single element arrays with a simple value type u8 reserved, even thought is is not used for dynamically sized trailing elements it confuses the effort of replacing one-element arrays with flexible arrays for that purpose. Link: https://github.com/KSPP/linux/issues/79 Cc: Gustavo A. R. Silva Reviewed-by: Gustavo A. R. Silva Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200723145927.882743-7-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit c614970e3e5f604f7490e73b465ba66f78f9d715 Author: Tomas Winkler Date: Thu Jul 23 17:59:26 2020 +0300 mei: hw: use sizeof of variable instead of struct type Use sizeof(*dev) + sizeof(*hw) instead of sizeof(struct mei_device) + sizeof(struct mei_me_hw) There is a possibility of bug when variable type has changed but corresponding struct passed to the sizeof has not. Cc: Gustavo A. R. Silva Reviewed-by: Gustavo A. R. Silva Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200723145927.882743-6-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 4b40b225812d1be14c043fcaefe956856a2b8ab0 Author: Tomas Winkler Date: Thu Jul 23 17:59:25 2020 +0300 mei: client: use sizeof of variable instead of struct type There is a possibility of bug when variable type has changed but corresponding struct passed to the sizeof has not. Cc: Gustavo A. R. Silva Reviewed-by: Gustavo A. R. Silva Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200723145927.882743-5-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 71ae5255f8feaf16ab5a41db5db1c6a3d9c68665 Author: Tomas Winkler Date: Thu Jul 23 17:59:24 2020 +0300 mei: bus: use sizeof of variable instead of struct type There is a possibility of bug when variable type has changed but corresponding struct passed to the sizeof has not. Cc: Gustavo A. R. Silva Reviewed-by: Gustavo A. R. Silva Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200723145927.882743-4-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit b4a6700c80f9ecbb848fd1fa3ce72062a7a65e93 Author: Tomas Winkler Date: Thu Jul 23 17:59:23 2020 +0300 mei: ioctl: use sizeof of variable instead of struct type Use sizeof(connect_data))) instead of sizeof(struct mei_connect_client_data) when copying data between user space and kernel. There is a possibility of bug when variable type has changed but corresponding struct passed to the sizeof has not. Cc: Gustavo A. R. Silva Reviewed-by: Gustavo A. R. Silva Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200723145927.882743-3-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit df4b37bcc80d236df53dcc71c8bd9928507101ff Author: Tomas Winkler Date: Thu Jul 23 17:59:22 2020 +0300 mei: hbm: use sizeof of variable instead of struct type There is a possibility of bug when variable type has changed but corresponding struct passed to the sizeof has not. Reviewed-by: Gustavo A. R. Silva Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200723145927.882743-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit e24ca92599cb73ea6d2f768632f4e30b6f9983cf Author: Greg Kroah-Hartman Date: Thu Jul 23 19:29:25 2020 +0200 Revert "mei: Avoid the use of one-element arrays" This reverts commit 3c3b7ddef7879abb2c42422e898145826c79e5f0, as it turns out Tomas made a better series of patches for this same issue. Cc: Gustavo A. R. Silva Cc: Tomas Winkler Signed-off-by: Greg Kroah-Hartman commit 5c5f1baee85ae48b1ff50da4cc5e89f496be702c Author: Harsha Priya Date: Wed Jul 22 08:35:47 2020 -0700 ASoC: Intel: kbl_rt5663_rt5514_max98927: Fix kabylake_ssp_fixup function kabylake_ssp_fixup function uses snd_soc_dpcm to identify the codecs DAIs. The HW parameters are changed based on the codec DAI of the stream. The earlier approach to get snd_soc_dpcm was using container_of() macro on snd_pcm_hw_params. The structures have been modified over time and snd_soc_dpcm does not have snd_pcm_hw_params as a reference but as a copy. This causes the current driver to crash when used. This patch changes the way snd_soc_dpcm is extracted. snd_soc_pcm_runtime holds 2 dpcm instances (one for playback and one for capture). 2 codecs on the SSP are dmic (capture) and speakers (playback). Based on the stream direction, snd_soc_dpcm is extracted from snd_soc_pcm_runtime. Tested for all use cases of the driver. Signed-off-by: Harsha Priya Signed-off-by: Vamshi Krishna Gopal Tested-by: Lukasz Majczak Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/1595432147-11166-1-git-send-email-harshapriya.n@intel.com Signed-off-by: Mark Brown commit 4cb18d13b01142d54a5fab66a2e9f562c08bc23b Author: Rob Herring Date: Tue Jul 21 20:25:11 2020 -0600 PCI: of: Reduce missing non-prefetchable memory region to a warning The pci-rcar-gen2 controller requires only a prefetchable memory region, and the error prevents using pci_parse_request_of_pci_ranges() for it. Let's reduce this to just a warning message so this function can be used for pci-rcar-gen2. Link: https://lore.kernel.org/r/20200722022514.1283916-17-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Bjorn Helgaas Cc: Lorenzo Pieralisi commit b411b2e1adb9aa81d75799272dd484c8045f0b88 Author: Rob Herring Date: Tue Jul 21 20:25:10 2020 -0600 PCI: rcar: Use struct pci_host_bridge.windows list directly There's no need to create a temporary resource list and then splice it to struct pci_host_bridge.windows list. Just use pci_host_bridge.windows directly. The necessary clean-up is already handled by the PCI core. Link: https://lore.kernel.org/r/20200722022514.1283916-16-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Marek Vasut Cc: Yoshihiro Shimoda Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org commit 61f11f8250e2dc7acde8d9e09ddae3a70cbe1a6f Author: Rob Herring Date: Tue Jul 21 20:25:09 2020 -0600 PCI: rcar: Use devm_pci_alloc_host_bridge() Move to the resource managed devm_pci_alloc_host_bridge() and simplify the error path. Link: https://lore.kernel.org/r/20200722022514.1283916-15-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Marek Vasut Cc: Yoshihiro Shimoda Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: linux-renesas-soc@vger.kernel.org commit ec64e2795988322bf33aaf0f0935e0f1b4da0ed2 Author: Rob Herring Date: Tue Jul 21 20:25:08 2020 -0600 PCI: cadence: Remove private bus number and range storage There's no need to store the bus number or range resource as the driver only needs the bus number which is already in the pci_host_bridge. For endpoint mode, the bus number is always 0. Link: https://lore.kernel.org/r/20200722022514.1283916-14-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Tom Joseph Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 06ff98fcc4a7588c7e45833f2092b3a14e66b575 Author: Rob Herring Date: Tue Jul 21 20:25:07 2020 -0600 PCI: cadence: Use bridge resources for outbound window setup Instead of parsing 'ranges' from DT again, use the bridge window resources. Link: https://lore.kernel.org/r/20200722022514.1283916-13-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Tom Joseph Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 4f5c883d7815fc4b5ab10dac74561c3f01defdad Author: Rob Herring Date: Tue Jul 21 20:25:06 2020 -0600 PCI: Move setting pci_host_bridge.busnr out of host drivers Most host drivers only parse the DT bus range to set the root bus number in pci_host_bridge.busnr. The ones that don't set busnr are buggy in that they ignore what's in DT. Let's set busnr in pci_scan_root_bus_bridge() where we already check for the bus resource and remove setting it in host drivers. Link: https://lore.kernel.org/r/20200722022514.1283916-12-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Thomas Petazzoni Cc: Will Deacon Cc: Thierry Reding Cc: Jonathan Hunter Cc: Linus Walleij Cc: Ryder Lee Cc: Marek Vasut Cc: Yoshihiro Shimoda Cc: linux-tegra@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-renesas-soc@vger.kernel.org commit a24c6f7bc923d5e2f3139855eb09b0d480d6b410 Author: Peter Enderborg Date: Thu Jul 16 09:15:11 2020 +0200 debugfs: Add access restriction option Since debugfs include sensitive information it need to be treated carefully. But it also has many very useful debug functions for userspace. With this option we can have same configuration for system with need of debugfs and a way to turn it off. This gives a extra protection for exposure on systems where user-space services with system access are attacked. It is controlled by a configurable default value that can be override with a kernel command line parameter. (debugfs=) It can be on or off, but also internally on but not seen from user-space. This no-mount mode do not register a debugfs as filesystem, but client can register their parts in the internal structures. This data can be readed with a debugger or saved with a crashkernel. When it is off clients get EPERM error when accessing the functions for registering their components. Signed-off-by: Peter Enderborg Link: https://lore.kernel.org/r/20200716071511.26864-3-peter.enderborg@sony.com Signed-off-by: Greg Kroah-Hartman commit 072e133d554bb74929f902582c8cf66d9fd12771 Author: Peter Enderborg Date: Thu Jul 16 09:15:10 2020 +0200 tracefs: Remove unnecessary debug_fs checks. This is a preparation for debugfs restricted mode. We don't need debugfs to trace, the removed check stop tracefs to work if debugfs is not initialised. We instead tries to automount within debugfs and relay on it's handling. The code path is to create a backward compatibility from when tracefs was part of debugfs, it is now standalone and does not need debugfs. When debugfs is in restricted it is compiled in but not active and return EPERM to clients and tracefs wont work if it assumes it is active it is compiled in kernel. Reported-by: kernel test robot Signed-off-by: Peter Enderborg Reviewed-by: Greg Kroah-Hartman Acked-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20200716071511.26864-2-peter.enderborg@sony.com Signed-off-by: Greg Kroah-Hartman commit 9a360a7cae11461ccd933a9ea366b0dcb3afadb0 Author: Mathias Nyman Date: Thu Jul 23 17:45:30 2020 +0300 xhci: dbc: remove tty specific port structure from struct xhci_dbc Use a void pointer that any function driver can use instead. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-28-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 688915b11aa7f8b92d12a2e4672d71e3626a0e6a Author: Mathias Nyman Date: Thu Jul 23 17:45:29 2020 +0300 xhci: dbgcap: remove dbc dependency on dbctty specific flag dbc should not be aware of, or use any dbctty specific variables. currenly dbc driver reads the port->registered flag to see if the callbacks should be called. Only makes these decisions based on dbc internal state instead. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-27-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6ae6470bfa330d0b8892e02888bf5dac2272c28d Author: Mathias Nyman Date: Thu Jul 23 17:45:28 2020 +0300 xhci: dbc: Add a operations structure to access driver functions Don't call dbctty driver functions directly from dbc core code. Introduce a new dbc_driver structure that contains function pointers for disconnect and configure operations. The driver (ttydbc) must provide these opeations when creating a dbc. Name the structure dbc_driver instead of dbc_ops as we plan to add more driver configureable values here, such as vid and pid. Decouples dbc and dbctty. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-26-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4521f16139409cdf9462c7325d43454462cff6c3 Author: Mathias Nyman Date: Thu Jul 23 17:45:27 2020 +0300 xhci: dbctty: split dbc tty driver registration and unregistration functions. Split the dbc tty driver registrations function into separate init and probe parts. The init part will register the tty driver, and should in the future be called from module_init(). The probe part will become the normal probe function, but for now it is called from the init part. The unregister function is s likewise split into remove and exit parts. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-25-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4ee0e36643895e1b82d491e93acb5677d4d733de Author: Mathias Nyman Date: Thu Jul 23 17:45:26 2020 +0300 xhci: dbc: remove endpoint pointers from dbc_port structure dbctty no longer needs references directly to dbc endpoints, so remove them Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-24-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e0aa56dc7b18c80b12a9afd23d90aa6d186f639a Author: Mathias Nyman Date: Thu Jul 23 17:45:25 2020 +0300 xhci: dbc: simplify dbc requests allocation and queueing Don't pass endpoint pointer, dbctty should not be aware of struct dbc_ep, knowing the direction is enough. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-23-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 11e229a7585160c33228a9789405a504b8150525 Author: Mathias Nyman Date: Thu Jul 23 17:45:24 2020 +0300 xhci: dbc: Pass dbc pointer to dbc start and stop functions. xhci_dbc_start() and xhci_dbc_stop() functions only used xhci_hcd pointer to get the dbc pointer. Pass the dbc pointer instead of the xhci_hcd pointer as a parameter No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-22-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit dd98570be1fb3bec14c2347edf4a499aaf7870de Author: Mathias Nyman Date: Thu Jul 23 17:45:23 2020 +0300 xhci: dbc: Pass dbc pointer to dbc memory init and cleanup functions Dbc mem_init and mem_cleanup functions used xhci_hcd to get to the device pointer. The device pointer can be accessed directly from dbc structure, so pass a pointer to dbc as a parameter instead. No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-21-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ac286428c69fb3dc2924ce0ad5a11b5577b2f5da Author: Mathias Nyman Date: Thu Jul 23 17:45:22 2020 +0300 xhci: dbc: don't use generic xhci ring allocation functions for dbc. The generic xhci ring allocations code needs struct xhci_hcd pointer, and it allocates memory for the rings from dma pools created for the xhci device. In order to decouple xhci and DbC we have to create our own ring allocation and free routines for DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-20-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit cb66434e67cc30e2971879fe36e03c8ca7208101 Author: Mathias Nyman Date: Thu Jul 23 17:45:21 2020 +0300 xhci: dbc: Don't use generic xhci context allocation for dbc The DbC context is different from the xhci device context. It's a lot smaller as it only contains three 64 bytes sub-contexts; the info, endpoint-out, and endpoint-in contexts. In total 192 bytes. The context size (CSZ) field in HCCPARAMS1 xhci register does not alter DbC context size like it does for xhci device contexts. So don't use the geneic xhci context memory allocation, or the dma pool that is intended for xhci device contexts. In addition to saving memory this also helps decoupleing xhci and dbc code. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-19-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f39f3afdf9b12cccc42c9db7a855821794bbd76c Author: Mathias Nyman Date: Thu Jul 23 17:45:20 2020 +0300 xhci: dbc: Use dbc structure in the request completion instead of xhci_hcd The dbc request completion callback doesn't need a xhci_hcd pointer. The only user of the xhci_hcd pointer in dbgtty request callback was the xhci_warn() function. Change it to dev_warn() instead. While changing the callback function parameter to dbc in struct xhci_requeset, move the struct xhci_request declaraion down a bit in the header file to avoid compiler warinings No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-18-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 91aaf97471a047bec7c2ef6e59ed1c92359165a2 Author: Mathias Nyman Date: Thu Jul 23 17:45:19 2020 +0300 xhci: dbc: Pass dbc pointer to get_in/out_ep() helper functions to get endpoints Pass dbc pointer instead of struct xhci_hcd pointer to the get_in_ep() and get_out_ep() helper functions. No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-17-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b396fa39de9b47ce3368f65d7d069c7176f26371 Author: Mathias Nyman Date: Thu Jul 23 17:45:18 2020 +0300 xhci: dbgtty: Pass dbc pointer when registering a dbctty device Pass dbc pointer to the xhci_dbc_tty_register_device() and xhci_dbc_tty_unregister_device() functions instead of xhci_hcd pointer These functions don't need a xhci_hcd pointer anymore, only use case was the xhci_err() function, which is now changed to a dev_err() instead. No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-16-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a1f6376df494c2f96530c8f294b7a31053425cff Author: Mathias Nyman Date: Thu Jul 23 17:45:17 2020 +0300 xhci: dbc: Pass dbc pointer to dbc_handle_xfer_event() instead of xhci_hcd pointer The event handling function only used xhci pointer to get the dbc pointer. Pass the dbc pointer instead as a parameter No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-15-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 903089b7b9d85096f06bee3ee5715fe85b4e8651 Author: Mathias Nyman Date: Thu Jul 23 17:45:16 2020 +0300 xhci: dbc: Change to pass dbc pointer to xhci_do_dbc_stop() Pass the dbc pointer instead of xhci_hcd pointer in order to decouple xhci and dbc. xhci_do_dbc_stop() only used xhci to get the dbc pointer. Pass the dbc pointer instead as a parameter No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-14-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d3249fa9177f7f425ac4a48b0c8caf28f77b9d52 Author: Mathias Nyman Date: Thu Jul 23 17:45:15 2020 +0300 xhci: dbc: Pass dbc pointer to endpoint init and exit functions. struct xhci_hcd pointer is not needed for dbc endpoint init and exit, it was only used to get to the dbc structure. Pass the dbc pointer as a parameter to these functions instead. No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-13-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ed7bffee0216b7ffeecfd5736b167118c8ddd2de Author: Mathias Nyman Date: Thu Jul 23 17:45:14 2020 +0300 xhci: dbc: Get the device pointer from dbc structure in dbc_ep_do_queue() dbc_ep_do_queue() can now get the device pointer directly from dbc structure instead of going through the xhci_hcd structure. No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-12-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1da49a26af6cce364f3608b36ccf6612d80eddbc Author: Mathias Nyman Date: Thu Jul 23 17:45:13 2020 +0300 xhci: dbc: Don't pass the xhci pointer as a parameter to xhci_dbc_init_context() xhci_dbc_init_context() no longer needs the struct xhci_hcd pointer. Pass the dbc pointer directly instead. No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-11-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7cd6312e09be4f271885be9e89d092058e536539 Author: Mathias Nyman Date: Thu Jul 23 17:45:12 2020 +0300 xhci: dbc: Don't use xhci_write_64() as it takes xhci as a parameter xhci_write_64() is essentially a wrapper for lo_hi_writeq(), but it requires struct xhci_hcd * as a parameter. Use lo_hi_writeq() directly instead No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-10-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 985247fe4c524eeffd94e7af486ffa6cc9a2fc53 Author: Mathias Nyman Date: Thu Jul 23 17:45:11 2020 +0300 xhci: dbc: Use dev_info() and similar instead of xhci_info() To make this change possible we also need to change dbc_handle_port_status() to take dbc pointer as parameter instead of xhci_hcd pointer. Note that xhci_info() used xhci_to_hcd(xhci)->self.controller as the device while for dev_info we use xhci_to_hcd(xhci)->self.sysdev. In many cases those are the same, but not for some device where a dwc3 controller creates a xhci platform device. In th this case self.controller may be the platform device while self.sysdev is the actual device known to firmware (dwc3). This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-9-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit be33f4809351e722689539a21f0373982de46637 Author: Mathias Nyman Date: Thu Jul 23 17:45:10 2020 +0300 xhci: dbc: Add device pointer to dbc structure Currently the dbc structure contains a pointer to struct xhci_hcd, and dbc functions use that to dig up the underlying device pointer. We are trying to decouple xhci and dbc code, and prepare for code that use dbc such as dbctty into into real device drivers. This is one step along the way. Keep functionality the same and keep the xhci pointer, and let the new device pointer point to the xhci device for now. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bcf87ea6e2d08eab75ba2aa53336a630421becfb Author: Mathias Nyman Date: Thu Jul 23 17:45:09 2020 +0300 xhci: dbc: Remove dbc_dma_free_coherent() wrapper dbc_dma_free_coherent() takes struct xhci_hcd pointer as a parameter, but does nothing more than calls dma_free_coherent(). Remove it and call dma_free_coherent() directly instead. No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-7-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c9dd94385d48529da7a2eb88963883b8080e83d9 Author: Mathias Nyman Date: Thu Jul 23 17:45:08 2020 +0300 xhci: dbc: Remove dbc_dma_alloc_coherent() wrapper dbc_dma_alloc_coherent() takes struct xhci_hcd pointer as an parameter, but does nothing more than calls dma_alloc_coherent(). Remove it and call dma_alloc_coherent() directly instead. No functional changes This change helps decoupling xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0b832e997436d0336257cdc1bf2e265234239094 Author: Mathias Nyman Date: Thu Jul 23 17:45:07 2020 +0300 xhci: dbc: Don't use generic xhci erst allocation and free functions The generic erst allocation and free functions take struct xhci_hcd pointer as a parameter. Create own erst helpers for DbC in order to decouple xhci and DbC Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e3bc8004bde77e899e8d19487440f27b55e216b2 Author: Mathias Nyman Date: Thu Jul 23 17:45:06 2020 +0300 xhci: Don't pass struct xhci_hcd pointer to xhci_link_seg() It's only used to dig out if we need to set a chain flag for specific hosts. Pass the flag directly as a parameter instead. No functional changes. xhci_link_seg() is also used by DbC code, this change helps decoupling xhci and DbC. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5b43a2a84bac79fe8814949f5e173f83a5436c71 Author: Mathias Nyman Date: Thu Jul 23 17:45:05 2020 +0300 xhci: dbc: Don't use generic xhci inc_deq() function for dbc The generic inc_deq() helper takes struct xhci_hcd pointer as a parameter, and is a lot more complex than needed for the DbC usecase. In order to decouple xhci and DbC we have to create our own small inc_evt_deq() helper, not relying on xhci. Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8aaf19b8ec78748b80c73319d48413dd26fecb3d Author: Kai-Heng Feng Date: Thu Jul 23 17:45:04 2020 +0300 xhci: Make debug message consistent with bus and port number Current xhci debug message doesn't always output bus number, so it's hard to figure out it's from USB2 or USB3 root hub. In addition to that, some port numbers are offset to 0 and others are offset to 1. Use the latter to match the USB core. So use "bus number - port index + 1" to make debug message consistent. Signed-off-by: Kai-Heng Feng Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20200723144530.9992-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5ecafc120bbea614c9d29d0ee2cbb77bbb786059 Author: 周琰杰 (Zhou Yanjie) Date: Thu Jul 23 01:18:04 2020 +0800 clocksource/drivers/ingenic: Add support for the Ingenic X1000 OST. X1000 and SoCs after X1000 (such as X1500 and X1830) had a separate OST, it no longer belongs to TCU. This driver will register both a clocksource and a sched_clock to the system. Tested-by: 周正 (Zhou Zheng) Co-developed-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 漆鹏振 (Qi Pengzhen) Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200722171804.97559-3-zhouyanjie@wanyeetech.com commit ac756d05c468e535380c7b4b102105793c5d095e Author: 周琰杰 (Zhou Yanjie) Date: Thu Jul 23 01:18:03 2020 +0800 dt-bindings: timer: Add Ingenic X1000 OST bindings. Add the OST bindings for the X1000 SoC from Ingenic. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200722171804.97559-2-zhouyanjie@wanyeetech.com commit dcf30fc0ca9e2df2f5f9daddd1a0ab8f1ccbc9e4 Author: Alexander A. Klimov Date: Wed Jul 8 18:58:56 2020 +0200 clocksource/drivers: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200708165856.15322-1-grandmaster@al2klimov.de commit aaea0b83458cdb3467e27deb7403b4403152dbd6 Author: Linus Walleij Date: Mon Jun 29 00:01:53 2020 +0200 clocksource/drivers/nomadik-mtu: Handle 32kHz clock It happens on the U8420-sysclk Ux500 PRCMU firmware variant that the MTU clock is just 32768 Hz, and in this mode the minimum ticks is 5 rather than two. I think this is simply so that there is enough time for the register write to propagate through the interconnect to the registers. Signed-off-by: Linus Walleij Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200628220153.67011-1-linus.walleij@linaro.org commit ad7794d4dd0c3f03a81a0dbec3e9e3906edb9893 Author: Geert Uytterhoeven Date: Thu Jun 18 10:02:12 2020 +0200 clocksource/drivers/sh_cmt: Use "kHz" for kilohertz "K" stands for "kelvin". Signed-off-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200618080212.16560-1-geert+renesas@glider.be commit a6d0812a081defd8bef5453c7b69a1cb4735a170 Author: Anson Huang Date: Wed Jul 8 11:16:07 2020 +0800 clocksource/drivers/imx: Add support for i.MX TPM driver with ARM64 Allows building and compile-testing the i.MX TPM driver for ARM64. Signed-off-by: Anson Huang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1594178168-13007-1-git-send-email-Anson.Huang@nxp.com commit f19d838d08fc1cde742dedafa776a865e1682e63 Author: 周琰杰 (Zhou Yanjie) Date: Thu Jun 25 01:07:49 2020 +0800 clocksource/drivers/ingenic: Add high resolution timer support for SMP/SMT. Enable clock event handling on per CPU core basis. Make sure that interrupts raised on the first core execute event handlers on the correct CPU core. This driver is required by Ingenic processors that support SMP/SMT, such as JZ4780 and X2000. Tested-by: H. Nikolaus Schaller Tested-by: Paul Boddie Signed-off-by: Paul Cercueil Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200624170749.31762-2-zhouyanjie@wanyeetech.com commit 20f7151d63abbb5281ec036197ed822843be1ebf Author: Grigore Popescu Date: Fri Jul 17 18:48:00 2020 +0300 bus: fsl-mc: probe the allocatable objects first Because the DPNIs are probed before DPMCPs and other objects that need to be allocated, messages like "No more resources of type X left" are printed by the fsl-mc bus driver. This patch resolves the issue by probing the allocatable objects first and then any other object that may use them. Signed-off-by: Grigore Popescu Signed-off-by: Ioana Ciornei Reviewed-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20200717154800.17169-4-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 9a872def598195d2de4a4a74e17804142e2aa78e Author: Laurentiu Tudor Date: Fri Jul 17 18:47:59 2020 +0300 bus: fsl-mc: use raw spin lock to serialize mc cmds Replace the spinlock that serializes the MC commands with a raw spinlock. This is needed for the RT kernel because there are MC commands sent in interrupt context. Signed-off-by: Laurentiu Tudor Signed-off-by: Ioana Ciornei Reviewed-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20200717154800.17169-3-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit a3b7a581823857fab4fae71be9d1c830af78a766 Author: Ioana Ciornei Date: Fri Jul 17 18:47:58 2020 +0300 bus: fsl-mc: add missing device types The MC bus has different types of devices that can be discovered on the bus. Add the missing device types. Signed-off-by: Ioana Ciornei Reviewed-by: Laurentiu Tudor Link: https://lore.kernel.org/r/20200717154800.17169-2-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit b07b616214857c9db01e2807cde2f6bba8019fc3 Author: Hanks Chen Date: Thu Jul 23 19:19:51 2020 +0800 pinctrl: mediatek: update pinmux definitions for mt6779 Add devicetree bindings for Mediatek mt6779 SoC Pin Controller. Signed-off-by: Mars Cheng Signed-off-by: Andy Teng Signed-off-by: Hanks Chen Acked-by: Sean Wang Link: https://lore.kernel.org/r/1595503197-15246-2-git-send-email-hanks.chen@mediatek.com Signed-off-by: Linus Walleij commit b292b50b0efcc7095d8bf15505fba6909bb35dce Author: Tetsuo Handa Date: Mon Jul 13 11:12:54 2020 +0900 driver core: Fix probe_count imbalance in really_probe() syzbot is reporting hung task in wait_for_device_probe() [1]. At least, we always need to decrement probe_count if we incremented probe_count in really_probe(). However, since I can't find "Resources present before probing" message in the console log, both "this message simply flowed off" and "syzbot is not hitting this path" will be possible. Therefore, while we are at it, let's also prepare for concurrent wait_for_device_probe() calls by replacing wake_up() with wake_up_all(). [1] https://syzkaller.appspot.com/bug?id=25c833f1983c9c1d512f4ff860dd0d7f5a2e2c0f Reported-by: syzbot Fixes: 7c35e699c88bd607 ("driver core: Print device when resources present in really_probe()") Cc: Geert Uytterhoeven Signed-off-by: Tetsuo Handa Cc: stable Link: https://lore.kernel.org/r/20200713021254.3444-1-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman commit 290a9f937e5a8b4eb41f7e48237816dc6ba0c783 Author: Fabien Dessenne Date: Mon Jun 15 14:44:56 2020 +0200 pinctrl: stm32: use the hwspin_lock_timeout_in_atomic() API Use the hwspin_lock_timeout_in_atomic() API which is the most appropriated here. Indeed: - hwspin_lock_() is called after spin_lock_irqsave() - the hwspin_lock_timeout() API relies on jiffies count which won't work if IRQs are disabled which is the case here. Signed-off-by: Fabien Dessenne Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20200615124456.27328-1-alexandre.torgue@st.com Signed-off-by: Linus Walleij commit 8fc3ed3a474d76cd76dd0a154ea904373e9a5530 Author: Colton Lewis Date: Thu Jul 23 09:58:28 2020 +0000 gpio: Correct kernel-doc inconsistency Fix kernel-doc comment to match parameter name change "chip" to "gc" in gpiochip_add_data function. Signed-off-by: Colton Lewis Link: https://lore.kernel.org/r/20200723095658.234668-1-colton.w.lewis@protonmail.com Signed-off-by: Linus Walleij commit 8f27d659dfe67f4d70ba31120d7118055823f667 Author: Vaibhav Gupta Date: Mon Jul 20 15:47:23 2020 +0530 cardreader/rtsx_pcr.c: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), etc. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use device_wakeup_disable() instead. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200720101722.145211-1-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4530a840e74eface949dc4255b66ad640c0521b9 Author: Linus Walleij Date: Wed Jul 22 13:06:49 2020 +0200 gpio: pci-idio-16: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Also move the IRQ initialization to the special .init_hw() callback. Signed-off-by: Linus Walleij Acked-by: William Breathitt Gray Cc: William Breathitt Gray Link: https://lore.kernel.org/r/20200722110649.202223-1-linus.walleij@linaro.org commit 866e863edb9bdffb06b216908998d4639a7b165d Author: Linus Walleij Date: Wed Jul 22 13:00:27 2020 +0200 gpio: pcie-idio-24: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Acked-by: William Breathitt Gray Cc: William Breathitt Gray Link: https://lore.kernel.org/r/20200722110027.192782-1-linus.walleij@linaro.org commit 82e4613d3d14c6551dd6d96896fd1b9e966afbab Author: Linus Walleij Date: Wed Jul 22 12:55:17 2020 +0200 gpio: 104-idio-16: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Also move the IRQ initialization to the special .init_hw() callback. Signed-off-by: Linus Walleij Acked-by: William Breathitt Gray Cc: William Breathitt Gray Link: https://lore.kernel.org/r/20200722105517.186137-1-linus.walleij@linaro.org commit 44b01cf5d24286fe54301dca7a58afb8d01a1deb Author: Linus Walleij Date: Wed Jul 22 12:48:20 2020 +0200 gpio: 104-idi-48: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Also move the IRQ initialization to the special .init_hw() callback. Signed-off-by: Linus Walleij Acked-by: William Breathitt Gray Cc: William Breathitt Gray Link: https://lore.kernel.org/r/20200722104820.174654-1-linus.walleij@linaro.org commit 2fa1d392cdf49d9785f2fc67acca3c8db9a99036 Author: Linus Walleij Date: Wed Jul 22 12:39:15 2020 +0200 gpio: 104-dio-48e: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Also move the IRQ initialization to the special .init_hw() callback. Signed-off-by: Linus Walleij Acked-by: William Breathitt Gray Cc: William Breathitt Gray Link: https://lore.kernel.org/r/20200722103915.162156-1-linus.walleij@linaro.org commit fceb7ab3854b7b8d13d771b9164ef0be546af673 Author: Linus Walleij Date: Wed Jul 22 12:19:38 2020 +0200 gpio: ws16c48: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit call to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Also move the IRQ initialization to the special .init_hw() callback. Signed-off-by: Linus Walleij Acked-by: William Breathitt Gray Cc: William Breathitt Gray Link: https://lore.kernel.org/r/20200722101938.151265-1-linus.walleij@linaro.org commit bde8c0e64c78633612aaf283692f72bef0bbc549 Author: Drew Fustini Date: Wed Jul 22 14:07:56 2020 +0200 gpio: omap: improve coding style for pin config flags Change the handling of pin config flags from if/else to switch statement to make the code more readable and cleaner. Suggested-by: Gustavo A. R. Silva Signed-off-by: Drew Fustini Acked-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200722120755.230741-1-drew@beagleboard.org Signed-off-by: Linus Walleij commit ecb55df8f3a8f30cb188a8bd3c9d0b977eb92e09 Author: Linus Walleij Date: Wed Jul 22 09:34:26 2020 +0200 gpio: dln2: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Tested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Daniel Baluta Cc: Daniel Baluta Cc: Octavian Purdila Link: https://lore.kernel.org/r/20200722073426.38890-1-linus.walleij@linaro.org commit 57597e150f1b589046bf0da865eeee2b58792079 Author: Linus Walleij Date: Tue Jul 21 14:52:23 2020 +0200 pinctrl: mcp23s08: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Reviewed-by: Andy Shevchenko Cc: Andy Shevchenko Cc: Jan Kundrát Cc: Phil Reid Cc: Lars Poeschel Cc: Jason Kridner Link: https://lore.kernel.org/r/20200721125223.344411-1-linus.walleij@linaro.org commit 0a04d767af8cf1498a73b8f20dc727e2eb74ff28 Author: Linus Walleij Date: Tue Jul 21 15:25:37 2020 +0200 pinctrl: sx150x: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Acked-by: Neil Armstrong Cc: Peter Rosin Cc: Andrey Smirnov Cc: Neil Armstrong Link: https://lore.kernel.org/r/20200721132537.362160-1-linus.walleij@linaro.org commit 3ed75c545d472274ae0aab5a7fd39e15828c2b62 Merge: 571a9cf12a855 93ca8ac2e8fce Author: Arnd Bergmann Date: Thu Jul 23 14:02:53 2020 +0200 Merge tag 'v5.9-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Biggest part is the addition of the rk3288 variant of the VMARC SOM and it's Rock Pi N8 icarnation. This brings some arm64 dts-changes with it as the underlying Dalang carrier board is shared by both an arm32 rk3288 SOM and an arm64 rk3399 SOM (Rock Pi N10). Other than that rk3288 gets its ohci node added that only works on the fixed rk3288w variant of the soc and some asorted fixes and improvements for dt-binding-check. * tag 'v5.9-rockchip-dts32-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Add PCIe for RockPI N10 ARM: dts: rockchip: Add HDMI out for RockPI N8/N10 ARM: dts: rockchip: Add USB for RockPI N8/N10 ARM: dts: rockchip: Add usb host0 ohci node for rk3288 ARM: dts: rockchip: Fix VBUS on rk3288-vyasa ARM: dts: rockchip: Add Radxa Rock Pi N8 initial support ARM: dts: rockchip: Add VMARC RK3288 SOM initial support dt-bindings: arm: rockchip: Add Rock Pi N8 binding arm64: dts: rk3399pro: vmarc-som: Move common properties into Carrier arm64: dts: rk3399pro: vmarc-som: Move supply regulators into Carrier arm64: dts: rk3399pro: vmarc-som: Fix sorting nodes, properties ARM: dts: rockchip: dalang-carrier: Move i2c nodes into SOM ARM: dts: rockchip: Add 'arm,pl330-periph-burst' for dmac ARM: dts: rockchip: Add marvell BT irq config ARM: dts: rockchip: rename label and nodename pinctrl subnodes that end with gpio Link: https://lore.kernel.org/r/2472314.kD9Egx1jfM@phil Signed-off-by: Arnd Bergmann commit 571a9cf12a8557ad01d822929e74fd44300d9b2d Merge: 67598a474fbbb 505af9184ec0a Author: Arnd Bergmann Date: Thu Jul 23 14:00:39 2020 +0200 Merge tag 'v5.9-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt Fuel gauge for Pinebook Pro, the newly added periph-burst flag for pl330s, first tiny part of the rk3399 camera infrastructure and cleanups + making dt-binding-check even happier. * tag 'v5.9-rockchip-dts64-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: Add 'arm,pl330-periph-burst' for dmac arm64: dts: rockchip: remove bus-width from mmc nodes in px30 dts files arm64: dts: rockchip: add rx0 mipi-phy for rk3399 arm64: dts: rockchip: rename and label gpio-led subnodes part 2 arm64: dts: rockchip: rename label and nodename pinctrl subnodes that end with gpio arm64: dts: rockchip: fix rk3399-puma gmac reset gpio arm64: dts: rockchip: fix rk3399-puma vcc5v0-host gpio arm64: dts: rockchip: fix rk3368-lion gmac reset gpio arm64: dts: rockchip: set rockpro64 usbc dr_mode as host arm64: dts: rockchip: add fuel gauge to Pinebook Pro dts Link: https://lore.kernel.org/r/2221560.KYr1Tee2JR@phil Signed-off-by: Arnd Bergmann commit 916f8b627288039d9e771a9b2ab1b3c79b303039 Author: Amelie Delaunay Date: Tue Jun 16 16:07:16 2020 +0200 usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15 SoCs If usb-role-switch is present in the device tree, it means that ID and Vbus signals are not connected to the OTG controller but to an external component (GPIOs, Type-C controller). In this configuration, usb role switch is used to force valid sessions on STM32MP15 SoCs. Acked-by: Minas Harutyunyan Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi commit bc0f0d4a5853e32ba97a0318f774570428fc5634 Author: Amelie Delaunay Date: Tue Jun 16 16:07:15 2020 +0200 usb: dwc2: override PHY input signals with usb role switch support This patch adds support for usb role switch to dwc2, by using overriding control of the PHY voltage valid and ID input signals. iddig signal (ID) can be overridden: - when setting GUSBCFG_FORCEHOSTMODE, iddig input pin is overridden with 1; - when setting GUSBCFG_FORCEDEVMODE, iddig input pin is overridden with 0. avalid/bvalid/vbusvalid signals can be overridden respectively with: - GOTGCTL_AVALOEN + GOTGCTL_AVALOVAL - GOTGCTL_BVALOEN + GOTGCTL_BVALOVAL - GOTGCTL_VBVALEN + GOTGCTL_VBVALOVAL It is possible to determine valid sessions thanks to usb role switch: - if USB_ROLE_NONE then !avalid && !bvalid && !vbusvalid - if USB_ROLE_DEVICE then !avalid && bvalid && vbusvalid - if USB_ROLE_HOST then avalid && !bvalid && vbusvalid Acked-by: Minas Harutyunyan Signed-off-by: Amelie Delaunay Signed-off-by: Felipe Balbi commit 0ae3b13aab210e2a8c14371731abddfee228ae24 Author: Ard Biesheuvel Date: Tue Jul 21 10:33:15 2020 +0200 arm64/entry: deduplicate SW PAN entry/exit routines Factor the 12 copies of the SW PAN entry and exit code into callable subroutines, and use alternatives patching to either emit a 'bl' instruction to call them, or a NOP if h/w PAN is found to be available at runtime. Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20200721083315.4816-1-ardb@kernel.org Signed-off-by: Catalin Marinas commit 21ee9b1995fc01510352d4a55c5316283293b020 Author: Christophe JAILLET Date: Sat Jul 18 09:02:46 2020 +0200 misc: hpilo: avoid a useless memset Avoid a memset after a call to 'dma_alloc_coherent()'. This is useless since commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20200718070246.338016-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 146f90afed258b409104aa6ecc421b823ea1b406 Author: Christophe JAILLET Date: Sat Jul 18 09:02:24 2020 +0200 misc: hpilo: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'ilo_ccb_setup()' GFP_ATOMIC must be used because a spin_lock is hold in 'ilo_open()' before calling 'ilo_ccb_setup()' @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20200718070224.337964-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 158807de5822d1079e162a3762956fd743dd483e Author: Nick Desaulniers Date: Mon Jul 20 13:49:25 2020 -0700 x86/uaccess: Make __get_user_size() Clang compliant on 32-bit Clang fails to compile __get_user_size() on 32-bit for the following code: long long val; __get_user(val, usrptr); with: error: invalid output size for constraint '=q' GCC compiles the same code without complaints. The reason is that GCC and Clang are architecturally different, which leads to subtle issues for code that's invalid but clearly dead, i.e. with code that emulates polymorphism with the preprocessor and sizeof. GCC will perform semantic analysis after early inlining and dead code elimination, so it will not warn on invalid code that's dead. Clang strictly performs optimizations after semantic analysis, so it will warn for dead code. Neither Clang nor GCC like this very much with -m32: long long ret; asm ("movb $5, %0" : "=q" (ret)); However, GCC can tolerate this variant: long long ret; switch (sizeof(ret)) { case 1: asm ("movb $5, %0" : "=q" (ret)); break; case 8:; } Clang, on the other hand, won't accept that because it validates the inline asm for the '1' case before the optimisation phase where it realises that it wouldn't have to emit it anyway. If LLVM (Clang's "back end") fails such as during instruction selection or register allocation, it cannot provide accurate diagnostics (warnings / errors) that contain line information, as the AST has been discarded from memory at that point. While there have been early discussions about having C/C++ specific language optimizations in Clang via the use of MLIR, which would enable such earlier optimizations, such work is not scoped and likely a multi-year endeavor. It was discussed to change the asm output constraint for the one byte case from "=q" to "=r". While it works for 64-bit, it fails on 32-bit. With '=r' the compiler could fail to chose a register accessible as high/low which is required for the byte operation. If that happens the assembly will fail. Use a local temporary variable of type 'unsigned char' as output for the byte copy inline asm and then assign it to the real output variable. This prevents Clang from failing the semantic analysis in the above case. The resulting code for the actual one byte copy is not affected as the temporary variable is optimized out. [ tglx: Amended changelog ] Reported-by: Arnd Bergmann Reported-by: David Woodhouse Reported-by: Dmitry Golovin Reported-by: Linus Torvalds Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Sedat Dilek Acked-by: Linus Torvalds Acked-by: Dennis Zhou Link: https://bugs.llvm.org/show_bug.cgi?id=33587 Link: https://github.com/ClangBuiltLinux/linux/issues/3 Link: https://github.com/ClangBuiltLinux/linux/issues/194 Link: https://github.com/ClangBuiltLinux/linux/issues/781 Link: https://lore.kernel.org/lkml/20180209161833.4605-1-dwmw2@infradead.org/ Link: https://lore.kernel.org/lkml/CAK8P3a1EBaWdbAEzirFDSgHVJMtWjuNt2HGG8z+vpXeNHwETFQ@mail.gmail.com/ Link: https://lkml.kernel.org/r/20200720204925.3654302-12-ndesaulniers@google.com commit 6176a5f32751b9531980a2f23dca73d597d182e6 Author: Rob Herring Date: Tue Jul 21 20:25:05 2020 -0600 PCI: rcar: Use pci_is_root_bus() to check if bus is root bus Use pci_is_root_bus() rather than tracking the root bus number to determine if the bus is the root bus or not. This removes storing duplicated data as well as the need for the host bridge driver to have to care about the bus numbers in most cases. Link: https://lore.kernel.org/r/20200722022514.1283916-11-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Marek Vasut Cc: Yoshihiro Shimoda Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: linux-renesas-soc@vger.kernel.org commit d84c572de1a360501d2e439ac632126f5facf59d Author: Rob Herring Date: Tue Jul 21 20:25:04 2020 -0600 PCI: rockchip: Use pci_is_root_bus() to check if bus is root bus Use pci_is_root_bus() rather than tracking the root bus number to determine if the bus is the root bus or not. This removes storing duplicated data as well as the need for the host bridge driver to have to care about the bus numbers in most cases. Also, bridge->busnr is never set so effectively the root bus must be 0. This will be fixed by a subsequent commit. Link: https://lore.kernel.org/r/20200722022514.1283916-10-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Shawn Lin Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org commit 49169c255c9906ce8fc9570045a4f5519ecd99b8 Author: Rob Herring Date: Tue Jul 21 20:25:03 2020 -0600 PCI: xilinx: Use pci_is_root_bus() to check if bus is root bus Use pci_is_root_bus() rather than tracking the root bus number to determine if the bus is the root bus or not. This removes storing duplicated data as well as the need for the host bridge driver to have to care about the bus numbers in most cases. There was also a bug that the root_busno is never set which means the root bus number is always 0 even if the DT said something else. Link: https://lore.kernel.org/r/20200722022514.1283916-9-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Michal Simek Cc: linux-pci@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org commit 77fc9aa9694323b20bd9bde8627dd129d02dbdaa Author: Rob Herring Date: Tue Jul 21 20:25:02 2020 -0600 PCI: xilinx-nwl: Use pci_is_root_bus() to check if bus is root bus Use pci_is_root_bus() rather than tracking the root bus number to determine if the bus is the root bus or not. This removes storing duplicated data as well as the need for the host bridge driver to have to care about the bus numbers in most cases. There was also a bug that the pci_host_bridge.busnr is set from root_busno, but root_busno is never set which means the root bus number is always 0 even if the DT said something else. Link: https://lore.kernel.org/r/20200722022514.1283916-8-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Michal Simek commit 388637d972db7286f56f076596443971dd193292 Author: Rob Herring Date: Tue Jul 21 20:25:01 2020 -0600 PCI: mobiveil: Use pci_is_root_bus() to check if bus is root bus Use pci_is_root_bus() rather than tracking the root bus number to determine if the bus is the root bus or not. This removes storing duplicated data as well as the need for the host bridge driver to have to care about the bus numbers in most cases. Link: https://lore.kernel.org/r/20200722022514.1283916-7-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Karthikeyan Mitran Cc: Hou Zhiqiang Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 552549386624583bfdbd1da7c5eeba951fd94336 Author: Rob Herring Date: Tue Jul 21 20:25:00 2020 -0600 PCI: designware: Use pci_is_root_bus() to check if bus is root bus Use pci_is_root_bus() rather than tracking the root bus number to determine if the bus is the root bus or not. This removes storing duplicated data as well as the need for the host bridge driver to have to care about the bus numbers in most cases. Link: https://lore.kernel.org/r/20200722022514.1283916-6-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Richard Zhu Cc: Lucas Stach Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Murali Karicheri Cc: Jingoo Han Cc: Gustavo Pimentel commit 11e97973607fab2131be2a378c7da90a9729cc21 Author: Rob Herring Date: Tue Jul 21 20:24:59 2020 -0600 PCI: aardvark: Use pci_is_root_bus() to check if bus is root bus Use pci_is_root_bus() rather than tracking the root bus number to determine if the bus is the root bus or not. This removes storing duplicated data as well as the need for the host bridge driver to have to care about the bus numbers in most cases. Link: https://lore.kernel.org/r/20200722022514.1283916-5-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Thomas Petazzoni Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit d3bb94d06aae0f47d492f2999d024d58ce1baea9 Author: Rob Herring Date: Tue Jul 21 20:24:58 2020 -0600 PCI: Drop unnecessary zeroing of bridge fields The struct pci_host_bridge is 0 initialized when allocated, so there's no need to explicitly set fields to 0. Link: https://lore.kernel.org/r/20200722022514.1283916-4-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 6a589900d05091dfec6d9d1f35245a6578cccee6 Author: Rob Herring Date: Tue Jul 21 20:24:57 2020 -0600 PCI: Set default bridge parent device The host bridge's parent device is always the platform device. As we already have a pointer to it in the devres functions, let's initialize the parent device. Drivers can still override the parent if desired. Link: https://lore.kernel.org/r/20200722022514.1283916-3-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit 79cbde56f98bec1c50f4c4ce15f5251a6a4348dd Author: Rob Herring Date: Tue Jul 21 20:24:56 2020 -0600 PCI: versatile: Drop flag PCI_ENABLE_PROC_DOMAINS PCI_ENABLE_PROC_DOMAINS is only used on powerpc and doesn't do anything for the Versatile host driver, so let's drop it. I'm not sure how or why I had this to begin with. PCI_ENABLE_PROC_DOMAINS was never used on ARM. Link: https://lore.kernel.org/r/20200722022514.1283916-2-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas commit da30e8bc9accaf74505bff4b16b792a01d6d1c0b Author: Dejin Zheng Date: Tue May 26 23:09:54 2020 +0800 PCI: controller: Remove duplicate error message devm_pci_remap_cfg_resource() will print an error message by itself when goes wrong, so remove the duplicate error message. Link: https://lore.kernel.org/r/20200526150954.4729-1-zhengdejin5@gmail.com Signed-off-by: Dejin Zheng Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 4719ffecbb0659faf1fd39f4b8eb2674f0042890 Author: Brian Gerst Date: Mon Jul 20 13:49:24 2020 -0700 x86/percpu: Remove unused PER_CPU() macro Also remove now unused __percpu_mov_op. Signed-off-by: Brian Gerst Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Nick Desaulniers Acked-by: Peter Zijlstra (Intel) Acked-by: Linus Torvalds Acked-by: Dennis Zhou Link: https://lkml.kernel.org/r/20200720204925.3654302-11-ndesaulniers@google.com commit c94055fe93c8d00bfa23fa2cb9af080f7fc53aa0 Author: Brian Gerst Date: Mon Jul 20 13:49:23 2020 -0700 x86/percpu: Clean up percpu_stable_op() Use __pcpu_size_call_return() to simplify this_cpu_read_stable(). Also remove __bad_percpu_size() which is now unused. Signed-off-by: Brian Gerst Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Nick Desaulniers Acked-by: Linus Torvalds Acked-by: Peter Zijlstra (Intel) Acked-by: Dennis Zhou Link: https://lkml.kernel.org/r/20200720204925.3654302-10-ndesaulniers@google.com commit ebcd580bed4a357ea894e6878d9099b3919f727f Author: Brian Gerst Date: Mon Jul 20 13:49:22 2020 -0700 x86/percpu: Clean up percpu_cmpxchg_op() The core percpu macros already have a switch on the data size, so the switch in the x86 code is redundant and produces more dead code. Also use appropriate types for the width of the instructions. This avoids errors when compiling with Clang. Signed-off-by: Brian Gerst Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Nick Desaulniers Acked-by: Linus Torvalds Acked-by: Peter Zijlstra (Intel) Acked-by: Dennis Zhou Link: https://lkml.kernel.org/r/20200720204925.3654302-9-ndesaulniers@google.com commit 73ca542fbabb68deaa90130a8153cab1fa8288fe Author: Brian Gerst Date: Mon Jul 20 13:49:21 2020 -0700 x86/percpu: Clean up percpu_xchg_op() The core percpu macros already have a switch on the data size, so the switch in the x86 code is redundant and produces more dead code. Also use appropriate types for the width of the instructions. This avoids errors when compiling with Clang. Signed-off-by: Brian Gerst Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Nick Desaulniers Acked-by: Linus Torvalds Acked-by: Peter Zijlstra (Intel) Acked-by: Dennis Zhou Link: https://lkml.kernel.org/r/20200720204925.3654302-8-ndesaulniers@google.com commit bbff583b84a130d4d1234d68906c41690575be36 Author: Brian Gerst Date: Mon Jul 20 13:49:20 2020 -0700 x86/percpu: Clean up percpu_add_return_op() The core percpu macros already have a switch on the data size, so the switch in the x86 code is redundant and produces more dead code. Also use appropriate types for the width of the instructions. This avoids errors when compiling with Clang. Signed-off-by: Brian Gerst Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Nick Desaulniers Acked-by: Linus Torvalds Acked-by: Peter Zijlstra (Intel) Acked-by: Dennis Zhou Link: https://lkml.kernel.org/r/20200720204925.3654302-7-ndesaulniers@google.com commit e4d16defbbde028aeab2026995f0ced4240df6d6 Author: Brian Gerst Date: Mon Jul 20 13:49:19 2020 -0700 x86/percpu: Remove "e" constraint from XADD The "e" constraint represents a constant, but the XADD instruction doesn't accept immediate operands. Signed-off-by: Brian Gerst Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Nick Desaulniers Acked-by: Linus Torvalds Acked-by: Peter Zijlstra (Intel) Acked-by: Dennis Zhou Link: https://lkml.kernel.org/r/20200720204925.3654302-6-ndesaulniers@google.com commit 33e5614a435ff8047d768e6501454ae1cc7f131f Author: Brian Gerst Date: Mon Jul 20 13:49:18 2020 -0700 x86/percpu: Clean up percpu_add_op() The core percpu macros already have a switch on the data size, so the switch in the x86 code is redundant and produces more dead code. Also use appropriate types for the width of the instructions. This avoids errors when compiling with Clang. Signed-off-by: Brian Gerst Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Nick Desaulniers Acked-by: Linus Torvalds Acked-by: Peter Zijlstra (Intel) Acked-by: Dennis Zhou Link: https://lkml.kernel.org/r/20200720204925.3654302-5-ndesaulniers@google.com commit bb631e3002840706362a7d76e3ebb3604cce91a7 Author: Brian Gerst Date: Mon Jul 20 13:49:17 2020 -0700 x86/percpu: Clean up percpu_from_op() The core percpu macros already have a switch on the data size, so the switch in the x86 code is redundant and produces more dead code. Also use appropriate types for the width of the instructions. This avoids errors when compiling with Clang. Signed-off-by: Brian Gerst Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Nick Desaulniers Acked-by: Linus Torvalds Acked-by: Peter Zijlstra (Intel) Acked-by: Dennis Zhou Link: https://lkml.kernel.org/r/20200720204925.3654302-4-ndesaulniers@google.com commit c175acc14719e69ecec4dafbb642a7f38c76c064 Author: Brian Gerst Date: Mon Jul 20 13:49:16 2020 -0700 x86/percpu: Clean up percpu_to_op() The core percpu macros already have a switch on the data size, so the switch in the x86 code is redundant and produces more dead code. Also use appropriate types for the width of the instructions. This avoids errors when compiling with Clang. Signed-off-by: Brian Gerst Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Nick Desaulniers Acked-by: Linus Torvalds Acked-by: Peter Zijlstra (Intel) Acked-by: Dennis Zhou Link: https://lkml.kernel.org/r/20200720204925.3654302-3-ndesaulniers@google.com commit 6865dc3ae93b9acb336ca48bd7b2db3446d89370 Author: Brian Gerst Date: Mon Jul 20 13:49:15 2020 -0700 x86/percpu: Introduce size abstraction macros In preparation for cleaning up the percpu operations, define macros for abstraction based on the width of the operation. Signed-off-by: Brian Gerst Signed-off-by: Nick Desaulniers Signed-off-by: Thomas Gleixner Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Reviewed-by: Nick Desaulniers Acked-by: Linus Torvalds Acked-by: Peter Zijlstra (Intel) Acked-by: Dennis Zhou Link: https://lkml.kernel.org/r/20200720204925.3654302-2-ndesaulniers@google.com commit a68e06e729b1b06c50ee52917d6b825b43e7d269 Author: Dinghao Liu Date: Thu Jul 9 14:43:56 2020 +0800 PCI: rcar: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when the call returns an error code. Thus a corresponding decrement is needed on the error handling path to keep the counter balanced. Link: https://lore.kernel.org/r/20200709064356.8800-1-dinghao.liu@zju.edu.cn Fixes: 0df6150e7ceb ("PCI: rcar: Use runtime PM to control controller clock") Signed-off-by: Dinghao Liu Signed-off-by: Lorenzo Pieralisi Reviewed-by: Yoshihiro Shimoda commit bf9b82b7fe4d3c7d4d432ef80b4299c9b6b4a1f8 Author: Garrit Franke Date: Thu Jul 16 22:31:01 2020 +0200 kobject: remove unused KOBJ_MAX action The loop in libb/kobj_uevent.c that checked for KOBBJ_MAX is no longer present, we do a much more sane ARRAY_SIZE() check instead. See 5c5daf657cb5 ("Driver core: exclude kobject_uevent.c for !CONFIG_HOTPLUG"). Signed-off-by: Garrit Franke Link: https://lore.kernel.org/r/20200716203100.7959-1-garritfranke@gmail.com Signed-off-by: Greg Kroah-Hartman commit 032ae2fd3ce12e8aa538165b44dc129c355a1ee1 Author: Mrinal Pandey Date: Wed Jul 22 20:49:00 2020 +0530 staging: rtl8188eu: Fix an indent coding style issue Only a single tab space is required after the if statement. Fix this issue by running scripts/checkpatch.pl on the file. Signed-off-by: Mrinal Pandey Link: https://lore.kernel.org/r/20200722151900.5dcebtavkdi5cc77@mrinalpandey Signed-off-by: Greg Kroah-Hartman commit 12d9516944c9beacf82194069197bc286af6dc31 Author: Anmol Karn Date: Thu Jul 23 12:51:15 2020 +0530 staging: vc04_services: vchiq-mmal: Fixed tab styling issue in mmal-vchiq.c This cahnge fixes a checkpatch error for "code indent should use tabs where possible". compile Tested only [Linux-next-20200722] Signed-off-by: Anmol Karn Link: https://lore.kernel.org/r/20200723072115.408070-1-anmol.karan123@gmail.com Signed-off-by: Greg Kroah-Hartman commit a176db57611f260d920e34d36bb43460069da1ed Author: Michael Straube Date: Thu Jul 23 09:52:43 2020 +0200 staging: rtl8188eu: cleanup whitespace in declarations Replace tabs with spaces in declarations to cleanup whitespace in rtl8188eu_recv.c. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200723075243.21924-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 869090266ceb60210f69f96fb29fe8ad6b4b850d Author: Michael Straube Date: Thu Jul 23 09:52:42 2020 +0200 staging: rtl8188eu: clear alignment style issues Clear checkpatch alignment style issues in rtl8188eu_recv.c. CHECK: Alignment should match open parenthesis The file is now checkpatch clean. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200723075243.21924-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c1e18d4fb9590268105e724444792656fcb3927d Author: Enric Balletbo i Serra Date: Mon Jun 15 22:35:21 2020 +0200 platform/chrome: cros_ec_proto: Do not export cros_ec_cmd_xfer() Now that all the remaining users of cros_ec_cmd_xfer() has been removed, make this function private to the cros_ec_proto module. Signed-off-by: Enric Balletbo i Serra commit 1859a772e2744da8d4ddb987e010541e312adf69 Merge: 4e74eeb27e287 3d7b0ca5300bd Author: Greg Kroah-Hartman Date: Thu Jul 23 09:52:10 2020 +0200 Merge tag 'phy-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-next Vinod writes: phy for 5.9 - New PHY Drivers: - Samsung UFS - Qcom USB DWC for ipq806x - Xilinx ZynqMP Gigabit Transceiver - Qcom USB QMP for IPQ8074 - BCM63xx USBH - Removed: - Qcom ufs qmp phy driver - Updates: - Support for Qcom SM8250 QMP V4 USB3 UNIPHY - qcom-snps runtime pm support - Cleanup of W=1 warns in the subsystem * tag 'phy-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (46 commits) phy: qualcomm: fix setting of tx_deamp_3_5db when device property read fails phy: bcm63xx-usbh: Add BCM63xx USBH driver dt-bindings: phy: add bcm63xx-usbh bindings phy: armada-38x: fix NETA lockup when repeatedly switching speeds dt: update Marvell Armada 38x COMPHY binding phy: samsung-ufs: Fix IS_ERR argument dt-bindings: phy: renesas,usb3-phy: Add r8a774e1 support dt-bindings: phy: renesas,usb2-phy: Add r8a774e1 support phy: renesas: rcar-gen3-usb2: exit if request_irq() failed phy: renesas: rcar-gen3-usb2: move irq registration to init devicetree: bindings: phy: Document ipq806x dwc3 qcom phy phy: qualcomm: add qcom ipq806x dwc usb phy driver phy: samsung-ufs: add UFS PHY driver for samsung SoC dt-bindings: phy: Document Samsung UFS PHY bindings phy: sun4i-usb: explicitly include gpio/consumer.h phy: stm32: use NULL instead of zero phy: exynos5-usbdrd: use correct format for structure description phy: rockchip-typec: use correct format for structure description phy: xgene: remove unsigned integer comparison with less than zero phy: mapphone-mdm6600: Add missing description for some structure fields ... commit 4e74eeb27e2873e923fee883df64341dae9ecdbb Author: Alexander A. Klimov Date: Mon Jul 13 12:44:53 2020 +0200 char: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713104453.33414-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit a52c809769d3b4d5c94c96e9b49d898ce17128f0 Author: Alexander A. Klimov Date: Mon Jul 13 18:40:24 2020 +0200 misc: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713164024.35988-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 335aca5f65f1a39670944930131da5f2276f888f Merge: 8ac9b9d61f0ec 7fa95f9adaee7 Author: Michael Ellerman Date: Thu Jul 23 17:43:44 2020 +1000 Merge branch 'scv' support into next From Nick's cover letter: Linux powerpc new system call instruction and ABI System Call Vectored (scv) ABI ============================== The scv instruction is introduced with POWER9 / ISA3, it comes with an rfscv counter-part. The benefit of these instructions is performance (trading slower SRR0/1 with faster LR/CTR registers, and entering the kernel with MSR[EE] and MSR[RI] left enabled, which can reduce MSR updates. The scv instruction has 128 levels (not enough to cover the Linux system call space). Assignment and advertisement ---------------------------- The proposal is to assign scv levels conservatively, and advertise them with HWCAP feature bits as we add support for more. Linux has not enabled FSCR[SCV] yet, so executing the scv instruction will cause the kernel to log a "SCV facility unavilable" message, and deliver a SIGILL with ILL_ILLOPC to the process. Linux has defined a HWCAP2 bit PPC_FEATURE2_SCV for SCV support, but does not set it. This change allocates the zero level ('scv 0'), advertised with PPC_FEATURE2_SCV, which will be used to provide normal Linux system calls (equivalent to 'sc'). Attempting to execute scv with other levels will cause a SIGILL to be delivered the same as before, but will not log a "SCV facility unavailable" message (because the processor facility is enabled). Calling convention ------------------ The proposal is for scv 0 to provide the standard Linux system call ABI with the following differences from sc convention[1]: - LR is to be volatile across scv calls. This is necessary because the scv instruction clobbers LR. From previous discussion, this should be possible to deal with in GCC clobbers and CFI. - cr1 and cr5-cr7 are volatile. This matches the C ABI and would allow the kernel system call exit to avoid restoring the volatile cr registers (although we probably still would anyway to avoid information leaks). - Error handling: The consensus among kernel, glibc, and musl is to move to using negative return values in r3 rather than CR0[SO]=1 to indicate error, which matches most other architectures, and is closer to a function call. Notes ----- - r0,r4-r8 are documented as volatile in the ABI, but the kernel patch as submitted currently preserves them. This is to leave room for deciding which way to go with these. Some small benefit was found by preserving them[1] but I'm not convinced it's worth deviating from the C function call ABI just for this. Release code should follow the ABI. Previous discussions: https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-April/208691.html https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-April/209268.html [1] https://github.com/torvalds/linux/blob/master/Documentation/powerpc/syscall64-abi.rst [2] https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-April/209263.html commit 8ac9b9d61f0eceba6ce571e7527798465ae9a7c5 Author: Michael Ellerman Date: Wed Jul 22 15:53:15 2020 +1000 selftests/powerpc: Add test of memcmp at end of page Update our memcmp selftest, to test the case where we're comparing up to the end of a page and the subsequent page is not mapped. We have to make sure we don't read off the end of the page and cause a fault. We had a bug there in the past, fixed in commit d9470757398a ("powerpc/64: Fix memcmp reading past the end of src/dest"). Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200722055315.962391-1-mpe@ellerman.id.au commit 5c92fb1b46102e1efe0eed69e743f711bc1c7d2e Author: Pratik Rajesh Sampat Date: Tue Jul 21 21:07:08 2020 +0530 powerpc/powernv/idle: Exclude mfspr on HID1, 4, 5 on P9 and above POWER9 onwards the support for the registers HID1, HID4, HID5 has been receded. Although mfspr on the above registers worked in Power9, In Power10 simulator is unrecognized. Moving their assignment under the check for machines lower than Power9 Signed-off-by: Pratik Rajesh Sampat Reviewed-by: Gautham R. Shenoy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200721153708.89057-4-psampat@linux.ibm.com commit dcbbfa6b05daca94ebcdbce80a7cf05c717d2942 Author: Pratik Rajesh Sampat Date: Tue Jul 21 21:07:07 2020 +0530 powerpc/powernv/idle: Rename pnv_first_spr_loss_level variable Replace the variable name from using "pnv_first_spr_loss_level" to "deep_spr_loss_state". pnv_first_spr_loss_level is supposed to be the earliest state that has OPAL_PM_LOSE_FULL_CONTEXT set, in other places the kernel uses the "deep" states as terminology. Hence renaming the variable to be coherent to its semantics. Signed-off-by: Pratik Rajesh Sampat Acked-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200721153708.89057-3-psampat@linux.ibm.com commit 8747bf36f312356f8a295a0c39ff092d65ce75ae Author: Pratik Rajesh Sampat Date: Tue Jul 21 21:07:06 2020 +0530 powerpc/powernv/idle: Replace CPU feature check with PVR check The POWER9 idle driver contains implementation-specific details that means it is not suitable to run on any processor that implements ISA v3.0 (e.g., POWER10), so only init the driver when running on a POWER9. Signed-off-by: Pratik Rajesh Sampat [mpe: Use updated change log from Nick] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200721153708.89057-2-psampat@linux.ibm.com commit 69507b984ddce803df81215cc7813825189adafa Author: Santosh Sivaraj Date: Tue Jul 21 14:49:15 2020 +0530 powerpc/mm/hash64: Remove comment that is no longer valid hash_low_64.S was removed in commit a43c0eb8364c ("powerpc/mm: Convert 4k insert from asm to C") and flush_hash_page() is no longer called from any assembly routine. Signed-off-by: Santosh Sivaraj [mpe: Tweak comment wording] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200721091915.205006-1-santosh@fossix.org commit 0f10228c6ff6af36cbb31af35b01f76cdb0b3fc1 Author: Leonardo Bras Date: Mon Jul 6 21:48:12 2020 -0300 KVM: PPC: Fix typo on H_DISABLE_AND_GET hcall On PAPR+ the hcall() on 0x1B0 is called H_DISABLE_AND_GET, but got defined as H_DISABLE_AND_GETC instead. This define was introduced with a typo in commit ("[PATCH] powerpc: Extends HCALL interface for InfiniBand usage"), and was later used without having the typo noticed. Signed-off-by: Leonardo Bras Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200707004812.190765-1-leobras.c@gmail.com commit 7c7ff885c7bce40a487e41c68f1dac14dd2c8033 Author: Christoph Hellwig Date: Wed Jun 10 10:55:54 2020 +0200 powerpc/spufs: Fix the type of ret in spufs_arch_write_note Both the ->dump method and snprintf return an int. So switch to an int and properly handle errors from ->dump. Fixes: 5456ffdee666 ("powerpc/spufs: simplify spufs core dumping") Reported-by: kbuild test robot Signed-off-by: Christoph Hellwig Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200610085554.5647-1-hch@lst.de commit 201220bb0e8cbc163ec7f550b3b7b3da46eb5877 Author: Nicholas Piggin Date: Fri Jul 3 09:33:43 2020 +1000 powerpc/powernv: Machine check handler for POWER10 Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200702233343.1128026-1-npiggin@gmail.com commit 5a090f7c363fdc09b99222eae679506a58e7cc68 Author: Wen Xiong Date: Mon Jul 13 09:39:33 2020 -0500 powerpc/pseries: PCIE PHB reset Several device drivers hit EEH(Extended Error handling) when triggering kdump on Pseries PowerVM. This patch implemented a reset of the PHBs in pci general code when triggering kdump. PHB reset stop all PCI transactions from normal kernel. We have tested the patch in several enviroments: - direct slot adapters - adapters under the switch - a VF adapter in PowerVM - a VF adapter/adapter in KVM guest. Signed-off-by: Wen Xiong [mpe: Fix broken whitespace, subject & SOB formatting] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594651173-32166-1-git-send-email-wenxiong@linux.vnet.ibm.com commit 2384b36f9156c3b815a5ce5f694edc5054ab7625 Author: Nicholas Piggin Date: Thu Jul 16 11:35:22 2020 +1000 powerpc: Select ARCH_HAS_MEMBARRIER_SYNC_CORE powerpc return from interrupt and return from system call sequences are context synchronising. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200716013522.338318-1-npiggin@gmail.com commit 147c13413c04bc6a2bd76f2503402905e5e98cff Author: Palmer Dabbelt Date: Thu Jul 16 12:38:20 2020 -0700 powerpc/64: Fix an out of date comment about MMIO ordering This primitive has been renamed, but because it was spelled incorrectly in the first place it must have escaped the fixup patch. As far as I can tell this logic is still correct: smp_mb__after_spinlock() uses the default smp_mb() implementation, which is "sync" rather than "hwsync" but those are the same (though I'm not that familiar with PowerPC). Signed-off-by: Palmer Dabbelt Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200716193820.1141936-1-palmer@dabbelt.com commit e93ad65e3611b06288efdf0cfd76c012df3feec1 Author: Balamuruhan S Date: Fri Jun 26 15:21:58 2020 +0530 powerpc/test_emulate_step: Move extern declaration to sstep.h fix checkpatch.pl warnings by moving extern declaration from source file to headerfile. Signed-off-by: Balamuruhan S Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200626095158.1031507-5-bala24@linux.ibm.com commit 68a180a44c29d7e918ae7d3c18a01b0751d1c22f Author: Balamuruhan S Date: Fri Jun 26 15:21:57 2020 +0530 powerpc/sstep: Introduce macros to retrieve Prefix instruction operands retrieve prefix instruction operands RA and pc relative bit R values using macros and adopt it in sstep.c and test_emulate_step.c. Signed-off-by: Balamuruhan S Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200626095158.1031507-4-bala24@linux.ibm.com commit 7e67c73b939b25d4ad18a536e52282aa35d8ee56 Author: Balamuruhan S Date: Fri Jun 26 15:21:56 2020 +0530 powerpc/test_emulate_step: Add negative tests for prefixed addi testcases for `paddi` instruction to cover the negative case, if R is equal to 1 and RA is not equal to 0, the instruction form is invalid. Signed-off-by: Balamuruhan S Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200626095158.1031507-3-bala24@linux.ibm.com commit 93c3a0ba2a0863a5c82a518d64044434f82a57f5 Author: Balamuruhan S Date: Fri Jun 26 15:21:55 2020 +0530 powerpc/test_emulate_step: Enhancement to test negative scenarios add provision to declare test is a negative scenario, verify whether emulation fails and avoid executing it. Signed-off-by: Balamuruhan S Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200626095158.1031507-2-bala24@linux.ibm.com commit 8b98afc117aaf825c66d7ddd59f1849e559b42cd Author: Jordan Niethe Date: Tue Jun 2 15:27:26 2020 +1000 powerpc/xmon: Improve dumping prefixed instructions Currently prefixed instructions are dumped as two separate word instructions. Use mread_instr() so that prefixed instructions are read as such and update the incrementor in the loop to take this into account. 'dump_func' is print_insn_powerpc() which comes from ppc-dis.c which is taken from binutils. When this is updated prefixed instructions will be disassembled. Currently dumping prefixed instructions looks like this: 0:mon> di c000000000094168 c000000000094168 0x06000000 .long 0x6000000 c00000000009416c 0x392a0003 addi r9,r10,3 c000000000094170 0x913f0028 stw r9,40(r31) c000000000094174 0xe93f002a lwa r9,40(r31) c000000000094178 0x7d234b78 mr r3,r9 c00000000009417c 0x383f0040 addi r1,r31,64 c000000000094180 0xebe1fff8 ld r31,-8(r1) c000000000094184 0x4e800020 blr c000000000094188 0x60000000 nop ... c000000000094190 0x3c4c0121 addis r2,r12,289 c000000000094194 0x38429670 addi r2,r2,-27024 c000000000094198 0x7c0802a6 mflr r0 c00000000009419c 0x60000000 nop c0000000000941a0 0xe9240100 ld r9,256(r4) c0000000000941a4 0x39400001 li r10,1 After this it looks like: 0:mon> di c000000000094168 c000000000094168 0x06000000 0x392a0003 .long 0x392a000306000000 c000000000094170 0x913f0028 stw r9,40(r31) c000000000094174 0xe93f002a lwa r9,40(r31) c000000000094178 0x7d234b78 mr r3,r9 c00000000009417c 0x383f0040 addi r1,r31,64 c000000000094180 0xebe1fff8 ld r31,-8(r1) c000000000094184 0x4e800020 blr c000000000094188 0x60000000 nop ... c000000000094190 0x3c4c0121 addis r2,r12,289 c000000000094194 0x38429570 addi r2,r2,-27280 c000000000094198 0x7c0802a6 mflr r0 c00000000009419c 0x60000000 nop c0000000000941a0 0xe9240100 ld r9,256(r4) c0000000000941a4 0x39400001 li r10,1 c0000000000941a8 0x3d02000b addis r8,r2,11 Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200602052728.18227-2-jniethe5@gmail.com commit 50428fdc53ba48f6936b10dfdc0d644972403908 Author: Jordan Niethe Date: Tue Jun 2 15:27:25 2020 +1000 powerpc: Add a ppc_inst_as_str() helper There are quite a few places where instructions are printed, this is done using a '%x' format specifier. With the introduction of prefixed instructions, this does not work well. Currently in these places, ppc_inst_val() is used for the value for %x so only the first word of prefixed instructions are printed. When the instructions are word instructions, only a single word should be printed. For prefixed instructions both the prefix and suffix should be printed. To accommodate both of these situations, instead of a '%x' specifier use '%s' and introduce a helper, __ppc_inst_as_str() which returns a char *. The char * __ppc_inst_as_str() returns is buffer that is passed to it by the caller. It is cumbersome to require every caller of __ppc_inst_as_str() to now declare a buffer. To make it more convenient to use __ppc_inst_as_str(), wrap it in a macro that uses a compound statement to allocate a buffer on the caller's stack before calling it. Signed-off-by: Jordan Niethe Reviewed-by: Joel Stanley Acked-by: Segher Boessenkool [mpe: Drop 0x prefix to match most existings uses, especially xmon] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200602052728.18227-1-jniethe5@gmail.com commit 1859f4ebcf2dfe2e878a3805700036fdc4e01e2c Author: Randy Dunlap Date: Sat Jul 18 17:27:38 2020 -0700 android: binder.h: drop a duplicated word Drop the repeated word "the" in a comment. Cc: Arve Hjønnevåg Cc: Todd Kjos Cc: Martijn Coenen Cc: Joel Fernandes Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: devel@driverdev.osuosl.org Acked-by: Christian Brauner Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20200719002738.20210-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 34ec0aa62b40e55bcd5f41b89494242c38556f30 Author: Randy Dunlap Date: Sat Jul 18 17:29:43 2020 -0700 misc: mic: : drop a duplicated word Drop the repeated word "the" in a comment. Signed-off-by: Randy Dunlap Cc: Sudeep Dutt Cc: Ashutosh Dixit Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200719002943.20624-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit ef19f826eceabdef3a710958cbf3549355267645 Author: Uros Bizjak Date: Mon Jul 20 15:51:57 2020 +0200 crypto: x86 - Put back integer parts of include/asm/inst.h Resolves conflict with the tip tree. Fixes: d7866e503bdc ("crypto: x86 - Remove include/asm/inst.h") CC: Thomas Gleixner CC: Ingo Molnar CC: Borislav Petkov CC: "H. Peter Anvin" CC: Stephen Rothwell , CC: "Chang S. Bae" , CC: Peter Zijlstra , CC: Sasha Levin Signed-off-by: Uros Bizjak Signed-off-by: Herbert Xu commit e493b31a5855e40558cd7883572e6ac904121127 Author: Randy Dunlap Date: Sun Jul 19 11:07:50 2020 -0700 crypto: testmgr - delete duplicated words Delete the doubled word "from" in multiple places. Signed-off-by: Randy Dunlap Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu commit 9332a9e73918bd0a1d5ef40a3357931b9fe0cf8a Author: Alexander A. Klimov Date: Sun Jul 19 18:49:59 2020 +0200 crypto: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Herbert Xu commit dd3240a28c08f8092386c76951408966bf4005ff Author: Randy Dunlap Date: Fri Jul 17 16:35:49 2020 -0700 crypto: skcipher - drop duplicated word in kernel-doc Drop the doubled word "request" in a kernel-doc comment. Signed-off-by: Randy Dunlap Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Acked-by: David S. Miller Signed-off-by: Herbert Xu commit da087a4cdcbf93c8a6a9decab4a34c38e6c7e867 Author: Randy Dunlap Date: Fri Jul 17 16:35:33 2020 -0700 crypto: hash - drop duplicated word in a comment Drop the doubled word "in" in a comment. Signed-off-by: Randy Dunlap Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Acked-by: David S. Miller Signed-off-by: Herbert Xu commit ac855b3c1069dc7c6c1442e743600408ec474c36 Author: Herbert Xu Date: Thu Jul 16 18:06:56 2020 +1000 crypto: omap-aes - Fix sparse and compiler warnings This patch fixes all the sparse and W=1 compiler warnings in the driver. Signed-off-by: Herbert Xu commit d1e83158738f57027e22f43d8b3f4e58f3373814 Author: Horia Geantă Date: Wed Jul 15 18:26:04 2020 +0300 hwrng: imx-rngc - enable driver for i.MX6 i.MX6 SL, SLL, ULL, ULZ SoCs have an RNGB block. Since imx-rngc driver supports also rngb, let's enable it for these SoCs too. Signed-off-by: Horia Geantă Reviewed-by: Martin Kaiser Reviewed-by: Marco Felsch Signed-off-by: Herbert Xu commit b526ee38d1799dffd56038faec877df506519914 Author: Horia Geantă Date: Wed Jul 15 18:26:00 2020 +0300 dt-bindings: rng: add RNGB compatibles for i.MX6 SoCs RNGB block is found in some i.MX6 SoCs - 6SL, 6SLL, 6ULL, 6ULZ. Add corresponding compatible strings. Note: Several NXP SoC from QorIQ family (P1010, P1023, P4080, P3041, P5020) also have a RNGB, however it's part of the CAAM (Cryptograhic Accelerator and Assurance Module) crypto accelerator. In this case, RNGB is managed in the caam driver (drivers/crypto/caam/), since it's tightly related to the caam "job ring" interface, not to mention CAAM internally relying on RNGB as source of randomness. On the other hand, the i.MX6 SoCs with RNGB have a DCP (Data Co-Processor) crypto accelerator and this block and RNGB are independent. Signed-off-by: Horia Geantă Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit f601c725a6ac072608f47083e7c8115a3f504f95 Author: Daniel Jordan Date: Tue Jul 14 16:13:56 2020 -0400 padata: remove padata_parallel_queue Only its reorder field is actually used now, so remove the struct and embed @reorder directly in parallel_data. No functional change, just a cleanup. Signed-off-by: Daniel Jordan Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit 3f257191d31d5eaf154ebdb696efc238837ddd51 Author: Daniel Jordan Date: Tue Jul 14 16:13:55 2020 -0400 padata: fold padata_alloc_possible() into padata_alloc() There's no reason to have two interfaces when there's only one caller. Removing _possible saves text and simplifies future changes. Signed-off-by: Daniel Jordan Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit d69e037bcc4a7e31fdd40ae416aa1bd768dd7d99 Author: Daniel Jordan Date: Tue Jul 14 16:13:54 2020 -0400 padata: remove effective cpumasks from the instance A padata instance has effective cpumasks that store the user-supplied masks ANDed with the online mask, but this middleman is unnecessary. parallel_data keeps the same information around. Removing this saves text and code churn in future changes. Signed-off-by: Daniel Jordan Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit cec00e6e120f4f0743d2bf0638418684c74b16e0 Author: Daniel Jordan Date: Tue Jul 14 16:13:53 2020 -0400 padata: inline single call of pd_setup_cpumasks() pd_setup_cpumasks() has only one caller. Move its contents inline to prepare for the next cleanup. Signed-off-by: Daniel Jordan Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit 350ef051d4edd884e8dea0be9f3685b4b32142fb Author: Daniel Jordan Date: Tue Jul 14 16:13:52 2020 -0400 padata: remove stop function padata_stop() has two callers and is unnecessary in both cases. When pcrypt calls it before padata_free(), it's being unloaded so there are no outstanding padata jobs[0]. When __padata_free() calls it, it's either along the same path or else pcrypt initialization failed, which of course means there are also no outstanding jobs. Removing it simplifies padata and saves text. [0] https://lore.kernel.org/linux-crypto/20191119225017.mjrak2fwa5vccazl@gondor.apana.org.au/ Signed-off-by: Daniel Jordan Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit bd25b4886ddcebec92591f298ce2ce345d7f2ea9 Author: Daniel Jordan Date: Tue Jul 14 16:13:51 2020 -0400 padata: remove start function padata_start() is only used right after pcrypt allocates an instance with all possible CPUs, when PADATA_INVALID can't happen, so there's no need for a separate "start" step. It can be done during allocation to save text, make using padata easier, and avoid unneeded calls in the future. Signed-off-by: Daniel Jordan Cc: Herbert Xu Cc: Steffen Klassert Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu commit c06c76602e03bde24ee69a2022a829127e504202 Author: Tom Rix Date: Mon Jul 13 07:06:34 2020 -0700 crypto: qat - fix double free in qat_uclo_create_batch_init_list clang static analysis flags this error qat_uclo.c:297:3: warning: Attempt to free released memory [unix.Malloc] kfree(*init_tab_base); ^~~~~~~~~~~~~~~~~~~~~ When input *init_tab_base is null, the function allocates memory for the head of the list. When there is problem allocating other list elements the list is unwound and freed. Then a check is made if the list head was allocated and is also freed. Keeping track of the what may need to be freed is the variable 'tail_old'. The unwinding/freeing block is while (tail_old) { mem_init = tail_old->next; kfree(tail_old); tail_old = mem_init; } The problem is that the first element of tail_old is also what was allocated for the list head init_header = kzalloc(sizeof(*init_header), GFP_KERNEL); ... *init_tab_base = init_header; flag = 1; } tail_old = init_header; So *init_tab_base/init_header are freed twice. There is another problem. When the input *init_tab_base is non null the tail_old is calculated by traveling down the list to first non null entry. tail_old = init_header; while (tail_old->next) tail_old = tail_old->next; When the unwinding free happens, the last entry of the input list will be freed. So the freeing needs a general changed. If locally allocated the first element of tail_old is freed, else it is skipped. As a bit of cleanup, reset *init_tab_base if it came in as null. Fixes: b4b7e67c917f ("crypto: qat - Intel(R) QAT ucode part of fw loader") Cc: Signed-off-by: Tom Rix Signed-off-by: Herbert Xu commit fd92028e4c0cbbe498cc622369baff6b395e88e6 Author: Tero Kristo Date: Mon Jul 13 11:34:25 2020 +0300 crypto: sa2ul - add device links to child devices The child devices for sa2ul (like the RNG) have hard dependency towards the parent, they can't function without the parent enabled. Add device link for this purpose so that the dependencies are taken care of properly. Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit d2c8ac187fc922e73930a1b2f6a211e27f595d01 Author: Keerthy Date: Mon Jul 13 11:34:24 2020 +0300 crypto: sa2ul - Add AEAD algorithm support Add support for sa2ul hardware AEAD for hmac(sha256),cbc(aes) and hmac(sha1),cbc(aes) algorithms. Signed-off-by: Keerthy [t-kristo@ti.com: number of bug fixes, major refactoring and cleanup of code] Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 2dc53d0047458e28ed05b4548844ba78199857bf Author: Keerthy Date: Mon Jul 13 11:34:23 2020 +0300 crypto: sa2ul - add sha1/sha256/sha512 support Add support for sha1/sha256/sha512 sa2ul based hardware authentication. With the hash update mechanism, we always use software fallback mechanism for now, as there is no way to fetch the partial hash state from the HW accelerator. HW accelerator is only used when digest is called for a data chunk of known size. Signed-off-by: Keerthy [t-kristo@ti.com: various bug fixes, major cleanups and refactoring of code] Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 7694b6ca649fead1a57046935711bc82dfc78cfb Author: Keerthy Date: Mon Jul 13 11:34:22 2020 +0300 crypto: sa2ul - Add crypto driver Adds a basic crypto driver and currently supports AES/3DES in cbc mode for both encryption and decryption. Signed-off-by: Keerthy [t-kristo@ti.com: major re-work to fix various bugs in the driver and to cleanup the code] Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 2ce9a7299bf6332cf32c12cdf360983da56be33b Author: Keerthy Date: Mon Jul 13 11:34:21 2020 +0300 dt-bindings: crypto: Add TI SA2UL crypto accelerator documentation The Security Accelerator Ultra Lite (SA2UL) subsystem provides hardware cryptographic acceleration for the following use cases: * Encryption and authentication for secure boot * Encryption and authentication of content in applications requiring DRM (digital rights management) and content/asset protection SA2UL provides support for number of different cryptographic algorithms including SHA1, SHA256, SHA512, AES, 3DES, and various combinations of the previous for AEAD use. Reviewed-by: Rob Herring Signed-off-by: Keerthy [t-kristo@ti.com: converted documentation to yaml] Signed-off-by: Tero Kristo Signed-off-by: Herbert Xu commit 44623b2818f4a442726639572f44fd9b6d0ef68c Author: Arnd Bergmann Date: Wed May 27 16:17:40 2020 +0200 crypto: x86/crc32c - fix building with clang ias The clang integrated assembler complains about movzxw: arch/x86/crypto/crc32c-pcl-intel-asm_64.S:173:2: error: invalid instruction mnemonic 'movzxw' It seems that movzwq is the mnemonic that it expects instead, and this is what objdump prints when disassembling the file. Fixes: 6a8ce1ef3940 ("crypto: crc32c - Optimize CRC32C calculation with PCLMULQDQ instruction") Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Signed-off-by: Herbert Xu commit 3c3b7ddef7879abb2c42422e898145826c79e5f0 Author: Gustavo A. R. Silva Date: Tue Jul 14 16:45:16 2020 -0500 mei: Avoid the use of one-element arrays One-element arrays are being deprecated[1]. Replace the one-element arrays with a simple value type u8 reserved, once this is just a placeholder for alignment. Also, while there, use the preferred form for passing a size of a struct. The alternative form where struct name is spelled out hurts readability and introduces an opportunity for a bug when the variable type is changed but the corresponding sizeof that is passed as argument is not. [1] https://github.com/KSPP/linux/issues/79 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200714214516.GA1040@embeddedor Signed-off-by: Greg Kroah-Hartman commit 74b04fae4501f2b0424b01f0295bf26c5c8fce5a Author: Alexander A. Klimov Date: Fri Jul 17 20:59:25 2020 +0200 mei: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Tomas Winkler Link: https://lore.kernel.org/r/20200717185925.84102-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit c56967d674e361ebe716e66992e3c5332b25ac1f Author: Gustavo A. R. Silva Date: Wed Jul 22 13:15:34 2020 -0500 mei: hdcp: Replace one-element array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Also, make use of the array_size() helper instead of the open-coded version in memcpy(). These sorts of multiplication factors need to be wrapped in array_size(). And while there, use the preferred form for passing a size of a struct. The alternative form where struct name is spelled out hurts readability and introduces an opportunity for a bug when the pointer variable type is changed but the corresponding sizeof that is passed as argument is not. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://github.com/KSPP/linux/issues/79 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200722181534.GA31357@embeddedor Signed-off-by: Greg Kroah-Hartman commit 4f825900786e1c24e4c48622e12eb493a6cd27b6 Author: Jordan Niethe Date: Mon May 25 12:59:23 2020 +1000 powerpc/sstep: Add tests for Prefixed Add Immediate Use the existing support for testing compute type instructions to test Prefixed Add Immediate (paddi). The R bit of the paddi instruction controls whether current instruction address is used. Add test cases for when R=1 and for R=0. paddi has a 34 bit immediate field formed by concatenating si0 and si1. Add tests for the extreme values of this field. Skip the paddi tests if ISA v3.1 is unsupported. Some of these test cases were added by Balamuruhan S. Signed-off-by: Jordan Niethe [mpe: Fix conflicts with ppc-opcode.h changes, squash in .balign] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200525025923.19843-5-jniethe5@gmail.com commit 301ebf7d69f6709575d137a41a0291f69f343aed Author: Jordan Niethe Date: Mon May 25 12:59:22 2020 +1000 powerpc/sstep: Let compute tests specify a required cpu feature An a array of struct compute_test's are used to declare tests for compute instructions. Add a cpu_feature field to struct compute_test as an optional way to specify a cpu feature that must be present. If not present then skip the test. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200525025923.19843-4-jniethe5@gmail.com commit 1c89cf7fbed36f078b20fd47d308b4fc6dbff5f6 Author: Jordan Niethe Date: Mon May 25 12:59:21 2020 +1000 powerpc/sstep: Set NIP in instruction emulation tests The tests for emulation of compute instructions execute and emulate an instruction and then compare the results to verify the emulation. In ISA v3.1 there are instructions that operate relative to the NIP. Therefore set the NIP in the regs used for the emulated instruction to the location of the executed instruction so they will give the same result. This is a rework of a patch by Balamuruhan S. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200525025923.19843-3-jniethe5@gmail.com commit 0396de6d8561c721b03fce386eb9682b37a26013 Author: Jordan Niethe Date: Mon May 25 12:59:20 2020 +1000 powerpc/sstep: Add tests for prefixed floating-point load/stores Add tests for the prefixed versions of the floating-point load/stores that are currently tested. This includes the following instructions: * Prefixed Load Floating-Point Single (plfs) * Prefixed Load Floating-Point Double (plfd) * Prefixed Store Floating-Point Single (pstfs) * Prefixed Store Floating-Point Double (pstfd) Skip the new tests if ISA v3.10 is unsupported. Signed-off-by: Jordan Niethe [mpe: Fix conflicts with ppc-opcode.h changes] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200525025923.19843-2-jniethe5@gmail.com commit b6b54b42722a2393056c891c0d05cd8cc40eb776 Author: Jordan Niethe Date: Mon May 25 12:59:19 2020 +1000 powerpc/sstep: Add tests for prefixed integer load/stores Add tests for the prefixed versions of the integer load/stores that are currently tested. This includes the following instructions: * Prefixed Load Doubleword (pld) * Prefixed Load Word and Zero (plwz) * Prefixed Store Doubleword (pstd) Skip the new tests if ISA v3.1 is unsupported. Signed-off-by: Jordan Niethe [mpe: Fix conflicts with ppc-opcode.h changes] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200525025923.19843-1-jniethe5@gmail.com commit cb0cec23cec009dd4a7c9a9f1ba9177b6047324e Merge: 575ec5e5e943a eacfbf589c904 Author: Greg Kroah-Hartman Date: Thu Jul 23 09:24:26 2020 +0200 Merge tag 'fpga-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-next Moritz writes: FPGA Manager changes for 5.9-rc1 Here is the (slightly larger than usual) patch set for the 5.9-rc1 merge window. DFL: - Xu's changes add support for AFU interrupt handling and puts them to use for error handling. - Xu's other change also adds another device-id for the Intel FPGA PAC N3000. - John's change converts from using get_user_pages() to pin_user_pages(). - Gustavo's patch cleans up some of the allocation by using struct_size(). Xilinx: - Luca's changes clean up the xilinx-spi and xilinx-slave-serial drivers and updates the comments and dt-bindings to reflect the fact it also supports 7 series devices. Core: - Tom cleaned up the fpga-bridge / fpga-mgr core by removing some dead-stores. All patches have been reviewed on the mailing list, and have been in the last few linux-next releases (as part of my for-next branch) without issues. Signed-off-by: Moritz Fischer * tag 'fpga-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga: fpga: dfl: pci: add device id for Intel FPGA PAC N3000 Documentation: fpga: dfl: add descriptions for interrupt related interfaces. fpga: dfl: afu: add AFU interrupt support fpga: dfl: fme: add interrupt support for global error reporting fpga: dfl: afu: add interrupt support for port error reporting fpga: dfl: introduce interrupt trigger setting API fpga: dfl: pci: add irq info for feature devices enumeration fpga: dfl: parse interrupt info for feature devices on enumeration fpga manager: xilinx-spi: check INIT_B pin during write_init dt-bindings: fpga: xilinx-slave-serial: add optional INIT_B GPIO fpga: Fix dead store in fpga-bridge.c fpga: Fix dead store fpga-mgr.c fpga: dfl: Use struct_size() in kzalloc() fpga manager: xilinx-spi: remove unneeded, mistyped variables fpga manager: xilinx-spi: valid for the 7 Series too dt-bindings: fpga: xilinx-slave-serial: valid for the 7 Series too fpga: dfl: afu: convert get_user_pages() --> pin_user_pages() commit 843e600b8a2b01463c4d873a90b2c2ea8033f1f6 Author: Saravana Kannan Date: Thu Jul 16 14:45:23 2020 -0700 driver core: Fix sleeping in invalid context during device link deletion Marek and Guenter reported that commit 287905e68dd2 ("driver core: Expose device link details in sysfs") caused sleeping/scheduling while atomic warnings. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:935 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 12, name: kworker/0:1 2 locks held by kworker/0:1/12: #0: ee8074a8 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x174/0x7dc #1: ee921f20 ((work_completion)(&sdp->work)){+.+.}-{0:0}, at: process_one_work+0x174/0x7dc Preemption disabled at: [] srcu_invoke_callbacks+0xc0/0x154 ----- 8< ----- SNIP [] (device_del) from [] (device_unregister+0x24/0x64) [] (device_unregister) from [] (srcu_invoke_callbacks+0xcc/0x154) [] (srcu_invoke_callbacks) from [] (process_one_work+0x234/0x7dc) [] (process_one_work) from [] (worker_thread+0x44/0x51c) [] (worker_thread) from [] (kthread+0x158/0x1a0) [] (kthread) from [] (ret_from_fork+0x14/0x20) Exception stack(0xee921fb0 to 0xee921ff8) This was caused by the device link device being released in the context of srcu_invoke_callbacks(). There is no need to wait till the RCU callback to release the device link device. So release the device earlier and move the call_srcu() into the device release code. That way, the memory will get freed only after the device is released AND the RCU callback is called. Fixes: 287905e68dd2 ("driver core: Expose device link details in sysfs") Reported-by: Marek Szyprowski Reported-by: Guenter Roeck Reported-by: Naresh Kamboju Signed-off-by: Saravana Kannan Tested-by: Marek Szyprowski Tested-by: Guenter Roeck Link: https://lore.kernel.org/r/20200716214523.2924704-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 575ec5e5e943aaea06a6043e87f9759066230039 Merge: 7a4462a96777b a81844034e5b3 Author: Greg Kroah-Hartman Date: Thu Jul 23 09:12:15 2020 +0200 Merge tag 'soundwire-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for 5.9-rc1 This contains few core changes and bunch of Intel driver updates: - Adds definitions for 1.2 spec - Sanyog left as a MAINTAINER and Bard took his place while Sanyog is a reviewer now. - Intel: Lots of updates to stream/dai handling, wake support and link synchronization. * tag 'soundwire-5.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (31 commits) Soundwire: intel_init: save Slave(s) _ADR info in sdw_intel_ctx soundwire: intel: add wake interrupt support soundwire: intel/cadence: merge Soundwire interrupt handlers/threads soundwire: intel_init: use EXPORT_SYMBOL_NS soundwire: intel_init: add implementation of sdw_intel_enable_irq() soundwire: intel: introduce helper for link synchronization soundwire: intel: introduce a helper to arm link synchronization soundwire: intel: revisit SHIM programming sequences. soundwire: intel: reuse code for wait loops to set/clear bits soundwire: fix the kernel-doc comment soundwire: sdw.h: fix indentation soundwire: sdw.h: fix PRBS/Static_1 swapped definitions soundwire: intel: don't free dma_data in DAI shutdown soundwire: cadence: allocate/free dma_data in set_sdw_stream soundwire: intel: remove stream allocation/free soundwire: stream: add helper to startup/shutdown streams soundwire: intel: implement get_sdw_stream() operations MAINTAINERS: change SoundWire maintainer soundwire: bus: initialize bus clock base and scale registers soundwire: extend SDW_SLAVE_ENTRY ... commit 7ec21d9da57e1ea770fae48e8fabb06c579487a7 Author: Tianjia Zhang Date: Tue Jun 23 21:14:16 2020 +0800 KVM: PPC: Clean up redundant kvm_run parameters in assembly In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters. [paulus@ozlabs.org - Fixed places that were missed in book3s_interrupts.S] Signed-off-by: Tianjia Zhang Signed-off-by: Paul Mackerras commit 83c3e5e17b5e3057ac304383a46e3c485d00ffed Author: Yufen Yu Date: Wed Jul 22 23:29:05 2020 -0400 md/raid5: use do_div() for 64 bit divisions in raid5_sync_request We get compilation error on 32-bit architectures (e.g. m68k), as: ERROR: modpost: "__udivdi3" [drivers/md/raid456.ko] undefined! Since 'sync_blocks' is defined as u64, use do_div() to fix this error. Fixes: c911c46c017c ("md/raid456: convert macro STRIPE_* to RAID5_STRIPE_*") Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 206739119508d5ab4b42ab480ff61a7e6cd72d7c Merge: 959ed53808d17 6e14adea0ac30 Author: Dave Airlie Date: Thu Jul 23 15:38:10 2020 +1000 Merge tag 'amd-drm-next-5.9-2020-07-17' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.9-2020-07-17: amdgpu: - SI UVD/VCE clock support - Updates for Sienna Cichlid - Expose drm rotation property - Atomfirmware updates for renoir - updates to GPUVM hub handling for different register layouts - swSMU restructuring and cleanups - RAS fixes - DC fixes - mode1 reset support for Sienna Cichlid - Add support for Navy Flounder GPUs amdkfd: - Add SMI events watch interface UAPI: - Add amdkfd SMI events watch interface Userspace which uses this interface: https://github.com/RadeonOpenCompute/rocm_smi_lib/commit/2235ede34c456f1c7d3490f6fe74825d442d272e Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200717132022.4014-1-alexander.deucher@amd.com commit 959ed53808d171cf5203cdc74578db55d0c79822 Merge: 2646699f4b513 d76271d22694e Author: Dave Airlie Date: Thu Jul 23 15:31:29 2020 +1000 Merge tag 'drm-xilinx-dpsub-20200718' of git://linuxtv.org/pinchartl/media into drm-next Xilinx ZynqMP DisplayPort Subsystem driver Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200718001755.GA5962@pendragon.ideasonboard.com commit 2646699f4b5139d077186dfd4ca571a0ebb6d419 Merge: 5a394f19a2878 c5d5a32ead1e3 Author: Dave Airlie Date: Thu Jul 23 15:28:05 2020 +1000 Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next Nothing too exciting: - a cleanup of our clock handling and improved error handling in this area from Lubomir - conversion to pin_user_pages for long page references from John - fixed PM runtime API error handling from Navid Signed-off-by: Dave Airlie From: Lucas Stach Link: https://patchwork.freedesktop.org/patch/msgid/d9e2660d71051bf3cab8aa7afc9f62102ac910d9.camel@pengutronix.de commit 5a394f19a2878e476d5f0ca64a3c874608c38dd3 Merge: fa07634d9c675 408a85e31e3e5 Author: Dave Airlie Date: Thu Jul 23 15:21:32 2020 +1000 Merge tag 'imx-drm-next-2020-07-20' of git://git.pengutronix.de/pza/linux into drm-next drm/imx: error path fixes and cleanups - Fix use after free issue in component bind error path by keeping memory allocated as long as the driver is bound. This will be replaced with drm managed memory in the next round. - Fix bus_flags overriding logic in parallel-display. - Disable regulator in imx-tve bind error path. - Drop unnecessary best_encoder callback. - Remove an unused enum in imx-ldb. - Bail out early on missing panel or bridge in parallel-display to speed up -EPROBE_DEFER path. - Disable both LDB channels in split mode. - Restore RGB32, BGR32 format support. - Fix tiled image conversion in case of out of order interrupts. - Remove a superfluous error message in imx-tve. Signed-off-by: Dave Airlie From: Philipp Zabel Link: https://patchwork.freedesktop.org/patch/msgid/ac4452eb3a989bf5d85b65fd30840a21f15ec301.camel@pengutronix.de commit fa07634d9c6757fa859e228b6b1e23017d1d7279 Author: Wei Yongjun Date: Wed Jul 22 16:17:19 2020 +0000 dma-fence: Make symbol 'dma_fence_lockdep_map' static The sparse tool complains as follows: drivers/dma-buf/dma-fence.c:249:25: warning: symbol 'dma_fence_lockdep_map' was not declared. Should it be static? This variable is not used outside of dma-fence.c, so this commit marks it static. Fixes: 5fbff813a4a3 ("dma-fence: basic lockdep annotations") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Christian König Signed-off-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/dc5e3b19-2087-44ab-a28c-ddb38ff8861a@email.android.com commit 4145cb541668eb48ac7d028d4e27b5f1b7378e4c Merge: 3ffff3c6855bd acc0c39a59ccd Author: Dave Airlie Date: Thu Jul 23 14:01:37 2020 +1000 Merge tag 'drm-misc-next-2020-07-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.9: UAPI Changes: Cross-subsystem Changes: - Convert panel-dsi-cm and ingenic bindings to YAML. - Add lockdep annotations for dma-fence. \o/ - Describe why indefinite fences are a bad idea - Update binding for rocktech jh057n00900. Core Changes: - Add vblank workers. - Use spin_(un)lock_irq instead of the irqsave/restore variants in crtc code. - Add managed vram helpers. - Convert more logging to drm functions. - Replace more http links with https in core and drivers. - Cleanup to ttm iomem functions and implementation. - Remove TTM CMA memtype as it doesn't work correctly. - Remove TTM_MEMTYPE_FLAG_MAPPABLE for many drivers that have no unmappable memory resources. Driver Changes: - Add CRC support to nouveau, using the new vblank workers. - Dithering and atomic state fix for nouveau. - Fixes for Frida FRD350H54004 panel. - Add support for OSD mode (sprite planes), IPU (scaling) and multiple panels/bridges to ingenic. - Use managed vram helpers in ast. - Assorted small fixes to ingenic, i810, mxsfb. - Remove optional unused ttm dummy functions. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/d6bf269e-ccb2-8a7b-fdae-226e9e3f8274@linux.intel.com commit aab58ace0d14558af73dbc4c4b066000a60deab0 Merge: b3a9e3b9622ae ef990bcad58cf Author: Stephen Boyd Date: Wed Jul 22 18:52:51 2020 -0700 Merge tag 'v5.9-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: Use poll_timeout functions for pll lock-waiting and move the rk3036 to use the available lock-status in pll-registers instead of reading it from the General Register Files. Handle the clock variants on the rk3288w, revert the mmc sample shift change on rk3328 and make the mac_lbtest clock critical on rk3188. * tag 'v5.9-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: add sclk_mac_lbtest to rk3188_critical_clocks clk: rockchip: Revert "fix wrong mmc sample phase shift for rk3328" clk: rockchip: use separate compatibles for rk3288w-cru dt-bindings: clocks: add rk3288w variant compatible clk: rockchip: Handle clock tree for rk3288w variant clk: rockchip: convert rk3036 pll type to use internal lock status clk: rockchip: convert basic pll lock_wait to use regmap_read_poll_timeout clk: rockchip: convert rk3399 pll type to use readl_relaxed_poll_timeout commit faf29338f3cb6ebcbff7297471b0fa56639a98bc Author: Adam Ford Date: Thu Jul 16 07:26:20 2020 -0500 clk: vc5: Add memory check to prevent oops When getting the names of the child nodes, kasprintf is used to allocate memory which is used to create the string for the node name. Unfortunately, there is no memory check to determine if this allocation fails, it may cause an error when trying to get child node name. This patch will check if the memory allocation fails, and returns and -ENOMEM error instead of blindly moving on. Fixes: 260249f929e8 ("clk: vc5: Enable addition output configurations of the Versaclock") Suggested-by: Dan Carpenter Signed-off-by: Adam Ford Reviewed-by: Luca Ceresoli Link: https://lore.kernel.org/r/20200716122620.4538-1-aford173@gmail.com Signed-off-by: Stephen Boyd commit 8200597fb16651e5b2280b694dd86352b738657b Author: Colin Ian King Date: Thu Jun 25 14:27:36 2020 +0100 clk: vc5: fix use of memory after it has been kfree'd There are a several places where printing an error message of init.name occurs after init.name has been kfree'd. Also the failure message is duplicated each time in the code. Fix this by adding a registration error failure path for these cases, moving the duplicated error messages to one common point and kfree'ing init.name only after it has been used. Changes also shrink the object code size by 171 bytes (x86-64, gcc 9.3): Before: text data bss dec hex filename 21057 3960 64 25081 61f9 drivers/clk/clk-versaclock5.o After: text data bss dec hex filename 20886 3960 64 24910 614e drivers/clk/clk-versaclock5.o Addresses-Coverity: ("Use after free") Fixes: f491276a5168 ("clk: vc5: Allow Versaclock driver to support multiple instances") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200625132736.88832-1-colin.king@canonical.com Reviewed-by: Luca Ceresoli [sboyd@kernel.org: Drop stray newline] Signed-off-by: Stephen Boyd commit 7fc3b978a8971305d456b32d3f2ac13191f5a0d7 Merge: f1fa27f590e56 d1b25b79e162b Author: David S. Miller Date: Wed Jul 22 18:19:03 2020 -0700 Merge branch 'qed-qede-improve-chain-API-and-add-XDP_REDIRECT-support' Alexander Lobakin says: ==================== qed, qede: improve chain API and add XDP_REDIRECT support This series adds missing XDP_REDIRECT case handling in QLogic Everest Ethernet driver with all necessary prerequisites and ops. QEDE Tx relies heavily on chain API, so make sure it is in its best at first. v2 (from [1]): - add missing includes to #003 to pass the build on Alpha; - no functional changes. [1] https://lore.kernel.org/netdev/20200722155349.747-1-alobakin@marvell.com/ ==================== Signed-off-by: David S. Miller commit d1b25b79e162b23ec1bbdfb13bda7154b1f46cfb Author: Alexander Lobakin Date: Thu Jul 23 01:10:45 2020 +0300 qede: add .ndo_xdp_xmit() and XDP_REDIRECT support Add XDP_REDIRECT case handling and the corresponding NDO to support redirecting XDP frames. This also includes registering driver memory model (currently order-0 page mode) in BPF subsystem. The total number of XDP queues is usually 1:1 with Rx ones. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 4c2bacbea1a3d49b836d2554383925bcf453d22c Author: Alexander Lobakin Date: Thu Jul 23 01:10:44 2020 +0300 qede: refactor XDP Tx processing Current XDP Tx logic is suboptimal and can't be reused for XDP_REDIRECT path. Make qede_xdp_{tx_int,xmit}() more universal and effective in general to allow future expanding. Misc: use unlikely() hints where appropriate and replace "fallthrough" comments with pseudo-keywords. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit f285ad5726e0430f46155026ca584d1d85c6ceff Author: Alexander Lobakin Date: Thu Jul 23 01:10:43 2020 +0300 qede: reformat net_device_ops declarations Correct the indentation of net_device_ops declarations for fancier look. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit f35535f73c1c7538c26e3468562ca08ecfce9735 Author: Alexander Lobakin Date: Thu Jul 23 01:10:42 2020 +0300 qede: reformat several structures in "qede.h" Make the file more readable and easier for adding new fields. Misc: use IFNAMSIZ and netdev_name() instead of sizeof_field() and direct net_device::name dereferencing. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit be0cec6ffd686364bbba2796bbe5eee2fad18181 Author: Alexander Lobakin Date: Thu Jul 23 01:10:41 2020 +0300 qed: introduce qed_chain_get_elem_used{,u32}() Add reverse-variants of qed_chain_get_elem_left{,u32}() to be able to know current chain occupation. They will be used in the upcoming qede XDP_REDIRECT code. They share most of the logics with the mentioned ones, so were reused to collapse the latters. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit f2aefd20b02d83b8565c867c38eedd88853967e9 Author: Alexander Lobakin Date: Thu Jul 23 01:10:40 2020 +0300 qed: optimize common chain accessors Constify chain pointers and refactor qed_chain_get_elem_left{,u32}() a bit. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 155065866bc36f20061c55fd2ca287a466911b16 Author: Alexander Lobakin Date: Thu Jul 23 01:10:39 2020 +0300 qed: add support for different page sizes for chains Extend current infrastructure to store chain page size in a struct and use it in all functions instead of fixed QED_CHAIN_PAGE_SIZE. Its value remains the default one, but can be overridden in qed_chain_init_params before chain allocation. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit b6db3f71c976ea92361dbc7ebfb65db666ac9f02 Author: Alexander Lobakin Date: Thu Jul 23 01:10:38 2020 +0300 qed: simplify chain allocation with init params struct To simplify qed_chain_alloc() prototype and call sites, introduce struct qed_chain_init_params to specify chain params, and pass a pointer to filled struct to the actual qed_chain_alloc() instead of a long list of separate arguments. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit c3a321b06a806614350db4bda04215fee796f0fb Author: Alexander Lobakin Date: Thu Jul 23 01:10:37 2020 +0300 qed: simplify initialization of the chains with an external PBL Fill PBL table parameters for chains with an external PBL data earlier on qed_chain_init_params() rather than on allocation itself. This simplifies allocation code and allows to extend struct ext_pbl for other chain types. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 5e776d8016119e13c27fbb6e87c9e1fd6f8b2a75 Author: Alexander Lobakin Date: Thu Jul 23 01:10:36 2020 +0300 qed: move chain initialization inlines next to allocation functions qed_chain_init*() are used in one file/place on "cold" path only, so they can be uninlined and moved next to the call sites. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 9b6ee3cf95d322ab02e9927f5b08ebc870ca9f1f Author: Alexander Lobakin Date: Thu Jul 23 01:10:35 2020 +0300 qed: sanitize PBL chains allocation PBL chain elements are actually DMA addresses stored in __le64, but currently their size is hardcoded to 8, and DMA addresses are assigned via cast to variable-sized dma_addr_t without any bitwise conversions. Change the type of pbl_virt array to match the actual one, add a new field to store the size of allocated DMA memory and sanitize elements assignment. Misc: give more logic names to the members of qed_chain::pbl_sp embedded struct. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 96ca4c50c7f711531d4fa238906f8abbbd0ff517 Author: Alexander Lobakin Date: Thu Jul 23 01:10:34 2020 +0300 qed: prevent possible double-frees of the chains Zero-initialize chain on qed_chain_free(), so it couldn't be freed twice and provoke undefined behaviour. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit a08c9b2c7ce52709f1915dae0bcd02070f39104e Author: Alexander Lobakin Date: Thu Jul 23 01:10:33 2020 +0300 qed: move chain methods to a separate file Move chain allocation/freeing functions to a new file to not mix it with hardware-related code. Reported-by: kernel test robot Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit bdaf98f6d526a8d64b5ff1441924f57fb85ba614 Author: Alexander Lobakin Date: Thu Jul 23 01:10:32 2020 +0300 qed: reformat Makefile List one entry per line and sort them alphabetically to simplify the addition of the new ones. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit 2cf2f4f546f1dea54b63302a7eb28d1fe15f1e28 Author: Alexander Lobakin Date: Thu Jul 23 01:10:31 2020 +0300 qed: reformat "qed_chain.h" a bit Reformat structs and macros definitions a bit prior to making functional changes. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: Michal Kalderon Signed-off-by: David S. Miller commit f1fa27f590e56c08bc1824974c5f69610133003d Author: Gustavo A. R. Silva Date: Wed Jul 22 13:58:52 2020 -0500 net: qed_hsi.h: Avoid the use of one-element array One-element arrays are being deprecated[1]. Replace the one-element array with a simple value type '__le32 reserved1'[2], once it seems this is just a placeholder for alignment. [1] https://github.com/KSPP/linux/issues/79 [2] https://github.com/KSPP/linux/issues/86 Tested-by: kernel test robot Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/qed_hsi-20200718.md Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 6fcf9affd1cb17bca2c4c4e9129c61d864dda6c9 Author: Gustavo A. R. Silva Date: Wed Jul 22 13:50:24 2020 -0500 bna: bfi.h: Avoid the use of one-element array One-element arrays are being deprecated[1]. Replace the one-element array with a simple value type 'u8 rsvd'[2], once it seems this is just a placeholder for alignment. [1] https://github.com/KSPP/linux/issues/79 [2] https://github.com/KSPP/linux/issues/86 Tested-by: kernel test robot Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/bfi-20200718.md Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 7ec3e95e7a778f1202f85a9046917d4f231ce799 Author: Gustavo A. R. Silva Date: Wed Jul 22 13:43:58 2020 -0500 tg3: Avoid the use of one-element array One-element arrays are being deprecated[1]. Replace the one-element array with a simple value type 'u32 reserved2'[2], once it seems this is just a placeholder for alignment. [1] https://github.com/KSPP/linux/issues/79 [2] https://github.com/KSPP/linux/issues/86 Tested-by: kernel test robot Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/tg3-20200718.md Signed-off-by: Gustavo A. R. Silva Reviewed-by: Michael Chan Signed-off-by: David S. Miller commit 4b1debbe63f46f951af81d80c0cc9dd646b6ceb6 Author: Colin Ian King Date: Wed Jul 22 18:40:03 2020 +0100 ionic: fix memory leak of object 'lid' Currently when netdev fails to allocate the error return path fails to free the allocated object 'lid'. Fix this by setting err to the return error code and jumping to a new label that performs the kfree of lid before returning. Addresses-Coverity: ("Resource leak") Fixes: 4b03b27349c0 ("ionic: get MTU from lif identity") Signed-off-by: Colin Ian King Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit aff598caeda5fbaef5384d6f4d903ad9d9558311 Merge: 637989b5d77e9 efcd8c8540f73 Author: David S. Miller Date: Wed Jul 22 18:08:39 2020 -0700 Merge branch 'l2tp-cleanup-checkpatch-pl-warnings' Tom Parkin says: ==================== l2tp: cleanup checkpatch.pl warnings l2tp hasn't been kept up to date with the static analysis checks offered by checkpatch.pl. This series addresses a range of minor issues which don't involve large changes to code structure. The changes include: * tweaks to use of whitespace, comment style, line breaks, and indentation * two minor modifications to code to use a function or macro suggested by checkpatch v1 -> v2 * combine related patches (patches fixing whitespace issues, patches addressing comment style) * respin the single large patchset into a multiple smaller series for easier review ==================== Reviewed-by: James Chapman Signed-off-by: David S. Miller commit efcd8c8540f73829a26f5d224ebdd99382fd1552 Author: Tom Parkin Date: Wed Jul 22 17:32:14 2020 +0100 l2tp: avoid precidence issues in L2TP_SKB_CB macro checkpatch warned about the L2TP_SKB_CB macro's use of its argument: add braces to avoid the problem. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit c0235fb39b0cdb8e33f1a68a031a94544487a56d Author: Tom Parkin Date: Wed Jul 22 17:32:13 2020 +0100 l2tp: line-break long function prototypes In l2tp_core.c both l2tp_tunnel_create and l2tp_session_create take quite a number of arguments and have a correspondingly long prototype. This is both quite difficult to scan visually, and triggers checkpatch warnings. Add a line break to make these function prototypes more readable. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit bdf9866e4b1be12a7af7eaf11f6dcf1b92f7073f Author: Tom Parkin Date: Wed Jul 22 17:32:12 2020 +0100 l2tp: prefer seq_puts for unformatted output checkpatch warns about use of seq_printf where seq_puts would do. Modify l2tp_debugfs accordingly. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit dbf82f3fac9d7cde572b08bde94d8aa117f92ac9 Author: Tom Parkin Date: Wed Jul 22 17:32:11 2020 +0100 l2tp: prefer using BIT macro Use BIT(x) rather than (1< Signed-off-by: David S. Miller commit bef04d162c52bd7e0b98ba5ee3f904e6556c6551 Author: Tom Parkin Date: Wed Jul 22 17:32:10 2020 +0100 l2tp: add identifier name in function pointer prototype Reported by checkpatch: "WARNING: function definition argument 'struct sock *' should also have an identifier name" Add an identifier name to help document the prototype. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 0864e331fd53fec3933b99beeb7b1136b14efc63 Author: Tom Parkin Date: Wed Jul 22 17:32:09 2020 +0100 l2tp: cleanup suspect code indent l2tp_core has conditionally compiled code in l2tp_xmit_skb for IPv6 support. The structure of this code triggered a checkpatch warning due to incorrect indentation. Fix up the indentation to address the checkpatch warning. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 8ce9825a5993a935631a84b5cce9f65af61d4e59 Author: Tom Parkin Date: Wed Jul 22 17:32:08 2020 +0100 l2tp: cleanup wonky alignment of line-broken function calls Arguments should be aligned with the function call open parenthesis as per checkpatch. Tweak some function calls which were not aligned correctly. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 9f7da9a0e3dc43fa6046fd29cc4531b86af65446 Author: Tom Parkin Date: Wed Jul 22 17:32:07 2020 +0100 l2tp: cleanup difficult-to-read line breaks Some l2tp code had line breaks which made the code more difficult to read. These were originally motivated by the 80-character line width coding guidelines, but were actually a negative from the perspective of trying to follow the code. Remove these linebreaks for clearer code, even if we do exceed 80 characters in width in some places. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 20dcb1107ab1a3423c72a88269b9775cc549262a Author: Tom Parkin Date: Wed Jul 22 17:32:06 2020 +0100 l2tp: cleanup comments Modify some l2tp comments to better adhere to kernel coding style, as reported by checkpatch.pl. Add descriptive comments for the l2tp per-net spinlocks to document their use. Fix an incorrect comment in l2tp_recv_common: RFC2661 section 5.4 states that: "The LNS controls enabling and disabling of sequence numbers by sending a data message with or without sequence numbers present at any time during the life of a session." l2tp handles this correctly in l2tp_recv_common, but the comment around the code was incorrect and confusing. Fix up the comment accordingly. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit b71a61ccfebb4ff733d2d9fc66cd5c75b7ae46a2 Author: Tom Parkin Date: Wed Jul 22 17:32:05 2020 +0100 l2tp: cleanup whitespace use Fix up various whitespace issues as reported by checkpatch.pl: * remove spaces around operators where appropriate, * add missing blank lines following declarations, * remove multiple blank lines, or trailing blank lines at the end of functions. Signed-off-by: Tom Parkin Signed-off-by: David S. Miller commit 637989b5d77e954007aecaf6cadc7badc6ab94fb Author: Parav Pandit Date: Wed Jul 22 18:57:11 2020 +0300 devlink: Always use user_ptr[0] for devlink and simplify post_doit Currently devlink instance is searched on all doit() operations. But it is optionally stored into user_ptr[0]. This requires rediscovering devlink again doing post_doit(). Few devlink commands related to port shared buffers needs 3 pointers (devlink, devlink_port, and devlink_sb) while executing doit commands. Though devlink pointer can be derived from the devlink_port during post_doit() operation when doit() callback has acquired devlink instance lock, relying on such scheme to access devlik pointer makes code very fragile. Hence, to avoid ambiguity in post_doit() and to avoid searching devlink instance again, simplify code by always storing devlink instance in user_ptr[0] and derive devlink_sb pointer in their respective callback routines. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit ba937f51090d04bde3c2b9bf1213dabac706461d Author: Loic Poulain Date: Tue Jul 21 12:18:34 2020 +0200 dt-bindings: clock: Fix qcom,msm8996-apcc yaml syntax Fix errors reported by dt_binding_check. - Fix literal block scalar for dts example - Fix schema identifier URI Signed-off-by: Loic Poulain Link: https://lore.kernel.org/r/1595326714-20485-1-git-send-email-loic.poulain@linaro.org Reviewed-by: Rob Herring Signed-off-by: Stephen Boyd commit fdd8fac47ce67bae17feed9b74b3505e432fe561 Author: Sriram Krishnan Date: Wed Jul 22 21:08:44 2020 +0530 hv_netvsc: add support for vlans in AF_PACKET mode Vlan tagged packets are getting dropped when used with DPDK that uses the AF_PACKET interface on a hyperV guest. The packet layer uses the tpacket interface to communicate the vlans information to the upper layers. On Rx path, these drivers can read the vlan info from the tpacket header but on the Tx path, this information is still within the packet frame and requires the paravirtual drivers to push this back into the NDIS header which is then used by the host OS to form the packet. This transition from the packet frame to NDIS header is currently missing hence causing the host OS to drop the all vlan tagged packets sent by the drivers that use AF_PACKET (ETH_P_ALL) such as DPDK. Here is an overview of the changes in the vlan header in the packet path: The RX path (userspace handles everything): 1. RX VLAN packet is stripped by HOST OS and placed in NDIS header 2. Guest Kernel RX hv_netvsc packets and moves VLAN info from NDIS header into kernel SKB 3. Kernel shares packets with user space application with PACKET_MMAP. The SKB VLAN info is copied to tpacket layer and indication set TP_STATUS_VLAN_VALID. 4. The user space application will re-insert the VLAN info into the frame The TX path: 1. The user space application has the VLAN info in the frame. 2. Guest kernel gets packets from the application with PACKET_MMAP. 3. The kernel later sends the frame to the hv_netvsc driver. The only way to send VLANs is when the SKB is setup & the VLAN is stripped from the frame. 4. TX VLAN is re-inserted by HOST OS based on the NDIS header. If it sees a VLAN in the frame the packet is dropped. Cc: xe-linux-external@cisco.com Cc: Sriram Krishnan Signed-off-by: Sriram Krishnan Reviewed-by: Haiyang Zhang Signed-off-by: David S. Miller commit 6ab301c98f174a8c25d5351b977a1113e2f1fb91 Author: Paolo Abeni Date: Wed Jul 22 17:20:50 2020 +0200 mptcp: zero token hash at creation time. Otherwise the 'chain_len' filed will carry random values, some token creation calls will fail due to excessive chain length, causing unexpected fallback to TCP. Fixes: 2c5ebd001d4f ("mptcp: refactor token container") Reviewed-by: Mat Martineau Tested-by: Christoph Paasch Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit bb809a047eb5070e2fc76aa62d111fbbe656c532 Author: Colin Ian King Date: Wed Jul 22 16:12:21 2020 +0100 lan743x: remove redundant initialization of variable current_head_index The variable current_head_index is being initialized with a value that is never read and it is being updated later with a new value. Replace the initialization of -1 with the latter assignment. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit c6dd6488acd105f4fde9b4d289aaef5669b12c76 Author: Claudiu Manoil Date: Wed Jul 22 15:38:48 2020 +0300 enetc: Remove the imdio bus on PF probe bailout enetc_imdio_remove() is missing from the enetc_pf_probe() bailout path. Not surprisingly because enetc_setup_serdes() is registering the imdio bus for internal purposes, and it's not obvious that enetc_imdio_remove() currently performs the teardown of enetc_setup_serdes(). To fix this, define enetc_teardown_serdes() to wrap enetc_imdio_remove() (improve code maintenance) and call it on bailout and remove paths. Fixes: 975d183ef0ca ("net: enetc: Initialize SerDes for SGMII and USXGMII protocols") Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit 7979a7d2abb831371f9e75ab88d94dda59dfcf96 Author: Wang Hai Date: Wed Jul 22 10:10:27 2020 +0800 net: qed: Remove unneeded cast from memory allocation Remove casting the values returned by memory allocation function. Coccinelle emits WARNING: casting value returned by memory allocation unction to (struct roce_destroy_qp_req_output_params *) is useless. This issue was detected by using the Coccinelle software. Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit fb16d465f7710d5bfb9bd4d4bee72ba053ab27da Author: Vladimir Oltean Date: Mon Jul 20 20:26:54 2020 +0300 net: phy: fix check in get_phy_c45_ids After the patch below, the iteration through the available MMDs is completely short-circuited, and devs_in_pkg remains set to the initial value of zero. Due to devs_in_pkg being zero, the rest of get_phy_c45_ids() is short-circuited too: the following loop never reaches below this point either (it executes "continue" for every device in package, failing to retrieve PHY ID for any of them): /* Now probe Device Identifiers for each device present. */ for (i = 1; i < num_ids; i++) { if (!(devs_in_pkg & (1 << i))) continue; So c45_ids->device_ids remains populated with zeroes. This causes an Aquantia AQR412 PHY (same as any C45 PHY would, in fact) to be probed by the Generic PHY driver. The issue seems to be a case of submitting partially committed work (and therefore testing something other than was submitted). The intention of the patch was to delay exiting the loop until one more condition is reached (the devs_in_pkg read from hardware is either 0, OR mostly f's). So fix the patch to reflect that. Tested with traffic on a LS1028A-QDS, the PHY is now probed correctly using the Aquantia driver. The devs_in_pkg bit field is set to 0xe000009a, and the MMDs that are present have the following IDs: [ 5.600772] libphy: get_phy_c45_ids: device_ids[1]=0x3a1b662 [ 5.618781] libphy: get_phy_c45_ids: device_ids[3]=0x3a1b662 [ 5.630797] libphy: get_phy_c45_ids: device_ids[4]=0x3a1b662 [ 5.654535] libphy: get_phy_c45_ids: device_ids[7]=0x3a1b662 [ 5.791723] libphy: get_phy_c45_ids: device_ids[29]=0x3a1b662 [ 5.804050] libphy: get_phy_c45_ids: device_ids[30]=0x3a1b662 [ 5.816375] libphy: get_phy_c45_ids: device_ids[31]=0x0 [ 7.690237] mscc_felix 0000:00:00.5: PHY [0.5:00] driver [Aquantia AQR412] (irq=POLL) [ 7.704739] mscc_felix 0000:00:00.5: PHY [0.5:01] driver [Aquantia AQR412] (irq=POLL) [ 7.718918] mscc_felix 0000:00:00.5: PHY [0.5:02] driver [Aquantia AQR412] (irq=POLL) [ 7.733044] mscc_felix 0000:00:00.5: PHY [0.5:03] driver [Aquantia AQR412] (irq=POLL) Fixes: bba238ed037c ("net: phy: continue searching for C45 MMDs even if first returned ffff:ffff") Reported-by: Colin King Reported-by: Ioana Ciornei Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 749c08f8206cdf5cad15d557912898ce22aa55da Author: Richard Sailer Date: Mon Jul 20 18:06:14 2020 +0200 net: dccp: Add SIOCOUTQ IOCTL support (send buffer fill) This adds support for the SIOCOUTQ IOCTL to get the send buffer fill of a DCCP socket, like UDP and TCP sockets already have. Regarding the used data field: DCCP uses per packet sequence numbers, not per byte, so sequence numbers can't be used like in TCP. sk_wmem_queued is not used by DCCP and always 0, even in test on highly congested paths. Therefore this uses sk_wmem_alloc like in UDP. Signed-off-by: Richard Sailer Signed-off-by: David S. Miller commit 09a0d326b977dbcae393d702a4dadd09fcbd06c7 Merge: 8bb849d67f44b 85e05d263ed2d Author: David S. Miller Date: Wed Jul 22 16:56:44 2020 -0700 Merge branch 'Add-DSA-yaml-binding' Kurt Kanzenbach says: ==================== Add DSA yaml binding as discussed [1] [2] it makes sense to add a DSA yaml binding. This is the second version and contains now two ways of specifying the switch ports: Either by "ports" or by "ethernet-ports". That is why the third patch also adjusts the DSA core for it. Tested in combination with the hellcreek.yaml file. Changes since v1: * Use select to not match unrelated switches * Allow ethernet-port(s) * List ethernet-controller properties * Include better description * Let dsa.txt refer to dsa.yaml Thanks, Kurt [1] - https://lkml.kernel.org/netdev/449f0a03-a91d-ae82-b31f-59dfd1457ec5@gmail.com/ [2] - https://lkml.kernel.org/netdev/20200710090618.28945-1-kurt@linutronix.de/ ==================== Signed-off-by: David S. Miller commit 85e05d263ed2d50e3be86c73175effe780ec1d9a Author: Kurt Kanzenbach Date: Mon Jul 20 14:49:39 2020 +0200 net: dsa: of: Allow ethernet-ports as encapsulating node Due to unified Ethernet Switch Device Tree Bindings allow for ethernet-ports as encapsulating node as well. Signed-off-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 5a18bb14c0f7ccd2c004ea2ca5ea106ec38675f8 Author: Kurt Kanzenbach Date: Mon Jul 20 14:49:38 2020 +0200 dt-bindings: net: dsa: Let dsa.txt refer to dsa.yaml The DSA bindings have been converted to YAML. Therefore, the old text style documentation should refer to that one. The text file can be removed completely once all the existing DSA switch bindings have been converted as well. Signed-off-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit bce58590d1bd29ae27d6a7b3e7639d36feba3ced Author: Kurt Kanzenbach Date: Mon Jul 20 14:49:37 2020 +0200 dt-bindings: net: dsa: Add DSA yaml binding For future DSA drivers it makes sense to add a generic DSA yaml binding which can be used then. This was created using the properties from dsa.txt. It includes the ports and the dsa,member property. Suggested-by: Florian Fainelli Signed-off-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit ec0160891e387f4771f953b888b1fe951398e5d9 Author: Jon Derrick Date: Tue Jul 21 14:26:09 2020 -0600 irqdomain/treewide: Free firmware node after domain removal Commit 711419e504eb ("irqdomain: Add the missing assignment of domain->fwnode for named fwnode") unintentionally caused a dangling pointer page fault issue on firmware nodes that were freed after IRQ domain allocation. Commit e3beca48a45b fixed that dangling pointer issue by only freeing the firmware node after an IRQ domain allocation failure. That fix no longer frees the firmware node immediately, but leaves the firmware node allocated after the domain is removed. The firmware node must be kept around through irq_domain_remove, but should be freed it afterwards. Add the missing free operations after domain removal where where appropriate. Fixes: e3beca48a45b ("irqdomain/treewide: Keep firmware node unconditionally allocated") Signed-off-by: Jon Derrick Signed-off-by: Thomas Gleixner Reviewed-by: Andy Shevchenko Acked-by: Bjorn Helgaas # drivers/pci Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1595363169-7157-1-git-send-email-jonathan.derrick@intel.com commit ef2ff0f5d6008d325c9a068e20981c0d0acc4d6b Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Jun 29 15:48:47 2020 +0100 x86/dumpstack: Show registers dump with trace's log level show_trace_log_lvl() provides x86 platform-specific way to unwind backtrace with a given log level. Unfortunately, registers dump(s) are not printed with the same log level - instead, KERN_DEFAULT is always used. Arista's switches uses quite common setup with rsyslog, where only urgent messages goes to console (console_log_level=KERN_ERR), everything else goes into /var/log/ as the console baud-rate often is indecently slow (9600 bps). Backtrace dumps without registers printed have proven to be as useful as morning standups. Furthermore, in order to introduce KERN_UNSUPPRESSED (which I believe is still the most elegant way to fix raciness of sysrq[1]) the log level should be passed down the stack to register dumping functions. Besides, there is a potential use-case for printing traces with KERN_DEBUG level [2] (where registers dump shouldn't appear with higher log level). After all preparations are done, provide log_lvl parameter for show_regs_if_on_stack() and wire up to actual log level used as an argument for show_trace_log_lvl(). [1]: https://lore.kernel.org/lkml/20190528002412.1625-1-dima@arista.com/ [2]: https://lore.kernel.org/linux-doc/20190724170249.9644-1-dima@arista.com/ Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Acked-by: Petr Mladek Link: https://lkml.kernel.org/r/20200629144847.492794-4-dima@arista.com commit 44e215352cf17333992d56941b5bf4af60a67609 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Jun 29 15:48:46 2020 +0100 x86/dumpstack: Add log_lvl to __show_regs() show_trace_log_lvl() provides x86 platform-specific way to unwind backtrace with a given log level. Unfortunately, registers dump(s) are not printed with the same log level - instead, KERN_DEFAULT is always used. Arista's switches uses quite common setup with rsyslog, where only urgent messages goes to console (console_log_level=KERN_ERR), everything else goes into /var/log/ as the console baud-rate often is indecently slow (9600 bps). Backtrace dumps without registers printed have proven to be as useful as morning standups. Furthermore, in order to introduce KERN_UNSUPPRESSED (which I believe is still the most elegant way to fix raciness of sysrq[1]) the log level should be passed down the stack to register dumping functions. Besides, there is a potential use-case for printing traces with KERN_DEBUG level [2] (where registers dump shouldn't appear with higher log level). Add log_lvl parameter to __show_regs(). Keep the used log level intact to separate visible change. [1]: https://lore.kernel.org/lkml/20190528002412.1625-1-dima@arista.com/ [2]: https://lore.kernel.org/linux-doc/20190724170249.9644-1-dima@arista.com/ Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Acked-by: Petr Mladek Link: https://lkml.kernel.org/r/20200629144847.492794-3-dima@arista.com commit fd07f802a70935fbbfb9cc2d11e1d8ac95f28e44 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Mon Jun 29 15:48:45 2020 +0100 x86/dumpstack: Add log_lvl to show_iret_regs() show_trace_log_lvl() provides x86 platform-specific way to unwind backtrace with a given log level. Unfortunately, registers dump(s) are not printed with the same log level - instead, KERN_DEFAULT is always used. Arista's switches uses quite common setup with rsyslog, where only urgent messages goes to console (console_log_level=KERN_ERR), everything else goes into /var/log/ as the console baud-rate often is indecently slow (9600 bps). Backtrace dumps without registers printed have proven to be as useful as morning standups. Furthermore, in order to introduce KERN_UNSUPPRESSED (which I believe is still the most elegant way to fix raciness of sysrq[1]) the log level should be passed down the stack to register dumping functions. Besides, there is a potential use-case for printing traces with KERN_DEBUG level [2] (where registers dump shouldn't appear with higher log level). Add log_lvl parameter to show_iret_regs() as a preparation to add it to __show_regs() and show_regs_if_on_stack(). [1]: https://lore.kernel.org/lkml/20190528002412.1625-1-dima@arista.com/ [2]: https://lore.kernel.org/linux-doc/20190724170249.9644-1-dima@arista.com/ Signed-off-by: Dmitry Safonov Signed-off-by: Thomas Gleixner Acked-by: Petr Mladek Link: https://lkml.kernel.org/r/20200629144847.492794-2-dima@arista.com commit 068c29a248b6ddbfdf7bb150b547569759620d36 Author: Jonathan Cameron Date: Mon Jun 22 19:35:23 2020 +0800 PCI/ERR: Clear PCIe Device Status errors only if OS owns AER pcie_clear_device_status() resets the error bits in the PCIe Device Status Register (PCI_EXP_DEVSTA). Previously we did this unconditionally, but on ACPI systems, the _OSC AER bit negotiates control of the AER capability. Per sec 4.5.1 of the System Firmware Intermediary _OSC and DPC Updates ECN [1], this bit also covers other error enable/status bits including the following: Correctable Error Reporting Enable Non-Fatal Error Reporting Enable Fatal Error Reporting Enable Unsupported Request Reporting Enable These bits are all in the PCIe Device Control register (the ECN omitted "Reporting", but I think that's a typo), so by implication the _OSC AER bit also applies to the error status bits in the PCIe Device Status register: Correctable Error Detected Non-Fatal Error Detected Fatal Error Detected Unsupported Request Detected Clear the PCIe Device Status error bits only when the OS controls the AER capability and related error enable/status bits. If platform firmware controls the AER capability, firmware is responsible for clearing these bits. One call path leading here is: ghes_do_proc ghes_handle_aer aer_recover_queue schedule_work(&aer_recover_work) ... aer_recover_work_func pcie_do_recovery pcie_clear_device_status [1] System Firmware Intermediary (SFI) _OSC and DPC Updates ECN, Feb 24, 2020, affecting PCI Firmware Specification, Rev. 3.2 https://members.pcisig.com/wg/PCI-SIG/document/14076 [bhelgaas: commit log, move test from pcie_clear_device_status() to callers] Link: https://lore.kernel.org/r/20200622113523.891666-1-Jonathan.Cameron@huawei.com Signed-off-by: Jonathan Cameron Signed-off-by: Bjorn Helgaas commit 5644f690b92c277f58ebc7452a095aa20e809478 Merge: 62e7df65cad30 3ecdf2a5d262d Author: Arnd Bergmann Date: Wed Jul 22 22:38:40 2020 +0200 Merge tag 'samsung-soc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v5.9 1. Restore big.LITTLE cpuidle support on Exynos542x boards. 2. Cleanups and minor fixes. * tag 'samsung-soc-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: s3c24xx: Replace HTTP links with HTTPS ones ARM: s3c24xx: leds: Convert to use GPIO descriptors ARM: exynos: MCPM: Restore big.LITTLE cpuidle support ARM: exynos: clear L310_AUX_CTRL_FULL_LINE_ZERO in default l2c_aux_val Link: https://lore.kernel.org/r/20200721180900.13844-4-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 600a5b4fc8e8f6dad098cd50e0e727cb2a16be46 Author: Bjorn Helgaas Date: Thu Jul 16 17:34:30 2020 -0500 PCI/ERR: Rename pci_aer_clear_device_status() to pcie_clear_device_status() pci_aer_clear_device_status() clears the error bits in the PCIe Device Status Register (PCI_EXP_DEVSTA). Every PCIe device has this register, regardless of whether it supports AER. Rename pci_aer_clear_device_status() to pcie_clear_device_status() to make clear that it is PCIe-specific but not AER-specific. Move it to drivers/pci/pci.c, again since it's not AER-specific. No functional change intended. Link: https://lore.kernel.org/r/20200717195619.766662-1-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit 18517746d732aabe27257d40a0955d0d177ab039 Merge: e2837df668377 03c900b3be116 Author: Arnd Bergmann Date: Wed Jul 22 22:36:18 2020 +0200 Merge tag 'qcom-drivers-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers Qualcomm driver updates for v5.9 For RPMh this fixes an issue where ktime was used during suspend, allows the driver to be used on ARM targets and some minor cleanups. It adds support for the latest format version in the socinfo driver and adds identifiers for SM8250 and SDM630. SMD-RPM gains compatibles for MSM8994 and MSM8936 and the Qualcomm SCM gains compatibles MSM8994 and IPQ8074. The GENI core code gains interconnect path voting and performance level support, with subsequent patches integrating this with the SPI, I2C, UART and QSPI drivers. Following this the KGDB support for the GENI serial driver is improved, the performance related to chip-select is improved for SPI and QSPI. * tag 'qcom-drivers-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (35 commits) soc: qcom: geni: Fix NULL pointer dereference tty: serial: qcom-geni-serial: Drop the icc bw votes in suspend for console serial: qcom_geni_serial: Always use 4 bytes per TX FIFO word serial: qcom_geni_serial: Make kgdb work even if UART isn't console spi: spi-geni-qcom: Get rid of most overhead in prepare_message() spi: spi-geni-qcom: Set the clock properly at runtime resume spi: spi-geni-qcom: Avoid clock setting if not needed spi: spi-qcom-qspi: Set an autosuspend delay of 250 ms spi: spi-qcom-qspi: Avoid clock setting if not needed spi: spi-qcom-qspi: Use OPP API to set clk/perf state firmware: qcom_scm: Add msm8994 compatible firmware: qcom_scm: Fix legacy convention SCM accessors : add stub for of_get_next_parent() to fix qcom build error dt-bindings: firmware: qcom: Add compatible for IPQ8074 SoC spi: spi-geni-qcom: Use OPP API to set clk/perf state tty: serial: qcom_geni_serial: Use OPP API to set clk/perf state spi: spi-qcom-qspi: Add interconnect support spi: spi-geni-qcom: Add interconnect support spi: spi-geni-qcom: Combine the clock setting code tty: serial: qcom_geni_serial: Add interconnect support ... Link: https://lore.kernel.org/r/20200721044812.3429652-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit e2837df66837736fab6253133f7b6f9d0e6e0810 Merge: 9e586c8431277 d82bcef5157de Author: Arnd Bergmann Date: Wed Jul 22 22:35:21 2020 +0200 Merge tag 'imx-drivers-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers i.MX drivers change for 5.9: - Update SCU irq code to call pm_system_wakeup() in general MU IRQ handler, so that system can be waked up when MU IRQ arrives. - Move i.MX SCU soc driver into imx firmware folder to get it initialized from i.MX SCU firmware driver. - Clean up soc-imx-scu driver a bit by using devm_kasprintf(). - Correct postfix setting for cm40 power domain in scu-pd driver. - Add resource management support for IMX_SCU firmware driver. - Add more cm4 resources to i.MX SCU power domain driver. - Select ARM_GIC_V3 from SOC_IMX8M for being able to use GICv3 driver in AARCH32 mode Linux on AARCH64 hardware. * tag 'imx-drivers-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: soc: imx: select ARM_GIC_V3 for i.MX8M firmware: imx: Move i.MX SCU soc driver into imx firmware folder firmware: imx: scu-pd: add more cm4 resources firmware: imx: add resource management api firmware: imx: scu-pd: fix cm40 power domain soc: imx: scu: use devm_kasprintf firmware: imx: make sure MU irq can wake up system from suspend mode Link: https://lore.kernel.org/r/20200720085536.24138-1-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 9e586c84312778cf132086a296fb96e72aa207fc Merge: 00067ca5331e8 ffebbecaaa86f Author: Arnd Bergmann Date: Wed Jul 22 22:34:13 2020 +0200 Merge tag 'reset-for-v5.9' of git://git.pengutronix.de/pza/linux into arm/drivers Reset controller updates for v5.9 This tag moves the reset-simple header out of drivers/reset for use by drivers outside of drivers/reset, adds a .reset() callback to reset-simple, converts i.MX reset bindings to json-schema, fixes a compile warning in the reset-intel-gw driver, and replaces some HTTP links with HTTPS ones in comments. * tag 'reset-for-v5.9' of git://git.pengutronix.de/pza/linux: reset: Replace HTTP links with HTTPS ones reset: intel: fix a compile warning about REG_OFFSET redefined dt-bindings: reset: Convert i.MX7 reset to json-schema dt-bindings: reset: Convert i.MX reset to json-schema reset: simple: Add reset callback reset: Move reset-simple header out of drivers/reset Link: https://lore.kernel.org/r/b718f052e38abbaac599d80645376b75e54aa5bd.camel@pengutronix.de Signed-off-by: Arnd Bergmann commit 00067ca5331e81f609d0e1255d4807ba24488aad Author: Marek Szyprowski Date: Tue Jul 21 20:09:00 2020 +0200 soc: samsung: exynos-regulator-coupler: Add simple voltage coupler for Exynos5800 Add a simple custom voltage regulator coupler for Exynos5800 SoCs, which require coupling between "vdd_arm" and "vdd_int" regulators. This coupler ensures that the voltage values don't go below the bootloader-selected operation point during the boot process until the clients set their constraints. It is achieved by assuming minimal voltage value equal to the current value if no constraints are set. This also ensures proper voltage balancing if any of the client driver is missing. The balancing code comes from the regulator/core.c with the additional logic for handling regulators without client constraints applied added. Link: https://lore.kernel.org/r/20200721180900.13844-5-krzk@kernel.org Signed-off-by: Marek Szyprowski Reviewed-by: Dmitry Osipenko Signed-off-by: Krzysztof Kozlowski Signed-off-by: Arnd Bergmann commit 39c8378a1cdf856a3671b6431f99352b75a07248 Author: Lars Povlsen Date: Mon Jun 15 15:32:39 2020 +0200 dt-bindings: clock: sparx5: Add bindings include file The Sparx5 support 9 different clock outputs. This include file has defines for each supported clock ordinal. Link: https://lore.kernel.org/r/20200615133242.24911-8-lars.povlsen@microchip.com Reviewed-by: Stephen Boyd Reviewed-by: Alexandre Belloni Signed-off-by: Lars Povlsen Reviewed-by: Rob Herring Signed-off-by: Arnd Bergmann commit 2ce39f20d0bfa2cae289beaf0ab1aa37fb2b93e6 Author: Lars Povlsen Date: Mon Jun 15 15:32:38 2020 +0200 dt-bindings: clock: sparx5: Add Sparx5 SoC DPLL clock This add the DT bindings documentation for the Sparx5 SoC DPLL clock Link: https://lore.kernel.org/r/20200615133242.24911-7-lars.povlsen@microchip.com Reviewed-by: Alexandre Belloni Signed-off-by: Lars Povlsen Reviewed-by: Rob Herring Signed-off-by: Arnd Bergmann commit 14bc6703b387cac2a9bec8f8d6bbffea63db43ea Author: Lars Povlsen Date: Mon Jun 15 15:32:36 2020 +0200 arm64: dts: sparx5: Add pinctrl support This add pinctrl support to the Microchip Sparx5 SoC. Link: https://lore.kernel.org/r/20200615133242.24911-5-lars.povlsen@microchip.com Reviewed-by: Alexandre Belloni Signed-off-by: Lars Povlsen Signed-off-by: Arnd Bergmann commit 6694aee00a4b478d2dd82837f39b5dc9cbedfbcf Author: Lars Povlsen Date: Mon Jun 15 15:32:35 2020 +0200 arm64: dts: sparx5: Add basic cpu support This adds the basic DT structure for the Microchip Sparx5 SoC, and the reference boards, pcb125, pcb134 and pcb135. The two latter have a NAND vs a eMMC centric variant (as a mount option). Link: https://lore.kernel.org/r/20200615133242.24911-4-lars.povlsen@microchip.com Reviewed-by: Alexandre Belloni Signed-off-by: Lars Povlsen Signed-off-by: Arnd Bergmann commit 31a91c87a42bf3f7261e5752db5784fa43fbced5 Author: Lars Povlsen Date: Mon Jun 15 15:32:34 2020 +0200 arm64: sparx5: Add support for Microchip 2xA53 SoC This adds support for the Microchip Sparx5 ARMv8-based SoC family of TSN-capable gigabit switches. Link: https://lore.kernel.org/r/20200615133242.24911-3-lars.povlsen@microchip.com Reviewed-by: Alexandre Belloni Signed-off-by: Lars Povlsen Signed-off-by: Arnd Bergmann commit 85032207c86dcb6e13a3afd0650c44ecfc6df4c6 Author: Lars Povlsen Date: Mon Jun 15 15:32:33 2020 +0200 dt-bindings: arm: sparx5: Add documentation for Microchip Sparx5 SoC This adds the main Sparx5 SoC DT documentation file, with information abut the supported board types. Link: https://lore.kernel.org/r/20200615133242.24911-2-lars.povlsen@microchip.com Reviewed-by: Alexandre Belloni Signed-off-by: Lars Povlsen Reviewed-by: Rob Herring Signed-off-by: Arnd Bergmann commit ef67744e7a4c82e246cd9831208d07249c519d22 Merge: 659bf827ba8f1 fe630de009d07 Author: Jens Axboe Date: Wed Jul 22 14:11:38 2020 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.9/drivers Pull MD for 5.9 from Song. * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid10: avoid deadlock on recovery. raid: md_p.h: drop duplicated word in a comment md-cluster: fix rmmod issue when md_cluster convert bitmap to none md-cluster: fix safemode_delay value when converting to clustered bitmap md/raid5: support config stripe_size by sysfs entry md/raid5: set default stripe_size as 4096 md/raid456: convert macro STRIPE_* to RAID5_STRIPE_* raid5: remove the meaningless check in raid5_make_request raid5: put the comment of clear_batch_ready to the right place raid5: call clear_batch_ready before set STRIPE_ACTIVE md: raid10: Fix compilation warning md: raid5: Fix compilation warning md: raid5-cache: Remove set but unused variable md: Fix compilation warning commit 67598a474fbbb0a323bf07048d750247f1237198 Author: Lubomir Rintel Date: Sat Jul 18 22:50:19 2020 +0200 ARM: dts: mmp3-dell-ariel: Enable the GPU Enable the 2D (GC300) and the 3D (GC2000) GPUs cores. Link: https://lore.kernel.org/r/20200718205019.184927-14-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit d896b86e09a723d442058eb95d4324a629859864 Author: Lubomir Rintel Date: Sat Jul 18 22:50:18 2020 +0200 ARM: dts: mmp3: Add the GPU There's a GC2000 3D core accompanied by a GC300 2D core. Link: https://lore.kernel.org/r/20200718205019.184927-13-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit cbcb5b33df5fbd4ccea91cb4e767e74dcdd13ad0 Author: Lubomir Rintel Date: Sat Jul 18 22:50:17 2020 +0200 ARM: dts: mmp2-olpc-xo-1-75: Enable the GPU Enable the 3D + 2D (GC860) GPU core. Link: https://lore.kernel.org/r/20200718205019.184927-12-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit b4c2abb6810e9382733c067deb35fe83359e5a09 Author: Lubomir Rintel Date: Sat Jul 18 22:50:16 2020 +0200 ARM: dts: mmp2: Add the GPU There's a GC860 2D + 3D core. Link: https://lore.kernel.org/r/20200718205019.184927-11-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit d1e6f7c9f0f116e9b708a5e129856a4012fbd264 Author: Lubomir Rintel Date: Sat Jul 18 22:50:15 2020 +0200 ARM: dts: mmp2-olpc-xo-1-75: Enable audio support This enables the audio SRAM, DMA engine, I2S interface, and codec, hooks them together and adds a audio-graph-card instance. It also removes the jack gpios from the gpio-keys instance, because the audio jack driver registers an input device. Link: https://lore.kernel.org/r/20200718205019.184927-10-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit 3f2326312aec91f8fdd5101fd662b3065e068aeb Author: Lubomir Rintel Date: Sat Jul 18 22:50:14 2020 +0200 ARM: dts: mmp2: Add SSPA nodes There are two I2S-capable audio serial port blocks. Link: https://lore.kernel.org/r/20200718205019.184927-9-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit 5fd71502e2a78a78b11e338033afe44f6501e759 Author: Lubomir Rintel Date: Sat Jul 18 22:50:13 2020 +0200 ARM: dts: mmp2: Add Audio Clock controller This device generates the audio codec master clock and bit clock. Link: https://lore.kernel.org/r/20200718205019.184927-8-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit f3f202bb5600e77dc54ae1d90d6db1dcff2688b2 Author: Lubomir Rintel Date: Sat Jul 18 22:50:12 2020 +0200 ARM: dts: mmp2: Add DMA nodes There is a 16-channel peripheral DMA controller along with two-channel audio DMA engines. Link: https://lore.kernel.org/r/20200718205019.184927-7-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit f2023d9d105104fb94d59cf83afb0fa843638245 Author: Lubomir Rintel Date: Sat Jul 18 22:50:11 2020 +0200 ARM: dts: mmp2: Add Audio SRAM This memory is region is where the two-channel audio DMA can pump sound samples into the SSPA's internal FIFO. Link: https://lore.kernel.org/r/20200718205019.184927-6-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit f45a04a5ec448ad8ded1cdc095f6acb005e6b66a Author: Lubomir Rintel Date: Sat Jul 18 22:50:10 2020 +0200 ARM: dts: mmp2: Extend the MPMU reg range The ACGR register is at the offset of 0x1024, beyond the 4k originally assigned to the MPMU range. Link: https://lore.kernel.org/r/20200718205019.184927-5-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit 1267340fe51c15dcc22d2f11d1c69f97c5e2f878 Author: Lubomir Rintel Date: Sat Jul 18 22:50:09 2020 +0200 ARM: dts: mmp2: Add #power-domain-cells to /clocks The power management unit, described by the soc_clocks node, controls the power to the peripherals by the means of power domains with a single cell -- the domain number. Link: https://lore.kernel.org/r/20200718205019.184927-4-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit f45200b67ea381d784dca8088dc31cbf06bd17cc Author: Lubomir Rintel Date: Sat Jul 18 22:50:08 2020 +0200 ARM: dts: mmp2-olpc-xo-1-75: Delete #address-cells from ssp3 On the XO-1.75, this node represents a bus interface that operates in slave mode and thus is only able to accommodate a single subnode; no address cells are necessary. The Documentation/devicetree/bindings/spi/spi-controller.yaml binding prefers that we drop the property instead of setting it to zero. This fixes a DT validation error: arch/arm/boot/dts/mmp2-olpc-xo-1-75.dt.yaml: spi@d4037000: { ... } is valid under each of {'required': ['spi-slave']}, {'required': ['#address-cells']} We also need to drop #size-cells: arch/arm/boot/dts/mmp2-olpc-xo-1-75.dt.yaml: spi@d4037000: '#address-cells' is a dependency of '#size-cells' Link: https://lore.kernel.org/r/20200718205019.184927-3-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit 9dbf272cf4f1c7c03576c9162020ce64a3d2b797 Author: Lubomir Rintel Date: Sat Jul 18 22:50:07 2020 +0200 ARM: dts: mmp2-olpc-xo-1-75: Fix camera I2C node validation mmp2-olpc-xo-1-75.dt.yaml: camera_i2c: $nodename:0: 'camera_i2c' does not match '^i2c(@.*)?' mmp2-olpc-xo-1-75.dt.yaml: camera_i2c: 'sda-gpios' is a required property mmp2-olpc-xo-1-75.dt.yaml: camera_i2c: 'scl-gpios' is a required property The "gpios" property actually was documented as deprecated, but got dropped in commit 0175ce4a58d6 ("dt-bindings: i2c: Convert i2c-gpio binding to json-schema"). It's probably best kept forgotten though. Link: https://lore.kernel.org/r/20200718205019.184927-2-lkundrak@v3.sk Signed-off-by: Lubomir Rintel Signed-off-by: Arnd Bergmann commit 6b848e263aafee9f72df80f8f127e586606c4a3e Merge: b61010a1ec458 537b91180dc29 Author: Arnd Bergmann Date: Wed Jul 22 22:03:23 2020 +0200 Merge tag 'ux500-dts-for-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into arm/dt Ux500 DTS changes for the v5.9 kernel series: - Add touchkey to the Samsung Golden. - Fix up the supply nodes for the AB8500 PWM devices. - Fix up the cache controller node names. - Fix the Samsing Skomer accelerometer mounting matrix. * tag 'ux500-dts-for-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: dts: ux500-skomer: Correct accel mounting matrix ARM: dts: ste: Align L2 cache-controller nodename with dtschema ARM: dts: ux500: Supply nodes for the other 2 AB8500 PWM devices ARM: dts: ux500: samsung-golden: Add touchkey Link: https://lore.kernel.org/r/CACRpkdZZgZ1LeOK5zFj5Z6Mh=RVz37hZ-7Z4DQNGC1uaiEVTeA@mail.gmail.com Signed-off-by: Arnd Bergmann commit 8bb849d67f44b1a1280cda900ea02fdbc36d4363 Author: Vladimir Oltean Date: Wed Jul 22 11:08:57 2020 +0300 net: mscc: ocelot: fix non-initialized CPU port on VSC7514 The VSC7514 is marketed as a 10-port switch, however it has 11 physical ports (0->10) in the block diagram: https://www.microsemi.com/product-directory/ethernet-switches/3992-vsc7514 (also in the device tree at arch/mips/boot/dts/mscc/ocelot.dtsi) Additionally, by architecture it has one more entry in the analyzer block, situated right after the physical ports, for the CPU port module. This is not a physical port, it only represents a channel for frame injection and extraction. That entry for the CPU port is at index 11 in the analyzer. When the register groups for QSYS_SWITCH_PORT_MODE, SYS_PORT_MODE and SYS_PAUSE_CFG are declared to be replicated 11 times, the 11th entry in the array of regfields is not initialized, so the CPU port module is not initialized either. The documentation of QSYS_SWITCH_PORT_MODE for VSC7514 also says that this register group is replicated 12 times, so this patch is simply reflecting that and not introducing any further inconsistency. Fixes: 886e1387c73d ("net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields") Fixes: 541132f0961a ("net: mscc: ocelot: convert SYS_PAUSE_CFG register access to regfield") Reported-by: Bryan Whitehead Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit b61010a1ec4586ba68606353064db6a1c6ec9926 Merge: bd979a33ace64 d9b6b5150fba2 Author: Arnd Bergmann Date: Wed Jul 22 22:02:00 2020 +0200 Merge tag 'stm32-dt-for-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT updates for v5.9, round 1 Highlights: ---------- MCU part: -Enable stmpe811 on stm32f429 -Enable l3gd20-gyro on stm32f429 -Enable panel-ilitek-9341 on stm32f429 -Fixes for yaml validation (leds, nodes names, remove useless bindings ...) -Add stm32xxx compatibles for syscon nodes MPU part: -Add support for usb role switch to dwc2 -Add stm32xxx compatibles for syscon nodes -Update uart4 pin configuration for low power mode used by dkx and ed1 ST boards -Fix uart nodes ordering and uart7_pins_a comments -Add the support of uart instances available on STM32MP157 boards: - usart3 on stm32mp157c-ev1, stm32mp157a-dk1, and stm32mp157c-dk2 - uart7 on stm32mp157a-dk1 and stm32mp157c-dk2 - usart2 on stm32mp157c-dk2 -Configure I2C5 on stm32mp15 DK boards * tag 'stm32-dt-for-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (38 commits) ARM: dts: stm32: enable usb-role-switch on USB OTG on stm32mp15xx-dkx ARM: dts: stm32: Add compatibles for syscon for stm32mp151 ARM: dts: stm32: Add compatibles for syscon for stm32h743 ARM: dts: stm32: Add compatibles for syscon for stm32f746 ARM: dts: stm32: Add compatibles for syscon for stm32f426 dt-bindings: arm: stm32: Add compatibles for syscon nodes ARM: dts: stm32: Fix spi4 pins in stm32mp15-pinctrl ARM: dts: stm32: configure i2c5 support on stm32mp15xx-dkx ARM: dts: stm32: add usart2 node to stm32mp157c-dk2 ARM: dts: stm32: add uart7 support to stm32mp15xx-dkx boards ARM: dts: stm32: add usart3 node to stm32mp157c-ev1 ARM: dts: stm32: add usart3 node to stm32mp15xx-dkx boards ARM: dts: stm32: add usart2, usart3 and uart7 pins in stm32mp15-pinctrl ARM: dts: stm32: cosmetic updates in stm32mp15-pinctrl ARM: dts: stm32: fix uart7_pins_a comments in stm32mp15-pinctrl ARM: dts: stm32: fix uart nodes ordering in stm32mp15-pinctrl ARM: dts: stm32: Update UART4 pin states on stm32mp15xx-dkx ARM: dts: stm32: Update pin states for uart4 on stm32mp157c-ed1 ARM: dts: stm32: update uart4 pin configuration for low power on stm32mp157 dt-bindings: usb: dwc2: Fix issues for stm32mp15x SoC ... Link: https://lore.kernel.org/r/8a9bb27b-fc08-126a-11f7-01354e8577e1@st.com Signed-off-by: Arnd Bergmann commit a6c0d0934f0d8d4e32a3e3bca4b503a3e7237470 Author: Christoph Hellwig Date: Wed Jul 22 09:40:27 2020 +0200 net: explicitly include in net/core/sock.c The buildbot found a config where the header isn't already implicitly pulled in, so add an explicit include as well. Fixes: 8c918ffbbad4 ("net: remove compat_sock_common_{get,set}sockopt") Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit bd979a33ace64188d72e2615b7f6231fdd8e841c Merge: 3236013b7091c 229134cc51d73 Author: Arnd Bergmann Date: Wed Jul 22 21:59:59 2020 +0200 Merge tag 'samsung-dt64-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v5.9 1. Enable UFS (Universal Flash Storage) on Exynos7 Espresso board. 2. Fix silent hang after boot off Exynos7 Espresso board. 3. Minor DTS fixes and adjustments with dtschema. * tag 'samsung-dt64-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: Add unit address to soc node and move thermal zones on Exynos7 arm64: dts: exynos: Add unit address to soc node on Exynos5433 arm64: dts: exynos: Remove DMA controller bus node name to fix dtschema warnings arm64: dts: exynos: Keep LDO12 always-on on Espresso arm64: dts: exynos: Fix silent hang after boot on Espresso arm64: dts: exynos: Remove generic arm,armv8-pmuv3 compatible arm64: dts: exynos: Describe PWM interrupts on Exynos7 arm64: dts: exynos: Add UFS node to Exynos7 Link: https://lore.kernel.org/r/20200721180900.13844-3-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 3236013b7091c0095c2c165d3c60a3334a2aa0f1 Merge: 42f8362abd0e2 f37b5d3aef8db Author: Arnd Bergmann Date: Wed Jul 22 21:58:56 2020 +0200 Merge tag 'samsung-dt-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.9 1. Enable Bluetooth on Artik5 (Exynos3250). 2. Enable accelerometer on Aries boards (Samsung Galaxy S family, S5Pv210); multiple fixes. 3. Fix highest frequencies on Exynos5800. 4. Fix rare USB instability on Odroid XU3 family (Exynos5422). 5. Minor DTS fixes and adjustments with dtschema. * tag 'samsung-dt-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Replace HTTP links with HTTPS ones ARM: dts: exynos: Disable frequency scaling for FSYS bus on Odroid XU3 family ARM: dts: exynos: Define fixed regulators in root node for consistency in SMDK5420 ARM: dts: exynos: Define fixed regulators in root node for consistency in Arndale ARM: dts: exynos: Define fixed regulators in root node for consistency in Origen ARM: dts: exynos: Remove DMA controller bus node name to fix dtschema warnings ARM: dts: exynos: Fix missing empty reg/ranges property regulators on Trats ARM: dts: exynos: Align L2 cache-controller nodename with dtschema ARM: dts: s5pv210: Correct BCM4329 bluetooth node ARM: dts: s5pv210: Add BMA023 accelerometer support to Aries ARM: dts: s5pv210: Add support for GP2A light sensor on Aries ARM: dts: s5pv210: Correct fuelgauge definition on Aries ARM: dts: s5pv210: Add interrupt-controller property to gph3 ARM: dts: exynos: Enable Bluetooth support for Artik5 board ARM: dts: exynos: Extend all Exynos5800 A15's OPPs with max voltage data Link: https://lore.kernel.org/r/20200721180900.13844-2-krzk@kernel.org Signed-off-by: Arnd Bergmann commit 42f8362abd0e272ae0f3afadc1151e709bce8de4 Merge: c6e2e454baef6 5de47779cf7cf Author: Arnd Bergmann Date: Wed Jul 22 21:58:15 2020 +0200 Merge tag 'qcom-dts-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM dts updates for v5.9 Add QFPROM and ethernet for ipq8064 and a new DTS for the MikroTik RB3011 using the same platform. * tag 'qcom-dts-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: add qfprom definition to ipq806x ARM: dts: qcom: Add MikroTik RB3011 ARM: dts: qcom: add ethernet definitions to ipq8064 Link: https://lore.kernel.org/r/20200721045032.3430395-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit c6e2e454baef6080ef89c2b6488e708d5fa0f052 Merge: 01407153cfede 208921bae696d Author: Arnd Bergmann Date: Wed Jul 22 21:55:45 2020 +0200 Merge tag 'qcom-arm64-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 DT updates for v5.9 For SM8250 this adds the main pinctrl/gpio block (TLMM), I2C and SPI controllers, the CPU subsytem watchdog, inter-processor signalling controller (IPCC), always-on power/clock controller (AOSS), inter-processor state machine (SMP2P), defines remoteproc controls for audio, compute and sensor processors and base definition for the PM8009 PMIC. It also does fix up a few minor issues from the initial merge of the platform support. SC7180 and SDM845 gains interconnect paths and performance tables defined for display, QUP, QSPI, SDHC and CPUs. SC7180 gains WiFi support and some cleanups related to the modem remoteproc. SDM845 gains inline crypto engine support for UFS, LAB/IBB regulators for powering display panels, remoteproc relocation debug support SM8150 gains USB controller support and the two related PHYs, as well as thermal zones and throttling support. IPQ8074 gains USB and SDHCI support. MSM8916 is being cleaned up, gains interconnect providers and Samsung A2015 gains accelerometer and magnetometer support. MSM8994 gains PSCI, SDHCI, SPMI support, I2C, SPI, UART gains DMA support and the DTS files are cleaned up. The SDM630 platform DTS is at last merged and initial support for Sony Xperia 10, 10 Plus, XA2, XA2 Plus and XA2 Ultra is added. * tag 'qcom-arm64-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (66 commits) arm64: dts: qcom: pmi8998: Add nodes for LAB and IBB regulators arm64: dts: sc7180: Add DSI and MDP OPP tables and power-domains arm64: dts: sdm845: Add DSI and MDP OPP tables and power-domains arm64: dts: qcom: sc7180: Move the fixed-perm property to SoC dtsi arm64: dts: qcom: msm8916-samsung-a2015: Add accelerometer/magnetometer arm64: dts: qcom: msm8916: Use higher I2C drive-strength only on DB410c arm64: dts: qcom: msm8916: Simplify pinctrl configuration arm64: dts: msm8916-samsung/longcheer: Move pinctrl/regulators to end of file arm64: dts: qcom: sm8250: Drop tcsr_mutex syscon arm64: dts: qcom: sc7180: Add missing properties for Wifi node arm64: dts: qcom: Fix WiFi supplies on sc7180-idp arm64: dts: sdm845: add Inline Crypto Engine registers and clock arm64: dts: sc7180: Add sdhc opps and power-domains arm64: dts: sdm845: Add sdhc opps and power-domains arm64: dts: sc7180: Add OPP table for all qup devices arm64: dts: sdm845: Add OPP table for all qup devices arm64: dts: sc7180: Add qspi opps and power-domains arm64: dts: sdm845: Add qspi opps and power-domains arm64: dts: qcom: sdm845: Add cpu OPP tables arm64: dts: qcom: sc7180: Drop the unused non-MSA SID ... Link: https://lore.kernel.org/r/20200721044934.3430084-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 01407153cfede2cc874528cd3419348957ab5726 Merge: 6ce448eeef446 bbe28fc3cbabb Author: Arnd Bergmann Date: Wed Jul 22 21:53:43 2020 +0200 Merge tag 'hisi-arm64-dt-for-5.9' of git://github.com/hisilicon/linux-hisi into arm/dt ARM64: DT: Hisilicon SoCs DT updates for 5.9 - Refactor hi6220-hikey dts to use phandles for overriding nodes - Align UART node name to fix dtschema validator warnings for hi6220 - Add basic usb gadget support on hikey960 - Update adv7533 nodes to meet with the binding for hikey and hikey960 * tag 'hisi-arm64-dt-for-5.9' of git://github.com/hisilicon/linux-hisi: arm64: dts: hisilicon: hikey: fixes to comply with adi, adv7533 DT binding dts: hi3660: Add support for basic usb gadget on Hikey960 arm64: dts: hisilicon: Align UART nodename with dtschema arm64: dts: hisilicon: Use phandles for overriding nodes in hi6220 Link: https://lore.kernel.org/r/5F165E8E.3030503@hisilicon.com Signed-off-by: Arnd Bergmann commit 6ce448eeef446d212c0d6c5d1affd42cf591ed36 Merge: 4828f4570873b 5720fcdc2e5af Author: Arnd Bergmann Date: Wed Jul 22 21:51:57 2020 +0200 Merge tag 'hisi-arm32-dt-for-5.9' of git://github.com/hisilicon/linux-hisi into arm/dt ARM: DT: Hisilicon ARM32 SoCs updates for v5.9 - Update L2 cache controller nodes to fix dtschema validator warnings for hi3620 and hix5hd2 * tag 'hisi-arm32-dt-for-5.9' of git://github.com/hisilicon/linux-hisi: ARM: dts: hisilicon: Align L2 cache-controller nodename with dtschema Link: https://lore.kernel.org/r/5F165FA1.2030301@hisilicon.com Signed-off-by: Arnd Bergmann commit 4828f4570873be48c4007634091b3bd8a59bb7ad Merge: 262fc784d8565 bc6b31c53ce89 Author: Arnd Bergmann Date: Wed Jul 22 21:50:35 2020 +0200 Merge tag 'sunxi-dt-for-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt Our usual number of patches to improve the Allwinner Device Tree support, including: - CPUFreq / Thermal throttling support for the H5 - Touchscreen support for the Pinephone - New boards: PinePhone v1.2 * tag 'sunxi-dt-for-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: arm64: dts: allwinner: h5: bananapi-m2-plus-v1.2: Tie in CPU OPPs arm64: dts: allwinner: h5: libretech-all-h3-cc: Tie in CPU OPPs arm64: dts: allwinner: h5: Add CPU Operating Performance Points table arm64: dts: allwinner: h5: Add trip and cooling maps to CPU thermal zones arm64: dts: allwinner: h5: Add clock to CPU cores ARM: dts: sunxi: bananapi-m2-plus-v1.2: Fix CPU supply voltages ARM: dts: sunxi: bananapi-m2-plus-v1.2: Add regulator supply to all CPU cores ARM: dts: sunxi: libretech-all-h3-cc: Add regulator supply to all CPU cores arm64: dts: sun50i-pinephone: dldo4 must not be >= 1.8V arm64: dts: allwinner: Add support for PinePhone revision 1.2 dt-bindings: arm: sunxi: Add PinePhone 1.2 bindings arm64: dts: sun50i-a64-pinephone: Add touchscreen support arm64: dts: sun50i-a64-pinephone: Enable LCD support on PinePhone ARM: dts: orange-pi-zero-plus2: add leds configuration ARM: dts: orange-pi-zero-plus2: enable USB OTG port Link: https://lore.kernel.org/r/fa48ffcb-3404-41bb-b065-a16717cf5688.lettre@localhost Signed-off-by: Arnd Bergmann commit 262fc784d856597ea0bc00cc547bba116f6f4f39 Merge: 3b796abd3027c f7f7a8f4ebf8b Author: Arnd Bergmann Date: Wed Jul 22 21:49:58 2020 +0200 Merge tag 'versatile-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator into arm/dt Versatile DTS changes for the v5.9 kernel cycle, essentially just a single patch fixing up the node names for schema. * tag 'versatile-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator: ARM: dts: arm-realview: Align L2 cache-controller nodename with dtschema Link: https://lore.kernel.org/r/CACRpkdbkM9ZmuG2FnBmO7upcJfnqq2oSLDCFDXC5b3K+dtps9Q@mail.gmail.com Signed-off-by: Arnd Bergmann commit 3b796abd3027c44b0fd1d40b5501d71af2ce7d76 Merge: d27895a122232 7339115a8bee8 Author: Arnd Bergmann Date: Wed Jul 22 21:48:15 2020 +0200 Merge tag 'imx-dt64-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree update for 5.9: - Update i.MX8M OCOTP device node name to match .yaml schema. - Add ftm_alarm0 device support for layerscape SoCs. - Add DSPI controller support for lx2160a device. - A series from Peng Fan to add aliases for various devices on i.MX8 SoCs. - Add Hantro G1/G2 VPU device support for imx8mq. - Add more thermal zone support for ls1028a, ls1043a and ls1046a. - Other small random changes. * tag 'imx-dt64-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (26 commits) arm64: dts: lx2160a-rdb: fix shunt-resistor value arm64: dts: ls1028a-qds: Add DSPI flash nodes arm64: dts: lx2160a: Increase configuration space size arm64: dts: zii-ultra: update MDIO speed and preamble arm64: dts: ls1043a: update USB nodes status to match board config arm64: dts: imx8mn-evk: add pca9450 for i.mx8mn-evk board arm64: dts: imx8mp: add ddr pmu device node arm64: dts: ls1043a: add more thermal zone support arm64: dts: ls1046a: add more thermal zone support arm64: dts: layerscape: add ftm_alarm0 node arm64: dts: ls1028a: Add ftm_alarm0 DT node arm64: dts: lx2160a: add ftm_alarm0 DT node arm64: dts: lx2160a: add DT node for all DSPI controller arm64: dts: lx2160a: add dspi controller DT nodes arm64: dts: imx8mp: Add fallback compatible to ocotp node arm64: dts: imx8qxp: Add ethernet alias arm64: dts: imx8qxp: add i2c aliases arm64: dts: imx8qxp: add alias for lsio MU arm64: dts: imx8m: add mu node arm64: dts: imx8m: change ocotp node name on i.MX8M SoCs ... Link: https://lore.kernel.org/r/20200720085536.24138-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit d27895a12223200f8b31bfce0d370c20501b55f3 Merge: 8fc5082aa470d 983467bef4519 Author: Arnd Bergmann Date: Wed Jul 22 21:46:21 2020 +0200 Merge tag 'imx-dt-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX device tree update for 5.9: - New board support: Protonic PRTI6Q/WD2/VT7/RVT and MYiR MYS-6ULX SBC. - Update IIM, OCOTP and SD/MMC device node name to match .yaml bindings. - Make tempmon node as child of anatop node according to hardware architecture. - The vf610-zii device update: configure fiber port to 1000BaseX, add switch watchdog, MDIO speed and preamble. - A series from Fabio Estevam to update imx6qdl-sabresd and imx6q-tbs2910 for using MDIO node and reset-assert-us. - Align L2 cache-controller device node name with .yaml schema. - Enable SATA support for imx6qp-sabreauto and imx6qp-sabresd board. - A series of patches from Shengjiu Wang to enable various audio support on i.MX6 devices. - Add Gateworks System Controller support for imx6qdl-gw devices. - Change default #pwm-cells setting to <3> in the SoC dtsi files. - Other small random changes. * tag 'imx-dt-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (43 commits) ARM: dts: vf610-zii-ssmb-spu3: Add node for switch watchdog ARM: dts: vf610-zii-ssmb-dtu: Add no-sdio/no-sd properties ARM: dts: imx6q-tbs2910: Pass reset-assert-us ARM: dts: imx6q-tbs2910: Add an mdio node ARM: dts: imx6qdl-sabresd: Pass reset-assert-us ARM: dts: imx6qdl-sabresd: Add an mdio node ARM: dts: imx6qdl-gw: add Gateworks System Controller support ARM: dts: imx6ull: add MYiR MYS-6ULX SBC ARM: dts: vf610-zii-spb4: Add node for switch watchdog ARM: dts: colibri-imx6: remove pinctrl-names orphan ARM: dts: imx: default to #pwm-cells = <3> in the SoC dtsi files ARM: dts: vf610-zii-scu4-aib: Configure fibre ports to 1000BaseX ARM: dts: vf610-zii-dev-rev-c: Configure fiber port to 1000BaseX ARM: dts: ZII: update MDIO speed and preamble ARM: dts: vfxxx: Add node for CAAM ARM: dts: imx6qp-sabresd: enable sata ARM: dts: imx6qp-sabreauto: enable sata ARM: dts: add Protonic RVT board ARM: dts: add Protonic VT7 board ARM: dts: add Protonic WD2 board ... Link: https://lore.kernel.org/r/20200720085536.24138-3-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 8fc5082aa470dc4ab1e88a8550a80ebbb8ea4877 Merge: 36e163eda14c8 d56567dba011f Author: Arnd Bergmann Date: Wed Jul 22 21:45:28 2020 +0200 Merge tag 'imx-bindings-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX DT bindings for 5.9: - Add compatible for Protonic PRTI6Q, WD2, RVT, VT7 boards. - Add compatible for MYiR Tech iMX6ULL Evaluation Board * tag 'imx-bindings-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: Add MYiR Tech boards dt-bindings: arm: fsl: add different Protonic boards Link: https://lore.kernel.org/r/20200720085536.24138-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 36e163eda14c8525663612aeddbfcab203835f16 Merge: fb31429fa9887 812f550116115 Author: Arnd Bergmann Date: Wed Jul 22 21:43:23 2020 +0200 Merge tag 'socfpga_dts_update_for_v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt SoCFPGA DTS updates for v5.9 - Populate clock entries for Agilex platform - Add "reset-names" to SPI entries - Add Maxim max1619 temperature sensor to Arria10 devkit * tag 'socfpga_dts_update_for_v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfpga: add the temperature sensor to the Arria10 devkit arm: dts: socfpga: add reset-names to spi node arm64: dts: agilex: add nand clocks arm64: dts: agilex: populate clock dts entries for Intel SoCFPGA Agilex Link: https://lore.kernel.org/r/20200719011804.15599-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit a1224fdc5c27b07690eeefd01227c397af640529 Merge: a4cd898d6469c 250ce11ed7463 Author: Arnd Bergmann Date: Wed Jul 22 21:39:30 2020 +0200 Merge tag 'imx-defconfig-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig i.MX defconfig update for 5.9: - Enable PCA9450 regulator driver in arm64 defconfig. - Enable RV8803 RTC and FSL_SAI audio support in arm64 defconfig to make it useful for Kontron sl28 boards. - Enable i.MX8MM clock and pinctrl driver in imx_v6_v7_defconfig to get AARCH32 mode kernel work on AARCH64 hardware. * tag 'imx-defconfig-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: Support i.MX8MM arm64: defconfig: enable RTC and audio support on Kontron sl28 boards arm64: defconfig: add pca9450 pmic driver Link: https://lore.kernel.org/r/20200720085536.24138-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit a4cd898d6469c3e071c067adabbdfa4ab945f8c8 Merge: 85bd5af6cb682 fe860ac25d12c Author: Arnd Bergmann Date: Wed Jul 22 21:38:17 2020 +0200 Merge tag 'qcom-arm64-defconfig-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM64 defconfig updates for v5.9 Enable the Qualcomm RPM power-domain, RTC and IPCC drivers, the SDM845 video clock controller driver and the SM8250 TLMM pinctrl driver. * tag 'qcom-arm64-defconfig-for-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Enable Qualcomm IPCC driver arm64: defconfig: Enable Qualcomm SM8250 pinctrl driver arm64: defconfig: Add CONFIG_QCOM_RPMPD arm64: defconfig: Enable the PM8xxx RTC driver arm64: defconfig: Enable SDM845 video clock controller Link: https://lore.kernel.org/r/20200721044848.3429874-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit dee72f8a0c2d4ddb566151b2982d553461339315 Merge: fa56a987449bc 9165e1d70fb34 Author: David S. Miller Date: Wed Jul 22 12:34:55 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2020-07-21 The following pull-request contains BPF updates for your *net-next* tree. We've added 46 non-merge commits during the last 6 day(s) which contain a total of 68 files changed, 4929 insertions(+), 526 deletions(-). The main changes are: 1) Run BPF program on socket lookup, from Jakub. 2) Introduce cpumap, from Lorenzo. 3) s390 JIT fixes, from Ilya. 4) teach riscv JIT to emit compressed insns, from Luke. 5) use build time computed BTF ids in bpf iter, from Yonghong. ==================== Purely independent overlapping changes in both filter.h and xdp.h Signed-off-by: David S. Miller commit 93ca8ac2e8fcea6feb02a40edd2334144b62fc6e Author: Jagan Teki Date: Mon Jul 20 16:32:30 2020 +0530 arm64: dts: rockchip: Add PCIe for RockPI N10 This patch adds support to enable PCIe for RockPI N10. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200720110230.367985-3-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit d0cb2f30e7c033f0a8bbe98ec73dbc1db4788942 Author: Jagan Teki Date: Mon Jul 20 16:32:29 2020 +0530 ARM: dts: rockchip: Add HDMI out for RockPI N8/N10 This patch adds support to enable HDMI out for N10 and N8 combinations SBCs. Signed-off-by: Jagan Teki Signed-off-by: Suniel Mahesh Link: https://lore.kernel.org/r/20200720110230.367985-2-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 417b188a985d3557b0ecb5623b27bd9843f03aec Author: Jagan Teki Date: Mon Jul 20 16:32:28 2020 +0530 ARM: dts: rockchip: Add USB for RockPI N8/N10 Radxa dalang carrier board has 2x USB 2.0 and 1x USB 3.0 ports. This patch adds support to enable all these USB ports for N10 and N8 combinations SBCs. Note that the USB 3.0 port on RockPI N8 combination works as USB 2.0 OTG since it is driven from RK3288. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200720110230.367985-1-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 82540defdd9cfc491f564ffb8d01911966636bc7 Author: Jagan Teki Date: Mon Jul 20 16:28:46 2020 +0530 ARM: dts: rockchip: Add usb host0 ohci node for rk3288 rk3288 and rk3288w have a usb host0 ohci controller. Although rk3288 ohci doesn't actually work on hardware, but rk3288w ohci can work well. So add usb host0 ohci node in rk3288 dtsi and boards can then enable it if supported. Signed-off-by: Jagan Teki Cc: William Wu Link: https://lore.kernel.org/r/20200720105846.367776-1-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit fe630de009d0729584d79c78f43121e07c745fdc Author: Vitaly Mayatskikh Date: Tue Mar 3 13:14:40 2020 -0500 md/raid10: avoid deadlock on recovery. When disk failure happens and the array has a spare drive, resync thread kicks in and starts to refill the spare. However it may get blocked by a retry thread that resubmits failed IO to a mirror and itself can get blocked on a barrier raised by the resync thread. Acked-by: Nigel Croxon Signed-off-by: Vitaly Mayatskikh Signed-off-by: Song Liu commit ef990bcad58cf1d13c5a49191a2c2342eb8d6709 Author: Alex Bee Date: Wed Jul 22 18:18:20 2020 +0200 clk: rockchip: add sclk_mac_lbtest to rk3188_critical_clocks Since the loopbacktest clock is not exported and is not touched in the driver, it has to be added to rk3188_critical_clocks to be protected from being disabled and in order to get the emac working. Signed-off-by: Alex Bee Link: https://lore.kernel.org/r/20200722161820.5316-1-knaerzche@gmail.com Signed-off-by: Heiko Stuebner commit 29bf2617e33b0dfbc87e41981c7960c8e2dbcf1e Author: Guennadi Liakhovetski Date: Wed Jul 22 17:09:26 2020 +0200 rpmsg: update documentation rpmsg_create_ept() takes struct rpmsg_channel_info chinfo as its last argument, not a u32 value. The first two arguments are also updated. Signed-off-by: Guennadi Liakhovetski Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200722150927.15587-4-guennadi.liakhovetski@linux.intel.com Signed-off-by: Bjorn Andersson commit bc227385eb71f2cb453efeddc053265bbd2525f9 Author: Laurent Pinchart Date: Wed Jul 22 19:17:47 2020 +0300 dmaengine: xilinx: dpdma: Fix kerneldoc warning Document the struct xilinx_dpdma_chan desc field to fix a kerneldoc undocumented member warning (which can be reproduced by compiling with W=1). Signed-off-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200722161747.30048-1-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit ea55b6a349cf0403f54e18e87e3d1cd167a3f16c Author: Vinod Koul Date: Sat Jul 18 19:22:00 2020 +0530 dmaengine: xilinx: dpdma: add missing kernel doc xilinx_dpdma_sw_desc_set_dma_addrs() documentation is missing describing 'xdev', so add it drivers/dma/xilinx/xilinx_dpdma.c:313: warning: Function parameter or member 'xdev' not described in 'xilinx_dpdma_sw_desc_set_dma_addrs' Link: https://lore.kernel.org/r/20200718135201.191881-2-vkoul@kernel.org Reviewed-by: Laurent Pinchart Signed-off-by: Vinod Koul commit 1c1df9087108253caa9e5a26809f0128ccb77ee0 Author: Vinod Koul Date: Sat Jul 18 19:21:59 2020 +0530 dmaengine: xilinx: dpdma: remove comparison of unsigned expression xilinx_dpdma_config() channel id is unsigned int and compares with ZYNQMP_DPDMA_VIDEO0 which is zero, so remove this comparison drivers/dma/xilinx/xilinx_dpdma.c:1073:15: warning: comparison of unsigned expression in ‘>= 0’ is always true [-Wtype-limits] if (chan->id >= ZYNQMP_DPDMA_VIDEO0 && chan->id <= ZYNQMP_DPDMA_VIDEO2) Link: https://lore.kernel.org/r/20200718135201.191881-1-vkoul@kernel.org Reviewed-by: Laurent Pinchart Signed-off-by: Vinod Koul commit 411155820bb348e71ecc5b1db147b36af98cbc96 Author: Heiko Carstens Date: Mon Jul 20 14:28:36 2020 +0200 s390/time: improve comparison for tod steering It doesn't make sense to add zero shifted by 15. It's still zero. Signed-off-by: Heiko Carstens commit 555701a714f77e01490f633c1080cf97f0ede1f0 Author: Heiko Carstens Date: Mon Jul 20 14:16:03 2020 +0200 s390/time: select CLOCKSOURCE_VALIDATE_LAST_CYCLE The value returned by read_tod_clock() will overflow on September 17th 2042. To avoid that system time jumps back select CLOCKSOURCE_VALIDATE_LAST_CYCLE which enables a sanity check in order to prevent negative "delta" values. Signed-off-by: Heiko Carstens commit 58e15716feb562cdba57e99d62c525a1faa37c08 Author: Heiko Carstens Date: Mon Jul 20 14:15:02 2020 +0200 s390/time: use CLOCKSOURCE_MASK Make use of CLOCKSOURCE_MASK instead of open-coding it. Signed-off-by: Heiko Carstens commit 6c1649f51c22c2728483965eb48825e73b35de92 Merge: 70476feb62ce9 a1bab9396c2d9 Author: Greg Kroah-Hartman Date: Wed Jul 22 16:26:14 2020 +0200 Merge tag 'iio-for-5.9b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: Second set of new device support, cleanups etc for IIO/Counters in the 5.9 cycle There are two merge commits in here of immutable branches that may also be picked up through other trees (clocksource and input) I've put a few late breaking fixes in here that aren't worth rushing in before the merge window. One major fix for an issue introduced in the last set that can result in devices not having their parent set. This set is dominated by W=1 cleanups from Lee Jones. I won't list them all separately. They are mostly: * Kernel doc fixes * Unused variable removal. * Suppression of unused stuff that is static in headers. Counters subsystem * atmel-tcb - New counter driver after various cleanups of existing tcb code and bindings. Device support * stk311 - Trivial addition of ID for STK311-X variant. yaml conversions * kionix,kxsd9 * ti,ads8688 Features * jz47xx - Add support for touch screen channels. In this particular case the boards in question actually wire a joystick to them so we want them as simple voltage channels. The joystick driver will probably go via the input tree. Cleanups + fixes * core - A rebase issue in recent major refactoring dropped the assignment of of the device parent in the core. Put it back. * ad5592r - Fix unbalanced mutex unlocks in *_read_raw() * ad7124 - Move chip ID and name to the chip_info table plus add a read of the revision register to check the device is working during probe. * ad7192 - Ridy up ordering to put the match table near the end fo the file where it is used. * lsm6dsx - Reset the hardware timestamp after a resume to avoid an issue with missaligned timestamps after suspend. * jz47xx - Error checks on clk_enable() calls. - xlate callaback to find channel index. - Use separate chan_spec arrays for different variants rather than parts of a single list. Simplifies code. * tag 'iio-for-5.9b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (69 commits) iio: imu: st_lsm6dsx: reset hw ts after resume iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw() iio: core: fix/re-introduce back parent assignment iio: adc: ad7124: move chip ID & name on the chip_info table counter: Add microchip TCB capture counter dt-bindings: counter: microchip-tcb-capture counter dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible dt-bindings: atmel-tcb: convert bindings to json-schema ARM: at91: add atmel tcb capabilities IIO: Ingenic JZ47xx: Add touchscreen mode. dt-bindings: iio/adc: Add touchscreen idx for JZ47xx SoC ADC iio/adc: ingenic: Retrieve channels list from soc data struct IIO: Ingenic JZ47xx: Add xlate cb to retrieve correct channel idx IIO: Ingenic JZ47xx: Error check clk_enable calls. dt-bindings: iio: ti,ads8688 yaml conversion iio: light: stk3310: add chip id for STK3311-X variant dt-bindings: iio: accel: kionix,kxsd9 yaml conversion. iio: adc: ad7192: move ad7192_of_match table closer to the end of the file iio: adc: rockchip_saradc: Demote seemingly unintentional kerneldoc header iio: imu: st_lsm6dsx: st_lsm6dsx: Mark 'st_lsm6dsx_accel_ext_info' as __maybe_unused ... commit 1b0b2a84c979347f5385a8cb3901d3a46569d57c Author: Wei Yongjun Date: Mon Jul 13 22:25:42 2020 +0800 iommu: Make some functions static The sparse tool complains as follows: drivers/iommu/iommu.c:386:5: warning: symbol 'iommu_insert_resv_region' was not declared. Should it be static? drivers/iommu/iommu.c:2182:5: warning: symbol '__iommu_map' was not declared. Should it be static? Those functions are not used outside of iommu.c, so mark them static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200713142542.50294-1-weiyongjun1@huawei.com Signed-off-by: Joerg Roedel commit ce8672c20ba697f5c72f80e5713c9b69b3028802 Merge: edee3bc658948 4941b8dedb3f3 Author: Linus Walleij Date: Wed Jul 22 16:01:00 2020 +0200 Merge tag 'intel-gpio-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/andy/linux-gpio-intel into devel intel-gpio for v5.9-1 * Move GPIO PMIC drivers to use IRQ chip template * Introduce for_each_requested_gpio() and convert existing users * Replace unsigned by unsigned int in few drivers * Fix an issue in kernel doc that validator complains about * Move to verbose debug level the IRQ status message in gpio-pch The following is an automated git shortlog grouped by driver: ARM/orion/gpio: - Make use of for_each_requested_gpio() crystalcove: - Use irqchip template - changed every 'unsigned' to 'unsigned int' gpiolib: - Introduce for_each_requested_gpio_in_range() macro gpio-ml-ioh: - Fix missing ':' in 'struct ioh_gpio_reg_data ich: - changed every 'unsigned' to 'unsigned int' mvebu: - Make use of for_each_requested_gpio() pch: - Add a blank line between declaration and code - changed every 'unsigned' to 'unsigned int' - Move IRQ status message to verbose debug level pinctrl: - at91: Make use of for_each_requested_gpio() sch: - Add a blank line between declaration and code - changed every 'unsigned' to 'unsigned int' wcove: - Use irqchip template xra1403: - Make use of for_each_requested_gpio() commit b8e73b5f6ea262b93b4163e1a3748f00867431a1 Merge: 66c00f561d94f b4f2fcb534875 Author: Linus Walleij Date: Wed Jul 22 15:58:07 2020 +0200 Merge tag 'intel-pinctrl-v5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v5.9-1 * New driver for Emmitsburg * New driver for Tiger Lake-H * Part 3 of Cherryview driver clean up * Fix a glitch on Baytrail platforms The following is an automated git shortlog grouped by driver: ARM/orion/gpio: - Make use of for_each_requested_gpio() at91: - Make use of for_each_requested_gpio() baytrail: - Use fallthrough pseudo-keyword - Fix pin being driven low for a while on gpiod_get(..., GPIOD_OUT_HIGH) - Drop no-op ACPI_PTR() call cherryview: - Re-use data structures from pinctrl-intel.h (part 3) - Convert chv_writel() to use chv_padreg() - Introduce helpers to IO with common registers - Introduce chv_readl() helper gpio: - xra1403: Make use of for_each_requested_gpio() - mvebu: Make use of for_each_requested_gpio() gpiolib: - Introduce for_each_requested_gpio_in_range() macro intel: - Add Intel Emmitsburg pin controller support - Make use of for_each_requested_gpio_in_range() - Protect IO in few call backs by lock - Split intel_config_get() to three functions - Drop the only label in the code for consistency - Get rid of redundant 'else' in intel_config_set_debounce() - Make use of IRQ_RETVAL() - Reduce scope of the lock - Disable input and output buffer when switching to GPIO - Allow drivers to define ACPI address space ID - Allow drivers to define total amount of IRQs per community lynxpoint: - Drop no-op ACPI_PTR() call - Introduce helpers to enable or disable input - Make use of for_each_requested_gpio() merrifield: - Add I²S bus 2 pins to groups and functions - Update pin names in accordance with official list tigerlake: - Add support for Tiger Lake-H commit a1bab9396c2d98c601ce81c27567159dfbc10c19 Author: Lorenzo Bianconi Date: Mon Jul 13 13:40:19 2020 +0200 iio: imu: st_lsm6dsx: reset hw ts after resume Reset hw time samples generator after system resume in order to avoid disalignment between system and device time reference since FIFO batching and time samples generator are disabled during suspend. Fixes: 213451076bd3 ("iio: imu: st_lsm6dsx: add hw timestamp support") Tested-by: Sean Nyekjaer Signed-off-by: Lorenzo Bianconi Cc: Signed-off-by: Jonathan Cameron commit 65afb0932a81c1de719ceee0db0b276094b10ac8 Author: Alexandru Ardelean Date: Mon Jul 6 14:02:57 2020 +0300 iio: dac: ad5592r: fix unbalanced mutex unlocks in ad5592r_read_raw() There are 2 exit paths where the lock isn't held, but try to unlock the mutex when exiting. In these places we should just return from the function. A neater approach would be to cleanup the ad5592r_read_raw(), but that would make this patch more difficult to backport to stable versions. Fixes 56ca9db862bf3: ("iio: dac: Add support for the AD5592R/AD5593R ADCs/DACs") Reported-by: Charles Stanhope Signed-off-by: Alexandru Ardelean Cc: Signed-off-by: Jonathan Cameron commit 2ca76b3e4954ea6bbb365005edc8d5237b488cf1 Author: Alexander A. Klimov Date: Sun Jul 19 22:06:23 2020 +0200 regulator: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200719200623.61524-1-grandmaster@al2klimov.de Signed-off-by: Mark Brown commit 1c2f21be65028b25e778e52b106b8b719b3f9ed9 Merge: d0d7c5845e7fa 106b104137fd5 Author: Jonathan Cameron Date: Wed Jul 22 14:37:23 2020 +0100 Merge branch 'ib-5.8-tcb' into HEAD Series needed as base for a clocksource tree hence immutable branch commit d0d7c5845e7faef263184c68f8a31634dfa22c6f Merge: 8525df47b3d1e b96952f498db6 Author: Jonathan Cameron Date: Wed Jul 22 14:36:31 2020 +0100 Merge branch 'ib-5.8-jz47xx-ts' into HEAD Immutable branch may be needed in input for a joystick set that is dependent on it. commit 8525df47b3d1eaa9a2206964f63f71a2f48dc7c1 Author: Alexandru Ardelean Date: Tue Jul 21 13:24:07 2020 +0300 iio: core: fix/re-introduce back parent assignment This was introduced initially via commit 78289b4a58b58 ("iio: core: pass parent device as parameter during allocation"), but was accidentally removed via commit 6d4ebd565d15f ("iio: core: wrap IIO device into an iio_dev_opaque object"). This looks like a rebase gone wrong, and ends up breaking devicetree bindings of IIO clients. This change adds back the parent assignment. Fixes 6d4ebd565d15f: ("iio: core: wrap IIO device into an iio_dev_opaque object") Reported-by: Dmitry Baryshkov Signed-off-by: Alexandru Ardelean Tested-by: Dmitry Baryshkov Signed-off-by: Jonathan Cameron commit 951ad4700313984a45c95a33ec6abba6b3054525 Author: Alexandru Ardelean Date: Tue Jul 14 08:11:11 2020 +0300 iio: adc: ad7124: move chip ID & name on the chip_info table This change does the following: * removes the SPI device table in favor of the OF device table * adds 'name' && 'chip_id' fields to chip_info * implements chip ID & silicon revision checking; the device ID for AD7124-4 is 0x0, so just checking that value can be useless; but at least the silicon revision isn't 0, so a non-zero value can be used to check that "a" device is on the SPI bus; it's probably the best way to narrow it down to one of the 2 AD7124 chip IDs Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 0c5b270b2e6c92b6a752868a3a1abddc3c52186f Merge: 5180ebb81ac72 08145535a8321 Author: Mark Brown Date: Wed Jul 22 14:32:00 2020 +0100 Merge series "ASoC: mediatek: mt8183: support machine driver for max98357b" from Tzung-Bi Shih : The series re-uses mt8183-mt6358-ts3a227-max98357.c to support machine driver with max98357b. The 1st patch enables left justified format from mt8183 audio platform. The 2nd patch adds document for the new proposed compatible string for max98357b. The 3rd patch supports machine driver with max98357b and uses left justified format for it. Tzung-Bi Shih (3): ASoC: mediatek: mt8183: support left justified format for I2S ASoC: dt-bindings: mt8183: add compatible string for using max98357b ASoC: mediatek: mt8183: support machine driver with max98357b .../sound/mt8183-mt6358-ts3a227-max98357.txt | 1 + sound/soc/mediatek/mt8183/mt8183-dai-i2s.c | 59 ++++++++++++++++--- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 22 ++++++- 3 files changed, 73 insertions(+), 9 deletions(-) -- 2.28.0.rc0.105.gf9edc3c819-goog commit 5180ebb81ac72653d83ab55582d21e7978a0540f Merge: 06f07e2365378 51b0243aefaa5 Author: Mark Brown Date: Wed Jul 22 14:31:59 2020 +0100 Merge series "SOF IMX fixes" from Daniel Baluta Daniel Baluta : From: Daniel Baluta This patchseries contains a couple of SOF IMX fixes found during our first IMX SOF release. Daniel Baluta (7): ASoC: SOF: define INFO_ flags in dsp_ops for imx8 ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X ASoC: SOF: topology: Update SAI config bclk/fsync rate ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs sound/soc/sof/imx/imx8.c | 24 +++++++++++++++++++++--- sound/soc/sof/imx/imx8m.c | 4 ++-- sound/soc/sof/pcm.c | 8 ++++++++ sound/soc/sof/topology.c | 2 ++ 4 files changed, 33 insertions(+), 5 deletions(-) -- 2.17.1 commit 06f07e2365378d51eddd0b5bf23506e1237662b0 Author: Kai Vehmanen Date: Fri Jul 17 13:19:50 2020 +0300 ASoC: hdac_hda: fix deadlock after PCM open error Commit 5bd70440cb0a ("ASoC: soc-dai: revert all changes to DAI startup/shutdown sequence"), introduced a slight change of semantics to DAI startup/shutdown. If startup() returns an error, shutdown() is now called for the DAI. This causes a deadlock in hdac_hda which issues a call to snd_hda_codec_pcm_put() in case open fails. Upon error, soc_pcm_open() will call shutdown(), and pcm_put() ends up getting called twice. Result is a deadlock on pcm->open_mutex, as snd_device_free() gets called from within snd_pcm_open(). Typical task backtrace looks like this: [ 334.244627] snd_pcm_dev_disconnect+0x49/0x340 [snd_pcm] [ 334.244634] __snd_device_disconnect.part.0+0x2c/0x50 [snd] [ 334.244640] __snd_device_free+0x7f/0xc0 [snd] [ 334.244650] snd_hda_codec_pcm_put+0x87/0x120 [snd_hda_codec] [ 334.244660] soc_pcm_open+0x6a0/0xbe0 [snd_soc_core] [ 334.244676] ? dpcm_add_paths.isra.0+0x491/0x590 [snd_soc_core] [ 334.244679] ? kfree+0x9a/0x230 [ 334.244686] dpcm_be_dai_startup+0x255/0x300 [snd_soc_core] [ 334.244695] dpcm_fe_dai_open+0x20e/0xf30 [snd_soc_core] [ 334.244701] ? snd_pcm_hw_rule_muldivk+0x110/0x110 [snd_pcm] [ 334.244709] ? dpcm_be_dai_startup+0x300/0x300 [snd_soc_core] [ 334.244714] ? snd_pcm_attach_substream+0x3c4/0x540 [snd_pcm] [ 334.244719] snd_pcm_open_substream+0x69a/0xb60 [snd_pcm] [ 334.244729] ? snd_pcm_release_substream+0x30/0x30 [snd_pcm] [ 334.244732] ? __mutex_lock_slowpath+0x10/0x10 [ 334.244736] snd_pcm_open+0x1b3/0x3c0 [snd_pcm] Fixes: 5bd70440cb0a ("ASoC: soc-dai: revert all changes to DAI startup/shutdown sequence") Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang BugLink: https://github.com/thesofproject/linux/issues/2159 Link: https://lore.kernel.org/r/20200717101950.3885187-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit c3ec8ac82105e9589dcd72636b6fd114db690d55 Author: Kai Vehmanen Date: Fri Jul 17 13:19:49 2020 +0300 ASoC: hdac_hda: fix memleak on module unload The hdac_hda remove implementation fails to free the hda codec resources, leading to memleaks at module unload. This gap has been there from the start, commit 6bae5ea94989 ("ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers"). Instead of duplicating the cleanup logic, use the common snd_hda_codec_cleanup_for_unbind() to free the resources. Remove existing code in hdac_hda to cleanup "codec.jackpoll_work" and call to snd_hdac_regmap_exit(), as these are already done in snd_hda_codec_cleanup_for_unbind(). The cleanup is done in ASoC component remove() callback and not in the HDAC bus hdev_detach(). This is done to ensure the codec specific cleanup routines are run before the parent card is freed. Fixes: 6bae5ea94989 ("ASoC: hdac_hda: add asoc extension for legacy HDA codec drivers") Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan BugLink: https://github.com/thesofproject/linux/issues/2195 Link: https://lore.kernel.org/r/20200717101950.3885187-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 640f835cd052bba403f955db15130ff813be78d2 Author: Kai Vehmanen Date: Fri Jul 17 13:19:48 2020 +0300 ASoC: hdac_hda: call patch_ops.free() on probe error Add error handling for patch_ops in hdac_hda_codec_probe(). Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200717101950.3885187-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 5856d8bd308f9467cefa65d04e184a56a3977559 Author: Alexander A. Klimov Date: Sun Jul 19 17:38:22 2020 +0200 ASoC: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200719153822.59788-1-grandmaster@al2klimov.de Signed-off-by: Mark Brown commit ee79e5fbc19c3b3910f80d80adb19fa49f908a3b Merge: 9ebcfadb06103 aa7ec73297df5 Author: Joerg Roedel Date: Wed Jul 22 15:30:36 2020 +0200 Merge tag 'arm-smmu-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu Arm SMMU updates for 5.9 - Support for SMMU-500 implementation in Marvell Armada-AP806 SoC - Support for SMMU-500 implementation in NVIDIA Tegra194 SoC - DT compatible string updates - Remove unused IOMMU_SYS_CACHE_ONLY flag commit 092550eacd040a349917a6bbe90ad543258e1695 Author: Libing Zhou Date: Wed Jul 22 14:44:50 2020 +0800 iommu/amd: Remove double zero check The free_pages() does zero check, therefore remove double zero check here. Signed-off-by: Libing Zhou Link: https://lore.kernel.org/r/20200722064450.GA63618@hzling02.china.nsn-net.net Signed-off-by: Joerg Roedel commit dee9d154f40c58d02f69acdaa5cfd1eae6ebc28b Author: Colin Ian King Date: Tue Jul 14 20:22:11 2020 +0100 iommu/omap: Check for failure of a call to omap_iommu_dump_ctx It is possible for the call to omap_iommu_dump_ctx to return a negative error number, so check for the failure and return the error number rather than pass the negative value to simple_read_from_buffer. Fixes: 14e0e6796a0d ("OMAP: iommu: add initial debugfs support") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200714192211.744776-1-colin.king@canonical.com Addresses-Coverity: ("Improper use of negative value") Signed-off-by: Joerg Roedel commit 08145535a8321eb330fceb9e6542b51091f7d3c6 Author: Tzung-Bi Shih Date: Mon Jul 20 09:25:59 2020 +0800 ASoC: mediatek: mt8183: support machine driver with max98357b Supports machine driver with max98357b ("mt8183-mt6358-ts3a227-max98357b"). The key difference from max98357a: max98357b needs to use left justified format. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200720012559.906088-4-tzungbi@google.com Signed-off-by: Mark Brown commit e3c3cdbd5ad65182e3803a2e1c33156c5ff48cd1 Author: Tzung-Bi Shih Date: Mon Jul 20 09:25:58 2020 +0800 ASoC: dt-bindings: mt8183: add compatible string for using max98357b Machines with max98357b should use the compatible string "mt8183-mt6358-ts3a227-max98357b". Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200720012559.906088-3-tzungbi@google.com Signed-off-by: Mark Brown commit 767ee388ab8aee021bbb5a34173c656f3c038a46 Author: Tzung-Bi Shih Date: Mon Jul 20 09:25:57 2020 +0800 ASoC: mediatek: mt8183: support left justified format for I2S MT8183 audio platform supports EIAJ and I2S formats. The code fixed to use I2S format in the past. Supports EIAJ mode via set_fmt ops and preserves to use I2S format as the default format intentionally. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200720012559.906088-2-tzungbi@google.com Signed-off-by: Mark Brown commit 7fa95f9adaee7e5cbb195d3359741120829e488b Author: Nicholas Piggin Date: Thu Jun 11 18:12:03 2020 +1000 powerpc/64s: system call support for scv/rfscv instructions Add support for the scv instruction on POWER9 and later CPUs. For now this implements the zeroth scv vector 'scv 0', as identical to 'sc' system calls, with the exception that LR is not preserved, nor are volatile CR registers, and error is not indicated with CR0[SO], but by returning a negative errno. rfscv is implemented to return from scv type system calls. It can not be used to return from sc system calls because those are defined to preserve LR. getpid syscall throughput on POWER9 is improved by 26% (428 to 318 cycles), largely due to reducing mtmsr and mtspr. Signed-off-by: Nicholas Piggin [mpe: Fix ppc64e build] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200611081203.995112-3-npiggin@gmail.com commit 4941b8dedb3f33dcca5c6aef919ea518ff8947ce Author: Abanoub Sameh Date: Tue Jul 21 16:51:04 2020 +0200 gpio: sch: Add a blank line between declaration and code Added a lined between a declaration and other statements according to the kernel coding style. Signed-off-by: Abanoub Sameh Signed-off-by: Andy Shevchenko commit 2c58e44a428984167618bcf7c75ceb635f9dee5d Author: Abanoub Sameh Date: Tue Jul 21 16:51:03 2020 +0200 gpio: sch: changed every 'unsigned' to 'unsigned int' Changed 'unsigned' to 'unsigned int'. This makes the code more uniform, and compliant with the kernel coding style. Signed-off-by: Abanoub Sameh Signed-off-by: Andy Shevchenko commit ae84f15c651ac47aee2e0301059025813a041d19 Author: Abanoub Sameh Date: Tue Jul 21 16:49:02 2020 +0200 gpio: ich: changed every 'unsigned' to 'unsigned int' Changed 'unsigned' to 'unsigned int'. This makes the code more uniform, and compliant with the kernel coding style. Signed-off-by: Abanoub Sameh Signed-off-by: Andy Shevchenko commit 22f61d4e6fea30bd571474c7ad335f8f1f609abf Author: Linus Walleij Date: Fri Jul 17 17:19:55 2020 +0200 gpio: wcove: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Cc: Bin Gao Cc: Andy Shevchenko Cc: Hans de Goede Signed-off-by: Linus Walleij Tested-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 945e72db36bd12767601b332b2aa50c888537afa Author: Linus Walleij Date: Tue Jul 21 16:01:53 2020 +0200 gpio: crystalcove: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Cc: Andy Shevchenko Cc: Kuppuswamy Sathyanarayanan Cc: Hans de Goede Signed-off-by: Linus Walleij Reviewed-by: Kuppuswamy Sathyanarayanan Tested-by: Hans de Goede Signed-off-by: Andy Shevchenko commit b2dc2977cba48990df45e0a96150663d4f342700 Author: Nicholas Piggin Date: Thu Jun 11 18:12:02 2020 +1000 powerpc/64s/exception: treat NIA below __end_interrupts as soft-masked The scv instruction causes an interrupt which can enter the kernel with MSR[EE]=1, thus allowing interrupts to hit at any time. These must not be taken as normal interrupts, because they come from MSR[PR]=0 context, and yet the kernel stack is not yet set up and r13 is not set to the PACA). Treat this as a soft-masked interrupt regardless of the soft masked state. This does not affect behaviour yet, because currently all interrupts are taken with MSR[EE]=0. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200611081203.995112-2-npiggin@gmail.com commit bee328cb71eb0b38ab128d7c475209d973a13f92 Author: Alexey Budankov Date: Fri Jul 17 10:05:06 2020 +0300 perf stat: Implement control commands handling Implement handling of 'enable' and 'disable' control commands coming from control file descriptor. If poll event splits initiated timeout interval then the reminder is calculated and still waited in the following evlist__poll() call. Committer testing: The testing instructions came in the cover letter, here I'll extract the parts that are needed to test this specific patch, so that we don't introduce bisection regressions by testing only the patch series as a whole: Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/3cb8a826-145f-81f4-fcb2-fa20045c6957@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2162b9c6bded8866b206822a19b58fcbf45cfb5c Author: Alexey Budankov Date: Fri Jul 17 10:04:33 2020 +0300 perf stat: extend -D,--delay option with -1 value Extend -D,--delay option with -1 value to start monitoring with events disabled to be enabled later by enable command provided via control file descriptor. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/81ac633c-a844-5cfb-931c-820f6e6cbd12@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9314006dc3324cd449db90f23745c4f3e275d2d4 Author: Robin Murphy Date: Tue Jul 14 12:59:28 2020 +0100 iommu/exynos: Rename update_pte() The name "update_pte" is a little too generic, and can end up clashing with architecture pagetable code leaked out of common mm headers. Rename it to something more appropriately namespaced. Reported-by: kernel test robot Acked-by: Marek Szyprowski Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/829bb5dc18e734870b75db673ddce86e7e37fc73.1594727968.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 493cf9b723bcc87e9284e5e5971259951a13f22e Author: Vladimir Murzin Date: Tue Jul 21 10:12:59 2020 +0100 arm64: s/AMEVTYPE/AMEVTYPER Activity Monitor Event Type Registers are named as AMEVTYPER{0,1} Signed-off-by: Vladimir Murzin Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20200721091259.102756-1-vladimir.murzin@arm.com Signed-off-by: Catalin Marinas commit f3e048b78ad37dff3ba81243f2533f336a240072 Author: Lad Prabhakar Date: Tue Jul 14 11:20:55 2020 +0100 iommu/ipmmu-vmsa: Add an entry for r8a77961 in soc_rcar_gen3[] Add an entry for r8a77961 in soc_rcar_gen3[] list so that we dont enable iommu unconditionally. Fixes: 17fe161816398 ("iommu/renesas: Add support for r8a77961") Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1594722055-9298-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Joerg Roedel commit 4b2aa7a6f9b793cadbda898476c8a16d374f1b3a Author: Marian-Cristian Rotariu Date: Tue Jul 14 11:20:54 2020 +0100 iommu/ipmmu-vmsa: Hook up R8A774E1 DT matching code Add support for RZ/G2H (R8A774E1) SoC IPMMUs. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1594722055-9298-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Joerg Roedel commit c5437338150e4914328c975767056d2dedacfd21 Author: Alexander A. Klimov Date: Mon Jul 13 16:51:15 2020 +0200 leds: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Rob Herring Acked-by: Dan Murphy Signed-off-by: Pavel Machek commit 987b8238136da9b5cb27ddcdf78c5c9290708a96 Author: Alexey Budankov Date: Fri Jul 17 10:04:02 2020 +0300 perf stat: Factor out event handling loop into dispatch_events() Consolidate event dispatching loops for fork, attach and system wide monitoring use cases into common dispatch_events() function. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/8a900bd5-200a-9b0f-7154-80a2343bfd1a@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b0ce0c8df4dd80dd79b5341314ff289df81d2bf6 Author: Alexey Budankov Date: Fri Jul 17 10:03:19 2020 +0300 perf stat: Factor out body of event handling loop for fork case Factor out body of event handling loop for fork case reusing handle_interval() function. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/a8ae3f8d-a30e-fd40-998a-f5ca3e98cd45@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 7bb4ff05c0909bdbbdbce745c08801ef10f9bcea Author: Alexey Budankov Date: Fri Jul 17 10:02:42 2020 +0300 perf stat: Move target check to loop control statement Check for target existence in loop control statement jointly external asynchronous 'done' signal. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/79037528-578c-af64-f06c-a644b7f5ba6a@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit dece3a4d33cec0fd5cde1c50e36a03193ded4f99 Author: Alexey Budankov Date: Fri Jul 17 10:02:08 2020 +0300 perf stat: Factor out body of event handling loop for system wide Introduce handle_interval() function that factors out body of event handling loop for attach and system wide monitoring use cases. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/73130f9e-0d0f-7391-da50-41b4bf4bf54d@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 93690cdf3060c61dfce813121d0bfc055e7fa30d Author: Marek Behún Date: Thu Jul 16 19:17:28 2020 +0200 leds: trigger: add support for LED-private device triggers Some LED controllers may come with an internal HW triggering mechanism for the LED and the ability to switch between SW control and the internal HW control. This includes most PHYs, various ethernet switches, the Turris Omnia LED controller or AXP20X PMIC. This adds support for registering such triggers. This code is based on work by Pavel Machek and Ondřej Jirman . Signed-off-by: Marek Behún Acked-by: Jacek Anaszewski Signed-off-by: Pavel Machek commit 00253ec2c9849c2a1101818565c7f4c09dbef327 Author: Dan Murphy Date: Thu Jul 16 13:20:04 2020 -0500 leds: lp5521: Add multicolor framework multicolor brightness support Add the multicolor brightness call back to support the multicolor framework. This function allows setting the brightness across grouped LED channels in a single call. Acked-by: Pavel Machek Acked-by: Jacek Anaszewski Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit 40473132605af27e72d9489327bb0c99f6c5f20a Author: Dan Murphy Date: Thu Jul 16 13:20:03 2020 -0500 leds: lp5523: Update the lp5523 code to add multicolor brightness function Add the multicolor brightness call back to support the multicolor framework. This call back allows setting brightness on grouped channels in a single function. Acked-by: Pavel Machek Acked-by: Jacek Anaszewski Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit 92a81562e695628086acb92f95090ab09d9b9ec0 Author: Dan Murphy Date: Thu Jul 16 13:20:01 2020 -0500 leds: lp55xx: Add multicolor framework support to lp55xx Add multicolor framework support for the lp55xx family. Acked-by: Pavel Machek Acked-by: Jacek Anaszewski Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit c732eaf01f9c213d34b2d224bcda830089bbcf8a Author: Dan Murphy Date: Thu Jul 16 13:20:00 2020 -0500 leds: lp55xx: Convert LED class registration to devm_* Convert the LED class registration calls to the LED devm_* registration calls. Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit a89d385daa6a943a8e556d8b8b648403909b33f7 Author: Dan Murphy Date: Thu Jul 16 13:19:59 2020 -0500 dt-bindings: leds: Convert leds-lp55xx to yaml Convert the leds-lp55xx.txt to yaml binding. Reviewed-by: Rob Herring Signed-off-by: Dan Murphy Signed-off-by: Pavel Machek commit 55d5d3b46b08a4dc0b05343d24640744e7430ed7 Author: Dan Murphy Date: Thu Jul 16 13:19:56 2020 -0500 leds: multicolor: Introduce a multicolor class definition Introduce a multicolor class that groups colored LEDs within a LED node. The multicolor class groups monochrome LEDs and allows controlling two aspects of the final combined color: hue and lightness. The former is controlled via the intensity file and the latter is controlled via brightness file. Signed-off-by: Dan Murphy Acked-by: Jacek Anaszewski Signed-off-by: Pavel Machek [squashed leds: multicolor: Fix camel case in documentation in] commit ffc6d45d96f07a32700cb6b7be2d3459e63c255a Author: Kai Vehmanen Date: Tue Jul 14 16:28:04 2020 +0300 ASoC: intel/skl/hda - fix probe regression on systems without i915 Starting in commit cbc7a6b5a87a ("ASoC: soc-card: add snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is no longer ignored. The generic HDA machine driver relied on the old semantics to disable i915 HDMI/DP audio codec at runtime. If no display codec was present, add_dai_link() returned an error, but this was ignored and rest of the card was successfully probed. Fix the problem by changing the machine driver add_dai_link() to not return an error in this case. Fixes: cbc7a6b5a87a ("ASoC: soc-card: add snd_soc_card_add_dai_link()") Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski BugLink: https://github.com/thesofproject/linux/issues/2261 Link: https://lore.kernel.org/r/20200714132804.3638221-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit ec886bf538f63934f98ef6d4f3c59bf7b5a8965c Author: Alexey Budankov Date: Fri Jul 17 10:01:33 2020 +0300 perf evlist: Implement control command handling functions Implement functions of initialization, finalization and processing of control command messages coming from control file descriptors. Allocate control file descriptor as descriptor at struct pollfd object of evsel_list for atomic poll() operation. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/62518ceb-1cc9-2aba-593b-55408d07c1bf@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 8ab705b5408369a59c92e8bc24ffc9432fa2e3f6 Author: Alexey Budankov Date: Fri Jul 17 10:00:47 2020 +0300 perf evlist: Introduce control file descriptors Define and initialize control file descriptors. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/0dd4f544-2610-96d6-1bdb-6582bdc3dc2c@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 1cade527f6e9bec6a6412d0641643c359ada8096 Author: Athira Rajeev Date: Fri Jul 17 10:38:23 2020 -0400 powerpc/perf: BHRB control to disable BHRB logic when not used PowerISA v3.1 has few updates for the Branch History Rolling Buffer(BHRB). BHRB disable is controlled via Monitor Mode Control Register A (MMCRA) bit, namely "BHRB Recording Disable (BHRBRD)". This field controls whether BHRB entries are written when BHRB recording is enabled by other bits. This patch implements support for this BHRB disable bit. By setting 0b1 to this bit will disable the BHRB and by setting 0b0 to this bit will have BHRB enabled. This addresses backward compatibility (for older OS), since this bit will be cleared and hardware will be writing to BHRB by default. This patch addresses changes to set MMCRA (BHRBRD) at boot for power10 (there by the core will run faster) and enable this feature only on runtime ie, on explicit need from user. Also save/restore MMCRA in the restore path of state-loss idle state to make sure we keep BHRB disabled if it was not enabled on request at runtime. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-12-git-send-email-atrajeev@linux.vnet.ibm.com commit 80350a4bac992e3404067d31ff901ae9ff76aaa8 Author: Athira Rajeev Date: Fri Jul 17 10:38:22 2020 -0400 powerpc/perf: Add Power10 BHRB filter support for PERF_SAMPLE_BRANCH_IND_CALL/COND PowerISA v3.1 introduce filtering support for PERF_SAMPLE_BRANCH_IND_CALL/COND. The patch adds BHRB filter support for "ind_call" and "cond" in power10_bhrb_filter_map(). Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-11-git-send-email-atrajeev@linux.vnet.ibm.com commit bfe3b1945d5e0531103b3d4ab3a367a1a156d99a Author: Athira Rajeev Date: Fri Jul 17 10:38:21 2020 -0400 powerpc/perf: Ignore the BHRB kernel address filtering for P10 Commit bb19af816025 ("powerpc/perf: Prevent kernel address leak to userspace via BHRB buffer") added a check in bhrb_read() to filter the kernel address from BHRB buffer. This patch modified it to avoid that check for PowerISA v3.1 based processors, since PowerISA v3.1 allows only MSR[PR]=1 address to be written to BHRB buffer. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-10-git-send-email-atrajeev@linux.vnet.ibm.com commit a64e697cef23b3d24bac700f6d66c8e2bf8efccc Author: Athira Rajeev Date: Fri Jul 17 10:38:20 2020 -0400 powerpc/perf: power10 Performance Monitoring support Base enablement patch to register performance monitoring hardware support for power10. Patch introduce the raw event encoding format, defines the supported list of events, config fields for the event attributes and their corresponding bit values which are exported via sysfs. Patch also enhances the support function in isa207_common.c to include power10 pmu hardware. Reported-by: kernel test robot Signed-off-by: Madhavan Srinivasan Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-9-git-send-email-atrajeev@linux.vnet.ibm.com commit 9908c826d5ed150637a3a4c0eec5146a0c438f21 Author: Madhavan Srinivasan Date: Fri Jul 17 10:38:19 2020 -0400 powerpc/perf: Add Power10 PMU feature to DT CPU features Add Power10 feature function to DT CPU features, along with a Power10 specific init() to initialize PMU SPRs, sets the oprofile_cpu_type and cpu_features. This will enable performance monitoring unit (PMU) for Power10 in CPU features with "performance-monitor-power10". For Power ISA v3.1, BHRB disable is controlled via Monitor Mode Control Register A (MMCRA) bit, namely "BHRB Recording Disable (BHRBRD)". This patch initializes MMCRA BHRBRD to disable BHRB feature at boot for Power10. Signed-off-by: Madhavan Srinivasan [mpe: Move MMCRA_BHRB_DISABLE as noted by jpn, drop CPU setup changes] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-8-git-send-email-atrajeev@linux.vnet.ibm.com commit 1979ae8c7215718c7a98f038bad0122034ad6529 Author: Madhavan Srinivasan Date: Fri Jul 17 10:38:18 2020 -0400 powerpc/xmon: Add PowerISA v3.1 PMU SPRs PowerISA v3.1 added three new perfromance monitoring unit (PMU) speical purpose register (SPR). They are Monitor Mode Control Register 3 (MMCR3), Sampled Instruction Event Register 2 (SIER2), Sampled Instruction Event Register 3 (SIER3). Patch here adds a new dump function dump_310_sprs to print these SPR values. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-7-git-send-email-atrajeev@linux.vnet.ibm.com commit 5752fe0b811bb3cee531c52074921c6dd09dc42d Author: Athira Rajeev Date: Fri Jul 17 10:38:17 2020 -0400 KVM: PPC: Book3S HV: Save/restore new PMU registers Power ISA v3.1 has added new performance monitoring unit (PMU) special purpose registers (SPRs). They are: Monitor Mode Control Register 3 (MMCR3) Sampled Instruction Event Register A (SIER2) Sampled Instruction Event Register B (SIER3) Add support to save/restore these new SPRs while entering/exiting guest. Also include changes to support KVM_REG_PPC_MMCR3/SIER2/SIER3. Add new SPRs to KVM API documentation. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-6-git-send-email-atrajeev@linux.vnet.ibm.com commit c718547e4a92d74089f862457adf1f617c498e16 Author: Madhavan Srinivasan Date: Fri Jul 17 10:38:16 2020 -0400 powerpc/perf: Add support for ISA3.1 PMU SPRs PowerISA v3.1 includes new performance monitoring unit(PMU) special purpose registers (SPRs). They are Monitor Mode Control Register 3 (MMCR3) Sampled Instruction Event Register 2 (SIER2) Sampled Instruction Event Register 3 (SIER3) MMCR3 is added for further sampling related configuration control. SIER2/SIER3 are added to provide additional information about the sampled instruction. Patch adds new PPMU flag called "PPMU_ARCH_31" to support handling of these new SPRs, updates the struct thread_struct to include these new SPRs, include MMCR3 in struct mmcr_regs. This is needed to support programming of MMCR3 SPR during event_enable/disable. Patch also adds the sysfs support for the MMCR3 SPR along with SPRN_ macros for these new pmu SPRs. Signed-off-by: Madhavan Srinivasan [mpe: Rename to PPMU_ARCH_31 as noted by jpn] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-5-git-send-email-atrajeev@linux.vnet.ibm.com commit 9d4fc86dcd510dab5521a6c891f9bf379b85a7e0 Author: Athira Rajeev Date: Fri Jul 17 10:38:15 2020 -0400 powerpc/perf: Update Power PMU cache_events to u64 type Events of type PERF_TYPE_HW_CACHE was described for Power PMU as: int (*cache_events)[type][op][result]; where type, op, result values unpacked from the event attribute config value is used to generate the raw event code at runtime. So far the event code values which used to create these cache-related events were within 32 bit and `int` type worked. In power10, some of the event codes are of 64-bit value and hence update the Power PMU cache_events to `u64` type in `power_pmu` struct. Also propagate this change to existing all PMU driver code paths which are using ppmu->cache_events. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-4-git-send-email-atrajeev@linux.vnet.ibm.com commit 7e4a145e5b675d5a9182f756950f001eaa256795 Author: Athira Rajeev Date: Fri Jul 17 10:38:14 2020 -0400 KVM: PPC: Book3S HV: Cleanup updates for kvm vcpu MMCR Currently `kvm_vcpu_arch` stores all Monitor Mode Control registers in a flat array in order: mmcr0, mmcr1, mmcra, mmcr2, mmcrs Split this to give mmcra and mmcrs its own entries in vcpu and use a flat array for mmcr0 to mmcr2. This patch implements this cleanup to make code easier to read. Signed-off-by: Athira Rajeev [mpe: Fix MMCRA/MMCR2 uapi breakage as noted by paulus] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-3-git-send-email-atrajeev@linux.vnet.ibm.com commit 51b0243aefaa554ca57817562da8eb269280d4ae Author: Daniel Baluta Date: Mon Jul 20 10:20:46 2020 +0300 ASoC: SOF: pcm: Update rate/channels for SAI/ESAI DAIs Fixup BE DAI links rate/channels parameters to match any values from topology. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200720072046.8152-8-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 72bb9564fd97cd4f6dec88c8363acc3ab642673f Author: Daniel Baluta Date: Mon Jul 20 10:20:45 2020 +0300 ASoC: SOF: topology: Update SAI config bclk/fsync rate These parameters are read from topology file and sent to DSP. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200720072046.8152-7-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 68f56f618c3fbc4b1af0428f715f952cdada7a54 Author: Daniel Baluta Date: Mon Jul 20 10:20:44 2020 +0300 ASoC: SOF: imx8: Add SAI dai driver for i.MX/i.MX8X With SOF we support 1 ESAI interface and 1 SAI interface. This patch adds SAI1 interface support existing on i.MX8/i.MX8X boards. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200720072046.8152-6-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit f23a8e9402f899e3555ac8aff3d3d050adafe39e Author: Daniel Baluta Date: Mon Jul 20 10:20:43 2020 +0300 ASoC: SOF: imx8m: Fix SAI DAI driver for i.MX8M This must match DAI name from topology. Also, sai-port is too generic. Physical DAI port on i.MX8MP is labeled SAI3. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200720072046.8152-5-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit bcba2c9d62f391cd2cd6acb7f658d47bfb10e8b9 Author: Daniel Baluta Date: Mon Jul 20 10:20:42 2020 +0300 ASoC: SOF: imx8: Fix ESAI DAI driver name for i.MX8/iMX8X This must match DAI name from topology. Also, esai-port is too generic as they are 2 ESAIs on i.MX8/i.MX8X boards. SOF integration only uses ESAI0 for now. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200720072046.8152-4-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit beaa7bd10dce348b033aff3f466ab1a78b33fed3 Author: Daniel Baluta Date: Mon Jul 20 10:20:41 2020 +0300 ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value With this change we no longer need to update num_drv when adding new DAI driver. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200720072046.8152-3-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 45b7262174dcc2ca62e23220219eee1462dcada9 Author: Daniel Baluta Date: Mon Jul 20 10:20:40 2020 +0300 ASoC: SOF: define INFO_ flags in dsp_ops for imx8 In the past, the INFO_ flags such as PAUSE/NO_PERIOD_WAKEUP were defined in the SOF PCM core, but that was changed since commit 27e322fabd50 ("ASoC: SOF: define INFO_ flags in dsp_ops") Now these flags must be set in DSP ops. Signed-off-by: Daniel Baluta Reviewed-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200720072046.8152-2-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit 7a4462a96777b64b22412f782de226c90290bf75 Author: Bjorn Helgaas Date: Tue Jul 21 16:23:36 2020 -0500 misc: rtsx: Use standard PCI definitions When reading registers defined by the PCIe spec, use the names already defined by the PCI core. This makes maintenance of the PCI core and drivers easier. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200721212336.1159079-6-helgaas@kernel.org [ additional replacements due to changes in my tree - gregkh ] Signed-off-by: Greg Kroah-Hartman commit ed86a9877d05b99088a409a7603828b818a433dc Author: Bjorn Helgaas Date: Tue Jul 21 16:23:35 2020 -0500 misc: rtsx: Find L1 PM Substates capability instead of hard-coding Instead of hard-coding the location of the L1 PM Substates capability based on the Device ID, search for it in the extended capabilities list. This works for any device, as long as it implements the L1 PM Substates capability correctly, so it doesn't require maintenance as new devices are added. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200721212336.1159079-5-helgaas@kernel.org [ minor addition due to differences in my tree - gregkh] Signed-off-by: Greg Kroah-Hartman commit 22bf3251d7b7da0339f41ec27f2c3d4e0ec02255 Author: Bjorn Helgaas Date: Tue Jul 21 16:23:34 2020 -0500 misc: rtsx: Remove rtsx_pci_read/write_config() wrappers rtsx_pci_read_config_dword() and similar wrappers around the PCI config accessors add very little value, and they obscure the fact that often we are accessing standard PCI registers that should be coordinated with the PCI core. Remove the wrappers and use the PCI config accessors directly. No functional change intended. Signed-off-by: Bjorn Helgaas Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200721212336.1159079-4-helgaas@kernel.org [ fixed up some other instances as original patch was based on old tree - gregkh Signed-off-by: Greg Kroah-Hartman commit df746b3f079c31db7350b282c86e9004fa1a88df Author: Bjorn Helgaas Date: Tue Jul 21 16:23:33 2020 -0500 misc: rtsx: Remove unused pcie_cap There are no more uses of struct rtsx_pcr.pcie_cap. Remove it. Signed-off-by: Bjorn Helgaas Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200721212336.1159079-3-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman commit ff36dc6e9654ae511039300b102e8f3d30814859 Author: Bjorn Helgaas Date: Tue Jul 21 16:23:32 2020 -0500 misc: rtsx: Use pcie_capability_clear_and_set_word() for PCI_EXP_LNKCTL Instead of using the driver-specific rtsx_pci_write_config_byte() to update the PCIe Link Control Register, use pcie_capability_write_word() like the rest of the kernel does. This makes it easier to maintain ASPM across the PCI core and drivers. No functional change intended. I missed this when doing 3d1e7aa80d1c ("misc: rtsx: Use pcie_capability_clear_and_set_word() for PCI_EXP_LNKCTL"). Signed-off-by: Bjorn Helgaas Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200721212336.1159079-2-helgaas@kernel.org Signed-off-by: Greg Kroah-Hartman commit c17536d0abde2fd24afca542e3bb73b45a299633 Author: Christoph Hellwig Date: Wed Jul 22 09:36:55 2020 +0200 usb: usbfs: stop using compat_alloc_user_space Just switch the low-level routines to take kernel structures, and do the conversion from the compat to the native structure on that. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20200722073655.220011-1-hch@lst.de Signed-off-by: Greg Kroah-Hartman commit 3f11011573f9bab446b635763c5b6eb92ffdc1e2 Author: Yangtao Li Date: Tue Jul 14 15:18:39 2020 +0800 dt-bindings: i2c: mv64xxx: Add compatible for the A100 i2c node. Allwinner A100 have a mv64xxx i2c interface available to be used. Signed-off-by: Yangtao Li Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 2350ebe2c40dfc2a0830e5eab17976d83f594ded Author: Russell King Date: Wed Jul 22 09:50:23 2020 +0100 ARM: uaccess: add further explanation of __range_ok() Detail the success return condition, and that we rely on KERNEL_DS being zero for this to operate correctly. Signed-off-by: Russell King commit 2ac5413e5edca6910d2ae157187a889e94be2b62 Author: Hu Haowen Date: Sun Jul 19 18:50:07 2020 +0800 x86/perf: Fix a typo The word "Zhoaxin" is incorrect and the right one is "Zhaoxin". Signed-off-by: Hu Haowen Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200719105007.57649-1-xianfengting221@163.com commit c2127e14c127de2775feefdfb1444e30a129a59f Author: Randy Dunlap Date: Sat Jul 18 17:30:27 2020 -0700 perf: : drop a duplicated word Drop the repeated word "the" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200719003027.20798-1-rdunlap@infradead.org commit e17ae7fea8714caa743aa0d5e446a25a999ad726 Author: Valentin Schneider Date: Sun Jul 12 17:59:17 2020 +0100 arm, arm64: Select CONFIG_SCHED_THERMAL_PRESSURE This option now correctly depends on CPU_FREQ_THERMAL, so select it on the architectures that implement the required functions, arch_set_thermal_pressure() and arch_get_thermal_pressure(). Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Acked-by: Catalin Marinas Link: https://lkml.kernel.org/r/20200712165917.9168-4-valentin.schneider@arm.com commit 98eb401d09301d8a38c31cc8851ba95ac9385c8f Author: Valentin Schneider Date: Sun Jul 12 17:59:16 2020 +0100 sched: Cleanup SCHED_THERMAL_PRESSURE kconfig entry As Russell pointed out [1], this option is severely lacking in the documentation department, and figuring out if one has the required dependencies to benefit from turning it on is not straightforward. Make it non user-visible, and add a bit of help to it. While at it, make it depend on CPU_FREQ_THERMAL. [1]: https://lkml.kernel.org/r/20200603173150.GB1551@shell.armlinux.org.uk Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200712165917.9168-3-valentin.schneider@arm.com commit 25980c7a79af42f2daa73e2f475ebf4cbac8253e Author: Valentin Schneider Date: Sun Jul 12 17:59:15 2020 +0100 arch_topology, sched/core: Cleanup thermal pressure definition The following commit: 14533a16c46d ("thermal/cpu-cooling, sched/core: Move the arch_set_thermal_pressure() API to generic scheduler code") moved the definition of arch_set_thermal_pressure() to sched/core.c, but kept its declaration in linux/arch_topology.h. When building e.g. an x86 kernel with CONFIG_SCHED_THERMAL_PRESSURE=y, cpufreq_cooling.c ends up getting the declaration of arch_set_thermal_pressure() from include/linux/arch_topology.h, which is somewhat awkward. On top of this, sched/core.c unconditionally defines o The thermal_pressure percpu variable o arch_set_thermal_pressure() while arch_scale_thermal_pressure() does nothing unless redefined by the architecture. arch_*() functions are meant to be defined by architectures, so revert the aforementioned commit and re-implement it in a way that keeps arch_set_thermal_pressure() architecture-definable, and doesn't define the thermal pressure percpu variable for kernels that don't need it (CONFIG_SCHED_THERMAL_PRESSURE=n). Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200712165917.9168-2-valentin.schneider@arm.com commit 2705937a0395bd15d515a2a302d26ebc8318c035 Author: Randy Dunlap Date: Wed Jul 15 18:31:38 2020 -0700 trace/events/sched.h: fix duplicated word Change "It it" to "It is". Signed-off-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/25305c1d-4ee8-e091-d20f-e700ddad49fd@infradead.org commit e0078e2eb8620079d988f150ba02a4ce9b5a946a Author: Randy Dunlap Date: Wed Jul 15 18:30:31 2020 -0700 linux/sched/mm.h: drop duplicated words in comments Drop doubled words "to" and "that". Signed-off-by: Randy Dunlap Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/927ea8d8-3f6c-9b65-4c2b-63ab4bd59ef1@infradead.org commit 589343569d7b58a64ec2446e6686c8e79aea7fcf Author: Muchun Song Date: Thu Jul 16 15:04:57 2020 +0800 smp: Fix a potential usage of stale nr_cpus The get_option() maybe return 0, it means that the nr_cpus is not initialized. Then we will use the stale nr_cpus to initialize the nr_cpu_ids. So fix it. Signed-off-by: Muchun Song Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200716070457.53255-1-songmuchun@bytedance.com commit 3edecfef028536cb19a120ec8788bd8a11f93b9e Author: Peter Puhov Date: Tue Jul 14 08:59:41 2020 -0400 sched/fair: update_pick_idlest() Select group with lowest group_util when idle_cpus are equal In slow path, when selecting idlest group, if both groups have type group_has_spare, only idle_cpus count gets compared. As a result, if multiple tasks are created in a tight loop, and go back to sleep immediately (while waiting for all tasks to be created), they may be scheduled on the same core, because CPU is back to idle when the new fork happen. For example: sudo perf record -e sched:sched_wakeup_new -- \ sysbench threads --threads=4 run ... total number of events: 61582 ... sudo perf script sysbench 129378 [006] 74586.633466: sched:sched_wakeup_new: sysbench:129380 [120] success=1 CPU:007 sysbench 129378 [006] 74586.634718: sched:sched_wakeup_new: sysbench:129381 [120] success=1 CPU:007 sysbench 129378 [006] 74586.635957: sched:sched_wakeup_new: sysbench:129382 [120] success=1 CPU:007 sysbench 129378 [006] 74586.637183: sched:sched_wakeup_new: sysbench:129383 [120] success=1 CPU:007 This may have negative impact on performance for workloads with frequent creation of multiple threads. In this patch we are using group_util to select idlest group if both groups have equal number of idle_cpus. Comparing the number of idle cpu is not enough in this case, because the newly forked thread sleeps immediately and before we select the cpu for the next one. This is shown in the trace where the same CPU7 is selected for all wakeup_new events. That's why, looking at utilization when there is the same number of CPU is a good way to see where the previous task was placed. Using nr_running doesn't solve the problem because the newly forked task is not running and the cpu would not have been idle in this case and an idle CPU would have been selected instead. With this patch newly created tasks would be better distributed. With this patch: sudo perf record -e sched:sched_wakeup_new -- \ sysbench threads --threads=4 run ... total number of events: 74401 ... sudo perf script sysbench 129455 [006] 75232.853257: sched:sched_wakeup_new: sysbench:129457 [120] success=1 CPU:008 sysbench 129455 [006] 75232.854489: sched:sched_wakeup_new: sysbench:129458 [120] success=1 CPU:009 sysbench 129455 [006] 75232.855732: sched:sched_wakeup_new: sysbench:129459 [120] success=1 CPU:010 sysbench 129455 [006] 75232.856980: sched:sched_wakeup_new: sysbench:129460 [120] success=1 CPU:011 We tested this patch with following benchmarks: master: 'commit b3a9e3b9622a ("Linux 5.8-rc1")' 100 iterations of: perf bench -f simple futex wake -s -t 128 -w 1 Lower result is better | | BASELINE | +PATCH | DELTA (%) | |---------|------------|----------|-------------| | mean | 0.33 | 0.313 | +5.152 | | std (%) | 10.433 | 7.563 | | 100 iterations of: sysbench threads --threads=8 run Higher result is better | | BASELINE | +PATCH | DELTA (%) | |---------|------------|----------|-------------| | mean | 5235.02 | 5863.73 | +12.01 | | std (%) | 8.166 | 10.265 | | 100 iterations of: sysbench mutex --mutex-num=1 --threads=8 run Lower result is better | | BASELINE | +PATCH | DELTA (%) | |---------|------------|----------|-------------| | mean | 0.413 | 0.404 | +2.179 | | std (%) | 3.791 | 1.816 | | Signed-off-by: Peter Puhov Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200714125941.4174-1-peter.puhov@linaro.org commit 46132e3ac58cb2ee48051ed80bffc0070ad59b2e Author: Paul Gortmaker Date: Wed Jul 1 14:34:18 2020 -0400 sched: nohz: stop passing around unused "ticks" parameter. The "ticks" parameter was added in commit 0f004f5a696a ("sched: Cure more NO_HZ load average woes") since calc_global_nohz() was called and needed the "ticks" argument. But in commit c308b56b5398 ("sched: Fix nohz load accounting -- again!") it became unused as the function calc_global_nohz() dropped using "ticks". Fixes: c308b56b5398 ("sched: Fix nohz load accounting -- again!") Signed-off-by: Paul Gortmaker Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593628458-32290-1-git-send-email-paul.gortmaker@windriver.com commit 58877d347b58c9e971112df5eb311c13bb0acb28 Author: Peter Zijlstra Date: Thu Jul 2 14:52:11 2020 +0200 sched: Better document ttwu() Dave hit the problem fixed by commit: b6e13e85829f ("sched/core: Fix ttwu() race") and failed to understand much of the code involved. Per his request a few comments to (hopefully) clarify things. Requested-by: Dave Chinner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200702125211.GQ4800@hirez.programming.kicks-ass.net commit 015dc08918785201199ed3450c22bb8939f09dfe Merge: 9d246053a6919 d136122f58458 Author: Peter Zijlstra Date: Wed Jul 22 10:22:02 2020 +0200 Merge branch 'sched/urgent' commit 37bd9e803daea816f2dc2c8f6dc264097eb3ebd2 Author: Xiongfeng Wang Date: Tue Jul 21 22:24:24 2020 -0700 Input: ati_remote2 - add missing newlines when printing module parameters When I cat some module parameters by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/module/ati_remote2/parameters/mode_mask 0x1froot@syzkaller:~# cat /sys/module/ati_remote2/parameters/channel_mask 0xffffroot@syzkaller:~# Signed-off-by: Xiongfeng Wang Link: https://lore.kernel.org/r/20200720092148.9320-1-wangxiongfeng2@huawei.com Signed-off-by: Dmitry Torokhov commit 4aec14de3a15cf9789a0e19c847f164776f49473 Author: Xiongfeng Wang Date: Tue Jul 21 22:24:07 2020 -0700 Input: psmouse - add a newline when printing 'proto' by sysfs When I cat parameter 'proto' by sysfs, it displays as follows. It's better to add a newline for easy reading. root@syzkaller:~# cat /sys/module/psmouse/parameters/proto autoroot@syzkaller:~# Signed-off-by: Xiongfeng Wang Link: https://lore.kernel.org/r/20200720073846.120724-1-wangxiongfeng2@huawei.com Signed-off-by: Dmitry Torokhov commit f935a752f22915ff6891cd62dd0d12476e5df248 Author: Kathiravan T Date: Mon Jul 20 11:42:22 2020 +0530 dt-bindings: soc: qcom: smd-rpm: Convert binding to YAML schema Convert the qcom,smd-rpm.txt document to YAML schema Reviewed-by: Rob Herring Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1595225543-12127-4-git-send-email-kathirav@codeaurora.org Signed-off-by: Bjorn Andersson commit 84da0cf99b065ec5561bc23d47876a35813fe99e Author: Kathiravan T Date: Mon Jul 20 11:42:21 2020 +0530 soc: qcom: smd-rpm: Add IPQ6018 compatible This patch adds a compatible for the rpm on the Qualcomm IPQ6018 platform. Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1595225543-12127-3-git-send-email-kathirav@codeaurora.org Signed-off-by: Bjorn Andersson commit f10a2df503865f490323752626ed6b6c37c28646 Author: Kathiravan T Date: Mon Jul 20 11:42:20 2020 +0530 dt-bindings: soc: qcom: smd-rpm: Add IPQ6018 compatible This patch adds the dt-binding for the rpm on the Qualcomm IPQ6018 platform. Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1595225543-12127-2-git-send-email-kathirav@codeaurora.org Signed-off-by: Bjorn Andersson commit a5c33d5f745ca1ecfbd692a531ef2a12bfeeb57e Merge: 9b031c86506ce a50ca29523b18 Author: Dmitry Torokhov Date: Tue Jul 21 22:17:27 2020 -0700 Merge branch 'for-linus' into next Sync up with 'for-linus' branch to resolve conflict in Elan touchpad driver. commit c333f9495c451d958c6f4a41e5de2d8f80f79496 Author: Randy Dunlap Date: Fri Jul 17 16:37:13 2020 -0700 raid: md_p.h: drop duplicated word in a comment Drop the doubled word "the" in a comment. Signed-off-by: Randy Dunlap Cc: Song Liu Cc: linux-raid@vger.kernel.org Signed-off-by: Song Liu commit d3d245aee0b149b5e3034b8790c9d7688526fc70 Author: Sandeep Maheswaram Date: Tue Jul 21 13:14:49 2020 +0530 arm64: dts: qcom: sc7180: Add maximum speed property for DWC3 USB node Adding maximum speed property for DWC3 USB node which can be used for setting interconnect bandwidth. Signed-off-by: Sandeep Maheswaram Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1595317489-18432-3-git-send-email-sanm@codeaurora.org Signed-off-by: Bjorn Andersson commit 4a183020d35c6100095605e2c4a47b80f6e301f3 Author: Sai Prakash Ranjan Date: Tue Jul 21 12:43:43 2020 +0530 arm64: dts: qcom: sdm845: Support ETMv4 power management Add "arm,coresight-loses-context-with-cpu" property to coresight ETM nodes to avoid failure of trace session because of losing context on entering deep idle states. Reviewed-by: Mathieu Poirier Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/20200721071343.2898-1-saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 318130cc9362570f3e9587fab54482683aacbc8f Author: Sibi Sankar Date: Tue Jul 21 16:59:35 2020 +0530 remoteproc: qcom_q6v5_mss: Add MBA log extraction support On SC7180 the MBA firmware stores the bootup text logs in a 4K segment at the beginning of the MBA region. Add support to extract the logs which will be useful to debug mba boot/authentication issues. Reviewed-by: Bjorn Andersson Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200721112935.25716-3-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 111d1089700cdb752681ef44f54ab6137736f5c2 Author: Guennadi Liakhovetski Date: Tue Jul 21 10:56:38 2020 +0200 rpmsg: virtio: add endianness conversions According to the VirtIO 1.0 spec data, sent over virtual queues must be in little-endian format. Update the RPMsg VirtIO implementation to enforce that but let legacy configurations continue use native endianness. Acked-by: Michael S. Tsirkin Signed-off-by: Guennadi Liakhovetski Reviewed-by: Mathieu Poirier Tested-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200721085638.GA3815@ubuntu Signed-off-by: Bjorn Andersson commit 9b031c86506cef9acae45e61339fcf9deaabb793 Merge: 53aab92dec447 04d5ce620f794 Author: Dmitry Torokhov Date: Tue Jul 21 19:02:33 2020 -0700 Merge branch 'elan-i2c' into next Bring in update to Elan touchpad driver to support newer touchpads with higher resolution. commit fa56a987449bcf4c1cb68369a187af3515b85c78 Merge: 4787dd582dbde 1b897e7d8d449 Author: David S. Miller Date: Tue Jul 21 18:36:34 2020 -0700 Merge branch 'ionic-updates' Shannon Nelson says: ==================== ionic updates These are a few odd code tweaks to the ionic driver: FW defined MTU limits, remove unnecessary code, and other tidiness tweaks. ==================== Signed-off-by: David S. Miller commit 1b897e7d8d4496e81c1e896ab516536a6f509a95 Author: Shannon Nelson Date: Tue Jul 21 13:34:09 2020 -0700 ionic: interface file updates Add some new interface values and update a few more descriptions. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 6a6014e2fb276753d4dc9b803370e7af7f57e30b Author: Shannon Nelson Date: Tue Jul 21 13:34:08 2020 -0700 ionic: rearrange reset and bus-master control We can prevent potential incorrect DMA access attempts from the NIC by enabling bus-master after the reset, and by disabling bus-master earlier in cleanup. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 3fbc9bb6ca32d12d4d32a7ae32abef67ac95f889 Author: Shannon Nelson Date: Tue Jul 21 13:34:07 2020 -0700 ionic: update eid test for overflow Fix up our comparison to better handle a potential (but largely unlikely) wrap around. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 4471b1c13ae7e3c8be64a9e015c6bc31468e1b16 Author: Shannon Nelson Date: Tue Jul 21 13:34:06 2020 -0700 ionic: remove unused ionic_coal_hw_to_usec Clean up some unused code. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit c8768e7321d2f2c69c3467928a2e63630e682e22 Author: Shannon Nelson Date: Tue Jul 21 13:34:05 2020 -0700 ionic: set netdev default name If the host system's udev fails to set a new name for the network port, there is no NETDEV_CHANGENAME event to trigger the driver to send the name down to the firmware. It is safe to set the lif name multiple times, so we add a call early on to set the default netdev name to be sure the FW has something to use in its internal debug logging. Then when udev gets around to changing it we can update it to the actual name the system will be using. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 4b03b27349c03b72a084b2484623a744565bc399 Author: Shannon Nelson Date: Tue Jul 21 13:34:04 2020 -0700 ionic: get MTU from lif identity Change from using hardcoded MTU limits and instead use the firmware defined limits. The value from the LIF attributes is the frame size, so we take off the header size to convert to MTU size. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 4787dd582dbde0b7f29eb3dbe59df3da1b350925 Author: Martin Varghese Date: Fri Jul 17 08:05:12 2020 +0530 bareudp: Reverted support to enable & disable rx metadata collection The commit fe80536acf83 ("bareudp: Added attribute to enable & disable rx metadata collection") breaks the the original(5.7) default behavior of bareudp module to collect RX metadadata at the receive. It was added to avoid the crash at the kernel neighbour subsytem when packet with metadata from bareudp is processed. But it is no more needed as the commit 394de110a733 ("net: Added pointer check for dst->ops->neigh_lookup in dst_neigh_lookup_skb") solves this crash. Fixes: fe80536acf83 ("bareudp: Added attribute to enable & disable rx metadata collection") Signed-off-by: Martin Varghese Acked-by: Guillaume Nault Signed-off-by: David S. Miller commit 30962fe33ab5ed4bbd78c12f4b9e25a85c3e8d0b Author: leilk.liu Date: Tue Jul 21 20:24:35 2020 +0800 spi: update bindings for MT8192 SoC Add a DT binding documentation for the MT8192 soc. Signed-off-by: leilk.liu Link: https://lore.kernel.org/r/20200721122436.31544-1-leilk.liu@mediatek.com Signed-off-by: Mark Brown commit 8cf125c403f4e0c7c7b78f34bbf9d7a7c55c1ff8 Author: leilk.liu Date: Tue Jul 21 20:24:36 2020 +0800 spi: mediatek: add spi support for mt8192 IC This patch add spi support for mt8192 IC. Signed-off-by: leilk.liu Link: https://lore.kernel.org/r/20200721122436.31544-2-leilk.liu@mediatek.com Signed-off-by: Mark Brown commit 956284a304dd7d100730b85d90eac3f472b7d2a0 Author: Dilip Kota Date: Fri Jul 17 14:27:56 2020 +0800 spi: Add bindings for Lightning Mountain SoC Add support to SPI controller on Intel Atom based Lightning Mountain SoC which reuses the Lantiq SPI controller IP. Signed-off-by: Dilip Kota Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/7d644e5d03ef534f719763e5c823c1673e53d1a5.1594957019.git.eswara.kota@linux.intel.com Signed-off-by: Mark Brown commit 040f7f9729785363eb062a36f76467c7b7c9b7c1 Author: Dilip Kota Date: Fri Jul 17 14:27:57 2020 +0800 spi: lantiq: Add support to Lightning Mountain SoC Add support to SPI controller on Intel Atom based Lightning Mountain SoC which reuses Lantiq SPI controller IP. Signed-off-by: Dilip Kota Link: https://lore.kernel.org/r/4d61a75381aca9479f9fc15d07a7b05534da6bb3.1594957019.git.eswara.kota@linux.intel.com Signed-off-by: Mark Brown commit 744cd0f212d72758fb094c1d13ec61b27ab6de3f Author: Dilip Kota Date: Fri Jul 17 14:27:55 2020 +0800 spi: lantiq: Move interrupt configuration to SoC specific data structure Moving interrupt configuration to SoC specific data structure helps to add support for newer SoCs on which SPI controller with lesser interrupt lines compared to existing chipsets. Signed-off-by: Dilip Kota Link: https://lore.kernel.org/r/7eb6d863515245fedfa0296c72082df107367d07.1594957019.git.eswara.kota@linux.intel.com Signed-off-by: Mark Brown commit 8743d2155aed9236202294e293ab13d33b3a7682 Author: Dilip Kota Date: Fri Jul 17 14:27:54 2020 +0800 spi: lantiq: Add fifo size bit mask in SoC specific data structure On newer chipsets, SPI controller has fifos of larger size. So add the fifo size bit mask entry in SoC specific data structure. Signed-off-by: Dilip Kota Link: https://lore.kernel.org/r/a0889abf17a9fbc7077f10be0f0342b7ebdf9361.1594957019.git.eswara.kota@linux.intel.com Signed-off-by: Mark Brown commit 94eca904cb97f9cfa90e3e558fb73c49d2e42f91 Author: Dilip Kota Date: Fri Jul 17 14:27:53 2020 +0800 spi: lantiq: Add support to acknowledge interrupt On newer chipsets interrupt need to be acknowledged as they use different interrupt controller which does not acknowledge the interrupts automatically. Signed-off-by: Dilip Kota Link: https://lore.kernel.org/r/608923b484d9ef239b44bb545c0b79b27030a6ae.1594957019.git.eswara.kota@linux.intel.com Signed-off-by: Mark Brown commit 8d19d665e0aca28c4bd8a024241b05f74841a315 Author: Dilip Kota Date: Fri Jul 17 14:27:52 2020 +0800 spi: lantiq: Move interrupt control register offesets to SoC specific data structure Address of Interrupt control registers are different on new chipsets. So move them to SoC specific data structure. Signed-off-by: Dilip Kota Link: https://lore.kernel.org/r/f0f9723a30ea9c2ee48d2199f7512af9e15803b0.1594957019.git.eswara.kota@linux.intel.com Signed-off-by: Mark Brown commit ddf41bf782d2fb1df605407c7fff1160f488c949 Author: Dilip Kota Date: Fri Jul 17 14:27:51 2020 +0800 spi: lantiq: Add SMP support Existing driver supports only single core SoC. New multicore platforms uses the same driver/IP so SMP support is required. This patch adds multicore support in the driver. Signed-off-by: Dilip Kota Link: https://lore.kernel.org/r/d6663296b41f102c582fda08e71f62b72ca05d5d.1594957019.git.eswara.kota@linux.intel.com Signed-off-by: Mark Brown commit 661ccf2b3f1360be50242726f7c26ced6a9e7d52 Author: Dilip Kota Date: Fri Jul 17 14:27:50 2020 +0800 spi: lantiq: fix: Rx overflow error in full duplex mode In full duplex mode, rx overflow error is observed. To overcome the error, wait until the complete data got received and proceed further. Fixes: 17f84b793c01 ("spi: lantiq-ssc: add support for Lantiq SSC SPI controller") Signed-off-by: Dilip Kota Link: https://lore.kernel.org/r/efb650b0faa49a00788c4e0ca8ef7196bdba851d.1594957019.git.eswara.kota@linux.intel.com Signed-off-by: Mark Brown commit f185bcc779808df5d31bc332b79b5f1455ee910b Author: Vaibhav Gupta Date: Mon Jul 20 21:27:15 2020 +0530 spi: spi-topcliff-pch: use generic power management Drivers using legacy PM have to manage PCI states and device's PM states themselves. They also need to take care of configuration registers. With improved and powerful support of generic PM, PCI Core takes care of above mentioned, device-independent, jobs. This driver makes use of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), pci_enable_wake() and pci_set_power_state() to do required operations. In generic mode, they are no longer needed. Change function parameter in both .suspend() and .resume() to "struct device*" type. Use dev_get_drvdata() to get drv data. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200720155714.714114-1-vaibhavgupta40@gmail.com Signed-off-by: Mark Brown commit 4726773292bfdb2917a0b4d369ddccd5e2f30991 Author: Linus Walleij Date: Tue Jul 14 09:22:26 2020 +0200 spi: ppc4xx: Convert to use GPIO descriptors This converts the PPC4xx SPI driver to use GPIO descriptors. The driver is already just picking some GPIOs from the device tree so the conversion is pretty straight forward. However this driver is looking form a pure "gpios" property rather than the standard binding "cs-gpios" so we need to add a new exception to the gpiolib OF parser to allow this for this driver's compatibles. Signed-off-by: Linus Walleij Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20200714072226.26071-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit ce8e60fe4f517b3b2b1deb44cf364a9080521567 Author: Shreyas Joshi Date: Sat Jul 11 07:16:55 2020 +1000 spi: spi-cadence: add support for chip select high The spi cadence driver should support spi-cs-high in mode bits so that the peripherals that needs the chip select to be high active can use it. Add the SPI-CS-HIGH flag in the supported mode bits. Signed-off-by: Shreyas Joshi Link: https://lore.kernel.org/r/20200710211655.1564-1-shreyas.joshi@biamp.com Signed-off-by: Mark Brown commit 2abbae5a0e4e1d81016f56a403b2daadfee314c3 Author: Clark Wang Date: Tue Jul 14 15:52:47 2020 +0800 spi: lpspi: fix the imbalance of runtime pm function call Call the put function after probe successfully. Otherwise, the lpspi module will keep active status until the first spi transfer called. Disable runtime pm when probe fails. There is no need to active runtime pm after probe failed. Signed-off-by: Clark Wang Link: https://lore.kernel.org/r/20200714075251.12777-2-xiaoning.wang@nxp.com Signed-off-by: Mark Brown commit edee9dfe51b77ad6532a1014a7be91b2a423bc37 Author: Zhao Heming Date: Tue Jul 21 02:08:53 2020 +0800 md-cluster: fix rmmod issue when md_cluster convert bitmap to none update_array_info misses calling module_put when removing cluster bitmap. steps to reproduce: ``` node1 # mdadm -C /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sda /dev/sdb mdadm: array /dev/md0 started. node1 # lsmod | egrep "dlm|md_|raid1" md_cluster 28672 1 dlm 212992 14 md_cluster configfs 57344 2 dlm raid1 53248 1 md_mod 176128 2 raid1,md_cluster node1 # mdadm -G /dev/md0 -b none node1 # lsmod | egrep "dlm|md_|raid1" md_cluster 28672 1 <== should be zero dlm 212992 9 md_cluster configfs 57344 2 dlm raid1 53248 1 md_mod 176128 2 raid1,md_cluster node1 # mdadm -G /dev/md0 -b clustered node1 # lsmod | egrep "dlm|md_|raid1" md_cluster 28672 2 <== increase dlm 212992 14 md_cluster configfs 57344 2 dlm raid1 53248 1 md_mod 176128 2 raid1,md_cluster node1 # mdadm -G /dev/md0 -b none node1 # mdadm -G /dev/md0 -b clustered node1 # lsmod | egrep "dlm|md_|raid1" md_cluster 28672 3 <== increase dlm 212992 14 md_cluster configfs 57344 2 dlm raid1 53248 1 md_mod 176128 2 raid1,md_cluster ``` Reviewed-by: NeilBrown Signed-off-by: Zhao Heming Signed-off-by: Song Liu commit 7c9d5c54fb72d92fe3fd7d3a3eb58b5200e454c4 Author: Zhao Heming Date: Tue Jul 21 02:08:52 2020 +0800 md-cluster: fix safemode_delay value when converting to clustered bitmap When array convert to clustered bitmap, the safe_mode_delay doesn't clean and vice versa. the /sys/block/mdX/md/safe_mode_delay keep original value after changing bitmap type. In safe_delay_store(), the code forbids setting mddev->safemode_delay when array is clustered. So in cluster-md env, the expected safemode_delay value should be 0. Reproducible steps: ``` node1 # mdadm --zero-superblock /dev/sd{b,c,d} node1 # mdadm -C /dev/md0 -b internal -e 1.2 -n 2 -l mirror /dev/sdb /dev/sdc node1 # cat /sys/block/md0/md/safe_mode_delay 0.204 node1 # mdadm -G /dev/md0 -b none node1 # mdadm --grow /dev/md0 --bitmap=clustered node1 # cat /sys/block/md0/md/safe_mode_delay 0.204 <== doesn't change, should ZERO for cluster-md node1 # mdadm --zero-superblock /dev/sd{b,c,d} node1 # mdadm -C /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sdb /dev/sdc node1 # cat /sys/block/md0/md/safe_mode_delay 0.000 node1 # mdadm -G /dev/md0 -b none node1 # cat /sys/block/md0/md/safe_mode_delay 0.000 <== doesn't change, should default value ``` Reviewed-by: NeilBrown Signed-off-by: Zhao Heming Signed-off-by: Song Liu commit 922e7455bb6122696b0420172700ea2b4e2f5739 Author: Bhanuprakash Modem Date: Fri Jun 26 16:12:42 2020 -0700 Revert "drm/amd/display: Expose connector VRR range via debugfs" v3: * Rebase (Manasi) v2: * Rebase (Manasi) As both VRR min and max are already part of drm_display_info, drm can expose this VRR range for each connector. Hence this logic should move to core DRM. This reverts commit 727962f030c23422a01e8b22d0f463815fb15ec4. Signed-off-by: Bhanuprakash Modem Cc: Nicholas Kazlauskas Cc: Harry Wentland Cc: Alex Deucher Cc: Manasi Navare Cc: AMD gfx Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 1bca544050e596f04e4fd3e23b87cde85282a931 Author: Masahiro Yamada Date: Mon Jul 13 16:56:28 2020 +0900 powerpc/boot: add DTB to 'targets' PowerPC always re-builds DTB even if nothing has been changed. As for other architectures, arch/*/boot/dts/Makefile builds DTB by using the dtb-y syntax. In contrast, arch/powerpc/boot/dts/(fsl/)Makefile does nothing unless CONFIG_OF_ALL_DTBS is defined. Instead, arch/powerpc/boot/Makefile builds DTB on demand. You need to add DTB to 'targets' explicitly so .*.cmd files are included. Signed-off-by: Masahiro Yamada Acked-by: Michael Ellerman commit 3b5408b98e4db62b322f8516a0d08f95f197c42f Author: Yufen Yu Date: Sat Jul 18 05:29:09 2020 -0400 md/raid5: support config stripe_size by sysfs entry Adding a new 'stripe_size' sysfs entry to set and show stripe_size. stripe_size should not be bigger than PAGE_SIZE, and it requires to be multiple of 4096. We can adjust stripe_size by writing value into sysfs entry, likely, set stripe_size as 16KB: echo 16384 > /sys/block/md1/md/stripe_size Show current stripe_size value: cat /sys/block/md1/md/stripe_size For PAGE_SIZE is equal to 4096, 'stripe_size' can just be read. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit e236858243d7a8e0ac60972d2f9522146088a736 Author: Yufen Yu Date: Sat Jul 18 05:29:08 2020 -0400 md/raid5: set default stripe_size as 4096 In RAID5, if issued bio size is bigger than stripe_size, it will be split in the unit of stripe_size and process them one by one. Even for size less then stripe_size, RAID5 also request data from disk at least of stripe_size. Nowdays, stripe_size is equal to the value of PAGE_SIZE. Since filesystem usually issue bio in the unit of 4KB, there is no problem for PAGE_SIZE as 4KB. But, for 64KB PAGE_SIZE, bio from filesystem requests 4KB data while RAID5 issue IO at least stripe_size (64KB) each time. That will waste resource of disk bandwidth and compute xor. To avoding the waste, we want to make stripe_size configurable. This patch just set default stripe_size as 4096. User can also set the value bigger than 4KB for some special requirements, such as we know the issued io size is more than 4KB. To evaluate the new feature, we create raid5 device '/dev/md5' with 4 SSD disk and test it on arm64 machine with 64KB PAGE_SIZE. 1) We format /dev/md5 with mkfs.ext4 and mount ext4 with default configure on /mnt directory. Then, trying to test it by dbench with command: dbench -D /mnt -t 1000 10. Result show as: 'stripe_size = 64KB' Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 9805011 0.021 64.728 Close 7202525 0.001 0.120 Rename 415213 0.051 44.681 Unlink 1980066 0.079 93.147 Deltree 240 1.793 6.516 Mkdir 120 0.004 0.007 Qpathinfo 8887512 0.007 37.114 Qfileinfo 1557262 0.001 0.030 Qfsinfo 1629582 0.012 0.152 Sfileinfo 798756 0.040 57.641 Find 3436004 0.019 57.782 WriteX 4887239 0.021 57.638 ReadX 15370483 0.005 37.818 LockX 31934 0.003 0.022 UnlockX 31933 0.001 0.021 Flush 687205 13.302 530.088 Throughput 307.799 MB/sec 10 clients 10 procs max_latency=530.091 ms ------------------------------------------------------- 'stripe_size = 4KB' Operation Count AvgLat MaxLat ---------------------------------------- NTCreateX 11999166 0.021 36.380 Close 8814128 0.001 0.122 Rename 508113 0.051 29.169 Unlink 2423242 0.070 38.141 Deltree 300 1.885 7.155 Mkdir 150 0.004 0.006 Qpathinfo 10875921 0.007 35.485 Qfileinfo 1905837 0.001 0.032 Qfsinfo 1994304 0.012 0.125 Sfileinfo 977450 0.029 26.489 Find 4204952 0.019 9.361 WriteX 5981890 0.019 27.804 ReadX 18809742 0.004 33.491 LockX 39074 0.003 0.025 UnlockX 39074 0.001 0.014 Flush 841022 10.712 458.848 Throughput 376.777 MB/sec 10 clients 10 procs max_latency=458.852 ms ------------------------------------------------------- It show that setting stripe_size as 4KB has higher thoughput, i.e. (376.777 vs 307.799) and has smaller latency than that setting as 64KB. 2) We try to evaluate IO throughput for /dev/md5 by fio with config: [4KB randwrite] direct=1 numjob=2 iodepth=64 ioengine=libaio filename=/dev/md5 bs=4KB rw=randwrite [64KB write] direct=1 numjob=2 iodepth=64 ioengine=libaio filename=/dev/md5 bs=1MB rw=write The result as follow: + + | stripe_size(64KB) | stripe_size(4KB) +----------------------------------------------------+ 4KB randwrite | 15MB/s | 100MB/s +----------------------------------------------------+ 1MB write | 1000MB/s | 700MB/s The result show that when size of io is bigger than 4KB (64KB), 64KB stripe_size has much higher IOPS. But for 4KB randwrite, that means, size of io issued to device are smaller, 4KB stripe_size have better performance. Normally, default value (4096) can get relatively good performance. But if each issued io is bigger than 4096, setting value more than 4096 may get better performance. Here, we just set default stripe_size as 4096, and we will try to support setting different stripe_size by sysfs interface in the following patch. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit c911c46c017c745e0f5ece9626d0fbfaff5a1f97 Author: Yufen Yu Date: Sat Jul 18 05:29:07 2020 -0400 md/raid456: convert macro STRIPE_* to RAID5_STRIPE_* Convert macro STRIPE_SIZE, STRIPE_SECTORS and STRIPE_SHIFT to RAID5_STRIPE_SIZE(), RAID5_STRIPE_SECTORS() and RAID5_STRIPE_SHIFT(). This patch is prepare for the following adjustable stripe_size. It will not change any existing functionality. Signed-off-by: Yufen Yu Signed-off-by: Song Liu commit 4303aa98c2b19c533f5d3713a8ced42edb9961ea Merge: c1d069e3bfc9e 3657cdaf03a6f Author: David S. Miller Date: Tue Jul 21 16:24:05 2020 -0700 Merge branch 'dpaa2-eth-add-support-for-TBF-offload' Ioana Ciornei says: ==================== dpaa2-eth: add support for TBF offload This patch set adds support for TBF offload in dpaa2-eth. The first patch restructures how the .ndo_setup_tc() callback is implemented (each Qdisc is treated in a separate function), the second patch just adds the necessary APIs for configuring the Tx shaper and the last one is handling TC_SETUP_QDISC_TBF and configures as requested the shaper. ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3657cdaf03a6f751b6f6c09381b1a9e016678069 Author: Ioana Ciornei Date: Tue Jul 21 19:38:25 2020 +0300 dpaa2-eth: add support for TBF offload React to TC_SETUP_QDISC_TBF and configure the egress shaper as appropriate with the maximum rate and burst size requested by the user. TBF can only be offloaded on DPAA2 when it's the root qdisc, ie it's a per port shaper. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 39344a89623d77ffa4cf9354d85fd6e58467bb87 Author: Ioana Ciornei Date: Tue Jul 21 19:38:24 2020 +0300 dpaa2-eth: add API for Tx shaping Add the necessary API (dpni_set_tx_shaping) for configuring the rate and burst size of a per port shaper in DPAA2. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit e3ec13be571b9da61011bf41ef097fe9bbbc3041 Author: Ioana Ciornei Date: Tue Jul 21 19:38:23 2020 +0300 dpaa2-eth: move the mqprio setup into a separate function Move the setup done for MQPRIO into a separate function so that with the addition of another offload we do not crowd dpaa2_eth_setup_tc(). After this restructuring it's easier to see what is supported in terms of Qdisc offloading. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit c1d069e3bfc9e4021f087016578fbff209f493fd Author: Florian Westphal Date: Tue Jul 21 21:08:54 2020 +0200 mptcp: move helper to where its used Only used in token.c. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 954d82979b2f9dd4c20b895226799650d4841b94 Author: Gustavo A. R. Silva Date: Wed Jul 8 15:09:39 2020 -0500 netfilter: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Pablo Neira Ayuso commit 35dfb013149f74c2be1ff9c78f14e6a3cd1539d1 Author: Andrew Sy Kim Date: Wed Jul 8 12:16:38 2020 -0400 ipvs: queue delayed work to expire no destination connections if expire_nodest_conn=1 When expire_nodest_conn=1 and a destination is deleted, IPVS does not expire the existing connections until the next matching incoming packet. If there are many connection entries from a single client to a single destination, many packets may get dropped before all the connections are expired (more likely with lots of UDP traffic). An optimization can be made where upon deletion of a destination, IPVS queues up delayed work to immediately expire any connections with a deleted destination. This ensures any reused source ports from a client (within the IPVS timeouts) are scheduled to new real servers instead of silently dropped. Signed-off-by: Andrew Sy Kim Signed-off-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso commit 1fe4085f90bca7001f3713c651b4c7368cac779a Merge: 3fc364c052749 eac5f8a95ae39 Author: David S. Miller Date: Tue Jul 21 16:14:58 2020 -0700 Merge branch 'devlink-small-improvements' Parav Pandit says: ==================== devlink small improvements This short series improves the devlink code for lock commment, simplifying checks and keeping the scope of mutex lock for necessary fields. Patch summary: Patch-1 Keep the devlink_mutex for only for necessary changes. Patch-2 Avoids duplicate check for reload flag Patch-3 Adds missing comment for the scope of devlink instance lock Patch-4 Constify devlink instance pointer ==================== Signed-off-by: David S. Miller commit eac5f8a95ae39dd94af818f0f9fad5d46207ee33 Author: Parav Pandit Date: Tue Jul 21 19:53:54 2020 +0300 devlink: Constify devlink instance pointer Constify devlink instance pointer while checking if reload operation is supported or not. This helps to review the scope of checks done in reload. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 336ce1c93293e1e606fbc557587b1a1f8630cd5c Author: Parav Pandit Date: Tue Jul 21 19:53:53 2020 +0300 devlink: Add comment for devlink instance lock Add comment to describe the purpose of devlink instance lock. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 9232a3e67b212f9ef924786f8dde23080acd321a Author: Parav Pandit Date: Tue Jul 21 19:53:52 2020 +0300 devlink: Avoid duplicate check for reload enabled flag Reload operation is enabled or not is already checked by devlink_reload(). Hence, remove the duplicate check from devlink_nl_cmd_reload(). Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 6553e561cadc0ec966ce2f039965a99a7502e19b Author: Parav Pandit Date: Tue Jul 21 19:53:51 2020 +0300 devlink: Do not hold devlink mutex when initializing devlink fields There is no need to hold a device global lock when initializing devlink device fields of a devlink instance which is not yet part of the devices list. Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 3fc364c0527494f322ad9504a39d39a6197edfdc Author: Heiner Kallweit Date: Tue Jul 21 18:22:24 2020 +0200 r8169: allow to enable ASPM on RTL8125A For most chip versions this has been added already. Allow also for RTL8125A to enable ASPM. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit f3db0bed458314a835ccef5ccb130270c5b2cf04 Author: Eric Biggers Date: Tue Jul 21 15:59:20 2020 -0700 fs-verity: use smp_load_acquire() for ->i_verity_info Normally smp_store_release() or cmpxchg_release() is paired with smp_load_acquire(). Sometimes smp_load_acquire() can be replaced with the more lightweight READ_ONCE(). However, for this to be safe, all the published memory must only be accessed in a way that involves the pointer itself. This may not be the case if allocating the object also involves initializing a static or global variable, for example. fsverity_info::tree_params.hash_alg->tfm is a crypto_ahash object that's internal to and is allocated by the crypto subsystem. So by using READ_ONCE() for ->i_verity_info, we're relying on internal implementation details of the crypto subsystem. Remove this fragile assumption by using smp_load_acquire() instead. Also fix the cmpxchg logic to correctly execute an ACQUIRE barrier when losing the cmpxchg race, since cmpxchg doesn't guarantee a memory barrier on failure. (Note: I haven't seen any real-world problems here. This change is just fixing the code to be guaranteed correct and less fragile.) Fixes: fd2d1acfcadf ("fs-verity: add the hook for file ->open()") Link: https://lore.kernel.org/r/20200721225920.114347-6-ebiggers@kernel.org Signed-off-by: Eric Biggers commit ab673b987488c4fab7a0bc4824a48211f9d910e3 Author: Eric Biggers Date: Tue Jul 21 15:59:19 2020 -0700 fscrypt: use smp_load_acquire() for ->i_crypt_info Normally smp_store_release() or cmpxchg_release() is paired with smp_load_acquire(). Sometimes smp_load_acquire() can be replaced with the more lightweight READ_ONCE(). However, for this to be safe, all the published memory must only be accessed in a way that involves the pointer itself. This may not be the case if allocating the object also involves initializing a static or global variable, for example. fscrypt_info includes various sub-objects which are internal to and are allocated by other kernel subsystems such as keyrings and crypto. So by using READ_ONCE() for ->i_crypt_info, we're relying on internal implementation details of these other kernel subsystems. Remove this fragile assumption by using smp_load_acquire() instead. (Note: I haven't seen any real-world problems here. This change is just fixing the code to be guaranteed correct and less fragile.) Fixes: e37a784d8b6a ("fscrypt: use READ_ONCE() to access ->i_crypt_info") Link: https://lore.kernel.org/r/20200721225920.114347-5-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 777afe4e68d7ac37711d36098bea65650ec305a0 Author: Eric Biggers Date: Tue Jul 21 15:59:18 2020 -0700 fscrypt: use smp_load_acquire() for ->s_master_keys Normally smp_store_release() or cmpxchg_release() is paired with smp_load_acquire(). Sometimes smp_load_acquire() can be replaced with the more lightweight READ_ONCE(). However, for this to be safe, all the published memory must only be accessed in a way that involves the pointer itself. This may not be the case if allocating the object also involves initializing a static or global variable, for example. super_block::s_master_keys is a keyring, which is internal to and is allocated by the keyrings subsystem. By using READ_ONCE() for it, we're relying on internal implementation details of the keyrings subsystem. Remove this fragile assumption by using smp_load_acquire() instead. (Note: I haven't seen any real-world problems here. This change is just fixing the code to be guaranteed correct and less fragile.) Fixes: 22d94f493bfb ("fscrypt: add FS_IOC_ADD_ENCRYPTION_KEY ioctl") Link: https://lore.kernel.org/r/20200721225920.114347-4-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 97c6327f7192d7312eabc033b26a41ad6816496c Author: Eric Biggers Date: Tue Jul 21 15:59:17 2020 -0700 fscrypt: use smp_load_acquire() for fscrypt_prepared_key Normally smp_store_release() or cmpxchg_release() is paired with smp_load_acquire(). Sometimes smp_load_acquire() can be replaced with the more lightweight READ_ONCE(). However, for this to be safe, all the published memory must only be accessed in a way that involves the pointer itself. This may not be the case if allocating the object also involves initializing a static or global variable, for example. fscrypt_prepared_key includes a pointer to a crypto_skcipher object, which is internal to and is allocated by the crypto subsystem. By using READ_ONCE() for it, we're relying on internal implementation details of the crypto subsystem. Remove this fragile assumption by using smp_load_acquire() instead. (Note: I haven't seen any real-world problems here. This change is just fixing the code to be guaranteed correct and less fragile.) Fixes: 5fee36095cda ("fscrypt: add inline encryption support") Cc: Satya Tangirala Link: https://lore.kernel.org/r/20200721225920.114347-3-ebiggers@kernel.org Signed-off-by: Eric Biggers commit bd0d97b7191e8f3573681fa854fdb04c1a970c1e Author: Eric Biggers Date: Tue Jul 21 15:59:16 2020 -0700 fscrypt: switch fscrypt_do_sha256() to use the SHA-256 library fscrypt_do_sha256() is only used for hashing encrypted filenames to create no-key tokens, which isn't performance-critical. Therefore a C implementation of SHA-256 is sufficient. Also, the logic to create no-key tokens is always potentially needed. This differs from fscrypt's other dependencies on crypto API algorithms, which are conditionally needed depending on what encryption policies userspace is using. Therefore, for fscrypt there isn't much benefit to allowing SHA-256 to be a loadable module. So, make fscrypt_do_sha256() use the SHA-256 library instead of the crypto_shash API. This is much simpler, since it avoids having to implement one-time-init (which is hard to do correctly, and in fact was implemented incorrectly) and handle failures to allocate the crypto_shash object. Fixes: edc440e3d27f ("fscrypt: improve format of no-key names") Cc: Daniel Rosenberg Link: https://lore.kernel.org/r/20200721225920.114347-2-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 4c8024f7312822c777eaaa2be4ff68c11ec3bcc0 Merge: d4eae993fc453 0e3a3f6dacf01 Author: David S. Miller Date: Tue Jul 21 15:59:04 2020 -0700 Merge branch 'ena-driver-new-features' Arthur Kiyanovski says: ==================== ENA driver new features V4 changes: ----------- Add smp_rmb() to "net: ena: avoid unnecessary rearming of interrupt vector when busy-polling" to adhere to the linux kernel memory model, and update the commit message accordingly. V3 changes: ----------- 1. Add "net: ena: enable support of rss hash key and function changes" patch again, with more explanations why it should be in net-next in commit message. 2. Add synchronization considerations to "net: ena: avoid unnecessary rearming of interrupt vector when busy-polling" V2 changes: ----------- 1. Update commit messages of 2 patches to be more verbose. 2. Remove "net: ena: enable support of rss hash key and function changes" patch. Will be resubmitted net. V1 cover letter: ---------------- This patchset contains performance improvements, support for new devices and functionality: 1. Support for upcoming ENA devices 2. Avoid unnecessary IRQ unmasking in busy poll to reduce interrupt rate 3. Enabling device support for RSS function and key manipulation 4. Support for NIC-based traffic mirroring (SPAN port) 5. Additional PCI device ID 6. Cosmetic changes ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 0e3a3f6dacf01cbad9ecc26149ffe8cda3137540 Author: Arthur Kiyanovski Date: Tue Jul 21 16:38:11 2020 +0300 net: ena: support new LLQ acceleration mode New devices add a new hardware acceleration engine, which adds some restrictions to the driver. Metadata descriptor must be present for each packet and the maximum burst size between two doorbells is now limited to a number advertised by the device. This patch adds: 1. A handshake protocol between the driver and the device, so the device will enable the accelerated queues only when both sides support it. 2. The driver support for the new acceleration engine: 2.1. Send metadata descriptor for each Tx packet. 2.2. Limit the number of packets sent between doorbells.(*) (*) A previous driver implementation of this feature was comitted in commit 05d62ca218f8 ("net: ena: add handling of llq max tx burst size") however the design of the interface between the driver and device changed since then. This change is reflected in this commit. Signed-off-by: Netanel Belgazal Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit c29efeae37077f4bcb2ecd710fc66ca72c43ec79 Author: Arthur Kiyanovski Date: Tue Jul 21 16:38:10 2020 +0300 net: ena: move llq configuration from ena_probe to ena_device_init() When the ENA device resets to recover from some error state, all LLQ configuration values are reset to their defaults, because LLQ is initialized only once during ena_probe(). Changes in this commit: 1. Move the LLQ configuration process into ena_init_device() which is called from both ena_probe() and ena_restore_device(). This way, LLQ setup configurations that are different from the default values will survive resets. 2. Extract the LLQ bar mapping to ena_map_llq_bar(), and call once in the lifetime of the driver from ena_probe(), since there is no need to unmap and map the LLQ bar again every reset. 3. Map the LLQ bar if it exists, regardless if initialization of LLQ placement policy (ENA_ADMIN_PLACEMENT_POLICY_DEV) succeeded or not. Initialization might fail the first time, falling back to the ENA_ADMIN_PLACEMENT_POLICY_HOST placement policy, but later succeed after device reset, in which case the LLQ bar needs to be mapped already. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 0ee60edf4669cd8c466a532c233fcd6281da9892 Author: Arthur Kiyanovski Date: Tue Jul 21 16:38:09 2020 +0300 net: ena: enable support of rss hash key and function changes Add the rss_configurable_function_key bit to driver_supported_feature. This bit tells the device that the driver in question supports the retrieving and updating of RSS function and hash key, and therefore the device should allow RSS function and key manipulation. This commit turns on device support for hash key and RSS function management. Without this commit this feature is turned off at the device and appears to the user as unsupported. This commit concludes the following series of already merged commits: commit 0af3c4e2eab8 ("net: ena: changes to RSS hash key allocation") commit c1bd17e51c71 ("net: ena: change default RSS hash function to Toeplitz") commit f66c2ea3b18a ("net: ena: allow setting the hash function without changing the key") commit e9a1de378dd4 ("net: ena: fix error returning in ena_com_get_hash_function()") commit 80f8443fcdaa ("net: ena: avoid unnecessary admin command when RSS function set fails") commit 6a4f7dc82d1e ("net: ena: rss: do not allocate key when not supported") commit 0d1c3de7b8c7 ("net: ena: fix incorrect default RSS key") The above commits represent the last part of the implementation of this feature, and with them merged the feature can be enabled in the device. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 0f505c604e4ffd2ddc7cf06583ac169c443b8f68 Author: Arthur Kiyanovski Date: Tue Jul 21 16:38:08 2020 +0300 net: ena: add support for traffic mirroring Add support for traffic mirroring, where the hardware reads the buffer from the instance memory directly. Traffic Mirroring needs access to the rx buffers in the instance. To have this access, this patch: 1. Changes the code to map and unmap the rx buffers bidirectionally. 2. Enables the relevant bit in driver_supported_features to indicate to the FW that this driver supports traffic mirroring. Rx completion is not generated until mirroring is done to avoid the situation where the driver changes the buffer before it is mirrored. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 0dcec68651f2162290750aae48fd7a0fdace0c66 Author: Arthur Kiyanovski Date: Tue Jul 21 16:38:07 2020 +0300 net: ena: cosmetic: change ena_com_stats_admin stats to u64 The size of the admin statistics in ena_com_stats_admin is changed from 32bit to 64bit so to align with the sizes of the other statistics in the driver (i.e. rx_stats, tx_stats and ena_stats_dev). This is done as part of an effort to create a unified API to read statistics. Signed-off-by: Shay Agroskin Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 79890d3f3cde559e0fc5a50cf77176dfcf64b6c9 Author: Arthur Kiyanovski Date: Tue Jul 21 16:38:06 2020 +0300 net: ena: cosmetic: satisfy gcc warning gcc 4.8 reports a warning when initializing with = {0}. Dropping the "0" from the braces fixes the issue. This fix is not ANSI compatible but is allowed by gcc. Signed-off-by: Sameeh Jubran Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 866032ab4d16cffa3ad1a6a3fb89d374656161db Author: Arthur Kiyanovski Date: Tue Jul 21 16:38:05 2020 +0300 net: ena: add reserved PCI device ID Add a reserved PCI device ID to the driver's table Used for internal testing purposes. Signed-off-by: Arthur Kiyanovski Signed-off-by: David S. Miller commit 1e5ae3507225f5560e45817155e77f496473850c Author: Arthur Kiyanovski Date: Tue Jul 21 16:38:04 2020 +0300 net: ena: avoid unnecessary rearming of interrupt vector when busy-polling For an overview of the race created by this patch goto synchronization label. In napi busy-poll mode, the kernel invokes the napi handler of the device repeatedly to poll the NIC's receive queues. This process repeats until a timeout, specific for each connection, is up. By polling packets in busy-poll mode the user may gain lower latency and higher throughput (since the kernel no longer waits for interrupts to poll the queues) in expense of CPU usage. Upon completing a napi routine, the driver checks whether the routine was called by an interrupt handler. If so, the driver re-enables interrupts for the device. This is needed since an interrupt routine invocation disables future invocations until explicitly re-enabled. The driver avoids re-enabling the interrupts if they were not disabled in the first place (e.g. if driver in busy mode). Originally, the driver checked whether interrupt re-enabling is needed by reading the 'ena_napi->unmask_interrupt' variable. This atomic variable was set upon interrupt and cleared after re-enabling it. In the 4.10 Linux version, the 'napi_complete_done' call was changed so that it returns 'false' when device should not re-enable interrupts, and 'true' otherwise. The change includes reading the "NAPIF_STATE_IN_BUSY_POLL" flag to check if the napi call is in busy-poll mode, and if so, return 'false'. The driver was changed to re-enable interrupts according to this routine's return value. The Linux community rejected the use of the 'ena_napi->unmaunmask_interrupt' variable to determine whether unmasking is needed, and urged to use napi_napi_complete_done() return value solely. See https://lore.kernel.org/patchwork/patch/741149/ for more details As explained, a busy-poll session exists for a specified timeout value, after which it exits the busy-poll mode and re-enters it later. This leads to many invocations of the napi handler where napi_complete_done() false indicates that interrupts should be re-enabled. This creates a bug in which the interrupts are re-enabled unnecessarily. To reproduce this bug: 1) echo 50 | sudo tee /proc/sys/net/core/busy_poll 2) echo 50 | sudo tee /proc/sys/net/core/busy_read 3) Add counters that check whether 'ena_unmask_interrupt(tx_ring, rx_ring);' is called without disabling the interrupts in the first place (i.e. with calling the interrupt routine ena_intr_msix_io()) Steps 1+2 enable busy-poll as the default mode for new connections. The busy poll routine rearms the interrupts after every session by design, and so we need to add an extra check that the interrupts were masked in the first place. synchronization: This patch introduces a race between the interrupt handler ena_intr_msix_io() and the napi routine ena_io_poll(). Some macros and instruction were added to prevent this race from leaving the interrupts masked. The following specifies the different race scenarios in this patch: 1) interrupt handler and napi routine run sequentially i) interrupt handler is called, sets 'interrupts_masked' flag and successfully schedules the napi handler via softirq. In this scenario the napi routine might not see the flag change for several reasons: a) The flag is stored in a register by the compiler. For this case the WRITE_ONCE macro which prevents this. b) The compiler might reorder the instruction. For this the smp_wmb() instruction was used which implies a compiler memory barrier. c) On archs with weak consistency model (like ARM64) the napi routine might be scheduled and start running before the flag STORE instruction is committed to cache/memory. To ensure this doesn't happen, the smp_wmb() instruction was added. It ensures that the flag set instruction is committed before scheduling napi. ii) compiler reorders the flag's value check in the 'if' with the flag set in the napi routine. This scenario is prevented by smp_rmb() call after the flag check. 2) interrupt handler and napi routine run in parallel (can happen when busy poll routine invokes the napi handler) i) interrupt handler sets the flag in one core, while the napi routine reads it in another core. This scenario also is divided into two cases: a) napi_complete_done() doesn't finish running, in which case napi_sched() would just set NAPIF_STATE_MISSED and the napi routine would reschedule itself without changing the flag's value. b) napi_complete_done() finishes running. In this case the napi routine might override the flag's value. This doesn't present any rise since it later unmasks the interrupt vector. Signed-off-by: Shay Agroskin Signed-off-by: Arthur Kiyanovski Cc: Eric Dumazet Signed-off-by: David S. Miller commit d4eae993fc45398526aed683e225d6fa713f8ddf Author: Yuval Basson Date: Tue Jul 21 14:34:26 2020 +0300 qed: Fix ILT and XRCD bitmap memory leaks - Free ILT lines used for XRC-SRQ's contexts. - Free XRCD bitmap Fixes: b8204ad878ce7 ("qed: changes to ILT to support XRC") Fixes: 7bfb399eca460 ("qed: Add XRC to RoCE") Signed-off-by: Michal Kalderon Signed-off-by: Yuval Basson Signed-off-by: David S. Miller commit 11de5770c74c673dc16ff6b7cd495eeef358f6c1 Merge: ccbc6dacacb45 93eaceb0fcf87 Author: David S. Miller Date: Tue Jul 21 15:46:51 2020 -0700 Merge branch 'Phylink-PCS-updates' Russell King says: ==================== Phylink PCS updates This series updates the rudimentary phylink PCS support with the results of the last four months of development of that. Phylink PCS support was initially added back at the end of March, when it became clear that the current approach of treating everything at the MAC end as being part of the MAC was inadequate. However, this rudimentary implementation was fine initially for mvneta and similar, but in practice had a fair number of issues, particularly when ethtool interfaces were used to change various link properties. It became apparent that relying on the phylink_config structure for the PCS was also bad when it became clear that the same PCS was used in DSA drivers as well as in NXPs other offerings, and there was a desire to re-use that code. It also became apparent that splitting the "configuration" step on an interface mode configuration between the MAC and PCS using just mac_config() and pcs_config() methods was not sufficient for some setups, as the MAC needed to be "taken down" prior to making changes, and once all settings were complete, the MAC could only then be resumed. This series addresses these points, progressing PCS support, and has been developed with mvneta and DPAA2 setups, with work on both those drivers to prove this approach. It has been rigorously tested with mvneta, as that provides the most flexibility for testing the various code paths. To solve the phylink_config reuse problem, we introduce a struct phylink_pcs, which contains the minimal information necessary, and it is intended that this is embedded in the PCS private data structure. To solve the interface mode configuration problem, we introduce two new MAC methods, mac_prepare() and mac_finish() which wrap the entire interface mode configuration only. This has the additional benefit of relieving MAC drivers from working out whether an interface change has occurred, and whether they need to do some major work. I have not yet updated all the interface documentation for these changes yet, that work remains, but this patch set is provided in the hope that those working on PCS support in NXP will find this useful. Since there is a lot of change here, this is the reason why I strongly advise that everyone has converted to the mac_link_up() way of configuring the link parameters when the link comes up, rather than the old way of using mac_config() - especially as splitting the PCS changes how and when phylink calls mac_config(). Although no change for existing users is intended, that is something I no longer am able to test. Changes since RFC: - fix bisect build failure - add patch to use config.an_enabled - rename phylink_config_interface to phylink_major_reconfig - add expanded documentation for phylink_set_pcs() ==================== Signed-off-by: David S. Miller commit 93eaceb0fcf87b7f70924f9da3ec27e3c73be53d Author: Russell King Date: Tue Jul 21 12:04:51 2020 +0100 net: phylink: add interface to configure clause 22 PCS PHY Add an interface to configure the advertisement for a clause 22 PCS PHY, and set the AN enable flag in the BMCR appropriately. Reviewed-by: Ioana Ciornei Signed-off-by: Russell King Signed-off-by: David S. Miller commit 7137e18f6f889a67046d5004e1690a32d7d2108d Author: Russell King Date: Tue Jul 21 12:04:46 2020 +0100 net: phylink: add struct phylink_pcs Add a way for MAC PCS to have private data while keeping independence from struct phylink_config, which is used for the MAC itself. We need this independence as we will have stand-alone code for PCS that is independent of the MAC. Introduce struct phylink_pcs, which is designed to be embedded in a driver private data structure. This structure does not include a mdio_device as there are PCS implementations such as the Marvell DSA and network drivers where this is not necessary. Reviewed-by: Ioana Ciornei Signed-off-by: Russell King Signed-off-by: David S. Miller commit b7ad14c2fe2d4b2abee491e3adfa3d0123aa2d8c Author: Russell King Date: Tue Jul 21 12:04:41 2020 +0100 net: phylink: re-implement interface configuration with PCS With PCS support, how we implement interface reconfiguration (or other major reconfiguration) is not up to the job; we end up reconfiguring the PCS for an interface change while the link could potentially be up. In order to solve this, add two additional MAC methods for major configuration, one to prepare for the change, and one to finish the change. This allows mvneta and mvpp2 to shutdown what they require prior to the MAC and PCS configuration calls, and then restart as appropriate. This impacts ksettings_set(), which now needs to identify whether the change is a minor tweak to the advertisement masks or whether the interface mode has changed, and call the appropriate function for that update. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 1571e700fd610c39e8b50b0110b1ee9badb2fe6a Author: Russell King Date: Tue Jul 21 12:04:36 2020 +0100 net: phylink: in-band pause mode advertisement update for PCS Re-code the pause in-band advertisement update in light of the addition of PCS support, so that we perform the minimum required; only the PCS configuration function needs to be called in this case, followed by the request to trigger a restart of negotiation if the programmed advertisement changed. We need to change the pcs_config() signature to pass whether resolved pause should be passed to the MAC for setups such as mvneta and mvpp2 where doing so overrides the MAC manual flow controls. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 1e1bf14a89c0f5d11b62a8974dc53862e214b131 Author: Russell King Date: Tue Jul 21 12:04:31 2020 +0100 net: phylink: simplify fixed-link case for ksettings_set method For fixed links, we only allow the current settings, so this should be a matter of merely rejecting an attempt to change the settings. If the settings agree, then there is nothing more we need to do. Reviewed-by: Ioana Ciornei Signed-off-by: Russell King Signed-off-by: David S. Miller commit a83c8829d18d47939980db16a0ec79fa365ce6b0 Author: Russell King Date: Tue Jul 21 12:04:26 2020 +0100 net: phylink: use config.an_enabled in ksettings_set method Rather than recomputing whether AN is enabled, use config.an_enabled. Suggested-by: Ioana Ciornei Signed-off-by: Russell King Signed-off-by: David S. Miller commit cbc1bb1e4689ce1e6654485b6865f10b98f6ddb4 Author: Russell King Date: Tue Jul 21 12:04:21 2020 +0100 net: phylink: simplify phy case for ksettings_set method When we have a PHY attached, an ethtool ksettings_set() call only really needs to call through to the phylib equivalent; phylib will call back to us when the link changes so we can update our state. Therefore, we can bypass most of our ksettings_set() call for this case. Reviewed-by: Ioana Ciornei Signed-off-by: Russell King Signed-off-by: David S. Miller commit c8cab719cc64f8999503aff584a7bef7edb28e24 Author: Russell King Date: Tue Jul 21 12:04:16 2020 +0100 net: phylink: simplify ksettings_set() implementation Simplify the ksettings_set() implementation to look more like phylib's implementation; use a switch() for validating the autoneg setting, and use the linkmode_modify() helper to set the autoneg bit in the advertisement mask. Reviewed-by: Ioana Ciornei Signed-off-by: Russell King Signed-off-by: David S. Miller commit 7cceb599d15d6639b1298ae400c26d822148e86f Author: Russell King Date: Tue Jul 21 12:04:10 2020 +0100 net: phylink: avoid mac_config calls Avoid calling mac_config() when using split PCS, and the interface remains the same. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 5005b163440f3fe18b434a20e8944dad508a15e8 Author: Russell King Date: Tue Jul 21 12:04:05 2020 +0100 net: phylink: update PCS when changing interface during resolution The only PHYs that are used with phylink which change their interface are the BCM84881 and MV88X3310 family, both of which only change their interface modes on link-up events. This will break when drivers are converted to split-PCS. Fix this. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 16319a7d31b5df881ab61c9a9e8b4265355d157f Author: Russell King Date: Tue Jul 21 12:04:00 2020 +0100 net: phylink: ensure link is down when changing interface The only PHYs that are used with phylink which change their interface are the BCM84881 and MV88X3310 family, both of which only change their interface modes on link-up events. However, rather than relying upon this behaviour by the PHY, we should give a stronger guarantee when resolving that the link will be down whenever we change the interface mode. This patch implements that stronger guarantee for resolve. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 319bfafe3494b6fd6cdf48dcdc9d17cf2a77d405 Author: Russell King Date: Tue Jul 21 12:03:55 2020 +0100 net: phylink: rearrange resolve mac_config() call Use a boolean to indicate whether mac_config() should be called during a resolution. This allows resolution to have a single location where mac_config() will be called, which will allow us to make decisions about how and what we do. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit b06e5cac213cffbbf642d7e46e06719e02c75a4b Author: Russell King Date: Tue Jul 21 12:03:50 2020 +0100 net: phylink: rejig link state tracking Rejig the link state tracking, so that we can use the current state in a future patch. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 1ceb7ee7a6e7a8195fd1fbc3c7d554305bc26607 Author: Russell King Date: Tue Jul 21 12:03:45 2020 +0100 net: phylink: update ethtool reporting for fixed-link modes Comparing the ethtool output from phylink and non-phylink fixed-link setups shows that we have some differences: - The "auto-negotiation" fields are different; phylink reports these as "No", non-phylink reports these as "Yes" for the supported and advertising masks. - The link partner advertisement is set to the link speed with non- phylink, but phylink leaves this unset, causing all link partner fields to be omitted. The phylink ethtool output also disagrees with the software emulated PHY dump via the MII registers. Update the phylink fixed-link parsing code so that we better reflect the behaviour of the non-phylink code that this facility replaces, and bring the ethtool interface more into line with the report from via the MII interface. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 43a10bf49f11a952ea927beceb9f6ee866ff1523 Merge: ad0ddbb9ba3d5 f74028e159bb8 Author: Mark Brown Date: Tue Jul 21 23:44:59 2020 +0100 Merge series "Add ASoC AHUB components for Tegra210 and later" from Sameer Pujar : Overview ======== Audio Processing Engine (APE) comprises of Audio DMA (ADMA) and Audio Hub (AHUB) unit. AHUB is a collection of hardware accelerators for audio pre-processing and post-processing. It also includes a programmable full crossbar for routing audio data across these accelerators. This series exposes some of these below mentioned HW devices as ASoC components for Tegra platforms from Tegra210 onwards. * ADMAIF : The interface between ADMA and AHUB * XBAR : Crossbar for routing audio samples across various modules * I2S : Inter-IC Sound Controller * DMIC : Digital Microphone * DSPK : Digital Speaker Following is the summary of current series. * Add YAML DT binding documentation for above mentioned modules. * Helper function for ACIF programming is exposed for Tegra210 and later. * Add ASoC driver components for each of the above modules. * Build ACONNECT and ADMA drivers which are essential to realize audio use case. * Add DT entries for above components for Tegra210, Tegra186 and Tegra194. As per the suggestion in [0] audio graph based sound card support is pushed in a separate series. [0] https://lkml.org/lkml/2020/6/27/4 Changelog ========= v4 -> v5 -------- * Common changes - simple-card driver changes are dropped. Changes are migrated to audio graph card and are moved to a separate series as suggested. - '#sound-dai-cells' property is not needed for planned audio graph card Hence dropped from documentation and related DT binding of component drivers. - CIF and DAP DAIs are added for I/O drivers (DMIC, DSPK, I2S) to represent DAI links using audio graph card. Similary DAIs are added in AHUB driver to describe endpoints in audio crossbar. Routing is updated to reflect the same in drivers. v3 -> v4 -------- * [1/23] "ASoC: dt-bindings: tegra: Add DT bindings for Tegra210" - Removed multiple examples and retained one example per doc - Fixed as per inputs on the previous series - Tested bindings with 'make dt_binding_check/dtbs_check' * [2/23] "ASoC: tegra: Add support for CIF programming" - No change * Common changes (for patch [3/10] to [7/10]) - Mixer control overrides, for PCM parameters (rate, channel, bits), in each driver are dropped. - Updated routing as per DPCM usage - Minor changes related to formatting * New changes (patch [8/23] to [18/23] and patch [23/23]) - Based on discussions in following threads DPCM is used for Tegra Audio. https://lkml.org/lkml/2020/2/20/91 https://lkml.org/lkml/2020/4/30/519 - The simple-card driver is used for Tegra Audio and accordingly some enhancements are made in simple-card and core drivers. - Patch [8/23] to [18/23] are related to simple-card and core changes. - Patch [23/23] adds sound card support to realize complete audio path. This is based on simple-card driver with proposed enhancements. - Re-ordered patches depending on above v2 -> v3 -------- * [1/10] "dt-bindings: sound: tegra: add DT binding for AHUB - Updated licence - Removed redundancy w.r.t items/const/enum - Added constraints wherever needed with "pattern" property * [2/10] "ASoC: tegra: add support for CIF programming" - Removed tegra_cif.c - Instead added inline helper function in tegra_cif.h * common changes (for patch [3/10] to [7/10]) - Replace LATE system calls with Normal sleep - Remove explicit RPM suspend in driver remove() call - Use devm_kzalloc() instead of devm_kcalloc() for single element - Replace 'ret' with 'err' for better reading - Consistent error printing style across drivers - Minor formating fixes * [8/10] "arm64: tegra: add AHUB components for few Tegra chips" - no change * [9/10] "arm64: tegra: enable AHUB modules for few Tegra chips" - no change * [10/10] "arm64: defconfig: enable AHUB components for Tegra210 and later" (New patch) - Enables ACONNECT and AHUB components. With this AHUB and components are registered with ASoC core. v1 -> v2 -------- * [1/9] "dt-bindings: sound: tegra: add DT binding for AHUB" - no changes * [2/9] "ASoC: tegra: add support for CIF programming" - removed CIF programming changes for legacy chips. - this patch now exposes helper function for CIF programming, which can be used on Tegra210 later. - later tegra_cif.c can be extended for legacy chips as well. - updated commit message accordingly * [3/9] "ASoC: tegra: add Tegra210 based DMIC driver" - removed unnecessary initialization of 'ret' in probe() * [4/9] "ASoC: tegra: add Tegra210 based I2S driver" - removed unnecessary initialization of 'ret' in probe() - fixed indentation - added consistent bracing for if-else clauses - updated 'rx_fifo_th' type to 'unsigned int' - used BIT() macro for defines like '1 << {x}' in tegra210_i2s.h * [5/9] "ASoC: tegra: add Tegra210 based AHUB driver" - used of_device_get_match_data() to get 'soc_data' and removed explicit of_match_device() - used devm_platform_ioremap_resource() and removed explicit platform_get_resource() - fixed indentation for devm_snd_soc_register_component() - updated commit message - updated commit message to reflect compatible binding for Tegra186 and Tegra194. * [6/9] "ASoC: tegra: add Tegra186 based DSPK driver" - removed unnecessary initialization of 'ret' in probe() - updated 'max_th' to 'unsigned int' - shortened lengthy macro names to avoid wrapping in tegra186_dspk_wr_reg() and to be consistent * [7/9] "ASoC: tegra: add Tegra210 based ADMAIF driver" - used of_device_get_match_data() and removed explicit of_match_device() - used BIT() macro for defines like '1 << {x}' in tegra210_admaif.h - updated commit message to reflect compatible binding for Tegra186 and Tegra194. * [8/9] "arm64: tegra: add AHUB components for few Tegra chips" - no change * [9/9] "arm64: tegra: enable AHUB modules for few Tegra chips" - no change * common changes for patch [3/9] to [7/9] - sorted headers in alphabetical order - moved MODULE_DEVICE_TABLE() right below *_of_match table - removed macro DRV_NAME - removed explicit 'owner' field from platform_driver structure - added 'const' to snd_soc_dai_ops structure Sameer Pujar (11): ASoC: dt-bindings: tegra: Add DT bindings for Tegra210 ASoC: tegra: Add support for CIF programming ASoC: tegra: Add Tegra210 based DMIC driver ASoC: tegra: Add Tegra210 based I2S driver ASoC: tegra: Add Tegra210 based AHUB driver ASoC: tegra: Add Tegra186 based DSPK driver ASoC: tegra: Add Tegra210 based ADMAIF driver arm64: defconfig: Build AHUB component drivers arm64: defconfig: Build ADMA and ACONNECT driver arm64: tegra: Enable ACONNECT, ADMA and AGIC on Jetson Nano arm64: tegra: Add DT binding for AHUB components .../bindings/sound/nvidia,tegra186-dspk.yaml | 83 +++ .../bindings/sound/nvidia,tegra210-admaif.yaml | 111 +++ .../bindings/sound/nvidia,tegra210-ahub.yaml | 136 ++++ .../bindings/sound/nvidia,tegra210-dmic.yaml | 83 +++ .../bindings/sound/nvidia,tegra210-i2s.yaml | 101 +++ arch/arm64/boot/dts/nvidia/tegra186.dtsi | 217 +++++- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 225 +++++- arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 12 + arch/arm64/boot/dts/nvidia/tegra210.dtsi | 140 ++++ arch/arm64/configs/defconfig | 8 + sound/soc/tegra/Kconfig | 56 ++ sound/soc/tegra/Makefile | 10 + sound/soc/tegra/tegra186_dspk.c | 442 +++++++++++ sound/soc/tegra/tegra186_dspk.h | 70 ++ sound/soc/tegra/tegra210_admaif.c | 800 ++++++++++++++++++++ sound/soc/tegra/tegra210_admaif.h | 162 ++++ sound/soc/tegra/tegra210_ahub.c | 676 +++++++++++++++++ sound/soc/tegra/tegra210_ahub.h | 127 ++++ sound/soc/tegra/tegra210_dmic.c | 455 ++++++++++++ sound/soc/tegra/tegra210_dmic.h | 82 +++ sound/soc/tegra/tegra210_i2s.c | 812 +++++++++++++++++++++ sound/soc/tegra/tegra210_i2s.h | 126 ++++ sound/soc/tegra/tegra_cif.h | 65 ++ sound/soc/tegra/tegra_pcm.c | 235 +++++- sound/soc/tegra/tegra_pcm.h | 21 +- 25 files changed, 5251 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml create mode 100644 sound/soc/tegra/tegra186_dspk.c create mode 100644 sound/soc/tegra/tegra186_dspk.h create mode 100644 sound/soc/tegra/tegra210_admaif.c create mode 100644 sound/soc/tegra/tegra210_admaif.h create mode 100644 sound/soc/tegra/tegra210_ahub.c create mode 100644 sound/soc/tegra/tegra210_ahub.h create mode 100644 sound/soc/tegra/tegra210_dmic.c create mode 100644 sound/soc/tegra/tegra210_dmic.h create mode 100644 sound/soc/tegra/tegra210_i2s.c create mode 100644 sound/soc/tegra/tegra210_i2s.h create mode 100644 sound/soc/tegra/tegra_cif.h -- 2.7.4 commit affe93dd5b35bb0e7b0aa0505ae432dd0ac72c3f Author: Serge Semin Date: Tue Jul 21 23:39:51 2020 +0300 spi: dw-dma: Fix Tx DMA channel working too fast It turns out having a Rx DMA channel serviced with higher priority than a Tx DMA channel is not enough to provide a well balanced DMA-based SPI transfer interface. There might still be moments when the Tx DMA channel is occasionally handled faster than the Rx DMA channel. That in its turn will eventually cause the SPI Rx FIFO overflow if SPI bus speed is high enough to fill the SPI Rx FIFO in before it's cleared by the Rx DMA channel. That's why having the DMA-based SPI Tx interface too optimized is the errors prone, so the commit 0b2b66514fc9 ("spi: dw: Use DMA max burst to set the request thresholds") though being perfectly normal from the standard functionality point of view implicitly introduced the problem described above. In order to fix that the Tx DMA activity is intentionally slowed down by limiting the SPI Tx FIFO depth with a value twice bigger than the Tx burst length calculated earlier by the dw_spi_dma_maxburst_init() method. Fixes: 0b2b66514fc9 ("spi: dw: Use DMA max burst to set the request thresholds") Signed-off-by: Serge Semin Reviewed-by: Andy Shevchenko Cc: Andy Shevchenko Cc: Alexey Malahov Cc: Feng Tang Link: https://lore.kernel.org/r/20200721203951.2159-1-Sergey.Semin@baikalelectronics.ru Signed-off-by: Mark Brown commit ccbc6dacacb45df8079029d965a6ffdb89d6078e Merge: c17e317802d8d ae0e6a5d16271 Author: David S. Miller Date: Tue Jul 21 15:38:30 2020 -0700 Merge branch 'enetc-Add-adaptive-interrupt-coalescing' Claudiu Manoil says: ==================== enetc: Add adaptive interrupt coalescing Apart from some related cleanup patches, this set introduces in a straightforward way the support needed to enable and configure interrupt coalescing for ENETC. Patch 5 introduces the support needed for configuring the interrupt coalescing parameters and for switching between moderated (int. coalescing) and per-packet interrupt modes. When interrupt coalescing is enabled the Rx/Tx time thresholds are configurable, packet thresholds are fixed. To make this work reliably, patch 5 uses the traffic pause procedure introduced in patch 2. Patch 6 adds DIM (Dynamic Interrupt Moderation) to implement adaptive coalescing based on time thresholds, for the Rx 'channel'. On the Tx side a default optimal value is used instead, optimized for TCP traffic over 1G and 2.5G links. This default 'optimal' value can be overridden anytime via 'ethtool -C tx-usecs'. netperf -t TCP_MAERTS measurements show a significant CPU load reduction correlated w/ reduced interrupt rates. For the measurement results refer to the comments in patch 6. v2: Replaced Tx DIM with predefined optimal value, giving better results. This was also suggested by Jakub (cc). Switched order of patches 4 and 5, for better grouping. v3: minor cleanup/improvements ==================== Signed-off-by: David S. Miller commit ae0e6a5d16271f3a773bded360fa0eb0bdd25b10 Author: Claudiu Manoil Date: Tue Jul 21 10:55:22 2020 +0300 enetc: Add adaptive interrupt coalescing Use the generic dynamic interrupt moderation (dim) framework to implement adaptive interrupt coalescing on Rx. With the per-packet interrupt scheme, a high interrupt rate has been noted for moderate traffic flows leading to high CPU utilization. The 'dim' scheme implemented by the current patch addresses this issue improving CPU utilization while using minimal coalescing time thresholds in order to preserve a good latency. On the Tx side use an optimal time threshold value by default. This value has been optimized for Tx TCP streams at a rate of around 85kpps on a 1G link, at which rate half of the Tx ring size (128) gets filled in 1500 usecs. Scaling this down to 2.5G links yields the current value of 600 usecs, which is conservative and gives good enough results for 1G links too (see next). Below are some measurement results for before and after this patch (and related dependencies) basically, for a 2 ARM Cortex-A72 @1.3Ghz CPUs system (32 KB L1 data cache), using 60secs log netperf TCP stream tests @ 1Gbit link (maximum throughput): 1) 1 Rx TCP flow, both Rx and Tx processed by the same NAPI thread on the same CPU: CPU utilization int rate (ints/sec) Before: 50%-60% (over 50%) 92k After: 13%-22% 3.5k-12k Comment: Major CPU utilization improvement for a single flow Rx TCP flow (i.e. netperf -t TCP_MAERTS) on a single CPU. Usually settles under 16% for longer tests. 2) 4 Rx TCP flows + 4 Tx TCP flows (+ pings to check the latency): Total CPU utilization Total int rate (ints/sec) Before: ~80% (spikes to 90%) ~100k After: 60% (more steady) ~4k Comment: Important improvement for this load test, while the ping test outcome does not show any notable difference compared to before. Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit 915710812ba0ff11f49aa810025f91bbad8da20a Author: Claudiu Manoil Date: Tue Jul 21 10:55:21 2020 +0300 enetc: Add interrupt coalescing support Enable programming of the interrupt coalescing registers and allow manual configuration of the coalescing time thresholds via ethtool. Packet thresholds have been fixed to predetermined values as there's no point in making them run-time configurable, also anticipating the dynamic interrupt moderation (DIM) algorithm which uses fixed packet thresholds as well. If the interface is up when the operation mode of traffic interrupt events is changed by the user (i.e. switching from default per-packet interrupts to coalesced interrupts), the traffic needs to be paused in the process. This patch also prepares the ground for introducing DIM on Rx. Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit 058d9cfa6075463396e42fb7be64c015cbdda80b Author: Claudiu Manoil Date: Tue Jul 21 10:55:20 2020 +0300 enetc: Drop redundant ____cacheline_aligned_in_smp 'struct enetc_bdr' is already '____cacheline_aligned_in_smp'. Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit 12460a0abe53d2134a88386a857fca350d239620 Author: Claudiu Manoil Date: Tue Jul 21 10:55:19 2020 +0300 enetc: Fix interrupt coalescing register naming Interrupt coalescing registers naming in the current revision of the Ref Man (RM) is ICR, deprecating the ICIR name used in earlier (draft) versions of the RM. Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit bbb96dc7fa1a82cd176994e8af4d7b1079b22a52 Author: Claudiu Manoil Date: Tue Jul 21 10:55:18 2020 +0300 enetc: Factor out the traffic start/stop procedures A reliable traffic pause (and reconfiguration) procedure is needed to be able to safely make h/w configuration changes during run-time, like changing the mode in which the interrupts are operating (i.e. with or without coalescing), as opposed to making on-the-fly register updates that may be subject to h/w or s/w concurrency issues. To this end, the code responsible of the run-time device configurations that basically starts resp. stops the traffic flow through the device has been extracted from the the enetc_open/_close procedures, to the separate standalone enetc_start/_stop procedures. Traffic stop should be as graceful as possible, it lets the executing napi threads to to finish while the interrupts stay disabled. But since the napi thread will try to re-enable interrupts by clearing the device's unmask register, the enable_irq/ disable_irq API has been used to avoid this potential concurrency issue and make the traffic pause procedure more reliable. Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit 02293dd4b79ec16ae0f680222768fb1582f03b42 Author: Claudiu Manoil Date: Tue Jul 21 10:55:17 2020 +0300 enetc: Refine buffer descriptor ring sizes It's time to differentiate between Rx and Tx ring sizes. Not only Tx rings are processed differently than Rx rings, but their default number also differs - i.e. up to 8 Tx rings per device (8 traffic classes) vs. 2 Rx rings (one per CPU). So let's set Tx rings sizes to half the size of the Rx rings for now, to be conservative. The default ring sizes were decreased as well (to the next lower power of 2), to reduce the memory footprint, buffering etc., since the measurements I've made so far show that the rings are very unlikely to get full. This change also anticipates the introduction of the dynamic interrupt moderation (dim) algorithm which operates on maximum packet thresholds of 256 packets for Rx and 128 packets for Tx. Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit c17e317802d8d407cbb6b0d2cd3aaf2b3de068b1 Author: Jisheng Zhang Date: Tue Jul 21 15:01:57 2020 +0800 net: mdio-mux-gpio: use devm_gpiod_get_array() Use devm_gpiod_get_array() to simplify the error handling and exit code path. Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller commit f74028e159bb8e1de840d945af344bf93b59ada2 Author: Sameer Pujar Date: Sun Jul 19 10:31:26 2020 +0530 ASoC: tegra: Add Tegra210 based ADMAIF driver ADMAIF is the interface between ADMA and AHUB. Each ADMA channel that sends/receives data to/from AHUB must intreface through an ADMAIF channel. ADMA channel sending data to AHUB pairs with an ADMAIF Tx channel and similarly ADMA channel receiving data from AHUB pairs with an ADMAIF Rx channel. Buffer size is configurable for each ADMAIF channel, but currently SW uses default values. This patch registers ADMAIF driver with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes ADMAIF interfaces, which can be used to connect different components in the ASoC layer. Makefile and Kconfig support is added to allow to build the driver. The ADMAIF device can be enabled in the DT via "nvidia,tegra210-admaif" compatible binding. Tegra PCM driver is updated to expose required PCM interfaces and snd_pcm_ops callbacks. Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1595134890-16470-8-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 9165e1d70fb34ce438e78aad90408cfa86e4c2d0 Author: Tony Ambardar Date: Mon Jul 20 19:48:16 2020 -0700 bpftool: Use only nftw for file tree parsing The bpftool sources include code to walk file trees, but use multiple frameworks to do so: nftw and fts. While nftw conforms to POSIX/SUSv3 and is widely available, fts is not conformant and less common, especially on non-glibc systems. The inconsistent framework usage hampers maintenance and portability of bpftool, in particular for embedded systems. Standardize code usage by rewriting one fts-based function to use nftw and clean up some related function warnings by extending use of "const char *" arguments. This change helps in building bpftool against musl for OpenWrt. Also fix an unsafe call to dirname() by duplicating the string to pass, since some implementations may directly alter it. The same approach is used in libbpf.c. Signed-off-by: Tony Ambardar Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200721024817.13701-1-Tony.Ambardar@gmail.com commit 916a0edc43f03f86b13fbc9943e5dc936671ea6e Author: Martin Blumenstingl Date: Sun Jul 19 19:32:13 2020 +0200 arm64: dts: amlogic: meson-g12: add the Mali OPP table and use DVFS Add the OPP table for the Mali Bifrost GPU and drop the hardcoded initial clock configuration. This enables GPU DVFS and thus saves power when the GPU is not in use while still being able switch to a higher clock on demand. Set the GP0_PLL clock to 744MHz (which is the only frequency which cannot be derived from the FCLK dividers) as the clock driver avoids setting the parent clock rates so the HIFI PLL clock isn't changed (as that's reserved for audio). Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200719173213.639540-4-martin.blumenstingl@googlemail.com commit 8f16cfabbc0a6c52b114eca2ff8e95bb07949741 Author: Martin Blumenstingl Date: Sun Jul 19 19:32:12 2020 +0200 arm64: dts: amlogic: meson-gxm: add the Mali OPP table and use DVFS Add the OPP table for the Mali-T820 GPU and drop the hardcoded initial clock configuration. This enables GPU DVFS and thus saves power when the GPU is not in use while still being able switch to a higher clock on demand. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200719173213.639540-3-martin.blumenstingl@googlemail.com commit 46ffadc7e658277d7559899d7f641f14a3cfae8c Author: Martin Blumenstingl Date: Sun Jul 19 19:32:11 2020 +0200 arm64: dts: amlogic: meson-gx: add the Mali-450 OPP table and use DVFS Add the OPP table for the Mali-450 GPU and drop the hardcoded initial clock configuration. This enables GPU DVFS and thus saves power when the GPU is not in use while still being able switch to a higher clock on demand. Set the GP0_PLL clock to 744MHz (which is the only frequency which cannot be derived from the FCLK dividers) as the clock driver avoids setting the parent clock rates so the MPLL clocks aren't changed (as these are reserved for audio). The only exception to this is the GXL S805X package because the 744MHz OPP isn't working correctly there. While here, make most of meson-gxl-mali re-usable to reduce the amount of duplicate code between GXBB and GXL. This is more important now as we don't want to duplicate the GPU OPP table. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200719173213.639540-2-martin.blumenstingl@googlemail.com commit f26d8e7ac4cd8720f8acee25503cc824ce159e4a Merge: ea232b9ccccf2 54320dcaa2522 Author: Kevin Hilman Date: Tue Jul 21 14:12:19 2020 -0700 Merge tag 'amlogic-fixes' into v5.9/dt64 Amlogic fixes for v5.8-rc - misc DT fixes, and SoC ID fixes commit 53aab92dec447f93489e07924e310d605a389dea Author: Randy Dunlap Date: Tue Jul 21 10:17:16 2020 -0700 Input: synaptics-rmi4 - drop a duplicated word Drop the repeated word "to" in a comment. Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20200719003131.21050-1-rdunlap@infradead.org Signed-off-by: Dmitry Torokhov commit 175a1d84154d4077da437b873319bd094b266ab8 Author: Kathiravan T Date: Mon Jul 20 11:42:23 2020 +0530 regulator: convert QCOM SMD-RPM regulator document to YAML schema Convert qcom,smd-rpm-regulator.txt document to YAML schema Signed-off-by: Kathiravan T Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1595225543-12127-5-git-send-email-kathirav@codeaurora.org Signed-off-by: Mark Brown commit 3afdc59e4390487f04f2435b7e8a6289984e0a1e Author: Rishabh Bhatnagar Date: Thu Jul 16 15:20:35 2020 -0700 remoteproc: Add coredump debugfs entry Add coredump debugfs entry to configure the type of dump that will be collected during recovery. User can select between default or inline coredump functionality. Also coredump collection can be disabled through this interface. This functionality can be configured differently for different remote processors. Signed-off-by: Rishabh Bhatnagar Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Tested-by: Sibi Sankar Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/1594938035-7327-6-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson commit c97319881c9116dc7c56dd30115567b4078c4ba6 Author: Rishabh Bhatnagar Date: Thu Jul 16 15:20:34 2020 -0700 remoteproc: Add inline coredump functionality The current coredump implementation uses vmalloc area to copy all the segments. But this might put strain on low memory targets as the firmware size sometimes is in tens of MBs. The situation becomes worse if there are multiple remote processors undergoing recovery at the same time. This patch adds inline coredump functionality that avoids extra memory usage. This requires recovery to be halted until data is read by userspace and free function is called. Reviewed-by: Bjorn Andersson Reviewed-by: Sibi Sankar Reviewed-by: Mathieu Poirier Signed-off-by: Rishabh Bhatnagar Tested-by: Sibi Sankar Link: https://lore.kernel.org/r/1594938035-7327-5-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson commit 76abf9cea6c8215ea45b9359f11f0e30127c544a Author: Rishabh Bhatnagar Date: Thu Jul 16 15:20:33 2020 -0700 remoteproc: Pass size and offset as arguments to segment dump function Change the segment dump API signature to include size and offset arguments. Refactor the qcom_q6v5_mss driver to use these arguments while copying the segment. Doing this lays the ground work for "inline" coredump functionality being added in the next patch. Tested-by: Sibi Sankar Reviewed-by: Bjorn Andersson Reviewed-by: Sibi Sankar Reviewed-by: Mathieu Poirier Signed-off-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/1594938035-7327-4-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson commit 7ac516d39dd35450596a2dbb9dedea2c85eab1ea Author: Sibi Sankar Date: Thu Jul 16 15:20:32 2020 -0700 remoteproc: qcom_q6v5_mss: Replace mask based tracking with size In order to land inline coredump support for mss, the dump_segment function would need to support granularities less than the segment size. This is achieved by replacing mask based tracking with size. Reviewed-by: Bjorn Andersson Signed-off-by: Sibi Sankar Signed-off-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/1594938035-7327-3-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson commit 2c010cc378cdd89af649119d89adee3f443bfd2f Author: Rishabh Bhatnagar Date: Thu Jul 16 15:20:31 2020 -0700 remoteproc: Move coredump functionality to a new file Move all coredump functionality to an individual file. This is being done so that the current functionality can be extended in future patchsets. Signed-off-by: Rishabh Bhatnagar Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Reviewed-by: Sibi Sankar Tested-by: Sibi Sankar Link: https://lore.kernel.org/r/1594938035-7327-2-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson commit ea232b9ccccf2f55fe231441f3908c31c7136c4f Author: Christian Hewitt Date: Sun Jul 19 02:14:21 2020 +0000 arm64: dts: meson: add support for the WeTek Core 2 The WeTek Core2 is a commercial device based on the Amlogic Q200 reference design but with the following differences: - 3GB RAM, 32GB eMMC - Blue and Red LEDs used to signal on/off status - uart_AO can be accessed after opening the case; soldering required - USB OTG is not accessible (inside the case) - Realtek RTL8152 Ethernet (internal USB connection) Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200719021421.7959-3-christianshewitt@gmail.com commit 8b6f53d7b94b8d23860ae44a56b0af404a6c7e4c Author: Christian Hewitt Date: Sun Jul 19 02:14:20 2020 +0000 dt-bindings: arm: amlogic: add support for the WeTek Core 2 The WeTek Core 2 is a commercial Android device based on the Amlogic Q200 reference design using the S912-H chipset. Specs: 3GB DDR3 RAM 32GB eMMC storage 10/100 Ethernet using Realtek RTL8152 (internal USB) 802.11 a/b/g/n/ac + BT 4.1 sdio wireless module (AP6356S) 2x single colour LEDs to indicate power 1x power button 1x reset button on the underside of the box HDMI 2.0 (4k@60p) video Composite video + 2-channel audio output on 3.5mm jack S/PDIF audio output 2x USB 2.0 ports 1x USB OTG port (internal) 1x micro SD card slot UART pins (internal) IR Sensor Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200719021421.7959-2-christianshewitt@gmail.com commit b8b85d01be916a30c9863a5456c218d802e01d97 Author: Christian Hewitt Date: Sat Jul 18 07:25:32 2020 +0000 arm64: dts: meson: add audio playback to khadas-vim3l Add initial audio support limited to HDMI i2s, copying the config from the existing VIM3 device-tree. Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Acked-by: Jerome Brunet Link: https://lore.kernel.org/r/20200718072532.8427-3-christianshewitt@gmail.com commit 725da67ce4d77540d4d6f7ecc3ac5a885a684716 Author: Christian Hewitt Date: Sat Jul 18 07:25:31 2020 +0000 arm64: dts: meson: add audio playback to odroid-c4 Add initial audio support limited to HDMI i2s. Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Acked-by: Jerome Brunet Link: https://lore.kernel.org/r/20200718072532.8427-2-christianshewitt@gmail.com commit ad0ddbb9ba3d5216bf3035db6684c1507c90b93b Author: Dan Murphy Date: Mon Jul 20 13:12:01 2020 -0500 ASoC: tas2770: Convert tas2770 binding to yaml Convert the tas2770 binding to yaml format. Add in the reset-gpio to the binding as it is in the code but not documented in the binding. Signed-off-by: Dan Murphy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200720181202.31000-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 58b868f51d6e38146e44cb09fcd92b5fc35d83bc Author: Dan Murphy Date: Mon Jul 20 13:12:02 2020 -0500 ASoC: tas2770: Fix reset gpio property name Fix the reset property name when allocating the GPIO descriptor. The gpiod_get_optional appends either the -gpio or -gpios suffix to the name. Fixes: 1a476abc723e6 ("tas2770: add tas2770 smart PA kernel driver") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200720181202.31000-2-dmurphy@ti.com Signed-off-by: Mark Brown commit c3061bc73fd7073e6ea9a780a99bbb15587f8abe Author: Thierry Reding Date: Mon Jun 8 19:46:58 2020 +0200 ASoC: sgtl5000: Convert to json-schema Convert the Freescale SGTL5000 device tree bindings from free-form text format to json-schema. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20200608174658.1315325-1-thierry.reding@gmail.com Signed-off-by: Mark Brown commit 44908459275e056bf43054d503adee7e3a6c9f2f Author: Ricardo Rivera-Matos Date: Mon Jul 20 15:44:00 2020 -0500 power: supply: bq25150 introduce the bq25150 Introduce the bq2515x family of chargers. The BQ2515X family of devices are highly integrated battery management ICs that integrate the most common functions for wearable devices namely a charger, an output voltage rail, ADC for battery and system monitoring, and a push-button controller. Datasheets: bq25150 - http://www.ti.com/lit/ds/symlink/bq25150.pdf bq25155 - http://www.ti.com/lit/ds/symlink/bq25155.pdf Signed-off-by: Ricardo Rivera-Matos Signed-off-by: Sebastian Reichel commit 8f7bda7a666df40d8e6d590159c30498795f413a Author: Ricardo Rivera-Matos Date: Mon Jul 20 15:43:59 2020 -0500 dt-bindings: power: Add the bindings for the bq2515x family of chargers. The BQ2515X family of devices are highly integrated battery management ICs that integrate the most common functions for wearable devices namely a charger, an output voltage rail, ADC for battery and system monitoring, and a push-button controller. Datasheets: http://www.ti.com/lit/ds/symlink/bq25150.pdf http://www.ti.com/lit/ds/symlink/bq25155.pdf Reviewed-by: Rob Herring Signed-off-by: Ricardo Rivera-Matos Signed-off-by: Sebastian Reichel commit 04a646ff5acaa9a0a6634af1c94e0d5c8115e5db Author: Tzung-Bi Shih Date: Tue Jul 21 19:42:32 2020 +0800 ASoC: max98357a: move control of SD_MODE back to DAI ops Partially reverts commit 128f825aeab7 ("ASoC: max98357a: move control of SD_MODE to DAPM"). In order to have mute control of max98357 from machine drivers, commit 128f825aeab7 ("ASoC: max98357a: move control of SD_MODE to DAPM") moves the control of SD_MODE from DAI ops to DAPM events. However, pop noise has been observed on rk3399-gru-kevin boards due to this commit. The commit 128f825aeab7 caused sequence of DAI clocks and SD_MODE changed on rk3399-gru-kevin boards. With the commit 128f825aeab7: - SD_MODE will be set to 1 before DAI clocks start. - SD_MODE will be set to 0 after DAI clocks stop. As a result, pop noise. Moves the control of SD_MODE back to DAI ops. In the meantime, uses an additional flag in DAPM event to provide chance of mute control for machine drivers. Signed-off-by: Tzung-Bi Shih Tested-By: Alper Nebi Yasak Link: https://lore.kernel.org/r/20200721114232.2812254-1-tzungbi@google.com Signed-off-by: Mark Brown commit 8fca4f98af0bf112b485fff02779b84d3a069eac Merge: e4d9c2320716e 951cf368bcb11 Author: Alexei Starovoitov Date: Tue Jul 21 13:15:01 2020 -0700 Merge branch 'bpf_iter-BTF_ID-at-build-time' Yonghong Song says: ==================== Commit 5a2798ab32ba ("bpf: Add BTF_ID_LIST/BTF_ID/BTF_ID_UNUSED macros") implemented a mechanism to compute btf_ids at kernel build time which can simplify kernel implementation and reduce runtime overhead by removing in-kernel btf_id calculation. This patch set tried to use this mechanism to compute btf_ids for bpf_skc_to_*() helpers and for btf_id_or_null ctx arguments specified during bpf iterator registration. Please see individual patch for details. Changelogs: v1 -> v2: - v1 ([1]) is only for bpf_skc_to_*() helpers. This version expanded it to cover ctx btf_id_or_null arguments - abandoned the change of "extern u32 name[]" to "static u32 name[]" for BPF_ID_LIST local "name" definition. gcc 9 incurred a compilation error. [1]: https://lore.kernel.org/bpf/20200717184706.3476992-1-yhs@fb.com/T ==================== Signed-off-by: Alexei Starovoitov commit e4d9c2320716ea0e9ef59f503ddd8f253a642ddd Author: Ilya Leoshkevich Date: Mon Jul 20 13:48:06 2020 +0200 samples/bpf, selftests/bpf: Use bpf_probe_read_kernel A handful of samples and selftests fail to build on s390, because after commit 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work") bpf_probe_read is not available anymore. Fix by using bpf_probe_read_kernel. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200720114806.88823-1-iii@linux.ibm.com commit 951cf368bcb11d6f817709660cf5cd914072c36f Author: Yonghong Song Date: Mon Jul 20 09:34:03 2020 -0700 bpf: net: Use precomputed btf_id for bpf iterators One additional field btf_id is added to struct bpf_ctx_arg_aux to store the precomputed btf_ids. The btf_id is computed at build time with BTF_ID_LIST or BTF_ID_LIST_GLOBAL macro definitions. All existing bpf iterators are changed to used pre-compute btf_ids. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200720163403.1393551-1-yhs@fb.com commit 6bd557275ad5a1adaff5082f4e24218ba344e0c0 Author: Ilya Leoshkevich Date: Mon Jul 20 12:18:10 2020 +0200 selftests/bpf: Fix test_lwt_seg6local.sh hangs OpenBSD netcat (Debian patchlevel 1.195-2) does not seem to react to SIGINT for whatever reason, causing prefix.pl to hang after test_lwt_seg6local.sh exits due to netcat inheriting test_lwt_seg6local.sh's file descriptors. Fix by using SIGTERM instead. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200720101810.84299-1-iii@linux.ibm.com commit fce557bcef119a1bc5ab3cb02678cf454bcaf424 Author: Yonghong Song Date: Mon Jul 20 09:34:02 2020 -0700 bpf: Make btf_sock_ids global tcp and udp bpf_iter can reuse some socket ids in btf_sock_ids, so make it global. I put the extern definition in btf_ids.h as a central place so it can be easily discovered by developers. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200720163402.1393427-1-yhs@fb.com commit 495436c1f9220131f0ddc4eac83a55f2f002769a Merge: 956fcfcd35951 18a4d8c97b841 Author: Alexei Starovoitov Date: Tue Jul 21 12:40:25 2020 -0700 Merge branch 'compressed-JITed-insn' Luke Nelson says: ==================== his patch series enables using compressed riscv (RVC) instructions in the rv64 BPF JIT. RVC is a standard riscv extension that adds a set of compressed, 2-byte instructions that can replace some regular 4-byte instructions for improved code density. This series first modifies the JIT to support using 2-byte instructions (e.g., in jump offset computations), then adds RVC encoding and helper functions, and finally uses the helper functions to optimize the rv64 JIT. I used our formal verification framework, Serval, to verify the correctness of the RVC encodings and their uses in the rv64 JIT. The JIT continues to pass all tests in lib/test_bpf.c, and introduces no new failures to test_verifier; both with and without RVC being enabled. The following are examples of the JITed code for the verifier selftest "direct packet read test#3 for CGROUP_SKB OK", without and with RVC enabled, respectively. The former uses 178 bytes, and the latter uses 112, for a ~37% reduction in code size for this example. Without RVC: 0: 02000813 addi a6,zero,32 4: fd010113 addi sp,sp,-48 8: 02813423 sd s0,40(sp) c: 02913023 sd s1,32(sp) 10: 01213c23 sd s2,24(sp) 14: 01313823 sd s3,16(sp) 18: 01413423 sd s4,8(sp) 1c: 03010413 addi s0,sp,48 20: 03056683 lwu a3,48(a0) 24: 02069693 slli a3,a3,0x20 28: 0206d693 srli a3,a3,0x20 2c: 03456703 lwu a4,52(a0) 30: 02071713 slli a4,a4,0x20 34: 02075713 srli a4,a4,0x20 38: 03856483 lwu s1,56(a0) 3c: 02049493 slli s1,s1,0x20 40: 0204d493 srli s1,s1,0x20 44: 03c56903 lwu s2,60(a0) 48: 02091913 slli s2,s2,0x20 4c: 02095913 srli s2,s2,0x20 50: 04056983 lwu s3,64(a0) 54: 02099993 slli s3,s3,0x20 58: 0209d993 srli s3,s3,0x20 5c: 09056a03 lwu s4,144(a0) 60: 020a1a13 slli s4,s4,0x20 64: 020a5a13 srli s4,s4,0x20 68: 00900313 addi t1,zero,9 6c: 006a7463 bgeu s4,t1,0x74 70: 00000a13 addi s4,zero,0 74: 02d52823 sw a3,48(a0) 78: 02e52a23 sw a4,52(a0) 7c: 02952c23 sw s1,56(a0) 80: 03252e23 sw s2,60(a0) 84: 05352023 sw s3,64(a0) 88: 00000793 addi a5,zero,0 8c: 02813403 ld s0,40(sp) 90: 02013483 ld s1,32(sp) 94: 01813903 ld s2,24(sp) 98: 01013983 ld s3,16(sp) 9c: 00813a03 ld s4,8(sp) a0: 03010113 addi sp,sp,48 a4: 00078513 addi a0,a5,0 a8: 00008067 jalr zero,0(ra) With RVC: 0: 02000813 addi a6,zero,32 4: 7179 c.addi16sp sp,-48 6: f422 c.sdsp s0,40(sp) 8: f026 c.sdsp s1,32(sp) a: ec4a c.sdsp s2,24(sp) c: e84e c.sdsp s3,16(sp) e: e452 c.sdsp s4,8(sp) 10: 1800 c.addi4spn s0,sp,48 12: 03056683 lwu a3,48(a0) 16: 1682 c.slli a3,0x20 18: 9281 c.srli a3,0x20 1a: 03456703 lwu a4,52(a0) 1e: 1702 c.slli a4,0x20 20: 9301 c.srli a4,0x20 22: 03856483 lwu s1,56(a0) 26: 1482 c.slli s1,0x20 28: 9081 c.srli s1,0x20 2a: 03c56903 lwu s2,60(a0) 2e: 1902 c.slli s2,0x20 30: 02095913 srli s2,s2,0x20 34: 04056983 lwu s3,64(a0) 38: 1982 c.slli s3,0x20 3a: 0209d993 srli s3,s3,0x20 3e: 09056a03 lwu s4,144(a0) 42: 1a02 c.slli s4,0x20 44: 020a5a13 srli s4,s4,0x20 48: 4325 c.li t1,9 4a: 006a7363 bgeu s4,t1,0x50 4e: 4a01 c.li s4,0 50: d914 c.sw a3,48(a0) 52: d958 c.sw a4,52(a0) 54: dd04 c.sw s1,56(a0) 56: 03252e23 sw s2,60(a0) 5a: 05352023 sw s3,64(a0) 5e: 4781 c.li a5,0 60: 7422 c.ldsp s0,40(sp) 62: 7482 c.ldsp s1,32(sp) 64: 6962 c.ldsp s2,24(sp) 66: 69c2 c.ldsp s3,16(sp) 68: 6a22 c.ldsp s4,8(sp) 6a: 6145 c.addi16sp sp,48 6c: 853e c.mv a0,a5 6e: 8082 c.jr ra RFC -> v1: - From Björn Töpel: * Changed RVOFF macro to static inline "ninsns_rvoff". * Changed return type of rvc_ functions from u32 to u16. * Changed sizeof(u16) to sizeof(*ctx->insns). * Factored unsigned immediate checks into helper functions (is_8b_uint, etc.) * Changed to use IS_ENABLED instead of #ifdef to check if RVC is enabled. * Changed type of immediate arguments to rvc_* encoding to u32 to avoid issues from promotion of u16 to signed int. * Cleaned up RVC checks in emit_{addi,slli,srli,srai}. + Wrapped lines at 100 instead of 80 columns for increased clarity. + Move !imm checks into each branch instead of checking separately. + Strengthed checks for c.{slli,srli,srai} to check that imm < XLEN. Otherwise, imm could be non-zero but the lower XLEN bits could all be zero, leading to invalid RVC encoding. * Changed emit_imm to sign-extend the 12-bit value in "lower" + The immediate checks for emit_{addiw,li,addi} use signed comparisons, so this enables the RVC variants to be used more often (e.g., if val == -1, then lower should be -1 as opposed to 4095). ==================== Reviewed-by: Björn Töpel Acked-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit 0f12e584b241285cf60a6227f3771fa444cfcf76 Author: Yonghong Song Date: Mon Jul 20 09:34:01 2020 -0700 bpf: Add BTF_ID_LIST_GLOBAL in btf_ids.h Existing BTF_ID_LIST used a local static variable to store btf_ids. This patch provided a new macro BTF_ID_LIST_GLOBAL to store btf_ids in a global variable which can be shared among multiple files. The existing BTF_ID_LIST is still retained. Two reasons. First, BTF_ID_LIST is also used to build btf_ids for helper arguments which typically is an array of 5. Since typically different helpers have different signature, it makes little sense to share them. Second, some current computed btf_ids are indeed local. If later those btf_ids are shared between different files, they can use BTF_ID_LIST_GLOBAL then. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20200720163401.1393159-1-yhs@fb.com commit d8dfe5bfe856c0c72b1750322dbfcad402e73373 Author: Yonghong Song Date: Mon Jul 20 09:33:59 2020 -0700 tools/bpf: Sync btf_ids.h to tools Sync kernel header btf_ids.h to tools directory. Also define macro CONFIG_DEBUG_INFO_BTF before including btf_ids.h in prog_tests/resolve_btfids.c since non-stub definitions for BTF_ID_LIST etc. macros are defined under CONFIG_DEBUG_INFO_BTF. This prevented test_progs from failing. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200720163359.1393079-1-yhs@fb.com commit bc4f0548f683a3d53359cef15f088d2d5bb4bc39 Author: Yonghong Song Date: Mon Jul 20 09:33:58 2020 -0700 bpf: Compute bpf_skc_to_*() helper socket btf ids at build time Currently, socket types (struct tcp_sock, udp_sock, etc.) used by bpf_skc_to_*() helpers are computed when vmlinux_btf is first built in the kernel. Commit 5a2798ab32ba ("bpf: Add BTF_ID_LIST/BTF_ID/BTF_ID_UNUSED macros") implemented a mechanism to compute btf_ids at kernel build time which can simplify kernel implementation and reduce runtime overhead by removing in-kernel btf_id calculation. This patch did exactly this, removing in-kernel btf_id computation and utilizing build-time btf_id computation. If CONFIG_DEBUG_INFO_BTF is not defined, BTF_ID_LIST will define an array with size of 5, which is not enough for btf_sock_ids. So define its own static array if CONFIG_DEBUG_INFO_BTF is not defined. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200720163358.1393023-1-yhs@fb.com commit 956fcfcd359512f15b19bcd157fa8206ed26605b Author: YueHaibing Date: Fri Jul 17 20:30:59 2020 +0800 tools/bpftool: Fix error handing in do_skeleton() Fix pass 0 to PTR_ERR, also dump more err info using libbpf_strerror. Fixes: 5dc7a8b21144 ("bpftool, selftests/bpf: Embed object file inside skeleton") Signed-off-by: YueHaibing Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200717123059.29624-1-yuehaibing@huawei.com commit 18a4d8c97b841632920c16a6fa9216d1214f3db7 Author: Luke Nelson Date: Mon Jul 20 19:52:40 2020 -0700 bpf, riscv: Use compressed instructions in the rv64 JIT This patch uses the RVC support and encodings from bpf_jit.h to optimize the rv64 jit. The optimizations work by replacing emit(rv_X(...)) with a call to a helper function emit_X, which will emit a compressed version of the instruction when possible, and when RVC is enabled. The JIT continues to pass all tests in lib/test_bpf.c, and introduces no new failures to test_verifier; both with and without RVC being enabled. Most changes are straightforward replacements of emit(rv_X(...), ctx) with emit_X(..., ctx), with the following exceptions bearing mention; * Change emit_imm to sign-extend the value in "lower", since the checks for RVC (and the instructions themselves) treat the value as signed. Otherwise, small negative immediates will not be recognized as encodable using an RVC instruction. For example, without this change, emit_imm(rd, -1, ctx) would cause lower to become 4095, which is not a 6b int even though a "c.li rd, -1" instruction suffices. * For {BPF_MOV,BPF_ADD} BPF_X, drop using addiw,addw in the 32-bit cases since the values are zero-extended into the upper 32 bits in the following instructions anyways, and the addition commutes with zero-extension. (BPF_SUB BPF_X must still use subw since subtraction does not commute with zero-extension.) This patch avoids optimizing branches and jumps to use RVC instructions since surrounding code often makes assumptions about the sizes of emitted instructions. Optimizing these will require changing these functions (e.g., emit_branch) to dynamically compute jump offsets. The following are examples of the JITed code for the verifier selftest "direct packet read test#3 for CGROUP_SKB OK", without and with RVC enabled, respectively. The former uses 178 bytes, and the latter uses 112, for a ~37% reduction in code size for this example. Without RVC: 0: 02000813 addi a6,zero,32 4: fd010113 addi sp,sp,-48 8: 02813423 sd s0,40(sp) c: 02913023 sd s1,32(sp) 10: 01213c23 sd s2,24(sp) 14: 01313823 sd s3,16(sp) 18: 01413423 sd s4,8(sp) 1c: 03010413 addi s0,sp,48 20: 03056683 lwu a3,48(a0) 24: 02069693 slli a3,a3,0x20 28: 0206d693 srli a3,a3,0x20 2c: 03456703 lwu a4,52(a0) 30: 02071713 slli a4,a4,0x20 34: 02075713 srli a4,a4,0x20 38: 03856483 lwu s1,56(a0) 3c: 02049493 slli s1,s1,0x20 40: 0204d493 srli s1,s1,0x20 44: 03c56903 lwu s2,60(a0) 48: 02091913 slli s2,s2,0x20 4c: 02095913 srli s2,s2,0x20 50: 04056983 lwu s3,64(a0) 54: 02099993 slli s3,s3,0x20 58: 0209d993 srli s3,s3,0x20 5c: 09056a03 lwu s4,144(a0) 60: 020a1a13 slli s4,s4,0x20 64: 020a5a13 srli s4,s4,0x20 68: 00900313 addi t1,zero,9 6c: 006a7463 bgeu s4,t1,0x74 70: 00000a13 addi s4,zero,0 74: 02d52823 sw a3,48(a0) 78: 02e52a23 sw a4,52(a0) 7c: 02952c23 sw s1,56(a0) 80: 03252e23 sw s2,60(a0) 84: 05352023 sw s3,64(a0) 88: 00000793 addi a5,zero,0 8c: 02813403 ld s0,40(sp) 90: 02013483 ld s1,32(sp) 94: 01813903 ld s2,24(sp) 98: 01013983 ld s3,16(sp) 9c: 00813a03 ld s4,8(sp) a0: 03010113 addi sp,sp,48 a4: 00078513 addi a0,a5,0 a8: 00008067 jalr zero,0(ra) With RVC: 0: 02000813 addi a6,zero,32 4: 7179 c.addi16sp sp,-48 6: f422 c.sdsp s0,40(sp) 8: f026 c.sdsp s1,32(sp) a: ec4a c.sdsp s2,24(sp) c: e84e c.sdsp s3,16(sp) e: e452 c.sdsp s4,8(sp) 10: 1800 c.addi4spn s0,sp,48 12: 03056683 lwu a3,48(a0) 16: 1682 c.slli a3,0x20 18: 9281 c.srli a3,0x20 1a: 03456703 lwu a4,52(a0) 1e: 1702 c.slli a4,0x20 20: 9301 c.srli a4,0x20 22: 03856483 lwu s1,56(a0) 26: 1482 c.slli s1,0x20 28: 9081 c.srli s1,0x20 2a: 03c56903 lwu s2,60(a0) 2e: 1902 c.slli s2,0x20 30: 02095913 srli s2,s2,0x20 34: 04056983 lwu s3,64(a0) 38: 1982 c.slli s3,0x20 3a: 0209d993 srli s3,s3,0x20 3e: 09056a03 lwu s4,144(a0) 42: 1a02 c.slli s4,0x20 44: 020a5a13 srli s4,s4,0x20 48: 4325 c.li t1,9 4a: 006a7363 bgeu s4,t1,0x50 4e: 4a01 c.li s4,0 50: d914 c.sw a3,48(a0) 52: d958 c.sw a4,52(a0) 54: dd04 c.sw s1,56(a0) 56: 03252e23 sw s2,60(a0) 5a: 05352023 sw s3,64(a0) 5e: 4781 c.li a5,0 60: 7422 c.ldsp s0,40(sp) 62: 7482 c.ldsp s1,32(sp) 64: 6962 c.ldsp s2,24(sp) 66: 69c2 c.ldsp s3,16(sp) 68: 6a22 c.ldsp s4,8(sp) 6a: 6145 c.addi16sp sp,48 6c: 853e c.mv a0,a5 6e: 8082 c.jr ra Signed-off-by: Luke Nelson Signed-off-by: Alexei Starovoitov Cc: Björn Töpel Link: https://lore.kernel.org/bpf/20200721025241.8077-4-luke.r.nels@gmail.com commit da7a35062bcccd3f67779a357065ba707b02ff2b Author: Ian Rogers Date: Sun Jul 19 23:17:41 2020 -0700 libbpf bpf_helpers: Use __builtin_offsetof for offsetof The non-builtin route for offsetof has a dependency on size_t from stdlib.h/stdint.h that is undeclared and may break targets. The offsetof macro in bpf_helpers may disable the same macro in other headers that have a #ifdef offsetof guard. Rather than add additional dependencies improve the offsetof macro declared here to use the builtin that is available since llvm 3.7 (the first with a BPF backend). Signed-off-by: Ian Rogers Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200720061741.1514673-1-irogers@google.com commit 804ec72c68c8477b8713a1e8f8eda120d3471031 Author: Luke Nelson Date: Mon Jul 20 19:52:39 2020 -0700 bpf, riscv: Add encodings for compressed instructions This patch adds functions for encoding and emitting compressed riscv (RVC) instructions to the BPF JIT. Some regular riscv instructions can be compressed into an RVC instruction if the instruction fields meet some requirements. For example, "add rd, rs1, rs2" can be compressed into "c.add rd, rs2" when rd == rs1. To make using RVC encodings simpler, this patch also adds helper functions that selectively emit either a regular instruction or a compressed instruction if possible. For example, emit_add will produce a "c.add" if possible and regular "add" otherwise. Signed-off-by: Luke Nelson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200721025241.8077-3-luke.r.nels@gmail.com commit 94ad428df53688a1f80ab55f2b1186101510a778 Author: Ilya Leoshkevich Date: Fri Jul 17 18:53:26 2020 +0200 s390/bpf: Use bpf_skip() in bpf_jit_prologue() Now that we have bpf_skip() for emitting nops, use it in bpf_jit_prologue() in order to reduce code duplication. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200717165326.6786-6-iii@linux.ibm.com commit bfabff3cb0fef366086c64f24be8ab316a355b99 Author: Luke Nelson Date: Mon Jul 20 19:52:38 2020 -0700 bpf, riscv: Modify JIT ctx to support compressed instructions This patch makes the necessary changes to struct rv_jit_context and to bpf_int_jit_compile to support compressed riscv (RVC) instructions in the BPF JIT. It changes the JIT image to be u16 instead of u32, since RVC instructions are 2 bytes as opposed to 4. It also changes ctx->offset and ctx->ninsns to refer to 2-byte instructions rather than 4-byte ones. The riscv PC is required to be 16-bit aligned with or without RVC, so this is sufficient to refer to any valid riscv offset. The code for computing jump offsets in bytes is updated accordingly, and factored into a new "ninsns_rvoff" function to simplify the code. Signed-off-by: Luke Nelson Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200721025241.8077-2-luke.r.nels@gmail.com commit 1491b73311a15bb5beeab5d30e03bff761ef6c18 Author: Ilya Leoshkevich Date: Fri Jul 17 18:53:25 2020 +0200 s390/bpf: Tolerate not converging code shrinking "BPF_MAXINSNS: Maximum possible literals" unnecessarily falls back to the interpreter because of failing sanity check in bpf_set_addr. The problem is that there are a lot of branches that can be shrunk, and doing so opens up the possibility to shrink even more. This process does not converge after 3 passes, causing code offsets to change during the codegen pass, which must never happen. Fix by inserting nops during codegen pass in order to preserve code offets. Fixes: 4e9b4a6883dd ("s390/bpf: Use relative long branches") Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200717165326.6786-5-iii@linux.ibm.com commit 5fa6974471c5518a50bdd814067508dbcb477251 Author: Ilya Leoshkevich Date: Fri Jul 17 18:53:24 2020 +0200 s390/bpf: Use brcl for jumping to exit_ip if necessary "BPF_MAXINSNS: Maximum possible literals" test causes panic with bpf_jit_harden = 2. The reason is that BPF_JMP | BPF_EXIT is always emitted as brc, however, after removal of JITed image size limitations, brcl might be required. Fix by using brcl when necessary. Fixes: 4e9b4a6883dd ("s390/bpf: Use relative long branches") Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200717165326.6786-4-iii@linux.ibm.com commit 7477d43be5b1448bc0d4c85cb185a0144cc080e1 Author: Ilya Leoshkevich Date: Fri Jul 17 18:53:23 2020 +0200 s390/bpf: Fix sign extension in branch_ku Both signed and unsigned variants of BPF_JMP | BPF_K require sign-extending the immediate. JIT emits cgfi for the signed case, which is correct, and clgfi for the unsigned case, which is not correct: clgfi zero-extends the immediate. s390 does not provide an instruction that does sign-extension and unsigned comparison at the same time. Therefore, fix by first loading the sign-extended immediate into work register REG_1 and proceeding as if it's BPF_X. Fixes: 4e9b4a6883dd ("s390/bpf: Use relative long branches") Reported-by: Seth Forshee Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Tested-by: Seth Forshee Link: https://lore.kernel.org/bpf/20200717165326.6786-3-iii@linux.ibm.com commit 2ea485980734500d41e4530f038d94a21e2b3b34 Author: Ilya Leoshkevich Date: Fri Jul 17 18:53:22 2020 +0200 selftests: bpf: test_kmod.sh: Fix running out of srctree When running out of srctree, relative path to lib/test_bpf.ko is different than when running in srctree. Check $building_out_of_srctree environment variable and use a different relative path if needed. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200717165326.6786-2-iii@linux.ibm.com commit 98cc1b93724aa85bd828269855d48d884c702726 Author: Dan Murphy Date: Mon Jul 20 15:43:57 2020 -0500 power_supply: Add additional health properties to the header Add HEALTH_WARM, HEALTH_COOL and HEALTH_HOT to the health enum. HEALTH_WARM, HEALTH_COOL, and HEALTH_HOT properties are taken from JEITA specification JISC8712:2015 Acked-by: Andrew F. Davis Tested-by: Guru Das Srinagesh Signed-off-by: Dan Murphy Signed-off-by: Sebastian Reichel commit 9af846486d781a63de025a5f502c515268e48790 Author: Daeho Jeong Date: Tue Jul 21 12:21:11 2020 +0900 f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl Added a new ioctl to send discard commands or/and zero out to selected data area of a regular file for security reason. The way of handling range.len of F2FS_IOC_SEC_TRIM_FILE: 1. Added -1 value support for range.len to secure trim the whole blocks starting from range.start regardless of i_size. 2. If the end of the range passes over the end of file, it means until the end of file (i_size). 3. ignored the case of that range.len is zero to prevent the function from making end_addr zero and triggering different behaviour of the function. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b0f3b87fb3abc42c81d76c6c5795f26dbdb2f04b Author: Jaegeuk Kim Date: Thu Jul 16 09:57:03 2020 -0700 f2fs: should avoid inode eviction in synchronous path https://bugzilla.kernel.org/show_bug.cgi?id=208565 PID: 257 TASK: ecdd0000 CPU: 0 COMMAND: "init" #0 [] (__schedule) from [] #1 [] (schedule) from [] #2 [] (rwsem_down_read_failed) from [] #3 [] (down_read) from [] #4 [] (f2fs_truncate_blocks) from [] #5 [] (f2fs_truncate) from [] #6 [] (f2fs_evict_inode) from [] #7 [] (evict) from [] #8 [] (iput) from [] #9 [] (f2fs_sync_node_pages) from [] #10 [] (f2fs_write_checkpoint) from [] #11 [] (f2fs_sync_fs) from [] #12 [] (f2fs_do_sync_file) from [] #13 [] (f2fs_sync_file) from [] #14 [] (vfs_fsync_range) from [] #15 [] (do_fsync) from [] #16 [] (sys_fsync) from [] This can be caused by flush_dirty_inode() in f2fs_sync_node_pages() where iput() requires f2fs_lock_op() again resulting in livelock. Reported-by: Zhiguo Niu Signed-off-by: Jaegeuk Kim commit bc50ca291e5e49c7308114518ae184b0fc03b35f Author: Alex Deucher Date: Sun Jul 19 13:35:29 2020 -0400 drm/amdgpu/sienna_cichlid: add SMU i2c support (v2) Enable SMU i2c bus access for sienna_cichlid asics. v2: change callback name Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 1bc734759f284eb531dd474c72ce59874649a254 Author: Alex Deucher Date: Sun Jul 19 13:22:05 2020 -0400 drm/amdgpu/navi1x: add SMU i2c support (v2) Enable SMU i2c bus access for navi1x asics. v2: add missing implementation Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 0e0e11e71e31ef0f3aaa974c65b9bb6e0ce1f219 Author: Alex Deucher Date: Fri Jul 17 09:40:19 2020 -0400 drm/amdgpu/swSMU: remove eeprom from the smu i2c handlers (v2) The driver uses it for EEPROM access, but it's just an i2c bus. v2: change the callback name as well. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit cd65c33c48888514e5efe2237709c44609aa15e0 Author: Alex Deucher Date: Fri Jul 17 09:33:54 2020 -0400 drm/amdgpu/vega20: enable the smu i2c bus for all boards There is no longer a ras dependency so it's safe to expose on all boards. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit a519fd83cf3094088de736c9f02f2b3ed36d72e2 Author: Alex Deucher Date: Fri Jul 17 09:32:04 2020 -0400 drm/amdgpu: remove eeprom from the smu i2c handlers The driver uses it for EEPROM access, but it's just an i2c bus. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 84dd1f698e5fc2b4c1df3ea05371d2fff13c665c Author: Alex Deucher Date: Fri Jul 17 09:25:38 2020 -0400 drm/amdgpu: move i2c bus lock out of ras structure It's not really ras related. It's just a lock for the bus in general. This removes the ras dependency from the smu i2c bus. Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 9cb268215dbb186f4eaed589bda1a7a50ccabdc8 Author: Paweł Gronowski Date: Sun Jul 19 17:54:53 2020 +0200 drm/amdgpu: Fix NULL dereference in dpm sysfs handlers NULL dereference occurs when string that is not ended with space or newline is written to some dpm sysfs interface (for example pp_dpm_sclk). This happens because strsep replaces the tmp with NULL if the delimiter is not present in string, which is then dereferenced by tmp[0]. Reproduction example: sudo sh -c 'echo -n 1 > /sys/class/drm/card0/device/pp_dpm_sclk' Signed-off-by: Paweł Gronowski Signed-off-by: Alex Deucher commit 0c56c862e712001e4d86bc4f43d74f2425c010c2 Author: Qiu Wenbo Date: Fri Jul 17 15:09:57 2020 +0800 drm/amd/powerplay: fix a crash when overclocking Vega M Avoid kernel crash when vddci_control is SMU7_VOLTAGE_CONTROL_NONE and vddci_voltage_table is empty. It has been tested on Intel Hades Canyon (i7-8809G). Bug: https://bugzilla.kernel.org/show_bug.cgi?id=208489 Fixes: ac7822b0026f ("drm/amd/powerplay: add smumgr support for VEGAM (v2)") Reviewed-by: Evan Quan Signed-off-by: Qiu Wenbo Signed-off-by: Alex Deucher commit 85dec7176b96fb6fb44e726ce347db99c572ff64 Author: Jiansong Chen Date: Tue Jul 21 16:39:38 2020 +0800 drm/amd/powerplay: retrieve VCN dpm table per instances To accommodate VCN instances variance, otherwise it may trigger smu response error for configuration with less instances. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 8985adb69f7dd60afa77c03b9e362ac859347ec5 Author: Jiansong Chen Date: Tue Jul 21 15:36:19 2020 +0800 drm/amd/powerplay: update driver if version for navy_flounder It's in accordance with pmfw 65.3.0 for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 9c0551f23e653e848681d651603e3122e18a1c65 Author: Jiansong Chen Date: Tue Jul 21 12:21:40 2020 +0800 drm/amd/powerplay: fix typos for clk map It should be DCLK1->PPCLK_DCLK_1 and VCLK->PPCLK_VCLK_0. Signed-off-by: Jiansong Chen Reviewed-by: Likun Gao Acked-by: Tao Zhou Signed-off-by: Alex Deucher commit 4908d02637b34e604efbe77aadecb510338d92c9 Author: James Zhu Date: Thu Jul 16 09:56:52 2020 -0400 drm/amdgpu/vcn: merge shared memory into vcpu Merge vcn firmware shared memory bo into vcn vcpu bo. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit d10985f46e484eebf77eaa05eb614d76ec12a9a1 Author: James Zhu Date: Thu Jul 16 09:47:35 2020 -0400 Revert "drm/amdgpu/vcn: add shared memory restore after wake up from sleep." This reverts commit 21b704d78352c289d31697824ceea7ad0ff4ce59. To merge vcn firmware shared memory bo into vcn vcpu bo. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit d182e78834d78fabf4e72509a2348f1aa193c7e0 Author: Aric Cyr Date: Mon Jul 13 10:07:51 2020 -0400 drm/amd/display: 3.2.95 Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 3b26ca2db30d0c43bef67590251627c322830554 Author: Igor Kravchenko Date: Fri Jul 10 16:24:30 2020 -0400 drm/amd/display: interface to obtain minimum plane size caps [Why] Implement an interface to obtain plane size caps [How] Add min_width, min_height fields to dc_plane_cap structure. Set values to 16x16 for discrete ASICs, and 64x64 for others. Signed-off-by: Igor Kravchenko Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit e10517b3cb93f90c8a790def6ae884d1e2b65ee7 Author: Aurabindo Pillai Date: Fri Jul 3 12:37:35 2020 -0400 drm/amd/display: Add additional config guards for DCN [Why&How] Fix build error by protecting code with config guard to enable building amdgpu without CONFIG_DRM_AMD_DC_DCN enabled. This option is disabled by default for allmodconfig. Signed-off-by: Aurabindo Pillai Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 18c4686aef0bf9017285c5c7e18324b3bc689a7b Author: Aurabindo Pillai Date: Fri Jun 19 15:31:19 2020 -0400 drm/amd/display: Call dsc related functions indirectly via dc interface [Why&How] Accessing dcn20_add_dsc_to_stream_resource directly causes build failure for configuration which has CONFIG_DRM_AMD_DC_DCN disabled. Fix this by calling the corresponding function exposed via dc resource functions. Signed-off-by: Aurabindo Pillai Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ee5dc62d2cce033e3eb7ed5c59ef4702bdd632c2 Author: Naveed Ashfaq Date: Fri Jul 10 16:50:50 2020 -0400 drm/amd/display: Improve compatibility by re-ordering info-packets [why] On DCN20, Some features would not be activated when ALLM was turned on. TV seemed to activate only the latest info packet sent, and the ALLM info packet was sent after the VSIF info packet. The packet indices was also inconsistent between DCN10 and DCN20. [how] Change the packet indices of DCN20 to match those of DCN10. This makes them consistent and also makes the vendor info packet be sent after the hfvsif info packet. Signed-off-by: Naveed Ashfaq Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 940c5270609c538c10426c5ef9a001a5fb255efc Author: Anthony Koo Date: Fri Jul 10 18:17:20 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.25 Signed-off-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit b4f71c8c793483cdf6c232646ae8db4211f322e8 Author: Aurabindo Pillai Date: Mon Jul 6 14:53:57 2020 -0400 drm/amd/display: Make new dc interface for adding dsc resource [Why] dcn20_add_dsc_to_stream_resource is accessed in amdgpu_dm directly. This creates build error for configuration with DCN disabled. [How] Make the function available through a resource pool function so that dcn20 function need not be called directly. Signed-off-by: Aurabindo Pillai Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 6d824ed524fc081c8cdb08bed3ec891db3d52d65 Author: Wenjing Liu Date: Tue Jul 7 16:59:31 2020 -0400 drm/amd/display: rename dsc extended caps as dsc branch decoder caps [why] The capability fields are reserved for DSC branch only to report the capability related to the branch's DSC decoder. Signed-off-by: Wenjing Liu Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 5cb32419cec0388d2daf04376ab5ebfece3bdc13 Author: Roman Li Date: Fri Jul 10 10:33:05 2020 -0400 drm/amd/display: Decouple ABM init from dmcu [Why] With ABM implemented on DMUB the ABM enablement shoudn't be solely rely on dmcu. Otherwise it won't work if dmcu is disabled. [How] 1. Decouple dmcub config copy from dmcu iram copy. 2. Set abm connector property if either dmcu or dmub enabled. Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 831010da1b0b8f0d3e8a5ae4dc81b09947de38f7 Author: Reza Amini Date: Thu Jul 2 16:10:31 2020 -0400 drm/amd/display: Implement AMD VSIF V3 [Why] To support V3 [How] Generate new VSIF for V3 Signed-off-by: Reza Amini Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit c06e09b76639657f284bfaf1cce29557a2515e85 Author: Eryk Brol Date: Tue Jun 16 14:19:35 2020 -0400 drm/amd/display: Add DSC parameters logging to debugfs [why] Need to add new parameters to debugfs logging so we will know what parameters DSC is using for debug purposes. So we are adding a read function in debugfs to read DSC status registers Signed-off-by: Eryk Brol Reviewed-by: Mikita Lipski Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 07bf2f2d369de08c75b3190882f2ddf3c626c2d1 Author: Aric Cyr Date: Mon Jul 6 22:07:46 2020 -0400 drm/amd/display: remove unhelpful 5ms delay [Why] Scaler vendor confirmed the 5ms was not helpful so no point in keeping it. [How] Revert 5ms delay after setting training pattern. Signed-off-by: Aric Cyr Reviewed-by: Ashley Thomas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 05cac1ae8ffbc5d835213ff2f9d7b8998c1f532f Author: Nirmoy Das Date: Fri Jul 10 16:15:40 2020 +0200 drm/amdgpu: do not disable SMU on vm reboot For passthrough device, we do baco reset after 1st vm boot so if we disable SMU on 1st VM shutdown baco reset will fail for 2nd vm boot. Signed-off-by: Nirmoy Das Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 5ea6f9c22c709d5b4dd69444779eb2d9e2722274 Author: Chengming Gui Date: Tue Jul 14 16:25:04 2020 +0800 drm/amdgpu: add timeout flush mechanism to update wptr for self interrupt (v2) outstanding log reaches threshold will trigger IH ring1/2's wptr reported, that will avoid generating interrupts to ring0 too frequent. But if ring1/2's wptr hasn't been increased for a long time, the outstanding log can't reach threshold so that driver can't get latest wptr info and miss some interrupts. v2: squash in warning fix Signed-off-by: Chengming Gui Reviewed-by: Feifei Xu Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit c652923afa7c8fef2aee42142e9663c0e69f367d Author: John Clements Date: Fri Jul 17 14:13:50 2020 +0800 drm/amdgpu: enable xgmi support for sienna cichlid set xgmi support flag suring nv ip init sequence Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit cff5f790193c0ab262a59e80f6024c932f5dcc9f Author: John Clements Date: Fri Jul 17 14:13:30 2020 +0800 drm/amdgpu: load asd for sienna cichlid do not abort psp asd load sequence for sienna cichlid Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit d8e0b16d818ebd76386029fe098cddbae49bfaf5 Author: Evan Quan Date: Wed Jul 8 12:45:00 2020 +0800 drm/amd/powerplay: tag swSMU code layers Per designs, the swSMU code is separated into four layers. And the typical calling flow should be like: amdgpu_smu.c -> ${asic}_ppt.c -> smu_v11/12_0.c -> smu_cmn.c. Compile errors will come out for any violations. This can help to prevent cross callings(e.g. amdgpu_smu.c -> ${asic}_ppt.c -> amdgpu_smu.c -> ${asic}_ppt.c) which were common in our code. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 704759315a7c906147c9aa5f2a9a7b6145226a98 Author: Evan Quan Date: Wed Jul 8 13:06:04 2020 +0800 drm/amd/powerplay: revise the calling flow on OD table update This can eliminate the cross callings and maintain clear code layer. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2132672499b9ddbd3b3821a1a8cb7325d12e8b2f Author: Evan Quan Date: Wed Jul 8 13:04:08 2020 +0800 drm/amd/powerplay: drop unnecessary message support check These messages are known to be supported by all ASICs. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 66c868282f9155ab381c81b5b31a4dc130513eed Author: Evan Quan Date: Wed Jul 8 12:11:59 2020 +0800 drm/amd/powerplay: move SMC message issuing APIs to smu_cmn.c Considering they can be shared by all ASICs. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c1b353b7eac5e32551e2aa65fad2e952748f9b28 Author: Evan Quan Date: Wed Jul 8 11:17:02 2020 +0800 drm/amd/powerplay: update the tables init related To avoid cross calling and maintain clear code layer. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit caad2613dc4bd7396f1f0d32f5f0e650f9d8ebc4 Author: Evan Quan Date: Tue Jul 7 16:18:55 2020 +0800 drm/amd/powerplay: move table setting common code to smu_cmn.c As they are shared by all ASICs. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e7a95eea22505d1e991141b289af35d485937c03 Author: Evan Quan Date: Tue Jul 7 15:52:39 2020 +0800 drm/amd/powerplay: maximum code sharing around watermarks setting Maximum code sharing. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a7bae0619903196417a9daf2409412217ddaf463 Author: Evan Quan Date: Tue Jul 7 14:49:45 2020 +0800 drm/amd/powerplay: move more APIs to smu_cmn.c Considering they are shared by all ASICs. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit af5ba6d21a70e50ae435befcecc733c8ea957972 Author: Evan Quan Date: Tue Jul 7 11:41:29 2020 +0800 drm/amd/powerplay: common API for disabling all features with exception We are moving to centralize all feature enablement/support checking and setting APIs in smu_cmn.c. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7dbf78051f75f15df7308dde6d55e757b6ec918c Author: Evan Quan Date: Tue Jul 7 14:06:40 2020 +0800 drm/amd/powerplay: move ppfeature mask setting to smu_cmn.c Considering they are shared by all ASICs. And we are moving to centralize all feature enablement/support checking and setting APIs in smu_cmn.c. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 28251d726b2be5f9f982b649c8cc00f20936a326 Author: Evan Quan Date: Tue Jul 7 11:48:06 2020 +0800 drm/amd/powerplay: implement smu_cmn_get_enabled_mask() for all ASICs Instead of having each for smu v11 and v12. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b4bb3aaf04afbe649bf4f4188247dcbfd95b2f4d Author: Evan Quan Date: Tue Jul 7 11:10:39 2020 +0800 drm/amd/powerplay: move dpm feature enablement checking to smu_cmn.c Considering it is shared by all ASICs and smu_cmn.c should be the right place. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4d942ae349bb8f5b5a4543a92614f7fc01464bce Author: Evan Quan Date: Tue Jul 7 10:18:02 2020 +0800 drm/amd/powerplay: move dpm feature support checking to smu_cmn.c Considering it is shared by all ASICs and smu_cmn.c should be the right place. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d23c3ccc217649884a12af001fd131d057db0a8a Author: Evan Quan Date: Tue Jul 7 10:24:31 2020 +0800 drm/amd/powerplay: move clock dpm enablement check to smu_v11/v12 As those APIs of smu_v11/v12 are more widely called. And they need this check also. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8264ee69f0d82cc1b30edd9930c27b1e4273d00b Author: Evan Quan Date: Mon Jul 6 16:18:57 2020 +0800 drm/amd/powerplay: drop unused code Those code were obsoleted by new common API smu_cmn_to_asic_specific_index(). Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6c339f37f1cd9b910f4c04b14079b1663b685c4d Author: Evan Quan Date: Mon Jul 6 16:11:31 2020 +0800 drm/amd/powerplay: unify swSMU index to asic specific index mapping By this we can drop redundant code. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 22f2447c04728665a26c63981db05d901537b833 Author: Evan Quan Date: Mon Jul 6 11:03:00 2020 +0800 drm/amd/powerplay: widely share the API for data table retrieving Considering the data table retrieving can be more widely shared, amdgpu_atombios.c is the right place. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 443c7f3c3641c790a7c306f9d9d54a2a5e3021b9 Author: Jinzhou.Su Date: Tue Jul 7 18:52:18 2020 +0800 drm/amdgpu: add read amdgpu_gfxoff status in debugfs Add interface for SMU12 device, used by UMR. v2: fix code style Signed-off-by: Jinzhou.Su Reviewed-by: Evan Quan Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 6ece96a1374e7a25f639cdaab11bdbd0b337ef5f Author: Bhawanpreet Lakha Date: Thu Jul 16 13:44:08 2020 -0400 drm/amdgpu: load ta firmware for sienna cichlid call psp_int_ta_microcode() to parse the ta firmware. Signed-off-by: Bhawanpreet Lakha Reviewed-by: John Clements Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 75bc07e2403caea9ecac69f766dfb7dc33547594 Author: Evan Quan Date: Wed Jul 15 14:01:29 2020 +0800 drm/amd/powerplay: suppress compile error around BUG_ON To suppress the compile error below for "ARCH=arc". drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c: In function 'arcturus_fill_eeprom_i2c_req': >> arch/arc/include/asm/bug.h:22:2: error: implicit declaration of function 'pr_warn'; did you mean 'pci_warn'? [-Werror=implicit-function-declaration] 22 | pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ | ^~~~~~~ include/asm-generic/bug.h:62:57: note: in expansion of macro 'BUG' 62 | #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0) | ^~~ drivers/gpu/drm/amd/amdgpu/../powerplay/arcturus_ppt.c:2157:2: note: in expansion of macro 'BUG_ON' 2157 | BUG_ON(numbytes > MAX_SW_I2C_COMMANDS); Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit ff203e35384ec5cb30f8fa16f0312e532d74d993 Author: Alex Deucher Date: Tue Jul 21 15:31:52 2020 -0400 drm/amdgpu/smu11: drop code chuck that got accidently re-added Seems to be due to a bad merge. Code was originally added in commit 5aaa8fff3aa950 ("drm/amd/powerplay: unload mp1 for Arcturus RAS baco reset") but later removed in commit 7f70443fd83407 ("drm/amdgpu: set mp1 state before reload"). but is back again. Signed-off-by: Alex Deucher commit bd78ecd6056d9987067db5b100d3667da6b85467 Author: Ahmad Fatoum Date: Tue Jul 14 11:30:12 2020 +0200 serial: imx: use hrtimers for rs485 delays This patch imitates 6e0a5de213 ("serial: 8250: Use hrtimers for rs485 delays") in replacing the previously used classic timers with hrtimers. The old way provided a too coarse resolution on systems with configs of less than 1000 HZ. Use of hrtimers addresses this and can be easily extended to support microsecond resolution in future when support for this arrives upstream. Signed-off-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20200714093012.21621-3-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman commit cb1a609236096c278ecbfb7be678a693a70283f1 Author: Uwe Kleine-König Date: Tue Jul 14 11:30:11 2020 +0200 serial: imx: implement rts delaying for rs485 This adds support for delays between assertion of RTS (which is supposed to enable the rs485 transmitter) and sending as well as between the last send char and deassertionof RTS. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20200714093012.21621-2-uwe@kleine-koenig.org Signed-off-by: Greg Kroah-Hartman commit 951e3956863270f664eea42dd359fea6402ce59c Author: Christophe JAILLET Date: Sat Mar 21 09:58:36 2020 +0100 ARM: davinci: dm646x-evm: Simplify error handling in 'evm_sw_setup()' There is no need to call 'gpio_free(evm_sw_gpio[i])' for these error handling cases, it is already done in the error handling path at label 'out_free'. Simplify the code and axe a few LoC. While at it, also explicitly return 0 in the normal path. Signed-off-by: Christophe JAILLET Signed-off-by: Sekhar Nori commit f000223c981a7c75f6f3ab7288f0be7b571c3644 Author: Eric Biggers Date: Tue Jul 21 11:10:12 2020 -0700 fscrypt: restrict IV_INO_LBLK_* to AES-256-XTS IV_INO_LBLK_* exist only because of hardware limitations, and currently the only known use case for them involves AES-256-XTS. Therefore, for now only allow them in combination with AES-256-XTS. This way we don't have to worry about them being combined with other encryption modes. (To be clear, combining IV_INO_LBLK_* with other encryption modes *should* work just fine. It's just not being tested, so we can't be 100% sure it works. So with no known use case, it's best to disallow it for now, just like we don't allow other weird combinations like AES-256-XTS contents encryption with Adiantum filenames encryption.) This can be relaxed later if a use case for other combinations arises. Fixes: b103fb7653ff ("fscrypt: add support for IV_INO_LBLK_64 policies") Fixes: e3b1078bedd3 ("fscrypt: add support for IV_INO_LBLK_32 policies") Link: https://lore.kernel.org/r/20200721181012.39308-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 66ed86d6377abdf7a2dd8e2654e5a90e65201cd7 Author: Kieran Bingham Date: Wed Jul 15 13:48:32 2020 +0100 ARM: davinci: Fix trivial spelling The word 'descriptor' is misspelled throughout the tree. Fix it up accordingly: decriptors -> descriptors Reviewed-by: Bartosz Golaszewski Signed-off-by: Kieran Bingham [nsekhar@ti.com: fixed up subject prefix] Signed-off-by: Sekhar Nori commit 23a98b6eb808e2080d6d4acba931b5db3aac9a16 Author: Vaibhav Gupta Date: Mon Jul 20 17:34:15 2020 +0530 serial: pch_uart: use generic power management Drivers using legacy PM have to manage PCI states and device's PM states themselves. They also need to take care of configuration registers. With improved and powerful support of generic PM, PCI Core takes care of above mentioned, device-independent, jobs. This driver makes use of PCI helper functions like pci_save/restore_state(), pci_enable_device() and pci_set_power_state() to do required operations. In generic mode, they are no longer needed. Change function parameter in both .suspend() and .resume() to "struct device*" type. Use dev_get_drvdata() to get drv data. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200720120414.399961-1-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit aaad2940c754ee186609f5f46cb1ec2ff3072c3f Author: Alexander A. Klimov Date: Sat Jul 18 12:30:18 2020 +0200 serial: altera_jtaguart: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Tobias Klauser Link: https://lore.kernel.org/r/20200718103018.3164-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 4ed71addf51a627397826f11328d6ce0f69d6d34 Author: Tamseel Shams Date: Thu Jul 16 17:24:38 2020 +0530 serial: core: Fix Coding Style This patch fixes the following checkpatch error and warning: 1. space required after ',' 2. Missing a blank line after declarations Signed-off-by: Tamseel Shams Link: https://lore.kernel.org/r/20200716115438.9967-1-m.shams@samsung.com Signed-off-by: Greg Kroah-Hartman commit 82ee0b147cac6111498ae841ab2afbe046a304f1 Author: Alexander A. Klimov Date: Sat Jul 18 12:08:07 2020 +0200 tty: serial: uartlite: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200718100807.983-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit d4c2b4e730e8bdfe818b222e018fe891a1db52ee Author: Alexander A. Klimov Date: Sat Jul 18 14:38:40 2020 +0200 tty: serial: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200718123840.19957-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit a6fdf0c77154a29883f5b46f1137d1d76aaf5f6c Author: Alexander A. Klimov Date: Sat Jul 18 15:34:52 2020 +0200 tty: vt: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200718133452.24290-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 3d7b0ca5300bd01b176f2b4c10e173db802560d8 Author: Colin Ian King Date: Tue Jul 21 16:06:13 2020 +0100 phy: qualcomm: fix setting of tx_deamp_3_5db when device property read fails Currently when reading of the device property for "qcom,tx-deamp_3_5db" fails the default is being assigned incorrectly to phy_dwc3->rx_eq. This looks like a copy-n-paste error and in fact should be assigning the default instead to phy_dwc3->tx_deamp_3_5db Addresses-Coverity: ("Copy-paste error") Fixes: ef19b117b834 ("phy: qualcomm: add qcom ipq806x dwc usb phy driver") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200721150613.416876-1-colin.king@canonical.com Signed-off-by: Vinod Koul commit 783f6d3dcf35f7b63783756710bebcecb3067f83 Author: Álvaro Fernández Rojas Date: Mon Jul 20 15:12:09 2020 +0200 phy: bcm63xx-usbh: Add BCM63xx USBH driver Add BCM63xx USBH PHY driver for BMIPS. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Simon Arlott Link: https://lore.kernel.org/r/20200720131209.1236590-3-noltari@gmail.com Signed-off-by: Vinod Koul commit 960004121075241330457a3306ad735dd27d76c2 Author: Álvaro Fernández Rojas Date: Mon Jul 20 15:12:08 2020 +0200 dt-bindings: phy: add bcm63xx-usbh bindings Document BCM63xx USBH PHY bindings. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200720131209.1236590-2-noltari@gmail.com Signed-off-by: Vinod Koul commit 1dea06cd643da38931382ebdc151efced201ffad Author: Russell King Date: Tue Jul 21 15:40:43 2020 +0100 phy: armada-38x: fix NETA lockup when repeatedly switching speeds The mvneta hardware appears to lock up in various random ways when repeatedly switching speeds between 1G and 2.5G, which involves reprogramming the COMPHY. It is not entirely clear why this happens, but best guess is that reprogramming the COMPHY glitches mvneta clocks causing the hardware to fail. It seems that rebooting resolves the failure, but not down/up cycling the interface alone. Various other approaches have been tried, such as trying to cleanly power down the COMPHY and then take it back through the power up initialisation, but this does not seem to help. It was finally noticed that u-boot's last step when configuring a COMPHY for "SGMII" mode was to poke at a register described as "GBE_CONFIGURATION_REG", which is undocumented in any external documentation. All that we have is the fact that u-boot sets a bit corresponding to the "SGMII" lane at the end of COMPHY initialisation. Experimentation shows that if we clear this bit prior to changing the speed, and then set it afterwards, mvneta does not suffer this problem on the SolidRun Clearfog when switching speeds between 1G and 2.5G. This problem was found while script-testing phylink. This fix also requires the corresponding change to DT to be effective. See "ARM: dts: armada-38x: fix NETA lockup when repeatedly switching speeds". Fixes: 14dc100b4411 ("phy: armada38x: add common phy support") Signed-off-by: Russell King Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/E1jxtRj-0003Tz-CG@rmk-PC.armlinux.org.uk Signed-off-by: Vinod Koul commit 6c89533deeb36a8f2a7571e13d338edd2c76d473 Author: Russell King Date: Tue Jul 21 15:40:33 2020 +0100 dt: update Marvell Armada 38x COMPHY binding Update the Marvell Armada 38x COMPHY binding with an additional optional register pair describing the location of an undocumented system register controlling something to do with the Gigabit Ethernet and COMPHY. There is one bit for each COMPHY lane that may be using the serdes, but exactly what this register does is completely unknown. This register only appears to exist on Armada 38x devices, and not other SoCs using the NETA ethernet block, so it seems logical that it should be part of the COMPHY. This is also how u-boot groups this register; it is dealt with as part of the COMPHY initialisation there. However, at the end of the day, due to the undocumented nature of this register, we can only guess. Signed-off-by: Russell King Acked-by: Rob Herring Link: https://lore.kernel.org/r/E1jxtRZ-0003Ta-4h@rmk-PC.armlinux.org.uk Signed-off-by: Vinod Koul commit 04d5ce620f794f1df69b5f1b9ad62910fea547f1 Author: Jingle Wu Date: Mon Jul 20 12:46:10 2020 -0700 Input: elan_i2c - add support for high resolution reports Newer controllers (identified as "pattern" version 2) send higher resolution reports, with 16-bit X and Y coordinates (previous generations used 12-bit values). These new high resolution reports use report ID of 0x60. SMbus controllers use the same buffer size for both the new and old reports, and because of that high resolution reports no longer carry area of contact data with SMbus. Signed-off-by: Jingle Wu Link: https://lore.kernel.org/r/20200710054116.5529-1-jingle.wu@emc.com.tw Signed-off-by: Dmitry Torokhov commit 5648d1c9cadb0a6afb29dd8891159906dadf5c77 Author: Navid Emamdoost Date: Sat Jul 18 00:47:26 2020 -0500 mt76: mt76u: add missing release on skb in __mt76x02u_mcu_send_msg In the implementation of __mt76x02u_mcu_send_msg() the skb is consumed all execution paths except one. Release skb before returning if test_bit() fails. Signed-off-by: Navid Emamdoost Signed-off-by: Felix Fietkau commit 2bccc8415883c1cd5ae8836548d9783dbbd84999 Author: Lorenzo Bianconi Date: Tue Jul 21 10:19:22 2020 +0200 mt76: mt7615: fix possible memory leak in mt7615_mcu_wtbl_sta_add Free the second mcu skb if __mt76_mcu_skb_send_msg() fails to transmit the first one in mt7615_mcu_wtbl_sta_add(). Fixes: 99c457d902cf9 ("mt76: mt7615: move mt7615_mcu_set_bmc to mt7615_mcu_ops") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4c7e1711cf4cdaf7124d3794c42c1b29af72740b Author: Ryder Lee Date: Sun Jul 12 01:25:51 2020 +0800 mt76: mt7915: fix potential memory leak in mcu message handler Fix potential memory leak in mcu message handler on error condition. Fixes: c6b002bcdfa6 ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 1f8284150dbc6a6995d8647be025944ebc29ad26 Author: Lorenzo Bianconi Date: Fri Jul 17 10:57:39 2020 +0200 mt76: mt76s: move queue accounting in mt76s_tx_queue_skb In order to avoid possible overflows, move tx queue accounting from mt7663s_tx_run_queue() to mt76s_tx_queue_skb_raw()/mt76s_tx_queue_skb() Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a66cbdd6573db8515735d37793c22605432c346d Author: Sean Wang Date: Wed Jul 15 14:46:31 2020 +0200 mt76: mt7615: introduce mt7663s support Introduce support for mt7663s 802.11ac 2x2:2 chipset to mt7615 driver. Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit d39b52e31aa641c79d0a1177f9d02e71d1b7fd64 Author: Sean Wang Date: Wed Jul 15 14:46:30 2020 +0200 mt76: introduce mt76_sdio module Introduce mt76_sdio module as common layer to add mt7663s support Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 90520afbae5f01c67f6b7ad580e0de90adab21a6 Author: Lorenzo Bianconi Date: Wed Jul 15 14:46:29 2020 +0200 mt76: mt7615: introduce mt7663-usb-sdio-common module Introduce mt7663-usb-sdio-common module as container for shared code between usb and sdio driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0fa407c320695f03847872b7a7d96b732901504d Author: Lorenzo Bianconi Date: Wed Jul 15 14:46:28 2020 +0200 mt76: mt7615: sdio code must access rate/key regs in preocess context As usb, sdio relies on mt76 workqueue to configure tx rate or upload keys to the hw. This is a preliminary patch to add SDIO support to mt76 driver Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 75b10f0cbd0b9ff5d6a8f0c3ee5ce4193cd0450a Author: Lorenzo Bianconi Date: Wed Jul 15 14:46:27 2020 +0200 mt76: mt76u: add mt76_skb_adjust_pad utility routine Introduce mt76_skb_adjust_pad to reuse the code adding sdio support to mt7615 driver and remove code duplication. Move 4B header configuration for usb devices out of mt76_skb_adjust_pad Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit cdcba424814d79e3dbffa06668f72099288a23f6 Author: Lorenzo Bianconi Date: Wed Jul 15 14:46:26 2020 +0200 mt76: mt7615: take into account sdio bus configuring txwi usb and sdio relies on SF architecture. This is a preliminary patch to add SDIO support to mt76 driver Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a6e29d8ecd3d4eea8748d81d7b577083b4a7c441 Author: Ryder Lee Date: Mon Jun 15 02:23:33 2020 +0800 mt76: mt7915: add missing CONFIG_MAC80211_DEBUGFS Add CONFIG_MAC80211_DEBUGFS to fix a reported warning. Fixes: ec9742a8f38e ("mt76: mt7915: add .sta_add_debugfs support") Reported-by: kernel test robot Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit eb744e5df86cf7e377d0acc4e686101b0fd9663a Author: Dan Carpenter Date: Thu Jul 9 14:04:35 2020 +0300 mt76: mt7915: potential array overflow in mt7915_mcu_tx_rate_report() Smatch complains that "wcidx" value comes from the network and thus cannot be trusted. In this case, it actually seems to come from the firmware. If your wireless firmware is malicious then probably no amount of carefulness can protect you. On the other hand, these days we still try to check the firmware as much as possible. Verifying that the index is within bounds will silence a static checker warning. And it's harmless and a good exercise in kernel hardening. So I suggest that we do add a bounds check. Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Dan Carpenter Signed-off-by: Felix Fietkau commit 9248c08c3fc4ef816c82aa49d01123f4746d349f Author: Sean Wang Date: Wed Jul 8 03:16:48 2020 +0800 mt76: mt7615: fix potential memory leak in mcu message handler Fix potential memory leak in mcu message handler on error condition. Fixes: 0e6a29e477f3 ("mt76: mt7615: add support to read temperature from mcu") Acked-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit c876039e95559350ee101d4b6f6084d9803f2995 Author: Sean Wang Date: Wed Jul 8 03:16:47 2020 +0800 mt76: mt7663u: fix potential memory leak in mcu message handler Fix potential memory leak in mcu message handler on error condition. Fixes: eb99cc95c3b6 ("mt76: mt7615: introduce mt7663u support") Acked-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 4a850f8dc68b8c4a20333521b31600c9d31ccb5d Author: Sean Wang Date: Wed Jul 8 03:16:46 2020 +0800 mt76: mt7663u: fix memory leak in set key Fix memory leak in set key. Fixes: eb99cc95c3b6 ("mt76: mt7615: introduce mt7663u support") Signed-off-by: Sean Wang Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d71d67a706352b0111a17fc8d005aeceb9a5ffd1 Author: Lorenzo Bianconi Date: Tue Jul 7 23:27:20 2020 +0200 mt76: mt7615: reschedule ps work according to last activity Reschedule runtime-pm delayed work if there is a new activity when ps delayed work is already scheduled Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e9eb59c60d21ba3433868c89eb2460e70a2101fd Author: Lorenzo Bianconi Date: Tue Jul 7 23:23:11 2020 +0200 mt76: mt7615: avoid scheduling runtime-pm during hw scan Do not schedule ps_work during hw scanning or hw scheduled frequency scan Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4bb586bc33b9845d76fc8d4efc2910e37876c399 Author: Lorenzo Bianconi Date: Fri Jul 3 10:17:35 2020 +0200 mt76: mt7663u: sync probe sampling with rate configuration On usb device rate configuration for sampling is performed relying on a workqueue since it is not possible to access the device in the interrupt context. Move the configuration of the probe_rate flag in the workqueue in order to keep probe sampling in sync with actual rate configuration Fixes: eb99cc95c3b6 ("mt76: mt7615: introduce mt7663u support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 894b7767ec2fc21574775c354ab5350e51c2171c Author: Lorenzo Bianconi Date: Fri Jul 3 10:16:01 2020 +0200 mt76: mt7615: improve mt7615_driver_own reliability mt7615_driver_own can fail if it runs too close to mt7615_fw_own. In order to improve mt7615_driver_own reliability, retry to get runtime-pm ownership if mt7615_driver_own fails Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ec4b9f380c15933e3dea72bb4723ea5e21d35b13 Author: Lorenzo Bianconi Date: Fri Jul 3 10:16:00 2020 +0200 mt76: mt7615: add idle-timeout knob in mt7615 debugfs Introduce idle-timeout knob in mt7615 debugfs in order to configure the idle time to switch to low-power state Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 83b9f42aea988274195ae31df5af5b4a5328886d Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:59 2020 +0200 mt76: mt7615: enable beacon hw filter for runtime-pm In order to reduce number of received interrupts and power consumption, enable hw beacon filter if runtime-pm is enabled Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b5b4c7ddf11063dbc231a1ac955eff117d93fd70 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:58 2020 +0200 mt76: mt7615: add runtime-pm knob in mt7615 debugfs Introduce runtime-pm knob in mt7615 debugfs in order to enable/disable runtime pm available in offload firmware Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1f549009b5b2f26db01e334dc00db160ee12c0e1 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:57 2020 +0200 mt76: mt7615: do not request {driver,fw}_own if already granted Check MT76_STATE_PM in mt7615_driver_own/mt7615_firmware_own in order to not requested power ownership if it is already granted Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a2b30bd4096e5c95a7fed72102de6fff2b138ff7 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:56 2020 +0200 mt76: mt7615: check MT76_STATE_PM flag before accessing the device Double-check if the device is in low-power state before accessing registermap in mt7615_sta_rate_tbl_update() and in mt7615_led_set_config() Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1eae3fb949c146c10476692fb4625290c7060676 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:55 2020 +0200 mt76: mt7615: run mt7615_pm_wake in mt7615_mac_sta_{add,remove} Run mt7615_pm_wake()/mt7615_pm_power_save_sched() directly in order to wake the device from low power state in mt7615_mac_sta_{add,remove} since they run holding mt76 mutex in common mt76 code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2b8cdfb28d3402b25fab47ffe70b6d858d26a2c1 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:54 2020 +0200 mt76: mt7615: wake device before pushing frames in mt7615_tx Queue frames pushed by mac80211 running mt7615_tx if the device is low-power state. Run wake workqueue in order to swicth to full-power before transmitting pending frames Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5cf8f7794d32e3ea7af6f04139a77157c536d4b5 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:53 2020 +0200 mt76: mt7615: wake device before pulling packets from mac80211 queues Make sure the device is in full-power before pulling frames from mac80211 queues Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 46dadc3104415ad834db1be3208311fd5f02e3ab Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:52 2020 +0200 mt76: mt7615: run mt7615_mcu_set_roc holding mt76 mutex Make sure to run mt7615_mcu_set_roc() holding mt76 mutex in order to wake the device from low power state and avoid races Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit de1f66bab9b7d9c1c80ae18bb1d85b699bbf8f44 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:51 2020 +0200 mt76: mt7615: run mt7615_mcu_set_wmm holding mt76 mutex Make sure to run mt7615_mcu_set_wmm() holding mt76 mutex in order to wake the device from low power state and avoid races Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 030aaeddbab161403aa4e4f34b84971bb5db7a9f Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:50 2020 +0200 mt76: mt7615: add missing lock in mt7615_regd_notifier Make sure to run mt7615_dfs_init_radar_detector in mt7615_regd_notifier holding mt76 mutex in order to avoid races and set the device in full power Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 888a678a64e08c4c0478daf773bf8f7a937895ed Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:49 2020 +0200 mt76: mt7615: wake device before performing freq scan Set device in full power before performing hw scan or hw scheduled scan Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3d0558c82200f86715f0db59e636144551c7c0ba Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:48 2020 +0200 mt76: mt7615: acquire driver_own before configuring device for suspend Make sure to wake the device in mt7615_pci_suspend in order to properly configure device registers before suspend Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 04414240adb7092a03a2ede3cd3e24d461adb756 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:47 2020 +0200 mt76: mt7615: wake device in mt7615_update_channel before access regmap Introduce mt7615_update_survey utility routine in order to compute survey stats without waking up the device since it runs holding mt76 lock. Run mt7615_pm_wake directly in mt7615_update_channel since it can run with mt76.mutex held if called by mac80211 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit de5ff3c9d1a2d6ecbe4b8d29565430e7ce29bac2 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:46 2020 +0200 mt76: mt7615: introduce pm_power_save delayed work Introduce runtime-pm power_save delayed work used to enable low-power after an inactivity period Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 940a0c63e0c3df5881ff4a034501638de01a63a9 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:45 2020 +0200 mt76: mt7615: wake device before configuring hw keys Make sure the device is in full-power before uploading keys to the hw Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ea4906c4be4944f8341d500f83267d1ba3e8e838 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:44 2020 +0200 mt76: mt7615: wake device before accessing regmap in debugfs Make sure the device is in full-power before reading regs in debugfs Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit adfd5112c81b31cc4c9ac481bd0ad372149771ea Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:43 2020 +0200 mt76: mt7615: introduce mt7615_mutex_{acquire,release} utilities Introduce mt7615_mutex_{acquire,release} utility routines in order to switch in full-power/low-power before/after accessing device register-map Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 08523a2a1db5eba808de0ba0a7aa29cb993771dd Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:42 2020 +0200 mt76: mt7615: add mt7615_pm_wake utility routine Introduce mt7615_pm_wake utility routine to wake the device from runtime low-power state (lower-power state is currently supported by offload firmware for pcie devices). Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a86f1d01f5ce5c5e6c685168747822e82ba5bf83 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:41 2020 +0200 mt76: move mt76 workqueue in common code Move mt76 workqueue from usb to common code in order to be reused adding low-power support for mt7663 chipset Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 757b0e7fd6f4f2e558fac602ea34a9be20143c95 Author: Lorenzo Bianconi Date: Fri Jul 3 10:15:40 2020 +0200 mt76: mt7615: avoid polling in fw_own for mt7663 According to the vendor sdk, mt7663 does not need to poll register after firmware own. Since just mt7622 polls status register, set proper timeout value according to the vendor sdk Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0d4b6909987723f11c23b3a996499cb8f7a0e2b7 Author: Ryder Lee Date: Wed Jul 1 16:13:07 2020 +0800 mt76: mt7915: avoid memcpy in rxv operation Avoid memcpy in Rx hot path to slightly improve performance. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 05b5a339a7b2308ec38563a7da6649ff1f9cc28b Author: Lorenzo Bianconi Date: Mon Jun 29 19:05:33 2020 +0200 mt76: mt76x2u: enable HC-M7662BU1 Enable support for HC-M7662BU1 module on mt76x2u driver Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 40ba9a938fb40e69d14c8e102d2c675ccc6868cc Author: Lorenzo Bianconi Date: Mon Jun 29 17:12:16 2020 +0200 mt76: mt76x2: fix pci suspend/resume on mt7612e Fix the following mt7612e hw hangs during suspend/resume reported on Dell Vostro 3360 mt76x2e 0000:01:00.0: MCU message 2 (seq 11) timed out mt76x2e 0000:01:00.0: MCU message 30 (seq 12) timed out mt76x2e 0000:01:00.0: MCU message 30 (seq 13) timed out mt76x2e 0000:01:00.0: Firmware Version: 0.0.00 mt76x2e 0000:01:00.0: Build: 1 mt76x2e 0000:01:00.0: Build Time: 201507311614____ mt76x2e 0000:01:00.0: Firmware running! ieee80211 phy0: Hardware restart was requested mt76x2e 0000:01:00.0: MCU message 2 (seq 1) timed out mt76x2e 0000:01:00.0: MCU message 30 (seq 2) timed out mt76x2e 0000:01:00.0: MCU message 30 (seq 3) timed out mt76x2e 0000:01:00.0: Firmware Version: 0.0.00 mt76x2e 0000:01:00.0: Build: 1 mt76x2e 0000:01:00.0: Build Time: 201507311614____ mt76x2e 0000:01:00.0: Firmware running! ieee80211 phy0: Hardware restart was requested mt76x2e 0000:01:00.0: MCU message 31 (seq 5) timed out mt76x2e 0000:01:00.0: MCU message 31 (seq 6) timed out mt76x2e 0000:01:00.0: MCU message 31 (seq 7) timed out mt76x2e 0000:01:00.0: MCU message 31 (seq 8) timed out mt76x2e 0000:01:00.0: MCU message 31 (seq 9) timed out mt76x2e 0000:01:00.0: MCU message 31 (seq 10) timed out mt76x2e 0000:01:00.0: MCU message 31 (seq 11) timed out mt76x2e 0000:01:00.0: Firmware Version: 0.0.00 mt76x2e 0000:01:00.0: Build: 1 mt76x2e 0000:01:00.0: Build Time: 201507311614____ mt76x2e 0000:01:00.0: Firmware running! ieee80211 phy0: Hardware restart was requested ------------[ cut here ]----------- CPU: 3 PID: 11956 Comm: kworker/3:1 Not tainted 5.7.0-pf2 #1 Hardware name: Dell Inc. Vostro 3360/0F5DWF, BIOS A18 09/25/2013 Workqueue: events_freezable ieee80211_restart_work [mac80211] RIP: 0010:ieee80211_reconfig+0x234/0x1700 [mac80211] RSP: 0018:ffffb803c23ffdf0 EFLAGS: 00010286 RAX: 00000000fffffff0 RBX: ffff9595a7564900 RCX: 0000000000000008 RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000100 RBP: ffff9595a7ec07e0 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000000000 R12: ffff9595a7ec18d0 R13: 00000000ffffffff R14: 0000000000000000 R15: 00000000fffffff0 FS: 0000000000000000(0000) GS:ffff9595af2c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055e56d7de000 CR3: 000000042200a001 CR4: 00000000001706e0 Call Trace: ieee80211_restart_work+0xb7/0xe0 [mac80211] process_one_work+0x1d4/0x3c0 worker_thread+0x228/0x470 ? process_one_work+0x3c0/0x3c0 kthread+0x19c/0x1c0 ? __kthread_init_worker+0x30/0x30 ret_from_fork+0x35/0x40 wlp1s0: Failed check-sdata-in-driver check, flags: 0x0 CPU: 3 PID: 11956 Comm: kworker/3:1 Tainted: G W 5.7.0-pf2 #1 Hardware name: Dell Inc. Vostro 3360/0F5DWF, BIOS A18 09/25/2013 Workqueue: events_freezable ieee80211_restart_work [mac80211] RIP: 0010:drv_remove_interface+0x11f/0x130 [mac80211] RSP: 0018:ffffb803c23ffc80 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff9595a7564900 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000082 RDI: 00000000ffffffff RBP: ffff9595a7ec1930 R08: 00000000000004b6 R09: 0000000000000001 R10: 0000000000000001 R11: 0000000000006f08 R12: ffff9595a7ec1000 R13: ffff9595a75654b8 R14: ffff9595a7ec0ca0 R15: ffff9595a7ec07e0 FS: 0000000000000000(0000) GS:ffff9595af2c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055e56d7de000 CR3: 000000042200a001 CR4: 00000000001706e0 Call Trace: ieee80211_do_stop+0x5af/0x8c0 [mac80211] ieee80211_stop+0x16/0x20 [mac80211] __dev_close_many+0xaa/0x120 dev_close_many+0xa1/0x2b0 dev_close+0x6d/0x90 cfg80211_shutdown_all_interfaces+0x71/0xd0 [cfg80211] ieee80211_reconfig+0xa2/0x1700 [mac80211] ieee80211_restart_work+0xb7/0xe0 [mac80211] process_one_work+0x1d4/0x3c0 worker_thread+0x228/0x470 ? process_one_work+0x3c0/0x3c0 kthread+0x19c/0x1c0 ? __kthread_init_worker+0x30/0x30 ret_from_fork+0x35/0x40 Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e") Tested-by: Oleksandr Natalenko Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d9ea74c4131626396c783ad0d2162b13a0c4490c Author: Ryder Lee Date: Thu Jun 25 01:23:17 2020 +0800 mt76: mt7915: update HE capabilities Sync from SDK to update HE capabilities. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 4f0bce1c8888245e006f8c88f44b7419b47a1b4b Author: Felix Fietkau Date: Thu Jun 18 21:14:43 2020 +0200 mt76: mt7615: implement testmode support Supports sending a configurable number of packets with a specific rate and configurable tx power levels / antenna settings, as well as displaying rx statistics. Signed-off-by: Felix Fietkau commit f0efa8621550e77492719072d056f30569242b6b Author: Felix Fietkau Date: Thu Jun 18 21:12:24 2020 +0200 mt76: add API for testmode support This can be used for calibration in the manufacturing process. It supports sending a configurable number of packets with a specific rate and configurable tx power levels / antenna settings. It also supports receiving packets and showing some statistics, including packet counters and detailed RSSI information. It will only be compiled in if CONFIG_NL80211_TESTMODE is enabled Signed-off-by: Felix Fietkau commit beffe070b1880e7c53e3fc76f2e4e8f31d18f7c5 Author: Felix Fietkau Date: Thu Jun 11 17:45:58 2020 +0200 mt76: vif_mask to struct mt76_phy All drivers use this in pretty much the same way. Moving it to core helps with some checks for the upcoming testmode support Signed-off-by: Felix Fietkau commit b8c978663efb3991369b4944f79b098fc7ebb4e4 Author: Felix Fietkau Date: Thu Jun 18 20:38:45 2020 +0200 mt76: mt7615: use full on-chip memory address for WF_PHY registers Now that the bus access functions can use mapping for accessing full register addresses, use it for WF_PHY registers to keep them constant. Needed for follow-up work on testmode support Signed-off-by: Felix Fietkau commit dc80405868e4d8ac94209cbdeb1e4de5b4991a01 Author: Felix Fietkau Date: Thu Jun 18 20:33:32 2020 +0200 mt76: mt7615: add support for accessing RF registers via MCU Includes debugfs files for testing it. Will be used for testmode support. Signed-off-by: Felix Fietkau commit 557b5a17476893e2f40fd8e66eb46362804df2f5 Author: Felix Fietkau Date: Wed Jun 17 20:44:23 2020 +0200 mt76: mt7615: add support for accessing mapped registers via bus ops Makes it possible to read/write them via debugfs, similar to mt7603 Signed-off-by: Felix Fietkau commit 5bb923c767a4d2b4c20e7d4f437e35754ccd6554 Author: Felix Fietkau Date: Wed Jun 17 15:21:39 2020 +0200 mt76: mt7615: schedule tx tasklet and sta poll on mac tx free Unlike on earlier chips, DMA completion on MT7615 does not imply actually having sent out any packets. Since AQL will prevent filling the hardware queues and will only allow more packets to be passed to the driver after tx completion, it makes much more sense to schedule the tx tasklet there. This is also needed for scheduling tx in testmode support Signed-off-by: Felix Fietkau commit 6ed942af4f68173eb511bc342d53f2593182d449 Author: Lorenzo Bianconi Date: Thu Jun 18 19:00:23 2020 +0200 mt76: mt76x2e: rename routines in pci.c Rely on mt76x2e prefix in mt76x2/pci.c and align to the rest of mt76 code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit dc076af55b86b4992114f6b3b889fbc96c5d4fd4 Author: Ryder Lee Date: Mon Jun 22 10:16:55 2020 +0800 mt76: mt7915: overwrite qid for non-bufferable mgmt frames Overwrite hw queue id for non-bufferable management frames if the hw/fw support always txq (altxq) in order to be in sync with mac txwi code Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 80c9934004046a99f29ec89140556a2733641783 Author: Ryder Lee Date: Mon Jun 15 02:23:36 2020 +0800 mt76: mt7915: use ieee80211_tx_queue_params to avoid open coded This is easy to add MU EDCA parameters in the future. This patch also fixes a wrong cw_min assignment. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit f68e6a1f85c148f0b238bdaef22f31b01d5cf51e Author: Ryder Lee Date: Mon Jun 15 02:23:35 2020 +0800 mt76: mt7915: add MU-MIMO support Enable MU-MIMO DL/UL and add relative counters in debugfs. Currently MU modules read WTBL first to notify BA changes to other cross modules, so adjust mt7915_mcu_sta_ba() accordingly. Tested-by: Evelyn Tsai Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit dcdecb128b2e0856e3131d93102d80bd748f2d9b Author: Ryder Lee Date: Mon Jun 15 02:23:34 2020 +0800 mt76: mt7915: add a fixed AC queue mapping In MT7915, hardware queue map is flexible. However, certain firmware modules like MU and U-APSD presume a fixed queue order to adapt some devices that have DMA scheduler with a strict order, so this patch can help in the long run. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit b876658b5e554c6bd251720b7cd40de5b5f6c366 Author: Ryder Lee Date: Thu Jun 18 12:41:48 2020 +0800 mt76: mt7615: add .set_tsf callback It is useful for IBSS Mesh to adjust t_clockdrift. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit b807b368c4f9bbdb8410dcc6241d7903094f0bef Author: Lorenzo Bianconi Date: Fri Jun 12 13:46:31 2020 +0200 mt76: add U-APSD support on AP side Introduce U-APSD support in mt76 driver for AP interface Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4a58d5d1097a6b1918c4e307a8d30211ba721932 Author: Lorenzo Bianconi Date: Fri Jun 12 12:08:59 2020 +0200 mt76: rely on register macros For consistency with the rest of the code always rely on defined macros for register access Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e39da597e5782a5fcdad0c23dee61dbe05d327b8 Author: Markus Theil Date: Fri Jun 12 10:05:23 2020 +0200 mt76: fix include in pci.h kernel test robot found the following issue and Kalle Valo forwarded it to Linux wireless. drivers/net/wireless/mediatek/mt76/pci.c:8:6: warning: no previous prototype for 'mt76_pci_disable_aspm' Fix this by adding the missing include of mt76.h as Kalle suggested. Signed-off-by: Markus Theil Signed-off-by: Felix Fietkau commit 9da82fb76d6cea157e31bf0c247d2b4c6883cead Author: Markus Theil Date: Thu Jun 11 14:40:22 2020 +0200 mt76: allow more channels, allowed in ETSI domain While looking at the ETSI regulatory domain definitions and a patch, which allows more channels for ath10k, I also checked the channels allowed for mt76. ETSI regulations would possibly allow to add channels 32, 68, 96, 144, 169 and 173. IEEE 802.11-2016 defines no operating class for channels 32, 68 and 96. This leaves us channels 144, 169 and 173, which are included in this patch. I tested 169 and 173 with a mt76 based USB dongle (AVM AC 860) and they worked fine. If I saw that right, these channels are also covered by register definitions inside the driver. Channel 144 should also work, but gets disabled by the kernel as of now. Signed-off-by: Markus Theil Signed-off-by: Felix Fietkau commit 642023d04335458a057b549da329ee4e30c8a838 Author: Sean Wang Date: Tue Jun 9 23:42:21 2020 +0800 mt76: mt7615: fix up typo in Kconfig for MT7663U Fix up typo in Kconfig with indicating MT7663U is an 802.11ac device Fixes: eb99cc95c3b6 ("mt76: mt7615: introduce mt7663u support") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 73741b9bee690ffd7c22e25c419b9f7979afadeb Author: Sean Wang Date: Sun Jun 7 11:34:40 2020 +0200 mt76: mt7663: introduce ARP filter offload Introduce ARP filter offload Co-developed-by: Wan-Feng Jiang Signed-off-by: Wan-Feng Jiang Co-developed-by: Soul Huang Signed-off-by: Soul Huang Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit be49c5356f3923015ef7ace59c71be3013d18608 Author: Lorenzo Bianconi Date: Sat May 30 23:48:56 2020 +0200 mt76: usb: rely on mt76_for_each_q_rx Rely on mt76_for_each_q_rx whenever possible in order to simply the code Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a28bef561a5c144e7c6237626d748767fef7fc79 Author: Felix Fietkau Date: Sat May 30 17:19:45 2020 +0200 mt76: mt7615: re-enable offloading of sequence number assignment Preparation for supporting more offload features Signed-off-by: Felix Fietkau commit d3c829985234450c0278e4fad994b70c8376c3b6 Author: Lorenzo Bianconi Date: Mon Jun 1 09:45:33 2020 +0200 mt76: overwrite qid for non-bufferable mgmt frames Overwrite hw queue id for non-bufferable management frames if the hw support always txq (altxq) in order to be in sync with mac txwi code Fixes: cdad4874057d ("mt76: mt7615: add dma and tx queue initialization for MT7622") Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support") Suggested-by: Felix Fietkau Tested-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1fec635bcc9e14604f06d0947725fd3c613e1af0 Author: Lorenzo Bianconi Date: Sun May 31 00:32:04 2020 +0200 mt76: mt7615: fix hw queue mapping mt7622/mt7663 chipsets rely on a fixed reverse queue map order respect to mac80211 one: - q(0): IEEE80211_AC_BK - q(1): IEEE80211_AC_BE - q(2): IEEE80211_AC_VI - q(3): IEEE80211_AC_VO Fixes: cdad4874057d ("mt76: mt7615: add dma and tx queue initialization for MT7622") Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Co-developed-by: Ryder Lee Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8fc49625a33ad070013773b923fb945340000e37 Author: Lorenzo Bianconi Date: Sat May 30 23:51:27 2020 +0200 mt76: mt7615: fix lmac queue debugsfs entry acs and wmm index are swapped in mt7615_queues_acq respect to the hw design Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2cb002e3c29434b0159a3a4d343d460264dae2ac Author: Lorenzo Bianconi Date: Tue Jun 2 22:26:38 2020 +0200 mt76: add missing lock configuring coverage class Coverage class callback can potentially run in parallel with other routines (e.g. mt7615_set_channel) that configures timing registers. Run coverage class callback holding mt76 mutex Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 71614e1c21cdc5dc90a50127ac843416c26dce7e Author: Andy Shevchenko Date: Sat Jul 11 16:53:46 2020 +0300 Revert "serial: sh-sci: Initialize spinlock for uart console" This reverts commit f38278e9b810b06aff2981d505267be984423ba3. There has been a quick fix against uninitialised lock revealed by the commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()"). Since we have now better fix in serial core, this may be safely reverted. Fixes: f38278e9b810 ("serial: sh-sci: Initialize spinlock for uart console") Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200711135346.71171-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit dfe51d97776ef926749362f34625cd36657845d8 Author: Andy Shevchenko Date: Sat Jul 11 16:53:45 2020 +0300 Revert "serial: imx: Initialize lock for non-registered console" This reverts commit 8f065acec7573672dd15916e31d1e9b2e785566c. There has been a quick fix against uninitialised lock revealed by the commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()"). Since we have now better fix in serial core, this may be safely reverted. Fixes: 8f065acec757 ("serial: imx: Initialize lock for non-registered console") Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200711135346.71171-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c6e45ae511b192807376fdd8f9020d5301aeec6d Author: Andy Shevchenko Date: Sat Jul 11 16:53:44 2020 +0300 Revert "tty: serial: add missing spin_lock_init for SiFive serial console" This reverts commit 17b4efdf4e4867079012a48ca10d965fe9d68822. There has been a quick fix against uninitialised lock revealed by the commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()"). Since we have now better fix in serial core, this may be safely reverted. Fixes: 17b4efdf4e48 ("tty: serial: add missing spin_lock_init for SiFive serial console") Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200711135346.71171-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6a63ba971edbbfae280ea0cc4502e7ba4354125b Author: Andy Shevchenko Date: Sat Jul 11 16:53:43 2020 +0300 Revert "serial: amba-pl011: Make sure we initialize the port.lock spinlock" This reverts commit 8508f4cba308f785b2fd4b8c38849c117b407297. There has been a quick fix against uninitialised lock revealed by the commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()"). Since we have now better fix in serial core, this may be safely reverted. Fixes: 8508f4cba308 ("serial: amba-pl011: Make sure we initialize the port.lock spinlock") Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200711135346.71171-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 30336ef6f13e41097dd26c8e693ba75e802fcb21 Author: Andy Shevchenko Date: Sat Jul 11 16:53:42 2020 +0300 Revert "serial: sunhv: Initialize lock for non-registered console" This reverts commit 0f87aa66e8c314f95c00eeff978c8a0b41e05d50. There has been a quick fix against uninitialised lock revealed by the commit f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()"). Since we have now better fix in serial core, this may be safely reverted. Fixes: 0f87aa66e8c3 ("serial: sunhv: Initialize lock for non-registered console") Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200711135346.71171-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c576b9c77bea9a8ad11ddc277af3edbf15733ddd Author: Lorenzo Bianconi Date: Sun Jul 19 17:52:41 2020 +0200 bpf: cpumap: Fix possible rcpu kthread hung Fix the following cpumap kthread hung. The issue is currently occurring when __cpu_map_load_bpf_program fails (e.g if the bpf prog has not BPF_XDP_CPUMAP as expected_attach_type) $./test_progs -n 101 101/1 cpumap_with_progs:OK 101 xdp_cpumap_attach:OK Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED [ 369.996478] INFO: task cpumap/0/map:7:205 blocked for more than 122 seconds. [ 369.998463] Not tainted 5.8.0-rc4-01472-ge57892f50a07 #212 [ 370.000102] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 370.001918] cpumap/0/map:7 D 0 205 2 0x00004000 [ 370.003228] Call Trace: [ 370.003930] __schedule+0x5c7/0xf50 [ 370.004901] ? io_schedule_timeout+0xb0/0xb0 [ 370.005934] ? static_obj+0x31/0x80 [ 370.006788] ? mark_held_locks+0x24/0x90 [ 370.007752] ? cpu_map_bpf_prog_run_xdp+0x6c0/0x6c0 [ 370.008930] schedule+0x6f/0x160 [ 370.009728] schedule_preempt_disabled+0x14/0x20 [ 370.010829] kthread+0x17b/0x240 [ 370.011433] ? kthread_create_worker_on_cpu+0xd0/0xd0 [ 370.011944] ret_from_fork+0x1f/0x30 [ 370.012348] Showing all locks held in the system: [ 370.013025] 1 lock held by khungtaskd/33: [ 370.013432] #0: ffffffff82b24720 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x28/0x1c3 [ 370.014461] ============================================= Fixes: 9216477449f3 ("bpf: cpumap: Add the possibility to attach an eBPF program to cpumap") Reported-by: Jakub Sitnicki Signed-off-by: Lorenzo Bianconi Signed-off-by: Alexei Starovoitov Tested-by: Jakub Sitnicki Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/e54f2aabf959f298939e5507b09c48f8c2e380be.1595170625.git.lorenzo@kernel.org commit 0e77639e826891bf78583973d544751139567677 Author: Alexander A. Klimov Date: Mon Jul 20 23:21:10 2020 +0200 dt-bindings: aspeed-lpc: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Joel Stanley Link: https://lore.kernel.org/r/20200720212110.64214-1-grandmaster@al2klimov.de Signed-off-by: Rob Herring commit 3abbdbe3dcd39547478e8ff089026a315a124376 Author: Abanoub Sameh Date: Tue Jul 21 16:48:32 2020 +0200 gpio: crystalcove: changed every 'unsigned' to 'unsigned int' Changed 'unsigned' to 'unsigned int'. This makes the code more uniform, and compliant with the kernel coding style. Signed-off-by: Abanoub Sameh Signed-off-by: Andy Shevchenko commit 37ceab74f12f00900734109ebf9b7a6a7791a9d0 Author: Abanoub Sameh Date: Tue Jul 21 16:50:46 2020 +0200 gpio: pch: Add a blank line between declaration and code Added a lined between a declaration and other statements according to the kernel coding style. Signed-off-by: Abanoub Sameh Signed-off-by: Andy Shevchenko commit 0c106a23d6927533df560bce7096454b0c228833 Author: Abanoub Sameh Date: Tue Jul 21 16:50:45 2020 +0200 gpio: pch: changed every 'unsigned' to 'unsigned int' Changed 'unsigned' to 'unsigned int'. This makes the code more uniform, and compliant with the kernel coding style. Signed-off-by: Abanoub Sameh Signed-off-by: Andy Shevchenko commit 343ead287dde0064c430ee1db477726f52e0269c Author: Jakub Sitnicki Date: Tue Jul 21 12:07:16 2020 +0200 bpf, netns: Fix build without CONFIG_INET When CONFIG_NET is set but CONFIG_INET isn't, build fails with: ld: kernel/bpf/net_namespace.o: in function `netns_bpf_attach_type_unneed': kernel/bpf/net_namespace.c:32: undefined reference to `bpf_sk_lookup_enabled' ld: kernel/bpf/net_namespace.o: in function `netns_bpf_attach_type_need': kernel/bpf/net_namespace.c:43: undefined reference to `bpf_sk_lookup_enabled' This is because without CONFIG_INET bpf_sk_lookup_enabled symbol is not available. Wrap references to bpf_sk_lookup_enabled with preprocessor conditionals. Fixes: 1559b4aa1db4 ("inet: Run SK_LOOKUP BPF program on socket lookup") Reported-by: Randy Dunlap Reported-by: Stephen Rothwell Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/bpf/20200721100716.720477-1-jakub@cloudflare.com commit 382646090f7f16f1a93f3826004a32819d011ffe Author: Alexander A. Klimov Date: Sun Jul 19 19:44:57 2020 +0200 dt-bindings: drm/bridge: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719174457.60674-1-grandmaster@al2klimov.de Signed-off-by: Rob Herring commit a36c66910f78deeeb9dedb96d01f7a3adc3c5797 Author: Alexander A. Klimov Date: Sun Jul 19 19:24:38 2020 +0200 drm/tilcdc: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719172438.60536-1-grandmaster@al2klimov.de Signed-off-by: Rob Herring commit acc0c39a59ccd8161b9066265fb8798b4ee07dc9 Author: Ondrej Jirman Date: Fri Jul 3 13:47:17 2020 +0200 dt-binding: display: Allow a single port node on rocktech, jh057n00900 The display has one port. Allow it in the binding. Reviewed-by: Rob Herring Reviewed-by: Guido Günther Signed-off-by: Ondrej Jirman Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200703114717.2140832-3-megous@megous.com commit 724884c3eba36a941a25505aa92dc5b136140233 Author: Ondrej Jirman Date: Fri Jul 3 13:47:16 2020 +0200 dt-bindings: display: Fix example in nwl-dsi.yaml The example is now validated against rocktech,jh057n00900 schema that was ported to yaml, and didn't validate with: - '#address-cells', '#size-cells', 'port@0' do not match any of the regexes: 'pinctrl-[0-9]+' - 'vcc-supply' is a required property - 'iovcc-supply' is a required property - 'reset-gpios' is a required property Fix it. Reviewed-by: Rob Herring Reviewed-by: Guido Günther Signed-off-by: Ondrej Jirman Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200703114717.2140832-2-megous@megous.com commit 6da5238fa384a3f0d5308b3b11e10f178cb7c20c Author: Mike Rapoport Date: Tue Jul 14 14:09:44 2020 +0100 ARM: 8993/1: remove it8152 PCI controller driver The it8152 PCI host controller was only used by cm-x2xx platforms. Since these platforms were removed, there is no point to keep it8152 driver. Acked-by: Arnd Bergmann Signed-off-by: Mike Rapoport Signed-off-by: Russell King commit b4d5ec9b39f8b31d98f65bc5577b5d15d93795d7 Author: Nathan Huckleberry Date: Fri Jul 10 20:23:37 2020 +0100 ARM: 8992/1: Fix unwind_frame for clang-built kernels Since clang does not push pc and sp in function prologues, the current implementation of unwind_frame does not work. By using the previous frame's lr/fp instead of saved pc/sp we get valid unwinds on clang-built kernels. The bounds check on next frame pointer must be changed as well since there are 8 less bytes between frames. This fixes /proc//stack. Link: https://github.com/ClangBuiltLinux/linux/issues/912 Reported-by: Miles Chen Tested-by: Miles Chen Cc: stable@vger.kernel.org Reviewed-by: Nick Desaulniers Signed-off-by: Nathan Huckleberry Signed-off-by: Russell King commit 2cbd1cc3dcd3e84be1fc1987da24b190ddf24a70 Author: Stefan Agner Date: Thu Jul 9 11:21:27 2020 +0100 ARM: 8991/1: use VFP assembler mnemonics if available The integrated assembler of Clang 10 and earlier do not allow to access the VFP registers through the coprocessor load/store instructions: arch/arm/vfp/vfpmodule.c:342:2: error: invalid operand for instruction fmxr(FPEXC, fpexc & ~(FPEXC_EX|FPEXC_DEX|FPEXC_FP2V|FPEXC_VV|FPEXC_TRAP_MASK)); ^ arch/arm/vfp/vfpinstr.h:79:6: note: expanded from macro 'fmxr' asm("mcr p10, 7, %0, " vfpreg(_vfp_) ", cr0, 0 @ fmxr " #_vfp_ ", %0" ^ :1:6: note: instantiated into assembly here mcr p10, 7, r0, cr8, cr0, 0 @ fmxr FPEXC, r0 ^ This has been addressed with Clang 11 [0]. However, to support earlier versions of Clang and for better readability use of VFP assembler mnemonics still is preferred. Ideally we would replace this code with the unified assembler language mnemonics vmrs/vmsr on call sites along with .fpu assembler directives. The GNU assembler supports the .fpu directive at least since 2.17 (when documentation has been added). Since Linux requires binutils 2.21 it is safe to use .fpu directive. However, binutils does not allow to use FPINST or FPINST2 as an argument to vmrs/vmsr instructions up to binutils 2.24 (see binutils commit 16d02dc907c5): arch/arm/vfp/vfphw.S: Assembler messages: arch/arm/vfp/vfphw.S:162: Error: operand 0 must be FPSID or FPSCR pr FPEXC -- `vmsr FPINST,r6' arch/arm/vfp/vfphw.S:165: Error: operand 0 must be FPSID or FPSCR pr FPEXC -- `vmsr FPINST2,r8' arch/arm/vfp/vfphw.S:235: Error: operand 1 must be a VFP extension System Register -- `vmrs r3,FPINST' arch/arm/vfp/vfphw.S:238: Error: operand 1 must be a VFP extension System Register -- `vmrs r12,FPINST2' Use as-instr in Kconfig to check if FPINST/FPINST2 can be used. If they can be used make use of .fpu directives and UAL VFP mnemonics for register access. This allows to build vfpmodule.c with Clang and its integrated assembler. [0] https://reviews.llvm.org/D59733 Link: https://github.com/ClangBuiltLinux/linux/issues/905 Signed-off-by: Stefan Agner Signed-off-by: Russell King commit ee440336e5ef977c397afdb72cbf9c6b8effc8ea Author: Stefan Agner Date: Thu Jul 9 11:19:17 2020 +0100 ARM: 8990/1: use VFP assembler mnemonics in register load/store macros The integrated assembler of Clang 10 and earlier do not allow to access the VFP registers through the coprocessor load/store instructions: :4:6: error: invalid operand for instruction LDC p11, cr0, [r10],#32*4 @ FLDMIAD r10!, {d0-d15} ^ This has been addressed with Clang 11 [0]. However, to support earlier versions of Clang and for better readability use of VFP assembler mnemonics still is preferred. Replace the coprocessor load/store instructions with explicit assembler mnemonics to accessing the floating point coprocessor registers. Use assembler directives to select the appropriate FPU version. This allows to build these macros with GNU assembler as well as with Clang's built-in assembler. [0] https://reviews.llvm.org/D59733 Link: https://github.com/ClangBuiltLinux/linux/issues/905 Signed-off-by: Stefan Agner Signed-off-by: Russell King commit a6c30873ee4a5cc0549c1973668156381ab2c1c4 Author: Stefan Agner Date: Thu Jul 9 11:17:36 2020 +0100 ARM: 8989/1: use .fpu assembler directives instead of assembler arguments Explicit FPU selection has been introduced in commit 1a6be26d5b1a ("[ARM] Enable VFP to be built when non-VFP capable CPUs are selected") to make use of assembler mnemonics for VFP instructions. However, clang currently does not support passing assembler flags like this and errors out with: clang-10: error: the clang compiler does not support '-Wa,-mfpu=softvfp+vfp' Make use of the .fpu assembler directives to select the floating point hardware selectively. Also use the new unified assembler language mnemonics. This allows to build these procedures with Clang. Link: https://github.com/ClangBuiltLinux/linux/issues/762 Signed-off-by: Stefan Agner Signed-off-by: Russell King commit 2631781213eed013c4a3080e5195d95cf1685d7f Author: Linus Walleij Date: Wed May 27 15:19:50 2020 +0100 ARM: 8982/1: mm: Simplify act_mm macro The act_mm assembly macro is actually partly reimplementing get_thread_info so let's just use that. Suggested-by: Russell King Signed-off-by: Linus Walleij Signed-off-by: Russell King commit 846484ea73f17c86533496455bcf49f373dde3fd Author: Masahiro Yamada Date: Tue May 26 14:20:31 2020 +0100 ARM: 8981/1: add arch/arm/Kbuild Use the standard obj-y form to specify the sub-directories under arch/arm/. No functional change intended. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King commit b43870c74f3fdf0cd06bf5f1b7a5ed70a2cd4ed2 Author: Max Englander Date: Sat Jul 4 15:15:28 2020 +0000 audit: report audit wait metric in audit status reply In environments where the preservation of audit events and predictable usage of system memory are prioritized, admins may use a combination of --backlog_wait_time and -b options at the risk of degraded performance resulting from backlog waiting. In some cases, this risk may be preferred to lost events or unbounded memory usage. Ideally, this risk can be mitigated by making adjustments when backlog waiting is detected. However, detection can be difficult using the currently available metrics. For example, an admin attempting to debug degraded performance may falsely believe a full backlog indicates backlog waiting. It may turn out the backlog frequently fills up but drains quickly. To make it easier to reliably track degraded performance to backlog waiting, this patch makes the following changes: Add a new field backlog_wait_time_total to the audit status reply. Initialize this field to zero. Add to this field the total time spent by the current task on scheduled timeouts while the backlog limit is exceeded. Reset field to zero upon request via AUDIT_SET. Tested on Ubuntu 18.04 using complementary changes to the audit-userspace and audit-testsuite: - https://github.com/linux-audit/audit-userspace/pull/134 - https://github.com/linux-audit/audit-testsuite/pull/97 Signed-off-by: Max Englander Signed-off-by: Paul Moore commit f1d9b23cabc61e58509164c3c3132556476491d2 Author: Richard Guy Briggs Date: Mon Jul 13 15:51:59 2020 -0400 audit: purge audit_log_string from the intra-kernel audit API audit_log_string() was inteded to be an internal audit function and since there are only two internal uses, remove them. Purge all external uses of it by restructuring code to use an existing audit_log_format() or using audit_log_format(). Please see the upstream issue https://github.com/linux-audit/audit-kernel/issues/84 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 5887a2ad53cee2c90401564a00fabf6af61a1aa5 Author: Lyude Paul Date: Mon Jul 20 15:07:36 2020 -0400 drm/vblank: Use spin_(un)lock_irq() in drm_crtc_queue_sequence_ioctl() This is an ioctl callback, so we're guaranteed to have IRQs enabled when calling this function. Use the plain _irq() variants of spin_(un)lock() to make this more obvious. Signed-off-by: Lyude Paul Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-6-lyude@redhat.com Reviewed-by: Daniel Vetter commit 7f07c35fe63bc9563237436cb07bcc28f82a45b7 Author: Lyude Paul Date: Mon Jul 20 15:07:35 2020 -0400 drm/vblank: Use spin_(un)lock_irq() in drm_queue_vblank_event() This one's easy - we're already calling kzalloc(GFP_KERNEL) in this function, so we must already be guaranteed to have IRQs enabled when calling this. So, use the plain _irq() variants of spin_(un)lock() to make this more obvious. Signed-off-by: Lyude Paul Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-5-lyude@redhat.com commit eb2ee0efd452dff6a8e6911ae46e25368b6c0ea7 Author: Lyude Paul Date: Mon Jul 20 15:07:34 2020 -0400 drm/vblank: Use spin_(un)lock_irq() in drm_legacy_vblank_post_modeset() This function is only ever called from ioctl context, so we're guaranteed to have interrupts enabled. Stop using the irqsave/irqrestore variants of spin_(un)lock_irq() to make this more obvious. Signed-off-by: Lyude Paul Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-4-lyude@redhat.com Reviewed-by: Daniel Vetter commit 92cc68e35863c1c61c449efa2b2daef6e9926048 Author: Lyude Paul Date: Mon Jul 20 15:07:33 2020 -0400 drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_on() This is only called from: * Atomic modesetting hooks * Module probing routines * Legacy modesetting hooks All of which have IRQs enabled, so we can also get rid of irqsave/restore here to make the IRQ context of this function more obvious. Signed-off-by: Lyude Paul Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-3-lyude@redhat.com Reviewed-by: Daniel Vetter commit fbc678e836f11a6a65058deb7af7566e99a9571e Author: Lyude Paul Date: Mon Jul 20 15:07:32 2020 -0400 drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_reset() All of the drivers in the kernel tree only call this from one of the following contexts: * drm_crtc_funcs->reset * During initial module load Since both of these contexts are guaranteed to have interrupts enabled beforehand, there's no need to use the irqsave/irqrestore variants of spin_(un)lock(). So, fix this to make the irq context of this function more obvious. Signed-off-by: Lyude Paul Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200720190736.180297-2-lyude@redhat.com Reviewed-by: Daniel Vetter commit 70476feb62ce9955b8101fca84f3f8b3788e6eb2 Author: Ioana Ciornei Date: Tue Jul 21 12:19:19 2020 +0300 staging: dpaa2-ethsw: check if there is space for a new VLAN Avoid getting into a WARNING as below by checking, while in the prepare state of the transactional operation, if there is space for a new VLAN. If we reached the maximum number, return an appropriate error. [ 6503.657564] eth3: Commit of object (id=1) failed. [ 6503.657588] WARNING: CPU: 2 PID: 17144 at net/switchdev/switchdev.c:277 switchdev_port_obj_add_now+0xcc/0x110 ... [ 6503.657628] x1 : 70887ce26695c500 x0 : 0000000000000000 [ 6503.657630] Call trace: [ 6503.657633] switchdev_port_obj_add_now+0xcc/0x110 [ 6503.657635] switchdev_port_obj_add+0x40/0xc0 [ 6503.657638] br_switchdev_port_vlan_add+0x50/0x78 [ 6503.657640] __vlan_add+0x2dc/0x758 [ 6503.657642] nbp_vlan_add+0xc0/0x180 [ 6503.657644] br_vlan_info.isra.0+0x68/0x128 [ 6503.657646] br_process_vlan_info+0x224/0x2f8 [ 6503.657647] br_afspec+0x158/0x188 [ 6503.657649] br_setlink+0x1a4/0x290 Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200721091919.20394-7-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 1867a402d801d93f9f9b24fdaef1bc84b9debd5d Author: Ioana Ciornei Date: Tue Jul 21 12:19:18 2020 +0300 staging: dpaa2-ethsw: read the port state from firmware Rely on the port state seen by the firmware since it will also be the one erroring out when trying to setup anything major when the port is up. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200721091919.20394-6-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit adcdd57d5feab928d58959956844a6b755a41650 Author: Ioana Ciornei Date: Tue Jul 21 12:19:17 2020 +0300 staging: dpaa2-ethsw: destroy workqueue after deregistering the notifiers We should destroy the switch workqueue only after deregistering the switchdev notifiers. Without this fix, we could end up with switchdev notifications on a draining workqueue and also with a lock up since the netdevice reference count is increased (in port_switchdev_event) and not decreased ever (since the workqueue did not run). Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200721091919.20394-5-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 4acfc4393e90e4dfa6ebc6e43545296ca1d928fe Author: Ioana Ciornei Date: Tue Jul 21 12:19:16 2020 +0300 staging: dpaa2-ethsw: setup the STP state for all installed VLANs Setup the STP state for all VLANs installed on the port. This is also avoiding the error situation when the DEFAULT_VLAN_ID is not installed on the port (thus the firmware complains that it cannot setup the required STP state). Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200721091919.20394-4-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit af85d0e06c6ab1a2d9432cf5923a1a5de816ac22 Author: Ioana Ciornei Date: Tue Jul 21 12:19:15 2020 +0300 staging: dpaa2-ethsw: don't allow interfaces from different DPSWs to be bridged Error out when the user tries to bridge two switch interfaces that are from different DPSW instances. This is not supported by the hardware and we should reflect this into what the user is aware of. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200721091919.20394-3-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit b99a3f7093be7d7ff67491f75bf24fd60d8ba774 Author: Ioana Ciornei Date: Tue Jul 21 12:19:14 2020 +0300 staging: dpaa2-ethsw: verify the nofifier block Since now we have a notifier block for each DPSW instance probed, we have to also check that the netdev is indeed connected to the notifier received. Without this, we end up with the same switchdev callback being executed multiple times (because it would be received by all notifier blocks, not just the one intended to). Also, move the function higher in the source file because it will be used in later patches from multiple places. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200721091919.20394-2-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 006266854705b308531c3a27c9e65d0eeadb5742 Author: Suraj Upadhyay Date: Sun Jul 19 20:04:04 2020 +0530 staging: rts5208: rtsx: Replace depracated MSI API Replace depracated MSI IRQ enablers and disablers with pci_alloc_irq_vectors and pci_free_irq_vectors respectively. Compile tested. Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/20200719143404.GA32519@blackclown Signed-off-by: Greg Kroah-Hartman commit 2f248a80223257be094c694a75de73aeab0a6530 Author: Marian Posteuca Date: Mon Jul 20 09:42:05 2020 +0300 staging: dpaa2-ethsw: fix switch/case fallthrough warning Fix the fallthrough warning that is reported by checkpatch. Signed-off-by: Marian Posteuca Link: https://lore.kernel.org/r/20200720064205.10323-1-posteuca@mutex.one Signed-off-by: Greg Kroah-Hartman commit 846fbc621f24e2f00de3e27d6bbd0fe4638b7e01 Author: Darshan D V Date: Mon Jul 20 14:44:42 2020 +0530 staging: rtl8192e: add proper code indent As the code indent for a conditional statement is not according to the preferred coding style for the linux kernel, add code indent as necessary after a conditional statement. Signed-off-by: Darshan D V Link: https://lore.kernel.org/r/20200720091442.19532-2-darshandv10@gmail.com Signed-off-by: Greg Kroah-Hartman commit 77cedcc0b31af6a6cb4ce64af2ee2a3ff2152944 Author: Darshan D V Date: Mon Jul 20 14:44:41 2020 +0530 staging: rtl8192e: add space before open parenthesis Fix the coding style error by adding a space before open parenthesis '(' in a conditional statement. Signed-off-by: Darshan D V Link: https://lore.kernel.org/r/20200720091442.19532-1-darshandv10@gmail.com Signed-off-by: Greg Kroah-Hartman commit 15d25ed790504a5fb0bb3cea8088b3e087eba0e7 Author: Sumera Priyadarsini Date: Mon Jul 20 17:58:17 2020 +0530 staging: wlan-ng: Fix alignment to match open parenthesis This patch fixes the file cfg80211.c to avoid the checkpatch.pl warning: CHECK: Alignment should match open parenthesis Signed-off-by: Sumera Priyadarsini Link: https://lore.kernel.org/r/20200720122817.31164-1-sylphrenadin@gmail.com Signed-off-by: Greg Kroah-Hartman commit fb01eb36518f525a6b4e8d829e1127e6a82d7623 Author: Alexander A. Klimov Date: Sun Jul 19 12:20:20 2020 +0200 ARM: davinci: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov [nsekhar@ti.com: drop obsolete hawkboard.org URL completeley fixup subject line prefix] Signed-off-by: Sekhar Nori commit 7eb99a39ef767644bbfd2b3f12f139d13e3ee8b3 Author: Lee Jones Date: Tue Jul 21 08:34:57 2020 +0100 video: backlight: cr_bllcd: Remove unused variable 'intensity' Fixes the following kernel build warning: drivers/video/backlight/cr_bllcd.c: In function ‘cr_backlight_set_intensity’: drivers/video/backlight/cr_bllcd.c:62:6: warning: unused variable ‘intensity’ [-Wunused-variable] 62 | int intensity = bd->props.brightness; | ^~~~~~~~~ Cc: Jingoo Han Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Fixes: 24d34617c24f ("backlight: cr_bllcd: Introduce gpio-backlight semantics") Reviewed-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 5767603c2619ae7bb7828f99446be02a8c05ea63 Author: Christian König Date: Thu Jul 16 13:46:05 2020 +0200 drm/qxl: stop using TTM_MEMTYPE_FLAG_MAPPABLE v2 The driver doesn't expose any not-mapable memory resources. v2: remove unused man variable as well Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/378246/ commit ed024ca62a4a151b0754c87a27b492d584389ce5 Author: Christian König Date: Thu Jul 16 13:35:48 2020 +0200 drm/nouveau: stop using TTM_MEMTYPE_FLAG_MAPPABLE The driver doesn't expose any not-mapable memory resources. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/378244/ commit cd1d58edcd25e1924c3f903563a3ddcc1190a8e7 Author: Christian König Date: Thu Jul 16 10:15:17 2020 +0200 drm/vmwgfx: stop using TTM_MEMTYPE_FLAG_MAPPABLE The driver doesn't expose any not-mapable memory resources. Signed-off-by: Christian König Reviewed-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/378241/ commit f5a9a9383f279de9da63296cb623a6418a66196b Author: Christian König Date: Wed Jul 15 14:52:05 2020 +0200 drm/ttm: remove TTM_MEMTYPE_FLAG_CMA The original intention was to avoid CPU page table unmaps when BOs move between the GTT and SYSTEM domain. The problem is that this never correctly handled changes in the caching attributes or backing pages. Just drop this for now and simply unmap the CPU page tables in all cases. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/378240/ commit c1c440d41aff2fa22027ed51afcc4c69709515eb Author: Christian König Date: Wed Jul 15 13:22:56 2020 +0200 drm/ttm: cleanup coding style and implementation. Only functional change is to always keep io_reserved_count up to date for debugging even when it is not used otherwise. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/378242/ commit ce74773305bd5e519745e7c406f7f006daef9902 Author: Christian König Date: Wed Jul 15 13:05:52 2020 +0200 drm/ttm: remove io_reserve_fastpath flag Just use the use_io_reserve_lru flag. It doesn't make much sense to have two flags. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/378238/ commit 4b8edc39a45f51eb304acb081020ec4f063d53a5 Author: Christian König Date: Mon Jul 13 16:50:04 2020 +0200 drm/ttm: cleanup io_mem interface with nouveau Nouveau is the only user of this functionality and evicting io space on -EAGAIN is really a misuse of the return code. Instead switch to using -ENOSPC here which makes much more sense and simplifies the code. This could unbreak something as we now cleanly return EAGAIN, but the chance for this are rather low. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/378237/ commit 66c00f561d94f8b5eae8c0e1aa8e4cfad9cf64f9 Author: Paul Cercueil Date: Mon Jul 20 17:45:48 2020 +0200 dt-bindings: ingenic,pinctrl: Support pinmux/pinconf nodes Add YAML to describe the pinmux/pinconf sub-nodes of the pinctrl IP on Ingenic SoCs. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200720154548.12453-1-paul@crapouillou.net Signed-off-by: Linus Walleij commit e69acf18d08d7b5e9416fa6afb3a8dd6dd3439ce Author: Christian König Date: Fri Jul 10 15:13:41 2020 +0200 drm: remove optional dummy function from drivers using TTM Implementing those is completely unnecessary. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Reviewed-by: Madhav Chauhan Link: https://patchwork.freedesktop.org/patch/378236/ commit 78d76819e6f04672989506e7792895a51438516e Author: Athira Rajeev Date: Fri Jul 17 10:38:13 2020 -0400 powerpc/perf: Update cpu_hw_event to use `struct` for storing MMCR registers core-book3s currently uses array to store the MMCR registers as part of per-cpu `cpu_hw_events`. This patch does a clean up to use `struct` to store mmcr regs instead of array. This will make code easier to read and reduces chance of any subtle bug that may come in the future, say when new registers are added. Patch updates all relevant code that was using MMCR array ( cpuhw->mmcr[x]) to use newly introduced `struct`. This includes the PMU driver code for supported platforms (power5 to power9) and ISA macros for counter support functions. Signed-off-by: Athira Rajeev Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594996707-3727-2-git-send-email-atrajeev@linux.vnet.ibm.com commit 3c9450c053f88e525b2db1e6990cdf34d14e7696 Author: Madhavan Srinivasan Date: Sun Jun 14 14:06:04 2020 +0530 powerpc/perf: Fix missing is_sier_aviable() during build Compilation error: arch/powerpc/perf/perf_regs.c:80:undefined reference to `.is_sier_available' Currently is_sier_available() is part of core-book3s.c, which is added to build based on CONFIG_PPC_PERF_CTRS. A config with CONFIG_PERF_EVENTS and without CONFIG_PPC_PERF_CTRS will have a build break because of missing is_sier_available(). In practice it only breaks when CONFIG_FSL_EMB_PERF_EVENT=n because that also guards the usage of is_sier_available(). That only happens with CONFIG_PPC_BOOK3E_64=y and CONFIG_FSL_SOC_BOOKE=n. Patch adds is_sier_available() in asm/perf_event.h to fix the build break for configs missing CONFIG_PPC_PERF_CTRS. Fixes: 333804dc3b7a ("powerpc/perf: Update perf_regs structure to include SIER") Reported-by: Aneesh Kumar K.V Signed-off-by: Madhavan Srinivasan [mpe: Add detail about CONFIG_FSL_SOC_BOOKE] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200614083604.302611-1-maddy@linux.ibm.com commit 63396ada804c676e070bd1b8663046f18698ab27 Author: Nicholas Piggin Date: Fri Jul 3 11:19:58 2020 +1000 powerpc/64s/hash: Disable subpage_prot syscall by default The subpage_prot syscall was added for specialised system software (Lx86) that has been discontinued for about 7 years, and is not thought to be used elsewhere, so disable it by default. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200703011958.1166620-4-npiggin@gmail.com commit 5c9fa16e8abd342ce04dc830c1ebb2a03abf6c05 Author: Nicholas Piggin Date: Fri Jul 3 11:19:57 2020 +1000 powerpc/64s: Remove PROT_SAO support ISA v3.1 does not support the SAO storage control attribute required to implement PROT_SAO. PROT_SAO was used by specialised system software (Lx86) that has been discontinued for about 7 years, and is not thought to be used elsewhere, so removal should not cause problems. We rather remove it than keep support for older processors, because live migrating guest partitions to newer processors may not be possible if SAO is in use (or worse allowed with silent races). - PROT_SAO stays in the uapi header so code using it would still build. - arch_validate_prot() is removed, the generic version rejects PROT_SAO so applications would get a failure at mmap() time. Signed-off-by: Nicholas Piggin [mpe: Drop KVM change for the time being] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200703011958.1166620-3-npiggin@gmail.com commit f4ac1774f2cba44994ce9ac0a65772e4656ac2df Author: Nicholas Piggin Date: Fri Jul 3 11:19:56 2020 +1000 powerpc: Remove stale calc_vm_prot_bits() comment This comment is wrong, we wouldn't use calc_vm_prot_bits() here because we are being called by calc_vm_prot_bits() to modify its behaviour. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200703011958.1166620-2-npiggin@gmail.com commit a3f3f8aa1f72dafe1450ccf8cbdfb1d12d42853a Author: YueHaibing Date: Fri Jul 17 19:27:14 2020 +0800 powerpc: Remove unneeded inline functions Both of those functions are only called from 64-bit only code, so the stubs should not be needed at all. Suggested-by: Michael Ellerman Signed-off-by: YueHaibing Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200717112714.19304-1-yuehaibing@huawei.com commit 1666e5ea2f838f4266e50e4f3d973c0824256429 Author: Alexander A. Klimov Date: Fri Jul 17 20:29:40 2020 +0200 macintosh/therm_adt746x: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200717182940.75484-1-grandmaster@al2klimov.de commit a7beab413e2e67dd1abe6bdd0001576892a89e81 Author: Alexander A. Klimov Date: Fri Jul 17 20:35:22 2020 +0200 macintosh/adb: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200717183522.77605-1-grandmaster@al2klimov.de commit c8ed9fc9d29e24dafd08971e6a0c6b302a8ade2d Author: Alexander A. Klimov Date: Sat Jul 18 12:39:58 2020 +0200 powerpc: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200718103958.5455-1-grandmaster@al2klimov.de commit 38b407be172d3d15afdbfe172691b7caad98120f Author: Michael Ellerman Date: Fri May 8 23:06:33 2020 +1000 powerpc/spufs: Rework fcheck() usage Currently the spu coredump code triggers an RCU warning: ============================= WARNING: suspicious RCU usage 5.7.0-rc3-01755-g7cd49f0b7ec7 #1 Not tainted ----------------------------- include/linux/fdtable.h:95 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by spu-coredump/1343: #0: c0000007fa22f430 (sb_writers#2){.+.+}-{0:0}, at: .do_coredump+0x1010/0x13c8 stack backtrace: CPU: 0 PID: 1343 Comm: spu-coredump Not tainted 5.7.0-rc3-01755-g7cd49f0b7ec7 #1 Call Trace: .dump_stack+0xec/0x15c (unreliable) .lockdep_rcu_suspicious+0x120/0x144 .coredump_next_context+0x148/0x158 .spufs_coredump_extra_notes_size+0x54/0x190 .elf_coredump_extra_notes_size+0x34/0x50 .elf_core_dump+0xe48/0x19d0 .do_coredump+0xe50/0x13c8 .get_signal+0x864/0xd88 .do_notify_resume+0x158/0x3c8 .interrupt_exit_user_prepare+0x19c/0x208 interrupt_return+0x14/0x1c0 This comes from fcheck_files() via fcheck(). It's pretty clearly documented that fcheck() must be wrapped with rcu_read_lock(), adding that fixes the RCU warning. hch points out that once we've released the RCU read lock the file may be closed and freed, which would leave us with a pointer to a freed spu_context. To avoid that, take a reference to the spu_context while we hold the RCU read lock, and drop that reference later once we're done with the context. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200508130633.2532759-1-mpe@ellerman.id.au commit 9d1ebe9a98c1d7bf7cfbe1dba0052230c042ecdb Author: Michael Ellerman Date: Thu Jul 16 22:21:42 2020 +1000 selftests/powerpc: Run per_event_excludes test on Power8 or later The per_event_excludes test wants to run on Power8 or later. But currently it checks that AT_BASE_PLATFORM *equals* power8, which means it only runs on Power8. Fix it to check for the ISA 2.07 feature, which will be set on Power8 and later CPUs. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200716122142.3776261-1-mpe@ellerman.id.au commit 482b9b3948675df60c015b2155011c1f93234992 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:46 2020 +0530 powerpc/book3s64/pkeys: Remove is_pkey_enabled() There is only one caller to this function and the function is wrongly named. Avoid further confusion w.r.t name and open code this at the only call site. Also remove read_uamor(). There are no users for the same after this. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-24-aneesh.kumar@linux.ibm.com commit 3563b9bea0ca7f53e4218b5e268550341a49f333 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:45 2020 +0530 selftests/powerpc: ptrace-pkey: Don't update expected UAMOR value With commit 4a4a5e5d2aad ("powerpc/pkeys: key allocation/deallocation must not change pkey registers") we are not updating UAMOR on key allocation. So don't update the expected uamor value in the test. Fixes: 4a4a5e5d2aad ("powerpc/pkeys: key allocation/deallocation must not change pkey registers") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-23-aneesh.kumar@linux.ibm.com commit 0eaa3b5ca7b5a76e3783639c828498343be66a01 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:44 2020 +0530 selftests/powerpc: ptrace-pkey: Update the test to mark an invalid pkey correctly Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-22-aneesh.kumar@linux.ibm.com commit 9a11f12e0a6c374b3ef1ce81e32ce477d28eb1b8 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:43 2020 +0530 selftests/powerpc: ptrace-pkey: Rename variables to make it easier to follow code Rename variable to indicate that they are invalid values which we will use to test ptrace update of pkeys. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-21-aneesh.kumar@linux.ibm.com commit 342c8a1d1d9e418d32fa02d635cf96989f9a986e Author: Suzuki K Poulose Date: Thu Jul 16 11:57:46 2020 -0600 coresight: etm4x: Fix save/restore during cpu idle The ETM state save/restore incorrectly reads/writes some of the 64bit registers (e.g, address comparators, vmid/cid comparators etc.) using 32bit accesses. Ensure we use the appropriate width accessors for the registers. Fixes: f188b5e76aae ("coresight: etm4x: Save/restore state across CPU low power states") Cc: Mathieu Poirier Cc: Mike Leach Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-18-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit bbfb8f3e4e3f10c7b0b76f9159b8a9608abdea91 Author: Mike Leach Date: Thu Jul 16 11:57:45 2020 -0600 coresight: etm: perf: Add default sink selection to etm perf Add default sink selection to the perf trace handling in the etm driver. Uses the select default sink infrastructure to select a sink for the perf session, if no other sink is specified. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-17-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 24497d387cdbd231c6a9de2303fb74ab951bfe98 Author: Mike Leach Date: Thu Jul 16 11:57:44 2020 -0600 coresight: tmc: Update sink types for default selection An additional sink subtype is added to differentiate ETB/ETF buffer sinks and ETR type system memory sinks. This allows the prioritised selection of default sinks. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-16-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0336bdfd7354edfa3db0e01675b5df224516e3e9 Author: Mike Leach Date: Thu Jul 16 11:57:43 2020 -0600 coresight: Add default sink selection to CoreSight base Adds a method to select a suitable sink connected to a given source. In cases where no sink is defined, the coresight_find_default_sink routine can search from a given source, through the child connections until a suitable sink is found. The suitability is defined in by the sink coresight_dev_subtype on the CoreSight device, and the distance from the source by counting connections. Higher value subtype is preferred - where these are equal, shorter distance from source is used as a tie-break. This allows for default sink to be discovered were none is specified (e.g. perf command line) Signed-off-by: Mike Leach Suggested-by: Suzuki K Poulose Reviewed-by: Leo Yan Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-15-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit d021f5c5ff679432c5e9faee0fd7350db2efb97c Author: Sai Prakash Ranjan Date: Thu Jul 16 11:57:42 2020 -0600 coresight: tmc: Fix TMC mode read in tmc_read_unprepare_etb() Reading TMC mode register without proper coresight power management can lead to exceptions like the one in the call trace below in tmc_read_unprepare_etb() when the trace data is read after the sink is disabled. So fix this by having a check for coresight sysfs mode before reading TMC mode management register in tmc_read_unprepare_etb() similar to tmc_read_prepare_etb(). SError Interrupt on CPU6, code 0xbe000411 -- SError pstate: 80400089 (Nzcv daIf +PAN -UAO) pc : tmc_read_unprepare_etb+0x74/0x108 lr : tmc_read_unprepare_etb+0x54/0x108 sp : ffffff80d9507c30 x29: ffffff80d9507c30 x28: ffffff80b3569a0c x27: 0000000000000000 x26: 00000000000a0001 x25: ffffff80cbae9550 x24: 0000000000000010 x23: ffffffd07296b0f0 x22: ffffffd0109ee028 x21: 0000000000000000 x20: ffffff80d19e70e0 x19: ffffff80d19e7080 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: dfffffd000000001 x9 : 0000000000000000 x8 : 0000000000000002 x7 : ffffffd071d0fe78 x6 : 0000000000000000 x5 : 0000000000000080 x4 : 0000000000000001 x3 : ffffffd071d0fe98 x2 : 0000000000000000 x1 : 0000000000000004 x0 : 0000000000000001 Kernel panic - not syncing: Asynchronous SError Interrupt Fixes: 4525412a5046 ("coresight: tmc: making prepare/unprepare functions generic") Reported-by: Mike Leach Signed-off-by: Sai Prakash Ranjan Tested-by: Mike Leach Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-14-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 865d30792591eafeabf4b4d4728df908548d5362 Author: Sai Prakash Ranjan Date: Thu Jul 16 11:57:41 2020 -0600 coresight: tmc: Add shutdown callback for TMC ETR Implement a shutdown callback to ensure ETR hardware is properly shutdown in reboot/shutdown path. This is required for ETR which has SMMU address translation enabled like on SC7180 SoC and few others. If the hardware is still accessing memory after SMMU translation is disabled as part of SMMU shutdown callback in system reboot or shutdown path, then IOVAs(I/O virtual address) which it was using will go on the bus as the physical addresses which might result in unknown crashes (NoC/interconnect errors). So we make sure from this shutdown callback that the ETR is shutdown before SMMU translation is disabled and device_link in SMMU driver will take care of ordering of shutdown callbacks such that SMMU shutdown callback is not called before any of its consumer shutdown callbacks. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-13-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit d061cd734f1a59798574b50188b14b49e95a54d3 Author: Mike Leach Date: Thu Jul 16 11:57:40 2020 -0600 coresight: Fix comment in main header file Comment for an elemnt in the coresight_device structure appears to have been corrupted and makes no sense. Fix this before making further changes. Signed-off-by: Mike Leach Reviewed-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-12-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8fa43700f69703f995ea715b76be6fabdd2f05de Author: Mike Leach Date: Thu Jul 16 11:57:39 2020 -0600 coresight: etmv4: Counter values not saved on disable The counter value registers change during operation, however this change is not reflected in the values seen by the user in sysfs. This fixes the issue by reading back the values on disable. Signed-off-by: Mike Leach Fixes: 2e1cdfe184b52 ("coresight-etm4x: Adding CoreSight ETM4x driver") Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-11-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit cb8bba907a4ff4ba42f1d245cb506d55829674b8 Author: Mike Leach Date: Thu Jul 16 11:57:38 2020 -0600 coresight: etmv4: Fix resource selector constant ETMv4 max resource selector constant incorrectly set to 16. Updated to the correct 32 value, and adjustments made to limited code using it. Signed-off-by: Mike Leach Fixes: 2e1cdfe184b52 ("coresight-etm4x: Adding CoreSight ETM4x driver") Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-10-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit e82d785eba4a2b047a71d7d6c5ee671237bfe716 Author: Andy Shevchenko Date: Thu Jul 16 11:57:37 2020 -0600 coresight: Drop double check for ACPI companion device acpi_dev_get_resources() does perform the NULL pointer check against ACPI companion device which is given as function parameter. Thus, there is no need to duplicate this check in the caller. Signed-off-by: Andy Shevchenko Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-9-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 870fdd851ca50ffa552c41fd127afafceb303eca Author: Xu Wang Date: Thu Jul 16 11:57:36 2020 -0600 coresight: Use devm_kcalloc() in coresight_alloc_conns() A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "devm_kcalloc". Signed-off-by: Xu Wang Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-8-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 784bb9ad490d26bb1ae059a3197b3b1c55ff4e20 Author: Sai Prakash Ranjan Date: Thu Jul 16 11:57:35 2020 -0600 dt-bindings: arm: coresight: Add optional property to replicators Add an optional boolean property "qcom,replicator-loses-context" to identify replicators which loses context when AMBA clocks are removed in certain configurable replicator designs. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Mike Leach Acked-by: Rob Herring Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-7-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8f3ce74c20f21e09644d2a584238f1453a00eb8d Author: Sai Prakash Ranjan Date: Thu Jul 16 11:57:34 2020 -0600 coresight: replicator: Reset replicator if context is lost On some QCOM SoCs, replicators in Always-On domain loses its context as soon as the clock is disabled. Currently as a part of pm_runtime workqueue, clock is disabled after the replicator is initialized by amba_pm_runtime_suspend assuming that context is not lost which is not true for replicators with such limitations. So add a new property "qcom,replicator-loses-context" to identify such replicators and reset them. Suggested-by: Mike Leach Reviewed-by: Mike Leach Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-6-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7f1a1c2c57dbda7278ef06700efcac63433b9893 Author: Tingwei Zhang Date: Thu Jul 16 11:57:33 2020 -0600 dt-bindings: arm: coresight: Add support to skip trace unit power up Add "qcom,skip-power-up" property to identify systems which can skip powering up of trace unit since they share the same power domain as their CPU core. This is required to identify such systems with hardware errata which stops the CPU watchdog counter when the power up bit is set (TRCPDCR.PU). Signed-off-by: Tingwei Zhang Co-developed-by: Sai Prakash Ranjan Signed-off-by: Sai Prakash Ranjan Reviewed-by: Rob Herring Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-5-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 02510a5aa78df45ff9a22def37e5c18677d4d659 Author: Tingwei Zhang Date: Thu Jul 16 11:57:32 2020 -0600 coresight: etm4x: Add support to skip trace unit power up On some Qualcomm Technologies Inc. SoCs like SC7180, there exists a hardware errata where the APSS (Application Processor SubSystem)/CPU watchdog counter is stopped when the trace unit power up ETM register is set (TRCPDCR.PU = 1). Since the ETMs share the same power domain as that of respective CPU cores, they are powered on when the CPU core is powered on. So we can skip powering up of trace unit after checking for this errata via new property called "qcom,skip-power-up". Signed-off-by: Tingwei Zhang Co-developed-by: Sai Prakash Ranjan Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-4-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9cfb556357d56895ae50f0f3c691730d640530d2 Author: Sai Prakash Ranjan Date: Thu Jul 16 11:57:31 2020 -0600 coresight: catu: Use CS_AMBA_ID macro for id table Use CS_AMBA_ID macro for coresight catu AMBA id table instead of open coding. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9c1a58b77e8d34b36f7d98bce6cc7d11478c001e Author: Sai Prakash Ranjan Date: Thu Jul 16 11:57:30 2020 -0600 coresight: replicator: Use CS_AMBA_ID macro for id table Use CS_AMBA_ID macro for dynamic replicator AMBA id table instead of open coding. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200716175746.3338735-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7fce69dff8db30cb93aace0bbebda09972027af7 Merge: f06b71fe4d4cd be619f7f063a4 Author: Eric W. Biederman Date: Tue Jul 21 08:25:22 2020 -0500 Implement kernel_execve This set of changes implements kernel_execve to remove the need for kernel threads to pass in pointers to in-kernel data structures to functions that take __user pointers. Which is part of the greater removal of set_fs work. This set of changes makes do_execve static and so I have updated the comments. This affects the comments in the x86 entry point code and the comments in tomoyo. I believe I have updated them correctly. If not please let me know. I have moved the calls of copy_strings before the call of security_bprm_creds_for_exec. Which might be of interest to the security folks. I can't see that it matters but I have copied the security folks just to be certain. By moving the initialization of the new stack that copy_strings does earlier it becomes possible to copy all of the parameters to exec before anything else is done which makes it possible to have one function kernel_execve that uncondtionally handles copying parameters from kernel space, and another function do_execveat_common which handles copying parameters from userspace. This work was inspired by Christoph Hellwig's similar patchset, which my earlier work to remove the file parameter to do_execveat_common conflicted with. https://lore.kernel.org/linux-fsdevel/20200627072704.2447163-1-hch@lst.de/ I figured that after causing all of that trouble for the set_fs work the least I could do is implement the change myself. The big practical change from Christoph's work is that he did not separate out the copying of parameters from the rest of the work of exec, which did not help the maintainability of the code. Eric W. Biederman (7): exec: Remove unnecessary spaces from binfmts.h exec: Factor out alloc_bprm exec: Move initialization of bprm->filename into alloc_bprm exec: Move bprm_mm_init into alloc_bprm exec: Factor bprm_execve out of do_execve_common exec: Factor bprm_stack_limits out of prepare_arg_pages exec: Implement kernel_execve arch/x86/entry/entry_32.S | 2 +- arch/x86/entry/entry_64.S | 2 +- arch/x86/kernel/unwind_frame.c | 2 +- fs/exec.c | 301 ++++++++++++++++++++++++++++------------- include/linux/binfmts.h | 20 ++- init/main.c | 4 +- kernel/umh.c | 6 +- security/tomoyo/common.h | 2 +- security/tomoyo/domain.c | 4 +- security/tomoyo/tomoyo.c | 4 +- 10 files changed, 224 insertions(+), 123 deletions(-) Acked-by: Linus Torvalds Link: https://lkml.kernel.org/r/871rle8bw2.fsf@x220.int.ebiederm.org Signed-off-by: "Eric W. Biederman" commit be619f7f063a49c656f620a46af4f8ea3e759e91 Author: Eric W. Biederman Date: Mon Jul 13 12:06:48 2020 -0500 exec: Implement kernel_execve To allow the kernel not to play games with set_fs to call exec implement kernel_execve. The function kernel_execve takes pointers into kernel memory and copies the values pointed to onto the new userspace stack. The calls with arguments from kernel space of do_execve are replaced with calls to kernel_execve. The calls do_execve and do_execveat are made static as there are now no callers outside of exec. The comments that mention do_execve are updated to refer to kernel_execve or execve depending on the circumstances. In addition to correcting the comments, this makes it easy to grep for do_execve and verify it is not used. Inspired-by: https://lkml.kernel.org/r/20200627072704.2447163-1-hch@lst.de Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/87wo365ikj.fsf@x220.int.ebiederm.org Signed-off-by: "Eric W. Biederman" commit d8b9cd549ecf0f3dc8da42ada5f0ce73e8ed5f1e Author: Eric W. Biederman Date: Sun Jul 12 08:23:54 2020 -0500 exec: Factor bprm_stack_limits out of prepare_arg_pages In preparation for implementiong kernel_execve (which will take kernel pointers not userspace pointers) factor out bprm_stack_limits out of prepare_arg_pages. This separates the counting which depends upon the getting data from userspace from the calculations of the stack limits which is usable in kernel_execve. The remove prepare_args_pages and compute bprm->argc and bprm->envc directly in do_execveat_common, before bprm_stack_limits is called. Reviewed-by: Kees Cook Reviewed-by: Christoph Hellwig Link: https://lkml.kernel.org/r/87365u6x60.fsf@x220.int.ebiederm.org Signed-off-by: "Eric W. Biederman" commit 0c9cdff054aec0836bb38a449e860793849c3f84 Author: Eric W. Biederman Date: Sun Jul 12 07:17:50 2020 -0500 exec: Factor bprm_execve out of do_execve_common Currently it is necessary for the usermode helper code and the code that launches init to use set_fs so that pages coming from the kernel look like they are coming from userspace. To allow that usage of set_fs to be removed cleanly the argument copying from userspace needs to happen earlier. Factor bprm_execve out of do_execve_common to separate out the copying of arguments to the newe stack, and the rest of exec. In separating bprm_execve from do_execve_common the copying of the arguments onto the new stack happens earlier. As the copying of the arguments does not depend any security hooks, files, the file table, current->in_execve, current->fs->in_exec, bprm->unsafe, or creds this is safe. Likewise the security hook security_creds_for_exec does not depend upon preventing the argument copying from happening. In addition to making it possible to implement kernel_execve that performs the copying differently, this separation of bprm_execve from do_execve_common makes for a nice separation of responsibilities making the exec code easier to navigate. Reviewed-by: Kees Cook Reviewed-by: Christoph Hellwig Link: https://lkml.kernel.org/r/878sfm6x6x.fsf@x220.int.ebiederm.org Signed-off-by: "Eric W. Biederman" commit f18ac551e5035a52fd8edadc45e0f8eb4cec8d3e Author: Eric W. Biederman Date: Fri Jul 10 15:54:54 2020 -0500 exec: Move bprm_mm_init into alloc_bprm Currently it is necessary for the usermode helper code and the code that launches init to use set_fs so that pages coming from the kernel look like they are coming from userspace. To allow that usage of set_fs to be removed cleanly the argument copying from userspace needs to happen earlier. Move the allocation and initialization of bprm->mm into alloc_bprm so that the bprm->mm is available early to store the new user stack into. This is a prerequisite for copying argv and envp into the new user stack early before ther rest of exec. To keep the things consistent the cleanup of bprm->mm is moved into free_bprm. So that bprm->mm will be cleaned up whenever bprm->mm is allocated and free_bprm are called. Moving bprm_mm_init earlier is safe as it does not depend on any files, current->in_execve, current->fs->in_exec, bprm->unsafe, or the if the file table is shared. (AKA bprm_mm_init does not depend on any of the code that happens between alloc_bprm and where it was previously called.) This moves bprm->mm cleanup after current->fs->in_exec is set to 0. This is safe because current->fs->in_exec is only used to preventy taking an additional reference on the fs_struct. This moves bprm->mm cleanup after current->in_execve is set to 0. This is safe because current->in_execve is only used by the lsms (apparmor and tomoyou) and always for LSM specific functions, never for anything to do with the mm. This adds bprm->mm cleanup into the successful return path. This is safe because being on the successful return path implies that begin_new_exec succeeded and set brpm->mm to NULL. As bprm->mm is NULL bprm cleanup I am moving into free_bprm will do nothing. Reviewed-by: Kees Cook Reviewed-by: Christoph Hellwig Link: https://lkml.kernel.org/r/87eepe6x7p.fsf@x220.int.ebiederm.org Signed-off-by: "Eric W. Biederman" commit 60d9ad1d1d7f15964d23f6e71a7adcf1bde0e18e Author: Eric W. Biederman Date: Sat Jul 11 08:16:15 2020 -0500 exec: Move initialization of bprm->filename into alloc_bprm Currently it is necessary for the usermode helper code and the code that launches init to use set_fs so that pages coming from the kernel look like they are coming from userspace. To allow that usage of set_fs to be removed cleanly the argument copying from userspace needs to happen earlier. Move the computation of bprm->filename and possible allocation of a name in the case of execveat into alloc_bprm to make that possible. The exectuable name, the arguments, and the environment are copied into the new usermode stack which is stored in bprm until exec passes the point of no return. As the executable name is copied first onto the usermode stack it needs to be known. As there are no dependencies to computing the executable name, compute it early in alloc_bprm. As an implementation detail if the filename needs to be generated because it embeds a file descriptor store that filename in a new field bprm->fdpath, and free it in free_bprm. Previously this was done in an independent variable pathbuf. I have renamed pathbuf fdpath because fdpath is more suggestive of what kind of path is in the variable. I moved fdpath into struct linux_binprm because it is tightly tied to the other variables in struct linux_binprm, and as such is needed to allow the call alloc_binprm to move. Reviewed-by: Kees Cook Reviewed-by: Christoph Hellwig Link: https://lkml.kernel.org/r/87k0z66x8f.fsf@x220.int.ebiederm.org Signed-off-by: "Eric W. Biederman" commit 0a8f36eb48f64006dde86e2a58230d5a599eef7d Author: Eric W. Biederman Date: Fri Jul 10 15:39:45 2020 -0500 exec: Factor out alloc_bprm Currently it is necessary for the usermode helper code and the code that launches init to use set_fs so that pages coming from the kernel look like they are coming from userspace. To allow that usage of set_fs to be removed cleanly the argument copying from userspace needs to happen earlier. Move the allocation of the bprm into it's own function (alloc_bprm) and move the call of alloc_bprm before unshare_files so that bprm can ultimately be allocated, the arguments can be placed on the new stack, and then the bprm can be passed into the core of exec. Neither the allocation of struct binprm nor the unsharing depend upon each other so swapping the order in which they are called is trivially safe. To keep things consistent the order of cleanup at the end of do_execve_common swapped to match the order of initialization. Reviewed-by: Kees Cook Link: https://lkml.kernel.org/r/87pn8y6x9a.fsf@x220.int.ebiederm.org Signed-off-by: "Eric W. Biederman" commit 4b9e373e04ca22780a4355252d415268de559493 Author: Anson Huang Date: Wed Jun 17 15:47:54 2020 +0800 thermal: imx8mm: Support module autoloading Add a missing MODULE_DEVICE_TABLE entry to support module autoloading. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1592380074-19222-1-git-send-email-Anson.Huang@nxp.com commit 0f348db01fdf128813fdd659fcc339038fb421a4 Author: Dan Carpenter Date: Tue Jun 16 12:19:49 2020 +0300 thermal: ti-soc-thermal: Fix reversed condition in ti_thermal_expose_sensor() This condition is reversed and will cause breakage. Fixes: 7440f518dad9 ("thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR") Signed-off-by: Dan Carpenter Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200616091949.GA11940@mwanda commit 8bcd0178d37bdbb90cf8502518e9720ea51e2d51 Author: Lukasz Luba Date: Wed Jun 3 15:14:20 2020 +0100 MAINTAINERS: Add maintenance information for IPA Add entry for ARM Intelligent Power Allocation - thermal governor. Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200603141420.15274-1-lukasz.luba@arm.com commit 9746c9be0bb5860592e048468b37974be4c59d44 Author: Eric W. Biederman Date: Sat Jul 11 06:45:36 2020 -0500 exec: Remove unnecessary spaces from binfmts.h The general convention in the linux kernel is to define a pointer member as "type *name". The declaration of struct linux_binprm has several pointer defined as "type * name". Update them to the form of "type *name" for consistency. Suggested-by: Kees Cook Reviewed-by: Kees Cook Reviewed-by: Christoph Hellwig Link: https://lkml.kernel.org/r/87v9iq6x9x.fsf@x220.int.ebiederm.org Signed-off-by: "Eric W. Biederman" commit 68f775ddd2a6f513e225f9a565b054ab48fef142 Author: Ikjoon Jang Date: Tue Jul 21 14:54:09 2020 +0800 HID: quirks: add NOGET quirk for Logitech GROUP Add HID_QUIRK_NOGET for Logitech GROUP device. Logitech GROUP is a compound with camera and audio. When the HID interface in an audio device is requested to get specific report id, all following control transfers are stalled and never be restored back. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=203419 Signed-off-by: Ikjoon Jang Signed-off-by: Jiri Kosina commit 679d10df716b78ece007414817ff6219f217afc9 Author: Niklas Söderlund Date: Wed Jun 10 02:33:00 2020 +0200 thermal: rcar_gen3_thermal: Do not shadow thcode variable The function rcar_gen3_thermal_calc_coefs() takes an argument called 'thcode' which shadows the static global 'thcode' variable. This is not harmful but bad for readability and is harmful for planned changes to the driver. The THCODE values should be read from hardware fuses if they are available and only fallback to the global 'thcode' variable if they are not fused. Rename the global 'thcode' variable to 'thcodes' to avoid shadowing the symbol in functions that take it as an argument. Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200610003300.884258-1-niklas.soderlund+renesas@ragnatech.se commit d3da1f0900891eec10c2a83422ba53c19a7b6380 Author: Alexey Budankov Date: Fri Jul 17 10:00:15 2020 +0300 libperf: Avoid counting of nonfilterable fdarray fds Avoid counting of struct pollfd *entries objects with fdarray_flag__nonfilterable flag by fdarray__filter(). Nonfilterable objects are still processed if requested revents have been signaled for them. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/b5ab0d2c-b742-0032-e8d3-c8e2eb423c42@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ab4c1f9f686836e7a772af0c6dd71fe9efa2609c Author: Alexey Budankov Date: Fri Jul 17 09:59:45 2020 +0300 libperf: Add flags to fdarray fds objects Store flags per struct pollfd *entries object in a bitmap of int size. Implement fdarray_flag__nonfilterable flag to skip object from counting by fdarray__filter(). Fixed fdarray test issue reported by kernel test robot. Reported-by: kernel test robot Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/6b7d43ff-0801-d5dd-4e90-fcd86b17c1c8@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 6c9a9a8ddf3d81d36891d4adbeb466c4dda1f674 Merge: 15d157e874437 ef7e12078ab83 Author: Greg Kroah-Hartman Date: Tue Jul 21 14:08:33 2020 +0200 Merge tag 'thunderbolt-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v5.9 merge window This includes following Thunderbolt/USB4 changes for v5.9 merge window: * Improvements around NHI (Native Host Interface) HopID allocation * Improvements to tunneling and USB3 bandwidth management support * Add KUnit tests for path walking and tunneling * Initial support for USB4 retimer firmware upgrade * Implement Thunderbolt device firmware upgrade mechanism that runs the NVM image authentication when the device is disconnected. * A couple of small non-critical fixes * tag 'thunderbolt-for-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: (32 commits) thunderbolt: Fix old style declaration warning thunderbolt: Add support for authenticate on disconnect thunderbolt: Add support for separating the flush to SPI and authenticate thunderbolt: Ensure left shift of 512 does not overflow a 32 bit int thunderbolt: Add support for on-board retimers thunderbolt: Implement USB4 port sideband operations for retimer access thunderbolt: Retry USB4 block read operation thunderbolt: Generalize usb4_switch_do_[read|write]_data() thunderbolt: Split common NVM functionality into a separate file thunderbolt: Add Intel USB-IF ID to the NVM upgrade supported list thunderbolt: Add KUnit tests for tunneling thunderbolt: Add USB3 bandwidth management thunderbolt: Make tb_port_get_link_speed() available to other files thunderbolt: Implement USB3 bandwidth negotiation routines thunderbolt: Increase DP DPRX wait timeout thunderbolt: Report consumed bandwidth in both directions thunderbolt: Make usb4_switch_map_pcie_down() also return enabled ports thunderbolt: Make usb4_switch_map_usb3_down() also return enabled ports thunderbolt: Do not tunnel USB3 if link is not USB4 thunderbolt: Add DP IN resources for all routers ... commit 55fdc1f44cd6bb1d61c9ca946d8f7cd67ea0bf36 Author: Shaokun Zhang Date: Tue Jul 21 18:49:33 2020 +0800 arm64: perf: Expose some new events via sysfs Some new PMU events can been detected by PMCEID1_EL0, but it can't be listed, Let's expose these through sysfs. Signed-off-by: Shaokun Zhang Cc: Will Deacon Cc: Mark Rutland Link: https://lore.kernel.org/r/1595328573-12751-2-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit 59b4412f27f1410a5b22f0244368c4d5ea00d316 Author: Alexey Budankov Date: Fri Jul 17 09:59:12 2020 +0300 libperf: Avoid internal moving of fdarray fds Avoid moving of fds by fdarray__filter() so fds indices returned by fdarray__add() can be used for access and processing of objects at struct pollfd *entries. Signed-off-by: Alexey Budankov Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/676844f8-55d3-c628-23db-aa163a81519e@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 15d157e874437e381643c37a10922388d6e55b29 Author: Linus Walleij Date: Mon Jul 20 15:55:24 2020 +0200 usb: ohci-omap: Convert to use GPIO descriptors The OMAP1 OHCI driver is using the legacy GPIO API to grab some random GPIO lines. One is from the TPS65010 chip and used for power, another one is for overcurrent and while the driver picks this line it doesn't watch it at all. Convert the driver and the OMAP1 OSK board file to pass these two GPIOs as machine described GPIO descriptors. I noticed the overcurrent GPIO line is not really used in the code so dropped in a little comment for other developers. Cc: Janusz Krzysztofik Cc: Tony Lindgren Acked-by: Alan Stern Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200720135524.100374-2-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 233418634345b414595dc12afd07021169fc6d8e Author: Linus Walleij Date: Mon Jul 20 15:55:23 2020 +0200 usb: ohci-omap: Create private state container The OMAP1 was using static locals to hold the clock handles which is uncommon and does not scale. Create a private data struct and use that to hold the clocks. Cc: Janusz Krzysztofik Cc: Tony Lindgren Acked-by: Alan Stern Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200720135524.100374-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit d8a849353c9c7710faa260a1fd11918d1f533e86 Author: Xu Wang Date: Mon Jul 20 05:24:56 2020 +0000 usb: appledisplay: remove needless check before usb_free_coherent() usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20200720052456.7610-1-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit ffeb1e9e897b8d36b197275592d121c96d3bdb95 Author: Alexander A. Klimov Date: Sun Jul 19 18:09:10 2020 +0200 USB: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719160910.60018-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit a482766d008556c2f4976cf6096a4887da070f27 Author: Bixuan Cui Date: Fri Jul 17 08:22:53 2020 +0800 usb: usbtest: reduce stack usage in test_queue Fix the warning: [-Werror=-Wframe-larger-than=] drivers/usb/misc/usbtest.c: In function 'test_queue': drivers/usb/misc/usbtest.c:2148:1: warning: the frame size of 1232 bytes is larger than 1024 bytes Reported-by: kbuild test robot Acked-by: Alan Stern Signed-off-by: Bixuan Cui Link: https://lore.kernel.org/r/ffa85702-86ab-48d7-4da2-2efcc94b05d3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 6e1c2241f4cecfc21f26f44179d04217c8390338 Author: Badhri Jagan Sridharan Date: Wed Jul 15 20:41:28 2020 -0700 usb: typec: tcpm: Stay in BIST mode till hardreset or unattached Port starts to toggle when transitioning to unattached state. This is incorrect while in BIST mode. 6.4.3.1 BIST Carrier Mode Upon receipt of a BIST Message, with a BIST Carrier Mode BIST Data Object, the UUT Shall send out a continuous string of BMC encoded alternating "1"s and “0”s. The UUT Shall exit the Continuous BIST Mode within tBISTContMode of this Continuous BIST Mode being enabled(see Section 6.6.7.2). 6.4.3.2 BIST Test Data Upon receipt of a BIST Message, with a BIST Test Data BIST Data Object, the UUT Shall return a GoodCRC Message and Shall enter a test mode in which it sends no further Messages except for GoodCRC Messages in response to received Messages. See Section 5.9.2 for the definition of the Test Data Frame. The test Shall be ended by sending Hard Reset Signaling to reset the UUT. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200716034128.1251728-3-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit c081ac42fefcf459fc546627ecb78d27235b23fe Author: Badhri Jagan Sridharan Date: Wed Jul 15 20:41:27 2020 -0700 usb: typec: tcpci: Support BIST test data mode for compliance. Quoting from TCPCI spec: "Setting this bit to 1 is intended to be used only when a USB compliance tester is using USB BIST Test Data to test the PHY layer of the TCPC. The TCPM should clear this bit when a disconnect is detected. 0: Normal Operation. Incoming messages enabled by RECEIVE_DETECT passed to TCPM via Alert. 1: BIST Test Mode. Incoming messages enabled by RECEIVE_DETECT result in GoodCRC response but may not be passed to the TCPM via Alert." Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200716034128.1251728-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit b2dcfefc43f783c4462f30507f78b7bb093ee8df Author: Badhri Jagan Sridharan Date: Wed Jul 15 20:41:26 2020 -0700 usb: typec: tcpm: Support bist test data mode for compliance TCPM supports BIST carried mode. PD compliance tests require BIST Test Data to be supported as well. Introducing set_bist_data callback to signal tcpc driver for configuring the port controller hardware to enable/disable BIST Test Data mode. Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200716034128.1251728-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit d25d61be6bed44d3a5b7050836e6df602bf3d6ba Author: Kyle Tso Date: Tue Jul 14 11:34:53 2020 +0800 usb: typec: tcpm: Error handling for tcpm_register_partner_altmodes typec_partner_register_altmode returns ERR_PTR. Reset the pointer altmode to NULL on failure. Signed-off-by: Kyle Tso Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200714033453.4044482-3-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 1401bfe058d3ccf8867e9faf77744900c305e74e Author: Kyle Tso Date: Tue Jul 14 11:34:52 2020 +0800 usb: typec: Comment correction for typec_partner_register_altmode typec_register_altmode returns ERR_PTR on failure. Signed-off-by: Kyle Tso Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200714033453.4044482-2-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 658027afeab3070681bda5152eb9681c7731bcc8 Author: Prashant Malani Date: Wed Jul 8 17:24:41 2020 -0700 usb: typec: intel_pmc_mux: Avoid connect request on disconnect When pmc_usb_mux_set() is invoked when a device is disconnected, a valid scenario is for state->alt == NULL and state->mode == TYPEC_STATE_USB. In such cases, if a pmc_usb_disconnect() has already been issued (from either pmc_usb_set_orientation() when orientation == TYPEC_ORIENTATION_NONE, or pmc_usb_set_role() when role == USB_ROLE_NONE), a pmc_usb_connect() will be issued despite no peripheral being present. This confuses the PMC and leads to all subsequent PMC IPC requests returning errors due to timeout. To prevent this, return early if the port orientation or role is already set to none. Cc: Benson Leung Cc: Heikki Krogerus Cc: Rajmohan Mani Fixes: f3c1c41ebc67 ("usb: typec: intel_pmc_mux: Add support for USB4") Signed-off-by: Prashant Malani Link: https://lore.kernel.org/r/20200709002441.1309189-1-pmalani@chromium.org Signed-off-by: Greg Kroah-Hartman commit b1b6bed3b5036509b449b5965285d5057ba42527 Author: Kars Mulder Date: Tue Jul 7 16:43:50 2020 +0200 usb: core: fix quirks_param_set() writing to a const pointer The function quirks_param_set() takes as argument a const char* pointer to the new value of the usbcore.quirks parameter. It then casts this pointer to a non-const char* pointer and passes it to the strsep() function, which overwrites the value. Fix this by creating a copy of the value using kstrdup() and letting that copy be written to by strsep(). Fixes: 027bd6cafd9a ("usb: core: Add "quirks" parameter for usbcore") Signed-off-by: Kars Mulder Link: https://lore.kernel.org/r/5ee2-5f048a00-21-618c5c00@230659773 Signed-off-by: Greg Kroah-Hartman commit 306c54d0edb6ba94d39877524dddebaad7770cf2 Author: Andy Shevchenko Date: Thu Jul 2 17:30:45 2020 +0300 usb: hcd: Try MSI interrupts on PCI devices It appears that some platforms share same IRQ line between several devices, some of which are EHCI and OHCI controllers. This is neither practical nor performance-wise, especially in the case when they are supporting MSI. In order to improve the situation try to allocate MSI and fallback to legacy IRQ if no MSI available. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200702143045.23429-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 634b06def11cf7ecf6282c79735f08004e323983 Author: Xiongfeng Wang Date: Tue Jul 21 14:35:09 2020 +0800 ipmi/watchdog: add missing newlines when printing parameters by sysfs When I cat some ipmi_watchdog parameters by sysfs, it displays as follows. It's better to add a newline for easy reading. root@(none):/# cat /sys/module/ipmi_watchdog/parameters/action resetroot@(none):/# cat /sys/module/ipmi_watchdog/parameters/preaction pre_noneroot@(none):/# cat /sys/module/ipmi_watchdog/parameters/preop preop_noneroot@(none):/# Signed-off-by: Xiongfeng Wang Message-Id: <1595313309-43881-1-git-send-email-wangxiongfeng2@huawei.com> Signed-off-by: Corey Minyard commit e9f84ec63c6f0f2fecd3c5bdec0178bb927c0c77 Author: Gustavo A. R. Silva Date: Mon Jul 20 08:27:18 2020 -0500 phy: samsung-ufs: Fix IS_ERR argument Fix IS_ERR argument in samsung_ufs_phy_symbol_clk_init(). The proper argument to be passed to IS_ERR() is phy->rx1_symbol_clk. This bug was detected with the help of Coccinelle. Fixes: bca21e930451 ("phy: samsung-ufs: add UFS PHY driver for samsung SoC") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20200720132718.GA13413@embeddedor Signed-off-by: Vinod Koul commit a81844034e5b382df6cc06bc2943ae24be797afd Author: Bard Liao Date: Thu Jul 16 23:09:47 2020 +0800 Soundwire: intel_init: save Slave(s) _ADR info in sdw_intel_ctx Save ACPI information in context so that we can match machine driver with sdw _ADR matching tables. Suggested-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200716150947.22119-10-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit ab2c913297a1a9a62d6610023ba335b2f6bc8a04 Author: Rander Wang Date: Thu Jul 16 23:09:46 2020 +0800 soundwire: intel: add wake interrupt support When system is suspended in clock stop mode on intel platforms, both master and slave are in clock stop mode and soundwire bus is taken over by a glue hardware. The bus message for jack event is processed by this glue hardware, which will trigger an interrupt to resume audio pci device. Then audio pci driver will resume soundwire master and slave, transfer bus ownership to master, finally slave will report jack event to master and codec driver is triggered to check jack status. if a slave has been attached to a bus, the slave->dev_num_sticky should be non-zero, so we can check this value to skip the ghost devices defined in ACPI table but not populated in hardware. Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200716150947.22119-9-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 4a98a6b2fa75cf90863b7898457b211ace587e8a Author: Bard Liao Date: Thu Jul 16 23:09:45 2020 +0800 soundwire: intel/cadence: merge Soundwire interrupt handlers/threads The existing code uses one pair of interrupt handler/thread per link but at the hardware level the interrupt is shared. This works fine for legacy PCI interrupts, but leads to timeouts in MSI (Message-Signaled Interrupt) mode, likely due to edges being lost. This patch unifies interrupt handling for all links. The dedicated handler is removed since we use a common one for all shared interrupt sources, and the thread function takes care of dealing with interrupt sources. This partition follows the model used for the SOF IPC on HDaudio platforms, where similar timeout issues were noticed and doing all the interrupt handling/clearing in the thread improved reliability/stability. Validation results with 4 links active in parallel show a night-and-day improvement with no timeouts noticed even during stress tests. Latency and quality of service are not affected by the change - mostly because events on a SoundWire link are throttled by the bus frame rate (typically 8..48kHz). Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200716150947.22119-8-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 8459cea755e76d04b3f699acdd92676016909ff0 Author: Pierre-Louis Bossart Date: Thu Jul 16 23:09:44 2020 +0800 soundwire: intel_init: use EXPORT_SYMBOL_NS Make sure all symbols in this soundwire-intel-init module are exported with a namespace. The MODULE_IMPORT_NS will be used in Intel/SOF HDaudio modules to be posted in a separate series. Namespaces are only introduced for the Intel parts of the SoundWire code at this time, in future patches we should also add namespaces for Cadence parts and the SoundWire core. Suggested-by: Greg KH Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200716150947.22119-7-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 12b161468d51c732b3d13ddd9ba707774b8096d1 Author: Pierre-Louis Bossart Date: Thu Jul 16 23:09:43 2020 +0800 soundwire: intel_init: add implementation of sdw_intel_enable_irq() This function is required to enable all interrupts across all links. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200716150947.22119-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 437e3289b5eadb62803f024eea6e85ecb7adf6a2 Author: Pierre-Louis Bossart Date: Thu Jul 16 23:09:42 2020 +0800 soundwire: intel: introduce helper for link synchronization After arming the synchronization, the SYNCGO field controls the hardware-based synchronization between links. Move the programming and wait for clear of SYNCGO to dedicated helper. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200716150947.22119-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 02629e4548277e0abfd334385e96b32e474c6f60 Author: Pierre-Louis Bossart Date: Thu Jul 16 23:09:41 2020 +0800 soundwire: intel: introduce a helper to arm link synchronization Move code from pre_bank_switch to dedicated helper, will be used in follow-up patches as recommended by programming flows. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200716150947.22119-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 4a17c441c7cb06ac1e5fd3409a64d8ce78151983 Author: Pierre-Louis Bossart Date: Thu Jul 16 23:09:40 2020 +0800 soundwire: intel: revisit SHIM programming sequences. Somehow the existing code is not aligned with the steps described in the documentation, refactor code and make sure the register programming sequences are correct. Also add missing power-up, power-down and wake capabilities (the last two are used in follow-up patches but introduced here for consistency). Some of the SHIM registers exposed fields that are link specific, and in addition some of the power-related registers (SPA/CPA) take time to be updated. Uncontrolled access leads to timeouts or errors. Add a mutex, shared by all links, so that all accesses to such registers are serialized, and follow a pattern of read-modify-write. This includes making sure SHIM_SYNC is programmed only once, before the first master is powered on. We use a 'shim_mask' field, shared between all links and protected by a mutex, to deal with power-up and power-down sequences. Note that the SYNCPRD value is tied only to the XTAL value and not the current bus frequency or the frame rate. BugLink: https://github.com/thesofproject/linux/issues/1555 Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200716150947.22119-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 7d2845d58d257921f771f3fbed5982464ee4855b Author: Pierre-Louis Bossart Date: Thu Jul 16 23:09:39 2020 +0800 soundwire: intel: reuse code for wait loops to set/clear bits Refactor code and use same routines on set/clear Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200716150947.22119-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 70e380250c3621c55ff218cbaf2272830d9dbb1d Author: Pali Rohár Date: Thu Jul 2 10:30:36 2020 +0200 PCI: aardvark: Don't touch PCIe registers if no card connected When there is no PCIe card connected and advk_pcie_rd_conf() or advk_pcie_wr_conf() is called for PCI bus which doesn't belong to emulated root bridge, the aardvark driver throws the following error message: advk-pcie d0070000.pcie: config read/write timed out Obviously accessing PCIe registers of disconnected card is not possible. Extend check in advk_pcie_valid_device() function for validating availability of PCIe bus. If PCIe link is down, then the device is marked as Not Found and the driver does not try to access these registers. This is just an optimization to prevent accessing PCIe registers when card is disconnected. Trying to access PCIe registers of disconnected card does not cause any crash, kernel just needs to wait for a timeout. So if card disappear immediately after checking for PCIe link (before accessing PCIe registers), it does not cause any problems. Link: https://lore.kernel.org/r/20200702083036.12230-1-pali@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi commit 5f1f7f6c205a2e7f1d92229ac358254bd2826c2d Author: Will Deacon Date: Tue Jun 30 13:53:07 2020 +0100 arm64: Reduce the number of header files pulled into vmlinux.lds.S Although vmlinux.lds.S smells like an assembly file and is compiled with __ASSEMBLY__ defined, it's actually just fed to the preprocessor to create our linker script. This means that any assembly macros defined by headers that it includes will result in a helpful link error: | aarch64-linux-gnu-ld:./arch/arm64/kernel/vmlinux.lds:1: syntax error In preparation for an arm64-private asm/rwonce.h implementation, which will end up pulling assembly macros into linux/compiler.h, reduce the number of headers we include directly and transitively in vmlinux.lds.S Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon commit eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 Author: Will Deacon Date: Tue Jul 21 09:54:15 2020 +0100 compiler.h: Move compiletime_assert() macros into compiler_types.h The kernel test robot reports that moving READ_ONCE() out into its own header breaks a W=1 build for parisc, which is relying on the definition of compiletime_assert() being available: | In file included from ./arch/parisc/include/generated/asm/rwonce.h:1, | from ./include/asm-generic/barrier.h:16, | from ./arch/parisc/include/asm/barrier.h:29, | from ./arch/parisc/include/asm/atomic.h:11, | from ./include/linux/atomic.h:7, | from kernel/locking/percpu-rwsem.c:2: | ./arch/parisc/include/asm/atomic.h: In function 'atomic_read': | ./include/asm-generic/rwonce.h:36:2: error: implicit declaration of function 'compiletime_assert' [-Werror=implicit-function-declaration] | 36 | compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ | | ^~~~~~~~~~~~~~~~~~ | ./include/asm-generic/rwonce.h:49:2: note: in expansion of macro 'compiletime_assert_rwonce_type' | 49 | compiletime_assert_rwonce_type(x); \ | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ./arch/parisc/include/asm/atomic.h:73:9: note: in expansion of macro 'READ_ONCE' | 73 | return READ_ONCE((v)->counter); | | ^~~~~~~~~ Move these macros into compiler_types.h, so that they are available to READ_ONCE() and friends. Link: http://lists.infradead.org/pipermail/linux-arm-kernel/2020-July/587094.html Reported-by: kernel test robot Signed-off-by: Will Deacon commit ad83ec6ce13618a8b975ffdd8291742cb5b0005b Author: Will Deacon Date: Thu Nov 7 14:49:00 2019 +0000 checkpatch: Remove checks relating to [smp_]read_barrier_depends() The [smp_]read_barrier_depends() macros no longer exist, so we don't need to deal with them in the checkpatch script. Acked-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit c6cd2e011655aead2097273a04350f52429a1a8d Author: Will Deacon Date: Thu Nov 7 14:46:59 2019 +0000 include/linux: Remove smp_read_barrier_depends() from comments smp_read_barrier_depends() doesn't exist any more, so reword the two comments that mention it to refer to "dependency ordering" instead. Acked-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit 628fd55671f753a1e4fe8c21b6a0553503cade08 Author: Will Deacon Date: Thu Nov 7 14:44:06 2019 +0000 tools/memory-model: Remove smp_read_barrier_depends() from informal doc smp_read_barrier_depends() has gone the way of mmiowb() and so many esoteric memory barriers before it. Drop the two mentions of this deceased barrier from the LKMM informal explanation document. Acked-by: Peter Zijlstra (Intel) Acked-by: Alan Stern Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit 9ce1b14e74042a3477f880bee675945044880b01 Author: SeongJae Park Date: Fri Nov 29 19:08:37 2019 +0100 Documentation/barriers/kokr: Remove references to [smp_]read_barrier_depends() This commit translates commit ("Documentation/barriers: Remove references to [smp_]read_barrier_depends()") into Korean. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Yunjae Lee Signed-off-by: SeongJae Park Signed-off-by: Will Deacon commit 8ca924aeb4f28e5bf552707e8ecbe105c4f17c7b Author: Will Deacon Date: Thu Nov 7 14:36:37 2019 +0000 Documentation/barriers: Remove references to [smp_]read_barrier_depends() The [smp_]read_barrier_depends() barrier macros no longer exist as part of the Linux memory model, so remove all references to them from the Documentation/ directory. Although this is fairly mechanical on the whole, we drop the "CACHE COHERENCY" section entirely from 'memory-barriers.txt' as it doesn't make any sense now that the dependency barriers have been removed. Acked-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit 93fab07c22930c9ac4f01212fd92913c9a812f9f Author: Will Deacon Date: Wed Oct 30 17:17:22 2019 +0000 locking/barriers: Remove definitions for [smp_]read_barrier_depends() There are no remaining users of [smp_]read_barrier_depends(), so remove it from the generic implementation of 'barrier.h'. Acked-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit bb7cdd38185a4f9fa32e62db115c2c6dceb2b621 Author: Will Deacon Date: Wed Oct 30 17:15:01 2019 +0000 alpha: Replace smp_read_barrier_depends() usage with smp_[r]mb() In preparation for removing smp_read_barrier_depends() altogether, move the Alpha code over to using smp_rmb() and smp_mb() directly. Acked-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit 71c0b9a65cefa8c34eab83d337a1e3ec61fb7cc2 Author: Will Deacon Date: Wed Oct 30 16:22:17 2019 +0000 vhost: Remove redundant use of read_barrier_depends() barrier Since commit 76ebbe78f739 ("locking/barriers: Add implicit smp_read_barrier_depends() to READ_ONCE()"), there is no need to use smp_read_barrier_depends() outside of the Alpha architecture code. Unfortunately, there is precisely _one_ user in the vhost code, and there isn't an obvious READ_ONCE() access making the barrier redundant. However, on closer inspection (thanks, Jason), it appears that vring synchronisation between the producer and consumer occurs via the 'avail_idx' field, which is followed up by an rmb() in vhost_get_vq_desc(), making the read_barrier_depends() redundant on Alpha. Jason says: | I'm also confused about the barrier here, basically in driver side | we did: | | 1) allocate pages | 2) store pages in indirect->addr | 3) smp_wmb() | 4) increase the avail idx (somehow a tail pointer of vring) | | in vhost we did: | | 1) read avail idx | 2) smp_rmb() | 3) read indirect->addr | 4) read from indirect->addr | | It looks to me even the data dependency barrier is not necessary | since we have rmb() which is sufficient for us to the correct | indirect->addr and driver are not expected to do any writing to | indirect->addr after avail idx is increased Remove the redundant barrier invocation. Acked-by: Michael S. Tsirkin Acked-by: Peter Zijlstra (Intel) Suggested-by: Jason Wang Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit 002dff36acfba3476b685a09f78ffb7c452f5951 Author: Will Deacon Date: Fri Jul 10 14:49:40 2020 +0100 asm/rwonce: Don't pull into 'asm-generic/rwonce.h' Now that 'smp_read_barrier_depends()' has gone the way of the Norwegian Blue, drop the inclusion of in 'asm-generic/rwonce.h'. This requires fixups to some architecture vdso headers which were previously relying on 'asm/barrier.h' coming in via 'linux/compiler.h'. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Will Deacon commit 3c9184109e78ea2371ca8fa66d7f36986a53af98 Author: Will Deacon Date: Wed Oct 30 16:51:07 2019 +0000 asm/rwonce: Remove smp_read_barrier_depends() invocation Alpha overrides __READ_ONCE() directly, so there's no need to use smp_read_barrier_depends() in the core code. This also means that __READ_ONCE() can be relied upon to provide dependency ordering. Acked-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit d6462858851549c62d73eaa14b31132b0f32d6b6 Author: Will Deacon Date: Wed Oct 30 16:50:10 2019 +0000 alpha: Override READ_ONCE() with barriered implementation Rather then relying on the core code to use smp_read_barrier_depends() as part of the READ_ONCE() definition, instead override __READ_ONCE() in the Alpha code so that it generates the required mb() and then implement smp_load_acquire() using the new macro to avoid redundant back-to-back barriers from the generic implementation. Acked-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit b78b331a3f5c0773171dadd6bbfa2a2242b45604 Author: Will Deacon Date: Tue Oct 15 17:30:47 2019 -0700 asm/rwonce: Allow __READ_ONCE to be overridden by the architecture The meat and potatoes of READ_ONCE() is defined by the __READ_ONCE() macro, which uses a volatile casts in an attempt to avoid tearing of byte, halfword, word and double-word accesses. Allow this to be overridden by the architecture code in the case that things like memory barriers are also required. Acked-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit e506ea451254ab17e0bf918ca36232fec2a9b10c Author: Will Deacon Date: Tue Oct 15 16:29:32 2019 -0700 compiler.h: Split {READ,WRITE}_ONCE definitions out into rwonce.h In preparation for allowing architectures to define their own implementation of the READ_ONCE() macro, move the generic {READ,WRITE}_ONCE() definitions out of the unwieldy 'linux/compiler.h' file and into a new 'rwonce.h' header under 'asm-generic'. Acked-by: Peter Zijlstra (Intel) Acked-by: Paul E. McKenney Signed-off-by: Will Deacon commit f143c11bb7b924403ea2d5b5c990717772293620 Author: Will Deacon Date: Thu Nov 21 12:41:40 2019 +0000 tools: bpf: Use local copy of headers including uapi/linux/filter.h Pulling header files directly out of the kernel sources for inclusion in userspace programs is highly error prone, not least because it bypasses the kbuild infrastructure entirely and so may end up referencing other header files that have not been generated. Subsequent patches will cause compiler.h to pull in the ungenerated asm/rwonce.h file via filter.h, breaking the build for tools/bpf: | $ make -C tools/bpf | make: Entering directory '/linux/tools/bpf' | CC bpf_jit_disasm.o | LINK bpf_jit_disasm | CC bpf_dbg.o | In file included from /linux/include/uapi/linux/filter.h:9, | from /linux/tools/bpf/bpf_dbg.c:41: | /linux/include/linux/compiler.h:247:10: fatal error: asm/rwonce.h: No such file or directory | #include | ^~~~~~~~~~~~~~ | compilation terminated. | make: *** [Makefile:61: bpf_dbg.o] Error 1 | make: Leaving directory '/linux/tools/bpf' Take a copy of the installed version of linux/filter.h (i.e. the one created by the 'headers_install' target) into tools/include/uapi/linux/ and adjust the BPF tool Makefile to reference the local include directories instead of those in the main source tree. Cc: Masahiro Yamada Acked-by: Peter Zijlstra (Intel) Acked-by: Alexei Starovoitov Suggested-by: Daniel Borkmann Reported-by: Xiao Yang Signed-off-by: Will Deacon commit d9b6b5150fba262ca36c01470a4e188b142fe39a Author: Amelie Delaunay Date: Tue Jun 16 16:07:17 2020 +0200 ARM: dts: stm32: enable usb-role-switch on USB OTG on stm32mp15xx-dkx Now that USB OTG driver supports usb role switch by overriding PHY input signals (A-Valid, B-Valid and Vbus-Valid), enable it on stm32mp15xx-dkx. dr_mode needn't to be forced to Peripheral anymore, it is set to OTG in SoC device tree. USB role (USB_ROLE_NONE, USB_ROLE_DEVICE, USB_ROLE_HOST) will be provided by STUSB1600 Type-C controller driver. This patch depends on "Add STUSB160x Type-C port controller support" series, which is under review. Signed-off-by: Amelie Delaunay Signed-off-by: Alexandre Torgue commit cb7c6677bfb5c92526df73b20760d65bd9189344 Author: Cristian Ciocaltea Date: Fri Jul 3 20:05:12 2020 +0300 MAINTAINERS: Add reset binding entry for Actions Semi Owl SoCs Add a reset binding entry to match all members of Actions Semi Owl SoCs. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/78d63d97e3a8a8f7a9048b6eec74a9d158578833.1593788312.git.cristian.ciocaltea@gmail.com Reviewed-by: Manivannan Sadhasivam Signed-off-by: Stephen Boyd commit 9fb961da91393e33b09a87582ee526e6328869a1 Author: Cristian Ciocaltea Date: Fri Jul 3 20:05:11 2020 +0300 clk: actions: Add Actions S500 SoC Reset Management Unit support Add Reset Management Unit (RMU) support for Actions Semi S500 SoC. Signed-off-by: Cristian Ciocaltea Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/3fba2e6f0edfac97cb8c6ce60f95c24852578eac.1593788312.git.cristian.ciocaltea@gmail.com Signed-off-by: Stephen Boyd commit fac1d443a2b73dfb5b277d4e3c202609f0927eb5 Author: Cristian Ciocaltea Date: Fri Jul 3 20:05:10 2020 +0300 dt-bindings: reset: Add binding constants for Actions S500 RMU Add device tree binding constants for Actions Semi S500 SoC Reset Management Unit (RMU). Signed-off-by: Cristian Ciocaltea Acked-by: Philipp Zabel Link: https://lore.kernel.org/r/daf615160b3be9f38dcf7926cc82128c9c2d73e3.1593788312.git.cristian.ciocaltea@gmail.com Reviewed-by: Manivannan Sadhasivam Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit b81e88dead64b4d3725b02bf275d5594943c125a Author: Cristian Ciocaltea Date: Fri Jul 3 20:05:09 2020 +0300 clk: actions: Add APB, DMAC, GPIO clock support for Actions S500 SoC Add support for the missing APB, DMAC and GPIO clocks in the Actions Semi S500 SoC clock driver. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/87964ae012e513597b8b4c7be2e7ac332a70087a.1593788312.git.cristian.ciocaltea@gmail.com Reviewed-by: Manivannan Sadhasivam Signed-off-by: Stephen Boyd commit 1a4ae4138f386600fc539747bb978873299017f8 Author: Cristian Ciocaltea Date: Fri Jul 3 20:05:08 2020 +0300 dt-bindings: clock: Add APB, DMAC, GPIO bindings for Actions S500 SoC Add the missing APB, DMAC and GPIO clock bindings constants for Actions Semi S500 SoC. Signed-off-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/67112af4f5bc0cc5e70ce8410feb369cc72972b8.1593788312.git.cristian.ciocaltea@gmail.com Reviewed-by: Manivannan Sadhasivam Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit f47ee279d25fb0e010cae5d6e758e39b40eb6378 Author: Cristian Ciocaltea Date: Fri Jul 3 20:05:07 2020 +0300 clk: actions: Fix h_clk for Actions S500 SoC The h_clk clock in the Actions Semi S500 SoC clock driver has an invalid parent. Replace with the correct one. Fixes: ed6b4795ece4 ("clk: actions: Add clock driver for S500 SoC") Signed-off-by: Cristian Ciocaltea Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/c57e7ebabfa970014f073b92fe95b47d3e5a70b1.1593788312.git.cristian.ciocaltea@gmail.com Signed-off-by: Stephen Boyd commit b4f2fcb534875e2e57c96a0358267f2109d68004 Author: Andy Shevchenko Date: Thu Jul 16 15:42:44 2020 +0300 pinctrl: intel: Add Intel Emmitsburg pin controller support This driver adds pinctrl/GPIO support for Intel Emmitsburg PCH. The GPIO controller is based on the next generation GPIO hardware but still compatible with the one supported by the Intel core pinctrl/GPIO driver. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Acked-by: Mika Westerberg commit cff1d293bb3ad35fb1eedb2d2e462935f4a42489 Author: Amit Kucheria Date: Mon Jul 20 17:13:08 2020 +0530 dt-bindings: thermal: Get rid of thermal.txt and replace references Now that we have yaml bindings for the thermal subsystem, get rid of the old bindings (thermal.txt). Replace all references to thermal.txt in the Documentation with a link to the appropriate YAML bindings using the following search and replace pattern: - If the reference is specific to the thermal-sensor-cells property, replace with a pointer to thermal-sensor.yaml - If the reference is to the cooling-cells property, replace with a pointer to thermal-cooling-devices.yaml - If the reference is generic thermal bindings, replace with a reference to thermal*.yaml. Signed-off-by: Amit Kucheria Acked-by: Viresh Kumar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/e9aacd33071a00568b67e110fa3bcc4d86d3e1e4.1595245166.git.amit.kucheria@linaro.org commit 3f5a2cbe0f5c54adcada54a6a0567690241e7b3a Author: Daniel Lezcano Date: Fri Jul 17 18:42:17 2020 +0200 thermal: core: Move initialization after core initcall The generic netlink is initialized at subsys_initcall, so far after the thermal init routine and the thermal generic netlink family initialization. On ŝome platforms, that leads to a memory corruption. The fix was sent to netdev@ to move the genetlink framework initialization at core_initcall. Move the thermal core initialization to postcore level which is very close to core level. Reported-by: Marek Szyprowski Signed-off-by: Daniel Lezcano Tested-by: Marek Szyprowski Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20200717164217.18819-2-daniel.lezcano@linaro.org commit d2a89b52839597c70746d9f46a21b1aab0a26c02 Author: Daniel Lezcano Date: Fri Jul 17 18:42:16 2020 +0200 thermal: netlink: Improve the initcall ordering The initcalls like to play joke. In our case, the thermal-netlink initcall is called after the thermal-core initcall but this one sends a notification before the former is initialized. No issue was spotted, but it could lead to a memory corruption, so instead of relying on the core_initcall for the thermal-netlink, let's initialize directly from the thermal-core init routine, so we have full control of the init ordering. Reported-by: Marek Szyprowski Signed-off-by: Daniel Lezcano Tested-by: Marek Szyprowski Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20200717164217.18819-1-daniel.lezcano@linaro.org commit c62e7ac395641a764639b1c6635955f02b8d9d16 Author: Daniel Lezcano Date: Wed Jul 15 09:41:18 2020 +0200 net: genetlink: Move initialization to core_initcall The generic netlink is initialized far after the netlink protocol itself at subsys_initcall. The devlink is initialized at the same level, but after, as shown by a disassembly of the vmlinux: [ ... ] 374 ffff8000115f22c0 <__initcall_devlink_init4>: 375 ffff8000115f22c4 <__initcall_genl_init4>: [ ... ] The function devlink_init() calls genl_register_family() before the generic netlink subsystem is initialized. As the generic netlink initcall level is set since 2005, it seems that was not a problem, but now we have the thermal framework initialized at the core_initcall level which creates the generic netlink family and sends a notification which leads to a subtle memory corruption only detectable when the CONFIG_INIT_ON_ALLOC_DEFAULT_ON option is set with the earlycon at init time. The thermal framework needs to be initialized early in order to begin the mitigation as soon as possible. Moving it to postcore_initcall is acceptable. This patch changes the initialization level for the generic netlink family to the core_initcall and comes after the netlink protocol initialization. Signed-off-by: Daniel Lezcano Acked-by: David S. Miller Tested-by: Marek Szyprowski Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20200715074120.8768-1-daniel.lezcano@linaro.org commit 947d85f00c030aa88eef0c065b6f4636547257d7 Author: Marian-Cristian Rotariu Date: Wed Jul 15 12:08:53 2020 +0100 thermal: rcar_gen3_thermal: Add r8a774e1 support Add r8a774e1 specific compatible string. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1594811350-14066-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com commit af0e5f1f47d8b7139ee446bc2367f74e4f034202 Author: Amit Kucheria Date: Wed Jul 1 21:44:14 2020 +0530 thermal/drivers/clock_cooling: Remove clock_cooling code clock_cooling has no in-kernel users. It has never found any use in drivers as far as I can tell. Remove the code. Signed-off-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/aa5d5ac2589cf7b14ece882130731b4a916849a6.1593619943.git.amit.kucheria@linaro.org commit 52674f565718f18893da9a05e8e2528446d26792 Author: Colin Ian King Date: Mon Jul 6 15:07:47 2020 +0100 thermal: core: remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Zhang Rui Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200706140747.489075-1-colin.king@canonical.com commit 5b8583d3bd7fc10cea07e4a5bfa59465758a39dc Author: Daniel Lezcano Date: Tue Jul 7 11:01:57 2020 +0200 thermal: netlink: Fix compilation error when CONFIG_NET=n When the network is not configured, the netlink is disabled on all the system. The thermal framework assumed the netlink is always opt-in. Fix this by adding a Kconfig option for the netlink notification, defaulting to yes and depending on CONFIG_NET. As the change implies multiple stubs and in order to not pollute the internal thermal header, the thermal_nelink.h has been added and included in the thermal_core.h, so this one regain some kind of clarity. Reported-by: Randy Dunlap Signed-off-by: Daniel Lezcano Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20200707090159.1018-1-daniel.lezcano@linaro.org commit a656ae15e9ce203c45a68b8d517bf006851fe0b2 Author: Benjamin Gaignard Date: Fri Jul 3 11:55:20 2020 +0200 ARM: dts: stm32: Add compatibles for syscon for stm32mp151 Syscon nodes needs at least 2 compatibles to be compliant why yaml documentation. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 1f96adbb720f920e84332c8e29ba59fa97b00721 Author: Benjamin Gaignard Date: Fri Jul 3 11:55:19 2020 +0200 ARM: dts: stm32: Add compatibles for syscon for stm32h743 Syscon nodes needs at least 2 compatibles to be compliant why yaml documentation. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit ae2268696f0e36bf11d0262282d66bb42270835a Author: Benjamin Gaignard Date: Fri Jul 3 11:55:18 2020 +0200 ARM: dts: stm32: Add compatibles for syscon for stm32f746 Syscon nodes needs at least 2 compatibles to be compliant why yaml documentation. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 133e6acfaee665aa2e0292e0594337fd616b4924 Author: Benjamin Gaignard Date: Fri Jul 3 11:55:17 2020 +0200 ARM: dts: stm32: Add compatibles for syscon for stm32f426 Syscon nodes needs at least 2 compatibles to be compliant why yaml documentation. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit ece1420e3cd6d72def4ffd8ee6a51b1803ea896e Author: Benjamin Gaignard Date: Fri Jul 3 11:55:16 2020 +0200 dt-bindings: arm: stm32: Add compatibles for syscon nodes Since commit ad440432d1f9 ("dt-bindings: mfd: Ensure 'syscon' has a more specific compatible") it is required to provide at least 2 compatibles string for syscon node. This patch document the missing compatibles for stm32 SoCs. Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue commit 88f46b3fe2ac41c381770ebad9f2ee49346b57a2 Author: Liu Jian Date: Mon Jul 20 22:33:15 2020 +0800 ieee802154: fix one possible memleak in ca8210_dev_com_init We should call destroy_workqueue to destroy mlme_workqueue in error branch. Fixes: ded845a781a5 ("ieee802154: Add CA8210 IEEE 802.15.4 device driver") Signed-off-by: Liu Jian Link: https://lore.kernel.org/r/20200720143315.40523-1-liujian56@huawei.com Signed-off-by: Stefan Schmidt commit 4fe663890ac5b3b099f458b20cce13fe8efec12b Author: Patrick Delaunay Date: Wed Jul 8 13:43:24 2020 +0200 ARM: dts: stm32: Fix spi4 pins in stm32mp15-pinctrl Move spi4_pins_a nodes from pinctrl_z to pinctrl as the associated pins are not in BANK Z. Fixes: 498a7014989d ("ARM: dts: stm32: Add missing pinctrl entries for STM32MP15") Signed-off-by: Patrick Delaunay Reviewed-by: Manivannan Sadhasivam Signed-off-by: Alexandre Torgue commit 4e4fcc9e6f439f2e8d0c79fd0c6518b7811cefda Author: Serge Semin Date: Tue Jul 14 15:57:52 2020 +0300 MAINTAINERS: Add maintainers for MIPS core drivers Add Thomas and myself as maintainers of the MIPS CPU and GIC IRQchip, MIPS GIC timer and MIPS CPS CPUidle drivers. Signed-off-by: Serge Semin Acked-by: Marc Zyngier Acked-by: Daniel Lezcano Signed-off-by: Thomas Bogendoerfer commit 16274e58c4736cf31e7d61059d74ca94735084a3 Author: Serge Semin Date: Tue Jul 14 15:57:51 2020 +0300 bus: cdmm: Add MIPS R5 arch support CDMM may be available not only on MIPS R2 architectures, but also on newer MIPS R5 chips. For instance our P5600 chip has one. Let's mark the CDMM bus being supported for that MIPS arch too. Signed-off-by: Serge Semin Reviewed-by: Thomas Bogendoerfer Signed-off-by: Thomas Bogendoerfer commit 2121aa3e2312ccc1d6299154dc4f07a6ab8beee2 Author: Serge Semin Date: Tue Jul 14 15:57:50 2020 +0300 mips: cdmm: Add mti,mips-cdmm dtb node support Since having and mapping the CDMM block is platform specific, then instead of just returning a zero-address, lets make the default CDMM base address search method (mips_cdmm_phys_base()) to do something useful. For instance to find the address in a dedicated dtb-node in order to support of-based platforms by default. Signed-off-by: Serge Semin Signed-off-by: Thomas Bogendoerfer commit c9a56aa972f7c89b6e70e41cd04f4cadc5cc51d7 Author: Serge Semin Date: Tue Jul 14 15:57:49 2020 +0300 dt-bindings: bus: Add MIPS CDMM controller It's a Common Device Memory Map controller embedded into the MIPS IP cores, which dts node is supposed to have compatible and reg properties. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit e4fd970752ec663b80495117c706368087b4e486 Author: Serge Semin Date: Tue Jul 14 15:57:48 2020 +0300 dt-bindings: interrupt-controller: Convert mti,gic to DT schema Modern device tree bindings are supposed to be created as YAML-files in accordance with DT schema. This commit replaces MIPS GIC legacy bare text binding with YAML file. As before the binding file states that the corresponding dts node is supposed to be compatible with MIPS Global Interrupt Controller indicated by the "mti,gic" compatible string and to provide a mandatory interrupt-controller and '#interrupt-cells' properties. There might be optional registers memory range, "mti,reserved-cpu-vectors" and "mti,reserved-ipi-vectors" properties specified. MIPS GIC also includes a free-running global timer, per-CPU count/compare timers, and a watchdog. Since currently the GIC Timer is only supported the DT schema expects an IRQ and clock-phandler charged timer sub-node with "mti,mips-gic-timer" compatible string. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 29cf195d33409b76a84cd8722967c96cc7162ca0 Author: Serge Semin Date: Tue Jul 14 15:57:47 2020 +0300 dt-bindings: power: Convert mti,mips-cpc to DT schema It's a Cluster Power Controller embedded into the MIPS IP cores. Currently the corresponding dts node is supposed to have compatible and reg properties. Signed-off-by: Serge Semin Reviewed-by: Rob Herring Cc: Alexey Malahov Signed-off-by: Thomas Bogendoerfer commit 164c10aed934332390826cae45ad81ad0fef39cb Author: Fabrice Gasnier Date: Tue Jun 23 11:31:12 2020 +0200 ARM: dts: stm32: configure i2c5 support on stm32mp15xx-dkx Configure I2C5 on stm32mp15 DK boards. It's available and can be used on: - Arduino connector - GPIO expansion connector Keep it disabled by default, so the pins are kept in their initial state to lower power consumption. This way they can also be used as GPIO. Signed-off-by: Fabrice Gasnier Signed-off-by: Alain Volmat Signed-off-by: Alexandre Torgue commit 63e95849a774140ea0825f99be35765758bb7341 Merge: b396b3d206cdc 22b1408b0d282 Author: Stephen Boyd Date: Tue Jul 21 01:03:16 2020 -0700 Merge branch 'clk-imx' into clk-next * clk-imx: clk: imx: vf610: add CAAM clock clk: imx8mp: add mu root clk commit 22b1408b0d282c1cd09846f8e3fe3a1e9b962eb4 Merge: b3a9e3b9622ae 018e4308349db Author: Stephen Boyd Date: Tue Jul 21 01:02:00 2020 -0700 Merge tag 'clk-imx-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-imx Pull i.MX clk updates from Shawn Guo: - Add CAAM clock support for vf610 driver - Add MU root clock support for imx8mp driver * tag 'clk-imx-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: clk: imx: vf610: add CAAM clock clk: imx8mp: add mu root clk commit b396b3d206cdc7942e8c4f008f994066b4cb3c71 Merge: fca14845764a9 bfd35bf9cebc3 Author: Stephen Boyd Date: Tue Jul 21 01:01:11 2020 -0700 Merge branch 'clk-amlogic' into clk-next * clk-amlogic: clk: meson: meson8b: add the vclk2_en gate clock clk: meson: meson8b: add the vclk_en gate clock clk: meson: meson8b: Drop CLK_IS_CRITICAL from fclk_div2 clk: meson: g12a: Add support for NNA CLK source clocks dt-bindings: clk: g12a-clkc: Add NNA CLK Source clock IDs commit bfd35bf9cebc3627fd010c1230e3da154369b016 Merge: b3a9e3b9622ae 2568528f55356 Author: Stephen Boyd Date: Tue Jul 21 00:58:07 2020 -0700 Merge tag 'clk-meson-v5.9-1' of https://github.com/BayLibre/clk-meson into clk-amlogic Pull Amlogic clk driver updates from Jerome Brunet: - g12: add neural network accelerator clock sources - meson8: remove critical flag for main PLL divider - meson8: add video decoder clock gates * tag 'clk-meson-v5.9-1' of https://github.com/BayLibre/clk-meson: clk: meson: meson8b: add the vclk2_en gate clock clk: meson: meson8b: add the vclk_en gate clock clk: meson: meson8b: Drop CLK_IS_CRITICAL from fclk_div2 clk: meson: g12a: Add support for NNA CLK source clocks dt-bindings: clk: g12a-clkc: Add NNA CLK Source clock IDs commit fca14845764a93d74c285a98c010885e0d3295d9 Merge: 73d6bd7acb021 210f7240029dd Author: Stephen Boyd Date: Tue Jul 21 00:57:38 2020 -0700 Merge branch 'clk-renesas' into clk-next * clk-renesas: clk: renesas: cpg-mssr: Add r8a774e1 support dt-bindings: clock: renesas,cpg-mssr: Document r8a774e1 clk: renesas: Add r8a774e1 CPG Core Clock Definitions dt-bindings: power: Add r8a774e1 SYSC power domain definitions commit 3d6cfb36ed719e5efdc2a6a8e8ee07f185c88da1 Author: Alexandre Belloni Date: Mon Jul 20 09:52:50 2020 +0200 rtc: ds1374: remove unused define Remove unused define and fix typo where it should have been used. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200720075250.1019172-2-alexandre.belloni@bootlin.com commit c7f3be4c94d3686ec67b7e7b4fb47e4c225a2789 Author: Alexandre Belloni Date: Mon Jul 20 09:52:49 2020 +0200 rtc: ds1374: fix RTC_DRV_DS1374_WDT dependencies It is not enough to select WATCHDOG_CORE, the watchdog part of the driver now also depends on WATCHDOG. This is currently the best we can do because alarm support and watchdog support are mutually exclusive. Reported-by: Randy Dunlap Signed-off-by: Alexandre Belloni Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20200720075250.1019172-1-alexandre.belloni@bootlin.com commit 210f7240029ddaef15f94d285e8ab54e9c728d5d Merge: ef14fffee5d50 c8a53fa1d2119 Author: Stephen Boyd Date: Tue Jul 21 00:56:01 2020 -0700 Merge tag 'clk-renesas-for-v5.9-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 the new RZ/G2H (R8A774E1) SoC * tag 'clk-renesas-for-v5.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: cpg-mssr: Add r8a774e1 support dt-bindings: clock: renesas,cpg-mssr: Document r8a774e1 clk: renesas: Add r8a774e1 CPG Core Clock Definitions dt-bindings: power: Add r8a774e1 SYSC power domain definitions commit 73d6bd7acb021c75c0a80c889f513cc024380371 Merge: 46e3ecda63577 9c3df2b1993da Author: Stephen Boyd Date: Tue Jul 21 00:55:21 2020 -0700 Merge branch 'clk-qcom' into clk-next * clk-qcom: clk: qcom: gcc: Make disp gpll0 branch aon for sc7180/sdm845 ipq806x: gcc: add support for child probe clk: qcom: msm8996: Make symbol 'cpu_msm8996_clks' static clk: qcom: ipq8074: Add correct index for PCIe clocks commit c622308f8adf3e51460a2a5fe543602ddb5cbf38 Author: Erwan Le Ray Date: Thu Jun 18 15:06:51 2020 +0200 ARM: dts: stm32: add usart2 node to stm32mp157c-dk2 Adds the usart2 node to stm32mp157c-dk2 board. usart2 pins are connected to Bluetooth component. usart2 is disabled by default. Signed-off-by: Erwan Le Ray Signed-off-by: Alexandre Torgue commit f74c7be7ce431e1b94d05698b1786b4859c8bba6 Author: Erwan Le Ray Date: Thu Jun 18 15:06:50 2020 +0200 ARM: dts: stm32: add uart7 support to stm32mp15xx-dkx boards Adds uart7 node to stm32mp15xx-dkx and uart7 alias to stm32mp157a-dk1 and stm32mp157c-dk2 boards. uart7 pins are connected to Arduino connector. uart7 is disabled by default. Signed-off-by: Erwan Le Ray Signed-off-by: Alexandre Torgue commit afc0666d03af36298ad5516b38699f33f5efee78 Author: Erwan Le Ray Date: Thu Jun 18 15:06:49 2020 +0200 ARM: dts: stm32: add usart3 node to stm32mp157c-ev1 Adds the usart3 node to stm32mp157c-ev1 board. usart3 pins are connected to GPIO Expansion connector. usart3 is disabled by default. Signed-off-by: Erwan Le Ray Signed-off-by: Alexandre Torgue commit ec847908966ed24b232e1f72cbdef85115ea684d Author: Erwan Le Ray Date: Thu Jun 18 15:06:48 2020 +0200 ARM: dts: stm32: add usart3 node to stm32mp15xx-dkx boards Adds usart3 node to stm32mp15xx-dkx and usart3 alias to stm32mp157a-dk1 and stm32mp157c-dk2 boards. usart3 pins are connected to GPIO Expansion connector. usart3 is disabled by default. Signed-off-by: Erwan Le Ray Signed-off-by: Alexandre Torgue commit 842ed898a757928c42281ce65f505029c5c837a9 Author: Erwan Le Ray Date: Thu Jun 18 15:06:47 2020 +0200 ARM: dts: stm32: add usart2, usart3 and uart7 pins in stm32mp15-pinctrl Adds usart2_pins_c, usart3_pins_b, usart3_pins_c and uart7_pins_c pins configurations in stm32mp15-pinctrl. - usart2_pins_c pins are connected to Bluetooth chip on dk2 board. - usart3_pins_b pins are connected to GPIO expansion connector on evx board. - usart3_pins_c pins are connected to GPIO expansion connector on dkx board. - uart7_pins_c pins are connected to Arduino Uno connector on dkx board. Signed-off-by: Erwan Le Ray Signed-off-by: Alexandre Torgue commit 9c3df2b1993da9ab1110702d7b2815d5cd8c02f3 Author: Taniya Das Date: Wed Jul 15 12:24:10 2020 +0530 clk: qcom: gcc: Make disp gpll0 branch aon for sc7180/sdm845 The display gpll0 branch clock inside GCC needs to always be enabled. Otherwise the AHB clk (disp_cc_mdss_ahb_clk_src) for the display clk controller (dispcc) will stop clocking while sourcing from gpll0 when this branch inside GCC is turned off during unused clk disabling. We can never turn this branch off because the AHB clk for the display subsystem is needed to read/write any registers inside the display subsystem including clk related ones. This makes this branch a really easy way to turn off AHB access to the display subsystem and cause all sorts of mayhem. Let's just make the clk ops keep the clk enabled forever and ignore any attempts to disable this clk so that dispcc accesses keep working. Signed-off-by: Taniya Das Reported-by: Evan Green Link: https://lore.kernel.org/r/1594796050-14511-1-git-send-email-tdas@codeaurora.org Fixes: 17269568f726 ("clk: qcom: Add Global Clock controller (GCC) driver for SC7180") Fixes: 06391eddb60a ("clk: qcom: Add Global Clock controller (GCC) driver for SDM845") [sboyd@kernel.org: Fill out commit text more] Signed-off-by: Stephen Boyd commit 72b6ede7362327c0cff8e159fbb8c8fd9611e26e Author: Daniel Vetter Date: Thu Jul 9 14:33:38 2020 +0200 dma-buf.rst: Document why indefinite fences are a bad idea Comes up every few years, gets somewhat tedious to discuss, let's write this down once and for all. What I'm not sure about is whether the text should be more explicit in flat out mandating the amdkfd eviction fences for long running compute workloads or workloads where userspace fencing is allowed. v2: Now with dot graph! v3: Typo (Dave Airlie) Reviewed-by: Thomas Hellstrom Acked-by: Jason Ekstrand Acked-by: Christian König Acked-by: Daniel Stone Acked-by: Dave Airlie Reviewed-by: Maarten Lankhorst Cc: Jesse Natalie Cc: Steve Pronovost Cc: Jason Ekstrand Cc: Felix Kuehling Cc: Mika Kuoppala Cc: Thomas Hellstrom Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: linux-rdma@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Christian König Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200709123339.547390-1-daniel.vetter@ffwll.ch commit d0b9a9aef0a18e7ba473d0887e7ebd107ab84fe4 Author: Daniel Vetter Date: Tue Jul 7 22:12:06 2020 +0200 dma-fence: prime lockdep annotations Two in one go: - it is allowed to call dma_fence_wait() while holding a dma_resv_lock(). This is fundamental to how eviction works with ttm, so required. - it is allowed to call dma_fence_wait() from memory reclaim contexts, specifically from shrinker callbacks (which i915 does), and from mmu notifier callbacks (which amdgpu does, and which i915 sometimes also does, and probably always should, but that's kinda a debate). Also for stuff like HMM we really need to be able to do this, or things get real dicey. Consequence is that any critical path necessary to get to a dma_fence_signal for a fence must never a) call dma_resv_lock nor b) allocate memory with GFP_KERNEL. Also by implication of dma_resv_lock(), no userspace faulting allowed. That's some supremely obnoxious limitations, which is why we need to sprinkle the right annotations to all relevant paths. The one big locking context we're leaving out here is mmu notifiers, added in commit 23b68395c7c78a764e8963fc15a7cfd318bf187f Author: Daniel Vetter Date: Mon Aug 26 22:14:21 2019 +0200 mm/mmu_notifiers: add a lockdep map for invalidate_range_start/end that one covers a lot of other callsites, and it's also allowed to wait on dma-fences from mmu notifiers. But there's no ready-made functions exposed to prime this, so I've left it out for now. v2: Also track against mmu notifier context. v3: kerneldoc to spec the cross-driver contract. Note that currently i915 throws in a hard-coded 10s timeout on foreign fences (not sure why that was done, but it's there), which is why that rule is worded with SHOULD instead of MUST. Also some of the mmu_notifier/shrinker rules might surprise SoC drivers, I haven't fully audited them all. Which is infeasible anyway, we'll need to run them with lockdep and dma-fence annotations and see what goes boom. v4: A spelling fix from Mika v5: #ifdef for CONFIG_MMU_NOTIFIER. Reported by 0day. Unfortunately this means lockdep enforcement is slightly inconsistent, it won't spot GFP_NOIO and GFP_NOFS allocations in the wrong spot if CONFIG_MMU_NOTIFIER is disabled in the kernel config. Oh well. v5: Note that only drivers/gpu has a reasonable (or at least historical) excuse to use dma_fence_wait() from shrinker and mmu notifier callbacks. Everyone else should either have a better memory manager model, or better hardware. This reflects discussions with Jason Gunthorpe. Cc: Jason Gunthorpe Cc: Felix Kuehling Cc: kernel test robot Acked-by: Christian König Acked-by: Dave Airlie Reviewed-by: Maarten Lankhorst Reviewed-by: Thomas Hellström (v4) Cc: Mika Kuoppala Cc: Thomas Hellstrom Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: linux-rdma@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Christian König Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200707201229.472834-3-daniel.vetter@ffwll.ch commit 5fbff813a4a328b730cb117027c43a4ae9d8b6c0 Author: Daniel Vetter Date: Tue Jul 7 22:12:05 2020 +0200 dma-fence: basic lockdep annotations Design is similar to the lockdep annotations for workers, but with some twists: - We use a read-lock for the execution/worker/completion side, so that this explicit annotation can be more liberally sprinkled around. With read locks lockdep isn't going to complain if the read-side isn't nested the same way under all circumstances, so ABBA deadlocks are ok. Which they are, since this is an annotation only. - We're using non-recursive lockdep read lock mode, since in recursive read lock mode lockdep does not catch read side hazards. And we _very_ much want read side hazards to be caught. For full details of this limitation see commit e91498589746065e3ae95d9a00b068e525eec34f Author: Peter Zijlstra Date: Wed Aug 23 13:13:11 2017 +0200 locking/lockdep/selftests: Add mixed read-write ABBA tests - To allow nesting of the read-side explicit annotations we explicitly keep track of the nesting. lock_is_held() allows us to do that. - The wait-side annotation is a write lock, and entirely done within dma_fence_wait() for everyone by default. - To be able to freely annotate helper functions I want to make it ok to call dma_fence_begin/end_signalling from soft/hardirq context. First attempt was using the hardirq locking context for the write side in lockdep, but this forces all normal spinlocks nested within dma_fence_begin/end_signalling to be spinlocks. That bollocks. The approach now is to simple check in_atomic(), and for these cases entirely rely on the might_sleep() check in dma_fence_wait(). That will catch any wrong nesting against spinlocks from soft/hardirq contexts. The idea here is that every code path that's critical for eventually signalling a dma_fence should be annotated with dma_fence_begin/end_signalling. The annotation ideally starts right after a dma_fence is published (added to a dma_resv, exposed as a sync_file fd, attached to a drm_syncobj fd, or anything else that makes the dma_fence visible to other kernel threads), up to and including the dma_fence_wait(). Examples are irq handlers, the scheduler rt threads, the tail of execbuf (after the corresponding fences are visible), any workers that end up signalling dma_fences and really anything else. Not annotated should be code paths that only complete fences opportunistically as the gpu progresses, like e.g. shrinker/eviction code. The main class of deadlocks this is supposed to catch are: Thread A: mutex_lock(A); mutex_unlock(A); dma_fence_signal(); Thread B: mutex_lock(A); dma_fence_wait(); mutex_unlock(A); Thread B is blocked on A signalling the fence, but A never gets around to that because it cannot acquire the lock A. Note that dma_fence_wait() is allowed to be nested within dma_fence_begin/end_signalling sections. To allow this to happen the read lock needs to be upgraded to a write lock, which means that any other lock is acquired between the dma_fence_begin_signalling() call and the call to dma_fence_wait(), and still held, this will result in an immediate lockdep complaint. The only other option would be to not annotate such calls, defeating the point. Therefore these annotations cannot be sprinkled over the code entirely mindless to avoid false positives. Originally I hope that the cross-release lockdep extensions would alleviate the need for explicit annotations: https://lwn.net/Articles/709849/ But there's a few reasons why that's not an option: - It's not happening in upstream, since it got reverted due to too many false positives: commit e966eaeeb623f09975ef362c2866fae6f86844f9 Author: Ingo Molnar Date: Tue Dec 12 12:31:16 2017 +0100 locking/lockdep: Remove the cross-release locking checks This code (CONFIG_LOCKDEP_CROSSRELEASE=y and CONFIG_LOCKDEP_COMPLETIONS=y), while it found a number of old bugs initially, was also causing too many false positives that caused people to disable lockdep - which is arguably a worse overall outcome. - cross-release uses the complete() call to annotate the end of critical sections, for dma_fence that would be dma_fence_signal(). But we do not want all dma_fence_signal() calls to be treated as critical, since many are opportunistic cleanup of gpu requests. If these get stuck there's still the main completion interrupt and workers who can unblock everyone. Automatically annotating all dma_fence_signal() calls would hence cause false positives. - cross-release had some educated guesses for when a critical section starts, like fresh syscall or fresh work callback. This would again cause false positives without explicit annotations, since for dma_fence the critical sections only starts when we publish a fence. - Furthermore there can be cases where a thread never does a dma_fence_signal, but is still critical for reaching completion of fences. One example would be a scheduler kthread which picks up jobs and pushes them into hardware, where the interrupt handler or another completion thread calls dma_fence_signal(). But if the scheduler thread hangs, then all the fences hang, hence we need to manually annotate it. cross-release aimed to solve this by chaining cross-release dependencies, but the dependency from scheduler thread to the completion interrupt handler goes through hw where cross-release code can't observe it. In short, without manual annotations and careful review of the start and end of critical sections, cross-relese dependency tracking doesn't work. We need explicit annotations. v2: handle soft/hardirq ctx better against write side and dont forget EXPORT_SYMBOL, drivers can't use this otherwise. v3: Kerneldoc. v4: Some spelling fixes from Mika v5: Amend commit message to explain in detail why cross-release isn't the solution. v6: Pull out misplaced .rst hunk. Acked-by: Christian König Acked-by: Dave Airlie Cc: Felix Kuehling Reviewed-by: Thomas Hellström Reviewed-by: Maarten Lankhorst Cc: Mika Kuoppala Cc: Thomas Hellstrom Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: linux-rdma@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Christian König Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200707201229.472834-2-daniel.vetter@ffwll.ch commit d2a4309c1ab6df424b2239fe2920d6f26f808d17 Author: Erik Ekman Date: Fri Jul 17 20:51:18 2020 +0200 USB: serial: qcserial: add EM7305 QDL product ID When running qmi-firmware-update on the Sierra Wireless EM7305 in a Toshiba laptop, it changed product ID to 0x9062 when entering QDL mode: usb 2-4: new high-speed USB device number 78 using xhci_hcd usb 2-4: New USB device found, idVendor=1199, idProduct=9062, bcdDevice= 0.00 usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 2-4: Product: EM7305 usb 2-4: Manufacturer: Sierra Wireless, Incorporated The upgrade could complete after running # echo 1199 9062 > /sys/bus/usb-serial/drivers/qcserial/new_id qcserial 2-4:1.0: Qualcomm USB modem converter detected usb 2-4: Qualcomm USB modem converter now attached to ttyUSB0 Signed-off-by: Erik Ekman Link: https://lore.kernel.org/r/20200717185118.3640219-1-erik@kryo.se Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit de37458f8c2bfc465500a1dd0d15dbe96d2a698c Author: Johan Hovold Date: Thu Jul 16 10:50:55 2020 +0200 USB: serial: iuu_phoenix: fix led-activity helpers The set-led command is eight bytes long and starts with a command byte followed by six bytes of RGB data and ends with a byte encoding a frequency (see iuu_led() and iuu_rgbf_fill_buffer()). The led activity helpers had a few long-standing bugs which corrupted the command packets by inserting a second command byte and thereby offsetting the RGB data and dropping the frequency in non-xmas mode. In xmas mode, a related off-by-one error left the frequency field uninitialised. Fixes: 60a8fc017103 ("USB: add iuu_phoenix driver") Reported-by: George Spelvin Link: https://lore.kernel.org/r/20200716085056.31471-1-johan@kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 23f166ca9a86e1e5a7d57fb002b9f79b2f70026d Author: Christian König Date: Thu Jul 16 13:58:35 2020 +0200 drm/vram-helper: stop using TTM_MEMTYPE_FLAG_MAPPABLE The helper doesn't expose any not-mapable memory resources. Signed-off-by: Christian König Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/377649/ commit a6d1a6328b126b8417d2464ffa1d8424cfbe0c31 Author: Patrick Delaunay Date: Tue Jun 16 17:33:29 2020 +0200 ARM: dts: stm32: cosmetic updates in stm32mp15-pinctrl Use tabs where possible and remove multiple blanks lines. Signed-off-by: Patrick Delaunay Signed-off-by: Alexandre Torgue commit 5ce728fa78ddbef667fd757ad008d33e39e7312a Author: Ansuel Smith Date: Thu Jul 16 04:28:10 2020 +0200 ipq806x: gcc: add support for child probe Add support for child probing needed for tsens driver that share the same regs of gcc for this platform. Signed-off-by: Ansuel Smith Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20200716022817.30439-2-ansuelsmth@gmail.com Signed-off-by: Stephen Boyd commit b328ecc468f8f92433c9ad82675c0ce9f99b10cf Author: Steffen Klassert Date: Fri Jul 17 10:35:32 2020 +0200 xfrm: Make the policy hold queue work with VTI. We forgot to support the xfrm policy hold queue when VTI was implemented. This patch adds everything we need so that we can use the policy hold queue together with VTI interfaces. Signed-off-by: Steffen Klassert commit 208151bfb70fb7fb39959998832f7b5879be4751 Author: Helge Deller Date: Sun Jun 14 10:54:10 2020 +0200 parisc: Convert to BIT_MASK() and BIT_WORD() Drop own open-coded implementation to set bits and use the kernel provided BIT_MASK() and BIT_WORD() macros. Signed-off-by: Helge Deller commit 1508c22f112ce11944cea84efb128a623e8ff03b Author: Alexey Kardashevskiy Date: Tue Jun 9 12:12:29 2020 +1000 KVM: PPC: Protect kvm_vcpu_read_guest with srcu locks The kvm_vcpu_read_guest/kvm_vcpu_write_guest used for nested guests eventually call srcu_dereference_check to dereference a memslot and lockdep produces a warning as neither kvm->slots_lock nor kvm->srcu lock is held and kvm->users_count is above zero (>100 in fact). This wraps mentioned VCPU read/write helpers in srcu read lock/unlock as it is done in other places. This uses vcpu->srcu_idx when possible. These helpers are only used for nested KVM so this may explain why we did not see these before. Here is an example of a warning: ============================= WARNING: suspicious RCU usage 5.7.0-rc3-le_dma-bypass.3.2_a+fstn1 #897 Not tainted ----------------------------- include/linux/kvm_host.h:633 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by qemu-system-ppc/2752: #0: c000200359016be0 (&vcpu->mutex){+.+.}-{3:3}, at: kvm_vcpu_ioctl+0x144/0xd80 [kvm] stack backtrace: CPU: 80 PID: 2752 Comm: qemu-system-ppc Not tainted 5.7.0-rc3-le_dma-bypass.3.2_a+fstn1 #897 Call Trace: [c0002003591ab240] [c000000000b23ab4] dump_stack+0x190/0x25c (unreliable) [c0002003591ab2b0] [c00000000023f954] lockdep_rcu_suspicious+0x140/0x164 [c0002003591ab330] [c008000004a445f8] kvm_vcpu_gfn_to_memslot+0x4c0/0x510 [kvm] [c0002003591ab3a0] [c008000004a44c18] kvm_vcpu_read_guest+0xa0/0x180 [kvm] [c0002003591ab410] [c008000004ff9bd8] kvmhv_enter_nested_guest+0x90/0xb80 [kvm_hv] [c0002003591ab980] [c008000004fe07bc] kvmppc_pseries_do_hcall+0x7b4/0x1c30 [kvm_hv] [c0002003591aba10] [c008000004fe5d30] kvmppc_vcpu_run_hv+0x10a8/0x1a30 [kvm_hv] [c0002003591abae0] [c008000004a5d954] kvmppc_vcpu_run+0x4c/0x70 [kvm] [c0002003591abb10] [c008000004a56e54] kvm_arch_vcpu_ioctl_run+0x56c/0x7c0 [kvm] [c0002003591abba0] [c008000004a3ddc4] kvm_vcpu_ioctl+0x4ac/0xd80 [kvm] [c0002003591abd20] [c0000000006ebb58] ksys_ioctl+0x188/0x210 [c0002003591abd70] [c0000000006ebc28] sys_ioctl+0x48/0xb0 [c0002003591abdb0] [c000000000042764] system_call_exception+0x1d4/0x2e0 [c0002003591abe20] [c00000000000cce8] system_call_common+0xe8/0x214 Signed-off-by: Alexey Kardashevskiy Signed-off-by: Paul Mackerras commit e55f4d5898a9855350834535037f62732bbd320a Author: Cédric Le Goater Date: Mon Jun 8 13:57:14 2020 +0200 KVM: PPC: Book3S HV: Increase KVMPPC_NR_LPIDS on POWER8 and POWER9 POWER8 and POWER9 have 12-bit LPIDs. Change LPID_RSVD to support up to (4096 - 2) guests on these processors. POWER7 is kept the same with a limitation of (1024 - 2), but it might be time to drop KVM support for POWER7. Tested with 2048 guests * 4 vCPUs on a witherspoon system with 512G RAM and a bit of swap. Signed-off-by: Cédric Le Goater Signed-off-by: Paul Mackerras commit 4cb4ade19b4219af8f5cda9313dd99b0004c8b3c Author: Alistair Popple Date: Tue Jun 2 15:53:25 2020 +1000 KVM: PPC: Book3SHV: Enable support for ISA v3.1 guests Adds support for emulating ISAv3.1 guests by adding the appropriate PCR and FSCR bits. Signed-off-by: Alistair Popple Reported-by: kbuild test robot Signed-off-by: Paul Mackerras commit 8a71c743bf5ecdcfb439662e4cef89d7b1132495 Author: Lad Prabhakar Date: Mon Jul 13 22:35:12 2020 +0100 dt-bindings: iommu: renesas,ipmmu-vmsa: Add r8a774e1 support Document RZ/G2H (R8A774E1) SoC bindings. Reviewed-by: Geert Uytterhoeven Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594676120-5862-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Rob Herring commit 8359b4c16e1b1eda96f95f202c359d3b308f785b Author: Alexander A. Klimov Date: Mon Jul 13 15:40:08 2020 +0200 dt-bindings: fpga: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713134008.34635-1-grandmaster@al2klimov.de Signed-off-by: Rob Herring commit 8f92f6805fdb8166ddd1d41cce2651605481d559 Author: Alexander A. Klimov Date: Thu Jul 9 08:47:55 2020 +0200 dt-bindings: virtio: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200709064755.24051-1-grandmaster@al2klimov.de Signed-off-by: Rob Herring commit 71d4364abdc50cb1f0ff5af0f932b110278f620c Author: Vladimir Oltean Date: Sat Jul 18 21:04:18 2020 +0300 net: dsa: use the ETH_MIN_MTU and ETH_DATA_LEN default values Now that DSA supports MTU configuration, undo the effects of commit 8b1efc0f83f1 ("net: remove MTU limits on a few ether_setup callers") and let DSA interfaces use the default min_mtu and max_mtu specified by ether_setup(). This is more important for min_mtu: since DSA is Ethernet, the minimum MTU is the same as of any other Ethernet interface, and definitely not zero. For the max_mtu, we have a callback through which drivers can override that, if they want to. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f58d2598cf70d41f73e761b62a114d2e8f94a676 Author: Jonathan McDowell Date: Sat Jul 18 17:32:14 2020 +0100 net: dsa: qca8k: implement the port MTU callbacks This switch has a single max frame size configuration register, so we track the requested MTU for each port and apply the largest. v2: - Address review feedback from Vladimir Oltean Signed-off-by: Jonathan McDowell Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2b96692bcfcd2be7c9aa55dc13440213cd54c654 Author: Wang Hai Date: Sat Jul 18 20:53:38 2020 +0800 net: hsr: remove redundant null check Because kfree_skb already checked NULL skb parameter, so the additional checks are unnecessary, just remove them. Reported-by: Hulk Robot Signed-off-by: Wang Hai Signed-off-by: David S. Miller commit 405e30e23cb37c1a1cd521f41db89d2d93bd1e3b Author: Christophe JAILLET Date: Sat Jul 18 13:03:38 2020 +0200 net/fealnx: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated, GFP_KERNEL can be used because it is called from the probe function (i.e. 'fealnx_init_one()') and no lock is taken. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit e85da794f658d405f24094b3ccb2ea295144a206 Author: Christophe JAILLET Date: Sat Jul 18 12:30:33 2020 +0200 mISDN: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'setup_hw()' (hfcpci.c) GFP_KERNEL can be used because it is called from the probe function and no lock is taken. The call chain is: hfc_probe() --> setup_card() --> setup_hw() When memory is allocated in 'inittiger()' (netjet.c) GFP_ATOMIC must be used because a spin_lock is taken by the caller (i.e. 'nj_init_card()') This is also consistent with the other allocations done in the function. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 2b9843fbe15276a98cae74d5818dd55600e19052 Author: Briana Oursler Date: Fri Jul 17 14:54:39 2020 -0700 tc-testing: Add tdc to kselftests Add tdc to existing kselftest infrastructure so that it can be run with existing kselftests. TDC now generates objects in objdir/kselftest without cluttering main objdir, leaves source directory clean, and installs correctly in kselftest_install, properly adding itself to run_kselftest.sh script. Add tc-testing as a target of selftests/Makefile. Create tdc.sh to run tdc.py targets with correct arguments. To support single target from selftest/Makefile, combine tc-testing/bpf/Makefile and tc-testing/Makefile. Move action.c up a directory to tc-testing/. Tested with: make O=/tmp/{objdir} TARGETS="tc-testing" kselftest cd /tmp/{objdir} cd kselftest cd tc-testing ./tdc.sh make -C tools/testing/selftests/ TARGETS=tc-testing run_tests make TARGETS="tc-testing" kselftest cd tools/testing/selftests ./kselftest_install.sh /tmp/exampledir My VM doesn't run all the kselftests so I commented out all except my target and net/pmtu.sh then: cd /tmp/exampledir && ./run_kselftest.sh Co-developed-by: Davide Caratti Signed-off-by: Davide Caratti Signed-off-by: Briana Oursler Signed-off-by: David S. Miller commit c3466a768eaa8d08551dafd552bac2f2698f73cc Author: Vinay Kumar Yadav Date: Sat Jul 18 00:46:40 2020 +0530 crypto/chtls: Enable tcp window scaling option Enable tcp window scaling option in hw based on sysctl settings and option in connection request. v1->v2: - Set window scale option based on option in connection request. Signed-off-by: Vinay Kumar Yadav Signed-off-by: David S. Miller commit 4f1b4da541db2bc99d5783ebf2b60c1563eb9077 Merge: 5c5b758194f0c 8dcf2ad39fdb2 Author: David S. Miller Date: Mon Jul 20 18:07:39 2020 -0700 Merge branch 'net-atlantic-various-features' Mark Starovoytov says: ==================== net: atlantic: various features This patchset adds more features for Atlantic NICs: * media detect; * additional per-queue stats; * PTP stats; * ipv6 support for TCP LSO and UDP GSO; * 64-bit operations; * A0 ntuple filters; * MAC temperature (hwmon). This work is a joint effort of Marvell developers. v3: * reworked patches related to stats: . fixed u64_stats_update_* usage; . use simple assignment in _get_stats / _fill_stats_data; . made _get_sw_stats / _fill_stats_data return count as return value; . split rx and tx per-queue stats; v2: https://patchwork.ozlabs.org/cover/1329652/ * removed media detect feature (will be reworked and submitted later); * removed irq counter from stats; * use u64_stats_update_* to protect 64-bit stats; * use io-64-nonatomic-lo-hi.h for readq/writeq fallbacks; v1: https://patchwork.ozlabs.org/cover/1327894/ ==================== Signed-off-by: David S. Miller commit 8dcf2ad39fdb2d183b7bd4307c837713e3150b9a Author: Mark Starovoytov Date: Mon Jul 20 21:32:44 2020 +0300 net: atlantic: add hwmon getter for MAC temperature This patch adds the possibility to obtain MAC temperature via hwmon. On A1 there are two separate temperature sensors. On A2 there's only one temperature sensor, which is used for reporting both MAC and PHY temperature. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit a89df867ce1a3368015ff6f85ab4a23d2a0aaba1 Author: Dmitry Bogdanov Date: Mon Jul 20 21:32:43 2020 +0300 net: atlantic: A0 ntuple filters This patch adds support for ntuple filters on A0. Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit b98ffe6fa415a6ea5cbc7e8d58dd016e83fe33ea Author: Nikita Danilov Date: Mon Jul 20 21:32:42 2020 +0300 net: atlantic: use intermediate variable to improve readability a bit This patch syncs up hw_atl_a0.c with an out-of-tree driver, where an intermediate variable was introduced in a couple of functions to improve the code readability a bit. Signed-off-by: Nikita Danilov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 88bc9cf143a1f34978bcda21114cc81324c9e118 Author: Mark Starovoytov Date: Mon Jul 20 21:32:41 2020 +0300 net: atlantic: use U32_MAX in aq_hw_utils.c This patch replaces magic constant ~0U usage with U32_MAX in aq_hw_utils.c Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 1e41b3fee795faa8a67713749a21e60828ae21ad Author: Pavel Belous Date: Mon Jul 20 21:32:40 2020 +0300 net: atlantic: add support for 64-bit reads/writes This patch adds support for 64-bit reads/writes where applicable, e.g. A2 supports them. Signed-off-by: Pavel Belous Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 8bd60710852fffe4c32b5b7f84de2a6c19d12971 Author: Igor Russkikh Date: Mon Jul 20 21:32:39 2020 +0300 net: atlantic: enable ipv6 support for TCP LSO and UDP GSO This patch enables ipv6 support for TCP LSO and UDP GSO. The code itself (aq_nic_map_skb) was ready for this after udp gso feature, but corresponding NETIF_F_TSO6 wasn't enabled. We now have tested both tcp and udp v6 GSO, and enabling them safely. Signed-off-by: Igor Russkikh Signed-off-by: Mark Starovoytov Signed-off-by: David S. Miller commit 14b539a3490102750c86a63a8f27a69935e6a84e Author: Pavel Belous Date: Mon Jul 20 21:32:38 2020 +0300 net: atlantic: PTP statistics This patch adds PTP rings statistics. Before that these were missing from overall stats, hardening debugging and analysis. Signed-off-by: Pavel Belous Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit aa7e17a3e35a6e3fbf4ab2055a64097efcd09310 Author: Dmitry Bogdanov Date: Mon Jul 20 21:32:37 2020 +0300 net: atlantic: additional per-queue stats This patch adds additional per-queue stats, these could be useful for debugging and diagnostics. Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit d7d8bb9286134bcc57941c38ed2d69c50fc59511 Author: Mark Starovoytov Date: Mon Jul 20 21:32:36 2020 +0300 net: atlantic: use u64_stats_update_* to protect access to 64-bit stats This patch adds u64_stats_update_* usage to protect access to 64-bit stats, where necessary. This is necessary for per-ring stats, because they are updated by the driver directly, so there is a possibility for a partial read. Other stats require no additional protection, e.g.: * all MACSec stats are fetched directly from HW (under semaphore); * nic/ndev stats (aq_stats_s) are fetched directly from FW (under mutex). Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 508f2e3dce454843ffd689bb2cf0739a954dd1e9 Author: Mark Starovoytov Date: Mon Jul 20 21:32:35 2020 +0300 net: atlantic: split rx and tx per-queue stats This patch splits rx and tx per-queue stats. This change simplifies the follow-up introduction of PTP stats and u64_stats_update_* usage. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit b772112c5af0e45ddcacb144545f06bdc594c736 Author: Mark Starovoytov Date: Mon Jul 20 21:32:34 2020 +0300 net: atlantic: make _get_sw_stats return count as return value This patch changes aq_vec_get_sw_stats() to return count as a return value (which was unused) instead of an out parameter. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 3624aa3c2582e4b9097e7648f6f03c82e474ceb8 Author: Mark Starovoytov Date: Mon Jul 20 21:32:33 2020 +0300 net: atlantic: use simple assignment in _get_stats and _get_sw_stats This patch replaces addition assignment operator with a simple assignment in aq_vec_get_stats() and aq_vec_get_sw_stats(), because it is sufficient in both cases and this change simplifies the introduction of u64_stats_update_* in these functions. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 519f0cefb4bcac8faf76b2a7b4042fb950eea23e Author: Mark Starovoytov Date: Mon Jul 20 21:32:32 2020 +0300 net: atlantic: move FRAC_PER_NS to aq_hw.h This patch moves FRAC_PER_NS to aq_hw.h so that it can be used in both hw_atl (A1) and hw_atl2 (A2) in the future. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 5c5b758194f0c55564f07ff86555686e3fe9e324 Merge: 0c17ac5424daa 7570ebe0410a1 Author: David S. Miller Date: Mon Jul 20 18:04:59 2020 -0700 Merge branch 'Extend-testptp-with-PTP-perout-waveform' Vladimir Oltean says: ==================== Extend testptp with PTP perout waveform Demonstrate the usage of the newly introduced flags in the PTP_PEROUT_REQUEST2 ioctl: https://www.spinics.net/lists/netdev/msg669346.html ==================== Signed-off-by: David S. Miller commit 7570ebe0410a1df1c9a44071c18685842d84a7e1 Author: Vladimir Oltean Date: Mon Jul 20 20:55:59 2020 +0300 testptp: add new options for perout phase and pulse width Extend the example program for PTP ancillary functionality with the ability to configure not only the periodic output's period (frequency), but also the phase and duty cycle (pulse width) which were newly introduced. The ioctl level also needs to be updated to the new PTP_PEROUT_REQUEST2, since the original PTP_PEROUT_REQUEST doesn't support this functionality. For an in-tree testing program, not having explicit backwards compatibility is fine, as it should always be tested with the current kernel headers and sources. Tested with an oscilloscope on the felix switch PHC: echo '2 0' > /sys/class/ptp/ptp1/pins/switch_1588_dat0 ./testptp -d /dev/ptp1 -p 1000000000 -w 100000000 -H 1000 -i 0 Signed-off-by: Vladimir Oltean Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 4a09a981002bafdac1decf4116c77bf8f5496326 Author: Vladimir Oltean Date: Mon Jul 20 20:55:58 2020 +0300 testptp: promote 'perout' variable to int64_t Since 'perout' holds the nanosecond value of the signal's period, it should be a 64-bit value. Current assumption is that it cannot be larger than 1 second. Signed-off-by: Vladimir Oltean Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 0c17ac5424daaa5fbf4842792f112fb6d7c81841 Author: Vaibhav Gupta Date: Mon Jul 20 21:49:31 2020 +0530 ethernet: myri10ge: use generic power management Drivers using legacy PM have to manage PCI states and device's PM states themselves. They also need to take care of configuration registers. With improved and powerful support of generic PM, PCI Core takes care of above mentioned, device-independent, jobs. This driver makes use of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), pci_set_power_state() and pci_set_master() to do required operations. In generic mode, they are no longer needed. Change function parameter in both .suspend() and .resume() to "struct device*" type. Use to_pci_dev() and dev_get_drvdata() to get "struct pci_dev*" variable and drv data. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit f43995bd23e423cf887bb17367bc34e52e1fed4c Merge: cfd6920175ac8 99785a87fc7d2 Author: David S. Miller Date: Mon Jul 20 17:59:44 2020 -0700 Merge branch 'qed-qede-add-support-for-new-operating-modes' Alexander Lobakin says: ==================== qed, qede: add support for new operating modes This series covers the support for the following: - new port modes; - loopback modes, previously missing; - new speed/link modes; - several FEC modes; - multi-rate transceivers; and also cleans up and optimizes several related parts of code. v3 (from [2]): - dropped custom link mode declaration; qed, qede and qedf switched to Ethtool link modes and definitions (#0001, #0002, per Andrew Lunn's suggestion); - exchange more .text size to .initconst and .ro_after_init in qede (#0003). v2 (from [1]): - added a patch (#0010) that drops discussed dead struct member; - addressed checkpatch complaints on #0014 (former #0013); - rebased on top of latest net-next; - no other changes. [1] https://lore.kernel.org/netdev/20200716115446.994-1-alobakin@marvell.com/ [2] https://lore.kernel.org/netdev/20200719201453.3648-1-alobakin@marvell.com/ ==================== Signed-off-by: David S. Miller commit 99785a87fc7d27207c7dca0f0fe04386f1981690 Author: Alexander Lobakin Date: Mon Jul 20 21:08:15 2020 +0300 qed: add support for the extended speed and FEC modes Add all necessary code (NVM parsing, MFW and Ethtool reports etc.) to support extended speed and FEC modes. These new modes are supported by the new boards revisions and newer MFW versions. Misc: correct port type for MEDIA_KR. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 097818fcf81d672e32229fcc52a3370ccae8d3c5 Author: Alexander Lobakin Date: Mon Jul 20 21:08:14 2020 +0300 qed: populate supported link modes maps on module init Simplify and lighten qed_set_link() by declaring static link modes maps and populating them on module init. This way we save plenty of text size at the low expense of __ro_after_init and __initconst data (the latter will be purged after module init is done). Misc: sanitize exit callback. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 98e675ec5a92a15f6f8ade41eda883cd39df5712 Author: Alexander Lobakin Date: Mon Jul 20 21:08:13 2020 +0300 qed: add missing loopback modes These modes are relevant only for several boards, but may be reported by MFW as well as the others. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit a396818c080db0fb0be046225aeafad02459ccae Author: Alexander Lobakin Date: Mon Jul 20 21:08:12 2020 +0300 qed: add support for new port modes These ports ship on new boards revisions and are supported by newer firmware versions. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit e9a5eb856411b371d6dde2f5aa3de7258be0f17e Author: Alexander Lobakin Date: Mon Jul 20 21:08:11 2020 +0300 qed: remove unused qed_hw_info::port_mode and QED_PORT_MODE Struct field qed_hw_info::port_mode isn't used anywhere in the code, so can be safely removed to prevent possible dead code addition. Also remove the enumeration QED_PORT_MODE orphaned after this deletion. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit 5d4193c641dc4a2cd4ee31fae20efcbabaeb961f Author: Alexander Lobakin Date: Mon Jul 20 21:08:10 2020 +0300 qed: reformat several structures a bit Reformat a few nvm_cfg* structures (and partly qed_dev) prior to adding new fields and definitions. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 9bdca14a0e844f298de3bcfd167b214666cc35aa Author: Alexander Lobakin Date: Mon Jul 20 21:08:09 2020 +0300 qede: introduce support for FEC control Add Ethtool callbacks for querying and setting FEC parameters if it's supported by the underlying qed module and MFW version running on the device. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 460761570ba3073b15c2903db9efc0142790defd Author: Alexander Lobakin Date: Mon Jul 20 21:08:08 2020 +0300 qede: format qede{,_vf}_ethtool_ops Prior to adding new callbacks, format qede ethtool_ops structs to make declarations more fancy and readable. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit ae7e69379fd5a87141fd8c7f2efab8e73f2a9f7e Author: Alexander Lobakin Date: Mon Jul 20 21:08:07 2020 +0300 qed: add support for Forward Error Correction Add all necessary routines for reading supported FEC modes from NVM and querying FEC control to the MFW (if the running version supports it). Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 37237b5b7104f91b519133d7862d1b5169a3ba8e Author: Alexander Lobakin Date: Mon Jul 20 21:08:06 2020 +0300 qed: reformat several structures a bit Prior to adding new fields and bitfields, reformat the related structures according to the Linux style (spaces to tabs, lowercase hex, indentation etc.). Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 3c41486e46405b84369bd19613326c0cc89d6ddc Author: Alexander Lobakin Date: Mon Jul 20 21:08:05 2020 +0300 qed: use transceiver data to fill link partner's advertising speeds Currently qed driver does not take into consideration transceiver's capabilities when generating link partner's speed advertisement. This leads to e.g. incorrect ethtool link info on 10GbaseT modules. Use transceiver info not only for advertisement and support arrays, but also for link partner's abilities to fix it. Misc: fix a couple of comments nearby. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 9228b7c1f4ee8c2198a1b13e5a1fdb285ce2b555 Author: Alexander Lobakin Date: Mon Jul 20 21:08:04 2020 +0300 qed: add support for multi-rate transceivers Set the corresponding advertised and supported link modes according to the detected transceiver type and device capabilities. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit d47839f31e075ce5dd52c1bbbc3808ef9202671d Author: Alexander Lobakin Date: Mon Jul 20 21:08:03 2020 +0300 qed: reformat public_port::transceiver_data a bit Prior to adding new bitfields, reformat the existing ones from spaces to tabs, and unify all hex values to lowercase. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 1d4e4ecccb114449454592e24ad790e20f397c05 Author: Alexander Lobakin Date: Mon Jul 20 21:08:02 2020 +0300 qede: populate supported link modes maps on module init Simplify and lighten qede_set_link_ksettings() by declaring static link modes maps and populating them on module init. This way we save plenty of text size at the low expense of __ro_after_init and __initconst data (the latter will be purged after module init is done). Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit bdb5d8ec47611ca61e168349f233e1dd1ed063f4 Author: Alexander Lobakin Date: Mon Jul 20 21:08:01 2020 +0300 qed, qede, qedf: convert link mode from u32 to ETHTOOL_LINK_MODE Currently qed driver already ran out of 32 bits to store link modes, and this doesn't allow to add and support more speeds. Convert custom link mode to generic Ethtool bitmap and definitions (convenient Phylink shorthands are used for elegance and readability). This allowed us to drop all conversions/mappings between the driver and Ethtool. This involves changes in qede and qedf as well, as they used definitions from shared "qed_if.h". Suggested-by: Andrew Lunn Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e812916d3278baf03aabf10044661fc3b2848823 Author: Alexander Lobakin Date: Mon Jul 20 21:08:00 2020 +0300 linkmode: introduce linkmode_intersects() Add a new helper to find intersections between Ethtool link modes, linkmode_intersects(), similar to the other linkmode helpers. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit cfd6920175ac848e057ed258e87c427792f371d0 Merge: 256ca7449fbcc 0e20c3e103333 Author: David S. Miller Date: Mon Jul 20 17:52:50 2020 -0700 Merge tag 'wireless-drivers-next-2020-07-20' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.9 First set of patches for v5.9. This comes later than usual as I was offline for two weeks. The biggest change here is moving Microchip wilc1000 driver from staging. There was an immutable topic branch with one commit moving the whole driver and the topic branch was pulled both to staging-next and wireless-drivers-next. At the moment the only reported conflict is in MAINTAINERS file, so I'm hoping the move should go smoothly. Other notable changes are ath11k getting 6 GHz band support and rtw88 supporting RTL8821CE. And there's also the usual fixes, API changes and cleanups all over. Major changes: wilc1000 * move from drivers/staging to drivers/net/wireless/microchip ath11k * add 6G band support * add spectral scan support iwlwifi * make FW reconfiguration quieter by not using warn level rtw88 * add support for RTL8821CE ==================== Signed-off-by: David S. Miller commit 256ca7449fbcc0351c349abf83d1869e31504725 Author: Christophe JAILLET Date: Mon Jul 20 15:36:09 2020 +0200 sis: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'epic_init_one()' (sis190.c), GFP_KERNEL can be used because this is a net_device_ops' 'ndo_open' function. This function is protected by the rtnl_lock() semaphore. So only a mutex is used and no spin_lock is acquired. When memory is allocated in 'sis900_probe()' (sis900.c), GFP_KERNEL can be used because it is a probe function and no spin_lock is acquired. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 0b0edb993c99bc9a2d6d92810736cd77300b3770 Author: Christophe JAILLET Date: Mon Jul 20 15:02:42 2020 +0200 r6040: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'r6040_open()', GFP_KERNEL can be used because this is a net_device_ops' 'ndo_open' function. This function is protected by the rtnl_lock() semaphore. So only a mutex is used and no spin_lock is acquired. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 73e283dfbf036f8830a0aaeb41036245c43245a4 Author: Christophe JAILLET Date: Mon Jul 20 14:29:12 2020 +0200 net: packetengines: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'hamachi_init_one()' (hamachi.c), GFP_KERNEL can be used because it is a probe function and no lock is acquired. When memory is allocated in 'yellowfin_init_one()' (yellowfin.c), GFP_KERNEL can be used because it is a probe function and no lock is acquired. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit f1bfd71c8662f20d53e71ef4e18bfb0e5677c27f Author: Christoph Hellwig Date: Mon Jul 20 13:36:09 2020 +0200 arch, net: remove the last csum_partial_copy() leftovers Most of the tree only uses and implements csum_partial_copy_nocheck, but the c6x and lib/checksum.c implement a csum_partial_copy that isn't used anywere except to define csum_partial_copy. Get rid of this pointless alias. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit cebd2cac905e5a665bc992c7725f98bf6cd4a21d Author: Zhang Changzhong Date: Mon Jul 20 19:12:33 2020 +0800 net: fs_enet: remove redundant null check Because clk_prepare_enable and clk_disable_unprepare already checked NULL clock parameter, so the additional checks are unnecessary, just remove them. Signed-off-by: Zhang Changzhong Signed-off-by: David S. Miller commit 8607fa169178a4a38f232612e036def96b5ecd1d Author: Wei Yongjun Date: Tue Jul 14 22:21:55 2020 +0800 clk: qcom: msm8996: Make symbol 'cpu_msm8996_clks' static The sparse tool complains as follows: drivers/clk/qcom/clk-cpu-8996.c:341:19: warning: symbol 'cpu_msm8996_clks' was not declared. Should it be static? This variable is not used outside of clk-cpu-8996.c, so this commit marks it static. Fixes: 03e342dc45c9 ("clk: qcom: Add CPU clock driver for msm8996") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200714142155.35085-1-weiyongjun1@huawei.com Signed-off-by: Stephen Boyd commit 044f507dc0a3070985592d84707a9d69746d84c6 Author: Sivaprakash Murugesan Date: Thu Jul 16 11:02:50 2020 +0530 clk: qcom: ipq8074: Add correct index for PCIe clocks The PCIe clocks GCC_PCIE0_AXI_S_BRIDGE_CLK, GCC_PCIE0_RCHNG_CLK_SRC, GCC_PCIE0_RCHNG_CLK are wrongly added to the gcc reset group. Move them to the gcc clock group. Reported-by: kernel test robot Signed-off-by: Sivaprakash Murugesan Link: https://lore.kernel.org/r/1594877570-9280-1-git-send-email-sivaprak@codeaurora.org Fixes: e7fb524cfcca ("dt-bindings: clock: qcom: ipq8074: Add missing bindings for PCIe") Signed-off-by: Stephen Boyd commit 3d712af637e19a1c139c2b586c08b2a56bdff8c8 Author: Dmitry Torokhov Date: Mon Jul 20 14:56:54 2020 -0700 Input: elan_i2c - do not constantly re-query pattern ID We do not need to constantly re-query pattern ID, we can instead query it once and then pass to methods that need it. Signed-off-by: Dmitry Torokhov commit 1d6217a4f9905917ee63315c8ea3d63833792f51 Author: Eric Biggers Date: Wed Jul 8 14:57:22 2020 -0700 fscrypt: rename FS_KEY_DERIVATION_NONCE_SIZE The name "FS_KEY_DERIVATION_NONCE_SIZE" is a bit outdated since due to the addition of FSCRYPT_POLICY_FLAG_DIRECT_KEY, the file nonce may now be used as a tweak instead of for key derivation. Also, we're now prefixing the fscrypt constants with "FSCRYPT_" instead of "FS_". Therefore, rename this constant to FSCRYPT_FILE_NONCE_SIZE. Link: https://lore.kernel.org/r/20200708215722.147154-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit e455de313ef8bd1fa05a3eb6ef1bfd96eaf38e2a Author: Eric Biggers Date: Wed Jul 8 14:55:29 2020 -0700 fscrypt: add comments that describe the HKDF info strings Each HKDF context byte is associated with a specific format of the remaining part of the application-specific info string. Add comments so that it's easier to keep track of what these all are. Link: https://lore.kernel.org/r/20200708215529.146890-1-ebiggers@kernel.org Signed-off-by: Eric Biggers commit 87c831ce8e51cad98300fe98f59e26e404720217 Merge: a8b7b2d0b3fc9 9d45c8e89079d Author: David S. Miller Date: Mon Jul 20 17:01:45 2020 -0700 Merge branch 'net-macb-Wake-on-Lan-magic-packet-GEM-and-MACB-handling' Nicolas Ferre says: ==================== net: macb: Wake-on-Lan magic packet GEM and MACB handling Here is the second part of support for WoL magic-packet on the current macb driver. This one is addressing the bulk of the feature and is based on current net-next/master. MACB and GEM code must co-exist and as they don't share exactly the same register layout, I had to specialize a bit the suspend/resume paths and plug a specific IRQ handler in order to avoid overloading the "normal" IRQ hot path. These changes were tested on both sam9x60 which embeds a MACB+FIFO controller and sama5d2 which has a GEM+packet buffer type of controller. Best regards, Nicolas Changes in v7: - Release the spinlock before exiting macb_suspend/resume in case of error changing IRQ handler Changes in v6: - rebase on net-next/master now that the "fixes" patches of the series are merged in both net and net-next. - GEM addition and MACB update to finish the support of WoL magic-packet on the two revisions of the controller. ==================== Signed-off-by: David S. Miller commit 9d45c8e89079dfe5489efaae9cea12a539ebc3ff Author: Nicolas Ferre Date: Mon Jul 20 10:56:53 2020 +0200 net: macb: Add WoL interrupt support for MACB type of Ethernet controller Handle the Wake-on-Lan interrupt for the Cadence MACB Ethernet controller. As we do for the GEM version, we handle of WoL interrupt in a specialized interrupt handler for MACB version that is positionned just between suspend() and resume() calls. Cc: Claudiu Beznea Cc: Harini Katakam Signed-off-by: Nicolas Ferre Signed-off-by: David S. Miller commit 558e35ccfe9516c8786c3dd3b8a486fb37e6b858 Author: Nicolas Ferre Date: Mon Jul 20 10:56:52 2020 +0200 net: macb: WoL support for GEM type of Ethernet controller Adapt the Wake-on-Lan feature to the Cadence GEM Ethernet controller. This controller has different register layout and cannot be handled by previous code. We disable completely interrupts on all the queues but the queue 0. Handling of WoL interrupt is done in another interrupt handler positioned depending on the controller version used, just between suspend() and resume() calls. It allows to lower pressure on the generic interrupt hot path by removing the need to handle 2 tests for each IRQ: the first figuring out the controller revision, the second for actually knowing if the WoL bit is set. Queue management in suspend()/resume() functions inspired from RFC patch by Harini Katakam , thanks! Cc: Claudiu Beznea Cc: Harini Katakam Signed-off-by: Nicolas Ferre Signed-off-by: David S. Miller commit a8b7b2d0b3fc965d823e362840e5451e2eb4a71b Author: Jiri Pirko Date: Mon Jul 20 10:10:41 2020 +0200 sched: sch_api: add missing rcu read lock to silence the warning In case the qdisc_match_from_root function() is called from non-rcu path with rtnl mutex held, a suspiciout rcu usage warning appears: [ 241.504354] ============================= [ 241.504358] WARNING: suspicious RCU usage [ 241.504366] 5.8.0-rc4-custom-01521-g72a7c7d549c3 #32 Not tainted [ 241.504370] ----------------------------- [ 241.504378] net/sched/sch_api.c:270 RCU-list traversed in non-reader section!! [ 241.504382] other info that might help us debug this: [ 241.504388] rcu_scheduler_active = 2, debug_locks = 1 [ 241.504394] 1 lock held by tc/1391: [ 241.504398] #0: ffffffff85a27850 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x49a/0xbd0 [ 241.504431] stack backtrace: [ 241.504440] CPU: 0 PID: 1391 Comm: tc Not tainted 5.8.0-rc4-custom-01521-g72a7c7d549c3 #32 [ 241.504446] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-2.fc32 04/01/2014 [ 241.504453] Call Trace: [ 241.504465] dump_stack+0x100/0x184 [ 241.504482] lockdep_rcu_suspicious+0x153/0x15d [ 241.504499] qdisc_match_from_root+0x293/0x350 Fix this by passing the rtnl held lockdep condition down to hlist_for_each_entry_rcu() Reported-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller commit d89d8d4db48b42d22c5b0e0e8a3f82dd00262c44 Author: Wang Hai Date: Mon Jul 20 15:56:14 2020 +0800 net: ena: Fix using plain integer as NULL pointer in ena_init_napi_in_range Fix sparse build warning: drivers/net/ethernet/amazon/ena/ena_netdev.c:2193:34: warning: Using plain integer as NULL pointer Reported-by: Hulk Robot Signed-off-by: Wang Hai Suggested-by: Joe Perches Acked-by: Shay Agroskin Acked-by: Shay Agroskin Signed-off-by: David S. Miller commit 74b5afea3b5e141e9a0b76863858c072e28713f1 Author: Xu Wang Date: Mon Jul 20 06:24:10 2020 +0000 net: hns: use eth_broadcast_addr() to assign broadcast address This patch is to use eth_broadcast_addr() to assign broadcast address insetad of memset(). Signed-off-by: Xu Wang Signed-off-by: David S. Miller commit 202a5d5a7aa5560052bd43ee4454212b26016164 Merge: 88a3c45482f63 9c0c7014f3820 Author: David S. Miller Date: Mon Jul 20 16:48:22 2020 -0700 Merge branch 'net-dsa-Setup-dsa_netdev_ops' Florian Fainelli says: ==================== net: dsa: Setup dsa_netdev_ops This patch series addresses the overloading of a DSA CPU/management interface's netdev_ops for the purpose of providing useful information from the switch side. Up until now we had duplicated the existing netdev_ops structure and added specific function pointers to return information of interest. Here we have a more controlled way of doing this by involving the specific netdev_ops function pointers that we want to be patched, which is easier for auditing code in the future. As a byproduct we can now maintain netdev_ops pointer comparisons which would be failing before (no known in tree problems because of that though). Let me know if this approach looks reasonable to you and we might do the same with our ethtool_ops overloading as well. Changes in v2: - use static inline int vs. static int inline (Kbuild robot) - fixed typos in patch 4 (Andrew) - avoid using macros (Andrew) ==================== Signed-off-by: David S. Miller commit 9c0c7014f38206a2b63e7e832edf2e881a7b49ad Author: Florian Fainelli Date: Sun Jul 19 20:49:54 2020 -0700 net: dsa: Setup dsa_netdev_ops Now that we have all the infrastructure in place for calling into the dsa_ptr->netdev_ops function pointers, install them when we configure the DSA CPU/management interface and tear them down. The flow is unchanged from before, but now we preserve equality of tests when network device drivers do tests like dev->netdev_ops == &foo_ops which was not the case before since we were allocating an entirely new structure. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 3369afba1e46b0f7f33b4853a9d06616be6e22d5 Author: Florian Fainelli Date: Sun Jul 19 20:49:53 2020 -0700 net: Call into DSA netdevice_ops wrappers Make the core net_device code call into our ndo_do_ioctl() and ndo_get_phys_port_name() functions via the wrappers defined previously Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 4cfab3566710826e62adbf100875d2dca32434b6 Author: Florian Fainelli Date: Sun Jul 19 20:49:52 2020 -0700 net: dsa: Add wrappers for overloaded ndo_ops Add definitions for the dsa_netdevice_ops structure which is a subset of the net_device_ops structure for the specific operations that we care about overlaying on top of the DSA CPU port net_device and provide inline stubs that take core managing whether DSA code is reachable. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit aad74d849dd56a04ccb289f7c61909a68337ce5e Author: Florian Fainelli Date: Sun Jul 19 20:49:51 2020 -0700 net: Wrap ndo_do_ioctl() to prepare for DSA stacked ops In preparation for adding another layer of call into a DSA stacked ops singleton, wrap the ndo_do_ioctl() call into dev_do_ioctl(). Reviewed-by: Andrew Lunn Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 88a3c45482f63373f7cce37a182cd6f40429a5ac Author: Xu Wang Date: Mon Jul 20 03:09:59 2020 +0000 net: vxge-main: Remove unnecessary cast in kfree() Remove unnecassary casts in the argument to kfree. Signed-off-by: Xu Wang Signed-off-by: David S. Miller commit 887e03739130a5fddadfd6dfe9323a6f117ef582 Author: Randy Dunlap Date: Sun Jul 19 17:13:44 2020 -0700 f2fs: segment.h: delete a duplicated word Drop the repeated word "the" in a comment. Signed-off-by: Randy Dunlap Cc: Jaegeuk Kim Cc: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 02772fbfcba8597eef9d5c5f7f94087132d0c1d4 Author: Chao Yu Date: Mon Jul 20 16:52:50 2020 +0800 f2fs: compress: fix to avoid memory leak on cc->cpages Memory allocated for storing compressed pages' poitner should be released after f2fs_write_compressed_pages(), otherwise it will cause memory leak issue. Signed-off-by: Chao Yu Fixes: 4c8ff7095bef ("f2fs: support data compression") Signed-off-by: Jaegeuk Kim commit 3357af8f1a09731b75628f72de76ea8e3c9cbd7e Author: Eric Biggers Date: Tue Jul 14 15:18:12 2020 -0700 f2fs: use generic names for generic ioctls Don't define F2FS_IOC_* aliases to ioctls that already have a generic FS_IOC_* name. These aliases are unnecessary, and they make it unclear which ioctls are f2fs-specific and which are generic. Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d57c69ca6d4ab890e8edac5c8e10c7c2b54d500c Author: Christian Hewitt Date: Sat Jul 18 05:45:05 2020 +0000 arm64: dts: meson: update spifc node name on Khadas VIM3/VIM3L The VIM3/VIM3L Boards use w25q128 not w25q32 - this is a cosmetic change only - the device probes fine with the current device-tree. Fixes: 0e1610e726d3 ("arm64: dts: khadas-vim3: add SPIFC controller node") Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Acked-by: Neil Armstrong Link: https://lore.kernel.org/r/20200718054505.4165-1-christianshewitt@gmail.com commit 311aa6aafea446c2f954cc19d66425bfed8c4b0b Author: Bruno Meneguele Date: Mon Jul 13 13:48:30 2020 -0300 ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime The IMA_APPRAISE_BOOTPARAM config allows enabling different "ima_appraise=" modes - log, fix, enforce - at run time, but not when IMA architecture specific policies are enabled.  This prevents properly labeling the filesystem on systems where secure boot is supported, but not enabled on the platform.  Only when secure boot is actually enabled should these IMA appraise modes be disabled. This patch removes the compile time dependency and makes it a runtime decision, based on the secure boot state of that platform. Test results as follows: -> x86-64 with secure boot enabled [ 0.015637] Kernel command line: <...> ima_policy=appraise_tcb ima_appraise=fix [ 0.015668] ima: Secure boot enabled: ignoring ima_appraise=fix boot parameter option -> powerpc with secure boot disabled [ 0.000000] Kernel command line: <...> ima_policy=appraise_tcb ima_appraise=fix [ 0.000000] Secure boot mode disabled -> Running the system without secure boot and with both options set: CONFIG_IMA_APPRAISE_BOOTPARAM=y CONFIG_IMA_ARCH_POLICY=y Audit prompts "missing-hash" but still allow execution and, consequently, filesystem labeling: type=INTEGRITY_DATA msg=audit(07/09/2020 12:30:27.778:1691) : pid=4976 uid=root auid=root ses=2 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 op=appraise_data cause=missing-hash comm=bash name=/usr/bin/evmctl dev="dm-0" ino=493150 res=no Cc: stable@vger.kernel.org Fixes: d958083a8f64 ("x86/ima: define arch_get_ima_policy() for x86") Signed-off-by: Bruno Meneguele Cc: stable@vger.kernel.org # 5.0 Signed-off-by: Mimi Zohar commit 1768215a650c612e7e68e779cfb50a8b55c2cf40 Author: Tyler Hicks Date: Tue Jun 23 18:38:23 2020 -0500 ima: AppArmor satisfies the audit rule requirements AppArmor meets all the requirements for IMA in terms of audit rules since commit e79c26d04043 ("apparmor: Add support for audit rule filtering"). Update IMA's Kconfig section for CONFIG_IMA_LSM_RULES to reflect this. Fixes: e79c26d04043 ("apparmor: Add support for audit rule filtering") Signed-off-by: Tyler Hicks Signed-off-by: Mimi Zohar commit b8867eedcf76caef8ae6412da97cd9abfd092ff8 Author: Tyler Hicks Date: Fri Jul 10 15:37:50 2020 -0500 ima: Rename internal filter rule functions Rename IMA's internal filter rule functions from security_filter_rule_*() to ima_filter_rule_*(). This avoids polluting the security_* namespace, which is typically reserved for general security subsystem infrastructure. Signed-off-by: Tyler Hicks Suggested-by: Casey Schaufler [zohar@linux.ibm.com: reword using the term "filter", not "audit"] Signed-off-by: Mimi Zohar commit 46e3ecda63577b12327a5fcdbc81444dd77a3652 Merge: 5c09ea8bf3a04 6c4411f14d1af Author: Stephen Boyd Date: Mon Jul 20 15:11:44 2020 -0700 Merge branch 'clk-doc' into clk-next * clk-doc: clk: : drop a duplicated word commit 6c4411f14d1afa8ead90cd4cf18a308c43ac6908 Author: Randy Dunlap Date: Sat Jul 18 17:28:30 2020 -0700 clk: : drop a duplicated word Drop the repeated word "not" in a comment. Signed-off-by: Randy Dunlap Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Link: https://lore.kernel.org/r/20200719002830.20319-1-rdunlap@infradead.org Signed-off-by: Stephen Boyd commit a068d9371f1951bf2a686fc5c8e37fb3edbf0ea0 Merge: 34e980bb83a07 4834177e63325 Author: Mimi Zohar Date: Mon Jul 20 18:07:47 2020 -0400 Merge branch 'validate-policy-rules' into next-integrity From "ima: Fix rule parsing bugs and extend KEXEC_CMDLINE rule support" coverletter. This series ultimately extends the supported IMA rule conditionals for the KEXEC_CMDLINE hook function. As of today, there's an imbalance in IMA language conditional support for KEXEC_CMDLINE rules in comparison to KEXEC_KERNEL_CHECK and KEXEC_INITRAMFS_CHECK rules. The KEXEC_CMDLINE rules do not support *any* conditionals so you cannot have a sequence of rules like this: dont_measure func=KEXEC_KERNEL_CHECK obj_type=foo_t dont_measure func=KEXEC_INITRAMFS_CHECK obj_type=foo_t dont_measure func=KEXEC_CMDLINE obj_type=foo_t measure func=KEXEC_KERNEL_CHECK measure func=KEXEC_INITRAMFS_CHECK measure func=KEXEC_CMDLINE Instead, KEXEC_CMDLINE rules can only be measured or not measured and there's no additional flexibility in today's implementation of the KEXEC_CMDLINE hook function. With this series, the above sequence of rules becomes valid and any calls to kexec_file_load() with a kernel and initramfs inode type of foo_t will not be measured (that includes the kernel cmdline buffer) while all other objects given to a kexec_file_load() syscall will be measured. There's obviously not an inode directly associated with the kernel cmdline buffer but this patch series ties the inode based decision making for KEXEC_CMDLINE to the kernel's inode. I think this will be intuitive to policy authors. While reading IMA code and preparing to make this change, I realized that the buffer based hook functions (KEXEC_CMDLINE and KEY_CHECK) are quite special in comparison to longer standing hook functions. These buffer based hook functions can only support measure actions and there are some restrictions on the conditionals that they support. However, the rule parser isn't enforcing any of those restrictions and IMA policy authors wouldn't have any immediate way of knowing that the policy that they wrote is invalid. For example, the sequence of rules above parses successfully in today's kernel but the "dont_measure func=KEXEC_CMDLINE ..." rule is incorrectly handled in ima_match_rules(). The dont_measure rule is *always* considered to be a match so, surprisingly, no KEXEC_CMDLINE measurements are made. While making the rule parser more strict, I realized that the parser does not correctly free all of the allocated memory associated with an ima_rule_entry when going down some error paths. Invalid policy loaded by the policy administrator could result in small memory leaks. commit b9b1a5d71533f2ccd54b810dffdcf0789b30ba9b Author: Christoph Hellwig Date: Mon Jul 20 08:12:51 2020 +0200 block: remove blk_queue_stack_limits This function is just a tiny wrapper around blk_stack_limits. Open code it int the two callers. Reviewed-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9efa82ef2b15d1757dd6cc518988a4506554e893 Author: Christoph Hellwig Date: Mon Jul 20 08:12:50 2020 +0200 block: remove bdev_stack_limits This function is just a tiny wrapper around blk_stack_limit and has two callers. Simplify the stack a bit by open coding it in the two callers. Reviewed-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 3093a479727be194996dbc40f803711af5877be4 Author: Christoph Hellwig Date: Mon Jul 20 08:12:49 2020 +0200 block: inherit the zoned characteristics in blk_stack_limits Lift the code from device mapper into blk_stack_limits to inherity the stacking limitations. This ensures we do the right thing for all stacked zoned block devices. Reviewed-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 4f43d648078a754aefe6a4de233ebb6e4d192aa6 Merge: 9caaa66c918c0 659bf827ba8f1 Author: Jens Axboe Date: Mon Jul 20 15:38:27 2020 -0600 Merge branch 'for-5.9/drivers' into for-5.9/block-merge * for-5.9/drivers: (38 commits) block: add max_active_zones to blk-sysfs block: add max_open_zones to blk-sysfs s390/dasd: Use struct_size() helper s390/dasd: fix inability to use DASD with DIAG driver md-cluster: fix wild pointer of unlock_all_bitmaps() md/raid5-cache: clear MD_SB_CHANGE_PENDING before flushing stripes md: fix deadlock causing by sysfs_notify md: improve io stats accounting md: raid0/linear: fix dereference before null check on pointer mddev rsxx: switch from 'pci_free_consistent()' to 'dma_free_coherent()' nvme: remove ns->disk checks nvme-pci: use standard block status symbolic names nvme-pci: use the consistent return type of nvme_pci_iod_alloc_size() nvme-pci: add a blank line after declarations nvme-pci: fix some comments issues nvme-pci: remove redundant segment validation nvme: document quirked Intel models nvme: expose reconnect_delay and ctrl_loss_tmo via sysfs nvme: support for zoned namespaces nvme: support for multiple Command Sets Supported and Effects log pages ... commit 9caaa66c918c020fd16e84d1c6ebcce9960df1b2 Merge: ba47d845d715a ef45fe470e1e5 Author: Jens Axboe Date: Mon Jul 20 15:38:23 2020 -0600 Merge branch 'for-5.9/block' into for-5.9/block-merge * for-5.9/block: (124 commits) blk-cgroup: show global disk stats in root cgroup io.stat blk-cgroup: make iostat functions visible to stat printing block: improve discard bio alignment in __blkdev_issue_discard() block: change REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL to be odd numbers block: defer flush request no matter whether we have elevator block: make blk_timeout_init() static block: remove retry loop in ioc_release_fn() block: remove unnecessary ioc nested locking block: integrate bd_start_claiming into __blkdev_get block: use bd_prepare_to_claim directly in the loop driver block: refactor bd_start_claiming block: simplify the restart case in __blkdev_get Revert "blk-rq-qos: remove redundant finish_wait to rq_qos_wait." block: always remove partitions from blk_drop_partitions() block: relax jiffies rounding for timeouts blk-mq: remove redundant validation in __blk_mq_end_request() blk-mq: Remove unnecessary local variable writeback: remove bdi->congested_fn writeback: remove struct bdi_writeback_congested writeback: remove {set,clear}_wb_congested ... commit 03c900b3be116003ccd0e798431f6d0c25ff6729 Author: Akash Asthana Date: Fri Jul 17 20:02:22 2020 +0530 soc: qcom: geni: Fix NULL pointer dereference pdev struct doesn't exits for the devices whose status are disabled from DT node, in such cases NULL is returned from 'of_find_device_by_node' Later when we try to get drvdata from pdev struct NULL pointer dereference is triggered. Add a NULL check for return values to fix the issue. We were hitting this issue when one of QUP is disabled. Reviewed-by: Matthias Kaehlcke Reviewed-by: Bjorn Andersson Tested-by: Bjorn Andersson Fixes: 048eb908a1f2 ("soc: qcom-geni-se: Add interconnect support to fix earlycon crash") Reported-by: Sai Prakash Ranjan Signed-off-by: Akash Asthana Link: https://lore.kernel.org/r/1594996342-26964-1-git-send-email-akashast@codeaurora.org [bjorn: s/wrapper_pdev/pdev/] Signed-off-by: Bjorn Andersson commit 8e7eafb816ab7e5047b74cb8eb1db2f8f14f7d7a Author: Randy Dunlap Date: Sat Jul 18 17:32:20 2020 -0700 RDMA: rdma_user_ioctl.h: fix a duplicated word + clarify Change the repeated word "it" in a comment to "it to". Also insert a dash in the sentence to add clarity. Link: https://lore.kernel.org/r/20200719003220.21250-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Jason Gunthorpe commit e25c52c7ccf784df6cd711c82d302b29da4e0730 Author: Devesh Sharma Date: Wed Jul 15 10:16:59 2020 -0400 RDMA/bnxt_re: Update maintainers for Broadcom rdma driver Adding a new co-maintainer for Broadcom's RDMA driver. Link: https://lore.kernel.org/r/1594822619-4098-7-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 2bb3c32c5c5fe98b7407a0befc32f16c959a0a92 Author: Devesh Sharma Date: Wed Jul 15 10:16:58 2020 -0400 RDMA/bnxt_re: Change wr posting logic to accommodate variable wqes Modifying the post-send and post-recv to initialize the wqes slot by slot dynamically depending on the number of max sges requested by consumer at the time of QP creation. Changed the QP creation logic to determine the size of SQ and RQ in 16B slots based on the number of wqe and number of SGEs requested by consumer Link: https://lore.kernel.org/r/1594822619-4098-6-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 54ace98443ab9b8611b288359e20168e3e1571c1 Author: Devesh Sharma Date: Wed Jul 15 10:16:57 2020 -0400 RDMA/bnxt_re: Add helper data structures Adding few helper data structure which are useful to initialize hardware send wqe in variable wqe mode. Adding a qp flag in HSI to indicate variable wqe is enabled for this qp. Link: https://lore.kernel.org/r/1594822619-4098-5-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 5ac5396a6c6a8a701de305f209c57038b167a727 Author: Devesh Sharma Date: Wed Jul 15 10:16:56 2020 -0400 RDMA/bnxt_re: Pull psn buffer dynamically based on prod Changing the PSN management memory buffers from statically initialized to dynamic pull scheme. During create qp only the start pointers are initialized and during post-send the psn buffer is pulled based on current producer index. Adjusting post_send code to accommodate dynamic psn-pull and changing post_recv code to match post-send code wrt pseudo flush wqe generation. Link: https://lore.kernel.org/r/1594822619-4098-4-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 159fb4ceacd79b07bc4a78a897ef2a98dc1dcbf9 Author: Devesh Sharma Date: Wed Jul 15 10:16:55 2020 -0400 RDMA/bnxt_re: introduce a function to allocate swq The bnxt_re driver now allocates shadow sq and rq to maintain per wqe wr_id and few other flags required to support variable wqe. Segregated the allocation of shadow queue in a separate function and adjust the cqe polling logic. The new polling logic is based on shadow queue indices. Link: https://lore.kernel.org/r/1594822619-4098-3-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 1da968e0ef1f640e54ca9c86970b8093c1729753 Author: Devesh Sharma Date: Wed Jul 15 10:16:54 2020 -0400 RDMA/bnxt_re: introduce wqe mode to select execution path The bnxt_re driver need to decide on how much SQ and RQ memory should to be allocated and which wqe posting/polling algorithm to use. Making changes to set the wqe-mode to a default value during device registration sequence. The wqe-mode is passed to the lower layer driver as well. Going forward in the lower layer driver wqe-mode will be used to decide execution path. Initializing the wqe-mode to static wqe type for now. Link: https://lore.kernel.org/r/1594822619-4098-2-git-send-email-devesh.sharma@broadcom.com Signed-off-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit ca4beeee9895f14df22940d804aab4534c23f03f Author: Kamal Heib Date: Tue Jul 14 21:34:14 2020 +0300 RDMA/qedr: Remove the query_pkey callback Now that the query_pkey() isn't mandatory by the RDMA core for iwarp providers, this callback can be removed from the common ops and moved to the RoCE only ops within the qedr driver. Link: https://lore.kernel.org/r/20200714183414.61069-8-kamalheib1@gmail.com Signed-off-by: Kamal Heib Acked-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit c1c5e9fd3ab58732d40848a57236622af0a7e1db Author: Kamal Heib Date: Tue Jul 14 21:34:13 2020 +0300 RDMA/i40iw: Remove the query_pkey callback Now that the query_pkey() isn't mandatory by the RDMA core for iwarp providers, this callback can be removed. Link: https://lore.kernel.org/r/20200714183414.61069-7-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit ce07f1c6a8be401e060acd601abab42c37dc7b7c Author: Kamal Heib Date: Tue Jul 14 21:34:12 2020 +0300 RDMA/cxgb4: Remove the query_pkey callback Now that the query_pkey() isn't mandatory by the RDMA core for iwarp providers, this callback can be removed. Link: https://lore.kernel.org/r/20200714183414.61069-6-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit c4995bd35471d00cd1409b3dba6955b45a08590b Author: Kamal Heib Date: Tue Jul 14 21:34:11 2020 +0300 RDMA/siw: Remove the query_pkey callback Now that the query_pkey() isn't mandatory by the RDMA core for iwarp providers, this callback can be removed. Link: https://lore.kernel.org/r/20200714183414.61069-5-kamalheib1@gmail.com Signed-off-by: Kamal Heib Acked-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit ab75a6cb8cb27ff7f65ab66962975be30507ee29 Author: Kamal Heib Date: Tue Jul 14 21:34:10 2020 +0300 RDMA/core: Remove query_pkey from the mandatory ops The query_pkey() isn't mandatory for the iwarp providers, so remove this requirement from the RDMA core. Link: https://lore.kernel.org/r/20200714183414.61069-4-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 6f38efca9bf09b7e4faf8cc4d221e4336aa303ef Author: Kamal Heib Date: Tue Jul 14 21:34:09 2020 +0300 RDMA/core: Allocate the pkey cache only if the pkey_tbl_len is set Allocate the pkey cache only if the pkey_tbl_len is set by the provider, also add checks to avoid accessing the pkey cache when it not initialized. Link: https://lore.kernel.org/r/20200714183414.61069-3-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 90efc8b2d4582feef270a5c9460178f59d812f67 Author: Kamal Heib Date: Tue Jul 14 21:34:08 2020 +0300 RDMA/core: Expose pkeys sysfs files only if pkey_tbl_len is set Expose the pkeys sysfs files only if the pkey_tbl_len is set by the providers. Link: https://lore.kernel.org/r/20200714183414.61069-2-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 4834177e633258fbf3c5754b1220f01c705b79eb Author: Tyler Hicks Date: Thu Jul 9 01:19:11 2020 -0500 ima: Support additional conditionals in the KEXEC_CMDLINE hook function Take the properties of the kexec kernel's inode and the current task ownership into consideration when matching a KEXEC_CMDLINE operation to the rules in the IMA policy. This allows for some uniformity when writing IMA policy rules for KEXEC_KERNEL_CHECK, KEXEC_INITRAMFS_CHECK, and KEXEC_CMDLINE operations. Prior to this patch, it was not possible to write a set of rules like this: dont_measure func=KEXEC_KERNEL_CHECK obj_type=foo_t dont_measure func=KEXEC_INITRAMFS_CHECK obj_type=foo_t dont_measure func=KEXEC_CMDLINE obj_type=foo_t measure func=KEXEC_KERNEL_CHECK measure func=KEXEC_INITRAMFS_CHECK measure func=KEXEC_CMDLINE The inode information associated with the kernel being loaded by a kexec_kernel_load(2) syscall can now be included in the decision to measure or not Additonally, the uid, euid, and subj_* conditionals can also now be used in KEXEC_CMDLINE rules. There was no technical reason as to why those conditionals weren't being considered previously other than ima_match_rules() didn't have a valid inode to use so it immediately bailed out for KEXEC_CMDLINE operations rather than going through the full list of conditional comparisons. Signed-off-by: Tyler Hicks Cc: Eric Biederman Cc: kexec@lists.infradead.org Reviewed-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit 592b24cbdc12e52bdb5937c0697df9febf41f8d9 Author: Tyler Hicks Date: Thu Jul 9 01:19:10 2020 -0500 ima: Use the common function to detect LSM conditionals in a rule Make broader use of ima_rule_contains_lsm_cond() to check if a given rule contains an LSM conditional. This is a code cleanup and has no user-facing change. Signed-off-by: Tyler Hicks Reviewed-by: Mimi Zohar Signed-off-by: Mimi Zohar commit 30031b0ec8aef903ebede41f43a8d021f0030499 Author: Tyler Hicks Date: Thu Jul 9 01:19:09 2020 -0500 ima: Move comprehensive rule validation checks out of the token parser Use ima_validate_rule(), at the end of the token parsing stage, to verify combinations of actions, hooks, and flags. This is useful to increase readability by consolidating such checks into a single function and also because rule conditionals can be specified in arbitrary order making it difficult to do comprehensive rule validation until the entire rule has been parsed. This allows for the check that ties together the "keyrings" conditional with the KEY_CHECK function hook to be moved into the final rule validation. The modsig check no longer needs to compiled conditionally because the token parser will ensure that modsig support is enabled before accepting "imasig|modsig" appraise type values. The final rule validation will ensure that appraise_type and appraise_flag options are only present in appraise rules. Finally, this allows for the check that ties together the "pcr" conditional with the measure action to be moved into the final rule validation. Signed-off-by: Tyler Hicks Signed-off-by: Mimi Zohar commit aa0c0227d331719052cf14a3c10e99a12818d81b Author: Tyler Hicks Date: Thu Jul 9 01:19:08 2020 -0500 ima: Use correct type for the args_p member of ima_rule_entry.lsm elements Make args_p be of the char pointer type rather than have it be a void pointer that gets casted to char pointer when it is used. It is a simple NUL-terminated string as returned by match_strdup(). Signed-off-by: Tyler Hicks Signed-off-by: Mimi Zohar commit 39e5993d0d452b9ef612f2fcf7ca77ff319438f4 Author: Tyler Hicks Date: Thu Jul 9 01:19:07 2020 -0500 ima: Shallow copy the args_p member of ima_rule_entry.lsm elements The args_p member is a simple string that is allocated by ima_rule_init(). Shallow copy it like other non-LSM references in ima_rule_entry structs. There are no longer any necessary error path cleanups to do in ima_lsm_copy_rule(). Signed-off-by: Tyler Hicks Signed-off-by: Tyler Hicks Signed-off-by: Mimi Zohar commit 5f3e92657bbfb63ad3109433d843c89996114b03 Author: Tyler Hicks Date: Thu Jul 9 01:19:06 2020 -0500 ima: Fail rule parsing when appraise_flag=blacklist is unsupportable Verifying that a file hash is not blacklisted is currently only supported for files with appended signatures (modsig). In the future, this might change. For now, the "appraise_flag" option is only appropriate for appraise actions and its "blacklist" value is only appropriate when CONFIG_IMA_APPRAISE_MODSIG is enabled and "appraise_flag=blacklist" is only appropriate when "appraise_type=imasig|modsig" is also present. Make this clear at policy load so that IMA policy authors don't assume that other uses of "appraise_flag=blacklist" are supported. Fixes: 273df864cf74 ("ima: Check against blacklisted hashes for files with modsig") Signed-off-by: Tyler Hicks Reivewed-by: Nayna Jain Tested-by: Nayna Jain Signed-off-by: Mimi Zohar commit f70e472d696059a89e768a07035b28e2f37de5e0 Merge: 3acff11cef1de e1794aa43f17b Author: Mark Brown Date: Mon Jul 20 16:31:55 2020 +0100 Merge series "regulator_sync_state() support" from Saravana Kannan : Consider the following example: - regulator-X is provided by device-X. - regulator-X is a supplier to device-A, device-B and device-C. - device-A is off/inactive from boot. - device-B and device-C are left on/active by the bootloader - regulator-X is left on boot by the bootloader at 2000 mV to supply device-B and device-C. Example boot sequence 1: 1. device-X is probed successfully. 2. device-A is probed by driver-A a. driver-A gets regulator-X b. driver-A votes on regulator-X c. driver-A initializes device-A d. driver-A votes off regulator-X e. regulator-X is turned off. 3. System crashes or device-B and device-C become unreliable because regulator-X was turned off without following the proper quiescing steps for device-B and device-C. Example boot sequence 2: 1. device-X is probed successfully. 2. device-B is probed by driver-B a. driver-B gets regulator-X b. driver-B votes on regulator-X c. driver-B lowers device-B performance point. d. driver-B lowers voltage vote to 1000 mV. e. regulator-X voltage is lowered to 1000 mV. 3. System crashes or device-C becomes unreliable because regulator-X voltage was lowered to 1000 mV when device-C still needed it at 2000 mV This patch series makes sure these examples are handled correctly and system crash or device instability is avoided and the system remains usable. More details provided in the commit texts. v2->v3: Patch 2/4 - No functional change. Simple refactor. Patch 3/4 - Was Patch 2/2 in v2. - Rewrote commit text to hopefully address all previous points. - Renamed variable/functions. Hope it's clearer. - Added more comments. - Added logging - Fixed timeout functionality. - Handle exclusive consumers properly - Handle coupled regulators properly Patch 4/4 - Prevents voltage from going too low during boot. v1->v2: Patch 1/2 - New patch Patch 2/2 - This was the only patch in v1 - Made the late_initcall_sync timeout a commandline param - If timeout is set, we also give up waiting for all consumers after the timeout expires. - Made every regulator driver add sync_state() support Saravana Kannan (4): driver core: Add dev_set_drv_sync_state() regulator: core: Add destroy_regulator() regulator: core: Add basic enable/disable support for sync_state() callbacks regulator: core: Add voltage support for sync_state() callbacks drivers/regulator/core.c | 200 ++++++++++++++++++++++++++++--- include/linux/device.h | 12 ++ include/linux/regulator/driver.h | 2 + 3 files changed, 198 insertions(+), 16 deletions(-) -- 2.28.0.rc0.105.gf9edc3c819-goog commit 3acff11cef1dece31cd29956f19181895996a7c5 Author: Chen-Yu Tsai Date: Mon Jul 20 21:28:09 2020 +0800 regulator: gpio: Honor regulator-boot-on property When requesting the enable GPIO, the driver should do so with the correct output level matching some expected state. This is especially important if the regulator is a critical one, such as a supply for the boot CPU. This is currently done by checking for the enable-at-boot property, but this is not documented in the device tree binding, nor does it match the common regulator properties. Honor the common regulator-boot-on property by checking the boot_on constraint setting within the DT probe path. This is the same as what is done in the fixed regulator driver. Also add a comment stating that the enable-at-boot property should not be used. Fixes: 006694d099e8 ("regulator: gpio-regulator: Allow use of GPIO controlled regulators though DT") Signed-off-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200720132809.26908-1-wens@kernel.org Signed-off-by: Mark Brown commit e1794aa43f17bf2512c10370c6be6ea24a6f29d0 Author: Saravana Kannan Date: Wed Jul 15 21:20:51 2020 -0700 regulator: core: Add destroy_regulator() Part of the regulator_get() code is already factored out into create_regulator(). This patch factors out some of the regulator_put() code into destroy_regulator() so that create_regulator() has a corresponding unwind function. Subsequent patches will use this function. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200716042053.1927676-3-saravanak@google.com Signed-off-by: Mark Brown commit 85bd5af6cb6829872d25648a070cf1281a67a255 Merge: 5aa988ae21e9b 6129225fb6e40 Author: Arnd Bergmann Date: Mon Jul 20 17:21:59 2020 +0200 Merge tag 'sunxi-config-for-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/defconfig A bunch of patches to generally make sunxi_defconfig more helpful and add all the new drivers merged recently. * tag 'sunxi-config-for-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: configs: sunxi: Enable crypto related options ARM: sunxi: configs: Enable the Mailbox driver ARM: configs: sunxi: Enable the PS/2 controller ARM: configs: sunxi: Enable Lima ARM: configs: sunxi: Add DRM output-related options ARM: configs: sunxi: Enable ASoC options ARM: configs: sunxi: Enable Cedrus ARM: configs: sunxi: Enable the deinterlace and rotation engines ARM: configs: sunxi: Enable the CSI drivers ARM: configs: sunxi: Run savedefconfig Link: https://lore.kernel.org/r/c74e64c9-f1f2-40ee-b4cd-c1430d32cf8d.lettre@localhost Signed-off-by: Arnd Bergmann commit 8e225f04d2dd6c1ca1eaecd5b04eaa90284df507 Author: Damien Le Moal Date: Wed Jul 8 18:28:08 2020 +0900 dm crypt: Enable zoned block device support Enable support for zoned block devices. This is done by: 1) implementing the target report_zones method. 2) adding the DM_TARGET_ZONED_HM flag to the target features. 3) setting DM_CRYPT_NO_WRITE_WORKQUEUE flag to avoid IO processing via workqueue. 4) Introducing inline write encryption completion to preserve write ordering. The last point is implemented by introducing the internal flag DM_CRYPT_WRITE_INLINE. When set, kcryptd_crypt_write_convert() always waits inline for the completion of a write request encryption if the request is not already completed once crypt_convert() returns. Completion of write request encryption is signaled using the restart completion by kcryptd_async_done(). This mechanism allows using ciphers that have an asynchronous implementation, isolating dm-crypt from any potential request completion reordering for these ciphers. Signed-off-by: Damien Le Moal Signed-off-by: Mike Snitzer commit 39d42fa96ba1b7d2544db3f8ed5da8fb0d5cb877 Author: Ignat Korchagin Date: Mon Jul 6 18:37:31 2020 +0100 dm crypt: add flags to optionally bypass kcryptd workqueues This is a follow up to [1] that detailed latency problems associated with dm-crypt's use of workqueues when processing IO. Current dm-crypt implementation creates a significant IO performance overhead (at least on small IO block sizes) for both latency and throughput. We suspect offloading IO request processing into workqueues and async threads is more harmful these days with the modern fast storage. I also did some digging into the dm-crypt git history and much of this async processing is not needed anymore, because the reasons it was added are mostly gone from the kernel. More details can be found in [2] (see "Git archeology" section). This change adds DM_CRYPT_NO_READ_WORKQUEUE and DM_CRYPT_NO_WRITE_WORKQUEUE flags for read and write BIOs, which direct dm-crypt to not offload crypto operations into kcryptd workqueues. In addition, writes are not buffered to be sorted in the dm-crypt red-black tree, but dispatched immediately. For cases, where crypto operations cannot happen (hard interrupt context, for example the read path of some NVME drivers), we offload the work to a tasklet rather than a workqueue. These flags only ensure no async BIO processing in the dm-crypt module. It is worth noting that some Crypto API implementations may offload encryption into their own workqueues, which are independent of the dm-crypt and its configuration. However upon enabling these new flags dm-crypt will instruct Crypto API not to backlog crypto requests. To give an idea of the performance gains for certain workloads, consider the script, and results when tested against various devices, detailed here: https://www.redhat.com/archives/dm-devel/2020-July/msg00138.html [1]: https://www.spinics.net/lists/dm-crypt/msg07516.html [2]: https://blog.cloudflare.com/speeding-up-linux-disk-encryption/ Signed-off-by: Ignat Korchagin Reviewed-by: Damien Le Moal Reviewed-by: Bob Liu Signed-off-by: Mike Snitzer commit 70704c33db841d847b16d8ae7e29ae3b8a479e75 Author: Mikulas Patocka Date: Fri Jul 3 10:26:46 2020 -0400 dm bufio: do buffer cleanup from a workqueue Until now, DM bufio's waiting for IO from reclaim context in its shrinker has caused kswapd to block; which results in systemic IO stalls and even deadlock, e.g.: https://www.redhat.com/archives/dm-devel/2020-March/msg00025.html Here is Dave Chinner's problem description that motivated this fix, from: https://lore.kernel.org/linux-fsdevel/20190809215733.GZ7777@dread.disaster.area/ "Waiting for IO in kswapd reclaim context is considered harmful - kswapd context shrinker reclaim should be as non-blocking as possible, and any back-off to wait for IO to complete should be done by the high level reclaim core once it's completed an entire reclaim scan cycle of everything.... What follows from that, and is pertinent in this situation, is that if you don't block kswapd, then other reclaim contexts are not going to get stuck waiting for it regardless of the reclaim context they use." Continued elsewhere: "The only way to fix this problem once and for all is to stop using the shrinker as a mechanism to issue and wait on IO. If you need background writeback of dirty buffers, do it from a WQ_MEM_RECLAIM workqueue that isn't directly in the memory reclaim path and so can issue writeback and block safely from a GFP_KERNEL context. Kick the workqueue from the shrinker context, but get rid of the IO submission and waiting from the shrinker and all the GFP_NOFS memory reclaim recursion problems go away." As such, this commit moves buffer cleanup to a workqueue. Suggested-by: Dave Chinner Reported-by: Tahsin Erdogan Signed-off-by: Mikulas Patocka Tested-by: Gabriel Krisman Bertazi Signed-off-by: Mike Snitzer commit e766668c6cd49d741cfb49eaeb38998ba34d27bc Author: Ming Lei Date: Fri Jun 19 16:42:14 2020 +0800 dm rq: don't call blk_mq_queue_stopped() in dm_stop_queue() dm_stop_queue() only uses blk_mq_quiesce_queue() so it doesn't formally stop the blk-mq queue; therefore there is no point making the blk_mq_queue_stopped() check -- it will never be stopped. In addition, even though dm_stop_queue() actually tries to quiesce hw queues via blk_mq_quiesce_queue(), checking with blk_queue_quiesced() to avoid unnecessary queue quiesce isn't reliable because: the QUEUE_FLAG_QUIESCED flag is set before synchronize_rcu() and dm_stop_queue() may be called when synchronize_rcu() from another blk_mq_quiesce_queue() is in-progress. Fixes: 7b17c2f7292ba ("dm: Fix a race condition related to stopping and starting queues") Signed-off-by: Ming Lei Signed-off-by: Mike Snitzer commit 0c248ea27fc88cf8a3035ba0ed75b210be9abf80 Author: yangerkun Date: Fri Jun 19 17:12:42 2020 -0400 dm dust: add interface to list all badblocks This interface may help anyone who want to know all badblocks without querying for each block. [Bryan: DMEMIT message if no blocks are in the bad block list.] Signed-off-by: yangerkun Signed-off-by: Bryan Gurney Signed-off-by: Mike Snitzer commit 4f7f590b152444c1403ece9eeeddd1e8b22ba04e Author: yangerkun Date: Fri Jun 19 17:10:39 2020 -0400 dm dust: report some message results directly back to user Some messages (queryblock, countbadblocks, removebadblock) are best reported directly to user directly. Do so with DMEMIT. [Bryan: maintain __func__ output in DMEMIT messages] Signed-off-by: yangerkun Signed-off-by: Bryan Gurney Signed-off-by: Mike Snitzer commit 5aa988ae21e9ba3dd053339c49602d8bc97b171a Merge: 67c70aa86f8b7 3a3cb021b0380 Author: Arnd Bergmann Date: Mon Jul 20 17:16:38 2020 +0200 Merge tag 'tegra-for-5.9-arm-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/defconfig ARM: tegra: Default configuration changes for v5.9-rc1 Enables a few new configuration options that are useful on the new Nexus 7 and Acer A500 devices, as well as the userspace CPU frequency governor that's mainly used for testing. * tag 'tegra-for-5.9-arm-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra_defconfig: Enable options useful for Nexus 7 and Acer A500 ARM: tegra: Enable CPUFREQ userspace governor Link: https://lore.kernel.org/r/20200717161300.1661002-6-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit b51820203396a2a47cbb3359f78f3e3a67eba07f Merge: 6b174a49e4e02 0d95d06a7aae3 Author: Mark Brown Date: Mon Jul 20 16:08:24 2020 +0100 Merge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart : Small patchset to harden the SoundWire machine driver, change bad HIDs, update PLL settings and avoid memory leaks. Given that the SoundWire core parts are not upstream it's probably not necessary to provide the patches to stable branches. Bard Liao (1): ASoC: Intel: sof_sdw_rt711: remove hard-coded codec name Kai Vehmanen (2): ASoC: Intel: sof_sdw: add support for systems without i915 audio ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded Libin Yang (1): ASoC: Intel: common: change match table ehl-rt5660 Pierre-Louis Bossart (1): ASoC: Intel: sof_sdw_rt711: remove properties in card remove Yong Zhi (1): ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freq sound/soc/intel/boards/sof_rt5682.c | 9 +++++- sound/soc/intel/boards/sof_sdw.c | 31 +++++++++++++------ sound/soc/intel/boards/sof_sdw_common.h | 2 ++ sound/soc/intel/boards/sof_sdw_hdmi.c | 6 ++++ sound/soc/intel/boards/sof_sdw_rt711.c | 17 +++++++++- .../intel/common/soc-acpi-intel-ehl-match.c | 2 +- 6 files changed, 54 insertions(+), 13 deletions(-) base-commit: 22e9b54307987787efa0ee534aa9e31982ec1161 -- 2.25.1 commit 0d95d06a7aae38f3bd61582e00f0cc06b35ca0ab Author: Yong Zhi Date: Fri Jul 17 16:13:36 2020 -0500 ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freq In commit d696a61413b4 ("ASoC: rt1015: Add condition to prevent SoC providing bclk in ratio of 50 times of sample rate."), PLL input at 50fs is no longer supported, the new recommended settings at 48Khz rate are: PLL input SSP bclk ------------------------ 64fs 3.073Mhz 100fs 4.8Mhz (bclk update is reflected in topoplogy.) Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200717211337.31956-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6b540ac763e9d11506ec1eb6b0fadc70292bb4a6 Author: Kai Vehmanen Date: Fri Jul 17 16:13:35 2020 -0500 ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded The mc_private->hdmi_pcm_list is populated by elements loaded during DSP topology load. Valid topologies for this machine driver will always have PCM nodes for HDMI, but driver should fail gracefully even in the case this is not true. Add a sanity check to sof_sdw_hdmi_card_late_probe() for this case. Without the fix, a null pcm handle gets dereferenced. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20200717211337.31956-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 15ef2ea035db7bcb9a9d0bf3747fbb7dde67dd97 Author: Kai Vehmanen Date: Fri Jul 17 16:13:34 2020 -0500 ASoC: Intel: sof_sdw: add support for systems without i915 audio Extend the generic SOF Soundwire machine driver to support systems where iDisp HDMI/DP audio codec is disabled for some reason (i915 driver disabled, HDMI/DP implemented with a discrete GPU, etc). Switch codecs to SoC dummy in the affected DAI links. This allows to reuse existing topologies for this case. Signed-off-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20200717211337.31956-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit cf0418cd06ce42fcf35beb33e315b5a77e596926 Author: Pierre-Louis Bossart Date: Fri Jul 17 16:13:33 2020 -0500 ASoC: Intel: sof_sdw_rt711: remove properties in card remove The rt711 jack detection properties are set from the machine drivers during the card probe, as done in other ASoC examples. KASAN reports a use-after-free error when unbinding drivers due to a confusing sequence between the ACPI core, the device core and the SoundWire device cleanups. Rather than fixing this sequence, follow the recommendation to have the same caller add and remove properties, add an explicit device_remove_properties() in the card .remove() callback. In future patches the use of device_add/remove_properties will be replaced by a direct handling of a swnode, but the sequence will remain the same. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200717211337.31956-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1f891055c7d0ce665247c09e97db927f2db37ce7 Author: Bard Liao Date: Fri Jul 17 16:13:32 2020 -0500 ASoC: Intel: sof_sdw_rt711: remove hard-coded codec name We can get codec name from dai link. Suggested-by: Rander Wang Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200717211337.31956-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f37b5d3aef8db06390cb7ef25585b39f89c1dedf Author: Alexander A. Klimov Date: Sun Jul 19 11:39:39 2020 +0200 ARM: dts: exynos: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Krzysztof Kozlowski commit 3ecdf2a5d262df01bc100472cb909580d0fdce69 Author: Alexander A. Klimov Date: Sun Jul 19 11:39:39 2020 +0200 ARM: s3c24xx: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Krzysztof Kozlowski commit 6b174a49e4e029c289cab8134b03b0bb76ff16c7 Merge: 4d9e07cc41b83 327ef64702668 Author: Mark Brown Date: Mon Jul 20 15:34:33 2020 +0100 Merge series "Add ASoC AHUB components for Tegra210 and later" from Sameer Pujar : Overview ======== Audio Processing Engine (APE) comprises of Audio DMA (ADMA) and Audio Hub (AHUB) unit. AHUB is a collection of hardware accelerators for audio pre-processing and post-processing. It also includes a programmable full crossbar for routing audio data across these accelerators. This series exposes some of these below mentioned HW devices as ASoC components for Tegra platforms from Tegra210 onwards. * ADMAIF : The interface between ADMA and AHUB * XBAR : Crossbar for routing audio samples across various modules * I2S : Inter-IC Sound Controller * DMIC : Digital Microphone * DSPK : Digital Speaker Following is the summary of current series. * Add YAML DT binding documentation for above mentioned modules. * Helper function for ACIF programming is exposed for Tegra210 and later. * Add ASoC driver components for each of the above modules. * Build ACONNECT and ADMA drivers which are essential to realize audio use case. * Add DT entries for above components for Tegra210, Tegra186 and Tegra194. As per the suggestion in [0] audio graph based sound card support is pushed in a separate series. [0] https://lkml.org/lkml/2020/6/27/4 Changelog ========= v4 -> v5 -------- * Common changes - simple-card driver changes are dropped. Changes are migrated to audio graph card and are moved to a separate series as suggested. - '#sound-dai-cells' property is not needed for planned audio graph card Hence dropped from documentation and related DT binding of component drivers. - CIF and DAP DAIs are added for I/O drivers (DMIC, DSPK, I2S) to represent DAI links using audio graph card. Similary DAIs are added in AHUB driver to describe endpoints in audio crossbar. Routing is updated to reflect the same in drivers. v3 -> v4 -------- * [1/23] "ASoC: dt-bindings: tegra: Add DT bindings for Tegra210" - Removed multiple examples and retained one example per doc - Fixed as per inputs on the previous series - Tested bindings with 'make dt_binding_check/dtbs_check' * [2/23] "ASoC: tegra: Add support for CIF programming" - No change * Common changes (for patch [3/10] to [7/10]) - Mixer control overrides, for PCM parameters (rate, channel, bits), in each driver are dropped. - Updated routing as per DPCM usage - Minor changes related to formatting * New changes (patch [8/23] to [18/23] and patch [23/23]) - Based on discussions in following threads DPCM is used for Tegra Audio. https://lkml.org/lkml/2020/2/20/91 https://lkml.org/lkml/2020/4/30/519 - The simple-card driver is used for Tegra Audio and accordingly some enhancements are made in simple-card and core drivers. - Patch [8/23] to [18/23] are related to simple-card and core changes. - Patch [23/23] adds sound card support to realize complete audio path. This is based on simple-card driver with proposed enhancements. - Re-ordered patches depending on above v2 -> v3 -------- * [1/10] "dt-bindings: sound: tegra: add DT binding for AHUB - Updated licence - Removed redundancy w.r.t items/const/enum - Added constraints wherever needed with "pattern" property * [2/10] "ASoC: tegra: add support for CIF programming" - Removed tegra_cif.c - Instead added inline helper function in tegra_cif.h * common changes (for patch [3/10] to [7/10]) - Replace LATE system calls with Normal sleep - Remove explicit RPM suspend in driver remove() call - Use devm_kzalloc() instead of devm_kcalloc() for single element - Replace 'ret' with 'err' for better reading - Consistent error printing style across drivers - Minor formating fixes * [8/10] "arm64: tegra: add AHUB components for few Tegra chips" - no change * [9/10] "arm64: tegra: enable AHUB modules for few Tegra chips" - no change * [10/10] "arm64: defconfig: enable AHUB components for Tegra210 and later" (New patch) - Enables ACONNECT and AHUB components. With this AHUB and components are registered with ASoC core. v1 -> v2 -------- * [1/9] "dt-bindings: sound: tegra: add DT binding for AHUB" - no changes * [2/9] "ASoC: tegra: add support for CIF programming" - removed CIF programming changes for legacy chips. - this patch now exposes helper function for CIF programming, which can be used on Tegra210 later. - later tegra_cif.c can be extended for legacy chips as well. - updated commit message accordingly * [3/9] "ASoC: tegra: add Tegra210 based DMIC driver" - removed unnecessary initialization of 'ret' in probe() * [4/9] "ASoC: tegra: add Tegra210 based I2S driver" - removed unnecessary initialization of 'ret' in probe() - fixed indentation - added consistent bracing for if-else clauses - updated 'rx_fifo_th' type to 'unsigned int' - used BIT() macro for defines like '1 << {x}' in tegra210_i2s.h * [5/9] "ASoC: tegra: add Tegra210 based AHUB driver" - used of_device_get_match_data() to get 'soc_data' and removed explicit of_match_device() - used devm_platform_ioremap_resource() and removed explicit platform_get_resource() - fixed indentation for devm_snd_soc_register_component() - updated commit message - updated commit message to reflect compatible binding for Tegra186 and Tegra194. * [6/9] "ASoC: tegra: add Tegra186 based DSPK driver" - removed unnecessary initialization of 'ret' in probe() - updated 'max_th' to 'unsigned int' - shortened lengthy macro names to avoid wrapping in tegra186_dspk_wr_reg() and to be consistent * [7/9] "ASoC: tegra: add Tegra210 based ADMAIF driver" - used of_device_get_match_data() and removed explicit of_match_device() - used BIT() macro for defines like '1 << {x}' in tegra210_admaif.h - updated commit message to reflect compatible binding for Tegra186 and Tegra194. * [8/9] "arm64: tegra: add AHUB components for few Tegra chips" - no change * [9/9] "arm64: tegra: enable AHUB modules for few Tegra chips" - no change * common changes for patch [3/9] to [7/9] - sorted headers in alphabetical order - moved MODULE_DEVICE_TABLE() right below *_of_match table - removed macro DRV_NAME - removed explicit 'owner' field from platform_driver structure - added 'const' to snd_soc_dai_ops structure Sameer Pujar (11): ASoC: dt-bindings: tegra: Add DT bindings for Tegra210 ASoC: tegra: Add support for CIF programming ASoC: tegra: Add Tegra210 based DMIC driver ASoC: tegra: Add Tegra210 based I2S driver ASoC: tegra: Add Tegra210 based AHUB driver ASoC: tegra: Add Tegra186 based DSPK driver ASoC: tegra: Add Tegra210 based ADMAIF driver arm64: defconfig: Build AHUB component drivers arm64: defconfig: Build ADMA and ACONNECT driver arm64: tegra: Enable ACONNECT, ADMA and AGIC on Jetson Nano arm64: tegra: Add DT binding for AHUB components .../bindings/sound/nvidia,tegra186-dspk.yaml | 83 +++ .../bindings/sound/nvidia,tegra210-admaif.yaml | 111 +++ .../bindings/sound/nvidia,tegra210-ahub.yaml | 136 ++++ .../bindings/sound/nvidia,tegra210-dmic.yaml | 83 +++ .../bindings/sound/nvidia,tegra210-i2s.yaml | 101 +++ arch/arm64/boot/dts/nvidia/tegra186.dtsi | 217 +++++- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 225 +++++- arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 12 + arch/arm64/boot/dts/nvidia/tegra210.dtsi | 140 ++++ arch/arm64/configs/defconfig | 8 + sound/soc/tegra/Kconfig | 56 ++ sound/soc/tegra/Makefile | 10 + sound/soc/tegra/tegra186_dspk.c | 442 +++++++++++ sound/soc/tegra/tegra186_dspk.h | 70 ++ sound/soc/tegra/tegra210_admaif.c | 800 ++++++++++++++++++++ sound/soc/tegra/tegra210_admaif.h | 162 ++++ sound/soc/tegra/tegra210_ahub.c | 676 +++++++++++++++++ sound/soc/tegra/tegra210_ahub.h | 127 ++++ sound/soc/tegra/tegra210_dmic.c | 455 ++++++++++++ sound/soc/tegra/tegra210_dmic.h | 82 +++ sound/soc/tegra/tegra210_i2s.c | 812 +++++++++++++++++++++ sound/soc/tegra/tegra210_i2s.h | 126 ++++ sound/soc/tegra/tegra_cif.h | 65 ++ sound/soc/tegra/tegra_pcm.c | 235 +++++- sound/soc/tegra/tegra_pcm.h | 21 +- 25 files changed, 5251 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra186-dspk.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-admaif.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-ahub.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-dmic.yaml create mode 100644 Documentation/devicetree/bindings/sound/nvidia,tegra210-i2s.yaml create mode 100644 sound/soc/tegra/tegra186_dspk.c create mode 100644 sound/soc/tegra/tegra186_dspk.h create mode 100644 sound/soc/tegra/tegra210_admaif.c create mode 100644 sound/soc/tegra/tegra210_admaif.h create mode 100644 sound/soc/tegra/tegra210_ahub.c create mode 100644 sound/soc/tegra/tegra210_ahub.h create mode 100644 sound/soc/tegra/tegra210_dmic.c create mode 100644 sound/soc/tegra/tegra210_dmic.h create mode 100644 sound/soc/tegra/tegra210_i2s.c create mode 100644 sound/soc/tegra/tegra210_i2s.h create mode 100644 sound/soc/tegra/tegra_cif.h -- 2.7.4 commit 4d9e07cc41b837146ef39d99c8dad2a58326ae4a Merge: fc926a7c818c9 58ef60025a126 Author: Mark Brown Date: Mon Jul 20 15:34:31 2020 +0100 Merge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart : Small patchset to harden the SoundWire machine driver, change bad HIDs, update PLL settings and avoid memory leaks. Given that the SoundWire core parts are not upstream it's probably not necessary to provide the patches to stable branches. Bard Liao (1): ASoC: Intel: sof_sdw_rt711: remove hard-coded codec name Kai Vehmanen (2): ASoC: Intel: sof_sdw: add support for systems without i915 audio ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded Libin Yang (1): ASoC: Intel: common: change match table ehl-rt5660 Pierre-Louis Bossart (1): ASoC: Intel: sof_sdw_rt711: remove properties in card remove Yong Zhi (1): ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freq sound/soc/intel/boards/sof_rt5682.c | 9 +++++- sound/soc/intel/boards/sof_sdw.c | 31 +++++++++++++------ sound/soc/intel/boards/sof_sdw_common.h | 2 ++ sound/soc/intel/boards/sof_sdw_hdmi.c | 6 ++++ sound/soc/intel/boards/sof_sdw_rt711.c | 17 +++++++++- .../intel/common/soc-acpi-intel-ehl-match.c | 2 +- 6 files changed, 54 insertions(+), 13 deletions(-) base-commit: 22e9b54307987787efa0ee534aa9e31982ec1161 -- 2.25.1 commit fc926a7c818c97e98c5c2db1cb910523df0419e5 Author: Randy Dunlap Date: Sat Jul 18 17:33:07 2020 -0700 ASoC: soc-dai.h: drop a duplicated word Drop the repeated word "be" in a comment. Signed-off-by: Randy Dunlap Cc: Liam Girdwood Cc: Mark Brown Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20200719003307.21403-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 09e5209087294f444efa7af07442faf886fcc6b9 Author: Randy Dunlap Date: Sun Jul 19 11:09:01 2020 -0700 ASoC: wcd9335.h: fix duplicated word Fix the doubled word "in" in a comment by adding punctuation in 3 places and capitalization. Signed-off-by: Randy Dunlap Cc: Mark Brown Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20200719180901.30720-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit e1b4a53df26956620fc093219a725f44405db781 Author: Randy Dunlap Date: Sun Jul 19 11:09:12 2020 -0700 ASoC: tegra20_das.h: delete duplicated words Delete the doubled word "to" in two comments. Signed-off-by: Randy Dunlap Cc: Stephen Warren Cc: Mark Brown Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20200719180912.30770-1-rdunlap@infradead.org Signed-off-by: Mark Brown commit 23f8d964f15a21991a166f0d1a7cf3cf8e4bfc9b Author: Gustavo A. R. Silva Date: Fri Jul 17 16:55:00 2020 -0500 ASoC: Intel: Skylake: Avoid the use of one-element array One-element arrays are being deprecated[1]. Replace the one-element array with a simple value type 'u8 reserved'[2], once it seems this is just a placeholder for alignment. [1] https://github.com/KSPP/linux/issues/79 [2] https://github.com/KSPP/linux/issues/86 Signed-off-by: Gustavo A. R. Silva Tested-by: kernel test robot Reviewed-by: Amadeusz Sławiński Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/0-day/skylake-20200717.md Link: https://lore.kernel.org/r/20200717215500.GA13910@embeddedor Signed-off-by: Mark Brown commit 42348547cef0ecf3a79db255f10066ec8593be76 Author: Alexander A. Klimov Date: Sat Jul 18 14:08:07 2020 +0200 pinctl: ti: iodelay: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200718120807.19714-1-grandmaster@al2klimov.de Signed-off-by: Linus Walleij commit 327ef64702668bb754eeea80ce402454d7a1302a Author: Sameer Pujar Date: Sun Jul 19 10:31:25 2020 +0530 ASoC: tegra: Add Tegra186 based DSPK driver The Digital Speaker Controller (DSPK) converts the multi-bit Pulse Code Modulation (PCM) audio input to oversampled 1-bit Pulse Density Modulation (PDM) output. From the signal flow perpsective, the DSPK can be viewed as a PDM transmitter that up-samples the input to the desired sampling rate by interpolation then converts the oversampled PCM input to the desired 1-bit output via Delta Sigma Modulation (DSM). This patch registers DSPK component with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes DSPK interfaces, which can be used to connect different components in the ASoC layer. Makefile and Kconfig support is added to allow to build the driver. The DSPK devices can be enabled in the DT via "nvidia,tegra186-dspk" compatible binding. This driver can be used on Tegra194 chip as well. Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1595134890-16470-7-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 16e1bcc2caf446fa3e1daa040b59fd6f6272a766 Author: Sameer Pujar Date: Sun Jul 19 10:31:24 2020 +0530 ASoC: tegra: Add Tegra210 based AHUB driver The Audio Hub (AHUB) comprises a collection of hardware accelerators for audio pre/post-processing and a programmable full crossbar (XBAR) for routing audio data across these accelerators in time and in parallel. AHUB supports multiple interfaces to I2S, DSPK, DMIC etc., XBAR is a switch used to configure or modify audio routing between HW accelerators present inside AHUB. This patch registers AHUB component with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes AHUB interfaces, which can be used to connect different components in the ASoC layer. Currently the driver takes care of XBAR programming to allow audio data flow through various clients of the AHUB. Makefile and Kconfig support is added to allow to build the driver. The AHUB component can be enabled in the DT via below compatible bindings. - "nvidia,tegra210-ahub" for Tegra210 - "nvidia,tegra186-ahub" for Tegra186 and Tegra194 Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1595134890-16470-6-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit c0bfa98349d1796fe754dfac7f7f505bb60dcd83 Author: Sameer Pujar Date: Sun Jul 19 10:31:23 2020 +0530 ASoC: tegra: Add Tegra210 based I2S driver The Inter-IC Sound (I2S) controller implements full-duplex, bi-directional and single direction point to point serial interface. It can interface with I2S compatible devices. Tegra I2S controller can operate as both master and slave. This patch registers I2S controller with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes I2S interfaces, which can be used to connect different components in the ASoC layer. Makefile and Kconfig support is added to allow to build the driver. The I2S devices can be enabled in the DT via "nvidia,tegra210-i2s" compatible binding. Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1595134890-16470-5-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 8c8ff982e9e2b2eb9255fc393f938915b0ddc127 Author: Sameer Pujar Date: Sun Jul 19 10:31:22 2020 +0530 ASoC: tegra: Add Tegra210 based DMIC driver The Digital MIC (DMIC) Controller is used to interface with Pulse Density Modulation (PDM) input devices. The DMIC controller implements a converter to convert PDM signals to Pulse Code Modulation (PCM) signals. From signal flow perspective, the DMIC can be viewed as a PDM receiver. This patch registers DMIC component with ASoC framework. The component driver exposes DAPM widgets, routes and kcontrols for the device. The DAI driver exposes DMIC interfaces, which can be used to connect different components in the ASoC layer. Makefile and Kconfig support is added to allow to build the driver. The DMIC devices can be enabled in the DT via "nvidia,tegra210-dmic" compatible string. This driver can be used for Tegra186 and Tegra194 chips as well. Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1595134890-16470-4-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 1c3b89fb7e4a78ddcd627e3f218a216e2136ae9b Author: Sameer Pujar Date: Sun Jul 19 10:31:21 2020 +0530 ASoC: tegra: Add support for CIF programming Audio Client Interface (CIF) is a proprietary interface employed to route audio samples through Audio Hub (AHUB) components by inter connecting the various modules. This patch exports an inline function tegra_set_cif() which can be used, for now, to program CIF on Tegra210 and later Tegra generations. Later it can be extended to include helpers for legacy chips as well. Signed-off-by: Sameer Pujar Reviewed-by: Jon Hunter Reviewed-by: Dmitry Osipenko Link: https://lore.kernel.org/r/1595134890-16470-3-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit 665308c0b44a37339b9b3368f1dd61eb66acde87 Author: Sameer Pujar Date: Sun Jul 19 10:31:20 2020 +0530 ASoC: dt-bindings: tegra: Add DT bindings for Tegra210 This patch adds YAML schema for DT binding of AHUB and few of its following components. These devices will be registered as ASoC components and binding will be used on Tegra210 and later chips. * ADMAIF * I2S * DMIC * DSPK DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1595134894; bh=DX96zRQRNplPikN828HbAfbjGumAn9IgtktrsenKjgk=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=IhfGFjMxsnRHso1Ku2GEGC+mtLCy3AbRKPfgTS56XGqEWquUr/1s8n9tFpriqF7a+ tJGrTN9mKhRQGrwdey/AHsMY4Tbm4fKEWxIASgAV/lFPCfgP3BnVjEdHclc7FdBaB0 Qvd3zs8HFsgoIzksLrtHNMrUepkeZajn0/XnC7nghGDRim4+6Hauupr5kj/KVlihsS KS1YQ2Zz9TZzLaC5QXALiHj3ATLvBFrmIf6Vj19q7hePt0menTZVzQNy+y3h4xZfLH +OvBCsLgHGGhq+iM9rm64D+S5Op2vCslwq3Q/42TnYZ0vDbD7aA9nTAQzfYeI6HK6b vi7eYbryzCTSg== Signed-off-by: Sameer Pujar Link: https://lore.kernel.org/r/1595134890-16470-2-git-send-email-spujar@nvidia.com Signed-off-by: Mark Brown commit edee3bc6589484ec8c32b04c3b83497acfa6102f Author: Linus Walleij Date: Fri Jul 17 16:40:40 2020 +0200 gpio: pca953x: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Tested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Cc: Andy Shevchenko Cc: Marek Vasut Cc: Uwe Kleine-König Cc: Adam Ford Cc: Vignesh Raghavendra Link: https://lore.kernel.org/r/20200717144040.63253-1-linus.walleij@linaro.org commit 75dec56710dfafd37daa95e756c5d1840932ba90 Author: Drew Fustini Date: Fri Jul 17 21:40:43 2020 +0200 gpio: omap: handle pin config bias flags Modify omap_gpio_set_config() to handle pin config bias flags by calling gpiochip_generic_config(). The pin group for the gpio line must have the corresponding pinconf properties: PIN_CONFIG_BIAS_PULL_UP requires "pinctrl-single,bias-pullup" PIN_CONFIG_BIAS_PULL_DOWN requires "pinctrl-single,bias-pulldown" This is necessary for pcs_pinconf_set() to find the requested bias parameter in the PIN_MAP_TYPE_CONFIGS_GROUP pinctrl map. Signed-off-by: Drew Fustini Signed-off-by: Linus Walleij Acked-by: Grygorii Strashko Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20200715213738.1640030-1-drew@beagleboard.org Link: https://lore.kernel.org/r/20200717194043.1774643-1-drew@beagleboard.org commit 3762442af6ad914b537f444f3d4672af7685ab2e Author: Linus Walleij Date: Mon Jul 20 16:00:43 2020 +0200 Revert "gpio: omap: handle pin config bias flags" This reverts commit 40e30d26d909af89de2dcd0b4abdd27c47ac2235. I applied the patch to the wrong tree, oooups. Also there is a new version of it. Revert it out of pinctrl and apply to the gpio tree. Signed-off-by: Linus Walleij commit 50787be3ad732d804ee3ce828ee83b725e6491c8 Author: Linus Walleij Date: Fri Jul 17 16:48:35 2020 +0200 gpio: pcf857x: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Cc: Geert Uytterhoeven Cc: Anders Darander Cc: Roger Quadros Link: https://lore.kernel.org/r/20200717144835.68150-1-linus.walleij@linaro.org commit 14110af606965ce07abe4d121c100241c2e73b86 Author: Tiezhu Yang Date: Sat Jul 18 17:39:36 2020 +0800 PCI: loongson: Use DECLARE_PCI_FIXUP_EARLY for bridge_class_quirk() According to the datasheet of Loongson LS7A bridge chip, the old version of Loongson LS7A PCIE port has a wrong value about PCI class which is 0x060000, the correct value should be 0x060400, this bug can be fixed by "dev->class = PCI_CLASS_BRIDGE_PCI << 8;" at the software level and it was fixed in hardware in the latest LS7A versions. In order to maintain downward compatibility, use DECLARE_PCI_FIXUP_EARLY instead of DECLARE_PCI_FIXUP_HEADER for bridge_class_quirk() to fix it as early as possible. Otherwise, in the function pci_setup_device(), the related code about "dev->class" such as "class = dev->class >> 8;" and "dev->transparent = ((dev->class & 0xff) == 1);" maybe get wrong value without EARLY fixup. Link: https://lore.kernel.org/r/1595065176-460-1-git-send-email-yangtiezhu@loongson.cn Fixes: 1f58cca5cf2b ("PCI: Add Loongson PCI Controller support") Signed-off-by: Tiezhu Yang Signed-off-by: Lorenzo Pieralisi commit dfc3a26deb5c55db5d774b6ed83f6505285deb62 Author: Linus Walleij Date: Thu Jul 16 17:05:02 2020 +0200 gpio: adp5588: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Acked-by: Michael Hennerich Cc: Nikolaus Voss Cc: Michael Hennerich Link: https://lore.kernel.org/r/20200716150502.195821-1-linus.walleij@linaro.org commit 1d27a0be16d6c95fd71deef34e94b40cb4411cc9 Author: Adrian Reber Date: Sun Jul 19 12:04:17 2020 +0200 selftests: add clone3() CAP_CHECKPOINT_RESTORE test This adds a test that changes its UID, uses capabilities to get CAP_CHECKPOINT_RESTORE and uses clone3() with set_tid to create a process with a given PID as non-root. Signed-off-by: Adrian Reber Link: https://lore.kernel.org/r/20200719100418.2112740-8-areber@redhat.com [christian.brauner@ubuntu.com: use TH_LOG() instead of ksft_print_msg()] Signed-off-by: Christian Brauner commit c4429556646edd7f557e1b6451e0b14b832634d3 Author: Gustavo A. R. Silva Date: Thu Jul 16 16:23:17 2020 -0500 pinctrl: single: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200716212317.GA17754@embeddedor Signed-off-by: Linus Walleij commit 1586f556ca90668f096284bc12cd3e311f5a04dc Author: Gustavo A. R. Silva Date: Thu Jul 16 16:22:13 2020 -0500 pinctrl: qcom: spmi-gpio: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200716212213.GA17623@embeddedor Signed-off-by: Linus Walleij commit 468ae359818e634a3bc352605a04bbfe3ea0f5a1 Merge: ba3548cf29616 58ef60025a126 Author: Mark Brown Date: Mon Jul 20 14:36:19 2020 +0100 Merge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart : Small patchset to harden the SoundWire machine driver, change bad HIDs, update PLL settings and avoid memory leaks. Given that the SoundWire core parts are not upstream it's probably not necessary to provide the patches to stable branches. Bard Liao (1): ASoC: Intel: sof_sdw_rt711: remove hard-coded codec name Kai Vehmanen (2): ASoC: Intel: sof_sdw: add support for systems without i915 audio ASoC: Intel: sof_sdw: avoid crash if invalid DSP topology loaded Libin Yang (1): ASoC: Intel: common: change match table ehl-rt5660 Pierre-Louis Bossart (1): ASoC: Intel: sof_sdw_rt711: remove properties in card remove Yong Zhi (1): ASoC: intel: board: sof_rt5682: Update rt1015 pll input clk freq sound/soc/intel/boards/sof_rt5682.c | 9 +++++- sound/soc/intel/boards/sof_sdw.c | 31 +++++++++++++------ sound/soc/intel/boards/sof_sdw_common.h | 2 ++ sound/soc/intel/boards/sof_sdw_hdmi.c | 6 ++++ sound/soc/intel/boards/sof_sdw_rt711.c | 17 +++++++++- .../intel/common/soc-acpi-intel-ehl-match.c | 2 +- 6 files changed, 54 insertions(+), 13 deletions(-) base-commit: 22e9b54307987787efa0ee534aa9e31982ec1161 -- 2.25.1 commit ba3548cf29616b58c93bbaffc3d636898d009858 Author: Hauke Mehrtens Date: Fri Jul 17 23:56:48 2020 +0200 spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM The lantiq-ssc driver uses internally an own workqueue to wait till the data is not only written out of the FIFO but really written to the wire. This workqueue is flushed while the SPI subsystem is working in some other system workqueue. The system workqueue is marked as WQ_MEM_RECLAIM, but the workqueue in the lantiq-ssc driver does not use WQ_MEM_RECLAIM for now. Add this flag too to prevent this warning. This fixes the following warning: [ 2.975956] WARNING: CPU: 1 PID: 17 at kernel/workqueue.c:2614 check_flush_dependency+0x168/0x184 [ 2.984752] workqueue: WQ_MEM_RECLAIM kblockd:blk_mq_run_work_fn is flushing !WQ_MEM_RECLAIM 1e100800.spi:0x0 Fixes: 891b7c5fbf61 ("mtd_blkdevs: convert to blk-mq") Signed-off-by: Hauke Mehrtens Link: https://lore.kernel.org/r/20200717215648.20522-1-hauke@hauke-m.de Signed-off-by: Mark Brown commit 565a0e9ab8131a00f3317998722b9c0d67d7e016 Author: Linus Walleij Date: Thu Jul 16 14:03:18 2020 +0200 gpio: adnp: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Cc: Roland Stigge Cc: Lars Poeschel Link: https://lore.kernel.org/r/20200716120318.127176-1-linus.walleij@linaro.org commit 9745079609dfa14c8d88f88d06d7e720b0f29acd Author: Linus Walleij Date: Thu Jul 16 12:06:38 2020 +0200 gpio: stmpe: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Cc: Patrice Chotard Cc: Alexandre TORGUE Link: https://lore.kernel.org/r/20200716100638.112451-1-linus.walleij@linaro.org commit 0fcfd9aa61034ac6f0352520379927bfc6576f1c Author: Linus Walleij Date: Thu Jul 16 11:34:59 2020 +0200 gpio: tc35892: Use irqchip template This makes the driver use the irqchip template to assign properties to the gpio_irq_chip instead of using the explicit calls to gpiochip_irqchip_add_nested() and gpiochip_set_nested_irqchip(). The irqchip is instead added while adding the gpiochip. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200716093459.76378-1-linus.walleij@linaro.org commit bc6b31c53ce895977841598721f8daeabc070ced Author: Chen-Yu Tsai Date: Sat Jul 18 00:00:53 2020 +0800 arm64: dts: allwinner: h5: bananapi-m2-plus-v1.2: Tie in CPU OPPs The Bananapi M2 Plus H5 v1.2 can work with the standard H5 OPPs. Tie them in to enable CPU frequency scaling. The original Bananapi M2 Plus H5 is left out for now, as adding the fixed regulator along with the enable pin seemed to cause some glitching in Linux. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200717160053.31191-9-wens@kernel.org commit c4118403d1c95bbb4a23526dece7eadcbe96e061 Author: Chen-Yu Tsai Date: Sat Jul 18 00:00:52 2020 +0800 arm64: dts: allwinner: h5: libretech-all-h3-cc: Tie in CPU OPPs The Libre Computer ALL-H3-CC H5 variant can work with the standard H5 OPPs. Tie them in to enable CPU frequency scaling. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200717160053.31191-8-wens@kernel.org commit 7240598ba4e6c477c6809dc019505cf366fdb7c0 Author: Chen-Yu Tsai Date: Sat Jul 18 00:00:51 2020 +0800 arm64: dts: allwinner: h5: Add CPU Operating Performance Points table Add an OPP (Operating Performance Points) table for the CPU cores for boards to include to DVFS (Dynamic Voltage & Frequency Scaling) on the H5. The table originates from Armbian, but the maximum voltage is raised slightly to account for boards using slightly higher voltages. The table and tie in to the CPU cores are put in a separate dtsi file that board files can include to opt in. Or they can define their own tables if the standard one does not fit. This has been tested on the Libre Computer ALL-H3-CC-H5 and the Bananapi M2+ v1.2 H5, both with adequate cooling. The former has a fixed 1.2V regulator, while the latter has a GPIO controlled regulator switchable between 1.1V and 1.3V. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200717160053.31191-7-wens@kernel.org commit d04f7bc8842c0d9951a5740480f864a4f82d6b63 Author: Chen-Yu Tsai Date: Sat Jul 18 00:00:50 2020 +0800 arm64: dts: allwinner: h5: Add trip and cooling maps to CPU thermal zones This enables passive cooling by down-regulating CPU voltage and frequency. The trip points were copied from the H3. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200717160053.31191-6-wens@kernel.org commit 5fa21c1354c93cb9fe8239545b17eee46e39dd69 Author: Chen-Yu Tsai Date: Sat Jul 18 00:00:49 2020 +0800 arm64: dts: allwinner: h5: Add clock to CPU cores The ARM CPU cores are fed by the CPU clock from the CCU. Add a reference to the clock for each CPU core, along with the clock transition latency. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200717160053.31191-5-wens@kernel.org commit e4dae01bf08b754de79072441c357737220b873f Author: Chen-Yu Tsai Date: Sat Jul 18 00:00:48 2020 +0800 ARM: dts: sunxi: bananapi-m2-plus-v1.2: Fix CPU supply voltages The Bananapi M2+ uses a GPIO line to change the effective resistance of the CPU supply regulator's feedback resistor network. The voltages described in the device tree were given directly by the vendor. This turns out to be slightly off compared to the real values. The updated voltages are based on calculations of the feedback resistor network, and verified down to three decimal places with a multi-meter. Fixes: 6eeb4180d4b9 ("ARM: dts: sunxi: h3-h5: Add Bananapi M2+ v1.2 device trees") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200717160053.31191-4-wens@kernel.org commit 55b271af765b0e03d1ff29502f81644b1a3c87fd Author: Chen-Yu Tsai Date: Sat Jul 18 00:00:47 2020 +0800 ARM: dts: sunxi: bananapi-m2-plus-v1.2: Add regulator supply to all CPU cores The device tree currently only assigns the a supply for the first CPU core, when in reality the regulator supply is shared by all four cores. This might cause an issue if the implementation does not realize the sharing of the supply. Assign the same regulator supply to the remaining CPU cores to address this. Fixes: 6eeb4180d4b9 ("ARM: dts: sunxi: h3-h5: Add Bananapi M2+ v1.2 device trees") Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200717160053.31191-3-wens@kernel.org commit 82e935721f9db48cd0faca47da348496eeab28ff Author: Chen-Yu Tsai Date: Sat Jul 18 00:00:46 2020 +0800 ARM: dts: sunxi: libretech-all-h3-cc: Add regulator supply to all CPU cores The device tree currently only assigns the a supply for the first CPU core, when in reality the regulator supply is shared by all four cores. This might cause an issue if the implementation does not realize the sharing of the supply. Assign the same regulator supply to the remaining CPU cores to address this. Signed-off-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200717160053.31191-2-wens@kernel.org commit 58ef60025a1263e78de01b135d05784996383611 Author: Libin Yang Date: Fri Jul 17 16:13:37 2020 -0500 ASoC: Intel: common: change match table ehl-rt5660 This configuration is for EHL with the RT5660 codec. RT5660 should use "10EC5660" ID instead of "INTC1027". Signed-off-by: Libin Yang Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20200717211337.31956-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 408a85e31e3e5127c91e082c3544082ef1ba48d3 Author: Markus Elfring Date: Sun Apr 5 11:01:49 2020 +0200 drm/imx: imx-tve: Delete an error message in imx_tve_bind() The function “platform_get_irq” can log an error already. Thus omit a redundant message for the exception handling in the calling function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Signed-off-by: Philipp Zabel commit dd81d821d0b3f77d949d0cac5c05c1f05b921d46 Author: Steve Longerbeam Date: Thu Jun 25 11:13:37 2020 -0700 gpu: ipu-v3: image-convert: Wait for all EOFs before completing a tile Use a bit-mask of EOF irqs to determine when all required idmac channel EOFs have been received for a tile conversion, and only do tile completion processing after all EOFs have been received. Otherwise it was found that a conversion would stall after the completion of a tile and the start of the next tile, because the input/read idmac channel had not completed and entered idle state, thus locking up the channel when attempting to re-start it for the next tile. Fixes: 0537db801bb01 ("gpu: ipu-v3: image-convert: reconfigure IC per tile") Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel commit 0f6245f42ce9b7e4d20f2cda8d5f12b55a44d7d1 Author: Steve Longerbeam Date: Wed Jun 17 15:40:37 2020 -0700 gpu: ipu-v3: image-convert: Combine rotate/no-rotate irq handlers Combine the rotate_irq() and norotate_irq() handlers into a single eof_irq() handler. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel commit 22b2cfad752d4b278ea7c38c0ee961ca50198ce8 Author: Steve Longerbeam Date: Wed Jun 17 15:40:36 2020 -0700 gpu: ipu-v3: Restore RGB32, BGR32 RGB32 and BGR32 formats were inadvertently removed from the switch statement in ipu_pixelformat_to_colorspace(). Restore them. Fixes: a59957172b0c ("gpu: ipu-v3: enable remaining 32-bit RGB V4L2 pixel formats") Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel commit 3b2a999582c467d1883716b37ffcc00178a13713 Author: Liu Ying Date: Thu Jul 9 10:28:52 2020 +0800 drm/imx: imx-ldb: Disable both channels for split mode in enc->disable() Both of the two LVDS channels should be disabled for split mode in the encoder's ->disable() callback, because they are enabled in the encoder's ->enable() callback. Fixes: 6556f7f82b9c ("drm: imx: Move imx-drm driver out of staging") Cc: Philipp Zabel Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: NXP Linux Team Cc: Signed-off-by: Liu Ying Signed-off-by: Philipp Zabel commit 853fe4fc757246a2da6258f1dd249e71a1bd14fd Author: Marco Felsch Date: Wed Nov 20 17:54:59 2019 +0100 drm/imx: parallel-display: move panel/bridge detection to fail early We do some string parsing and string comparison in front of drm_of_find_panel_or_bridge(). All this work is useless if the call fails. Move drm_of_find_panel_or_bridge() infront of the parsing work to fail early. Signed-off-by: Marco Felsch Reviewed-by: Philipp Zabel Signed-off-by: Philipp Zabel commit 8e91cbb820981a8a51be55499f860b1968308960 Author: Marco Felsch Date: Thu Nov 21 17:55:09 2019 +0100 drm/imx: imx-ldb: remove useless enum Since commit 5e501ed7253b ("drm/imx: imx-ldb: allow to determine bus format from the connected panel") the enum isn't used anymore. Drop it to cleanup the code a bit. Signed-off-by: Marco Felsch Reviewed-by: Philipp Zabel Signed-off-by: Philipp Zabel commit 816df9447ec2bca5ff56ee157f4f706a7a614300 Author: Marco Felsch Date: Thu Nov 21 14:47:43 2019 +0100 drm/imx: drop useless best_encoder callback The best_encoder() callback is used by the drm-core to find an encoder if the connector is connected to multiple encoders but the parallel, tve and ldb uses always the 1-encoder : 1-connector setup. Such a simple setup can be handled by the drm-core. Signed-off-by: Marco Felsch Reviewed-by: Philipp Zabel Signed-off-by: Philipp Zabel commit 7bb58b987fee26da2a1665c01033022624986b7c Author: Marco Felsch Date: Thu Jun 11 14:43:32 2020 +0200 drm/imx: tve: fix regulator_disable error path Add missing regulator_disable() as devm_action to avoid dedicated unbind() callback and fix the missing error handling. Fixes: fcbc51e54d2a ("staging: drm/imx: Add support for Television Encoder (TVEv2)") Signed-off-by: Marco Felsch Signed-off-by: Philipp Zabel commit dbd1d67d9201ee1eeb770a4fa4459fa76018192f Author: Marek Vasut Date: Mon Mar 9 21:18:33 2020 +0100 drm/imx: parallel-display: Adjust bus_flags handling The bus_flags handling logic does not seem to cover all potential usecases. Specifically, this seems to fail with an "edt,etm0700g0edh6" display attached to an 24bit display interface, with interface-pix-fmt = "rgb24" set in DT. This patch fixes the problem by overriding the imx_crtc_state->bus_flags from the imxpd->bus_flags only if the DT property "interface-pix-fmt" is present or if the DI provides no formats. Signed-off-by: Marek Vasut Signed-off-by: Philipp Zabel commit ba807c94f67fd64b3051199810d9e4dd209fdc00 Author: Philipp Zabel Date: Thu Jun 11 14:43:31 2020 +0200 drm/imx: fix use after free Component driver structures allocated with devm_kmalloc() in bind() are freed automatically after unbind(). Since the contained drm structures are accessed afterwards in drm_mode_config_cleanup(), move the allocation into probe() to extend the driver structure's lifetime to the lifetime of the device. This should eventually be changed to use drm resource managed allocations with lifetime of the drm device. We also need to ensure that all componets are available during the unbind() so we need to call component_unbind_all() before we free non-devres resources like planes. Note this patch fixes the the use after free bug but introduces a possible boot loop issue. The issue is triggered if the HDMI support is enabled and a component driver always return -EPROBE_DEFER, see discussion [1] for more details. [1] https://lkml.org/lkml/2020/3/24/1467 Fixes: 17b5001b5143 ("imx-drm: convert to componentised device support") Signed-off-by: Philipp Zabel [m.felsch@pengutronix: fix imx_tve_probe()] [m.felsch@pengutronix: resort component_unbind_all()) [m.felsch@pengutronix: adapt commit message] Signed-off-by: Marco Felsch Signed-off-by: Philipp Zabel commit 3c8387d234f75887a2d78972ab0f764fe9f756e4 Author: Andy Shevchenko Date: Mon Jun 22 10:53:55 2020 +0300 uuid: remove unused uuid_le_to_bin() definition There is no more user, so remove it. Signed-off-by: Andy Shevchenko Signed-off-by: Christoph Hellwig commit e0d8e991be641ba0034c67785bf86f6c097869d6 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:42 2020 +0530 powerpc/book3s64/kuap: Move UAMOR setup to key init function UAMOR values are not application-specific. The kernel initializes its value based on different reserved keys. Remove the thread-specific UAMOR value and don't switch the UAMOR on context switch. Move UAMOR initialization to key initialization code and remove thread_struct.uamor because it is not used anymore. Before commit: 4a4a5e5d2aad ("powerpc/pkeys: key allocation/deallocation must not change pkey registers") we used to update uamor based on key allocation and free. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-20-aneesh.kumar@linux.ibm.com commit 000a42b35a54372597f0657f6b9875b38c641864 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:41 2020 +0530 powerpc/book3s64/keys/kuap: Reset AMR/IAMR values on kexec As we kexec across kernels that use AMR/IAMR for different purposes we need to ensure that new kernels get kexec'd with a reset value of AMR/IAMR. For ex: the new kernel can use key 0 for kernel mapping and the old AMR value prevents access to key 0. This patch also removes reset if IAMR and AMOR in kexec_sequence. Reset of AMOR is not needed and the IAMR reset is partial (it doesn't do the reset on secondary cpus) and is redundant with this patch. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-19-aneesh.kumar@linux.ibm.com commit 7cdd3745f2d75aecc2b61368e2563ae54bfac59a Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:40 2020 +0530 powerpc/book3s64/keys: Print information during boot. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-18-aneesh.kumar@linux.ibm.com commit f7045a45115b17fe695ea7075f5213706f202edb Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:39 2020 +0530 powerpc/book3s64/pkeys: Use MMU_FTR_PKEY instead of pkey_disabled static key Instead of pkey_disabled static key use mmu feature MMU_FTR_PKEY. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-17-aneesh.kumar@linux.ibm.com commit 2daf298de728dc37f32d0749fa4f59db36fa7d96 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:38 2020 +0530 powerpc/book3s64/pkeys: Use pkey_execute_disable_supported Use pkey_execute_disable_supported to check for execute key support instead of pkey_disabled. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-16-aneesh.kumar@linux.ibm.com commit e10cc8715d180509a367d3ab25d40e4a1612cb2f Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:37 2020 +0530 powerpc/book3s64/kuep: Add MMU_FTR_KUEP This will be used to enable/disable Kernel Userspace Execution Prevention (KUEP). Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-15-aneesh.kumar@linux.ibm.com commit d3cd91fb8d2e202cf8ebb6f271898aaf37ecda8f Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:36 2020 +0530 powerpc/book3s64/pkeys: Add MMU_FTR_PKEY Parse storage keys related device tree entry in early_init_devtree and enable MMU feature MMU_FTR_PKEY if pkeys are supported. MMU feature is used instead of CPU feature because this enables us to group MMU_FTR_KUAP and MMU_FTR_PKEY in asm feature fixup code. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-14-aneesh.kumar@linux.ibm.com commit 3e4352aeb8b17eb1040ba288f586620e8294389d Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:35 2020 +0530 powerpc/book3s64/pkeys: Mark all the pkeys above max pkey as reserved The hypervisor can return less than max allowed pkey (for ex: 31) instead of 32. We should mark all the pkeys above max allowed as reserved so that we avoid the allocation of the wrong pkey(for ex: key 31 in the above case) by userspace. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-13-aneesh.kumar@linux.ibm.com commit 3c8ab47362fe9a74f61b48efe957666a423c55a2 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:34 2020 +0530 powerpc/book3s64/pkeys: Make initial_allocation_mask static initial_allocation_mask is not used outside this file. Also mark reserved_allocation_mask and initial_allocation_mask __ro_after_init; Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-12-aneesh.kumar@linux.ibm.com commit c529afd7cbc71ae1dc44a31efc7c1c9db3c3a143 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:33 2020 +0530 powerpc/book3s64/pkeys: Convert pkey_total to num_pkey num_pkey now represents max number of keys supported such that we return to userspace 0 - num_pkey - 1. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-11-aneesh.kumar@linux.ibm.com commit a4678d4b477c3d2901f101986ca01406f3b7eaea Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:32 2020 +0530 powerpc/book3s64/pkeys: Simplify pkey disable branch Make the default value FALSE (pkey enabled) and set to TRUE when we find the total number of keys supported to be zero. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-10-aneesh.kumar@linux.ibm.com commit a24204c307962214996627e3f4caa8772b9b0cf4 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:31 2020 +0530 powerpc/book3s64/pkeys: kill cpu feature key CPU_FTR_PKEY We don't use CPU_FTR_PKEY anymore. Remove the feature bit and mark it free. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-9-aneesh.kumar@linux.ibm.com commit 718d9b380174eb8fe16d67769395737b79654a02 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:30 2020 +0530 powerpc/book3s64/pkeys: Prevent key 1 modification from userspace. Key 1 is marked reserved by ISA. Setup uamor to prevent userspace modification of the same. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-8-aneesh.kumar@linux.ibm.com commit f491fe3fb41eafc7a159874040e032ad41ade210 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:29 2020 +0530 powerpc/book3s64/pkeys: Simplify the key initialization Add documentation explaining the execute_only_key. The reservation and initialization mask details are also explained in this patch. No functional change in this patch. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-7-aneesh.kumar@linux.ibm.com commit 1f404058e2911afe08417ef82f17aba6adccfc63 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:28 2020 +0530 powerpc/book3s64/pkeys: Explain key 1 reservation details This explains the details w.r.t key 1. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-6-aneesh.kumar@linux.ibm.com commit ee8b39331f89950b0a011c7965db5694f0153166 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:27 2020 +0530 powerpc/book3s64/pkeys: Move pkey related bits in the linux page table To keep things simple, all the pkey related bits are kept together in linux page table for 64K config with hash translation. With hash-4k kernel requires 4 bits to store slots details. This is done by overloading some of the RPN bits for storing the slot details. Due to this PKEY_BIT0 on the 4K config is used for storing hash slot details. 64K before |....|RSV1| RSV2| RSV3 | RSV4 | RPN44| RPN43 |.... | RSV5| |....| P4 | P3 | P2 | P1 | Busy | HASHPTE |.... | P0 | after |....|RSV1| RSV2| RSV3 | RSV4 | RPN44 | RPN43 |.... | RSV5 | |....| P4 | P3 | P2 | P1 | P0 | HASHPTE |.... | Busy | 4k before |....| RSV1 | RSV2 | RSV3 | RSV4 | RPN44| RPN43.... | RSV5| |....| Busy | HASHPTE | P2 | P1 | F_SEC| F_GIX.... | P0 | after |....| RSV1 | RSV2| RSV3 | RSV4 | Free | RPN43.... | RSV5 | |....| HASHPTE | P2 | P1 | P0 | F_SEC| F_GIX.... | BUSY | Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-5-aneesh.kumar@linux.ibm.com commit b9658f83e721ddfcee3e08b16a6628420de424c3 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:26 2020 +0530 powerpc/book3s64/pkeys: pkeys are supported only on hash on book3s. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-4-aneesh.kumar@linux.ibm.com commit 33699023f51f96ac9be38747e64967ea05e00bab Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:25 2020 +0530 powerpc/book3s64/pkeys: Fixup bit numbering This number the pkey bit such that it is easy to follow. PKEY_BIT0 is the lower order bit. This makes further changes easy to follow. No functional change in this patch other than linux page table for hash translation now maps pkeys differently. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-3-aneesh.kumar@linux.ibm.com commit d79e7a5f26f1d179cbb915a8bf2469b6d7431c29 Author: Aneesh Kumar K.V Date: Thu Jul 9 08:59:24 2020 +0530 powerpc/book3s64/pkeys: Use PVR check instead of cpu feature We are wrongly using CPU_FTRS_POWER8 to check for P8 support. Instead, we should use PVR value. Now considering we are using CPU_FTRS_POWER8, that implies we returned true for P9 with older firmware. Keep the same behavior by checking for P9 PVR value. Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709032946.881753-2-aneesh.kumar@linux.ibm.com commit 85343a8da2d969df1a10ada8f7cb857d52ea70a6 Author: Santosh Sivaraj Date: Thu Jul 9 19:21:42 2020 +0530 powerpc/papr/scm: Add bad memory ranges to nvdimm bad ranges Subscribe to the MCE notification and add the physical address which generated a memory error to nvdimm bad range. Signed-off-by: Santosh Sivaraj Reviewed-by: Mahesh Salgaonkar Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709135142.721504-2-santosh@fossix.org commit c37a63afc429ce959402168f67e4f094ab639ace Author: Santosh Sivaraj Date: Thu Jul 9 19:21:41 2020 +0530 powerpc/mce: Add MCE notification chain Introduce notification chain which lets us know about uncorrected memory errors(UE). This would help prospective users in pmem or nvdimm subsystem to track bad blocks for better handling of persistent memory allocations. Signed-off-by: Santosh Sivaraj Signed-off-by: Ganesh Goudar Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709135142.721504-1-santosh@fossix.org commit af9d00e93a4f062c5f160325d7b8f33336f6744e Author: Aneesh Kumar K.V Date: Thu Jul 9 18:49:25 2020 +0530 powerpc/mm/radix: Create separate mappings for hot-plugged memory To enable memory unplug without splitting kernel page table mapping, we force the max mapping size to the LMB size. LMB size is the unit in which hypervisor will do memory add/remove operation. Pseries systems supports max LMB size of 256MB. Hence on pseries, we now end up mapping memory with 2M page size instead of 1G. To improve that we want hypervisor to hint the kernel about the hotplug memory range. That was added that as part of commit b6eca183e23e ("powerpc/kernel: Enables memory hot-remove after reboot on pseries guests") But PowerVM doesn't provide that hint yet. Once we get PowerVM updated, we can then force the 2M mapping only to hot-pluggable memory region using memblock_is_hotpluggable(). Till then let's depend on LMB size for finding the mapping page size for linear range. With this change KVM guest will also be doing linear mapping with 2M page size. The actual TLB benefit of mapping guest page table entries with hugepage size can only be materialized if the partition scoped entries are also using the same or higher page size. A guest using 1G hugetlbfs backing guest memory can have a performance impact with the above change. Signed-off-by: Bharata B Rao Signed-off-by: Aneesh Kumar K.V [mpe: Fold in fix from Aneesh spotted by lkp@intel.com] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709131925.922266-5-aneesh.kumar@linux.ibm.com commit d6d6ebfc5dbb4008be21baa4ec2ad45606578966 Author: Bharata B Rao Date: Thu Jul 9 18:49:24 2020 +0530 powerpc/mm/radix: Remove split_kernel_mapping() We split the page table mapping on memory unplug if the linear range was mapped with huge page mapping (for ex: 1G) The page table splitting code has a few issues: 1. Recursive locking -------------------- Memory unplug path takes cpu_hotplug_lock and calls stop_machine() for splitting the mappings. However stop_machine() takes cpu_hotplug_lock again causing deadlock. 2. BUG: sleeping function called from in_atomic() context --------------------------------------------------------- Memory unplug path (remove_pagetable) takes init_mm.page_table_lock spinlock and later calls stop_machine() which does wait_for_completion() 3. Bad unlock unbalance ----------------------- Memory unplug path takes init_mm.page_table_lock spinlock and calls stop_machine(). The stop_machine thread function runs in a different thread context (migration thread) which tries to release and reaquire ptl. Releasing ptl from a different thread than which acquired it causes bad unlock unbalance. These problems can be avoided if we avoid mapping hot-plugged memory with 1G mapping, thereby removing the need for splitting them during unplug. The kernel always make sure the minimum unplug request is SUBSECTION_SIZE for device memory and SECTION_SIZE for regular memory. In preparation for such a change remove page table splitting support. This essentially is a revert of commit 4dd5f8a99e791 ("powerpc/mm/radix: Split linear mapping on hot-unplug") Signed-off-by: Bharata B Rao Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709131925.922266-4-aneesh.kumar@linux.ibm.com commit 9ce8853b4a735c8115f55ac0e9c2b27a4c8f80b5 Author: Bharata B Rao Date: Thu Jul 9 18:49:23 2020 +0530 powerpc/mm/radix: Free PUD table when freeing pagetable remove_pagetable() isn't freeing PUD table. This causes memory leak during memory unplug. Fix this. Fixes: 4b5d62ca17a1 ("powerpc/mm: add radix__remove_section_mapping()") Signed-off-by: Bharata B Rao Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709131925.922266-3-aneesh.kumar@linux.ibm.com commit 645d5ce2f7d6cb4dcf6a4e087fb550e238d24283 Author: Aneesh Kumar K.V Date: Thu Jul 9 18:49:22 2020 +0530 powerpc/mm/radix: Fix PTE/PMD fragment count for early page table mappings We can hit the following BUG_ON during memory unplug: kernel BUG at arch/powerpc/mm/book3s64/pgtable.c:342! Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries NIP [c000000000093308] pmd_fragment_free+0x48/0xc0 LR [c00000000147bfec] remove_pagetable+0x578/0x60c Call Trace: 0xc000008050000000 (unreliable) remove_pagetable+0x384/0x60c radix__remove_section_mapping+0x18/0x2c remove_section_mapping+0x1c/0x3c arch_remove_memory+0x11c/0x180 try_remove_memory+0x120/0x1b0 __remove_memory+0x20/0x40 dlpar_remove_lmb+0xc0/0x114 dlpar_memory+0x8b0/0xb20 handle_dlpar_errorlog+0xc0/0x190 pseries_hp_work_fn+0x2c/0x60 process_one_work+0x30c/0x810 worker_thread+0x98/0x540 kthread+0x1c4/0x1d0 ret_from_kernel_thread+0x5c/0x74 This occurs when unplug is attempted for such memory which has been mapped using memblock pages as part of early kernel page table setup. We wouldn't have initialized the PMD or PTE fragment count for those PMD or PTE pages. This can be fixed by allocating memory in PAGE_SIZE granularity during early page table allocation. This makes sure a specific page is not shared for another memblock allocation and we can free them correctly on removing page-table pages. Since we now do PAGE_SIZE allocations for both PUD table and PMD table (Note that PTE table allocation is already of PAGE_SIZE), we end up allocating more memory for the same amount of system RAM. Here is a comparision of how much more we need for a 64T and 2G system after this patch: 1. 64T system ------------- 64T RAM would need 64G for vmemmap with struct page size being 64B. 128 PUD tables for 64T memory (1G mappings) 1 PUD table and 64 PMD tables for 64G vmemmap (2M mappings) With default PUD[PMD]_TABLE_SIZE(4K), (128+1+64)*4K=772K With PAGE_SIZE(64K) table allocations, (128+1+64)*64K=12352K 2. 2G system ------------ 2G RAM would need 2M for vmemmap with struct page size being 64B. 1 PUD table for 2G memory (1G mapping) 1 PUD table and 1 PMD table for 2M vmemmap (2M mappings) With default PUD[PMD]_TABLE_SIZE(4K), (1+1+1)*4K=12K With new PAGE_SIZE(64K) table allocations, (1+1+1)*64K=192K Signed-off-by: Bharata B Rao Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709131925.922266-2-aneesh.kumar@linux.ibm.com commit 9a77c4a0a12597c661be374b8d566516c0341570 Author: Nicholas Piggin Date: Mon Jul 20 10:12:58 2020 +0530 powerpc/prom: Enable Radix GTSE in cpu pa-features When '029ab30b4c0a ("powerpc/mm: Enable radix GTSE only if supported.")' made GTSE an MMU feature, it was enabled by default in powerpc-cpu-features but was missed in pa-features. This causes random memory corruption during boot of PowerNV kernels where CONFIG_PPC_DT_CPU_FTRS isn't enabled. Fixes: 029ab30b4c0a ("powerpc/mm: Enable radix GTSE only if supported.") Reported-by: Qian Cai Signed-off-by: Nicholas Piggin Signed-off-by: Bharata B Rao [mpe: Unwrap long line] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200720044258.863574-1-bharata@linux.ibm.com commit 106b104137fd5f0dbcafadd7ad566b86ec183466 Author: Kamel Bouhara Date: Mon Jul 6 13:43:47 2020 +0200 counter: Add microchip TCB capture counter This drivers allows to use the capture mode of the Timer Counter Block hardware block available in Microchip SoCs through the counter subsystem. Two functions of the counter are supported for the moment: period capture and quadrature decoder. The latter is only supported by the SAMA5 series of SoCs. For the period capture mode a basic setup has been chosen that will reset the counter each time the period is actually reached. Of course the device offers much more possibilities. For quadrature mode, both channel 0 and 1 must be configured even if we only capture the position (no revolution/rotation). Signed-off-by: Kamel Bouhara Signed-off-by: Jonathan Cameron commit 7eb181cf06372311f58b237ce9e7434c427b56b7 Author: Kamel Bouhara Date: Mon Jul 6 13:43:46 2020 +0200 dt-bindings: counter: microchip-tcb-capture counter Describe the devicetree binding for the Microchip TCB module. Each counter blocks exposes three independent counters. However, when configured in quadrature decoder, both channel <0> and <1> are required for speed/position and rotation capture (yet only the position is captured). Signed-off-by: Kamel Bouhara Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 3f07899fc363c99b0d1ef00d8c60a380465690b5 Author: Alexandre Belloni Date: Mon Jul 6 13:43:45 2020 +0200 dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible The sama5d2 TC block TIMER_CLOCK1 is different from the at91sam9x5 one. Instead of being MCK / 2, it is the TCB GCLK. Signed-off-by: Alexandre Belloni Signed-off-by: Kamel Bouhara Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 4b88c673cd4aa95e49f199ea8445593e15fac854 Author: Alexandre Belloni Date: Mon Jul 6 13:43:44 2020 +0200 dt-bindings: atmel-tcb: convert bindings to json-schema Convert Atmel Timer Counter Blocks bindings to DT schema format using json-schema. Also move it out of mfd as it is not and has never been related to mfd. Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Signed-off-by: Kamel Bouhara Signed-off-by: Jonathan Cameron commit d3818c4815aab9b17e78b6afdeaf87797acba8d3 Author: Kamel Bouhara Date: Mon Jul 6 13:43:43 2020 +0200 ARM: at91: add atmel tcb capabilities Some atmel socs have extra tcb capabilities that allow using a generic clock source or enabling a quadrature decoder. Signed-off-by: Kamel Bouhara Acked-by: Alexandre Belloni Signed-off-by: Jonathan Cameron commit e2978c45e5ed3bab7f69477b882ef588185b30cc Author: Kuninori Morimoto Date: Fri Jul 17 09:21:54 2020 +0900 ASoC: soc-dai: remove .digital_mute All drivers are now using .mute_stream. Let's remove .digital_mute. Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87h7u72dqz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a7f0f92aa82fced7df891282b67387d247e44ca8 Author: Jing Xiangfeng Date: Mon Jul 20 16:08:38 2020 +0800 ipmi: remve duplicate code in __ipmi_bmc_register() __ipmi_bmc_register() jumps to the label 'out_free_my_dev_name' in an error path. So we can remove duplicate code in the if (rv). Signed-off-by: Jing Xiangfeng Message-Id: <20200720080838.148737-1-jingxiangfeng@huawei.com> Signed-off-by: Corey Minyard commit e7b856dfcec6d3bf028adee8c65342d7035914a1 Author: Nicolas Chauvet Date: Sat Jul 18 12:07:10 2020 +0200 PCI: tegra: Revert tegra124 raw_violation_fixup As reported in https://bugzilla.kernel.org/206217 , raw_violation_fixup is causing more harm than good in some common use-cases. This patch is a partial revert of commit: 191cd6fb5d2c ("PCI: tegra: Add SW fixup for RAW violations") and fixes the following regression since then. * Description: When both the NIC and MMC are used one can see the following message: NETDEV WATCHDOG: enp1s0 (r8169): transmit queue 0 timed out and pcieport 0000:00:02.0: AER: Uncorrected (Non-Fatal) error received: 0000:01:00.0 r8169 0000:01:00.0: AER: PCIe Bus Error: severity=Uncorrected (Non-Fatal), type=Transaction Layer, (Requester ID) r8169 0000:01:00.0: AER: device [10ec:8168] error status/mask=00004000/00400000 r8169 0000:01:00.0: AER: [14] CmpltTO (First) r8169 0000:01:00.0: AER: can't recover (no error_detected callback) pcieport 0000:00:02.0: AER: device recovery failed After that, the ethernet NIC is not functional anymore even after reloading the r8169 module. After a reboot, this is reproducible by copying a large file over the NIC to the MMC. For some reason this is not reproducible when files are copied to a tmpfs. * Little background on the fixup, by Manikanta Maddireddy: "In the internal testing with dGPU on Tegra124, CmplTO is reported by dGPU. This happened because FIFO queue in AFI(AXI to PCIe) module get full by upstream posted writes. Back to back upstream writes interleaved with infrequent reads, triggers RAW violation and CmpltTO. This is fixed by reducing the posted write credits and by changing updateFC timer frequency. These settings are fixed after stress test. In the current case, RTL NIC is also reporting CmplTO. These settings seems to be aggravating the issue instead of fixing it." Link: https://lore.kernel.org/r/20200718100710.15398-1-kwizart@gmail.com Fixes: 191cd6fb5d2c ("PCI: tegra: Add SW fixup for RAW violations") Signed-off-by: Nicolas Chauvet Signed-off-by: Lorenzo Pieralisi Reviewed-by: Manikanta Maddireddy Cc: stable@vger.kernel.org commit 5271d915a99c696a2f16ae59cf6a037be35afa22 Author: Leo Yan Date: Thu Jul 16 13:11:30 2020 +0800 tools headers UAPI: Update tools's copy of linux/perf_event.h To get the changes in the commit: "perf: Add perf_event_mmap_page::cap_user_time_short ABI" This update is a prerequisite to add support for short clock counters related ABI extension. Signed-off-by: Leo Yan Link: https://lore.kernel.org/r/20200716051130.4359-8-leo.yan@linaro.org Signed-off-by: Will Deacon commit c8f9eb0d6ebaa768c9f6eb2ee21b01d74230934d Author: Peter Zijlstra Date: Thu Jul 16 13:11:29 2020 +0800 arm64: perf: Add cap_user_time_short This completes the ARM64 cap_user_time support. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Leo Yan Link: https://lore.kernel.org/r/20200716051130.4359-7-leo.yan@linaro.org Signed-off-by: Will Deacon commit 6c0246a4588d418f72acd40a7b7601be403d80a9 Author: Peter Zijlstra Date: Thu Jul 16 13:11:28 2020 +0800 perf: Add perf_event_mmap_page::cap_user_time_short ABI In order to support short clock counters, provide an ABI extension. As a whole: u64 time, delta, cyc = read_cycle_counter(); + if (cap_user_time_short) + cyc = time_cycle + ((cyc - time_cycle) & time_mask); delta = mul_u64_u32_shr(cyc, time_mult, time_shift); if (cap_user_time_zero) time = time_zero + delta; delta += time_offset; Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Leo Yan Link: https://lore.kernel.org/r/20200716051130.4359-6-leo.yan@linaro.org Signed-off-by: Will Deacon commit 279a811eb520594fac3cd3a541e6c7ea50072ac9 Author: Peter Zijlstra Date: Thu Jul 16 13:11:27 2020 +0800 arm64: perf: Only advertise cap_user_time for arch_timer When sched_clock is running on anything other than arch_timer, don't advertise cap_user_time*. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Leo Yan Link: https://lore.kernel.org/r/20200716051130.4359-5-leo.yan@linaro.org Requested-by: Will Deacon Signed-off-by: Will Deacon commit 950b74ddefc4a42add8b1ae0170aa309338ffe73 Author: Peter Zijlstra Date: Thu Jul 16 13:11:26 2020 +0800 arm64: perf: Implement correct cap_user_time As reported by Leo; the existing implementation is broken when the clock and counter don't intersect at 0. Use the sched_clock's struct clock_read_data information to correctly implement cap_user_time and cap_user_time_zero. Note that the ARM64 counter is architecturally only guaranteed to be 56bit wide (implementations are allowed to be wider) and the existing perf ABI cannot deal with wrap-around. This implementation should also be faster than the old; seeing how we don't need to recompute mult and shift all the time. [leoyan: Use mul_u64_u32_shr() to convert cyc to ns to avoid overflow] Reported-by: Leo Yan Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Leo Yan Link: https://lore.kernel.org/r/20200716051130.4359-4-leo.yan@linaro.org Signed-off-by: Will Deacon commit aadd6e5caaacd6feca9691ba30536e7de5a7d152 Author: Ahmed S. Darwish Date: Thu Jul 16 13:11:25 2020 +0800 time/sched_clock: Use raw_read_seqcount_latch() sched_clock uses seqcount_t latching to switch between two storage places protected by the sequence counter. This allows it to have interruptible, NMI-safe, seqcount_t write side critical sections. Since 7fc26327b756 ("seqlock: Introduce raw_read_seqcount_latch()"), raw_read_seqcount_latch() became the standardized way for seqcount_t latch read paths. Due to the dependent load, it also has one read memory barrier less than the currently used raw_read_seqcount() API. Use raw_read_seqcount_latch() for the seqcount_t latch read path. Signed-off-by: Ahmed S. Darwish Signed-off-by: Leo Yan Link: https://lkml.kernel.org/r/20200625085745.GD117543@hirez.programming.kicks-ass.net Link: https://lkml.kernel.org/r/20200715092345.GA231464@debian-buster-darwi.lab.linutronix.de Link: https://lore.kernel.org/r/20200716051130.4359-3-leo.yan@linaro.org References: 1809bfa44e10 ("timers, sched/clock: Avoid deadlock during read from NMI") Signed-off-by: Will Deacon commit 1b86abc1c645ad5c9c7bf70910cb3ce73939d2d7 Author: Peter Zijlstra Date: Thu Jul 16 13:11:24 2020 +0800 sched_clock: Expose struct clock_read_data In order to support perf_event_mmap_page::cap_time features, an architecture needs, aside from a userspace readable counter register, to expose the exact clock data so that userspace can convert the counter register into a correct timestamp. Provide struct clock_read_data and two (seqcount) helpers so that architectures (arm64 in specific) can expose the numbers to userspace. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Leo Yan Link: https://lore.kernel.org/r/20200716051130.4359-2-leo.yan@linaro.org Signed-off-by: Will Deacon commit b1631b84fcdba8d11cb33291bacab751ed4cf649 Author: Alexander A. Klimov Date: Sat Jul 18 13:47:49 2020 +0200 HID: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Jiri Kosina commit 238b5bdefdf9767f5de8574ed79ead397eccf05e Author: Alexander A. Klimov Date: Sat Jul 18 12:33:44 2020 +0200 HID: udraw-ps3: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Bastien Nocera Signed-off-by: Jiri Kosina commit 539707caa1a89ee4efc57b4e4231c20c46575ccc Author: Shaokun Zhang Date: Thu Jun 18 21:35:44 2020 +0800 arm64: perf: Correct the event index in sysfs When PMU event ID is equal or greater than 0x4000, it will be reduced by 0x4000 and it is not the raw number in the sysfs. Let's correct it and obtain the raw event ID. Before this patch: cat /sys/bus/event_source/devices/armv8_pmuv3_0/events/sample_feed event=0x001 After this patch: cat /sys/bus/event_source/devices/armv8_pmuv3_0/events/sample_feed event=0x4001 Signed-off-by: Shaokun Zhang Cc: Will Deacon Cc: Mark Rutland Cc: Link: https://lore.kernel.org/r/1592487344-30555-3-git-send-email-zhangshaokun@hisilicon.com [will: fixed formatting of 'if' condition] Signed-off-by: Will Deacon commit b266eacf5f02b24de8a5a4de53de9acdd7ae8afd Author: Alexander A. Klimov Date: Mon Jul 13 10:21:35 2020 +0200 HID: mcp2221: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Jiri Kosina commit 7c7b2a35a97c6927fedd5f39c559a413d8259d01 Author: Alexander A. Klimov Date: Sun Jul 19 22:37:14 2020 +0200 video: fbdev: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200719203714.61745-1-grandmaster@al2klimov.de commit b0487e0d96d58906e286592dd02e7292f53e399a Author: Alexander A. Klimov Date: Sun Jul 19 19:14:28 2020 +0200 drm: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200719171428.60470-1-grandmaster@al2klimov.de commit b96952f498db61cdce60f3161a445442d1cc08bc Author: Artur Rojek Date: Sun Jul 19 22:53:07 2020 +0200 IIO: Ingenic JZ47xx: Add touchscreen mode. The SADC component in JZ47xx SoCs provides support for touchscreen operations (pen position and pen down pressure) in single-ended and differential modes. The touchscreen component of SADC takes a significant time to stabilize after first receiving the clock and a delay of 50ms has been empirically proven to be a safe value before data sampling can begin. Of the known hardware to use this controller, GCW Zero and Anbernic RG-350 utilize the touchscreen mode by having their joystick(s) attached to the X/Y positive/negative input pins. JZ4770 and later SoCs introduce a low-level command feature. With it, up to 32 commands can be programmed, each one corresponding to a sampling job. It allows to change the low-voltage reference, the high-voltage reference, have them connected to VCC, GND, or one of the X-/X+ or Y-/Y+ pins. This patch introduces support for 6 stream-capable channels: - channel #0 samples X+/GND - channel #1 samples Y+/GND - channel #2 samples X-/GND - channel #3 samples Y-/GND - channel #4 samples X+/X- - channel #5 samples Y+/Y- Being able to sample X-/GND and Y-/GND is useful on some devices, where one joystick is connected to the X+/Y+ pins, and a second joystick is connected to the X-/Y- pins. All the boards which probe this driver have the interrupt provided from Device Tree, with no need to handle a case where the IRQ was not provided. Co-developed-by: Paul Cercueil Signed-off-by: Paul Cercueil Signed-off-by: Artur Rojek Signed-off-by: Jonathan Cameron commit 842247203c33151c5a8007f9a0bec7ba378705d2 Author: Artur Rojek Date: Sun Jul 19 22:53:06 2020 +0200 dt-bindings: iio/adc: Add touchscreen idx for JZ47xx SoC ADC Introduce support for touchscreen channels found in JZ47xx SoCs. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Acked-by: Rob Herring Signed-off-by: Jonathan Cameron commit ffebbecaaa86f7cde4a6a813bed14f9d56e7c373 Author: Alexander A. Klimov Date: Sat Jul 18 14:18:15 2020 +0200 reset: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Philipp Zabel commit b6539a11e807c531e51ff7ad9a25c3a1b6ff7340 Author: Sam Ravnborg Date: Sun Jul 19 10:07:43 2020 +0200 backlight: backlight: Make of_find_backlight static There are no external users of of_find_backlight, as they have all changed to use the managed version. Make of_find_backlight static to prevent new external users. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 0f6a3256fd810eeca9c56cccafee46359d995138 Author: Sam Ravnborg Date: Sun Jul 19 10:07:42 2020 +0200 backlight: backlight: Drop backlight_put() There are no external users of backlight_put(). Drop it and open code the two users in backlight.c. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 51d53e5b06b8e75d02a17bfe678e7be7554a2322 Author: Sam Ravnborg Date: Sun Jul 19 10:07:41 2020 +0200 backlight: Use backlight_get_brightness() throughout Introduce the backlight_get_brightness() helper in all video/backlight/* drivers. This simplifies the code and align the implementation of the update_status() operation across the different backlight drivers. Some of the drivers gains a little extra functionality by the change as they now respect the fb_blank() ioctl. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit a00a5feb1e96ff55c24131472db53dc56cc7570b Author: Sam Ravnborg Date: Sun Jul 19 10:07:40 2020 +0200 backlight: jornada720_bl: Introduce backlight_is_blank() Use the backlight_is_blank() helper to simplify the code a bit. The jornada720_bl driver distinguish between backlight off and brightness set to 0. Thus this driver turn off backlight only when backlight_is_blank() returns true. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit de7b490cdfe46e34e3eb567019b4e3b3747b5c0b Author: Sam Ravnborg Date: Sun Jul 19 10:07:39 2020 +0200 backlight: gpio_backlight: Simplify update_status() Introduce the use of backlight_get_brightness() to simplify the update_status() operation. With the simpler implementation drop the gpio_backlight_get_next_brightness() helper as it was now a one-liner. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 24d34617c24f9d41953f76f2fbf282334584f5db Author: Sam Ravnborg Date: Sun Jul 19 10:07:38 2020 +0200 backlight: cr_bllcd: Introduce gpio-backlight semantics cr_bllcd can turn backlight ON or OFF. Fix semantitics so they equals what we know from gpio-backlight. brightness == 0 => backlight off brightness == 1 => backlight on Use the backlight_get_brightness() helper to simplify the code. Signed-off-by: Sam Ravnborg Signed-off-by: Lee Jones commit 5a09765ddedd34f176275c72ffbe567e428e2dfc Author: Sam Ravnborg Date: Sun Jul 19 10:07:37 2020 +0200 backlight: as3711_bl: Simplify update_status Replaces the open-coded checks of the state, with the backlight_get_brightness() helper. This increases readability of the code and align the functionality across the drivers. Furthermore drop the debug prints in update_status(). If we need debug printing then we can add it to the backlight core. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 2144d00ed0db28c764513080f95e4c49ea9133b0 Author: Sam Ravnborg Date: Sun Jul 19 10:07:36 2020 +0200 backlight: backlight: Introduce backlight_get_brightness() Based on an idea from Emil Velikov, add a helper that checks backlight_is_blank() and return 0 as brightness if display is blank or the property value if not. This allows us to simplify the update_status() implementation in most of the backlight drivers. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 6a294b41ab344948bac28fa39f4c1d42c0acdace Author: Paul Cercueil Date: Sun Jul 19 22:53:05 2020 +0200 iio/adc: ingenic: Retrieve channels list from soc data struct Instead of having one array of struct iio_chan_spec for all SoCs, and have some SoCs remove the last item of the array as they can't use it, have each SoC define its array of supported channels. Signed-off-by: Paul Cercueil Tested-by: Artur Rojek Signed-off-by: Artur Rojek Signed-off-by: Jonathan Cameron commit 5ab4246cfc6f62cd0eb4c95a029e6fa7f29b3984 Author: Sam Ravnborg Date: Sun Jul 19 10:07:35 2020 +0200 doc-rst: Wire-up Backlight kernel-doc documentation Include backlight so the documentation is now generated with make htmldocs and friends. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Emil Velikov Signed-off-by: Lee Jones commit a1230eb2e3f44ebd1b59c547491e0c480b44aff3 Author: Sam Ravnborg Date: Sun Jul 19 10:07:34 2020 +0200 backlight: backlight: Add overview and update existing doc Add overview chapter to backlight.c. Update existing kernel-doc to follow a more consistent style and drop kernel-doc for deprecated functions. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Emil Velikov Signed-off-by: Lee Jones commit 9c4aa3118bab6f10904b7bc9bc34b501a083751b Author: Sam Ravnborg Date: Sun Jul 19 10:07:33 2020 +0200 backlight: backlight: Drop extern from prototypes No need to put "extern" in front of prototypes. While touching the prototypes adjust indent to follow the kernel style. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Emil Velikov Signed-off-by: Lee Jones commit 7ecdea4a0226f6c5cd0e86859d1b38cf17bc8529 Author: Sam Ravnborg Date: Sun Jul 19 10:07:32 2020 +0200 backlight: generic_bl: Remove this driver as it is unused The backlight_bl driver required initialization using struct generic_bl_info. As there are no more references to this struct there is no users left. So it is safe to delete the driver. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Emil Velikov Signed-off-by: Lee Jones commit 2d15bb47f3331db979bd0a1987812ca1a3ff40c6 Author: Sam Ravnborg Date: Sun Jul 19 10:07:31 2020 +0200 backlight: backlight: Document enums in backlight.h Add kernel-doc documentation for the backlight enums Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Emil Velikov Signed-off-by: Lee Jones commit d160fd4e918da33f5ffbcf005cd95888dbbe4f76 Author: Sam Ravnborg Date: Sun Jul 19 10:07:30 2020 +0200 backlight: backlight: Document inline functions in backlight.h Add documentation for the inline functions in backlight.h Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Emil Velikov Signed-off-by: Lee Jones commit 6f10cd124c44eea018672d5852708ca5dca4d06d Author: Sam Ravnborg Date: Sun Jul 19 10:07:29 2020 +0200 backlight: backlight: Improve backlight_device documentation Improve the documentation for backlight_device and adapt it to kernel-doc style. The updated documentation is more strict on how locking is used. With the update neither update_lock nor ops_lock may be used outside the backlight core. This restriction was introduced to keep the locking simple by keeping it in the core. It was verified that this documents the current state by renaming update_lock => bl_update_lock and ops_lock => bl_ops_lock. The rename did not reveal any uses outside the backlight core. The rename is NOT part of this patch. Signed-off-by: Sam Ravnborg Reviewed-by: Emil Velikov Reviewed-by: Daniel Thompson Reviewed-by: Jingoo Han Signed-off-by: Lee Jones commit 155e41efe70bcd5f254e43d38c19f74b1378cd78 Author: Artur Rojek Date: Sun Jul 19 22:53:04 2020 +0200 IIO: Ingenic JZ47xx: Add xlate cb to retrieve correct channel idx Provide an of_xlate callback in order to retrieve the correct channel specifier index from the IIO channels array. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Signed-off-by: Jonathan Cameron commit 1a99dc467943c02e08ee59fe4a3f2093a1ba28cb Author: Artur Rojek Date: Sun Jul 19 22:53:03 2020 +0200 IIO: Ingenic JZ47xx: Error check clk_enable calls. Introduce error checks for the clk_enable calls used in this driver. As part of the changes, move clk_enable/clk_disable calls out of ingenic_adc_set_config and into respective logic of its callers. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Signed-off-by: Jonathan Cameron commit cabf161335ca9fe695bb87469ed99be881cd08f5 Author: Sam Ravnborg Date: Sun Jul 19 10:07:28 2020 +0200 backlight: backlight: Improve backlight_properties documentation Improve the documentation for backlight_properties and adapt it to kernel-doc style. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Emil Velikov Signed-off-by: Lee Jones commit ca7c20b2132d228ec76df3c96f5d0b5ae3d6f218 Author: Sam Ravnborg Date: Sun Jul 19 10:07:27 2020 +0200 backlight: backlight: Improve backlight_ops documentation Improve the documentation for backlight_ops and adapt it to kernel-doc style. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Emil Velikov Signed-off-by: Lee Jones commit 1c91b46555aa1dd86331025e62d55d92459e0faf Author: Sam Ravnborg Date: Sun Jul 19 10:07:26 2020 +0200 backlight: backlight: Add backlight_is_blank() The backlight support has three properties that express the state: - power - state - fb_blank It is un-documented and easy to get wrong. Add backlight_is_blank() helper to make it simpler for drivers to get the check of the state correct. A lot of drivers also includes checks for fb_blank. This check is redundant when the state is checked and thus not needed in this helper function. But added anyway to avoid introducing subtle bugs due to the creative use of fb_blank in some drivers. Introducing this helper will for some drivers results in added support for fb_blank. This will be a change in functionality, which will improve the backlight driver. Rolling out this helper to all relevant backlight drivers will eliminate almost all accesses to fb_blank. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Peter Ujfalusi Reviewed-by: Emil Velikov Reviewed-by: Daniel Vetter Signed-off-by: Lee Jones commit 4edfe2248d21d661dbcd735e5d28a36cfa826e11 Author: Sam Ravnborg Date: Sun Jul 19 10:07:25 2020 +0200 backlight: backlight: Refactor fb_notifier_callback() Increase readability of fb_notifier_callback() by removing a few indent levels. No functional change. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Emil Velikov Signed-off-by: Lee Jones commit 7dbf4bbf1c320d82058878bd44805724d171e1e8 Author: Alexandre Belloni Date: Sat Jul 18 01:36:44 2020 +0200 ARM: dts: at91: sama5d3_xplained: change phy-mode Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY"), networking is broken on sama5d3 xplained. The device tree has phy-mode = "rgmii" and this worked before, because KSZ9031 PHY started with default RGMII internal delays configuration (TX off, RX on 1.2 ns) and MAC provided TX delay. After above commit, the KSZ9031 PHY starts handling phy mode properly and disables RX delay, as result networking is become broken. Fix it by switching to phy-mode = "rgmii-rxid" to reflect previous behavior. Fixes: bcf3440c6dd78bfe ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200717233644.841080-1-alexandre.belloni@bootlin.com commit 308646785e51976dea7e20d29a1842d14bf0b9bd Author: Dejin Zheng Date: Fri Jun 26 21:00:41 2020 +0800 reset: intel: fix a compile warning about REG_OFFSET redefined kernel test robot reports a compile warning about REG_OFFSET redefined in the reset-intel-gw.c after merging commit e44ab4e14d6f4 ("regmap: Simplify implementation of the regmap_read_poll_timeout() macro"). the warning is like that: drivers/reset/reset-intel-gw.c:18:0: warning: "REG_OFFSET" redefined #define REG_OFFSET GENMASK(31, 16) In file included from ./arch/arm/mach-ixp4xx/include/mach/hardware.h:30:0, from ./arch/arm/mach-ixp4xx/include/mach/io.h:15, from ./arch/arm/include/asm/io.h:198, from ./include/linux/io.h:13, from ./include/linux/iopoll.h:14, from ./include/linux/regmap.h:20, from drivers/reset/reset-intel-gw.c:12: ./arch/arm/mach-ixp4xx/include/mach/platform.h:25:0: note: this is the location of the previous definition #define REG_OFFSET 3 Reported-by: kernel test robot Fixes: c9aef213e38cde ("reset: intel: Add system reset controller driver") Signed-off-by: Dejin Zheng Reviewed-by: Philipp Zabel Signed-off-by: Philipp Zabel commit cf73db84817a9652eb27887981ad78670d2f9b7b Author: Uwe Kleine-König Date: Thu Jul 16 19:41:39 2020 +0200 drm/mxsfb: drop unused function parameter flags is unused since the driver was introduced in commit 45d59d704080 ("drm: Add new driver for MXSFB controller"). Signed-off-by: Uwe Kleine-König Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/20200716174139.16602-1-u.kleine-koenig@pengutronix.de commit 3f161e0ae863a0456d00e5a6c9c81098c62ab7fe Author: Ilya Leoshkevich Date: Wed Jun 24 14:55:22 2020 +0200 s390/bpf: implement BPF_PROBE_MEM This is a s390 port of x86 commit 3dec541b2e63 ("bpf: Add support for BTF pointers to x86 JIT"). Signed-off-by: Ilya Leoshkevich Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 05a68e892e89c97df6650cd8cc55058002657cbc Author: Ilya Leoshkevich Date: Tue Jun 30 20:52:03 2020 +0200 s390/kernel: expand exception table logic to allow new handling options This is a s390 port of commit 548acf19234d ("x86/mm: Expand the exception table logic to allow new handling options"), which is needed for implementing BPF_PROBE_MEM on s390. The new handler field is made 64-bit in order to allow pointing from dynamically allocated entries to handlers in kernel text. Unlike on x86, NULL is used instead of ex_handler_default. This is because exception tables are used by boot/text_dma.S, and it would be a pain to preserve ex_handler_default. The new infrastructure is ignored in early_pgm_check_handler, since there is no pt_regs. Signed-off-by: Ilya Leoshkevich Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 88aa8939c96781089e5ace3492d818074c5c6fe9 Author: Ilya Leoshkevich Date: Mon Jun 29 20:48:09 2020 +0200 s390/kernel: unify EX_TABLE* implementations Replace three implementations with one using using __stringify_in_c macro conveniently "borrowed" from powerpc and microblaze. Signed-off-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens commit 771cf196cc92a6078656548bbc073aa932c053ab Author: Heiko Carstens Date: Tue Jul 14 08:22:21 2020 +0200 s390/mm: allow order 10 allocations Get rid of FORCE_MAX_ZONEORDER which limited allocations to order 8 (= 1MB) and use the default, which allows for order 10 (= 4MB) allocations. Given that s390 allows less than the default this caused some memory allocation problems more or less unique to s390 from time to time. Note: this was originally introduced with commit 684de39bd795 ("[S390] Fix IPL from NSS.") in order to support Named Saved Segments, which could start/end at an arbitrary 1 megabyte boundary and also before support for sparsemem vmemmmap was enabled. Since NSS support is gone, but sparsemem vmemmap support is available this limitation can go away. Signed-off-by: Heiko Carstens commit 3c5f2eb9695cd241c9898a01388b19a149d0b7d2 Author: Heiko Carstens Date: Tue Jul 14 07:46:40 2020 +0200 s390/mm: avoid trimming to MAX_ORDER Trimming to MAX_ORDER was originally done in order to avoid to set HOLES_IN_ZONE, which in turn would enable a quite expensive pfn_valid() check. pfn_valid() however only checks if a struct page exists for a given pfn. With sparsemen vmemmap there are always struct pages, since memmaps are allocated for whole sections. Therefore remove the HOLES_IN_ZONE comment and the trimming. Signed-off-by: Heiko Carstens commit a709423f7a3a452e5fa7442425817c1bdccd7926 Author: Julian Wiedmann Date: Tue Jun 16 14:13:00 2020 +0200 s390/qdio: remove internal polling in non-thinint path For non-thinint devices in LPAR, qdio polls an idle Input Queue for a little while to catch more work. But platform support for thinints has been around practically _forever_ by now, so this micro-optimization is seeing 0 actual use. Remove it to reduce the overall complexity of the hot path. In the meantime we also grew support for driver-level polling (eg. NAPI in qeth), so it's quite questionable how useful this would actually be on current kernels. Signed-off-by: Julian Wiedmann Signed-off-by: Heiko Carstens commit 2bbf282a5e8e7e6b36586718b484a36117b6b8a0 Author: Julian Wiedmann Date: Wed Jun 17 15:30:14 2020 +0200 s390/qdio: allow to scan all 128 Input SBALs The comment is inaccurate, qdio_inbound_q_moved() and/or its callers no longer get confused by a count of 128 completed SBALs. Scanning all 128 SBALs at once can improve IRQ reduction (as we now place the ACK at the right spot), and reduce the amount of processing needed to handle all completed SBALs. Signed-off-by: Julian Wiedmann Signed-off-by: Heiko Carstens commit 529683d4705b6b1fa1c2f902e859ad6a8d17e31e Author: Julian Wiedmann Date: Mon Jun 15 17:23:11 2020 +0200 s390/qdio: fix statistics for 128 SBALs Old code would only scan up to 127 SBALs at once. So the last statistics bucket was set aside to count "discovered 127 SBALs with new work" events. But nowadays we allow to scan all 128 SBALs for Output Queues, and a subsequent patch will introduce the same for Input Queues. So fix up the accounting to use the last bucket only when all 128 SBALs have been discovered with new work. Signed-off-by: Julian Wiedmann Signed-off-by: Heiko Carstens commit 7904aaa8b22fa07fd5457ee4a885cf9f665cb9c4 Author: Heiko Carstens Date: Tue Jul 14 07:43:26 2020 +0200 s390/mm: fix typo in comment Signed-off-by: Heiko Carstens commit f4b29bf77319df18348b56e9fd87bc7d4266220e Author: Guido Günther Date: Mon Mar 23 15:52:46 2020 +0100 drm/mxsfb: Make supported modifiers explicit In contrast to other display controllers on imx like DCSS and ipuv3 lcdif/mxsfb does not support detiling e.g. vivante tiled layouts. Since mesa might assume otherwise make it explicit that only DRM_FORMAT_MOD_LINEAR is supported. Signed-off-by: Guido Günther Reviewed-by: Lucas Stach Signed-off-by: Stefan Agner Link: https://patchwork.freedesktop.org/patch/msgid/26877532e272c12a74c33188e2a72abafc9a2e1c.1584973664.git.agx@sigxcpu.org commit 537b91180dc296a95454287792e2c59baec60af5 Author: Linus Walleij Date: Sun Jul 19 22:16:02 2020 +0200 ARM: dts: ux500-skomer: Correct accel mounting matrix This corrects the mounting matrix for the BMA254 accelerometer to what makes PostmarketOS actually orient the screen the right way on this device. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200719201603.3610389-1-linus.walleij@linaro.org commit c6a8b84da4c28bda61b842a089651c3ec9d89a48 Author: Randy Dunlap Date: Fri Jul 17 16:36:50 2020 -0700 modules: linux/moduleparam.h: drop duplicated word in a comment Drop the doubled word "the" in a comment. Signed-off-by: Randy Dunlap Cc: Jessica Yu Signed-off-by: Jessica Yu commit 698d4d35be34385f0b501dde5ea1071d483c9a22 Author: Prashant Malani Date: Wed Jul 15 16:49:28 2020 -0700 platform/chrome: cros_ec_typec: Unregister partner on error When port update is called during probe(), any error with setting the Type C muxes results in an errno being returned to probe(), which promptly returns that itself. Ensure that we unregister any registered partners when doing so, to prevent orphaned partners on the Type C connector class framework. Move the cros_typec_add_partner() and cros_typec_remove_partner() code together to higher up in the file, so that they are together, and we can call cros_typec_remove_partner() from cros_unregister_ports(). Fixes: 7e7def15fa4b ("platform/chrome: cros_ec_typec: Add USB mux control") Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra commit aa7ec73297df57a86308fee78d2bf86e22ea0bae Author: Krishna Reddy Date: Sat Jul 18 12:34:57 2020 -0700 iommu/arm-smmu: Add global/context fault implementation hooks Add global/context fault hooks to allow vendor specific implementations override default fault interrupt handlers. Update NVIDIA implementation to override the default global/context fault interrupt handlers and handle interrupts across the two ARM MMU-500s that are programmed identically. Signed-off-by: Krishna Reddy Reviewed-by: Jon Hunter Reviewed-by: Nicolin Chen Reviewed-by: Pritesh Raithatha Reviewed-by: Robin Murphy Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/20200718193457.30046-6-vdumpa@nvidia.com Signed-off-by: Will Deacon commit 3d2deb0cdb69e85d05760c6c72189d7653709ee1 Author: Krishna Reddy Date: Sat Jul 18 12:34:56 2020 -0700 dt-bindings: arm-smmu: add binding for Tegra194 SMMU Add binding for NVIDIA's Tegra194 SoC SMMU. Signed-off-by: Krishna Reddy Reviewed-by: Jon Hunter Reviewed-by: Rob Herring Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20200718193457.30046-5-vdumpa@nvidia.com Signed-off-by: Will Deacon commit aab5a1c882760a5bc990b14e5c0c2ee4dab5f1ac Author: Krishna Reddy Date: Sat Jul 18 12:34:55 2020 -0700 iommu/arm-smmu: add NVIDIA implementation for ARM MMU-500 usage NVIDIA's Tegra194 SoC has three ARM MMU-500 instances. It uses two of the ARM MMU-500s together to interleave IOVA accesses across them and must be programmed identically. This implementation supports programming the two ARM MMU-500s that must be programmed identically. The third ARM MMU-500 instance is supported by standard arm-smmu.c driver itself. Signed-off-by: Krishna Reddy Reviewed-by: Jon Hunter Reviewed-by: Nicolin Chen Reviewed-by: Pritesh Raithatha Reviewed-by: Robin Murphy Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/20200718193457.30046-4-vdumpa@nvidia.com Signed-off-by: Will Deacon commit 6c019f4e697ebed2225b20cc5d6276673834853d Author: Krishna Reddy Date: Sat Jul 18 12:34:54 2020 -0700 iommu/arm-smmu: ioremap smmu mmio region before implementation init ioremap smmu mmio region before calling into implementation init. This is necessary to allow mapped address available during vendor specific implementation init. Signed-off-by: Krishna Reddy Reviewed-by: Jon Hunter Reviewed-by: Nicolin Chen Reviewed-by: Pritesh Raithatha Reviewed-by: Robin Murphy Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/20200718193457.30046-3-vdumpa@nvidia.com Signed-off-by: Will Deacon commit cd8479cf0de9d1950b51032a216fbf630f8542a4 Author: Krishna Reddy Date: Sat Jul 18 12:34:53 2020 -0700 iommu/arm-smmu: move TLB timeout and spin count macros Move TLB timeout and spin count macros to header file to allow using the same from vendor specific implementations. Signed-off-by: Krishna Reddy Reviewed-by: Jon Hunter Reviewed-by: Nicolin Chen Reviewed-by: Pritesh Raithatha Reviewed-by: Robin Murphy Reviewed-by: Thierry Reding Link: https://lore.kernel.org/r/20200718193457.30046-2-vdumpa@nvidia.com Signed-off-by: Will Deacon commit 809a9308646ac7d54b8e5d1a64edc63e1192ca67 Author: Alexander A. Klimov Date: Sun Jul 19 14:32:44 2020 +0200 staging: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719123244.58718-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 315116579f79fafd7eea285e0c608682a649d786 Author: Michael Straube Date: Sun Jul 19 13:40:45 2020 +0200 staging: rtl8188eu: add spaces around operators in header files Add spaces around operators in the header files to improve readability and clear checkpatch issues. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200719114045.13595-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 939032fb84eb67a88a0baafbd33f27940e307fbc Author: Anoop S Date: Sat Jul 18 16:01:25 2020 +0530 Staging: rtl8188eu: core: Fix coding style issue This fixes the following checkpatch.pl warning WARNING: Prefer using '"%s...", __func__' to using 'rtw_tkip_decrypt', this function's name, in a string. Signed-off-by: Anoop S Link: https://lore.kernel.org/r/20200718103125.62528-1-anoop.skumar1507@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9ab0cb309e7950a1649bffade985e7ccc7aaf675 Author: Takashi Iwai Date: Fri Jul 17 17:45:17 2020 +0200 ALSA: Replace the word "slave" in vmaster API Follow the recent inclusive terminology guidelines and replace the word "slave" in vmaster API. I chose the word "follower" at this time since it seems fitting for the purpose. Note that the word "master" is kept in API, since it refers rather to audio master volume control. Also, while we're at it, a typo in comments is corrected, too. Link: https://lore.kernel.org/r/20200717154517.27599-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 79233bdcf6138740e1cb054b580290576a407035 Author: Jonathan Cameron Date: Sun Jul 5 14:17:20 2020 +0100 dt-bindings: iio: ti,ads8688 yaml conversion Fairly simple binding. Most of the changes were filling in information not previously found in the binding. I dropped the previous explicit mention of spi-max-frequency as that is covered by the generic SPI binding. Signed-off-by: Jonathan Cameron Acked-by: Sean Nyekjaer Reviewed-by: Rob Herring commit 5ef8f84aeac9974c9891d9987abb25362dbb4c8e Author: Icenowy Zheng Date: Fri Jul 3 21:44:05 2020 +0200 iio: light: stk3310: add chip id for STK3311-X variant The STK3311 chip has a variant called STK3311-X, which has a different chip id of 0x12. Add the chip id to the driver. Signed-off-by: Icenowy Zheng Signed-off-by: Ondrej Jirman Signed-off-by: Jonathan Cameron commit 2f5452579a33db7e49d0a94089556d7c8077cde7 Author: Jonathan Cameron Date: Sun Jun 28 21:32:05 2020 +0100 dt-bindings: iio: accel: kionix,kxsd9 yaml conversion. Convert and flesh out a bit the binding docs for this simple 3 axis accelerometer. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring commit 3eca1d26dbdc1aaff6df25d992fd112f4934ef28 Author: Alexandru Ardelean Date: Wed Apr 15 08:58:04 2020 +0300 iio: adc: ad7192: move ad7192_of_match table closer to the end of the file The change is more cosmetic. There is no need to reference this table in the probe function since 'of_device_get_match_data' is used, which obtains this information from the driver object. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 2c7c8dce3630543d80d4e893836167a1ed1a97fb Author: Lee Jones Date: Fri Jul 17 17:55:38 2020 +0100 iio: adc: rockchip_saradc: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the source file and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/rockchip_saradc.c:190: warning: Function parameter or member 'reset' not described in 'rockchip_saradc_reset_controller' Cc: Philipp Zabel Cc: linux-rockchip@lists.infradead.org Signed-off-by: Lee Jones Reviewed-by: Heiko Stuebner Signed-off-by: Jonathan Cameron commit 82cf139f26c4d87c9b04e250d4e2ee74f0915eee Author: Lee Jones Date: Fri Jul 17 17:55:37 2020 +0100 iio: imu: st_lsm6dsx: st_lsm6dsx: Mark 'st_lsm6dsx_accel_ext_info' as __maybe_unused It doesn't make sense to move it into '*core*' as it's co-located with other, similar definitions which are used in multiple locations. Fixes the following W=1 kernel build warning(s): In file included from drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.c:17: drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=] 497 | static const struct iio_chan_spec_ext_info st_lsm6dsx_accel_ext_info[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.c:17: drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=] 497 | static const struct iio_chan_spec_ext_info st_lsm6dsx_accel_ext_info[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i3c.c:16: drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=] 497 | static const struct iio_chan_spec_ext_info st_lsm6dsx_accel_ext_info[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Lorenzo Bianconi Cc: Denis Ciocca Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 83625defae9ec32fa03c679c9e913327d5620593 Author: Lee Jones Date: Fri Jul 17 17:55:36 2020 +0100 iio: imu: st_lsm6dsx: st_lsm6dsx_shub: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:174: warning: Function parameter or member 'hw' not described in 'st_lsm6dsx_shub_read_output' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:174: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_read_output' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:174: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_read_output' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'hw' not described in 'st_lsm6dsx_shub_write_reg' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'addr' not described in 'st_lsm6dsx_shub_write_reg' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_write_reg' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:205: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_write_reg' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'sensor' not described in 'st_lsm6dsx_shub_read' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'addr' not described in 'st_lsm6dsx_shub_read' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_read' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:285: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_read' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'sensor' not described in 'st_lsm6dsx_shub_write' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'addr' not described in 'st_lsm6dsx_shub_write' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'data' not described in 'st_lsm6dsx_shub_write' drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_shub.c:335: warning: Function parameter or member 'len' not described in 'st_lsm6dsx_shub_write' Cc: Lorenzo Bianconi Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 5497523e657ce448198a34767b71fa168da0393d Author: Lee Jones Date: Fri Jul 17 17:55:35 2020 +0100 iio: magnetometer: ak8974: Add description for ak8974's 'scan' attribute Fixes the following W=1 kernel build warning(s): drivers/iio/magnetometer/ak8974.c:200: warning: Function parameter or member 'scan' not described in 'ak8974' Cc: Linus Walleij Cc: Samu Onkalo Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 8f0f0f2cd20561e2021b053ec9af66f563af0664 Author: Lee Jones Date: Fri Jul 17 17:55:34 2020 +0100 iio: adc: qcom-pm8xxx-xoadc: Demote standard comment block and supply missing description Kerneldoc is only suitable for documenting functions and struct/enums. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_INTERNAL' description in 'PM8XXX_CHANNEL_INTERNAL' drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_125V' description in 'PM8XXX_CHANNEL_INTERNAL' drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_INTERNAL_2' description in 'PM8XXX_CHANNEL_INTERNAL' drivers/iio/adc/qcom-pm8xxx-xoadc.c:133: warning: Excess function parameter 'PM8XXX_CHANNEL_MUXOFF' description in 'PM8XXX_CHANNEL_INTERNAL' drivers/iio/adc/qcom-pm8xxx-xoadc.c:412: warning: Function parameter or member 'variant' not described in 'pm8xxx_xoadc' Cc: Andy Gross Cc: Bjorn Andersson Cc: Linus Walleij Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Bjorn Andersson Signed-off-by: Jonathan Cameron commit 3c979784efe596fd240e8454a3ba62950145c031 Author: Lee Jones Date: Fri Jul 17 17:55:33 2020 +0100 iio: imu: inv_mpu6050: inv_mpu_ring: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the source file and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c:118: warning: Function parameter or member 'irq' not described in 'inv_mpu6050_read_fifo' drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c:118: warning: Function parameter or member 'p' not described in 'inv_mpu6050_read_fifo' Cc: Jean-Baptiste Maneyrol Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit ecf8d08fa26cf86cf84924c30592eb31451083fc Author: Lee Jones Date: Fri Jul 17 17:55:32 2020 +0100 iio: imu: inv_mpu6050: inv_mpu_core: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:444: warning: Function parameter or member 'st' not described in 'inv_mpu6050_set_lpf_regs' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:444: warning: Function parameter or member 'val' not described in 'inv_mpu6050_set_lpf_regs' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:480: warning: Function parameter or member 'indio_dev' not described in 'inv_mpu6050_init_config' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:862: warning: Function parameter or member 'st' not described in 'inv_mpu6050_set_lpf' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:862: warning: Function parameter or member 'rate' not described in 'inv_mpu6050_set_lpf' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'dev' not described in 'inv_mpu6050_fifo_rate_store' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'attr' not described in 'inv_mpu6050_fifo_rate_store' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'buf' not described in 'inv_mpu6050_fifo_rate_store' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:893: warning: Function parameter or member 'count' not described in 'inv_mpu6050_fifo_rate_store' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:954: warning: Function parameter or member 'dev' not described in 'inv_fifo_rate_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:954: warning: Function parameter or member 'attr' not described in 'inv_fifo_rate_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:954: warning: Function parameter or member 'buf' not described in 'inv_fifo_rate_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:975: warning: Function parameter or member 'dev' not described in 'inv_attr_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:975: warning: Function parameter or member 'attr' not described in 'inv_attr_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:975: warning: Function parameter or member 'buf' not described in 'inv_attr_show' drivers/iio/imu/inv_mpu6050/inv_mpu_core.c:1282: warning: Function parameter or member 'st' not described in 'inv_check_and_setup_chip' Cc: Jean-Baptiste Maneyrol Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 315482a52208da03cee1e7767bbc830faa77e8d3 Author: Lee Jones Date: Fri Jul 17 17:55:31 2020 +0100 iio: adc: palmas_gpadc: Demote non-conforming kerneldoc header Very few of the struct attributes have been documented here. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'dev' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'palmas' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'irq' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'irq_auto_0' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'irq_auto_1' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'adc_info' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'conv_completion' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup1_data' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup2_data' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup1_enable' not described in 'palmas_gpadc' drivers/iio/adc/palmas_gpadc.c:114: warning: Function parameter or member 'wakeup2_enable' not described in 'palmas_gpadc' Cc: Pradeep Goudagunta Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 922fdc19906a1b640fcf20e3b2c699b2d652452f Author: Lee Jones Date: Fri Jul 17 17:55:29 2020 +0100 iio: adc: max9611: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted structs here. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/max9611.c:117: warning: cannot understand function prototype: 'const unsigned int max9611_mux_conf[][2] = ' drivers/iio/adc/max9611.c:145: warning: cannot understand function prototype: 'const unsigned int max9611_gain_conf[][2] = ' Cc: Jacopo Mondi Cc: Geert Uytterhoeven Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit ea448671e45eae9ea5c694816c56b7983cf038e4 Author: Lee Jones Date: Fri Jul 17 17:55:28 2020 +0100 iio: adc: max1363: Fix kerneldoc attribute formatting for 'lock' Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/max1363.c:190: warning: Function parameter or member 'lock' not described in 'max1363_state' Cc: Liam Girdwood Cc: Mark Brown Cc: Rohit Sarkar Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit deb38af452a8dc3bd9951a84507884c50374224b Author: Lee Jones Date: Fri Jul 17 17:55:27 2020 +0100 iio: imu: st_lsm6dsx: st_lsm6dsx: Reorder 'inline' declaration Fixes the following W=1 kernel build warning(s): drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:487:1: warning: ‘inline’ is not at beginning of declaration [-Wold-style-declaration] drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h:497:44: warning: ‘st_lsm6dsx_accel_ext_info’ defined but not used [-Wunused-const-variable=] Cc: Lorenzo Bianconi Cc: Denis Ciocca Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit bfec57537f5787135401badefab0a2db240b48d4 Author: Lee Jones Date: Fri Jul 17 17:55:26 2020 +0100 iio: gyro: fxas21002c: Move 'fxas21002c_reg_fields' to the only file its used 'fxas21002c_reg_fields' is only used in '*core*', meaning that '*i2c*' and '*spi*' complain of a defined but not used const variable. Let's move it into the source file. Fixes the following W=1 kernel build warning(s): In file included from drivers/iio/gyro/fxas21002c_i2c.c:14: drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=] 79 | static const struct reg_field fxas21002c_reg_fields[] = { | ^~~~~~~~~~~~~~~~~~~~~ In file included from drivers/iio/gyro/fxas21002c_spi.c:14: drivers/iio/gyro/fxas21002c.h:79:31: warning: ‘fxas21002c_reg_fields’ defined but not used [-Wunused-const-variable=] 79 | static const struct reg_field fxas21002c_reg_fields[] = { | ^~~~~~~~~~~~~~~~~~~~~ Cc: Rui Miguel Silva Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit fb37b5f8717f822a7841f744ea0fcb1a82edaad8 Author: Lee Jones Date: Fri Jul 17 17:55:24 2020 +0100 iio: accel: sca3000: Fix 2 misspellings and demote nonconforming kerneldocs Fixes the following W=1 kernel build warning(s): drivers/iio/accel/sca3000.c:210: warning: Function parameter or member 'mot_det_mult_xz' not described in 'sca3000_chip_info' drivers/iio/accel/sca3000.c:210: warning: Function parameter or member 'mot_det_mult_y' not described in 'sca3000_chip_info' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'indio_dev' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'chan' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'type' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'dir' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'info' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'val' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:871: warning: Function parameter or member 'val2' not described in 'sca3000_read_event_value' drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'indio_dev' not described in 'sca3000_read_event_config' drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'chan' not described in 'sca3000_read_event_config' drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'type' not described in 'sca3000_read_event_config' drivers/iio/accel/sca3000.c:1110: warning: Function parameter or member 'dir' not described in 'sca3000_read_event_config' Cc: Christophe JAILLET Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 95d61a6780ca28953b69eed3e11755c64a808864 Author: Lee Jones Date: Fri Jul 17 17:55:23 2020 +0100 iio: adc: cpcap-adc: Demote seemingly unintentional kerneldoc header None of the headers demoted here provide any descriptions. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'ato_in' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_in' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'adc_ps_factor_in' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_ps_factor_in' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'ato_out' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_out' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'adc_ps_factor_out' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:100: warning: Function parameter or member 'atox_ps_factor_out' not described in 'cpcap_adc_ato' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD0' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTP' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_VBUS' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD3' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BPLUS_AD4' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_CHG_ISENSE' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTI' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_USB_ID' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD8' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_AD9' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_LICELL' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_HV_BATTP' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSX1_AD12' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSX2_AD13' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSY1_AD14' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_TSY2_AD15' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTP_PI16' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_BATTI_PI17' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:153: warning: Enum value 'CPCAP_ADC_CHANNEL_NUM' not described in enum 'cpcap_adc_channel' drivers/iio/adc/cpcap-adc.c:165: warning: Enum value 'CPCAP_ADC_TIMING_IMM' not described in enum 'cpcap_adc_timing' drivers/iio/adc/cpcap-adc.c:165: warning: Enum value 'CPCAP_ADC_TIMING_IN' not described in enum 'cpcap_adc_timing' drivers/iio/adc/cpcap-adc.c:165: warning: Enum value 'CPCAP_ADC_TIMING_OUT' not described in enum 'cpcap_adc_timing' Cc: Tony Lindgren Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 62eebcb67d373adbe4a12e597e8f1f1e217aeed3 Author: Lee Jones Date: Fri Jul 17 17:55:22 2020 +0100 iio: adc: at91-sama5d2_adc: Struct kerneldoc titles need to start with 'struct ' Fixes the following W=1 kernel build warning(s): drivers/iio/adc/at91-sama5d2_adc.c:360: warning: cannot understand function prototype: 'struct at91_adc_dma ' drivers/iio/adc/at91-sama5d2_adc.c:379: warning: cannot understand function prototype: 'struct at91_adc_touch ' Cc: Ludovic Desroches Cc: Eugen Hristev Cc: Nicolas Ferre Cc: Alexandre Belloni Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 4ab559a6c45960c8f54ac35b2af01d7b0ee6f4e7 Author: Lee Jones Date: Fri Jul 17 17:55:21 2020 +0100 iio: adc: at91_adc: Fix 'bad line' warning All lines should start with ' *'. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/at91_adc.c:160: warning: bad line: (Interruptions registers mostly) Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: Maxime Ripard Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 57f335cf20bd5c3df29b3b8654f852011f301ddc Author: Lee Jones Date: Fri Jul 17 17:55:20 2020 +0100 iio: dac: ad5504: Fix formatting errors and demote non-compliant kerneldoc Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5504.c:58: warning: Function parameter or member 'pwr_down_mask' not described in 'ad5504_state' drivers/iio/dac/ad5504.c:58: warning: Function parameter or member 'pwr_down_mode' not described in 'ad5504_state' drivers/iio/dac/ad5504.c:64: warning: cannot understand function prototype: 'enum ad5504_supported_device_ids ' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 7574f1b4c37f86d92bc09a0ab488e57db1268683 Author: Lee Jones Date: Fri Jul 17 17:55:19 2020 +0100 iio: adc: ad799x: Demote seemingly unintentional kerneldoc header This is the only use of function related kerneldoc in the sourcefile and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/ad799x.c:192: warning: Function parameter or member 'irq' not described in 'ad799x_trigger_handler' drivers/iio/adc/ad799x.c:192: warning: Function parameter or member 'p' not described in 'ad799x_trigger_handler' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit f356615f38910dd807c1581f6fa27a104ec4b5be Author: Lee Jones Date: Fri Jul 17 17:55:18 2020 +0100 iio: light: us5182d: Fix formatting in kerneldoc function block Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/light/us5182d.c:457: warning: Function parameter or member 'data' not described in 'us5182d_update_dark_th' drivers/iio/light/us5182d.c:457: warning: Function parameter or member 'index' not described in 'us5182d_update_dark_th' drivers/iio/light/us5182d.c:479: warning: Function parameter or member 'data' not described in 'us5182d_apply_scale' drivers/iio/light/us5182d.c:479: warning: Function parameter or member 'index' not described in 'us5182d_apply_scale' Cc: Adriana Reus Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 7390192bc33c7e52876a32e5a6e133c6b376476d Author: Lee Jones Date: Fri Jul 17 17:55:17 2020 +0100 iio: temperature: mlx90632: Function parameter descriptions must match exactly '*'s are not welcome in kerneldoc parameter names. Fixes the following W=1 kernel build warning(s): drivers/iio/temperature/mlx90632.c:175: warning: Function parameter or member 'data' not described in 'mlx90632_perform_measurement' Signed-off-by: Lee Jones Acked-by: Crt Mori Signed-off-by: Jonathan Cameron commit 43b0f92990805ea3156b1c490cb06992d02ee9f2 Author: Lee Jones Date: Fri Jul 17 17:55:15 2020 +0100 iio: light: si1145: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here Fixes the following W=1 kernel build warning(s): drivers/iio/light/si1145.c:192: warning: Function parameter or member 'data' not described in '__si1145_command_reset' drivers/iio/light/si1145.c:228: warning: Function parameter or member 'data' not described in 'si1145_command' drivers/iio/light/si1145.c:228: warning: Function parameter or member 'cmd' not described in 'si1145_command' drivers/iio/light/si1145.c:1186: warning: Function parameter or member 'trig' not described in 'si1145_trigger_set_state' drivers/iio/light/si1145.c:1186: warning: Function parameter or member 'state' not described in 'si1145_trigger_set_state' Cc: Chuhong Yuan Cc: Dan Leonard Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 0f2a3461acbb09cad0e26307bbf5492fb43627e7 Author: Lee Jones Date: Fri Jul 17 17:55:14 2020 +0100 iio: dac: ltc2632: Fix formatting in kerneldoc struct header Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ltc2632.c:50: warning: Function parameter or member 'powerdown_cache_mask' not described in 'ltc2632_state' drivers/iio/dac/ltc2632.c:50: warning: Function parameter or member 'vref_mv' not described in 'ltc2632_state' drivers/iio/dac/ltc2632.c:50: warning: Function parameter or member 'vref_reg' not described in 'ltc2632_state' Cc: Liam Girdwood Cc: Mark Brown Cc: "Uwe Kleine-König" Cc: Silvan Murer Cc: Maxime Roussin-Belanger Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit dd54f40ac3a9b36ef2ea7c4d1bbeb46d3a1828e5 Author: Lee Jones Date: Fri Jul 17 17:55:13 2020 +0100 iio: adc: twl6030-gpadc: Fix some misdocumentation and formatting issues Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/twl6030-gpadc.c:110: warning: Function parameter or member 'ideal' not described in 'twl6030_gpadc_platform_data' drivers/iio/adc/twl6030-gpadc.c:110: warning: Function parameter or member 'channel_to_reg' not described in 'twl6030_gpadc_platform_data' Cc: Stephen Boyd Cc: Nishant Kamat Cc: Balaji T K Cc: Graeme Gregory Cc: Girish S Ghongdemath Cc: Ambresh K Cc: Oleksandr Kozaruk Cc: Mikko Ylinen Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 5e2b006d800d7e5cc4a55047eebb6e5157e7c57f Author: Lee Jones Date: Fri Jul 17 17:55:12 2020 +0100 iio: magnetometer: hmc5843: 'hmc5843_pm_ops' is unused in 1 of 3 files including hmc5843_core.h We know that it's okay for 'hmc5843_pm_ops' to be unused here. Fixes the following W=1 kernel build warning(s): In file included from include/linux/device.h:25, from include/linux/iio/iio.h:10, from drivers/iio/magnetometer/hmc5843_core.c:16: drivers/iio/magnetometer/hmc5843.h:55:26: warning: ‘hmc5843_pm_ops’ defined but not used [-Wunused-const-variable=] 55 | static SIMPLE_DEV_PM_OPS(hmc5843_pm_ops, | ^~~~~~~~~~~~~~ include/linux/pm.h:354:25: note: in definition of macro ‘SIMPLE_DEV_PM_OPS’ 354 | const struct dev_pm_ops name = { | ^~~~ Cc: Josef Gajdusek Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 2006cf16e6b55d8909e0233cfaea00e35f745af9 Author: Lee Jones Date: Fri Jul 17 17:55:11 2020 +0100 iio: adc: twl4030-madc: Fix misnamed struct attribute Fixes the following W=1 kernel build warning(s): drivers/iio/adc/twl4030-madc.c:170: warning: Function parameter or member 'usb3v1' not described in 'twl4030_madc_data' Also drop a duplicate description of the lock. Cc: J Keerthy Cc: Mikko Ylinen Cc: Amit Kucheria Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 8856d5c741a687c2ea9b09838f160419ca48450b Author: Lee Jones Date: Fri Jul 17 17:55:10 2020 +0100 iio: adc: twl4030-madc: Remove set but unused variables 'len' Fixes the following W=1 kernel build warning(s): drivers/iio/adc/twl4030-madc.c: In function ‘twl4030_madc_threaded_irq_handler’: drivers/iio/adc/twl4030-madc.c:475:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable] 475 | int i, len, ret; | ^~~ Cc: Sebastian Reichel Cc: J Keerthy Cc: Mikko Ylinen Cc: Amit Kucheria Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit f83d87a0d6f143b7c452e3841ea7cd1bcc1ea8d9 Author: Lee Jones Date: Fri Jul 17 17:55:09 2020 +0100 iio: adc: ti_am335x_adc: Remove a couple of unused 'read' variables Fixes the following W=1 kernel build warning(s): drivers/iio/adc/ti_am335x_adc.c: In function ‘tiadc_buffer_preenable’: drivers/iio/adc/ti_am335x_adc.c:297:21: warning: variable ‘read’ set but not used [-Wunused-but-set-variable] 297 | int i, fifo1count, read; | ^~~~ drivers/iio/adc/ti_am335x_adc.c: In function ‘tiadc_buffer_predisable’: drivers/iio/adc/ti_am335x_adc.c:346:21: warning: variable ‘read’ set but not used [-Wunused-but-set-variable] 346 | int fifo1count, i, read; | ^~~~ Cc: Rachna Patil Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 0d674449f4119d3e3473d3f8d3072e68deb3b219 Author: Lee Jones Date: Thu Jul 16 14:59:27 2020 +0100 iio: imu: kmx61: Fix formatting in kerneldoc function headers Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'data' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'mode' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'device' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:327: warning: Function parameter or member 'update' not described in 'kmx61_set_mode' drivers/iio/imu/kmx61.c:731: warning: Function parameter or member 'data' not described in 'kmx61_set_power_state' drivers/iio/imu/kmx61.c:731: warning: Function parameter or member 'on' not described in 'kmx61_set_power_state' drivers/iio/imu/kmx61.c:731: warning: Function parameter or member 'device' not described in 'kmx61_set_power_state' Cc: Daniel Baluta Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit faa4540ef4438ece0315ef0d30e9d4ddc8d36dd0 Author: Lee Jones Date: Thu Jul 16 14:59:26 2020 +0100 iio: magnetometer: mmc35240: Fix function header formatting All lines in the header must start with " *". Fixes the following W=1 kernel build warning(s): drivers/iio/magnetometer/mmc35240.c:304: warning: bad line: compensation for output value. Cc: Daniel Baluta Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 61f3e708ccc32c2b233777a5f69c5bb060854cee Author: Lee Jones Date: Thu Jul 16 14:59:25 2020 +0100 iio: light: cm32181: Fix formatting and docrot issues in cm32181_acpi_get_cpm() Fixes the following W=1 kernel build warning(s): drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'dev' not described in 'cm32181_acpi_get_cpm' drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'obj_name' not described in 'cm32181_acpi_get_cpm' drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'values' not described in 'cm32181_acpi_get_cpm' drivers/iio/light/cm32181.c:107: warning: Function parameter or member 'count' not described in 'cm32181_acpi_get_cpm' Cc: Kevin Tsai Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 3b1c0b129590d796f2328de97d80da5a36faefc3 Author: Lee Jones Date: Thu Jul 16 14:59:24 2020 +0100 iio: dac: ad5791: Complete 'struct ad5791_chip_info' documentation ... and remove seemingly pointless comment. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'ctrl' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'pwr_down_mode' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'pwr_down' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:97: warning: Function parameter or member 'data' not described in 'ad5791_state' drivers/iio/dac/ad5791.c:103: warning: cannot understand function prototype: 'enum ad5791_supported_device_ids ' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit d808988e7dc16d3cbac5cf2f46985f0267589421 Author: Lee Jones Date: Thu Jul 16 14:59:23 2020 +0100 iio: dac: ad5764: Fix misdocumenting and formatting error Attribute descriptions must match the name exactly. Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5764.c:42: warning: Function parameter or member 'channels' not described in 'ad5764_chip_info' drivers/iio/dac/ad5764.c:67: warning: Function parameter or member 'lock' not described in 'ad5764_state' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 53001d556fbc4dc4e16cc0acbc976bc20c6be338 Author: Lee Jones Date: Thu Jul 16 14:59:22 2020 +0100 iio: dac: ad5761: Fix kerneldoc attribute formatting for 'lock' Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5761.c:80: warning: Function parameter or member 'lock' not described in 'ad5761_state' Cc: Michael Hennerich Cc: Liam Girdwood Cc: Mark Brown Cc: Ricardo Ribalda Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit ac09f3d526455bd4f4c0bed9ae7c4d66dd48237b Author: Lee Jones Date: Thu Jul 16 14:59:21 2020 +0100 iio: dac: ad5758: Move and fix-up kerneldoc header and demote unworthy kerneldoc Kerneldoc headers need to come directly before the function/struct that they are documenting. Also fix some missing descriptions and misspellings. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5758.c:111: warning: Function parameter or member 'reg' not described in 'ad5758_range' drivers/iio/dac/ad5758.c:111: warning: Function parameter or member 'min' not described in 'ad5758_range' drivers/iio/dac/ad5758.c:111: warning: Function parameter or member 'max' not described in 'ad5758_range' drivers/iio/dac/ad5758.c:122: warning: Function parameter or member 'gpio_reset' not described in 'ad5758_state' drivers/iio/dac/ad5758.c:122: warning: Function parameter or member 'd32' not described in 'ad5758_state' drivers/iio/dac/ad5758.c:137: warning: cannot understand function prototype: 'enum ad5758_output_range ' Cc: Michael Hennerich Cc: Stefan Popa Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit f165a54e11e97a299c19eb1aa5b1550a774cf44f Author: Lee Jones Date: Thu Jul 16 14:59:20 2020 +0100 iio: dac: ad5755: Fix kerneldoc attribute formatting for 'lock' Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5755.c:105: warning: Function parameter or member 'lock' not described in 'ad5755_state' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 9cf23b6ba5adb56e62cd579858b3dc97a4ce9132 Author: Lee Jones Date: Thu Jul 16 14:59:19 2020 +0100 iio: dac: ad5449: Fix kerneldoc attribute formatting for 'lock' Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5449.c:75: warning: Function parameter or member 'lock' not described in 'ad5449' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit af390b8c0a8f5cc0e4a08f1dd2d460de78cffa34 Author: Lee Jones Date: Thu Jul 16 14:59:18 2020 +0100 iio: dac: ad5446: Complete 'struct ad5446_state' doc and demote unworthy kerneldocs Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'dev' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'cached_val' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'pwr_down_mode' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'pwr_down' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:48: warning: Function parameter or member 'lock' not described in 'ad5446_state' drivers/iio/dac/ad5446.c:323: warning: cannot understand function prototype: 'enum ad5446_supported_spi_device_ids ' drivers/iio/dac/ad5446.c:545: warning: cannot understand function prototype: 'enum ad5446_supported_i2c_device_ids ' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit dd2e16cf482d98ab2dd938f08d79d9f6d869730f Author: Lee Jones Date: Thu Jul 16 14:59:16 2020 +0100 iio: dummy: iio_simple_dummy_buffer: Demote file header and correct misspelling File headers are not good candidates for kerneldoc. Fixes the following W=1 kernel build warning(s): drivers/iio/dummy/iio_simple_dummy_buffer.c:27: warning: cannot understand function prototype: 'const s16 fakedata[] = ' drivers/iio/dummy/iio_simple_dummy_buffer.c:185: warning: Function parameter or member 'indio_dev' not described in 'iio_simple_dummy_unconfigure_buffer' drivers/iio/dummy/iio_simple_dummy_buffer.c:185: warning: Excess function parameter 'indo_dev' description in 'iio_simple_dummy_unconfigure_buffer' Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 05eb6d32ddf09391f7b5fe543322ab744eb4fbc2 Author: Lee Jones Date: Thu Jul 16 14:59:14 2020 +0100 iio: adc: ad7887: Demote seemingly unintentional kerneldoc header This is the only use of function related kerneldoc in the sourcefile and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/ad7887.c:119: warning: Function parameter or member 'irq' not described in 'ad7887_trigger_handler' drivers/iio/adc/ad7887.c:119: warning: Function parameter or member 'p' not described in 'ad7887_trigger_handler' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit d3c90aa7858a93ec7219f427a2855e8daddea5c5 Author: Lee Jones Date: Thu Jul 16 14:59:12 2020 +0100 iio: dac: ad5064: Value returned by ad5064_vref_name may not be 'const * const' Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5064.c:790:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] 790 | static const char * const ad5064_vref_name(struct ad5064_state *st, | ^~~~~ Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 5a0a845529230f799c78100643e1c4bb52a17e0e Author: Lee Jones Date: Thu Jul 16 14:59:11 2020 +0100 iio: dummy: iio_simple_dummy_events: Demote file header and supply descriptions for val2 params File headers are not good candidates for kerneldoc. Fixes the following W=1 kernel build warning(s): drivers/iio/dummy/iio_simple_dummy_events.c:21: warning: Incorrect use of kernel-doc format: * iio_simple_dummy_read_event_config() - is event enabled? drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'indio_dev' not described in 'iio_simple_dummy_read_event_config' drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'chan' not described in 'iio_simple_dummy_read_event_config' drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'type' not described in 'iio_simple_dummy_read_event_config' drivers/iio/dummy/iio_simple_dummy_events.c:34: warning: Function parameter or member 'dir' not described in 'iio_simple_dummy_read_event_config' drivers/iio/dummy/iio_simple_dummy_events.c:123: warning: Function parameter or member 'val2' not described in 'iio_simple_dummy_read_event_value' drivers/iio/dummy/iio_simple_dummy_events.c:146: warning: Function parameter or member 'val2' not described in 'iio_simple_dummy_write_event_value' Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 140d55329ff9c4b20dd1572235bca328ce39dc2f Author: Lee Jones Date: Thu Jul 16 14:59:09 2020 +0100 iio: dac: ad5421: Fix kerneldoc attribute formatting for 'lock' Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5421.c:82: warning: Function parameter or member 'lock' not described in 'ad5421_state' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit bc022cb75f3fea78d5ebac72750d574630aa2a2f Author: Lee Jones Date: Thu Jul 16 14:59:08 2020 +0100 iio: dummy: iio_simple_dummy: Add newline after function-end Fixes the following checkpatch.pl warning(s): CHECK: Please use a blank line after function/struct/union/enum declarations #46: FILE: drivers/iio/dummy/iio_simple_dummy.c:690: } +/* total: 0 errors, 0 warnings, 1 checks, 22 lines checked Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 36d1368dd3374099b7ddd63c38b198166a2c11fb Author: Lee Jones Date: Thu Jul 16 14:59:07 2020 +0100 iio: dummy: iio_simple_dummy: Demote unworthy kerneldocs and correct wrong parameter in docs File header comments are not good candidates for kerneldoc. Neither are generic comment blocks. Fixes the following W=1 kernel build warning(s): drivers/iio/dummy/iio_simple_dummy.c:26: warning: cannot understand function prototype: 'const struct config_item_type iio_dummy_type = ' drivers/iio/dummy/iio_simple_dummy.c:564: warning: Function parameter or member 'name' not described in 'iio_dummy_probe' drivers/iio/dummy/iio_simple_dummy.c:564: warning: Excess function parameter 'index' description in 'iio_dummy_probe' drivers/iio/dummy/iio_simple_dummy.c:700: warning: cannot understand function prototype: 'const struct iio_sw_device_ops iio_dummy_device_ops = ' Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 12630129f2bf39ad4dba7af37abe0b7cff5297cb Author: Lee Jones Date: Thu Jul 16 14:59:06 2020 +0100 iio: dac: ad5380: Fix kerneldoc attribute formatting for 'lock' Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5380.c:64: warning: Function parameter or member 'lock' not described in 'ad5380_state' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit a73051fcb194e9500b20c4faffb84edbfcc43f63 Author: Lee Jones Date: Thu Jul 16 14:59:05 2020 +0100 iio: dac: ad5360: Fix kerneldoc attribute formatting for 'lock' Kerneldoc expects attributes/parameters to be in '@*.: ' format. Fixes the following W=1 kernel build warning(s): drivers/iio/dac/ad5360.c:89: warning: Function parameter or member 'lock' not described in 'ad5360_state' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 700b60e1c8bd63681c5142e2d9fc726c2878b4d5 Author: Lee Jones Date: Thu Jul 16 14:59:04 2020 +0100 iio: adc: ad7923: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document either of the demoted functions here Fixes the following W=1 kernel build warning(s): drivers/iio/adc/ad7923.c:159: warning: Function parameter or member 'indio_dev' not described in 'ad7923_update_scan_mode' drivers/iio/adc/ad7923.c:159: warning: Function parameter or member 'active_scan_mask' not described in 'ad7923_update_scan_mode' drivers/iio/adc/ad7923.c:202: warning: Function parameter or member 'irq' not described in 'ad7923_trigger_handler' drivers/iio/adc/ad7923.c:202: warning: Function parameter or member 'p' not described in 'ad7923_trigger_handler' Cc: Michael Hennerich Cc: Patrick Vasseur Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit b5d214deacd323910fca2edb93920c88d2e015f3 Author: Lee Jones Date: Thu Jul 16 14:59:02 2020 +0100 iio: adc: ad7298: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document either of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/iio/adc/ad7298.c:106: warning: Function parameter or member 'indio_dev' not described in 'ad7298_update_scan_mode' drivers/iio/adc/ad7298.c:106: warning: Function parameter or member 'active_scan_mask' not described in 'ad7298_update_scan_mode' drivers/iio/adc/ad7298.c:154: warning: Function parameter or member 'irq' not described in 'ad7298_trigger_handler' drivers/iio/adc/ad7298.c:154: warning: Function parameter or member 'p' not described in 'ad7298_trigger_handler' Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 8a6cf8ad395d3d69337e04824116ac14cf0ce5b3 Author: Lee Jones Date: Thu Jul 16 14:59:01 2020 +0100 iio: common: ms_sensors: ms_sensors_i2c: Fix misspelling of parameter 'client' Probably due to docrot. Fixes the following W=1 kernel build warning(s): drivers/iio/common/ms_sensors/ms_sensors_i2c.c:186: warning: Function parameter or member 'client' not described in 'ms_sensors_read_serial' drivers/iio/common/ms_sensors/ms_sensors_i2c.c:186: warning: Excess function parameter 'cli' description in 'ms_sensors_read_serial' Cc: William Markezana Cc: Ludovic Tancerel Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 2d815b84156e9888b851f2892d7b0075b1e972ae Author: Lee Jones Date: Thu Jul 16 14:59:00 2020 +0100 iio: accel: bma220_spi: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct 'bma220_acpi_id' becomes defined but unused. Fixes the following W=1 kernel build warning(s): drivers/iio/accel/bma220_spi.c:312:36: warning: ‘bma220_acpi_id’ defined but not used [-Wunused-const-variable=] 312 | static const struct acpi_device_id bma220_acpi_id[] = { | ^~~~~~~~~~~~~~ Cc: Tiberiu Breana Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 0232d07cb22ccea3e79f7ab8bda51dc061475a70 Author: Lee Jones Date: Thu Jul 16 14:58:59 2020 +0100 iio: adc: ad_sigma_delta: Remove unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/iio/adc/ad_sigma_delta.c: In function ‘ad_sd_trigger_handler’: drivers/iio/adc/ad_sigma_delta.c:405:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 405 | int ret; | ^~~ Cc: Michael Hennerich Signed-off-by: Lee Jones Signed-off-by: Jonathan Cameron commit 9ff416cf45a08f28167b75045222c762a0347930 Author: Marek Szyprowski Date: Tue Jul 14 08:47:59 2020 +0200 ARM: dts: exynos: Disable frequency scaling for FSYS bus on Odroid XU3 family Commit 1019fe2c7280 ("ARM: dts: exynos: Adjust bus related OPPs to the values correct for Exynos5422 Odroids") changed the parameters of the OPPs for the FSYS bus. Besides the frequency adjustments, it also removed the 'shared-opp' property from the OPP table used for FSYS_APB and FSYS busses. This revealed that in fact the FSYS bus frequency scaling never worked. When one OPP table is marked as 'opp-shared', only the first bus which selects the OPP sets the rate of its clock. Then OPP core assumes that the other busses have been changed to that OPP and no change to their clock rates are needed. Thus when FSYS_APB bus, which was registered first, set the rate for its clock, the OPP core did not change the FSYS bus clock later. The mentioned commit removed that behavior, what introduced a regression on some Odroid XU3 boards. Frequency scaling of the FSYS bus causes instability of the USB host operation, what can be observed as network hangs. To restore old behavior, simply disable frequency scaling for the FSYS bus. Reported-by: Willy Wolff Fixes: 1019fe2c7280 ("ARM: dts: exynos: Adjust bus related OPPs to the values correct for Exynos5422 Odroids") Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit c4d41d00552754cc8cdd66a52da9b7c203884d49 Merge: fadbfc38dde26 ba47d845d715a Author: Greg Kroah-Hartman Date: Mon Jul 20 09:43:40 2020 +0200 Merge v5.8-rc6 into char-misc-next We need the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit eed3c957dd8cb794d6010137266cd91e0502c86d Merge: 313da01ad5247 ba47d845d715a Author: Greg Kroah-Hartman Date: Mon Jul 20 09:41:30 2020 +0200 Merge 5.8-rc6 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 6f2c6599ba70da7ca9603f8026c4e3cdc273ee02 Merge: ea1be1e59b190 ba47d845d715a Author: Greg Kroah-Hartman Date: Mon Jul 20 09:39:11 2020 +0200 Merge 5.8-rc6 into tty-next We need the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 263771dbc85bc6573b344c193351980c27fd2faa Merge: 1f491421c4172 ba47d845d715a Author: Greg Kroah-Hartman Date: Mon Jul 20 09:37:31 2020 +0200 Merge 5.8-rc6 into staging-next We need the staging fixes in here, and it resolves a merge issue with an iio driver. Signed-off-by: Greg Kroah-Hartman commit 6d45fff5ba2ddb5d177115ecd9f6b4d0c9d3c79c Author: Suraj Upadhyay Date: Sat Jul 18 20:39:55 2020 +0530 drm: core: Convert device logging to drm_* functions. Convert device logging with dev_* functions into drm_* functions. The patch has been generated with the coccinelle script below. The script focuses on instances of dev_* functions where the drm device context is clearly visible in its arguments. @@expression E1; expression list E2; @@ -dev_warn(E1->dev, E2) +drm_warn(E1, E2) @@expression E1; expression list E2; @@ -dev_info(E1->dev, E2) +drm_info(E1, E2) @@expression E1; expression list E2; @@ -dev_err(E1->dev, E2) +drm_err(E1, E2) @@expression E1; expression list E2; @@ -dev_info_once(E1->dev, E2) +drm_info_once(E1, E2) @@expression E1; expression list E2; @@ -dev_notice_once(E1->dev, E2) +drm_notice_once(E1, E2) @@expression E1; expression list E2; @@ -dev_warn_once(E1->dev, E2) +drm_warn_once(E1, E2) @@expression E1; expression list E2; @@ -dev_err_once(E1->dev, E2) +drm_err_once(E1, E2) @@expression E1; expression list E2; @@ -dev_err_ratelimited(E1->dev, E2) +drm_err_ratelimited(E1, E2) @@expression E1; expression list E2; @@ -dev_dbg(E1->dev, E2) +drm_dbg(E1, E2) Signed-off-by: Suraj Upadhyay Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200718150955.GA23103@blackclown commit 880a74853a5ea95461b55948d3bed0345d0f96ae Author: Christophe JAILLET Date: Sat Jul 18 09:28:22 2020 +0200 drm/i810: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'i810_dma_initialize()' GFP_KERNEL can be used because its only caller, 'i810_dma_init()', already use it and no lock is taken in the between. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200718072822.339064-1-christophe.jaillet@wanadoo.fr commit 6bdb486c5a628f7a927c2658166e3a5ef1f883e7 Merge: da6d647598a6d ba47d845d715a Author: Greg Kroah-Hartman Date: Mon Jul 20 09:31:35 2020 +0200 Merge 5.8-rc6 into driver-core-next We need the driver core fixes in here too. Signed-off-by: Greg Kroah-Hartman commit 3ffff3c6855bda1b39eae88f3730d2baddce3bfd Merge: 1cc4af412f40b 947fcfeac3295 Author: Dave Airlie Date: Mon Jul 20 17:29:49 2020 +1000 Merge tag 'drm-misc-next-2020-07-16' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.9: UAPI Changes: Cross-subsystem Changes: - Add ckoenig as dma-buf maintainer. - Revert invalid fix for dma-fence-chain, and fix selftest. - Add fixmes to amifb about APUS support. - Use array3_size in fbcon_prepare_logo, and struct_size() in alloc_apertures. - Fix leaks in neofb, fb/savage and omapfb. - Other small fixes to fb code. - Convert some dt bindings to schema for some panels, and fix simple-framebuffer dt example. Core Changes: - Add DRM_FORMAT_MOD_GENERIC_16_16_TILE as alias to DRM_FORMAT_MOD_SAMSUNG_16_16_TILE, as it can be used more generic. - Add support for multiple DispID extension blocks in edid. - Use https instead of http for some of the urls. - Use drm_* macros for logging in mipi-dsi and fb-helper. - Further cleanup ttm_mem_reg handling. - Remove duplicated words in comments. Driver Changes: - Use __drm_atomic_helper_crtc_reset in all atomic drivers. - Add Amlogic Video FBC support to meson and fourcc to core. - Refactor hisilicon's hibmc_drv_vdac. - Create a TXP CRTC for vc4. - Rework cursor support in ast. - Fix runtime PM in STM. - Allow bigger cursors in vkms. - Cleanup sg handling in radeon and amdgpu, and stop creating dummy gtt nodes with ttm fixed. - Rework crtc handling in mgag200. - Miscellaneous small fixes to meson, vgem, bridge/dw-hdmi, panel/auo,b116xw03, panel/LG LB070WV8, lima, bridge/sil_sii8620, virtio, tilcdc. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/8b360d65-f228-9286-d247-3004156a5254@linux.intel.com commit 03ba7e00f8054e19ffff4a03018f4e0b13a6f291 Author: Thomas Zimmermann Date: Thu Jul 16 14:53:53 2020 +0200 drm/ast: Use managed MM initialization Cleaning up ast's MM code with ast_mm_fini() resets the write-combine flags on the VRAM I/O memory. Drop ast_mm_fini() in favor of an auto- release callback. Releasing the device also executes the callback. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716125353.31512-7-tzimmermann@suse.de commit 244d012801dae30c91983b360457c78d481584b0 Author: Thomas Zimmermann Date: Thu Jul 16 14:53:52 2020 +0200 drm/ast: Initialize DRAM type before posting GPU Posting the GPU requires the correct DRAM type to be stored in struct ast_private. Therefore first initialize the DRAM info and then post the GPU. This restores the original order of instructions in this function. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Acked-by: Benjamin Herrenschmidt Fixes: bad09da6deab ("drm/ast: Fixed vram size incorrect issue on POWER") Cc: Joel Stanley Cc: Y.C. Chen Cc: Benjamin Herrenschmidt Cc: Dave Airlie Cc: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Emil Velikov Cc: "Y.C. Chen" Cc: # v4.11+ Link: https://patchwork.freedesktop.org/patch/msgid/20200716125353.31512-6-tzimmermann@suse.de commit 0149e7805b3c52753d727a7c519757a77435967b Author: Thomas Zimmermann Date: Thu Jul 16 14:53:51 2020 +0200 drm/ast: Move VRAM size detection to ast_mm.c VRAM size detection is only relevant to the memory management. Move the code into ast_mm.c. While at it, rename the function to ast_get_vram_size(). The function argument's type is now struct ast_private. The result is stored in a local variable and not in struct ast_private any longer. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716125353.31512-5-tzimmermann@suse.de commit 8e46dc585389fedd1563698214b2153825789e1e Author: Thomas Zimmermann Date: Thu Jul 16 14:53:50 2020 +0200 drm/ast: Use managed VRAM-helper initialization As a first step to managed MM code in ast, switch over VRAM MM helpers. v2: * updated to use drmm_vram_helper_init() Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716125353.31512-4-tzimmermann@suse.de commit 48fde424c2f7ea7f6f324dcfd292cc50a850367c Author: Thomas Zimmermann Date: Thu Jul 16 14:53:49 2020 +0200 drm/ast: Rename ast_ttm.c to ast_mm.c Although built upon TTM, the ast driver's VRAM MM helper does not expose TTM to its users. Rename the related ast file to ast_mm.c. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716125353.31512-3-tzimmermann@suse.de commit a5f23a72355d8175506449a8b918785c9cd619ab Author: Thomas Zimmermann Date: Thu Jul 16 14:53:48 2020 +0200 drm/vram-helper: Managed vram helpers Calling drmm_vram_helper_init() sets up a managed instance of VRAM MM. Releasing the DRM device also frees the memory manager. The patch also updates the DRM documentation for VRAM helpers. The tutorial now describes the new managed interface. The old interfaces are deprecated and should not be used in new code. v2: * rename init function to drmm_vram_helper_init() * return errno code from init function; caller does not need vram_mm anyway * update documentation and remove docs for deprecated un-managed functions Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716125353.31512-2-tzimmermann@suse.de commit 4b545ebfc371552cda7ce97a4beb485da9ef89cd Author: Lad Prabhakar Date: Thu Jul 16 18:18:27 2020 +0100 dt-bindings: dma: renesas,usb-dmac: Add binding for r8a774e1 Add binding for R8A774E1 SoC (RZ/G2H). Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-13-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit f13b89900d364ebb72ec2011dd0cf61b7c3bb3d5 Author: Lad Prabhakar Date: Thu Jul 16 18:18:24 2020 +0100 dt-bindings: phy: renesas,usb3-phy: Add r8a774e1 support Document RZ/G2H (R8A774E1) SoC bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-10-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit f199d6a296dce05ba3de40865251320371e68e3d Author: Lad Prabhakar Date: Thu Jul 16 18:18:20 2020 +0100 dt-bindings: phy: renesas,usb2-phy: Add r8a774e1 support Document SoC specific bindings for RZ/G2H (r8a774e1) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-6-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit b59aeb1a59ccece01f4f0c675d18cfac9cc825fb Author: Yoshihiro Shimoda Date: Fri Jul 17 20:44:57 2020 +0900 phy: renesas: rcar-gen3-usb2: exit if request_irq() failed To avoid unexpected behaviors, it's better to exit if request_irq() failed. Suggested-by: Vinod Koul Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1594986297-12434-3-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul commit 08b0ad375ca66181faee725b1b358bcae8d592ee Author: Yoshihiro Shimoda Date: Fri Jul 17 20:44:56 2020 +0900 phy: renesas: rcar-gen3-usb2: move irq registration to init If CONFIG_DEBUG_SHIRQ was enabled, r8a77951-salvator-xs could boot correctly. If we appended "earlycon keep_bootcon" to the kernel command like, we could get kernel log like below. SError Interrupt on CPU0, code 0xbf000002 -- SError CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.8.0-rc3-salvator-x-00505-g6c843129e6faaf01 #785 Hardware name: Renesas Salvator-X 2nd version board based on r8a77951 (DT) pstate: 60400085 (nZCv daIf +PAN -UAO BTYPE=--) pc : rcar_gen3_phy_usb2_irq+0x14/0x54 lr : free_irq+0xf4/0x27c This means free_irq() calls the interrupt handler while PM runtime is not getting if DEBUG_SHIRQ is enabled and rcar_gen3_phy_usb2_probe() failed. To fix the issue, move the irq registration place to rcar_gen3_phy_usb2_init() which is ready to handle the interrupts. Note that after the commit 549b6b55b005 ("phy: renesas: rcar-gen3-usb2: enable/disable independent irqs") which is merged into v5.2, since this driver creates multiple phy instances, needs to check whether one of phy instances is initialized. However, if we backport this patch to v5.1 or less, we don't need to check it because such kernel have single phy instance. Reported-by: Wolfram Sang Reported-by: Geert Uytterhoeven Fixes: 9f391c574efc ("phy: rcar-gen3-usb2: add runtime ID/VBUS pin detection") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1594986297-12434-2-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Vinod Koul commit dc171790c729db72774fd076485b86f92954544b Author: Ansuel Smith Date: Fri Jul 17 15:16:32 2020 +0200 devicetree: bindings: phy: Document ipq806x dwc3 qcom phy Document dwc3 qcom phy hs and ss phy bindings needed to correctly inizialize and use usb on ipq806x SoC. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200717131635.11076-2-ansuelsmth@gmail.com Signed-off-by: Vinod Koul commit ef19b117b83466e1c030368101a24367a34be7f0 Author: Ansuel Smith Date: Fri Jul 17 15:16:31 2020 +0200 phy: qualcomm: add qcom ipq806x dwc usb phy driver This has lost in the original push for the dwc3 qcom driver. This is needed for ipq806x SoC as without this the usb ports doesn't work at all. Signed-off-by: Andy Gross Signed-off-by: Ansuel Smith Tested-by: Jonathan McDowell Link: https://lore.kernel.org/r/20200717131635.11076-1-ansuelsmth@gmail.com Signed-off-by: Vinod Koul commit 0ce0581e6d32040696effd1b2298618c3aa3a595 Author: Joel Stanley Date: Thu Jul 9 19:25:04 2020 +0930 ARM: dts: aspeed: tacoma: Fix gpio-key definitions This patch was applied twice. Signed-off-by: Joel Stanley commit 1daa0147f113a61f2bde2d1dcb4c1d919483dbe5 Author: Andrew Jeffery Date: Tue May 5 16:57:42 2020 +0930 ARM: dts: rainier: Configure ball Y23 as GPIOP7 for MCLR_VPP GPIOP7 is used in the Rainier design to manage the state of a microcontroller elsewhere in the system but its ball, Y23, is the driver of the heartbeat LED on the ast2600-evb and the SoC defaults Y23 at power-on to the pulse-train behaviour used to drive the LED. This causes much confusion for the micro in the Rainier system, so hog the line as early as possible. Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley commit 1b36c0d0eb566cf7a296a8684d8fb91158c7c3eb Author: Eddie James Date: Thu Jan 9 14:08:39 2020 -0600 ARM: dts: aspeed: rainier: Add second cfam on the hub The hub FSI master can access the cfams on two other processors. Reflect this by adding a second cfam to the first hub description. Signed-off-by: Eddie James Tested-by: Andrew Geissler Signed-off-by: Joel Stanley commit 080f88e8400bffeb24afba53c9b43f85ed71e76f Author: Ben Tyner Date: Fri May 29 12:22:00 2020 -0500 ARM: dts: aspeed: rainier: Add line-name checkstop Rainier uses GPIO B6 as the checkstop GPIO. Define the line-name so that this GPIO can be found by name. Signed-off-by: Ben Tyner Signed-off-by: Joel Stanley commit fafc991c887e69cd53ace00e436a844653327110 Author: Ben Tyner Date: Mon Jun 1 13:20:22 2020 -0500 ARM: dts: aspeed: tacoma: Remove checkstop gpio-key The attention handler will monitor the checkstop gpio via the character device interface so it needs to not be defined. Signed-off-by: Ben Tyner Signed-off-by: Joel Stanley commit 965e0e26d62b850ab2ae4401e76cde06e9dc3656 Author: Eddie James Date: Tue May 5 11:58:25 2020 -0500 ARM: dts: aspeed: tacoma: Enable XDMA engine Add a reserved memory node for the VGA memory. Add the XDMA engine node, enable it, and point it's memory region to the VGA memory. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit 67268c28cc5f478e81022ebc37d6323dc68f7047 Author: Eddie James Date: Tue May 5 11:58:24 2020 -0500 ARM: dts: aspeed: witherspoon: Enable XDMA engine Add a reserved memory node for the VGA memory. Add the XDMA engine node, enable it, and point it's memory region to the VGA memory. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit 645afe73f9512ee2fc636b741cacd23a513eb8d6 Author: Eddie James Date: Tue May 5 11:58:22 2020 -0500 ARM: dts: aspeed: ast2600: Update XDMA engine node Add the PCI-E root complex reset, correct the pcie-device property, and add the Aspeed SCU interrupt controller include. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit b3e10b5e40eeb9cf2069d960bd09851103087bb2 Author: Eddie James Date: Tue May 5 11:58:23 2020 -0500 ARM: dts: aspeed: ast2500: Update XDMA engine node Correct the pcie-device property, and add the Aspeed SCU interrupt controller include. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit 983467bef4519d9ec11c11c8532cd1a5e210ae6c Author: Chris Healy Date: Wed Jul 15 15:07:58 2020 -0700 ARM: dts: vf610-zii-ssmb-spu3: Add node for switch watchdog Add I2C child node for switch watchdog present on SPU3 Signed-off-by: Chris Healy Signed-off-by: Shawn Guo commit 2b4bd73493667a37899b4481dfd2730825d74bf4 Author: Chris Healy Date: Wed Jul 15 14:31:48 2020 -0700 ARM: dts: vf610-zii-ssmb-dtu: Add no-sdio/no-sd properties esdhc0 is connected to an eMMC, so it is safe to pass the "no-sdio"/"no-sd" properties. esdhc1 is wired to a standard SD socket, so pass the "no-sdio" property. Signed-off-by: Chris Healy Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 7339115a8bee885928a13b9fc066001a5deeb353 Author: Biwen Li Date: Tue Jul 14 15:08:28 2020 +0800 arm64: dts: lx2160a-rdb: fix shunt-resistor value Fix value of shunt-resistor property. The LX2160A-RDB has 500 uOhm shunt for the INA220, not 1000 uOhm. Unless it will get wrong power consumption(1/2) Signed-off-by: Biwen Li Signed-off-by: Shawn Guo commit 120c7dd52213d86ca65a76127b9a69b1cae132d0 Merge: eba75c587e811 ecf9f9b77c637 Author: David S. Miller Date: Sun Jul 19 19:22:57 2020 -0700 Merge branch 'Fully-describe-the-waveform-for-PTP-periodic-output' Vladimir Oltean says: ==================== Fully describe the waveform for PTP periodic output While using the ancillary pin functionality of PTP hardware clocks to synchronize multiple DSA switches on a board, a need arised to be able to configure the duty cycle of the master of this PPS hierarchy. Also, the PPS master is not able to emit PPS starting from arbitrary absolute times, so a new flag is introduced to support such hardware without making guesses. With these patches, struct ptp_perout_request now basically describes a general-purpose square wave. Changes in v2: Made sure this applies to net-next. ==================== Signed-off-by: David S. Miller commit ecf9f9b77c637a3d9347a7c85b33964abac989ac Author: Vladimir Oltean Date: Fri Jul 17 01:45:31 2020 +0300 net: mscc: ocelot: add support for PTP waveform configuration For PPS output (perout period is 1.000000000), accept the new "phase" parameter from the periodic output request structure. For both PPS and freeform output, accept the new "on" argument for specifying the duty cycle of the generated signal. Preserve the old defaults for this "on" time: 1 us for PPS, and half the period for freeform output. Also preserve the old behavior that accepted the "phase" via the "start" argument. Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Signed-off-by: David S. Miller commit b6bd41363a1ca39282496803cc32f7515ed917fe Author: Vladimir Oltean Date: Fri Jul 17 01:45:30 2020 +0300 ptp: introduce a phase offset in the periodic output request Some PHCs like the ocelot/felix switch cannot emit generic periodic output, but just PPS (pulse per second) signals, which: - don't start from arbitrary absolute times, but are rather phase-aligned to the beginning of [the closest next] second. - have an optional phase offset relative to that beginning of the second. For those, it was initially established that they should reject any other absolute time for the PTP_PEROUT_REQUEST than 0.000000000 [1]. But when it actually came to writing an application [2] that makes use of this functionality, we realized that we can't really deal generically with PHCs that support absolute start time, and with PHCs that don't, without an explicit interface. Namely, in an ideal world, PHC drivers would ensure that the "perout.start" value written to hardware will result in a functional output. This means that if the PTP time has become in the past of this PHC's current time, it should be automatically fast-forwarded by the driver into a close enough future time that is known to work (note: this is necessary only if the hardware doesn't do this fast-forward by itself). But we don't really know what is the status for PHC drivers in use today, so in the general sense, user space would be risking to have a non-functional periodic output if it simply asked for a start time of 0.000000000. So let's introduce a flag for this type of reduced-functionality hardware, named PTP_PEROUT_PHASE. The start time is just "soon", the only thing we know for sure about this signal is that its rising edge events, Rn, occur at: Rn = perout.phase + n * perout.period The "phase" in the periodic output structure is simply an alias to the "start" time, since both cannot logically be specified at the same time. Therefore, the binary layout of the structure is not affected. [1]: https://patchwork.ozlabs.org/project/netdev/patch/20200320103726.32559-7-yangbo.lu@nxp.com/ [2]: https://www.mail-archive.com/linuxptp-devel@lists.sourceforge.net/msg04142.html Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f65b71aa25a65e13cf3d10445a48c63d3eeb942e Author: Vladimir Oltean Date: Fri Jul 17 01:45:29 2020 +0300 ptp: add ability to configure duty cycle for periodic output There are external event timestampers (PHCs with support for PTP_EXTTS_REQUEST) that timestamp both event edges. When those edges are very close (such as in the case of a short pulse), there is a chance that the collected timestamp might be of the rising, or of the falling edge, we never know. There are also PHCs capable of generating periodic output with a configurable duty cycle. This is good news, because we can space the rising and falling edge out enough in time, that the risks to overrun the 1-entry timestamp FIFO of the extts PHC are lower (example: the perout PHC can be configured for a period of 1 second, and an "on" time of 0.5 seconds, resulting in a duty cycle of 50%). A flag is introduced for signaling that an on time is present in the perout request structure, for preserving compatibility. Logically speaking, the duty cycle cannot exceed 100% and the PTP core checks for this. PHC drivers that don't support this flag emit a periodic output of an unspecified duty cycle, same as before. The duty cycle is encoded as an "on" time, similar to the "start" and "period" times, and reuses the reserved space while preserving overall binary layout. Pahole reported before: struct ptp_perout_request { struct ptp_clock_time start; /* 0 16 */ struct ptp_clock_time period; /* 16 16 */ unsigned int index; /* 32 4 */ unsigned int flags; /* 36 4 */ unsigned int rsv[4]; /* 40 16 */ /* size: 56, cachelines: 1, members: 5 */ /* last cacheline: 56 bytes */ }; And now: struct ptp_perout_request { struct ptp_clock_time start; /* 0 16 */ struct ptp_clock_time period; /* 16 16 */ unsigned int index; /* 32 4 */ unsigned int flags; /* 36 4 */ union { struct ptp_clock_time on; /* 40 16 */ unsigned int rsv[4]; /* 40 16 */ }; /* 40 16 */ /* size: 56, cachelines: 1, members: 5 */ /* last cacheline: 56 bytes */ }; Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 198cf42cd82f4563baa34fa90aebdf6cfda60a9d Author: Fabio Estevam Date: Mon Jul 13 10:05:09 2020 -0300 ARM: dts: imx6q-tbs2910: Pass reset-assert-us According to the AR8035 datasheet: "When using crystal, the clock is generated internally after power is stable. For a reliable power on reset, suggest to keep asserting the reset low long enough (10ms) to ensure the clock is stable and clock-to-reset 1ms requirement is satisfied." Pass the 'reset-assert-us' property to describe such requirement. While at it, use the 'reset-gpios' property inside the the mdio node instead of the deprecated usage of 'phy-reset-gpios'. Signed-off-by: Fabio Estevam Reviewed-by: Soeren Moch Signed-off-by: Shawn Guo commit 9c852ad98f2c65bca263cf53d46b3eb851713b0e Author: Fabio Estevam Date: Mon Jul 13 10:05:08 2020 -0300 ARM: dts: imx6q-tbs2910: Add an mdio node imx6q-tbs2910 has an Atheros AR8035 Ethernet PHY at address 4. The AR8035 provides a 125MHz clock to the ENET_REF_CLK i.MX6 pin. Improve the Ethernet representation by adding an mdio node with such information. This fixes an Ethernet regression in U-Boot as U-Boot AR803X driver now expects the 'qca,clk-out-frequency' property to be passed via device tree. Signed-off-by: Fabio Estevam Reviewed-by: Soeren Moch Tested-by: Soeren Moch Signed-off-by: Shawn Guo commit eba75c587e811d3249c8bd50d22bb2266ccd3c0f Author: Willem de Bruijn Date: Fri Jul 10 09:29:02 2020 -0400 icmp: support rfc 4884 Add setsockopt SOL_IP/IP_RECVERR_4884 to return the offset to an extension struct if present. ICMP messages may include an extension structure after the original datagram. RFC 4884 standardized this behavior. It stores the offset in words to the extension header in u8 icmphdr.un.reserved[1]. The field is valid only for ICMP types destination unreachable, time exceeded and parameter problem, if length is at least 128 bytes and entire packet does not exceed 576 bytes. Return the offset to the start of the extension struct when reading an ICMP error from the error queue, if it matches the above constraints. Do not return the raw u8 field. Return the offset from the start of the user buffer, in bytes. The kernel does not return the network and transport headers, so subtract those. Also validate the headers. Return the offset regardless of validation, as an invalid extension must still not be misinterpreted as part of the original datagram. Note that !invalid does not imply valid. If the extension version does not match, no validation can take place, for instance. For backward compatibility, make this optional, set by setsockopt SOL_IP/IP_RECVERR_RFC4884. For API example and feature test, see github.com/wdebruij/kerneltools/blob/master/tests/recv_icmp_v2.c For forward compatibility, reserve only setsockopt value 1, leaving other bits for additional icmp extensions. Changes v1->v2: - convert word offset to byte offset from start of user buffer - return in ee_data as u8 may be insufficient - define extension struct and object header structs - return len only if constraints met - if returning len, also validate Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit cfe7d1bd1122a3860ac4f3256c6e8fcba3ae9a2f Author: Fabio Estevam Date: Mon Jul 13 10:04:16 2020 -0300 ARM: dts: imx6qdl-sabresd: Pass reset-assert-us According to the AR8031 datasheet: "When using crystal, clock is generated internally after the power is stable. In order to get reliable power-on-reset, it is recommended to keep asserting the reset low signal long enough (10 ms) to ensure the clock is stable and clock-to-reset (1 ms) requirement is satisfied." Pass the 'reset-assert-us' property to describe such requirement. While at it, use the 'reset-gpios' property inside the the mdio node instead of the deprecated usage of 'phy-reset-gpios'. Signed-off-by: Fabio Estevam Reviewed-by: Soeren Moch Signed-off-by: Shawn Guo commit 91ea910809953beb95246bc3c933bd4e1bffdf59 Author: Fabio Estevam Date: Mon Jul 13 10:04:15 2020 -0300 ARM: dts: imx6qdl-sabresd: Add an mdio node imx6qdl-sabresd has an Atheros AR8031 Ethernet PHY at address 1. The AR8031 provides a 125MHz clock to the ENET_REF_CLK i.MX6 pin. Improve the Ethernet representation by adding an mdio node with such information. An advantage of adding the mdio node is that the AR8031 initialization code in the mx6sabresd board file in U-Boot can totally be removed. Signed-off-by: Fabio Estevam Reviewed-by: Soeren Moch Signed-off-by: Shawn Guo commit d56567dba011fc22f86cd56ca4c954abeaf68d26 Author: Parthiban Nallathambi Date: Mon Jul 13 09:23:19 2020 +0200 dt-bindings: arm: fsl: Add MYiR Tech boards Add entries for MYiR Tech imx6ULL eval boards. Signed-off-by: Parthiban Nallathambi Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 64bf0a0af18d840fc138e10c097cc0ad54f3401a Author: Tim Harvey Date: Thu Jul 16 08:35:55 2020 -0700 ARM: dts: imx6qdl-gw: add Gateworks System Controller support Add Gateworks System Controller support to Gateworks Ventana boards: - add dt bindings for GSC mfd driver and hwmon driver for ADC's and fan controllers. - add dt bindings for gpio-keys driver for push-button and interrupt events Signed-off-by: Tim Harvey Signed-off-by: Shawn Guo commit 930bc4cc359bdf94029ecb867811000dd87a2c3d Merge: bed1ce7876192 c7a3a8cd9d41e Author: David S. Miller Date: Sun Jul 19 18:28:34 2020 -0700 Merge branch 'rework-mvneta-napi_poll-loop-for-XDP-multi-buffers' Lorenzo Bianconi says: ==================== rework mvneta napi_poll loop for XDP multi-buffers Rework mvneta_rx_swbm routine in order to process all rx descriptors before building the skb or run the xdp program attached to the interface. Introduce xdp_get_shared_info_from_{buff,frame} utility routines to get the skb_shared_info pointer from xdp_buff or xdp_frame. This is a preliminary series to enable multi-buffers and jumbo frames for XDP according to [1] [1] https://github.com/xdp-project/xdp-project/blob/master/areas/core/xdp-multi-buffer01-design.org Changes since v1: - rely on skb_frag_* utility routines to access page/offset/len of the xdp multi-buffer ==================== Signed-off-by: David S. Miller commit c7a3a8cd9d41ee0a32659fc99d98ec83af803b77 Author: Lorenzo Bianconi Date: Fri Jul 17 00:16:34 2020 +0200 net: mvneta: move rxq->left_size on the stack Allocate rxq->left_size on mvneta_rx_swbm stack since it is used just in sw bm napi_poll Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 89f4a198c9cad3775f952129a82018b84995d923 Author: Lorenzo Bianconi Date: Fri Jul 17 00:16:33 2020 +0200 net: mvneta: get rid of skb in mvneta_rx_queue Remove skb pointer in mvneta_rx_queue data structure since it is no longer used Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 7d1643ebce125b0f9ed0b886d5c45ae37f750a29 Author: Lorenzo Bianconi Date: Fri Jul 17 00:16:32 2020 +0200 net: mvneta: drop all fragments in XDP_DROP Release all consumed pages if the eBPF program returns XDP_DROP for XDP multi-buffers Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit afda408b61f473d462c1027ad57cd88711a47790 Author: Lorenzo Bianconi Date: Fri Jul 17 00:16:31 2020 +0200 net: mvneta: move mvneta_run_xdp after descriptors processing Move mvneta_run_xdp routine after all descriptor processing. This is a preliminary patch to enable multi-buffers and JUMBO frames support for XDP Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit ca0e014609f05fab577dd251bb5400e815c9f3cf Author: Lorenzo Bianconi Date: Fri Jul 17 00:16:30 2020 +0200 net: mvneta: move skb build after descriptors processing Move skb build after all descriptors processing. This is a preliminary patch to enable multi-buffers and JUMBO frames support for XDP. Introduce mvneta_xdp_put_buff routine to release all pages used by a XDP multi-buffer Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 2f0bc54ba9a85032f2402faf0fccab513848300a Author: Lorenzo Bianconi Date: Fri Jul 17 00:16:29 2020 +0200 xdp: introduce xdp_get_shared_info_from_{buff, frame} utility routines Introduce xdp_get_shared_info_from_{buff,frame} utility routines to get skb_shared_info from xdp buffer/frame pointer. xdp_get_shared_info_from_{buff,frame} will be used to implement xdp multi-buffer support Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit bed1ce78761925785cfccbd73aea2d889f625b68 Merge: 9aa0dfe1fc992 6c8983a606622 Author: David S. Miller Date: Sun Jul 19 18:26:44 2020 -0700 Merge branch 'do-a-single-memdup_user-in-sctp_setsockopt-v2' Christoph Hellwig says: ==================== do a single memdup_user in sctp_setsockopt v2 here is a resend of my series to lift the copy_from_user out of the individual sctp sockopt handlers into the main sctp_setsockopt routine. Changes since v1: - fixes a few sizeof calls. - use memzero_explicit in sctp_setsockopt_auth_key instead of special casing it for a kzfree in the caller - remove some minor cleanups from sctp_setsockopt_autoclose to keep it closer to the existing version - add another little only vaguely related cleanup patch ==================== Signed-off-by: David S. Miller commit 6c8983a606622b61a429830091fdfe643328b96a Author: Christoph Hellwig Date: Sun Jul 19 09:22:28 2020 +0200 sctp: remove the out_nounlock label in sctp_setsockopt This is just used once, and a direct return for the redirect to the AF case is much easier to follow than jumping to the end of a very long function. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 26feba8090773550f255aed911d8f824ca42b7eb Author: Christoph Hellwig Date: Sun Jul 19 09:22:27 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_pf_expose Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 92c4f172552a37f1dbc385615b4497bd15df1d8f Author: Christoph Hellwig Date: Sun Jul 19 09:22:26 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_ecn_supported Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 963855a938cad73b950fb42fa5376e8ab3fd1475 Author: Christoph Hellwig Date: Sun Jul 19 09:22:25 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_auth_supported Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 9263ac97af46e0f31ba38d730e45c64dc701954e Author: Christoph Hellwig Date: Sun Jul 19 09:22:24 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_event Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 565059cb9b24bd7804948802ef38cc99c35c2c64 Author: Christoph Hellwig Date: Sun Jul 19 09:22:23 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_event Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit a42624669e1afd183a82dbfe7cc29cc1a403c1fe Author: Christoph Hellwig Date: Sun Jul 19 09:22:22 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_reuse_port Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 5b8d3b24467a41388097411ac0b2fc1f4b10bbf5 Author: Christoph Hellwig Date: Sun Jul 19 09:22:21 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_interleaving_supported Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit d636e7f31fcc986525cb853f0fabccc2408f0840 Author: Christoph Hellwig Date: Sun Jul 19 09:22:20 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_scheduler_value Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 4d2fba3a7e7bda272447bf77377bf330f8a83ec7 Author: Christoph Hellwig Date: Sun Jul 19 09:22:19 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_scheduler Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 4d6fb2606252a4a001388f52808edbf3c624d033 Author: Christoph Hellwig Date: Sun Jul 19 09:22:18 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_add_streams Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit b97d20ce531e13ce6e65fc8bd2d726a0ec24b5a5 Author: Christoph Hellwig Date: Sun Jul 19 09:22:17 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_reset_assoc Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit d492243435bdffec229b1a9d694e5864e802833a Author: Christoph Hellwig Date: Sun Jul 19 09:22:16 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_reset_streams Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 356dc6f16a96615d89c8aab3ca18c5bc7c3d4baa Author: Christoph Hellwig Date: Sun Jul 19 09:22:15 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_enable_strreset Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 3f49f72035d5625c06a23d72c22feee7f0d2b068 Author: Christoph Hellwig Date: Sun Jul 19 09:22:14 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_reconfig_supported Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit ac37435bfe9e09fc107daf6eddb57831b5961708 Author: Christoph Hellwig Date: Sun Jul 19 09:22:13 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_default_prinfo Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 4a97fa4f099b9ac82d0e0adbd2f63fccf3dd96fc Author: Christoph Hellwig Date: Sun Jul 19 09:22:12 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_pr_supported Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit cfa6fde26642553fcb0cdbfefe80f075eb6173f2 Author: Christoph Hellwig Date: Sun Jul 19 09:22:11 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_recvnxtinfo Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit a98af7c84ad95d45058050ad3b9bb0cd31d93614 Author: Christoph Hellwig Date: Sun Jul 19 09:22:10 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_recvrcvinfo Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit b0ac3bb89464f6c54d860052aa52774c1ab95436 Author: Christoph Hellwig Date: Sun Jul 19 09:22:09 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_paddr_thresholds Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit c9abc2c1c2973a30750fa00bfc912b683d88d1bc Author: Christoph Hellwig Date: Sun Jul 19 09:22:08 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_auto_asconf Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 76b3d0c4455b61f74301a1aae2dcdc243921f379 Author: Christoph Hellwig Date: Sun Jul 19 09:22:07 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_deactivate_key Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 97dc9f2e3e8bdea754f59bd788ce25a0cb11f00d Author: Christoph Hellwig Date: Sun Jul 19 09:22:06 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_del_key Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit dcab0a7a57a4c29e38af17c1106d2217e680995a Author: Christoph Hellwig Date: Sun Jul 19 09:22:05 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_active_key Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 534d13d07e771d090d61cd98f96b2cbf29765cef Author: Christoph Hellwig Date: Sun Jul 19 09:22:04 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_auth_key Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Adapt sctp_setsockopt to use a kzfree for this case. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 89fae01eef8b1572c71d2cfcc3307c1f1e97b778 Author: Christoph Hellwig Date: Sun Jul 19 09:22:03 2020 +0200 sctp: switch sctp_setsockopt_auth_key to use memzero_explicit Switch from kzfree to sctp_setsockopt_auth_key + kfree to prepare for moving the kfree to common code. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 3564ef442a174e42b58a215a55e4f0ef56b5fbb0 Author: Christoph Hellwig Date: Sun Jul 19 09:22:02 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_hmac_ident Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 88266d31b819202ea6aa7d87a3e9aa4b6d6a046f Author: Christoph Hellwig Date: Sun Jul 19 09:22:01 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_auth_chunk Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit f5bee0adb17eaa2f106c895d198b1e8fca96f1de Author: Christoph Hellwig Date: Sun Jul 19 09:22:00 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_maxburst Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 1031cea0019ec967a260ad835c0a5fe03d1b93a5 Author: Christoph Hellwig Date: Sun Jul 19 09:21:59 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_fragment_interleave Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 722eca9ecac7f83a0378fc48aa1acd025d9dd1da Author: Christoph Hellwig Date: Sun Jul 19 09:21:58 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_context Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 07e5035c6f1377e0f07d9dcaa1724c97ac56f543 Author: Christoph Hellwig Date: Sun Jul 19 09:21:57 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_adaptation_layer Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit dcd0357580cde2d058b50037c38ec499e7745497 Author: Christoph Hellwig Date: Sun Jul 19 09:21:56 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_maxseg Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit ffc08f086a563cdd18f43edf574724f65e4bf5e3 Author: Christoph Hellwig Date: Sun Jul 19 09:21:55 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_mappedv4 Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 5b864c8dab18ddc5b34d7e9f5117c7d5185d0d4b Author: Christoph Hellwig Date: Sun Jul 19 09:21:54 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_associnfo Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit af5ae60e426a44003003177b176d60173e98dfa4 Author: Christoph Hellwig Date: Sun Jul 19 09:21:53 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_rtoinfo Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit f87ddbc0c0fbe1f0ebd368b4047c0af0250667c9 Author: Christoph Hellwig Date: Sun Jul 19 09:21:52 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_nodelay Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 46a0ae9de3186897211e04c2ed5d4a06b8b9e1cf Author: Christoph Hellwig Date: Sun Jul 19 09:21:51 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_peer_primary_addr Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 1eec69580414bd9f9be00ab2cf7b69d44adcae17 Author: Christoph Hellwig Date: Sun Jul 19 09:21:50 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_primary_addr Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 8a2409d3566b3965347d73b4ca008eaa76f4bbfc Author: Christoph Hellwig Date: Sun Jul 19 09:21:49 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_default_sndinfo Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit c23ad6d2b71cf2731e162143a6665d6491766c61 Author: Christoph Hellwig Date: Sun Jul 19 09:21:48 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_default_send_param Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 9dfa6f0494899e4643ec82c907a7664777262b8c Author: Christoph Hellwig Date: Sun Jul 19 09:21:47 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_initmsg Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit bb13d647d95bd0fdbc4882c27ea818b4c879263f Author: Christoph Hellwig Date: Sun Jul 19 09:21:46 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_partial_delivery_point Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit ebb25defdc17b594715418f1aa99eeb9a217cf1f Author: Christoph Hellwig Date: Sun Jul 19 09:21:45 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_delayed_ack Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 9b7b0d1a395d54c12be9f18d1bf7be06aecaa785 Author: Christoph Hellwig Date: Sun Jul 19 09:21:44 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_peer_addr_params Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 0b49a65c77d8a4864e1d524dc51c6a4b8a6e1585 Author: Christoph Hellwig Date: Sun Jul 19 09:21:43 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_autoclose Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit a98d21a173d1b6245310e90bbf60ad17125dadf3 Author: Christoph Hellwig Date: Sun Jul 19 09:21:42 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_events Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 1083582558c3bdda87ae13cc6728e17d583b0b74 Author: Christoph Hellwig Date: Sun Jul 19 09:21:41 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_disable_fragments Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit ce5b2f8929df3ecac3cea44371637241ba816827 Author: Christoph Hellwig Date: Sun Jul 19 09:21:40 2020 +0200 sctp: pass a kernel pointer to __sctp_setsockopt_connectx Use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 8c7517f54c8f24f3633383e8b552c1858fe95389 Author: Christoph Hellwig Date: Sun Jul 19 09:21:39 2020 +0200 sctp: pass a kernel pointer to sctp_setsockopt_bindx Rename sctp_setsockopt_bindx_kernel back to sctp_setsockopt_bindx, and use the kernel pointer that sctp_setsockopt has available instead of directly handling the user pointer in the old sctp_setsockopt_bindx. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit ca84bd058daefef1d184dd0a7b6b43c67339e72c Author: Christoph Hellwig Date: Sun Jul 19 09:21:38 2020 +0200 sctp: copy the optval from user space in sctp_setsockopt Prepare for for moving the copy_from_user from the individual sockopts to the main setsockopt helper. As of this commit the kopt variable is not used yet, but the following commits will start using it. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 9aa0dfe1fc9920ad2224b53f9be748c030f0a12e Merge: 089377b7e8e70 a44d9e72100f7 Author: David S. Miller Date: Sun Jul 19 18:16:41 2020 -0700 Merge branch 'sockopt-cleanups' Christoph Hellwig says: ==================== sockopt cleanups this series cleans up various lose ends in the sockopt code, most importantly removing the compat_{get,set}sockopt infrastructure in favor of just using in_compat_syscall() in the few places that care. ==================== Signed-off-by: David S. Miller commit a44d9e72100f7044ac46e4e6dc475f5b4097830f Author: Christoph Hellwig Date: Fri Jul 17 08:23:31 2020 +0200 net: make ->{get,set}sockopt in proto_ops optional Just check for a NULL method instead of wiring up sock_no_{get,set}sockopt. Signed-off-by: Christoph Hellwig Acked-by: Marc Kleine-Budde Signed-off-by: David S. Miller commit 3021ad529950d07e0408d65d0f1df00454c1d223 Author: Christoph Hellwig Date: Fri Jul 17 08:23:30 2020 +0200 net/ipv6: remove compat_ipv6_{get,set}sockopt Handle the few cases that need special treatment in-line using in_compat_syscall(). This also removes all the now unused compat_{get,set}sockopt methods. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit fdf5bdd87c01571f3256a799bdc217e7cca35fbd Author: Christoph Hellwig Date: Fri Jul 17 08:23:29 2020 +0200 net/ipv6: factor out mcast join/leave setsockopt helpers Factor out one helper each for setting the native and compat version of the MCAST_MSFILTER option. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit ca0e65eb295411229a8dbdea01b9379e48d2bf39 Author: Christoph Hellwig Date: Fri Jul 17 08:23:28 2020 +0200 net/ipv6: factor out MCAST_MSFILTER setsockopt helpers Factor out one helper each for setting the native and compat version of the MCAST_MSFILTER option. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit d5541e85cd40118a817f015ce3af1f41a7d7de1b Author: Christoph Hellwig Date: Fri Jul 17 08:23:27 2020 +0200 net/ipv6: factor out MCAST_MSFILTER getsockopt helpers Factor out one helper each for getting the native and compat version of the MCAST_MSFILTER option. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit b6238c04c0e5dbe7ae4ea48e96e004905b120a04 Author: Christoph Hellwig Date: Fri Jul 17 08:23:26 2020 +0200 net/ipv4: remove compat_ip_{get,set}sockopt Handle the few cases that need special treatment in-line using in_compat_syscall(). Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 02caad7cc0841f94bc105b93fbe468d3cbf6f378 Author: Christoph Hellwig Date: Fri Jul 17 08:23:25 2020 +0200 net/ipv4: factor out mcast join/leave setsockopt helpers Factor out one helper each for setting the native and compat version of the MCAST_MSFILTER option. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit d62c38f6a1a8c833df8dd35dacde23b0b6c931f9 Author: Christoph Hellwig Date: Fri Jul 17 08:23:24 2020 +0200 net/ipv4: factor out MCAST_MSFILTER setsockopt helpers Factor out one helper each for setting the native and compat version of the MCAST_MSFILTER option. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 49e74c24f31048b4faa3cfcccb93f444abb0b910 Author: Christoph Hellwig Date: Fri Jul 17 08:23:23 2020 +0200 net/ipv4: factor out MCAST_MSFILTER getsockopt helpers Factor out one helper each for getting the native and compat version of the MCAST_MSFILTER option. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 657e4c34a2370da1e82bbfc0d253ad394056b19e Author: Christoph Hellwig Date: Fri Jul 17 08:23:22 2020 +0200 netfilter: split nf_sockopt Split nf_sockopt into a getsockopt and setsockopt side as they share very little code. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit c34bc10d2535719ddf77d44ee849f6c7589583ba Author: Christoph Hellwig Date: Fri Jul 17 08:23:21 2020 +0200 netfilter: remove the compat argument to xt_copy_counters_from_user Lift the in_compat_syscall() from the callers instead. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 77d4df41d53e5c2af14db26f20fe50da52e382ba Author: Christoph Hellwig Date: Fri Jul 17 08:23:20 2020 +0200 netfilter: remove the compat_{get,set} methods All instances handle compat sockopts via in_compat_syscall() now, so remove the compat_{get,set} methods as well as the compat_nf_{get,set}sockopt wrappers. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit fc66de8e16ec4d9b4d2696d961de4f81db78a1b6 Author: Christoph Hellwig Date: Fri Jul 17 08:23:19 2020 +0200 netfilter/ebtables: clean up compat {get, set}sockopt handling Merge the native and compat {get,set}sockopt handlers using in_compat_syscall(). Note that this required moving a fair amout of code around to be done sanely. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit f415e76fd723594ed878a5a79a0ec36eca81c312 Author: Christoph Hellwig Date: Fri Jul 17 08:23:18 2020 +0200 netfilter/ip6_tables: clean up compat {get, set}sockopt handling Merge the native and compat {get,set}sockopt handlers using in_compat_syscall(). Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 89c53c14e4d218ca45b47402d991e82b77875888 Author: Christoph Hellwig Date: Fri Jul 17 08:23:17 2020 +0200 netfilter/ip_tables: clean up compat {get,set}sockopt handling Merge the native and compat {get,set}sockopt handlers using in_compat_syscall(). Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 983094b4fc2d6a0b356f189593970cea2682a20c Author: Christoph Hellwig Date: Fri Jul 17 08:23:16 2020 +0200 netfilter/arp_tables: clean up compat {get, set}sockopt handling Merge the native and compat {get,set}sockopt handlers using in_compat_syscall(). Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 55db9c0e853421fa71cac5e6855898601f78a1f5 Author: Christoph Hellwig Date: Fri Jul 17 08:23:15 2020 +0200 net: remove compat_sys_{get,set}sockopt Now that the ->compat_{get,set}sockopt proto_ops methods are gone there is no good reason left to keep the compat syscalls separate. This fixes the odd use of unsigned int for the compat_setsockopt optlen and the missing sock_use_custom_sol_socket. It would also easily allow running the eBPF hooks for the compat syscalls, but such a large change in behavior does not belong into a consolidation patch like this one. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 8c918ffbbad49454ed26c53eb1b90bf98bb5e394 Author: Christoph Hellwig Date: Fri Jul 17 08:23:14 2020 +0200 net: remove compat_sock_common_{get,set}sockopt Add the compat handling to sock_common_{get,set}sockopt instead, keyed of in_compat_syscall(). This allow to remove the now unused ->compat_{get,set}sockopt methods from struct proto_ops. Signed-off-by: Christoph Hellwig Acked-by: Matthieu Baerts Acked-by: Stefan Schmidt Signed-off-by: David S. Miller commit 4d295e54611509854a12c26f95a6f4430731d614 Author: Christoph Hellwig Date: Fri Jul 17 08:23:13 2020 +0200 net: simplify cBPF setsockopt compat handling Add a helper that copies either a native or compat bpf_fprog from userspace after verifying the length, and remove the compat setsockopt handlers that now aren't required. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit d8a9b38f83ea91341f80beb0a07a5777c6acf7a4 Author: Christoph Hellwig Date: Fri Jul 17 08:23:12 2020 +0200 net: streamline __sys_getsockopt Return early when sockfd_lookup_light fails to reduce a level of indentation for most of the function body. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 4a3672993f95c5f2ff0cf0951ba9a712d941a248 Author: Christoph Hellwig Date: Fri Jul 17 08:23:11 2020 +0200 net: streamline __sys_setsockopt Return early when sockfd_lookup_light fails to reduce a level of indentation for most of the function body. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit a06d30ae7af492497ffbca6abf1621d508b8fcaa Author: Christoph Hellwig Date: Fri Jul 17 08:23:10 2020 +0200 net/atm: remove the atmdev_ops {get, set}sockopt methods All implementations of these two methods are dummies that always return -EINVAL. Signed-off-by: Christoph Hellwig Signed-off-by: David S. Miller commit 089377b7e8e70f00c2290b00cb0024cc6e165a7d Author: Randy Dunlap Date: Sun Jul 19 11:08:24 2020 -0700 net: rds: rdma_transport.h: delete duplicated word Delete the doubled word "be" in a comment. Signed-off-by: Randy Dunlap Cc: Santosh Shilimkar Cc: netdev@vger.kernel.org Cc: linux-rdma@vger.kernel.org Signed-off-by: David S. Miller commit dfd5ec1ba602b1a9b36f9b6208f09546784932b9 Author: Randy Dunlap Date: Sun Jul 19 11:08:01 2020 -0700 net: atm: lec_arpc.h: delete duplicated word Delete the doubled word "the" in a comment. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit 7dce80c2a526a199ae1447e7a58d4135bb18ff8a Author: Oleksij Rempel Date: Sun Jul 19 10:05:30 2020 +0200 net: phy: at803x: add mdix configuration support for AR9331 and AR8035 This patch add MDIX configuration ability for AR9331 and AR8035. Theoretically it should work on other Atheros PHYs, but I was able to test only this two. Since I have no certified reference HW able to detect or configure MDIX, this functionality was confirmed by oscilloscope. Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ff9a8c48eb426881843be4042eef3a1a629b72a4 Merge: a050d82f5b04e 07095c025ac2f Author: David S. Miller Date: Sun Jul 19 18:05:49 2020 -0700 Merge branch 'net-enetc-remove-bootloader-dependency' Michael Walle says: ==================== net: enetc: remove bootloader dependency These patches were picked from the following series: https://lore.kernel.org/netdev/1567779344-30965-1-git-send-email-claudiu.manoil@nxp.com/ They have never been resent. I've picked them up, addressed Andrews comments, fixed some more bugs and asked Claudiu if I can keep their SOB tags; he agreed. I've tested this on our board which happens to have a bootloader which doesn't do the enetc setup in all cases. Though, only SGMII mode was tested. changes since v6: - dropped _LPA_ infix for USXGMII constants changes since v5: - fixed pcs->autoneg_complete and pcs->link assignment. Thanks Vladimir. changes since v4: - moved (and renamed) the USXGMII constants to include/uapi/linux/mdio.h. Suggested by Russell King. changes since v3: - rebased to latest net-next where devm_mdiobus_free() was removed. replace it by mdiobus_free(). The internal MDIO bus is optional, if there is any error, we try to run with the bootloader default PCS settings, thus in the error case, we need to free the mdiobus. changes since v2: - removed SOBs from "net: enetc: Initialize SerDes for SGMII and USXGMII protocols" because almost everything has changed. - get a phy_device for the internal PCS PHY so we can use the phy_ functions instead of raw mdiobus writes - reuse macros already defined in fsl_mdio.h, move missing bits from felix to fsl_mdio.h, because they share the same PCS PHY building block - added 2500BaseX mode (based on felix init routine) - changed xgmii mode to usxgmii mode, because it is actually USXGMII and felix does the same. - fixed devad, which is 0x1f (MMD_VEND2) changes since v1: - mdiobus id is '"imdio-%s", dev_name(dev)' because the plain dev_name() is used by the emdio. - use mdiobus_write() instead of imdio->write(imdio, ..), since this is already a full featured mdiobus - set phy_mask to ~0 to avoid scanning the bus - use phy_interface_mode_is_rgmii(phy_mode) to also include the RGMII modes with pad delays. - move enetc_imdio_init() to enetc_pf.c, there shouldn't be any other users, should it? - renamed serdes to SerDes - printing the error code of mdiobus_register() in the error path - call mdiobus_unregister() on _remove() - call devm_mdiobus_free() if mdiobus_register() fails, since an error is not fatal ==================== Signed-off-by: David S. Miller commit 07095c025ac2f75c14550c287683ae90a8cf706e Author: Alex Marginean Date: Mon Jul 20 00:03:36 2020 +0200 net: enetc: Use DT protocol information to set up the ports Use DT information rather than in-band information from bootloader to set up MAC for XGMII. For RGMII use the DT indication in addition to RGMII defaults in hardware. However, this implies that PHY connection information needs to be extracted before netdevice creation, when the ENETC Port MAC is being configured. Signed-off-by: Alex Marginean Signed-off-by: Claudiu Manoil Signed-off-by: Michael Walle Tested-by: Vladimir Oltean Signed-off-by: David S. Miller commit 975d183ef0ca071dfeda4e70d268d1103d09ad5f Author: Michael Walle Date: Mon Jul 20 00:03:35 2020 +0200 net: enetc: Initialize SerDes for SGMII and USXGMII protocols ENETC has ethernet MACs capable of SGMII, 2500BaseX and USXGMII. But in order to use these protocols some SerDes configurations need to be performed. The SerDes is configurable via an internal PCS PHY which is connected to an internal MDIO bus at address 0. This patch basically removes the dependency on bootloader regarding SerDes initialization. Signed-off-by: Michael Walle Reviewed-by: Claudiu Manoil Tested-by: Vladimir Oltean Signed-off-by: David S. Miller commit 16659b811add79493183e7009744026cdb3d9c62 Author: Michael Walle Date: Mon Jul 20 00:03:34 2020 +0200 net: dsa: felix: (re)use already existing constants Now that there are USXGMII constants available, drop the old definitions and reuse the generic ones. Signed-off-by: Michael Walle Tested-by: Vladimir Oltean Signed-off-by: David S. Miller commit c4471ad9a50d5548e66ae4511acfb1dc23a48744 Author: Michael Walle Date: Mon Jul 20 00:03:33 2020 +0200 net: phy: add USXGMII link partner ability constants The constants are taken from the USXGMII Singleport Copper Interface specification. The naming are based on the SGMII ones, but with an MDIO_ prefix. Signed-off-by: Michael Walle Reviewed-by: Russell King Signed-off-by: David S. Miller commit a4872f7a4bc16d6ed831833b4f1ec16df642c367 Author: Tim Harvey Date: Tue Jun 9 07:57:20 2020 -0700 hwmon: (gsc) add 16bit pre-scaled voltage mode add a 16-bit pre-scaled voltage mode to adc and clarify that existing pre-scaled mode is 24bit. Signed-off-by: Tim Harvey Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/1591714640-10332-3-git-send-email-tharvey@gateworks.com Signed-off-by: Guenter Roeck commit a37881dead2503614b837c005efde05e614d3b69 Author: Manikandan Elumalai Date: Mon Jun 22 21:07:27 2020 +0530 hwmon: (adm1275) Enable adm1278 ADM1278_TEMP1_EN The adm1278 temp attribute need it for openbmc platform . This feature not enabled by default, so PMON_CONFIG needs to enable it. Signed-off-by: Manikandan Elumalai Link: https://lore.kernel.org/r/20200622153727.GA9347@cnn [groeck: Split long line] Signed-off-by: Guenter Roeck commit 0ca8bb2cc9606beec6833e5e4742c882e2196bda Author: Jeffrey Lin Date: Sun Jun 21 00:52:48 2020 -0400 hwmon: (dell-smm) Add Latitude 5480 to fan control whitelist This allows manual PWM control without the BIOS fighting back on Dell Latitude 5480. Signed-off-by: Jeffrey Lin Acked-by: Pali Rohár Link: https://lore.kernel.org/r/20200621045246.929649-1-jeffrey@icurse.nl Signed-off-by: Guenter Roeck commit 23fd63a44460cda2e09703b625fa2fbcf2a27000 Author: Wang Qing Date: Sat Jun 13 16:06:44 2020 +0800 hwmon: (nct6683) Replace container_of() with kobj_to_dev() Use kobj_to_dev() instead of container_of(). Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1592035604-22336-1-git-send-email-wangqing@vivo.com Signed-off-by: Guenter Roeck commit 9e444234b6d8de48e9032f47997773cd98d863a5 Author: Colin Ian King Date: Wed Jun 10 13:36:38 2020 +0100 hwmon: (i5k_amb) remove redundant assignment to variable res The variable res is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200610123638.1133428-1-colin.king@canonical.com Signed-off-by: Guenter Roeck commit 6779ec13ca639929459976a691e17a64ed7e0712 Author: Randy Dunlap Date: Sun Jul 19 11:08:48 2020 -0700 ALSA: asihpi: delete duplicated word Delete the doubled word "of" in a comment. Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20200719180848.22572-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai commit 7ed33ea6b4faf0d63eafeef0b1a9b977b66ac88c Author: Alexander A. Klimov Date: Sun Jul 19 17:17:05 2020 +0200 ALSA: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200719151705.59624-1-grandmaster@al2klimov.de Signed-off-by: Takashi Iwai commit 227175b2c914bfa4a9aa5b210c7cabd42c5858ac Author: Nicolas Viennot Date: Sun Jul 19 12:04:16 2020 +0200 prctl: exe link permission error changed from -EINVAL to -EPERM This brings consistency with the rest of the prctl() syscall where -EPERM is returned when failing a capability check. Signed-off-by: Nicolas Viennot Signed-off-by: Adrian Reber Reviewed-by: Serge Hallyn Link: https://lore.kernel.org/r/20200719100418.2112740-7-areber@redhat.com Signed-off-by: Christian Brauner commit ebd6de6812387a2db9a52842cfbe004da1dd3be8 Author: Nicolas Viennot Date: Sun Jul 19 12:04:15 2020 +0200 prctl: Allow local CAP_CHECKPOINT_RESTORE to change /proc/self/exe Originally, only a local CAP_SYS_ADMIN could change the exe link, making it difficult for doing checkpoint/restore without CAP_SYS_ADMIN. This commit adds CAP_CHECKPOINT_RESTORE in addition to CAP_SYS_ADMIN for permitting changing the exe link. The following describes the history of the /proc/self/exe permission checks as it may be difficult to understand what decisions lead to this point. * [1] May 2012: This commit introduces the ability of changing /proc/self/exe if the user is CAP_SYS_RESOURCE capable. In the related discussion [2], no clear thread model is presented for what could happen if the /proc/self/exe changes multiple times, or why would the admin be at the mercy of userspace. * [3] Oct 2014: This commit introduces a new API to change /proc/self/exe. The permission no longer checks for CAP_SYS_RESOURCE, but instead checks if the current user is root (uid=0) in its local namespace. In the related discussion [4] it is said that "Controlling exe_fd without privileges may turn out to be dangerous. At least things like tomoyo examine it for making policy decisions (see tomoyo_manager())." * [5] Dec 2016: This commit removes the restriction to change /proc/self/exe at most once. The related discussion [6] informs that the audit subsystem relies on the exe symlink, presumably audit_log_d_path_exe() in kernel/audit.c. * [7] May 2017: This commit changed the check from uid==0 to local CAP_SYS_ADMIN. No discussion. * [8] July 2020: A PoC to spoof any program's /proc/self/exe via ptrace is demonstrated Overall, the concrete points that were made to retain capability checks around changing the exe symlink is that tomoyo_manager() and audit_log_d_path_exe() uses the exe_file path. Christian Brauner said that relying on /proc//exe being immutable (or guarded by caps) in a sake of security is a bit misleading. It can only be used as a hint without any guarantees of what code is being executed once execve() returns to userspace. Christian suggested that in the future, we could call audit_log() or similar to inform the admin of all exe link changes, instead of attempting to provide security guarantees via permission checks. However, this proposed change requires the understanding of the security implications in the tomoyo/audit subsystems. [1] b32dfe377102 ("c/r: prctl: add ability to set new mm_struct::exe_file") [2] https://lore.kernel.org/patchwork/patch/292515/ [3] f606b77f1a9e ("prctl: PR_SET_MM -- introduce PR_SET_MM_MAP operation") [4] https://lore.kernel.org/patchwork/patch/479359/ [5] 3fb4afd9a504 ("prctl: remove one-shot limitation for changing exe link") [6] https://lore.kernel.org/patchwork/patch/697304/ [7] 4d28df6152aa ("prctl: Allow local CAP_SYS_ADMIN changing exe_file") [8] https://github.com/nviennot/run_as_exe Signed-off-by: Nicolas Viennot Signed-off-by: Adrian Reber Link: https://lore.kernel.org/r/20200719100418.2112740-6-areber@redhat.com Signed-off-by: Christian Brauner commit 12886f8ab10ce6a09af1d92535d49c81aaa215a8 Author: Adrian Reber Date: Sun Jul 19 12:04:14 2020 +0200 proc: allow access in init userns for map_files with CAP_CHECKPOINT_RESTORE Opening files in /proc/pid/map_files when the current user is CAP_CHECKPOINT_RESTORE capable in the root namespace is useful for checkpointing and restoring to recover files that are unreachable via the file system such as deleted files, or memfd files. Signed-off-by: Adrian Reber Signed-off-by: Nicolas Viennot Reviewed-by: Cyrill Gorcunov Reviewed-by: Serge Hallyn Link: https://lore.kernel.org/r/20200719100418.2112740-5-areber@redhat.com Signed-off-by: Christian Brauner commit b9a3db92e1a1f281724e2f34b849d18d1a53bece Author: Adrian Reber Date: Sun Jul 19 12:04:13 2020 +0200 pid_namespace: use checkpoint_restore_ns_capable() for ns_last_pid Use the newly introduced capability CAP_CHECKPOINT_RESTORE to allow writing to ns_last_pid. Signed-off-by: Adrian Reber Signed-off-by: Nicolas Viennot Reviewed-by: Serge Hallyn Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20200719100418.2112740-4-areber@redhat.com Signed-off-by: Christian Brauner commit 1caef81da05a84a40dbf02110e967ce6d1135ff6 Author: Adrian Reber Date: Sun Jul 19 12:04:12 2020 +0200 pid: use checkpoint_restore_ns_capable() for set_tid Use the newly introduced capability CAP_CHECKPOINT_RESTORE to allow using clone3() with set_tid set. Signed-off-by: Adrian Reber Signed-off-by: Nicolas Viennot Reviewed-by: Serge Hallyn Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20200719100418.2112740-3-areber@redhat.com Signed-off-by: Christian Brauner commit 124ea650d3072b005457faed69909221c2905a1f Author: Adrian Reber Date: Sun Jul 19 12:04:11 2020 +0200 capabilities: Introduce CAP_CHECKPOINT_RESTORE This patch introduces CAP_CHECKPOINT_RESTORE, a new capability facilitating checkpoint/restore for non-root users. Over the last years, The CRIU (Checkpoint/Restore In Userspace) team has been asked numerous times if it is possible to checkpoint/restore a process as non-root. The answer usually was: 'almost'. The main blocker to restore a process as non-root was to control the PID of the restored process. This feature available via the clone3 system call, or via /proc/sys/kernel/ns_last_pid is unfortunately guarded by CAP_SYS_ADMIN. In the past two years, requests for non-root checkpoint/restore have increased due to the following use cases: * Checkpoint/Restore in an HPC environment in combination with a resource manager distributing jobs where users are always running as non-root. There is a desire to provide a way to checkpoint and restore long running jobs. * Container migration as non-root * We have been in contact with JVM developers who are integrating CRIU into a Java VM to decrease the startup time. These checkpoint/restore applications are not meant to be running with CAP_SYS_ADMIN. We have seen the following workarounds: * Use a setuid wrapper around CRIU: See https://github.com/FredHutch/slurm-examples/blob/master/checkpointer/lib/checkpointer/checkpointer-suid.c * Use a setuid helper that writes to ns_last_pid. Unfortunately, this helper delegation technique is impossible to use with clone3, and is thus prone to races. See https://github.com/twosigma/set_ns_last_pid * Cycle through PIDs with fork() until the desired PID is reached: This has been demonstrated to work with cycling rates of 100,000 PIDs/s See https://github.com/twosigma/set_ns_last_pid * Patch out the CAP_SYS_ADMIN check from the kernel * Run the desired application in a new user and PID namespace to provide a local CAP_SYS_ADMIN for controlling PIDs. This technique has limited use in typical container environments (e.g., Kubernetes) as /proc is typically protected with read-only layers (e.g., /proc/sys) for hardening purposes. Read-only layers prevent additional /proc mounts (due to proc's SB_I_USERNS_VISIBLE property), making the use of new PID namespaces limited as certain applications need access to /proc matching their PID namespace. The introduced capability allows to: * Control PIDs when the current user is CAP_CHECKPOINT_RESTORE capable for the corresponding PID namespace via ns_last_pid/clone3. * Open files in /proc/pid/map_files when the current user is CAP_CHECKPOINT_RESTORE capable in the root namespace, useful for recovering files that are unreachable via the file system such as deleted files, or memfd files. See corresponding selftest for an example with clone3(). Signed-off-by: Adrian Reber Signed-off-by: Nicolas Viennot Reviewed-by: Serge Hallyn Acked-by: Christian Brauner Link: https://lore.kernel.org/r/20200719100418.2112740-2-areber@redhat.com Signed-off-by: Christian Brauner commit aab6c873cf9b7afa9ca1ad82e48734178080f534 Author: Jianyong Wu Date: Sun Jun 28 15:43:37 2020 +0800 9p: remove unused code in 9p These codes have been commented out since 2007 and lay in kernel since then. So, it's better to remove them. Link: http://lkml.kernel.org/r/20200628074337.45895-1-jianyong.wu@arm.com Signed-off-by: Jianyong Wu Signed-off-by: Dominique Martinet commit 6db6ea79c525f3d753e270c84d72b3a900ad33fb Author: Alexander Kapshuk Date: Thu Jun 18 21:34:17 2020 +0300 net/9p: Fix sparse endian warning in trans_fd.c Address sparse endian warning: net/9p/trans_fd.c:932:28: warning: incorrect type in assignment (different base types) net/9p/trans_fd.c:932:28: expected restricted __be32 [addressable] [assigned] [usertype] s_addr net/9p/trans_fd.c:932:28: got unsigned long Link: http://lkml.kernel.org/r/20200618183417.5423-1-alexander.kapshuk@gmail.com Signed-off-by: Alexander Kapshuk Signed-off-by: Dominique Martinet commit cb0aae0e31c632c407a2cab4307be85a001d4d98 Author: Zheng Bin Date: Mon Jun 15 09:21:53 2020 +0800 9p: Fix memory leak in v9fs_mount v9fs_mount v9fs_session_init v9fs_cache_session_get_cookie v9fs_random_cachetag -->alloc cachetag v9ses->fscache = fscache_acquire_cookie -->maybe NULL sb = sget -->fail, goto clunk clunk_fid: v9fs_session_close if (v9ses->fscache) -->NULL kfree(v9ses->cachetag) Thus memleak happens. Link: http://lkml.kernel.org/r/20200615012153.89538-1-zhengbin13@huawei.com Fixes: 60e78d2c993e ("9p: Add fscache support to 9p") Cc: # v2.6.32+ Signed-off-by: Zheng Bin Signed-off-by: Dominique Martinet commit 66246641609b3cbfc87e805ded1f018b5c9cecf4 Author: Jianyong Wu Date: Fri Jul 10 18:15:48 2020 +0800 9p: retrieve fid from file when file instance exist. In the current setattr implementation in 9p, fid is always retrieved from dentry no matter file instance exists or not. If so, there may be some info related to opened file instance dropped. So it's better to retrieve fid from file instance when it is passed to setattr. for example: fd=open("tmp", O_RDWR); ftruncate(fd, 10); The file context related with the fd will be lost as fid is always retrieved from dentry, then the backend can't get the info of file context. It is against the original intention of user and may lead to bug. Link: http://lkml.kernel.org/r/20200710101548.10108-1-jianyong.wu@arm.com Signed-off-by: Jianyong Wu Signed-off-by: Dominique Martinet commit 8f2a4a9d5ff5202d0b3e3a144ebb9b67aabadd29 Author: Hans Verkuil Date: Fri Jul 17 10:10:07 2020 +0200 media: dvbdev.h: keep * together with the type Having the '*' in the next line separated from the type makes it hard to see that these functions return a pointer to that type. Instead, keep it next to the type name so it is clear that it is a pointer to that type. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8ecbde62c063d7d499144d3491496383a16de7f2 Author: Hans Verkuil Date: Fri Jul 17 10:08:51 2020 +0200 media: v4l2-subdev.h: keep * together with the type Having the '*' in the next line separated from the type makes it hard to see that these functions return a pointer to that type. Instead, keep it next to the type name so it is clear that it is a pointer to that type. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c89ee8ed3289c651f0521ff812c73c82803bdab8 Author: Ezequiel Garcia Date: Fri Jul 17 05:39:57 2020 +0200 media: videobuf2: Print videobuf2 buffer state by name For debugging purposes, seeing the state integer representation is really inconvenient. Improve this and be developer-friendly by printing the state name instead. Suggested-by: Nicolas Dufresne Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1c79e41b115f57f281b54b5bc699d0e01dbcd111 Author: Hans Verkuil Date: Thu Jul 16 13:32:57 2020 +0200 media: colorspaces-details.rst: fix V4L2_COLORSPACE_JPEG description The description was missing V4L2_XFER_FUNC_SRGB in the description of what V4L2_COLORSPACE_JPEG stands for. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 68e966a3796ed69314ed106a4cea891a4dec48f6 Author: Vaibhav Gupta Date: Fri Jul 17 09:34:36 2020 +0200 media: tw68: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. The driver was invoking PCI helper functions like pci_save/restore_state() which is not recommended. Compile-Tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9c4a8489ab7c29f46beedc5c288a2eacb431c229 Author: Vaibhav Gupta Date: Fri Jul 17 09:34:35 2020 +0200 media: meye: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. The driver was invoking PCI helper functions like pci_save/restore_state() which is not recommended. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a28b2ed9ad0551a18aaa2fa6ba8dd3d3e8cfb27f Author: Vaibhav Gupta Date: Fri Jul 17 09:34:34 2020 +0200 media: cx88: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. The driver was invoking PCI helper functions like pci_save/restore_state(), pci_enable/disable_device() and pci_set_power_state(), which is not recommended. Compile-tested only. [hverkuil: fixes checkpatch alignment warning] Signed-off-by: Vaibhav Gupta Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fc1f0e67f68f78da8426632e7ff3703b93148dba Author: Vaibhav Gupta Date: Fri Jul 17 09:34:33 2020 +0200 media: cx25821: use generic power management The .suspend() and .resume() callbacks are not defined for this driver. Still, their power management structure follows the legacy framework. To bring it under the generic framework, simply remove the binding of callbacks from struct "pci_driver". Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d6f6582890a43e2a88364aeeeb5414d75f7553d5 Author: Vaibhav Gupta Date: Fri Jul 17 09:34:32 2020 +0200 media: cx23885: use generic power management The .suspend() and .resume() callbacks are not defined for this driver. Still, their power management structure follows the legacy framework. To bring it under the generic framework, simply remove the binding of callbacks from struct "pci_driver". Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2856bbc55bda13d41eab904234be30e52ceeeae9 Author: Vaibhav Gupta Date: Fri Jul 17 09:34:31 2020 +0200 media: sta2x11: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Thus, there is no need to call the PCI helper functions like pci_enable_device(), pci_save/restore_sate(), etc. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cc4fcf11a8d9d249db479f1ef16e6d26c830b245 Author: Laurent Pinchart Date: Fri May 15 02:25:28 2020 +0200 media: dt-bindings: media: renesas,vsp1: Add power-domains and resets The power-domains and resets properties are used in all DT sources in the kernel but are absent from the bindings. Document them and make them mandatory. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 6a72c8d3cdeb582c3574f85e98394cd81b1d7640 Author: Laurent Pinchart Date: Fri May 15 02:25:28 2020 +0200 media: dt-bindings: media: renesas,vsp1: Convert binding to YAML Convert the Renesas R-Car VSP1 text binding to YAML. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 6249bda68f88faf63411d9aaafca6f90d546b622 Author: Laurent Pinchart Date: Fri May 15 03:08:55 2020 +0200 media: dt-bindings: media: renesas,fdp1: Add resets property The resets property is used in DT sources in the kernel tree. Document it and make it mandatory. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit f4e9654a79ca015f041cb8b3848d6557309a9ba1 Author: Laurent Pinchart Date: Fri May 15 03:08:55 2020 +0200 media: dt-bindings: media: renesas,fdp1: Make power-domains mandatory All DT source files in the kernel tree specify the power-domains property. Make it mandatory. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 5166e28ae4a6e84a2fcb6e89176d24ae00b09466 Author: Laurent Pinchart Date: Fri May 15 02:25:28 2020 +0200 media: dt-bindings: media: renesas,fdp1: Convert binding to YAML Convert the Renesas R-Car FDP1 text binding to YAML. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 08cdb85b853047e18344822cc257b5fa49707a27 Author: Laurent Pinchart Date: Fri May 15 03:08:55 2020 +0200 media: dt-bindings: media: renesas,fcp: Add resets and iommus properties The resets and iommus properties are used in DT sources in the kernel tree. Document them, and make resets mandatory. The iommus property is optional as not all platforms wire the FCP to a functional IOMMU. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 89b85a6d10602bca2793d69b4f19749c9258b816 Author: Laurent Pinchart Date: Fri May 15 03:08:55 2020 +0200 media: dt-bindings: media: renesas,fcp: Make power-domains mandatory All DT source files in the kernel tree specify the power-domains property. Make it mandatory. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 65c5fac1a2b74c120746d0aba810a873be89d0f8 Author: Laurent Pinchart Date: Fri May 15 02:25:28 2020 +0200 media: dt-bindings: media: renesas,fcp: Convert binding to YAML Convert the Renesas R-Car FCP text binding to YAML. Signed-off-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit e80cdf0a3843fe570c891cb976feb0c136b19fb7 Author: Laurent Pinchart Date: Wed Jul 1 08:21:40 2020 +0200 media: v4l2-async: Log message in case of heterogeneous fwnode match When a notifier supplies a device fwnode and a subdev supplies an endpoint fwnode, incorrect matches may occur if multiple subdevs correspond to the same device fwnode. This can't be handled transparently in the framework, and requires the notifier to switch to endpoint fwnodes. Log a message to notify of this problem. A second message is added to help accelerating the transition to endpoint matching. Signed-off-by: Laurent Pinchart Tested-by: Lad Prabhakar Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi Tested-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3e33392a9561fd64515049317041646ab3bf32aa Author: Laurent Pinchart Date: Wed Jul 1 08:21:39 2020 +0200 media: v4l2-async: Pass notifier pointer to match functions The notifier is useful to match functions to access information about the device matching a subdev. This will be used to print messages using the correct struct device and driver name. Signed-off-by: Laurent Pinchart Tested-by: Lad Prabhakar Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi Tested-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit b98158d837efa0b2f2f59ee2ff77f4791f978d74 Author: Laurent Pinchart Date: Wed Jul 1 08:21:38 2020 +0200 media: v4l2-async: Accept endpoints and devices for fwnode matching fwnode matching was designed to match on nodes corresponding to a device. Some drivers, however, needed to match on endpoints, and have passed endpoint fwnodes to v4l2-async. This works when both the subdev and the notifier use the same fwnode types (endpoint or device), but makes drivers that use different types incompatible. Fix this by extending the fwnode match to handle fwnodes of different types. When the types (deduced from the presence of remote endpoints) are different, retrieve the device fwnode for the side that provides an endpoint fwnode, and compare it with the device fwnode provided by the other side. This allows interoperability between all drivers, regardless of which type of fwnode they use for matching. Signed-off-by: Laurent Pinchart Tested-by: Lad Prabhakar Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi Tested-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 35694afc92646ac24d7f3ef34a7387876d998fe7 Author: Laurent Pinchart Date: Wed Jul 1 08:21:37 2020 +0200 media: device property: Add a function to test is a fwnode is a graph endpoint Drivers may need to test if a fwnode is a graph endpoint. To avoid hand-written solutions that wouldn't work for all fwnode types, add a new fwnode_graph_is_endpoint() function for this purpose. We don't need to wire it up to different backends for OF and ACPI for now, as the implementation can simply be based on checkout the presence of a remote-endpoint property. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund Reviewed-by: Lad Prabhakar Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 34009bffc1c6e6cf7f6a2a85e8e184c6e06193fc Author: Jacopo Mondi Date: Fri Jun 12 16:47:13 2020 +0200 media: i2c: Add RDACM20 driver The RDACM20 is a GMSL camera supporting 1280x800 resolution images developed by IMI based on an Omnivision 10635 sensor and a Maxim MAX9271 GMSL serializer. The GMSL link carries power, control (I2C) and video data over a single coax cable. Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart Signed-off-by: Niklas Söderlund Signed-off-by: Kieran Bingham Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e9f817689789e6997dd21fa986e4de950ff1f977 Author: Jacopo Mondi Date: Wed Jul 15 11:43:41 2020 +0200 media: dt-bindings: media: i2c: Add bindings for IMI RDACM2x The IMI RDACM20 and IMI RDACM21 are Gigabit Multimedia Serial Link (GMSL) camera capable of transmitting video and I2C control messages on a coax cable physical link for automotive applications. Document their device tree bindings. Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 66d8c9d2422da21ed41f75c03ba0685987b65fe0 Author: Kieran Bingham Date: Fri Jun 12 16:47:11 2020 +0200 media: i2c: Add MAX9286 driver The MAX9286 is a 4-channel GMSL deserializer with coax or STP input and CSI-2 output. The device supports multicamera streaming applications, and features the ability to synchronise the attached cameras. CSI-2 output can be configured with 1 to 4 lanes, and a control channel is supported over I2C, which implements an I2C mux to facilitate communications with connected cameras across the reverse control channel. Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Signed-off-by: Laurent Pinchart Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 18f1290188c95307a264ae6bd013b3318de64736 Author: Laurent Pinchart Date: Fri Jul 3 15:33:32 2020 +0200 media: dt-bindings: media: i2c: Add bindings for Maxim Integrated MAX9286 The MAX9286 deserializes video data received on up to 4 Gigabit Multimedia Serial Links (GMSL) and outputs them on a CSI-2 port using up to 4 data lanes. Signed-off-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Kieran Bingham Signed-off-by: Niklas Söderlund Reviewed-by: Rob Herring Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 859891228e56b991f65acc349bbe118b44752beb Author: Dongchun Zhu Date: Tue Jun 30 08:22:11 2020 +0200 media: i2c: dw9768: Add DW9768 VCM driver Add a V4L2 sub-device driver for DW9768 voice coil motor, providing control to set the desired focus via IIC serial interface. Signed-off-by: Dongchun Zhu Reviewed-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3fa97ae054d3862c52b0a296b1cb36947cc9ab1d Author: Dongchun Zhu Date: Tue Jun 30 08:22:10 2020 +0200 media: dt-bindings: media: i2c: Document DW9768 bindings Add DeviceTree Binding Documentation for Dongwoon Anatech DW9768 voice coil actuator. Reviewed-by: Rob Herring Signed-off-by: Dongchun Zhu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8e5652ae8d4addb99db9ccc0112827dfe3026276 Author: Andrey Konovalov Date: Tue Jun 23 18:52:26 2020 +0200 media: i2c: imx290: replace msleep(10) with usleep_range(10000, 11000) This fixes checkpatch warnings of "msleep < 20ms can sleep for up to 20ms". Signed-off-by: Andrey Konovalov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8d4a696af361af57bb84f3cc063473d241afc638 Author: Dafna Hirschfeld Date: Mon Jun 29 08:57:53 2020 +0200 media: staging: rkisp1: set pads array of the resizer to size 2 Currently the 'pads' and 'pad_cfg' arrays of the rkisp1_resizer are of size 'RKISP1_ISP_PAD_MAX' which is 4. But the resizer has only two pads. Change the size of the arrays to 2 by adding and using 'RKISP1_RSZ_PAD_MAX' similar to the way it is done in the isp entity. [hverkuil: fix typos in commit log] Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1b265b4d2c216ec3780125eebacb1035c7a5ed7a Author: Dafna Hirschfeld Date: Mon Jun 29 08:57:52 2020 +0200 media: staging: rkisp1: remove unused field alloc_ctx from struct rkisp1_device The field alloc_ctx in struct rkisp1_device is not used. This patch removes it. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8f611cc154965afdc1d8104e1d7b1b3df4bee7d2 Author: Dafna Hirschfeld Date: Mon Jun 29 08:57:51 2020 +0200 media: staging: rkisp1: remove unused field ctrl_handler from struct rkisp1_device The field ctrl_handler in struct rkisp1_device is not used. This patch removes it. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 20698ed90f018607e7a24c5258b7ed2dffafa7ae Author: Dafna Hirschfeld Date: Tue Jul 14 14:38:32 2020 +0200 media: staging: rkisp1: cap: in stream start, replace calls to rkisp1_handle_buffer with rkisp1_set_next_buf The function 'rkisp1_stream_start' calls 'rkisp1_handle_buffer' in order to update the 'buf.curr' and 'buf.next' fields and configure the device before streaming starts. This cause a wrong increment of the debugs field 'frame_drop'. This patch replaces the call to 'rkisp1_handle_buffer' with a call to 'rkisp1_set_next_buf'. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 23780e14fec91242bb621670c61afa0898407892 Author: Dafna Hirschfeld Date: Tue Jul 14 14:38:31 2020 +0200 media: staging: rkisp1: cap: move code that manages the buffers to rkisp1_set_next_buf The function 'rkisp1_set_next_buf' configures the registers according to 'cap->buf.next'. It is called after updating 'cap->buf.next' and 'cap->buf.curr'. This patch moves the code that updates those fields to rkisp1_set_next_buf. This is a preparation for later patch that change a call to 'rkisp1_handle_buffer' with a call to 'rkisp1_set_next_buf'. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 454748e3b3529218a50920e643dab6f149ab2639 Author: Dafna Hirschfeld Date: Tue Jul 14 14:38:30 2020 +0200 media: staging: rkisp1: cap: protect buf.curr and buf.next with buf.lock The spinlock buf.lock should protect access to the buffers. This includes the buffers in buf.queue and also buf.curr and buf.next. The function 'rkisp1_set_next_buf' access buf.next therefore it should also be protected with the lock. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aa86e0bbf2ee3fe338798af78f02b5e6088b50c1 Author: Dafna Hirschfeld Date: Tue Jul 14 14:38:29 2020 +0200 media: staging: rkisp1: cap: don't set next buffer from rkisp1_vb2_buf_queue The function 'rkisp1_vb2_buf_queue' sets the next buffer directly in case the capture is already streaming but no frame yet arrived from the sensor. This is an optimization that tries to avoid dropping a frame. The call atomic_read(&cap->rkisp1->isp.frame_sequence) is used to check if a frame arrived. Reading the 'frame_sequence' should be avoided outside irq handlers to avoid race conditions. This patch removes this optimization. Dropping of the first frames can be avoided if userspace queues the buffers before start streaming. If userspace starts queueing buffers only after calling 'streamon' he risks frame drops anyway. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2cc6a9fea031ec8cbd897e5967f6a84df3c9aae3 Author: Lukas Bulwahn Date: Tue Jul 14 08:30:35 2020 +0200 media: MAINTAINERS: rectify CHRONTEL CH7322 CEC DRIVER section Commit 7f52faabd2e5 ("media: dt-bindings: Add ch7322 media i2c device") slipped in a typo in the CHRONTEL CH7322 CEC DRIVER section. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: \ Documentation/devicetree/bindings/media/i2c/chontel,ch7322.yaml Fix the typo to address this warning. Signed-off-by: Lukas Bulwahn Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 74cc09fd8d04c56b652cfb332adb61f10bc2c199 Author: Alexander A. Klimov Date: Mon Jul 13 18:12:38 2020 +0200 media: tw68: Replace http links with https ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f20c7d9141d34e4a1505ca730743edba629ef7c4 Author: Alexander A. Klimov Date: Mon Jul 13 18:02:19 2020 +0200 media: tw5864-core: Replace http links with https ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6e059a8884fd4919467d72b2e5d726bd293bbe2 Author: Alexander A. Klimov Date: Mon Jul 13 17:52:10 2020 +0200 media: rtl2832_sdr: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1cc94c17670006c4faced28d6111e605d39eb964 Author: Alexander A. Klimov Date: Mon Jul 13 17:42:01 2020 +0200 media: ivtv: Replace http links with https ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 276e2ee0765941e7fa20973a4c2215df830e8483 Author: Alexander A. Klimov Date: Mon Jul 13 17:31:53 2020 +0200 media: imon: Replace http links with https ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c07fe5e020ff51bf4af834932035a5fb9b14efe4 Author: Alexander A. Klimov Date: Mon Jul 13 17:21:45 2020 +0200 media: cx18: Replace http links with https ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 42e50290d79475183a728d0c1d07020061f8838b Author: Michael Tretter Date: Mon Jul 13 16:42:29 2020 +0200 media: allegro: add support for allegro firmware 2019.2 Encode messages as necessary for the firmware 2019.2 and, thus, support the more recent firmware version in the driver, too. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 11146a758317f88034895dd778bf4a2ccac47303 Author: Michael Tretter Date: Mon Jul 13 16:42:28 2020 +0200 media: allegro: add a version field to mcu messages In order to distinguish the message format that is expected by the firmware, add a version field to the message header. This allows to encode and decode the messages for the version of the firmware that was loaded by the driver. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d8fefda89ee292b2871ce523227e5a49d4afc6ea Author: Michael Tretter Date: Mon Jul 13 16:42:27 2020 +0200 media: allegro: drop length field from message header The length of the message will be determined when the message is encoded. Writing the size of the struct into the message in the driver won't be the actual length of the message that is send to the firmware. Therefore, drop the length field from the message. Since the header is the same for all response messages, it does not make sense to read the header in each decoding function, but we can simply decode it once before dispatching to the respective functions. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c7ce107f9d899a15e4b9c24c4839abdbef88a063 Author: Michael Tretter Date: Mon Jul 13 16:42:26 2020 +0200 media: allegro: set num_ref_idx using response of configured channels The firmware decides how many reference frames shall be used und returns this information via the config blob. In order to set the number of reference frames in the PPS, the driver has to read these values from the config blob after the channel has been created in the firmware. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c4756d8774159ef1a9a204d656589c886fcefc5b Author: Michael Tretter Date: Mon Jul 13 16:42:25 2020 +0200 media: allegro: add config blob for channel Firmware versions >= 2019.2 do not configure the channel via the mailbox interface anymore, but use a separate chunk of memory that is only referenced by the message. As the configuration must be in a format that is understood by the firmware and this format can change between firmware versions, handle it similar to the message and treat is as a blob. In order to support both methods in the driver, always use a separate blob for the channel configuration and copy that blob into the mailbox if the firmware requires it and otherwise reference it. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d30e841216411cb95ffbb56252f8431fd752c54d Author: Michael Tretter Date: Mon Jul 13 16:42:24 2020 +0200 media: allegro: encode bit fields separately Even bits in bitfields do not keep their position, but move around or move to other bitfields. Therefore, the driver has to handle bitfields differently depending on the firmware version. Create separate fields for the options that have been in bitfields and handle the bitfields when encoding the message. As a side effect, this makes the messages a bit more readable. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 62ed97df7dc1bbb564fcd1c4f795aaa74245c63f Author: Michael Tretter Date: Mon Jul 13 16:42:23 2020 +0200 media: allegro: support handling firmware dependent values Like the message format, also the identifiers in the messages differ between firmware versions. This especially affects the identifier for the codec that shall be used. As the messages used by the driver are now independent from the firmware, we can use the values defined by V4L2 as identifiers in the messages. Convert the V4L2 codec format to the respective firmware value when encoding the messages to binary format instead beforehand. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fc1c13deb1f95467cf9819ef57157b542efcb901 Author: Michael Tretter Date: Mon Jul 13 16:42:22 2020 +0200 media: allegro: don't pack MCU messages The messages are now explicitly converted from the struct to the binary representation used by the firmware. Therefore, there is no need to keep the structs packed anymore. Drop the attribute and avoid confusion why the mails are packed. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 53c200ff49636de598b2ef5689d548c774b0373a Author: Michael Tretter Date: Mon Jul 13 16:42:21 2020 +0200 media: allegro: add field for number of buffers When pushing the buffers for the intermediate and reference frames to the MCU, the driver relied on the message size to calculate the number of buffers. As it is not necessary anymore to keep the messages binary compatible to the firmware, we can just explicitly write the number of buffers into the message. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3de16839669f60b6049734e3a9f553a2a958c4b5 Author: Michael Tretter Date: Mon Jul 13 16:42:20 2020 +0200 media: allegro: add explicit mail encoding and decoding The message format in the mailboxes differ between firmware versions. Therefore, it is necessary to decouple the mailbox format of the driver from the message format of the firmware. This allows to keep a consistent message format in the driver while still supporting various firmware versions. Add an intermediate step to encode and decode message before writing the mails to the mailboxes. On the other hand, this allows to handle optional fields in the messages, which is required for advanced features of the encoder and was not possible until now. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e561f8e24c5ade18f97970c3034ac0f965370c3f Author: Michael Tretter Date: Mon Jul 13 16:42:19 2020 +0200 media: allegro: rework read/write to mailbox Rework the functions that read and write the SRAM that is used to communicate with the MCU. As the functions will not operate on structs but on prepared binary buffers, make the buffer stride more explicit. Also, avoid any uses of struct mcu_msg_header to analyze messages in memory, because the header will be made independent of the binary representation in the mailbox. Instead explicitly access the mail size field in the mailbox. As at it, further reduce the dependency between the mailboxes and struct allegro_dev. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 94dc765602618fdab8bc4eaa96e3053929d8ff8f Author: Michael Tretter Date: Mon Jul 13 16:42:18 2020 +0200 media: allegro: rework mbox handling Add a send/notify abstraction for the mailbox and separate the message handling in the driver from the code to read and write message to the mailbox. This untangles how mails are written into the MCU's SRAM and signaled to the MCU from the protocol between the driver and the firmware. Signed-off-by: Michael Tretter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f2f475e4c5bb5343e35c0973096a391a09677d1a Author: Randy Dunlap Date: Wed Jul 15 00:05:53 2020 +0200 media: v4l2-subdev.h: drop duplicated word in comment Delete the doubled words "the" in comments. Signed-off-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 91bbbf24c4d1d2b9365c077730bbbaf2ef3f9056 Author: Randy Dunlap Date: Wed Jul 15 00:05:52 2020 +0200 media: media-entity.h: drop duplicated word in comment Delete the doubled word "flag" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ffb189716081ff7dafb0978d31a290adff966d81 Author: Randy Dunlap Date: Wed Jul 15 00:05:51 2020 +0200 media: dvbdev.h: fix duplicated word in comment Change the doubled word "the" in a comment to "to the". Signed-off-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f040e0fd29e4a09855c8cff8c6d22b4745a19796 Author: Randy Dunlap Date: Wed Jul 15 00:05:50 2020 +0200 media: media-devnode.h: drop duplicated word in comment Delete the doubled word "the" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 216964fa6a63c095417cc4001adc240c0e1f1bfb Author: Randy Dunlap Date: Wed Jul 15 00:05:49 2020 +0200 media: media-device.h: drop duplicated word in comment Delete the doubled word "the" in a comment. Signed-off-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f0e226885c3c18b2e7e27b8043c5a393405b037e Author: Krzysztof Hałasa Date: Thu May 14 12:00:47 2020 +0200 staging/media: Remove unneeded geometry restrictions from i.MX CSI driver I don't know what minimal image dimensions are, but 32x32 appears to be ok according to the docs. This is needed for small sensors like 80x80 thermal imagers. Signed-off-by: Krzysztof Halasa Reviewed-by: Philipp Zabel Tested-by: Philipp Zabel Acked-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5f3fb5c54d67670fa6743d2434a5bd43a97c01de Author: Kaaira Gupta Date: Sun Jul 5 15:53:06 2020 +0200 media: vimc: Add a control to display info on test image Add a control in VIMC to display information such as the correct order of colors for a given test pattern, counter, brightness, hue, saturation, contrast, width and height at sensor over test image. Signed-off-by: Kaaira Gupta Acked-by: Helen Koike Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7a785081a16968a28adce223c572111d2d57a83e Author: Kaaira Gupta Date: Sun Jul 5 15:53:05 2020 +0200 media: tpg: Add function to return colors' order of test image Currently there is no method to know the correct order of the colors for a test image generated by tpg. Write a function that returns a string of colors' order given a tpg. It returns a NULL pointer in case of test patterns which do not have a well defined colors' order. Hence add a NULL check for text in tpg_gen_text(). [hverkuil: white -> White (for consistency)] Signed-off-by: Kaaira Gupta Reviewed-by: Kieran Bingham Reviewed-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9dc75e79c0dec0eb9363793efbd5f16d134169dc Author: Kaaira Gupta Date: Sun Jul 5 15:53:04 2020 +0200 media: tpg: change char argument to const char Change the argument of type char * to const char * for function tpg_gen_text(). This function should take in a const char * as opposed to char * as it does not make changes to the text. This issue was found while passing the order of colors of tpg generated test image (which is a const char *) to this function. Signed-off-by: Kaaira Gupta Reviewed-by: Helen Koike Reviewed-by: Kieran Bingham Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9c487b0b0ea7ff22127fe99a7f67657d8730ff94 Author: Evgeny Novikov Date: Fri Jul 10 11:02:23 2020 +0200 media: vpss: clean up resources in init If platform_driver_register() fails within vpss_init() resources are not cleaned up. The patch fixes this issue by introducing the corresponding error handling. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d70cca7323442026e20c474314518c446cb4766f Author: Ezequiel Garcia Date: Thu Jul 9 18:36:35 2020 +0200 hantro: h264: Refuse to decode unsupported bitstream The hardware only supports 4:2:0 or 4:0:0 (monochrome), 8-bit depth content. Verify that the SPS refers to a supported bitstream, and refuse unsupported bitstreams by failing at TRY_EXT_CTRLS time. Given the JPEG compression level control is the only one that needs setting, a specific ops is provided. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Reviewed-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9363aa33f6a9acfd16f98c749f17f6c65d184670 Author: Ezequiel Garcia Date: Thu Jul 9 18:36:34 2020 +0200 rkvdec: h264: Refuse to decode unsupported bitstream The hardware only supports 4:2:2, 4:2:0 or 4:0:0 (monochrome), 8-bit or 10-bit depth content. Verify that the SPS refers to a supported bitstream, and refuse unsupported bitstreams by failing at TRY_EXT_CTRLS time. The driver is currently broken on 10-bit and 4:2:2 so disallow those as well. Signed-off-by: Ezequiel Garcia Reviewed-by: Jonas Karlman Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 46d7aaebbe441d5381e35d8e16df784690e65ef3 Author: Ezequiel Garcia Date: Wed Jul 1 15:16:07 2020 +0200 hantro: Make sure we don't use post-processor on an encoder Commit 986eee3a5234 ("media: hantro: Prevent encoders from using post-processing") fixed hantro_needs_postproc condition, but missed one case. Encoders don't have any post-processor hardware block, so also can't be disabled. Fix it. Fixes: 986eee3a5234 ("media: hantro: Prevent encoders from using post-processing") Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b72a6342dd240ce8e15b7acf1c38c67a0c56092b Author: Ezequiel Garcia Date: Wed Jul 1 15:16:06 2020 +0200 hantro: Remove unused bytesused argument The driver doesn't need the bytesused argument. For decoders, the plane bytesused is known and therefore, buf_prepare is used to set it. For encoders, it's handled by the codec_ops.done hook. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e765dba11ec26d7ea42974ec4d470b5ce00be3de Author: Ezequiel Garcia Date: Wed Jul 1 15:16:05 2020 +0200 hantro: Move hantro_enc_buf_finish to JPEG codec_ops.done hantro_enc_buf_finish is used only for JPEG, and so should be moved to JPEG codec_ops.done. This cleanup is also taking care of addressing a subtle issue: checking the non-NULL bounce buffer using ctx->jpeg_enc, which is a member of a union is confusing and error-prone. Note that the issue is currently innocuous because an encoder context only supports JPEG. The codec_ops.done has an argument that codec-specific code shouldn't need, so drop that as well. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 21f0315b7b3ee6ca909d81a963744671fb27bf71 Author: Ezequiel Garcia Date: Wed Jul 1 15:16:04 2020 +0200 hantro: Rework how encoder and decoder are identified So far we've been using the .buf_finish hook to distinguish decoder from encoder. This is unnecessarily obfuscated. Moreover, we want to move the buf_finish, so use a cleaner scheme to distinguish the driver decoder/encoder type. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4df3a47e3422a9de1f3ce1a4ba8a0447a73e7567 Author: Ezequiel Garcia Date: Wed Jul 1 15:16:03 2020 +0200 hantro: h264: Rename scaling list handling function Commit e17f08e31666 ("media: hantro: Do not reorder H264 scaling list") removed the scaling list reordering, which was wrong and not needed. However, the name of the function stayed, which is confusing for anyone reading the code. Rename from "reorder" to "assemble" which is cleaner. This is just a cosmetic cleanup. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3ebf271b1dee6df816bd8f2135218640c478dedd Author: Ezequiel Garcia Date: Wed Jul 1 15:16:02 2020 +0200 hantro: h264: Remove unused macro definition The generic H264 reference list builder moved all the users of this macro, but left the macro. Remove it. Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0b62c7db458ba97f93442a5ed39a2d636362d19f Author: Dafna Hirschfeld Date: Tue Jul 7 20:16:30 2020 +0200 media: staging: rkisp1: fix typos in file rkisp1-config.h Fix two spelling typos in file rkisp1-config.h. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e4fa530fd4b1f31b46d51b6b245359e0116cb662 Author: Dafna Hirschfeld Date: Tue Jul 7 20:10:53 2020 +0200 media: staging: rkisp1: remove duplicate macro definition The macro RKISP1_CIF_ISP_AWB_MODE_YCBCR_EN is defined twice. Remove the second define. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1fcc0244b5e6c4f557eecb656594ce29214da209 Author: Dafna Hirschfeld Date: Fri Jun 26 10:51:41 2020 +0200 media: staging: rkisp1: stats: read the stats in the isr Currently the stats are read in a work queue. Defering the reading of the stats is not needed and it is fine to read them inside the irq handler. This patch fixes and remove the TODO item: 'Use threaded interrupt for rkisp1_stats_isr(), remove work queue.' Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 40a55dc13e9dfa3a9575fd95633733554f4cde67 Author: Paul Cercueil Date: Sun Jul 19 11:38:34 2020 +0200 drm/ingenic: Silence uninitialized-variable warning Silence compiler warning about used but uninitialized 'ipu_state' variable. In practice, the variable would never be used when uninitialized, but the compiler cannot know that 'priv->ipu_plane' will always be NULL if CONFIG_INGENIC_IPU is disabled. Silence the warning by initializing the value to NULL. Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200719093834.14084-1-paul@crapouillou.net commit 0a0930206762b34c74bf14242765dc52d56f2792 Author: Gustavo A. R. Silva Date: Thu Jul 16 16:19:19 2020 -0500 pinctrl: baytrail: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andy Shevchenko commit 1f491421c4172ac6d97dcd762a07ae40f110cbac Author: B K Karthik Date: Sat Jul 18 05:14:42 2020 -0400 staging: rtl8188eu: include: fixed multiple blank space coding style issues fixed multiple blank space coding style issues reported by checkpatch Signed-off-by: B K Karthik Link: https://lore.kernel.org/r/20200718091442.xamnoawpguo42k7v@pesu-pes-edu Signed-off-by: Greg Kroah-Hartman commit e5debaec5fa65ef35e4266ed1bbd76921a7ff97a Author: Michael Straube Date: Sat Jul 18 08:55:14 2020 +0200 staging: rtl8188eu: clear tabstop style issues Clear tabstop style issues reported by checkpatch. WARNING: Statements should start on a tabstop Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200718065514.16289-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit b512ab7a85268b3d43d8c504a3e84dbdd923c52b Author: Dafna Hirschfeld Date: Fri Jun 26 10:51:40 2020 +0200 media: staging: rkisp1: stats: replace locks wq_lock, irq_lock with one lock This patch removes two locks in the rkisp1_stats struct: - The mutex 'wq_lock' that is used to protect the buffers list 'stat' - The spin_lock 'irq_lock' that is used to protect the variable 'is_streaming' It replaces them with one spin_lock 'lock' that protects both the buffers list and the 'is_streaming' variable. In later patch the reading of the statistics will move to the isr so there will be no need for the mutex 'wq_lock' Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 46c308a964fe6515845eacb8765a2c2e2b8c1570 Author: Dafna Hirschfeld Date: Fri Jun 26 10:51:39 2020 +0200 media: staging: rkisp1: stats: replace spin_lock_irqsave with spin_lock_irq The function 'rkisp1_stats_vb2_stop_streaming' runs in user context therefore it is enough to use spin_lock_irq Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 24385f9c6ee4e1e118046333b49637e5d337d943 Author: Dafna Hirschfeld Date: Fri Jun 26 10:51:38 2020 +0200 media: staging: rkisp1: use a macro for the statistics flags mask The mask of the ready statistics flags is used in several places in the code using bitwise-or. Use a macro for that to make the code more readable. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit af30d4f36ef35d23f1ab6c5e4f329c743fb3c360 Author: Laurent Pinchart Date: Mon Jul 6 20:36:45 2020 +0200 media: ti-vpe: cal: Split CAMERARX handling to cal-camerarx.c Implementation of media controller centric device configuration will add code to the CAMERARX support section, which is already quite big. Move it to a separate file to make the code more manageable. No functional change is included. The cal_camerarx_init_regmap() function is kept in cal.c and renamed to cal_init_camerarx_regmap() as it's not specific to one CAMERARX instance, but related to the whole CAL device. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d373018f3abda9d2446a059133cd6425f56b3b51 Author: Laurent Pinchart Date: Mon Jul 6 20:36:44 2020 +0200 media: ti-vpe: cal: Move CAL I/O accessors to cal.h To prepare for the split of the camerarx code to a separate file, move the CAL I/O accessors to cal.h. This requires renaming the accessors with a cal_prefix, as the current names are too generic and prone to namespace clashes. The reg_read() and read_write() macros, that cover both CAL and CAMERARX register access, are split in two groups of inline functions, one for CAL access and one for CAMERARX access. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9d551891473e35eae4ea3b21cac30136f455d405 Author: Laurent Pinchart Date: Mon Jul 6 20:36:43 2020 +0200 media: ti-vpe: cal: Split video node handling to cal-video.c To prepare for implementation of media controller centric device configuration, move all the video node handling support to a separate file. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f4d9837d872523e8ef8bd1e0156eb90e2fed8dc3 Author: Laurent Pinchart Date: Mon Jul 6 20:36:42 2020 +0200 media: ti-vpe: cal: Use 'unsigned int' type instead of 'unsigned' Specifying 'int' explicitly is generally preferred in the kernel for unsigned int types. Fix the only wrong occurrence. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 56d1d67468ae195613c374e1e42fac85d22f24e5 Author: Laurent Pinchart Date: Mon Jul 6 20:36:41 2020 +0200 media: ti-vpe: cal: Remove unneeded phy->sensor NULL check The phy->sensor NULL check in cal_camerarx_get_external_rate() is not needed, as the V4L2 video devices are only registered when the sensor is bound. Remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 399b0a3d54b695def41a77a05ad8221c0e9ffc29 Author: Laurent Pinchart Date: Mon Jul 6 20:36:40 2020 +0200 media: ti-vpe: cal: Don't store external rate in cal_camerarx The external pixel rate is retrieved when starting the camerarx and only used then. There's no need to store it in the cal_camerarx structure, it can be returned by cal_camerarx_get_external_info() and explicitly passed to cal_camerarx_config(). While at it, rename cal_camerarx_get_external_info() to cal_camerarx_get_external_rate() to better reflect the function's purpose. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 49b184a0dae93b7eaa3dbd09c0287db9a471c9da Author: Laurent Pinchart Date: Mon Jul 6 20:36:39 2020 +0200 media: ti-vpe: cal: Refactor camerarx start and stop Refactor the camerarx start and stop procedure to group all the corresponding operations in two functions, cal_camerarx_start() and cal_camerarx_stop() instead of splitting them in multiple steps called from the vb2 stream start and stop functions. This reduces the coupling between the camerarx and the contexts, and better models the camerarx hardware. The cal_camerarx_start() is a reworked version of cal_camerarx_init() with the description of the start procedure updated to match the AM65x, DRA7[124567]x and DRA80xM TRMs. The cal_camerarx_wait_ready() function is inlined in cal_camerarx_start() to better describe the start procedure. No functional change is included in the camerarx start and stop procedures themselves, but the interleaving of the start steps with the context configuration has been changed in cal_start_streaming(). Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e085ede10d690f25e21e47d248bc4ab2bfd5f7bf Author: Laurent Pinchart Date: Mon Jul 6 20:36:38 2020 +0200 media: ti-vpe: cal: Reorder camerarx functions to prepare refactoring To prepare for the camerarx refactoring, reorder functions without any functional change to ease review of the refactoring itself. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cd2144603ad3276cb0379f5f70d85cedcc68ecb4 Author: Laurent Pinchart Date: Mon Jul 6 20:36:37 2020 +0200 media: ti-vpe: cal: Inline cal_camerarx_max_lanes() in its only caller The cal_camerarx_max_lanes() function is a one-liner that has a single caller. It doesn't improve readability. Inline it in its caller. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0a8e64ed2100511454d652d03f5ec9098ded5c44 Author: Laurent Pinchart Date: Mon Jul 6 20:36:36 2020 +0200 media: ti-vpe: cal: Allocate cal_ctx active_fmt array dynamically To avoid making the cal_ctx structure layoug depend on the size of the cal_formats array, allocate the active_fmt array dynamically. This prepares for splitting the driver in multiple files. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1b22b7a0ec9c505ac9b55adeb84a7c15cbd0bbb0 Author: Laurent Pinchart Date: Mon Jul 6 20:36:35 2020 +0200 media: ti-vpe: cal: Init formats in cal_ctx_v4l2_register() To prepare for splitting the V4L2 API support to a separate file, call cal_ctx_v4l2_init_formats() from cal_ctx_v4l2_register(). Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b908235114d122ad59c8287f2dad0a1bd45b4e3a Author: Laurent Pinchart Date: Mon Jul 6 20:36:34 2020 +0200 media: ti-vpe: cal: Register a media device Enable the media controller API by registering a media device and initializing the media entities corresponding to the video devices. The context initialization is slightly refactored as a result. The media graph will be built in a subsequent change. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 92790656cee2f0b02855452d73f85127ac68081c Author: Laurent Pinchart Date: Mon Jul 6 20:36:33 2020 +0200 media: ti-vpe: cal: Store struct device in cal_dev The cal_dev structure stores the platform_device pointer, but most accesses to that field need the device pointer. Store the struct device pointer directly to simplify the code, and use to_platform_device() in the two locations that need the platform device. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dfbb172e512eaba56039e0b4c485256295442147 Author: Laurent Pinchart Date: Mon Jul 6 20:36:32 2020 +0200 media: ti-vpe: cal: Print revision and hwinfo in a more readable format Print the hardware revision in the X.Y.R format, which is more readable that the 32-bit hex value. For the hardware info register, only print its value if it doesn't contain what we expect. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 05930cf1e5c5d7d526e492cfe0f0bb3116bc29de Author: Laurent Pinchart Date: Mon Jul 6 20:36:31 2020 +0200 media: ti-vpe: cal: Read hardware revision earlier during probe Read the hardware revision and info right after allocating resources, as there's no need to delay doing so until all initialization is complete. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 45dd15e6ce2241da7d3f08b86b680d8b7d3dcd67 Author: Laurent Pinchart Date: Mon Jul 6 20:36:30 2020 +0200 media: ti-vpe: cal: Split media initialization and cleanup to functions Create four functions to handle initialization, cleanup, registration and unregistration of the V4L2 (and soon media controller) objects: - init() is meant to be called early at probe time to initialize the objects, before they get used from within the kernel - cleanup() is the counterpart of init, and is meant to be called at the end of the remove sequence to free all objects - register() is meant to be called at the end of the probe sequence, to register the userspace-facing devices - unregister() is the counterpart of register, and is meant to be called at the beginning for the remove sequence, to disallow access from userspace Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a0db060fb100c16b533595f468ed57ba4bb2d5a3 Author: Laurent Pinchart Date: Mon Jul 6 20:36:29 2020 +0200 media: ti-vpe: cal: Replace number of ports numerical value by macro Use the CAL_NUM_CSI2_PORTS macro instead of the hardcoded numerical value 2 to iterate over the CSI-2 ports. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7e75b1502f65d70088f522cb4474502644b44428 Author: Laurent Pinchart Date: Mon Jul 6 20:36:28 2020 +0200 media: ti-vpe: cal: Remove isvcirqset() and isportirqset() macros The isvcirqset() isn't used. The isportirqset() doesn't increase readability. Inline the latter and simply drop the former. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4c0ed7ba65d1c2e9476c083ba83c23fe68ef6ebc Author: Laurent Pinchart Date: Mon Jul 6 20:36:27 2020 +0200 media: ti-vpe: cal: Move CAL_NUM_CSI2_PORTS from cal_regs.h to cal.c The CAL_NUM_CSI2_PORTS macro isn't a register definition. Move it to cal.c, and fix indentation of the other macros while at it. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 497b5e94f820b3900dae89d34cd29db5ea394ff3 Author: Laurent Pinchart Date: Mon Jul 6 20:36:26 2020 +0200 media: ti-vpe: cal: Decouple context and phy cleanup at remove time The driver happens the use the same number of CAMERARX and context, but coupling their cleanup at remove time is wrong. To prepare for the introduction of additional contexts, decouple the two. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 517cf52b7777894ce5c0e63f5b57f95b879b2bb5 Author: Laurent Pinchart Date: Mon Jul 6 20:36:25 2020 +0200 media: ti-vpe: cal: Operate on phy instances in cal_quickdump_regs() The cal_quickdump_regs() dumps registers for the two CAMERARX instances. Retrieve those instances from the cal_dev directly instead of going through the contexts, and simplify the code by using a loop. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 539e7c5d7c028180ea16fc3b816cd07e0a09155d Author: Laurent Pinchart Date: Mon Jul 6 20:36:24 2020 +0200 media: ti-vpe: cal: Replace context with phy in async notifier entries The async notifier is meant to bind to subdevs connected to the CSI-2 ports. Those ports are modelled by the CAMERARX phy instances. To prepare for additional decoupling of contexts and phys, make the notifier operate on phys. We still initialize and register the context V4L2 support in the async notifier complete operation as that's our signal that the userspace API is ready to be exposed. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a539a0536f6e22a26e3e85a4cfb87344f800016f Author: Laurent Pinchart Date: Mon Jul 6 20:36:23 2020 +0200 media: ti-vpe: cal: Move async notifiers from contexts to cal_dev There's no need to create one async notifier per CAL context. Merge them all in a single notifier, stored in cal_dev. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8fcb7576ad197b0d65fe68ef60b7e1097e18df0c Author: Laurent Pinchart Date: Mon Jul 6 20:36:22 2020 +0200 media: ti-vpe: cal: Allow multiple contexts per subdev notifier The subdev notifier handling assumes a 1:1 mapping between CAL contexts and notifiers. To prepare for merging the multiple notifiers into a single one, retrieve the CAL context from the async subdev structure instead of from the notifier. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a439e57358ee1562257668d77b19f8f1a629a1fd Author: Laurent Pinchart Date: Mon Jul 6 20:36:21 2020 +0200 media: ti-vpe: cal: Move all sensor-related init to .bound() notifier The initialization of the context based on the connected sensor is split between the async notifier .bound() and .complete() operations. Move it all to a separate function and call it from .bound() operation to prepare for the move of the notifiers from the contexts to the cal_dev. Only V4L2 registration is kept in the .complete() operation. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4d04c23fadc67acc47f26f7143e15c81b0143f47 Author: Laurent Pinchart Date: Mon Jul 6 20:36:20 2020 +0200 media: ti-vpe: cal: Use ARRAY_SIZE to replace numerical value Use ARRAY_SIZE(cal->ctx) to iterate over the cal->ctx array instead of using the numerical value from the CAL_NUM_CONTEXT macro (or, worse, hardcoding the value 2). This will allow reworking contexts with less changes in the code. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f5ddf19eca33281d8aabb8d802bed5a5658bbcb6 Author: Laurent Pinchart Date: Mon Jul 6 20:36:19 2020 +0200 media: ti-vpe: cal: Move DT parsing to CAMERARX The DT port nodes corresponding to the CSI-2 inputs belong to the CAMERARX instances. Move parsing of the DT properties to a new cal_camerarx_parse_dt() function, called by cal_camerarx_create(). Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d3665f3b7c08bc50f97b2f308f4b745f7e80b3e8 Author: Laurent Pinchart Date: Mon Jul 6 20:36:18 2020 +0200 media: ti-vpe: cal: Add cal_camerarx_destroy() to cleanup CAMERARX The cal_camerarx_create() function allocates resources with devm_*, and thus doesn't need any manual cleanup. Those won't hold true for long, as we will need to store resources that have no devm_* allocation variant in cal_camerarx. Furthermore, devm_kzalloc() is the wrong memory allocation API for structures that can be accessed from userspace, as device nodes can be kept open across device removal. Add a cal_camerarx_destroy() function to destroy a CAMERARX instance explicitly, and switch to kzalloc() for memory allocation. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6675e871ca4dab14e849298767d34c2722f3ee1e Author: Laurent Pinchart Date: Mon Jul 6 20:36:17 2020 +0200 media: ti-vpe: cal: Unregister video device before cleanup In cal_remove(), unregister the video devices as the first operation, before cleaning up the V4L2 objects, to avoid use-after-free. This isn't a complete solution yet, as video nodes can be kept open across unregistration. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 19a2374068b557ed1a19c68ebaef5f1a161e2973 Author: Laurent Pinchart Date: Mon Jul 6 20:36:16 2020 +0200 media: ti-vpe: cal: Add context V4L2 cleanup and unregister functions Create cal_ctx_v4l2_unregister() and cal_ctx_v4l2_cleanup() functions to unregister and cleanup the V4L2-related objects from the context, and call them in cal_remove() and in the error path of cal_probe(). Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d68a94e98a89230750b8dfb667c71c3b4e0a02ed Author: Laurent Pinchart Date: Mon Jul 6 20:36:15 2020 +0200 media: ti-vpe: cal: Split video device initialization and registration There's no need to delay most of the video device initialization until the sensor subdevs are bound. Split the initialization and registration, and perform the initialization when creating the context. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 23efed6fa7519e29a01f12723b0cfa8118dc87cb Author: Christoph Hellwig Date: Thu Jul 16 17:00:16 2020 +0200 dma-debug: use named initializers for dir2name Make dir2name a little more readable and maintainable by using named initializers. Signed-off-by: Christoph Hellwig Reviewed-by: Robin Murphy commit b4b784953c49c01ef0a52b7e81a938bb4bbf53d5 Author: Laurent Pinchart Date: Mon Jul 6 20:36:14 2020 +0200 media: ti-vpe: cal: Move v4l2_device from cal_ctx to cal_dev The v4l2_device structure is meant to represent the whole device. In the CAL case, this corresponds to the CAL, the CAMERARX instances and the connected sensors. There should thus be a single v4l2_device instance. Replace the per-context instance with a global instance in the cal_dev structure. Don't set the v4l2_device name manually as v4l2_device_register() sets it to a value that is suitable for the driver. Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4b71bfbc9787e359f63ef0d876e173b1c474ffc7 Author: Laurent Pinchart Date: Mon Jul 6 20:36:13 2020 +0200 media: ti-vpe: cal: Decouple control handler from v4l2_device To prepare for decoupling the v4l2_device from the cal_ctx, don't set the control handler in the v4l2_device and expect the video node to use it automatically, but set the video node control handler directly. This requires adding the sensor subdev controls to the control handler manually, as that operation was performed on the v4l2_device by v4l2_device_register_subdev(). Signed-off-by: Laurent Pinchart Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f1565c24b5965dfd2352f209c417ff160be04db9 Author: Christoph Hellwig Date: Wed Jul 8 12:22:47 2020 +0200 powerpc: use the generic dma_ops_bypass mode Use the DMA API bypass mechanism for direct window mappings. This uses common code and speed up the direct mapping case by avoiding indirect calls just when not using dma ops at all. It also fixes a problem where the sync_* methods were using the bypass check for DMA allocations, but those are part of the streaming ops. Note that this patch loses the DMA_ATTR_WEAK_ORDERING override, which has never been well defined, as is only used by a few drivers, which IIRC never showed up in the typical Cell blade setups that are affected by the ordering workaround. Fixes: efd176a04bef ("powerpc/pseries/dma: Allow SWIOTLB") Signed-off-by: Christoph Hellwig Tested-by: Alexey Kardashevskiy Reviewed-by: Alexey Kardashevskiy commit d35834c64820c7ef397f8a244061d4450720540e Author: Christoph Hellwig Date: Mon Mar 23 18:19:30 2020 +0100 dma-mapping: add a dma_ops_bypass flag to struct device Several IOMMU drivers have a bypass mode where they can use a direct mapping if the devices DMA mask is large enough. Add generic support to the core dma-mapping code to do that to switch those drivers to a common solution. Signed-off-by: Christoph Hellwig Tested-by: Alexey Kardashevskiy Reviewed-by: Alexey Kardashevskiy commit b1ca64f269300d8ef4e0912f787b8f3488a1e1d6 Author: Laurent Pinchart Date: Mon Jul 6 20:36:12 2020 +0200 media: ti-vpe: cal: Fix usage of v4l2_fwnode_endpoint_parse() Letting the v4l2_fwnode_endpoint_parse() function determine the bus type automatically is deprecated. Set the bus type to DPHY manually as the TI CAL only supports DPHY. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f9237d4f6df49b74c51cdac555b0a9979d0c237 Author: Christoph Hellwig Date: Wed Jul 8 09:30:00 2020 +0200 dma-mapping: make support for dma ops optional Avoid the overhead of the dma ops support for tiny builds that only use the direct mapping. Signed-off-by: Christoph Hellwig Tested-by: Alexey Kardashevskiy Reviewed-by: Alexey Kardashevskiy commit cb1d4202a389511e6bc2589bd46bb6c339e4a9e8 Author: Laurent Pinchart Date: Mon Jul 6 20:36:11 2020 +0200 media: ti-vpe: cal: Use of_graph_get_endpoint_by_regs() to parse OF Replace the manual of_get_next_port() and of_get_next_endpoint() implementations and the corresponding logic in the caller with a call to of_graph_get_endpoint_by_regs(). This greatly simplifies OF parsing. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8af2741a173408ad5ca9fb468b8f8b60495f7b20 Author: Laurent Pinchart Date: Mon Jul 6 20:36:10 2020 +0200 media: ti-vpe: cal: Hardcode virtual channel to 0 Using the endpoint reg value to pass the CSI-2 source virtual channel ID in DT is a hack, isn't documented in the DT bindings, and isn't used in neither upstream DT nor TI official overlays. Hardcode the virtual channel to 0 to simplify reworking the code, proper virtual channel support will be implemented later. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2355593496c5556ef6cecaa87d7add702882c060 Author: Laurent Pinchart Date: Mon Jul 6 20:36:09 2020 +0200 media: ti-vpe: cal: Rename cal_create_instance() to cal_ctx_create() The cal_create_instance() function creates a CAL context. Rename it to cal_ctx_create() to make its purpose more explicit. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 214f995c20938fc19375c0806b48f0ea2dec17f3 Author: Laurent Pinchart Date: Mon Jul 6 20:36:08 2020 +0200 media: ti-vpe: cal: Add comments to cal_probe() to delimitate sections The cal_probe() function is a bit long, add comments to delimitate sections in order to improve readability. The platform_set_drvdata() call is moved to a more logical place as a result. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6963e46ce61388c05ae26918ce3afc138ac5c9f8 Author: Laurent Pinchart Date: Mon Jul 6 20:36:07 2020 +0200 media: ti-vpe: cal: Inline cal_get_camerarx_regmap() in caller The cal_get_camerarx_regmap() function is called in a single place. Inline it in its caller, as it results in a clear code flow. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2cabb7ade7a0a1c8da62ba4ed18e71a7d54e7c62 Author: Laurent Pinchart Date: Mon Jul 6 20:36:06 2020 +0200 media: ti-vpe: cal: Use syscon_regmap_lookup_by_phandle_args() Use the syscon_regmap_lookup_by_phandle_args() function to replace manual lookup of the syscon regmap offset. This simplifies the cal_camerarx_init_regmap() implementation. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 573e298cfe679490a43e6d439885b79f5bd63e23 Author: Laurent Pinchart Date: Mon Jul 6 20:36:05 2020 +0200 media: ti-vpe: cal: Split CAMERARX syscon regmap retrieval to a function Simplify the cal_probe() function by splitting the CAMERARX syscon regmap retrieval to a separate function. A few local variables are renamed in the process to shorten them (syscon_camerrx_*) or to make them more accurate (parent isn't the parent OF node but the CAL device's own OF node). Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4607c2487bf21846b849878f904ff80755158aa3 Author: Laurent Pinchart Date: Mon Jul 6 20:36:04 2020 +0200 media: ti-vpe: cal: Drop struct cal_dev v4l2_dev field The v4l2_dev field of the cal_dev structure is initialized but never used. Drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f63379b93fa389ed65432d456da6697f60f7338 Author: Laurent Pinchart Date: Mon Jul 6 20:36:03 2020 +0200 media: ti-vpe: cal: Use a loop to create CAMERARX and context instances Replace a manually unrolled loop with an explicit for loop to increase readability when creating the CAMERARX and context instances. The explicit NULL initialization of cal->phy[] and cal->ctx[] is removed, as the cal structure is zeroed when allocated. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ed595da7d70fbb12bb5bd30936b472164082c484 Author: Laurent Pinchart Date: Mon Jul 6 20:36:02 2020 +0200 media: ti-vpe: cal: Use ctx_info() instead of v4l2_info() Use the context-specific print macro to replace the last usage of the v4l2_* print macros. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 281736ef5545bb07b3291d00f655d6f884df9f80 Author: Laurent Pinchart Date: Mon Jul 6 20:36:01 2020 +0200 media: ti-vpe: cal: Get struct device without going through v4l2_device Instead of retrieving the struct device for the platform device from the v4l2_device, get it from the platform device directly. This prepares for cleanups related to v4l2_device handling. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 17513da19e0a170d0a63c6c80e5d88cbf3eb1788 Author: Laurent Pinchart Date: Mon Jul 6 20:36:00 2020 +0200 media: ti-vpe: cal: Use correct device name for bus_info The v4l2_capability bus_info field, filled by the VIDIOC_QUERYCAP ioctl handler, specifies the location of the device in the system. For platform devices, V4L2 specifies that the value must be "platform:" followed by the device name. Fix the cal_querycap() function to set the right value. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 20d4eb10911acb5a7f65816393532f451f166c2b Author: Laurent Pinchart Date: Mon Jul 6 20:35:59 2020 +0200 media: ti-vpe: cal: Rename cal_ctx.csi2_port to cal_ctx.index The csi2_port field of the cal_ctx structure holds the context index, and is independent from the CSI-2 port (even if it currently has the same numerical value). Rename it to index to avoid the ambiguity. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6770318dc07287b3506753927ea1c9a99c20fe1e Author: Laurent Pinchart Date: Mon Jul 6 20:35:58 2020 +0200 media: ti-vpe: cal: Reorganize remaining code in sections Increase readability by reorganizing the remaining code in sections. No functional change is included. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9f2b94b1ca7d6431697ea8f190a6493cf221364b Author: Laurent Pinchart Date: Mon Jul 6 20:35:57 2020 +0200 media: ti-vpe: cal: Create consistent naming for context functions Rename all functions related to contexts with a cal_ctx_ prefix to increase readability. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f3ca1f9db5b9f3c0d3b3bf890ae92791852aff37 Author: Laurent Pinchart Date: Mon Jul 6 20:35:56 2020 +0200 media: ti-vpe: cal: Inline cal_data_get_num_csi2_phy() in its caller The cal_data_get_num_csi2_phy() function simply returns cal->data->num_csi2_phy, and is not consistently used across the driver, as most accesses to cal->data->num_csi2_phy are open-coded. We could fix those open-coded accesses to use cal_data_get_num_csi2_phy(), but that wouldn't bring much in terms of readability, so inline cal_data_get_num_csi2_phy() in its only caller instead, and drop the function. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 825800dc2250ce278fafc24c0cfd4d76d1b51cc3 Author: Laurent Pinchart Date: Mon Jul 6 20:35:55 2020 +0200 media: ti-vpe: cal: Group CAMERARX-related functions together Group the CAMERARX functions together to make the overall driver structure easier to navigate. This only moves functions around, no functional change is included. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f7cd15eb0b852ccc82d6b03e9cde7df9967c5195 Author: Laurent Pinchart Date: Mon Jul 6 20:35:54 2020 +0200 media: ti-vpe: cal: Create consistent naming for CAMERARX functions Rename all functions related to CAMERARX with a cal_camerarx_ prefix, and pass them a cal_camerarx pointer. This performs most of the decoupling of the CAMERARX from the context. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 559cd8b836a15f27b40e877e7158373ecb43fc76 Author: Laurent Pinchart Date: Mon Jul 6 20:35:53 2020 +0200 media: ti-vpe: cal: Store sensor-related data in cal_camerarx The sensor is connected to the CAMERARX. Store its pointer, as well as the sensor pixel rate and the endpoint, in the cal_camerarx. This prepares for decoupling the cal_camerarx and cal_ctx. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6961f5d60108bb8f4a3154bb3780011a26323537 Author: Laurent Pinchart Date: Mon Jul 6 20:35:52 2020 +0200 media: ti-vpe: cal: Add print macros for the cal_camerarx instances Prepare for passing the cal_camerarx pointer instead of the cal_ctx pointer to CAMERARX-related functions by adding print macros for cal_camerarx. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 552b07b56eba3e7883a69aa0aad80f2c09d87cc1 Author: Laurent Pinchart Date: Mon Jul 6 20:35:51 2020 +0200 media: ti-vpe: cal: Use dev_* print macros Use the dev_* print macros instead of the v4l2_* print macros. This prepares for a common print infrastructure that will also support the cal_camerarx instances. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d01a7fea9d7e48eefe1b85a8706fe4bed06589db Author: Laurent Pinchart Date: Mon Jul 6 20:35:50 2020 +0200 media: ti-vpe: cal: Store instance ID and cal pointer in cal_camerarx Store a pointer to the cal_dev and the cal_camerarx instance number in the cal_camerarx structure. This prepares for passing a cal_camerarx pointer instead of a cal_ctx pointer to multiple functions that deal with the CAMERARX. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be28027075adb8a940f340a2fe4e5ce18b500ed4 Author: Laurent Pinchart Date: Mon Jul 6 20:35:49 2020 +0200 media: ti-vpe: cal: Remove internal phy structure from cal_camerarx The cal_camerarx structure describes the PHY, there's no need for an internal structure named phy. Removed that level of indirection. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d8444ea02f3bf366de6eee1fa9359e1772ad24a4 Author: Laurent Pinchart Date: Mon Jul 6 20:35:48 2020 +0200 media: ti-vpe: cal: Name all cal_camerarx pointers consistently Name all variables that point to a cal_camerax instance 'phy' instead of 'cc'. The name 'cc' refers to Camera Core, but is not commonly used in the driver or in datasheets. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 97cf202807c9154e6a84be4b53ce8c4228de2246 Author: Laurent Pinchart Date: Mon Jul 6 20:35:47 2020 +0200 media: ti-vpe: cal: Name all cal_dev pointers consistently Name all variables pointing to a cal_dev instance 'cal', instead of a combination of 'caldev' and 'dev'. 'caldev' is only used in a few places and could have been renamed to 'dev', but 'dev' is confusing as it's also used for struct device instances. This generates lots of changes, but increases readability. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d1739eabdd9600569ff2da170b3baf343263f952 Author: Laurent Pinchart Date: Mon Jul 6 20:35:46 2020 +0200 media: ti-vpe: cal: Rename cal_csi2_phy to cal_camerarx_data The cal_csi2_phy contains platform data for the CAMERARX blocks. Rename it to cal_camerarx_data. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a7f8ac542a070cace1d1cc7f3e02f7791851a39f Author: Laurent Pinchart Date: Mon Jul 6 20:35:45 2020 +0200 media: ti-vpe: cal: Rename cc_data to cal_camerarx The various data structures that describe the components of the camera access layer (CAL) are named without much consistency. Start cleaning this up by renaming the structure that describes the CAMERARX block, cc_data, to cal_camerarx. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ca486468503652dbf55c4b1ffa9f3f3c4f3775bb Author: Laurent Pinchart Date: Mon Jul 6 20:35:44 2020 +0200 media: ti-vpe: cal: Move function to avoid forward declaration Move the csi2_phy_config() function to avoid its forward declaration. No functional change is included. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0a19960a6c6cdeee9327c71d4f0d9dee199fb887 Author: Laurent Pinchart Date: Mon Jul 6 20:35:43 2020 +0200 media: ti-vpe: cal: Remove flags field from struct cal_dev The cal_dev flags field is a copy of data->flags. Use the latter and remove the former. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6aa4459bdedc171c0d7d66a16f76131d333111f6 Author: Laurent Pinchart Date: Mon Jul 6 20:35:42 2020 +0200 media: ti-vpe: cal: Remove unused structure fields Remove structure fields that are never set, set and never read, or set to a fixed value. This allows removal of a global variable and a macro. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ed641dc98dd624dfa12824611e339c6499e5f9fe Author: Laurent Pinchart Date: Mon Jul 6 20:35:41 2020 +0200 media: ti-vpe: cal: Remove static const cal_regmap_config template The global static const cal_regmap_config template is only used in a single location, to initialize 3 fields of a local variable. Two of those fields then get overwritten. Remove the template and set the last remaining field manually. Simplify the code by hardcoding the field values instead of calculating them for a variable that always has the same value. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9704762aed23aa0eb9fc88454c7ce423471bcb3a Author: Laurent Pinchart Date: Mon Jul 6 20:35:40 2020 +0200 media: ti-vpe: cal: Constify platform data Now that no platform data fields are modified at runtime, make the corresponding structures const. The const qualifier for integer fields is removed as it's not required anymore. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 01bd7499393217ee409f095f361dddda370f94a3 Author: Laurent Pinchart Date: Mon Jul 6 20:35:39 2020 +0200 media: ti-vpe: cal: Make structure fields unsigned where applicable Several structure fields declared as int store positive values only. Make them unsigned. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be19b49e6ed6963ece660d33b4a16ea5b956faae Author: Laurent Pinchart Date: Mon Jul 6 20:35:38 2020 +0200 media: ti-vpe: cal: Rename cal_csi2_phy base_fields to fields The cal_csi2_phy structure has lost its 'fields' field that used to clash with the 'base_fields' field. Rename base_fields to fields. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5e19ffe77c096eab64f8a7893d58d80e725844c1 Author: Laurent Pinchart Date: Mon Jul 6 20:35:37 2020 +0200 media: ti-vpe: cal: Store PHY regmap fields in struct cc_data The PHY regmap fields are created dynamically at runtime. They don't belong to the platform data that should be constant. Move them to the cc_data structure. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 649e9535f15772be3b4cfbd621a9327db7b0289a Author: Laurent Pinchart Date: Mon Jul 6 20:35:36 2020 +0200 media: ti-vpe: cal: Don't modify cal_csi2_phy base_fields In preparation to constify cal_csi2_phy, avoid modifying the base_fields array at runtime. As the array now only needs to stored two values instead of a full struct reg_field instance, save memory by using a custom structure for the base_fields elements. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5b4426e33b85432e7cae803e622c2d383e313f66 Author: Laurent Pinchart Date: Mon Jul 6 20:35:35 2020 +0200 media: ti-vpe: cal: Embed base_fields array in struct cal_csi2_phy The base_fields field of cal_csi2_phy points to a fixed-size array of struct reg_field. This level of indirection isn't needed, embed the array directly in struct cal_csi2_phy. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6341aa2ee4dd955bd6cd11ddebd8cb5ee6e99a44 Author: Laurent Pinchart Date: Mon Jul 6 20:35:34 2020 +0200 media: ti-vpe: cal: Make loop indices unsigned where applicable Many loop indices only take positive values. Make them unsigned. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fcc6d6f71d1f2363c557d8638174b14239c58021 Author: Laurent Pinchart Date: Mon Jul 6 20:35:33 2020 +0200 media: ti-vpe: cal: Turn boolean variable into bool The found_port variable contains a boolean value, make it a bool. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d64463598f50b882a92e8b06ce4c8c338f818a95 Author: Laurent Pinchart Date: Mon Jul 6 20:35:32 2020 +0200 media: ti-vpe: cal: Remove needless casts Casting from a void pointer to a struct pointer doesn't require a cast. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6ff1d7260693cad1e06c24f99dc2f4d0cebb2589 Author: Laurent Pinchart Date: Mon Jul 6 20:35:31 2020 +0200 media: ti-vpe: cal: Remove needless variable initialization A few local variables are needlessly initialized. Fix them. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 37166b2ff964714efabefe4e6809d4af2d10a3e9 Author: Laurent Pinchart Date: Mon Jul 6 20:35:30 2020 +0200 media: ti-vpe: cal: Make cal_formats array const The static cal_formats array contains const data, make it const. This requires turning a few cal_fmt pointers into const pointers. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 50797fb30b95b04332b9f3a35c9f7ec2a09692a1 Author: Laurent Pinchart Date: Mon Jul 6 20:35:29 2020 +0200 media: ti-vpe: cal: Turn reg_(read|write)_field() into inline functions Turn the reg_(read|write)_field() macros into inline functions for additional type safety. Use the FIELD_GET() and FIELD_PREP() macros internally instead of reinventing the wheel. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d2b084eb1eecc130bc4c1e7defd45467f5d2077a Author: Laurent Pinchart Date: Mon Jul 6 20:35:28 2020 +0200 media: ti-vpe: cal: Inline CAL_VERSION macro in its only user The CAL_VERSION macro is used once only, in MODULE_VERSION(). This doesn't improve readability, inline it. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 47bed3fbe8a0ced333fda22e4a0a29342782c793 Author: Laurent Pinchart Date: Mon Jul 6 20:35:27 2020 +0200 media: ti-vpe: cal: Merge all status variables in IRQ handler The cal_irq() function reads three IRQ status registers and stores their values in three different variables. As each value is processed right after reading the corresponding register, a single variable is enough. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 255502a723b5fecf01e7f02d19ba49d507c673d5 Author: Laurent Pinchart Date: Mon Jul 6 20:35:26 2020 +0200 media: ti-vpe: cal: Index IRQ registersstarting at 0 The datasheet numbers the IRQ registers starting from 0. Update the numbering scheme to match the datasheet. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6442241630d1273033ae7f6665c4caec19671633 Author: Laurent Pinchart Date: Mon Jul 6 20:35:25 2020 +0200 media: ti-vpe: cal: Index CSI-2 port starting at 0 The datasheet numbers the CSI-2 PHYs (external to the CAL) starting from 1, but the PPI inputs to the CAL starting from 0. Update the numbering scheme for csi2_port to match the datasheet, which also simplifies the driver by removing the need to constantly subtract 1 from the value. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cff3784dfa6cca01c3001e8eca60ae0098de4c54 Author: Laurent Pinchart Date: Mon Jul 6 20:35:24 2020 +0200 media: ti-vpe: cal: Decouple CSI2 port and CPORT The CPORT mentioned in the CAL documentation has nothing to do with the CSI-2 ports. It's a remnant of CSI-3 support (or an attempt to achieve it), and now only serves as an arbitraty tag value used to associate data samples with contexts. Add a cport field to the cal_ctx structure and use it instead of the CSI-2 port number where a CPORT is required by the hardware. The value of the cport field is currently the same as the csi2_port field, so there's no functional change, but this will help reworking CPORT and CSI-2 port handling separately. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 789026265985f3c8d5d2081690cfa24637b1a333 Author: Laurent Pinchart Date: Mon Jul 6 20:35:23 2020 +0200 media: ti-vpe: cal: Avoid function forward declaration Move the cal_complete_ctx() function earlier in the file to avoid a foward declaration. There is no functional change. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 03395df3977eba11e2ee9893082aa63fb6bdfc68 Author: Laurent Pinchart Date: Mon Jul 6 20:35:22 2020 +0200 media: ti-vpe: cal: Sort headers alphabetically Sorting headers alphabetically helps locating duplicates. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 44d42520df8a67f47c1e47d934d6bcd38d87daac Author: Florin Tudorache Date: Sun Jun 28 11:24:47 2020 +0200 gspca: First camera mode is skipped If a device supports a resolution in 2 different formats, mode[0] is skipped on first iteration and a different format is selected. Example: 320x240/YUYV isn't reachable for OV534/ov772x Signed-off-by: Florin Tudorache Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 94b9ce6870f9c90ac92505482689818b254312f7 Author: Christophe JAILLET Date: Thu Jun 25 22:19:47 2020 +0200 media: s5p-g2d: Fix a memory leak in an error handling path in 'g2d_probe()' Memory allocated with 'v4l2_m2m_init()' must be freed by a corresponding call to 'v4l2_m2m_release()' Also reorder the code at the end of the probe function so that 'video_register_device()' is called last. Update the error handling path accordingly. Fixes: 5ce60d790a24 ("[media] s5p-g2d: Add DT based discovery support") Fixes: 918847341af0 ("[media] v4l: add G2D driver for s5p device family") Signed-off-by: Christophe JAILLET Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: checkpatch: align with parenthesis] Signed-off-by: Mauro Carvalho Chehab commit b3ab1c6058fad8cd5726f24e9ed9053e43bb2af4 Author: Ezequiel Garcia Date: Wed Jun 24 21:28:00 2020 +0200 media: Add V4L2_TYPE_IS_CAPTURE helper It's all too easy to get confused by the V4L2_TYPE_IS_OUTPUT macro, when it's used as !V4L2_TYPE_IS_OUTPUT. Reduce the risk of confusion with macro to explicitly check for the CAPTURE queue type case. This change does not affect functionality, and it's only intended to make the code more readable. Suggested-by: Nicolas Dufresne Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: checkpatch: align with parenthesis] Signed-off-by: Mauro Carvalho Chehab commit d6129d36b305e9943bc6af0e4f0f7f6a77ded9b0 Author: Flavio Suligoi Date: Tue Jun 16 13:52:55 2020 +0200 media: pci: dt3155: fix spelling mistake Fix typo: "TRIGER" --> "TRIGGER" Signed-off-by: Flavio Suligoi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 467bd18d7ae37dce49955554014429ca8c679d4f Author: Alexander A. Klimov Date: Thu Jul 9 23:29:43 2020 +0200 media: docs: pvrusb2: replace http references with https ones PVRUSB2 VIDEO4LINUX DRIVER: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3bdf27a33cc4f4806ab6ced841aaffed6625544f Author: Alexander A. Klimov Date: Thu Jul 9 22:29:17 2020 +0200 media: gspca: replace http references with https ones GSPCA USB WEBCAM DRIVER: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2e7ee8bb24a72b924ef78908737d81f81cf93053 Author: Eugen Hristev Date: Thu Jul 9 14:06:45 2020 +0200 media: atmel: atmel-isc: rework component offsets The component offsets were computed in a negative way: they were subtracted from the actual color component value. So, a higher offset was reducing the component value. This is not really desirable, as the offset is a 2's complements number with 1 bit for sign and 12 value bits, so we would like to be able to also add to the component, not only subtract. The reported number in v4l2 is fine, a range from -4095 to +4095. However when configuring a negative value for the offset, this would in fact not function, because with the old code, the number was subtracted from the max value. By setting something negative, it was overflowing in fact. Reworked the component offsets by placing the real value as the v4l2 ctrls. Now, the values are the real number that is added or subtracted from the component. The negative values received from v4l2 are already in 2's complements, so there is no need for conversion. This actually simplifies a lot the computation procedure, eliminating the need for the macros that convert from v4l2 values to ISC values and viceversa. Also the ZERO_VAL is eliminated, as 0 is now 0, as it's supposed to be. Example after this change: # v4l2-ctl --set-ctrl=red_component_offset=-150 -L User Controls brightness 0x00980900 (int) : min=-1024 max=1023 step=1 default=0 value=0 flags=slider contrast 0x00980901 (int) : min=-2048 max=2047 step=1 default=16 value=20 flags=slider white_balance_automatic 0x0098090c (bool) : default=1 value=0 flags=update do_white_balance 0x0098090d (button) : flags=inactive, write-only, execute-on-write gamma 0x00980910 (int) : min=0 max=3 step=1 default=3 value=3 flags=slider red_component_gain 0x009819c0 (int) : min=0 max=8191 step=1 default=512 value=512 flags=slider blue_component_gain 0x009819c1 (int) : min=0 max=8191 step=1 default=512 value=512 flags=slider green_red_component_gain 0x009819c2 (int) : min=0 max=8191 step=1 default=512 value=512 flags=slider green_blue_component_gain 0x009819c3 (int) : min=0 max=8191 step=1 default=512 value=512 flags=slider red_component_offset 0x009819c4 (int) : min=-4095 max=4095 step=1 default=0 value=-150 flags=slider blue_component_offset 0x009819c5 (int) : min=-4095 max=4095 step=1 default=0 value=0 flags=slider green_red_component_offset 0x009819c6 (int) : min=-4095 max=4095 step=1 default=0 value=0 flags=slider green_blue_component_offset 0x009819c7 (int) : min=-4095 max=4095 step=1 default=0 value=0 flags=slider The auto white balance algorithm is unchanged, but the obtained value to 'subtract' is now converted to negative and saved as a v4l2 control and displayed properly. Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bb79974cdf953dc49ef653c59fda4daf1acc32b9 Author: Alexander A. Klimov Date: Thu Jul 9 09:28:14 2020 +0200 media: davinci: replace http references with https TI DAVINCI SERIES MEDIA DRIVER: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Reviewed-by: Kieran Bingham Reviewed-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf293a4f0e1a94c9a902d54879b189d459113c63 Author: Alexander A. Klimov Date: Wed Jul 8 08:24:20 2020 +0200 media: solo6x10: replace http references with https Replace HTTP links with HTTPS ones: SOFTLOGIC 6x10 MPEG CODEC Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Ismael Luceno Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b4cc96f9803a953d2688a77f5f3035a6693b575e Author: Randy Dunlap Date: Tue Jul 7 21:17:44 2020 +0200 Documentation: userspace-api/media: drop doubled words Drop duplicated words in Documentation/userspace-api/media/. This addresses the words "struct" and "value". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Signed-off-by: Hans Verkuil [hverkuil-cisco@xs4all.nl: dev-sdr.rst: there is two -> there are two] Signed-off-by: Mauro Carvalho Chehab commit 503ebad4b5d7883ab8476d95f0e2aa77bc56f91e Author: Hans Verkuil Date: Tue Jul 7 15:36:47 2020 +0200 sun4i-csi: call _vb2_fop_release instead of v4l2_fh_release This driver didn't call _vb2_fop_release in the sun4i_csi_release function. Without that call the vb2 queue is not properly canceled and buffers may not be freed. Signed-off-by: Hans Verkuil Acked-by: Maxime Ripard Signed-off-by: Mauro Carvalho Chehab commit 71ecc5356d227072c7c31e44f6774d461fd4865f Author: Hans Verkuil Date: Tue Jul 7 15:32:59 2020 +0200 sun4i-csi: drop read/write, enable VB2_DMABUF For no obvious reason VB2_DMABUF was not enabled. Add this. Also both read and write file ops were set, but this was not enabled in the vb2 io_modes or in the device_caps capabilities. Drop this. Signed-off-by: Hans Verkuil Acked-by: Maxime Ripard Signed-off-by: Mauro Carvalho Chehab commit de26c90fc40d7d32a6f3f71babad2547ab3b7abb Author: Hans Verkuil Date: Tue Jul 7 15:10:15 2020 +0200 sunxi-csi: fill in bus_info of media device This fixes a v4l2-compliance warning: Required ioctls: warn: v4l2-test-media.cpp(52): empty bus_info test MEDIA_IOC_DEVICE_INFO: OK Signed-off-by: Hans Verkuil Acked-by: Maxime Ripard Signed-off-by: Mauro Carvalho Chehab commit 77d7ceb1a14616af8877c77674c8a17ed45fce85 Author: Colin Ian King Date: Wed Jul 1 15:56:52 2020 +0200 media: gspca: remove redundant initialization of variable status The variable status is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a69a7a33268308ddcc9abf0f7d7cd61ec4300cbe Author: Ezequiel Garcia Date: Wed Jul 1 15:17:30 2020 +0200 v4l2-core: Print control name in VIDIOC_S/G_(EXT)_CTRL(S) While debugging, it's currently really hard to identify controls by their ID. Print the control name making the print more helpful. With this change, the print changes from: video1: VIDIOC_S_EXT_CTRLS: which=0xf010000, count=5, error_idx=4, request_fd=45, id/size=0x990ce8/1048, id/size=0x990ce9/12, id/size=0x990cea/480, id/size=0x990ceb/896, id/size=0x990cec/400 video1: VIDIOC_S_EXT_CTRLS: which=0xf010000, count=5, error_idx=4, request_fd=42, name=H264 Sequence Parameter Set, id/size=0x990ce8/1048, name=H264 Picture Parameter Set, id/size=0x990ce9/12, name=H264 Scaling Matrix, id/size=0x990cea/480, name=H264 Slice Parameters, id/size=0x990ceb/896, name=H264 Decode Parameters, id/size=0x990cec/400 For instance, this is specially helpful when the ioctl fails. Consider the following example: v4l2-ctrls: prepare_ext_ctrls: video1: pointer control id 0x990cec size too small, 400 bytes but 784 bytes needed v4l2-ctrls: try_set_ext_ctrls: video1: video1: try_set_ext_ctrls_common failed (-14) video1: VIDIOC_S_EXT_CTRLS: error -14: which=0xf010000, count=5, error_idx=5, request_fd=39, name=H264 Sequence Parameter Set, id/size=0x990ce8/1048, name=H264 Picture Parameter Set, id/size=0x990ce9/12, name=H264 Scaling Matrix, id/size=0x990cea/480, name=H264 Slice Parameters, id/size=0x990ceb/896, name=H264 Decode Parameters, id/size=0x990cec/400 Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e8bf419e0ab2d7401dccf737cd944191164a6028 Author: Hans Verkuil Date: Tue Jun 30 12:28:28 2020 +0200 include/media/v4l2-subdev.h: fix typo Typo in comment block: v4l2_subdev_get_try_crop -> v4l2_subdev_get_try_compose Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6c42227c3467549ddc65efe99c869021d2f4a570 Author: Hans Verkuil Date: Fri Jun 26 12:44:26 2020 +0200 cec-api: prevent leaking memory through hole in structure Fix this smatch warning: drivers/media/cec/core/cec-api.c:156 cec_adap_g_log_addrs() warn: check that 'log_addrs' doesn't leak information (struct has a hole after 'features') Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 137641287eb40260783a4413847a0aef06023a6c Author: Oliver Neukum Date: Tue May 5 12:50:33 2020 +0200 go7007: add sanity checking for endpoints A malicious USB device may lack endpoints the driver assumes to exist Accessing them leads to NULL pointer accesses. This patch introduces sanity checking. Reported-and-tested-by: syzbot+cabfa4b5b05ff6be4ef0@syzkaller.appspotmail.com Signed-off-by: Oliver Neukum Fixes: 866b8695d67e8 ("Staging: add the go7007 video driver") Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ebeacb1f612db22020561211c21b4d966cf7ca24 Author: Dmitry Osipenko Date: Wed Jun 24 17:08:47 2020 +0200 media: staging: tegra-vde: Power-cycle hardware on probe VDE partition is left turned ON after bootloader on most devices, hence let's ensure that it's turned OFF in order to lower power leakage while hardware is idling by turning it ON and OFF during of the driver's probe. Signed-off-by: Dmitry Osipenko Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8f0c714ad9be1ef774c98e8819a7a571451cb019 Author: Dmitry Osipenko Date: Wed Jun 24 17:08:46 2020 +0200 media: staging: tegra-vde: Turn ON power domain on shutdown On some devices bootloader isn't ready to a clamped VDE power, and thus, machine hangs on a warm reboot (CPU reset). The VDE power partition is turned ON by default on a cold boot, hence VDE driver should keep power partition enabled on system's reboot too. This fixes hang on a warm reboot on a Tegra20 Acer A500 device, which is handy if Embedded Controller driver is unavailable, i.e. cold reboot can't be performed. Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c19c7a13ee9d18bc6a43b417b8daa2edb825d601 Author: Dmitry Osipenko Date: Wed Jun 24 17:08:45 2020 +0200 media: staging: tegra-vde: Runtime PM is always available on Tegra Runtime PM is always available on Tegra nowadays since commit 40b2bb1b132a ("ARM: tegra: enforce PM requirement"), hence the case of unavailable RPM doesn't need to be handled. Signed-off-by: Dmitry Osipenko Acked-by: Thierry Reding Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 208921bae696d92f6a10681cfef2df0bb68f091a Author: Nisha Kumari Date: Mon Jun 22 18:11:09 2020 +0530 arm64: dts: qcom: pmi8998: Add nodes for LAB and IBB regulators This patch adds devicetree nodes for LAB and IBB regulators. Signed-off-by: Nisha Kumari [sumits: Updated for better compatible strings and names] Signed-off-by: Sumit Semwal Link: https://lore.kernel.org/r/20200622124110.20971-4-sumit.semwal@linaro.org Signed-off-by: Bjorn Andersson commit 812f5501161151f3c3f4e15f7ef250fc1c3af6a4 Author: Dinh Nguyen Date: Wed Jul 15 13:05:16 2020 -0500 ARM: dts: socfpga: add the temperature sensor to the Arria10 devkit Add the Maxim max1619 temp sensor that is on the Arria10 devkit. Signed-off-by: Dinh Nguyen commit 0ef91ccdbf49fac8deec0871dacdc74094d44ae0 Author: Dinh Nguyen Date: Tue Jun 30 15:18:16 2020 -0500 arm: dts: socfpga: add reset-names to spi node Add reset-names = "spi" to spi dts nodes. Signed-off-by: Dinh Nguyen commit d4ae4dd346cd49302d157b129ead2f60d3a82534 Author: Dinh Nguyen Date: Tue Jun 30 13:44:37 2020 -0500 arm64: dts: agilex: add nand clocks Add the clock properties for the NAND dts node. Signed-off-by: Dinh Nguyen commit 48f36de93a504e63e3b0dadd5b9ea666663e5662 Author: Dinh Nguyen Date: Fri Aug 9 12:28:06 2019 -0700 arm64: dts: agilex: populate clock dts entries for Intel SoCFPGA Agilex Add clock dts entries to the Intel SoCFPGA Agilex platform. Signed-off-by: Dinh Nguyen commit 83a3545d9c377c8524a238d22258e0319106f080 Author: Marcin Wojtas Date: Wed Jul 15 09:06:49 2020 +0200 arm64: dts: marvell: add SMMU support Add IOMMU node for Marvell AP806 based SoCs together with platform and PCI device Stream ID mapping. Signed-off-by: Marcin Wojtas Signed-off-by: Tomasz Nowicki Signed-off-by: Gregory CLEMENT commit 43bf2025452d26ba006a7f321daf014cea952c8b Author: Daniel González Cabanelas Date: Fri Jun 26 20:39:05 2020 +0200 ARM: dts: dlink-dns327l: fix reg-init PHY The marvell PHY reg-init registers for the D-Link DNS-327L are wrong. Currently the first field is used to set the page 2, but this is pointless. The usage is not correct, and we are setting the wrong registers. Fix it. Signed-off-by: Daniel González Cabanelas Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 01b5e34518675fc02673ac8c0e11dcffb3a0100e Author: Andy Shevchenko Date: Mon Jun 15 18:05:42 2020 +0300 ARM: orion/gpio: Make use of for_each_requested_gpio() Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko Cc: Jason Cooper Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit 947c6ce5ea5d7c30bfcd9a09c2952a849d813d53 Author: Alexander A. Klimov Date: Mon Jul 13 09:09:08 2020 +0200 ARM: dts: kirkwood: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit e6e57b663ea13e595f0c1fc310959f4e44dbf601 Author: Marek Behún Date: Mon Jun 1 23:00:50 2020 +0200 firmware: turris-mox-rwtm: add debugfs documentation Add debugfs ABI documentation for the ECDSA signatures. Signed-off-by: Marek Behún Signed-off-by: Gregory CLEMENT commit 50524d787de34300ca9189e63afe13e26d782bea Author: Marek Behún Date: Mon Jun 1 23:00:49 2020 +0200 firmware: turris-mox-rwtm: support ECDSA signatures via debugfs The firmware on Turris MOX secure processor offers signing messages with ECDSA private key stored in protected OTP memory. The optimal solution would be to register an akcipher provider via kernel's crypto API, but crypto API does not yet support accessing akcipher API from userspace (and probably won't for some time, see https://www.spinics.net/lists/linux-crypto/msg38388.html). At first I tried to put this via standard sysfs API, but the way I designed it is not compatible with sysfs's standard "one file per attribute". This patch therefore adds support for accessing this signature generation mechanism via debugfs. Since CZ.NIC's Turris MOX is the only user of this module, the potential future change to akcipher API should not cause problems, since we can just change our userspace software then. Signed-off-by: Marek Behún Signed-off-by: Gregory CLEMENT commit 719646b76a41b8a482f8701825b635e9710ab329 Author: Michael Trimarchi Date: Tue Jul 7 12:12:14 2020 +0200 ARM: dts: rockchip: Fix VBUS on rk3288-vyasa Connect the voltage regulator of vbus to the otg connector. Depending on the current mode this is enabled (in "host" mode") or disabled (in "peripheral" mode). The regulator must be updated if the controller is configured in "otg" mode and the status changes between "host" and "peripheral". Signed-off-by: Michael Trimarchi Link: https://lore.kernel.org/r/20200707101214.2301768-1-michael@amarulasolutions.com Signed-off-by: Heiko Stuebner commit afd9eb88041409e0f311730f23e8fe6921e74cb8 Author: Jagan Teki Date: Wed Jul 15 14:04:18 2020 +0530 ARM: dts: rockchip: Add Radxa Rock Pi N8 initial support Rock Pi N8 is a Rockchip RK3288 based SBC, which has - VMARC RK3288 SOM (as per SMARC standard) from Vamrs. - Compatible carrier board from Radxa. VAMRC RK3288 SOM need to mount on top of radxa dalang carrier board for making Rock Pi N8 SBC. So, add initial support for Rock Pi N8 by including rk3288, rk3288 vamrc-som and raxda dalang carrier board dtsi files. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200715083418.112003-8-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit b8c564d4fa76b1314a10585eea8e97b8c621a77a Author: Jagan Teki Date: Wed Jul 15 14:04:17 2020 +0530 ARM: dts: rockchip: Add VMARC RK3288 SOM initial support VMARC RK3288 SOM is a standard SMARC SOM design with Rockchip RK3288 SoC, which is designed by Vamrs. Specification: - Rockchip RK3288 - PMIC: RK808 - eMMC: 16GB/32GB/64GB - SD slot - 2xUSB-2.0, 1xUSB3.0 - USB-C for power supply - Ethernet - HDMI, MIPI-DSI/CSI, eDP Add initial support for VMARC RK3288 SOM, this would use with associated carrier board. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200715083418.112003-7-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 09ee4794270f0010c6397163f033f883f5bff1aa Author: Jagan Teki Date: Wed Jul 15 14:04:16 2020 +0530 dt-bindings: arm: rockchip: Add Rock Pi N8 binding Rock Pi N8 is a Rockchip RK3288 based SBC, which has - VMARC RK3288 SOM (as per SMARC standard) from Vamrs. - Compatible carrier board from Radxa. VMARC RK3288 SOM need to mount on top of dalang carrier board for making Rock PI N8 SBC. Add dt-bindings for it. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200715083418.112003-6-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit a66bd94d0eac017e4846658750acaca2937555bb Author: Jagan Teki Date: Wed Jul 15 14:04:15 2020 +0530 arm64: dts: rk3399pro: vmarc-som: Move common properties into Carrier Some of gmac, sdmmc node properties are common across rk3288 and rk3399pro SOM's so move them into Carrier dtsi. Chosen node is specific to rk3399pro configure SBC, so move it into RockPI N10 dts. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200715083418.112003-5-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 4a3ca113c0f3a2ce33e51fc6a48a121b2d707d4f Author: Jagan Teki Date: Wed Jul 15 14:04:14 2020 +0530 arm64: dts: rk3399pro: vmarc-som: Move supply regulators into Carrier Supply regulators are common across different variants of vmarc SOM's since the Type C power controller IC is part of the carrier board. So, move the supply regulators into carrier board dtsi. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200715083418.112003-4-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit 3047b384a74090f09b994298eb5c40986275233a Author: Jagan Teki Date: Wed Jul 15 14:04:13 2020 +0530 arm64: dts: rk3399pro: vmarc-som: Fix sorting nodes, properties Fix node, properties sorting on RockPI N10 board dts(i) files. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200715083418.112003-3-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit c2f343510d99ab53b46bdfeb184cb48f622e6943 Author: Jagan Teki Date: Wed Jul 15 14:04:12 2020 +0530 ARM: dts: rockchip: dalang-carrier: Move i2c nodes into SOM I2C nodes and associated slave devices defined in Carrier board are specific to rk3399pro vmrac SOM. So, move them into SOM dtsi. Signed-off-by: Jagan Teki Link: https://lore.kernel.org/r/20200715083418.112003-2-jagan@amarulasolutions.com Signed-off-by: Heiko Stuebner commit fb082df317823463eaf09ac88de19fb3319e4f58 Author: Sugar Zhang Date: Mon Jun 29 22:10:57 2020 +0800 ARM: dts: rockchip: Add 'arm,pl330-periph-burst' for dmac This patch Add the quirk to specify to use burst transfer for better compatible and higher performance. Signed-off-by: Sugar Zhang Link: https://lore.kernel.org/r/1593439866-68459-1-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Heiko Stuebner commit 505af9184ec0a0222bb883486137fac32731e01d Author: Sugar Zhang Date: Mon Jun 29 22:12:11 2020 +0800 arm64: dts: rockchip: Add 'arm,pl330-periph-burst' for dmac This patch Add the quirk to specify to use burst transfer for better compatible and higher performance. Signed-off-by: Sugar Zhang Link: https://lore.kernel.org/r/1593439935-68540-1-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Heiko Stuebner commit e7e46a1f6b755248058db531b1cff3b0cc580650 Author: Johan Jonker Date: Wed Jul 15 09:09:54 2020 +0200 arm64: dts: rockchip: remove bus-width from mmc nodes in px30 dts files 'bus-width' has been added to px30.dtsi mmc nodes, so now it can be removed from the dts files that include it. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200715070954.1992-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 2be90e914c12bdea70b0bd297d5715ee66eb46d0 Author: Randy Dunlap Date: Fri Jul 17 19:51:18 2020 -0700 dmaengine: linux/dmaengine.h: drop duplicated word in a comment Drop the doubled word "has" in a comment. Signed-off-by: Randy Dunlap Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Link: https://lore.kernel.org/r/06e64046-ebf1-15db-dbaf-73698de3b493@infradead.org Signed-off-by: Vinod Koul commit ef9f7cfaa50025068c69cdee8efccee12d9fabfc Merge: 61f879d97ce45 f0479c4bcbd92 Author: Michael Ellerman Date: Sat Jul 18 22:43:55 2020 +1000 Merge branch 'fixes' into next Merge our fixes branch, primarily to bring in the ebb selftests build fix and the pkey fix, which is a dependency for some future work. commit 16ecd8f33c6e7381abb6aa899526ff2a3bb9dcb4 Author: Wan Ahmad Zainie Date: Wed Jul 1 10:33:46 2020 +0800 dt-bindings: mmc: convert arasan sdhci bindings to yaml Convert arasan,sdhci.txt file to yaml. The new file arasan,sdhci.yaml will inherit properties from mmc-controller.yaml. 'sdhci' is no longer a valid name for node and should be changed to 'mmc'. Suggested-by: Ulf Hansson Signed-off-by: Wan Ahmad Zainie Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200701023346.3873-1-wan.ahmad.zainie.wan.mohamad@intel.com Signed-off-by: Ulf Hansson commit e57892f50a07953053dcb1e0c9431197e569c258 Merge: bfdfa51702dec 0ab5539f85840 Author: Alexei Starovoitov Date: Fri Jul 17 20:18:18 2020 -0700 Merge branch 'bpf-socket-lookup' Jakub Sitnicki says: ==================== Changelog ========= v4 -> v5: - Enforce BPF prog return value to be SK_DROP or SK_PASS. (Andrii) - Simplify prog runners now that only SK_DROP/PASS can be returned. - Enable bpf_perf_event_output from the start. (Andrii) - Drop patch "selftests/bpf: Rename test_sk_lookup_kern.c to test_ref_track_kern.c" - Remove tests for narrow loads from context at an offset wider in size than target field, while we are discussing how to fix it: https://lore.kernel.org/bpf/20200710173123.427983-1-jakub@cloudflare.com/ - Rebase onto recent bpf-next (bfdfa51702de) - Other minor changes called out in per-patch changelogs, see patches: 2, 4, 6, 13-15 - Carried over Andrii's Acks where nothing changed. v3 -> v4: - Reduce BPF prog return codes to SK_DROP/SK_PASS (Lorenz) - Default to drop on illegal return value from BPF prog (Lorenz) - Extend bpf_sk_assign to accept NULL socket pointer. - Switch to saner return values and add docs for new prog_array API (Andrii) - Add support for narrow loads from BPF context fields (Yonghong) - Fix broken build when IPv6 is compiled as a module (kernel test robot) - Fix null/wild-ptr-deref on BPF context access - Rebase to recent bpf-next (eef8a42d6ce0) - Other minor changes called out in per-patch changelogs, see patches 1-2, 4, 6, 8, 10-12, 14, 16 v2 -> v3: - Switch to link-based program attachment - Support for multi-prog attachment - Ability to skip reuseport socket selection - Code on RX path is guarded by a static key - struct in6_addr's are no longer copied into BPF prog context - BPF prog context is initialized as late as possible - Changes called out in patches 1-2, 4, 6, 8, 10-14, 16 - Patches dropped: 01/17 flow_dissector: Extract attach/detach/query helpers 03/17 inet: Store layer 4 protocol in inet_hashinfo 08/17 udp: Store layer 4 protocol in udp_table v1 -> v2: - Changes called out in patches 2, 13-15, 17 - Rebase to recent bpf-next (b4563facdcae) RFCv2 -> v1: - Switch to fetching a socket from a map and selecting a socket with bpf_sk_assign, instead of having a dedicated helper that does both. - Run reuseport logic on sockets selected by BPF sk_lookup. - Allow BPF sk_lookup to fail the lookup with no match. - Go back to having just 2 hash table lookups in UDP. RFCv1 -> RFCv2: - Make socket lookup redirection map-based. BPF program now uses a dedicated helper and a SOCKARRAY map to select the socket to redirect to. A consequence of this change is that bpf_inet_lookup context is now read-only. - Look for connected UDP sockets before allowing redirection from BPF. This makes connected UDP socket work as expected in the presence of inet_lookup prog. - Share the code for BPF_PROG_{ATTACH,DETACH,QUERY} with flow_dissector, the only other per-netns BPF prog type. Overview ======== This series proposes a new BPF program type named BPF_PROG_TYPE_SK_LOOKUP, or BPF sk_lookup for short. BPF sk_lookup program runs when transport layer is looking up a listening socket for a new connection request (TCP), or when looking up an unconnected socket for a packet (UDP). This serves as a mechanism to overcome the limits of what bind() API allows to express. Two use-cases driving this work are: (1) steer packets destined to an IP range, fixed port to a single socket 192.0.2.0/24, port 80 -> NGINX socket (2) steer packets destined to an IP address, any port to a single socket 198.51.100.1, any port -> L7 proxy socket In its context, program receives information about the packet that triggered the socket lookup. Namely IP version, L4 protocol identifier, and address 4-tuple. To select a socket BPF program fetches it from a map holding socket references, like SOCKMAP or SOCKHASH, calls bpf_sk_assign(ctx, sk, ...) helper to record the selection, and returns SK_PASS code. Transport layer then uses the selected socket as a result of socket lookup. Alternatively, program can also fail the lookup (SK_DROP), or let the lookup continue as usual (SK_PASS without selecting a socket). This lets the user match packets with listening (TCP) or receiving (UDP) sockets freely at the last possible point on the receive path, where we know that packets are destined for local delivery after undergoing policing, filtering, and routing. Program is attached to a network namespace, similar to BPF flow_dissector. We add a new attach type, BPF_SK_LOOKUP, for this. Multiple programs can be attached at the same time, in which case their return values are aggregated according the rules outlined in patch #4 description. Series structure ================ Patches are organized as so: 1: enables multiple link-based prog attachments for bpf-netns 2: introduces sk_lookup program type 3-4: hook up the program to run on ipv4/tcp socket lookup 5-6: hook up the program to run on ipv6/tcp socket lookup 7-8: hook up the program to run on ipv4/udp socket lookup 9-10: hook up the program to run on ipv6/udp socket lookup 11-13: libbpf & bpftool support for sk_lookup 14-15: verifier and selftests for sk_lookup Patches are also available on GH: https://github.com/jsitnicki/linux/commits/bpf-inet-lookup-v5 Follow-up work ============== I'll follow up with below items, which IMHO don't block the review: - benchmark results for udp6 small packet flood scenario, - user docs for new BPF prog type, Documentation/bpf/prog_sk_lookup.rst, - timeout for accept() in tests after extending network_helper.[ch]. Thanks to the reviewers for their feedback to this patch series: Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Lorenz Bauer Cc: Marek Majkowski Cc: Martin KaFai Lau Cc: Yonghong Song -jkbs [RFCv1] https://lore.kernel.org/bpf/20190618130050.8344-1-jakub@cloudflare.com/ [RFCv2] https://lore.kernel.org/bpf/20190828072250.29828-1-jakub@cloudflare.com/ [v1] https://lore.kernel.org/bpf/20200511185218.1422406-18-jakub@cloudflare.com/ [v2] https://lore.kernel.org/bpf/20200506125514.1020829-1-jakub@cloudflare.com/ [v3] https://lore.kernel.org/bpf/20200702092416.11961-1-jakub@cloudflare.com/ [v4] https://lore.kernel.org/bpf/20200713174654.642628-1-jakub@cloudflare.com/ ==================== Reviewed-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov commit 0ab5539f85840d3c4e5a8a4783901c0038f8321e Author: Jakub Sitnicki Date: Fri Jul 17 12:35:36 2020 +0200 selftests/bpf: Tests for BPF_SK_LOOKUP attach point Add tests to test_progs that exercise: - attaching/detaching/querying programs to BPF_SK_LOOKUP hook, - redirecting socket lookup to a socket selected by BPF program, - failing a socket lookup on BPF program's request, - error scenarios for selecting a socket from BPF program, - accessing BPF program context, - attaching and running multiple BPF programs. Run log: bash-5.0# ./test_progs -n 70 #70/1 query lookup prog:OK #70/2 TCP IPv4 redir port:OK #70/3 TCP IPv4 redir addr:OK #70/4 TCP IPv4 redir with reuseport:OK #70/5 TCP IPv4 redir skip reuseport:OK #70/6 TCP IPv6 redir port:OK #70/7 TCP IPv6 redir addr:OK #70/8 TCP IPv4->IPv6 redir port:OK #70/9 TCP IPv6 redir with reuseport:OK #70/10 TCP IPv6 redir skip reuseport:OK #70/11 UDP IPv4 redir port:OK #70/12 UDP IPv4 redir addr:OK #70/13 UDP IPv4 redir with reuseport:OK #70/14 UDP IPv4 redir skip reuseport:OK #70/15 UDP IPv6 redir port:OK #70/16 UDP IPv6 redir addr:OK #70/17 UDP IPv4->IPv6 redir port:OK #70/18 UDP IPv6 redir and reuseport:OK #70/19 UDP IPv6 redir skip reuseport:OK #70/20 TCP IPv4 drop on lookup:OK #70/21 TCP IPv6 drop on lookup:OK #70/22 UDP IPv4 drop on lookup:OK #70/23 UDP IPv6 drop on lookup:OK #70/24 TCP IPv4 drop on reuseport:OK #70/25 TCP IPv6 drop on reuseport:OK #70/26 UDP IPv4 drop on reuseport:OK #70/27 TCP IPv6 drop on reuseport:OK #70/28 sk_assign returns EEXIST:OK #70/29 sk_assign honors F_REPLACE:OK #70/30 sk_assign accepts NULL socket:OK #70/31 access ctx->sk:OK #70/32 narrow access to ctx v4:OK #70/33 narrow access to ctx v6:OK #70/34 sk_assign rejects TCP established:OK #70/35 sk_assign rejects UDP connected:OK #70/36 multi prog - pass, pass:OK #70/37 multi prog - drop, drop:OK #70/38 multi prog - pass, drop:OK #70/39 multi prog - drop, pass:OK #70/40 multi prog - pass, redir:OK #70/41 multi prog - redir, pass:OK #70/42 multi prog - drop, redir:OK #70/43 multi prog - redir, drop:OK #70/44 multi prog - redir, redir:OK #70 sk_lookup:OK Summary: 1/44 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200717103536.397595-16-jakub@cloudflare.com commit f7726cbea402fc92a3c27226b761a6dbc0390cac Author: Jakub Sitnicki Date: Fri Jul 17 12:35:35 2020 +0200 selftests/bpf: Add verifier tests for bpf_sk_lookup context access Exercise verifier access checks for bpf_sk_lookup context fields. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200717103536.397595-15-jakub@cloudflare.com commit 93a3545d812ae7cfe4426374e00a7d8f64ac02e0 Author: Jakub Sitnicki Date: Fri Jul 17 12:35:34 2020 +0200 tools/bpftool: Add name mappings for SK_LOOKUP prog and attach type Make bpftool show human-friendly identifiers for newly introduced program and attach type, BPF_PROG_TYPE_SK_LOOKUP and BPF_SK_LOOKUP, respectively. Also, add the new prog type bash-completion, man page and help message. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200717103536.397595-14-jakub@cloudflare.com commit 499dd29d90bb78d4ac4f0d6648e26f4a339829b1 Author: Jakub Sitnicki Date: Fri Jul 17 12:35:33 2020 +0200 libbpf: Add support for SK_LOOKUP program type Make libbpf aware of the newly added program type, and assign it a section name. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200717103536.397595-13-jakub@cloudflare.com commit a352b32ae969788b706f666f764702cd0ab4a40a Author: Jakub Sitnicki Date: Fri Jul 17 12:35:32 2020 +0200 bpf: Sync linux/bpf.h to tools/ Newly added program, context type and helper is used by tests in a subsequent patch. Synchronize the header file. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200717103536.397595-12-jakub@cloudflare.com commit 6d4201b1386b335bb53628a04ad63e547872dc5a Author: Jakub Sitnicki Date: Fri Jul 17 12:35:31 2020 +0200 udp6: Run SK_LOOKUP BPF program on socket lookup Same as for udp4, let BPF program override the socket lookup result, by selecting a receiving socket of its choice or failing the lookup, if no connected UDP socket matched packet 4-tuple. Suggested-by: Marek Majkowski Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200717103536.397595-11-jakub@cloudflare.com commit 2a08748cd384cdfb8e1222bd3645a8d1d36e6a5d Author: Jakub Sitnicki Date: Fri Jul 17 12:35:30 2020 +0200 udp6: Extract helper for selecting socket from reuseport group Prepare for calling into reuseport from __udp6_lib_lookup as well. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200717103536.397595-10-jakub@cloudflare.com commit 72f7e9440e9bd06f855b21eba09c1017395f430a Author: Jakub Sitnicki Date: Fri Jul 17 12:35:29 2020 +0200 udp: Run SK_LOOKUP BPF program on socket lookup Following INET/TCP socket lookup changes, modify UDP socket lookup to let BPF program select a receiving socket before searching for a socket by destination address and port as usual. Lookup of connected sockets that match packet 4-tuple is unaffected by this change. BPF program runs, and potentially overrides the lookup result, only if a 4-tuple match was not found. Suggested-by: Marek Majkowski Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200717103536.397595-9-jakub@cloudflare.com commit 7629c73a1466ec2348e9f64c874c19bf13f35f4c Author: Jakub Sitnicki Date: Fri Jul 17 12:35:28 2020 +0200 udp: Extract helper for selecting socket from reuseport group Prepare for calling into reuseport from __udp4_lib_lookup as well. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200717103536.397595-8-jakub@cloudflare.com commit 1122702f02678597c4f1c7d316365ef502aafe08 Author: Jakub Sitnicki Date: Fri Jul 17 12:35:27 2020 +0200 inet6: Run SK_LOOKUP BPF program on socket lookup Following ipv4 stack changes, run a BPF program attached to netns before looking up a listening socket. Program can return a listening socket to use as result of socket lookup, fail the lookup, or take no action. Suggested-by: Marek Majkowski Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200717103536.397595-7-jakub@cloudflare.com commit 5df6531292b5021ac9e4ed261eb7d1fa9ff3bf08 Author: Jakub Sitnicki Date: Fri Jul 17 12:35:26 2020 +0200 inet6: Extract helper for selecting socket from reuseport group Prepare for calling into reuseport from inet6_lookup_listener as well. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200717103536.397595-6-jakub@cloudflare.com commit 1559b4aa1db443096af493c7d621dc156054babe Author: Jakub Sitnicki Date: Fri Jul 17 12:35:25 2020 +0200 inet: Run SK_LOOKUP BPF program on socket lookup Run a BPF program before looking up a listening socket on the receive path. Program selects a listening socket to yield as result of socket lookup by calling bpf_sk_assign() helper and returning SK_PASS code. Program can revert its decision by assigning a NULL socket with bpf_sk_assign(). Alternatively, BPF program can also fail the lookup by returning with SK_DROP, or let the lookup continue as usual with SK_PASS on return, when no socket has been selected with bpf_sk_assign(). This lets the user match packets with listening sockets freely at the last possible point on the receive path, where we know that packets are destined for local delivery after undergoing policing, filtering, and routing. With BPF code selecting the socket, directing packets destined to an IP range or to a port range to a single socket becomes possible. In case multiple programs are attached, they are run in series in the order in which they were attached. The end result is determined from return codes of all the programs according to following rules: 1. If any program returned SK_PASS and selected a valid socket, the socket is used as result of socket lookup. 2. If more than one program returned SK_PASS and selected a socket, last selection takes effect. 3. If any program returned SK_DROP, and no program returned SK_PASS and selected a socket, socket lookup fails with -ECONNREFUSED. 4. If all programs returned SK_PASS and none of them selected a socket, socket lookup continues to htable-based lookup. Suggested-by: Marek Majkowski Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200717103536.397595-5-jakub@cloudflare.com commit 80b373f74f9e28b0093930a6b95c929732f02512 Author: Jakub Sitnicki Date: Fri Jul 17 12:35:24 2020 +0200 inet: Extract helper for selecting socket from reuseport group Prepare for calling into reuseport from __inet_lookup_listener as well. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200717103536.397595-4-jakub@cloudflare.com commit e9ddbb7707ff5891616240026062b8c1e29864ca Author: Jakub Sitnicki Date: Fri Jul 17 12:35:23 2020 +0200 bpf: Introduce SK_LOOKUP program type with a dedicated attach point Add a new program type BPF_PROG_TYPE_SK_LOOKUP with a dedicated attach type BPF_SK_LOOKUP. The new program kind is to be invoked by the transport layer when looking up a listening socket for a new connection request for connection oriented protocols, or when looking up an unconnected socket for a packet for connection-less protocols. When called, SK_LOOKUP BPF program can select a socket that will receive the packet. This serves as a mechanism to overcome the limits of what bind() API allows to express. Two use-cases driving this work are: (1) steer packets destined to an IP range, on fixed port to a socket 192.0.2.0/24, port 80 -> NGINX socket (2) steer packets destined to an IP address, on any port to a socket 198.51.100.1, any port -> L7 proxy socket In its run-time context program receives information about the packet that triggered the socket lookup. Namely IP version, L4 protocol identifier, and address 4-tuple. Context can be further extended to include ingress interface identifier. To select a socket BPF program fetches it from a map holding socket references, like SOCKMAP or SOCKHASH, and calls bpf_sk_assign(ctx, sk, ...) helper to record the selection. Transport layer then uses the selected socket as a result of socket lookup. In its basic form, SK_LOOKUP acts as a filter and hence must return either SK_PASS or SK_DROP. If the program returns with SK_PASS, transport should look for a socket to receive the packet, or use the one selected by the program if available, while SK_DROP informs the transport layer that the lookup should fail. This patch only enables the user to attach an SK_LOOKUP program to a network namespace. Subsequent patches hook it up to run on local delivery path in ipv4 and ipv6 stacks. Suggested-by: Marek Majkowski Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200717103536.397595-3-jakub@cloudflare.com commit ce3aa9cc5109363099b7c4ac82e2c9768afcaf31 Author: Jakub Sitnicki Date: Fri Jul 17 12:35:22 2020 +0200 bpf, netns: Handle multiple link attachments Extend the BPF netns link callbacks to rebuild (grow/shrink) or update the prog_array at given position when link gets attached/updated/released. This let's us lift the limit of having just one link attached for the new attach type introduced by subsequent patch. No functional changes intended. Signed-off-by: Jakub Sitnicki Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200717103536.397595-2-jakub@cloudflare.com commit ef45fe470e1e5410db4af87abc5d5055427945ac Author: Boris Burkov Date: Mon Jun 1 13:12:05 2020 -0700 blk-cgroup: show global disk stats in root cgroup io.stat In order to improve consistency and usability in cgroup stat accounting, we would like to support the root cgroup's io.stat. Since the root cgroup has processes doing io even if the system has no explicitly created cgroups, we need to be careful to avoid overhead in that case. For that reason, the rstat algorithms don't handle the root cgroup, so just turning the file on wouldn't give correct statistics. To get around this, we simulate flushing the iostat struct by filling it out directly from global disk stats. The result is a root cgroup io.stat file consistent with both /proc/diskstats and io.stat. Note that in order to collect the disk stats, we needed to iterate over devices. To facilitate that, we had to change the linkage of a disk_type to external so that it can be used from blk-cgroup.c to iterate over disks. Suggested-by: Tejun Heo Signed-off-by: Boris Burkov Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit cd1fc4b98fb5953a220d690d45b11470fd9325d6 Author: Boris Burkov Date: Mon Jun 1 13:11:43 2020 -0700 blk-cgroup: make iostat functions visible to stat printing Previously, the code which printed io.stat only needed access to the generic rstat flushing code, but since we plan to write some more specific code for preparing root cgroup stats, we need to manipulate iostat structs directly. Since declaring static functions ahead does not seem like common practice in this file, simply move the iostat functions up. We only plan to use blkg_iostat_set, but it seems better to keep them all together. Signed-off-by: Boris Burkov Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit a050d82f5b04e585a6780b2a71faf1bd65d73928 Author: Armin Wolf Date: Fri Jul 17 20:21:48 2020 +0200 ne2k-pci: Use netif_msg_init to initialize msg_enable bits Use netif_msg_enable() to process param settings. Signed-off-by: Armin Wolf Signed-off-by: David S. Miller commit 1143fede88d502a8b3c3a8d68fd6e622a5cefda0 Merge: 11f3c1f583ea3 0044b1e1470aa Author: David S. Miller Date: Fri Jul 17 19:00:54 2020 -0700 Merge branch 'net-atlantic-add-support-for-FW-4-x' Mark Starovoytov says: ==================== net: atlantic: add support for FW 4.x This patch set adds support for FW 4.x, which is about to get into the production for some products. 4.x is mostly compatible with 3.x, save for soft reset, which requires the acquisition of 2 additional semaphores. Other differences (e.g. absence of PTP support) are handled via capabilities. Note: 4.x targets specific products only. 3.x is still the main firmware branch, which should be used by most users (at least for now). ==================== Signed-off-by: David S. Miller commit 0044b1e1470aa62eeabb24983e2ff5433a68666a Author: Dmitry Bogdanov Date: Fri Jul 17 21:01:47 2020 +0300 net: atlantic: add support for FW 4.x This patch adds support for FW 4.x, which is about to get into the production for some products. 4.x is mostly compatible with 3.x, save for soft reset, which requires the acquisition of 2 additional semaphores. Other differences (e.g. absence of PTP support) are handled via capabilities. Note: 4.x targets specific products only. 3.x is still the main firmware branch, which should be used by most users (at least for now). Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit b567edbfc85ac375181862808928aeb381560c68 Author: Mark Starovoytov Date: Fri Jul 17 21:01:46 2020 +0300 net: atlantic: align return value of ver_match function with function name This patch aligns the return value of hw_atl_utils_ver_match function with its name. Change the return type to bool, because it's better aligned with the actual usage. Return true when the version matches, false otherwise. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 11f3c1f583ea3f43cc244dba12ff77943de3edd9 Author: Mark Einon Date: Fri Jul 17 14:21:35 2020 +0100 net: ethernet: et131x: Remove redundant register read Following the removal of an unused variable assignment (remove unused variable 'pm_csr') the associated register read can also go, as the read also occurs in the subsequent et1310_in_phy_coma() call. Signed-off-by: Mark Einon Signed-off-by: David S. Miller commit eacc43d2c3b87e1cdffa005b4abd1562c5c8f8a3 Author: Zhang Changzhong Date: Fri Jul 17 18:33:30 2020 +0800 net: ethernet: et131x: Remove unused variable 'pm_csr' Gcc report warning as follows: drivers/net/ethernet/agere/et131x.c:953:6: warning: variable 'pm_csr' set but not used [-Wunused-but-set-variable] 953 | u32 pm_csr; | ^~~~~~ drivers/net/ethernet/agere/et131x.c:1002:6:warning: variable 'pm_csr' set but not used [-Wunused-but-set-variable] 1002 | u32 pm_csr; | ^~~~~~ drivers/net/ethernet/agere/et131x.c:3446:8: warning: variable 'pm_csr' set but not used [-Wunused-but-set-variable] 3446 | u32 pm_csr; | ^~~~~~ After commit 38df6492eb51 ("et131x: Add PCIe gigabit ethernet driver et131x to drivers/net"), 'pm_csr' is never used in these functions, so removing it to avoid build warning. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Acked-by: Mark Einon Signed-off-by: David S. Miller commit 5686b10978c580f374b09c9092c073dad83a1b23 Author: Zhang Changzhong Date: Fri Jul 17 18:23:04 2020 +0800 net: bna: Remove unused variable 't' Gcc report warning as follows: drivers/net/ethernet/brocade/bna/bfa_ioc.c:1538:6: warning: variable 't' set but not used [-Wunused-but-set-variable] 1538 | u32 t; | ^ After commit c107ba171f3d ("bna: Firmware Patch Simplification"), 't' is never used, so removing it to avoid build warning. Reported-by: Hulk Robot Signed-off-by: Zhang Changzhong Signed-off-by: David S. Miller commit 18c7015cc65ab62a161291b863225db5cfc717a4 Author: Jakub Kicinski Date: Fri Jul 17 13:59:58 2020 -0700 net: bnxt: don't complain if TC flower can't be supported The fact that NETIF_F_HW_TC is not set should be a sufficient indication to the user that TC offloads are not supported. No need to bother users of older firmware versions with pointless warnings on every boot. Also, since the support is optional, bnxt_init_tc() should not return an error in case FW is old, similarly to how error is not returned when CONFIG_BNXT_FLOWER_OFFLOAD is not set. With that we can add an error message to the caller, to warn about actual unexpected failures. Signed-off-by: Jakub Kicinski Reviewed-by: Michael Chan Signed-off-by: David S. Miller commit 8d73ec7411e084de8266bc3cb031d85a222458be Author: Jingle Wu Date: Thu Jul 16 22:55:57 2020 -0700 Input: elan_i2c - add firmware update info for ICs 0x11, 0x13, 0x14 This adds firmware size and page sizes for ic types 0x11, 0x13 and 0x14. IC 0x14 uses 512-byte firmware page size. Signed-off-by: Jingle Wu . Signed-off-by: Dmitry Torokhov commit bfd9b92bc8f9a3777961d27a08f62872a21ac507 Author: Jingle Wu Date: Thu Jul 16 22:49:09 2020 -0700 Input: elan_i2c - handle firmware updated on newer ICs Newer ICs with IC type value starting with 0x0D and newer bootloader code use 128-byte firmware pages. Their bootloader also needs to be switched to proper mode before executing firmware update. Signed-off-by: Jingle Wu Signed-off-by: Dmitry Torokhov commit 059d6c2de6fd521d4d4a39d127eece3de114b767 Author: Jingle Wu Date: Thu Jul 16 21:32:23 2020 -0700 Input: elan_i2c - add support for different firmware page sizes Prepare driver for devices that use different sizes of firmware pages. Signed-off-by: Jingle Wu Signed-off-by: Dmitry Torokhov commit df10cc8db1e13cfcbd851e02881e2ef815d21b37 Author: Jingle Wu Date: Wed Jul 15 22:02:19 2020 -0700 Input: elan_i2c - fix detecting IAP version on older controllers Older controllers in bootloader mode need a different command to retrieve the IAP version. Signed-off-by: Jingle Wu Link: https://lore.kernel.org/r/20200714105641.15151-1-jingle.wu@emc.com.tw Signed-off-by: Dmitry Torokhov commit 40d8aa97131d16fe880cd48f8faabcd6a45019c4 Author: Jingle Wu Date: Wed Jul 15 22:12:08 2020 -0700 Input: elan_i2c - handle devices with patterns above 1 Extend fetching and parsing parameters of the controllers to devices with "patterns" above 1 (which currently should be handled in the same fashion as devices with pattern 1). Signed-off-by: Jingle Wu Signed-off-by: Dmitry Torokhov commit fc7c882aa9b1643273c4bb77d31163355dcbc0b8 Author: Jingle Wu Date: Wed Jul 15 22:25:59 2020 -0700 Input: elan_i2c - make fetching IC type of older controllers more robust On older controllers IC type is reported in the 2nd byte of ETP_I2C_OSM_VERSION_CMD, however if controller's firmware is not flashed correctly it may return incorrect data. Fortunately there is also ETP_I2C_IAP_VERSION_P0_CMD command that can be used when controller in either normal or IAP mode, and which is guaranteed to return accurate data, so let's use it. Signed-off-by: Jingle Wu Signed-off-by: Dmitry Torokhov commit 77da21c5d3c698f5c9ce41d57c137244bc8b7b93 Author: Jingle Wu Date: Wed Jul 15 17:40:27 2020 -0700 Input: elan_i2c - handle firmware not implementing "get pattern" command Not all versions of firmware implement "get pattern" command. When encountering those assume that the controllers use older pattern. Signed-off-by: Jingle Wu Signed-off-by: Dmitry Torokhov commit efd8626213f6897b416e573e87f4582810086b93 Author: Mathieu Poirier Date: Tue Jul 14 14:04:45 2020 -0600 remoteproc: stm32: Update M4 state in stm32_rproc_stop() Update the co-processor state in function stm32_rproc_stop() so that it can be used in scenarios where the remoteproc core is attaching to the M4. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200714200445.1427257-12-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit bee04d4672e0e8f6b82b62b092763b88a395da22 Author: Mathieu Poirier Date: Tue Jul 14 14:04:44 2020 -0600 remoteproc: stm32: Introduce new attach() operation Introduce new attach function to be used when attaching to a remote processor. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200714200445.1427257-11-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 11a7aaa72cc5539591bd34c637ab12e55cb79e1e Author: Mathieu Poirier Date: Tue Jul 14 14:04:43 2020 -0600 remoteproc: stm32: Properly handle the resource table when attaching Properly set the remote processor's resource table based on where it was loaded by the external entity when attaching to a remote processor. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200714200445.1427257-10-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit dadbdb9c304c51038465e0735585538a78e8578b Author: Mathieu Poirier Date: Tue Jul 14 14:04:42 2020 -0600 remoteproc: stm32: Parse memory regions when attaching to M4 Split function stm32_rproc_parse_fw() in two parts, the first one to parse the memory regions and the second one to load the resource table. That way parsing of the memory regions can be done without having do deal with the resource table when attaching to a remote processor. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200714200445.1427257-9-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit d9473cbfb0c5cbb279dfdeaec780934729537d27 Author: Mathieu Poirier Date: Tue Jul 14 14:04:41 2020 -0600 remoteproc: Make function rproc_resource_cleanup() public Make function rproc_resource_cleanup() public so that it can be used by platform drivers when allocating resources to be used by a detached remote processor. Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200714200445.1427257-8-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 376ffdc044568fcd9982a89d57eed67874566f85 Author: Mathieu Poirier Date: Tue Jul 14 14:04:40 2020 -0600 remoteproc: stm32: Properly set co-processor state when attaching Introduce the required mechanic to set the state of the M4 in order to properly deal with scenarios where the co-processor has been started by another entity. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200714200445.1427257-7-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 9276536f455b38b965ea16958a01f77bfae385f3 Author: Mathieu Poirier Date: Tue Jul 14 14:04:39 2020 -0600 remoteproc: stm32: Parse syscon that will manage M4 synchronisation Get from the DT the syncon to probe the state of the remote processor and the location of the resource table. Mainly based on the work published by Arnaud Pouliquen [1]. [1]. https://patchwork.kernel.org/project/linux-remoteproc/list/?series=239877 Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Reviewed-by: Loic Pallardy Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200714200445.1427257-6-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 95e32f868aa67cb0d581ca8ced456dc2fac5edf7 Author: Mathieu Poirier Date: Tue Jul 14 14:04:38 2020 -0600 remoteproc: stm32: Remove memory translation from DT parsing Other than one has to be done after the other, there is no correlation between memory translation and DT parsing. As such move function stm32_rproc_of_memory_translations() to stm32_rproc_probe() so that stm32_rproc_parse_dt() can be extended to look for attach bindings in a clean way. Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Reviewed-by: Loic Pallardy Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200714200445.1427257-5-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 8210fc873d2f1a550ad41093d21a7c18217f75fb Author: Mathieu Poirier Date: Tue Jul 14 14:04:37 2020 -0600 remoteproc: stm32: Decouple rproc from DT parsing Remove the remote processor from the process of parsing the device tree since (1) there is no correlation between them and (2) to use the information that was gathered to make a decision on whether to synchronise with the M4 or not. Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200714200445.1427257-4-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit b8631ab137c78f58afacd7e7f822cd3fc296f589 Author: Mathieu Poirier Date: Tue Jul 14 14:04:36 2020 -0600 remoteproc: stm32: Request IRQ with platform device Request IRQ with platform device rather than remote proc in order to call stm32_rproc_parse_dt() before rproc_alloc(). That way we can know whether we need to synchronise with the MCU or not. Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Reviewed-by: Loic Pallardy Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200714200445.1427257-3-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 7b9f18ca933ae35b90add6fe1787056bbc789a8a Author: Mathieu Poirier Date: Tue Jul 14 14:04:35 2020 -0600 remoteproc: stm32: Decouple rproc from memory translation Remove the remote processor from the process of parsing the memory ranges since there is no correlation between them. Acked-by: Arnaud Pouliquen Signed-off-by: Mathieu Poirier Reviewed-by: Loic Pallardy Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200714200445.1427257-2-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit d76271d22694e874ed70791702db9252ffe96a4c Author: Hyun Kwon Date: Sat Jul 7 19:05:34 2018 -0700 drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem The Xilinx ZynqMP SoC has a hardened display pipeline named DisplayPort Subsystem. It includes a buffer manager, a video pipeline renderer (blender), an audio mixer and a DisplayPort source controller (transmitter). The DMA engine the provide data to the buffer manager, as well as the DisplayPort PHYs that drive the lanes, are external to the subsystem and interfaced using the DMA engine and PHY APIs respectively. This driver supports the DisplayPort Subsystem and implements - Two planes, for graphics and video - One CRTC that supports alpha blending - One encoder for the DisplayPort transmitter - One connector for an external monitor It currently doesn't support - Color keying - Test pattern generation - Audio - Live input from the Programmable Logic (FPGA) - Output to the Programmable Logic (FPGA) Signed-off-by: Hyun Kwon Signed-off-by: Laurent Pinchart commit 9a71df495c3d29dab596bb590e73fd8b20106e2d Author: André Almeida Date: Thu Jul 2 17:28:42 2020 -0300 futex: Remove unused or redundant includes Since 82af7aca ("Removal of FUTEX_FD"), some includes related to file operations aren't needed anymore. More investigation around the includes showed that a lot of includes aren't required for compilation, possible due to redundant includes. Simplify the code by removing unused includes. Signed-off-by: André Almeida Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200702202843.520764-4-andrealmeid@collabora.com commit 9261308598ad28b9a8a2237d881833e9f217244e Author: André Almeida Date: Thu Jul 2 17:28:43 2020 -0300 futex: Consistently use fshared as boolean Since fshared is only conveying true/false values, declare it as bool. In get_futex_key() the usage of fshared can be restricted to the first part of the function. If fshared is false the function is terminated early and the subsequent code can use a constant 'true' instead of the variable. Signed-off-by: André Almeida Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200702202843.520764-5-andrealmeid@collabora.com commit e7c7970a678d5ca945663e9f211e4dc636ccbd52 Author: Hyun Kwon Date: Sat Jul 7 19:05:35 2018 -0700 dt-bindings: display: xlnx: Add ZynqMP DP subsystem bindings The bindings describe the ZynqMP DP subsystem. They don't support the interface with the programmable logic (FPGA) or audio yet. Signed-off-by: Hyun Kwon Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Acked-by: Sam Ravnborg commit f3a49f17845d81a032b83ef102fb24ffb2dfb3a0 Author: Alexander A. Klimov Date: Mon Jul 13 08:58:59 2020 +0200 ARM: at91: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200713065859.31770-1-grandmaster@al2klimov.de commit f87a4f022c44e5b87e842a9f3e644fba87e8385f Author: yu kuai Date: Thu Jun 4 20:33:01 2020 +0800 ARM: at91: pm: add missing put_device() call in at91_pm_sram_init() if of_find_device_by_node() succeed, at91_pm_sram_init() doesn't have a corresponding put_device(). Thus add a jump target to fix the exception handling for this function implementation. Fixes: d2e467905596 ("ARM: at91: pm: use the mmio-sram pool to access SRAM") Signed-off-by: yu kuai Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200604123301.3905837-1-yukuai3@huawei.com commit d7c5ed73b19c4640426d9c106f70ec2cb532034d Author: André Almeida Date: Thu Jul 2 17:28:41 2020 -0300 futex: Remove needless goto's As stated in the coding style documentation, "if there is no cleanup needed then just return directly", instead of jumping to a label and then returning. Remove such goto's and replace with a return statement. When there's a ternary operator on the return value, replace it with the result of the operation when it is logically possible to determine it by the control flow. Signed-off-by: André Almeida Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200702202843.520764-3-andrealmeid@collabora.com commit 9180bd467f9abdb44afde650d07e3b9dd66d837c Author: André Almeida Date: Thu Jul 2 17:28:40 2020 -0300 futex: Remove put_futex_key() Since 4b39f99c ("futex: Remove {get,drop}_futex_key_refs()"), put_futex_key() is empty. Remove all references for this function and the then redundant labels. Signed-off-by: André Almeida Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200702202843.520764-2-andrealmeid@collabora.com commit 74ea3273d24bdca351638be49e0b804c9c4f907a Author: Sowjanya Komatineni Date: Fri Jul 17 12:15:21 2020 -0700 dt-bindings: media: imx274: Add optional input clock and supplies This patch adds IMX274 optional external clock input and voltage supplies to device tree bindings. Signed-off-by: Sowjanya Komatineni commit 0f85c4805184765ff35e0079b3241ee8f25d1b2b Author: Qinglang Miao Date: Thu Jul 16 16:47:47 2020 +0800 debugobjects: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. [ tglx: Distangled it from the mess in -next ] Signed-off-by: Qinglang Miao Signed-off-by: Thomas Gleixner Cc: hch@lst.de Link: https://lkml.kernel.org/r/20200716084747.8034-1-miaoqinglang@huawei.com commit 3167e3d340c092fd47924bc4d23117a3074ef9a9 Author: Xiongfeng Wang Date: Fri Jul 17 15:59:25 2020 +0800 PCI/ASPM: Add missing newline in sysfs 'policy' When I cat ASPM parameter 'policy' by sysfs, it displays as follows. Add a newline for easy reading. Other sysfs attributes already include a newline. [root@localhost ~]# cat /sys/module/pcie_aspm/parameters/policy [default] performance powersave powersupersave [root@localhost ~]# Fixes: 7d715a6c1ae5 ("PCI: add PCI Express ASPM support") Link: https://lore.kernel.org/r/1594972765-10404-1-git-send-email-wangxiongfeng2@huawei.com Signed-off-by: Xiongfeng Wang Signed-off-by: Bjorn Helgaas commit b007e06651ff0fe8865bfe75fa1c94a5ff49a321 Author: Rajendra Nayak Date: Thu Jul 9 16:34:34 2020 +0530 arm64: dts: sc7180: Add DSI and MDP OPP tables and power-domains Add the OPP tables for DSI and MDP based on the perf state/clk requirements, and add the power-domains property to specify the scalable power domain. Signed-off-by: Rajendra Nayak Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1594292674-15632-5-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 19ecbc84217953ce629148c61208536b17731d0a Author: Rajendra Nayak Date: Thu Jul 9 16:34:33 2020 +0530 arm64: dts: sdm845: Add DSI and MDP OPP tables and power-domains Add the OPP tables for DSI and MDP based on the perf state/clk requirements, and add the power-domains property to specify the scalable power domain. Tested-by: Rob Clark Signed-off-by: Rajendra Nayak Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1594292674-15632-4-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 4750a171c3290f9bbebca16c6372db723a4cfa3b Author: Eric Sandeen Date: Wed Jul 15 08:30:37 2020 -0700 xfs: preserve inode versioning across remounts The MS_I_VERSION mount flag is exposed via the VFS, as documented in the mount manpages etc; see the iversion and noiversion mount options in mount(8). As a result, mount -o remount looks for this option in /proc/mounts and will only send the I_VERSION flag back in during remount it it is present. Since it's not there, a remount will /remove/ the I_VERSION flag at the vfs level, and iversion functionality is lost. xfs v5 superblocks intend to always have i_version enabled; it is set as a default at mount time, but is lost during remount for the reasons above. The generic fix would be to expose this documented option in /proc/mounts, but since that was rejected, fix it up again in the xfs remount path instead, so that at least xfs won't suffer from this misbehavior. Signed-off-by: Eric Sandeen Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Reviewed-by: Darrick J. Wong commit d43c7fb05765152d4d4a39a8ef957c4ea14d8847 Author: Brendan Higgins Date: Tue Jul 14 13:41:30 2020 -0700 kunit: tool: fix improper treatment of file location Commit 01397e822af4 ("kunit: Fix TabError, remove defconfig code and handle when there is no kunitconfig") and commit 45ba7a893ad8 ("kunit: kunit_tool: Separate out config/build/exec/parse") introduced two closely related issues which built off of each other: they excessively created the build directory when not present and modified a constant (constants in Python only exist by convention). Together these issues broken a number of unit tests for KUnit tool, so fix them. Fixed up commit log to fic checkpatch commit description style error. Shuah Khan Fixes: 01397e822af4 ("kunit: Fix TabError, remove defconfig code and handle when there is no kunitconfig") Fixes: 45ba7a893ad8 ("kunit: kunit_tool: Separate out config/build/exec/parse") Signed-off-by: Brendan Higgins Signed-off-by: Shuah Khan commit 6816fe61bda8c819c368ad2002cd27172ecb79de Author: Brendan Higgins Date: Tue Jul 14 13:41:29 2020 -0700 kunit: tool: fix broken default args in unit tests Commit ddbd60c779b4 ("kunit: use --build_dir=.kunit as default") changed the default build directory for KUnit tests, but failed to update associated unit tests for kunit_tool, so update them. Fixes: ddbd60c779b4 ("kunit: use --build_dir=.kunit as default") Signed-off-by: Brendan Higgins Signed-off-by: Shuah Khan commit 5a9fcad71caa970f30aef99134a1cd19bc4b8eea Author: Will Chen Date: Wed Jul 8 14:35:43 2020 -0700 kunit: capture stderr on all make subprocess calls Direct stderr to subprocess.STDOUT so error messages get included in the subprocess.CalledProcessError exceptions output field. This results in more meaningful error messages for the user. This is already being done in the make_allyesconfig method. Do the same for make_mrproper, make_olddefconfig, and make methods. With this, failures on unclean trees [1] will give users an error message that includes: "The source tree is not clean, please run 'make ARCH=um mrproper'" [1] https://bugzilla.kernel.org/show_bug.cgi?id=205219 Signed-off-by: Will Chen Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Signed-off-by: Shuah Khan commit 39f65da0920349deb2be14bf8c83490b8775e5d3 Author: David Gow Date: Mon Jul 6 21:31:20 2020 -0700 Documentation: kunit: Remove references to --defconfig The --defconfig option in kunit_tool was removed in [1], but the getting started and kunit_tool documentation still encouraged its use. Update those documents to reflect that it's no-longer required, and is the default behaviour if no .kunitconfig is found. Also update a couple of places where .kunitconfig is still referred to as kunitconfig (this was changed in [2]). [1]: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit-fixes&id=9bdf64b35117cc10813d24e1842cd8ee40ecbf19 [2]: https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit-fixes&id=14ee5cfd4512ee3d1e0047d8751450dcc6544070 Signed-off-by: David Gow Signed-off-by: Shuah Khan commit d44a919a5c1974e1d22b8affad2e92c912671dbd Merge: 721dab2b56535 54b154ecfb8c6 Author: David S. Miller Date: Fri Jul 17 13:04:17 2020 -0700 Merge tag 'mlx5-updates-2020-07-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-07-16 Fixes: 1) Fix build break when CONFIG_XPS is not set 2) Fix missing switch_id for representors Updates: 1) IPsec XFRM RX offloads from Raed and Huy. - Added IPSec RX steering flow tables to NIC RX - Refactoring of the existing FPGA IPSec, to add support for ConnectX IPsec. - RX data path handling for IPSec traffic - Synchronize offloading device ESN with xfrm received SN 2) Parav allows E-Switch to siwtch to switchdev mode directly without the need to go through legacy mode first. 3) From Tariq, Misc updates including: 3.1) indirect calls for RX and XDP handlers 3.2) Make MLX5_EN_TLS non-prompt as it should always be enabled when TLS and MLX5_EN are selected. ==================== Signed-off-by: David S. Miller commit 721dab2b56535b06f9d5756cf27d875623cb5a60 Author: Christophe JAILLET Date: Thu Jul 16 22:52:42 2020 +0200 net: alteon: Avoid some useless memset Avoid a memset after a call to 'dma_alloc_coherent()'. This is useless since commit 518a2f1925c3 ("dma-mapping: zero memory returned from dma_alloc_*") Replace a kmalloc+memset with a corresponding kzalloc. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit f4079e5d72ff973a8c2937e7aa9fc463dc6bcaa2 Author: Christophe JAILLET Date: Thu Jul 16 22:48:02 2020 +0200 net: alteon: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'ace_allocate_descriptors()' and 'ace_init()' GFP_KERNEL can be used because both functions are called from the probe function and no lock is acquired. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 8d4f62ca198a330c566ce202a1ee11bca4741b3b Author: Christophe JAILLET Date: Thu Jul 16 21:28:21 2020 +0200 net: sungem: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'gem_init_one()', GFP_KERNEL can be used because it is a probe function and no lock is acquired. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 850d0cc64c8e2e0895acf735ac0a53c78b80dbe5 Author: Kees Cook Date: Tue Jul 14 11:30:23 2020 -0700 selftests/harness: Limit step counter reporting When the selftest "step" counter grew beyond 255, non-fatal warnings were being emitted, which is noisy and pointless. There are selftests with more than 255 steps (especially those in loops, etc). Instead, just cap "steps" to 254 and do not report the saturation. Reported-by: Ralph Campbell Tested-by: Ralph Campbell Fixes: 9847d24af95c ("selftests/harness: Refactor XFAIL into SKIP") Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit e0c3f4c4fdc0648cffedd5e70f16be7ab45340b4 Author: Suraj Upadhyay Date: Fri Jul 17 00:46:45 2020 +0530 net: decnet: af_decnet: Simplify goto loop. Replace goto loop with while loop. Signed-off-by: Suraj Upadhyay Signed-off-by: David S. Miller commit 36cd28a4cdd05d47ccb62a2d86e8f37839cc879a Author: Frederic Weisbecker Date: Fri Jul 17 16:05:51 2020 +0200 timers: Lower base clock forwarding threshold There is nothing that prevents from forwarding the base clock if it's one jiffy off. The reason for this arbitrary limit of two jiffies is historical and does not longer exist. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Juri Lelli Link: https://lkml.kernel.org/r/20200717140551.29076-13-frederic@kernel.org commit 0975fb565b8b8f9e0c96d0de39fcb954833ea5e0 Author: Frederic Weisbecker Date: Fri Jul 17 16:05:50 2020 +0200 timers: Remove must_forward_clk There is no reason to keep this guard around. The code makes sure that base->clk remains sane and won't be forwarded beyond jiffies nor set backward. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Juri Lelli Link: https://lkml.kernel.org/r/20200717140551.29076-12-frederic@kernel.org commit d4f7dae87096dfe722bf32aa82076ece1063746c Author: Frederic Weisbecker Date: Fri Jul 17 16:05:49 2020 +0200 timers: Spare timer softirq until next expiry Now that the core timer infrastructure doesn't depend anymore on periodic base->clk increments, even when the CPU is not in NO_HZ mode, timer softirqs can be skipped until there are timers to expire. Some spurious softirqs can still remain since base->next_expiry doesn't keep track of canceled timers but this still reduces the number of softirqs significantly: ~15 times less for HZ=1000 and ~5 times less for HZ=100. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Juri Lelli Link: https://lkml.kernel.org/r/20200717140551.29076-11-frederic@kernel.org commit 1f8a4212dc83f8353843fabf6465fd918372fbbf Author: Frederic Weisbecker Date: Fri Jul 17 16:05:48 2020 +0200 timers: Expand clk forward logic beyond nohz As for next_expiry, the base->clk catch up logic will be expanded beyond NOHZ in order to avoid triggering useless softirqs. If softirqs should only fire to expire pending timers, periodic base->clk increments must be skippable for random amounts of time. Therefore prepare to catch-up with missing updates whenever an up-to-date base clock is needed. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Juri Lelli Link: https://lkml.kernel.org/r/20200717140551.29076-10-frederic@kernel.org commit 90d52f65f303091be17b5f4ffab7090b2064b4a1 Author: Frederic Weisbecker Date: Fri Jul 17 16:05:47 2020 +0200 timers: Reuse next expiry cache after nohz exit Now that the next expiry it tracked unconditionally when a timer is added, this information can be reused on a tick firing after exiting nohz. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Juri Lelli Link: https://lkml.kernel.org/r/20200717140551.29076-9-frederic@kernel.org commit dc2a0f1fb2a06df09f5094f29aea56b763aa7cca Author: Frederic Weisbecker Date: Fri Jul 17 16:05:46 2020 +0200 timers: Always keep track of next expiry So far next expiry was only tracked while the CPU was in nohz_idle mode in order to cope with missing ticks that can't increment the base->clk periodically anymore. This logic is going to be expanded beyond nohz in order to spare timer softirqs so do it unconditionally. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Juri Lelli Link: https://lkml.kernel.org/r/20200717140551.29076-8-frederic@kernel.org commit 001ec1b3925da0d51847c23fc0aa4129282db526 Author: Frederic Weisbecker Date: Fri Jul 17 16:05:45 2020 +0200 timers: Optimize _next_timer_interrupt() level iteration If a level has a timer that expires before reaching the next level, there is no need to iterate further. The next level is reached when the 3 lower bits of the current level are cleared. If the next event happens before/during that, the next levels won't provide an earlier expiration. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Juri Lelli Link: https://lkml.kernel.org/r/20200717140551.29076-7-frederic@kernel.org commit 4468897211628865ee2392acb5ad281f74176f63 Author: Frederic Weisbecker Date: Fri Jul 17 16:05:44 2020 +0200 timers: Add comments about calc_index() ceiling work calc_index() adds 1 unit of the level granularity to the expiry passed in parameter to ensure that the timer doesn't expire too early. Add a comment to explain that and the resulting layout in the wheel. Suggested-by: Thomas Gleixner Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Juri Lelli Link: https://lkml.kernel.org/r/20200717140551.29076-6-frederic@kernel.org commit 9a2b764b06c880678416d803d027f575ae40ec99 Author: Frederic Weisbecker Date: Fri Jul 17 16:05:43 2020 +0200 timers: Move trigger_dyntick_cpu() to enqueue_timer() Consolidate the code by calling trigger_dyntick_cpu() from enqueue_timer() instead of calling it from all its callers. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Tested-by: Juri Lelli Link: https://lkml.kernel.org/r/20200717140551.29076-5-frederic@kernel.org commit 1f32cab0db4bdf6491eb4a60838f278e01c31698 Author: Anna-Maria Behnsen Date: Fri Jul 17 16:05:42 2020 +0200 timers: Use only bucket expiry for base->next_expiry value The bucket expiry time is the effective expriy time of timers and is greater than or equal to the requested timer expiry time. This is due to the guarantee that timers never expire early and the reduced expiry granularity in the secondary wheel levels. When a timer is enqueued, trigger_dyntick_cpu() checks whether the timer is the new first timer. This check compares next_expiry with the requested timer expiry value and not with the effective expiry value of the bucket into which the timer was queued. Storing the requested timer expiry value in base->next_expiry can lead to base->clk going backwards if the requested timer expiry value is smaller than base->clk. Commit 30c66fc30ee7 ("timer: Prevent base->clk from moving backward") worked around this by preventing the store when timer->expiry is before base->clk, but did not fix the underlying problem. Use the expiry value of the bucket into which the timer is queued to do the new first timer check. This fixes the base->clk going backward problem. The workaround of commit 30c66fc30ee7 ("timer: Prevent base->clk from moving backward") in trigger_dyntick_cpu() is not longer necessary as the timers bucket expiry is guaranteed to be greater than or equal base->clk. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200717140551.29076-4-frederic@kernel.org commit 3d2e83a2a6a0657c1cf145fa6ba23620715d6c36 Author: Frederic Weisbecker Date: Fri Jul 17 16:05:41 2020 +0200 timers: Preserve higher bits of expiration on index calculation The higher bits of the timer expiration are cropped while calling calc_index() due to the implicit cast from unsigned long to unsigned int. This loss shouldn't have consequences on the current code since all the computation to calculate the index is done on the lower 32 bits. However to prepare for returning the actual bucket expiration from calc_index() in order to properly fix base->next_expiry updates, the higher bits need to be preserved. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200717140551.29076-3-frederic@kernel.org commit c4fefd5a33d45fc5f0f3775b367aa129813584e0 Merge: dcc82bb0727c0 e3a5a1e8b6548 Author: David S. Miller Date: Fri Jul 17 12:54:31 2020 -0700 Merge branch 'tcp-dsack-multi-seg' Priyaranjan Jha says: ==================== tcp: improve handling of DSACK covering multiple segments Currently, while processing DSACK, we assume DSACK covers only one segment. This leads to significant underestimation of no. of duplicate segments with LRO/GRO. Also, the existing SNMP counters, TCPDSACKRecv and TCPDSACKOfoRecv, make similar assumption for DSACK, which makes them unusable for estimating spurious retransmit rates. This patch series fixes the segment accounting with DSACK, by estimating number of duplicate segments based on: (DSACKed sequence range) / MSS. It also introduces a new SNMP counter, TCPDSACKRecvSegs, which tracks the estimated number of duplicate segments. ==================== Signed-off-by: David S. Miller commit e3a5a1e8b6548f5d37328e2d3571edc5c9e6d7c0 Author: Priyaranjan Jha Date: Thu Jul 16 12:12:35 2020 -0700 tcp: add SNMP counter for no. of duplicate segments reported by DSACK There are two existing SNMP counters, TCPDSACKRecv and TCPDSACKOfoRecv, which are incremented depending on whether the DSACKed range is below the cumulative ACK sequence number or not. Unfortunately, these both implicitly assume each DSACK covers only one segment. This makes these counters unusable for estimating spurious retransmit rates, or real/non-spurious loss rate. This patch introduces a new SNMP counter, TCPDSACKRecvSegs, which tracks the estimated number of duplicate segments based on: (DSACKed sequence range) / MSS. This counter is usable for estimating spurious retransmit rates, or real/non-spurious loss rate. Signed-off-by: Priyaranjan Jha Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit a71d77e6be1e29ec809cc7c85d9594e7769406cd Author: Priyaranjan Jha Date: Thu Jul 16 12:12:34 2020 -0700 tcp: fix segment accounting when DSACK range covers multiple segments Currently, while processing DSACK, we assume DSACK covers only one segment. This leads to significant underestimation of DSACKs with LRO/GRO. This patch fixes segment accounting with DSACK by estimating segment count from DSACK sequence range / MSS. Signed-off-by: Priyaranjan Jha Signed-off-by: Neal Cardwell Signed-off-by: Yuchung Cheng Signed-off-by: Soheil Hassas Yeganeh Signed-off-by: Eric Dumazet Signed-off-by: Yousuk Seung Signed-off-by: David S. Miller commit dcc82bb0727c08f93a91fa7532b950bafa2598f2 Author: Christophe JAILLET Date: Thu Jul 16 21:03:58 2020 +0200 net: sun: cassini: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'cas_tx_tiny_alloc()', GFP_KERNEL can be used because a few lines below in its only caller, 'cas_alloc_rxds()', is also called. This function makes an explicit use of GFP_KERNEL. When memory is allocated in 'cas_init_one()', GFP_KERNEL can be used because it is a probe function and no lock is acquired. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 8c728940487945e25cdfe020d58da42143aa98c1 Author: Davide Caratti Date: Wed Jul 15 22:27:05 2020 +0200 mptcp: silence warning in subflow_data_ready() since commit d47a72152097 ("mptcp: fix race in subflow_data_ready()"), it is possible to observe a regression in MP_JOIN kselftests. For sockets in TCP_CLOSE state, it's not sufficient to just wake up the main socket: we also need to ensure that received data are made available to the reader. Silence the WARN_ON_ONCE() in these cases: it preserves the syzkaller fix and restores kselftests when they are ran as follows: # while true; do > make KBUILD_OUTPUT=/tmp/kselftest TARGETS=net/mptcp kselftest > done Reported-by: Florian Westphal Fixes: d47a72152097 ("mptcp: fix race in subflow_data_ready()") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/47 Signed-off-by: Davide Caratti Reviewed-by: Matthieu Baerts Signed-off-by: David S. Miller commit 79814d8179b3c62f700196dcbd6a2ca2bb0dd188 Merge: eac87c413bf97 e10dcb1b6ba71 Author: David S. Miller Date: Fri Jul 17 12:42:47 2020 -0700 Merge branch 'usbnet-multicast-filter-support-for-cdc-ncm-devices' Bjørn Mork says: ==================== usbnet: multicast filter support for cdc ncm devices This revives a 2 year old patch set from Miguel Rodríguez Pérez, which appears to have been lost somewhere along the way. I've based it on the last version I found (v4), and added one patch which I believe must have been missing in the original. I kept Oliver's ack on one of the patches, since both the patch and the motivation still is the same. Hope this is OK.. Thanks to the anonymous user for bringing up this problem in https://bugs.debian.org/965074 This is only build and load tested by me. I don't have any device where I can test the actual functionality. ==================== Signed-off-by: David S. Miller commit e10dcb1b6ba714243ad5a35a11b91cc14103a9a9 Author: Miguel Rodríguez Pérez Date: Wed Jul 15 20:41:00 2020 +0200 net: cdc_ncm: hook into set_rx_mode to admit multicast traffic We set set_rx_mode to usbnet_cdc_update_filter provided by cdc_ether that simply admits all multicast traffic if there is more than one multicast filter configured. Signed-off-by: Miguel Rodríguez Pérez Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller commit 37a2ebdd9e597ae1a0270ac747883ea8f6f767b6 Author: Miguel Rodríguez Pérez Date: Wed Jul 15 20:40:59 2020 +0200 net: cdc_ncm: add .ndo_set_rx_mode to cdc_ncm_netdev_ops The cdc_ncm driver overrides the net_device_ops structure used by usbnet to be able to hook into .ndo_change_mtu. However, the structure was missing the .ndo_set_rx_mode field, preventing the driver from hooking into usbnet's set_rx_mode. This patch adds the missing callback to usbnet_set_rx_mode in net_device_ops. Signed-off-by: Miguel Rodríguez Pérez Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller commit 1ea2b748b5eb4f9b6c8f66d098f1277afb724336 Author: Bjørn Mork Date: Wed Jul 15 20:40:58 2020 +0200 net: usbnet: export usbnet_set_rx_mode() This function can be reused by other usbnet minidrivers. Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller commit e506addeff844237d60545ef4f6141de21471caf Author: Miguel Rodríguez Pérez Date: Wed Jul 15 20:40:57 2020 +0200 net: cdc_ether: export usbnet_cdc_update_filter This makes the function available to other drivers, like cdc_ncm. Signed-off-by: Miguel Rodríguez Pérez Acked-by: Oliver Neukum Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller commit 0226009ce0f6089f9b31211f7a2703cf9a327a01 Author: Miguel Rodríguez Pérez Date: Wed Jul 15 20:40:56 2020 +0200 net: cdc_ether: use dev->intf to get interface information usbnet_cdc_update_filter was getting the interface number from the usb_interface struct in cdc_state->control. However, cdc_ncm does not initialize that structure in its bind function, but uses cdc_ncm_ctx instead. Getting intf directly from struct usbnet solves the problem. Signed-off-by: Miguel Rodríguez Pérez Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller commit 4c6614dc86ad99208e7582108669831c4ab72982 Author: Kees Cook Date: Sat Jul 4 23:12:32 2020 -0700 selftests/seccomp: Check ENOSYS under tracing There should be no difference between -1 and other negative syscalls while tracing. Cc: Andy Lutomirski Cc: Will Drewry Cc: Will Deacon Cc: Keno Fischer Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 0bf18a0cdca51eb3398d182ed366f7ac9df04488 Author: Kees Cook Date: Sat Jul 4 23:12:31 2020 -0700 selftests/seccomp: Refactor to use fixture variants Now that the selftest harness has variants, use them to eliminate a bunch of copy/paste duplication. Cc: Andy Lutomirski Cc: Will Drewry Cc: Jakub Kicinski Signed-off-by: Kees Cook Acked-by: Jakub Kicinski Signed-off-by: Shuah Khan commit 3e4cd8ea7a99554d0125af791f1125c0402c6a19 Author: Kees Cook Date: Sat Jul 4 23:12:30 2020 -0700 selftests/harness: Clean up kern-doc for fixtures The FIXTURE*() macro kern-doc examples had the wrong names for the C code examples associated with them. Fix those and clarify that FIXTURE_DATA() usage should be avoided. Cc: Shuah Khan Cc: Jakub Kicinski Fixes: 74bc7c97fa88 ("kselftest: add fixture variants") Signed-off-by: Kees Cook Reviewed-by: Jakub Kicinski Signed-off-by: Shuah Khan commit a80d6055b344cbf4b2be22bf26fed9d85fe1787b Author: Kees Cook Date: Fri Jul 3 11:43:28 2020 -0700 selftests: kmod: Add module address visibility test Make sure we don't regress the CAP_SYSLOG behavior of the module address visibility via /proc/modules nor /sys/module/*/sections/*. Cc: Luis Chamberlain Cc: Shuah Khan Cc: linux-kselftest@vger.kernel.org Signed-off-by: Kees Cook Reviewed-by: Luis Chamberlain Signed-off-by: Shuah Khan commit 1481fd71398f6537fbcc26aa5a4aa360679822b8 Merge: c7d0ff9323630 eb8bb7abbb0b2 Author: Arnd Bergmann Date: Fri Jul 17 21:17:19 2020 +0200 Merge tag 'tegra-for-5.9-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers soc/tegra: Changes for v5.9-rc1 This adds missing SoC IDs for Tegra186 and Tegra194 and fixes a typo in a warning message. * tag 'tegra-for-5.9-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: fuse: Fix typo in APB MISC warning soc/tegra: fuse: Add Tegra186 and Tegra194 SoC IDs Link: https://lore.kernel.org/r/20200717161300.1661002-4-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit c7d0ff9323630b8bf6b3b317b53f3f04b9f8f4f2 Merge: 68be222f77701 46c019239fb26 Author: Arnd Bergmann Date: Fri Jul 17 21:15:18 2020 +0200 Merge tag 'tegra-for-5.9-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers memory: tegra: Changes for v5.9-rc1 This contains the Tegra210 EMC frequency scaling support that didn't make it into v5.8. In addition there are a couple of cleanups and minor fixes. * tag 'tegra-for-5.9-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: memory: tegra: Add Tegra132 compatible string match memory: tegra: Fix KCONFIG variables for Tegra186 and Tegra194 memory: tegra: Delete some dead code memory: tegra: Avoid unused function warnings memory: tegra: Drop memory: tegra: Fix an error handling path in tegra186_emc_probe() memory: tegra30-emc: Poll EMC-CaR handshake instead of waiting for interrupt memory: tegra20-emc: Poll EMC-CaR handshake instead of waiting for interrupt memory: tegra: Support derated timings on Tegra210 memory: tegra: Add EMC scaling sequence code for Tegra210 memory: tegra: Add EMC scaling support code for Tegra210 memory: tegra: Make debugfs permissions human-readable Link: https://lore.kernel.org/r/20200717161300.1661002-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 68be222f777019930ceeb724322a5b3742ab86ea Merge: a0edee635020d 4e87189912bd2 Author: Arnd Bergmann Date: Fri Jul 17 21:13:41 2020 +0200 Merge tag 'tegra-for-5.9-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers firmware: tegra: Changes for v5.9-rc1 This has a few cleanups and the addition of a new mechanism to query debug information from the BPMP. * tag 'tegra-for-5.9-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: firmware: tegra: Update BPMP ABI firmware: tegra: Add support for in-band debug firmware: tegra: Prepare for supporting in-band debugfs firmware: tegra: Use consistent return variable name firmware: tegra: Add return code checks and increase debugfs size Link: https://lore.kernel.org/r/20200717161300.1661002-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit fb31429fa98870914c7de5384e7a9ecfaa00f21f Merge: 3502e079c6bcf 0f134e39ae651 Author: Arnd Bergmann Date: Fri Jul 17 20:24:39 2020 +0200 Merge tag 'tegra-for-5.9-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree changes for v5.9-rc1 This contains a slew of fixes in preparation for validating device trees against json-schema bindings. In addition, this enables the CPU complex (for CPU frequency scaling) and GPU on Tegra194. * tag 'tegra-for-5.9-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (56 commits) arm64: tegra: Add the GPU on Tegra194 arm64: tegra: Add compatible string for Tegra194 CPU complex arm64: tegra: Add HDMI supplies on Norrin arm64: tegra: Add #{address,size}-cells for VI I2C on Tegra210 arm64: tegra: Add missing clocks and power-domains to Tegra210 VI I2C arm64: tegra: Add clocks and resets for ISP on Tegra210 arm64: tegra: Fix compatible string for DPAUX on Tegra210 arm64: tegra: Add i2c-bus subnode for DPAUX controllers arm64: tegra: Sort aliases alphabetically arm64: tegra: Remove spurious tabs arm64: tegra: Populate VBUS for USB3 on Jetson TX2 arm64: tegra: Enable DFLL support on Jetson Nano arm64: tegra: Add support for Jetson Xavier NX arm64: tegra: Re-order PCIe aperture mappings arm64: tegra: Enable Tegra VI CSI support for Jetson Nano arm64: tegra: jetson-tx1: Add camera supplies arm64: tegra: Fix order of XUSB controller clocks arm64: tegra: Rename cbb@0 to bus@0 on Tegra194 arm64: tegra: Sort nodes by unit-address on Jetson Nano arm64: tegra: Various fixes for PMICs ... Link: https://lore.kernel.org/r/20200717161300.1661002-7-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 3502e079c6bcff95f5c34eecb5c1d9ad1379ae0d Merge: 28ef26f649c6a 2720008f4239c Author: Arnd Bergmann Date: Fri Jul 17 20:03:49 2020 +0200 Merge tag 'tegra-for-5.9-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Device tree changes for v5.9-rc1 This adds device trees for the ASUS Google Nexus 7 and Acer Iconia Tab A500. In addition there are a slew of fixes to existing device trees in preparation for validating the DTBs against json-schema. * tag 'tegra-for-5.9-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: (38 commits) ARM: tegra: Add device-tree for ASUS Google Nexus 7 ARM: tegra: Add device-tree for Acer Iconia Tab A500 ARM: tegra: Add HDMI supplies on Nyan boards ARM: tegra: Add missing DSI controller on Tegra30 ARM: tegra: Add i2c-bus subnode for DPAUX controllers ARM: tegra: The Tegra30 SDHCI is not backwards-compatible ARM: tegra: The Tegra30 DC is not backwards-compatible ARM: tegra: Remove spurious comma from node name ARM: tegra: Add parent clock to DSI output ARM: tegra: Use standard names for SRAM nodes ARM: tegra: seaboard: Use standard battery bindings ARM: tegra: Use standard names for LED nodes ARM: tegra: Use numeric unit-addresses ARM: tegra: medcom-wide: Remove extra panel power supply ARM: tegra: Use proper unit-addresses for OPPs ARM: tegra: Add missing clock-names for SDHCI controllers ARM: tegra: Fix order of XUSB controller clocks ARM: tegra: Add #reset-cells to Tegra124 memory controller ARM: tegra: Add missing panel power supplies ARM: tegra: Add micro-USB A/B port on Jetson TK1 ... Link: https://lore.kernel.org/r/20200717161300.1661002-5-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 28ef26f649c6a36d127a205d294f59a9a8818a2a Merge: 981053c0b2829 9580a3532eee6 Author: Arnd Bergmann Date: Fri Jul 17 20:00:45 2020 +0200 Merge tag 'tegra-for-5.9-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt dt-bindings: Changes for v5.9-rc1 This adds compatible strings for some new devices as well as updates and fixes existing bindings. * tag 'tegra-for-5.9-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: fuse: tegra: Add missing compatible strings dt-bindings: i2c: tegra: Document Tegra210 VI I2C clocks and power-domains dt-bindings: Add documentation for GV11B GPU dt-bindings: ARM: tegra: Add ASUS Google Nexus 7 dt-bindings: ARM: tegra: Add Acer Iconia Tab A500 dt-bindings: Add vendor prefix for Acer Inc. dt-bindings: tegra: Document Jetson Xavier NX (and devkit) Link: https://lore.kernel.org/r/20200717161300.1661002-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 981053c0b28292627396841707a7ad76e4a5675e Merge: a0660529acf7f 32b5f4b63487a Author: Arnd Bergmann Date: Fri Jul 17 19:59:03 2020 +0200 Merge tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt arm64: dts: amlogic updates for v5.9 - meson-gx: Switch to the meson-ee-pwrc bindings - add Khadas MCU nodes * tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: amlogic: Add the Ethernet "timing-adjustment" clock arm64: dts: meson-gx: Switch to the meson-ee-pwrc bindings arm64: dts: meson-khadas-vim3: add Khadas MCU nodes Link: https://lore.kernel.org/r/7h8sfif2na.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit fa0866a1d1be8ffa6979bf2127272b7e3d511fcd Author: Alexander A. Klimov Date: Mon Jul 13 13:05:11 2020 +0200 cpupower: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Shuah Khan commit a0660529acf7fe10f23aec5bf598a7c179bd2209 Merge: 6760a29c88177 d6a3873c7be6d Author: Arnd Bergmann Date: Fri Jul 17 19:57:03 2020 +0200 Merge tag 'amlogic-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into arm/dt ARM: dts: amlogic updates for v5.9 - power-domain and MMC updates * tag 'amlogic-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: ARM: dts: meson8b: odroidc1: enable the SDHC controller ARM: dts: meson8b: ec100: enable the SDHC controller ARM: dts: meson: add the SDHC MMC controller ARM: dts: meson8b: add power domain controller ARM: dts: meson8m2: add resets for the power domain controller ARM: dts: meson8: add power domain controller Link: https://lore.kernel.org/r/7hd04uf2o8.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit eac87c413bf9794c14d488998a5265ea5b32f04e Author: Eelco Chaudron Date: Wed Jul 15 14:09:28 2020 +0200 net: openvswitch: reorder masks array based on usage This patch reorders the masks array every 4 seconds based on their usage count. This greatly reduces the masks per packet hit, and hence the overall performance. Especially in the OVS/OVN case for OpenShift. Here are some results from the OVS/OVN OpenShift test, which use 8 pods, each pod having 512 uperf connections, each connection sends a 64-byte request and gets a 1024-byte response (TCP). All uperf clients are on 1 worker node while all uperf servers are on the other worker node. Kernel without this patch : 7.71 Gbps Kernel with this patch applied: 14.52 Gbps We also run some tests to verify the rebalance activity does not lower the flow insertion rate, which does not. Signed-off-by: Eelco Chaudron Tested-by: Andrew Theurer Reviewed-by: Paolo Abeni Signed-off-by: David S. Miller commit b18432c5a49c9413fd3afb717b378e08cb71331b Author: Chris Healy Date: Tue Jul 14 10:59:10 2020 -0700 net: phy: sfp: Cotsworks SFF module EEPROM fixup Some Cotsworks SFF have invalid data in the first few bytes of the module EEPROM. This results in these modules not being detected as valid modules. Address this by poking the correct EEPROM values into the module EEPROM when the model/PN match and the existing module EEPROM contents are not correct. Signed-off-by: Chris Healy Signed-off-by: David S. Miller commit bba238ed037c60242332dd1e4c5778af9eba4d9b Author: Vladimir Oltean Date: Sun Jul 12 19:48:15 2020 +0300 net: phy: continue searching for C45 MMDs even if first returned ffff:ffff At the time of introduction, in commit bdeced75b13f ("net: dsa: felix: Add PCS operations for PHYLINK"), support for the Lynx PCS inside Felix was relying, for USXGMII support, on the fact that get_phy_device() is able to parse the Lynx PCS "device-in-package" registers for this C45 MDIO device and identify it correctly. However, this was actually working somewhat by mistake (in the sense that, even though it was detected, it was detected for the wrong reasons). The get_phy_c45_ids() function works by iterating through all MMDs starting from 1 (MDIO_MMD_PMAPMD) and stops at the first one which returns a non-zero value in the "device-in-package" register pair, proceeding to see what that non-zero value is. For the Felix PCS, the first MMD (1, for the PMA/PMD) returns a non-zero value of 0xffffffff in the "device-in-package" registers. There is a code branch which is supposed to treat this case and flag it as wrong, and normally, this would have caught my attention when adding initial support for this PCS: if ((devs_in_pkg & 0x1fffffff) == 0x1fffffff) { /* If mostly Fs, there is no device there, then let's probe * MMD 0, as some 10G PHYs have zero Devices In package, * e.g. Cortina CS4315/CS4340 PHY. */ However, this code never actually kicked in, it seems, because this snippet from get_phy_c45_devs_in_pkg() was basically sabotaging itself, by returning 0xfffffffe instead of 0xffffffff: /* Bit 0 doesn't represent a device, it indicates c22 regs presence */ *devices_in_package &= ~BIT(0); Then the rest of the code just carried on thinking "ok, MMD 1 (PMA/PMD) says that there are 31 devices in that package, each having a device id of ffff:ffff, that's perfectly fine, let's go ahead and probe this PHY device". But after cleanup commit 320ed3bf9000 ("net: phy: split devices_in_package"), this got "fixed", and now devs_in_pkg is no longer 0xfffffffe, but 0xffffffff. So now, get_phy_device is returning -ENODEV for the Lynx PCS, because the semantics have remained mostly unchanged: the loop stops at the first MMD that returns a non-zero value, and that is MMD 1. But the Lynx PCS is simply a clause 37 PCS which implements the required MAC-side functionality for USXGMII (when operated in C45 mode, which is where C45 devices-in-package detection is relevant to). Of course it will fail the PMD/PMA test (MMD 1), since it is not a PHY. But it does implement detection for MDIO_MMD_PCS (3): - MDIO_DEVS1=0x008a, MDIO_DEVS2=0x0000, - MDIO_DEVID1=0x0083, MDIO_DEVID2=0xe400 Let get_phy_c45_ids() continue searching for valid MMDs, and don't assume that every phy_device has a PMA/PMD MMD implemented. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit dbc4fec6b6dd2d23e161b250d51cbd28bd9c8497 Author: Olga Kornievskaia Date: Tue Jun 23 10:35:28 2020 -0400 NFSv4.0 allow nconnect for v4.0 It looks like this "else" is just a typo. It turns off nconnect for NFSv4.0 even though it works for every other version. Signed-off-by: Olga Kornievskaia Signed-off-by: J. Bruce Fields Signed-off-by: Trond Myklebust commit ab91e7a6da7eeb8aa54843748652c186daee43eb Author: He Zhe Date: Mon Jul 6 17:52:24 2020 +0800 freezer: Add unsafe versions of freezable_schedule_timeout_interruptible for NFS commit 0688e64bc600 ("NFS: Allow signal interruption of NFS4ERR_DELAYed operations") introduces nfs4_delay_interruptible which also needs an _unsafe version to avoid the following call trace for the same reason explained in commit 416ad3c9c006 ("freezer: add unsafe versions of freezable helpers for NFS") CPU: 4 PID: 3968 Comm: rm Tainted: G W 5.8.0-rc4 #1 Hardware name: Marvell OcteonTX CN96XX board (DT) Call trace: dump_backtrace+0x0/0x1dc show_stack+0x20/0x30 dump_stack+0xdc/0x150 debug_check_no_locks_held+0x98/0xa0 nfs4_delay_interruptible+0xd8/0x120 nfs4_handle_exception+0x130/0x170 nfs4_proc_rmdir+0x8c/0x220 nfs_rmdir+0xa4/0x360 vfs_rmdir.part.0+0x6c/0x1b0 do_rmdir+0x18c/0x210 __arm64_sys_unlinkat+0x64/0x7c el0_svc_common.constprop.0+0x7c/0x110 do_el0_svc+0x24/0xa0 el0_sync_handler+0x13c/0x1b8 el0_sync+0x158/0x180 Signed-off-by: He Zhe Signed-off-by: Trond Myklebust commit 4a400f0d08308e3e446a07d3f4590f243e44b7db Author: Dan Aloni Date: Fri Jun 26 10:23:16 2020 +0300 sunrpc: destroy rpc_inode_cachep after unregister_filesystem Better to unregister the file system before destroying the kmem_cache cache of the inodes, so that the inodes are freed before we are trying to destroy it. Otherwise, kmem_cache yells that some objects are live. Signed-off-by: Dan Aloni Signed-off-by: Trond Myklebust commit 936fa5cd7b8e3e2a21b434d0f3ac29784ac69791 Author: Dejin Zheng Date: Thu Jul 9 00:40:13 2020 +0800 PCI: dwc: Convert to devm_platform_ioremap_resource_byname() Use devm_platform_ioremap_resource_byname() to simplify the code since it contains platform_get_resource_byname() and devm_ioremap_resource() respectively. Link: https://lore.kernel.org/r/20200708164013.5076-1-zhengdejin5@gmail.com Signed-off-by: Dejin Zheng Signed-off-by: Lorenzo Pieralisi Reviewed-by: Gustavo Pimentel Reviewed-by: Rob Herring commit a451c3be0fa1a4829a7597e5611126c041a4b778 Author: Rob Herring Date: Fri Jul 17 09:55:53 2020 -0600 dt-bindings: i2c-gpio: Use 'deprecated' keyword on deprecated properties The i2c-gpio binding is the only case of 'not: true' being used for a deprecated property. Update it to use the json-schema 2019.09 'deprecated' keyword instead. Define the type too in order to keep the meta-schema happy. This will disable warnings for these properties until the dtschema tools are updated to handle 'deprecated', but they are only used in a few at91 dts files. Cc: Wolfram Sang Cc: linux-i2c@vger.kernel.org Signed-off-by: Rob Herring commit 2b2d441dcfa4bab4849fa1a792184e66ec4dfd95 Merge: 85ed0f63c0e36 b4f7f5f547058 Author: Mark Brown Date: Fri Jul 17 16:38:57 2020 +0100 Merge series "Add support for [H]SCIF/TMU/CMT/THS/SDHI/MSIOF/CAN[FD]/I2C/IIC/RWDT on R8A774E1" from Lad Prabhakar : Hi All, This patch series enables support for following on RZ/G2H SoC, * CPU OPP * THS * CMT/TMU * I2C/IIC * MSIOF * RWDT * SDHI * SCIF/HSCIF * CAN/CANFD Cheers, Prabhakar Lad Prabhakar (14): dt-bindings: thermal: rcar-gen3-thermal: Add r8a774e1 support dt-bindings: timer: renesas,cmt: Document r8a774e1 CMT support arm64: dts: renesas: r8a774e1: Add SCIF and HSCIF nodes arm64: dts: renesas: r8a774e1: Add SDHI nodes dt-bindings: i2c: renesas,i2c: Document r8a774e1 support dt-bindings: i2c: renesas,iic: Document r8a774e1 support arm64: dts: renesas: r8a774e1: Add I2C and IIC-DVFS support dt-bindings: spi: renesas,sh-msiof: Add r8a774e1 support arm64: dts: renesas: r8a774e1: Add MSIOF nodes dt-bindings: watchdog: renesas,wdt: Document r8a774e1 support arm64: dts: renesas: r8a774e1: Add RWDT node dt-bindings: can: rcar_can: Document r8a774e1 support dt-bindings: can: rcar_canfd: Document r8a774e1 support arm64: dts: renesas: r8a774e1: Add CAN[FD] support Marian-Cristian Rotariu (6): arm64: dts: renesas: r8a774e1: Add operating points thermal: rcar_gen3_thermal: Add r8a774e1 support arm64: dts: renesas: r8a774e1: Add RZ/G2H thermal support arm64: dts: renesas: r8a774e1: Add CMT device nodes dt-bindings: timer: renesas,tmu: Document r8a774e1 bindings arm64: dts: renesas: r8a774e1: Add TMU device nodes .../devicetree/bindings/i2c/renesas,i2c.txt | 1 + .../devicetree/bindings/i2c/renesas,iic.txt | 1 + .../devicetree/bindings/net/can/rcar_can.txt | 1 + .../bindings/net/can/rcar_canfd.txt | 1 + .../bindings/spi/renesas,sh-msiof.yaml | 1 + .../bindings/thermal/rcar-gen3-thermal.yaml | 1 + .../bindings/timer/renesas,cmt.yaml | 2 + .../devicetree/bindings/timer/renesas,tmu.txt | 1 + .../bindings/watchdog/renesas,wdt.yaml | 1 + arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 713 +++++++++++++++++- drivers/thermal/rcar_gen3_thermal.c | 4 + 11 files changed, 715 insertions(+), 12 deletions(-) -- 2.17.1 commit 85ed0f63c0e362afc51e541a8216a58094c36f6b Author: Lee Jones Date: Fri Jul 17 14:54:24 2020 +0100 spi: spi-amd: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct 'spi_acpi_match' becomes defined but unused. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-amd.c:297:36: warning: ‘spi_acpi_match’ defined but not used [-Wunused-const-variable=] 297 | static const struct acpi_device_id spi_acpi_match[] = { | ^~~~~~~~~~~~~~ Signed-off-by: Lee Jones Cc: Sanjay R Mehta Link: https://lore.kernel.org/r/20200717135424.2442271-15-lee.jones@linaro.org Signed-off-by: Mark Brown commit 9b2d611929afefee78037c92919d633aae35636a Author: Lee Jones Date: Fri Jul 17 14:54:23 2020 +0100 spi: spi-pxa2xx: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct 'pxa2xx_spi_acpi_match' becomes defined but unused. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-pxa2xx.c:1435:36: warning: ‘pxa2xx_spi_acpi_match’ defined but not used [-Wunused-const-variable=] 1435 | static const struct acpi_device_id pxa2xx_spi_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Link: https://lore.kernel.org/r/20200717135424.2442271-14-lee.jones@linaro.org Signed-off-by: Mark Brown commit c894c265a43ecba365f5a061cf44f739fa639f9d Author: Lee Jones Date: Fri Jul 17 14:54:22 2020 +0100 spi: spi-at91-usart: Remove unused OF table 'struct of_device_id' The only way this driver can be probed by MFD via its parent device. No other reference to 'microchip,at91sam9g45-usart-spi' exists in the kernel. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-at91-usart.c:684:34: warning: ‘at91_usart_spi_dt_ids’ defined but not used [-Wunused-const-variable=] 684 | static const struct of_device_id at91_usart_spi_dt_ids[] = { | ^~~~~~~~~~~~~~~~~~~~~ Suggested-by: Alexandre Belloni Signed-off-by: Lee Jones Acked-by: Alexandre Belloni Cc: Radu Pirea Cc: Nicolas Ferre Cc: Ludovic Desroches Link: https://lore.kernel.org/r/20200717135424.2442271-13-lee.jones@linaro.org Signed-off-by: Mark Brown commit decf5326944bc6c32c9256f3992adfb7283cb0f3 Author: Lee Jones Date: Fri Jul 17 14:54:21 2020 +0100 spi: spi-topcliff-pch: Add missing descriptions to 'struct pch_spi_data' Fixes the following W=1 kernel build warning(s): drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'io_base_addr' not described in 'pch_spi_data' drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'pkt_tx_buff' not described in 'pch_spi_data' drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'pkt_rx_buff' not described in 'pch_spi_data' drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'dma' not described in 'pch_spi_data' drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'use_dma' not described in 'pch_spi_data' drivers/spi/spi-topcliff-pch.c:184: warning: Function parameter or member 'save_total_len' not described in 'pch_spi_data' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200717135424.2442271-12-lee.jones@linaro.org Signed-off-by: Mark Brown commit 4b42b0b498124e4d38eaccbbb6b79e2a0ad1e047 Author: Lee Jones Date: Fri Jul 17 14:54:20 2020 +0100 spi: spi-zynqmp-gqspi: Correct a couple of misspellings in kerneldoc Fixes the following W=1 kernel build warning(s): drivers/spi/spi-zynqmp-gqspi.c:205: warning: Function parameter or member 'slavecs' not described in 'zynqmp_gqspi_selectslave' drivers/spi/spi-zynqmp-gqspi.c:205: warning: Function parameter or member 'slavebus' not described in 'zynqmp_gqspi_selectslave' drivers/spi/spi-zynqmp-gqspi.c:205: warning: Excess function parameter 'flashcs' description in 'zynqmp_gqspi_selectslave' drivers/spi/spi-zynqmp-gqspi.c:205: warning: Excess function parameter 'flashbus' description in 'zynqmp_gqspi_selectslave' drivers/spi/spi-zynqmp-gqspi.c:902: warning: Function parameter or member 'dev' not described in 'zynqmp_qspi_suspend' drivers/spi/spi-zynqmp-gqspi.c:902: warning: Excess function parameter '_dev' description in 'zynqmp_qspi_suspend' Signed-off-by: Lee Jones Reviewed-by: Michal Simek Link: https://lore.kernel.org/r/20200717135424.2442271-11-lee.jones@linaro.org Signed-off-by: Mark Brown commit e867feecda9bbbf854a5e6d8c5d765e31ebc545b Author: Lee Jones Date: Fri Jul 17 14:54:19 2020 +0100 spi: spi-zynq-qspi: Add description for 2 missing attributes/parameters Fixes the following W=1 kernel build warning(s): drivers/spi/spi-zynq-qspi.c:143: warning: Function parameter or member 'dev' not described in 'zynq_qspi' drivers/spi/spi-zynq-qspi.c:334: warning: Function parameter or member 'spi' not described in 'zynq_qspi_config_op' drivers/spi/spi-zynq-qspi.c:334: warning: Excess function parameter 'qspi' description in 'zynq_qspi_config_op' Signed-off-by: Lee Jones Reviewed-by: Michal Simek Cc: Sureshkumar Relli Link: https://lore.kernel.org/r/20200717135424.2442271-10-lee.jones@linaro.org Signed-off-by: Mark Brown commit c7cd1dfbd8bbd4a61a39773537db541e247a7ab0 Author: Lee Jones Date: Fri Jul 17 14:54:18 2020 +0100 spi: spi-pl022: Provide missing struct attribute/function param docs Also demote non-worthy kerneldoc headers to standard comment blocks. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-pl022.c:304: warning: cannot understand function prototype: 'enum ssp_writing ' drivers/spi/spi-pl022.c:330: warning: Function parameter or member 'loopback' not described in 'vendor_data' drivers/spi/spi-pl022.c:398: warning: Function parameter or member 'rx_lev_trig' not described in 'pl022' drivers/spi/spi-pl022.c:398: warning: Function parameter or member 'tx_lev_trig' not described in 'pl022' drivers/spi/spi-pl022.c:398: warning: Function parameter or member 'dma_running' not described in 'pl022' drivers/spi/spi-pl022.c:670: warning: Function parameter or member 'pl022' not described in 'readwriter' drivers/spi/spi-pl022.c:1250: warning: Function parameter or member 'irq' not described in 'pl022_interrupt_handler' drivers/spi/spi-pl022.c:1250: warning: Function parameter or member 'dev_id' not described in 'pl022_interrupt_handler' drivers/spi/spi-pl022.c:1343: warning: Function parameter or member 'pl022' not described in 'set_up_next_transfer' drivers/spi/spi-pl022.c:1343: warning: Function parameter or member 'transfer' not described in 'set_up_next_transfer' Signed-off-by: Lee Jones Acked-by: Linus Walleij Cc: Sachin Verma Link: https://lore.kernel.org/r/20200717135424.2442271-9-lee.jones@linaro.org Signed-off-by: Mark Brown commit 6b8d1e4739f41fcfb5d9adfd91b0ddfd1487c7e5 Author: Lee Jones Date: Fri Jul 17 14:54:17 2020 +0100 spi: spi-s3c64xx: Add missing entries for structs 's3c64xx_spi_dma_data' and 's3c64xx_spi_dma_data' Fixes the following W=1 kernel build warning(s): drivers/spi/spi-s3c64xx.c:150: warning: Function parameter or member 'quirks' not described in 's3c64xx_spi_port_config' drivers/spi/spi-s3c64xx.c:150: warning: Function parameter or member 'clk_ioclk' not described in 's3c64xx_spi_port_config' drivers/spi/spi-s3c64xx.c:189: warning: Function parameter or member 'pdev' not described in 's3c64xx_spi_driver_data' drivers/spi/spi-s3c64xx.c:189: warning: Function parameter or member 'rx_dma' not described in 's3c64xx_spi_driver_data' drivers/spi/spi-s3c64xx.c:189: warning: Function parameter or member 'tx_dma' not described in 's3c64xx_spi_driver_data' drivers/spi/spi-s3c64xx.c:189: warning: Function parameter or member 'port_conf' not described in 's3c64xx_spi_driver_data' drivers/spi/spi-s3c64xx.c:189: warning: Function parameter or member 'port_id' not described in 's3c64xx_spi_driver_data' Signed-off-by: Lee Jones Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Andi Shyti Cc: Jaswinder Singh Cc: linux-samsung-soc@vger.kernel.org Link: https://lore.kernel.org/r/20200717135424.2442271-8-lee.jones@linaro.org Signed-off-by: Mark Brown commit d9b883aeaeb05d196244383ebe1bc52e39697948 Author: Lee Jones Date: Fri Jul 17 14:54:16 2020 +0100 spi: spi-meson-spicc: Remove set but never used variable 'data' from meson_spicc_reset_fifo() Looks like it hasn't ever been checked. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-meson-spicc.c: In function ‘meson_spicc_reset_fifo’: drivers/spi/spi-meson-spicc.c:365:6: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] 365 | u32 data; | ^~~~ Signed-off-by: Lee Jones Cc: Kevin Hilman Cc: Neil Armstrong Cc: linux-amlogic@lists.infradead.org Link: https://lore.kernel.org/r/20200717135424.2442271-7-lee.jones@linaro.org Signed-off-by: Mark Brown commit 78a7f0c0a170ddef39822b8ec2b6311f0f27ea9b Author: Lee Jones Date: Fri Jul 17 14:54:15 2020 +0100 spi: spi-meson-spifc: Fix misdocumenting of 'dev' in 'struct meson_spifc' Fixes the following W=1 kernel build warning(s): drivers/spi/spi-meson-spifc.c:80: warning: Function parameter or member 'dev' not described in 'meson_spifc' Signed-off-by: Lee Jones Cc: Kevin Hilman Cc: Beniamino Galvani Cc: linux-amlogic@lists.infradead.org Link: https://lore.kernel.org/r/20200717135424.2442271-6-lee.jones@linaro.org Signed-off-by: Mark Brown commit dfa51f6db34608d7829a5ef6add11557e548969a Author: Lee Jones Date: Fri Jul 17 14:54:14 2020 +0100 spi: spi-ep93xx: Fix API slippage ep93xx_spi_read_write() changed is parameters, but the function documentation was left unchanged. Let's realign. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-ep93xx.c:227: warning: Function parameter or member 'master' not described in 'ep93xx_spi_read_write' drivers/spi/spi-ep93xx.c:227: warning: Excess function parameter 'espi' description in 'ep93xx_spi_read_write' Signed-off-by: Lee Jones Cc: Mika Westerberg Link: https://lore.kernel.org/r/20200717135424.2442271-5-lee.jones@linaro.org Signed-off-by: Mark Brown commit f6305d2706a7f1427d237044c470057508836590 Author: Lee Jones Date: Fri Jul 17 14:54:13 2020 +0100 spi: spi-davinci: Fix a few kerneldoc misspellings and API slippages Fixes the following W=1 kernel build warning(s): drivers/spi/spi-davinci.c:249: warning: Function parameter or member 'dspi' not described in 'davinci_spi_get_prescale' drivers/spi/spi-davinci.c:249: warning: Function parameter or member 'max_speed_hz' not described in 'davinci_spi_get_prescale' drivers/spi/spi-davinci.c:249: warning: Excess function parameter 'maxspeed_hz' description in 'davinci_spi_get_prescale' drivers/spi/spi-davinci.c:719: warning: Function parameter or member 'data' not described in 'dummy_thread_fn' drivers/spi/spi-davinci.c:719: warning: Excess function parameter 'context_data' description in 'dummy_thread_fn' drivers/spi/spi-davinci.c:735: warning: Function parameter or member 'data' not described in 'davinci_spi_irq' drivers/spi/spi-davinci.c:735: warning: Excess function parameter 'context_data' description in 'davinci_spi_irq' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200717135424.2442271-4-lee.jones@linaro.org Signed-off-by: Mark Brown commit c13b5044ab0a484dfe4a8a1d946f3da6abb8d245 Author: Lee Jones Date: Fri Jul 17 14:54:12 2020 +0100 spi: spi-bitbang: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-bitbang.c:181: warning: Function parameter or member 'spi' not described in 'spi_bitbang_setup' drivers/spi/spi-bitbang.c:215: warning: Function parameter or member 'spi' not described in 'spi_bitbang_cleanup' drivers/spi/spi-bitbang.c:434: warning: Function parameter or member 'bitbang' not described in 'spi_bitbang_stop' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200717135424.2442271-3-lee.jones@linaro.org Signed-off-by: Mark Brown commit 055fe5f499b6783a3eac4978c9012ff08934f37c Author: Lee Jones Date: Fri Jul 17 14:54:11 2020 +0100 spi: spi-loopback-test: Fix formatting issues in function header blocks Kerneldoc function parameter descriptions must be in '@.*: ' format. Fixes the following W=1 kernel build warning(s): drivers/spi/spi-loopback-test.c:897: warning: Function parameter or member 'spi' not described in 'spi_test_execute_msg' drivers/spi/spi-loopback-test.c:897: warning: Function parameter or member 'test' not described in 'spi_test_execute_msg' drivers/spi/spi-loopback-test.c:897: warning: Function parameter or member 'tx' not described in 'spi_test_execute_msg' drivers/spi/spi-loopback-test.c:897: warning: Function parameter or member 'rx' not described in 'spi_test_execute_msg' drivers/spi/spi-loopback-test.c:970: warning: Function parameter or member 'spi' not described in 'spi_test_run_test' drivers/spi/spi-loopback-test.c:970: warning: Function parameter or member 'test' not described in 'spi_test_run_test' drivers/spi/spi-loopback-test.c:970: warning: Function parameter or member 'tx' not described in 'spi_test_run_test' drivers/spi/spi-loopback-test.c:970: warning: Function parameter or member 'rx' not described in 'spi_test_run_test' Signed-off-by: Lee Jones Cc: Mark Brown Cc: Martin Sperl Cc: linux-spi@vger.kernel.org Link: https://lore.kernel.org/r/20200717135424.2442271-2-lee.jones@linaro.org Signed-off-by: Mark Brown commit c5d5a32ead1e3a61a07a1e59eb52a53e4a6b2a7f Author: Navid Emamdoost Date: Mon Jun 15 01:12:20 2020 -0500 drm/etnaviv: fix ref count leak via pm_runtime_get_sync in etnaviv_gpu_submit, etnaviv_gpu_recover_hang, etnaviv_gpu_debugfs, and etnaviv_gpu_init the call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost Signed-off-by: Lucas Stach commit 3bcf25a40b018e632d70bb866d75746748953fbc Author: steve.wahl@hpe.com Date: Mon Jul 13 16:30:07 2020 -0500 x86/efi: Remove unused EFI_UV1_MEMMAP code With UV1 support removed, EFI_UV1_MEMMAP is no longer used. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Reviewed-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20200713212956.019149227@hpe.com commit 6aa3baabe106fa1182f904107244147395902a09 Author: steve.wahl@hpe.com Date: Mon Jul 13 16:30:06 2020 -0500 x86/platform/uv: Remove uv bios and efi code related to EFI_UV1_MEMMAP With UV1 removed, EFI_UV1_MEMMAP is not longer used. Remove the code used by it and the related code in EFI. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Reviewed-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20200713212955.902592618@hpe.com commit 66d67fecd896370d4cbbd146c9a7bf5b4c5303af Author: steve.wahl@hpe.com Date: Mon Jul 13 16:30:05 2020 -0500 x86/efi: Remove references to no-longer-used efi_have_uv1_memmap() In removing UV1 support, efi_have_uv1_memmap is no longer used. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Reviewed-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20200713212955.786177105@hpe.com commit cadde2379f0c64f00bb17834c7095a90595255b0 Author: steve.wahl@hpe.com Date: Mon Jul 13 16:30:04 2020 -0500 x86/efi: Delete SGI UV1 detection. As a part of UV1 platform removal, don't try to recognize the platform through DMI to set the EFI_UV1_MEMMAP bit. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Reviewed-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20200713212955.667726896@hpe.com commit 3dad716240f95c3e6114965b8ea95018ef1b04c9 Author: steve.wahl@hpe.com Date: Mon Jul 13 16:30:03 2020 -0500 x86/platform/uv: Remove efi=old_map command line option As a part of UV1 platform removal, delete the efi=old_map option, which is not longer needed. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Acked-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20200713212955.552098718@hpe.com commit 5d662537510e09512e842b41352f8ad0427c1fe9 Author: steve.wahl@hpe.com Date: Mon Jul 13 16:30:02 2020 -0500 x86/platform/uv: Remove vestigial mention of UV1 platform from bios header Remove UV1 reference as UV1 is not longer supported by HPE. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200713212955.435951508@hpe.com commit f584c75307f3b75a83e006b98c5718fc20797851 Author: steve.wahl@hpe.com Date: Mon Jul 13 16:30:01 2020 -0500 x86/platform/uv: Remove support for UV1 platform from uv UV1 is not longer supported by HPE Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200713212955.320087418@hpe.com commit 9b9ee172410d839ca55ad2e25e96f7398fb66f4f Author: steve.wahl@hpe.com Date: Mon Jul 13 16:30:00 2020 -0500 x86/platform/uv: Remove support for uv1 platform from uv_hub UV1 is not longer supported by HPE. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200713212955.203480177@hpe.com commit 711621a098f4d62a9cdbcfc105e804fe8c22f8bb Author: steve.wahl@hpe.com Date: Mon Jul 13 16:29:59 2020 -0500 x86/platform/uv: Remove support for UV1 platform from uv_bau UV1 is not longer supported. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200713212955.083309377@hpe.com commit 3736e82d3a31bdea5a38877d968366dfa60c766e Author: steve.wahl@hpe.com Date: Mon Jul 13 16:29:58 2020 -0500 x86/platform/uv: Remove support for UV1 platform from uv_mmrs UV1 is not longer supported. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200713212954.964332370@hpe.com commit a6b740f1732c438c177fa33d94407808a0d0aa1d Author: steve.wahl@hpe.com Date: Mon Jul 13 16:29:57 2020 -0500 x86/platform/uv: Remove support for UV1 platform from x2apic_uv_x UV1 is not longer supported. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200713212954.846026992@hpe.com commit 95328de5fc2d0b68555c200da889f5d8889a0f13 Author: steve.wahl@hpe.com Date: Mon Jul 13 16:29:56 2020 -0500 x86/platform/uv: Remove support for UV1 platform from uv_tlb UV1 is not longer supported. Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200713212954.728022415@hpe.com commit 8b3c9b160648ceb9ec4068080fd055fdc04e35a7 Author: steve.wahl@hpe.com Date: Mon Jul 13 16:29:55 2020 -0500 x86/platform/uv: Remove support for UV1 platform from uv_time UV1 is not longer supported Signed-off-by: Steve Wahl Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200713212954.610885520@hpe.com commit 57f80c0eda4d153cd4329228518db75523d0f06c Merge: 18eb87f4443a0 95ad37f90c338 Author: Trond Myklebust Date: Fri Jul 17 10:35:48 2020 -0400 Merge branch 'xattr-devel' commit d846abff949d346ffc0fe31d492c2af00ea40e2e Author: Daniele Alessandrelli Date: Fri Jul 17 10:04:14 2020 +0100 arm64: dts: keembay: Add device tree for Keem Bay EVM board Add initial device tree for Keem Bay EVM board. With this minimal device tree the board boots fine using an initramfs image. Link: https://lore.kernel.org/r/20200717090414.313530-6-daniele.alessandrelli@linux.intel.com Reviewed-by: Dinh Nguyen Signed-off-by: Daniele Alessandrelli Signed-off-by: Arnd Bergmann commit 0a6e92f26784b8c6a9d24c26da7278a7362531ee Author: Daniele Alessandrelli Date: Fri Jul 17 10:04:13 2020 +0100 arm64: dts: keembay: Add device tree for Keem Bay SoC Add initial device tree for Intel Movidius SoC code-named Keem Bay. This initial DT includes nodes for Cortex-A53 cores, UARTs, GIC, PSCI, and PMU. Link: https://lore.kernel.org/r/20200717090414.313530-5-daniele.alessandrelli@linux.intel.com Reviewed-by: Dinh Nguyen Signed-off-by: Daniele Alessandrelli Signed-off-by: Arnd Bergmann commit c98459cf6d8d26ff0989eb5aae5a4b9f261d58c6 Author: Daniele Alessandrelli Date: Fri Jul 17 10:04:12 2020 +0100 MAINTAINERS: Add maintainers for Keem Bay SoC Add maintainers for the new Intel Movidius SoC code-named Keem Bay. Link: https://lore.kernel.org/r/20200717090414.313530-4-daniele.alessandrelli@linux.intel.com Reviewed-by: Dinh Nguyen Signed-off-by: Daniele Alessandrelli Signed-off-by: Arnd Bergmann commit 37de951b3656eb0421065695409e7dbeaccee039 Author: Daniele Alessandrelli Date: Fri Jul 17 10:04:11 2020 +0100 dt-bindings: arm: Add Keem Bay bindings Document Intel Movidius SoC code-named Keem Bay, along with the Keem Bay EVM board. Link: https://lore.kernel.org/r/20200717090414.313530-3-daniele.alessandrelli@linux.intel.com Reviewed-by: Dinh Nguyen Reviewed-by: Rob Herring Signed-off-by: Daniele Alessandrelli Signed-off-by: Arnd Bergmann commit a6a4abf8efeeadb762b5160f128f30c3c5c8e4ff Author: Daniele Alessandrelli Date: Fri Jul 17 10:04:10 2020 +0100 arm64: Add config for Keem Bay SoC Add ARCH_KEEMBAY configuration option to support Intel Movidius SoC code-named Keem Bay. Link: https://lore.kernel.org/r/20200717090414.313530-2-daniele.alessandrelli@linux.intel.com Reviewed-by: Dinh Nguyen Signed-off-by: Daniele Alessandrelli Signed-off-by: Arnd Bergmann commit 9d5d041eebe3dcf7591ff7004896c329eb841ca6 Author: B K Karthik Date: Fri Jul 17 06:30:31 2020 -0400 staging: comedi: comedi_fops.c: added casts to get rid of sparse warnings fixed sparse warnings by adding a cast in assignment from void [noderef] __user * to unsigned int __force * and a reverse cast in argument from unsigned int * to unsigned int __user * . Signed-off-by: B K Karthik Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/20200717103031.3mfnlvqo3waolsee@pesu-pes-edu Signed-off-by: Greg Kroah-Hartman commit 0f134e39ae651ff3b77c44de387ee1c49d63e99b Author: Thierry Reding Date: Thu Jul 16 14:01:38 2020 +0200 arm64: tegra: Add the GPU on Tegra194 The GPU found on NVIDIA Tegra194 SoCs is a Volta generation GPU called GV11B. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 9580a3532eee67d9d19de19f62c245655eabaca3 Author: Thierry Reding Date: Mon May 25 16:50:04 2020 +0200 dt-bindings: fuse: tegra: Add missing compatible strings The Tegra FUSE device tree bindings haven't been updated in a while. Add compatible strings for the SoC generations that were released since the last update. Signed-off-by: Thierry Reding commit 522f045595dd2e65cb8fa4c8ce60f2b1e565804f Author: Sowjanya Komatineni Date: Tue Jul 14 21:20:38 2020 -0700 dt-bindings: i2c: tegra: Document Tegra210 VI I2C clocks and power-domains This patch documents missing clocks and power-domains of Tegra210 VI I2C. Reviewed-by: Rob Herring Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 90a09178f309c95bf486dff9a54637fd3336e0aa Author: Thierry Reding Date: Thu Jul 16 15:18:45 2020 +0200 dt-bindings: Add documentation for GV11B GPU The GV11B's device tree bindings are the same as for GP10B, though the GPU is not completely compatible, so all that is needed is a different compatible string. Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 62e7df65cad30b6f4f1ba62c86883c0a246b4100 Author: Paul Schulz Date: Wed Jul 15 12:17:55 2020 +0930 ARM: rpc: Change blacklist to quirklist in ecode.c file This is a functionally trivial patch which removes the word 'blacklist' (and variations) from this code and replaces it with 'quirklist' It has no other effect. Link: https://lore.kernel.org/r/20200715024755.967904-1-paul@mawsonlakes.org Signed-off-by: Paul Schulz Signed-off-by: Arnd Bergmann commit a0edee635020de84b73c3d0b33a7a7ea9efc6179 Author: Sudeep Holla Date: Fri Jul 17 15:04:05 2020 +0100 firmware: arm_scmi: Use NULL instead of integer 0 for rate pointer Kbuild test robot reports the following sparse warning: drivers/firmware/arm_scmi/clock.c:142:21: sparse: Using plain integer as NULL pointer Use NULL pointer instead of integer 0 for rate pointer and fix the warning. Link: https://lore.kernel.org/r/20200717140405.17905-1-sudeep.holla@arm.com Reported-by: kernel test robot Signed-off-by: Sudeep Holla Signed-off-by: Arnd Bergmann commit a3cff3e6ed6f66f05364574141e01a78046bffb0 Merge: 7247e1f1b02f3 7f8fa833dc739 Author: Arnd Bergmann Date: Fri Jul 17 16:06:25 2020 +0200 Merge tag 'renesas-drivers-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.9 - Add core support for the new RZ/G2H (R8A774E1) SoC, including System Controller (SYSC) and Reset (RST) support. * tag 'renesas-drivers-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: rcar-rst: Add support for RZ/G2H soc: renesas: Identify RZ/G2H soc: renesas: Add Renesas R8A774E1 config option soc: renesas: rcar-sysc: Add r8a774e1 support clk: renesas: Add r8a774e1 CPG Core Clock Definitions dt-bindings: power: Add r8a774e1 SYSC power domain definitions Link: https://lore.kernel.org/r/20200717112427.26032-3-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 4fba6d22ca9ad28b8871d763b35a4da2e1ca272e Author: Dmitry Osipenko Date: Thu Jun 18 02:40:40 2020 +0300 drm/tegra: plane: Support 180° rotation Combining horizontal and vertical reflections gives us 180 degrees of rotation. Both reflection modes are already supported, and thus, we just need to mark the 180 rotation mode as supported. The 180 rotation mode is needed for devices like Nexus 7 tablet, which have display panel mounted upside-down. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit cd740777d29d7053e0172c7e0105789428425941 Author: Dmitry Osipenko Date: Thu Jun 18 02:40:39 2020 +0300 drm/tegra: plane: Support horizontal reflection Support horizontal reflection mode which will allow to support 180° rotation mode when combined with the vertical reflection. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit e9e476f7f7eaaf12058290f83cccbcb076596b2f Author: Dmitry Osipenko Date: Thu Jun 18 02:40:38 2020 +0300 drm/tegra: plane: Rename bottom_up to reflect_y This makes the naming consistent with the DRM core. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 5f1df70f59257d6988712b4f8de51737fc1abd87 Author: Tang Bin Date: Thu Apr 16 22:43:17 2020 +0800 drm/tegra: dc: Omit superfluous error message in tegra_dc_probe() In the function tegra_dc_probe(), when get irq failed, the function platform_get_irq() logs an error message, so remove redundant message here. Signed-off-by: Tang Bin Signed-off-by: Thierry Reding commit 5c9b969f699979981b1a2008cef76b56cf906f3e Author: Dmitry Osipenko Date: Mon Jun 29 06:18:38 2020 +0300 drm/tegra: gr2d: Add tiled PATBASE address register There are two PATBASE address registers, one for linear layout and other for tiled. The driver's address registers list misses the tiled PATBASE register. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 2c2a291d01efdcf336796557de1f651b2581e08d Author: Dmitry Osipenko Date: Mon Jun 29 06:18:37 2020 +0300 drm/tegra: gr3d: Assert reset before power-gating Tegra TRM documentation states that hardware should be in a default state when power partition is turned off, i.e. reset should be asserted. This patch adds the missing reset assertions. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 5fba01a0d3488a15c4082bc18aea5375bd8fb97f Author: Thierry Reding Date: Fri Jun 26 10:26:32 2020 +0200 drm/tegra: sor: Use correct power supply names for HDMI The hardware documentation uses AVDD_IO_HDMI_DP and VDD_HDMI_DP_PLL to denote the two power supplies that drive the HDMI/DP outputs of the SOR. Use these names instead of the arbitrary AVDD_IO and VDD_PLL names that were used previously to avoid confusion. Signed-off-by: Thierry Reding commit 7c6b8cac8c19240f013a62f133e2dc8cfeb7a206 Author: Dmitry Osipenko Date: Mon Jun 29 06:18:42 2020 +0300 gpu: host1x: debug: Dump push buffer state When job hangs and there is a memory error pointing at channel's push buffer, it is very handy to know the push buffer's state. This patch makes the push buffer's state to be dumped into KMSG in addition to the job's gathers. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 35681862808472a0a4b9a8817ae2789c0b5b3edc Author: Dmitry Osipenko Date: Mon Jun 29 06:18:41 2020 +0300 gpu: host1x: debug: Fix multiple channels emitting messages simultaneously Once channel's job is hung, it dumps the channel's state into KMSG before tearing down the offending job. If multiple channels hang at once, then they dump messages simultaneously, making the debug info unreadable, and thus, useless. This patch adds mutex which allows only one channel to emit debug messages at a time. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit fd323e9ef0a19112c0c85b85afc4848c0518174b Author: Dmitry Osipenko Date: Mon Jun 29 06:18:40 2020 +0300 gpu: host1x: Put gather's BO on pinning error This patch fixes gather's BO refcounting on a pinning error. Gather's BO won't be leaked now if something goes wrong. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 26c8de5e5dea6f42bb5553ad09aaa94b6139a77b Author: Dmitry Osipenko Date: Mon Jun 29 06:18:39 2020 +0300 gpu: host1x: Optimize BOs usage when firewall is enabled We don't need to hold and pin original BOs of the gathers in a case of enabled firewall because in this case gather's content is copied and the copy is used by the executed job. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit b3f1b760710f2acfc04abefc09358c26a75e7e89 Author: Sowjanya Komatineni Date: Tue Jul 14 21:20:53 2020 -0700 gpu: host1x: mipi: Split tegra_mipi_calibrate() and tegra_mipi_wait() SW can trigger MIPI pads calibration any time after power on but calibration results will be latched and applied to the pads by MIPI CAL unit only when the link is in LP-11 state and then status register will be updated. For CSI, trigger of pads calibration happen during CSI stream enable where CSI receiver is kept ready prior to sensor or CSI transmitter stream start. So, pads may not be in LP-11 at this time and waiting for the calibration to be done immediate after calibration start will result in timeout. This patch splits tegra_mipi_calibrate() and tegra_mipi_wait() so triggering for calibration and waiting for it to complete can happen at different stages. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 7d1409826d95216782b514f102889ed6e71abc04 Author: Sowjanya Komatineni Date: Tue Jul 14 21:20:52 2020 -0700 gpu: host1x: mipi: Use readl_relaxed_poll_timeout() in tegra_mipi_wait() Use readl_relaxed_poll_timeout() in tegra_mipi_wait() to simplify the code. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 767598d447aa46411289c5808b0e45e20a1823b4 Author: Sowjanya Komatineni Date: Tue Jul 14 21:20:51 2020 -0700 gpu: host1x: mipi: Update tegra_mipi_request() to be node based Tegra CSI driver need a separate MIPI device for each channel as calibration of corresponding MIPI pads for each channel should happen independently. So, this patch updates tegra_mipi_request() API to add a device_node pointer argument to allow creating mipi device for specific device node rather than a device. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 6760a29c8817769bfc754bf76899a153451433dc Merge: 2c2a5564d1028 8210a6c057703 Author: Arnd Bergmann Date: Fri Jul 17 16:04:56 2020 +0200 Merge tag 'renesas-dt-bindings-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas DT binding updates for v5.9 - Document core support for the RZ/G2H SoC, - Document support for the HopeRun HiHope RZ/G2H, and Beacon EmbeddedWorks RZ/G2M boards. * tag 'renesas-dt-bindings-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: dt-bindings: arm: renesas: Document beacon-rzg2m dt-bindings: reset: renesas,rst: Document r8a774e1 reset module dt-bindings: power: renesas,rcar-sysc: Document r8a774e1 SYSC binding dt-bindings: arm: renesas: Add HopeRun RZ/G2H boards dt-bindings: arm: renesas: Document RZ/G2H SoC DT bindings Link: https://lore.kernel.org/r/20200717112427.26032-4-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit b4f7f5f5470588e45e5d004f1dc4887af20f18c0 Author: Lad Prabhakar Date: Wed Jul 15 12:09:04 2020 +0100 spi: renesas,sh-msiof: Add r8a774e1 support Document RZ/G2H (R8A774E1) SoC bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1594811350-14066-15-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown commit eb8bb7abbb0b22238b844578970f14fa982fc2b0 Author: Thierry Reding Date: Fri Jul 17 15:41:42 2020 +0200 soc/tegra: fuse: Fix typo in APB MISC warning The hardware block is called APB MISC, not ABP MISC, so fix the warning to use the correct name. Signed-off-by: Thierry Reding commit 46011d431befb2a699727c6973d9ae71907f19c8 Author: Sandipan Patra Date: Fri Jun 26 10:44:01 2020 +0200 soc/tegra: fuse: Add Tegra186 and Tegra194 SoC IDs SoC IDs for these generations had never been defined. Do so now. Signed-off-by: Sandipan Patra Reviewed-by: Jon Hunter Signed-off-by: Thierry Reding commit 22e9b54307987787efa0ee534aa9e31982ec1161 Merge: dc9584c5a3b8e a0234d0e6014a Author: Mark Brown Date: Fri Jul 17 14:47:04 2020 +0100 Merge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto : Hi Mark These are v4 digital_mute() patch which adjusts to atmel which had conflict on v3. v3 -> v4 - tidyup for atmel which had conflict v2 -> v3 - uses "xxx_mute_stream" for .mute_stream naming if it was better - removed verbose Cc email address v1 -> v2 - return -ENOTSUPP at hdmi-codec - add new .no_capture_mute flag and emulate .digital_mute() by .mute_stream() Link: https://lore.kernel.org/r/87h7uhxxk6.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/874kqy2y5t.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87ftam37ko.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (3): ASoC: soc-dai: remove .digital_mute ASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec ASoC: soc-xxx: add asoc_substream_to_rtd() include/sound/soc-dai.h | 1 - include/sound/soc.h | 2 + sound/soc/soc-component.c | 20 ++++----- sound/soc/soc-core.c | 4 +- sound/soc/soc-dai.c | 12 ++---- sound/soc/soc-dapm.c | 6 +-- sound/soc/soc-generic-dmaengine-pcm.c | 4 +- sound/soc/soc-link.c | 12 +++--- sound/soc/soc-pcm.c | 62 +++++++++++++-------------- sound/soc/soc-utils.c | 2 +- 10 files changed, 61 insertions(+), 64 deletions(-) -- 2.25.1 commit dc9584c5a3b8e081927883cd7ad1d0e581c63780 Merge: 6301adf942a31 92e37407811b9 Author: Mark Brown Date: Fri Jul 17 14:47:03 2020 +0100 Merge series "Add support for SATA/PCIe/USB2[3]/VIN/CSI on R8A774E1" from Lad Prabhakar : Hi All, This patch series adds support for the following peripherals on RZ/G2H SoC * PCIe * SATA * USB2 * USB3 * Audio * VIN * CSI Cheers, Prabhakar Lad Prabhakar (20): dt-bindings: pci: rcar-pci: Add device tree support for r8a774e1 arm64: dts: renesas: r8a774e1: Add PCIe device nodes dt-bindings: ata: renesas,rcar-sata: Add r8a774e1 support arm64: dts: renesas: r8a774e1: Add SATA controller node dt-bindings: phy: renesas,usb2-phy: Add r8a774e1 support arm64: dts: renesas: r8a774e1: Add USB2.0 phy and host (EHCI/OHCI) device nodes dt-bindings: usb: renesas,usb3-peri: Document r8a774e1 support dt-bindings: usb: usb-xhci: Document r8a774e1 support dt-bindings: phy: renesas,usb3-phy: Add r8a774e1 support arm64: dts: renesas: r8a774e1: Add USB3.0 device nodes dt-bindings: usb: renesas,usbhs: Add r8a774e1 support dt-bindings: dma: renesas,usb-dmac: Add binding for r8a774e1 arm64: dts: renesas: r8a774e1: Add USB-DMAC and HSUSB device nodes dt-bindings: sound: renesas,rsnd: Document r8a774e1 bindings arm64: dts: renesas: r8a774e1: Add audio support dt-bindings: media: renesas,csi2: Add R8A774E1 support dt-bindings: media: renesas,vin: Add R8A774E1 support media: rcar-csi2: Enable support for R8A774E1 media: rcar-vin: Enable support for R8A774E1 arm64: dts: renesas: r8a774e1: Add VIN and CSI-2 nodes .../bindings/ata/renesas,rcar-sata.yaml | 1 + .../bindings/dma/renesas,usb-dmac.yaml | 1 + .../bindings/media/renesas,csi2.yaml | 1 + .../bindings/media/renesas,vin.yaml | 1 + .../devicetree/bindings/pci/rcar-pci.txt | 1 + .../bindings/phy/renesas,usb2-phy.yaml | 1 + .../bindings/phy/renesas,usb3-phy.yaml | 1 + .../bindings/sound/renesas,rsnd.txt | 1 + .../bindings/usb/renesas,usb3-peri.yaml | 1 + .../bindings/usb/renesas,usbhs.yaml | 1 + .../devicetree/bindings/usb/usb-xhci.txt | 1 + arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 989 +++++++++++++++++- drivers/media/platform/rcar-vin/rcar-core.c | 40 + drivers/media/platform/rcar-vin/rcar-csi2.c | 4 + 14 files changed, 1022 insertions(+), 22 deletions(-) -- 2.17.1 commit 6301adf942a31bed65e026a554e5bd55d9e731e1 Author: Shuming Fan Date: Fri Jul 17 15:02:28 2020 +0800 ASoC: rt5682: optimize the power consumption Some settings should set to default value after the calibration. This patch also disables the 25MHz and 1MHz clock power when the jack unplugged. The JD is triggered by JDH, therefore this patch removes JDL setting. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20200717070228.28660-1-shumingf@realtek.com Signed-off-by: Mark Brown commit ca00e66c1bc875aef7d84ec16418e08a14d0cda9 Author: Kuninori Morimoto Date: Fri Jul 17 15:22:26 2020 +0900 ASoC: soc-dai.h: don't use discriminatory terms for comment soc-dai is using discriminatory terms for comment. This patch renames "slave" to "secondary", thus we can keep M/S initials. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875zam3bmk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 16bf5e82facd703ba8f206f00f064e786ea8318c Author: Tang Bin Date: Tue Jul 14 19:27:44 2020 +0800 ASoC: qcom: qdsp6: Use IS_ERR() instead of IS_ERR_OR_NULL() In the function q6adm_open(), q6adm_alloc_copp() doesn't return NULL. Thus use IS_ERR() to validate the returned value instead of IS_ERR_OR_NULL(). And delete the extra line. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Link: https://lore.kernel.org/r/20200714112744.20560-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown commit 969943bfc9629f7c999fb5168a1d693cf03acc36 Author: Shuming Fan Date: Fri Jul 17 15:02:56 2020 +0800 ASoC: rt5682: disable MICBIAS and Vref2 widget in default The pin status of the widget was connected after the sound card registered. The rt5682_headset_detect function will use the pin status of these two widgets to decide the certain register setting on/off. Therefore this patch disables the pin of these two widgets in the codec probe. This patch could avoid the misjudgment. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20200717070256.28712-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 4c5b809377b3c66fb3c7a3e5b03c78f6ae16fd83 Author: Tang Bin Date: Tue Jul 14 19:29:23 2020 +0800 ASoC: qcom: qdsp6: Use the defined variable to clean code Use the defined variable "dev" to make the code cleaner. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Link: https://lore.kernel.org/r/20200714112923.14944-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown commit 2c2a5564d102858af7a63109aedf7ffcd8b93668 Merge: 39a85f6d91a1a 8aa937cb4aebc Author: Arnd Bergmann Date: Fri Jul 17 15:36:23 2020 +0200 Merge tag 'renesas-arm-dt-for-v5.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.9 (take two) - SPI Multi I/O Bus Controller (RPC-IF) support for R-Car V3H and V3M, including QSPI support for the Condor, Eagle, V3HSK, and V3MSK boards, - Initial support for the RZ/G2H SoC on the HopeRun HiHope RZ/G2H board, - Initial support for the Beacon EmbeddedWorks RZ/G2M board, - Minor fixes and improvements. * tag 'renesas-arm-dt-for-v5.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (34 commits) ARM: dts: sh73a0: Add missing clocks to sound node arm64: dts: renesas: r8a774e1: Add CAN[FD] support arm64: dts: renesas: r8a774e1: Add RWDT node arm64: dts: renesas: r8a774e1: Add MSIOF nodes arm64: dts: renesas: r8a774e1: Add I2C and IIC-DVFS support arm64: dts: renesas: r8a774e1: Add SDHI nodes arm64: dts: renesas: r8a774e1: Add SCIF and HSCIF nodes arm64: dts: renesas: r8a774e1: Add TMU device nodes arm64: dts: renesas: r8a774e1: Add CMT device nodes arm64: dts: renesas: r8a774e1: Add RZ/G2H thermal support arm64: dts: renesas: r8a774e1: Add operating points arm64: dts: renesas: Introduce r8a774a1-beacon-rzg2m-kit arm64: dts: renesas: r8a774e1: Add Ethernet AVB node arm64: dts: renesas: r8a774e1: Add GPIO device nodes arm64: dts: renesas: r8a774e1: Add SYS-DMAC device nodes arm64: dts: renesas: r8a774e1: Add IPMMU device nodes ARM: dts: gose: Fix ports node name for adv7612 ARM: dts: renesas: Fix SD Card/eMMC interface device node names arm64: dts: renesas: Fix SD Card/eMMC interface device node names arm64: dts: renesas: add full-pwr-cycle-in-suspend into eMMC nodes ... Link: https://lore.kernel.org/r/20200717112427.26032-2-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit a0234d0e6014a17c61311fc39b9adc194114c5f6 Author: Kuninori Morimoto Date: Fri Jul 17 09:22:02 2020 +0900 ASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec snd_soc_dai_digital_mute() is used for both CPU and Codec. For example, soc_pcm_prepare() / soc_pcm_hw_free() are caring both CPU and Codec. But soc_resume_deferred() / snd_soc_suspend() are not. This patch cares it. Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87ft9r2dqr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3274ed4d5dd3bcb8b157760b7e32d4f571bac8a5 Author: Kuninori Morimoto Date: Fri Jul 17 09:23:51 2020 +0900 ASoC: atmel: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } - Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/87eepb2dnq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9b15d109a6b2c0c604c588d49a5a927dac6dd616 Author: Coly Li Date: Fri Jul 17 10:42:30 2020 +0800 block: improve discard bio alignment in __blkdev_issue_discard() This patch improves discard bio split for address and size alignment in __blkdev_issue_discard(). The aligned discard bio may help underlying device controller to perform better discard and internal garbage collection, and avoid unnecessary internal fragment. Current discard bio split algorithm in __blkdev_issue_discard() may have non-discarded fregment on device even the discard bio LBA and size are both aligned to device's discard granularity size. Here is the example steps on how to reproduce the above problem. - On a VMWare ESXi 6.5 update3 installation, create a 51GB virtual disk with thin mode and give it to a Linux virtual machine. - Inside the Linux virtual machine, if the 50GB virtual disk shows up as /dev/sdb, fill data into the first 50GB by, # dd if=/dev/zero of=/dev/sdb bs=4096 count=13107200 - Discard the 50GB range from offset 0 on /dev/sdb, # blkdiscard /dev/sdb -o 0 -l 53687091200 - Observe the underlying mapping status of the device # sg_get_lba_status /dev/sdb -m 1048 --lba=0 descriptor LBA: 0x0000000000000000 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000000000800 blocks: 16773120 deallocated descriptor LBA: 0x0000000000fff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000001000000 blocks: 8386560 deallocated descriptor LBA: 0x00000000017ff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000001800000 blocks: 8386560 deallocated descriptor LBA: 0x0000000001fff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000002000000 blocks: 8386560 deallocated descriptor LBA: 0x00000000027ff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000002800000 blocks: 8386560 deallocated descriptor LBA: 0x0000000002fff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000003000000 blocks: 8386560 deallocated descriptor LBA: 0x00000000037ff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000003800000 blocks: 8386560 deallocated descriptor LBA: 0x0000000003fff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000004000000 blocks: 8386560 deallocated descriptor LBA: 0x00000000047ff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000004800000 blocks: 8386560 deallocated descriptor LBA: 0x0000000004fff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000005000000 blocks: 8386560 deallocated descriptor LBA: 0x00000000057ff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000005800000 blocks: 8386560 deallocated descriptor LBA: 0x0000000005fff800 blocks: 2048 mapped (or unknown) descriptor LBA: 0x0000000006000000 blocks: 6291456 deallocated descriptor LBA: 0x0000000006600000 blocks: 0 deallocated Although the discard bio starts at LBA 0 and has 50<<30 bytes size which are perfect aligned to the discard granularity, from the above list these are many 1MB (2048 sectors) internal fragments exist unexpectedly. The problem is in __blkdev_issue_discard(), an improper algorithm causes an improper bio size which is not aligned. 25 int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, 26 sector_t nr_sects, gfp_t gfp_mask, int flags, 27 struct bio **biop) 28 { 29 struct request_queue *q = bdev_get_queue(bdev); [snipped] 56 57 while (nr_sects) { 58 sector_t req_sects = min_t(sector_t, nr_sects, 59 bio_allowed_max_sectors(q)); 60 61 WARN_ON_ONCE((req_sects << 9) > UINT_MAX); 62 63 bio = blk_next_bio(bio, 0, gfp_mask); 64 bio->bi_iter.bi_sector = sector; 65 bio_set_dev(bio, bdev); 66 bio_set_op_attrs(bio, op, 0); 67 68 bio->bi_iter.bi_size = req_sects << 9; 69 sector += req_sects; 70 nr_sects -= req_sects; [snipped] 79 } 80 81 *biop = bio; 82 return 0; 83 } 84 EXPORT_SYMBOL(__blkdev_issue_discard); At line 58-59, to discard a 50GB range, req_sects is set as return value of bio_allowed_max_sectors(q), which is 8388607 sectors. In the above case, the discard granularity is 2048 sectors, although the start LBA and discard length are aligned to discard granularity, req_sects never has chance to be aligned to discard granularity. This is why there are some still-mapped 2048 sectors fragment in every 4 or 8 GB range. If req_sects at line 58 is set to a value aligned to discard_granularity and close to UNIT_MAX, then all consequent split bios inside device driver are (almostly) aligned to discard_granularity of the device queue. The 2048 sectors still-mapped fragment will disappear. This patch introduces bio_aligned_discard_max_sectors() to return the the value which is aligned to q->limits.discard_granularity and closest to UINT_MAX. Then this patch replaces bio_allowed_max_sectors() with this new routine to decide a more proper split bio length. But we still need to handle the situation when discard start LBA is not aligned to q->limits.discard_granularity, otherwise even the length is aligned, current code may still leave 2048 fragment around every 4GB range. Therefore, to calculate req_sects, firstly the start LBA of discard range is checked (including partition offset), if it is not aligned to discard granularity, the first split location should make sure following bio has bi_sector aligned to discard granularity. Then there won't be still-mapped fragment in the middle of the discard range. The above is how this patch improves discard bio alignment in __blkdev_issue_discard(). Now with this patch, after discard with same command line mentiond previously, sg_get_lba_status returns, descriptor LBA: 0x0000000000000000 blocks: 106954752 deallocated descriptor LBA: 0x0000000006600000 blocks: 0 deallocated We an see there is no 2048 sectors segment anymore, everything is clean. Reported-and-tested-by: Acshai Manoj Signed-off-by: Coly Li Reviewed-by: Hannes Reinecke Reviewed-by: Ming Lei Reviewed-by: Xiao Ni Cc: Bart Van Assche Cc: Christoph Hellwig Cc: Enzo Matsumiya Cc: Jens Axboe Signed-off-by: Jens Axboe commit ecdef9f459ad24bf987267df6c25967819016707 Author: Coly Li Date: Fri Jul 17 10:42:29 2020 +0800 block: change REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL to be odd numbers Currently REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL are defined as even numbers 6 and 8, such zone reset bios are treated as READ bios by bio_data_dir(), which is obviously misleading. The macro bio_data_dir() is defined in include/linux/bio.h as, 55 #define bio_data_dir(bio) \ 56 (op_is_write(bio_op(bio)) ? WRITE : READ) And op_is_write() is defined in include/linux/blk_types.h as, 397 static inline bool op_is_write(unsigned int op) 398 { 399 return (op & 1); 400 } The convention of op_is_write() is when there is data transfer then the op code should be odd number, and treat as a write op. bio_data_dir() treats all bio direction as READ if op_is_write() reports false, and WRITE if op_is_write() reports true. Because REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL are even numbers, although they don't transfer data but reporting them as READ bio by bio_data_dir() is misleading and might be wrong. Because these two commands will reset the writer pointers of the resetting zones, and all content after the reset write pointer will be invalid and unaccessible, obviously they are not READ bios in any means. This patch changes REQ_OP_ZONE_RESET from 6 to 15, and changes REQ_OP_ZONE_RESET_ALL from 8 to 17. Now bios with these two op code can be treated as WRITE by bio_data_dir(). Although they don't transfer data, now we keep them consistent with REQ_OP_DISCARD and REQ_OP_WRITE_ZEROES with the ituition that they change on-media content and should be WRITE request. Signed-off-by: Coly Li Reviewed-by: Damien Le Moal Reviewed-by: Chaitanya Kulkarni Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Jens Axboe Cc: Johannes Thumshirn Cc: Keith Busch Cc: Shaun Tancheff Signed-off-by: Jens Axboe commit b5718d6c00afe51ce5327cf2beae4019da0c8e74 Author: Yufen Yu Date: Thu Jul 16 02:52:01 2020 -0400 block: defer flush request no matter whether we have elevator Commit 7520872c0cf4 ("block: don't defer flushes on blk-mq + scheduling") tried to fix deadlock for cycled wait between flush requests and data request into flush_data_in_flight. The former holded all driver tags and wait for data request completion, but the latter can not complete for waiting free driver tags. After commit 923218f6166a ("blk-mq: don't allocate driver tag upfront for flush rq"), flush requests will not get driver tag before queuing into flush queue. * With elevator, flush request just get sched_tags before inserting flush queue. It will not get driver tag until issue them to driver. data request on list fq->flush_data_in_flight will complete in the end. * Without elevator, each flush request will get a driver tag when allocate request. Then data request on fq->flush_data_in_flight don't worry about lacking driver tag. In both of these cases, cycled wait cannot be true. So we may allow to defer flush request. Signed-off-by: Yufen Yu Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit 943c4d9074aa05b86af89eec25330c1995e807c9 Author: Wei Yongjun Date: Fri Jul 17 18:00:02 2020 +0800 block: make blk_timeout_init() static The sparse tool complains as follows: block/blk-timeout.c:93:12: warning: symbol 'blk_timeout_init' was not declared. Should it be static? Function blk_timeout_init() is not used outside of blk-timeout.c, so mark it static. Fixes: 9054650fac24 ("block: relax jiffies rounding for timeouts") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Jens Axboe commit 92e37407811b98a7eb54eb6a6b3d65847a46e0e6 Author: Lad Prabhakar Date: Thu Jul 16 18:18:29 2020 +0100 dt-bindings: sound: renesas, rsnd: Document r8a774e1 bindings Document SoC specific bindings for RZ/G2H (r8a774e1) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594919915-5225-15-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown commit bd054ece7d9cdd88e900df6625e951a01d9f655e Author: Jing Xiangfeng Date: Fri Jul 17 16:22:42 2020 +0800 ASoC: meson: fixes the missed kfree() for axg_card_add_tdm_loopback axg_card_add_tdm_loopback() misses to call kfree() in an error path. We can use devm_kasprintf() to fix the issue, also improve maintainability. So use it instead. Fixes: c84836d7f650 ("ASoC: meson: axg-card: use modern dai_link style") Signed-off-by: Jing Xiangfeng Reviewed-by: Jerome Brunet Link: https://lore.kernel.org/r/20200717082242.130627-1-jingxiangfeng@huawei.com Signed-off-by: Mark Brown commit fa03587cad9bd32aa552377de4f05c50181a35a8 Author: Tiezhu Yang Date: Tue Jul 7 10:12:51 2020 +0800 irqchip/loongson-liointc: Fix potential dead lock In the function liointc_set_type(), we need to call the function irq_gc_unlock_irqrestore() before returning. Fixes: dbb152267908 ("irqchip: Add driver for Loongson I/O Local Interrupt Controller") Reported-by: Jianmin Lv Signed-off-by: Tiezhu Yang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1594087972-21715-8-git-send-email-yangtiezhu@loongson.cn commit b10cbca8f03dd10dc241395a639d488f4144e986 Author: Tiezhu Yang Date: Tue Jul 7 10:12:50 2020 +0800 irqchip/loongson-pch-msi: Remove unneeded variable irq_domain_alloc_irqs_parent() returns 0 on success and non-zero value on failure, it is redudant to check its non-zero return value and then return it, so just remove the variable "ret" and return directly in the function pch_msi_parent_domain_alloc(). Signed-off-by: Tiezhu Yang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1594087972-21715-7-git-send-email-yangtiezhu@loongson.cn commit 66a535c495f72e1deacc37dfa34acca2a06e3578 Author: Tiezhu Yang Date: Tue Jul 7 10:12:49 2020 +0800 irqchip/loongson-pch-pic: Check return value of irq_domain_translate_twocell() Check the return value of irq_domain_translate_twocell() due to it may returns -EINVAL if failed and use variable fwspec for it, and then use a new variable parent_fwspec which is proper for irq_domain_alloc_irqs_parent(). Fixes: ef8c01eb64ca ("irqchip: Add Loongson PCH PIC controller") Signed-off-by: Tiezhu Yang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1594087972-21715-6-git-send-email-yangtiezhu@loongson.cn commit dbec37048d27cee36e103e113b5f9b1852bfe997 Author: Tiezhu Yang Date: Tue Jul 7 10:12:48 2020 +0800 irqchip/loongson-htvec: Check return value of irq_domain_translate_onecell() Check the return value of irq_domain_translate_onecell() due to it may returns -EINVAL if failed. Fixes: 818e915fbac5 ("irqchip: Add Loongson HyperTransport Vector support") Signed-off-by: Tiezhu Yang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1594087972-21715-5-git-send-email-yangtiezhu@loongson.cn commit 652d54e77a438cf38a5731d8f9983c81e72dc429 Author: Tiezhu Yang Date: Tue Jul 7 10:12:47 2020 +0800 irqchip/loongson-htvec: Fix potential resource leak In the function htvec_of_init(), system resource "parent_irq" was not released in an error case. Thus add a jump target for the completion of the desired exception handling. Fixes: 818e915fbac5 ("irqchip: Add Loongson HyperTransport Vector support") Signed-off-by: Tiezhu Yang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1594087972-21715-4-git-send-email-yangtiezhu@loongson.cn commit 85efd6059ae1a99e5e7205f37e910fd41dfa0ade Author: Tiezhu Yang Date: Tue Jul 7 10:12:46 2020 +0800 irqchip/loongson-htpic: Remove unneeded select of I8259 LOONGSON_HTPIC depends on MACH_LOONGSON64 and MACH_LOONGSON64 already selects I8259 in arch/mips/Kconfig, so no need to select I8259 again when config LOONGSON_HTPIC. Signed-off-by: Tiezhu Yang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1594087972-21715-3-git-send-email-yangtiezhu@loongson.cn commit f90fafecf4880b9785da85feb9b3e6d85fbf2287 Author: Tiezhu Yang Date: Tue Jul 7 10:12:45 2020 +0800 irqchip/loongson-htpic: Remove redundant kfree operation In the function htpic_of_init(), when kzalloc htpic fails, it should return -ENOMEM directly, no need to execute "goto" to kfree. Signed-off-by: Tiezhu Yang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1594087972-21715-2-git-send-email-yangtiezhu@loongson.cn commit 52b350cbc94721d87f087d1a5800f9531c2d682c Author: Florian Fainelli Date: Thu Jul 9 16:41:41 2020 -0700 irqchip/irq-bcm7038-l1: Allow building on ARM 32-bit We need to have a definition for cpu_logical_map[] which on ARM platforms is provided by asm/smp_plat.h. This header is not automatically included from linux/smp.h and untangling it is a bit difficult. Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200709234141.4901-1-f.fainelli@gmail.com commit 240e176a96187ee84e63626ca0d1aac92da503aa Author: Florian Fainelli Date: Thu Jul 9 15:30:16 2020 -0700 irqchip/brcmstb-l2: Match UPG_AUX_AON_INTR2 compatible The UPG_AUX_AON_INTR2 Level 2 interrupt controller node is defined with the "brcm,upg-aux-aon-l2-intc" compatible string in Device Tree and behaves as an edge triggered standard Broadcom STB L2 interrupt controller. Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200709223016.989-7-f.fainelli@gmail.com commit 03a7ac47c14c7ef50742a34b3cfba1a47a578a03 Author: Florian Fainelli Date: Thu Jul 9 15:30:15 2020 -0700 dt-bindings: interrupt-controller: Document UPG auxiliary L2 Define the compatible string brcm,upg-aux-aon-l2-intc which is used by the Broadcom STB UPG auxiliary always-on interrupt controller. Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200709223016.989-6-f.fainelli@gmail.com commit 9ac793dc5c97691152818305974299604c67e110 Author: Kamal Dasu Date: Thu Jul 9 15:30:14 2020 -0700 irqchip/brcmstb-l2: Match HIF_SPI_INTR2 compatible The HIF_SPI_INTR2 Level 2 interrupt controller node is defined with the "brcm,hif-spi-l2-intc" compatible string in Device Tree and behaves as an edge triggered standard Broadcom STB L2 interrupt controller. Signed-off-by: Kamal Dasu Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200709223016.989-5-f.fainelli@gmail.com commit 90b06e2dc4d1e8e9311a5275d53f61d90b61efdc Author: Florian Fainelli Date: Thu Jul 9 15:30:13 2020 -0700 dt-bindings: interrupt-controller: Document Broadcom STB HIF L2 Add documentation for the brcm,hif-spi-l2-intc compatible string to the brcm,l2-intc.txt binding document. Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200709223016.989-4-f.fainelli@gmail.com commit c8d8d6fc478a30f3e8ea5372664dd2a808c4311e Author: Justin Chen Date: Thu Jul 9 15:30:12 2020 -0700 irqchip/brcmstb-l2: Set controller as wake-up source Utilize the Broadcom interrupt controller standard property "brcm,irq-can-wake" to flag whether this particular interrupt controller instance is wake-up capable. Since we do not know what type of parent interrupt controller we are interfaced with, ensure that enable_irq_wake() is called early on. Signed-off-by: Justin Chen Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200709223016.989-3-f.fainelli@gmail.com commit f4ccb74569aaf839c2830382e902dd50d564df55 Author: Justin Chen Date: Thu Jul 9 15:30:11 2020 -0700 irqchip/bcm7120-l2: Set controller as wake-up source Utilize the Broadcom interrupt controller standard property "brcm,irq-can-wake" to flag whether this particular interrupt controller instance is wake-up capable. Since we do not know what type of parent interrupt controller we are interfaced with, ensure that enable_irq_wake() is called early on. Signed-off-by: Justin Chen Signed-off-by: Florian Fainelli Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200709223016.989-2-f.fainelli@gmail.com commit 070b3b5ad7bd077e673cad2c591a2ecf49c0b58a Author: Jiri Olsa Date: Sun Jul 12 15:26:18 2020 +0200 perf metric: Add 'struct expr_id_data' to keep expr value Add 'struct expr_id_data' to keep an expr value instead of just a simple double pointer, so we can store more data for ID in the following changes. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Kajol Jain Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200712132634.138901-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2c46f54249c6e86d8d81b5ea2452319f197caf17 Author: Jiri Olsa Date: Sun Jul 12 15:26:17 2020 +0200 perf metric: Rename expr__add_id() to expr__add_val() Rename expr__add_id() to expr__add_val() so we can use expr__add_id() to actually add just the id without any value in following changes. There's no functional change. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: John Garry Cc: Kajol Jain Cc: Michael Petlan Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200712132634.138901-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3de2bf9dfb93be3db4f06968339a7b6da1091bb3 Author: Masami Hiramatsu Date: Fri Jul 10 22:11:33 2020 +0900 perf probe: Warn if the target function is a GNU indirect function Warn if the probe target function is a GNU indirect function (GNU_IFUNC) because it may not be what the user wants to probe. The GNU indirect function ( https://sourceware.org/glibc/wiki/GNU_IFUNC ) is the dynamic symbol solved at runtime. An IFUNC function is a selector which is invoked from the ELF loader, but the symbol address of the function which will be modified by the IFUNC is the same as the IFUNC in the symbol table. This can confuse users trying to probe such functions. For example, memcpy is an IFUNC. probe_libc:memcpy (on __new_memcpy_ifunc@x86_64/multiarch/memcpy.c in /usr/lib64/libc-2.30.so) the probe is put on an IFUNC. perf 1742 [000] 26201.715632: probe_libc:memcpy: (7fdaa53824c0) 7fdaa53824c0 __new_memcpy_ifunc+0x0 (inlined) 7fdaa5d4a980 elf_machine_rela+0x6c0 (inlined) 7fdaa5d4a980 elf_dynamic_do_Rela+0x6c0 (inlined) 7fdaa5d4a980 _dl_relocate_object+0x6c0 (/usr/lib64/ld-2.30.so) 7fdaa5d42155 dl_main+0x1cc5 (/usr/lib64/ld-2.30.so) 7fdaa5d5831a _dl_sysdep_start+0x54a (/usr/lib64/ld-2.30.so) 7fdaa5d3ffeb _dl_start_final+0x25b (inlined) 7fdaa5d3ffeb _dl_start+0x25b (/usr/lib64/ld-2.30.so) 7fdaa5d3f117 .annobin_rtld.c+0x7 (inlined) And the event is invoked from the ELF loader instead of the target program's main code. Moreover, at this moment, we can not probe on the function which will be selected by the IFUNC, because it is determined at runtime. But uprobe will be prepared before running the target binary. Thus, I decided to warn user when 'perf probe' detects that the probe point is on an GNU IFUNC symbol. Someone who wants to probe an IFUNC symbol to debug the IFUNC function can ignore this warning. Committer notes: I.e., this warning will be emitted if the probe point is an IFUNC: "Warning: The probe function (%s) is a GNU indirect function.\n" "Consider identifying the final function used at run time and set the probe directly on that.\n" Complete set of steps: # readelf -sW /lib64/libc-2.29.so | grep IFUNC | tail 22196: 0000000000109a80 183 IFUNC GLOBAL DEFAULT 14 __memcpy_chk 22214: 00000000000b7d90 191 IFUNC GLOBAL DEFAULT 14 __gettimeofday 22336: 000000000008b690 60 IFUNC GLOBAL DEFAULT 14 memchr 22350: 000000000008b9b0 89 IFUNC GLOBAL DEFAULT 14 __stpcpy 22420: 000000000008bb10 76 IFUNC GLOBAL DEFAULT 14 __strcasecmp_l 22582: 000000000008a970 60 IFUNC GLOBAL DEFAULT 14 strlen 22585: 00000000000a54d0 92 IFUNC WEAK DEFAULT 14 wmemset 22600: 000000000010b030 92 IFUNC GLOBAL DEFAULT 14 __wmemset_chk 22618: 000000000008b8a0 183 IFUNC GLOBAL DEFAULT 14 __mempcpy 22675: 000000000008ba70 76 IFUNC WEAK DEFAULT 14 strcasecmp # # perf probe -x /lib64/libc-2.29.so strlen Warning: The probe function (strlen) is a GNU indirect function. Consider identifying the final function used at run time and set the probe directly on that. Added new event: probe_libc:strlen (on strlen in /usr/lib64/libc-2.29.so) You can now use it in all perf tools, such as: perf record -e probe_libc:strlen -aR sleep 1 # Reported-by: Andi Kleen Signed-off-by: Masami Hiramatsu Tested-by: Arnaldo Carvalho de Melo Cc: Andi Kleen Cc: Oleg Nesterov Cc: Srikar Dronamraju Link: http://lore.kernel.org/lkml/159438669349.62703.5978345670436126948.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 12d572e785b15bc764e956caaa8a4c846fd15694 Author: Masami Hiramatsu Date: Fri Jul 10 22:11:23 2020 +0900 perf probe: Fix memory leakage when the probe point is not found Fix the memory leakage in debuginfo__find_trace_events() when the probe point is not found in the debuginfo. If there is no probe point found in the debuginfo, debuginfo__find_probes() will NOT return -ENOENT, but 0. Thus the caller of debuginfo__find_probes() must check the tf.ntevs and release the allocated memory for the array of struct probe_trace_event. The current code releases the memory only if the debuginfo__find_probes() hits an error but not checks tf.ntevs. In the result, the memory allocated on *tevs are not released if tf.ntevs == 0. This fixes the memory leakage by checking tf.ntevs == 0 in addition to ret < 0. Fixes: ff741783506c ("perf probe: Introduce debuginfo to encapsulate dwarf information") Signed-off-by: Masami Hiramatsu Reviewed-by: Srikar Dronamraju Cc: Andi Kleen Cc: Oleg Nesterov Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/159438668346.62703.10887420400718492503.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 11fd3eb874e73ee8069bcfd54e3c16fa7ce56fe6 Author: Masami Hiramatsu Date: Fri Jul 10 22:11:13 2020 +0900 perf probe: Fix wrong variable warning when the probe point is not found Fix a wrong "variable not found" warning when the probe point is not found in the debuginfo. Since the debuginfo__find_probes() can return 0 even if it does not find given probe point in the debuginfo, fill_empty_trace_arg() can be called with tf.ntevs == 0 and it can emit a wrong warning. To fix this, reject ntevs == 0 in fill_empty_trace_arg(). E.g. without this patch; # perf probe -x /lib64/libc-2.30.so -a "memcpy arg1=%di" Failed to find the location of the '%di' variable at this address. Perhaps it has been optimized out. Use -V with the --range option to show '%di' location range. Added new events: probe_libc:memcpy (on memcpy in /usr/lib64/libc-2.30.so with arg1=%di) probe_libc:memcpy (on memcpy in /usr/lib64/libc-2.30.so with arg1=%di) You can now use it in all perf tools, such as: perf record -e probe_libc:memcpy -aR sleep 1 With this; # perf probe -x /lib64/libc-2.30.so -a "memcpy arg1=%di" Added new events: probe_libc:memcpy (on memcpy in /usr/lib64/libc-2.30.so with arg1=%di) probe_libc:memcpy (on memcpy in /usr/lib64/libc-2.30.so with arg1=%di) You can now use it in all perf tools, such as: perf record -e probe_libc:memcpy -aR sleep 1 Fixes: cb4027308570 ("perf probe: Trace a magic number if variable is not found") Reported-by: Andi Kleen Signed-off-by: Masami Hiramatsu Reviewed-by: Srikar Dronamraju Tested-by: Andi Kleen Cc: Oleg Nesterov Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/159438667364.62703.2200642186798763202.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit 26bbf45fc81dc1bcb29a9b4721d3ec6c3804003d Author: Masami Hiramatsu Date: Fri Jul 10 22:11:04 2020 +0900 perf probe: Avoid setting probes on the same address for the same event There is a case that several same-name symbols points to the same address. In that case, 'perf probe' returns an error. E.g. # perf probe -x /lib64/libc-2.30.so -v -a "memcpy arg1=%di" probe-definition(0): memcpy arg1=%di symbol:memcpy file:(null) line:0 offset:0 return:0 lazy:(null) parsing arg: arg1=%di into name:arg1 %di 1 arguments symbol:setjmp file:(null) line:0 offset:0 return:0 lazy:(null) symbol:longjmp file:(null) line:0 offset:0 return:0 lazy:(null) symbol:longjmp_target file:(null) line:0 offset:0 return:0 lazy:(null) symbol:lll_lock_wait_private file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_mallopt_arena_max file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_mallopt_arena_test file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_tunable_tcache_max_bytes file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_tunable_tcache_count file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_tunable_tcache_unsorted_limit file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_mallopt_trim_threshold file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_mallopt_top_pad file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_mallopt_mmap_threshold file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_mallopt_mmap_max file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_mallopt_perturb file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_mallopt_mxfast file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_heap_new file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_arena_reuse_free_list file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_arena_reuse file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_arena_reuse_wait file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_arena_new file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_arena_retry file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_sbrk_less file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_heap_free file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_heap_less file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_tcache_double_free file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_heap_more file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_sbrk_more file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_malloc_retry file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_memalign_retry file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_mallopt_free_dyn_thresholds file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_realloc_retry file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_calloc_retry file:(null) line:0 offset:0 return:0 lazy:(null) symbol:memory_mallopt file:(null) line:0 offset:0 return:0 lazy:(null) Open Debuginfo file: /usr/lib/debug/usr/lib64/libc-2.30.so.debug Try to find probe point from debuginfo. Opening /sys/kernel/debug/tracing//README write=0 Failed to find the location of the '%di' variable at this address. Perhaps it has been optimized out. Use -V with the --range option to show '%di' location range. An error occurred in debuginfo analysis (-2). Trying to use symbols. Opening /sys/kernel/debug/tracing//uprobe_events write=1 Writing event: p:probe_libc/memcpy /usr/lib64/libc-2.30.so:0x914c0 arg1=%di Writing event: p:probe_libc/memcpy /usr/lib64/libc-2.30.so:0x914c0 arg1=%di Failed to write event: File exists Error: Failed to add events. Reason: File exists (Code: -17) You can see that perf tried to write completely the same probe definition twice, which caused an error. To fix this issue, check the symbol list and drop duplicated symbols (which has the same symbol name and address) from it. With this patch: # perf probe -x /lib64/libc-2.30.so -a "memcpy arg1=%di" Failed to find the location of the '%di' variable at this address. Perhaps it has been optimized out. Use -V with the --range option to show '%di' location range. Added new events: probe_libc:memcpy (on memcpy in /usr/lib64/libc-2.30.so with arg1=%di) probe_libc:memcpy (on memcpy in /usr/lib64/libc-2.30.so with arg1=%di) You can now use it in all perf tools, such as: perf record -e probe_libc:memcpy -aR sleep 1 Committer notes: Fix this build error on 32-bit arches by using PRIx64 for symbol->start, that is an u64: In file included from util/probe-event.c:27: util/probe-event.c: In function 'find_probe_trace_events_from_map': util/probe-event.c:2978:14: error: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'u64' {aka 'long long unsigned int'} [-Werror=format=] pr_debug("Found duplicated symbol %s @ %lx\n", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ util/debug.h:17:21: note: in definition of macro 'pr_fmt' #define pr_fmt(fmt) fmt ^~~ util/probe-event.c:2978:5: note: in expansion of macro 'pr_debug' pr_debug("Found duplicated symbol %s @ %lx\n", ^~~~~~~~ Reported-by: Andi Kleen Signed-off-by: Masami Hiramatsu Reviewed-by: Srikar Dronamraju Cc: Andi Kleen Cc: Oleg Nesterov Link: http://lore.kernel.org/lkml/159438666401.62703.15196394835032087840.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit bf3d3999084aac96d60597b2745d81081642a2f7 Author: Gustavo A. R. Silva Date: Thu Jul 16 16:21:09 2020 -0500 pinctrl: lpc18xx: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200716212109.GA17525@embeddedor Signed-off-by: Linus Walleij commit 80606cb24161d504acb4d89f406d68f72196575e Author: Linus Walleij Date: Thu Jul 16 11:28:35 2020 +0200 gpio: max77620: Use helper variable and clarify Most other drivers fill out the gpio_irq_chip using a struct gpio_irq_chip *girq helper variable for ease of reading. We also make a habit of explicitly assigning NULL and zero to the parent IRQs when using ordinary IRQ handlers in the driver, mostly for code readability and maintenance. Signed-off-by: Linus Walleij Reviewed-by: Dmitry Osipenko Cc: Dmitry Osipenko Link: https://lore.kernel.org/r/20200716092835.69176-1-linus.walleij@linaro.org commit 3506ddd676a3c617d4679382dc9cdbb30d4c69a7 Author: Faiz Abbas Date: Fri Jun 19 18:28:01 2020 +0530 arm64: defconfig: Enable AM654x SDHCI controller Enable CONFIG_SDHCI_AM654 to Support AM65x sdhci controller. Signed-off-by: Faiz Abbas Signed-off-by: Tero Kristo commit ad05d4b4dc3553091dac658a824f301d17370842 Merge: 3e3f742b23ac9 4d0e62679f17b Author: Linus Walleij Date: Fri Jul 17 13:37:42 2020 +0200 Merge tag 'sh-pfc-for-v5.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v5.9 (take two) - Add support for the new RZ/G2H (R8A774E1) SoC, - One more conversion of DT bindings to json-schema, - Fix RZ/A1 kerneldoc. commit 3e3f742b23ac975c49572c34f333e6b5b43c35e8 Author: Alexander A. Klimov Date: Mon Jul 13 20:35:41 2020 +0200 pinctrl: rockchip: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200713183541.36963-1-grandmaster@al2klimov.de Signed-off-by: Linus Walleij commit ec792ecfd9e6ad7b58dbc78fb034b8e5f55e6dfb Author: Grygorii Strashko Date: Fri Jun 19 19:25:27 2020 +0300 arm64: arch_k3: enable chipid driver Select TI chip id driver for TI's SoCs based on K3 architecture to provide this information to user space and Kernel as it is required by other drivers to determine SoC revision to function properly. Signed-off-by: Grygorii Strashko Reviewed-by: Lokesh Vutla Reviewed-by: Peter Ujfalusi Tested-by: Peter Ujfalusi Signed-off-by: Tero Kristo commit 891a8d77ff12d0f161909101df08d46cc7a237ba Author: Rahul Gottipati Date: Wed Jul 15 22:01:52 2020 +0530 staging: rtl8188eu: add blank line after declarations Added a blank line after declarations in drivers/staging/rtl8188eu/core/rtw_security.c to fix a checkpatch.pl warning Signed-off-by: Rahul Gottipati Link: https://lore.kernel.org/r/20200715163152.GA10190@rahulg-ThinkPad-T450 Signed-off-by: Greg Kroah-Hartman commit 6cf2602159d2ac7e0494c1bbd164dd06bb2480ef Author: Joe Perches Date: Wed Jul 15 10:29:37 2020 -0700 staging: rtl*/security: Use static const in array declarations Use static const in declarations where appropriate. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/818bbd25924f0c733a4a39d426fd30392d4eae80.camel@perches.com Signed-off-by: Greg Kroah-Hartman commit 4eab532dca768559a7af5c82f054558c36615baf Author: Suraj Upadhyay Date: Thu Jul 16 14:28:11 2020 +0530 staging: qlge/qlge_main.c: Replace depracated MSI API. Replace the depracated MSI API pci_enable_msi() with pci_alloc_irq_vectors(). Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/20200716085811.GA29239@blackclown Signed-off-by: Greg Kroah-Hartman commit b4383c971bc5263efe2b0915ba67ebf2bf3f1ee5 Author: Rustam Kovhaev Date: Thu Jul 16 08:13:26 2020 -0700 staging: rtl8712: handle firmware load failure when firmware fails to load we should not call unregister_netdev() this patch fixes a race condition between rtl871x_load_fw_cb() and r871xu_dev_remove() and fixes the bug reported by syzbot Reported-by: syzbot+80899a8a8efe8968cde7@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=80899a8a8efe8968cde7 Signed-off-by: Rustam Kovhaev Cc: stable Link: https://lore.kernel.org/r/20200716151324.1036204-1-rkovhaev@gmail.com Signed-off-by: Greg Kroah-Hartman commit c4283950a9a4d3bf4a3f362e406c80ab14f10714 Author: Colin Ian King Date: Thu Jul 16 16:47:20 2020 +0100 staging: rtl8192u: fix a dubious looking mask before a shift Currently the masking of ret with 0xff and followed by a right shift of 8 bits always leaves a zero result. It appears the mask of 0xff is incorrect and should be 0xff00, but I don't have the hardware to test this. Fix this to mask the upper 8 bits before shifting. [ Not tested ] Addresses-Coverity: ("Operands don't affect result") Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200716154720.1710252-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit f6b35db072dcf25365972503ade853960da5c984 Merge: 419317021ccc8 62a30a292a828 Author: Greg Kroah-Hartman Date: Fri Jul 17 12:04:05 2020 +0200 Merge tag 'iio-for-5.9a-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: First set of new device support, cleanups and features for IIO in the 5.9 cycle Some new devices, but particularly good this time is the core rework coming from Alexandru. Some of this has been in Analog's tree a long time, but other parts are motivated by closing down common mistakes in new drivers. Changes since first try at this pull request: * Add missed patch to actually remove iio_priv_to_dev and as a result also drop a few ingenic patches that need to be updated to take this into account. * Fix an ordering issue int he pollfunc attach in the core rework. New device support * qcom pmic7 adc - New driver using common qcom-vadc library. Some associated cleanups and refactors. * invensense icm42600 - New driver supporting icm42600, icm42602, icm42605 and icm42622 via i2c or spi. These are all 6 axis IMUs with gyro and accelerometers. Driver supports buffered modes using the hardware fifo and interpolation for accurate timestamps. * sensirion scd30 - New driver for this carbon dioxide sensor including i2c and serial interfaces + bindings. Features * ak8975 - Add reset gpio support. * bma400 - Support SPI. * bmc150 - Document and add support for bmc156b and bmm150b, tidy up _magn endings. * bmi160 - Regulator and mount matrix support. * mxc4005 - Add ID for mxc6655 * rockchip-saradc - Triggered buffer support. DT bindings * qcom spmi-vadc converted to yaml + pmic7 bindings * ak8975 tidy up and convert to yaml + add reset-gpio binding * ingenic-adc -convert to yaml. Core rework all carried through by Alexandru Ardelean. * Assign parent device in the core rather than every driver. A few devices need to provide specific non standard parents, so there is support for overriding. * Start to take parts of struct iio_dev opaque to the drivers. This will be a long term job, but should reduce the number of drivers we get that use parts that are currently only 'internal' by documentation. * Move attach and detach of pollfunc to the core. Every triggered buffer using driver had to do the same thing, so lets do it in the core. The hard part here was getting all the drivers into canonical form so there would be no functional changes in this final patch. That's taken quite a lot of work over last couple of cycles! Cleanups and minor fixes. * docs - Improve IIO_CONCENTRATION channel type description in ABI docs. - Drop doubled word cases. - Http to Https conversion. * core - Make iio_device_get_drvdata take a const struct iio_dev * avoiding some nasty casts. * ADCs - Drop lots of users of of_match_ptr macro, includes of mod_devicetable.h and CONFIG_OF protections. These prevent use of ACPI PRP0001 with these drivers and get coppied into lots of new drivers. * ad5380 - Constify iio_chan_spec_ext_info * ad5592r - Constify iio_chan_spec_ext_info - Avoid use of iio_priv_to_dev (precursor to taking parts of iio_dev opaque) * ad8366 - Make gpio optional as doesn't matter if its there or not. * adis16480 - Use irq types instead of the flags. * atlas-ezo-sensor - Minimize scope of ret variable. * at91-adc - Add COMPILE_TEST dependency to driver to improve build coverage. - Avoid use of iio_priv_to_dev (precursor to taking parts of iio_dev opaque) * at91-sama5d2 - Avoid use of iio_priv_to_dev (precursor to taking parts of iio_dev opaque) - Drop Ludovic as a co-maintaienr. * cros_ec - Reapply the range after resume. - Add a read only frequency entry for legacy version. - Typo fixes * hts221 - Avoid use of iio_priv_to_dev (precursor to taking parts of iio_dev opaque) * inv_mpu - Drop double check on ACPI companion device. * iqs621 - Avoid use of iio_priv_to_dev (precursor to taking parts of iio_dev opaque) * iqs624 - Avoid use of iio_priv_to_dev (precursor to taking parts of iio_dev opaque) * max11100 - Constify iio_chan_spec * mmc35240 - Constify reg_default * rockchip-saradc - Move to managed allocators for everything in probe. - Use more distinctive prefix for channel macros. * stk3310 - Constify regmap_config. * stm32-adc - Avoid use of iio_priv_to_dev (precursor to taking parts of iio_dev opaque) * stm32-dfsdm-adc - Avoid use of iio_priv_to_dev (precursor to taking parts of iio_dev opaque) * ti-am335x - Use managed allocations where straight forward in probe function. * tsl2563 - Avoid use of iio_priv_to_dev (precursor to taking parts of iio_dev opaque) * tag 'iio-for-5.9a-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (107 commits) iio: buffer: fix attach/detach pollfunc order iio: core: remove iio_priv_to_dev() helper Replace HTTP links with HTTPS ones: drivers/iio Replace HTTP links with HTTPS ones: Documentation/devicetree/bindings/iio dt-bindings: iio/adc: Convert ingenic-adc docs to YAML. iio: cros_ec_accel_legacy: Add Read Only frequency entries MAINTAINERS: adc: at91-sama5d2_adc: remove myself as co-maintainer iio: adc: ti_am335x_adc: alloc kfifo & IRQ via devm_ functions iio: adc: ti_am335x_adc: alloc channels via devm_kcalloc() iio:adc:ingenic: drop of_match_ptr protection and include mod_devicetable.h iio:adc:ti-tlc4541: Drop CONFIG_OF and of_match_ptr protections. iio:adc:ti-adc161s626: Drop of_match_ptr protection. iio:adc:ti-adc084s021: drop of_match_ptr protection iio:adc:ti-adc0832: drop CONFIG_OF and of_match_ptr protections iio:adc:ti-adc081c: Drop of_match_ptr and change to mod_devicetable.h iio:adc:sd_adc_modulator: Drop of_match_ptr and tweak includes iio:adc:mcp3422: remove CONFIG_OF and of_match_ptr protections iio:adc:mcp320x: Drop CONFIG_OF and of_match_ptr protections iio:adc:max1118: Drop CONFIG_OF / of_match_ptr protections iio:adc:max11100: Drop of_match_ptr protection / add mod_devicetable.h include ... commit 8aa937cb4aebc31746ceed1c28b20557ef105f08 Author: Geert Uytterhoeven Date: Tue May 19 09:55:25 2020 +0200 ARM: dts: sh73a0: Add missing clocks to sound node The device node for the FIFO-buffered Serial Interface sound node lacks the "clocks" property, as the DTS file didn't describe any clocks yet at its introduction. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200519075525.24742-1-geert+renesas@glider.be commit 8e340e7560d1d4db3b7ed5c010d3460de8ff0c1e Author: Lad Prabhakar Date: Wed Jul 15 12:09:10 2020 +0100 arm64: dts: renesas: r8a774e1: Add CAN[FD] support Add CAN[01] and CANFD support to RZ/G2H (R8A774E1) SoC specific dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594811350-14066-21-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 96ebdb7a87917fd6ee74f46024ca756cc3d3d1ce Author: Lad Prabhakar Date: Wed Jul 15 12:09:07 2020 +0100 arm64: dts: renesas: r8a774e1: Add RWDT node Add a device node for the Watchdog Timer (RWDT) controller on the Renesas RZ/G2H (r8a774e1) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594811350-14066-18-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 05c79a8f0c843dfaae09cfde338c5e570f3d9b6b Author: Lad Prabhakar Date: Wed Jul 15 12:09:05 2020 +0100 arm64: dts: renesas: r8a774e1: Add MSIOF nodes Add the DT nodes needed by MSIOF[0123] interfaces to the SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594811350-14066-16-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 950a3a7951cdeb908798a49d57e5303ad7afd05a Author: Lad Prabhakar Date: Wed Jul 15 12:09:03 2020 +0100 arm64: dts: renesas: r8a774e1: Add I2C and IIC-DVFS support Add the I2C[0-6] and IIC Bus Interface for DVFS (IIC for DVFS) devices nodes to the r8a774e1 device tree. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594811350-14066-14-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 31941342888d4fa008fb27cef9d4ae5913df8792 Author: Lad Prabhakar Date: Wed Jul 15 12:09:00 2020 +0100 arm64: dts: renesas: r8a774e1: Add SDHI nodes Add SDHI[0-2] device nodes to R8A774E1 SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594811350-14066-11-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b9b491a70402f21eb47c10910438c9e0d10a0e17 Author: Lad Prabhakar Date: Wed Jul 15 12:08:59 2020 +0100 arm64: dts: renesas: r8a774e1: Add SCIF and HSCIF nodes Add the device nodes for RZ/G2H SCIF and HSCIF serial ports, including clocks, power domains and DMAs. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1594811350-14066-10-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 58eb575cf0450bab583dc4009a39644bf98754cc Author: Marian-Cristian Rotariu Date: Wed Jul 15 12:08:58 2020 +0100 arm64: dts: renesas: r8a774e1: Add TMU device nodes This patch adds TMU[01234] device tree nodes to the r8a774e1 SoC specific DT. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594811350-14066-9-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit c6c4b7defd391da84da0ac640df0da2a13680a9e Author: Marian-Cristian Rotariu Date: Wed Jul 15 12:08:56 2020 +0100 arm64: dts: renesas: r8a774e1: Add CMT device nodes This patch adds the CMT[0123] device tree nodes to the r8a774e1 SoC specific DT. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594811350-14066-7-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 6dd733679911598354b0445f07a3e6c3141c865c Author: Marian-Cristian Rotariu Date: Wed Jul 15 12:08:54 2020 +0100 arm64: dts: renesas: r8a774e1: Add RZ/G2H thermal support Add thermal support for R8A774E1 (RZ/G2H) SoC. Based on the work done for r8a774a1 SoC. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594811350-14066-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d18dbce4e8c02634866dc80c7873e6121fcae970 Author: Marian-Cristian Rotariu Date: Wed Jul 15 12:08:51 2020 +0100 arm64: dts: renesas: r8a774e1: Add operating points The RZ/G2H (r8a774e1) comes with two clusters of processors, similarly to the r8a774a1. The first cluster is made of A57s, the second cluster is made of A53s. The operating points for the cluster with the A57s are: Frequency | Voltage ----------|--------- 500 MHz | 0.82V 1.0 GHz | 0.82V 1.5 GHz | 0.82V The operating points for the cluster with the A53s are: Frequency | Voltage ----------|--------- 800 MHz | 0.82V 1.0 GHz | 0.82V 1.2 GHz | 0.82V This patch adds the definitions for the operating points to the SoC specific DT. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594811350-14066-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a1d8a344f1ca0709f6e761a794d89d067263e148 Author: Adam Ford Date: Wed Jul 15 09:06:21 2020 -0500 arm64: dts: renesas: Introduce r8a774a1-beacon-rzg2m-kit Beacon EmebeddedWorks, formerly Logic PD is introducing a new SOM and development kit based on the RZ/G2M SoC from Renesas. The SOM supports eMMC, WiFi and Bluetooth, along with a Cat-M1 cellular radio. The Baseboard has Ethernet, USB, HDMI, stereo audio in and out, along with a variety of push buttons and LED's, and support for a parallel RGB and an LVDS display. Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20200715140622.1295370-1-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit 8d54886cbb4efb6e7a35ee1c7d0e9d91b4c73ca9 Author: Marian-Cristian Rotariu Date: Mon Jul 13 22:35:20 2020 +0100 arm64: dts: renesas: r8a774e1: Add Ethernet AVB node This patch adds the SoC specific part of the Ethernet AVB device tree node. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594676120-5862-10-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 43b0c905949735e40b1c90fc354ff2944283103d Author: Marian-Cristian Rotariu Date: Mon Jul 13 22:35:18 2020 +0100 arm64: dts: renesas: r8a774e1: Add GPIO device nodes Add GPIO device nodes to the DT of the r8a774e1 SoC. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594676120-5862-8-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f1bf8ff8d58360d396d01f4aab6316e28e75d4b7 Author: Marian-Cristian Rotariu Date: Mon Jul 13 22:35:16 2020 +0100 arm64: dts: renesas: r8a774e1: Add SYS-DMAC device nodes Add sys-dmac[0-2] device nodes for RZ/G2H (R8A774E1) SoC. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594676120-5862-6-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 615d1a9ebcfb90d5ddbfd887d42eda5dc8b03303 Author: Marian-Cristian Rotariu Date: Mon Jul 13 22:35:14 2020 +0100 arm64: dts: renesas: r8a774e1: Add IPMMU device nodes Add RZ/G2H (R8A774E1) IPMMU nodes. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594676120-5862-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 59692ac5a7bb8c97ff440fc8917828083fbc38d6 Author: Niklas Söderlund Date: Mon Jul 13 13:10:16 2020 +0200 ARM: dts: gose: Fix ports node name for adv7612 When adding the adv7612 device node the ports node was misspelled as port, fix this. Fixes: bc63cd87f3ce924f ("ARM: dts: gose: add HDMI input") Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200713111016.523189-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit d8293670ae46e84973c974ea5745527e90a8afbb Author: Yoshihiro Shimoda Date: Fri Jul 10 21:08:56 2020 +0900 ARM: dts: renesas: Fix SD Card/eMMC interface device node names Fix the device node names as "mmc@". Fixes: 66474697923c ("ARM: dts: r7s72100: add sdhi to device tree") Fixes: a49f76cddaee ("ARM: dts: r7s9210: Add SDHI support") Fixes: 43304a5f5106 ("ARM: shmobile: r8a73a4: tidyup DT node naming") Fixes: 7d907894bfe3 ("ARM: shmobile: r8a7740: tidyup DT node naming") Fixes: 3ab2ea5fd1ce ("ARM: dts: r8a7742: Add SDHI nodes") Fixes: 63ce8a617b51 ("ARM: dts: r8a7743: Add SDHI controllers") Fixes: b591e323b271 ("ARM: dts: r8a7744: Add SDHI nodes") Fixes: d83010f87ab3 ("ARM: dts: r8a7744: Initial SoC device tree") Fixes: 7079131ef9b9 ("ARM: dts: r8a7745: Add SDHI controllers") Fixes: 0485da788028 ("ARM: dts: r8a77470: Add SDHI1 support") Fixes: 15aa5a95e820 ("ARM: dts: r8a77470: Add SDHI0 support") Fixes: f068cc816015 ("ARM: dts: r8a77470: Add SDHI2 support") Fixes: 14e1d9147d96 ("ARM: shmobile: r8a7778: tidyup DT node naming") Fixes: 2624705ceb7b ("ARM: shmobile: r8a7779: tidyup DT node naming") Fixes: b718aa448378 ("ARM: shmobile: r8a7790: tidyup DT node naming") Fixes: b7ed8a0dd4f1 ("ARM: shmobile: Add SDHI devices to r8a7791 DTSI") Fixes: ce01b14ecf19 ("ARM: dts: r8a7792: add SDHI support") Fixes: fc9ee228f500 ("ARM: dts: r8a7793: Add SDHI controllers") Fixes: b8e8ea127d00 ("ARM: shmobile: r8a7794: add SDHI DT support") Fixes: 33f6be3bf6b7 ("ARM: shmobile: sh73a0: tidyup DT node naming") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1594382936-14114-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit a6cb262af1e1adfa6287cb43f09021ee42beb21c Author: Yoshihiro Shimoda Date: Fri Jul 10 21:03:54 2020 +0900 arm64: dts: renesas: Fix SD Card/eMMC interface device node names Fix the device node names as "mmc@". Fixes: 663386c3e1aa ("arm64: dts: renesas: r8a774a1: Add SDHI nodes") Fixes: 9b33e3001b67 ("arm64: dts: renesas: Initial r8a774b1 SoC device tree") Fixes: 77223211f44d ("arm64: dts: renesas: r8a774c0: Add SDHI nodes") Fixes: d9d67010e0c6 ("arm64: dts: r8a7795: Add SDHI support to dtsi") Fixes: a513cf1e6457 ("arm64: dts: r8a7796: add SDHI nodes") Fixes: 111cc9ace2b5 ("arm64: dts: renesas: r8a77961: Add SDHI nodes") Fixes: f51746ad7d1f ("arm64: dts: renesas: Add Renesas R8A77961 SoC support") Fixes: df863d6f95f5 ("arm64: dts: renesas: initial R8A77965 SoC device tree") Fixes: 9aa3558a02f0 ("arm64: dts: renesas: ebisu: Add and enable SDHI device nodes") Fixes: 83f18749c2f6 ("arm64: dts: renesas: r8a77995: Add SDHI (MMC) support") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1594382634-13714-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit d978d018d16e01894174dd857b2eba42a2140748 Author: Yoshihiro Shimoda Date: Fri Jul 10 21:03:32 2020 +0900 arm64: dts: renesas: add full-pwr-cycle-in-suspend into eMMC nodes Add full-pwr-cycle-in-suspend property to do a graceful shutdown of the eMMC device in system suspend. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1594382612-13664-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit adbe62e93c1e793ad08d5e913151137b6c24daa4 Author: Marian-Cristian Rotariu Date: Wed Jul 8 18:48:31 2020 +0100 arm64: dts: renesas: Add HiHope RZ/G2H sub board support The HiHope RZ/G2H sub board sits below the HiHope RZ/G2H main board. These boards are identical with the ones for RZ/G2M[N]. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594230511-24790-9-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit deadcd50771bc06ad03a3d09c568a0f66694e053 Author: Marian-Cristian Rotariu Date: Wed Jul 8 18:48:30 2020 +0100 arm64: dts: renesas: Add HiHope RZ/G2H main board support Basic support for the HiHope RZ/G2H main board: - Memory, - Main crystal, - Serial console - eMMC Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594230511-24790-8-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4dd61a524539a42180f2140a4744c6fb82905d0c Author: Marian-Cristian Rotariu Date: Wed Jul 8 18:48:29 2020 +0100 arm64: dts: renesas: Initial r8a774e1 SoC device tree Basic support for the RZ/G2H SoC. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594230511-24790-7-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 7f8fe81eb75004dca73aa19127093977a3c8a154 Author: Marian-Cristian Rotariu Date: Wed Jul 8 18:48:28 2020 +0100 arm64: defconfig: Enable R8A774E1 SoC Enable the Renesas RZ/G2H (R8A774E1) SoC in the ARM64 defconfig. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594230511-24790-6-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 810cc7ffb5d847f3b36f38cd8663026a4d92aa99 Merge: 8f208c28e1017 ef1c9924287d1 Author: Geert Uytterhoeven Date: Fri Jul 17 10:57:49 2020 +0200 Merge tag 'renesas-r8a774e1-dt-binding-defs-tag' into renesas-arm-dt-for-v5.9 Renesas RZ/G2H DT Binding Definitions Clock and Power Domain definitions for the Renesas RZ/G2H (R8A774E1) SoC, shared by driver and DT source files. commit 71ea8eebdd4455a43a78b68fd2d106719735c211 Author: YueHaibing Date: Fri Jul 17 16:17:10 2020 +0800 ALSA: line6: Use kmemdup in podhd_set_monitor_level() Use kmemdup rather than duplicating its implementation. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200717081710.39180-1-yuehaibing@huawei.com Signed-off-by: Takashi Iwai commit 61eee4a7fc406f94e441778c3cecbbed30373c89 Author: Kaige Li Date: Fri Jul 17 10:51:32 2020 +0800 ALSA: hda: Add support for Loongson 7A1000 controller Add the new PCI ID 0x0014 0x7a07 to support Loongson 7A1000 controller. Signed-off-by: Kaige Li Link: https://lore.kernel.org/r/1594954292-1703-2-git-send-email-likaige@loongson.cn Signed-off-by: Takashi Iwai commit 96a208295040c00c85d022720c10ec1a751b9bdb Author: Xin Long Date: Fri Jul 17 15:03:14 2020 +0800 ip6_vti: use IS_REACHABLE to avoid some compile errors Naresh reported some compile errors: arm build failed due this error on linux-next 20200713 and 20200713 net/ipv6/ip6_vti.o: In function `vti6_rcv_tunnel': ip6_vti.c:(.text+0x1d20): undefined reference to `xfrm6_tunnel_spi_lookup' This happened when set CONFIG_IPV6_VTI=y and CONFIG_INET6_TUNNEL=m. We don't really want ip6_vti to depend inet6_tunnel completely, but only to disable the tunnel code when inet6_tunnel is not seen. So instead of adding "select INET6_TUNNEL" for IPV6_VTI, this patch is only to change to IS_REACHABLE to avoid these compile error. Reported-by: Naresh Kamboju Fixes: 08622869ed3f ("ip6_vti: support IP6IP6 tunnel processing with .cb_handler") Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit 0a0d93b943a20e4210491911e82c3b4a34391ce4 Author: Xin Long Date: Fri Jul 17 15:02:30 2020 +0800 xfrm: interface: use IS_REACHABLE to avoid some compile errors kernel test robot reported some compile errors: ia64-linux-ld: net/xfrm/xfrm_interface.o: in function `xfrmi4_fini': net/xfrm/xfrm_interface.c:900: undefined reference to `xfrm4_tunnel_deregister' ia64-linux-ld: net/xfrm/xfrm_interface.c:901: undefined reference to `xfrm4_tunnel_deregister' ia64-linux-ld: net/xfrm/xfrm_interface.o: in function `xfrmi4_init': net/xfrm/xfrm_interface.c:873: undefined reference to `xfrm4_tunnel_register' ia64-linux-ld: net/xfrm/xfrm_interface.c:876: undefined reference to `xfrm4_tunnel_register' ia64-linux-ld: net/xfrm/xfrm_interface.c:885: undefined reference to `xfrm4_tunnel_deregister' This happened when set CONFIG_XFRM_INTERFACE=y and CONFIG_INET_TUNNEL=m. We don't really want xfrm_interface to depend inet_tunnel completely, but only to disable the tunnel code when inet_tunnel is not seen. So instead of adding "select INET_TUNNEL" for XFRM_INTERFACE, this patch is only to change to IS_REACHABLE to avoid these compile error. Reported-by: kernel test robot Fixes: da9bbf0598c9 ("xfrm: interface: support IPIP and IPIP6 tunnels processing with .cb_handler") Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit 6cd84cfc8e872ef7521b6fce75d53ef0b232ad04 Merge: bca21e9304514 38b1927e5bf9b Author: Vinod Koul Date: Fri Jul 17 13:45:53 2020 +0530 Merge branch 'fixes' into next commit bca21e930451416f92c0c4c679feb9d8fa33c08f Author: Alim Akhtar Date: Fri Jul 17 00:52:17 2020 +0530 phy: samsung-ufs: add UFS PHY driver for samsung SoC This patch introduces Samsung UFS PHY driver. This driver supports to deal with phy calibration and power control according to UFS host driver's behavior. [Robot: -Wmissing-prototypes and -Wsometimes-uninitialized] Reported-by: kernel test robot Reviewed-by: Kiwoong Kim Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar Cc: Kishon Vijay Abraham I Cc: Vinod Koul Tested-by: Paweł Chmiel Link: https://lore.kernel.org/r/20200716192217.35740-2-alim.akhtar@samsung.com Signed-off-by: Vinod Koul commit 170ba9c23f0b813f9ba53a9cd3fec0f3f95f45aa Author: Alim Akhtar Date: Fri Jul 17 00:52:16 2020 +0530 dt-bindings: phy: Document Samsung UFS PHY bindings This patch documents Samsung UFS PHY device tree bindings Reviewed-by: Rob Herring Signed-off-by: Alim Akhtar Tested-by: Paweł Chmiel Link: https://lore.kernel.org/r/20200716192217.35740-1-alim.akhtar@samsung.com Signed-off-by: Vinod Koul commit 04fe6477efce92adaf373a6044c90fa8445d2bff Author: Roger Quadros Date: Mon Jun 29 15:52:54 2020 +0300 arm64: dts: k3-j721e-proc-board: Add wait time for sampling Type-C DIR line The Type-C compainon chip on the board needs ~133ms (tCCB_DEFAULT) to debounce the CC lines in order to detect attach and plug orientation and reflect the correct DIR status. [1] On the EVM however we need to wait upto 700ms before sampling the Type-C DIR line else we can get incorrect direction state. [1] http://www.ti.com/lit/ds/symlink/tusb321.pdf Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori Signed-off-by: Tero Kristo commit 02c35dca2b488ca71aeac970a2f6e13226d239cb Author: Roger Quadros Date: Mon Jun 29 15:52:53 2020 +0300 arm64: dts: ti: k3-j721e: Enable Super-Speed support for USB0 USB0 supports super-speed mode on the EVM. Enable that. On the EVM, USB0 uses SERDES3 for super-speed lane. Since USB0 is a type-C port, it needs to support lane swapping for cable flip support. This is provided using SERDES lane swap feature. Provide the Type-C cable orientation GPIO to the SERDES Wrapper driver. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori Signed-off-by: Tero Kristo commit 4716053a0a7bed061bf6c0ef2b845022671bd7cb Author: Roger Quadros Date: Mon Jun 29 15:52:52 2020 +0300 arm64: dts: ti: k3-j721e-main.dtsi: Add USB to SERDES MUX The USB controllers can be connected to one of the 2 SERDESes using a MUX. Add a MUX controller node fot that. Signed-off-by: Roger Quadros Signed-off-by: Sekhar Nori Signed-off-by: Tero Kristo commit b766e3b0d5f698266ba353821fee09a3862d51d4 Author: Kishon Vijay Abraham I Date: Mon Jun 29 15:52:51 2020 +0300 arm64: dts: ti: k3-j721e-main: Add system controller node and SERDES lane mux The system controller node manages the CTRL_MMR0 region. Add serdes_ln_ctrl node which is used for controlling the SERDES lane mux. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Roger Quadros Acked-by: Rob Herring Signed-off-by: Tero Kristo commit afd094ebe69f91ca44047450fb4b7774aab3aa21 Author: Kishon Vijay Abraham I Date: Mon Jun 29 15:52:50 2020 +0300 arm64: dts: ti: k3-j721e-main: Add WIZ and SERDES PHY nodes Add DT nodes for all instances of WIZ and SERDES modules. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Roger Quadros Signed-off-by: Tero Kristo commit e0f946915b23fd98ffadcf89f8e1c1aee02a7e57 Author: Roger Quadros Date: Mon Jun 29 15:52:49 2020 +0300 dt-bindings: mfd: ti,j721e-system-controller.yaml: Add J721e system controller Add DT binding schema for J721e system controller. Signed-off-by: Roger Quadros Reviewed-by: Rob Herring Signed-off-by: Tero Kristo commit 6e6972f9b2e25c62775a99acfca63740db79884f Author: Grygorii Strashko Date: Fri Jun 26 21:34:37 2020 +0300 arm64: dts: ti: k3-am65/j721e-main: rename gic-its node to msi-controller The preferable name for gic-its is msi-controller, so rename it to fix dtbs_check warning: k3-j721e-common-proc-board.dt.yaml: interrupt-controller@1800000: gic-its@1820000: False schema does not allow {'compatible': ['arm,gic-v3-its'], 'reg': [[0, 25296896, 0, 65536]], 'socionext,synquacer-pre-its': [[16777216, 4194304]], 'msi-controller': True, '#msi-cells': [[1]]} Signed-off-by: Grygorii Strashko Signed-off-by: Tero Kristo commit d0c72c7759d463e31b4ef8937af1df61b513fc2c Author: Grygorii Strashko Date: Fri Jun 26 21:35:32 2020 +0300 arm64: dts: ti: k3-j721e-main: rename smmu node to iommu Rename smmu node to iommu to fix dtbs_check warning: k3-j721e-common-proc-board.dt.yaml: smmu@36600000: $nodename:0: 'smmu@36600000' does not match '^iommu@[0-9a-f]*' Signed-off-by: Grygorii Strashko Acked-by: Suman Anna Signed-off-by: Tero Kristo commit 303d6f62eb8f30516eed01c3faff188f4780de67 Author: Alexander A. Klimov Date: Mon Jul 13 12:14:09 2020 +0200 arm64: dts: ti: k3-*: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Tero Kristo commit 13f74fc647f4a521699d00c463bb31b208815cef Author: Faiz Abbas Date: Sat Jul 11 00:32:15 2020 +0530 arm64: dts: ti: k3-am654-base-board: Add support for SD card With silicon revision 2.0, add support for SD card on the am65x-evm. Boards with silicon revision 1.0 are susceptible to interface issues because of erratas i2025 and i2026[1] and are recommended to disable this node. [1] Am654x Silicon Revision 1.0 errata: https://www.ti.com/lit/pdf/sprz452 Signed-off-by: Faiz Abbas Signed-off-by: Tero Kristo commit d7600d070fb075435a8a9a39396c4321f09e7546 Author: Faiz Abbas Date: Sat Jul 11 00:32:14 2020 +0530 arm64: dts: ti: k3-am65-main: Add support for sdhci1 Add support for the 2nd SDHCI controller on TI's AM654x SoCs. Although it supports upto SDR104 (100 MBps @ 200 MHz) speed mode, only enable support upto High Speed (25 MBps @ 50 MHz) for now. Signed-off-by: Faiz Abbas Signed-off-by: Tero Kristo commit ed3aad5b8268ca335d3cf0998c37523ba05bc670 Author: Peter Ujfalusi Date: Fri Jul 3 10:44:43 2020 +0300 arm64: dts: ti: j721e-common-proc-board: Analog audio support The codec is wired in multi DIN/DOUT setup (DIN1/2/3/4/DOUT1/2/3 is connected to McASP serializer). To support wide range of audio features a generic sound card can not be used since we need to use different reference clock source for 44.1 and 48 KHz family of sampling rates. Depending on the sample size we also need to use different slot width to be able to support 16 and 24 bits. There are couple of notable difference compared to DIN1/DOUT1 mode: the channel mapping is 'random' for first look compared to the single serializer setup: _ _ _ |o|c1 |o|p1 |o|p3 _ | | | | | | |o|c3 |o|c2 |o|p4 |o|p2 ------------------------ c1/2/3 - capture jacks (3rd is line) p1/2/3/4 - playback jacks (4th is line) 2 channel audio (stereo): 0 (left): p1/c1 left 1 (right): p1/c1 right 4 channel audio: 0: p1/c1 left 1: p2/c2 left 2: p1/c1 right 3: p2/c2 right 6 channel audio 0: p1/c1 left 1: p2/c2 left 2: p3/c3 left 3: p1/c1 right 4: p2/c2 right 5: p3/c3 right 8 channel audio 0: p1/c1 left 1: p2/c2 left 2: p3/c3 left 3: p4 left 4: p1/c1 right 5: p2/c2 right 6: p3/c3 right 7: p4 right Signed-off-by: Peter Ujfalusi Signed-off-by: Tero Kristo commit ebf5eccc3c0ad389ba4c4b7c86e900caab2338db Author: Peter Ujfalusi Date: Fri Jul 3 10:44:42 2020 +0300 arm64: dts: ti: k3-j721e-common-proc-board: Remove duplicated main_i2c1_exp4_pins_default Two pimux entry is present with the same name, remove one of them. Fixes: cb27354b38f3 ("arm64: dts: ti: k3-j721e: Add DT nodes for few peripherials") Signed-off-by: Peter Ujfalusi Signed-off-by: Tero Kristo commit 67c70aa86f8b796c45a08e0c955dabd826f6d0c6 Author: Enric Balletbo i Serra Date: Thu Mar 5 12:10:47 2020 +0100 arm/arm64: defconfig: Update configs to use the new CROS_EC options We refactored the CrOS EC drivers moving part of the code from the MFD subsystem to the platform chrome subsystem. During this change we needed to rename some config options, so, update the defconfigs accordingly. Signed-off-by: Enric Balletbo i Serra Acked-by: Krzysztof Kozlowski Reviewed-by: Gwendal Grignou Tested-by: Gwendal Grignou Acked-by: Lee Jones Signed-off-by: Arnd Bergmann commit 7d50b295c4af16f814ee82369c4a234df5228801 Author: Takashi Iwai Date: Fri Jul 17 08:41:30 2020 +0200 Revert "ALSA: pcm: Use SG-buffer only when direct DMA is available" This reverts commit 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when direct DMA is available") also the modification commit 467fd0e82b62 ("ALSA: pcm: Fix build error on m68k and others"). Poking the DMA internal helper is a layer violation, so we should avoid that. Meanwhile the actual bug has been addressed by the Kconfig fix in commit dbed452a078d ("dma-pool: decouple DMA_REMAP from DMA_COHERENT_POOL"), so we can live without this hack. Link: https://lore.kernel.org/r/20200717064130.22957-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8b34a2895bb7f791ce6bebc1737373e9475c58b2 Author: Vinod Koul Date: Thu Jul 16 11:54:27 2020 +0530 phy: sun4i-usb: explicitly include gpio/consumer.h Driver uses GPIO functions but doesn't include the header explcitly. Add that to fix build errors when GPIOLIB is disabled. drivers/phy/allwinner/phy-sun4i-usb.c:367:11: error: implicit declaration of function ‘gpiod_get_value_cansleep’; did you mean ‘gpio_get_value_cansleep’? [-Werror=implicit-function-declaration] drivers/phy/allwinner/phy-sun4i-usb.c:707:22: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_clk_get_optional’? [-Werror=implicit-function-declaration] drivers/phy/allwinner/phy-sun4i-usb.c:708:11: error: ‘GPIOD_IN’ undeclared (first use in this function); did you mean ‘GPIOF_IN’? drivers/phy/allwinner/phy-sun4i-usb.c:815:21: error: implicit declaration of function ‘gpiod_to_irq’; did you mean ‘gpio_to_irq’? [-Werror=implicit-function-declaration] Reported-by: Randy Dunlap Signed-off-by: Vinod Koul Acked-by: Chen-Yu Tsai Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20200716062427.71763-1-vkoul@kernel.org commit ab6041e409001dbbbe1167532aef0ec8b15e4393 Author: Koehrer Mathias (ETAS/EES-SL) Date: Wed Jul 15 08:41:19 2020 +0000 dmaengine: Extend NXP QDMA driver to check transmission errors Extend NXP QDMA driver to check transmission errors The NXP QDMA driver (fsl-qdma.c) does not check the status bits that indicate if a DMA transfer has been completed successfully. This patch extends the driver to do exactly this. Signed-off-by: Mathias Koehrer Link: https://lore.kernel.org/r/744443c0462aac2df4754f99500a911527c0b235.camel@bosch.com Signed-off-by: Vinod Koul commit c3846c4cce15bf7d1f2ad75294445317eb4b26f1 Author: Ludovic Desroches Date: Thu Jul 16 09:15:24 2020 +0200 MAINTAINERS: dmaengine: Microchip: add Tudor Ambarus as co-maintainer Add Tudor Ambarus as co-maintainer for both Microchip DMA drivers and take the opportunity to merge both entries. Signed-off-by: Ludovic Desroches Link: https://lore.kernel.org/r/20200716071524.25642-1-ludovic.desroches@microchip.com Signed-off-by: Vinod Koul commit 7cbb0c63de3fc218fd06ecfedb477772a4d12f76 Author: Hyun Kwon Date: Fri Jul 17 04:33:35 2020 +0300 dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver The ZynqMP DisplayPort subsystem includes a DMA engine called DPDMA with 6 DMa channels (4 for display and 2 for audio). This driver exposes the DPDMA through the dmaengine API, to be used by audio (ALSA) and display (DRM) drivers for the DisplayPort subsystem. Signed-off-by: Hyun Kwon Signed-off-by: Tejas Upadhyay Signed-off-by: Michal Simek Signed-off-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200717013337.24122-4-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit 9c8ebd8b82da89c2484594b61d66288d24983348 Author: Laurent Pinchart Date: Fri Jul 17 04:33:34 2020 +0300 dmaengine: Add support for repeating transactions DMA engines used with displays perform 2D interleaved transfers to read framebuffers from memory and feed the data to the display engine. As the same framebuffer can be displayed for multiple frames, the DMA transactions need to be repeated until a new framebuffer replaces the current one. This feature is implemented natively by some DMA engines that have the ability to repeat transactions and switch to a new transaction at the end of a transfer without any race condition or frame loss. This patch implements support for this feature in the DMA engine API. A new DMA_PREP_REPEAT transaction flag allows DMA clients to instruct the DMA channel to repeat the transaction automatically until one or more new transactions are issued on the channel (or until all active DMA transfers are explicitly terminated with the dmaengine_terminate_*() functions). A new DMA_REPEAT transaction type is also added for DMA engine drivers to report their support of the DMA_PREP_REPEAT flag. A new DMA_PREP_LOAD_EOT transaction flag is also introduced (with a corresponding DMA_LOAD_EOT capability bit), as requested during the review of v4. The flag instructs the DMA channel that the transaction being queued should replace the active repeated transaction when the latter terminates (at End Of Transaction). Not setting the flag will result in the active repeated transaction to continue being repeated, and the new transaction being silently ignored. The DMA_PREP_REPEAT flag is currently supported for interleaved transactions only. Its usage can easily be extended to cover more transaction types simply by adding an appropriate check in the corresponding dmaengine_prep_*() function. Signed-off-by: Laurent Pinchart Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200717013337.24122-3-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit ef9303fdf46f770e8534ab6f72bad946e70ddfc3 Author: Laurent Pinchart Date: Fri Jul 17 04:33:33 2020 +0300 dt: bindings: dma: xilinx: dpdma: DT bindings for Xilinx DPDMA The ZynqMP includes the DisplayPort subsystem with its own DMA engine called DPDMA. The DPDMA IP comes with 6 individual channels (4 for display, 2 for audio). This documentation describes DT bindings of DPDMA. Signed-off-by: Hyun Kwon Signed-off-by: Michal Simek Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200717013337.24122-2-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit 4a4dca1941fedc1b02635ff0b4ed51b9857d0382 Author: Mathieu Poirier Date: Tue Jul 14 13:50:35 2020 -0600 remoteproc: Properly handle firmware name when attaching This patch prevents the firmware image name from being displayed when the remoteproc core is attaching to a remote processor. This is needed needed since there is no guarantee about the nature of the firmware image that is loaded by the external entity. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Reviewed-by: Bjorn Andersson Tested-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200714195035.1426873-10-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 4d3ebb3b99905e0e1c83b320764495f5fc3f93fe Author: Mathieu Poirier Date: Tue Jul 14 13:50:34 2020 -0600 remoteproc: Refactor function rproc_free_vring() When function rproc_free_vring() clears the virtio device section it does so on the cached resource table rather than the one installed in the remote processor memory. When a remote processor has been booted by another entity there is no need to use a cached table and as such, no need to clear the virtio device section in it. Signed-off-by: Mathieu Poirier Reviewed-by: Bjorn Andersson Tested-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200714195035.1426873-9-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit e3d2193959824e2119996fe361f92b34750de2b0 Author: Mathieu Poirier Date: Tue Jul 14 13:50:33 2020 -0600 remoteproc: Refactor function rproc_trigger_auto_boot() Refactor function rproc_trigger_auto_boot() to properly deal with scenarios where the remoteproc core needs to attach with a remote processor that has already been booted by an external entity. Signed-off-by: Mathieu Poirier Reviewed-by: Bjorn Andersson Tested-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200714195035.1426873-8-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 0f9dc562b721aa1c0190ffe9f32aa0fcd7b8f2e8 Author: Mathieu Poirier Date: Tue Jul 14 13:50:32 2020 -0600 remoteproc: Refactor function rproc_boot() Refactor function rproc_boot() to properly deal with scenarios where the remoteproc core needs to attach with a remote processor that has already been booted by an external entity. Signed-off-by: Mathieu Poirier Reviewed-by: Bjorn Andersson Tested-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200714195035.1426873-7-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 88d3a1360755b7dd88a737ef2cd966a54c932682 Author: Mathieu Poirier Date: Tue Jul 14 13:50:31 2020 -0600 remoteproc: Introducing function rproc_validate() Add a new function to assert the general health of the remote processor before handing it to the remoteproc core. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Tested-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200714195035.1426873-6-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit fdf0e00ed646fc94ab27e7d46fac983b1533a761 Author: Mathieu Poirier Date: Tue Jul 14 13:50:30 2020 -0600 remoteproc: Introducing function rproc_actuate() Introduce function rproc_actuate() that provides the same functionatlity as rproc_fw_boot(), but without the steps that involve interaction with the firmware image. That way we can deal with scenarios where the remoteproc core is attaching to a remote processor that has already been started by another entity. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Tested-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200714195035.1426873-5-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit d848a4819d858973952de181314de6d05512fb98 Author: Mathieu Poirier Date: Tue Jul 14 13:50:29 2020 -0600 remoteproc: Introducing function rproc_attach() Introducing function rproc_attach() to enact the same actions as rproc_start(), but without the steps related to the handling of a firmware image. That way we can properly deal with scenarios where the remoteproc core needs to attach with a remote processsor that has been booted by another entity. Signed-off-by: Mathieu Poirier Reviewed-by: Bjorn Andersson Tested-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200714195035.1426873-4-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit a6a4f2857524007848f7957af432cddb4d43b593 Author: Mathieu Poirier Date: Tue Jul 14 13:50:28 2020 -0600 remoteproc: Add new attach() remoteproc operation Add an new attach() operation in order to properly deal with scenarios where the remoteproc core needs to attach to a remote processor that has been booted by another entity. Signed-off-by: Mathieu Poirier Reviewed-by: Bjorn Andersson Tested-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200714195035.1426873-3-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit e2e5c55eed8023ecfbf4c9b623ef7dec343d1845 Author: Mathieu Poirier Date: Tue Jul 14 13:50:27 2020 -0600 remoteproc: Add new RPROC_DETACHED state Add a new RPROC_DETACHED state to take into account scenarios where the remoteproc core needs to attach to a remote processor that is booted by another entity. Signed-off-by: Mathieu Poirier Reviewed-by: Bjorn Andersson Tested-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200714195035.1426873-2-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 4e6751a1cfab85b7a1c054cf3d55f12322e1ee3b Author: Sibi Sankar Date: Thu Jul 16 17:35:14 2020 +0530 remoteproc: qcom_q6v5_mss: Monitor MSS_STATUS for boot completion On secure devices there exists a race condition which could lock the MSS CONFIG AHB bus thus preventing access to BOOT_STATUS register during SSR. Switch to polling the MSS_STATUS register with an additional 10 us delay to reliably track boot completion. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200716120514.21588-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 90ec257c380ebdcebf332b698f3e809cd1157202 Author: Bjorn Andersson Date: Wed Jul 15 22:48:17 2020 -0700 remoteproc: qcom: pil-info: Fix shift overflow On platforms with 32-bit phys_addr_t the shift to get the upper word of the base address of the memory region is invalid. Cast the base to 64 bit to resolv this. Fixes: 549b67da660d ("remoteproc: qcom: Introduce helper to store pil info in IMEM") Tested-by: Nathan Chancellor # build Reported-by: Lee Jones Reported-by: Nathan Chancellor Link: https://lore.kernel.org/r/20200716054817.157608-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit bbe28fc3cbabbef781bcdf847615d52ce2e26e42 Author: Ricardo Cañuelo Date: Mon Jun 1 08:33:06 2020 +0200 arm64: dts: hisilicon: hikey: fixes to comply with adi, adv7533 DT binding hi3660-hikey960.dts: Define a 'ports' node for 'adv7533: adv7533@39' and the 'adi,dsi-lanes' property to make it compliant with the adi,adv7533 DT binding. This fills the requirements to meet the binding requirements, remote endpoints are not defined. hi6220-hikey.dts: Change property name s/pd-gpio/pd-gpios, gpio properties should be plural. This is just a cosmetic change. Signed-off-by: Ricardo Cañuelo Acked-by: Laurent Pinchart Signed-off-by: Wei Xu commit 47e2843f5e2e1cdcf25fdfa28173ae5315e6497b Author: John Stultz Date: Sat Jul 4 04:31:51 2020 +0000 dts: hi3660: Add support for basic usb gadget on Hikey960 This patch adds basic core dwc3, usb phy and rt1711h nodes for usb support on Hikey960. This does not enable the mux/hub functionality on the board, so the USB-A host ports will not function, but does allow the USB-C port to function in gadget mode (unfortunately not in host, as the hub/mux functionality is needed to enable vbus output to power devices in host mode). This is based on an old patch originally by Yu Chen. Cc: Yu Chen Cc: Chunfeng Yun Cc: Wei Xu Cc: Binghui Wang Cc: YongQin Liu Cc: Rob Herring Cc: Matthias Brugger Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org Signed-off-by: John Stultz Signed-off-by: Wei Xu commit 0f6b99d2d6124f3cbbfda745730dc6d21fae07d0 Author: Krzysztof Kozlowski Date: Mon Jun 29 10:16:57 2020 +0200 arm64: dts: hisilicon: Align UART nodename with dtschema Fix dtschema validator warnings like: uart@f8015000: $nodename:0: 'uart@f8015000' does not match '^serial(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Wei Xu commit 7b8bc95f8e20f77f8bce8d2b8f3eb54958726770 Author: Krzysztof Kozlowski Date: Mon Jun 29 10:16:56 2020 +0200 arm64: dts: hisilicon: Use phandles for overriding nodes in hi6220 When overriding nodes, usage of phandles instead of full paths reduces possible mistakes (e.g. in duplicated unit address) and removes duplicate data. The UART nodes were extended via full path and phandle which makes it difficult to review and spot actual differences. No functional change (no difference in dtx_diff). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Wei Xu commit 5720fcdc2e5af74e51c5e3102fcefd9fb061a666 Author: Krzysztof Kozlowski Date: Fri Jun 26 10:06:37 2020 +0200 ARM: dts: hisilicon: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache: $nodename:0: 'l2-cache' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Wei Xu commit eb624fe214a2e156ddafd9868377cf91499f789d Author: Tyler Hicks Date: Thu Jul 9 01:19:05 2020 -0500 ima: Fail rule parsing when the KEY_CHECK hook is combined with an invalid cond The KEY_CHECK function only supports the uid, pcr, and keyrings conditionals. Make this clear at policy load so that IMA policy authors don't assume that other conditionals are supported. Fixes: 5808611cccb2 ("IMA: Add KEY_CHECK func to measure keys") Signed-off-by: Tyler Hicks Reviewed-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit db2045f5892a9db7354442bf77f9b03b50ff9ee1 Author: Tyler Hicks Date: Thu Jul 9 01:19:04 2020 -0500 ima: Fail rule parsing when the KEXEC_CMDLINE hook is combined with an invalid cond The KEXEC_CMDLINE hook function only supports the pcr conditional. Make this clear at policy load so that IMA policy authors don't assume that other conditionals are supported. Since KEXEC_CMDLINE's inception, ima_match_rules() has always returned true on any loaded KEXEC_CMDLINE rule without any consideration for other conditionals present in the rule. Make it clear that pcr is the only supported KEXEC_CMDLINE conditional by returning an error during policy load. An example of why this is a problem can be explained with the following rule: dont_measure func=KEXEC_CMDLINE obj_type=foo_t An IMA policy author would have assumed that rule is valid because the parser accepted it but the result was that measurements for all KEXEC_CMDLINE operations would be disabled. Fixes: b0935123a183 ("IMA: Define a new hook to measure the kexec boot command line arguments") Signed-off-by: Tyler Hicks Reviewed-by: Mimi Zohar Reviewed-by: Lakshmi Ramasubramanian Signed-off-by: Mimi Zohar commit 712183437ebebc89cd086ef96cf9a521fd97fd09 Author: Tyler Hicks Date: Thu Jul 9 01:19:03 2020 -0500 ima: Fail rule parsing when buffer hook functions have an invalid action Buffer based hook functions, such as KEXEC_CMDLINE and KEY_CHECK, can only measure. The process_buffer_measurement() function quietly ignores all actions except measure so make this behavior clear at the time of policy load. The parsing of the keyrings conditional had a check to ensure that it was only specified with measure actions but the check should be on the hook function and not the keyrings conditional since "appraise func=KEY_CHECK" is not a valid rule. Fixes: b0935123a183 ("IMA: Define a new hook to measure the kexec boot command line arguments") Fixes: 5808611cccb2 ("IMA: Add KEY_CHECK func to measure keys") Signed-off-by: Tyler Hicks Signed-off-by: Mimi Zohar commit 2bdd737c5687d6dec30e205953146ede8a87dbdd Author: Tyler Hicks Date: Thu Jul 9 01:19:02 2020 -0500 ima: Free the entire rule if it fails to parse Use ima_free_rule() to fix memory leaks of allocated ima_rule_entry members, such as .fsname and .keyrings, when an error is encountered during rule parsing. Set the args_p pointer to NULL after freeing it in the error path of ima_lsm_rule_init() so that it isn't freed twice. This fixes a memory leak seen when loading an rule that contains an additional piece of allocated memory, such as an fsname, followed by an invalid conditional: # echo "measure fsname=tmpfs bad=cond" > /sys/kernel/security/ima/policy -bash: echo: write error: Invalid argument # echo scan > /sys/kernel/debug/kmemleak # cat /sys/kernel/debug/kmemleak unreferenced object 0xffff98e7e4ece6c0 (size 8): comm "bash", pid 672, jiffies 4294791843 (age 21.855s) hex dump (first 8 bytes): 74 6d 70 66 73 00 6b a5 tmpfs.k. backtrace: [<00000000abab7413>] kstrdup+0x2e/0x60 [<00000000f11ede32>] ima_parse_add_rule+0x7d4/0x1020 [<00000000f883dd7a>] ima_write_policy+0xab/0x1d0 [<00000000b17cf753>] vfs_write+0xde/0x1d0 [<00000000b8ddfdea>] ksys_write+0x68/0xe0 [<00000000b8e21e87>] do_syscall_64+0x56/0xa0 [<0000000089ea7b98>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: f1b08bbcbdaf ("ima: define a new policy condition based on the filesystem name") Fixes: 2b60c0ecedf8 ("IMA: Read keyrings= option from the IMA policy") Signed-off-by: Tyler Hicks Signed-off-by: Mimi Zohar commit 465aee77aae857b5fcde56ee192b33dc369fba04 Author: Tyler Hicks Date: Thu Jul 9 01:19:01 2020 -0500 ima: Free the entire rule when deleting a list of rules Create a function, ima_free_rule(), to free all memory associated with an ima_rule_entry. Use the new function to fix memory leaks of allocated ima_rule_entry members, such as .fsname and .keyrings, when deleting a list of rules. Make the existing ima_lsm_free_rule() function specific to the LSM audit rule array of an ima_rule_entry and require that callers make an additional call to kfree to free the ima_rule_entry itself. This fixes a memory leak seen when loading by a valid rule that contains an additional piece of allocated memory, such as an fsname, followed by an invalid rule that triggers a policy load failure: # echo -e "dont_measure fsname=securityfs\nbad syntax" > \ /sys/kernel/security/ima/policy -bash: echo: write error: Invalid argument # echo scan > /sys/kernel/debug/kmemleak # cat /sys/kernel/debug/kmemleak unreferenced object 0xffff9bab67ca12c0 (size 16): comm "bash", pid 684, jiffies 4295212803 (age 252.344s) hex dump (first 16 bytes): 73 65 63 75 72 69 74 79 66 73 00 6b 6b 6b 6b a5 securityfs.kkkk. backtrace: [<00000000adc80b1b>] kstrdup+0x2e/0x60 [<00000000d504cb0d>] ima_parse_add_rule+0x7d4/0x1020 [<00000000444825ac>] ima_write_policy+0xab/0x1d0 [<000000002b7f0d6c>] vfs_write+0xde/0x1d0 [<0000000096feedcf>] ksys_write+0x68/0xe0 [<0000000052b544a2>] do_syscall_64+0x56/0xa0 [<000000007ead1ba7>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: f1b08bbcbdaf ("ima: define a new policy condition based on the filesystem name") Fixes: 2b60c0ecedf8 ("IMA: Read keyrings= option from the IMA policy") Signed-off-by: Tyler Hicks Signed-off-by: Mimi Zohar commit 9ff8a616dfab96a4fa0ddd36190907dc68886d9b Author: Tyler Hicks Date: Thu Jul 9 01:19:00 2020 -0500 ima: Have the LSM free its audit rule Ask the LSM to free its audit rule rather than directly calling kfree(). Both AppArmor and SELinux do additional work in their audit_rule_free() hooks. Fix memory leaks by allowing the LSMs to perform necessary work. Fixes: b16942455193 ("ima: use the lsm policy update notifier") Signed-off-by: Tyler Hicks Cc: Janne Karhunen Cc: Casey Schaufler Reviewed-by: Mimi Zohar Signed-off-by: Mimi Zohar commit 34e980bb83a07b533d175221436d698c1312c4a3 Author: Lakshmi Ramasubramanian Date: Thu Jun 18 14:10:12 2020 -0700 IMA: Add audit log for failure conditions process_buffer_measurement() and ima_alloc_key_entry() functions need to log an audit message for auditing integrity measurement failures. Add audit message in these two functions. Remove "pr_devel" log message in process_buffer_measurement(). Sample audit messages: [ 6.303048] audit: type=1804 audit(1592506281.627:2): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel op=measuring_key cause=ENOMEM comm="swapper/0" name=".builtin_trusted_keys" res=0 errno=-12 [ 8.019432] audit: type=1804 audit(1592506283.344:10): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 op=measuring_kexec_cmdline cause=hashing_error comm="systemd" name="kexec-cmdline" res=0 errno=-22 Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Mimi Zohar Signed-off-by: Mimi Zohar commit 2f845882ecd2f6808f87f387dfa9b03d71a68e01 Author: Lakshmi Ramasubramanian Date: Thu Jun 18 14:10:11 2020 -0700 integrity: Add errno field in audit message Error code is not included in the audit messages logged by the integrity subsystem. Define a new function integrity_audit_message() that takes error code in the "errno" parameter. Add "errno" field in the audit messages logged by the integrity subsystem and set the value passed in the "errno" parameter. [ 6.303048] audit: type=1804 audit(1592506281.627:2): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel op=measuring_key cause=ENOMEM comm="swapper/0" name=".builtin_trusted_keys" res=0 errno=-12 [ 7.987647] audit: type=1802 audit(1592506283.312:9): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 op=policy_update cause=completed comm="systemd" res=1 errno=0 [ 8.019432] audit: type=1804 audit(1592506283.344:10): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 op=measuring_kexec_cmdline cause=hashing_error comm="systemd" name="kexec-cmdline" res=0 errno=-22 Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Steve Grubb Suggested-by: Mimi Zohar Signed-off-by: Mimi Zohar commit c9fadf212afd4f924a3502e3904917ee280854c0 Merge: 2b0f61e27f75f 6611561a7a7ef Author: Mark Brown Date: Fri Jul 17 00:56:07 2020 +0100 Merge remote-tracking branch 'regmap/for-5.9' into regmap-next commit 2b0f61e27f75f0f53d51dcbf334aaba21eb27109 Merge: 11ba468877bb2 299632e54b2e6 Author: Mark Brown Date: Fri Jul 17 00:56:05 2020 +0100 Merge remote-tracking branch 'regmap/for-5.8' into regmap-linus commit e752ec8e9216fd72bc2528297b7606071fb60d29 Merge: 499de01c5c0b8 5e94c3cdaa29e Author: Mark Brown Date: Fri Jul 17 00:55:27 2020 +0100 Merge series "spi: bcm2835/bcm2835aux: support effective_speed_hz" from Marc Kleine-Budde : Hello, I've picked up and forward ported Martin Sperl's patches which add support for effective_speed_hz to the SPI controllers found on all raspberry pi models. See the following patch, which adds this feature to the SPI core, for more information: 5d7e2b5ed585 spi: core: allow reporting the effectivly used speed_hz for a transfer regards, Marc _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 499de01c5c0b813cc94dbfc722ec12487044ac4a Author: Qing Zhang Date: Wed Jul 15 13:26:47 2020 +0800 spi: coldfire-qspi: Use clk_prepare_enable and clk_disable_unprepare Convert clk_enable() to clk_prepare_enable() and clk_disable() to clk_disable_unprepare() respectively in the spi-coldfire-qspi.c. Signed-off-by: Qing Zhang Link: https://lore.kernel.org/r/1594790807-32319-2-git-send-email-zhangqing@loongson.cn Signed-off-by: Mark Brown commit 3e84cdd427b24b40d3670a7d61be31514bea1864 Author: Tudor Ambarus Date: Thu Jul 16 08:11:44 2020 +0300 spi: Fix SPI NOR and SPI NAND acronyms The industry refers to these flash types as "SPI NOR" and "SPI NAND". Be consistent and use the same acronyms. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200716051144.568606-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit b780c3f38812bce7d7baebe2108738a043d6c4c3 Author: Tudor Ambarus Date: Thu Jul 16 07:31:39 2020 +0300 spi: atmel-quadspi: Use optimezed memcpy_fromio()/memcpy_toio() Optimezed mem*io operations are defined for LE platforms, use them. The ARM and !ARCH_EBSA110 dependencies for COMPILE_TEST were added only for the _memcpy_fromio()/_memcpy_toio() functions. Drop these dependencies. Tested unaligned accesses on both sama5d2 and sam9x60 QSPI controllers using SPI NOR flashes, everything works ok. The following performance improvement can be seen when running mtd_speedtest: sama5d2_xplained (mx25l25635e) - before: mtd_speedtest: eraseblock write speed is 983 KiB/s mtd_speedtest: eraseblock read speed is 6150 KiB/s - after: mtd_speedtest: eraseblock write speed is 1055 KiB/s mtd_speedtest: eraseblock read speed is 20144 KiB/s sam9x60ek (sst26vf064b) - before: mtd_speedtest: eraseblock write speed is 4770 KiB/s mtd_speedtest: eraseblock read speed is 8062 KiB/s - after: mtd_speedtest: eraseblock write speed is 4524 KiB/s mtd_speedtest: eraseblock read speed is 21186 KiB/s Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200716043139.565734-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit e126859729ed4a5143e5690186b8bec1c1157113 Author: Mark Brown Date: Wed Jul 15 17:36:10 2020 +0100 spi: Only defer to thread for cleanup when needed Currently we always defer idling of controllers to the SPI thread, the goal being to ensure that we're doing teardown that's not suitable for atomic context in an appropriate context and to try to batch up more expensive teardown operations when the system is under higher load, allowing more work to be started before the SPI thread is scheduled. However when the controller does not require any substantial work to idle there is no need to do this, we can instead save the context switch and immediately mark the controller as idle. This is particularly useful for systems where there is frequent but not constant activity. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200715163610.9475-1-broonie@kernel.org Signed-off-by: Mark Brown commit 2ae3de10abfe0be40c9d93ebc2f429b969abf008 Author: Randy Dunlap Date: Wed Jul 15 18:30:48 2020 -0700 spi: fix duplicated word in Change doubled word "as" to "as a". Change "Return: Return:" in kernel-doc notation to have only one "Return:". Signed-off-by: Randy Dunlap Cc: Mark Brown Cc: linux-spi@vger.kernel.org Link: https://lore.kernel.org/r/40354d64-be71-3952-a980-63a76a278145@infradead.org Signed-off-by: Mark Brown commit 4291dc1a5608117439643f4fe77e4ad1827a3310 Merge: 89e35f66d552c ac5c66f261b71 Author: Jakub Kicinski Date: Thu Jul 16 16:48:47 2020 -0700 Merge branch 'net-sched-do-not-drop-root-lock-in-tcf_qevent_handle' Petr Machata says: ==================== net: sched: Do not drop root lock in tcf_qevent_handle() Mirred currently does not mix well with blocks executed after the qdisc root lock is taken. This includes classification blocks (such as in PRIO, ETS, DRR qdiscs) and qevents. The locking caused by the packet mirrored by mirred can cause deadlocks: either when the thread of execution attempts to take the lock a second time, or when two threads end up waiting on each other's locks. The qevent patchset attempted to not introduce further badness of this sort, and dropped the lock before executing the qevent block. However this lead to too little locking and races between qdisc configuration and packet enqueue in the RED qdisc. Before the deadlock issues are solved in a way that can be applied across many qdiscs reasonably easily, do for qevents what is done for the classification blocks and just keep holding the root lock. That is done in patch #1. Patch #2 then drops the now unnecessary root_lock argument from Qdisc_ops.enqueue. ==================== Signed-off-by: Jakub Kicinski commit ac5c66f261b7174d0d9aaeb2bf9f8c2c2dbad0bd Author: Petr Machata Date: Tue Jul 14 20:03:08 2020 +0300 Revert "net: sched: Pass root lock to Qdisc_ops.enqueue" This reverts commit aebe4426ccaa4838f36ea805cdf7d76503e65117. Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski commit 55f656cdb851bae32980d83d2494201e79d93b63 Author: Petr Machata Date: Tue Jul 14 20:03:07 2020 +0300 net: sched: Do not drop root lock in tcf_qevent_handle() Mirred currently does not mix well with blocks executed after the qdisc root lock is taken. This includes classification blocks (such as in PRIO, ETS, DRR qdiscs) and qevents. The locking caused by the packet mirrored by mirred can cause deadlocks: either when the thread of execution attempts to take the lock a second time, or when two threads end up waiting on each other's locks. The qevent patchset attempted to not introduce further badness of this sort, and dropped the lock before executing the qevent block. However this lead to too little locking and races between qdisc configuration and packet enqueue in the RED qdisc. Before the deadlock issues are solved in a way that can be applied across many qdiscs reasonably easily, do for qevents what is done for the classification blocks and just keep holding the root lock. Signed-off-by: Petr Machata Signed-off-by: Jakub Kicinski commit 4dc8ff06efa193a7644f7bf5cad37c2b6c53f93b Author: Sibi Sankar Date: Fri Jul 17 00:47:46 2020 +0530 arm64: dts: qcom: sc7180: Move the fixed-perm property to SoC dtsi All the platforms using SC7180 SoC are expected to have the wlan firmware memory statically mapped by the Trusted Firmware. Hence move back the qcom,msa-fixed-perm property to the SoC dtsi. Reviewed-by: Douglas Anderson Fixes: 7d484566087c0 ("arm64: dts: qcom: sc7180: Add missing properties for Wifi node") Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200716191746.23196-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 54b154ecfb8c66dfeba6578a64e79c2104da4ced Author: Eli Britstein Date: Thu Jun 18 15:38:31 2020 +0000 net/mlx5e: CT: Map 128 bits labels to 32 bit map ID The 128 bits ct_label field is matched using a 32 bit hardware register. As such, only the lower 32 bits of ct_label field are offloaded. Change this logic to support setting and matching higher bits too. Map the 128 bits data to a unique 32 bits ID. Matching is done as exact match of the mapping ID of key & mask. Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 0bdc89b39d622b8929a687eee194e4e166fe84df Author: Tariq Toukan Date: Wed May 1 15:23:06 2019 +0300 net/mlx5e: Do not request completion on every single UMR WQE UMR WQEs are posted in bulks, and HW is notified once per a bulk. Reduce the number of completions by requesting such only for the last WQE of the bulk. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 2901a5c618dd18b3610747c18547b33e0c1eca08 Author: Tariq Toukan Date: Thu Apr 30 15:52:53 2020 +0300 net/mlx5e: RX, Avoid indirect call in representor CQE handling Use INDIRECT_CALL_2() helper to avoid the cost of the indirect call when/if CONFIG_RETPOLINE=y. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 93761ca17edf83f4222ab5abda8bde837ea5a309 Author: Tariq Toukan Date: Thu Apr 30 14:32:45 2020 +0300 net/mlx5e: XDP, Avoid indirect call in TX flow Use INDIRECT_CALL_2() helper to avoid the cost of the indirect call when/if CONFIG_RETPOLINE=y. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 7ed92f97a1ad308ca77bc73eb62156ec8c2bf51a Author: Raed Salem Date: Sun Dec 29 17:13:53 2019 +0200 net/mlx5e: IPsec: Add Connect-X IPsec ESN update offload support Synchronize offloading device ESN with xfrm received SN by updating an existing IPsec HW context with the new SN. Signed-off-by: Raed Salem Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed commit b2ac7541e3777f325c49d900550c9e3dd10c0eda Author: Raed Salem Date: Thu Oct 24 16:11:28 2019 +0300 net/mlx5e: IPsec: Add Connect-X IPsec Rx data path offload On receive flow inspect received packets for IPsec offload indication using the cqe, for IPsec offloaded packets propagate offload status and stack handle to stack for further processing. Supported statuses: - Offload ok. - Authentication failure. - Bad trailer indication. Connect-X IPsec does not use mlx5e_ipsec_handle_rx_cqe. For RX only offload, we see the BW gain. Below is the iperf3 performance report on two server of 24 cores Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz with ConnectX6-DX. We use one thread per IPsec tunnel. --------------------------------------------------------------------- Mode | Num tunnel | BW | Send CPU util | Recv CPU util | | (Gbps) | (Average %) | (Average %) --------------------------------------------------------------------- Cryto offload | 1 | 4.6 | 4.2 | 14.5 --------------------------------------------------------------------- Cryto offload | 24 | 38 | 73 | 63 --------------------------------------------------------------------- Non-offload | 1 | 4 | 4 | 13 --------------------------------------------------------------------- Non-offload | 24 | 23 | 52 | 67 Signed-off-by: Raed Salem Reviewed-by: Boris Pismenny Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 5e466345291a91d1722e7198497198becda29e22 Author: Huy Nguyen Date: Fri Jun 5 16:36:35 2020 -0500 net/mlx5e: IPsec: Add IPsec steering in local NIC RX Introduce decrypt FT, the RX error FT and the default rules. The IPsec RX decrypt flow table is pointed by the TTC (Traffic Type Classifier) ESP steering rules. The decrypt flow table has two flow groups. The first flow group keeps the decrypt steering rule programmed via the "ip xfrm s" interface. The second flow group has a default rule to forward all non-offloaded ESP packet to the TTC ESP default RSS TIR. The RX error flow table is the destination of the decrypt steering rules in the IPsec RX decrypt flow table. It has a fixed rule with single copy action that copies ipsec_syndrome to metadata_regB[0:6]. The IPsec syndrome is used to filter out non-ipsec packet and to return the IPsec crypto offload status in Rx flow. The destination of RX error flow table is the TTC ESP default RSS TIR. All the FTs (decrypt FT and error FT) are created only when IPsec SAs are added. If there is no IPsec SAs, the FTs are removed. Signed-off-by: Huy Nguyen Reviewed-by: Boris Pismenny Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 78fb6122fa2b6b55fafee1b32cd94913ad72f8a4 Author: Huy Nguyen Date: Wed Apr 8 20:09:05 2020 -0500 net/mlx5: Add IPsec related Flow steering entry's fields Add FTE actions IPsec ENCRYPT/DECRYPT Add ipsec_obj_id field in FTE Add new action field MLX5_ACTION_IN_FIELD_IPSEC_SYNDROME Signed-off-by: Huy Nguyen Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed commit 2d64663cd55972d3915a9efb8d7087e1aeeda17e Author: Raed Salem Date: Wed Jan 29 18:15:15 2020 +0200 net/mlx5: IPsec: Add HW crypto offload support This patch adds support for Connect-X IPsec crypto offload by implementing the IPsec acceleration layer needed routines, which delegates IPsec offloads to Connect-X routines. In Connect-X IPsec, a Security Association (SA) is added or deleted via allocating a HW context of an encryption/decryption key and a HW context of a matching SA (IPsec object). The Security Policy (SP) is added or deleted by creating matching Tx/Rx steering rules whith an action of encryption/decryption respectively, executed using the previously allocated SA HW context. When new xfrm state (SA) is added: - Use a separate crypto key HW context. - Create a separate IPsec context in HW to inlcude the SA properties: - aes-gcm salt. - ICV properties (ICV length, implicit IV). - on supported devices also update ESN. - associate the allocated crypto key with this IPsec context. Introduce a new compilation flag MLX5_IPSEC for it. Downstream patches will implement the Rx,Tx steering and will add the update esn. Signed-off-by: Raed Salem Signed-off-by: Huy Nguyen Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 9a6ad1ad71fbc5a52617e016a3608d71b91f62e8 Author: Raed Salem Date: Mon Nov 18 14:30:20 2019 +0200 net/mlx5: Accel, Add core IPsec support for the Connect-X family This to set the base for downstream patches to support the new IPsec implementation of the Connect-X family. Following modifications made: - Remove accel layer dependency from MLX5_FPGA_IPSEC. - Introduce accel_ipsec_ops, each IPsec device will have to support these ops. Signed-off-by: Raed Salem Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit ea2128fd632c5308569eb789842910aa14796d22 Author: Parav Pandit Date: Fri Jun 26 23:15:12 2020 +0300 net/mlx5: E-switch, Reduce dependency on num_vfs during mode set Currently only ECPF allows enabling eswitch when SR-IOV is disabled. Enable PF also to enable eswitch when SR-IOV is disabled. Load VF vports when eswitch is already enabled. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 3d5f41ca01244fa2d261b76a0c728d6ac4526645 Author: Parav Pandit Date: Sat Jun 27 14:12:36 2020 +0300 net/mlx5: E-switch, Avoid function change handler for non ECPF for non ECPF eswitch manager function, vports are already enabled/disabled when eswitch is enabled/disabled respectively. Simplify function change handler for such eswitch manager function. Therefore, ECPF is the only one which remains PF/VF function change handler. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit e21feb88f7d87bc54032db480047e70ba05dcbac Author: Tariq Toukan Date: Thu Apr 9 19:53:24 2020 +0300 net/mlx5: Make MLX5_EN_TLS non-prompt TLS runs only over Eth, and the Eth driver is the only user of the core TLS functionality. There is no meaning of having the core functionality without the usage in Eth driver. Hence, let both TLS core implementations depend on MLX5_CORE_EN, and select MLX5_EN_TLS. Signed-off-by: Tariq Toukan Reviewed-by: Raed Salem Reviewed-by: Boris Pismenny Signed-off-by: Saeed Mahameed commit 8b5ec43d73dbdb427651caac5b76610ec0f5f298 Author: Saeed Mahameed Date: Tue Jul 14 18:54:46 2020 -0700 net/mlx5e: Fix build break when CONFIG_XPS is not set mlx5e_accel_sk_get_rxq is only used in ktls_rx.c file which already depends on XPS to be compiled, move it from the generic en_accel.h header to be local in ktls_rx.c, to fix the below build break In file included from ../drivers/net/ethernet/mellanox/mlx5/core/en_main.c:49:0: ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h: In function ‘mlx5e_accel_sk_get_rxq’: ../drivers/net/ethernet/mellanox/mlx5/core/en_accel/en_accel.h:153:12: error: implicit declaration of function ‘sk_rx_queue_get’ ... int rxq = sk_rx_queue_get(sk); ^~~~~~~~~~~~~~~ Fixes: 1182f3659357 ("net/mlx5e: kTLS, Add kTLS RX HW offload support") Signed-off-by: Saeed Mahameed Reported-by: Randy Dunlap commit 1315971fea66d2c1b09cab115a487898ba628cac Author: Parav Pandit Date: Fri Jul 10 21:12:44 2020 +0300 net/mlx5e: Fix missing switch_id for representors Cited commit in fixes tag missed to set the switch id of the PF and VF ports. Due to this flow cannot be offloaded, a simple command like below fails to offload with below error. tc filter add dev ens2f0np0 parent ffff: prio 1 flower \ dst_mac 00:00:00:00:00:00/00:00:00:00:00:00 skip_sw \ action mirred egress redirect dev ens2f0np0pf0vf0 Error: mlx5_core: devices are not on same switch HW, can't offload forwarding. Hence, fix it by setting switch id for each PF and VF representors port as before the cited commit. Fixes: 71ad8d55f8e5 ("devlink: Replace devlink_port_attrs_set parameters with a struct") Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan commit 5e94c3cdaa29e28f6739c91a74d9ddd96f4ba6b6 Author: Martin Sperl Date: Thu Jul 9 09:41:20 2020 +0200 spi: bcm2835aux: support effective_speed_hz Setting spi_transfer->effective_speed_hz in transfer_one so that it can get used in cs_change_delay configured with delay as a muliple of SPI clock cycles. Signed-off-by: Martin Sperl Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200709074120.110069-3-mkl@pengutronix.de Signed-off-by: Mark Brown commit 9df2003df79a0f763dbf76891fcc7d4a5141861d Author: Martin Sperl Date: Thu Jul 9 09:41:19 2020 +0200 spi: bcm2835: support effective_speed_hz Setting spi_transfer->effective_speed_hz in transfer_one so that it can get used in cs_change_delay configured with delay as a muliple of SPI clock cycles. Signed-off-by: Martin Sperl Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200709074120.110069-2-mkl@pengutronix.de Signed-off-by: Mark Brown commit a98bcaa92d3d7a7753e23b3363d90ffdb82e8edb Author: Colton Lewis Date: Wed Jul 15 19:15:00 2020 +0000 regulator: Correct kernel-doc inconsistency Silence documentation build warning by correcting kernel-doc comments. ./include/linux/regulator/machine.h:196: warning: Function parameter or member 'max_uV_step' not described in 'regulation_constraints' ./include/linux/regulator/driver.h:206: warning: Function parameter or member 'resume' not described in 'regulator_ops' Signed-off-by: Colton Lewis Link: https://lore.kernel.org/r/20200715191438.29312-1-colton.w.lewis@protonmail.com Signed-off-by: Mark Brown commit 6611561a7a7ef925294353a4c2124bdb66eb831c Author: Randy Dunlap Date: Wed Jul 15 18:30:12 2020 -0700 regmap: fix duplicated word in Change doubled word "be" to "to be". Signed-off-by: Randy Dunlap Cc: Mark Brown Link: https://lore.kernel.org/r/7ef41bfc-de3e-073a-8746-0b3fdf7628c0@infradead.org Signed-off-by: Mark Brown commit 94c3a83ad3091a9c9a4da019bd7df6f1dff6a375 Merge: 5f52d4dda5bcf 95ce82ac3c476 Author: Mark Brown Date: Thu Jul 16 23:51:54 2020 +0100 Merge series "ALSA: hda: export snd_hda_codec_cleanup()" from Kai Vehmanen : Hi, this small series is preparation for a set of bugfix ASoC patches addressing a memleak at module unload for the HDA codec wrapper. Instead of duplicating HDA code in ASoC tree, I chose to export more functionality from hda_codec.c so it can be (re)used in ASoC's hdac_hda.c. Full series: https://github.com/thesofproject/linux/pull/2252 Takashi and Mark, feedback is welcome on how to best handle this kind of series where I have dependent patches both in sound/pci/hda and in ASoC. For this series, I'm sending the patches separately and when/if first set is merged by Takashi, I'll route the ASoC patches via our usually SOF set to Mark. Kai Vehmanen (2): ALSA: hda: export snd_hda_codec_cleanup_for_unbind() ALSA: hda: fix snd_hda_codec_cleanup() documentation include/sound/hda_codec.h | 2 ++ sound/pci/hda/hda_codec.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) -- 2.27.0 commit 5f52d4dda5bcfc37fba8338bd578ab1bd449f8bd Merge: bdd0c277d9846 3b171194493c5 Author: Mark Brown Date: Thu Jul 16 23:51:52 2020 +0100 Merge series "ASoC: fsl-asoc-card: Support hp and mic detection" from Shengjiu Wang : Support hp and mic detection. Add a parameter for asoc_simple_init_jack. Shengjiu Wang (3): ASoC: simple-card-utils: Support configure pin_name for asoc_simple_init_jack ASoC: bindings: fsl-asoc-card: Support hp-det-gpio and mic-det-gpio ASoC: fsl-asoc-card: Support Headphone and Microphone Jack detection changes in v2: - Add more comments in third commit - Add Acked-by Nicolin. .../bindings/sound/fsl-asoc-card.txt | 3 + include/sound/simple_card_utils.h | 6 +- sound/soc/fsl/Kconfig | 1 + sound/soc/fsl/fsl-asoc-card.c | 77 ++++++++++++++++++- sound/soc/generic/simple-card-utils.c | 7 +- 5 files changed, 86 insertions(+), 8 deletions(-) -- 2.27.0 commit bdd0c277d9846977ec3f175341d4e7475ed26ef7 Merge: d235b28236981 50891431aaadf Author: Mark Brown Date: Thu Jul 16 23:51:51 2020 +0100 Merge series "ASoC: merge .digital_mute() into .mute_stream()" from Kuninori Morimoto : Hi Mark These are v3 patch-set. ALSA SoC has 2 mute callbacks (= .digital_mute(), .mute_stream()). But the difference between these 2 are very small. .digital_mute() is for Playback .mute_stream() is for Playback/Capture This patch-set adds new .no_capture_mute flag and emulate .digital_mute() by .mute_stream(). v2 -> v3 - uses "xxx_mute_stream" for .mute_stream naming if it was better - removed verbose Cc email address v1 -> v2 - return -ENOTSUPP at hdmi-codec - add new .no_capture_mute flag and emulate .digital_mute() by .mute_stream() Link: https://lore.kernel.org/r/874kqy2y5t.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87ftam37ko.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (21): ASoC: hdmi-codec: return -ENOTSUPP for digital_mute ASoC: soc-dai.c: add .no_capture_mute support ASoC: hdmi-codec: merge .digital_mute() into .mute_stream() ASoC: ti: merge .digital_mute() into .mute_stream() ASoC: spear: merge .digital_mute() into .mute_stream() ASoC: meson: merge .digital_mute() into .mute_stream() ASoC: atmel: merge .digital_mute() into .mute_stream() ASoC: codecs: merge .digital_mute() into .mute_stream() ASoC: codecs: tlv*: merge .digital_mute() into .mute_stream() ASoC: codecs: tas*: merge .digital_mute() into .mute_stream() ASoC: codecs: ssm*: merge .digital_mute() into .mute_stream() ASoC: codecs: pcm*: merge .digital_mute() into .mute_stream() ASoC: codecs: max*: merge .digital_mute() into .mute_stream() ASoC: codecs: alc*: merge .digital_mute() into .mute_stream() ASoC: codecs: wm*: merge .digital_mute() into .mute_stream() ASoC: codecs: es*: merge .digital_mute() into .mute_stream() ASoC: codecs: da*: merge .digital_mute() into .mute_stream() ASoC: codecs: cs*: merge .digital_mute() into .mute_stream() ASoC: codecs: ak*: merge .digital_mute() into .mute_stream() ASoC: soc-dai: remove .digital_mute ASoC: soc-core: snd_soc_dai_digital_mute() for both CPU/Codec drivers/gpu/drm/bridge/sii902x.c | 7 ++++--- drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++++-- drivers/gpu/drm/i2c/tda998x_drv.c | 7 ++++--- drivers/gpu/drm/mediatek/mtk_hdmi.c | 6 ++++-- drivers/gpu/drm/rockchip/cdn-dp-core.c | 7 ++++--- drivers/gpu/drm/sti/sti_hdmi.c | 6 ++++-- drivers/gpu/drm/zte/zx_hdmi.c | 7 ++++--- include/sound/hdmi-codec.h | 6 +++++- include/sound/soc-dai.h | 4 +++- sound/soc/atmel/atmel-classd.c | 7 ++++--- sound/soc/codecs/88pm860x-codec.c | 8 +++++--- sound/soc/codecs/ad193x.c | 5 +++-- sound/soc/codecs/adau1701.c | 5 +++-- sound/soc/codecs/ak4458.c | 5 +++-- sound/soc/codecs/ak4535.c | 6 ++++-- sound/soc/codecs/ak4641.c | 8 +++++--- sound/soc/codecs/alc5623.c | 5 +++-- sound/soc/codecs/alc5632.c | 5 +++-- sound/soc/codecs/cpcap.c | 11 +++++++---- sound/soc/codecs/cq93vc.c | 5 +++-- sound/soc/codecs/cs4265.c | 5 +++-- sound/soc/codecs/cs4270.c | 5 +++-- sound/soc/codecs/cs42l42.c | 5 +++-- sound/soc/codecs/cs42l51.c | 5 +++-- sound/soc/codecs/cs42l52.c | 5 +++-- sound/soc/codecs/cs42l56.c | 5 +++-- sound/soc/codecs/cs42xx8.c | 5 +++-- sound/soc/codecs/cs4341.c | 5 +++-- sound/soc/codecs/cs4349.c | 5 +++-- sound/soc/codecs/da7210.c | 5 +++-- sound/soc/codecs/da7213.c | 5 +++-- sound/soc/codecs/da9055.c | 5 +++-- sound/soc/codecs/es8316.c | 5 +++-- sound/soc/codecs/es8328.c | 5 +++-- sound/soc/codecs/hdmi-codec.c | 25 +++++++++++++++++-------- sound/soc/codecs/isabelle.c | 15 +++++++++------ sound/soc/codecs/jz4770.c | 5 +++-- sound/soc/codecs/lm49453.c | 25 +++++++++++++++---------- sound/soc/codecs/max98088.c | 12 ++++++++---- sound/soc/codecs/max98090.c | 6 ++++-- sound/soc/codecs/max9867.c | 5 +++-- sound/soc/codecs/ml26124.c | 5 +++-- sound/soc/codecs/nau8822.c | 5 +++-- sound/soc/codecs/pcm1681.c | 5 +++-- sound/soc/codecs/pcm1789.c | 5 +++-- sound/soc/codecs/pcm179x.c | 5 +++-- sound/soc/codecs/pcm3168a.c | 5 +++-- sound/soc/codecs/pcm512x.c | 5 +++-- sound/soc/codecs/rk3328_codec.c | 5 +++-- sound/soc/codecs/sgtl5000.c | 5 +++-- sound/soc/codecs/ssm2518.c | 5 +++-- sound/soc/codecs/ssm2602.c | 5 +++-- sound/soc/codecs/ssm4567.c | 5 +++-- sound/soc/codecs/sta529.c | 5 +++-- sound/soc/codecs/tas2552.c | 5 +++-- sound/soc/codecs/tas2562.c | 5 +++-- sound/soc/codecs/tas2770.c | 5 +++-- sound/soc/codecs/tas571x.c | 5 +++-- sound/soc/codecs/tas5720.c | 5 +++-- sound/soc/codecs/tas6424.c | 5 +++-- sound/soc/codecs/tfa9879.c | 5 +++-- sound/soc/codecs/tlv320aic23.c | 5 +++-- sound/soc/codecs/tlv320aic26.c | 5 +++-- sound/soc/codecs/tlv320aic31xx.c | 6 ++++-- sound/soc/codecs/tlv320aic32x4.c | 5 +++-- sound/soc/codecs/tlv320aic3x.c | 5 +++-- sound/soc/codecs/twl6040.c | 5 +++-- sound/soc/codecs/uda134x.c | 5 +++-- sound/soc/codecs/wm8350.c | 5 +++-- sound/soc/codecs/wm8400.c | 5 +++-- sound/soc/codecs/wm8510.c | 5 +++-- sound/soc/codecs/wm8580.c | 5 +++-- sound/soc/codecs/wm8711.c | 5 +++-- sound/soc/codecs/wm8728.c | 5 +++-- sound/soc/codecs/wm8731.c | 5 +++-- sound/soc/codecs/wm8741.c | 5 +++-- sound/soc/codecs/wm8750.c | 5 +++-- sound/soc/codecs/wm8753.c | 8 +++++--- sound/soc/codecs/wm8770.c | 5 +++-- sound/soc/codecs/wm8776.c | 5 +++-- sound/soc/codecs/wm8900.c | 5 +++-- sound/soc/codecs/wm8903.c | 5 +++-- sound/soc/codecs/wm8904.c | 5 +++-- sound/soc/codecs/wm8940.c | 5 +++-- sound/soc/codecs/wm8955.c | 5 +++-- sound/soc/codecs/wm8960.c | 5 +++-- sound/soc/codecs/wm8961.c | 5 +++-- sound/soc/codecs/wm8962.c | 5 +++-- sound/soc/codecs/wm8971.c | 5 +++-- sound/soc/codecs/wm8974.c | 5 +++-- sound/soc/codecs/wm8978.c | 5 +++-- sound/soc/codecs/wm8983.c | 7 ++++--- sound/soc/codecs/wm8985.c | 7 ++++--- sound/soc/codecs/wm8988.c | 5 +++-- sound/soc/codecs/wm8990.c | 5 +++-- sound/soc/codecs/wm8991.c | 7 ++++--- sound/soc/codecs/wm8993.c | 5 +++-- sound/soc/codecs/wm8994.c | 9 ++++++--- sound/soc/codecs/wm8995.c | 8 +++++--- sound/soc/codecs/wm9081.c | 5 +++-- sound/soc/meson/axg-spdifout.c | 5 +++-- sound/soc/soc-core.c | 4 ++-- sound/soc/soc-dai.c | 12 +++++++----- sound/soc/spear/spdif_out.c | 8 +++++--- sound/soc/ti/ams-delta.c | 9 +++++---- 105 files changed, 390 insertions(+), 249 deletions(-) -- 2.25.1 commit d235b282369813c53fdd512d61402b6a7cda1603 Author: Kuninori Morimoto Date: Thu Jul 16 09:29:10 2020 +0900 ASoC: dt-bindings: renesas, fsi: use patternProperties for FSI-A/B FSI has FSI-A and FSI-B, and has fsia-xxx/fsib-xxx properties. This patch uses patternProperties, and reduce verbose settings. Signed-off-by: Kuninori Morimoto Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/87o8osxlow.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87pn9v39eo.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87zh802tif.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5b235b5522bf38f65cc76a9a008f179c37e0eb81 Author: Kuninori Morimoto Date: Thu Jul 16 09:31:01 2020 +0900 ASoC: dt-bindings: ak4613: switch to yaml base Documentation This patch switches from .txt base to .yaml base Document. Signed-off-by: Kuninori Morimoto Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/87mu4cxlo2.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87o8pf3923.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87y2nk2tfd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0cee81b4fa402d31a5cbefaedba4973ba3f2aced Author: Kuninori Morimoto Date: Thu Jul 16 09:31:57 2020 +0900 ASoC: dt-bindings: ak4642: switch to yaml base Documentation This patch switches from .txt base to .yaml base Document. Signed-off-by: Kuninori Morimoto Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/87lfjwxlna.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87mu4z3904.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87wo342tds.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit be75db5772f93da3a6b52552f260ce9da8fbfff8 Author: Shengjiu Wang Date: Thu Jul 16 13:07:08 2020 +0800 ASoC: soc-component: Add missed return for calling soc_component_ret Add missed return for calling soc_component_ret, otherwise the return value is wrong. Fixes: e2329eeba45f ("ASoC: soc-component: add soc_component_err()") Signed-off-by: Shengjiu Wang Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/1594876028-1845-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 1b58214113481616b74ee4d196e5b1cb683758ee Author: Lee Jones Date: Wed Jul 15 16:00:09 2020 +0100 ASoC: fsl: fsl-asoc-card: Trivial: Fix misspelling of 'exists' Signed-off-by: Lee Jones Cc: Timur Tabi Cc: Nicolin Chen Cc: Xiubo Li Cc: Fabio Estevam Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20200715150009.407442-1-lee.jones@linaro.org Signed-off-by: Mark Brown commit a786e8cab152da7ec8b9859da6e77cb59c7fa789 Author: Paul Cercueil Date: Thu Jul 16 18:38:46 2020 +0200 drm/ingenic: Bump driver to version 1.1 Bump version to 1.1 and set date to 2020-07-16. v3: New patch Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-12-paul@crapouillou.net commit c369cb27c267fe3020f3b059618743532f73503b Author: Paul Cercueil Date: Thu Jul 16 18:38:45 2020 +0200 drm/ingenic: Support multiple panels/bridges Support multiple panels or bridges connected to the same DPI output of the SoC. This setup can be found for instance on the GCW Zero, where the same DPI output interfaces the internal 320x240 TFT panel, and the ITE IT6610 HDMI chip. v2: No change v3: Allow > 80-char lines where it makes sense Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-11-paul@crapouillou.net commit fc1acf317b01083d47228c0d21cfc0764f37a04e Author: Paul Cercueil Date: Thu Jul 16 18:38:44 2020 +0200 drm/ingenic: Add support for the IPU Add support for the Image Processing Unit (IPU) found in all Ingenic SoCs. The IPU can upscale and downscale a source frame of arbitrary size ranging from 4x4 to 4096x4096 on newer SoCs, with bicubic filtering on newer SoCs, bilinear filtering on older SoCs. Nearest-neighbour can also be obtained with proper coefficients. Starting from the JZ4725B, the IPU supports a mode where its output is sent directly to the LCDC, without having to be written to RAM first. This makes it possible to use the IPU as a DRM plane on the compatible SoCs, and have it convert and scale anything the userspace asks for to what's available for the display. Regarding pixel formats, older SoCs support packed YUV 4:2:2 and various planar YUV formats. Newer SoCs introduced support for RGB. Since the IPU is a separate hardware block, to make it work properly the Ingenic DRM driver will now register itself as a component master in case the IPU driver has been enabled in the config. When enabled in the config, the CRTC will see the IPU as a second primary plane. It cannot be enabled at the same time as the regular primary plane. It has the same priority, which means that it will also display below the overlay plane. v2: - ingenic-ipu is no longer its own module. It will be built into the ingenic-drm module. - If enabled in the config, both the core driver and the IPU driver will register as components; otherwise the core driver will bypass that and call the ingenic_drm_bind() function directly. - Since both files now build into the same module, the symbols previously exported as GPL are not exported anymore, since they are only used internally. - Fix SPDX license header in ingenic-ipu.h - Avoid using 'for(;;);' loops without trailing statement(s) v3: - Pass priv structure to IRQ handler; that way we don't hardcode the expectation that the IPU plane is at index #0. - Rework osd_changed() to account for src_* changes - Add multiplanar YUV 4:4:4 support - Commit fb addresses to HW at vblank, since addr registers are not shadow registers - Probe IPU component later so that IPU plane is last - Fix driver not working on IPU-less hardware - Use IPU driver's name as the IRQ name to avoid having two 'ingenic-drm' in /proc/interrupts - Fix IPU only working for still images on JZ4725B - Add a bit more code comments Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-10-paul@crapouillou.net commit 3c9bea4ef32bdcde5bda850b4fa989b936e75f4b Author: Paul Cercueil Date: Thu Jul 16 18:38:43 2020 +0200 drm/ingenic: Add support for OSD mode All Ingenic SoCs starting from the JZ4725B support OSD mode. In this mode, two separate planes can be used. They can have different positions and sizes, and one can be overlayed on top of the other. v2: Use fallthrough; instead of /* fall-through */ v3: - Add custom atomic_tail function to handle case where HW gives no VBLANK - Use regmap_set_bits() / regmap_clear_bits() when possible - Use dma_hwdesc_f{0,1} fields in priv structure instead of array - Use dmam_alloc_coherent() instead of dma_alloc_coherent() - Use more meaningful 0xf0 / 0xf1 values as DMA descriptors IDs - Add a bit more code comments Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-9-paul@crapouillou.net commit 0a746db7ad9210ae4eac4ea1f2834778fee89859 Author: Paul Cercueil Date: Thu Jul 16 18:38:42 2020 +0200 drm/ingenic: Use dmam_alloc_coherent() Use dmam_alloc_coherent() instead of dma_alloc_coherent(). Then we don't need to register a custom cleanup handler. v3: New patch Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-8-paul@crapouillou.net commit 4b11cb7ff2eff92d7f7a0cc358d07c088c715e7e Author: Paul Cercueil Date: Thu Jul 16 18:38:41 2020 +0200 drm/ingenic: Move register definitions to ingenic-drm.h Move the register definitions to ingenic-drm.h, to keep ingenic-drm-drv.c tidy. v2: Fix SPDX license tag v3: No change Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-7-paul@crapouillou.net commit e5507d2c01362b4953edb05dc84203be25eea737 Author: Paul Cercueil Date: Thu Jul 16 18:38:40 2020 +0200 drm/ingenic: Set DMA descriptor chain address in probe The address of the DMA descriptor never changes. It can therefore be set in the probe function. v2-v3: No change Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-6-paul@crapouillou.net commit 1f7596f4ad9b7fa68b2a27504036a1145d9c3cf1 Author: Paul Cercueil Date: Thu Jul 16 18:38:39 2020 +0200 drm/ingenic: Add missing CR in debug strings If you pass a string that is not terminated with a carriage return to dev_err(), it will eventually be printed with a carriage return, but not right away, since the kernel will wait for a pr_cont(). v2: New patch v3: No change Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-5-paul@crapouillou.net commit 54fe894219903e32f5154265f46ed1eb5cdc2f5f Author: Paul Cercueil Date: Thu Jul 16 18:38:38 2020 +0200 drm/ingenic: Rename ingenic-drm.c to ingenic-drm-drv.c Full rename without any modification, except to the Makefile. Renaming ingenic-drm.c to ingenic-drm-drv.c allow to decouple the module name from the source file name in the Makefile. This will be useful later when more source files are added. v2: New patch v3: No change Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-4-paul@crapouillou.net commit ba8989a6fd7a8a94e9740ad260f1dcc1831f9aeb Author: Paul Cercueil Date: Thu Jul 16 18:38:37 2020 +0200 dt-bindings: display: Add ingenic,ipu.yaml Add documentation of the Device Tree bindings for the Image Processing Unit (IPU) found in most Ingenic SoCs. v2: Add missing 'const' in items list v3: No change Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-3-paul@crapouillou.net commit c9390228245c06e7866896d6c1bd09601b8f8f4b Author: Paul Cercueil Date: Thu Jul 16 18:38:36 2020 +0200 dt-bindings: display: Convert ingenic,lcd.txt to YAML Convert the ingenic,lcd.txt to a new ingenic,lcd.yaml file. In the process, the new ingenic,jz4780-lcd compatible string has been added. v2: Add info about IPU at port@8 v3: No change Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-2-paul@crapouillou.net commit ca43f274e03f91c533643299ae4984965ce03205 Author: Paul Cercueil Date: Thu Jul 16 18:38:35 2020 +0200 drm/ingenic: Fix incorrect assumption about plane->index plane->index is NOT the index of the color plane in a YUV frame. Actually, a YUV frame is represented by a single drm_plane, even though it contains three Y, U, V planes. v2-v3: No change Cc: stable@vger.kernel.org # v5.3 Fixes: 90b86fcc47b4 ("DRM: Add KMS driver for the Ingenic JZ47xx SoCs") Signed-off-by: Paul Cercueil Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716163846.174790-1-paul@crapouillou.net commit 3b171194493c5f7b2aa9b76deb402a8e98ab510f Author: Shengjiu Wang Date: Wed Jul 15 22:09:39 2020 +0800 ASoC: fsl-asoc-card: Support Headphone and Microphone Jack detection Use asoc_simple_init_jack function from simple card to implement the Headphone and Microphone detection. Register notifier to disable Speaker when Headphone is plugged in and enable Speaker when Headphone is unplugged. Register notifier to disable Digital Microphone when Analog Microphone is plugged in and enable DMIC when Analog Microphone is unplugged. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1594822179-1849-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit c3c058aba4032a0f88a2f203472d7b5076a926b4 Author: Shengjiu Wang Date: Wed Jul 15 22:09:38 2020 +0800 ASoC: bindings: fsl-asoc-card: Support hp-det-gpio and mic-det-gpio Add headphone and microphone detection GPIO support. These properties are optional. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Acked-by: Rob Herring Link: https://lore.kernel.org/r/1594822179-1849-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 764aafdb985b182bce0c91503e9233cb97a2f0d7 Author: Shengjiu Wang Date: Wed Jul 15 22:09:37 2020 +0800 ASoC: simple-card-utils: Support configure pin_name for asoc_simple_init_jack Currently the pin_name is fixed in asoc_simple_init_jack, but some driver may use a different pin_name. So add a new parameter in asoc_simple_init_jack for configuring pin_name. If this parameter is NULL, then the default pin_name is used. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1594822179-1849-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 2d7865082dd0cff5777bf9c1f075d54f737cc2e3 Author: Lyude Paul Date: Mon Jun 29 18:36:25 2020 -0400 drm/nouveau/kms/nvd9-: Fix disabling CRCs alongside OR reprogramming While I had thought I'd tested this before, it looks like this one issue slipped by my original CRC patches. Basically, there seem to be a few rules we need to follow when sending CRC commands to the display controller: * CRCs cannot be both disabled and enabled for a single head in the same flush * If a head with CRC reporting enabled switches from one OR to another, there must be a flush before the OR is re-enabled regardless of the final state of CRC reporting. So, split nv50_crc_atomic_prepare_notifier_contexts() into two functions: * nv_crc_atomic_release_notifier_contexts() - checks whether the CRC notifier contexts were released successfully after the first flush * nv_crc_atomic_init_notifier_contexts() - prepares any CRC notifier contexts for use before enabling reporting Additionally, in order to force a flush when we re-assign ORs with heads that have CRCs enabled we split our atomic check function into two: * nv50_crc_atomic_check_head() - called from our heads' atomic checks, determines whether a state needs to set or clear CRC reporting * nv50_crc_atomic_check_outp() - called at the end of the atomic check after all ORs have been added to the atomic state, and sets nv50_atom->flush_disable if needed Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200629223635.103804-1-lyude@redhat.com commit 12885ecbfe62df4358d452080d3b8feef54ec8cb Author: Lyude Paul Date: Mon Oct 7 14:20:12 2019 -0400 drm/nouveau/kms/nvd9-: Add CRC support This introduces support for CRC readback on gf119+, using the documentation generously provided to us by Nvidia: https://github.com/NVIDIA/open-gpu-doc/blob/master/Display-CRC/display-crc.txt We expose all available CRC sources. SF, SOR, PIOR, and DAC are exposed through a single set of "outp" sources: outp-active/auto for a CRC of the scanout region, outp-complete for a CRC of both the scanout and blanking/sync region combined, and outp-inactive for a CRC of only the blanking/sync region. For each source, nouveau selects the appropriate tap point based on the output path in use. We also expose an "rg" source, which allows for capturing CRCs of the scanout raster before it's encoded into a video signal in the output path. This tap point is referred to as the raster generator. Note that while there's some other neat features that can be used with CRC capture on nvidia hardware, like capturing from two CRC sources simultaneously, I couldn't see any usecase for them and did not implement them. Nvidia only allows for accessing CRCs through a shared DMA region that we program through the core EVO/NvDisplay channel which is referred to as the notifier context. The notifier context is limited to either 255 (for Fermi-Pascal) or 2047 (Volta+) entries to store CRCs in, and unfortunately the hardware simply drops CRCs and reports an overflow once all available entries in the notifier context are filled. Since the DRM CRC API and igt-gpu-tools don't expect there to be a limit on how many CRCs can be captured, we work around this in nouveau by allocating two separate notifier contexts for each head instead of one. We schedule a vblank worker ahead of time so that once we start getting close to filling up all of the available entries in the notifier context, we can swap the currently used notifier context out with another pre-prepared notifier context in a manner similar to page flipping. Unfortunately, the hardware only allows us to this by flushing two separate updates on the core channel: one to release the current notifier context handle, and one to program the next notifier context's handle. When the hardware processes the first update, the CRC for the current frame is lost. However, the second update can be flushed immediately without waiting for the first to complete so that CRC generation resumes on the next frame. According to Nvidia's hardware engineers, there isn't any cleaner way of flipping notifier contexts that would avoid this. Since using vblank workers to swap out the notifier context will ensure we can usually flush both updates to hardware within the timespan of a single frame, we can also ensure that there will only be exactly one frame lost between the first and second update being executed by the hardware. This gives us the guarantee that we're always correctly matching each CRC entry with it's respective frame even after a context flip. And since IGT will retrieve the CRC entry for a frame by waiting until it receives a CRC for any subsequent frames, this doesn't cause an issue with any tests and is much simpler than trying to change the current DRM API to accommodate. In order to facilitate testing of correct handling of this limitation, we also expose a debugfs interface to manually control the threshold for when we start trying to flip the notifier context. We will use this in igt to trigger a context flip for testing purposes without needing to wait for the notifier to completely fill up. This threshold is reset to the default value set by nouveau after each capture, and is exposed in a separate folder within each CRTC's debugfs directory labelled "nv_crc". Changes since v1: * Forgot to finish saving crc.h before saving, whoops. This just adds some corrections to the empty function declarations that we use if CONFIG_DEBUG_FS isn't enabled. Changes since v2: * Don't check return code from debugfs_create_dir() or debugfs_create_file() - Greg K-H Changes since v3: (no functional changes) * Fix SPDX license identifiers (checkpatch) * s/uint32_t/u32/ (checkpatch) * Fix indenting in switch cases (checkpatch) Changes since v4: * Remove unneeded param changes with nv50_head_flush_clr/set * Rebase Changes since v5: * Remove set but unused variable (outp) in nv50_crc_atomic_check() - Kbuild bot Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200627194657.156514-10-lyude@redhat.com commit 0bc8ffe09771c182e652cb388293049b88797772 Author: Lyude Paul Date: Tue Jan 21 15:53:46 2020 -0500 drm/nouveau/kms/nv50-: Move hard-coded object handles into header While most of the functionality on Nvidia GPUs doesn't require using an explicit handle instead of the main VRAM handle + offset, there are a couple of places that do require explicit handles, such as CRC functionality. Since this means we're about to add another nouveau-chosen handle, let's just go ahead and move any hard-coded handles into a single header. This is just to keep things slightly organized, and to make it a little bit easier if we need to add more handles in the future. This patch should contain no functional changes. Changes since v3: * Correct SPDX license identifier (checkpatch) Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200627194657.156514-9-lyude@redhat.com commit ebec88472883791ea0bff1cf13b278db6b96afce Author: Lyude Paul Date: Fri Feb 7 14:10:46 2020 -0500 drm/nouveau/kms/nv50-: Expose nv50_outp_atom in disp.h In order to make sure that we flush disable updates at the right time when disabling CRCs, we'll need to be able to look at the outp state to see if we're changing it at the same time that we're disabling CRCs. So, expose the struct in disp.h. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200627194657.156514-8-lyude@redhat.com commit dbdaf719c63a32028a01a6dce7317d35e3e3ba50 Author: Lyude Paul Date: Thu Feb 6 14:37:36 2020 -0500 drm/nouveau/kms/nv140-: Track wndw mappings in nv50_head_atom While we're not quite ready yet to add support for flexible wndw mappings, we are going to need to at least keep track of the static wndw mappings we're currently using in each head's atomic state. We'll likely use this in the future to implement real flexible window mapping, but the primary reason we'll need this is for CRC support. See: on nvidia hardware, each CRC entry in the CRC notifier dma context has a "tag". This tag corresponds to the nth update on a specific EVO/NvDisplay channel, which itself is referred to as the "controlling channel". For gf119+ this can be the core channel, ovly channel, or base channel. Since we don't expose CRC entry tags to userspace, we simply ignore this feature and always use the core channel as the controlling channel. Simple. Things get a little bit more complicated on gv100+ though. GV100+ only lets us set the controlling channel to a specific wndw channel, and that wndw must be owned by the head that we're grabbing CRCs when we enable CRC generation. Thus, we always need to make sure that each atomic head state has at least one wndw that is mapped to the head, which will be used as the controlling channel. Note that since we don't have flexible wndw mappings yet, we don't expect to run into any scenarios yet where we'd have a head with no mapped wndws. When we do add support for flexible wndw mappings however, we'll need to make sure that we handle reprogramming CRC capture if our controlling wndw is moved to another head (and potentially reject the new head state entirely if we can't find another available wndw to replace it). With that being said, nouveau currently tracks wndw visibility on heads. It does not keep track of the actual ownership mappings, which are (currently) statically programmed. To fix this, we introduce another bitmask into nv50_head_atom.wndw to keep track of ownership separately from visibility. We then introduce a nv50_head callback to handle populating the wndw ownership map, and call it during the atomic check phase when core->assign_windows is set to true. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200627194657.156514-7-lyude@redhat.com commit fb2420b701edbf96c2b6d557f0139902f455dc2b Author: Lyude Paul Date: Tue Mar 17 14:54:06 2020 -0400 drm/nouveau/kms/nv50-: Fix disabling dithering While we expose the ability to turn off hardware dithering for nouveau, we actually make the mistake of turning it on anyway, due to dithering_depth containing a non-zero value if our dithering depth isn't also set to 6 bpc. So, fix it by never enabling dithering when it's disabled. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200627194657.156514-6-lyude@redhat.com commit 9c8e9b790de33914e674035203461cb75c727e98 Author: Lyude Paul Date: Fri Dec 13 17:06:59 2019 -0500 drm/nouveau/kms/nv140-: Don't modify depth in state during atomic commit Currently, we modify the depth value stored in the atomic state when performing a commit in order to workaround the fact we haven't implemented support for depths higher then 10 yet. This isn't idempotent though, as it will happen every atomic commit where we modify the OR state even if the head's depth in the atomic state hasn't been modified. Normally this wouldn't matter, since we don't modify OR state outside of modesets, but since the CRC capture region is implemented as part of the OR state in hardware we'll want to make sure all commits modifying OR state are idempotent so as to avoid changing the depth unexpectedly. So, fix this by simply not writing the reduced depth value we come up with to the atomic state. Signed-off-by: Lyude Paul Reviewed-by: Ben Skeggs Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200627194657.156514-5-lyude@redhat.com commit 5e6c2b4f916157e8f10d093d43e88b2a250d1774 Author: Lyude Paul Date: Fri Apr 17 15:33:13 2020 -0400 drm/vblank: Add vblank works Add some kind of vblank workers. The interface is similar to regular delayed works, and is mostly based off kthread_work. It allows for scheduling delayed works that execute once a particular vblank sequence has passed. It also allows for accurate flushing of scheduled vblank works - in that flushing waits for both the vblank sequence and job execution to complete, or for the work to get cancelled - whichever comes first. Whatever hardware programming we do in the work must be fast (must at least complete during the vblank or scanout period, sometimes during the first few scanlines of the vblank). As such we use a high-priority per-CRTC thread to accomplish this. Changes since v7: * Stuff drm_vblank_internal.h and drm_vblank_work_internal.h contents into drm_internal.h * Get rid of unnecessary spinlock in drm_crtc_vblank_on() * Remove !vblank->worker check * Grab vbl_lock in drm_vblank_work_schedule() * Mention self-rearming work items in drm_vblank_work_schedule() kdocs * Return 1 from drm_vblank_work_schedule() if the work was scheduled successfully, 0 or error code otherwise * Use drm_dbg_core() instead of DRM_DEV_ERROR() in drm_vblank_work_schedule() * Remove vblank->worker checks in drm_vblank_destroy_worker() and drm_vblank_flush_worker() Changes since v6: * Get rid of ->pending and seqcounts, and implement flushing through simpler means - danvet * Get rid of work_lock, just use drm_device->event_lock * Move drm_vblank_work item cleanup into drm_crtc_vblank_off() so that we ensure that all vblank work has finished before disabling vblanks * Add checks into drm_crtc_vblank_reset() so we yell if it gets called while there's vblank workers active * Grab event_lock in both drm_crtc_vblank_on()/drm_crtc_vblank_off(), the main reason for this is so that other threads calling drm_vblank_work_schedule() are blocked from attempting to schedule while we're in the middle of enabling/disabling vblanks. * Move drm_handle_vblank_works() call below drm_handle_vblank_events() * Simplify drm_vblank_work_cancel_sync() * Fix drm_vblank_work_cancel_sync() documentation * Move wake_up_all() calls out of spinlock where we can. The only one I left was the call to wake_up_all() in drm_vblank_handle_works() as this seemed like it made more sense just living in that function (which is all technically under lock) * Move drm_vblank_work related functions into their own source files * Add drm_vblank_internal.h so we can export some functions we don't want drivers using, but that we do need to use in drm_vblank_work.c * Add a bunch of documentation Changes since v4: * Get rid of kthread interfaces we tried adding and move all of the locking into drm_vblank.c. For implementing drm_vblank_work_flush(), we now use a wait_queue and sequence counters in order to differentiate between multiple work item executions. * Get rid of drm_vblank_work_cancel() - this would have been pretty difficult to actually reimplement and it occurred to me that neither nouveau or i915 are even planning to use this function. Since there's also no async cancel function for most of the work interfaces in the kernel, it seems a bit unnecessary anyway. * Get rid of to_drm_vblank_work() since we now are also able to just pass the struct drm_vblank_work to work item callbacks anyway Changes since v3: * Use our own spinlocks, don't integrate so tightly with kthread_works Changes since v2: * Use kthread_workers instead of reinventing the wheel. Cc: Tejun Heo Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Reviewed-by: Daniel Vetter Co-developed-by: Ville Syrjälä Signed-off-by: Lyude Paul Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200627194657.156514-4-lyude@redhat.com commit a7e3ad5fdc51b4795cb935282819996718c0d187 Author: Lyude Paul Date: Tue Jun 23 16:24:00 2020 -0400 drm/vblank: Use spin_(un)lock_irq() in drm_crtc_vblank_off() This got me confused for a bit while looking over this code: I had been planning on adding some blocking function calls into this function, but seeing the irqsave/irqrestore variants of spin_(un)lock() didn't make it very clear whether or not that would actually be safe. So I went ahead and reviewed every single driver in the kernel that uses this function, and they all fall into three categories: * Driver probe code * ->atomic_disable() callbacks * Legacy modesetting callbacks All of these will be guaranteed to have IRQs enabled, which means it's perfectly safe to block here. Just to make things a little less confusing to others in the future, let's switch over to spin_lock_irq()/spin_unlock_irq() to make that fact a little more obvious. Signed-off-by: Lyude Paul Reviewed-by: Daniel Vetter Cc: Ville Syrjälä Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200627194657.156514-3-lyude@redhat.com commit a7e5e06de22223e0a00f569ea8446243d5f58386 Author: Lyude Paul Date: Tue Apr 14 12:34:52 2020 -0400 drm/vblank: Register drmm cleanup action once per drm_vblank_crtc Since we'll be allocating resources for kthread_create_worker() in the next commit (which could fail and require us to clean up the mess), let's simplify the cleanup process a bit by registering a drm_vblank_init_release() action for each drm_vblank_crtc so they're still cleaned up if we fail to initialize one of them. Changes since v3: * Use drmm_add_action_or_reset() - Daniel Vetter Cc: Ville Syrjälä Cc: dri-devel@lists.freedesktop.org Cc: nouveau@lists.freedesktop.org Reviewed-by: Daniel Vetter Signed-off-by: Lyude Paul Acked-by: Dave Airlie Link: https://patchwork.freedesktop.org/patch/msgid/20200627194657.156514-2-lyude@redhat.com commit 50891431aaadf784980f8649d676327928bce72f Author: Kuninori Morimoto Date: Thu Jul 9 10:57:10 2020 +0900 ASoC: codecs: ak*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87pn95wiwa.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 03c0f1b5e1e01afdff8bca8ea6c599ff9a349ed6 Author: Kuninori Morimoto Date: Thu Jul 9 10:57:06 2020 +0900 ASoC: codecs: cs*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87r1tlwiwe.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f39c0540d6941b2390cea20f413b620adcc3be86 Author: Kuninori Morimoto Date: Thu Jul 9 10:57:02 2020 +0900 ASoC: codecs: da*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Reviewed-by: Adam Thomson Link: https://lore.kernel.org/r/87sge1wiwi.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8667d948a6185fcde88ebc89e090fa574a44c366 Author: Kuninori Morimoto Date: Thu Jul 9 10:56:57 2020 +0900 ASoC: codecs: es*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87tuyhwiwm.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 26d3c16e62e9f07b99d3886bec05effe5aadcbe5 Author: Kuninori Morimoto Date: Thu Jul 9 10:56:53 2020 +0900 ASoC: codecs: wm*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Acked-by: Charles Keepax Link: https://lore.kernel.org/r/87v9ixwiwr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4c66c2fc106f04899e778eec5f7a33a6fef4471e Author: Kuninori Morimoto Date: Thu Jul 9 10:56:48 2020 +0900 ASoC: codecs: alc*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87wo3dwiwv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 18e028e22ebfe362656f534c540d7b3c6c094bd0 Author: Kuninori Morimoto Date: Thu Jul 9 10:56:44 2020 +0900 ASoC: codecs: max*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87y2ntwix0.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1eb2c43d26a585bbbe196360e921c5ffe9d00fd1 Author: Kuninori Morimoto Date: Thu Jul 9 10:56:39 2020 +0900 ASoC: codecs: pcm*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87zh89wix5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bd63ed76890f38246a42cee715a437774bedf70b Author: Kuninori Morimoto Date: Thu Jul 9 10:56:35 2020 +0900 ASoC: codecs: ssm*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/871rllxxhp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 38803ce7b53bd7588e8ad899a73fe21e8741723b Author: Kuninori Morimoto Date: Thu Jul 9 10:56:30 2020 +0900 ASoC: codecs: tas*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/873661xxhu.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 960af79d31495b81bf9406f2f1fda425cb49342b Author: Kuninori Morimoto Date: Thu Jul 9 10:56:25 2020 +0900 ASoC: codecs: tlv*: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/874kqhxxhz.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 54b5927067dd79b58032a4938ee13b233f1a368c Author: Kuninori Morimoto Date: Thu Jul 9 10:56:20 2020 +0900 ASoC: codecs: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/875zaxxxi4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f795ff78e266492a5278cbef89d3422bdcf591b0 Author: Kuninori Morimoto Date: Thu Jul 9 10:56:10 2020 +0900 ASoC: meson: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/878sftxxie.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1ff123965bd00f1aacbd4549b03a6a5b98432eaf Author: Kuninori Morimoto Date: Thu Jul 9 10:56:05 2020 +0900 ASoC: spear: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87a709xxij.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 059374fe9ea5dd1e5a1d6b14741baf994dbc8dd2 Author: Kuninori Morimoto Date: Thu Jul 9 10:55:59 2020 +0900 ASoC: ti: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87blkpxxip.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d789710fb248df0c2279a785c7b9beb313629c0a Author: Kuninori Morimoto Date: Thu Jul 9 10:55:45 2020 +0900 ASoC: hdmi-codec: merge .digital_mute() into .mute_stream() snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } For hdmi-codec, we need to update struct hdmi_codec_ops, and all its users in the same time. Signed-off-by: Kuninori Morimoto Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/87d055xxj2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 350d993510115e3d9e78f1b3359bff7b68e88418 Author: Kuninori Morimoto Date: Thu Jul 9 10:55:41 2020 +0900 ASoC: soc-dai.c: add .no_capture_mute support snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling "direction". We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } To prepare merging mute_stream()/digital_mute(), this patch adds .no_capture_mute support to emulate .digital_mute(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eeplxxj7.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e07e49c0d1e3693facf588142c4cbde45904b3f8 Author: Kuninori Morimoto Date: Thu Jul 9 10:55:36 2020 +0900 ASoC: hdmi-codec: return -ENOTSUPP for digital_mute snd_soc_dai_digital_mute() will return -ENOTSUPP if driver doesn't support mute. In hdmi-codec case, hdmi_codec_digital_mute() will be used for it, and each driver has .digital_mute() callback. hdmi_codec_digital_mute() want to return -ENOTSUPP to follow it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87fta1xxjc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a9232dc5607dbada801f2fe83ea307cda762969a Author: Alexey Dobriyan Date: Sat Jul 11 17:59:54 2020 +0300 rwsem: fix commas in initialisation Leading comma prevents arbitrary reordering of initialisation clauses. The whole point of C99 initialisation is to allow any such reordering. Signed-off-by: Alexey Dobriyan Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200711145954.GA1178171@localhost.localdomain commit 482cbb6cc33dca60091048631cd0a8dde72c3da7 Author: Alexander A. Klimov Date: Mon Jul 13 13:57:28 2020 +0200 docs: locking: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200713115728.33905-1-grandmaster@al2klimov.de commit 5be542e945cb39a2457aa2cfe8b84aac95ef0f2d Author: Herbert Xu Date: Thu Jul 16 16:36:50 2020 +1000 lockdep: Move list.h inclusion into lockdep.h Currently lockdep_types.h includes list.h without actually using any of its macros or functions. All it needs are the type definitions which were moved into types.h long ago. This potentially causes inclusion loops because both are included by many core header files. This patch moves the list.h inclusion into lockdep.h. Note that we could probably remove it completely but that could potentially result in compile failures should any end users not include list.h directly and also be unlucky enough to not get list.h via some other header file. Reported-by: Petr Mladek Signed-off-by: Herbert Xu Signed-off-by: Peter Zijlstra (Intel) Tested-by: Petr Mladek Link: https://lkml.kernel.org/r/20200716063649.GA23065@gondor.apana.org.au commit 39a85f6d91a1a827985ce44a346a99f68167d0ee Merge: 0e9aa96859edc cd894e274b74b Author: Arnd Bergmann Date: Thu Jul 16 22:37:43 2020 +0200 Merge tag 'v5.8-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt mt8173: - update dmips for Cortex A53 mt8183: - add pericfg - fix unit names - add nodes for USB support - add basic support for Lenovo IdeaPad Duet 10.1" Chromebook * tag 'v5.8-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: dts: mt8183: Add krane-sku176 board arm64: dts: mt8183: Add USB3.0 support arm64: dts: mt8183-evb: Fix unit name warnings arm64: dts: mt8183: Fix unit name warnings arm64: dts: mt8183: Add MediaTek's peripheral configuration controller arm64: dts: mt6358: Add the compatible for the regulators dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-krane-sku176 arm64: dts: mt8173: Re-measure capacity-dmips-mhz Link: https://lore.kernel.org/r/0b7109c7-7bd2-7373-6032-e9a452d2ebc9@gmail.com Signed-off-by: Arnd Bergmann commit 0e9aa96859edcb7eb77f31ba86357899310d7c9e Merge: 32ed5880aef52 75f66813e081d Author: Arnd Bergmann Date: Thu Jul 16 22:36:35 2020 +0200 Merge tag 'omap-for-v5.9/dt-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt More dts changes for omaps for v5.9 A series of changes to configure IPU and DSP remoteproc for omap4 & 5. And a change to configure the default mux for am335x-pocketbeagle, and a change to use https for external links. * tag 'omap-for-v5.9/dt-pt2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: Replace HTTP links with HTTPS ones: OMAP DEVICE TREE SUPPORT ARM: dts: omap5-uevm: Add watchdog timers for IPU and DSP ARM: dts: omap4-panda-common: Add watchdog timers for IPU and DSP ARM: dts: omap5-uevm: Add system timers to DSP and IPU ARM: dts: omap5-uevm: Add CMA pools and enable IPU & DSP ARM: dts: omap5: Add aliases for rproc nodes ARM: dts: omap5: Add DSP and IPU nodes ARM: dts: omap4-panda-common:: Add system timers to DSP and IPU ARM: dts: omap4-panda-common: Add CMA pools and enable IPU & DSP ARM: dts: omap4: Add aliases for rproc nodes ARM: dts: omap4: Add IPU DT node ARM: dts: omap4: Update the DSP node ARM: dts: omap5: Add timer_sys_ck clocks for timers ARM: dts: omap4: Add timer_sys_ck clocks for timers ARM: dts: am335x-pocketbeagle: set default mux for gpio pins Link: https://lore.kernel.org/r/pull-1594838111-649880@atomide.com-3 Signed-off-by: Arnd Bergmann commit 32ed5880aef521f7189b10eae7370ebdc55a0fbd Merge: 42027dfe59c06 cca3f3e6f91c2 Author: Arnd Bergmann Date: Thu Jul 16 22:13:53 2020 +0200 Merge tag 'omap-for-v5.9/ti-sysc-drop-pdata-take2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Drop more legacy platform data for omaps for v5.9 A series of changes to drop remaining USB platform data for omap4/5, and am4, and dra7. And a patch to drop AES platform data for omap3. * tag 'omap-for-v5.9/ti-sysc-drop-pdata-take2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: Drop legacy platform data for omap5 usb host ARM: OMAP2+: Drop legacy platform data for omap4 usb ARM: OMAP2+: Drop legacy platform data for dra7 dwc3 ARM: OMAP2+: Drop legacy platform data for omap5 dwc3 ARM: OMAP2+: Drop legacy platform data for am4 dwc3 bus: ti-sysc: Add missing quirk flags for usb_host_hs ARM: dts: omap3: Migrate AES from hwmods to sysc-omap2 Link: https://lore.kernel.org/r/pull-1594838111-649880@atomide.com-2 Signed-off-by: Arnd Bergmann commit 9410113fc3f32f3cf7211fa66111e156681cf1f6 Author: Alexander A. Klimov Date: Mon Jul 13 14:39:13 2020 +0200 drm/tidss: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Jyri Sarha Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200713123913.34205-1-grandmaster@al2klimov.de commit 7247e1f1b02f3c1e675ac7f850124f4c097c473b Merge: 409d01fb83162 7de796cac48c0 Author: Arnd Bergmann Date: Thu Jul 16 22:12:49 2020 +0200 Merge tag 'v5.8-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers add new functions to cmdq helper functions - assign value to register - export finalize function and don't call explicitely from flush async - set specific event * tag 'v5.8-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: cmdq: add set event function soc: mediatek: cmdq: export finalize function soc: mediatek: cmdq: add assign function Link: https://lore.kernel.org/r/01399fb4-b2d0-e41b-dfd9-f2deba0ef651@gmail.com Signed-off-by: Arnd Bergmann commit d713b771b748a8b817e6ce58e2be523554b8d898 Author: Alexander A. Klimov Date: Mon Jul 13 14:49:23 2020 +0200 drm/vboxvideo: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200713124923.34282-1-grandmaster@al2klimov.de commit fb4ae31614d56e6c3eb3b45f1ef273f7e7382740 Merge: f1a0a9948f717 e9dbebaf9b9de Author: Arnd Bergmann Date: Thu Jul 16 22:12:23 2020 +0200 Merge tag 'omap-for-v5.9/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc SoC changes for omaps for v5.9 merge window Just one commit to use https for the external links. * tag 'omap-for-v5.9/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP: Replace HTTP links with HTTPS ones Link: https://lore.kernel.org/r/pull-1594838111-649880@atomide.com Signed-off-by: Arnd Bergmann commit 95ce82ac3c476688e3cf81ab04f9c5ac0a31e5ae Author: Kai Vehmanen Date: Wed Jul 15 20:45:51 2020 +0300 ALSA: hda: fix snd_hda_codec_cleanup() documentation Fix a copy and paste error in snd_hda_codec_cleanup() documentation. Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200715174551.3730165-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit cc1d0cd817bad5dab50732a6668a87ff3eac3b5c Author: Kai Vehmanen Date: Wed Jul 15 20:45:50 2020 +0300 ALSA: hda: export snd_hda_codec_cleanup_for_unbind() To avoid duplicated code for cleanup, and match the already exported snd_hda_codec_pcm_new(), also export snd_hda_codec_cleanup_for_unbind(). Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20200715174551.3730165-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 89e35f66d552c98c1cfee4a058de158d7f21796a Author: Vladimir Oltean Date: Mon Jul 13 00:28:33 2020 +0300 net: mscc: ocelot: rethink Kconfig dependencies again Having the users of MSCC_OCELOT_SWITCH_LIB depend on REGMAP_MMIO was a bad idea, since that symbol is not user-selectable. So we should have kept a 'select REGMAP_MMIO'. When we do that, we run into 2 more problems: - By depending on GENERIC_PHY, we are causing a recursive dependency. But it looks like GENERIC_PHY has no other dependencies, and other drivers select it, so we can select it too: drivers/of/Kconfig:69:error: recursive dependency detected! drivers/of/Kconfig:69: symbol OF_IRQ depends on IRQ_DOMAIN kernel/irq/Kconfig:68: symbol IRQ_DOMAIN is selected by REGMAP drivers/base/regmap/Kconfig:7: symbol REGMAP default is visible depending on REGMAP_MMIO drivers/base/regmap/Kconfig:39: symbol REGMAP_MMIO is selected by MSCC_OCELOT_SWITCH_LIB drivers/net/ethernet/mscc/Kconfig:15: symbol MSCC_OCELOT_SWITCH_LIB is selected by MSCC_OCELOT_SWITCH drivers/net/ethernet/mscc/Kconfig:22: symbol MSCC_OCELOT_SWITCH depends on GENERIC_PHY drivers/phy/Kconfig:8: symbol GENERIC_PHY is selected by PHY_BCM_NS_USB3 drivers/phy/broadcom/Kconfig:41: symbol PHY_BCM_NS_USB3 depends on MDIO_BUS drivers/net/phy/Kconfig:13: symbol MDIO_BUS depends on MDIO_DEVICE drivers/net/phy/Kconfig:6: symbol MDIO_DEVICE is selected by PHYLIB drivers/net/phy/Kconfig:254: symbol PHYLIB is selected by ARC_EMAC_CORE drivers/net/ethernet/arc/Kconfig:19: symbol ARC_EMAC_CORE is selected by ARC_EMAC drivers/net/ethernet/arc/Kconfig:25: symbol ARC_EMAC depends on OF_IRQ - By depending on PHYLIB, we are causing a recursive dependency. PHYLIB only has a single dependency, "depends on NETDEVICES", which we are already depending on, so we can again hack our way into conformance by turning the PHYLIB dependency into a select. drivers/of/Kconfig:69:error: recursive dependency detected! drivers/of/Kconfig:69: symbol OF_IRQ depends on IRQ_DOMAIN kernel/irq/Kconfig:68: symbol IRQ_DOMAIN is selected by REGMAP drivers/base/regmap/Kconfig:7: symbol REGMAP default is visible depending on REGMAP_MMIO drivers/base/regmap/Kconfig:39: symbol REGMAP_MMIO is selected by MSCC_OCELOT_SWITCH_LIB drivers/net/ethernet/mscc/Kconfig:15: symbol MSCC_OCELOT_SWITCH_LIB is selected by MSCC_OCELOT_SWITCH drivers/net/ethernet/mscc/Kconfig:22: symbol MSCC_OCELOT_SWITCH depends on PHYLIB drivers/net/phy/Kconfig:254: symbol PHYLIB is selected by ARC_EMAC_CORE drivers/net/ethernet/arc/Kconfig:19: symbol ARC_EMAC_CORE is selected by ARC_EMAC drivers/net/ethernet/arc/Kconfig:25: symbol ARC_EMAC depends on OF_IRQ Fixes: f4d0323bae4e ("net: mscc: ocelot: convert MSCC_OCELOT_SWITCH into a library") Signed-off-by: Vladimir Oltean Signed-off-by: Jakub Kicinski commit 63a0895d960aa3d3653ef0ecad5bd8579388f14b Author: Kees Cook Date: Wed Jun 3 13:09:38 2020 -0700 compiler: Remove uninitialized_var() macro Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As recommended[2] by[3] Linus[4], remove the macro. With the recent change to disable -Wmaybe-uninitialized in v5.7 in commit 78a5255ffb6a ("Stop the ad-hoc games with -Wno-maybe-initialized"), this is likely the best time to make this treewide change. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Suggested-by: Linus Torvalds Reviewed-by: Bart van Assche Reviewed-by: Miguel Ojeda Tested-by: Nathan Chancellor Tested-by: Sedat Dilek Signed-off-by: Kees Cook commit 3f649ab728cda8038259d8f14492fe400fbab911 Author: Kees Cook Date: Wed Jun 3 13:09:38 2020 -0700 treewide: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. In preparation for removing[2] the[3] macro[4], remove all remaining needless uses with the following script: git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \ xargs perl -pi -e \ 's/\buninitialized_var\(([^\)]+)\)/\1/g; s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;' drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid pathological white-space. No outstanding warnings were found building allmodconfig with GCC 9.3.0 for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64, alpha, and m68k. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Reviewed-by: Leon Romanovsky # drivers/infiniband and mlx4/mlx5 Acked-by: Jason Gunthorpe # IB Acked-by: Kalle Valo # wireless drivers Reviewed-by: Chao Yu # erofs Signed-off-by: Kees Cook commit d8b44b58a7073b4d74b3394131eb449e8469396b Author: Kees Cook Date: Wed Jun 3 14:18:09 2020 -0700 checkpatch: Remove awareness of uninitialized_var() macro Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. In preparation for removing[2] the[3] macro[4], partially revert commit 16b7f3c89907 ("checkpatch: avoid warning about uninitialized_var()") and remove all remaining mentions of uninitialized_var(). [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Signed-off-by: Kees Cook commit fea1120c56e2d5db1cfea67d455edea3f4f97947 Author: Kees Cook Date: Wed Jun 3 13:28:45 2020 -0700 mm/debug_vm_pgtable: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just initialize this variable to NULL. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: 399145f9eb6c ("mm/debug: add tests validating architecture page table helpers") Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook commit 4df7a75f690a2651d766cc45d442824b955f9e4b Author: Jason Yan Date: Mon Jun 15 16:51:32 2020 +0800 f2fs: Eliminate usage of uninitialized_var() macro This is an effort to eliminate the uninitialized_var() macro[1]. The use of this macro is the wrong solution because it forces off ANY analysis by the compiler for a given variable. It even masks "unused variable" warnings. Quoted from Linus[2]: "It's a horrible thing to use, in that it adds extra cruft to the source code, and then shuts up a compiler warning (even the _reliable_ warnings from gcc)." Fix it by remove this variable since it is not needed at all. [1] https://github.com/KSPP/linux/issues/81 [2] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Suggested-by: Chao Yu Signed-off-by: Jason Yan Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20200615085132.166470-1-yanaijie@huawei.com Signed-off-by: Kees Cook commit 4a2b958b1fb31144a48d261c98885b1e02e1af0e Author: Kees Cook Date: Wed Jun 3 13:28:45 2020 -0700 media: sur40: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just remove this variable since it was actually unused: drivers/input/touchscreen/sur40.c:459:6: warning: variable 'packet_id' set but not used [-Wunused-but-set-variable] 459 | u32 packet_id; | ^~~~~~~~~ However, in keeping with the documentation desires outlined in commit 335abaea7a27 ("Input: sur40 - silence unnecessary noisy debug output"), comment out the assignment instead of removing it. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: 335abaea7a27 ("Input: sur40 - silence unnecessary noisy debug output") Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook commit 1ef79040a57faa808416d6c7554babafbc34e69f Author: Kees Cook Date: Wed Jun 3 13:28:45 2020 -0700 KVM: PPC: Book3S PR: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just remove this variable since it was actually unused: arch/powerpc/kvm/book3s_pr.c:1832:16: warning: unused variable 'vrsave' [-Wunused-variable] unsigned long vrsave; ^ [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Suggested-by: Nathan Chancellor Fixes: f05ed4d56e9c ("KVM: PPC: Split out code from book3s.c into book3s_pr.c") Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook commit fec61ff40b9e2a2439332eaca498aebe4eb5e056 Author: Kees Cook Date: Mon Jun 15 12:13:00 2020 -0700 clk: spear: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], initialize "i" to zero. The compiler warning was not a false positive, since clk_pll_set_rate()'s call to clk_pll_round_rate_index() will always fail (since "prate" is NULL), so "i" was never being initialized. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: 7d4998f71b29 ("clk: SPEAr: Vco-pll: Fix compilation warning") Acked-by: Stephen Boyd Signed-off-by: Kees Cook commit 14dd1c3af6ce73adc1bb322e6297a26d8b668942 Author: Kees Cook Date: Wed Jun 3 13:28:45 2020 -0700 clk: st: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just remove this variable since it was actually unused: drivers/clk/st/clkgen-fsyn.c: In function ‘quadfs_set_rate’: drivers/clk/st/clkgen-fsyn.c:793:6: warning: unused variable ‘i’ [-Wunused-variable] 793 | int i; | ^ [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: 5f7aa9071e93 ("clk: st: Support for QUADFS inside ClockGenB/C/D/E/F") Acked-by: Stephen Boyd Signed-off-by: Kees Cook commit 098c9db4767095a20ae3ab78a186eb1ae097a5c1 Author: Kees Cook Date: Wed Jun 3 13:28:45 2020 -0700 spi: davinci: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just remove this variable since it was actually unused: drivers/spi/spi-davinci.c: In function ‘davinci_spi_bufs’: drivers/spi/spi-davinci.c:579:11: warning: unused variable ‘rx_buf_count’ [-Wunused-variable] 579 | unsigned rx_buf_count; | ^~~~~~~~~~~~ [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: 048177ce3b39 ("spi: spi-davinci: convert to DMA engine API") Reviewed-by: Nick Desaulniers Acked-by: Mark Brown Signed-off-by: Kees Cook commit eecd48c84f0e641a69ec96c9780894d5702f856b Author: Kees Cook Date: Wed Jun 3 13:28:45 2020 -0700 ide: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just remove this variable since it was actually unused: drivers/ide/ide-taskfile.c:232:34: warning: unused variable 'flags' [-Wunused-variable] unsigned long uninitialized_var(flags); ^ [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: ce1e518190ea ("ide: don't disable interrupts during kmap_atomic()") Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook commit b898ef6d15c04ac5ba453c1b3500b7420e73655a Author: Kees Cook Date: Wed Jun 3 13:28:45 2020 -0700 rtlwifi: rtl8192cu: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just initialize this variable to NULL, and avoid sending garbage by returning. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: dc0313f46664 ("rtlwifi: rtl8192cu: Add routine hw") Reviewed-by: Nick Desaulniers Acked-by: Kalle Valo Signed-off-by: Kees Cook commit e909ec10186ad5cf4ecd19d0b8cf6fd96f467e58 Author: Kees Cook Date: Wed Jun 3 13:28:45 2020 -0700 b43: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just initialize this variable to NULL. No later NULL deref is possible due to the early returns outside of the (phy->rev >= 7 && phy->rev < 19) case, which explicitly tests for NULL. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: 58619b14d106 ("b43: move under broadcom vendor directory") Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook commit 805cdb8bc6da87818fe3b27798a5031b54ed7b20 Author: Kees Cook Date: Wed Jun 3 13:28:45 2020 -0700 drbd: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just initialize this variable to NULL. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: a29728463b25 ("drbd: Backport the "events2" command") Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook commit aecfd220b223043475fa515aa563249f683fcd04 Author: Kees Cook Date: Wed Jun 3 13:28:45 2020 -0700 x86/mm/numa: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], refactor code to avoid its need. The original reason for its use here was to work around the #ifdef being the only place the variable was used. This is better expressed using IS_ENABLED() and a new code block where the variable can be used unconditionally. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: 1e01979c8f50 ("x86, numa: Implement pfn -> nid mapping granularity check") Signed-off-by: Kees Cook commit 4b19bec97c882da09f7fd600895e0df1534a58dc Author: Kees Cook Date: Mon Jun 15 12:06:11 2020 -0700 docs: deprecated.rst: Add uninitialized_var() Nothing should be using this macro, and the entire idea of tricking the compiler into silencing such warnings is a mistake. Cc: Jonathan Corbet Cc: "Gustavo A. R. Silva" Cc: Joe Perches Cc: linux-doc@vger.kernel.org Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook commit 5f0b2a6093a4d9aab093964c65083fe801ef1e58 Author: Mikhail Malygin Date: Thu Jul 16 22:03:41 2020 +0300 RDMA/rxe: Prevent access to wr->next ptr afrer wr is posted to send queue rxe_post_send_kernel() iterates over linked list of wr's, until the wr->next ptr is NULL. However if we've got an interrupt after last wr is posted, control may be returned to the code after send completion callback is executed and wr memory is freed. As a result, wr->next pointer may contain incorrect value leading to panic. Store the wr->next on the stack before posting it. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200716190340.23453-1-m.malygin@yadro.com Signed-off-by: Mikhail Malygin Signed-off-by: Sergey Kojushev Signed-off-by: Jason Gunthorpe commit f7dcfea3c6d5715b889adf61b78ddee80008682d Author: Tiezhu Yang Date: Thu Jul 16 11:16:30 2020 +0800 dt-bindings: interrupt-controller: Fix typos in loongson,liointc.yaml Fix the following typos in loongson,liointc.yaml: children -> child fron -> from connected -> connect it's -> its Fixes: b6280c8bb6f5 ("dt-bindings: interrupt-controller: Add Loongson LIOINTC") Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1594869390-21053-9-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Rob Herring commit eb7f84e379daad69b4c92538baeaf93bbf493c14 Author: Michal Kalderon Date: Tue Jul 7 09:31:00 2020 +0300 RDMA/qedr: Add EDPM max size to alloc ucontext response User space should receive the maximum edpm size from kernel driver, similar to other edpm/ldpm related limits. Add an additional parameter to the alloc_ucontext_resp structure for the edpm maximum size. In addition, pass an indication from user-space to kernel (and not just kernel to user) that the DPM sizes are supported. This is for supporting backward-forward compatibility between driver and lib for everything related to DPM transaction and limit sizes. This should have been part of commit mentioned in Fixes tag. Link: https://lore.kernel.org/r/20200707063100.3811-3-michal.kalderon@marvell.com Fixes: 93a3d05f9d68 ("RDMA/qedr: Add kernel capability flags for dpm enabled mode") Signed-off-by: Ariel Elior Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit bbe4f4245271bd0f21bf826996c0c5d87a3529c9 Author: Michal Kalderon Date: Tue Jul 7 09:30:59 2020 +0300 RDMA/qedr: Add EDPM mode type for user-fw compatibility In older FW versions the completion flag was treated as the ack flag in edpm messages. commit ff937b916eb6 ("qed: Add EDPM mode type for user-fw compatibility") exposed the FW option of setting which mode the QP is in by adding a flag to the qedr <-> qed API. This patch adds the qedr <-> libqedr interface so that the libqedr can set the flag appropriately and qedr can pass it down to FW. Flag is added for backward compatibility with libqedr. For older libs, this flag didn't exist and therefore set to zero. Fixes: ac1b36e55a51 ("qedr: Add support for user context verbs") Link: https://lore.kernel.org/r/20200707063100.3811-2-michal.kalderon@marvell.com Signed-off-by: Yuval Bason Signed-off-by: Michal Kalderon Signed-off-by: Jason Gunthorpe commit bfdfa51702dec67e9fcd52568b4cf3c7f799db8b Author: Randy Dunlap Date: Wed Jul 15 18:29:11 2020 -0700 bpf: Drop duplicated words in uapi helper comments Drop doubled words "will" and "attach". Signed-off-by: Randy Dunlap Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/6b9f71ae-4f8e-0259-2c5d-187ddaefe6eb@infradead.org commit e81e7a533742c30615f8b15390df6525cef96778 Author: Stanislav Fomichev Date: Wed Jul 15 15:41:07 2020 -0700 selftests/bpf: Fix possible hang in sockopt_inherit Andrii reported that sockopt_inherit occasionally hangs up on 5.5 kernel [0]. This can happen if server_thread runs faster than the main thread. In that case, pthread_cond_wait will wait forever because pthread_cond_signal was executed before the main thread was blocking. Let's move pthread_mutex_lock up a bit to make sure server_thread runs strictly after the main thread goes to sleep. (Not sure why this is 5.5 specific, maybe scheduling is less deterministic? But I was able to confirm that it does indeed happen in a VM.) [0] https://lore.kernel.org/bpf/CAEf4BzY0-bVNHmCkMFPgObs=isUAyg-dFzGDY7QWYkmm7rmTSg@mail.gmail.com/ Reported-by: Andrii Nakryiko Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200715224107.3591967-1-sdf@google.com commit de40a8abf07bfa125b7496b20ce6f92c6370eecd Author: Seth Forshee Date: Thu Jul 16 09:39:31 2020 -0500 bpf: revert "test_bpf: Flag tests that cannot be jited on s390" This reverts commit 3203c9010060 ("test_bpf: flag tests that cannot be jited on s390"). The s390 bpf JIT previously had a restriction on the maximum program size, which required some tests in test_bpf to be flagged as expected failures. The program size limitation has been removed, and the tests now pass, so these tests should no longer be flagged. Fixes: d1242b10ff03 ("s390/bpf: Remove JITed image size limitations") Signed-off-by: Seth Forshee Signed-off-by: Daniel Borkmann Reviewed-by: Ilya Leoshkevich Link: https://lore.kernel.org/bpf/20200716143931.330122-1-seth.forshee@canonical.com commit 3e9fed7fb63366ae125355b98653ed1c907ed85d Author: Christophe JAILLET Date: Sat Jul 11 09:31:20 2020 +0200 RDMA/usnic: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script bellow. It has been compile tested. When memory is allocated, GFP_ATOMIC should be used to be consistent with the surrounding code. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Link: https://lore.kernel.org/r/20200711073120.249146-1-christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Jason Gunthorpe commit 632ca50f2cbd8809a2fc1934b4b2c9c49bd55e98 Author: John Ogness Date: Tue Jul 7 17:28:04 2020 +0206 af_packet: TPACKET_V3: replace busy-wait loop A busy-wait loop is used to implement waiting for bits to be copied from the skb to the kernel buffer before retiring a block. This is a problem on PREEMPT_RT because the copying task could be preempted by the busy-waiting task and thus live lock in the busy-wait loop. Replace the busy-wait logic with an rwlock_t. This provides lockdep coverage and makes the code RT ready. Signed-off-by: John Ogness Signed-off-by: Jakub Kicinski commit 69ce97f2329ffdda850f9eabc3dba2c4f88a0848 Merge: 78d15eea088c6 f65e1311e9c6c Author: Andy Shevchenko Date: Thu Jul 16 21:38:58 2020 +0300 Merge branch 'for-next' Merge branch 'for-next' of https://github.com/spandruvada/linux-kernel.git to update Intel SST tools. Signed-off-by: Andy Shevchenko commit 999cf8aeb6c9d4019659efe85ce0594808d071a6 Merge: 59632b220f2d6 31bb1a560b299 Author: Jakub Kicinski Date: Thu Jul 16 11:32:24 2020 -0700 Merge branch 'net-fec-a-few-improvements' Sergey Organov says: ==================== net: fec: a few improvements This is a collection of simple improvements that reduce and/or simplify code. They got developed out of attempt to use DP83640 PTP PHY connected to built-in FEC (that has its own PTP support) of the iMX 6SX micro-controller. The primary bug-fix was now submitted separately, and this is the rest of the changes. NOTE: the patches are developed and tested on 4.9.146, and rebased on top of recent 'net-next/master', where, besides visual inspection, I only tested that they do compile. ==================== Signed-off-by: Jakub Kicinski commit 31bb1a560b2996f9953cfc232f6349d043aaab49 Author: Sergey Organov Date: Wed Jul 15 18:43:00 2020 +0300 net: fec: replace snprintf() with strlcpy() in fec_ptp_init() No need to use snprintf() on a constant string, nor using magic constant in the fixed code was a good idea. Signed-off-by: Sergey Organov Acked-by: Fugang Duan Signed-off-by: Jakub Kicinski commit 2b803088865e459beffa1d153ad59db72d1c726a Author: Sergey Organov Date: Wed Jul 15 18:42:59 2020 +0300 net: fec: get rid of redundant code in fec_ptp_set() Code of the form "if(x) x = 0" replaced with "x = 0". Code of the form "if(x == a) x = a" removed. Signed-off-by: Sergey Organov Acked-by: Fugang Duan Signed-off-by: Jakub Kicinski commit 199560343e9dac0e5f9e54307de767ef3fc781f4 Author: Sergey Organov Date: Wed Jul 15 18:42:58 2020 +0300 net: fec: initialize clock with 0 rather than current kernel time Initializing with 0 makes it much easier to identify time stamps from otherwise uninitialized clock. Initialization of PTP clock with current kernel time makes little sense as PTP time scale differs from UTC time scale that kernel time represents. It only leads to confusion when no actual PTP initialization happens, as these time scales differ in a small integer number of seconds (37 at the time of writing.) Signed-off-by: Sergey Organov Acked-by: Fugang Duan Signed-off-by: Jakub Kicinski commit e53a57e56fce787ee4d02ffc2cf9ba46f0173f58 Author: Sergey Organov Date: Wed Jul 15 18:42:57 2020 +0300 net: fec: enable to use PPS feature without time stamping PPS feature could be useful even when hardware time stamping of network packets is not in use, so remove offending check for this condition from fec_ptp_enable_pps(). Signed-off-by: Sergey Organov Acked-by: Fugang Duan Signed-off-by: Jakub Kicinski commit 535ee8cdbcf8c570eccdfe9f8821ddda75fcaaff Author: Gustavo A. R. Silva Date: Thu Jul 9 18:52:50 2020 -0500 IB/hfi1: Remove unnecessary fall-through markings Reorganize the code a bit in a more standard way[1] and remove unnecessary fall-through markings. [1] https://lore.kernel.org/lkml/20200708054703.GR207186@unreal/ Link: https://lore.kernel.org/r/20200709235250.GA26678@embeddedor Signed-off-by: Gustavo A. R. Silva Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit acca72e2b031b9fbb4184511072bd246a0abcebc Author: Yuval Basson Date: Wed Jul 8 22:55:26 2020 +0300 RDMA/qedr: SRQ's bug fixes QP's with the same SRQ, working on different CQs and running in parallel on different CPUs could lead to a race when maintaining the SRQ consumer count, and leads to FW running out of SRQs. Update the consumer atomically. Make sure the wqe_prod is updated after the sge_prod due to FW requirements. Fixes: 3491c9e799fb ("qedr: Add support for kernel mode SRQ's") Link: https://lore.kernel.org/r/20200708195526.31040-1-ybason@marvell.com Signed-off-by: Michal Kalderon Signed-off-by: Yuval Basson Signed-off-by: Jason Gunthorpe commit 317000b926b07c07e7f6c4032bd3344639f5eb4c Author: Max Gurtovoy Date: Wed Jul 8 12:19:08 2020 +0300 IB/isert: allocate RW ctxs according to max IO size Current iSER target code allocates MR pool budget based on queue size. Since there is no handshake between iSER initiator and target on max IO size, we'll set the iSER target to support upto 16MiB IO operations and allocate the correct number of RDMA ctxs according to the factor of MR's per IO operation. This would guarantee sufficient size of the MR pool for the required IO queue depth and IO size. Link: https://lore.kernel.org/r/20200708091908.162263-1-maxg@mellanox.com Reported-by: Krishnamraju Eraparaju Tested-by: Krishnamraju Eraparaju Signed-off-by: Max Gurtovoy Acked-by: Sagi Grimberg Signed-off-by: Jason Gunthorpe commit f65e1311e9c6c69bb886bd3333577f85d9eeddbc Author: Srinivas Pandruvada Date: Wed Jul 1 14:41:47 2020 -0700 tools/power/x86/intel-speed-select: Update version for v5.9 Update version for changes released with v5.9 kernel release. Signed-off-by: Srinivas Pandruvada commit 32279be7e159df5de68f2c37e4ca96e7e4358c4d Author: Srinivas Pandruvada Date: Wed Jul 1 14:37:48 2020 -0700 tools/power/x86/intel-speed-select: Add retries for mail box commands Retry mail box command on failure. The default retry count is 3. This can be changed by "-r|--retry" options. This helps during early bring up of platforms. Signed-off-by: Srinivas Pandruvada commit a85a35fc1d9be7984f052926e42291219ee5ef85 Author: Srinivas Pandruvada Date: Wed Jul 1 14:27:18 2020 -0700 tools/power/x86/intel-speed-select: Add option to delay mbox commands Add option "p|--pause" to introduce delay between two mail box commands for test purpose. This delay can be specified in milliseconds. By default there is no delay between two mailbox commands. Signed-off-by: Srinivas Pandruvada commit 6374de848966966bad9472ed3681a069a8db5a6f Author: Srinivas Pandruvada Date: Tue Jun 30 10:45:36 2020 -0700 tools/power/x86/intel-speed-select: Ignore -o option processing on error When for some reason, CONFIG_TDP_GET_CORE_MASK mailbox command fails, then don't continue online/offline operation for perf-profile set-config-level with "-o" option. Signed-off-by: Srinivas Pandruvada commit b1d12cef7c0abe60e7524c3ac2821b7a4d29fede Author: Srinivas Pandruvada Date: Tue Jun 30 10:39:40 2020 -0700 tools/power/x86/intel-speed-select: Change path for caching topology info We want to cache the topology info to a file, which is not preserved across boot cycle. The current storage in /tmp is getting preserved. So change the path from /tmp/isst_cpu_topology.dat to /var/run/isst_cpu_topology.dat. Signed-off-by: Srinivas Pandruvada commit 1684e97538b9484c72bcaff2961569c3b0021473 Author: Guoqing Jiang Date: Tue Jun 16 11:25:52 2020 +0200 raid5: remove the meaningless check in raid5_make_request We can't guarntee the batched stripe to be set with STRIPE_HANDLE since there are lots of functions could set the flag, such as sync_request, ops_complete_* and end_{read,write}_request etc. Also clear_batch_ready called in handle_stripe ensures the batched list can't continue to be handled by handle_stripe. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit cb9902db3827135bfd6ae70bcb65b653418bb775 Author: Guoqing Jiang Date: Tue Jun 16 11:25:51 2020 +0200 raid5: put the comment of clear_batch_ready to the right place To make people understand the function well, let's put the comment to the right place. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit a377a472b9bca8f904f1e1bdf1b472bada35ac37 Author: Guoqing Jiang Date: Tue Jun 16 11:25:50 2020 +0200 raid5: call clear_batch_ready before set STRIPE_ACTIVE We tried to only put the head sh of batch list to handle_list, then the handle_stripe doesn't handle other members in the batch list. However, we still got the calltrace in break_stripe_batch_list. [593764.644269] stripe state: 2003 kernel: [593764.644299] ------------[ cut here ]------------ kernel: [593764.644308] WARNING: CPU: 12 PID: 856 at drivers/md/raid5.c:4625 break_stripe_batch_list+0x203/0x240 [raid456] [...] kernel: [593764.644363] Call Trace: kernel: [593764.644370] handle_stripe+0x907/0x20c0 [raid456] kernel: [593764.644376] ? __wake_up_common_lock+0x89/0xc0 kernel: [593764.644379] handle_active_stripes.isra.57+0x35f/0x570 [raid456] kernel: [593764.644382] ? raid5_wakeup_stripe_thread+0x96/0x1f0 [raid456] kernel: [593764.644385] raid5d+0x480/0x6a0 [raid456] kernel: [593764.644390] ? md_thread+0x11f/0x160 kernel: [593764.644392] md_thread+0x11f/0x160 kernel: [593764.644394] ? wait_woken+0x80/0x80 kernel: [593764.644396] kthread+0xfc/0x130 kernel: [593764.644398] ? find_pers+0x70/0x70 kernel: [593764.644399] ? kthread_create_on_node+0x70/0x70 kernel: [593764.644401] ret_from_fork+0x1f/0x30 As we can see, the stripe was set with STRIPE_ACTIVE and STRIPE_HANDLE, and only handle_stripe could set those flags then return. And since the stipe was already in the batch list, we need to return earlier before set the two flags. And after dig a little about git history especially commit 3664847d95e6 ("md/raid5: fix a race condition in stripe batch"), it seems the batched stipe still could be handled by handle_stipe, then handle_stipe needs to return earlier if clear_batch_ready to return true. Signed-off-by: Guoqing Jiang Signed-off-by: Song Liu commit 0829d2da608c6ce225052a99b1bc7a2a1c421173 Author: Daria Velikovsky Date: Tue Jul 7 14:02:59 2020 +0300 RDMA/mlx5: Init dest_type when create flow When using action drop dest_type was never assigned to any value. Add initialization of dest_type to -1 since 0 is valid. Fixes: f29de9eee782 ("RDMA/mlx5: Add support for drop action in DV steering") Link: https://lore.kernel.org/r/20200707110259.882276-1-leon@kernel.org Signed-off-by: Daria Velikovsky Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3ab0ea4a1aa752ef2f299db10c1902bf320afca6 Author: Sebastian Reichel Date: Thu Jul 16 14:57:30 2020 +0200 dt-bindings: display: panel-dsi-cm: convert to YAML Convert panel-dsi-cm bindings to YAML and add missing properties while at it. Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716125733.83654-2-sebastian.reichel@collabora.com commit 795db2afd52d1bd9305e837007166039908d8553 Author: Paul Cercueil Date: Thu Jul 16 14:56:47 2020 +0200 drm/panel-simple: Add 50 Hz mode to the Frida FRD350H54004 panel By changing the pixel clock and the length of the back porch, it is possible to obtain a perfect 50 Hz refresh rate. v2: Rebase on drm-misc-next Signed-off-by: Paul Cercueil Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716125647.10964-2-paul@crapouillou.net commit bad20a2dbfdfaf01560026909506b6ed69d65ba2 Author: Paul Cercueil Date: Thu Jul 16 14:56:46 2020 +0200 drm/panel-simple: Fix inverted V/H SYNC for Frida FRD350H54004 panel The FRD350H54004 panel was marked as having active-high VSYNC and HSYNC signals, which sorts-of worked, but resulted in the picture fading out under certain circumstances. Fix this issue by marking VSYNC and HSYNC signals active-low. v2: Rebase on drm-misc-next Fixes: 7b6bd8433609 ("drm/panel: simple: Add support for the Frida FRD350H54004 panel") Cc: stable@vger.kernel.org # v5.5 Signed-off-by: Paul Cercueil Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200716125647.10964-1-paul@crapouillou.net commit 420bd9e2d93e4a4121d5bdf3a051b0ddefa9c1cc Author: Kamal Heib Date: Sun Jul 5 13:43:13 2020 +0300 RDMA/rxe: Remove rxe_link_layer() Instead of returning IB_LINK_LAYER_ETHERNET from rxe_link_layer, return it directly from get_link_layer callback and remove rxe_link_layer(). Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200705104313.283034-5-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 293d8440a0bdd246d523802f62fb1d16c238a485 Author: Kamal Heib Date: Sun Jul 5 13:43:12 2020 +0300 RDMA/rxe: Return void from rxe_mem_init_dma() The return value from rxe_mem_init_dma() is always 0 - change it to be void and fix the callers accordingly. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200705104313.283034-4-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 9d576eac6380534081a5ce98b0776993f7bb6a2e Author: Kamal Heib Date: Sun Jul 5 13:43:11 2020 +0300 RDMA/rxe: Return void from rxe_init_port_param() The return value from rxe_init_port_param() is always 0 - change it to be void. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200705104313.283034-3-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6112ef62826e91afbae5446d5d47b38e25f47e3f Author: Kamal Heib Date: Sun Jul 5 13:43:10 2020 +0300 RDMA/rxe: Drop pointless checks in rxe_init_ports Both pkey_tbl_len and gid_tbl_len are set in rxe_init_port_param() - so no need to check if they aren't set. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200705104313.283034-2-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ab96bbab467c884ad684c5f669c91272a0455087 Author: John Ogness Date: Fri Jun 19 17:23:18 2020 +0206 block: remove retry loop in ioc_release_fn() The reverse-order double lock dance in ioc_release_fn() is using a retry loop. This is a problem on PREEMPT_RT because it could preempt the task that would release q->queue_lock and thus live lock in the retry loop. RCU is already managing the freeing of the request queue and icq. If the trylock fails, use RCU to guarantee that the request queue and icq are not freed and re-acquire the locks in the correct order, allowing forward progress. Signed-off-by: John Ogness Reviewed-by: Daniel Wagner Signed-off-by: Jens Axboe commit a43f085f8720c4f705b86e7432d19ef955750b36 Author: John Ogness Date: Fri Jun 19 17:23:17 2020 +0206 block: remove unnecessary ioc nested locking The legacy CFQ IO scheduler could call put_io_context() in its exit_icq() elevator callback. This led to a lockdep warning, which was fixed in commit d8c66c5d5924 ("block: fix lockdep warning on io_context release put_io_context()") by using a nested subclass for the ioc spinlock. However, with commit f382fb0bcef4 ("block: remove legacy IO schedulers") the CFQ IO scheduler no longer exists. The BFQ IO scheduler also implements the exit_icq() elevator callback but does not call put_io_context(). The nested subclass for the ioc spinlock is no longer needed. Since it existed as an exception and no longer applies, remove the nested subclass usage. Signed-off-by: John Ogness Reviewed-by: Daniel Wagner Signed-off-by: Jens Axboe commit 7e0adbfc20c50b021e425662834a492f958efee7 Author: Christoph Hellwig Date: Sun Jun 7 17:31:19 2020 +0200 md: rewrite md_setup_drive to avoid ioctls md_setup_drive knows it works with md devices, so it is rather pointless to open a file descriptor and issue ioctls. Just call directly into the relevant low-level md routines after getting a handle to the device using blkdev_get_by_dev instead. Signed-off-by: Christoph Hellwig Reviewed-by: NeilBrown Acked-by: Song Liu Acked-by: Linus Torvalds commit 5b642d8b9f2ef1212f33dfc337816e6b4ab83bb3 Author: Christoph Hellwig Date: Thu Jul 16 16:33:10 2020 +0200 block: integrate bd_start_claiming into __blkdev_get bd_start_claiming duplicates a lot of the work done in __blkdev_get. Integrate the two functions to avoid the duplicate work, and to do the right thing for the md -ERESTARTSYS corner case. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit ecbe6bc0003bfd5bf8581cb679cae0eb944432cb Author: Christoph Hellwig Date: Thu Jul 16 16:33:09 2020 +0200 block: use bd_prepare_to_claim directly in the loop driver The arcane magic in bd_start_claiming is only needed to be able to claim a block_device that hasn't been fully set up. Switch the loop driver that claims from the ioctl path with a fully set up struct block_device to just use the much simpler bd_prepare_to_claim directly. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 58e46ed9cc634b3c64ea402789f8a92ce45cee48 Author: Christoph Hellwig Date: Thu Jul 16 16:33:08 2020 +0200 block: refactor bd_start_claiming Move the locking and assignment of bd_claiming from bd_start_claiming to bd_prepare_to_claim. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit c5638ab417660e2c5d681aed5ce76df992982dbb Author: Christoph Hellwig Date: Thu Jul 16 16:33:07 2020 +0200 block: simplify the restart case in __blkdev_get Insted of duplicating all the cleanup logic jump to the code that cleans up anyway, and restart after that. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo Signed-off-by: Jens Axboe commit 7aa1031223bc01483e7aca6b7838598c4edc19f4 Author: Rafael J. Wysocki Date: Tue Jul 14 20:17:24 2020 +0200 cpufreq: intel_pstate: Avoid enabling HWP if EPP is not supported Although there are processors supporting hardware-managed P-states (HWP) without the energy-performance preference (EPP) feature, they are not expected to be run with HWP enabled (the BIOS should disable HWP on those systems). Missing EPP support generally indicates an incomplete HWP implementation and so it is better to avoid using HWP on those systems in production. However, intel_pstate currently enables HWP on such systems, which is questionable, so prevent it from doing that by making it check EPP support before enabling HWP and avoid enabling it if EPP is not supported by the processor at hand. Signed-off-by: Rafael J. Wysocki commit 23a522e388f5a0cbeaf37e10e3dba832a83a1671 Author: Rafael J. Wysocki Date: Wed Jul 15 15:54:57 2020 +0200 cpufreq: intel_pstate: Clean up aperf_mperf_shift description The kerneldoc description of the aperf_mperf_shift field in struct global_params is unclear and there is a typo in it, so simplify it and clean it up. Reported-by: Lee Jones Signed-off-by: Rafael J. Wysocki Reviewed-by: Lee Jones commit 05500125021191f703d3759a7e94a37b7257d959 Author: Lorenzo Bianconi Date: Tue Jul 14 15:56:42 2020 +0200 selftest: Add tests for XDP programs in CPUMAP entries Similar to what have been done for DEVMAP, introduce tests to verify ability to add a XDP program to an entry in a CPUMAP. Verify CPUMAP programs can not be attached to devices as a normal XDP program, and only programs with BPF_XDP_CPUMAP attach type can be loaded in a CPUMAP. Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/9c632fcea5382ea7b4578bd06b6eddf382c3550b.1594734381.git.lorenzo@kernel.org commit ce4dade7f12a8f3e7918184ac851d992f551805d Author: Lorenzo Bianconi Date: Tue Jul 14 15:56:41 2020 +0200 samples/bpf: xdp_redirect_cpu: Load a eBPF program on cpumap Extend xdp_redirect_cpu_{usr,kern}.c adding the possibility to load a XDP program on cpumap entries. The following options have been added: - mprog-name: cpumap entry program name - mprog-filename: cpumap entry program filename - redirect-device: output interface if the cpumap program performs a XDP_REDIRECT to an egress interface - redirect-map: bpf map used to perform XDP_REDIRECT to an egress interface - mprog-disable: disable loading XDP program on cpumap entries Add xdp_pass, xdp_drop, xdp_redirect stats accounting Co-developed-by: Jesper Dangaard Brouer Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/aa5a9a281b9dac425620fdabe82670ffb6bbdb92.1594734381.git.lorenzo@kernel.org commit 4be556cf5aef416904743f2cee689351f91445b6 Author: Lorenzo Bianconi Date: Tue Jul 14 15:56:40 2020 +0200 libbpf: Add SEC name for xdp programs attached to CPUMAP As for DEVMAP, support SEC("xdp_cpumap/") as a short cut for loading the program with type BPF_PROG_TYPE_XDP and expected attach type BPF_XDP_CPUMAP. Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/33174c41993a6d860d9c7c1f280a2477ee39ed11.1594734381.git.lorenzo@kernel.org commit 28b1520ebf81ced970141640d90279ac7b9f1f9a Author: Lorenzo Bianconi Date: Tue Jul 14 15:56:39 2020 +0200 bpf: cpumap: Implement XDP_REDIRECT for eBPF programs attached to map entries Introduce XDP_REDIRECT support for eBPF programs attached to cpumap entries. This patch has been tested on Marvell ESPRESSObin using a modified version of xdp_redirect_cpu sample in order to attach a XDP program to CPUMAP entries to perform a redirect on the mvneta interface. In particular the following scenario has been tested: rq (cpu0) --> mvneta - XDP_REDIRECT (cpu0) --> CPUMAP - XDP_REDIRECT (cpu1) --> mvneta $./xdp_redirect_cpu -p xdp_cpu_map0 -d eth0 -c 1 -e xdp_redirect \ -f xdp_redirect_kern.o -m tx_port -r eth0 tx: 285.2 Kpps rx: 285.2 Kpps Attaching a simple XDP program on eth0 to perform XDP_TX gives comparable results: tx: 288.4 Kpps rx: 288.4 Kpps Co-developed-by: Jesper Dangaard Brouer Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/2cf8373a731867af302b00c4ff16c122630c4980.1594734381.git.lorenzo@kernel.org commit 9216477449f33cdbc9c9a99d49f500b7fbb81702 Author: Lorenzo Bianconi Date: Tue Jul 14 15:56:38 2020 +0200 bpf: cpumap: Add the possibility to attach an eBPF program to cpumap Introduce the capability to attach an eBPF program to cpumap entries. The idea behind this feature is to add the possibility to define on which CPU run the eBPF program if the underlying hw does not support RSS. Current supported verdicts are XDP_DROP and XDP_PASS. This patch has been tested on Marvell ESPRESSObin using xdp_redirect_cpu sample available in the kernel tree to identify possible performance regressions. Results show there are no observable differences in packet-per-second: $./xdp_redirect_cpu --progname xdp_cpu_map0 --dev eth0 --cpu 1 rx: 354.8 Kpps rx: 356.0 Kpps rx: 356.8 Kpps rx: 356.3 Kpps rx: 356.6 Kpps rx: 356.6 Kpps rx: 356.7 Kpps rx: 355.8 Kpps rx: 356.8 Kpps rx: 356.8 Kpps Co-developed-by: Jesper Dangaard Brouer Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/5c9febdf903d810b3415732e5cd98491d7d9067a.1594734381.git.lorenzo@kernel.org commit 644bfe51fa49c22244d24e896cd3fe3ee2f2cfd1 Author: Lorenzo Bianconi Date: Tue Jul 14 15:56:37 2020 +0200 cpumap: Formalize map value as a named struct As it has been already done for devmap, introduce 'struct bpf_cpumap_val' to formalize the expected values that can be passed in for a CPUMAP. Update cpumap code to use the struct. Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/754f950674665dae6139c061d28c1d982aaf4170.1594734381.git.lorenzo@kernel.org commit a4e76f1bda8e7b358dc21f0f925b8a2c4c98e733 Author: Lorenzo Bianconi Date: Tue Jul 14 15:56:36 2020 +0200 samples/bpf: xdp_redirect_cpu_user: Do not update bpf maps in option loop Do not update xdp_redirect_cpu maps running while option loop but defer it after all available options have been parsed. This is a preliminary patch to pass the program name we want to attach to the map entries as a user option Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/95dc46286fd2c609042948e04bb7ae1f5b425538.1594734381.git.lorenzo@kernel.org commit daa5cdc3fd08407048538585b2433601d4089a82 Author: David Ahern Date: Tue Jul 14 15:56:35 2020 +0200 net: Refactor xdp_convert_buff_to_frame Move the guts of xdp_convert_buff_to_frame to a new helper, xdp_update_frame_from_buff so it can be reused removing code duplication Suggested-by: Jesper Dangaard Brouer Co-developed-by: Lorenzo Bianconi Signed-off-by: Lorenzo Bianconi Signed-off-by: David Ahern Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/90a68c283d7ebeb48924934c9b7ac79492300472.1594734381.git.lorenzo@kernel.org commit 9b74ebb2b0f259474da65fa0178c657e5fa5c640 Author: Jesper Dangaard Brouer Date: Tue Jul 14 15:56:34 2020 +0200 cpumap: Use non-locked version __ptr_ring_consume_batched Commit 77361825bb01 ("bpf: cpumap use ptr_ring_consume_batched") changed away from using single frame ptr_ring dequeue (__ptr_ring_consume) to consume a batched, but it uses a locked version, which as the comment explain isn't needed. Change to use the non-locked version __ptr_ring_consume_batched. Fixes: 77361825bb01 ("bpf: cpumap use ptr_ring_consume_batched") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/a9c7d06f9a009e282209f0c8c7b2c5d9b9ad60b9.1594734381.git.lorenzo@kernel.org commit b4174173005972f8f6497883d08d87e0aba1b604 Author: Christoph Hellwig Date: Wed Jul 8 09:47:08 2020 +0200 dma-mapping: inline the fast path dma-direct calls Inline the single page map/unmap/sync dma-direct calls into the now out of line generic wrappers. This restores the behavior of a single function call that we had before moving the generic calls out of line. Besides the dma-mapping callers there are just a few callers in IOMMU drivers that have a bypass mode, and more of those are going to be switched to the generic bypass soon. Signed-off-by: Christoph Hellwig Tested-by: Alexey Kardashevskiy Reviewed-by: Alexey Kardashevskiy commit d3fa60d7bfdc9a0ff1a524bdef96b3db1fd62022 Author: Christoph Hellwig Date: Wed Jul 8 09:45:11 2020 +0200 dma-mapping: move the remaining DMA API calls out of line For a long time the DMA API has been implemented inline in dma-mapping.h, but the function bodies can be quite large. Move them all out of line. This also removes all the dma_direct_* exports as those are just implementation details and should never be used by drivers directly. Signed-off-by: Christoph Hellwig Tested-by: Alexey Kardashevskiy Reviewed-by: Alexey Kardashevskiy commit de4334f7da83a169b984d617af0d7eb383aef5a5 Author: Lee Jones Date: Mon Jul 13 15:49:30 2020 +0100 pinctrl: pinctrl-amd: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, 'struct amd_gpio_acpi_match' becomes defined but unused. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinctrl-amd.c:959:36: warning: ‘amd_gpio_acpi_match’ defined but not used [-Wunused-const-variable=] 959 | static const struct acpi_device_id amd_gpio_acpi_match[] = { Signed-off-by: Lee Jones Cc: Ken Xue Cc: "Wu, Jeff" Cc: Nehal Shah Cc: Sundar S K Link: https://lore.kernel.org/r/20200713144930.1034632-26-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 192b752e0e4653b0c136d3ed5e588e16021778aa Author: Lee Jones Date: Mon Jul 13 15:49:29 2020 +0100 pinctrl: mvebu: pinctrl-armada-37xx: Update documentation block for 'struct armada_37xx_pin_group' Correct misspellings and provide missing entries. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/mvebu/pinctrl-armada-37xx.c:68: warning: Function parameter or member 'start_pin' not described in 'armada_37xx_pin_group' drivers/pinctrl/mvebu/pinctrl-armada-37xx.c:68: warning: Function parameter or member 'val' not described in 'armada_37xx_pin_group' drivers/pinctrl/mvebu/pinctrl-armada-37xx.c:68: warning: Function parameter or member 'extra_pin' not described in 'armada_37xx_pin_group' drivers/pinctrl/mvebu/pinctrl-armada-37xx.c:68: warning: Function parameter or member 'extra_npins' not described in 'armada_37xx_pin_group' Signed-off-by: Lee Jones Cc: Jason Cooper Cc: Andrew Lunn Cc: Gregory Clement Cc: Sebastian Hesselbarth Link: https://lore.kernel.org/r/20200713144930.1034632-25-lee.jones@linaro.org Signed-off-by: Linus Walleij commit fb5dd4297d0c7b2d09701defb02795ab3f0a57bf Author: Lee Jones Date: Mon Jul 13 15:49:28 2020 +0100 pinctrl: meson: pinctrl-meson-a1: Remove unused const variable 'i2c_slave_groups' It has never been used. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/meson/pinctrl-meson-a1.c:749:27: warning: ‘i2c_slave_groups’ defined but not used [-Wunused-const-variable=] 749 | static const char const i2c_slave_groups[] = { | ^~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Cc: Kevin Hilman Cc: Qianggui Song Cc: linux-amlogic@lists.infradead.org Link: https://lore.kernel.org/r/20200713144930.1034632-24-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 92cadf68e50a5641356fe9dcbc486ae23168b568 Author: Lee Jones Date: Mon Jul 13 15:49:27 2020 +0100 pinctrl: tegra: pinctrl-tegra194: Do not initialise field twice Both PIN_PINGROUP_ENTRY_Y() and DRV_PINGROUP_ENTRY_Y() macros are called for each of the 2 pin groups defined here, and both of them initialise 'drv_reg', causing the compiler to complain. Only initialise 'drv_reg' once. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/tegra/pinctrl-tegra194.c:71:14: warning: initialized field overwritten [-Woverride-init] 71 | .drv_reg = ((r)), | ^ drivers/pinctrl/tegra/pinctrl-tegra194.c:105:2: note: in expansion of macro ‘DRV_PINGROUP_ENTRY_Y’ 105 | DRV_PINGROUP_ENTRY_Y(0x14004, 12, 5, 20, 5, -1, -1, -1, -1, 0) | ^~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:124:3: note: in expansion of macro ‘drive_pex_l5_clkreq_n_pgg0’ 124 | drive_##pg_name, | ^~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:128:2: note: in expansion of macro ‘PINGROUP’ 128 | PINGROUP(pex_l5_clkreq_n_pgg0, PE5, RSVD1, RSVD2, RSVD3, 0x14000, 0, | ^~~~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:71:14: note: (near initialization for ‘tegra194_groups[0].drv_reg’) 71 | .drv_reg = ((r)), | ^ drivers/pinctrl/tegra/pinctrl-tegra194.c:105:2: note: in expansion of macro ‘DRV_PINGROUP_ENTRY_Y’ 105 | DRV_PINGROUP_ENTRY_Y(0x14004, 12, 5, 20, 5, -1, -1, -1, -1, 0) | ^~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:124:3: note: in expansion of macro ‘drive_pex_l5_clkreq_n_pgg0’ 124 | drive_##pg_name, | ^~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:128:2: note: in expansion of macro ‘PINGROUP’ 128 | PINGROUP(pex_l5_clkreq_n_pgg0, PE5, RSVD1, RSVD2, RSVD3, 0x14000, 0, | ^~~~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:71:14: warning: initialized field overwritten [-Woverride-init] 71 | .drv_reg = ((r)), | ^ drivers/pinctrl/tegra/pinctrl-tegra194.c:107:2: note: in expansion of macro ‘DRV_PINGROUP_ENTRY_Y’ 107 | DRV_PINGROUP_ENTRY_Y(0x1400c, 12, 5, 20, 5, -1, -1, -1, -1, 0) | ^~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:124:3: note: in expansion of macro ‘drive_pex_l5_rst_n_pgg1’ 124 | drive_##pg_name, | ^~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:130:2: note: in expansion of macro ‘PINGROUP’ 130 | PINGROUP(pex_l5_rst_n_pgg1, PE5, RSVD1, RSVD2, RSVD3, 0x14008, 0, | ^~~~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:71:14: note: (near initialization for ‘tegra194_groups[1].drv_reg’) 71 | .drv_reg = ((r)), | ^ drivers/pinctrl/tegra/pinctrl-tegra194.c:107:2: note: in expansion of macro ‘DRV_PINGROUP_ENTRY_Y’ 107 | DRV_PINGROUP_ENTRY_Y(0x1400c, 12, 5, 20, 5, -1, -1, -1, -1, 0) | ^~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:124:3: note: in expansion of macro ‘drive_pex_l5_rst_n_pgg1’ 124 | drive_##pg_name, | ^~~~~~ drivers/pinctrl/tegra/pinctrl-tegra194.c:130:2: note: in expansion of macro ‘PINGROUP’ 130 | PINGROUP(pex_l5_rst_n_pgg1, PE5, RSVD1, RSVD2, RSVD3, 0x14008, 0, | ^~~~~~~~ Signed-off-by: Lee Jones Acked-by: Thierry Reding Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Link: https://lore.kernel.org/r/20200713144930.1034632-23-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 0ba5ab002b9eb0de507ef9e38be304b77576860b Author: Lee Jones Date: Mon Jul 13 15:49:26 2020 +0100 pinctrl: pinctrl-single: Fix struct/function documentation blocks Add some missing attributes/parameter descriptions, remove other superfluous ones, add struct header titles and fix misspellings. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinctrl-single.c:50: warning: Function parameter or member 'mask' not described in 'pcs_func_vals' drivers/pinctrl/pinctrl-single.c:97: warning: Function parameter or member 'conf' not described in 'pcs_function' drivers/pinctrl/pinctrl-single.c:97: warning: Function parameter or member 'nconfs' not described in 'pcs_function' drivers/pinctrl/pinctrl-single.c:659: warning: Function parameter or member 'pin_pos' not described in 'pcs_add_pin' drivers/pinctrl/pinctrl-single.c:985: warning: Excess function parameter 'pctldev' description in 'pcs_parse_one_pinctrl_entry' drivers/pinctrl/pinctrl-single.c:1357: warning: Cannot understand * @reg: virtual address of interrupt register drivers/pinctrl/pinctrl-single.c:1377: warning: Function parameter or member 'pcs_soc' not described in 'pcs_irq_set' drivers/pinctrl/pinctrl-single.c:1377: warning: Function parameter or member 'irq' not described in 'pcs_irq_set' drivers/pinctrl/pinctrl-single.c:1377: warning: Function parameter or member 'enable' not described in 'pcs_irq_set' drivers/pinctrl/pinctrl-single.c:1458: warning: Function parameter or member 'pcs_soc' not described in 'pcs_irq_handle' drivers/pinctrl/pinctrl-single.c:1458: warning: Excess function parameter 'pcs_irq' description in 'pcs_irq_handle' drivers/pinctrl/pinctrl-single.c:1506: warning: Excess function parameter 'irq' description in 'pcs_irq_chain_handler' Signed-off-by: Lee Jones Acked-by: Tony Lindgren Cc: Tony Lindgren Cc: Haojian Zhuang Cc: linux-omap@vger.kernel.org Link: https://lore.kernel.org/r/20200713144930.1034632-22-lee.jones@linaro.org Signed-off-by: Linus Walleij commit d1100488c3ce11b853785cf15ee4c19bfab4c842 Author: Christoph Hellwig Date: Sun Jun 7 16:56:05 2020 +0200 md: simplify md_setup_drive Move the loop over the possible arrays into the caller to remove a level of indentation for the whole function. Signed-off-by: Christoph Hellwig Reviewed-by: NeilBrown Acked-by: Song Liu Acked-by: Linus Torvalds commit 1a6a050620e496abf42749a2e1d3882645cc053f Author: Christoph Hellwig Date: Sun Jun 7 16:33:01 2020 +0200 md: remove the kernel version of md_u.h mdp_major can just move to drivers/md/md.h. Signed-off-by: Christoph Hellwig Acked-by: Song Liu Acked-by: Linus Torvalds commit a1d6bc018911390274e3904bdd28240cd96ddc54 Author: Christoph Hellwig Date: Sat Jun 6 14:56:41 2020 +0200 md: remove the autoscan partition re-read devfs is long gone, and autoscan works just fine without this these days. Signed-off-by: Christoph Hellwig Reviewed-by: NeilBrown Acked-by: Song Liu Acked-by: Linus Torvalds commit d82fa81c2364a464ae585eed523496aa00909c17 Author: Christoph Hellwig Date: Sat Jun 6 15:00:24 2020 +0200 md: replace the RAID_AUTORUN ioctl with a direct function call Instead of using a spcial RAID_AUTORUN ioctl that only exists for non-modular builds and is only called from the early init code, just call the actual function directly. Signed-off-by: Christoph Hellwig Reviewed-by: NeilBrown Acked-by: Song Liu Acked-by: Linus Torvalds commit 4f5b246b37e024955c0fcca0c7f5952089052d1d Author: Christoph Hellwig Date: Sun Jun 7 16:18:59 2020 +0200 md: move the early init autodetect code to drivers/md/ Just like the NFS and CIFS root code this better lives with the driver it is tightly integrated with. Signed-off-by: Christoph Hellwig Acked-by: Song Liu Acked-by: Linus Torvalds commit 881627f353754dd05a8f3e1c1941f0dbbf47a170 Author: Christoph Hellwig Date: Sat Jun 6 10:49:35 2020 +0200 init: remove the bstat helper The only caller of the bstat function becomes cleaner and simpler when open coding the function. Signed-off-by: Christoph Hellwig Reviewed-by: NeilBrown Acked-by: Song Liu Acked-by: Linus Torvalds commit 9e96c8c0e94eea2f69a9705f5d0f51928ea26c17 Author: Christoph Hellwig Date: Tue Jul 14 08:55:05 2020 +0200 fs: add a vfs_fchmod helper Add a helper for struct file based chmode operations. To be used by the initramfs code soon. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit c04011fe8cbd80af1be6e12b53193bf3846750d7 Author: Christoph Hellwig Date: Tue Jul 14 08:47:43 2020 +0200 fs: add a vfs_fchown helper Add a helper for struct file based chown operations. To be used by the initramfs code soon. Signed-off-by: Christoph Hellwig Acked-by: Linus Torvalds commit e1524ea84af7172acc20827f8dca3fc8f72b8f37 Author: Lee Jones Date: Mon Jul 13 15:49:24 2020 +0100 pinctrl: pinctrl-rockchip: Fix a bunch of kerneldoc misdemeanours Demote headers which are clearly not kerneldoc, provide titles for struct definition blocks, fix API slip (bitrot) misspellings and provide some missing entries. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinctrl-rockchip.c:82: warning: cannot understand function prototype: 'struct rockchip_iomux ' drivers/pinctrl/pinctrl-rockchip.c:97: warning: Enum value 'DRV_TYPE_IO_DEFAULT' not described in enum 'rockchip_pin_drv_type' drivers/pinctrl/pinctrl-rockchip.c:97: warning: Enum value 'DRV_TYPE_IO_1V8_OR_3V0' not described in enum 'rockchip_pin_drv_type' drivers/pinctrl/pinctrl-rockchip.c:97: warning: Enum value 'DRV_TYPE_IO_1V8_ONLY' not described in enum 'rockchip_pin_drv_type' drivers/pinctrl/pinctrl-rockchip.c:97: warning: Enum value 'DRV_TYPE_IO_1V8_3V0_AUTO' not described in enum 'rockchip_pin_drv_type' drivers/pinctrl/pinctrl-rockchip.c:97: warning: Enum value 'DRV_TYPE_IO_3V3_ONLY' not described in enum 'rockchip_pin_drv_type' drivers/pinctrl/pinctrl-rockchip.c:97: warning: Enum value 'DRV_TYPE_MAX' not described in enum 'rockchip_pin_drv_type' drivers/pinctrl/pinctrl-rockchip.c:106: warning: Enum value 'PULL_TYPE_IO_DEFAULT' not described in enum 'rockchip_pin_pull_type' drivers/pinctrl/pinctrl-rockchip.c:106: warning: Enum value 'PULL_TYPE_IO_1V8_ONLY' not described in enum 'rockchip_pin_pull_type' drivers/pinctrl/pinctrl-rockchip.c:106: warning: Enum value 'PULL_TYPE_MAX' not described in enum 'rockchip_pin_pull_type' drivers/pinctrl/pinctrl-rockchip.c:109: warning: Cannot understand * @drv_type: drive strength variant using rockchip_perpin_drv_type on line 109 - I thought it was a doc line drivers/pinctrl/pinctrl-rockchip.c:122: warning: Cannot understand * @reg_base: register base of the gpio bank on line 109 - I thought it was a doc line drivers/pinctrl/pinctrl-rockchip.c:325: warning: Function parameter or member 'route_location' not described in 'rockchip_mux_route_data' drivers/pinctrl/pinctrl-rockchip.c:328: warning: Cannot understand */ on line 109 - I thought it was a doc line drivers/pinctrl/pinctrl-rockchip.c:375: warning: Function parameter or member 'data' not described in 'rockchip_pin_group' drivers/pinctrl/pinctrl-rockchip.c:387: warning: Function parameter or member 'ngroups' not described in 'rockchip_pmx_func' Signed-off-by: Lee Jones Reviewed-by: Heiko Stuebner Cc: Heiko Stuebner Cc: Jean-Christophe PLAGNIOL-VILLARD Cc: linux-rockchip@lists.infradead.org Link: https://lore.kernel.org/r/20200713144930.1034632-20-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 21f97985003c5053f15ee27e1a3f91dc744acf30 Author: Lee Jones Date: Mon Jul 13 15:49:23 2020 +0100 pinctrl: pinctrl-bm1880: Rename ill documented struct attribute entries Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinctrl-bm1880.c:40: warning: Function parameter or member 'pctrldev' not described in 'bm1880_pinctrl' drivers/pinctrl/pinctrl-bm1880.c:40: warning: Function parameter or member 'pinconf' not described in 'bm1880_pinctrl' Signed-off-by: Lee Jones Reviewed-by: Manivannan Sadhasivam Cc: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200713144930.1034632-19-lee.jones@linaro.org Signed-off-by: Linus Walleij commit aa78655d49b1b686ebe733d55294b287f582e315 Author: Lee Jones Date: Mon Jul 13 15:49:22 2020 +0100 pinctrl: pinctrl-at91: Demote non-kerneldoc header and complete another The documentation header for 'struct at91_pinctrl_mux_ops' was missing entries for {g,s}et_drivestrength and {g,s}et_slewrate. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinctrl-at91.c:77: warning: cannot understand function prototype: 'enum drive_strength_bit ' drivers/pinctrl/pinctrl-at91.c:187: warning: Function parameter or member 'get_drivestrength' not described in 'at91_pinctrl_mux_ops' drivers/pinctrl/pinctrl-at91.c:187: warning: Function parameter or member 'set_drivestrength' not described in 'at91_pinctrl_mux_ops' drivers/pinctrl/pinctrl-at91.c:187: warning: Function parameter or member 'get_slewrate' not described in 'at91_pinctrl_mux_ops' drivers/pinctrl/pinctrl-at91.c:187: warning: Function parameter or member 'set_slewrate' not described in 'at91_pinctrl_mux_ops' Signed-off-by: Lee Jones Cc: Ludovic Desroches Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Jean-Christophe PLAGNIOL-VILLARD Link: https://lore.kernel.org/r/20200713144930.1034632-18-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 898503ee0b9b27c214ad0e584a1fcfec24e71ef0 Author: Lee Jones Date: Mon Jul 13 15:49:20 2020 +0100 pinctrl: pinctrl-at91-pio4: PM related attribute descriptions Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinctrl-at91-pio4.c:132: warning: Function parameter or member 'pm_wakeup_sources' not described in 'atmel_pioctrl' drivers/pinctrl/pinctrl-at91-pio4.c:132: warning: Function parameter or member 'pm_suspend_backup' not described in 'atmel_pioctrl' Signed-off-by: Lee Jones Cc: Ludovic Desroches Cc: Nicolas Ferre Cc: Alexandre Belloni Link: https://lore.kernel.org/r/20200713144930.1034632-16-lee.jones@linaro.org Signed-off-by: Linus Walleij commit b4dab7743e65e96faf878c46858c19b8b77d5d50 Author: Lee Jones Date: Mon Jul 13 15:49:19 2020 +0100 pinctrl: pinconf-generic: Add function parameter description 'pctldev' Fix a spelling/typo while we're here. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinconf-generic.c:242: warning: Function parameter or member 'pctldev' not described in 'pinconf_generic_parse_dt_config' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200713144930.1034632-15-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 0b93a57a6a144d2152dbb1042143c1b9833eed9c Author: Lee Jones Date: Mon Jul 13 15:49:18 2020 +0100 pinctrl: devicetree: Add one new attribute description and rename another two Fixes the following W=1 kernel build warning(s): drivers/pinctrl/devicetree.c:27: warning: Function parameter or member 'map' not described in 'pinctrl_dt_map' drivers/pinctrl/devicetree.c:27: warning: Function parameter or member 'num_maps' not described in 'pinctrl_dt_map' drivers/pinctrl/devicetree.c:409: warning: Function parameter or member 'out_args' not described in 'pinctrl_parse_index_with_args' drivers/pinctrl/devicetree.c:409: warning: Excess function parameter 'out_arts' description in 'pinctrl_parse_index_with_args' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200713144930.1034632-14-lee.jones@linaro.org Signed-off-by: Linus Walleij commit d340351f8168d29e80f0b61aebb06618db8d2031 Author: Lee Jones Date: Mon Jul 13 15:49:17 2020 +0100 pinctrl: pinmux: Add some missing parameter descriptions And rename another which has probably bitrotted. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinmux.c:83: warning: Function parameter or member 'pctldev' not described in 'pinmux_can_be_used_for_gpio' drivers/pinctrl/pinmux.c:108: warning: Function parameter or member 'pctldev' not described in 'pin_request' drivers/pinctrl/pinmux.c:261: warning: Function parameter or member 'gpio' not described in 'pinmux_request_gpio' drivers/pinctrl/pinmux.c:751: warning: Function parameter or member 'selector' not described in 'pinmux_generic_get_function' drivers/pinctrl/pinmux.c:751: warning: Excess function parameter 'group_selector' description in 'pinmux_generic_get_function' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200713144930.1034632-13-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 9c340bbbf7203ebaa7286eb2cd3b21b5e142ed3b Author: Lee Jones Date: Mon Jul 13 15:49:16 2020 +0100 pinctrl: core: Fix a bunch of kerneldoc issues Most are likely due to bitrot/API slip. Some are formatting issues. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/core.c:167: warning: Function parameter or member 'pin' not described in 'pin_get_name' drivers/pinctrl/core.c:167: warning: Excess function parameter 'name' description in 'pin_get_name' drivers/pinctrl/core.c:584: warning: Function parameter or member 'selector' not described in 'pinctrl_generic_get_group' drivers/pinctrl/core.c:584: warning: Excess function parameter 'gselector' description in 'pinctrl_generic_get_group' drivers/pinctrl/core.c:1356: error: Cannot parse struct or union! drivers/pinctrl/core.c:1458: warning: Function parameter or member 'map' not described in 'pinctrl_unregister_mappings' drivers/pinctrl/core.c:1458: warning: Excess function parameter 'maps' description in 'pinctrl_unregister_mappings' drivers/pinctrl/core.c:2239: warning: Function parameter or member 'pctldev' not described in 'devm_pinctrl_register_and_init' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200713144930.1034632-12-lee.jones@linaro.org Signed-off-by: Linus Walleij commit ea0b879b5d6e9af2e7b60ff62fc5c985d43fc920 Author: Lee Jones Date: Mon Jul 13 15:49:15 2020 +0100 pinctrl: mediatek: pinctrl-mtk-common-v2: Mark 'mtk_default_register_base_names' as __maybe_unused Not all sourcefiles which end up including pinctrl-mtk-common-v2.h make use of 'mtk_default_register_base_names' and there is nowhere we can place the definition to void the need for __maybe_unused except its own headerfile, which seems like overkill. So instead we tell the compiler that it's okay for it to be unused by some of the consumers. Fixes the following W=1 kernel build warning(s): In file included from drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c:19: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/pinctrl/mediatek/pinctrl-moore.h:25, from drivers/pinctrl/mediatek/pinctrl-moore.c:12: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/pinctrl/mediatek/pinctrl-paris.h:27, from drivers/pinctrl/mediatek/pinctrl-paris.c:15: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/pinctrl/mediatek/pinctrl-paris.h:27, from drivers/pinctrl/mediatek/pinctrl-mtk-mt6797.h:15, from drivers/pinctrl/mediatek/pinctrl-mt6797.c:13: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/pinctrl/mediatek/pinctrl-paris.h:27, from drivers/pinctrl/mediatek/pinctrl-mtk-mt8183.h:12, from drivers/pinctrl/mediatek/pinctrl-mt8183.c:9: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/pinctrl/mediatek/pinctrl-paris.h:27, from drivers/pinctrl/mediatek/pinctrl-mtk-mt6765.h:12, from drivers/pinctrl/mediatek/pinctrl-mt6765.c:10: drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.h:83:27: warning: ‘mtk_default_register_base_names’ defined but not used [-Wunused-const-variable=] 83 | static const char const mtk_default_register_base_names[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Acked-by: Sean Wang Cc: Sean Wang Cc: Matthias Brugger Cc: linux-mediatek@lists.infradead.org Link: https://lore.kernel.org/r/20200713144930.1034632-11-lee.jones@linaro.org Signed-off-by: Linus Walleij commit cba053ff5e81a1dd04a7013bb95fe2e4c28e4f74 Author: Lee Jones Date: Mon Jul 13 15:49:14 2020 +0100 pinctrl: qcom: pinctrl-msm8976: Remove unused variable 'nav_tsync_groups' Fixes the following W=1 kernel build warning(s): drivers/pinctrl/qcom/pinctrl-msm8976.c:802:27: warning: ‘nav_tsync_groups’ defined but not used [-Wunused-const-variable=] 802 | static const char const nav_tsync_groups[] = { | ^~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Cc: Andy Gross Cc: Bjorn Andersson Cc: Del Regno Cc: linux-arm-msm@vger.kernel.org Link: https://lore.kernel.org/r/20200713144930.1034632-10-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 0dc0bdf069784704c6bc798d9f7ed1bafe221c7a Author: Lee Jones Date: Mon Jul 13 15:49:13 2020 +0100 pinctrl: samsung: pinctrl-s3c64xx: Fix formatting issues Kerneldoc struct titles must be followed by whitespace else the checker gets confused. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/samsung/pinctrl-s3c64xx.c:212: warning: cannot understand function prototype: 'struct s3c64xx_eint0_domain_data ' Signed-off-by: Lee Jones Cc: Tomasz Figa Cc: Krzysztof Kozlowski Cc: Sylwester Nawrocki Cc: linux-samsung-soc@vger.kernel.org Link: https://lore.kernel.org/r/20200713144930.1034632-9-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 26b72162e10b51e2b2be04ea7ea58f91a782dfc5 Author: Lee Jones Date: Mon Jul 13 15:49:12 2020 +0100 pinctrl: samsung: pinctrl-s3c24xx: Fix formatting issues Kerneldoc struct titles must be followed by whitespace. Also attributes need to be in the format '@.*: ' else the checker gets confused. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/samsung/pinctrl-s3c24xx.c:100: warning: cannot understand function prototype: 'struct s3c24xx_eint_domain_data ' Signed-off-by: Lee Jones Reviewed-by: Heiko Stuebner Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Tomasz Figa Cc: Sylwester Nawrocki Cc: Heiko Stuebner Cc: linux-samsung-soc@vger.kernel.org Link: https://lore.kernel.org/r/20200713144930.1034632-8-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 84a3fce5e914742e7f243bffdbbc90055c737ef7 Author: Lee Jones Date: Mon Jul 13 15:49:11 2020 +0100 pinctrl: samsung: pinctrl-samsung: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document either of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/samsung/pinctrl-samsung.c:1149: warning: Function parameter or member 'dev' not described in 'samsung_pinctrl_suspend' drivers/pinctrl/samsung/pinctrl-samsung.c:1199: warning: Function parameter or member 'dev' not described in 'samsung_pinctrl_resume' Signed-off-by: Lee Jones Cc: Tomasz Figa Cc: Krzysztof Kozlowski Cc: Sylwester Nawrocki Cc: Thomas Abraham Cc: linux-samsung-soc@vger.kernel.org Link: https://lore.kernel.org/r/20200713144930.1034632-7-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 0b33c72a19bdaf5a6a2ea78556d6be47bce2bc95 Author: Lee Jones Date: Mon Jul 13 15:49:10 2020 +0100 pinctrl: qcom: pinctrl-msm: Complete 'struct msm_pinctrl' documentation Add missing descriptions for attributes and fix 1 formatting issue. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/qcom/pinctrl-msm.c:75: warning: Function parameter or member 'desc' not described in 'msm_pinctrl' drivers/pinctrl/qcom/pinctrl-msm.c:75: warning: Function parameter or member 'irq_chip' not described in 'msm_pinctrl' drivers/pinctrl/qcom/pinctrl-msm.c:75: warning: Function parameter or member 'intr_target_use_scm' not described in 'msm_pinctrl' drivers/pinctrl/qcom/pinctrl-msm.c:75: warning: Function parameter or member 'soc' not described in 'msm_pinctrl' drivers/pinctrl/qcom/pinctrl-msm.c:75: warning: Function parameter or member 'phys_base' not described in 'msm_pinctrl' Signed-off-by: Lee Jones Cc: Bjorn Andersson Cc: Andy Gross Cc: linux-arm-msm@vger.kernel.org Link: https://lore.kernel.org/r/20200713144930.1034632-6-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 2dd2dbc527ff9a505a020a154d309a691668abc5 Author: Lee Jones Date: Mon Jul 13 15:49:09 2020 +0100 pinctrl: bcm: pinctrl-iproc-gpio: Rename incorrectly documented function param Fixes the following W=1 kernel build warning(s): drivers/pinctrl/bcm/pinctrl-iproc-gpio.c:141: warning: Function parameter or member 'chip' not described in 'iproc_set_bit' drivers/pinctrl/bcm/pinctrl-iproc-gpio.c:141: warning: Excess function parameter 'iproc_gpio' description in 'iproc_set_bit' Signed-off-by: Lee Jones Acked-by: Scott Branden Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Link: https://lore.kernel.org/r/20200713144930.1034632-5-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 1294754e1c1f72809e1bf9a6ecd209f472c5adb7 Author: Lee Jones Date: Mon Jul 13 15:49:08 2020 +0100 pinctrl: bcm: pinctrl-bcm281xx: Demote obvious misuse of kerneldoc to standard comment blocks There has been little to no attempt to document any of the demoted structures here. These are obviously not kerneldoc headers. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/bcm/pinctrl-bcm281xx.c:65: warning: cannot understand function prototype: 'enum bcm281xx_pin_type ' drivers/pinctrl/bcm/pinctrl-bcm281xx.c:79: warning: cannot understand function prototype: 'struct bcm281xx_pin_function ' drivers/pinctrl/bcm/pinctrl-bcm281xx.c:89: warning: cannot understand function prototype: 'struct bcm281xx_pinctrl_data ' Signed-off-by: Lee Jones Acked-by: Scott Branden Cc: Florian Fainelli Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Cc: YueHaibing Link: https://lore.kernel.org/r/20200713144930.1034632-4-lee.jones@linaro.org Signed-off-by: Linus Walleij commit bef63e6615e3411a830e34b993c15721ab0a3550 Author: Lee Jones Date: Mon Jul 13 15:49:07 2020 +0100 pinctrl: sirf: pinctrl-atlas7: Fix a bunch of documentation misdemeanours >From ill formatted kerneldoc, to incomplete *and* incorrect struct headers, through to formatting issues and missing attribute descriptions. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/sirf/pinctrl-atlas7.c:197: warning: Function parameter or member 'id' not described in 'atlas7_pad_config' drivers/pinctrl/sirf/pinctrl-atlas7.c:221: warning: Function parameter or member 'func' not described in 'atlas7_pad_status' drivers/pinctrl/sirf/pinctrl-atlas7.c:221: warning: Function parameter or member 'pull' not described in 'atlas7_pad_status' drivers/pinctrl/sirf/pinctrl-atlas7.c:221: warning: Function parameter or member 'dstr' not described in 'atlas7_pad_status' drivers/pinctrl/sirf/pinctrl-atlas7.c:221: warning: Function parameter or member 'reserved' not described in 'atlas7_pad_status' drivers/pinctrl/sirf/pinctrl-atlas7.c:359: warning: Cannot understand * @dev: a pointer back to containing device on line 359 - I thought it was a doc line drivers/pinctrl/sirf/pinctrl-atlas7.c:4794: warning: Function parameter or member 'pad_type' not described in 'atlas7_pull_info' drivers/pinctrl/sirf/pinctrl-atlas7.c:4917: warning: Function parameter or member 'reserved' not described in 'atlas7_ds_info' drivers/pinctrl/sirf/pinctrl-atlas7.c:5617: warning: Function parameter or member 'a7gc' not described in 'atlas7_gpio_to_bank' drivers/pinctrl/sirf/pinctrl-atlas7.c:5617: warning: Function parameter or member 'gpio' not described in 'atlas7_gpio_to_bank' Signed-off-by: Lee Jones Cc: Barry Song Link: https://lore.kernel.org/r/20200713144930.1034632-3-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 80fa3300b7e5d738365698052d999ea71bb24723 Author: Lee Jones Date: Mon Jul 13 15:49:06 2020 +0100 pinctrl: actions: pinctrl-owl: Supply missing 'struct owl_pinctrl' attribute descriptions Fixes the following W=1 kernel build warning(s): drivers/pinctrl/actions/pinctrl-owl.c:52: warning: Function parameter or member 'clk' not described in 'owl_pinctrl' drivers/pinctrl/actions/pinctrl-owl.c:52: warning: Function parameter or member 'irq_chip' not described in 'owl_pinctrl' drivers/pinctrl/actions/pinctrl-owl.c:52: warning: Function parameter or member 'num_irq' not described in 'owl_pinctrl' drivers/pinctrl/actions/pinctrl-owl.c:52: warning: Function parameter or member 'irq' not described in 'owl_pinctrl' Signed-off-by: Lee Jones Reviewed-by: Manivannan Sadhasivam Cc: "Andreas Färber" Cc: Manivannan Sadhasivam Cc: David Liu Link: https://lore.kernel.org/r/20200713144930.1034632-2-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 761b5c30c206ba1788c6ceb23e5812f319548b52 Author: Andy Shevchenko Date: Mon Jul 13 18:44:29 2020 +0300 gpio: mmio: replace open-coded for_each_set_bit() Use for_each_set_bit() instead of open-coding it to simplify the code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200713154429.23662-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit d4ff18b86a2aff3da16998f64c02ccd9f8a62c2d Author: Sumit Gupta Date: Wed Jul 15 19:01:24 2020 +0530 arm64: tegra: Add compatible string for Tegra194 CPU complex On Tegra194, data on valid operating points for the CPUs needs to be queried from BPMP. However, there is no node representing CPU complex. So, add a compatible string to the 'cpus' node instead of using dummy node to bind the cpufreq driver to. Also, add reference to the BPMP instance for the CPU complex. Signed-off-by: Sumit Gupta Signed-off-by: Thierry Reding commit eb93bd8d273bdbb6aa211fcd9165f9755ec86eaa Author: Thierry Reding Date: Thu Jun 25 13:39:10 2020 +0200 arm64: tegra: Add HDMI supplies on Norrin The SOR controller needs the AVDD I/O and VDD HDMI PLL supplies in order to operate correctly. Make sure to specify them for the Norrin board. Signed-off-by: Thierry Reding commit 4087162fecf4e226a4a3783694aeabf33831ea5a Author: Thierry Reding Date: Wed Jul 15 11:51:46 2020 +0200 arm64: tegra: Add #{address,size}-cells for VI I2C on Tegra210 The VI I2C controller provides an I2C bus and therefore needs to define the #address-cells and #size-cells properties. Signed-off-by: Thierry Reding commit 139a390c091b3941e8519be33f8942e35762bdbf Author: Sowjanya Komatineni Date: Tue Jul 14 21:20:39 2020 -0700 arm64: tegra: Add missing clocks and power-domains to Tegra210 VI I2C Tegra210 VI I2C is in VE power domain and i2c-vi node should have power-domains property. Current Tegra210 i2c-vi device node is missing both VI I2C clocks and power-domains property. This patch adds them. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 4dc5794cf207a2f9992a91426fe0413aab77e1cd Author: Sungbo Eo Date: Wed Jul 1 01:09:34 2020 +0900 gpio: pca9570: Add DT bindings for NXP PCA9570 This patch adds device tree bindings for the NXP PCA9570, a 4-bit I2C GPO expander. Signed-off-by: Sungbo Eo Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200630160934.1197066-1-mans0n@gorani.run Signed-off-by: Linus Walleij commit 16d44b6085c1d90884b264deb938a34ab85a9c6d Author: Sungbo Eo Date: Thu Jul 9 22:48:29 2020 +0900 gpio: pca9570: add GPO driver for PCA9570 NXP PCA9570 is a 4-bit I2C GPO expander without interrupt functionality. Its ports are controlled only by a data byte without register address. Signed-off-by: Sungbo Eo Reviewed-by: Andy Shevchenko Datasheet: https://www.nxp.com/docs/en/data-sheet/PCA9570.pdf Link: https://lore.kernel.org/r/20200709134829.216393-1-mans0n@gorani.run Signed-off-by: Linus Walleij commit 78d15eea088c6b911d7926625b815630b5939ed1 Author: Alexander A. Klimov Date: Wed Jul 15 20:57:44 2020 +0200 platform/x86: acerhdf: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Andy Shevchenko commit 3a3cb021b0380e2cbf7e1d158c37402874b54a9a Author: Dmitry Osipenko Date: Mon Jun 29 05:54:56 2020 +0300 ARM: tegra_defconfig: Enable options useful for Nexus 7 and Acer A500 Enable several very useful options and drivers for hardware that is found on Nexus 7 and Acer A500 tablet devices. Please note that some drivers may require firmware files extracted from original Android image. Link: https://github.com/grate-driver/linux-firmware Link: https://github.com/grate-driver/alsa-ucm-conf Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c259dacde2169caaa0324ba4eac37aa9d1f0e3ee Author: Dmitry Osipenko Date: Mon Jun 29 05:54:55 2020 +0300 dt-bindings: ARM: tegra: Add ASUS Google Nexus 7 Add a binding for the Tegra30-based ASUS Google Nexus 7 tablet device. Acked-by: Rob Herring Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit ee0b73a1be6e2886e9718fbb37ca2e916ad05a28 Author: Dmitry Osipenko Date: Mon Jun 29 05:54:54 2020 +0300 dt-bindings: ARM: tegra: Add Acer Iconia Tab A500 Add a binding for the Tegra20-based Acer Iconia Tab A500 tablet device. Acked-by: Rob Herring Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 0e0a68608f27a3d2fd8c2ee1c4b164926c80a712 Author: Dmitry Osipenko Date: Mon Jun 29 05:54:53 2020 +0300 dt-bindings: Add vendor prefix for Acer Inc. Acer is a hardware and electronics corporation, specializing in advanced electronics technology. Acer's products include desktop PCs, laptop PCs, tablets, servers, displays, storage devices, virtual reality devices, smartphones and peripherals. Their web site is http://www.acer.com/. Acked-by: Rob Herring Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 2720008f4239cf36d57b8d0b3cb2a49d4368a378 Author: Dmitry Osipenko Date: Mon Jun 29 05:54:52 2020 +0300 ARM: tegra: Add device-tree for ASUS Google Nexus 7 There are few hardware variants of NVIDIA Tegra30-based Nexus 7 device: 1. WiFi-only (named Grouper) 2. GSM (named Tilapia) 3. Using Maxim PMIC (E1565 board ID) 4. Using Ti PMIC (PM269 board ID) This patch adds device-trees for known and tested variants. Link: https://wiki.postmarketos.org/wiki/Google_Nexus_7_2012_(asus-grouper) Tested-by: Pedro Ângelo Tested-by: Matt Merhar Tested-by: Zack Pearsall Signed-off-by: David Heidelberg Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 674b5102e3bbafcab49b211df06f2ff572d484da Author: Dmitry Osipenko Date: Mon Jun 29 05:54:51 2020 +0300 ARM: tegra: Add device-tree for Acer Iconia Tab A500 Add device-tree for Acer Iconia Tab A500, which is NVIDIA Tegra20-based tablet device. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 1b3eeb8761f053422a4b3bcb024fc3bf41e12304 Author: Christophe JAILLET Date: Sun Jul 12 23:14:24 2020 +0200 crypto: chelsio - Fix some pr_xxx messages At the top this file, we have: #define pr_fmt(fmt) "chcr:" fmt So there is no need to repeat "chcr : " in some error message when the pr_xxx macro is used. This would lead to log "chcr:chcr : blabla" Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit d110cf0ac1bf24ac098b8ea5b0188c717acf7a02 Author: Christophe JAILLET Date: Sun Jul 12 23:14:04 2020 +0200 crypto: chelsio - Avoid some code duplication The error handling path of 'chcr_authenc_setkey()' is the same as this error handling code. So just 'goto out' as done everywhere in the function to simplify the code. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit e456ef6ace3451fa46bd67983345ea758f824865 Author: Eric Biggers Date: Fri Jul 10 20:36:49 2020 -0700 crypto: lrw - prefix function and struct names with "lrw" Overly-generic names can cause problems like naming collisions, confusing crash reports, and reduced grep-ability. E.g. see commit d099ea6e6fde ("crypto - Avoid free() namespace collision"). Clean this up for the lrw template by prefixing the names with "lrw_". (I didn't use "crypto_lrw_" instead because that seems overkill.) Also constify the tfm context in a couple places. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit a874f59104304278f922215caaa9dbfb03b2a1fa Author: Eric Biggers Date: Fri Jul 10 20:34:28 2020 -0700 crypto: xts - prefix function and struct names with "xts" Overly-generic names can cause problems like naming collisions, confusing crash reports, and reduced grep-ability. E.g. see commit d099ea6e6fde ("crypto - Avoid free() namespace collision"). Clean this up for the xts template by prefixing the names with "xts_". (I didn't use "crypto_xts_" instead because that seems overkill.) Also constify the tfm context in a couple places, and make xts_free_instance() use the instance context structure so that it doesn't just assume the crypto_skcipher_spawn is at the beginning. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 10f33d391ebd4edc861685ed0566cf807a363661 Author: Hui Tang Date: Fri Jul 10 15:40:46 2020 +0800 crypto: hisilicon/hpre - disable FLR triggered by hardware for Hi1620 hardware, we should disable these hardware flr: 1. BME_FLR - bit 7, 2. PM_FLR - bit 11, 3. SRIOV_FLR - bit 12, Or HPRE may goto D3 state, when we bind and unbind HPRE quickly, as it does FLR triggered by BME/PM/SRIOV. Fixes: c8b4b477079d("crypto: hisilicon - add HiSilicon HPRE accelerator") Signed-off-by: Hui Tang Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit dadbe4c11753581d959b866198a48f5727fdc7c3 Author: Meng Yu Date: Fri Jul 10 15:40:45 2020 +0800 crypto: hisilicon/hpre - update debugfs interface parameters Update debugfs interface parameters, and adjust the processing logic inside the corresponding function. Fixes: 848974151618("crypto: hisilicon - Add debugfs for HPRE") Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit a0c34e8dd8646957a68aa6e3946b9c87554bd6e1 Author: Meng Yu Date: Fri Jul 10 15:40:44 2020 +0800 crypto: hisilicon/hpre - Add a switch in sriov_configure If CONFIG_PCI_IOV is not enabled, we can not use "sriov_configure". Fixes: 5ec302a364bf("crypto: hisilicon - add SRIOV support for HPRE") Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Shukun Tan Signed-off-by: Herbert Xu commit a14f6609b0c4e09d2f440d0b389224fbf851630e Author: Meng Yu Date: Fri Jul 10 15:40:43 2020 +0800 crypto: hisilicon/hpre - Modify the Macro definition and format 1. Bit 1 to bit 5 are NFE, not CE. 2. Macro 'HPRE_VF_NUM' is defined in 'qm.h', so delete it here. 3. Delete multiple blank lines. 4. Adjust format alignment. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Longfang Liu Signed-off-by: Herbert Xu commit 6bc937b0b97539ab702a8b0928c0b0ee7a2f264a Author: Hui Tang Date: Fri Jul 10 15:40:42 2020 +0800 crypto: hisilicon/hpre - HPRE_OVERTIME_THRHLD can be written by debugfs Registers in "hpre_dfx_files" can only be cleaned to zero but HPRE_OVERTIME_THRHLD, which can be written as any number. Fixes: 64a6301ebee7("crypto: hisilicon/hpre - add debugfs for ...") Signed-off-by: Hui Tang Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Zhou Wang Signed-off-by: Herbert Xu commit d7ba2c09e1aa03e01e1e3be55c8a5f4610500164 Author: Meng Yu Date: Fri Jul 10 15:40:41 2020 +0800 crypto: hisilicon/hpre - Init the value of current_q of debugfs Initialize current queue number as HPRE_PF_DEF_Q_NUM, or it is zero and we can't set its value by "current_q_write". Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Hui Tang Signed-off-by: Herbert Xu commit b8aa7dc5c7535f9abfca4bceb0ade9ee10cf5f54 Author: Mikulas Patocka Date: Thu Jul 9 23:20:41 2020 -0700 crypto: drivers - set the flag CRYPTO_ALG_ALLOCATES_MEMORY Set the flag CRYPTO_ALG_ALLOCATES_MEMORY in the crypto drivers that allocate memory. drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c: sun8i_ce_cipher drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c: sun8i_ss_cipher drivers/crypto/amlogic/amlogic-gxl-core.c: meson_cipher drivers/crypto/axis/artpec6_crypto.c: artpec6_crypto_common_init drivers/crypto/bcm/cipher.c: spu_skcipher_rx_sg_create drivers/crypto/caam/caamalg.c: aead_edesc_alloc drivers/crypto/caam/caamalg_qi.c: aead_edesc_alloc drivers/crypto/caam/caamalg_qi2.c: aead_edesc_alloc drivers/crypto/caam/caamhash.c: hash_digest_key drivers/crypto/cavium/cpt/cptvf_algs.c: process_request drivers/crypto/cavium/nitrox/nitrox_aead.c: nitrox_process_se_request drivers/crypto/cavium/nitrox/nitrox_skcipher.c: nitrox_process_se_request drivers/crypto/ccp/ccp-crypto-aes-cmac.c: ccp_do_cmac_update drivers/crypto/ccp/ccp-crypto-aes-galois.c: ccp_crypto_enqueue_request drivers/crypto/ccp/ccp-crypto-aes-xts.c: ccp_crypto_enqueue_request drivers/crypto/ccp/ccp-crypto-aes.c: ccp_crypto_enqueue_request drivers/crypto/ccp/ccp-crypto-des3.c: ccp_crypto_enqueue_request drivers/crypto/ccp/ccp-crypto-sha.c: ccp_crypto_enqueue_request drivers/crypto/chelsio/chcr_algo.c: create_cipher_wr drivers/crypto/hisilicon/sec/sec_algs.c: sec_alloc_and_fill_hw_sgl drivers/crypto/hisilicon/sec2/sec_crypto.c: sec_alloc_req_id drivers/crypto/inside-secure/safexcel_cipher.c: safexcel_queue_req drivers/crypto/inside-secure/safexcel_hash.c: safexcel_ahash_enqueue drivers/crypto/ixp4xx_crypto.c: ablk_perform drivers/crypto/marvell/cesa/cipher.c: mv_cesa_skcipher_dma_req_init drivers/crypto/marvell/cesa/hash.c: mv_cesa_ahash_dma_req_init drivers/crypto/marvell/octeontx/otx_cptvf_algs.c: create_ctx_hdr drivers/crypto/n2_core.c: n2_compute_chunks drivers/crypto/picoxcell_crypto.c: spacc_sg_to_ddt drivers/crypto/qat/qat_common/qat_algs.c: qat_alg_skcipher_encrypt drivers/crypto/qce/skcipher.c: qce_skcipher_async_req_handle drivers/crypto/talitos.c : talitos_edesc_alloc drivers/crypto/virtio/virtio_crypto_algs.c: __virtio_crypto_skcipher_do_req drivers/crypto/xilinx/zynqmp-aes-gcm.c: zynqmp_aes_aead_cipher Signed-off-by: Mikulas Patocka [EB: avoid overly-long lines] Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit fbb6cda44190d72aa5199d728797aabc6d2ed816 Author: Eric Biggers Date: Thu Jul 9 23:20:40 2020 -0700 crypto: algapi - introduce the flag CRYPTO_ALG_ALLOCATES_MEMORY Introduce a new algorithm flag CRYPTO_ALG_ALLOCATES_MEMORY. If this flag is set, then the driver allocates memory in its request routine. Such drivers are not suitable for disk encryption because GFP_ATOMIC allocation can fail anytime (causing random I/O errors) and GFP_KERNEL allocation can recurse into the block layer, causing a deadlock. For now, this flag is only implemented for some algorithm types. We also assume some usage constraints for it to be meaningful, since there are lots of edge cases the crypto API allows (e.g., misaligned or fragmented scatterlists) that mean that nearly any crypto algorithm can allocate memory in some case. See the comment for details. Also add this flag to CRYPTO_ALG_INHERITED_FLAGS so that when a template is instantiated, this flag is set on the template instance if it is set on any algorithm the instance uses. Based on a patch by Mikulas Patocka (https://lore.kernel.org/r/alpine.LRH.2.02.2006301414580.30526@file01.intranet.prod.int.rdu2.redhat.com). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 2eb27c11937ee9984c04b75d213a737291c5f58c Author: Eric Biggers Date: Thu Jul 9 23:20:39 2020 -0700 crypto: algapi - add NEED_FALLBACK to INHERITED_FLAGS CRYPTO_ALG_NEED_FALLBACK is handled inconsistently. When it's requested to be clear, some templates propagate that request to child algorithms, while others don't. It's apparently desired for NEED_FALLBACK to be propagated, to avoid deadlocks where a module tries to load itself while it's being initialized, and to avoid unnecessarily complex fallback chains where we have e.g. cbc-aes-$driver falling back to cbc(aes-$driver) where aes-$driver itself falls back to aes-generic, instead of cbc-aes-$driver simply falling back to cbc(aes-generic). There have been a number of fixes to this effect: commit 89027579bc6c ("crypto: xts - Propagate NEED_FALLBACK bit") commit d2c2a85cfe82 ("crypto: ctr - Propagate NEED_FALLBACK bit") commit e6c2e65c70a6 ("crypto: cbc - Propagate NEED_FALLBACK bit") But it seems that other templates can have the same problems too. To avoid this whack-a-mole, just add NEED_FALLBACK to INHERITED_FLAGS so that it's always inherited. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 7bcb2c99f8ed032cfb3f5596b4dccac6b1f501df Author: Eric Biggers Date: Thu Jul 9 23:20:38 2020 -0700 crypto: algapi - use common mechanism for inheriting flags The flag CRYPTO_ALG_ASYNC is "inherited" in the sense that when a template is instantiated, the template will have CRYPTO_ALG_ASYNC set if any of the algorithms it uses has CRYPTO_ALG_ASYNC set. We'd like to add a second flag (CRYPTO_ALG_ALLOCATES_MEMORY) that gets "inherited" in the same way. This is difficult because the handling of CRYPTO_ALG_ASYNC is hardcoded everywhere. Address this by: - Add CRYPTO_ALG_INHERITED_FLAGS, which contains the set of flags that have these inheritance semantics. - Add crypto_algt_inherited_mask(), for use by template ->create() methods. It returns any of these flags that the user asked to be unset and thus must be passed in the 'mask' to crypto_grab_*(). - Also modify crypto_check_attr_type() to handle computing the 'mask' so that most templates can just use this. - Make crypto_grab_*() propagate these flags to the template instance being created so that templates don't have to do this themselves. Make crypto/simd.c propagate these flags too, since it "wraps" another algorithm, similar to a template. Based on a patch by Mikulas Patocka (https://lore.kernel.org/r/alpine.LRH.2.02.2006301414580.30526@file01.intranet.prod.int.rdu2.redhat.com). Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 4688111e78ed432b19c3cd6de545c83c47dc28b3 Author: Eric Biggers Date: Thu Jul 9 23:20:37 2020 -0700 crypto: seqiv - remove seqiv_create() seqiv_create() is pointless because it just checks that the template is being instantiated as an AEAD, then calls seqiv_aead_create(). But seqiv_aead_create() does the exact same check, via aead_geniv_alloc(). Just remove seqiv_create() and use seqiv_aead_create() directly. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit e72b48c5e7fe0c9fabeb23385b6e6f02f0a78d37 Author: Eric Biggers Date: Thu Jul 9 23:20:36 2020 -0700 crypto: geniv - remove unneeded arguments from aead_geniv_alloc() The type and mask arguments to aead_geniv_alloc() are always 0, so remove them. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit d7866e503bdca854e6bc64521f030404d7cab642 Author: Uros Bizjak Date: Thu Jul 9 17:08:57 2020 +0200 crypto: x86 - Remove include/asm/inst.h Current minimum required version of binutils is 2.23, which supports PSHUFB, PCLMULQDQ, PEXTRD, AESKEYGENASSIST, AESIMC, AESENC, AESENCLAST, AESDEC, AESDECLAST and MOVQ instruction mnemonics. Substitute macros from include/asm/inst.h with a proper instruction mnemonics in various assmbly files from x86/crypto directory, and remove now unneeded file. The patch was tested by calculating and comparing sha256sum hashes of stripped object files before and after the patch, to be sure that executable code didn't change. Signed-off-by: Uros Bizjak CC: Herbert Xu CC: "David S. Miller" CC: Thomas Gleixner CC: Ingo Molnar CC: Borislav Petkov CC: "H. Peter Anvin" Signed-off-by: Herbert Xu commit 2c2e18369f62da8217be0fbca3b94160da75cba3 Author: Herbert Xu Date: Thu Jul 9 22:44:04 2020 +1000 crypto: ccp - Silence strncpy warning This patch kills an strncpy by using strscpy instead. The name would be silently truncated if it is too long. Signed-off-by: Herbert Xu Acked-by: John Allen Signed-off-by: Herbert Xu commit 8832cfd3a036ebf7b4a5d9423b60e8d8b5a2f339 Author: Alexander A. Klimov Date: Thu Jul 9 12:35:39 2020 +0200 hwrng: ks-sa - Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Herbert Xu commit 9d4cafa5a04aeba68cc12de47ffcd975079e2f83 Author: Eric Biggers Date: Wed Jul 8 09:39:43 2020 -0700 ASoC: cros_ec_codec: use sha256() instead of open coding Now that there's a function that calculates the SHA-256 digest of a buffer in one step, use it instead of sha256_init() + sha256_update() + sha256_final(). Also simplify the code by inlining calculate_sha256() into its caller and switching a debug log statement to use %*phN instead of bin2hex(). Acked-by: Tzung-Bi Shih Reviewed-by: Ard Biesheuvel Cc: alsa-devel@alsa-project.org Cc: Ard Biesheuvel Cc: Cheng-Yi Chiang Cc: Enric Balletbo i Serra Cc: Guenter Roeck Cc: Tzung-Bi Shih Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 5a7a0d9400677a5e88fdb362c4d32171384068f2 Author: Eric Biggers Date: Wed Jul 8 09:39:42 2020 -0700 mptcp: use sha256() instead of open coding Now that there's a function that calculates the SHA-256 digest of a buffer in one step, use it instead of sha256_init() + sha256_update() + sha256_final(). Reviewed-by: Ard Biesheuvel Acked-by: Matthieu Baerts Cc: mptcp@lists.01.org Cc: Mat Martineau Cc: Matthieu Baerts Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 2164960df8f531a06805fdd28d41758ce7691f75 Author: Eric Biggers Date: Wed Jul 8 09:39:41 2020 -0700 efi: use sha256() instead of open coding Now that there's a function that calculates the SHA-256 digest of a buffer in one step, use it instead of sha256_init() + sha256_update() + sha256_final(). Reviewed-by: Ard Biesheuvel Tested-by: Hans de Goede Cc: linux-efi@vger.kernel.org Cc: Ard Biesheuvel Cc: Hans de Goede Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 9ea9c58b40a441a0babef8c615acedcfb3733919 Author: Eric Biggers Date: Wed Jul 8 09:39:40 2020 -0700 crypto: lib/sha256 - add sha256() function Add a function sha256() which computes a SHA-256 digest in one step, combining sha256_init() + sha256_update() + sha256_final(). This is similar to how we also have blake2s(). Reviewed-by: Ard Biesheuvel Tested-by: Hans de Goede Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 6e8f972fc3fb03797abb88feee6704dccada93f6 Author: Eric Biggers Date: Wed Jul 8 09:39:39 2020 -0700 crypto: sparc - rename sha256 to sha256_alg To avoid a naming collision when we add a sha256() library function, rename the "sha256" static variable in sha256_glue.c to "sha256_alg". For consistency, also rename "sha224" to "sha224_alg". Reported-by: kernel test robot Cc: sparclinux@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit e79a31715193686e92dadb4caedfbb1f5de3659c Author: Ard Biesheuvel Date: Wed Jul 8 12:11:18 2020 +0300 crypto: x86/chacha-sse3 - use unaligned loads for state array Due to the fact that the x86 port does not support allocating objects on the stack with an alignment that exceeds 8 bytes, we have a rather ugly hack in the x86 code for ChaCha to ensure that the state array is aligned to 16 bytes, allowing the SSE3 implementation of the algorithm to use aligned loads. Given that the performance benefit of using of aligned loads appears to be limited (~0.25% for 1k blocks using tcrypt on a Corei7-8650U), and the fact that this hack has leaked into generic ChaCha code, let's just remove it. Cc: Martin Willi Cc: Herbert Xu Cc: Eric Biggers Signed-off-by: Ard Biesheuvel Reviewed-by: Martin Willi Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 06cc2afbbdf9a9e8df3e2f8db724997dd6e1b4ac Author: Herbert Xu Date: Wed Jul 8 12:41:13 2020 +1000 crypto: lib/chacha20poly1305 - Add missing function declaration This patch adds a declaration for chacha20poly1305_selftest to silence a sparse warning. Signed-off-by: Herbert Xu commit f441ba2ad34102692b9836923776f017b40afc88 Author: Ard Biesheuvel Date: Tue Jul 7 09:32:03 2020 +0300 crypto: mediatek - use AES library for GCM key derivation The Mediatek accelerator driver calls into a dynamically allocated skcipher of the ctr(aes) variety to perform GCM key derivation, which involves AES encryption of a single block consisting of NUL bytes. There is no point in using the skcipher API for this, so use the AES library interface instead. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 56ca499f1b58235d5b3f247a887cc636d849d351 Author: Ard Biesheuvel Date: Tue Jul 7 09:32:02 2020 +0300 crypto: sahara - permit asynchronous skcipher as fallback Even though the sahara driver implements asynchronous versions of ecb(aes) and cbc(aes), the fallbacks it allocates are required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. Signed-off-by: Ard Biesheuvel Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 90e2f782719fc5ad2af63096815a69c5320704cb Author: Ard Biesheuvel Date: Tue Jul 7 09:32:01 2020 +0300 crypto: qce - permit asynchronous skcipher as fallback Even though the qce driver implements asynchronous versions of ecb(aes), cbc(aes)and xts(aes), the fallbacks it allocates are required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. While at it, remove the pointless memset() from qce_skcipher_init(), and remove the call to it qce_skcipher_init_fallback(). Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit dc6e71c9d9cfef98b95cb6e7e91ed2bb64b63e76 Author: Ard Biesheuvel Date: Tue Jul 7 09:32:00 2020 +0300 crypto: picoxcell - permit asynchronous skcipher as fallback Even though the picoxcell driver implements asynchronous versions of ecb(aes) and cbc(aes), the fallbacks it allocates are required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. Signed-off-by: Ard Biesheuvel Reviewed-by: Jamie Iles Signed-off-by: Herbert Xu commit c9598d4e13ca0a6747235257a8e38cdef6973d8e Author: Ard Biesheuvel Date: Tue Jul 7 09:31:59 2020 +0300 crypto: mxs-dcp - permit asynchronous skcipher as fallback Even though the mxs-dcp driver implements asynchronous versions of ecb(aes) and cbc(aes), the fallbacks it allocates are required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. Signed-off-by: Ard Biesheuvel Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit d8c6d1886c8f436da96c0d91010040ca7caae9ac Author: Ard Biesheuvel Date: Tue Jul 7 09:31:58 2020 +0300 crypto: chelsio - permit asynchronous skcipher as fallback Even though the chelsio driver implements asynchronous versions of cbc(aes) and xts(aes), the fallbacks it allocates are required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 413b61ce0b4de0e55a9f8cf91bbce1ad7e0870cd Author: Ard Biesheuvel Date: Tue Jul 7 09:31:57 2020 +0300 crypto: ccp - permit asynchronous skcipher as fallback Even though the ccp driver implements an asynchronous version of xts(aes), the fallback it allocates is required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. Signed-off-by: Ard Biesheuvel Acked-by: John Allen Signed-off-by: Herbert Xu commit 44b591753731f12dcf5d8e72df69baa9f3c48921 Author: Ard Biesheuvel Date: Tue Jul 7 09:31:56 2020 +0300 crypto: sun8i-ss - permit asynchronous skcipher as fallback Even though the sun8i-ss driver implements asynchronous versions of ecb(aes) and cbc(aes), the fallbacks it allocates are required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. Signed-off-by: Ard Biesheuvel Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 31abd3eb3df6bd520fece598e31047a0f377953e Author: Ard Biesheuvel Date: Tue Jul 7 09:31:55 2020 +0300 crypto: sun8i-ce - permit asynchronous skcipher as fallback Even though the sun8i-ce driver implements asynchronous versions of ecb(aes) and cbc(aes), the fallbacks it allocates are required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. Signed-off-by: Ard Biesheuvel Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu commit 89fb00f245681d0c951cd889d3d165cf9959d70c Author: Ard Biesheuvel Date: Tue Jul 7 09:31:54 2020 +0300 crypto: sun4i - permit asynchronous skcipher as fallback Even though the sun4i driver implements asynchronous versions of ecb(aes) and cbc(aes), the fallbacks it allocates are required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. Signed-off-by: Ard Biesheuvel Tested-by: Corentin Labbe Signed-off-by: Herbert Xu commit 6a99d7a2d73cbeaa0b93551fc8ec887295821bbe Author: Ard Biesheuvel Date: Tue Jul 7 09:31:53 2020 +0300 crypto: omap-aes - permit asynchronous skcipher as fallback Even though the omap-aes driver implements asynchronous versions of ecb(aes), cbc(aes) and ctr(aes), the fallbacks it allocates are required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 1d63e4557f0d11fd795c7acd50a241da2d8bf89f Author: Ard Biesheuvel Date: Tue Jul 7 09:31:52 2020 +0300 crypto: amlogic-gxl - permit async skcipher as fallback Even though the amlogic-gxl driver implements asynchronous versions of ecb(aes) and cbc(aes), the fallbacks it allocates are required to be synchronous. Given that SIMD based software implementations are usually asynchronous as well, even though they rarely complete asynchronously (this typically only happens in cases where the request was made from softirq context, while SIMD was already in use in the task context that it interrupted), these implementations are disregarded, and either the generic C version or another table based version implemented in assembler is selected instead. Since falling back to synchronous AES is not only a performance issue, but potentially a security issue as well (due to the fact that table based AES is not time invariant), let's fix this, by allocating an ordinary skcipher as the fallback, and invoke it with the completion routine that was given to the outer request. Signed-off-by: Ard Biesheuvel Tested-by: Corentin Labbe Signed-off-by: Herbert Xu commit 3f368b886e95080daf811d228795c28716495279 Author: Ard Biesheuvel Date: Tue Jul 7 09:31:51 2020 +0300 crypto: amlogic-gxl - default to build as module The AmLogic GXL crypto accelerator driver is built into the kernel if ARCH_MESON is set. However, given the single image policy of arm64, its defconfig enables all platforms by default, and so ARCH_MESON is usually enabled. This means that the AmLogic driver causes the arm64 defconfig build to pull in a huge chunk of the crypto stack as a builtin as well, which is undesirable, so let's make the amlogic GXL driver default to 'm' instead. Signed-off-by: Ard Biesheuvel Tested-by: Corentin Labbe Signed-off-by: Herbert Xu commit 271dead302d3af20bdb917bffdb8d318e60c23d7 Author: Herbert Xu Date: Tue Jul 7 13:47:13 2020 +1000 hwrng: ba431 - Include kernel.h There are multiple things in this file that requires kernel.h but it's only included through other header files indirectly. This patch adds a direct inclusion as those indirect inclusions may go away at any point. Signed-off-by: Herbert Xu commit 38c3b74edf23dd2f175bc7801962acb3b0985201 Author: Longfang Liu Date: Tue Jul 7 09:15:41 2020 +0800 crypto: hisilicon/sec2 - fix some coding styles Modify some log output interfaces and update author information Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 6b534f7aaf0cf34658e0cdcd561514a174c4f9d2 Author: Longfang Liu Date: Tue Jul 7 09:15:40 2020 +0800 crypto: hisilicon/sec2 - update debugfs interface parameters Update debugfs interface parameters, and adjust the processing logic inside the corresponding function Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit d0228aeb4d65c6550eac6e7c3a91520d2ceedf4f Author: Longfang Liu Date: Tue Jul 7 09:15:39 2020 +0800 crypto: hisilicon/sec2 - update SEC initialization and reset Updates the initialization and reset of SEC driver's register operation. Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 9597efc3aed1ba8ad632e4987b1ee08af7ca943f Author: Kai Ye Date: Tue Jul 7 09:15:38 2020 +0800 crypto:hisilicon/sec2 - update busy processing logic As before, if a SEC queue is at the 'fake busy' status, the request with a 'fake busy' flag will be sent into hardware and the sending function returns busy. After the request is finished, SEC driver's call back will identify the 'fake busy' flag, and notifies the user that hardware is not busy now by calling user's call back function. Now, a request sent into busy hardware will be cached in the SEC queue's backlog, return '-EBUSY' to user. After the request being finished, the cached requests will be processed in the call back function. to notify the corresponding user that SEC queue can process more requests. Signed-off-by: Kai Ye Reviewed-by: Longfang Liu Signed-off-by: Herbert Xu commit 7dc95d0ea32e75c8b2cb883642f33353939c9bac Author: Kai Ye Date: Tue Jul 7 09:15:37 2020 +0800 crypto: hisilicon/sec2 - clear SEC debug regs SEC debug registers aren't cleared even if its driver is removed, so add a clearing operation in driver removing. Signed-off-by: Kai Ye Reviewed-by: Longfang Liu Signed-off-by: Herbert Xu commit eeedb618378f8a09779546a3eeac16b000447d62 Author: Herbert Xu Date: Thu Jul 16 21:45:03 2020 +1000 crypto: caam - Remove broken arc4 support The arc4 algorithm requires storing state in the request context in order to allow more than one encrypt/decrypt operation. As this driver does not seem to do that, it means that using it for more than one operation is broken. Fixes: eaed71a44ad9 ("crypto: caam - add ecb(*) support") Link: https://lore.kernel.org/linux-crypto/CAMj1kXGvMe_A_iQ43Pmygg9xaAM-RLy=_M=v+eg--8xNmv9P+w@mail.gmail.com Link: https://lore.kernel.org/linux-crypto/20200702101947.682-1-ardb@kernel.org Signed-off-by: Herbert Xu Acked-by: Ard Biesheuvel Acked-by: Horia Geantă Signed-off-by: Herbert Xu commit a5e6f964bb2c613933de58a35ddfa306128ba004 Author: Misono Tomohiro Date: Fri Jul 10 17:00:03 2020 +0900 rtc: cleanup obsolete comment about struct rtc_class_ops Commit ea369ea6d828 ("rtc: remove .open() and .release()") removes open/release callback from struct rtc_class_ops. Also commit 80d4bb515b78 ("RTC: Cleanup rtc_class_ops->irq_set_state") and commit 696160fec162 ("RTC: Cleanup rtc_class_ops->irq_set_freq()") removes irq callbacks. So, just remove related comments so that readers will not be confused. Signed-off-by: Misono Tomohiro Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200710080003.7986-1-misono.tomohiro@jp.fujitsu.com commit 67d0662ce9116eb6a5aa62ffd3cf61fce452d4be Author: Tiezhu Yang Date: Tue Jul 7 17:39:01 2020 +0800 MIPS: Prevent READ_IMPLIES_EXEC propagation In the MIPS architecture, we should clear the security-relevant flag READ_IMPLIES_EXEC in the function SET_PERSONALITY2() of the file arch/mips/include/asm/elf.h. Otherwise, with this flag set, PROT_READ implies PROT_EXEC for mmap to make memory executable that is not safe, because this condition allows an attacker to simply jump to and execute bytes that are considered to be just data [1]. In mm/mmap.c: unsigned long do_mmap(struct file *file, unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, vm_flags_t vm_flags, unsigned long pgoff, unsigned long *populate, struct list_head *uf) { [...] if ((prot & PROT_READ) && (current->personality & READ_IMPLIES_EXEC)) if (!(file && path_noexec(&file->f_path))) prot |= PROT_EXEC; [...] } By the way, x86 and ARM64 have done the similar thing. After commit 250c22777fe1 ("x86_64: move kernel"), in the file arch/x86/kernel/process_64.c: void set_personality_64bit(void) { [...] current->personality &= ~READ_IMPLIES_EXEC; } After commit 48f99c8ec0b2 ("arm64: Preventing READ_IMPLIES_EXEC propagation"), in the file arch/arm64/include/asm/elf.h: #define SET_PERSONALITY(ex) \ ({ \ clear_thread_flag(TIF_32BIT); \ current->personality &= ~READ_IMPLIES_EXEC; \ }) [1] https://insights.sei.cmu.edu/cert/2014/02/feeling-insecure-blame-your-parent.html Reported-by: Juxin Gao Co-developed-by: Juxin Gao Signed-off-by: Juxin Gao Signed-off-by: Tiezhu Yang Reviewed-by: Kees Cook Signed-off-by: Thomas Bogendoerfer commit 790ce3b40017bbd759a3d81e23c05d42b3d34b90 Author: Thomas Gleixner Date: Tue Jul 14 16:01:52 2020 +0200 x86/idtentry: Remove stale comment Stack switching for interrupt handlers happens in C now for both 64 and 32bit. Remove the stale comment which claims the contrary. Signed-off-by: Thomas Gleixner commit 49fbb25030265c660de732513f18275d88ff99d3 Author: John Garry Date: Tue Jun 23 01:28:37 2020 +0800 iommu/arm-smmu-v3: Fix trivial typo Set "cmq" -> "cmdq". Signed-off-by: John Garry Signed-off-by: Will Deacon commit 4df2ef85f0efe44505f511ca5e4455585f53a2da Author: Sudeep Holla Date: Tue Jul 14 13:45:56 2020 +0100 rtc: pl031: fix set_alarm by adding back call to alarm_irq_enable Commit c8ff5841a90b ("rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64") seemed to have accidentally removed the call to pl031_alarm_irq_enable from pl031_set_alarm while switching to 64-bit apis. Let us add back the same to get the set alarm functionality back. Fixes: c8ff5841a90b ("rtc: pl031: switch to rtc_time64_to_tm/rtc_tm_to_time64") Signed-off-by: Sudeep Holla Signed-off-by: Alexandre Belloni Tested-by: Valentin Schneider Cc: Linus Walleij Cc: Alexandre Belloni Link: https://lore.kernel.org/r/20200714124556.20294-1-sudeep.holla@arm.com commit d3de4beb14a887754b83843bf23b6dbe8d022764 Author: Johnson CH Chen (陳昭勳) Date: Thu Jul 9 06:34:06 2020 +0000 rtc: ds1374: wdt: Use watchdog core for watchdog part Let ds1374 watchdog use watchdog core functions. It also includes improving watchdog timer setting and nowayout, and just uses ioctl() of watchdog core. Signed-off-by: Johnson Chen Signed-off-by: Alexandre Belloni Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/HK2PR01MB328182D5A54BFAA8A22E448AFA640@HK2PR01MB3281.apcprd01.prod.exchangelabs.com commit 3567d3d1477289d2ee988ee007507fca69f97eb8 Author: Alexander A. Klimov Date: Mon Jul 6 08:27:27 2020 +0200 rtc: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200706062727.18481-1-grandmaster@al2klimov.de commit 22f8d5a1bf230cf8567a4121fc3789babb46336d Author: Huacai Chen Date: Sat Jun 20 20:04:43 2020 +0800 rtc: goldfish: Enable interrupt in set_alarm() when necessary When use goldfish rtc, the "hwclock" command fails with "select() to /dev/rtc to wait for clock tick timed out". This is because "hwclock" need the set_alarm() hook to enable interrupt when alrm->enabled is true. This operation is missing in goldfish rtc (but other rtc drivers, such as cmos rtc, enable interrupt here), so add it. Signed-off-by: Huacai Chen Signed-off-by: Jiaxun Yang Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1592654683-31314-1-git-send-email-chenhc@lemote.com commit d8f090dbeafdcc3d30761aa0062f19d1adf9ef08 Author: Krzysztof Kozlowski Date: Mon Jun 15 18:14:55 2020 +0200 rtc: max77686: Do not allow interrupt to fire before system resume The rtc-max77686 device shares the main interrupt line with parent MFD device (max77686 driver). During the system suspend, the parent MFD device disables this IRQ to prevent an early event happening before resuming I2C bus controller. The same should be done by rtc-max77686 driver because otherwise the interrupt handler max77686_rtc_alarm_irq() will be called before its resume function (max77686_rtc_resume()). Such issue is not fatal but disabling shared IRQ by all users ensures correct behavior. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200615161455.4420-1-krzk@kernel.org commit a859647b4e6bfeb192284d27d24b6a0c914cae1d Author: Peng Fan Date: Tue Jul 14 20:30:18 2020 +0800 mips/vdso: Fix resource leaks in genvdso.c Close "fd" before the return of map_vdso() and close "out_file" in main(). Signed-off-by: Peng Fan Signed-off-by: Thomas Bogendoerfer commit c8353fbdfcb4892f944510a1ffb869db6f180b34 Author: 周琰杰 (Zhou Yanjie) Date: Tue Jul 14 13:32:29 2020 +0800 MIPS: CU1000-Neo: Refresh defconfig to support LED. Refresh CU1000-Neo's defconfig to support LED. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Thomas Bogendoerfer commit 233ed6f31adf210499fae4a35d7d9b04f0f558d8 Author: 周琰杰 (Zhou Yanjie) Date: Tue Jul 14 13:32:28 2020 +0800 MIPS: Ingenic: Fix bugs and add missing LED node for X1000. 1.The CU1000-Neo board actually uses X1000E instead of X1000, so the wrongly written "ingenic,x1000" in compatible should be changed to "ingenic,x1000e". 2.Adjust the order of nodes according to the corresponding address value. 3.Drop unnecessary node in "wlan_pwrseq". 4.Add the leds node to "cu1000-neo.dts". Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Thomas Bogendoerfer commit 56d47fbbb7b4c3cf704c6ea61d6c1adf8667f43e Author: 周琰杰 (Zhou Yanjie) Date: Tue Jul 14 13:32:27 2020 +0800 MIPS: Ingenic: Add YSH & ATIL CU Neo board support. Add a device tree and a defconfig for the Ingenic X1830 based YSH & ATIL CU Neo board. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Thomas Bogendoerfer commit 1c3dea35372cd07612573e99f820d5e6833bf53e Author: 周琰杰 (Zhou Yanjie) Date: Tue Jul 14 13:32:26 2020 +0800 dt-bindings: MIPS: Add X1830 based CU1830-Neo and fix bug in CU1000-Neo. 1.Add bindings for Ingenic X1830 based board, prepare for later dts. 2.The CU1000-Neo board actually uses X1000E instead of X1000, so the wrongly written "ingenic,x1000" in bindings should be changed to "ingenic,x1000e", the corresponding dts file modification will be made in a patch later in this series. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Acked-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 63970c291d6cf50e93a3557695d6e6fc4ba323e6 Author: 周琰杰 (Zhou Yanjie) Date: Tue Jul 14 13:32:25 2020 +0800 MIPS: Ingenic: Add Ingenic X1830 support. Support the Ingenic X1830 SoC using the code under arch/mips/jz4740. This is left unselectable in Kconfig until a X1830 based board is added in a later commit. Tested-by: 周正 (Zhou Zheng) Signed-off-by: 周琰杰 (Zhou Yanjie) Signed-off-by: Thomas Bogendoerfer commit c7c101df0aecddb1ae56dd7f6705eb05cb59b88a Author: Sunguoyun Date: Tue Jul 14 14:07:47 2020 +0800 MIPS: fix vdso different address spaces sparse report build warning as follows: arch/mips/vdso/vdso-n32-image.c:13:35: incorrect type in assignment (different address spaces) @@ expected void *[usertype] vdso @@ got void [noderef] * @@ Reported-by: kernel test robot Signed-off-by: Sunguoyun Signed-off-by: Thomas Bogendoerfer commit ef054ad38825c9f027bfdc184fe4b47b46f48831 Author: Alexander A. Klimov Date: Tue Jul 14 21:12:26 2020 +0200 mips: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Thomas Bogendoerfer commit 770a697c45de1b40391c4fc0e6350135563e97a7 Author: Jiaxun Yang Date: Thu Jul 9 19:33:43 2020 +0800 MIPS: Loongson64: Load LS7A dtbs Load correct devicetree according to PRID and PCH type. Signed-off-by: Huacai Chen Signed-off-by: Jiaxun Yang Tested-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 24af105962c8004edb9f5bf84bc587cbb30e52de Author: Jiaxun Yang Date: Thu Jul 9 19:33:42 2020 +0800 MIPS: Loongson64: DeviceTree for LS7A PCH Add DeviceTree files for Classic Loongson64 Quad Core + LS7A boards and Generic Loongson64 Quad Core + LS7A boards. Signed-off-by: Huacai Chen Signed-off-by: Jiaxun Yang Tested-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit e6827bc3faa4da29ddbf48f48d04e87ca7c1c3c7 Author: Dmitry Osipenko Date: Thu Jul 9 20:12:03 2020 +0300 gpio: max77620: Initialize hardware state of interrupts I noticed on Nexus 7 that after rebooting from downstream kernel to upstream, the GPIO interrupt is triggering non-stop despite interrupts being disabled for all of GPIOs. This happens because Nexus 7 uses a soft-reboot, meaning that bootloader should take care of resetting hardware, but the bootloader doesn't do it well. As a result, GPIO interrupt may be left ON at a boot time. Let's mask all GPIO interrupts at the driver's initialization time in order to resolve the issue. Signed-off-by: Dmitry Osipenko Reviewed-by: Andy Shevchenko Acked-by: Laxman Dewangan Link: https://lore.kernel.org/r/20200709171203.12950-7-digetx@gmail.com Signed-off-by: Linus Walleij commit 15d9e7e847c04e7e118fc3edb969068b201bd0b3 Author: Dmitry Osipenko Date: Thu Jul 9 20:12:02 2020 +0300 gpio: max77620: Use irqchip template This change addresses one of the GPIO-core TODOs for the MAX77620 driver which requires modern drivers to use the irqchip template. Instead of using the GPIO's irqchip-helpers for creating the IRQ domain, the gpio_irq_chip structure is now filled by the driver itself and then gpiochip_add_data() takes care of instantiating the IRQ domain for us. Suggested-by: Andy Shevchenko Signed-off-by: Dmitry Osipenko Reviewed-by: Andy Shevchenko Acked-by: Laxman Dewangan Link: https://lore.kernel.org/r/20200709171203.12950-6-digetx@gmail.com Signed-off-by: Linus Walleij commit c607e5e2e4f4dc6e91da6fd81280f0474fdb6cd4 Author: Dmitry Osipenko Date: Thu Jul 9 20:12:01 2020 +0300 gpio: max77620: Don't shadow error code of platform_get_irq() The platform_get_irq() returns a positive interrupt number on success and negative error code on failure (zero shouldn't ever happen in practice, it would produce a noisy warning). Hence let's return the error code directly instead of overriding it with -ENODEV. Suggested-by: Andy Shevchenko Signed-off-by: Dmitry Osipenko Reviewed-by: Andy Shevchenko Acked-by: Laxman Dewangan Link: https://lore.kernel.org/r/20200709171203.12950-5-digetx@gmail.com Signed-off-by: Linus Walleij commit 78934d885eb237910fc9194e0eeeb96ca54b24ae Author: Dmitry Osipenko Date: Thu Jul 9 20:12:00 2020 +0300 gpio: max77620: Don't set of_node The gpiochip_add_data() takes care of setting the of_node to the parent's device of_node, hence there is no need to do it manually in the driver's code. This patch corrects the parent's device pointer and removes the unnecessary setting of the of_node. Suggested-by: Andy Shevchenko Signed-off-by: Dmitry Osipenko Reviewed-by: Andy Shevchenko Acked-by: Laxman Dewangan Link: https://lore.kernel.org/r/20200709171203.12950-4-digetx@gmail.com Signed-off-by: Linus Walleij commit 2a5e6f7eede8cd1c4bac0b8ec6491cec4e75c99a Author: Dmitry Osipenko Date: Thu Jul 9 20:11:59 2020 +0300 gpio: max77620: Fix missing release of interrupt The requested interrupt is never released by the driver. Fix this by using the resource-managed variant of request_threaded_irq(). Fixes: ab3dd9cc24d4 ("gpio: max77620: Fix interrupt handling") Signed-off-by: Dmitry Osipenko Reviewed-by: Andy Shevchenko Acked-by: Laxman Dewangan Cc: # 5.5+ Link: https://lore.kernel.org/r/20200709171203.12950-3-digetx@gmail.com Signed-off-by: Linus Walleij commit 4ee82256ee57db5c929d3c2f81f6620a0b31b4cd Author: Dmitry Osipenko Date: Thu Jul 9 20:11:58 2020 +0300 gpio: max77620: Replace 8 with MAX77620_GPIO_NR The MAX77620_GPIO_NR enum value represents the total number of GPIOs, let's use it instead of a raw value in order to improve the code's readability a tad. Signed-off-by: Dmitry Osipenko Reviewed-by: Andy Shevchenko Acked-by: Laxman Dewangan Link: https://lore.kernel.org/r/20200709171203.12950-2-digetx@gmail.com Signed-off-by: Linus Walleij commit a6aa35e30a7a2645e4630fab9fac2c6b823f8681 Author: Huacai Chen Date: Thu Jul 9 19:33:41 2020 +0800 MIPS: Loongson64: Fix machine naming From previous commits, the machine names with "loongson3-" prefix have renamed to "loongson64c-" prefix in documents, but the .dts files have not been updated as well. So fix it. Signed-off-by: Huacai Chen Tested-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit f59dc5119192be1a1dee826055c23885a7b3d347 Author: Zhi Li Date: Thu Jul 9 11:55:21 2020 +0800 MIPS: Loongson: Fix boot warning about hwmon_device_register() Replace hwmon_device_register() with hwmon_device_register_with_info() to fix the following boot warning : [ 9.029924] Loongson Hwmon Enter... [ 9.106850] (NULL device *): hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info(). Signed-off-by: Zhi Li Signed-off-by: Thomas Bogendoerfer commit 17cbb0702e89f36db7608a441e9557088bd790ea Author: Tiezhu Yang Date: Thu Jul 9 11:55:20 2020 +0800 MIPS: Loongson: Reduce possible loop times and add log in do_thermal_timer() Once the temperature of any CPUs is too high, it can power off immediately, no need to check the rest of CPUs, and it is better to print a log before power off, this is useful when analysis the abnormal issues. Signed-off-by: Tiezhu Yang Signed-off-by: Zhi Li Signed-off-by: Thomas Bogendoerfer commit f17d3f218d8639ea6195ce2c027f2bd83ed12e30 Author: Tiezhu Yang Date: Thu Jul 9 11:55:19 2020 +0800 MIPS: Loongson: Cleanup cpu_hwmon.c Fix the following checkpatch warnings and errors: ERROR: do not initialise statics to 0 +static int csr_temp_enable = 0; WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static SENSOR_DEVICE_ATTR(name, S_IRUGO, get_hwmon_name, NULL, 0); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static SENSOR_DEVICE_ATTR(temp1_input, S_IRUGO, get_cpu_temp, NULL, 1); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static SENSOR_DEVICE_ATTR(temp1_label, S_IRUGO, cpu_temp_label, NULL, 1); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static SENSOR_DEVICE_ATTR(temp2_input, S_IRUGO, get_cpu_temp, NULL, 2); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static SENSOR_DEVICE_ATTR(temp2_label, S_IRUGO, cpu_temp_label, NULL, 2); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static SENSOR_DEVICE_ATTR(temp3_input, S_IRUGO, get_cpu_temp, NULL, 3); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static SENSOR_DEVICE_ATTR(temp3_label, S_IRUGO, cpu_temp_label, NULL, 3); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static SENSOR_DEVICE_ATTR(temp4_input, S_IRUGO, get_cpu_temp, NULL, 4); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static SENSOR_DEVICE_ATTR(temp4_label, S_IRUGO, cpu_temp_label, NULL, 4); WARNING: Missing a blank line after declarations + int id = (to_sensor_dev_attr(attr))->index - 1; + return sprintf(buf, "CPU %d Temperature\n", id); WARNING: Missing a blank line after declarations + int value = loongson3_cpu_temp(id); + return sprintf(buf, "%d\n", value); ERROR: spaces required around that '=' (ctx:VxV) + for (i=0; i Signed-off-by: Zhi Li Signed-off-by: Thomas Bogendoerfer commit 7a98c066e9094963220760d211f5008eacf878c1 Author: Paul Cercueil Date: Tue Jun 23 20:24:32 2020 +0200 MIPS: ingenic: RS90: Added defconfig Add a basic default config for the RS-90 RetroMini board. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit ac6b13814f7af6981fb718fad8cf83199cd98dad Author: Paul Cercueil Date: Tue Jun 23 20:24:31 2020 +0200 MIPS: ingenic: Add support for the RS90 board The RS-90, better known as RetroMini, is a small and pocketable handheld gaming console from YLMChina. It has little more than a JZ4725B SoC, a NAND, a screen, some buttons and a speaker. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit c211ab5f5e6e304aee43bb5ef6919fbe4e41ef64 Author: Paul Cercueil Date: Tue Jun 23 20:24:30 2020 +0200 MIPS: ingenic: Add support for the JZ4725B SoC Add preliminary support for boards based on the JZ4725B SoC from Ingenic. The JZ4725B SoC is supposed to be older than the JZ4740 SoC, but its internals are much closer to what can be found on the JZ4750 and newer SoCs. It is low-power SoC with a MIPS32r1 SoC running at ~360 MHz, and no FPU. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 68c48f7ce95a9d5d8e8c0296ce8c1f348c792d10 Author: Paul Cercueil Date: Tue Jun 23 20:24:29 2020 +0200 MIPS: ingenic: Use enum instead of macros for Ingenic SoCs Use an enum instead of macros to represent the various versions of the Ingenic SoCs, and add some of the SoC versions that were previously missing. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 92404db74571c3174d45d8a156b724dad8f3a0e1 Author: Paul Cercueil Date: Tue Jun 23 20:24:28 2020 +0200 dt-bindings: timer/ingenic,tcu: Add compatible strings for JZ4725B SoC Add compatible strings for the PWM and watchdog IPs on the Ingenic JZ4725B SoC. Signed-off-by: Paul Cercueil Acked-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 530043b86b5e63eb2fe7037ea8107da37b13bdbe Author: Paul Cercueil Date: Tue Jun 23 20:24:27 2020 +0200 dt-bindings: MIPS: Add entry for the YLM RetroMini Add an entry to ingenic/devices.yaml for the JZ4725B-based YLM "RetroMini" RS-90. Signed-off-by: Paul Cercueil Acked-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 99d19f5a48ee6fbc647935de458505e9308078e3 Author: Brian Norris Date: Fri Jul 3 01:06:46 2020 -0700 dt-bindings: pinctrl: qcom: add drive-open-drain to ipq4019 We've added drive-open-drain support, so note it in the DT binding. Signed-off-by: Brian Norris Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200703080646.23233-2-computersforpeace@gmail.com Signed-off-by: Linus Walleij commit 13355ca35cd16f5024655ac06e228b3c199e52a9 Author: Jaiganesh Narayanan Date: Fri Jul 3 01:06:45 2020 -0700 pinctrl: qcom: ipq4019: add open drain support [ Brian: adapted from from the Chromium OS kernel used on IPQ4019-based WiFi APs. ] Signed-off-by: Jaiganesh Narayanan Signed-off-by: Brian Norris Link: https://lore.kernel.org/r/20200703080646.23233-1-computersforpeace@gmail.com Signed-off-by: Linus Walleij commit cd79e378f11da125c87fcafeaf4d479513299de7 Author: Paul Cercueil Date: Tue Jun 23 20:24:26 2020 +0200 dt-bindings: vendor-prefixes: Add YLM Shenzhen Yangliming Electronic Technology Co., Ltd., abbreviated YLM or YLMChina, and known as Anbernic in the rest of the world, is a Chinese manufacturer of handheld game consoles, some of which are known to be running Linux. Signed-off-by: Paul Cercueil Acked-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 13c502c863df0ee50b50bcadb59895984248dc8b Author: Andrew Jeffery Date: Wed Jul 1 12:37:56 2020 +0930 pinctrl: aspeed: Describe the heartbeat function on ball Y23 The default pinmux configuration for Y23 is to route a heartbeat to drive a LED. Previous revisions of the AST2600 datasheet did not include a description of this function. Fixes: 2eda1cdec49f ("pinctrl: aspeed: Add AST2600 pinmux support") Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20200701030756.2834657-1-joel@jms.id.au Signed-off-by: Linus Walleij commit aa639e4437046a2519779932d8aa8842b517e20f Author: Andrew Jeffery Date: Wed Jul 1 12:30:39 2020 +0930 pinctrl: aspeed: Improve debug output We need to iterate over each pin in a group for a function and disable higher priority mux configurations on the pin before finally muxing the relevant function's signal. With the current debug output it is hard to track what register output is relevant to which operation, so break up the actions in the debug output by providing some more context. Before: [ 5.446656] aspeed-g6-pinctrl 1e6e2000.syscon:pinctrl: request pin 37 (B26) for 1e780000.gpio:341 [ 5.447377] Want SCU414[0x00000020]=0x1, got 0x0 from 0x00000000 [ 5.447854] Want SCU4B4[0x00000020]=0x1, got 0x0 from 0x00000000 [ 5.448340] Want SCU4B4[0x00000020]=0x1, got 0x0 from 0x00000000 After: [ 5.298053] Muxing pin 37 for GPIO [ 5.298294] Disabling signal NRI4 for NRI4 [ 5.298593] Want SCU414[0x00000020]=0x1, got 0x0 from 0x00000000 [ 5.298983] Disabling signal RGMII4RXD1 for RGMII4 [ 5.299309] Want SCU4B4[0x00000020]=0x1, got 0x0 from 0x00000000 [ 5.299694] Disabling signal RMII4RXD1 for RMII4 [ 5.300014] Want SCU4B4[0x00000020]=0x1, got 0x0 from 0x00000000 [ 5.300396] Enabling signal GPIOE5 for GPIOE5 [ 5.300687] Muxed pin 37 as GPIOE5 Signed-off-by: Andrew Jeffery Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20200701030039.2834418-1-joel@jms.id.au Signed-off-by: Linus Walleij commit e85e84d19b9dac3d3ac92c9f6a24d034691f1243 Author: Tomasz Nowicki Date: Wed Jul 15 09:06:48 2020 +0200 dt-bindings: arm-smmu: add compatible string for Marvell Armada-AP806 SMMU-500 Add specific compatible string for Marvell usage due to errata of accessing 64bits registers of ARM SMMU, in AP806. AP806 SoC uses the generic ARM-MMU500, and there's no specific implementation of Marvell, this compatible is used for errata only. Signed-off-by: Hanna Hawa Signed-off-by: Gregory CLEMENT Signed-off-by: Tomasz Nowicki Reviewed-by: Rob Herring Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20200715070649.18733-4-tn@semihalf.com Signed-off-by: Will Deacon commit f2d9848aeb9fa71523bbfb226203ffb7d50877d2 Author: Hanna Hawa Date: Wed Jul 15 09:06:47 2020 +0200 iommu/arm-smmu: Workaround for Marvell Armada-AP806 SoC erratum #582743 Due to erratum #582743, the Marvell Armada-AP806 can't access 64bit to ARM SMMUv2 registers. Provide implementation relevant hooks: - split the writeq/readq to two accesses of writel/readl. - mask the MMU_IDR2.PTFSv8 fields to not use AArch64 format (but only AARCH32_L) since with AArch64 format 32 bits access is not supported. Note that most 64-bit registers like TTBRn can be accessed as two 32-bit halves without issue, and AArch32 format ensures that the register writes which must be atomic (for TLBI etc.) need only be 32-bit. Signed-off-by: Hanna Hawa Signed-off-by: Gregory CLEMENT Signed-off-by: Tomasz Nowicki Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20200715070649.18733-3-tn@semihalf.com Signed-off-by: Will Deacon commit 6a79a5a3842b6a9f639fe2874dd6ae0bd4b24d1a Author: Tomasz Nowicki Date: Wed Jul 15 09:06:46 2020 +0200 iommu/arm-smmu: Call configuration impl hook before consuming features 'cfg_probe' hook is called at the very end of configuration probing procedure and therefore features override and workaround may become complex like for ID register fixups. In preparation for adding Marvell errata move 'cfg_probe' a bit earlier to have chance to adjust the detected features before we start consuming them. Since the Cavium quirk (the only user) does not alter features it is safe to do so. Suggested-by: Robin Murphy Signed-off-by: Tomasz Nowicki Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20200715070649.18733-2-tn@semihalf.com Signed-off-by: Will Deacon commit 40e30d26d909af89de2dcd0b4abdd27c47ac2235 Author: Drew Fustini Date: Wed Jul 15 23:37:38 2020 +0200 gpio: omap: handle pin config bias flags Modify omap_gpio_set_config() to handle pin config bias flags by calling gpiochip_generic_config(). The pin group for the gpio line must have the corresponding pinconf properties: PIN_CONFIG_BIAS_PULL_UP requires "pinctrl-single,bias-pullup" PIN_CONFIG_BIAS_PULL_DOWN requires "pinctrl-single,bias-pulldown" This is necessary for pcs_pinconf_set() to find the requested bias parameter in the PIN_MAP_TYPE_CONFIGS_GROUP pinctrl map. Signed-off-by: Drew Fustini Acked-by: Grygorii Strashko Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20200715213738.1640030-1-drew@beagleboard.org Signed-off-by: Linus Walleij commit 8210a6c057703b15d75f6bb841e7611726c4a551 Author: Adam Ford Date: Tue Jul 14 07:34:19 2020 -0500 dt-bindings: arm: renesas: Document beacon-rzg2m Beacon EmbeddedWorks is introducing a development kit based on the Renesas RZ/G2M platform. This patch adds the entry to the bindings list. Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20200714123419.3390-2-aford173@gmail.com Signed-off-by: Geert Uytterhoeven commit 8f208c28e1017cac20e0b2043231f5099b5f29c9 Author: Geert Uytterhoeven Date: Mon Jul 6 17:40:15 2020 +0200 arm64: dts: renesas: Restructure Makefile Make the Makefile for building Renesas DTB files easier to read and maintain: - Get rid of line continuations, - Use a single entry per line, - Sort SoCs and boards alphabetically, - Separate SoCs by blank lines. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200706154015.29257-1-geert+renesas@glider.be commit 273f00a1ece8f5d7647a77e33f8548720bbc5344 Author: Geert Uytterhoeven Date: Mon Jul 6 17:14:00 2020 +0200 arm64: dts: renesas: cat875: Drop superfluous phy-mode The PHY mode already defaults to RGMII in the RZ/G2E base SoC DTS file, so there is no need to specify the same value in board files. Fixes: 6b170cd3ed02949f ("arm64: dts: renesas: cat875: Add ethernet support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20200706151400.23105-1-geert+renesas@glider.be commit 0acc7a639658e6681c216ec4e82d0f8aac71b8b1 Author: Niklas Söderlund Date: Sat Jul 4 17:58:56 2020 +0200 ARM: dts: renesas: Remove unused remote property from adv7180 nodes The remote property is never read by the driver, remove it. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200704155856.3037010-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit d344234abde938ae1062edb6c05852b0bafb4a03 Author: Niklas Söderlund Date: Sat Jul 4 17:58:55 2020 +0200 ARM: dts: gose: Fix ports node name for adv7180 When adding the adv7180 device node the ports node was misspelled as port, fix this. Fixes: 8cae359049a88b75 ("ARM: dts: gose: add composite video input") Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200704155856.3037010-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 4d0e62679f17b8bde01aa9995233b5b9ca05ab7f Author: Geert Uytterhoeven Date: Fri Jun 26 16:36:38 2020 +0200 dt-bindings: pinctrl: renesas,rza2-pinctrl: Convert to json-schema Convert the Renesas RZ/A2 combined Pin and GPIO controller Device Tree binding documentation to json-schema. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200626143638.16512-1-geert+renesas@glider.be commit 6d31fa6aea09b3714c7a0a27d8cad3639c5f54ff Author: Lee Jones Date: Mon Jul 13 15:49:25 2020 +0100 pinctrl: rza1: Demote some kerneldoc headers and fix others Some description blocks are void of any description/documentation, others are missing 'struct' identifiers, there are also a couple of misspellings of function parameter names. Fix all of them. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinctrl-rza1.c:81: warning: cannot understand function prototype: 'struct rza1_bidir_pin ' drivers/pinctrl/pinctrl-rza1.c:90: warning: cannot understand function prototype: 'struct rza1_bidir_entry ' drivers/pinctrl/pinctrl-rza1.c:98: warning: cannot understand function prototype: 'struct rza1_swio_pin ' drivers/pinctrl/pinctrl-rza1.c:108: warning: cannot understand function prototype: 'struct rza1_swio_entry ' drivers/pinctrl/pinctrl-rza1.c:116: warning: cannot understand function prototype: 'struct rza1_pinmux_conf ' drivers/pinctrl/pinctrl-rza1.c:443: warning: cannot understand function prototype: 'struct rza1_mux_conf ' drivers/pinctrl/pinctrl-rza1.c:462: warning: cannot understand function prototype: 'struct rza1_port ' drivers/pinctrl/pinctrl-rza1.c:482: warning: cannot understand function prototype: 'struct rza1_pinctrl ' drivers/pinctrl/pinctrl-rza1.c:546: warning: Function parameter or member 'port' not described in 'rza1_pinmux_get_flags' drivers/pinctrl/pinctrl-rza1.c:546: warning: Function parameter or member 'pin' not described in 'rza1_pinmux_get_flags' drivers/pinctrl/pinctrl-rza1.c:546: warning: Function parameter or member 'func' not described in 'rza1_pinmux_get_flags' drivers/pinctrl/pinctrl-rza1.c:546: warning: Function parameter or member 'rza1_pctl' not described in 'rza1_pinmux_get_flags' drivers/pinctrl/pinctrl-rza1.c:575: warning: Function parameter or member 'port' not described in 'rza1_set_bit' drivers/pinctrl/pinctrl-rza1.c:575: warning: Function parameter or member 'reg' not described in 'rza1_set_bit' drivers/pinctrl/pinctrl-rza1.c:575: warning: Function parameter or member 'bit' not described in 'rza1_set_bit' drivers/pinctrl/pinctrl-rza1.c:575: warning: Function parameter or member 'set' not described in 'rza1_set_bit' drivers/pinctrl/pinctrl-rza1.c:672: warning: Function parameter or member 'rza1_pctl' not described in 'rza1_pin_mux_single' drivers/pinctrl/pinctrl-rza1.c:672: warning: Excess function parameter 'pinctrl' description in 'rza1_pin_mux_single' Signed-off-by: Lee Jones Acked-by: Jacopo Mondi Link: https://lore.kernel.org/r/20200713144930.1034632-21-lee.jones@linaro.org Signed-off-by: Geert Uytterhoeven commit 339ddaa626995bc6218972ca241471f3717cc5f4 Author: Patrick Steinhardt Date: Wed Jul 15 19:43:33 2020 +0200 Bluetooth: Fix update of connection state in `hci_encrypt_cfm` Starting with the upgrade to v5.8-rc3, I've noticed I wasn't able to connect to my Bluetooth headset properly anymore. While connecting to the device would eventually succeed, bluetoothd seemed to be confused about the current connection state where the state was flapping hence and forth. Bisecting this issue led to commit 3ca44c16b0dc (Bluetooth: Consolidate encryption handling in hci_encrypt_cfm, 2020-05-19), which refactored `hci_encrypt_cfm` to also handle updating the connection state. The commit in question changed the code to call `hci_connect_cfm` inside `hci_encrypt_cfm` and to change the connection state. But with the conversion, we now only update the connection state if a status was set already. In fact, the reverse should be true: the status should be updated if no status is yet set. So let's fix the isuse by reversing the condition. Fixes: 3ca44c16b0dc ("Bluetooth: Consolidate encryption handling in hci_encrypt_cfm") Signed-off-by: Patrick Steinhardt Acked-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 0a82f3f083617150cebacab57f9293b15e9917e0 Merge: 910a71ed772aa 8b404f46dd6ab Author: Steffen Klassert Date: Thu Jul 16 08:27:25 2020 +0200 Merge remote-tracking branch 'origin/testing' Xin Long says: ==================== xfrm: not register one xfrm(6)_tunnel object twice Now in ip(6)_vti and xfrm interface tunnel support, it uses the same xfrm(6)_tunnel object to handle for AF_NET and AF_INET6 by registering it twice. However the xfrm(6)_tunnel object is linked into a list with its 'next' pointer. The second registering will cause its 'next' pointer to be overwritten, and break the list. So this patchset is to add a new xfrm(6)_tunnel object for each of them and register it, although its members are the same with the old one. ==================== Signed-off-by: Steffen Klassert commit 38ffc01f38cc844ad2b81cdc9b0a087c4fc4c2b8 Author: Damien Le Moal Date: Thu Jul 16 13:54:43 2020 +0900 md: raid10: Fix compilation warning Remove the if statement around the call to sysfs_link_rdev() in raid10_start_reshape() to avoid the compilation warning: warning: suggest braces around empty body in an ‘if’ statement when compiling with W=1. Signed-off-by: Damien Le Moal Signed-off-by: Song Liu commit 2aada5b14bd0db76fb28885cbb22ce893b0654c8 Author: Damien Le Moal Date: Thu Jul 16 13:54:42 2020 +0900 md: raid5: Fix compilation warning Remove the if statement around the calls to sysfs_link_rdev() to avoid the compilation warning "suggest braces around empty body in an ‘if’ statement" when compiling with W=1. Also fix function description comments to avoid kdoc format warnings. Signed-off-by: Damien Le Moal Signed-off-by: Song Liu commit 52923083b54e7c6eeec8d78dbb9d209f4b2e9b9e Author: Damien Le Moal Date: Thu Jul 16 13:54:41 2020 +0900 md: raid5-cache: Remove set but unused variable Remove the variable offset in r5c_tree_index() to avoid a "set but not used" compilation warning when compiling with W=1. Signed-off-by: Damien Le Moal Signed-off-by: Song Liu commit 5e3b8a8d59b2064f68ab349182f5dc5f5bb4fd30 Author: Damien Le Moal Date: Thu Jul 16 13:54:40 2020 +0900 md: Fix compilation warning Remove the if statement around the calls to sysfs_link_rdev() to avoid the compilation warnings: warning: suggest braces around empty body in an ‘if’ statement when compiling with W=1. For the call to sysfs_create_link() generating the same warning, use the err variable to store the function result, avoiding triggering another warning as the function is declared as 'warn_unused_result'. Signed-off-by: Damien Le Moal Signed-off-by: Song Liu commit 4c2573e1f6c79525df9094f6ba085fcc35c18c45 Author: Michael Guralnik Date: Tue Jul 14 21:28:35 2020 -0700 net/mlx5: Enable count action for rules with allow action Enable the creation of rules with allow and count actions. This enables using counters on egress flow tables. Signed-off-by: Michael Guralnik Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 8a06a79b0aa811eee6d56b3cfc738c5d08b0dc74 Author: Eli Cohen Date: Tue Jul 14 21:28:34 2020 -0700 net/mlx5: Add interface changes required for VDPA Rename mlx5_ifc_device_virtio_emulation_cap_bits to mlx5_ifc_virtio_emulation_cap_bits to match names produced by the tools producing these auto generated files. In addition missing capabilities that will be required by VDPA implementation. Signed-off-by: Eli Cohen Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 2a913f23447ce7ef2a4dcaaa230ff43116cf5249 Author: Eli Cohen Date: Tue Jul 14 21:28:33 2020 -0700 net/mlx5: Add VDPA interface type to supported enumerations VDPA is a new interface that will be added in subsequent patches. It uses mlx5 core devices and resources. Add an interface type for it. Signed-off-by: Eli Cohen Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 1dcb6c36a5ebac46099b6363ccf8f4e7563d51e2 Author: Eli Cohen Date: Tue Jul 14 21:28:32 2020 -0700 net/mlx5: Support setting access rights of dma addresses mlx5_fill_page_frag_array() is used to populate dma addresses to resources that require it, such as QPs, RQs etc. When the resource is used, PA list permissions are ignored. For resources that use MTT list, the user is required to provide the access rights. Subsequent patches use resources that require MTT lists, so modify API and implementation to support that. Signed-off-by: Eli Cohen Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 079f81acf10fcdadf2ddb4bf9755509b8bdc3504 Author: Stephan Gerhold Date: Mon Jun 22 17:17:51 2020 +0200 arm64: dts: qcom: msm8916-samsung-a2015: Add accelerometer/magnetometer A3U/A5U both use a Bosch BMC150 accelerometer/magnetometer combo. The chip provides two separate I2C devices for the accelerometer and magnetometer that are already supported by the bmc150-accel and bmc150-magn driver. The only difference between A3U/A5U is the way the sensor is mounted on the mainboard - set the mount-matrix in the device-specific device tree part to handle that difference. Co-developed-by: Michael Srba Signed-off-by: Michael Srba Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200622151751.408995-5-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 4a1f08cb58e522ef6c94a0b0dde4b483e1bbe1cd Author: Stephan Gerhold Date: Mon Jun 22 17:17:50 2020 +0200 arm64: dts: qcom: msm8916: Use higher I2C drive-strength only on DB410c Commit c240f29e75e6 ("arm64: dts: set the default i2c pin drive strength to 16mA") changed the default drive-strength for I2C pins in msm8916-pins.dtsi to the maximum possible (16 mA). While this makes sense for apq8016-sbc (DB410c) where you can connect an arbitrary amount of I2C devices with level shifters etc, there is no need to use a higher drive strength for other MSM8916 devices. The minimum drive strength (2 mA) seems to be totally sufficient to have everything work there. With the short pinctrl nodes introduced earlier we can easily override the drive-strength only for apq8016-sbc now. Use that and change the default back to 2 mA. i2c1_default/i2c5_default are already using 2 mA because they were added separately later and are not used in apq8016-sbc. Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200622151751.408995-4-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 6554a295042f714cef20cce67803ec71f1eb913a Author: Stephan Gerhold Date: Mon Jun 22 17:17:49 2020 +0200 arm64: dts: qcom: msm8916: Simplify pinctrl configuration So far we have been separating pinctrl entries into pinmux/pinconf. It turns out it is also possible to combine them: The advantage is that the device tree is overall more concise because the "pins" to configure just need to be specified once, not separately for pinmux/pinconf. Using the simpler form only for new entries would be rather confusing. This commit makes all MSM8916 device trees use the simplfied form. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200622151751.408995-3-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit f7f394f01da56272c760cb495489b1ec695d6ed4 Author: Stephan Gerhold Date: Mon Jun 22 17:17:48 2020 +0200 arm64: dts: msm8916-samsung/longcheer: Move pinctrl/regulators to end of file It is helpful to be able to see all hardware components in one part of the device tree, without having to scroll over the large amount of regulator/pinctrl nodes. Keep those separated at the end of the file to make navigation a bit easier. This also makes it consistent with the order used in apq8016-sbc.dtsi. Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200622151751.408995-2-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 61f879d97ce4510dd29d676a20d67692e3b34806 Author: Nayna Jain Date: Wed Jul 15 07:52:01 2020 -0400 powerpc/pseries: Detect secure and trusted boot state of the system. The device-tree properties to check secure and trusted boot state are different for guests (pseries) compared to baremetal (powernv). This patch updates the existing is_ppc_secureboot_enabled() and is_ppc_trustedboot_enabled() functions to add support for pseries. For pseries the secureboot and trustedboot state are exposed via device-tree properties /ibm,secure-boot and /ibm,trusted-boot. The values of ibm,secure-boot under pseries are interpreted as: 0 - Disabled 1 - Enabled in Log-only mode. This patch interprets this value as disabled, since audit mode is currently not supported for Linux. 2 - Enabled and enforced. 3-9 - Enabled and enforcing; requirements are at the discretion of the operating system. The values of ibm,trusted-boot under pseries are interpreted as: 0 - Disabled 1 - Enabled Signed-off-by: Nayna Jain Reviewed-by: Daniel Axtens Reviewed-by: Mimi Zohar [mpe: Drop machdep.h inclusion, tweak change log slightly] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1594813921-12425-1-git-send-email-nayna@linux.ibm.com commit 3b71c69024a7d9700e33fd1f914d689151f7992d Author: Vinod Koul Date: Wed Jul 15 15:27:02 2020 +0530 soundwire: fix the kernel-doc comment sdw_startup_stream() and sdw_shutdown_stream() argument has been updated but not the comments, so update these as well to fix warning with W=1 drivers/soundwire/stream.c:1859: warning: Function parameter or member 'sdw_substream' not described in 'sdw_startup_stream' drivers/soundwire/stream.c:1859: warning: Excess function parameter 'stream' description in 'sdw_startup_stream' drivers/soundwire/stream.c:1903: warning: Function parameter or member 'sdw_substream' not described in 'sdw_shutdown_stream' drivers/soundwire/stream.c:1903: warning: Excess function parameter 'stream' description in 'sdw_shutdown_stream' Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200715095702.1519554-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit dff0f49cda8492374ffd33389e4334c33b903e89 Author: Bjorn Andersson Date: Mon Jun 22 00:59:56 2020 -0700 arm64: dts: qcom: sm8250: Drop tcsr_mutex syscon Now that we don't need the intermediate syscon to represent the TCSR mutexes, update the dts to describe the TCSR mutex directly under /soc. Reviewed-by: Dmitry Baryshkov Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20200622075956.171058-5-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 59632b220f2d61df274ed3a14a204e941051fdad Author: Randy Dunlap Date: Wed Jul 15 09:42:46 2020 -0700 net: ipv6: drop duplicate word in comment Drop the doubled word "by" in a comment. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Jakub Kicinski commit d86f9868bdb40fc11c1e8c176ae11fb897b9d5f4 Author: Randy Dunlap Date: Wed Jul 15 09:42:45 2020 -0700 net: sctp: drop duplicate words in comments Drop doubled words in several comments. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Jakub Kicinski commit 4b48b0a3aa0df49eb6d80a86c2b016bf6c3eebf9 Author: Randy Dunlap Date: Wed Jul 15 09:42:44 2020 -0700 net: ip6_fib.h: drop duplicate word in comment Drop doubled word "the" in a comment. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Jakub Kicinski commit ab88d64a90951a95c4e08971b02fcb781d2067f0 Author: Randy Dunlap Date: Wed Jul 15 09:42:43 2020 -0700 net: dsa.h: drop duplicate word in comment Drop doubled word "to" in a comment. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Jakub Kicinski commit c201324b54553aebb32845193680f21eb493c6e5 Author: Randy Dunlap Date: Wed Jul 15 09:42:42 2020 -0700 net: caif: drop duplicate words in comments Drop doubled words "or" and "the" in several comments. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Jakub Kicinski commit cee50c2a028432dadacdf55950c6c6a7875e8172 Author: Randy Dunlap Date: Wed Jul 15 09:42:41 2020 -0700 net: 9p: drop duplicate word in comment Drop doubled word "not" in a comment. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Jakub Kicinski commit 158e89639166461e225a855bce6e3ee6cd8bb1c0 Author: Randy Dunlap Date: Wed Jul 15 09:42:40 2020 -0700 net: wimax: fix duplicate words in comments Drop doubled words in two comments. Fix a spello/typo. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Jakub Kicinski commit 2ff17117e60572d6974c766d6b1a225ec7d68795 Author: Randy Dunlap Date: Wed Jul 15 09:42:39 2020 -0700 net: skbuff.h: drop duplicate words in comments Drop doubled words in several comments. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Jakub Kicinski commit 0d80b76184ac9f2dfb939e39ad1f961fc006b99d Author: Randy Dunlap Date: Wed Jul 15 09:42:38 2020 -0700 net: qed: drop duplicate words in comments Drop doubled word "the" in two comments. Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: netdev@vger.kernel.org Signed-off-by: Jakub Kicinski commit a9f675f950a07d5c1dbcbb97aabac56f5ed085e3 Author: Milton Miller Date: Thu Jul 16 09:37:04 2020 +1000 powerpc/vdso: Fix vdso cpu truncation The code in vdso_cpu_init that exposes the cpu and numa node to userspace via SPRG_VDSO incorrctly masks the cpu to 12 bits. This means that any kernel running on a box with more than 4096 threads (NR_CPUS advertises a limit of of 8192 cpus) would expose userspace to two cpu contexts running at the same time with the same cpu number. Note: I'm not aware of any distro shipping a kernel with support for more than 4096 threads today, nor of any system image that currently exceeds 4096 threads. Found via code browsing. Fixes: 18ad51dd342a7eb09dbcd059d0b451b616d4dafc ("powerpc: Add VDSO version of getcpu") Signed-off-by: Milton Miller Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200715233704.1352257-1-anton@ozlabs.org commit 77ca3951cc37727ae8361d583a30da7a1b84e427 Author: Anju T Sudhakar Date: Mon Jul 13 20:16:23 2020 +0530 powerpc/perf: Add kernel support for new MSR[HV PR] bits in trace-imc IMC trace-mode record has MSR[HV PR] bits added in the third DW. These bits can be used to set the cpumode for the instruction pointer captured in each sample. Add support in kernel to use these bits to set the cpumode for each sample. Signed-off-by: Anju T Sudhakar Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200713144623.508695-1-maddy@linux.ibm.com commit 9a3e3dccbf4317d02d28f8f99a5d1ccce42f9922 Author: Alexander A. Klimov Date: Mon Jul 13 21:26:56 2020 +0200 powerpc/Kconfig: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200713192656.37443-1-grandmaster@al2klimov.de commit 07497137a5efa9b2628c18083e8b07b33160153d Author: Alexander A. Klimov Date: Mon Jul 13 19:55:06 2020 +0200 ocxl: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200713175506.36676-1-grandmaster@al2klimov.de commit 92fe8483b1660feaa602d8be6ca7efe95ae4789b Author: Wei Yongjun Date: Tue Jul 14 22:24:24 2020 +0800 cpuidle/pseries: Make symbol 'pseries_idle_driver' static The sparse tool complains as follows: drivers/cpuidle/cpuidle-pseries.c:25:23: warning: symbol 'pseries_idle_driver' was not declared. Should it be static? 'pseries_idle_driver' is not used outside of this file, so marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200714142424.66648-1-weiyongjun1@huawei.com commit 89c140bbaeee7a55ed0360a88f294ead2b95201b Author: Anton Blanchard Date: Wed Jul 15 10:08:20 2020 +1000 pseries: Fix 64 bit logical memory block panic Booting with a 4GB LMB size causes us to panic: qemu-system-ppc64: OS terminated: OS panic: Memory block size not suitable: 0x0 Fix pseries_memory_block_size() to handle 64 bit LMBs. Cc: stable@vger.kernel.org Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200715000820.1255764-1-anton@ozlabs.org commit 29d9407e1037868b59d12948d42ad3ef58fc3a5a Author: YueHaibing Date: Wed Jul 15 10:50:40 2020 +0800 powerpc/xive: Remove unused inline function xive_kexec_teardown_cpu() commit e27e0a94651e ("powerpc/xive: Remove xive_kexec_teardown_cpu()") left behind this, remove it. Signed-off-by: YueHaibing Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200715025040.33952-1-yuehaibing@huawei.com commit ba608c4fa12cfd0cab0e153249c29441f4dd3312 Author: Sourabh Jain Date: Mon Jul 13 10:54:35 2020 +0530 powerpc/fadump: fix race between pstore write and fadump crash trigger When we enter into fadump crash path via system reset we fail to update the pstore. On the system reset path we first update the pstore then we go for fadump crash. But the problem here is when all the CPUs try to get the pstore lock to initiate the pstore write, only one CPUs will acquire the lock and proceed with the pstore write. Since it in NMI context CPUs that fail to get lock do not wait for their turn to write to the pstore and simply proceed with the next operation which is fadump crash. One of the CPU who proceeded with fadump crash path triggers the crash and does not wait for the CPU who gets the pstore lock to complete the pstore update. Timeline diagram to depicts the sequence of events that leads to an unsuccessful pstore update when we hit fadump crash path via system reset. 1 2 3 ... n CPU Threads | | | | | | | | Reached to -->|--->|---->| ----------->| system reset | | | | path | | | | | | | | Try to -->|--->|---->|------------>| acquire the | | | | pstore lock | | | | | | | | | | | | Got the -->| +->| | |<-+ pstore lock | | | | | |--> Didn't get the | --------------------------+ lock and moving | | | | ahead on fadump | | | | crash path | | | | Begins the -->| | | | process to | | | |<-- Got the chance to update the | | | | trigger the crash pstore | -> | | ... <- | | | | | | | | | | | | |<-- Triggers the | | | | | | crash | | | | | | ^ | | | | | | | Writing to -->| | | | | | | pstore | | | | | | | | | | ^ |__________________| | | CPU Relax | | | +-----------------------------------------+ | v Race: crash triggered before pstore update completes To avoid this race condition a barrier is added on crash_fadump path, it prevents the CPU to trigger the crash until all the online CPUs completes their task. A barrier is added to make sure all the secondary CPUs hit the crash_fadump function before we initiates the crash. A timeout is kept to ensure the primary CPU (one who initiates the crash) do not wait for secondary CPUs indefinitely. Signed-off-by: Sourabh Jain Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200713052435.183750-1-sourabhjain@linux.ibm.com commit ade7667a981be49af9310f7c682c226283ec833d Author: Anton Blanchard Date: Mon Jul 13 18:36:01 2020 +1000 powerpc: Add cputime_to_nsecs() Generic code has a wrapper to implement cputime_to_nsecs() on top of cputime_to_usecs() but we can easily return the full nanosecond resolution directly. Signed-off-by: Anton Blanchard Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200713083601.1103978-1-anton@ozlabs.org commit e4208f1399b1bf7ed84ba359a6ba0979d1df4029 Author: Balamuruhan S Date: Wed Jun 24 17:00:38 2020 +0530 powerpc/ppc-opcode: Fold PPC_INST_* macros into PPC_RAW_* macros Lots of PPC_INST_* macros are used only ever in PPC_* macros, fold those PPC_INST_* into PPC_RAW_* to avoid using PPC_INST_* accidentally. Signed-off-by: Balamuruhan S Tested-by: Naveen N. Rao Acked-by: Naveen N. Rao [mpe: Deal with PHWSYNC, PLWSYNC] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200624113038.908074-7-bala24@linux.ibm.com commit 357c572948310c88868cee00e64ca3f7fc933a74 Author: Balamuruhan S Date: Wed Jun 24 17:00:37 2020 +0530 powerpc/ppc-opcode: Reuse raw instruction macros to stringify Wrap existing stringify macros to reuse raw instruction encoding macros that are newly added. Signed-off-by: Balamuruhan S Tested-by: Naveen N. Rao Acked-by: Naveen N. Rao [mpe: Add DCBFPS, DCBSTPS, PHWSYNC, PLWSYNC] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200624113038.908074-6-bala24@linux.ibm.com commit 3a181237916310b2bbbad158d97933bb2b4e7552 Author: Balamuruhan S Date: Wed Jun 24 17:00:36 2020 +0530 powerpc/ppc-opcode: Consolidate powerpc instructions from bpf_jit.h Move macro definitions of powerpc instructions from bpf_jit.h to ppc-opcode.h and adopt the users of the macros accordingly. `PPC_MR()` is defined twice in bpf_jit.h, remove the duplicate one. Signed-off-by: Balamuruhan S Tested-by: Naveen N. Rao Acked-by: Naveen N. Rao Acked-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200624113038.908074-5-bala24@linux.ibm.com commit 0654186510a40e7e1fa788cb941d1a156ba2dcb2 Author: Balamuruhan S Date: Wed Jun 24 17:00:35 2020 +0530 powerpc/bpf_jit: Reuse instruction macros from ppc-opcode.h Remove duplicate macro definitions from bpf_jit.h and reuse the macros from ppc-opcode.h Signed-off-by: Balamuruhan S Tested-by: Naveen N. Rao Acked-by: Naveen N. Rao Acked-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200624113038.908074-4-bala24@linux.ibm.com commit 1d33dd84080f4a430bde2fc363d9b70f0a010c19 Author: Balamuruhan S Date: Wed Jun 24 17:00:34 2020 +0530 powerpc/ppc-opcode: Move ppc instruction encoding from test_emulate_step Few ppc instructions are encoded in test_emulate_step.c, consolidate them and use it from ppc-opcode.h Signed-off-by: Balamuruhan S Tested-by: Naveen N. Rao Acked-by: Naveen N. Rao Acked-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200624113038.908074-3-bala24@linux.ibm.com commit db551f8cc6a33f79cd2d2a6cfd1903f044e828a8 Author: Balamuruhan S Date: Wed Jun 24 17:00:33 2020 +0530 powerpc/ppc-opcode: Introduce PPC_RAW_* macros for base instruction encoding Introduce PPC_RAW_* macros to have all the bare encoding of ppc instructions. Move `VSX_XX*()` and `TMRN()` macros up to reuse it. Signed-off-by: Balamuruhan S Tested-by: Naveen N. Rao Acked-by: Naveen N. Rao [mpe: Add DCBFPS, DCBSTPS, PHWSYNC, PLWSYNC] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200624113038.908074-2-bala24@linux.ibm.com commit 792f73f747b82f6cb191a323e1f5755d33149b50 Author: Kajol Jain Date: Thu Jul 9 10:48:36 2020 +0530 powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask Patch here adds a cpumask attr to hv_24x7 pmu along with ABI documentation. Primary use to expose the cpumask is for the perf tool which has the capability to parse the driver sysfs folder and understand the cpumask file. Having cpumask file will reduce the number of perf command line parameters (will avoid "-C" option in the perf tool command line). It can also notify the user which is the current cpu used to retrieve the counter data. command:# cat /sys/devices/hv_24x7/interface/cpumask 0 Signed-off-by: Kajol Jain Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709051836.723765-3-kjain@linux.ibm.com commit 1a8f0886a6008c98a926bdeca49f2ef33015a491 Author: Kajol Jain Date: Thu Jul 9 10:48:35 2020 +0530 powerpc/perf/hv-24x7: Add cpu hotplug support Patch here adds cpu hotplug functions to hv_24x7 pmu. A new cpuhp_state "CPUHP_AP_PERF_POWERPC_HV_24x7_ONLINE" enum is added. The online callback function updates the cpumask only if its empty. As the primary intention of adding hotplug support is to designate a CPU to make HCALL to collect the counter data. The offline function test and clear corresponding cpu in a cpumask and update cpumask to any other active cpu. Signed-off-by: Kajol Jain Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200709051836.723765-2-kjain@linux.ibm.com commit e978a3ccaa714b5ff125857d2cbecbb6fdf6c094 Author: Nathan Lynch Date: Fri Jun 12 00:12:38 2020 -0500 powerpc/pseries: remove obsolete memory hotplug DT notifier code pseries_update_drconf_memory() runs from a DT notifier in response to an update to the ibm,dynamic-memory property of the /ibm,dynamic-reconfiguration-memory node. This property is an older less compact format than the ibm,dynamic-memory-v2 property used in most currently supported firmwares. There has never been an equivalent function for the v2 property. pseries_update_drconf_memory() compares the 'assigned' flag for each LMB in the old vs new properties and adds or removes the block accordingly. However it appears to be of no actual utility: * Partition suspension and PRRNs are specified only to change LMBs' NUMA affinity information. This notifier should be a no-op for those scenarios since the assigned flags should not change. * The memory hotplug/DLPAR path has a hack which short-circuits execution of the notifier: dlpar_memory() ... rtas_hp_event = true; drmem_update_dt() of_update_property() pseries_memory_notifier() pseries_update_drconf_memory() if (rtas_hp_event) return; So this code only makes sense as a relic of the time when more of the DLPAR workflow took place in user space. I don't see a purpose for it now. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-19-nathanl@linux.ibm.com commit 38c392cef19019457ddcfb197ff3d9c5267698e6 Author: Nathan Lynch Date: Fri Jun 12 00:12:37 2020 -0500 powerpc/pseries: remove dlpar_cpu_readd() dlpar_cpu_readd() is unused now. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-18-nathanl@linux.ibm.com commit 4abe60c6448bf1dba48689450ad1348e5fc6f7b7 Author: Nathan Lynch Date: Fri Jun 12 00:12:36 2020 -0500 powerpc/pseries: remove memory "re-add" implementation dlpar_memory() no longer has any callers which pass PSERIES_HP_ELOG_ACTION_READD. Remove this case and the corresponding unreachable code. Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-17-nathanl@linux.ibm.com commit bb7c3d36e3b18aa02d34358ae75e1b91f69a968b Author: Nathan Lynch Date: Fri Jun 12 00:12:35 2020 -0500 powerpc/pseries: remove prrn special case from DT update path pseries_devicetree_update() is no longer called with PRRN_SCOPE. The purpose of prrn_update_node() was to remove and then add back a LMB whose NUMA assignment had changed. This has never been reliable, and this codepath has been default-disabled for several releases. Remove prrn_update_node(). Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-16-nathanl@linux.ibm.com commit cdf082c4570f186d608aca688f2cc872b014558a Author: Nathan Lynch Date: Fri Jun 12 00:12:34 2020 -0500 powerpc/numa: remove arch_update_cpu_topology Since arch_update_cpu_topology() doesn't do anything on powerpc now, remove it and associated dead code. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-15-nathanl@linux.ibm.com commit 042ef7cc43f4571d8cbe44a7c735ab6622809142 Author: Nathan Lynch Date: Fri Jun 12 00:12:33 2020 -0500 powerpc/numa: remove prrn_is_enabled() All users of this prrn_is_enabled() are gone; remove it. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-14-nathanl@linux.ibm.com commit 91713ac377859893a7798999cb2e3a388d8ae710 Author: Nathan Lynch Date: Fri Jun 12 00:12:32 2020 -0500 powerpc/rtasd: simplify handle_rtas_event(), emit message on events prrn_is_enabled() always returns false/0, so handle_rtas_event() can be simplified and some dead code can be removed. Use machine_is() instead of #ifdef to run this code only on pseries, and add an informational ratelimited message that we are ignoring the events. PRRN events are relatively rare in normal operation and usually arise from operator-initiated actions such as a DPO (Dynamic Platform Optimizer) run. Eventually we do want to consume these events and update the device tree, but that needs more care to be safe vs LPM and DLPAR. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-13-nathanl@linux.ibm.com commit 1835303e5690cbeef2c07a9a5416045475ddaa13 Author: Nathan Lynch Date: Fri Jun 12 00:12:31 2020 -0500 powerpc/numa: remove start/stop_topology_update() These APIs have become no-ops, so remove them and all call sites. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-12-nathanl@linux.ibm.com commit b1815aeac7fde2dc3412daf2efaededd21cd58e0 Author: Nathan Lynch Date: Fri Jun 12 00:12:30 2020 -0500 powerpc/numa: remove timed_topology_update() timed_topology_update is a no-op now, so remove it and all call sites. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-11-nathanl@linux.ibm.com commit 893ec6461f46c91487d914e6d467d2e804b9a883 Author: Nathan Lynch Date: Fri Jun 12 00:12:29 2020 -0500 powerpc/numa: stub out numa_update_cpu_topology() Previous changes have removed the code which sets bits in cpu_associativity_changes_mask and thus it is never modifed at runtime. From this we can reason that numa_update_cpu_topology() always returns 0 without doing anything. Remove the body of numa_update_cpu_topology() and remove all code which becomes unreachable as a result. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-10-nathanl@linux.ibm.com commit 9fb8b5fd1bf782a8257506ad5198237f4124d556 Author: Nathan Lynch Date: Fri Jun 12 00:12:28 2020 -0500 powerpc/numa: remove vphn_enabled and prrn_enabled internal flags These flags are always zero now; remove them and suitably adjust the remaining references to them. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-9-nathanl@linux.ibm.com commit 6325cb4a4ea8f4af8515b923650dd8f709694b44 Author: Nathan Lynch Date: Fri Jun 12 00:12:27 2020 -0500 powerpc/numa: remove unreachable topology workqueue code Since vphn_enabled is always 0, we can remove the call to topology_schedule_update() and remove the code which becomes unreachable as a result. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-8-nathanl@linux.ibm.com commit 50e0cf3742a01e72f4ea4a8fe9221b152e22871b Author: Nathan Lynch Date: Fri Jun 12 00:12:26 2020 -0500 powerpc/numa: remove unreachable topology timer code Since vphn_enabled is always 0, we can stub out timed_topology_update() and remove the code which becomes unreachable. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-7-nathanl@linux.ibm.com commit e6eacf8eb4dee7bc7021c837666e3ebf1b0ec3b5 Author: Nathan Lynch Date: Fri Jun 12 00:12:25 2020 -0500 powerpc/numa: make vphn_enabled, prrn_enabled flags const Previous changes have made it so these flags are never changed; enforce this by making them const. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-6-nathanl@linux.ibm.com commit 7d35bef96a46f7e9e167bb25258c0bd389aeab1b Author: Nathan Lynch Date: Fri Jun 12 00:12:24 2020 -0500 powerpc/numa: remove unreachable topology update code Since the topology_updates_enabled flag is now always false, remove it and the code which has become unreachable. This is the minimum change that prevents 'defined but unused' warnings emitted by the compiler after stubbing out the start/stop_topology_updates() functions. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-5-nathanl@linux.ibm.com commit c30f931e891eb0a32885ecd79984e1e7366fceda Author: Nathan Lynch Date: Fri Jun 12 00:12:23 2020 -0500 powerpc/numa: remove ability to enable topology updates Remove the /proc/powerpc/topology_updates interface and the topology_updates=on/off command line argument. The internal topology_updates_enabled flag remains for now, but always false. Signed-off-by: Nathan Lynch Reviewed-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-4-nathanl@linux.ibm.com commit ec2fc2a9e9bbad9023aab65bc472ce7a3ca8608f Author: Nathan Lynch Date: Fri Jun 12 00:12:22 2020 -0500 powerpc/rtas: don't online CPUs for partition suspend Partition suspension, used for hibernation and migration, requires that the OS place all but one of the LPAR's processor threads into one of two states prior to calling the ibm,suspend-me RTAS function: * the architected offline state (via RTAS stop-self); or * the H_JOIN hcall, which does not return until the partition resumes execution Using H_CEDE as the offline mode, introduced by commit 3aa565f53c39 ("powerpc/pseries: Add hooks to put the CPU into an appropriate offline state"), means that any threads which are offline from Linux's point of view must be moved to one of those two states before a partition suspension can proceed. This was eventually addressed in commit 120496ac2d2d ("powerpc: Bring all threads online prior to migration/hibernation"), which added code to temporarily bring up any offline processor threads so they can call H_JOIN. Conceptually this is fine, but the implementation has had multiple races with cpu hotplug operations initiated from user space[1][2][3], the error handling is fragile, and it generates user-visible cpu hotplug events which is a lot of noise for a platform feature that's supposed to minimize disruption to workloads. With commit 3aa565f53c39 ("powerpc/pseries: Add hooks to put the CPU into an appropriate offline state") reverted, this code becomes unnecessary, so remove it. Since any offline CPUs now are truly offline from the platform's point of view, it is no longer necessary to bring up CPUs only to have them call H_JOIN and then go offline again upon resuming. Only active threads are required to call H_JOIN; stopped threads can be left alone. [1] commit a6717c01ddc2 ("powerpc/rtas: use device model APIs and serialization during LPM") [2] commit 9fb603050ffd ("powerpc/rtas: retry when cpu offline races with suspend/migration") [3] commit dfd718a2ed1f ("powerpc/rtas: Fix a potential race between CPU-Offline & Migration") Fixes: 120496ac2d2d ("powerpc: Bring all threads online prior to migration/hibernation") Signed-off-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-3-nathanl@linux.ibm.com commit 48f6e7f6d948b56489da027bc3284c709b939d28 Author: Nathan Lynch Date: Fri Jun 12 00:12:21 2020 -0500 powerpc/pseries: remove cede offline state for CPUs This effectively reverts commit 3aa565f53c39 ("powerpc/pseries: Add hooks to put the CPU into an appropriate offline state"), which added an offline mode for CPUs which uses the H_CEDE hcall instead of the architected stop-self RTAS function in order to facilitate "folding" of dedicated mode processors on PowerVM platforms to achieve energy savings. This has been the default offline mode since its introduction. There's nothing about stop-self that would prevent the hypervisor from achieving the energy savings available via H_CEDE, so the original premise of this change appears to be flawed. I also have encountered the claim that the transition to and from ceded state is much faster than stop-self/start-cpu. Certainly we would not want to use stop-self as an *idle* mode. That is what H_CEDE is for. However, this difference is insignificant in the context of Linux CPU hotplug, where the latency of an offline or online operation on current systems is on the order of 100ms, mainly attributable to all the various subsystems' cpuhp callbacks. The cede offline mode also prevents accurate accounting, as discussed before: https://lore.kernel.org/linuxppc-dev/1571740391-3251-1-git-send-email-ego@linux.vnet.ibm.com/ Unconditionally use stop-self to offline processor threads. This is the architected method for offlining CPUs on PAPR systems. The "cede_offline" boot parameter is rendered obsolete. Removing this code enables the removal of the partition suspend code which temporarily onlines all present CPUs. Fixes: 3aa565f53c39 ("powerpc/pseries: Add hooks to put the CPU into an appropriate offline state") Signed-off-by: Nathan Lynch Reviewed-by: Gautham R. Shenoy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612051238.1007764-2-nathanl@linux.ibm.com commit 4d24e21cc694e7253a532fe5a9bde12b284f1317 Author: Nicholas Piggin Date: Tue Jun 9 17:06:09 2020 +1000 powerpc/security: Allow for processors that flush the link stack using the special bcctr If both count cache and link stack are to be flushed, and can be flushed with the special bcctr, patch that in directly to the flush/branch nop site. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200609070610.846703-7-npiggin@gmail.com commit 70d7cdaf0548ec95fa7204dcdd39cd8e63cee24d Author: Nicholas Piggin Date: Tue Jun 9 17:06:08 2020 +1000 powerpc/64s: Move branch cache flushing bcctr variant to ppc-ops.h Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200609070610.846703-6-npiggin@gmail.com commit c0036549a9d9a060fa8bc24e31f85503ce08ad5e Author: Nicholas Piggin Date: Tue Jun 9 17:06:07 2020 +1000 powerpc/security: split branch cache flush toggle from code patching Branch cache flushing code patching has inter-dependencies on both the link stack and the count cache flushing state. To make the code clearer and to separate the link stack and count cache handling, split the "toggle" (setting up variables and printing enable/disable) from the code patching. Signed-off-by: Nicholas Piggin [mpe: Always print something, even if the flush is disabled] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200609070610.846703-5-npiggin@gmail.com commit 1afe00c74ffe6d502bffa81c7d849cb4640d7ae5 Author: Nicholas Piggin Date: Tue Jun 9 17:06:06 2020 +1000 powerpc/security: make display of branch cache flush more consistent Make the count-cache and link-stack messages look the same Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200609070610.846703-4-npiggin@gmail.com commit c06ac2771070f465076e87bba262c64fb0b3aca3 Author: Nicholas Piggin Date: Tue Jun 9 17:06:05 2020 +1000 powerpc/security: change link stack flush state to the flush type enum Prepare to allow for hardware link stack flushing by using the none/sw/hw type, same as the count cache state. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200609070610.846703-3-npiggin@gmail.com commit 1026798c644bfd3115fc4e32fd5e767cfc30ccf1 Author: Nicholas Piggin Date: Tue Jun 9 17:06:04 2020 +1000 powerpc/security: re-name count cache flush to branch cache flush The count cache flush mostly refers to both count cache and link stack flushing. As a first step to untangling these a bit, re-name the bits that apply to both. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200609070610.846703-2-npiggin@gmail.com commit b2b46304e9360f3dda49c9d8ba4a1478b9eecf1d Author: Nicholas Piggin Date: Wed Jun 24 09:41:39 2020 +1000 powerpc: re-initialise lazy FPU/VEC counters on every fault When a FP/VEC/VSX unavailable fault loads registers and enables the facility in the MSR, re-set the lazy restore counters to 1 rather than incrementing them so every fault gets the same number of restores before the next fault. This probably shouldn't be a practical change because if a lazy counter was non-zero then it should have been restored and would not cause a fault when userspace tries to access it. However the code and comment implies otherwise so that's misleading and unnecessary. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200623234139.2262227-3-npiggin@gmail.com commit 01eb01877f3386d4bd5de75909abdd0af45a5fa2 Author: Nicholas Piggin Date: Wed Jun 24 09:41:38 2020 +1000 powerpc/64s: Fix restore_math unnecessarily changing MSR Before returning to user, if there are missing FP/VEC/VSX bits from the user MSR then those registers had been saved and must be restored again before use. restore_math will decide whether to restore immediately, or skip the restore and let fp/vec/vsx unavailable faults demand load the registers. Each time restore_math restores one of the FP/VSX or VEC register sets is loaded, an 8-bit counter is incremented (load_fp and load_vec). When these wrap to zero, restore_math no longer restores that register set until after they are next demand faulted. It's quite usual for those counters to have different values, so if one wraps to zero and restore_math no longer restores its registers or user MSR bit but the other is not zero yet does not need to be restored (because the kernel is not frequently using the FPU), then restore_math will be called and it will also not return in the early exit check. This causes msr_check_and_set to test and set the MSR at every kernel exit despite having no work to do. This can cause workloads (e.g., a NULL syscall microbenchmark) to run fast for a time while both counters are non-zero, then slow down when one of the counters reaches zero, then speed up again after the second counter reaches zero. The cost is significant, about 10% slowdown on a NULL syscall benchmark, and the jittery behaviour is very undesirable. Fix this by having restore_math test all conditions first, and only update MSR if we will be loading registers. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200623234139.2262227-2-npiggin@gmail.com commit 891b4fe8fe3d09f20948b391f24c9fc5b7580a2b Author: Nicholas Piggin Date: Wed Jun 24 09:41:37 2020 +1000 powerpc/64s: restore_math remove TM test The TM test in restore_math added by commit dc16b553c949e ("powerpc: Always restore FPU/VEC/VSX if hardware transactional memory in use") is no longer necessary after commit a8318c13e79ba ("powerpc/tm: Fix restoring FP/VMX facility incorrectly on interrupts"), which removed the cases where restore_math has to restore if TM is active. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200623234139.2262227-1-npiggin@gmail.com commit 8c26ab72663b4affc31e47cdf77d61d0172d1033 Author: Aneesh Kumar K.V Date: Wed Jul 1 12:52:35 2020 +0530 powerpc/pmem: Initialize pmem device on newer hardware With kernel now supporting new pmem flush/sync instructions, we can now enable the kernel to initialize the device. On P10 these devices would appear with a new compatible string. For PAPR device we have compatible "ibm,pmemory-v2" and for OF pmem device we have compatible "pmem-region-v2" Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200701072235.223558-8-aneesh.kumar@linux.ibm.com commit 436499ab868f1a9e497cfdbf641affe8a122c571 Author: Aneesh Kumar K.V Date: Wed Jul 1 12:52:34 2020 +0530 powerpc/pmem: Avoid the barrier in flush routines nvdimm expect the flush routines to just mark the cache clean. The barrier that mark the store globally visible is done in nvdimm_flush(). Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200701072235.223558-7-aneesh.kumar@linux.ibm.com commit 76e6c73f33d4e1cc4de4f25c0bf66d59e42113c4 Author: Aneesh Kumar K.V Date: Wed Jul 1 12:52:33 2020 +0530 powerpc/pmem: Update ppc64 to use the new barrier instruction. pmem on POWER10 can now use phwsync instead of hwsync to ensure all previous writes are architecturally visible for the platform buffer flush. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200701072235.223558-6-aneesh.kumar@linux.ibm.com commit 3e79f082ebfc130360bcee23e4dd74729dcafdf4 Author: Aneesh Kumar K.V Date: Wed Jul 1 12:52:32 2020 +0530 libnvdimm/nvdimm/flush: Allow architecture to override the flush barrier Architectures like ppc64 provide persistent memory specific barriers that will ensure that all stores for which the modifications are written to persistent storage by preceding dcbfps and dcbstps instructions have updated persistent storage before any data access or data transfer caused by subsequent instructions is initiated. This is in addition to the ordering done by wmb() Update nvdimm core such that architecture can use barriers other than wmb to ensure all previous writes are architecturally visible for the platform buffer flush. Signed-off-by: Aneesh Kumar K.V Reviewed-by: Dan Williams Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200701072235.223558-5-aneesh.kumar@linux.ibm.com commit d358042793183a57094dac45a44116e1165ac593 Author: Aneesh Kumar K.V Date: Wed Jul 1 12:52:31 2020 +0530 powerpc/pmem: Add flush routines using new pmem store and sync instruction Start using dcbstps; phwsync; sequence for flushing persistent memory range. The new instructions are implemented as a variant of dcbf and hwsync and on P8 and P9 they will be executed as those instructions. We avoid using them on older hardware. This helps to avoid difficult to debug bugs. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200701072235.223558-4-aneesh.kumar@linux.ibm.com commit 32db09d992ddc7d145595cff49cccfe14e018266 Author: Aneesh Kumar K.V Date: Wed Jul 1 12:52:30 2020 +0530 powerpc/pmem: Add new instructions for persistent storage and sync POWER10 introduces two new variants of dcbf instructions (dcbstps and dcbfps) that can be used to write modified locations back to persistent storage. Additionally, POWER10 also introduce phwsync and plwsync which can be used to establish order of these writes to persistent storage. This patch exposes these instructions to the rest of the kernel. The existing dcbf and hwsync instructions in P8 and P9 are adequate to enable appropriate synchronization with OpenCAPI-hosted persistent storage. Hence the new instructions are added as a variant of the old ones that old hardware won't differentiate. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200701072235.223558-3-aneesh.kumar@linux.ibm.com commit c83040192f3763b243ece26073d61a895b4a230f Author: Aneesh Kumar K.V Date: Wed Jul 1 12:52:29 2020 +0530 powerpc/pmem: Restrict papr_scm to P8 and above. The PAPR based virtualized persistent memory devices are only supported on POWER9 and above. In the followup patch, the kernel will switch the persistent memory cache flush functions to use a new `dcbf` variant instruction. The new instructions even though added in ISA 3.1 works even on P8 and P9 because these are implemented as a variant of existing `dcbf` and `hwsync` and on P8 and P9 behaves as such. Considering these devices are only supported on P8 and above, update the driver to prevent a P7-compat guest from using persistent memory devices. We don't update of_pmem driver with the same condition, because, on bare-metal, the firmware enables pmem support only on P9 and above. There the kernel depends on OPAL firmware to restrict exposing persistent memory related device tree entries on older hardware. of_pmem.ko is written without any arch dependency and we don't want to add ppc64 specific cpu feature check in of_pmem driver. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200701072235.223558-2-aneesh.kumar@linux.ibm.com commit dd3d9aa5589c52efaec12ffeb84f0f5f8208fbc3 Author: Nicholas Piggin Date: Fri Jul 3 11:06:08 2020 +0530 powerpc/mm/book3s64/radix: Off-load TLB invalidations to host when !GTSE When platform doesn't support GTSE, let TLB invalidation requests for radix guests be off-loaded to the host using H_RPT_INVALIDATE hcall. [hcall wrapper, error path handling and renames] Signed-off-by: Nicholas Piggin Signed-off-by: Bharata B Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200703053608.12884-4-bharata@linux.ibm.com commit b6c84175078ff022b343b7b0737aeb33001ca90c Author: Bharata B Rao Date: Fri Jul 3 11:06:07 2020 +0530 powerpc/pseries: H_REGISTER_PROC_TBL should ask for GTSE only if enabled H_REGISTER_PROC_TBL asks for GTSE by default. GTSE flag bit should be set only when GTSE is supported. Signed-off-by: Bharata B Rao Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200703053608.12884-3-bharata@linux.ibm.com commit 029ab30b4c0a7ec587eece1ec07c3981fdff2bed Author: Bharata B Rao Date: Fri Jul 3 11:06:06 2020 +0530 powerpc/mm: Enable radix GTSE only if supported. Make GTSE an MMU feature and enable it by default for radix. However for guest, conditionally enable it if hypervisor supports it via OV5 vector. Let prom_init ask for radix GTSE only if the support exists. Having GTSE as an MMU feature will make it easy to enable radix without GTSE. Currently radix assumes GTSE is enabled by default. Signed-off-by: Bharata B Rao Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200703053608.12884-2-bharata@linux.ibm.com commit 404fc93d4a0118d5f9abac8b63d418c2bbc8c2b4 Author: Kieran Bingham Date: Wed Jul 15 13:48:34 2020 +0100 drivers: net: wan: Fix trivial spelling The word 'descriptor' is misspelled throughout the tree. Fix it up accordingly: decriptor -> descriptor Signed-off-by: Kieran Bingham Signed-off-by: Jakub Kicinski commit 4b7150040a4dadcd6ad944fe6a77a2e6cfebebcd Merge: 5e126e7c4e527 46b171d7d73ae Author: Jakub Kicinski Date: Wed Jul 15 18:10:41 2020 -0700 Merge branch 'mlxsw-reg-add-policer-bandwidth-limits' Ido Schimmel says: ==================== mlxsw: Offload tc police action This patch set adds support for tc police action in mlxsw. Patches #1-#2 add defines for policer bandwidth limits and resource identifiers (e.g., maximum number of policers). Patch #3 adds a common policer core in mlxsw. Currently it is only used by the policy engine, but future patch sets will use it for trap policers and storm control policers. The common core allows us to share common logic between all policer types and abstract certain details from the various users in mlxsw. Patch #4 exposes the maximum number of supported policers and their current usage to user space via devlink-resource. This provides better visibility and also used for selftests purposes. Patches #5-#7 gradually add support for tc police action in the policy engine by calling into previously mentioned policer core. Patch #8 adds a generic selftest for tc-police that can be used with veth pairs or physical loopbacks. Patches #9-#11 add mlxsw-specific selftests. ==================== Signed-off-by: Jakub Kicinski commit 46b171d7d73aedfae8070622f1798ac4b124284c Author: Ido Schimmel Date: Wed Jul 15 11:27:33 2020 +0300 selftests: mlxsw: Test policers' occupancy Test that policers shared by different tc filters are correctly reference counted by observing policers' occupancy via devlink-resource. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit 5061e773264b11fdc51c61d6619aca76efd3424f Author: Ido Schimmel Date: Wed Jul 15 11:27:32 2020 +0300 selftests: mlxsw: Add scale test for tc-police Query the maximum number of supported policers using devlink-resource and test that this number can be reached by configuring tc filters with police action. Test that an error is returned in case the maximum number is exceeded. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit cb12d176326722e2f4ede4e459e86ea36607c555 Author: Ido Schimmel Date: Wed Jul 15 11:27:31 2020 +0300 selftests: mlxsw: tc_restrictions: Test tc-police restrictions Test that upper and lower limits on rate and burst size imposed by the device are rejected by the kernel. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit afe231d32eb5fa4f4975596958c48c3a77fa1773 Author: Ido Schimmel Date: Wed Jul 15 11:27:30 2020 +0300 selftests: forwarding: Add tc-police tests Test tc-police action in various scenarios such as Rx policing, Tx policing, shared policer and police piped to mirred. The test passes with both veth pairs and loopbacked ports. # ./tc_police.sh TEST: police on rx [ OK ] TEST: police on tx [ OK ] TEST: police with shared policer - rx [ OK ] TEST: police with shared policer - tx [ OK ] TEST: police rx and mirror [ OK ] TEST: police tx and mirror [ OK ] Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit af11e818a7691468381bbb33a3b98fb718605385 Author: Ido Schimmel Date: Wed Jul 15 11:27:29 2020 +0300 mlxsw: spectrum_acl: Offload FLOW_ACTION_POLICE Offload action police when used with a flower classifier. The number of dropped packets is read from the policer and reported to tc. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit deee0abc70d9c2c7241fdb915527cb8fdbf36e7a Author: Ido Schimmel Date: Wed Jul 15 11:27:28 2020 +0300 mlxsw: core_acl_flex_actions: Add police action Add core functionality required to support police action in the policy engine. The utilized hardware policers are stored in a hash table keyed by the flow action index. This allows to support policer sharing between multiple ACL rules. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit d25b8f6ebcc451b56faedc2dc666f74628fb1ffc Author: Ido Schimmel Date: Wed Jul 15 11:27:27 2020 +0300 mlxsw: core_acl_flex_actions: Work around hardware limitation In the policy engine, each ACL rule points to an action block where the ACL actions are stored. Each action block consists of one or more action sets. Each action set holds one or more individual actions, up to a maximum queried from the device. For example: Action set #1 Action set #2 +----------+ +--------------+ +--------------+ | ACL rule +----------> Action #1 | +-----> Action #4 | +----------+ +--------------+ | +--------------+ | Action #2 | | | Action #5 | +--------------+ | +--------------+ | Action #3 +------+ | | +--------------+ +--------------+ <---------+ Action block +-----------------> The hardware has a limitation that prevents a policing action (MLXSW_AFA_POLCNT_CODE when used with a policer, not a counter) from being configured in the same action set with a trap action (i.e., MLXSW_AFA_TRAP_CODE or MLXSW_AFA_TRAPWU_CODE). Note that the latter used to implement multiple actions: 'trap', 'mirred', 'drop'. Work around this limitation by teaching mlxsw_afa_block_append_action() to create a new action set not only when there is no more room left in the current set, but also when there is a conflict between previously mentioned actions. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit bf038f03728ee2880168aa127f5f871fea6d22ab Author: Ido Schimmel Date: Wed Jul 15 11:27:26 2020 +0300 mlxsw: spectrum_policer: Add devlink resource support Expose via devlink-resource the maximum number of single-rate policers and their current occupancy. Example: $ devlink resource show pci/0000:01:00.0 ... name global_policers size 1000 unit entry dpipe_tables none resources: name single_rate_policers size 968 occ 0 unit entry dpipe_tables none Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit 8d3fbae70d8d7e5f75cf3cb79eb8f1ac9807c354 Author: Ido Schimmel Date: Wed Jul 15 11:27:25 2020 +0300 mlxsw: spectrum_policer: Add policer core Add common code to handle all policer-related functionality in mlxsw. Currently, only policer for policy engines are supported, but it in the future more policer families will be added such as CPU (trap) policers and storm control policers. The API allows different modules to add / delete policers and read their drop counter. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit 1b744fc9f8d5372506d1a9b7aae2584b75d54e3b Author: Ido Schimmel Date: Wed Jul 15 11:27:24 2020 +0300 mlxsw: resources: Add resource identifier for global policers Add a resource identifier for maximum global policers so that it could be later used to query the information from firmware. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit fbf0f5d185343300a80aa0fd8e633a985b9947e9 Author: Ido Schimmel Date: Wed Jul 15 11:27:23 2020 +0300 mlxsw: reg: Add policer bandwidth limits Add policer bandwidth limits for both rate and burst size so that they could be enforced by a later patch. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Jakub Kicinski commit 5e126e7c4e52754e3aac0fbc5325abcbe1629388 Author: Luo bin Date: Wed Jul 15 15:30:23 2020 +0800 hinic: add firmware update support add support to update firmware by the devlink flashing API Signed-off-by: Luo bin Signed-off-by: Jakub Kicinski commit 514d09529db905251916399a90b69e1a3eac6cb1 Author: Suraj Upadhyay Date: Tue Jul 14 19:53:28 2020 +0530 decnet: dn_dev: Remove an unnecessary label. Remove the unnecessary label from dn_dev_ioctl() and make its error handling simpler to read. Signed-off-by: Suraj Upadhyay Signed-off-by: Jakub Kicinski commit 94d9f78f4d64b967273a676167bd34ddad2f978c Author: Vladimir Oltean Date: Thu Jul 9 23:17:33 2020 +0300 docs: networking: timestamping: add section for stacked PHC devices The concept of timestamping DSA switches / Ethernet PHYs is becoming more and more popular, however the Linux kernel timestamping code has evolved quite organically and there's layers upon layers of new and old code that need to work together for things to behave as expected. Add this chapter to explain what the overall goals are. Loosely based upon this email discussion plus some more info: https://lkml.org/lkml/2020/7/6/481 Signed-off-by: Vladimir Oltean Reviewed-by: Richard Cochran Signed-off-by: Jakub Kicinski commit e63a22828432fd1739681be09814b5a5ce69a556 Author: Alexander A. Klimov Date: Thu Jul 9 22:49:25 2020 +0200 net: sundance: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Jakub Kicinski commit 606e7022078410ce4456e760e80f5e4b68c63476 Author: Michał Mirosław Date: Wed Jul 15 17:30:36 2020 -0700 Input: mt - cleanup open-coded __set_bit() Replace open-coded __set_bit() with the function. Signed-off-by: Michał Mirosław Link: https://lore.kernel.org/r/cf1dda3a372896cb01033ce084a7deb9620df7aa.1594599118.git.mirq-linux@rere.qmqm.pl Signed-off-by: Dmitry Torokhov commit 41722d142bd65327ffb1d81f1c151581564dda06 Author: Alexander A. Klimov Date: Sun Jul 5 09:55:42 2020 +0200 dt-bindings: mfd: dialog: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Acked-by: Adam Thomson Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200705075542.22728-1-grandmaster@al2klimov.de Signed-off-by: Rob Herring commit 54b0e2eb046eb75523eff3ec693a7cc5657589fa Author: Alexander A. Klimov Date: Sun Jul 5 09:55:24 2020 +0200 dt-bindings: media: xilinx: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Reviewed-by: Laurent Pinchart Acked-by: Michal Simek Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200705075524.22657-1-grandmaster@al2klimov.de Signed-off-by: Rob Herring commit 42b840bcfc16520f44b1ff51132ea720f86cb7ab Author: Lee Jones Date: Mon Jul 13 09:00:00 2020 +0100 scsi: aic7xxx: Fix 'amount_xferred' set but not used issue 'amount_xferred' is used, but only in certain circumstances. Place the same stipulations on the defining/allocating of 'amount_xferred' as is placed when using it. We've been careful not to change any of the ordering semantics here. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_done’: drivers/scsi/aic7xxx/aic79xx_osm.c:1796:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200713080001.128044-24-lee.jones@linaro.org Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 532d56c631f1b46779d5823c99016fc7cec052e1 Author: Lee Jones Date: Mon Jul 13 08:59:59 2020 +0100 scsi: aic7xxx: Remove unused variables 'wait' and 'paused' It looks like they have never actually been used. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_dev_reset’: drivers/scsi/aic7xxx/aic79xx_osm.c:782:9: warning: variable ‘wait’ set but not used [-Wunused-but-set-variable] drivers/scsi/aic7xxx/aic79xx_osm.c:781:9: warning: variable ‘paused’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200713080001.128044-23-lee.jones@linaro.org Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 91b6e191c4dc713e67970e172dbba8a671de2e6f Author: Lee Jones Date: Mon Jul 13 08:59:58 2020 +0100 scsi: aic7xxx: Remove unused variable 'ahd' Hasn't been used since 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic79xx_osm.c: In function ‘ahd_linux_slave_configure’: drivers/scsi/aic7xxx/aic79xx_osm.c:703:20: warning: variable ‘ahd’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200713080001.128044-22-lee.jones@linaro.org Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 09d99705b5d2595ffb195ee102dc98d76613486b Author: Lee Jones Date: Mon Jul 13 08:59:57 2020 +0100 scsi: lpfc: Correct some pretty obvious misdocumentation Either due to API slippage before the driver was mainlined or copy/paste errors. Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_nvme.c:254: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_create_queue' drivers/scsi/lpfc/lpfc_nvme.c:254: warning: Function parameter or member 'qsize' not described in 'lpfc_nvme_create_queue' drivers/scsi/lpfc/lpfc_nvme.c:254: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_create_queue' drivers/scsi/lpfc/lpfc_nvme.c:311: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_delete_queue' drivers/scsi/lpfc/lpfc_nvme.c:311: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_delete_queue' drivers/scsi/lpfc/lpfc_nvme.c:689: warning: Function parameter or member 'gen_req_cmp' not described in '__lpfc_nvme_ls_req' drivers/scsi/lpfc/lpfc_nvme.c:801: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_ls_req' drivers/scsi/lpfc/lpfc_nvme.c:801: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_ls_req' drivers/scsi/lpfc/lpfc_nvme.c:801: warning: Function parameter or member 'pnvme_lsreq' not described in 'lpfc_nvme_ls_req' drivers/scsi/lpfc/lpfc_nvme.c:801: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_ls_req' drivers/scsi/lpfc/lpfc_nvme.c:801: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_ls_req' drivers/scsi/lpfc/lpfc_nvme.c:937: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_ls_abort' drivers/scsi/lpfc/lpfc_nvme.c:937: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_ls_abort' drivers/scsi/lpfc/lpfc_nvme.c:937: warning: Function parameter or member 'pnvme_lsreq' not described in 'lpfc_nvme_ls_abort' drivers/scsi/lpfc/lpfc_nvme.c:937: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_ls_abort' drivers/scsi/lpfc/lpfc_nvme.c:937: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_ls_abort' drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Function parameter or member 'phba' not described in 'lpfc_nvme_io_cmd_wqe_cmpl' drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Function parameter or member 'pwqeIn' not described in 'lpfc_nvme_io_cmd_wqe_cmpl' drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Function parameter or member 'wcqe' not described in 'lpfc_nvme_io_cmd_wqe_cmpl' drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_io_cmd_wqe_cmpl' drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_io_cmd_wqe_cmpl' drivers/scsi/lpfc/lpfc_nvme.c:1075: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_io_cmd_wqe_cmpl' drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Function parameter or member 'lpfc_ncmd' not described in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Function parameter or member 'pnode' not described in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Function parameter or member 'cstat' not described in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1313: warning: Excess function parameter 'hw_queue_handle' description in 'lpfc_nvme_prep_io_cmd' drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_prep_io_dma' drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Function parameter or member 'lpfc_ncmd' not described in 'lpfc_nvme_prep_io_dma' drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_prep_io_dma' drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_prep_io_dma' drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_prep_io_dma' drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_prep_io_dma' drivers/scsi/lpfc/lpfc_nvme.c:1420: warning: Excess function parameter 'hw_queue_handle' description in 'lpfc_nvme_prep_io_dma' drivers/scsi/lpfc/lpfc_nvme.c:1598: warning: bad line: indicated in @lpfc_nvme_rport. drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Function parameter or member 'pnvme_fcreq' not described in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1609: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_fcp_io_submit' drivers/scsi/lpfc/lpfc_nvme.c:1856: warning: Function parameter or member 'abts_cmpl' not described in 'lpfc_nvme_abort_fcreq_cmpl' drivers/scsi/lpfc/lpfc_nvme.c:1856: warning: Excess function parameter 'rspiocb' description in 'lpfc_nvme_abort_fcreq_cmpl' drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Function parameter or member 'pnvme_lport' not described in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Function parameter or member 'pnvme_rport' not described in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Function parameter or member 'pnvme_fcreq' not described in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Excess function parameter 'lpfc_pnvme' description in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Excess function parameter 'lpfc_nvme_lport' description in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Excess function parameter 'lpfc_nvme_rport' description in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:1892: warning: Excess function parameter 'lpfc_nvme_fcreq' description in 'lpfc_nvme_fcp_abort' drivers/scsi/lpfc/lpfc_nvme.c:2093: warning: Function parameter or member 'ndlp' not described in 'lpfc_get_nvme_buf' drivers/scsi/lpfc/lpfc_nvme.c:2093: warning: Function parameter or member 'idx' not described in 'lpfc_get_nvme_buf' drivers/scsi/lpfc/lpfc_nvme.c:2093: warning: Function parameter or member 'expedite' not described in 'lpfc_get_nvme_buf' drivers/scsi/lpfc/lpfc_nvme.c:2197: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_create_localport' drivers/scsi/lpfc/lpfc_nvme.c:2330: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_destroy_localport' drivers/scsi/lpfc/lpfc_nvme.c:2330: warning: Excess function parameter 'pnvme' description in 'lpfc_nvme_destroy_localport' drivers/scsi/lpfc/lpfc_nvme.c:2543: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_rescan_port' drivers/scsi/lpfc/lpfc_nvme.c:2543: warning: Function parameter or member 'ndlp' not described in 'lpfc_nvme_rescan_port' Link: https://lore.kernel.org/r/20200713080001.128044-21-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 7405edfdfb96f60c778d2515aeddc7ea21afff8c Author: Lee Jones Date: Mon Jul 13 08:59:56 2020 +0100 scsi: be2iscsi: Add missing function parameter description Also promote fully documented function header to kerneldoc. Fixes the following W=1 kernel build warning(s): drivers/scsi/be2iscsi/be_mgmt.c:112: warning: Function parameter or member 'phba' not described in 'mgmt_open_connection' Link: https://lore.kernel.org/r/20200713080001.128044-20-lee.jones@linaro.org Cc: Subbu Seetharaman Cc: Ketan Mukadam Cc: Jitendra Bhivare Cc: linux-drivers@broadcom.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit dbc019a48f97a50c6f8a5ad0502f6b46b25979d7 Author: Lee Jones Date: Mon Jul 13 08:59:55 2020 +0100 scsi: be2iscsi: Fix misdocumentation of 'pcontext' Also demote unintentional kerneldoc header. Fixes the following W=1 kernel build warning(s): drivers/scsi/be2iscsi/be_main.c:986: warning: Function parameter or member 'pcontext' not described in 'alloc_wrb_handle' drivers/scsi/be2iscsi/be_main.c:986: warning: Excess function parameter 'pwrb_context' description in 'alloc_wrb_handle' drivers/scsi/be2iscsi/be_main.c:1409: warning: Function parameter or member 'beiscsi_conn' not described in 'beiscsi_complete_pdu' drivers/scsi/be2iscsi/be_main.c:1409: warning: Function parameter or member 'phdr' not described in 'beiscsi_complete_pdu' drivers/scsi/be2iscsi/be_main.c:1409: warning: Function parameter or member 'pdata' not described in 'beiscsi_complete_pdu' drivers/scsi/be2iscsi/be_main.c:1409: warning: Function parameter or member 'dlen' not described in 'beiscsi_complete_pdu' Link: https://lore.kernel.org/r/20200713080001.128044-19-lee.jones@linaro.org Cc: Subbu Seetharaman Cc: Ketan Mukadam Cc: Jitendra Bhivare Cc: linux-drivers@broadcom.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit abad069ef0dae46edc4dd5346c28ee79c1ffe8ef Author: Lee Jones Date: Mon Jul 13 08:59:54 2020 +0100 scsi: be2iscsi: Fix API/documentation slip And add descriptions for a couple of missing function parameters. Fixes the following W=1 kernel build warning(s): drivers/scsi/be2iscsi/be_iscsi.c:38: warning: Function parameter or member 'ep' not described in 'beiscsi_session_create' drivers/scsi/be2iscsi/be_iscsi.c:173: warning: Function parameter or member 'is_leading' not described in 'beiscsi_conn_bind' drivers/scsi/be2iscsi/be_iscsi.c:998: warning: Function parameter or member 'beiscsi_ep' not described in 'beiscsi_free_ep' drivers/scsi/be2iscsi/be_iscsi.c:998: warning: Excess function parameter 'ep' description in 'beiscsi_free_ep' drivers/scsi/be2iscsi/be_iscsi.c:1039: warning: Function parameter or member 'non_blocking' not described in 'beiscsi_open_conn' drivers/scsi/be2iscsi/be_iscsi.c:1135: warning: Function parameter or member 'shost' not described in 'beiscsi_ep_connect' drivers/scsi/be2iscsi/be_iscsi.c:1135: warning: Excess function parameter 'scsi_host' description in 'beiscsi_ep_connect' drivers/scsi/be2iscsi/be_iscsi.c:1236: warning: Function parameter or member 'beiscsi_ep' not described in 'beiscsi_conn_close' drivers/scsi/be2iscsi/be_iscsi.c:1236: warning: Excess function parameter 'ep' description in 'beiscsi_conn_close' Link: https://lore.kernel.org/r/20200713080001.128044-18-lee.jones@linaro.org Cc: Subbu Seetharaman Cc: Ketan Mukadam Cc: Jitendra Bhivare Cc: linux-drivers@broadcom.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 8a692fdb1d04f569e583ab015d2ae802b510622e Author: Lee Jones Date: Mon Jul 13 08:59:52 2020 +0100 scsi: myrs: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/scsi/myrs.c:94: warning: Function parameter or member 'cmd_blk' not described in 'myrs_reset_cmd' drivers/scsi/myrs.c:105: warning: Function parameter or member 'cs' not described in 'myrs_qcmd' drivers/scsi/myrs.c:105: warning: Function parameter or member 'cmd_blk' not described in 'myrs_qcmd' drivers/scsi/myrs.c:130: warning: Function parameter or member 'cs' not described in 'myrs_exec_cmd' drivers/scsi/myrs.c:130: warning: Function parameter or member 'cmd_blk' not described in 'myrs_exec_cmd' drivers/scsi/myrs.c:149: warning: Function parameter or member 'cs' not described in 'myrs_report_progress' drivers/scsi/myrs.c:149: warning: Function parameter or member 'ldev_num' not described in 'myrs_report_progress' drivers/scsi/myrs.c:149: warning: Function parameter or member 'msg' not described in 'myrs_report_progress' drivers/scsi/myrs.c:149: warning: Function parameter or member 'blocks' not described in 'myrs_report_progress' drivers/scsi/myrs.c:149: warning: Function parameter or member 'size' not described in 'myrs_report_progress' drivers/scsi/myrs.c:160: warning: Function parameter or member 'cs' not described in 'myrs_get_ctlr_info' drivers/scsi/myrs.c:222: warning: Function parameter or member 'cs' not described in 'myrs_get_ldev_info' drivers/scsi/myrs.c:222: warning: Function parameter or member 'ldev_num' not described in 'myrs_get_ldev_info' drivers/scsi/myrs.c:222: warning: Function parameter or member 'ldev_info' not described in 'myrs_get_ldev_info' drivers/scsi/myrs.c:310: warning: Function parameter or member 'cs' not described in 'myrs_get_pdev_info' drivers/scsi/myrs.c:310: warning: Function parameter or member 'channel' not described in 'myrs_get_pdev_info' drivers/scsi/myrs.c:310: warning: Function parameter or member 'target' not described in 'myrs_get_pdev_info' drivers/scsi/myrs.c:310: warning: Function parameter or member 'lun' not described in 'myrs_get_pdev_info' drivers/scsi/myrs.c:310: warning: Function parameter or member 'pdev_info' not described in 'myrs_get_pdev_info' drivers/scsi/myrs.c:353: warning: Function parameter or member 'cs' not described in 'myrs_dev_op' drivers/scsi/myrs.c:353: warning: Function parameter or member 'opcode' not described in 'myrs_dev_op' drivers/scsi/myrs.c:353: warning: Function parameter or member 'opdev' not described in 'myrs_dev_op' drivers/scsi/myrs.c:379: warning: Function parameter or member 'cs' not described in 'myrs_translate_pdev' drivers/scsi/myrs.c:379: warning: Function parameter or member 'channel' not described in 'myrs_translate_pdev' drivers/scsi/myrs.c:379: warning: Function parameter or member 'target' not described in 'myrs_translate_pdev' drivers/scsi/myrs.c:379: warning: Function parameter or member 'lun' not described in 'myrs_translate_pdev' drivers/scsi/myrs.c:379: warning: Function parameter or member 'devmap' not described in 'myrs_translate_pdev' drivers/scsi/myrs.c:422: warning: Function parameter or member 'cs' not described in 'myrs_get_event' drivers/scsi/myrs.c:422: warning: Function parameter or member 'event_num' not described in 'myrs_get_event' drivers/scsi/myrs.c:422: warning: Function parameter or member 'event_buf' not described in 'myrs_get_event' drivers/scsi/myrs.c:484: warning: Function parameter or member 'cs' not described in 'myrs_enable_mmio_mbox' drivers/scsi/myrs.c:484: warning: Function parameter or member 'enable_mbox_fn' not described in 'myrs_enable_mmio_mbox' drivers/scsi/myrs.c:584: warning: Function parameter or member 'cs' not described in 'myrs_get_config' drivers/scsi/myrs.c:688: warning: cannot understand function prototype: 'struct ' drivers/scsi/myrs.c:1967: warning: Function parameter or member 'dev' not described in 'myrs_is_raid' drivers/scsi/myrs.c:1980: warning: Function parameter or member 'dev' not described in 'myrs_get_resync' drivers/scsi/myrs.c:2005: warning: Function parameter or member 'dev' not described in 'myrs_get_state' drivers/scsi/myrs.c:2343: warning: bad line: the Error Status Register when the driver performs the BIOS handshaking. drivers/scsi/myrs.c:2344: warning: bad line: It returns true for fatal errors and false otherwise. drivers/scsi/myrs.c:2349: warning: Function parameter or member 'cs' not described in 'myrs_err_status' drivers/scsi/myrs.c:2349: warning: Function parameter or member 'status' not described in 'myrs_err_status' drivers/scsi/myrs.c:2349: warning: Function parameter or member 'parm0' not described in 'myrs_err_status' drivers/scsi/myrs.c:2349: warning: Function parameter or member 'parm1' not described in 'myrs_err_status' Link: https://lore.kernel.org/r/20200713080001.128044-16-lee.jones@linaro.org Cc: Hannes Reinecke Cc: Linux GmbH Cc: "Leonard N. Zubkoff" Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f3bdc59f9b112f2442aa473c8550b7e65d0778c0 Author: Lee Jones Date: Mon Jul 13 08:59:51 2020 +0100 scsi: ipr: Fix struct packed-not-aligned issues Fixes the following W=1 kernel build warning(s): drivers/scsi/ipr.h:1687:1: warning: alignment 1 of ‘struct ipr_dump_location_entry’ is less than 4 [-Wpacked-not-aligned] 1687 | }__attribute__((packed)); | ^ drivers/scsi/ipr.h:1711:1: warning: alignment 1 of ‘struct ipr_driver_dump’ is less than 4 [-Wpacked-not-aligned] 1711 | }__attribute__((packed)); | ^ Link: https://lore.kernel.org/r/20200713080001.128044-15-lee.jones@linaro.org Cc: Brian King Cc: Alan Cox Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 4dc833999e3719ce3154b667f04677bbb9f04fd0 Author: Lee Jones Date: Mon Jul 13 08:59:50 2020 +0100 scsi: ipr: Remove a bunch of set but checked variables Fixes the following W=1 kernel build warning(s): In file included from drivers/scsi/ipr.c:73: drivers/scsi/ipr.c: In function ‘ipr_mask_and_clear_interrupts’: drivers/scsi/ipr.c:740:15: warning: variable ‘int_reg’ set but not used [-Wunused-but-set-variable] drivers/scsi/ipr.c: In function ‘ipr_cancel_op’: drivers/scsi/ipr.c:5497:13: warning: variable ‘int_reg’ set but not used [-Wunused-but-set-variable] drivers/scsi/ipr.c: In function ‘ipr_iopoll’: drivers/scsi/ipr.c:5765:22: warning: variable ‘ioa_cfg’ set but not used [-Wunused-but-set-variable] drivers/scsi/ipr.c: In function ‘ipr_reset_restore_cfg_space’: drivers/scsi/ipr.c:8662:6: warning: variable ‘int_reg’ set but not used [-Wunused-but-set-variable] drivers/scsi/ipr.c: In function ‘ipr_test_msi’: Link: https://lore.kernel.org/r/20200713080001.128044-14-lee.jones@linaro.org Cc: Brian King Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e31f2661ff41381022cb652d8a185a3c2e2b05a5 Author: Lee Jones Date: Mon Jul 13 08:59:49 2020 +0100 scsi: virtio_scsi: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the sourcefile and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/scsi/virtio_scsi.c:109: warning: Function parameter or member 'vscsi' not described in 'virtscsi_complete_cmd' drivers/scsi/virtio_scsi.c:109: warning: Function parameter or member 'buf' not described in 'virtscsi_complete_cmd' Link: https://lore.kernel.org/r/20200713080001.128044-13-lee.jones@linaro.org Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Stefan Hajnoczi Cc: virtualization@lists.linux-foundation.org Acked-by: Paolo Bonzini Acked-by: Michael S. Tsirkin Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a96099e2c164b168506638dea793e3c4eafa7840 Author: Lee Jones Date: Mon Jul 13 08:59:48 2020 +0100 scsi: ipr: Fix a mountain of kerneldoc misdemeanours Mainly misspellings and/or missing function parameter descriptions. Fixes the following W=1 kernel build warning(s): drivers/scsi/ipr.c:10100:15: warning: variable ‘int_reg’ set but not used [-Wunused-but-set-variable] drivers/scsi/ipr.c:679: warning: Function parameter or member 'fast_done' not described in 'ipr_init_ipr_cmnd' drivers/scsi/ipr.c:697: warning: Function parameter or member 'hrrq' not described in '__ipr_get_free_ipr_cmnd' drivers/scsi/ipr.c:697: warning: Excess function parameter 'ioa_cfg' description in '__ipr_get_free_ipr_cmnd' drivers/scsi/ipr.c:1297: warning: Function parameter or member 'buffer' not described in '__ipr_format_res_path' drivers/scsi/ipr.c:1297: warning: Excess function parameter 'buf' description in '__ipr_format_res_path' drivers/scsi/ipr.c:1321: warning: Function parameter or member 'buffer' not described in 'ipr_format_res_path' drivers/scsi/ipr.c:1321: warning: Excess function parameter 'buf' description in 'ipr_format_res_path' drivers/scsi/ipr.c:1400: warning: Excess function parameter 'cfgtew' description in 'ipr_clear_res_target' drivers/scsi/ipr.c:2679: warning: Function parameter or member 't' not described in 'ipr_timeout' drivers/scsi/ipr.c:2679: warning: Excess function parameter 'ipr_cmd' description in 'ipr_timeout' drivers/scsi/ipr.c:2712: warning: Function parameter or member 't' not described in 'ipr_oper_timeout' drivers/scsi/ipr.c:2712: warning: Excess function parameter 'ipr_cmd' description in 'ipr_oper_timeout' drivers/scsi/ipr.c:3494: warning: Function parameter or member 'attr' not described in 'ipr_show_fw_version' drivers/scsi/ipr.c:3528: warning: Function parameter or member 'attr' not described in 'ipr_show_log_level' drivers/scsi/ipr.c:3551: warning: Function parameter or member 'attr' not described in 'ipr_store_log_level' drivers/scsi/ipr.c:3551: warning: Function parameter or member 'count' not described in 'ipr_store_log_level' drivers/scsi/ipr.c:3586: warning: Function parameter or member 'attr' not described in 'ipr_store_diagnostics' drivers/scsi/ipr.c:3642: warning: Function parameter or member 'dev' not described in 'ipr_show_adapter_state' drivers/scsi/ipr.c:3642: warning: Function parameter or member 'attr' not described in 'ipr_show_adapter_state' drivers/scsi/ipr.c:3642: warning: Excess function parameter 'class_dev' description in 'ipr_show_adapter_state' drivers/scsi/ipr.c:3671: warning: Function parameter or member 'attr' not described in 'ipr_store_adapter_state' drivers/scsi/ipr.c:3722: warning: Function parameter or member 'attr' not described in 'ipr_store_reset_adapter' drivers/scsi/ipr.c:3783: warning: Function parameter or member 'attr' not described in 'ipr_store_iopoll_weight' drivers/scsi/ipr.c:3783: warning: Function parameter or member 'count' not described in 'ipr_store_iopoll_weight' drivers/scsi/ipr.c:3883: warning: Function parameter or member 'sglist' not described in 'ipr_free_ucode_buffer' drivers/scsi/ipr.c:3883: warning: Excess function parameter 'p_dnld' description in 'ipr_free_ucode_buffer' drivers/scsi/ipr.c:4074: warning: Function parameter or member 'dev' not described in 'ipr_store_update_fw' drivers/scsi/ipr.c:4074: warning: Function parameter or member 'attr' not described in 'ipr_store_update_fw' drivers/scsi/ipr.c:4074: warning: Excess function parameter 'class_dev' description in 'ipr_store_update_fw' drivers/scsi/ipr.c:4149: warning: Function parameter or member 'attr' not described in 'ipr_show_fw_type' drivers/scsi/ipr.c:4489: warning: Excess function parameter 'reason' description in 'ipr_change_queue_depth' drivers/scsi/ipr.c:4660: warning: Function parameter or member 'attr' not described in 'ipr_show_raw_mode' drivers/scsi/ipr.c:4688: warning: Function parameter or member 'attr' not described in 'ipr_store_raw_mode' drivers/scsi/ipr.c:4688: warning: Function parameter or member 'count' not described in 'ipr_store_raw_mode' drivers/scsi/ipr.c:5069: warning: Function parameter or member 'ipr_cmd' not described in 'ipr_cmnd_is_free' drivers/scsi/ipr.c:5108: warning: Function parameter or member 'ioa_cfg' not described in 'ipr_wait_for_ops' drivers/scsi/ipr.c:5108: warning: Excess function parameter 'ipr_cmd' description in 'ipr_wait_for_ops' drivers/scsi/ipr.c:5272: warning: Function parameter or member 'deadline' not described in 'ipr_sata_reset' drivers/scsi/ipr.c:5453: warning: Function parameter or member 't' not described in 'ipr_abort_timeout' drivers/scsi/ipr.c:5453: warning: Excess function parameter 'ipr_cmd' description in 'ipr_abort_timeout' drivers/scsi/ipr.c:5578: warning: Function parameter or member 'shost' not described in 'ipr_scan_finished' drivers/scsi/ipr.c:5578: warning: Function parameter or member 'elapsed_time' not described in 'ipr_scan_finished' drivers/scsi/ipr.c:5578: warning: Excess function parameter 'scsi_cmd' description in 'ipr_scan_finished' drivers/scsi/ipr.c:5704: warning: Function parameter or member 'number' not described in 'ipr_isr_eh' drivers/scsi/ipr.c:6278: warning: Function parameter or member 'ipr_cmd' not described in 'ipr_gen_sense' drivers/scsi/ipr.c:6278: warning: Excess function parameter 'ioasa' description in 'ipr_gen_sense' drivers/scsi/ipr.c:6278: warning: Excess function parameter 'sense_buf' description in 'ipr_gen_sense' drivers/scsi/ipr.c:6711: warning: Function parameter or member 'host' not described in 'ipr_ioa_info' drivers/scsi/ipr.c:6711: warning: Excess function parameter 'scsi_host' description in 'ipr_ioa_info' drivers/scsi/ipr.c:7606: warning: Function parameter or member 'res_handle' not described in 'ipr_build_mode_sense' drivers/scsi/ipr.c:7606: warning: Excess function parameter 'res' description in 'ipr_build_mode_sense' drivers/scsi/ipr.c:7947: warning: Function parameter or member 'ipr_cmd' not described in 'ipr_ioafp_set_caching_parameters' drivers/scsi/ipr.c:7986: warning: Function parameter or member 'flags' not described in 'ipr_ioafp_inquiry' drivers/scsi/ipr.c:7986: warning: Function parameter or member 'page' not described in 'ipr_ioafp_inquiry' drivers/scsi/ipr.c:7986: warning: Function parameter or member 'dma_addr' not described in 'ipr_ioafp_inquiry' drivers/scsi/ipr.c:7986: warning: Function parameter or member 'xfer_len' not described in 'ipr_ioafp_inquiry' drivers/scsi/ipr.c:8280: warning: Function parameter or member 't' not described in 'ipr_reset_timer_done' drivers/scsi/ipr.c:8280: warning: Excess function parameter 'ipr_cmd' description in 'ipr_reset_timer_done' drivers/scsi/ipr.c:9486: warning: bad line: drivers/scsi/ipr.c:9609: warning: Function parameter or member 'ioa_cfg' not described in 'ipr_free_all_resources' drivers/scsi/ipr.c:9609: warning: Excess function parameter 'ipr_cmd' description in 'ipr_free_all_resources' drivers/scsi/ipr.c:10071: warning: Function parameter or member 'irq' not described in 'ipr_test_intr' drivers/scsi/ipr.c:10071: warning: Function parameter or member 'devp' not described in 'ipr_test_intr' drivers/scsi/ipr.c:10071: warning: Excess function parameter 'pdev' description in 'ipr_test_intr' drivers/scsi/ipr.c:10098: warning: Function parameter or member 'ioa_cfg' not described in 'ipr_test_msi' drivers/scsi/ipr.c:10538: warning: Function parameter or member 'pdev' not described in 'ipr_probe' drivers/scsi/ipr.c:10538: warning: Function parameter or member 'dev_id' not described in 'ipr_probe' drivers/scsi/ipr.c:10794: warning: Function parameter or member 'ipr_cmd' not described in 'ipr_halt_done' drivers/scsi/ipr.c:10805: warning: Function parameter or member 'nb' not described in 'ipr_halt' drivers/scsi/ipr.c:10805: warning: Function parameter or member 'event' not described in 'ipr_halt' drivers/scsi/ipr.c:10805: warning: Function parameter or member 'buf' not described in 'ipr_halt' Link: https://lore.kernel.org/r/20200713080001.128044-12-lee.jones@linaro.org Cc: Brian King Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e1c3e0f8a2ae15f4ef400eaf5c13043a96dff27a Author: Lee Jones Date: Mon Jul 13 08:59:47 2020 +0100 scsi: pm8001: Provide descriptions for the many undocumented 'attr's ... even if they are completely unused. Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_ctl.c:56: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_mpi_interface_rev_show' drivers/scsi/pm8001/pm8001_ctl.c:81: warning: Function parameter or member 'attr' not described in 'controller_fatal_error_show' drivers/scsi/pm8001/pm8001_ctl.c:100: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_fw_version_show' drivers/scsi/pm8001/pm8001_ctl.c:130: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_ila_version_show' drivers/scsi/pm8001/pm8001_ctl.c:155: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_inactive_fw_version_show' drivers/scsi/pm8001/pm8001_ctl.c:181: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_max_out_io_show' drivers/scsi/pm8001/pm8001_ctl.c:204: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_max_devices_show' drivers/scsi/pm8001/pm8001_ctl.c:230: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_max_sg_list_show' drivers/scsi/pm8001/pm8001_ctl.c:274: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_sas_spec_support_show' drivers/scsi/pm8001/pm8001_ctl.c:303: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_host_sas_address_show' drivers/scsi/pm8001/pm8001_ctl.c:322: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_logging_level_show' drivers/scsi/pm8001/pm8001_ctl.c:355: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_aap_log_show' drivers/scsi/pm8001/pm8001_ctl.c:390: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_ib_queue_log_show' drivers/scsi/pm8001/pm8001_ctl.c:423: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_ob_queue_log_show' drivers/scsi/pm8001/pm8001_ctl.c:454: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_bios_version_show' drivers/scsi/pm8001/pm8001_ctl.c:492: warning: Function parameter or member 'attr' not described in 'event_log_size_show' drivers/scsi/pm8001/pm8001_ctl.c:510: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_iop_log_show' drivers/scsi/pm8001/pm8001_ctl.c:548: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_fatal_log_show' drivers/scsi/pm8001/pm8001_ctl.c:566: warning: Function parameter or member 'attr' not described in 'non_fatal_log_show' drivers/scsi/pm8001/pm8001_ctl.c:609: warning: Function parameter or member 'attr' not described in 'pm8001_ctl_gsm_log_show' Link: https://lore.kernel.org/r/20200713080001.128044-11-lee.jones@linaro.org Cc: Jack Wang Acked-by: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ae272a95133a7a6629a11597ee52a1dd6c168fb5 Author: Lee Jones Date: Mon Jul 13 08:59:46 2020 +0100 scsi: aacraid: Fill in the very parameter descriptions for rx_sync_cmd() ... and document aac_rx_ioremap() 'dev' param. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p2' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p3' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p4' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p5' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'p6' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'status' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'r1' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'r2' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'r3' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Function parameter or member 'r4' not described in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:156: warning: Excess function parameter 'ret' description in 'rx_sync_cmd' drivers/scsi/aacraid/rx.c:450: warning: Function parameter or member 'dev' not described in 'aac_rx_ioremap' Link: https://lore.kernel.org/r/20200713080001.128044-10-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit d2e5105050066c7e495b8bc2b3851ed93f6c366c Author: Lee Jones Date: Mon Jul 13 08:59:45 2020 +0100 scsi: aic94xx: Fix a couple of formatting and bitrot issues Kerneldoc format should be '@.*: ', else the checker gets confused. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic94xx/aic94xx_scb.c:137: warning: Function parameter or member 'phy' not described in 'asd_get_attached_sas_addr' drivers/scsi/aic94xx/aic94xx_scb.c:137: warning: Function parameter or member 'sas_addr' not described in 'asd_get_attached_sas_addr' drivers/scsi/aic94xx/aic94xx_scb.c:860: warning: Function parameter or member 't' not described in 'asd_ascb_timedout' drivers/scsi/aic94xx/aic94xx_scb.c:860: warning: Excess function parameter 'data' description in 'asd_ascb_timedout' Link: https://lore.kernel.org/r/20200713080001.128044-9-lee.jones@linaro.org Cc: Luben Tuikov Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f1134f0eb184f6f6f468e15c2b006384a8238524 Author: Lee Jones Date: Mon Jul 13 08:59:44 2020 +0100 scsi: aacraid: Fix a bunch of function header issues Some parameters not documented. Others misspelled. Also, functions must follow directly after the header that documents them. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/commsup.c:223: warning: Function parameter or member 'scmd' not described in 'aac_fib_alloc_tag' drivers/scsi/aacraid/commsup.c:421: warning: Function parameter or member 'qid' not described in 'aac_queue_get' drivers/scsi/aacraid/commsup.c:421: warning: Function parameter or member 'hw_fib' not described in 'aac_queue_get' drivers/scsi/aacraid/commsup.c:421: warning: Excess function parameter 'priority' description in 'aac_queue_get' drivers/scsi/aacraid/commsup.c:421: warning: Excess function parameter 'fib' description in 'aac_queue_get' drivers/scsi/aacraid/commsup.c:943: warning: Function parameter or member 'fibptr' not described in 'aac_fib_complete' drivers/scsi/aacraid/commsup.c:943: warning: Excess function parameter 'fib' description in 'aac_fib_complete' drivers/scsi/aacraid/commsup.c:1061: warning: Excess function parameter 'dev' description in 'AIF_SNIFF_TIMEOUT' drivers/scsi/aacraid/commsup.c:1061: warning: Excess function parameter 'fibptr' description in 'AIF_SNIFF_TIMEOUT' drivers/scsi/aacraid/commsup.c:2428: warning: Function parameter or member 'data' not described in 'aac_command_thread' drivers/scsi/aacraid/commsup.c:2428: warning: Excess function parameter 'dev' description in 'aac_command_thread' Link: https://lore.kernel.org/r/20200713080001.128044-8-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: Sumit Semwal Cc: "Christian König" Cc: "PMC-Sierra, Inc" Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 966fdadf6feab2f8a264856bf77104cab2543db6 Author: Lee Jones Date: Mon Jul 13 08:59:43 2020 +0100 scsi: aic94xx: Document 'lseq' and repair asd_update_port_links() header Fixes the following W=1 kernel build warning(s): drivers/scsi/aic94xx/aic94xx_seq.c:587: warning: Function parameter or member 'lseq' not described in 'asd_init_lseq_mip' drivers/scsi/aic94xx/aic94xx_seq.c:674: warning: Function parameter or member 'lseq' not described in 'asd_init_lseq_mdp' drivers/scsi/aic94xx/aic94xx_seq.c:958: warning: Function parameter or member 'lseq' not described in 'asd_init_lseq_cio' drivers/scsi/aic94xx/aic94xx_seq.c:1364: warning: Function parameter or member 'asd_ha' not described in 'asd_update_port_links' drivers/scsi/aic94xx/aic94xx_seq.c:1364: warning: Function parameter or member 'phy' not described in 'asd_update_port_links' drivers/scsi/aic94xx/aic94xx_seq.c:1364: warning: Excess function parameter 'sas_phy' description in 'asd_update_port_links' Link: https://lore.kernel.org/r/20200713080001.128044-7-lee.jones@linaro.org Cc: Luben Tuikov Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 71aa4d3e0e78feba6075ef1864959bb0cf2e7719 Author: Lee Jones Date: Mon Jul 13 08:59:42 2020 +0100 scsi: aacraid: Demote partially documented function header This should be populated by someone who knows the meaning of all the params. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c:272: warning: Function parameter or member 'isAif' not described in 'aac_intr_normal' drivers/scsi/aacraid/dpcsup.c:272: warning: Function parameter or member 'isFastResponse' not described in 'aac_intr_normal' drivers/scsi/aacraid/dpcsup.c:272: warning: Function parameter or member 'aif_fib' not described in 'aac_intr_normal' Link: https://lore.kernel.org/r/20200713080001.128044-6-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 0123c7c62d6c84ff4f43cb7ba455900663275993 Author: Lee Jones Date: Mon Jul 13 08:59:41 2020 +0100 scsi: aacraid: Remove unused variable 'status' Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c: In function ‘aac_aif_callback’: drivers/scsi/aacraid/dpcsup.c:232:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 232 | int status; | ^~~~~~ Link: https://lore.kernel.org/r/20200713080001.128044-5-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 2fee77e5b820e7b0dd6c23b2fcd598641a0faf2d Author: Lee Jones Date: Mon Jul 13 08:59:40 2020 +0100 scsi: aacraid: Fix logical bug when !DBG When DBG is not enabled FIB_COUNTER_INCREMENT() results in an empty statement, leaving the contents of if() and else() empty. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/dpcsup.c: In function ‘aac_response_normal’: drivers/scsi/aacraid/dpcsup.c:105:50: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] 105 | FIB_COUNTER_INCREMENT(aac_config.AsyncRecved); | ^ drivers/scsi/aacraid/dpcsup.c: In function ‘aac_intr_normal’: drivers/scsi/aacraid/dpcsup.c:411:30: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] 411 | aac_config.AsyncRecved); | ^ Link: https://lore.kernel.org/r/20200713080001.128044-4-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit cf93fffac2615e56f860009bdd1a08a1c45d69af Author: Lee Jones Date: Mon Jul 13 08:59:39 2020 +0100 scsi: aacraid: Fix a few kerneldoc issues Functions must follow imediately after the header documenting them and all parameters must be present. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/commctrl.c:43: warning: Excess function parameter 'dev' description in 'AAC_DEBUG_PREAMBLE' drivers/scsi/aacraid/commctrl.c:43: warning: Excess function parameter 'arg' description in 'AAC_DEBUG_PREAMBLE' drivers/scsi/aacraid/commctrl.c:167: warning: Function parameter or member 'dev' not described in 'open_getadapter_fib' drivers/scsi/aacraid/commctrl.c:167: warning: Function parameter or member 'arg' not described in 'open_getadapter_fib' drivers/scsi/aacraid/commctrl.c:458: warning: Cannot understand * on line 458 - I thought it was a doc line Link: https://lore.kernel.org/r/20200713080001.128044-3-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit b115958d91f5390013b6d685e5f171df567a8870 Author: Lee Jones Date: Mon Jul 13 08:59:38 2020 +0100 scsi: aacraid: Repair two kerneldoc headers The function headers for aac_get_config_status() and aac_get_containers() have suffered bitrot where the documentation hasn't kept up with the API. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'dev' not described in 'aac_get_config_status' drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'commit_flag' not described in 'aac_get_config_status' drivers/scsi/aacraid/aachba.c:358: warning: Excess function parameter 'common' description in 'aac_get_config_status' drivers/scsi/aacraid/aachba.c:450: warning: Function parameter or member 'dev' not described in 'aac_get_containers' drivers/scsi/aacraid/aachba.c:450: warning: Excess function parameter 'common' description in 'aac_get_containers' Link: https://lore.kernel.org/r/20200713080001.128044-2-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 1094d5db26c21e85cd84c97e28d5ba502603da38 Author: Wenchao Hao Date: Thu Jul 2 00:24:44 2020 +0800 of/address: Fix variable name in comment of of_iomap The first variable name of of_iomap is np while previous comment write device here. Signed-off-by: Wenchao Hao Link: https://lore.kernel.org/r/20200701162444.9494-1-haowenchao22@gmail.com Signed-off-by: Rob Herring commit 71eef84e37302d819156e1a940d88c92ce2b74be Author: Amit Kucheria Date: Tue Jun 30 11:52:32 2020 +0530 MAINTAINERS: update Amit Kucheria's email to a single email address Emails currently go to different mailboxes. Switch to the kernel.org address so I can forward them to a single mailbox. Signed-off-by: Amit Kucheria Link: https://lore.kernel.org/r/8cbb7004a6a9b846a8d827f514f33f1a265dd5d4.1593498024.git.amit.kucheria@linaro.org Signed-off-by: Rob Herring commit 659bf827ba8f1183b714341d8a1d4b1e446178d9 Author: Niklas Cassel Date: Tue Jul 14 23:18:24 2020 +0200 block: add max_active_zones to blk-sysfs Add a new max_active zones definition in the sysfs documentation. This definition will be common for all devices utilizing the zoned block device support in the kernel. Export max_active_zones according to this new definition for NVMe Zoned Namespace devices, ZAC ATA devices (which are treated as SCSI devices by the kernel), and ZBC SCSI devices. Add the new max_active_zones member to struct request_queue, rather than as a queue limit, since this property cannot be split across stacking drivers. For SCSI devices, even though max active zones is not part of the ZBC/ZAC spec, export max_active_zones as 0, signifying "no limit". Signed-off-by: Niklas Cassel Reviewed-by: Javier González Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe commit e15864f8ea05b24071b07300459ae7e511d0b938 Author: Niklas Cassel Date: Tue Jul 14 23:18:23 2020 +0200 block: add max_open_zones to blk-sysfs Add a new max_open_zones definition in the sysfs documentation. This definition will be common for all devices utilizing the zoned block device support in the kernel. Export max open zones according to this new definition for NVMe Zoned Namespace devices, ZAC ATA devices (which are treated as SCSI devices by the kernel), and ZBC SCSI devices. Add the new max_open_zones member to struct request_queue, rather than as a queue limit, since this property cannot be split across stacking drivers. Signed-off-by: Niklas Cassel Reviewed-by: Javier González Reviewed-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Martin K. Petersen Signed-off-by: Jens Axboe commit 58101f1504ad9b36e34533ec1fb01a8de80aa6d6 Author: Shyam Sundar Date: Tue Jul 14 21:33:58 2020 -0700 scsi: qla2xxx: Address a set of sparse warnings Fix the following sparse warnings: drivers/scsi/qla2xxx/qla_isr.c:881:23: warning: restricted __le16 degrades to integer drivers/scsi/qla2xxx/qla_isr.c:881:23: warning: cast to restricted __le16 Link: https://lore.kernel.org/r/20200715043358.21668-1-njavali@marvell.com Signed-off-by: Shyam Sundar Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit ca0800a68ac7c7d75a2f93c30bc3f291450595b4 Author: YueHaibing Date: Wed Jul 15 10:55:23 2020 +0800 scsi: sd_zbc: Remove unused inline functions These are no longer used and can be removed. Link: https://lore.kernel.org/r/20200715025523.34620-1-yuehaibing@huawei.com Reviewed-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Signed-off-by: YueHaibing Signed-off-by: Martin K. Petersen commit 1f546823147693a054320d05d94f4515fb01748f Author: James Smart Date: Tue Jul 14 14:14:12 2020 -0700 scsi: lpfc: NVMe remote port devloss_tmo from lldd nvme-fc allows the driver to specify a default devloss_tmo value when registering the remote port. The lpfc driver is currently not doing so, although it is implementing a driver internal node loss value of 30s which also is used on the SCSI FC remote port. As no devloss_tmo is set, the nvme-fc transport defaults to 60s. So there are competing timers. Additionally, due to the competing timers, it is possible the NVMe rport is removed but the SCSI rport remains. It is possible that the SCSI FC rport, which was registered for the NVMe port even if it doesn't utilize the SCSI protocol, had been tuned to not match either the 60s (nvme-fc default) or 30s (lldd default), it gets out of whack. The lldd will defer to the SCSI FC rport as long as the SCSI FC rport has not had its devloss_tmo expire. Correct the situation by specifying a default devloss_tmo to the nvme-fc transport when registering the rport. Take the value from the SCSI FC rport if it exists, otherwise use the driver default. Link: https://lore.kernel.org/r/20200714211412.11773-1-jsmart2021@gmail.com Tested-by: Martin George Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ba8ca097089b1372d36d5b789c231b6c2c797d31 Author: Varun Prakash Date: Tue Jul 14 21:19:11 2020 +0530 scsi: cxgb4i: Remove an unnecessary NULL check for 'cconn' pointer 'cconn' will never be NULL in cxgbi_conn_alloc_pdu() so remove NULL check. Link: https://lore.kernel.org/r/1594741751-3323-1-git-send-email-varun@chelsio.com Reported-by: Dan Carpenter Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit bc2736e98e02097ec0e1245b7facf7c8ebec550c Author: Anton Blanchard Date: Mon Jul 13 18:39:08 2020 +1000 scsi: lpfc: Quieten some printks On a big box the lpfc driver emits a few thousand "Set Affinity" lines to the console. Reduce the priority of these from KERN_ERR to KERN_INFO, and also fix a few printks that had no log level. Link: https://lore.kernel.org/r/20200713083908.1104927-1-anton@ozlabs.org Reviewed-by: James Smart Signed-off-by: Anton Blanchard Signed-off-by: Martin K. Petersen commit 7ec772d0c3e66170602fb45ebcbe056c2d60a8b0 Author: Lee Jones Date: Mon Jul 13 08:46:45 2020 +0100 scsi: qla4xxx: Provide a missing function param description and fix formatting Kerneldoc function parameter references need to be in the format '@.*: ', else the kerneldoc checker gets confused. Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_init.c: In function ‘ql4xxx_set_mac_number’: drivers/scsi/qla4xxx/ql4_init.c:17:10: warning: variable ‘func_number’ set but not used [-Wunused-but-set-variable] drivers/scsi/qla4xxx/ql4_init.c: In function ‘qla4xxx_pci_config’: drivers/scsi/qla4xxx/ql4_init.c:664:6: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] from drivers/scsi/qla4xxx/ql4_init.c:9: from drivers/scsi/qla4xxx/ql4_init.c:9: drivers/scsi/qla4xxx/ql4_init.c:953: warning: Function parameter or member 'is_reset' not described in 'qla4xxx_initialize_adapter' drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'ha' not described in 'qla4xxx_process_ddb_changed' drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'fw_ddb_index' not described in 'qla4xxx_process_ddb_changed' drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'state' not described in 'qla4xxx_process_ddb_changed' drivers/scsi/qla4xxx/ql4_init.c:1168: warning: Function parameter or member 'conn_err' not described in 'qla4xxx_process_ddb_changed' Link: https://lore.kernel.org/r/20200713074645.126138-30-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e7eb414c653d26493f39680d35ae71a75cff9716 Author: Lee Jones Date: Mon Jul 13 08:46:44 2020 +0100 scsi: aacraid: Fix a bunch of function doc formatting errors And a few missing/excessive parameter descriptions. Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'dev' not described in 'aac_get_config_status' drivers/scsi/aacraid/aachba.c:358: warning: Function parameter or member 'commit_flag' not described in 'aac_get_config_status' drivers/scsi/aacraid/aachba.c:358: warning: Excess function parameter 'common' description in 'aac_get_config_status' drivers/scsi/aacraid/aachba.c:450: warning: Function parameter or member 'dev' not described in 'aac_get_containers' drivers/scsi/aacraid/aachba.c:450: warning: Excess function parameter 'common' description in 'aac_get_containers' drivers/scsi/aacraid/aachba.c:568: warning: Function parameter or member 'scsicmd' not described in 'aac_get_container_name' drivers/scsi/aacraid/aachba.c:796: warning: Function parameter or member 'scsicmd' not described in 'aac_probe_container_callback1' drivers/scsi/aacraid/aachba.c:796: warning: Excess function parameter 'dev' description in 'aac_probe_container_callback1' drivers/scsi/aacraid/aachba.c:796: warning: Excess function parameter 'cid' description in 'aac_probe_container_callback1' drivers/scsi/aacraid/aachba.c:1105: warning: Function parameter or member 'scsicmd' not described in 'aac_get_container_serial' drivers/scsi/aacraid/aachba.c:1961: warning: Excess function parameter 'phys_luns' description in 'aac_set_safw_attr_all_targets' drivers/scsi/aacraid/aachba.c:1961: warning: Excess function parameter 'rescan' description in 'aac_set_safw_attr_all_targets' drivers/scsi/aacraid/aachba.c:3394: warning: Cannot understand * on line 3394 - I thought it was a doc line drivers/scsi/aacraid/aachba.c:3687: warning: Cannot understand * on line 3687 - I thought it was a doc line drivers/scsi/aacraid/aachba.c:3752: warning: Cannot understand * on line 3752 - I thought it was a doc line drivers/scsi/aacraid/aachba.c:3795: warning: Cannot understand * on line 3795 - I thought it was a doc line Link: https://lore.kernel.org/r/20200713074645.126138-29-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit bb458974e063be9c45e8a252fdd2c07328945c8f Author: Lee Jones Date: Mon Jul 13 08:46:43 2020 +0100 scsi: aic94xx: Repair kerneldoc formatting error and remove extra param Function parameters need to be documented with format '@.*: '. 'to' is not longer asd_start_timers()'s function parameter. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic94xx/aic94xx_hwi.c:589: warning: Function parameter or member 'asd_ha' not described in 'asd_init_ctxmem' drivers/scsi/aic94xx/aic94xx_hwi.c:1157: warning: Excess function parameter 'to' description in 'asd_start_scb_timers' Link: https://lore.kernel.org/r/20200713074645.126138-28-lee.jones@linaro.org Cc: Luben Tuikov Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e802fc43ba36be03327a5923e4decf39cd7cab47 Author: Lee Jones Date: Mon Jul 13 08:46:42 2020 +0100 scsi: pm8001: Demote obvious misuse of kerneldoc and update others More bitrot issues with function documentation not keeping up with API changes. Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_init.c:64: warning: cannot understand function prototype: 'const struct pm8001_chip_info pm8001_chips[] = ' drivers/scsi/pm8001/pm8001_init.c:86: warning: cannot understand function prototype: 'struct scsi_host_template pm8001_sht = ' drivers/scsi/pm8001/pm8001_init.c:115: warning: cannot understand function prototype: 'struct sas_domain_function_template pm8001_transport_ops = ' drivers/scsi/pm8001/pm8001_init.c:212: warning: Function parameter or member 'irq' not described in 'pm8001_interrupt_handler_msix' drivers/scsi/pm8001/pm8001_init.c:237: warning: Function parameter or member 'irq' not described in 'pm8001_interrupt_handler_intx' drivers/scsi/pm8001/pm8001_init.c:265: warning: Function parameter or member 'ent' not described in 'pm8001_alloc' drivers/scsi/pm8001/pm8001_init.c:624: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_init_sas_add' drivers/scsi/pm8001/pm8001_init.c:624: warning: Excess function parameter 'chip_info' description in 'pm8001_init_sas_add' drivers/scsi/pm8001/pm8001_init.c:900: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_setup_msix' drivers/scsi/pm8001/pm8001_init.c:900: warning: Excess function parameter 'chip_info' description in 'pm8001_setup_msix' drivers/scsi/pm8001/pm8001_init.c:900: warning: Excess function parameter 'irq_handler' description in 'pm8001_setup_msix' drivers/scsi/pm8001/pm8001_init.c:981: warning: Function parameter or member 'pm8001_ha' not described in 'pm8001_request_irq' drivers/scsi/pm8001/pm8001_init.c:981: warning: Excess function parameter 'chip_info' description in 'pm8001_request_irq' Link: https://lore.kernel.org/r/20200713074645.126138-27-lee.jones@linaro.org Cc: Kumar Santhanam Cc: Sangeetha Gnanasekaran Cc: Nikith Ganigarakoppal Acked-by: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 2862a3a26c2daaf6d16d35973b24fb5491d50c40 Author: Lee Jones Date: Mon Jul 13 08:46:41 2020 +0100 scsi: aic94xx: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the sourcefile and no descriptions are provided. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic94xx/aic94xx_init.c:538: warning: Function parameter or member 'asd_ha' not described in 'asd_free_edbs' Link: https://lore.kernel.org/r/20200713074645.126138-26-lee.jones@linaro.org Cc: YueHaibing Cc: Luben Tuikov Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 00a72e8cd2674620cf9a242a64d8ea1110835d28 Author: Lee Jones Date: Mon Jul 13 08:46:40 2020 +0100 scsi: aacraid: Fix a couple of small kerneldoc issues Most likely caused by bitrot (docs not keeping in sync with API). Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/linit.c: In function ‘aac_biosparm’: drivers/scsi/aacraid/linit.c:368:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] drivers/scsi/aacraid/linit.c:243: warning: Function parameter or member 'shost' not described in 'aac_queuecommand' drivers/scsi/aacraid/linit.c:243: warning: Excess function parameter 'done' description in 'aac_queuecommand' drivers/scsi/aacraid/linit.c:1176: warning: Excess function parameter 'inode' description in 'aac_cfg_ioctl' Link: https://lore.kernel.org/r/20200713074645.126138-25-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 8558d5a4f38cf022f252798077d7d3f5d0a45907 Author: Lee Jones Date: Mon Jul 13 08:46:39 2020 +0100 scsi: aacraid: Provide suggested curly braces around empty body of if() Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/linit.c: In function ‘aac_biosparm’: drivers/scsi/aacraid/linit.c:368:41: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 368 | param->heads, param->sectors, num)); | ^ Link: https://lore.kernel.org/r/20200713074645.126138-24-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "PMC-Sierra, Inc" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ce7e0a84e5d7396acff78faacd2e39906cd8a598 Author: Lee Jones Date: Mon Jul 13 08:46:38 2020 +0100 scsi: qedf: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/scsi/qedf/qedf_debugfs.c:25: warning: Function parameter or member 'qedf' not described in 'qedf_dbg_host_init' drivers/scsi/qedf/qedf_debugfs.c:25: warning: Function parameter or member 'dops' not described in 'qedf_dbg_host_init' drivers/scsi/qedf/qedf_debugfs.c:25: warning: Function parameter or member 'fops' not described in 'qedf_dbg_host_init' drivers/scsi/qedf/qedf_debugfs.c:25: warning: Excess function parameter 'pf' description in 'qedf_dbg_host_init' drivers/scsi/qedf/qedf_debugfs.c:51: warning: Function parameter or member 'qedf_dbg' not described in 'qedf_dbg_host_exit' drivers/scsi/qedf/qedf_debugfs.c:51: warning: Excess function parameter 'pf' description in 'qedf_dbg_host_exit' drivers/scsi/qedf/qedf_debugfs.c:64: warning: Function parameter or member 'drv_name' not described in 'qedf_dbg_init' Link: https://lore.kernel.org/r/20200713074645.126138-23-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit aa89d74e040aa0b91e06566ea28a532f937630c2 Author: Lee Jones Date: Mon Jul 13 08:46:37 2020 +0100 scsi: aic7xxx: Fix 'amount_xferred' set but not used issue 'amount_xferred' is used, but only in certain circumstances. Place the same stipulations on the defining/allocating of 'amount_xferred' as is placed when using it. We've been careful not to change any of the ordering semantics here. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_done’: drivers/scsi/aic7xxx/aic7xxx_osm.c:1725:12: warning: variable ‘amount_xferred’ set but not used [-Wunused-but-set-variable] 1725 | uint32_t amount_xferred; | ^~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200713074645.126138-22-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "Daniel M. Eischen" Cc: Doug Ledford Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 7097a517446fe62c6c53e3988e0d4fe536c35b17 Author: Lee Jones Date: Mon Jul 13 08:46:36 2020 +0100 scsi: aic7xxx: Remove unused variable 'targ' Looks like checking the 'targ' was removed in 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_send_async’: drivers/scsi/aic7xxx/aic7xxx_osm.c:1604:28: warning: variable ‘targ’ set but not used [-Wunused-but-set-variable] 1604 | struct ahc_linux_target *targ; | ^~~~ Link: https://lore.kernel.org/r/20200713074645.126138-21-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "Daniel M. Eischen" Cc: Doug Ledford Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 614fc2f9883ef2a382493be021e1825a42c1214a Author: Lee Jones Date: Mon Jul 13 08:46:35 2020 +0100 scsi: aic7xxx: Remove unused variable 'ahc' Looks as though 'ahc' hasn't been used since 2005. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_slave_configure’: drivers/scsi/aic7xxx/aic7xxx_osm.c:674:20: warning: variable ‘ahc’ set but not used [-Wunused-but-set-variable] 674 | struct ahc_softc *ahc; | ^~~ Link: https://lore.kernel.org/r/20200713074645.126138-20-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "Daniel M. Eischen" Cc: Doug Ledford Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e3f58eeedb5573c0f2ebda4d84caa32942f06898 Author: Lee Jones Date: Mon Jul 13 08:46:34 2020 +0100 scsi: aic7xxx: Remove unused variable 'tinfo' Looks like none of the artifact from ahc_fetch_transinfo() are used anymore. Fixes the following W=1 kernel build warning(s): drivers/scsi/aic7xxx/aic7xxx_osm.c: In function ‘ahc_linux_target_alloc’: drivers/scsi/aic7xxx/aic7xxx_osm.c:567:30: warning: variable ‘tinfo’ set but not used [-Wunused-but-set-variable] 567 | struct ahc_initiator_tinfo *tinfo; | ^~~~~ Link: https://lore.kernel.org/r/20200713074645.126138-19-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "Daniel M. Eischen" Cc: Doug Ledford Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 2bd92b33643e610b0f2f1da720cf39a2034fb339 Author: Lee Jones Date: Mon Jul 13 08:46:33 2020 +0100 scsi: bnx2fc: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document either of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2fc/bnx2fc_tgt.c:442: warning: Function parameter or member 'lport' not described in 'bnx2fc_rport_event_handler' drivers/scsi/bnx2fc/bnx2fc_tgt.c:442: warning: Function parameter or member 'rdata' not described in 'bnx2fc_rport_event_handler' drivers/scsi/bnx2fc/bnx2fc_tgt.c:442: warning: Function parameter or member 'event' not described in 'bnx2fc_rport_event_handler' drivers/scsi/bnx2fc/bnx2fc_tgt.c:665: warning: Function parameter or member 'hba' not described in 'bnx2fc_alloc_session_resc' drivers/scsi/bnx2fc/bnx2fc_tgt.c:665: warning: Function parameter or member 'tgt' not described in 'bnx2fc_alloc_session_resc' Link: https://lore.kernel.org/r/20200713074645.126138-18-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Cc: Prakash Gollapudi Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 50efc51cb9ff904923058ad95629ac5dd52443f2 Author: Lee Jones Date: Mon Jul 13 08:46:32 2020 +0100 scsi: qedf: Remove a whole host of unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/qedf/qedf_io.c: In function ‘qedf_cmd_timeout’: drivers/scsi/qedf/qedf_io.c:25:5: warning: variable ‘op’ set but not used [-Wunused-but-set-variable] 25 | u8 op = 0; | ^~ drivers/scsi/qedf/qedf_io.c: In function ‘qedf_map_sg’: drivers/scsi/qedf/qedf_io.c:490:12: warning: variable ‘end_addr’ set but not used [-Wunused-but-set-variable] 490 | u64 addr, end_addr; | ^~~~~~~~ drivers/scsi/qedf/qedf_io.c: In function ‘qedf_post_io_req’: drivers/scsi/qedf/qedf_io.c:863:22: warning: variable ‘req_type’ set but not used [-Wunused-but-set-variable] 863 | enum fcoe_task_type req_type = 0; | ^~~~~~~~ drivers/scsi/qedf/qedf_io.c: In function ‘qedf_scsi_completion’: drivers/scsi/qedf/qedf_io.c:1134:31: warning: variable ‘task_ctx’ set but not used [-Wunused-but-set-variable] 1134 | struct e4_fcoe_task_context *task_ctx; | ^~~~~~~~ drivers/scsi/qedf/qedf_io.c: In function ‘qedf_scsi_done’: drivers/scsi/qedf/qedf_io.c:1345:6: warning: variable ‘xid’ set but not used [-Wunused-but-set-variable] 1345 | u16 xid; | ^~~ drivers/scsi/qedf/qedf_io.c: In function ‘qedf_initiate_abts’: drivers/scsi/qedf/qedf_io.c:1866:6: warning: variable ‘r_a_tov’ set but not used [-Wunused-but-set-variable] 1866 | u32 r_a_tov = 0; | ^~~~~~~ drivers/scsi/qedf/qedf_io.c: In function ‘qedf_process_abts_compl’: drivers/scsi/qedf/qedf_io.c:1967:11: warning: variable ‘xid’ set but not used [-Wunused-but-set-variable] 1967 | uint16_t xid; | ^~~ drivers/scsi/qedf/qedf_io.c: In function ‘qedf_initiate_cleanup’: drivers/scsi/qedf/qedf_io.c:2163:31: warning: variable ‘task’ set but not used [-Wunused-but-set-variable] 2163 | struct e4_fcoe_task_context *task; | ^~~~ drivers/scsi/qedf/qedf_io.c: In function ‘qedf_process_unsol_compl’: drivers/scsi/qedf/qedf_io.c:2534:11: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] 2534 | uint16_t tmp; | ^~~ Link: https://lore.kernel.org/r/20200713074645.126138-17-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 18bc435e0a1de21a5036a03f7a729b15b21d4689 Author: Lee Jones Date: Mon Jul 13 08:46:30 2020 +0100 scsi: arcmsr: Remove some set but unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_remap_pciregion’: drivers/scsi/arcmsr/arcmsr_hba.c:286:30: warning: variable ‘flags’ set but not used [-Wunused-but-set-variable] 286 | unsigned long addr, range, flags; | ^~~~~ drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_suspend’: drivers/scsi/arcmsr/arcmsr_hba.c:1070:11: warning: variable ‘intmask_org’ set but not used [-Wunused-but-set-variable] 1070 | uint32_t intmask_org; | ^~~~~~~~~~~ drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_done4abort_postqueue’: drivers/scsi/arcmsr/arcmsr_hba.c:1410:29: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable] 1410 | unsigned long ccb_cdb_phy, cdb_phy_hipart; | ^~~~~~~~~~~~~~ drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_hbaD_postqueue_isr’: drivers/scsi/arcmsr/arcmsr_hba.c:2448:36: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable] 2448 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart; | ^~~~~~~~~~~~~~ drivers/scsi/arcmsr/arcmsr_hba.c: In function ‘arcmsr_hbaD_polling_ccbdone’: drivers/scsi/arcmsr/arcmsr_hba.c:3498:36: warning: variable ‘cdb_phy_hipart’ set but not used [-Wunused-but-set-variable] 3498 | unsigned long flags, ccb_cdb_phy, cdb_phy_hipart; | ^~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200713074645.126138-15-lee.jones@linaro.org Cc: support@areca.com.tw Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 4db2ac3e039248f934bd07b7519c22b92ec74115 Author: Lee Jones Date: Mon Jul 13 08:46:29 2020 +0100 scsi: bnx2fc: Fix a couple of bitrotted function documentation headers Likely a result of documentation not keeping up with API updates (a.k.a. bitrot). Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2fc/bnx2fc_hwi.c:493: warning: Function parameter or member 'hba' not described in 'bnx2fc_send_session_destroy_req' drivers/scsi/bnx2fc/bnx2fc_hwi.c:493: warning: Excess function parameter 'port' description in 'bnx2fc_send_session_destroy_req' drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Function parameter or member 'context' not described in 'bnx2fc_indicate_kcqe' drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Function parameter or member 'kcq' not described in 'bnx2fc_indicate_kcqe' drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Excess function parameter 'hba' description in 'bnx2fc_indicate_kcqe' drivers/scsi/bnx2fc/bnx2fc_hwi.c:1345: warning: Excess function parameter 'kcqe' description in 'bnx2fc_indicate_kcqe' Link: https://lore.kernel.org/r/20200713074645.126138-14-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Cc: Prakash Gollapudi Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ebb40ab681183a3d91726b4a5ed70d92493bb38b Author: Lee Jones Date: Mon Jul 13 08:46:28 2020 +0100 scsi: libfc: Provide missing and repair existing function documentation Mostly due to descriptions not keeping up with API changes. Fixes the following W=1 kernel build warning(s): drivers/scsi/libfc/fc_fcp.c:299: warning: Function parameter or member 'status_code' not described in 'fc_fcp_retry_cmd' drivers/scsi/libfc/fc_fcp.c:595: warning: Function parameter or member 'seq' not described in 'fc_fcp_send_data' drivers/scsi/libfc/fc_fcp.c:595: warning: Excess function parameter 'sp' description in 'fc_fcp_send_data' drivers/scsi/libfc/fc_fcp.c:1289: warning: Function parameter or member 't' not described in 'fc_lun_reset_send' drivers/scsi/libfc/fc_fcp.c:1289: warning: Excess function parameter 'data' description in 'fc_lun_reset_send' drivers/scsi/libfc/fc_fcp.c:1422: warning: Function parameter or member 't' not described in 'fc_fcp_timeout' drivers/scsi/libfc/fc_fcp.c:1422: warning: Excess function parameter 'data' description in 'fc_fcp_timeout' drivers/scsi/libfc/fc_fcp.c:1696: warning: Function parameter or member 'code' not described in 'fc_fcp_recovery' drivers/scsi/libfc/fc_fcp.c:1716: warning: Function parameter or member 'offset' not described in 'fc_fcp_srr' drivers/scsi/libfc/fc_fcp.c:1859: warning: Function parameter or member 'sc_cmd' not described in 'fc_queuecommand' drivers/scsi/libfc/fc_fcp.c:1859: warning: Excess function parameter 'cmd' description in 'fc_queuecommand' Link: https://lore.kernel.org/r/20200713074645.126138-13-lee.jones@linaro.org Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f636acae8d0d97cc988c9b0e7f9c1887d95cb0f8 Author: Lee Jones Date: Mon Jul 13 08:46:27 2020 +0100 scsi: libfc: Fix a couple of misdocumented function parameters Fixes the following W=1 kernel build warning(s): drivers/scsi/libfc/fc_rport.c:129: warning: Function parameter or member 'port_id' not described in 'fc_rport_create' drivers/scsi/libfc/fc_rport.c:129: warning: Excess function parameter 'ids' description in 'fc_rport_create' drivers/scsi/libfc/fc_rport.c:1452: warning: Function parameter or member 'rdata_arg' not described in 'fc_rport_logo_resp' drivers/scsi/libfc/fc_rport.c:1452: warning: Excess function parameter 'lport_arg' description in 'fc_rport_logo_resp' Link: https://lore.kernel.org/r/20200713074645.126138-12-lee.jones@linaro.org Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 9865a04d528c71d9a855d06db34829a098a4ed7e Author: Lee Jones Date: Mon Jul 13 08:46:26 2020 +0100 scsi: libfc: Repair function parameter documentation Either misdocumentation and/or bitrot. Fixes the following W=1 kernel build warning(s): drivers/scsi/libfc/fc_lport.c:412: warning: Function parameter or member 'in_fp' not described in 'fc_lport_recv_echo_req' drivers/scsi/libfc/fc_lport.c:412: warning: Excess function parameter 'fp' description in 'fc_lport_recv_echo_req' drivers/scsi/libfc/fc_lport.c:447: warning: Function parameter or member 'in_fp' not described in 'fc_lport_recv_rnid_req' drivers/scsi/libfc/fc_lport.c:447: warning: Excess function parameter 'fp' description in 'fc_lport_recv_rnid_req' drivers/scsi/libfc/fc_lport.c:1330: warning: Function parameter or member 'state' not described in 'fc_lport_enter_ns' drivers/scsi/libfc/fc_lport.c:1428: warning: Function parameter or member 'state' not described in 'fc_lport_enter_ms' drivers/scsi/libfc/fc_lport.c:1939: warning: Function parameter or member 'tov' not described in 'fc_lport_els_request' Link: https://lore.kernel.org/r/20200713074645.126138-11-lee.jones@linaro.org Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit c6e2f4bd794a3b745a02043428c7f9c43b628192 Author: Lee Jones Date: Mon Jul 13 08:46:25 2020 +0100 scsi: qedf: Remove set but not checked variable 'tmp' Looks like the return value of readw() has never been checked. Fixes the following W=1 kernel build warning(s): drivers/scsi/qedf/qedf_main.c: In function ‘__qedf_probe’: drivers/scsi/qedf/qedf_main.c:3203:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200713074645.126138-10-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a9d4aece2255ca2379069df4bce450ace2f1af49 Author: Lee Jones Date: Mon Jul 13 08:46:24 2020 +0100 scsi: qedf: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document either of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/scsi/qedf/qedf_main.c:1027: warning: Function parameter or member 'lport' not described in 'qedf_xmit' drivers/scsi/qedf/qedf_main.c:1027: warning: Function parameter or member 'fp' not described in 'qedf_xmit' drivers/scsi/qedf/qedf_main.c:1426: warning: Function parameter or member 'lport' not described in 'qedf_rport_event_handler' drivers/scsi/qedf/qedf_main.c:1426: warning: Function parameter or member 'rdata' not described in 'qedf_rport_event_handler' drivers/scsi/qedf/qedf_main.c:1426: warning: Function parameter or member 'event' not described in 'qedf_rport_event_handler' Link: https://lore.kernel.org/r/20200713074645.126138-9-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@cavium.com Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ca63d8e2e9ef020f15daa9071e7ed75a5ea6d217 Author: Lee Jones Date: Mon Jul 13 08:46:23 2020 +0100 scsi: bnx2fc: Repair a range of kerneldoc issues >From bitrotted and missing function parameters to misuse of kerneldoc format. Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Function parameter or member 'lport' not described in 'bnx2fc_update_src_mac' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Function parameter or member 'addr' not described in 'bnx2fc_update_src_mac' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Excess function parameter 'fip' description in 'bnx2fc_update_src_mac' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Excess function parameter 'old' description in 'bnx2fc_update_src_mac' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1082: warning: Excess function parameter 'new' description in 'bnx2fc_update_src_mac' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1670: warning: Function parameter or member 'netdev' not described in 'bnx2fc_destroy' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1670: warning: Excess function parameter 'buffer' description in 'bnx2fc_destroy' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:1670: warning: Excess function parameter 'kp' description in 'bnx2fc_destroy' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2108: warning: Function parameter or member 'netdev' not described in 'bnx2fc_disable' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2236: warning: Function parameter or member 'netdev' not described in 'bnx2fc_enable' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2529: warning: Function parameter or member 'dev' not described in 'bnx2fc_ulp_exit' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2962: warning: cannot understand function prototype: 'struct scsi_host_template bnx2fc_shost_template = ' drivers/scsi/bnx2fc/bnx2fc_fcoe.c:2996: warning: cannot understand function prototype: 'struct cnic_ulp_ops bnx2fc_cnic_cb = ' Link: https://lore.kernel.org/r/20200713074645.126138-8-lee.jones@linaro.org Cc: QLogic-Storage-Upstream@qlogic.com Cc: Prakash Gollapudi Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f2db5efefa8979fa891597c6abd42191f3cb6939 Author: Lee Jones Date: Mon Jul 13 08:46:22 2020 +0100 scsi: fcoe: Correct some kernel-doc issues Mainly due to misdocumentation or bitrotted descriptions. Fixes the following W=1 kernel build warning(s): drivers/scsi/fcoe/fcoe_transport.c:396: warning: Function parameter or member 'skb' not described in 'fcoe_check_wait_queue' drivers/scsi/fcoe/fcoe_transport.c:447: warning: Function parameter or member 't' not described in 'fcoe_queue_timer' drivers/scsi/fcoe/fcoe_transport.c:447: warning: Excess function parameter 'lport' description in 'fcoe_queue_timer' drivers/scsi/fcoe/fcoe_transport.c:682: warning: Function parameter or member 'netdev' not described in 'fcoe_netdev_map_lookup' Link: https://lore.kernel.org/r/20200713074645.126138-7-lee.jones@linaro.org Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3052652326dc1876155b02197619d34d8504f3f0 Author: Lee Jones Date: Mon Jul 13 08:46:21 2020 +0100 scsi: fcoe: Fix a myriad of documentation issues Mostly missing or incorrect (bitrotted) function parameters. Fixes the following W=1 kernel build warning(s): drivers/scsi/fcoe/fcoe_ctlr.c:139: warning: Function parameter or member 'mode' not described in 'fcoe_ctlr_init' drivers/scsi/fcoe/fcoe_ctlr.c:604: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_encaps' drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_recv_clr_vlink' drivers/scsi/fcoe/fcoe_ctlr.c:1312: warning: Excess function parameter 'fh' description in 'fcoe_ctlr_recv_clr_vlink' drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Function parameter or member 't' not described in 'fcoe_ctlr_timeout' drivers/scsi/fcoe/fcoe_ctlr.c:1781: warning: Excess function parameter 'arg' description in 'fcoe_ctlr_timeout' drivers/scsi/fcoe/fcoe_ctlr.c:1904: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_recv_flogi' drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_locked' drivers/scsi/fcoe/fcoe_ctlr.c:2166: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_locked' drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop' drivers/scsi/fcoe/fcoe_ctlr.c:2188: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop' drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_stop_final' drivers/scsi/fcoe/fcoe_ctlr.c:2204: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_stop_final' drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vn_parse' drivers/scsi/fcoe/fcoe_ctlr.c:2273: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vn_parse' drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Function parameter or member 'frport' not described in 'fcoe_ctlr_vlan_parse' drivers/scsi/fcoe/fcoe_ctlr.c:2804: warning: Excess function parameter 'rdata' description in 'fcoe_ctlr_vlan_parse' drivers/scsi/fcoe/fcoe_ctlr.c:2900: warning: Excess function parameter 'min_len' description in 'fcoe_ctlr_vlan_send' drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'fip' not described in 'fcoe_ctlr_vlan_recv' drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Function parameter or member 'skb' not described in 'fcoe_ctlr_vlan_recv' drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'lport' description in 'fcoe_ctlr_vlan_recv' drivers/scsi/fcoe/fcoe_ctlr.c:2977: warning: Excess function parameter 'fp' description in 'fcoe_ctlr_vlan_recv' drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'callback' not described in 'fcoe_ctlr_disc_start' drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Function parameter or member 'lport' not described in 'fcoe_ctlr_disc_start' drivers/scsi/fcoe/fcoe_ctlr.c:3033: warning: Excess function parameter 'fip' description in 'fcoe_ctlr_disc_start' [mkp: fixed function name in comment] Link: https://lore.kernel.org/r/20200713074645.126138-6-lee.jones@linaro.org Cc: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f840df43eb0a6c6b4e684130b3509cd69bc97120 Author: Masahiro Yamada Date: Mon Jun 22 20:48:26 2020 +0900 dt-bindings: reset: Convert UniPhier reset to json-schema Convert the UniPhier reset controller binding to DT schema format. I excluded the glue resets because their bindings are too different. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200622114826.450442-1-yamada.masahiro@socionext.com Signed-off-by: Rob Herring commit 7d484566087c0a969f9260f580bc6b42ea64c02c Author: Rakesh Pillai Date: Mon Jul 13 10:16:26 2020 +0530 arm64: dts: qcom: sc7180: Add missing properties for Wifi node The wlan firmware memory is statically mapped in the Trusted Firmware, hence the wlan driver does not need to map/unmap this region dynamically. Hence add the property to indicate the wlan driver to not map/unamp the firmware memory region dynamically. Also add the chain1 voltage supply for wlan. Reviewed-by: Douglas Anderson Signed-off-by: Rakesh Pillai Link: https://lore.kernel.org/r/1594615586-17055-1-git-send-email-pillair@codeaurora.org Signed-off-by: Bjorn Andersson commit 6bab7cd0350c3749911859dc3519e22bd31db6df Author: Douglas Anderson Date: Thu Jun 25 13:17:09 2020 -0700 arm64: dts: qcom: Fix WiFi supplies on sc7180-idp The WiFi supplies that were added recently can't have done anything useful because they were missing the "-supply" suffix. Booting without the "-supply" suffix would give these messages: ath10k_snoc 18800000.wifi: 18800000.wifi supply vdd-0.8-cx-mx not found, using dummy regulator ath10k_snoc 18800000.wifi: 18800000.wifi supply vdd-1.8-xo not found, using dummy regulator ath10k_snoc 18800000.wifi: 18800000.wifi supply vdd-1.3-rfa not found, using dummy regulator ath10k_snoc 18800000.wifi: 18800000.wifi supply vdd-3.3-ch0 not found, using dummy regulator Let's add the "-supply" suffix. Tested-by: Rakesh Pillai Reviewed-by: Rakesh Pillai Fixes: 1e7594a38f37 ("arm64: dts: qcom: sc7180: Add WCN3990 WLAN module device node") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200625131658.REPOST.1.I32960cd32bb84d6db4127c906d7e371fa29caebf@changeid Signed-off-by: Bjorn Andersson commit 5b435ca38b2ce785b60b4d3c230f0a21121d6728 Author: Lee Jones Date: Wed Jul 15 13:35:51 2020 +0100 remoteproc: qcom_sysmon: Solve function header bitrot issues Looks as though 'name' has now been moved into 'struct sysmod_event' which is passed in instead. However, the parameter descriptions were not updated at the same time. Let's do that now. Fixes the following W=1 kernel build warning(s): drivers/remoteproc/qcom_sysmon.c:78: warning: Function parameter or member 'event' not described in 'sysmon_send_event' drivers/remoteproc/qcom_sysmon.c:78: warning: Excess function parameter 'name' description in 'sysmon_send_event' drivers/remoteproc/qcom_sysmon.c:350: warning: Function parameter or member 'event' not described in 'ssctl_send_event' drivers/remoteproc/qcom_sysmon.c:350: warning: Excess function parameter 'name' description in 'ssctl_send_event' Cc: Andy Gross Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200715123551.4011154-2-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit 7e05c8de132308da0c2a5b17842b808d99a00ca8 Author: Lee Jones Date: Wed Jul 15 13:35:50 2020 +0100 remoteproc: remoteproc_core: Use 'gnu_printf' format notation Fixes the following W=1 kernel build warning(s): drivers/remoteproc/remoteproc_core.c: In function ‘rproc_find_carveout_by_name’: drivers/remoteproc/remoteproc_core.c:257:2: warning: function ‘rproc_find_carveout_by_name’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 257 | vsnprintf(_name, sizeof(_name), name, args); | ^~~~~~~~~ drivers/remoteproc/remoteproc_core.c: In function ‘rproc_mem_entry_init’: drivers/remoteproc/remoteproc_core.c:993:2: warning: function ‘rproc_mem_entry_init’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 993 | vsnprintf(mem->name, sizeof(mem->name), name, args); | ^~~~~~~~~ drivers/remoteproc/remoteproc_core.c: In function ‘rproc_of_resm_mem_entry_init’: drivers/remoteproc/remoteproc_core.c:1029:2: warning: function ‘rproc_of_resm_mem_entry_init’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 1029 | vsnprintf(mem->name, sizeof(mem->name), name, args); | ^~~~~~~~~ Cc: Brian Swetland Cc: Mark Grosen Cc: Guzman Lugo Cc: Suman Anna Cc: Robert Tivy Cc: De Leon Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200715123551.4011154-1-lee.jones@linaro.org Signed-off-by: Bjorn Andersson commit 54888649bec734db67ea0d350a51d8f9a9e7770a Author: Lee Jones Date: Mon Jul 13 08:46:20 2020 +0100 scsi: fcoe: Fix various kernel-doc infringements A couple of headers make no attempt to document their associated function parameters. Others looks as if they are suffering with a little bitrot. Fixes the following W=1 kernel build warning(s): drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'lport' not described in 'fcoe_netdev_features_change' drivers/scsi/fcoe/fcoe.c:654: warning: Function parameter or member 'netdev' not described in 'fcoe_netdev_features_change' drivers/scsi/fcoe/fcoe.c:2039: warning: Function parameter or member 'ctlr_dev' not described in 'fcoe_ctlr_mode' drivers/scsi/fcoe/fcoe.c:2039: warning: Excess function parameter 'cdev' description in 'fcoe_ctlr_mode' drivers/scsi/fcoe/fcoe.c:2144: warning: Function parameter or member 'fcoe' not described in 'fcoe_dcb_create' drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'netdev' description in 'fcoe_dcb_create' drivers/scsi/fcoe/fcoe.c:2144: warning: Excess function parameter 'port' description in 'fcoe_dcb_create' drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'lport' not described in 'fcoe_elsct_send' drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'did' not described in 'fcoe_elsct_send' drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'fp' not described in 'fcoe_elsct_send' drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'op' not described in 'fcoe_elsct_send' drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'resp' not described in 'fcoe_elsct_send' drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'arg' not described in 'fcoe_elsct_send' drivers/scsi/fcoe/fcoe.c:2627: warning: Function parameter or member 'timeout' not described in 'fcoe_elsct_send' Link: https://lore.kernel.org/r/20200713074645.126138-5-lee.jones@linaro.org Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ee9ec5c9af94a26caf4e9bce928f13d51ad7f0cc Author: Lee Jones Date: Mon Jul 13 08:46:19 2020 +0100 scsi: libfc: trivial: Fix spelling mistake of 'discovery' This is my fault (can't even blame copy/paste). Link: https://lore.kernel.org/r/20200713074645.126138-4-lee.jones@linaro.org Cc: Hannes Reinecke Reported-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e721eb0616f62e766882b80fd3433b80635abd5f Author: Lee Jones Date: Mon Jul 13 08:46:18 2020 +0100 scsi: scsi_transport_fc: Match HBA Attribute Length with HBAAPI V2.0 definitions According to 'include/scsi/scsi_transport_fc.h': "Attributes are based on HBAAPI V2.0 definitions" ... so it seems sane to match the 'HBA Attribute Length' to them. If we don't, the compiler complains that the copied data will be truncated. Fixes the following W=1 kernel build warning(s): In file included from include/linux/bitmap.h:9, from include/linux/cpumask.h:12, from include/linux/smp.h:13, from include/linux/percpu.h:7, from include/scsi/libfc.h:13, from drivers/scsi/libfc/fc_elsct.c:17: In function ‘strncpy’, inlined from ‘fc_ct_ms_fill.constprop’ at include/scsi/fc_encode.h:263:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output may be truncated copying 64 bytes from a string of length 79 [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ In function ‘strncpy’, inlined from ‘fc_ct_ms_fill.constprop’ at include/scsi/fc_encode.h:275:3: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ output may be truncated copying 64 bytes from a string of length 79 [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200713074645.126138-3-lee.jones@linaro.org Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 74341d35b9017e8ab38e72da99db7e5073a063c6 Author: Lee Jones Date: Mon Jul 13 08:46:17 2020 +0100 scsi: libfc: Supply some missing kerneldoc struct/function attributes/params Fixes the following W=1 kernel build warning(s): drivers/scsi/libfc/fc_exch.c:66: warning: Function parameter or member 'left' not described in 'fc_exch_pool' drivers/scsi/libfc/fc_exch.c:66: warning: Function parameter or member 'right' not described in 'fc_exch_pool' drivers/scsi/libfc/fc_exch.c:100: warning: Function parameter or member 'lport' not described in 'fc_exch_mgr' drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'ep' not described in 'fc_invoke_resp' drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'sp' not described in 'fc_invoke_resp' drivers/scsi/libfc/fc_exch.c:727: warning: Function parameter or member 'fp' not described in 'fc_invoke_resp' Link: https://lore.kernel.org/r/20200713074645.126138-2-lee.jones@linaro.org Cc: Hannes Reinecke Reviewed-by: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 336f531ab17c3f480f8289d26c35bd48302ed085 Author: Dan Carpenter Date: Tue Jul 14 13:56:22 2020 +0300 netfilter: nf_tables: Fix a use after free in nft_immediate_destroy() The nf_tables_rule_release() function frees "rule" so we have to use the _safe() version of list_for_each_entry(). Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Signed-off-by: Dan Carpenter Signed-off-by: Pablo Neira Ayuso commit 10d3e0d815879129e916cd83e1034438e06efdaa Author: Dan Murphy Date: Mon Jul 13 10:45:32 2020 -0500 leds: Add multicolor ID to the color ID list Add a new color ID that is declared as MULTICOLOR as with the multicolor framework declaring a definitive color is not accurate as the node can contain multiple colors. Signed-off-by: Dan Murphy Reviewed-by: Marek Behún Signed-off-by: Pavel Machek commit 5c7f8ffe741daae7f8d811a2037b2693f02c90c5 Author: Dan Murphy Date: Mon Jul 13 10:45:31 2020 -0500 dt: bindings: Add multicolor class dt bindings documention Add DT bindings for the LEDs multicolor class framework. Add multicolor ID to the color ID list for device tree bindings. CC: Rob Herring Reviewed-by: Rob Herring Acked-by: Pavel Machek Acked-by: Jacek Anaszewski Signed-off-by: Dan Murphy Reviewed-by: Marek Behún Signed-off-by: Pavel Machek commit 7105e4647bcdbdce746289c00ba0a8a0ec790d20 Author: Dan Murphy Date: Mon Jul 13 10:45:30 2020 -0500 leds: lp5523: Fix various formatting issues in the code Fix checkpatch errors and warnings for the LP5523.c device driver. Acked-by: Pavel Machek Acked-by: Jacek Anaszewski Signed-off-by: Dan Murphy Reviewed-by: Marek Behún Signed-off-by: Pavel Machek commit 7e6f7f3ac30c43f8a5f91846a3b2dc8799ea5744 Author: Dan Murphy Date: Mon Jul 13 10:45:29 2020 -0500 leds: lp55xx: Fix file permissions to use DEVICE_ATTR macros Fix the checkpatch warnings for the use of the file permission macros. In converting the file permissions to the DEVICE_ATTR_XX macros the call back function names needed to be updated within the code. This means that the lp55xx_ needed to be dropped in the name to keep in harmony with the ABI documentation. Acked-by: Pavel Machek Acked-by: Jacek Anaszewski Signed-off-by: Dan Murphy Reviewed-by: Marek Behún Signed-off-by: Pavel Machek commit 6e14adea0ac3037d923a9591d1a094c115d7947c Author: Aurabindo Pillai Date: Tue May 19 16:48:43 2020 -0400 drm/amd/amdkfd: Fix large framesize for kfd_smi_ev_read() The buffer allocated is of 1024 bytes. Allocate this from heap instead of stack. Also remove check for stack size since we're allocating from heap Signed-off-by: Aurabindo Pillai Tested-by: Amber Lin Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 91e2c1919230c719c32a3076657f51d4c6074513 Author: Amber Lin Date: Mon Apr 20 19:42:46 2020 -0400 include/uapi/linux: Update KFD ioctl version Bump KFD ioctl after adding SMI events support Signed-off-by: Amber Lin Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 938a0650aae6275ba8e924685836bdee2c6aa3db Author: Amber Lin Date: Wed May 13 08:19:29 2020 -0400 drm/amdkfd: Provide SMI events watch When the compute is malfunctioning or performance drops, the system admin will use SMI (System Management Interface) tool to monitor/diagnostic what went wrong. This patch provides an event watch interface for the user space to register devices and subscribe events they are interested. After registered, the user can use annoymous file descriptor's poll function with wait-time specified and wait for events to happen. Once an event happens, the user can use read() to retrieve information related to the event. VM fault event is done in this patch. v2: - remove UNREGISTER and add event ENABLE/DISABLE - correct kfifo usage - move event message API to kfd_ioctl.h v3: send the event msg in text than in binary v4: support multiple clients v5: move events enablement from ioctl to fd write v6: sparse fix Signed-off-by: Amber Lin Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 85e7151baa2ffc76edd9a0267caffd369ab6cd93 Author: Jiansong Chen Date: Wed Jul 8 19:02:14 2020 +0800 drm/amdgpu: enable ih CG for navy_flounder Enable ih CG by setting the corresponding flag. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 4759f8871f3dc75a47b0b9cf38064958ce76eb35 Author: Jiansong Chen Date: Wed Jul 8 18:59:11 2020 +0800 drm/amdgpu: enable hdp CG and LS for navy_flounder Enable hdp CG and LS by setting the corresponding flags. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 92c737561c526ea7fbb87b52244b9fb1e914ff8f Author: Jiansong Chen Date: Wed Jul 8 18:53:36 2020 +0800 drm/amdgpu: enable mc CG and LS for navy_flounder Enable mc CG and LS by setting the corresponding flags. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 47fc894a8711e9cc22bc3c508d15415c0b191480 Author: Jiansong Chen Date: Wed Jul 8 18:42:04 2020 +0800 drm/amdgpu: enable athub/mmhub PG for navy_flounder Enable athub/mmhub PG by setting the corresponding flags. Actually the enablement is exercised by PMFW. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit d51dc6132795e3664274311b9cbe16187b8234d6 Author: Jiansong Chen Date: Tue Jul 7 16:54:06 2020 +0800 drm/amd/powerplay: set VCN1 pg only for sienna_cichlid navy_flounder has one VCN instance, and the work around is to avoid smu reponse error when setting VCN1 pg for the chip. It is preferred VCN0 and VCN1 are separated for the pg setting so better power efficiency can be achieved. Signed-off-by: Jiansong Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit a6c5308f2a7ad2a79fb6fd60b52367c51434c04a Author: Bhawanpreet Lakha Date: Wed Jul 8 17:11:12 2020 -0400 drm/amd/display: add DC support for navy flounder Plumb DC support for navy flounder through. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0e20c3e10333326fc63646fa40b159eb88b7e8c8 Author: Kieran Bingham Date: Wed Jul 15 13:48:35 2020 +0100 wireless: Fix trivial spelling The word 'descriptor' is misspelled throughout the tree. Fix it up accordingly: decriptors -> descriptors Signed-off-by: Kieran Bingham Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200715124839.252822-5-kieran.bingham+renesas@ideasonboard.com commit 9018fd7f2a73e9b290f48a56b421558fa31e8b75 Author: Bolarinwa Olayemi Saheed Date: Mon Jul 13 19:55:27 2020 +0200 iwlegacy: Check the return value of pcie_capability_read_*() On failure pcie_capability_read_dword() sets it's last parameter, val to 0. However, with Patch 14/14, it is possible that val is set to ~0 on failure. This would introduce a bug because (x & x) == (~0 & x). This bug can be avoided without changing the function's behaviour if the return value of pcie_capability_read_dword is checked to confirm success. Check the return value of pcie_capability_read_dword() to ensure success. Suggested-by: Bjorn Helgaas Signed-off-by: Bolarinwa Olayemi Saheed Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200713175529.29715-3-refactormyself@gmail.com commit cf4554fadafb9fa4d0758f7da600a2038ee7028a Author: Jiansong Chen Date: Thu Jul 2 17:35:08 2020 +0800 drm/amdgpu: support athub cg setting for navy_flounder navy_flounder has athub ip v2.1. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 40582e670feb27656ac0d95f0ff0b2bf2414d63e Author: Jiansong Chen Date: Thu Jul 2 15:34:37 2020 +0800 drm/amdgpu: enable GFX clock gating for navy_flounder Enable GFX MGCG, CGCG and 3DCG for navy_flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 00740df9956b101904e8993fbe19ff9bfd2f850c Author: Boyuan Zhang Date: Wed Jul 1 18:02:32 2020 -0400 drm/amdgpu: enable JPEG3.0 PG and CG for navy_flounder Enable JPEG3.0 PG and CG for navy_flounder by setting up the flags to the ASIC Signed-off-by: Boyuan Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit c6e9dd0ea8355024de890f559b78c83a365641d0 Author: Boyuan Zhang Date: Wed Jul 1 17:59:51 2020 -0400 drm/amdgpu: enable VCN3.0 DPG for navy_flounder Enable VCN3.0 DPG for navy_flounder by setting up the flag to the ASIC Signed-off-by: Boyuan Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit ebb06097ee29442461f9b3bcd745d85e6fa9996b Author: Boyuan Zhang Date: Wed Jul 1 17:57:47 2020 -0400 drm/amdgpu: enable VCN3.0 PG and CG for navy_flounder Enable VCN3.0 PG and CG for navy_flounder by setting up the flags to the ASIC Signed-off-by: Boyuan Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 0db5bc7b344736731a3982885402914b34dd252b Author: Alexander A. Klimov Date: Fri Jul 10 08:21:51 2020 +0200 ssb: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200710062151.28871-1-grandmaster@al2klimov.de commit c5b6c914d2f3755426b9c68ed6ddd8f917d9be9e Author: Jiansong Chen Date: Wed Jun 24 12:47:54 2020 +0800 drm/amdgpu: enable cp_fw_write_wait for navy_flounder It's the same with sienna_cichlid, cp fw for navy_flounder can support WAIT_REG_MEM packet. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 290b4ad59220b021187125f2f585da350eb6dded Author: Boyuan Zhang Date: Wed Jul 8 16:48:26 2020 -0400 drm/amdgpu: add vcn ip block for navy_flounder Add vcn3.0 and jpeg3.0 ip blocks for navy_flounder Signed-off-by: Boyuan Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 5cc07534d87ef0f392ce99fdc6d158bb763b1891 Author: Boyuan Zhang Date: Fri Jun 19 17:24:35 2020 -0400 drm/amdgpu: add navy_flounder vcn firmware support Add navy_flounder to vcn family Signed-off-by: Boyuan Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 41e3b1c13f325e5d9b2a0df9bcd4205bb2ec7d41 Author: Jiansong Chen Date: Wed Jun 10 16:45:48 2020 +0800 drm/amdgpu/gfx10: add gc golden setting for navy_flounder Add gc golden setting for navy_flounder Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 09759e13f4b97dde05f13520b47618bd37e415a5 Author: Chengming Gui Date: Fri Jun 5 10:59:58 2020 +0800 drm/amdkfd: Add kfd2kgd_funcs for navy_flounder kfd support Add callbacks to KGD for navy flounder. Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit de89b2e456f7f37ae4680c6a063eeb5bd09cf148 Author: Chengming Gui Date: Tue Jun 2 16:15:56 2020 +0800 drm/amdkfd: Support navy_flounder KFD Add KFD support for Navy Flounder. Signed-off-by: Chengming Gui Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f081e6971b08643290d21ccc21d4c2bb474d3743 Author: Jiansong Chen Date: Wed Apr 29 18:18:23 2020 +0800 drm/amdgpu: use front door firmware loading for navy_flounder Same as other navi asics. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 7420eab23b5cc6ee3c5c57679990f848e2f51ede Author: Jiansong Chen Date: Wed Jul 8 17:07:26 2020 -0400 drm/amdgpu: add psp block for navy_flounder Add psp and smu block for navy_flounder with psp firmware load type. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit c82b38ec2ea9d377c401cb4bc1949cc771479901 Author: Jiansong Chen Date: Wed Apr 15 18:38:05 2020 +0800 drm/amdgpu: add psp support for navy_flounder Currently skip ASD FW loading and ih reroute per sienna_cichlid. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f4497d1029a5275647fdd97b77cea8dae1116f75 Author: Jiansong Chen Date: Wed Apr 15 11:20:19 2020 +0800 drm/amdgpu: add smu block for navy_flounder Add SMU block for navy_flounder with direct firmware load type. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 82121d154ae19ffcf8ec482b6aaf83fdf5700ae4 Author: Jiansong Chen Date: Tue Jul 14 12:34:45 2020 -0400 drm/amdgpu/powerplay: add smu support for navy_flounder Now navy_flounder will reuse the smu11 driver_if header and ppt functions for sienna_cichlid. Later navy_flounder can maintain its own version if the compatibility is broken. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 4f3ebd6fb6806a948df9eb1dc7ea9bb76e2712ec Author: Xu Wang Date: Tue Jun 30 07:04:04 2020 +0000 zd1211rw: remove needless check before usb_free_coherent() usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200630070404.8207-1-vulab@iscas.ac.cn commit 922783755b52097e671b3d0bae3363223aa5ae28 Author: Jiansong Chen Date: Mon Apr 13 17:26:30 2020 +0800 drm/amdgpu: add gmc cg support for navy_flounder The athub version used for navy_flounder is v2.1. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 8f8463dddcadeb83a3ea117661407893b6ee29fa Author: Jiansong Chen Date: Mon Apr 13 16:11:27 2020 +0800 drm/amdgpu: force pa_sc_tile_steering_override to 0 for navy_flounder pa_sc_tile_steering_override is only programmable for gfx10.0/10.1/10.2, and navy_flounder has the same gfx10.3 IP with sienna_cichlid. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit c4a8b802869cf8bb339fa094a0d20782851d0d3c Author: Tao Zhou Date: Thu Feb 20 16:22:31 2020 +0800 drm/amdgpu: configure navy_flounder gfx according to gfx 10.3 The gfx version of navy_flounder is 10.3, identical to sienna_cichlid, follow the way of sienna_cichlid. Signed-off-by: Tao Zhou Reviewed-by: Jiansong Chen Signed-off-by: Alex Deucher commit 5404f073595a0fe1edd78d1dadb486fa5eb5c8f2 Author: Jiansong Chen Date: Mon Feb 24 14:28:34 2020 +0800 drm/amdgpu: add virtual display support for navy_flounder. Virtual display support for bring up and virtualization. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit df2d15df04b368226ea681140c624c34c709e080 Author: Jiansong Chen Date: Fri Feb 14 16:19:13 2020 +0800 drm/amdgpu: add sdma ip block for navy_flounder Navy_Flounder has the same sdma IP version with sienna_cichlid, and it has 2 sdma controllers. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 885eb3fad6ff661cde39b62c13804812b1d9418b Author: Jiansong Chen Date: Thu Feb 13 15:43:15 2020 +0800 drm/amdgpu: add gfx ip block for navy_flounder since navy_flounder has similar gc IP version with sienna_cichlid, follow its setting for the moment. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 026c396b41a4c9412f6f2b6496077949ea99e3ad Author: Jiansong Chen Date: Wed Feb 12 22:32:01 2020 +0800 drm/amdgpu: add ih ip block for navy_flounder navy_flounder has the same osssys IP verison with sienna_cichlid, follow its setting. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit fc8f07da1f47284faa350b9e5432b25882ef26dc Author: Jiansong Chen Date: Wed Feb 12 22:19:37 2020 +0800 drm/amdgpu: add gmc ip block for navy_flounder navy_flounder has similar gc IP version with sienna_cichlid, follow its setting for the moment. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 6648cfac8e2a69e12aa314ffe1178353a474b957 Author: Ping-Ke Shih Date: Mon Jun 29 13:58:43 2020 +0800 rtlwifi: 8821ae: remove unused path B parameters from swing table 8821AE is a 1x1 chip, so swing parameters for path B aren't necessary. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200629055843.25394-2-pkshih@realtek.com commit 8515e0a489e0994b352e845fb2ea6be7b29b937b Author: Jiansong Chen Date: Wed Feb 12 21:47:47 2020 +0800 drm/amdgpu: add common ip block for navy_flounder Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 40c66c68b3fdba20685e765dcf45acdc5bf380a3 Author: Joe Perches Date: Mon Jun 29 13:58:42 2020 +0800 rtlwifi: Use const in 8188ee/8723be/8821ae swing_table declarations Reduce data usage about 1KB by using const. Signed-off-by: Joe Perches Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200629055843.25394-1-pkshih@realtek.com commit f097ff15cd774c9eede8be26df4af95dc8091f61 Author: Jiansong Chen Date: Wed Feb 12 21:12:56 2020 +0800 drm/amdgpu: add support on mmhub for navy_flounder navy_flounder has the same mmhub IP version with sienna_cichlid, follow its setting. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit c8c959f601dcb64a4e152716099b727e3417ddaf Author: Jiansong Chen Date: Tue Feb 11 14:00:39 2020 +0800 drm/amdgpu: initialize IP offset for navy_flounder since navy_flounder has the same ip offset with sienna_cichlid, follow sienna_cichlid setting for the moment. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 543aa2595c238aab6966366bd236b2beb5088d5e Author: Jiansong Chen Date: Mon Feb 10 17:00:28 2020 +0800 drm/amdgpu/soc15: add support for navy_flounder Add soc support. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit d463d8c964ddca698770f11d4ecb6da3bd656b4e Author: Jiansong Chen Date: Mon Feb 10 15:50:13 2020 +0800 drm/amdgpu/gfx10: add clockgating support for navy_flounder Same as navi10. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 0287ac57b55dc4edc76697abf4a381f91db74904 Author: Jiansong Chen Date: Mon Feb 10 15:34:56 2020 +0800 drm/amdgpu/gmc10: add navy_flounder support Same as navi10. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 650101930405199a22a190fce2679649d46c90b7 Author: Jiansong Chen Date: Mon Feb 10 15:21:09 2020 +0800 drm/amdgpu/gfx10: add support for navy_flounder firmware Declare the gfx/compute firmwares. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 41f446bf52f36b4c5875873f78389312d50b3cff Author: Jiansong Chen Date: Mon Feb 10 15:08:53 2020 +0800 drm/amdgpu: set asic family and ip blocks for navy_flounder Add the asic family and IP blocks for navy flounder. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 47eb83d9a677af04cbe470c952fd006d383209c7 Author: Jiansong Chen Date: Mon Feb 10 15:03:41 2020 +0800 drm/amdgpu: set fw load type for navy_flounder Currently navy_flounder only supports backdoor loading type. Will switch to psp load type when psp is ready. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 120eb83336098ec9cdd21e81b80ccd8232287110 Author: Jiansong Chen Date: Mon Feb 10 15:00:33 2020 +0800 drm/amdgpu: add navy_flounder gpu info firmware Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit ddd8fbe77dadf6d889a7bbd0f82fc29093582d75 Author: Jiansong Chen Date: Mon Feb 10 14:25:57 2020 +0800 drm/amdgpu: add navy_flounder asic type Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 6565547113c956897be3c57f4b2d6ac6cbedeffe Author: Huang Rui Date: Sat Oct 12 19:55:48 2019 +0800 drm/amdgpu: expand to add multiple trap event irq id Sienna_cichlid has four sdma instances, but other chips don't. So we need expand to add multiple trap event irq id in sdma v5.2. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c8466cc0d2a419e7659bff5161440741cb96ab1e Author: Jack Zhang Date: Mon Jun 29 10:06:49 2020 +0800 drm/amd/sriov skip vcn powergating and dec_ring_test 1.Skip decode_ring test in VF, because VCN in SRIOV does not support direct register read/write. 2.Skip powergating configuration in hw fini because VCN3.0 SRIOV doesn't support powergating. V2: delete unneccessary white lines and refine implementation. Signed-off-by: Jack Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit a3302729368d2e4c6c6a1918179c8c53bec79219 Author: John Clements Date: Wed Jul 15 15:10:09 2020 +0800 drm/amdgpu: correct ta header v2 ucode init start address resolve bug calculating fw start address within binary Reviewed-by: Guchun Chen Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 1f61a43fcec1dceac2ec537a63aba6846dd0e80a Author: Jack Zhang Date: Mon Jun 29 10:01:21 2020 +0800 drm/amd/sriov porting sriov cap to vcn3.0 1.In early_init and for sriov, hardcode harvest_config=0, enc_num=1 2.sw_init/fini alloc & free mm_table for sriov doorbell setting for sriov 3.hw_init/fini Under sriov, add start_sriov to config mmsch Skip ring_test to avoid mmio in VF, but need to initialize wptr for vcn rings. 4.Implementation for vcn_v3_0_start_sriov V2:Clean-up some uneccessary funciton declaration. Signed-off-by: Jack Zhang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 7ddb4d6c438894d1ed9bf3e4528889cdd0cdc22d Author: Jack Zhang Date: Mon Jun 29 09:55:26 2020 +0800 drm/amd/sriov add mmsch_v3 interface For VCN3.0 SRIOV, Guest driver needs to communicate with mmsch to set the World Switch for MM appropriately. This patch add the interface for mmsch_v3.0. Signed-off-by: Jack Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit fc30e840dc95acc6eb6f3b8ec08c30afc158a42a Author: Jack Zhang Date: Wed Jun 24 10:19:20 2020 +0800 drm/amdgpu: optimize rlcg write for gfx_v10 For gfx10 boards, except for nv12, other boards take mmio write rather than rlcg write Signed-off-by: Jack Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c45fbe1bd590281c9f1b60fed84e6ad9bf2ab9d3 Author: Jack Zhang Date: Tue Jun 23 19:36:24 2020 +0800 drm/amd/sriov skip jped ip block and close pgcg flags For SIENNA_CICHLID SRIOV, jpeg and pgcp is not supported. Signed-off-by: Jack Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3cd7e415aea4ba4d928fa4827cc68bc4235b4305 Author: Evan Quan Date: Thu Jul 2 16:06:55 2020 +0800 drm/amd/powerplay: drop unused code around thermal range setting Leftover of previous cleanups. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1e1964b777ce0934ff07d6654e77f070d5ba8f07 Author: Evan Quan Date: Thu Jul 2 15:59:03 2020 +0800 drm/amd/powerplay: maximum the code sharing on thermal irq setting Put the common code in smu_v11_0.c instead of having one copy each. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0540ecedcba924b0e4c362c2698f66addfdf6558 Author: Evan Quan Date: Thu Jul 2 15:38:53 2020 +0800 drm/amd/powerplay: sort the call flow on temperature ranges retrieving This can help to maintain clear code layer. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e02e4d513e6e0ac69119799405f7d2b1ee4276ad Author: Evan Quan Date: Thu Jul 2 15:13:02 2020 +0800 drm/amd/powerplay: cache the software_shutdown_temp As it's needed in the succeeding thermal irq setting. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2b1f12a2da04a5f13efaa57357c90b6e4444a3d9 Author: Evan Quan Date: Thu Jul 2 14:56:34 2020 +0800 drm/amd/powerplay: correct Sienna Cichlid temperature limit settings These are needed for temp1/2/3 related hwmon interfaces. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit cbf3f132fe5dfa70823d24b4f868e6c5815d18f3 Author: Evan Quan Date: Thu Jul 2 14:48:03 2020 +0800 drm/amd/powerplay: correct Navi1X temperature limit settings These are needed for temp1/2/3 related hwmon interfaces. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0b590970a519dee488dd21a43c55de9f62ff82fa Author: Evan Quan Date: Fri Jul 3 14:53:06 2020 +0800 drm/amd/powerplay: correct the supported pcie GenSpeed and LaneCount The LCLK dpm table setup should be performed in .update_pcie_parameters(). Otherwise, the updated GenSpeed and LaneCount information will be lost. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 778f8e6afea64e432d28f69e1c55688e4e9283d5 Author: Evan Quan Date: Thu Jul 2 14:09:18 2020 +0800 drm/amd/powerplay: drop unnecessary wrapper around pcie parameters setting This can also help to maintain clear code layer. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 42f75c849f1786ae53209cec33376c4dbafe600c Author: Evan Quan Date: Thu Jul 2 12:42:06 2020 +0800 drm/amd/powerplay: drop unused APIs and parameters Leftover of previous performance level setting cleanups. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 982d68b093586ef3d68715c2c84a462b770a3781 Author: Evan Quan Date: Thu Jul 2 12:26:26 2020 +0800 drm/amd/powerplay: drop smu_v12_0.c unnecessary wrapper V2 By moving the implemention to renoir_ppt.c considering it's really ASIC specific. V2: fix compile warnings below drivers/gpu/drm/amd/amdgpu/../powerplay/renoir_ppt.h:40:25: warning: array subscript is above array bounds [-Warray-bounds] freq = table->FClocks[dpm_level].Freq; \ drivers/gpu/drm/amd/amdgpu/../powerplay/renoir_ppt.c:195:2: note: in expansion of macro ‘GET_DPM_CUR_FREQ’ GET_DPM_CUR_FREQ(clk_table, clk_type, dpm_level, *freq); ^~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../powerplay/renoir_ppt.h:46:25: warning: array subscript is above array bounds [-Warray-bounds] freq = table->FClocks[dpm_level].Freq; \ drivers/gpu/drm/amd/amdgpu/../powerplay/renoir_ppt.c:195:2: note: in expansion of macro ‘GET_DPM_CUR_FREQ’ GET_DPM_CUR_FREQ(clk_table, clk_type, dpm_level, *freq); Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d56ff011367e989b3f0522f9c9e43a379980049f Author: Evan Quan Date: Thu Jul 2 12:12:22 2020 +0800 drm/amd/powerplay: drop unnecessary wrappers By calling the target APIs directly. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5a7092ae564ceb7eb13f169bac2f164e564e24e3 Author: Evan Quan Date: Fri Jul 10 12:21:53 2020 +0800 drm/amd/powerplay: apply gfxoff disablement/enablement for all SMU11 ASICs Before and after setting gfx clock soft max/min frequency. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 10e96d897329644f5ce596d8d516890baae49320 Author: Evan Quan Date: Thu Jul 2 11:57:33 2020 +0800 drm/amd/powerplay: drop Sienna Cichlid specific set_soft_freq_limited_range Use the common smu_v11_0_set_soft_freq_limited_range. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b2785e250f7a4bfaa4c007afeb0de310c97f006a Author: Evan Quan Date: Thu Jul 2 11:32:58 2020 +0800 drm/amd/powerplay: drop unnecessary Sienna Cichlid specific APIs As a common performance level setting API is used. Then these ASIC specific APIs are not needed any more. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 46a301e14e8a0764b36ab9158d531e09bff1de58 Author: Evan Quan Date: Thu Jul 2 11:26:53 2020 +0800 drm/amd/powerplay: drop unnecessary Navi1x specific APIs As a common performance level setting API is used. Then these ASIC specific APIs are not needed any more. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5a52694c756c28bcef94766ece91e2f8ebe4c824 Author: Evan Quan Date: Thu Jul 2 11:00:20 2020 +0800 drm/amd/powerplay: drop unnecessary Arcturus specific APIs As a common performance level setting API is used. Then these ASIC specific APIs are not needed any more. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 768bb9010aeb662071129d1b92d82c45d060a7d6 Author: Evan Quan Date: Thu Jul 2 10:51:12 2020 +0800 drm/amd/powerplay: update the common API for performance level setting So that it can be more widely shared around SMU v11 ASICs. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 62cc9dd1826f85c037df706315172854c7d1cd10 Author: Evan Quan Date: Wed Jun 10 16:15:26 2020 +0800 drm/amd/powerplay: update UMD pstate clock settings Preparing for coming code sharing around performance level setting. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b64d86889f1e66190fa54a9626a1333dd653bad6 Author: Evan Quan Date: Wed Jun 10 14:28:20 2020 +0800 drm/amd/powerplay: add new UMD pstate data structure This is used to cache the clock frequencies for all UMD pstates. So that we do not need to calculate from scratch on every UMD pstate switch. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 90a89c316e64ae1965c6dc18fb832a2300de6211 Author: Evan Quan Date: Wed Jun 10 17:02:37 2020 +0800 drm/amd/powerplay: update Sienna Cichlid default dpm table setup Cache all clocks levels for every dpm table. They are needed by other APIs. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3afb244be3e034c9c50c110515b8a8f8eded776f Author: Evan Quan Date: Wed Jun 10 16:52:32 2020 +0800 drm/amd/powerplay: update Navi10 default dpm table setup Cache all clocks levels for every dpm table. They are needed by other APIs. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3a86d7f668cbb5d9117001345e75f8f48a075b74 Author: Evan Quan Date: Fri Jul 10 10:49:42 2020 +0800 drm/amd/powerplay: update Arcturus default dpm table setting Preparing for coming code sharing around performance level setting. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c1a9e61c582e42ef4820f77b43a11cbb6e673b2c Author: Evan Quan Date: Fri Jul 10 10:46:48 2020 +0800 drm/amd/powerplay: implement a common set dpm table API for smu V11 Maximum the code sharing around smu V11. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4387b10434fe9acde582b886d16a72ec1843c0e9 Author: Evan Quan Date: Wed Jun 10 14:32:58 2020 +0800 drm/amd/powerplay: add more members for dpm table These members can help to cache the clock frequencies for all dpm levels. Then simplifying the code for dpm level switching is possible. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 273da6ff7ce8727e02d6e67f77eb98df4627f60b Author: Wenhui Sheng Date: Tue Jul 14 16:29:18 2020 +0800 drm/amdgpu: add module parameter choose reset mode Default value is auto, doesn't change original reset method logic. v2: change to use parameter reset_method v3: add warn msg if specified mode isn't supported Signed-off-by: Likun Gao Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 311531f08793931781c74a12082c9a3f8fbfd9ea Author: Wenhui Sheng Date: Mon Jul 13 15:15:11 2020 +0800 drm/amdgpu: enable mode1 reset For sienna cichlid, add mode1 reset path for sGPU. v2: hiding MP0/MP1 mode1 reset under AMD_RESET_METHOD_MODE1 v3: split emergency restart logic to a new patch Signed-off-by: Likun Gao Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit bb5c7235eaafb4e2f957e9f0f71a187db5cf525a Author: Wenhui Sheng Date: Mon Jul 13 15:14:30 2020 +0800 drm/amdgpu: RAS emergency restart logic refine If we are in RAS triggered situation and BACO isn't support, emergency restart is needed, and this code is only needed for some specific cases(vega20 with given smu fw version). After we add smu mode1 reset for sienna cichlid, we need to share AMD_RESET_METHOD_MODE1 with psp mode1 reset, so in amdgpu_device_gpu_recover, we need differentiate which mode1 reset we are using, then decide if it's a full reset and then decide if emergency restart is needed, the logic will become much more complex. After discussion with Hawking, move emergency restart logic to an independent function. Signed-off-by: Likun Gao Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ea8139d8d59bd6f014b317e7423345169a56fe49 Author: Wenhui Sheng Date: Fri Jul 10 17:39:24 2020 +0800 drm/amd/powerplay: add SMU mode1 reset From PM FW 58.26.0 for sienna cichlid, SMU mode1 reset is support, driver sends PPSMC_MSG_Mode1Reset message to PM FW could trigger this reset. v2: add mode1 reset dpm interface v3: change maro name Signed-off-by: Likun Gao Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a4497974ed339985fa89fabde9d5f6038bf1a59e Author: Rajneesh Bhardwaj Date: Mon Jul 13 11:15:30 2020 -0400 drm/amdkfd: fix kernel-doc and cleanup - fix some styling issues - fixes for kernel-doc type Reviewed-by: Felix Kuehling Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit 419317021ccc8957d9cf11bf2500c2cff37ca6c7 Author: Arpitha Raghunandan <98.arpi@gmail.com> Date: Wed Jul 15 21:16:23 2020 +0530 staging: rtl8188eu: core: fix coding style issues Fixing WARNING: Prefer using '"%s...", __func__' to using 'function_name' in a string in rtw_ioctl_set.c Signed-off-by: Arpitha Raghunandan <98.arpi@gmail.com> Link: https://lore.kernel.org/r/20200715154623.78315-1-98.arpi@gmail.com Signed-off-by: Greg Kroah-Hartman commit d1d3aa98b1d4826a19adfefb69b96142a0cac633 Author: Zhenyu Ye Date: Wed Jul 15 15:19:45 2020 +0800 arm64: tlb: Use the TLBI RANGE feature in arm64 Add __TLBI_VADDR_RANGE macro and rewrite __flush_tlb_range(). When cpu supports TLBI feature, the minimum range granularity is decided by 'scale', so we can not flush all pages by one instruction in some cases. For example, when the pages = 0xe81a, let's start 'scale' from maximum, and find right 'num' for each 'scale': 1. scale = 3, we can flush no pages because the minimum range is 2^(5*3 + 1) = 0x10000. 2. scale = 2, the minimum range is 2^(5*2 + 1) = 0x800, we can flush 0xe800 pages this time, the num = 0xe800/0x800 - 1 = 0x1c. Remaining pages is 0x1a; 3. scale = 1, the minimum range is 2^(5*1 + 1) = 0x40, no page can be flushed. 4. scale = 0, we flush the remaining 0x1a pages, the num = 0x1a/0x2 - 1 = 0xd. However, in most scenarios, the pages = 1 when flush_tlb_range() is called. Start from scale = 3 or other proper value (such as scale = ilog2(pages)), will incur extra overhead. So increase 'scale' from 0 to maximum, the flush order is exactly opposite to the example. Signed-off-by: Zhenyu Ye Link: https://lore.kernel.org/r/20200715071945.897-4-yezhenyu2@huawei.com [catalin.marinas@arm.com: removed unnecessary masks in __TLBI_VADDR_RANGE] [catalin.marinas@arm.com: __TLB_RANGE_NUM subtracts 1] [catalin.marinas@arm.com: minor adjustments to the comments] [catalin.marinas@arm.com: introduce system_supports_tlb_range()] Signed-off-by: Catalin Marinas commit 9c61f3b560f5dd82329322cd7c7131e6b27d3053 Author: Amir Goldstein Date: Mon Mar 30 10:55:28 2020 +0300 fanotify: break up fanotify_alloc_event() Break up fanotify_alloc_event() into helpers by event struct type. Suggested-by: Jan Kara Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit b8a6c3a2f0ae4d82732810e55ca8aa455e040bbf Author: Amir Goldstein Date: Wed Jul 8 14:11:42 2020 +0300 fanotify: create overflow event type The special overflow event is allocated as struct fanotify_path_event, but with a null path. Use a special event type to identify the overflow event, so the helper fanotify_has_event_path() will always indicate a non null path. Allocating the overflow event doesn't need any of the fancy stuff in fanotify_alloc_event(), so create a simplified helper for allocating the overflow event. There is also no need to store and report the pid with an overflow event. Link: https://lore.kernel.org/r/20200708111156.24659-7-amir73il@gmail.com Suggested-by: Jan Kara Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 956235afd145e60094642fca83486c0f3ccaca16 Author: Amir Goldstein Date: Wed Jul 8 14:11:41 2020 +0300 inotify: do not use objectid when comparing events inotify's event->wd is the object identifier. Compare that instead of the common fsnotidy event objectid, so we can get rid of the objectid field later. Link: https://lore.kernel.org/r/20200708111156.24659-6-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 9991bb84b27a2594187898f261866cfc50255454 Author: Amir Goldstein Date: Wed Jul 8 14:11:40 2020 +0300 kernfs: do not call fsnotify() with name without a parent When creating an FS_MODIFY event on inode itself (not on parent) the file_name argument should be NULL. The change to send a non NULL name to inode itself was done on purpuse as part of another commit, as Tejun writes: "...While at it, supply the target file name to fsnotify() from kernfs_node->name.". But this is wrong practice and inconsistent with inotify behavior when watching a single file. When a child is being watched (as opposed to the parent directory) the inotify event should contain the watch descriptor, but not the file name. Fixes: df6a58c5c5aa ("kernfs: don't depend on d_find_any_alias()...") Link: https://lore.kernel.org/r/20200708111156.24659-5-amir73il@gmail.com Acked-by: Tejun Heo Acked-by: Greg Kroah-Hartman Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 9a02aa40dd5a95a62b184365d5b7847e8e6a3c96 Author: Amir Goldstein Date: Wed Jul 8 14:11:39 2020 +0300 nfsd: use fsnotify_data_inode() to get the unlinked inode The inode argument to handle_event() is about to become obsolete. Link: https://lore.kernel.org/r/20200708111156.24659-4-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit cbcf47adc8aadbcaa741391ccfd96f764b50be7e Author: Amir Goldstein Date: Wed Jul 8 14:11:38 2020 +0300 fsnotify: return non const from fsnotify_data_inode() Return non const inode pointer from fsnotify_data_inode(). None of the fsnotify hooks pass const inode pointer as data and callers often need to cast to a non const pointer. Link: https://lore.kernel.org/r/20200708111156.24659-3-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit c738fbabb0ff62d0f9a9572e56e65d05a1b34c6a Author: Amir Goldstein Date: Wed Jul 8 14:11:37 2020 +0300 fsnotify: fold fsnotify() call into fsnotify_parent() All (two) callers of fsnotify_parent() also call fsnotify() to notify the child inode. Move the second fsnotify() call into fsnotify_parent(). This will allow more flexibility in making decisions about which of the two event falvors should be sent. Using 'goto notify_child' in the inline helper seems a bit strange, but it mimics the code in __fsnotify_parent() for clarity and the goto pattern will become less strage after following patches are applied. Link: https://lore.kernel.org/r/20200708111156.24659-2-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit e791ee6885f7e9e32c3e551cadea8bc6effaae1e Author: Jens Axboe Date: Wed Jul 15 09:33:37 2020 -0600 Revert "blk-rq-qos: remove redundant finish_wait to rq_qos_wait." This reverts commit 826f2f48da8c331ac51e1381998d318012d66550. Qian Cai reports that this commit causes stalls with swap. Revert until the reason can be figured out. Reported-by: Qian Cai Signed-off-by: Jens Axboe commit 133c6c84f280362911c020117532fbe538df6ae5 Author: Wei Yongjun Date: Tue Jul 14 22:23:55 2020 +0800 cpufreq: powernv: Make some symbols static The sparse tool complains as follows: drivers/cpufreq/powernv-cpufreq.c:88:1: warning: symbol 'pstate_revmap' was not declared. Should it be static? drivers/cpufreq/powernv-cpufreq.c:383:18: warning: symbol 'cpufreq_freq_attr_cpuinfo_nominal_freq' was not declared. Should it be static? drivers/cpufreq/powernv-cpufreq.c:669:6: warning: symbol 'gpstate_timer_handler' was not declared. Should it be static? drivers/cpufreq/powernv-cpufreq.c:902:6: warning: symbol 'powernv_cpufreq_work_fn' was not declared. Should it be static? Those symbols are not used outside of this file, so mark them static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Viresh Kumar Reviewed-by: Lee Jones Signed-off-by: Rafael J. Wysocki commit 313da01ad524771046beddb18faffc5b3caf930f Author: Lee Jones Date: Wed Jul 15 10:32:09 2020 +0100 usb: misc: sisusbvga: Move static const tables out to different include file sisusb_init.h is included by multiple source files, but the big data tables contained are only referenced by one of them, leaving the tables 'defined but not used' by the remainder. We have a choice to either place them inside the source file, taking up may lines and potentially overwhelming the source file OR tuck them away neatly inside their own headerfile. The latter was chosen. Fixes the following W=1 kernel build warning(s): In file included from drivers/usb/misc/sisusbvga/sisusb.c:54: drivers/usb/misc/sisusbvga/sisusb_init.h:664:34: warning: ‘SiSUSB_VCLKData’ defined but not used [-Wunused-const-variable=] 664 | static const struct SiS_VCLKData SiSUSB_VCLKData[] = { | ^~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:406:35: warning: ‘SiSUSB_CRT1Table’ defined but not used [-Wunused-const-variable=] 406 | static const struct SiS_CRT1Table SiSUSB_CRT1Table[] = { | ^~~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:348:30: warning: ‘SiSUSB_RefIndex’ defined but not used [-Wunused-const-variable=] 348 | static const struct SiS_Ext2 SiSUSB_RefIndex[] = { | ^~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:269:29: warning: ‘SiSUSB_EModeIDTable’ defined but not used [-Wunused-const-variable=] 269 | static const struct SiS_Ext SiSUSB_EModeIDTable[] = { | ^~~~~~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:238:36: warning: ‘SiSUSB_StandTable’ defined but not used [-Wunused-const-variable=] 238 | static const struct SiS_StandTable SiSUSB_StandTable[] = { | ^~~~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:201:37: warning: ‘SiSUSB_ModeResInfo’ defined but not used [-Wunused-const-variable=] 201 | static const struct SiS_ModeResInfo SiSUSB_ModeResInfo[] = { | ^~~~~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:196:28: warning: ‘SiSUSB_SModeIDTable’ defined but not used [-Wunused-const-variable=] 196 | static const struct SiS_St SiSUSB_SModeIDTable[] = { | ^~~~~~~~~~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:183:28: warning: ‘SiS_VGA_DAC’ defined but not used [-Wunused-const-variable=] 183 | static const unsigned char SiS_VGA_DAC[] = { | ^~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:172:28: warning: ‘SiS_EGA_DAC’ defined but not used [-Wunused-const-variable=] 172 | static const unsigned char SiS_EGA_DAC[] = { | ^~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:161:28: warning: ‘SiS_CGA_DAC’ defined but not used [-Wunused-const-variable=] 161 | static const unsigned char SiS_CGA_DAC[] = { | ^~~~~~~~~~~ drivers/usb/misc/sisusbvga/sisusb_init.h:150:28: warning: ‘SiS_MDA_DAC’ defined but not used [-Wunused-const-variable=] 150 | static const unsigned char SiS_MDA_DAC[] = { | ^~~~~~~~~~~ Cc: Thomas Winischhofer Cc: Joe Perches Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200715093209.3165641-9-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4805ad24886a611fffb307c87f12d7e9504b7d25 Author: Lee Jones Date: Wed Jul 15 10:32:08 2020 +0100 usb: misc: sisusbvga: sisusb_init: Remove genunine unused static const arrays These are not referenced anywhere in the kernel. Fixes the following W=1 kernel build warning(s): drivers/usb/misc/sisusbvga/sisusb_init.h:171:29: warning: ‘ModeIndex_1280x1024’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:170:29: warning: ‘ModeIndex_1280x768’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:169:29: warning: ‘ModeIndex_1280x720’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:168:29: warning: ‘ModeIndex_1152x864’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:167:29: warning: ‘ModeIndex_1024x576’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:166:29: warning: ‘ModeIndex_1024x768’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:165:29: warning: ‘ModeIndex_960x600’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:164:29: warning: ‘ModeIndex_960x540’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:163:29: warning: ‘ModeIndex_856x480’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:162:29: warning: ‘ModeIndex_848x480’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:161:29: warning: ‘ModeIndex_800x600’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:160:29: warning: ‘ModeIndex_800x480’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:159:29: warning: ‘ModeIndex_768x576’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:158:29: warning: ‘ModeIndex_720x576’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:157:29: warning: ‘ModeIndex_720x480’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:156:29: warning: ‘ModeIndex_640x480’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:155:29: warning: ‘ModeIndex_640x400’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:154:29: warning: ‘ModeIndex_512x384’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:153:29: warning: ‘ModeIndex_400x300’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:152:29: warning: ‘ModeIndex_320x240’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:151:29: warning: ‘ModeIndex_320x200’ defined but not used [-Wunused-const-variable=] drivers/usb/misc/sisusbvga/sisusb_init.h:232:37: warning: ‘SiSUSB_ModeResInfo’ defined but not used [-Wunused-const-variable=] Cc: Thomas Winischhofer Cc: Joe Perches Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200715093209.3165641-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e606c759f43b18de768253c70290cb023245faee Author: Lee Jones Date: Wed Jul 15 10:32:07 2020 +0100 usb: c67x00: c67x00-hcd: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/c67x00/c67x00-hcd.c:237: warning: Function parameter or member 'sie' not described in 'c67x00_hcd_irq' drivers/usb/c67x00/c67x00-hcd.c:237: warning: Function parameter or member 'int_status' not described in 'c67x00_hcd_irq' drivers/usb/c67x00/c67x00-hcd.c:237: warning: Function parameter or member 'msg' not described in 'c67x00_hcd_irq' drivers/usb/c67x00/c67x00-hcd.c:267: warning: Function parameter or member 'hcd' not described in 'c67x00_hcd_start' drivers/usb/c67x00/c67x00-hcd.c:279: warning: Function parameter or member 'hcd' not described in 'c67x00_hcd_stop' Cc: Peter Korsgaard Cc: Oliver Neukum Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200715093209.3165641-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit ddcb6c6ad75760fcea6a0f64331fc00c552d16d0 Author: Lee Jones Date: Wed Jul 15 10:32:06 2020 +0100 usb: class: cdc-wdm: Provide description for usb_cdc_wdm_register()'s manage_power arg A good attempt was made to document everything else. Fixes the following W=1 kernel build warning(s): drivers/usb/class/cdc-wdm.c:961: warning: Function parameter or member 'manage_power' not described in 'usb_cdc_wdm_register' Cc: Oliver Neukum Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200715093209.3165641-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 56976249bd885fff2f1b77c994d38dada0027240 Author: Lee Jones Date: Wed Jul 15 10:32:05 2020 +0100 usb: mtu3: mtu3_trace: Supply missing mtu3_debug.h include file If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/usb/mtu3/mtu3_trace.c:13:6: warning: no previous prototype for ‘mtu3_dbg_trace’ [-Wmissing-prototypes] 13 | void mtu3_dbg_trace(struct device *dev, const char *fmt, ...) | ^~~~~~~~~~~~~~ Cc: Chunfeng Yun Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200715093209.3165641-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 680b512726545e07c8d42b8023c430bf80e6c22c Author: Lee Jones Date: Wed Jul 15 10:32:04 2020 +0100 usb: mtu3: mtu3_trace: Function headers are not suitable for kerneldoc Kerneldoc headers should only be used to document functions and data structures. Cc: Chunfeng Yun Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200715093209.3165641-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit eeed948c1d0b7dfcc58e17fd72370cdba0dfdf95 Author: Lee Jones Date: Wed Jul 15 10:32:03 2020 +0100 usb: dwc2: gadget: Avoid pointless read of EP control register Commit ec1f9d9f01384 ("usb: dwc2: gadget: parity fix in isochronous mode") moved these checks to dwc2_hsotg_change_ep_iso_parity() back in 2015. The assigned value hasn't been read back since. Let's remove the unnecessary H/W read. Fixes the following W=1 warning: drivers/usb/dwc2/gadget.c: In function ‘dwc2_hsotg_epint’: drivers/usb/dwc2/gadget.c:2981:6: warning: variable ‘ctrl’ set but not used [-Wunused-but-set-variable] 2981 | u32 ctrl; | ^~~~ Cc: Ben Dooks Signed-off-by: Lee Jones Acked-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20200715093209.3165641-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9607f3cd8b6633cae5a9c43d8a537add1af801da Author: Lee Jones Date: Wed Jul 15 10:32:02 2020 +0100 usb: dwc2: gadget: Make use of GINTMSK2 The value obtained from GINTSTS2 should be masked with the GINTMSK2 value. Looks like this has been broken since dwc2_gadget_wkup_alert_handler() was added back in 2018. Also fixes the following W=1 warning: drivers/usb/dwc2/gadget.c: In function ‘dwc2_gadget_wkup_alert_handler’: drivers/usb/dwc2/gadget.c:259:6: warning: variable ‘gintmsk2’ set but not used [-Wunused-but-set-variable] 259 | u32 gintmsk2; | ^~~~~~~~ Cc: Ben Dooks Fixes: 187c5298a1229 ("usb: dwc2: gadget: Add handler for WkupAlert interrupt") Signed-off-by: Lee Jones Acked-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20200715093209.3165641-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit d0f0f1b4c55e9e1b10e47399f544be52567d9fc3 Author: Ming Lei Date: Wed Jul 15 16:36:19 2020 +0800 block: always remove partitions from blk_drop_partitions() In theory, when GENHD_FL_NO_PART_SCAN is set, no partitions can be created on one disk. However, ioctl(BLKPG, BLKPG_ADD_PARTITION) doesn't check GENHD_FL_NO_PART_SCAN, so partitions still can be added even though GENHD_FL_NO_PART_SCAN is set. So far blk_drop_partitions() only removes partitions when disk_part_scan_enabled() return true. This way can make ghost partition on loop device after changing/clearing FD in case that PARTSCAN is disabled, such as partitions can be added via 'parted' on loop disk even though GENHD_FL_NO_PART_SCAN is set. Fix this issue by always removing partitions in blk_drop_partitions(), and this way is correct because the current code supposes that no partitions can be added in case of GENHD_FL_NO_PART_SCAN. Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 9054650fac24b784df8500aba2869ebf240d069a Author: Jens Axboe Date: Mon Jul 13 15:48:16 2020 -0600 block: relax jiffies rounding for timeouts In doing high IOPS testing, blk-mq is generally pretty well optimized. There are a few things that stuck out as using more CPU than what is really warranted, and one thing is the round_jiffies_up() that we do twice for each request. That accounts for about 0.8% of the CPU in my testing. We can make this cheaper by avoiding an integer division, by just adding a rough HZ mask that we can AND with instead. The timeouts are only on a second granularity already, we don't have to be that accurate here and this patch barely changes that. All we care about is nice grouping. Signed-off-by: Jens Axboe commit 7c78f67e9bd97478d56157c2ad53823668b5b822 Author: Zhenyu Ye Date: Wed Jul 15 15:19:44 2020 +0800 arm64: enable tlbi range instructions TLBI RANGE feature instoduces new assembly instructions and only support by binutils >= 2.30. Add necessary Kconfig logic to allow this to be enabled and pass '-march=armv8.4-a' to KBUILD_CFLAGS. Signed-off-by: Zhenyu Ye Link: https://lore.kernel.org/r/20200715071945.897-3-yezhenyu2@huawei.com Signed-off-by: Catalin Marinas commit badfae429b13ef173fe4627714894cb629aa1bc6 Author: Qing Zhang Date: Wed Jul 15 13:26:46 2020 +0800 spi: omap-uwire: Use clk_prepare_enable and clk_disable_unprepare Convert clk_enable() to clk_prepare_enable() and clk_disable() to clk_disable_unprepare() respectively in the spi-omap-uwire.c. Signed-off-by: Qing Zhang Link: https://lore.kernel.org/r/1594790807-32319-1-git-send-email-zhangqing@loongson.cn Signed-off-by: Mark Brown commit b620ba54547cd0f98e35c1be102eec2cc25fda5d Author: Zhenyu Ye Date: Wed Jul 15 15:19:43 2020 +0800 arm64: tlb: Detect the ARMv8.4 TLBI RANGE feature ARMv8.4-TLBI provides TLBI invalidation instruction that apply to a range of input addresses. This patch detect this feature. Signed-off-by: Zhenyu Ye Link: https://lore.kernel.org/r/20200715071945.897-2-yezhenyu2@huawei.com [catalin.marinas@arm.com: some renaming for consistency] Signed-off-by: Catalin Marinas commit e4dfa8029925f6200f6ab2db5a25d86fd082e9cf Author: Randy Dunlap Date: Tue Jul 14 21:56:59 2020 -0700 usb: linux/usb/gadget.h: fix duplicated word in comment Change the doubled word "in" to "be in" in a comment. Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20200715045701.22949-2-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 4e28335f2b442662148f9803f3e7e053e6074815 Author: Randy Dunlap Date: Tue Jul 14 21:57:01 2020 -0700 usb: linux/usb/serial.h: drop duplicated word in comment Drop the doubled word "set" in a comment. Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20200715045701.22949-4-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit c76ae34b5af22497b660f6baeed182869c24e411 Author: Randy Dunlap Date: Tue Jul 14 21:57:00 2020 -0700 usb: linux/usb/pd_vdo.h: drop duplicated word in comment Drop the doubled word "all" in a comment. Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20200715045701.22949-3-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit ded071f475cb5b67fda412f88fd5fd4d9c27916c Author: Randy Dunlap Date: Tue Jul 14 21:56:58 2020 -0700 usb: linux/usb.h: drop duplicated word in comment Drop the doubled word "the" in a comment. Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20200715045701.22949-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 258e858802cefbc59c5315f8893e99f8ffe117e6 Author: YueHaibing Date: Wed Jul 15 11:12:04 2020 +0800 USB: musb: Remove unused inline function It is never used, so can remove it. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200715031204.17308-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2b53a19284f537168fb506f2f40d7fda40a01162 Author: Changming Liu Date: Sat Jul 11 00:30:18 2020 -0400 USB: sisusbvga: Fix a potential UB casued by left shifting a negative value The char buffer buf, receives data directly from user space, so its content might be negative and its elements are left shifted to form an unsigned integer. Since left shifting a negative value is undefined behavior, thus change the char to u8 to elimintate this UB. Signed-off-by: Changming Liu Link: https://lore.kernel.org/r/20200711043018.928-1-charley.ashbringer@gmail.com Signed-off-by: Greg Kroah-Hartman commit 48025b4f3fa4a599921c1dc231983f41f9eecbc5 Author: Suraj Upadhyay Date: Tue Jul 14 17:22:49 2020 +0530 USB: Remove pci-dma-compat wrapper APIs. The legacy API wrappers in include/linux/pci-dma-compat.h should go away as it creates unnecessary midlayering for include/linux/dma-mapping.h APIs, instead use dma-mapping.h APIs directly. The patch has been generated with the coccinelle script below and compile-tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/20200714115249.GA8563@blackclown Signed-off-by: Greg Kroah-Hartman commit b1d37e5b9602c018c4e236ab2e2c59ce6b088e25 Merge: 10321aa17ae9a 60f80d6f2d07a Author: Jens Axboe Date: Wed Jul 15 08:47:59 2020 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.9/drivers Pull MD fixes from Song. * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md-cluster: fix wild pointer of unlock_all_bitmaps() md/raid5-cache: clear MD_SB_CHANGE_PENDING before flushing stripes md: fix deadlock causing by sysfs_notify md: improve io stats accounting md: raid0/linear: fix dereference before null check on pointer mddev commit 88c14de2b6786ef503fd1bc2c952159e65fe45cc Author: Nisha Kumari Date: Mon Jun 22 18:11:08 2020 +0530 regulator: Add labibb regulator binding Adding the devicetree binding for labibb regulator. [sumits: cleanup as per review comments and update to yaml] Signed-off-by: Nisha Kumari Signed-off-by: Sumit Semwal Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200622124110.20971-3-sumit.semwal@linaro.org Signed-off-by: Mark Brown commit 498ab2fdf8554690c9567c1eee436b858637e3ff Author: Nisha Kumari Date: Mon Jun 22 18:11:10 2020 +0530 regulator: qcom: Add labibb driver Qualcomm platforms have LAB(LCD AMOLED Boost)/IBB(Inverting Buck Boost) regulators, labibb for short, which are used as power supply for LCD Mode displays. This patch adds labibb regulator driver for pmi8998 PMIC, found on SDM845 platforms. [sumits: reworked the driver design as per upstream review] Signed-off-by: Nisha Kumari Signed-off-by: Sumit Semwal Link: https://lore.kernel.org/r/20200622124110.20971-5-sumit.semwal@linaro.org Signed-off-by: Mark Brown commit f7d7ad42a9dc2d63cab6a79fe31e6732a30dacf5 Author: Sumit Semwal Date: Mon Jun 22 18:11:07 2020 +0530 regulator: Allow regulators to verify enabled during enable() Some regulators might need to verify that they have indeed been enabled after the enable() call is made and enable_time delay has passed. This is implemented by repeatedly checking is_enabled() upto poll_enabled_time, waiting for the already calculated enable delay in each iteration. Signed-off-by: Sumit Semwal Link: https://lore.kernel.org/r/20200622124110.20971-2-sumit.semwal@linaro.org Signed-off-by: Mark Brown commit 10321aa17ae9ad9b1335d61aeabb6f63d38cc28e Author: Gustavo A. R. Silva Date: Tue Jul 14 22:03:27 2020 +0200 s390/dasd: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary variable _datasize_. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Stefan Haberland Signed-off-by: Jens Axboe commit 9f4aa52387c68049403b59939df5c0dd8e3872cc Author: Stefan Haberland Date: Tue Jul 14 22:03:26 2020 +0200 s390/dasd: fix inability to use DASD with DIAG driver During initialization of the DASD DIAG driver a request is issued that has a bio structure that resides on the stack. With virtually mapped kernel stacks this bio address might be in virtual storage which is unsuitable for usage with the diag250 call. In this case the device can not be set online using the DIAG discipline and fails with -EOPNOTSUP. In the system journal the following error message is presented: dasd: X.X.XXXX Setting the DASD online with discipline DIAG failed with rc=-95 Fix by allocating the bio structure instead of having it on the stack. Fixes: ce3dc447493f ("s390: add support for virtually mapped kernel stacks") Signed-off-by: Stefan Haberland Reviewed-by: Peter Oberparleiter Cc: stable@vger.kernel.org #4.20 Signed-off-by: Jens Axboe commit 8635764bcf0f109933b593d79ac2247b1e863d0a Author: YueHaibing Date: Wed Jul 15 10:52:03 2020 +0800 netpoll: Remove unused inline function netpoll_netdev_init() commit d565b0a1a9b6 ("net: Add Generic Receive Offload infrastructure") left behind this, remove it. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 0d40efabe3e383dd7e347debd85a0d4754402efb Author: YueHaibing Date: Wed Jul 15 10:36:13 2020 +0800 mptcp: Remove unused inline function mptcp_rcv_synsent() commit 263e1201a2c3 ("mptcp: consolidate synack processing.") left behind this, remove it. Signed-off-by: YueHaibing Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit 054848d21bc19992f2c3540244bd6defbc833aa2 Author: YueHaibing Date: Wed Jul 15 10:31:19 2020 +0800 net: flow: Remove unused inline function It is not used since commit 09c7570480f7 ("xfrm: remove flow cache") Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 17c7b8b1cadc0ae95ee2a9fa18022dd0c901af5f Author: YueHaibing Date: Wed Jul 15 10:18:46 2020 +0800 cipso: Remove unused inline functions They are not used any more since commit b1edeb102397 ("netlabel: Replace protocol/NetLabel linking with refrerence counts") Signed-off-by: YueHaibing Acked-by: Paul Moore Signed-off-by: David S. Miller commit 10fadd5e811715d68a3c73b31e009f120a5b7d27 Author: Alexander A. Klimov Date: Fri Jul 10 21:09:19 2020 +0200 usb: gadget: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200710190919.31464-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 36774c5ac8a2f4a2340af3d793c9e322b4f68abf Author: Alexander A. Klimov Date: Fri Jul 10 21:18:42 2020 +0200 usb: phy: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200710191842.32561-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 523a82955eaa094e5c8357451f7a610e90bf029f Author: Alexander A. Klimov Date: Sat Jul 11 14:39:06 2020 +0200 tools: usb: usbip: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200711123906.16325-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 10623b879da3932be313ba142d56b9f3d1216e96 Author: Alexander A. Klimov Date: Sat Jul 11 15:58:04 2020 +0200 usb: dwc3: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200711135804.19735-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit d6c3c6c09f5abb60a9f3c2d8f56abb529c967f35 Author: Alexander A. Klimov Date: Sat Jul 11 15:58:13 2020 +0200 usb: host: xhci-plat: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200711135813.19798-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 952dd40e05ed170865a55bf52f152ce693cacac0 Author: Alexander A. Klimov Date: Sat Jul 11 15:58:25 2020 +0200 usb: typec: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200711135825.19862-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 681aa3cf063c4338da9eab1496f5d2b718fac41d Author: Alexander A. Klimov Date: Mon Jul 13 11:23:14 2020 +0200 USB: ohci: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713092314.32774-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 240cb8de112eb21543450b98dc88b7ec2e9869cb Author: Ioana Ciornei Date: Tue Jul 14 16:34:31 2020 +0300 staging: dpaa2-ethsw: setup MAC address of switch netdevices At probe time, retrieve the MAC addresses of the switch ports using a firmware call and use that to setup the switch interface net_device instead of relying entirely on the user to configure a MAC address on the interface. In case a switch interface is not connected to a MAC, thus the dpsw_if_get_port_mac_addr() will return all zeroes, generate a random MAC address and use that. This new functionality is dependent on a firmware call which is available only on newer versions, so depending on the running DPSW object version skip this step. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200714133431.17532-7-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 3b9c7029a7d6ee0876c5481db11947d57792cdd5 Author: Ioana Ciornei Date: Tue Jul 14 16:34:30 2020 +0300 staging: dpaa2-ethsw: store version information of the DPSW object Store the major and minor versions of the DPSW object in the ethsw structure. This will be used in a subsequent patch to make sure some commands are only called on the appropriate version of object. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200714133431.17532-6-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 03ad6de9bb3e6e48b2ab87226f545f8a301017fa Author: Ioana Ciornei Date: Tue Jul 14 16:34:29 2020 +0300 staging: dpaa2-ethsw: disable switch ports are probe time The MC firmware will enable the switch interfaces at DPSW creation without waiting for an 'ifconfig up' on the switch interfaces. When this happens, the states held by the Linux software vs the firmware are not in sync. Make sure to disable the switch ports at probe time to not encounter this issue. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200714133431.17532-5-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit b53bb527d88ae963bdf9bd71f222cf459fc59d2b Author: Ioana Ciornei Date: Tue Jul 14 16:34:28 2020 +0300 staging: dpaa2-ethsw: use netif_running when checking for port up There are some cases where the switch interface needs to be disabled so that changes in the configuration can be made. In such cases, we should check for a running interface (bit __LINK_STATE_START of the netdev) instead of netif_carrier_ok(). This is because on open() we enable the switch interface even though the link up has not come out yet. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200714133431.17532-4-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 2cde6410c13d63cc306f395d9fa4b72605468061 Author: Ioana Ciornei Date: Tue Jul 14 16:34:27 2020 +0300 staging: dpaa2-ethsw: ignore state interrupts when the interface is not running Link state interrupts will be transmitted to the DPSW object even though the user has not yet issued a 'ifconfig up' on a switch interface. Don't act on those interrupts since there are of no interrest. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200714133431.17532-3-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 06ddf551e4cb228155f8b086ac9113963817089c Author: Ioana Ciornei Date: Tue Jul 14 16:34:26 2020 +0300 staging: dpaa2-ethsw: fix reported link state On the .ndo_open() callback set netif_carrier_off() until the link state interrupt is received so that the LOWER_UP flag does not show up incorrectly in the output of 'ip link show'. Signed-off-by: Ioana Ciornei Link: https://lore.kernel.org/r/20200714133431.17532-2-ioana.ciornei@nxp.com Signed-off-by: Greg Kroah-Hartman commit 1843b3fef9aaa9f5098212019e927ffd2e8da7c1 Author: Ivan Safonov Date: Sun Jul 12 15:38:21 2020 +0300 staging: r8188eu: remove unused members of struct xmit_buf Remove unused members of struct xmit_buf: alloc_sz, ff_hwaddr, dma_transfer_addr, bpending and last. Acked-by: Larry Finger Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20200712123821.553420-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit a7a49357179ee71e1b969991474392e91295bff1 Author: Zhixu Zhao Date: Wed Jul 15 21:33:13 2020 +0800 staging: gasket: core: Fix a coding style issue in gasket_core.c A coding alignment issue is found by checkpatch.pl. Fix it by using a temporary for gasket_dev->bar_data[bar_num]. Signed-off-by: Zhixu Zhao Link: https://lore.kernel.org/r/20200715133313.16327-1-zhixu001@126.com Signed-off-by: Greg Kroah-Hartman commit d1e8c52ab7ee7afbaa9d276d805525a64a01a07a Author: Suraj Upadhyay Date: Mon Jul 13 20:02:53 2020 +0530 staging: comedi: s626: Remove pci-dma-compat wrapper APIs. The legacy API wrappers in include/linux/pci-dma-compat.h should go away as it creates unnecessary midlayering for include/linux/dma-mapping.h APIs, instead use dma-mapping.h APIs directly. The patch has been generated with the coccinelle script below and compile-tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, (enum dma_data_direction)E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Signed-off-by: Suraj Upadhyay Reviewed-by: Ian Abbott Link: https://lore.kernel.org/r/20200713143253.GA14953@blackclown Signed-off-by: Greg Kroah-Hartman commit 1e5f7325636abd6c650b956506eb1b7993bd688c Author: Baidyanath Kundu Date: Mon Jul 13 20:06:53 2020 +0530 Staging: vc04_services: Fix unsigned int warnings This patch fixes the checkpatch.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Baidyanath Kundu Link: https://lore.kernel.org/r/20200713143653.32332-1-kundubaidya99@gmail.com Signed-off-by: Greg Kroah-Hartman commit 71d734103edfa2b4c6657578a3082ee0e51d767e Author: Mel Gorman Date: Wed Jul 8 14:11:36 2020 +0300 fsnotify: Rearrange fast path to minimise overhead when there is no watcher The fsnotify paths are trivial to hit even when there are no watchers and they are surprisingly expensive. For example, every successful vfs_write() hits fsnotify_modify which calls both fsnotify_parent and fsnotify unless FMODE_NONOTIFY is set which is an internal flag invisible to userspace. As it stands, fsnotify_parent is a guaranteed functional call even if there are no watchers and fsnotify() does a substantial amount of unnecessary work before it checks if there are any watchers. A perf profile showed that applying mnt->mnt_fsnotify_mask in fnotify() was almost half of the total samples taken in that function during a test. This patch rearranges the fast paths to reduce the amount of work done when there are no watchers. The test motivating this was "perf bench sched messaging --pipe". Despite the fact the pipes are anonymous, fsnotify is still called a lot and the overhead is noticeable even though it's completely pointless. It's likely the overhead is negligible for real IO so this is an extreme example. This is a comparison of hackbench using processes and pipes on a 1-socket machine with 8 CPU threads without fanotify watchers. 5.7.0 5.7.0 vanilla fastfsnotify-v1r1 Amean 1 0.4837 ( 0.00%) 0.4630 * 4.27%* Amean 3 1.5447 ( 0.00%) 1.4557 ( 5.76%) Amean 5 2.6037 ( 0.00%) 2.4363 ( 6.43%) Amean 7 3.5987 ( 0.00%) 3.4757 ( 3.42%) Amean 12 5.8267 ( 0.00%) 5.6983 ( 2.20%) Amean 18 8.4400 ( 0.00%) 8.1327 ( 3.64%) Amean 24 11.0187 ( 0.00%) 10.0290 * 8.98%* Amean 30 13.1013 ( 0.00%) 12.8510 ( 1.91%) Amean 32 13.9190 ( 0.00%) 13.2410 ( 4.87%) 5.7.0 5.7.0 vanilla fastfsnotify-v1r1 Duration User 157.05 152.79 Duration System 1279.98 1219.32 Duration Elapsed 182.81 174.52 This is showing that the latencies are improved by roughly 2-9%. The variability is not shown but some of these results are within the noise as this workload heavily overloads the machine. That said, the system CPU usage is reduced by quite a bit so it makes sense to avoid the overhead even if it is a bit tricky to detect at times. A perf profile of just 1 group of tasks showed that 5.14% of samples taken were in either fsnotify() or fsnotify_parent(). With the patch, 2.8% of samples were in fsnotify, mostly function entry and the initial check for watchers. The check for watchers is complicated enough that inlining it may be controversial. [Amir] Slightly simplify with mnt_or_sb_mask => marks_mask Link: https://lore.kernel.org/r/20200708111156.24659-1-amir73il@gmail.com Signed-off-by: Mel Gorman Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 47aaabdedf366ac5894c7fddec388832f0d8193e Author: Jan Kara Date: Wed Jul 15 14:06:21 2020 +0200 fanotify: Avoid softlockups when reading many events When user provides large buffer for events and there are lots of events available, we can try to copy them all to userspace without scheduling which can softlockup the kernel (furthermore exacerbated by the contention on notification_lock). Add a scheduling point after copying each event. Note that usually the real underlying problem is the cost of fanotify event merging and the resulting contention on notification_lock but this is a cheap way to somewhat reduce the problem until we can properly address that. Reported-by: Francesco Ruggeri Link: https://lore.kernel.org/lkml/20200714025417.A25EB95C0339@us180.sjc.aristanetworks.com Reviewed-by: Amir Goldstein Signed-off-by: Jan Kara commit 52fe0b16f60ed3bc38f5f4bafdeb4f618e97f62b Author: Lee Jones Date: Wed Jul 15 09:26:34 2020 +0100 cpufreq: amd_freq_sensitivity: Mark sometimes used ID structs as __maybe_unused ot used when MODULE is not defined. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/amd_freq_sensitivity.c:147:32: warning: ‘amd_freq_sensitivity_ids’ defined but not used [-Wunused-const-variable=] 147 | static const struct x86_cpu_id amd_freq_sensitivity_ids[] = { | ^~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 8f23d1f12cf1515693893aae3a79e6079bcdcf85 Author: Lee Jones Date: Wed Jul 15 09:26:33 2020 +0100 cpufreq: intel_pstate: Supply struct attribute description for get_aperf_mperf_shift() Fixes the following W=1 kernel build warning(s): drivers/cpufreq/intel_pstate.c:293: warning: Function parameter or member 'get_aperf_mperf_shift' not described in 'pstate_funcs' Suggested-by: "Rafael J. Wysocki" Signed-off-by: Lee Jones Acked-by: Viresh Kumar [ rjw: Remove line break ] Signed-off-by: Rafael J. Wysocki commit 3098174990f51671c0a1e660527ac1443e23ed0f Author: Lee Jones Date: Wed Jul 15 09:26:32 2020 +0100 cpufreq: pcc-cpufreq: Mark sometimes used ID structs as __maybe_unused Not used when MODULE is not defined. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/pcc-cpufreq.c:619:36: warning: ‘processor_device_ids’ defined but not used [-Wunused-const-variable=] 619 | static const struct acpi_device_id processor_device_ids[] = { | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 638b509795a18c88ce391fb94d9191f1abcfe88d Author: Lee Jones Date: Wed Jul 15 09:26:31 2020 +0100 cpufreq: powernow-k8: Mark 'hi' and 'lo' dummy variables as __always_unused if we fail to use a variable, even a dummy ones, then the compiler complains that it is set but not used. We know this is fine, so we set them as __always_unused here to let the compiler know. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/powernow-k8.c: In function ‘pending_bit_stuck’: drivers/cpufreq/powernow-k8.c:89:10: warning: variable ‘hi’ set but not used [-Wunused-but-set-variable] 89 | u32 lo, hi; | ^~ drivers/cpufreq/powernow-k8.c: In function ‘core_voltage_pre_transition’: drivers/cpufreq/powernow-k8.c:285:14: warning: variable ‘lo’ set but not used [-Wunused-but-set-variable] 285 | u32 maxvid, lo, rvomult = 1; | ^~ Signed-off-by: Lee Jones Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit a7b909376d3994ffb983a4037dd12689159fd4fb Author: Lee Jones Date: Wed Jul 15 09:26:30 2020 +0100 cpufreq: acpi-cpufreq: Mark sometimes used ID structs as __maybe_unused Not used when MODULE is not defined. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/acpi-cpufreq.c:1004:36: warning: ‘processor_device_ids’ defined but not used [-Wunused-const-variable=] 997 | static const struct x86_cpu_id acpi_cpufreq_ids[] = { | ^~~~~~~~~~~~~~~~ drivers/cpufreq/acpi-cpufreq.c:997:32: warning: ‘acpi_cpufreq_ids’ defined but not used [-Wunused-const-variable=] 619 | static const struct acpi_device_id processor_device_ids[] = { | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit e1711f296a2de54a6dd5bde4d92bb903dfaed1fb Author: Lee Jones Date: Wed Jul 15 09:26:29 2020 +0100 cpufreq: acpi-cpufreq: Mark 'dummy' variable as __always_unused If we fail to use a variable, even a 'dummy' one, then the compiler complains that it is set but not used. We know this is fine, so we set it as __always_unused to let the compiler know. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/acpi-cpufreq.c: In function ‘cpu_freq_read_intel’: drivers/cpufreq/acpi-cpufreq.c:247:11: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] drivers/cpufreq/acpi-cpufreq.c: In function ‘cpu_freq_read_amd’: drivers/cpufreq/acpi-cpufreq.c:265:11: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] Signed-off-by: Lee Jones Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 44bd9a30ef737d6bdfcf7c4e31896a09a4b15955 Author: Lee Jones Date: Wed Jul 15 09:26:28 2020 +0100 cpufreq: powernv-cpufreq: Fix a bunch of kerneldoc related issues Repair problems with formatting and missing attributes/parameters, and demote header comments which do not meet the required standards applicable to kerneldoc. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/powernv-cpufreq.c:84: warning: Function parameter or member 'last_lpstate_idx' not described in 'global_pstate_info' drivers/cpufreq/powernv-cpufreq.c:84: warning: Function parameter or member 'last_gpstate_idx' not described in 'global_pstate_info' drivers/cpufreq/powernv-cpufreq.c:84: warning: Function parameter or member 'policy' not described in 'global_pstate_info' drivers/cpufreq/powernv-cpufreq.c:182: warning: Function parameter or member 'i' not described in 'idx_to_pstate' drivers/cpufreq/powernv-cpufreq.c:201: warning: Function parameter or member 'pstate' not described in 'pstate_to_idx' drivers/cpufreq/powernv-cpufreq.c:670: warning: Function parameter or member 't' not described in 'gpstate_timer_handler' drivers/cpufreq/powernv-cpufreq.c:670: warning: Excess function parameter 'data' description in 'gpstate_timer_handler' Signed-off-by: Lee Jones Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 4a27aa9cb5b24691d3e3b2ebc3d726ee585fc960 Author: Lee Jones Date: Wed Jul 15 09:26:26 2020 +0100 cpufreq: pasemi: Include header file for {check,restore}_astate prototypes If function callers and providers do not share the same prototypes the compiler complains of missing prototypes. Fix this by including the correct platforms header file. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/pasemi-cpufreq.c:109:5: warning: no previous prototype for ‘check_astate’ [-Wmissing-prototypes] 109 | int check_astate(void) | ^~~~~~~~~~~~ drivers/cpufreq/pasemi-cpufreq.c:114:6: warning: no previous prototype for ‘restore_astate’ [-Wmissing-prototypes] 114 | void restore_astate(int cpu) | ^~~~~~~~~~~~~~ Suggested-by: Olof Johansson Signed-off-by: Lee Jones Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit dd2e65f2ae92268c0945842d6101fcece8f19de5 Author: Lee Jones Date: Wed Jul 15 09:26:24 2020 +0100 cpufreq: cpufreq_governor: Demote store_sampling_rate() header to standard comment block There is no need for this to be denoted as kerneldoc. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/cpufreq_governor.c:46: warning: Function parameter or member 'attr_set' not described in 'store_sampling_rate' drivers/cpufreq/cpufreq_governor.c:46: warning: Function parameter or member 'buf' not described in 'store_sampling_rate' drivers/cpufreq/cpufreq_governor.c:46: warning: Function parameter or member 'count' not described in 'store_sampling_rate' Signed-off-by: Lee Jones Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit a9909c217fb1430433ce791d52171a44ac5b937e Author: Lee Jones Date: Wed Jul 15 09:26:23 2020 +0100 cpufreq: cpufreq: Demote lots of function headers unworthy of kerneldoc status Also provide missing function parameter description for 'cpu' and 'policy'. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/cpufreq.c:60: warning: cannot understand function prototype: 'struct cpufreq_driver *cpufreq_driver; ' drivers/cpufreq/cpufreq.c:90: warning: Function parameter or member 'cpufreq_policy_notifier_list' not described in 'BLOCKING_NOTIFIER_HEAD' drivers/cpufreq/cpufreq.c:312: warning: Function parameter or member 'val' not described in 'adjust_jiffies' drivers/cpufreq/cpufreq.c:312: warning: Function parameter or member 'ci' not described in 'adjust_jiffies' drivers/cpufreq/cpufreq.c:538: warning: Function parameter or member 'policy' not described in 'cpufreq_driver_resolve_freq' drivers/cpufreq/cpufreq.c:686: warning: Function parameter or member 'file_name' not described in 'show_one' drivers/cpufreq/cpufreq.c:686: warning: Function parameter or member 'object' not described in 'show_one' drivers/cpufreq/cpufreq.c:731: warning: Function parameter or member 'file_name' not described in 'store_one' drivers/cpufreq/cpufreq.c:731: warning: Function parameter or member 'object' not described in 'store_one' drivers/cpufreq/cpufreq.c:741: warning: Function parameter or member 'policy' not described in 'show_cpuinfo_cur_freq' drivers/cpufreq/cpufreq.c:741: warning: Function parameter or member 'buf' not described in 'show_cpuinfo_cur_freq' drivers/cpufreq/cpufreq.c:754: warning: Function parameter or member 'policy' not described in 'show_scaling_governor' drivers/cpufreq/cpufreq.c:754: warning: Function parameter or member 'buf' not described in 'show_scaling_governor' drivers/cpufreq/cpufreq.c:770: warning: Function parameter or member 'policy' not described in 'store_scaling_governor' drivers/cpufreq/cpufreq.c:770: warning: Function parameter or member 'buf' not described in 'store_scaling_governor' drivers/cpufreq/cpufreq.c:770: warning: Function parameter or member 'count' not described in 'store_scaling_governor' drivers/cpufreq/cpufreq.c:806: warning: Function parameter or member 'policy' not described in 'show_scaling_driver' drivers/cpufreq/cpufreq.c:806: warning: Function parameter or member 'buf' not described in 'show_scaling_driver' drivers/cpufreq/cpufreq.c:815: warning: Function parameter or member 'policy' not described in 'show_scaling_available_governors' drivers/cpufreq/cpufreq.c:815: warning: Function parameter or member 'buf' not described in 'show_scaling_available_governors' drivers/cpufreq/cpufreq.c:859: warning: Function parameter or member 'policy' not described in 'show_related_cpus' drivers/cpufreq/cpufreq.c:859: warning: Function parameter or member 'buf' not described in 'show_related_cpus' drivers/cpufreq/cpufreq.c:867: warning: Function parameter or member 'policy' not described in 'show_affected_cpus' drivers/cpufreq/cpufreq.c:867: warning: Function parameter or member 'buf' not described in 'show_affected_cpus' drivers/cpufreq/cpufreq.c:901: warning: Function parameter or member 'policy' not described in 'show_bios_limit' drivers/cpufreq/cpufreq.c:901: warning: Function parameter or member 'buf' not described in 'show_bios_limit' drivers/cpufreq/cpufreq.c:1625: warning: Function parameter or member 'dev' not described in 'cpufreq_remove_dev' drivers/cpufreq/cpufreq.c:1625: warning: Function parameter or member 'sif' not described in 'cpufreq_remove_dev' drivers/cpufreq/cpufreq.c:2380: warning: Function parameter or member 'cpu' not described in 'cpufreq_get_policy' drivers/cpufreq/cpufreq.c:2771: warning: Function parameter or member 'driver' not described in 'cpufreq_unregister_driver' Signed-off-by: Lee Jones Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 19231a8739d13acd27cde253d757c9dd3dcb0e1d Author: Lee Jones Date: Wed Jul 15 09:26:22 2020 +0100 cpufreq: freq_table: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/cpufreq/freq_table.c:229: warning: Function parameter or member 'policy' not described in 'show_available_freqs' drivers/cpufreq/freq_table.c:229: warning: Function parameter or member 'buf' not described in 'show_available_freqs' drivers/cpufreq/freq_table.c:229: warning: Function parameter or member 'show_boost' not described in 'show_available_freqs' drivers/cpufreq/freq_table.c:269: warning: Function parameter or member 'policy' not described in 'scaling_available_frequencies_show' drivers/cpufreq/freq_table.c:269: warning: Function parameter or member 'buf' not described in 'scaling_available_frequencies_show' drivers/cpufreq/freq_table.c:281: warning: Function parameter or member 'policy' not described in 'scaling_boost_frequencies_show' drivers/cpufreq/freq_table.c:281: warning: Function parameter or member 'buf' not described in 'scaling_boost_frequencies_show' Signed-off-by: Lee Jones Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 37adf701dd8790fd019c513b7a892d7178170338 Author: Daniel Winkler Date: Tue Jul 14 14:16:00 2020 -0700 Bluetooth: Add per-instance adv disable/remove Add functionality to disable and remove advertising instances, and use that functionality in MGMT add/remove advertising calls. Currently, advertising is globally-disabled, i.e. all instances are disabled together, even if hardware offloading is available. This patch adds functionality to disable and remove individual adv instances, solving two issues: 1. On new advertisement registration, a global disable was done, and then only the new instance was enabled. This meant only the newest instance was actually enabled. 2. On advertisement removal, the structure was removed, but the instance was never disabled or removed, which is incorrect with hardware offload support. Signed-off-by: Daniel Winkler Reviewed-by: Shyh-In Hwang Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann commit abb7962adc80ab4f4313e8a065302525b6a9c2dc Author: Anshuman Khandual Date: Wed Jul 1 10:12:01 2020 +0530 arm64/hugetlb: Reserve CMA areas for gigantic pages on 16K and 64K configs Currently 'hugetlb_cma=' command line argument does not create CMA area on ARM64_16K_PAGES and ARM64_64K_PAGES based platforms. Instead, it just ends up with the following warning message. Reason being, hugetlb_cma_reserve() never gets called for these huge page sizes. [ 64.255669] hugetlb_cma: the option isn't supported by current arch This enables CMA areas reservation on ARM64_16K_PAGES and ARM64_64K_PAGES configs by defining an unified arm64_hugetlb_cma_reseve() that is wrapped in CONFIG_CMA. Call site for arm64_hugetlb_cma_reserve() is also protected as is conditionally included and hence cannot contain stub for the inverse config i.e !(CONFIG_HUGETLB_PAGE && CONFIG_CMA). Signed-off-by: Anshuman Khandual Cc: Will Deacon Cc: Mark Rutland Cc: Mike Kravetz Cc: Barry Song Cc: Andrew Morton Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1593578521-24672-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit 52bedfbd45eb55f914497bef4a74b0d73f8e1957 Author: Takashi Iwai Date: Tue Jul 14 19:26:31 2020 +0200 ALSA: usb-audio: Replace blacklist word Follow the recent inclusive terminology guidelines and replace the word "blacklist" appropriately. Only a comment fix, no functional changes. Link: https://lore.kernel.org/r/20200714172631.25371-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit 216416725e4cc7e7eb2db611a1b0ff5aba16a0c0 Author: Takashi Iwai Date: Tue Jul 14 19:26:30 2020 +0200 ALSA: via82xx: Replace the words whitelist Follow the recent inclusive terminology guidelines and replace the words "whitelist" appropriately. Only comment or variable renames, no functional changes. Link: https://lore.kernel.org/r/20200714172631.25371-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit 03fa2a7a1272669d097d7b4c8a7cc1136e1ef368 Author: Takashi Iwai Date: Tue Jul 14 19:26:29 2020 +0200 ALSA: nm256: Replace the words blacklist Follow the recent inclusive terminology guidelines and replace the words "whitelist" and "blacklist" appropriately. Only comment or enum/variable renames, no functional changes. Link: https://lore.kernel.org/r/20200714172631.25371-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7ce78fc8456264c0da2fccdff87e4632ef51c84c Author: Takashi Iwai Date: Tue Jul 14 19:26:28 2020 +0200 ALSA: intel8x0: Replace the words white/blacklist Follow the recent inclusive terminology guidelines and replace the words "whitelist" and "blacklist" appropriately. Correcting only comments, or error/module messages, no functional changes. Link: https://lore.kernel.org/r/20200714172631.25371-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6317e5eb209269f32b7b31a08330ebda0fd81efb Author: Takashi Iwai Date: Tue Jul 14 19:26:27 2020 +0200 ALSA: hda: Replace the words white/blacklist Follow the recent inclusive terminology guidelines and replace the words "whitelist" and "blacklist" appropriately. Only comment or variable renames, no functional changes. Note that pm_blacklist module option is still kept as was, so that users can still keep the old option. Link: https://lore.kernel.org/r/20200714172631.25371-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit abe092aed2aa47ce8d7badd53f81e27b16766e9f Author: Takashi Iwai Date: Tue Jul 14 19:26:26 2020 +0200 ALSA: es1968: Replace the words white/blacklist Follow the recent inclusive terminology guidelines and replace the words "whitelist" and "blacklist" appropriately. Only comment or variable renames, no functional changes. Link: https://lore.kernel.org/r/20200714172631.25371-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit ba2b94ee737f53f44c29a49d61492498a87f4360 Author: Takashi Iwai Date: Tue Jul 14 19:26:25 2020 +0200 ALSA: ctxfi: Replace the word blacklist Follow the recent inclusive terminology guidelines and replace the word "blacklist" appropriately. Only correcting the error message, no functional changes. Link: https://lore.kernel.org/r/20200714172631.25371-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6205372c320bed451fd85d5054129647e7b9d5cc Author: Takashi Iwai Date: Tue Jul 14 19:26:24 2020 +0200 ALSA: bt87x: Replace the words white/blacklist Follow the recent inclusive terminology guidelines and replace the words "whitelist" and "blacklist" appropriately. Only comment or variable renames, no functional changes. Link: https://lore.kernel.org/r/20200714172631.25371-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7933d669ca9caa25a04a8bbd94da22fa5f89d186 Author: Takashi Iwai Date: Tue Jul 14 19:26:23 2020 +0200 ALSA: ac97: Replace the words white/blacklist Follow the recent inclusive terminology guidelines and replace the words "whitelist" and "blacklist" appropriately. Only comment or function/variable renames, no functional changes. Link: https://lore.kernel.org/r/20200714172631.25371-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit c1309fd09bfe98cd767452bcdbdf1442086cc93a Author: Lee Jones Date: Tue Jul 14 12:15:46 2020 +0100 dmaengine: ioat: Fix some parameter misspelling and provide description for phys_complete Fixes the following W=1 kernel build warning(s): drivers/dma/ioat/dma.c:202: warning: Function parameter or member 'ioat_chan' not described in 'ioat_update_pending' drivers/dma/ioat/dma.c:202: warning: Excess function parameter 'ioat' description in 'ioat_update_pending' drivers/dma/ioat/dma.c:465: warning: Function parameter or member 'ioat_chan' not described in 'ioat_check_space_lock' drivers/dma/ioat/dma.c:465: warning: Excess function parameter 'ioat' description in 'ioat_check_space_lock' drivers/dma/ioat/dma.c:591: warning: Function parameter or member 'ioat_chan' not described in '__cleanup' drivers/dma/ioat/dma.c:591: warning: Function parameter or member 'phys_complete' not described in '__cleanup' drivers/dma/ioat/dma.c:591: warning: Excess function parameter 'ioat' description in '__cleanup' Signed-off-by: Lee Jones Cc: Dave Jiang Cc: Leonid Ravich Link: https://lore.kernel.org/r/20200714111546.1755231-18-lee.jones@linaro.org Signed-off-by: Vinod Koul commit af49b016c0f97515ee193991af338c624271d839 Author: Lee Jones Date: Tue Jul 14 12:15:45 2020 +0100 dmaengine: ioat: init: Correct misspelling of function parameter 'c' for channel Fixes the following W=1 kernel build warning(s): drivers/dma/ioat/init.c:608: warning: Function parameter or member 'c' not described in 'ioat_free_chan_resources' drivers/dma/ioat/init.c:608: warning: Excess function parameter 'chan' description in 'ioat_free_chan_resources' Signed-off-by: Lee Jones Cc: Logan Gunthorpe Link: https://lore.kernel.org/r/20200714111546.1755231-17-lee.jones@linaro.org Signed-off-by: Vinod Koul commit e6fe333c862b29978fdf625f7ff2f9a9cbc91935 Author: Lee Jones Date: Tue Jul 14 12:15:44 2020 +0100 dmaengine: mv_xor_v2: Supply some missing 'struct mv_xor_v2_device' attribute docs Fixes the following W=1 kernel build warning(s): drivers/dma/mv_xor_v2.c:168: warning: Function parameter or member 'clk' not described in 'mv_xor_v2_device' drivers/dma/mv_xor_v2.c:168: warning: Function parameter or member 'reg_clk' not described in 'mv_xor_v2_device' drivers/dma/mv_xor_v2.c:168: warning: Function parameter or member 'irq_tasklet' not described in 'mv_xor_v2_device' drivers/dma/mv_xor_v2.c:168: warning: Function parameter or member 'hw_queue_idx' not described in 'mv_xor_v2_device' drivers/dma/mv_xor_v2.c:168: warning: Function parameter or member 'msi_desc' not described in 'mv_xor_v2_device' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200714111546.1755231-16-lee.jones@linaro.org Signed-off-by: Vinod Koul commit 5726164fa4862f266cbdaa52e251343dcc9d3ea2 Author: Lee Jones Date: Tue Jul 14 12:15:43 2020 +0100 dmaengine: xgene-dma: Provide descriptions for 'dev' and 'clk' in device's ddata Fixes the following W=1 kernel build warning(s): drivers/dma/xgene-dma.c:310: warning: Function parameter or member 'dev' not described in 'xgene_dma' drivers/dma/xgene-dma.c:310: warning: Function parameter or member 'clk' not described in 'xgene_dma' Signed-off-by: Lee Jones Cc: Prasad Sahu Cc: Loc Ho Link: https://lore.kernel.org/r/20200714111546.1755231-15-lee.jones@linaro.org Signed-off-by: Vinod Koul commit 8702624bd9472d85372d679fbdd705b91d9c4bbc Author: Lee Jones Date: Tue Jul 14 12:15:42 2020 +0100 dmaengine: nbpfaxi: Provide some missing attribute docs and split out slave info Fixes the following W=1 kernel build warning(s): drivers/dma/nbpfaxi.c:157: warning: Function parameter or member 'chan' not described in 'nbpf_desc' drivers/dma/nbpfaxi.c:220: warning: Function parameter or member 'tasklet' not described in 'nbpf_channel' drivers/dma/nbpfaxi.c:220: warning: Function parameter or member 'slave_src_addr' not described in 'nbpf_channel' drivers/dma/nbpfaxi.c:220: warning: Function parameter or member 'slave_src_width' not described in 'nbpf_channel' drivers/dma/nbpfaxi.c:220: warning: Function parameter or member 'slave_src_burst' not described in 'nbpf_channel' drivers/dma/nbpfaxi.c:220: warning: Function parameter or member 'slave_dst_addr' not described in 'nbpf_channel' drivers/dma/nbpfaxi.c:220: warning: Function parameter or member 'slave_dst_width' not described in 'nbpf_channel' drivers/dma/nbpfaxi.c:220: warning: Function parameter or member 'slave_dst_burst' not described in 'nbpf_channel' drivers/dma/nbpfaxi.c:220: warning: Function parameter or member 'running' not described in 'nbpf_channel' drivers/dma/nbpfaxi.c:220: warning: Function parameter or member 'paused' not described in 'nbpf_channel' Signed-off-by: Lee Jones Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: Andrii Nakryiko Cc: John Fastabend Cc: KP Singh Cc: Guennadi Liakhovetski Cc: netdev@vger.kernel.org Cc: bpf@vger.kernel.org Link: https://lore.kernel.org/r/20200714111546.1755231-14-lee.jones@linaro.org Signed-off-by: Vinod Koul commit 1c5933c5a98cc82e5baca48a45c06ffc79e4fb7e Author: Lee Jones Date: Tue Jul 14 12:15:41 2020 +0100 dmaengine: iop-adma: Function parameter documentation must adhere to correct formatting Also remove superfluous entry. Fixes the following W=1 kernel build warning(s): drivers/dma/iop-adma.c:418: warning: Function parameter or member 'chan' not described in 'iop_adma_alloc_chan_resources' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200714111546.1755231-13-lee.jones@linaro.org Signed-off-by: Vinod Koul commit d0c4a1492810f61e6a982731d06f52917a577876 Author: Lee Jones Date: Tue Jul 14 12:15:40 2020 +0100 dmaengine: imx-sdma: Correct formatting issue and provide 2 new descriptions Fixes the following W=1 kernel build warning(s): drivers/dma/imx-sdma.c:383: warning: Function parameter or member 'slave_config' not described in 'sdma_channel' drivers/dma/imx-sdma.c:383: warning: Function parameter or member 'context_loaded' not described in 'sdma_channel' drivers/dma/imx-sdma.c:383: warning: Function parameter or member 'terminate_worker' not described in 'sdma_channel' Signed-off-by: Lee Jones Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Link: https://lore.kernel.org/r/20200714111546.1755231-12-lee.jones@linaro.org Signed-off-by: Vinod Koul commit 041c4646003e237d2fa0ce625309661d2c3bf2ae Author: Lee Jones Date: Tue Jul 14 12:15:39 2020 +0100 dmaengine: fsl-qdma: Fix 'struct fsl_qdma_format' formatting issue Kerneldoc formatting for attributes should be '@.*: '. Fixes the following W=1 kernel build warning(s): drivers/dma/fsl-qdma.c:154: warning: Function parameter or member 'data' not described in 'fsl_qdma_format' Signed-off-by: Lee Jones Cc: Wen He Cc: Jiaheng Fan Link: https://lore.kernel.org/r/20200714111546.1755231-11-lee.jones@linaro.org Signed-off-by: Vinod Koul commit 023069ba3f440778ec0d7e6158e00ccea61933dc Author: Lee Jones Date: Tue Jul 14 12:15:38 2020 +0100 dmaengine: sun4i-dma: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/dma/sun4i-dma.c:321: warning: Function parameter or member 'priv' not described in '__execute_vchan_pending' drivers/dma/sun4i-dma.c:321: warning: Function parameter or member 'vchan' not described in '__execute_vchan_pending' drivers/dma/sun4i-dma.c:435: warning: Function parameter or member 'chan' not described in 'generate_ndma_promise' drivers/dma/sun4i-dma.c:435: warning: Function parameter or member 'src' not described in 'generate_ndma_promise' drivers/dma/sun4i-dma.c:435: warning: Function parameter or member 'dest' not described in 'generate_ndma_promise' drivers/dma/sun4i-dma.c:435: warning: Function parameter or member 'len' not described in 'generate_ndma_promise' drivers/dma/sun4i-dma.c:435: warning: Function parameter or member 'sconfig' not described in 'generate_ndma_promise' drivers/dma/sun4i-dma.c:435: warning: Function parameter or member 'direction' not described in 'generate_ndma_promise' drivers/dma/sun4i-dma.c:501: warning: Function parameter or member 'chan' not described in 'generate_ddma_promise' drivers/dma/sun4i-dma.c:501: warning: Function parameter or member 'src' not described in 'generate_ddma_promise' drivers/dma/sun4i-dma.c:501: warning: Function parameter or member 'dest' not described in 'generate_ddma_promise' drivers/dma/sun4i-dma.c:501: warning: Function parameter or member 'len' not described in 'generate_ddma_promise' drivers/dma/sun4i-dma.c:501: warning: Function parameter or member 'sconfig' not described in 'generate_ddma_promise' drivers/dma/sun4i-dma.c:577: warning: Function parameter or member 'contract' not described in 'get_next_cyclic_promise' drivers/dma/sun4i-dma.c:596: warning: Function parameter or member 'vd' not described in 'sun4i_dma_free_contract' Signed-off-by: Lee Jones Acked-by: Chen-Yu Tsai Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: "Emilio López" Link: https://lore.kernel.org/r/20200714111546.1755231-10-lee.jones@linaro.org Signed-off-by: Vinod Koul commit 21e3cdb0234f7a687a624ab6d9eb92e19f60f743 Author: Lee Jones Date: Tue Jul 14 12:15:37 2020 +0100 dmaengine: at_hdmac: Repair parameter misspelling and demote non-kerneldoc headers Fixes the following W=1 kernel build warning(s): drivers/dma/at_hdmac.c:666: warning: Function parameter or member 'tx' not described in 'atc_tx_submit' drivers/dma/at_hdmac.c:666: warning: Excess function parameter 'desc' description in 'atc_tx_submit' drivers/dma/at_hdmac.c:1206: warning: Function parameter or member 'reg_width' not described in 'atc_dma_cyclic_check_values' drivers/dma/at_hdmac.c:1206: warning: Function parameter or member 'buf_addr' not described in 'atc_dma_cyclic_check_values' drivers/dma/at_hdmac.c:1206: warning: Function parameter or member 'period_len' not described in 'atc_dma_cyclic_check_values' drivers/dma/at_hdmac.c:1228: warning: Function parameter or member 'chan' not described in 'atc_dma_cyclic_fill_desc' drivers/dma/at_hdmac.c:1228: warning: Function parameter or member 'desc' not described in 'atc_dma_cyclic_fill_desc' drivers/dma/at_hdmac.c:1228: warning: Function parameter or member 'period_index' not described in 'atc_dma_cyclic_fill_desc' drivers/dma/at_hdmac.c:1228: warning: Function parameter or member 'buf_addr' not described in 'atc_dma_cyclic_fill_desc' drivers/dma/at_hdmac.c:1228: warning: Function parameter or member 'reg_width' not described in 'atc_dma_cyclic_fill_desc' drivers/dma/at_hdmac.c:1228: warning: Function parameter or member 'period_len' not described in 'atc_dma_cyclic_fill_desc' drivers/dma/at_hdmac.c:1228: warning: Function parameter or member 'direction' not described in 'atc_dma_cyclic_fill_desc' Signed-off-by: Lee Jones Cc: Ludovic Desroches Cc: Nicolas Ferre Link: https://lore.kernel.org/r/20200714111546.1755231-9-lee.jones@linaro.org Signed-off-by: Vinod Koul commit f15f720b82c45ed4efc6a3353c36f57ae38047ee Author: Lee Jones Date: Tue Jul 14 12:15:36 2020 +0100 dmaengine: altera-msgdma: Fix struct documentation blocks Fix some misspelling/description issues, demote non-kerneldoc header to standard comment block and provide a new description for msgdma_desc_config()'s 'stride' parameter. Fixes the following W=1 kernel build warning(s): drivers/dma/altera-msgdma.c:163: warning: Function parameter or member 'node' not described in 'msgdma_sw_desc' drivers/dma/altera-msgdma.c:163: warning: Function parameter or member 'tx_list' not described in 'msgdma_sw_desc' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'lock' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'dev' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'irq_tasklet' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'pending_list' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'free_list' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'active_list' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'done_list' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'desc_free_cnt' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'idle' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'dmadev' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'dmachan' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'hw_desq' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'sw_desq' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'npendings' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'slave_cfg' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'irq' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'csr' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'desc' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:197: warning: Function parameter or member 'resp' not described in 'msgdma_device' drivers/dma/altera-msgdma.c:265: warning: Function parameter or member 'stride' not described in 'msgdma_desc_config' Signed-off-by: Lee Jones Cc: Stefan Roese Link: https://lore.kernel.org/r/20200714111546.1755231-8-lee.jones@linaro.org Signed-off-by: Vinod Koul commit 0b851134f63bb8bfc42c9babd032d6a800debddb Author: Lee Jones Date: Tue Jul 14 12:15:35 2020 +0100 dmaengine: ste_dma40: Supply 2 missing struct attribute descriptions Fixes the following W=1 kernel build warning(s): drivers/dma/ste_dma40.c:398: warning: Function parameter or member 'dma_addr' not described in 'd40_lcla_pool' drivers/dma/ste_dma40.c:601: warning: Function parameter or member 'dma_parms' not described in 'd40_base' Signed-off-by: Lee Jones Cc: Per Forlin Cc: Jonas Aaberg Link: https://lore.kernel.org/r/20200714111546.1755231-7-lee.jones@linaro.org Signed-off-by: Vinod Koul commit f9e036df575d8efce6fd469acd9df3148c2adf6e Author: Lee Jones Date: Tue Jul 14 12:15:34 2020 +0100 dmaengine: pl330: Demote obvious misuse of kerneldoc to standard comment block No 'struct' title is provided. Nor are any attribute descriptions. Fixes the following W=1 kernel build warning(s): drivers/dma/pl330.c:295: warning: cannot understand function prototype: 'struct pl330_reqcfg ' Signed-off-by: Lee Jones Cc: Philipp Zabel Cc: Jaswinder Singh Link: https://lore.kernel.org/r/20200714111546.1755231-6-lee.jones@linaro.org Signed-off-by: Vinod Koul commit 6cfb8321cfb5a50a2a9a0bbcf61a1bb55f13ace8 Author: Lee Jones Date: Tue Jul 14 12:15:33 2020 +0100 dmaengine: mmp_pdma: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/dma/mmp_pdma.c:298: warning: Function parameter or member 'chan' not described in 'start_pending_queue' drivers/dma/mmp_pdma.c:393: warning: Function parameter or member 'dchan' not described in 'mmp_pdma_alloc_chan_resources' drivers/dma/mmp_pdma.c:862: warning: Function parameter or member 'dchan' not described in 'mmp_pdma_issue_pending' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200714111546.1755231-5-lee.jones@linaro.org Signed-off-by: Vinod Koul commit ae70f785e5c9711dd4fdbd185ea81711c659a7e5 Author: Lee Jones Date: Tue Jul 14 12:15:32 2020 +0100 dmaengine: ep93xx_dma: Provide some missing struct attribute documentation A couple of entries were missed, causing kerneldoc to complain. Fixes the following W=1 kernel build warning(s): drivers/dma/ep93xx_dma.c:183: warning: Function parameter or member 'slave_config' not described in 'ep93xx_dma_chan' drivers/dma/ep93xx_dma.c:215: warning: Function parameter or member 'hw_synchronize' not described in 'ep93xx_dma_engine' Signed-off-by: Lee Jones Cc: Lennert Buytenhek Cc: Ryan Mallon Cc: Mika Westerberg Link: https://lore.kernel.org/r/20200714111546.1755231-4-lee.jones@linaro.org Signed-off-by: Vinod Koul commit 7d8c91487f77c024ff4309d1dff66232ed6a07c5 Author: Lee Jones Date: Tue Jul 14 12:15:31 2020 +0100 dmaengine: of-dma: Fix misspellings/formatting issues in some function headers Fixes the following W=1 kernel build warning(s): drivers/dma/of-dma.c:57: warning: Function parameter or member 'ofdma' not described in 'of_dma_router_xlate' drivers/dma/of-dma.c:57: warning: Excess function parameter 'of_dma' description in 'of_dma_router_xlate' drivers/dma/of-dma.c:107: warning: Function parameter or member 'data' not described in 'of_dma_controller_register' drivers/dma/of-dma.c:308: warning: Function parameter or member 'ofdma' not described in 'of_dma_simple_xlate' drivers/dma/of-dma.c:308: warning: Excess function parameter 'of_dma' description in 'of_dma_simple_xlate' drivers/dma/of-dma.c:338: warning: Function parameter or member 'ofdma' not described in 'of_dma_xlate_by_chan_id' drivers/dma/of-dma.c:338: warning: Excess function parameter 'of_dma' description in 'of_dma_xlate_by_chan_id' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200714111546.1755231-3-lee.jones@linaro.org Signed-off-by: Vinod Koul commit f4c20f084d4007017c9606f47e2c454916b1baec Author: Lee Jones Date: Tue Jul 14 12:15:30 2020 +0100 dmaengine: mediatek: mtk-hsdma: Fix formatting in 'struct mtk_hsdma_pdesc' doc block Struct attribute names must be an exact match or the kerneldoc checker gets confused. Fixes the following W=1 kernel build warning(s): drivers/dma/mediatek/mtk-hsdma.c:120: warning: Function parameter or member 'desc1' not described in 'mtk_hsdma_pdesc' drivers/dma/mediatek/mtk-hsdma.c:120: warning: Function parameter or member 'desc2' not described in 'mtk_hsdma_pdesc' drivers/dma/mediatek/mtk-hsdma.c:120: warning: Function parameter or member 'desc3' not described in 'mtk_hsdma_pdesc' drivers/dma/mediatek/mtk-hsdma.c:120: warning: Function parameter or member 'desc4' not described in 'mtk_hsdma_pdesc' Signed-off-by: Lee Jones Cc: Sean Wang Cc: Matthias Brugger Cc: linux-mediatek@lists.infradead.org Link: https://lore.kernel.org/r/20200714111546.1755231-2-lee.jones@linaro.org Signed-off-by: Vinod Koul commit 62a30a292a8283b3022b602964ff7484d5824841 Author: Alexandru Ardelean Date: Wed Jul 15 07:16:29 2020 +0300 iio: buffer: fix attach/detach pollfunc order The original patch was error-ed by the submitter (me) and not by the author (Lars). After looking through the discussion logs (on email), it seems that this order was wrong for the start, even though the order implemented in the drivers was correct. Discussions: - first RFC: https://lore.kernel.org/linux-iio/20180622135322.3459-1-alexandru.ardelean@analog.com/ - 2nd patch: https://lore.kernel.org/linux-iio/20181219140912.22582-1-alexandru.ardelean@analog.com/ - final patch-sets: https://lore.kernel.org/linux-iio/20200522104632.517470-1-alexandru.ardelean@analog.com/ https://lore.kernel.org/linux-iio/20200525113855.178821-1-alexandru.ardelean@analog.com/ The last one was applied. The idea is that pollfunc should be attached before calling the 'indio_dev->setup_ops->postenable' hook and should be detached after calling the 'indio_dev->setup_ops->predisable' hook. While the drivers were updated to take this into account, the change to the IIO core was somehow omitted and was made wrong. This change fixes the order to the proper form. Fixes f11d59d87b862: ("iio: Move attach/detach of the poll func to the core") Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 947fcfeac3295ff0961bb50803e0c4ae63cff65b Author: Randy Dunlap Date: Tue Jul 14 22:23:49 2020 -0700 drm: drm_rect.h: delete duplicated word in comment Drop doubled word "the" in a comment. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200715052349.23319-7-rdunlap@infradead.org commit afae47af0cb73e36d61b61c8d93cb9d755853050 Author: Randy Dunlap Date: Tue Jul 14 22:23:48 2020 -0700 drm: msm_drm.h: delete duplicated words in comments Drop the doubled word "to" in comments. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200715052349.23319-6-rdunlap@infradead.org commit 66137f54ccd7eb7510e86a8bec59aab313350794 Author: Randy Dunlap Date: Tue Jul 14 22:23:47 2020 -0700 drm: i915_drm.h: delete duplicated words in comments Drop doubled words "the" and "be" in comments. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200715052349.23319-5-rdunlap@infradead.org commit b9f3cfa2788b419d50bb3651da8d3db51be7b71b Author: Randy Dunlap Date: Tue Jul 14 22:23:46 2020 -0700 drm: drm_mode_config.h: delete duplicated words in comments Drop doubled word "is" in several comments. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200715052349.23319-4-rdunlap@infradead.org commit f621f3bb33af0f92b58a2e5987f897e4f74ad028 Author: Randy Dunlap Date: Tue Jul 14 22:23:45 2020 -0700 drm: drm_gem.h: delete duplicated words in comments Drop the doubled words "the" and "by" in comments. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200715052349.23319-3-rdunlap@infradead.org commit 19d97fd66b4389496a4780fbb618a53b7b751b0e Author: Randy Dunlap Date: Tue Jul 14 22:23:44 2020 -0700 drm: drm_bridge.h: delete duplicated word in comment Drop doubled word "should" in a comment. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200715052349.23319-2-rdunlap@infradead.org commit 09f3344a5df95f341fe3cd542f6f981dc0a34caf Author: Randy Dunlap Date: Tue Jul 14 22:23:43 2020 -0700 drm: drm_atomic.h: delete duplicated word in comment Drop doubled word "than" in a comment. Signed-off-by: Randy Dunlap Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200715052349.23319-1-rdunlap@infradead.org commit e57bd05ec0d2d82d63725dedf9f5a063f879de25 Author: Jani Nikula Date: Wed Jul 15 14:18:02 2020 +0300 drm/i915: Update DRIVER_DATE to 20200715 Signed-off-by: Jani Nikula commit b28bd97c1c191ade3736b33f2b24e5b288b90ab4 Author: Xu Wang Date: Thu Jul 2 01:57:01 2020 +0000 airo: use set_current_state macro Use set_current_state macro instead of current->state = TASK_RUNNING. Signed-off-by: Xu Wang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200702015701.8606-1-vulab@iscas.ac.cn commit 09b4db279758dd3d5bb235605e985b99e7bc1a93 Author: Lad Prabhakar Date: Mon Jul 13 22:35:15 2020 +0100 dt-bindings: dma: renesas,rcar-dmac: Document R8A774E1 bindings Renesas RZ/G2H (R8A774E1) SoC also has the R-Car gen3 compatible DMA controllers, therefore document RZ/G2H specific bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1594676120-5862-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit ddfa943f246a668ed68e8dc688acf17c4540062a Author: Colin Ian King Date: Wed Jul 1 14:52:21 2020 +0100 iwlegacy: remove redundant initialization of variable tid The variable tid is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200701135221.549700-1-colin.king@canonical.com commit 77b4ad07699fba9f899b4f4fa17c62326e54e8bc Author: Vaibhav Gupta Date: Mon Jun 29 12:55:25 2020 +0530 ipw2200: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. The driver was invoking PCI helper functions like pci_save/restore_state(), pci_enable/disable_device() and pci_set_power_state(), which is not recommended. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200629072525.156154-3-vaibhavgupta40@gmail.com commit 814db61adb8676939335e39446f653cd354ea538 Author: Vaibhav Gupta Date: Mon Jun 29 12:55:24 2020 +0530 ipw2100: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. The driver was invoking PCI helper functions like pci_save/restore_state(), pci_enable/disable_device() and pci_set_power_state(), which is not recommended. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200629072525.156154-2-vaibhavgupta40@gmail.com commit 04bceecdf1e893cd825cd6b2fe788e414a8b18cd Author: Vaibhav Gupta Date: Mon Jun 29 09:20:32 2020 +0530 adm8211: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. In the case of adm8211, after removing PCI helper functions, .suspend() and .resume() became empty-body functions. Hence, define them NULL and use dev_pm_ops. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200629035031.169670-1-vaibhavgupta40@gmail.com commit c689a62b6712475dccee852a5214896014a945a0 Author: Vaibhav Gupta Date: Wed Jun 24 23:10:49 2020 +0530 orinoco: use generic power management With the support of generic PM callbacks, drivers no longer need to use legacy .suspend() and .resume() in which they had to maintain PCI states changes and device's power state themselves. The required operations are done by PCI core. PCI drivers are not expected to invoke PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), pci_set_power_state(), etc. Their tasks are completed by PCI core itself. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200624174048.64754-1-vaibhavgupta40@gmail.com commit ef6425107ccceabf2743e7c848d174a4d51808ab Author: Vaibhav Gupta Date: Tue Jun 23 15:14:55 2020 +0530 rtl818x_pci: use generic power management Earlier, drivers had to manage the device's power states, and related operations, themselves. With the generic approach, these are done by PCI core. The only driver-specific jobs, .suspend() and .resume() doing were invoking PCI helper functions pci_save/restore_state() and pci_set_power_state(). This is not recommeneded as PCI core takes care of that. Hence they became empty-body functions, thus define them NULL. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200623094454.12427-1-vaibhavgupta40@gmail.com commit a7f7c15e945a24fbb8ff99d3b19ab0dcd764030d Author: Reto Schneider Date: Mon Jun 22 15:21:13 2020 +0200 rtlwifi: rtl8192cu: Free ieee80211_hw if probing fails In case of an error, no one will use the allocated structure. Call ieee80211_free_hw, same as in rtl_usb_disconnect. Signed-off-by: Reto Schneider Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200622132113.14508-4-code@reto-schneider.ch commit 03128643eb5453a798db5770952c73dc64fcaf00 Author: Reto Schneider Date: Mon Jun 22 15:21:12 2020 +0200 rtlwifi: rtl8192cu: Prevent leaking urb If usb_submit_urb fails the allocated urb should be unanchored and released. Signed-off-by: Reto Schneider Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200622132113.14508-3-code@reto-schneider.ch commit ec89032cd148f8805c5adf5d38f1f382036f5a5c Author: Reto Schneider Date: Mon Jun 22 15:21:11 2020 +0200 rtlwifi: rtl8192cu: Fix deadlock Prevent code from calling itself indirectly, causing the driver to hang and consume 100% CPU. Without this fix, the following script can bring down a single CPU system: ``` while true; do rmmod rtl8192cu modprobe rtl8192cu done ``` Signed-off-by: Reto Schneider ACKed-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200622132113.14508-2-code@reto-schneider.ch commit f8279dad4e36c1e8fcdb54114306eca879275e30 Author: Kees Cook Date: Fri Jun 19 20:29:56 2020 -0700 rtlwifi: rtl8192cu: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just initialize this variable to NULL, and avoid sending garbage by returning. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: dc0313f46664 ("rtlwifi: rtl8192cu: Add routine hw") Reviewed-by: Nick Desaulniers Acked-by: Kalle Valo Signed-off-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200620033007.1444705-6-keescook@chromium.org commit 800e7a205a0f5061d7818eb26a53b65548139fed Author: Kees Cook Date: Fri Jun 19 20:29:55 2020 -0700 b43: Remove uninitialized_var() usage Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As a precursor to removing[2] this[3] macro[4], just initialize this variable to NULL. No later NULL deref is possible due to the early returns outside of the (phy->rev >= 7 && phy->rev < 19) case, which explicitly tests for NULL. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Fixes: 58619b14d106 ("b43: move under broadcom vendor directory") Signed-off-by: Kees Cook Reviewed-by: Nick Desaulniers Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200620033007.1444705-5-keescook@chromium.org commit ad806454c3cb5cf0b28ebcfaedfaa3ad4bb4a65a Author: Flavio Suligoi Date: Fri Jun 19 11:31:02 2020 +0200 orinoco_usb: fix spelling mistake Fix typo: "EZUSB_REQUEST_TRIGER" --> "EZUSB_REQUEST_TRIGGER" Signed-off-by: Flavio Suligoi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200619093102.29487-1-f.suligoi@asem.it commit 97794e638cf53fd92413a30657968f24c9f74306 Author: Larry Finger Date: Wed Jun 3 19:57:33 2020 -0500 rtlwifi: rtl8188ee: Fix endian issue Sparse reports the following issue: CHECK drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c:500:26: warning: incorrect type in initializer (different base types) drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c:500:26: expected restricted __le32 [usertype] *pdesc drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c:500:26: got unsigned int [usertype] * Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200604005733.7905-3-Larry.Finger@lwfinger.net commit 0df9edb37f3c1479e060d4aca73000afe5fe69d4 Author: Larry Finger Date: Wed Jun 3 19:57:32 2020 -0500 rtlwifi: Fix endian issue in ps.c Sparse reports the following endian issues: CHECK drivers/net/wireless/realtek/rtlwifi/ps.c drivers/net/wireless/realtek/rtlwifi/ps.c:772:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:772:42: warning: cast to restricted __le32 drivers/net/wireless/realtek/rtlwifi/ps.c:775:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:775:42: warning: cast to restricted __le32 drivers/net/wireless/realtek/rtlwifi/ps.c:778:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:778:42: warning: cast to restricted __le32 drivers/net/wireless/realtek/rtlwifi/ps.c:867:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:867:42: warning: cast to restricted __le32 drivers/net/wireless/realtek/rtlwifi/ps.c:870:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:870:42: warning: cast to restricted __le32 drivers/net/wireless/realtek/rtlwifi/ps.c:873:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:873:42: warning: cast to restricted __le32 Signed-off-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200604005733.7905-2-Larry.Finger@lwfinger.net commit 8bd4147c4b1719a606a5525d6ddd2a8f9b39cd54 Author: Flavio Suligoi Date: Fri Jun 5 17:41:08 2020 +0200 broadcom: fix wiki website url In some b43 files, the wiki url is still the old "wireless.kernel.org" instead of the new "wireless.wiki.kernel.org" Signed-off-by: Flavio Suligoi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200605154112.16277-6-f.suligoi@asem.it commit eb17a4f9acf1348bb81aa6cbe8ed1a9321c22015 Author: Flavio Suligoi Date: Fri Jun 5 17:41:07 2020 +0200 atmel: fix wiki website url In at76c50x-usb.c the wiki url is still the old "wireless.kernel.org" instead of the new "wireless.wiki.kernel.org" Signed-off-by: Flavio Suligoi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200605154112.16277-5-f.suligoi@asem.it commit 0ef2c2d1a9d09aaaf91b1732c07f096ee60178b7 Author: Flavio Suligoi Date: Fri Jun 5 17:41:05 2020 +0200 wireless: fix wiki website url in main Kconfig The wiki url is still the old "wireless.kernel.org" instead of the new "wireless.wiki.kernel.org" Signed-off-by: Flavio Suligoi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200605154112.16277-3-f.suligoi@asem.it commit 6abe66ec23d315aa1e8e1b65a7848c3eb07dc351 Author: Alexander A. Klimov Date: Tue Jul 14 21:07:21 2020 +0200 platform/x86: apple-gmux: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Andy Shevchenko commit 97ace1b41e4a4aa3ece129af93d3ee41860ac763 Author: Thierry Reding Date: Wed Jul 15 11:50:17 2020 +0200 arm64: tegra: Add clocks and resets for ISP on Tegra210 The ISP blocks take a clock and a reset as inputs, so add those to the device tree nodes. Signed-off-by: Thierry Reding commit e989992a41f9fd0d9bfe6f939d548584372f8046 Author: Thierry Reding Date: Wed Jul 15 11:49:10 2020 +0200 arm64: tegra: Fix compatible string for DPAUX on Tegra210 The Tegra210 DPAUX controller is not compatible with that found on Tegra124, so it must have a separate compatible string. Signed-off-by: Thierry Reding commit 997a3b73c5a1a2093b9ccdbdea7630a8702388fa Author: Thierry Reding Date: Wed Jul 15 11:48:44 2020 +0200 arm64: tegra: Add i2c-bus subnode for DPAUX controllers The DPAUX controller device tree bindings require the bus to have an i2c-bus subnode to distinguish between I2C clients and pinmux groups. Signed-off-by: Thierry Reding commit bd26938b409f50553b7c8d65bf2cc297d731d55f Author: Thierry Reding Date: Thu Jun 25 13:38:59 2020 +0200 ARM: tegra: Add HDMI supplies on Nyan boards The SOR controller needs the AVDD I/O and VDD HDMI PLL supplies in order to operate correctly. Make sure to specify them for Nyan boards. Signed-off-by: Thierry Reding commit 7ee1e9feff08211c8e566a6ffac4e1af4ee529bf Author: Thierry Reding Date: Wed Jul 15 11:47:43 2020 +0200 ARM: tegra: Add missing DSI controller on Tegra30 Tegra30 has a DSI controller, although it is never used on any of the devices supported by the upstream Linux kernel. Signed-off-by: Thierry Reding commit cb26dc7ba8e77cd0af543d76679b5d5d2c819179 Author: Thierry Reding Date: Wed Jul 15 11:46:05 2020 +0200 ARM: tegra: Add i2c-bus subnode for DPAUX controllers The DPAUX controller device tree bindings require the bus to have an i2c-bus subnode to distinguish between I2C clients and pinmux groups. Signed-off-by: Thierry Reding commit 46c019239fb263922d2881847dd6b614c814d867 Author: Thierry Reding Date: Fri Jun 12 10:59:00 2020 +0200 memory: tegra: Add Tegra132 compatible string match Ensure that the driver will bind against the Tegra132 instantiation of the external memory controller. While the two are roughly the same from a capability perspective, they do require some incompatible changes to the programming sequences and therefore need separate compatible strings. Signed-off-by: Thierry Reding commit 9256686898881b0694fe6af2c3283b69677838de Author: Pierre-Louis Bossart Date: Wed Jul 15 05:37:44 2020 +0800 soundwire: sdw.h: fix indentation Not sure how this went undetected for years. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200714213744.24674-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit a8209dd42a60dca0fd15bc73d19fc4009e704c17 Author: Pierre-Louis Bossart Date: Wed Jul 15 05:37:43 2020 +0800 soundwire: sdw.h: fix PRBS/Static_1 swapped definitions Table 110 "Port Data Modes" of the SoundWire 1.2 specification lists PRBS as b01 and Static_1 as b11. The existing headers swapped the two values, fix. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200714213744.24674-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit f560cd502190a9fd0ca8db0a15c5cca7d9091d2c Author: Florian Eckert Date: Mon Jul 13 10:50:10 2020 +0200 platform/x86: pcengines-apuv2: revert wiring up simswitch GPIO as LED This reverts commit 5037d4ddda31c2dbbb018109655f61054b1756dc. Explanation why this does not work: This change connects the simswap to the LED subsystem of the kernel. From my point of view, it's nonsense. If we do it this way, then this can be switched relatively easily via the LED subsystem (trigger: none/default-on) and that is dangerous! If this is used, it would be unfavorable, since there is also another trigger (trigger: heartbeat/netdev). Therefore, this simswap GPIO should remain in the GPIO subsystem and be switched via it and not be connected to the LED subsystem. To avoid the problems mentioned above. The LED subsystem is not made for this and it is not a good compromise, but rather dangerous. Signed-off-by: Florian Eckert Signed-off-by: Andy Shevchenko commit f9e1104367c57f2e03a6b5e6e9637fa2b9ff5627 Author: Vadim Pasternak Date: Tue Jul 14 15:02:03 2020 +0300 platform/x86: mlx-platform: Extend FAN platform data description Extend FAN platform data with register presence field. Add register present entry per rotor (tachometer) description tuple. The purpose is to allow indication of FAN presence. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 17727a3b4879324818ea6f2ebc3f68432173ce24 Author: Vadim Pasternak Date: Tue Jul 14 15:02:02 2020 +0300 platform_data/mlxreg: Add presence register field for FAN devices Add new field 'reg_prsnt' to the structure 'mlxreg_core_data' to provide the number FAN drawers equpped within the system. The purpose is to allow mapping between FAN drawers and FAN rotors (tachometer), since FAN drawer can be eqipped with a few rotors. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit f6fae31e590fdbd60efe7f5ae6e4bfb45ad42e24 Author: Vadim Pasternak Date: Tue Jul 14 15:02:01 2020 +0300 Documentation/ABI: Add new attribute for mlxreg-io sysfs interfaces Add documentation for the new attributes for exposing CPLDs part numbers and CPLD minor versions. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 86148190a7db14e1e9ad638eb1ccc13cd3693e91 Author: Vadim Pasternak Date: Tue Jul 14 15:02:00 2020 +0300 platform/mellanox: mlxreg-io: Add support for complex attributes Add support for attributes composed from few registers. Such attributes could occupy from 2 to 4 sequential registers. For word size register space complex attributes can occupy up to two registers, for byte size - up to four. These attributes can carry, for example, CPLD or FPGA versioning, power consuming info, etcetera. Such registers contain read-only data. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit ae1aabf44bd672a07c4fa3ef56f069ed7daa7823 Author: Vadim Pasternak Date: Tue Jul 14 15:01:59 2020 +0300 platform/x86: mlx-platform: Add more definitions for system attributes Add new attributes for the all type systems specifying for each equipped CPLD device, the CPLD part number and the CPLD minor version of the device: 'cpld{n}_pn' and 'cpld{n}_version_min'. This information is to be used for mathcing the current CPLD image and for making decision if image upgrade is required for CPLD device. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 13e52e63a4462e2bd0ef249fb535a599ea158725 Author: Vadim Pasternak Date: Tue Jul 14 15:01:58 2020 +0300 platform_data/mlxreg: Add support for complex attributes Add new field 'regnum' to the structure 'mlxreg_core_data' to specify the number of registers occupied by multi-register attribute. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 92d020f97966b1724cfcac93e89176d0eb3aca61 Author: Vadim Pasternak Date: Tue Jul 14 15:01:57 2020 +0300 platform/mellanox: mlxreg-hotplug: Add environmental data to uevent Send "udev" event with environmental data in order to allow handling "ENV{}" variables in "udev" rules. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 0a43f7be57edbe9fac6084a6f92694a3badee827 Author: Vadim Pasternak Date: Tue Jul 14 15:01:56 2020 +0300 platform/mellanox: mlxreg-hotplug: Use capability register for attribute creation Create the 'sysfs' attributes according to configuration provided through the capability register, which purpose is to indicate the actual number of the components within the particular group. Such components could be, for example the FAN or power supply units. The motivation is to avoid adding a new code in the future in order to distinct between the systems types supporting a different number of the components like power supplies, FANs, ASICs, line cards. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 5272d4e9c0946037862452b07887ebc81d82591c Author: Vadim Pasternak Date: Tue Jul 14 15:01:55 2020 +0300 platform/mellanox: mlxreg-hotplug: Modify module license Change module license to 'SPDX'. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 1e0f548b2af221160dd2d0da33a9a1442337659b Author: Vadim Pasternak Date: Tue Jul 14 15:01:54 2020 +0300 lib/test-string_helpers.c: Add string_upper() and string_lower() tests Add few of simple tests for string_upper() and string_lower() helpers. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 58eeba0bdb52afe5c18ce2a760ca9fe2901943e9 Author: Vadim Pasternak Date: Tue Jul 14 15:01:53 2020 +0300 lib/string_helpers: Introduce string_upper() and string_lower() helpers Provide the helpers for string conversions to upper and lower cases. Signed-off-by: Vadim Pasternak Signed-off-by: Andy Shevchenko commit 19206a1edc518e6f39ae2307598afe20ae74ae6b Author: Alexander A. Klimov Date: Mon Jul 13 21:06:28 2020 +0200 platform/x86: thinkpad_acpi: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Andy Shevchenko commit 46713aeee154205fc0285b0d9ac78cb4bdf246a7 Author: Aaron Ma Date: Fri Jul 10 09:56:14 2020 +0800 platform/x86: thinkpad_acpi: not loading brightness_init when _BCL invalid When _BCL invalid, disable thinkpad_acpi backlight brightness control. brightness_enable is already checked at the beginning. Most new thinkpads are using GPU driver to control brightness now, print notice when enabled brightness control even when brightness_enable = 1. Signed-off-by: Aaron Ma Signed-off-by: Andy Shevchenko commit acf7f4a59114471c3964f118564fe8e7a6f34bb8 Author: Mark Pearson Date: Thu Jul 2 21:23:53 2020 -0400 platform/x86: thinkpad_acpi: lap or desk mode interface Newer Lenovo Thinkpad platforms have support to identify whether the system is on-lap or not using an ACPI DYTC event from the firmware. This patch provides the ability to retrieve the current mode via sysfs entrypoints and will be used by userspace for thermal mode and WWAN functionality Co-developed-by: Nitin Joshi Signed-off-by: Nitin Joshi Reviewed-by: Sugumaran Reviewed-by: Bastien Nocera Signed-off-by: Mark Pearson Signed-off-by: Andy Shevchenko commit df11f6c516cdeb98624f4189ab4e00aeeaaaafe6 Author: Andy Shevchenko Date: Wed Jul 15 12:40:07 2020 +0300 platform/x86: thinkpad_acpi: Revert "Use strndup_user() in dispatch_proc_write()" This reverts commit 35d13c7a05126a5a54a1ef40aff4c6984474e604. This broke procfs interface due to neglecting the fact that the strings are not coming NULL terminated. Revert the change till we will have a better clean up. Fixes: 35d13c7a0512 ("platform/x86: thinkpad_acpi: Use strndup_user() in dispatch_proc_write()") Reported-by: Hans de Goede Signed-off-by: Andy Shevchenko commit 2a19abb006292d741e670ea6be804c3a575676ce Author: Chris Wilson Date: Tue Jul 14 12:44:19 2020 +0100 drm/i915/gt: Assert the kernel context is using the HWSP We need to ensure that the kernel context is using the permanently pinned HWSP so that we can always submit a pm request from any context. By construction, the engine->kernel_context should only be using the engine->status_page.vma so let's assert that is still true when we have to submit a request for parking the engine. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200714114419.28713-1-chris@chris-wilson.co.uk commit d45171ac186d0d264f6f3b5c345d5f855db8c8aa Author: Chris Wilson Date: Tue Jul 14 14:50:02 2020 +0100 drm/i915/gt: Trace placement of timeline HWSP Track the position of the HWSP for each timeline. References: https://gitlab.freedesktop.org/drm/intel/-/issues/2169 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200714135002.17508-1-chris@chris-wilson.co.uk commit 3e6761fd2a3a9a0a13ec16f25897d3dde6414497 Author: YueHaibing Date: Wed Jul 15 11:21:04 2020 +0800 drm/i915: Remove unused inline function drain_delayed_work() It is not used since commit 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats") Signed-off-by: YueHaibing Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200715032104.32052-1-yuehaibing@huawei.com commit 001a3c902f6f79d23495f70db856465728edbb5b Author: Zong-Zhe Yang Date: Wed Jul 15 10:33:24 2020 +0800 rtw88: coex: Fix ACL Tx pause during BT inquiry/page. Add a set of logic with corresponding coexistence parameters to handle the situation under BT inquiry/page. We will set PSTDMA while WL-Busy + BT inquiry/page to separate WL/BT slots. PSTDMA can protect WL data rate and BT performance. If WL-Busy + BT inquiry/page and there was BT device paired, We will set the mechanism to 4Slot PSTDMA. In 4Slot PSTDMA, the paired devices can perform more smoothly and prevent some issues trigger from insufficient data. And to avoid A2DP glitch or disconnection, we will adjust ACL data priority higher than inquiry/page. In addition, we found sometimes BT inquiry/page still working last for seconds after BT had notified inquiry/page finished. It will lead to A2DP glitch cause of ACL data, inquiry/page priority toggled. To fix the corner, we add a timer to remain the inquiry/page status. And we found WL busy/idle threshold is too sensitive, it will keep switching in some weak network environment and coexistence mechanism will switch between TDMA and PSTDMA. The very frequently switching may destroyed not only the handshake with AP, but BT performance. And it will trigger some unexpected error. To prevent the frequently switching, we add a timer to delay the status change while WL busy switch to idle. Signed-off-by: Zong-Zhe Yang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200715023324.8600-1-yhchuang@realtek.com commit e18696786548244914f36ec3c46ac99c53df99c3 Author: Dan Carpenter Date: Wed Jul 8 14:58:57 2020 +0300 mwifiex: Prevent memory corruption handling keys The length of the key comes from the network and it's a 16 bit number. It needs to be capped to prevent a buffer overflow. Fixes: 5e6e3a92b9a4 ("wireless: mwifiex: initial commit for Marvell mwifiex driver") Signed-off-by: Dan Carpenter Acked-by: Ganapathi Bhat Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200708115857.GA13729@mwanda commit 9187f4e840929161be957fc0be28c51e964f9824 Author: Pali Rohár Date: Fri Jul 3 13:21:51 2020 +0200 mwifiex: Fix reporting 'operation not supported' error code ENOTSUPP (double PP) is internal linux kernel code 524 available only in kernel include file linux/errno.h and not exported to userspace. EOPNOTSUPP (OP; double PP) is standard code 95 for reporting 'operation not supported' available via kernel include file uapi/asm-generic/errno.h. ENOTSUP (single P) is alias for EOPNOTSUPP defined only in userspace include file bits/errno.h and not available in kernel. Because Linux kernel does not support ENOTSUP (single P) and because userspace does not support ENOTSUPP (double PP), report error code for 'operation not supported' via EOPNOTSUPP macro. This patch fixes problem that mwifiex kernel driver sends to userspace unsupported error codes like: "failed: -524 (No error information)". After applying this patch userspace see: "failed: -95 (Not supported)". Signed-off-by: Pali Rohár Acked-by: Ganapathi Bhat Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200703112151.18917-1-pali@kernel.org commit 2c3601e6a3401ac14e3f581aa3acef4ff1e1b754 Author: Tony Lindgren Date: Thu Jul 2 09:29:51 2020 -0700 wlcore: Remove pointless spinlock No need to take a spinlock here for bitops. Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200702162951.45392-5-tony@atomide.com commit 35fba0f0fd762a8b87d403ae3c723e0061c4aa25 Author: Tony Lindgren Date: Thu Jul 2 09:29:50 2020 -0700 wlcore: Use spin_trylock in wlcore_irq() to see if we need to queue tx We currently have a collection of flags and locking between the threaded irq and tx work: - wl->flags bitops - wl->mutex - wl->wl_lock spinlock The bitops flags do not need a spinlock around them, and we only need the spinlock to see if we need to queue tx work or not. And wlcore_irq() holds the mutex. To simplify the locking, we can use spin_trylock and always queue tx work unless we know there's nothing to do. Let's also update the comment a bit while at it. Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200702162951.45392-4-tony@atomide.com commit f0325e38ab39c2e270770b72c79795772ac3b49e Author: Tony Lindgren Date: Thu Jul 2 09:29:49 2020 -0700 wlcore: Use spin_trylock in wlcore_irq_locked() for running the queue We currently have a collection of flags and locking between the threaded irq and tx work: - wl->flags bitops - wl->mutex - wl->wl_lock spinlock The bitops flags do not need a spinlock around them, and wlcore_irq() already holds the mutex calling wlcore_irq_locked(). And we only need the spinlock to see if we need to run the queue or not. To simplify the locking, we can use spin_trylock and always run the tx queue unless we know there's nothing to do. Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200702162951.45392-3-tony@atomide.com commit eb215c33f308cefe6d3691ffac27f9f498280811 Author: Tony Lindgren Date: Thu Jul 2 09:29:48 2020 -0700 wlcore: Simplify runtime resume ELP path We can simplify the runtime resume ELP path by always setting and clearing the completion in runtime resume. This way we can test for WL1271_FLAG_IRQ_RUNNING after the resume write to see if we need completion at all. And in wlcore_irq(), we need to take spinlock for running the completion and for the pm_wakeup_event(). Spinlock is not needed around the bitops flags check for WL1271_FLAG_SUSPENDED so the spinlocked sections get shorter. Signed-off-by: Tony Lindgren Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200702162951.45392-2-tony@atomide.com commit 0ef0ace3e8e7d7be6dd7de2617ef3590170a3392 Author: Pali Rohár Date: Fri Jun 26 17:29:38 2020 +0200 mwifiex: Use macro MWIFIEX_MAX_BSS_NUM for specifying limit of interfaces This macro is already used in mwifiex driver for specifying upper limit and is defined to value 3. So use it also in struct ieee80211_iface_limit. Signed-off-by: Pali Rohár Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200626152938.12737-1-pali@kernel.org commit 84c2e47aeb16c376ce2e4e81addbe4b1186129a9 Author: Yan-Hsuan Chuang Date: Tue Jun 23 15:20:14 2020 +0800 rtw88: 8822c: add new RFE type 6 A new RFE type 6 of RTL8822CE is released, add it in the RFE type definition. Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200623072014.31631-1-yhchuang@realtek.com commit 7d428b1c9ffc9ddcdd64c6955836bbb17a233ef3 Author: Aaron Ma Date: Fri Jun 12 16:27:45 2020 +0800 rtw88: 8822ce: add support for device ID 0xc82f New device ID 0xc82f found on Lenovo ThinkCenter. Tested it with c822 driver, works good. PCI id: 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:c82f] Subsystem: Lenovo Device [17aa:c02f] Signed-off-by: Aaron Ma Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200612082745.204400-1-aaron.ma@canonical.com commit 68aa716b7dd36f55e080da9e27bc594346334c41 Author: Yan-Hsuan Chuang Date: Fri Jun 5 15:47:03 2020 +0800 rtw88: pci: disable aspm for platform inter-op with module parameter Some platforms cannot read the DBI register successfully for the ASPM settings. After the read failed, the bus could be unstable, and the device just became unavailable [1]. For those platforms, the ASPM should be disabled. But as the ASPM can help the driver to save the power consumption in power save mode, the ASPM is still needed. So, add a module parameter for them to disable it, then the device can still work, while others can benefit from the less power consumption that brings by ASPM enabled. [1] https://bugzilla.kernel.org/show_bug.cgi?id=206411 [2] Note that my lenovo T430 is the same. Fixes: 3dff7c6e3749 ("rtw88: allows to enable/disable HCI link PS mechanism") Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200605074703.32726-1-yhchuang@realtek.com commit f745eb9ca5bf823bc5c0f82a434cefb41c57844e Author: Tzu-En Huang Date: Wed Jun 3 17:42:18 2020 +0800 rtw88: 8821c: Add 8821CE to Kconfig and Makefile Since 8821C code is ready, we can build it. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603094218.19942-6-yhchuang@realtek.com commit d47e7371b23a0401cf284181e83a1819e9b22623 Author: Tzu-En Huang Date: Wed Jun 3 17:42:17 2020 +0800 rtw88: single rf path chips don't support TX STBC Since single rf path chips don't support TX SPBC, tell mac80211 to not advertise it. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603094218.19942-5-yhchuang@realtek.com commit 5f4eab883c6a0abd9e071ba3ebe0c03043ceda7c Author: Tzu-En Huang Date: Wed Jun 3 17:42:16 2020 +0800 rtw88: 8821c: add beamformee support Beamforming is used for directional signal transmission/reception. Beamformee plays the role for signal reception, and makes the RX performance better in middle distance range. Implement beamformee related callbacks for 8821c. Since 8821c only support 1ss rate, nc_index in beamformee setting needs to be adjusted based on the capability. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603094218.19942-4-yhchuang@realtek.com commit 3a4312828ce13e1645fd3af76e4314a2623b3361 Author: Tzu-En Huang Date: Wed Jun 3 17:42:15 2020 +0800 rtw88: 8821c: add power tracking The TX power requires to be adjusted based on the thermal value. The actual power will decrease if the thermal value raised, and will increase if the thermal value lowered. Driver comapres the thermal value, as moving averages. If it changes over a limit, driver will modify the TX power index to compensate. Implement rtw_chip_ops::pwr_track() for 8821c. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603094218.19942-3-yhchuang@realtek.com commit 11fcb119a758e1e03ec77e20b386f4b93ae06601 Author: Tzu-En Huang Date: Wed Jun 3 17:42:14 2020 +0800 rtw88: 8821c: add cck pd settings CCK PD can reduce the number of false alarm of the CCK rates. It dynamically adjusts the power threshold and CS ratio. The values are compared to the values of the previous level, if the level is changed, set new values of power threshold and CS ratio. Implement rtw_chip_ops::cck_pd_set() for 8821c. Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603094218.19942-2-yhchuang@realtek.com commit 7d6dbb7b99f192bb1d7cfbd53f3aff22f6c4e792 Author: Thierry Reding Date: Tue Jul 14 12:00:09 2020 +0200 arm64: tegra: Sort aliases alphabetically Most device tree files already do this, so update the remaining ones for consistency. Signed-off-by: Thierry Reding commit 1b2a0c36db56b9ff436a85408573c03f17608c68 Author: Thierry Reding Date: Tue Jul 14 11:35:48 2020 +0200 arm64: tegra: Remove spurious tabs Remove tabs in places where they don't belong (i.e. where a single space is sufficient). Signed-off-by: Thierry Reding commit 33c53dbdc4be66570ca0f00431b431608997048e Author: Jon Hunter Date: Sun Jul 12 11:25:06 2020 +0100 arm64: tegra: Populate VBUS for USB3 on Jetson TX2 The VBUS for USB3 connector on the Jetson TX2 is connected to the vdd_usb1 supply and although this is populated for the USB2 port on the USB3 connector it is not populated for the USB3 port and causes the following warning to be seen on boot ... usb3-0: supply vbus not found, using dummy regulator Fix this by also adding the VBUS supply to the USB3 port. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 579db6e5d9b8cae1094a67809fb02ddede28ba09 Author: Jon Hunter Date: Sun Jul 12 11:25:05 2020 +0100 arm64: tegra: Enable DFLL support on Jetson Nano Populate the DFLL node and corresponding PWM pin nodes in order to enable CPUFREQ support on the Jetson Nano platform. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 3f9efbbe57bc6e999f6f4d389da289f2733f0261 Author: Jon Hunter Date: Mon Jul 13 17:17:01 2020 +0100 arm64: tegra: Add support for Jetson Xavier NX Add the device-tree source files for the Tegra194 Jetson Xavier NX Developer Kit. The Xavier NX Developer Kit consists of a small form factor system-on-module (SOM) board (part number p3668-0000) and a carrier board (part number p3509-0000). The Xavier NX Developer Kit SOM features a micro-SD card slot, however, there is also a variant of the SOM available that features a 16GB eMMC. Given that the carrier board can be used with the different SOM variants, that have different part numbers, both the compatible string and file name of the device-tree source file for the Developer Kit is a concatenation of the SOM and carrier board part numbers. Based on some initial work by Thierry Reding . Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 8a565952aa6624eeeeaecca401ea2d45f140aa1b Author: Vidya Sagar Date: Mon Jul 6 22:44:54 2020 +0530 arm64: tegra: Re-order PCIe aperture mappings Re-order Tegra194's PCIe aperture mappings to have IO window moved to 64-bit aperture and have the entire 32-bit aperture used for accessing the configuration space. This makes it to use the entire 32MB of the 32-bit aperture for ECAM purpose while booting through ACPI. Signed-off-by: Vidya Sagar Acked-by: Jon Hunter Signed-off-by: Thierry Reding commit ffcb6cf1ff450bede23c0336ad3a0c21b555d4af Author: Sowjanya Komatineni Date: Tue Jun 16 18:41:34 2020 -0700 arm64: tegra: Enable Tegra VI CSI support for Jetson Nano This patch enables VI and CSI in device tree for Jetson Nano. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit 257c8047be44161882582054b391e8569fc8b5b2 Author: Sowjanya Komatineni Date: Tue Jun 16 18:41:33 2020 -0700 arm64: tegra: jetson-tx1: Add camera supplies Jetson TX1 development board has a camera expansion connector which has 2V8, 1V8 and 1V2 supplies to power up the camera sensor on the supported camera modules. Camera module designed as per Jetson TX1 camera expansion connector may use these supplies for camera sensor avdd 2V8, digital core 1V8, and digital interface 1V2 voltages. These supplies are from fixed regulators on TX1 carrier board with enable control signals from I2C GPIO expanders. This patch adds these camera supplies to Jetson TX1 device tree to allow using these when a camera module is used. Signed-off-by: Sowjanya Komatineni Signed-off-by: Thierry Reding commit d19532e6d328c4db50bb3c738c626ea1f5f0db6f Author: Thierry Reding Date: Fri Jun 12 10:52:50 2020 +0200 arm64: tegra: Fix order of XUSB controller clocks This is purely to make the json-schema validation tools happy because they cannot deal with string arrays that may be in arbitrary order. Signed-off-by: Thierry Reding commit 8b3aee8f08464baa359ae19d90ca3140a80fc23b Author: Thierry Reding Date: Fri Jun 12 10:51:37 2020 +0200 arm64: tegra: Rename cbb@0 to bus@0 on Tegra194 The control backbone is a simple-bus and hence its device tree node should be named "bus@" according to the bindings. Signed-off-by: Thierry Reding commit 862120bd9feb7fe5e35b9d7d6a0c09f4728041c9 Author: Thierry Reding Date: Fri Jun 12 10:50:17 2020 +0200 arm64: tegra: Sort nodes by unit-address on Jetson Nano Move the usb@700d0000 node to the correct place in the device tree, ordered by unit-address. Signed-off-by: Thierry Reding commit bb6782989df86338a64c856a2e318c3e04a699de Author: Thierry Reding Date: Fri Jun 12 10:48:25 2020 +0200 arm64: tegra: Various fixes for PMICs Standardize on "pmic" as the node name for the PMIC on Tegra210 systems and use consistent names for pinmux and GPIO hog nodes. Signed-off-by: Thierry Reding commit df93557b39a99722f3a93b55617f7eaec9bab515 Author: Thierry Reding Date: Fri Jun 12 10:46:30 2020 +0200 arm64: tegra: Rename agic -> interrupt-controller Device tree nodes for interrupt controllers should be named "interrupt- controller", so rename the AGIC accordingly. Signed-off-by: Thierry Reding commit 58be18be3a818f0c96c1ff823fa9b723f0517238 Author: Thierry Reding Date: Fri Jun 12 10:44:09 2020 +0200 arm64: tegra: Fix indentation in Tegra194 device tree Properly indent subsequent lines so that they align with the first line. Signed-off-by: Thierry Reding commit 4b32eb1c2c6856cf0aba6e298c7abfc6fefd5102 Author: Thierry Reding Date: Thu Jun 25 13:41:38 2020 +0200 arm64: tegra: Fix indentation in Tegra132 device tree Properly indent subsequent lines so that they align with the first line. Signed-off-by: Thierry Reding commit 1a94d93e648f6829a1dc30cb1ee4e1f92c7386e0 Author: Tzu-En Huang Date: Tue Jun 16 17:16:25 2020 +0800 rtw88: 8821c: add phy calibration In order to get a better TX EVM, do calibration after association. The calibration needed for 8821c is the IQK, which is done in the firmware. Implement the rtw_chip_ops::phy_calibration() to trigger firmware to calibrate. Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200616091625.26489-8-yhchuang@realtek.com commit 960361238b867aa169ffec93d965ea329081cc86 Author: Tzu-En Huang Date: Tue Jun 16 17:16:24 2020 +0800 rtw88: 8821c: add false alarm statistics False alarm statistics can be used to adjust the RX gain. This helps the driver to adapt to different circumstances. Implement rtw_chip_ops::false_alarm_statistics() for 8821c. Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200616091625.26489-7-yhchuang@realtek.com commit d19040618a22bd9acb698be71cd39f05f699bd62 Author: Tzu-En Huang Date: Tue Jun 16 17:16:23 2020 +0800 rtw88: 8821c: add query rx desc support Some RX packets contain also information about environment status. Implement rtw_chip_ops::query_rx_desc() for 8821c. Parse the RX descriptor which describes the current condition of the received packet. Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200616091625.26489-6-yhchuang@realtek.com commit 58eb40c921a2b08ad3a2dff82ee7d965aadbcfee Author: Tzu-En Huang Date: Tue Jun 16 17:16:22 2020 +0800 rtw88: 8821c: add set channel support 8821c is capable of 2.4G and 5G. Implement rtw_chip_ops::set_channel() to set 2G and 5G channels. This includes MAC, BB and RF related settings. Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200616091625.26489-5-yhchuang@realtek.com commit 6cf2086fd099bcc81b872175b60a7ba2228e407c Author: Tzu-En Huang Date: Tue Jun 16 17:16:21 2020 +0800 rtw88: 8821c: add dig related settings To improve user experience in field, we need DIG to adjust RX initial gain depends on field situation. Define the register addresses for 8821c. Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200616091625.26489-4-yhchuang@realtek.com commit ad5f411b7f37fcc9d1fcf4fe0b433c2f5691cb0c Author: Tzu-En Huang Date: Tue Jun 16 17:16:20 2020 +0800 rtw88: 8821c: add set tx power index To configure the transmit power of 8821c implement trasmit power index setting callback function for 8821c. This is very similar to the callback function of 8822b. Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200616091625.26489-3-yhchuang@realtek.com commit 769a29ce2af45481c1971be5a96250696fb4acf4 Author: Tzu-En Huang Date: Tue Jun 16 17:16:19 2020 +0800 rtw88: 8821c: add basic functions RTL8821CE chipsets are 802.11ac dual-band WiFi + BT combo chips. This patch adds the basic functions such as parameter tables, chip information, power on flow. Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Tzu-En Huang Signed-off-by: Yan-Hsuan Chuang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200616091625.26489-2-yhchuang@realtek.com commit 75b5608a5ea2d50da3b9f19a28cd9cd20322bf97 Author: Thierry Reding Date: Fri Jun 12 09:54:49 2020 +0200 arm64: tegra: Remove unused interrupts from Tegra194 AON GPIO The AON GPIO controller on Tegra194 currently only uses a single interrupt, so remove the extra ones. Signed-off-by: Thierry Reding commit e867fe41b87ab82255bbe95df87f8943a463c53a Author: Thierry Reding Date: Fri Jun 12 09:44:58 2020 +0200 arm64: tegra: Use standard names for SRAM nodes SRAM nodes should be named sram@ to match the bindings. While at it, also remove the unneeded, custom compatible string for SRAM partition nodes. Signed-off-by: Thierry Reding commit aa342b536d51e358221385908e010b2e71a69fdd Author: Thierry Reding Date: Fri Jun 12 09:42:04 2020 +0200 arm64: tegra: Do not mark display hub as simple bus The display hub on Tegra186 and Tegra194 is not a simple bus, so drop the corresponding compatible string. Signed-off-by: Thierry Reding commit 78b9bad6512b0df3996c8d58224fcbcf03d84ff3 Author: Thierry Reding Date: Fri Jun 12 09:39:13 2020 +0200 arm64: tegra: Fix {clock,reset}-names ordering It's very difficult to describe string lists that can be in arbitrary order using the json-schema based validation tooling. Since the OS is not going to care either way, take the easy way out and reorder these entries to match the order defined in the bindings. Signed-off-by: Thierry Reding commit a57421390def6c69198e59a28560977c5711af6e Author: Thierry Reding Date: Fri Jun 12 09:37:09 2020 +0200 arm64: tegra: Remove XUSB pad controller interrupt from XUSB node The XUSB controller doesn't need the XUSB pad controller's interrupt, so remove it. Signed-off-by: Thierry Reding commit 9efa0fca4cc438d68af37731a5c354469571d2b7 Author: Thierry Reding Date: Fri Jun 12 09:34:27 2020 +0200 arm64: tegra: Use standard EEPROM properties The address-bits and page-size properties that are currently used are not valid properties according to the bindings. Use the address-width and pagesize properties instead. Signed-off-by: Thierry Reding commit 1ca6bc896a81696e25b2cd6dd093c8439af315a5 Author: Thierry Reding Date: Fri Jun 12 09:31:55 2020 +0200 arm64: tegra: Update USB connector nodes Use the preferred {id,vbus}-gpios over the {id,vbus}-gpio properties and fix the ordering of compatible strings (most-specific ones should come first). Signed-off-by: Thierry Reding commit c8d05184a066d1122fb61840ef604f45474e1671 Author: Thierry Reding Date: Fri Jun 12 09:28:15 2020 +0200 arm64: tegra: Remove unneeded power supplies On Tegra186 and later, the BPMP is responsible for enabling/disabling the PCIe related power supplies of the pad controller and there is no need for the operating system to control them, so they can be removed. Signed-off-by: Thierry Reding commit 27e2c65712ed45a806d721c2dca2feefcde8b968 Author: Thierry Reding Date: Fri Jun 12 09:22:14 2020 +0200 arm64: tegra: Add missing #phy-cells property to USB PHYs USB PHYs must have a #phy-cells property, so add one to the Tegra USB PHYs which don't have one. Signed-off-by: Thierry Reding commit 4473b1e816c3465489cfe4d3654d3048ac69eb8f Author: Thierry Reding Date: Fri Jun 12 09:20:15 2020 +0200 arm64: tegra: Tegra132 EMC is not compatible with Tegra124 The external memory controller found on Tegra132 is not fully compatible with the instantiation on Tegra124, so remove the corresponding string from the list of compatible strings. Signed-off-by: Thierry Reding commit abc9c8a55e7908ff0cd75caa83206d2eac691f20 Author: Thierry Reding Date: Fri Jun 12 09:18:31 2020 +0200 arm64: tegra: Use sor0_out clock on Tegra132 The sor0_out clock is required to make eDP work properly. Signed-off-by: Thierry Reding commit ef126bc4f3d450b236bb82742a5e135d18b0b28b Author: Thierry Reding Date: Fri Jun 12 09:17:34 2020 +0200 arm64: tegra: Do not mark host1x as simple bus The host1x is not a simple bus, so drop the corresponding compatible string. Signed-off-by: Thierry Reding commit 644c569d7e540a7e447108b7e9087dbff8e06a93 Author: Thierry Reding Date: Fri Jun 12 09:13:52 2020 +0200 arm64: tegra: Use proper tuple notation Tuple boundaries should be marked by < and > to make it clear which cells are part of the same tuple. This also helps the json-schema based validation tooling to properly parse this data. While at it, also remove the "immovable" bit from PCI addresses. All of these addresses are in fact "movable". Signed-off-by: Thierry Reding commit 5e4d46881f29a93f35f3aefeebc80cebfb44ef71 Author: Petr Mladek Date: Tue Jul 14 11:10:30 2020 +0200 selftests/livepatch: adopt to newer sysctl error format With procfs v3.3.16, the sysctl command doesn't print the set key and value on error. This change breaks livepatch selftest test-ftrace.sh, that tests the interaction of sysctl ftrace_enabled: Make it work with all sysctl versions using '-q' option. Explicitly print the final status on success so that it can be verified in the log. The error message is enough on failure. Reported-by: Kamalesh Babulal Signed-off-by: Petr Mladek Reviewed-by: Kamalesh Babulal Reviewed-by: Joe Lawrence Acked-by: Miroslav Benes Link: https://lore.kernel.org/r/20200714091030.1611-1-pmladek@suse.com commit 60f80d6f2d07a6d8aee485a1d1252327eeee0c81 Author: Zhao Heming Date: Thu Jul 9 11:29:29 2020 +0800 md-cluster: fix wild pointer of unlock_all_bitmaps() reproduction steps: ``` node1 # mdadm -C /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sda /dev/sdb node2 # mdadm -A /dev/md0 /dev/sda /dev/sdb node1 # mdadm -G /dev/md0 -b none mdadm: failed to remove clustered bitmap. node1 # mdadm -S --scan ^C <==== mdadm hung & kernel crash ``` kernel stack: ``` [ 335.230657] general protection fault: 0000 [#1] SMP NOPTI [...] [ 335.230848] Call Trace: [ 335.230873] ? unlock_all_bitmaps+0x5/0x70 [md_cluster] [ 335.230886] unlock_all_bitmaps+0x3d/0x70 [md_cluster] [ 335.230899] leave+0x10f/0x190 [md_cluster] [ 335.230932] ? md_super_wait+0x93/0xa0 [md_mod] [ 335.230947] ? leave+0x5/0x190 [md_cluster] [ 335.230973] md_cluster_stop+0x1a/0x30 [md_mod] [ 335.230999] md_bitmap_free+0x142/0x150 [md_mod] [ 335.231013] ? _cond_resched+0x15/0x40 [ 335.231025] ? mutex_lock+0xe/0x30 [ 335.231056] __md_stop+0x1c/0xa0 [md_mod] [ 335.231083] do_md_stop+0x160/0x580 [md_mod] [ 335.231119] ? 0xffffffffc05fb078 [ 335.231148] md_ioctl+0xa04/0x1930 [md_mod] [ 335.231165] ? filename_lookup+0xf2/0x190 [ 335.231179] blkdev_ioctl+0x93c/0xa10 [ 335.231205] ? _cond_resched+0x15/0x40 [ 335.231214] ? __check_object_size+0xd4/0x1a0 [ 335.231224] block_ioctl+0x39/0x40 [ 335.231243] do_vfs_ioctl+0xa0/0x680 [ 335.231253] ksys_ioctl+0x70/0x80 [ 335.231261] __x64_sys_ioctl+0x16/0x20 [ 335.231271] do_syscall_64+0x65/0x1f0 [ 335.231278] entry_SYSCALL_64_after_hwframe+0x44/0xa9 ``` Signed-off-by: Zhao Heming Signed-off-by: Song Liu commit ace52a8c2dd59e3c79fc2a442659ea7c5a52df7f Author: Gustavo A. R. Silva Date: Fri Jun 19 17:43:34 2020 -0500 dmaengine: ti: k3-udma: Use struct_size() in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Acked-by: Peter Ujfalusi Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Link: https://lore.kernel.org/r/20200619224334.GA7857@embeddedor Signed-off-by: Vinod Koul commit db375dcb12250bbc148aef0fa8da747aaa8cf6ec Author: Peter Ujfalusi Date: Tue Jul 7 13:23:52 2020 +0300 dmaengine: ti: k3-udma: Use udma_chan instead of tchan/rchan for IO functions Move the uc->tchan/rchan checks to the IO wrappers itself instead of calling the functions with tchan/rchan directly. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20200707102352.28773-6-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 67414f8db560e5d8dd621f451fb5b50796c8fe6d Author: Peter Ujfalusi Date: Tue Jul 7 13:23:51 2020 +0300 dmaengine: ti: k3-udma-private: Use udma_read/write for register access Instead of using higher level wrappers (udma_rchanrt/tchanrt read/write), use the underlying register access functions directly. This will allow changes in the higher level wrappers within the DMAengine driver. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20200707102352.28773-5-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit bc7e55239c7aecfb2896c4c08638fc5682e8de01 Author: Peter Ujfalusi Date: Tue Jul 7 13:23:50 2020 +0300 dmaengine: ti: k3-udma: Use common defines for TCHANRT/RCHANRT registers The register offsets and functions are the same among TCHAN and RCHAN. Use generic, common names for them. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20200707102352.28773-4-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 3b8bee2a96ce7a5e47239f3a0cb39caffa8358a4 Author: Peter Ujfalusi Date: Tue Jul 7 13:23:49 2020 +0300 dmaengine: ti: k3-udma: Do not use ring_get_occ in udma_pop_from_ring The ring_get_occ is redundant as the k3_ringacc_ring_pop() is also checking the occ of the ring. With removing the ring_get_occ, the function can be simplified as well. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20200707102352.28773-3-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit 2166d96029bc88a90f431aca7f51e714c653e027 Author: Peter Ujfalusi Date: Tue Jul 7 13:23:48 2020 +0300 dmaengine: ti: k3-udma: Remove dma_sync_single calls for descriptors The descriptors are allocated via wither dma_pool or dma_alloc_coherent. There is no need for the dma_sync_singel_* calls. Signed-off-by: Peter Ujfalusi Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20200707102352.28773-2-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul commit d6a7bb869dd8a516901591136a9a895fd829d6c6 Author: Randy Dunlap Date: Mon Jul 13 23:35:39 2020 -0700 dmaengine: idxd: fix PCI_MSI build errors Fix build errors when CONFIG_PCI_MSI is not enabled by making the driver depend on PCI_MSI: ld: drivers/dma/idxd/device.o: in function `idxd_mask_msix_vector': device.c:(.text+0x26f): undefined reference to `pci_msi_mask_irq' ld: drivers/dma/idxd/device.o: in function `idxd_unmask_msix_vector': device.c:(.text+0x2af): undefined reference to `pci_msi_unmask_irq' Signed-off-by: Randy Dunlap Cc: Dave Jiang Cc: dmaengine@vger.kernel.org Cc: Vinod Koul Link: https://lore.kernel.org/r/9dee3f46-70d9-ea75-10cb-5527ab297d1d@infradead.org Signed-off-by: Vinod Koul commit c9020e64cf33f2dd5b2a7295f2bfea787279218a Author: Song Liu Date: Mon Jul 6 14:57:32 2020 -0700 md/raid5-cache: clear MD_SB_CHANGE_PENDING before flushing stripes In recovery, if we process too much data, raid5-cache may set MD_SB_CHANGE_PENDING, which causes spinning in handle_stripe(). Fix this issue by clearing the bit before flushing data only stripes. This issue was initially discussed in [1]. [1] https://www.spinics.net/lists/raid/msg64409.html Signed-off-by: Song Liu commit e1a86dbbbd6a77f73c3d099030495fa31f181e2f Author: Junxiao Bi Date: Tue Jul 14 16:10:26 2020 -0700 md: fix deadlock causing by sysfs_notify The following deadlock was captured. The first process is holding 'kernfs_mutex' and hung by io. The io was staging in 'r1conf.pending_bio_list' of raid1 device, this pending bio list would be flushed by second process 'md127_raid1', but it was hung by 'kernfs_mutex'. Using sysfs_notify_dirent_safe() to replace sysfs_notify() can fix it. There were other sysfs_notify() invoked from io path, removed all of them. PID: 40430 TASK: ffff8ee9c8c65c40 CPU: 29 COMMAND: "probe_file" #0 [ffffb87c4df37260] __schedule at ffffffff9a8678ec #1 [ffffb87c4df372f8] schedule at ffffffff9a867f06 #2 [ffffb87c4df37310] io_schedule at ffffffff9a0c73e6 #3 [ffffb87c4df37328] __dta___xfs_iunpin_wait_3443 at ffffffffc03a4057 [xfs] #4 [ffffb87c4df373a0] xfs_iunpin_wait at ffffffffc03a6c79 [xfs] #5 [ffffb87c4df373b0] __dta_xfs_reclaim_inode_3357 at ffffffffc039a46c [xfs] #6 [ffffb87c4df37400] xfs_reclaim_inodes_ag at ffffffffc039a8b6 [xfs] #7 [ffffb87c4df37590] xfs_reclaim_inodes_nr at ffffffffc039bb33 [xfs] #8 [ffffb87c4df375b0] xfs_fs_free_cached_objects at ffffffffc03af0e9 [xfs] #9 [ffffb87c4df375c0] super_cache_scan at ffffffff9a287ec7 #10 [ffffb87c4df37618] shrink_slab at ffffffff9a1efd93 #11 [ffffb87c4df37700] shrink_node at ffffffff9a1f5968 #12 [ffffb87c4df37788] do_try_to_free_pages at ffffffff9a1f5ea2 #13 [ffffb87c4df377f0] try_to_free_mem_cgroup_pages at ffffffff9a1f6445 #14 [ffffb87c4df37880] try_charge at ffffffff9a26cc5f #15 [ffffb87c4df37920] memcg_kmem_charge_memcg at ffffffff9a270f6a #16 [ffffb87c4df37958] new_slab at ffffffff9a251430 #17 [ffffb87c4df379c0] ___slab_alloc at ffffffff9a251c85 #18 [ffffb87c4df37a80] __slab_alloc at ffffffff9a25635d #19 [ffffb87c4df37ac0] kmem_cache_alloc at ffffffff9a251f89 #20 [ffffb87c4df37b00] alloc_inode at ffffffff9a2a2b10 #21 [ffffb87c4df37b20] iget_locked at ffffffff9a2a4854 #22 [ffffb87c4df37b60] kernfs_get_inode at ffffffff9a311377 #23 [ffffb87c4df37b80] kernfs_iop_lookup at ffffffff9a311e2b #24 [ffffb87c4df37ba8] lookup_slow at ffffffff9a290118 #25 [ffffb87c4df37c10] walk_component at ffffffff9a291e83 #26 [ffffb87c4df37c78] path_lookupat at ffffffff9a293619 #27 [ffffb87c4df37cd8] filename_lookup at ffffffff9a2953af #28 [ffffb87c4df37de8] user_path_at_empty at ffffffff9a295566 #29 [ffffb87c4df37e10] vfs_statx at ffffffff9a289787 #30 [ffffb87c4df37e70] SYSC_newlstat at ffffffff9a289d5d #31 [ffffb87c4df37f18] sys_newlstat at ffffffff9a28a60e #32 [ffffb87c4df37f28] do_syscall_64 at ffffffff9a003949 #33 [ffffb87c4df37f50] entry_SYSCALL_64_after_hwframe at ffffffff9aa001ad RIP: 00007f617a5f2905 RSP: 00007f607334f838 RFLAGS: 00000246 RAX: ffffffffffffffda RBX: 00007f6064044b20 RCX: 00007f617a5f2905 RDX: 00007f6064044b20 RSI: 00007f6064044b20 RDI: 00007f6064005890 RBP: 00007f6064044aa0 R8: 0000000000000030 R9: 000000000000011c R10: 0000000000000013 R11: 0000000000000246 R12: 00007f606417e6d0 R13: 00007f6064044aa0 R14: 00007f6064044b10 R15: 00000000ffffffff ORIG_RAX: 0000000000000006 CS: 0033 SS: 002b PID: 927 TASK: ffff8f15ac5dbd80 CPU: 42 COMMAND: "md127_raid1" #0 [ffffb87c4df07b28] __schedule at ffffffff9a8678ec #1 [ffffb87c4df07bc0] schedule at ffffffff9a867f06 #2 [ffffb87c4df07bd8] schedule_preempt_disabled at ffffffff9a86825e #3 [ffffb87c4df07be8] __mutex_lock at ffffffff9a869bcc #4 [ffffb87c4df07ca0] __mutex_lock_slowpath at ffffffff9a86a013 #5 [ffffb87c4df07cb0] mutex_lock at ffffffff9a86a04f #6 [ffffb87c4df07cc8] kernfs_find_and_get_ns at ffffffff9a311d83 #7 [ffffb87c4df07cf0] sysfs_notify at ffffffff9a314b3a #8 [ffffb87c4df07d18] md_update_sb at ffffffff9a688696 #9 [ffffb87c4df07d98] md_update_sb at ffffffff9a6886d5 #10 [ffffb87c4df07da8] md_check_recovery at ffffffff9a68ad9c #11 [ffffb87c4df07dd0] raid1d at ffffffffc01f0375 [raid1] #12 [ffffb87c4df07ea0] md_thread at ffffffff9a680348 #13 [ffffb87c4df07f08] kthread at ffffffff9a0b8005 #14 [ffffb87c4df07f50] ret_from_fork at ffffffff9aa00344 Signed-off-by: Junxiao Bi Signed-off-by: Song Liu commit 5fb9e3a3423313fe6169d5069e471bfdab6e0b79 Author: Sugar Zhang Date: Mon Jun 29 22:05:45 2020 +0800 dmaengine: pl330: Add quirk 'arm,pl330-periph-burst' This patch adds the qurik to use burst transfers only for pl330 controller, even for request with a length of 1. Although, the correct way should be: if the peripheral request length is 1, the peripheral should use SINGLE request, and then notify the dmac using SINGLE mode by src/dst_maxburst with 1. For example, on the Rockchip SoCs, all the peripherals can use SINGLE or BURST request by setting GRF registers. it is possible that if these peripheral drivers are used only for Rockchip SoCs. Unfortunately, it's not, such as dw uart, which is used so widely, and we can't set src/dst_maxburst according to the SoCs' specific to compatible with all the other SoCs. So, for convenience, all the peripherals are set as BURST request by default on the Rockchip SoCs. even for request with a length of 1. the current pl330 driver will perform SINGLE transfer if the client's maxburst is 1, which still should be working according to chapter 2.6.6 of datasheet which describe how DMAC performs SINGLE transfers for a BURST request. Unfortunately, it's broken on the Rockchip SoCs, which support only matching transfers, such as BURST transfer for BURST request, SINGLE transfer for SINGLE request. Finally, we add the quirk to specify pl330 to use burst transfers only. Signed-off-by: Sugar Zhang Link: https://lore.kernel.org/r/1593439555-68130-5-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Vinod Koul commit 211138e680dc7597b79c10f8ff6c6a1e73d3408d Author: Sugar Zhang Date: Mon Jun 29 22:05:44 2020 +0800 dt-bindings: dma: pl330: Document the quirk 'arm,pl330-periph-burst' This patch Adds the quirk 'arm,pl330-periph-burst' for pl330. Signed-off-by: Sugar Zhang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1593439555-68130-4-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Vinod Koul commit 3e7f0bd872087bf4653eeee9a83050f91baae907 Author: Sugar Zhang Date: Mon Jun 29 22:05:43 2020 +0800 dmaengine: pl330: Improve transfer efficiency for the dregs Only the unaligned burst transfers have the dregs. so, still use BURST transfer with a reduced size for better performance. Signed-off-by: Sugar Zhang Link: https://lore.kernel.org/r/1593439555-68130-3-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Vinod Koul commit 05611a93b8ffa3fe7d2eb43dd6c11e37ead5908a Author: Sugar Zhang Date: Mon Jun 29 22:05:42 2020 +0800 dmaengine: pl330: Remove the burst limit for quirk 'NO-FLUSHP' There is no reason to limit the performance on the 'NO-FLUSHP' SoCs, because 'FLUSHP' instruction is broken on these platforms, so remove the limit to improve the efficiency. Signed-off-by: Sugar Zhang Link: https://lore.kernel.org/r/1593439555-68130-2-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Vinod Koul commit 9cb834b17cb2b1df5cb4389c5830b657d66b3e56 Author: Pierre-Louis Bossart Date: Wed Jul 1 02:43:56 2020 +0800 soundwire: intel: don't free dma_data in DAI shutdown Now that the DMA data is allocated/freed in set_sdw_stream(), remove free operations. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200630184356.24939-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit b5e9e687d6226218d643f3030abb147da25a8f3a Author: Pierre-Louis Bossart Date: Wed Jul 1 02:43:55 2020 +0800 soundwire: cadence: allocate/free dma_data in set_sdw_stream The current memory allocation is somewhat strange: the dma_data is allocated in set_sdw_stream, but released in the intel DAI shutdown. This no longer works with the multi-cpu implementation, since the dma_data is released in the dai shutdown which takes place before the dailink shutdown. Move to a more symmetric allocation where the dma_data is allocated with non-NULL SoundWire stream, and conversely released when a NULL stream is provided - for consistency with the stream startup and shutdown operations. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200630184356.24939-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit ff16d1e584629f6d2d5ecfe79e46eb5ce5d97b7f Author: Pierre-Louis Bossart Date: Wed Jul 1 02:43:54 2020 +0800 soundwire: intel: remove stream allocation/free To support streaming across multiple links, the stream allocation/free needs to be at the dailink level, not the dai. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200630184356.24939-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 4550569bd779f25398503ad5556f8dc7c1f216c2 Author: Pierre-Louis Bossart Date: Wed Jul 1 02:43:53 2020 +0800 soundwire: stream: add helper to startup/shutdown streams To handle streams at the dailink level, expose two helpers that will be called from machine drivers. Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200630184356.24939-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 09553140c8d7be7d74e2e39796f644cc085ab273 Author: Pierre-Louis Bossart Date: Wed Jul 1 02:43:52 2020 +0800 soundwire: intel: implement get_sdw_stream() operations This is needed to retrieve the information when the stream is allocated at the dai_link level. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200630184356.24939-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit c5e3c684c3d8c1644c7f366a4b08b12cebec4c75 Author: Sanyog Kale Date: Sat Jul 4 00:56:44 2020 +0530 MAINTAINERS: change SoundWire maintainer Add Bard as SoundWire maintainer from Intel and change Sanyog's role as reviewer. Signed-off-by: Bard Liao Signed-off-by: Sanyog Kale Acked-by: Bard Liao Link: https://lore.kernel.org/r/20200703192644.751-1-sanyog.r.kale@intel.com Signed-off-by: Vinod Koul commit fb249e1007e0270e305ea674012dcc4f95f1304e Merge: cc59e6bb6cd69 4728f073bfc66 Author: Tudor Ambarus Date: Wed Jul 15 06:20:30 2020 +0300 Merge tag 'spi-mem-dtr' into spi-nor/next spi: Support for DTR ops Merge the SPIMEM DTR bits in spi-nor/next so that we can continue the development on top of them. commit 793d74a8c78e05d6833bfcf582e24e40bd92518f Author: Christophe Leroy Date: Tue Apr 28 13:16:47 2020 +0000 powerpc/vdso64: Switch from __get_datapage() to get_datapage inline macro On the same way as already done on PPC32, drop __get_datapage() function and use get_datapage inline macro instead. See commit ec0895f08f99 ("powerpc/vdso32: inline __get_datapage()") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e13d95312e0b9792556b19b4bb8955cc1ff19fc7.1588079622.git.christophe.leroy@c-s.fr commit 96032f983ca32ad1d43c73da922dbc7022754c3c Author: Christophe Leroy Date: Tue Jul 7 18:32:25 2020 +0000 powerpc/signal64: Don't opencode page prefaulting Instead of doing a __get_user() from the first and last location into a tmp var which won't be used, use fault_in_pages_readable() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/810bd8840ef990a200f58c9dea9abe767ca02a3a.1594146723.git.christophe.leroy@csgroup.eu commit 020c4831e01264f8b62af6ca9e669b7c51881a56 Author: Christophe Leroy Date: Tue Jul 7 12:33:36 2020 +0000 powerpc/signal_32: Simplify loop in PPC64 save_general_regs() save_general_regs() which does special handling when i == PT_SOFTE. Rewrite it to minimise the specific part, especially the __put_user() and associated error handling is the same so make it common. Signed-off-by: Christophe Leroy [mpe: Use a regular if rather than ternary operator] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/47a38df46cae5a5a88a558a64d71f75e9c4d9950.1594125164.git.christophe.leroy@csgroup.eu commit 667e3c413ecf20371692fd2dc37e06dc14d0b140 Author: Christophe Leroy Date: Tue Jul 7 12:33:35 2020 +0000 powerpc/signal_32: Remove !FULL_REGS() special handling in PPC64 save_general_regs() Since commit ("1bd79336a426 powerpc: Fix various syscall/signal/swapcontext bugs"), getting save_general_regs() called without FULL_REGS() is very unlikely and generates a warning. The 32-bit version of save_general_regs() doesn't take care of it at all and copies all registers anyway since that commit. Moreover, commit 965dd3ad3076 ("powerpc/64/syscall: Remove non-volatile GPR save optimisation") is another reason why it would never happen. So the same with 64-bit, don't worry about FULL_REGS() and copy all registers all the time. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/173de3b659fa3a5f126a0eb170522cccd909950f.1594125164.git.christophe.leroy@csgroup.eu commit 41ea93cf7ba4e0f0cc46ebfdda8b6ff27c67bc91 Author: Christophe Leroy Date: Thu Jul 2 11:52:03 2020 +0000 powerpc/kasan: Fix shadow pages allocation failure Doing kasan pages allocation in MMU_init is too early, kernel doesn't have access yet to the entire memory space and memblock_alloc() fails when the kernel is a bit big. Do it from kasan_init() instead. Fixes: 2edb16efc899 ("powerpc/32: Add KASAN support") Fixes: d2a91cef9bbd ("powerpc/kasan: Fix shadow pages allocation failure") Cc: stable@vger.kernel.org Reported-by: Erhard F. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://bugzilla.kernel.org/show_bug.cgi?id=208181 Link: https://lore.kernel.org/r/63048fcea8a1c02f75429ba3152f80f7853f87fc.1593690707.git.christophe.leroy@csgroup.eu commit b506923ee44ae87fc9f4de16b53feb313623e146 Author: Christophe Leroy Date: Thu Jul 2 11:52:02 2020 +0000 Revert "powerpc/kasan: Fix shadow pages allocation failure" This reverts commit d2a91cef9bbdeb87b7449fdab1a6be6000930210. This commit moved too much work in kasan_init(). The allocation of shadow pages has to be moved for the reason explained in that patch, but the allocation of page tables still need to be done before switching to the final hash table. First revert the incorrect commit, following patch redoes it properly. Fixes: d2a91cef9bbd ("powerpc/kasan: Fix shadow pages allocation failure") Cc: stable@vger.kernel.org Reported-by: Erhard F. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://bugzilla.kernel.org/show_bug.cgi?id=208181 Link: https://lore.kernel.org/r/3667deb0911affbf999b99f87c31c77d5e870cd2.1593690707.git.christophe.leroy@csgroup.eu commit 7d38f089731fe129a49e254028caec6f05420f18 Author: Christophe Leroy Date: Thu Jul 2 14:09:21 2020 +0000 docs: powerpc: Clarify book3s/32 MMU families Documentation wrongly tells that book3s/32 CPU have hash MMU. 603 and e300 core only have software loaded TLB. 755, 7450 family and e600 core have both hash MMU and software loaded TLB. This can be selected by setting a bit in HID2 (755) or HID0 (others). At the time being this is not supported by the kernel. Make this explicit in the documentation. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/261923c075d1cb49d02493685e8585d4ea2a5197.1593698951.git.christophe.leroy@csgroup.eu commit 1f9bb31e58118e14ab66239796f2fbe633e1ad32 Author: Nicholas Piggin Date: Wed Jul 8 17:49:42 2020 +1000 selftests/powerpc: Add FPU denormal test Add a testcase that tries to trigger the FPU denormal exception on Power8 or earlier CPUs. Prior to commit 4557ac6b344b ("powerpc/64s/exception: Fix 0x1500 interrupt handler crash") this would trigger a crash such as: Oops: Exception in kernel mode, sig: 5 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: iptable_mangle xt_MASQUERADE iptable_nat nf_nat xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ipt_REJECT nf_reject_ipv4 xt_tcpudp tun bridge stp llc ip6table_filter ip6_tables iptable_filter fuse kvm_hv binfmt_misc squashfs mlx4_ib ib_uverbs dm_multipath scsi_dh_rdac scsi_dh_alua ib_core mlx4_en sr_mod cdrom bnx2x lpfc mlx4_core crc_t10dif scsi_transport_fc sg mdio vmx_crypto crct10dif_vpmsum leds_powernv powernv_rng rng_core led_class powernv_op_panel sunrpc ip_tables x_tables autofs4 CPU: 159 PID: 6854 Comm: fpu_denormal Not tainted 5.8.0-rc2-gcc-8.2.0-00092-g4ec7aaab0828 #192 NIP: c0000000000100ec LR: c00000000001b85c CTR: 0000000000000000 REGS: c000001dd818f770 TRAP: 1500 Not tainted (5.8.0-rc2-gcc-8.2.0-00092-g4ec7aaab0828) MSR: 900000000290b033 CR: 24002884 XER: 20000000 CFAR: c00000000001005c IRQMASK: 1 GPR00: c00000000001c4c8 c000001dd818fa00 c00000000171c200 c000001dd8101570 GPR04: 0000000000000000 c000001dd818fe90 c000001dd8101590 000000000000001d GPR08: 0000000000000010 0000000000002000 c000001dd818fe90 fffffffffc48ac60 GPR12: 0000000000002200 c000001ffff4f480 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 00007fffab225b40 0000000000000001 c000000001757168 GPR24: c000001dd8101570 c0000018027b00f0 c000001dd8101570 c000000001496098 GPR28: c00000000174ad05 c000001dd8100000 c000001dd8100000 c000001dd8100000 NIP save_fpu+0xa8/0x2ac LR __giveup_fpu+0x2c/0xd0 Call Trace: 0xc000001dd818fa80 (unreliable) giveup_all+0x118/0x120 __switch_to+0x124/0x6c0 __schedule+0x390/0xaf0 do_task_dead+0x70/0x80 do_exit+0x8fc/0xe10 do_group_exit+0x64/0xd0 sys_exit_group+0x24/0x30 system_call_exception+0x164/0x270 system_call_common+0xf0/0x278 Signed-off-by: Nicholas Piggin [mpe: Split out of fix patch, add oops log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200708074942.1713396-1-npiggin@gmail.com commit 0138ba5783ae0dcc799ad401a1e8ac8333790df9 Author: Nicholas Piggin Date: Mon May 11 20:19:52 2020 +1000 powerpc/64/signal: Balance return predictor stack in signal trampoline Returning from an interrupt or syscall to a signal handler currently begins execution directly at the handler's entry point, with LR set to the address of the sigreturn trampoline. When the signal handler function returns, it runs the trampoline. It looks like this: # interrupt at user address xyz # kernel stuff... signal is raised rfid # void handler(int sig) addis 2,12,.TOC.-.LCF0@ha addi 2,2,.TOC.-.LCF0@l mflr 0 std 0,16(1) stdu 1,-96(1) # handler stuff ld 0,16(1) mtlr 0 blr # __kernel_sigtramp_rt64 addi r1,r1,__SIGNAL_FRAMESIZE li r0,__NR_rt_sigreturn sc # kernel executes rt_sigreturn rfid # back to user address xyz Note the blr with no matching bl. This can corrupt the return predictor. Solve this by instead resuming execution at the signal trampoline which then calls the signal handler. qtrace-tools link_stack checker confirms the entire user/kernel/vdso cycle is balanced after this patch, whereas it's not upstream. Alan confirms the dwarf unwind info still looks good. gdb still recognises the signal frame and can step into parent frames if it break inside a signal handler. Performance is pretty noisy, not a very significant change on a POWER9 here, but branch misses are consistently a lot lower on a microbenchmark: Performance counter stats for './signal': 13,085.72 msec task-clock # 1.000 CPUs utilized 45,024,760,101 cycles # 3.441 GHz 65,102,895,542 instructions # 1.45 insn per cycle 11,271,673,787 branches # 861.372 M/sec 59,468,979 branch-misses # 0.53% of all branches 12,989.09 msec task-clock # 1.000 CPUs utilized 44,692,719,559 cycles # 3.441 GHz 65,109,984,964 instructions # 1.46 insn per cycle 11,282,136,057 branches # 868.585 M/sec 39,786,942 branch-misses # 0.35% of all branches Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200511101952.1463138-1-npiggin@gmail.com commit b648a5132ca3237a0f1ce5d871fff342b0efcf8a Author: Arnd Bergmann Date: Mon Jul 6 15:22:46 2020 +0200 powerpc/spufs: add CONFIG_COREDUMP dependency The kernel test robot pointed out a slightly different error message after recent commit 5456ffdee666 ("powerpc/spufs: simplify spufs core dumping") to spufs for a configuration that never worked: powerpc64-linux-ld: arch/powerpc/platforms/cell/spufs/file.o: in function `.spufs_proxydma_info_dump': >> file.c:(.text+0x4c68): undefined reference to `.dump_emit' powerpc64-linux-ld: arch/powerpc/platforms/cell/spufs/file.o: in function `.spufs_dma_info_dump': file.c:(.text+0x4d70): undefined reference to `.dump_emit' powerpc64-linux-ld: arch/powerpc/platforms/cell/spufs/file.o: in function `.spufs_wbox_info_dump': file.c:(.text+0x4df4): undefined reference to `.dump_emit' Add a Kconfig dependency to prevent this from happening again. Reported-by: kernel test robot Signed-off-by: Arnd Bergmann Acked-by: Jeremy Kerr Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200706132302.3885935-1-arnd@arndb.de commit e3417faec526cbf97773dca691dcd743f5bfeb64 Author: Oliver O'Halloran Date: Sun Jul 5 23:35:57 2020 +1000 powerpc/powernv: Move pnv_ioda_setup_bus_dma under CONFIG_IOMMU_API pnv_ioda_setup_bus_dma() is only used when a passed through PE is returned to the host. If the kernel is built without IOMMU support this is dead code. Move it under the #ifdef with the rest of the IOMMU API support. Reported-by: kernel test robot Signed-off-by: Oliver O'Halloran Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200705133557.443607-2-oohall@gmail.com commit 93eacd94e09db2b1bb0343f8115385e5c34abf0a Author: Oliver O'Halloran Date: Sun Jul 5 23:35:56 2020 +1000 powerpc/powernv: Make pnv_pci_sriov_enable() and friends static The kernel test robot noticed these are non-static which causes Clang to print some warnings. These are called via ppc_md function pointers so there's no need for them to be non-static. Reported-by: kernel test robot Signed-off-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200705133557.443607-1-oohall@gmail.com commit c339f9be304c21da1c42899a824f84a2cc9ced30 Author: Abhishek Goel Date: Mon Jul 6 00:32:58 2020 -0500 cpuidle/powernv : Remove dead code block Commit 1961acad2f88559c2cdd2ef67c58c3627f1f6e54 removes usage of function "validate_dt_prop_sizes". This patch removes this unused function. Signed-off-by: Abhishek Goel Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200706053258.121475-1-huntbag@linux.vnet.ibm.com commit a87a77cb947cc9fc89f0dad51aeee66a61cc7fc4 Author: Srikar Dronamraju Date: Mon Jun 29 16:07:03 2020 +0530 powerpc/cacheinfo: Add per cpu per index shared_cpu_list Unlike drivers/base/cacheinfo, powerpc cacheinfo code is not exposing shared_cpu_list under /sys/devices/system/cpu/cpu/cache/index Add shared_cpu_list to per cpu per index directory to maintain parity with x86. Some scripts (example: mmtests https://github.com/gormanm/mmtests) seem to be looking for shared_cpu_list instead of shared_cpu_map. Before this patch: # ls /sys/devices/system/cpu0/cache/index1 coherency_line_size number_of_sets size ways_of_associativity level shared_cpu_map type # cat /sys/devices/system/cpu0/cache/index1/shared_cpu_map 00ff # After this patch: # ls /sys/devices/system/cpu0/cache/index1 coherency_line_size number_of_sets shared_cpu_map type level shared_cpu_list size ways_of_associativity # cat /sys/devices/system/cpu0/cache/index1/shared_cpu_map 00ff # cat /sys/devices/system/cpu0/cache/index1/shared_cpu_list 0-7 # Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200629103703.4538-4-srikar@linux.vnet.ibm.com commit 74b7492e417812ea0f5002e210e2ac07a5728d17 Author: Srikar Dronamraju Date: Mon Jun 29 16:07:02 2020 +0530 powerpc/cacheinfo: Make cpumap_show code reusable In anticipation of implementing shared_cpu_list, move code under shared_cpu_map_show() to a common function. No functional changes. Signed-off-by: Srikar Dronamraju Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200629103703.4538-3-srikar@linux.vnet.ibm.com commit 5658cf085ba3c3f3c24ac0f7210f0473794df506 Author: Srikar Dronamraju Date: Mon Jun 29 16:07:01 2020 +0530 powerpc/cacheinfo: Use cpumap_print to print cpumap Tejun Heo had modified shared_cpu_map_show() to use scnprintf instead of cpumap_print during support for *pb[l] format. Refer commit 0c118b7bd09a ("powerpc: use %*pb[l] to print bitmaps including cpumasks and nodemasks"). cpumap_print_to_pagebuf() is a standard function to print cpumap. With commit 9cf79d115f0d ("bitmap: remove explicit newline handling using scnprintf format string"), there is no need to print explicit newline and trailing null character. cpumap_print_to_pagebuf() internally uses scnprintf(). Hence replace scnprintf() with cpumap_print_to_pagebuf(). Note: shared_cpu_map_show() in drivers/base/cacheinfo.c already uses cpumap_print_to_pagebuf(). Before this patch: # cat /sys/devices/system/cpu0/cache/index1/shared_cpu_map 00ff # (Notice the extra blank line). After this patch: # cat /sys/devices/system/cpu0/cache/index1/shared_cpu_map 00ff # Signed-off-by: Srikar Dronamraju Acked-by: Tejun Heo Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200629103703.4538-2-srikar@linux.vnet.ibm.com commit 87db7579ebd5ded337056eb765542eb2608f16e3 Author: Philippe Bergheaud Date: Fri Jun 19 16:04:39 2020 +0200 ocxl: control via sysfs whether the FPGA is reloaded on a link reset Some opencapi FPGA images allow to control if the FPGA should be reloaded on the next adapter reset. If it is supported, the image specifies it through a Vendor Specific DVSEC in the config space of function 0. Signed-off-by: Philippe Bergheaud Signed-off-by: Frederic Barrat Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200619140439.153962-1-fbarrat@linux.ibm.com commit acccc984c1f2e49225b40f1d0d20d383ec27d4d0 Author: Sam Bobroff Date: Tue Jun 30 08:50:44 2020 +1000 MAINTAINERS: Remove self from powerpc EEH I'm sorry to say I can no longer maintain this position. Signed-off-by: Sam Bobroff Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/aec7d729c28e35c7fa9969ec50229080c771195c.1593471043.git.sbobroff@linux.ibm.com commit 5c699396f5f6cf6d67055af7b82c270d31fd831a Author: Anton Blanchard Date: Tue Jun 30 10:02:18 2020 +1000 powerpc/xmon: Reset RCU and soft lockup watchdogs I'm seeing RCU warnings when exiting xmon. xmon resets the NMI watchdog, but does nothing with the RCU stall or soft lockup watchdogs. Add a helper function that handles all three. Signed-off-by: Anton Blanchard Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200630100218.62a3c3fb@kryten.localdomain commit 4ff91fa0a3acd072c9a46ebe08a6e2471ddd3c95 Merge: df8201cc8be28 78c6bc2bdf122 Author: David S. Miller Date: Tue Jul 14 17:04:28 2020 -0700 Merge branch 'udp_tunnel-NIC-RX-port-offload-infrastructure' Jakub Kicinski says: ==================== udp_tunnel: NIC RX port offload infrastructure This set of patches converts further drivers to use the new infrastructure to UDP tunnel port offload merged in commit 0ea460474d70 ("Merge branch 'udp_tunnel-add-NIC-RX-port-offload-infrastructure'"). v3: - fix a W=1 build warning in qede. v2: - fix a W=1 build warning in xgbe, - expand the size of tables for lio. ==================== Signed-off-by: David S. Miller commit 78c6bc2bdf122db07dc04a64e5eda26bcc0c1e15 Author: Jakub Kicinski Date: Tue Jul 14 12:18:30 2020 -0700 qlcnic: convert to new udp_tunnel_nic infra Straightforward conversion to new infra, 1 VxLAN port, handler may sleep. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8cd160a29415f1789d473b1dc07fcc9d02a02b87 Author: Jakub Kicinski Date: Tue Jul 14 12:18:29 2020 -0700 qede: convert to new udp_tunnel_nic infra Covert to new infra. Looks like this driver was not doing ref counting, and sleeping in the callback. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit f7529b4ba3c98470b0e367ba447ad0da84dc308c Author: Jakub Kicinski Date: Tue Jul 14 12:18:28 2020 -0700 fm10k: convert to new udp_tunnel_nic infra Straightforward conversion to new infra. Driver restores info after close/open cycle by calling its internal restore function so just use that, no need for udp_tunnel_nic_reset_ntf() here. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6a8c1a75e551748ebebc4998c238a9d63ec5484d Author: Jakub Kicinski Date: Tue Jul 14 12:18:27 2020 -0700 liquidio_vf: convert to new udp_tunnel_nic infra Carbon copy of the previous change. This driver is just a super thin FW interface, but Derek let us know the table has 1024 entries. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3fcd2ba10fb8ea35c119167543a01fcb04ae9966 Author: Jakub Kicinski Date: Tue Jul 14 12:18:26 2020 -0700 liquidio: convert to new udp_tunnel_nic infra This driver is just a super thin FW interface, but Derek let us know the table has 1024 entries. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit fc9a7def5d3d9869722a02ecd2daaf02d7241348 Author: Jakub Kicinski Date: Tue Jul 14 12:18:25 2020 -0700 enic: convert to new udp_tunnel_nic infra Convert to new infra, now the refcounting will be correct, and driver gets port replay of other ports when offloaded port gets removed. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ad166a8ec26521a903d5a4c4b3e8d99150cc8a70 Author: Jakub Kicinski Date: Tue Jul 14 12:18:24 2020 -0700 cxgb4: convert to new udp_tunnel_nic infra Convert to new infra, this driver is very simple. The check of adapter->rawf_cnt in cxgb_udp_tunnel_unset_port() is kept from the old port deletion function but it's dodgy since nothing ever updates that member once its set during init. Also .set_port callback always adds the raw mac filter.. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 085c5c42e3654eb24c0f6fc6dc703f76fff1e6ce Author: Jakub Kicinski Date: Tue Jul 14 12:18:23 2020 -0700 bnx2x: convert to new udp_tunnel_nic infra Fairly straightforward conversion - no need to keep track of the use count, and replay when ports get removed, also callbacks can just sleep. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4df587ab87b0b09f4873964f71020cf5c12ea878 Author: Jakub Kicinski Date: Tue Jul 14 12:18:22 2020 -0700 xgbe: convert to new udp_tunnel_nic infra Make use of the new udp_tunnel_nic infra. Don't clear the features when VxLAN port is not present to make all drivers behave the same. Driver will now (until we address the problem in the core) leave the RX UDP tunnel feature always on, since this is what most drivers do. Remove the list of VxLAN ports, just program the one core told us to. The driver seem to want to clear the VxLAN ports on close but it doesn't seem to flush the port list properly so it'd get wrong use counts after close/open. Again since it calls its own open handler we need the reset notification hack. v2: - fix kbuild warning Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit b5c5f8d06292e2dd9961c4b88fde9ae0ea458d97 Author: Jakub Kicinski Date: Tue Jul 14 12:18:21 2020 -0700 xgbe: switch to more generic VxLAN detection Instead of looping though the list of ports just check if the geometry of the packet is correct for VxLAN. HW most likely doesn't care about the exact port, anyway, since only first port is actually offloaded, and this way we won't have to maintain the port list at all. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8f0545d232ca4eb1449584c68725d02f03a1d1a9 Author: Jakub Kicinski Date: Tue Jul 14 12:18:20 2020 -0700 be2net: convert to new udp_tunnel_nic infra Convert be2net to new udp_tunnel_nic infra. NIC only takes one VxLAN port. Remove the port tracking using a list. The warning in be_work_del_vxlan_port() looked suspicious - like the driver expected ports to be removed in order of addition. be2net unregisters ports when going down and re-registers them (for skyhawk) when coming up, but it never checks if the device is up in the add_port / del_port callbacks. Make it use UDP_TUNNEL_NIC_INFO_OPEN_ONLY. Sadly this driver calls its own open/close functions directly so the udp_tunnel_nic_reset_ntf() workaround is needed. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 641ca08547f83bd265477150a66cf2378bc98ed7 Author: Jakub Kicinski Date: Tue Jul 14 12:18:19 2020 -0700 nfp: convert to new udp_tunnel_nic infra NFP conversion is pretty straightforward. We want to be able to sleep, and only get callbacks when the device is open. NFP did not ask for port replay when ports were removed, now new infra will provide this feature for free. Signed-off-by: Jakub Kicinski Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit df8201cc8be28097c49c134809c78f998b9a98b2 Merge: 81adcd65b685f 9326e0f85bfaf Author: David S. Miller Date: Tue Jul 14 17:00:52 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2020-07-14 The following pull-request contains BPF updates for your *net-next* tree. We've added 21 non-merge commits during the last 1 day(s) which contain a total of 20 files changed, 308 insertions(+), 279 deletions(-). The main changes are: 1) Fix selftests/bpf build, from Alexei. 2) Fix resolve_btfids build issues, from Jiri. 3) Pull usermode-driver-cleanup set, from Eric. 4) Two minor fixes to bpfilter, from Alexei and Masahiro. ==================== Signed-off-by: David S. Miller commit c97aedc52dce4c87d4c44de4e6af941cd102600c Author: Sargun Dhillon Date: Tue Jun 2 18:10:44 2020 -0700 selftests/seccomp: Test SECCOMP_IOCTL_NOTIF_ADDFD Test whether we can add file descriptors in response to notifications. This injects the file descriptors via notifications, and then uses kcmp to determine whether or not it has been successful. It also includes some basic sanity checking for arguments. Signed-off-by: Sargun Dhillon Cc: Al Viro Cc: Chris Palmer Cc: Christian Brauner Cc: Jann Horn Cc: Kees Cook Cc: Robert Sesek Cc: Tycho Andersen Cc: Matt Denton Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20200603011044.7972-5-sargun@sargun.me Co-developed-by: Kees Cook Signed-off-by: Kees Cook commit 7cf97b12545503992020796c74bd84078eb39299 Author: Sargun Dhillon Date: Tue Jun 2 18:10:43 2020 -0700 seccomp: Introduce addfd ioctl to seccomp user notifier The current SECCOMP_RET_USER_NOTIF API allows for syscall supervision over an fd. It is often used in settings where a supervising task emulates syscalls on behalf of a supervised task in userspace, either to further restrict the supervisee's syscall abilities or to circumvent kernel enforced restrictions the supervisor deems safe to lift (e.g. actually performing a mount(2) for an unprivileged container). While SECCOMP_RET_USER_NOTIF allows for the interception of any syscall, only a certain subset of syscalls could be correctly emulated. Over the last few development cycles, the set of syscalls which can't be emulated has been reduced due to the addition of pidfd_getfd(2). With this we are now able to, for example, intercept syscalls that require the supervisor to operate on file descriptors of the supervisee such as connect(2). However, syscalls that cause new file descriptors to be installed can not currently be correctly emulated since there is no way for the supervisor to inject file descriptors into the supervisee. This patch adds a new addfd ioctl to remove this restriction by allowing the supervisor to install file descriptors into the intercepted task. By implementing this feature via seccomp the supervisor effectively instructs the supervisee to install a set of file descriptors into its own file descriptor table during the intercepted syscall. This way it is possible to intercept syscalls such as open() or accept(), and install (or replace, like dup2(2)) the supervisor's resulting fd into the supervisee. One replacement use-case would be to redirect the stdout and stderr of a supervisee into log file descriptors opened by the supervisor. The ioctl handling is based on the discussions[1] of how Extensible Arguments should interact with ioctls. Instead of building size into the addfd structure, make it a function of the ioctl command (which is how sizes are normally passed to ioctls). To support forward and backward compatibility, just mask out the direction and size, and match everything. The size (and any future direction) checks are done along with copy_struct_from_user() logic. As a note, the seccomp_notif_addfd structure is laid out based on 8-byte alignment without requiring packing as there have been packing issues with uapi highlighted before[2][3]. Although we could overload the newfd field and use -1 to indicate that it is not to be used, doing so requires changing the size of the fd field, and introduces struct packing complexity. [1]: https://lore.kernel.org/lkml/87o8w9bcaf.fsf@mid.deneb.enyo.de/ [2]: https://lore.kernel.org/lkml/a328b91d-fd8f-4f27-b3c2-91a9c45f18c0@rasmusvillemoes.dk/ [3]: https://lore.kernel.org/lkml/20200612104629.GA15814@ircssh-2.c.rugged-nimbus-611.internal Cc: Christoph Hellwig Cc: Christian Brauner Cc: Tycho Andersen Cc: Jann Horn Cc: Robert Sesek Cc: Chris Palmer Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-api@vger.kernel.org Suggested-by: Matt Denton Link: https://lore.kernel.org/r/20200603011044.7972-4-sargun@sargun.me Signed-off-by: Sargun Dhillon Reviewed-by: Will Drewry Co-developed-by: Kees Cook Signed-off-by: Kees Cook commit 81adcd65b685fb9ac6d16d89f1ed889f22b5777b Author: Christophe JAILLET Date: Tue Jul 14 20:35:01 2020 +0200 ksz884x: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GFP_ with a correct flag. It has been compile tested. When memory is allocated in 'ksz_alloc_desc()', GFP_KERNEL can be used because a few lines below, GFP_KERNEL is also used in the 'ksz_alloc_soft_desc()' calls. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit e2a8a827d9bc7be775c88ada720a794b20d8296a Merge: 3fa1dbd984404 0439297be9511 Author: David S. Miller Date: Tue Jul 14 15:07:17 2020 -0700 Merge branch 'r8169-add-support-for-RTL8125B' Heiner Kallweit says: ==================== r8169: add support for RTL8125B This series adds support for RTL8125B rev.b. Tested with a Delock 89564 PCIe card. ==================== Signed-off-by: David S. Miller commit 0439297be95111cf9ef5ece2091af16d140ce2ef Author: Heiner Kallweit Date: Tue Jul 14 17:46:03 2020 +0200 r8169: add support for RTL8125B Add support for RTL8125B rev.b. In my tests 2.5Gbps worked well w/o firmware, however for a stable link at 1Gbps firmware revision 0.0.2 is needed. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit b3ba9ae8dcd2f0a95f02131b9382cea980bae96f Author: Heiner Kallweit Date: Tue Jul 14 17:45:03 2020 +0200 net: phy: realtek: add support for RTL8125B-internal PHY Realtek assigned a new PHY ID for the RTL8125B-internal PHY. It's however compatible with the RTL8125A-internal PHY. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 3fa1dbd984404fc4ac2f703aec56dbb2363ffdb5 Merge: 3d12e50fdd336 94ae20f7356b4 Author: David S. Miller Date: Tue Jul 14 14:53:45 2020 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2020-07-14 please apply the following patch series for qeth to netdev's net-next tree. This brings a mix of cleanups for various parts of the control code. ==================== Signed-off-by: David S. Miller commit 94ae20f7356b418ba0fb451f9567e40d51e915b7 Author: Julian Wiedmann Date: Tue Jul 14 16:23:05 2020 +0200 s390/qeth: constify the MPC initialization data We're not modifying these data blobs, so mark them as constant. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 0973292f579a91ebd3b2866a0eed27d26717acdf Author: Julian Wiedmann Date: Tue Jul 14 16:23:04 2020 +0200 s390/qeth: unify RX-mode hashtables To keep track of the addresses programmed from an RX modeset, we have two separate hashtables (L2: mac_htable, L3: ip_mc_htable). These are never used at the same time, so unify them into a single rx_mode_addrs hashtable. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 4b2eee35336c18ae6ddae25f4438af0c892c835f Author: Julian Wiedmann Date: Tue Jul 14 16:23:03 2020 +0200 s390/qeth: cleanup OAT code While initially just trying to fix up the indentation, condense a few lines and get rid of a goto label. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit f7ec2d2a920edf6a5ffba21ce57181429cfc68b0 Author: Julian Wiedmann Date: Tue Jul 14 16:23:02 2020 +0200 s390/qeth: clean up a magic number in the OAT callback Use the correct struct member instead of hardcoding its offset. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 2ccd31f8c28fb8e99eb4a70d2d06f5d61ee2c6ab Author: Julian Wiedmann Date: Tue Jul 14 16:23:01 2020 +0200 s390/qeth: use u64_to_user_ptr() in the OAT code Use the correct helper for casting to a user pointer. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 65878fd95261d3a831e085e2c6f1e8a6d7979b14 Author: Julian Wiedmann Date: Tue Jul 14 16:23:00 2020 +0200 s390/qeth: clean up error handling for isolation mode cmds As the cmd IO path has learned to propagate errnos back to its callers, let them deal with errors instead of trying to restore their previous configuration from within the IO error path. Also translate the HW error to a meaningful errno, instead of returning -EIO for all cases (and don't map this to -EOPNOTSUPP later on...). While at it, add a READ_ONCE() / WRITE_ONCE() pair to ensure that the data path always sees a valid isolation mode during reconfiguration. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 62f0379c6c9b169b99a89c4677a32e45d7778bc4 Author: Julian Wiedmann Date: Tue Jul 14 16:22:59 2020 +0200 s390/qeth: don't clear the configured isolation mode When qeth_set_access_ctrl_online() is called during the device's initialization and discovers that isolation mode isn't supported, don't clear the user's currently configured mode. They intentionally choose to operate the device in this specific mode, and degrading the isolation is not an option. Only adjust the configuration when called via sysfs (ie. fallback = 1), and here follow the common pattern and restore it from prev_isolation. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 08e95cae648ef8db998d48c38c4774831da5f869 Author: Julian Wiedmann Date: Tue Jul 14 16:22:58 2020 +0200 s390/qeth: only init the isolation mode when necessary A newly initialized device defaults to ISOLATION_MODE_NONE, don't bother with programming this a second time. Then remove the OSD/OSX check, it's already done in the sysfs path whenever the user actually changes the configuration. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit dbdd04d311afb9d64b0722e8a8a00b359625e8de Author: Julian Wiedmann Date: Tue Jul 14 16:22:57 2020 +0200 s390/qeth: fine-tune errno when cmds are cancelled If we cancel all pending cmds (eg. when tearing down the device), don't blame it on an IO error. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 101e314d7ff385a842c9fb0ddfe074024f4803f2 Author: Julian Wiedmann Date: Tue Jul 14 16:22:56 2020 +0200 s390/qeth: reject unsupported link type earlier Rather than delaying the decision until netdev setup, immediately reject a device when we discover that it has an unsupported link type (ie. Token Ring). Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 3d12e50fdd336b9b2e86285dab02a3bb743548c7 Merge: 8331bbe9eab75 6a8c101e0795d Author: David S. Miller Date: Tue Jul 14 14:50:50 2020 -0700 Merge branch 'mlxsw-Mirror-to-CPU-preparations' Ido Schimmel says: ==================== mlxsw: Mirror to CPU preparations A future patch set will add the ability to trap packets that were dropped due to buffer related reasons (e.g., early drop). Internally this is implemented by mirroring these packets towards the CPU port. This patch set adds the required infrastructure to enable such mirroring. Patches #1-#2 extend two registers needed for above mentioned functionality. Patches #3-#6 gradually add support for setting the mirroring target of a SPAN (mirroring) agent as the CPU port. This is only supported from Spectrum-2 onwards, so an error is returned for Spectrum-1. Patches #7-#8 add the ability to set a policer on a SPAN agent. This is required because unlike regularly trapped packets, a policer cannot be set on the trap group with which the mirroring trap is associated. Patches #9-#12 parse the mirror reason field from the Completion Queue Element (CQE). Unlike other trapped packets, the trap identifier of mirrored packets only indicates that the packet was mirrored, but not why. The reason (e.g., tail drop) is encoded in the mirror reason field. Patch #13 utilizes the mirror reason field in order to lookup the matching Rx listener. This allows us to maintain the abstraction that an Rx listener is mapped to a single trap reason. Without taking the mirror reason into account we would need to register a single Rx listener for all mirrored packets. ==================== Signed-off-by: David S. Miller commit 6a8c101e0795d4fe892f281a4e08b2a05cbb9e20 Author: Ido Schimmel Date: Tue Jul 14 17:21:06 2020 +0300 mlxsw: core: Use mirror reason during Rx listener lookup The Rx listener abstraction allows the switch driver (e.g., mlxsw_spectrum) to register a function that is called when a packet is received (trapped) for a specific reason. Up until now, the Rx listener lookup was solely based on the trap identifier. However, when a packet is mirrored to the CPU the trap identifier merely indicates that the packet was mirrored, but not why it was mirrored. This makes it impossible for the switch driver to register different Rx listeners for different mirror reasons. Solve this by allowing the switch driver to register a Rx listener with a mirror reason and by extending the Rx listener lookup to take the mirror reason into account. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit eacc86ec510b9ad64d6dddf3a9924c29d1c4f57b Author: Ido Schimmel Date: Tue Jul 14 17:21:05 2020 +0300 mlxsw: pci: Retrieve mirror reason from CQE during receive In case the mirror reason is valid, retrieve it into the Rx information so that it could be used during listener lookup in a later patch. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a76423a144a8a109cffbd7311c3278f8a856b25f Author: Ido Schimmel Date: Tue Jul 14 17:21:04 2020 +0300 mlxsw: pci: Add mirror reason field to CQEv2 The Completion Queue Element version 2 (CQEv2) includes a field called 'mirror_reason' which indicates why the packet was mirrored to the CPU. Add the field so that it can be used by a later patch. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0cc32c5b5ca84cd3ad3bbb1441f713d171b1efcf Author: Ido Schimmel Date: Tue Jul 14 17:21:03 2020 +0300 mlxsw: trap: Add trap identifiers for mirrored packets Packets that are mirrored to the CPU port are trapped with one of eight trap identifiers. Add them. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 47e4b1620e804cf3b45523b0023400df330ea25c Author: Amit Cohen Date: Tue Jul 14 17:21:02 2020 +0300 mlxsw: reg: Increase trap identifier to 10 bits The trap identifier was increased to 10 bits in new versions of the Programmer's Reference Manual (PRM). Increase it accordingly in the Host PacKet Trap (HPKT) register and in the Completion Queue Element (CQE). This is significant for subsequent patches that will introduce trap identifiers which utilize the extended range. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 4039504e6a0c1abdbbabb4693e5e251c55009f21 Author: Ido Schimmel Date: Tue Jul 14 17:21:01 2020 +0300 mlxsw: spectrum_span: Allow setting policer on a SPAN agent When mirroring packets to the CPU port the mirrored packets are trapped to the CPU. However, unlike other traps, it is not possible to set a policer on the associated trap group. Instead, the policer needs to be set on the SPAN agent. Moreover, the policer ID must be within a specified range: From a configurable (even) base ID to this base plus the maximum number of SPAN agents. While the immediate use case is to set the policer on a SPAN agent that mirrors to the CPU port, a policer can be set on any SPAN agent. Therefore, the operation is implemented for all SPAN agent types. Extend the SPAN agent request API to allow passing the desired policer ID that should be bound to the SPAN agent. Return an error for Spectrum-1, as it does not support policer setting on a SPAN agent. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a120ecc3c5d8da86aca29f142f92a1547578a7bb Author: Ido Schimmel Date: Tue Jul 14 17:21:00 2020 +0300 mlxsw: spectrum_span: Allow passing parameters to SPAN agents Currently, the only parameter of a SPAN agent is the netdev which the SPAN agent should mirror to. The next patch will add the ability to request a SPAN agent that mirrors to a specific netdev and has a specific policer ID bound to it. This is required when mirroring packets to the CPU port. Therefore, encapsulate the sole parameter to mlxsw_sp_span_agent_get() in a structure, so that it could later be extended with policer information. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit fa8c08b8fcbd4a4bd201297d27a9ccbd2eb4b1f1 Author: Ido Schimmel Date: Tue Jul 14 17:20:59 2020 +0300 mlxsw: spectrum_span: Add support for mirroring towards CPU port The Spectrum-2 and Spectrum-3 ASICs are able to mirror packets towards the CPU. These packets are then trapped like any other packet, but with a special packet trap and additional metadata such as why the packet was mirrored. The ability to mirror packets towards the CPU will be utilized by a subsequent patch set that will mirror packets that were dropped by the ASIC for various buffer-related reasons, such as tail-drop and early-drop. Add mirroring towards the CPU as a new SPAN agent type and re-use the functions that mirror to a physical port where possible. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 6edc8beab443ec23d10e489007b4e94d9a05846d Author: Ido Schimmel Date: Tue Jul 14 17:20:58 2020 +0300 mlxsw: spectrum_span: Do not dereference destination netdev Currently, the destination netdev to which we mirror must be a valid netdev. However, this is going to change with the introduction of mirroring towards the CPU port, as the CPU port does not have a backing netdev. Avoid dereferencing the destination netdev when it is not clear if it is valid or not. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit f4a626e2ca09aeffd30509349759fb30379fe83f Author: Ido Schimmel Date: Tue Jul 14 17:20:57 2020 +0300 mlxsw: spectrum_span: Add driver private info to parms_set() callback The parms_set() callback is supposed to fill in the parameters for the SPAN agent, such as the destination port and encapsulation info, if any. When mirroring to the CPU port we cannot resolve the destination port (the CPU port) without access to the driver private info. Pass the driver private info to parms_set() callback so that it could be used later on to resolve the CPU port. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 34e4ace56f106f6fc5050b8e4c6041bca78a431c Author: Ido Schimmel Date: Tue Jul 14 17:20:56 2020 +0300 mlxsw: spectrum_span: Add per-ASIC SPAN agent operations The various SPAN agent types differ in their mirror targets (i.e., physical port netdev vs. VLAN netdev) and the encapsulation headers that they need to encapsulate the mirrored packets with. The Spectrum-2 and Spectrum-3 ASICs support a SPAN agent type that is able to mirror towards the CPU, whereas the Spectrum-1 ASIC does not. Prepare for the addition of this new SPAN agent type by splitting the SPAN agent operations to be per-ASIC. Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 95c68833fa1db2a05496f8c2bc0171a14210b047 Author: Amit Cohen Date: Tue Jul 14 17:20:55 2020 +0300 mlxsw: reg: add mirroring_pid_base to MOGCR register Allow setting mirroring_pid_base using MOGCR register. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ef8d57e6b7f2b26e9def159749fc3d0d3df4ccfd Author: Amit Cohen Date: Tue Jul 14 17:20:54 2020 +0300 mlxsw: reg: Add session_id and pid to MPAT register Allow setting session_id and pid as part of port analyzer configurations. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 8331bbe9eab7515b98adf99b39d85ef34057b6f2 Author: Christophe JAILLET Date: Tue Jul 14 11:14:12 2020 +0200 net: neterion: vxge: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below. No GFP_ flag needs to be corrected. It has been compile tested. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit fb059b26bcc3f9ba7999535121716dfc3479bda2 Author: Christophe JAILLET Date: Tue Jul 14 11:06:20 2020 +0200 net: neterion: s2io: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GPF_ with a correct flag. It has been compile tested. When memory is allocated in 'init_shared_mem()' GFP_KERNEL can be used because this flag is already used to allocate some memory in this function. While at it, update some debug message to match the new function names. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit a3b7b493882b140777956218d5f745d773f2f5ce Author: Christophe JAILLET Date: Tue Jul 14 09:52:24 2020 +0200 lan743x: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GPF_ with a correct flag. It has been compile tested. When memory is allocated in 'lan743x_tx_ring_cleanup()' and 'lan743x_rx_ring_init()', GFP_KERNEL can be used because this flag is already used to allocate some memory in these functions. While at it, remove a useless (void *) casting in the first hunk in so that the code is more consistent. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 64ee24c7eda8691e049e801004b6063b9af39dce Merge: 07dd1b7e68e4b ffb3adba64801 Author: David S. Miller Date: Tue Jul 14 13:46:43 2020 -0700 Merge branch 'bridge-mrp-Add-support-for-interconnect-ring' Horatiu Vultur says: ==================== bridge: mrp: Add support for interconnect ring This patch series extends existing MRP to add support for interconnect ring. An interconnect ring is a ring that connects 2 rings. In this way is possible to connect multiple rings. Each interconnect ring is form of 4 nodes, in which 3 have the role MIC(Media Redundancy Interconnect Client) and one has the role MIM(Media Redundancy Interconnect Manager). All these nodes need to have the same ID and the ID needs to be unique between multiple interconnect rings. And 2 nodes needs to be part of one ring and the other 2 nodes needs to be part of the other ring that is connected. +---------+ | | +----------| MRM |---------------+ | | | | | +---------+ | | | | | | | +--------------+ +-----------------+ | | | | | MRC/MIC |------------------| MRC/MIM | | | | | +--------------+ +-----------------+ | | |Interconnect port |Interconnect port | | | | +--------------+ +-----------------+ | | | | | MRC/MIC |----------------- | MRC/MIC | | | | | +--------------+ +-----------------+ | | | | | +---------+ | | | | | +----------| MRM |----------------+ | | +---------+ Each node in a ring needs to have one of the following ring roles, MRM or MRC. And it can also have an interconnect role like MIM or MIC if it is part of an interconnect ring. In the figure above the MRM doesn't have any interconnect role but the MRC from the top ring have the interconnect roles MIC respectively MIM. Therefore it is not possible for a node to have only an interconnect role. There are 2 ways for interconnect ring to detect when is open or closed: 1. To use CCM frames on the interconnect port to detect when the interconnect link goes down/up. This mode is called LC-mode. 2. To send InTest frames on all 3 ports(2 ring ports and 1 interconnect port) and detect when these frames are received back. This mode is called RC-mode. This patch series adds support only for RC-mode. Where MIM sends InTest frames on all 3 ports and detects when it receives back the InTest. When it receives the InTest it means that the ring is closed so it would set the interconnect port in blocking state. If it stops receiving the InTest frames then it would set the port in forwarding state and it would send InTopo frames. These InTopo frames will be received by MRM nodes and process them. And then the MRM will send Topo frames in the rings so each client will clear its FDB. v4: - always cancel delay work if the MRP instance is deleted or interconnect role is disabled but allow only to start to send InTest frames only if the role is MIM. v3: - update 'br_mrp_set_in_role' to stop sending test if the role is disabled and don't allow to set a different interconnect port if there is already one. v2: - rearrange structures not to contain holes - stop sending MRP_InTest frames when the MRP instance is deleted ==================== Signed-off-by: David S. Miller commit ffb3adba64801f70c472303c9e386eb5eaec193d Author: Horatiu Vultur Date: Tue Jul 14 09:34:58 2020 +0200 net: bridge: Add port attribute IFLA_BRPORT_MRP_IN_OPEN This patch adds a new port attribute, IFLA_BRPORT_MRP_IN_OPEN, which allows to notify the userspace when the node lost the contiuity of MRP_InTest frames. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 4fc4871fc2dc91098948e038ac9af7a0d1e3166a Author: Horatiu Vultur Date: Tue Jul 14 09:34:57 2020 +0200 bridge: mrp: Extend br_mrp_fill_info This patch extends the function br_mrp_fill_info to return also the status for the interconnect ring. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 559139cb0405d38816e5e725adee9000db993235 Author: Horatiu Vultur Date: Tue Jul 14 09:34:56 2020 +0200 bridge: uapi: mrp: Extend MRP_INFO attributes for interconnect status Extend the existing MRP_INFO to return status of MRP interconnect. In case there is no MRP interconnect on the node then the role will be disabled so the other attributes can be ignored. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 7ab1748e4ce607ba1b4133bfe7c2be0022339d87 Author: Horatiu Vultur Date: Tue Jul 14 09:34:55 2020 +0200 bridge: mrp: Extend MRP netlink interface for configuring MRP interconnect This patch extends the existing MRP netlink interface with the following attributes: IFLA_BRIDGE_MRP_IN_ROLE, IFLA_BRIDGE_MRP_IN_STATE and IFLA_BRIDGE_MRP_START_IN_TEST. These attributes are similar with their ring attributes but they apply to the interconnect port. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 537ed5676d4648abc8ef75b5c04d773d961aee2f Author: Horatiu Vultur Date: Tue Jul 14 09:34:54 2020 +0200 bridge: mrp: Implement the MRP Interconnect API Thie patch adds support for MRP Interconnect. Similar with the MRP ring, if the HW can't generate MRP_InTest frames, then the SW will try to generate them. And if also the SW fails to generate the frames then an error is return to userspace. The forwarding/termination of MRP_In frames is happening in the kernel and is done by MRP instances. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit f23f0db3607582636b475eaeb74d32e924f11c41 Author: Horatiu Vultur Date: Tue Jul 14 09:34:53 2020 +0200 bridge: switchdev: mrp: Extend MRP API for switchdev for MRP Interconnect Implement the MRP API for interconnect switchdev. Similar with the other br_mrp_switchdev function, these function will just eventually call the switchdev functions: switchdev_port_obj_add/del. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 4139d4b51a462135d6368e80a9314b57e57279f2 Author: Horatiu Vultur Date: Tue Jul 14 09:34:52 2020 +0200 bridge: mrp: Add br_mrp_in_port_open function This function notifies the userspace when the node lost the continuity of MRP_InTest frames. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 4cc625c63a9274f28f05d5be39a2cbeb48cbfed5 Author: Horatiu Vultur Date: Tue Jul 14 09:34:51 2020 +0200 bridge: mrp: Rename br_mrp_port_open to br_mrp_ring_port_open This patch renames the function br_mrp_port_open to br_mrp_ring_port_open. In this way is more clear that a ring port lost the continuity because there will be also a br_mrp_in_port_open. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 78c1b4fb0e3ed6907955abf3fc8eea74704fe072 Author: Horatiu Vultur Date: Tue Jul 14 09:34:50 2020 +0200 bridge: mrp: Extend br_mrp for MRP interconnect This patch extends the 'struct br_mrp' to contain information regarding the MRP interconnect. It contains the following: - the interconnect port 'i_port', which is NULL if the node doesn't have a interconnect role - the interconnect id, which is similar with the ring id, but this field is also part of the MRP_InTest frames. - the interconnect role, which can be MIM or MIC. - the interconnect state, which can be open or closed. - the interconnect delayed_work for sending MRP_InTest frames and check for lost of continuity. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 43364ef1a12a4236b7956b076649ddd080764cd1 Author: Horatiu Vultur Date: Tue Jul 14 09:34:49 2020 +0200 bridge: mrp: Extend bridge interface This patch adds a new flag(BR_MRP_LOST_IN_CONT) to the net bridge ports. This bit will be set when the port lost the continuity of MRP_InTest frames. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 2801758391ba6b0c20e253b956355e1b15ad85a2 Author: Horatiu Vultur Date: Tue Jul 14 09:34:48 2020 +0200 bridge: uapi: mrp: Extend MRP attributes for MRP interconnect Extend the existing MRP netlink attributes to allow to configure MRP Interconnect: IFLA_BRIDGE_MRP_IN_ROLE - the parameter type is br_mrp_in_role which contains the interconnect id, the ring id, the interconnect role(MIM or MIC) and the port ifindex that represents the interconnect port. IFLA_BRIDGE_MRP_IN_STATE - the parameter type is br_mrp_in_state which contains the interconnect id and the interconnect state. IFLA_BRIDGE_MRP_IN_TEST - the parameter type is br_mrp_start_in_test which contains the interconnect id, the interval at which to send MRP_InTest frames, how many test frames can be missed before declaring the interconnect ring open and the period which represents for how long to send MRP_InTest frames. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit cf7c52748f64606f5f9111e7cbdb2ffb281a60af Author: Horatiu Vultur Date: Tue Jul 14 09:34:47 2020 +0200 switchdev: mrp: Extend switchdev API for MRP Interconnect Extend switchdev API to add support for MRP interconnect. The HW is notified in the following cases: SWITCHDEV_OBJ_ID_IN_ROLE_MRP: This is used when the interconnect role of the node changes. The supported roles are MIM and MIC. SWITCHDEV_OBJ_ID_IN_STATE_MRP: This is used when the interconnect ring changes it states to open or closed. SWITCHDEV_OBJ_ID_IN_TEST_MRP: This is used to start/stop sending MRP_InTest frames on all MRP ports. This is called only on nodes that have the interconnect role MIM. Signed-off-by: Horatiu Vultur Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 433f9a57298fce84b7e91036a1ab26496b67be03 Author: Eric Biggers Date: Fri Jul 10 00:20:10 2020 -0700 arm64: dts: sdm845: add Inline Crypto Engine registers and clock Add the vendor-specific registers and clock for Qualcomm ICE (Inline Crypto Engine) to the device tree node for the UFS host controller on sdm845, so that the ufs-qcom driver will be able to use inline crypto. Use a separate register range rather than extending the main UFS range because there's a gap between the two, and the ICE registers are vendor-specific. (Actually, the hardware claims that the ICE range also includes the array of standard crypto configuration registers; however, on this SoC the Linux kernel isn't permitted to access them directly.) Signed-off-by: Eric Biggers Link: https://lore.kernel.org/r/20200710072013.177481-4-ebiggers@kernel.org Signed-off-by: Bjorn Andersson commit 9326e0f85bfaf0578d40f5357f8143ec857469f5 Author: Masahiro Yamada Date: Wed Jul 1 18:26:44 2020 +0900 bpfilter: Allow to build bpfilter_umh as a module without static library Originally, bpfilter_umh was linked with -static only when CONFIG_BPFILTER_UMH=y. Commit 8a2cc0505cc4 ("bpfilter: use 'userprogs' syntax to build bpfilter_umh") silently, accidentally dropped the CONFIG_BPFILTER_UMH=y test in the Makefile. Revive it in order to link it dynamically when CONFIG_BPFILTER_UMH=m. Since commit b1183b6dca3e ("bpfilter: check if $(CC) can link static libc in Kconfig"), the compiler must be capable of static linking to enable CONFIG_BPFILTER_UMH, but it requires more than needed. To loosen the compiler requirement, I changed the dependency as follows: depends on CC_CAN_LINK depends on m || CC_CAN_LINK_STATIC If CONFIG_CC_CAN_LINK_STATIC in unset, CONFIG_BPFILTER_UMH is restricted to 'm' or 'n'. In theory, CONFIG_CC_CAN_LINK is not required for CONFIG_BPFILTER_UMH=y, but I did not come up with a good way to describe it. Fixes: 8a2cc0505cc4 ("bpfilter: use 'userprogs' syntax to build bpfilter_umh") Reported-by: Michal Kubecek Signed-off-by: Masahiro Yamada Signed-off-by: Alexei Starovoitov Tested-by: Michal Kubecek Link: https://lore.kernel.org/bpf/20200701092644.762234-1-masahiroy@kernel.org commit a4fa458950b40d3849946daa32466392811a3716 Author: Alexei Starovoitov Date: Tue Jul 14 12:31:45 2020 -0700 bpfilter: Initialize pos variable Make sure 'pos' is initialized to zero before calling kernel_write(). Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module") Signed-off-by: Alexei Starovoitov commit ec2ffdf65f8b2b64f3f40062f0a24861b72cf39f Merge: 11bb2f7a45909 f06b71fe4d4cd Author: Alexei Starovoitov Date: Tue Jul 14 12:18:01 2020 -0700 Merge branch 'usermode-driver-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace into bpf-next commit cfafe238b585962089b8c7174315761f6b31e9d6 Author: Dan Carpenter Date: Tue Jul 14 13:57:00 2020 +0300 drm/amd/display: remove an unnecessary NULL check The "stream" pointer can't be NULL and it's dereferenced on the line before so the check doesn't make sense. Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 87d6883b327eef30b56e0a6bca9d5c9800ab6462 Author: Xiaojie Yuan Date: Tue Jul 14 15:47:31 2020 +0800 drm/amdgpu/sdma5: fix wptr overwritten in ->get_wptr() "u64 *wptr" points to the the wptr value in write back buffer and "*wptr = (*wptr) >> 2;" results in the value being overwritten each time when ->get_wptr() is called. umr uses /sys/kernel/debug/dri/0/amdgpu_ring_sdma0 to get rptr/wptr and decode ring content and it is affected by this issue. fix and simplify the logic similar as sdma_v4_0_ring_get_wptr(). v2: fix for sdma5.2 as well Suggested-by: Le Ma Signed-off-by: Xiaojie Yuan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9987d70d10eea0d685d4bfbf2101eaad64d36c37 Author: Xiaojie Yuan Date: Mon Jul 13 13:55:42 2020 +0800 drm/amdgpu: use ARRAY_SIZE() to add amdgpu debugfs files to easily add new debugfs file w/o changing the hardcoded list count. Signed-off-by: Xiaojie Yuan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3a4024b58b3f40121de6c8ad535c5f38ce19cc83 Author: chen gong Date: Mon Jul 13 16:11:24 2020 +0800 drm/amdgpu/powerplay: Modify SMC message name for setting power profile mode I consulted Cai Land(Chuntian.Cai@amd.com), he told me corresponding smc message name to fSMC_MSG_SetWorkloadMask() is "PPSMC_MSG_ActiveProcessNotify" in firmware code of Renoir. Strange though it may seem, but it's a fact. Signed-off-by: chen gong Reviewed-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8fe684e97c86e35f7e5128e756369df5b72e3dd8 Author: Nicholas Kazlauskas Date: Mon Jul 13 10:41:23 2020 -0400 drm/amd/display: Allow for vblank enabled with no active planes [Why] CRC capture doesn't work when the active plane count is 0 since we currently tie both vblank and pageflip interrupts to active_plane_count greater than 0. [How] The frontend is what generates the vblank interrupts while the backend is what generates pageflip interrupts. Both have a requirement for the CRTC to be active, so control the overall interrupt state based on that instead. Pageflip interrupts need to be enabled based on active plane count, but we actually rely on power gating to take care of disabling the interrupt for us on pipes that can be power gated. For pipes that can't be power gated it's still fine to leave it enabled since the interrupt only triggers after the address has been written to that particular pipe - which we won't be doing without an active plane. The issue we had before with this setup was that we couldn't force the state back on. We were essentially manipulating the refcount to enable or disable as needed in a two pass approach. However, there is a function that solves this problem more elegantly: amdgpu_irq_update() will unconditionally call the set based on what it thinks the current enablement state is. This leaves two future TODO items for our IRQ handling: - Disabling IRQs in commit tail instead of atomic commit - Mapping the pageflip interrupt to VUPDATE or something that's tied to the frontend instead of the backend since the mapping to CRTC is not correct Signed-off-by: Nicholas Kazlauskas Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit e2f60fd8ba6199e6d1f3191239613834d5fcf5ad Author: Nicholas Kazlauskas Date: Thu Jul 9 16:21:37 2020 -0400 drm/amd/display: Add missing DCN30 registers and fields for OTG_CRC_CNTL2 [Why] When enabling the debugfs for CRC capture we hit assertions caused by register address and field masks and shifts missing. [How] We want these registers programmed, so add in the SRI/SF entries for this register. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4462282a7253e3663790f8ab092a4107d905bd76 Author: Josip Pavic Date: Mon Jul 6 15:43:39 2020 -0400 drm/amd/display: handle failed allocation during stream construction [Why] Failing to allocate a transfer function during stream construction leads to a null pointer dereference [How] Handle the failed allocation by failing the stream construction Cc: stable@vger.kernel.org Signed-off-by: Josip Pavic Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 04111850cf5640131d20ce5194be735f75ed8f01 Author: Mikita Lipski Date: Thu Mar 26 14:40:02 2020 -0400 drm/amd/display: Reuse parsing code of debugfs write buffer [why] Move code for parsing debugfs input into an array of int parameters by specifying the max number of expected parameters Signed-off-by: Mikita Lipski Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit cc3332d6906f3eb2bad4270b94c85146347e457d Author: Aric Cyr Date: Mon Jul 6 10:08:54 2020 -0400 drm/amd/display: 3.2.94 Signed-off-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 7e7cf95a4d0fd8cf565c7cd9db29339eccba3801 Author: Anthony Koo Date: Mon Jul 6 11:53:48 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.24 Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 16a8cb7cc557f980aae19d1b7140713939fa9644 Author: Dmytro Laktyushkin Date: Tue Jun 30 10:20:06 2020 -0400 drm/amd/display: fix dcn3 p_state_change_support validation (v2) Our validation is a known mess with actual validation mixed with topology configuration. This change makes sure topolgical validation is completed before any topology changes are made so we do not run into issues where we merge and split a pipe over the course of a single call. v2: Squash in compilation fix Signed-off-by: Dmytro Laktyushkin Reviewed-by: Alvin Lee Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1f9ce3cf18ed441a0df8f2447c6f9d6556780415 Author: hersen wu Date: Mon Jul 6 09:18:25 2020 -0400 drm/amd/display: p-state warning occurs while changing resolution from 120hz to 60hz [Why] new calculated dispclk, dppclk are stored in context->bw_ctx.bw.dcn.clk.dispclk_khz, dppclk_khz. Current dispclk, dppclk are from dc->clk_mgr->clks.dispclk_khz. dcn_validate_bandwidth compute new dispclk, dppclk. dispclk will put in use after optimize_bandwidth when ramp_up_dispclk_with_dpp is called. There are two places for dppclk be put in use. One location is the same as the location as dispclk. Another is within update_dchubp_dpp which happens between pre_bandwidth and optimize_bandwidth. dppclk updated within update_dchubp_dpp will cause new clock values of dispclk and dppclk not be in use at the same time. when clocks are decreased, this may cause dppclk is lower than current configuration and let pipe stuck. for example, eDP + external dp, change resolution of DP from 1920x1080x144hz to 1280x960x60hz. before change: dispclk = 337889 dppclk = 337889 change mode, dcn_validate_bandwidth calculate dispclk = 143122 dppclk = 143122 update_dchubp_dpp be executed before dispclk be updated, dispclk = 337889, but dppclk use new value dispclk /2 = 168944. this will cause pipe pstate warning issue. [How] between pre_bandwidth and optimize_bandwidth, while dispclk is going to be decreased, keep dppclk = dispclk Signed-off-by: Hersen Wu Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ec11fe3705a7d434ec3493bdaddb9b6367e7366a Author: hersen wu Date: Mon Jun 22 13:29:16 2020 -0400 drm/amd/display: OLED panel backlight adjust not work with external display connected [Why] amdgpu_dm->backlight_caps is for single eDP only. the caps are upddated for very connector. Real eDP caps will be overwritten by other external display. For OLED panel, caps->aux_support is set to 1 for OLED pnael. after external connected, caps+.aux_support is set to 0. This causes OLED backlight adjustment not work. [How] within update_conector_ext_caps, backlight caps will be updated only for eDP connector. Cc: stable@vger.kernel.org Signed-off-by: hersen wu Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1bdcc35f7767988d49e55c6e44b80da666067f8b Author: Chiawen Huang Date: Thu Jul 2 06:47:05 2020 +0800 drm/amd/display: reduce sr_xxx_time by 3 us when ppt disable [Why] when ppt disabled, the watermark doesn't get fine tune causing underflow. [How] It is a temporary solution to reduce sr_xxx_time by 3 us when ppt disable. Signed-off-by: Chiawen Huang Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ca751df231d14fd2bd1f8ee700d6a16cc541706a Author: Sung Lee Date: Thu Jun 25 13:49:31 2020 -0400 drm/amd/display: Power down hardware if set mode is not called before timeout [WHY] In headless systems, if set mode is not called, hardware will not be powered down on boot, causing HW/SW discrepancies. Powering down hardware on boot will ensure SW state is accurate. [HOW] Set a timer callback on boot for 10 seconds. If set mode is not called within that time, power down hardware. Otherwise, do not power down. Signed-off-by: Sung Lee Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit eaa483642f63cff60139bfdfb7fc971b3789bcaf Author: Dmytro Laktyushkin Date: Mon Jun 15 09:40:06 2020 -0400 drm/amd/display: update dml var Update *DynamicMetadata variables for providing more flexibility. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4c8f126e0cd54153b3788175151710fbc586bc1e Author: chen gong Date: Fri Jul 10 14:21:10 2020 +0800 drm/amdgpu/powerplay: Target power profile mode should be the second parameter of renoir_set_power_profile_mode A small mistake Signed-off-by: chen gong Acked-by: Evan Quan Signed-off-by: Alex Deucher commit beb4ee6770a89646659e6a2178538d2b13e2654e Author: Eric Biggers Date: Wed Jul 8 13:15:20 2020 -0700 Smack: fix use-after-free in smk_write_relabel_self() smk_write_relabel_self() frees memory from the task's credentials with no locking, which can easily cause a use-after-free because multiple tasks can share the same credentials structure. Fix this by using prepare_creds() and commit_creds() to correctly modify the task's credentials. Reproducer for "BUG: KASAN: use-after-free in smk_write_relabel_self": #include #include #include static void *thrproc(void *arg) { int fd = open("/sys/fs/smackfs/relabel-self", O_WRONLY); for (;;) write(fd, "foo", 3); } int main() { pthread_t t; pthread_create(&t, NULL, thrproc, NULL); thrproc(NULL); } Reported-by: syzbot+e6416dabb497a650da40@syzkaller.appspotmail.com Fixes: 38416e53936e ("Smack: limited capability for changing process label") Cc: # v4.4+ Signed-off-by: Eric Biggers Signed-off-by: Casey Schaufler commit 0de674afe83cb23676ec391470251aaa9700f21a Author: Mark Brown Date: Fri Jul 10 19:24:02 2020 +0100 arm64: stacktrace: Move export for save_stack_trace_tsk() Due to refactoring way back in bb53c820c5b0f1 ("arm64: stacktrace: avoid listing stacktrace functions in stacktrace") the EXPORT_SYMBOL_GPL() for save_stack_trace_tsk() is at the end of __save_stack_trace() rather than the function it exports. Move it to the expected location. Signed-off-by: Mark Brown Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200710182402.50473-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit cce0e08301fe43dc3fe983d5f098393d15f803f0 Author: Luc Van Oostenryck Date: Mon Jun 29 12:40:09 2020 +0200 wilc1000: let wilc_mac_xmit() return NETDEV_TX_OK The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type defining 'NETDEV_TX_OK' but this driver returns '0' instead of 'NETDEV_TX_OK'. Fix this by returning 'NETDEV_TX_OK' instead of '0'. Signed-off-by: Luc Van Oostenryck Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200629104009.84077-1-luc.vanoostenryck@gmail.com commit b52b331a8978ab5414fc68bb4a73e690f080549e Author: Ajay Singh Date: Fri Jul 10 05:18:31 2020 +0000 wilc1000: use API version number info along with firmware filename Added version number info along with firmware name so driver can pick the correct revision of FW file. Moved FW filename macro as part of driver code & added MODULE_FIRMWARE to specify FW needed by module. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200710051826.3267-6-ajay.kathat@microchip.com commit 0b3dd675ed595c0cbeb7b5a6cca21a5e64e7123c Author: Ajay Singh Date: Fri Jul 10 05:18:31 2020 +0000 wilc1000: use unified single wilc1000 FW binary Modify WILC1000 binary filename to use single unified wilc1000 FW. A single wilc1000 binary is used for different wilc1000 revisions. Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200710051826.3267-5-ajay.kathat@microchip.com commit 9bdcbdafc659d44962291a3a6b8b01511f92a0a1 Author: Ajay Singh Date: Fri Jul 10 05:18:30 2020 +0000 wilc1000: fix compiler warning for 'wowlan_support' unused variable Avoid below reported warning found when 'CONFIG_PM' config is undefined. 'warning: unused variable 'wowlan_support' [-Wunused-const-variable]' Reported-by: kernel test robot Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200710051826.3267-4-ajay.kathat@microchip.com commit 1b3dd7743041c88d11409c05a7d294f63ef53e44 Author: Ajay Singh Date: Fri Jul 10 05:18:30 2020 +0000 wilc1000: use strlcpy to avoid 'stringop-truncation' warning Make use 'strlcpy' instead of 'strncpy' to overcome 'stringop-truncation' compiler warning. Reported-by: kernel test robot Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200710051826.3267-3-ajay.kathat@microchip.com commit 4f5479e2ee1fc75b7c98e1e6da0dada41778618d Author: Nicolas Ferre Date: Fri Jul 10 05:18:29 2020 +0000 MAINTAINERS: net: wilc1000: Update entry As Adham's email address is bouncing, remove him from wilc1000 entry and add Claudiu as a new co-maintainer. Claudiu follows wilc1000 driver development for a long time and contributed to it already. Signed-off-by: Nicolas Ferre Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200710051826.3267-2-ajay.kathat@microchip.com commit 02d7f4005e942f75c63302d54a659e673edd00df Author: Alexey Dobriyan Date: Fri Jul 10 22:12:10 2020 +0300 PM: sleep: spread "const char *" correctness Fixed string literals can be referred to as "const char *". Signed-off-by: Alexey Dobriyan [ rjw: Minor subject edit ] Signed-off-by: Rafael J. Wysocki commit 6ada7ba2fa7710eead191b69fd948569b05d0f61 Author: Xiang Chen Date: Mon Jun 22 17:09:13 2020 +0800 PM: hibernate: fix white space in a few places In hibernate.c, some places lack of spaces while some places have redundant spaces. So fix them. Signed-off-by: Xiang Chen Signed-off-by: Rafael J. Wysocki commit 59679d9933ab897d197297eaf37e5b3788c052a5 Author: He Zhe Date: Mon Jul 6 17:52:24 2020 +0800 freezer: Add unsafe version of freezable_schedule_timeout_interruptible() for NFS commit 0688e64bc600 ("NFS: Allow signal interruption of NFS4ERR_DELAYed operations") introduces nfs4_delay_interruptible which also needs an _unsafe version to avoid the following call trace for the same reason explained in commit 416ad3c9c006 ("freezer: add unsafe versions of freezable helpers for NFS") CPU: 4 PID: 3968 Comm: rm Tainted: G W 5.8.0-rc4 #1 Hardware name: Marvell OcteonTX CN96XX board (DT) Call trace: dump_backtrace+0x0/0x1dc show_stack+0x20/0x30 dump_stack+0xdc/0x150 debug_check_no_locks_held+0x98/0xa0 nfs4_delay_interruptible+0xd8/0x120 nfs4_handle_exception+0x130/0x170 nfs4_proc_rmdir+0x8c/0x220 nfs_rmdir+0xa4/0x360 vfs_rmdir.part.0+0x6c/0x1b0 do_rmdir+0x18c/0x210 __arm64_sys_unlinkat+0x64/0x7c el0_svc_common.constprop.0+0x7c/0x110 do_el0_svc+0x24/0xa0 el0_sync_handler+0x13c/0x1b8 el0_sync+0x158/0x180 Signed-off-by: He Zhe Signed-off-by: Rafael J. Wysocki commit 11bb2f7a45909f4f64afe471875672ae1b84a380 Author: Jiri Olsa Date: Tue Jul 14 12:25:34 2020 +0200 bpf: Fix cross build for CONFIG_DEBUG_INFO_BTF option Stephen and 0-DAY CI Kernel Test Service reported broken cross build for arm (arm-linux-gnueabi-gcc (GCC) 9.3.0), with following output: /tmp/ccMS5uth.s: Assembler messages: /tmp/ccMS5uth.s:69: Error: unrecognized symbol type "" /tmp/ccMS5uth.s:82: Error: unrecognized symbol type "" Having '@object' for .type diretive is wrong because '@' is comment character for some architectures. Using STT_OBJECT instead that should work everywhere. Also using HOST* variables to build resolve_btfids so it's properly build in crossbuilds (stolen from objtool's Makefile). Reported-by: kernel test robot Reported-by: Stephen Rothwell Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/bpf/20200714102534.299280-2-jolsa@kernel.org commit 079ef53673f2e3b3ee1728800311f20f28eed4f7 Author: Jiri Olsa Date: Tue Jul 14 12:25:33 2020 +0200 bpf: Fix build for disabled CONFIG_DEBUG_INFO_BTF option Stephen reported following linker warnings on powerpc build: ld: warning: orphan section `.BTF_ids' from `kernel/trace/bpf_trace.o' being placed in section `.BTF_ids' ld: warning: orphan section `.BTF_ids' from `kernel/bpf/btf.o' being placed in section `.BTF_ids' ld: warning: orphan section `.BTF_ids' from `kernel/bpf/stackmap.o' being placed in section `.BTF_ids' ld: warning: orphan section `.BTF_ids' from `net/core/filter.o' being placed in section `.BTF_ids' ld: warning: orphan section `.BTF_ids' from `kernel/trace/bpf_trace.o' being placed in section `.BTF_ids' It's because we generated .BTF_ids section even when CONFIG_DEBUG_INFO_BTF is not enabled. Fixing this by generating empty btf_id arrays for this case. Reported-by: Stephen Rothwell Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Tested-by: Geert Uytterhoeven Link: https://lore.kernel.org/bpf/20200714102534.299280-1-jolsa@kernel.org commit a45aca510b73b745f27f39c6bb590b1743ea1792 Author: Abhishek Pandit-Subedi Date: Tue Jul 7 10:28:44 2020 -0700 PM: sleep: core: Emit changed uevent on wakeup_sysfs_add/remove Udev rules that depend on the power/wakeup attribute don't get triggered correctly if device_set_wakeup_capable is called after the device is created. This can happen for several reasons (driver sets wakeup after device is created, wakeup is changed on parent device, etc) and it seems reasonable to emit a changed event when adding or removing attributes on the device. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Greg Kroah-Hartman Reviewed-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki commit 23ec9f42241a4625b954023aae3591c0baa12ea1 Author: Dan Carpenter Date: Tue Jul 14 17:36:52 2020 +0300 drm/i915/selftest: Fix an error code in live_noa_gpr() The error code needs to be set on this path. It currently returns success. Fixes: ed2690a9ca89 ("drm/i915/selftest: Check that GPR are restored across noa_wait") Reported-by: Lionel Landwerlin Signed-off-by: Dan Carpenter Reviewed-by: Lionel Landwerlin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200714143652.GA337376@mwanda commit 325f5585ec36953a3fe2e000451f690440fe1bf5 Author: Ard Biesheuvel Date: Fri Jun 26 17:58:32 2020 +0200 arm64/acpi: disallow writeable AML opregion mapping for EFI code regions Given that the contents of EFI runtime code and data regions are provided by the firmware, as well as the DSDT, it is not unimaginable that AML code exists today that accesses EFI runtime code regions using a SystemMemory OpRegion. There is nothing fundamentally wrong with that, but since we take great care to ensure that executable code is never mapped writeable and executable at the same time, we should not permit AML to create writable mapping. Signed-off-by: Ard Biesheuvel Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20200626155832.2323789-3-ardb@kernel.org Signed-off-by: Catalin Marinas commit 1583052d111f8ea43f9954c5e749164fd2b954af Author: Ard Biesheuvel Date: Fri Jun 26 17:58:31 2020 +0200 arm64/acpi: disallow AML memory opregions to access kernel memory AML uses SystemMemory opregions to allow AML handlers to access MMIO registers of, e.g., GPIO controllers, or access reserved regions of memory that are owned by the firmware. Currently, we also allow AML access to memory that is owned by the kernel and mapped via the linear region, which does not seem to be supported by a valid use case, and exposes the kernel's internal state to AML methods that may be buggy and exploitable. On arm64, ACPI support requires booting in EFI mode, and so we can cross reference the requested region against the EFI memory map, rather than just do a minimal check on the first page. So let's only permit regions to be remapped by the ACPI core if - they don't appear in the EFI memory map at all (which is the case for most MMIO), or - they are covered by a single region in the EFI memory map, which is not of a type that describes memory that is given to the kernel at boot. Reported-by: Jason A. Donenfeld Signed-off-by: Ard Biesheuvel Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20200626155832.2323789-2-ardb@kernel.org Signed-off-by: Catalin Marinas commit 510a230bcac44a311c4f4d92be227dcd91cb2873 Merge: 8257083f8bcf9 4728f073bfc66 Author: Mark Brown Date: Tue Jul 14 17:38:47 2020 +0100 Merge series "mtd: spi-nor: add xSPI Octal DTR support" from Pratyush Yadav : Hi, This series adds support for octal DTR flashes in the spi-nor framework, and then adds hooks for the Cypress Semper and Mircom Xcella flashes to allow running them in octal DTR mode. This series assumes that the flash is handed to the kernel in Legacy SPI mode. Tested on TI J721e EVM with 1-bit ECC on the Cypress flash. Changes in v10: - Rebase on latest linux-next/master. Drop a couple patches that made it in the previous release. - Move the code that sets 20 dummy cycles for MT35XU512ABA to its octal enable function. This way, if the controller doesn't support 8D mode 20 dummy cycles won't be used. Changes in v9: - Do not use '& 0xff' to get the opcode LSB in spi-mxic and spi-zynq-qspi. The cast to u8 will do that anyway. - Do not use if (opcode) as a check for whether the command phase exists in spi-zynq-qspi because the opcode 0 can be valid. Use the new cmd.nbytes instead. Changes in v8: - Move controller changes in spi-mxic to the commit which introduces 2-byte opcodes to avoid problems when bisecting. - Replace usage of sizeof(op->cmd.opcode) with op->cmd.nbytes. - Extract opcode in spi-zynq-qspi instead of using &op->cmd.opcode. Changes in v7: - Reject ops with more than 1 command byte in spi_mem_default_supports_op(). - Reject ops with more than 1 command byte in atmel and mtk controllers. - Reject ops with 0 command bytes in spi_mem_check_op(). - Set cmd.nbytes to 1 when using SPI_MEM_OP_CMD(). - Avoid endianness problems in spi-mxic. Changes in v6: - Instead of hard-coding 8D-8D-8D Fast Read dummy cycles to 20, find them out from the Profile 1.0 table. Changes in v5: - Do not enable stateful X-X-X modes if the reset line is broken. - Instead of setting SNOR_READ_HWCAPS_8_8_8_DTR from Profile 1.0 table parsing, do it in spi_nor_info_init_params() instead based on the SPI_NOR_OCTAL_DTR_READ flag instead. - Set SNOR_HWCAPS_PP_8_8_8_DTR in s28hs post_sfdp hook since this capability is no longer set in Profile 1.0 parsing. - Instead of just checking for spi_nor_get_protocol_width() in spi_nor_octal_dtr_enable(), make sure the protocol is SNOR_PROTO_8_8_8_DTR since get_protocol_width() only cares about data width. - Drop flag SPI_NOR_SOFT_RESET. Instead, discover soft reset capability via BFPT. - Do not make an invalid Quad Enable BFPT field a fatal error. Silently ignore it by assuming no quad enable bit is present. - Set dummy cycles for Cypress Semper flash to 24 instead of 20. This allows for 200MHz operation in 8D mode compared to the 166MHz with 20. - Rename spi_nor_cypress_octal_enable() to spi_nor_cypress_octal_dtr_enable(). - Update spi-mtk-nor.c to reject DTR ops since it doesn't call spi_mem_default_supports_op(). Changes in v4: - Refactor the series to use the new spi-nor framework with the manufacturer-specific bits separated from the core. - Add support for Micron MT35XU512ABA. - Use cmd.nbytes as the criteria of whether the data phase exists or not instead of cmd.buf.in || cmd.buf.out in spi_nor_spimem_setup_op(). - Update Read FSR to use the same dummy cycles and address width as Read SR. - Fix BFPT parsing stopping too early for JESD216 rev B flashes. - Use 2 byte reads for Read SR and FSR commands in DTR mode. Changes in v3: - Drop the DT properties "spi-rx-dtr" and "spi-tx-dtr". Instead, if later a need is felt to disable DTR in case someone has a board with Octal DTR capable flash but does not support DTR transactions for some reason, a property like "spi-no-dtr" can be added. - Remove mode bits SPI_RX_DTR and SPI_TX_DTR. - Remove the Cadence Quadspi controller patch to un-block this series. I will submit it as a separate patch. - Rebase on latest 'master' and fix merge conflicts. - Update read and write dirmap templates to use DTR. - Rename 'is_dtr' to 'dtr'. - Make 'dtr' a bitfield. - Reject DTR ops in spi_mem_default_supports_op(). - Update atmel-quadspi to reject DTR ops. All other controller drivers call spi_mem_default_supports_op() so they will automatically reject DTR ops. - Add support for both enabling and disabling DTR modes. - Perform a Software Reset on flashes that support it when shutting down. - Disable Octal DTR mode on suspend, and re-enable it on resume. - Drop enum 'spi_mem_cmd_ext' and make command opcode u16 instead. Update spi-nor to use the 2-byte command instead of the command extension. Since we still need a "extension type", mode that enum to spi-nor and name it 'spi_nor_cmd_ext'. - Default variable address width to 3 to fix SMPT parsing. - Drop non-volatile change to uniform sector mode and rely on parsing SMPT. Changes in v2: - Add DT properties "spi-rx-dtr" and "spi-tx-dtr" to allow expressing DTR capabilities. - Set the mode bits SPI_RX_DTR and SPI_TX_DTR when we discover the DT properties "spi-rx-dtr" and spi-tx-dtr". - spi_nor_cypress_octal_enable() was updating nor->params.read[] with the intention of setting the correct number of dummy cycles. But this function is called _after_ selecting the read so setting nor->params.read[] will have no effect. So, update nor->read_dummy directly. - Fix spi_nor_spimem_check_readop() and spi_nor_spimem_check_pp() passing nor->read_proto and nor->write_proto to spi_nor_spimem_setup_op() instead of read->proto and pp->proto respectively. - Move the call to cqspi_setup_opcode_ext() inside cqspi_enable_dtr(). This avoids repeating the 'if (f_pdata->is_dtr) cqspi_setup_opcode_ext()...` snippet multiple times. - Call the default 'supports_op()' from cqspi_supports_mem_op(). This makes sure the buswidth requirements are also enforced along with the DTR requirements. - Drop the 'is_dtr' argument from spi_check_dtr_req(). We only call it when a phase is DTR so it is redundant. Pratyush Yadav (17): spi: spi-mem: allow specifying whether an op is DTR or not spi: spi-mem: allow specifying a command's extension spi: atmel-quadspi: reject DTR ops spi: spi-mtk-nor: reject DTR ops mtd: spi-nor: add support for DTR protocol mtd: spi-nor: sfdp: get command opcode extension type from BFPT mtd: spi-nor: sfdp: parse xSPI Profile 1.0 table mtd: spi-nor: core: use dummy cycle and address width info from SFDP mtd: spi-nor: core: do 2 byte reads for SR and FSR in DTR mode mtd: spi-nor: core: enable octal DTR mode when possible mtd: spi-nor: sfdp: do not make invalid quad enable fatal mtd: spi-nor: sfdp: detect Soft Reset sequence support from BFPT mtd: spi-nor: core: perform a Soft Reset on shutdown mtd: spi-nor: core: disable Octal DTR mode on suspend. mtd: spi-nor: core: expose spi_nor_default_setup() in core.h mtd: spi-nor: spansion: add support for Cypress Semper flash mtd: spi-nor: micron-st: allow using MT35XU512ABA in Octal DTR mode drivers/mtd/spi-nor/core.c | 446 +++++++++++++++++++++++++++----- drivers/mtd/spi-nor/core.h | 22 ++ drivers/mtd/spi-nor/micron-st.c | 103 +++++++- drivers/mtd/spi-nor/sfdp.c | 131 +++++++++- drivers/mtd/spi-nor/sfdp.h | 8 + drivers/mtd/spi-nor/spansion.c | 166 ++++++++++++ drivers/spi/atmel-quadspi.c | 6 + drivers/spi/spi-mem.c | 16 +- drivers/spi/spi-mtk-nor.c | 10 +- drivers/spi/spi-mxic.c | 3 +- drivers/spi/spi-zynq-qspi.c | 11 +- include/linux/mtd/spi-nor.h | 53 +++- include/linux/spi/spi-mem.h | 14 +- 13 files changed, 889 insertions(+), 100 deletions(-) -- 2.27.0 base-commit: b3a9e3b9622ae10064826dccb4f7a52bd88c7407 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 8257083f8bcf942b8f607272f30e838a0b930c43 Author: Linus Walleij Date: Tue Jul 14 09:33:57 2020 +0200 spi: omap-100k: Drop include The OMAP-100k driver includes but does not use any symbols from it, so drop the include. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200714073357.34879-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 4728f073bfc66b8b555274ef0d7741d7f5a48947 Author: Pratyush Yadav Date: Wed Jun 24 00:00:17 2020 +0530 spi: spi-mtk-nor: reject DTR ops Double Transfer Rate (DTR) ops are added in spi-mem. But this controller doesn't support DTR transactions. Since we don't use the default supports_op(), which rejects all DTR ops, do that explicitly in our supports_op(). Signed-off-by: Pratyush Yadav Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200623183030.26591-5-p.yadav@ti.com Signed-off-by: Mark Brown commit 5c81c275582c9d9c66d2f928591a2065f2528231 Author: Pratyush Yadav Date: Wed Jun 24 00:00:16 2020 +0530 spi: atmel-quadspi: reject DTR ops Double Transfer Rate (DTR) ops are added in spi-mem. But this controller doesn't support DTR transactions. Since we don't use the default supports_op(), which rejects all DTR ops, do that explicitly in our supports_op(). Signed-off-by: Pratyush Yadav Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200623183030.26591-4-p.yadav@ti.com Signed-off-by: Mark Brown commit caf72df48be32c39f74287976ae843501ae06949 Author: Pratyush Yadav Date: Wed Jun 24 00:00:15 2020 +0530 spi: spi-mem: allow specifying a command's extension In xSPI mode, flashes expect 2-byte opcodes. The second byte is called the "command extension". There can be 3 types of extensions in xSPI: repeat, invert, and hex. When the extension type is "repeat", the same opcode is sent twice. When it is "invert", the second byte is the inverse of the opcode. When it is "hex" an additional opcode byte based is sent with the command whose value can be anything. So, make opcode a 16-bit value and add a 'nbytes', similar to how multiple address widths are handled. Some places use sizeof(op->cmd.opcode). Replace them with op->cmd.nbytes The spi-mxic and spi-zynq-qspi drivers directly use op->cmd.opcode as a buffer. Now that opcode is a 2-byte field, this can result in different behaviour depending on if the machine is little endian or big endian. Extract the opcode in a local 1-byte variable and use that as the buffer instead. Both these drivers would reject multi-byte opcodes in their supports_op() hook anyway, so we only need to worry about single-byte opcodes for now. The above two changes are put in this commit to keep the series bisectable. Signed-off-by: Pratyush Yadav Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200623183030.26591-3-p.yadav@ti.com Signed-off-by: Mark Brown commit 4c5e2bba30e49b970a0fd07b43e0b7a3b5fd5ea7 Author: Pratyush Yadav Date: Wed Jun 24 00:00:14 2020 +0530 spi: spi-mem: allow specifying whether an op is DTR or not Each phase is given a separate 'dtr' field so mixed protocols like 4S-4D-4D can be supported. Signed-off-by: Pratyush Yadav Reviewed-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200623183030.26591-2-p.yadav@ti.com Signed-off-by: Mark Brown commit fadbfc38dde26d31e901c3c85cf01332cb6a2224 Author: Gustavo A. R. Silva Date: Tue Jul 14 10:44:49 2020 -0500 hpilo: Replace one-element array with flexible-array member There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. For this particular case, it is important to notice that the cachelines change from 7 to 6 after the flexible-array conversion: $ pahole -C 'fifo' drivers/misc/hpilo.o struct fifo { u64 nrents; /* 0 8 */ u64 imask; /* 8 8 */ u64 merge; /* 16 8 */ u64 reset; /* 24 8 */ u8 pad_0[96]; /* 32 96 */ /* --- cacheline 2 boundary (128 bytes) --- */ u64 head; /* 128 8 */ u8 pad_1[120]; /* 136 120 */ /* --- cacheline 4 boundary (256 bytes) --- */ u64 tail; /* 256 8 */ u8 pad_2[120]; /* 264 120 */ /* --- cacheline 6 boundary (384 bytes) --- */ u64 fifobar[1]; /* 384 8 */ /* size: 392, cachelines: 7, members: 10 */ /* last cacheline: 8 bytes */ }; $ pahole -C 'fifo' drivers/misc/hpilo.o struct fifo { u64 nrents; /* 0 8 */ u64 imask; /* 8 8 */ u64 merge; /* 16 8 */ u64 reset; /* 24 8 */ u8 pad_0[96]; /* 32 96 */ /* --- cacheline 2 boundary (128 bytes) --- */ u64 head; /* 128 8 */ u8 pad_1[120]; /* 136 120 */ /* --- cacheline 4 boundary (256 bytes) --- */ u64 tail; /* 256 8 */ u8 pad_2[120]; /* 264 120 */ /* --- cacheline 6 boundary (384 bytes) --- */ u64 fifobar[]; /* 384 0 */ /* size: 384, cachelines: 6, members: 10 */ }; Lastly, remove unnecessary parentheses in fifo_sz() and fix the following checkpatch.pl warning for the whole fifo structure: WARNING: please, no spaces at the start of a line [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://github.com/KSPP/linux/issues/79 Tested-by: kernel test robot Link: https://github.com/GustavoARSilva/linux-hardening/blob/master/cii/kernel-ci/hpilo-20200714.md Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200714154449.GA26153@embeddedor Signed-off-by: Greg Kroah-Hartman commit ee85a360482bc72455662c425bfa0e94c1dbb847 Author: Jon Hunter Date: Tue Jul 14 17:08:41 2020 +0100 ALSA: hda/tegra: Disable sync-write operation Commit f34a4c9dd4ca ("ALSA: hda: Enable sync-write operation as default for all controllers") enabled sync-write for all controllers and this is causing audio playback on the Tegra186 HDA device to fail. For now, disable sync-write support for Tegra to fix this. Fixes: f34a4c9dd4ca ("ALSA: hda: Enable sync-write operation as default for all controllers") Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20200714160841.2293-1-jonathanh@nvidia.com Signed-off-by: Takashi Iwai commit 4e87189912bd2167998d82c95bb68f73185069e2 Author: Jon Hunter Date: Sun Jul 12 11:01:18 2020 +0100 firmware: tegra: Update BPMP ABI Update the BPMP ABI to align with the the latest version. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 5e37b9c137ee5a3a9dc2815ca51f71746c2609a6 Author: Jon Hunter Date: Sun Jul 12 11:01:17 2020 +0100 firmware: tegra: Add support for in-band debug Add support for retrieving BPMP debug information via in-band messaging as opposed to using shared-memory which older BPMP firmware used. Note that it is possible to detect at runtime whether the BPMP firmware being used supports the in-band messaging for retrieving the debug informaation. Therefore, if the BPMP firmware supports the in-band messaging for debug use this and otherwise fall-back to using shared memory. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 0428ab013fdd39dbfb8f4cd8ad2b60af3776c6b9 Author: Ville Syrjälä Date: Sat Jul 11 11:03:36 2020 +0300 drm/i915: Recalculate FBC w/a stride when needed Currently we're failing to recalculate the gen9 FBC w/a stride unless something more drastic than just the modifier itself has changed. This often leaves us with FBC enabled with the linear fbdev framebuffer without the w/a stride enabled. That will cause an immediate underrun and FBC will get promptly disabled. Fix the problem by checking if the w/a stride is about to change, and go through the full dance if so. This part of the FBC code is still pretty much a disaster and will need lots more work. But this should at least fix the immediate issue. v2: Deactivate FBC when the modifier changes since that will likely require resetting the w/a CFB stride Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200711080336.13423-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit cc8d0a4538a678b34fe04732ca3cedb5f40320ab Author: Jon Hunter Date: Sun Jul 12 11:01:16 2020 +0100 firmware: tegra: Prepare for supporting in-band debugfs Currently, BPMP debug information is accessible via the Linux debugfs file-system using a shared-memory scheme. More recent BPMP firmware now supports accessing the debug information by in-band messaging which does not require shared-memory. To prepare for adding in-band debugfs support for the BPMP, move the shared-memory specific initialisation from the tegra_bpmp_init_debugfs() into a sub-function. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit edb2bca2ac48ad5fa2fcf7491fdf915a56dd24f6 Author: Jon Hunter Date: Sun Jul 12 11:01:15 2020 +0100 firmware: tegra: Use consistent return variable name Most functions in the BPMP driver use 'err' as the return variable name but there are a few places that use 'ret'. Let's use 'err' to be consistent. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 8b08dbb1b14ae1142003cb8a95e71e48b3a416d4 Author: Timo Alho Date: Sun Jul 12 11:01:14 2020 +0100 firmware: tegra: Add return code checks and increase debugfs size Add checking of the BPMP-FW return code values for MRQ_DEBUGFS calls. Also, development versions of the firmware may have debugfs with a directory structure larger than 256 KiB. Hence increase the size of the memory buffer to accommodate those firmware revisions. And finally, ensure that no access outside of allocated memory buffer happens in case BPMP-FW returns an invalid response size (nbytes) from mrq_debugfs_dumpdir() call. Signed-off-by: Timo Alho Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit a3f6bf8e544ac5fbfe72a331343fb6264373d04d Merge: 3d04d1cc48838 0498b5bff83b3 Author: Mark Brown Date: Tue Jul 14 16:55:17 2020 +0100 Merge series "ASoC: sh: remove discriminatory terms" from Kuninori Morimoto : Renesas SH drivers are using discriminatory terms. This patch-set removes or changes it as much as possible. But, because DMA related API function name, it still exists. I hope all these are removed someday. v1 -> v2 - use "secondary" instead of "follower" - care siu/ssi drivers - tidyup git-log Link: https://lore.kernel.org/r/87r1tg3swv.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (5): ASoC: rsnd: don't use discriminatory terms for function names ASoC: rsnd: don't use discriminatory terms for comment ASoC: fsi: don't use discriminatory terms for comment ASoC: siu: don't use discriminatory terms for parameter ASoC: ssi: don't use discriminatory terms for debug log sound/soc/sh/fsi.c | 4 ++-- sound/soc/sh/rcar/core.c | 4 ++-- sound/soc/sh/rcar/rsnd.h | 2 +- sound/soc/sh/rcar/ssi.c | 28 ++++++++++++++-------------- sound/soc/sh/rcar/ssiu.c | 6 +++--- sound/soc/sh/siu_pcm.c | 6 +++--- sound/soc/sh/ssi.c | 2 +- 7 files changed, 26 insertions(+), 26 deletions(-) -- 2.25.1 commit 3d04d1cc48838f9ae6617a97bbb2c16f06f01144 Author: Masahiro Yamada Date: Tue Jun 23 20:39:15 2020 +0900 ASoC: Convert UniPhier AIO audio system to json-schema Convert the UniPhier AIO audio system binding to DT schema format. Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200623113915.791386-1-yamada.masahiro@socionext.com Signed-off-by: Mark Brown commit 08277cd63797d97185284bc3e86d085fb9ff2adc Author: Masahiro Yamada Date: Tue Jun 23 20:40:05 2020 +0900 ASoC: Convert UniPhier EVEA codec to json-schema Convert the UniPhier EVEA sound codec binding to DT schema format. Signed-off-by: Masahiro Yamada Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200623114005.791643-1-yamada.masahiro@socionext.com Signed-off-by: Mark Brown commit 3f6597ad2f9ed8ed89dbd2a9ec0b0c892774f9d2 Author: Katsuhiro Suzuki Date: Tue Jul 14 16:32:47 2020 +0900 ASoC: convert rk3328 codec binding to yaml This patch converts Rockchip rk3328 audio codec binding to DT schema. And adds description about "mclk" clock and fixes some errors in original example. Signed-off-by: Katsuhiro Suzuki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200714073247.172859-1-katsuhiro@katsuster.net Signed-off-by: Mark Brown commit 8464e650b957888e3fb4789b4b16bf66840a287a Author: YueHaibing Date: Mon Jul 13 09:17:32 2020 -0700 xfs: remove duplicated include from xfs_buf_item.c Remove duplicated include. Signed-off-by: YueHaibing Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Chaitanya Kulkarni commit 76622c88c2ce89d9ce494a0f656a2ad0abd67a69 Author: Christoph Hellwig Date: Mon Jul 13 09:14:50 2020 -0700 xfs: remove SYNC_WAIT and SYNC_TRYLOCK These two definitions are unused now. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Chaitanya Kulkarni commit 92a005448f6fed70b5e7a9f29a1f930118449f1b Author: Gao Xiang Date: Mon Jul 13 09:13:00 2020 -0700 xfs: get rid of unnecessary xfs_perag_{get,put} pairs In the course of some operations, we look up the perag from the mount multiple times to get or change perag information. These are often very short pieces of code, so while the lookup cost is generally low, the cost of the lookup is far higher than the cost of the operation we are doing on the perag. Since we changed buffers to hold references to the perag they are cached in, many modification contexts already hold active references to the perag that are held across these operations. This is especially true for any operation that is serialised by an allocation group header buffer. In these cases, we can just use the buffer's reference to the perag to avoid needing to do lookups to access the perag. This means that many operations don't need to do perag lookups at all to access the perag because they've already looked up objects that own persistent references and hence can use that reference instead. Cc: Dave Chinner Cc: "Darrick J. Wong" Signed-off-by: Gao Xiang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit cca3f3e6f91c2db7bf58ddcccb65c34369728381 Author: Tony Lindgren Date: Mon Jul 13 09:59:49 2020 -0700 ARM: OMAP2+: Drop legacy platform data for omap5 usb host We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch. Signed-off-by: Tony Lindgren commit 509b1377eb52f708b003e752be69053e0211b44e Author: Tony Lindgren Date: Mon Jul 13 09:59:49 2020 -0700 ARM: OMAP2+: Drop legacy platform data for omap4 usb We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch. Signed-off-by: Tony Lindgren commit c7b72abca61ecf7dd4f6203b14cbf0fe79b0a109 Author: Tony Lindgren Date: Mon Jul 13 09:59:48 2020 -0700 ARM: OMAP2+: Drop legacy platform data for dra7 dwc3 We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch. Signed-off-by: Tony Lindgren commit 0db53013cd7429409f37386fb7f4616dabcc5023 Author: Tony Lindgren Date: Mon Jul 13 09:59:48 2020 -0700 ARM: OMAP2+: Drop legacy platform data for omap5 dwc3 We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch. Signed-off-by: Tony Lindgren commit 0498b5bff83b35b4e79601e50c4b1f39b06352f0 Author: Kuninori Morimoto Date: Tue Jul 14 09:07:09 2020 +0900 ASoC: ssi: don't use discriminatory terms for debug log ssi is using discriminatory terms for debug log. This patch changes it to "secondary" Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blkj3qq9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f363459f24253ecbab30211209c560c1d6b27178 Author: Kuninori Morimoto Date: Tue Jul 14 09:07:01 2020 +0900 ASoC: siu: don't use discriminatory terms for parameter siu is using discriminatory terms for function parameter. This patch changes it to "secondary" One note here is that it do nothing to DMA related naming for now, because it needs framework level modification. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87d04z3qqg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit cf01245db89922e4ec2404aaf527ca3d567c4e5e Author: Kuninori Morimoto Date: Tue Jul 14 09:06:50 2020 +0900 ASoC: fsi: don't use discriminatory terms for comment fsi is using discriminatory terms for comment. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eepf3qqs.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f7c7a24b7d0c94f7f0fdaac08c25772e152bfed1 Author: Kuninori Morimoto Date: Tue Jul 14 09:06:41 2020 +0900 ASoC: rsnd: don't use discriminatory terms for comment rsnd is using discriminatory terms for comment. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ft9v3qr1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 25b384b8eabb65bc6546dc2e98e93816dd734a52 Author: Kuninori Morimoto Date: Tue Jul 14 09:06:31 2020 +0900 ASoC: rsnd: don't use discriminatory terms for function names rsnd is using discriminatory terms for function names. This patch changes it to "secondary" One note here is that it do nothing to DMA related naming for now, because it needs framework level modification. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7ub3qra.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0454efbcb2611d338b8d744b9cafeb017cb966bf Author: Jon Hunter Date: Sun Jul 12 11:33:47 2020 +0100 memory: tegra: Fix KCONFIG variables for Tegra186 and Tegra194 Commit a127e690b051 ("memory: tegra: Add support for the Tegra194 memory controller") and commit 4e04b88633ae ("memory: tegra: Only include support for enabled SoCs") incorrectly added the KCONFIG variables CONFIG_ARCH_TEGRA186_SOC and CONFIG_ARCH_TEGRA194_SOC to the Tegra EMC driver. These KCONFIG variables do not exist and prevent the EMC driver from being probed on Tegra186 and Tegra194. These KCONFIG variable names are simply missing one underscore and so fix this by adding the necessary underscore to the variable names. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 216f8e95aacc8e9690d8e2286c472671b65f4128 Author: Shmuel Hazan Date: Tue Jun 23 09:03:35 2020 +0300 PCI: mvebu: Setup BAR0 in order to fix MSI According to the Armada XP datasheet, section 10.2.6: "in order for the device to do a write to the MSI doorbell address, it needs to write to a register in the internal registers space". As a result of the requirement above, without this patch, MSI won't function and therefore some devices won't operate properly without pci=nomsi. This requirement was not present at the time of writing this driver since the vendor u-boot always initializes all PCIe controllers (incl. BAR0 initialization) and for some time, the vendor u-boot was the only available bootloader for this driver's SoCs (e.g. A38x,A37x, etc). Tested on an Armada 385 board on mainline u-boot (2020.4), without u-boot PCI initialization and the following PCIe devices: - Wilocity Wil6200 rev 2 (wil6210) - Qualcomm Atheros QCA6174 (ath10k_pci) Both failed to get a response from the device after loading the firmware and seem to operate properly with this patch. Link: https://lore.kernel.org/r/20200623060334.108444-1-sh@tkos.co.il Signed-off-by: Shmuel Hazan Signed-off-by: Lorenzo Pieralisi Acked-by: Thomas Petazzoni commit 4f57cace81438cc873a96f9f13f08298815c9b51 Author: Grant Likely Date: Fri Jul 10 16:19:39 2020 +0100 HID: input: Fix devices that return multiple bytes in battery report Some devices, particularly the 3DConnexion Spacemouse wireless 3D controllers, return more than just the battery capacity in the battery report. The Spacemouse devices return an additional byte with a device specific field. However, hidinput_query_battery_capacity() only requests a 2 byte transfer. When a spacemouse is connected via USB (direct wire, no wireless dongle) and it returns a 3 byte report instead of the assumed 2 byte battery report the larger transfer confuses and frightens the USB subsystem which chooses to ignore the transfer. Then after 2 seconds assume the device has stopped responding and reset it. This can be reproduced easily by using a wired connection with a wireless spacemouse. The Spacemouse will enter a loop of resetting every 2 seconds which can be observed in dmesg. This patch solves the problem by increasing the transfer request to 4 bytes instead of 2. The fix isn't particularly elegant, but it is simple and safe to backport to stable kernels. A further patch will follow to more elegantly handle battery reports that contain additional data. Signed-off-by: Grant Likely Cc: Darren Hart Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: stable@vger.kernel.org Tested-by: Darren Hart Signed-off-by: Jiri Kosina commit afb0367a80553e795e7ad055299096544454f3f6 Author: Geert Uytterhoeven Date: Tue Jul 14 14:56:25 2020 +0200 PM: domains: Restore comment indentation for generic_pm_domain.child_links The rename of generic_pm_domain.slave_links to generic_pm_domain.child_links accidentally dropped the TAB to align the member's comment. Re-add the lost TAB to restore indentation. Fixes: 8d87ae48ced2dffd ("PM: domains: Fix up terminology with parent/child") Signed-off-by: Geert Uytterhoeven [ rjw: Minor subject edit ] Signed-off-by: Rafael J. Wysocki commit a5e8b53adeb4b458971dfd6232b71299010e981a Author: Lad Prabhakar Date: Tue Jul 7 17:18:12 2020 +0100 pinctrl: sh-pfc: pfc-r8a77951: Add R8A774E1 PFC support Renesas RZ/G2H (r8a774e1) is pin compatible with R-Car H3 (R8A77951), however it doesn't have several automotive specific peripherals. Add automotive-specific pin groups/functions along with common pin groups/functions for supporting both r8a77951 and r8a774e1 SoC. Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-13-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d33cfc2e591a90f540cd696240ff953b8aaba17d Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:11 2020 +0100 dt-bindings: pinctrl: sh-pfc: Document r8a774e1 PFC support Document PFC support for the RZ/G2H (R8A774E1) SoC. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-12-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 409d01fb83162078a242b4fb3161e7daf6c04855 Merge: 38d9dff186f1c 72a5eb9d9c319 Author: Arnd Bergmann Date: Tue Jul 14 14:48:44 2020 +0200 Merge tag 'scmi-updates-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers ARM SCMI/SCPI updates for v5.9 The main addition for this time is the support for platform notifications. SCMI protocol specification allows the platform to signal events to the interested agents via notification messages. We are adding support for the dispatch and delivery of such notifications to the interested users inside the kernel. Other than that, there are minor changes like checking and using the fast_switch capability quering the firmware instead of doing it unconditionally(using polling mode transfer), cosmetic trace update, use of HAVE_ARM_SMCCC_DISCOVERY instead of ARM_PSCI_FW and a fix in scmi clock registration logic for all the clocks with discrete rates. * tag 'scmi-updates-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Remove fixed size fields from reports/scmi_event_header firmware: arm_scmi: Remove unneeded __packed attribute firmware: arm_scmi: Remove zero-length array in SCMI notifications firmware: arm_scmi: Provide a missing function param description clk: scmi: Fix min and max rate when registering clocks with discrete rates firmware: arm_scmi: Keep the discrete clock rates sorted firmware: arm_scmi: Add base notifications support firmware: arm_scmi: Add reset notifications support firmware: arm_scmi: Add sensor notifications support firmware: arm_scmi: Add perf notifications support firmware: arm_scmi: Add power notifications support firmware: arm_scmi: Enable notification core firmware: arm_scmi: Add notification dispatch and delivery firmware: arm_scmi: Add notification callbacks-registration firmware: arm_scmi: Add notification protocol-registration firmware: arm_scmi: Fix SCMI genpd domain probing firmware: arm_scmi: Use HAVE_ARM_SMCCC_DISCOVERY instead of ARM_PSCI_FW cpufreq: arm_scmi: Set fast_switch_possible conditionally firmware: arm_scmi: Add fast_switch_possible() interface firmware: arm_scmi: Use signed integer to report transfer status Link: https://lore.kernel.org/r/20200713161410.12324-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 13bceda68fb9ef388ad40d355ab8d03ee64d14c2 Author: Armas Spann Date: Sat Jul 11 11:43:21 2020 +0200 platform/x86: asus-nb-wmi: add support for ASUS ROG Zephyrus G14 and G15 Add device support for the new ASUS ROG Zephyrus G14 (GA401I) and G15 (GA502I) series. This is accomplished by two new quirk entries (one per each series), as well as all current available G401I/G502I DMI_PRODUCT_NAMEs to match the corresponding devices. Signed-off-by: Armas Spann Signed-off-by: Andy Shevchenko commit 64dd4a5a7d214a07e3d9f40227ec30ac8ba8796e Author: Lu Wei Date: Fri Jul 10 17:30:18 2020 +0800 platform/x86: intel-vbtn: Fix return value check in check_acpi_dev() In the function check_acpi_dev(), if it fails to create platform device, the return value is ERR_PTR() or NULL. Thus it must use IS_ERR_OR_NULL() to check return value. Fixes: 332e081225fc ("intel-vbtn: new driver for Intel Virtual Button") Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: Andy Shevchenko commit 71fbe886ce6dd0be17f20aded9c63fe58edd2806 Author: Lu Wei Date: Fri Jul 10 17:30:17 2020 +0800 platform/x86: intel-hid: Fix return value check in check_acpi_dev() In the function check_acpi_dev(), if it fails to create platform device, the return value is ERR_PTR() or NULL. Thus it must use IS_ERR_OR_NULL() to check return value. Fixes: ecc83e52b28c ("intel-hid: new hid event driver for hotkeys") Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: Andy Shevchenko commit 248727a49897c5f5f984353c67272a97a8429c4b Author: Alexander A. Klimov Date: Mon Jul 13 22:07:38 2020 +0200 udf: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Link: https://lore.kernel.org/r/20200713200738.37800-1-grandmaster@al2klimov.de Signed-off-by: Alexander A. Klimov Signed-off-by: Jan Kara commit a581483b1e5466d28fc50ff623fba31cea2cccb6 Author: Maarten Lankhorst Date: Wed Feb 12 14:54:45 2020 +0100 drm/i915: Move cec_notifier to intel_hdmi_connector_unregister, v2. This fixes the following KASAN splash on module reload: [ 145.136327] ================================================================== [ 145.136502] BUG: KASAN: use-after-free in intel_hdmi_destroy+0x74/0x80 [i915] [ 145.136514] Read of size 8 at addr ffff888216641830 by task kworker/1:1/134 [ 145.136535] CPU: 1 PID: 134 Comm: kworker/1:1 Tainted: G U T 5.5.0-rc7-valkyria+ #5783 [ 145.136539] Hardware name: GIGABYTE GB-BKi3A-7100/MFLP3AP-00, BIOS F1 07/27/2016 [ 145.136546] Workqueue: events drm_connector_free_work_fn [ 145.136551] Call Trace: [ 145.136560] dump_stack+0xa1/0xe0 [ 145.136571] print_address_description.constprop.0+0x1e/0x210 [ 145.136639] ? intel_hdmi_destroy+0x74/0x80 [i915] [ 145.136703] ? intel_hdmi_destroy+0x74/0x80 [i915] [ 145.136710] __kasan_report.cold+0x1b/0x37 [ 145.136790] ? intel_hdmi_destroy+0x74/0x80 [i915] [ 145.136863] ? intel_hdmi_destroy+0x74/0x80 [i915] [ 145.136870] kasan_report+0x27/0x30 [ 145.136881] __asan_report_load8_noabort+0x1c/0x20 [ 145.136946] intel_hdmi_destroy+0x74/0x80 [i915] [ 145.136954] drm_connector_free_work_fn+0xd1/0x100 [ 145.136967] process_one_work+0x86e/0x1610 [ 145.136987] ? pwq_dec_nr_in_flight+0x2f0/0x2f0 [ 145.137004] ? move_linked_works+0x128/0x2c0 [ 145.137021] worker_thread+0x63e/0xc90 [ 145.137048] kthread+0x2f6/0x3f0 [ 145.137054] ? calculate_sigpending+0x81/0xa0 [ 145.137059] ? process_one_work+0x1610/0x1610 [ 145.137064] ? kthread_bind+0x40/0x40 [ 145.137075] ret_from_fork+0x24/0x30 [ 145.137111] Allocated by task 0: [ 145.137119] (stack is not available) [ 145.137137] Freed by task 5053: [ 145.137147] save_stack+0x28/0x90 [ 145.137152] __kasan_slab_free+0x136/0x180 [ 145.137157] kasan_slab_free+0x26/0x30 [ 145.137161] kfree+0xe6/0x350 [ 145.137242] intel_ddi_encoder_destroy+0x60/0x80 [i915] [ 145.137252] drm_mode_config_cleanup+0x11d/0x8f0 [ 145.137329] intel_modeset_driver_remove+0x1f5/0x350 [i915] [ 145.137403] i915_driver_remove+0xc4/0x130 [i915] [ 145.137482] i915_pci_remove+0x3e/0x90 [i915] [ 145.137489] pci_device_remove+0x108/0x2d0 [ 145.137494] device_release_driver_internal+0x1e6/0x4a0 [ 145.137499] driver_detach+0xcb/0x198 [ 145.137503] bus_remove_driver+0xde/0x204 [ 145.137508] driver_unregister+0x6d/0xa0 [ 145.137513] pci_unregister_driver+0x2e/0x230 [ 145.137576] i915_exit+0x1f/0x26 [i915] [ 145.137157] kasan_slab_free+0x26/0x30 [ 145.137161] kfree+0xe6/0x350 [ 145.137242] intel_ddi_encoder_destroy+0x60/0x80 [i915] [ 145.137252] drm_mode_config_cleanup+0x11d/0x8f0 [ 145.137329] intel_modeset_driver_remove+0x1f5/0x350 [i915] [ 145.137403] i915_driver_remove+0xc4/0x130 [i915] [ 145.137482] i915_pci_remove+0x3e/0x90 [i915] [ 145.137489] pci_device_remove+0x108/0x2d0 [ 145.137494] device_release_driver_internal+0x1e6/0x4a0 [ 145.137499] driver_detach+0xcb/0x198 [ 145.137503] bus_remove_driver+0xde/0x204 [ 145.137508] driver_unregister+0x6d/0xa0 [ 145.137513] pci_unregister_driver+0x2e/0x230 [ 145.137576] i915_exit+0x1f/0x26 [i915] [ 145.137581] __x64_sys_delete_module+0x35b/0x470 [ 145.137586] do_syscall_64+0x99/0x4e0 [ 145.137591] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 145.137606] The buggy address belongs to the object at ffff888216640000 which belongs to the cache kmalloc-8k of size 8192 [ 145.137618] The buggy address is located 6192 bytes inside of 8192-byte region [ffff888216640000, ffff888216642000) [ 145.137630] The buggy address belongs to the page: [ 145.137640] page:ffffea0008599000 refcount:1 mapcount:0 mapping:ffff888107c02a80 index:0xffff888216644000 compound_mapcount: 0 [ 145.137647] raw: 0200000000010200 0000000000000000 0000000100000001 ffff888107c02a80 [ 145.137652] raw: ffff888216644000 0000000080020001 00000001ffffffff 0000000000000000 [ 145.137656] page dumped because: kasan: bad access detected [ 145.137668] Memory state around the buggy address: [ 145.137678] ffff888216641700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 145.137687] ffff888216641780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 145.137697] >ffff888216641800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 145.137706] ^ [ 145.137715] ffff888216641880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 145.137724] ffff888216641900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 145.137733] ================================================================== [ 145.137742] Disabling lock debugging due to kernel taint Changes since v1: - Add fixes tags. - Use early unregister. Signed-off-by: Maarten Lankhorst Fixes: 9c229127aee2 ("drm/i915: hdmi: add CEC notifier to intel_hdmi") Cc: # v4.19+ Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200212135445.1469133-1-maarten.lankhorst@linux.intel.com commit b424808115cb0141da851082d84ede20caa2215c Author: Linus Walleij Date: Sat Jul 11 23:01:50 2020 +0200 brcm80211: brcmsmac: Move LEDs to GPIO descriptors The code in the BRCM80211 BRCMSMAC driver is using the legacy GPIO API to to a complex check of the validity of the base of the GPIO chip and whether it is present at all and then adding an offset to the base of the chip. Use the existing function to obtain a GPIO line internally from a GPIO chip so we can use the offset directly and modernize the code to use GPIO descriptors instead of integers from the global GPIO numberspace. Cc: Wright Feng Cc: Frank Kao Cc: Kalle Valo Signed-off-by: Linus Walleij Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200711210150.4943-1-linus.walleij@linaro.org commit e0439cd97573f1c7c6bf98e7a6d63de34daeaf8a Author: Johan Hovold Date: Mon Jul 13 17:39:36 2020 +0200 USB: serial: sierra: clean up special-interface handling Clean up the handling of special interfaces that either should be ignored or that need a larger number of URBs. Commit 66f092ed3b94 ("USB: serial: sierra: unify quirk handling logic") replaced the previous is_blacklisted() and is_highmemory() helpers with a single is_quirk() helper which made it even harder to understand what the interface lists were used for. Rename the interface-list struct, its members and the interface-lookup helper and restructure the code somewhat in order to make it more self-explanatory. Link: https://lore.kernel.org/r/20200713153936.18032-1-johan@kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 16045babc7985cef48b355540d11bd942220931d Author: Johan Hovold Date: Mon Jul 13 12:55:17 2020 +0200 USB: serial: cp210x: use in-kernel types in port data The port data is not exported to user space so use the in-kernel u8 type. Link: https://lore.kernel.org/r/20200713105517.27796-6-johan@kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 29e354ebeeecaee979e6fe22cd6272682d7552c9 Author: Matthias Brugger Date: Wed Jul 1 13:22:00 2020 +0200 brcmfmac: Transform compatible string for FW loading The driver relies on the compatible string from DT to determine which FW configuration file it should load. The DTS spec allows for '/' as part of the compatible string. We change this to '-' so that we will still be able to load the config file, even when the compatible has a '/'. This fixes explicitly the firmware loading for "solidrun,cubox-i/q". Signed-off-by: Matthias Brugger Reviewed-by: Hans deGoede Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200701112201.6449-1-matthias.bgg@kernel.org commit ba84190eab5ba27c171b610ec1d8e0957638d8ec Author: Johan Hovold Date: Mon Jul 13 12:55:16 2020 +0200 USB: serial: cp210x: drop unnecessary packed attributes Drop unnecessary packed attributes from structs without padding. Link: https://lore.kernel.org/r/20200713105517.27796-5-johan@kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit de9c7e9f278492cee9f217ffc339a398536c7e51 Author: Johan Hovold Date: Mon Jul 13 12:55:15 2020 +0200 USB: serial: cp210x: add support for TIOCGICOUNT Enable TIOCGICOUNT to allow reading out the (unused) interrupt counters and error statistics. Note that modem-status events are currently left unimplemented as they appear to be buffered on at least CP2102 and therefore cannot be used to implement TIOCMIWAIT. Link: https://lore.kernel.org/r/20200713105517.27796-4-johan@kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit a7207e9835a4f245c8c693170906fda0980273f3 Author: Johan Hovold Date: Mon Jul 13 12:55:14 2020 +0200 USB: serial: cp210x: add support for line-status events Add support for line-status events that specifically can be used to detect and report parity errors. Enable the device's event-insertion mode whenever input-parity checking is requested. This will insert line and modem status events into the data stream. Note that modem-status changes appear to be buffered until a character is received (at least on CP2102) and support is therefore left unimplemented. On at least one type of these chips (CP2102), line breaks are not reported as expected either (regardless of whether SERIAL_BREAK_CHAR is set) so do not enable event-mode when !IGNBRK is requested for now. Link: https://lore.kernel.org/r/20200713105517.27796-3-johan@kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 2fa8085fc6daa255c591e754f66ba98035b797c3 Author: Wright Feng Date: Wed Jun 24 04:16:08 2020 -0500 brcmfmac: set pacing shift before transmitting skb to bus Linux 3.6 introduces TSQ which has a per socket threshold for TCP Tx packet to reduce latency. In flow control mode, host driver enqueues skb in hanger and TCP doesn't push new skb frees until host frees the skb when receiving fwstatus event. So set pacing shift 8 to send them as a single large aggregate frame to the bus layer. 43455 TX TCP throughput in different FC modes on Linux 5.4.18 sk_pacing_shift : Throughput (fcmode=0) 10: 245 Mbps 9: 245 Mbps 8: 246 Mbps 7: 246 Mbps sk_pacing_shift : Throughput (fcmode=1) 10: 182 Mbps 9: 197 Mbps 8: 206 Mbps 7: 207 Mbps sk_pacing_shift : Throughput (fcmode=2) 10: 180 Mbps 9: 197 Mbps 8: 206 Mbps 7: 207 Mbps Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200624091608.25154-3-wright.feng@cypress.com commit fcdd7a875def793c38d7369633af3eba6c7cf089 Author: Wright Feng Date: Wed Jun 24 04:16:07 2020 -0500 brcmfmac: set state of hanger slot to FREE when flushing PSQ When USB or SDIO device got abnormal bus disconnection, host driver tried to clean up the skbs in PSQ and TXQ (The skb's pointer in hanger slot linked to PSQ and TSQ), so we should set the state of skb hanger slot to BRCMF_FWS_HANGER_ITEM_STATE_FREE before freeing skb. In brcmf_fws_bus_txq_cleanup it already sets BRCMF_FWS_HANGER_ITEM_STATE_FREE before freeing skb, therefore we add the same thing in brcmf_fws_psq_flush to avoid following warning message. [ 1580.012880] ------------ [ cut here ]------------ [ 1580.017550] WARNING: CPU: 3 PID: 3065 at drivers/net/wireless/broadcom/brcm80211/brcmutil/utils.c:49 brcmu_pkt_buf_free_skb+0x21/0x30 [brcmutil] [ 1580.184017] Call Trace: [ 1580.186514] brcmf_fws_cleanup+0x14e/0x190 [brcmfmac] [ 1580.191594] brcmf_fws_del_interface+0x70/0x90 [brcmfmac] [ 1580.197029] brcmf_proto_bcdc_del_if+0xe/0x10 [brcmfmac] [ 1580.202418] brcmf_remove_interface+0x69/0x190 [brcmfmac] [ 1580.207888] brcmf_detach+0x90/0xe0 [brcmfmac] [ 1580.212385] brcmf_usb_disconnect+0x76/0xb0 [brcmfmac] [ 1580.217557] usb_unbind_interface+0x72/0x260 [ 1580.221857] device_release_driver_internal+0x141/0x200 [ 1580.227152] device_release_driver+0x12/0x20 [ 1580.231460] bus_remove_device+0xfd/0x170 [ 1580.235504] device_del+0x1d9/0x300 [ 1580.239041] usb_disable_device+0x9e/0x270 [ 1580.243160] usb_disconnect+0x94/0x270 [ 1580.246980] hub_event+0x76d/0x13b0 [ 1580.250499] process_one_work+0x144/0x360 [ 1580.254564] worker_thread+0x4d/0x3c0 [ 1580.258247] kthread+0x109/0x140 [ 1580.261515] ? rescuer_thread+0x340/0x340 [ 1580.265543] ? kthread_park+0x60/0x60 [ 1580.269237] ? SyS_exit_group+0x14/0x20 [ 1580.273118] ret_from_fork+0x25/0x30 [ 1580.300446] ------------ [ cut here ]------------ Acked-by: Arend van Spriel Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200624091608.25154-2-wright.feng@cypress.com commit 7836102a750a92ddec19b7cd997a76f05c0a16ea Author: Chi-Hsien Lin Date: Mon Jun 22 09:48:51 2020 -0500 brcmfmac: reset SDIO bus on a firmware crash commit 4684997d9eea ("brcmfmac: reset PCIe bus on a firmware crash") adds a reset function to recover firmware trap for PCIe bus. This commit adds an implementation for SDIO bus. Upon SDIO firmware trap, do below: - Remove the device - Reset hardware - Probe the device again Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200622144851.165248-1-chi-hsien.lin@cypress.com commit 0d9de08da52a6cbda290d125d96a0015e172186f Author: Able Liao Date: Thu Jun 18 11:07:39 2020 -0500 brcmfmac: do not disconnect for disassoc frame from unconnected AP Ignore FW event if the event's BSSID is different form the BSSID of the currently connected AP. Check interface state is connected or not, if state is not connected that can ignore link down event. Signed-off-by: Able Liao Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200618160739.21457-4-chi-hsien.lin@cypress.com commit 1b050d9711f9ce3657d00cca48d767d1ac622b6d Author: Soontak Lee Date: Thu Jun 18 11:07:38 2020 -0500 brcmfmac: Fix for wrong disconnection event source information Current brcmf_link_down() always call cfg80211_disconnected() with locally_generated=1, which is not always the case. Add event source argument on link down handler and set locally_generated based on the real trigger. Signed-off-by: Soontak Lee Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200618160739.21457-3-chi-hsien.lin@cypress.com commit d9429d03b6bcf32430e96295febdd41ee39cc0e8 Author: Soontak Lee Date: Thu Jun 18 11:07:37 2020 -0500 brcmfmac: Fix for unable to return to visible SSID Unable to change back to visiable SSID because there is no disable hidden ssid routine. Signed-off-by: Soontak Lee Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200618160739.21457-2-chi-hsien.lin@cypress.com commit bcbb9d812eead97e1fc01b223c0c5586a4ff08d9 Author: Johan Hovold Date: Mon Jul 13 12:55:13 2020 +0200 USB: serial: cp210x: disable interface on errors in open Try to disable the serial interface in the unlikely event that generic open() fails. Link: https://lore.kernel.org/r/20200713105517.27796-2-johan@kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 51e3a64fafd534dfe1da1c53dc6917a51f0ba75c Author: Lucas De Marchi Date: Mon Jul 13 11:23:21 2020 -0700 drm/i915/dg1: Add fake PCH DG1 has the south engine display on the same PCI device. Ideally we could use HAS_PCH_SPLIT(), but that macro is misused all across the code base to rather signify a range of gens. So add a fake one for DG1 to be used where needed. Cc: Aditya Swarup Signed-off-by: Lucas De Marchi Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20200713182321.12390-6-lucas.demarchi@intel.com commit f619e51672e867f86433b63c896b30b39a4ca8a0 Author: Anusha Srivatsa Date: Mon Jul 13 11:23:20 2020 -0700 drm/i915/dg1: Remove SHPD_FILTER_CNT register programming Bspec asks us to remove the special programming of the SHPD_FILTER_CNT register which we have been doing since CNP+. Bspec: 49305 Cc: Matt Roper Signed-off-by: Anusha Srivatsa Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200713182321.12390-5-lucas.demarchi@intel.com commit 97b492f5f98357c5238d74b1070d42c5fe4ac75d Author: Lucas De Marchi Date: Mon Jul 13 11:23:19 2020 -0700 drm/i915/dg1: add support for the master unit interrupt DG1 has master unit interrupt register which is used to indicate the correct source of interrupt. v2: fix coding style on register definition Cc: Radhakrishna Sripada Cc: Daniele Spurio Ceraolo Cc: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200713182321.12390-4-lucas.demarchi@intel.com commit fd38cdb8110533f7c7150e79f18b716fd2981e8c Author: Abdiel Janulgue Date: Mon Jul 13 11:23:18 2020 -0700 drm/i915/dg1: Add DG1 PCI IDs Add the PCI ID for DG1, but keep it out of the table we use to register the driver. At this point we can't consider the driver ready to bind to the device since we basically miss support for everything. When more support is merged we can enable it to work partially for example as a display-only driver. v2: remove DG1 from the pci table and reword commit message (Lucas) Bspec: 44463 Cc: Matthew Auld Cc: James Ausmus Cc: Joonas Lahtinen Cc: Matt Roper Signed-off-by: Abdiel Janulgue Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza # v1 Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200713182321.12390-3-lucas.demarchi@intel.com commit 05e265841f7eb87f84308935d78e8c18fa2a76ce Author: Abdiel Janulgue Date: Mon Jul 13 11:23:17 2020 -0700 drm/i915/dg1: add initial DG-1 definitions Bspec: 33617, 33617 v2: s/intel_dg1_info/dg1_info/ as done for other platforms before and try to shut up compiler about ununsed variable that we know shouldn't be used (Lucas) v3: replace explicit attribute with __maybe_unused (Lucas) Cc: José Roberto de Souza Cc: Daniele Ceraolo Spurio Cc: Stuart Summers Cc: Vanshidhar Konda Cc: Lucas De Marchi Cc: Aravind Iddamsetty Cc: Matt Roper Signed-off-by: Abdiel Janulgue Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200713182321.12390-2-lucas.demarchi@intel.com commit 2ffcfd8def00265c2f1f9fc711104fcd656101f9 Author: Stuart Summers Date: Mon Jul 13 11:23:16 2020 -0700 drm/i915: Add has_master_unit_irq flag Add flag to differentiate platforms with and without the master IRQ control bit. Signed-off-by: Stuart Summers Signed-off-by: Lucas De Marchi Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200713182321.12390-1-lucas.demarchi@intel.com commit ad96bc27032c27cf3d77b26fa71f317c67b7f940 Author: Joseph Chuang Date: Wed Jun 10 10:21:06 2020 -0500 brcmfmac: initialize the requested dwell time Commit 4905432b28b7 ("brcmfmac: Fix P2P Group Formation failure via Go-neg method") did not initialize requested_dwell properly, resulting in an always-false dwell time overflow check. Fix it by setting the correct requested_dwell value. Fixes: 4905432b28b7 ("brcmfmac: Fix P2P Group Formation failure via Go-neg method") Reported-by: kernel test robot Signed-off-by: Joseph Chuang Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200610152106.175257-7-chi-hsien.lin@cypress.com commit bbf7ae3dcb42b720943a2589cf4d0061ab3ac129 Author: Double Lo Date: Wed Jun 10 10:21:05 2020 -0500 brcmfmac: fix throughput zero stalls on PM 1 mode due to credit map This patch move the credit map setting to right place to avoid brcmf_fws_return_credits() return without setting the credit map. It fix the thoughput zero stalls issue in softAP mode when STA using PM 1 mode. Signed-off-by: Double Lo Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200610152106.175257-6-chi-hsien.lin@cypress.com commit d843246ee7614828ac5ff1d58b21b1fce853044e Author: Chung-Hsien Hsu Date: Wed Jun 10 10:21:04 2020 -0500 brcmfmac: update tx status flags to sync with firmware There is a mismatch of tx status flag values between host and firmware. It makes the host mistake the flags and have incorrect behavior of credit returns. So update the flags to sync with the firmware ones. Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200610152106.175257-5-chi-hsien.lin@cypress.com commit b41c232d33666191a1db11befc0f040fcbe664e9 Author: Amar Shankar Date: Wed Jun 10 10:21:03 2020 -0500 brcmfmac: reserve 2 credits for host tx control path It is observed that sometimes when sdiod is low in tx credits in low rssi scenarios, the data path consumes all sdiod rx all credits and there is no sdiod rx credit available for control path causing host and card to go out of sync resulting in link loss between host and card. So in order to prevent it some credits are reserved for control path. Note that TXCTL_CREDITS can't be larger than the firmware default credit update threshold 2; otherwise there will be a deadlock for both side waiting for each other. Signed-off-by: Amar Shankar Signed-off-by: Jia-Shyr Chuang Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200610152106.175257-4-chi-hsien.lin@cypress.com commit fc4aa125974d4401084eb0f4affdb92e9b75f1df Author: Jia-Shyr Chuang Date: Wed Jun 10 10:21:02 2020 -0500 brcmfmac: increase message buffer size for control packets In wifi firmware, max length of IOCTL/IOVAR buffer size is 8192. Increase the message buffer max size same as wifi firmware for control packets so return buffers can come back. Signed-off-by: Soontak Lee Signed-off-by: Jia-Shyr Chuang Signed-off-by: Chi-Hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200610152106.175257-3-chi-hsien.lin@cypress.com commit 683608bde0308b1a2143e4fce579c744e18ae229 Author: Raveendran Somu Date: Wed Jun 10 10:21:01 2020 -0500 brcmfmac: allow credit borrowing for all access categories Current credit borrowing allows only the access category BE to borrow the credits. This change is to fix the credit borrowing logic, to make borrowing available for all access categories and also to borrow only from the lower categories. This fixes WFA 802.11n certs 5.2.27 failures. Signed-off-by: Raveendran Somu Signed-off-by: Jia-Shyr Chuang Signed-off-by: Chung-Hsien Hsu Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200610152106.175257-2-chi-hsien.lin@cypress.com commit 8b404f46dd6ab845d0fa794679329d4089281ccb Author: Xin Long Date: Mon Jul 13 15:42:38 2020 +0800 xfrm: interface: not xfrmi_ipv6/ipip_handler twice As we did in the last 2 patches for vti(6), this patch is to define a new xfrm_tunnel object 'xfrmi_ipip6_handler' to register for AF_INET6, and a new xfrm6_tunnel object 'xfrmi_ip6ip_handler' to register for AF_INET. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit a8757147905ea5adee78c7a813fc080a4124f248 Author: Xin Long Date: Mon Jul 13 15:42:37 2020 +0800 ip6_vti: not register vti_ipv6_handler twice An xfrm6_tunnel object is linked into the list when registering, so vti_ipv6_handler can not be registered twice, otherwise its next pointer will be overwritten on the second time. So this patch is to define a new xfrm6_tunnel object to register for AF_INET. Fixes: 2ab110cbb0c0 ("ip6_vti: support IP6IP tunnel processing") Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit 55a48c7ec75ad8a1f4e39d271e2b5aee21150f65 Author: Xin Long Date: Mon Jul 13 15:42:36 2020 +0800 ip_vti: not register vti_ipip_handler twice An xfrm_tunnel object is linked into the list when registering, so vti_ipip_handler can not be registered twice, otherwise its next pointer will be overwritten on the second time. So this patch is to define a new xfrm_tunnel object to register for AF_INET6. Fixes: e6ce64570f24 ("ip_vti: support IPIP6 tunnel processing") Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit fa3266541b13f390eb35bdbc38ff4a03368be004 Author: Prasanna Kerekoppa Date: Thu Jun 4 02:18:35 2020 -0500 brcmfmac: To fix Bss Info flag definition Bug Bss info flag definition need to be fixed from 0x2 to 0x4 This flag is for rssi info received on channel. All Firmware branches defined as 0x4 and this is bug in brcmfmac. Signed-off-by: Prasanna Kerekoppa Signed-off-by: Chi-hsien Lin Signed-off-by: Wright Feng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200604071835.3842-6-wright.feng@cypress.com commit ec3428bb891512fb766fb266b3127aebaa2edc36 Author: Wright Feng Date: Thu Jun 4 02:18:34 2020 -0500 brcmfmac: reduce maximum station interface from 2 to 1 in RSDB mode The firmware state machines are not fully suitable for concurrent station interface support, it may hit unexpected error if we have 2 different SSIDs and the roaming scenarios concurrently. To avoid the bad user-experience if this is not fully validated, we dis-allow user to create two concurrent station interfaces. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200604071835.3842-5-wright.feng@cypress.com commit eccbf46b15bb3e35d004148f7c3a8fa8e9b26c1e Author: Wright Feng Date: Thu Jun 4 02:18:33 2020 -0500 brcmfmac: keep SDIO watchdog running when console_interval is non-zero brcmfmac host driver makes SDIO bus sleep and stops SDIO watchdog if no pending event or data. As a result, host driver does not poll firmware console buffer before buffer overflow, which leads to missing firmware logs. We should not stop SDIO watchdog if console_interval is non-zero in debug build. Signed-off-by: Wright Feng Signed-off-by: Chi-hsien Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200604071835.3842-4-wright.feng@cypress.com commit 1eb4e9f629981941f3e03c65eee2ee7178a62d4e Author: Wright Feng Date: Thu Jun 4 02:18:32 2020 -0500 brcmfmac: fix invalid permanent MAC address in wiphy When host driver retrieves mac addresses from dongle, driver copies memory from drvr->mac to perm_addr. But at the moment, drvr->mac is all zero array which causes permanent MAC address in wiphy is all zero as well. To fix this, we set drvr->mac before setting perm_addr. Signed-off-by: Wright Feng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200604071835.3842-3-wright.feng@cypress.com commit 698bae2e6ea139cd67debf7e8eb064056783b5bf Author: Raveendran Somu Date: Thu Jun 4 02:18:31 2020 -0500 brcmfmac: To fix kernel crash on out of boundary access To truncate the additional bytes, if extra bytes have been received. Current code only have a warning and proceed without handling it. But in one of the crash reported by DVT, these causes the crash intermittently. So the processing is limit to the skb->len. Signed-off-by: Raveendran Somu Signed-off-by: Chi-hsien Lin Signed-off-by: Wright Feng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200604071835.3842-2-wright.feng@cypress.com commit 910a71ed772aac3bf228e8679f000b1505c287fb Merge: 2d4c7986dbc6f e98e44562ba2e Author: Steffen Klassert Date: Tue Jul 14 11:39:58 2020 +0200 Merge remote-tracking branch 'origin/testing' Eyal Birger says: ==================== When having many xfrm interfaces, the linear lookup of devices based on if_id becomes costly. The first patch refactors xfrmi_decode_session() to use the xi used in the netdevice priv context instead of looking it up in the list based on ifindex. This is needed in order to use if_id as the only key used for xi lookup. The second patch extends the existing infrastructure - which already stores the xfrmi contexts in an array of lists - to use a hash of the if_id. Example benchmarks: - running on a KVM based VM - xfrm tunnel mode between two namespaces - xfrm interface in one namespace (10.0.0.2) Before this change set: Single xfrm interface in namespace: $ netperf -H 10.0.0.2 -l8 -I95,10 -t TCP_STREAM MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.0.0.2 () port 0 AF_INET : +/-5.000% @ 95% conf. : demo Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 131072 16384 16384 8.00 298.36 After adding 400 xfrmi interfaces in the same namespace: $ netperf -H 10.0.0.2 -l8 -I95,10 -t TCP_STREAM MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 10.0.0.2 () port 0 AF_INET : +/-5.000% @ 95% conf. : demo Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. 10^6bits/sec 131072 16384 16384 8.00 221.77 After this patchset there was no observed change after adding the xfrmi interfaces. ==================== Signed-off-by: Steffen Klassert commit 64c16f849afe342cbc5594c54ec9f1e2f1fcdacb Author: Thierry Reding Date: Tue Jul 14 11:37:30 2020 +0200 dt-bindings: tegra: Document Jetson Xavier NX (and devkit) Add the compatible strings for the Jetson Xavier NX and the corresponding developer kit. Signed-off-by: Thierry Reding commit 46b5780688c0d825b6b8d49b267b13102bea512d Author: Ikjoon Jang Date: Fri Mar 6 16:55:13 2020 +0800 dt-bindings: mfd: Convert ChromeOS EC bindings to json-schema Convert the ChromeOS EC bindings to json-schema. Signed-off-by: Ikjoon Jang Reviewed-by: Enric Balletbo i Serra Signed-off-by: Lee Jones commit 73f15a93922773322f001604a1d6c5059ab10aef Author: Daniel Vetter Date: Thu Jul 9 14:33:39 2020 +0200 drm/virtio: Remove open-coded commit-tail function Exactly matches the one in the helpers. This avoids me having to roll out dma-fence critical section annotations to this copy. Reviewed-by: Sam Ravnborg Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: David Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Link: https://patchwork.freedesktop.org/patch/msgid/20200709123339.547390-2-daniel.vetter@ffwll.ch commit cb345decb4d20b03d637869047c8cdfd2c5f34d4 Author: Daniel Vetter Date: Wed Jul 8 16:20:50 2020 +0200 drm/tilcdc: Use standard drm_atomic_helper_commit Gives us proper nonblocking support for free, and a pile of other things. The tilcdc code is simply old enough that it was never converted over, but was stuck forever with the copypasta from when it was initially merged. The riskiest thing with this conversion is maybe that there's an issue with the vblank handling or vblank event handling, which will upset the modern commit support in atomic helpers. But from a cursory review drm_crtc_vblank_on/off is called in the right places, and the event handling also seems to exist (albeit with much hand-rolling and probably some races, could perhaps be converted over to drm_crtc_arm_vblank_event without any real loss). Motivated by me not having to hand-roll the dma-fence annotations for this. v2: Clear out crtc_state->event when we're handling the event, to avoid upsetting the helpers (reported by Jyri). v3: Also send out even whent the crtc is getting disabled. Tilcdc looks a bit like conversion to simple display helpers would work out really nice. Tested-by: Jyri Sarha Reviewed-by: Jyri Sarha Signed-off-by: Daniel Vetter Cc: Jyri Sarha Cc: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200708142050.530240-1-daniel.vetter@ffwll.ch commit 5384e0019da99b2ebac84a91f10d1d82fe344d40 Author: Jon Hunter Date: Mon Jul 13 15:41:34 2020 +0100 ARM: tegra: Enable CPUFREQ userspace governor Enable the CPUFREQ userspace governor in the tegra_defconfig so that we can test CPUFREQ with the userspace governor with this configuration on 32-bit Tegra devices. Signed-off-by: Jon Hunter Signed-off-by: Thierry Reding commit 2f3f651f3756ef9beff704ae4d8d85e797df5b3b Author: Joe Lawrence Date: Fri Jul 10 14:37:45 2020 -0400 selftests/livepatch: Use "comm" instead of "diff" for dmesg BusyBox diff doesn't support the GNU diff '--LTYPE-line-format' options that were used in the selftests to filter older kernel log messages from dmesg output. Use "comm" which is more available in smaller boot environments. Reported-by: Naresh Kamboju Signed-off-by: Joe Lawrence Reviewed-by: Yannick Cote Reviewed-by: Kamalesh Babulal Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200710183745.19730-1-joe.lawrence@redhat.com commit 895a479039e0ee4c540d34f0848360ef21d10421 Author: Thomas Zimmermann Date: Tue Jul 7 10:24:11 2020 +0200 drm/mgag200: Inline mga_crtc_{prepare, commit}() into enable function There's only trivial code left in mga_crtc_{prepare,commit}(). Merge the functions into the simple pipe's enable function. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200707082411.6583-8-tzimmermann@suse.de commit 904347fb5ab40c1f4d11d76144d7cc0c8d405ef9 Author: Thomas Zimmermann Date: Tue Jul 7 10:24:10 2020 +0200 drm/mgag200: Rename G200WB prepare/commit function The prepare and commit helpers for G200WB devices control the BMC. Rename them accordingly. While at it, also change the passed value's type to struct mga_device and remove some type upcasting. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200707082411.6583-7-tzimmermann@suse.de commit 70c3881eedd072c4df88b662dc1362a63baa6a91 Author: Thomas Zimmermann Date: Tue Jul 7 10:24:09 2020 +0200 drm/mgag200: Set/clear field in display enable/disable helpers Modifying the field in mgag200_{enable,disable}_display() makes the code more readable. Also clear the field to enable the display. The other bits in SEQ0 are unused, so no functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200707082411.6583-6-tzimmermann@suse.de commit 153fef4115e886de8db2e5c58dc3bc63e7a68a09 Author: Thomas Zimmermann Date: Tue Jul 7 10:24:08 2020 +0200 drm/mgag200: Split DPMS function into helpers Of the DPMS code, only ON and OFF states are used. Simplify mode setting by moving both into separate functions and removing the rest. The original code busy waited in the middle of updating the screen state in SEQ1. To simplify the procedure, the new code busy waits first and then updates SEQ1 in one chunk. The DPMS code also set the LUT before enabling the screen. The patch moves this code into the simple-display pipe's enable function. v2: * comment on SEQ1 updates in commit message Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200707082411.6583-5-tzimmermann@suse.de commit 379ba8043db2251302dbe623013effa696e52b2a Author: Thomas Zimmermann Date: Tue Jul 7 10:24:07 2020 +0200 drm/mgag200: Don't set or clear field during modeset The simple pipe's disable function disables the screen by calling mgag200_disable_screen(). The simple pipe's enable function enables the screen by calling mgag200_enable_display(). During modeset operations the screen is off and remains off. It's only enabled after the modeset has been completed. Therefore remove all code that sets or clears the field while in modeset. The related code also modifies the field in SEQ0. For now, keep this code in place. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200707082411.6583-4-tzimmermann@suse.de commit fc42e89fe514cecc52b8547ffb7784a758c2c450 Author: Thomas Zimmermann Date: Tue Jul 7 10:24:06 2020 +0200 drm/mgag200: Move PLL setup out of mode-setting function Makes the code slightly more flexible. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200707082411.6583-3-tzimmermann@suse.de commit da568d5e352c95c6278ddc2778cbd36b5ea65b09 Author: Thomas Zimmermann Date: Tue Jul 7 10:24:05 2020 +0200 drm/mgag200: Don't write-protect CRTC 0-7 while in mga_crtc_prepare() The prepare function write-protects several registers that it doesn't even touch. Removed the related code. The code for unprotecting registers also clears VINT interrupts. Both is now done once during initialization. Signed-off-by: Thomas Zimmermann Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200707082411.6583-2-tzimmermann@suse.de commit 41d2d848e5c09209bdb57ff9c0ca34075e22783d Author: Artur Paszkiewicz Date: Fri Jul 3 11:13:09 2020 +0200 md: improve io stats accounting Use generic io accounting functions to manage io stats. There was an attempt to do this earlier in commit 18c0b223cf99 ("md: use generic io stats accounting functions to simplify io stat accounting"), but it did not include a call to generic_end_io_acct() and caused issues with tracking in-flight IOs, so it was later removed in commit 74672d069b29 ("md: fix md io stats accounting broken"). This patch attempts to fix this by using both disk_start_io_acct() and disk_end_io_acct(). To make it possible, a struct md_io is allocated for every new md bio, which includes the io start_time. A new mempool is introduced for this purpose. We override bio->bi_end_io with our own callback and call disk_start_io_acct() before passing the bio to md_handle_request(). When it completes, we call disk_end_io_acct() and the original bi_end_io callback. This adds correct statistics about in-flight IOs and IO processing time, interpreted e.g. in iostat as await, svctm, aqu-sz and %util. It also fixes a situation where too many IOs where reported if a bio was re-submitted to the mddev, because io accounting is now performed only on newly arriving bios. Acked-by: Guoqing Jiang Signed-off-by: Artur Paszkiewicz Signed-off-by: Song Liu commit 9a5a85972c073f720d81a7ebd08bfe278e6e16db Author: Colin Ian King Date: Thu Jul 2 12:35:02 2020 +0100 md: raid0/linear: fix dereference before null check on pointer mddev Pointer mddev is being dereferenced with a test_bit call before mddev is being null checked, this may cause a null pointer dereference. Fix this by moving the null pointer checks to sanity check mddev before it is dereferenced. Addresses-Coverity: ("Dereference before null check") Fixes: 62f7b1989c02 ("md raid0/linear: Mark array as 'broken' and fail BIOs if a member is gone") Signed-off-by: Colin Ian King Reviewed-by: Guilherme G. Piccoli Signed-off-by: Song Liu commit 4a3107f61f1ce2c8ccd4dde8ae655ae3f2996f35 Author: Rajendra Nayak Date: Tue Jul 14 11:01:49 2020 +0530 tty: serial: qcom-geni-serial: Drop the icc bw votes in suspend for console When using the geni-serial as console, its important to be able to hit the lowest possible power state in suspend, even with no_console_suspend. The only thing that prevents it today on platforms like the sc7180 is the interconnect BW votes, which we certainly don't need when the system is in suspend. So in the suspend handler mark them as ACTIVE_ONLY (0x3) and on resume switch them back to the ALWAYS tag (0x7) Signed-off-by: Rajendra Nayak Reviewed-by: Akash Asthana Tested-by: Matthias Kaehlcke Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1594704709-26072-1-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 7a1e6fb1c606d414320b7498e7f8357d73c972e5 Author: Bjorn Andersson Date: Mon Jun 22 00:59:55 2020 -0700 hwspinlock: qcom: Allow mmio usage in addition to syscon In modern Qualcomm platforms the mutex region of the TCSR is forked off into its own block, all with a offset of 0 and stride of 4096, and in some of these platforms no other registers in this region is accessed from Linux. So add support for directly memory mapping this register space, to avoid the need to represent this block using a syscon. Reviewed-by: Baolin Wang Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622075956.171058-4-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit d6a9f0c8f635a9177e39db6386575bd6cdd55931 Author: Bjorn Andersson Date: Mon Jun 22 00:59:54 2020 -0700 dt-bindings: hwlock: qcom: Allow device on mmio bus In modern Qualcomm platforms the mutex region of the TCSR is forked off into its own block, all with a offset of 0 and stride of 4096, and in some of these platforms no other registers in this region is accessed from Linux. Update the binding to allow the hardware block to be described directly on the mmio bus, in addition to allowing the existing syscon based definition for backwards compatibility. Reviewed-by: Vinod Koul Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622075956.171058-3-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit a7541de9abed7cee7df0012214b1962e892885cc Author: Bjorn Andersson Date: Mon Jun 22 00:59:53 2020 -0700 dt-bindings: hwlock: qcom: Migrate binding to YAML Migrate the Qualcomm TCSR mutex binding to YAML to allow validation. Reviewed-by: Vinod Koul Reviewed-by: Rob Herring Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622075956.171058-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit f7d40ee7eff8fde2b0701b80c2aa3ba354f8f520 Author: Alexei Starovoitov Date: Mon Jul 13 20:55:48 2020 -0700 selftests/bpf: Fix merge conflict resolution Remove double definition of structs. Fixes: 71930d61025e ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net") Signed-off-by: Alexei Starovoitov commit 30f67481a18b85abae6099ef3196294072994870 Author: Douglas Gilbert Date: Sun Jul 12 14:29:27 2020 -0400 scsi: scsi_debug: Update documentation url and bump version This driver maintains a version number which is cross-referenced in the documentation (e.g. to indicate when features are added or changed) and exposed through the responses to various SCSI commands. For example the version number is use as the Product Revision number in standard SCSI INQUIRY responses issued by this driver. The version date string is placed in a vendor specific area in each standard SCSI INQUIRY response. This patch bumps both. Update the driver documentation URL that appears at the top of the driver source file. Link: https://lore.kernel.org/r/20200712182927.72044-3-dgilbert@interlog.com Signed-off-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 3a90a63d02b8b7e8348d7549f55d24e1bb3a293f Author: Douglas Gilbert Date: Sun Jul 12 14:29:26 2020 -0400 scsi: scsi_debug: every_nth triggered error injection This patch simplifies, or at least makes more consistent, the way setting the every_nth parameter injects errors. Here is a list of 'opts' flags and in which cases they inject errors when abs(every_nth)%command_count == 0 is reached: - OPT_RECOVERED_ERR: issued on READ(*)s, WRITE(*)s and WRITE_SCATTEREDs - OPT_DIF_ERR: issued on READ(*)s, WRITE(*)s and WRITE_SCATTEREDs - OPT_DIX_ERR: issued on READ(*)s, WRITE(*)s and WRITE_SCATTEREDs - OPT_SHORT_TRANSFER: issued on READ(*)s - OPT_TRANSPORT_ERR: issued on all commands - OPT_CMD_ABORT: issued on all commands The other uses of every_nth were not modified. Previously if, for example, OPT_SHORT_TRANSFER was armed then if (abs(every_nth) % command_count == 0) occurred during a command that was _not_ a READ, then no error injection occurred. This behaviour puzzled several testers. Now a global "inject_pending" flag is set and the _next_ READ will get hit and that flag is cleared. OPT_RECOVERED_ERR, OPT_DIF_ERR and OPT_DIX_ERR have similar behaviour. A downside of this is that there might be a hang-over pending injection that gets triggered by a following test. Also expand the every_nth runtime parameter so that it can take hex value (i.e. with a leading '0x') as well as a decimal value. Now both the 'opts' and the 'every_nth' runtime parameters can take hexadecimal values. Link: https://lore.kernel.org/r/20200712182927.72044-2-dgilbert@interlog.com Signed-off-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit c10fa55f5e7ad3638237dd66fcb28a7225acdff8 Author: John Garry Date: Thu Jul 9 20:23:20 2020 +0800 scsi: scsi_debug: Support hostwide tags Many SCSI HBAs support a hostwide tagset, whereby each command submitted to the HW from all submission queues must have a unique tag identifier. Normally this unique tag will be in the range [0, max queue], where "max queue" is the depth of each of the submission queues. Add support for this hostwide tag feature, via module parameter "host_max_queue". A non-zero value means that the feature is enabled. In this case, the submission queues are not exposed to upper layer, i.e. from blk-mq prespective, the device has a single hw queue. There are 2 reasons for this: a. It is assumed that the host can support nr_hw_queues * can_queue commands, but this is not true for hostwide tags b. For nr_hw_queues != 0, the request tag is not unique over all HW queues, and some HBA drivers want to use this tag for the hostwide tag However, like many SCSI HBA drivers today - megaraid sas being an example - the full set of HW submission queues are still used in the LLDD driver. So instead of using a complicated "reply_map" to create a per-CPU submission queue mapping like megaraid_sas (as it depends on a PCI device + MSIs) - use a simple algorithm: hwq = cpu % queue count If the host_max_queue param is set non-zero, then the max queue depth is fixed at this value also. If and when hostwide shared tags are supported in blk-mq/scsi mid-layer, then the policy to set nr_hw_queues = 0 for hostwide tags can be revised. Link: https://lore.kernel.org/r/1594297400-24756-3-git-send-email-john.garry@huawei.com Acked-by: Douglas Gilbert Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit c87bf24cfb60bce27b4d2c7e56ebfd86fb9d16bb Author: John Garry Date: Thu Jul 9 20:23:19 2020 +0800 scsi: scsi_debug: Add check for sdebug_max_queue during module init sdebug_max_queue should not exceed SDEBUG_CANQUEUE, otherwise crashes like this can be triggered by passing an out-of-range value: Hardware name: Huawei D06 /D06, BIOS Hisilicon D06 UEFI RC0 - V1.16.01 03/15/2019 pstate: 20400009 (nzCv daif +PAN -UAO BTYPE=--) pc : schedule_resp+0x2a4/0xa70 [scsi_debug] lr : schedule_resp+0x52c/0xa70 [scsi_debug] sp : ffff800022ab36f0 x29: ffff800022ab36f0 x28: ffff0023a935a610 x27: ffff800008e0a648 x26: 0000000000000003 x25: ffff0023e84f3200 x24: 00000000003d0900 x23: 0000000000000000 x22: 0000000000000000 x21: ffff0023be60a320 x20: ffff0023be60b538 x19: ffff800008e13000 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000000 x9 : 0000000000000001 x8 : 0000000000000000 x7 : 0000000000000000 x6 : 00000000000000c1 x5 : 0000020000200000 x4 : dead0000000000ff x3 : 0000000000000200 x2 : 0000000000000200 x1 : ffff800008e13d88 x0 : 0000000000000000 Call trace: schedule_resp+0x2a4/0xa70 [scsi_debug] scsi_debug_queuecommand+0x2c4/0x9e0 [scsi_debug] scsi_queue_rq+0x698/0x840 __blk_mq_try_issue_directly+0x108/0x228 blk_mq_request_issue_directly+0x58/0x98 blk_mq_try_issue_list_directly+0x5c/0xf0 blk_mq_sched_insert_requests+0x18c/0x200 blk_mq_flush_plug_list+0x11c/0x190 blk_flush_plug_list+0xdc/0x110 blk_finish_plug+0x38/0x210 blkdev_direct_IO+0x450/0x4d8 generic_file_read_iter+0x84/0x180 blkdev_read_iter+0x3c/0x50 aio_read+0xc0/0x170 io_submit_one+0x5c8/0xc98 __arm64_sys_io_submit+0x1b0/0x258 el0_svc_common.constprop.3+0x68/0x170 do_el0_svc+0x24/0x90 el0_sync_handler+0x13c/0x1a8 el0_sync+0x158/0x180 Code: 528847e0 72a001e0 6b00003f 540018cd (3941c340) In addition, it should not be less than 1. So add checks for these, and fail the module init for those cases. [mkp: changed if condition to match error message] Link: https://lore.kernel.org/r/1594297400-24756-2-git-send-email-john.garry@huawei.com Fixes: c483739430f1 ("scsi_debug: add multiple queue support") Reviewed-by: Ming Lei Acked-by: Douglas Gilbert Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 3d570a28ee8d7e724fc740019746a6e79c8db06c Author: John Garry Date: Mon Jul 13 16:04:31 2020 +0800 scsi: hisi_sas: Remove one kerneldoc comment The comment for interrupt_init_v2_hw() should not be a kerneldoc comment. Remove it. Link: https://lore.kernel.org/r/1594627471-235395-3-git-send-email-john.garry@huawei.com Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 05d91b557af91fd7870b5d413102e2e902e5a5fc Author: Luo Jiaxing Date: Mon Jul 13 16:04:30 2020 +0800 scsi: hisi_sas: Directly trigger SCSI error handling for completion errors Abort failed commands in completion path. This avoids having to wait for block layer timeouts and triggering the SCSI error handling thread. Link: https://lore.kernel.org/r/1594627471-235395-2-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 46426552e74fd38e43aa95af17487d3cc285d71f Author: Stanley Chu Date: Sun Jul 12 08:32:26 2020 +0800 scsi: ufs-mediatek: Add inline encryption support Add inline encryption support to ufs-mediatek. The standards-compliant parts, such as querying the crypto capabilities and enabling crypto for individual UFS requests, are already handled by ufshcd-crypto.c, which itself is wired into the blk-crypto framework. However MediaTek UFS host requires a vendor-specific hce_enable operation to allow crypto-related registers being accessed normally in kernel. After this step, MediaTek UFS host can work as standard-compliant host for inline-encryption related functions. Link: https://lore.kernel.org/r/20200712003226.7593-1-stanley.chu@mediatek.com Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 30f259b4886a0d0121e03516bbff6f057a52a0b2 Author: Dan Carpenter Date: Mon Jul 13 10:51:00 2020 +0000 scsi: cxgb4i: Clean up a debug printk The pr_fmt() at the top of the file already includes the __func__ so we can remove the duplicative "cxgbi_conn_init_pdu:" from the string here. Now it all fits on one line as well. Link: https://lore.kernel.org/r/20200713105100.GA251988@mwanda Acked-by: Varun Prakash Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 92e8d0323a5140c3e4a0e7098d3a5f43e2da87e8 Author: Xianting Tian Date: Thu Jul 9 11:06:07 2020 -0400 scsi: virtio_scsi: Remove unnecessary condition check kmem_cache_destroy() and mempool_destroy() both correctly handle null pointer parameters. There is no need to check if the parameter is null before calling these functions. Link: https://lore.kernel.org/r/1594307167-8807-1-git-send-email-xianting_tian@126.com Reviewed-by: Paolo Bonzini Acked-by: Paolo Bonzini Signed-off-by: Xianting Tian Signed-off-by: Martin K. Petersen commit b92a4a9f7be80fd519fc12c976a1bc7abbabf9a5 Author: Colin Ian King Date: Thu Jul 9 14:52:17 2020 +0100 scsi: cxgb4i: Fix dereference of pointer tdata before it is null checked Currently pointer tdata is being dereferenced on the initialization of pointer skb before tdata is null checked. This could lead to a potential null pointer dereference. Fix this by dereferencing tdata after tdata has been null pointer sanity checked. Link: https://lore.kernel.org/r/20200709135217.1408105-1-colin.king@canonical.com Fixes: e33c2482289b ("scsi: cxgb4i: Add support for iSCSI segmentation offload") Addresses-Coverity: ("Dereference before null check") Acked-by: Varun Prakash Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit dd06a40201fe8a4db8071b4939fafc5905557b01 Author: Wei Yongjun Date: Thu Jul 9 19:46:36 2020 +0800 scsi: target: Remove unused variable 'tpg' Gcc reports warning as follows: drivers/target/target_core_pr.c:1162:26: warning: variable 'tpg' set but not used [-Wunused-but-set-variable] 1162 | struct se_portal_group *tpg; | ^~~ After commit 63c9ffe473d3 ("scsi: target: Check enforce_pr_isids during registration"), 'tpg' is never used. Remove it to avoid build warning. Link: https://lore.kernel.org/r/20200709114636.69256-1-weiyongjun1@huawei.com Reported-by: Hulk Robot Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Reviewed-by: Mike Christie Signed-off-by: Wei Yongjun Signed-off-by: Martin K. Petersen commit 6edfdcfe285e499994b94a0f93e1f46ab2398162 Author: Stanley Chu Date: Mon Jul 6 14:07:07 2020 +0800 scsi: ufs: Fix and simplify setup_xfer_req variant operation Add missing setup_xfer_req() call in ufshcd_issue_devman_upiu_cmd() in ufs-bsg path. Relocate existing setup_xfer_req() calls to a common place, i.e., ufshcd_send_command(), to simplify the driver. Link: https://lore.kernel.org/r/20200706060707.32608-3-stanley.chu@mediatek.com Acked-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit a3170376f7db3429fbee655d23cdca29ac447405 Author: Stanley Chu Date: Mon Jul 6 14:07:06 2020 +0800 scsi: ufs: Simplify completion timestamp for SCSI and query commands Simplify recording command completion time in __ufshcd_transfer_req_compl() by assigning lrbp->compl_time_stamp in a unified location. Link: https://lore.kernel.org/r/20200706060707.32608-2-stanley.chu@mediatek.com Acked-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit c46ed28dbe95844c1d15addd26ff05499057c4d5 Author: Krzysztof Kozlowski Date: Thu Jul 2 17:51:42 2020 +0200 dt-bindings: pwm: samsung: Do not require interrupts on Exynos SoCs The bindings required interrupts for all SoCs but actually only the PWM timer clocksource (for S3C/S5P SoCs) was using them. This PWM timer clocksource driver is not used on Exynos SoCs thus the interrupts can be marked as optional. Reported-by: Alim Akhtar Acked-by: Uwe Kleine-König Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200702155149.12854-1-krzk@kernel.org Signed-off-by: Rob Herring commit 44e1655a444fe7a1bd81994d34c6bbb5245b9e60 Author: Rob Herring Date: Tue Jun 30 14:01:11 2020 -0600 dt-bindings: backlight: Convert common backlight bindings to DT schema Convert the common GPIO, LED, and PWM backlight bindings to DT schema format. Given there's only 2 common properties and the descriptions are slightly different, I opted to not create a common backlight schema. Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han Cc: Sam Ravnborg Acked-by: Sam Ravnborg Link: https://lore.kernel.org/r/20200630200111.1170742-1-robh@kernel.org Signed-off-by: Rob Herring commit 038fb87fa3314e001de2dd4cf20a74fa623ac7ad Author: Yoshihiro Shimoda Date: Mon Jun 22 19:37:32 2020 +0900 dt-bindings: usb: renesas,usb-xhci: convert to YAML Convert Renesas related parts of usb-xhci to YAML because they are not compatible with generic-xhci. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1592822252-12338-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Rob Herring commit 07dd1b7e68e4b83a1004b14dffd7e142c0bc79bd Merge: bfe4c40333065 8afb259a9840f Author: David S. Miller Date: Mon Jul 13 18:04:05 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2020-07-13 The following pull-request contains BPF updates for your *net-next* tree. We've added 36 non-merge commits during the last 7 day(s) which contain a total of 62 files changed, 2242 insertions(+), 468 deletions(-). The main changes are: 1) Avoid trace_printk warning banner by switching bpf_trace_printk to use its own tracing event, from Alan. 2) Better libbpf support on older kernels, from Andrii. 3) Additional AF_XDP stats, from Ciara. 4) build time resolution of BTF IDs, from Jiri. 5) BPF_CGROUP_INET_SOCK_RELEASE hook, from Stanislav. ==================== Signed-off-by: David S. Miller commit bfe4c40333065639cf0f364b8ea9e93270781699 Author: Alexander A. Klimov Date: Mon Jul 13 22:48:12 2020 +0200 wan: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit da6e8ace5623290490a9466f5aba9e40c925ce1b Author: Christophe JAILLET Date: Mon Jul 13 22:18:45 2020 +0200 pcnet32: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GPF_ with a correct flag. It has been compile tested. When memory is allocated in 'pcnet32_realloc_tx_ring()' and 'pcnet32_realloc_rx_ring()', GFP_ATOMIC must be used because a spin_lock is hold. The call chain is: pcnet32_set_ringparam ** spin_lock_irqsave(&lp->lock, flags); --> pcnet32_realloc_tx_ring --> pcnet32_realloc_rx_ring ** spin_unlock_irqrestore(&lp->lock, flags); When memory is in 'pcnet32_probe1()' and 'pcnet32_alloc_ring()', GFP_KERNEL can be used. While at it, update a few comments and pr_err messages to be more in line with the new function names. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 428f09c2b757689edf778ae039ceb8a88475084d Author: Christophe JAILLET Date: Mon Jul 13 21:55:03 2020 +0200 amd8111e: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GPF_ with a correct flag. It has been compile tested. When memory is allocated in 'amd8111e_init_ring()', GFP_ATOMIC must be used because a spin_lock is hold. One of the call chains is: amd8111e_open ** spin_lock_irq(&lp->lock); --> amd8111e_restart --> amd8111e_init_ring ** spin_unlock_irq(&lp->lock); The rest of the patch is produced by coccinelle with a few adjustments to please checkpatch.pl. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 350d1931423c6bc683058b8d497a118576754fbc Author: Alexander A. Klimov Date: Mon Jul 13 19:34:47 2020 +0200 net: wan: cosa: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit d788a0b512f5f97d00286e9c1438517e40d19703 Author: Alexander A. Klimov Date: Mon Jul 13 19:24:39 2020 +0200 net: jme: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit a7d02782357b5d2f07d1d00b522da2613f649b53 Author: Alexander A. Klimov Date: Mon Jul 13 19:14:29 2020 +0200 net: ethernet: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit 35c891e161d9621217028495dc44070aba314c89 Merge: 5d037b4d3df7b 77710929da135 Author: David S. Miller Date: Mon Jul 13 17:40:02 2020 -0700 Merge branch 'New-DSA-driver-for-VSC9953-Seville-switch' Vladimir Oltean says: ==================== New DSA driver for VSC9953 Seville switch Looking at the Felix and Ocelot drivers, Maxim asked if it would be possible to use them as a base for a new driver for the Seville switch inside NXP T1040. Turns out, it is! The result is that the mscc_felix driver was extended to probe on Seville. The biggest challenge seems to be getting register read/write API generic enough to cover such wild bitfield variations between hardware generations. Currently, both felix and seville are built under the same kernel config option (NET_DSA_MSCC_FELIX). This has both some advantages (no need to duplicate the Lynx PCS code from felix_vsc9959.c) and some disadvantages (Seville needs to depend on PCI and on ENETC_MDIO). This will be further refined as time progresses. The driver has been completely reviewed. Previous submission was here, it wasn't accepted due to a conflict with Mark Brown's tree, very late in the release cycle: https://patchwork.ozlabs.org/project/netdev/cover/20200531122640.1375715-1-olteanv@gmail.com/ So this is more of a repost, with the only changes being related to rebasing on top of the cleanup I had to do in Ocelot. ==================== Signed-off-by: David S. Miller commit 77710929da1359cfca1f214ffd5ad8f32f8d72ed Author: Vladimir Oltean Date: Mon Jul 13 19:57:11 2020 +0300 docs: devicetree: add bindings for Seville DSA switch inside Felix driver There are no non-standard bindings being used. However Felix is a PCI device and Seville is a platform device. So give an example of device tree for this switch and document its compatible string. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 84705fc165526e8e55d208b2b10a48cc720a106a Author: Maxim Kochetkov Date: Mon Jul 13 19:57:10 2020 +0300 net: dsa: felix: introduce support for Seville VSC9953 switch This is another switch from Vitesse / Microsemi / Microchip, that has 10 ports (8 external, 2 internal) and is integrated into the Freescale / NXP T1040 PowerPC SoC. It is very similar to Felix from NXP LS1028A, except that this is a platform device and Felix is a PCI device, and it doesn't support IEEE 1588 and TSN. Like Felix, this driver configures its own PCS on the internal MDIO bus using a phy_device abstraction for it (yes, it will be refactored to use a raw mdio_device, like other phylink drivers do, but let's keep it like that for now). But unlike Felix, the MDIO bus and the PCS are not from the same vendor. The PCS is the same QorIQ/Layerscape PCS as found in Felix/ENETC/DPAA*, but the internal MDIO bus that is used to access it is actually an instantiation of drivers/net/phy/mdio-mscc-miim.c. But it would be difficult to reuse that driver (it doesn't even use regmap, and it's less than 200 lines of code), so we hand-roll here some internal MDIO bus accessors within seville_vsc9953.c, which serves the purpose of driving the PCS absolutely fine. Also, same as Felix, the PCS doesn't support dynamic reconfiguration of SerDes protocol, so we need to do pre-validation of PHY mode from device tree and not let phylink change it. Signed-off-by: Maxim Kochetkov Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 375e131429219486e581df8bd11b0dff87f0895a Author: Vladimir Oltean Date: Mon Jul 13 19:57:09 2020 +0300 net: dsa: felix: move probing to felix_vsc9959.c Felix is not actually meant to be a DSA driver only for the switch inside NXP LS1028A, but an umbrella for all Vitesse / Microsemi / Microchip switches that are register-compatible with Ocelot and that are using in DSA mode (with an NPI Ethernet port). For the dsa_switch_ops exported by the felix driver to be generic enough to be used by other non-PCI switches, we need to move the PCI-specific probing to the low-level translation module felix_vsc9959.c. This way, other switches can have their own probing functions, as platform devices or otherwise. This patch also removes the "Felix instance table", which did not stand the test of time and is unnecessary at this point. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit aa92d836d5c40a7e21e563a272ad177f1bfd44dd Author: Maxim Kochetkov Date: Mon Jul 13 19:57:08 2020 +0300 net: mscc: ocelot: extend watermark encoding function The ocelot_wm_encode function deals with setting thresholds for pause frame start and stop. In Ocelot and Felix the register layout is the same, but for Seville, it isn't. The easiest way to accommodate Seville hardware configuration is to introduce a function pointer for setting this up. Signed-off-by: Maxim Kochetkov Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 541132f0961a4f17b02974902085af964adf5966 Author: Maxim Kochetkov Date: Mon Jul 13 19:57:07 2020 +0300 net: mscc: ocelot: convert SYS_PAUSE_CFG register access to regfield Seville has a different bitwise layout than Ocelot and Felix. Signed-off-by: Maxim Kochetkov Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b39648079db40874df97c5104066f8a9fc3daa0c Author: Vladimir Oltean Date: Mon Jul 13 19:57:06 2020 +0300 net: mscc: ocelot: disable flow control on NPI interface The Ocelot switches do not support flow control on Ethernet interfaces where a DSA tag must be added. If pause frames are enabled, they will be encapsulated in the DSA tag just like regular frames, and the DSA master will not recognize them. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e8e6e73db14273464b374d49ca7242c0994945f3 Author: Vladimir Oltean Date: Mon Jul 13 19:57:05 2020 +0300 net: mscc: ocelot: split writes to pause frame enable bit and to thresholds We don't want ocelot_port_set_maxlen to enable pause frame TX, just to adjust the pause thresholds. Move the unconditional enabling of pause TX to ocelot_init_port. There is no good place to put such setting because it shouldn't be unconditional. But at the moment it is, we're not changing that. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 67c2404922c2c3f9cc0898aafaa4e3bea2bde084 Author: Vladimir Oltean Date: Mon Jul 13 19:57:04 2020 +0300 net: dsa: felix: create a template for the DSA tags on xmit With this patch we try to kill 2 birds with 1 stone. First of all, some switches that use tag_ocelot.c don't have the exact same bitfield layout for the DSA tags. The destination ports field is different for Seville VSC9953 for example. So the choices are to either duplicate tag_ocelot.c into a new tag_seville.c (sub-optimal) or somehow take into account a supposed ocelot->dest_ports_offset when packing this field into the DSA injection header (again not ideal). Secondly, tag_ocelot.c already needs to memset a 128-bit area to zero and call some packing() functions of dubious performance in the fastpath. And most of the values it needs to pack are pretty much constant (BYPASS=1, SRC_PORT=CPU, DEST=port index). So it would be good if we could improve that. The proposed solution is to allocate a memory area per port at probe time, initialize that with the statically defined bits as per chip hardware revision, and just perform a simpler memcpy in the fastpath. Other alternatives have been analyzed, such as: - Create a separate tag_seville.c: too much code duplication for just 1 bit field difference. - Create a separate DSA_TAG_PROTO_SEVILLE under tag_ocelot.c, just like tag_brcm.c, which would have a separate .xmit function. Again, too much code duplication for just 1 bit field difference. - Allocate the template from the init function of the tag_ocelot.c module, instead of from the driver: couldn't figure out a method of accessing the correct port template corresponding to the correct tagger in the .xmit function. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 886e1387c73d895ad0eff53353913081983570c0 Author: Vladimir Oltean Date: Mon Jul 13 19:57:03 2020 +0300 net: mscc: ocelot: convert QSYS_SWITCH_PORT_MODE and SYS_PORT_MODE to regfields Currently Felix and Ocelot share the same bit layout in these per-port registers, but Seville does not. So we need reg_fields for that. Actually since these are per-port registers, we need to also specify the number of ports, and register size per port, and use the regmap API for multiple ports. There's a more subtle point to be made about the other 2 register fields: - QSYS_SWITCH_PORT_MODE_SCH_NEXT_CFG - QSYS_SWITCH_PORT_MODE_INGRESS_DROP_MODE which we are not writing any longer, for 2 reasons: - Using the previous API (ocelot_write_rix), we were only writing 1 for Felix and Ocelot, which was their hardware-default value, and which there wasn't any intention in changing. - In the case of SCH_NEXT_CFG, in fact Seville does not have this register field at all, and therefore, if we want to have common code we would be required to not write to it. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 2789658fa319f51db43a585e076bb99a3de3c6d1 Author: Maxim Kochetkov Date: Mon Jul 13 19:57:02 2020 +0300 soc: mscc: ocelot: add MII registers description Add the register definitions for the MSCC MIIM MDIO controller in preparation for seville_vsc9959.c to create its accessors for the internal MDIO bus. Since we've introduced elements to ocelot_regfields that are not instantiated by felix and ocelot, we need to define the size of the regfields arrays explicitly, otherwise ocelot_regfields_init, which iterates up to REGFIELD_MAX, will fault on the undefined regfield entries (if we're lucky). Signed-off-by: Maxim Kochetkov Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 91c724cfc0cbc049f18c04634ad56080650e93b8 Author: Vladimir Oltean Date: Mon Jul 13 19:57:01 2020 +0300 net: mscc: ocelot: convert port registers to regmap At the moment, there are some minimal register differences between VSC7514 Ocelot and VSC9959 Felix. To be precise, the PCS1G registers are missing from Felix because it was integrated with an NXP PCS. But with VSC9953 Seville (not yet introduced), the register differences are more pronounced. The MAC registers are located at different offsets within the DEV_GMII target. So we need to refactor the driver to keep a regmap even for per-port registers. The callers of the ocelot_port_readl and ocelot_port_writel were kept unchanged, only the implementation is now more generic. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 5d037b4d3df7b77ecd22fa8e10f5000bdc42cc8b Author: Ido Schimmel Date: Mon Jul 13 18:20:14 2020 +0300 devlink: Fix use-after-free when destroying health reporters Dereferencing the reporter after it was destroyed in order to unlock the reporters lock results in a use-after-free [1]. Fix this by storing a pointer to the lock in a local variable before destroying the reporter. [1] ================================================================== BUG: KASAN: use-after-free in devlink_health_reporter_destroy+0x15c/0x1b0 net/core/devlink.c:5476 Read of size 8 at addr ffff8880650fd020 by task syz-executor.1/904 CPU: 0 PID: 904 Comm: syz-executor.1 Not tainted 5.8.0-rc2+ #35 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xf6/0x16e lib/dump_stack.c:118 print_address_description.constprop.0+0x1c/0x250 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 devlink_health_reporter_destroy+0x15c/0x1b0 net/core/devlink.c:5476 nsim_dev_health_exit+0x8b/0xe0 drivers/net/netdevsim/health.c:317 nsim_dev_reload_destroy+0x7f/0x110 drivers/net/netdevsim/dev.c:1134 nsim_dev_reload_down+0x6e/0xd0 drivers/net/netdevsim/dev.c:712 devlink_reload+0xc6/0x3b0 net/core/devlink.c:2952 devlink_nl_cmd_reload+0x2f1/0x7c0 net/core/devlink.c:2987 genl_family_rcv_msg_doit net/netlink/genetlink.c:691 [inline] genl_family_rcv_msg net/netlink/genetlink.c:736 [inline] genl_rcv_msg+0x611/0x9d0 net/netlink/genetlink.c:753 netlink_rcv_skb+0x152/0x440 net/netlink/af_netlink.c:2469 genl_rcv+0x24/0x40 net/netlink/genetlink.c:764 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x53a/0x750 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x850/0xd90 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0x150/0x190 net/socket.c:672 ____sys_sendmsg+0x6d8/0x840 net/socket.c:2363 ___sys_sendmsg+0xff/0x170 net/socket.c:2417 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2450 do_syscall_64+0x56/0xa0 arch/x86/entry/common.c:359 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x4748ad Code: Bad RIP value. RSP: 002b:00007fd0358adc38 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf00 RCX: 00000000004748ad RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00000000004d1a4b R14: 00007fd0358ae6b4 R15: 00007fd0358add80 Allocated by task 539: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc mm/kasan/common.c:494 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:467 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] __devlink_health_reporter_create+0x91/0x2f0 net/core/devlink.c:5359 devlink_health_reporter_create+0xa1/0x170 net/core/devlink.c:5431 nsim_dev_health_init+0x95/0x3a0 drivers/net/netdevsim/health.c:279 nsim_dev_probe+0xb1e/0xeb0 drivers/net/netdevsim/dev.c:1086 really_probe+0x287/0x6d0 drivers/base/dd.c:525 driver_probe_device+0xfe/0x1d0 drivers/base/dd.c:701 __device_attach_driver+0x21e/0x290 drivers/base/dd.c:807 bus_for_each_drv+0x161/0x1e0 drivers/base/bus.c:431 __device_attach+0x21a/0x360 drivers/base/dd.c:873 bus_probe_device+0x1e6/0x290 drivers/base/bus.c:491 device_add+0xaf2/0x1b00 drivers/base/core.c:2680 nsim_bus_dev_new drivers/net/netdevsim/bus.c:336 [inline] new_device_store+0x374/0x590 drivers/net/netdevsim/bus.c:215 bus_attr_store+0x75/0xa0 drivers/base/bus.c:122 sysfs_kf_write+0x113/0x170 fs/sysfs/file.c:138 kernfs_fop_write+0x25d/0x480 fs/kernfs/file.c:315 __vfs_write+0x7c/0x100 fs/read_write.c:495 vfs_write+0x265/0x5e0 fs/read_write.c:559 ksys_write+0x12d/0x250 fs/read_write.c:612 do_syscall_64+0x56/0xa0 arch/x86/entry/common.c:359 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 904: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0x12c/0x170 mm/kasan/common.c:455 slab_free_hook mm/slub.c:1474 [inline] slab_free_freelist_hook mm/slub.c:1507 [inline] slab_free mm/slub.c:3072 [inline] kfree+0xe6/0x320 mm/slub.c:4063 devlink_health_reporter_free net/core/devlink.c:5449 [inline] devlink_health_reporter_put+0xb7/0xf0 net/core/devlink.c:5456 __devlink_health_reporter_destroy net/core/devlink.c:5463 [inline] devlink_health_reporter_destroy+0x11b/0x1b0 net/core/devlink.c:5475 nsim_dev_health_exit+0x8b/0xe0 drivers/net/netdevsim/health.c:317 nsim_dev_reload_destroy+0x7f/0x110 drivers/net/netdevsim/dev.c:1134 nsim_dev_reload_down+0x6e/0xd0 drivers/net/netdevsim/dev.c:712 devlink_reload+0xc6/0x3b0 net/core/devlink.c:2952 devlink_nl_cmd_reload+0x2f1/0x7c0 net/core/devlink.c:2987 genl_family_rcv_msg_doit net/netlink/genetlink.c:691 [inline] genl_family_rcv_msg net/netlink/genetlink.c:736 [inline] genl_rcv_msg+0x611/0x9d0 net/netlink/genetlink.c:753 netlink_rcv_skb+0x152/0x440 net/netlink/af_netlink.c:2469 genl_rcv+0x24/0x40 net/netlink/genetlink.c:764 netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x53a/0x750 net/netlink/af_netlink.c:1329 netlink_sendmsg+0x850/0xd90 net/netlink/af_netlink.c:1918 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0x150/0x190 net/socket.c:672 ____sys_sendmsg+0x6d8/0x840 net/socket.c:2363 ___sys_sendmsg+0xff/0x170 net/socket.c:2417 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2450 do_syscall_64+0x56/0xa0 arch/x86/entry/common.c:359 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880650fd000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 32 bytes inside of 512-byte region [ffff8880650fd000, ffff8880650fd200) The buggy address belongs to the page: page:ffffea0001943f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff8880650ff800 head:ffffea0001943f00 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x100000000010200(slab|head) raw: 0100000000010200 ffffea0001a06a08 ffffea00010ad308 ffff88806c402500 raw: ffff8880650ff800 0000000000100009 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880650fcf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880650fcf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880650fd000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880650fd080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880650fd100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Fixes: 3c5584bf0a04 ("devlink: Rework devlink health reporter destructor") Fixes: 15c724b997a8 ("devlink: Add devlink health port reporters API") Signed-off-by: Ido Schimmel Reviewed-by: Moshe Shemesh Reviewed-by: Jiri Pirko Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit c15841dd15af3ccbdc87031245ad1aee6d4362bb Author: Bartosz Golaszewski Date: Mon Jul 13 17:12:07 2020 +0200 net: phy: fix mdio-mscc-miim build PHYLIB is not selected by mdio-mscc-miim but it uses mdio devres helpers. Explicitly select MDIO_DEVRES in this driver's Kconfig entry. Reported-by: kernel test robot Fixes: 1814cff26739 ("net: phy: add a Kconfig option for mdio_devres") Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e7fff95c8cea05d870239f6eebe7d3f1208e2a5c Author: Alexander A. Klimov Date: Mon Jul 13 16:30:54 2020 +0200 isdn/capi: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit ce1e2a776ffcd5ce1570bf8f077ea0c26c1d8a8d Author: Wei Yongjun Date: Mon Jul 13 22:23:44 2020 +0800 net: make symbol 'flush_works' static The sparse tool complains as follows: net/core/dev.c:5594:1: warning: symbol '__pcpu_scope_flush_works' was not declared. Should it be static? 'flush_works' is not used outside of dev.c, so marks it static. Fixes: 41852497a9205 ("net: batch calls to flush_all_backlogs()") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit ea64ce6d3b579f377d2be788ed5ab71ab00570ee Merge: e1d82f7ad0b5e 1add92121e39e Author: David S. Miller Date: Mon Jul 13 17:22:22 2020 -0700 Merge branch 'mlxsw-Add-support-for-buffer-drops-mirroring' Petr Machata says: ==================== mlxsw: Add support for buffer drops mirroring This set offloads the recently introduced qevent infrastructure in TC and allows mlxsw to support mirroring of packets that were dropped due to buffer related reasons (e.g., early drops) during forwarding. Up until now mlxsw only supported mirroring that was either triggered by per-port triggers (i.e., via matchall) or by the policy engine (i.e., via flower). Packets that are dropped due to buffer related reasons are mirrored using a third type of trigger, a global trigger. Global triggers are bound once to a mirroring (SPAN) agent and enabled on a per-{port, TC} basis. This allows users, for example, to request that only packets that were early dropped on a specific netdev to be mirrored. Patch set overview: Patch #1 extends flow_block_offload and indirect offload structure to pass a scheduler instead of a netdevice. That is necessary, because binding type and netdevice are not a unique identifier of the block anymore. Patches #2-#3 add the required registers to support above mentioned functionality. Patches #4-#6 gradually add support for global mirroring triggers. Patch #7 adds support for enablement of global mirroring triggers. Patches #8-#11 are cleanups in the flow offload code and shuffle some code around to make the qevent offload easier. Patch #12 implements offload of RED early_drop qevent. Patch #13 extends the RED selftest for offloaded datapath to cover early_drop qevent. v2: - Patch #1: - In struct flow_block_indr, track both sch and dev. ==================== Signed-off-by: David S. Miller commit 1add92121e39ee5e4af21562eb59bd562c8033e3 Author: Petr Machata Date: Sat Jul 11 00:55:15 2020 +0300 selftests: mlxsw: RED: Test offload of mirror on RED early_drop qevent Add a selftest for offloading a mirror action attached to the block associated with RED early_drop qevent. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit f6668eac2206d18e0668fd495dab6a0d91a6b8d2 Author: Petr Machata Date: Sat Jul 11 00:55:14 2020 +0300 mlxsw: spectrum_qdisc: Offload mirroring on RED qevent early_drop The RED qevents early_drop and mark can be offloaded under the following fairly strict conditions: - At most one filter is configured at the qevent block - The protocol is "any" - The classifier is matchall - The action is trap, sample, or mirror with the same conditions as with other SPAN offloads - The hw_counters type is none In this patchset, implement offload of mirror for early_drop qevent. The ECN trigger is currently not implemented in the FW and therefore the mark qevent is not supported. The qevent notifications look exactly like regular block binding notifications with a binder type that identifies them as qevents. Therefore the details of processing this binding are fairly similar to the matchall offload. struct flow_block_offload.sch points at the qdisc in question. Use it to figure out if the qdisc is offloaded at all and what TC it configures. Bounce bindings on not-offloaded qdiscs. Individual bindings are kept in a list so that several qevents can share the same block and all binding points get configured as the configured filters change. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit f7a439cbf1e8c544393fd854ad7bd6df41a60e08 Author: Petr Machata Date: Sat Jul 11 00:55:13 2020 +0300 mlxsw: spectrum_flow: Promote binder-type dispatch to spectrum.c Two RED qevents have been introduced recently. From the point of view of a driver, qevents are simply blocks with unusual binder types. However they need to be handled by different logic than ACL-like flows. Thus rename mlxsw_sp_setup_tc_block() to mlxsw_sp_setup_tc_block_clsact() and move the binder-type dispatch from there to spectrum.c into a new function of the original name. The new dispatcher is easier to extend with new binder types. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit b50f60a0c4c92b07647a042c54278c9206c476d0 Author: Petr Machata Date: Sat Jul 11 00:55:12 2020 +0300 mlxsw: spectrum_matchall: Publish matchall data structures A following patch introduces offloading of filters attached to blocks bound to the RED tail_drop qevent. The only classifier that mlxsw will permit in this role is matchall. mlxsw currently offloads matchall filters used with clsact qdisc. The data structures used for that offload will come handy for the qevent offload as well. Publish them in spectrum.h. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit d928f82198338abcce218fc5330bacb157f27b6b Author: Petr Machata Date: Sat Jul 11 00:55:11 2020 +0300 mlxsw: spectrum_flow: Drop an unused field The field "dev" in struct mlxsw_sp_flow_block_binding is not used. Drop it. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 2c4950ea10a3e159550df9cdca15a63518f3affc Author: Petr Machata Date: Sat Jul 11 00:55:10 2020 +0300 mlxsw: spectrum_flow: Convert a goto to a return No clean-up is performed at the target label of this goto. Convert it to a direct return. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 2bafb216e10edf2684d3dc124be333a07523580d Author: Ido Schimmel Date: Sat Jul 11 00:55:09 2020 +0300 mlxsw: spectrum_span: Add APIs to enable / disable global mirroring triggers While the binding of global mirroring triggers to a SPAN agent is global, packets are only mirrored if they belong to a port and TC on which the trigger was enabled. This allows, for example, to mirror packets that were tail-dropped on a specific netdev. Implement the operations that allow to enable / disable a global mirroring trigger on a specific port and TC. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit ab8c06b7b42cf9e756a720931a0939cd0d56786a Author: Ido Schimmel Date: Sat Jul 11 00:55:08 2020 +0300 mlxsw: spectrum_span: Add support for global mirroring triggers Global mirroring triggers are triggers that are only keyed by their trigger, as opposed to per-port triggers, which are keyed by their trigger and port. Such triggers allow mirroring packets that were tail/early dropped or ECN marked to a SPAN agent. Implement the previously added trigger operations for these global triggers. Since such triggers are only supported from Spectrum-2 onwards, have the Spectrum-1 operations return an error. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 08a3641f266276cafb14e7497e7954d6ee32a016 Author: Ido Schimmel Date: Sat Jul 11 00:55:07 2020 +0300 mlxsw: spectrum_span: Prepare for global mirroring triggers Currently, a SPAN agent can only be bound to a per-port trigger where the trigger is either an incoming packet (INGRESS) or an outgoing packet (EGRESS) to / from the port. The subsequent patch will introduce the concept of global mirroring triggers. The binding / unbinding of global triggers is different than that of per-port triggers. Such triggers also need to be enabled / disabled on a per-{port, TC} basis and are only supported from Spectrum-2 onwards. Add trigger operations that allow us to abstract these differences. Only implement the operations for per-port triggers. Next patch will implement the operations for global triggers. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 4bafb85ae24418cfa42ad3cb9f67031b1813fea8 Author: Ido Schimmel Date: Sat Jul 11 00:55:06 2020 +0300 mlxsw: spectrum_span: Move SPAN operations out of global file The per-ASIC SPAN operations are relevant to the SPAN module and therefore should be implemented there and not in the main driver file. Move them. These operations will be extended later on. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit c0e3969b07dc05eafcd0c35d20c134d3f7d360ed Author: Amit Cohen Date: Sat Jul 11 00:55:05 2020 +0300 mlxsw: reg: Add Monitoring Port Analyzer Global Register This register is used for global port analyzer configurations. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 951b84d4aedde4144d254281ceba51bb3ca370fe Author: Amit Cohen Date: Sat Jul 11 00:55:04 2020 +0300 mlxsw: reg: Add Monitoring Mirror Trigger Enable Register This register is used to configure the mirror enable for different mirror reasons. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit c40f4e50b6cfc7c66f69d12c6b3fbcd954f1ded5 Author: Petr Machata Date: Sat Jul 11 00:55:03 2020 +0300 net: sched: Pass qdisc reference in struct flow_block_offload Previously, shared blocks were only relevant for the pseudo-qdiscs ingress and clsact. Recently, a qevent facility was introduced, which allows to bind blocks to well-defined slots of a qdisc instance. RED in particular got two qevents: early_drop and mark. Drivers that wish to offload these blocks will be sent the usual notification, and need to know which qdisc it is related to. To that end, extend flow_block_offload with a "sch" pointer, and initialize as appropriate. This prompts changes in the indirect block facility, which now tracks the scheduler in addition to the netdevice. Update signatures of several functions similarly. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit e1d82f7ad0b5e19659c74a0abf7a53768c1249f8 Merge: e3eea08e64134 62c89238b1821 Author: David S. Miller Date: Mon Jul 13 17:20:40 2020 -0700 Merge branch 'net-simple-kerneldoc-fixes' Andrew Lunn says: ==================== net simple kerneldoc fixes This is a collection of simple kerneldoc fixes. They are all low hanging fruit, were not real understanding of the code was needed. ==================== Signed-off-by: David S. Miller commit 62c89238b182101dab0ae106f4c68061512c41f5 Author: Andrew Lunn Date: Mon Jul 13 01:15:16 2020 +0200 net: x25: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Andrew Hendry Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 726e6af9af44b39cb0860667095fbce3a489ef42 Author: Andrew Lunn Date: Mon Jul 13 01:15:15 2020 +0200 net: wireless: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Johannes Berg Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit d8141208b032eaee0efeacaadf1734f65db73ac5 Author: Andrew Lunn Date: Mon Jul 13 01:15:14 2020 +0200 net: tipc: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Jon Maloy Cc: Ying Xue Signed-off-by: Andrew Lunn Acked-by: Jon Maloy Signed-off-by: David S. Miller commit c8af73f0b23b75468e0f511287d15bf3051e88c8 Author: Andrew Lunn Date: Mon Jul 13 01:15:13 2020 +0200 net: switchdev: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Jiri Pirko Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 9a8ad9ac810aaddbb805c048511624a4972b24cc Author: Andrew Lunn Date: Mon Jul 13 01:15:12 2020 +0200 net: socket: Move kerneldoc next to function it documents Fix the warning "Function parameter or member 'inode' not described in '__sock_release'' due to the kerneldoc being placed before __sock_release() not sock_release(), which does not take an inode parameter. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 90ac5d0301db7cefc4129f89a858f66913a1c8f4 Author: Andrew Lunn Date: Mon Jul 13 01:15:11 2020 +0200 net: sched: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Jamal Hadi Salim Cc: Cong Wang Cc: Jiri Pirko Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 76f2fe73c5b888fd009aa16efad9a6b563a1aa1f Author: Andrew Lunn Date: Mon Jul 13 01:15:10 2020 +0200 net: rxrpc: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: David Howells Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 966785142342f473015f92be9e62554a29105599 Author: Andrew Lunn Date: Mon Jul 13 01:15:09 2020 +0200 net: openvswitch: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Pravin B Shelar Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit ffbab1c93b52b3405183eb3643664d8a2e9b38ea Author: Andrew Lunn Date: Mon Jul 13 01:15:08 2020 +0200 net: nfc: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 26c3baaa0956ffabc1e3ede7f6933bd0dc9cb373 Author: Andrew Lunn Date: Mon Jul 13 01:15:07 2020 +0200 net: netlabel: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Paul Moore Signed-off-by: Andrew Lunn Acked-by: Paul Moore Signed-off-by: David S. Miller commit 3db86c397f608b58b842d7f0f3d7ce305b46e6ad Author: Andrew Lunn Date: Mon Jul 13 01:15:06 2020 +0200 net: netfilter: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Pablo Neira Ayuso Cc: Jozsef Kadlecsik Cc: Florian Westphal Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 9fd00b4d0eccdb859ba8a0c3228fadfb081441a0 Author: Andrew Lunn Date: Mon Jul 13 01:15:05 2020 +0200 net: mac80211: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Johannes Berg Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 74c950c966c180c599d0af3043ab8959e74493d5 Author: Andrew Lunn Date: Mon Jul 13 01:15:04 2020 +0200 net: llc: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit b51cd7c834dba0ec9300337e16e5aa5bf65bd04c Author: Andrew Lunn Date: Mon Jul 13 01:15:03 2020 +0200 net: ipv6: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Alexey Kuznetsov Cc: Hideaki YOSHIFUJI Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 3628e3cbf9edc8381961394ccd6fb0bf049fdb69 Author: Andrew Lunn Date: Mon Jul 13 01:15:02 2020 +0200 net: ipv4: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Paul Moore Cc: Alexey Kuznetsov Cc: Eric Dumazet Signed-off-by: Andrew Lunn Acked-by: Paul Moore Signed-off-by: David S. Miller commit aff53b23a9a74cf6729a6022e5dd22dd698bd9d9 Author: Andrew Lunn Date: Mon Jul 13 01:15:01 2020 +0200 net: decnet: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit d0b1101bb5c1224881bb58460311d458ff1350d0 Author: Andrew Lunn Date: Mon Jul 13 01:15:00 2020 +0200 net: dccp: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Gerrit Renker Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 8842500dd056b8ef9da77ba2bfc3275fd7e0a98f Author: Andrew Lunn Date: Mon Jul 13 01:14:59 2020 +0200 net: core: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit e0a7f1fe0c60ae48101b0170a8780c1e40ffb94d Author: Andrew Lunn Date: Mon Jul 13 01:14:58 2020 +0200 net: can: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Oliver Hartkopp Cc: Marc Kleine-Budde Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 15e522a7b110777b20612937c4424b5c448e7431 Author: Andrew Lunn Date: Mon Jul 13 01:14:57 2020 +0200 net: 9p: kerneldoc fixes Simple fixes which require no deep knowledge of the code. Cc: Eric Van Hensbergen Cc: Latchesar Ionkov Cc: Dominique Martinet Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit e3eea08e641345a6df6f4d5cb2b325874de1a757 Author: Alex Elder Date: Mon Jul 13 07:24:18 2020 -0500 net: ipa: fix kerneldoc comments This commit affects comments (and in one case, whitespace) only. Throughout the IPA code, return statements are documented using "@Return:", whereas they should use "Return:" instead. Fix these mistakes. In function definitions, some parameters are missing their comment to describe them. And in structure definitions, some fields are missing their comment to describe them. Add these missing descriptions. Some arguments changed name and type along the way, but their descriptions were not updated (an endpoint pointer is now used in many places that previously used an endpoint ID). Fix these incorrect parameter descriptions. In the description for the ipa_clock structure, one field had a semicolon instead of a colon in its description. Fix this. Add a missing function description for ipa_gsi_endpoint_data_empty(). All of these issues were identified when building with "W=1". Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8afb259a9840fa953efb9a7835356a083ac8ec74 Merge: 207a573c04755 0b20933d8cfe2 Author: Alexei Starovoitov Date: Mon Jul 13 17:07:43 2020 -0700 Merge branch 'strip-mods-from-global-vars' Andrii Nakryiko says: ==================== Fix bpftool logic of stripping away const/volatile modifiers for all global variables during BPF skeleton generation. See patch #1 for details on when existing logic breaks and why it's important. Support special .strip_mods=true mode in btf_dump__emit_type_decl. Recent example of when this has caused problems can be found in [0]. [0] https://github.com/iovisor/bcc/pull/2994#issuecomment-650588533 ==================== Signed-off-by: Alexei Starovoitov commit 0b20933d8cfe2bf6473e9b581b5d1ed9a2117ecc Author: Andrii Nakryiko Date: Mon Jul 13 16:24:09 2020 -0700 tools/bpftool: Strip away modifiers from global variables Reliably remove all the type modifiers from read-only (.rodata) global variable definitions, including cases of inner field const modifiers and arrays of const values. Also modify one of selftests to ensure that const volatile struct doesn't prevent user-space from modifying .rodata variable. Fixes: 985ead416df3 ("bpftool: Add skeleton codegen command") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200713232409.3062144-3-andriin@fb.com commit 7c819e701382d4969ca4837b8cbe157895f5d0bf Author: Andrii Nakryiko Date: Mon Jul 13 16:24:08 2020 -0700 libbpf: Support stripping modifiers for btf_dump One important use case when emitting const/volatile/restrict is undesirable is BPF skeleton generation of DATASEC layout. These are further memory-mapped and can be written/read from user-space directly. For important case of .rodata variables, bpftool strips away first-level modifiers, to make their use on user-space side simple and not requiring extra type casts to override compiler complaining about writing to const variables. This logic works mostly fine, but breaks in some more complicated cases. E.g.: const volatile int params[10]; Because in BTF it's a chain of ARRAY -> CONST -> VOLATILE -> INT, bpftool stops at ARRAY and doesn't strip CONST and VOLATILE. In skeleton this variable will be emitted as is. So when used from user-space, compiler will complain about writing to const array. This is problematic, as also mentioned in [0]. To solve this for arrays and other non-trivial cases (e.g., inner const/volatile fields inside the struct), teach btf_dump to strip away any modifier, when requested. This is done as an extra option on btf_dump__emit_type_decl() API. Reported-by: Anton Protopopov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200713232409.3062144-2-andriin@fb.com commit ed757328c34015be4ec51861a90bb3bcc807ad58 Author: Alexander A. Klimov Date: Mon Jul 13 12:24:18 2020 +0200 atm: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit 207a573c04755d5ef83e89ee1b3e4941f000acbd Merge: 93776cb9ee91a 59e8b60bf0681 Author: Alexei Starovoitov Date: Mon Jul 13 16:55:49 2020 -0700 Merge branch 'trace_printk-banner-remove' Alan Maguire says: ==================== Steven suggested a way to resolve the appearance of the warning banner that appears as a result of using trace_printk() in BPF [1]. Applying the patch and testing reveals all works as expected; we can call bpf_trace_printk() and see the trace messages in /sys/kernel/debug/tracing/trace_pipe and no banner message appears. Also add a test prog to verify basic bpf_trace_printk() helper behaviour. Changes since v2: - fixed stray newline in bpf_trace_printk(), use sizeof(buf) rather than #defined value in vsnprintf() (Daniel, patch 1) - Daniel also pointed out that vsnprintf() returns 0 on error rather than a negative value; also turns out that a null byte is not appended if the length of the string written is zero, so to fix for cases where the string to be traced is zero length we set the null byte explicitly (Daniel, patch 1) - switch to using getline() for retrieving lines from trace buffer to ensure we don't read a portion of the search message in one read() operation and then fail to find it (Andrii, patch 2) Changes since v1: - reorder header inclusion in bpf_trace.c (Steven, patch 1) - trace zero-length messages also (Andrii, patch 1) - use a raw spinlock to ensure there are no issues for PREMMPT_RT kernels when using bpf_trace_printk() within other raw spinlocks (Steven, patch 1) - always enable bpf_trace_printk() tracepoint when loading programs using bpf_trace_printk() as this will ensure that a user disabling that tracepoint will not prevent tracing output from being logged (Steven, patch 1) - use "tp/raw_syscalls/sys_enter" and a usleep(1) to trigger events in the selftest ensuring test runs faster (Andrii, patch 2) [1] https://lore.kernel.org/r/20200628194334.6238b933@oasis.local.home ==================== Signed-off-by: Alexei Starovoitov commit ab2749592147cc310624c27470c2b63f820abaa9 Author: Alexander A. Klimov Date: Mon Jul 13 11:33:23 2020 +0200 WAN: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit 59e8b60bf068180fcadb0ae06ce8f6f835132ce6 Author: Alan Maguire Date: Mon Jul 13 12:52:34 2020 +0100 selftests/bpf: Add selftests verifying bpf_trace_printk() behaviour Simple selftests that verifies bpf_trace_printk() returns a sensible value and tracing messages appear. Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1594641154-18897-3-git-send-email-alan.maguire@oracle.com commit ac5a72ea5c8989871e61f6bb0852e0f91de51ebe Author: Alan Maguire Date: Mon Jul 13 12:52:33 2020 +0100 bpf: Use dedicated bpf_trace_printk event instead of trace_printk() The bpf helper bpf_trace_printk() uses trace_printk() under the hood. This leads to an alarming warning message originating from trace buffer allocation which occurs the first time a program using bpf_trace_printk() is loaded. We can instead create a trace event for bpf_trace_printk() and enable it in-kernel when/if we encounter a program using the bpf_trace_printk() helper. With this approach, trace_printk() is not used directly and no warning message appears. This work was started by Steven (see Link) and finished by Alan; added Steven's Signed-off-by with his permission. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Alan Maguire Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20200628194334.6238b933@oasis.local.home Link: https://lore.kernel.org/bpf/1594641154-18897-2-git-send-email-alan.maguire@oracle.com commit 650c8bd36a66c708be343d66a741b05d88d65b55 Author: Douglas Anderson Date: Fri Jun 26 13:00:33 2020 -0700 serial: qcom_geni_serial: Always use 4 bytes per TX FIFO word The geni serial driver had a rule that we'd only use 1 byte per FIFO word for the TX FIFO if we were being used for the serial console. This is ugly and a bit of a pain. It's not too hard to fix, so fix it. Acked-by: Greg Kroah-Hartman Reviewed-by: Evan Green Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200626125844.2.Iabd56347670b9e4e916422773aba5b27943d19ee@changeid Signed-off-by: Bjorn Andersson commit e42d6c3ec0c7ade92021252cab49d8e6e14ba496 Author: Douglas Anderson Date: Fri Jun 26 13:00:32 2020 -0700 serial: qcom_geni_serial: Make kgdb work even if UART isn't console The geni serial driver had the rather sketchy hack in it where it would adjust the number of bytes per RX FIFO word from 4 down to 1 if it detected that CONFIG_CONSOLE_POLL was enabled (for kgdb) and this was a console port (defined by the kernel directing output to this port via the "console=" command line argument). The problem with that sketchy hack is that it's possible to run kgdb over a serial port even if it isn't used for console. Let's avoid the hack by simply handling the 4-bytes-per-FIFO word case for kdb. We'll have to have a (very small) cache but that should be fine. A nice side effect of this patch is that an agetty (or similar) running on this port is less likely to drop characters. We'll have roughly 4 times the RX FIFO depth than we used to now. NOTE: the character cache here isn't shared between the polling API and the non-polling API. That means that, technically, the polling API could eat a few extra bytes. This doesn't seem to pose a huge problem in reality because we'll only get several characters per FIFO word if those characters are all received at nearly the same time and we don't really expect non-kgdb characters to be sent to the same port as kgdb at the exact same time we're exiting kgdb. ALSO NOTE: we still have the sketchy hack for setting the number of bytes per TX FIFO word in place, but that one is less bad. kgdb doesn't have any problem with this because it always just sends 1 byte at a time and waits for it to finish. The TX FIFO hack is only really needed for console output. In any case, a future patch will remove that hack, too. Acked-by: Greg Kroah-Hartman Reviewed-by: Evan Green Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200626125844.1.I8546ecb6c5beb054f70c5302d1a7293484212cd1@changeid Signed-off-by: Bjorn Andersson commit ccc6e8a1d6e936643e4b7e5b35f9456a7e36365c Author: Rajendra Nayak Date: Tue Jun 30 14:15:12 2020 +0530 arm64: dts: sc7180: Add sdhc opps and power-domains Add the power domain supporting performance state and the corresponding OPP tables for the sdhc device on sc7180. Reviewed-by: Matthias Kaehlcke Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1593506712-24557-5-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 6123e7443fecda48626fed1782dd422014ddbb4a Author: Rajendra Nayak Date: Tue Jun 30 14:15:11 2020 +0530 arm64: dts: sdm845: Add sdhc opps and power-domains Add the power domain supporting performance state and the corresponding OPP tables for the sdhc device on sdm845. Reviewed-by: Matthias Kaehlcke Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1593506712-24557-4-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit d91ea1e0e869e1aeb46ad36ad0c0544a7888f9f5 Author: Rajendra Nayak Date: Tue Jun 30 14:15:10 2020 +0530 arm64: dts: sc7180: Add OPP table for all qup devices qup has a requirement to vote on the performance state of the CX domain in sc7180 devices. Add OPP tables for these and also add power-domains property for all qup instances for uart and spi. i2c does not support scaling and uses a fixed clock. Reviewed-by: Matthias Kaehlcke Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1593506712-24557-3-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 13cadb34e5932840f0610752c27b416ed2de6199 Author: Rajendra Nayak Date: Tue Jun 30 14:15:09 2020 +0530 arm64: dts: sdm845: Add OPP table for all qup devices qup has a requirement to vote on the performance state of the CX domain in sdm845 devices. Add OPP tables for these and also add power-domains property for all qup instances for uart and spi. i2c does not support scaling and uses a fixed clock. Reviewed-by: Matthias Kaehlcke Signed-off-by: Rajendra Nayak Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/1593506712-24557-2-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit da48dc8c70c20e5e3e4c8c15a52bb75ebee6fa3c Author: Douglas Anderson Date: Wed Jul 1 17:45:09 2020 -0700 spi: spi-geni-qcom: Get rid of most overhead in prepare_message() There's a bunch of overhead in spi-geni-qcom's prepare_message. Get rid of it. Before this change spi_geni_prepare_message() took around 14.5 us. After this change, spi_geni_prepare_message() takes about 1.75 us (as measured by ftrace). What's here: * We're always in FIFO mode, so no need to call it for every transfer. This avoids a whole ton of readl/writel calls. * We don't need to write a whole pile of config registers if the mode isn't changing. Cache the last mode and only do the work if needed. * For several registers we were trying to do read/modify/write, but there was no reason. The registers only have one thing in them, so just write them. Acked-by: Mark Brown Reviewed-by: Akash Asthana Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200701174506.3.I2b3d7aeb1ea622335482cce60c58d2f8381e61dd@changeid Signed-off-by: Bjorn Andersson commit 5f219524ec6eae3591f9d7cfbf4d30fc457f1eec Author: Douglas Anderson Date: Thu Jul 9 07:40:49 2020 -0700 spi: spi-geni-qcom: Set the clock properly at runtime resume In the patch ("spi: spi-geni-qcom: Avoid clock setting if not needed") we avoid a whole pile of clock code. As part of that, we should have restored the clock at runtime resume. Do that. It turns out that, at least with today's configurations, this doesn't actually matter. That's because none of the current device trees have an OPP table for geni SPI yet. That makes dev_pm_opp_set_rate(dev, 0) a no-op. This is why it wasn't noticed in the testing of the original patch. It's still a good idea to fix, though. Reviewed-by: Rajendra Nayak Reviewed-by: Akash Asthana Signed-off-by: Douglas Anderson Acked-by: Mark Brown Link: https://lore.kernel.org/r/20200709074037.v2.1.I0b701fc23eca911a5bde4ae4fa7f97543d7f960e@changeid Signed-off-by: Bjorn Andersson commit 68890e20942b8693d487a4a2ea882e36523e8193 Author: Douglas Anderson Date: Wed Jul 1 17:45:07 2020 -0700 spi: spi-geni-qcom: Avoid clock setting if not needed Every SPI transfer could have a different clock rate. The spi-geni-qcom controller code to deal with this was never very well optimized and has always had a lot of code plus some calls into the clk framework which, at the very least, would grab a mutex. However, until recently, the overhead wasn't _too_ much. That changed with commit 0e3b8a81f5df ("spi: spi-geni-qcom: Add interconnect support") we're now calling geni_icc_set_bw(), which leads to a bunch of math plus: geni_icc_set_bw() icc_set_bw() apply_constraints() qcom_icc_set() qcom_icc_bcm_voter_commit() rpmh_invalidate() rpmh_write_batch() ...and those rpmh commands can be a bit beefy if you call them too often. We already know what speed we were running at before, so if we see that nothing has changed let's avoid the whole pile of code. On my hardware, this made spi_geni_prepare_message() drop down from ~145 us down to ~14 us. NOTE: Potentially it might also make sense to add some code into the interconnect framework to avoid executing so much code when bandwidth isn't changing, but even if we did that we still want to short circuit here to save the extra math / clock calls. Acked-by: Mark Brown Reviewed-by: Akash Asthana Fixes: 0e3b8a81f5df ("spi: spi-geni-qcom: Add interconnect support") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200701174506.1.Icfdcee14649fc0a6c38e87477b28523d4e60bab3@changeid Signed-off-by: Bjorn Andersson commit 8592eb959ad4878c29b09e82934a25ed7c81e3c7 Author: Douglas Anderson Date: Thu Jul 9 07:51:45 2020 -0700 spi: spi-qcom-qspi: Set an autosuspend delay of 250 ms In commit cff80645d6d3 ("spi: spi-qcom-qspi: Add interconnect support") the spi_geni_runtime_suspend() and spi_geni_runtime_resume() became a bit slower. Measuring on my hardware I see numbers in the hundreds of microseconds now. Let's use autosuspend to help avoid some of the overhead. Now if we're doing a bunch of transfers we won't need to be constantly chruning. The number 250 ms for the autosuspend delay was picked a bit arbitrarily, so if someone has measurements showing a better value we could easily change this. Fixes: cff80645d6d3 ("spi: spi-qcom-qspi: Add interconnect support") Signed-off-by: Douglas Anderson Acked-by: Mark Brown Reviewed-by: Rajendra Nayak Tested-by: Rajendra Nayak Reviewed-by: Mukesh Kumar Savaliya Reviewed-by: Akash Asthana Link: https://lore.kernel.org/r/20200709075113.v2.2.I3c56d655737c89bd9b766567a04b0854db1a4152@changeid Signed-off-by: Bjorn Andersson commit 2124331411a1ee88437cdd426854253c173464ba Author: Douglas Anderson Date: Thu Jul 9 07:51:44 2020 -0700 spi: spi-qcom-qspi: Avoid clock setting if not needed As per recent changes to the spi-qcom-qspi, now when we set the clock we'll call into the interconnect framework and also call the OPP API. Those are expensive operations. Let's avoid calling them if possible. This has a big impact on getting transfer rates back up to where they were (or maybe slightly better) before those patches landed. Fixes: cff80645d6d3 ("spi: spi-qcom-qspi: Add interconnect support") Signed-off-by: Douglas Anderson Acked-by: Mark Brown Reviewed-by: Rajendra Nayak Tested-by: Rajendra Nayak Reviewed-by: Mukesh Kumar Savaliya Reviewed-by: Akash Asthana Link: https://lore.kernel.org/r/20200709075113.v2.1.Ia7cb4f41ce93d37d0a764b47c8a453ce9e9c70ef@changeid Signed-off-by: Bjorn Andersson commit a24ad4878c6bd6c71968fff764fce31f9863b136 Author: Rajendra Nayak Date: Fri Jul 3 15:11:33 2020 +0530 arm64: dts: sc7180: Add qspi opps and power-domains Add the power domain supporting performance state and the corresponding OPP tables for the qspi device on sc7180 Reviewed-by: Matthias Kaehlcke Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1593769293-6354-4-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 5b4de2f8b51b0268b7eb778fa160fc0a88ec6e72 Author: Rajendra Nayak Date: Fri Jul 3 15:11:32 2020 +0530 arm64: dts: sdm845: Add qspi opps and power-domains Add the power domain supporting performance state and the corresponding OPP tables for the qspi device on sdm845 Reviewed-by: Matthias Kaehlcke Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1593769293-6354-3-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit f79a158d37c26015099f4a7fd7d6592bb2ad3054 Author: Rajendra Nayak Date: Fri Jul 3 15:11:31 2020 +0530 spi: spi-qcom-qspi: Use OPP API to set clk/perf state QSPI needs to vote on a performance state of a power domain depending on the clock rate. Add support for it by specifying the perf state/clock rate as an OPP table in device tree. Signed-off-by: Rajendra Nayak Reviewed-by: Matthias Kaehlcke Acked-by: Mark Brown Cc: Alok Chauhan Cc: Akash Asthana Cc: linux-spi@vger.kernel.org Link: https://lore.kernel.org/r/1593769293-6354-2-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 93776cb9ee91aeed43ba53dcec97ffed4ae6f1f7 Author: Andrii Nakryiko Date: Fri Jul 10 16:26:04 2020 -0700 tools/bpftool: Remove warning about PID iterator support Don't emit warning that bpftool was built without PID iterator support. This error garbles JSON output of otherwise perfectly valid show commands. Reported-by: Andrey Ignatov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200710232605.20918-1-andriin@fb.com commit 7c4bf5fe55ccd106e9c87553e95ea46dcc04c854 Merge: 24a38b7c0c2c1 0d80cb4612aa3 Author: Alexei Starovoitov Date: Mon Jul 13 15:32:56 2020 -0700 Merge branch 'af_xdp-stats' Ciara Loftus says: ==================== This series introduces new statistics for af_xdp: 1. drops due to rx ring being full 2. drops due to fill ring being empty 3. failures pulling an item from the tx ring These statistics should assist users debugging and troubleshooting peformance issues and packet drops. The statistics are made available though the getsockopt and xsk_diag interfaces, and the ability to dump these extended statistics is made available in the xdpsock application via the --extra-stats or -x flag. A separate patch which will add ss/iproute2 support will follow. ==================== Acked-by: Björn Töpel Signed-off-by: Alexei Starovoitov commit 0d80cb4612aa32dc0faa17fa3ab6f96f33e2b4a7 Author: Ciara Loftus Date: Wed Jul 8 07:28:35 2020 +0000 xsk: Add xdp statistics to xsk_diag Add xdp statistics to the information dumped through the xsk_diag interface Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200708072835.4427-4-ciara.loftus@intel.com commit b36c3206f9ef3ea2844e9092c12d29c0d1f56c54 Author: Ciara Loftus Date: Wed Jul 8 07:28:34 2020 +0000 samples: bpf: Add an option for printing extra statistics in xdpsock Introduce the --extra-stats (or simply -x) flag to the xdpsock application which prints additional statistics alongside the regular rx and tx counters. The new statistics printed report error conditions eg. rx ring full, invalid descriptors, etc. Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200708072835.4427-3-ciara.loftus@intel.com commit 8aa5a33578e9685d06020bd10d1637557423e945 Author: Ciara Loftus Date: Wed Jul 8 07:28:33 2020 +0000 xsk: Add new statistics It can be useful for the user to know the reason behind a dropped packet. Introduce new counters which track drops on the receive path caused by: 1. rx ring being full 2. fill ring being empty Also, on the tx path introduce a counter which tracks the number of times we attempt pull from the tx ring when it is empty. Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200708072835.4427-2-ciara.loftus@intel.com commit 95ad37f90c338e3fd4abf61cecfe02b6f3e080f0 Author: Frank van der Linden Date: Tue Jun 23 22:39:04 2020 +0000 NFSv4.2: add client side xattr caching. Implement client side caching for NFSv4.2 extended attributes. The cache is a per-inode hashtable, with name/value entries. There is one special entry for the listxattr cache. NFS inodes have a pointer to a cache structure. The cache structure is allocated on demand, freed when the cache is invalidated. Memory shrinkers keep the size in check. Large entries (> PAGE_SIZE) are collected by a separate shrinker, and freed more aggressively than others. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit 012a211abd5db098094ce429de5f046368391e68 Author: Frank van der Linden Date: Tue Jun 23 22:39:03 2020 +0000 NFSv4.2: hook in the user extended attribute handlers Now that all the lower level code is there to make the RPC calls, hook it in to the xattr handlers and the listxattr entry point, to make them available. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit c10a75145febb588d96c6adda6eb5ae2338e4e32 Author: Frank van der Linden Date: Tue Jun 23 22:39:02 2020 +0000 NFSv4.2: add the extended attribute proc functions. Implement the extended attribute procedures for NFSv4.2 extended attribute support (RFC 8276). Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit ccde1e9c0130b4182ae91adac3908f6f3277580a Author: Frank van der Linden Date: Tue Jun 23 22:39:01 2020 +0000 nfs: make the buf_to_pages_noslab function available to the nfs code Make the buf_to_pages_noslab function available to the rest of the NFS code. Rename it to nfs4_buf_to_pages_noslab to be consistent. This will be used later in the NFSv4.2 xattr code. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit 0f44da51aeef9c974ea744c0d9e24d54eec4e94c Author: Frank van der Linden Date: Tue Jun 23 22:39:00 2020 +0000 nfs: define and use the NFS_INO_INVALID_XATTR flag Define the NFS_INO_INVALID_XATTR flag, to be used for the NFSv4.2 xattr cache, and use it where appropriate. No functional change as yet. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit 1b523ca972edba2025e45080b08385928a29aa30 Author: Frank van der Linden Date: Tue Jun 23 22:38:59 2020 +0000 nfs: modify update_changeattr to deal with regular files Until now, change attributes in change_info form were only returned by directory operations. However, they are also used for the RFC 8276 extended attribute operations, which work on both directories and regular files. Modify update_changeattr to deal: * Rename it to nfs4_update_changeattr and make it non-static. * Don't always use INO_INVALID_DATA, this isn't needed for a directory that only had its extended attributes changed by us. * Existing callers now always pass in INO_INVALID_DATA. For the current callers of this function, behavior is unchanged. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit 72832a2453d9ca752beedb3a4fb2fc82e375c46c Author: Frank van der Linden Date: Tue Jun 23 22:38:58 2020 +0000 NFSv4.2: query the extended attribute access bits RFC 8276 defines separate ACCESS bits for extended attribute checking. Query them in nfs_do_access and opendata. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit d2ae4f8b21c111bb795c557588d89dccd005828d Author: Frank van der Linden Date: Tue Jun 23 22:38:57 2020 +0000 nfs: define nfs_access_get_cached function The only consumer of nfs_access_get_cached_rcu and nfs_access_cached calls these static functions in order to first try RCU access, and then locked access. Combine them in to a single function, and call that. Make this function available to the rest of the NFS code. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit 3e1f02123fba086d32dfd5729e6f4e2b54654acc Author: Frank van der Linden Date: Tue Jun 23 22:38:56 2020 +0000 NFSv4.2: add client side XDR handling for extended attributes Define the argument and response structures that will be used for RFC 8276 extended attribute RPC calls, and implement the necessary functions to encode/decode the extended attribute operations. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit b78ef845c35dbae25e57b598901a65b13d940c81 Author: Frank van der Linden Date: Tue Jun 23 22:38:55 2020 +0000 NFSv4.2: query the server for extended attribute support Query the server for extended attribute support, and record it as the NFS_CAP_XATTR flag in the server capabilities. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit 04a5da690e8f2da23c2ac940f2921e3aa622db82 Author: Frank van der Linden Date: Tue Jun 23 22:38:54 2020 +0000 NFSv4.2: define limits and sizes for user xattr handling Set limits for extended attributes (attribute value size and listxattr buffer size), based on the fs-independent limits (XATTR_*_MAX). Define the maximum XDR sizes for the RFC 8276 XATTR operations. In the case of operations that carry a larger payload (SETXATTR, GETXATTR, LISTXATTR), these exclude that payload, which is added as separate pages, like other operations do. Define, much like for read and write operations, the maximum overhead sizes for get/set/listxattr, and use them to limit the maximum payload size for those operations, in combination with the channel attributes. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit 9a67fcc8f3fd1e294922f28f20003c31d7f6cfeb Author: Frank van der Linden Date: Tue Jun 23 22:38:53 2020 +0000 nfs: add client side only definitions for user xattrs Add client-side only definitions for user extended attributes (RFC8276). These are the access bits as used by the client code, and the CLNT procedure number definition. Signed-off-by: Frank van der Linden Signed-off-by: Trond Myklebust commit 030eb04c52314b7769652eb0ccd40d4a23698721 Merge: 11ba468877bb2 c1326210477ec Author: Trond Myklebust Date: Mon Jul 13 17:49:23 2020 -0400 Merge commit 'c1326210477ecc06c53221f0005c64419aba30d6' from nfsd/linux-next Pull in the commit that is common to both the NFS client and server xattr implementation from git://git.linux-nfs.org/projects/cel/cel-2.6.git nfsd-5.9 Signed-off-by: Trond Myklebust commit a133c6988f7080fb8baf86ecf5161065bec65fb6 Author: Ville Syrjälä Date: Thu Jul 9 17:58:45 2020 +0300 drm/i915: WARN if max vswing/pre-emphasis violates the DP spec According to the DP spec a DPTX must support vswing/pre-emphasis up to and including level 2. Level 3 is optional (actually DP 1.4a seems to make even level 3 mandatory for HBR2/3, while leaving it optional for RBR/HBR1). WARN if out encoders' .voltage_max()/.preemph_max() return an illegal value. Signed-off-by: Ville Syrjälä Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200709145845.18118-1-ville.syrjala@linux.intel.com commit 24a38b7c0c2c17f7b86c29f82beb7f2779704ca3 Merge: eef8a42d6ce08 cc15a20d5f3ab Author: Alexei Starovoitov Date: Mon Jul 13 10:42:03 2020 -0700 Merge branch 'resolve_btfids' Jiri Olsa says: ==================== This patchset adds: - support to generate BTF ID lists that are resolved during kernel linking and usable within kernel code with following macros: BTF_ID_LIST(bpf_skb_output_btf_ids) BTF_ID(struct, sk_buff) and access it in kernel code via: extern u32 bpf_skb_output_btf_ids[]; - resolve_btfids tool that scans elf object for .BTF_ids section and resolves its symbols with BTF ID values - resolving of bpf_ctx_convert struct and several other objects with BTF_ID_LIST v7 changes: - added more acks [Andrii] - added some name-conflicting entries and fixed resolve_btfids to process them properly [Andrii] - changed bpf_get_task_stack_proto to use BTF_IDS_LIST/BTF_ID macros [Andrii] - fixed selftest build for resolve_btfids test ==================== Signed-off-by: Alexei Starovoitov commit df60446cd1fb487becd1f36f4c0da9e0e523c0cf Author: Scott Mayhew Date: Fri Jul 10 16:33:07 2020 -0400 nfsd: avoid a NULL dereference in __cld_pipe_upcall() If the rpc_pipefs is unmounted, then the rpc_pipe->dentry becomes NULL and dereferencing the dentry->d_sb will trigger an oops. The only reason we're doing that is to determine the nfsd_net, which could instead be passed in by the caller. So do that instead. Fixes: 11a60d159259 ("nfsd: add a "GetVersion" upcall for nfsdcld") Signed-off-by: Scott Mayhew Signed-off-by: Chuck Lever commit 94415b06eb8aed13481646026dc995f04a3a534a Author: J. Bruce Fields Date: Tue Jul 7 09:28:05 2020 -0400 nfsd4: a client's own opens needn't prevent delegations We recently fixed lease breaking so that a client's actions won't break its own delegations. But we still have an unnecessary self-conflict when granting delegations: a client's own write opens will prevent us from handing out a read delegation even when no other client has the file open for write. Fix that by turning off the checks for conflicting opens under vfs_setlease, and instead performing those checks in the nfsd code. We don't depend much on locks here: instead we acquire the delegation, then check for conflicts, and drop the delegation again if we find any. The check beforehand is an optimization of sorts, just to avoid acquiring the delegation unnecessarily. There's a race where the first check could cause us to deny the delegation when we could have granted it. But, that's OK, delegation grants are optional (and probably not even a good idea in that case). Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 0b7cd9d9ca66e5181f3a120cb5b44433efd0ad55 Author: Xu Wang Date: Thu Jun 18 01:56:13 2020 +0000 nfsd: Use seq_putc() in two functions A single character (line break) should be put into a sequence. Thus use the corresponding function "seq_putc()". Signed-off-by: Xu Wang Signed-off-by: Chuck Lever commit 6787f0bea27a24e4c306616565b02234ee558cfb Author: Chuck Lever Date: Wed Apr 29 17:25:36 2020 -0400 svcrdma: Display chunk completion ID when posting a rw_ctxt Re-use the post_rw tracepoint (safely) to trace cc_info lifetime events, including completion IDs. Signed-off-by: Chuck Lever commit 17f70f8dd52be3723250d21093403bb3a9f2162f Author: Chuck Lever Date: Wed Apr 29 11:05:33 2020 -0400 svcrdma: Record send_ctxt completion ID in trace_svcrdma_post_send() First, refactor: Dereference the svc_rdma_send_ctxt inside svc_rdma_send() instead of at every call site. Then, it can be passed into trace_svcrdma_post_send() to get the proper completion ID. Signed-off-by: Chuck Lever commit 3ac56c2fb166fea25974d8c48bb4a72ee298361b Author: Chuck Lever Date: Thu Apr 30 13:47:07 2020 -0400 svcrdma: Introduce Send completion IDs Set up a completion ID in each svc_rdma_send_ctxt. The ID is used to match an incoming Send completion to a transport and to a previous ib_post_send(). Signed-off-by: Chuck Lever commit 007140ee9b4fc4e59538677799c916890a2f13e2 Author: Chuck Lever Date: Wed Apr 29 17:16:31 2020 -0400 svcrdma: Record Receive completion ID in svc_rdma_decode_rqst When recording a trace event in the Receive path, tie decoding results and errors to an incoming Receive completion. Signed-off-by: Chuck Lever commit 9b3bcf8c5c134038e30624db5b57992ae50b80a9 Author: Chuck Lever Date: Wed Apr 29 16:22:26 2020 -0400 svcrdma: Introduce Receive completion IDs Set up a completion ID in each svc_rdma_recv_ctxt. The ID is used to match an incoming Receive completion to a transport and to a previous ib_post_recv(). Signed-off-by: Chuck Lever commit f7bd657b55e3484cadc37a6439de23d2fd703bd6 Author: Chuck Lever Date: Tue May 19 09:30:32 2020 -0400 svcrdma: Introduce infrastructure to support completion IDs The goal is to replace CQE kernel memory addresses in completion- related tracepoints. Each completion ID matches an incoming Send or Receive completion to a Completion Queue and to a previous ib_post_*(). The ID can then be displayed in an error message or recorded in a trace record. Signed-off-by: Chuck Lever commit 379c3bc6b4eb989ee37c4ce8ab403719e06fe35f Author: Chuck Lever Date: Tue Apr 7 15:32:14 2020 -0400 svcrdma: Add common XDR encoders for RDMA and Read segments Clean up: De-duplicate some code. Signed-off-by: Chuck Lever commit f60a08697d28b138c73b14c3204947bc8e637197 Author: Chuck Lever Date: Sun Mar 29 16:44:13 2020 -0400 svcrdma: Add common XDR decoders for RDMA and Read segments Clean up: De-duplicate some code. Signed-off-by: Chuck Lever commit 07e9a6325a35fb9655f7b52e2b9dc632da6eef51 Author: Chuck Lever Date: Sat Mar 28 13:43:22 2020 -0400 SUNRPC: Add helpers for decoding list discriminators symbolically Use these helpers in a few spots to demonstrate their use. The remaining open-coded discriminator checks in rpcrdma will be addressed in subsequent patches. Signed-off-by: Chuck Lever commit 0b8dc1b69995cbd81c2c9a2f1730c46cce085f62 Author: Chuck Lever Date: Mon May 18 11:34:47 2020 -0400 svcrdma: Remove declarations for functions long removed Pavane pour une infante défunte. Signed-off-by: Chuck Lever commit 3f8f25c696f9c4e352a4d705ba767af676421564 Author: Chuck Lever Date: Thu Apr 30 14:17:40 2020 -0400 svcrdma: Clean up trace_svcrdma_send_failed() tracepoint - Use the _err naming convention instead - Remove display of kernel memory address of the controlling xprt Signed-off-by: Chuck Lever commit ba6cc97738a15751350d3f85a6b856e4d6d4c202 Author: Chuck Lever Date: Tue Mar 24 17:57:18 2020 -0400 svcrdma: Consolidate send_error helper functions Final refactor: Replace internals of svc_rdma_send_error() with a simple call to svc_rdma_send_error_msg(). Signed-off-by: Chuck Lever commit c65b326b1eb983bca35ed43d0e453d1b15705f10 Author: Chuck Lever Date: Wed Mar 25 14:41:46 2020 -0400 svcrdma: Make svc_rdma_send_error_msg() a global function Prepare for svc_rdma_send_error_msg() to be invoked from another source file. Signed-off-by: Chuck Lever commit 605c61bee5b13bc9d597192779865a1a707166ed Author: Chuck Lever Date: Wed Mar 25 14:38:07 2020 -0400 svcrdma: Eliminate return value for svc_rdma_send_error_msg() Like svc_rdma_send_error(), have svc_rdma_send_error_msg() handle any error conditions internally, rather than duplicating that recovery logic at every call site. Signed-off-by: Chuck Lever commit 4f200bd8affbccc3152d497b4ce5cfaca5a7c53f Author: Chuck Lever Date: Wed Mar 25 11:57:51 2020 -0400 svcrdma: Add a @status parameter to svc_rdma_send_error_msg() The common "send RDMA_ERR" function should be in svc_rdma_sendto.c, since that is where the other Send-related functions are located. So from here, I will beef up svc_rdma_send_error_msg() and deprecate svc_rdma_send_error(). A generic svc_rdma_send_error_msg() will need to handle both ERR_CHUNK and ERR_VERS. Copy that logic from svc_rdma_send_error() to svc_rdma_send_error_msg(). Signed-off-by: Chuck Lever commit d1f6e2369c63f2cbc7a7441d3ee9b0eabfa9a327 Author: Chuck Lever Date: Wed Mar 25 11:31:37 2020 -0400 svcrdma: Add @rctxt parameter to svc_rdma_send_error() functions Another step towards making svc_rdma_send_error_msg() and svc_rdma_send_error() similar enough to eliminate one of them. Signed-off-by: Chuck Lever commit 6e9fab7073e5b6bdba4d5891cd486ffdd7de373f Author: Chuck Lever Date: Wed Mar 25 11:15:55 2020 -0400 svcrdma: Remove save_io_pages() call from send_error_msg() Commit 4757d90b15d8 ("svcrdma: Report Write/Reply chunk overruns") made an effort to preserve I/O pages until RDMA Write completion. In a subsequent patch, I intend to de-duplicate the two functions that send ERR_CHUNK responses. Pull the save_io_pages() call out of svc_rdma_send_error_msg() to make it more like svc_rdma_send_error(). Signed-off-by: Chuck Lever commit e814eecbe3bbeaa8b004d25a4b8974d232b765a9 Author: Chuck Lever Date: Thu Jun 11 12:44:56 2020 -0400 svcrdma: Fix page leak in svc_rdma_recv_read_chunk() Commit 07d0ff3b0cd2 ("svcrdma: Clean up Read chunk path") moved the page saver logic so that it gets executed event when an error occurs. In that case, the I/O is never posted, and those pages are then leaked. Errors in this path, however, are quite rare. Fixes: 07d0ff3b0cd2 ("svcrdma: Clean up Read chunk path") Signed-off-by: Chuck Lever commit 10b9d99a3dbbf5e9af838d1887a1047875dcafd9 Author: Chuck Lever Date: Sat Apr 18 18:30:42 2020 -0400 SUNRPC: Augment server-side rpcgss tracepoints Add similar tracepoints to those that were recently added on the client side to track failures in the integ and priv unwrap paths. And, let's collect the seqno-specific tracepoints together with a common naming convention. Regarding the gss_check_seq_num() changes: everywhere else treats the GSS sequence number as an unsigned 32-bit integer. As far back as 2.6.12, I couldn't find a compelling reason to do things differently here. As a defensive change it's better to eliminate needless implicit sign conversions. Signed-off-by: Chuck Lever commit 0e885e846d96df0c8a4a829b1ad355a82ccda656 Author: Frank van der Linden Date: Tue Jun 23 22:39:27 2020 +0000 nfsd: add fattr support for user extended attributes Check if user extended attributes are supported for an inode, and return the answer when being queried for file attributes. An exported filesystem can now signal its RFC8276 user extended attributes capability. Signed-off-by: Frank van der Linden Signed-off-by: Chuck Lever commit 23e50fe3a5e6045a573c69d4b0e3d78aa6183323 Author: Frank van der Linden Date: Tue Jun 23 22:39:26 2020 +0000 nfsd: implement the xattr functions and en/decode logic Implement the main entry points for the *XATTR operations. Add functions to calculate the reply size for the user extended attribute operations, and implement the XDR encode / decode logic for these operations. Add the user extended attributes operations to nfsd4_ops. Signed-off-by: Frank van der Linden Signed-off-by: Chuck Lever commit 6178713bd46b06a1115f5bc6a3ff38e95b6da9ca Author: Frank van der Linden Date: Tue Jun 23 22:39:25 2020 +0000 nfsd: add structure definitions for xattr requests / responses Add the structures used in extended attribute request / response handling. Signed-off-by: Frank van der Linden Signed-off-by: Chuck Lever commit c11d7fd1b3178cc651d532bab54adca7f26ae0d0 Author: Frank van der Linden Date: Tue Jun 23 22:39:24 2020 +0000 nfsd: take xattr bits into account for permission checks Since the NFSv4.2 extended attributes extension defines 3 new access bits for xattr operations, take them in to account when validating what the client is asking for, and when checking permissions. Signed-off-by: Frank van der Linden Signed-off-by: Chuck Lever commit 32119446bb65da559eb6f05236086fe449d2a024 Author: Frank van der Linden Date: Tue Jun 23 22:39:23 2020 +0000 nfsd: define xattr functions to call into their vfs counterparts This adds the filehandle based functions for the xattr operations that call in to the vfs layer to do the actual work. Signed-off-by: Frank van der Linden [ cel: address checkpatch.pl complaint ] Signed-off-by: Chuck Lever commit 4dd05fceb7eeceac4daeceec0d6a2e6a2528a3e4 Author: Frank van der Linden Date: Tue Jun 23 22:39:22 2020 +0000 nfsd: add defines for NFSv4.2 extended attribute support Add defines for server-side extended attribute support. Most have already been added as part of client support, but these are the network order error codes for the noxattr and xattr2big errors, and the addition of the xattr support to the supported file attributes (if configured). Signed-off-by: Frank van der Linden Signed-off-by: Chuck Lever commit 874c7b8ea545c7ebc50990843a234eafbc5c0c7f Author: Frank van der Linden Date: Tue Jun 23 22:39:21 2020 +0000 nfsd: split off the write decode code into a separate function nfs4_decode_write has code to parse incoming XDR write data in to a kvec head, and a list of pages. Put this code in to a separate function, so that it can be used later by the xattr code, for setxattr. No functional change. Signed-off-by: Frank van der Linden Signed-off-by: Chuck Lever commit cab8d289c5ad541a5351a651d95c4086b7f84d7c Author: Frank van der Linden Date: Tue Jun 23 22:39:19 2020 +0000 xattr: add a function to check if a namespace is supported Add a function that checks is an extended attribute namespace is supported for an inode, meaning that a handler must be present for either the whole namespace, or at least one synthetic xattr in the namespace. To be used by the nfs server code when being queried for extended attributes support. Cc: linux-fsdevel@vger.kernel.org Cc: Al Viro Signed-off-by: Frank van der Linden Signed-off-by: Chuck Lever commit 08b5d5014a27e717826999ad20e394a8811aae92 Author: Frank van der Linden Date: Tue Jun 23 22:39:18 2020 +0000 xattr: break delegations in {set,remove}xattr set/removexattr on an exported filesystem should break NFS delegations. This is true in general, but also for the upcoming support for RFC 8726 (NFSv4 extended attribute support). Make sure that they do. Additionally, they need to grow a _locked variant, since callers might call this with i_rwsem held (like the NFS server code). Cc: stable@vger.kernel.org # v4.9+ Cc: linux-fsdevel@vger.kernel.org Cc: Al Viro Signed-off-by: Frank van der Linden Signed-off-by: Chuck Lever commit c1326210477ecc06c53221f0005c64419aba30d6 Author: Frank van der Linden Date: Tue Jun 23 22:39:20 2020 +0000 nfs,nfsd: NFSv4.2 extended attribute protocol definitions Add definitions for the new operations, errors and flags as defined in RFC 8276 (File System Extended Attributes in NFSv4). Signed-off-by: Frank van der Linden Signed-off-by: Chuck Lever commit 1752911c6d10675154f1c8c8ba54331604cdbca7 Merge: a6175e894d880 df51f402e3b15 Author: Linus Walleij Date: Mon Jul 13 23:20:33 2020 +0200 Merge tag 'gpio-updates-for-v5.9-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio updates for v5.9 - part 2 - several improvements and minor tweaks to the GPIO character device code commit 2be53e0e4690a764b6af18536eb78b811f40eacc Author: Alexander A. Klimov Date: Mon Jul 13 11:02:51 2020 +0200 AX.25 Kconfig: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit 4bdc8c8d2815fe8ef5052c5a5ab51c04a4f0de7b Author: Konrad Dybcio Date: Wed Jun 24 17:00:59 2020 +0200 firmware: qcom_scm: Add msm8994 compatible This change adds a compatible for msm8994, which requires no additional clocks for scm to probe correctly. Acked-by: Rob Herring Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200624150107.76234-2-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit d6a3873c7be6d58914ea5584dc7875f2045d6721 Author: Martin Blumenstingl Date: Sat Jun 20 18:36:54 2020 +0200 ARM: dts: meson8b: odroidc1: enable the SDHC controller Odroid-C1 has an eMMC connector where users can optionally install an eMMC module. The eMMC modules run off a 1.8V VQMMC supply which means that HS-200 mode can be used (this is the highest mode that the SDHC controller supports). Enable the SDHC controller so eMMC modules can be accessed. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200620163654.37207-4-martin.blumenstingl@googlemail.com commit 73501b890a6f15460613878b463319d0e0cd1632 Author: Martin Blumenstingl Date: Sat Jun 20 18:36:53 2020 +0200 ARM: dts: meson8b: ec100: enable the SDHC controller EC-100 has built-in eMMC flash which is hard-wired to 3.3V VCC (which means it's limited to high-speed MMC modes). Enable the SDHC controller to access the contents of the eMMC flash. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200620163654.37207-3-martin.blumenstingl@googlemail.com commit 73106f75bf9498ff5d50f1052ad3cf03730d806d Author: Martin Blumenstingl Date: Sat Jun 20 18:36:52 2020 +0200 ARM: dts: meson: add the SDHC MMC controller Meson6, Meson8, Meson8b and Meson8m2 are using a similar SDHC controller IP which typically connects to an eMMC chip (because unlike the SDIO controller the SDHC controller has an 8-bit bus interface). On Meson8, Meson8b and Meson8m2 the clock inputs are all the same. However, Meson8m2 seems to have an improved version of the SHDC controller IP which doesn't require the driver to wait manually for a flush of a DMA transfer. Thus every SoC has it's own compatible string so if more difference are discovered they can be implemented. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20200620163654.37207-2-martin.blumenstingl@googlemail.com commit 32b5f4b63487a24712c3bfa1d6a8eb9257beb8bd Author: Martin Blumenstingl Date: Sat Jun 20 18:23:47 2020 +0200 arm64: dts: amlogic: Add the Ethernet "timing-adjustment" clock Add the "timing-adjustment" clock now that we know how it is connected to the PRG_ETHERNET registers. It is used internally to generate the RGMII RX delay on the MAC side (if needed). Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200620162347.26159-1-martin.blumenstingl@googlemail.com commit 5273d6cacc067e7a8552e29cabddb4934f4e05b7 Author: Martin Blumenstingl Date: Sat Jun 20 18:12:11 2020 +0200 arm64: dts: meson-gx: Switch to the meson-ee-pwrc bindings The "amlogic,meson-gx-pwrc-vpu" binding only supports the VPU power domain, while actually there are more power domains behind that set of registers. Switch to the new bindings so we can add more power domains as needed. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200620161211.23685-1-martin.blumenstingl@googlemail.com commit 9960cacbaeb1ccc1b2d9840cadb18844d48a337b Author: Martin Blumenstingl Date: Sat Jun 20 18:10:10 2020 +0200 ARM: dts: meson8b: add power domain controller The Meson8b SoCs have a power domain controller which can turn on/off various register areas (such as: Ethernet, VPU, etc.). Add the main "pwrc" controller and configure the Ethernet power domain. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200620161010.23171-4-martin.blumenstingl@googlemail.com commit c5d3d3cf00d5ed74359e71f7b5d003cf34ba014c Author: Martin Blumenstingl Date: Sat Jun 20 18:10:09 2020 +0200 ARM: dts: meson8m2: add resets for the power domain controller The Meson8m2 SoCs has introduced additional reset lines for the VPU compared to Meson8. Also it uses a slightly different VPU clock frequency compared to Meson8 since it can now achieve 364MHz thanks to the addition of the GP_PLL. Add the reset lines, VPU clock configuration and update the compatible string so the implementation differences can be managed. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200620161010.23171-3-martin.blumenstingl@googlemail.com commit aecc72b14d11327804f7ca1fc76ca88a22cc1136 Author: Martin Blumenstingl Date: Sat Jun 20 18:10:08 2020 +0200 ARM: dts: meson8: add power domain controller The Meson8 SoCs have a power domain controller which can turn on/off various register areas (such as: Ethernet, VPU, etc.). Add the main "pwrc" controller and configure the Ethernet power domain. Signed-off-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Reviewed-by: Neil Armstrong Link: https://lore.kernel.org/r/20200620161010.23171-2-martin.blumenstingl@googlemail.com commit 0cf17702d872128fc2bec79a9578b5cb00d54a11 Author: Kefeng Wang Date: Mon Jul 13 10:00:03 2020 +0800 remoteproc: qcom: Add missing slab.h drivers/remoteproc/qcom_common.c: In function 'qcom_ssr_get_subsys': drivers/remoteproc/qcom_common.c:210:9: error: implicit declaration of function 'kzalloc'; did you mean 'vzalloc'? [-Werror=implicit-function-declaration] info = kzalloc(sizeof(*info), GFP_KERNEL); ^~~~~~~ vzalloc kzalloc() is declared in linux/slab.h, add include to fix build issue. Tested-by: Alex Elder Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Link: https://lore.kernel.org/r/20200713020003.134039-1-wangkefeng.wang@huawei.com Signed-off-by: Bjorn Andersson commit 266f312845857994f761699e72b1023f576e5f13 Author: Alexander A. Klimov Date: Mon Jul 13 09:51:08 2020 +0200 dccp: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit cabb1f3827109372dcb80081cc654eb54f997afc Author: Neil Armstrong Date: Mon Jul 13 08:59:31 2020 +0200 arm64: dts: meson-khadas-vim3: add Khadas MCU nodes Add the Khadas MCU node with active FAN thermal nodes for all the Khadas VIM3 variants. Signed-off-by: Neil Armstrong Signed-off-by: Kevin Hilman Reviewed-by: Amit Kucheria Link: https://lore.kernel.org/r/20200713065931.19845-1-narmstrong@baylibre.com commit 89d79ed806841be990ba66326e8319e8ce1291fc Author: Lubomir Rintel Date: Wed Jun 17 00:33:53 2020 +0200 dt-bindings: timer: Convert mrvl,mmp-timer to json-schema A straightforward conversion of the mrvl,mmp-timer binding to DT schema format using json-schema. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200616223353.993567-6-lkundrak@v3.sk Signed-off-by: Rob Herring commit c19b05b84ddece7708ed0537a92d1dfabdfd98fb Author: Tetsuo Handa Date: Mon Jul 13 13:53:30 2020 +0900 net: fddi: skfp: Remove addr_to_string(). kbuild test robot found that addr_to_string() is available only when DEBUG is defined. And I found that what that function is doing is what %pM will do. Thus, replace %s with %pM and remove thread-unsafe addr_to_string() function. Reported-by: kbuild test robot Signed-off-by: Tetsuo Handa Signed-off-by: David S. Miller commit 8b8851784dc3b95438e9dffa0b39ad18d696c428 Author: Lubomir Rintel Date: Wed Jun 17 00:33:52 2020 +0200 dt-bindings: rtc: Convert sa1100-rtc to json-schema Convert the sa1100-rtc binding to DT schema format using json-schema. While add that, add clocks and resets that are actually used. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200616223353.993567-5-lkundrak@v3.sk Signed-off-by: Rob Herring commit c1cd67d27f52521a493a97791dd877b8050fc7e2 Author: Lubomir Rintel Date: Wed Jun 17 00:33:51 2020 +0200 dt-bindings: interrupt-controller: Convert mrvl,intc to json-schema Convert the mrvl,intc binding to DT schema format using json-schema. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200616223353.993567-4-lkundrak@v3.sk Signed-off-by: Rob Herring commit ecb11b2cc30cc8bc222ced20f280a3d0b167e481 Author: Lubomir Rintel Date: Wed Jun 17 00:33:50 2020 +0200 dt-bindings: i2c: Convert i2c-pxa to json-schema A conversion of the i2c-pxa binding to DT schema format using json-schema. This also cleans ups some errors in the binding: The compatible string description suggested that "mmp" in "mrvl,mmp-twsi" is to be substituted with a processor model, which wouldn't be a right thing to do and indeed nobody seems to have been doing that. There also was "Recommended properties" section that included optional as well as mandatory properties. Missing mandatory properties were added to the example. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200616223353.993567-3-lkundrak@v3.sk Signed-off-by: Rob Herring commit f882846c018263f1e17fe11fd0154115d11255b2 Author: Lubomir Rintel Date: Wed Jun 17 00:33:49 2020 +0200 dt-bindings: gpio: Convert mrvl-gpio to json-schema This converts the mrvl-gpio binding to DT schema format using json-schema. Various fixes were done during the conversion, such as adding more properties that are in fact mandatory or extending the examples to include child nodes with extra GPIO blocks. The compatible strings are a mess. It is not clear why so many of them are needed; the driver doesn't really seem to differentiate between the models. Some of them, like marvell,pxa93x-gpio and marvell,pxa1928-gpio are not used at all, so it's not known how many interrupts they utilize. On the other hand, mrvl,pxa-gpio has been seen in the tree, but it doesn't end up in any actual DTB file. In any case -- the schema merely copies whatever was in the original binding document, so it's hopefully no more wrong that the original. Acked-by: Linus Walleij Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200616223353.993567-2-lkundrak@v3.sk Signed-off-by: Rob Herring commit b88c28280c3f7097546db93824686db1e7dceee1 Author: Jonathan McDowell Date: Sat Jul 4 18:23:34 2020 +0100 firmware: qcom_scm: Fix legacy convention SCM accessors The move to a combined driver for the QCOM SCM hardware changed the io_writel and io_readl helpers to use non-atomic calls, despite the commit message saying that atomic was a better option. This breaks these helpers on hardware that uses the old legacy convention (access fails with a -95 return code). Switch back to using the atomic calls. Observed as a failure routing GPIO interrupts to the Apps processor on an IPQ8064; fix is confirmed as correctly allowing the interrupts to be routed and observed. Reviewed-by: Elliot Berman Fixes: 57d3b816718c ("firmware: qcom_scm: Remove thin wrappers") Cc: stable@vger.kernel.org Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/20200704172334.GA759@earth.li Signed-off-by: Bjorn Andersson commit e9dbebaf9b9de381a67500e39e63c9b1219c4f99 Author: Alexander A. Klimov Date: Mon Jul 13 08:48:50 2020 +0200 ARM: OMAP: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Tony Lindgren commit 75f66813e081d2bd718d931ee50334c12a9e4492 Author: Alexander A. Klimov Date: Wed Jul 8 11:34:51 2020 +0200 Replace HTTP links with HTTPS ones: OMAP DEVICE TREE SUPPORT Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Tony Lindgren commit 528ae84a34ffd40da5d3fbff740d28d6dc2c8f8a Author: Nikolay Aleksandrov Date: Mon Jul 13 10:55:46 2020 +0300 net: bridge: fix undefined br_vlan_can_enter_range in tunnel code If bridge vlan filtering is not defined we won't have br_vlan_can_enter_range and thus will get a compile error as was reported by Stephen and the build bot. So let's define a stub for when vlan filtering is not used. Fixes: 94339443686b ("net: bridge: notify on vlan tunnel changes done via the old api") Reported-by: Stephen Rothwell Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit e94828c17c99319ea59837d4a3eb18fe7045e0b4 Author: Suman Anna Date: Thu Jul 9 18:19:54 2020 -0500 ARM: dts: omap5-uevm: Add watchdog timers for IPU and DSP The watchdog timers have been added for the IPU and DSP remoteproc devices for the OMAP5 uEVM board. The following timers (same as the timers on OMAP4 Panda boards) are used as the watchdog timers, DSP : GPT6 IPU : GPT9 & GPT11 (one for each Cortex-M4 core) The MPU-side drivers will use this data to initialize the watchdog timers, and listen for any watchdog triggers. The BIOS-side code needs to configure and refresh these timers properly to not throw a watchdog error. These timers can be changed or removed as per the system integration needs, alongside appropriate equivalent changes on the firmware side. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit f1c4a33fb83eedfa9cdd32867c4d445fa8e74555 Author: Suman Anna Date: Thu Jul 9 18:19:53 2020 -0500 ARM: dts: omap4-panda-common: Add watchdog timers for IPU and DSP The watchdog timers have been added for the IPU and DSP remoteproc devices on all the OMAP4-based Panda boards. The following timers are used as the watchdog timers, DSP : GPT6 IPU : GPT9 & GPT11 (one for each Cortex-M3 core) The MPU-side drivers will use this data to initialize the watchdog timers, and listen for any watchdog triggers. The BIOS-side code needs to configure and refresh these timers properly to not throw a watchdog error. These timers can be changed or removed as per the system integration needs, alongside appropriate equivalent changes on the firmware side. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit f0954943a3dffbbf2b98573984f146a18d1219cb Author: Suman Anna Date: Thu Jul 9 18:19:52 2020 -0500 ARM: dts: omap5-uevm: Add system timers to DSP and IPU The BIOS System Tick timers have been added for the IPU and DSP remoteproc devices for the OMAP5 uEVM boards. The following timers (same as the timers on OMAP4 Panda boards) are chosen: IPU : GPT3 (SMP-mode) DSP : GPT5 IPU has two Cortex-M4 processors, and is currently expected to be running in SMP-mode, so only a single timer suffices to provide the BIOS tick timer. An additional timer should be added for the second processor in IPU if it were to be run in non-SMP mode. The timer value also needs to be unique from the ones used by other processors so that they can be run simultaneously. The timers are optional, but are mandatory to support device management features such as power management and watchdog support. The above are added to successfully boot and execute firmware images configured with the respective timers, images that use internal processor subsystem timers are not affected. The timers can be changed or removed as per the system integration needs, alongside equivalent changes on the firmware side. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 1e48754f2c6ed745299ed179ae90f695abe7ca87 Author: Suman Anna Date: Thu Jul 9 18:19:51 2020 -0500 ARM: dts: omap5-uevm: Add CMA pools and enable IPU & DSP The CMA reserved memory nodes have been added for the IPU and DSP remoteproc devices on the OMAP5 uEVM board. These nodes are assigned to the respective rproc device nodes, and both the IPU and DSP remote processors are enabled for this board. The current CMA pools and sizes are defined statically for each device. The starting addresses are fixed to meet current dependencies on the remote processor firmwares, and will go away when the remote-side code has been improved to gather this information runtime during its initialization. An associated pair of the rproc node and its CMA node can be disabled later on if there is no use-case defined to use that remote processor. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit e8661220e128ac649303ca0a5e31bf5f8533ab6e Author: Suman Anna Date: Thu Jul 9 18:19:50 2020 -0500 ARM: dts: omap5: Add aliases for rproc nodes Add aliases for the DSP and IPU remoteproc processor nodes common to all OMAP5 boards. The aliases uses the stem "rproc", and are identical to the values chosen on OMAP4 boards. The aliases can be overridden, if needed, in the respective board files. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 3026ce47498dfdc92966d8d66f10afabf7190c46 Author: Suman Anna Date: Thu Jul 9 18:19:49 2020 -0500 ARM: dts: omap5: Add DSP and IPU nodes OMAP5, like OMAP4, also has two remote processor subsystems, DSP and IPU. The IPU subsystem though has dual Cortex-M4 processors instead of the dual Cortex-M3 processors in OMAP4, but otherwise has almost the same set of features. Add the DT nodes for these two processor sub-systems for all OMAP5 SoCs. The nodes have the 'iommus', 'clocks', 'resets', 'firmware' and 'mboxes' properties added, and are disabled for now. The IPU node has its L2 RAM memory specified through the 'reg' and 'reg-names' properties. The DSP node doesn't have these since it doesn't have any L2 RAM memories, but has an additional 'ti,bootreg' property instead as it has a specific boot register that needs to be programmed for booting. These nodes should be enabled as per the individual product configuration in the corresponding board dts files. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 7f7d771c00bf65d18a3e30e983b4061a418efbf4 Author: Suman Anna Date: Thu Jul 9 18:19:48 2020 -0500 ARM: dts: omap4-panda-common:: Add system timers to DSP and IPU The BIOS System Tick timers have been added for the IPU and DSP remoteproc devices on all the OMAP4-based Panda boards. The following DMTimers are chosen: IPU : GPT3 (SMP-mode) DSP : GPT5 IPU has two Cortex-M3 processors, and is currently expected to be running in SMP-mode, so only a single timer suffices to provide the BIOS tick timer. An additional timer should be added for the second processor in IPU if it were to be run in non-SMP mode. The timer value also needs to be unique from the ones used by other processors so that they can be run simultaneously. The timers are optional, but are mandatory to support device management features such as power management and watchdog support. The above are added to successfully boot and execute firmware images configured with the respective timers, images that use internal processor subsystem timers are not affected. The timers can be changed or removed as per the system integration needs, alongside equivalent changes on the firmware side. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit b4778e787fe9e82dcbff8150ebfbe6fea0b6c4e1 Author: Suman Anna Date: Thu Jul 9 18:19:47 2020 -0500 ARM: dts: omap4-panda-common: Add CMA pools and enable IPU & DSP The CMA reserved memory nodes have been added for the IPU and DSP remoteproc devices on all the OMAP4-based Panda boards. These nodes are assigned to the respective rproc device nodes, and both the IPU and DSP remote processors are enabled for all these boards. The current CMA pools and sizes are defined statically for each device. The starting addresses are fixed to meet current dependencies on the remote processor firmwares, and will go away when the remote-side code has been improved to gather this information runtime during its initialization. An associated pair of the rproc node and its CMA node can be disabled later on if there is no use-case defined to use that remote processor. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 691eb1805fcfc1a2ede06aec6a4d85d312961146 Author: Suman Anna Date: Thu Jul 9 18:19:46 2020 -0500 ARM: dts: omap4: Add aliases for rproc nodes Add aliases for the DSP and IPU remoteproc processor nodes common to all OMAP4 boards. The aliases uses the stem "rproc". The aliases can be overridden, if needed, in the respective board files. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 5ce170cdaa64e31ddf87fbc4ebf06c64935a7b42 Author: Suman Anna Date: Thu Jul 9 18:19:45 2020 -0500 ARM: dts: omap4: Add IPU DT node The DT node for the Dual-Cortex M3 IPU processor sub-system has been added for OMAP4 SoCs. The L2RAM memory region information has been added to the node through the 'reg' and 'reg-names' properties. The node has the 'iommus', 'clocks', 'resets', 'mboxes' and 'firmware' properties also added, and is disabled for now. It should be enabled as per the individual product configuration in the corresponding board dts files. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 9ae60ac13fc847d7175587290a1a9aa2aac091b0 Author: Suman Anna Date: Thu Jul 9 18:19:44 2020 -0500 ARM: dts: omap4: Update the DSP node The compatible property for the DSP node is updated to match the OMAP remoteproc bindings. The node is moved from the soc node to the ocp node to better reflect the connectivity from MPU side. The node is updated with the 'ti,bootreg', 'clocks', 'resets', 'iommus', 'mboxes' and 'firmware' properties. Note that the node does not have any 'reg' or 'reg-names' properties since it doesn't have any L2 RAM memory, but only Unicaches. The node is disabled for now, and should be enabled as per the individual product configuration in the corresponding board dts files. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 52ddb6d914d6c6292463bd329c1f501b4c2dfdce Author: Suman Anna Date: Thu Jul 9 18:19:43 2020 -0500 ARM: dts: omap5: Add timer_sys_ck clocks for timers The commit d41e53040926 ("clk: ti: omap5: cleanup unnecessary clock aliases") has cleaned up all timer_sys_ck clock aliases and retained only the timer_32k_ck clock alias. The OMAP clocksource timer driver though still uses this clock alias when reconfiguring the parent clock source for the timer functional clocks, so add these clocks to all the timer nodes except for the always-on timers 1 and 12. This is required by the OMAP remoteproc driver to successfully acquire a timer and configure the source clock to be driven from timer_sys_ck clock. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 214ec0319e53075c6e36dca67e86a0d9699d1d9e Author: Suman Anna Date: Thu Jul 9 18:19:42 2020 -0500 ARM: dts: omap4: Add timer_sys_ck clocks for timers The commit 1c7de9f27a65 ("clk: ti: omap4: cleanup unnecessary clock aliases") has cleaned up all timer_sys_ck clock aliases and retained only the timer_32k_ck clock alias. The OMAP clocksource timer driver though still uses this clock alias when reconfiguring the parent clock source for the timer functional clocks, so add these clocks to all the timer nodes. This is required by the OMAP remoteproc driver to successfully acquire a timer and configure the source clock to be driven from timer_sys_ck clock. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit abe4e4675dfc62b7f2328e2c4bce8b5bdcdff7c0 Author: Drew Fustini Date: Sun Jul 12 12:37:19 2020 +0200 ARM: dts: am335x-pocketbeagle: set default mux for gpio pins These pins on the PocketBeagle P1 and P2 headers are connected to AM3358 balls with gpio lines, and these pins are not used for any other peripherals by default. These GPIO lines are unclaimed and could be used by userspace program through the gpiod ABI. This patch adds a "default" state in the am33xx_pinmux node and sets the mux for those pins to gpio (mode 7) and input enable. The "pinctrl-single,bias-pullup" and "pinctrl-single,bias-pulldown" pinconf properties are also set for each pin per the ball reset state in section 4.2 of the datasheet [0]. This is the AM335x pin control register format in Table 9-60 [1]: bit attribute value ---------------------------------- 31-7 reserved 0 on reset 6 slew { 0: fast, 1: slow } 5 rx_active { 0: rx disable, 1: rx enabled } 4 pu_typesel { 0: pulldown select, 1: pullup select } 3 puden { 0: pud enable, 1: disabled } 2 mode 3 bits to selec mode 0 to 7 1 mode 0 mode The values for the bias pinconf properties are derived as follows: pinctrl-single,bias-pullup = <[input] [enabled] [disable] [mask]>; pinctrl-single,bias-pullup = < 0x10 0x10 0x10 0x18 >; 2^5 2^4 2^3 2^2 2^1 2^0 | 0x20 0x10 0x08 0x04 0x02 0x01 | --------------------------------------------------| input x 1 0 x x x | 0x10 enabled x 1 0 x x x | 0x10 disabled x 0 0 x x x | 0x00 mask x 1 1 x x x | 0x18 pinctrl-single,bias-pulldown = <[input] [enabled] [disable] [mask]>; pinctrl-single,bias-pulldown = < 0x0 0x0 0x10 0x18 >; 2^5 2^4 2^3 2^2 2^1 2^0 | 0x20 0x10 0x08 0x04 0x02 0x01 | --------------------------------------------------| input x 0 0 x x x | 0x00 enabled x 0 0 x x x | 0x00 disabled x 1 0 x x x | 0x10 mask x 1 1 x x x | 0x18 [0] http://www.ti.com/lit/ds/symlink/am3358.pdf [1] https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf Signed-off-by: Drew Fustini Signed-off-by: Tony Lindgren commit 173817151b15d5a72a9bef1d2df7e6e7f6750f2e Author: Kees Cook Date: Wed Jun 10 08:46:58 2020 -0700 fs: Expand __receive_fd() to accept existing fd Expand __receive_fd() with support for replace_fd() for the coming seccomp "addfd" ioctl(). Add new wrapper receive_fd_replace() for the new behavior and update existing wrappers to retain old behavior. Thanks to Colin Ian King for pointing out an uninitialized variable exposure in an earlier version of this patch. Cc: Alexander Viro Cc: Dmitry Kadashev Cc: Jens Axboe Cc: Arnd Bergmann Cc: linux-fsdevel@vger.kernel.org Reviewed-by: Sargun Dhillon Acked-by: Christian Brauner Signed-off-by: Kees Cook commit 910d2f16ac90463a1f5b03d53246c443e2b354b9 Author: Kees Cook Date: Tue Jun 9 16:21:38 2020 -0700 pidfd: Replace open-coded receive_fd() Replace the open-coded version of receive_fd() with a call to the new helper. Thanks to Vamshi K Sthambamkadi for catching a missed fput() in an earlier version of this patch. Cc: Christoph Hellwig Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Sargun Dhillon Acked-by: Christian Brauner Signed-off-by: Kees Cook commit deefa7f3505ae2fb6a7cb75f50134b65a1dd1494 Author: Kees Cook Date: Wed Jun 10 20:47:45 2020 -0700 fs: Add receive_fd() wrapper for __receive_fd() For both pidfd and seccomp, the __user pointer is not used. Update __receive_fd() to make writing to ufd optional via a NULL check. However, for the receive_fd_user() wrapper, ufd is NULL checked so an -EFAULT can be returned to avoid changing the SCM_RIGHTS interface behavior. Add new wrapper receive_fd() for pidfd and seccomp that does not use the ufd argument. For the new helper, the allocated fd needs to be returned on success. Update the existing callers to handle it. Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Reviewed-by: Sargun Dhillon Acked-by: Christian Brauner Signed-off-by: Kees Cook commit 6659061045cc93f609e100b128f30581e5f012e9 Author: Kees Cook Date: Wed Jun 10 08:20:05 2020 -0700 fs: Move __scm_install_fd() to __receive_fd() In preparation for users of the "install a received file" logic outside of net/ (pidfd and seccomp), relocate and rename __scm_install_fd() from net/core/scm.c to __receive_fd() in fs/file.c, and provide a wrapper named receive_fd_user(), as future patches will change the interface to __receive_fd(). Additionally add a comment to fd_install() as a counterpoint to how __receive_fd() interacts with fput(). Cc: Alexander Viro Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Dmitry Kadashev Cc: Jens Axboe Cc: Arnd Bergmann Cc: Sargun Dhillon Cc: Ido Schimmel Cc: Ioana Ciornei Cc: linux-fsdevel@vger.kernel.org Cc: netdev@vger.kernel.org Reviewed-by: Sargun Dhillon Acked-by: Christian Brauner Signed-off-by: Kees Cook commit c0029de50982c1fb215330a5f9d433cec0cfd8cc Author: Kees Cook Date: Tue Jun 9 16:11:29 2020 -0700 net/scm: Regularize compat handling of scm_detach_fds() Duplicate the cleanups from commit 2618d530dd8b ("net/scm: cleanup scm_detach_fds") into the compat code. Replace open-coded __receive_sock() with a call to the helper. Move the check added in commit 1f466e1f15cf ("net: cleanly handle kernel vs user buffers for ->msg_control") to before the compat call, even though it should be impossible for an in-kernel call to also be compat. Correct the int "flags" argument to unsigned int to match fd_install() and similar APIs. Regularize any remaining differences, including a whitespace issue, a checkpatch warning, and add the check from commit 6900317f5eff ("net, scm: fix PaX detected msg_controllen overflow in scm_detach_fds") which fixed an overflow unique to 64-bit. To avoid confusion when comparing the compat handler to the native handler, just include the same check in the compat handler. Cc: Christoph Hellwig Cc: Sargun Dhillon Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Acked-by: Christian Brauner Signed-off-by: Kees Cook commit 4969f8a073977123504609d7310b42a588297aa4 Author: Kees Cook Date: Tue Jun 9 16:21:38 2020 -0700 pidfd: Add missing sock updates for pidfd_getfd() The sock counting (sock_update_netprioidx() and sock_update_classid()) was missing from pidfd's implementation of received fd installation. Add a call to the new __receive_sock() helper. Cc: Christian Brauner Cc: Christoph Hellwig Cc: Sargun Dhillon Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Fixes: 8649c322f75c ("pid: Implement pidfd_getfd syscall") Signed-off-by: Kees Cook commit d9539752d23283db4692384a634034f451261e29 Author: Kees Cook Date: Tue Jun 9 16:11:29 2020 -0700 net/compat: Add missing sock updates for SCM_RIGHTS Add missed sock updates to compat path via a new helper, which will be used more in coming patches. (The net/core/scm.c code is left as-is here to assist with -stable backports for the compat path.) Cc: Christoph Hellwig Cc: Sargun Dhillon Cc: Jakub Kicinski Cc: stable@vger.kernel.org Fixes: 48a87cc26c13 ("net: netprio: fd passed in SCM_RIGHTS datagram not set correctly") Fixes: d84295067fc7 ("net: net_cls: fd passed in SCM_RIGHTS datagram not set correctly") Acked-by: Christian Brauner Signed-off-by: Kees Cook commit cc15a20d5f3abc3cbd7911b70156b7b9e2bc7d41 Author: Jiri Olsa Date: Sat Jul 11 23:53:29 2020 +0200 selftests/bpf: Add test for resolve_btfids Adding resolve_btfids test under test_progs suite. It's possible to use btf_ids.h header and its logic in user space application, so we can add easy test for it. The test defines BTF_ID_LIST and checks it gets properly resolved. For this reason the test_progs binary (and other binaries that use TRUNNER* macros) is processed with resolve_btfids tool, which resolves BTF IDs in .BTF_ids section. The BTF data are taken from btf_data.o object rceated from progs/btf_data.c. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200711215329.41165-10-jolsa@kernel.org commit e5a0516ec9681daf5c1f0d05144d21430b6ca6d7 Author: Jiri Olsa Date: Sat Jul 11 23:53:28 2020 +0200 tools headers: Adopt verbatim copy of btf_ids.h from kernel sources It will be needed by bpf selftest for resolve_btfids tool. Also adding __PASTE macro as btf_ids.h dependency, which is defined in: include/linux/compiler_types.h but because tools/include do not have this header, I'm putting the macro into linux/compiler.h header. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200711215329.41165-9-jolsa@kernel.org commit 232ce4be295743deb2cf9a7cf9c60a4fde367964 Author: Jiri Olsa Date: Sat Jul 11 23:53:27 2020 +0200 bpf: Add info about .BTF_ids section to btf.rst Updating btf.rst doc with info about .BTF_ids section Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200711215329.41165-8-jolsa@kernel.org commit 49f4e6720748c778795df62d222d0200b61345be Author: Jiri Olsa Date: Sat Jul 11 23:53:26 2020 +0200 bpf: Use BTF_ID to resolve bpf_ctx_convert struct This way the ID is resolved during compile time, and we can remove the runtime name search. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200711215329.41165-7-jolsa@kernel.org commit 138b9a0511c789f2451ff1d80e7fd3f9eef3a9e3 Author: Jiri Olsa Date: Sat Jul 11 23:53:25 2020 +0200 bpf: Remove btf_id helpers resolving Now when we moved the helpers btf_id arrays into .BTF_ids section, we can remove the code that resolve those IDs in runtime. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200711215329.41165-6-jolsa@kernel.org commit c9a0f3b85e09dd16665b639cb884490410619434 Author: Jiri Olsa Date: Sat Jul 11 23:53:24 2020 +0200 bpf: Resolve BTF IDs in vmlinux image Using BTF_ID_LIST macro to define lists for several helpers using BTF arguments. And running resolve_btfids on vmlinux elf object during linking, so the .BTF_ids section gets the IDs resolved. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200711215329.41165-5-jolsa@kernel.org commit 5a2798ab32ba2952cfe25701ee460bccbd434c75 Author: Jiri Olsa Date: Sat Jul 11 23:53:23 2020 +0200 bpf: Add BTF_ID_LIST/BTF_ID/BTF_ID_UNUSED macros Adding support to generate .BTF_ids section that will hold BTF ID lists for verifier. Adding macros that will help to define lists of BTF ID values placed in .BTF_ids section. They are initially filled with zeros (during compilation) and resolved later during the linking phase by resolve_btfids tool. Following defines list of one BTF ID value: BTF_ID_LIST(bpf_skb_output_btf_ids) BTF_ID(struct, sk_buff) It also defines following variable to access the list: extern u32 bpf_skb_output_btf_ids[]; The BTF_ID_UNUSED macro defines 4 zero bytes. It's used when we want to define 'unused' entry in BTF_ID_LIST, like: BTF_ID_LIST(bpf_skb_output_btf_ids) BTF_ID(struct, sk_buff) BTF_ID_UNUSED BTF_ID(struct, task_struct) Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200711215329.41165-4-jolsa@kernel.org commit 33a57ce0a54d498275f432db04850001175dfdfa Author: Jiri Olsa Date: Sat Jul 11 23:53:22 2020 +0200 bpf: Compile resolve_btfids tool at kernel compilation start The resolve_btfids tool will be used during the vmlinux linking, so it's necessary it's ready for it. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Tested-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200711215329.41165-3-jolsa@kernel.org commit fbbb68de80a45ad66b66600bee275485c5073aa7 Author: Jiri Olsa Date: Sat Jul 11 23:53:21 2020 +0200 bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object The resolve_btfids tool scans elf object for .BTF_ids section and resolves its symbols with BTF ID values. It will be used to during linking time to resolve arrays of BTF ID values used in verifier, so these IDs do not need to be resolved in runtime. The expected layout of .BTF_ids section is described in main.c header. Related kernel changes are coming in following changes. Build issue reported by 0-DAY CI Kernel Test Service. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200711215329.41165-2-jolsa@kernel.org commit f33d4075e512274c0c6edcd7602da2cf1d5a0341 Author: Alexander A. Klimov Date: Fri Jul 10 08:20:19 2020 +0200 docs: openrisc: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200710062019.28755-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 90a9f51025dd4f6a026866c0cec6e4a14720bfff Author: Alexander A. Klimov Date: Thu Jul 9 20:27:42 2020 +0200 S390: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200709182742.24724-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 8a74c93d15be769754558c208b717e8ac9156d68 Author: Alexander A. Klimov Date: Wed Jul 8 22:24:17 2020 +0200 docs: ipmi: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200708202417.22375-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit e398d7c126c10eb40f87edb6d4ce6dea6c123e7f Author: Lee Shawn C Date: Mon Jul 13 13:07:46 2020 -0400 drm/i915/mst: filter out the display mode exceed sink's capability So far, max dot clock rate for MST mode rely on physcial bandwidth limitation. It would caused compatibility issue if source display resolution exceed MST hub output ability. For example, source DUT had DP 1.2 output capability. And MST docking just support HDMI 1.4 spec. When a HDMI 2.0 monitor connected. Source would retrieve EDID from external and get max resolution 4k@60fps. DP 1.2 can support 4K@60fps because it did not surpass DP physical bandwidth limitation. Do modeset to 4k@60fps, source output display data but MST docking can't output HDMI properly due to this resolution already over HDMI 1.4 spec. Refer to commit ("drm/dp_mst: Use full_pbn instead of available_pbn for bandwidth checks"). Source driver should refer to full_pbn to evaluate sink output capability. And filter out the resolution surpass sink output limitation. Changes since v1: * Using mgr->base.lock to protect full_pbn. Changes since v2: * Add ctx lock. Changes since v3: * s/intel_dp_mst_mode_clock_exceed_pbn_bandwidth/ intel_dp_mst_mode_clock_exceeds_pbn_bw/ * Use the new drm_connector_helper_funcs.mode_valid_ctx to properly pipe down the drm_modeset_acquire_ctx that the probe helpers are using, so we can safely grab &mgr->base.lock without deadlocking Changes since v4: * Move drm_dp_calc_pbn_mode(mode->clock, bpp, false) > port->full_pbn check * Fix the bpp we use in drm_dp_calc_pbn_mode() * Drop leftover (!mgr) check * Don't check for if full_pbn is unset. To be clear - it _can_ be unset, but if it is then it's certainly a bug in DRM or a non-compliant sink as full_pbn should always be populated by the time we call ->mode_valid_ctx. We should workaround non-compliant sinks with full_pbn=0, but that should happen in the DP MST helpers so we can estimate the full_pbn value as best we can. Tested-by: Imre Deak Reviewed-by: Imre Deak Cc: Manasi Navare Cc: Jani Nikula Cc: Ville Syrjala Cc: Cooper Chiou Co-developed-by: Lyude Paul Signed-off-by: Lee Shawn C Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200713170746.254388-3-lyude@redhat.com commit 1c26b8e09004477c070f0dccb2369438ef9e1fc9 Author: Lyude Paul Date: Mon Jul 13 13:07:45 2020 -0400 drm/probe_helper: Add drm_connector_helper_funcs.mode_valid_ctx This is just an atomic version of mode_valid, which is intended to be used for situations where a driver might need to check the atomic state of objects other than the connector itself. One such example is with MST, where the maximum possible bandwidth on a connector can change dynamically irregardless of the display configuration. Changes since v1: * Use new drm logging functions * Make some corrections in the mode_valid_ctx kdoc * Return error codes or 0 from ->mode_valid_ctx() on fail, and store the drm_mode_status in an additional function parameter Changes since v2: * Don't accidentally assign ret to mode->status on success, or we'll squash legitimate mode validation results * Don't forget to assign MODE_OK to status in drm_connector_mode_valid() if we have no callbacks * Drop leftover hunk in drm_modes.h around enum drm_mode_status Changes since v3: * s/return ret/return 0/ in drm_mode_validate_pipeline() * Minor cleanup in drm_connector_mode_valid() Tested-by: Imre Deak Reviewed-by: Imre Deak Cc: Lee Shawn C Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200713170746.254388-2-lyude@redhat.com commit 4d8c1e055790a776022158b8c056ecf7f339effd Author: Alexander A. Klimov Date: Wed Jul 8 18:18:39 2020 +0200 docs: gcov: replace links with HTTPS Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200708161839.15170-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 0f540b95386e43ac28d482d6824aff860e644065 Author: Alexander A. Klimov Date: Wed Jul 8 16:58:04 2020 +0200 Replace HTTP links with HTTPS ones: 9P FILE SYSTEM Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200708145804.14887-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 8cdcd8aeee2819199ec7f68114b77b04c10611d3 Author: Linus Walleij Date: Thu Jun 25 22:02:52 2020 +0200 spi: imx/fsl-lpspi: Convert to GPIO descriptors This converts the two Freescale i.MX SPI drivers Freescale i.MX (CONFIG_SPI_IMX) and Freescale i.MX LPSPI (CONFIG_SPI_FSL_LPSPI) to use GPIO descriptors handled in the SPI core for GPIO chip selects whether defined in the device tree or a board file. The reason why both are converted at the same time is that they were both using the same platform data and platform device population helpers when using board files intertwining the code so this gives a cleaner cut. The platform device creation was passing a platform data container from each boardfile down to the driver using struct spi_imx_master from , but this was only conveying the number of chipselects and an int * array of the chipselect GPIO numbers. The imx27 and imx31 platforms had code passing the now-unused platform data when creating the platform devices, this has been repurposed to pass around GPIO descriptor tables. The platform data struct that was just passing an array of integers and number of chip selects for the GPIO lines has been removed. The number of chipselects used to be passed from the board file, because this number also limits the number of native chipselects that the platform can use. To deal with this we just augment the i.MX (CONFIG_SPI_IMX) driver to support 3 chipselects if the platform does not define "num-cs" as a device property (such as from the device tree). This covers all the legacy boards as these use <= 3 native chip selects (or GPIO lines, and in that case the number of chip selects is determined by the core from the number of available GPIO lines). Any new boards should use device tree, so this is a reasonable simplification to cover all old boards. The LPSPI driver never assigned the number of chipselects and thus always fall back to the core default of 1 chip select if no GPIOs are defined in the device tree. The Freescale i.MX driver was already partly utilizing the SPI core to obtain the GPIO numbers from the device tree, so this completes the transtion to let the core handle all of it. All board files and the core i.MX boardfile registration code is augmented to account for these changes. This has been compile-tested with the imx_v4_v5_defconfig and the imx_v6_v7_defconfig. Signed-off-by: Linus Walleij Acked-by: Shawn Guo Cc: Uwe Kleine-König Cc: Robin Gong Cc: Trent Piepho Cc: Clark Wang Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Link: https://lore.kernel.org/r/20200625200252.207614-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit d3b419ca0fd936a9fe3452428e1c729a8047f881 Author: Alexander A. Klimov Date: Wed Jul 8 14:36:13 2020 +0200 docs: hid: Convert link to https Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200708123613.14368-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 011c9ec330f1470838e55a62af82688d2bf5d067 Author: Alexander A. Klimov Date: Wed Jul 8 10:14:03 2020 +0200 Replace HTTP links with HTTPS ones: AFS FILESYSTEM Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200708081403.13323-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 561a75acda215b5e373fb6aa6fa2eb03a8b1a850 Author: Alexander A. Klimov Date: Wed Jul 8 08:28:42 2020 +0200 Replace HTTP links with HTTPS ones: OMFS Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200708062842.12214-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 059db4341303922b6181df4b58c05f22d33b2f4f Author: Randy Dunlap Date: Mon Jul 6 23:49:57 2020 -0700 Documentation/filesystems/proc.rst: copy-editing cleanup Clean up Documentation/filesystems/proc.rst. This is basically fixing lots of spelling, grammar, punctuation, typos, spacing, consistency, section numbering, and headings. Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/a5f126e6-d67a-154a-1c87-d8f07542a21c@infradead.org Signed-off-by: Jonathan Corbet commit 6db35a242cd46298adbd868512188bf58f71d6f1 Author: Randy Dunlap Date: Fri Jul 3 20:44:58 2020 -0700 Documentation/driver-api: nvdimm: drop doubled word Drop the doubled word "to". Signed-off-by: Randy Dunlap Acked-by: Ira Weiny Link: https://lore.kernel.org/r/20200704034502.17199-14-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 97b8281c550e1fd86afa6bc99c77d1d992dcf460 Author: Randy Dunlap Date: Fri Jul 3 20:44:57 2020 -0700 Documentation/driver-api: ntb: drop doubled word Drop the doubled word "with". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jon Mason Cc: Dave Jiang Cc: Allen Hubbe Cc: linux-ntb@googlegroups.com Link: https://lore.kernel.org/r/20200704034502.17199-13-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 308e65ad060dca2f0187731a7916c71521ce6c25 Author: Rikard Falkeborn Date: Sat Jul 11 13:44:09 2020 +0200 regulator: cros-ec: Constify cros_ec_regulator_voltage_ops It is never modified, so make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Acked-by: Pi-Hsun Shih Link: https://lore.kernel.org/r/20200711114409.9911-1-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 3c881456b64519e661b14a23664f272a0171b0cb Author: Tony Lindgren Date: Mon Jul 13 09:59:48 2020 -0700 ARM: OMAP2+: Drop legacy platform data for am4 dwc3 We can now probe devices with ti-sysc interconnect driver and dts data. Let's drop the related platform data and custom ti,hwmods dts property. As we're just dropping data, and the early platform data init is based on the custom ti,hwmods property, we want to drop both the platform data and ti,hwmods property in a single patch. [tony@atomide.com: fixed typo for am3 vs am4] Signed-off-by: Tony Lindgren commit 4254632dba27271f6de66efd87e444ee405dee29 Author: Tony Lindgren Date: Mon Jul 13 09:59:47 2020 -0700 bus: ti-sysc: Add missing quirk flags for usb_host_hs Similar to what we have for the legacy platform data, we need to configure SWSUP_SIDLE and SWSUP_MSTANDBY quirks for usb_host_hs. These are needed to drop the legacy platform data for usb_host_hs. Signed-off-by: Tony Lindgren commit 1d9221e9d395c8c80d99d002bea3c9b6dd192d6a Author: Chris Wilson Date: Mon Jul 13 15:16:36 2020 +0100 drm/i915: Skip signaling a signaled request Preempt-to-busy introduces various fascinating complications in that the requests may complete as we are unsubmitting them from HW. As they may then signal after unsubmission, we may find ourselves having to cleanup the signaling request from within the signaling callback. This causes us to recurse onto the same i915_request.lock. However, if the request is already signaled (as it will be before we enter the signal callbacks), we know we can skip the signaling of that request during submission, neatly evading the spinlock recursion. unsubmit(ve.rq0) # timeslice expiration or other preemption -> virtual_submit_request(ve.rq0) dma_fence_signal(ve.rq0) # request completed before preemption ack -> submit_notify(ve.rq1) -> virtual_submit_request(ve.rq1) # sees that we have completed ve.rq0 -> __i915_request_submit(ve.rq0) [ 264.210142] BUG: spinlock recursion on CPU#2, sample_multi_tr/2093 [ 264.210150] lock: 0xffff9efd6ac55080, .magic: dead4ead, .owner: sample_multi_tr/2093, .owner_cpu: 2 [ 264.210155] CPU: 2 PID: 2093 Comm: sample_multi_tr Tainted: G U [ 264.210158] Hardware name: Intel Corporation CoffeeLake Client Platform/CoffeeLake S UDIMM RVP, BIOS CNLSFWR1.R00.X212.B01.1909060036 09/06/2019 [ 264.210160] Call Trace: [ 264.210167] dump_stack+0x98/0xda [ 264.210174] spin_dump.cold+0x24/0x3c [ 264.210178] do_raw_spin_lock+0x9a/0xd0 [ 264.210184] _raw_spin_lock_nested+0x6a/0x70 [ 264.210314] __i915_request_submit+0x10a/0x3c0 [i915] [ 264.210415] virtual_submit_request+0x9b/0x380 [i915] [ 264.210516] submit_notify+0xaf/0x14c [i915] [ 264.210602] __i915_sw_fence_complete+0x8a/0x230 [i915] [ 264.210692] i915_sw_fence_complete+0x2d/0x40 [i915] [ 264.210762] __dma_i915_sw_fence_wake+0x19/0x30 [i915] [ 264.210767] dma_fence_signal_locked+0xb1/0x1c0 [ 264.210772] dma_fence_signal+0x29/0x50 [ 264.210871] i915_request_wait+0x5cb/0x830 [i915] [ 264.210876] ? dma_resv_get_fences_rcu+0x294/0x5d0 [ 264.210974] i915_gem_object_wait_fence+0x2f/0x40 [i915] [ 264.211084] i915_gem_object_wait+0xce/0x400 [i915] [ 264.211178] i915_gem_wait_ioctl+0xff/0x290 [i915] Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") References: 6d06779e8672 ("drm/i915: Load balancing across a virtual engine") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: "Nayana, Venkata Ramana" Cc: # v5.4+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200713141636.29326-1-chris@chris-wilson.co.uk commit 90a987205c6cf74116a102ed446d22d92cdaf915 Author: Chris Wilson Date: Mon Jul 13 17:05:49 2020 +0100 drm/i915/gt: Only swap to a random sibling once upon creation The danger in switching at random upon intel_context_pin is that the context may still actually be inflight, as it will not be scheduled out until a context switch after it is complete -- that may be a long time after we do a final intel_context_unpin. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2118 Fixes: 6d06779e8672 ("drm/i915: Load balancing across a virtual engine") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.3+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200713160549.17344-1-chris@chris-wilson.co.uk commit f50d67f9eff62f8078fe6e98ede3f4fb1defc361 Author: Sugar Zhang Date: Mon Jul 13 18:26:00 2020 +0800 ASoC: rockchip: spdif: Handle clk by pm runtime This patch handle the clk by pm runtime mechanism to simplify the clk management. Signed-off-by: Sugar Zhang Link: https://lore.kernel.org/r/1594635960-67855-1-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown commit 629b49c848ee71244203934347bd7730b0ddee8d Author: Peilin Ye Date: Fri Jul 10 17:45:26 2020 -0400 Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_with_rssi_evt() Check `num_rsp` before using it as for-loop counter. Add `unlock` label. Cc: stable@vger.kernel.org Signed-off-by: Peilin Ye Signed-off-by: Marcel Holtmann commit 75bbd2ea50ba1c5d9da878a17e92eac02fe0fd3a Author: Peilin Ye Date: Fri Jul 10 17:39:18 2020 -0400 Bluetooth: Prevent out-of-bounds read in hci_inquiry_result_evt() Check `num_rsp` before using it as for-loop counter. Cc: stable@vger.kernel.org Signed-off-by: Peilin Ye Signed-off-by: Marcel Holtmann commit 3344537f614b966f726c1ec044d1c70a8cabe178 Author: Venkata Lakshmi Narayana Gubba Date: Sat Jul 11 17:01:12 2020 +0530 Bluetooth: hci_qca: Bug fixes for SSR 1.During SSR for command time out if BT SoC goes to inresponsive state, power cycling of BT SoC was not happening. Given the fix by sending hw error event to reset the BT SoC. 2.If SSR is triggered then ignore the transmit data requests to BT SoC until SSR is completed. Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann commit 33bfd94a05abb5a63e323dd1454bc580d4bf992c Author: Joseph Hwang Date: Mon Jul 13 15:45:29 2020 +0800 Bluetooth: btusb: add Realtek 8822CE to usb_device_id table This patch adds the Realtek 8822CE controller to the usb_device_id table to support the wideband speech capability. Signed-off-by: Joseph Hwang Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 496b24ec6d47f2d304a0c5836ba4b1bb5d30bab8 Author: Alexander A. Klimov Date: Mon Jul 13 15:50:18 2020 +0200 gcc-plugins: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713135018.34708-1-grandmaster@al2klimov.de Signed-off-by: Kees Cook commit b91c9cb9d4b378fda65c3196034ecd09ee1493ef Author: Dan Carpenter Date: Mon Jul 13 13:53:24 2020 +0300 ALSA: echoaudio: re-enable IRQs on failure path This should be spin_unlock_irq() instead of spin_lock(). Fixes: 6c3312544873 ("ALSA: echoaudio: Prevent races in calls to set_audio_format()") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200713105324.GB251988@mwanda Signed-off-by: Takashi Iwai commit 0afff876ddf3a7770af78abeb4e7cc1a0dd23b33 Author: Vasily Khoruzhick Date: Mon Jul 13 08:28:52 2020 -0700 ALSA: line6: add hw monitor volume control for POD HD500 Add hw monitor volume control for POD HD500. The same change may work for HD500X but I don't have it to test. Signed-off-by: Vasily Khoruzhick Link: https://lore.kernel.org/r/20200713152852.65832-1-anarsoul@gmail.com Signed-off-by: Takashi Iwai commit 4b708d6e6f62c68e35815237ceb9896c206d9fc8 Author: Randy Dunlap Date: Tue Jul 7 11:49:31 2020 -0700 Documentation: coda: annotate duplicated words At first glance it appears that the coda.rst file contains doubled words "name name" in two places. Turns out it is just confusing (at least to me), so try to make it clear that the second 'name' is just the name of a struct field/member. Signed-off-by: Randy Dunlap Acked-by: Jan Harkes Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jan Harkes Cc: coda@cs.cmu.edu Cc: codalist@coda.cs.cmu.edu Link: https://lore.kernel.org/r/d7c2d274-de28-193f-5a98-9e3e16c6c9d5@infradead.org Signed-off-by: Jonathan Corbet commit db6f369d5b2a9da5c5dfa7c56ffafe848f3f05e7 Author: Tobias Klauser Date: Tue Jul 7 11:09:22 2020 +0200 Documentation/features: Remove unicore32 from kcov and kmemleak Commit 3839a7460721 ("Documentation/features: Add kcov") and commit 4641961cff2f ("Documentation/features: Add kmemleak") were added shortly after the unicore32 port was removed in commit fb37409a01b0 ("arch: remove unicore32 port"). Remove the unicore32 feature lines from kcov and kmemleak as well. Signed-off-by: Tobias Klauser Link: https://lore.kernel.org/r/20200707090922.4746-1-tklauser@distanz.ch Signed-off-by: Jonathan Corbet commit 02cd2d3144653e6e2a0c7ccaa73311e48e2dc686 Author: Tom Rix Date: Sun Jul 12 08:24:53 2020 -0700 drm/bridge: sil_sii8620: initialize return of sii8620_readb clang static analysis flags this error sil-sii8620.c:184:2: warning: Undefined or garbage value returned to caller [core.uninitialized.UndefReturn] return ret; ^~~~~~~~~~ sii8620_readb calls sii8620_read_buf. sii8620_read_buf can return without setting its output pararmeter 'ret'. So initialize ret. Fixes: ce6e153f414a ("drm/bridge: add Silicon Image SiI8620 driver") Signed-off-by: Tom Rix Reviewed-by: Laurent Pinchart Reviewed-by: Andrzej Hajda Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200712152453.27510-1-trix@redhat.com commit 3a63e9fcc8101e431dfcbd77f9afa435a9333b16 Author: Puranjay Mohan Date: Tue Jul 7 11:02:52 2020 +0530 Driver-API: Documentation: Replace deprecated :c:func: Usage Replace :c:func: with func() as the previous usage is deprecated. Signed-off-by: Puranjay Mohan Link: https://lore.kernel.org/r/20200707053252.32703-1-puranjay12@gmail.com Signed-off-by: Jonathan Corbet commit 8479eb82084112b1cf5862099536b384bba5b92c Author: Alexander A. Klimov Date: Mon Jul 13 12:55:02 2020 +0200 cpufreq: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Rafael J. Wysocki commit 8b1a17c7c5c528f9f512ad2b1098feedcee289da Author: Randy Dunlap Date: Fri Jul 3 14:36:49 2020 -0700 Documentation: locking: ww-mutex-design: drop duplicated word Drop the doubled word "up". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Link: https://lore.kernel.org/r/20200703213649.30948-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 7d64394b5187e225b4e578d281a36e07495738ce Author: Randy Dunlap Date: Fri Jul 3 14:36:48 2020 -0700 Documentation: locking: mutex-design: fix duplicated word Change the phrase "at at least" to "to at least" to be more readable. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Link: https://lore.kernel.org/r/20200703213649.30948-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit bfbc7e5c92fec5252ad45ac26f1699a6234f8c0e Author: Randy Dunlap Date: Fri Jul 3 14:31:06 2020 -0700 Documentation: x86: earlyprintk: drop doubled words Drop the doubled word "and". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Link: https://lore.kernel.org/r/20200703213107.30758-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 6f91b3885f6d4d0de07995ce905672aede9035f1 Author: Randy Dunlap Date: Fri Jul 3 14:31:07 2020 -0700 Documentation: x86: machinecheck: drop doubled words Drop the doubled word "see". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Link: https://lore.kernel.org/r/20200703213107.30758-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit e1fef0b08e06dcce275bd585bc6a900dff395096 Author: JeongHyeon Lee Date: Thu Jun 18 15:56:50 2020 +0900 dm verity: add "panic_on_corruption" error handling mode Samsung smart phones may need the ability to panic on corruption. Not all devices provide the bootloader support needed to use the existing "restart_on_corruption" mode. Additional details for why Samsung needs this new mode can be found here: https://www.redhat.com/archives/dm-devel/2020-June/msg00235.html Signed-off-by: jhs2.lee Signed-off-by: Mike Snitzer commit 374117ad4736c5a4f8012cfe59fc07d9d58191d5 Author: Mike Snitzer Date: Mon Jun 15 11:31:04 2020 -0400 dm mpath: use double checked locking in fast path Fast-path code biased toward lazy acknowledgement of bit being set (primarily only for initialization). Multipath code is very retry oriented so even if state is missed it'll recover. Signed-off-by: Mike Snitzer commit 564dbb130b3f8ab39719a42c130505bf75610fbf Author: Mike Snitzer Date: Wed Jun 10 21:25:39 2020 -0400 dm mpath: rename current_pgpath to pgpath in multipath_prepare_ioctl Makes consistent with __map_bio() and multipath_clone_and_map(). Signed-off-by: Mike Snitzer commit 17213ec1806199ab528655946af144abc37d89fb Author: Mike Snitzer Date: Wed Jun 10 20:19:56 2020 -0400 dm mpath: rework __map_bio() so that it follows same pattern as request-based multipath_clone_and_map() Signed-off-by: Mike Snitzer commit f45f11868e0efeccfc1c695e56864f9032f18bdc Author: Mike Snitzer Date: Wed Jun 10 20:03:19 2020 -0400 dm mpath: factor out multipath_queue_bio Enables further cleanup. Signed-off-by: Mike Snitzer commit 73265f3ffdc90f0e27b79fbcba8530c75c74ef12 Author: Mike Snitzer Date: Wed Jun 10 16:51:32 2020 -0400 dm mpath: push locking down to must_push_back_rq() Signed-off-by: Mike Snitzer commit a271a89c6e4773478b1c4f8213dfe8351ea66723 Author: Mike Snitzer Date: Wed Jun 10 16:07:57 2020 -0400 dm mpath: take m->lock spinlock when testing QUEUE_IF_NO_PATH Fix multipath_end_io, multipath_end_io_bio and multipath_busy to take m->lock while testing if MPATHF_QUEUE_IF_NO_PATH bit is set. These are all slow-path cases when no paths are available so extra locking isn't a performance hit. Correctness matters most. Signed-off-by: Mike Snitzer commit 69cea0d45a618ad4ae74f36386ef1af5128b2b19 Author: Mike Snitzer Date: Wed Jun 10 15:02:37 2020 -0400 dm mpath: changes from initial m->flags locking audit Fix locking in slow-paths where m->lock should be taken. Signed-off-by: Mike Snitzer commit 18d97ed9b7f0deefd0ca0042ab7d6f18e38244f4 Author: Randy Dunlap Date: Tue Jul 7 11:04:13 2020 -0700 Documentation: vm/memory-model: eliminate duplicated word Drop the doubled word "the". Signed-off-by: Randy Dunlap Reviewed-by: Mike Rapoport Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Andrew Morton Cc: linux-mm@kvack.org Link: https://lore.kernel.org/r/20200707180414.10467-20-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit a84b757e64b716fe7ed1b8e81f20e3343ea4e986 Author: Randy Dunlap Date: Tue Jul 7 11:04:14 2020 -0700 Documentation: virt/kvm/api: eliminate duplicated word Drop the duplicated word "struct". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Paolo Bonzini Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-21-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit b216685bd8cfc17588a24b8da7e056055880b08e Author: Randy Dunlap Date: Tue Jul 7 11:04:12 2020 -0700 Documentation: security/keys: eliminate duplicated word Drop the doubled word "in". Signed-off-by: Randy Dunlap Acked-by: Jarkko Sakkinen Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: James Bottomley Cc: Jarkko Sakkinen Cc: Mimi Zohar Cc: linux-integrity@vger.kernel.org Cc: keyrings@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-19-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 96c6304196565a073a7f2bffbe9f2b50cecb4b51 Author: Randy Dunlap Date: Tue Jul 7 11:04:10 2020 -0700 Documentation: s390/vfio-ap: eliminate duplicated word Drop the doubled word "the". Signed-off-by: Randy Dunlap Reviewed-by: Pierre Morel Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Tony Krowiak Cc: Pierre Morel Cc: Halil Pasic Cc: linux-s390@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-17-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit e77bfed07229011f1403d391091c9afc6f2e4d74 Author: Randy Dunlap Date: Tue Jul 7 11:04:09 2020 -0700 Documentation: powerpc/vas-api: eliminate duplicated word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20200707180414.10467-16-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 4930ac30edf7c0729fee4dff98888308dd8ccc7c Author: Randy Dunlap Date: Tue Jul 7 11:04:08 2020 -0700 Documentation: misc/xilinx_sdfec: eliminate duplicated word Drop the doubled word "the". Signed-off-by: Randy Dunlap Acked-by: Dragan Cvetic Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Derek Kiernan Cc: Dragan Cvetic Link: https://lore.kernel.org/r/20200707180414.10467-15-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 498ad0adb6a6a8830530bd148cfabafbd82afa2a Author: Randy Dunlap Date: Tue Jul 7 11:04:07 2020 -0700 Documentation: mips/ingenic-tcu: eliminate duplicated word Drop the doubled word "to". Signed-off-by: Randy Dunlap Reviewed-by: Paul Cercueil Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Paul Cercueil Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-14-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 2ee2689064912f7f621cf2b824a9dc8140a9e7c7 Author: Randy Dunlap Date: Tue Jul 7 11:04:06 2020 -0700 Documentation: maintainer-entry-profile: eliminate duplicated word Drop the doubled word "have". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Dan Williams Link: https://lore.kernel.org/r/20200707180414.10467-13-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit b7ecdb00daa7ef5dc61e08e6a030cb93497b292b Author: Randy Dunlap Date: Tue Jul 7 11:04:05 2020 -0700 Documentation: leds/ledtrig-transient: eliminate duplicated word Drop the doubled word "for". Signed-off-by: Randy Dunlap Acked-by: Jacek Anaszewski Acked-by: Pavel Machek Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jacek Anaszewski Cc: Pavel Machek Cc: Dan Murphy Cc: linux-leds@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-12-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 14bee1674ac59d0267f8c660972edc8da49d314d Author: Randy Dunlap Date: Tue Jul 7 11:04:04 2020 -0700 Documentation: kbuild/kconfig-language: eliminate duplicated word Drop the doubled word "the". Signed-off-by: Randy Dunlap Acked-by: Masahiro Yamada Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-11-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit e83adbca5b9c1ab3b0f11632a7ed4e4d0dd5c1b4 Author: Randy Dunlap Date: Tue Jul 7 11:04:03 2020 -0700 Documentation: i2c: eliminate duplicated word Drop doubled word "new". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Wolfram Sang Cc: linux-i2c@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-10-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit e94f32c1206ea6f02c9ddfba649084c9fcabe95e Author: Randy Dunlap Date: Tue Jul 7 11:04:02 2020 -0700 Documentation: hid/intel-ish-hid: eliminate duplicated word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Srinivas Pandruvada Cc: Jiri Kosina Cc: linux-input@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-9-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit bde952f9b2da3e1afe88da8d33638ddb495a4b27 Author: Randy Dunlap Date: Tue Jul 7 11:04:01 2020 -0700 Documentation: gpu/drm-uapi: eliminate duplicated word Drop the doubled word "when". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Link: https://lore.kernel.org/r/20200707180414.10467-8-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 686ebbfe2cb23fb2791a4bd15436968fcab25bef Author: Randy Dunlap Date: Tue Jul 7 11:04:00 2020 -0700 Documentation: gpu/komeda-kms: eliminate duplicated word Drop the doubled word "and". Signed-off-by: Randy Dunlap Reviewed-by: James Qian Wang Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: James (Qian) Wang Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Mali DP Maintainers Link: https://lore.kernel.org/r/20200707180414.10467-7-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 2de4ba17f7906fb5f83664fb7031b26d1668b4ba Author: Randy Dunlap Date: Tue Jul 7 11:03:59 2020 -0700 Documentation: fpga: eliminate duplicated word Drop the doubled word "this". Signed-off-by: Randy Dunlap Acked-by: Wu Hao Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Wu Hao Cc: linux-fpga@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-6-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 06467a780110a8a1ac1e50c08b287c0f6c102a29 Author: Randy Dunlap Date: Tue Jul 7 11:03:58 2020 -0700 Documentation: kgdb: eliminate duplicated word Drop the doubled word "driver". Signed-off-by: Randy Dunlap Reviewed-by: Douglas Anderson Acked-by: Daniel Thompson Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jason Wessel Cc: Daniel Thompson Cc: Douglas Anderson Cc: kgdb-bugreport@lists.sourceforge.net Link: https://lore.kernel.org/r/20200707180414.10467-5-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 6566945f9c79f6993f0109fcff701b9751e1a9d6 Author: Randy Dunlap Date: Tue Jul 7 11:03:57 2020 -0700 Documentation: printk-basics: eliminate duplicated word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-4-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 6fa9a5a23026e6839c2f490325c8fba16d33f23c Author: Randy Dunlap Date: Tue Jul 7 11:03:56 2020 -0700 Documentation: block: eliminate duplicated word Change the doubled word "the" to "to the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Jens Axboe Cc: linux-block@vger.kernel.org Link: https://lore.kernel.org/r/20200707180414.10467-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit eeb3dc58f84b423ca7e24e226329f31e9682f6e1 Author: Randy Dunlap Date: Tue Jul 7 11:03:55 2020 -0700 Documentation: numaperf: eliminate duplicated word Drop the duplicated word "not". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-mm@vger.kernel.org Cc: Mike Rapoport Link: https://lore.kernel.org/r/20200707180414.10467-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 9d1bd9e8e028d1e1753120ba53d39fcdaeca6ea6 Author: Kees Cook Date: Thu Jul 9 11:51:35 2020 -0700 doc: yama: Swap HTTP for HTTPS and replace dead link Replace one dead link for the same person's original presentation on the topic and swap an HTTP URL with HTTPS. While here, linkify the text to make it more readable when rendered. Link: https://lore.kernel.org/lkml/20200708073346.13177-1-grandmaster@al2klimov.de/ Co-developed-by: Alexander A. Klimov Signed-off-by: Alexander A. Klimov Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/202007091141.C008B89EC@keescook Signed-off-by: Jonathan Corbet commit 7eb0454440e1522d347b2bc0db8eab742115098a Author: Thierry Reding Date: Fri Jun 12 09:02:36 2020 +0200 arm64: tegra: norrin: Add missing panel power supply This panel supply is always on, so this does happen to work by accident. Make sure to properly hook up the power supply to model the dependency correctly and so that the panel continues to operate properly even if the supply is not always on. Signed-off-by: Thierry Reding commit 7517248ad27f957d64c40ebe0ff9b284198be0a4 Author: Thierry Reding Date: Fri Jun 12 09:02:05 2020 +0200 arm64: tegra: Remove simple regulators bus The standard way to do this is to list out the regulators at the top- level. Adopt the standard way to fix validation. Signed-off-by: Thierry Reding commit dbf35499fb0e3365fa280616b187bca8b64188f6 Author: Kees Cook Date: Thu Jul 9 11:11:30 2020 -0700 Documentation/security-bugs: Explain why plain text is preferred The security contact list gets regular reports contained in archive attachments. This tends to add some back-and-forth delay in dealing with security reports since we have to ask for plain text, etc. Signed-off-by: Kees Cook Reviewed-by: Greg Kroah-Hartman Acked-by: Jiri Kosina Acked-by: Gustavo A. R. Silva Acked-by: Will Deacon Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/202007091110.205DC6A9@keescook Signed-off-by: Jonathan Corbet commit 0288199e1f6a4d82fe9a167a805a0af3079ff6dd Author: Alexander A. Klimov Date: Mon Jul 13 13:57:28 2020 +0200 docs: locking: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713115728.33905-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 3c603573d254cbc54c20aacfd512ce2242ef9695 Author: Alexander A. Klimov Date: Mon Jul 13 13:47:19 2020 +0200 docs: kvm: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713114719.33839-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 7f01cfb9e865f6704d804be61b8265bf370d36f2 Author: Alexander A. Klimov Date: Mon Jul 13 13:37:05 2020 +0200 docs: filesystems: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713113705.33773-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 393a403ed87ee43d23fe1b075ff52826c6e74a53 Author: Thierry Reding Date: Fri Jun 12 08:57:05 2020 +0200 arm64: tegra: Remove simple clocks bus The standard way to do this is to list out the clocks at the top-level. Adopt the standard way to fix validation. Signed-off-by: Thierry Reding commit 1765f53dda74a64703a0796bd7685d32111ed126 Author: Thierry Reding Date: Fri Jun 12 08:52:49 2020 +0200 arm64: tegra: Remove undocumented battery-name property battery-name is not a documented property, so drop it to avoid validation failures. Signed-off-by: Thierry Reding commit 1496878a74c90caedf88e0ad291206ed7bd50838 Author: Alexander A. Klimov Date: Mon Jul 13 13:26:57 2020 +0200 docs: driver-api: i3c: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713112657.33694-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 574d9cff7e5a4536e0687736a68b9fe88873d32d Author: Thierry Reding Date: Fri Jun 12 08:51:45 2020 +0200 arm64: tegra: Enable XUSB on Norrin Use the XUSB controller instead of the legacy EHCI controller to enable USB 3.0 support. Signed-off-by: Thierry Reding commit 92f5e6b54ed1f49d0b68e3dec2e3e30b79b502b6 Author: Alexander A. Klimov Date: Mon Jul 13 16:41:03 2020 +0200 kobject: documentation: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713144103.35049-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit f011856ce7b600fdc2d1102d56873b787ff6d1bb Author: Jay Chen Date: Mon Jul 6 19:22:45 2020 +0800 perf/smmuv3: To simplify code for ioremap page in pmcg Use the devm_platform_get_and_ioremap_resource to simplify the code a bit. Signed-off-by: Jay Chen Link: https://lore.kernel.org/r/20200706112246.92220-2-jkchen@linux.alibaba.com Signed-off-by: Will Deacon commit d2921096e707bdde92bc635cd89ec1fe85a9faee Author: Colin Ian King Date: Mon Jul 13 15:25:51 2020 +0100 drm/i915/selftest: fix an error return path where err is not being set There is an error condition where err is not being set and an uninitialized garbage value in err is being returned. Fix this by assigning err to an appropriate error return value before taking the error exit path. Addresses-Coverity: ("Uninitialized scalar value") Fixes: ed2690a9ca89 ("drm/i915/selftest: Check that GPR are restored across noa_wait") Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200713142551.423649-1-colin.king@canonical.com commit f4bf09d5303ab3896604c58363fc705ba649ccb8 Author: Alexandru Ardelean Date: Sun Jun 21 15:33:39 2020 +0300 iio: core: remove iio_priv_to_dev() helper All users of this helper have been updated to not use it. Remove it now, so that we don't need to move it when creating the iio_dev_opaque structure. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 3593cd53962fa17e4eaaae8faa5c8f62ec7bbd5e Author: Alexander A. Klimov Date: Sat Jul 4 21:27:43 2020 +0200 Replace HTTP links with HTTPS ones: drivers/iio Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Jonathan Cameron commit 5a6b56de410c8c905bde4295ba8c3d75910aecea Author: Alexander A. Klimov Date: Sat Jul 4 21:33:45 2020 +0200 Replace HTTP links with HTTPS ones: Documentation/devicetree/bindings/iio Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Reviewed-by: Matt Ranostay #for Matt's drivers Signed-off-by: Jonathan Cameron commit 3ff79754d7a2b27f6d2d56b3951fc9aa8080b063 Author: Srinivas Pandruvada Date: Thu Jul 9 13:05:22 2020 -0700 cpufreq: intel_pstate: Fix static checker warning for epp variable Fix warning for: drivers/cpufreq/intel_pstate.c:731 store_energy_performance_preference() error: uninitialized symbol 'epp'. This warning is for a case, when energy_performance_preference attribute matches pre defined strings. In this case the value of raw epp will not be used to set EPP bits in MSR_HWP_REQUEST. So initializing with any value is fine. Reported-by: Dan Carpenter Signed-off-by: Srinivas Pandruvada Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 3a12c2b5f38227a7104ce9f2be682059c7c93100 Author: Saheed O. Bolarinwa Date: Mon Jul 13 14:22:25 2020 +0200 cxl: Change PCIBIOS_SUCCESSFUL to 0 In reference to the PCI spec (Chapter 2), PCIBIOS* is an x86 concept. There scope should be limited within arch/x86. Change all PCIBIOS_SUCCESSFUL to 0 Signed-off-by: "Saheed O. Bolarinwa" Link: https://lore.kernel.org/r/20200713122247.10985-14-refactormyself@gmail.com Signed-off-by: Greg Kroah-Hartman commit caaba08f8c0dbe5c8fcb497faa7e3b394c21ff39 Author: Suraj Upadhyay Date: Mon Jul 13 17:52:22 2020 +0530 staging: qlge: qlge_ethtool: Remove one byte memset. Use direct assignment instead of using memset with just one byte as an argument. Issue found by checkpatch.pl. Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/b5eb87576cef4bf1b968481d6341013e6c7e9650.1594642213.git.usuraj35@gmail.com Signed-off-by: Greg Kroah-Hartman commit 45170f100a8d2a96a3569519f5968144e6542940 Author: Suraj Upadhyay Date: Mon Jul 13 17:51:13 2020 +0530 staging: qlge: qlge_mpi: Simplify while statements. Simplify while loops into more readable and simple for loops. Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/6eb96e8c074bbdee3838b6421d25b50f1faffb3d.1594642213.git.usuraj35@gmail.com Signed-off-by: Greg Kroah-Hartman commit 73b30441560654c75e09e48c93aa3df3ce76b5f0 Author: Suraj Upadhyay Date: Mon Jul 13 17:46:21 2020 +0530 staging: qlge: qlge_dbg: Simplify while statements Simplify while loops into more readable and simple for loops. Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/79e35c695a80168639c073137a80804da3362301.1594642213.git.usuraj35@gmail.com Signed-off-by: Greg Kroah-Hartman commit dd7f1b6fc30bae4067300422d58eb6f4582d1c21 Author: Suraj Upadhyay Date: Mon Jul 13 17:45:45 2020 +0530 staging: qlge: qlge.h: Insert line after declaration. Issue found by checkpatch.pl Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/d14343ed4ea3d4428f93a63bf1f52804ed5938e9.1594642213.git.usuraj35@gmail.com Signed-off-by: Greg Kroah-Hartman commit d923bb6bf5083d85713c000e9b6be0e921ce98c6 Author: Suraj Upadhyay Date: Mon Jul 13 17:45:05 2020 +0530 staging: qlge: qlge.h: Function definition arguments should have names. Issue found with checkpatch.pl Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/2d788cffeec2dad9ce9562c15a69d8b63ed0b21f.1594642213.git.usuraj35@gmail.com Signed-off-by: Greg Kroah-Hartman commit ff98ca159b15f2dcc95c24d760df6628a4658e4e Author: Suraj Upadhyay Date: Sat Jul 11 18:16:33 2020 +0530 staging: qlge: Remove pci-dma-compat wrapper APIs. The legacy API wrappers in include/linux/pci-dma-compat.h should go away as it creates unnecessary midlayering for include/linux/dma-mapping.h APIs, instead use dma-mapping.h APIs directly. The patch has been generated with the coccinelle script below and compile-tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, (enum dma_data_direction)E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/20200711124633.GA16459@blackclown Signed-off-by: Greg Kroah-Hartman commit 5723a0dd3ceb6f05f66b77e0a479ac9e98e7c6d9 Author: Alexander A. Klimov Date: Mon Jul 13 11:13:05 2020 +0200 Staging: speakup: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200713091305.32708-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 8aaeac5beba087e089137c18bdfcc1b592209fab Author: Suraj Upadhyay Date: Sat Jul 11 18:53:49 2020 +0530 staging: rtl8192e: rtl_core: Remove pci-dma-compat wrapper APIs. The legacy API wrappers in include/linux/pci-dma-compat.h should go away as it creates unnecessary midlayering for include/linux/dma-mapping.h APIs, instead use dma-mapping.h APIs directly. The patch has been generated with the coccinelle script below and compile-tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/20200711132349.GA21618@blackclown Signed-off-by: Greg Kroah-Hartman commit e4c9b73babb6d7a9f2a68ab19b2d0f05a36d0b22 Author: Suraj Upadhyay Date: Sat Jul 11 18:46:24 2020 +0530 staging: rtl8192e: rtl8192E_dev: Remove pci-dma-compat wrapper APIs. The legacy API wrappers in include/linux/pci-dma-compat.h should go away as it creates unnecessary midlayering for include/linux/dma-mapping.h APIs, instead use dma-mapping.h APIs directly. The patch has been generated with the coccinelle script below and compile-tested. @@@@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@@@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@@@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@@@ - PCI_DMA_NONE + DMA_NONE @@ expression E1, E2, E3; @@ - pci_alloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC) @@ expression E1, E2, E3; @@ - pci_zalloc_consistent(E1, E2, E3) + dma_alloc_coherent(&E1->dev, E2, E3, GFP_ATOMIC) @@ expression E1, E2, E3, E4; @@ - pci_free_consistent(E1, E2, E3, E4) + dma_free_coherent(&E1->dev, E2, E3, E4) @@ expression E1, E2, E3, E4; @@ - pci_map_single(E1, E2, E3, E4) + dma_map_single(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_single(E1, E2, E3, E4) + dma_unmap_single(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4, E5; @@ - pci_map_page(E1, E2, E3, E4, E5) + dma_map_page(&E1->dev, E2, E3, E4, (enum dma_data_direction)E5) @@ expression E1, E2, E3, E4; @@ - pci_unmap_page(E1, E2, E3, E4) + dma_unmap_page(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_map_sg(E1, E2, E3, E4) + dma_map_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_unmap_sg(E1, E2, E3, E4) + dma_unmap_sg(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_cpu(E1, E2, E3, E4) + dma_sync_single_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_single_for_device(E1, E2, E3, E4) + dma_sync_single_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_cpu(E1, E2, E3, E4) + dma_sync_sg_for_cpu(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2, E3, E4; @@ - pci_dma_sync_sg_for_device(E1, E2, E3, E4) + dma_sync_sg_for_device(&E1->dev, E2, E3, (enum dma_data_direction)E4) @@ expression E1, E2; @@ - pci_dma_mapping_error(E1, E2) + dma_mapping_error(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_consistent_dma_mask(E1, E2) + dma_set_coherent_mask(&E1->dev, E2) @@ expression E1, E2; @@ - pci_set_dma_mask(E1, E2) + dma_set_mask(&E1->dev, E2) Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/20200711131623.GA20537@blackclown Signed-off-by: Greg Kroah-Hartman commit 8ffe5f36d7329c1a251ebf80ff9b9111f8739246 Author: Gustavo A. R. Silva Date: Fri Jul 10 13:33:50 2020 -0500 staging: rts5208: Assign array_size() to a variable Assign array_size() to variable _size_ and use it in multiple places. This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200710183350.GA8376@embeddedor Signed-off-by: Greg Kroah-Hartman commit fc492f339f766591d6399d380edb89b2ab8bc89c Author: Ming-Fan Chen Date: Wed Jan 8 14:41:30 2020 +0800 memory: mtk-smi: Add basic support for MT6779 Add smi-larb and smi-common nodes and config_port for MT6779. changelog since v2: Split basic nodes and config_port support from initial golden setting patch Signed-off-by: Ming-Fan Chen Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/1578465691-30692-4-git-send-email-ming-fan.chen@mediatek.com Signed-off-by: Joerg Roedel commit d724794b4534105e4169f8c9641235541bc7b74f Author: Ming-Fan Chen Date: Wed Jan 8 14:41:29 2020 +0800 dt-bindings: mediatek: Add binding for MT6779 SMI This patch add description for MT6779 SMI. There are GALS in smi-larb but without clock of GALS alone. changelog since v2: Add GALS for mt6779 in smi-common.txt Signed-off-by: Ming-Fan Chen Acked-by: Rob Herring Link: https://lore.kernel.org/r/1578465691-30692-3-git-send-email-ming-fan.chen@mediatek.com Signed-off-by: Joerg Roedel commit 42027dfe59c069bb6044a184125a4bed3642c76a Merge: 67b2563855ad1 aee13efe44c10 Author: Arnd Bergmann Date: Mon Jul 13 15:23:07 2020 +0200 Merge tag 'arm-soc/for-5.9/devicetree' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM-based SoCs Device Tree changes for 5.9 please pull the following: - Rafal specifies the switch ports for various Luxul devices (XAP-1410, XAP-1510, XAP-1610, XWC-1000, XWC-2000, XWR-1200, XWR-3100, XWR-3150) - Krzysztof fixes the L2 cache controller node name to conform to dtschema - Maxime introduces two new clock providers for Raspberry Pi 4, one to support firmware based clocks and another one for the DVP block feeding into the two HDMI blocks. * tag 'arm-soc/for-5.9/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: bcm: Align L2 cache-controller nodename with dtschema ARM: dts: BCM5301X: Specify switch ports for Luxul devices ARM: dts: bcm2711: Add HDMI DVP ARM: dts: bcm2711: Add firmware clocks node Link: https://lore.kernel.org/r/20200707045759.17562-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 54ae1055e55049dc799d02cfc06d2ae7ef2beffc Author: Michael Walle Date: Wed Jul 8 00:31:13 2020 +0200 arm64: defconfig: enable CONFIG_FSL_ENETC_QOS Now that we have the needed network scheduler, we can enable the ENETC hardware support. $ scripts/bloat-o-meter old-vmlinux vmlinux add/remove: 19/2 grow/shrink: 12/0 up/down: 12852/-16 (12836) [..] Total: Before=20428273, After=20441109, chg +0.06% Link: https://lore.kernel.org/r/20200707223114.16355-2-michael@walle.cc Signed-off-by: Michael Walle Signed-off-by: Arnd Bergmann commit 066f5f4c7967d4d38308c962bdf8aeb9476bf04e Author: Michael Walle Date: Wed Jul 8 00:31:12 2020 +0200 arm64: defconfig: enable TSN features for ENETC and similiar hardware Newer network cards and switches support offloading of certain packet scheduling, classifying and actions onto the hardware itself. For example, time-aware and credit based schedulers. To use this feature we have to enable the corresponding modules. Please note, that this will also enable NET_SCHED and NET_CLS_ACT as builtin because there is no module option. The enabled modules should get us a good foundation. $ scripts/bloat-o-meter old-vmlinux vmlinux add/remove: 446/215 grow/shrink: 48/31 up/down: 78445/-11519 (66926) [..] Total: Before=20452567, After=20519493, chg +0.33% Link: https://lore.kernel.org/r/20200707223114.16355-1-michael@walle.cc Signed-off-by: Michael Walle Signed-off-by: Arnd Bergmann commit 38d9dff186f1c88ce8ca92700d6cedc374ff9900 Merge: 86aa160820225 9f1944c23c8cb Author: Arnd Bergmann Date: Mon Jul 13 15:11:42 2020 +0200 Merge tag 'optee-bus-for-v5.9' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers Enable multi-stage OP-TEE bus enumeration Probes drivers on the OP-TEE bus in two steps. First for drivers which do not depend on tee-supplicant. After tee-supplicant has been started probe the devices which do depend on tee-supplicant. Also introduces driver which uses an OP-TEE based fTPM Trusted Application depends on tee-supplicant NV RAM implementation based on RPMB secure storage. * tag 'optee-bus-for-v5.9' of git://git.linaro.org/people/jens.wiklander/linux-tee: tpm_ftpm_tee: register driver on TEE bus optee: enable support for multi-stage bus enumeration optee: use uuid for sysfs driver entry Link: https://lore.kernel.org/r/20200710085230.GA1312913@jade Signed-off-by: Arnd Bergmann commit 67b2563855ad163856230c43d0028a033d1497b8 Merge: dfe2a4cf8e2f4 e14d2c766392f Author: Arnd Bergmann Date: Mon Jul 13 15:08:42 2020 +0200 Merge tag 'omap-for-v5.9/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Device tree changes for omaps for v5.9 merge window This series of changes configures the GPIO line names for am335x beaglebone black and pocketbeagle to make it easier to configure the pins. To make use of the pins, we also add the gpio-ranges for am335x. We also enable IPU and DSP repmoteproc for am5729-beaglebone-ai, and then there are two non-urgent dtschema validator warning fixes. * tag 'omap-for-v5.9/dt-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am335x-pocketbeagle: add gpio-line-names ARM: dts: am335x-boneblack: add gpio-line-names ARM: dts: am33xx-l4: add gpio-ranges ARM: dts: am5729-beaglebone-ai: Disable ununsed mailboxes ARM: dts: am5729-beaglebone-ai: Enable IPU & DSP rprocs ARM: dts: am: Align L2 cache-controller nodename with dtschema ARM: dts: omap: Align L2 cache-controller nodename with dtschema Link: https://lore.kernel.org/r/pull-1594402929-762188@atomide.com Signed-off-by: Arnd Bergmann commit bc885f1ab6de0d38c6956a71b0126543b64875b0 Author: Bruno Meneguele Date: Fri Jul 10 14:44:23 2020 -0300 doc:kmsg: explicitly state the return value in case of SEEK_CUR The commit 625d3449788f ("Revert "kernel/printk: add kmsg SEEK_CUR handling"") reverted a change done to the return value in case a SEEK_CUR operation was performed for kmsg buffer based on the fact that different userspace apps were handling the new return value (-ESPIPE) in different ways, breaking them. At the same time -ESPIPE was the wrong decision because kmsg /does support/ seek() but doesn't follow the "normal" behavior userspace is used to. Because of that and also considering the time -EINVAL has been used, it was decided to keep this way to avoid more userspace breakage. This patch adds an official statement to the kmsg documentation pointing to the current return value for SEEK_CUR, -EINVAL, thus userspace libraries and apps can refer to it for a definitive guide on what to expect. Signed-off-by: Bruno Meneguele Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200710174423.10480-1-bmeneg@redhat.com commit dfe2a4cf8e2f4c1f53877aa6cb38eda102a14681 Merge: 056a7ecf47251 e6bd81a2290f0 Author: Arnd Bergmann Date: Mon Jul 13 15:07:44 2020 +0200 Merge tag 'uniphier-dt64-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into arm/dt UniPhier ARM64 SoC DT updates for v5.9 - add missing interrupts property to support card serial - fix node names to follow the DT schema - add clock-names and reset-names to pcie-phy * tag 'uniphier-dt64-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: arm64: dts: uniphier: Add missing clock-names and reset-names to pcie-phy arm64: dts: uniphier: Rename ethphy node to ethernet-phy arm64: dts: uniphier: give fixed port number to support card serial arm64: dts: uniphier: add interrupts to support card serial Link: https://lore.kernel.org/r/CAK7LNARK4SKhSW-xwgc3vq7FO7N864jPgzm8NtsGOv8wVFVyBQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit 056a7ecf47251bbd87d46c7416c7644672552854 Merge: 9f0d16ebe30f0 781865604d169 Author: Arnd Bergmann Date: Mon Jul 13 15:00:36 2020 +0200 Merge tag 'uniphier-dt-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier into arm/dt UniPhier ARM SoC DT updates for v5.9 - add missing interrupts property to support card serial - fix node names to follow the DT schema - add PCIe endpoint and PHY nodes for Pro5 SoC - simplify device hierarchy of support-card.dtsi * tag 'uniphier-dt-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-uniphier: ARM: dts: uniphier: simplify support-card node structure ARM: dts: uniphier: Add PCIe endpoint and PHY node for Pro5 ARM: dts: uniphier: Rename ethphy node to ethernet-phy ARM: dts: uniphier: give fixed port number to support card serial ARM: dts: uniphier: rename support card serial node to fix schema warning ARM: dts: uniphier: add interrupts to support card serial Link: https://lore.kernel.org/r/CAK7LNARGDcCKxV3-H7WmuZAVe49n0QF+672-KN0tsP0och0a_A@mail.gmail.com Signed-off-by: Arnd Bergmann commit 1e691e2444871d1fde11b611653b5da9010dcec8 Author: Christian König Date: Mon Jul 6 19:23:46 2020 +0200 drm/amdgpu: stop allocating dummy GTT nodes Now that TTM is fixed up we can finally stop that nonsense. Signed-off-by: Christian König Reviewed-by: Madhav Chauhan Link: https://patchwork.freedesktop.org/patch/375620 commit e04be2310b5eac683ec03b096c0e22c4c2e23593 Author: Christian König Date: Mon Jul 6 17:32:55 2020 +0200 drm/ttm: further cleanup ttm_mem_reg handling Stop touching the backend private pointer alltogether and make sure we never put the same mem twice by. Signed-off-by: Christian König Reviewed-by: Madhav Chauhan Link: https://patchwork.freedesktop.org/patch/375613/ commit f9ecf10cb88c5ff47add3acb3611c4f1052be5f5 Author: Parthiban Nallathambi Date: Mon Jul 13 09:23:20 2020 +0200 ARM: dts: imx6ull: add MYiR MYS-6ULX SBC Add support for the MYiR imx6ULL based single board computer equipped with on board 256MB NAND & RAM. The board also provides expansion header for expansion board, but this commit adds only support for SBC. Signed-off-by: Parthiban Nallathambi Signed-off-by: Shawn Guo commit 93e881e1f1f5e8e606ada00ea6ff4a2367095ec6 Author: Chris Healy Date: Sun Jul 12 01:03:57 2020 -0700 ARM: dts: vf610-zii-spb4: Add node for switch watchdog Add I2C child node for switch watchdog present on SPB4 Signed-off-by: Chris Healy Signed-off-by: Shawn Guo commit c68a1c9253c3b66b63feb7f30cba6bd7662eb83d Author: Philippe Schenker Date: Fri Jul 10 15:24:21 2020 +0200 ARM: dts: colibri-imx6: remove pinctrl-names orphan This is not necessary without a pinctrl-0 statement. Remove this orphan. Signed-off-by: Philippe Schenker Reviewed-by: Oleksandr Suvorov Signed-off-by: Shawn Guo commit fa28d8212ede9c533ae87a737571a9d3b3eebb29 Author: Uwe Kleine-König Date: Fri Jul 10 07:19:37 2020 +0200 ARM: dts: imx: default to #pwm-cells = <3> in the SoC dtsi files The imx-pwm driver supports 3 cells and this is the more flexible setting. So use it by default and overwrite it back to two for the files that reference the PWMs with just 2 cells to minimize changes. This allows to drop explicit setting to 3 cells for the boards that already depend on this. The boards that are now using 2 cells explicitly can be converted to 3 individually. Signed-off-by: Uwe Kleine-König Signed-off-by: Shawn Guo commit 5c73d9acd1220d4ae32d3803a8e3205f994ef7c7 Author: Andrew Lunn Date: Wed Jul 8 17:11:54 2020 -0700 ARM: dts: vf610-zii-scu4-aib: Configure fibre ports to 1000BaseX The SFF soldered onto the board expect the ports to use 1000BaseX. It makes no sense to have the ports set to SGMII, since they don't even support that mode. Signed-off-by: Andrew Lunn Signed-off-by: Chris Healy Signed-off-by: Shawn Guo commit bcf9d4672916a84f2856572fad3e3b76e426147d Author: Chris Healy Date: Wed Jul 8 16:25:01 2020 -0700 ARM: dts: vf610-zii-dev-rev-c: Configure fiber port to 1000BaseX The SFF soldered onto the board expects the port to use 1000BaseX. It makes no sense to have the port set to SGMII, since it doesn't even support that mode. Signed-off-by: Chris Healy Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit b955387667ec9e33d268189597d2855027112db5 Author: Chris Healy Date: Tue Jul 7 18:16:27 2020 -0700 ARM: dts: ZII: update MDIO speed and preamble Update MDIO configuration with ZII devices to fully utilize MDIO endpoint capabilities. All devices support 12.5MHz clock and don't require MDIO preable. Signed-off-by: Chris Healy Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 493e8733686bfce4fe04683dce8569a5e6c6d071 Author: Andrey Smirnov Date: Tue Jul 7 14:13:59 2020 -0700 ARM: dts: vfxxx: Add node for CAAM Add node for CAAM device in NXP Vybrid SoC. Signed-off-by: Andrey Smirnov Signed-off-by: Chris Healy Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit d4650bd53f50bcebfcc59d056e5ca4b3a957e811 Author: Richard Zhu Date: Fri Jul 10 16:30:48 2020 +0800 ARM: dts: imx6qp-sabresd: enable sata Enable SATA on iMX6QP SABRESD board. Signed-off-by: Richard Zhu Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit af3eaa4ab0961c25ab6baa37295a08568d78e8d3 Author: Richard Zhu Date: Fri Jul 10 16:30:47 2020 +0800 ARM: dts: imx6qp-sabreauto: enable sata Enable SATA on iMX6QP SABREAUTO board. Signed-off-by: Richard Zhu Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit c90fdc5021b10761e762a1f26ecee4f870bd823b Author: Oleksij Rempel Date: Wed Jul 1 15:03:30 2020 +0200 ARM: dts: add Protonic RVT board Protonic RVT is an internal development platform for a wireless ISObus Virtual Terminal based on COTS tablets, and the predecessor of the WD2 platform. Reviewed-by: Rob Herring Signed-off-by: David Jander Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 5a1dcf4a6bec61d3e0b76d5e659e550a49342038 Author: Oleksij Rempel Date: Wed Jul 1 15:03:29 2020 +0200 ARM: dts: add Protonic VT7 board The Protonic VT7 is a mid-class ISObus Virtual Terminal with a 7 inch touchscreen display. Reviewed-by: Rob Herring Signed-off-by: Robin van der Gracht Signed-off-by: David Jander Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 88010b8174ab3d91d6374e343443901b90e87525 Author: Oleksij Rempel Date: Wed Jul 1 15:03:28 2020 +0200 ARM: dts: add Protonic WD2 board Add support for the Protonic WD2 board, which is an internal development platform for low-cost agricultural Virtual Terminals based on COTS tablets and web applications. It inherits from the PRTI6Q base class. Reviewed-by: Rob Herring Signed-off-by: David Jander Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 0d446a505592dc3869d1d9f28121663da9f471fa Author: Oleksij Rempel Date: Wed Jul 1 15:03:27 2020 +0200 ARM: dts: add Protonic PRTI6Q board Protonic PRTI6Q is a development board and a base class for different specific customer application boards based on the i.MX6 family of SoCs, developed by Protonic Holland. Reviewed-by: Rob Herring Signed-off-by: David Jander Signed-off-by: Oleksij Rempel Signed-off-by: Shawn Guo commit 7c2b325020be7d5ec375501c2aead46fc0496c17 Author: Shengjiu Wang Date: Wed Jul 1 11:46:56 2020 +0800 ARM: dts: imx6ul: Add ASRC device node Add ASRC device node. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 69cc1502a87f5ed12e27dbe5fe2bfdd5540826c7 Author: Krzysztof Kozlowski Date: Fri Jun 26 10:06:31 2020 +0200 ARM: dts: imx: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache@a02000: $nodename:0: 'l2-cache@a02000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 954809fb53a92607eb5fb039e57dcc64363c696d Author: Krzysztof Kozlowski Date: Fri Jun 26 10:05:47 2020 +0200 ARM: dts: vf610: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache@40006000: $nodename:0: 'l2-cache@40006000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Acked-by: Stefan Agner Signed-off-by: Shawn Guo commit 73691f21e21117f2cca23fc67407f573ab86cbe2 Author: Shengjiu Wang Date: Sun Jul 12 17:16:42 2020 +0800 ARM: dts: imx6sx-sdb: Add MQS support Add MQS support. As the pin conflict with usdhc2, then need to add a separate dts. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 22b6db783110a6257a5104f6c91cf070729204b1 Author: Biwen Li Date: Wed Jun 24 10:45:01 2020 +0800 ARM: dts: ls1021a: add ftm_alarm0 DT node The patch add ftm_alarm0 DT node - add rcpm node - add ftm_alarm0 node - aliases ftm_alarm0 as rtc1 Signed-off-by: Biwen Li Signed-off-by: Shawn Guo commit a2e4a60de41ce1dfa3cdb6588b2ef8767f3cd8ce Author: Shengjiu Wang Date: Thu Jun 18 14:03:49 2020 +0800 ARM: dts: imx6sx-sabreauto: Add cs42888 sound card support Complete the ESAI node and Add cs42888 sound card support. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 9ef33df18c55e5e705f151d437a8cfa845eaf679 Author: Shengjiu Wang Date: Thu Jun 18 14:03:48 2020 +0800 ARM: dts: imx6sx-sabreauto: Add SPDIF support Add SPDIF support. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 903c0ef28bc4aad4cd30548fd330d590e031338b Author: Shengjiu Wang Date: Thu Jun 18 14:03:47 2020 +0800 ARM: dts: imx6sx-sdb: Add SPDIF support Add SPDIF support. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit c3a71ffb6df2692b7541af0b3bec589635a04a5a Author: Shengjiu Wang Date: Thu Jun 18 14:03:45 2020 +0800 ARM: dts: imx6sx: Enable ASRC device Add compatible string, update the clock table, add fsl,asrc-rate and fsl,asrc-width property. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit 4fe6abb8f51355224808ab02a9febf65d184c40b Author: Chris Wilson Date: Sat Jul 11 21:32:36 2020 +0100 drm/i915/gt: Ignore irq enabling on the virtual engines We do not use the virtual engines for interrupts (they have physical components), but we do use them to decouple the fence signaling during submission. Currently, when we submit a completed request, we try to enable the interrupt handler for the virtual engine, but we never disarm it. A quick fix is then to mark the irq as enabled, and it will then remain enabled -- and this prevents us from waking the device and never letting it sleep again. Fixes: f8db4d051b5e ("drm/i915: Initialise breadcrumb lists on the virtual engine") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: # v5.5+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200711203236.12330-1-chris@chris-wilson.co.uk commit ac887041c8eb54aabed9755d968c257252e068e3 Author: Xiaowei Bao Date: Mon Jun 29 10:46:34 2020 +0800 arm64: dts: ls1028a-qds: Add DSPI flash nodes Add the DSPI flash nodes into fsl-ls1028a-qds.dts Signed-off-by: Xiaowei Bao Signed-off-by: Zhao Qiang Signed-off-by: Shawn Guo commit 8a915ec0c820b50dfa6eaf580f3053c1d81e47fe Author: Ian Ray Date: Thu Apr 16 16:51:23 2020 +0200 ARM: dts: imx53-ppd: alarm LEDs use kernel LED interface Use kernel LED interface for the alarm LEDs. Signed-off-by: Ian Ray Signed-off-by: Samu Nuutamo Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit 5da1b522cf7dc51f7fde2cca8d90406b0291c503 Author: Shengjiu Wang Date: Tue Jun 2 18:44:50 2020 +0800 ARM: dts: imx6sll: Make ssi node name same as other platforms In imx6sll.dtsi, the ssi node name is different with other platforms (imx6qdl, imx6sl, imx6sx), but the sound/soc/fsl/fsl-asoc-card.c machine driver needs to check ssi node name for audmux configuration, then different ssi node name causes issue on imx6sll platform. So we change ssi node name to make all platforms have same name. Signed-off-by: Shengjiu Wang Signed-off-by: Shawn Guo commit a6d094403cd670e04193849af69c6c5f67fd742e Author: Anson Huang Date: Tue Jun 2 14:24:52 2020 +0800 ARM: dts: imx: Change usdhc node name on i.MX6/i.MX7 SoCs Change i.MX6/i.MX7 SoCs usdhc node name from usdhc to mmc to be compliant with yaml schema, it requires the nodename to be "mmc". Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 7e4cd9d8f7ba424d0ad52df4acee08343acdd6ce Author: Anson Huang Date: Tue Jun 2 14:24:51 2020 +0800 ARM: dts: imx: Change esdhc node name on i.MX2/i.MX3/i.MX5 SoCs Change i.MX2/i.MX3/i.MX5 SoCs esdhc node name from esdhc to mmc to be compliant with yaml schema, it requires the nodename to be "mmc". Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 459ebbee05e83037a9a45c09f9cda918d0b55933 Author: Anson Huang Date: Tue Jun 2 14:24:50 2020 +0800 ARM: dts: imx: Change sdhci node name on i.MX27/i.MX31 SoCs Change i.MX27/i.MX31 node name from sdhci to mmc to be compliant with yaml schema, it requires the nodename to be "mmc". Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit c13168a56560f679e48c8a9bf0e1ce613bc83c39 Author: Anson Huang Date: Mon Jun 1 15:54:29 2020 +0800 ARM: dts: imx6qdl: Remove invalid interrupt for GPC node In latest i.MX6Q RM Rev.6, 05/2020, #90 SPI interrupt is reserved, so remove it from GPC node. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 78b05005e213e8bb847ec7835d289d5ab76a5254 Author: Anson Huang Date: Thu May 28 11:12:50 2020 +0800 ARM: dts: imx: change iim node name on i.MX SoCs Change IIM node name from iim to efuse to be compliant with yaml schema, it requires the nodename to be one of "eeprom|efuse|nvram". Signed-off-by: Anson Huang Reviewed-by: Fugang Duan Signed-off-by: Shawn Guo commit 17a2deb06105288d0fe33104f078562eb55e07ea Author: Anson Huang Date: Thu May 28 11:12:49 2020 +0800 ARM: dts: imx: change ocotp node name on MXS SoCs Change OCOTP node name from ocotp to efuse to be compliant with yaml schema, it requires the nodename to be one of "eeprom|efuse|nvram". Signed-off-by: Anson Huang Reviewed-by: Fugang Duan Signed-off-by: Shawn Guo commit a1abd6777f0e8a716d27d5767dd9796256205f02 Author: Anson Huang Date: Thu May 28 11:12:47 2020 +0800 ARM: dts: imx: change ocotp node name on i.MX6/7 SoCs Change OCOTP node name from ocotp-ctrl to efuse to be compliant with yaml schema, it requires the nodename to be one of "eeprom|efuse|nvram". Signed-off-by: Anson Huang Reviewed-by: Fugang Duan Signed-off-by: Shawn Guo commit 5656bb3857c4904d1dec6e1b8f876c1c0337274e Author: Yangbo Lu Date: Fri May 22 09:30:52 2020 +0800 ARM: dts: ls1021a: output PPS signal on FIPER2 The timer fixed interval period pulse generator register is used to generate periodic pulses. The down count register loads the value programmed in the fixed period interval (FIPER). At every tick of the timer accumulator overflow, the counter decrements by the value of TMR_CTRL[TCLK_PERIOD]. It generates a pulse when the down counter value reaches zero. It reloads the down counter in the cycle following a pulse. To use the TMR_FIPER register to generate desired periodic pulses. The value should programmed is, desired_period - tclk_period Current tmr-fiper2 value is to generate 100us periodic pulses. (But the value should have been 99995, not 99990. The tclk_period is 5.) This patch is to generate 1 second periodic pulses with value 999999995 programmed which is more desired by user. Signed-off-by: Yangbo Lu Acked-by: Richard Cochran Signed-off-by: Shawn Guo commit 915e19686f5991bf6dd9160ef6830041083c894f Author: Anson Huang Date: Wed May 20 14:30:16 2020 +0800 ARM: dts: imx: Make tempmon node as child of anatop node i.MX6/7 SoCs' temperature sensor is inside anatop module from HW perspective, so it should be a child node of anatop. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit 397e18b4bb2d27389361ceaf154a7acced648a72 Author: Joerg Roedel Date: Mon Jul 13 12:16:48 2020 +0200 iommu/mediatek: Include liunx/dma-mapping.h This fixes a compile error when cross-compiling the driver on x86-32. Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20200713101648.32056-1-joro@8bytes.org commit c624b49a40ae82076c72bf498560e55554a6b508 Merge: 3debc24f7fe63 ebd4050c6144b Author: Ulf Hansson Date: Mon Jul 13 12:18:30 2020 +0200 Merge branch 'fixes' into next commit 3debc24f7fe637ebefbaa3d37aeecb33a69bde11 Author: Veerabhadrarao Badiganti Date: Thu Jul 9 18:43:25 2020 +0530 mmc: sdhci: Fix potential null pointer access while accessing vqmmc Don't access vqmmc regulator handler, if it's already invalidated. Reported-by: Dan Carpenter Signed-off-by: Veerabhadrarao Badiganti Link: https://lore.kernel.org/r/1594300408-17658-1-git-send-email-vbadigan@codeaurora.org Signed-off-by: Ulf Hansson commit ec02760b63c21c439d44956e9c66d0af24011f03 Author: Yoshihiro Shimoda Date: Tue Jul 7 20:58:42 2020 +0900 mmc: core: Add MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND The commit 5a36d6bcdf23 ("mmc: core: Add DT-bindings for MMC_CAP2_FULL_PWR_CYCLE") added the "full-pwr-cycle" property which is possible to perform a full power cycle of the card at any time. However, some environment (like r8a77951-salvator-xs) is possible to perform a full power cycle of the card in suspend via firmware (PSCI on arm-trusted-firmware). So, in worst case, since we are not doing a graceful shutdown of the eMMC device (just cut VCCQ while the eMMC is "sleeping") in suspend, it could lead to internal data corruptions. So, add MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND to do a graceful shutdown which issues Power Off notification before entering system suspend. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1594123122-13156-3-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Ulf Hansson commit ba26e91d9f8ee94b49dc24f440d4c5efd403456b Author: Yoshihiro Shimoda Date: Tue Jul 7 20:58:41 2020 +0900 dt-bindings: mmc: Add full-pwr-cycle-in-suspend property The commit 5a36d6bcdf23 ("mmc: core: Add DT-bindings for MMC_CAP2_FULL_PWR_CYCLE") added the "full-pwr-cycle" property which is possible to perform a full power cycle of the card at any time. However, some environment (like r8a77951-salvator-xs) is possible to perform a full power cycle of the card in suspend via firmware (PSCI on arm-trusted-firmware). So, add a new property for such environment. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1594123122-13156-2-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Ulf Hansson commit b5c833b703cc3507dac2cd8c9197a965724c8d3a Author: Veerabhadrarao Badiganti Date: Wed Jul 8 18:41:20 2020 +0530 mmc: sdhci-msm: Set IO pins in low power state during suspend Configure SDHC IO pins with low power configuration when the driver is in suspend state. Signed-off-by: Veerabhadrarao Badiganti Link: https://lore.kernel.org/r/1594213888-2780-2-git-send-email-vbadigan@codeaurora.org Signed-off-by: Ulf Hansson commit edfa69ded566d11183206d2d45cb4b90ccb5a56e Author: Lee Jones Date: Tue Jul 7 07:47:01 2020 +0100 mmc: sdhci-iproc: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, 'struct sdhci_iproc_acpi_ids' becomes defined but unused. Fixes the following W=1 kernel build warning: mmc/host/sdhci-iproc.c:297:36: warning: ‘sdhci_iproc_acpi_ids’ defined but not used [-Wunused-const-variable=] Cc: Adrian Hunter Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Lee Jones Acked-by: Scott Branden Link: https://lore.kernel.org/r/20200707064701.GC3500@dell Signed-off-by: Ulf Hansson commit 479cb7cfea764d368912927d045aadf50ed2ea34 Author: Colin Ian King Date: Mon Jul 6 17:30:31 2020 +0100 mmc: dw_mmc-exynos: remove redundant initialization of variable 'found' The variable 'found' is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200706163031.503431-1-colin.king@canonical.com Signed-off-by: Ulf Hansson commit 2f96126500991f356b9eacdc6611bec78e6253ed Author: Lee Jones Date: Wed Jul 1 11:23:17 2020 +0100 arch: arm: mach-omap2: mmc: Move omap_mmc_notify_cover_event() prototype When building the kernel with W=1 the build system complains of: drivers/mmc/host/omap.c:854:6: warning: no previous prototype for ‘omap_mmc_notify_cover_event’ [-Wmissing-prototypes] 854 | void omap_mmc_notify_cover_event(struct device *dev, int num, int is_closed) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ If we move the prototype into a shared headerfile the build system will be satisfied. Rather than create a whole new headerfile just for this purpose, it makes sense to use the already existing mmc-omap.h. Cc: Ulf Hansson Cc: linux-mmc@vger.kernel.org Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20200701102317.235032-1-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit 2ec2438d2052180984571e4c9065ecd9132a9f91 Author: Lee Jones Date: Wed Jul 1 13:47:01 2020 +0100 mmc: cqhci: Demote faux kerneldoc header down to basic comment block cqhci_host_alloc_tdl()'s function header is the only one in kerneldoc format. Which seems odd as it's not part of an external API and isn't referenced anywhere else. Seeing as there has also been no attempt to describe the expected function arguments either, we're going to assume that this is not actually a bona fide kerneldoc use-case. Fixes the following W=1 kernel build warning: drivers/mmc/host/cqhci.c:163: warning: Function parameter or member 'cq_host' not described in 'cqhci_host_alloc_tdl' Cc: Adrian Hunter Cc: Ritesh Harjani Cc: Asutosh Das Cc: Venkat Gopalakrishnan Signed-off-by: Lee Jones Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200701124702.908713-15-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit abf4633a171e39c21898fe585d6c5f598c44abf8 Author: Lee Jones Date: Wed Jul 1 13:47:00 2020 +0100 mmc: sdhci-msm: Demote faux kerneldoc header down to basic comment block __sdhci_msm_set_clock()'s function header is the only one in kerneldoc format. Which seems odd as it's not part of an external API and isn't referenced anywhere else. Seeing as there has also been no attempt to describe the expected function arguments either, we're going to assume that this is not actually a bona fide kerneldoc use-case. Fixes the following W=1 kernel build warnings: drivers/mmc/host/sdhci-msm.c:1595: warning: Function parameter or member 'host' not described in '__sdhci_msm_set_clock' drivers/mmc/host/sdhci-msm.c:1595: warning: Function parameter or member 'clock' not described in '__sdhci_msm_set_clock' Cc: Adrian Hunter Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701124702.908713-14-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit 654e8750f28bc4051ef21dbdeada7ec3b999e000 Author: Lee Jones Date: Wed Jul 1 13:46:58 2020 +0100 mmc: sdhci-of-arasan: Correct formatting and provide missing function arg(s) Kerneldoc expects arg descriptions to be in the format '@.*: '. If either the '@' or the ':' is omitted then kerneldoc complains that the description is missing. Add the missing ':' here and provide a new description for 'value'. Fixes the following kernel build W=1 warnings: drivers/mmc/host/sdhci-of-arasan.c:1394: warning: Function parameter or member 'host' not described in 'sdhci_arasan_update_support64b' drivers/mmc/host/sdhci-of-arasan.c:1394: warning: Function parameter or member 'value' not described in 'sdhci_arasan_update_support64b' drivers/mmc/host/sdhci-msm.c:1887:6: warning: no previous prototype for ‘sdhci_msm_dump_vendor_regs’ [-Wmissing-prototypes] Cc: Adrian Hunter Cc: Michal Simek Cc: Xiaobo Xie Cc: Anton Vorontsov Cc: Soeren Brinkmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701124702.908713-12-lee.jones@linaro.org Acked-by: Michal Simek Signed-off-by: Ulf Hansson commit d463cf4ea471781caa266315ae770f9808101957 Author: Lee Jones Date: Wed Jul 1 13:46:57 2020 +0100 mmc: rtsx_usb_sdmmc: Remove set but unused variable 'err' Seeing as sd_wait_data_idle() returns void and only a very specific read value is checked, there doesn't seem to be a good reason to check the return value of rtsx_pci_read_register(). So remove the assignment and definition of 'err'. Squashes the following W=1 kernel build warning: drivers/mmc/host/rtsx_usb_sdmmc.c: In function ‘sd_wait_data_idle’: drivers/mmc/host/rtsx_usb_sdmmc.c:657:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 657 | int err, i; | ^~~ Cc: Roger Tseng Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701124702.908713-11-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit 679209b3c1b00b56d18c17bfe0112fc58e14d6cb Author: Lee Jones Date: Wed Jul 1 13:46:56 2020 +0100 mmc: rtsx_pci_sdmmc: Remove set but unused variable 'err' Seeing as sd_wait_data_idle() returns void and only a very specific read value is checked, there doesn't seem to be a good reason to check the return value of rtsx_pci_read_register(). So remove the assignment and definition of 'err'. Squashes the following W=1 kernel build warning: drivers/mmc/host/rtsx_pci_sdmmc.c: In function ‘sd_wait_data_idle’: drivers/mmc/host/rtsx_pci_sdmmc.c:678:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 678 | int err, i; | ^~~ Cc: Wei WANG Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701124702.908713-10-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit 306c59cbe4bb717803126d6ede874998193b49b3 Author: Lee Jones Date: Wed Jul 1 13:46:55 2020 +0100 mmc: dw_mmc-exynos: Add kerneldoc descriptions of for 'dev' args Provide missing documentation for dw_mci_exynos_suspend_noirq() and dw_mci_exynos_resume_noirq() function headers. Fixes the following W=1 kernel build warnings: drivers/mmc/host/dw_mmc-exynos.c:184: warning: Function parameter or member 'dev' not described in 'dw_mci_exynos_suspend_noirq' drivers/mmc/host/dw_mmc-exynos.c:200: warning: Function parameter or member 'dev' not described in 'dw_mci_exynos_resume_noirq' Cc: Jaehoon Chung Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Thomas Abraham Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Jaehoon Chung Link: https://lore.kernel.org/r/20200701124702.908713-9-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit 22374e9f2996b6a4460baa272121fbd2b47ea717 Author: Lee Jones Date: Wed Jul 1 13:46:54 2020 +0100 mmc: core: Correct misspelling of 'mq' in mmc_init_request()'s docs Correcting this misspelling squashes the following W=1 build warning(s): mmc/core/queue.c:212: warning: Function parameter or member 'mq' not described in '__mmc_init_request' mmc/core/queue.c:212: warning: Excess function parameter 'q' description in '__mmc_init_request' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701124702.908713-8-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit f51874b7ec92cb5b11c6484b424bf530e0851ed2 Author: Lee Jones Date: Wed Jul 1 13:46:53 2020 +0100 mmc: atmel-mci: Provide 2 new and correct 1 existing property description 'sg_len' and 'dma_conf' are missing correct kerneldoc documentation and 'buf_phys_addr' was misspelled. Correcting these issues fixes the following W=1 kernel build issues: mmc/host/atmel-mci.c:352: warning: Function parameter or member 'sg_len' not described in 'atmel_mci' mmc/host/atmel-mci.c:352: warning: Function parameter or member 'buf_phys_addr' not described in 'atmel_mci' mmc/host/atmel-mci.c:352: warning: Function parameter or member 'dma_conf' not described in 'atmel_mci' Cc: Ludovic Desroches Cc: Nicolas Ferre Cc: Alexandre Belloni Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701124702.908713-7-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit 6ec5a7b72e2afc2ac23c6ef3156d7a092b0086b0 Author: Lee Jones Date: Wed Jul 1 13:46:52 2020 +0100 mmc: mtk-sd: Demote msdc_recheck_sdio_irq() function header No other function in the file is documented using kerneldoc and no effort to document the function arguments have been made. It's a bit of an oddity to say the least. Let's downgrade it from kerneldoc to a standard comment block instead. Fixes the following W=1 kernel build warning: drivers/mmc/host/mtk-sd.c:1030: warning: Function parameter or member 'host' not described in 'msdc_recheck_sdio_irq' Cc: Chaotian Jing Cc: Matthias Brugger Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20200701124702.908713-6-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit 46525bcc5c18f271ec522f47583066e82e964a08 Author: Lee Jones Date: Wed Jul 1 13:46:51 2020 +0100 mmc: sdhci-s3c: Provide documentation for missing struct properties Describe properties; ext_cd_irq, clk_rates and no_divider (x2). Squashes the following W=1 kernel build warnings: drivers/mmc/host/sdhci-s3c.c:126: warning: Function parameter or member 'ext_cd_irq' not described in 'sdhci_s3c' drivers/mmc/host/sdhci-s3c.c:126: warning: Function parameter or member 'clk_rates' not described in 'sdhci_s3c' drivers/mmc/host/sdhci-s3c.c:126: warning: Function parameter or member 'no_divider' not described in 'sdhci_s3c' drivers/mmc/host/sdhci-s3c.c:139: warning: Function parameter or member 'no_divider' not described in 'sdhci_s3c_drv_data' Cc: Adrian Hunter Cc: Ben Dooks Cc: Jaehoon Chung Signed-off-by: Lee Jones Reviewed-by: Jaehoon Chung Link: https://lore.kernel.org/r/20200701124702.908713-5-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit 33fc1ebe509ad761937434ce43e1552ce50047ce Author: Lee Jones Date: Wed Jul 1 13:46:50 2020 +0100 mmc: core: Add missing documetation for 'mmc' and 'ios' Remainder of the kerneldoc descriptions look present and correct. Fixes the following W=1 kernel build warnings: drivers/mmc/core/regulator.c:178: warning: Function parameter or member 'mmc' not described in 'mmc_regulator_set_vqmmc' drivers/mmc/core/regulator.c:178: warning: Function parameter or member 'ios' not described in 'mmc_regulator_set_vqmmc' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701124702.908713-4-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit a79c3f40c7c87d4238ae097fad84291dc69f2c1e Author: Lee Jones Date: Wed Jul 1 13:46:49 2020 +0100 mmc: core: Provide description for sdio_set_host_pm_flags()'s 'flag' arg Add missing kerneldoc entry for sdio_set_host_pm_flags()'s 'flag' function argument. Fixes the following W=1 kernel build warning: kernel/drivers/mmc/core/sdio_io.c:722: warning: Function parameter or member 'flags' not described in 'sdio_set_host_pm_flags' Cc: Pierre Ossman Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701124702.908713-3-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit 482cedd2e5872f5a1a17fd8b03c6e5b37f320425 Author: Lee Jones Date: Wed Jul 1 13:46:48 2020 +0100 mmc: core: Mark fixups as __maybe_unused Not all source files which include quirks.h make use of the all of the available fixup information. When this happens the compiler complains that some constant variables are defined by never used. We can fix this by telling the compiler that this intentional by simply marking them as __maybe_unused. Fixes the following W=1 kernel build warnings: In file included from drivers/mmc/core/sdio.c:22: drivers/mmc/core/quirks.h:105:31: warning: ‘mmc_ext_csd_fixups’ defined but not used [-Wunused-const-variable=] 105 | static const struct mmc_fixup mmc_ext_csd_fixups[] = { | ^~~~~~~~~~~~~~~~~~ drivers/mmc/core/quirks.h:17:31: warning: ‘mmc_blk_fixups’ defined but not used [-Wunused-const-variable=] 17 | static const struct mmc_fixup mmc_blk_fixups[] = { | ^~~~~~~~~~~~~~ In file included from drivers/mmc/core/mmc.c:25: drivers/mmc/core/quirks.h:123:31: warning: ‘sdio_fixup_methods’ defined but not used [-Wunused-const-variable=] 123 | static const struct mmc_fixup sdio_fixup_methods[] = { | ^~~~~~~~~~~~~~~~~~ drivers/mmc/core/quirks.h:17:31: warning: ‘mmc_blk_fixups’ defined but not used [-Wunused-const-variable=] 17 | static const struct mmc_fixup mmc_blk_fixups[] = { | ^~~~~~~~~~~~~~ Cc: Andrei Warkentin Cc: Martin Mares Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701124702.908713-2-lee.jones@linaro.org Signed-off-by: Ulf Hansson commit 53e888d14b4b66c5b30e4b726ba431e0ac2dd8b0 Author: Hulk Robot Date: Thu Jul 2 10:03:47 2020 +0800 mmc: sdhci-msm: Make function sdhci_msm_dump_vendor_regs() static Fix sparse build warning: drivers/mmc/host/sdhci-msm.c:1888:6: warning: symbol 'sdhci_msm_dump_vendor_regs' was not declared. Should it be static? Signed-off-by: Hulk Robot Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200702020347.77214-1-weiyongjun1@huawei.com Signed-off-by: Ulf Hansson commit 58a91d96d0bfdcbed7f9795220e42e02ed3f2f89 Author: Yoshihiro Shimoda Date: Thu May 21 16:01:06 2020 +0900 mmc: renesas_sdhi_internal_dmac: Fix dma unmapping in error cases If this controller doesn't issue interrupt for response of command, this driver lacks to call dma_unmap_sg(). So, fix the issue by using end() of struct tmio_mmc_dma_ops. Reported-by: Takeshi Saito Fixes: 2a68ea7896e3 ("mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMAC") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1590044466-28372-4-git-send-email-yoshihiro.shimoda.uh@renesas.com Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 2b26e34e9af3fa24fa1266e9ea2d66a1f7d62dc0 Author: Yoshihiro Shimoda Date: Thu May 21 16:01:05 2020 +0900 mmc: renesas_sdhi_internal_dmac: clean up the code for dma complete To add end() operation in the future, clean the code of renesas_sdhi_internal_dmac_complete_tasklet_fn(). No behavior change. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1590044466-28372-3-git-send-email-yoshihiro.shimoda.uh@renesas.com Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 6dca9a9c0cd55d08d83c3e3c0d9913f1dd86302a Author: Yoshihiro Shimoda Date: Thu May 21 16:01:04 2020 +0900 mmc: tmio: core: Add end operation into tmio_mmc_dma_ops Related drivers like renesas_sdhi_internal_dmac are possible to lack dma unmaping in error cases (for example response timeout). Since tmio_mmc_finish_request() will be always called in any case, to fix the issue, add end operation into struct tmio_mmc_dma_ops and call the operation in tmio_mmc_finish_request() to call dma_ummap API by the related drivers correctly. Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1590044466-28372-2-git-send-email-yoshihiro.shimoda.uh@renesas.com Tested-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 4f7872ae920fccf6a07ca64cc40792bd6be0d0d5 Author: Pali Rohár Date: Mon Jun 29 09:21:44 2020 +0200 mmc: sdio: Move SDIO IDs from rsi_sdio driver to common include file Define appropriate macro names for consistency with other macros. Signed-off-by: Pali Rohár Link: https://lore.kernel.org/r/20200629072144.24351-1-pali@kernel.org Signed-off-by: Ulf Hansson commit 92a2173837d2c872362e32d5e54f4c8aa539bdbf Author: Veerabhadrarao Badiganti Date: Tue Jun 23 19:04:48 2020 +0530 mmc: sdhci-msm: Use internal voltage control On qcom SD host controllers voltage switching be done after the HW is ready for it. The HW informs its readiness through power irq. The voltage switching should happen only then. Use the internal voltage switching and then control the voltage switching using power irq. IO-bus supply of eMMC would be kept always-on. So set the load for this supply to configure it in LPM when eMMC is suspend state and in HPM when eMMC is active. Co-developed-by: Asutosh Das Signed-off-by: Asutosh Das Co-developed-by: Vijay Viswanath Signed-off-by: Vijay Viswanath Co-developed-by: Veerabhadrarao Badiganti Signed-off-by: Veerabhadrarao Badiganti Link: https://lore.kernel.org/r/1592919288-1020-4-git-send-email-vbadigan@codeaurora.org Signed-off-by: Ulf Hansson commit ed54ef9878fe87d8df5aafdd763a70f96fdbce03 Author: Veerabhadrarao Badiganti Date: Tue Jun 23 19:04:47 2020 +0530 mmc: core: Set default power mode in mmc_alloc_host() Set the default power mode, MMC_POWER_UNDEFINED, in mmc_alloc_host() rather than in mmc_start_host(). This enables host drivers to make use of the initial state during ->probe(). Signed-off-by: Veerabhadrarao Badiganti Link: https://lore.kernel.org/r/1592919288-1020-3-git-send-email-vbadigan@codeaurora.org Signed-off-by: Ulf Hansson commit 0fcb031e52d7fc03913f2b1aa5302c09ba6155db Author: Vijay Viswanath Date: Tue Jun 23 19:04:46 2020 +0530 mmc: sdhci: Allow platform controlled voltage switching If vendor platform drivers are controlling whole logic of voltage switching, then sdhci driver no need control vqmmc regulator. So skip enabling/disable vqmmc from SDHC driver. Signed-off-by: Vijay Viswanath Signed-off-by: Veerabhadrarao Badiganti Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1592919288-1020-2-git-send-email-vbadigan@codeaurora.org Signed-off-by: Ulf Hansson commit b343a0911057899aaf082a29f15c66a1a4531952 Author: Akshu Agrawal Date: Tue Jun 23 19:03:27 2020 +0530 mmc: sdhci-acpi: For amd device set driver type as MMC_SET_DRIVER_TYPE_A HS400/HS200/eMMC HS doesn't have Preset Value register. Hence, sdhci_set_ios function overrides the value set by fmw to SDHCI_CTRL_DRV_TYPE_B. This patch sets drv_type to MMC_SET_DRIVER_TYPE_A so that host_control2 register gets updated with the required strength value. Signed-off-by: Akshu Agrawal Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200623133347.4598-1-akshu.agrawal@amd.com Signed-off-by: Ulf Hansson commit 3722c74c721b5612ffa45027984bd8161d1aae06 Author: Haibo Chen Date: Wed Jun 24 16:03:50 2020 +0800 mmc: sdhci-esdhc-imx: dump internal IC debug status during error USDHC of i.MX has internal IC debug register, which record the IC logical status. So dump these logical status in error condition, this can help analyzing issue. Signed-off-by: Haibo Chen Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1592985830-13038-1-git-send-email-haibo.chen@nxp.com Signed-off-by: Ulf Hansson commit e81515556d76cc00272bded98ec8d1def6eb9e2c Author: Haibo Chen Date: Mon Jun 22 16:19:19 2020 +0800 mmc: sdio: fix clock rate setting for SDR12/SDR25 mode In current code logic, when work in SDR12/SDR25 mode, the final clock rate is incorrect, just the legancy 400KHz, because the card->sw_caps.sd3_bus_mode do not has the flag SD_MODE_UHS_SDR12 or SD_MODE_UHS_SDR25. Besides, SDIO_SPEED_SDR12 is actually value 0, and every mode need to config the timing and clock rate, so remove the ‘if’ operator. Signed-off-by: Haibo Chen Tested-by: Pali Rohár Link: https://lore.kernel.org/r/1592813959-5914-1-git-send-email-haibo.chen@nxp.com Signed-off-by: Ulf Hansson commit 61d9c4aa97f32a67ccde89325e5048d66095b55b Author: Faiz Abbas Date: Fri Jun 19 18:28:00 2020 +0530 mmc: sdhci_am654: Add support for clkbuf_sel property Add support for writing new clkbuf_sel property for the J721e 4 bit IP. Signed-off-by: Faiz Abbas Signed-off-by: Sekhar Nori Link: https://lore.kernel.org/r/20200619125801.9530-7-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 0003417d5738fe2c8736aaa9abb3170fa0757689 Author: Faiz Abbas Date: Fri Jun 19 18:27:59 2020 +0530 mmc: sdhci_am654: Update delay chain configuration For speed modes where DLL is not enabled write to TXDLYCLK to enable transmitter delay chain mode. Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200619125801.9530-6-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit fe52e2fbc6ef3b36dafebde61d1d87717bcde3d4 Author: Faiz Abbas Date: Fri Jun 19 18:27:58 2020 +0530 mmc: sdhci_am654: Fix conditions for enabling dll The clock > CLOCK_TOO_SLOW_HZ condition gating phy configuration is only required because dll should not be enabled at too low a clock frequency or too low timing. Make sure that this condition only gates dll enablement. Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200619125801.9530-5-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 09db994358ece22ab68190f8be020411bef5d2e2 Author: Faiz Abbas Date: Fri Jun 19 18:27:57 2020 +0530 mmc: sdhci_am654: Add Support for SR2.0 Add Support for AM65x PG2.0. Use the SoC bus framework to fixup the driver data and skip do DLL calibration if the revision is 1.0 Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200619125801.9530-4-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 23514731f4ab885dc0692ee4113e924b5ab3b492 Author: Faiz Abbas Date: Fri Jun 19 18:27:56 2020 +0530 mmc: sdhci_am654: Add flag for PHY calibration Not all controllers need calibration for the PHY DLL. Add a DLL_CALIB flag to indicate the same. Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200619125801.9530-3-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit b1f85c8f2f033d462ce53cae6cbdfd6521dd54c5 Author: Faiz Abbas Date: Fri Jun 19 18:27:55 2020 +0530 dt-bindings: mmc: sdhci-am654: Add ti,clkbuf-sel binding Add documentation for the clock buffer select phy property in the am654x and j721e 4 bit IP Signed-off-by: Faiz Abbas Link: https://lore.kernel.org/r/20200619125801.9530-2-faiz_abbas@ti.com Signed-off-by: Ulf Hansson commit 72f47aec86e1e0ffd0969698f45a53d5c7c930a7 Author: Jisheng Zhang Date: Mon Jun 22 16:44:31 2020 +0800 dt-bindings: mmc: Convert pwrseq to json-schema Convert the pwrseq binding to DT schema format using json-schema. At the same time, fix a couple of issues with the examples discovered by the validation tool -- missing ";" Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200622164431.3dbc8c5a@xhacker.debian Signed-off-by: Ulf Hansson commit b9a349fdc716a099e96e96de0dd21faf1d4cd594 Author: Geert Uytterhoeven Date: Thu Jun 18 10:03:21 2020 +0200 mmc: sh_mmcif: Use "kHz" for kilohertz "K" stands for "kelvin". While at it, make the spacing before units consistent. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200618080321.16678-1-geert+renesas@glider.be Reviewed-by: Wolfram Sang Signed-off-by: Ulf Hansson commit 27d8a86a30506624d0e49f20fa1c92edb58443cc Author: Flavio Suligoi Date: Wed Jun 17 17:19:38 2020 +0200 mmc: sdhci-msm: Fix spelling mistake Fix typo: "trigered" --> "triggered" Signed-off-by: Flavio Suligoi Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20200617151938.30217-1-f.suligoi@asem.it Signed-off-by: Ulf Hansson commit 81a77ee9092dc819a7a53c18175fe907d55f7fef Author: Ludovic Barre Date: Thu Jun 11 15:28:39 2020 +0200 mmc: mmci: add sdio datactrl mask for sdmmc revisions This patch adds datactrl_mask_sdio for sdmmc revisions. sdmmc revisions used same bit of previous ST variant. Signed-off-by: Ludovic Barre Link: https://lore.kernel.org/r/20200611132839.4515-1-ludovic.barre@st.com Signed-off-by: Ulf Hansson commit c99e1d0c91ac8d7db3062ea1af315f21295701d7 Author: Chuhong Yuan Date: Tue Jun 9 00:22:26 2020 +0800 mmc: sdhci-of-arasan: Add missed checks for devm_clk_register() These functions do not check the return value of devm_clk_register(): - sdhci_arasan_register_sdcardclk() - sdhci_arasan_register_sampleclk() Therefore, add the missed checks to fix them. Fixes: c390f2110adf1 ("mmc: sdhci-of-arasan: Add ability to export card clock") Signed-off-by: Chuhong Yuan Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200608162226.3259186-1-hslester96@gmail.com Signed-off-by: Ulf Hansson commit 40e6c479e9250808ff19ccfb6d48979ecb2377bd Author: Yue Hu Date: Tue Jun 9 16:14:31 2020 +0800 mmc: sdio: Fix 1-bit mode for SD-combo cards during suspend Commit 6b5eda369ac3 ("sdio: put active devices into 1-bit mode during suspend") disabled 4-bit mode during system suspend. After this patch, commit 7310ece86ad7 ("mmc: implement SD-combo (IO+mem) support") used new sdio_enable_4bit_bus() instead of sdio_enable_wide() to support SD-combo cards, also for card resume. However, no corresponding support added during suspend. That is not correct. Let's fix it. Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20200609081431.6376-1-zbestahu@gmail.com Signed-off-by: Ulf Hansson commit ec97863cac3e36e877cc326b12568a237865ee69 Author: Yue Hu Date: Mon Jun 8 18:30:09 2020 +0800 mmc: sdio: Enable SDIO 4-bit bus if not support SD_SCR_BUS_WIDTH_4 for SD combo card If the card type is SD combo(MMC_TYPE_SD_COMBO) and the memory part does not support wider bus(SD_SCR_BUS_WIDTH_4), nothing will be done except return 0. However, we should check whether IO part support wider bus or not. We should use available IO ability if supported. In addition, there's a duplicated check to MMC_CAP_4_BIT_DATA since sdio_enable_wide() will include that check. And we can also save one call site to sdio_enable_wide() after this change. Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20200608103009.5000-1-zbestahu@gmail.com Signed-off-by: Ulf Hansson commit 42a166d7e05452c9af44d65cc14725a181b0569f Author: Yue Hu Date: Thu Jun 4 18:01:02 2020 +0800 mmc: sdio: Return ret if sdio_disable_func() fails We should return any possible error returned by mmc_io_rw_direct() rather than only -EIO in sdio_disable_func() failure path. Signed-off-by: Yue Hu Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200604100102.13572-1-zbestahu@gmail.com Signed-off-by: Ulf Hansson commit 47fad46b7ae096242ce46ddbc79184d7e0254b86 Author: Sowjanya Komatineni Date: Thu Jun 4 20:04:00 2020 -0700 mmc: sdhci-tegra: Add comment for PADCALIB and PAD_CONTROL NVQUIRKS This patch adds comments about NVQUIRKS HAS_PADCALIB and NEEDS_PAD_CONTROL. Signed-off-by: Sowjanya Komatineni Link: https://lore.kernel.org/r/1591326240-28928-1-git-send-email-skomatineni@nvidia.com Signed-off-by: Ulf Hansson commit 557ed5f06c63fc6dc37847ad299c4fb77aa90015 Author: Pradeep P V K Date: Tue Jun 9 14:07:26 2020 +0530 dt-bindings: mmc: sdhci-msm: Add interconnect BW scaling strings Add interconnect bandwidth scaling supported strings for qcom-sdhci controller. Signed-off-by: Pradeep P V K Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/1591691846-7578-3-git-send-email-ppvk@codeaurora.org Signed-off-by: Ulf Hansson commit b4fc8278d252288610d6160afb3df125c0514da3 Author: Pradeep P V K Date: Tue Jun 9 14:07:25 2020 +0530 mmc: sdhci-msm: Add interconnect bandwidth scaling support Interconnect bandwidth scaling support is now added as a part of OPP. So, make sure interconnect driver is ready before handling interconnect scaling. Signed-off-by: Pradeep P V K Reviewed-by: Sibi Sankar Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1591691846-7578-2-git-send-email-ppvk@codeaurora.org Signed-off-by: Ulf Hansson commit b52fb259dff8d0da76d38005464edf4201b01d76 Author: Ulf Hansson Date: Fri May 29 12:23:41 2020 +0200 mmc: core: Always allow the card detect uevent to be consumed The approach to allow userspace ~5s to consume the uevent, which is triggered when a new card is inserted/initialized, currently requires the mmc host to support system wakeup. This is unnecessary limiting, especially for an mmc host that relies on a GPIO IRQ for card detect. More precisely, the mmc host may not support system wakeup for its corresponding struct device, while the GPIO IRQ still could be configured as a wakeup IRQ via enable_irq_wake(). To support all various cases, let's simply drop the need for the wakeup support. Instead let's always register a wakeup source and activate it for all card detect IRQs by calling __pm_wakeup_event(). Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20200529102341.12529-1-ulf.hansson@linaro.org commit 2730055dcb9a07f8aca27e6911defc29b41c71df Author: Chris Wilson Date: Sat Jul 11 10:13:49 2020 +0100 drm/i915/gt: Always reset the engine, even if inactive, on execlists failure If something has gone awry with the CSB processing, we need to pause, unwind and restart the request submission and event processing. However, currently we skip the engine reset if we raise an error but discover no active context, in the mistaken belief that it was merely a glitch in the matrix. The glitches are real enough, and we do need to unwind even if the engine appears idle (as it has gone permanently idle!) The simplest way to unwind and recover is simply do the engine reset, which should be very fast and _safe_ as nothing is active. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200711091349.28865-1-chris@chris-wilson.co.uk commit 382f429bb559fe991b1ece2e5e58c812e28b3ad8 Author: Geert Uytterhoeven Date: Mon Jul 6 11:34:56 2020 +0200 m68k: defconfig: Update defconfigs for v5.8-rc3 - Re-enable modular build of DES crypto algorithm (no longer auto-enabled since commit be01369859b8aa07 ("esp, ah: modernize the crypto algorithm selections")), - Enable modular build of prime numbers and bitops test modules. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200615075458.22088-1-geert@linux-m68k.org Link: https://lore.kernel.org/r/20200706093456.15641-1-geert@linux-m68k.org commit e3a549487f08f6326b24e92b3d87f9683f1d74a4 Author: Masahiro Yamada Date: Wed Jun 17 12:11:53 2020 +0900 m68k: Use CLEAN_FILES to clean up files The log of 'make ARCH=m68k clean' does not look nice. $ make ARCH=m68k clean CLEAN arch/m68k/kernel [ snip ] CLEAN usr rm -f vmlinux.gz vmlinux.bz2 CLEAN vmlinux.symvers modules.builtin modules.builtin.modinfo Use CLEAN_FILES to simplify the code, and beautify the log. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200617031153.85858-1-masahiroy@kernel.org Signed-off-by: Geert Uytterhoeven commit 47fbcb9506df7cf02ccae6895be3f76fa5768eb1 Author: Finn Thain Date: Sun May 31 09:12:13 2020 +1000 m68k: mac: Improve IOP debug messages Always dump the full message and reply. Avoid printing partial lines as this output gets mixed up with the output from called functions. Don't output the state of idle channels. Signed-off-by: Finn Thain Tested-by: Stan Johnson Cc: Joshua Thompson Link: https://lore.kernel.org/r/317909d69244f06581973c5839382f5516cd9a1c.1590880333.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit adc19b2e314b3883a22e4f51654da4e6d8102d5d Author: Finn Thain Date: Sun May 31 09:12:13 2020 +1000 m68k: mac: Don't send uninitialized data in IOP message reply Clear the message reply before calling iop_complete(). This code path is not normally executed but should that happen let's arrange for consistent behaviour from the IOP. Signed-off-by: Finn Thain Tested-by: Stan Johnson Cc: Joshua Thompson Link: https://lore.kernel.org/r/8e35df4d193b082cb6285b1f30c949ff7e30e99e.1590880333.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit 931fc82a6aaf4e2e4a5490addaa6a090d78c24a7 Author: Finn Thain Date: Sun May 31 09:12:13 2020 +1000 m68k: mac: Fix IOP status/control register writes When writing values to the IOP status/control register make sure those values do not have any extraneous bits that will clear interrupt flags. To place the SCC IOP into bypass mode would be desirable but this is not achieved by writing IOP_DMAINACTIVE | IOP_RUN | IOP_AUTOINC | IOP_BYPASS to the control register. Drop this ineffective register write. Remove the flawed and unused iop_bypass() function. Make use of the unused iop_stop() function. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain Tested-by: Stan Johnson Cc: Joshua Thompson Link: https://lore.kernel.org/r/09bcb7359a1719a18b551ee515da3c4c3cf709e6.1590880333.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit aeb445bf2194d83e12e85bf5c65baaf1f093bd8f Author: Finn Thain Date: Sun May 31 09:12:13 2020 +1000 m68k: mac: Don't send IOP message until channel is idle In the following sequence of calls, iop_do_send() gets called when the "send" channel is not in the IOP_MSG_IDLE state: iop_ism_irq() iop_handle_send() (msg->handler)() iop_send_message() iop_do_send() Avoid this by testing the channel state before calling iop_do_send(). When sending, and iop_send_queue is empty, call iop_do_send() because the channel is idle. If iop_send_queue is not empty, iop_do_send() will get called later by iop_handle_send(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Finn Thain Tested-by: Stan Johnson Cc: Joshua Thompson Link: https://lore.kernel.org/r/6d667c39e53865661fa5a48f16829d18ed8abe54.1590880333.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit be1a31283655105606407502800871b9c1a1132f Author: Michael Schmitz Date: Sun May 31 10:45:19 2020 +1200 m68k: atari: Annotate dummy read in ROM port IO code as __maybe_unused The Atari ROM port IO code uses dummy variables to implement writes (not supported by the hardware) as reads that encode the write data in part of the address. The value read from the ROM port in this operation is discarded. Annotate dummy variables as __maybe_unused to avoid a compiler warning with W=1. Reported-by: kbuild test robot Signed-off-by: Michael Schmitz Link: https://lore.kernel.org/r/1590878719-21219-1-git-send-email-schmitzmic@gmail.com Signed-off-by: Geert Uytterhoeven commit 5f5f2949c14d6fe5cfc51bd98a41fdf69652c7e3 Author: Gustavo A. R. Silva Date: Wed May 27 08:39:42 2020 -0500 m68k: Use sizeof_field() helper Make use of the sizeof_field() helper instead of an open-coded version. Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200527133942.GA10408@embeddedor Signed-off-by: Geert Uytterhoeven commit 40b13fd7fd6e1ec295230cc114c6c9309e15784a Author: Masahiro Yamada Date: Tue May 26 21:38:10 2020 +0900 m68k: Pass -D options to KBUILD_CPPFLAGS instead of KBUILD_{A,C}FLAGS Precisely, -D is a preprocessor option. KBUILD_CPPFLAGS is passed for compiling .c and .S files too. Signed-off-by: Masahiro Yamada Acked-by: Greg Ungerer Link: https://lore.kernel.org/r/20200526123810.301667-4-masahiroy@kernel.org Signed-off-by: Geert Uytterhoeven commit 2367b0264294a50cd2cd9d4c1270a9393f32038c Author: Masahiro Yamada Date: Tue May 26 21:38:09 2020 +0900 m68k: Optimize cc-option calls for cpuflags-y arch/m68k/Makefile computes lots of unneeded cc-option calls. For example, if CONFIG_M5441x is not defined, there is not point in evaluating the following compiler flag. cpuflags-$(CONFIG_M5441x) := $(call cc-option,-mcpu=54455,-mcfv4e) The result is set to cpuflags-, then thrown away. The right hand side of ':=' is immediately expanded. Hence, all of the 16 calls for cc-option are evaluated. This is expensive since cc-option invokes the compiler. This occurs even if you are not attempting to build anything, like 'make ARCH=m68k help'. Use '=' to expand the value _lazily_. The evaluation for cc-option is delayed until $(cpuflags-y) is expanded. So, the cc-option test happens just once at most. This commit mimics tune-y of arch/arm/Makefile. Signed-off-by: Masahiro Yamada Acked-by: Greg Ungerer Link: https://lore.kernel.org/r/20200526123810.301667-3-masahiroy@kernel.org Signed-off-by: Geert Uytterhoeven commit bd3ff3f1b69cdb315d91fef0fb9512af83ae579b Author: Masahiro Yamada Date: Tue May 26 21:38:08 2020 +0900 m68k: sun3: Descend to prom from arch/m68k/sun3 Move prom/ to the more relevant Makefile. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200526123810.301667-2-masahiroy@kernel.org Signed-off-by: Geert Uytterhoeven commit 028a342ec8e128c5d71548d1210f1dba1ae95332 Author: Masahiro Yamada Date: Tue May 26 21:38:07 2020 +0900 m68k: Add arch/m68k/Kbuild Use the standard obj-y form to specify the sub-directories under arch/m68k/. No functional change intended. Signed-off-by: Masahiro Yamada Acked-by: Greg Ungerer Link: https://lore.kernel.org/r/20200526123810.301667-1-masahiroy@kernel.org Signed-off-by: Geert Uytterhoeven commit 3621d3e57d9ec4677085bd11ebbf99bb405685b2 Author: Randy Dunlap Date: Fri Jul 3 20:44:46 2020 -0700 Documentation/driver-api: dmaengine/provider: drop doubled word Drop the doubled word "has". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Link: https://lore.kernel.org/r/20200704034502.17199-2-rdunlap@infradead.org Signed-off-by: Vinod Koul commit 4548a6ad3d50c398aa12fa3ad45dd0611328f13b Author: Dave Jiang Date: Fri Jun 26 11:12:56 2020 -0700 dmaengine: idxd: move idxd interrupt handling to mask instead of ignore Switch driver to use MSIX mask and unmask instead of the ignore bit. When ignore bit is cleared, we must issue an MMIO read to ensure writes have all arrived and check and process any additional completions. The ignore bit does not queue up any pending MSIX interrupts. The mask bit however does. Use API call from interrupt subsystem to mask MSIX interrupt since the hardware does not have convenient mask bit register. Suggested-by: Ashok Raj Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/159319517621.70410.11816465052708900506.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 0d5c10b4c84d6ae6255129e5f16a0d2119c74334 Author: Dave Jiang Date: Fri Jun 26 11:11:18 2020 -0700 dmaengine: idxd: add work queue drain support Add wq drain support. When a wq is being released, it needs to wait for all in-flight operation to complete. A device control function idxd_wq_drain() has been added to facilitate this. A wq drain call is added to the char dev on release to make sure all user operations are complete. A wq drain is also added before the wq is being disabled. A drain command can take an unpredictable period of time. Interrupt support for device commands is added to allow waiting on the command to finish. If a previous command is in progress, the new submitter can block until the current command is finished before proceeding. The interrupt based submission will submit the command and then wait until a command completion interrupt happens to complete. All commands are moved to the interrupt based command submission except for the device reset during probe, which will be polled. Fixes: 42d279f9137a ("dmaengine: idxd: add char driver to expose submission portal to userland") Signed-off-by: Dave Jiang Reviewed-by: Tony Luck Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/159319502515.69593.13451647706946040301.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit e98e44562ba2ee994f4fd1e32be7e327edd263ca Author: Eyal Birger Date: Thu Jul 9 13:16:52 2020 +0300 xfrm interface: store xfrmi contexts in a hash by if_id xfrmi_lookup() is called on every packet. Using a single list for looking up if_id becomes a bottleneck when having many xfrm interfaces. Signed-off-by: Eyal Birger Signed-off-by: Steffen Klassert commit 2749c69734298905aedb0629f2bc66346f0031f9 Author: Eyal Birger Date: Thu Jul 9 13:16:51 2020 +0300 xfrm interface: avoid xi lookup in xfrmi_decode_session() The xfrmi context exists in the netdevice priv context. Avoid looking for it in a separate list. Signed-off-by: Eyal Birger Signed-off-by: Steffen Klassert commit cc59e6bb6cd69d3347c06ccce088c5c6052e041e Author: Yicong Yang Date: Mon Jul 6 17:22:36 2020 +0800 mtd: spi-nor: Disable the flash quad mode in spi_nor_restore() If the flash's quad mode is enabled, it'll remain in the quad mode when it's removed. If we drive the flash next time in Standard/Dual SPI mode, the QE bit is not cleared and the function of flash's WP# and RESET#/HOLD# have been switched to IO2 and IO3 and are not restored. Disable the Quad mode in spi_nor_restore(), then the flash's QE bit will be cleared when removed. This will make sure the flash always enter the Standard/Dual SPI mode when loaded. Signed-off-by: Yicong Yang Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/1594027356-19088-3-git-send-email-yangyicong@hisilicon.com commit be192209d5a33c912caa4a05d6f92b89328d8db8 Author: Yicong Yang Date: Mon Jul 6 17:22:35 2020 +0800 mtd: spi-nor: Add capability to disable flash quad mode Previous we didn't provide a way to disable the flash's quad mode. Which means we cannot do some cleanup works when to remove or poweroff the flash, like what set 4-byte address mode does in spi_nor_restore(). Add the capability to disable the flash quad mode, by introducing an enable flag in the flash parameters quad_enable() hooks and related functions. Signed-off-by: Yicong Yang Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/1594027356-19088-2-git-send-email-yangyicong@hisilicon.com commit 66dfd9593b88284382f5af12a6f9b1095f7ecbe7 Author: Wasim Khan Date: Fri Jul 10 15:21:44 2020 +0530 arm64: dts: lx2160a: Increase configuration space size lx2160a rev2 requires 4KB space for type0 and 4KB space for type1 iATU window. Increase configuration space size to 8KB to have sufficient space for type0 and type1 window. Signed-off-by: Wasim Khan Reviewed-by: Li Yang Acked-by: Hou Zhiqiang Signed-off-by: Shawn Guo commit 7b814900b8ccb4e61ebe704d42a12dc2d06b4a3a Author: Marek Szyprowski Date: Fri Jun 19 12:36:17 2020 +0200 drm: radeon: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/371172/ Signed-off-by: Christian König commit daa36ae015194beebdb66a94e493104a4c29ad81 Author: Sergei Shtylyov Date: Fri Jun 19 23:22:32 2020 +0300 arm64: dts: renesas: r8a77970: eagle/v3msk: Add QSPI flash support Define the Eagle/V3MSK board dependent parts of the RPC-IF device node. Add device nodes for Spansion S25FS512S SPI flash and MTD partitions on it. Based on the original patches by Dmitry Shifrin. Signed-off-by: Dmitry Shifrin Signed-off-by: Sergei Shtylyov Link: https://lore.kernel.org/r/fca1d012-29bf-eead-1c0d-4dd837c0bc68@cogentembedded.com Signed-off-by: Geert Uytterhoeven commit 11a6a6a50b1c2c9439a078f1da3c9f3c3d918102 Author: Sergei Shtylyov Date: Fri Jun 19 23:21:37 2020 +0300 arm64: dts: renesas: r8a77970: Add RPC-IF support Describe RPC-IF in the R8A77970 device tree. Signed-off-by: Sergei Shtylyov Link: https://lore.kernel.org/r/ba8bb326-7e77-6ab7-668f-fdc22010c8ef@cogentembedded.com Signed-off-by: Geert Uytterhoeven commit 9d3f2e7e8716fc37ed0d851100eab9d2cf70257b Author: Sergei Shtylyov Date: Tue May 19 23:14:06 2020 +0300 arm64: dts: renesas: r8a77980: condor/v3hsk: Add QSPI flash support Define the Condor/V3HSK board dependent parts of the RPC-IF device node. Add device nodes for Spansion S25FS512S SPI flash and MTD partitions on it. Based on the original patches by Dmitry Shifrin. Signed-off-by: Dmitry Shifrin Signed-off-by: Sergei Shtylyov Link: https://lore.kernel.org/r/322ca212-a45f-cd2c-f1eb-737f0aa42d22@cogentembedded.com Signed-off-by: Geert Uytterhoeven commit 3b674382df13b75afbb855745f48f7f79f21518c Author: Sergei Shtylyov Date: Tue May 19 23:13:19 2020 +0300 arm64: dts: renesas: r8a77980: Add RPC-IF support Describe RPC-IF in the R8A77980 device tree. Signed-off-by: Sergei Shtylyov Link: https://lore.kernel.org/r/f18853d9-8ef9-717a-9039-2191b26e579f@cogentembedded.com Signed-off-by: Geert Uytterhoeven commit 39913934e67cab214480cc95a3632696aeb8e71a Author: Marek Szyprowski Date: Fri Jun 19 12:36:04 2020 +0200 drm: amdgpu: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/371142/ Signed-off-by: Christian König commit 250ce11ed7463aabe3ad457bb9a1973450a420b2 Author: Peng Fan Date: Fri Jul 10 10:10:53 2020 +0800 ARM: imx_v6_v7_defconfig: Support i.MX8MM i.MX8MM is built with AArch64 hardware, this is to support it could run in Aarch32 mode with clock and pinctrl driver enabled. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit d82bcef5157de1368c08244a846ab968b3e5cb7e Author: Peng Fan Date: Fri Jul 10 09:43:53 2020 +0800 soc: imx: select ARM_GIC_V3 for i.MX8M Select ARM_GIC_V3, then it is able to use gic v3 driver in aarch32 mode linux on aarch64 hardware. For aarch64 mode, it not hurts to select ARM_GIC_V3. Acked-by: Arnd Bergmann Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 72a5eb9d9c319c99c11cfd9cfb486380dd136840 Author: Cristian Marussi Date: Fri Jul 10 14:39:19 2020 +0100 firmware: arm_scmi: Remove fixed size fields from reports/scmi_event_header Event reports are used to convey information describing events to the registered user-callbacks: they are necessarily derived from the underlying raw SCMI events' messages but they are not meant to expose or directly mirror any of those messages data layout, which belong to the protocol layer. Using fixed size types for report fields, mirroring messages structure, is at odd with this: get rid of them using more generic, equivalent, typing. Substitute scmi_event_header fixed size fields with generic types too and shuffle around fields definitions to minimize implicit padding while adapting involved functions. Link: https://lore.kernel.org/r/20200710133919.39792-3-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 33ee97f823cc5b3d03c9910c1b8dbe193a21056b Author: Cristian Marussi Date: Fri Jul 10 14:39:18 2020 +0100 firmware: arm_scmi: Remove unneeded __packed attribute Remove __packed attribute from struct scmi_event_header. Link: https://lore.kernel.org/r/20200710133919.39792-2-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 02c003cc18dfb6db1001856fccb978a1179fe89a Author: Cristian Marussi Date: Fri Jul 10 14:39:17 2020 +0100 firmware: arm_scmi: Remove zero-length array in SCMI notifications Substitute zero-length array defined in scmi_base_error_report with a flexible length array definition. Link: https://lore.kernel.org/r/20200710133919.39792-1-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit a4ee9d0194c24509333caaeba894ca017e5942c8 Author: Sudeep Holla Date: Thu Jul 9 16:31:55 2020 +0100 firmware: arm_scmi: Provide a missing function param description gcc as well as clang now produce warnings for missing kerneldoc function parameter. Fix the following W=1 kernel build warning: drivers/firmware/arm_scmi/smc.c:32: warning: Function parameter or member 'shmem_lock' not described in 'scmi_smc' Link: https://lore.kernel.org/r/20200709153155.22573-1-sudeep.holla@arm.com Reported-by: kbuild test robot Signed-off-by: Sudeep Holla commit fcd2e0deae50bce48450f14c8fc5611b08d7438c Author: Sudeep Holla Date: Thu Jul 9 09:17:05 2020 +0100 clk: scmi: Fix min and max rate when registering clocks with discrete rates Currently we are not initializing the scmi clock with discrete rates correctly. We fetch the min_rate and max_rate value only for clocks with ranges and ignore the ones with discrete rates. This will lead to wrong initialization of rate range when clock supports discrete rate. Fix this by using the first and the last rate in the sorted list of the discrete clock rates while registering the clock. Link: https://lore.kernel.org/r/20200709081705.46084-2-sudeep.holla@arm.com Fixes: 6d6a1d82eaef7 ("clk: add support for clocks provided by SCMI") Reviewed-by: Stephen Boyd Reported-and-tested-by: Dien Pham Signed-off-by: Sudeep Holla commit c8a53fa1d211936ddcabf82ff991c18672b3d63a Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:10 2020 +0100 clk: renesas: cpg-mssr: Add r8a774e1 support Add support for the RZ/G2H (R8A774E1) SoC to the Renesas Clock Pulse Generator / Module Standby and Software Reset driver. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-11-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com [geert: Mark RWDT critical, cfr. commit f23f1101ad0ef1ac ("clk: renesas: rcar-gen3: Mark RWDT clocks as critical")] Signed-off-by: Geert Uytterhoeven commit 668a8187e8b7875d515eacab88cef7f97fb4a1b3 Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:08 2020 +0100 dt-bindings: clock: renesas,cpg-mssr: Document r8a774e1 Add binding documentation for the RZ/G2H (R8A774E1) Clock Pulse Generator driver. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-9-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b4a086fead547187313304022f7517fb0c412e89 Merge: 52bc5ea6edde3 ef1c9924287d1 Author: Geert Uytterhoeven Date: Mon Jul 13 10:35:57 2020 +0200 Merge tag 'renesas-r8a774e1-dt-binding-defs-tag' into clk-renesas-for-v5.9 Renesas RZ/G2H DT Binding Definitions Clock and Power Domain definitions for the Renesas RZ/G2H (R8A774E1) SoC, shared by driver and DT source files. commit 7f8fa833dc739c4a28574c335eb08dbde2cb23d0 Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:07 2020 +0100 soc: renesas: rcar-rst: Add support for RZ/G2H Add support for RZ/G2H (R8A774E1) to the R-Car RST driver. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-8-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 5b83cc42cf871d3079cc370432de6b5925c71ce5 Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:01 2020 +0100 soc: renesas: Identify RZ/G2H This patch adds support for identifying the RZ/G2H (r8a774e1) SoC. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b88fc411e0e9c38058f6e3d2afdc96aaced4e72c Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:02 2020 +0100 soc: renesas: Add Renesas R8A774E1 config option Add configuration option for the RZ/G2H (R8A774E1) SoC. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f446ade0952aed929186139f3643d714d9d2a855 Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:05 2020 +0100 soc: renesas: rcar-sysc: Add r8a774e1 support Add support for RZ/G2H (R8A774E1) SoC power areas to the R-Car SYSC driver. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-6-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 3c2543d39d061662230a3199c80522c0e91e0523 Merge: b3a9e3b9622ae ef1c9924287d1 Author: Geert Uytterhoeven Date: Mon Jul 13 10:33:35 2020 +0200 Merge tag 'renesas-r8a774e1-dt-binding-defs-tag' into renesas-drivers-for-v5.9 Renesas RZ/G2H DT Binding Definitions Clock and Power Domain definitions for the Renesas RZ/G2H (R8A774E1) SoC, shared by driver and DT source files. commit 67dd4954d247e0300cd760fbd7478e5d919899a2 Author: Chris Healy Date: Tue Jul 7 18:00:05 2020 -0700 arm64: dts: zii-ultra: update MDIO speed and preamble Update MDIO configuration with zii-ultra device to fully utilize MDIO endpoint capabilities. Device supports 12.5MHz clock and doesn't require MDIO preamble. Signed-off-by: Chris Healy Signed-off-by: Shawn Guo commit ef1c9924287d11660cfc7900aeeeb4732188743e Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:09 2020 +0100 clk: renesas: Add r8a774e1 CPG Core Clock Definitions Add all RZ/G2H Clock Pulse Generator Core Clock Outputs, as listed in Table 11.2 ("List of Clocks [RZ/G2H]") of the RZ/G2H Hardware User's Manual. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-10-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit e24779649c840ce1ecb638a30e7c821075630184 Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:04 2020 +0100 dt-bindings: power: Add r8a774e1 SYSC power domain definitions This patch adds power domain indices for the RZ/G2H (r8a774e1) SoC. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4d938a27e18d9c9a85041bb9a94f645a0a132f37 Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:06 2020 +0100 dt-bindings: reset: renesas,rst: Document r8a774e1 reset module Document bindings for the RZ/G2H (R8A774E1) reset module. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-7-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit f639fb66d17e2e25049503b7c2c568457a9b5c6f Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:03 2020 +0100 dt-bindings: power: renesas,rcar-sysc: Document r8a774e1 SYSC binding Document bindings for the RZ/G2H (aka R8A774E1) SYSC block. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 6dfb9f369c00fe90f982eaf28032a889a89ee4b8 Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:18:00 2020 +0100 dt-bindings: arm: renesas: Add HopeRun RZ/G2H boards This patch adds board HiHope RZ/G2H (the main board, powered by the R8A774E1) and board HiHope RZ/G2 EX (the expansion board that sits on top of the HiHope RZ/G2H). Both boards are made by Jiangsu HopeRun Software Co., Ltd. (a.k.a. HopeRun). Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138692-16816-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 1f52719bb71f6ead0bcf19c212a30f05c2237058 Author: Marian-Cristian Rotariu Date: Tue Jul 7 17:12:35 2020 +0100 dt-bindings: arm: renesas: Document RZ/G2H SoC DT bindings Add device tree binding documentation for the Renesas RZ/G2H (r8a774e1) SoC. Signed-off-by: Marian-Cristian Rotariu Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/1594138368-16449-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8c8f97573eb3843ddd2d8cb95c80ce0243b17d7e Author: Takahiro Kuwano Date: Fri Jun 26 14:16:50 2020 +0900 mtd: spi-nor: spansion: Remove s70fl01gs from flash_info The s70fl01gs is a dual die stack of two s25fl512s die with dedicated chip select pins to each. Tested with the device and confirmed that is working as two s25fl512s devices. The current device ID in the flash_info table matches with s70fs01gs which does not work with current MTD (s70fs01gs does not support RDSR(05h) which is critical for erase/write). Signed-off-by: Takahiro Kuwano Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200626051650.495-1-Takahiro.Kuwano@cypress.com commit 5cec8bc3707be699e2ace103bb4daecfdd0d3386 Author: Pratyush Yadav Date: Wed Jun 24 00:00:24 2020 +0530 mtd: spi-nor: sfdp: do not make invalid quad enable fatal The Micron MT35XU512ABA flash does not support the quad enable bit. But instead of programming the Quad Enable Require field to 000b ("Device does not have a QE bit"), it is programmed to 111b ("Reserved"). While this is technically incorrect, it is not reason enough to abort BFPT parsing. Instead, continue BFPT parsing and let flashes set it in their fixup hooks. Signed-off-by: Pratyush Yadav Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200623183030.26591-12-p.yadav@ti.com commit 1069a0bbf9d8c3c76bea0be55c79d2a15582a81f Author: Ran Wang Date: Tue Jul 7 15:40:31 2020 +0800 arm64: dts: ls1043a: update USB nodes status to match board config ls1043a-rdb and ls1043a-qds board’s default HW config (such as pin mux selection) would not enable some USB controllers’ data path, which causing over-current detected on those controllers. This will hit the case of ‘xhci driver prevent bus suspend if a root hub port detected over-current condition’, causing system failed to be suspended. So disable them in device tree to resolve this issue. Signed-off-by: Ran Wang Signed-off-by: Shawn Guo commit 0ff35966d171ec99b118df666c1687cc86ba8d7e Author: Vinod Koul Date: Wed Jul 8 18:58:09 2020 +0530 phy: stm32: use NULL instead of zero devm_clk_get() and devm_reset_control_get() expect a const char *id for the last arg, but a value of zero was provided. This results in below sparse warning: drivers/phy/st/phy-stm32-usbphyc.c:330:42: warning: Using plain integer as NULL pointer drivers/phy/st/phy-stm32-usbphyc.c:343:52: warning: Using plain integer as NULL pointer Instead of zero, use NULL Reviewed-by: Amelie Delaunay Link: https://lore.kernel.org/r/20200708132809.265967-6-vkoul@kernel.org Signed-off-by: Vinod Koul commit 0672fb0d422246725c3af0957cbdbedcc86008a1 Author: Vinod Koul Date: Wed Jul 8 18:58:08 2020 +0530 phy: exynos5-usbdrd: use correct format for structure description We get warning with W=1 build: drivers/phy/samsung/phy-exynos5-usbdrd.c:211: warning: Function parameter or member 'phys' not described in 'exynos5_usbdrd_phy' drivers/phy/samsung/phy-exynos5-usbdrd.c:211: warning: Function parameter or member 'vbus' not described in 'exynos5_usbdrd_phy' drivers/phy/samsung/phy-exynos5-usbdrd.c:211: warning: Function parameter or member 'vbus_boost' not described in 'exynos5_usbdrd_phy' These members are provided with description but format is not quite right resulting in above warnings Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200708132809.265967-5-vkoul@kernel.org Signed-off-by: Vinod Koul commit 72fbf95f36218ec2a901e0eb7c3aa0bea6f1f396 Author: Vinod Koul Date: Wed Jul 8 18:58:07 2020 +0530 phy: rockchip-typec: use correct format for structure description We get warning with W=1 build: drivers/phy/rockchip/phy-rockchip-typec.c:360: warning: cannot understand function prototype: 'struct rockchip_usb3phy_port_cfg ' The 'struct rockchip_usb3phy_port_cfg ' is commented properly but uses wrong format, so fix that up Link: https://lore.kernel.org/r/20200708132809.265967-4-vkoul@kernel.org Signed-off-by: Vinod Koul commit f0c47c74583cc55c7ff9bdafff63bfb33edbb940 Author: Vinod Koul Date: Wed Jul 8 18:58:06 2020 +0530 phy: xgene: remove unsigned integer comparison with less than zero We get warning with W=1 build: drivers/phy/phy-xgene.c: In function ‘xgene_phy_xlate’: drivers/phy/phy-xgene.c:1618:20: warning: comparison of unsigned expression in ‘< 0’ is always false [-Wtype-limits] 1618 | if (args->args[0] < MODE_SATA || args->args[0] >= MODE_MAX) | args is uint32_t so can never be less than zero, so remove this check Link: https://lore.kernel.org/r/20200708132809.265967-3-vkoul@kernel.org Signed-off-by: Vinod Koul commit c988b7c5fc056d3bec4cb337a57fc2fe6a04081a Author: Vinod Koul Date: Wed Jul 8 18:58:05 2020 +0530 phy: mapphone-mdm6600: Add missing description for some structure fields We get warning with W=1 build: drivers/phy/motorola/phy-mapphone-mdm6600.c:185: warning: Function parameter or member 'val' not described in 'phy_mdm6600_cmd' drivers/phy/motorola/phy-mapphone-mdm6600.c:200: warning: Function parameter or member 'work' not described in 'phy_mdm6600_status' Fix that by adding description for 'val' and 'work' Link: https://lore.kernel.org/r/20200708132809.265967-2-vkoul@kernel.org Signed-off-by: Vinod Koul commit 901e0a8f14a1497ce6229445daac4aec1dd93b92 Author: Vinod Koul Date: Wed Jul 8 18:58:04 2020 +0530 phy-mvebu-a3700-utmi: correct typo in struct mvebu_a3700_utmi comments We get warning with W=1 build: drivers/phy/marvell/phy-mvebu-a3700-utmi.c:84: warning: Function parameter or member 'usb_misc' not described in 'mvebu_a3700_utmi' Fix that by correcting the typo usb_mis Link: https://lore.kernel.org/r/20200708132809.265967-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit de48984486d942d4f23e2b29374639f21042bdaa Author: Andrey Lebedev Date: Fri Jun 19 10:58:59 2020 +0300 drm/lima: Expose job_hang_limit module parameter Some pp or gp jobs can be successfully repeated even after they time outs. Introduce lima module parameter to specify number of times a job can hang before being dropped. Signed-off-by: Andrey Lebedev Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20200619075900.3030696-1-andrey.lebedev@gmail.com commit dcbabfeb17c3c2fdb6bc92a3031ecd37df1834a8 Author: Marek Szyprowski Date: Wed Jul 8 15:38:00 2020 +0200 phy: exynos5-usbdrd: Calibrating makes sense only for USB2.0 PHY PHY calibration is needed only for USB2.0 (UTMI) PHY, so skip calling calibration code when phy_calibrate() is called for USB3.0 (PIPE3) PHY. Fixes: d8c80bb3b55b ("phy: exynos5-usbdrd: Calibrate LOS levels for exynos5420/5800") Signed-off-by: Marek Szyprowski Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200708133800.3336-1-m.szyprowski@samsung.com Signed-off-by: Vinod Koul commit 03815930c162561a5c204494b4160d6ccf631b0b Author: Kunihiko Hayashi Date: Wed Jul 8 17:57:44 2020 +0900 dt-bindings: phy: uniphier: Fix incorrect clocks and clock-names for PXs3 usb3-hsphy The usb3-hsphy for PXs3 SoC needs to accept 3 clocks like usb3-ssphy. Fixes: 134ab2845acb ("dt-bindings: phy: Convert UniPhier USB3-PHY conroller to json-schema") Signed-off-by: Kunihiko Hayashi Link: https://lore.kernel.org/r/1594198664-29381-1-git-send-email-hayashi.kunihiko@socionext.com Signed-off-by: Vinod Koul commit 010f0dff9f07fe4e4633807253b02126cf8981fa Author: Tiezhu Yang Date: Tue Jul 7 17:22:26 2020 +0800 phy: allwinner: Make PHY_SUN6I_MIPI_DPHY depend on COMMON_CLK When CONFIG_ARCH_SUNXI is not set but CONFIG_COMPILE_TEST=y, CONFIG_HAVE_CLK=y, CONFIG_HAVE_LEGACY_CLK=y, there exists the following build errors with CONFIG_PHY_SUN6I_MIPI_DPHY=y: drivers/phy/allwinner/phy-sun6i-mipi-dphy.o: In function `sun6i_dphy_init': phy-sun6i-mipi-dphy.c:(.text+0x320): undefined reference to `clk_set_rate_exclusive' drivers/phy/allwinner/phy-sun6i-mipi-dphy.o: In function `sun6i_dphy_exit': phy-sun6i-mipi-dphy.c:(.text+0x2c8): undefined reference to `clk_rate_exclusive_put' clk_set_rate_exclusive() and clk_rate_exclusive_put() are defined in drivers/clk/clk.c, this file is built under CONFIG_COMMON_CLK, so in order to build drivers/phy/allwinner/phy-sun6i-mipi-dphy.c successful used with various configs, CONFIG_PHY_SUN6I_MIPI_DPHY should depend on CONFIG_COMMON_CLK. Fixes: 133552bf03ed ("phy: Remove CONFIG_ARCH_* check for related subdir in Makefile") Reported-by: kernel test robot Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1594113746-25393-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Vinod Koul commit 270ff6048f45759d31a7b62d3983b084153837f5 Author: Peter Chen Date: Fri Jul 3 14:46:00 2020 +0800 phy: cadence: salvo: fix wrong bit definition It fixes RX detect wakeup using USB3 device, otherwise, the USB3 device can't wakeup USB PHY when the PHY is in 32Khz clock. Fixes: 50d35aa8c15f ("phy: cadence: salvo: add salvo phy driver") Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20200703064600.14181-1-peter.chen@nxp.com Signed-off-by: Vinod Koul commit 21b91064a88cbd8a2d184aef14f14a2773f733dc Author: Michael Walle Date: Sat Jul 4 00:11:43 2020 +0200 arm64: defconfig: enable RTC and audio support on Kontron sl28 boards Although the Kontron SMARC-sAL28 board is now supported, there is still missing driver support for the hardware clock, audio interface and audio codec. Let's enable them as modules (where possible). Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit ee46e5b44bb3eafaa9e02a4186e592ab305c57b2 Author: Robin Gong Date: Sat Jul 4 00:19:38 2020 +0800 arm64: defconfig: add pca9450 pmic driver Add pca9450 pmic driver. Signed-off-by: Robin Gong Signed-off-by: Shawn Guo commit 6386156eb279386a94c74b624d41515a6481278d Author: Robin Gong Date: Sat Jul 4 00:19:37 2020 +0800 arm64: dts: imx8mn-evk: add pca9450 for i.mx8mn-evk board Add pca9450 pmic driver for i.mx8mn-evk board. Signed-off-by: Robin Gong Signed-off-by: Shawn Guo commit 18eb87f4443a0a23757e8a1ce3b3fa03714702fd Author: Trond Myklebust Date: Thu Jun 18 13:30:39 2020 -0400 pNFS/flexfiles: The mirror count could depend on the layout segment range Make sure we specify the layout segment range when calculating the mirror count. In theory, that number could depend on the range to which we're writing. Signed-off-by: Trond Myklebust commit f97ff92bd16644c8d6f579bc6728974057de3ca5 Author: Trond Myklebust Date: Thu Jun 18 13:22:04 2020 -0400 pNFS/flexfiles: Clean up redundant calls to pnfs_put_lseg() Both nfs_pageio_reset_read_mds() and nfs_pageio_reset_write_mds() do call pnfs_generic_pg_cleanup() for us. Signed-off-by: Trond Myklebust commit ac7cbb221159efbf4491de0177b4e20a5d62e5ae Author: Trond Myklebust Date: Thu Jun 4 16:20:06 2020 -0400 NFS: Allow applications to speed up readdir+statx() using AT_STATX_DONT_SYNC If the application uses the AT_STATX_DONT_SYNC flag after doing readdir(), then we should still mark the parent inode as seeing a readdirplus hit. That ensures that we continue to use readdirplus in the 'ls -l' type of workflow to do fast lookups of the dentries. Signed-off-by: Trond Myklebust commit 84a21d0825a7e2d7af035ee42d27993188c7152d Author: Oleksij Rempel Date: Wed Jul 1 15:03:26 2020 +0200 dt-bindings: arm: fsl: add different Protonic boards Add Protonic PRTI6Q, WD2, RVT, VT7 boards. Signed-off-by: Oleksij Rempel Reviewed-by: Rob Herring Signed-off-by: Shawn Guo commit b39cb21faee77e8bab988f562e3aeb46b98cc59b Author: Joakim Zhang Date: Mon Jun 29 16:42:30 2020 +0800 arm64: dts: imx8mp: add ddr pmu device node Add ddr pmu device node for i.MX8MP. Signed-off-by: Joakim Zhang Signed-off-by: Shawn Guo commit c147caa6e8a47edbc6735848499191a642d49933 Author: Yuantian Tang Date: Mon Jun 29 15:45:19 2020 +0800 arm64: dts: ls1043a: add more thermal zone support There are 5 thermal zones in ls1043a soc. Add the rest thermal zone nodes to enable them. Signed-off-by: Yuantian Tang Signed-off-by: Shawn Guo commit 160e7d8e89317fed7ef4c97afaa20a9a16b7757f Author: Yuantian Tang Date: Mon Jun 29 15:45:18 2020 +0800 arm64: dts: ls1046a: add more thermal zone support There are 5 thermal zones in ls1046a soc. Add the rest thermal zone nodes to enable them. Signed-off-by: Yuantian Tang Signed-off-by: Shawn Guo commit a24015fa8b89e4605a9c6581d56b48d991e2b66b Author: Anson Huang Date: Fri Jun 26 05:14:07 2020 +0800 firmware: imx: Move i.MX SCU soc driver into imx firmware folder The i.MX SCU soc driver depends on SCU firmware driver, so it has to use platform driver model for proper defer probe operation, since it has no device binding in DT file, a simple platform device is created together inside the platform driver. To make it more clean, we can just move the entire SCU soc driver into imx firmware folder and initialized by i.MX SCU firmware driver. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit eacfbf589c904bf8362cbd2d6cac123b0230e272 Author: Xu Yilun Date: Mon Jul 13 09:47:46 2020 +0800 fpga: dfl: pci: add device id for Intel FPGA PAC N3000 Add PCIe Device ID for Intel FPGA PAC N3000. Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Signed-off-by: Matthew Gerlach Signed-off-by: Russ Weight Reviewed-by: Wu Hao Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer commit c86768cf5cf6bfb2ce3742daaf09446465e96349 Author: Christophe JAILLET Date: Sat Jul 11 22:49:44 2020 +0200 net: sky2: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GPF_ with a correct flag. It has been compile tested. When memory is allocated in 'sky2_alloc_buffers()', GFP_KERNEL can be used because some other memory allocations in the same function already use this flag. When memory is allocated in 'sky2_probe()', GFP_KERNEL can be used because another memory allocations in the same function already uses this flag. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 6d905436a2098dadb7831f928cf311e28c84ef25 Author: Christophe JAILLET Date: Sat Jul 11 22:35:18 2020 +0200 net: skge: switch from 'pci_' to 'dma_' API The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script below and has been hand modified to replace GPF_ with a correct flag. It has been compile tested. When memory is allocated in 'skge_up()', GFP_KERNEL can be used because some other memory allocations done a few lines below in 'skge_ring_alloc()' already use this flag. @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 2faf34ba505bd8c7a30c4a16f2255939da74182f Merge: 94339443686b3 5919305351475 Author: David S. Miller Date: Sun Jul 12 15:22:14 2020 -0700 Merge branch 'Fix-MTU-warnings-for-fec-mv886xxx-combo' Andrew Lunn says: ==================== Fix MTU warnings for fec/mv886xxx combo Since changing the MTU of dsa slave interfaces was implemented, the fec/mv88e6xxx combo has been giving warnings: [ 2.275925] mv88e6085 0.2:00: nonfatal error -95 setting MTU on port 9 [ 2.284306] eth1: mtu greater than device maximum [ 2.287759] fec 400d1000.ethernet eth1: error -22 setting MTU to include DSA overhead This patchset adds support for changing the MTU on mv88e6xxx switches, which do support jumbo frames. And it modifies the FEC driver to support its true MTU range, which is larger than the default Ethernet MTU. ==================== Tested-by: Chris Healy Signed-off-by: David S. Miller commit 5919305351475dda04c0f6f28f388c89ffafcd2b Author: Andrew Lunn Date: Sat Jul 11 22:32:06 2020 +0200 net: fec: Set max MTU size to allow the MTU to be changed The FEC allocates 2K buffers, but looses some of it due to alignment. It can however support an MTU bigger than the default. This is particularly interesting when used in combination with Ethernet switches supporting DSA, which have extra headers. The DSA core will try to increase the MTU to support these extra headers. If the max size defaults to that of standard Ethernet we get a warning. By setting the max to what the driver actually supports, we avoid this warning. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 2a550aec36543b20f087e4b3063882e9465f7175 Author: Andrew Lunn Date: Sat Jul 11 22:32:05 2020 +0200 net: dsa: mv88e6xxx: Implement MTU change The Marvell Switches support jumbo packages. So implement the callbacks needed for changing the MTU. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 94339443686b36d3223bc032b7947267474e2679 Author: Nikolay Aleksandrov Date: Sat Jul 11 18:05:04 2020 +0300 net: bridge: notify on vlan tunnel changes done via the old api If someone uses the old vlan API to configure tunnel mappings we'll only generate the old-style full port notification. That would be a problem if we are monitoring the new vlan notifications for changes. The patch resolves the issue by adding vlan notifications to the old tunnel netlink code. As usual we try to compress the notifications for as many vlans in a range as possible, thus a vlan tunnel change is considered able to enter the "current" vlan notification range if: 1. vlan exists 2. it has actually changed (curr_change == true) 3. it passes all standard vlan notification range checks done by br_vlan_can_enter_range() such as option equality, id continuity etc Note that vlan tunnel changes (add/del) are considered a part of vlan options so only RTM_NEWVLAN notification is generated with the relevant information inside. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 06a28f9060a3bb37a0caa2b703be064ed7014a1f Author: Melissa Wen Date: Fri Jul 10 13:03:13 2020 -0300 drm/vkms: change the max cursor width/height This change expands the coverage for the IGT kms_cursor_crc test, where the size varies between 64 and 512 for a square cursor. With this, in addition to the cursor 64x64, this patch enables the test of cursors with sizes: 128x128, 256x256, and 512x512. Signed-off-by: Melissa Wen Reviewed-by: Rodrigo Siqueira Signed-off-by: Rodrigo Siqueira Link: https://patchwork.freedesktop.org/patch/msgid/20200710160313.xjoz6ereyma5vkc3@smtp.gmail.com commit a777b22ff5549d5fc3b76146d9e8d44c0671a9c9 Author: Artur Rojek Date: Thu Jul 9 17:21:55 2020 +0200 dt-bindings: iio/adc: Convert ingenic-adc docs to YAML. Convert the textual documentation of Device Tree bindings for the Ingenic JZ47xx SoCs ADC controller to YAML. The `interrupts` property is now explicitly listed and marked as required. While missing from the previous textual documentation, this property has been used with all the boards which probe this driver. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 9ef38afd25cd0b04989e8a9fd609955e1b5c140f Author: Gwendal Grignou Date: Thu Jul 9 11:09:24 2020 -0700 iio: cros_ec_accel_legacy: Add Read Only frequency entries Report to user space that 10Hz is the sampling frequency of the accelerometers in legacy mode, and it can not be changed. Signed-off-by: Gwendal Grignou Reviewed-by: Enric Balletbo i Serra Signed-off-by: Jonathan Cameron commit 853fa48717c2419eb024ed4d671dda8fefac7b8c Author: Ludovic Desroches Date: Thu Jul 9 10:33:16 2020 +0200 MAINTAINERS: adc: at91-sama5d2_adc: remove myself as co-maintainer Eugen is, now, more active and up to date on this topic than I. So I let him the full maintainance of this driver. Signed-off-by: Ludovic Desroches Signed-off-by: Jonathan Cameron commit a6ae2fe5c9f9fd355a48fb7d21c863e5b20d6c9c Author: Laurent Pinchart Date: Sun Jul 12 01:53:17 2020 +0300 drm: panel: simple: Fix bpc for LG LB070WV8 panel The LG LB070WV8 panel incorrectly reports a 16 bits per component value, while the panel uses 8 bits per component. Fix it. Fixes: dd0150026901 ("drm/panel: simple: Add support for LG LB070WV8 800x480 7" panel") Signed-off-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200711225317.28476-1-laurent.pinchart+renesas@ideasonboard.com commit cf1a1a6a7d81d73bcb5568b23572d6fd593add87 Author: Gustavo A. R. Silva Date: Fri Jun 19 17:14:03 2020 -0500 leds: gpio: Use struct_size() in devm_kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary function sizeof_gpio_leds_priv(). This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Pavel Machek commit a7ad53cb6687069024efbd3af734c7811f63d2a5 Author: Gustavo A. R. Silva Date: Wed Jun 17 18:07:57 2020 -0500 leds: ns2: Use struct_size() in devm_kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary function sizeof_ns2_led_priv(). This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Pavel Machek commit df51f402e3b15b00284309bd3016bb4536d2260c Author: Kent Gibson Date: Wed Jul 8 12:16:00 2020 +0800 tools: gpio: fix spurious close warning in gpio-event-mon Fix bogus close warning that occurs when opening the character device fails. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit e890678f6949e848720c66620c390d5e876149a6 Author: Kent Gibson Date: Wed Jul 8 12:15:59 2020 +0800 tools: gpio: fix spurious close warning in gpio-utils Fix bogus close warning that occurs when opening the character device fails. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit ef3c61a082c86a20cc1a4382142d480655b3c5a1 Author: Kent Gibson Date: Wed Jul 8 12:15:58 2020 +0800 tools: gpio: fix spurious close warning in lsgpio Fix bogus close warning that occurs when opening the character device fails. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 21249616f02dc3f4c5efc3b3e9ba48e428b0131c Author: Kent Gibson Date: Wed Jul 8 12:15:57 2020 +0800 gpio: uapi: fix misplaced comment line The second line of the description for event_type is before the first. Move it to after the first line. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 468242724143a8e732f82f664b1e77432d149618 Author: Kent Gibson Date: Wed Jul 8 12:15:56 2020 +0800 gpiolib: cdev: refactor lineevent cleanup into lineevent_free Consolidate the cleanup of lineevents, currently duplicated in lineevent_create and lineevent_release, into a helper function lineevent_free. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 883f919818437122462754174e21c38991a18934 Author: Kent Gibson Date: Wed Jul 8 12:15:55 2020 +0800 gpiolib: cdev: refactor linehandle cleanup into linehandle_free Consolidate the cleanup of linehandles, currently duplicated in linehandle_create and linehandle_release, into a helper function linehandle_free. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 1bf7ba400173c3a134aae3187b550d79c2a5f585 Author: Kent Gibson Date: Wed Jul 8 12:15:54 2020 +0800 gpiolib: cdev: remove recalculation of offset Remove recalculation of offset from desc, where desc itself was calculated from offset. There is no benefit from the desc -> hwgpio conversion in this context. The only implicit benefit of the offset -> desc -> hwgpio is the range check in the offset -> desc, but where desc is required you still get that, and where desc isn't required it is simpler to perform the range check directly. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit f30ef3e8376380c5be9de121517c713527cf0813 Author: Kent Gibson Date: Wed Jul 8 12:15:53 2020 +0800 gpiolib: cdev: fix minor race in GET_LINEINFO_WATCH Merge separate usage of test_bit/set_bit into test_and_set_bit to remove the possibility of a race between the test and set. Similarly test_bit and clear_bit. In the existing code it is possible for two threads to race past the test_bit and then set or clear the watch bit, and neither return EBUSY. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit e2b781c5f0dd45f632b3e15bbca702d1d140fce7 Author: Kent Gibson Date: Wed Jul 8 12:15:52 2020 +0800 gpiolib: cdev: rename priv to cdev Rename priv to cdev to improve readability. The name "priv" indicates that the object is pointed to by file->private_data, not what the object is actually is. As it is always used to point to a struct gpio_chardev_data, renaming it to cdev is more appropriate. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 6accc376a7482ecec2537e3e092b4f06e11d5994 Author: Kent Gibson Date: Wed Jul 8 12:15:51 2020 +0800 gpiolib: cdev: use blocking notifier call chain instead of atomic Replace usage of atomic_notifier_call_chain with blocking_notifier_call_chain as the notifier function, lineinfo_changed_notify, calls gpio_desc_to_lineinfo, which calls pinctrl_gpio_can_use_line, which can sleep. The chain isn't being called from an atomic context so the the blocking notifier is a suitable substitute. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 0cdc85a371c7c612a6fd04dd486a60f58350505b Author: Kent Gibson Date: Wed Jul 8 12:15:50 2020 +0800 gpiolib: cdev: remove pointless decrement of i Remove pointless decrement of variable, and associated comment. While i is used subsequently, it is re-initialized so this decrement serves no purpose. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 52b7b596dd4d7ca1d8d7c6af07bb9372e56d3463 Author: Kent Gibson Date: Wed Jul 8 12:15:49 2020 +0800 gpiolib: cdev: rename numdescs to num_descs Rename numdescs to num_descs to be more consistent with the naming of other counters and improve readability. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit 49bc52798d7bb66e958d7ea7378c38ec258b9037 Author: Kent Gibson Date: Wed Jul 8 12:15:48 2020 +0800 gpiolib: cdev: rename 'filep' and 'filp' to 'file' to be consistent with other use Rename 'filep' and 'filp' to 'file' to be consistent with other use and improve readability. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit c274b58a4b8a3bfbf0bb0b5f5332e3e049d75b65 Author: Kent Gibson Date: Wed Jul 8 12:15:47 2020 +0800 gpiolib: cdev: refactor gpiohandle_flags_to_desc_flags Refactor the mapping from handle flags to desc flags into a helper function. The assign_bit is overkill where it is replacing the set_bit cases, as is rechecking bits known to be clear in some circumstances, but the DRY simplification more than makes up for any performance degradation, especially as this is not a hot path. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit a18512e3f110637d5a4426c7d1d8761566a7e15e Author: Kent Gibson Date: Wed Jul 8 12:15:46 2020 +0800 gpiolib: cdev: minor indentation fixes Make indentation consistent with other use to improve readability. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit d189f6270fe755e8540bf2ae1a9f8da693253d87 Author: Kent Gibson Date: Wed Jul 8 12:15:45 2020 +0800 gpiolib: cdev: sort includes Sort the includes of gpiolib-cdev.c to make it easier to identify if a module is included and to avoid duplication. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit ef087d8e95d9d225f83e92d02c3eae1a41955c5f Author: Kent Gibson Date: Wed Jul 8 12:15:44 2020 +0800 gpiolib: move gpiolib-sysfs function declarations into their own header Move gpiolib-sysfs function declarations into their own header. These functions are in gpiolib-sysfs.c, and are only required by gpiolib.c, and so should be in a module header, not gpiolib.h. This brings gpiolib-sysfs into line with gpiolib-cdev, and is another step towards removing the sysfs inferface. Signed-off-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit c4e94413922b8d5dd251cffd732b349772d22973 Author: Linus Walleij Date: Fri Jul 3 20:13:38 2020 +0200 leds: gpio: Fix semantic error The leds-gpio driver mixes up the legacy GPIO flags with the GPIO descriptor flags and passes a legacy flag to devm_gpiod_get_index(). Fix this by replacing the flags variable with the strict descriptor flag. Fixes: 45d4c6de4e49 ("leds: gpio: Try to lookup gpiod from device") Signed-off-by: Linus Walleij Signed-off-by: Pavel Machek commit 302a085c20194bfa7df52e0fe684ee0c41da02e6 Author: Kai-Heng Feng Date: Thu Jul 2 13:45:00 2020 +0800 leds: core: Flush scheduled work for system suspend Sometimes LED won't be turned off by LED_CORE_SUSPENDRESUME flag upon system suspend. led_set_brightness_nopm() uses schedule_work() to set LED brightness. However, there's no guarantee that the scheduled work gets executed because no one flushes the work. So flush the scheduled work to make sure LED gets turned off. Signed-off-by: Kai-Heng Feng Acked-by: Jacek Anaszewski Fixes: 81fe8e5b73e3 ("leds: core: Add led_set_brightness_nosleep{nopm} functions") Signed-off-by: Pavel Machek commit 5ad79c20b6d28467db643ac107bbdaa01aa93a23 Author: Jan Kiszka Date: Sat Jun 13 09:15:06 2020 +0200 leds: trigger: gpio: Avoid warning on update of inverted If the GPIO has not been configured yet, writing to inverted will raise a kernel warning. Signed-off-by: Jan Kiszka Signed-off-by: Pavel Machek commit 14d3e74f59a4d7f9bc2768376818d7bebb9ad27f Author: Flavio Suligoi Date: Tue Jun 9 17:49:29 2020 +0200 leds: fix spelling mistake Fix typo: "Tigger" --> "Trigger" Signed-off-by: Flavio Suligoi Reviewed-by: Alexander Dahl Signed-off-by: Pavel Machek commit 0987c7df8abce177437780eb983b785147dc058e Author: Linus Walleij Date: Sat Jun 27 00:47:35 2020 +0200 leds: pca955x: Include the right GPIO header This driver provides a GPIO chip, so include and not the legacy header. Cc: Andrew Jeffery Cc: Joel Stanley Cc: Matt Spinler Cc: Cédric Le Goater Signed-off-by: Linus Walleij Signed-off-by: Pavel Machek commit ac219bf3c9bdf9200767e8c98a56ad42c75e5cd5 Author: Linus Walleij Date: Sat Jun 27 00:40:11 2020 +0200 leds: lp55xx: Convert to use GPIO descriptors The LP55xx driver is already using the of_gpio() functions to pick a global GPIO number for "enable" from the device tree and request the line. Simplify it by just using a GPIO descriptor. Make sure to keep the enable GPIO line optional, change the naming from "lp5523_enable" to "LP55xx enable" to reflect that this is used on all LP55xx LED drivers. Cc: Milo Kim Signed-off-by: Linus Walleij Signed-off-by: Pavel Machek commit 89b060a01b533a02fdb0dbb6810b5ca64cb33e5e Author: Kathiravan T Date: Tue Jul 7 13:09:48 2020 +0530 pinctrl: qcom: ipq8074: route gpio interrupts to APPS set target proc as APPS to route the gpio interrupts to APPS Co-developed-by: Rajkumar Ayyasamy Signed-off-by: Rajkumar Ayyasamy Signed-off-by: Kathiravan T Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/1594107588-17055-1-git-send-email-kathirav@codeaurora.org Signed-off-by: Linus Walleij commit 94c70241efbb1e7e008d433d3b020808f1984330 Author: Mark Tomlinson Date: Fri Jul 3 13:18:30 2020 +1200 pinctrl: nsp: Set irq handler based on trig type Rather than always using handle_simple_irq() as the gpio_irq_chip handler, set a more appropriate handler based on the IRQ trigger type requested. This is important for level triggered interrupts which need to be masked during handling. Also, fix the interrupt acknowledge so that it clears only one interrupt instead of all interrupts which are currently active. Finally there is no need to clear the interrupt during the interrupt handler, since the edge-triggered handler will do that for us. Signed-off-by: Mark Tomlinson Reviewed-by: Ray Jui Link: https://lore.kernel.org/r/20200703011830.15655-1-mark.tomlinson@alliedtelesis.co.nz Signed-off-by: Linus Walleij commit 467ae18aa057c44417afc92896879c2fb37a8b65 Author: Alexandre Belloni Date: Sat Jul 11 01:08:13 2020 +0200 clocksource/drivers/timer-atmel-tcb: Add sama5d2 support The first divisor for the sama5d2 is actually the gclk selector. Because the currently remaining divisors are fitting the use case, currently ensure it is skipped. Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200710230813.1005150-10-alexandre.belloni@bootlin.com commit 501465d5d7af63af5942cf6af783952bdd757c52 Author: Alexandre Belloni Date: Sat Jul 11 01:08:12 2020 +0200 clocksource/drivers/timer-atmel-tcb: Allow selecting first divider The divider selection algorithm never allowed to get index 0. It was also continuing to look for dividers, trying to find the slow clock selection. This is not necessary anymore. Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200710230813.1005150-9-alexandre.belloni@bootlin.com commit ef1d6a20e06397f4a28f23524cdb4611fd629063 Author: Alexandre Belloni Date: Sat Jul 11 01:08:11 2020 +0200 clocksource/drivers/timer-atmel-tcb: Stop using the 32kHz for clockevents Stop using the slow clock as the clock source for 32 bit counters because even at 10MHz, they are able to handle delays up to two minutes. This provides a way better resolution. Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200710230813.1005150-8-alexandre.belloni@bootlin.com commit d2c60dcf86fabb542b96b4444ca81be0b1b30099 Author: Alexandre Belloni Date: Sat Jul 11 01:08:10 2020 +0200 clocksource/drivers/timer-atmel-tcb: Fill tcb_config Use the tcb_config and struct atmel_tcb_config to get the timer counter width. This is necessary because atmel_tcb_config will be extended later on. Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200710230813.1005150-7-alexandre.belloni@bootlin.com commit 228e21848623e0ce54a1a3d7857b444813e49b2e Author: Alexandre Belloni Date: Sat Jul 11 01:08:09 2020 +0200 clocksource/drivers/timer-atmel-tcb: Rework 32khz clock selection On all the supported SoCs, the slow clock is always ATMEL_TC_TIMER_CLOCK5, avoid looking it up and pass it directly to setup_clkevents. Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200710230813.1005150-6-alexandre.belloni@bootlin.com commit 738c58ccac386bb068cba2446bd9dbabeae09b62 Author: Kamel Bouhara Date: Sat Jul 11 01:08:08 2020 +0200 ARM: at91: add atmel tcb capabilities Some atmel socs have extra tcb capabilities that allow using a generic clock source or enabling a quadrature decoder. Signed-off-by: Kamel Bouhara Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200710230813.1005150-5-alexandre.belloni@bootlin.com commit 44f6fa431bbd087083fca437d0348edd4b09e3c2 Author: Alexandre Belloni Date: Sat Jul 11 01:08:07 2020 +0200 ARM: dts: at91: sama5d2: add TCB GCLK The sama5d2 tcbs take an extra input clock, their gclk. Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200710230813.1005150-4-alexandre.belloni@bootlin.com commit d777960e8f7268f82806451065f84ea3b05a3ea3 Author: Alexandre Belloni Date: Sat Jul 11 01:08:06 2020 +0200 dt-bindings: microchip: atmel,at91rm9200-tcb: add sama5d2 compatible The sama5d2 TC block TIMER_CLOCK1 is different from the at91sam9x5 one. Instead of being MCK / 2, it is the TCB GCLK. Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200710230813.1005150-3-alexandre.belloni@bootlin.com commit 8be8e7de604f8e51cf5d02afdcd28e1e49d3646b Author: Alexandre Belloni Date: Sat Jul 11 01:08:05 2020 +0200 dt-bindings: atmel-tcb: convert bindings to json-schema Convert Atmel Timer Counter Blocks bindings to DT schema format using json-schema. Also move it out of mfd as it is not and has never been related to mfd. Signed-off-by: Alexandre Belloni Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200710230813.1005150-2-alexandre.belloni@bootlin.com commit 5c09ea8bf3a04a4e1a812b2f913739e37af6af72 Merge: d93649dc526ab 1e7468bd9d30a Author: Stephen Boyd Date: Sat Jul 11 09:28:18 2020 -0700 Merge branch 'clk-fixes' into clk-next * clk-fixes: clk: Specify IOMEM dependency for HSDK pll driver clk: AST2600: Add mux for EMMC clock clk: mvebu: ARMADA_AP_CPU_CLK needs to select ARMADA_AP_CP_HELPER commit d93649dc526ab3e1449998554345f3e0ee7c4f95 Merge: 96310398fc917 b545b9c393cb4 Author: Stephen Boyd Date: Sat Jul 11 09:28:04 2020 -0700 Merge branch 'clk-kconfig' into clk-next * clk-kconfig: clk: Drop duplicate selection in Kconfig commit 96310398fc91727ccbadc202790d8b418131147c Merge: df5b333e0ac7e b4297844995f3 Author: Stephen Boyd Date: Sat Jul 11 09:27:58 2020 -0700 Merge branch 'clk-qcom' into clk-next * clk-qcom: clk: qcom: smd: Add support for MSM8992/4 rpm clocks clk: qcom: ipq8074: Add missing clocks for pcie dt-bindings: clock: qcom: ipq8074: Add missing bindings for PCIe commit b545b9c393cb4486a7b70ef2fd8d0c8451872342 Author: Andy Shevchenko Date: Sun Jun 14 14:51:40 2020 +0300 clk: Drop duplicate selection in Kconfig There is no need to select RATIONAL in individual drivers, since common clock symbol does it already. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200614115140.41262-1-andriy.shevchenko@linux.intel.com Signed-off-by: Stephen Boyd commit b4297844995f380588e6f935a2f98c399129a9b2 Author: Konrad Dybcio Date: Wed Jun 24 01:00:18 2020 +0200 clk: qcom: smd: Add support for MSM8992/4 rpm clocks Add rpm smd clocks, PMIC and bus clocks which are required on MSM8992, MSM8994 (and APQ variants) for clients to vote on. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200623230018.303776-1-konradybcio@gmail.com [sboyd@kernel.org: Fixed up binding numbers] Signed-off-by: Stephen Boyd commit f0cfcf1ade201dcfd3365f231efc90e846fa46df Author: Sivaprakash Murugesan Date: Sun Jul 5 14:47:55 2020 +0530 clk: qcom: ipq8074: Add missing clocks for pcie Add missing clocks and resets for pcie port0 of ipq8074 devices. Co-developed-by: Selvam Sathappan Periakaruppan Signed-off-by: Selvam Sathappan Periakaruppan Signed-off-by: Sivaprakash Murugesan Link: https://lore.kernel.org/r/1593940680-2363-5-git-send-email-sivaprak@codeaurora.org [sboyd@kernel.org: Make freq table static const] Signed-off-by: Stephen Boyd commit e7fb524cfccaf649b257d517f437392f50b3931f Author: Sivaprakash Murugesan Date: Sun Jul 5 14:47:54 2020 +0530 dt-bindings: clock: qcom: ipq8074: Add missing bindings for PCIe Add missing clock bindings for PCIe port0 of ipq8074. Co-developed-by: Selvam Sathappan Periakaruppan Signed-off-by: Selvam Sathappan Periakaruppan Signed-off-by: Sivaprakash Murugesan Link: https://lore.kernel.org/r/1593940680-2363-4-git-send-email-sivaprak@codeaurora.org [sboyd@kernel.org: Clean up commit text subject] Signed-off-by: Stephen Boyd commit f4fe3a86654956179967a219f3be97ff035a957a Author: Biwen Li Date: Wed Jun 24 10:45:00 2020 +0800 arm64: dts: layerscape: add ftm_alarm0 node The patch adds ftm_alarm0 DT node - add new rcpm node - add ftm_alarm0 node - aliases ftm_alarm0 as rtc1 Signed-off-by: Biwen Li Signed-off-by: Shawn Guo commit 791c88ca57139e1d277b68d41f3e7d640c4957eb Author: Biwen Li Date: Wed Jun 24 10:44:59 2020 +0800 arm64: dts: ls1028a: Add ftm_alarm0 DT node The patch adds ftm_alarm0 DT node for LS1028ARDB board FlexTimer1 module is used to wakeup the system Signed-off-by: Biwen Li Signed-off-by: Shawn Guo commit dca78e322885acd6ba516e6caa6f20a617aab7b5 Author: Biwen Li Date: Wed Jun 24 10:44:58 2020 +0800 arm64: dts: lx2160a: add ftm_alarm0 DT node The patch adds ftm_alarm0 DT node for Soc LX2160A FlexTimer1 module is used to wakeup the system in deep sleep Signed-off-by: Biwen Li Signed-off-by: Shawn Guo commit 2eaac320db515b2ec681f6a4bad4f67a7be84ce8 Author: Christophe JAILLET Date: Sat Jul 11 08:46:47 2020 +0200 rsxx: switch from 'pci_free_consistent()' to 'dma_free_coherent()' The wrappers in include/linux/pci-dma-compat.h should go away. The patch has been generated with the coccinelle script bellow. It has been compile tested. This also aligns code with what is in use in '/rsxx/dma.c' @@ @@ - PCI_DMA_BIDIRECTIONAL + DMA_BIDIRECTIONAL @@ @@ - PCI_DMA_TODEVICE + DMA_TO_DEVICE @@ @@ - PCI_DMA_FROMDEVICE + DMA_FROM_DEVICE @@ @@ - PCI_DMA_NONE + DMA_NONE @@ expression e1, e2, e3; @@ - pci_alloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3; @@ - pci_zalloc_consistent(e1, e2, e3) + dma_alloc_coherent(&e1->dev, e2, e3, GFP_) @@ expression e1, e2, e3, e4; @@ - pci_free_consistent(e1, e2, e3, e4) + dma_free_coherent(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_single(e1, e2, e3, e4) + dma_map_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_single(e1, e2, e3, e4) + dma_unmap_single(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4, e5; @@ - pci_map_page(e1, e2, e3, e4, e5) + dma_map_page(&e1->dev, e2, e3, e4, e5) @@ expression e1, e2, e3, e4; @@ - pci_unmap_page(e1, e2, e3, e4) + dma_unmap_page(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_map_sg(e1, e2, e3, e4) + dma_map_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_unmap_sg(e1, e2, e3, e4) + dma_unmap_sg(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_cpu(e1, e2, e3, e4) + dma_sync_single_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_single_for_device(e1, e2, e3, e4) + dma_sync_single_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_cpu(e1, e2, e3, e4) + dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4) @@ expression e1, e2, e3, e4; @@ - pci_dma_sync_sg_for_device(e1, e2, e3, e4) + dma_sync_sg_for_device(&e1->dev, e2, e3, e4) @@ expression e1, e2; @@ - pci_dma_mapping_error(e1, e2) + dma_mapping_error(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_dma_mask(e1, e2) + dma_set_mask(&e1->dev, e2) @@ expression e1, e2; @@ - pci_set_consistent_dma_mask(e1, e2) + dma_set_coherent_mask(&e1->dev, e2) Signed-off-by: Christophe JAILLET Signed-off-by: Jens Axboe commit a6533df34df4b41b3abdf54bbce6b9c088d48271 Author: Chuanhua Han Date: Mon Jun 22 16:17:52 2020 +0800 arm64: dts: lx2160a: add DT node for all DSPI controller Add device tree node for first flash (CS0) connected to all dspi controller. Signed-off-by: Chuanhua Han Signed-off-by: Wasim Khan Signed-off-by: Zhao Qiang Signed-off-by: Shawn Guo commit 83ebd4a521699c6f480ffb476a19007a6e3fcd47 Author: Chuanhua Han Date: Mon Jun 22 16:17:51 2020 +0800 arm64: dts: lx2160a: add dspi controller DT nodes Add the dspi support on lx2160 Signed-off-by: Chuanhua Han Signed-off-by: Bao Xiaowei Signed-off-by: Hou Zhiqiang Signed-off-by: Zhao Qiang Signed-off-by: Shawn Guo commit 71930d61025e7d0254f3c682cb1b5242e0499cf3 Merge: a594920f8747f 1df0d8960499e Author: David S. Miller Date: Sat Jul 11 00:46:00 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net All conflicts seemed rather trivial, with some guidance from Saeed Mameed on the tc_ct.c one. Signed-off-by: David S. Miller commit 88d3457ceb82829f8ae2507b68971dc534fa4cf8 Author: Jitao Shi Date: Sun Jul 5 17:45:14 2020 +0800 drm/panel: auo,b116xw03: fix flash backlight when power on Delay the backlight on to make sure the video stable. Signed-off-by: Jitao Shi Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200705094514.34526-1-jitao.shi@mediatek.com commit 943c8a80830b88b7b203fa3e2d755620d85129d1 Author: Randy Dunlap Date: Mon Jun 29 09:43:52 2020 -0700 : add stub for of_get_next_parent() to fix qcom build error Fix a (COMPILE_TEST) build error when CONFIG_OF is not set/enabled by adding a stub for of_get_next_parent(). ../drivers/soc/qcom/qcom-geni-se.c:819:11: error: implicit declaration of function 'of_get_next_parent'; did you mean 'of_get_parent'? [-Werror=implicit-function-declaration] ../drivers/soc/qcom/qcom-geni-se.c:819:9: warning: assignment makes pointer from integer without a cast [-Wint-conversion] Fixes: 048eb908a1f2 ("soc: qcom-geni-se: Add interconnect support to fix earlycon crash") Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Randy Dunlap Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Link: https://lore.kernel.org/r/ce0d7561-ff93-d267-b57a-6505014c728c@infradead.org Signed-off-by: Bjorn Andersson commit df5b333e0ac7e19698ad2558166c82a391182cee Merge: 2a05eaa7523c8 ef14fffee5d50 Author: Stephen Boyd Date: Fri Jul 10 17:19:34 2020 -0700 Merge branch 'clk-renesas' into clk-next * clk-renesas: clk: renesas: rzg2: Mark RWDT clocks as critical clk: renesas: rcar-gen3: Mark RWDT clocks as critical clk: renesas: cpg-mssr: Mark clocks as critical only if on at boot dt-bindings: clock: renesas: cpg: Convert to json-schema commit ef14fffee5d50577f20dd5e3f01728fd63adb5d5 Merge: b3a9e3b9622ae 52bc5ea6edde3 Author: Stephen Boyd Date: Fri Jul 10 17:16:05 2020 -0700 Merge tag 'clk-renesas-for-v5.9-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: - One more conversion of DT bindings to json-schema - Enhance critical clock handling to only consider clocks that were enabled at boot time, and use it for watchdog clock handling on R-Car Gen3 and RZ/G2 SoCs * tag 'clk-renesas-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: rzg2: Mark RWDT clocks as critical clk: renesas: rcar-gen3: Mark RWDT clocks as critical clk: renesas: cpg-mssr: Mark clocks as critical only if on at boot dt-bindings: clock: renesas: cpg: Convert to json-schema commit 2a05eaa7523c8177514137f78dbb36155a5ed54c Merge: d39fc2655680e 5f1d8970d4cdb Author: Stephen Boyd Date: Fri Jul 10 17:15:50 2020 -0700 Merge branch 'clk-https' into clk-next * clk-https: Replace HTTP links with HTTPS ones: Common CLK framework commit 5f1d8970d4cdba6ef3b2f3f11ef15edd62ce551a Author: Alexander A. Klimov Date: Fri Jul 3 19:51:14 2020 +0200 Replace HTTP links with HTTPS ones: Common CLK framework Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200703175114.15027-1-grandmaster@al2klimov.de Signed-off-by: Stephen Boyd commit d39fc2655680e1cd83d73687b787182cb936a5c9 Merge: 12ef3933b46f7 03e342dc45c9e Author: Stephen Boyd Date: Fri Jul 10 17:14:55 2020 -0700 Merge branch 'clk-qcom' into clk-next - Enable CPU clks on Qualcomm MSM8996 SoCs * clk-qcom: clk: qcom: Add CPU clock driver for msm8996 dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996 soc: qcom: Separate kryo l2 accessors from PMU driver clk: qcom: Fix return value check in apss_ipq6018_probe() commit 03e342dc45c9ec07303953d4e4af11879be36609 Author: Loic Poulain Date: Fri Jul 3 10:49:42 2020 +0200 clk: qcom: Add CPU clock driver for msm8996 Each of the CPU clusters (Power and Perf) on msm8996 are clocked via 2 PLLs, a primary and alternate. There are also 2 Mux'es, a primary and secondary all connected together as shown below +-------+ XO | | +------------------>0 | | | PLL/2 | SMUX +----+ +------->1 | | | | | | | +-------+ | +-------+ | +---->0 | | | | +---------------+ | +----------->1 | CPU clk |Primary PLL +----+ PLL_EARLY | | +------> | +------+-----------+ +------>2 PMUX | +---------------+ | | | | | +------+ | +-->3 | +--^+ ACD +-----+ | +-------+ +---------------+ +------+ | |Alt PLL | | | +---------------------------+ +---------------+ PLL_EARLY The primary PLL is what drives the CPU clk, except for times when we are reprogramming the PLL itself (for rate changes) when we temporarily switch to an alternate PLL. A subsequent patch adds support to switch between primary and alternate PLL during rate changes. The primary PLL operates on a single VCO range, between 600MHz and 3GHz. However the CPUs do support OPPs with frequencies between 300MHz and 600MHz. In order to support running the CPUs at those frequencies we end up having to lock the PLL at twice the rate and drive the CPU clk via the PLL/2 output and SMUX. So for frequencies above 600MHz we follow the following path Primary PLL --> PLL_EARLY --> PMUX(1) --> CPU clk and for frequencies between 300MHz and 600MHz we follow Primary PLL --> PLL/2 --> SMUX(1) --> PMUX(0) --> CPU clk ACD stands for Adaptive Clock Distribution and is used to detect voltage droops. Signed-off-by: Rajendra Nayak Rajendra Nayak: Initial RFC - https://lkml.org/lkml/2016/9/29/84 Signed-off-by: Ilia Lin Ilia Lin: - reworked clock registering - Added clock-tree diagram - non-builtin support - clock notifier on rate change - https://lkml.org/lkml/2018/5/24/123 Signed-off-by: Loic Poulain Loic Poulain: - fixed driver remove / clk deregistering - Removed useless memory barriers - devm usage when possible - Fixed Kconfig depends Link: https://lore.kernel.org/r/1593766185-16346-3-git-send-email-loic.poulain@linaro.org Signed-off-by: Stephen Boyd commit 2283f9e03328b2437abddf446027931631af1031 Author: Ilia Lin Date: Fri Jul 3 10:49:43 2020 +0200 dt-bindings: clk: qcom: Add bindings for CPU clock for msm8996 Each of the CPU clusters (Power and Perf) on msm8996 are clocked via 2 PLLs, a primary and alternate. There are also 2 Mux'es, a primary and secondary all connected together as shown below +-------+ XO | | +------------------>0 | | | PLL/2 | SMUX +----+ +------->1 | | | | | | | +-------+ | +-------+ | +---->0 | | | | +---------------+ | +----------->1 | CPU clk |Primary PLL +----+ PLL_EARLY | | +------> | +------+-----------+ +------>2 PMUX | +---------------+ | | | | | +------+ | +-->3 | +--^+ ACD +-----+ | +-------+ +---------------+ +------+ | |Alt PLL | | | +---------------------------+ +---------------+ PLL_EARLY The primary PLL is what drives the CPU clk, except for times when we are reprogramming the PLL itself (for rate changes) when we temporarily switch to an alternate PLL. A subsequent patch adds support to switch between primary and alternate PLL during rate changes. The primary PLL operates on a single VCO range, between 600MHz and 3GHz. However the CPUs do support OPPs with frequencies between 300MHz and 600MHz. In order to support running the CPUs at those frequencies we end up having to lock the PLL at twice the rate and drive the CPU clk via the PLL/2 output and SMUX. Signed-off-by: Ilia Lin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1593766185-16346-4-git-send-email-loic.poulain@linaro.org Signed-off-by: Stephen Boyd commit 6d0efeb14bbe2350a94ba07b403a686d731c5179 Author: Ilia Lin Date: Fri Jul 3 10:49:41 2020 +0200 soc: qcom: Separate kryo l2 accessors from PMU driver The driver provides kernel level API for other drivers to access the MSM8996 L2 cache registers. Separating the L2 access code from the PMU driver and making it public to allow other drivers use it. The accesses must be separated with a single spinlock, maintained in this driver. Signed-off-by: Ilia Lin Signed-off-by: Loic Poulain Link: https://lore.kernel.org/r/1593766185-16346-2-git-send-email-loic.poulain@linaro.org Acked-by: Will Deacon Signed-off-by: Stephen Boyd commit 11eb004ef7ead0c43586adea0340b51da095bdee Author: Kees Cook Date: Sat Jul 4 22:57:33 2020 -0700 selftests/seccomp: Check ENOSYS under tracing There should be no difference between -1 and other negative syscalls while tracing. Cc: Keno Fischer Tested-by: Will Deacon Signed-off-by: Kees Cook commit adeeec8472397001901c06aa41d1b2fd1068e222 Author: Kees Cook Date: Sat Jul 4 22:34:04 2020 -0700 selftests/seccomp: Refactor to use fixture variants Now that the selftest harness has variants, use them to eliminate a bunch of copy/paste duplication. Reviewed-by: Jakub Kicinski Tested-by: Will Deacon Signed-off-by: Kees Cook commit 9d1587adcc356c1570c9830364e7797a9c19696c Author: Kees Cook Date: Sat Jul 4 22:05:43 2020 -0700 selftests/harness: Clean up kern-doc for fixtures The FIXTURE*() macro kern-doc examples had the wrong names for the C code examples associated with them. Fix those and clarify that FIXTURE_DATA() usage should be avoided. Cc: Shuah Khan Fixes: 74bc7c97fa88 ("kselftest: add fixture variants") Acked-by: Jakub Kicinski Signed-off-by: Kees Cook commit fe4bfff86ec54773df3db79e8112e3b0f820c799 Author: Kees Cook Date: Fri Jun 19 12:20:15 2020 -0700 seccomp: Use -1 marker for end of mode 1 syscall list The terminator for the mode 1 syscalls list was a 0, but that could be a valid syscall number (e.g. x86_64 __NR_read). By luck, __NR_read was listed first and the loop construct would not test it, so there was no bug. However, this is fragile. Replace the terminator with -1 instead, and make the variable name for mode 1 syscall lists more descriptive. Cc: Andy Lutomirski Cc: Will Drewry Signed-off-by: Kees Cook commit 47e33c05f9f07cac3de833e531bcac9ae052c7ca Author: Kees Cook Date: Mon Jun 15 15:42:46 2020 -0700 seccomp: Fix ioctl number for SECCOMP_IOCTL_NOTIF_ID_VALID When SECCOMP_IOCTL_NOTIF_ID_VALID was first introduced it had the wrong direction flag set. While this isn't a big deal as nothing currently enforces these bits in the kernel, it should be defined correctly. Fix the define and provide support for the old command until it is no longer needed for backward compatibility. Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Signed-off-by: Kees Cook commit 279ed8900079831ba436007dbc5e24530f026ce2 Author: Kees Cook Date: Thu Jun 11 11:08:48 2020 -0700 selftests/seccomp: Rename user_trap_syscall() to user_notif_syscall() The user_trap_syscall() helper creates a filter with SECCOMP_RET_USER_NOTIF. To avoid confusion with SECCOMP_RET_TRAP, rename the helper to user_notif_syscall(). Cc: Andy Lutomirski Cc: Will Drewry Cc: Shuah Khan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: Andrii Nakryiko Cc: John Fastabend Cc: KP Singh Cc: linux-kselftest@vger.kernel.org Cc: netdev@vger.kernel.org Cc: bpf@vger.kernel.org Signed-off-by: Kees Cook commit cf8918dba2de7315a5878a56818a89cb899132da Author: Kees Cook Date: Thu Jun 11 11:02:21 2020 -0700 selftests/seccomp: Make kcmp() less required The seccomp tests are a bit noisy without CONFIG_CHECKPOINT_RESTORE (due to missing the kcmp() syscall). The seccomp tests are more accurate with kcmp(), but it's not strictly required. Refactor the tests to use alternatives (comparing fd numbers), and provide a central test for kcmp() so there is a single SKIP instead of many. Continue to produce warnings for the other tests, though. Additionally adds some more bad flag EINVAL tests to the addfd selftest. Cc: Andy Lutomirski Cc: Will Drewry Cc: Shuah Khan Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: Martin KaFai Lau Cc: Song Liu Cc: Yonghong Song Cc: Andrii Nakryiko Cc: John Fastabend Cc: KP Singh Cc: linux-kselftest@vger.kernel.org Cc: netdev@vger.kernel.org Cc: bpf@vger.kernel.org Signed-off-by: Kees Cook commit e68f9d49dda1744d548426c8b4335a8d693a36d0 Author: Kees Cook Date: Mon Jun 15 22:02:56 2020 -0700 seccomp: Use pr_fmt Avoid open-coding "seccomp: " prefixes for pr_*() calls. Signed-off-by: Kees Cook commit 81a0c8bc82be7c15dbf3e54832334552e6b76e2b Author: Kees Cook Date: Sat Jun 6 09:37:17 2020 -0700 selftests/seccomp: Improve calibration loop The seccomp benchmark calibration loop did not need to take so long. Instead, use a simple 1 second timeout and multiply up to target. It does not need to be accurate. Signed-off-by: Kees Cook commit bc32c9c86581abf7baacf71342df3b0affe367db Author: Thadeu Lima de Souza Cascardo Date: Mon Jun 1 12:50:12 2020 -0700 selftests/seccomp: use 90s as timeout As seccomp_benchmark tries to calibrate how many samples will take more than 5 seconds to execute, it may end up picking up a number of samples that take 10 (but up to 12) seconds. As the calibration will take double that time, it takes around 20 seconds. Then, it executes the whole thing again, and then once more, with some added overhead. So, the thing might take more than 40 seconds, which is too close to the 45s timeout. That is very dependent on the system where it's executed, so may not be observed always, but it has been observed on x86 VMs. Using a 90s timeout seems safe enough. Signed-off-by: Thadeu Lima de Souza Cascardo Link: https://lore.kernel.org/r/20200601123202.1183526-1-cascardo@canonical.com Signed-off-by: Kees Cook commit d3a37ea9f6e548388b83fe895c7a037bc2ec3f7f Author: Kees Cook Date: Mon Jun 1 12:34:44 2020 -0700 selftests/seccomp: Expand benchmark to per-filter measurements It's useful to see how much (at a minimum) each filter adds to the syscall overhead. Add additional calculations. Signed-off-by: Kees Cook commit ad5682184a811d62e56f07d25d75eeee9dffe3d9 Author: Christian Brauner Date: Sun May 31 13:50:31 2020 +0200 selftests/seccomp: Check for EPOLLHUP for user_notif This verifies we're correctly notified when a seccomp filter becomes unused when a notifier is in use. Signed-off-by: Christian Brauner Link: https://lore.kernel.org/r/20200531115031.391515-4-christian.brauner@ubuntu.com Signed-off-by: Kees Cook commit 99cdb8b9a57393b5978e7a6310a2cba511dd179b Author: Christian Brauner Date: Sun May 31 13:50:30 2020 +0200 seccomp: notify about unused filter We've been making heavy use of the seccomp notifier to intercept and handle certain syscalls for containers. This patch allows a syscall supervisor listening on a given notifier to be notified when a seccomp filter has become unused. A container is often managed by a singleton supervisor process the so-called "monitor". This monitor process has an event loop which has various event handlers registered. If the user specified a seccomp profile that included a notifier for various syscalls then we also register a seccomp notify even handler. For any container using a separate pid namespace the lifecycle of the seccomp notifier is bound to the init process of the pid namespace, i.e. when the init process exits the filter must be unused. If a new process attaches to a container we force it to assume a seccomp profile. This can either be the same seccomp profile as the container was started with or a modified one. If the attaching process makes use of the seccomp notifier we will register a new seccomp notifier handler in the monitor's event loop. However, when the attaching process exits we can't simply delete the handler since other child processes could've been created (daemons spawned etc.) that have inherited the seccomp filter and so we need to keep the seccomp notifier fd alive in the event loop. But this is problematic since we don't get a notification when the seccomp filter has become unused and so we currently never remove the seccomp notifier fd from the event loop and just keep accumulating fds in the event loop. We've had this issue for a while but it has recently become more pressing as more and larger users make use of this. To fix this, we introduce a new "users" reference counter that tracks any tasks and dependent filters making use of a filter. When a notifier is registered waiting tasks will be notified that the filter is now empty by receiving a (E)POLLHUP event. The concept in this patch introduces is the same as for signal_struct, i.e. reference counting for life-cycle management is decoupled from reference counting taks using the object. There's probably some trickery possible but the second counter is just the correct way of doing this IMHO and has precedence. Cc: Tycho Andersen Cc: Kees Cook Cc: Matt Denton Cc: Sargun Dhillon Cc: Jann Horn Cc: Chris Palmer Cc: Aleksa Sarai Cc: Robert Sesek Cc: Jeffrey Vander Stoep Cc: Linux Containers Signed-off-by: Christian Brauner Link: https://lore.kernel.org/r/20200531115031.391515-3-christian.brauner@ubuntu.com Signed-off-by: Kees Cook commit 76194c4e830d570d9e369d637bb907591d2b3111 Author: Christian Brauner Date: Mon Jun 1 11:50:07 2020 -0700 seccomp: Lift wait_queue into struct seccomp_filter Lift the wait_queue from struct notification into struct seccomp_filter. This is cleaner overall and lets us avoid having to take the notifier mutex in the future for EPOLLHUP notifications since we need to neither read nor modify the notifier specific aspects of the seccomp filter. In the exit path I'd very much like to avoid having to take the notifier mutex for each filter in the task's filter hierarchy. Cc: Tycho Andersen Cc: Kees Cook Cc: Matt Denton Cc: Sargun Dhillon Cc: Jann Horn Cc: Chris Palmer Cc: Aleksa Sarai Cc: Robert Sesek Cc: Jeffrey Vander Stoep Cc: Linux Containers Signed-off-by: Christian Brauner Signed-off-by: Kees Cook commit 3a15fb6ed92cb32b0a83f406aa4a96f28c9adbc3 Author: Christian Brauner Date: Sun May 31 13:50:29 2020 +0200 seccomp: release filter after task is fully dead The seccomp filter used to be released in free_task() which is called asynchronously via call_rcu() and assorted mechanisms. Since we need to inform tasks waiting on the seccomp notifier when a filter goes empty we will notify them as soon as a task has been marked fully dead in release_task(). To not split seccomp cleanup into two parts, move filter release out of free_task() and into release_task() after we've unhashed struct task from struct pid, exited signals, and unlinked it from the threadgroups' thread list. We'll put the empty filter notification infrastructure into it in a follow up patch. This also renames put_seccomp_filter() to seccomp_filter_release() which is a more descriptive name of what we're doing here especially once we've added the empty filter notification mechanism in there. We're also NULL-ing the task's filter tree entrypoint which seems cleaner than leaving a dangling pointer in there. Note that this shouldn't need any memory barriers since we're calling this when the task is in release_task() which means it's EXIT_DEAD. So it can't modify its seccomp filters anymore. You can also see this from the point where we're calling seccomp_filter_release(). It's after __exit_signal() and at this point, tsk->sighand will already have been NULLed which is required for thread-sync and filter installation alike. Cc: Tycho Andersen Cc: Kees Cook Cc: Matt Denton Cc: Sargun Dhillon Cc: Jann Horn Cc: Chris Palmer Cc: Aleksa Sarai Cc: Robert Sesek Cc: Jeffrey Vander Stoep Cc: Linux Containers Signed-off-by: Christian Brauner Link: https://lore.kernel.org/r/20200531115031.391515-2-christian.brauner@ubuntu.com Signed-off-by: Kees Cook commit b707ddee11d1dc4518ab7f1aa5e7af9ceaa23317 Author: Christian Brauner Date: Sun May 31 13:50:28 2020 +0200 seccomp: rename "usage" to "refs" and document Naming the lifetime counter of a seccomp filter "usage" suggests a little too strongly that its about tasks that are using this filter while it also tracks other references such as the user notifier or ptrace. This also updates the documentation to note this fact. We'll be introducing an actual usage counter in a follow-up patch. Cc: Tycho Andersen Cc: Kees Cook Cc: Matt Denton Cc: Sargun Dhillon Cc: Jann Horn Cc: Chris Palmer Cc: Aleksa Sarai Cc: Robert Sesek Cc: Jeffrey Vander Stoep Cc: Linux Containers Signed-off-by: Christian Brauner Link: https://lore.kernel.org/r/20200531115031.391515-1-christian.brauner@ubuntu.com Signed-off-by: Kees Cook commit 9f87dcf14b82b05ff0e26970439b372ae135de0c Author: Sargun Dhillon Date: Mon Jun 1 04:25:32 2020 -0700 seccomp: Add find_notification helper This adds a helper which can iterate through a seccomp_filter to find a notification matching an ID. It removes several replicated chunks of code. Signed-off-by: Sargun Dhillon Acked-by: Christian Brauner Reviewed-by: Tycho Andersen Cc: Matt Denton Cc: Kees Cook , Cc: Jann Horn , Cc: Robert Sesek , Cc: Chris Palmer Cc: Christian Brauner Cc: Tycho Andersen Link: https://lore.kernel.org/r/20200601112532.150158-1-sargun@sargun.me Signed-off-by: Kees Cook commit c818c03b661cd769e035e41673d5543ba2ebda64 Author: Kees Cook Date: Wed May 13 14:11:26 2020 -0700 seccomp: Report number of loaded filters in /proc/$pid/status A common question asked when debugging seccomp filters is "how many filters are attached to your process?" Provide a way to easily answer this question through /proc/$pid/status with a "Seccomp_filters" line. Signed-off-by: Kees Cook commit e4d05028a07f505a08802a6d1b11674c149df2b3 Author: Kees Cook Date: Fri Jul 10 10:29:41 2020 -0700 selftests/seccomp: Set NNP for TSYNC ESRCH flag test The TSYNC ESRCH flag test will fail for regular users because NNP was not set yet. Add NNP setting. Fixes: 51891498f2da ("seccomp: allow TSYNC and USER_NOTIF together") Cc: stable@vger.kernel.org Reviewed-by: Tycho Andersen Signed-off-by: Kees Cook commit d7d2e5bb9f361dc05c7dedd38d4d9269ad8c05e2 Author: Kees Cook Date: Fri Jul 10 10:26:11 2020 -0700 selftests/seccomp: Add SKIPs for failed unshare() Running the seccomp tests as a regular user shouldn't just fail tests that require CAP_SYS_ADMIN (for getting a PID namespace). Instead, detect those cases and SKIP them. Additionally, gracefully SKIP missing CONFIG_USER_NS (and add to "config" since we'd prefer to actually test this case). Signed-off-by: Kees Cook commit 8b1bc88c3c67bf95de248c35ed2855e0f4a4db90 Author: Kees Cook Date: Fri Jul 10 09:24:36 2020 -0700 selftests/seccomp: Rename XFAIL to SKIP The kselftests will be renaming XFAIL to SKIP in the test harness, and to avoid painful conflicts, rename XFAIL to SKIP now in a future-proofed way. Signed-off-by: Kees Cook commit f74367e492ba24be43ba0f440c6bac98a6f3b277 Author: Alex Deucher Date: Fri Jul 10 17:50:00 2020 -0400 drm/amdgpu/display: create fake mst encoders ahead of time (v4) Prevents a warning in the MST create connector case. v2: create global fake encoders rather per connector fake encoders to avoid running out of encoder indices. v3: use the actual number of crtcs on the asic rather than the max to conserve encoders. v4: v3 plus missing hunk I forgot to git add. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1108 Fixes: c6385e503aeaf9 ("drm/amdgpu: drop legacy drm load and unload callbacks") Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 4afaa61db9cf5250b5734c2531b226e7b3a3d691 Author: Colin Ian King Date: Fri Jul 10 09:37:58 2020 +0100 drm/amdgpu: fix spelling mistake "Falied" -> "Failed" There is a spelling mistake in a DRM_ERROR error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 7bdb089993f9e65ec826c770aa1d05469bdf8eac Author: Jack Xiao Date: Fri Jul 10 12:34:52 2020 +0800 drm/amdgpu: fix preemption unit test Remove signaled jobs from job list and ensure the job was indeed preempted. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 926ee775ba53482d2895d31caf212d234158224c Author: Jack Xiao Date: Fri Jul 10 12:18:22 2020 +0800 drm/amdgpu/gfx10: fix race condition for kiq During preemption test for gfx10, it uses kiq to trigger gfx preemption, which would result in race condition with flushing TLB for kiq. Signed-off-by: Jack Xiao Reviewed-by: Hawking Zhang Acked-by: Christian König Signed-off-by: Alex Deucher commit 2b9f78481b3e16925e2bfa6256a227e104dc2e79 Author: Nirmoy Das Date: Thu Jul 9 15:41:40 2020 +0200 drm/amdgpu: minor cleanup of phase1 suspend code Cleanup of phase1 suspend code to reduce unnecessary indentation. Signed-off-by: Nirmoy Das Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d8d3493a46f99d2fec2fce699116b9712114fb9e Author: Evan Quan Date: Tue Jun 9 17:26:39 2020 +0800 drm/amd/powerplay: put dpm frequency setting common code in smu_v11_0.c As designed the common code shared among all smu v11 ASCIs go to smu_v11_0.c. This helps to maintain clear code layers. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e5ef784b1e1736ae1e90872217b95f4529dfa422 Author: Evan Quan Date: Tue Jun 9 16:16:56 2020 +0800 drm/amd/powerplay: revise calling chain on retrieving frequency range This helps to maintain clear code layers and drop unnecessary parameter. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c98f31d17cc8a4e9484c75c24efdb50c700daf00 Author: Evan Quan Date: Tue Jun 9 14:57:06 2020 +0800 drm/amd/powerplay: revise calling chain on setting soft limit This helps to maintain clear code layers and drop unnecessary parameter. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 661b94f5acf7640fd36f807c82f06883901105ad Author: Evan Quan Date: Tue Jun 9 14:39:21 2020 +0800 drm/amd/powerplay: put setting hard limit common code in smu_v11_0.c As designed the common code shared among all smu v11 ASCIs go to smu_v11_0.c. This helps to maintain clear code layers. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b2febc9901ee4bfbcb60ac176cf0b7a4b4e44bc0 Author: Evan Quan Date: Tue Jun 9 13:32:18 2020 +0800 drm/amd/powerplay: drop unused code and wrapper around clock retrieving Clean code by dropping unnecessary ones. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e0f9e936403a4fa12a9808e84607a06695f6b21e Author: Evan Quan Date: Tue Jun 9 13:15:29 2020 +0800 drm/amd/powerplay: unshare the code for retrieving current clock frequency By moving them into asic specific file. Since they are really ASIC specific. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5e6dc8feae9710b60ede09440ffd399499b75af3 Author: Evan Quan Date: Tue Jun 9 12:54:24 2020 +0800 drm/amd/powerplay: bypass wrapper on retrieving current clock frequency By calling the target API(asic specific) directly. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9b259eae1cdbb144ae0a5e30d5b0023481541b4b Author: Evan Quan Date: Tue Jun 9 12:39:26 2020 +0800 drm/amd/powerplay: drop unnecessary wrappers around clock retrieving By calling the target APIs directly. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ec114eb464d91939ef8542370f3e37e2e1064350 Author: Likun Gao Date: Thu Jul 9 14:36:25 2020 +0800 drm/amd/powerplay: update driver if file for sienna_cichlid Update sienna_cichlid driver if header and related files. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit f21128fde4e47f82d308f3acac3bcc9af4f230b4 Author: Evan Quan Date: Fri Jul 3 16:50:33 2020 +0800 drm/amd/powerplay: correct the .get_workload_type() pointer This seemed a typo. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 64c51ea5a61a7ace40d4e904d6c5609c4a5bde7d Author: Changfeng Date: Thu Jul 9 14:52:11 2020 +0800 Revert "drm/amd/display: add mechanism to skip DCN init" To avoid s3 faild at the first cycle on renoir platform, it needs to revert this patch: drm/amd/display: add mechanism to skip DCN init Signed-off-by: changfeng Ackedy-by: Huang Rui Signed-off-by: Alex Deucher commit c7f1daa1d62b373cdcf6817e9edb94c121c9ebd9 Author: Nicholas Kazlauskas Date: Wed Jul 8 16:30:26 2020 -0400 drm/amd/display: Fix CSC remap matrix not being applied on dcn30 [Why] DCN3 has two gamut remap matrices. When using CSC adjustment the CM remap is set to bypass and MPCC remap is used. However to bypass CM some state in the context is modified and not restored correctly resulting in subsequent calls to disable MPCC remap as well. [How] Fix logic for save/restore of remap enable flag when programming MPCC remap matrix. Signed-off-by: Aric Cyr Signed-off-by: Nicholas Kazlauskas Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit c74f9322484869c10117eb068998250df3714486 Author: Nicholas Kazlauskas Date: Wed Jul 8 13:29:58 2020 -0400 drm/amd/display: Use VUPDATE_NO_LOCK instead of VUPDATE for dcn30 [Why] Soft hangs occur when FreeSync is engaged since we utilize VUPDATE (which doesn't fire when holding the pipe lock) to send back vblank events when FreeSync is active. [How] The alternative (working) interrupt source for this mechanism is VUPDATE_NO_LOCK. We already use this all other DCN revisions so align dcn30 with those as well. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 131a3c7474adce63b988f6913085aee8c6e7c313 Author: Likun Gao Date: Wed Jul 8 11:04:16 2020 +0800 drm/amdgpu: enable gpu recovery for sienna cichlid Enable gpu recovery for sienna cichlid by default to trigger gpu recovery once needed. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1cb63593d5c5b763a8a40614488c10f18a64d042 Author: Likun Gao Date: Wed Jul 8 12:56:14 2020 +0800 drm/amdgpu: remove unnecessary logic of ASIC check Remove some unused ASIC check logic. Remove some definition of amdgpu_device which only used by the removed ASIC check logic.(V2) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit cc063ea2ec7cc091639e6c95eb93e97d6e2ed6e3 Author: Marek Olšák Date: Mon Jul 6 18:23:17 2020 -0400 drm/amdgpu: don't do soft recovery if gpu_recovery=0 It's impossible to debug shader hangs with soft recovery. Signed-off-by: Marek Olšák Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a594920f8747fa032c784c3660d6cd5a8ab291f8 Author: Kuniyuki Iwashima Date: Sat Jul 11 00:57:59 2020 +0900 inet: Remove an unnecessary argument of syn_ack_recalc(). Commit 0c3d79bce48034018e840468ac5a642894a521a3 ("tcp: reduce SYN-ACK retrans for TCP_DEFER_ACCEPT") introduces syn_ack_recalc() which decides if a minisock is held and a SYN+ACK is retransmitted or not. If rskq_defer_accept is not zero in syn_ack_recalc(), max_retries always has the same value because max_retries is overwritten by rskq_defer_accept in reqsk_timer_handler(). This commit adds three changes: - remove redundant non-zero check for rskq_defer_accept in reqsk_timer_handler(). - remove max_retries from the arguments of syn_ack_recalc() and use rskq_defer_accept instead. - rename thresh to max_syn_ack_retries for readability. Signed-off-by: Kuniyuki Iwashima Reviewed-by: Benjamin Herrenschmidt CC: Julian Anastasov Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ac4cd4781eacd1fd185c85522e869bd5d3254b96 Merge: d6c7fc0c8cccf b7e93bb6b1043 Author: David S. Miller Date: Fri Jul 10 14:32:02 2020 -0700 Merge branch 'devlink-health' Moshe Shemesh says: ==================== Add devlink-health support for devlink ports Implement support for devlink health reporters on per-port basis. This patchset comes to fix a design issue as some health reporters report on errors and run recovery on device level while the actual functionality is on port level. As for the current implemented devlink health reporters it is relevant only to Tx and Rx reporters of mlx5, which has only one port, so no real effect on functionality, but this should be fixed before more drivers will use devlink health reporters. First part in the series prepares common functions parts for health reporter implementation. Second introduces required API to devlink-health and mlx5e ones demonstrate its usage and implement the feature for mlx5 driver. The per-port reporter functionality is achieved by adding a list of devlink_health_reporters to devlink_port struct in a manner similar to existing device infrastructure. This is the only major difference and it makes possible to fully reuse device reporters operations. The effect will be seen in conjunction with iproute2 additions and will affect all devlink health commands. User can distinguish between device and port reporters by looking at a devlink handle. Port reporters have a port index at the end of the address and such addresses can be provided as a parameter in every place where devlink-health accepted it. These can be obtained from devlink port show command. For example: $ devlink health show pci/0000:00:0a.0: reporter fw state healthy error 0 recover 0 auto_dump true pci/0000:00:0a.0/1: reporter tx state healthy error 0 recover 0 grace_period 500 auto_recover true auto_dump true $ devlink health set pci/0000:00:0a.0/1 reporter tx grace_period 1000 \ auto_recover false auto_dump false $ devlink health show pci/0000:00:0a.0/1 reporter tx pci/0000:00:0a.0/1: reporter tx state healthy error 0 recover 0 grace_period 1000 auto_recover flase auto_dump false Note: User can use the same devlink health uAPI commands can get now either port health reporter or device health reporter. For example, the recover command: Before this patchset: devlink health recover DEV reporter REPORTER_NAME After this patchset: devlink health recover { DEV | DEV/PORT_INDEX } reporter REPORTER_NAME Changes v1 -> v2: Fixed functions comment to match parameters list. Changes v2 -> v3: Added motivation to cover letter and note on uAPI. ==================== Signed-off-by: David S. Miller commit b7e93bb6b10434c09837fbe3fce26c6b66592bc9 Author: Vladyslav Tarasiuk Date: Fri Jul 10 15:25:13 2020 +0300 net/mlx5e: Move devlink-health rx and tx reporters to devlink port Utilize new devlink-health port reporters API to move rx and tx reporters from device to port. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 4d54d3251ea3d85f9f2b12de308ddae68fb7546a Author: Vladyslav Tarasiuk Date: Fri Jul 10 15:25:12 2020 +0300 net/mlx5e: Move devlink port register and unregister calls Register devlink ports upon NIC init. TX and RX health reporters handle errors which may occur early on at driver initialization. And because these reporters are to be moved to port context, they require devlink ports to be already registered. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 15c724b997a8fe1a677cf11797fb29c0bdecc63f Author: Vladyslav Tarasiuk Date: Fri Jul 10 15:25:11 2020 +0300 devlink: Add devlink health port reporters API In order to use new devlink port health reporters infrastructure, add corresponding constructor and destructor functions. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit f4f541660121aeb91a1b462ab3f3c5a86ab7c3dd Author: Vladyslav Tarasiuk Date: Fri Jul 10 15:25:10 2020 +0300 devlink: Implement devlink health reporters on per-port basis Add devlink-health reporter support on per-port basis. The main difference existing devlink-health is that port reporters are stored in per-devlink_port lists. Upon creation of such health reporter the reference to a port it belongs to is stored in reporter struct. Fill the port index attribute in devlink-health response to allow devlink userspace utility to distinguish between device and port reporters. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit bd8210055c36a453358d75017dce7522d950dd38 Author: Vladyslav Tarasiuk Date: Fri Jul 10 15:25:09 2020 +0300 devlink: Create generic devlink health reporter search function Add a generic __devlink_health_reporter_find_by_name() that can be used with arbitrary devlink health reporter list. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 3c5584bf0a0493e8d232ade65f4b9c5e995f3a0c Author: Vladyslav Tarasiuk Date: Fri Jul 10 15:25:08 2020 +0300 devlink: Rework devlink health reporter destructor Devlink keeps its own reference to every reporter in a list and inits refcount to 1 upon reporter's creation. Existing destructor waits to free the memory indefinitely using msleep() until all references except devlink's own are put. Rework this mechanism by moving memory free routine to a separate function, which is called when the last reporter reference is put. Besides, it allows to call __devlink_health_reporter_destroy() while locked on a reporters list mutex in symmetry to __devlink_health_reporter_create(), which is required in follow-up patch. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit c57544b3dec4480c1b455a43f18be5ec91ab3136 Author: Vladyslav Tarasiuk Date: Fri Jul 10 15:25:07 2020 +0300 devlink: Refactor devlink health reporter constructor Prepare a common routine in devlink_health_reporter_create() for usage in similar functions for devlink port health reporters. Signed-off-by: Vladyslav Tarasiuk Reviewed-by: Moshe Shemesh Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit eef8a42d6ce087d1c81c960ae0d14f955b742feb Author: Wenbo Zhang Date: Fri Jul 10 05:20:35 2020 -0400 bpf: Fix fds_example SIGSEGV error The `BPF_LOG_BUF_SIZE`'s value is `UINT32_MAX >> 8`, so define an array with it on stack caused an overflow. Signed-off-by: Wenbo Zhang Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200710092035.28919-1-ethercflow@gmail.com commit d6c7fc0c8cccf6adcc0d3995c4eba740d05832da Merge: 0ea460474d70d bbe1124944de2 Author: David S. Miller Date: Fri Jul 10 14:10:45 2020 -0700 Merge tag 'mlx5-updates-2020-07-09' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-07-09 This series provides updates to mlx5 CT (connection tracking) offloads For more information please see tag log below. Please pull and let me know if there is any problem. The following conflict is expected when net is merged into net-next: to resolve just use the hunks from net-next. <<<<<<< HEAD (net-next) mlx5_tc_ct_del_ft_entry(ct_priv, entry); kfree(entry); ======= (net) mlx5_tc_ct_entry_del_rules(ct_priv, entry); kfree(entry); >>>>>>> b1a7d5bdfe54c98eca46e2c997d4e3b1484a49af mlx5 connection tracking offloads updates: 1) Restore CT state from lookup in zone instead of tupleid On a miss, Use this zone + 5 tuple taken from the skb, to lookup the CT entry and restore it, instead of the driver allocated tuple id. This improves flow insertion rate by avoiding the allocation of a header rewrite context to maintain the tupleid. 2) Re-use modify header HW objects for identical modify actions. 3) Expand tunnel register mappings Reg_c1 is 32 bits wide. Before this patchset, 24 bit were allocated for the tuple_id, 6 bits for tunnel mapping and 2 bits for tunnel options mappings. Restoring the ct state from zone lookup instead of tuple id requires reg_c1 to store 8 bits mapping the ct zone, leaving 24 bits for tunnel mappings. Expand tunnel and tunnel options register mappings to 12 bit each. 4) Trivial cleanup and fixes. ==================== Signed-off-by: David S. Miller commit 68172f2c0b8acc5609284651f1316246f3a3a65b Author: Chris Wilson Date: Fri Jul 10 20:32:39 2020 +0100 drm/i915: Pull printing GT capabilities on error to err_print_gt We try not to assume that we captured any information, and so have to check that error->gt exists before reporting. This check was missed in err_print_capabilities, so lets break up the capability info and push it into the GT dump. We are still a long way from yamlifying this output! Reported-by: Dan Carpenter Fixes: 792592e72aba ("drm/i915: Move the engine mask to intel_gt_info") Signed-off-by: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Dan Carpenter Reviewed-by: Daniele Ceraolo Spurio Link: https://patchwork.freedesktop.org/patch/msgid/20200710193239.5419-1-chris@chris-wilson.co.uk commit e8af9e9f457bc457c67538ee488580de5fde1f17 Author: Paolo Bonzini Date: Fri Jul 10 16:51:01 2020 -0400 KVM: nSVM: remove nonsensical EXITINFO1 adjustment on nested NPF The "if" that drops the present bit from the page structure fauls makes no sense. It was added by yours truly in order to be bug-compatible with pre-existing code and in order to make the tests pass; however, the tests are wrong. The behavior after this patch matches bare metal. Reported-by: Nadav Amit Signed-off-by: Paolo Bonzini commit 3edd68399dc155b80335244c8c2673eaa652931a Author: Mohammed Gamal Date: Fri Jul 10 17:48:11 2020 +0200 KVM: x86: Add a capability for GUEST_MAXPHYADDR < HOST_MAXPHYADDR support This patch adds a new capability KVM_CAP_SMALLER_MAXPHYADDR which allows userspace to query if the underlying architecture would support GUEST_MAXPHYADDR < HOST_MAXPHYADDR and hence act accordingly (e.g. qemu can decide if it should warn for -cpu ..,phys-bits=X) The complications in this patch are due to unexpected (but documented) behaviour we see with NPF vmexit handling in AMD processor. If SVM is modified to add guest physical address checks in the NPF and guest #PF paths, we see the followning error multiple times in the 'access' test in kvm-unit-tests: test pte.p pte.36 pde.p: FAIL: pte 2000021 expected 2000001 Dump mapping: address: 0x123400000000 ------L4: 24c3027 ------L3: 24c4027 ------L2: 24c5021 ------L1: 1002000021 This is because the PTE's accessed bit is set by the CPU hardware before the NPF vmexit. This is handled completely by hardware and cannot be fixed in software. Therefore, availability of the new capability depends on a boolean variable allow_smaller_maxphyaddr which is set individually by VMX and SVM init routines. On VMX it's always set to true, on SVM it's only set to true when NPT is not enabled. CC: Tom Lendacky CC: Babu Moger Signed-off-by: Mohammed Gamal Message-Id: <20200710154811.418214-10-mgamal@redhat.com> Signed-off-by: Paolo Bonzini commit 8c4182bd27cafc2b0f94564485c89ed366c1572c Author: Paolo Bonzini Date: Fri Jul 10 17:48:10 2020 +0200 KVM: VMX: optimize #PF injection when MAXPHYADDR does not match Ignore non-present page faults, since those cannot have reserved bits set. When running access.flat with "-cpu Haswell,phys-bits=36", the number of trapped page faults goes down from 8872644 to 3978948. Signed-off-by: Paolo Bonzini Message-Id: <20200710154811.418214-9-mgamal@redhat.com> Signed-off-by: Paolo Bonzini commit 1dbf5d68af6ffdb1c8b0d38ee565768e22e2c3ab Author: Mohammed Gamal Date: Fri Jul 10 17:48:09 2020 +0200 KVM: VMX: Add guest physical address check in EPT violation and misconfig Check guest physical address against its maximum, which depends on the guest MAXPHYADDR. If the guest's physical address exceeds the maximum (i.e. has reserved bits set), inject a guest page fault with PFERR_RSVD_MASK set. This has to be done both in the EPT violation and page fault paths, as there are complications in both cases with respect to the computation of the correct error code. For EPT violations, unfortunately the only possibility is to emulate, because the access type in the exit qualification might refer to an access to a paging structure, rather than to the access performed by the program. Trapping page faults instead is needed in order to correct the error code, but the access type can be obtained from the original error code and passed to gva_to_gpa. The corrections required in the error code are subtle. For example, imagine that a PTE for a supervisor page has a reserved bit set. On a supervisor-mode access, the EPT violation path would trigger. However, on a user-mode access, the processor will not notice the reserved bit and not include PFERR_RSVD_MASK in the error code. Co-developed-by: Mohammed Gamal Signed-off-by: Paolo Bonzini Message-Id: <20200710154811.418214-8-mgamal@redhat.com> Signed-off-by: Paolo Bonzini commit a0c134347baf56d0422d3658346a546891d3a98d Author: Paolo Bonzini Date: Fri Jul 10 17:48:08 2020 +0200 KVM: VMX: introduce vmx_need_pf_intercept Signed-off-by: Paolo Bonzini Message-Id: <20200710154811.418214-7-mgamal@redhat.com> Signed-off-by: Paolo Bonzini commit 32de2b5ee378ae590c90135e4d7f5c9149a04990 Author: Paolo Bonzini Date: Fri Jul 10 17:48:07 2020 +0200 KVM: x86: update exception bitmap on CPUID changes Allow vendor code to observe changes to MAXPHYADDR and start/stop intercepting page faults. Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 0ea460474d70d809eac0640c1cf408ec54e23966 Merge: 8fb49c0109f47 fb6f8970bd9e6 Author: David S. Miller Date: Fri Jul 10 13:54:00 2020 -0700 Merge branch 'udp_tunnel-add-NIC-RX-port-offload-infrastructure' Jakub Kicinski says: ==================== udp_tunnel: add NIC RX port offload infrastructure Kernel has a facility to notify drivers about the UDP tunnel ports so that devices can recognize tunneled packets. This is important mostly for RX - devices which don't support CHECKSUM_COMPLETE can report checksums of inner packets, and compute RSS over inner headers. Some drivers also match the UDP tunnel ports also for TX, although doing so may lead to false positives and negatives. Unfortunately the user experience when trying to take adavantage of these facilities is suboptimal. First of all there is no way for users to check which ports are offloaded. Many drivers resort to printing messages to aid debugging, other use debugfs. Even worse the availability of the RX features (NETIF_F_RX_UDP_TUNNEL_PORT) is established purely on the basis of the driver having the ndos installed. For most drivers, however, the ability to perform offloads is contingent on device capabilities (driver support multiple device and firmware versions). Unless driver resorts to hackish clearing of features set incorrectly by the core - users are left guessing whether their device really supports UDP tunnel port offload or not. There is currently no way to indicate or configure whether RX features include just the checksum offload or checksum and using inner headers for RSS. Many drivers default to not using inner headers for RSS because most implementations populate the source port with entropy from the inner headers. This, however, is not always the case, for example certain switches are only able to use a fixed source port during encapsulation. We have also seen many driver authors get the intricacies of UDP tunnel port offloads wrong. Most commonly the drivers forget to perform reference counting, or take sleeping locks in the callbacks. This work tries to improve the situation by pulling the UDP tunnel port table maintenance out of the drivers. It turns out that almost all drivers maintain a fixed size table of ports (in most cases one per tunnel type), so we can take care of all the refcounting in the core, and let the driver specify if they need to sleep in the callbacks or not. The new common implementation will also support replacing ports - when a port is removed from a full table it will try to find a previously missing port to take its place. This patch only implements the core functionality along with a few drivers I was hoping to test manually [1] along with a test based on a netdevsim implementation. Following patches will convert all the drivers. Once that's complete we can remove the ndos, and rely directly on the new infrastrucutre. Then after RSS (RXFH) is converted to netlink we can add the ability to configure the use of inner RSS headers for UDP tunnels. [1] Unfortunately I wasn't able to, turns out 2 of the devices I had access to were older generation or had old FW, and they did not actually support UDP tunnel port notifications (see the second paragraph). The thrid device appears to program the UDP ports correctly but it generates bad UDP checksums with or without these patches. Long story short - I'd appreciate reviews and testing here.. v4: - better build fix (hopefully this one does it..) v3: - fix build issue; - improve bnxt changes. ==================== Signed-off-by: David S. Miller commit fb6f8970bd9e6ecce03fbe2453fe03592595ebc9 Author: Jakub Kicinski Date: Thu Jul 9 17:42:53 2020 -0700 mlx4: convert to new udp_tunnel_nic infra Convert to new infra, make use of the ability to sleep in the callback. Signed-off-by: Jakub Kicinski Acked-by: Tariq Toukan Signed-off-by: David S. Miller commit 442a35a5a7aa7277ace9a2671260dbff1a04e029 Author: Jakub Kicinski Date: Thu Jul 9 17:42:52 2020 -0700 bnxt: convert to new udp_tunnel_nic infra Convert to new infra, taking advantage of sleeping in callbacks. v2: - use bp->*_fw_dst_port_id != INVALID_HW_RING_ID as indication that the offload is active. Signed-off-by: Jakub Kicinski Reviewed-by: Michael Chan Signed-off-by: David S. Miller commit dc221851ffd1e6ebb709f85e60f93262413a488a Author: Jakub Kicinski Date: Thu Jul 9 17:42:51 2020 -0700 ixgbe: convert to new udp_tunnel_nic infra Make use of new common udp_tunnel_nic infra. ixgbe supports IPv4 only, and only single VxLAN and Geneve ports (one each). v2: - split out the RXCSUM feature handling to separate change; - declare structs separately; - use ti.type instead of assuming table 0 is VxLAN; - move setting netdev->udp_tunnel_nic_info to its own switch. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit abc0c78c0ab29afca40a549aef107b596915e312 Author: Jakub Kicinski Date: Thu Jul 9 17:42:50 2020 -0700 ixgbe: don't clear UDP tunnel ports when RXCSUM is disabled It appears the clearing of UDP tunnel ports when RXCSUM is disabled is unnecessary. Driver will not pay attention to checksum bits if RXCSUM is not set, so we can let the hardware parse the packets. Note that the UDP tunnel port NDO handlers don't pay attention to the state of RXCSUM, so the ports could had been re-programmed, anyway. This cleanup simplifies later conversion patch. v2: - break this out of the following patch. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 91f430b2c49d2d8f4445824f70a8cf7b73e1094c Author: Jakub Kicinski Date: Thu Jul 9 17:42:49 2020 -0700 selftests: net: add a test for UDP tunnel info infra Add validating the UDP tunnel infra works. $ ./udp_tunnel_nic.sh PASSED all 383 checks Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 424be63ad831fbd5fb04eb6576de44f4aa7661e2 Author: Jakub Kicinski Date: Thu Jul 9 17:42:48 2020 -0700 netdevsim: add UDP tunnel port offload support Add UDP tunnel port handlers to our fake driver so we can test the core infra. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit c7d759eb7b12f91a25f4d3cd03ff5209046ddfc2 Author: Jakub Kicinski Date: Thu Jul 9 17:42:47 2020 -0700 ethtool: add tunnel info interface Add an interface to report offloaded UDP ports via ethtool netlink. Now that core takes care of tracking which UDP tunnel ports the NICs are aware of we can quite easily export this information out to user space. The responsibility of writing the netlink dumps is split between ethtool code and udp_tunnel_nic.c - since udp_tunnel module may not always be loaded, yet we should always report the capabilities of the NIC. $ ethtool --show-tunnels eth0 Tunnel information for eth0: UDP port table 0: Size: 4 Types: vxlan No entries UDP port table 1: Size: 4 Types: geneve, vxlan-gpe Entries (1): port 1230, vxlan-gpe v4: - back to v2, build fix is now directly in udp_tunnel.h v3: - don't compile ETHTOOL_MSG_TUNNEL_INFO_GET in if CONFIG_INET not set. v2: - fix string set count, - reorder enums in the uAPI, - fix type of ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES to bitset in docs and comments. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit cc4e3835eff474aa274d6e1d18f69d9d296d3b76 Author: Jakub Kicinski Date: Thu Jul 9 17:42:46 2020 -0700 udp_tunnel: add central NIC RX port offload infrastructure Cater to devices which: (a) may want to sleep in the callbacks; (b) only have IPv4 support; (c) need all the programming to happen while the netdev is up. Drivers attach UDP tunnel offload info struct to their netdevs, where they declare how many UDP ports of various tunnel types they support. Core takes care of tracking which ports to offload. Use a fixed-size array since this matches what almost all drivers do, and avoids a complexity and uncertainty around memory allocations in an atomic context. Make sure that tunnel drivers don't try to replay the ports when new NIC netdev is registered. Automatic replays would mess up reference counting, and will be removed completely once all drivers are converted. v4: - use a #define NULL to avoid build issues with CONFIG_INET=n. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 84a4160e5a5951357947ad296932b433de3e34a0 Author: Jakub Kicinski Date: Thu Jul 9 17:42:45 2020 -0700 udp_tunnel: re-number the offload tunnel types Make it possible to use tunnel types as flags more easily. There doesn't appear to be any user using the type as an array index, so this should make no difference. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit a2b992c828f7651db369ba8f0eb0818d70232636 Author: Jakub Kicinski Date: Thu Jul 9 17:42:44 2020 -0700 debugfs: make sure we can remove u32_array files cleanly debugfs_create_u32_array() allocates a small structure to wrap the data and size information about the array. If users ever try to remove the file this leads to a leak since nothing ever frees this wrapper. That said there are no upstream users of debugfs_create_u32_array() that'd remove a u32 array file (we only have one u32 array user in CMA), so there is no real bug here. Make callers pass a wrapper they allocated. This way the lifetime management of the wrapper is on the caller, and we can avoid the potential leak in debugfs. CC: Chucheng Luo Signed-off-by: Jakub Kicinski Reviewed-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit 8a94644b440eef5a7b9c104ac8aa7a7f413e35e5 Author: Qiushi Wu Date: Wed May 27 21:13:22 2020 -0500 PCI: Fix pci_create_slot() reference count leak kobject_init_and_add() takes a reference even when it fails. If it returns an error, kobject_put() must be called to clean up the memory associated with the object. When kobject_init_and_add() fails, call kobject_put() instead of kfree(). b8eb718348b8 ("net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject") fixed a similar problem. Link: https://lore.kernel.org/r/20200528021322.1984-1-wu000273@umn.edu Signed-off-by: Qiushi Wu Signed-off-by: Bjorn Helgaas commit cbeb7d896c0f296451ffa7b67e7706786b8364c8 Author: Mark Zhang Date: Thu Jul 2 11:29:33 2020 +0300 RDMA/counter: Allow manually bind QPs with different pids to same counter In manual mode allow bind user QPs with different pids to same counter, since this is allowed in auto mode. Bind kernel QPs and user QPs to the same counter are not allowed. Fixes: 1bd8e0a9d0fd ("RDMA/counter: Allow manual mode configuration support") Link: https://lore.kernel.org/r/20200702082933.424537-4-leon@kernel.org Signed-off-by: Mark Zhang Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c9f557421e505f75da4234a6af8eff46bc08614b Author: Mark Zhang Date: Thu Jul 2 11:29:32 2020 +0300 RDMA/counter: Only bind user QPs in auto mode In auto mode only bind user QPs to a dynamic counter, since this feature is mainly used for system statistic and diagnostic purpose, while there's no need to counter kernel QPs so far. Fixes: 99fa331dc862 ("RDMA/counter: Add "auto" configuration mode support") Link: https://lore.kernel.org/r/20200702082933.424537-3-leon@kernel.org Signed-off-by: Mark Zhang Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7c97f3aded10aa86fc1944341288434117e9c926 Author: Mark Zhang Date: Thu Jul 2 11:29:31 2020 +0300 RDMA/counter: Add PID category support in auto mode With the "PID" category QPs have same PID will be bound to same counter; If this category is not set then QPs have different PIDs will be bound to same counter. This is implemented for 2 reasons: 1. The counter is a limited resource, while there may be dozens of applications, each of which creates several types of QPs, which means it may doesn't have enough counter. 2. The system administrator needs all QPs created by all applications with same type bound to one counter. The counter name and PID is only make sense when "PID" category are configured. This category can also be used in combine with others, e.g. QP type. Link: https://lore.kernel.org/r/20200702082933.424537-2-leon@kernel.org Signed-off-by: Mark Zhang Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6c72a038bf4235180550dff9ddff7392e3cff893 Author: Gal Pressman Date: Sun Jul 5 17:11:43 2020 +0300 RDMA/mlx5: Remove unused to_mibmr function The to_mibmr function is unused, remove it. Link: https://lore.kernel.org/r/20200705141143.47303-1-galpress@amazon.com Signed-off-by: Gal Pressman Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b223555dc4ed6efc321d23e78e55197cf0080ef3 Author: Ralph Campbell Date: Wed Jul 1 15:53:51 2020 -0700 nouveau/hmm: support mapping large sysmem pages Nouveau currently only supports mapping PAGE_SIZE sized pages of system memory when shared virtual memory (SVM) is enabled. Use the new hmm_pfn_to_map_order() function to support mapping system memory pages that are PMD_SIZE. Link: https://lore.kernel.org/r/20200701225352.9649-5-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit 4725c6b82a48a77d05c1943b0740eb3564785e7e Author: Ralph Campbell Date: Wed Jul 1 15:53:50 2020 -0700 nouveau: fix mapping 2MB sysmem pages The nvif_object_ioctl() method NVIF_VMM_V0_PFNMAP wasn't correctly setting the hardware specific GPU page table entries for 2MB sized pages. Fix this by adding functions to set and clear PD0 GPU page table entries. Link: https://lore.kernel.org/r/20200701225352.9649-4-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit 0cafc62e4daf7221a0ce80e0ed1b4c669d69d925 Author: Ralph Campbell Date: Wed Jul 1 15:53:48 2020 -0700 nouveau/hmm: fault one page at a time The SVM page fault handler groups faults into a range of contiguous virtual addresses and requests hmm_range_fault() to populate and return the page frame number of system memory mapped by the CPU. In preparation for supporting large pages to be mapped by the GPU, process faults one page at a time. In addition, use the hmm_range default_flags to fix a corner case where the input hmm_pfns array is not reinitialized after hmm_range_fault() returns -EBUSY and must be called again. Link: https://lore.kernel.org/r/20200701225352.9649-2-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit e478425bec930e9368c6efdc78d2e5d85eadc18e Author: Ralph Campbell Date: Wed Jul 1 15:53:52 2020 -0700 mm/hmm: add tests for hmm_pfn_to_map_order() Add a sanity test for hmm_range_fault() returning the page mapping size order. Link: https://lore.kernel.org/r/20200701225352.9649-6-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit 3b50a6e536d2d843857ffe5f923eff7be4222afe Author: Ralph Campbell Date: Wed Jul 1 15:53:49 2020 -0700 mm/hmm: provide the page mapping order in hmm_range_fault() hmm_range_fault() returns an array of page frame numbers and flags for how the pages are mapped in the requested process' page tables. The PFN can be used to get the struct page with hmm_pfn_to_page() and the page size order can be determined with compound_order(page). However, if the page is larger than order 0 (PAGE_SIZE), there is no indication that a compound page is mapped by the CPU using a larger page size. Without this information, the caller can't safely use a large device PTE to map the compound page because the CPU might be using smaller PTEs with different read/write permissions. Add a new function hmm_pfn_to_map_order() to return the mapping size order so that callers know the pages are being mapped with consistent permissions and a large device page table mapping can be used if one is available. This will allow devices to optimize mapping the page into HW by avoiding or batching work for huge pages. For instance the dma_map can be done with a high order directly. Link: https://lore.kernel.org/r/20200701225352.9649-3-rcampbell@nvidia.com Signed-off-by: Ralph Campbell Signed-off-by: Jason Gunthorpe commit 99b50be9d8ec9ef319cc7d5de07f4d405fac7764 Author: Rajat Jain Date: Tue Jul 7 15:46:03 2020 -0700 PCI: Treat "external-facing" devices themselves as internal "External-facing" devices are internal devices that expose PCIe hierarchies such as Thunderbolt outside the platform [1]. Previously these internal devices were marked as "untrusted" the same as devices downstream from them. Use the ACPI or DT information to identify external-facing devices, but only mark the devices *downstream* from them as "untrusted" [2]. The external-facing device itself is no longer marked as untrusted. [1] https://docs.microsoft.com/en-us/windows-hardware/drivers/pci/dsd-for-pcie-root-ports#identifying-externally-exposed-pcie-root-ports [2] https://lore.kernel.org/linux-pci/20200610230906.GA1528594@bjorn-Precision-5520/ Link: https://lore.kernel.org/r/20200707224604.3737893-3-rajatja@google.com Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas commit 672c6b1fe621af0e53fbb11e6feda61d336d78e1 Author: Sam Ravnborg Date: Sat Jul 4 16:35:44 2020 +0200 dt-bindings: fix simple-framebuffer example Now that dt-extract-example gained support for using root nodes in examples, update the example for the simple-frambuffer binding to use it. This gives us a better example and kill a long standing warning: simple-framebuffer.example.dts:23.16-39.11: Warning (chosen_node_is_root): /example-0/chosen: chosen node must be at root node Note: To get the update dt-extract-example execute: pip3 install git+https://github.com/devicetree-org/dt-schema.git@master --upgrade v2: - fix spelling of framebuffer (Geert) - drop stdout-path (Rob) Signed-off-by: Sam Ravnborg Reviewed-by: Rob Herring Cc: Geert Uytterhoeven Cc: Hans de Goede Cc: David Airlie Cc: Daniel Vetter Cc: Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200704143544.789345-2-sam@ravnborg.org commit bb3431747a6a4e889e0836eaf35c9f234fda54ad Author: Sam Ravnborg Date: Sat Jul 4 12:28:06 2020 +0200 dt-bindings: display: convert sharp,lq101r1sx01 to DT Schema This binding describes a panel with a secondary channel. v3: - Add reg property and unit-address to dsi nodes (Rob) v2: - add check for required properties if link2 is present (Rob) Signed-off-by: Sam Ravnborg Reviewed-by: Rob Herring Cc: Rob Herring Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200704102806.735713-4-sam@ravnborg.org commit c3823f2a4e0703a40ae2a16f06b57282ea79673c Author: Sam Ravnborg Date: Sat Jul 4 12:28:05 2020 +0200 dt-bindings: display: convert samsung,s6e8aa0 to DT Schema v2: - Add missing types (Rob) - Fix example to specify panel@0 (Rob) Signed-off-by: Sam Ravnborg Reviewed-by: Rob Herring Cc: Rob Herring Cc: Andrzej Hajda Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200704102806.735713-3-sam@ravnborg.org commit d70cf7e0fc7648498583ccfcd54e70d2b7532549 Author: Sam Ravnborg Date: Sat Jul 4 12:28:04 2020 +0200 dt-bindings: display: convert innolux,p079zca to DT Schema As the binding matches panel-simple-dsi, added the compatible to the panel-simple-dsi list. With this change enable-gpios is now optional. v2: - It is a DSI panel, add it to panel-simple-dsi (Rob) Signed-off-by: Sam Ravnborg Reviewed-by: Rob Herring Cc: Rob Herring Cc: Chris Zhong Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200704102806.735713-2-sam@ravnborg.org commit 52fbf5bdeeef415b28b8e6cdade1e48927927f60 Author: Rajat Jain Date: Tue Jul 7 15:46:02 2020 -0700 PCI: Cache ACS capability offset in device Currently the ACS capability is being looked up at a number of places. Read and store it once at enumeration so that it can be used by all later. No functional change intended. Link: https://lore.kernel.org/r/20200707224604.3737893-2-rajatja@google.com Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas commit cbe420361f92a31694fb3773a6247fda9aba1db3 Author: Rajat Jain Date: Tue Jul 7 15:46:01 2020 -0700 PCI: Reorder pci_enable_acs() and dependencies Move pci_enable_acs() and dependencies further up in the source code to avoid having to forward declare it when we make it static in near future. No functional changes intended. Link: https://lore.kernel.org/r/20200707224604.3737893-1-rajatja@google.com Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas commit 8f9fcb3488baef5a139261af8fe9e7d350bb09ca Author: Suraj Upadhyay Date: Tue Jul 7 22:07:21 2020 +0530 drm: fb-helper: Convert logging to drm_* functions. Change logging information from dev_info() to drm_info(). Signed-off-by: Suraj Upadhyay Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/0d37c7a614eb0885f0f0bed18e48a4d26b345a8e.1594136880.git.usuraj35@gmail.com commit 1040e424353f5f4d39f6f3aa8723eb3bd6ea6446 Author: Suraj Upadhyay Date: Tue Jul 7 21:58:48 2020 +0530 drm: mipi-dsi: Convert logging to drm_* functions. Convert logging errors from dev_err() to drm_err(). Signed-off-by: Suraj Upadhyay Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/feeec2816debcf4105ac22af1661fd2d491d02b9.1594136880.git.usuraj35@gmail.com commit ce1995a7e387581d46b27fe4600d96450d88ce14 Author: Alexander A. Klimov Date: Wed Jul 8 14:16:04 2020 +0200 drm/bridge: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200708121604.14292-1-grandmaster@al2klimov.de commit 0bf4f5b5d3972df7014df302b95b58b8de1a1e94 Author: Liu Ying Date: Thu Jul 9 10:02:36 2020 +0800 drm/bridge: dw-hdmi: Always add the bridge in the global bridge list It doesn't hurt to add the bridge in the global bridge list also for platform specific dw-hdmi drivers which are based on the component framework. This can be achieved by moving the drm_bridge_add() function call from dw_hdmi_probe() to __dw_hdmi_probe(). A counterpart movement for drm_bridge_remove() is also needed then. Moreover, since drm_bridge_add() initializes &bridge->hpd_mutex, this may help those platform specific dw-hdmi drivers(based on the component framework) avoid accessing the uninitialized mutex in drm_bridge_hpd_notify() which is called in dw_hdmi_irq(). Putting drm_bridge_add() in __dw_hdmi_probe() just before it returns successfully should bring no logic change for platforms based on the DRM bridge API, which is a good choice from safety point of view. Also, __dw_hdmi_probe() is renamed to dw_hdmi_probe() since dw_hdmi_probe() does nothing else but calling __dw_hdmi_probe(). Similar renaming applies to the __dw_hdmi_remove()/dw_hdmi_remove() pair. Fixes: ec971aaa6775 ("drm: bridge: dw-hdmi: Make connector creation optional") Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: Boris Brezillon Cc: Jerome Brunet Cc: Cheng-Yi Chiang Cc: Dariusz Marcinkiewicz Cc: Archit Taneja Cc: Jose Abreu Cc: Sam Ravnborg Cc: dri-devel@lists.freedesktop.org Cc: NXP Linux Team Signed-off-by: Liu Ying Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1594260156-8316-2-git-send-email-victor.liu@nxp.com commit 2ae53e79f2dec41949d7b089c0b6d7edce292d10 Author: Liu Ying Date: Thu Jul 9 10:02:35 2020 +0800 drm/bridge: dw-hdmi: Don't cleanup i2c adapter and ddc ptr in __dw_hdmi_probe() bailout path It's unnecessary to cleanup the i2c adapter and the ddc pointer in the bailout path of __dw_hdmi_probe(), since the adapter is not added and the ddc pointer is not set. Fixes: a23d6265f033 ("drm: bridge: dw-hdmi: Extract PHY interrupt setup to a function") Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: Boris Brezillon Cc: Jerome Brunet Cc: Cheng-Yi Chiang Cc: Dariusz Marcinkiewicz Cc: Archit Taneja Cc: Jose Abreu Cc: dri-devel@lists.freedesktop.org Cc: NXP Linux Team Signed-off-by: Liu Ying Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1594260156-8316-1-git-send-email-victor.liu@nxp.com commit d5baf620e5ba31bfd0205bcda15f79a0fa2021ab Author: Alexander A. Klimov Date: Wed Jul 8 15:36:38 2020 +0200 Replace HTTP links with HTTPS ones: BLUETOOTH SUBSYSTEM Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Marcel Holtmann commit 6986982fef86ae71a27d6309739a0c38b562a5c0 Author: Paolo Bonzini Date: Fri Jul 10 17:48:06 2020 +0200 KVM: x86: rename update_bp_intercept to update_exception_bitmap We would like to introduce a callback to update the #PF intercept when CPUID changes. Just reuse update_bp_intercept since VMX is already using update_exception_bitmap instead of a bespoke function. While at it, remove an unnecessary assignment in the SVM version, which is already done in the caller (kvm_arch_vcpu_ioctl_set_guest_debug) and has nothing to do with the exception bitmap. Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 92d75f77e95f2fe6c13569fea04ccdbe277ffe7b Author: Alexander A. Klimov Date: Thu Jul 9 20:47:55 2020 +0200 drm/panel: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200709184755.24798-1-grandmaster@al2klimov.de commit ec7771ab471ba6a945350353617e2e3385d0e013 Author: Mohammed Gamal Date: Fri Jul 10 17:48:05 2020 +0200 KVM: x86: mmu: Add guest physical address check in translate_gpa() Intel processors of various generations have supported 36, 39, 46 or 52 bits for physical addresses. Until IceLake introduced MAXPHYADDR==52, running on a machine with higher MAXPHYADDR than the guest more or less worked, because software that relied on reserved address bits (like KVM) generally used bit 51 as a marker and therefore the page faults where generated anyway. Unfortunately this is not true anymore if the host MAXPHYADDR is 52, and this can cause problems when migrating from a MAXPHYADDR<52 machine to one with MAXPHYADDR==52. Typically, the latter are machines that support 5-level page tables, so they can be identified easily from the LA57 CPUID bit. When that happens, the guest might have a physical address with reserved bits set, but the host won't see that and trap it. Hence, we need to check page faults' physical addresses against the guest's maximum physical memory and if it's exceeded, we need to add the PFERR_RSVD_MASK bits to the page fault error code. This patch does this for the MMU's page walks. The next patches will ensure that the correct exception and error code is produced whenever no host-reserved bits are set in page table entries. Signed-off-by: Mohammed Gamal Signed-off-by: Paolo Bonzini Message-Id: <20200710154811.418214-4-mgamal@redhat.com> Signed-off-by: Paolo Bonzini commit a3b4cbfc078d9b97b500d78f225c6b53c43ff745 Author: Gustavo A. R. Silva Date: Wed Jul 8 15:26:50 2020 -0500 Bluetooth: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Marcel Holtmann commit 710a9194610ace9db8ea9ac44677ed69602b1ad9 Author: Gustavo A. R. Silva Date: Wed Jul 8 15:25:05 2020 -0500 Bluetooth: RFCOMM: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Marcel Holtmann commit 19186c7b45c134820ea6fde3165a2cf30c1ace47 Author: Gustavo A. R. Silva Date: Wed Jul 8 15:18:23 2020 -0500 Bluetooth: core: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Marcel Holtmann commit cd313569f5817782033b179f5dd81c2b611bbd18 Author: Mohammed Gamal Date: Fri Jul 10 17:48:04 2020 +0200 KVM: x86: mmu: Move translate_gpa() to mmu.c Also no point of it being inline since it's always called through function pointers. So remove that. Signed-off-by: Mohammed Gamal Signed-off-by: Paolo Bonzini Message-Id: <20200710154811.418214-3-mgamal@redhat.com> Signed-off-by: Paolo Bonzini commit 51c19bf3d5cfaa66571e4b88ba2a6f6295311101 Author: Peilin Ye Date: Fri Jul 10 12:09:15 2020 -0400 Bluetooth: Fix slab-out-of-bounds read in hci_extended_inquiry_result_evt() Check upon `num_rsp` is insufficient. A malformed event packet with a large `num_rsp` number makes hci_extended_inquiry_result_evt() go out of bounds. Fix it. This patch fixes the following syzbot bug: https://syzkaller.appspot.com/bug?id=4bf11aa05c4ca51ce0df86e500fce486552dc8d2 Reported-by: syzbot+d8489a79b781849b9c46@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Peilin Ye Acked-by: Greg Kroah-Hartman Signed-off-by: Marcel Holtmann commit 897861479c0640ed93ec82db78f8d839df32c4ac Author: Mohammed Gamal Date: Fri Jul 10 17:48:03 2020 +0200 KVM: x86: Add helper functions for illegal GPA checking and page fault injection This patch adds two helper functions that will be used to support virtualizing MAXPHYADDR in both kvm-intel.ko and kvm.ko. kvm_fixup_and_inject_pf_error() injects a page fault for a user-specified GVA, while kvm_mmu_is_illegal_gpa() checks whether a GPA exceeds vCPU address limits. Signed-off-by: Mohammed Gamal Signed-off-by: Paolo Bonzini Message-Id: <20200710154811.418214-2-mgamal@redhat.com> Signed-off-by: Paolo Bonzini commit fe9304d31831c9ee3943f9a6f72b7cea16d4bc11 Author: Vitaly Kuznetsov Date: Fri Jul 10 16:11:57 2020 +0200 KVM: x86: drop superfluous mmu_check_root() from fast_pgd_switch() The mmu_check_root() check in fast_pgd_switch() seems to be superfluous: when GPA is outside of the visible range cached_root_available() will fail for non-direct roots (as we can't have a matching one on the list) and we don't seem to care for direct ones. Also, raising #TF immediately when a non-existent GFN is written to CR3 doesn't seem to mach architectural behavior. Drop the check. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200710141157.1640173-10-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit d82aaef9c88aa27bce63751d6d6329920b1fe8da Author: Vitaly Kuznetsov Date: Fri Jul 10 16:11:56 2020 +0200 KVM: nSVM: use nested_svm_load_cr3() on guest->host switch Make nSVM code resemble nVMX where nested_vmx_load_cr3() is used on both guest->host and host->guest transitions. Also, we can now eliminate unconditional kvm_mmu_reset_context() and speed things up. Note, nVMX has two different paths: load_vmcs12_host_state() and nested_vmx_restore_host_state() and the later is used to restore from 'partial' switch to L2, it always uses kvm_mmu_reset_context(). nSVM doesn't have this yet. Also, nested_svm_vmexit()'s return value is almost always ignored nowadays. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200710141157.1640173-9-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit a506fdd22342606d22645a6bf90a2d848e92e5d7 Author: Vitaly Kuznetsov Date: Fri Jul 10 16:11:55 2020 +0200 KVM: nSVM: implement nested_svm_load_cr3() and use it for host->guest switch Undesired triple fault gets injected to L1 guest on SVM when L2 is launched with certain CR3 values. #TF is raised by mmu_check_root() check in fast_pgd_switch() and the root cause is that when kvm_set_cr3() is called from nested_prepare_vmcb_save() with NPT enabled CR3 points to a nGPA so we can't check it with kvm_is_visible_gfn(). Using generic kvm_set_cr3() when switching to nested guest is not a great idea as we'll have to distinguish between 'real' CR3s and 'nested' CR3s to e.g. not call kvm_mmu_new_pgd() with nGPA. Following nVMX implement nested-specific nested_svm_load_cr3() doing the job. To support the change, nested_svm_load_cr3() needs to be re-ordered with nested_svm_init_mmu_context(). Note: the current implementation is sub-optimal as we always do TLB flush/MMU sync but this is still an improvement as we at least stop doing kvm_mmu_reset_context(). Fixes: 7c390d350f8b ("kvm: x86: Add fast CR3 switch code path") Signed-off-by: Vitaly Kuznetsov Message-Id: <20200710141157.1640173-8-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit bf7dea425327c5da12f540a1595f22770597e496 Author: Vitaly Kuznetsov Date: Fri Jul 10 16:11:54 2020 +0200 KVM: nSVM: move kvm_set_cr3() after nested_svm_uninit_mmu_context() kvm_mmu_new_pgd() refers to arch.mmu and at this point it still references arch.guest_mmu while arch.root_mmu is expected. Note, the change is effectively a nop: when !npt_enabled, nested_svm_uninit_mmu_context() does nothing (as we don't do nested_svm_init_mmu_context()) and with npt_enabled we don't do kvm_set_cr3(). However, it will matter when we move the call to kvm_mmu_new_pgd into nested_svm_load_cr3(). No functional change intended. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200710141157.1640173-7-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 62156f6cd15ab27cf19a97161b5f1820951a36b1 Author: Vitaly Kuznetsov Date: Fri Jul 10 16:11:53 2020 +0200 KVM: nSVM: introduce nested_svm_load_cr3()/nested_npt_enabled() As a preparatory change for implementing nSVM-specific PGD switch (following nVMX' nested_vmx_load_cr3()), introduce nested_svm_load_cr3() instead of relying on kvm_set_cr3(). No functional change intended. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200710141157.1640173-6-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 59cd9bc5b03f0bacce9506b068fec538aa9969a7 Author: Vitaly Kuznetsov Date: Fri Jul 10 16:11:52 2020 +0200 KVM: nSVM: prepare to handle errors from enter_svm_guest_mode() Some operations in enter_svm_guest_mode() may fail, e.g. currently we suppress kvm_set_cr3() return value. Prepare the code to proparate errors. No functional change intended. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200710141157.1640173-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit ebdb3dba7b900a6b280d70f08befa0b96e0f806e Author: Vitaly Kuznetsov Date: Fri Jul 10 16:11:51 2020 +0200 KVM: nSVM: reset nested_run_pending upon nested_svm_vmrun_msrpm() failure WARN_ON_ONCE(svm->nested.nested_run_pending) in nested_svm_vmexit() will fire if nested_run_pending remains '1' but it doesn't really need to, we are already failing and not going to run nested guest. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200710141157.1640173-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 8c008659aa43be97c60c1633074b8f52f9f4445c Author: Paolo Bonzini Date: Fri Jul 10 16:11:50 2020 +0200 KVM: MMU: stop dereferencing vcpu->arch.mmu to get the context for MMU init kvm_init_shadow_mmu() was actually the only function that could be called with different vcpu->arch.mmu values. Now that kvm_init_shadow_npt_mmu() is separated from kvm_init_shadow_mmu(), we always know the MMU context we need to use and there is no need to dereference vcpu->arch.mmu pointer. Based on a patch by Vitaly Kuznetsov . Signed-off-by: Paolo Bonzini Signed-off-by: Vitaly Kuznetsov Message-Id: <20200710141157.1640173-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 0f04a2ac4fe96bbf05b7ac7d3e94598db550d6b8 Author: Vitaly Kuznetsov Date: Fri Jul 10 16:11:49 2020 +0200 KVM: nSVM: split kvm_init_shadow_npt_mmu() from kvm_init_shadow_mmu() As a preparatory change for moving kvm_mmu_new_pgd() from nested_prepare_vmcb_save() to nested_svm_init_mmu_context() split kvm_init_shadow_npt_mmu() from kvm_init_shadow_mmu(). This also makes the code look more like nVMX (kvm_init_shadow_ept_mmu()). No functional change intended. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200710141157.1640173-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit d574c539c3c4d8a3f9e07c8a0785954d22a63dcb Author: Vitaly Kuznetsov Date: Fri Jul 10 17:25:59 2020 +0200 KVM: x86: move MSR_IA32_PERF_CAPABILITIES emulation to common x86 code state_test/smm_test selftests are failing on AMD with: "Unexpected result from KVM_GET_MSRS, r: 51 (failed MSR was 0x345)" MSR_IA32_PERF_CAPABILITIES is an emulated MSR on Intel but it is not known to AMD code, we can move the emulation to common x86 code. For AMD, we basically just allow the host to read and write zero to the MSR. Fixes: 27461da31089 ("KVM: x86/pmu: Support full width counting") Suggested-by: Jim Mattson Suggested-by: Paolo Bonzini Signed-off-by: Vitaly Kuznetsov Message-Id: <20200710152559.1645827-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit be8faebc2e55b2e5a335b606d11d070d53e78133 Author: Anson Huang Date: Tue Jun 16 12:26:15 2020 +0800 dt-bindings: spi: Convert imx lpspi to json-schema Convert the i.MX LPSPI binding to DT schema format using json-schema Signed-off-by: Anson Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1592281575-32708-4-git-send-email-Anson.Huang@nxp.com Signed-off-by: Mark Brown commit 790739c4417c17b2201bc742a9d5d819ea71799f Author: Anson Huang Date: Tue Jun 16 12:26:14 2020 +0800 dt-bindings: spi: Convert imx cspi to json-schema Convert the i.MX CSPI binding to DT schema format using json-schema, update compatible, remove obsolete properties "fsl,spi-num-chipselects" and update the example based on latest DT file. Signed-off-by: Anson Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1592281575-32708-3-git-send-email-Anson.Huang@nxp.com Signed-off-by: Mark Brown commit e013bf2d96528c382f232a6ee068990d63e81a3d Author: Anson Huang Date: Tue Jun 16 12:26:13 2020 +0800 dt-bindings: spi: Convert mxs spi to json-schema Convert the MXS SPI binding to DT schema format using json-schema Signed-off-by: Anson Huang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1592281575-32708-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Mark Brown commit 61c11656b67b0a30f702f240aabe81fd93e702ac Author: Zhenyu Ye Date: Fri Jul 10 17:41:58 2020 +0800 arm64: tlb: don't set the ttl value in flush_tlb_page_nosync flush_tlb_page_nosync() may be called from pmd level, so we can not set the ttl = 3 here. The callstack is as follows: pmdp_set_access_flags ptep_set_access_flags flush_tlb_fix_spurious_fault flush_tlb_page flush_tlb_page_nosync Fixes: e735b98a5fe0 ("arm64: Add tlbi_user_level TLB invalidation helper") Reported-by: Catalin Marinas Signed-off-by: Zhenyu Ye Link: https://lore.kernel.org/r/20200710094158.468-1-yezhenyu2@huawei.com Signed-off-by: Catalin Marinas commit c916d6ef53aa6cf0187d33dfab51a2917d4117b7 Author: Andy Shevchenko Date: Wed Jul 8 19:12:32 2020 +0300 regmap: Switch to use fwnode instead of OF one Make regmap firmware node type agnostic by switching it to use fwnode. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200708161232.17914-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 1c62ec5f1a0f9330c251433e6290e9441c7326b9 Merge: 3689eb0bbd527 e25f8afd8869b Author: Mark Brown Date: Fri Jul 10 16:06:46 2020 +0100 Merge series "ASoC: mediatek: mt8183: support DP audio" from Tzung-Bi Shih : This series is a follow up for a long time ago series (https://patchwork.kernel.org/cover/11204303/). The old series bound too much on the patches of DRM bridge and ASoC machine driver. And unluckily, the dependencies (https://lore.kernel.org/patchwork/patch/1126819/) have not applied. Revewing the ASoC patches in the old series, I found that they could be decoupled from the DRM bridge patches. And they are harmless as it is an optional attribute ("hdmi-codec") in DTS. This series arranges and rebases the harmless ASoC patches for mt8183-mt6358-ts3a227-max98357 and mt8183-da7219-max98357. The 1st and 4th patch add an optional DT property. The 1st patch was acked long time ago (https://patchwork.kernel.org/patch/11204321/). The 2nd and 5th patch add DAI link for using hdmi-codec. The 3rd and 6th patch support the HDMI jack reporting. Tzung-Bi Shih (6): ASoC: dt-bindings: mt8183: add a property "mediatek,hdmi-codec" ASoC: mediatek: mt8183: use hdmi-codec ASoC: mediatek: mt8183: support HDMI jack reporting ASoC: dt-bindings: mt8183-da7219: add a property "mediatek,hdmi-codec" ASoC: mediatek: mt8183-da7219: use hdmi-codec ASoC: mediatek: mt8183-da7219: support HDMI jack reporting .../bindings/sound/mt8183-da7219-max98357.txt | 4 +++ .../sound/mt8183-mt6358-ts3a227-max98357.txt | 2 ++ sound/soc/mediatek/Kconfig | 2 ++ .../mediatek/mt8183/mt8183-da7219-max98357.c | 29 +++++++++++++++++-- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 29 +++++++++++++++++-- 5 files changed, 60 insertions(+), 6 deletions(-) -- 2.27.0.383.g050319c2ae-goog commit 3689eb0bbd52774e153fd7bdc5a90dbbf8cf8996 Merge: 93ba7c8d79efa cc3cceedcb7e9 Author: Mark Brown Date: Fri Jul 10 16:06:45 2020 +0100 Merge series "ASoC: Clean-up W=1 build warnings​ - part2" from Pierre-Louis Bossart : Both Lee Jones and I submitted separate series, this is the second part of the merged result, for which no feedback was provided. I picked Lee's patches for rt5659 and ak4458 and added the pxa and ux500 that I didn't fix. The rest is largely identical between our respective series, with the exception of the sunxi which I documented and Lee removed. I don't have any specific preference and will go with the flow on this. Changes since v3: Improved commit subjects from 'fix kernel-doc' as suggested by Lee Jones. In a couple of cases I just reverted to Lee's patches when the code was identical. Added a couple of CC: tags from Lee's patches. Added Arnaud Pouliquen's Acked-by tag in first patch. Lee Jones (6): ASoC: sunxi: sun4i-spdif: Fix misspelling of 'reg_dac_txdata' in kernel-doc ASoC: pxa: pxa-ssp: Demote seemingly unintentional kerneldoc header ASoC: ux500: ux500_msp_i2s: Remove unused variables 'reg_val_DR' and 'reg_val_TSTDR' ASoC: codecs: rt5659: Remove many unused const variables ASoC: codecs: tlv320aic26: Demote seemingly unintentional kerneldoc header ASoC: codecs: ak4458: Remove set but never checked variable 'ret' Pierre-Louis Bossart (4): ASoC: sti: uniperif: fix 'defined by not used' warning ASoC: qcom: qdsp6: q6asm: Provide documentation for 'codec_profile' ASoC: sunxi: sun4i-i2s: add missing clock and format arguments in kernel-doc ASoC: codecs: rt5631: fix spurious kernel-doc start and missing arguments sound/soc/codecs/ak4458.c | 6 +++--- sound/soc/codecs/rt5631.c | 8 +++++-- sound/soc/codecs/rt5659.c | 37 --------------------------------- sound/soc/codecs/tlv320aic26.c | 2 +- sound/soc/pxa/pxa-ssp.c | 2 +- sound/soc/qcom/qdsp6/q6asm.c | 2 +- sound/soc/sti/uniperif.h | 2 +- sound/soc/sunxi/sun4i-i2s.c | 10 ++++++++- sound/soc/sunxi/sun4i-spdif.c | 2 +- sound/soc/ux500/ux500_msp_i2s.c | 8 +++---- 10 files changed, 27 insertions(+), 52 deletions(-) base-commit: 6940701c715e193282cf8b31f970b2ea6eb26341 -- 2.25.1 commit 93ba7c8d79efaa290111f1a52808f8c195820200 Merge: 984b2cadd9e1c aa3fce5cd454d Author: Mark Brown Date: Fri Jul 10 16:06:44 2020 +0100 Merge series "ASoC: fsl_spdif: Clear the validity bit for TX" from Shengjiu Wang : Clear the validity bit for TX Add kctl for configuring TX validity bit Shengjiu Wang (2): ASoC: fsl_spdif: Clear the validity bit for TX ASoC: fsl_spdif: Add kctl for configuring TX validity bit sound/soc/fsl/fsl_spdif.c | 51 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 4 deletions(-) -- 2.21.0 commit 984b2cadd9e1cb060c27b7d5c1113bcf7e30f129 Author: Hans de Goede Date: Fri Jul 3 12:38:40 2020 +0200 ASoC: Intel: cht_bsw_rt5672: Improve dai-set-fmt comment in cht_codec_fixup() As Pierre-Louis Bossart pointed out, saying that the default mode for the SSP is TDM 4 slot is not entirely accurate. There really are 2 default modes: The default mode for the SSP configuration is TDM 4 slot for the cpu-dai (hard-coded in DSP firmware), The default mode for the SSP configuration is I2S for the codec-dai (hard-coded in the 'SSP2-Codec" .dai_fmt masks, so far unused). This commit updates the comment in cht_codec_fixup() to properly reflect this. Suggested-by: Pierre-Louis Bossart Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200703103840.333732-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit e25f8afd8869bd97a4d0baea5d8da730913c8541 Author: Tzung-Bi Shih Date: Fri Jul 10 13:25:05 2020 +0800 ASoC: mediatek: mt8183-da7219: support HDMI jack reporting Supports HDMI jack reporting. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200710052505.3664118-7-tzungbi@google.com Signed-off-by: Mark Brown commit 5bdbe977117741a6bf4958c8dfdcb6b9263e9f1c Author: Tzung-Bi Shih Date: Fri Jul 10 13:25:04 2020 +0800 ASoC: mediatek: mt8183-da7219: use hdmi-codec Adds DAI link to use hdmi-codec. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200710052505.3664118-6-tzungbi@google.com Signed-off-by: Mark Brown commit 5653841d1e6bace7897a0b5ca681fa37945fa11b Author: Tzung-Bi Shih Date: Fri Jul 10 13:25:03 2020 +0800 ASoC: dt-bindings: mt8183-da7219: add a property "mediatek, hdmi-codec" Adds an optional property "mediatek,hdmi-codec". Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200710052505.3664118-5-tzungbi@google.com Signed-off-by: Mark Brown commit 88abbf627a56efcd7f24aa119f07069d3d10bd0b Author: Tzung-Bi Shih Date: Fri Jul 10 13:25:02 2020 +0800 ASoC: mediatek: mt8183: support HDMI jack reporting Supports HDMI jack reporting. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200710052505.3664118-4-tzungbi@google.com Signed-off-by: Mark Brown commit f2024dc55fcb743469238aa11f9967e0752ac600 Author: Tzung-Bi Shih Date: Fri Jul 10 13:25:01 2020 +0800 ASoC: mediatek: mt8183: use hdmi-codec Adds DAI link to use hdmi-codec. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200710052505.3664118-3-tzungbi@google.com Signed-off-by: Mark Brown commit cc07e14b149e4260075093c06b371bcb31574ccc Author: Tzung-Bi Shih Date: Fri Jul 10 13:25:00 2020 +0800 ASoC: dt-bindings: mt8183: add a property "mediatek, hdmi-codec" Adds an optional property "mediatek,hdmi-codec". Signed-off-by: Tzung-Bi Shih Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200710052505.3664118-2-tzungbi@google.com Signed-off-by: Mark Brown commit aa3fce5cd454db551a4ea1656bab9c2bacd2d1f4 Author: Shengjiu Wang Date: Tue Jul 7 16:54:26 2020 +0800 ASoC: fsl_spdif: Add kctl for configuring TX validity bit Add one kctl for configuring TX validity bit from user space. The type of this kctl is boolean: on - Outgoing validity always set off - Outgoing validity always clear Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1594112066-31297-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 055b082156704b85a059770359d6cdedfb24831d Author: Shengjiu Wang Date: Tue Jul 7 16:54:25 2020 +0800 ASoC: fsl_spdif: Clear the validity bit for TX In IEC958 spec, "The validity bit is logical "0" if the information in the main data field is reliable, and it is logical "1" if it is not". The default value of "ValCtrl" is zero, which means "Outgoing Validity always set", then all the data is not reliable, then some spdif sink device will drop the data. So set "ValCtrl" to 1, that is to clear "Outgoing Validity" in default. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1594112066-31297-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 5c3320d7fece4612d4a413aa3c8e82cdb5b49fcb Author: Andrii Nakryiko Date: Thu Jul 9 18:10:23 2020 -0700 libbpf: Fix memory leak and optimize BTF sanitization Coverity's static analysis helpfully reported a memory leak introduced by 0f0e55d8247c ("libbpf: Improve BTF sanitization handling"). While fixing it, I realized that btf__new() already creates a memory copy, so there is no need to do this. So this patch also fixes misleading btf__new() signature to make data into a `const void *` input parameter. And it avoids unnecessary memory allocation and copy in BTF sanitization code altogether. Fixes: 0f0e55d8247c ("libbpf: Improve BTF sanitization handling") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200710011023.1655008-1-andriin@fb.com commit b2295e2ecc04d189477cb08a96129ff1b3606f3a Author: Chris Wilson Date: Fri Jul 10 14:31:25 2020 +0100 drm/i915/gt: Be defensive in the face of false CS events If the HW throws a curve ball and reports either en event before it is possible, or just a completely impossible event, we have to grin and bear it. The first few events, we will likely not notice as we would be expecting some event, but as soon as we stop expecting an event and yet they still keep coming, then we enter into undefined state territory. In which case, bail out, stop processing the events, and reset the engine and our set of queued requests to recover. The sporadic hangs and warnings will continue to plague CI, but at least system stability should not be compromised. v2: Commentary and force the reset-on-error. v3: Customised user facing message for forced resets from internal errors. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2045 Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200710133125.30194-1-chris@chris-wilson.co.uk commit f512eefc9bf94e4f943c95833518bdbc80c93f0e Author: Alexander A. Klimov Date: Wed Jul 8 23:04:34 2020 +0200 iommu/omap: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200708210434.22518-1-grandmaster@al2klimov.de Signed-off-by: Joerg Roedel commit 19e55a87ad621b1ccba52ba781d29d97220154de Author: Evgeny Novikov Date: Mon Jul 6 18:53:28 2020 +0300 fbdev: sm712fb: set error code in probe If smtcfb_pci_probe() does not detect a valid chip it cleans up everything and returns 0. This can result in various bad things later. The patch sets the error code on the corresponding path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Cc: Sudip Mukherjee Cc: Teddy Wang Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200706155328.8396-1-novikov@ispras.ru commit 80a00e90dedec514686ac1eb7e7b8e60e1d9aec9 Author: Evgeny Novikov Date: Thu Jul 2 19:05:40 2020 +0300 fbdev: da8xx-fb: go to proper label on error handling paths in probe fb_probe() can successfully allocate a new frame buffer, but then fail to perform some operations with regulator. In these cases fb_probe() goes to label err_pm_runtime_disable where the frame buffer is not released. The patch makes fb_probe() to go to label err_release_fb on corresponding error handling paths. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Cc: Sekhar Nori Cc: Bartosz Golaszewski Cc: Daniel Vetter Cc: Jani Nikula Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200702160540.24546-1-novikov@ispras.ru commit 9907797a09d23182aa36479dac6f28defcfb2714 Author: Rikard Falkeborn Date: Wed Jul 1 23:02:48 2020 +0200 video: fbdev: vt8623fb: Constify static vga_regsets These are not modified so make them const to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 25509 7928 64 33501 82dd drivers/video/fbdev/vt8623fb.o After: text data bss dec hex filename 26533 6904 64 33501 82dd drivers/video/fbdev/vt8623fb.o Signed-off-by: Rikard Falkeborn Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200701210248.64893-1-rikard.falkeborn@gmail.com commit 254503a2b186caa668a188dbbd7ab0d25149c0a5 Author: Adam Ford Date: Tue Jun 30 13:26:36 2020 -0500 omapfb: dss: Fix max fclk divider for omap36xx The drm/omap driver was fixed to correct an issue where using a divider of 32 breaks the DSS despite the TRM stating 32 is a valid number. Through experimentation, it appears that 31 works, and it is consistent with the value used by the drm/omap driver. This patch fixes the divider for fbdev driver instead of the drm. Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb") Cc: #4.5+ Signed-off-by: Adam Ford Reviewed-by: Tomi Valkeinen Cc: Dave Airlie Cc: Rob Clark [b.zolnierkie: mark patch as applicable to stable 4.5+ (was 4.9+)] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200630182636.439015-1-aford173@gmail.com commit 78c2ce9bde70be5be7e3615a2ae7024ed8173087 Author: Aditya Pakki Date: Sat Jun 13 22:05:18 2020 -0500 omapfb: fix multiple reference count leaks due to pm_runtime_get_sync On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Aditya Pakki Cc: kjlu@umn.edu Cc: wu000273@umn.edu Cc: Allison Randal Cc: Thomas Gleixner Cc: Enrico Weigelt cc: "Andrew F. Davis" Cc: Tomi Valkeinen Cc: Alexios Zavras Cc: Greg Kroah-Hartman Cc: YueHaibing Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200614030528.128064-1-pakki001@umn.edu commit edcb3895a751c762a18d25c8d9846ce9759ed7e1 Author: Evgeny Novikov Date: Tue Jun 30 22:54:51 2020 +0300 video: fbdev: neofb: fix memory leak in neo_scan_monitor() neofb_probe() calls neo_scan_monitor() that can successfully allocate a memory for info->monspecs.modedb and proceed to case 0x03. There it does not free the memory and returns -1. neofb_probe() goes to label err_scan_monitor, thus, it does not free this memory through calling fb_destroy_modedb() as well. We can not go to label err_init_hw since neo_scan_monitor() can fail during memory allocation. So, the patch frees the memory directly for case 0x03. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Cc: Jani Nikula Cc: Mike Rapoport Cc: Daniel Vetter Cc: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200630195451.18675-1-novikov@ispras.ru commit e8d35898a78e34fc854ed9680bc3f9caedab08cd Author: Evgeny Novikov Date: Fri Jun 19 19:21:36 2020 +0300 video: fbdev: savage: fix memory leak on error handling path in probe savagefb_probe() calls savage_init_fb_info() that can successfully allocate memory for info->pixmap.addr but then fail when fb_alloc_cmap() fails. savagefb_probe() goes to label failed_init and does not free allocated memory. It is not valid to go to label failed_mmio since savage_init_fb_info() can fail during memory allocation as well. So, the patch free allocated memory on the error handling path in savage_init_fb_info() itself. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Cc: Antonino Daplas Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200619162136.9010-1-novikov@ispras.ru commit 17d8dcf5330a97f6e5ae01d336eb1641782043f9 Author: Gustavo A. R. Silva Date: Wed Jun 17 12:56:47 2020 -0500 fbdev/fb.h: Use struct_size() helper in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200617175647.GA26370@embeddedor commit fcf918b966622c276749503ef9872419265af6a4 Author: Gustavo A. R. Silva Date: Mon Jun 15 18:15:42 2020 -0500 fbcon: Use array3_size() helper in scr_memcpyw() Use array3_size() helper instead of the open-coded version in scr_memcpyw() and scr_memsetw(). These sorts of multiplication factors need to be wrapped in array3_size(). This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200615231542.GA20470@embeddedor commit cd7946c528fada46d37a32482b9ee3c201329c13 Author: Bartlomiej Zolnierkiewicz Date: Tue Jun 2 13:52:13 2020 +0200 video: fbdev: amifb: add FIXMEs about {put,get}_user() failures Since we lack the hardware (or proper emulator setup) for testing needed changes add FIXMEs to document the issues (so at least they are not forgotten). Cc: Al Viro Reviewed-by: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/380c0494-ed02-b2be-65b0-d385627fb894@samsung.com commit 40bf8c3ad4ad9cdb569ee01a752225699dad5e20 Author: Bartlomiej Zolnierkiewicz Date: Tue Jun 2 13:50:50 2020 +0200 video: fbdev: amifb: add FIXME about dead APUS support On 5/14/20 10:21 PM, Geert Uytterhoeven wrote: > These #ifdefs are relics from APUS (Amiga Power-Up System), which > added a PPC board. APUS support was killed off a long time ago, > when arch/ppc/ was still king, but these #ifdefs were missed, because > they didn't test for CONFIG_APUS. Add FIXME about using the C code variants (APUS ones) in the future. Reported-by: Al Viro Reported-by: Geert Uytterhoeven Reviewed-by: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/767d36ff-22ec-8136-7ebc-1d9d0d3ac98d@samsung.com commit cc3cceedcb7e92ad0a43e5a4a42e653e9d919109 Author: Lee Jones Date: Thu Jul 9 11:23:27 2020 -0500 ASoC: codecs: ak4458: Remove set but never checked variable 'ret' Looks as though the result of snd_soc_update_bits() has never been checked. Fixes the following W=1 kernel build warning(s): sound/soc/codecs/ak4458.c: In function ‘ak4458_set_dai_mute’: sound/soc/codecs/ak4458.c:408:16: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Signed-off-by: Lee Jones Signed-off-by: Pierre-Louis Bossart Cc: Kuninori Morimoto Cc: Junichi Wakasugi Cc: Mihai Serban Link: https://lore.kernel.org/r/20200709162328.259586-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c90a67458ee158ba770d656ec66abca81e23f53a Author: Lee Jones Date: Thu Jul 9 11:23:26 2020 -0500 ASoC: codecs: tlv320aic26: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the sourcefile and no descriptions are provided. Fixes the following W=1 kernel build warning(s): sound/soc/codecs/tlv320aic26.c:138: warning: Function parameter or member 'dai' not described in 'aic26_mute' sound/soc/codecs/tlv320aic26.c:138: warning: Function parameter or member 'mute' not described in 'aic26_mute' Signed-off-by: Lee Jones Signed-off-by: Pierre-Louis Bossart Cc: Kuninori Morimoto Cc: Grant Likely Link: https://lore.kernel.org/r/20200709162328.259586-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e57f0e4d4a836e37c5af7ddf1a2c3e09c7970239 Author: Lee Jones Date: Thu Jul 9 11:23:25 2020 -0500 ASoC: codecs: rt5659: Remove many unused const variables Looks as though they've never been used. Fixes the following W=1 kernel build warning(s): In file included from sound/soc/codecs/rt5659.c:25: In file included from sound/soc/codecs/rt5659.c:25: sound/soc/codecs/rt5659.c:1232:2: warning: ‘rt5659_ad_monor_asrc_enum’ defined but not used [-Wunused-const-variable=] 1232 | rt5659_ad_monor_asrc_enum, RT5659_ASRC_3, RT5659_AD_MONO_R_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1231:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1231 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1228:2: warning: ‘rt5659_ad_monol_asrc_enum’ defined but not used [-Wunused-const-variable=] 1228 | rt5659_ad_monol_asrc_enum, RT5659_ASRC_3, RT5659_AD_MONO_L_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1227:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1227 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1224:2: warning: ‘rt5659_ad_sto2_asrc_enum’ defined but not used [-Wunused-const-variable=] 1224 | rt5659_ad_sto2_asrc_enum, RT5659_ASRC_3, RT5659_AD_STO2_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1223:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1223 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1220:2: warning: ‘rt5659_ad_sto1_asrc_enum’ defined but not used [-Wunused-const-variable=] 1220 | rt5659_ad_sto1_asrc_enum, RT5659_ASRC_2, RT5659_AD_STO1_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1219:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1219 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1216:2: warning: ‘rt5659_da_monor_asrc_enum’ defined but not used [-Wunused-const-variable=] 1216 | rt5659_da_monor_asrc_enum, RT5659_ASRC_2, RT5659_DA_MONO_R_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1215:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1215 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1212:2: warning: ‘rt5659_da_monol_asrc_enum’ defined but not used [-Wunused-const-variable=] 1212 | rt5659_da_monol_asrc_enum, RT5659_ASRC_2, RT5659_DA_MONO_L_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1211:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1211 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ sound/soc/codecs/rt5659.c:1208:2: warning: ‘rt5659_da_sto_asrc_enum’ defined but not used [-Wunused-const-variable=] 1208 | rt5659_da_sto_asrc_enum, RT5659_ASRC_2, RT5659_DA_STO_T_SFT, 0x7, | ^~~~~~~~~~~~~~~~~~~~~~~ include/sound/soc.h:359:24: note: in definition of macro ‘SOC_VALUE_ENUM_DOUBLE_DECL’ 359 | const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, | ^~~~ sound/soc/codecs/rt5659.c:1207:8: note: in expansion of macro ‘SOC_VALUE_ENUM_SINGLE_DECL’ 1207 | static SOC_VALUE_ENUM_SINGLE_DECL( | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Signed-off-by: Pierre-Louis Bossart Cc: Oder Chiou Link: https://lore.kernel.org/r/20200709162328.259586-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 762a3d4313aa44a2158c95fbc6e95ec19b7add4a Author: Pierre-Louis Bossart Date: Thu Jul 9 11:23:24 2020 -0500 ASoC: codecs: rt5631: fix spurious kernel-doc start and missing arguments Fixes the following W=1 kernel build warning(s): sound/soc/codecs/rt5631.c:72: warning: Function parameter or member 'component' not described in 'rt5631_write_index' sound/soc/codecs/rt5631.c:72: warning: Function parameter or member 'reg' not described in 'rt5631_write_index' sound/soc/codecs/rt5631.c:72: warning: Function parameter or member 'value' not described in 'rt5631_write_index' sound/soc/codecs/rt5631.c:82: warning: Function parameter or member 'component' not described in 'rt5631_read_index' sound/soc/codecs/rt5631.c:82: warning: Function parameter or member 'reg' not described in 'rt5631_read_index' sound/soc/codecs/rt5631.c:367: warning: Function parameter or member 'component' not described in 'onebit_depop_power_stage' sound/soc/codecs/rt5631.c:405: warning: Function parameter or member 'component' not described in 'onebit_depop_mute_stage' sound/soc/codecs/rt5631.c:443: warning: Function parameter or member 'component' not described in 'depop_seq_power_stage' sound/soc/codecs/rt5631.c:515: warning: Function parameter or member 'component' not described in 'depop_seq_mute_stage' Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200709162328.259586-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 79b094c9dcd70123f51e4039ea9a29ebbd073edd Author: Lee Jones Date: Thu Jul 9 11:23:23 2020 -0500 ASoC: ux500: ux500_msp_i2s: Remove unused variables 'reg_val_DR' and 'reg_val_TSTDR' Looks like these have been unchecked since the driver's inception in 2012. Fixes the following W=1 kernel build warning(s): sound/soc/ux500/ux500_msp_i2s.c: In function ‘flush_fifo_rx’: sound/soc/ux500/ux500_msp_i2s.c:398:6: warning: variable ‘reg_val_DR’ set but not used [-Wunused-but-set-variable] sound/soc/ux500/ux500_msp_i2s.c: In function ‘flush_fifo_tx’: sound/soc/ux500/ux500_msp_i2s.c:415:6: warning: variable ‘reg_val_TSTDR’ set but not used [-Wunused-but-set-variable] Signed-off-by: Lee Jones Signed-off-by: Pierre-Louis Bossart Cc: zhong jiang Cc: Ola Lilja Cc: Roger Nilsson Cc: Sandeep Kaushik Link: https://lore.kernel.org/r/20200709162328.259586-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 701f4727f7bb35e9dca7e2c65f44af0608ef3d6b Author: Lee Jones Date: Thu Jul 9 11:23:22 2020 -0500 ASoC: pxa: pxa-ssp: Demote seemingly unintentional kerneldoc header This is the only use of kerneldoc in the sourcefile and full descriptions are not provided. Fixes the following W=1 kernel build warning(s): sound/soc/pxa/pxa-ssp.c:186: warning: Function parameter or member 'ssp' not described in 'pxa_ssp_set_scr' Signed-off-by: Lee Jones Signed-off-by: Pierre-Louis Bossart Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Link: https://lore.kernel.org/r/20200709162328.259586-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c7202a19cf838d2a999e554cffa552bf7f480fde Author: Lee Jones Date: Thu Jul 9 11:23:21 2020 -0500 ASoC: sunxi: sun4i-spdif: Fix misspelling of 'reg_dac_txdata' in kernel-doc Property name descriptions need to match exactly. Fixes the following W=1 kernel build warning(s): sound/soc/sunxi/sun4i-spdif.c:178: warning: Function parameter or member 'reg_dac_txdata' not described in 'sun4i_spdif_quirks' Signed-off-by: Lee Jones Signed-off-by: Pierre-Louis Bossart Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: Philipp Zabel Cc: Andrea Venturi Cc: Marcus Cooper Link: https://lore.kernel.org/r/20200709162328.259586-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 643e305e9b2c42800fe73ac0e23bd02ba87fe202 Author: Pierre-Louis Bossart Date: Thu Jul 9 11:23:20 2020 -0500 ASoC: sunxi: sun4i-i2s: add missing clock and format arguments in kernel-doc Fix W=1 warnings - missing fields in description sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'bclk_dividers' not described in 'sun4i_i2s_quirks' sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'num_bclk_dividers' not described in 'sun4i_i2s_quirks' sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'mclk_dividers' not described in 'sun4i_i2s_quirks' sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'num_mclk_dividers' not described in 'sun4i_i2s_quirks' sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'get_bclk_parent_rate' not described in 'sun4i_i2s_quirks' sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'get_sr' not described in 'sun4i_i2s_quirks' sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'get_wss' not described in 'sun4i_i2s_quirks' sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'set_chan_cfg' not described in 'sun4i_i2s_quirks' sound/soc/sunxi/sun4i-i2s.c:160: warning: Function parameter or member 'set_fmt' not described in 'sun4i_i2s_quirks' Signed-off-by: Pierre-Louis Bossart Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: Philipp Zabel Cc: Andrea Venturi Link: https://lore.kernel.org/r/20200709162328.259586-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d4633504213eff9913f722da7320e23eecd48b59 Author: Pierre-Louis Bossart Date: Thu Jul 9 11:23:19 2020 -0500 ASoC: qcom: qdsp6: q6asm: Provide documentation for 'codec_profile' Fixes the following W=1 kernel build warning(s): sound/soc/qcom/qdsp6/q6asm.c:924: warning: Function parameter or member 'codec_profile' not described in 'q6asm_open_write' Signed-off-by: Pierre-Louis Bossart Cc: Patrick Lai Cc: Banajit Goswami Cc: Srinivas Kandagatla Cc: Vinod Koul Link: https://lore.kernel.org/r/20200709162328.259586-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 97d73032a89d85437d6be354ef1cfde7dd97a24a Author: Pierre-Louis Bossart Date: Thu Jul 9 11:23:18 2020 -0500 ASoC: sti: uniperif: fix 'defined by not used' warning Fix W=1 warning. The table uni_tdm_hw is declared in a header included by multiple C file. This isn't really a good practice but for now using __maybe_unused makes the following warning go away. sound/soc/sti/sti_uniperif.c:12: sound/soc/sti/uniperif.h:1351:38: warning: ‘uni_tdm_hw’ defined but not used [-Wunused-const-variable=] 1351 | static const struct snd_pcm_hardware uni_tdm_hw = { | ^~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Acked-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200709162328.259586-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 068c86e92f3fc9df7d95a39710b40be811d861aa Author: Chao Hao Date: Fri Jul 3 12:41:27 2020 +0800 iommu/mediatek: Add mt6779 basic support 1. Start from mt6779, INVLDT_SEL move to offset=0x2c, so we add REG_MMU_INV_SEL_GEN2 definition and mt6779 uses it. 2. Add mt6779_data to support mm_iommu HW init. Signed-off-by: Chao Hao Reviewed-by: Matthias Brugger Cc: Yong Wu Link: https://lore.kernel.org/r/20200703044127.27438-11-chao.hao@mediatek.com Signed-off-by: Joerg Roedel commit 864444130eed304835b09c86a5bf2ff05bc2f4a2 Author: Chao Hao Date: Fri Jul 3 12:41:26 2020 +0800 iommu/mediatek: Modify MMU_CTRL register setting The MMU_CTRL register of MT8173 is different from other SoCs. The in_order_wr_en is bit[9] which is zero by default. Other SoCs have the vitcim_tlb_en feature mapped to bit[12]. This bit is set to one by default. We need to preserve the bit when setting F_MMU_TF_PROT_TO_PROGRAM_ADDR as otherwise the bit will be cleared and IOMMU performance will drop. Signed-off-by: Chao Hao Reviewed-by: Matthias Brugger Cc: Matthias Brugger Cc: Yong Wu Link: https://lore.kernel.org/r/20200703044127.27438-10-chao.hao@mediatek.com Signed-off-by: Joerg Roedel commit 829316b3bc897a3275a0354505fde3ccd0053936 Author: Chao Hao Date: Fri Jul 3 12:41:25 2020 +0800 iommu/mediatek: Extend protect pa alignment value Starting with mt6779, iommu needs to extend to 256 bytes from 128 bytes which can send the max number of data for memory protection pa alignment. So we can use a separate patch to modify it. Signed-off-by: Chao Hao Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20200703044127.27438-9-chao.hao@mediatek.com Signed-off-by: Joerg Roedel commit 35c1b48d27dac486835435e703749236b14dcd8f Author: Chao Hao Date: Fri Jul 3 12:41:24 2020 +0800 iommu/mediatek: Add REG_MMU_WR_LEN_CTRL register definition Some platforms(ex: mt6779) need to improve performance by setting REG_MMU_WR_LEN_CTRL register. And we can use WR_THROT_EN macro to control whether we need to set the register. If the register uses default value, iommu will send command to EMI without restriction, when the number of commands become more and more, it will drop the EMI performance. So when more than ten_commands(default value) don't be handled for EMI, iommu will stop send command to EMI for keeping EMI's performace by enabling write throttling mechanism(bit[5][21]=0) in MMU_WR_LEN_CTRL register. Signed-off-by: Chao Hao Reviewed-by: Matthias Brugger Cc: Matthias Brugger Link: https://lore.kernel.org/r/20200703044127.27438-8-chao.hao@mediatek.com Signed-off-by: Joerg Roedel commit 37276e00da7d3a0d643d325aef81b7283fe23010 Author: Chao Hao Date: Fri Jul 3 12:41:23 2020 +0800 iommu/mediatek: Add sub_comm id in translation fault The max larb number that a iommu HW support is 8(larb0~larb7 in the below diagram). If the larb's number is over 8, we use a sub_common for merging several larbs into one larb. At this case, we will extend larb_id: bit[11:9] means common-id; bit[8:7] means subcommon-id; >From these two variables, we could get the real larb number when translation fault happen. The diagram is as below: EMI | IOMMU | ----------------- | | common1 common0 | | ----------------- | smi common | ------------------------------------ | | | | | | 3'd0 3'd1 3'd2 3'd3 ... 3'd7 <-common_id(max is 8) | | | | | | Larb0 Larb1 | Larb3 ... Larb7 | smi sub common | -------------------------- | | | | 2'd0 2'd1 2'd2 2'd3 <-sub_common_id(max is 4) | | | | Larb8 Larb9 Larb10 Larb11 In this patch we extend larb_remap[] to larb_remap[8][4] for this. larb_remap[x][y]: x means common-id above, y means subcommon_id above. We can also distinguish if the M4U HW has sub_common by HAS_SUB_COMM macro. Signed-off-by: Chao Hao Reviewed-by: Yong Wu Reviewed-by: Matthias Brugger Cc: Matthias Brugger Link: https://lore.kernel.org/r/20200703044127.27438-7-chao.hao@mediatek.com Signed-off-by: Joerg Roedel commit b053bc7183c86dc52e68e9891d269992e79a5251 Author: Chao Hao Date: Fri Jul 3 12:41:22 2020 +0800 iommu/mediatek: Move inv_sel_reg into the plat_data For mt6779, MMU_INV_SEL register's offset is changed from 0x38 to 0x2c, so we can put inv_sel_reg in the plat_data to use it. In addition, we renamed it to REG_MMU_INV_SEL_GEN1 and use it before mt6779. Signed-off-by: Chao Hao Reviewed-by: Matthias Brugger Cc: Yong Wu Link: https://lore.kernel.org/r/20200703044127.27438-6-chao.hao@mediatek.com Signed-off-by: Joerg Roedel commit 4bb2bf4c6ad36d5aef9fc7ecd01e89ae4f8d7ec7 Author: Chao Hao Date: Fri Jul 3 12:41:21 2020 +0800 iommu/mediatek: Setting MISC_CTRL register Add F_MMU_IN_ORDER_WR_EN_MASK and F_MMU_STANDARD_AXI_MODE_EN_MASK definitions in MISC_CTRL register. F_MMU_STANDARD_AXI_MODE_EN_MASK: If we set F_MMU_STANDARD_AXI_MODE_EN_MASK (bit[3][19] = 0, not follow standard AXI protocol), the iommu will priorize sending of urgent read command over a normal read command. This improves the performance. F_MMU_IN_ORDER_WR_EN_MASK: If we set F_MMU_IN_ORDER_WR_EN_MASK (bit[1][17] = 0, out-of-order write), the iommu will re-order write commands and send the write commands with higher priority. Otherwise the sending of write commands will be done in order. The feature is controlled by OUT_ORDER_WR_EN platform data flag. Suggested-by: Yong Wu Signed-off-by: Chao Hao Reviewed-by: Matthias Brugger Cc: Matthias Brugger Link: https://lore.kernel.org/r/20200703044127.27438-5-chao.hao@mediatek.com Signed-off-by: Joerg Roedel commit 6b717796227ec8d4303adcdc574165d06e499f0f Author: Chao Hao Date: Fri Jul 3 12:41:20 2020 +0800 iommu/mediatek: Use a u32 flags to describe different HW features Given the fact that we are adding more and more plat_data bool values, it would make sense to use a u32 flags register and add the appropriate macro definitions to set and check for a flag present. No functional change. Suggested-by: Matthias Brugger Signed-off-by: Chao Hao Reviewed-by: Matthias Brugger Cc: Yong Wu Link: https://lore.kernel.org/r/20200703044127.27438-4-chao.hao@mediatek.com Signed-off-by: Joerg Roedel commit 75eed350877c4cdae2bd9e8410c66292143bd410 Author: Chao Hao Date: Fri Jul 3 12:41:19 2020 +0800 iommu/mediatek: Rename the register STANDARD_AXI_MODE(0x48) to MISC_CTRL For iommu offset=0x48 register, only the previous mt8173/mt8183 use the name STANDARD_AXI_MODE, all the latest SoC extend the register more feature by different bits, for example: axi_mode, in_order_en, coherent_en and so on. So rename REG_MMU_MISC_CTRL may be more proper. This patch only rename the register name, no functional change. Signed-off-by: Chao Hao Reviewed-by: Yong Wu Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20200703044127.27438-3-chao.hao@mediatek.com Signed-off-by: Joerg Roedel commit 349b00c9c0a052af6720552919c9812dad9013e7 Author: Chao Hao Date: Fri Jul 3 12:41:18 2020 +0800 dt-bindings: mediatek: Add bindings for MT6779 This patch adds description for MT6779 IOMMU. MT6779 has two iommus, they are mm_iommu and apu_iommu which both use ARM Short-Descriptor translation format. In addition, mm_iommu and apu_iommu are two independent HW instance , we need to set them separately. The MT6779 IOMMU hardware diagram is as below, it is only a brief diagram about iommu, it don't focus on the part of smi_larb, so I don't describe the smi_larb detailedly. EMI | -------------------------------------- | | MM_IOMMU APU_IOMMU | | SMI_COMMOM----------- APU_BUS | | | SMI_LARB(0~11) | | | | | | | -------------- | | | | | Multimedia engine CCU VPU MDLA EMDA All the connections are hardware fixed, software can not adjust it. Signed-off-by: Chao Hao Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200703044127.27438-2-chao.hao@mediatek.com Signed-off-by: Joerg Roedel commit 80ee071b18660c56d3f7a7ab67793b78a96baae5 Merge: 482c6b614a475 3913f4f3a65ca Author: Jens Axboe Date: Fri Jul 10 08:01:08 2020 -0600 Merge branch 'nvme-5.9' of git://git.infradead.org/nvme into for-5.9/drivers Pull NVMe updates from Christoph: "Below is the current large chunk we have in the nvme tree for 5.9: - ZNS support (Aravind, Keith, Matias, Niklas) - misc cleanups and optimizations (Baolin, Chaitanya, David, Dongli, Max, Sagi)" * 'nvme-5.9' of git://git.infradead.org/nvme: (28 commits) nvme: remove ns->disk checks nvme-pci: use standard block status symbolic names nvme-pci: use the consistent return type of nvme_pci_iod_alloc_size() nvme-pci: add a blank line after declarations nvme-pci: fix some comments issues nvme-pci: remove redundant segment validation nvme: document quirked Intel models nvme: expose reconnect_delay and ctrl_loss_tmo via sysfs nvme: support for zoned namespaces nvme: support for multiple Command Sets Supported and Effects log pages nvme: implement multiple I/O Command Set support null_blk: introduce zone capacity for zoned device block: add capacity field to zone descriptors nvme: use USEC_PER_SEC instead of magic numbers nvmet-tcp: simplify nvmet_process_resp_list nvme-tcp: optimize network stack with setting msg flags according to batch size nvme-tcp: leverage request plugging nvme-tcp: have queue prod/cons send list become a llist nvme-fcloop: verify wwnn and wwpn format nvmet: use unsigned type for u64 ... commit 87890092ee6504a49841d854ff81a71a85c19a5d Author: Baolin Wang Date: Sat Jul 4 15:28:21 2020 +0800 blk-mq: remove redundant validation in __blk_mq_end_request() We've already validated the 'q->elevator' before calling ->ops.completed_request() in blk_mq_sched_completed_request(), thus no need to validate rq->internal_tag again. Rmove it. Signed-off-by: Baolin Wang Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit 106e71c51287b9bdf9d400cac657a9af7f0f1e3d Author: Baolin Wang Date: Sat Jul 4 15:26:14 2020 +0800 blk-mq: Remove unnecessary local variable Remove unnecessary local variable 'ret' in blk_mq_dispatch_hctx_list(). Signed-off-by: Baolin Wang Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit cd894e274b74b33f417776e3ab6adec237558337 Author: Enric Balletbo i Serra Date: Thu Jun 25 12:17:57 2020 +0200 arm64: dts: mt8183: Add krane-sku176 board Also known as the Lenovo IdeaPad Duet Chromebook. There are different krane boards with shared resources, hence a mt8183-kukui-krane.dtsi was created for easily introduce future new boards. The same happens with the baseboard codenamed kukui where different variants, apart from kukui variant can take advantage of the shared resources. Signed-off-by: Ben Ho [originally created by Ben Ho but adapted and ported to mainline] Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20200625101757.101775-8-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 6b3bfa37a90a373baf01ebb97ff4200f4d56d886 Author: Enric Balletbo i Serra Date: Thu Jun 25 12:17:56 2020 +0200 arm64: dts: mt8183: Add USB3.0 support Add the USB3.0 phyter and controller for the MediaTek's MT8183 SoC. Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20200625101757.101775-7-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 4b1b8fd88ceab5b0efa9eb53cd6e5fc5457488a9 Author: Enric Balletbo i Serra Date: Thu Jun 25 12:17:55 2020 +0200 arm64: dts: mt8183-evb: Fix unit name warnings Remove the unit address from the DT nodes that doesn't have a reg property. This fixes the following unit name warnings: Warning (unit_address_vs_reg): /soc/pinctrl@10005000/mmc0@0: node has a unit name, but no reg or ranges property Warning (unit_address_vs_reg): /soc/pinctrl@10005000/mmc1@0: node has a unit name, but no reg or ranges property Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20200625101757.101775-6-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 2a7abd3efbe317d7dd0878a77038f9b5f2b5f866 Author: Enric Balletbo i Serra Date: Thu Jun 25 12:17:54 2020 +0200 arm64: dts: mt8183: Fix unit name warnings Remove the unit address from the DT nodes that doesn't have a reg property. This fixes the following unit name warnings: Warning (unit_address_vs_reg): /cpus/idle-states/cluster-sleep@0: node has a unit name, but no reg or ranges property Warning (unit_address_vs_reg): /cpus/idle-states/cluster-sleep@1: node has a unit name, but no reg or ranges property Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20200625101757.101775-5-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 72704ac62334bd8ac93214d5304c170d0976413e Author: Enric Balletbo i Serra Date: Thu Jun 25 12:17:53 2020 +0200 arm64: dts: mt8183: Add MediaTek's peripheral configuration controller The MediaTek's peripheral configuration controller is present on the MT8183 SoC. Add the node for that controller. Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20200625101757.101775-4-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 64c9f12e45ea44ea957b1bccdcf8aeef127fbe49 Author: Enric Balletbo i Serra Date: Thu Jun 25 12:17:52 2020 +0200 arm64: dts: mt6358: Add the compatible for the regulators The regulators are expected to be instantiated with matching the device-tree compatible, so add the proper compatible name under the regulators node. Signed-off-by: Enric Balletbo i Serra Tested-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20200625101757.101775-3-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit be212b0043ba38eb646f2a16987fdff389f4d2cc Author: Enric Balletbo i Serra Date: Thu Jun 25 12:17:51 2020 +0200 dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-krane-sku176 The krane-sku176 is the Lenovo IdeaPad Duet Chromebook. A 2-in-1 detachable device using the MediaTek MT8183 SoC. Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200625101757.101775-2-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 79c528e9447a89522506232f8dc20602be92f280 Author: Hsin-Yi Wang Date: Mon Jul 6 16:37:05 2020 +0800 arm64: dts: mt8173: Re-measure capacity-dmips-mhz Re measure capacity-dmips-mhz on elm and hana: cpu 1: 9502 DMIPS @ 1703 Mhz cpu 3: 16250 DMIPS @ 2106 Mhz ==> 740 : 1024 Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20200706083705.2343150-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit da6d647598a6d182eb6a0344a7b14ae005244399 Author: Saravana Kannan Date: Thu May 21 12:18:00 2020 -0700 driver core: Add waiting_for_supplier sysfs file for devices This would be useful to check if a device is not probing because it's waiting for a supplier to be added and then linked to before it can probe. To reduce sysfs clutter, this file is added only if it can ever be 1. So, if fw_devlink is disabled or set to permissive, this file is not added. Also, this file is removed once the device probes as it's no longer relevant. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200521191800.136035-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 8fd456ec0cf03875908d6b67c1cd20cf0a7b4474 Author: Saravana Kannan Date: Thu May 21 12:17:59 2020 -0700 driver core: Add state_synced sysfs file for devices that support it This can be used to check if a device supports sync_state() callbacks and therefore keeps resources left on by the bootloader enabled till all its consumers have probed. This can also be used to check if sync_state() has been called for a device or whether it is still trying to keep resources enabled because they were left enabled by the bootloader and all its consumers haven't probed yet. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200521191800.136035-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 287905e68dd29873bcb7986a8290cd1e4cfde600 Author: Saravana Kannan Date: Thu May 21 12:17:58 2020 -0700 driver core: Expose device link details in sysfs It's helpful to be able to look at device link details from sysfs. So, expose it in sysfs. Say device-A is supplier of device-B. These are the additional files this patch would create: /sys/class/devlink/device-A:device-B/ auto_remove_on consumer/ -> .../device-B/ runtime_pm status supplier/ -> .../device-A/ sync_state_only /sys/devices/.../device-A/ consumer:device-B/ -> /sys/class/devlink/device-A:device-B/ /sys/devices/.../device-B/ supplier:device-A/ -> /sys/class/devlink/device-A:device-B/ That way: To get a list of all the device link in the system: ls /sys/class/devlink/ To get the consumer names and links of a device: ls -d /sys/devices/.../device-X/consumer:* To get the supplier names and links of a device: ls -d /sys/devices/.../device-X/supplier:* Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200521191800.136035-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit fe940d7362e6d7a5e5086581d0462e00ba766992 Author: Lukas Wunner Date: Wed Jul 8 14:12:22 2020 +0200 driver core: Drop mention of obsolete bus rwsem from kernel-doc 15 years ago, commit 6eded061b126 ("Fix up bus code and remove use of rwsem") removed the bus rwsem, but left over a reference to it in a kernel-doc comment. Drop it. Signed-off-by: Lukas Wunner Link: https://lore.kernel.org/r/b1af31b0e351bcbc056fe1ec44500737a7998d43.1594210157.git.lukas@wunner.de Signed-off-by: Greg Kroah-Hartman commit 6589c93f99894e007a1260f009018effc958ab69 Author: Sven Schnelle Date: Wed Jul 8 11:21:25 2020 +0200 s390: add trace events for idle enter/exit Helpful for debugging. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 7b7735c5be473473d7a4b9e31460ed8e129dcb36 Author: Christian Borntraeger Date: Tue Jul 7 14:07:53 2020 +0200 s390: fix comment regarding interrupts in svc With the removal of the critical section cleanup, we now enter the svc interrupt handler with interrupts disabled. Fixes: 0b0ed657fe00 ("s390: remove critical section cleanup from entry.S") Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens commit c8337c47deb9338417c61e7a6ba7de690eb1d300 Author: Harald Freudenberger Date: Wed Jul 1 12:40:39 2020 +0200 s390/ap: rework crypto config info and default domain code Rework of the QCI crypto info and how it is used. This is only a internal rework but does not affect the way how the ap bus acts with ap card and queue devices and domain handling. Tested on z15, z14, z12 (QCI support) and z196 (no QCI support). Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit fa49066fc326b78e7141d68387179f8968e0e1f0 Author: David Hildenbrand Date: Wed Jul 1 16:18:30 2020 +0200 s390/mm: don't set ARCH_KEEP_MEMBLOCK Commit 50be63450728 ("s390/mm: Convert bootmem to memblock") mentions "The original bootmem allocator is getting replaced by memblock. To cover the needs of the s390 kdump implementation the physical memory list is used." As we can now reference "physmem" managed in the memblock allocator after init even without ARCH_KEEP_MEMBLOCK, and s390x does no longer need other memblock metadata after boot (esp., the zcore memmap device that used it got removed), we can stop setting ARCH_KEEP_MEMBLOCK. With this change, we no longer create memblocks for standby/hotplugged memory (added via add_memory()) and free up memblock metadata (except physmem) after boot. Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Philipp Rudo Cc: Mike Rapoport Cc: Andrew Morton Signed-off-by: David Hildenbrand Message-Id: <20200701141830.18749-3-david@redhat.com> Signed-off-by: Heiko Carstens commit 776499058167d9f41c8eb468e21fe2d241c0b8e6 Author: David Hildenbrand Date: Wed Jul 1 16:18:29 2020 +0200 mm/memblock: expose only miminal interface to add/walk physmem "physmem" in the memblock allocator is somewhat weird: it's not actually used for allocation, it's simply information collected during boot, which describes the unmodified physical memory map at boot time, without any standby/hotplugged memory. It's only used on s390 and is currently the only reason s390 keeps using CONFIG_ARCH_KEEP_MEMBLOCK. Physmem isn't numa aware and current users don't specify any flags. Let's hide it from the user, exposing only for_each_physmem(), and simplify. The interface for physmem is now really minimalistic: - memblock_physmem_add() to add ranges - for_each_physmem() / __next_physmem_range() to walk physmem ranges Don't place it into an __init section and don't discard it without CONFIG_ARCH_KEEP_MEMBLOCK. As we're reusing __next_mem_range(), remove the __meminit notifier to avoid section mismatch warnings once CONFIG_ARCH_KEEP_MEMBLOCK is no longer used with CONFIG_HAVE_MEMBLOCK_PHYS_MAP. While fixing up the documentation, sneak in some related cleanups. We can stop setting CONFIG_ARCH_KEEP_MEMBLOCK for s390 next. Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Mike Rapoport Cc: Andrew Morton Signed-off-by: David Hildenbrand Reviewed-by: Mike Rapoport Message-Id: <20200701141830.18749-2-david@redhat.com> Signed-off-by: Heiko Carstens commit c80a67bd5d13e691f730115615885736acc5f1a7 Author: Xu Wang Date: Thu Jul 9 05:40:33 2020 +0000 debugfs: file: Remove unnecessary cast in kfree() Remove unnecassary casts in the argument to kfree. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20200709054033.30148-1-vulab@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman commit 849a9366cba92cb5dc9dc1161ef49416a290aae9 Author: Ricky Wu Date: Mon Jul 6 15:02:59 2020 +0800 misc: rtsx: Add support new chip rts5228 mmc: rtsx: Add support MMC_CAP2_NO_MMC In order to support new chip rts5228, the definitions of some internal registers and workflow have to be modified. Added rts5228.c rts5228.h for independent functions of the new chip rts5228 Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20200706070259.32565-1-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit f31a03b123b1f849bc0f60493edb95342f2c8e9a Author: Randy Dunlap Date: Fri Jul 3 20:45:02 2020 -0700 Documentation/driver-api: xillybus: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Acked-by: Eli Billauer Link: https://lore.kernel.org/r/20200704034502.17199-18-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 1682986df00ce3577f4ba45d0241228ea724da04 Author: Randy Dunlap Date: Fri Jul 3 20:44:59 2020 -0700 Documentation/driver-api: uio-howto: drop doubled word Drop the doubled word "you". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200704034502.17199-15-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 726b5bd3cf9705f1beea872c093ecdcc2376d477 Author: Randy Dunlap Date: Fri Jul 3 20:44:50 2020 -0700 Documentation/driver-api: firmware/request_firmware: drop doubled word Drop the doubled word "call". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/20200704034502.17199-6-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit e2e4e8f5ac69ab8b50c00243172d79ee67aa6b69 Author: Randy Dunlap Date: Fri Jul 3 20:44:49 2020 -0700 Documentation/driver-api: firmware/direct-fs-lookup: drop doubled word Drop the doubled word "firmware". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/20200704034502.17199-5-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 20b33f84f94dc435c62844b6fb3a1990da97e428 Author: Randy Dunlap Date: Fri Jul 3 20:44:48 2020 -0700 Documentation/driver-api: firmware/firmware_cache: drop doubled word Drop the doubled word "if". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/20200704034502.17199-4-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit c7d4a0b7114c5eeb7aba7df91d4ab5ed91adea25 Author: Randy Dunlap Date: Fri Jul 3 20:44:47 2020 -0700 Documentation/driver-api: firmware/built-in-fw: drop doubled word Drop the doubled word "for". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/20200704034502.17199-3-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 47681a4c0d8f47ccee6ce3ff10bd08e65c369e84 Author: Suren Baghdasaryan Date: Wed Jul 8 16:12:53 2020 -0700 MAINTAINERS: add Hridya and myself into Android driver maintainers list Add new maintainers for ashmem driver to handle related issues. Signed-off-by: Suren Baghdasaryan Acked-by: Todd Kjos Link: https://lore.kernel.org/r/20200708231253.3831497-1-surenb@google.com Signed-off-by: Greg Kroah-Hartman commit 703275a867ca7674fa65b7dcebb0edfe43acf0a8 Author: Michael S. Tsirkin Date: Fri Jul 10 07:34:49 2020 -0400 vop: sparse warning fixup vop_dc_to_vdev dropped an __iomem tag on its argument, causing a sparse warning. Fix it up. Signed-off-by: Michael S. Tsirkin Link: https://lore.kernel.org/r/20200710113447.427927-1-mst@redhat.com Signed-off-by: Greg Kroah-Hartman commit a9f91cebbeb8ea1355e852cce6d40efbcddbfe2b Author: Lee Jones Date: Wed Jul 8 13:57:09 2020 +0100 misc: vmw_vmci_defs: Mark 'struct vmci_handle VMCI_ANON_SRC_HANDLE' as __maybe_unused vmw_vmci_defs.h is included by multiple source files. Some of which do not make use of 'struct vmci_handle VMCI_ANON_SRC_HANDLE' rendering it unused. Ensure the compiler knows that this is in fact intentional by marking it as __maybe_unused. This fixes the following W=1 warnings: In file included from drivers/misc/vmw_vmci/vmci_context.c:8: include/linux/vmw_vmci_defs.h:162:33: warning: ‘VMCI_ANON_SRC_HANDLE’ defined but not used [-Wunused-const-variable=] 162 | static const struct vmci_handle VMCI_ANON_SRC_HANDLE = { | ^~~~~~~~~~~~~~~~~~~~ In file included from drivers/misc/vmw_vmci/vmci_datagram.c:8: include/linux/vmw_vmci_defs.h:162:33: warning: ‘VMCI_ANON_SRC_HANDLE’ defined but not used [-Wunused-const-variable=] 162 | static const struct vmci_handle VMCI_ANON_SRC_HANDLE = { | ^~~~~~~~~~~~~~~~~~~~ Cc: George Zhang Signed-off-by: Lee Jones Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200708125711.3443569-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 017d740e9e906e6c61619d6be661b4e2be942121 Author: Lee Jones Date: Thu Jul 9 07:56:51 2020 +0100 misc: cxl: flash: Remove unused variable 'drc_index' Keeping the pointer increment though. Fixes the following W=1 kernel build warning: drivers/misc/cxl/flash.c: In function ‘update_devicetree’: drivers/misc/cxl/flash.c:178:16: warning: variable ‘drc_index’ set but not used [-Wunused-but-set-variable] 178 | __be32 *data, drc_index, phandle; | ^~~~~~~~~ Cc: Frederic Barrat Cc: Andrew Donnellan Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Acked-by: Andrew Donnellan Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200709065651.GY3500@dell Signed-off-by: Greg Kroah-Hartman commit 97215a7df4351fdd9141418568be872fb1032d6e Author: Robin Murphy Date: Fri Jul 3 17:03:20 2020 +0100 iommu/renesas: Expand COMPILE_TEST coverage This driver shouldn't need anything architecture-specific (that isn't under CONFIG_ARM protection already), and has already been accessible from certain x86 configurations by virtue of the previously-cleaned-up "ARM || IOMMU_DMA" dependency. Allow COMPILE_TEST for all architectures. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/1fe2006aa98f008a2e689adba6e8c96e9197f903.1593791968.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit b4ceb4a5359ed1c9ba4a20acf3a70d4bbead3248 Author: Robin Murphy Date: Fri Jul 3 17:03:19 2020 +0100 iommu: Tidy up Kconfig for SoC IOMMUs Wacky COMPILE_TEST dependencies based on who used to define dev_archdata.iommu can go. Dependencies on ARM or ARM64 already implied by the ARCH_* platform selection can go. The entire IOMMU_SUPPORT menu already depends on MMU, so those can go. IOMMU_DMA is for the architecture's DMA API implementation to choose, and its interface to IOMMU drivers is properly stubbed out if disabled, so dependencies on or selections of that can go (AMD_IOMMU is the current exception since the x86 drivers have to provide their own entire dma_map_ops implementation). Since commit ed6ccf10f24b ("dma-mapping: properly stub out the DMA API for !CONFIG_HAS_DMA"), drivers which simply use the dma-mapping API should not need to depend on HAS_DMA, so those can go. And a long-dead option for code removed from the MSM driver 4 years ago can also go. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/7fb9c74dc6bd12a4619ca44c92408e91352f1be0.1593791968.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 8965930c0b55bca1e49addd677bb3b2e8231f979 Author: Lee Jones Date: Wed Jul 1 10:36:16 2020 +0100 misc: eeprom: at24: Tell the compiler that ACPI functions may not be used ... as is the case when !CONFIG_ACPI. Fixes the following W=1 kernel build warning: drivers/misc/eeprom/at24.c:228:36: warning: ‘at24_acpi_ids’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200701093616.GX1179328@dell Signed-off-by: Greg Kroah-Hartman commit 7ca78630a1ae082e6d4488884cd771ee4bb266ea Author: Colin Ian King Date: Thu Jun 11 16:27:08 2020 +0100 char/mwave: remove redundant initialization of variable bRC The variable bRC is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200611152708.927344-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 877589350269e188cc19563745fd0f6dac14561b Author: Colin Ian King Date: Thu Jun 11 16:31:08 2020 +0100 ttyprintk: remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200611153108.927614-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 04aaca197f16aff608e19ee98b1e55f535d746be Author: Masahiro Yamada Date: Wed Jun 17 17:33:13 2020 +0900 char: raw: do not leak CONFIG_MAX_RAW_DEVS to userspace include/uapi/linux/raw.h leaks CONFIG_MAX_RAW_DEVS to userspace. Userspace programs cannot use MAX_RAW_MINORS since CONFIG_MAX_RAW_DEVS is not available anyway. Remove the MAX_RAW_MINORS definition from the exported header, and use CONFIG_MAX_RAW_DEVS in drivers/char/raw.c While I was here, I converted printk(KERN_WARNING ...) to pr_warn(...) and stretched the warning message. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200617083313.183184-1-masahiroy@kernel.org Signed-off-by: Greg Kroah-Hartman commit 51d501e540e6edd6737c0f1383b7789232595c13 Author: Zhangfei Gao Date: Mon Jun 15 21:55:57 2020 +0800 uacce: remove uacce_vma_fault Fix NULL pointer error if removing uacce's parent module during app's running. SIGBUS is already reported by do_page_fault, so uacce_vma_fault is not needed. If providing vma_fault, vmf->page has to be filled as well, required by __do_fault. Reported-by: Jean-Philippe Brucker Signed-off-by: Zhangfei Gao Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/1592229357-1904-1-git-send-email-zhangfei.gao@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8b66c917c41b966cd230d30c0268795e3f9eb5e4 Author: Rikard Falkeborn Date: Wed Jul 1 22:09:50 2020 +0200 virtio_console: Constify some static variables The id_table and feature_table pointers in struct virtio_driver are pointers to const. Mark the corresponding static variables const to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 25447 713 76 26236 667c drivers/char/virtio_console.o After: text data bss dec hex filename 25488 673 76 26237 667d drivers/char/virtio_console.o Signed-off-by: Rikard Falkeborn Acked-by: Arnd Bergmann Reviewed-by: Amit Shah Link: https://lore.kernel.org/r/20200701200950.30314-6-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 178bdbed3e0cebb7c04e37695dfa638aa8dafed3 Author: Wei Yang Date: Tue Jun 23 10:57:01 2020 +0800 drivers/base/memory: rename base_memory_block_id to memory_block_id memory_block may have a larger granularity than section, this is why we have base_section_nr. But base_memory_block_id seems a little misleading, since there is no larger granularity concept which groups several memory_block. What we need here is the exact memory_block_id to a section_nr. Let's rename it to make it more precise. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20200623025701.2016-2-richard.weiyang@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit 40ba2cde77e764bd0dfe0c4098654d55a005fd7d Author: Wei Yang Date: Tue Jun 23 10:57:00 2020 +0800 drivers/base/memory: init_memory_block() first parameter is not necessary The first parameter of init_memory_block() is intended to retrieve the memory_block initiated. But now, we never use it. Drop it for now. Signed-off-by: Wei Yang Link: https://lore.kernel.org/r/20200623025701.2016-1-richard.weiyang@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit be8299e4a2e244d5645392f54b2bf1bbd576813a Author: Ian Rogers Date: Wed Jul 8 11:39:19 2020 -0700 perf kmem: Pass additional arguments to 'perf record' 'perf kmem' has an input file option but current an output file option fails: $ sudo perf kmem record -o /tmp/p.data sleep 1    Error: unknown switch `o' Usage: perf kmem [] {record|stat}    -f, --force           don't complain, do it    -i, --input    input file name    -l, --line      show n lines    -s, --sort                          sort by keys: ptr, callsite, bytes, hit, pingpong, frag, page, order, mig>    -v, --verbose         be more verbose (show symbol address, etc)        --alloc           show per-allocation statistics        --caller          show per-callsite statistics        --live            Show live page stat        --page            Analyze page allocator        --raw-ip          show raw ip instead of symbol        --slab            Analyze slab allocator        --time      Time span of interest (start,stop) 'perf sched' is similar in implementation and avoids the problem by passing additional arguments to 'perf record'. This change makes 'perf kmem' parse command line options consistently with 'perf sched', although neither actually list that -o is a supported option. Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200708183919.4141023-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 105fbc229b775b69796cd20f53b609732c67c193 Author: Randy Dunlap Date: Fri Jul 3 20:44:56 2020 -0700 Documentation/driver-api: driver-model/platform: drop doubled word Drop the doubled word "that". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200704034502.17199-12-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 9dcbac84244f32ef6b2d4ed47f37c8228450b57b Author: Andy Shevchenko Date: Mon Jun 22 11:21:08 2020 +0300 software node: Use software_node_unregister() when unregistering group of nodes After the commit 46d26819a505 ("software node: implement software_node_unregister()") has been applied a new helper appears that may be utilised in other places. For time being there is one such place, i.e. in software_node_unregister_node_group() which will benefit of the clean up. Use software_node_unregister() when unregistering group of nodes. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200622082108.25577-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0d989da36b1512a6c61ebbd9b155969f0d2de436 Author: Christophe JAILLET Date: Sun Jun 21 10:11:06 2020 +0200 topology: mark a function as __init to save some memory 'topology_sysfs_init()' is only called via 'device_initcall'. It can be marked as __init to save a few bytes of memory. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/20200621081106.881915-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 5f634c8e401df25c479c8d07ed575804059c3826 Author: Ian Rogers Date: Tue Jul 7 14:14:49 2020 -0700 perf parse-events: Report BPF errors Setting the parse_events_error directly doesn't increment num_errors causing the error message not to be displayed. Use the parse_events__handle_error function that sets num_errors and handle multiple errors. Committer notes: Ian provided a before/after upon request: Before: $ /tmp/perf/perf record -e /tmp/perf/util/parse-events.o Run 'perf list' for a list of valid events Usage: perf record [] [] or: perf record [] -- [] -e, --event event selector. use 'perf list' to list available event After: $ /tmp/perf/perf record -e /tmp/perf/util/parse-events.o event syntax error: '/tmp/perf/util/parse-events.o' \___ Failed to load /tmp/perf/util/parse-events.o: BPF object format invalid (add -v to see detail) Run 'perf list' for a list of valid events Usage: perf record [] [] or: perf record [] -- [] -e, --event event selector. use 'perf list' to list available events Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: bpf@vger.kernel.org Cc: Daniel Borkmann Cc: John Fastabend Cc: KP Singh Cc: Leo Yan Cc: Mark Rutland Cc: Martin KaFai Lau Cc: Namhyung Kim Cc: netdev@vger.kernel.org Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Cc: Yonghong Song Link: http://lore.kernel.org/lkml/20200707211449.3868944-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 55c7549819e438f40a3ef1d8ac5c38b73390bcb7 Author: Matthias Maennich Date: Thu Jun 4 18:41:45 2020 +0200 scripts: add dummy report mode to add_namespace.cocci When running `make coccicheck` in report mode using the add_namespace.cocci file, it will fail for files that contain MODULE_LICENSE. Those match the replacement precondition, but spatch errors out as virtual.ns is not set. In order to fix that, add the virtual rule nsdeps and only do search and replace if that rule has been explicitly requested. In order to make spatch happy in report mode, we also need a dummy rule, as otherwise it errors out with "No rules apply". Using a script:python rule appears unrelated and odd, but this is the shortest I could come up with. Adjust scripts/nsdeps accordingly to set the nsdeps rule when run trough `make nsdeps`. Suggested-by: Julia Lawall Fixes: c7c4e29fb5a4 ("scripts: add_namespace: Fix coccicheck failed") Cc: YueHaibing Cc: jeyu@kernel.org Cc: cocci@systeme.lip6.fr Cc: stable@vger.kernel.org Signed-off-by: Matthias Maennich Reported-by: Shuah Khan Acked-by: Julia Lawall Link: https://lore.kernel.org/r/20200604164145.173925-1-maennich@google.com Signed-off-by: Greg Kroah-Hartman commit 5962b8b271e83fab0b57b337901b21ad1a64112a Author: Matthias Brugger Date: Mon Jun 8 11:52:17 2020 +0200 drivers: base: Convert to printk alias functions The file mixes printk calls together with calls to pr_*(). Covert to printk alias functions to unify the code. Signed-off-by: Matthias Brugger Link: https://lore.kernel.org/r/20200608095217.21162-2-matthias.bgg@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7ae731a8441d70e5fb6144422a675bf1b2d6ace9 Author: Dan Carpenter Date: Tue Jun 9 13:46:42 2020 +0300 lib: devres: add a comment about the devm_of_iomap() function We recently introduced a bug when we tried to convert of_iomap() to devm_of_iomap(). The problem was that there were two drivers mapping the same io region. The first driver was using of_iomap() and the second driver was using devm_of_iomap() and the kernel booted fine. When we converted the first drive to use devm_of_iomap() then the second driver failed with -EBUSY and the kernel couldn't boot. Let's add a comment to prevent this sort of mistake in the future. Signed-off-by: Dan Carpenter Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200609104642.GA43074@mwanda Signed-off-by: Greg Kroah-Hartman commit 35bd8c07db2ce8fd2834ef866240613a4ef982e7 Author: Vladimir Oltean Date: Mon Jun 1 12:58:26 2020 +0300 devres: keep both device name and resource name in pretty name Sometimes debugging a device is easiest using devmem on its register map, and that can be seen with /proc/iomem. But some device drivers have many memory regions. Take for example a networking switch. Its memory map used to look like this in /proc/iomem: 1fc000000-1fc3fffff : pcie@1f0000000 1fc000000-1fc3fffff : 0000:00:00.5 1fc010000-1fc01ffff : sys 1fc030000-1fc03ffff : rew 1fc060000-1fc0603ff : s2 1fc070000-1fc0701ff : devcpu_gcb 1fc080000-1fc0800ff : qs 1fc090000-1fc0900cb : ptp 1fc100000-1fc10ffff : port0 1fc110000-1fc11ffff : port1 1fc120000-1fc12ffff : port2 1fc130000-1fc13ffff : port3 1fc140000-1fc14ffff : port4 1fc150000-1fc15ffff : port5 1fc200000-1fc21ffff : qsys 1fc280000-1fc28ffff : ana But after the patch in Fixes: was applied, the information is now presented in a much more opaque way: 1fc000000-1fc3fffff : pcie@1f0000000 1fc000000-1fc3fffff : 0000:00:00.5 1fc010000-1fc01ffff : 0000:00:00.5 1fc030000-1fc03ffff : 0000:00:00.5 1fc060000-1fc0603ff : 0000:00:00.5 1fc070000-1fc0701ff : 0000:00:00.5 1fc080000-1fc0800ff : 0000:00:00.5 1fc090000-1fc0900cb : 0000:00:00.5 1fc100000-1fc10ffff : 0000:00:00.5 1fc110000-1fc11ffff : 0000:00:00.5 1fc120000-1fc12ffff : 0000:00:00.5 1fc130000-1fc13ffff : 0000:00:00.5 1fc140000-1fc14ffff : 0000:00:00.5 1fc150000-1fc15ffff : 0000:00:00.5 1fc200000-1fc21ffff : 0000:00:00.5 1fc280000-1fc28ffff : 0000:00:00.5 That patch made a fair comment that /proc/iomem might be confusing when it shows resources without an associated device, but we can do better than just hide the resource name altogether. Namely, we can print the device name _and_ the resource name. Like this: 1fc000000-1fc3fffff : pcie@1f0000000 1fc000000-1fc3fffff : 0000:00:00.5 1fc010000-1fc01ffff : 0000:00:00.5 sys 1fc030000-1fc03ffff : 0000:00:00.5 rew 1fc060000-1fc0603ff : 0000:00:00.5 s2 1fc070000-1fc0701ff : 0000:00:00.5 devcpu_gcb 1fc080000-1fc0800ff : 0000:00:00.5 qs 1fc090000-1fc0900cb : 0000:00:00.5 ptp 1fc100000-1fc10ffff : 0000:00:00.5 port0 1fc110000-1fc11ffff : 0000:00:00.5 port1 1fc120000-1fc12ffff : 0000:00:00.5 port2 1fc130000-1fc13ffff : 0000:00:00.5 port3 1fc140000-1fc14ffff : 0000:00:00.5 port4 1fc150000-1fc15ffff : 0000:00:00.5 port5 1fc200000-1fc21ffff : 0000:00:00.5 qsys 1fc280000-1fc28ffff : 0000:00:00.5 ana Fixes: 8d84b18f5678 ("devres: always use dev_name() in devm_ioremap_resource()") Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20200601095826.1757621-1-olteanv@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4a60406d3592373b8fd27ddfd010c5e62ad6c674 Author: Barry Song Date: Fri Jun 19 15:00:45 2020 +1200 driver core: platform: expose numa_node to users in sysfs Some platform devices like ARM SMMU are memory-mapped and populated by ACPI/IORT. In this case, NUMA topology of those platform devices are exported by firmware as well. Software might care about the numa_node of those devices in order to achieve NUMA locality. This patch will show the numa_node for this kind of devices in sysfs. For those platform devices without numa, numa_node won't be visible. Cc: Prime Zeng Cc: Robin Murphy Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20200619030045.81956-1-song.bao.hua@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit 079ad2fb4bf9eba8a0aaab014b49705cd7f07c66 Author: Heikki Krogerus Date: Thu Jun 4 19:46:46 2020 +0200 kobject: Avoid premature parent object freeing in kobject_cleanup() If kobject_del() is invoked by kobject_cleanup() to delete the target kobject, it may cause its parent kobject to be freed before invoking the target kobject's ->release() method, which effectively means freeing the parent before dealing with the child entirely. That is confusing at best and it may also lead to functional issues if the callers of kobject_cleanup() are not careful enough about the order in which these calls are made, so avoid the problem by making kobject_cleanup() drop the last reference to the target kobject's parent at the end, after invoking the target kobject's ->release() method. [ rjw: Rewrite the subject and changelog, make kobject_cleanup() drop the parent reference only when __kobject_del() has been called. ] Reported-by: Naresh Kamboju Reported-by: kernel test robot Fixes: 7589238a8cf3 ("Revert "software node: Simplify software_node_release() function"") Suggested-by: Rafael J. Wysocki Signed-off-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/1908555.IiAGLGrh1Z@kreacher Signed-off-by: Greg Kroah-Hartman commit cb22ab20c969615296475b7068c891ca3a849fa9 Author: John Oldman Date: Fri Jul 10 12:31:13 2020 +0100 staging: rtl8712/: Using comparison to true is error prone clear below issues reported by checkpatch.pl: CHECK: Using comparison to true is error prone CHECK: Comparison to NULL should be written "!oldest" Signed-off-by: John Oldman Link: https://lore.kernel.org/r/20200710113113.1648-1-john.oldman@polehill.co.uk Signed-off-by: Greg Kroah-Hartman commit a3232e64b4be06460d02ded09c5bd347b0a3a2b8 Author: Mauro Dreissig Date: Sun Jul 5 11:35:52 2020 -0300 staging: rtl8712: Use proper format in call to dev_err() In the call to dev_err(), remove the cast of size_t to int and change the format string accordingly. As reported by the kernel test robot, the correct format string for a size_t argument should be %zu. Reported-by: kernel test robot Signed-off-by: Mauro Dreissig Link: https://lore.kernel.org/r/20200705143552.9368-6-mukadr@gmail.com Signed-off-by: Greg Kroah-Hartman commit f1a4423ffa86643bad4ae1a8f9da3500d9f3cbd2 Author: Mauro Dreissig Date: Sun Jul 5 11:35:51 2020 -0300 staging: rtl8712: Remove variable 'raw' from rtl871x_open_fw() Remove useless variable 'raw' from function rtl871x_open_fw() making the code a bit easier to understand. Signed-off-by: Mauro Dreissig Link: https://lore.kernel.org/r/20200705143552.9368-5-mukadr@gmail.com Signed-off-by: Greg Kroah-Hartman commit f1c9ea1acf58f22f6e7c664f229e72d2a0c9bdea Author: Mauro Dreissig Date: Sun Jul 5 11:35:50 2020 -0300 staging: rtl8712: Use ETH_ALEN instead of hardcoded value Use macro ETH_ALEN which defines the number of octets in an ethernet address. Signed-off-by: Mauro Dreissig Link: https://lore.kernel.org/r/20200705143552.9368-4-mukadr@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4e4a6b7c18ef21abe8771f131c1ef80655769adb Author: Mauro Dreissig Date: Sun Jul 5 11:35:49 2020 -0300 staging: rtl8712: Simplify expressions with boolean logic Simplify some expressions by using boolean operations. Signed-off-by: Mauro Dreissig Link: https://lore.kernel.org/r/20200705143552.9368-3-mukadr@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4911537c6b4115f4fd49e1190013555681735d74 Author: Mauro Dreissig Date: Sun Jul 5 11:35:48 2020 -0300 staging: rtl8712: Replace constant 49152 with expression 48 * 1024 This way we don't need the comment stating that 49152 equals 48k. Signed-off-by: Mauro Dreissig Link: https://lore.kernel.org/r/20200705143552.9368-2-mukadr@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2145021c44b4bc06419b3a45d814880ac8de7dde Author: Alexander A. Klimov Date: Wed Jul 8 20:31:17 2020 +0200 Staging: nvec: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200708183117.16563-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 50ce87829fc34a6ce1c67153a63b4007788f72f0 Author: Gustavo A. R. Silva Date: Tue Jul 7 13:20:08 2020 -0500 staging: rtl8188eu: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200707182008.GA341@embeddedor Signed-off-by: Greg Kroah-Hartman commit deb34767b2b23d330aa226d5ef4209f52acfb127 Author: Gustavo A. R. Silva Date: Tue Jul 7 14:43:50 2020 -0500 staging: vt6655: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200707194350.GA3255@embeddedor Signed-off-by: Greg Kroah-Hartman commit e49fa0b7394d5a273dbd7a3b8e3c9a103710c920 Author: John Oldman Date: Tue Jul 7 12:41:28 2020 +0100 staging: rtl8723bs: Using comparison to true is error prone clear below issues reported by checkpatch.pl: CHECK: Using comparison to false is error prone CHECK: Using comparison to true is error pron Signed-off-by: John Oldman Link: https://lore.kernel.org/r/20200707114128.30312-1-john.oldman@polehill.co.uk Signed-off-by: Greg Kroah-Hartman commit eab439bee0ab0411a5768d1a0f31f8406d954726 Author: John Oldman Date: Mon Jul 6 17:22:40 2020 +0100 staging: rtl8192u: Using comparison to true is error prone clear below issues reported by checkpatch.pl: CHECK: Using comparison to false is error prone Signed-off-by: John Oldman Link: https://lore.kernel.org/r/20200706162240.2770-1-john.oldman@polehill.co.uk Signed-off-by: Greg Kroah-Hartman commit 12414fa87ba5cdc685bb56c10def39bdfe9d8a6e Author: Mauro Dreissig Date: Sun Jul 5 15:09:44 2020 -0300 staging: rtl8712: Annotate r8712_sitesurvey_cmd() Add __must_hold() sparse annotation to r8712_sitesurvey_cmd(), replacing the comments on top of the function. Signed-off-by: Mauro Dreissig Link: https://lore.kernel.org/r/20200705180944.20958-1-mukadr@gmail.com Signed-off-by: Greg Kroah-Hartman commit cecc7dca16bef2a4cb1f9d0baf853a6adcd19ade Author: Michael Straube Date: Fri Jul 3 14:26:04 2020 +0200 staging: rtl8192u: remove copying file All source and header files have a GPL-2.0 SPDX identifier. The 'copying' file with the whole GPL text is not needed, delete it. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200703122604.12096-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 056535320bc2d4d2d246df6369ff3d37a72f0148 Author: Michael Straube Date: Fri Jul 3 14:26:03 2020 +0200 staging: rtl8192u: remove GPL boiler plate text The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. The file ieee80211_module.c has a proper SPDX line, so the GPL boiler plate text is not needed. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200703122604.12096-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 354d6ca9d99790e037bf06f093634e851d1253ee Author: Linus Walleij Date: Fri Jul 3 15:07:56 2020 +0200 staging: wfx: Get descriptors for GPIOs The code has the functionality to insert the GPIO lines using the global GPIO numbers through module parameters. As we are clearly deprecating the use of global GPIO numbers look up the GPIO descriptors from the device instead. This usually falls back to device hardware descriptions using e.g. device tree or ACPI. This device clearly supports device tree when used over SPI for example. For example, this can be supplied in the device tree like so: wfx@0x01 { compatible = "silabs,wf200"; reset-gpios = <&gpio0 1>; wakeup-gpios = <&gpio0 2>; }; Cc: Jérôme Pouiller Reviewed-by: Jérôme Pouiller Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20200703130756.514868-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit d4e03146b00395e82b8db22a0c2e867c7224b7c9 Author: Colin Ian King Date: Mon Jul 6 14:20:17 2020 +0100 staging: wfx: fix uninitialized variable bytes_done The variable bytes_done is not initialized and hence the first FIFO size check on bytes_done may be breaking prematurely from the loop if bytes_done contains a large bogus uninitialized value. Fix this by initializing bytes_done to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: a9408ad79ff3 ("staging: wfx: load the firmware faster") Signed-off-by: Colin Ian King Reviewed-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200706132017.487627-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 729082ed9b9cc242f5030de8f956b4be41150ea7 Author: Hans de Goede Date: Thu Jul 9 14:08:58 2020 +0200 virt: vbox: Fix some comments which talk about the "session spinlock" The session lock is a mutex, not a spinlock, fix the comments to match. Acked-by: Arnd Bergmann Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200709120858.63928-9-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 5bc117a27fd044bd5ddeb8ab22c58976bf01b50d Author: Hans de Goede Date: Thu Jul 9 14:08:57 2020 +0200 virt: vbox: Log unknown ioctl requests as error Every now and then upstream adds new ioctls without notifying us, log unknown ioctl requests as an error to catch these. Acked-by: Arnd Bergmann Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200709120858.63928-8-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 316b0035402f05fe9e9e5334d1ff65dae285cb7c Author: Hans de Goede Date: Thu Jul 9 14:08:56 2020 +0200 virt: vbox: Add a few new vmmdev request types to the userspace whitelist Upstream VirtualBox has defined and is using a few new request types for vmmdev requests passed through /dev/vboxguest to the hypervisor. Add the defines for these to vbox_vmmdev_types.h and add add them to the whitelists of vmmdev requests which userspace is allowed to make. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1789545 Acked-by: Arnd Bergmann Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200709120858.63928-7-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 631beddc5466731b048263a4a9d3d67150e72f8d Author: Hans de Goede Date: Thu Jul 9 14:08:55 2020 +0200 virt: vbox: Add support for the new VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES ioctl Add support for the new VBG_IOCTL_ACQUIRE_GUEST_CAPABILITIES ioctl, this is necessary for automatic resizing of the guest resolution to match the VM-window size to work with the new VMSVGA virtual GPU which is now the new default in VirtualBox. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1789545 Acked-by: Arnd Bergmann Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200709120858.63928-6-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 412f84cff0c9aa95fd204961f21121f38d77cc13 Author: Hans de Goede Date: Thu Jul 9 14:08:54 2020 +0200 virt: vbox: Add vbg_set_host_capabilities() helper function Add vbg_set_host_capabilities() helper function, this is a preparation patch for adding support for the VBGL_IOCTL_GUEST_CAPS_ACQUIRE ioctl. Acked-by: Arnd Bergmann Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200709120858.63928-5-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit fd01cc590357df1da6e3ec8c9947ee15a83a40ec Author: Hans de Goede Date: Thu Jul 9 14:08:53 2020 +0200 virt: vbox: Rename guest_caps struct members to set_guest_caps Rename guest_caps[_tracker] struct members to set_guest_caps[_tracker] this is a preparation patch for adding support for the VBGL_IOCTL_GUEST_CAPS_ACQUIRE ioctl. Acked-by: Arnd Bergmann Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20200709120858.63928-4-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 2d41d2ab85d414f6ea9eac2f853b1aa31ba0820f Merge: 415abcdfd4b83 59d1d2e8e1e7c Author: Greg Kroah-Hartman Date: Fri Jul 10 13:42:33 2020 +0200 Merge branch 'char-misc-linus' into 'char-misc-next' We need the virtbox changes in here as well to build on top of. Signed-off-by: Greg Kroah-Hartman commit 7eeb9855c1a4e6037bb1237a2a68ff1ee7aa4e67 Author: Adrian Hunter Date: Tue May 12 15:19:22 2020 +0300 perf script: Show text poke address symbol It is generally more useful to show the symbol with an address. In this case, the print function requires the 'machine' which means changing callers to provide it as a parameter. It is optional because most events do not need it and the callers that matter can provide it. Committer notes: Made 'union perf_event' continue to be the first parameter to the perf_event__fprintf() and perf_event__fprintf_text_poke() events. Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20200512121922.8997-16-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 92ecf3a64f67297df0e454f98d8b3aa06286aa5d Author: Adrian Hunter Date: Tue May 12 15:19:21 2020 +0300 perf script: Add option --show-text-poke-events Consistent with other new events, add an option to perf script to display text poke events and ksymbol events. Both text poke events and ksymbol events are displayed because some text pokes (e.g. ftrace trampolines) have corresponding ksymbol events. Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20200512121922.8997-15-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b22f90aaea4bbf09a5ad75c215ce0a01227e2a00 Author: Adrian Hunter Date: Tue May 12 15:19:20 2020 +0300 perf intel-pt: Add support for text poke events Select text poke events when available and the kernel is being traced. Process text poke events to invalidate entries in Intel PT's instruction cache. Example: The example requires kernel config: CONFIG_PROC_SYSCTL=y CONFIG_SCHED_DEBUG=y CONFIG_SCHEDSTATS=y Before: # perf record -o perf.data.before --kcore -a -e intel_pt//k -m,64M & # cat /proc/sys/kernel/sched_schedstats 0 # echo 1 > /proc/sys/kernel/sched_schedstats # cat /proc/sys/kernel/sched_schedstats 1 # echo 0 > /proc/sys/kernel/sched_schedstats # cat /proc/sys/kernel/sched_schedstats 0 # kill %1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 3.341 MB perf.data.before ] [1]+ Terminated perf record -o perf.data.before --kcore -a -e intel_pt//k -m,64M # perf script -i perf.data.before --itrace=e >/dev/null Warning: 474 instruction trace errors After: # perf record -o perf.data.after --kcore -a -e intel_pt//k -m,64M & # cat /proc/sys/kernel/sched_schedstats 0 # echo 1 > /proc/sys/kernel/sched_schedstats # cat /proc/sys/kernel/sched_schedstats 1 # echo 0 > /proc/sys/kernel/sched_schedstats # cat /proc/sys/kernel/sched_schedstats 0 # kill %1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 2.646 MB perf.data.after ] [1]+ Terminated perf record -o perf.data.after --kcore -a -e intel_pt//k -m,64M # perf script -i perf.data.after --itrace=e >/dev/null Example: The example requires kernel config: # CONFIG_FUNCTION_TRACER is not set Before: # perf record --kcore -m,64M -o t1 -a -e intel_pt//k & # perf probe __schedule Added new event: probe:__schedule (on __schedule) You can now use it in all perf tools, such as: perf record -e probe:__schedule -aR sleep 1 # perf record -e probe:__schedule -aR sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.026 MB perf.data (68 samples) ] # perf probe -d probe:__schedule Removed event: probe:__schedule # kill %1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 41.268 MB t1 ] [1]+ Terminated perf record --kcore -m,64M -o t1 -a -e intel_pt//k # perf script -i t1 --itrace=e >/dev/null Warning: 207 instruction trace errors After: # perf record --kcore -m,64M -o t1 -a -e intel_pt//k & # perf probe __schedule Added new event: probe:__schedule (on __schedule) You can now use it in all perf tools, such as: perf record -e probe:__schedule -aR sleep 1 # perf record -e probe:__schedule -aR sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.028 MB perf.data (107 samples) ] # perf probe -d probe:__schedule Removed event: probe:__schedule # kill %1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 39.978 MB t1 ] [1]+ Terminated perf record --kcore -m,64M -o t1 -a -e intel_pt//k # perf script -i t1 --itrace=e >/dev/null # perf script -i t1 --no-itrace -D | grep 'POKE\|KSYMBOL' 6 565303693547 0x291f18 [0x50]: PERF_RECORD_KSYMBOL addr ffffffffc027a000 len 4096 type 2 flags 0x0 name kprobe_insn_page 6 565303697010 0x291f68 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffc027a000 old len 0 new len 6 6 565303838278 0x291fa8 [0x50]: PERF_RECORD_KSYMBOL addr ffffffffc027c000 len 4096 type 2 flags 0x0 name kprobe_optinsn_page 6 565303848286 0x291ff8 [0xa0]: PERF_RECORD_TEXT_POKE addr 0xffffffffc027c000 old len 0 new len 106 6 565369336743 0x292af8 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffff88ab8890 old len 5 new len 5 7 566434327704 0x217c208 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffff88ab8890 old len 5 new len 5 6 566456313475 0x293198 [0xa0]: PERF_RECORD_TEXT_POKE addr 0xffffffffc027c000 old len 106 new len 0 6 566456314935 0x293238 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffc027a000 old len 6 new len 0 Example: The example requires kernel config: CONFIG_FUNCTION_TRACER=y Before: # perf record --kcore -m,64M -o t1 -a -e intel_pt//k & # perf probe __kmalloc Added new event: probe:__kmalloc (on __kmalloc) You can now use it in all perf tools, such as: perf record -e probe:__kmalloc -aR sleep 1 # perf record -e probe:__kmalloc -aR sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.022 MB perf.data (6 samples) ] # perf probe -d probe:__kmalloc Removed event: probe:__kmalloc # kill %1 [ perf record: Woken up 2 times to write data ] [ perf record: Captured and wrote 43.850 MB t1 ] [1]+ Terminated perf record --kcore -m,64M -o t1 -a -e intel_pt//k # perf script -i t1 --itrace=e >/dev/null Warning: 8 instruction trace errors After: # perf record --kcore -m,64M -o t1 -a -e intel_pt//k & # perf probe __kmalloc Added new event: probe:__kmalloc (on __kmalloc) You can now use it in all perf tools, such as: perf record -e probe:__kmalloc -aR sleep 1 # perf record -e probe:__kmalloc -aR sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.037 MB perf.data (206 samples) ] # perf probe -d probe:__kmalloc Removed event: probe:__kmalloc # kill %1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 41.442 MB t1 ] [1]+ Terminated perf record --kcore -m,64M -o t1 -a -e intel_pt//k # perf script -i t1 --itrace=e >/dev/null # perf script -i t1 --no-itrace -D | grep 'POKE\|KSYMBOL' 5 312216133258 0x8bafe0 [0x50]: PERF_RECORD_KSYMBOL addr ffffffffc0360000 len 415 type 2 flags 0x0 name ftrace_trampoline 5 312216133494 0x8bb030 [0x1d8]: PERF_RECORD_TEXT_POKE addr 0xffffffffc0360000 old len 0 new len 415 5 312216229563 0x8bb208 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffac6016f5 old len 5 new len 5 5 312216239063 0x8bb248 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffac601803 old len 5 new len 5 5 312216727230 0x8bb288 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffabbea190 old len 5 new len 5 5 312216739322 0x8bb2c8 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffac6016f5 old len 5 new len 5 5 312216748321 0x8bb308 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffac601803 old len 5 new len 5 7 313287163462 0x2817430 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffac6016f5 old len 5 new len 5 7 313287174890 0x2817470 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffac601803 old len 5 new len 5 7 313287818979 0x28174b0 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffabbea190 old len 5 new len 5 7 313287829357 0x28174f0 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffac6016f5 old len 5 new len 5 7 313287841246 0x2817530 [0x40]: PERF_RECORD_TEXT_POKE addr 0xffffffffac601803 old len 5 new len 5 Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20200512121922.8997-14-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 789e24199810dcd64106ac7b703ea463693e780c Author: Adrian Hunter Date: Tue May 12 15:19:19 2020 +0300 perf tools: Add support for PERF_RECORD_KSYMBOL_TYPE_OOL PERF_RECORD_KSYMBOL_TYPE_OOL marks an executable page. Create a map backed only by memory, which will be populated as necessary by text poke events. Committer notes: From the patch: OOL stands for "Out of line" code such as kprobe-replaced instructions or optimized kprobes or ftrace trampolines. Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20200512121922.8997-13-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 246eba8e9041c4774738645c72b6efac7601db22 Author: Adrian Hunter Date: Tue May 12 15:19:18 2020 +0300 perf tools: Add support for PERF_RECORD_TEXT_POKE Add processing for PERF_RECORD_TEXT_POKE events. When a text poke event is processed, then the kernel dso data cache is updated with the poked bytes. Signed-off-by: Adrian Hunter Cc: Alexander Shishkin Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: Steven Rostedt (VMware) Cc: x86@kernel.org Link: http://lore.kernel.org/lkml/20200512121922.8997-12-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit dccec73de91de04f2a62c877411ecbe368a775f7 Author: Sudeep Holla Date: Thu Jul 9 09:17:04 2020 +0100 firmware: arm_scmi: Keep the discrete clock rates sorted Instead of relying on the firmware to keep the clock rates sorted, let us sort the list. This is not essential for clock layer but it helps to find the min and max rates easily from the list. Link: https://lore.kernel.org/r/20200709081705.46084-1-sudeep.holla@arm.com Fixes: 5f6c6430e904 ("firmware: arm_scmi: add initial support for clock protocol") Reported-and-tested-by: Dien Pham Signed-off-by: Sudeep Holla commit 3cf0eead9fb895dd91fc1fea0114ca0068d1c1a3 Author: Dejin Zheng Date: Wed Jul 8 23:56:14 2020 +0800 PCI: controller: Convert to devm_platform_ioremap_resource() Use devm_platform_ioremap_resource() to simplify the code, since t contains platform_get_resource() and devm_ioremap_resource() calls respectively. Link: https://lore.kernel.org/r/20200708155614.308-1-zhengdejin5@gmail.com Signed-off-by: Dejin Zheng Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit e2dcd20b1645a7285b304bf6b9a1a6637f0f254a Author: Dejin Zheng Date: Wed Jun 3 01:16:01 2020 +0800 PCI: controller: Convert to devm_platform_ioremap_resource_byname() Use devm_platform_ioremap_resource_byname() to simplify the code, since it calls respectively platform_get_resource_byname() and devm_ioremap_resource(). Link: https://lore.kernel.org/r/20200602171601.17630-1-zhengdejin5@gmail.com Signed-off-by: Dejin Zheng Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Gustavo Pimentel commit 78aada4b05bdc63687b76a079eca327d3825add1 Author: Rob Herring Date: Fri May 22 17:48:32 2020 -0600 PCI: xilinx: Use pci_host_probe() to register host The xilinx host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. The only difference is pci_assign_unassigned_bus_resources() was called instead of pci_bus_size_bridges() and pci_bus_assign_resources(). This should be the same. Link: https://lore.kernel.org/r/20200522234832.954484-16-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Michal Simek commit dd58950f9875ab33b5c2499a1add592800fe703d Author: Rob Herring Date: Fri May 22 17:48:31 2020 -0600 PCI: xilinx-nwl: Use pci_host_probe() to register host The xilinx-nwl host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. The only difference is pci_assign_unassigned_bus_resources() was called instead of pci_bus_size_bridges() and pci_bus_assign_resources(). This should be the same. Link: https://lore.kernel.org/r/20200522234832.954484-15-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Michal Simek commit f473182c7524ddc04b5fc0aeb246ac102cf6edb5 Author: Rob Herring Date: Fri May 22 17:48:30 2020 -0600 PCI: rockchip: Use pci_host_probe() to register host The rockchip host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Link: https://lore.kernel.org/r/20200522234832.954484-14-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Shawn Lin Cc: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org commit 56d2923484704a261f91f5fd0d4dd35f5b3ebb19 Author: Rob Herring Date: Fri May 22 17:48:29 2020 -0600 PCI: rcar: Use pci_host_probe() to register host The rcar host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Link: https://lore.kernel.org/r/20200522234832.954484-13-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Geert Uytterhoeven Cc: Marek Vasut Cc: Yoshihiro Shimoda Cc: linux-renesas-soc@vger.kernel.org commit 81ce3cf4a246d1578ed7ae6b69e4331fd2e6587f Author: Rob Herring Date: Fri May 22 17:48:28 2020 -0600 PCI: iproc: Use pci_host_probe() to register host The iproc host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. The only difference is pci_assign_unassigned_bus_resources() was called instead of pci_bus_size_bridges() and pci_bus_assign_resources(). This should be the same. Link: https://lore.kernel.org/r/20200522234832.954484-12-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Scott Branden Cc: Lorenzo Pieralisi Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com commit c63aed7334c21de8d626ff028ccad98cf5847a0e Author: Rob Herring Date: Fri May 22 17:48:27 2020 -0600 PCI: altera: Use pci_host_probe() to register host The altera host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. The only difference is pci_assign_unassigned_bus_resources() was called instead of pci_bus_size_bridges() and pci_bus_assign_resources(). This should be the same. Link: https://lore.kernel.org/r/20200522234832.954484-11-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Ley Foon Tan Cc: Ley Foon Tan Cc: rfi@lists.rocketboards.org commit 97c5372aeb5b43ab9d3f3db08652de8e8988b226 Author: Rob Herring Date: Fri May 22 17:48:26 2020 -0600 PCI: xgene: Use pci_host_probe() to register host The xgene host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Link: https://lore.kernel.org/r/20200522234832.954484-10-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Toan Le commit a4b21b858b56d728021ad72ad7c1322d8772b2a6 Author: Rob Herring Date: Fri May 22 17:48:25 2020 -0600 PCI: versatile: Use pci_host_probe() to register host The versatile host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Link: https://lore.kernel.org/r/20200522234832.954484-9-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Lorenzo Pieralisi commit d7169a94f1ba8c14db465fe3e410a4feceea35a5 Author: Rob Herring Date: Fri May 22 17:48:24 2020 -0600 PCI: v3: Use pci_host_probe() to register host The v3 host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Link: https://lore.kernel.org/r/20200522234832.954484-8-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Reviewed-by: Linus Walleij Cc: Linus Walleij commit 67047e8bc8aa4b4d57c5e2bd00d48ac7c8b8757b Author: Rob Herring Date: Fri May 22 17:48:23 2020 -0600 PCI: tegra: Use pci_host_probe() to register host The tegra host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Link: https://lore.kernel.org/r/20200522234832.954484-7-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org commit 1f9b751220ce53d4ea7edf7dda90f495ce810494 Author: Rob Herring Date: Fri May 22 17:48:22 2020 -0600 PCI: mobiveil: Use pci_host_probe() to register host The mobiveil host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Link: https://lore.kernel.org/r/20200522234832.954484-6-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Karthikeyan Mitran Cc: Hou Zhiqiang commit a37571fa9c04a9efdd8f597cb29323a8fcea405a Author: Rob Herring Date: Fri May 22 17:48:21 2020 -0600 PCI: brcmstb: Use pci_host_probe() to register host The brcmstb host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Link: https://lore.kernel.org/r/20200522234832.954484-5-robh@kernel.org Tested-by: Nicolas Saenz Julienne Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Acked-by: Nicolas Saenz Julienne Cc: Nicolas Saenz Julienne Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-rpi-kernel@lists.infradead.org commit e63434f4cc0da0f3ffe60d932997842f60552517 Author: Rob Herring Date: Fri May 22 17:48:20 2020 -0600 PCI: host-common: Use struct pci_host_bridge.windows list directly There's no need to create a temporary resource list and then splice it to struct pci_host_bridge.windows list. Just use pci_host_bridge.windows directly. The necessary clean-up is already handled by the PCI core. Link: https://lore.kernel.org/r/20200522234832.954484-4-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Will Deacon commit f9ad4a5f3f20bee022b1bdde94e5ece6dc0b0edc Author: Peter Zijlstra Date: Wed May 27 13:03:26 2020 +0200 lockdep: Remove lockdep_hardirq{s_enabled,_context}() argument Now that the macros use per-cpu data, we no longer need the argument. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200623083721.571835311@infradead.org commit a21ee6055c30ce68c4e201c6496f0ed2a1936230 Author: Peter Zijlstra Date: Mon May 25 12:22:41 2020 +0200 lockdep: Change hardirq{s_enabled,_context} to per-cpu variables Currently all IRQ-tracking state is in task_struct, this means that task_struct needs to be defined before we use it. Especially for lockdep_assert_irq*() this can lead to header-hell. Move the hardirq state into per-cpu variables to avoid the task_struct dependency. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200623083721.512673481@infradead.org commit a6342915881a687b07847b7c57628de07a256525 Author: Peter Zijlstra Date: Mon Jun 22 17:21:58 2020 +0200 arm: Break cyclic percpu include In order to use in irqflags.h, we need to make sure asm/percpu.h does not itself depend on irqflags.h. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Acked-by: Will Deacon Link: https://lkml.kernel.org/r/20200623083721.454517573@infradead.org commit 28e5bfd81c8de77504703adf24ceff9301e3c7be Author: Peter Zijlstra Date: Fri May 29 22:41:05 2020 +0200 s390: Break cyclic percpu include In order to use in irqflags.h, we need to make sure asm/percpu.h does not itself depend on irqflags.h Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200623083721.396143816@infradead.org commit ba1f2b2eaa2a529dba722507c55ff3d761d325dd Author: Peter Zijlstra Date: Wed May 27 15:50:29 2020 +0200 x86/entry: Fix NMI vs IRQ state tracking While the nmi_enter() users did trace_hardirqs_{off_prepare,on_finish}() there was no matching lockdep_hardirqs_*() calls to complete the picture. Introduce idtentry_{enter,exit}_nmi() to enable proper IRQ state tracking across the NMIs. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200623083721.216740948@infradead.org commit d6bdceb6c2276276c0392b926ccd2e5991d5cb9a Author: Peter Zijlstra Date: Fri May 29 22:41:01 2020 +0200 powerpc64: Break asm/percpu.h vs spinlock_types.h dependency In order to use in lockdep.h, we need to make sure asm/percpu.h does not itself depend on lockdep. The below seems to make that so and builds powerpc64-defconfig + PROVE_LOCKING. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar https://lkml.kernel.org/r/20200623083721.336906073@infradead.org commit 859d069ee1ddd87862e1d6a356a82ed417dbeb67 Author: Peter Zijlstra Date: Wed May 27 15:00:57 2020 +0200 lockdep: Prepare for NMI IRQ state tracking There is no reason not to always, accurately, track IRQ state. This change also makes IRQ state tracking ignore lockdep_off(). Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200623083721.155449112@infradead.org commit 48017e5481ce85ba52c4cff082cad5f021c4b413 Author: Peter Zijlstra Date: Fri May 29 22:40:58 2020 +0200 sparc64: Fix asm/percpu.h build error In order to break a header dependency between lockdep and task_struct, I need per-cpu stuff from lockdep. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Acked-by: David S. Miller Link: https://lkml.kernel.org/r/20200623083721.277992771@infradead.org commit 248591f5d257a19c1cba9ab9da3536bfbc2f0149 Author: Marco Elver Date: Wed Jun 24 13:32:46 2020 +0200 kcsan: Make KCSAN compatible with new IRQ state tracking The new IRQ state tracking code does not honor lockdep_off(), and as such we should again permit tracing by using non-raw functions in core.c. Update the lockdep_off() comment in report.c, to reflect the fact there is still a potential risk of deadlock due to using printk() from scheduler code. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Link: https://lkml.kernel.org/r/20200624113246.GA170324@elver.google.com commit e1bcad609f5a533da45fac071cf0849b86dbab92 Merge: c935cd62d3fe9 b037b09b9058d Author: Peter Zijlstra Date: Fri Jul 10 11:59:59 2020 +0200 Merge branch 'tip/x86/entry' commit bc916e67c0eeb734fa877e63128db3d2352508f4 Merge: b037b09b9058d bd87e6f6610aa Author: Thomas Gleixner Date: Fri Jul 10 11:45:22 2020 +0200 Merge branch 'x86/urgent' into x86/entry to pick up upstream fixes. commit ed2690a9ca896882a124ee0bd4eaff9678ed1162 Author: Chris Wilson Date: Thu Jul 9 23:45:04 2020 +0100 drm/i915/selftest: Check that GPR are restored across noa_wait Perf implements a GPU delay (noa_wait) by looping until the CS timestamp has passed a certain point. This use MI_MATH and the general purpose registers of the user's context, and since it is clobbering the user state it must carefully save and restore the user's data around the noa_wait. We can verify this by loading some values in the GPR that we know will be clobbered by the noa_wait, and then inspecting the GPR after the noa_wait completes and confirming that they have been restored. Signed-off-by: Chris Wilson Cc: Umesh Nerlige Ramappa Cc: Lionel Landwerlin Reviewed-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20200709224504.11345-2-chris@chris-wilson.co.uk commit e43ff99c8deda85234e6233e0f4af6cb09566a37 Author: Umesh Nerlige Ramappa Date: Thu Jul 9 23:45:03 2020 +0100 drm/i915/perf: Use GTT when saving/restoring engine GPR MI_STORE_REGISTER_MEM and MI_LOAD_REGISTER_MEM need to know which translation to use when saving restoring the engine general purpose registers to and from the GT scratch. Since GT scratch is mapped to ggtt, we need to set an additional bit in the command to use GTT. Fixes: daed3e44396d17 ("drm/i915/perf: implement active wait for noa configurations") Suggested-by: Prathap Kumar Valsan Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200709224504.11345-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson commit c34b26b98caca48ec9ee981d4a89ac4f73376a3a Author: Tianjia Zhang Date: Tue Jun 23 21:14:17 2020 +0800 KVM: MIPS: clean up redundant 'kvm_run' parameters In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters. Signed-off-by: Tianjia Zhang Reviewed-by: Huacai Chen Message-Id: <20200623131418.31473-5-tianjia.zhang@linux.alibaba.com> Signed-off-by: Paolo Bonzini commit 74cc7e0c35c1e4d7ccad27bc31c526ea0916696a Author: Tianjia Zhang Date: Tue Jun 23 21:14:15 2020 +0800 KVM: arm64: clean up redundant 'kvm_run' parameters In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters. Signed-off-by: Tianjia Zhang Reviewed-by: Vitaly Kuznetsov Message-Id: <20200623131418.31473-3-tianjia.zhang@linux.alibaba.com> Signed-off-by: Paolo Bonzini commit 2f0a83bece1e758386e83f01e86379d2e83040ef Author: Tianjia Zhang Date: Tue Jun 23 21:14:14 2020 +0800 KVM: s390: clean up redundant 'kvm_run' parameters In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters retain the 'kvm_run' and 'kvm_vcpu' parameters at the same time. This patch does a unified cleanup of these remaining redundant parameters. Signed-off-by: Tianjia Zhang Reviewed-by: Vitaly Kuznetsov Message-Id: <20200623131418.31473-2-tianjia.zhang@linux.alibaba.com> Signed-off-by: Paolo Bonzini commit 781865604d1695314df901e106d27b26446359d8 Author: Masahiro Yamada Date: Fri Jul 10 16:43:23 2020 +0900 ARM: dts: uniphier: simplify support-card node structure This device hierarchy is needlessly complex. Remove the support-card node level, and move the ethernet and serial nodes right under the system-bus node. This also fixes the following warning from 'make ARCH=arm dtbs_check': support-card@1,1f00000: $nodename:0: 'support-card@1,1f00000' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' Signed-off-by: Masahiro Yamada commit 9f1944c23c8cb1c033b73de80cf6c612a2a80a2b Author: Maxim Uvarov Date: Thu Jun 18 16:52:51 2020 +0300 tpm_ftpm_tee: register driver on TEE bus OP-TEE based fTPM Trusted Application depends on tee-supplicant to provide NV RAM implementation based on RPMB secure storage. So this dependency can be resolved via TEE bus where we only invoke fTPM driver probe once fTPM device is registered on the bus which is only true after the tee-supplicant is up and running. Additionally, TEE bus provides auto device enumeration. Signed-off-by: Maxim Uvarov Suggested-by: Sumit Garg Suggested-by: Arnd Bergmann Reviewed-by: Sumit Garg Reviewed-by: Jarkko Sakkinen Tested-by: Sumit Garg Signed-off-by: Jens Wiklander commit 5f178bb71e3aff2abab01b1ff6837c3a054b25e1 Author: Maxim Uvarov Date: Thu Jun 18 16:52:50 2020 +0300 optee: enable support for multi-stage bus enumeration Some drivers (like ftpm) can operate only after tee-supplicant runs because of tee-supplicant provides things like storage services (rpmb, shm).  This patch splits probe of non tee-supplicant dependable drivers to the early stage, and after tee-supplicant run probe other drivers. Signed-off-by: Maxim Uvarov Suggested-by: Sumit Garg Suggested-by: Arnd Bergmann Reviewed-by: Sumit Garg Acked-by: Jarkko Sakkinen Tested-by: Sumit Garg Signed-off-by: Jens Wiklander commit 58df195cd47d9b06c7160253d35881c1de90aa9e Author: Maxim Uvarov Date: Thu Jun 18 16:52:49 2020 +0300 optee: use uuid for sysfs driver entry With the evolving use-cases for TEE bus, now it's required to support multi-stage enumeration process. But using a simple index doesn't suffice this requirement and instead leads to duplicate sysfs entries. So instead switch to use more informative device UUID for sysfs entry like: /sys/bus/tee/devices/optee-ta- Signed-off-by: Maxim Uvarov Reviewed-by: Sumit Garg Reviewed-by: Jarkko Sakkinen Tested-by: Sumit Garg Signed-off-by: Jens Wiklander commit 6627a72c46352220bcd71a1cffeb61e5f57c65a5 Author: Jiaxun Yang Date: Fri Jul 10 14:30:18 2020 +0800 MIPS: KVM: Remove outdated README This file was created long ago and information inside is obviously outdated. Signed-off-by: Jiaxun Yang Message-Id: <20200710063047.154611-4-jiaxun.yang@flygoat.com> Signed-off-by: Paolo Bonzini commit 01edc5e76ecfecf9a79eec2658f6146ef47bc816 Author: Jiaxun Yang Date: Fri Jul 10 14:30:17 2020 +0800 MIPS: KVM: Limit Trap-and-Emulate to MIPS32R2 only After tons of fixes to get Trap-and-Emulate build on Loongson64, I've got panic on host machine when trying to run a VM. I found that it can never work on 64bit systems. Revewing the code, it looks like R6 can't supportrd by TE as well. Signed-off-by: Jiaxun Yang Message-Id: <20200710063047.154611-3-jiaxun.yang@flygoat.com> Signed-off-by: Paolo Bonzini commit 25051b55a2f6f05a15ba60f81e1f529b751aab5b Author: Wei Yongjun Date: Tue Jul 7 18:53:50 2020 +0800 udc: lpc32xx: make symbol 'lpc32xx_usbddata' static The sparse tool complains as follows: drivers/usb/gadget/udc/lpc32xx_udc.c:2989:25: warning: symbol 'lpc32xx_usbddata' was not declared. Should it be static? This variable is not used outside of lpc32xx_udc.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200707105350.7064-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit a74005ab91856276ca5e424a239ebe73347079d8 Author: Gustavo A. R. Silva Date: Tue Jul 7 12:15:00 2020 -0500 usb: gadget: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200707171500.GA13620@embeddedor Signed-off-by: Greg Kroah-Hartman commit 8b84724e9e8445f26fb2f7ccb86f8109ba2427c6 Author: Gustavo A. R. Silva Date: Tue Jul 7 14:50:23 2020 -0500 usb: host: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200707195023.GA3792@embeddedor Signed-off-by: Greg Kroah-Hartman commit e288fc982820e1bf397c873b0cf0cbf876829b7f Author: Gustavo A. R. Silva Date: Tue Jul 7 14:53:51 2020 -0500 USB: OHCI: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200707195351.GA4061@embeddedor Signed-off-by: Greg Kroah-Hartman commit 0d9b6d49fe39bd397f1d5913b1bfb8c4fdef0255 Author: Gustavo A. R. Silva Date: Tue Jul 7 14:56:07 2020 -0500 usb: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200707195607.GA4198@embeddedor Signed-off-by: Greg Kroah-Hartman commit 4e71e079432e3e0c8572a405f5cedf957d4d422c Author: Gustavo A. R. Silva Date: Tue Jul 7 15:00:40 2020 -0500 usb: phy: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200707200040.GA4525@embeddedor Signed-off-by: Greg Kroah-Hartman commit 2d4c7986dbc6f78043df7b946b36996fca8c046f Merge: 428d2459cceb7 da9bbf0598c9e Author: Steffen Klassert Date: Fri Jul 10 07:32:03 2020 +0200 Merge remote-tracking branch 'origin/testing' Xin Long says: ================== Now ipip and ipv6 tunnels processing is supported by xfrm4/6_tunnel, but not in vti and xfrmi. This feature is needed by processing those uncompressed small fragments and packets when using comp protocol. It means vti and xfrmi won't be able to accept small fragments or packets when using comp protocol, which is not expected. xfrm4/6_tunnel eventually calls xfrm_input() to process ipip and ipv6 tunnels with an ipip/ipv6-proto state (a child state of comp-proto state), and vti and xfrmi should do the same. The extra things for vti to do is: - vti_input() should be called before xfrm_input() to set XFRM_TUNNEL_SKB_CB(skb)->tunnel.ip4/6 = tunnel. [A] - vti_rcv_cb() should be called after xfrm_input() to update the skb->dev. [B] And the extra things for xfrmi to do is: - The ipip/ipv6-proto state should be assigned if_id from its parent's state. [C] - xfrmi_rcv_cb() should be called after xfrm_input() to update the skb->dev. [D] Patch 4-7 does the things in [A]. To implement [B] and [D], patch 1-3 is to build a callback function for xfrm4/6_tunnel, which can be called after xfrm_input(), similar to xfrm4/6_protocol's .cb_handler. vti and xfrmi only needs to give their own callback function in patch 4-7 and 9-10, which already exists: vti_rcv_cb() and xfrmi_rcv_cb(). Patch 8 is to do the thing in [C] by assigning child tunnel's if_id from its parent tunnel. With the whole patch series, the segments or packets with any size can work with ipsec comp proto on vti and xfrmi. v1->v2: - See Patch 2-3. v2->v3: - See Patch 2-3, 4, 6, 9-10. ================== Signed-off-by: Steffen Klassert commit bbe1124944de2f78eaf3141d05f957f8391e7899 Author: Roi Dayan Date: Tue Jun 30 15:40:37 2020 +0300 net/mlx5e: CT: Fix releasing ft entries Before this commit, on ft flush, ft entries were not removed from the ct_tuple hashtables. Fix it. Fixes: ac991b48d43c ("net/mlx5e: CT: Offload established flows") Signed-off-by: Roi Dayan Signed-off-by: Eli Britstein Signed-off-by: Saeed Mahameed commit de96d5732a0832b1f69ff7bc573d63ccae999934 Author: Saeed Mahameed Date: Mon May 4 15:53:06 2020 -0700 net/mlx5e: CT: Remove unused function param "flow" parameter is not used in __mlx5_tc_ct_flow_offload_clear(), remove it. Signed-off-by: Saeed Mahameed Reviewed-by: Roi Dayan commit 2acc4551d412607d23fd392d819f3b5bd320de48 Author: Saeed Mahameed Date: Mon May 4 15:52:14 2020 -0700 net/mlx5e: CT: Return err_ptr from internal functions Instead of having to deal with converting between int and ERR_PTR for return values in mlx5_tc_ct_flow_offload(), make the internal helper functions return a ptr to mlx5_flow_handle instead of passing it as output param, this will also avoid gcc confusion and false alarms, thus we remove the redundant ERR_PTR rule initialization. Signed-off-by: Saeed Mahameed Suggested-by: Jason Gunthorpe Reviewed-by: Roi Dayan commit d12f4521d3eff83206a0bb4a9135252ffbf1c3b5 Author: Paul Blakey Date: Tue May 5 16:41:02 2020 +0300 net/mlx5e: CT: Expand tunnel register mappings Reg_c1 is 32 bits wide. Originally, 24 bit were allocated for the tuple_id, 6 bits for tunnel mapping and 2 bits for tunnel options mappings. Restoring the ct state from zone lookup instead of tuple id requires reg_c1 to store 8 bits mapping the ct zone, leaving 24 bits for tunnel mappings. Expand tunnel and tunnel options register mappings to 12 bit each. Signed-off-by: Paul Blakey Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 8f5b3c3ec10cb896c4949b5c26060bd610025dd8 Author: Paul Blakey Date: Tue May 5 16:37:22 2020 +0300 net/mlx5e: CT: Use mapping for zone restore register Use a single byte mapping for zone restore register (zone matching remains 16 bit). This makes room for using the freed 8 bits on register C1 for mapping more tunnels and tunnel options. Signed-off-by: Paul Blakey Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 6702d393557406e986bd6cfe250472b46a76e804 Author: Paul Blakey Date: Tue Feb 18 10:24:07 2020 +0200 net/mlx5e: CT: Re-use tuple modify headers for identical modify actions After removing the tupleid register which changed per tuple, tuple modify headers set the ct_state, zone, mark, and label registers. For non-natted tuples going through the same tc rules path, their values will be the same, and all their modify headers will be the same. Re-use tuple modify header when possible, by adding each new modify header to an hahstable, and looking up identical ones before creating a new one. Signed-off-by: Paul Blakey Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit b2fdf3d04714d4eea2f8a5c011cdd84b428c7df5 Author: Paul Blakey Date: Tue Mar 17 16:32:21 2020 +0200 net/mlx5e: Export sharing of mod headers to a new file Refactor sharing of mod headers to new file and while there, remove spin lock and flows list, as this is only used for warn on. Use the generic API in the next patch to re-use tuple modify headers for identical modify actions, Signed-off-by: Paul Blakey Reviewed-by: Roi Dayan Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit a8eb919ba659adcbed8fd782b3e9a949c3a65b9c Author: Paul Blakey Date: Sun Mar 29 13:50:47 2020 +0300 net/mlx5e: CT: Restore ct state from lookup in zone instead of tupleid Remove tupleid, and replace it with zone_restore, which is the zone an established tuple sets after match. On miss, Use this zone + tuple taken from the skb, to lookup the ct entry and restore it. This improves flow insertion rate by avoiding the allocation of a header rewrite context. Signed-off-by: Paul Blakey Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 7e36feeb04676c7eed0b3fe9196543608bc7ecae Author: Paul Blakey Date: Wed Apr 22 18:00:25 2020 +0300 net/mlx5e: CT: Don't offload tuple rewrites for established tuples Next patches will remove the tupleid registers that is used to restore the ct state on miss, and instead use the tuple on the missed packet to lookup which state to restore. Disable tuple rewrites after connection tracking. For tuple rewrites, inject a ct_state=-trk match so it won't change the tuple for established flows (+trk) that passed connection tracking, and instead miss to software. Signed-off-by: Paul Blakey Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit 3d486ec4fa87a80a57bc588d4520f7d2e866fbc0 Author: Oz Shlomo Date: Mon Jun 1 17:08:55 2020 +0000 net/mlx5e: Use netdev_info instead of pr_info The next patch will pass the mlx5e_priv struct to the modify_header_match_supported method. Use this opportunity to refactor the existing pr_info call to a netdev_info call. Signed-off-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit a7c119bd82a1d937db5b86fcfe1d5f991469c52d Author: Paul Blakey Date: Sun May 3 16:45:02 2020 +0300 net/mlx5e: CT: Allow header rewrite of 5-tuple and ct clear action With ct clear we don't jump to the ct tables, so header rewrite of 5-tuple can be done in place (and not moved to after the CT action). Check for ct clear action, and if so, allow 5-tuple header rewrite. Signed-off-by: Paul Blakey Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit bc562be9674bce9c42dd6d057558d498698a801a Author: Paul Blakey Date: Sun Mar 29 13:07:49 2020 +0300 net/mlx5e: CT: Save ct entries tuples in hashtables Save original tuple and natted tuple in two new hashtables. This is a pre-step for restoring ct state after hw miss by performing a 5-tuple lookup on the hash tables. Signed-off-by: Paul Blakey Reviewed-by: Oz Shlomo Signed-off-by: Saeed Mahameed commit e9716afdcae4ceea3a093e5b2fac1a5df0f943ca Author: Parav Pandit Date: Wed Jun 24 05:56:25 2020 -0500 net/mlx5: E-switch, When eswitch is unsupported, return -EOPNOTSUPP When eswitch is unsupported, currently -EPERM error code is returned instead of -EOPNOTSUPP. Due to this VF device's devlink virtual port is not enumerated because port_function_get() callback returned -EPERM instead of -EOPNOTSUPP. Hence, return the error code -EOPNOTSUPP when eswitch is unsupported. Fixes: bd93975353d5 ("net/mlx5: E-switch, Introduce and use eswitch support check helper") Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit e6bd81a2290f03db8baf761d06071f269dc8e177 Author: Kunihiko Hayashi Date: Wed Jul 8 17:56:18 2020 +0900 arm64: dts: uniphier: Add missing clock-names and reset-names to pcie-phy This adds missing clock-names and reset-names to pcie-phy node according to Documentation/devicetree/bindings/phy/socionext,uniphier-pcie.yaml. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit dcd54fa89ccdba90cb79ab49c01263c3ceb8d683 Author: Kunihiko Hayashi Date: Wed Jul 8 17:54:11 2020 +0900 arm64: dts: uniphier: Rename ethphy node to ethernet-phy This renames the node name "ethphy" to "ethernet-phy" according to Documentation/devicetree/bindings/net/mdio.yaml. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit c60a5cee6ef88a6ae5aff58f30bc2028674a7efd Author: Kunihiko Hayashi Date: Wed Jul 8 17:52:00 2020 +0900 ARM: dts: uniphier: Add PCIe endpoint and PHY node for Pro5 This adds PCIe endpoint controller and PHY nodes for Pro5 SoC, and also adds pinctrl node for PCIe. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit 656d648268df4ef13cd7a4ee6bbf2081f3e826bd Author: Kunihiko Hayashi Date: Wed Jul 8 17:54:10 2020 +0900 ARM: dts: uniphier: Rename ethphy node to ethernet-phy This renames the node name "ethphy" to "ethernet-phy" according to Documentation/devicetree/bindings/net/mdio.yaml. Signed-off-by: Kunihiko Hayashi Signed-off-by: Masahiro Yamada commit afed56d0ff3080d1ab331c42a1c4dbd6b119a578 Author: Anson Huang Date: Tue Jun 16 13:31:07 2020 +0800 dt-bindings: input: Convert imx keypad to json-schema Convert the i.MX KEYPAD binding to DT schema format using json-schema Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1592285467-18371-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 639d6eda3b8036f9a8f9c9ac0d00405878aadda6 Author: Anson Huang Date: Tue Jun 16 13:31:06 2020 +0800 dt-bindings: input: Convert matrix-keymap to json-schema Convert the matrix-keymap binding to DT schema format using json-schema Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1592285467-18371-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 4bdc44347299bf6989319f9cc6d35beaa7d9a4a6 Author: Anson Huang Date: Tue Jun 16 11:50:54 2020 +0800 dt-bindings: i2c: Convert imx i2c to json-schema Convert the i.MX I2C binding to DT schema format using json-schema, some improvements applied, such as update example based on latest DT file, add more compatible for existing SoCs, and remove unnecessary common property "pinctrl". Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1592279454-32551-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit c6d1a7c2ac673e629058a33d77415dad72549df4 Author: Anson Huang Date: Tue Jun 16 11:50:53 2020 +0800 dt-bindings: i2c: Convert mxs i2c to json-schema Convert the MXS I2C binding to DT schema format using json-schema Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1592279454-32551-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 54b27f9287a7b3dfc85549f01fc9d292c92c68b9 Author: Ondrej Mosnacek Date: Thu Jul 9 21:19:52 2020 +0200 selinux: complete the inlining of hashtab functions Move (most of) the definitions of hashtab_search() and hashtab_insert() to the header file. In combination with the previous patch, this avoids calling the callbacks indirectly by function pointers and allows for better optimization, leading to a drastic performance improvement of these operations. With this patch, I measured a speed up in the following areas (measured on x86_64 F32 VM with 4 CPUs): 1. Policy load (`load_policy`) - takes ~150 ms instead of ~230 ms. 2. `chcon -R unconfined_u:object_r:user_tmp_t:s0:c381,c519 /tmp/linux-src` where /tmp/linux-src is an extracted linux-5.7 source tarball - takes ~522 ms instead of ~576 ms. This is because of many symtab_search() calls in string_to_context_struct() when there are many categories specified in the context. 3. `stress-ng --msg 1 --msg-ops 10000000` - takes 12.41 s instead of 13.95 s (consumes 18.6 s of kernel CPU time instead of 21.6 s). This is thanks to security_transition_sid() being ~43% faster after this patch. Signed-off-by: Ondrej Mosnacek Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 24def7bb92c19337cee26d506f87dc4eeeba7a19 Author: Ondrej Mosnacek Date: Thu Jul 9 21:19:51 2020 +0200 selinux: prepare for inlining of hashtab functions Refactor searching and inserting into hashtabs to pave the way for converting hashtab_search() and hashtab_insert() to inline functions in the next patch. This will avoid indirect calls and allow the compiler to better optimize individual callers, leading to a significant performance improvement. In order to avoid the indirect calls, the key hashing and comparison callbacks need to be extracted from the hashtab struct and passed directly to hashtab_search()/_insert() by the callers so that the callback address is always known at compile time. The kernel's rhashtable library () does the same thing. This of course makes the hashtab functions slightly easier to misuse by passing a wrong callback set, but unfortunately there is no better way to implement a hash table that is both generic and efficient in C. This patch tries to somewhat mitigate this by only calling the hashtab functions in the same file where the corresponding callbacks are defined (wrapping them into more specialized functions as needed). Note that this patch doesn't bring any benefit without also moving the definitions of hashtab_search() and -_insert() to the header file, which is done in a follow-up patch for easier review of the hashtab.c changes in this patch. Signed-off-by: Ondrej Mosnacek Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 36b8aacf2a483ba40fbe91c830d314e0bc133044 Author: Wei Yang Date: Fri Jul 3 10:06:10 2020 +0800 tracing: Save one trace_event->type by using __TRACE_LAST_TYPE Static defined trace_event->type stops at (__TRACE_LAST_TYPE - 1) and dynamic trace_event->type starts from (__TRACE_LAST_TYPE + 1). To save one trace_event->type index, let's use __TRACE_LAST_TYPE. Link: https://lkml.kernel.org/r/20200703020612.12930-3-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit 2575b2f3ee711f4638e772e07a5146afcc704f30 Author: Huacai Chen Date: Wed Jul 8 15:59:30 2020 +0800 PCI: Move PCI_VENDOR_ID_REDHAT definition to pci_ids.h Instead of duplicating the PCI_VENDOR_ID_REDHAT definition everywhere, move it to include/linux/pci_ids.h. [bhelgaas: also update MDPY_PCI_VENDOR_ID] Link: https://lore.kernel.org/r/1594195170-11119-1-git-send-email-chenhc@lemote.com Signed-off-by: Huacai Chen Signed-off-by: Bjorn Helgaas Acked-by: Gerd Hoffmann commit 746cf3459f118592a72ef42e7551777ff17b1684 Author: Wei Yang Date: Fri Jul 3 10:06:09 2020 +0800 tracing: Simplify defining of the next event id The value to be used and compared in trace_search_list() is "last + 1". Let's just define next to be "last + 1" instead of doing the addition each time. Link: https://lkml.kernel.org/r/20200703020612.12930-2-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit 3ea4eac3e29f8a63646ddc1bdf90f2efce7d082c Author: Alexander A. Klimov Date: Wed Jul 8 21:44:00 2020 +0200 SPI SUBSYSTEM: Replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200708194400.22213-1-grandmaster@al2klimov.de Signed-off-by: Mark Brown commit 50f06cb1dd82f13a1d3897a327dcd7963ea75707 Author: Colin Ian King Date: Thu Jul 9 11:12:03 2020 +0100 spi: atmel: remove redundant label out_free The error exit label out_free is no longer being used, it is redundant and can be removed. Cleans up warning: drivers/spi/spi-atmel.c:1680:1: warning: label ‘out_free’ defined but not used [-Wunused-label] Fixes: 2d9a744685bc ("spi: atmel: No need to call spi_master_put() if spi_alloc_master() failed") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200709101203.1374117-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 60a883d119ab9ef63f830c85bbd2f0e2e2314f4f Author: Marek Szyprowski Date: Thu Jul 9 08:50:07 2020 +0200 spi: use kthread_create_worker() helper Use kthread_create_worker() helper to simplify the code. It uses the kthread worker API the right way. It will eventually allow to remove the FIXME in kthread_worker_fn() and add more consistency checks in the future. Signed-off-by: Marek Szyprowski Reviewed-by: Petr Mladek Link: https://lore.kernel.org/r/20200709065007.26896-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown commit 03824376465bb6ce99c7436178767faefadbf035 Merge: 1c6579b5ecff8 9e30251fb22ec Author: Mark Brown Date: Thu Jul 9 22:20:35 2020 +0100 Merge series "ASoC: mediatek: mt8183-da7219: support machine driver for rt1015" from Tzung-Bi Shih : This series tries to reuse mt8183-da7219-max98357.c for supporting machine driver with rt1015 speaker amplifier. The first 3 patches refactor the code for easier to change for subsequent patches. The 4th patch adds document for the new proposed compatible string. The 5th patch changes the machine driver to support either "MAX98357A" or "RT1015" codecs. Tzung-Bi Shih (5): ASoC: mediatek: mt8183-da7219: sort header inclusions in alphabetical ASoC: mediatek: mt8183-da7219: remove forward declaration of headset_init ASoC: mediatek: mt8183-da7219: extract codec and DAI names ASoC: mediatek: mt8183-da7219: add compatible string for using rt1015 ASoC: mediatek: mt8183-da7219: support machine driver with rt1015 .../bindings/sound/mt8183-da7219-max98357.txt | 5 +- sound/soc/mediatek/Kconfig | 5 +- .../mediatek/mt8183/mt8183-da7219-max98357.c | 244 ++++++++++++++---- 3 files changed, 197 insertions(+), 57 deletions(-) -- 2.27.0.383.g050319c2ae-goog commit 1c6579b5ecff8f5e0678848214b60448e1f38e7c Merge: a834238961bca be3afa120c5f8 Author: Mark Brown Date: Thu Jul 9 22:20:34 2020 +0100 Merge series "ASoC: codecs: add MAX98373 Soundwire driver" from Pierre-Louis Bossart : V3: Rebased on top of two fixes already merged from the v2 patchset - no code changes Added explicit commit reference in last commit message V2 with a number of cleanups: split between I2C and SoundWire modes, as done for rt5682, and updated Kconfigs. removed useless initializations common to both modes removed idle_bias on fixed register classified as volatile in error fixed SPDX comments Pierre-Louis Bossart (2): ASoC: codecs: max98373: split I2C and common parts ASoC: Intel: sof-sdw: add MAX98373 I2C dependencies Ryan Lee (1): ASoC: codecs: max98373: add SoundWire support randerwang (1): ASoC: Intel: sdw_max98373: add card_late_probe support sound/soc/codecs/Kconfig | 20 +- sound/soc/codecs/Makefile | 4 + sound/soc/codecs/max98373-i2c.c | 612 +++++++++++++++ sound/soc/codecs/max98373-sdw.c | 887 ++++++++++++++++++++++ sound/soc/codecs/max98373-sdw.h | 72 ++ sound/soc/codecs/max98373.c | 611 +-------------- sound/soc/codecs/max98373.h | 17 +- sound/soc/intel/boards/Kconfig | 7 +- sound/soc/intel/boards/sof_sdw.c | 19 +- sound/soc/intel/boards/sof_sdw_common.h | 6 + sound/soc/intel/boards/sof_sdw_max98373.c | 12 + 11 files changed, 1668 insertions(+), 599 deletions(-) create mode 100644 sound/soc/codecs/max98373-i2c.c create mode 100644 sound/soc/codecs/max98373-sdw.c create mode 100644 sound/soc/codecs/max98373-sdw.h base-commit: 6940701c715e193282cf8b31f970b2ea6eb26341 -- 2.25.1 commit a834238961bcaf1f9e6623b8022177d0f9b86e8d Merge: 3e146b55a4f52 56bbfbfdab2b7 Author: Mark Brown Date: Thu Jul 9 22:20:32 2020 +0100 Merge series "ASoC: Clean-up W=1 build warnings​ - part1" from Pierre-Louis Bossart : Both Lee Jones and I submitted separate series, this is the first part of the merged result, which includes all previously reviewed patches or suggested changes along with trivial ones for CONFIG_ACPI. Lee Jones (2): ASoC: codecs: jz4770: Remove defined but never used variable 'mic_boost_tlv' ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w' Pierre-Louis Bossart (11): ASoC: atmel: fix kernel-doc ASoC: samsung: spdif: fix kernel-doc ASoC: samsung: pcm: fix kernel-doc ASoC: tegra: tegra20_das: remove always-true comparison ASoC: uniphier: aio-core: fix kernel-doc ASoC: codecs: da7210: fix kernel-doc ASoC: codecs: da7219: fix 'defined but not used' warning ASoC: codecs: cros_ec_codec: fix 'defined but not used' warning ASoC: codecs: es8316: fix 'defined but not used' warning ASoC: codecs: max98390: fix 'defined but not used' warning ASoC: codecs: rt*: fix 'defined but not used' warning sound/soc/atmel/atmel-pcm-dma.c | 2 +- sound/soc/atmel/atmel_ssc_dai.c | 1 + sound/soc/codecs/cros_ec_codec.c | 2 ++ sound/soc/codecs/da7210.c | 12 +++++++----- sound/soc/codecs/da7219.c | 2 ++ sound/soc/codecs/es8316.c | 2 ++ sound/soc/codecs/jz4770.c | 1 - sound/soc/codecs/max98390.c | 8 -------- sound/soc/codecs/rt274.c | 2 ++ sound/soc/codecs/rt286.c | 2 ++ sound/soc/codecs/rt298.c | 2 ++ sound/soc/codecs/rt5660.c | 2 ++ sound/soc/codecs/rt5677-spi.c | 2 ++ sound/soc/samsung/pcm.c | 5 +++++ sound/soc/samsung/spdif.c | 6 +++--- sound/soc/tegra/tegra20_das.c | 3 +-- sound/soc/ti/omap-mcbsp-st.c | 3 --- sound/soc/uniphier/aio-core.c | 7 +++---- 18 files changed, 37 insertions(+), 27 deletions(-) -- 2.25.1 commit 3e146b55a4f5213b5da0f243813efb380fa7f84d Author: Gustavo A. R. Silva Date: Wed Jul 8 20:03:59 2020 -0500 ASoC: codecs: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200709010359.GA18971@embeddedor Signed-off-by: Mark Brown commit 336c129139cd50faf5bd68acc343da817d13839b Author: Dan Murphy Date: Thu Jul 9 13:51:29 2020 -0500 ASoC: tlv320adcx140: Add tx offset slot programming Add the TX offset slot programming. There is no RX offset slot register. Since there is no RX offset the check for slot symmetry can be removed. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200709185129.10505-2-dmurphy@ti.com Signed-off-by: Mark Brown commit 91cb940c2c953b9282700178b32300e4da84c636 Author: Dan Murphy Date: Thu Jul 9 13:51:28 2020 -0500 ASoC: tlv320adcx140: Add ASI enable for channel 5-8 Add the ALSA controls to enable the ASI for channels 5-8 Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200709185129.10505-1-dmurphy@ti.com Signed-off-by: Mark Brown commit f3c668074a04020c06e434c51b030bad1702aa12 Author: Codrin Ciubotariu Date: Wed Jul 8 19:33:59 2020 +0300 ASoC: atmel-pdmic: remove codec component The CPU and the codec both are represented now as components, so for PDMIC we are registering two componenets with the same name. Since there is no actual codec, we will merge the codec component into the CPU one and use a dummy codec instead, for the DAI link. As a bonus, debugfs will no longer report an error when will try to create entries for both componenets with the same name. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20200708163359.2698696-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 1dfdbe73ccf95765135b1b1ee8335ea3cb16bca0 Author: Codrin Ciubotariu Date: Wed Jul 8 13:12:49 2020 +0300 ASoC: atmel-classd: remove codec component The CPU and the codec both are represented now as components, so for CLASS-D we are registering two componenets with the same name. Since there is no actual codec, we will merge the codec component into the CPU one and use a dummy codec instead, for the DAI link. As a bonus, debugfs will no longer report an error when will try to create entries for both componenets with the same name. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20200708101249.2626560-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 4349f30ecb8068d146a1e57bb12f46e745323b4c Author: Jens Axboe Date: Thu Jul 9 15:07:01 2020 -0600 io_uring: remove dead 'ctx' argument and move forward declaration We don't use 'ctx' at all in io_sq_thread_drop_mm(), it just works on the mm of the current task. Drop the argument. Move io_file_put_work() to where we have the other forward declarations of functions. Signed-off-by: Jens Axboe commit c7c337c5eded50a5a1265a0e8918db66e5982f47 Author: Liao Pingfang Date: Thu Jul 9 15:28:28 2020 +0800 PCI: Fix error in panic message Use kzalloc() instead of kmalloc() in the panic message. [bhelgaas: drop similar ibmphp_pci.c change since it's not obviously correct] Link: https://lore.kernel.org/r/1594279708-34369-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Liao Pingfang Signed-off-by: Yi Wang Signed-off-by: Bjorn Helgaas commit 56bbfbfdab2b79d3b6e370750358702a7aa079ed Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:12 2020 -0500 ASoC: codecs: rt*: fix 'defined but not used' warning Fix W=1 warning when ACPI is not defined Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200707190612.97799-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ce7ed845eb60c119b033057815a4d1d7261367f9 Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:11 2020 -0500 ASoC: codecs: max98390: fix 'defined but not used' warning Fix W=1 warning and removed unused table. In this case this a duplicate of static const struct of_device_id max98390_of_match[] = { { .compatible = "maxim,max98390", }, {} }; MODULE_DEVICE_TABLE(of, max98390_of_match); already used in the rest of the code. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200707190612.97799-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 07ac670981fc5932ca3799ce7d96431d80afce0e Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:10 2020 -0500 ASoC: codecs: es8316: fix 'defined but not used' warning Fix W=1 warning sound/soc/codecs/es8316.c:842:36: warning: 'es8316_acpi_match' defined but not used [-Wunused-const-variable=] 842 | static const struct acpi_device_id es8316_acpi_match[] = { | ^~~~~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200707190612.97799-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fbcde4ffa5feebf07ba57b1158d03f609637a2c1 Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:09 2020 -0500 ASoC: codecs: cros_ec_codec: fix 'defined but not used' warning fix W=1 warning sound/soc/codecs/cros_ec_codec.c:1056:36: warning: 'cros_ec_codec_acpi_id' defined but not used [-Wunused-const-variable=] 1056 | static const struct acpi_device_id cros_ec_codec_acpi_id[] = { | ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200707190612.97799-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0a292439655d3ba6349fb3eb17d8c1b14728e1ba Author: Lee Jones Date: Tue Jul 7 14:06:08 2020 -0500 ASoC: ti: omap-mcbsp-st: Remove set, but unused variable 'w' Looks like 'w' has remained unchecked since the driver's inception. Fixes the following W=1 kernel build warning(s): sound/soc/ti/omap-mcbsp-st.c: In function ‘omap_mcbsp_st_chgain’: sound/soc/ti/omap-mcbsp-st.c:145:6: warning: variable ‘w’ set but not used [-Wunused-but-set-variable] Peter suggested that the whole read can be removed, so that's been done too. Signed-off-by: Lee Jones Signed-off-by: Pierre-Louis Bossart Acked-by: Peter Ujfalusi Cc: Peter Ujfalusi Cc: Jarkko Nikula Cc: Samuel Ortiz Cc: linux-omap@vger.kernel.org Link: https://lore.kernel.org/r/20200707190612.97799-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a7997d67f6c2d1b0e657f7db2dcd447f9db9df6f Author: Lee Jones Date: Tue Jul 7 14:06:07 2020 -0500 ASoC: codecs: jz4770: Remove defined but never used variable 'mic_boost_tlv' Fixes the following W=1 kernel build warning(s): In file included from include/sound/tlv.h:10, from sound/soc/codecs/jz4770.c:19: sound/soc/codecs/jz4770.c:306:35: warning: ‘mic_boost_tlv’ defined but not used [-Wunused-const-variable=] 306 | static const DECLARE_TLV_DB_SCALE(mic_boost_tlv, 0, 400, 0); | ^~~~~~~~~~~~~ include/uapi/sound/tlv.h:64:15: note: in definition of macro ‘SNDRV_CTL_TLVD_DECLARE_DB_SCALE’ 64 | unsigned int name[] = { | ^~~~ sound/soc/codecs/jz4770.c:306:14: note: in expansion of macro ‘DECLARE_TLV_DB_SCALE’ 306 | static const DECLARE_TLV_DB_SCALE(mic_boost_tlv, 0, 400, 0); | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Signed-off-by: Pierre-Louis Bossart Reviewed-by: Paul Cercueil Cc: ter Huurne Link: https://lore.kernel.org/r/20200707190612.97799-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 14310a9644f604e3e2bca7207056d6071c530d04 Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:06 2020 -0500 ASoC: codecs: da7219: fix 'defined but not used' warning fix W=1 warning sound/soc/codecs/da7219.c:1711:36: warning: 'da7219_acpi_match' defined but not used [-Wunused-const-variable=] 1711 | static const struct acpi_device_id da7219_acpi_match[] = { | ^~~~~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Adam Thomson Link: https://lore.kernel.org/r/20200707190612.97799-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d3d0502ae595c29091dac0cda7550f19b913074f Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:05 2020 -0500 ASoC: codecs: da7210: fix kernel-doc Fix W=1 warning, the kernel-doc syntax was probably from Doxygen? Signed-off-by: Pierre-Louis Bossart Acked-by: Adam Thomson Link: https://lore.kernel.org/r/20200707190612.97799-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 891ba284df5e374f6ea4675b66b56eefb9831f1f Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:04 2020 -0500 ASoC: uniphier: aio-core: fix kernel-doc Fix W=1 warning - wrong parameter description and bad format Signed-off-by: Pierre-Louis Bossart Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200707190612.97799-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit cf3804dbd3c4ff5f8c8478fd64190ed9fea7db55 Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:03 2020 -0500 ASoC: tegra: tegra20_das: remove always-true comparison Fix W=1 warning: sound/soc//tegra/tegra20_das.c:101:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 101 | if ((reg >= TEGRA20_DAS_DAP_CTRL_SEL) && | ^~ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Jon Hunter Link: https://lore.kernel.org/r/20200707190612.97799-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b023cc4c4e9eda8cf086107dd7803ec396600703 Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:02 2020 -0500 ASoC: samsung: pcm: fix kernel-doc Fix W=1 warnings - missing fields in structure Credits to Sylwester Nawrocki for the pclk and cclk descriptions. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20200707190612.97799-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 53c512d89fef113033df53f0ab942b815a28b1a4 Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:01 2020 -0500 ASoC: samsung: spdif: fix kernel-doc Fix W=1 warnings - typos with structure fields Signed-off-by: Pierre-Louis Bossart Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20200707190612.97799-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0bdaef8a9c9adc11a640e76132c7dfca6c4831c4 Author: Pierre-Louis Bossart Date: Tue Jul 7 14:06:00 2020 -0500 ASoC: atmel: fix kernel-doc Fix W=1 warning Kernel-doc is not used in one file and missing argument in the second. Signed-off-by: Pierre-Louis Bossart Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200707190612.97799-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 046f3f7f787844fb05162d38e42bb346b8c8d075 Author: Niklas Söderlund Date: Sat Jul 4 18:06:44 2020 +0200 MAINTAINERS: Add ADV7180 bindings documentation Add the YAML dt-bindings document for ADV7180. Signed-off-by: Niklas Söderlund Signed-off-by: Rob Herring commit 12666f4af0dd2d049f171b9b124b168520bbeb31 Author: Niklas Söderlund Date: Sat Jul 4 18:06:43 2020 +0200 dt-bindings: adv7180: Convert bindings to json-schema Convert ADV7180 analog video decoder documentation to json-schema. As the examples in the bindings can be tested add another example to test the more advance adv7180cp binding description. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200704160644.3040636-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Rob Herring commit 2a8eeea76d5fd479c4bf2ad9376252c0546ad782 Merge: ad440432d1f93 0115e6c98c22f Author: Rob Herring Date: Thu Jul 9 14:47:47 2020 -0600 Merge tag 'devicetree-fixes-for-5.8-2' into dt/next Devicetree fixes for v5.8, take 2: - Sync dtc to upstream to pick up fixes for I2C bus checks and quiet warnings - Various fixes for DT binding check warnings - A couple of build fixes/improvements for binding checks - ReST formatting improvements for writing-schema.rst - Document reference fixes commit 541f5643d3ed627ab60d2e4a6c9dc6944b81f4d2 Author: Alexander A. Klimov Date: Wed Jul 8 09:13:37 2020 +0200 Replace HTTP links with HTTPS ones: KMOD KERNEL MODULE LOADER - USERMODE HELPER Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Luis Chamberlain Signed-off-by: Shuah Khan commit 8fb49c0109f47e4a25e8ba36abd8381afbfa7a08 Merge: faea30ed717d7 f3348a82e7279 Author: David S. Miller Date: Thu Jul 9 13:15:30 2020 -0700 Merge branch 'Expose-port-split-attributes' Ido Schimmel says: ==================== Expose port split attributes Danielle says: Currently, user space has no way of knowing if a port can be split and into how many ports. Among other things, this makes it impossible to write generic tests for port split functionality. Therefore, this set exposes two new devlink port attributes to user space: Number of lanes and whether the port can be split or not. Patch set overview: Patches #1-#4 cleanup 'struct devlink_port_attrs' and reduce the number of parameters passed between drivers and devlink via devlink_port_attrs_set() Patch #5 adds devlink port lanes attributes Patches #6-#7 add devlink port splittable attribute Patch #8 exploits the fact that devlink is now aware of port's number of lanes and whether the port can be split or not and moves some checks from drivers to devlink Patch #9 adds a port split test Changes since v2: * Remove some local variables from patch #3 * Reword function description in patch #5 * Fix a bug in patch #8 * Add a test for the splittable attribute in patch #9 Changes since v1: * Rename 'width' attribute to 'lanes' * Add 'splittable' attribute * Move checks from drivers to devlink ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit f3348a82e72795ce218264fd00ef5cf5137836a9 Author: Danielle Ratson Date: Thu Jul 9 16:18:22 2020 +0300 selftests: net: Add port split test Test port split configuration using previously added number of port lanes attribute. Check that all the splittable ports are successfully split to their maximum number of lanes and below, and that those which are not splittable fail to be split. Test output example: TEST: swp4 is unsplittable [ OK ] TEST: split port swp53 into 4 [ OK ] TEST: Unsplit port pci/0000:03:00.0/25 [ OK ] TEST: split port swp53 into 2 [ OK ] TEST: Unsplit port pci/0000:03:00.0/25 [ OK ] Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 82901ad16905832b7a79ff4316302bb59ec4b4ba Author: Danielle Ratson Date: Thu Jul 9 16:18:21 2020 +0300 devlink: Move input checks from driver to devlink Currently, all the input checks are done in driver. After adding the split capability to devlink port, move the checks to devlink. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a0f49b54865273c895be3826d6d59cbc5ad725c2 Author: Danielle Ratson Date: Thu Jul 9 16:18:20 2020 +0300 devlink: Add a new devlink port split ability attribute and pass to netlink Add a new attribute that indicates the split ability of devlink port. Drivers are expected to set it via devlink_port_attrs_set(), before registering the port. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 1b604efb6c28902df306fce610fba761e9c056d2 Author: Danielle Ratson Date: Thu Jul 9 16:18:19 2020 +0300 mlxsw: Set port split ability attribute in driver Currently, port attributes like flavour, port number and whether the port was split are set when initializing a port. Set the split ability of the port as well, based on port_mapping->width field and split attribute of devlink port in spectrum, so that it could be easily passed to devlink in the next patch. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a21cf0a8330bba60e44ca6c99e1591042f336ff5 Author: Danielle Ratson Date: Thu Jul 9 16:18:18 2020 +0300 devlink: Add a new devlink port lanes attribute and pass to netlink Add a new devlink port attribute that indicates the port's number of lanes. Drivers are expected to set it via devlink_port_attrs_set(), before registering the port. The attribute is not passed to user space in case the number of lanes is invalid (0). Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 622d3e9201072aaa94d6291b8dee05e3dd50c3af Author: Danielle Ratson Date: Thu Jul 9 16:18:17 2020 +0300 mlxsw: Set number of port lanes attribute in driver Currently, port attributes like flavour, port number and whether the port was split are set when initializing a port. Set the number of lanes of the port as well so that it could be easily passed to devlink in the next patch. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 71ad8d55f8e5ea101069b552422f392655e2ffb6 Author: Danielle Ratson Date: Thu Jul 9 16:18:16 2020 +0300 devlink: Replace devlink_port_attrs_set parameters with a struct Currently, devlink_port_attrs_set accepts a long list of parameters, that most of them are devlink port's attributes. Use the devlink_port_attrs struct to replace the relevant parameters. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 46737a194945e540e3e2eb1fc870207928a9c2eb Author: Danielle Ratson Date: Thu Jul 9 16:18:15 2020 +0300 devlink: Move switch_port attribute of devlink_port_attrs to devlink_port The struct devlink_port_attrs holds the attributes of devlink_port. Similarly to the previous patch, 'switch_port' attribute is another exception. Move 'switch_port' to be devlink_port's field. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 10a429bab4462581bbda3fd7f41d4ec0ddc5e682 Author: Danielle Ratson Date: Thu Jul 9 16:18:14 2020 +0300 devlink: Move set attribute of devlink_port_attrs to devlink_port The struct devlink_port_attrs holds the attributes of devlink_port. The 'set' field is not devlink_port's attribute as opposed to most of the others. Move 'set' to be devlink_port's field called 'attrs_set'. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit faea30ed717d78e890f3fc0d96ceb6aba2baa4c4 Author: kernel test robot Date: Fri Jul 10 00:06:18 2020 +0800 net: phy: mscc: fix ptr_ret.cocci warnings drivers/net/phy/mscc/mscc_ptp.c:1496: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: 7d272e63e097 ("net: phy: mscc: timestamping and PHC support") CC: Antoine Tenart Signed-off-by: kernel test robot Signed-off-by: David S. Miller commit e3cbdaf146159d2e708e51d168fd5fab793f766b Author: Colin Ian King Date: Wed Jul 8 19:37:23 2020 +0100 net: systemport: fix double shift of a vlan_tci by VLAN_PRIO_SHIFT Currently the u16 skb->vlan_tci is being right shifted twice by VLAN_PRIO_SHIFT, once in the macro skb_vlan_tag_get_pri and explicitly by VLAN_PRIO_SHIFT afterwards. The combined shift amount is larger than the u16 so the end result is always zero. Remove the second explicit shift as this is extraneous. Fixes: 6e9fdb60d362 ("net: systemport: Add support for VLAN transmit acceleration") Addresses-Coverity: ("Operands don't affect result") Signed-off-by: Colin Ian King Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit be3afa120c5f8131ff835a270247b0a9cca0138a Author: randerwang Date: Wed Jul 8 15:32:15 2020 -0500 ASoC: Intel: sdw_max98373: add card_late_probe support Disable Left and Right Spk pin after boot so that sof can get suspended. This follows the same logic added to another machine driver with commit 94d2d0897474 ("ASoC: Intel: Boards: tgl_max98373: add dai_trigger function") Signed-off-by: randerwang Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20200708203215.231776-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit cb468cd5b9e1e1337fe4e9a3255892760d5c83ad Author: Pierre-Louis Bossart Date: Wed Jul 8 15:32:14 2020 -0500 ASoC: Intel: sof-sdw: add MAX98373 I2C dependencies Reflect Kconfig changes and add both SoundWire and I2C modes Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200708203215.231776-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 56a5b7910e965c6905d112ce94fd9a9f5561f326 Author: Ryan Lee Date: Wed Jul 8 15:32:13 2020 -0500 ASoC: codecs: max98373: add SoundWire support Add SoundWire specific parts and extend common ones already split from I2C. Signed-off-by: Ryan Lee Signed-off-by: Naveen Manohar Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200708203215.231776-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d7ee0c722117a6a0830637a3408f2ce1b78afedd Author: Pierre-Louis Bossart Date: Wed Jul 8 15:32:12 2020 -0500 ASoC: codecs: max98373: split I2C and common parts To prepare support for SoundWire, let's first split the I2C and common parts. No new functionality, just indents and formatting to make checkpatch happy. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200708203215.231776-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit aff374dfe7330be10a20c97bd0b3196c153e9f9e Author: Gaurav Singh Date: Tue Jun 23 23:31:25 2020 -0400 platform/x86: intel_pmc_core: fix bound check in pmc_core_mphy_pg_show() Check bounds before accessing map[] array. Signed-off-by: Gaurav Singh Signed-off-by: Andy Shevchenko commit cd85b55cfceff62a95a81eea99859df6336b7d1f Author: Sathyanarayana Nujella Date: Wed Jun 24 23:16:16 2020 -0700 platform/x86: intel_pmc_core: update TGL's LPM0 reg bit map name PMC debug tools use lpm0's 23rd bit to reflect Main PLL, not just Audio PLL. So, update tgl_lpm0 debug reg bit map name. Signed-off-by: Sathyanarayana Nujella Signed-off-by: Arava Jairaj Acked-by: David E. Box Signed-off-by: Andy Shevchenko commit a6146ab8a57b6a84e3643398605ec6f897a69365 Author: Vasiliy Kupriakov Date: Tue Jun 30 20:56:01 2020 +0300 platform/x86: asus-wmi: allow BAT1 battery name The battery on my laptop ASUS TUF Gaming FX706II is named BAT1. This patch allows battery extension to load. Signed-off-by: Vasiliy Kupriakov Signed-off-by: Andy Shevchenko commit 54491304fc2b9532a4031e1b516812ab20545eee Author: Y Paritcher Date: Wed Jun 10 13:56:58 2020 -0400 platform/x86: dell-wmi: add new dmi mapping for keycode 0xffff This keycode is used by Dell as a no-op for keys that should have no function. This keycode is never triggered by a keypress in practice, rather it is included from the 0xB2 DMI table at startup. This prevents the following messages from being logged at startup on a Dell Inspiron 5593: dell_wmi: firmware scancode 0x48 maps to unrecognized keycode 0xffff dell_wmi: firmware scancode 0x50 maps to unrecognized keycode 0xffff as per this code comment: Log if we find an entry in the DMI table that we don't understand. If this happens, we should figure out what the entry means and add it to bios_to_linux_keycode. Signed-off-by: Y Paritcher Signed-off-by: Andy Shevchenko Reviewed-by: Pali Rohár Reviewed-by: Mario Limonciello commit 0c026c361be1734ac84da968d52876c068ab4d75 Author: Y Paritcher Date: Wed Jun 10 13:56:57 2020 -0400 platform/x86: dell-wmi: add new keymap type 0x0012 These are events with extended data. The extended data is currently ignored as userspace does not have a way to deal it. Ignore event with a type of 0x0012 and a code of 0xe035, as the keyboard controller takes care of Fn lock events by itself. This silences the following messages being logged when pressing the Fn-lock key on a Dell Inspiron 5593: dell_wmi: Unknown WMI event type 0x12 dell_wmi: Unknown key with type 0x0012 and code 0xe035 pressed This is consistent with the behavior for the Fn-lock key elsewhere in this file. Signed-off-by: Y Paritcher Signed-off-by: Andy Shevchenko Reviewed-by: Pali Rohár Reviewed-by: Mario Limonciello commit a633c479c6dba290e46bd218d0eba174bc059edb Author: Y Paritcher Date: Wed Jun 10 13:56:56 2020 -0400 platform/x86: dell-wmi: add new backlight events Add events with a type of 0x0010 and a code of 0x57 / 0x58, this silences the following messages being logged on a Dell Inspiron 5593: dell_wmi: Unknown key with type 0x0010 and code 0x0057 pressed dell_wmi: Unknown key with type 0x0010 and code 0x0058 pressed These are brightness events and will be handled by acpi-video Signed-off-by: Y Paritcher Signed-off-by: Andy Shevchenko commit 4b2d688fed57bbe8ea9bd90c069d7e2dc43b137c Author: Hans de Goede Date: Sat Jun 20 14:37:05 2020 +0200 platform/x86: Add new intel_atomisp2_led driver Many Bay Trail and Cherry Trail devices come with a camera attached to Intel's Image Signal Processor. Linux currently does not have a driver for these, so they do not work as a camera. Some of these camera's have a status LED which is controlled through a GPIO in some cases, e.g. on the Asus T100TA and Asus T200TA, there is a firmware issue where the LED gets turned on at boot. This commit adds a Linux LED driver for the camera LED on these devices. This driver will turn the LED off at boot and also allows controlling the LED (so the user can repurpose it) through the sysfs LED interface. Which GPIO is attached to the LED is usually not described in the ACPI tables, so this driver contains per-system info about the GPIO inside the driver. This means that this driver only works on systems the driver knows about. Signed-off-by: Hans de Goede Signed-off-by: Andy Shevchenko commit ddc605f9f862e86b3ef85534bb43dcbc68dea762 Author: Srinivas Pandruvada Date: Wed Jun 24 10:51:38 2020 -0700 platform/x86: ISST: Add new PCI device ids Added new PCI device ids for supporting mailbox and MMIO interface for Sapphire Rapids. Signed-off-by: Srinivas Pandruvada Signed-off-by: Andy Shevchenko commit 526fbaed33e8eac89634a676e5f8e3b41dfae66e Author: Zong Li Date: Tue Jun 16 15:45:46 2020 +0800 riscv: Register System RAM as iomem resources Add System RAM to /proc/iomem, various tools expect it such as kdump. It is also needed for page_is_ram API which checks the specified address whether registered as System RAM in iomem_resource list. Signed-off-by: Zong Li [Palmer: check MEMBLOCK_NOMAP] Signed-off-by: Palmer Dabbelt commit b297bde16c0fb0052e53aa0cfc2ea8ca6ef210aa Author: Chris Wilson Date: Thu Jul 9 20:01:11 2020 +0100 drm/i915/gt: Optimise aliasing-ppgtt allocations Since the aliasing-ppgtt remains the default for gen6/gen7, it is worth optimising the ppgtt allocation for it. In this case, we do not need to flush the GGTT page directories entries as they are fixed during setup. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200709190111.5492-1-chris@chris-wilson.co.uk commit 5b36398dc846a527280f0dbe10c248dd79dbbd91 Author: Nick Shipp Date: Thu Jul 9 15:32:32 2020 -0400 platform/x86: system76-acpi: Fix brightness_set schedule while atomic system76_set() was set as an LED ->brightness_set() callback, but it calls acpi_evaluate_object() which is not atomic-safe. Switch to the ->brightness_set_blocking() LED callback instead. Signed-off-by: Nick Shipp Signed-off-by: Andy Shevchenko commit eca6f176209937695db01a37814308d367781ab6 Author: Andy Shevchenko Date: Tue May 26 15:53:29 2020 +0300 platform/x86: intel_cht_int33fe: Drop double check for ACPI companion device acpi_dev_get_resources() does perform the NULL pointer check against ACPI companion device which is given as function parameter. Thus, there is no need to duplicate this check in the caller. Signed-off-by: Andy Shevchenko commit 034508c4396919d915b14ee736d7cbdb79d6c307 Merge: 5ca670e58dc44 df62f2ec3df69 Author: David S. Miller Date: Thu Jul 9 12:38:41 2020 -0700 Merge branch 'mptcp-introduce-msk-diag-interface' Paolo Abeni says: ==================== mptcp: introduce msk diag interface This series implements the diag interface for the MPTCP sockets. Since the MPTCP protocol value can't be represented with the current diag uAPI, the first patch introduces an extended attribute allowing user-space to specify lager protocol values. The token APIs are then extended to allow traversing the whole token container. Patch 3 carries the actual diag interface implementation, and later patch bring-in some functional self-tests. ==================== Signed-off-by: David S. Miller commit df62f2ec3df698e16bdc3dd44de1d337a9eac6b3 Author: Paolo Abeni Date: Thu Jul 9 15:12:42 2020 +0200 selftests/mptcp: add diag interface tests basic functional test, triggering the msk diag interface code. Require appropriate iproute2 support, skip elsewhere. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit ac3b45f6095452a9731f8825be1513d326dbfa15 Author: Paolo Abeni Date: Thu Jul 9 15:12:41 2020 +0200 mptcp: add MPTCP socket diag interface exposes basic inet socket attribute, plus some MPTCP socket fields comprising PM status and MPTCP-level sequence numbers. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 96d890daad05a3e47e914451f07b79275b325c95 Author: Paolo Abeni Date: Thu Jul 9 15:12:40 2020 +0200 mptcp: add msk interations helper mptcp_token_iter_next() allow traversing all the MPTCP sockets inside the token container belonging to the given network namespace with a quite standard iterator semantic. That will be used by the next patch, but keep the API generic, as we plan to use this later for PM's sake. Additionally export mptcp_token_get_sock(), as it also will be used by the diag module. Reviewed-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 3f935c75eb52dd968351dba824adf466fb9c9429 Author: Paolo Abeni Date: Thu Jul 9 15:12:39 2020 +0200 inet_diag: support for wider protocol numbers After commit bf9765145b85 ("sock: Make sk_protocol a 16-bit value") the current size of 'sdiag_protocol' is not sufficient to represent the possible protocol values. This change introduces a new inet diag request attribute to let user space specify the relevant protocol number using u32 values. The attribute is parsed by inet diag core on get/dump command and the extended protocol value, if available, is preferred to 'sdiag_protocol' to lookup the diag handler. The parse attributed are exposed to all the diag handlers via the cb->data. Note that inet_diag_dump_one_icsk() is left unmodified, as it will not be used by protocol using the extended attribute. Suggested-by: David S. Miller Co-developed-by: Christoph Paasch Signed-off-by: Christoph Paasch Acked-by: Mat Martineau Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 9e30251fb22eccaf2199cdfdc02c90459f83bea7 Author: Tzung-Bi Shih Date: Thu Jul 9 20:24:45 2020 +0800 ASoC: mediatek: mt8183-da7219: support machine driver with rt1015 Supports machine driver with rt1015 ("mt8183-da7219-rt1015"). Embeds in existing mt8183-da7219-max98357.c because they share most of the code. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200709122445.1584497-6-tzungbi@google.com Signed-off-by: Mark Brown commit f739f2ce708cccf1b071e7a1219d932e476b26cd Author: Tzung-Bi Shih Date: Thu Jul 9 20:24:44 2020 +0800 ASoC: mediatek: mt8183-da7219: add compatible string for using rt1015 Machines with rt1015 should use the compatible string "mt8183-da7219-rt1015". Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200709122445.1584497-5-tzungbi@google.com Signed-off-by: Mark Brown commit e5d4bdffc8c89ce253e5663fecd09c893ece7eec Author: Tzung-Bi Shih Date: Thu Jul 9 20:24:43 2020 +0800 ASoC: mediatek: mt8183-da7219: extract codec and DAI names Extracts codec and DAI names of DA7219. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200709122445.1584497-4-tzungbi@google.com Signed-off-by: Mark Brown commit cbafb2cc5f56320acca0b9bec7e4f19f15597cbe Author: Tzung-Bi Shih Date: Thu Jul 9 20:24:42 2020 +0800 ASoC: mediatek: mt8183-da7219: remove forward declaration of headset_init In headset_init(), it can access card by component->card. Removes the forward declaration. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200709122445.1584497-3-tzungbi@google.com Signed-off-by: Mark Brown commit 31add0d56e5c4964009bca8d507ff91350e17b5e Author: Tzung-Bi Shih Date: Thu Jul 9 20:24:41 2020 +0800 ASoC: mediatek: mt8183-da7219: sort header inclusions in alphabetical Sorts header inclusions in alphabetical. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200709122445.1584497-2-tzungbi@google.com Signed-off-by: Mark Brown commit 5ca670e58dc4452b8f47158f0e1238d7d756e8b0 Author: Xu Wang Date: Thu Jul 9 06:48:55 2020 +0000 net: enetc: use eth_broadcast_addr() to assign broadcast This patch is to use eth_broadcast_addr() to assign broadcast address insetad of memset(). Signed-off-by: Xu Wang Signed-off-by: David S. Miller commit f615cb6a8a42c5497b88fbf152f791a1699de9aa Author: José Roberto de Souza Date: Wed Jul 8 13:55:10 2020 -0700 drm/i915/bios: Parse HOBL parameter HOBL means hours of battery life, it is a power-saving feature were supported motherboards can use a special voltage swing table that uses less power. So here parsing the VBT to check if this feature is supported. BSpec: 20150 Reviewed-by: Anusha Srivatsa Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200708205512.21625-3-jose.souza@intel.com commit f0e86e0520977eda55324ae0e0505e2836fad633 Author: José Roberto de Souza Date: Wed Jul 8 13:55:09 2020 -0700 drm/i915/display: Remove port and phy from voltage swing functions This information can be get directly from intel_encoder so no need of those parameters. Signed-off-by: José Roberto de Souza Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200708205512.21625-2-jose.souza@intel.com commit a8143150faa73c424c4d63fbff774a9c06a98ddc Author: José Roberto de Souza Date: Wed Jul 8 13:55:08 2020 -0700 drm/i915/display: Replace drm_i915_private in voltage swing functions by intel_encoder intel_encoder will be needed inside of vswing functions in a future patch, so here doing this change in all vswing functions since HSW. Signed-off-by: José Roberto de Souza Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200708205512.21625-1-jose.souza@intel.com commit 392f9fcb159bf95ec3c7de340a880f4778167275 Author: Ville Syrjälä Date: Wed May 27 16:03:10 2020 +0300 drm/edid: Clean up some curly braces Drop some pointless curly braces, and add some across the else when the if has them too. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200527130310.27099-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 7f261afdcfae363192e3eef52dd34855cc149c15 Author: Ville Syrjälä Date: Wed May 27 16:03:09 2020 +0300 drm/edid: Iterate through all DispID ext blocks Apparently there are EDIDs in the wild with multiple DispID extension blocks. Iterate through them all. In one particular case the tile information is specicied in the second DispID ext block, and since the current parser only looks at the first DispID ext block we don't notice that we're dealing with a tiled display. While at it change a few functions to return void since we have no use for the errno. References: https://gitlab.freedesktop.org/drm/intel/-/issues/27 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200527130310.27099-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 8873cfa384055d0348c03161420b1e9b6c1dc5d0 Author: Ville Syrjälä Date: Wed May 27 16:03:08 2020 +0300 drm/edid: Allow looking for ext blocks starting from a specified index Apparently EDIDs with multiple DispID ext blocks is a thing, so prepare for iterating through multiple ext blocks of the same type by passing the starting ext block index to drm_find_edid_extension(). Well also have drm_find_edid_extension() update the index to point to the next ext block on success. Thus we should be able to call drm_find_edid_extension() in loop. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200527130310.27099-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit d4ad4eca6c04705c9316ae4df18ff9c89e4e27f4 Author: Ville Syrjälä Date: Thu May 14 21:40:40 2020 +0300 drm/dp: Include the AUX CH name in the debug messages To make it easier to figure out what caused a particular debug message let's print out aux->name. v2: Convert drm_dp_send_real_edid_checksum() too Cc: Sam Ravnborg Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200514184040.20700-1-ville.syrjala@linux.intel.com Acked-by: Sam Ravnborg commit 380f3a8b6360442508321026f9dc7f8507a7f526 Author: Sean Christopherson Date: Thu Jul 2 19:35:45 2020 -0700 KVM: MIPS: Use common KVM implementation of MMU memory caches Move to the common MMU memory cache implementation now that the common code and MIPS's existing code are semantically compatible. No functional change intended. Suggested-by: Christoffer Dall Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-22-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 0cdc739b664f429ff1a582e1578421db934b6314 Author: Sean Christopherson Date: Thu Jul 2 19:35:44 2020 -0700 KVM: MIPS: Account pages used for GPA page tables Use GFP_KERNEL_ACCOUNT instead of GFP_KERNEL when allocating pages for the the GPA page tables. The primary motivation for accounting the allocations is to align with the common KVM memory cache helpers in preparation for moving to the common implementation in a future patch. The actual accounting is a bonus side effect. Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-21-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 220a7060d58f4ea7e72c04618b2774228a37468c Author: Sean Christopherson Date: Thu Jul 2 19:35:43 2020 -0700 KVM: MIPS: Drop @max param from mmu_topup_memory_cache() Replace the @max param in mmu_topup_memory_cache() and instead use ARRAY_SIZE() to terminate the loop to fill the cache. This removes a BUG_ON() and sets the stage for moving MIPS to the common memory cache implementation. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-20-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit c1a33aebe91d49c958df1648b2a84db96c403075 Author: Sean Christopherson Date: Thu Jul 2 19:35:42 2020 -0700 KVM: arm64: Use common KVM implementation of MMU memory caches Move to the common MMU memory cache implementation now that the common code and arm64's existing code are semantically compatible. No functional change intended. Cc: Marc Zyngier Suggested-by: Christoffer Dall Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-19-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit e539451b7e7a6cb0248b1e1b1baf8ed40ce16bac Author: Sean Christopherson Date: Thu Jul 2 19:35:41 2020 -0700 KVM: arm64: Use common code's approach for __GFP_ZERO with memory caches Add a "gfp_zero" member to arm64's 'struct kvm_mmu_memory_cache' to make the struct and its usage compatible with the common 'struct kvm_mmu_memory_cache' in linux/kvm_host.h. This will minimize code churn when arm64 moves to the common implementation in a future patch, at the cost of temporarily having somewhat silly code. Note, GFP_PGTABLE_USER is equivalent to GFP_KERNEL_ACCOUNT | GFP_ZERO: #define GFP_PGTABLE_USER (GFP_PGTABLE_KERNEL | __GFP_ACCOUNT) | -> #define GFP_PGTABLE_KERNEL (GFP_KERNEL | __GFP_ZERO) == GFP_KERNEL | __GFP_ACCOUNT | __GFP_ZERO versus #define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT) with __GFP_ZERO explicitly OR'd in == GFP_KERNEL | __GFP_ACCOUNT | __GFP_ZERO No functional change intended. Tested-by: Marc Zyngier Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-18-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 61ffb3a50c4402e17ead1257914ee98fd8c6f2f8 Author: Sean Christopherson Date: Thu Jul 2 19:35:40 2020 -0700 KVM: arm64: Drop @max param from mmu_topup_memory_cache() Replace the @max param in mmu_topup_memory_cache() and instead use ARRAY_SIZE() to terminate the loop to fill the cache. This removes a BUG_ON() and sets the stage for moving arm64 to the common memory cache implementation. No functional change intended. Tested-by: Marc Zyngier Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-17-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 6926f95accee3f8ceb5f69dbecd880687028ae70 Author: Sean Christopherson Date: Thu Jul 2 19:35:39 2020 -0700 KVM: Move x86's MMU memory cache helpers to common KVM code Move x86's memory cache helpers to common KVM code so that they can be reused by arm64 and MIPS in future patches. Suggested-by: Christoffer Dall Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-16-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 2aa9c199cf8151c190c7e7ca3ddfcfbb2d85ac36 Author: Sean Christopherson Date: Thu Jul 2 19:35:38 2020 -0700 KVM: Move x86's version of struct kvm_mmu_memory_cache to common code Move x86's 'struct kvm_mmu_memory_cache' to common code in anticipation of moving the entire x86 implementation code to common KVM and reusing it for arm64 and MIPS. Add a new architecture specific asm/kvm_types.h to control the existence and parameters of the struct. The new header is needed to avoid a chicken-and-egg problem with asm/kvm_host.h as all architectures define instances of the struct in their vCPU structs. Add an asm-generic version of kvm_types.h to avoid having empty files on PPC and s390 in the long term, and for arm64 and mips in the short term. Suggested-by: Christoffer Dall Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-15-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 94ce87ef8177e436c5ee46b211c4e0cf490ae389 Author: Sean Christopherson Date: Thu Jul 2 19:35:37 2020 -0700 KVM: x86/mmu: Prepend "kvm_" to memory cache helpers that will be global Rename the memory helpers that will soon be moved to common code and be made globaly available via linux/kvm_host.h. "mmu" alone is not a sufficient namespace for globally available KVM symbols. Opportunistically add "nr_" in mmu_memory_cache_free_objects() to make it clear the function returns the number of free objects, as opposed to freeing existing objects. Suggested-by: Christoffer Dall Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-14-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 378f5cd64aefd7e8527d40cc69d3aea275521fbc Author: Sean Christopherson Date: Thu Jul 2 19:35:36 2020 -0700 KVM: x86/mmu: Skip filling the gfn cache for guaranteed direct MMU topups Don't bother filling the gfn array cache when the caller is a fully direct MMU, i.e. won't need a gfn array for shadow pages. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-13-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 9688088378d41d7918ee50fc89b6f884212aaa22 Author: Sean Christopherson Date: Thu Jul 2 19:35:35 2020 -0700 KVM: x86/mmu: Zero allocate shadow pages (outside of mmu_lock) Set __GFP_ZERO for the shadow page memory cache and drop the explicit clear_page() from kvm_mmu_get_page(). This moves the cost of zeroing a page to the allocation time of the physical page, i.e. when topping up the memory caches, and thus avoids having to zero out an entire page while holding mmu_lock. Cc: Peter Feiner Cc: Peter Shier Cc: Junaid Shahid Cc: Jim Mattson Suggested-by: Ben Gardon Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-12-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 5f6078f9f1e32b395a78c8d0c0f6598004c668de Author: Sean Christopherson Date: Thu Jul 2 19:35:34 2020 -0700 KVM: x86/mmu: Make __GFP_ZERO a property of the memory cache Add a gfp_zero flag to 'struct kvm_mmu_memory_cache' and use it to control __GFP_ZERO instead of hardcoding a call to kmem_cache_zalloc(). A future patch needs such a flag for the __get_free_page() path, as gfn arrays do not need/want the allocator to zero the memory. Convert the kmem_cache paths to __GFP_ZERO now so as to avoid a weird and inconsistent API in the future. No functional change intended. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-11-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 171a90d70f25c2501162aef5f42eba5fc91c054a Author: Sean Christopherson Date: Thu Jul 2 19:35:33 2020 -0700 KVM: x86/mmu: Separate the memory caches for shadow pages and gfn arrays Use separate caches for allocating shadow pages versus gfn arrays. This sets the stage for specifying __GFP_ZERO when allocating shadow pages without incurring extra cost for gfn arrays. No functional change intended. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-10-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 531281ad98ba7e681e0f8fa3c6d216032a08a123 Author: Sean Christopherson Date: Thu Jul 2 19:35:32 2020 -0700 KVM: x86/mmu: Clean up the gorilla math in mmu_topup_memory_caches() Clean up the minimums in mmu_topup_memory_caches() to document the driving mechanisms behind the minimums. Now that encountering an empty cache is unlikely to trigger BUG_ON(), it is less dangerous to be more precise when defining the minimums. For rmaps, the logic is 1 parent PTE per level, plus a single rmap, and prefetched rmaps. The extra objects in the current '8 + PREFETCH' minimum came about due to an abundance of paranoia in commit c41ef344de212 ("KVM: MMU: increase per-vcpu rmap cache alloc size"), i.e. it could have increased the minimum to 2 rmaps. Furthermore, the unexpected extra rmap case was killed off entirely by commits f759e2b4c728c ("KVM: MMU: avoid pte_list_desc running out in kvm_mmu_pte_write") and f5a1e9f89504f ("KVM: MMU: remove call to kvm_mmu_pte_write from walk_addr"). For the so called page cache, replace '8' with 2*PT64_ROOT_MAX_LEVEL. The 2x multiplier is needed because the cache is used for both shadow pages and gfn arrays for indirect MMUs. And finally, for page headers, replace '4' with PT64_ROOT_MAX_LEVEL. Note, KVM now supports 5-level paging, i.e. the old minimums that used a baseline derived from 4-level paging were technically wrong. But, KVM always allocates roots in a separate flow, e.g. it's impossible in the current implementation to actually need 5 new shadow pages in a single flow. Use PT64_ROOT_MAX_LEVEL unmodified instead of subtracting 1, as the direct usage is likely more intuitive to uninformed readers, and the inflated minimum is unlikely to affect functionality in practice. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-9-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit f3747a5a9e5a26934da8c956ceef42639cbc623c Author: Sean Christopherson Date: Thu Jul 2 19:35:31 2020 -0700 KVM: x86/mmu: Topup memory caches after walking GVA->GPA Topup memory caches after walking the GVA->GPA translation during a shadow page fault, there is no need to ensure the caches are full when walking the GVA. As of commit f5a1e9f89504f ("KVM: MMU: remove call to kvm_mmu_pte_write from walk_addr"), the FNAME(walk_addr) flow no longer add rmaps via kvm_mmu_pte_write(). This avoids allocating memory in the case that the GVA is unmapped in the guest, and also provides a paper trail of why/when the memory caches need to be filled. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-8-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 832914452a9638b713a3ea9a490cbc18f3b164f2 Author: Sean Christopherson Date: Thu Jul 2 19:35:30 2020 -0700 KVM: x86/mmu: Move fast_page_fault() call above mmu_topup_memory_caches() Avoid refilling the memory caches and potentially slow reclaim/swap when handling a fast page fault, which does not need to allocate any new objects. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-7-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 53a3f4877152fe1c1d6c499a49bf573b60f5dc41 Author: Sean Christopherson Date: Thu Jul 2 19:35:29 2020 -0700 KVM: x86/mmu: Try to avoid crashing KVM if a MMU memory cache is empty Attempt to allocate a new object instead of crashing KVM (and likely the kernel) if a memory cache is unexpectedly empty. Use GFP_ATOMIC for the allocation as the caches are used while holding mmu_lock. The immediate BUG_ON() makes the code unnecessarily explosive and led to confusing minimums being used in the past, e.g. allocating 4 objects where 1 would suffice. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 284aa868688ac87d0eac7792b22b9c05f7a3cc45 Author: Sean Christopherson Date: Thu Jul 2 19:35:28 2020 -0700 KVM: x86/mmu: Remove superfluous gotos from mmu_topup_memory_caches() Return errors directly from mmu_topup_memory_caches() instead of branching to a label that does the same. No functional change intended. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 356ec69adfc8c8c82fdc0dd7dc81408f075c784a Author: Sean Christopherson Date: Thu Jul 2 19:35:27 2020 -0700 KVM: x86/mmu: Use consistent "mc" name for kvm_mmu_memory_cache locals Use "mc" for local variables to shorten line lengths and provide consistent names, which will be especially helpful when some of the helpers are moved to common KVM code in future patches. No functional change intended. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 45177cccd9c9a8c540ceb04c4faf451ba54df85e Author: Sean Christopherson Date: Thu Jul 2 19:35:26 2020 -0700 KVM: x86/mmu: Consolidate "page" variant of memory cache helpers Drop the "page" variants of the topup/free memory cache helpers, using the existence of an associated kmem_cache to select the correct alloc or free routine. No functional change intended. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 5962bfb748f8ad90e002411ea4056a15c63b5151 Author: Sean Christopherson Date: Thu Jul 2 19:35:25 2020 -0700 KVM: x86/mmu: Track the associated kmem_cache in the MMU caches Track the kmem_cache used for non-page KVM MMU memory caches instead of passing in the associated kmem_cache when filling the cache. This will allow consolidating code and other cleanups. No functional change intended. Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20200703023545.8771-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 2196dfea896f7027b43bae848890ce4aec5c8724 Author: Sudeep Holla Date: Thu Jul 9 16:49:31 2020 +0100 drm/i915/selftests: Fix compare functions provided for sorting Both cmp_u32 and cmp_u64 are comparing the pointers instead of the value at those pointers. This will result in incorrect/unsorted list. Fix it by deferencing the pointers before comparison. Fixes: 4ba74e53ada3 ("drm/i915/selftests: Verify frequency scaling with RPS") Fixes: 8757797ff9c9 ("drm/i915/selftests: Repeat the rps clock frequency measurement") Cc: Chris Wilson Cc: Mika Kuoppala Signed-off-by: Sudeep Holla Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200709154931.23310-1-sudeep.holla@arm.com commit e2d413f9346149f056ffe083c999e2c136ca6788 Author: Takashi Iwai Date: Thu Jul 9 13:17:50 2020 +0200 ALSA: Replace with fallthrough pseudo keyword in the remaining places A few places (except for ASoC) are left unconverted for the new fallthrough pseudo keyword. Now replace them all. Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200709111750.8337-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 401b3e6e1975b58a29035490a29e4e3c2757373d Author: Takashi Iwai Date: Thu Jul 9 13:17:49 2020 +0200 ALSA: xen: Remove superfluous fall through comments The "fall through" comments found in switch-cases in ALSA xen driver are all superfluous. The kernel coding style allows the multiple cases in a row. Let's remove them. Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200709111750.8337-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit 4d6cd8f1b8735dd5de6bb3a2ec3e3cc5ecf7614e Author: Takashi Iwai Date: Thu Jul 9 13:17:48 2020 +0200 ALSA: atmel: Remove invalid "fall through" comments The comments about fall through in sound/atmel/ac97.c are just superfluous and rather confusing. Let's remove them. Reviewed-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200709111750.8337-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3d702d06cb3c06b34a58f01471e094d8156181ad Author: José Roberto de Souza Date: Wed Jul 8 14:29:47 2020 -0700 drm/i915/tgl: Implement WAs 18011464164 and 22010931296 As today those 2 WAs have different implementation between TGL and DG1 WA pages but checking the HSD it is clear that DG1 implementation should be used for both, also to do so is easier as we just need to extend WA 1407928979 to B* stepping. Both WAs are need to fix some possible render corruptions. DG1 initial patches were not merged yet, as soon it is this WAs should be applied to DG1 as well. BSpec: 53508 BSpec: 52890 Cc: Lucas De Marchi Cc: Ville Syrjälä Signed-off-by: José Roberto de Souza Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200708212947.40178-1-jose.souza@intel.com commit c3f2375b90d0d26f257b926a0d236371df483ca1 Author: Waiman Long Date: Wed Jul 8 10:21:44 2020 -0700 xfs: Fix false positive lockdep warning with sb_internal & fs_reclaim Depending on the workloads, the following circular locking dependency warning between sb_internal (a percpu rwsem) and fs_reclaim (a pseudo lock) may show up: ====================================================== WARNING: possible circular locking dependency detected 5.0.0-rc1+ #60 Tainted: G W ------------------------------------------------------ fsfreeze/4346 is trying to acquire lock: 0000000026f1d784 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.19+0x5/0x30 but task is already holding lock: 0000000072bfc54b (sb_internal){++++}, at: percpu_down_write+0xb4/0x650 which lock already depends on the new lock. : Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sb_internal); lock(fs_reclaim); lock(sb_internal); lock(fs_reclaim); *** DEADLOCK *** 4 locks held by fsfreeze/4346: #0: 00000000b478ef56 (sb_writers#8){++++}, at: percpu_down_write+0xb4/0x650 #1: 000000001ec487a9 (&type->s_umount_key#28){++++}, at: freeze_super+0xda/0x290 #2: 000000003edbd5a0 (sb_pagefaults){++++}, at: percpu_down_write+0xb4/0x650 #3: 0000000072bfc54b (sb_internal){++++}, at: percpu_down_write+0xb4/0x650 stack backtrace: Call Trace: dump_stack+0xe0/0x19a print_circular_bug.isra.10.cold.34+0x2f4/0x435 check_prev_add.constprop.19+0xca1/0x15f0 validate_chain.isra.14+0x11af/0x3b50 __lock_acquire+0x728/0x1200 lock_acquire+0x269/0x5a0 fs_reclaim_acquire.part.19+0x29/0x30 fs_reclaim_acquire+0x19/0x20 kmem_cache_alloc+0x3e/0x3f0 kmem_zone_alloc+0x79/0x150 xfs_trans_alloc+0xfa/0x9d0 xfs_sync_sb+0x86/0x170 xfs_log_sbcount+0x10f/0x140 xfs_quiesce_attr+0x134/0x270 xfs_fs_freeze+0x4a/0x70 freeze_super+0x1af/0x290 do_vfs_ioctl+0xedc/0x16c0 ksys_ioctl+0x41/0x80 __x64_sys_ioctl+0x73/0xa9 do_syscall_64+0x18f/0xd23 entry_SYSCALL_64_after_hwframe+0x49/0xbe This is a false positive as all the dirty pages are flushed out before the filesystem can be frozen. One way to avoid this splat is to add GFP_NOFS to the affected allocation calls by using the memalloc_nofs_save()/memalloc_nofs_restore() pair. This shouldn't matter unless the system is really running out of memory. In that particular case, the filesystem freeze operation may fail while it was succeeding previously. Without this patch, the command sequence below will show that the lock dependency chain sb_internal -> fs_reclaim exists. # fsfreeze -f /home # fsfreeze --unfreeze /home # grep -i fs_reclaim -C 3 /proc/lockdep_chains | grep -C 5 sb_internal After applying the patch, such sb_internal -> fs_reclaim lock dependency chain can no longer be found. Because of that, the locking dependency warning will not be shown. Suggested-by: Dave Chinner Signed-off-by: Waiman Long Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 2da3b53c78be8a11800a3d5053a8ca22b2455c8e Author: Gustavo A. R. Silva Date: Tue Jul 7 14:52:14 2020 -0500 usbip: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200707195214.GA3932@embeddedor Signed-off-by: Greg Kroah-Hartman commit ec326c9d05ef330eb97d962ea69de9be56948dea Author: Randy Dunlap Date: Fri Jul 3 20:45:00 2020 -0700 Documentation/driver-api: usb/URB: drop doubled word Drop the doubled word "also". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20200704034502.17199-16-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit e46d8cb5f147955d77b0517f4bcb45e128d75525 Author: Alexander A. Klimov Date: Wed Jul 8 20:49:03 2020 +0200 USB: storage: replace HTTP links with HTTPS ones Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200708184903.17350-1-grandmaster@al2klimov.de Signed-off-by: Greg Kroah-Hartman commit 2bc9930e78fe0cb3e7b7e3169de0a40baee38d29 Author: Jens Axboe Date: Thu Jul 9 09:43:27 2020 -0600 io_uring: get rid of __req_need_defer() We just have one caller of this, req_need_defer(), just inline the code in there instead. Signed-off-by: Jens Axboe commit b39730a6633d630b2a7bc61e597a0c671eb753b4 Author: Numfor Mbiziwo-Tiapo Date: Mon Jul 29 13:57:50 2019 -0700 perf annotate: Fix non-null terminated buffer returned by readlink() Our local MSAN (Memory Sanitizer) build of perf throws a warning that comes from the "dso__disassemble_filename" function in "tools/perf/util/annotate.c" when running perf record. The warning stems from the call to readlink, in which "build_id_path" was being read into "linkname". Since readlink does not null terminate, an uninitialized memory access would later occur when "linkname" is passed into the strstr function. This is simply fixed by null-terminating "linkname" after the call to readlink. To reproduce this warning, build perf by running: $ make -C tools/perf CLANG=1 CC=clang EXTRA_CFLAGS="-fsanitize=memory -fsanitize-memory-track-origins" (Additionally, llvm might have to be installed and clang might have to be specified as the compiler - export CC=/usr/bin/clang) Then running: tools/perf/perf record -o - ls / | tools/perf/perf --no-pager annotate -i - --stdio Please see the cover letter for why false positive warnings may be generated. Signed-off-by: Numfor Mbiziwo-Tiapo Acked-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Drayton Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20190729205750.193289-1-nums@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f535ad6c73c3306ec10311e4953c6df84d3b46ed Author: Lee Jones Date: Mon Jul 6 14:33:41 2020 +0100 usb: host: xhci-plat: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct usb_xhci_acpi_match becomes defined by unused. Fixes the following W=1 kernel build warning(s): drivers/usb/host/xhci-plat.c:457:36: warning: ‘usb_xhci_acpi_match’ defined but not used [-Wunused-const-variable=] 457 | static const struct acpi_device_id usb_xhci_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~ Cc: Mathias Nyman Cc: Andrzej Siewior Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-33-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a6a6d06f33af1414f0ce506b00d89d44d701fc36 Author: Lee Jones Date: Mon Jul 6 14:33:40 2020 +0100 usb: host: fhci-sched: Remove unused variable 'td' 'td' has been completely unused since the driver's inception in 2009. Fixes the following W=1 kernel build warning(s): drivers/usb/host/fhci-sched.c: In function ‘fhci_queue_urb’: drivers/usb/host/fhci-sched.c:704:13: warning: variable ‘td’ set but not used [-Wunused-but-set-variable] 704 | struct td *td; | ^~ Cc: Shlomi Gridish Cc: Jerry Huang Cc: Peter Barada Cc: Anton Vorontsov Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-32-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit d45f72bc3b19c0d3b6d0c8c534d210abc3268526 Author: Lee Jones Date: Mon Jul 6 14:33:39 2020 +0100 usb: host: fhci-tds: Remove unused variables 'buf' and 'extra_data' Neither have been used since the driver's inception in 2009. Fixes the following W=1 kernel build warning(s): drivers/usb/host/fhci-tds.c: In function ‘fhci_flush_bds’: drivers/usb/host/fhci-tds.c:472:6: warning: variable ‘buf’ set but not used [-Wunused-but-set-variable] 472 | u32 buf; | ^~~ drivers/usb/host/fhci-tds.c:470:6: warning: variable ‘extra_data’ set but not used [-Wunused-but-set-variable] 470 | u16 extra_data; | ^~~~~~~~~~ drivers/usb/host/fhci-tds.c: In function ‘fhci_flush_actual_frame’: drivers/usb/host/fhci-tds.c:527:6: warning: variable ‘extra_data’ set but not used [-Wunused-but-set-variable] 527 | u16 extra_data; | ^~~~~~~~~~ Cc: Shlomi Gridish Cc: Jerry Huang Cc: Peter Barada Cc: Anton Vorontsov Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-31-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b789710de583f069609cc626651556b81e6f23dc Author: Lee Jones Date: Mon Jul 6 14:33:38 2020 +0100 usb: dwc3: dwc3-qcom: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct dwc3_qcom_acpi_match becomes defined by unused. Also need to place the platform data obtained via the matching process inside the #ifdef, else that becomes unused too. Fixes the following W=1 kernel build warning(s): drivers/usb/dwc3/dwc3-qcom.c:761:36: warning: ‘dwc3_qcom_acpi_match’ defined but not used [-Wunused-const-variable=] 761 | static const struct acpi_device_id dwc3_qcom_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~~ Cc: Andy Gross Cc: Bjorn Andersson Cc: Felipe Balbi Cc: Philipp Zabel Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-30-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6dba06ceee70e83f6baa817867560b2272de0f0b Author: Lee Jones Date: Mon Jul 6 14:33:37 2020 +0100 usb: host: ehci-platform: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct ehci_acpi_match becomes defined by unused. Fixes the following W=1 kernel build warning(s): drivers/usb/host/ehci-platform.c:478:36: warning: ‘ehci_acpi_match’ defined but not used [-Wunused-const-variable=] 478 | static const struct acpi_device_id ehci_acpi_match[] = { | ^~~~~~~~~~~~~~~ Cc: Tony Prisk Cc: Alan Stern Cc: Philipp Zabel Cc: Steven Brown Cc: Hauke Mehrtens Cc: de Goede Cc: Michael Buesch Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-29-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 02ec8a098fb3fa2e1d8c1c8ed32c27e70356dafb Author: Lee Jones Date: Mon Jul 6 14:33:36 2020 +0100 usb: early: xhci-dbc: File headers are not good candidates for kerneldoc Demote xhci-dbc's file header to a standard comment block. Fixes the following W=1 kernel build warning(s): drivers/usb/early/xhci-dbc.c:10: warning: Function parameter or member 'fmt' not described in 'pr_fmt' Cc: Lu Baolu Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-28-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f0f705fcfe99301aa7268dbb080cb24ff7787042 Author: Lee Jones Date: Mon Jul 6 14:33:35 2020 +0100 usb: early: xhci-dbc: Supply missing 'xhci-dbgp.h' headerfile If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/usb/early/ehci-dbgp.c: In function ‘early_dbgp_write’: drivers/usb/early/ehci-dbgp.c:915:13: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 915 | int chunk, ret; | ^~~ drivers/usb/early/xhci-dbc.c:600:12: warning: no previous prototype for ‘early_xdbc_parse_parameter’ [-Wmissing-prototypes] 600 | int __init early_xdbc_parse_parameter(char *s) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/usb/early/xhci-dbc.c:653:12: warning: no previous prototype for ‘early_xdbc_setup_hardware’ [-Wmissing-prototypes] 653 | int __init early_xdbc_setup_hardware(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/usb/early/xhci-dbc.c:910:13: warning: no previous prototype for ‘early_xdbc_register_console’ [-Wmissing-prototypes] 910 | void __init early_xdbc_register_console(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Cc: Lu Baolu Signed-off-by: Lee Jones Reviewed-by: Jann Horn Link: https://lore.kernel.org/r/20200706133341.476881-27-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit beb368a4b9cbe67894354b884fa34e8e2e701a92 Author: Lee Jones Date: Mon Jul 6 14:33:34 2020 +0100 usb: early: ehci-dbgp: Remove set but never checked variable 'ret' 'ret' hasn't been checked since the driver's inception in 2009. Fixes the following W=1 kernel build warning(s): drivers/usb/early/ehci-dbgp.c: In function ‘early_dbgp_write’: drivers/usb/early/ehci-dbgp.c:915:13: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 915 | int chunk, ret; | ^~~ Cc: Sumit Garg Cc: Daniel Thompson Cc: Douglas Anderson Cc: Petr Mladek Cc: Yinghai Lu Cc: Jason Wessel Signed-off-by: Lee Jones Acked-by: "Eric W. Biederman" Link: https://lore.kernel.org/r/20200706133341.476881-26-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e6b073dea39bd8bfb02e05f46f27d94dc006e91c Author: Lee Jones Date: Mon Jul 6 14:33:33 2020 +0100 usb: typec: ucsi: ucsi: Staticify and stop export of ucsi_init() It isn't called from anywhere outside of ucsi.c. Fixes the following W=1 kernel build warning(s): drivers/usb/typec/ucsi/ucsi.c:1005:5: warning: no previous prototype for ‘ucsi_init’ [-Wmissing-prototypes] 1005 | int ucsi_init(struct ucsi *ucsi) | ^~~~~~~~~ Cc: Heikki Krogerus Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-25-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1a4f38a6224a891dfec56c7459e4309fe5f073d6 Author: Lee Jones Date: Mon Jul 6 14:33:32 2020 +0100 usb: gadget: udc: max3420_udc: Remove set, but never checked variable 'addr' Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/max3420_udc.c: In function ‘max3420_handle_setup’: drivers/usb/gadget/udc/max3420_udc.c:626:5: warning: variable ‘addr’ set but not used [-Wunused-but-set-variable] 626 | u8 addr; | ^~~~ Cc: Felipe Balbi Cc: Christophe JAILLET Signed-off-by: Lee Jones Acked-by: Jassi Brar Link: https://lore.kernel.org/r/20200706133341.476881-24-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8834f60d6ba2dc3b3855c0b92bce1429ef7da6a5 Author: Lee Jones Date: Mon Jul 6 14:33:31 2020 +0100 usb: gadget: udc: mv_u3d_core: Remove unused static const 'driver_desc' Looks like it's never been used. Driver was mainlined in 2014. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/mv_u3d_core.c:35:19: warning: ‘driver_desc’ defined but not used [-Wunused-const-variable=] 35 | static const char driver_desc[] = DRIVER_DESC; | ^~~~~~~~~~~ Cc: Felipe Balbi Cc: Jason Yan Cc: Yu Xu Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-23-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 15ee5d03d59bb543f2508b4d48993aca2f1afaf2 Author: Lee Jones Date: Mon Jul 6 14:33:30 2020 +0100 usb: host: fotg210-hcd: Demote obvious misuse of kerneldoc to standard comment blocks Only 2 functions attempted to use kerneldoc in this massive file. Fixes the following W=1 kernel build warning(s): drivers/usb/host/fotg210-hcd.c: In function ‘fotg210_run’: drivers/usb/host/fotg210-hcd.c:5013:6: warning: variable ‘hcc_params’ set but not used [-Wunused-but-set-variable] drivers/usb/host/fotg210-hcd.c:5569: warning: Function parameter or member 'pdev' not described in 'fotg210_hcd_probe' drivers/usb/host/fotg210-hcd.c:5666: warning: Function parameter or member 'pdev' not described in 'fotg210_hcd_remove' drivers/usb/host/fotg210-hcd.c:5666: warning: Excess function parameter 'dev' description in 'fotg210_hcd_remove' Cc: Yuan-Hsin Chen Cc: Feng-Hsin Chiang Cc: Po-Yu Chuang Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-22-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit edd935797461bdfe62dc8c8505ffedb6eba4e347 Author: Lee Jones Date: Mon Jul 6 14:33:29 2020 +0100 usb: host: bcma-hcd: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document either of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/host/bcma-hcd.c:180: warning: Function parameter or member 'usb_dev' not described in 'bcma_hcd_usb20_old_arm_init' drivers/usb/host/bcma-hcd.c:268: warning: Function parameter or member 'bcma_hcd' not described in 'bcma_hcd_usb20_ns_init' Cc: Chuhong Yuan Cc: Hauke Mehrtens Cc: Felix Fietkau Cc: Michael Buesch Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-21-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b612b0fa8e6900c25c01dff507ce3e15ffb76bc2 Author: Lee Jones Date: Mon Jul 6 14:33:28 2020 +0100 usb: gadget: function: u_uac1_legacy: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/function/u_uac1_legacy.c:30: warning: Function parameter or member 'i' not described in 'snd_interval_refine_set' drivers/usb/gadget/function/u_uac1_legacy.c:30: warning: Function parameter or member 'val' not described in 'snd_interval_refine_set' drivers/usb/gadget/function/u_uac1_legacy.c:93: warning: Function parameter or member 'snd' not described in 'playback_default_hw_params' drivers/usb/gadget/function/u_uac1_legacy.c:153: warning: Function parameter or member 'card' not described in 'u_audio_playback' drivers/usb/gadget/function/u_uac1_legacy.c:153: warning: Function parameter or member 'buf' not described in 'u_audio_playback' drivers/usb/gadget/function/u_uac1_legacy.c:153: warning: Function parameter or member 'count' not described in 'u_audio_playback' drivers/usb/gadget/function/u_uac1_legacy.c:197: warning: Function parameter or member 'card' not described in 'gaudio_open_snd_dev' drivers/usb/gadget/function/u_uac1_legacy.c:257: warning: Function parameter or member 'gau' not described in 'gaudio_close_snd_dev' drivers/usb/gadget/function/u_uac1_legacy.c:286: warning: Function parameter or member 'card' not described in 'gaudio_setup' drivers/usb/gadget/function/u_uac1_legacy.c:303: warning: Function parameter or member 'the_card' not described in 'gaudio_cleanup' Cc: Felipe Balbi Cc: Bryan Wu Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-20-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 522514e599e3ceb9a34bcdd919db58e243a50cb2 Author: Lee Jones Date: Mon Jul 6 14:33:27 2020 +0100 usb: host: fotg210-hcd: Remove unused variable 'hcc_params' The result is actually read into fotg210->caps->hcc_params. No need to popuate an unused varible with the unchecked return value from fotg210_readl(). Fixes the following W=1 kernel build warning(s): drivers/usb/host/fotg210-hcd.c: In function ‘fotg210_run’: drivers/usb/host/fotg210-hcd.c:5013:6: warning: variable ‘hcc_params’ set but not used [-Wunused-but-set-variable] 5013 | u32 hcc_params; | ^~~~~~~~~~ Cc: Yuan-Hsin Chen Cc: Feng-Hsin Chiang Cc: Po-Yu Chuang Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-19-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1a896833953781d613be7fbb0915840b0d2af216 Author: Lee Jones Date: Mon Jul 6 14:33:26 2020 +0100 usb: host: ehci-fsl: Fix incorrectly named function argument Fixes the following W=1 kernel build warning(s): drivers/usb/host/ehci-fsl.c:694: warning: Function parameter or member 'pdev' not described in 'fsl_ehci_drv_remove' drivers/usb/host/ehci-fsl.c:694: warning: Excess function parameter 'dev' description in 'fsl_ehci_drv_remove' Cc: Alan Stern Cc: Randy Vinson Cc: Dave Liu Cc: Jerry Huang Cc: Anton Vorontsov Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-18-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 709ba38e46f1b9085df0bb84cf0ee1d3494ad43a Author: Lee Jones Date: Mon Jul 6 14:33:25 2020 +0100 usb: host: imx21-hcd: Demote function header which is clearly not kerneldoc No attempt has been made to document the demoted function here. Fixes the following W=1 kernel build warning(s): drivers/usb/host/imx21-hcd.c:233: warning: Function parameter or member 'imx21' not described in 'copy_to_dmem' drivers/usb/host/imx21-hcd.c:233: warning: Function parameter or member 'dmem_offset' not described in 'copy_to_dmem' drivers/usb/host/imx21-hcd.c:233: warning: Function parameter or member 'src' not described in 'copy_to_dmem' drivers/usb/host/imx21-hcd.c:233: warning: Function parameter or member 'count' not described in 'copy_to_dmem' Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Stephen Boyd Cc: Jay Monkman Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-17-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4ef2dfbdcda67a8000a9042fc25f1ed21e75b4d7 Author: Lee Jones Date: Mon Jul 6 14:33:24 2020 +0100 usb: gadget: udc: pch_udc: Fix a plethora of function documentation related issues Ranging from missing descriptions and formatting mishaps to over-documenting of missing arguments, likely due to bitrot. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/pch_udc.c:239: warning: Function parameter or member 'request' not described in 'pch_udc_stp_dma_desc' drivers/usb/gadget/udc/pch_udc.c:315: warning: Function parameter or member 'irq_work_fall' not described in 'pch_vbus_gpio_data' drivers/usb/gadget/udc/pch_udc.c:315: warning: Function parameter or member 'irq_work_rise' not described in 'pch_vbus_gpio_data' drivers/usb/gadget/udc/pch_udc.c:482: warning: Function parameter or member 'ep' not described in 'pch_udc_write_csr' drivers/usb/gadget/udc/pch_udc.c:482: warning: Excess function parameter 'addr' description in 'pch_udc_write_csr' drivers/usb/gadget/udc/pch_udc.c:498: warning: Function parameter or member 'ep' not described in 'pch_udc_read_csr' drivers/usb/gadget/udc/pch_udc.c:498: warning: Excess function parameter 'addr' description in 'pch_udc_read_csr' drivers/usb/gadget/udc/pch_udc.c:662: warning: Function parameter or member 'ep_in' not described in 'pch_udc_ep_set_bufsz' drivers/usb/gadget/udc/pch_udc.c:977: warning: Function parameter or member 'ep' not described in 'pch_udc_ep_enable' drivers/usb/gadget/udc/pch_udc.c:977: warning: Function parameter or member 'cfg' not described in 'pch_udc_ep_enable' drivers/usb/gadget/udc/pch_udc.c:977: warning: Excess function parameter 'regs' description in 'pch_udc_ep_enable' drivers/usb/gadget/udc/pch_udc.c:1010: warning: Function parameter or member 'ep' not described in 'pch_udc_ep_disable' drivers/usb/gadget/udc/pch_udc.c:1010: warning: Excess function parameter 'regs' description in 'pch_udc_ep_disable' drivers/usb/gadget/udc/pch_udc.c:1030: warning: Function parameter or member 'ep' not described in 'pch_udc_wait_ep_stall' drivers/usb/gadget/udc/pch_udc.c:1030: warning: Excess function parameter 'dev' description in 'pch_udc_wait_ep_stall' drivers/usb/gadget/udc/pch_udc.c:1341: warning: Function parameter or member 'data' not described in 'pch_vbus_gpio_irq' drivers/usb/gadget/udc/pch_udc.c:1341: warning: Excess function parameter 'dev' description in 'pch_vbus_gpio_irq' drivers/usb/gadget/udc/pch_udc.c:1365: warning: Function parameter or member 'vbus_gpio_port' not described in 'pch_vbus_gpio_init' drivers/usb/gadget/udc/pch_udc.c:1510: warning: Function parameter or member 'dev' not described in 'pch_udc_free_dma_chain' drivers/usb/gadget/udc/pch_udc.c:1510: warning: Function parameter or member 'req' not described in 'pch_udc_free_dma_chain' drivers/usb/gadget/udc/pch_udc.c:1717: warning: Function parameter or member 'usbep' not described in 'pch_udc_pcd_ep_disable' drivers/usb/gadget/udc/pch_udc.c:2006: warning: Excess function parameter 'halt' description in 'pch_udc_pcd_set_wedge' drivers/usb/gadget/udc/pch_udc.c:2756: warning: Function parameter or member 'pdev' not described in 'pch_udc_isr' drivers/usb/gadget/udc/pch_udc.c:2756: warning: Excess function parameter 'dev' description in 'pch_udc_isr' drivers/usb/gadget/udc/pch_udc.c:2906: warning: Function parameter or member 'dev' not described in 'init_dma_pools' drivers/usb/gadget/udc/pch_udc.c:2906: warning: Excess function parameter 'pdev' description in 'init_dma_pools' Cc: Felipe Balbi Cc: Chuhong Yuan Cc: LAPIS Semiconductor Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-16-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6327bf758093df5e95c2736143b92f03ff8a80e4 Author: Lee Jones Date: Mon Jul 6 14:33:23 2020 +0100 usb: gadget: udc: mv_udc_core: Remove unused static const variable 'driver_desc' Looks as though it's never been used. Driver was introduced in 2014. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/mv_udc_core.c:56:19: warning: ‘driver_desc’ defined but not used [-Wunused-const-variable=] 56 | static const char driver_desc[] = DRIVER_DESC; | ^~~~~~~~~~~ Cc: Felipe Balbi Cc: Chao Xie Cc: Neil Zhang Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-15-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 33a4eeb1a67390dd2d485ec4918e87e931bf993f Author: Lee Jones Date: Mon Jul 6 14:33:22 2020 +0100 usb: host: r8a66597-hcd: Remove set, then over-written, but never used variable 'tmp' Looks like it's been this way since the driver's inception in 2007. Fixes the following W=1 kernel build warning(s): drivers/usb/host/r8a66597-hcd.c: In function ‘clear_all_buffer’: drivers/usb/host/r8a66597-hcd.c:478:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] 478 | u16 tmp; | ^~~ Cc: Yoshihiro Shimoda Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-14-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 120d91dae6c9121c82786c163bd414daae1db838 Author: Lee Jones Date: Mon Jul 6 14:33:21 2020 +0100 usb: gadget: udc: lpc32xx_udc: Staticify 2 local functions These are not used outside of this sourcefile, so make them static. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/lpc32xx_udc.c:1929:6: warning: no previous prototype for ‘udc_send_in_zlp’ [-Wmissing-prototypes] 1929 | void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep) | ^~~~~~~~~~~~~~~ drivers/usb/gadget/udc/lpc32xx_udc.c:1943:6: warning: no previous prototype for ‘udc_handle_eps’ [-Wmissing-prototypes] 1943 | void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep) | ^~~~~~~~~~~~~~ Cc: Felipe Balbi Cc: Sylvain Lemieux Cc: Kevin Wells Cc: Roland Stigge Signed-off-by: Lee Jones Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/r/20200706133341.476881-13-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8f9a0e10057e29ebaad76513c01924c2b82a0067 Author: Lee Jones Date: Mon Jul 6 14:33:20 2020 +0100 usb: gadget: function: f_fs: Demote function header which is clearly not kerneldoc No attempt has been made to document the demoted function here. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/function/f_fs.c:2361: warning: Function parameter or member 'type' not described in '__ffs_data_do_os_desc' drivers/usb/gadget/function/f_fs.c:2361: warning: Function parameter or member 'h' not described in '__ffs_data_do_os_desc' drivers/usb/gadget/function/f_fs.c:2361: warning: Function parameter or member 'data' not described in '__ffs_data_do_os_desc' drivers/usb/gadget/function/f_fs.c:2361: warning: Function parameter or member 'len' not described in '__ffs_data_do_os_desc' drivers/usb/gadget/function/f_fs.c:2361: warning: Function parameter or member 'priv' not described in '__ffs_data_do_os_desc' Cc: Felipe Balbi Cc: David Howells Cc: Michal Nazarewicz Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-12-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5d1d4818d21d838b46f456af68fc53297716a529 Author: Lee Jones Date: Mon Jul 6 14:33:19 2020 +0100 usb: gadget: legacy: nokia: Remove unused static variable 'product_nokia' Looks as though it's never been used. Driver was introduced in 2010. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/legacy/nokia.c:65:19: warning: ‘product_nokia’ defined but not used [-Wunused-const-variable=] 65 | static const char product_nokia[] = NOKIA_LONG_NAME; | ^~~~~~~~~~~~~ Cc: Felipe Balbi Cc: Al Borchers Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 14602c55cb738303f2b48bd0392320f2911a58d6 Author: Lee Jones Date: Mon Jul 6 14:33:18 2020 +0100 usb: gadget: udc: atmel_usba_udc: Remove set but unused variable 'pp' Commit e78355b577c4b ("usb: gadget: udc: atmel: Don't use DT to configure end point") pulled out all functionality dealing with 'pp'. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/atmel_usba_udc.c: In function ‘atmel_udc_of_init’: drivers/usb/gadget/udc/atmel_usba_udc.c:2106:22: warning: variable ‘pp’ set but not used [-Wunused-but-set-variable] 2106 | struct device_node *pp; | ^~ Cc: Cristian Birsan Cc: Felipe Balbi Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-10-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4ac2c4606ac8a796e397ff542fb9fda6d936e239 Author: Lee Jones Date: Mon Jul 6 14:33:16 2020 +0100 usb: misc: legousbtower: Demote function header which is clearly not kerneldoc Fixes the following W=1 kernel build warning(s): drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'dev' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'function' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'size' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'data' not described in 'lego_usb_tower_debug_data' Cc: Juergen Stuber Cc: David Glance Cc: david Cc: legousb-devel@lists.sourceforge.net Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4ee383c7e050d65582206db409098ddd7c99f726 Author: Lee Jones Date: Mon Jul 6 14:33:15 2020 +0100 usb: gadget: udc: pxa27x_udc: Fix a bunch of kerneldoc issues Mostly bitrotted argument descriptions/names. Also the removal of a blank line in the middle of a kerneldoc header, which is not allowed. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/pxa27x_udc.c:398: warning: Function parameter or member 'ep' not described in 'ep_write_UDCCSR' drivers/usb/gadget/udc/pxa27x_udc.c:398: warning: Excess function parameter 'udc' description in 'ep_write_UDCCSR' drivers/usb/gadget/udc/pxa27x_udc.c:479: warning: Function parameter or member 'udc' not described in 'set_ep0state' drivers/usb/gadget/udc/pxa27x_udc.c:479: warning: Excess function parameter 'dev' description in 'set_ep0state' drivers/usb/gadget/udc/pxa27x_udc.c:506: warning: Excess function parameter 'req' description in 'inc_ep_stats_reqs' drivers/usb/gadget/udc/pxa27x_udc.c:1476: warning: bad line: drivers/usb/gadget/udc/pxa27x_udc.c:1697: warning: Function parameter or member 'udc' not described in 'udc_enable' drivers/usb/gadget/udc/pxa27x_udc.c:1697: warning: Excess function parameter 'dev' description in 'udc_enable' drivers/usb/gadget/udc/pxa27x_udc.c:1750: warning: Function parameter or member 'g' not described in 'pxa27x_udc_start' drivers/usb/gadget/udc/pxa27x_udc.c:1750: warning: Excess function parameter 'bind' description in 'pxa27x_udc_start' drivers/usb/gadget/udc/pxa27x_udc.c:1784: warning: Excess function parameter 'driver' description in 'stop_activity' drivers/usb/gadget/udc/pxa27x_udc.c:1800: warning: Function parameter or member 'g' not described in 'pxa27x_udc_stop' drivers/usb/gadget/udc/pxa27x_udc.c:1800: warning: Excess function parameter 'driver' description in 'pxa27x_udc_stop' drivers/usb/gadget/udc/pxa27x_udc.c:2358: warning: Function parameter or member 'pdev' not described in 'pxa_udc_probe' drivers/usb/gadget/udc/pxa27x_udc.c:2358: warning: Excess function parameter '_dev' description in 'pxa_udc_probe' Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Cc: Felipe Balbi Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b1e4d550ca12eae06d5f3860a105cc9abeae5094 Author: Lee Jones Date: Mon Jul 6 14:33:14 2020 +0100 usb: gadget: function: u_ether: Downgrade kerneldoc headers which to not make the mark Kerneldoc expects all function arguments to be documented. If any are missed it will complain. Downgrade one header with 3 missing argument descriptions and one which makes no attempt. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/function/u_ether.c:750: warning: Function parameter or member 'dev_addr' not described in 'gether_setup_name' drivers/usb/gadget/function/u_ether.c:750: warning: Function parameter or member 'host_addr' not described in 'gether_setup_name' drivers/usb/gadget/function/u_ether.c:750: warning: Function parameter or member 'qmult' not described in 'gether_setup_name' drivers/usb/gadget/function/u_ether.c:1022: warning: Function parameter or member 'dev' not described in 'gether_cleanup' Cc: Felipe Balbi Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5307011537981459b2ba7bc1b7460cc7ceee74f2 Author: Lee Jones Date: Mon Jul 6 14:33:13 2020 +0100 usb: gadget: udc: amd5536udc_pci: Remove unused variable 'mod_desc' Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/amd5536udc_pci.c:52:19: warning: ‘mod_desc’ defined but not used [-Wunused-const-variable=] Cc: Felipe Balbi Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 89dd9a8c27f841704b527810f9180f06c351b89b Author: Lee Jones Date: Mon Jul 6 14:33:12 2020 +0100 usb: gadget: legacy: printer: Remove unused variable 'driver_desc' Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/legacy/printer.c:24:19: warning: ‘driver_desc’ defined but not used [-Wunused-const-variable=] Cc: Felipe Balbi Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f2db5f20bbfe2f459ad0b3ddec46fe3d002635e6 Author: Lee Jones Date: Mon Jul 6 14:33:11 2020 +0100 usb: chipidea: ci_hdrc_pci: Fix improper use of kerneldoc format No attempt has been made to document any of the structure's properties here. Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/ci_hdrc_pci.c:132: warning: cannot understand function prototype: 'const struct pci_device_id ci_hdrc_pci_id_table[] = ' Cc: Peter Chen Cc: David Lopo Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 464b7d0e538ef26a0f431f0d734acbaeab3a5767 Author: Lee Jones Date: Mon Jul 6 14:33:10 2020 +0100 usb: misc: legousbtower: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'dev' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'function' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'size' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:280: warning: Function parameter or member 'data' not described in 'lego_usb_tower_debug_data' drivers/usb/misc/legousbtower.c:290: warning: Function parameter or member 'dev' not described in 'tower_delete' drivers/usb/misc/legousbtower.c:306: warning: Function parameter or member 'inode' not described in 'tower_open' drivers/usb/misc/legousbtower.c:306: warning: Function parameter or member 'file' not described in 'tower_open' drivers/usb/misc/legousbtower.c:405: warning: Function parameter or member 'inode' not described in 'tower_release' drivers/usb/misc/legousbtower.c:405: warning: Function parameter or member 'file' not described in 'tower_release' drivers/usb/misc/legousbtower.c:452: warning: Function parameter or member 'dev' not described in 'tower_check_for_read_packet' drivers/usb/misc/legousbtower.c:468: warning: Function parameter or member 'file' not described in 'tower_poll' drivers/usb/misc/legousbtower.c:468: warning: Function parameter or member 'wait' not described in 'tower_poll' drivers/usb/misc/legousbtower.c:494: warning: Function parameter or member 'file' not described in 'tower_llseek' drivers/usb/misc/legousbtower.c:494: warning: Function parameter or member 'off' not described in 'tower_llseek' drivers/usb/misc/legousbtower.c:494: warning: Function parameter or member 'whence' not described in 'tower_llseek' drivers/usb/misc/legousbtower.c:503: warning: Function parameter or member 'file' not described in 'tower_read' drivers/usb/misc/legousbtower.c:503: warning: Function parameter or member 'buffer' not described in 'tower_read' drivers/usb/misc/legousbtower.c:503: warning: Function parameter or member 'count' not described in 'tower_read' drivers/usb/misc/legousbtower.c:503: warning: Function parameter or member 'ppos' not described in 'tower_read' drivers/usb/misc/legousbtower.c:587: warning: Function parameter or member 'file' not described in 'tower_write' drivers/usb/misc/legousbtower.c:587: warning: Function parameter or member 'buffer' not described in 'tower_write' drivers/usb/misc/legousbtower.c:587: warning: Function parameter or member 'count' not described in 'tower_write' drivers/usb/misc/legousbtower.c:587: warning: Function parameter or member 'ppos' not described in 'tower_write' drivers/usb/misc/legousbtower.c:669: warning: Function parameter or member 'urb' not described in 'tower_interrupt_in_callback' drivers/usb/misc/legousbtower.c:724: warning: Function parameter or member 'urb' not described in 'tower_interrupt_out_callback' drivers/usb/misc/legousbtower.c:752: warning: Function parameter or member 'interface' not described in 'tower_probe' drivers/usb/misc/legousbtower.c:752: warning: Function parameter or member 'id' not described in 'tower_probe' drivers/usb/misc/legousbtower.c:863: warning: Function parameter or member 'interface' not described in 'tower_disconnect' Cc: Juergen Stuber Cc: David Glance Cc: david Cc: legousb-devel@lists.sourceforge.net Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4672a4a9fbfe316e1153682b0790af6446255a50 Merge: 93e0272a43958 a6175e894d880 Author: Linus Walleij Date: Thu Jul 9 17:06:28 2020 +0200 Merge branch 'devel' into for-next commit 66f84901b0a70c4436e31c1a2359a862a2177fb8 Author: Lee Jones Date: Fri Jul 3 18:41:48 2020 +0100 usb: gadget: udc: dummy_hcd: Repair misspelled function argument 'dummy_hcd' An attempt was made to document the functions in 'dummy_hcd', but a simple spelling mistake was made. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/dummy_hcd.c:1597: warning: Function parameter or member 'dum_hcd' not described in 'handle_control_request' drivers/usb/gadget/udc/dummy_hcd.c:1597: warning: Excess function parameter 'dum' description in 'handle_control_request' Cc: Felipe Balbi Cc: Andrey Konovalov Cc: Alan Stern Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-31-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 09e03a89da11c78e53d1dfc3f324dd0ed89a1e8d Author: Lee Jones Date: Fri Jul 3 18:41:46 2020 +0100 usb: musb: musb_dsps: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/musb/musb_dsps.c:44: warning: cannot understand function prototype: 'struct dsps_musb_wrapper ' drivers/usb/musb/musb_dsps.c:102: warning: cannot understand function prototype: 'struct dsps_glue ' drivers/usb/musb/musb_dsps.c:169: warning: Function parameter or member 'musb' not described in 'dsps_musb_enable' drivers/usb/musb/musb_dsps.c:195: warning: Function parameter or member 'musb' not described in 'dsps_musb_disable' Cc: Bin Liu Cc: Ravi B Cc: Kumar Gupta Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-29-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7e8455b1585e241527105d850a6d261c289c1417 Author: Lee Jones Date: Fri Jul 3 18:41:45 2020 +0100 usb: misc: ldusb: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/misc/ldusb.c:192: warning: Function parameter or member 'dev' not described in 'ld_usb_abort_transfers' drivers/usb/misc/ldusb.c:206: warning: Function parameter or member 'dev' not described in 'ld_usb_delete' drivers/usb/misc/ldusb.c:220: warning: Function parameter or member 'urb' not described in 'ld_usb_interrupt_in_callback' drivers/usb/misc/ldusb.c:281: warning: Function parameter or member 'urb' not described in 'ld_usb_interrupt_out_callback' drivers/usb/misc/ldusb.c:301: warning: Function parameter or member 'inode' not described in 'ld_usb_open' drivers/usb/misc/ldusb.c:301: warning: Function parameter or member 'file' not described in 'ld_usb_open' drivers/usb/misc/ldusb.c:372: warning: Function parameter or member 'inode' not described in 'ld_usb_release' drivers/usb/misc/ldusb.c:372: warning: Function parameter or member 'file' not described in 'ld_usb_release' drivers/usb/misc/ldusb.c:414: warning: Function parameter or member 'file' not described in 'ld_usb_poll' drivers/usb/misc/ldusb.c:414: warning: Function parameter or member 'wait' not described in 'ld_usb_poll' drivers/usb/misc/ldusb.c:439: warning: Function parameter or member 'file' not described in 'ld_usb_read' drivers/usb/misc/ldusb.c:439: warning: Function parameter or member 'buffer' not described in 'ld_usb_read' drivers/usb/misc/ldusb.c:439: warning: Function parameter or member 'count' not described in 'ld_usb_read' drivers/usb/misc/ldusb.c:439: warning: Function parameter or member 'ppos' not described in 'ld_usb_read' drivers/usb/misc/ldusb.c:526: warning: Function parameter or member 'file' not described in 'ld_usb_write' drivers/usb/misc/ldusb.c:526: warning: Function parameter or member 'buffer' not described in 'ld_usb_write' drivers/usb/misc/ldusb.c:526: warning: Function parameter or member 'count' not described in 'ld_usb_write' drivers/usb/misc/ldusb.c:526: warning: Function parameter or member 'ppos' not described in 'ld_usb_write' drivers/usb/misc/ldusb.c:651: warning: Function parameter or member 'intf' not described in 'ld_usb_probe' drivers/usb/misc/ldusb.c:651: warning: Function parameter or member 'id' not described in 'ld_usb_probe' drivers/usb/misc/ldusb.c:754: warning: Function parameter or member 'intf' not described in 'ld_usb_disconnect' Cc: Johan Hovold Cc: Michael Hund Cc: David Glance Cc: Juergen Stuber Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-28-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 1ba1f1414b543f53e00d43fee6f6239cb519dae1 Author: Lee Jones Date: Fri Jul 3 18:41:44 2020 +0100 usb: gadget: function: u_serial: Repair misdocumented function argument Looks as though this has been an issue since the driver's inception back in 2014. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/function/u_serial.c:538: warning: Function parameter or member 'port' not described in 'gs_start_io' drivers/usb/gadget/function/u_serial.c:538: warning: Excess function parameter 'dev' description in 'gs_start_io' Cc: Felipe Balbi Cc: "Michał Mirosław" Cc: Al Borchers Cc: Peter Berger Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-27-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit c16700ed237947977436d76525d8de65fbb3446c Author: Lee Jones Date: Fri Jul 3 18:41:43 2020 +0100 usb: misc: iowarrior: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/misc/iowarrior.c:251: warning: Function parameter or member 'dev' not described in 'iowarrior_delete' drivers/usb/misc/iowarrior.c:279: warning: Function parameter or member 'file' not described in 'iowarrior_read' drivers/usb/misc/iowarrior.c:279: warning: Function parameter or member 'buffer' not described in 'iowarrior_read' drivers/usb/misc/iowarrior.c:279: warning: Function parameter or member 'count' not described in 'iowarrior_read' drivers/usb/misc/iowarrior.c:279: warning: Function parameter or member 'ppos' not described in 'iowarrior_read' drivers/usb/misc/iowarrior.c:483: warning: Function parameter or member 'file' not described in 'iowarrior_ioctl' drivers/usb/misc/iowarrior.c:483: warning: Function parameter or member 'cmd' not described in 'iowarrior_ioctl' drivers/usb/misc/iowarrior.c:483: warning: Function parameter or member 'arg' not described in 'iowarrior_ioctl' drivers/usb/misc/iowarrior.c:599: warning: Function parameter or member 'inode' not described in 'iowarrior_open' drivers/usb/misc/iowarrior.c:599: warning: Function parameter or member 'file' not described in 'iowarrior_open' drivers/usb/misc/iowarrior.c:647: warning: Function parameter or member 'inode' not described in 'iowarrior_release' drivers/usb/misc/iowarrior.c:647: warning: Function parameter or member 'file' not described in 'iowarrior_release' drivers/usb/misc/iowarrior.c:753: warning: Function parameter or member 'interface' not described in 'iowarrior_probe' drivers/usb/misc/iowarrior.c:753: warning: Function parameter or member 'id' not described in 'iowarrior_probe' drivers/usb/misc/iowarrior.c:879: warning: Function parameter or member 'interface' not described in 'iowarrior_disconnect' Cc: Johan Hovold Cc: Christian Lucht Cc: Stephane Dalton Cc: Stephane Doyon Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-26-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2ba277a0cff64d339f56471896ced46604d9f4ce Author: Lee Jones Date: Fri Jul 3 18:41:42 2020 +0100 usb: misc: iowarrior: Fix odd corruption issue in the file header Looks although Stephane's name was corrupted somehow. Cc: Johan Hovold Cc: Christian Lucht Cc: Stephane Dalton Cc: Stephane Doyon Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-25-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 20f81da90145ee08a49e9d254957e001c237e467 Author: Lee Jones Date: Fri Jul 3 18:41:41 2020 +0100 usb: chipidea: usbmisc_imx: Demote obvious misuse of kerneldoc to standard comment block No attempt has been made to document the demoted function here. Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/usbmisc_imx.c:801: warning: Function parameter or member 'data' not described in 'imx7d_charger_detection' Cc: Peter Chen Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: Richard Zhao Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-24-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 71be1a8aef82e9fee27eab4eaa818492eb846e29 Author: Lee Jones Date: Fri Jul 3 18:41:40 2020 +0100 usb: typec: tcpm: fusb302: Use 'gnu_printf' format notation Fixes the following W=1 kernel build warning(s): drivers/usb/typec/tcpm/fusb302.c: In function ‘fusb302_log’: drivers/usb/typec/tcpm/fusb302.c:186:2: warning: function ‘fusb302_log’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 186 | _fusb302_log(chip, fmt, args); | ^~~~~~~~~~~~ Cc: Heikki Krogerus Cc: Yueyao Zhu Signed-off-by: Lee Jones Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20200703174148.2749969-23-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 318ebed29718daa2ffbe7be52ad2279d01efdf08 Author: Lee Jones Date: Fri Jul 3 18:41:39 2020 +0100 usb: typec: altmodes: displayport: Supply missing displayport.h include file If the header file containing a function's prototype isn't included by the sourcefile containing the associated function, the build system complains of missing prototypes. Fixes the following W=1 kernel build warning(s): drivers/usb/typec/altmodes/displayport.c:511:5: warning: no previous prototype for ‘dp_altmode_probe’ [-Wmissing-prototypes] drivers/usb/typec/altmodes/displayport.c:551:6: warning: no previous prototype for ‘dp_altmode_remove’ [-Wmissing-prototypes] Cc: Heikki Krogerus Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-22-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 50c9bd05df6f53f255b1a303da06582009e6d0c5 Author: Lee Jones Date: Fri Jul 3 18:41:38 2020 +0100 usb: typec: altmodes: displayport: File headers are not good candidates for kerneldoc Demote displayport's file header to a standard comment block. Fixes the following W=1 kernel build warning(s): drivers/usb/typec/altmodes/displayport.c:18: warning: Function parameter or member '_dp' not described in 'DP_HEADER' drivers/usb/typec/altmodes/displayport.c:18: warning: Function parameter or member 'cmd' not described in 'DP_HEADER' Cc: Heikki Krogerus Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-21-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7565fce17d19d9f0ab9062cb30653608d5d0cfad Author: Lee Jones Date: Fri Jul 3 18:41:37 2020 +0100 usb: storage: alauda: Remove set but unchecked variable The return value of alauda_get_media_status() hasn't been checked since the driver's inception back in 2005. If nothing have gone wrong/been detected until this point, it's probably safe to just remove the variable. Fixes the following W=1 kernel build warning(s): drivers/usb/storage/alauda.c: In function ‘alauda_check_media’: drivers/usb/storage/alauda.c:456:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] 456 | int rc; | ^~ Cc: Alan Stern Cc: Daniel Drake Cc: usb-storage@lists.one-eyed-alien.net Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-20-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 142c8bb6c516a4caed569a68589489d4d91377e6 Author: Lee Jones Date: Fri Jul 3 18:41:36 2020 +0100 usb: host: xhci-debugfs: Use 'gnu_printf' format notation Fixes the following W=1 kernel build warning(s): drivers/usb/host/xhci-debugfs.c:128:2: warning: function ‘xhci_debugfs_regset’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 128 | vsnprintf(rgs->name, sizeof(rgs->name), fmt, args); | ^~~~~~~~~ Cc: Mathias Nyman Cc: Lu Baolu Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-19-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f2926dd5938e278652cdec85cafe5f727997877a Author: Lee Jones Date: Fri Jul 3 18:41:35 2020 +0100 usb: chipidea: udc: Fix a few kerneldoc issues Descriptions were missing for 'ci' almost throughout. There was one instance of over-documenting. Finally one function argument was incorrectly documented (probably down to bitrot). Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/udc.c:245: warning: Function parameter or member 'ci' not described in 'hw_port_is_high_speed' drivers/usb/chipidea/udc.c:271: warning: Function parameter or member 'ci' not described in 'hw_test_and_clear_intr_active' drivers/usb/chipidea/udc.c:285: warning: Function parameter or member 'ci' not described in 'hw_test_and_clear_setup_guard' drivers/usb/chipidea/udc.c:296: warning: Function parameter or member 'ci' not described in 'hw_test_and_set_setup_guard' drivers/usb/chipidea/udc.c:321: warning: Function parameter or member 'ci' not described in 'hw_usb_reset' drivers/usb/chipidea/udc.c:628: warning: Excess function parameter 'ci' description in 'free_pending_td' drivers/usb/chipidea/udc.c:655: warning: Function parameter or member 'hwep' not described in '_hardware_dequeue' drivers/usb/chipidea/udc.c:655: warning: Excess function parameter 'gadget' description in '_hardware_dequeue' Cc: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-18-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0e1acecad2f2702244f5ce06f6156d449176d054 Author: Lee Jones Date: Fri Jul 3 18:41:34 2020 +0100 usb: host: xhci-dbgtty: File headers are not good candidates for kerneldoc Demote xhci-dbgtty's file header to a standard comment block. Fixes the following W=1 kernel build warning(s): drivers/usb/host/xhci-dbgtty.c:19: warning: Function parameter or member 'port' not described in 'dbc_send_packet' drivers/usb/host/xhci-dbgtty.c:19: warning: Function parameter or member 'packet' not described in 'dbc_send_packet' drivers/usb/host/xhci-dbgtty.c:19: warning: Function parameter or member 'size' not described in 'dbc_send_packet' Cc: Mathias Nyman Cc: Lu Baolu Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-17-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e57bde588458c8519e87baaa99c9311f7f4c2d36 Author: Lee Jones Date: Fri Jul 3 18:41:33 2020 +0100 usb: host: xhci-dbgcap: File headers are not good candidates for kerneldoc Demote xhci-dbgcap's file header to a standard comment block. Fixes the following W=1 kernel build warning(s): drivers/usb/host/xhci-dbgcap.c:20: warning: Function parameter or member 'xhci' not described in 'dbc_dma_alloc_coherent' drivers/usb/host/xhci-dbgcap.c:20: warning: Function parameter or member 'size' not described in 'dbc_dma_alloc_coherent' drivers/usb/host/xhci-dbgcap.c:20: warning: Function parameter or member 'dma_handle' not described in 'dbc_dma_alloc_coherent' drivers/usb/host/xhci-dbgcap.c:20: warning: Function parameter or member 'flags' not described in 'dbc_dma_alloc_coherent' Cc: Mathias Nyman Cc: Lu Baolu Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-16-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit c3fa4e0467ac533285f6111c426ef8785ea3becc Author: Lee Jones Date: Fri Jul 3 18:41:32 2020 +0100 usb: host: xhci-mem: Demote obvious misuse of kerneldoc to standard comment block No attempt has been made to document the demoted function here. Fixes the following W=1 kernel build warning(s): drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'xhci' not described in 'xhci_ring_alloc' drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'num_segs' not described in 'xhci_ring_alloc' drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'cycle_state' not described in 'xhci_ring_alloc' drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'type' not described in 'xhci_ring_alloc' drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'max_packet' not described in 'xhci_ring_alloc' drivers/usb/host/xhci-mem.c:365: warning: Function parameter or member 'flags' not described in 'xhci_ring_alloc' Cc: Mathias Nyman Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-15-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f3a9492bb92ccc430abb7b41fc790259ba4113f3 Author: Lee Jones Date: Fri Jul 3 18:41:31 2020 +0100 usb: host: xhci: Demote obvious misuse of kerneldoc to standard comment block No attempt has been made to document the demoted function here. Fixes the following W=1 kernel build warning(s): drivers/usb/host/xhci.c:1285: warning: Function parameter or member 'desc' not described in 'xhci_get_endpoint_index' Cc: Mathias Nyman Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-14-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 92d08e070a103eedf8ec5a0c7c8dd03432fa5f56 Author: Lee Jones Date: Fri Jul 3 18:41:30 2020 +0100 usb: chipidea: udc: Help out kerneldoc headers that have tried, demote the others Help with adding the odd description where they have been omitted or where the format isn't quite right. Demote all function headers which are lacking any attempt of describing their arguments. Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/udc.c:645: warning: Function parameter or member 'hwreq' not described in '_hardware_dequeue' drivers/usb/chipidea/udc.c:645: warning: Excess function parameter 'gadget' description in '_hardware_dequeue' drivers/usb/chipidea/udc.c:1326: warning: Function parameter or member 'ep' not described in 'ep_enable' drivers/usb/chipidea/udc.c:1326: warning: Function parameter or member 'desc' not described in 'ep_enable' drivers/usb/chipidea/udc.c:1393: warning: Function parameter or member 'ep' not described in 'ep_disable' drivers/usb/chipidea/udc.c:1433: warning: Function parameter or member 'ep' not described in 'ep_alloc_request' drivers/usb/chipidea/udc.c:1433: warning: Function parameter or member 'gfp_flags' not described in 'ep_alloc_request' drivers/usb/chipidea/udc.c:1454: warning: Function parameter or member 'ep' not described in 'ep_free_request' drivers/usb/chipidea/udc.c:1454: warning: Function parameter or member 'req' not described in 'ep_free_request' drivers/usb/chipidea/udc.c:1488: warning: Function parameter or member 'ep' not described in 'ep_queue' drivers/usb/chipidea/udc.c:1488: warning: Function parameter or member 'req' not described in 'ep_queue' drivers/usb/chipidea/udc.c:1488: warning: Function parameter or member 'gfp_flags' not described in 'ep_queue' drivers/usb/chipidea/udc.c:1512: warning: Function parameter or member 'ep' not described in 'ep_dequeue' drivers/usb/chipidea/udc.c:1512: warning: Function parameter or member 'req' not described in 'ep_dequeue' drivers/usb/chipidea/udc.c:1556: warning: Function parameter or member 'ep' not described in 'ep_set_halt' drivers/usb/chipidea/udc.c:1556: warning: Function parameter or member 'value' not described in 'ep_set_halt' drivers/usb/chipidea/udc.c:1566: warning: Function parameter or member 'ep' not described in 'ep_set_wedge' drivers/usb/chipidea/udc.c:1586: warning: Function parameter or member 'ep' not described in 'ep_fifo_flush' drivers/usb/chipidea/udc.c:1610: warning: cannot understand function prototype: 'const struct usb_ep_ops usb_ep_ops = ' drivers/usb/chipidea/udc.c:1629: warning: Function parameter or member '_gadget' not described in 'ci_hdrc_gadget_connect' drivers/usb/chipidea/udc.c:1629: warning: Function parameter or member 'is_active' not described in 'ci_hdrc_gadget_connect' drivers/usb/chipidea/udc.c:1780: warning: cannot understand function prototype: 'const struct usb_gadget_ops usb_gadget_ops = ' drivers/usb/chipidea/udc.c:1931: warning: Function parameter or member 'gadget' not described in 'ci_udc_stop' drivers/usb/chipidea/udc.c:1965: warning: Function parameter or member 'ci' not described in 'udc_irq' drivers/usb/chipidea/udc.c:2095: warning: Function parameter or member 'ci' not described in 'ci_hdrc_gadget_destroy' drivers/usb/chipidea/udc.c:2144: warning: Function parameter or member 'ci' not described in 'ci_hdrc_gadget_init' Cc: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-13-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 22dfe6574b6f24d7739d3b6b2df5547253ec7d5d Author: Lee Jones Date: Fri Jul 3 18:41:29 2020 +0100 usb: chipidea: udc: Add missing descriptions for function arg 'ci' Looks like a very popular argument to omit descriptions for. Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/udc.c:80: warning: Function parameter or member 'ci' not described in 'hw_device_state' drivers/usb/chipidea/udc.c:100: warning: Function parameter or member 'ci' not described in 'hw_ep_flush' drivers/usb/chipidea/udc.c:121: warning: Function parameter or member 'ci' not described in 'hw_ep_disable' drivers/usb/chipidea/udc.c:136: warning: Function parameter or member 'ci' not described in 'hw_ep_enable' drivers/usb/chipidea/udc.c:170: warning: Function parameter or member 'ci' not described in 'hw_ep_get_halt' drivers/usb/chipidea/udc.c:185: warning: Function parameter or member 'ci' not described in 'hw_ep_prime' drivers/usb/chipidea/udc.c:215: warning: Function parameter or member 'ci' not described in 'hw_ep_set_halt' drivers/usb/chipidea/udc.c:238: warning: Function parameter or member 'ci' not described in 'hw_port_is_high_speed' drivers/usb/chipidea/udc.c:251: warning: Function parameter or member 'ci' not described in 'hw_test_and_clear_complete' drivers/usb/chipidea/udc.c:263: warning: Function parameter or member 'ci' not described in 'hw_test_and_clear_intr_active' drivers/usb/chipidea/udc.c:277: warning: Function parameter or member 'ci' not described in 'hw_test_and_clear_setup_guard' drivers/usb/chipidea/udc.c:288: warning: Function parameter or member 'ci' not described in 'hw_test_and_set_setup_guard' drivers/usb/chipidea/udc.c:300: warning: Function parameter or member 'ci' not described in 'hw_usb_set_address' drivers/usb/chipidea/udc.c:312: warning: Function parameter or member 'ci' not described in 'hw_usb_reset' Cc: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-12-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5722a8efc6c8979159a62557ca8ea050228a1564 Author: Lee Jones Date: Fri Jul 3 18:41:28 2020 +0100 usb: chipidea: debug: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the demoted functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/debug.c:25: warning: Function parameter or member 's' not described in 'ci_device_show' drivers/usb/chipidea/debug.c:25: warning: Function parameter or member 'data' not described in 'ci_device_show' drivers/usb/chipidea/debug.c:54: warning: Function parameter or member 's' not described in 'ci_port_test_show' drivers/usb/chipidea/debug.c:54: warning: Function parameter or member 'data' not described in 'ci_port_test_show' drivers/usb/chipidea/debug.c:75: warning: Function parameter or member 'file' not described in 'ci_port_test_write' drivers/usb/chipidea/debug.c:75: warning: Function parameter or member 'ubuf' not described in 'ci_port_test_write' drivers/usb/chipidea/debug.c:75: warning: Function parameter or member 'count' not described in 'ci_port_test_write' drivers/usb/chipidea/debug.c:75: warning: Function parameter or member 'ppos' not described in 'ci_port_test_write' drivers/usb/chipidea/debug.c:122: warning: Function parameter or member 's' not described in 'ci_qheads_show' drivers/usb/chipidea/debug.c:122: warning: Function parameter or member 'data' not described in 'ci_qheads_show' drivers/usb/chipidea/debug.c:154: warning: Function parameter or member 's' not described in 'ci_requests_show' drivers/usb/chipidea/debug.c:154: warning: Function parameter or member 'data' not described in 'ci_requests_show' Cc: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6a005f0fbf6e99555180fcbc608a8157134550d5 Author: Lee Jones Date: Fri Jul 3 18:41:27 2020 +0100 usb: chipidea: otg: Fix kerneldoc issues relating to description of 'ci' Firstly we add some missing descriptions. Then we fix some formatting issues. Kerneldoc expects arguments to be in the format '@.*: '. If either the '@' or ':' is omitted, kerneldoc gets confused. Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/otg.c:29: warning: Function parameter or member 'ci' not described in 'hw_read_otgsc' drivers/usb/chipidea/otg.c:82: warning: Function parameter or member 'ci' not described in 'hw_write_otgsc' drivers/usb/chipidea/otg.c:235: warning: Function parameter or member 'ci' not described in 'ci_hdrc_otg_init' drivers/usb/chipidea/otg.c:254: warning: Function parameter or member 'ci' not described in 'ci_hdrc_otg_destroy' Cc: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-10-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e21cd08f965766d014b021db207107a559a14e20 Author: Lee Jones Date: Fri Jul 3 18:41:26 2020 +0100 usb: gadget: udc: core: Fix a bunch of kerneldoc misdemeanours Firstly, file headers should not be in kerneldoc format. Function args should be in the format '@.*: '. We also take the time to add some descriptions for various argument which have been previously left out. Finally we remove descriptions for absent arguments. Fixes the following W=1 kernel build warning(s): drivers/usb/gadget/udc/core.c:25: warning: Incorrect use of kernel-doc format: * struct usb_udc - describes one usb device controller drivers/usb/gadget/udc/core.c:36: warning: cannot understand function prototype: 'struct usb_udc ' drivers/usb/gadget/udc/core.c:901: warning: Function parameter or member 'ep' not described in 'usb_gadget_giveback_request' drivers/usb/gadget/udc/core.c:901: warning: Function parameter or member 'req' not described in 'usb_gadget_giveback_request' drivers/usb/gadget/udc/core.c:1098: warning: Function parameter or member 'udc' not described in 'usb_gadget_udc_stop' drivers/usb/gadget/udc/core.c:1098: warning: Excess function parameter 'gadget' description in 'usb_gadget_udc_stop' drivers/usb/gadget/udc/core.c:1098: warning: Excess function parameter 'driver' description in 'usb_gadget_udc_stop' Cc: Felipe Balbi Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-9-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8ac326ff5c9903dfc5e34cef66df591f376b2ec2 Author: Lee Jones Date: Fri Jul 3 18:41:25 2020 +0100 usb: chipidea: core: Document hw_port_test_set()'s missing 'ci' argument Fixes the following W=1 kernel build warning(s): drivers/usb/chipidea/core.c:163: warning: Function parameter or member 'ci' not described in 'hw_port_test_set' Cc: Peter Chen Cc: David Lopo Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 874ae83880083e501afbe429efe47c32d53bcf7c Author: Lee Jones Date: Fri Jul 3 18:41:24 2020 +0100 usb: misc: adutux: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/misc/adutux.c:117: warning: Function parameter or member 'dev' not described in 'adu_abort_transfers' drivers/usb/misc/adutux.c:653: warning: Function parameter or member 'interface' not described in 'adu_probe' drivers/usb/misc/adutux.c:653: warning: Function parameter or member 'id' not described in 'adu_probe' drivers/usb/misc/adutux.c:762: warning: Function parameter or member 'interface' not described in 'adu_disconnect' Cc: Johan Hovold Cc: David Glance Cc: Juergen Stuber Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b2e3fa1ab433524dfa3dd38afb82a80c5b7319e8 Author: Lee Jones Date: Fri Jul 3 18:41:23 2020 +0100 usb: atm: ueagle-atm: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/atm/ueagle-atm.c:578: warning: Function parameter or member 'usb' not described in 'uea_send_modem_cmd' drivers/usb/atm/ueagle-atm.c:578: warning: Function parameter or member 'addr' not described in 'uea_send_modem_cmd' drivers/usb/atm/ueagle-atm.c:578: warning: Function parameter or member 'size' not described in 'uea_send_modem_cmd' drivers/usb/atm/ueagle-atm.c:578: warning: Function parameter or member 'buff' not described in 'uea_send_modem_cmd' drivers/usb/atm/ueagle-atm.c:679: warning: Function parameter or member 'usb' not described in 'uea_load_firmware' drivers/usb/atm/ueagle-atm.c:679: warning: Function parameter or member 'ver' not described in 'uea_load_firmware' Cc: Matthieu CASTET Cc: Stanislaw Gruszka Cc: Damien Bergamini Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5bef1132561d861f439824f1d06c8f0a5018f621 Author: Lee Jones Date: Fri Jul 3 18:41:21 2020 +0100 usb: core: ledtrig-usbport: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/core/ledtrig-usbport.c:42: warning: Function parameter or member 'usbport_data' not described in 'usbport_trig_usb_dev_observed' drivers/usb/core/ledtrig-usbport.c:42: warning: Function parameter or member 'usb_dev' not described in 'usbport_trig_usb_dev_observed' drivers/usb/core/ledtrig-usbport.c:71: warning: Function parameter or member 'usbport_data' not described in 'usbport_trig_update_count' drivers/usb/core/ledtrig-usbport.c:131: warning: Function parameter or member 'usbport_data' not described in 'usbport_trig_port_observed' drivers/usb/core/ledtrig-usbport.c:131: warning: Function parameter or member 'usb_dev' not described in 'usbport_trig_port_observed' drivers/usb/core/ledtrig-usbport.c:131: warning: Function parameter or member 'port1' not described in 'usbport_trig_port_observed' Cc: Rafał Miłecki Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0459268acb66457434e81aedbdd2e17c3d4a37cc Author: Lee Jones Date: Fri Jul 3 18:41:20 2020 +0100 usb: host: ohci-s3c2410: Demote obvious misuse of kerneldoc to standard comment block No attempt has been made to document the function here. Fixes the following W=1 kernel build warning(s): drivers/usb/host/ohci-s3c2410.c:356: warning: Function parameter or member 'dev' not described in 'ohci_hcd_s3c2410_probe' Cc: Alan Stern Cc: Kukjin Kim Cc: Krzysztof Kozlowski Cc: Roman Weissgaerber Cc: David Brownell Cc: Christopher Hoover Cc: Ben Dooks Cc: linux-samsung-soc@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 16eb9c0aae8da3ade9bb74464c2e3d151a39d504 Author: Lee Jones Date: Fri Jul 3 18:41:19 2020 +0100 usb: mtu3: mtu3_debug: Add forward declaration of 'struct ssusb_mtk' Without it, the build system complains that it was declared inside the parameter list. Fixes the following W=1 kernel build warning(s): In file included from drivers/usb/mtu3/mtu3_trace.c:11: drivers/usb/mtu3/mtu3_debug.h:29:36: warning: ‘struct ssusb_mtk’ declared inside parameter list will not be visible outside of this definition or declaration 29 | void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb); | ^~~~~~~~~ drivers/usb/mtu3/mtu3_debug.h:30:35: warning: ‘struct ssusb_mtk’ declared inside parameter list will not be visible outside of this definition or declaration 30 | void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb); | ^~~~~~~~~ drivers/usb/mtu3/mtu3_debug.h:31:39: warning: ‘struct ssusb_mtk’ declared inside parameter list will not be visible outside of this definition or declaration 31 | void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb); | ^~~~~~~~~ drivers/usb/mtu3/mtu3_debug.h:32:39: warning: ‘struct ssusb_mtk’ declared inside parameter list will not be visible outside of this definition or declaration 32 | void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb); | ^~~~~~~~~ Cc: Chunfeng Yun Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200703174148.2749969-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 54b50f2153a452077557e0ce864566c6ebe640fe Author: Sibi Sankar Date: Fri Jul 3 02:16:43 2020 +0530 arm64: dts: qcom: sdm845: Add cpu OPP tables Add OPP tables required to scale DDR/L3 per freq-domain on SDM845 SoCs. Tested-by: Bjorn Andersson Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200702204643.25785-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit acf916c2aae81f7f009c5a53ce7fb54ec41e4c10 Author: Linus Walleij Date: Fri Jul 3 15:10:59 2020 +0200 usb: ehci-omap: Drop surplus include The EHCI OMAP driver includes but does not use any symbols from this file, so drop it. Cc: Roger Quadros Cc: Tony Lindgren Signed-off-by: Linus Walleij Reviewed-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200703131059.515436-1-linus.walleij@linaro.org Signed-off-by: Greg Kroah-Hartman commit 99bcf64e1c1460ac6e0275e7024a3abb5f96ac14 Author: Ville Syrjälä Date: Wed Jul 8 16:12:23 2020 +0300 drm/i915: Document FBC related w/as more thoroughly Pimp the comments for the FBC related workarounds. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200708131223.9519-4-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit cd7a88113d102e42320b897c306bb52018669a21 Author: Ville Syrjälä Date: Wed Jul 8 16:12:22 2020 +0300 drm/i915: Limit WaFbcHighMemBwCorruptionAvoidance to skl and bxt Supposedly only skl/bxt need WaFbcHighMemBwCorruptionAvoidance. Do not apply to the other gen9 platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200708131223.9519-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit c4615b2b4f3e5789b48395321f679519fd4f2b81 Author: Ville Syrjälä Date: Wed Jul 8 16:12:21 2020 +0300 drm/i915: Don't do WaFbcTurnOffFbcWatermark for glk GLK supposedly does not need WaFbcTurnOffFbcWatermark, so let's not apply it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200708131223.9519-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 885f182cd6ec94f69a6ff9aa08e6e56371adce72 Author: Ville Syrjälä Date: Wed Jul 8 16:12:20 2020 +0300 drm/i915: Move all FBC w/as to .init_clock_gating() Some platforms apply the FBC w/as in .init_clock_gating(), some in fbc_activate(). Move them all to .init_clock_gating() for consistentce. Also safer since we don't have to worry about the RMWs clashing with any other runtime use of the same registers. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200708131223.9519-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 4a2236f9a74a37d1737d3ceff980b1945ded43be Author: Ville Syrjälä Date: Wed Jan 8 20:12:42 2020 +0200 drm/i915/dvo: Make .get_modes() return the number of modes .get_modes() is supposed to return the number of modes added to the probed_modes list (not that anyone actually checks for anything except zero vs. not zero). Let's do that. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200108181242.13650-9-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 7407ec6e5567ac3a1adf451bd5c1d4718341f104 Author: Ville Syrjälä Date: Wed Jan 8 20:12:41 2020 +0200 drm/i915/sdvo: Make .get_modes() return the number of modes .get_modes() is supposed to return the number of modes added to the probed_modes list (not that anyone actually checks for anything except zero vs. not zero). Let's do that. Also switch over to using intel_connector_update_modes() instead of hand rolling it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200108181242.13650-8-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit d97571938ef34a7ab02fb3a1bd9323b825f7f7e8 Author: Ville Syrjälä Date: Wed Jan 8 20:12:40 2020 +0200 drm/i915/sdvo: Make SDVO deal with HDMI pixel repeat With SDVO the pipe config pixel_multiplier only concerns itself with the data on the SDVO bus. Any HDMI specific pixel repeat must be handled by the SDVO device itself. To do that simply configure the SDVO pixel replication factor appropriately. We already set up the infoframe PRB values correctly via the infoframe helpers. There is no cap we can check for this. The spec says that 1X,2X,4X are mandatory, anything else is optional. 1X and 2X are all we need so we should be able to assume they work. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200108181242.13650-7-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit c35ad31401c079e1fe1bebb1b7d5be2940668676 Author: Ville Syrjälä Date: Wed Jan 8 20:12:39 2020 +0200 drm/i915: Reject DRM_MODE_FLAG_DBLCLK with DVI sinks The code assumes that DRM_MODE_FLAG_DBLCLK means that we enable the pixel repeat feature. That only works with HDMI since it requires AVI infoframe to signal the information to the sink. Hence even if the mode dotclock would be valid we cannot currently assume that we can just ignore the DBLCLK flag. Reject it for DVI sinks. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200108181242.13650-6-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 90f8ed85c6f31a53d8bdf04d80900d87296f6701 Author: Ville Syrjälä Date: Wed Jan 8 20:12:38 2020 +0200 drm/i915/sdvo: Implement limited color range for SDVO HDMI properly The SDVO/HDMI port register limited color range bit can only be used with TMDS encoding and not SDVO encoding, ie. to be used only when using the port as a HDMI port as opposed to a SDVO port. The SDVO spec does have a note that some GMCHs might allow that, but gen4 bspec vehemently disagrees. I suppose on ILK+ it might work since the color range handling is on the CPU side rather than on the PCH side, so there is no clear linkage between the TMDS vs. SDVO encoding and color range. Alas, I have no hardware to test that theory. To implement limited color range support for SDVO->HDMI we need to ask the SDVO device to do the range compression. Do so, but first check if the device even supports the colorimetry selection. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200108181242.13650-5-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 80f5ad62b6ecef424d25da2680150c828cbe7227 Author: Ville Syrjälä Date: Wed Jan 8 20:12:37 2020 +0200 drm/i915/sdvo: Fix SDVO colorimetry bit defines Fix up the SDVO colorimetry bits to match the spec. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200108181242.13650-4-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 0735069c5e49d3f4f5f92669fcc3882500c118e5 Author: Yangtao Li Date: Sun Jun 21 16:04:12 2020 +0800 powercap: idle_inject: Replace play_idle() with play_idle_precise() in comments After commit 333cff6c963fbc ("powercap/drivers/idle_inject: Specify idle state max latency"), we convert to use play_idle_precise() with max allowed latency to specify the idle state. Some function comments still use play_idle(), let's update it to play_idle_precise(). Signed-off-by: Yangtao Li Signed-off-by: Frank Lee Signed-off-by: Rafael J. Wysocki commit 8d87ae48ced2dffd5e7247d19eb4c88be6f1c6f1 Author: Kees Cook Date: Wed Jul 8 16:32:13 2020 -0700 PM: domains: Fix up terminology with parent/child The genpd infrastructure uses the terms master/slave, but such uses have no external exposures (not even in Documentation/driver-api/pm/*) and are not mandated by nor associated with any external specifications. Change the language used through-out to parent/child. There was one possible exception in the debugfs node "pm_genpd/pm_genpd_summary" but its path has no hits outside of the kernel itself when performing a code search[1], and it seems even this single usage has been non-functional since it was introduced due to a typo in the Python ("apend" instead of correct "append"). Fix the typo while we're at it. Link: https://codesearch.debian.net/ # [1] Signed-off-by: Kees Cook Reviewed-by: Greg Kroah-Hartman Reviewed-by: Kieran Bingham Signed-off-by: Rafael J. Wysocki commit 3d2df84548ed88dc3344392d4e5afb8884d05360 Author: Ard Biesheuvel Date: Mon Jun 29 09:39:25 2020 +0200 crypto: arm/ghash - use variably sized key struct Of the two versions of GHASH that the ARM driver implements, only one performs aggregation, and so the other one has no use for the powers of H to be precomputed, or space to be allocated for them in the key struct. So make the context size dependent on which version is being selected, and while at it, use a static key to carry this decision, and get rid of the function pointer. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit e4f874858cc16bdf99ca4aa678c94d6e448f8847 Author: Ard Biesheuvel Date: Mon Jun 29 09:39:24 2020 +0200 crypto: arm64/gcm - use inline helper to suppress indirect calls Introduce an inline wrapper for ghash_do_update() that incorporates the indirect call to the asm routine that is passed as an argument, and keep the non-SIMD fallback code out of line. This ensures that all references to the function pointer are inlined where the address is taken, removing the need for any indirect calls to begin with. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 17d0fb1febbc34839a1ed5af8622478691d870df Author: Ard Biesheuvel Date: Mon Jun 29 09:39:23 2020 +0200 crypto: arm64/gcm - use variably sized key struct Now that the ghash and gcm drivers are split, we no longer need to allocate a key struct for the former that carries powers of H that are only used by the latter. Also, take this opportunity to clean up the code a little bit. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 94fe4501cd2a9989d1a134423e12435482c12120 Author: Ard Biesheuvel Date: Mon Jun 29 09:39:22 2020 +0200 crypto: arm64/gcm - disentangle ghash and gcm setkey() routines The remaining ghash implementation does not support aggregation, and so there is no point in including the precomputed powers of H in the key struct. So move that into the GCM setkey routine, and get rid of the shared sub-routine entirely. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 37b6aab68fae17484173776ac8461613f96f6642 Author: Ard Biesheuvel Date: Mon Jun 29 09:39:21 2020 +0200 crypto: arm64/ghash - drop PMULL based shash There are two ways to implement SIMD accelerated GCM on arm64: - using the PMULL instructions for carryless 64x64->128 multiplication, in which case the architecture guarantees that the AES instructions are available as well, and so we can use the AEAD implementation that combines both, - using the PMULL instructions for carryless 8x8->16 bit multiplication, which is implemented as a shash, and can be combined with any ctr(aes) implementation by the generic GCM AEAD template driver. So let's drop the 64x64->128 shash driver, which is never needed for GCM, and not suitable for use anywhere else. Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 57d2dd4bd18b1378b3bc0b6b2b8b858deb6c2fa7 Author: Gustavo A. R. Silva Date: Tue Jul 7 15:09:37 2020 -0500 ACPI: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. Link: https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through # [1] Signed-off-by: Gustavo A. R. Silva Signed-off-by: Rafael J. Wysocki commit 2245d39886fad920f4ea3583e2fb29bf01fc01d8 Author: Thomas Gleixner Date: Wed Jul 8 21:52:00 2020 +0200 x86/kvm/vmx: Use native read/write_cr2() read/write_cr2() go throuh the paravirt XXL indirection, but nested VMX in a XEN_PV guest is not supported. Use the native variants. Signed-off-by: Thomas Gleixner Message-Id: <20200708195322.344731916@linutronix.de> Signed-off-by: Paolo Bonzini commit c3f08ed15047002677b8b1f9f5bc29ced3f87a6f Author: Thomas Gleixner Date: Wed Jul 8 21:51:59 2020 +0200 x86/kvm/svm: Use uninstrumented wrmsrl() to restore GS On guest exit MSR_GS_BASE contains whatever the guest wrote to it and the first action after returning from the ASM code is to set it to the host kernel value. This uses wrmsrl() which is interesting at least. wrmsrl() is either using native_write_msr() or the paravirt variant. The XEN_PV code is uninteresting as nested SVM in a XEN_PV guest does not work. But native_write_msr() can be placed out of line by the compiler especially when paravirtualization is enabled in the kernel configuration. The function is marked notrace, but still can be probed if CONFIG_KPROBE_EVENTS_ON_NOTRACE is enabled. That would be a fatal problem as kprobe events use per-CPU variables which are GS based and would be accessed with the guest GS. Depending on the GS value this would either explode in colorful ways or lead to completely undebugable data corruption. Aside of that native_write_msr() contains a tracepoint which objtool complains about as it is invoked from the noinstr section. As this cannot run inside a XEN_PV guest there is no point in using wrmsrl(). Use native_wrmsrl() instead which is just a plain native WRMSR without tracing or anything else attached. Signed-off-by: Thomas Gleixner Acked-by: Juergen Gross Message-Id: <20200708195322.244847377@linutronix.de> Signed-off-by: Paolo Bonzini commit 135961e0a7d555fc8f1d7c89ad44a94dffa5dcd8 Author: Thomas Gleixner Date: Wed Jul 8 21:51:58 2020 +0200 x86/kvm/svm: Move guest enter/exit into .noinstr.text Move the functions which are inside the RCU off region into the non-instrumentable text section. Signed-off-by: Thomas Gleixner Reviewed-by: Alexandre Chartre Acked-by: Peter Zijlstra Acked-by: Paolo Bonzini Message-Id: <20200708195322.144607767@linutronix.de> Signed-off-by: Paolo Bonzini commit 3ebccdf373c21d8697782b7e8d5af0adc9c26e04 Author: Thomas Gleixner Date: Wed Jul 8 21:51:57 2020 +0200 x86/kvm/vmx: Move guest enter/exit into .noinstr.text Move the functions which are inside the RCU off region into the non-instrumentable text section. Signed-off-by: Thomas Gleixner Reviewed-by: Alexandre Chartre Acked-by: Peter Zijlstra Acked-by: Paolo Bonzini Message-Id: <20200708195322.037311579@linutronix.de> Signed-off-by: Paolo Bonzini commit 9fc975e9efd03e57c9599e0fc07c8b264ad8d5b2 Author: Thomas Gleixner Date: Wed Jul 8 21:51:56 2020 +0200 x86/kvm/svm: Add hardirq tracing on guest enter/exit Entering guest mode is more or less the same as returning to user space. From an instrumentation point of view both leave kernel mode and the transition to guest or user mode reenables interrupts on the host. In user mode an interrupt is served directly and in guest mode it causes a VM exit which then handles or reinjects the interrupt. The transition from guest mode or user mode to kernel mode disables interrupts, which needs to be recorded in instrumentation to set the correct state again. This is important for e.g. latency analysis because otherwise the execution time in guest or user mode would be wrongly accounted as interrupt disabled and could trigger false positives. Add hardirq tracing to guest enter/exit functions in the same way as it is done in the user mode enter/exit code, respecting the RCU requirements. Signed-off-by: Thomas Gleixner Reviewed-by: Alexandre Chartre Acked-by: Peter Zijlstra Acked-by: Paolo Bonzini Message-Id: <20200708195321.934715094@linutronix.de> Signed-off-by: Paolo Bonzini commit 0642391e2139a2c1b8a33f3fd816488d3f371d90 Author: Thomas Gleixner Date: Wed Jul 8 21:51:55 2020 +0200 x86/kvm/vmx: Add hardirq tracing to guest enter/exit Entering guest mode is more or less the same as returning to user space. From an instrumentation point of view both leave kernel mode and the transition to guest or user mode reenables interrupts on the host. In user mode an interrupt is served directly and in guest mode it causes a VM exit which then handles or reinjects the interrupt. The transition from guest mode or user mode to kernel mode disables interrupts, which needs to be recorded in instrumentation to set the correct state again. This is important for e.g. latency analysis because otherwise the execution time in guest or user mode would be wrongly accounted as interrupt disabled and could trigger false positives. Add hardirq tracing to guest enter/exit functions in the same way as it is done in the user mode enter/exit code, respecting the RCU requirements. Signed-off-by: Thomas Gleixner Reviewed-by: Alexandre Chartre Acked-by: Peter Zijlstra Acked-by: Paolo Bonzini Message-Id: <20200708195321.822002354@linutronix.de> Signed-off-by: Paolo Bonzini commit 87fa7f3e98a1310ef1ac1900e7ee7f9610a038bc Author: Thomas Gleixner Date: Wed Jul 8 21:51:54 2020 +0200 x86/kvm: Move context tracking where it belongs Context tracking for KVM happens way too early in the vcpu_run() code. Anything after guest_enter_irqoff() and before guest_exit_irqoff() cannot use RCU and should also be not instrumented. The current way of doing this covers way too much code. Move it closer to the actual vmenter/exit code. Signed-off-by: Thomas Gleixner Reviewed-by: Alexandre Chartre Acked-by: Peter Zijlstra Acked-by: Paolo Bonzini Message-Id: <20200708195321.724574345@linutronix.de> Signed-off-by: Paolo Bonzini commit 841c2be09fe4f495fe5224952a419bd8c7e5b455 Author: Maxim Levitsky Date: Wed Jul 8 14:57:31 2020 +0300 kvm: x86: replace kvm_spec_ctrl_test_value with runtime test on the host To avoid complex and in some cases incorrect logic in kvm_spec_ctrl_test_value, just try the guest's given value on the host processor instead, and if it doesn't #GP, allow the guest to set it. One such case is when host CPU supports STIBP mitigation but doesn't support IBRS (as is the case with some Zen2 AMD cpus), and in this case we were giving guest #GP when it tried to use STIBP The reason why can can do the host test is that IA32_SPEC_CTRL msr is passed to the guest, after the guest sets it to a non zero value for the first time (due to performance reasons), and as as result of this, it is pointless to emulate #GP condition on this first access, in a different way than what the host CPU does. This is based on a patch from Sean Christopherson, who suggested this idea. Fixes: 6441fa6178f5 ("KVM: x86: avoid incorrect writes to host MSR_IA32_SPEC_CTRL") Cc: stable@vger.kernel.org Suggested-by: Sean Christopherson Signed-off-by: Maxim Levitsky Message-Id: <20200708115731.180097-1-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 632a4cf57fd1bfae24f05c71398d367ca51940f1 Author: Like Xu Date: Wed Jul 8 15:44:09 2020 +0800 KVM/x86: pmu: Fix #GP condition check for RDPMC emulation In guest protected mode, if the current privilege level is not 0 and the PCE flag in the CR4 register is cleared, we will inject a #GP for RDPMC usage. Signed-off-by: Like Xu Message-Id: <20200708074409.39028-1-like.xu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 995decb6c43e1d6e9d6a7d590471f2eea74600f4 Author: Vitaly Kuznetsov Date: Wed Jul 8 16:00:23 2020 +0200 KVM: x86: take as_id into account when checking PGD OVMF booted guest running on shadow pages crashes on TRIPLE FAULT after enabling paging from SMM. The crash is triggered from mmu_check_root() and is caused by kvm_is_visible_gfn() searching through memslots with as_id = 0 while vCPU may be in a different context (address space). Introduce kvm_vcpu_is_visible_gfn() and use it from mmu_check_root(). Signed-off-by: Vitaly Kuznetsov Message-Id: <20200708140023.1476020-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 5668821aefcbd8511740301de8bc9153c103a43a Author: Xiaoyao Li Date: Thu Jul 9 12:34:26 2020 +0800 KVM: x86: Move kvm_x86_ops.vcpu_after_set_cpuid() into kvm_vcpu_after_set_cpuid() kvm_x86_ops.vcpu_after_set_cpuid() is used to update vmx/svm specific vcpu settings based on updated CPUID settings. So it's supposed to be called after CPUIDs are updated, i.e., kvm_update_cpuid_runtime(). Currently, kvm_update_cpuid_runtime() only updates CPUID bits of OSXSAVE, APIC, OSPKE, MWAIT, KVM_FEATURE_PV_UNHALT and CPUID(0xD,0).ebx and CPUID(0xD, 1).ebx. None of them is consumed by vmx/svm's update_vcpu_after_set_cpuid(). So there is no dependency between them. Move kvm_x86_ops.vcpu_after_set_cpuid() into kvm_vcpu_after_set_cpuid() is obviously more reasonable. Signed-off-by: Xiaoyao Li Message-Id: <20200709043426.92712-6-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit 7c1b761be029da401571e13e68fe509772309b4f Author: Xiaoyao Li Date: Thu Jul 9 12:34:25 2020 +0800 KVM: x86: Rename cpuid_update() callback to vcpu_after_set_cpuid() The name of callback cpuid_update() is misleading that it's not about updating CPUID settings of vcpu but updating the configurations of vcpu based on the CPUIDs. So rename it to vcpu_after_set_cpuid(). Signed-off-by: Xiaoyao Li Message-Id: <20200709043426.92712-5-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit 346ce3591db29ffd14fdbadc71e3b5eee4069f7b Author: Xiaoyao Li Date: Thu Jul 9 12:34:24 2020 +0800 KVM: x86: Rename kvm_update_cpuid() to kvm_vcpu_after_set_cpuid() Now there is no updating CPUID bits behavior in kvm_update_cpuid(), rename it to kvm_vcpu_after_set_cpuid(). Signed-off-by: Xiaoyao Li Message-Id: <20200709043426.92712-4-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit c0dbbdad4e11f86d3e16fec50682c840e18a8135 Author: Gustavo A. R. Silva Date: Wed Jul 8 15:32:36 2020 -0500 ALSA: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor Signed-off-by: Takashi Iwai commit a0b224b90bb60b3fbd2cae750227c995c9e61055 Author: Mark Hills Date: Wed Jul 8 11:18:48 2020 +0100 ALSA: echoaudio: Address bugs in the interrupt handling Distorted audio appears occasionally, affecting either playback or capture and requiring the affected substream to be closed by all applications and re-opened. The best way I have found to reproduce the bug is to use dmix in combination with Chromium, which opens the audio device multiple times in threads. Anecdotally, the problems appear to have increased with faster CPUs. I ruled out 32-bit counter wrapping; it often happens much earlier. Since applying this patch I have not had problems, where previously they would occur several times a day. The patch targets the following issues: * Check for progress using the counter from the hardware, not after it has been truncated to the buffer. This is a clean way to address a possible bug where if a whole ringbuffer advances between interrupts, it goes unnoticed. * Move last_period state from chip to pipe This more logically belongs as part of pipe, and code is reasier to read if it is "counter position last time a period elapsed". Now the code has no references to period count. A period is just when the regular counter crosses a threshold. This increases readability and reduces scope for bugs. * Treat period notification and buffer advance independently: This helps to clarify what is the responsibility of the interrupt handler, and what is pcm_pointer(). Removing shared state between these operations means race conditions are fixed without introducing locks. Synchronisation is only around the read of pipe->dma_counter. There may be cache line contention around "struct audiopipe" but I did not have cause to profile this. Pay attention to be robust where dma_counter wrapping is not a multiple of period_size or buffer_size. This is a revised patch based on feedback from Takashi and Giuliano. Signed-off-by: Mark Hills Link: https://lore.kernel.org/r/20200708101848.3457-5-mark@xwax.org Signed-off-by: Takashi Iwai commit f688a0dfe247d71d94352a3ea69b5bb535117580 Author: Mark Hills Date: Wed Jul 8 11:18:47 2020 +0100 ALSA: echoaudio: Prevent some noise on unloading the module These are valid conditions in normal circumstances, so do not "warn" but make them for debugging. Signed-off-by: Mark Hills Link: https://lore.kernel.org/r/20200708101848.3457-4-mark@xwax.org Signed-off-by: Takashi Iwai commit 6c331254487306a633a3d8636ca78eb77a73906a Author: Mark Hills Date: Wed Jul 8 11:18:46 2020 +0100 ALSA: echoaudio: Prevent races in calls to set_audio_format() The function uses chip->comm_page which needs locking against other use at the same time. Signed-off-by: Mark Hills Link: https://lore.kernel.org/r/20200708101848.3457-3-mark@xwax.org Signed-off-by: Takashi Iwai commit 027c70021b905eb23e2f36c64add062ba218b841 Author: Mark Hills Date: Wed Jul 8 11:18:45 2020 +0100 ALSA: echoaudio: Race conditions around "opencount" Use of atomics does not make these statements robust: atomic_inc(&chip->opencount); if (atomic_read(&chip->opencount) > 1 && chip->rate_set) chip->can_set_rate=0; and if (atomic_read(&chip->opencount)) { if (chip->opencount) { changed = -EAGAIN; } else { changed = set_digital_mode(chip, dmode); It would be necessary to atomically increment or decrement the value and use the returned result. And yet we still need to prevent other threads making use of "can_set_rate" while we set it. However in all but one case the atomic is misleading as they are already running with "mode_mutex" held. Decisions are made on mode setting are often intrinsically connected to "opencount" because some operations are not permitted unless there is sole ownership. So instead simplify this, and use "mode_mutex" as a lock for all reference counting and mode setting. Signed-off-by: Mark Hills Link: https://lore.kernel.org/r/20200708101848.3457-2-mark@xwax.org Signed-off-by: Takashi Iwai commit db091b0e14239f0ebd5709f3f9b5a1d662483adc Author: Mark Hills Date: Wed Jul 8 11:18:44 2020 +0100 ALSA: echoaudio: Remove redundant check This check is always false, as it's not the responsibilty of the device-specific code to make this check. It is already checked in snd_echo_digital_mode_put. I do not have a Mona interface to test this change. This patch is in preparation for follow-up patch to modify the behavior of "opencount". Signed-off-by: Mark Hills Link: https://lore.kernel.org/r/20200708101848.3457-1-mark@xwax.org Signed-off-by: Takashi Iwai commit da9bbf0598c9e66b8a46ceabaa6172596795acf2 Author: Xin Long Date: Mon Jul 6 20:01:38 2020 +0800 xfrm: interface: support IPIP and IPIP6 tunnels processing with .cb_handler Similar to ip_vti, IPIP and IPIP6 tunnels processing can easily be done with .cb_handler for xfrm interface. v1->v2: - no change. v2-v3: - enable it only when CONFIG_INET_XFRM_TUNNEL is defined, to fix the build error, reported by kbuild test robot. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit d7b360c2869f9ce2418510d14baf0f9696fcf1e9 Author: Xin Long Date: Mon Jul 6 20:01:37 2020 +0800 xfrm: interface: support IP6IP6 and IP6IP tunnels processing with .cb_handler Similar to ip6_vti, IP6IP6 and IP6IP tunnels processing can easily be done with .cb_handler for xfrm interface. v1->v2: - no change. v2-v3: - enable it only when CONFIG_INET6_XFRM_TUNNEL is defined, to fix the build error, reported by kbuild test robot. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit d5a7a5057387d79b91a6e2fd78a76ccd53f91e6c Author: Xin Long Date: Mon Jul 6 20:01:36 2020 +0800 ipcomp: assign if_id to child tunnel from parent tunnel The child tunnel if_id will be used for xfrm interface's lookup when processing the IP(6)IP(6) packets in the next patches. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit 2ab110cbb0c0cb05c64f37f42b78f5bc11699b0e Author: Xin Long Date: Mon Jul 6 20:01:35 2020 +0800 ip6_vti: support IP6IP tunnel processing For IP6IP tunnel processing, the functions called will be the same as that for IP6IP6 tunnel's. So reuse it and register it with family == AF_INET. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit 08622869ed3f167db9b2250ab1bb055f55293401 Author: Xin Long Date: Mon Jul 6 20:01:34 2020 +0800 ip6_vti: support IP6IP6 tunnel processing with .cb_handler Similar to IPIP tunnel's processing, this patch is to support IP6IP6 tunnel processing with .cb_handler. v1->v2: - no change. v2-v3: - enable it only when CONFIG_INET6_XFRM_TUNNEL is defined, to fix the build error, reported by kbuild test robot. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit e6ce64570f2451684b4f9bcbaee6c40c4a7dff82 Author: Xin Long Date: Mon Jul 6 20:01:33 2020 +0800 ip_vti: support IPIP6 tunnel processing For IPIP6 tunnel processing, the functions called will be the same as that for IPIP tunnel's. So reuse it and register it with family == AF_INET6. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit aedbaf4f6afdcf9da0f48f97d7e9d62f4d591e19 Author: Xiaoyao Li Date: Thu Jul 9 12:34:23 2020 +0800 KVM: x86: Extract kvm_update_cpuid_runtime() from kvm_update_cpuid() Beside called in kvm_vcpu_ioctl_set_cpuid*(), kvm_update_cpuid() is also called 5 places else in x86.c and 1 place else in lapic.c. All those 6 places only need the part of updating guest CPUIDs (OSXSAVE, OSPKE, APIC, KVM_FEATURE_PV_UNHALT, ...) based on the runtime vcpu state, so extract them as a separate kvm_update_cpuid_runtime(). Signed-off-by: Xiaoyao Li Message-Id: <20200709043426.92712-3-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit 87e66b9682d7067eb7db08040dae36b608a4d971 Author: Xin Long Date: Mon Jul 6 20:01:32 2020 +0800 ip_vti: support IPIP tunnel processing with .cb_handler With tunnel4_input_afinfo added, IPIP tunnel processing in ip_vti can be easily done with .cb_handler. So replace the processing by calling ip_tunnel_rcv() with it. v1->v2: - no change. v2-v3: - enable it only when CONFIG_INET_XFRM_TUNNEL is defined, to fix the build error, reported by kbuild test robot. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit 86afc7031826147407e96412668d343e0f1bd6fd Author: Xin Long Date: Mon Jul 6 20:01:31 2020 +0800 tunnel6: add tunnel6_input_afinfo for ipip and ipv6 tunnels This patch is to register a callback function tunnel6_rcv_cb with is_ipip set in a xfrm_input_afinfo object for tunnel6 and tunnel46. It will be called by xfrm_rcv_cb() from xfrm_input() when family is AF_INET6 and proto is IPPROTO_IPIP or IPPROTO_IPV6. v1->v2: - Fix a sparse warning caused by the missing "__rcu", as Jakub noticed. - Handle the err returned by xfrm_input_register_afinfo() in tunnel6_init/fini(), as Sabrina noticed. v2->v3: - Add "#if IS_ENABLED(CONFIG_INET6_XFRM_TUNNEL)" to fix the build error when xfrm is disabled, reported by kbuild test robot Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit 6df2db5d37ba3df8c80d90c15f1e20480be43f75 Author: Xin Long Date: Mon Jul 6 20:01:30 2020 +0800 tunnel4: add cb_handler to struct xfrm_tunnel This patch is to register a callback function tunnel4_rcv_cb with is_ipip set in a xfrm_input_afinfo object for tunnel4 and tunnel64. It will be called by xfrm_rcv_cb() from xfrm_input() when family is AF_INET and proto is IPPROTO_IPIP or IPPROTO_IPV6. v1->v2: - Fix a sparse warning caused by the missing "__rcu", as Jakub noticed. - Handle the err returned by xfrm_input_register_afinfo() in tunnel4_init/fini(), as Sabrina noticed. v2->v3: - Add "#if IS_ENABLED(CONFIG_INET_XFRM_TUNNEL)" to fix the build error when xfrm is disabled, reported by kbuild test robot. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit 1475ee0ac9a16dd5df23ca8abe1039eb6086eb66 Author: Xin Long Date: Mon Jul 6 20:01:29 2020 +0800 xfrm: add is_ipip to struct xfrm_input_afinfo This patch is to add a new member is_ipip to struct xfrm_input_afinfo, to allow another group family of callback functions to be registered with is_ipip set. This will be used for doing a callback for struct xfrm(6)_tunnel of ipip/ipv6 tunnels in xfrm_input() by calling xfrm_rcv_cb(), which is needed by ipip/ipv6 tunnels' support in ip(6)_vti and xfrm interface in the next patches. Signed-off-by: Xin Long Signed-off-by: Steffen Klassert commit a76733a9875238e271a3fd5778d5596248904f07 Author: Xiaoyao Li Date: Thu Jul 9 12:34:22 2020 +0800 KVM: x86: Introduce kvm_check_cpuid() Use kvm_check_cpuid() to validate if userspace provides legal cpuid settings and call it before KVM take any action to update CPUID or update vcpu states based on given CPUID settings. Signed-off-by: Xiaoyao Li Message-Id: <20200709043426.92712-2-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit 36f37648ca982915918bea001a40172c5b0cb233 Author: Xiaoyao Li Date: Wed Jul 8 14:50:54 2020 +0800 KVM: X86: Move kvm_apic_set_version() to kvm_update_cpuid() There is no dependencies between kvm_apic_set_version() and kvm_update_cpuid() because kvm_apic_set_version() queries X2APIC CPUID bit, which is not touched/changed by kvm_update_cpuid(). Obviously, kvm_apic_set_version() belongs to the category of updating vcpu model. Signed-off-by: Xiaoyao Li Message-Id: <20200708065054.19713-9-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit 2568528f55356a2f20f80a18244d3e235cbd2cab Author: Martin Blumenstingl Date: Mon Jun 29 22:39:04 2020 +0200 clk: meson: meson8b: add the vclk2_en gate clock HHI_VIID_CLK_CNTL[19] is not part of the public S805 datasheet. However, the GXBB driver defines this bit as a gate called "vclk2" and in the 3.10 kernel GPL code dump the following line can found: WRITE_LCD_CBUS_REG_BITS(HHI_VIID_CLK_CNTL, 0, 19, 1); //disable vclk2_en Add this gate clock to the Meson8/Meson8b/Meson8m2 clock controller to complete the VCLK2 clock tree. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200629203904.2989007-3-martin.blumenstingl@googlemail.com commit e653b41131f60054dbfa0c7431613d6aeaee2212 Author: Martin Blumenstingl Date: Mon Jun 29 22:39:03 2020 +0200 clk: meson: meson8b: add the vclk_en gate clock HHI_VID_CLK_CNTL[19] is documented as CLK_EN0. This description is the same in the public S912 datasheet and the GXBB driver calls this gate "vclk". Add this gate clock to the Meson8/Meson8b/Meson8m2 clock controller because it's needed to make the video output work. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200629203904.2989007-2-martin.blumenstingl@googlemail.com commit 2c5c3cfb2da577bb23c3d9d771cc08300dec3559 Author: Jonathan Marek Date: Tue Jun 9 15:40:20 2020 -0400 iommu: arm-smmu-impl: Use qcom impl for sm8150 and sm8250 compatibles Use the qcom implementation for IOMMU hardware on sm8150 and sm8250 SoCs. Signed-off-by: Jonathan Marek Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200609194030.17756-3-jonathan@marek.ca Signed-off-by: Will Deacon commit 7b6b70d88b10c61af7050820ca041ff9e73482ae Author: Jonathan Marek Date: Tue Jun 9 15:40:19 2020 -0400 dt-bindings: arm-smmu: Add sm8150 and sm8250 compatible strings Add compatible strings for sm8150 and sm8250 iommus to documentation. Signed-off-by: Jonathan Marek Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200609194030.17756-2-jonathan@marek.ca Signed-off-by: Will Deacon commit 813ec3f1fe517acd533d44536195910edaaeebef Author: Barry Song Date: Sun Jul 5 21:18:59 2020 +1200 crypto: hisilicon/zip - permit users to specify NUMA node If users don't specify NUMA node, the driver will use the ZIP module near the CPU allocating acomp. Otherwise, it uses the ZIP module according to the requirement of users. Cc: Zhou Wang Signed-off-by: Barry Song Signed-off-by: Herbert Xu commit 7bc13b5b60e9412a7ddef300ce2c661eecd1fd5d Author: Barry Song Date: Sun Jul 5 21:18:58 2020 +1200 crypto: api - permit users to specify numa node of acomp hardware For a Linux server with NUMA, there are possibly multiple (de)compressors which are either local or remote to some NUMA node. Some drivers will automatically use the (de)compressor near the CPU calling acomp_alloc(). However, it is not necessarily correct because users who send acomp_req could be from different NUMA node with the CPU which allocates acomp. Just like kernel has kmalloc() and kmalloc_node(), here crypto can have same support. Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool Cc: Andrew Morton Cc: Jonathan Cameron Signed-off-by: Barry Song Signed-off-by: Herbert Xu commit 3347c8a079d67af21760a78cc5f2abbcf06d9571 Author: Sedat Dilek Date: Fri Jul 3 16:32:06 2020 +0200 crypto: aesni - Fix build with LLVM_IAS=1 When building with LLVM_IAS=1 means using Clang's Integrated Assembly (IAS) from LLVM/Clang >= v10.0.1-rc1+ instead of GNU/as from GNU/binutils I see the following breakage in Debian/testing AMD64: :15:74: error: too many positional arguments PRECOMPUTE 8*3+8(%rsp), %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, ^ arch/x86/crypto/aesni-intel_asm.S:1598:2: note: while in macro instantiation GCM_INIT %r9, 8*3 +8(%rsp), 8*3 +16(%rsp), 8*3 +24(%rsp) ^ :47:2: error: unknown use of instruction mnemonic without a size suffix GHASH_4_ENCRYPT_4_PARALLEL_dec %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, enc ^ arch/x86/crypto/aesni-intel_asm.S:1599:2: note: while in macro instantiation GCM_ENC_DEC dec ^ :15:74: error: too many positional arguments PRECOMPUTE 8*3+8(%rsp), %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, ^ arch/x86/crypto/aesni-intel_asm.S:1686:2: note: while in macro instantiation GCM_INIT %r9, 8*3 +8(%rsp), 8*3 +16(%rsp), 8*3 +24(%rsp) ^ :47:2: error: unknown use of instruction mnemonic without a size suffix GHASH_4_ENCRYPT_4_PARALLEL_enc %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, enc ^ arch/x86/crypto/aesni-intel_asm.S:1687:2: note: while in macro instantiation GCM_ENC_DEC enc Craig Topper suggested me in ClangBuiltLinux issue #1050: > I think the "too many positional arguments" is because the parser isn't able > to handle the trailing commas. > > The "unknown use of instruction mnemonic" is because the macro was named > GHASH_4_ENCRYPT_4_PARALLEL_DEC but its being instantiated with > GHASH_4_ENCRYPT_4_PARALLEL_dec I guess gas ignores case on the > macro instantiation, but llvm doesn't. First, I removed the trailing comma in the PRECOMPUTE line. Second, I substituted: 1. GHASH_4_ENCRYPT_4_PARALLEL_DEC -> GHASH_4_ENCRYPT_4_PARALLEL_dec 2. GHASH_4_ENCRYPT_4_PARALLEL_ENC -> GHASH_4_ENCRYPT_4_PARALLEL_enc With these changes I was able to build with LLVM_IAS=1 and boot on bare metal. I confirmed that this works with Linux-kernel v5.7.5 final. NOTE: This patch is on top of Linux v5.7 final. Thanks to Craig and especially Nick for double-checking and his comments. Suggested-by: Craig Topper Suggested-by: Craig Topper Suggested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers Cc: "ClangBuiltLinux" Link: https://github.com/ClangBuiltLinux/linux/issues/1050 Link: https://bugs.llvm.org/show_bug.cgi?id=24494 Signed-off-by: Sedat Dilek Signed-off-by: Herbert Xu commit d9dd5ef3d32b20b5568a28c195dec8b1a20902cf Author: Herbert Xu Date: Fri Jul 3 14:46:52 2020 +1000 crypto: ccp - Fix sparse warnings This patch fixes a number of endianness marking issues in the ccp driver. Signed-off-by: Herbert Xu Acked-by: John Allen Signed-off-by: Herbert Xu commit 662bb52f50bca16a74fe92b487a14d7dccb85e1a Author: Herbert Xu Date: Thu Jul 2 13:32:21 2020 +1000 crypto: af_alg - Fix regression on empty requests Some user-space programs rely on crypto requests that have no control metadata. This broke when a check was added to require the presence of control metadata with the ctx->init flag. This patch fixes the regression by setting ctx->init as long as one sendmsg(2) has been made, with or without a control message. Reported-by: Sachin Sant Reported-by: Naresh Kamboju Fixes: f3c802a1f300 ("crypto: algif_aead - Only wake up when...") Signed-off-by: Herbert Xu commit ad6a0664c29c698bfe5c46c49f627af6f5bb172b Author: Rikard Falkeborn Date: Wed Jul 1 22:29:36 2020 +0200 crypto: virtio - constify features[] and id_table[] features[] and id_table[] are not modified and can be made const to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 11534 2056 160 13750 35b6 drivers/crypto/virtio/virtio_crypto_core.o After: text data bss dec hex filename 11630 1992 128 13750 35b6 drivers/crypto/virtio/virtio_crypto_core.o Signed-off-by: Rikard Falkeborn Signed-off-by: Herbert Xu commit a024d70ae29825b117f2c80c53345053f074cdc1 Author: Rikard Falkeborn Date: Wed Jul 1 22:09:48 2020 +0200 hwrng: virtio - Constify id_table[] id_table[] is not modified and an be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 1746 192 8 1946 79a drivers/char/hw_random/virtio-rng.o After: text data bss dec hex filename 1762 176 8 1946 79a drivers/char/hw_random/virtio-rng.o Signed-off-by: Rikard Falkeborn Signed-off-by: Herbert Xu commit b242973f0fae47563917c7bd2ac6bf2b72cdafe8 Author: Rikard Falkeborn Date: Wed Jul 1 22:09:47 2020 +0200 hwrng: nomadik - Constify nmk_rng_ids[] nmk_rng_ids[] is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 652 216 4 872 368 drivers/char/hw_random/nomadik-rng.o After: text data bss dec hex filename 676 192 4 872 368 drivers/char/hw_random/nomadik-rng.o Signed-off-by: Rikard Falkeborn Acked-by: Arnd Bergmann Signed-off-by: Herbert Xu commit d4f6d923238dbdb69b8525e043fedef2670d4f2c Author: Rikard Falkeborn Date: Wed Jul 1 22:09:46 2020 +0200 hwrng: bcm2835 - Constify bcm2835_rng_devtype[] bcm2835_rng_devtype[] is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 2392 176 0 2568 a08 drivers/char/hw_random/bcm2835-rng.o After: text data bss dec hex filename 2464 104 0 2568 a08 drivers/char/hw_random/bcm2835-rng.o Signed-off-by: Rikard Falkeborn Acked-by: Florian Fainelli Signed-off-by: Herbert Xu commit e4ca592c4d5289838d7737defe749802f08f0eac Author: Geert Uytterhoeven Date: Tue Jun 30 15:39:41 2020 +0200 hwrng: ba431 - HW_RANDOM_BA431 should not default to y As HW_RANDOM_BA431 does not have any platform dependency, it should not default to enabled. Fixes: 0289e9be5dc26d84 ("hwrng: ba431 - add support for BA431 hwrng") Signed-off-by: Geert Uytterhoeven Signed-off-by: Herbert Xu commit 1186b429fc0124828d48148b8b261322e22b5248 Author: Herbert Xu Date: Tue Jun 30 14:20:37 2020 +1000 hwrng: ba431 - Add dependency on HAS_IOMEM The ba431 driver depends on HAS_IOMEM and this was missing from the Kconfig file. Reported-by: kernel test robot Fixes: 0289e9be5dc2 ("hwrng: ba431 - add support for BA431 hwrng") Signed-off-by: Herbert Xu commit a85211f36f3d637cd9c8e347ae5d37b72837dafb Author: Giovanni Cabiddu Date: Mon Jun 29 18:16:20 2020 +0100 crypto: qat - fallback for xts with 192 bit keys Forward requests to another provider if the key length for AES-XTS is 192 bits as this is not supported by the QAT accelerators. This fixes the following issue reported with the option CONFIG_CRYPTO_MANAGER_EXTRA_TESTS: alg: skcipher: qat_aes_xts setkey failed on test vector "random: len=3204 klen=48"; expected_error=0, actual_error=-22, flags=0x1 Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 5fb8b70d206fe25c35abc2256bfc0d4e64f1af4d Author: Giovanni Cabiddu Date: Mon Jun 29 18:16:19 2020 +0100 crypto: qat - remove unused field in skcipher ctx Remove tfm field in qat_alg_skcipher_ctx structure. This is not used. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit b185a68710e074eeaffb595a31f9bb617c2aa890 Author: Giovanni Cabiddu Date: Mon Jun 29 18:16:18 2020 +0100 crypto: qat - validate xts key Validate AES-XTS key using the function xts_verify_key() to prevent malformed keys. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 528f776df67c440361b2847b4da400d8754bf030 Author: Giovanni Cabiddu Date: Mon Jun 29 18:16:17 2020 +0100 crypto: qat - allow xts requests not multiple of block Allow AES-XTS requests that are not multiple of the block size. If a request is smaller than the block size, return -EINVAL. This fixes the following issue reported by the crypto testmgr self-test: alg: skcipher: qat_aes_xts encryption failed on test vector "random: len=116 klen=64"; expected_error=0, actual_error=-22, cfg="random: inplace may_sleep use_finup src_divs=[45.85%@+4077, 54.15%@alignmask+18]" Fixes: 96ee111a659e ("crypto: qat - return error for block...") Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 74da405803c64dd6601a822b4c3e7b4ee7816058 Author: Herbert Xu Date: Mon Jun 29 18:04:07 2020 +1000 hwrng: octeon - Fix sparse warnings This patch fixes a bunch of sparse warnings by adding __force tags when casting __iomem poitners to u64. Signed-off-by: Herbert Xu commit e05231a53b7f85793983e36c187aa2494649f4ad Author: Herbert Xu Date: Mon Jun 29 18:04:04 2020 +1000 hwrng: pic32 - Fix W=1 unused variable warning This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu commit ad23756271d5744a0a0ba556f8aaa70e358d5aa6 Author: Herbert Xu Date: Mon Jun 29 18:04:02 2020 +1000 hwrng: st - Fix W=1 unused variable warning This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu commit 64f8153a2f36d2eb82fc6e4d7eee3b08ef10371c Author: Herbert Xu Date: Mon Jun 29 18:04:00 2020 +1000 hwrng: bcm2835 - Fix W=1 unused variable warning This patch fixes an unused variable warning when this driver is built with CONFIG_OF=n. Signed-off-by: Herbert Xu commit eb515c60fac744c3e5bc16cbc4f2e0439b0a8b03 Author: Herbert Xu Date: Mon Jun 29 18:03:57 2020 +1000 hwrng: hisi - Fix W=1 unused variable warning This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Signed-off-by: Herbert Xu commit 414a3c1b811da4ba4ebe441f3e69a17c053196a2 Author: Herbert Xu Date: Mon Jun 29 18:03:55 2020 +1000 hwrng: omap - Fix W=1 unused variable warning This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. While we're at it this patch also expands the compiler coverage when CONFIG_OF is off by removing all the CONFIG_OF ifdefs. Signed-off-by: Herbert Xu commit 9a150af05f6f73186e0017a37104b5eb061ee627 Author: Herbert Xu Date: Mon Jun 29 18:03:53 2020 +1000 hwrng: npcm - Fix W=1 unused variable warning This patch fixes an unused variable warning when this driver is built-in with CONFIG_OF=n. Reported-by: kernel test robot Signed-off-by: Herbert Xu commit f7f611f2b1dc69547d425de0daeac548add2c761 Author: Linus Walleij Date: Wed Jul 8 09:11:49 2020 +0200 ARM: s3c24xx: leds: Convert to use GPIO descriptors This converts the s3c24xx LED driver to use GPIO descriptors and also modify all board files to account for these changes by registering the appropriate GPIO tables for each board. The driver was using a custom flag to indicate open drain (tristate) but this can be handled by standard descriptor machine tables. The driver was setting non-pull-up for the pin using the custom S3C24xx GPIO API, but this is a custom pin control system used by the S3C24xx and no generic GPIO function, so this has simply been pushed back into the respective board files. Signed-off-by: Linus Walleij Acked-by: Jacek Anaszewski Signed-off-by: Krzysztof Kozlowski commit eb0c68ea4246252ba56951c6cf5e5d544a342e9e Author: Johan Hovold Date: Wed Jul 8 14:50:00 2020 +0200 USB: serial: drop redundant transfer-buffer casts Drop redundant URB transfer-buffer casts. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 7aab96d6e3c54128f9e335fa8b11a0bd8815e118 Author: Johan Hovold Date: Wed Jul 8 14:49:59 2020 +0200 USB: serial: drop extern keyword from function declarations Drop the redundant extern keyword from function declarations in the subsystem header file to improve readability (and make it easier to spot the global variables). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 1cafb03d5d88631c218a072e4116ac92e9782dd0 Author: Johan Hovold Date: Wed Jul 8 14:49:58 2020 +0200 USB: serial: drop unnecessary sysrq include There's no need to include sysrq.h in the subsystem header. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 4b5cf2b8f90faf32bbb735b545510edefce094be Author: Johan Hovold Date: Wed Jul 8 14:49:57 2020 +0200 USB: serial: add sysrq break-handler dummy Add inline sysrq break-handler dummy to allow the compiler to eliminate further code when either console or sysrq support isn't enabled and to clearly mark the two sysrq functions as belonging together. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 4fbfbdb5726ff15bdce1c371efa1281b28322f64 Author: Johan Hovold Date: Wed Jul 8 14:49:56 2020 +0200 USB: serial: inline sysrq dummy function Inline the dummy sysrq character handling when either console support or magic-sysrq support isn't enabled to allow the compiler to eliminate unused code. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 8c6a223186a6c3fe7cd381ef7e1d60ea6fd8fd52 Author: Johan Hovold Date: Wed Jul 8 14:49:55 2020 +0200 USB: serial: only process sysrq when enabled Do not set the sysrq timestamp unless CONFIG_MAGIC_SYSRQ is enabled to avoid unnecessary per-character processing for consoles. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 37ae231554f401104bf21847f9093d647a47faa4 Author: Johan Hovold Date: Wed Jul 8 14:49:54 2020 +0200 USB: serial: only set sysrq timestamp for consoles Only set the sysrq timestamp for console ports to avoid having every driver also check the console flag when processing incoming data. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 733fff67941dad64b8a630450b8372b1873edc41 Author: Johan Hovold Date: Wed Jul 8 14:49:53 2020 +0200 USB: serial: ftdi_sio: fix break and sysrq handling Only the last NUL in a packet should be flagged as a break character, for example, to avoid dropping unrelated characters when IGNBRK is set. Also make sysrq work by consuming the break character instead of having it immediately cancel the sysrq request, and by not processing it prematurely to avoid triggering a sysrq based on an unrelated character received in the same packet (which was received *before* the break). Note that the break flag can be left set also for a packet received immediately following a break and that and an ending NUL in such a packet will continue to be reported as a break as there's no good way to tell it apart from an actual break. Tested on FT232R and FT232H. Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on break") Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit ce054039ba5e47b75a3be02a00274e52b06a6456 Author: Johan Hovold Date: Wed Jul 8 14:49:52 2020 +0200 USB: serial: ftdi_sio: clean up receive processing Clean up receive processing by dropping the character pointer and keeping the length argument unchanged throughout the function. Also make it more apparent that sysrq processing can consume a characters by adding an explicit continue. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit ab4cc4ef6724ea588e835fc1e764c4b4407a70b7 Author: Johan Hovold Date: Wed Jul 8 14:49:51 2020 +0200 USB: serial: ftdi_sio: make process-packet buffer unsigned Use an unsigned type for the process-packet buffer argument and give it a more apt name. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 476fdf14e5c55c699f4eee4fbf74b76a8f90d148 Author: Jan Kara Date: Thu Jul 9 08:08:36 2020 +0200 quota: Fixup http links in quota doc Switch link to Sourceforge in quota documentation to https and replace link for libnl documentation with a working one from infradead. Signed-off-by: Jan Kara commit 1f1a5be80ceec2acdbd6f221747657fbe3e44a8f Author: Alexander A. Klimov Date: Wed Jul 8 19:19:05 2020 +0200 Replace HTTP links with HTTPS ones: DISKQUOTA Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Link: https://lore.kernel.org/r/20200708171905.15396-1-grandmaster@al2klimov.de Signed-off-by: Alexander A. Klimov Signed-off-by: Jan Kara commit 1197d04fd3f1daf75cfd0a68442080186e546178 Author: Chengguang Xu Date: Fri Jun 26 13:49:59 2020 +0800 ext2: initialize quota info in ext2_xattr_set() In order to correctly account/limit space usage, should initialize quota info before calling quota related functions. Link: https://lore.kernel.org/r/20200626054959.114177-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Reviewed-by: Reviewed-by: Ritesh Harjani Signed-off-by: Jan Kara commit cf1013f441eb997ae770566f88cf021086d34cff Author: Chengguang Xu Date: Fri Jul 3 20:44:11 2020 +0800 ext2: fix some incorrect comments in inode.c There are some incorrect comments in inode.c, so fix them properly. Link: https://lore.kernel.org/r/20200703124411.24085-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit 30b42a714d3241ce2aa2561f629dd6088c60fef7 Author: Chengguang Xu Date: Fri Jun 19 15:31:44 2020 +0800 ext2: remove nocheck option Remove useless nocheck option. Link: https://lore.kernel.org/r/20200619073144.4701-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit bc2fbaa4d3808aef82dd1064a8e61c16549fe956 Author: Mikulas Patocka Date: Mon Apr 20 16:02:21 2020 -0400 ext2: fix missing percpu_counter_inc sbi->s_freeinodes_counter is only decreased by the ext2 code, it is never increased. This patch fixes it. Note that sbi->s_freeinodes_counter is only used in the algorithm that tries to find the group for new allocations, so this bug is not easily visible (the only visibility is that the group finding algorithm selects inoptinal result). Link: https://lore.kernel.org/r/alpine.LRH.2.02.2004201538300.19436@file01.intranet.prod.int.rdu2.redhat.com Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Jan Kara commit a43850a380ef56009ce721737b0c08984b663b99 Author: zhangyi (F) Date: Mon Jun 8 11:40:43 2020 +0800 ext2: ext2_find_entry() return -ENOENT if no entry found Almost all callers of ext2_find_entry() transform NULL return value to -ENOENT, so just let ext2_find_entry() retuen -ENOENT instead of NULL if no valid entry found, and also switch to check the return value of ext2_inode_by_name() in ext2_lookup() and ext2_get_parent(). Link: https://lore.kernel.org/r/20200608034043.10451-2-yi.zhang@huawei.com Signed-off-by: zhangyi (F) Suggested-by: Jan Kara Signed-off-by: Jan Kara commit b4962091a54c8c332e4c6c211a86b7f6d6e1f759 Author: zhangyi (F) Date: Mon Jun 8 11:40:42 2020 +0800 ext2: propagate errors up to ext2_find_entry()'s callers The same to commit <36de928641ee4> (ext4: propagate errors up to ext4_find_entry()'s callers') in ext4, also return error instead of NULL pointer in case of some error happens in ext2_find_entry() (e.g. -ENOMEM or -EIO). This could avoid a negative dentry cache entry installed even it failed to read directory block due to IO error. Link: https://lore.kernel.org/r/20200608034043.10451-1-yi.zhang@huawei.com Signed-off-by: zhangyi (F) Signed-off-by: Jan Kara commit 1fcbcf06e4f159e0db39a53fe258336febbba804 Author: Chengguang Xu Date: Wed Jun 3 16:44:29 2020 +0800 ext2: fix improper assignment for e_value_offs In the process of changing value for existing EA, there is an improper assignment of e_value_offs(setting to 0), because it will be reset to incorrect value in the following loop(shifting EA values before target). Delayed assignment can avoid this issue. Link: https://lore.kernel.org/r/20200603084429.25344-1-cgxu519@mykernel.net Signed-off-by: Chengguang Xu Signed-off-by: Jan Kara commit 95a62311edf3677c5b1d5ab74380dfa51e5f6b03 Merge: 57c8aa43b9f27 3cfa435c69f43 Author: Herbert Xu Date: Thu Jul 9 16:02:06 2020 +1000 Merge branch 'ux500' The change on the ux500 branch is needed by the regulator API. commit 3cfa435c69f43be12c333744f3af29e167b554f3 Author: Lee Jones Date: Mon Jun 29 13:30:03 2020 +0100 crypto: ux500/hash - Add namespacing to hash_init() A recent change to the Regulator consumer API (which this driver utilises) add prototypes for the some suspend functions. These functions require including header file include/linux/suspend.h. The following tree of includes affecting this driver will be present: In file included from include/linux/elevator.h:6, from include/linux/blkdev.h:288, from include/linux/blk-cgroup.h:23, from include/linux/writeback.h:14, from include/linux/memcontrol.h:22, from include/linux/swap.h:9, from include/linux/suspend.h:5, from include/linux/regulator/consumer.h:35, from drivers/crypto/ux500/hash/hash_core.c:28: include/linux/elevator.h pulls in include/linux/hashtable.h which contains its own version of hash_init(). This confuses the build system and results in the following error (amongst others): drivers/crypto/ux500/hash/hash_core.c:1362:19: error: passing argument 1 of '__hash_init' from incompatible pointer type [-Werror=incompatible-pointer-types] 1362 | return hash_init(req); Fix this by namespacing the local hash_init() such that the source of confusion is removed. Cc: Linus Walleij Cc: David S. Miller Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit aff6fbbe8e1b62af381f443291fd15fd16e17805 Author: Chao Yu Date: Tue Jul 7 09:35:41 2020 +0800 f2fs: don't keep meta inode pages used for compressed block migration meta inode's pages are used for encrypted, verity and compressed blocks, so the meta inode's cache invalidation condition in do_checkpoint() should consider compression as well, not just for verity and encryption, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 62495d778439a4e47571293511a785cba754874c Author: Rishabh Bhatnagar Date: Tue Jun 23 19:23:28 2020 -0700 remoteproc: qcom: Add notification types to SSR The SSR subdevice only adds callback for the unprepare event. Add callbacks for prepare, start and prepare events. The client driver for a particular remoteproc might be interested in knowing the status of the remoteproc while undergoing SSR, not just when the remoteproc has finished shutting down. Reviewed-by: Alex Elder Signed-off-by: Siddharth Gupta Signed-off-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/1592965408-16908-3-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson commit 5abfe5cf0b8358b8ad0da99e4188c2519839d67c Author: Rishabh Bhatnagar Date: Tue Jun 23 19:23:27 2020 -0700 remoteproc: qcom: Add per subsystem SSR notification Currently there is a single notification chain which is called whenever any remoteproc shuts down. This leads to all the listeners being notified, and is not an optimal design as kernel drivers might only be interested in listening to notifications from a particular remoteproc. Create a global list of remoteproc notification info data structures. This will hold the name and notifier_list information for a particular remoteproc. The API to register for notifications will use name argument to retrieve the notification info data structure and the notifier block will be added to that data structure's notification chain. Also move from blocking notifier to srcu notifer based implementation to support dynamic notifier head creation. Reviewed-by: Alex Elder Co-developed-by: Siddharth Gupta Signed-off-by: Siddharth Gupta Signed-off-by: Rishabh Bhatnagar Link: https://lore.kernel.org/r/1592965408-16908-2-git-send-email-rishabhb@codeaurora.org Signed-off-by: Bjorn Andersson commit 237389e3015e0f4ceac7cf00c70a59746150561d Author: Ondrej Mosnacek Date: Wed Jul 8 13:24:45 2020 +0200 selinux: specialize symtab insert and search functions This encapsulates symtab a little better and will help with further refactoring later. Signed-off-by: Ondrej Mosnacek Acked-by: Stephen Smalley Signed-off-by: Paul Moore commit 21cf866145047f8bfecb38ec8d2fed64464c074f Author: Christoph Hellwig Date: Wed Jul 1 11:06:22 2020 +0200 writeback: remove bdi->congested_fn Except for pktdvd, the only places setting congested bits are file systems that allocate their own backing_dev_info structures. And pktdvd is a deprecated driver that isn't useful in stack setup either. So remove the dead congested_fn stacking infrastructure. Signed-off-by: Christoph Hellwig Acked-by: Song Liu Acked-by: David Sterba [axboe: fixup unused variables in bcache/request.c] Signed-off-by: Jens Axboe commit f548a476268d621846bb0146af861bb56250ae37 Author: Jarod Wilson Date: Wed Jul 8 18:58:49 2020 -0400 bonding: don't need RTNL for ipsec helpers The bond_ipsec_* helpers don't need RTNL, and can potentially get called without it being held, so switch from rtnl_dereference() to rcu_dereference() to access bond struct data. Lightly tested with xfrm bonding, no problems found, should address the syzkaller bug referenced below. Reported-by: syzbot+582c98032903dcc04816@syzkaller.appspotmail.com CC: Huy Nguyen CC: Saeed Mahameed CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: "David S. Miller" CC: Jeff Kirsher CC: Jakub Kicinski CC: Steffen Klassert CC: Herbert Xu CC: netdev@vger.kernel.org CC: intel-wired-lan@lists.osuosl.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller commit 8c911f3d4c074a17955a1757c9d1d5a9a5209ca5 Author: Christoph Hellwig Date: Wed Jul 1 11:06:21 2020 +0200 writeback: remove struct bdi_writeback_congested We never set any congested bits in the group writeback instances of it. And for the simpler bdi-wide case a simple scalar field is all that that is needed. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 492d76b215660be833f12c3fa7cf2faf39434841 Author: Christoph Hellwig Date: Wed Jul 1 11:06:20 2020 +0200 writeback: remove {set,clear}_wb_congested Just merge them into their only callers. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d5c69838454c409e06e978d90c4bd152f5f9fa30 Author: Christoph Hellwig Date: Wed Jul 1 11:06:19 2020 +0200 drbd: remove a bogus bdi_rw_congested call bdi_rw_congested returns congestion state, so calling it without looking at the return value doesn't make much sense. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d7481b24b816b8c3955a9eaf01b97e2bd7f61a37 Author: Richard Guy Briggs Date: Fri Jul 3 12:56:19 2020 -0400 audit: issue CWD record to accompany LSM_AUDIT_DATA_* records The LSM_AUDIT_DATA_* records for PATH, FILE, IOCTL_OP, DENTRY and INODE are incomplete without the task context of the AUDIT Current Working Directory record. Add it. This record addition can't use audit_dummy_context to determine whether or not to store the record information since the LSM_AUDIT_DATA_* records are initiated by various LSMs independent of any audit rules. context->in_syscall is used to determine if it was called in user context like audit_getname. Please see the upstream issue https://github.com/linux-audit/audit-kernel/issues/96 Adapted from Vladis Dronov's v2 patch. Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 2977282b63c3b6f112145ecf0bcefff0c65bd3ac Merge: b8c50df0cb3eb 6984cbc6dfa28 Author: Daniel Borkmann Date: Thu Jul 9 00:44:46 2020 +0200 Merge branch 'bpf-libbpf-old-kernel' Andrii Nakryiko says: ==================== This patch set improves libbpf's support of old kernels, missing features like BTF support, global variables support, etc. Most critical one is a silent drop of CO-RE relocations if libbpf fails to load BTF (despite sanitization efforts). This is frequently the case for kernels that have no BTF support whatsoever. There are still useful BPF applications that could work on such kernels and do rely on CO-RE. To that end, this series revamps the way BTF is handled in libbpf. Failure to load BTF into kernel doesn't prevent libbpf from using BTF in its full capability (e.g., for CO-RE relocations) internally. Another issue that was identified was reliance of perf_buffer__new() on BPF_OBJ_GET_INFO_BY_FD command, which is more recent that perf_buffer support itself. Furthermore, BPF_OBJ_GET_INFO_BY_FD is needed just for some sanity checks to provide better user errors, so could be safely omitted if kernel doesn't provide it. Perf_buffer selftest was adjusted to use skeleton, instead of bpf_prog_load(). The latter uses BPF_F_TEST_RND_HI32 flag, which is a relatively recent addition and unnecessary fails selftest in libbpf's Travis CI tests. By using skeleton we both get a shorter selftest and it work on pretty ancient kernels, giving better libbpf test coverage. One new selftest was added that relies on basic CO-RE features, but otherwise doesn't expect any recent features (like global variables) from kernel. Again, it's good to have better coverage of old kernels in libbpf testing. ==================== Signed-off-by: Daniel Borkmann commit 6984cbc6dfa280687367b9660d8c830518239851 Author: Andrii Nakryiko Date: Tue Jul 7 18:53:18 2020 -0700 selftests/bpf: Switch perf_buffer test to tracepoint and skeleton Switch perf_buffer test to use skeleton to avoid use of bpf_prog_load() and make test a bit more succinct. Also switch BPF program to use tracepoint instead of kprobe, as that allows to support older kernels, which had tracepoint support before kprobe support in the form that libbpf expects (i.e., libbpf expects /sys/bus/event_source/devices/kprobe/type, which doesn't always exist on old kernels). Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200708015318.3827358-7-andriin@fb.com commit 0e289487308236903b19273f2ddb4f0adf732b9e Author: Andrii Nakryiko Date: Tue Jul 7 18:53:17 2020 -0700 libbpf: Handle missing BPF_OBJ_GET_INFO_BY_FD gracefully in perf_buffer perf_buffer__new() is relying on BPF_OBJ_GET_INFO_BY_FD availability for few sanity checks. OBJ_GET_INFO for maps is actually much more recent feature than perf_buffer support itself, so this causes unnecessary problems on old kernels before BPF_OBJ_GET_INFO_BY_FD was added. This patch makes those sanity checks optional and just assumes best if command is not supported. If user specified something incorrectly (e.g., wrong map type), kernel will reject it later anyway, except user won't get a nice explanation as to why it failed. This seems like a good trade off for supporting perf_buffer on old kernels. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200708015318.3827358-6-andriin@fb.com commit fcda189a5133b6fe50eb63d1062a15be4df9e3de Author: Andrii Nakryiko Date: Tue Jul 7 18:53:16 2020 -0700 selftests/bpf: Add test relying only on CO-RE and no recent kernel features Add a test that relies on CO-RE, but doesn't expect any of the recent features, not available on old kernels. This is useful for Travis CI tests running against very old kernels (e.g., libbpf has 4.9 kernel testing now), to verify that CO-RE still works, even if kernel itself doesn't support BTF yet, as long as there is .BTF embedded into vmlinux image by pahole. Given most of CO-RE doesn't require any kernel awareness of BTF, it is a useful test to validate that libbpf's BTF sanitization is working well even with ancient kernels. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200708015318.3827358-5-andriin@fb.com commit 0f0e55d8247c0742a9b026fc097fcc605383b9db Author: Andrii Nakryiko Date: Tue Jul 7 18:53:15 2020 -0700 libbpf: Improve BTF sanitization handling Change sanitization process to preserve original BTF, which might be used by libbpf itself for Kconfig externs, CO-RE relocs, etc, even if kernel is old and doesn't support BTF. To achieve that, if libbpf detects the need for BTF sanitization, it would clone original BTF, sanitize it in-place, attempt to load it into kernel, and if successful, will preserve loaded BTF FD in original `struct btf`, while freeing sanitized local copy. If kernel doesn't support any BTF, original btf and btf_ext will still be preserved to be used later for CO-RE relocation and other BTF-dependent libbpf features, which don't dependon kernel BTF support. Patch takes care to not specify BTF and BTF.ext features when loading BPF programs and/or maps, if it was detected that kernel doesn't support BTF features. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200708015318.3827358-4-andriin@fb.com commit 81372e121802fd57892a0b44d93cc747d9568627 Author: Andrii Nakryiko Date: Tue Jul 7 18:53:14 2020 -0700 libbpf: Add btf__set_fd() for more control over loaded BTF FD Add setter for BTF FD to allow application more fine-grained control in more advanced scenarios. Storing BTF FD inside `struct btf` provides little benefit and probably would be better done differently (e.g., btf__load() could just return FD on success), but we are stuck with this due to backwards compatibility. The main problem is that it's impossible to load BTF and than free user-space memory, but keep FD intact, because `struct btf` assumes ownership of that FD upon successful load and will attempt to close it during btf__free(). To allow callers (e.g., libbpf itself for BTF sanitization) to have more control over this, add btf__set_fd() to allow to reset FD arbitrarily, if necessary. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200708015318.3827358-3-andriin@fb.com commit bfc96656a766bd0566565d8a7b6232b2b036fdfb Author: Andrii Nakryiko Date: Tue Jul 7 18:53:13 2020 -0700 libbpf: Make BTF finalization strict With valid ELF and valid BTF, there is no reason (apart from bugs) why BTF finalization should fail. So make it strict and return error if it fails. This makes CO-RE relocation more reliable, as they are not going to be just silently skipped, if BTF finalization failed. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200708015318.3827358-2-andriin@fb.com commit 7d25e14eb2c0f07d10815a524542cdf681cb472c Author: Fabio Estevam Date: Wed Jul 8 18:24:22 2020 -0300 dt-bindings: dp83869: Fix the type of device DP83869 is an Ethernet PHY, not a charger, so fix the documentation accordingly. Fixes: 4d66c56f7efe ("dt-bindings: net: dp83869: Add TI dp83869 phy") Signed-off-by: Fabio Estevam Acked-by: Dan Murphy Signed-off-by: David S. Miller commit a6b9580b4936d2bb36c29e849ce5e9f10e599b0e Author: Fabio Estevam Date: Wed Jul 8 18:24:21 2020 -0300 dt-bindings: dp83867: Fix the type of device DP83867 is an Ethernet PHY, not a charger, so fix the documentation accordingly. Fixes: 74ac28f16486 ("dt-bindings: dp83867: Convert DP83867 to yaml") Signed-off-by: Fabio Estevam Acked-by: Dan Murphy Signed-off-by: David S. Miller commit 5cd24cbe7dca62089ac6228f1dd14729d7da6ed8 Author: Jarod Wilson Date: Wed Jul 8 13:46:31 2020 -0400 bonding: deal with xfrm state in all modes and add more error-checking It's possible that device removal happens when the bond is in non-AB mode, and addition happens in AB mode, so bond_ipsec_del_sa() never gets called, which leaves security associations in an odd state if bond_ipsec_add_sa() then gets called after switching the bond into AB. Just call add and delete universally for all modes to keep things consistent. However, it's also possible that this code gets called when the system is shutting down, and the xfrm subsystem has already been disconnected from the bond device, so we need to do some error-checking and bail, lest we hit a null ptr deref. Fixes: a3b658cfb664 ("bonding: allow xfrm offload setup post-module-load") CC: Huy Nguyen CC: Saeed Mahameed CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: "David S. Miller" CC: Jeff Kirsher CC: Jakub Kicinski CC: Steffen Klassert CC: Herbert Xu CC: netdev@vger.kernel.org CC: intel-wired-lan@lists.osuosl.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller commit 32e0d42a162ade4a931f59b505c2ffb463a70e34 Merge: 12fdafb817c6c a20fafb92bd84 Author: David S. Miller Date: Wed Jul 8 15:36:19 2020 -0700 Merge branch 'RTL8366RB-tagging-support' Linus Walleij says: ==================== RTL8366RB tagging support This patch set adds DSA tagging support to the RTL8366RB DSA driver. There is a minor performance improvement in the tag parser compared to the previous patch set and the review tags have been collected. ==================== Signed-off-by: David S. Miller commit a20fafb92bd84b9ab585ef4743339c96865cada2 Author: Linus Walleij Date: Wed Jul 8 14:25:37 2020 +0200 net: dsa: rtl8366rb: Support the CPU DSA tag This activates the support to use the CPU tag to properly direct ingress traffic to the right port. Bit 15 in register RTL8368RB_CPU_CTRL_REG can be set to 1 to disable the insertion of the CPU tag which is what the code currently does. The bit 15 define calls this setting RTL8368RB_CPU_INSTAG which is confusing since the inverse meaning is implied: programmers may think that setting this bit to 1 will *enable* inserting the tag rather than disabling it, so rename this setting in bit 15 to RTL8368RB_CPU_NO_TAG which is more to the point. After this e.g. ping works out-of-the-box with the RTL8366RB. Cc: DENG Qingfang Cc: Mauri Sandberg Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit efd7fe68f0c6c9649757bf80cbc382fd21e764c9 Author: Linus Walleij Date: Wed Jul 8 14:25:36 2020 +0200 net: dsa: tag_rtl4_a: Implement Realtek 4 byte A tag This implements the known parts of the Realtek 4 byte tag protocol version 0xA, as found in the RTL8366RB DSA switch. It is designated as protocol version 0xA as a different Realtek 4 byte tag format with protocol version 0x9 is known to exist in the Realtek RTL8306 chips. The tag and switch chip lacks public documentation, so the tag format has been reverse-engineered from packet dumps. As only ingress traffic has been available for analysis an egress tag has not been possible to develop (even using educated guesses about bit fields) so this is as far as it gets. It is not known if the switch even supports egress tagging. Excessive attempts to figure out the egress tag format was made. When nothing else worked, I just tried all bit combinations with 0xannp where a is protocol and p is port. I looped through all values several times trying to get a response from ping, without any positive result. Using just these ingress tags however, the switch functionality is vastly improved and the packets find their way into the destination port without any tricky VLAN configuration. On the D-Link DIR-685 the LAN ports now come up and respond to ping without any command line configuration so this is a real improvement for users. Egress packets need to be restricted to the proper target ports using VLAN, which the RTL8366RB DSA switch driver already sets up. Cc: DENG Qingfang Cc: Mauri Sandberg Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit b8c50df0cb3eb9008f8372e4ff0317eee993b8d1 Author: Jesper Dangaard Brouer Date: Tue Jul 7 09:12:25 2020 +0200 selftests/bpf: test_progs avoid minus shell exit codes There are a number of places in test_progs that use minus-1 as the argument to exit(). This is confusing as a process exit status is masked to be a number between 0 and 255 as defined in man exit(3). Thus, users will see status 255 instead of minus-1. This patch use positive exit code 3 instead of minus-1. These cases are put in the same group of infrastructure setup errors. Fixes: fd27b1835e70 ("selftests/bpf: Reset process and thread affinity after each test/sub-test") Fixes: 811d7e375d08 ("bpf: selftests: Restore netns after each test") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/159410594499.1093222.11080787853132708654.stgit@firesoul commit 3220fb667842a9725cbb71656f406eadb03c094b Author: Jesper Dangaard Brouer Date: Tue Jul 7 09:12:19 2020 +0200 selftests/bpf: test_progs use another shell exit on non-actions This is a follow up adjustment to commit 6c92bd5cd465 ("selftests/bpf: Test_progs indicate to shell on non-actions"), that returns shell exit indication EXIT_FAILURE (value 1) when user selects a non-existing test. The problem with using EXIT_FAILURE is that a shell script cannot tell the difference between a non-existing test and the test failing. This patch uses value 2 as shell exit indication. (Aside note unrecognized option parameters use value 64). Fixes: 6c92bd5cd465 ("selftests/bpf: Test_progs indicate to shell on non-actions") Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/159410593992.1093222.90072558386094370.stgit@firesoul commit 625eb8e85e913273cd9441329a82b4e3496b30cd Author: Louis Peens Date: Wed Jul 8 13:08:27 2020 +0200 bpf: Fix another bpftool segfault without skeleton code enabled emit_obj_refs_json needs to added the same as with emit_obj_refs_plain to prevent segfaults, similar to Commit "8ae4121bd89e bpf: Fix bpftool without skeleton code enabled"). See the error below: # ./bpftool -p prog { "error": "bpftool built without PID iterator support" },[{ "id": 2, "type": "cgroup_skb", "tag": "7be49e3934a125ba", "gpl_compatible": true, "loaded_at": 1594052789, "uid": 0, "bytes_xlated": 296, "jited": true, "bytes_jited": 203, "bytes_memlock": 4096, "map_ids": [2,3 Segmentation fault (core dumped) The same happens for ./bpftool -p map, as well as ./bpftool -j prog/map. Fixes: d53dee3fe013 ("tools/bpftool: Show info for processes holding BPF map/prog/link/btf FDs") Signed-off-by: Louis Peens Signed-off-by: Daniel Borkmann Reviewed-by: Simon Horman Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200708110827.7673-1-louis.peens@netronome.com commit 12fdafb817c6cde87a4fa0e674e66b0226a0889d Author: Meir Lichtinger Date: Mon Jul 6 20:42:33 2020 -0700 net/mlx5: Added support for 100Gbps per lane link modes This patch exposes new link modes using 100Gbps per lane, including 100G, 200G and 400G modes. Signed-off-by: Meir Lichtinger Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller commit 065e0d42a0a728d7f6c2aec7c9f3e5dc7b715394 Author: Meir Lichtinger Date: Mon Jul 6 20:42:32 2020 -0700 ethtool: Add support for 100Gbps per lane link modes Define 100G, 200G and 400G link modes using 100Gbps per lane LR, ER and FR are defined as a single link mode because they are using same technology and by design are fully interoperable. EEPROM content indicates if the module is LR, ER, or FR, and the user space ethtool decoder is planned to support decoding these modes in the EEPROM. Signed-off-by: Meir Lichtinger CC: Andrew Lunn Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller commit 68df2ed54487679f815d61b750d3bcf733ffd79e Author: Paul Moore Date: Fri Jul 3 09:17:17 2020 -0400 audit: use the proper gfp flags in the audit_log_nfcfg() calls Commit 142240398e50 ("audit: add gfp parameter to audit_log_nfcfg") incorrectly passed gfp flags to audit_log_nfcfg() which were not consistent with the calling function, this commit fixes that. Fixes: 142240398e50 ("audit: add gfp parameter to audit_log_nfcfg") Reported-by: Jones Desougi Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 66846b7d058bbb6e2954b8b84d6480024e72a777 Merge: e80a07b244dd6 1da63ddd0e155 Author: David S. Miller Date: Wed Jul 8 15:21:14 2020 -0700 Merge branch 'bnxt_en-Driver-update-for-net-next' Michael Chan says: ==================== bnxt_en: Driver update for net-next. This patchset implements ethtool -X to setup user-defined RSS indirection table. The new infrastructure also allows the proper logical ring index to be used to populate the RSS indirection when queried by ethtool -x. Prior to these patches, we were incorrectly populating the output of ethtool -x with internal ring IDs which would make no sense to the user. The last 2 patches add some cleanups to the VLAN acceleration logic and check the firmware capabilities before allowing VLAN acceleration offloads. v4: Move bnxt_get_rxfh_indir_size() fix to a new patch #2. Modify patch #7 to revert RSS map to default only when necessary. v3: Use ALIGN() in patch 5. Add warning messages in patch 6. v2: Some RSS indirection table changes requested by Jakub Kicinski. ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 1da63ddd0e155277bf613dfc7062af95d90452f2 Author: Edwin Peer Date: Wed Jul 8 07:54:01 2020 -0400 bnxt_en: allow firmware to disable VLAN offloads Bare-metal use cases require giving firmware and the embedded application processor control over VLAN offloads. The driver should not attempt to override or utilize this feature in such scenarios since it will not work as expected. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit a196e96bb68fbc7a319f45df1d529b807216a03a Author: Edwin Peer Date: Wed Jul 8 07:54:00 2020 -0400 bnxt_en: clean up VLAN feature bit handling The hardware VLAN offload feature on our NIC does not have separate knobs for handling customer and service tags on RX. Either offloading of both must be enabled or both must be disabled. Introduce definitions for the combined feature set in order to clean up the code and make this constraint more clear. Technically these features can be separately enabled on TX, however, since the default is to turn both on, the combined TX feature set is also introduced for code consistency. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit bd3191b5d87d5ebc1d4149bbbb42a64ec3d469bf Author: Michael Chan Date: Wed Jul 8 07:53:59 2020 -0400 bnxt_en: Implement ethtool -X to set indirection table. With the new infrastructure in place, we can now support the setting of the indirection table from ethtool. When changing channels, in a rare case that firmware cannot reserve the rings that were promised, we will still try to keep the RSS map and only revert to default when absolutely necessary. v4: Revert RSS map to default during ring change only when absolutely necessary. v3: Add warning messages when firmware cannot reserve the requested RX rings, and when the RSS table entries have to change to default. v2: When changing channels, if the RSS table size changes and RSS map is non-default, return error. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit adc38ac66745949ce12c1861c1a25f3ef93df1f8 Author: Michael Chan Date: Wed Jul 8 07:53:58 2020 -0400 bnxt_en: Return correct RSS indirection table entries to ethtool -x. Now that we have the logical indirection table, we can return these proper logical indices directly to ethtool -x instead of the physical IDs. Reported-by: Jakub Kicinski Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f33a305d09388880ec92db8de3c38448db36b629 Author: Michael Chan Date: Wed Jul 8 07:53:57 2020 -0400 bnxt_en: Fill HW RSS table from the RSS logical indirection table. Now that we have the logical table, we can fill the HW RSS table using the logical table's entries and converting them to the HW specific format. Re-initialize the logical table to standard distribution if the number of RX rings changes during ring reservation. v4: Use bnxt_get_rxfh_indir_size() to get the RSS table size. v2: Use ALIGN() to roundup the RSS table size. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit f9f6a3fbb5eb89e738ebdf16ac56437177537b28 Author: Michael Chan Date: Wed Jul 8 07:53:56 2020 -0400 bnxt_en: Add helper function to return the number of RSS contexts. On some chips, this varies based on the number of RX rings. Add this helper function and refactor the existing code to use it. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 1667cbf6a4ebe0901bd93ef0d6defd35006fd2be Author: Michael Chan Date: Wed Jul 8 07:53:55 2020 -0400 bnxt_en: Add logical RSS indirection table structure. The driver currently does not keep track of the logical RSS indirection table. The hardware RSS table is set up with standard default ring distribution when initializing the chip. This makes it difficult to support user sepcified indirection table entries. As a first step, add the logical table in the main bnxt structure and allocate it according to chip specific table size. Add a function that sets up default RSS distribution based on the number of RX rings. v4: Use bnxt_get_rxfh_indir_size() for the current RSS table size. v2: Use kmalloc_array() since we init. all entries afterwards. Use ALIGN() to roundup the RSS table size. Use ethtool_rxfh_indir_default() to init. the default entries. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit b73c1d08a0ec33f2ddafdd21d3a48614da4e6853 Author: Michael Chan Date: Wed Jul 8 07:53:54 2020 -0400 bnxt_en: Fix up bnxt_get_rxfh_indir_size(). Fix up bnxt_get_rxfh_indir_size() to return the proper current RSS table size for P5 chips. Change it to non-static so that bnxt.c can use it to get the table size. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 34370d2435f9853ac882056faa98f3263c537c36 Author: Michael Chan Date: Wed Jul 8 07:53:53 2020 -0400 bnxt_en: Set up the chip specific RSS table size. Currently, we allocate one page for the hardware DMA RSS indirection table. While the size is currently big enough for all chips, future chip variations may support bigger sizes, so it is better to calculate and store the chip specific size and allocate accordingly. Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 9eb994ec54be320b51fba48d1e52a046cbb742a5 Author: Christoph Hellwig Date: Wed Jul 8 14:25:46 2020 +0200 mmc: remove the call to check_disk_change The mmc driver doesn't support event notifications, which means that check_disk_change is a no-op. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 3d3a6a2088bc7ec9dcaa7bfa8db5fa83d98e6641 Author: Christoph Hellwig Date: Wed Jul 8 14:25:45 2020 +0200 xtensa/simdisk: remove the call to check_disk_change The simdisk driver doesn't support event notifications, which means that check_disk_change is a no-op. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 13ab64880e80f8bcf541dcd95ddb3fd0dd861fb7 Author: Christoph Hellwig Date: Wed Jul 8 14:25:44 2020 +0200 isofs: remove a stale comment check_disk_change isn't for consumers of the block layer, so remove the comment mentioning it. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9a3ffbbc6561ff878261727585ef8ee89bb36424 Author: Christoph Hellwig Date: Wed Jul 8 14:25:43 2020 +0200 block: remove flush_disk flush_disk has only two callers, so open code it there. That also helps clarifying the error message for the particular case, and allows to remove setting bd_invalidated in check_disk_size_change, which will be cleared again instantly. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8c22eb3a77373c616f141b56f44ef225ee15c96b Author: Christoph Hellwig Date: Wed Jul 8 14:25:42 2020 +0200 cdrom: remove the unused cdrom_media_changed function As well as the ->media_changed method. All these are left over from before the drivers were switched over to the check_events scheme. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit a564e23f0f99759f453dbefcb9160dec6d99df96 Author: Christoph Hellwig Date: Wed Jul 8 14:25:41 2020 +0200 md: switch to ->check_events for media change notifications md is the last driver using the legacy media_changed method. Switch it over to (not so) new ->clear_events approach, which also removes the need for the ->revalidate_disk method. Signed-off-by: Christoph Hellwig [axboe: remove unused 'bdops' variable in disk_clear_events()] Signed-off-by: Jens Axboe commit 568f2700657794b8258e72983ba508793a658942 Author: Ming Lei Date: Mon Jul 6 22:41:11 2020 +0800 blk-mq: centralise related handling into blk_mq_get_driver_tag Move .nr_active update and request assignment into blk_mq_get_driver_tag(), all are good to do during getting driver tag. Meantime blk-flush related code is simplified and flush request needn't to update the request table manually any more. Signed-off-by: Ming Lei Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 7bf137298cb73afdb8c5536e474f7ba71ab1c235 Author: Ming Lei Date: Wed Jul 1 21:58:57 2020 +0800 blk-mq: streamline handling of q->mq_ops->queue_rq result Current handling of q->mq_ops->queue_rq result is a bit ugly: - two branches which needs to 'continue' have to check if the dispatch local list is empty, otherwise one bad request may be retrieved via 'rq = list_first_entry(list, struct request, queuelist);' - the branch of 'if (unlikely(ret != BLK_STS_OK))' isn't easy to follow, since it is actually one error branch. Streamline this handling, so the code becomes more readable, meantime potential kernel oops can be avoided in case that the last request in local dispatch list is failed. Fixes: fc17b6534eb8 ("blk-mq: switch ->queue_rq return value to blk_status_t") Signed-off-by: Ming Lei Reviewed-by: Johannes Thumshirn Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 5acbbc8ed3a9aef71c6eb5f19ba24f7321200220 Author: Jens Axboe Date: Wed Jul 8 15:15:26 2020 -0600 io_uring: only call kfree() for a non-zero pointer It's safe to call kfree() with a NULL pointer, but it's also pointless. Most of the time we don't have any data to free, and at millions of requests per second, the redundant function call adds noticeable overhead (about 1.3% of the runtime). Signed-off-by: Jens Axboe commit 763fedd6a216f94c2eb98d2f7ca21be3d3806e69 Author: Chris Wilson Date: Wed Jul 8 18:37:48 2020 +0100 drm/i915: Remove i915_gem_object_get_dirty_page() Last user removed, remove the get_dirty_page convenience function. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200708173748.32734-4-chris@chris-wilson.co.uk commit 89d19b2b456af1b8e009eee5966bf29c850b200a Author: Chris Wilson Date: Wed Jul 8 18:37:47 2020 +0100 drm/i915: Release shortlived maps of longlived objects Some objects we map once during their construction, and then never access their mappings again, even if they are kept around for the duration of the driver. Keeping those pages mapped, often vmapped, is therefore wasteful and we should release the maps as soon as we no longer need them. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200708173748.32734-3-chris@chris-wilson.co.uk commit 59c94b9d26dfee413238b012238837e7028e40cc Author: Chris Wilson Date: Wed Jul 8 18:37:46 2020 +0100 drm/i915/gt: Replace opencoded i915_gem_object_pin_map() As we have a pin_map interface, that knows how to flush the data to the device, use it. The only downside is that we keep the kmap around, as once acquired we keep the mapping cached until the object's backing store is released. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200708173748.32734-2-chris@chris-wilson.co.uk commit 09137e94543761154f464433c019d51d6ac32fcf Author: Chris Wilson Date: Wed Jul 8 18:37:45 2020 +0100 drm/i915/gem: Unpin idle contexts from kswapd reclaim We removed retiring requests from the shrinker in order to decouple the mutexes from reclaim in preparation for unravelling the struct_mutex. The impact of not retiring is that we are much less agressive in making global objects available for shrinking, as such objects remain pinned until they are flushed by a heartbeat pulse following the last retired request along their timeline. In order to ensure that pulse occurs in time for memory reclamation, we should kick it from kswapd. The catch is that we have added some flush_work() into the retirement phase (to ensure that we reach a global idle in a timely manner), but these flush_work() are not eligible (i.e do not belong to WQ_MEM_RELCAIM) for use from inside kswapd. To avoid flushing those workqueues, we teach the retirer not to do so unless we are actually waiting, and only do the plain retire from inside the shrinker. Note that for execlists, we already retire completed contexts as they are scheduled out, so it should not be keeping global state unnecessarily pinned. The legacy ringbuffer however... References: 9e9539800dd4 ("drm/i915: Remove waiting & retiring from shrinker paths") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200708173748.32734-1-chris@chris-wilson.co.uk commit 119c53d2d4044c59c450c4f5a568d80b9d861856 Author: Chris Wilson Date: Wed Jul 8 16:49:11 2020 +0100 drm/vgem: Replace opencoded version of drm_gem_dumb_map_offset() drm_gem_dumb_map_offset() now exists and does everything vgem_gem_dump_map does and *ought* to do. In particular, vgem_gem_dumb_map() was trying to reject mmapping an imported dmabuf by checking the existence of obj->filp. Unfortunately, we always allocated an obj->filp, even if unused for an imported dmabuf. Instead, the drm_gem_dumb_map_offset(), since commit 90378e589192 ("drm/gem: drm_gem_dumb_map_offset(): reject dma-buf"), uses the obj->import_attach to reject such invalid mmaps. This prevents vgem from allowing userspace mmapping the dumb handle and attempting to incorrectly fault in remote pages belonging to another device, where there may not even be a struct page. v2: Use the default drm_gem_dumb_map_offset() callback Fixes: af33a9190d02 ("drm/vgem: Enable dmabuf import interfaces") Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Cc: # v4.13+ Link: https://patchwork.freedesktop.org/patch/msgid/20200708154911.21236-1-chris@chris-wilson.co.uk commit a00eda7d8996803320bc63c574ee78f8a2fb72ee Author: Daniele Ceraolo Spurio Date: Tue Jul 7 17:39:52 2020 -0700 drm/i915: Move sseu debugfs under gt/ In line with what happened for other gt-related features, move the sseu debugfs files under gt/. The sseu_status debugfs has also been kept at the top level as we do have tests that use it; it will be removed once we teach the tests to look into the new path. Suggested-by: Tvrtko Ursulin Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Andi Shyti Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708003952.21831-10-daniele.ceraolospurio@intel.com commit 976492922a6a9c06f6f61436848adf2f03702e5c Author: Robin Murphy Date: Wed Jun 24 11:24:51 2020 +0100 iommu/arm-smmu: Update impl quirks comment The comment about implementation and integration quirks being mutually-exclusive is out of date, and in fact the code is already structured for the case it anticipates, so document that properly. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/1e742177e084621f3454fbaf768325a6c215656a.1592994291.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit ecd7274fb4cd2d6c035a52d59ca3d6ec936a07be Author: Will Deacon Date: Thu Jun 4 18:11:15 2020 +0100 iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag The IOMMU_SYS_CACHE_ONLY flag was never exposed via the DMA API and has no in-tree users. Remove it. Cc: Robin Murphy Cc: "Isaac J. Manjarres" Cc: Joerg Roedel Cc: Rob Clark Reviewed-by: Christoph Hellwig Reviewed-by: Sai Prakash Ranjan Signed-off-by: Will Deacon commit 565b7820738a1d764879e1b1b85f485aa028287a Author: Xiaoyao Li Date: Wed Jul 8 14:50:53 2020 +0800 KVM: lapic: Use guest_cpuid_has() in kvm_apic_set_version() Only code cleanup and no functional change. Signed-off-by: Xiaoyao Li Message-Id: <20200708065054.19713-8-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit 0d3b2ba16ba68612142399e1801e6aff3f184d3e Author: Xiaoyao Li Date: Wed Jul 8 14:50:48 2020 +0800 KVM: X86: Go on updating other CPUID leaves when leaf 1 is absent As handling of bits out of leaf 1 added over time, kvm_update_cpuid() should not return directly if leaf 1 is absent, but should go on updateing other CPUID leaves. Keep the update of apic->lapic_timer.timer_mode_mask in a separate wrapper, to minimize churn for code since it will be moved out of this function in a future patch. Signed-off-by: Xiaoyao Li Message-Id: <20200708065054.19713-3-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit 18964092825aef6faaadf51fbc5fd166168ddf61 Author: Xiaoyao Li Date: Wed Jul 8 14:50:47 2020 +0800 KVM: X86: Reset vcpu->arch.cpuid_nent to 0 if SET_CPUID* fails Current implementation keeps userspace input of CPUID configuration and cpuid->nent even if kvm_update_cpuid() fails. Reset vcpu->arch.cpuid_nent to 0 for the case of failure as a simple fix. Besides, update the doc to explicitly state that if IOCTL SET_CPUID* fail KVM gives no gurantee that previous valid CPUID configuration is kept. Signed-off-by: Xiaoyao Li Message-Id: <20200708065054.19713-2-xiaoyao.li@intel.com> Signed-off-by: Paolo Bonzini commit 2e8cd7a3b82874e9cb3e42d916dda05cd790cc1a Author: Like Xu Date: Wed Jun 24 09:59:28 2020 +0800 kvm: x86: limit the maximum number of vPMU fixed counters to 3 Some new Intel platforms (such as TGL) already have the fourth fixed counter TOPDOWN.SLOTS, but it has not been fully enabled on KVM and the host. Therefore, we limit edx.split.num_counters_fixed to 3, so that it does not break the kvm-unit-tests PMU test case and bad-handled userspace. Signed-off-by: Like Xu Message-Id: <20200624015928.118614-1-like.xu@linux.intel.com> Signed-off-by: Paolo Bonzini commit 761e4169346553c180bbd4a383aedd72f905bc9a Author: Krish Sadhukhan Date: Wed Jul 8 00:39:56 2020 +0000 KVM: nSVM: Check that MBZ bits in CR3 and CR4 are not set on vmrun of nested guests According to section "Canonicalization and Consistency Checks" in APM vol. 2 the following guest state is illegal: "Any MBZ bit of CR3 is set." "Any MBZ bit of CR4 is set." Suggeted-by: Paolo Bonzini Signed-off-by: Krish Sadhukhan Message-Id: <1594168797-29444-3-git-send-email-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit 53efe527ca4a4432d17c693efde6eec56fb43ebb Author: Paolo Bonzini Date: Wed Jul 8 07:02:50 2020 -0400 KVM: x86: Make CR4.VMXE reserved for the guest CR4.VMXE is reserved unless the VMX CPUID bit is set. On Intel, it is also tested by vmx_set_cr4, but AMD relies on kvm_valid_cr4, so fix it. Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit b899c13277a918d268055ade3e4fd8289314ee84 Author: Krish Sadhukhan Date: Wed Jul 8 00:39:55 2020 +0000 KVM: x86: Create mask for guest CR4 reserved bits in kvm_update_cpuid() Instead of creating the mask for guest CR4 reserved bits in kvm_valid_cr4(), do it in kvm_update_cpuid() so that it can be reused instead of creating it each time kvm_valid_cr4() is called. Suggested-by: Paolo Bonzini Signed-off-by: Krish Sadhukhan Message-Id: <1594168797-29444-2-git-send-email-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit d42e3fae6faedacb2a7b4c984417ed0d9f540401 Author: Jim Mattson Date: Tue Jul 7 15:36:30 2020 -0700 kvm: x86: Read PDPTEs on CR0.CD and CR0.NW changes According to the SDM, when PAE paging would be in use following a MOV-to-CR0 that modifies any of CR0.CD, CR0.NW, or CR0.PG, then the PDPTEs are loaded from the address in CR3. Previously, kvm only loaded the PDPTEs when PAE paging would be in use following a MOV-to-CR0 that modified CR0.PG. Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Reviewed-by: Peter Shier Message-Id: <20200707223630.336700-1-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 9a3c05e658d4d31b38ef03fe5c17bc2039402ff7 Author: Zhenzhong Duan Date: Wed Oct 23 19:16:23 2019 +0800 xen: Mark "xen_nopvspin" parameter obsolete Map "xen_nopvspin" to "nopvspin", fix stale description of "xen_nopvspin" as we use qspinlock now. Signed-off-by: Zhenzhong Duan Reviewed-by: Boris Ostrovsky Cc: Jonathan Corbet Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Signed-off-by: Paolo Bonzini commit 05eee619ed61c8cd89633954d38c4e5653086845 Author: Zhenzhong Duan Date: Wed Oct 23 19:16:22 2019 +0800 x86/kvm: Add "nopvspin" parameter to disable PV spinlocks There are cases where a guest tries to switch spinlocks to bare metal behavior (e.g. by setting "xen_nopvspin" on XEN platform and "hv_nopvspin" on HYPER_V). That feature is missed on KVM, add a new parameter "nopvspin" to disable PV spinlocks for KVM guest. The new 'nopvspin' parameter will also replace Xen and Hyper-V specific parameters in future patches. Define variable nopvsin as global because it will be used in future patches as above. Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Jim Mattson Cc: Joerg Roedel Cc: Peter Zijlstra Cc: Will Deacon Signed-off-by: Paolo Bonzini commit 5aefd786fba7336c1ecc608e2a126e4f45b180d7 Author: Zhenzhong Duan Date: Wed Oct 23 19:16:21 2019 +0800 x86/kvm: Change print code to use pr_*() format pr_*() is preferred than printk(KERN_* ...), after change all the print in arch/x86/kernel/kvm.c will have "kvm-guest: xxx" style. No functional change. Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Jim Mattson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Signed-off-by: Paolo Bonzini commit de585020daf4e28a308549ed1457a51b3cc5ac92 Author: Zhenzhong Duan Date: Wed Oct 23 19:16:20 2019 +0800 Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized" This reverts commit 34226b6b70980a8f81fff3c09a2c889f77edeeff. Commit 8990cac6e5ea ("x86/jump_label: Initialize static branching early") adds jump_label_init() call in setup_arch() to make static keys initialized early, so we could use the original simpler code again. The similar change for XEN is in commit 090d54bcbc54 ("Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized"") Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Jim Mattson Cc: Joerg Roedel Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Signed-off-by: Paolo Bonzini commit e47c4aee5bde03e7018f4fde45ba21028a8f8438 Author: Sean Christopherson Date: Mon Jun 22 13:20:34 2020 -0700 KVM: x86/mmu: Rename page_header() to to_shadow_page() Rename KVM's accessor for retrieving a 'struct kvm_mmu_page' from the associated host physical address to better convey what the function is doing. Signed-off-by: Sean Christopherson Message-Id: <20200622202034.15093-7-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 573546820b792ef620acbfaa16bdf24ffbb1007b Author: Sean Christopherson Date: Mon Jun 22 13:20:33 2020 -0700 KVM: x86/mmu: Add sptep_to_sp() helper to wrap shadow page lookup Introduce sptep_to_sp() to reduce the boilerplate code needed to get the shadow page associated with a spte pointer, and to improve readability as it's not immediately obvious that "page_header" is a KVM-specific accessor for retrieving a shadow page. Signed-off-by: Sean Christopherson Message-Id: <20200622202034.15093-6-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 985ab2780164698ec6e7d73fad523d50449261dd Author: Sean Christopherson Date: Mon Jun 22 13:20:32 2020 -0700 KVM: x86/mmu: Make kvm_mmu_page definition and accessor internal-only Make 'struct kvm_mmu_page' MMU-only, nothing outside of the MMU should be poking into the gory details of shadow pages. Signed-off-by: Sean Christopherson Message-Id: <20200622202034.15093-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 6ca9a6f3adef955e004123069e15ecffa462e823 Author: Sean Christopherson Date: Mon Jun 22 13:20:31 2020 -0700 KVM: x86/mmu: Add MMU-internal header Add mmu/mmu_internal.h to hold declarations and definitions that need to be shared between various mmu/ files, but should not be used by anything outside of the MMU. Begin populating mmu_internal.h with declarations of the helpers used by page_track.c. Signed-off-by: Sean Christopherson Message-Id: <20200622202034.15093-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit afe8d7e611c4d59c0be8d67883a1a0e68df23425 Author: Sean Christopherson Date: Mon Jun 22 13:20:30 2020 -0700 KVM: x86/mmu: Move kvm_mmu_available_pages() into mmu.c Move kvm_mmu_available_pages() from mmu.h to mmu.c, it has a single caller and has no business being exposed via mmu.h. Signed-off-by: Sean Christopherson Message-Id: <20200622202034.15093-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 33e3042dac6bcc33b80835f7d7b502b1d74c457c Author: Sean Christopherson Date: Mon Jun 22 13:20:29 2020 -0700 KVM: x86/mmu: Move mmu_audit.c and mmutrace.h into the mmu/ sub-directory Move mmu_audit.c and mmutrace.h under mmu/ where they belong. Signed-off-by: Sean Christopherson Message-Id: <20200622202034.15093-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 7bd7ded642978feeec8f2b9a2b05d8e1daeff758 Author: Sean Christopherson Date: Tue Jun 23 12:35:42 2020 -0700 KVM: x86/mmu: Exit to userspace on make_mmu_pages_available() error Propagate any error returned by make_mmu_pages_available() out to userspace instead of resuming the guest if the error occurs while handling a page fault. Now that zapping the oldest MMU pages skips active roots, i.e. fails if and only if there are no zappable pages, there is no chance for a false positive, i.e. no chance of returning a spurious error to userspace. Signed-off-by: Sean Christopherson Message-Id: <20200623193542.7554-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit ebdb292dac7993425c8e31e2c21c9978e914a676 Author: Sean Christopherson Date: Tue Jun 23 12:35:41 2020 -0700 KVM: x86/mmu: Batch zap MMU pages when shrinking the slab Use the recently introduced kvm_mmu_zap_oldest_mmu_pages() to batch zap MMU pages when shrinking a slab. This fixes a long standing issue where KVM's shrinker implementation is completely ineffective due to zapping only a single page. E.g. without batch zapping, forcing a scan via drop_caches basically has no impact on a VM with ~2k shadow pages. With batch zapping, the number of shadow pages can be reduced to a few hundred pages in one or two runs of drop_caches. Note, if the default batch size (currently 128) is problematic, e.g. zapping 128 pages holds mmu_lock for too long, KVM can bound the batch size by setting @batch in mmu_shrinker. Signed-off-by: Sean Christopherson Message-Id: <20200623193542.7554-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 6b82ef2c9cf18a48726e4bb359aa9014632f6466 Author: Sean Christopherson Date: Tue Jun 23 12:35:40 2020 -0700 KVM: x86/mmu: Batch zap MMU pages when recycling oldest pages Collect MMU pages for zapping in a loop when making MMU pages available, and skip over active roots when doing so as zapping an active root can never immediately free up a page. Batching the zapping avoids multiple remote TLB flushes and remedies the issue where the loop would bail early if an active root was encountered. Signed-off-by: Sean Christopherson Message-Id: <20200623193542.7554-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit f95eec9bed76d42194c23153cb1cc8f186bf91cb Author: Sean Christopherson Date: Tue Jun 23 12:35:39 2020 -0700 KVM: x86/mmu: Don't put invalid SPs back on the list of active pages Delete a shadow page from the invalidation list instead of throwing it back on the list of active pages when it's a root shadow page with active users. Invalid active root pages will be explicitly freed by mmu_free_root_page() when the root_count hits zero, i.e. they don't need to be put on the active list to avoid leakage. Use sp->role.invalid to detect that a shadow page has already been zapped, i.e. is not on a list. WARN if an invalid page is encountered when zapping pages, as it should now be impossible. Signed-off-by: Sean Christopherson Message-Id: <20200623193542.7554-2-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit fb58a9c345f645f1774dcf6a36fda169253008ae Author: Sean Christopherson Date: Tue Jun 23 12:40:27 2020 -0700 KVM: x86/mmu: Optimize MMU page cache lookup for fully direct MMUs Skip the unsync checks and the write flooding clearing for fully direct MMUs, which are guaranteed to not have unsync'd or indirect pages (write flooding detection only applies to indirect pages). For TDP, this avoids unnecessary memory reads and writes, and for the write flooding count will also avoid dirtying a cache line (unsync_child_bitmap itself consumes a cache line, i.e. write_flooding_count is guaranteed to be in a different cache line than parent_ptes). Signed-off-by: Sean Christopherson Message-Id: <20200623194027.23135-3-sean.j.christopherson@intel.com> Reviewed-By: Jon Cargille Signed-off-by: Paolo Bonzini commit ac101b7cb17d4a5df1ab735420d0ee3593465dcf Author: Sean Christopherson Date: Tue Jun 23 12:40:26 2020 -0700 KVM: x86/mmu: Avoid multiple hash lookups in kvm_get_mmu_page() Refactor for_each_valid_sp() to take the list of shadow pages instead of retrieving it from a gfn to avoid doing the gfn->list hash and lookup multiple times during kvm_get_mmu_page(). Cc: Peter Feiner Cc: Jon Cargille Cc: Jim Mattson Signed-off-by: Sean Christopherson Message-Id: <20200623194027.23135-2-sean.j.christopherson@intel.com> Reviewed-By: Jon Cargille Signed-off-by: Paolo Bonzini commit 4cb5b77eecb0ccb2fa66f33ac6936680bbc41552 Author: Uros Bizjak Date: Tue Jun 23 20:34:39 2020 +0200 KVM: x86: Use VMCALL and VMMCALL mnemonics in kvm_para.h Current minimum required version of binutils is 2.23, which supports VMCALL and VMMCALL instruction mnemonics. Replace the byte-wise specification of VMCALL and VMMCALL with these proper mnemonics. Signed-off-by: Uros Bizjak CC: Paolo Bonzini Message-Id: <20200623183439.5526-1-ubizjak@gmail.com> Signed-off-by: Paolo Bonzini commit 01c3b2b5cdae39af8dfcf6e40fdf484ae0e812c5 Author: Joerg Roedel Date: Thu Jun 25 10:03:25 2020 +0200 KVM: SVM: Rename svm_nested_virtualize_tpr() to nested_svm_virtualize_tpr() Match the naming with other nested svm functions. No functional changes. Signed-off-by: Joerg Roedel Message-Id: <20200625080325.28439-5-joro@8bytes.org> Signed-off-by: Paolo Bonzini commit a284ba56a0a4b5a84733a19934196c19277b1b07 Author: Joerg Roedel Date: Thu Jun 25 10:03:24 2020 +0200 KVM: SVM: Add svm_ prefix to set/clr/is_intercept() Make clear the symbols belong to the SVM code when they are built-in. No functional changes. Signed-off-by: Joerg Roedel Message-Id: <20200625080325.28439-4-joro@8bytes.org> Signed-off-by: Paolo Bonzini commit 06e7852c0ffb30bb7cac1686db2f5d6458039b44 Author: Joerg Roedel Date: Thu Jun 25 10:03:23 2020 +0200 KVM: SVM: Add vmcb_ prefix to mark_*() functions Make it more clear what data structure these functions operate on. No functional changes. Signed-off-by: Joerg Roedel Message-Id: <20200625080325.28439-3-joro@8bytes.org> Signed-off-by: Paolo Bonzini commit 7693b3eb537947ecffe302732f98e6f561befb70 Author: Joerg Roedel Date: Thu Jun 25 10:03:22 2020 +0200 KVM: SVM: Rename struct nested_state to svm_nested_state Renaming is only needed in the svm.h header file. No functional changes. Signed-off-by: Joerg Roedel Message-Id: <20200625080325.28439-2-joro@8bytes.org> Signed-off-by: Paolo Bonzini commit b2656e4d8b29a25ea26ae92d14694904274e63b0 Author: Sean Christopherson Date: Mon Jun 8 18:56:07 2020 -0700 KVM: nVMX: Wrap VM-Fail valid path in generic VM-Fail helper Add nested_vmx_fail() to wrap VM-Fail paths that _may_ result in VM-Fail Valid to make it clear at the call sites that the Valid flavor isn't guaranteed. Suggested-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Message-Id: <20200609015607.6994-1-sean.j.christopherson@intel.com> Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit c967118ddb21191178c0e0080fdc41f5d85ca1d1 Author: Jim Mattson Date: Wed Jun 3 16:56:23 2020 -0700 kvm: x86: Set last_vmentry_cpu in vcpu_enter_guest Since this field is now in kvm_vcpu_arch, clean things up a little by setting it in vendor-agnostic code: vcpu_enter_guest. Note that it must be set after the call to kvm_x86_ops.run(), since it can't be updated before pre_sev_run(). Suggested-by: Sean Christopherson Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Reviewed-by: Peter Shier Message-Id: <20200603235623.245638-7-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 8a14fe4f0c54f27c89389d13c4a1e467a88c35ea Author: Jim Mattson Date: Wed Jun 3 16:56:22 2020 -0700 kvm: x86: Move last_cpu into kvm_vcpu_arch as last_vmentry_cpu Both the vcpu_vmx structure and the vcpu_svm structure have a 'last_cpu' field. Move the common field into the kvm_vcpu_arch structure. For clarity, rename it to 'last_vmentry_cpu.' Suggested-by: Sean Christopherson Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Reviewed-by: Peter Shier Message-Id: <20200603235623.245638-6-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 1aa561b1a4c0ae2a9a9b9c21a84b5ca66b4775d8 Author: Jim Mattson Date: Wed Jun 3 16:56:21 2020 -0700 kvm: x86: Add "last CPU" to some KVM_EXIT information More often than not, a failed VM-entry in an x86 production environment is induced by a defective CPU. To help identify the bad hardware, include the id of the last logical CPU to run a vCPU in the information provided to userspace on a KVM exit for failed VM-entry or for KVM internal errors not associated with emulation. The presence of this additional information is indicated by a new capability, KVM_CAP_LAST_CPU. Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Reviewed-by: Peter Shier Message-Id: <20200603235623.245638-5-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 80a1684c0161088710398d84a7cdd683c5d88228 Author: Jim Mattson Date: Wed Jun 3 16:56:20 2020 -0700 kvm: vmx: Add last_cpu to struct vcpu_vmx As we already do in svm, record the last logical processor on which a vCPU has run, so that it can be communicated to userspace for potential hardware errors. Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Reviewed-by: Peter Shier Message-Id: <20200603235623.245638-4-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 242636343c246e338b8ea317e32dbf4ed47edc65 Author: Jim Mattson Date: Wed Jun 3 16:56:19 2020 -0700 kvm: svm: Always set svm->last_cpu on VMRUN Previously, this field was only set when using SEV. Set it for all vCPU configurations, so that it can be communicated to userspace for diagnosing potential hardware errors. Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Reviewed-by: Peter Shier Message-Id: <20200603235623.245638-3-jmattson@google.com> Signed-off-by: Paolo Bonzini commit 73cd6e5f7f0b8c07330c48bfec4aaa84a6921cf4 Author: Jim Mattson Date: Wed Jun 3 16:56:18 2020 -0700 kvm: svm: Prefer vcpu->cpu to raw_smp_processor_id() The current logical processor id is cached in vcpu->cpu. Use it instead of raw_smp_processor_id() when a kvm_vcpu struct is available. Signed-off-by: Jim Mattson Reviewed-by: Oliver Upton Message-Id: <20200603235623.245638-2-jmattson@google.com> Signed-off-by: Paolo Bonzini commit a8d908b5873cad212b0f74569f5a23b804e694ce Author: Paolo Bonzini Date: Tue Jun 23 05:12:24 2020 -0400 KVM: x86: report sev_pin_memory errors with PTR_ERR Callers of sev_pin_memory() treat NULL differently: sev_launch_secret()/svm_register_enc_region() return -ENOMEM sev_dbg_crypt() returns -EFAULT. Switching to ERR_PTR() preserves the error and enables cleaner reporting of different kinds of failures. Suggested-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit dc42c8ae0a7762378102dd043779d19331804cce Author: John Hubbard Date: Mon May 25 23:22:07 2020 -0700 KVM: SVM: convert get_user_pages() --> pin_user_pages() This code was using get_user_pages*(), in a "Case 2" scenario (DMA/RDMA), using the categorization from [1]. That means that it's time to convert the get_user_pages*() + put_page() calls to pin_user_pages*() + unpin_user_pages() calls. There is some helpful background in [2]: basically, this is a small part of fixing a long-standing disconnect between pinning pages, and file systems' use of those pages. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Cc: Ingo Molnar Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Jim Mattson Cc: Joerg Roedel Cc: H. Peter Anvin Cc: x86@kernel.org Cc: kvm@vger.kernel.org Signed-off-by: John Hubbard Message-Id: <20200526062207.1360225-3-jhubbard@nvidia.com> Signed-off-by: Paolo Bonzini commit 78824fabc72e5e37d51e6e567fde70a4fc41a6d7 Author: John Hubbard Date: Mon May 25 23:22:06 2020 -0700 KVM: SVM: fix svn_pin_memory()'s use of get_user_pages_fast() There are two problems in svn_pin_memory(): 1) The return value of get_user_pages_fast() is stored in an unsigned long, although the declared return value is of type int. This will not cause any symptoms, but it is misleading. Fix this by changing the type of npinned to "int". 2) The number of pages passed into get_user_pages_fast() is stored in an unsigned long, even though get_user_pages_fast() accepts an int. This means that it is possible to silently overflow the number of pages. Fix this by adding a WARN_ON_ONCE() and an early error return. The npages variable is left as an unsigned long for convenience in checking for overflow. Fixes: 89c505809052 ("KVM: SVM: Add support for KVM_SEV_LAUNCH_UPDATE_DATA command") Cc: Ingo Molnar Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Jim Mattson Cc: Joerg Roedel Cc: H. Peter Anvin Cc: x86@kernel.org Cc: kvm@vger.kernel.org Signed-off-by: John Hubbard Message-Id: <20200526062207.1360225-2-jhubbard@nvidia.com> Signed-off-by: Paolo Bonzini commit 1aef8161b38a531895a8bffad0e9fb1445ca91f7 Author: Krish Sadhukhan Date: Fri May 22 18:19:52 2020 -0400 KVM: nSVM: Check that DR6[63:32] and DR7[64:32] are not set on vmrun of nested guests According to section "Canonicalization and Consistency Checks" in APM vol. 2 the following guest state is illegal: "DR6[63:32] are not zero." "DR7[63:32] are not zero." "Any MBZ bit of EFER is set." Signed-off-by: Krish Sadhukhan Message-Id: <20200522221954.32131-3-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit f5f6145e41d39c7fd04a17c3b2596c7abe933f10 Author: Krish Sadhukhan Date: Fri May 22 18:19:51 2020 -0400 KVM: x86: Move the check for upper 32 reserved bits of DR6 to separate function Signed-off-by: Krish Sadhukhan Message-Id: <20200522221954.32131-2-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit 12bc2132b15e0a969b3f455d90a5f215ef239eff Author: Peter Xu Date: Mon Jun 22 18:04:42 2020 -0400 KVM: X86: Do the same ignore_msrs check for feature msrs Logically the ignore_msrs and report_ignored_msrs should also apply to feature MSRs. Add them in. Signed-off-by: Peter Xu Message-Id: <20200622220442.21998-3-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 6abe9c1386e5c86f360e4e8fde8eec95eee77aa3 Author: Peter Xu Date: Mon Jun 22 18:04:41 2020 -0400 KVM: X86: Move ignore_msrs handling upper the stack MSR accesses can be one of: (1) KVM internal access, (2) userspace access (e.g., via KVM_SET_MSRS ioctl), (3) guest access. The ignore_msrs was previously handled by kvm_get_msr_common() and kvm_set_msr_common(), which is the bottom of the msr access stack. It's working in most cases, however it could dump unwanted warning messages to dmesg even if kvm get/set the msrs internally when calling __kvm_set_msr() or __kvm_get_msr() (e.g. kvm_cpuid()). Ideally we only want to trap cases (2) or (3), but not (1) above. To achieve this, move the ignore_msrs handling upper until the callers of __kvm_get_msr() and __kvm_set_msr(). To identify the "msr missing" event, a new return value (KVM_MSR_RET_INVALID==2) is used for that. Signed-off-by: Peter Xu Message-Id: <20200622220442.21998-2-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 02f5fb2e69f653ef09490d081ef65296a0cbf114 Author: Sean Christopherson Date: Mon Jun 22 14:58:32 2020 -0700 KVM: x86/mmu: Make .write_log_dirty a nested operation Move .write_log_dirty() into kvm_x86_nested_ops to help differentiate it from the non-nested dirty log hooks. And because it's a nested-only operation. Signed-off-by: Sean Christopherson Message-Id: <20200622215832.22090-5-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit 2f1d48aae2961b68922a653587f359c245569ccb Author: Sean Christopherson Date: Mon Jun 22 14:58:31 2020 -0700 KVM: nVMX: WARN if PML emulation helper is invoked outside of nested guest WARN if vmx_write_pml_buffer() is called outside of guest mode instead of silently ignoring the condition. The only caller is nested EPT's ept_update_accessed_dirty_bits(), which should only be reachable when L2 is active. Signed-off-by: Sean Christopherson Message-Id: <20200622215832.22090-4-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit f25a9dec2da3b303e4c62cf9fa67e836866198b2 Author: Sean Christopherson Date: Mon Jun 22 14:58:30 2020 -0700 KVM: x86/mmu: Drop kvm_arch_write_log_dirty() wrapper Drop kvm_arch_write_log_dirty() in favor of invoking .write_log_dirty() directly from FNAME(update_accessed_dirty_bits). "kvm_arch" is usually used for x86 functions that are invoked from generic KVM, and implies that there are external callers, neither of which is true. Remove the check for a non-NULL kvm_x86_ops hook as the call is wrapped in PTTYPE_EPT and is unconditionally set by VMX. Signed-off-by: Sean Christopherson Message-Id: <20200622215832.22090-3-sean.j.christopherson@intel.com> Signed-off-by: Paolo Bonzini commit e8c22266e68f0db2a7e11b0a9f29fd88ec0cfd4a Author: Vitaly Kuznetsov Date: Mon Jun 15 14:13:34 2020 +0200 KVM: async_pf: change kvm_setup_async_pf()/kvm_arch_setup_async_pf() return type to bool Unlike normal 'int' functions returning '0' on success, kvm_setup_async_pf()/ kvm_arch_setup_async_pf() return '1' when a job to handle page fault asynchronously was scheduled and '0' otherwise. To avoid the confusion change return type to 'bool'. No functional change intended. Suggested-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Message-Id: <20200615121334.91300-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 9ce372b33a2ebbd0b965148879ae169a0015d3f3 Author: Vitaly Kuznetsov Date: Thu May 7 16:36:02 2020 +0200 KVM: x86: drop KVM_PV_REASON_PAGE_READY case from kvm_handle_page_fault() KVM guest code in Linux enables APF only when KVM_FEATURE_ASYNC_PF_INT is supported, this means we will never see KVM_PV_REASON_PAGE_READY when handling page fault vmexit in KVM. While on it, make sure we only follow genuine page fault path when APF reason is zero. If we happen to see something else this means that the underlying hypervisor is misbehaving. Leave WARN_ON_ONCE() to catch that. Signed-off-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 6c6165f83ba7cee1997303115ffea9d5aa646188 Merge: 26d05b368a5c0 8038a922cf9af Author: Paolo Bonzini Date: Wed Jul 8 16:20:38 2020 -0400 Merge branch 'kvm-master' into HEAD Merge 5.8-rc bugfixes. commit 26d05b368a5c0a4e12da527fab98903a204bdc88 Merge: 0ed076c7ba3d6 b1d405751cd57 Author: Paolo Bonzini Date: Mon Jun 15 07:53:05 2020 -0400 Merge branch 'kvm-async-pf-int' into HEAD commit 0ed076c7ba3d676535b01a5f848746674bdfa351 Author: Colin Ian King Date: Mon Jun 15 09:26:36 2020 +0100 KVM: MIPS: fix spelling mistake "Exteneded" -> "Extended" There is a spelling mistake in a couple of kvm_err messages. Fix them. Signed-off-by: Colin Ian King Message-Id: <20200615082636.7004-1-colin.king@canonical.com> Signed-off-by: Paolo Bonzini commit 5df79ff13554e82feb301da485077aa6680020ea Author: Daniele Ceraolo Spurio Date: Tue Jul 7 17:39:51 2020 -0700 drm/i915: gt-fy sseu debugfs Ahead of moving the sseu debugfs logic under gt/, update the functions to use intel_gt where possible to make the move cleaner. Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Andi Shyti Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708003952.21831-9-daniele.ceraolospurio@intel.com commit 0b6613c6b91ec5f437495c438ca047af4e47b423 Author: Venkata Sandeep Dhanalakota Date: Tue Jul 7 17:39:50 2020 -0700 drm/i915/sseu: Move sseu_info under gt_info SSEUs are a GT capability, so track them under gt_info. Signed-off-by: Venkata Sandeep Dhanalakota Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Andi Shyti Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708003952.21831-8-daniele.ceraolospurio@intel.com commit 9b413f011c2c62f4d7e1a02ac8add4899a4bc79b Author: Daniele Ceraolo Spurio Date: Tue Jul 7 17:39:49 2020 -0700 drm/i915/sseu: Move sseu detection and dump to intel_sseu Keep all the SSEU code in the relevant file. The code has also been updated to use intel_gt instead of dev_priv. Based on an original patch by Sandeep. Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Andi Shyti Cc: Venkata Sandeep Dhanalakota Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708003952.21831-7-daniele.ceraolospurio@intel.com commit d0eb6866879fbd14f798aacfa4379c206249c1a6 Author: Daniele Ceraolo Spurio Date: Tue Jul 7 17:39:48 2020 -0700 drm/i915: Introduce gt_init_mmio We already call 2 gt-related init_mmio functions in driver_mmio_probe and a 3rd one will be added by a follow-up patch, so pre-emptively introduce a gt_init_mmio function to group them. Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Andi Shyti Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708003952.21831-6-daniele.ceraolospurio@intel.com commit 792592e72aba4162c35cd3155d4d5b99d5fb5762 Author: Daniele Ceraolo Spurio Date: Tue Jul 7 17:39:47 2020 -0700 drm/i915: Move the engine mask to intel_gt_info Since the engines belong to the GT, move the runtime-updated list of available engines to the intel_gt struct. The original mask has been renamed to indicate it contains the maximum engine list that can be found on a matching device. In preparation for other info being moved to the gt in follow up patches (sseu), introduce an intel_gt_info structure to group all gt-related runtime info. v2: s/max_engine_mask/platform_engine_mask (tvrtko), fix selftest Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Andi Shyti Cc: Venkata Sandeep Dhanalakota Reviewed-by: Tvrtko Ursulin #v1 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708003952.21831-5-daniele.ceraolospurio@intel.com commit f6beb38100778b7b2b18900b039dcb5118714a0a Author: Daniele Ceraolo Spurio Date: Tue Jul 7 17:39:46 2020 -0700 drm/i915: Move engine-related mmio init to engines_init_mmio All the info we read in intel_device_info_init_mmio are engine-related and since we already have an engine_init_mmio function we can just perform the operations from there. v2: clarify comment about forcewake requirements and pruning (Chris) Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Andi Shyti Cc: Chris Wilson Reviewed-by: Tvrtko Ursulin #v1 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708003952.21831-4-daniele.ceraolospurio@intel.com commit 242613af557fbb3842c3e496ffca232103955bc2 Author: Daniele Ceraolo Spurio Date: Tue Jul 7 17:39:45 2020 -0700 drm/i915: Use the gt in HAS_ENGINE A follow up patch will move the engine mask under the gt structure, so get ready for that. v2: switch the remaining gvt case using dev_priv->gt to gvt->gt (Chris) Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Andi Shyti Cc: Chris Wilson Reviewed-by: Tvrtko Ursulin #v1 Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708003952.21831-3-daniele.ceraolospurio@intel.com commit fdeb6d02686f0ca88c12a4e73c926eab8f728f2a Author: Daniele Ceraolo Spurio Date: Tue Jul 7 17:39:44 2020 -0700 drm/i915: Convert device_info to uncore/de_read Use intel__read instead of I915_READ to read the informational registers. Extended from an original sseu-only patch by Sandeep. Signed-off-by: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Andi Shyti Cc: Venkata Sandeep Dhanalakota Reviewed-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708003952.21831-2-daniele.ceraolospurio@intel.com commit e828da3028b06cba43d4d91b94cb884d8927be09 Author: Manasi Navare Date: Wed Jul 1 15:10:52 2020 -0700 drm/i915/dp: Helper to check for DDI BUF status to get active Based on the platform, Bspec expects us to wait or poll with timeout for DDI BUF IDLE bit to be set to 0 (non idle) or get active after enabling DDI_BUF_CTL. v2: * Based on platform, fixed delay or poll (Ville) * Use a helper to do this (Imre, Ville) v3: * Add a new function _active for DDI BUF CTL to be non idle (Ville) v4: * Use the timeout for GLK (Ville) v5: * Add bspec quote, change timeout to 500us (Ville) Cc: Ville Syrjälä Cc: Imre Deak Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200701221052.8946-2-manasi.d.navare@intel.com commit 5a2ad99bcedf0ebbfb29e5d7a9764aae301ac64b Author: Manasi Navare Date: Wed Jul 1 15:10:51 2020 -0700 drm/i915/dp: Helper for checking DDI_BUF_CTL Idle status Modify the helper to add a fixed delay or poll with timeout based on platform specification to check for either Idle bit set (DDI_BUF_CTL is idle for disable case) v2: * Use 2 separate functions or idle and active (Ville) v3: * Change the timeout to 16usecs (Ville) v4: * Change the timeout 8, follow spec (Ville) Cc: Ville Syrjälä Cc: Imre Deak Signed-off-by: Manasi Navare Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200701221052.8946-1-manasi.d.navare@intel.com commit e80a07b244dd6726094da73d58537c131cc0b1a6 Merge: 3d07ae5faa871 c1f79a2eefdcc Author: David S. Miller Date: Wed Jul 8 12:42:40 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter/IPVS updates for net-next The following patchset contains Netfilter updates for net-next: 1) Support for rejecting packets from the prerouting chain, from Laura Garcia Liebana. 2) Remove useless assignment in pipapo, from Stefano Brivio. 3) On demand hook registration in IPVS, from Julian Anastasov. 4) Expire IPVS connection from process context to not overload timers, also from Julian. 5) Fallback to conntrack TCP tracker to handle connection reuse in IPVS, from Julian Anastasov. 6) Several patches to support for chain bindings. 7) Expose enum nft_chain_flags through UAPI. 8) Reject unsupported chain flags from the netlink control plane. ==================== Signed-off-by: David S. Miller commit 3d07ae5faa871f3ba0d049b0eda999bc0d35c3bc Merge: 5d75c04306f7f 17809516a03a0 Author: David S. Miller Date: Wed Jul 8 12:39:05 2020 -0700 Merge branch 'net-phy-Uninline-PHY-ethtool-statistics' Florian Fainelli says: ==================== net: phy: Uninline PHY ethtool statistics Now that we have introduced ethtool_phy_ops we can uninline those operations and move them back into phy.c where they belong. Since those functions are used by DSA, we need to continue exporting those symbols. It might be possible to remove ndo_get_ethtool_phy_stats in a subsequent patch since we could have DSA register its own ethtool_phy_ops instance instead of overloading the ethtool_ops. ==================== Signed-off-by: David S. Miller commit 17809516a03a045565ad6a80e6241754615871ac Author: Florian Fainelli Date: Wed Jul 8 09:46:25 2020 -0700 net: phy: Uninline PHY ethtool statistics operations Now that we have moved the PHY ethtool statistics to be dynamically registered, we no longer need to inline those for ethtool. This used to be done to avoid cross symbol referencing and allow ethtool to be decoupled from PHYLIB entirely. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit bd36ed1c935144a0e3b788bba659258f666e7b5b Author: Florian Fainelli Date: Wed Jul 8 09:46:24 2020 -0700 net: phy: Define PHY statistics ethtool_phy_ops Extend ethtool_phy_ops to include the 3 function pointers necessary for implementing PHY statistics. In a subsequent change we will uninline those functions. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 08257610302159e08fd4f5d33787807374ea63c7 Author: Sibi Sankar Date: Tue Jun 30 13:49:38 2020 +0530 arm64: dts: qcom: sc7180: Drop the unused non-MSA SID Having a non-MSA (Modem Self-Authentication) SID bypassed breaks modem sandboxing i.e if a transaction were to originate from it, the hardware memory protections units (XPUs) would fail to flag them (any transaction originating from modem are historically termed as an MSA transaction). Drop the unused non-MSA modem SID on SC7180 SoCs and cheza so that SMMU continues to block them. Tested-by: Douglas Anderson Reviewed-by: Sai Prakash Ranjan Reviewed-by: Douglas Anderson Fixes: bec71ba243e95 ("arm64: dts: qcom: sc7180: Update Q6V5 MSS node") Fixes: 68aee4af5f620 ("arm64: dts: qcom: sdm845-cheza: Add iommus property") Cc: stable@vger.kernel.org Reported-by: Sai Prakash Ranjan Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200630081938.8131-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit aa340845ae6f019e0a12321a1741c14679bb0664 Author: Dan Carpenter Date: Wed Jul 8 21:47:11 2020 +0300 io_uring: fix a use after free in io_async_task_func() The "apoll" variable is freed and then used on the next line. We need to move the free down a few lines. Fixes: 0be0b0e33b0b ("io_uring: simplify io_async_task_func()") Signed-off-by: Dan Carpenter Signed-off-by: Jens Axboe commit 5d75c04306f7f906c1200bef42406ccb71d4b75f Author: Alexander A. Klimov Date: Wed Jul 8 12:35:19 2020 +0200 Replace HTTP links with HTTPS ones: ATMEL MACB ETHERNET DRIVER Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit 4f74d15fe40833d4fb4f5ead7437aa73840596a5 Author: Eric Biggers Date: Thu Jul 2 01:56:07 2020 +0000 ext4: add inline encryption support Wire up ext4 to support inline encryption via the helper functions which fs/crypto/ now provides. This includes: - Adding a mount option 'inlinecrypt' which enables inline encryption on encrypted files where it can be used. - Setting the bio_crypt_ctx on bios that will be submitted to an inline-encrypted file. Note: submit_bh_wbc() in fs/buffer.c also needed to be patched for this part, since ext4 sometimes uses ll_rw_block() on file data. - Not adding logically discontiguous data to bios that will be submitted to an inline-encrypted file. - Not doing filesystem-layer crypto on inline-encrypted files. Co-developed-by: Satya Tangirala Signed-off-by: Satya Tangirala Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20200702015607.1215430-5-satyat@google.com Signed-off-by: Eric Biggers commit 27aacd28ea3b891d1cdc7a9c726e2237f7d3701f Author: Satya Tangirala Date: Thu Jul 2 01:56:06 2020 +0000 f2fs: add inline encryption support Wire up f2fs to support inline encryption via the helper functions which fs/crypto/ now provides. This includes: - Adding a mount option 'inlinecrypt' which enables inline encryption on encrypted files where it can be used. - Setting the bio_crypt_ctx on bios that will be submitted to an inline-encrypted file. - Not adding logically discontiguous data to bios that will be submitted to an inline-encrypted file. - Not doing filesystem-layer crypto on inline-encrypted files. This patch includes a fix for a race during IPU by Sahitya Tummala Signed-off-by: Satya Tangirala Acked-by: Jaegeuk Kim Reviewed-by: Eric Biggers Reviewed-by: Chao Yu Link: https://lore.kernel.org/r/20200702015607.1215430-4-satyat@google.com Co-developed-by: Eric Biggers Signed-off-by: Eric Biggers commit 5fee36095cda45d34555aed3a2e8973b80cd6bf8 Author: Satya Tangirala Date: Thu Jul 2 01:56:05 2020 +0000 fscrypt: add inline encryption support Add support for inline encryption to fs/crypto/. With "inline encryption", the block layer handles the decryption/encryption as part of the bio, instead of the filesystem doing the crypto itself via Linux's crypto API. This model is needed in order to take advantage of the inline encryption hardware present on most modern mobile SoCs. To use inline encryption, the filesystem needs to be mounted with '-o inlinecrypt'. Blk-crypto will then be used instead of the traditional filesystem-layer crypto whenever possible to encrypt the contents of any encrypted files in that filesystem. Fscrypt still provides the key and IV to use, and the actual ciphertext on-disk is still the same; therefore it's testable using the existing fscrypt ciphertext verification tests. Note that since blk-crypto has a fallback to Linux's crypto API, and also supports all the encryption modes currently supported by fscrypt, this feature is usable and testable even without actual inline encryption hardware. Per-filesystem changes will be needed to set encryption contexts when submitting bios and to implement the 'inlinecrypt' mount option. This patch just adds the common code. Signed-off-by: Satya Tangirala Reviewed-by: Jaegeuk Kim Reviewed-by: Eric Biggers Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20200702015607.1215430-3-satyat@google.com Co-developed-by: Eric Biggers Signed-off-by: Eric Biggers commit 457e7a135cbf0a0b5ed2717c192c0c57112c3b32 Author: Satya Tangirala Date: Thu Jul 2 01:56:04 2020 +0000 fs: introduce SB_INLINECRYPT Introduce SB_INLINECRYPT, which is set by filesystems that wish to use blk-crypto for file content en/decryption. This flag maps to the '-o inlinecrypt' mount option which multiple filesystems will implement, and code in fs/crypto/ needs to be able to check for this mount option in a filesystem-independent way. Signed-off-by: Satya Tangirala Reviewed-by: Jaegeuk Kim Reviewed-by: Eric Biggers Reviewed-by: Theodore Ts'o Link: https://lore.kernel.org/r/20200702015607.1215430-2-satyat@google.com Signed-off-by: Eric Biggers commit 3913f4f3a65ca9ed6ba7e4678fff10a6e7b42dbd Author: Christoph Hellwig Date: Wed Jul 8 16:18:27 2020 +0200 nvme: remove ns->disk checks By the time a namespace is added to ctrl->namespaces list and thus can be looked up ns->disk has been assigned, and it it never cleared. Remove all the checks for ns->disk being NULL. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Chaitanya Kulkarni commit 93165ecbe1d0298bdaa9ddc4b4e4ff01831dc6c9 Author: Florian Fainelli Date: Tue Jul 7 21:45:13 2020 -0700 net: dsa: loop: Print when registration is successful We have a number of error conditions that can lead to the driver not probing successfully, move the print when we are sure dsa_register_switch() has suceeded. This avoids repeated prints in case of probe deferral for instance. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller commit 9627a7b31f3c4ff8bc8f3be3683983ffe6eaebe6 Author: Chao Yu Date: Mon Jul 6 18:23:36 2020 +0800 f2fs: fix error path in do_recover_data() - don't panic kernel if f2fs_get_node_page() fails in f2fs_recover_inline_data() or f2fs_recover_inline_xattr(); - return error number of f2fs_truncate_blocks() to f2fs_recover_inline_data()'s caller; Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4fc781a3eb3b4955c03c2009e033da3b5f5adb5d Author: Chao Yu Date: Fri Jul 3 16:39:09 2020 +0800 f2fs: fix wrong description of compress feature in f2fs.rst f2fs will try compressing data in cluster only when "all logical blocks in cluster contain valid data" rather than "all logical blocks in file are valid". Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f567adb0342e125903cbe77adcf1e09b53acda1f Author: Chao Yu Date: Fri Jul 3 16:40:11 2020 +0800 f2fs: fix to wait GCed compressed page writeback like we did for encrypted page. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ffcde4b29a5f20ddca6fe559b48f345818bf1d91 Author: Dehe Gu Date: Fri Jul 3 17:51:29 2020 +0800 f2fs: remove write attribute of main_blkaddr sysfs node Fuzzing main_blkaddr sysfs node will corrupt this field's value, causing kernel panic, remove its write attribute to avoid potential security risk. [Chao Yu: add description] Signed-off-by: Dehe Gu Signed-off-by: Daiyue Zhang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c8f6ae1fb28d74ef7a0966477f61d1c2c8ee2e1e Author: Steve MacLean Date: Tue May 26 18:51:11 2020 -0700 perf inject jit: Remove //anon mmap events **perf-.map and jit-.dump designs: When a JIT generates code to be executed, it must allocate memory and mark it executable using an mmap call. *** perf-.map design The perf-.map assumes that any sample recorded in an anonymous memory page is JIT code. It then tries to resolve the symbol name by looking at the process' perf-.map. *** jit-.dump design The jit-.dump mechanism takes a different approach. It requires a JIT to write a `/jit-.dump` file. This file must also be mmapped so that perf inject -jit can find the file. The JIT must also add JIT_CODE_LOAD records for any functions it generates. The records are timestamped using a clock which can be correlated to the perf record clock. After perf record, the `perf inject -jit` pass parses the recording looking for a `/jit-.dump` file. When it finds the file, it parses it and for each JIT_CODE_LOAD record: * creates an elf file `/jitted--.so * injects a new mmap record mapping the new elf file into the process. *** Coexistence design The kernel and perf support both of these mechanisms. We need to make sure perf works on an app supporting either or both of these mechanisms. Both designs rely on mmap records to determine how to resolve an ip address. The mmap records of both techniques by definition overlap. When the JIT compiles a method, it must: * allocate memory (mmap) * add execution privilege (mprotect or mmap. either will generate an mmap event form the kernel to perf) * compile code into memory * add a function record to perf-.map and/or jit-.dump Because the jit-.dump mechanism supports greater capabilities, perf prefers the symbols from jit-.dump. It implements this based on timestamp ordering of events. There is an implicit ASSUMPTION that the JIT_CODE_LOAD record timestamp will be after the // anon mmap event that was generated during memory allocation or adding the execution privilege setting. *** Problems with the ASSUMPTION The ASSUMPTION made in the Coexistence design section above is violated in the following scenario. *** Scenario While a JIT is jitting code it will eventually need to commit more pages and change these pages to executable permissions. Typically the JIT will want these collocated to minimize branch displacements. The kernel will coalesce these anonymous mapping with identical permissions before sending an MMAP event for the new pages. The address range of the new mmap will not be just the most recently mmap pages. It will include the entire coalesced mmap region. See mm/mmap.c unsigned long mmap_region(struct file *file, unsigned long addr, unsigned long len, vm_flags_t vm_flags, unsigned long pgoff, struct list_head *uf) { ... /* * Can we just expand an old mapping? */ ... perf_event_mmap(vma); ... } *** Symptoms The coalesced // anon mmap event will be timestamped after the JIT_CODE_LOAD records. This means it will be used as the most recent mapping for that entire address range. For remaining events it will look at the inferior perf-.map for symbols. If both mechanisms are supported, the symbol will appear twice with different module names. This causes weird behavior in reporting. If only jit-.dump is supported, the symbol will no longer be resolved. ** Implemented solution This patch solves the issue by removing // anon mmap events for any process which has a valid jit-.dump file. It tracks on a per process basis to handle the case where some running apps support jit-.dump, but some only support perf-.map. It adds new assumptions: * // anon mmap events are only required for perf-.map support. * An app that uses jit-.dump, no longer needs perf-.map support. It assumes that any perf-.map info is inferior. *** Details Use thread->priv to store whether a jitdump file has been processed During "perf inject --jit", discard "//anon*" mmap events for any pid which has sucessfully processed a jitdump file. ** Testing: // jitdump case perf record perf inject --jit --input perf.data --output perfjit.data // verify mmap "//anon" events present initially perf script --input perf.data --show-mmap-events | grep '//anon' // verify mmap "//anon" events removed perf script --input perfjit.data --show-mmap-events | grep '//anon' // no jitdump case perf record perf inject --jit --input perf.data --output perfjit.data // verify mmap "//anon" events present initially perf script --input perf.data --show-mmap-events | grep '//anon' // verify mmap "//anon" events not removed perf script --input perfjit.data --show-mmap-events | grep '//anon' ** Repro: This issue was discovered while testing the initial CoreCLR jitdump implementation. https://github.com/dotnet/coreclr/pull/26897. ** Alternate solutions considered These were also briefly considered: * Change kernel to not coalesce mmap regions. * Change kernel reporting of coalesced mmap regions to perf. Only include newly mapped memory. * Only strip parts of // anon mmap events overlapping existing jitted--.so mmap events. Signed-off-by: Steve MacLean Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/1590544271-125795-1-git-send-email-steve.maclean@linux.microsoft.com Signed-off-by: Arnaldo Carvalho de Melo commit facbf0b9820f34f14b54f567862b4a96e910f468 Merge: 19bf119ccfa07 dcde237b9b0eb Author: Arnaldo Carvalho de Melo Date: Wed Jul 8 13:49:15 2020 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes and move perf/core forward, minor conflict as perf_evlist__add_dummy() lost its 'perf_' prefix as it operates on a 'struct evlist', not on a 'struct perf_evlist', i.e. its tools/perf/ specific, it is not in libperf. Signed-off-by: Arnaldo Carvalho de Melo commit a7c15187b391d7fe9903903475a94e5cd5b796d6 Author: Lee Jones Date: Wed Jul 8 13:48:32 2020 +0100 regulator: devres: Standardise on function documentation headers Line up descriptions, start description with a lower-case character and omit old definitions such as quoting the old argument "consumer". Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200708124832.3441649-4-lee.jones@linaro.org Signed-off-by: Mark Brown commit 45e8446e7a153a011ae099bb8c5657bb853c0ad0 Author: Lee Jones Date: Wed Jul 8 13:48:31 2020 +0100 regulator: of_regulator: Add missing colon for rdev kerneldoc argument Kerneldoc validation gets confused if syntax isn't "@.*: ". Adding the missing colons squashes the following W=1 warnings: Signed-off-by: Lee Jones Cc: Rajendra Nayak Link: https://lore.kernel.org/r/20200708124832.3441649-3-lee.jones@linaro.org Signed-off-by: Mark Brown commit 9565cccd64876dd1f8732fad3a04f8daa41fcef9 Author: Lee Jones Date: Wed Jul 8 13:48:30 2020 +0100 regulator: devres: Fix issues with kerneldoc headers Provide descriptions for some missing function args and rename others to match the names used. Fixes the following W=1 warning(s): drivers/regulator/devres.c:187: warning: Function parameter or member 'dev' not described in 'devm_regulator_register' drivers/regulator/devres.c:226: warning: Function parameter or member 'dev' not described in 'devm_regulator_unregister' drivers/regulator/devres.c:226: warning: Function parameter or member 'rdev' not described in 'devm_regulator_unregister' drivers/regulator/devres.c:226: warning: Excess function parameter 'regulator' description in 'devm_regulator_unregister' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200708124832.3441649-2-lee.jones@linaro.org Signed-off-by: Mark Brown commit 2c3d8dfecedd7f5e24e09730a992b59b1c6f956e Author: lihao Date: Tue Jul 7 12:00:04 2020 +0800 selinux: Fix spelling mistakes in the comments Fix spelling mistakes in the comments quering==>querying Signed-off-by: lihao Signed-off-by: Paul Moore commit 6940701c715e193282cf8b31f970b2ea6eb26341 Merge: 76c49909a6925 ab1ba5252f611 Author: Mark Brown Date: Wed Jul 8 16:50:37 2020 +0100 Merge series "ASoC: mediatek: mt8183: support machine driver for rt1015" from Tzung-Bi Shih : This series tries to reuse mt8183-mt6358-ts3a227-max98357.c for supporting machine driver with rt1015 speaker amplifier. The 1st patch is straightforward: re-order the header inclusions. The 2nd patch adds document for the new proposed compatible string. The 3rd patch changes the machine driver to support either "MAX98357A" or "RT1015" codecs. Tzung-Bi Shih (3): ASoC: mediatek: mt8183: sort header inclusions in alphabetical dt-bindings: mt8183: add compatible string for using rt1015 ASoC: mediatek: mt8183: support machine driver with rt1015 .../sound/mt8183-mt6358-ts3a227-max98357.txt | 5 +- sound/soc/mediatek/Kconfig | 5 +- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 171 +++++++++++++++--- 3 files changed, 153 insertions(+), 28 deletions(-) -- 2.27.0.383.g050319c2ae-goog commit 76c49909a69259c0f1fee4f88f8c326fc5efe0dd Merge: 81e7d4ce8bff6 8bf9475fe49fa Author: Mark Brown Date: Wed Jul 8 16:50:36 2020 +0100 Merge series "ASoC: topology: fix error handling flow" from Pierre-Louis Bossart : While experimenting and introducing errors in Baytrail topology files until I got them right, I encountered multiple kernel oopses and memory leaks. This is a first batch to harden the code, but we should probably think of a tool to fuzz the topology... Pierre-Louis Bossart (5): ASoC: topology: fix kernel oops on route addition error ASoC: topology: fix tlvs in error handling for widget_dmixer ASoC: topology: use break on errors, not continue ASoC: topology: factor kfree(se) in error handling ASoC: topology: add more logs when topology load fails. sound/soc/soc-topology.c | 97 ++++++++++++++++++++++++---------------- 1 file changed, 58 insertions(+), 39 deletions(-) base-commit: a5911ac5790acaf98c929b826b3f7b4a438f9759 -- 2.25.1 commit 81e7d4ce8bff6af7988d070db5e59525e7b31b5e Merge: ee3d133972f1e 0579ece8f4de9 Author: Mark Brown Date: Wed Jul 8 16:50:34 2020 +0100 Merge series "ASoC: qdsp6: add gapless compressed audio support" from Srinivas Kandagatla : This patchset adds gapless compressed audio support on q6asm. Gapless on q6asm is implemented using 2 streams in a single asm session. First few patches are enhacements done to q6asm interface to allow stream id per each command, gapless flags and silence meta data. Along with this there are few trivial changes which I thought are necessary! Last patch implements copy callback to allow finer control over buffer offsets, specially in partial drain cases. This patchset is tested on RB3 aka DB845c platform. Thanks, srini Srinivas Kandagatla (11): ASoC: q6asm: add command opcode to timeout error report ASoC: q6asm: rename misleading session id variable ASoC: q6asm: make commands specific to streams ASoC: q6asm: use flags directly from asm-dai ASoC: q6asm: add length to write command token ASoC: q6asm: add support to remove intial and trailing silence ASoC: q6asm: add support to gapless flag in asm open ASoC: q6asm-dai: add next track metadata support ASoC: qdsp6: use dev_err instead of pr_err ASoC: qdsp6-dai: add gapless support ASoC: q6asm-dai: add support to copy callback sound/soc/qcom/qdsp6/q6asm-dai.c | 397 +++++++++++++++++++++++-------- sound/soc/qcom/qdsp6/q6asm.c | 173 +++++++++----- sound/soc/qcom/qdsp6/q6asm.h | 48 ++-- 3 files changed, 458 insertions(+), 160 deletions(-) -- 2.21.0 commit ee3d133972f1e5d260891c4dd58adb005014414a Author: Vijendar Mukunda Date: Wed Jul 8 00:07:11 2020 +0530 ASoC: amd: fixed kernel warnings This patch will fix unused variables kernel warnings when CONFIG_ACPI is disabled. Reported-by: Randy Dunlap Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1594147044-25582-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit ab1ba5252f611c0efabca5fca81f5717445da47b Author: Tzung-Bi Shih Date: Wed Jul 8 19:32:32 2020 +0800 ASoC: mt8183: add compatible string for using rt1015 Machines with rt1015 should use the compatible string "mt8183-mt6358-ts3a227-rt1015". Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200708113233.3994206-3-tzungbi@google.com Signed-off-by: Mark Brown commit f4fb4fef49664e64f4f40e9e8db11f785fbc79a4 Author: Tzung-Bi Shih Date: Wed Jul 8 19:32:33 2020 +0800 ASoC: mediatek: mt8183: support machine driver with rt1015 Supports machine driver with rt1015 ("mt8183-mt6358-ts3a227-rt1015"). Embeds in existing mt8183-mt6358-ts3a227-max98357.c because they share most of the code. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200708113233.3994206-4-tzungbi@google.com Signed-off-by: Mark Brown commit 4dae01c2e5df7beb8dfd5deb9560e42f19d3cfb7 Author: Tzung-Bi Shih Date: Wed Jul 8 19:32:31 2020 +0800 ASoC: mediatek: mt8183: sort header inclusions in alphabetical Sorts header inclusions in alphabetical. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200708113233.3994206-2-tzungbi@google.com Signed-off-by: Mark Brown commit 0579ece8f4de9956ea7087c63f55663ea79283bc Author: Srinivas Kandagatla Date: Tue Jul 7 17:36:39 2020 +0100 ASoC: qdsp6: use dev_err instead of pr_err Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200707163641.17113-10-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit b6198097b84abcbf9d098ddf5887fe62f9da2e3c Author: Srinivas Kandagatla Date: Tue Jul 7 17:36:31 2020 +0100 ASoC: q6asm: add command opcode to timeout error report Make the error reporting more useful by adding opcode to it. Without this its almost impossible to say which command actually timed out. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20200707163641.17113-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit 465931e70881476a210d44705102ef8b6ee6cdb0 Author: Robin Murphy Date: Thu Jun 18 18:56:29 2020 +0100 clk: rockchip: Revert "fix wrong mmc sample phase shift for rk3328" This reverts commit 82f4b67f018c88a7cc9337f0067ed3d6ec352648. According to a subsequent revert in the vendor kernel, the original change was based on unclear documentation and was in fact incorrect. Emprically, my board's HS200 eMMC at 200MHZ apparently gets lucky with a phase where this had no impact, but limiting max-frequency to 150MHz to match the nominal capability of the I/O pins made it virtually unusable, constantly throwing errors and retuning. With this revert, it starts behaving perfectly at 150MHz too. Fixes: 82f4b67f018c ("clk: rockchip: fix wrong mmc sample phase shift for rk3328") Signed-off-by: Robin Murphy Reviewed-by: Shawn Lin Link: https://lore.kernel.org/r/c80eb52e34c03f817586b6b7912fbd4e31be9079.1589475794.git.robin.murphy@arm.com Signed-off-by: Heiko Stuebner commit 359c1f88ab646174bf82d18454c3ee2a38462ac8 Author: Baolin Wang Date: Fri Jul 3 10:49:24 2020 +0800 nvme-pci: use standard block status symbolic names Signed-off-by: Baolin Wang Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 9056fc9fc514ecd2457a59c575863ecb07c4fa5e Author: Baolin Wang Date: Fri Jul 3 10:49:23 2020 +0800 nvme-pci: use the consistent return type of nvme_pci_iod_alloc_size() The nvme_pci_iod_alloc_size() should return 'size_t' type to be consistent with the sizeof return value. Signed-off-by: Baolin Wang Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 4e523547e2bf755d40cb10e85795c2f9620ff3fb Author: Baolin Wang Date: Fri Jul 3 10:49:21 2020 +0800 nvme-pci: add a blank line after declarations Add a blank line after declarations to make code more readable. Signed-off-by: Baolin Wang Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit ee0d96d3225f5e3688391a033b9e373b5b603315 Author: Baolin Wang Date: Fri Jul 3 10:49:20 2020 +0800 nvme-pci: fix some comments issues Fix comment typos and remove whitespaces before tabs to cleanup checkpatch errors. Signed-off-by: Baolin Wang Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit c25c853ef60d2c0d37420b9e4b81bdd49e90b46e Author: Baolin Wang Date: Fri Jul 3 10:49:22 2020 +0800 nvme-pci: remove redundant segment validation We've validated the segment counts before calling nvme_map_data(), so there is no need to validate again in nvme_pci_use_sgls(, which is only called from nvme_map_data(). Signed-off-by: Baolin Wang Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 972b13e29d40753a4ab2cd9735bd6ce26e91d6a6 Author: David Fugate Date: Thu Jul 2 15:31:22 2020 -0600 nvme: document quirked Intel models Documented model names of Intel SSDs requiring quirks. Signed-off-by: David Fugate Signed-off-by: Christoph Hellwig commit 764075fdcb2f09baa23fdc4df4b79741e5c39b57 Author: Sagi Grimberg Date: Sun Jul 5 00:57:55 2020 -0700 nvme: expose reconnect_delay and ctrl_loss_tmo via sysfs This is useful information, and moreover its it's useful to be able to alter these parameters per controller after it has been established. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 240e6ee272c07a2636dfc7d65f5bbb18377c49e5 Author: Keith Busch Date: Mon Jun 29 12:06:41 2020 -0700 nvme: support for zoned namespaces Add support for NVM Express Zoned Namespaces (ZNS) Command Set defined in NVM Express TP4053. Zoned namespaces are discovered based on their Command Set Identifier reported in the namespaces Namespace Identification Descriptor list. A successfully discovered Zoned Namespace will be registered with the block layer as a host managed zoned block device with Zone Append command support. A namespace that does not support append is not supported by the driver. Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Javier González Reviewed-by: Himanshu Madhani Signed-off-by: Hans Holmberg Signed-off-by: Dmitry Fomichev Signed-off-by: Ajay Joshi Signed-off-by: Aravind Ramesh Signed-off-by: Niklas Cassel Signed-off-by: Matias Bjørling Signed-off-by: Damien Le Moal Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit be93e87e780253780df9bb6ecc9bc1199b0d94c3 Author: Keith Busch Date: Mon Jun 29 12:06:40 2020 -0700 nvme: support for multiple Command Sets Supported and Effects log pages The Commands Supported and Effects log page was extended with a CSI field that enables the host to query the log page for each command set supported. Retrieve this log page for each command set that an attached namespace supports, and save a pointer to that log in the namespace head. Reviewed-by: Matias Bjørling Reviewed-by: Javier González Reviewed-by: Himanshu Madhani Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Daniel Wagner Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit 71010c30945425203da8d069a10fa45a05a00f96 Author: Niklas Cassel Date: Mon Jun 29 12:06:39 2020 -0700 nvme: implement multiple I/O Command Set support Implements support for multiple I/O Command Sets. NVMe TP 4056 introduces a method to enumerate multiple command sets per namespace. If the command set is exposed, this method for enumeration will be used instead of the traditional method that uses the CC.CSS register command set register for command set identification. For namespaces where the Command Set Identifier is not supported or recognized, the specific namespace will not be created. Reviewed-by: Javier González Reviewed-by: Martin K. Petersen Reviewed-by: Johannes Thumshirn Reviewed-by: Matias Bjørling Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Niklas Cassel Signed-off-by: Christoph Hellwig commit 089565fbf3bba99f91293b47b8c59ed85e00a81c Author: Aravind Ramesh Date: Mon Jun 29 12:06:38 2020 -0700 null_blk: introduce zone capacity for zoned device Allow emulation of a zoned device with a per zone capacity smaller than the zone size as as defined in the Zoned Namespace (ZNS) Command Set specification. The zone capacity defaults to the zone size if not specified and must be smaller than the zone size otherwise. Reviewed-by: Matias Bjørling Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Daniel Wagner Signed-off-by: Aravind Ramesh Signed-off-by: Christoph Hellwig commit 82394db7383d33641f3f565bd79792fb41b1741f Author: Matias Bjørling Date: Mon Jun 29 12:06:37 2020 -0700 block: add capacity field to zone descriptors In the zoned storage model, the sectors within a zone are typically all writeable. With the introduction of the Zoned Namespace (ZNS) Command Set in the NVM Express organization, the model was extended to have a specific writeable capacity. Extend the zone descriptor data structure with a zone capacity field to indicate to the user how many sectors in a zone are writeable. Introduce backward compatibility in the zone report ioctl by extending the zone report header data structure with a flags field to indicate if the capacity field is available. Reviewed-by: Jens Axboe Reviewed-by: Javier González Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Reviewed-by: Daniel Wagner Signed-off-by: Matias Bjørling Signed-off-by: Christoph Hellwig commit f5af577d553103115579b5e404070dfab4d00332 Author: Baolin Wang Date: Wed Jun 24 14:49:58 2020 +0800 nvme: use USEC_PER_SEC instead of magic numbers Use USEC_PER_SEC instead of magic numbers to make code more readable. Reviewed-by: Sagi Grimberg Signed-off-by: Baolin Wang Signed-off-by: Christoph Hellwig commit b8a12e93570d8aa7fbfe2b8909eee8fd0f778afd Author: Sagi Grimberg Date: Wed Jun 24 12:27:16 2020 -0700 nvmet-tcp: simplify nvmet_process_resp_list We can make it shorter and simpler without some redundant checks. Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 122e5b9f3d370ae11e1502d14ff5c7ea9b144a76 Author: Sagi Grimberg Date: Thu Jun 18 17:30:24 2020 -0700 nvme-tcp: optimize network stack with setting msg flags according to batch size If we have a long list of request to send, signal the network stack that more is coming (MSG_MORE). If we have nothing else, signal MSG_EOR. Signed-off-by: Sagi Grimberg Tested-by: Mark Wunderlich Signed-off-by: Christoph Hellwig commit 86f0348ace1510d7ac25124b096fb88a6ab45270 Author: Sagi Grimberg Date: Thu Jun 18 17:30:23 2020 -0700 nvme-tcp: leverage request plugging blk-mq request plugging can improve the execution of our pipeline. When we queue a request we actually trigger our I/O worker thread yielding a context switch by definition. However if we know that there are more requests in the pipe that are coming, we are better off not trigger our I/O worker and only do that for the last request in the batch (bd->last). By having it, we improve efficiency by amortizing context switches over a batch of requests. Signed-off-by: Sagi Grimberg Tested-by: Mark Wunderlich Signed-off-by: Christoph Hellwig commit 15ec928a65e0528ef4999e2947b4802b772f0891 Author: Sagi Grimberg Date: Thu Jun 18 17:30:22 2020 -0700 nvme-tcp: have queue prod/cons send list become a llist The queue processing will splice to a queue local list, this should alleviate some contention on the send_list lock, but also prepares us to the next patch where we look on these lists for network stack flag optimization. Remove queue lock as its not used anymore. Signed-off-by: Sagi Grimberg Tested-by: Mark Wunderlich [hch: simplified a loop] Signed-off-by: Christoph Hellwig commit ca8f4beebfb4979acb664e02365ef6e662ef95b0 Author: Dongli Zhang Date: Mon May 25 21:21:18 2020 -0700 nvme-fcloop: verify wwnn and wwpn format The nvme host and target verify the wwnn and wwpn format via nvme_fc_parse_traddr(). For instance, it is required that the length of wwnn to be either 21 ("nn-0x") or 19 (nn-). Add this verification to nvme-fcloop so that the input should always be in hex and the length of input should always be 18. Otherwise, the user may use e.g. 0x2 to create fcloop local port, while 0x0000000000000002 is required for nvme host and target. This makes the requirement of format confusing. Signed-off-by: Dongli Zhang Reviewed-by: Sagi Grimberg Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit a0f0dbaa6986d6777a4a6835ec91616d5c75ac25 Author: Chaitanya Kulkarni Date: Thu Jun 11 18:16:59 2020 -0700 nvmet: use unsigned type for u64 In function nvmet_subsys_atte_version_show() which uses the NVME_XXX() macros related to version (of type u64) get rid of the int type cast when printing subsys version and use appropriate format specifier for u64. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 6fa350f7145677cf6d0b86eff33eb2e3e246770c Author: Max Gurtovoy Date: Tue Jun 2 16:15:46 2020 +0300 nvmet: introduce flags member in nvmet_fabrics_ops Replace has_keyed_sgls and metadata_support booleans with a flags member that will be used for adding more features in the future. Signed-off-by: Max Gurtovoy Reviewed-by: Himanshu Madhani Reviewed-by: Israel Rukshin Signed-off-by: Christoph Hellwig commit 4e102559725683a4bf7240db8ed12b6b64cfccbf Author: Max Gurtovoy Date: Tue Jun 2 16:15:45 2020 +0300 nvmet-tcp: remove has_keyed_sgls initialization Since the nvmet_tcp_ops is static, there is no need to initialize values to zero. Signed-off-by: Max Gurtovoy Reviewed-by: Israel Rukshin Reviewed-by: Himanshu Madhani Signed-off-by: Christoph Hellwig commit b261b61c9e03ddf21464cda777a2457113b118be Author: Dongli Zhang Date: Mon Jun 8 09:20:01 2020 -0700 nvmet-loop: remove unused 'target_ctrl' in nvme_loop_ctrl This field is never used since the introduction of nvme loopback by commit 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver"). Signed-off-by: Dongli Zhang Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit ad509996432e54284d35f2e42b0f78273cbef27d Author: Dongli Zhang Date: Mon Jun 8 09:20:02 2020 -0700 nvme-pci: remove the empty line at the beginning of nvme_should_reset() Just cleanup by removing the empty line. Signed-off-by: Dongli Zhang Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 9dc54a0d15665088f4c4ee30df5d2a94f03be3fa Author: Chaitanya Kulkarni Date: Mon Jun 1 19:41:14 2020 -0700 nvme-pci: code cleanup for nvme_alloc_host_mem() Although use of for loop is preferred it is not a common practice to have 80 char long for loop initialization and comparison section. Use temp variables for calculating values and replace them in the for loop with size of all variables to set to u64 since preferred variable is declared as u64. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 61f3b89630973037f67d8e25e5d26e80a51a7b37 Author: Chaitanya Kulkarni Date: Wed Jun 17 10:05:13 2020 +0200 nvme-pci: use unsigned for io queue depth The NVMe PCIe declares module parameter io_queue_depth as int. Change this to u16 as queue depth can never be negative. Now to reflect this update module parameter getter function from param_get_int() -> param_get_uint() and respective setter function with type of n changed from int to u16 with param_set_int() to param_set_ushort(). Finally update struct nvme_dev q_depth member to u16 and use u16 in min_t() when calculating dev->q_depth in the nvme_pci_enable() (since q_depth is now u16) and use unsigned int instead of int when calculating dev->tagset.queue_depth as target variable tagset->queue_depth is of type unsigned int in nvme_dev_add(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit d4047cf99421d434660a5a0c61ac3e83b4ad0dad Author: Chaitanya Kulkarni Date: Mon Jun 1 19:41:12 2020 -0700 nvme-core: use u16 type for ctrl->sqsize In nvme_init_identify() when calculating submission queue size use u16 instead of int type in the min_t() since target variable ctrl->sqsize is of type u16. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit a87835e9ecbd29ddffdd5bae81dc913afc221abd Author: Chaitanya Kulkarni Date: Mon Jun 1 19:41:11 2020 -0700 nvme-core: use u16 type for directives In nvme_configure_directives() when calculating number of streams use u16 instead of unsigned type in the min_t() since target variable ctrl->nr_streams is of type u16. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 482c6b614a4750f71ed9c928bb5b2007a05dd694 Merge: 0e6e255e7a58c dcb7fd82c75ee Author: Jens Axboe Date: Wed Jul 8 08:02:13 2020 -0600 Merge tag 'v5.8-rc4' into for-5.9/drivers Merge in 5.8-rc4 for-5.9/block to setup for-5.9/drivers, to provide a clean base and making the life for the NVMe changes easier. Signed-off-by: Jens Axboe * tag 'v5.8-rc4': (732 commits) Linux 5.8-rc4 x86/ldt: use "pr_info_once()" instead of open-coding it badly MIPS: Do not use smp_processor_id() in preemptible code MIPS: Add missing EHB in mtc0 -> mfc0 sequence for DSPen .gitignore: Do not track `defconfig` from `make savedefconfig` io_uring: fix regression with always ignoring signals in io_cqring_wait() x86/ldt: Disable 16-bit segments on Xen PV x86/entry/32: Fix #MC and #DB wiring on x86_32 x86/entry/xen: Route #DB correctly on Xen PV x86/entry, selftests: Further improve user entry sanity checks x86/entry/compat: Clear RAX high bits on Xen PV SYSENTER i2c: mlxcpld: check correct size of maximum RECV_LEN packet i2c: add Kconfig help text for slave mode i2c: slave-eeprom: update documentation i2c: eg20t: Load module automatically if ID matches i2c: designware: platdrv: Set class based on DMI i2c: algo-pca: Add 0x78 as SCL stuck low status for PCA9665 mm/page_alloc: fix documentation error vmalloc: fix the owner argument for the new __vmalloc_node_range callers mm/cma.c: use exact_nid true to fix possible per-numa cma leak ... commit 8bf9475fe49fa96eea57724bb04e0931d101bc5a Author: Pierre-Louis Bossart Date: Tue Jul 7 15:37:49 2020 -0500 ASoC: topology: add more logs when topology load fails. Add more dev_err() logs to help trace topology load failures, since we have multiple error causes (e.g. invalid header or header that could not be loaded). Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20200707203749.113883-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 952bd9377ef61c843236fd3e7cf65076025e26a4 Author: Pierre-Louis Bossart Date: Tue Jul 7 15:37:48 2020 -0500 ASoC: topology: factor kfree(se) in error handling No need to repeat the same thing multiple times when it can be done in one location. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200707203749.113883-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 129fc2ba01c8322575173cc97afa324e54a5d4ce Author: Pierre-Louis Bossart Date: Tue Jul 7 15:37:47 2020 -0500 ASoC: topology: use break on errors, not continue Since the beginning of the topology, the code continues to the next object even when an error is detected. The topology should be handled with an all-or-nothing design, loading a partially valid topology is a sure way to get bug reports that are difficult to deal with. Changing the behavior may break previous solutions and expose problems in topology files delivered in the past, so it's probably not wise to add this patch to stable branches without revalidation. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200707203749.113883-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c847e429db9de0a214401477c7292066e599a7c9 Author: Lee Jones Date: Mon Jul 6 08:44:21 2020 +0100 video: backlight: sky81452-backlight: Fix some kerneldoc issues Firstly, all lines must begin with a '*'. Secondly, arg descriptions must be spelt correctly, so fix misspelling of 'gpioD_enable' and 'short_detecTion_threshold' Fixes the following W=1 kernel build warning(s): drivers/video/backlight/sky81452-backlight.c:46: warning: bad line: If it is not defined, default name is lcd-backlight. drivers/video/backlight/sky81452-backlight.c:64: warning: Function parameter or member 'gpiod_enable' not described in 'sky81452_bl_platform_data' drivers/video/backlight/sky81452-backlight.c:64: warning: Function parameter or member 'short_detection_threshold' not described in 'sky81452_bl_platform_data' Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 99010fac8b8c1e4f8663cb8b55c1a6584f3b84ba Author: Tom Rix Date: Mon Jul 6 05:28:57 2020 -0700 drm/radeon: fix double free clang static analysis flags this error drivers/gpu/drm/radeon/ci_dpm.c:5652:9: warning: Use of memory after it is freed [unix.Malloc] kfree(rdev->pm.dpm.ps[i].ps_priv); ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/ci_dpm.c:5654:2: warning: Attempt to free released memory [unix.Malloc] kfree(rdev->pm.dpm.ps); ^~~~~~~~~~~~~~~~~~~~~~ problem is reported in ci_dpm_fini, with these code blocks. for (i = 0; i < rdev->pm.dpm.num_ps; i++) { kfree(rdev->pm.dpm.ps[i].ps_priv); } kfree(rdev->pm.dpm.ps); The first free happens in ci_parse_power_table where it cleans up locally on a failure. ci_dpm_fini also does a cleanup. ret = ci_parse_power_table(rdev); if (ret) { ci_dpm_fini(rdev); return ret; } So remove the cleanup in ci_parse_power_table and move the num_ps calculation to inside the loop so ci_dpm_fini will know how many array elements to free. Fixes: cc8dbbb4f62a ("drm/radeon: add dpm support for CI dGPUs (v2)") Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit e241df6987023e341105696d71ead87fee1cc395 Author: Tiezhu Yang Date: Thu Jul 2 10:27:43 2020 +0800 gpu/drm: Remove debug info about CPU address When I update the latest kernel, I see the following "____ptrval____" boot messages. [ 1.872600] radeon 0000:01:05.0: fence driver on ring 0 use gpu addr 0x0000000048000c00 and cpu addr 0x(____ptrval____) [ 1.879095] radeon 0000:01:05.0: fence driver on ring 5 use gpu addr 0x0000000040056038 and cpu addr 0x(____ptrval____) Both radeon_fence_driver_start_ring() and amdgpu_fence_driver_start_ring() have the similar issue, there exists the following two methods to solve it: (1) Use "%pK" instead of "%p" so that the CPU address can be printed when the kptr_restrict sysctl is set to 1. (2) Just completely drop the CPU address suggested by Christian, because the CPU address was useful in the past, but isn't any more. We now have a debugfs file to read the current fence values. Since the CPU address is not much useful, just remove the debug info about CPU address. Reviewed-by: Christian König Signed-off-by: Tiezhu Yang Signed-off-by: Alex Deucher commit 497f15f2bdef0124b0803ba9cceadf7a9b670079 Author: Nicholas Kazlauskas Date: Tue Jul 7 11:37:14 2020 -0400 drm/amd/display: Add missing CW4 programming for DCN30 [Why] To support inbox1 in CW4 we need to actually program CW4 instead of region 4 for newer firmware. This is done correctly on DCN20/DCN21 but this code wasn't added to DCN30. [How] Copy over the missing code. It doesn't need address translation since DCN30 uses virtual addressing. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 714ec7a2bd136a3dc5930bdcefc5f9e40035e4d8 Author: Huang Rui Date: Wed Jul 1 17:05:08 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in mmhub v9.4 This patch updates to use register distance member instead of hardcode in mmhub v9.4. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ff225c031a329c331b94f0d86a08fb34a97c1157 Author: Huang Rui Date: Wed Jul 1 16:49:27 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in mmhub v2 This patch updates to use register distance member instead of hardcode in mmhub v2. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1a99460fb464475c416d969346eb1d1479b91c50 Author: Huang Rui Date: Wed Jul 1 16:35:29 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in mmhub v1 This patch updates to use register distance member instead of hardcode in mmhub v1. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 13ae12d9e4ec1cc66ff8de77470195de158e6556 Author: Huang Rui Date: Wed Jul 1 16:28:33 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in gfxhub v2.1 This patch updates to use register distance member instead of hardcode in gfxhub v2.1. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1e40eebefa7c5b56e9d58ce1e1060bcdcc23c8be Author: Huang Rui Date: Wed Jul 1 16:18:39 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in gfxhub v2 This patch updates to use register distance member instead of hardcode in gfxhub v2. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 8c4713608586b04068e98c913766882f495f0d0f Author: Huang Rui Date: Wed Jul 1 16:08:23 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in gfxhub v1 This patch updates to use register distance member instead of hardcode in gfxhub v1. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9a69574b10a2077670926c905c80157d9d7b28e8 Author: Huang Rui Date: Wed Jul 1 15:46:59 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in VCN2/JEPG2 This patch updates to use register distance member instead of hardcode in VCN2/JEPG2. They are for the same ASIC. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2fcaca94bedae2ea9516168b32723106428db52e Author: Huang Rui Date: Wed Jul 1 15:39:02 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in UVD7/VCE4 This patch updates to use register distance member instead of hardcode in UVD7/VCE4. They are for the same ASIC. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 228ea7b08042a63dcb87224c047f4c848a5288bf Author: Huang Rui Date: Wed Jul 1 15:35:44 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in VCN1/JEPG1 This patch updates to use register distance member instead of hardcode in VCN1/JEPG1. They are for the same ASIC. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit af6c5c4f53d6045ee84a7fc460eb274443795124 Author: Huang Rui Date: Wed Jul 1 15:26:04 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in GMC10 This patch updates to use register distance member instead of hardcode in GMC10. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 148f597d67ae09ab90adf3d53251a1ab5a84ac53 Author: Huang Rui Date: Wed Jul 1 15:23:40 2020 +0800 drm/amdgpu: use register distance member instead of hardcode in GMC9 This patch updates to use register distance member instead of hardcode in GMC9. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1f9d56c30939757cc4ea63030c329fb54d001136 Author: Huang Rui Date: Wed Jul 1 09:37:56 2020 +0800 drm/amdgpu: add register distance members into vmhub structure This patch is to abstract register distances between two continuous context domains and invalidation engines. In different ip headers, these distances may be differences. Signed-off-by: Huang Rui Tested-by: AnZhong Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c12139118bb631d26d359f8e272cedeff0fb7516 Author: Felix Kuehling Date: Tue Jun 30 22:28:58 2020 -0400 drm/amdkfd: Remove redundant kfd2kgd interface lookup kfd_pasid.c isn't using the kfd2kgd interface any more. Remove redundant code trying to look up a device for finding that interface. Signed-off-by: Felix Kuehling Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit fa4a882008a71bf18a30c7f548572ecf19882fbd Author: Alex Jivin Date: Mon Jul 6 11:07:19 2020 -0400 drm/amdgpu: Move the mutex lock/unlock out Move the mutext lock/unlock outside of the if(), as the mutex is always taken: either in the if() branch or in the else branch. Signed-off-by: Alex Jivin Suggested-By: Luben Tukov Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit 74772649ab18bc90657420c94b2c57f0f9dc8299 Author: Bhawanpreet Lakha Date: Thu Jul 2 14:29:54 2020 -0400 drm/amd/display: Add missing reg mask for dcn3 This field is missing for dcn3 so add it from dcn20. enc2_set_dynamic_metadata() trys to sets this and we get a generic_reg warning since the mask is not defined. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1664641ea946f463b12e259e6345d0a86de560e4 Author: Wesley Chalmers Date: Wed Jun 10 11:49:16 2020 -0400 drm/amd/display: Add logger for SMU msg [WHY] We want to be able to see SMU messages sent and their responses Signed-off-by: Wesley Chalmers Reviewed-by: Joshua Aberback Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit efc7d1653817a6a82d6640dee9e8ea6feb441344 Author: Joshua Aberback Date: Fri Jun 26 03:57:57 2020 -0400 drm/amd/display: Request PHYCLK adjustment on PHY enable/disable [Why] Currently we don't explicitly send a request for a minimum PHYCLK, and we hope that the dependencies other clocks have will raise PHYCLK when needed. [How] - new clk_mgr function to keep track of PHYCLK requirements - request maximum requirement across all links - remove PHYCLK from clock state comparator, as it doesn't come from DML Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d3d847d8f25f2d0a82a3a18f36c1cfa86f2e93ac Author: Anthony Koo Date: Sat Jun 27 13:01:40 2020 -0400 drm/amd/display: 3.2.93 Signed-off-by: Anthony Koo Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit b226577488784a5a04ba97e2631003a30d6e651c Author: Anthony Koo Date: Sat Jun 27 12:36:23 2020 -0400 drm/amd/display: [FW Promotion] Release 0.0.23 [Header Changes] - Drop unused firmware SCRATCH bits from interface Signed-off-by: Anthony Koo Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8a488f5df32a0483010959c9265bc3484eca83f0 Author: Roman Li Date: Fri Jun 26 10:27:31 2020 -0400 drm/amd/display: Remove VSC infoframe dep on DMCU [Why] VSC infoframe is needed for PSR. Previously only DMCU controller supported PSR. Now DMUB also implements PSR. [How] Remove VSC infoframe dependency on DMCU. Signed-off-by: Roman Li Reviewed-by: Rodrigo Siqueira Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 486b7680465e931d02075cbb8f6af1ac9ef48fd2 Author: Jaehyun Chung Date: Tue Jun 23 18:30:28 2020 -0400 drm/amd/display: Send VSIF on unsupported modes on DAL [Why] Current DAL behaviour is to not send VSIF if mode does not support VRR (ie. FS range is < 10Hz). However, we should still set FS Native Color Active bit in some unsupported mode cases. [How] Remove check for if VRR is supported before building infopacket. Signed-off-by: Jaehyun Chung Reviewed-by: Anthony Koo Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit cd9a180a29ee35bb1c164d561c81c9ec6dd33825 Author: Igor Kravchenko Date: Mon Jun 8 17:32:27 2020 -0400 drm/amd/display: Register init [Why] Driver re-initialize registers already set in FW [How] Transfer init to FW Signed-off-by: Igor Kravchenko Reviewed-by: Tony Cheng Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 3c0dcf9f2ab393abffad4886adc072f3e82ba640 Author: Dmytro Laktyushkin Date: Fri May 29 12:58:36 2020 -0400 drm/amd/display: Add diags scaling log by default Print scaling parameters as they are calculated in diags. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1b0443b11530c1fac9d8d2a71032291d05e91be4 Author: Likun Gao Date: Mon Jul 6 10:54:26 2020 +0800 drm/amdgpu: fix coding error of mmhub pg enablement MMHUB powergating should be disabled on navi12 and enabled on sienna cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2373dd48fc85c710e49ebc9833e0ef97cc103213 Author: Likun Gao Date: Mon Jul 6 16:18:28 2020 +0800 drm/amdgpu: use RREG32_KIQ to read register when get cg state Use RREG32_KIQ to read gfx register when try to get gfx/sdma clockgating state instead of RREG32, as it will result to system hard hang when GPU is enter into GFXOFF state. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit dcf9864d2d31fb27c320b38a40a1596b7c91d935 Author: John Clements Date: Mon Jul 6 17:08:33 2020 +0800 drm/amdgpu: updated ta ucode loading add support for loading ucode with ta_firmware_header_v2_0 Reviewed-by: Bhawanpreet Lakha Signed-off-by: John Clements Signed-off-by: Alex Deucher commit f893d74fb88bf1f29a06b44e985e903f1b93778d Author: John Clements Date: Mon Jul 6 17:07:46 2020 +0800 drm/amdgpu: updated ta ucode header added definition for ta_firmware_header_v2_0 Reviewed-by: Bhawanpreet Lakha Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 90937420c44f7535fd3ac4341a48c4c4dd1fe190 Author: Huang Rui Date: Tue Jun 30 12:32:57 2020 +0800 drm/amdgpu: add TMR destory function for psp TMR is required to be destoried with GFX_CMD_ID_DESTROY_TMR while the system goes to suspend. Otherwise, PSP may return the failure state (0xFFFF007) on Gfx-2-PSP command GFX_CMD_ID_SETUP_TMR after do multiple times suspend/resume. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 429f3d24384b049925771c56b5bc2850cede958f Author: Huang Rui Date: Tue Jun 30 10:43:21 2020 +0800 drm/amdgpu: asd function needs to be unloaded in suspend phase Unload ASD function in suspend phase. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 74b76256f3d9096431556e2afdc60027b81f41b2 Author: Gustavo A. R. Silva Date: Tue Jul 7 14:57:47 2020 -0500 USB: serial: use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: Johan Hovold commit 3337bf41e0dd70b4064cdf60acdfcdc2d050066c Author: Desnes A. Nunes do Rosario Date: Fri Jun 26 13:47:37 2020 -0300 selftests/powerpc: Purge extra count_pmc() calls of ebb selftests An extra count on ebb_state.stats.pmc_count[PMC_INDEX(pmc)] is being per- formed when count_pmc() is used to reset PMCs on a few selftests. This extra pmc_count can occasionally invalidate results, such as the ones from cycles_test shown hereafter. The ebb_check_count() failed with an above the upper limit error due to the extra value on ebb_state.stats.pmc_count. Furthermore, this extra count is also indicated by extra PMC1 trace_log on the output of the cycle test (as well as on pmc56_overflow_test): ========== ... [21]: counter = 8 [22]: register SPRN_MMCR0 = 0x0000000080000080 [23]: register SPRN_PMC1 = 0x0000000080000004 [24]: counter = 9 [25]: register SPRN_MMCR0 = 0x0000000080000080 [26]: register SPRN_PMC1 = 0x0000000080000004 [27]: counter = 10 [28]: register SPRN_MMCR0 = 0x0000000080000080 [29]: register SPRN_PMC1 = 0x0000000080000004 >> [30]: register SPRN_PMC1 = 0x000000004000051e PMC1 count (0x280000546) above upper limit 0x2800003e8 (+0x15e) [FAIL] Test FAILED on line 52 failure: cycles ========== Signed-off-by: Desnes A. Nunes do Rosario Tested-by: Sachin Sant Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200626164737.21943-1-desnesn@linux.ibm.com commit 9459fd5945f66d9d2b85824fea4ce57723e04ab8 Author: Michał Winiarski Date: Wed Jul 8 12:08:43 2020 +0200 drm/i915/huc: Adjust HuC state accordingly after GuC fetch error Firmware "Selected" state is a transient state - we don't expect to see it after finishing driver probe, we even have asserts sprinkled over i915 to confirm whether that's the case. Unfortunately - we don't handle the transition out of "Selected" in case of GuC fetch error, leading those asserts to fire when calling "intel_huc_is_used()". v2: Add dbg print when moving HuC into error state (Daniele) Reported-by: Marcin Bernatowicz Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Daniele Ceraolo Spurio Cc: Marcin Bernatowicz Cc: Michal Wajdeczko Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708100843.297655-2-michal@hardline.pl commit 7f67deeb7f42030cee03348d43a2743f001b5a3d Author: Michał Winiarski Date: Wed Jul 8 12:08:42 2020 +0200 drm/i915/uc: Extract uc usage details into separate debugfs It has been pointed out that information about HuC usage doesn't belong in guc_info debugfs. Let's move "supported/used/wanted" matrix to a separate debugfs file, keeping guc_info strictly about GuC. Suggested-by: Daniele Ceraolo Spurio Signed-off-by: Michał Winiarski Cc: Daniele Ceraolo Spurio Cc: Lukasz Fiedorowicz Cc: Michal Wajdeczko Reviewed-by: Daniele Ceraolo Spurio Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200708100843.297655-1-michal@hardline.pl commit 51b64c476a5ddc66d3459f14e98e5de9211e9e24 Author: Miao-chen Chou Date: Tue Jul 7 15:52:28 2020 -0700 Bluetooth: Use whitelist for scan policy when suspending Even with one advertisement monitor in place, the scan policy should use the whitelist while the system is going to suspend to prevent waking by random advertisement. The following test was performed. - With a paired device, register one advertisement monitor, suspend the system and verify that the host was not awaken by random advertisements. Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 82c8d38699009697f3136f5347d0903befdce810 Author: Rikard Falkeborn Date: Mon Jun 29 21:57:27 2020 +0200 phy: allwinner: phy-sun6i-mipi-dphy: Constify structs sun6i_dphy_ops and sun6i_dphy_regmap_config are not modified so make them const structs to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 4407 1944 64 6415 190f drivers/phy/allwinner/phy-sun6i-mipi-dphy.o After: text data bss dec hex filename 4835 1496 64 6395 18fb drivers/phy/allwinner/phy-sun6i-mipi-dphy.o Signed-off-by: Rikard Falkeborn Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200629195727.9717-1-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit 3cc4502ce8f37b4f8a75bfc4eb6d99a74ce018e1 Author: Vinod Koul Date: Mon Jun 29 20:20:10 2020 +0530 phy: ti-pipe3: remove set but unused variable ti_pipe3_power_on() sets variable 'ret' but never uses it, so remove it. drivers/phy/ti/phy-ti-pipe3.c:340:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200629145010.122675-4-vkoul@kernel.org Signed-off-by: Vinod Koul commit 3b0163bb34f15695feb0b87365bed3eba8f9804d Author: Vinod Koul Date: Mon Jun 29 20:20:09 2020 +0530 phy: ti: dm816x: remove set but unused variable dm816x_usb_phy_init() sets variable 'error' but never uses it, so remove it. drivers/phy/ti/phy-dm816x-usb.c:85:6: warning: variable ‘error’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200629145010.122675-3-vkoul@kernel.org Signed-off-by: Vinod Koul commit aad075c155bcc4265e62e1f6fecab7db186d9572 Author: Vinod Koul Date: Mon Jun 29 20:20:08 2020 +0530 phy: core: Document function args Some function arguments are missing from documentation prompting validation kernel doc script to complain: drivers/phy/phy-core.c:1078: warning: Function parameter or member 'children' not described in '__devm_of_phy_provider_register' drivers/phy/phy-core.c:1125: warning: Function parameter or member 'phy_provider' not described in 'devm_of_phy_provider_unregister' Add the documentation for these Link: https://lore.kernel.org/r/20200629145010.122675-2-vkoul@kernel.org Signed-off-by: Vinod Koul commit b555f35f2f87f8a99ba8e65d3f51ae4294748b58 Author: Vinod Koul Date: Mon Jun 29 20:20:07 2020 +0530 phy: core: fix code style in devm_of_phy_provider_unregister Documentation/process/coding-style.rst says: "functions: they have the opening brace at the beginning of the next line" devm_of_phy_provider_unregister() function has opening brace at same line, so fix it up. Link: https://lore.kernel.org/r/20200629145010.122675-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit 02dca8c981b552ad4caaa2e858800c78cc20f41c Author: Vinod Koul Date: Mon Jun 29 20:24:52 2020 +0530 phy: qcom: remove ufs qmp phy driver The UFS specific QMP PHY driver started off supporting the 14nm and 20nm hardware. With the 20nm support marked broken for a long time and the 14nm support added to the common QMP PHY, this driver has not been used in a while. So delete it Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200629145452.123035-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit 31cf2c3b6f47a90ac0f96899da891a6d710e832b Merge: 9fb9b7715e5e0 5cc2013bfeee7 Author: Mark Brown Date: Wed Jul 8 11:20:59 2020 +0100 Merge branch 'topic/devnode' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into regmap-5.9 commit 5cc2013bfeee756a1ee6da9bfbe42e52b4695035 Author: Michael Walle Date: Mon Jul 6 19:53:41 2020 +0200 regmap-irq: use fwnode instead of device node in add_irq_chip() Convert the argument to the newer fwnode_handle instead a device tree node. Fortunately, there are no users for now. So this is an easy change. Signed-off-by: Michael Walle Link: https://lore.kernel.org/r/20200706175353.16404-2-michael@walle.cc Signed-off-by: Mark Brown commit 018532e940557d606d849139d515b4cfbc221f09 Author: Ramalingam C Date: Wed Apr 29 19:15:55 2020 +0530 drm/i915/hdcp: Fix the return handling of drm_hdcp_check_ksvs_revoked drm_hdcp_check_ksvs_revoked() returns the number of revoked keys and error codes when the SRM parsing is failed. Errors in SRM parsing can't affect the HDCP auth, hence with this patch, I915 will look out for revoked key count alone. Signed-off-by: Ramalingam C cc: Sean Paul Reviewed-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200429134555.22106-1-ramalingam.c@intel.com commit ebd267b2e3c25d5f93a08528b47c036569eb8744 Author: Marek Vasut Date: Sat Feb 29 23:16:49 2020 +0100 drm/stm: repair runtime power management Add missing pm_runtime_get_sync() into ltdc_crtc_atomic_enable() to match pm_runtime_put_sync() in ltdc_crtc_atomic_disable(), otherwise the LTDC might suspend via runtime PM, disable clock, and then fail to resume later on. The test which triggers it is roughly -- run qt5 application which uses eglfs platform and etnaviv, stop the application, sleep for 15 minutes, run the application again. This leads to a timeout waiting for vsync, because the LTDC has suspended, but did not resume. Fixes: 35ab6cfbf211 ("drm/stm: support runtime power management") Signed-off-by: Marek Vasut Cc: Yannick Fertré Cc: Philippe Cornu Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: Maxime Coquelin Cc: Alexandre Torgue To: dri-devel@lists.freedesktop.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Acked-by: Philippe Cornu Tested-by: Yannick Fertre Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20200229221649.90813-1-marex@denx.de commit a790ababbe6872a373faf51e77bc640d7e50ace2 Author: Yannick Fertre Date: Wed Jul 1 14:04:02 2020 +0200 drm/stm: ltdc: remove call of pm-runtime functions It is not necessary to suspend or stop the ltdc clocks to modify the pixel clock. Signed-off-by: Yannick Fertre Acked-by: Philippe Cornu Signed-off-by: Benjamin Gaignard Link: https://patchwork.freedesktop.org/patch/msgid/20200701120402.6444-1-yannick.fertre@st.com commit 33f9a623bfc6bed3b9586f68cb4a9ea332589791 Author: Anshuman Gupta Date: Tue Jun 30 13:50:48 2020 +0530 drm/i915/hdcp: Update CP as per the kernel internal state Content Protection property should be updated as per the kernel internal state. Let's say if Content protection is disabled by userspace, CP property should be set to UNDESIRED so that reauthentication will not happen until userspace request it again, but when kernel disables the HDCP due to any DDI disabling sequences like modeset/DPMS operation, kernel should set the property to DESIRED, so that when opportunity arises, kernel will start the HDCP authentication on its own. Somewhere in the line, state machine to set content protection to DESIRED from kernel was broken and IGT coverage was missing for it. This patch fixes it. v2: - Fixing hdcp CP state in connector atomic check function intel_hdcp_atomic_check(). [Maarten] This will require to check hdcp->value in intel_hdcp_update_pipe() in order to avoid enabling hdcp, if it was already enabled. v3: - Rebased. Cc: Ramalingam C Cc: Maarten Lankhorst Reviewed-by: Uma Shankar Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/350962/?series=72664&rev=2 #v1 Link: https://patchwork.freedesktop.org/patch/359396/?series=72251&rev=3 #v2 Reviewed-by: Ramalingam C Signed-off-by: Ramalingam C Link: https://patchwork.freedesktop.org/patch/msgid/20200630082048.22308-1-anshuman.gupta@intel.com commit 9d246053a69196c7c27068870e9b4b66ac536f68 Author: Phil Auld Date: Mon Jun 29 15:23:03 2020 -0400 sched: Add a tracepoint to track rq->nr_running Add a bare tracepoint trace_sched_update_nr_running_tp which tracks ->nr_running CPU's rq. This is used to accurately trace this data and provide a visualization of scheduler imbalances in, for example, the form of a heat map. The tracepoint is accessed by loading an external kernel module. An example module (forked from Qais' module and including the pelt related tracepoints) can be found at: https://github.com/auldp/tracepoints-helpers.git A script to turn the trace-cmd report output into a heatmap plot can be found at: https://github.com/jirvoz/plot-nr-running The tracepoints are added to add_nr_running() and sub_nr_running() which are in kernel/sched/sched.h. In order to avoid CREATE_TRACE_POINTS in the header a wrapper call is used and the trace/events/sched.h include is moved before sched.h in kernel/sched/core. Signed-off-by: Phil Auld Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200629192303.GC120228@lorien.usersys.redhat.com commit 07bbecb3410617816a99e76a2df7576507a0c8ad Author: Alex Belits Date: Thu Jun 25 18:34:43 2020 -0400 net: Restrict receive packets queuing to housekeeping CPUs With the existing implementation of store_rps_map(), packets are queued in the receive path on the backlog queues of other CPUs irrespective of whether they are isolated or not. This could add a latency overhead to any RT workload that is running on the same CPU. Ensure that store_rps_map() only uses available housekeeping CPUs for storing the rps_map. Signed-off-by: Alex Belits Signed-off-by: Nitesh Narayan Lal Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200625223443.2684-4-nitesh@redhat.com commit 69a18b18699b59654333651d95f8ca09d01048f8 Author: Alex Belits Date: Thu Jun 25 18:34:42 2020 -0400 PCI: Restrict probe functions to housekeeping CPUs pci_call_probe() prevents the nesting of work_on_cpu() for a scenario where a VF device is probed from work_on_cpu() of the PF. Replace the cpumask used in pci_call_probe() from all online CPUs to only housekeeping CPUs. This is to ensure that there are no additional latency overheads caused due to the pinning of jobs on isolated CPUs. Signed-off-by: Alex Belits Signed-off-by: Nitesh Narayan Lal Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Frederic Weisbecker Acked-by: Bjorn Helgaas Link: https://lkml.kernel.org/r/20200625223443.2684-3-nitesh@redhat.com commit 1abdfe706a579a702799fce465bceb9fb01d407c Author: Alex Belits Date: Thu Jun 25 18:34:41 2020 -0400 lib: Restrict cpumask_local_spread to houskeeping CPUs The current implementation of cpumask_local_spread() does not respect the isolated CPUs, i.e., even if a CPU has been isolated for Real-Time task, it will return it to the caller for pinning of its IRQ threads. Having these unwanted IRQ threads on an isolated CPU adds up to a latency overhead. Restrict the CPUs that are returned for spreading IRQs only to the available housekeeping CPUs. Signed-off-by: Alex Belits Signed-off-by: Nitesh Narayan Lal Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200625223443.2684-2-nitesh@redhat.com commit 46609ce227039fd192e0ecc7d940bed587fd2c78 Author: Qais Yousef Date: Tue Jun 30 12:21:23 2020 +0100 sched/uclamp: Protect uclamp fast path code with static key There is a report that when uclamp is enabled, a netperf UDP test regresses compared to a kernel compiled without uclamp. https://lore.kernel.org/lkml/20200529100806.GA3070@suse.de/ While investigating the root cause, there were no sign that the uclamp code is doing anything particularly expensive but could suffer from bad cache behavior under certain circumstances that are yet to be understood. https://lore.kernel.org/lkml/20200616110824.dgkkbyapn3io6wik@e107158-lin/ To reduce the pressure on the fast path anyway, add a static key that is by default will skip executing uclamp logic in the enqueue/dequeue_task() fast path until it's needed. As soon as the user start using util clamp by: 1. Changing uclamp value of a task with sched_setattr() 2. Modifying the default sysctl_sched_util_clamp_{min, max} 3. Modifying the default cpu.uclamp.{min, max} value in cgroup We flip the static key now that the user has opted to use util clamp. Effectively re-introducing uclamp logic in the enqueue/dequeue_task() fast path. It stays on from that point forward until the next reboot. This should help minimize the effect of util clamp on workloads that don't need it but still allow distros to ship their kernels with uclamp compiled in by default. SCHED_WARN_ON() in uclamp_rq_dec_id() was removed since now we can end up with unbalanced call to uclamp_rq_dec_id() if we flip the key while a task is running in the rq. Since we know it is harmless we just quietly return if we attempt a uclamp_rq_dec_id() when rq->uclamp[].bucket[].tasks is 0. In schedutil, we introduce a new uclamp_is_enabled() helper which takes the static key into account to ensure RT boosting behavior is retained. The following results demonstrates how this helps on 2 Sockets Xeon E5 2x10-Cores system. nouclamp uclamp uclamp-static-key Hmean send-64 162.43 ( 0.00%) 157.84 * -2.82%* 163.39 * 0.59%* Hmean send-128 324.71 ( 0.00%) 314.78 * -3.06%* 326.18 * 0.45%* Hmean send-256 641.55 ( 0.00%) 628.67 * -2.01%* 648.12 * 1.02%* Hmean send-1024 2525.28 ( 0.00%) 2448.26 * -3.05%* 2543.73 * 0.73%* Hmean send-2048 4836.14 ( 0.00%) 4712.08 * -2.57%* 4867.69 * 0.65%* Hmean send-3312 7540.83 ( 0.00%) 7425.45 * -1.53%* 7621.06 * 1.06%* Hmean send-4096 9124.53 ( 0.00%) 8948.82 * -1.93%* 9276.25 * 1.66%* Hmean send-8192 15589.67 ( 0.00%) 15486.35 * -0.66%* 15819.98 * 1.48%* Hmean send-16384 26386.47 ( 0.00%) 25752.25 * -2.40%* 26773.74 * 1.47%* The perf diff between nouclamp and uclamp-static-key when uclamp is disabled in the fast path: 8.73% -1.55% [kernel.kallsyms] [k] try_to_wake_up 0.07% +0.04% [kernel.kallsyms] [k] deactivate_task 0.13% -0.02% [kernel.kallsyms] [k] activate_task The diff between nouclamp and uclamp-static-key when uclamp is enabled in the fast path: 8.73% -0.72% [kernel.kallsyms] [k] try_to_wake_up 0.13% +0.39% [kernel.kallsyms] [k] activate_task 0.07% +0.38% [kernel.kallsyms] [k] deactivate_task Fixes: 69842cba9ace ("sched/uclamp: Add CPU's clamp buckets refcounting") Reported-by: Mel Gorman Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Tested-by: Lukasz Luba Link: https://lkml.kernel.org/r/20200630112123.12076-3-qais.yousef@arm.com commit d81ae8aac85ca2e307d273f6dc7863a721bf054e Author: Qais Yousef Date: Tue Jun 30 12:21:22 2020 +0100 sched/uclamp: Fix initialization of struct uclamp_rq struct uclamp_rq was zeroed out entirely in assumption that in the first call to uclamp_rq_inc() they'd be initialized correctly in accordance to default settings. But when next patch introduces a static key to skip uclamp_rq_{inc,dec}() until userspace opts in to use uclamp, schedutil will fail to perform any frequency changes because the rq->uclamp[UCLAMP_MAX].value is zeroed at init and stays as such. Which means all rqs are capped to 0 by default. Fix it by making sure we do proper initialization at init without relying on uclamp_rq_inc() doing it later. Fixes: 69842cba9ace ("sched/uclamp: Add CPU's clamp buckets refcounting") Signed-off-by: Qais Yousef Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Tested-by: Lukasz Luba Link: https://lkml.kernel.org/r/20200630112123.12076-2-qais.yousef@arm.com commit 85c2ce9104eb93517db2037699471c517e81f9b4 Author: Peter Zijlstra Date: Tue Jun 30 16:49:05 2020 +0200 sched, vmlinux.lds: Increase STRUCT_ALIGNMENT to 64 bytes for GCC-4.9 For some mysterious reason GCC-4.9 has a 64 byte section alignment for structures, all other GCC versions (and Clang) tested (including 4.8 and 5.0) are fine with the 32 bytes alignment. Getting this right is important for the new SCHED_DATA macro that creates an explicitly ordered array of 'struct sched_class' in the linker script and expect pointer arithmetic to work. Fixes: c3a340f7e7ea ("sched: Have sched_class_highest define by vmlinux.lds.h") Reported-by: kernel test robot Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200630144905.GX4817@hirez.programming.kicks-ass.net commit faa2fd7cbad4609d06d7904c0a80cf2f8cd23678 Merge: 01e377c539ca5 ce3614daabea8 Author: Peter Zijlstra Date: Wed Jul 8 11:38:59 2020 +0200 Merge branch 'sched/urgent' commit c085fb8774671e83f6199a8e838fbc0e57094029 Author: Kan Liang Date: Fri Jul 3 05:49:29 2020 -0700 perf/x86/intel/lbr: Support XSAVES for arch LBR read Reading LBR registers in a perf NMI handler for a non-PEBS event causes a high overhead because the number of LBR registers is huge. To reduce the overhead, the XSAVES instruction should be used to replace the LBR registers' reading method. The XSAVES buffer used for LBR read has to be per-CPU because the NMI handler invoked the lbr_read(). The existing task_ctx_data buffer cannot be used which is per-task and only be allocated for the LBR call stack mode. A new lbr_xsave pointer is introduced in the cpu_hw_events as an XSAVES buffer for LBR read. The XSAVES buffer should be allocated only when LBR is used by a non-PEBS event on the CPU because the total size of the lbr_xsave is not small (~1.4KB). The XSAVES buffer is allocated when a non-PEBS event is added, but it is lazily released in x86_release_hardware() when perf releases the entire PMU hardware resource, because perf may frequently schedule the event, e.g. high context switch. The lazy release method reduces the overhead of frequently allocate/free the buffer. If the lbr_xsave fails to be allocated, roll back to normal Arch LBR lbr_read(). Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dave Hansen Link: https://lkml.kernel.org/r/1593780569-62993-24-git-send-email-kan.liang@linux.intel.com commit ce711ea3cab9ad325d849792d442848e553095b8 Author: Kan Liang Date: Fri Jul 3 05:49:28 2020 -0700 perf/x86/intel/lbr: Support XSAVES/XRSTORS for LBR context switch In the LBR call stack mode, LBR information is used to reconstruct a call stack. To get the complete call stack, perf has to save/restore all LBR registers during a context switch. Due to a large number of the LBR registers, this process causes a high CPU overhead. To reduce the CPU overhead during a context switch, use the XSAVES/XRSTORS instructions. Every XSAVE area must follow a canonical format: the legacy region, an XSAVE header and the extended region. Although the LBR information is only kept in the extended region, a space for the legacy region and XSAVE header is still required. Add a new dedicated structure for LBR XSAVES support. Before enabling XSAVES support, the size of the LBR state has to be sanity checked, because: - the size of the software structure is calculated from the max number of the LBR depth, which is enumerated by the CPUID leaf for Arch LBR. The size of the LBR state is enumerated by the CPUID leaf for XSAVE support of Arch LBR. If the values from the two CPUID leaves are not consistent, it may trigger a buffer overflow. For example, a hypervisor may unconsciously set inconsistent values for the two emulated CPUID. - unlike other state components, the size of an LBR state depends on the max number of LBRs, which may vary from generation to generation. Expose the function xfeature_size() for the sanity check. The LBR XSAVES support will be disabled if the size of the LBR state enumerated by CPUID doesn't match with the size of the software structure. The XSAVE instruction requires 64-byte alignment for state buffers. A new macro is added to reflect the alignment requirement. A 64-byte aligned kmem_cache is created for architecture LBR. Currently, the structure for each state component is maintained in fpu/types.h. The structure for the new LBR state component should be maintained in the same place. Move structure lbr_entry to fpu/types.h as well for broader sharing. Add dedicated lbr_save/lbr_restore functions for LBR XSAVES support, which invokes the corresponding xstate helpers to XSAVES/XRSTORS LBR information at the context switch when the call stack mode is enabled. Since the XSAVES/XRSTORS instructions will be eventually invoked, the dedicated functions is named with '_xsaves'/'_xrstors' postfix. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dave Hansen Link: https://lkml.kernel.org/r/1593780569-62993-23-git-send-email-kan.liang@linux.intel.com commit 50f408d96d4d1a945d2c50c5fd8ed400883edf0e Author: Kan Liang Date: Fri Jul 3 05:49:27 2020 -0700 x86/fpu/xstate: Add helpers for LBR dynamic supervisor feature The perf subsystem will only need to save/restore the LBR state. However, the existing helpers save all supported supervisor states to a kernel buffer, which will be unnecessary. Two helpers are introduced to only save/restore requested dynamic supervisor states. The supervisor features in XFEATURE_MASK_SUPERVISOR_SUPPORTED and XFEATURE_MASK_SUPERVISOR_UNSUPPORTED mask cannot be saved/restored using these helpers. The helpers will be used in the following patch. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dave Hansen Link: https://lkml.kernel.org/r/1593780569-62993-22-git-send-email-kan.liang@linux.intel.com commit f0dccc9da4c0fda049e99326f85db8c242fd781f Author: Kan Liang Date: Fri Jul 3 05:49:26 2020 -0700 x86/fpu/xstate: Support dynamic supervisor feature for LBR Last Branch Records (LBR) registers are used to log taken branches and other control flows. In perf with call stack mode, LBR information is used to reconstruct a call stack. To get the complete call stack, perf has to save/restore all LBR registers during a context switch. Due to the large number of the LBR registers, e.g., the current platform has 96 LBR registers, this process causes a high CPU overhead. To reduce the CPU overhead during a context switch, an LBR state component that contains all the LBR related registers is introduced in hardware. All LBR registers can be saved/restored together using one XSAVES/XRSTORS instruction. However, the kernel should not save/restore the LBR state component at each context switch, like other state components, because of the following unique features of LBR: - The LBR state component only contains valuable information when LBR is enabled in the perf subsystem, but for most of the time, LBR is disabled. - The size of the LBR state component is huge. For the current platform, it's 808 bytes. If the kernel saves/restores the LBR state at each context switch, for most of the time, it is just a waste of space and cycles. To efficiently support the LBR state component, it is desired to have: - only context-switch the LBR when the LBR feature is enabled in perf. - only allocate an LBR-specific XSAVE buffer on demand. (Besides the LBR state, a legacy region and an XSAVE header have to be included in the buffer as well. There is a total of (808+576) byte overhead for the LBR-specific XSAVE buffer. The overhead only happens when the perf is actively using LBRs. There is still a space-saving, on average, when it replaces the constant 808 bytes of overhead for every task, all the time on the systems that support architectural LBR.) - be able to use XSAVES/XRSTORS for accessing LBR at run time. However, the IA32_XSS should not be adjusted at run time. (The XCR0 | IA32_XSS are used to determine the requested-feature bitmap (RFBM) of XSAVES.) A solution, called dynamic supervisor feature, is introduced to address this issue, which - does not allocate a buffer in each task->fpu; - does not save/restore a state component at each context switch; - sets the bit corresponding to the dynamic supervisor feature in IA32_XSS at boot time, and avoids setting it at run time. - dynamically allocates a specific buffer for a state component on demand, e.g. only allocates LBR-specific XSAVE buffer when LBR is enabled in perf. (Note: The buffer has to include the LBR state component, a legacy region and a XSAVE header space.) (Implemented in a later patch) - saves/restores a state component on demand, e.g. manually invokes the XSAVES/XRSTORS instruction to save/restore the LBR state to/from the buffer when perf is active and a call stack is required. (Implemented in a later patch) A new mask XFEATURE_MASK_DYNAMIC and a helper xfeatures_mask_dynamic() are introduced to indicate the dynamic supervisor feature. For the systems which support the Architecture LBR, LBR is the only dynamic supervisor feature for now. For the previous systems, there is no dynamic supervisor feature available. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dave Hansen Link: https://lkml.kernel.org/r/1593780569-62993-21-git-send-email-kan.liang@linux.intel.com commit a063bf249b9f8d8004f282031781322c1b527d13 Author: Kan Liang Date: Fri Jul 3 05:49:25 2020 -0700 x86/fpu: Use proper mask to replace full instruction mask When saving xstate to a kernel/user XSAVE area with the XSAVE family of instructions, the current code applies the 'full' instruction mask (-1), which tries to XSAVE all possible features. This method relies on hardware to trim 'all possible' down to what is enabled in the hardware. The code works well for now. However, there will be a problem, if some features are enabled in hardware, but are not suitable to be saved into all kernel XSAVE buffers, like task->fpu, due to performance consideration. One such example is the Last Branch Records (LBR) state. The LBR state only contains valuable information when LBR is explicitly enabled by the perf subsystem, and the size of an LBR state is large (808 bytes for now). To avoid both CPU overhead and space overhead at each context switch, the LBR state should not be saved into task->fpu like other state components. It should be saved/restored on demand when LBR is enabled in the perf subsystem. Current copy_xregs_to_* will trigger a buffer overflow for such cases. Three sites use the '-1' instruction mask which must be updated. Two are saving/restoring the xstate to/from a kernel-allocated XSAVE buffer and can use 'xfeatures_mask_all', which will save/restore all of the features present in a normal task FPU buffer. The last one saves the register state directly to a user buffer. It could also use 'xfeatures_mask_all'. Just as it was with the '-1' argument, any supervisor states in the mask will be filtered out by the hardware and not saved to the buffer. But, to be more explicit about what is expected to be saved, use xfeatures_mask_user() for the instruction mask. KVM includes the header file fpu/internal.h. To avoid 'undefined xfeatures_mask_all' compiling issue, move copy_fpregs_to_fpstate() to fpu/core.c and export it, because: - The xfeatures_mask_all is indirectly used via copy_fpregs_to_fpstate() by KVM. The function which is directly used by other modules should be exported. - The copy_fpregs_to_fpstate() is a function, while xfeatures_mask_all is a variable for the "internal" FPU state. It's safer to export a function than a variable, which may be implicitly changed by others. - The copy_fpregs_to_fpstate() is a big function with many checks. The removal of the inline keyword should not impact the performance. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dave Hansen Link: https://lkml.kernel.org/r/1593780569-62993-20-git-send-email-kan.liang@linux.intel.com commit 5a09928d339f3cf0973991ddc3a2798825c84c99 Author: Kan Liang Date: Fri Jul 3 05:49:24 2020 -0700 perf/x86: Remove task_ctx_size A new kmem_cache method has replaced the kzalloc() to allocate the PMU specific data. The task_ctx_size is not required anymore. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-19-git-send-email-kan.liang@linux.intel.com commit 33cad284497cf40f55ad6029c06011de3538ebed Author: Kan Liang Date: Fri Jul 3 05:49:23 2020 -0700 perf/x86/intel/lbr: Create kmem_cache for the LBR context data A new kmem_cache method is introduced to allocate the PMU specific data task_ctx_data, which requires the PMU specific code to create a kmem_cache. Currently, the task_ctx_data is only used by the Intel LBR call stack feature, which is introduced since Haswell. The kmem_cache should be only created for Haswell and later platforms. There is no alignment requirement for the existing platforms. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-18-git-send-email-kan.liang@linux.intel.com commit 217c2a633ebb36f1cc6d249f4ef2e4a809d46818 Author: Kan Liang Date: Fri Jul 3 05:49:22 2020 -0700 perf/core: Use kmem_cache to allocate the PMU specific data Currently, the PMU specific data task_ctx_data is allocated by the function kzalloc() in the perf generic code. When there is no specific alignment requirement for the task_ctx_data, the method works well for now. However, there will be a problem once a specific alignment requirement is introduced in future features, e.g., the Architecture LBR XSAVE feature requires 64-byte alignment. If the specific alignment requirement is not fulfilled, the XSAVE family of instructions will fail to save/restore the xstate to/from the task_ctx_data. The function kzalloc() itself only guarantees a natural alignment. A new method to allocate the task_ctx_data has to be introduced, which has to meet the requirements as below: - must be a generic method can be used by different architectures, because the allocation of the task_ctx_data is implemented in the perf generic code; - must be an alignment-guarantee method (The alignment requirement is not changed after the boot); - must be able to allocate/free a buffer (smaller than a page size) dynamically; - should not cause extra CPU overhead or space overhead. Several options were considered as below: - One option is to allocate a larger buffer for task_ctx_data. E.g., ptr = kmalloc(size + alignment, GFP_KERNEL); ptr &= ~(alignment - 1); This option causes space overhead. - Another option is to allocate the task_ctx_data in the PMU specific code. To do so, several function pointers have to be added. As a result, both the generic structure and the PMU specific structure will become bigger. Besides, extra function calls are added when allocating/freeing the buffer. This option will increase both the space overhead and CPU overhead. - The third option is to use a kmem_cache to allocate a buffer for the task_ctx_data. The kmem_cache can be created with a specific alignment requirement by the PMU at boot time. A new pointer for kmem_cache has to be added in the generic struct pmu, which would be used to dynamically allocate a buffer for the task_ctx_data at run time. Although the new pointer is added to the struct pmu, the existing variable task_ctx_size is not required anymore. The size of the generic structure is kept the same. The third option which meets all the aforementioned requirements is used to replace kzalloc() for the PMU specific data allocation. A later patch will remove the kzalloc() method and the related variables. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-17-git-send-email-kan.liang@linux.intel.com commit ff9ff926889dd8026b4ba55266a010c27f68604f Author: Kan Liang Date: Fri Jul 3 05:49:21 2020 -0700 perf/core: Factor out functions to allocate/free the task_ctx_data The method to allocate/free the task_ctx_data is going to be changed in the following patch. Currently, the task_ctx_data is allocated/freed in several different places. To avoid repeatedly modifying the same codes in several different places, alloc_task_ctx_data() and free_task_ctx_data() are factored out to allocate/free the task_ctx_data. The modification only needs to be applied once. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-16-git-send-email-kan.liang@linux.intel.com commit 47125db27e47e9d44c878bf8925aa057824bb0d5 Author: Kan Liang Date: Fri Jul 3 05:49:20 2020 -0700 perf/x86/intel/lbr: Support Architectural LBR Last Branch Records (LBR) enables recording of software path history by logging taken branches and other control flows within architectural registers now. Intel CPUs have had model-specific LBR for quite some time, but this evolves them into an architectural feature now. The main improvements of Architectural LBR implemented includes: - Linux kernel can support the LBR features without knowing the model number of the current CPU. - Architectural LBR capabilities can be enumerated by CPUID. The lbr_ctl_map is based on the CPUID Enumeration. - The possible LBR depth can be retrieved from CPUID enumeration. The max value is written to the new MSR_ARCH_LBR_DEPTH as the number of LBR entries. - A new IA32_LBR_CTL MSR is introduced to enable and configure LBRs, which replaces the IA32_DEBUGCTL[bit 0] and the LBR_SELECT MSR. - Each LBR record or entry is still comprised of three MSRs, IA32_LBR_x_FROM_IP, IA32_LBR_x_TO_IP and IA32_LBR_x_TO_IP. But they become the architectural MSRs. - Architectural LBR is stack-like now. Entry 0 is always the youngest branch, entry 1 the next youngest... The TOS MSR has been removed. The way to enable/disable Architectural LBR is similar to the previous model-specific LBR. __intel_pmu_lbr_enable/disable() can be reused, but some modifications are required, which include: - MSR_ARCH_LBR_CTL is used to enable and configure the Architectural LBR. - When checking the value of the IA32_DEBUGCTL MSR, ignoring the DEBUGCTLMSR_LBR (bit 0) for Architectural LBR, which has no meaning and always return 0. - The FREEZE_LBRS_ON_PMI has to be explicitly set/clear, because MSR_IA32_DEBUGCTLMSR is not touched in __intel_pmu_lbr_disable() for Architectural LBR. - Only MSR_ARCH_LBR_CTL is cleared in __intel_pmu_lbr_disable() for Architectural LBR. Some Architectural LBR dedicated functions are implemented to reset/read/save/restore LBR. - For reset, writing to the ARCH_LBR_DEPTH MSR clears all Arch LBR entries, which is a lot faster and can improve the context switch latency. - For read, the branch type information can be retrieved from the MSR_ARCH_LBR_INFO_*. But it's not fully compatible due to OTHER_BRANCH type. The software decoding is still required for the OTHER_BRANCH case. LBR records are stored in the age order as well. Reuse intel_pmu_store_lbr(). Check the CPUID enumeration before accessing the corresponding bits in LBR_INFO. - For save/restore, applying the fast reset (writing ARCH_LBR_DEPTH). Reading 'lbr_from' of entry 0 instead of the TOS MSR to check if the LBR registers are reset in the deep C-state. If 'the deep C-state reset' bit is not set in CPUID enumeration, ignoring the check. XSAVE support for Architectural LBR will be implemented later. The number of LBR entries cannot be hardcoded anymore, which should be retrieved from CPUID enumeration. A new structure x86_perf_task_context_arch_lbr is introduced for Architectural LBR. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-15-git-send-email-kan.liang@linux.intel.com commit 631618a0dca31dc23dcce38cf345c6139bd8a1e9 Author: Kan Liang Date: Fri Jul 3 05:49:19 2020 -0700 perf/x86/intel/lbr: Factor out intel_pmu_store_lbr The way to store the LBR information from a PEBS LBR record can be reused in Architecture LBR, because - The LBR information is stored like a stack. Entry 0 is always the youngest branch. - The layout of the LBR INFO MSR is similar. The LBR information may be retrieved from either the LBR registers (non-PEBS event) or a buffer (PEBS event). Extend rdlbr_*() to support both methods. Explicitly check the invalid entry (0s), which can avoid unnecessary MSR access if using a non-PEBS event. For a PEBS event, the check should slightly improve the performance as well. The invalid entries are cut. The intel_pmu_lbr_filter() doesn't need to check and filter them out. Cannot share the function with current model-specific LBR read, because the direction of the LBR growth is opposite. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-14-git-send-email-kan.liang@linux.intel.com commit fda1f99f34a8f0975086bcfef34da865009995c1 Author: Kan Liang Date: Fri Jul 3 05:49:18 2020 -0700 perf/x86/intel/lbr: Factor out rdlbr_all() and wrlbr_all() The previous model-specific LBR and Architecture LBR (legacy way) use a similar method to save/restore the LBR information, which directly accesses the LBR registers. The codes which read/write a set of LBR registers can be shared between them. Factor out two functions which are used to read/write a set of LBR registers. Add lbr_info into structure x86_pmu, and use it to replace the hardcoded LBR INFO MSR, because the LBR INFO MSR address of the previous model-specific LBR is different from Architecture LBR. The MSR address should be assigned at boot time. For now, only Sky Lake and later platforms have the LBR INFO MSR. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-13-git-send-email-kan.liang@linux.intel.com commit 020d91e5f32da4f4b929b3a6e680135fd526107c Author: Kan Liang Date: Fri Jul 3 05:49:17 2020 -0700 perf/x86/intel/lbr: Mark the {rd,wr}lbr_{to,from} wrappers __always_inline The {rd,wr}lbr_{to,from} wrappers are invoked in hot paths, e.g. context switch and NMI handler. They should be always inline to achieve better performance. However, the CONFIG_OPTIMIZE_INLINING allows the compiler to uninline functions marked 'inline'. Mark the {rd,wr}lbr_{to,from} wrappers as __always_inline to force inline the wrappers. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-12-git-send-email-kan.liang@linux.intel.com commit 5624986dc61b81a77fb6136bc232593483d1c254 Author: Kan Liang Date: Fri Jul 3 05:49:16 2020 -0700 perf/x86/intel/lbr: Unify the stored format of LBR information Current LBR information in the structure x86_perf_task_context is stored in a different format from the PEBS LBR record and Architecture LBR, which prevents the sharing of the common codes. Use the format of the PEBS LBR record as a unified format. Use a generic name lbr_entry to replace pebs_lbr_entry. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-11-git-send-email-kan.liang@linux.intel.com commit 49d8184f2036ff5b8d1eea3d61bac8b23420eca7 Author: Kan Liang Date: Fri Jul 3 05:49:15 2020 -0700 perf/x86/intel/lbr: Support LBR_CTL An IA32_LBR_CTL is introduced for Architecture LBR to enable and config LBR registers to replace the previous LBR_SELECT. All the related members in struct cpu_hw_events and struct x86_pmu have to be renamed. Some new macros are added to reflect the layout of LBR_CTL. The mapping from PERF_SAMPLE_BRANCH_* to the corresponding bits in LBR_CTL MSR is saved in lbr_ctl_map now, which is not a const value. The value relies on the CPUID enumeration. For the previous model-specific LBR, most of the bits in LBR_SELECT operate in the suppressed mode. For the bits in LBR_CTL, the polarity is inverted. For the previous model-specific LBR format 5 (LBR_FORMAT_INFO), if the NO_CYCLES and NO_FLAGS type are set, the flag LBR_NO_INFO will be set to avoid the unnecessary LBR_INFO MSR read. Although Architecture LBR also has a dedicated LBR_INFO MSR, perf doesn't need to check and set the flag LBR_NO_INFO. For Architecture LBR, XSAVES instruction will be used as the default way to read the LBR MSRs all together. The overhead which the flag tries to avoid doesn't exist anymore. Dropping the flag can save the extra check for the flag in the lbr_read() later, and make the code cleaner. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-10-git-send-email-kan.liang@linux.intel.com commit af6cf129706b2f79e12f97e62d977e7f653cdfd1 Author: Kan Liang Date: Fri Jul 3 05:49:14 2020 -0700 perf/x86: Expose CPUID enumeration bits for arch LBR The LBR capabilities of Architecture LBR are retrieved from the CPUID enumeration once at boot time. The capabilities have to be saved for future usage. Several new fields are added into structure x86_pmu to indicate the capabilities. The fields will be used in the following patches. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-9-git-send-email-kan.liang@linux.intel.com commit d6a162a41bfd2ff9ea4cbb338d3df6a3f9b7e89f Author: Kan Liang Date: Fri Jul 3 05:49:13 2020 -0700 x86/msr-index: Add bunch of MSRs for Arch LBR Add Arch LBR related MSRs and the new LBR INFO bits in MSR-index. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-8-git-send-email-kan.liang@linux.intel.com commit f42be8651a7a9d5cb165e5d176fc0b09621b4f4d Author: Kan Liang Date: Fri Jul 3 05:49:12 2020 -0700 perf/x86/intel/lbr: Use dynamic data structure for task_ctx The type of task_ctx is hardcoded as struct x86_perf_task_context, which doesn't apply for Architecture LBR. For example, Architecture LBR doesn't have the TOS MSR. The number of LBR entries is variable. A new struct will be introduced for Architecture LBR. Perf has to determine the type of task_ctx at run time. The type of task_ctx pointer is changed to 'void *', which will be determined at run time. The generic LBR optimization can be shared between Architecture LBR and model-specific LBR. Both need to access the structure for the generic LBR optimization. A helper task_context_opt() is introduced to retrieve the pointer of the structure at run time. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-7-git-send-email-kan.liang@linux.intel.com commit 530bfff6480307d210734222a54d56af7f908957 Author: Kan Liang Date: Fri Jul 3 05:49:11 2020 -0700 perf/x86/intel/lbr: Factor out a new struct for generic optimization To reduce the overhead of a context switch with LBR enabled, some generic optimizations were introduced, e.g. avoiding restore LBR if no one else touched them. The generic optimizations can also be used by Architecture LBR later. Currently, the fields for the generic optimizations are part of structure x86_perf_task_context, which will be deprecated by Architecture LBR. A new structure should be introduced for the common fields of generic optimization, which can be shared between Architecture LBR and model-specific LBR. Both 'valid_lbrs' and 'tos' are also used by the generic optimizations, but they are not moved into the new structure, because Architecture LBR is stack-like. The 'valid_lbrs' which records the index of the valid LBR is not required anymore. The TOS MSR will be removed. LBR registers may be cleared in the deep Cstate. If so, the generic optimizations should not be applied. Perf has to unconditionally restore the LBR registers. A generic function is required to detect the reset due to the deep Cstate. lbr_is_reset_in_cstate() is introduced. Currently, for the model-specific LBR, the TOS MSR is used to detect the reset. There will be another method introduced for Architecture LBR later. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-6-git-send-email-kan.liang@linux.intel.com commit 799571bf38fc2b4b744fa448184b5915739b10fd Author: Kan Liang Date: Fri Jul 3 05:49:10 2020 -0700 perf/x86/intel/lbr: Add the function pointers for LBR save and restore The MSRs of Architectural LBR are different from previous model-specific LBR. Perf has to implement different functions to save and restore them. The function pointers for LBR save and restore are introduced. Perf should initialize the corresponding functions at boot time. The generic optimizations, e.g. avoiding restore LBR if no one else touched them, still apply for Architectural LBRs. The related codes are not moved to model-specific functions. Current model-specific LBR functions are set as default. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-5-git-send-email-kan.liang@linux.intel.com commit c301b1d80ed5b806834fe0f739f028f65fb4fb16 Author: Kan Liang Date: Fri Jul 3 05:49:09 2020 -0700 perf/x86/intel/lbr: Add a function pointer for LBR read The method to read Architectural LBRs is different from previous model-specific LBR. Perf has to implement a different function. A function pointer for LBR read is introduced. Perf should initialize the corresponding function at boot time, and avoid checking lbr_format at run time. The current 64-bit LBR read function is set as default. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-4-git-send-email-kan.liang@linux.intel.com commit 9f354a726cb1d4eb00a0784a27eaa0a3283cff71 Author: Kan Liang Date: Fri Jul 3 05:49:08 2020 -0700 perf/x86/intel/lbr: Add a function pointer for LBR reset The method to reset Architectural LBRs is different from previous model-specific LBR. Perf has to implement a different function. A function pointer is introduced for LBR reset. The enum of LBR_FORMAT_* is also moved to perf_event.h. Perf should initialize the corresponding functions at boot time, and avoid checking lbr_format at run time. The current 64-bit LBR reset function is set as default. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1593780569-62993-3-git-send-email-kan.liang@linux.intel.com commit bd657aa3dd8514e62486ce7f90b5e484c18d684d Author: Kan Liang Date: Fri Jul 3 05:49:07 2020 -0700 x86/cpufeatures: Add Architectural LBRs feature bit CPUID.(EAX=07H, ECX=0):EDX[19] indicates whether an Intel CPU supports Architectural LBRs. The "X86_FEATURE_..., word 18" is already mirrored from CPUID "0x00000007:0 (EDX)". Add X86_FEATURE_ARCH_LBR under the "word 18" section. The feature will appear as "arch_lbr" in /proc/cpuinfo. The Architectural Last Branch Records (LBR) feature enables recording of software path history by logging taken branches and other control flows. The feature will be supported in the perf_events subsystem. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dave Hansen Link: https://lkml.kernel.org/r/1593780569-62993-2-git-send-email-kan.liang@linux.intel.com commit 520010668a26952ed6f4130b5385a3f4df970a6a Author: Wei Yongjun Date: Fri Jul 3 11:57:36 2020 +0800 MIPS: Loongson64: Make acpi_registers_setup() static sparse report build warning as follows: drivers/platform/mips/rs780e-acpi.c:72:6: warning: symbol 'acpi_registers_setup' was not declared. Should it be static? And function acpi_registers_setup() is not used outside of this file, so marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Thomas Bogendoerfer commit 994334933efd396d0727500c87da1a81b17232d6 Author: Huacai Chen Date: Mon Jul 6 18:22:23 2020 +0800 MIPS: Loongson: Update dts file for RS780E The size of ioports in the current RS780E dts file is not enough, which sometimes causes device initialize fail. So we increase the size of ISA/ LPC ioports to 0x4000, and increase the size of PCI ioports to 0x8000. Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit eef36f0ecd0dcd6ca646c7b3ac301fa18ff21085 Author: Huacai Chen Date: Mon Jun 15 14:04:17 2020 +0800 dt-bindings: mips: Document two Loongson boards Document loongson64c-4core-ls7a and loongson64g-4core-ls7a, two boards with LS7A PCH. Signed-off-by: Huacai Chen Signed-off-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit f8523d0e83613ab8d082cd504dc53a09fbba4889 Author: Huacai Chen Date: Mon Jun 15 14:04:16 2020 +0800 MIPS: Loongson: Rename CPU device-tree binding Loongson-3A R1/R2/R3 and Loongson-3B R1/R2 use the same package naming in dts, and Loongson-3A R4 will be different. In cpu.h the classic 64bit Loongson processors are called Loongson64C (C for classic, pre Loongson- 3A R4), and the new 64bit Loongson processors are called Loongson64G (G for generic, Loongson-3A R4+). To keep consistency and make extensible, we rename the classic "loongson3" prefix to "loongson64c", and the new prefix for Loongson-3A R4+ will be "loongson64g". Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 925a567542c52db771c3659b4477bec03f15ea6b Author: Huacai Chen Date: Mon Jul 6 18:21:56 2020 +0800 MIPS: Loongson64: Adjust IRQ layout Adjust IRQ layout in order to use IRQ resources more efficiently, which is done by adjusting NR_IRQS and MIPS_CPU_IRQ_BASE. Before this patch: 0~15: ISA/LPC IRQs; 16~55: Dynamic IRQs; 56~63: MIPS CPU IRQs; 64~127: PCH IRQs; 128~255: Dynamic IRQs. After this patch: 0~15: ISA/LPC IRQs; 16~23: MIPS CPU IRQs; 24~87: PCH IRQs; 88~280: Dynamic IRQs. Signed-off-by: Huacai Chen Signed-off-by: Thomas Bogendoerfer commit 04ef32aff23911006db97d3814290097327a2160 Author: Huacai Chen Date: Wed Jun 17 20:34:42 2020 +0800 MIPS: Unify naming style of vendor CP0.Config6 bits Other vendor-defined registers use the vendor name as a prefix, not an infix, so unify the naming style of CP0.Config6 bits. Suggested-by: Maciej W. Rozycki" Signed-off-by: Huacai Chen Reviewed-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit 55d9ad97e417cc2604654913e902d26f942bde00 Author: Christian Brauner Date: Mon Jul 6 17:49:12 2020 +0200 tests: add CLONE_NEWTIME setns tests Now that pidfds support CLONE_NEWTIME as well enable testing them in the setns() testuite. Signed-off-by: Christian Brauner Cc: Serge Hallyn Cc: Michael Kerrisk Cc: Dmitry Safonov Cc: Andrei Vagin Link: https://lore.kernel.org/r/20200706154912.3248030-5-christian.brauner@ubuntu.com commit 76c12881a38aaa83e1eb4ce2fada36c3a732bad4 Author: Christian Brauner Date: Mon Jul 6 17:49:11 2020 +0200 nsproxy: support CLONE_NEWTIME with setns() So far setns() was missing time namespace support. This was partially due to it simply not being implemented but also because vdso_join_timens() could still fail which made switching to multiple namespaces atomically problematic. This is now fixed so support CLONE_NEWTIME with setns() Signed-off-by: Christian Brauner Reviewed-by: Andrei Vagin Cc: Thomas Gleixner Cc: Michael Kerrisk Cc: Serge Hallyn Cc: Dmitry Safonov Link: https://lore.kernel.org/r/20200706154912.3248030-4-christian.brauner@ubuntu.com commit 5cfea9a106bbb1af919ab94456fdd02209984070 Author: Christian Brauner Date: Mon Jul 6 17:49:10 2020 +0200 timens: add timens_commit() helper Wrap the calls to timens_set_vvar_page() and vdso_join_timens() in timens_on_fork() and timens_install() in a new timens_commit() helper. We'll use this helper in a follow-up patch in nsproxy too. Signed-off-by: Christian Brauner Reviewed-by: Andrei Vagin Cc: Will Deacon Cc: Vincenzo Frascino Cc: Thomas Gleixner Cc: Catalin Marinas Cc: Mark Rutland Cc: Dmitry Safonov Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20200706154912.3248030-3-christian.brauner@ubuntu.com commit 42815808f1791eb53c3a05fb78c0a8642ecf8467 Author: Christian Brauner Date: Mon Jul 6 17:49:09 2020 +0200 timens: make vdso_join_timens() always succeed As discussed on-list (cf. [1]), in order to make setns() support time namespaces when attaching to multiple namespaces at once properly we need to tweak vdso_join_timens() to always succeed. So switch vdso_join_timens() to using a read lock and replacing mmap_write_lock_killable() to mmap_read_lock() as we discussed. Last cycle setns() was changed to support attaching to multiple namespaces atomically. This requires all namespaces to have a point of no return where they can't fail anymore. Specifically, _install() is allowed to perform permission checks and install the namespace into the new struct nsset that it has been given but it is not allowed to make visible changes to the affected task. Once _install() returns anything that the given namespace type requires to be setup in addition needs to ideally be done in a function that can't fail or if it fails the failure is not fatal. For time namespaces the relevant functions that fall into this category are timens_set_vvar_page() and vdso_join_timens(). Currently the latter can fail but doesn't need to. With this we can go on to implement a timens_commit() helper in a follow up patch to be used by setns(). [1]: https://lore.kernel.org/lkml/20200611110221.pgd3r5qkjrjmfqa2@wittgenstein Signed-off-by: Christian Brauner Reviewed-by: Andrei Vagin Cc: Will Deacon Cc: Vincenzo Frascino Cc: Thomas Gleixner Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Mark Rutland Cc: Dmitry Safonov Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20200706154912.3248030-2-christian.brauner@ubuntu.com commit a6175e894d88025f0aa0a2cbccdf4fe74c113b65 Merge: ec75039d55500 a7a9ad232f02e Author: Linus Walleij Date: Wed Jul 8 09:24:37 2020 +0200 Merge branch 'lee-fixes' into devel commit a7a9ad232f02e6aa659cc9b58b72b1a30dccd1a6 Author: Lee Jones Date: Tue Jun 30 14:33:45 2020 +0100 gpio: gpio-mlxbf2.c: Provide __releases() annotation to stop confusing Sparse Sparse cannot peer into other functions to see when and if locks are acquired and released, thus it simply warns that a 'context imbalance' is detected instead. Let's be kind to Sparse and let it know that this behaviour is intentional. drivers/gpio/gpio-mlxbf2.c:125:12: warning: context imbalance in 'mlxbf2_gpio_lock_acquire' - different lock contexts for basic block drivers/gpio/gpio-mlxbf2.c:151:13: warning: context imbalance in 'mlxbf2_gpio_lock_release' - unexpected unlock Signed-off-by: Lee Jones Reviewed-by: Asmaa Mnebhi Cc: Asmaa Mnebhi Link: https://lore.kernel.org/r/20200630133345.2232932-11-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 2f9bce5f38684cd10533ac41d8dd395a611cc8c5 Author: Lee Jones Date: Tue Jun 30 14:33:44 2020 +0100 gpio: gpio-mlxbf2: Tell the compiler that ACPI functions may not be use ... as is the case when !CONFIG_ACPI. Fixes the following W=1 kernel build warning: drivers/gpio/gpio-mlxbf2.c:312:36: warning: ‘mlxbf2_gpio_acpi_match’ defined but not used [-Wunused-const-variable=] 312 | static const struct acpi_device_id mlxbf2_gpio_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Reviewed-by: Asmaa Mnebhi Cc: Asmaa Mnebhi Link: https://lore.kernel.org/r/20200630133345.2232932-10-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 6ac2de953bb317c4dc2edaa56e025724fd159165 Author: Lee Jones Date: Tue Jun 30 14:33:43 2020 +0100 gpio: gpio-mlxbf: Tell the compiler that ACPI functions may not be used ... as is the case when !CONFIG_ACPI. Fixes the following W=1 kernel build warning: drivers/gpio/gpio-mlxbf.c:130:36: warning: ‘mlxbf_gpio_acpi_match’ defined but not used [-Wunused-const-variable=] 130 | static const struct acpi_device_id mlxbf_gpio_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Cc: Shravan Kumar Ramani Link: https://lore.kernel.org/r/20200630133345.2232932-9-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 4e2912901ec1ff0ef7aa8d4334e0ad476792f764 Author: Lee Jones Date: Tue Jun 30 14:33:42 2020 +0100 gpio: gpio-it87: Fix formatting issues which confuse kerneldoc Kerneldoc expects struct properties to be documented using the syntax '@.*: ', but no ':' has been provided in 'struct it87_gpio's header. Add them to stop confusing kerneldoc. Fixes the following W=1 warnings: drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'chip' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'lock' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'io_base' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'io_size' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'output_base' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'simple_base' not described in 'it87_gpio' drivers/gpio/gpio-it87.c:69: warning: Function parameter or member 'simple_size' not described in 'it87_gpio' Signed-off-by: Lee Jones Cc: "Diego Elio Pettenò" Link: https://lore.kernel.org/r/20200630133345.2232932-8-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 5f3beb67b5d1c5f9906dfdf3af77e8992ca177be Author: Lee Jones Date: Tue Jun 30 14:33:41 2020 +0100 gpio: gpio-syscon: Fix formatting issues which confuse kerneldoc Kerneldoc expects struct properties to be documented using the syntax '@.*: ', but no '@' has been provided in 'struct syscon_gpio_data's header. Add them to stop confusing kerneldoc. Fixes the following W=1 warnings: drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'compatible' not described in 'syscon_gpio_data' drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'flags' not described in 'syscon_gpio_data' drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'bit_count' not described in 'syscon_gpio_data' drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'dat_bit_offset' not described in 'syscon_gpio_data' drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'dir_bit_offset' not described in 'syscon_gpio_data' drivers/gpio/gpio-syscon.c:48: warning: Function parameter or member 'set' not described in 'syscon_gpio_data' Signed-off-by: Lee Jones Cc: Alexander Shiyan Link: https://lore.kernel.org/r/20200630133345.2232932-7-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 392a58469894f8fe26874f66f1e064c20a9b91ee Author: Lee Jones Date: Tue Jun 30 14:33:40 2020 +0100 gpio: gpio-sama5d2-piobu: Demote all kerneldoc headers to basic comment blocks No attempt has been made to provide proper descriptions for each of the function arguments throughout the file. Simply demote all kerneldoc headers to basic function headers. Fixes the following W=1 kernel build warnings: drivers/gpio/gpio-sama5d2-piobu.c:59: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_setup_pin' drivers/gpio/gpio-sama5d2-piobu.c:59: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_setup_pin' drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_write_value' drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_write_value' drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'mask' not described in 'sama5d2_piobu_write_value' drivers/gpio/gpio-sama5d2-piobu.c:81: warning: Function parameter or member 'value' not described in 'sama5d2_piobu_write_value' drivers/gpio/gpio-sama5d2-piobu.c:97: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_read_value' drivers/gpio/gpio-sama5d2-piobu.c:97: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_read_value' drivers/gpio/gpio-sama5d2-piobu.c:97: warning: Function parameter or member 'mask' not described in 'sama5d2_piobu_read_value' drivers/gpio/gpio-sama5d2-piobu.c:116: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_get_direction' drivers/gpio/gpio-sama5d2-piobu.c:116: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_get_direction' drivers/gpio/gpio-sama5d2-piobu.c:131: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_direction_input' drivers/gpio/gpio-sama5d2-piobu.c:131: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_direction_input' drivers/gpio/gpio-sama5d2-piobu.c:140: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_direction_output' drivers/gpio/gpio-sama5d2-piobu.c:140: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_direction_output' drivers/gpio/gpio-sama5d2-piobu.c:140: warning: Function parameter or member 'value' not described in 'sama5d2_piobu_direction_output' drivers/gpio/gpio-sama5d2-piobu.c:154: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_get' drivers/gpio/gpio-sama5d2-piobu.c:154: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_get' drivers/gpio/gpio-sama5d2-piobu.c:174: warning: Function parameter or member 'chip' not described in 'sama5d2_piobu_set' drivers/gpio/gpio-sama5d2-piobu.c:174: warning: Function parameter or member 'pin' not described in 'sama5d2_piobu_set' drivers/gpio/gpio-sama5d2-piobu.c:174: warning: Function parameter or member 'value' not described in 'sama5d2_piobu_set' Signed-off-by: Lee Jones Acked-by: Ludovic Desroches Cc: Ludovic Desroches Cc: Andrei Stefanescu Link: https://lore.kernel.org/r/20200630133345.2232932-6-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 3cd7f770fe8e230274e011198bf290a25dfaa570 Author: Lee Jones Date: Tue Jun 30 14:33:39 2020 +0100 gpio: gpio-pmic-eic-sprd: Fix incorrectly named property 'map' A good attempt has been made to properly document 'struct sprd_pmic_eic', but 'map' has been incorrectly described as 'regmap' since the driver's inception in 2018. Fixes the following W=1 kernel build warning: drivers/gpio/gpio-pmic-eic-sprd.c:65: warning: Function parameter or member 'map' not described in 'sprd_pmic_eic' Signed-off-by: Lee Jones Reviewed-by: Baolin Wang Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Link: https://lore.kernel.org/r/20200630133345.2232932-5-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 670647d7c418b4c4a4effc7eab80729310a97f0a Author: Lee Jones Date: Tue Jun 30 14:33:37 2020 +0100 gpio: gpio-altera: Add missing kerneldoc entry and demote comment 'struct altera_gpio_chip's 'irq_chip' property is undocumented. So add property description to the struct's kerneldoc header. Also demote comment block which is clearly not in kerneldoc format. Fixes the following W=1 warnings: drivers/gpio/gpio-altera.c:34: warning: Function parameter or member 'irq_chip' not described in 'altera_gpio_chip' drivers/gpio/gpio-altera.c:78: warning: Function parameter or member 'd' not described in 'altera_gpio_irq_set_type' drivers/gpio/gpio-altera.c:78: warning: Function parameter or member 'type' not described in 'altera_gpio_irq_set_type' Signed-off-by: Lee Jones Cc: Joyce Ooi Cc: Tien Hock Loh Link: https://lore.kernel.org/r/20200630133345.2232932-3-lee.jones@linaro.org Signed-off-by: Linus Walleij commit c5a66b970aacd14639524c5b0c05a8491127d333 Author: Lee Jones Date: Tue Jun 30 14:33:36 2020 +0100 gpio: gpiolib-of: Provide documentation for of_gpio_spi_cs_get_count() Descriptions for of_gpio_spi_cs_get_count()'s 2 arguments are missing. Document both 'dev' and 'con_id'. Fixes the following W=1 kernel build warnings: drivers/gpio/gpiolib-of.c:36: warning: Function parameter or member 'dev' not described in 'of_gpio_spi_cs_get_count' drivers/gpio/gpiolib-of.c:36: warning: Function parameter or member 'con_id' not described in 'of_gpio_spi_cs_get_count' Signed-off-by: Lee Jones Cc: Anton Vorontsov Link: https://lore.kernel.org/r/20200630133345.2232932-2-lee.jones@linaro.org Signed-off-by: Linus Walleij commit ec03370e6d8a64ef01e9318229d7076048b0d23c Author: Pierre-Louis Bossart Date: Tue Jul 7 13:49:24 2020 -0500 ALSA: usb/line6: remove 'defined but not used' warning Fix W=1 warning. Variables are declared in a header file included from multiple C files, replace by #defines as suggested by Takashi sound/usb/line6/driver.h:70:18: warning: ‘SYSEX_EXTRA_SIZE’ defined but not used [-Wunused-const-variable=] 70 | static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4; | ^~~~~~~~~~~~~~~~ sound/usb/line6/driver.h:69:18: warning: ‘SYSEX_DATA_OFS’ defined but not used [-Wunused-const-variable=] 69 | static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3; | ^~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200707184924.96291-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit b53293fa662e28ae0cdd40828dc641c09f133405 Author: Varun Prakash Date: Wed Jul 1 22:17:12 2020 +0530 scsi: target: cxgbit: Remove tx flow control code Firmware does tx flow control so remove tx flow control code from the driver. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit f178842224b39e5979dac3a54a124d8f4c845bc0 Author: Varun Prakash Date: Wed Jul 1 22:16:10 2020 +0530 scsi: target: cxgbit: Check connection state before issuing hardware command Current code does not check connection state before issuing header/data digest offload and DDP page size setup hardware command. Add a connection state check to issue hardware command only if connection is in established state. Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit e33c2482289b0deebb4fdc566ca69583892e74af Author: Varun Prakash Date: Mon Jun 29 22:11:11 2020 +0530 scsi: cxgb4i: Add support for iSCSI segmentation offload T5/T6 adapters support iSCSI segmentation offload. To transmit iSCSI PDUs using ISO driver provides iSCSI header and data scatterlist to the adapter, adapter forms multiple iSCSI PDUs and transmits them. [mkp: checkpatch] Link: https://lore.kernel.org/r/1593448871-2972-1-git-send-email-varun@chelsio.com Signed-off-by: Varun Prakash Signed-off-by: Martin K. Petersen commit 0a76566595bfb242a7f4bedc77233e9194831ba3 Author: Andres Beltran Date: Mon Jul 6 12:09:28 2020 -0400 scsi: storvsc: Add validation for untrusted Hyper-V values For additional robustness in the face of Hyper-V errors or malicious behavior, validate all values that originate from packets that Hyper-V has sent to the guest. Ensure that invalid values cannot cause data being copied out of the bounds of the source buffer when calling memcpy. Ensure that outgoing packets do not have any leftover guest memory that has not been zeroed out. Link: https://lore.kernel.org/r/20200706160928.53049-1-lkmlabelt@gmail.com Cc: James E.J. Bottomley Cc: Martin K. Petersen Cc: linux-scsi@vger.kernel.org Reviewed-by: Michael Kelley Signed-off-by: Andres Beltran Signed-off-by: Martin K. Petersen commit 3010dfb0b77cc6f413dbfdc01cb1592adcf42873 Author: Randy Dunlap Date: Tue Jul 7 11:04:11 2020 -0700 scsi: advansys: docs: Eliminate duplicated word Drop the doubled word "be". Link: https://lore.kernel.org/r/20200707180414.10467-18-rdunlap@infradead.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Matthew Wilcox Cc: Hannes Reinecke Cc: linux-scsi@vger.kernel.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Signed-off-by: Randy Dunlap Signed-off-by: Martin K. Petersen commit 77dd7d7b344283a3bce334d0f43fc2c0629ffe48 Author: Dick Kennedy Date: Mon Jul 6 13:42:46 2020 -0700 scsi: lpfc: Fix less-than-zero comparison of unsigned value The expression start_idx - dbg_cnt is evaluated using unsigned int arthithmetic (since these variables are unsigned ints) and hence can never be less than zero, so the less than comparison is never true. Rewrite the expression to check for start_idx being less than dbg_cnt. After the logic was corrected, temp_idx wasn't working correctly. So fix it as well. Link: https://lore.kernel.org/r/20200706204246.130416-1-jsmart2021@gmail.com Fixes: 372c187b8a70 ("scsi: lpfc: Add an internal trace log buffer") CC: Colin Ian King Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen Addresses-Coverity: ("Unsigned compared against 0") commit 17105d959b268ce181d877d9ff2ead5b112ce4a4 Author: Dick Kennedy Date: Mon Jul 6 13:42:30 2020 -0700 scsi: lpfc: Fix interrupt assignments when multiple vectors are supported on same CPU With certain platforms its possible pci_alloc_irq_vectors() may affinitize irq vectors to multiple (all?) CPUs. The driver is currently assuming exclusivity and vectors being doled out to different CPUs and is assigning primary ownership of each vector to the first CPU in the mask. The code doesn't bother to check if the CPU already owns a vector and will unconditionally overwrite the CPU to vector mapping. This causes the relationships between eq's and cq's to get confused and gets worse when CPUs start to offline. The net results are interrupts are skipped resulting in mailbox timeouts and there are oopses in CPU offling flows. Fix this changing up the primary vector assignment. Now assign the eq to a CPU only if it is the CPU in the mask that does not have a prior assignment. And once the primary ownership is assigned, break from the loop. For CPUs that may have been set before but not the primary owner, the lpfc_cpu_affinity_check() routine will balance the CPU to eq assignment. Link: https://lore.kernel.org/r/20200706204230.130363-1-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit df043c745ea149d93651210ff6fc9ac19e7a687a Author: Satya Tangirala Date: Mon Jul 6 20:04:14 2020 +0000 scsi: ufs: Add inline encryption support to UFS Wire up ufshcd.c with the UFS Crypto API, the block layer inline encryption additions and the keyslot manager. Many existing inline crypto devices require some additional behaviour not specified in the UFSHCI v2.1 specification - as such the vendor specific drivers will need to be updated where necessary to make it possible to use those devices. Some of these changes have already been proposed upstream, such as for the Qualcomm 845 SoC at https://lkml.kernel.org/linux-scsi/20200501045111.665881-1-ebiggers@kernel.org/ and for ufs-mediatek at https://lkml.kernel.org/linux-scsi/20200304022101.14165-1-stanley.chu@mediatek.com/ This patch has been tested on the db845c, sm8150-mtp and sm8250-mtp (which have Qualcomm chipsets) and on some mediatek chipsets using these aforementioned vendor specific driver updates. Link: https://lore.kernel.org/r/20200706200414.2027450-4-satyat@google.com Reviewed-by: Eric Biggers Reviewed-by: Stanley Chu Reviewed-by: Alim Akhtar Signed-off-by: Satya Tangirala Signed-off-by: Martin K. Petersen commit 70297a8ac7a7a4a3284c2eb20fefefbe72dab338 Author: Satya Tangirala Date: Mon Jul 6 20:04:13 2020 +0000 scsi: ufs: UFS crypto API Introduce functions to manipulate UFS inline encryption hardware in line with the JEDEC UFSHCI v2.1 specification and to work with the block keyslot manager. The UFS crypto API will assume by default that a vendor driver doesn't support UFS crypto, even if the hardware advertises the capability, because a lot of hardware requires some special handling that's not specified in the aforementioned JEDEC spec. Each vendor driver must explicitly set hba->caps |= UFSHCD_CAP_CRYPTO before ufshcd_hba_init_crypto_capabilities() is called to opt-in to UFS crypto support. Link: https://lore.kernel.org/r/20200706200414.2027450-3-satyat@google.com Reviewed-by: Eric Biggers Reviewed-by: Stanley Chu Reviewed-by: Alim Akhtar Signed-off-by: Satya Tangirala Signed-off-by: Martin K. Petersen commit 5e7341e1f9ecaee99d47d1f602c3d728c7fcb956 Author: Satya Tangirala Date: Mon Jul 6 20:04:12 2020 +0000 scsi: ufs: UFS driver v2.1 spec crypto additions Add the crypto registers and structs defined in v2.1 of the JEDEC UFSHCI specification in preparation to add support for inline encryption to UFS. Link: https://lore.kernel.org/r/20200706200414.2027450-2-satyat@google.com Reviewed-by: Eric Biggers Reviewed-by: Stanley Chu Reviewed-by: Alim Akhtar Signed-off-by: Satya Tangirala Signed-off-by: Martin K. Petersen commit 26e0b9aa35784ca1c9e8207ee9a6001c22058fde Author: Colin Ian King Date: Tue Jul 7 16:00:18 2020 +0100 scsi: lpfc: Fix inconsistent indenting Fix smatch warning: drivers/scsi/lpfc/lpfc_sli.c:15156 lpfc_cq_poll_hdler() warn: inconsistent indenting Link: https://lore.kernel.org/r/20200707150018.823350-1-colin.king@canonical.com Reviewed-by: James Smart Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit b1987c884585a65d1c6ffc83647fd3fc676bfa14 Author: Lee Jones Date: Tue Jul 7 15:00:54 2020 +0100 scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters Fixes the following W=1 kernel build warning(s): drivers/scsi/libfc/fc_disc.c:343: warning: Function parameter or member 'disc' not described in 'fc_disc_gpn_ft_req' drivers/scsi/libfc/fc_disc.c:343: warning: Excess function parameter 'lport' description in 'fc_disc_gpn_ft_req' drivers/scsi/libfc/fc_disc.c:380: warning: Function parameter or member 'disc' not described in 'fc_disc_gpn_ft_parse' drivers/scsi/libfc/fc_disc.c:380: warning: Excess function parameter 'lport' description in 'fc_disc_gpn_ft_parse' drivers/scsi/libfc/fc_disc.c:498: warning: Function parameter or member 'disc_arg' not described in 'fc_disc_gpn_ft_resp' drivers/scsi/libfc/fc_disc.c:498: warning: Excess function parameter 'lp_arg' description in 'fc_disc_gpn_ft_resp' Link: https://lore.kernel.org/r/20200707140055.2956235-10-lee.jones@linaro.org Cc: Hannes Reinecke Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 97a33483425d96b7f877d86e0350fd476ec1aeb9 Author: Lee Jones Date: Tue Jul 7 15:00:53 2020 +0100 scsi: pcmcia: nsp_cs: Remove unused variable 'dummy' There is no need to populate an unused variable, even if the read is required. Fixes the following W=1 kernel build warning(s): drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_cs_message’: drivers/scsi/pcmcia/nsp_cs.c:143:2: warning: function ‘nsp_cs_message’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_fifo_count’: drivers/scsi/pcmcia/nsp_cs.c:692:24: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200707140055.2956235-9-lee.jones@linaro.org Cc: YOKOTA Hiroshi Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit af0b55d06004a5dbe8aa81645783b89f4eaccca7 Author: Lee Jones Date: Tue Jul 7 15:00:52 2020 +0100 scsi: pcmcia: nsp_cs: Use new __printf() format notation Fixes the following W=1 kernel build warning(s): drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_cs_message’: drivers/scsi/pcmcia/nsp_cs.c:143:2: warning: function ‘nsp_cs_message’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] drivers/scsi/pcmcia/nsp_cs.c: In function ‘nsp_fifo_count’: drivers/scsi/pcmcia/nsp_cs.c:692:24: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20200707140055.2956235-8-lee.jones@linaro.org Cc: YOKOTA Hiroshi Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3c011793aca71edf8dd40d1201935b51b3acd855 Author: Lee Jones Date: Tue Jul 7 15:00:51 2020 +0100 scsi: aha152x: Remove unused variable 'ret' Looks to be unused since 2014. Fixes the following W=1 kernel build warning(s): drivers/scsi/aha152x.c: In function ‘datai_run’: drivers/scsi/aha152x.c:2033:9: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] 2033 | int data; | ^~~~ Link: https://lore.kernel.org/r/20200707140055.2956235-7-lee.jones@linaro.org Cc: "Juergen E. Fischer" Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 4be1fa2b55a8be8fc6779a556d00d833878132c3 Author: Lee Jones Date: Tue Jul 7 15:00:48 2020 +0100 scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused Not all source files which include 'fdomain.h' make use of 'fdomain_pm_ops' leaving them defined but unused. Mark it as __maybe_unused to tell the compiler this is not only acceptable, but expected. Fixes the following W=1 kernel build warning(s): In file included from drivers/scsi/pcmcia/fdomain_cs.c:16: drivers/scsi/fdomain.h:106:32: warning: ‘fdomain_pm_ops’ defined but not used [-Wunused-const-variable=] 106 | static const struct dev_pm_ops fdomain_pm_ops; | ^~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20200707140055.2956235-4-lee.jones@linaro.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a23064c4123b2422d587f97182798a29f3dd3f2d Author: Bean Huo Date: Mon Jul 6 14:39:36 2020 +0200 scsi: ufs: Change upiu_flags to be u8 According to the UFS Spec, the Flags field in the UPIU is one byte in size, not 4. Change it to be u8. Link: https://lore.kernel.org/r/20200706123936.24799-1-huobean@gmail.com Tested-by: Alim Akhtar Reviewed-by: Alim Akhtar Reviewed-by: Avri Altman Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 9133d27ef104207416db7a97204c0062d27f8b33 Author: Damien Le Moal Date: Mon Jul 6 21:33:58 2020 +0900 scsi: mpt3sas: Fix kdoc comments format Fix kdoc comments format to avoid compiler warnings when compiling with W=1. No functional changes. Link: https://lore.kernel.org/r/20200706123358.452180-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 2eab3eb043ad60184ec49dd2d387ce942a8f6d4d Author: Damien Le Moal Date: Mon Jul 6 21:33:56 2020 +0900 scsi: mpt3sas: Fix set but unused variable In _config_request(), the variable issue_reset is set using the macro mpt3sas_check_cmd_timeout() but otherwise unused, causing a compiler warning when compiling with W=1. Avoid this warning by removing this variable, using the function mpt3sas_base_check_cmd_timeout() directly instead of the mpt3sas_check_cmd_timeout() macro. Link: https://lore.kernel.org/r/20200706123356.452135-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 8df513da056dc1ebea9734a92dba1124acc1c1b9 Author: Damien Le Moal Date: Mon Jul 6 21:33:55 2020 +0900 scsi: sd_zbc: Fix kdoc comment format Fix the kdoc comment of the function sd_zbc_check_capacity() to avoid a compiler warning when compiling with W=1. No functional changes. Link: https://lore.kernel.org/r/20200706123355.452091-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 91e08b35a8a87971b6615b2b0ed432a0bac44acf Author: Damien Le Moal Date: Mon Jul 6 21:33:54 2020 +0900 scsi: sd: Fix kdoc comment format Fix the kdoc comment of the function sd_ioctl_common() to avoid a compiler warning when compiling with W=1. No functional changes. Link: https://lore.kernel.org/r/20200706123354.452047-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit b1a557c23616b3814baea0a79233ef6a5e09fca8 Author: Damien Le Moal Date: Mon Jul 6 21:33:52 2020 +0900 scsi: megaraid: Remove set but unused variable In mega_is_bios_enabled(), the variable ret is set but unused. Remove it to avoid a compiler warning. Link: https://lore.kernel.org/r/20200706123352.452003-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit aa055885ebada98f12b0b394d7a06a5ae0d66e8c Author: Damien Le Moal Date: Mon Jul 6 21:33:51 2020 +0900 scsi: megaraid: Fix set but unused variable In megadev_ioctl(), if MEGA_HAVE_STATS is not defined, the variables num_ldrv and ustats are unused. Conditionally define them to avoid compiler warnings. Link: https://lore.kernel.org/r/20200706123351.451959-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 2a6576d29d3b153b58fbaf2bd0ebc5fce424d73b Author: Damien Le Moal Date: Mon Jul 6 21:33:49 2020 +0900 scsi: megaraid: Remove set but unused variable In mega_build_cmd(), the variable epthru is set but not used. Remove it to avoid a compiler warning. Link: https://lore.kernel.org/r/20200706123349.451915-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 97eec79f6caaa22a49b518f886b7ac2c5a91acd2 Author: Damien Le Moal Date: Mon Jul 6 21:33:48 2020 +0900 scsi: megaraid: Remove set but unused variable The variable remainder is unused in mega_div64_32(). Remove it to avoid a compiler warning. While at it, also fix the function documentation comments. Link: https://lore.kernel.org/r/20200706123348.451871-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 7b3c1035082ce212bc635b85a57ab7e1b1e1afd5 Author: Damien Le Moal Date: Mon Jul 6 21:33:46 2020 +0900 scsi: megaraid: Fix compilation warnings Move function declarations to megaraid_sas.h to avoid warnings such as: warning: no previous prototype for ‘xxx' No functional changes. Link: https://lore.kernel.org/r/20200706123346.451827-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit 2b46e5c14218c7382aa3907fb78453d8e43d359e Author: Damien Le Moal Date: Mon Jul 6 21:33:45 2020 +0900 scsi: megaraid: Fix kdoc comments format Fix kernel documentation comments to avoid various warnings when compiling with W=1. No functional changes. Link: https://lore.kernel.org/r/20200706123345.451783-1-damien.lemoal@wdc.com Signed-off-by: Damien Le Moal Signed-off-by: Martin K. Petersen commit f06b71fe4d4cd0a4ad7e183b777564f696f6bb36 Merge: b3a9e3b9622ae 33c326014fe69 Author: Eric W. Biederman Date: Tue Jul 7 23:48:48 2020 -0500 Make the user mode driver code a better citizen This is the third round of my changeset to split the user mode driver code from the user mode helper code, and to make the code use common facilities to get things done instead of recreating them just for the user mode driver code. I have split the changes into small enough pieces so they should be easily readable and testable. The changes lean into the preexisting interfaces in the kernel and remove special cases for user mode driver code in favor of solutions that don't need special cases. This results in smaller code with fewer bugs. At a practical level this removes the maintenance burden of the user mode drivers from the user mode helper code and from exec as the special cases are removed. Similarly the LSM interaction bugs are fixed by not having unnecessary special cases for user mode drivers. I have tested thes changes by booting with the code compiled in and by killing "bpfilter_umh" and "running iptables -vnL" to restart the userspace driver, also by running "while true; do iptables -L;rmmod bpfilter; done" to verify the module load and unload work properly. I have compiled tested each change with and without CONFIG_BPFILTER enabled. From v2 to v3 I have made two siginficant changes. - I factored thread_group_exit out of pidfd_poll to allow the test to be used by the bpfilter code. - I renamed umd.c and umd.h to usermode_driver.c and usermode_driver.h respectively. I made a few very small changes from v1 to v2: - Updated the function name in a comment when the function is renamed - Moved some more code so that the the !CONFIG_BPFILTER case continues to compile when I moved the code into umd.c - A fix for the module loading case to really flush the file descriptor. - Removed split_argv entirely from fork_usermode_driver. There was nothing to split so it was just confusing. Please let me know if you see any bugs. Once the code review is finished I plan to place the code in a non-rebasing branch so I can pull it into my tree and so it can also be pulled into the bpf-next tree. v1: https://lkml.kernel.org/r/87pn9mgfc2.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87bll17ili.fsf_-_@x220.int.ebiederm.org Eric W. Biederman (16): umh: Capture the pid in umh_pipe_setup umh: Move setting PF_UMH into umh_pipe_setup umh: Rename the user mode driver helpers for clarity umh: Remove call_usermodehelper_setup_file. umh: Separate the user mode driver and the user mode helper support umd: For clarity rename umh_info umd_info umd: Rename umd_info.cmdline umd_info.driver_name umd: Transform fork_usermode_blob into fork_usermode_driver umh: Stop calling do_execve_file exec: Remove do_execve_file bpfilter: Move bpfilter_umh back into init data umd: Track user space drivers with struct pid exit: Factor thread_group_exited out of pidfd_poll bpfilter: Take advantage of the facilities of struct pid umd: Remove exit_umh umd: Stop using split_argv Link: https://lkml.kernel.org/r/87y2o1swee.fsf_-_@x220.int.ebiederm.org Signed-off-by: "Eric W. Biederman" commit 0e5e81114de1c4ac32e36f057256653a04f27a33 Author: Daeho Jeong Date: Thu Jul 2 13:14:14 2020 +0900 f2fs: add GC_URGENT_LOW mode in gc_urgent Added a new gc_urgent mode, GC_URGENT_LOW, in which mode F2FS will lower the bar of checking idle in order to process outstanding discard commands and GC a little bit aggressively. Signed-off-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6b12367da22f1c9d4d0073f8d802f616c735f95b Author: Jaegeuk Kim Date: Mon Jun 22 23:01:05 2020 -0700 f2fs: avoid readahead race condition If two readahead threads having same offset enter in readpages, every read IOs are split and issued to the disk which giving lower bandwidth. This patch tries to avoid redundant readahead calls. Fixes one build error reported by Randy. Fix build error when F2FS_FS_COMPRESSION is not set/enabled. This label is needed in either case. ../fs/f2fs/data.c: In function ‘f2fs_mpage_readpages’: ../fs/f2fs/data.c:2327:5: error: label ‘next_page’ used but not defined goto next_page; Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d7cd3702ca95b1e957493de8f962b47a87b4c6aa Author: Chao Yu Date: Wed Jul 1 10:27:09 2020 +0800 f2fs: fix return value of move_data_block() If f2fs_grab_cache_page() fails, it needs to return -ENOMEM. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b7973091f0b205260fa819f85298f0ae1297cf84 Author: Jia Yang Date: Wed Jul 1 10:27:40 2020 +0800 f2fs: add parameter op_flag in f2fs_submit_page_read() The parameter op_flag is not used in f2fs_get_read_data_page(), but it is used in f2fs_grab_read_bio(). Obviously, op_flag is not passed to f2fs_grab_read_bio() successfully. We need to add parameter in f2fs_submit_page_read() to pass it. The case: - gc_data_segment - f2fs_get_read_data_page(.., op_flag = REQ_RAHEAD,..) - f2fs_submit_page_read - f2fs_grab_read_bio(.., op_flag = 0, ..) Signed-off-by: Jia Yang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 901d745f8e6a61a835b12314d8b8a41df7012596 Author: Chao Yu Date: Mon Jun 22 17:38:48 2020 +0800 f2fs: split f2fs_allocate_new_segments() to two independent functions: - f2fs_allocate_new_segment() for specified type segment allocation - f2fs_allocate_new_segments() for all data type segments allocation Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9039d8355d6e37647b31a42122a26f1858a2470a Author: Yubo Feng Date: Sat Jun 20 16:39:43 2020 +0800 f2fs: lost matching-pair of trace in f2fs_truncate_inode_blocks if get_node_path() return -E2BIG and trace of f2fs_truncate_inode_blocks_enter/exit enabled then the matching-pair of trace_exit will lost in log. Signed-off-by: Yubo Feng Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 29b993c7cd2055ffff65f4ffcaa2fc8a5cb2403e Author: Yu Changchun Date: Sat Jun 20 03:58:29 2020 -0400 f2fs: fix an oops in f2fs_is_compressed_page This patch is to fix a crash: #3 [ffffb6580689f898] oops_end at ffffffffa2835bc2 #4 [ffffb6580689f8b8] no_context at ffffffffa28766e7 #5 [ffffb6580689f920] async_page_fault at ffffffffa320135e [exception RIP: f2fs_is_compressed_page+34] RIP: ffffffffa2ba83a2 RSP: ffffb6580689f9d8 RFLAGS: 00010213 RAX: 0000000000000001 RBX: fffffc0f50b34bc0 RCX: 0000000000002122 RDX: 0000000000002123 RSI: 0000000000000c00 RDI: fffffc0f50b34bc0 RBP: ffff97e815a40178 R8: 0000000000000000 R9: ffff97e83ffc9000 R10: 0000000000032300 R11: 0000000000032380 R12: ffffb6580689fa38 R13: fffffc0f50b34bc0 R14: ffff97e825cbd000 R15: 0000000000000c00 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 #6 [ffffb6580689f9d8] __is_cp_guaranteed at ffffffffa2b7ea98 #7 [ffffb6580689f9f0] f2fs_submit_page_write at ffffffffa2b81a69 #8 [ffffb6580689fa30] f2fs_do_write_meta_page at ffffffffa2b99777 #9 [ffffb6580689fae0] __f2fs_write_meta_page at ffffffffa2b75f1a #10 [ffffb6580689fb18] f2fs_sync_meta_pages at ffffffffa2b77466 #11 [ffffb6580689fc98] do_checkpoint at ffffffffa2b78e46 #12 [ffffb6580689fd88] f2fs_write_checkpoint at ffffffffa2b79c29 #13 [ffffb6580689fdd0] f2fs_sync_fs at ffffffffa2b69d95 #14 [ffffb6580689fe20] sync_filesystem at ffffffffa2ad2574 #15 [ffffb6580689fe30] generic_shutdown_super at ffffffffa2a9b582 #16 [ffffb6580689fe48] kill_block_super at ffffffffa2a9b6d1 #17 [ffffb6580689fe60] kill_f2fs_super at ffffffffa2b6abe1 #18 [ffffb6580689fea0] deactivate_locked_super at ffffffffa2a9afb6 #19 [ffffb6580689feb8] cleanup_mnt at ffffffffa2abcad4 #20 [ffffb6580689fee0] task_work_run at ffffffffa28bca28 #21 [ffffb6580689ff00] exit_to_usermode_loop at ffffffffa28050b7 #22 [ffffb6580689ff38] do_syscall_64 at ffffffffa280560e #23 [ffffb6580689ff50] entry_SYSCALL_64_after_hwframe at ffffffffa320008c This occurred when umount f2fs if enable F2FS_FS_COMPRESSION with F2FS_IO_TRACE. Fixes it by adding IS_IO_TRACED_PAGE to check validity of pid for page_private. Signed-off-by: Yu Changchun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 9a99c17dab8ad89ccf77ced5c7f34d840fda7595 Author: Lihong Kou Date: Sat Jun 20 10:12:17 2020 +0800 f2fs: make trace enter and end in pairs for unlink In the f2fs_unlink we do not add trace end for some error paths, just add. Signed-off-by: Lihong Kou Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit eb1353cfa9c1e9415b03dc117f8399969fa02102 Author: Chao Yu Date: Fri Jun 19 17:14:19 2020 +0800 f2fs: fix to check page dirty status before writeback In f2fs_write_raw_pages(), we need to check page dirty status before writeback, because there could be a racer (e.g. reclaimer) helps writebacking the dirty page. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d078319d069ef437f8f5d840de13f7d939d26c83 Author: Wang Xiaojun Date: Tue Jun 16 10:39:24 2020 +0800 f2fs: remove the unused compr parameter The parameter compr is unused in the f2fs_cluster_blocks function so we no longer need to pass it as a parameter. Signed-off-by: Wang Xiaojun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit dd5a09bd05ae57a5df29dbeea84783081d47bdd1 Author: Chao Yu Date: Mon Jun 29 20:13:13 2020 +0800 f2fs: support to trace f2fs_fiemap() to show f2fs_fiemap()'s result as below: f2fs_fiemap: dev = (251,0), ino = 7, lblock:0, pblock:1625292800, len:2097152, flags:0, ret:0 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b79b0a310bca6dbe86d8adc1ca6a88e818bc1f19 Author: Chao Yu Date: Mon Jun 29 20:13:12 2020 +0800 f2fs: support to trace f2fs_bmap() to show f2fs_bmap()'s result as below: f2fs_bmap: dev = (251,0), ino = 7, lblock:0, pblock:396800 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 250e84d725479914aa6f3feec1191c5f1ea3c057 Author: Chao Yu Date: Sun Jun 28 20:29:38 2020 +0800 f2fs: fix wrong return value of f2fs_bmap_compress() If compression is disable, we should return zero rather than -EOPNOTSUPP to indicate f2fs_bmap() is not supported. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b815bdc7817d5a27410a33475f3401bd47f5854e Author: Liu Song Date: Sun Jun 28 21:48:13 2020 +0800 f2fs: remove useless parameter of __insert_free_nid() In current version, @state will only be FREE_NID. This parameter has no real effect so remove it to keep clean. Signed-off-by: Liu Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e5cc2c5563a4ac47c426e8d5d084d44fbecb68aa Author: Liu Song Date: Thu Jun 25 20:40:11 2020 +0800 f2fs: fix typo in comment of f2fs_do_add_link stakable/stackable Signed-off-by: Liu Song Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a6d601f30d3bae3429c39a4e0fa290e344b7c57f Author: Chao Yu Date: Sun Jun 28 10:58:17 2020 +0800 f2fs: fix to wait page writeback before update Filesystem including f2fs should support stable page for special device like software raid, however there is one missing path that page could be updated while it is writeback state as below, fix this. - gc_node_segment - f2fs_move_node_page - __write_node_page - set_page_writeback - do_read_inode - f2fs_init_extent_tree - __f2fs_init_extent_tree i_ext->len = 0; Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0759e2c151f47b1362b15d544aca903d4ed74f88 Author: Chao Yu Date: Sun Jun 28 10:58:44 2020 +0800 f2fs: show more debug info for per-temperature log - Add to account and show per-log dirty_seg, full_seg and valid_blocks in debugfs. - reformat printed info. TYPE segno secno zoneno dirty_seg full_seg valid_blk - COLD data: 1523 1523 1523 1 0 399 - WARM data: 769 769 769 20 255 133098 - HOT data: 767 767 767 9 0 167 - Dir dnode: 22 22 22 3 0 70 - File dnode: 722 722 722 14 10 6505 - Indir nodes: 2 2 2 1 0 3 Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 97767500781fae9c53b7d227f99f1dbb0dfe9a4f Author: Qilong Zhang Date: Sun Jun 28 19:23:03 2020 +0800 f2fs: add f2fs_gc exception handle in f2fs_ioc_gc_range When f2fs_ioc_gc_range performs multiple segments gc ops, the return value of f2fs_ioc_gc_range is determined by the last segment gc ops. If its ops failed, the f2fs_ioc_gc_range will be considered to be failed despite some of previous segments gc ops succeeded. Therefore, so we fix: Redefine the return value of getting victim ops and add exception handle for f2fs_gc. In particular, 1).if target has no valid block, it will go on. 2).if target sectoion has valid block(s), but it is current section, we will reminder the caller. Signed-off-by: Qilong Zhang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f608c38c59c6020bfde14af88630b8d7817003f9 Author: Chao Yu Date: Thu Jun 18 14:36:24 2020 +0800 f2fs: clean up parameter of f2fs_allocate_data_block() Use validation of @fio to inidcate whether caller want to serialize IOs in io.io_list or not, then @add_list will be redundant, remove it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 79963d967b492876fa17c8c2c2c17b7438683d9b Author: Chao Yu Date: Thu Jun 18 14:36:23 2020 +0800 f2fs: shrink node_write lock coverage - to avoid race between checkpoint and quota file writeback, it just needs to hold read lock of node_write in writeback path. - node_write lock has covered all LFS data write paths, it's not necessary, we only need to hold node_write lock at write path of quota file. This refactors commit ca7f76e68074 ("f2fs: fix wrong discard space"). Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit fa6795552ad20509ffb1cc9ed1246b6b337f5da5 Author: Chao Yu Date: Fri Jun 19 11:20:28 2020 +0800 f2fs: fix to document reserved special compression extension There is one reserved special compression extension: '*', which could be set via 'compress_extension="*"' mount option to enable compression for all files. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0ef818335f734bbb4bb26b0eaab2c27aa6e5d2c2 Author: Chao Yu Date: Thu Jun 18 14:36:22 2020 +0800 f2fs: add prefix for exported symbols to avoid polluting global symbol namespace. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c3bfffa5ec6901f758160edfb046bdc56d89e8d2 Author: Julian Wiedmann Date: Fri Jul 3 15:20:03 2020 +0200 scsi: zfcp: Avoid benign overflow of the Request Queue's free-level zfcp_qdio_send() and zfcp_qdio_int_req() run concurrently, adding and completing SBALs on the Request Queue. There's a theoretical race where zfcp_qdio_int_req() completes a number of SBALs & increments the queue's free-level _before_ zfcp_qdio_send() was able to decrement it. This can cause ->req_q_free to momentarily hold a value larger than QDIO_MAX_BUFFERS_PER_Q. Luckily zfcp_qdio_send() is always called under ->req_q_lock, and all readers of the free-level also take this lock. So we can trust that zfcp_qdio_send() will clean up such a temporary overflow before anyone can actually observe it. But it's still confusing and annoying to worry about. So adjust the code to avoid this race. Link: https://lore.kernel.org/r/7f61f59a1f8db270312e64644f9173b8f1ac895f.1593780621.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 6bcb7c171a0ce0b0114aa088404e552b49d85576 Author: Julian Wiedmann Date: Fri Jul 3 15:20:02 2020 +0200 scsi: zfcp: Replace open-coded list move Instead of manually moving each element of the unit and port lists into our temporary on-stack lists, splice them over in one go. Link: https://lore.kernel.org/r/cacb179f49ece50fd4dce119c61252d632cdc1d4.1593780621.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit b43cdb5ac856d9e004d31494c2c41fa36f67c00d Author: Julian Wiedmann Date: Fri Jul 3 15:20:01 2020 +0200 scsi: zfcp: Clean up zfcp_erp_action_ready() We already maintain a pointer to act->adapter. Use it consistently to avoid any confusion about whose ->erp_ready_head and ->erp_ready_wq we are accessing. Link: https://lore.kernel.org/r/d1bb04322f240dee32f4c4a551bc93bc736f4b01.1593780621.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit c06de6e28c9efe7c8369eacf02095fb54bf240ba Author: Benjamin Block Date: Fri Jul 3 15:20:00 2020 +0200 scsi: docs: Remove invalid link and update text for zfcp kernel config IBM decided to retire a lot of the content that was previously hosted on "developerworks", and so some of the links we've used for documentation are now dead or redirect to some general landing page with no correlation to what the links were meant to provide. Change the provided link in the Kconfig file for zfcp to rather refer to our device drivers book that we regularly update and publish for free, and whose name hasn't been changed since it was first published. Our hardware is also not called "IBM eServer zSeries" anymore - in fact, it hasn't been called like that since 2006. Use a broader term that covers different server names over time. Lastly, add a short paragraph about how our HBAs are typically named, to have some more tangible references. Link: https://lore.kernel.org/r/96069b9f4c4f056a515b37e89b2bdfccc282e3d3.1593780621.git.bblock@linux.ibm.com Reviewed-by: Julian Wiedmann Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit b9789bfbfe9d58152b2d57c17adac5f92852eb4e Author: Benjamin Block Date: Fri Jul 3 15:19:59 2020 +0200 scsi: docs: Update outdated link to IBM developerworks IBM decided to retire a lot of the content that was previously hosted on "developerworks", and so some of the links we've used for documentation are now dead or redirect to some general landing page with no correlation to what the links were meant to provide. The s390-tools package is meanwhile also hosted on github, so we can link to the script directly instead of to the archive. Link: https://lore.kernel.org/r/9ab0341d6ddca46cfc885e4cd9dc38f535969b02.1593780621.git.bblock@linux.ibm.com Reviewed-by: Julian Wiedmann Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 459ad085d87b2468905fee231a77d961b5088e48 Author: Julian Wiedmann Date: Fri Jul 3 15:19:58 2020 +0200 scsi: zfcp: Fix an outdated comment for zfcp_qdio_send() zfcp no longer uses the qdio PCI flag, update the comment. Link: https://lore.kernel.org/r/6717c26fc986bff8776d110e27c199b523684c63.1593780621.git.bblock@linux.ibm.com Fixes: 21ddaa53f92d ("[SCSI] zfcp: Remove PCI flag") Reviewed-by: Steffen Maier Reviewed-by: Fedor Loshakov Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 0cd0e57ec858edda580fb90b53df5269216b61b2 Author: George Spelvin Date: Fri Jul 3 15:19:57 2020 +0200 scsi: zfcp: Use prandom_u32_max() for backoff We don't need crypto-grade random numbers for randomized backoffs. Instead use prandom_u32_max(ep_ro) which generates a pseudo-random number uniformly distributed in the interval [0, ep_ro). Link: https://lore.kernel.org/r/8fc7c4c4069ff1783f4a9ccd84a923f581a09ec5.1593780621.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier Signed-off-by: George Spelvin Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 919a295abf968cec6ffd3c629241b2e626cf0f5d Author: Bob Liu Date: Fri Jul 3 13:16:03 2020 +0800 scsi: iscsi: Register sysfs for workqueue iscsi_destroy Register sysfs for workqueue iscsi_destroy so that users can set CPU affinity through "cpumask" for this workqueue to get better isolation in cloud multi-tenant scenario. This patch unfolded create_singlethread_workqueue(), added WQ_SYSFS and drop __WQ_ORDERED_EXPLICIT since __WQ_ORDERED_EXPLICIT workqueue isn't allowed to change "cpumask". Link: https://lore.kernel.org/r/20200703051603.1473-1-bob.liu@oracle.com Suggested-by: Mike Christie Reviewed-by: Lee Duncan Reviewed-by: Mike Christie Signed-off-by: Bob Liu Signed-off-by: Martin K. Petersen commit 639341bf8836f25059f241f1e788e8cd7585ec07 Author: Mike Christie Date: Wed Jul 1 20:43:23 2020 -0500 scsi: target: Handle short iSIDs SPC4 has: The first ISCSI INITIATOR SESSION ID field byte containing an ASCII null character terminates the ISCSI INITIATOR SESSION ID field without regard for the specified length of the iSCSI TransportID or the contents of the ADDITIONAL LENGTH field. ---------------------------------------- which sounds like we can get an iSID shorter than 12 chars. SPC and the iSCSI RFC do not say how to handle that case other than just cutting off the iSID. This patch just makes sure that if we get an iSID like that, we only copy/send that string. There is no OS that does this right now, so there was no test case. I did test with sg utils to check it works as expected and nothing breaks. Link: https://lore.kernel.org/r/1593654203-12442-8-git-send-email-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit bd7f65d952007adceceecece39705bb3a1b55f90 Author: Mike Christie Date: Wed Jul 1 20:43:22 2020 -0500 scsi: target: Fix iscsi transport id buf len calculation The isid returned to the initiator is in string format which is 12 bytes. We also only add 1 terminating NULL and not one after the initiator name and another one after the isid. Link: https://lore.kernel.org/r/1593654203-12442-7-git-send-email-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit a6f9b6cee3f25fdf08953553a468e658fed00f3c Author: Mike Christie Date: Wed Jul 1 20:43:21 2020 -0500 scsi: target: Fix iscsi transport id buffer setup This fixes the following bugs with the transport id setup for iscsi: 1. Incorrectly adding NULL after initiator name for TPID format 1. 2. For TPID format 1 buffer setup we are doing off+len, off++ and then also len+=some_value. This results in the isid going past buffer boundaries when we then do buf[off+len] 3. The pr_reg_isid is the isid in string format which is 12 bytes, but we are only copying 6 bytes. Link: https://lore.kernel.org/r/1593654203-12442-6-git-send-email-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 169622eee4373d98172647a1efad24e8fcd94e1b Author: Mike Christie Date: Wed Jul 1 20:43:20 2020 -0500 scsi: target: Fix iscsi transport id parsing The length passed in the ADDITIONAL LENGTH field includes padding and the terminating NULL for the last field (name or isid depending on the format), so we should not also try to calculate that and then double add that to the returned length. Link: https://lore.kernel.org/r/1593654203-12442-5-git-send-email-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit f32ba612ef0f8eecaf6d2a5b04076ee7ea9ed039 Author: Mike Christie Date: Wed Jul 1 20:43:19 2020 -0500 scsi: target: Fix crash during SPEC_I_PT handling __core_scsi3_add_registration clears the t10_pr_registration pr_reg_deve and does a core_scsi3_lunacl_undepend_item which does an undepend and also does a kref_put from the get done in __core_scsi3_alloc_registration. So when we get to the bottom of core_scsi3_decode_spec_i_port the pr_reg_deve is NULL and we crash when trying to access the local_pr_reg's pr_reg_deve. We've also done an extra undepend for local_pr_reg and if we didn't crash on the NULL we would have done an extra kref_put too. This patch has us do a core_scsi3_lunacl_depend_item for local_pr_reg and then let __core_scsi3_add_registration handle the cleanup for the pr_reg_deve. We then just skip the undepend for the acl and tpg for the local pr_reg. The error path then works in a similar way, but we always do the core_scsi3_lunacl_undepend_item since we never call __core_scsi3_add_registration in that code path. Link: https://lore.kernel.org/r/1593654203-12442-4-git-send-email-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 3c006c7d23aac928279f7cbe83bbac4361255d53 Author: Mike Christie Date: Wed Jul 1 20:43:18 2020 -0500 scsi: target: Fix xcopy sess release leak transport_init_session can allocate memory via percpu_ref_init, and target_xcopy_release_pt never frees it. This adds a transport_uninit_session function to handle cleanup of resources allocated in the init function. Link: https://lore.kernel.org/r/1593654203-12442-3-git-send-email-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 63c9ffe473d3eb0910cadd35685c93c3edeff19f Author: Mike Christie Date: Wed Jul 1 20:43:17 2020 -0500 scsi: target: Check enforce_pr_isids during registration Move the check for enforce_pr_isids to the registration code where we can fail at the time an initiator tries to register a path without an isid. In its current place in __core_scsi3_locate_pr_reg, it is too late because it can be registered and be reported in PR in commands and it is stuck in this state because we cannot unregister it. [mkp: applied by hand] Link: https://lore.kernel.org/r/1593654203-12442-2-git-send-email-michael.christie@oracle.com Reviewed-by: Hannes Reinecke Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 52797a8e8529507e3831ed9b4ed6fd7d8671c63f Author: José Roberto de Souza Date: Tue Jul 7 13:45:30 2020 -0700 drm/i915/ehl: Add new PCI ids Two new PCI ids added to ehl. v2: added two additional PCI ids BSpec: 29153 Cc: Matt Roper Cc: Anusha Srivatsa Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200707204530.42289-1-jose.souza@intel.com commit e83e2ca3c39553a9d0fd497d9c839b341e38c742 Author: Matt Jolly Date: Fri Jun 19 01:55:11 2020 +1000 PCI/AER: Log correctable errors as warning, not error PCIe correctable errors are recovered by hardware with no need for software intervention (PCIe r5.0, sec 6.2.2.1). Reduce the log level of correctable errors from KERN_ERR to KERN_WARNING. The bug reports below are for correctable error logging. This doesn't fix the cause of those reports, but it may make the messages less alarming. [bhelgaas: commit log, use pci_printk() to avoid code duplication] Link: https://bugzilla.kernel.org/show_bug.cgi?id=201517 Link: https://bugzilla.kernel.org/show_bug.cgi?id=196183 Link: https://lore.kernel.org/r/20200618155511.16009-1-Kangie@footclan.ninja Signed-off-by: Matt Jolly Signed-off-by: Bjorn Helgaas commit 0678e3109a3cf438a8d1c8e3c3e58a45a59df262 Author: Bjorn Helgaas Date: Tue Jul 7 18:48:17 2020 -0500 PCI/AER: Simplify __aer_print_error() aer_correctable_error_string[] and aer_uncorrectable_error_string[] have descriptions of AER error status bits. Add NULL entries to these tables so all entries for bits 0-31 are defined. Then we don't have to check for ARRAY_SIZE() when decoding a status word, which simplifies __aer_print_error(). Signed-off-by: Bjorn Helgaas commit 5cfd607b49db2b7c05fccc2915a528d97bc8f17d Author: Daniel T. Lee Date: Wed Jul 8 03:48:55 2020 +0900 selftests: bpf: Remove unused bpf_map_def_legacy struct samples/bpf no longer use bpf_map_def_legacy and instead use the libbpf's bpf_map_def or new BTF-defined MAP format. This commit removes unused bpf_map_def_legacy struct from selftests/bpf/bpf_legacy.h. Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200707184855.30968-5-danieltimlee@gmail.com commit cc7f641d637bef0b31194d28667553f77c4ef947 Author: Daniel T. Lee Date: Wed Jul 8 03:48:54 2020 +0900 samples: bpf: Refactor BPF map performance test with libbpf Previously, in order to set the numa_node attribute at the time of map creation using "libbpf", it was necessary to call bpf_create_map_node() directly (bpf_load approach), instead of calling bpf_object_load() that handles everything on its own, including map creation. And because of this problem, this sample had problems with refactoring from bpf_load to libbbpf. However, by commit 1bdb6c9a1c43 ("libbpf: Add a bunch of attribute getters/setters for map definitions") added the numa_node attribute and allowed it to be set in the map. By using libbpf instead of bpf_load, the inner map definition has been explicitly declared with BTF-defined format. Also, the element of ARRAY_OF_MAPS was also statically specified using the BTF format. And for this reason some logic in fixup_map() was not needed and changed or removed. Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200707184855.30968-4-danieltimlee@gmail.com commit 88795b4adb01a30fbfd75ef1c1ef73b4442e38b2 Author: Daniel T. Lee Date: Wed Jul 8 03:48:53 2020 +0900 samples: bpf: Refactor BPF map in map test with libbpf From commit 646f02ffdd49 ("libbpf: Add BTF-defined map-in-map support"), a way to define internal map in BTF-defined map has been added. Instead of using previous 'inner_map_idx' definition, the structure to be used for the inner map can be directly defined using array directive. __array(values, struct inner_map) This commit refactors map in map test program with libbpf by explicitly defining inner map with BTF-defined format. Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200707184855.30968-3-danieltimlee@gmail.com commit af9bd3e3331b8af42b6606c75797d041ab39380c Author: Daniel T. Lee Date: Wed Jul 8 03:48:52 2020 +0900 samples: bpf: Fix bpf programs with kprobe/sys_connect event Currently, BPF programs with kprobe/sys_connect does not work properly. Commit 34745aed515c ("samples/bpf: fix kprobe attachment issue on x64") This commit modifies the bpf_load behavior of kprobe events in the x64 architecture. If the current kprobe event target starts with "sys_*", add the prefix "__x64_" to the front of the event. Appending "__x64_" prefix with kprobe/sys_* event was appropriate as a solution to most of the problems caused by the commit below. commit d5a00528b58c ("syscalls/core, syscalls/x86: Rename struct pt_regs-based sys_*() to __x64_sys_*()") However, there is a problem with the sys_connect kprobe event that does not work properly. For __sys_connect event, parameters can be fetched normally, but for __x64_sys_connect, parameters cannot be fetched. ffffffff818d3520 <__x64_sys_connect>: ffffffff818d3520: e8 fb df 32 00 callq 0xffffffff81c01520 <__fentry__> ffffffff818d3525: 48 8b 57 60 movq 96(%rdi), %rdx ffffffff818d3529: 48 8b 77 68 movq 104(%rdi), %rsi ffffffff818d352d: 48 8b 7f 70 movq 112(%rdi), %rdi ffffffff818d3531: e8 1a ff ff ff callq 0xffffffff818d3450 <__sys_connect> ffffffff818d3536: 48 98 cltq ffffffff818d3538: c3 retq ffffffff818d3539: 0f 1f 80 00 00 00 00 nopl (%rax) As the assembly code for __x64_sys_connect shows, parameters should be fetched and set into rdi, rsi, rdx registers prior to calling __sys_connect. Because of this problem, this commit fixes the sys_connect event by first getting the value of the rdi register and then the value of the rdi, rsi, and rdx register through an offset based on that value. Fixes: 34745aed515c ("samples/bpf: fix kprobe attachment issue on x64") Signed-off-by: Daniel T. Lee Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200707184855.30968-2-danieltimlee@gmail.com commit 65ffd797861a44ff97081de1db01e4aef716ed46 Author: Stanislav Fomichev Date: Mon Jul 6 16:01:28 2020 -0700 selftests/bpf: Test BPF_CGROUP_INET_SOCK_RELEASE Simple test that enforces a single SOCK_DGRAM socket per cgroup. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200706230128.4073544-5-sdf@google.com commit db94cc0b4805968a0357ed2507730cdf77adf174 Author: Stanislav Fomichev Date: Mon Jul 6 16:01:27 2020 -0700 bpftool: Add support for BPF_CGROUP_INET_SOCK_RELEASE Support attaching to BPF_CGROUP_INET_SOCK_RELEASE and properly display attach type upon prog dump. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200706230128.4073544-4-sdf@google.com commit e8b012e9fabe7eafc1b2c72414e174547683860d Author: Stanislav Fomichev Date: Mon Jul 6 16:01:26 2020 -0700 libbpf: Add support for BPF_CGROUP_INET_SOCK_RELEASE Add auto-detection for the cgroup/sock_release programs. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200706230128.4073544-3-sdf@google.com commit f5836749c9c04a10decd2742845ad4870965fdef Author: Stanislav Fomichev Date: Mon Jul 6 16:01:25 2020 -0700 bpf: Add BPF_CGROUP_INET_SOCK_RELEASE hook Sometimes it's handy to know when the socket gets freed. In particular, we'd like to try to use a smarter allocation of ports for bpf_bind and explore the possibility of limiting the number of SOCK_DGRAM sockets the process can have. Implement BPF_CGROUP_INET_SOCK_RELEASE hook that triggers on inet socket release. It triggers only for userspace sockets (not in-kernel ones) and therefore has the same semantics as the existing BPF_CGROUP_INET_SOCK_CREATE. Signed-off-by: Stanislav Fomichev Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200706230128.4073544-2-sdf@google.com commit 8cb601f15886f6d05479e46913d954e9ff237312 Author: Chris Healy Date: Tue Jul 7 13:32:05 2020 -0700 net: sfp: add error checking with sfp_irq_name Add error checking with sfp_irq_name before use. Signed-off-by: Chris Healy Signed-off-by: David S. Miller commit 964201de695b8afca80652f048a95dc2cb68fcb7 Author: Gustavo A. R. Silva Date: Tue Jul 7 12:21:38 2020 -0500 net/sched: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 535094a0c9c4908a31f3158a647e203ceeecf277 Author: Alexander A. Klimov Date: Mon Jul 6 22:50:30 2020 +0200 Replace HTTP links with HTTPS ones: X.25 network layer Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit 1fd52137d3cffcd17225574052e7f34b85f1572b Author: Alexander A. Klimov Date: Mon Jul 6 22:50:18 2020 +0200 Replace HTTP links with HTTPS ones: GRETH 10/100/1G Ethernet MAC device driver Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit 2291bde8c0cfc01090473802a7c03a38171daacb Author: Colin Ian King Date: Mon Jul 6 13:12:40 2020 +0100 bnx2x: fix spelling mistake "occurd" -> "occurred" There are spelling mistakes in various literal strings. Fix these. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 417e19d12be49e86f29c5d3410b65adc6a3e2a0a Merge: 1a4d681634fad f3631ab08eeb6 Author: David S. Miller Date: Tue Jul 7 15:41:05 2020 -0700 Merge branch 'net-ethtool-Untangle-PHYLIB-dependency' Florian Fainelli says: ==================== net: ethtool: Untangle PHYLIB dependency This patch series untangles the ethtool netlink dependency with PHYLIB which exists because the cable test feature calls directly into PHY library functions. The approach taken here is to introduce ethtool_phy_ops function pointers which can be dynamically registered when PHYLIB loads. ==================== Signed-off-by: David S. Miller commit f3631ab08eeb67ad023ba1b37004ecba0158f93f Author: Florian Fainelli Date: Sun Jul 5 21:27:58 2020 -0700 net: ethtool: Remove PHYLIB direct dependency Now that we have introduced ethtool_phy_ops and the PHY library dynamically registers its operations with that function pointer, we can remove the direct PHYLIB dependency in favor of using dynamic operations. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 55d8f053ce1bb2c010458c6e9883b9c7ac12adc3 Author: Florian Fainelli Date: Sun Jul 5 21:27:57 2020 -0700 net: phy: Register ethtool PHY operations Utilize ethtool_set_ethtool_phy_ops to register a suitable set of PHY ethtool operations in a dynamic fashion such that ethtool will no longer directy reference PHY library symbols. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 4895d7808e7030c831f2ef83a3cc6ec0d46c30b1 Author: Florian Fainelli Date: Sun Jul 5 21:27:56 2020 -0700 net: ethtool: Introduce ethtool_phy_ops In order to decouple ethtool from its PHY library dependency, define an ethtool_phy_ops singleton which can be overriden by the PHY library when it loads with an appropriate set of function pointers. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 1a4d681634fad302157afcb53a178c4c59cb75ee Author: Randy Dunlap Date: Sun Jul 5 19:55:44 2020 -0700 Documentation: networking: fix ethtool-netlink table formats Fix table formatting to eliminate warnings. Documentation/networking/ethtool-netlink.rst:509: WARNING: Malformed table. Documentation/networking/ethtool-netlink.rst:522: WARNING: Malformed table. Documentation/networking/ethtool-netlink.rst:543: WARNING: Malformed table. Documentation/networking/ethtool-netlink.rst:555: WARNING: Malformed table. Documentation/networking/ethtool-netlink.rst:591: WARNING: Malformed table. Signed-off-by: Randy Dunlap Signed-off-by: David S. Miller commit 1814cff26739de7d02db6193bc620d0a4bdea676 Author: Bartosz Golaszewski Date: Sun Jul 5 11:55:47 2020 +0200 net: phy: add a Kconfig option for mdio_devres If phylib is built as a module and CONFIG_MDIO_DEVICE is 'y', the mdio_device and mdio_bus code will be in the phylib module, not in the kernel image. Meanwhile we build mdio_devres depending on the CONFIG_MDIO_DEVICE symbol, so if it's 'y', it will go into the kernel and we'll hit the following linker error: ld: drivers/net/phy/mdio_devres.o: in function `devm_mdiobus_alloc_size': >> drivers/net/phy/mdio_devres.c:38: undefined reference to `mdiobus_alloc_size' ld: drivers/net/phy/mdio_devres.o: in function `devm_mdiobus_free': >> drivers/net/phy/mdio_devres.c:16: undefined reference to `mdiobus_free' ld: drivers/net/phy/mdio_devres.o: in function `__devm_mdiobus_register': >> drivers/net/phy/mdio_devres.c:87: undefined reference to `__mdiobus_register' ld: drivers/net/phy/mdio_devres.o: in function `devm_mdiobus_unregister': >> drivers/net/phy/mdio_devres.c:53: undefined reference to `mdiobus_unregister' ld: drivers/net/phy/mdio_devres.o: in function `devm_of_mdiobus_register': >> drivers/net/phy/mdio_devres.c:120: undefined reference to `of_mdiobus_register' Add a hidden Kconfig option for MDIO_DEVRES which will be currently selected by CONFIG_PHYLIB as there are no non-phylib users of these helpers. Reported-by: kernel test robot Fixes: ac3a68d56651 ("net: phy: don't abuse devres in devm_mdiobus_register()") Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit 2194bc7c39610be7cabe7456c5f63a570604f015 Author: Rajat Jain Date: Mon Jul 6 16:32:40 2020 -0700 PCI: Add device even if driver attach failed device_attach() returning failure indicates a driver error while trying to probe the device. In such a scenario, the PCI device should still be added in the system and be visible to the user. When device_attach() fails, merely warn about it and keep the PCI device in the system. This partially reverts ab1a187bba5c ("PCI: Check device_attach() return value always"). Link: https://lore.kernel.org/r/20200706233240.3245512-1-rajatja@google.com Signed-off-by: Rajat Jain Signed-off-by: Bjorn Helgaas Reviewed-by: Greg Kroah-Hartman Cc: stable@vger.kernel.org # v4.6+ commit 9914175f9c4213ff1be1994daee3a9c3ad424255 Merge: 4e48978cd28ce 53fff2bfb3fcc Author: David S. Miller Date: Tue Jul 7 15:20:49 2020 -0700 Merge branch 'smsc-use-generic-power-management' Vaibhav Gupta says: ==================== smsc: use generic power management Linux Kernel Mentee: Remove Legacy Power Management. The purpose of this patch series is to remove legacy power management callbacks from smsc ethernet drivers. The callbacks performing suspend() and resume() operations are still calling pci_save_state(), pci_set_power_state(), etc. and handling the power management themselves, which is not recommended. The conversion requires the removal of the those function calls and change the callback definition accordingly and make use of dev_pm_ops structure. All patches are compile-tested only. V2: Kbuild in V1, warning: variable 'err' is used uninitialized whenever 'if' conditio is false in funcution .resume() . ==================== Signed-off-by: David S. Miller commit 53fff2bfb3fcce7f7e8ac424da73070ac7a550da Author: Vaibhav Gupta Date: Fri Jul 3 08:31:38 2020 +0530 smsc9420: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 622594f2ad8be03d55a56f4f91c41ae5f3849703 Author: Vaibhav Gupta Date: Fri Jul 3 08:31:37 2020 +0530 epic100: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 16d79cd4e23b1964d36c041ab027505ceacbbeeb Author: Luc Van Oostenryck Date: Thu Jul 2 18:26:49 2020 +0200 PCI: Use 'pci_channel_state_t' instead of 'enum pci_channel_state' The method struct pci_error_handlers.error_detected() is defined and documented as taking an 'enum pci_channel_state' for the second argument, but most drivers use 'pci_channel_state_t' instead. This 'pci_channel_state_t' is not a typedef for the enum but a typedef for a bitwise type in order to have better/stricter typechecking. Consolidate everything by using 'pci_channel_state_t' in the method's definition, in the related helpers and in the drivers. Enforce use of 'pci_channel_state_t' by replacing 'enum pci_channel_state' with an anonymous 'enum'. Note: Currently, from a typechecking point of view this patch changes nothing because only the constants defined by the enum are bitwise, not the enum itself (sparse doesn't have the notion of 'bitwise enum'). This may change in some not too far future, hence the patch. [bhelgaas: squash in https://lore.kernel.org/r/20200702162651.49526-3-luc.vanoostenryck@gmail.com https://lore.kernel.org/r/20200702162651.49526-4-luc.vanoostenryck@gmail.com] Link: https://lore.kernel.org/r/20200702162651.49526-2-luc.vanoostenryck@gmail.com Signed-off-by: Luc Van Oostenryck Signed-off-by: Bjorn Helgaas commit 239bef676d8e7118f6d75f208e6d6081ff16a5a1 Author: José Roberto de Souza Date: Thu Jun 25 12:52:52 2020 -0700 drm/i915/display: Implement new combo phy initialization step This is new step that was recently added to the combo phy initialization. v2: - using intel_de_rmw() v3: - going back to read() modify and write() as group register can't be read BSpec: 49291 Cc: Clinton A Taylor Cc: Lucas De Marchi Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200625195252.39312-1-jose.souza@intel.com commit c9f75047eb9b38b2461819398e8a30a172ca3d46 Author: Yauheni Kaliuta Date: Wed May 27 10:16:58 2020 +0300 selftests: fix condition in run_tests The check if there are any files to install in case of no files compares "X " with "X" so never false. Remove extra spaces. It may make sense to use make's $(if) function here. Signed-off-by: Yauheni Kaliuta Signed-off-by: Shuah Khan commit 99aacebecb75c61e6a6a1bc29f5d87c9453f3b73 Author: Yauheni Kaliuta Date: Wed May 27 10:16:57 2020 +0300 selftests: do not use .ONESHELL Using one shell for the whole recipe with long lists can cause make[1]: execvp: /bin/sh: Argument list too long with some shells. Triggered by commit 309b81f0fdc4 ("selftests/bpf: Install generated test progs") It requires to change the rule which rely on the one shell behaviour (run_tests). Simplify also INSTALL_SINGLE_RULE, remove extra echo, required to workaround .ONESHELL. Signed-off-by: Yauheni Kaliuta Cc: Jiri Benc Cc: Shuah Khan Signed-off-by: Shuah Khan commit 2a7e32d0547f41c5ce244f84cf5d6ca7fccee7eb Author: Bjorn Helgaas Date: Thu Jun 25 18:14:55 2020 -0500 PCI: Fix pci_cfg_wait queue locking problem The pci_cfg_wait queue is used to prevent user-space config accesses to devices while they are recovering from reset. Previously we used these operations on pci_cfg_wait: __add_wait_queue(&pci_cfg_wait, ...) __remove_wait_queue(&pci_cfg_wait, ...) wake_up_all(&pci_cfg_wait) The wake_up acquires the wait queue lock, but the add and remove do not. Originally these were all protected by the pci_lock, but cdcb33f98244 ("PCI: Avoid possible deadlock on pci_lock and p->pi_lock"), moved wake_up_all() outside pci_lock, so it could race with add/remove operations, which caused occasional kernel panics, e.g., during vfio-pci hotplug/unplug testing: Unable to handle kernel read from unreadable memory at virtual address ffff802dac469000 Resolve this by using wait_event() instead of __add_wait_queue() and __remove_wait_queue(). The wait queue lock is held by both wait_event() and wake_up_all(), so it provides mutual exclusion. Fixes: cdcb33f98244 ("PCI: Avoid possible deadlock on pci_lock and p->pi_lock") Link: https://lore.kernel.org/linux-pci/79827f2f-9b43-4411-1376-b9063b67aee3@huawei.com/T/#u Based-on: https://lore.kernel.org/linux-pci/20191210031527.40136-1-zhengxiang9@huawei.com/ Based-on-patch-by: Xiang Zheng Signed-off-by: Bjorn Helgaas Tested-by: Xiang Zheng Cc: Heyi Guo Cc: Biaoxiang Ye commit 4e48978cd28ce51945c08650e5c5502ca41e1fcc Author: Matteo Croce Date: Tue Jul 7 15:19:13 2020 +0200 mvpp2: fix pointer check priv->page_pool is an array, so comparing against it will always return true. Do a meaningful check by checking priv->page_pool[0] instead. While at it, clear the page_pool pointers on deallocation, or when an allocation error happens during init. Reported-by: Colin Ian King Fixes: c2d6fe6163de ("mvpp2: XDP TX support") Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit b416268b7a819c0508ed0dc81461e513b110f2ac Author: Florian Westphal Date: Tue Jul 7 14:40:48 2020 +0200 mptcp: use mptcp worker for path management We can re-use the existing work queue to handle path management instead of a dedicated work queue. Just move pm_worker to protocol.c, call it from the mptcp worker and get rid of the msk lock (already held). Signed-off-by: Florian Westphal Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 847d97e013dc8359312e2376c4805ef9d2a52f64 Author: Wei Yongjun Date: Tue Jul 7 18:55:43 2020 +0800 sun/cassini: mark cas_resume() as __maybe_unused In certain configurations without power management support, gcc report the following warning: drivers/net/ethernet/sun/cassini.c:5206:12: warning: 'cas_resume' defined but not used [-Wunused-function] 5206 | static int cas_resume(struct device *dev_d) | ^~~~~~~~~~ Mark cas_resume() as __maybe_unused to make it clear. Fixes: f193f4ebde3d ("sun/cassini: use generic power management") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 86fc3f7074d029ce23271d492a1c8ffee3067244 Author: Vaibhav Gupta Date: Tue Jul 7 13:11:22 2020 +0530 sun/niu: add __maybe_unused attribute to PM functions The upgraded .suspend() and .resume() throw "defined but not used [-Wunused-function]" warning for certain configurations. Mark them with "__maybe_unused" attribute. Compile-tested only. Fixes: b0db0cc2f695 ("sun/niu: use generic power management") Reported-by: Stephen Rothwell Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit c8658e584126e34b2aec8b5cfa59aed0df2b5752 Merge: 5411ca7178d40 791e5f61aec5a Author: David S. Miller Date: Tue Jul 7 12:47:11 2020 -0700 Merge branch 'phy-warn' Andrew Lunn says: ==================== drivers/net/phy C=1 W=1 fixes This fixes most of the Sparse and W=1 warnings in drivers/net/phy. The Cavium code is still not fully clean, but it might actually be the strange code is confusing Sparse. v2 -- Added RB, TB, AB. s/case/cause Reverse Christmas tree Module soft dependencies ==================== Signed-off-by: David S. Miller commit 791e5f61aec5a1332a8f760f43a6d32c416df602 Author: Andrew Lunn Date: Tue Jul 7 03:49:39 2020 +0200 net: phy: mdio-octeon: Cleanup module loading dependencies To ensure that the octeon MDIO driver has been loaded, the Cavium ethernet drivers reference a dummy symbol in the MDIO driver. This forces it to be loaded first. And this symbol has not been cleanly implemented, resulting in warnings when build W=1 C=1. Since device tree is being used, and a phandle points to the PHY on the MDIO bus, we can make use of deferred probing. If the PHY fails to connect, it should be because the MDIO bus driver has not loaded yet. Return -EPROBE_DEFER so it will be tried again later. Additionally, add a MODULE_SOFTDEP() to give user space a hint as to what order it should load the modules. v2: s/octoen/octeon/ Add MODULE_SOFTDEP() Cc: Sunil Goutham Cc: Robert Richter Cc: Chris Packham Tested-by: Chris Packham Acked-by: Greg Kroah-Hartman Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit c7b04d1030f505f2d883612ed31a6ddd70182705 Author: Andrew Lunn Date: Tue Jul 7 03:49:38 2020 +0200 net: phy: cavium: Improve __iomem mess The MIPS low level register access functions seem to be missing __iomem annotation. This causes lots of sparse warnings, when code casts off the __iomem. Make the Cavium MDIO drivers cleaner by pushing the casts lower down into the helpers, allow the drivers to work as normal, with __iomem. bus->register_base is now an void *, rather than a u64. So forming the mii_bus->id string cannot use %llx any more. Use %px, so this kernel address is still exposed to user space, as it was before. v2: s/cases/causes/g Cc: Sunil Goutham Cc: Robert Richter Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 82e7627fd4d8592be2acb908943fb943c440840d Author: Andrew Lunn Date: Tue Jul 7 03:49:37 2020 +0200 net: phy: dp83640: Fixup cast to restricted __be16 warning ntohs() expects to be passed a __be16. Correct the type of the variable holding the sequence ID. Cc: Richard Cochran Acked-by: Richard Cochran Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 4f2b38e3ea4a64ea23e313a78d9974ca6b5d7703 Author: Andrew Lunn Date: Tue Jul 7 03:49:36 2020 +0200 net: phy: Make phy_10gbit_fec_features_array static This array is not used outside of phy_device.c, so make it static. Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 3970ed49a46bd0b062870edcc0894b2bd820371d Author: Andrew Lunn Date: Tue Jul 7 03:49:35 2020 +0200 net: phy: Properly define genphy_c45_driver Avoid the W=1 warning that symbol 'genphy_c45_driver' was not declared. Should it be static? Declare it on the phy header file. Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 19c5a5fec30bde10d269a9f638566195016c90ed Author: Andrew Lunn Date: Tue Jul 7 03:49:34 2020 +0200 net: phy: Fixup parameters in kerneldoc Correct the kerneldoc for a few structure and function calls, as reported by C=1 W=1. Cc: Alexandru Ardelean Reviewed-by: Florian Fainelli Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 3f2edd309ff02c973bc3cb815c87def07a1ac804 Author: Andrew Lunn Date: Tue Jul 7 03:49:33 2020 +0200 net: phy: at803x: Avoid comparison is always false warning By placing the GENMASK value into an unsigned int and then passing it to PREF_FIELD, the type is reduces down from ULL. Given the reduced size of the type, the range checks in PREP_FAIL() are always true, and -Wtype-limits then gives a warning. By skipping the intermediate variable, the warning can be avoided. Reviewed-by: Jakub Kicinski Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 5411ca7178d40d94e009f3a00f10e20e6067037c Author: Chris Healy Date: Mon Jul 6 18:27:07 2020 -0700 net: sfp: Unique GPIO interrupt names Dynamically generate a unique GPIO interrupt name, based on the device name and the GPIO name. For example: 103: 0 sx1503q 12 Edge sff2-los 104: 0 sx1503q 13 Edge sff2-tx-fault The sffX indicates the SFP the los and tx-fault are associated with. v3: - reverse Christmas tree new variable - fix spaces vs tabs v2: - added net-next to PATCH part of subject line - switched to devm_kasprintf() Signed-off-by: Chris Healy Signed-off-by: David S. Miller commit 19bf119ccfa071b73a54465e8082ab2c8f8c30eb Author: Sven Schnelle Date: Tue Jul 7 19:14:55 2020 +0200 perf symbols: Add s390 idle functions 'psw_idle' and 'psw_idle_exit' to list of idle symbols Add the s390 idle functions so they don't show up in top when using software sampling. Signed-off-by: Sven Schnelle Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Igor Lubashev Cc: Jin Yao Cc: Jiri Olsa Cc: Kim Phillips Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Link: http://lore.kernel.org/lkml/20200707171457.85707-1-svens@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 14f5d8e3bb4cffce4590c04b5d9c6dc1fc397f85 Author: Jacob Keller Date: Mon Jul 6 14:53:41 2020 -0700 ice: add documentation for device-caps region The recent change by commit 8d7aab3515fa ("ice: implement snapshot for device capabilities") to implement the device-caps region for the ice driver forgot to document it. Add documentation to the ice devlink documentation file describing the new region and add some sample output to the shell commands provided as an example. Fixes: 8d7aab3515fa ("ice: implement snapshot for device capabilities") Signed-off-by: Jacob Keller Signed-off-by: David S. Miller commit 6e9fdb60d362a5db769d1a39a390288e1ee45afd Author: Florian Fainelli Date: Mon Jul 6 14:29:39 2020 -0700 net: systemport: Add support for VLAN transmit acceleration SYSTEMPORT is capable of performing VLAN transmit acceleration, support that by configuring it appropriately, providing the VLAN ID and PCP/DEI where necessary. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit 05790fd7f8d3a77c26f1acd16b6d0f8f7d61d98a Author: Paolo Bonzini Date: Tue Jul 7 11:39:27 2020 -0400 selftests: pidfd: skip test if unshare fails with EPERM Similar to how ENOSYS causes a skip if pidfd_send_signal is not present, we can do the same for unshare if it fails with EPERM. This way, running the test without privileges causes four tests to skip but no early bail out. Acked-by: Christian Brauner Signed-off-by: Paolo Bonzini Signed-off-by: Shuah Khan commit bb91c0ca7b74efde2257ca4f0b1ba93e834e47e1 Author: Paolo Bonzini Date: Tue Jul 7 11:39:26 2020 -0400 selftests: pidfd: do not use ksft_exit_skip after ksft_set_plan Calling ksft_exit_skip after ksft_set_plan results in executing fewer tests than planned. Use ksft_test_result_skip instead. The plan passed to ksft_set_plan was wrong, too, so fix it while at it. Acked-by: Christian Brauner Signed-off-by: Paolo Bonzini Signed-off-by: Shuah Khan commit 3c5308058899fa1af7d55f457ef0189fb21e6365 Author: Alexandru Ardelean Date: Tue Apr 28 14:14:29 2020 +0300 iio: adc: ti_am335x_adc: alloc kfifo & IRQ via devm_ functions This change attaches the life-cycle of the kfifo buffer & IRQ to the parent-device. This in turn cleans up the exit & error paths, since we don't need to explicitly cleanup these resources. The main intent here is to remove the explicit cleanup of the 'indio_dev->buffer' via 'iio_kfifo_free(indio_dev->buffer);'. As we want to add support for multiple buffers per IIO device, having it exposed like this makes it tricky to consider a safe backwards compatible approach for it. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 6ff0199a1df2f65d708a36aed944c3c11ba198f6 Author: Alexandru Ardelean Date: Tue Apr 28 14:14:28 2020 +0300 iio: adc: ti_am335x_adc: alloc channels via devm_kcalloc() This change attaches the life-cycle of the channels array to the parent device object that is attached to the IIO device. This way we can remove from the cleanup code, the explicit tiadc_channels_remove() which simply does a kfree() on the channels array. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit a07a4fe5ff460e99293c0d682421920d54e31d7f Author: Jonathan Cameron Date: Sun Jun 28 13:36:54 2020 +0100 iio:adc:ingenic: drop of_match_ptr protection and include mod_devicetable.h Whilst it's unlikely this device will ever be instantiated using ACPI, there is little advantage not assigning the of_device_id table in all cases and it avoids providing an example that might be coppied into new drivers. Also include mod_devicetable.h whilst here as of_device_id is defined in there so including the header is best practice. Signed-off-by: Jonathan Cameron Cc: Artur Rojek Reviewed-by: Andy Shevchenko commit 4e53d47fd3df8c822375647ac97d7fc1c83b605b Author: Jonathan Cameron Date: Sun Jun 28 13:36:52 2020 +0100 iio:adc:ti-tlc4541: Drop CONFIG_OF and of_match_ptr protections. These stop us using ACPI PRP0001 to instantiate the device. I am slowly clearly out use of these in IIO to avoid this being coppied into new drivers. Here I also included mod_devicetable.h as we are using of_match_id which is defined in there and hence it is best practice to include it directly. Signed-off-by: Jonathan Cameron Reviewed-by: Phil Reid Reviewed-by: Andy Shevchenko commit a6b40706ffeee366354ac0b7809a1a87c7973a02 Author: Jonathan Cameron Date: Sun Jun 28 13:36:51 2020 +0100 iio:adc:ti-adc161s626: Drop of_match_ptr protection. Dropping this allows use of ACPI PRP0001. I'm also looking to drop all of_match_ptr use in IIO in order to avoid it getting cut and paste into new drivers in the future. Also add a direct include of mod_devicetable.h to reflect the use of struct of_device_id. Signed-off-by: Jonathan Cameron Acked-by: Matt Ranostay Reviewed-by: Andy Shevchenko commit f14bac473fc3ef7df683328ec733dd9713dad162 Author: Jonathan Cameron Date: Sun Jun 28 13:36:48 2020 +0100 iio:adc:ti-adc084s021: drop of_match_ptr protection Allows ACPI PRP0001 to be used with this driver. Also adds mod_devicetable.h header as the driver is directly using struct of_device_id which is defined in that file. I'm also trying to clear out of_match_ptr use in IIO to avoid it being cut and paste into new drivers. Signed-off-by: Jonathan Cameron Cc: Mårten Lindahl Reviewed-by: Andy Shevchenko commit 0896ffdd835601ab3d6b4edf91543c505a3f2757 Author: Jonathan Cameron Date: Sun Jun 28 13:36:47 2020 +0100 iio:adc:ti-adc0832: drop CONFIG_OF and of_match_ptr protections These just prevent the driver being used with ACPI PRP0001. I am also trying to remove these from IIO in general to avoid them being coppied into new drivers. Also include the mod_devicetable.h header as we are using of_device_id which is defined in there. Signed-off-by: Jonathan Cameron Cc: Akinobu Mita Reviewed-by: Andy Shevchenko commit b08737494427fde412c44217e5cafe25cd99109a Author: Jonathan Cameron Date: Sun Jun 28 13:36:46 2020 +0100 iio:adc:ti-adc081c: Drop of_match_ptr and change to mod_devicetable.h Whilst this driver already supports explicit ACPI bindings we might as well also allow for PRP0001 based binding. I'm also keen to remove of_match_ptr from IIO drivers to avoid this (now) anti-pattern getting coppied into new drivers. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko commit 34eb7366bcb62a71cf5f835c8275b61b14935584 Author: Jonathan Cameron Date: Sun Jun 28 13:36:45 2020 +0100 iio:adc:sd_adc_modulator: Drop of_match_ptr and tweak includes Dropping of_match_ptr allows this driver to be used with ACPI. The header includes are adjusted to include platform_device.h and mod_devicetable.h instead of OF specific header as nothing from that header itself is actually used. Signed-off-by: Jonathan Cameron Cc: Arnaud Pouliquen Reviewed-by: Andy Shevchenko commit bf12d3fd11b3153f7e09971f533d0c71fd4802b2 Author: Jonathan Cameron Date: Sun Jun 28 13:36:44 2020 +0100 iio:adc:mcp3422: remove CONFIG_OF and of_match_ptr protections They stop the driver being used with ACPI PRP0001 and are something I want to avoid being cut and paste into new drivers. Also switch the include from of.h to mod_devicetable.h as we struct of_device_id is defined in there and we don't use anything actually in of.h. Signed-off-by: Jonathan Cameron Cc: Angelo Compagnucci Reviewed-by: Andy Shevchenko commit 016d271e330ed29491785c0adb71ba53dc480f56 Author: Jonathan Cameron Date: Sun Jun 28 13:36:43 2020 +0100 iio:adc:mcp320x: Drop CONFIG_OF and of_match_ptr protections These just prevent the driver being used with ACPI PRP0001. They also get cut and paste into new drivers and we want to discourage this from happening by cleaning it out in general. Signed-off-by: Jonathan Cameron Cc: Oskar Andero Cc: Søren Andersen Cc: Lukas Wunner Reviewed-by: Andy Shevchenko commit 1fa8b34a6215b10dc8639d3585300f68f8a619fb Author: Jonathan Cameron Date: Sun Jun 28 13:36:42 2020 +0100 iio:adc:max1118: Drop CONFIG_OF / of_match_ptr protections These just stop the driver being used with ACPI PRP0001 and we are trying to clear them out of IIO to avoid them getting copied into new drivers. Also add the mod_devicetable.h include as we are using struct of_device_id which is defined in there. Signed-off-by: Jonathan Cameron Cc: Akinobu Mita Reviewed-by: Andy Shevchenko commit 7a3e190f9ce38674fc68ddbbf5d70bd2f43e9bd9 Author: Jonathan Cameron Date: Sun Jun 28 13:36:41 2020 +0100 iio:adc:max11100: Drop of_match_ptr protection / add mod_devicetable.h include Allows use of driver with ACPI PRP0001 base binding. Mostly this is about trying to avoid cut and paste of this into new drivers (it is a frequent review comment) rather than any thought that this driver might get used on an ACPI platform. The mod_devicetable.h include is to encourage best practice of including any header directly used within the code (here for of_match_id) Signed-off-by: Jonathan Cameron Acked-by: Jacopo Mondi Reviewed-by: Andy Shevchenko commit 0a9a500acdf22390c295b4b52ae2088a9c37201f Author: Jonathan Cameron Date: Sun Jun 28 13:36:40 2020 +0100 iio:adc:ltc2497 drop of_match_ptr protection This prevents the driver being used with ACPI PRP0001 based bindings. Also switch include to mod_devicetable.h which devices the used id structure. Note this is most about removing something I don't want want cut and paste into new driver rather than any thought that this particular driver will be used in an ACPI system (though it might!) Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Reviewed-by: Uwe Kleine-König Reviewed-by: Andy Shevchenko commit 29788fd607f00e8d14ec46b2ecbca4fe23dd9da8 Author: Jonathan Cameron Date: Sun Jun 28 13:36:39 2020 +0100 iio:adc:cpcap-adc: Drop of_match_ptr protection and use device_get_match_data Part of a slow effort to avoid OF specific code in IIO. Whilst the main advantages of this are not likely to be seen in this particular driver (ACPI support via PRP0001) the change proposed does make things a bit more maintainable and also ensures that this particular (now) anti-patern is less likely to be cut and paste into new drivers. Signed-off-by: Jonathan Cameron Acked-by: Tony Lindgren Reviewed-by: Andy Shevchenko commit 4b7dddb21a3d394a6ca1691725bc8c88c046b484 Author: Jonathan Cameron Date: Sun Jun 28 13:36:38 2020 +0100 iio:adc:ltc2496: Drop of_match_ptr and use mod_devicetable.h The macro prevents use of driver with ACPI PRP0001 and the of_match_id structure is defined in mod_devicetable.h so include that directly rather than of.h. Note this is mostly about removing something I don't want cut and paste into new drivers rather than expectation that this particular driver will be used on an ACPI platform. Signed-off-by: Jonathan Cameron Reviewed-by: Uwe Kleine-König Reviewed-by: Andy Shevchenko commit 53469fa5c57dac5c9b0b3ef96f671ed5e59609bd Author: Jonathan Cameron Date: Sun Jun 28 13:36:37 2020 +0100 iio:adc:max1027: drop of_match_ptr and CONFIG_OF protections These just prevent the driver being used with ACPI PRP0001 and provide no major benefits. Part of clearing these out in general in IIO to avoid cut and paste repetition in new drivers. Also include mod_devicetable.h as we directly make use of of_device_id which is defined in there. Signed-off-by: Jonathan Cameron Cc: Miquel Raynal Cc: Philippe Reynes Reviewed-by: Andy Shevchenko commit f84ff467c0ce5b5381ddb9c871c97cd79c40ae1e Author: Jonathan Cameron Date: Sun Jun 28 13:36:36 2020 +0100 iio:adc:max1363: Drop of_match_ptr and use generic device_get_match_data Allows driver to use ACPI PRP0001 binding and there was no particular advantage in having the protections in this driver. Mostly this part of an effort to remove as many OF specific bits of handling from IIO and use the generic forms where possible. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko commit f8e6ae5a3346821acf7ac0b0dedf494e29f9496f Author: Jonathan Cameron Date: Sun Jun 28 13:36:35 2020 +0100 iio:adc:hi8435: Drop of_match_ptr protection. Allows use of ACPI with PRP0001 and is generally something we are trying to avoid having people cut and paste into new drivers without thinking about it. Signed-off-by: Jonathan Cameron Cc: Vladimir Barinov Cc: Nikita Yushchenko Reviewed-by: Andy Shevchenko commit 3745440f4905f4aaa6173a82972f8e5033f36c2d Author: Jonathan Cameron Date: Sun Jun 28 13:36:34 2020 +0100 iio:adc:hi8435: Drop unused of_gpio.h header I guess this is a left over from some earlier cleanup. Not used currently. Signed-off-by: Jonathan Cameron Cc: Nikita Yushchenko Cc: Vladimir Barinov Reviewed-by: Andy Shevchenko commit 7277a74a6cbc7a6c96e8be8271593426ab4c00c5 Author: Jonathan Cameron Date: Sun Jun 28 13:36:32 2020 +0100 iio:adc:lpc32xx: Drop of_match_ptr protection Whilst is unlikely anyone will be using this part with an ACPI PRP0001 based binding any time soon, we are getting a lot of cut and pasting of this pattern so I am looking to remove it entirely from IIO. In this case CONFIG_OF protections also removed and mod_devicetable.h include added given direct use of struct of_device_id. Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko commit 0954bc9787e749e754cde0ca53f700c24a117dda Author: Krzysztof Kozlowski Date: Mon Jun 29 12:05:37 2020 +0200 iio: magnetometer: bmc150: Add proper compatible for BMM150 The compatible for BMM150 should not have "_magn" suffix because, unlike two other Bosch devices, it is only a magnetometer. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Cameron commit 8cc41f3c8028b023611c96a5a5b9a6164b45d87f Author: Krzysztof Kozlowski Date: Mon Jun 29 12:05:36 2020 +0200 dt-bindings: iio: bmc150_magn: Document and fix missing compatibles The driver supports also BMC156B and BMM150B. Add existing compatibles marking the BMM150B one as deprecated (due to redundant suffix "_magn" because the device unlike two others is a magnetometer only). Introduce a new, proper compatible for the deprecated one. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Jonathan Cameron commit 471622c92dae29dbabe88e466ea6c884aca75757 Author: Nuno Sá Date: Wed Jul 1 14:07:02 2020 +0200 iio: adis16480: Use irq types instead of flags The value retrieved by `irqd_get_trigger_type()` is not an irq flag. While the values are the same, the meaning is different. Signed-off-by: Nuno Sá Signed-off-by: Jonathan Cameron commit 43354926bdc8fd420682e3250fd1b7eb29c2595b Author: Randy Dunlap Date: Fri Jul 3 20:44:52 2020 -0700 Documentation/driver-api: iio/buffers: drop doubled word Drop the doubled word "struct". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: William Breathitt Gray Cc: linux-iio@vger.kernel.org Signed-off-by: Jonathan Cameron commit 10f32254569dc6766b93fbac637aa94e8c37bd6b Author: Randy Dunlap Date: Fri Jul 3 20:44:51 2020 -0700 Documentation/driver-api: generic-counter: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-iio@vger.kernel.org Acked-by: William Breathitt Gray Signed-off-by: Jonathan Cameron commit fa83c3baa539a7ec734c7ee65fad499122f427d7 Author: Alexandru Ardelean Date: Tue Jun 30 07:57:08 2020 +0300 iio: core: move event interface on the opaque struct Same as with other private fields, this moves the event interface reference to the opaque IIO device object, to be invisible to drivers. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 6a8c6b26f7531a85803380911c7c4a05a639afbe Author: Alexandru Ardelean Date: Tue Jun 30 07:57:07 2020 +0300 iio: core: move iio_dev's buffer_list to the private iio device object This change moves the 'buffer_list' away from the public IIO device object into the private part. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 207c2d27a010c0154691833960756b60816fe59d Author: Alexandru Ardelean Date: Tue Jun 30 07:57:06 2020 +0300 iio: core: move channel list & group to private iio device object This change bit straightforward and simple, since the 'channel_attr_list' & 'chan_attr_group' fields are only used in 'industrialio-core.c'. This change moves to the private IIO device object Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 96fb1b67422ed652e3217a140cf9be505041db07 Author: Alexandru Ardelean Date: Tue Jun 30 07:57:05 2020 +0300 iio: core: move debugfs data on the private iio dev info This change moves all iio_dev debugfs fields to the iio_dev_priv object. It's not the biggest advantage yet (to the whole thing of abstractization) but it's a start. The iio_get_debugfs_dentry() function (which is moved in industrialio-core.c) needs to also be guarded against the CONFIG_DEBUG_FS symbol, when it isn't defined. We do want to keep the inline definition in the iio.h header, so that the compiler can better infer when to compile out debugfs code that is related to the IIO debugfs directory. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 09673d5e1b12c89988270890587a6d09d4d95e8c Author: Alexandru Ardelean Date: Tue Jun 30 07:57:04 2020 +0300 iio: core: remove padding from private information There was a recent discussion about this code: https://lore.kernel.org/linux-iio/20200322165317.0b1f0674@archlinux/ This looks like a good time to removed this, since any issues about it should pop-up under testing, because the iio_dev is having a bit of an overhaul and stuff being moved to iio_dev_opaque. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 6d4ebd565d15f374aab3d0f16f156bafec3c61b3 Author: Alexandru Ardelean Date: Tue Jun 30 07:57:03 2020 +0300 iio: core: wrap IIO device into an iio_dev_opaque object There are plenty of bad designs we want to discourage or not have to review manually usually about accessing private (marked as [INTERN]) fields of 'struct iio_dev'. Sometimes users copy drivers that are not always the best examples. A better idea is to hide those fields into the framework. For 'struct iio_dev' this is a 'struct iio_dev_opaque' which wraps a public 'struct iio_dev' object. In the next series, some fields will be moved to this new struct, each with it's own rework. This rework will not be complete-able for a while, as many fields need some drivers to be reworked in order to finalize them (e.g. 'indio_dev->mlock'). But some fields can already be moved, and in time, all of them may get there (in the 'struct iio_dev_opaque' object). Since a lot of drivers also call 'iio_priv()', in order to preserve fast-paths (where this matters), the public iio_dev object will have a 'priv' field that will have the pointer to the private information already computed. The reference returned by this field should be guaranteed to be cacheline aligned. The opaque parts will be moved into the 'include/linux/iio/iio-opaque.h' header. Should the hidden information be required for some debugging or some special needs, it can be made available via this header. Otherwise, only the IIO core files should include this file. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit ebf35aad0baa05823df31fda42df4b67f72e6e72 Author: Alexandru Ardelean Date: Mon May 25 13:53:41 2020 +0300 iio: at91-sama5d2_adc: remove usage of iio_priv_to_dev() helper We may want to get rid of the iio_priv_to_dev() helper. The reason is that we will hide some of the members of the iio_dev structure (to prevent drivers from accessing them directly), and that will also mean hiding the implementation of the iio_priv_to_dev() helper inside the IIO core. Hiding the implementation of iio_priv_to_dev() implies that some fast-paths may not be fast anymore, so a general idea is to try to get rid of the iio_priv_to_dev() altogether. The iio_priv() helper won't be affected by the rework, as the iio_dev struct will keep a reference to the private information. For this driver, not using iio_priv_to_dev(), means reworking some paths to pass the iio device and using iio_priv() to access the private information, and also keeping a reference to the iio device for some quirky paths. One [quirky] path is the at91_adc_workq_handler() which requires the IIO device & the state struct to push to buffers. Since this requires the back-ref to the IIO device, the at91_adc_touch_pos() also uses it. This simplifies the patch a bit. The information required in this function is mostly for debugging purposes. Replacing it with a reference to the IIO device would have been a slightly bigger change, which may not be worth it (for just the debugging purpose and given that we need the back-ref to the IIO device anyway). Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit da151e3458c825fa9d57c2db6e37748166e4d129 Author: Boris Brezillon Date: Wed Jun 3 15:49:22 2020 +0200 dt-bindings: mtd: fsl-upm-nand: Deprecate chip-delay and fsl, upm-wait-flags Those properties are no longer parsed by the driver which is being passed those information by the core now. Let's deprecate them. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603134922.1352340-11-boris.brezillon@collabora.com commit fbd9b5437b668900f6d8c8e29c8aabf4955189ff Author: Christophe Kerello Date: Fri Jun 12 17:22:42 2020 +0200 mtd: rawnand: stm32_fmc2: get resources from parent node FMC2 EBI support has been added. Common resources (registers base address and clock) can now be shared between the 2 drivers using "st,stm32mp1-fmc2-nfc" compatible string. It means that the common resources should now be found in the parent device when EBI node is available. Signed-off-by: Christophe Kerello Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1591975362-22009-7-git-send-email-christophe.kerello@st.com commit 51c88a8d3b02cfd4d9209c282b815336c5952619 Author: Christophe Kerello Date: Fri Jun 12 17:22:41 2020 +0200 mtd: rawnand: stm32_fmc2: use regmap APIs This patch uses regmap APIs to access all FMC2 registers. Signed-off-by: Christophe Kerello Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1591975362-22009-6-git-send-email-christophe.kerello@st.com commit 66b8173a197fb754a54798820f1e46f3d9df7819 Author: Christophe Kerello Date: Fri Jun 12 17:22:40 2020 +0200 memory: stm32-fmc2-ebi: add STM32 FMC2 EBI controller driver The driver adds the support for the STMicroelectronics FMC2 EBI controller found on STM32MP SOCs. Signed-off-by: Christophe Kerello Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1591975362-22009-5-git-send-email-christophe.kerello@st.com commit 1ab2f86f996fae09e2e216511584143c82efd030 Author: Christophe Kerello Date: Fri Jun 12 17:22:39 2020 +0200 dt-bindings: memory-controller: add STM32 FMC2 EBI controller documentation This patch adds the documentation of the device tree bindings for the STM32 FMC2 EBI controller. Signed-off-by: Christophe Kerello Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1591975362-22009-4-git-send-email-christophe.kerello@st.com commit bce49d1e3cfe48eb7a33a39da2530156c27fa3b2 Author: Christophe Kerello Date: Fri Jun 12 17:22:38 2020 +0200 dt-bindings: mtd: update STM32 FMC2 NAND controller documentation These bindings can be used on SOCs where the FMC2 NAND controller is in standalone. In case that the FMC2 embeds 2 controllers (an external bus controller and a raw NAND controller), the register base address, the clock and the reset will be defined in the parent node. Signed-off-by: Christophe Kerello Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1591975362-22009-3-git-send-email-christophe.kerello@st.com commit 5eeb7fe919ff4f683d96cf8c74a9de7e54722040 Author: Christophe Kerello Date: Fri Jun 12 17:22:37 2020 +0200 mtd: rawnand: stm32_fmc2: do not display errors if the driver is deferred A MDMA issue has been solved on Kernel 5.7. The effect of this fix is that the MDMA driver is now deferred and the FMC2 NFC driver is also deferred. All is working fine but there is a FMC2 log in the console: stm32_fmc2_nfc 58002000.nand-controller: failed to request tx DMA channel: -517 This patch removes the display of this log in the console in case of this error is -EPROBE_DEFER. Signed-off-by: Christophe Kerello Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1591975362-22009-2-git-send-email-christophe.kerello@st.com commit d2e639d6ad60fc164b75462bcdf8a43331116fd8 Author: Dan Carpenter Date: Wed Jun 24 16:26:40 2020 +0300 mtd: rawnand: ingenic: cleanup ARRAY_SIZE() vs sizeof() use The ARRAY_SIZE() is the number of elements but we want to use sizeof() here for the number of bytes. Fortunately, they are the same thing because it's an array of u8 so this has no effect on runtime. Signed-off-by: Dan Carpenter Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200624132640.GC9972@mwanda commit 6f49c4f5b95b9ac8ead1ec39066489fb10fcbde8 Author: Gustavo A. R. Silva Date: Tue Jul 7 11:24:55 2020 -0700 Input: Use fallthrough pseudo-keyword Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200707180857.GA30600@embeddedor Signed-off-by: Dmitry Torokhov commit 69f6a918ff4b5a04bf9474fb4c3f9e8c9abd39f1 Author: Colton Lewis Date: Tue Jul 7 04:52:32 2020 +0000 usb: correct kernel-doc inconsistency Silence documentation build warning by correcting kernel-doc comment for sub_validate_langid function. ./drivers/usb/gadget/usbstring.c:77: warning: Function parameter or member 'langid' not described in 'usb_validate_langid' ./drivers/usb/gadget/usbstring.c:77: warning: Excess function parameter 'lang' description in 'usb_validate_langid' Signed-off-by: Colton Lewis Link: https://lore.kernel.org/r/20200707045207.235540-1-colton.w.lewis@protonmail.com Signed-off-by: Greg Kroah-Hartman commit 08a6caaed8c12a158e88c0e0e1369203f9cff020 Author: Xu Wang Date: Mon Jul 6 21:17:46 2020 -0700 Input: cm109 - remove needless check before usb_free_coherent() usb_free_coherent() is safe with NULL addr and this check is not required. Signed-off-by: Xu Wang Link: https://lore.kernel.org/r/20200707030905.3123-1-vulab@iscas.ac.cn Signed-off-by: Dmitry Torokhov commit b2edc0a77fac19bbdef63cedb2ea34aec1a9a499 Author: Pavel Begunkov Date: Tue Jul 7 16:36:22 2020 +0300 io_uring: don't burn CPU for iopoll on exit First of all don't spin in io_ring_ctx_wait_and_kill() on iopoll. Requests won't complete faster because of that, but only lengthen io_uring_release(). The same goes for offloaded cleanup in io_ring_exit_work() -- it already has waiting loop, don't do blocking active spinning. For that, pass min=0 into io_iopoll_[try_]reap_events(), so it won't actively spin. Leave the function if io_do_iopoll() there can't complete a request to sleep in io_ring_exit_work(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7668b92a69b8201e2dd16a47a08efb93e909f419 Author: Pavel Begunkov Date: Tue Jul 7 16:36:21 2020 +0300 io_uring: remove nr_events arg from iopoll_check() Nobody checks io_iopoll_check()'s output parameter @nr_events. Remove the parameter and declare it further down the stack. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9dedd56301564acdbb1dd37cf09250a4c7b783c9 Author: Pavel Begunkov Date: Tue Jul 7 16:36:20 2020 +0300 io_uring: partially inline io_iopoll_getevents() io_iopoll_reap_events() doesn't care about returned valued of io_iopoll_getevents() and does the same checks for list emptiness and need_resched(). Just use io_do_iopoll(). io_sq_thread() doesn't check return value as well. It also passes min=0, so there never be the second iteration inside io_poll_getevents(). Inline it there too. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0e6e255e7a58cdf4ee4163f83deeb5ce4946051e Author: Christoph Hellwig Date: Tue Jul 7 19:45:03 2020 +0200 block: remove a bogus warning in __submit_bio_noacct_mq If blk_mq_submit_bio flushes the plug list, bios for other disks can show up on current->bio_list. As that doesn't involve any stacking of block device it is entirely harmless and we should not warn about this case. Fixes: ff93ea0ce763 ("block: shortcut __submit_bio_noacct for blk-mq drivers") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 1e2b5a90ded2852017e327e93861346ee70c5384 Author: Leon Romanovsky Date: Thu Jul 2 11:18:09 2020 +0300 RDMA/mlx5: Delete one-time used functions Merge them into their callers, usually the only thing the caller did was to call the one function, so this is clearer. Link: https://lore.kernel.org/r/20200702081809.423482-7-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit d8b7515e25ec0a294c18e366f98e85fcb4a035e3 Author: Leon Romanovsky Date: Thu Jul 2 11:18:08 2020 +0300 RDMA/mlx5: Cleanup DEVX initialization flow Move DEVX initialization and cleanup flows to the devx.c instead of having almost empty functions in main.c Link: https://lore.kernel.org/r/20200702081809.423482-6-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f7c4ffda0cbf7823915cbfebdbbe8460e7eeca67 Author: Leon Romanovsky Date: Thu Jul 2 11:18:07 2020 +0300 RDMA/mlx5: Separate flow steering logic from main.c Move flow steering logic to be in separate file and rename flow.c to be fs.c because it is better describe the content. Link: https://lore.kernel.org/r/20200702081809.423482-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 64825827ae3a53e01fc9bb9483b1a2ed7cb2b657 Author: Leon Romanovsky Date: Thu Jul 2 11:18:06 2020 +0300 RDMA/mlx5: Separate counters from main.c There are number of counters types supported in mlx5_ib: HW counters, congestion counters, Q-counters and flow counters. Almost all supporting code was placed in main.c that made almost impossible to maintain the code anymore. Let's create separate code namespace for the counters to easy future generalization effort. Link: https://lore.kernel.org/r/20200702081809.423482-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b572ebe6675526be5d3b0e831e9d567c4fc0fd5d Author: Leon Romanovsky Date: Thu Jul 2 11:18:05 2020 +0300 RDMA/mlx5: Separate restrack callbacks initialization from main.c The restrack code has separate .c, so move callbacks initialization to that file to improve code locality. Link: https://lore.kernel.org/r/20200702081809.423482-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ac47bf5ef122591aa561fc16176ef0d1c7d24726 Author: Leon Romanovsky Date: Thu Jul 2 11:18:04 2020 +0300 RDMA/mlx5: Limit the scope of mlx5_ib_enable_driver function The mlx5_ib_enable_driver() is local function and doesn't need to be shared in mlx5_ib, so change it's signature to have static keyword in it. Link: https://lore.kernel.org/r/20200702081809.423482-2-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6de7dd31ded078b31a3812a46d8874f871b4e82f Author: Marc Zyngier Date: Tue Jul 7 15:34:06 2020 +0100 KVM: arm64: Don't use has_vhe() for CHOOSE_HYP_SYM() The recently introduced CHOOSE_HYP_SYM() macro picks one symbol or another, depending on whether the kernel run as a VHE hypervisor or not. For that, it uses the has_vhe() helper, which is itself implemented as a final capability. Unfortunately, __copy_hyp_vect_bpi now indirectly uses CHOOSE_HYP_SYM to get the __bp_harden_hyp_vecs symbol, using has_vhe() in the process. At this stage, the capability isn't final and things explode: [ 0.000000] ACPI: SRAT not present [ 0.000000] percpu: Embedded 34 pages/cpu s101264 r8192 d29808 u139264 [ 0.000000] Detected PIPT I-cache on CPU0 [ 0.000000] ------------[ cut here ]------------ [ 0.000000] kernel BUG at arch/arm64/include/asm/cpufeature.h:459! [ 0.000000] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 0.000000] Modules linked in: [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.8.0-rc4-00080-gd630681366e5 #1388 [ 0.000000] pstate: 80000085 (Nzcv daIf -PAN -UAO BTYPE=--) [ 0.000000] pc : check_branch_predictor+0x3a4/0x408 [ 0.000000] lr : check_branch_predictor+0x2a4/0x408 [ 0.000000] sp : ffff800011693e90 [ 0.000000] x29: ffff800011693e90 x28: ffff8000116a1530 [ 0.000000] x27: ffff8000112c1008 x26: ffff800010ca6ff8 [ 0.000000] x25: ffff8000112c1000 x24: ffff8000116a1320 [ 0.000000] x23: 0000000000000000 x22: ffff8000112c1000 [ 0.000000] x21: ffff800010177120 x20: ffff8000116ae108 [ 0.000000] x19: 0000000000000000 x18: ffff800011965c90 [ 0.000000] x17: 0000000000022000 x16: 0000000000000003 [ 0.000000] x15: 00000000ffffffff x14: ffff8000118c3a38 [ 0.000000] x13: 0000000000000021 x12: 0000000000000022 [ 0.000000] x11: d37a6f4de9bd37a7 x10: 000000000000001d [ 0.000000] x9 : 0000000000000000 x8 : ffff800011f8dad8 [ 0.000000] x7 : ffff800011965ad0 x6 : 0000000000000003 [ 0.000000] x5 : 0000000000000000 x4 : 0000000000000000 [ 0.000000] x3 : 0000000000000100 x2 : 0000000000000004 [ 0.000000] x1 : ffff8000116ae148 x0 : 0000000000000000 [ 0.000000] Call trace: [ 0.000000] check_branch_predictor+0x3a4/0x408 [ 0.000000] update_cpu_capabilities+0x84/0x138 [ 0.000000] init_cpu_features+0x2c0/0x2d8 [ 0.000000] cpuinfo_store_boot_cpu+0x54/0x64 [ 0.000000] smp_prepare_boot_cpu+0x2c/0x60 [ 0.000000] start_kernel+0x16c/0x574 [ 0.000000] Code: 17ffffc7 91010281 14000198 17ffffca (d4210000) This is addressed using a two-fold process: - Replace has_vhe() with is_kernel_in_hyp_mode(), which tests whether we are running at EL2. - Make CHOOSE_HYP_SYM() return an *undefined* symbol when compiled in the nVHE hypervisor, as we really should never use this helper in the nVHE-specific code. With this in place, we're back to a bootable kernel again. Fixes: b877e9849d41 ("KVM: arm64: Build hyp-entry.S separately for VHE/nVHE") Signed-off-by: Marc Zyngier commit 33c326014fe69304244868cc793c2c77be533125 Author: Eric W. Biederman Date: Mon Jun 29 08:28:33 2020 -0500 umd: Stop using split_argv There is exactly one argument so there is nothing to split. All split_argv does now is cause confusion and avoid the need for a cast when passing a "const char *" string to call_usermodehelper_setup. So avoid confusion and the possibility of an odd driver name causing problems by just using a fixed argv array with a cast in the call to call_usermodehelper_setup. v1: https://lkml.kernel.org/r/87sged3a9n.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-16-ebiederm@xmission.com Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 8c2f52663973e643c617663d826e2b0daa008b38 Author: Eric W. Biederman Date: Thu Jun 25 17:40:40 2020 -0500 umd: Remove exit_umh The bpfilter code no longer uses the umd_info.cleanup callback. This callback is what exit_umh exists to call. So remove exit_umh and all of it's associated booking. v1: https://lkml.kernel.org/r/87bll6dlte.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87y2o53abg.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-15-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit e80eb1dc868bc1ed93602389d54b27f170ca770c Author: Eric W. Biederman Date: Thu Jun 25 17:23:22 2020 -0500 bpfilter: Take advantage of the facilities of struct pid Instead of relying on the exit_umh cleanup callback use the fact a struct pid can be tested to see if a process still exists, and that struct pid has a wait queue that notifies when the process dies. v1: https://lkml.kernel.org/r/87h7uydlu9.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/874kqt4owu.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-14-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 38fd525a4c61e7ecdc9ad4dcbf7b767d0a007962 Author: Eric W. Biederman Date: Wed Jul 1 07:30:06 2020 -0500 exit: Factor thread_group_exited out of pidfd_poll Create an independent helper thread_group_exited which returns true when all threads have passed exit_notify in do_exit. AKA all of the threads are at least zombies and might be dead or completely gone. Create this helper by taking the logic out of pidfd_poll where it is already tested, and adding a READ_ONCE on the read of task->exit_state. I will be changing the user mode driver code to use this same logic to know when a user mode driver needs to be restarted. Place the new helper thread_group_exited in kernel/exit.c and EXPORT it so it can be used by modules. Link: https://lkml.kernel.org/r/20200702164140.4468-13-ebiederm@xmission.com Acked-by: Christian Brauner Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit cc33b23e1e1cf54bcb9e5c193e3888a3b17a5479 Author: Xi Wang Date: Tue Jun 30 22:01:36 2020 +0800 RDMA/hns: Optimize MTR level-0 addressing to access huge page If hns ROCEE is set to level-0 addressing, the length of the entire buffer can be used as the page size. The driver needn't to split the buffer into small units because all pages are continuous. Link: https://lore.kernel.org/r/1593525696-12570-1-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 5c99274be8864519328aa74bc550ba410095bc1c Author: Zhu Yanjun Date: Tue Jun 30 15:36:05 2020 +0300 RDMA/rxe: Skip dgid check in loopback mode In the loopback tests, the following call trace occurs. Call Trace: __rxe_do_task+0x1a/0x30 [rdma_rxe] rxe_qp_destroy+0x61/0xa0 [rdma_rxe] rxe_destroy_qp+0x20/0x60 [rdma_rxe] ib_destroy_qp_user+0xcc/0x220 [ib_core] uverbs_free_qp+0x3c/0xc0 [ib_uverbs] destroy_hw_idr_uobject+0x24/0x70 [ib_uverbs] uverbs_destroy_uobject+0x43/0x1b0 [ib_uverbs] uobj_destroy+0x41/0x70 [ib_uverbs] __uobj_get_destroy+0x39/0x70 [ib_uverbs] ib_uverbs_destroy_qp+0x88/0xc0 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0xb9/0xf0 [ib_uverbs] ib_uverbs_cmd_verbs+0xb16/0xc30 [ib_uverbs] The root cause is that the actual RDMA connection is not created in the loopback tests and the rxe_match_dgid will fail randomly. To fix this call trace which appear in the loopback tests, skip check of the dgid. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200630123605.446959-1-leon@kernel.org Signed-off-by: Zhu Yanjun Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 15d8ce05ebec37a0d701cde768bbf21349f2329d Author: Alain Michaud Date: Tue Jul 7 17:46:06 2020 +0200 Bluetooth: le_simult_central_peripheral experimental feature This patch adds an le_simult_central_peripheral features which allows a clients to determine if the controller is able to support peripheral and central connections separately and at the same time. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann commit b83764f9220a4a14525657466f299850bbc98de9 Author: Miao-chen Chou Date: Mon Jun 29 20:15:00 2020 -0700 Bluetooth: Fix kernel oops triggered by hci_adv_monitors_clear() This fixes the kernel oops by removing unnecessary background scan update from hci_adv_monitors_clear() which shouldn't invoke any work queue. The following test was performed. - Run "rmmod btusb" and verify that no kernel oops is triggered. Signed-off-by: Miao-chen Chou Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 461f95f04f19382dcfd17da2d8db37e0cdc719f2 Author: Hilda Wu Date: Tue Jun 30 21:09:40 2020 +0800 Bluetooth: btusb: USB alternate setting 1 for WBS RTL8822CE supports transparent WBS to apply USB alternate setting 1. Add a flag to the device match data to apply alternate setting 1 which meet the transfer speed for WBS support. Signed-off-by: Hilda Wu Signed-off-by: Marcel Holtmann commit d4edda0f791fccf4cbb8a88566a8f2b1228faaee Author: Alain Michaud Date: Mon Jun 29 17:04:15 2020 +0000 Bluetooth: use configured default params for active scans This patch fixes active scans to use the configured default parameters. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 49b020c1d236a36a4533e7db6d2604cb57ed4c51 Author: Alain Michaud Date: Mon Jun 29 16:11:00 2020 +0000 Bluetooth: Adding a configurable autoconnect timeout This patch adds a configurable LE autoconnect timeout. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 343ad3964d2f10646178ed3caa2db6e75fe84612 Author: Martin Blumenstingl Date: Mon Jun 29 20:05:45 2020 +0200 dt-bindings: net: bluetooth: realtek: Fix uart-has-rtscts example uart-has-rtscts is a boolean property. These are defined as present (which means that this property evaluates to "true") or absent (which means that this property evaluates to "false"). Remove the numeric value from the example to make it comply with the boolean property bindings. Fixes: 1cc2d0e021f867 ("dt-bindings: net: bluetooth: Add rtl8723bs-bluetooth") Signed-off-by: Martin Blumenstingl Signed-off-by: Marcel Holtmann commit 6d0bdc42842a8507c8218244b4ced09ca698d965 Author: Michael Hanselmann Date: Tue Jul 7 16:53:22 2020 +0200 USB: serial: ch341: fix missing simulated-break margin On devices which do not support break signalling a break condition is simulated by sending a NUL byte at the lowest possible speed. The break condition will be 9 bit periods long (start bit and eight data bits), but the transmission itself also includes the stop bit. Add the missing safety margin of one bit which is intended to account for timing differences, and fix up the corresponding comment. Signed-off-by: Michael Hanselmann Link: https://lore.kernel.org/r/9909b288-294d-16b9-9f14-51eb79c63b6c@msgid.hansmi.ch [ johan: amend commit message ] Signed-off-by: Johan Hovold commit 824001cb64c007129cd8bb95649a3eea9542e870 Author: Ansuel Smith Date: Mon Jun 15 23:06:08 2020 +0200 PCI: qcom: Replace define with standard value Lots of define are actually already defined in pci_regs.h, directly use the standard defines. Link: https://lore.kernel.org/r/20200615210608.21469-13-ansuelsmth@gmail.com Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Acked-by: Stanimir Varbanov commit 51ed2c2b60265006bde7531d10993cf24def0aee Author: Sham Muthayyan Date: Mon Jun 15 23:06:07 2020 +0200 PCI: qcom: Support pci speed set for ipq806x Some SoC based on ipq8064/5 needs to be limited to pci GEN1 speed due to some hardware limitations. Add support for speed setting defined by the max-link-speed binding. If not defined the max speed is set to GEN2 by default. Link: https://lore.kernel.org/r/20200615210608.21469-12-ansuelsmth@gmail.com Signed-off-by: Sham Muthayyan Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Stanimir Varbanov commit d511580ea9c275793224bc47471001b8dea64133 Author: Ansuel Smith Date: Mon Jun 15 23:06:06 2020 +0200 dt-bindings: PCI: qcom: Add ipq8064 rev 2 variant Document qcom,pcie-ipq8064-v2 needed to use different phy_tx0_term_offset. In ipq8064 phy_tx0_term_offset is 7. In ipq8064 v2 other SoC it's set to 0 by default. Link: https://lore.kernel.org/r/20200615210608.21469-11-ansuelsmth@gmail.com Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring Acked-by: Stanimir Varbanov commit 8df093fe2ae1717389df0dcdc620c02cc35abb21 Author: Ansuel Smith Date: Mon Jun 15 23:06:05 2020 +0200 PCI: qcom: Add ipq8064 rev2 variant Ipq8064-v2 have tx term offset set to 0. Introduce this variant to permit different offset based on the revision. Link: https://lore.kernel.org/r/20200615210608.21469-10-ansuelsmth@gmail.com Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Acked-by: Stanimir Varbanov commit de3c4bf648975ea0b1d344d811e9b0748907b47c Author: Ansuel Smith Date: Mon Jun 15 23:06:04 2020 +0200 PCI: qcom: Add support for tx term offset for rev 2.1.0 Add tx term offset support to pcie qcom driver need in some revision of the ipq806x SoC. Ipq8064 needs tx term offset set to 7. Link: https://lore.kernel.org/r/20200615210608.21469-9-ansuelsmth@gmail.com Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-by: Sham Muthayyan Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Acked-by: Stanimir Varbanov Cc: stable@vger.kernel.org # v4.5+ commit 5149901e9e6deca487c01cc434a3ac4125c7b00b Author: Ansuel Smith Date: Mon Jun 15 23:06:03 2020 +0200 PCI: qcom: Define some PARF params needed for ipq8064 SoC Set some specific value for Tx De-Emphasis, Tx Swing and Rx equalization needed on some ipq8064 based device (Netgear R7800 for example). Without this the system locks on kernel load. Link: https://lore.kernel.org/r/20200615210608.21469-8-ansuelsmth@gmail.com Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Stanimir Varbanov Cc: stable@vger.kernel.org # v4.5+ commit 6a114526af4689938863bf34976c83bfd279f517 Author: Ansuel Smith Date: Mon Jun 15 23:06:02 2020 +0200 PCI: qcom: Use bulk clk api and assert on error Rework 2.1.0 revision to use bulk clk api and fix missing assert on reset_control_deassert error. Link: https://lore.kernel.org/r/20200615210608.21469-7-ansuelsmth@gmail.com Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Stanimir Varbanov commit b11b8cc161de027343ba6ae0c88a2ad5231a430f Author: Ansuel Smith Date: Mon Jun 15 23:06:01 2020 +0200 dt-bindings: PCI: qcom: Add ext reset Document ext reset used in ipq8064 SoC by qcom PCIe driver. Link: https://lore.kernel.org/r/20200615210608.21469-6-ansuelsmth@gmail.com Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring Acked-by: Stanimir Varbanov commit ee367e2cdd2202b5714982739e684543cd2cee0e Author: Ansuel Smith Date: Mon Jun 15 23:06:00 2020 +0200 PCI: qcom: Add missing reset for ipq806x Add missing ext reset used by ipq8064 SoC in PCIe qcom driver. Link: https://lore.kernel.org/r/20200615210608.21469-5-ansuelsmth@gmail.com Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-by: Sham Muthayyan Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Philipp Zabel Acked-by: Stanimir Varbanov Cc: stable@vger.kernel.org # v4.5+ commit dd58318c019f10bc94db36df66af6c55d4c0cbba Author: Abhishek Sahu Date: Mon Jun 15 23:05:59 2020 +0200 PCI: qcom: Change duplicate PCI reset to phy reset The deinit issues reset_control_assert for PCI twice and does not contain phy reset. Link: https://lore.kernel.org/r/20200615210608.21469-4-ansuelsmth@gmail.com Signed-off-by: Abhishek Sahu Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Stanimir Varbanov commit 736ae5c91712ba2686ea38f82d7c5eb716b625e3 Author: Ansuel Smith Date: Mon Jun 15 23:05:58 2020 +0200 dt-bindings: PCI: qcom: Add missing clks Document missing clks used in ipq8064 SoC. Link: https://lore.kernel.org/r/20200615210608.21469-3-ansuelsmth@gmail.com Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Acked-by: Rob Herring Acked-by: Stanimir Varbanov commit 8b6f0330b5f9a7543356bfa9e76d580f03aa2c1e Author: Ansuel Smith Date: Mon Jun 15 23:05:57 2020 +0200 PCI: qcom: Add missing ipq806x clocks in PCIe driver Aux and Ref clk are missing in PCIe qcom driver. Add support for this optional clks for ipq8064/apq8064 SoC. Link: https://lore.kernel.org/r/20200615210608.21469-2-ansuelsmth@gmail.com Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-by: Sham Muthayyan Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Stanimir Varbanov commit c6c83d757a13a5df51428a6fe133c9193810507b Author: Anshuman Khandual Date: Tue Jul 7 19:53:13 2020 +0530 arm64/cpufeature: Validate feature bits spacing in arm64_ftr_regs[] arm64_feature_bits for a register in arm64_ftr_regs[] are in a descending order as per their shift values. Validate that these features bits are defined correctly and do not overlap with each other. This check protects against any inadvertent erroneous changes to the register definitions. Signed-off-by: Anshuman Khandual Reviewed-by: Suzuki K Poulose Cc: Will Deacon Cc: Suzuki K Poulose Cc: Mark Brown Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1594131793-9498-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit b1bd5714472cc72e14409f5659b154c765a76c65 Author: Pali Rohár Date: Mon Jun 1 15:03:15 2020 +0200 PCI: aardvark: Indicate error in 'val' when config read fails Most callers of config read do not check for return value. But most of the ones that do, checks for error indication in 'val' variable. This patch updates error handling in advk_pcie_rd_conf() function. If PIO transfer fails then 'val' variable is set to 0xffffffff which indicates failture. Link: https://lore.kernel.org/r/20200528162604.GA323482@bjorn-Precision-5520 Link: https://lore.kernel.org/r/20200601130315.18895-1-pali@kernel.org Reported-by: Bjorn Helgaas Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi commit 2fb94e36b6833332057043699d3338228f6e1e2b Author: Darrick J. Wong Date: Thu Jul 2 08:42:13 2020 -0700 xfs: rtbitmap scrubber should check inode size Make sure the rtbitmap is large enough to store the entire bitmap. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins commit f866560be21966421c4a6e83079a6b76fadf667f Author: Darrick J. Wong Date: Thu Jul 2 08:42:12 2020 -0700 xfs: rtbitmap scrubber should verify written extents Ensure that the realtime bitmap file is backed entirely by written extents. No holes, no unwritten blocks, etc. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Collins commit e2705b0304778916db87831217ec642e34d9d9fa Author: Dave Chinner Date: Mon Jun 29 14:49:20 2020 -0700 xfs: remove xfs_inobp_check() This debug code is called on every xfs_iflush() call, which then checks every inode in the buffer for non-zero unlinked list field. Hence it checks every inode in the cluster buffer every time a single inode on that cluster it flushed. This is resulting in: - 38.91% 5.33% [kernel] [k] xfs_iflush - 17.70% xfs_iflush - 9.93% xfs_inobp_check 4.36% xfs_buf_offset 10% of the CPU time spent flushing inodes is repeatedly checking unlinked fields in the buffer. We don't need to do this. The other place we call xfs_inobp_check() is xfs_iunlink_update_dinode(), and this is after we've done this assert for the agino we are about to write into that inode: ASSERT(xfs_verify_agino_or_null(mp, agno, next_agino)); which means we've already checked that the agino we are about to write is not 0 on debug kernels. The inode buffer verifiers do everything else we need, so let's just remove this debug code. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit a69a1dc2842e4548efca956c86e0816f2662ccb7 Author: Dave Chinner Date: Mon Jun 29 14:49:20 2020 -0700 xfs: factor xfs_iflush_done xfs_iflush_done() does 3 distinct operations to the inodes attached to the buffer. Separate these operations out into functions so that it is easier to modify these operations independently in future. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5717ea4d527acbec9300cb083b100dd0003ac777 Author: Dave Chinner Date: Mon Jun 29 14:49:20 2020 -0700 xfs: rework xfs_iflush_cluster() dirty inode iteration Now that we have all the dirty inodes attached to the cluster buffer, we don't actually have to do radix tree lookups to find them. Sure, the radix tree is efficient, but walking a linked list of just the dirty inodes attached to the buffer is much better. We are also no longer dependent on having a locked inode passed into the function to determine where to start the lookup. This means we can drop it from the function call and treat all inodes the same. We also make xfs_iflush_cluster skip inodes marked with XFS_IRECLAIM. This we avoid races with inodes that reclaim is actively referencing or are being re-initialised by inode lookup. If they are actually dirty, they'll get written by a future cluster flush.... We also add a shutdown check after obtaining the flush lock so that we catch inodes that are dirty in memory and may have inconsistent state due to the shutdown in progress. We abort these inodes directly and so they remove themselves directly from the buffer list and the AIL rather than having to wait for the buffer to be failed and callbacks run to be processed correctly. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e6187b3444e88ed9aa5f3843603e1f024b6d0309 Author: Dave Chinner Date: Mon Jun 29 14:49:19 2020 -0700 xfs: rename xfs_iflush_int() with xfs_iflush() gone, we can rename xfs_iflush_int() back to xfs_iflush(). Also move it up above xfs_iflush_cluster() so we don't need the forward definition any more. Signed-off-by: Dave Chinner Reviewed-by: Amir Goldstein Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 90c60e16401248a4900f3f9387f563d0178dcf34 Author: Dave Chinner Date: Mon Jun 29 14:49:19 2020 -0700 xfs: xfs_iflush() is no longer necessary Now we have a cached buffer on inode log items, we don't need to do buffer lookups when flushing inodes anymore - all we need to do is lock the buffer and we are ready to go. This largely gets rid of the need for xfs_iflush(), which is essentially just a mechanism to look up the buffer and flush the inode to it. Instead, we can just call xfs_iflush_cluster() with a few modifications to ensure it also flushes the inode we already hold locked. This allows the AIL inode item pushing to be almost entirely non-blocking in XFS - we won't block unless memory allocation for the cluster inode lookup blocks or the block device queues are full. Writeback during inode reclaim becomes a little more complex because we now have to lock the buffer ourselves, but otherwise this change is largely a functional no-op that removes a whole lot of code. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 48d55e2ae3ce837598c073995bbbac5d24a35fe1 Author: Dave Chinner Date: Mon Jun 29 14:49:18 2020 -0700 xfs: attach inodes to the cluster buffer when dirtied Rather than attach inodes to the cluster buffer just when we are doing IO, attach the inodes to the cluster buffer when they are dirtied. The means the buffer always carries a list of dirty inodes that reference it, and we can use that list to make more fundamental changes to inode writeback that aren't otherwise possible. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 71e3e35646861f2f9b8d36e00720904ed3ca31cb Author: Dave Chinner Date: Mon Jun 29 14:49:18 2020 -0700 xfs: rework stale inodes in xfs_ifree_cluster Once we have inodes pinning the cluster buffer and attached whenever they are dirty, we no longer have a guarantee that the items are flush locked when we lock the cluster buffer. Hence we cannot just walk the buffer log item list and modify the attached inodes. If the inode is not flush locked, we have to ILOCK it first and then flush lock it to do all the prerequisite checks needed to avoid races with other code. This is already handled by xfs_ifree_get_one_inode(), so rework the inode iteration loop and function to update all inodes in cache whether they are attached to the buffer or not. Note: we also remove the copying of the log item lsn to the ili_flush_lsn as xfs_iflush_done() now uses the XFS_ISTALE flag to trigger aborts and so flush lsn matching is not needed in IO completion for processing freed inodes. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 02511a5a6a49f9730ad215caa77e4d980008c6c6 Author: Dave Chinner Date: Mon Jun 29 14:49:18 2020 -0700 xfs: clean up inode reclaim comments Inode reclaim is quite different now to the way described in various comments, so update all the comments explaining what it does and how it works. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 4d0bab3a44686f26be7ee7295c6c1987605ae35e Author: Dave Chinner Date: Wed Jul 1 10:21:28 2020 -0700 xfs: remove SYNC_WAIT from xfs_reclaim_inodes() Clean up xfs_reclaim_inodes() callers. Most callers want blocking behaviour, so just make the existing SYNC_WAIT behaviour the default. For the xfs_reclaim_worker(), just call xfs_reclaim_inodes_ag() directly because we just want optimistic clean inode reclaim to be done in the background. For xfs_quiesce_attr() we can just remove the inode reclaim calls as they are a historic relic that was required to flush dirty inodes that contained unlogged changes. We now log all changes to the inodes, so the sync AIL push from xfs_log_quiesce() called by xfs_quiesce_attr() will do all the required inode writeback for freeze. Seeing as we now want to loop until all reclaimable inodes have been reclaimed, make xfs_reclaim_inodes() loop on the XFS_ICI_RECLAIM_TAG tag rather than having xfs_reclaim_inodes_ag() tell it that inodes were skipped. This is much more reliable and will always loop until all reclaimable inodes are reclaimed. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 50718b8d73dda01bb168f9f3b16f6311a2debe7b Author: Dave Chinner Date: Wed Jul 1 10:21:05 2020 -0700 xfs: remove SYNC_TRYLOCK from inode reclaim All background reclaim is SYNC_TRYLOCK already, and even blocking reclaim (SYNC_WAIT) can use trylock mechanisms as xfs_reclaim_inodes_ag() will keep cycling until there are no more reclaimable inodes. Hence we can kill SYNC_TRYLOCK from inode reclaim and make everything unconditionally non-blocking. We remove all the optimistic "avoid blocking on locks" checks done in xfs_reclaim_inode_grab() as nothing blocks on locks anymore. Further, checking XFS_IFLOCK optimistically can result in detecting inodes in the process of being cleaned (i.e. between being removed from the AIL and having the flush lock dropped), so for xfs_reclaim_inodes() to reliably reclaim all inodes we need to drop these checks anyway. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 9552e14d3e879a3b4281427ef368271f371ea167 Author: Dave Chinner Date: Mon Jun 29 14:49:17 2020 -0700 xfs: don't block inode reclaim on the ILOCK When we attempt to reclaim an inode, the first thing we do is take the inode lock. This is blocking right now, so if the inode being accessed by something else (e.g. being flushed to the cluster buffer) we will block here. Change this to a trylock so that we do not block inode reclaim unnecessarily here. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 0e8e2c6343dd74a4f55f8507a9fae9064d456436 Author: Dave Chinner Date: Mon Jun 29 14:49:16 2020 -0700 xfs: allow multiple reclaimers per AG Inode reclaim will still throttle direct reclaim on the per-ag reclaim locks. This is no longer necessary as reclaim can run non-blocking now. Hence we can remove these locks so that we don't arbitrarily block reclaimers just because there are more direct reclaimers than there are AGs. This can result in multiple reclaimers working on the same range of an AG, but this doesn't cause any apparent issues. Optimising the spread of concurrent reclaimers for best efficiency can be done in a future patchset. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 617825fe3489ac231790e5c843107168838b8547 Author: Dave Chinner Date: Mon Jun 29 14:49:16 2020 -0700 xfs: remove IO submission from xfs_reclaim_inode() We no longer need to issue IO from shrinker based inode reclaim to prevent spurious OOM killer invocation. This leaves only the global filesystem management operations such as unmount needing to writeback dirty inodes and reclaim them. Instead of using the reclaim pass to write dirty inodes before reclaiming them, use the AIL to push all the dirty inodes before we try to reclaim them. This allows us to remove all the conditional SYNC_WAIT locking and the writeback code from xfs_reclaim_inode() and greatly simplify the checks we need to do to reclaim an inode. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 993f951f501c85e963b3664739c07196a286eac7 Author: Dave Chinner Date: Mon Jun 29 14:49:16 2020 -0700 xfs: make inode reclaim almost non-blocking Now that dirty inode writeback doesn't cause read-modify-write cycles on the inode cluster buffer under memory pressure, the need to throttle memory reclaim to the rate at which we can clean dirty inodes goes away. That is due to the fact that we no longer thrash inode cluster buffers under memory pressure to clean dirty inodes. This means inode writeback no longer stalls on memory allocation or read IO, and hence can be done asynchronously without generating memory pressure. As a result, blocking inode writeback in reclaim is no longer necessary to prevent reclaim priority windup as cleaning dirty inodes is no longer dependent on having memory reserves available for the filesystem to make progress reclaiming inodes. Hence we can convert inode reclaim to be non-blocking for shrinker callouts, both for direct reclaim and kswapd. On a vanilla kernel, running a 16-way fsmark create workload on a 4 node/16p/16GB RAM machine, I can reliably pin 14.75GB of RAM via userspace mlock(). The OOM killer gets invoked at 15GB of pinned RAM. Without the inode cluster pinning, this non-blocking reclaim patch triggers premature OOM killer invocation with the same memory pinning, sometimes with as much as 45% of RAM being free. It's trivially easy to trigger the OOM killer when reclaim does not block. With pinning inode clusters in RAM and then adding this patch, I can reliably pin 14.5GB of RAM and still have the fsmark workload run to completion. The OOM killer gets invoked 14.75GB of pinned RAM, which is only a small amount of memory less than the vanilla kernel. It is much more reliable than just with async reclaim alone. simoops shows that allocation stalls go away when async reclaim is used. Vanilla kernel: Run time: 1924 seconds Read latency (p50: 3,305,472) (p95: 3,723,264) (p99: 4,001,792) Write latency (p50: 184,064) (p95: 553,984) (p99: 807,936) Allocation latency (p50: 2,641,920) (p95: 3,911,680) (p99: 4,464,640) work rate = 13.45/sec (avg 13.44/sec) (p50: 13.46) (p95: 13.58) (p99: 13.70) alloc stall rate = 3.80/sec (avg: 2.59) (p50: 2.54) (p95: 2.96) (p99: 3.02) With inode cluster pinning and async reclaim: Run time: 1924 seconds Read latency (p50: 3,305,472) (p95: 3,715,072) (p99: 3,977,216) Write latency (p50: 187,648) (p95: 553,984) (p99: 789,504) Allocation latency (p50: 2,748,416) (p95: 3,919,872) (p99: 4,448,256) work rate = 13.28/sec (avg 13.32/sec) (p50: 13.26) (p95: 13.34) (p99: 13.34) alloc stall rate = 0.02/sec (avg: 0.02) (p50: 0.01) (p95: 0.03) (p99: 0.03) Latencies don't really change much, nor does the work rate. However, allocation almost never stalls with these changes, whilst the vanilla kernel is sometimes reporting 20 stalls/s over a 60s sample period. This difference is due to inode reclaim being largely non-blocking now. IOWs, once we have pinned inode cluster buffers, we can make inode reclaim non-blocking without a major risk of premature and/or spurious OOM killer invocation, and without any changes to memory reclaim infrastructure. Signed-off-by: Dave Chinner Reviewed-by: Amir Goldstein Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 298f7bec503f30bd98242ec02df6abe13b31a677 Author: Dave Chinner Date: Mon Jun 29 14:49:15 2020 -0700 xfs: pin inode backing buffer to the inode log item When we dirty an inode, we are going to have to write it disk at some point in the near future. This requires the inode cluster backing buffer to be present in memory. Unfortunately, under severe memory pressure we can reclaim the inode backing buffer while the inode is dirty in memory, resulting in stalling the AIL pushing because it has to do a read-modify-write cycle on the cluster buffer. When we have no memory available, the read of the cluster buffer blocks the AIL pushing process, and this causes all sorts of issues for memory reclaim as it requires inode writeback to make forwards progress. Allocating a cluster buffer causes more memory pressure, and results in more cluster buffers to be reclaimed, resulting in more RMW cycles to be done in the AIL context and everything then backs up on AIL progress. Only the synchronous inode cluster writeback in the the inode reclaim code provides some level of forwards progress guarantees that prevent OOM-killer rampages in this situation. Fix this by pinning the inode backing buffer to the inode log item when the inode is first dirtied (i.e. in xfs_trans_log_inode()). This may mean the first modification of an inode that has been held in cache for a long time may block on a cluster buffer read, but we can do that in transaction context and block safely until the buffer has been allocated and read. Once we have the cluster buffer, the inode log item takes a reference to it, pinning it in memory, and attaches it to the log item for future reference. This means we can always grab the cluster buffer from the inode log item when we need it. When the inode is finally cleaned and removed from the AIL, we can drop the reference the inode log item holds on the cluster buffer. Once all inodes on the cluster buffer are clean, the cluster buffer will be unpinned and it will be available for memory reclaim to reclaim again. This avoids the issues with needing to do RMW cycles in the AIL pushing context, and hence allows complete non-blocking inode flushing to be performed by the AIL pushing context. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e98084b8bef7e357dbd201b162fea0817d1908c5 Author: Dave Chinner Date: Mon Jun 29 14:49:15 2020 -0700 xfs: move xfs_clear_li_failed out of xfs_ail_delete_one() xfs_ail_delete_one() is called directly from dquot and inode IO completion, as well as from the generic xfs_trans_ail_delete() function. Inodes are about to have their own failure handling, and dquots will in future, too. Pull the clearing of the LI_FAILED flag up into the callers so we can customise the code appropriately. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3536b61e74aa232d0ae42cff57b80278724f209c Author: Dave Chinner Date: Mon Jun 29 14:49:15 2020 -0700 xfs: unwind log item error flagging When an buffer IO error occurs, we want to mark all the log items attached to the buffer as failed. Open code the error handling loop so that we can modify the flagging for the different types of objects directly and independently of each other. This also allows us to remove the ->iop_error method from the log item operations. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 428947e9d525ae3a03dbdce4cdbcb2afe020732d Author: Dave Chinner Date: Mon Jun 29 14:49:14 2020 -0700 xfs: handle buffer log item IO errors directly Currently when a buffer with attached log items has an IO error it called ->iop_error for each attched log item. These all call xfs_set_li_failed() to handle the error, but we are about to change the way log items manage buffers. hence we first need to remove the per-item dependency on buffer handling done by xfs_set_li_failed(). We already have specific buffer type IO completion routines, so move the log item error handling out of the generic error handling and into the log item specific functions so we can implement per-type error handling easily. This requires a more complex return value from the error handling code so that we can take the correct action the failure handling requires. This results in some repeated boilerplate in the functions, but that can be cleaned up later once all the changes cascade through this code. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2ef3f7f5db15aea47b92fd770bc45cf317aa2b97 Author: Dave Chinner Date: Mon Jun 29 14:49:14 2020 -0700 xfs: get rid of log item callbacks They are not used anymore, so remove them from the log item and the buffer iodone attachment interfaces. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit fec671cd350ff3ef737a83236ab2c6d3e4b8d600 Author: Dave Chinner Date: Mon Jun 29 14:49:14 2020 -0700 xfs: clean up the buffer iodone callback functions Now that we've sorted inode and dquot buffers, we can apply the same cleanups to dirty buffers with buffer log items. They only have one callback, too, so we don't need the log item callback. Collapse the iodone functions and remove all the now unnecessary infrastructure around callback processing. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 55cdf0a283b876050f0c502685adc346180d7a2f Author: Daniel Lezcano Date: Mon Jul 6 12:55:38 2020 +0200 thermal: core: Add notifications call in the framework The generic netlink protocol is implemented but the different notification functions are not yet connected to the core code. These changes add the notification calls in the different corresponding places. Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Acked-by: Zhang Rui Link: https://lore.kernel.org/r/20200706105538.2159-4-daniel.lezcano@linaro.org commit 1ce50e7d408ef2bdc8ca021363fd46d1b8bfad00 Author: Daniel Lezcano Date: Mon Jul 6 12:55:37 2020 +0200 thermal: core: genetlink support for events/cmd/sampling Initially the thermal framework had a very simple notification mechanism to send generic netlink messages to the userspace. The notification function was never called from anywhere and the corresponding dead code was removed. It was probably a first attempt to introduce the netlink notification. At LPC2018, the presentation "Linux thermal: User kernel interface", proposed to create the notifications to the userspace via a kfifo. The advantage of the kfifo is the performance. It is usually used from a 1:1 communication channel where a driver captures data and sends it as fast as possible to a userspace process. The drawback is that only one process uses the notification channel exclusively, thus no other process is allowed to use the channel to get temperature or notifications. This patch defines a generic netlink API to discover the current thermal setup and adds event notifications as well as temperature sampling. As any genetlink protocol, it can evolve and the versioning allows to keep the backward compatibility. In order to prevent the user from getting flooded with data on a single channel, there are two multicast channels, one for the temperature sampling when the thermal zone is updated and another one for the events, so the user can get the events only without the thermal zone temperature sampling. Also, a list of commands to discover the thermal setup is added and can be extended when needed. Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Acked-by: Zhang Rui Link: https://lore.kernel.org/r/20200706105538.2159-3-daniel.lezcano@linaro.org commit 329b064fbd13d6526fdc35d4a220adedeadf0816 Author: Daniel Lezcano Date: Mon Jul 6 12:55:36 2020 +0200 thermal: core: Get thermal zone by id The next patch will introduce the generic netlink protocol to handle events, sampling and command from the thermal framework. In order to deal with the thermal zone, it uses its unique identifier to characterize it in the message. Passing an integer is more efficient than passing an entire string. This change provides a function returning back a thermal zone pointer corresponding to the identifier passed as parameter. Signed-off-by: Daniel Lezcano Reviewed-by: Amit Kucheria Acked-by: Zhang Rui Link: https://lore.kernel.org/r/20200706105538.2159-2-daniel.lezcano@linaro.org commit 3d44a509c1dafb75adfe218f022ad216885c135e Author: Daniel Lezcano Date: Mon Jul 6 12:55:35 2020 +0200 thermal: core: Add helpers to browse the cdev, tz and governor list The cdev, tz and governor list, as well as their respective locks are statically defined in the thermal_core.c file. In order to give a sane access to these list, like browsing all the thermal zones or all the cooling devices, let's define a set of helpers where we pass a callback as a parameter to be called for each thermal entity. We keep the self-encapsulation and ensure the locks are correctly taken when looking at the list. Acked-by: Zhang Rui Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200706105538.2159-1-daniel.lezcano@linaro.org commit 08fbd8a5fb24e504ffd278208576afdeefc93a2d Author: Neil Armstrong Date: Tue Jul 7 15:50:09 2020 +0200 drm/meson: overlay: fix build failure The recent GCC compiler is very picky with the VD_H_START() and AFBC_DEC_PIXEL_BGN_H() macros, triggering a runtime assert error as: In function 'meson_overlay_setup_scaler_params', inlined from 'meson_overlay_atomic_update' at drivers/gpu/drm/meson/meson_overlay.c:542:2: ./include/linux/compiler.h:392:38: error: call to '__compiletime_assert_341' declared with attribute error: FIELD_PREP: value too large for the field drivers/gpu/drm/meson/meson_overlay.c:413:4: note: in expansion of macro 'AFBC_DEC_PIXEL_BGN_H' 413 | AFBC_DEC_PIXEL_BGN_H(hd_start_lines - afbc_left) | | ^~~~~~~~~~~~~~~~~~~~ ./include/linux/compiler.h:392:38: error: call to '__compiletime_assert_401' declared with attribute error: FIELD_PREP: value too large for the field It's not expected to overflow these fields, but the compiler did find a case where it overflows. We can safely ignore this, so mask the value with the field width. Fixes: e860785d57306 ("drm/meson: overlay: setup overlay for Amlogic FBC") Signed-off-by: Neil Armstrong Acked-by: Daniel Vetter [narmstrong: moved to (value) to avoid precedence issues] Link: https://patchwork.freedesktop.org/patch/msgid/20200707135009.32474-1-narmstrong@baylibre.com commit 0e801d547cf3d988edb17514e1f0d5b7b1fd7e90 Merge: 411b0f305b4ba cfdab2cd85ecd Author: Mark Brown Date: Tue Jul 7 14:26:34 2020 +0100 Merge series "spi: spi-geni-qcom: Avoid a bunch of per-transfer overhead" from Douglas Anderson : This series tries to reduce a whole bunch of overhead in each SPI transfer. Much of this overhead is new with the recent interconnect changes, but even without those changes we still had some overhead that we could avoid. Let's avoid all of it. These changes are atop the Qualcomm tree to avoid merge conflicts. If they look good, the most expedient way to land them is probably to get Ack's from Mark and land then via the Qualcomm tree. Most testing was done on the Chrome OS 5.4 tree, but sanity check was done on mainline. Douglas Anderson (3): spi: spi-geni-qcom: Avoid clock setting if not needed spi: spi-geni-qcom: Set an autosuspend delay of 250 ms spi: spi-geni-qcom: Get rid of most overhead in prepare_message() drivers/spi/spi-geni-qcom.c | 67 ++++++++++++++++++------------------- 1 file changed, 32 insertions(+), 35 deletions(-) -- 2.27.0.383.g050319c2ae-goog commit 411b0f305b4ba05a7bae6b0fe924d02a3086eed6 Merge: 2d9a744685bc3 7716fa8068d41 Author: Mark Brown Date: Tue Jul 7 14:26:33 2020 +0100 Merge series "spi: spi-sun6i: One fix and some improvements" from Marc Kleine-Budde : Hello, this series first fixes the calculation of the clock rate. The driver will round up to the nearest clock rate instead of rounding down. Resulting in SPI devices accessed with a too high SPI clock. The remaining patches improve the performance of the driver. The changes range from micro-optimizations like reducing MMIO writes to the controller to reducing the number of needed interrupts in some use cases. regards, Marc changes since v1: - added Maxime Ripard's to the existing patches - 06/10: (was 05/10 in v1) "spi: spi-sun6i: sun6i_spi_drain_fifo(): introduce sun6i_spi_get_rx_fifo_count() and make use of it" use FIELD_GET instead of open coding it (tnx: Maxime Ripard) - 05/10: "spi: spi-sun6i: sun6i_spi_get_tx_fifo_count: Convert manual shift+mask to FIELD_GET()" new patch _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 2d9a744685bc3a4bf1d097782550c450ff0c3b04 Author: Peng Fan Date: Tue Jul 7 16:50:42 2020 +0800 spi: atmel: No need to call spi_master_put() if spi_alloc_master() failed There is no need to call spi_master_put() if spi_alloc_master() failed, it should return -ENOMEM directly. Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1594111842-9468-1-git-send-email-fanpeng@loongson.cn Signed-off-by: Mark Brown commit cfdab2cd85ecd3f98837e5cc59dd3319cd9b6fff Author: Douglas Anderson Date: Wed Jul 1 17:45:08 2020 -0700 spi: spi-geni-qcom: Set an autosuspend delay of 250 ms In commit 0e3b8a81f5df ("spi: spi-geni-qcom: Add interconnect support") the spi_geni_runtime_suspend() and spi_geni_runtime_resume() became a bit slower. Measuring on my hardware I see numbers in the hundreds of microseconds now. Let's use autosuspend to help avoid some of the overhead. Now if we're doing a bunch of transfers we won't need to be constantly chruning. The number 250 ms for the autosuspend delay was picked a bit arbitrarily, so if someone has measurements showing a better value we could easily change this. Fixes: 0e3b8a81f5df ("spi: spi-geni-qcom: Add interconnect support") Signed-off-by: Douglas Anderson Reviewed-by: Akash Asthana Link: https://lore.kernel.org/r/20200701174506.2.I9b8f6bb1e7e6d8847e2ed2cf854ec55678db427f@changeid Signed-off-by: Mark Brown commit 318b8a09f295cbf86fd504bcff3769b1fc4a936b Author: Christoph Fritz Date: Tue Jul 7 12:57:31 2020 +0200 regulator: fan53880: Add support for COMPILE_TEST This patch adds support for COMPILE_TEST while fixing a warning when no support for device tree is there. Reported-by: kernel test robot Signed-off-by: Christoph Fritz Link: https://lore.kernel.org/r/1c437154873ace65ff738a0ebca511308f1cecc1.camel@googlemail.com Signed-off-by: Mark Brown commit 5f4962dd55d86d6a3ba5ddbfaf2d793e3b676a20 Author: Furquan Shaikh Date: Fri Jun 26 14:10:26 2020 -0700 pinctrl: amd: Honor IRQ trigger type requested by the caller This change drops the override in `amd_gpio_irq_set_type()` that ignores the IRQ trigger type settings from the caller. The device driver (caller) is in a better position to identify the right trigger type for the device based on the usage as well as the information exposed by the BIOS. There are instances where the device driver might want to configure the trigger type differently in different modes. An example of this is gpio-keys driver which configures IRQ type as trigger on both edges (to identify assert and deassert events) when in S0 and reconfigures the trigger type using the information provided by the BIOS when going into suspend to ensure that the wake happens on the required edge. This override in `amd_gpio_irq_set_type()` prevents the caller from being able to reconfigure trigger type once it is set either based on ACPI information or the type used by the first caller for IRQ on a given GPIO line. Without this change, pen-insert gpio key (used by garaged stylus on a Chromebook) works fine in S0 (i.e. insert and eject events are correctly identified), however, BIOS configuration for wake on only pen eject i.e. only-rising edge or only-falling edge is not honored. With this change, it was verified that pen-insert gpio key behavior is correct in both S0 and for wakeup from S3. Signed-off-by: Furquan Shaikh Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20200626211026.513520-1-furquan@google.com Signed-off-by: Linus Walleij commit f2b56a6b2b071e0c3b757c0179248a1b6bebab10 Author: Krzysztof Kozlowski Date: Fri Jun 26 10:05:52 2020 +0200 ARM: dts: ste: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache: $nodename:0: 'l2-cache' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200626080552.3627-1-krzk@kernel.org Signed-off-by: Linus Walleij commit f7f7a8f4ebf8b5489ed6c7ce4680a94dc51a35d5 Author: Krzysztof Kozlowski Date: Fri Jun 26 10:05:34 2020 +0200 ARM: dts: arm-realview: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache: $nodename:0: 'l2-cache' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200626080534.3400-1-krzk@kernel.org Signed-off-by: Linus Walleij commit a5911ac5790acaf98c929b826b3f7b4a438f9759 Author: Liao Pingfang Date: Tue Jul 7 19:47:47 2020 +0800 ASoC: fsl: mpc8610_hpcd: Add missing of_node_put() After finishing using device node got from of_find_compatible_node(), of_node_put() needs to be called. Signed-off-by: Liao Pingfang Link: https://lore.kernel.org/r/1594122467-11615-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Mark Brown commit ec75039d55500ee033236aa25f7642a5b449a23c Author: Geert Uytterhoeven Date: Wed Jul 1 13:42:12 2020 +0200 gpio: aggregator: Use bitmap_parselist() for parsing GPIO offsets Replace the custom code to parse GPIO offsets and/or GPIO offset ranges by a call to bitmap_parselist(), and an iteration over the returned bit mask. This should have no impact on the format of the configuration parameters written to the "new_device" virtual file in sysfs. Suggested-by: Andy Shevchenko Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200701114212.8520-3-geert+renesas@glider.be Signed-off-by: Linus Walleij commit 2073ea3ab181d42b4fd179ec3f74d53acefb563a Author: Geert Uytterhoeven Date: Wed Jul 1 13:42:11 2020 +0200 gpio: aggregator: Drop pre-initialization in get_arg() In get_arg(), the variable start is pre-initialized, but overwritten again in the first statement. Rework the assignment to not rely on pre-initialization, to make the code easier to read. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200701114212.8520-2-geert+renesas@glider.be Signed-off-by: Linus Walleij commit 84e7a946da71f678affacea301f6d5cb4d9784e8 Author: Paul Cercueil Date: Mon Jun 22 23:45:48 2020 +0200 pinctrl: ingenic: Properly detect GPIO direction when configured for IRQ The PAT1 register contains information about the IRQ type (edge/level) for input GPIOs with IRQ enabled, and the direction for non-IRQ GPIOs. So it makes sense to read it only if the GPIO has no interrupt configured, otherwise input GPIOs configured for level IRQs are misdetected as output GPIOs. Fixes: ebd6651418b6 ("pinctrl: ingenic: Implement .get_direction for GPIO chips") Reported-by: João Henrique Signed-off-by: Paul Cercueil Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200622214548.265417-2-paul@crapouillou.net Signed-off-by: Linus Walleij commit 1c95348ba327fe8621d3680890c2341523d3524a Author: Paul Cercueil Date: Mon Jun 22 23:45:47 2020 +0200 pinctrl: ingenic: Enhance support for IRQ_TYPE_EDGE_BOTH Ingenic SoCs don't natively support registering an interrupt for both rising and falling edges. This has to be emulated in software. Until now, this was emulated by switching back and forth between IRQ_TYPE_EDGE_RISING and IRQ_TYPE_EDGE_FALLING according to the level of the GPIO. While this worked most of the time, when used with GPIOs that need debouncing, some events would be lost. For instance, between the time a falling-edge interrupt happens and the interrupt handler configures the hardware for rising-edge, the level of the pin may have already risen, and the rising-edge event is lost. To address that issue, instead of switching back and forth between IRQ_TYPE_EDGE_RISING and IRQ_TYPE_EDGE_FALLING, we now switch back and forth between IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_LEVEL_HIGH. Since we always switch in the interrupt handler, they actually permit to detect level changes. In the example above, if the pin level rises before switching the IRQ type from IRQ_TYPE_LEVEL_LOW to IRQ_TYPE_LEVEL_HIGH, a new interrupt will raise as soon as the handler exits, and the rising-edge event will be properly detected. Fixes: e72394e2ea19 ("pinctrl: ingenic: Merge GPIO functionality") Reported-by: João Henrique Signed-off-by: Paul Cercueil Tested-by: João Henrique Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20200622214548.265417-1-paul@crapouillou.net Signed-off-by: Linus Walleij commit b77eab32c4492178adfb7ea81569c311120f5682 Author: Paul Cercueil Date: Mon Jun 22 13:37:40 2020 +0200 dt-bindings: pinctrl: Convert ingenic,pinctrl.txt to YAML Convert the ingenic,pinctrl.txt doc file to ingenic,pinctrl.yaml. In the process, some compatible strings now require a fallback, as the corresponding SoCs are pin-compatible with their fallback variant. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200622113740.46450-1-paul@crapouillou.net Signed-off-by: Linus Walleij commit 206c01d1ec14b5e238132ce7c8891ba02c3328c8 Author: Lee Jones Date: Mon Jun 22 09:34:32 2020 +0100 ARM: dts: ux500: Supply nodes for the other 2 AB8500 PWM devices As per 'struct mfd_cell ab8500_devs[]' there are not 1, but 3 PWM devices on the AB8500. Until now, each of them have referenced the same Device Tree node. This change ensures each device has their own. Due to recent `dtc` checks [0], nodes cannot share the same node name, so we are forced to rename the affected nodes by appending their associated numeric 'bank ID'. [0] ste-ab8500.dtsi:210.16-214.7: ERROR (duplicate_node_names): /soc/prcmu@80157000/ab8500/ab8500-pwm: Duplicate node name Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200622083432.1491715-1-lee.jones@linaro.org Signed-off-by: Linus Walleij commit 6fc1ed271fc4113d971953f5c3c77145c30f3f6e Author: Nick Reitemeyer Date: Sun Jun 21 21:38:23 2020 +0200 ARM: dts: ux500: samsung-golden: Add touchkey Adds support for the back and menu keys on golden. Signed-off-by: Nick Reitemeyer Tested-by: Stephan Gerhold Reviewed-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200621193822.133683-2-nick.reitemeyer@web.de Signed-off-by: Linus Walleij commit ce1d4d26b8ee536cdcc45b97db31e40be0ff5aa3 Merge: 5146b6a92c119 343403e2dad89 Author: Mark Brown Date: Tue Jul 7 13:03:23 2020 +0100 Merge series "ASoC: amd: remove warnings with make W=1" from Pierre-Louis Bossart : Yet another cleanup series, with good findings of variables not used for anything. Pierre-Louis Bossart (6): ASoC: amd: acp-da7219-max98357a: fix 'defined but not used' warning ASoC: amd: acp-rt5645: fix 'defined but not used' warning ASoC: amd: raven: acp3x-pcm-dma: fix 'set but not used' warning ASoC: amd: raven: acp3x-i2s: fix 'set but not used' warning ASoC: amd: raven: acp3x-pcm-dma: remove unused-but-set variable ASoC: amd: raven: acp3x-i2s: remove unused-but-set variable sound/soc/amd/acp-da7219-max98357a.c | 2 ++ sound/soc/amd/acp-rt5645.c | 2 ++ sound/soc/amd/raven/acp3x-i2s.c | 4 ---- sound/soc/amd/raven/acp3x-pcm-dma.c | 4 ---- 4 files changed, 4 insertions(+), 8 deletions(-) -- 2.25.1 commit 5146b6a92c1194674f21def93d7025c97ed6977f Author: Sebastian Reichel Date: Fri Jun 26 18:46:23 2020 +0200 ASoC: da7213: add default clock handling This adds default clock/PLL configuration to the driver for usage with generic drivers like simple-card for usage with a fixed rate clock. Signed-off-by: Sebastian Reichel Reviewed-by: Adam Thomson Link: https://lore.kernel.org/r/20200626164623.87894-1-sebastian.reichel@collabora.com Signed-off-by: Mark Brown commit 68d1abe186d1c865923d3b97414906f4697daf58 Author: Vijendar Mukunda Date: Tue Jul 7 16:16:41 2020 +0530 ASoC: amd: add ACPI dependency check Add ACPI dependency for evaluating DMIC hardware runtime. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1594118813-18689-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 7203d3684eafd711bfa1ebda7d36b89f4ac20c4c Author: Konrad Dybcio Date: Mon Jun 22 21:25:52 2020 +0200 Documentation: Document pm660(l) SPMI GPIOs compatible Signed-off-by: Konrad Dybcio Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622192558.152828-3-konradybcio@gmail.com Signed-off-by: Linus Walleij commit 17cc38e7846b462e03b718d1ca231da96809407d Author: Konrad Dybcio Date: Mon Jun 22 21:25:51 2020 +0200 pinctrl: qcom: spmi-gpio: Add pm660(l) compatibility Add support for pm660(l) SPMI GPIOs. The PMICs feature 13 and 12 GPIOs respectively, though with a lot of holes inbetween. Signed-off-by: Konrad Dybcio Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622192558.152828-2-konradybcio@gmail.com Signed-off-by: Linus Walleij commit f8a7476077eaac1ba9dc18f70c99d2311edd59ee Author: Lars Povlsen Date: Mon Jun 15 15:32:37 2020 +0200 pinctrl: ocelot: Add Sparx5 SoC support This add support for Sparx5 pinctrl, using the ocelot drives as basis. It adds pinconfig support as well, as supported by the platform. Signed-off-by: Lars Povlsen Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200615133242.24911-6-lars.povlsen@microchip.com Signed-off-by: Linus Walleij commit 8cbdc5045df071b146b76a718dd8669e89714057 Author: Linus Walleij Date: Sat Jun 20 22:12:48 2020 +0200 gpio: Add gpio-charger to the documentation The GPIO-based charger is another of the helpful devices built on top of GPIO. Signed-off-by: Linus Walleij Cc: Sebastian Reichel Link: https://lore.kernel.org/r/20200620201248.28843-1-linus.walleij@linaro.org commit 343403e2dad897a3c6c974a43d760b4fb96b996b Author: Pierre-Louis Bossart Date: Thu Jul 2 11:44:33 2020 -0500 ASoC: amd: raven: acp3x-i2s: remove unused-but-set variable Fix W=1 warning. The variable prtd is set but not used. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 16607237f3b6a56ace8cdbd19bb793cb9bb3f18e Author: Pierre-Louis Bossart Date: Thu Jul 2 11:44:32 2020 -0500 ASoC: amd: raven: acp3x-pcm-dma: remove unused-but-set variable Fix W=1 warning. The variable prtd is not used, remove. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fadecf947a72f54843afa12c6732c52914d5024d Author: Pierre-Louis Bossart Date: Thu Jul 2 11:44:31 2020 -0500 ASoC: amd: raven: acp3x-i2s: fix 'set but not used' warning Fix W=1 warning. the card variable is useless here Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5ec2978f1e7494065d1b44e20b047e5840fd7ca7 Author: Pierre-Louis Bossart Date: Thu Jul 2 11:44:30 2020 -0500 ASoC: amd: raven: acp3x-pcm-dma: fix 'set but not used' warning Fix W=1 warning. the card variable is useless here. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 41e4a5b32af6ccec4e11a1cbd20c5569d20faa24 Author: Pierre-Louis Bossart Date: Thu Jul 2 11:44:29 2020 -0500 ASoC: amd: acp-rt5645: fix 'defined but not used' warning Fix W=1 warning Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit dc1aff7f0d1b79e17026e08b14d7bb60ccdae1c8 Author: Pierre-Louis Bossart Date: Thu Jul 2 11:44:28 2020 -0500 ASoC: amd: acp-da7219-max98357a: fix 'defined but not used' warning Fix W=1 warning Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702164433.162815-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f088ab6d4f4ce49d422c220074b7e605f54e2299 Author: Hyeonki Hong Date: Thu Jun 18 11:59:22 2020 +0900 pinctrl: meson: fix drive strength register and bit calculation If a GPIO bank has greater than 16 pins, PAD_DS_REG is split into two or more registers. However, when register and bit were calculated, the first register defined in the bank was used, and the bit was calculated based on the first pin. This causes problems in setting the driving strength. The following method was used to solve this problem: A bit is calculated first using predefined strides. Then, If the bit is 32 or more, the register is changed by the quotient of the bit divided by 32. And the bit is set to the remainder. Signed-off-by: Hyeonki Hong Link: https://lore.kernel.org/r/20200618025916.GA19368@home-desktop Signed-off-by: Linus Walleij commit 467fd0e82b6265b8e6cc078a70bd7592574d5c83 Author: Takashi Iwai Date: Tue Jul 7 13:12:25 2020 +0200 ALSA: pcm: Fix build error on m68k and others The commit 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when direct DMA is available") introduced a check of the DMA type and this caused a build error on m68k (and possibly some others) due to the lack of dma_is_direct() definition. Since the check is needed only for CONFIG_SND_DMA_SGBUF enablement (i.e. solely x86), use #ifdef instead of IS_ENABLED() for avoiding such a build error. Fixes: 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when direct DMA is available") Reported-by: kernel test robot Link: https://lore.kernel.org/r/20200707111225.26826-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit bc6d201591344aa21d616179ee9ad406a7336267 Author: Drew Fustini Date: Wed Jun 17 20:05:43 2020 +0200 pinctrl: single: fix function name in documentation Use the correct the function name in the documentation for "pcs_parse_one_pinctrl_entry()". "smux_parse_one_pinctrl_entry()" appears to be an artifact from the development of a prior patch series ("simple pinmux driver") which transformed into pinctrl-single. Fixes: 8b8b091bf07f ("pinctrl: Add one-register-per-pin type device tree based pinctrl driver") Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20200617180543.GA4186054@x1 Signed-off-by: Linus Walleij commit 27c90e5e48d008bfda1cf6108eb699697317c67b Author: Drew Fustini Date: Wed Jul 1 03:33:20 2020 +0200 ARM: dts: am33xx-l4: change #pinctrl-cells from 1 to 2 Increase #pinctrl-cells to 2 so that mux and conf be kept separate. This requires the AM33XX_PADCONF macro in omap.h to also be modified to keep pin conf and pin mux values separate. Signed-off-by: Drew Fustini Acked-by: Tony Lindgren Acked-by: Haojian Zhuang Link: https://lore.kernel.org/r/20200701013320.130441-3-drew@beagleboard.org Signed-off-by: Linus Walleij commit a133954188887a830b5ce438a287a5e4e234b1be Author: Drew Fustini Date: Wed Jul 1 03:33:19 2020 +0200 pinctrl: single: parse #pinctrl-cells = 2 If "pinctrl-single,pins" has 3 arguments (offset, conf, mux), then pcs_parse_one_pinctrl_entry() does an OR operation on conf and mux to get the value to store in the register. Signed-off-by: Drew Fustini Acked-by: Tony Lindgren Acked-by: Haojian Zhuang Link: https://lore.kernel.org/r/20200701013320.130441-2-drew@beagleboard.org Signed-off-by: Linus Walleij commit 6129225fb6e409257fce183165df5c5d1852e397 Author: Maxime Ripard Date: Mon Jul 6 15:23:23 2020 +0200 ARM: configs: sunxi: Enable crypto related options Some crypto drivers were not enabled so far, so let's make sure we have them compiled in our defconfig. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200706132323.147562-3-maxime@cerno.tech commit 80dcf024929788f155aaff3d2cffb4975ce1e3fd Author: Maxime Ripard Date: Mon Jul 6 15:23:22 2020 +0200 ARM: sunxi: configs: Enable the Mailbox driver The mailbox found on the A31 and later SoCs have recently gained some support in Linux. Since it's going to be useful for crust, let's enable it in our defconfig. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200706132323.147562-2-maxime@cerno.tech commit 508d4549e8de4bd91b44b79c465e4f3bdaf7d803 Author: Maxime Ripard Date: Mon Jul 6 15:23:21 2020 +0200 ARM: configs: sunxi: Enable the PS/2 controller The A20 has a PS/2 controller and we have a driver for it, so let's enable it in our defconfig. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200706132323.147562-1-maxime@cerno.tech commit cde5a9ebbd38ad03f98adb57671f24f0bf57b8e4 Author: Masahiro Yamada Date: Tue Jul 7 19:33:22 2020 +0900 arm64: dts: uniphier: give fixed port number to support card serial Add this to the aliases node to make it more convenient. Signed-off-by: Masahiro Yamada commit dec32861da545972c72e7cfb5be9a35354f200c2 Author: Masahiro Yamada Date: Tue Jul 7 19:33:11 2020 +0900 ARM: dts: uniphier: give fixed port number to support card serial Add this to the aliases node to make it more convenient. Signed-off-by: Masahiro Yamada commit 951894cf30f417443d9e0eda33312613c2a7edf6 Author: Harsha Priya Date: Mon Jul 6 13:53:17 2020 -0700 ALSA: hda/hdmi: Add Intel silent stream support External HDMI receivers have analog circuitry that needs to be powered-on when exiting standby, and a mechanism to detect PCM v. IEC61937 data. These two steps take time and up to 2-3 seconds of audio may be muted when starting playback. Intel hardware (Haswell and beyond) can keep the link active with a 'silent stream', so that the receiver does not go through those two steps when valid audio is transmitted. This mechanism relies on an setting the channel_id as 0xf, sending info packet and preventing the codec from going to D3, which will increase the platform static power consumption. The info packet assumes a basic 2ch stereo, and the silent stream is enabled when connecting a monitor. In case of format changes the detection of PCM v. IEC61937 needs to be re-run. In this case there is no way to avoid the 2-3s mute. The silent stream is enabled with a Kconfig option, as well as a kernel parameter should there be a need to override the build time default. This approach is used based on the power_save capability as an example, but in the future, it may be used with a kcontrol, depending on UCM support for HDaudio legacy. Signed-off-by: Harsha Priya Signed-off-by: Emmanuel Jillela Reviewed-by: Kai Vehmanen Reported-by: kernel test robot Link: https://lore.kernel.org/r/1594068797-14011-1-git-send-email-harshapriya.n@intel.com Signed-off-by: Takashi Iwai commit 49429428381b1f52c0b17abbbb4e4e8617fca96e Author: Hans de Goede Date: Sat Jul 4 22:10:59 2020 +0200 HID: lenovo: Fix spurious F23 key press report during resume from suspend The Ultrabook Keyboard sends a spurious F23 key-press when resuming from suspend. GNOME uses F23 to toggle the touchpad on/off so this causes the OSD graphics for the touchpad toggle to show on resume. The keyboard does not actually have a F23 key, se we can simple fix it by marking the 0x00070072 HID usage, which normally is F23, to be ignored. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit c87de33ed43a89ae8f32ccd40bd0b540244012d6 Author: Hans de Goede Date: Sat Jul 4 15:27:42 2020 +0200 HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard fn_lock support Add support for setting the Fn lock value of the ThinkPad 10 Ultrabook Keyboard through sysfs, re-using the fn_lock sysfs attribute read/write helpers from the existing ThinkPad Compact Keyboard with TrackPoint support. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit bc04b37ea0ec1b8ec1306529f3f6dd0d6a5098f1 Author: Hans de Goede Date: Sat Jul 4 15:27:41 2020 +0200 HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support Some of the function keys special functions all use the same 0x000c0001 usage code, add a mapping for these based on the usage_index; And add support for the Speaker and Mic mute LEDs integrated into the F1 and F4 keys. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit ef550c5d0a8e32b9ac080ee83331f23acfe157e3 Author: Hans de Goede Date: Sat Jul 4 15:27:40 2020 +0200 HID: lenovo: Rename fn_lock sysfs attr handlers to make them generic Except for a single call, there is nothing keyboard-model specific about the cptkbd fn_lock sysfs attr handlers, rename them dropping the cptkbd post-/pre-fix, so that they can be re-used for supporting Fn-lock on the Thinkpad 10 ultrabook kbd. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 484921f571b1924a49421a999897387f8de33fbf Author: Hans de Goede Date: Sat Jul 4 15:27:39 2020 +0200 HID: lenovo: Factor out generic parts of the LED code Factor out the generic parts of the tpkbd LED code, so that they can be re-used for supporting the LEDs on the Thinkpad 10 ultrabook kbd. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit b72cdfa824243f8da7b7c4503844cd0d2f9fae09 Author: Hans de Goede Date: Sat Jul 4 15:27:38 2020 +0200 HID: lenovo: Merge tpkbd and cptkbd data structures Merge the tpkbd and cptkbd data structures, into a single unified structure instead of having a separate data structure per keyboard type. This is a preparation patch for making the tpkbd LED functions more generic, so that they can be re-used for supporting the LEDs on the Thinkpad 10 ultrabook keyboard. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit cb52a40202420d3886b84ea13dba699c9da13eb0 Author: Dinghao Liu Date: Tue Jul 7 13:50:00 2020 +0800 PCI: qcom: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, thus a matching decrement is needed on the error handling path to keep the counter balanced. Link: https://lore.kernel.org/r/20200707055000.9453-1-dinghao.liu@zju.edu.cn Signed-off-by: Dinghao Liu Signed-off-by: Lorenzo Pieralisi commit 7a790087c1ad110d1f4019021342d9ec55aead14 Author: Dinghao Liu Date: Wed May 20 17:02:53 2020 +0800 PCI: cadence: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Link: https://lore.kernel.org/r/20200520090253.2761-1-dinghao.liu@zju.edu.cn Signed-off-by: Dinghao Liu Signed-off-by: Lorenzo Pieralisi commit c2615d620a852adf43d425dea81eb854c8673cfd Author: Dinghao Liu Date: Wed May 20 16:47:56 2020 +0800 PCI: dwc: pci-dra7xx: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Link: https://lore.kernel.org/r/20200520084756.31620-1-dinghao.liu@zju.edu.cn Signed-off-by: Dinghao Liu Signed-off-by: Lorenzo Pieralisi commit 34e36d81a0ef76047fa12a0f8e0dce4369b435cf Author: Catalin Marinas Date: Tue Jul 7 11:26:14 2020 +0100 arm64: Shift the __tlbi_level() indentation left This is for consistency with the other __tlbi macros in this file. No functional change. Signed-off-by: Catalin Marinas commit a7ac1cfa4c0510217e74c2ba807ead549f80d82c Author: Zhenyu Ye Date: Thu Jun 25 16:03:14 2020 +0800 arm64: tlb: Set the TTL field in flush_*_tlb_range This patch implement flush_{pmd|pud}_tlb_range() in arm64 by calling __flush_tlb_range() with the corresponding stride and tlb_level values. Signed-off-by: Zhenyu Ye Link: https://lore.kernel.org/r/20200625080314.230-7-yezhenyu2@huawei.com Signed-off-by: Catalin Marinas commit c4ab2cbc1d8768eb505708a58c54c277dfe4a93d Author: Zhenyu Ye Date: Thu Jun 25 16:03:13 2020 +0800 arm64: tlb: Set the TTL field in flush_tlb_range This patch uses the cleared_* in struct mmu_gather to set the TTL field in flush_tlb_range(). Signed-off-by: Zhenyu Ye Reviewed-by: Catalin Marinas Link: https://lore.kernel.org/r/20200625080314.230-6-yezhenyu2@huawei.com Signed-off-by: Catalin Marinas commit 2631ed00b0498810f8d5c2163c6b5270d893687b Author: Peter Zijlstra (Intel) Date: Thu Jun 25 16:03:12 2020 +0800 tlb: mmu_gather: add tlb_flush_*_range APIs tlb_flush_{pte|pmd|pud|p4d}_range() adjust the tlb->start and tlb->end, then set corresponding cleared_*. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Zhenyu Ye Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20200625080314.230-5-yezhenyu2@huawei.com Signed-off-by: Catalin Marinas commit e735b98a5fe08c0f50f9fdc3e3a844e3638e6649 Author: Zhenyu Ye Date: Thu Jun 25 16:03:11 2020 +0800 arm64: Add tlbi_user_level TLB invalidation helper Add a level-hinted parameter to __tlbi_user, which only gets used if ARMv8.4-TTL gets detected. ARMv8.4-TTL provides the TTL field in tlbi instruction to indicate the level of translation table walk holding the leaf entry for the address that is being invalidated. This patch set the default level value of flush_tlb_range() to 0, which will be updated in future patches. And set the ttl value of flush_tlb_page_nosync() to 3 because it is only called to flush a single pte page. Signed-off-by: Zhenyu Ye Link: https://lore.kernel.org/r/20200625080314.230-4-yezhenyu2@huawei.com Signed-off-by: Catalin Marinas commit 7e341061ddd9239f7214fc3abb794f0ed977e259 Author: Kai-Heng Feng Date: Mon Jun 29 12:16:46 2020 +0800 HID: intel-ish-hid: Replace PCI_DEV_FLAGS_NO_D3 with pci_save_state PCI_DEV_FLAGS_NO_D3 should not be used outside of PCI core. Instead, we can use pci_save_state() to hint PCI core that the device should stay at D0 during suspend. By doing so, PCI core will let the upstream bridges also stays at D0 so the entire hierarchy is in the correct power state as PCI spec mandates. Signed-off-by: Kai-Heng Feng Acked-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit ad1e0b7de0cc6f6670b3ffc279cb587a90ce4d47 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:36:04 2020 -0500 ALSA: pci/au88x0: remove "defined but not used" warnings Fix W=1 warnings. Mark all unused tables with __maybe_unused. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-24-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 5ddf2dfe82371ed7ed377cf57e5ea5953a8ee5c2 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:36:03 2020 -0500 ALSA: vx_core: remove warning for empty loop body Fix W=1 warning. sound/drivers/vx/vx_core.c: In function ‘snd_vx_threaded_irq_handler’: sound/drivers/vx/vx_core.c:515:3: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] 515 | ; /* so far, nothing to do yet */ | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-23-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 369a0332bda17fd9680bf128288c7d6c5aad5d9d Author: Pierre-Louis Bossart Date: Thu Jul 2 14:36:02 2020 -0500 ALSA: pcmcia/pdaudiocf: fix kernel-doc Fix W=1 warnings - add missing context parameter in description Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-22-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 86a5d9cfbb846414f2fb81a0bb7dbed5b436e2a9 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:36:01 2020 -0500 ALSA: pci/via82xx: remove 'set but not used' warnings Fix W=1 warnings. Mark variables as __always_unused. sound/pci/via82xx.c: In function ‘snd_via82xx_codec_wait’: sound/pci/via82xx.c:547:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 547 | int err; | ^~~ sound/pci/via82xx_modem.c: In function ‘snd_via82xx_codec_wait’: sound/pci/via82xx_modem.c:401:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 401 | int err; | ^~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit af8c5dffc95b60247467b531072b1a11b324938b Author: Pierre-Louis Bossart Date: Thu Jul 2 14:36:00 2020 -0500 ALSA: pci/fm801: fix kernel-doc Fix W=1 warnings, add missing field descriptions. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 8068a5814f01214f8bef93ca9ed936df70bb0f70 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:59 2020 -0500 ALSA: pci/es1938: remove 'set but not used' warning Fix W=1 warning. Mark the 'audiostatus' variable as __always_unused. sound/pci/es1938.c: In function ‘snd_es1938_interrupt’: sound/pci/es1938.c:1622:24: warning: variable ‘audiostatus’ set but not used [-Wunused-but-set-variable] 1622 | unsigned char status, audiostatus; | ^~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 04b3c79533ecd702adfff92d6fe8cd09a3a48f5d Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:58 2020 -0500 ALSA: xen: remove 'set but not used' warning Fix W=1 warning. Mark the 'req' variable as __always_unused. sound/xen/xen_snd_front.c: In function ‘xen_snd_front_stream_close’: sound/xen/xen_snd_front.c:117:21: warning: variable ‘req’ set but not used [-Wunused-but-set-variable] 117 | struct xensnd_req *req; | ^~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 6add6b02e53f37638a55d64bbdd4cbf7abb2b1dd Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:57 2020 -0500 ALSA: pci/oxygen/xonar_wm87x6: remove always true condition Fix W=1 warnings: sound/pci/oxygen/xonar_wm87x6.c: In function ‘wm8776_write’: sound/pci/oxygen/xonar_wm87x6.c:119:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 119 | if (reg >= WM8776_HPLVOL && reg <= WM8776_DACMASTER) | ^~ sound/pci/oxygen/xonar_wm87x6.c: In function ‘wm8766_write’: sound/pci/oxygen/xonar_wm87x6.c:147:12: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 147 | if ((reg >= WM8766_LDA1 && reg <= WM8766_RDA1) || | ^~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit ab3ee09261711fdf7203796656e748a59e8064ff Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:56 2020 -0500 ALSA: pci/rme9652/hdspm: remove always true condition Fix W=1 warning: sound/pci/rme9652/hdspm.c: In function ‘hdspm_autosync_ref’: sound/pci/rme9652/hdspm.c:3030:16: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 3030 | if ((syncref >= HDSPM_AES32_AUTOSYNC_FROM_WORD) && | ^~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 6cdc01ebdfb0fef163d48d265b12325eaf06103f Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:55 2020 -0500 ALSA: pci/korg1212: remove 'set but not used' warnings Fix W=1 warnings. Two variables are only used for debug logs, mark with __maybe_unused: sound/pci/korg1212/korg1212.c: In function ‘snd_korg1212_create’: sound/pci/korg1212/korg1212.c:2152:36: warning: variable ‘iomem2_size’ set but not used [-Wunused-but-set-variable] 2152 | unsigned ioport_size, iomem_size, iomem2_size; | ^~~~~~~~~~~ sound/pci/korg1212/korg1212.c:2152:11: warning: variable ‘ioport_size’ set but not used [-Wunused-but-set-variable] 2152 | unsigned ioport_size, iomem_size, iomem2_size; | ^~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 518fe506dfe158a7a51c49a7d3f65c98c7db98bb Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:54 2020 -0500 ALSA: pci/emu10k1: remove 'set but not used' warning Fix W=1 warning. The loopsize variable is only used in compiled-out code, so mark with __maybe_unused. sound/pci/emu10k1/emu10k1_patch.c: In function ‘snd_emu10k1_sample_new’: sound/pci/emu10k1/emu10k1_patch.c:30:22: warning: variable ‘loopsize’ set but not used [-Wunused-but-set-variable] 30 | int truesize, size, loopsize, blocksize; | ^~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit ba2def29285282f535f41acf9aac849553b71f25 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:53 2020 -0500 ALSA: firewire: fix kernel-doc Fix W=1 warning. Remove excess function parameter from description Fixes: 7bc93821a70a ("ALSA: firewire-lib: split allocation of isochronous resources from establishment of connection") Acked-by: Takashi Sakamoto Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 74729a8f06b67661f7a5f217cabfcce451ed594f Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:52 2020 -0500 ASoC: pci/emu10k1: remove "set but not used' warnings Fix W=1 warnings. Mark variables used for reads as __always_unused. sound/pci/emu10k1/emu10k1_main.c: In function ‘snd_emu10k1_cardbus_init’: sound/pci/emu10k1/emu10k1_main.c:626:15: warning: variable ‘value’ set but not used [-Wunused-but-set-variable] 626 | unsigned int value; | ^~~~~ sound/pci/emu10k1/emu10k1_main.c: In function ‘snd_emu1010_load_firmware_entry’: sound/pci/emu10k1/emu10k1_main.c:656:15: warning: variable ‘write_post’ set but not used [-Wunused-but-set-variable] 656 | unsigned int write_post; | ^~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit fe37285059fd0d53c051727ca052c2c37935370e Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:50 2020 -0500 ALSA: pci/ctxfi: fix kernel-doc warnings Fix W=1 warnings. The files contain formatting that isn't kernel-doc. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 48af5f942aaf877ce0bf64b559ccff5a15eed376 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:49 2020 -0500 ALSA: pci/ctxfi/ctatc: fix kernel-doc Fix W=1 warnings. Add missing arguments and description. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 3d8f0f971807914f0ca7f017e3aca73406aca00d Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:48 2020 -0500 ALSA: pci/aw2-saa7146: remove 'set but not used' warning Fix W=1 warning by nothing variable as always unused. sound/pci/aw2/aw2-saa7146.c: In function ‘snd_aw2_saa7146_interrupt’: sound/pci/aw2/aw2-saa7146.c:333:15: warning: variable ‘iicsta’ set but not used [-Wunused-but-set-variable] 333 | unsigned int iicsta; | ^~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 8f53cb8e255db2f8939fffd88eca2eee9155006b Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:47 2020 -0500 ALSA: pci/echoaudio: remove 'set but not used' warning Fix W=1 warning. One variable is only used in a conditionally-compiled block, mark as __maybe_unused sound/pci/echoaudio/echoaudio.c: In function ‘snd_echo_probe’: sound/pci/echoaudio/echoaudio.c:1958:6: warning: variable ‘i’ set but not used [-Wunused-but-set-variable] 1958 | int i, err; | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 3237befae739d6268f834d903337c74c0b3b719b Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:46 2020 -0500 ALSA: pci/asihpi: remove 'set but not used' warning Fix W=1 warnings, mark variables as __always_unused sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_get’: sound/pci/asihpi/asihpi.c:1907:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1907 | u32 num_bands; | ^~~~~~~~~ sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_put’: sound/pci/asihpi/asihpi.c:1934:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1934 | u32 num_bands; | ^~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 7d23b167ec6d736c208f5df45190940f53f911c6 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:45 2020 -0500 ALSA: pci/asihpi: fix kernel-doc Fix W=1 warnings. The code certainly predates .rst syntax, adjust as needed. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 232af6a9057de84a17b59626d73278d2dde34c75 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:44 2020 -0500 ALSA: pci/asihpi: remove 'set but not used' warnings Fix W=1 warnings by removing 2 unnecessary initializations and removing a variable that's not used. sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_get’: sound/pci/asihpi/asihpi.c:1907:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1907 | u32 num_bands = 0; | ^~~~~~~~~ sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_put’: sound/pci/asihpi/asihpi.c:1934:6: warning: variable ‘num_bands’ set but not used [-Wunused-but-set-variable] 1934 | u32 num_bands = 0; | ^~~~~~~~~ sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_mux_info’: sound/pci/asihpi/asihpi.c:2164:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 2164 | int err; | ^~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 6a4f2b6947d0f340a40359a906d07642825ac14e Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:43 2020 -0500 ALSA: isa/gus: remove 'set but not used' warning Fix W=1 warning by noting variable as __always_unused. sound/isa/gus/gus_uart.c: In function ‘snd_gf1_interrupt_midi_in’: sound/isa/gus/gus_uart.c:16:22: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] 16 | unsigned char stat, data, byte; Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit a3a402840662a7449b1ca0baa58eddf36ef23158 Author: Chris Wilson Date: Mon Jul 6 23:43:08 2020 +0100 drm/i915: Update dma-attributes for our sg DMA Looking through the attributes for DMA mappings, it appears that by default dma_map_sg will try and create a kernel accessible map of the page. We never access this, as we either have a struct page already or an iomap, so we can request that the dma mapper does not create one. Without a kernel map in place, one presumes the rest of the memory control attributes do not apply. We also explicitly control the caches around the mappings, so we can ask it not to bother synchronising itself. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200706224308.22636-1-chris@chris-wilson.co.uk commit 65cec1ef250ae7d74047c8a0c3ea83644391a546 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:35:42 2020 -0500 ALSA: isa/gus: remove -Wmissing-prototypes warnings Fix W=1 warnings by adding prototypes to header file sound/isa/gus/gus_timer.c:141:6: warning: no previous prototype for ‘snd_gf1_timers_init’ [-Wmissing-prototypes] 141 | void snd_gf1_timers_init(struct snd_gus_card * gus) | ^~~~~~~~~~~~~~~~~~~ sound/isa/gus/gus_timer.c:177:6: warning: no previous prototype for ‘snd_gf1_timers_done’ [-Wmissing-prototypes] 177 | void snd_gf1_timers_done(struct snd_gus_card * gus) | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193604.169059-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit d0af37c8ec07a1c51920415d61e651c3dc1d6dfb Author: Vinod Koul Date: Mon Jun 29 19:17:36 2020 +0530 ALSA: compress: document the compress gapless audio state machine Also documented the galpess transitions. Please note that these are not really stream states, but show how the stream steps in gapless mode Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200629134737.105993-3-vkoul@kernel.org Signed-off-by: Takashi Iwai commit 2441bf4dbcb8196d994aa992b1be725a701589f2 Author: Vinod Koul Date: Mon Jun 29 19:17:35 2020 +0530 ALSA: compress: document the compress audio state machine So we had some discussions of the stream states, so I thought it is a good idea to document the state transitions, so add it documentation Reviewed-by: Charles Keepax Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200629134737.105993-2-vkoul@kernel.org Signed-off-by: Takashi Iwai commit 7716fa8068d418c39425f0fc9f3bae6c56261e86 Author: Marc Kleine-Budde Date: Mon Jul 6 16:34:43 2020 +0200 spi: spi-sun6i: sun6i_spi_transfer_one(): enable RF_RDY interrupt only if needed In sun6i_spi_transfer_one() the RX FIFO Ready (SUN6I_INT_CTL_RF_RDY) is unconditionally enabled. A RX interrupt is only needed, if more data than fits into the FIFO is going to be received during this transfer. As the RX-FIFO is drained during transfer complete interrupt, enable the RX FIFO Ready interrupt only if the data doesn't fit into the FIFO. Signed-off-by: Marc Kleine-Budde Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200706143443.9855-11-mkl@pengutronix.de Signed-off-by: Mark Brown commit 4e7390e997af380e20c5979a9963b521e62b4a58 Author: Marc Kleine-Budde Date: Mon Jul 6 16:34:42 2020 +0200 spi: spi-sun6i: sun6i_spi_transfer_one(): collate write to Interrupt Control Register In sun6i_spi_transfer_one() the Interrupt Control Register is written three times. This patch collates the three writes into one. Signed-off-by: Marc Kleine-Budde Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200706143443.9855-10-mkl@pengutronix.de Signed-off-by: Mark Brown commit e4e8ca3f43f97c82dbaef30e018acc4fd1ededf0 Author: Marc Kleine-Budde Date: Mon Jul 6 16:34:41 2020 +0200 spi: spi-sun6i: sun6i_spi_fill_fifo(): remove not needed length argument The function sun6i_spi_fill_fifo() is called with a length argument of "sspi->fifo_depth" and "SUN6I_FIFO_DEPTH". The driver reads the number of free bytes in the FIFO from the hardware and uses the length argument to limit this value. This is not needed as the number of free bytes in the FIFO is always less or equal the depth of the FIFO. This patch removes the length argument and check. Signed-off-by: Marc Kleine-Budde Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200706143443.9855-9-mkl@pengutronix.de Signed-off-by: Mark Brown commit 92a52ee893c1ee5656df81f34f88aafe4e7e5033 Author: Marc Kleine-Budde Date: Mon Jul 6 16:34:40 2020 +0200 spi: spi-sun6i: sun6i_spi_drain_fifo(): remove not needed length argument The function sun6i_spi_drain_fifo() is called with a length argument of "sspi->fifo_depth" and "SUN6I_FIFO_DEPTH". The driver reads the number of available bytes to read from the FIFO from the hardware and uses the length argument to limit this value. This is not needed as the FIFO can contain only the fifo depth number of bytes. This patch removes the length argument and check. Signed-off-by: Marc Kleine-Budde Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200706143443.9855-8-mkl@pengutronix.de Signed-off-by: Mark Brown commit 5197da036398863c90db90b2ea53760fdaec5d86 Author: Marc Kleine-Budde Date: Mon Jul 6 16:34:39 2020 +0200 spi: spi-sun6i: sun6i_spi_drain_fifo(): introduce sun6i_spi_get_rx_fifo_count() and make use of it This patch introduces the function sun6i_spi_get_rx_fifo_count(), similar to the existing sun6i_spi_get_tx_fifo_count(), to make the sun6i_spi_drain_fifo() function a bit easier to read. Signed-off-by: Marc Kleine-Budde Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200706143443.9855-7-mkl@pengutronix.de Signed-off-by: Mark Brown commit 9a3ef9df22ec1fe8d49b219c181c039f25c3296d Author: Marc Kleine-Budde Date: Mon Jul 6 16:34:38 2020 +0200 spi: spi-sun6i: sun6i_spi_get_tx_fifo_count: Convert manual shift+mask to FIELD_GET() This patch converts the manual shift+mask in sun6i_spi_get_tx_fifo_count() to make use of FIELD_GET() Signed-off-by: Marc Kleine-Budde Link: https://lore.kernel.org/r/20200706143443.9855-6-mkl@pengutronix.de Signed-off-by: Mark Brown commit 2130be57d5eb01bcd440495cdb5455cf40468f0c Author: Marc Kleine-Budde Date: Mon Jul 6 16:34:37 2020 +0200 spi: spi-sun6i: sun6i_spi_transfer_one(): remove not needed masking of transfer length In sun6i_spi_transfer_one() the driver ensures that the length of the transfer is smaller or equal to SUN6I_MAX_XFER_SIZE. This means the masking of the length to SUN6I_MAX_XFER_SIZE can be skipped when writing the transfer length into the registers. This patch removes the useless masking of the transfer length to SUN6I_MAX_XFER_SIZE. Signed-off-by: Marc Kleine-Budde Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200706143443.9855-5-mkl@pengutronix.de Signed-off-by: Mark Brown commit b6d5527389f34ef3c07fcbd7902b79bc39936ecf Author: Marc Kleine-Budde Date: Mon Jul 6 16:34:36 2020 +0200 spi: spi-sun6i: sun6i_spi_transfer_one(): remove useless goto This patch removes an useless goto at the end of sun6i_spi_transfer_one(). Signed-off-by: Marc Kleine-Budde Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200706143443.9855-4-mkl@pengutronix.de Signed-off-by: Mark Brown commit 0bc7b8a2c307c52dbc9f3b5bc7855e93d281098a Author: Marc Kleine-Budde Date: Mon Jul 6 16:34:35 2020 +0200 spi: spi-sun6i: sun6i_spi_transfer_one(): report effectivly used speed_hz of transfer This patch implementes the reporting of the effectivly used speed_hz for the transfer by setting tfr->effective_speed_hz. See the following patch, which adds this feature to the SPI core for more information: 5d7e2b5ed585 spi: core: allow reporting the effectivly used speed_hz for a transfer Signed-off-by: Marc Kleine-Budde Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20200706143443.9855-3-mkl@pengutronix.de Signed-off-by: Mark Brown commit 8567774e87e23a57155e5102f81208729b992ae6 Author: Chris Wilson Date: Mon Jul 6 18:01:38 2020 +0100 drm/i915/gt: Pin the rings before marking active On eviction, we acquire the vm->mutex and then wait on the vma->active. Therefore when binding and pinning the vma, we must follow the same sequence, lock/pin the vma then mark it active. Otherwise, we mark the vma as active, then wait for the vm->mutex, and meanwhile the evictor holding the mutex waits upon us to complete our activity. Fixes: 8ccfc20a7d56 ("drm/i915/gt: Mark ring->vma as active while pinned") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.6+ Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200706170138.8993-1-chris@chris-wilson.co.uk commit 2b1b1267080fe822789d0845a58ebb452724736b Author: Masahiro Yamada Date: Tue Jun 23 20:46:12 2020 +0900 arm64: dts: uniphier: add interrupts to support card serial Since commit e69f5dc623f9 ("dt-bindings: serial: Convert 8250 to json-schema"), the schema for "ns16550a" is checked. Since then, 'make ARCH=arm64 dtbs_check' is so noisy because the required property 'interrupts' is missing. Signed-off-by: Masahiro Yamada commit e8b00104ffb6468bcacd6e9801de96c33733cc51 Author: Masahiro Yamada Date: Tue Jun 23 20:46:13 2020 +0900 ARM: dts: uniphier: rename support card serial node to fix schema warning Since commit e69f5dc623f9 ("dt-bindings: serial: Convert 8250 to json-schema"), the schema for "ns16550a" is checked. 'make ARCH=arm dtbs_check' emits the following warning: uart@b0000: $nodename:0: 'uart@b0000' does not match '^serial(@[0-9a-f,]+)*$' Rename the node to follow the pattern defined in Documentation/devicetree/bindings/serial/serial.yaml Signed-off-by: Masahiro Yamada commit b5021cf9ce4e5ba931bb1561afdf4a57b7cc623b Author: Masahiro Yamada Date: Tue Jun 23 20:46:11 2020 +0900 ARM: dts: uniphier: add interrupts to support card serial Since commit e69f5dc623f9 ("dt-bindings: serial: Convert 8250 to json-schema"), the schema for "ns16550a" is checked. Since then, 'make ARCH=arm dtbs_check' is so noisy because the required property 'interrupts' is missing. Signed-off-by: Masahiro Yamada commit e5711945c6415ab847b39ef89003ef68f9435bc6 Author: Barry Song Date: Tue Jun 2 16:55:56 2020 +1200 driver core: platform: need consistent spacing around '-' Fix the below checkpatch issue: ERROR: need consistent spacing around '-' (ctx:WxV) FILE: drivers/base/platform.c:1008: + len = acpi_device_modalias(dev, buf, PAGE_SIZE -1); ^ Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20200602045556.66948-1-song.bao.hua@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit e6949ff3ca852644d8eaea032e5e4d6fab7b8c2b Author: Thomas Zimmermann Date: Thu Jul 2 13:50:29 2020 +0200 drm/ast: Initialize mode setting in ast_mode_config_init() There's modesetting init code in ast_main.c. Move it to ast_mode.c and merge it with the modesetting init code in ast_mode_init(). The result is ast_mode_config_init(), which initalizes the whole modesetting. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-15-tzimmermann@suse.de commit 1728bf6402c3d17da9271b98c5118f9448062ae9 Author: Thomas Zimmermann Date: Thu Jul 2 13:50:28 2020 +0200 drm/ast: Use managed mode-config init Using drmm_mode_config_init() sets up managed release of modesetting resources. The existing modesetting's finalizer is empty, so remove it. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-14-tzimmermann@suse.de commit c35da0ed48c76512c46e831ff42534646eb34f1a Author: Thomas Zimmermann Date: Thu Jul 2 13:50:27 2020 +0200 drm/ast: Replace struct ast_crtc with struct drm_crtc Struct ast_crtc has been cleaned up and it's now a wrapper around the DRM CRTC structure struct drm_crtc. This patch converts the driver to struct drm_crtc and removes struct ast_crtc. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-13-tzimmermann@suse.de commit 6bb18c9be6d256d7e8e24e7a676df2e2fd72522c Author: Thomas Zimmermann Date: Thu Jul 2 13:50:26 2020 +0200 drm/ast: Init cursors before creating modesetting structures The cursor helpers reserve buffer objects in VRAM and update their content. So although tied to modesetting, cursor helpers are more of a memory manager. The modesetting's cursor plane requires this functionality, so initialize cursors before modesetting. While at it, also add an error check for ast_cursor_init(). Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-12-tzimmermann@suse.de commit 3e9d787371eaa842682bf4fc86ae9475548d9cee Author: Thomas Zimmermann Date: Thu Jul 2 13:50:25 2020 +0200 drm/ast: Managed cursor release Register a release function to finalize cursors. The _fini() function gets un-exported from the source file. The function ast_mode_fini() is now empty and will be removed by a later patch. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-11-tzimmermann@suse.de commit 0d384eec10ea723f39df9736a04966e047850cfb Author: Thomas Zimmermann Date: Thu Jul 2 13:50:24 2020 +0200 drm/ast: Keep cursor HW BOs mapped Updating the image in a cursor's HW BO requires a mapping of the BO's buffer in the kernel's address space. Cursor image updates can happen frequently and create CPU overhead. As cursor HW BOs are small and never move, they are now map exactly once during the initialization and the mapping is used throughout the driver's lifetime. This change also removes a possible source of failures from ast_cursor_show(). As the helper does not establish mappings, it cannot fail. As a result, the cursor plane's atomic-update helper does not call any failable interfaces. All failures are detected before trying to update the cursor plane. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-10-tzimmermann@suse.de commit c91eadd110463f4455483ab7bc5c5e7cea28a906 Author: Thomas Zimmermann Date: Thu Jul 2 13:50:23 2020 +0200 drm/ast: Add helper to hide cursor As the inverse to ast_cursor_show(), ast_cursor_hide() disables the HW cursor. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-9-tzimmermann@suse.de commit 6567bc98247def93d7bd895a8e4ef0b19aed01a0 Author: Thomas Zimmermann Date: Thu Jul 2 13:50:22 2020 +0200 drm/ast: Don't enable HW cursors twice during atomic update The ast_cursor_show() helper enables the cursor to be displayed. No need to repeat that operation in the plane's atomic-update function. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-8-tzimmermann@suse.de commit 81039adc92cd7a1eb99a6c53f33376e972d96971 Author: Thomas Zimmermann Date: Thu Jul 2 13:50:21 2020 +0200 drm/ast: Replace ast_cursor_move() with ast_cursor_show() Having a cursor move function is misleading, as it actually enables the cursor's image for displaying. So rename it to ast_cursor_show(). It's semantics is to show a cursor at the specified location on the screen. The displayed cursor is always the image in the cursor front BO. This change also simplifies struct ast_crtc to being a mere wrapper around around struct drm_crtc. It will be removed by a later patch. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-7-tzimmermann@suse.de commit 75d9d8e66db834551e81e74e522c2900fe93ef5c Author: Thomas Zimmermann Date: Thu Jul 2 13:50:20 2020 +0200 drm/ast: Move cursor pageflip into helper The new helper ast_cursor_page_flip() switches the cursor's front and back BOs. This simplifies the cursor plane's update helper. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-6-tzimmermann@suse.de commit 932a62aa3bfd96ec44799fec3523756e531988dc Author: Thomas Zimmermann Date: Thu Jul 2 13:50:19 2020 +0200 drm/ast: Update cursor image and checksum from same function Cursor image and checksum go hand in hand. Update both in the same place. The helper cannot fail, so remove the return type. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-5-tzimmermann@suse.de commit dd004b9a5505f9810f66a9ddfbdf02978703f1f6 Author: Thomas Zimmermann Date: Thu Jul 2 13:50:18 2020 +0200 drm/ast: Move cursor fb pinning and mapping into helper The new helper ast_cursor_blit() updates a cursor's backbuffer HW BO from a framebuffer structure. The cursor plane's prepare_fb() function now uses the new interface. Pinning and mapping of BOs is done automatically by the helper. This includes the source BO, which was not pinned by the original code in prepare_fb(). Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-4-tzimmermann@suse.de commit beb2355eecbf67d2fce79af73215c875173d9990 Author: Thomas Zimmermann Date: Thu Jul 2 13:50:17 2020 +0200 drm/ast: Pass struct ast_private instance to cursor init/fini functions Removes some typecasting. v2: * use to_ast_private() instead of struct drm_device.dev_private Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-3-tzimmermann@suse.de commit 2ccebf561e4a9024c8477459acf9b6176c4b40c7 Author: Thomas Zimmermann Date: Thu Jul 2 13:50:16 2020 +0200 drm/ast: Move cursor functions to ast_cursor.c The cursor manipulation functions are unrelated to modesetting. Move them into their own file. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200702115029.5281-2-tzimmermann@suse.de commit 5d8514e7fd7f9858b007f6bc059c4e71d60627cc Author: Maxime Ripard Date: Thu Jun 11 15:36:54 2020 +0200 drm/vc4: crtc: Remove the feed_txp tests Now that the code in vc4_crtc accessing registers is only meant for the pixelvalve, it doesn't make sense anymore to test whether we're accessing the TXP or not and we can safely remove those checks. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/c044daba470fcb1cb57e3d34d88f75325b2ebbab.1591882579.git-series.maxime@cerno.tech commit 39fcb280837649603432e3f4e1710260fc228faa Author: Maxime Ripard Date: Thu Jun 11 15:36:53 2020 +0200 drm/vc4: txp: Turn the TXP into a CRTC of its own The TXP so far has been leveraging the PixelValve infrastructure in the driver, that was really two things: the interaction with DRM's CRTC concept, the setup of the underlying pixelvalve and the setup of the shared HVS, the pixelvalve part being irrelevant to the TXP since it accesses the HVS directly. Now that we have a clear separation between the three parts, we can represent the TXP as a CRTC of its own, leveraging the common CRTC and HVS code, but leaving aside the pixelvalve setup. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20f387f881b57f3474fa42d94cfd8bc1b7b80595.1591882579.git-series.maxime@cerno.tech commit e25a21abb9da36b4dce14445ee13131130c04663 Author: Maxime Ripard Date: Thu Jun 11 15:36:52 2020 +0200 drm/vc4: crtc: Move the txp_armed function to the TXP The TXP driver is the only place where we need to set the txp_armed flag, so let's move the function in the TXP driver. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/12b383e7b8462e281b00c0a21b2b50f13691bead.1591882579.git-series.maxime@cerno.tech commit 5fefc601a6c484ff2a3a6dc91f6310ca1224931a Author: Maxime Ripard Date: Thu Jun 11 15:36:51 2020 +0200 drm/vc4: crtc: Move the CRTC initialisation to a separate function The upcoming patches to turn the TXP into a full-blown CRTC will have the same CRTC initialisation code, so let's move it into a separate, public, function so that we can reuse it later on. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/3a3026c0e7408895d154d8dea454cf6d1c459715.1591882579.git-series.maxime@cerno.tech commit 811a850cbddef47623c5f6197154a05bb4efc7c9 Author: Maxime Ripard Date: Thu Jun 11 15:36:50 2020 +0200 drm/vc4: crtc: Only access the PixelValve registers if we have to The CRTC hooks are called both for the TXP and the pixelvalve, yet some will read / write the registers as if the device was a pixelvalve, which won't really work. Let's make sure we only access those registers if we are running on a PixelValve. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/b55e31869304c748920c261eba87b3275dbeb297.1591882579.git-series.maxime@cerno.tech commit 5a20ff8bf3d455855d445594152cc6a7760a3793 Author: Maxime Ripard Date: Thu Jun 11 15:36:49 2020 +0200 drm/vc4: crtc: Split CRTC data in two The vc4_crtc_data structure is currently storing data related to both the general CRTC information needed by the rest of the vc4 driver (like HVS output and available FIFOs) and some related to the pixelvalve attached to that CRTC. Let's split this into two structures so that we can reuse the CRTC part into the TXP later on. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/8eb317c91ac208d7f926d76ad421002fa0364c47.1591882579.git-series.maxime@cerno.tech commit bdd9647296840e0cc0261deef90184cee83a8d0e Author: Maxime Ripard Date: Thu Jun 11 15:36:48 2020 +0200 drm/vc4: crtc: Make state functions public We'll need the CRTC state related functions to be exported so that we can reuse them for the TXP. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/658f40aa01d7a45cbf6feebfc3dc6549f100d110.1591882579.git-series.maxime@cerno.tech commit 8175287bdd06c8a1941884b832ad7cbbb1f1ef83 Author: Maxime Ripard Date: Thu Jun 11 15:36:47 2020 +0200 drm/vc4: crtc: Move HVS setup code to the HVS driver The CRTC in vc4 is backed by two devices, the HVS that does the composition and the PixelValve that does the timing generation. The writeback is kind of a special case since it doesn't have an associated pixelvalve but goes straight from the HVS to the TXP. Therefore, it makes sense to move out the HVS setup code into helpers so that we can also reuse them from the TXP driver. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/96443394e81429ee38f070cfe231701b07e56d69.1591882579.git-series.maxime@cerno.tech commit 7af928851508fb25207806f57e287272dd498981 Author: Andrew Scull Date: Thu Jun 18 15:55:11 2020 +0100 smccc: Make constants available to assembly Move constants out of the C-only section of the header next to the other constants that are available to assembly. Signed-off-by: Andrew Scull Reviewed-by: Sudeep Holla Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200618145511.69203-1-ascull@google.com Signed-off-by: Catalin Marinas commit 41ce82f63c0624556b94b90551e4f70a0c913879 Author: Marc Zyngier Date: Fri Jun 28 15:23:43 2019 +0100 KVM: arm64: timers: Move timer registers to the sys_regs file Move the timer gsisters to the sysreg file. This will further help when they are directly changed by a nesting hypervisor in the VNCR page. This requires moving the initialisation of the timer struct so that some of the helpers (such as arch_timer_ctx_index) can work correctly at an early stage. Signed-off-by: Marc Zyngier commit 3c5ff0c60f2febb170bc4096d4b8a8390ebb0bad Author: Marc Zyngier Date: Wed Apr 22 08:58:22 2020 +0100 KVM: arm64: timers: Rename kvm_timer_sync_hwstate to kvm_timer_sync_user kvm_timer_sync_hwstate() has nothing to do with the timer HW state, but more to do with the state of a userspace interrupt controller. Change the suffix from _hwstate to_user, in keeping with the rest of the code. Signed-off-by: Marc Zyngier commit 710f1982187afd3f25413d92a0804ccd780634f7 Author: Marc Zyngier Date: Fri Jun 28 23:05:38 2019 +0100 KVM: arm64: Move SPSR_EL1 to the system register array SPSR_EL1 being a VNCR-capable register with ARMv8.4-NV, move it to the sysregs array and update the accessors. Reviewed-by: James Morse Signed-off-by: Marc Zyngier commit fd85b66789aaa594a158f0a8aa4482c3ed0fed3d Author: Marc Zyngier Date: Fri Jun 28 23:36:42 2019 +0100 KVM: arm64: Disintegrate SPSR array As we're about to move SPSR_EL1 into the VNCR page, we need to disassociate it from the rest of the 32bit cruft. Let's break the array into individual fields. Reviewed-by: James Morse Signed-off-by: Marc Zyngier commit 1bded23ea71cee2053fe1dd55c5d36d35bec56aa Author: Marc Zyngier Date: Fri Jun 28 23:05:38 2019 +0100 KVM: arm64: Move SP_EL1 to the system register array SP_EL1 being a VNCR-capable register with ARMv8.4-NV, move it to the system register array and update the accessors. Reviewed-by: James Morse Signed-off-by: Marc Zyngier commit 98909e6d1c811b6368c9c84fa6b3f0817c32ac2f Author: Marc Zyngier Date: Fri Jun 28 23:05:38 2019 +0100 KVM: arm64: Move ELR_EL1 to the system register array As ELR-EL1 is a VNCR-capable register with ARMv8.4-NV, let's move it to the sys_regs array and repaint the accessors. While we're at it, let's kill the now useless accessors used only on the fault injection path. Reviewed-by: James Morse Signed-off-by: Marc Zyngier commit e47c2055c68e06977d7d8b7dbc2f7468a36d3658 Author: Marc Zyngier Date: Fri Jun 28 22:40:58 2019 +0100 KVM: arm64: Make struct kvm_regs userspace-only struct kvm_regs is used by userspace to indicate which register gets accessed by the {GET,SET}_ONE_REG API. But as we're about to refactor the layout of the in-kernel register structures, we need the kernel to move away from it. Let's make kvm_regs userspace only, and let the kernel map it to its own internal representation. Reviewed-by: James Morse Signed-off-by: Marc Zyngier commit 5b78077a00f8109f7a4717b19309ef0a76d73372 Author: Marc Zyngier Date: Fri Jul 5 11:25:10 2019 +0100 KVM: arm64: debug: Drop useless vpcu parameter As part of the ongoing spring cleanup, remove the now useless vcpu parameter that is passed around (host and guest contexts give us everything we need). Signed-off-by: Marc Zyngier commit 2c3db77c62b681af60757378219edcc93f658ba1 Author: Marc Zyngier Date: Fri Jul 5 11:21:27 2019 +0100 KVM: arm64: pauth: Use ctxt_sys_reg() instead of raw sys_regs access Now that we have a wrapper for the sysreg accesses, let's use that consistently. Signed-off-by: Marc Zyngier commit 308472c69213cea9b22a2156a19ea9ec06ea3bc1 Author: Marc Zyngier Date: Thu Jul 4 17:25:09 2019 +0100 KVM: arm64: sve: Use __vcpu_sys_reg() instead of raw sys_regs access Now that we have a wrapper for the sysreg accesses, let's use that consistently. Signed-off-by: Marc Zyngier commit 71071acfd392c51d9c0b286067033534b59f6be4 Author: Marc Zyngier Date: Sun Apr 12 14:00:43 2020 +0100 KVM: arm64: hyp: Use ctxt_sys_reg/__vcpu_sys_reg instead of raw sys_regs access Switch the hypervisor code to using ctxt_sys_reg/__vcpu_sys_reg instead of raw sys_regs accesses. No intended functionnal change. Signed-off-by: Marc Zyngier commit 1b422dd7fc3c85556df656e3d8f1475ce99f93a0 Author: Marc Zyngier Date: Wed Jun 26 19:57:41 2019 +0100 KVM: arm64: Introduce accessor for ctxt->sys_reg In order to allow the disintegration of the per-vcpu sysreg array, let's introduce a new helper (ctxt_sys_reg()) that returns the in-memory copy of a system register, picked from a given context. __vcpu_sys_reg() is rewritten to use this helper. Signed-off-by: Marc Zyngier commit efaa5b93afde088411b67a0dde34e67aedc6e72f Author: Marc Zyngier Date: Wed Jan 2 12:34:25 2019 +0000 KVM: arm64: Use TTL hint in when invalidating stage-2 translations Since we often have a precise idea of the level we're dealing with when invalidating TLBs, we can provide it to as a hint to our invalidation helper. Reviewed-by: James Morse Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier commit a0e50aa3f4a8a5c9fb791b8f32d624e2a1a735bd Author: Christoffer Dall Date: Fri Jan 4 21:09:05 2019 +0100 KVM: arm64: Factor out stage 2 page table data from struct kvm As we are about to reuse our stage 2 page table manipulation code for shadow stage 2 page tables in the context of nested virtualization, we are going to manage multiple stage 2 page tables for a single VM. This requires some pretty invasive changes to our data structures, which moves the vmid and pgd pointers into a separate structure and change pretty much all of our mmu code to operate on this structure instead. The new structure is called struct kvm_s2_mmu. There is no intended functional change by this patch alone. Reviewed-by: James Morse Reviewed-by: Alexandru Elisei [Designed data structure layout in collaboration] Signed-off-by: Christoffer Dall Co-developed-by: Marc Zyngier [maz: Moved the last_vcpu_ran down to the S2 MMU structure as well] Signed-off-by: Marc Zyngier commit ae4bffb5552712986a6ad4009b38b6560d952c4e Merge: f9a026e3d38ba c10bc62ae4d21 Author: Marc Zyngier Date: Tue Jul 7 09:28:24 2020 +0100 Merge branch 'kvm-arm64/ttl-for-arm64' into HEAD Signed-off-by: Marc Zyngier commit c10bc62ae4d2135c9db40e96a8e994164faee531 Author: Marc Zyngier Date: Wed Jan 2 10:21:29 2019 +0000 arm64: Add level-hinted TLB invalidation helper Add a level-hinted TLB invalidation helper that only gets used if ARMv8.4-TTL gets detected. Reviewed-by: Alexandru Elisei Reviewed-by: Catalin Marinas Signed-off-by: Marc Zyngier commit 6fcfdf6d72898d1c5118d7dd3d3d38690e2f6a64 Author: Marc Zyngier Date: Fri Dec 28 09:11:50 2018 +0000 arm64: Document SW reserved PTE/PMD bits in Stage-2 descriptors Advertise bits [58:55] as reserved for SW in the S2 descriptors. Reviewed-by: Andrew Scull Acked-by: Catalin Marinas Signed-off-by: Marc Zyngier commit 552ae76face5584085845646c5f57e10c1a4ebdc Author: Marc Zyngier Date: Sat Dec 22 12:00:10 2018 +0000 arm64: Detect the ARMv8.4 TTL feature In order to reduce the cost of TLB invalidation, the ARMv8.4 TTL feature allows TLBs to be issued with a level allowing for quicker invalidation. Let's detect the feature for now. Further patches will implement its actual usage. Reviewed-by : Suzuki K Polose Reviewed-by: Catalin Marinas Signed-off-by: Marc Zyngier commit 247c12fcba30ecb9473fe6b6c0375d46916417c9 Author: Maxime Ripard Date: Thu Jun 11 15:36:46 2020 +0200 drm/vc4: Reorder the bind order of the devices We'll need the HVS to be bound before the TXP for the upcoming reworks, but it needs to happen before the PV are bound so that the code to set the possible_crtcs field works properly on the TXP. Move it right between the two devices. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/2d7fcde29dec429442eb76afc51d8cc275cb407f.1591882579.git-series.maxime@cerno.tech commit d777587150bc12db82f3d3cd0b6f1a01f82e112a Author: Randy Dunlap Date: Wed Jul 1 14:08:23 2020 -0700 ALSA: hda: fix SND_HDA_GENERIC kconfig & build Fix kconfig warnings and lots of subsequent build errors by adding yet another ugly select statement: WARNING: unmet direct dependencies detected for LEDS_CLASS Depends on [n]: NEW_LEDS [=n] Selected by [y]: - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y] WARNING: unmet direct dependencies detected for LEDS_TRIGGERS Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=y] Selected by [y]: - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y] Selected by [m]: - MAC80211_LEDS [=y] && NET [=y] && WIRELESS [=y] && MAC80211 [=m] && LEDS_CLASS [=y] - IWLWIFI_LEDS [=y] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_INTEL [=y] && IWLWIFI [=m] && (LEDS_CLASS [=y]=y || LEDS_CLASS [=y]=IWLWIFI [=m]) && (IWLMVM [=m] || IWLDVM [=m]) WARNING: unmet direct dependencies detected for LEDS_TRIGGER_AUDIO Depends on [n]: NEW_LEDS [=n] && LEDS_TRIGGERS [=y] Selected by [y]: - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y] Fixes: 7cdf8c49b1df ("ALSA: hda: generic: Add a helper for mic-mute LED with LED classdev") Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/01233744-9625-38b3-0342-1b37250dbc72@infradead.org Signed-off-by: Takashi Iwai commit 713bdcb920e34766164ee6b1b6ae36fb6fde5d42 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:38:42 2020 -0500 ALSA: core: pcm_iec958: fix kernel-doc Fix W=1 warning. The kernel doc uses the hwparams type instead of the argument name. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702193842.169215-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 46ee81521a3e9d4717736aef128b1e890dc24856 Author: Maxime Ripard Date: Fri Jul 3 15:57:13 2020 +0200 drm/vc4: Convert register accessors to FIELD_* The VC4_SET_FIELD and VC4_GET_FIELD are reimplementing most of the logic already defined in FIELD_SET and FIELD_GET. Let's convert the vc4 macros to use the FIELD_* macros. Signed-off-by: Maxime Ripard Reviewed-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20200703135713.985810-1-maxime@cerno.tech commit 21b2998d4aaeee0c54b6866aba591d8a91213d99 Author: Lee Jones Date: Thu Jun 25 10:03:55 2020 +0100 mfd: axp20x-i2c: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct axp20x_i2c_acpi_match becomes defined by unused. This squashes the current W=1 kernel builds warning: drivers/mfd/axp20x-i2c.c:82:36: warning: ‘axp20x_i2c_acpi_match’ defined but not used [-Wunused-const-variable=] Cc: Chen-Yu Tsai Cc: Carlo Caione Signed-off-by: Lee Jones commit f2ab263105c4f897ca482ae2e9a1ad560ca742d4 Author: Krzysztof Kozlowski Date: Fri Jul 3 20:44:51 2020 +0200 ARM: dts: exynos: Define fixed regulators in root node for consistency in SMDK5420 Remove the regulators node and define fixed regulators directly under the root node. This makes SMDK5420 board consistent with other Exynos boards. Name the fixed regulator nodes consistently. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 93be8759895d27d9dea5c197e9a9cba39b6f13fe Author: Krzysztof Kozlowski Date: Fri Jul 3 20:44:50 2020 +0200 ARM: dts: exynos: Define fixed regulators in root node for consistency in Arndale Remove the regulators node and define fixed regulators directly under the root node. This makes Exynos5250 Arndale board consistent with other Exynos boards. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 2999f0a9ef71d4d5d88b8a3fa298d14cfc4bad26 Author: Krzysztof Kozlowski Date: Fri Jul 3 20:44:49 2020 +0200 ARM: dts: exynos: Define fixed regulators in root node for consistency in Origen Remove the regulators node and define fixed regulators directly under the root node. This makes Exynos4412 Origen board consistent with other Exynos boards. Suggested-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit f91423e9de61de7a7d8b4b712cfe94cbc0effb1b Author: Krzysztof Kozlowski Date: Sun Jul 5 20:17:54 2020 +0200 ARM: dts: exynos: Remove DMA controller bus node name to fix dtschema warnings There is no need to keep DMA controller nodes under AMBA bus node. Remove the "amba" node to fix dtschema warnings like: amba: $nodename:0: 'amba' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Reviewed-by: Alim Akhtar commit 229134cc51d739bc99264ee14b7a783d479ce205 Author: Krzysztof Kozlowski Date: Mon Jun 29 21:33:38 2020 +0200 arm64: dts: exynos: Add unit address to soc node and move thermal zones on Exynos7 Add @0 unit address to 'soc' node match its 'reg' property and move the thermal zones out of 'soc' to main root as it this is usually not a property of a Soc. This silences DTC warnings: Warning (unit_address_vs_reg): /soc: node has a reg or ranges property, but no unit name Warning (simple_bus_reg): /soc/thermal-zones: missing or empty reg/ranges property Signed-off-by: Krzysztof Kozlowski commit 0eaecd29af2fae4b1ff6fe4aabadcbeb4ab1d519 Author: Krzysztof Kozlowski Date: Mon Jun 29 21:33:37 2020 +0200 arm64: dts: exynos: Add unit address to soc node on Exynos5433 Add @0 unit address to 'soc' node match its 'reg' property and silence DTC warning: Warning (unit_address_vs_reg): /soc: node has a reg or ranges property, but no unit name Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski commit 788f2ff795919a9f8f55f61bf749bfa7a785ce0a Author: Krzysztof Kozlowski Date: Thu Jul 2 17:51:45 2020 +0200 arm64: dts: exynos: Remove DMA controller bus node name to fix dtschema warnings There is no need to keep DMA controller nodes under AMBA bus node. Remove the "amba" node to fix dtschema warnings like: amba: $nodename:0: 'amba' does not match '^(bus|soc|axi|ahb|apb)(@[0-9a-f]+)?$' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar commit a7a84ea9c3e3793c44819fe47a64ab9b29162e0a Author: Alim Akhtar Date: Sun Jul 5 12:39:18 2020 +0530 arm64: dts: exynos: Keep LDO12 always-on on Espresso LDO12 on Exynos7 Espresso board supplies power to VDDQ_UFS20_RESET, in case this regulator is OFF, UFS host controller can not send command to UFS device. To keep this supply ON, set regulator-always-on property for this LDO. Signed-off-by: Alim Akhtar Signed-off-by: Krzysztof Kozlowski commit b072714bfc0e42c984b8fd6e069f3ca17de8137a Author: Alim Akhtar Date: Sun Jul 5 12:39:17 2020 +0530 arm64: dts: exynos: Fix silent hang after boot on Espresso Once regulators are disabled after kernel boot, on Espresso board silent hang observed because of LDO7 being disabled. LDO7 actually provide power to CPU cores and non-cpu blocks circuitries. Keep this regulator always-on to fix this hang. Fixes: 9589f7721e16 ("arm64: dts: Add S2MPS15 PMIC node on exynos7-espresso") Signed-off-by: Alim Akhtar Signed-off-by: Krzysztof Kozlowski commit aee13efe44c10b747e6b59659a242d8f7d266e92 Merge: c4f294fd2fd23 25c6f3960764b Author: Florian Fainelli Date: Mon Jul 6 21:56:00 2020 -0700 Merge tag 'tags/bcm2835-dt-next-2020-07-06' into devicetree/next Maxime Ripard introduces two new clock providers into RPi4's device tree: - The first one based on the enhancements made to clk-raspberrypi, which is now registered trough DT and provides control over the whole range of firmware based clocks. - The second one based on the new clk-bcm2711-dvp driver, which gates the clocks and reset signals that feed into RPi4's HDMI0/1 blocks. Signed-off-by: Florian Fainelli commit c4f294fd2fd23376cbafd277c672053e38e76e5d Author: Krzysztof Kozlowski Date: Fri Jun 26 10:06:46 2020 +0200 ARM: dts: bcm: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache@22000: $nodename:0: 'l2-cache@22000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Acked-by: Scott Branden Signed-off-by: Florian Fainelli commit 99e5a32902d9e144568add5dd8791aa66a69f0bf Author: Rafał Miłecki Date: Mon Jun 8 11:37:33 2020 +0200 ARM: dts: BCM5301X: Specify switch ports for Luxul devices All those devices use standard BCM53011 (rev 5) or BCM53012 (rev 0). Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 8adfb7c694d911669eb65256c760b3e250db1df5 Author: Xu Yilun Date: Tue Jun 16 12:08:48 2020 +0800 Documentation: fpga: dfl: add descriptions for interrupt related interfaces. This patch adds introductions of interrupt related interfaces for FME error reporting, port error reporting and AFU user interrupts features. Signed-off-by: Luwei Kang Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Reviewed-by: Marcelo Tosatti Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit 09d86150141955ba1b3d7cbef23785f4996e4d6f Author: Xu Yilun Date: Tue Jun 16 12:08:47 2020 +0800 fpga: dfl: afu: add AFU interrupt support AFU (Accelerated Function Unit) is dynamic region of the DFL based FPGA, and always defined by users. Some DFL based FPGA cards allow users to implement their own interrupts in AFU. In order to support this, hardware implements a new UINT (AFU Interrupt) private feature with related capability register which describes the number of supported AFU interrupts as well as the local index of the interrupts for software enumeration, and from software side, driver follows the common DFL interrupt notification and handling mechanism, and it implements two ioctls below for user to query number of irqs supported and set/unset interrupt triggers. Ioctls: * DFL_FPGA_PORT_UINT_GET_IRQ_NUM get the number of irqs, which is used to determine how many interrupts UINT feature supports. * DFL_FPGA_PORT_UINT_SET_IRQ set/unset eventfds as AFU interrupt triggers. Signed-off-by: Luwei Kang Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Reviewed-by: Marcelo Tosatti Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit d43f20bae5173ba431526040c320c36fdd4f086d Author: Xu Yilun Date: Tue Jun 16 12:08:46 2020 +0800 fpga: dfl: fme: add interrupt support for global error reporting Error reporting interrupt is very useful to notify users that some errors are detected by the hardware. Once users are notified, they could query hardware logged error states, no need to continuously poll on these states. This patch adds interrupt support for fme global error reporting sub feature. It follows the common DFL interrupt notification and handling mechanism. And it implements two ioctls below for user to query number of irqs supported, and set/unset interrupt triggers. Ioctls: * DFL_FPGA_FME_ERR_GET_IRQ_NUM get the number of irqs, which is used to determine whether/how many interrupts fme error reporting feature supports. * DFL_FPGA_FME_ERR_SET_IRQ set/unset given eventfds as fme error reporting interrupt triggers. Signed-off-by: Luwei Kang Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Reviewed-by: Marcelo Tosatti Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit fe6a3d6521227e49857d0d6caabbdae3bd4aef89 Author: Xu Yilun Date: Tue Jun 16 12:08:45 2020 +0800 fpga: dfl: afu: add interrupt support for port error reporting Error reporting interrupt is very useful to notify users that some errors are detected by the hardware. Once users are notified, they could query hardware logged error states, no need to continuously poll on these states. This patch adds interrupt support for port error reporting sub feature. It follows the common DFL interrupt notification and handling mechanism, implements two ioctl commands below for user to query number of irqs supported, and set/unset interrupt triggers. Ioctls: * DFL_FPGA_PORT_ERR_GET_IRQ_NUM get the number of irqs, which is used to determine whether/how many interrupts error reporting feature supports. * DFL_FPGA_PORT_ERR_SET_IRQ set/unset given eventfds as error interrupt triggers. Signed-off-by: Luwei Kang Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Reviewed-by: Marcelo Tosatti Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit fd49e03280e596e54edb93a91bc96170f8e97e4a Author: Matteo Croce Date: Mon Jul 6 19:37:36 2020 -0700 pstore: Fix linking when crypto API disabled When building a kernel with CONFIG_PSTORE=y and CONFIG_CRYPTO not set, a build error happens: ld: fs/pstore/platform.o: in function `pstore_dump': platform.c:(.text+0x3f9): undefined reference to `crypto_comp_compress' ld: fs/pstore/platform.o: in function `pstore_get_backend_records': platform.c:(.text+0x784): undefined reference to `crypto_comp_decompress' This because some pstore code uses crypto_comp_(de)compress regardless of the CONFIG_CRYPTO status. Fix it by wrapping the (de)compress usage by IS_ENABLED(CONFIG_PSTORE_COMPRESS) Signed-off-by: Matteo Croce Link: https://lore.kernel.org/lkml/20200706234045.9516-1-mcroce@linux.microsoft.com Fixes: cb3bee0369bc ("pstore: Use crypto compress API") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook commit 55a87cd858578a4c3f0ab6e24696df1954e86f2c Author: Domenico Andreoli Date: Sat Jun 27 14:25:05 2020 +0200 kbuild: buildtar: add dtbs support Make 'make tar-pkg' install dtbs. Signed-off-by: Domenico Andreoli Signed-off-by: Masahiro Yamada commit 685969e0bd732ff92e6626acc0c05f7204aa7ea6 Author: Masahiro Yamada Date: Sat Jun 27 03:59:13 2020 +0900 kbuild: remove cc-option test of -ffreestanding Some Makefiles already pass -ffreestanding unconditionally. For example, arch/arm64/lib/Makefile, arch/x86/purgatory/Makefile. No problem report so far about hard-coding this option. So, we can assume all supported compilers know -ffreestanding. I confirmed GCC 4.8 and Clang manuals document this option. Get rid of cc-option from -ffreestanding. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers Reviewed-by: Kees Cook Acked-by: Ard Biesheuvel commit 893ab00439a45513cae55781fc8e3b7108ee1cda Author: Masahiro Yamada Date: Sat Jun 27 03:59:12 2020 +0900 kbuild: remove cc-option test of -fno-stack-protector Some Makefiles already pass -fno-stack-protector unconditionally. For example, arch/arm64/kernel/vdso/Makefile, arch/x86/xen/Makefile. No problem report so far about hard-coding this option. So, we can assume all supported compilers know -fno-stack-protector. GCC 4.8 and Clang support this option (https://godbolt.org/z/_HDGzN) Get rid of cc-option from -fno-stack-protector. Remove CONFIG_CC_HAS_STACKPROTECTOR_NONE, which is always 'y'. Note: arch/mips/vdso/Makefile adds -fno-stack-protector twice, first unconditionally, and second conditionally. I removed the second one. Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook Acked-by: Ard Biesheuvel Reviewed-by: Nick Desaulniers commit dd7699e37f289fa433f42c6bcc108468c8b198c0 Author: Masahiro Yamada Date: Tue Jun 23 17:05:49 2020 +0900 Revert "kbuild: Create directory for target DTB" This reverts commit 77479b38e2f58890eb221a0418357502a5b41cd6. Since commit 8a78756eb545 ("kbuild: create object directories simpler and faster"), all directories for 'targets' are created. 'mkdir -p $(dir ${dtc-tmp})' is no longer needed. Signed-off-by: Masahiro Yamada commit 0c33f125732d0d33392ba6774d85469d565d3496 Author: Luc Van Oostenryck Date: Mon Jun 22 17:45:12 2020 +0200 kbuild: run the checker after the compiler Since the pre-git time the checker is run first, before the compiler. But if the source file contains some syntax error, the warnings from the compiler are more useful than those from sparse (and other checker most probably too). So move the 'check' command to run after the compiler. Signed-off-by: Luc Van Oostenryck Signed-off-by: Masahiro Yamada commit deae576455bbeb84a3a86bc359d322d66dfc841c Author: Sebastian Reichel Date: Wed May 20 10:30:55 2020 -0700 Input: exc3000 - switch to i2c's probe_new API Switch to the "new" I2C probe API. Signed-off-by: Sebastian Reichel Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200520153936.46869-3-sebastian.reichel@collabora.com Signed-off-by: Dmitry Torokhov commit 05b8465025466f30300941a16d4bbf53c755c3f1 Author: Colin Ian King Date: Mon Jul 6 17:38:16 2020 -0700 Input: elantech - remove redundant assignments to variable error The variable error is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200603140431.131347-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov commit 514acd00f957afa9b2a1fd521b2f180a950ee5e3 Author: Andrzej Pietrasiewicz Date: Fri Jul 3 12:43:54 2020 +0200 thermal: Make thermal_zone_device_is_enabled() available to core only This function is not needed by drivers. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200703104354.19657-4-andrzej.p@collabora.com commit d92ed2c9d3ff65b4d8740135a0f348cc073f013e Author: Andrzej Pietrasiewicz Date: Fri Jul 3 12:43:53 2020 +0200 thermal: imx: Use driver's local data to decide whether to run a measurement Use driver's local data to evaluate the need to run or not to run a measurement. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200703104354.19657-3-andrzej.p@collabora.com commit 7a7d66f26b0ff47e7edbc9df884ad711ed918992 Author: Andrzej Pietrasiewicz Date: Fri Jul 3 12:43:52 2020 +0200 acpi: thermal: Don't call thermal_zone_device_is_enabled() thermal_zone_device_update() can now handle disabled thermal zones, so the check here is not needed. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200703104354.19657-2-andrzej.p@collabora.com commit 28ad5f65c314ffdd5888d6afa61772d3032a332c Author: Leon Romanovsky Date: Tue Jun 30 13:18:54 2020 +0300 RDMA: Move XRCD to be under ib_core responsibility Update the code to allocate and free ib_xrcd structure in the ib_core instead of inside drivers. Link: https://lore.kernel.org/r/20200630101855.368895-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3b023e1b680a56e84c22d43486875a5aa4c78afe Author: Leon Romanovsky Date: Tue Jun 30 13:18:52 2020 +0300 RDMA/core: Create and destroy counters in the ib_core Move allocation and destruction of counters under ib_core responsibility Link: https://lore.kernel.org/r/20200630101855.368895-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6c01e6b218aea09ec9947cbf88a4db97b4dd155c Author: Yishai Hadas Date: Tue Jun 30 12:39:16 2020 +0300 IB/uverbs: Expose UAPI to query MR Expose UAPI to query MR, this will let user space application that didn't allocate the MR but has access to by owning the matching command FD to retrieve its information. Link: https://lore.kernel.org/r/20200630093916.332097-8-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 05f71ef9797454b9384c740b8acd0d02eca1d1bc Author: Yishai Hadas Date: Tue Jun 30 12:39:15 2020 +0300 RDMA/mlx5: Introduce UAPI to query PD attributes Introduce UAPI to query PD attributes, this can be used to retrieve PD attributes by having the PD handle of the created one and owning the command FD for the ucontxet. Link: https://lore.kernel.org/r/20200630093916.332097-7-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 0fb556b2b58d6b8336c94379042bad2a8512af1a Author: Yishai Hadas Date: Tue Jun 30 12:39:14 2020 +0300 RDMA/mlx5: Implement the query ucontext functionality Implement the query ucontext functionality by returning the original ucontext data as part of an extra mlx5 attribute that holds the driver UAPI response. Link: https://lore.kernel.org/r/20200630093916.332097-6-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 45ec21c971eddfb5e8e953e49a9dbe780f4a4997 Author: Yishai Hadas Date: Tue Jun 30 12:39:13 2020 +0300 RDMA/mlx5: Refactor mlx5_ib_alloc_ucontext() response Refactor mlx5_ib_alloc_ucontext() to set its response fields in a cleaner way. It includes, - Move the relevant code to a self contained function. - Calculate the response length once and drop redundant code all around. - Reuse previously set ucontext fields once preparing the response. The self contained function will be used in next patch as part of implementing the query ucontext functionality. Link: https://lore.kernel.org/r/20200630093916.332097-5-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1c8fb1ea5a1dbd2159e78fa580aaffb001794cfa Author: Yishai Hadas Date: Tue Jun 30 12:39:12 2020 +0300 IB/uverbs: Expose UAPI to query ucontext Expose UAPI to query ucontext, this will let user space application that didn't allocate the ucontext but has access to by owning the matching command FD to retrieve the ucontext information. Link: https://lore.kernel.org/r/20200630093916.332097-4-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 04c0a5fcfcf65aade2fb238b6336445f1a99b646 Author: Yishai Hadas Date: Tue Jun 30 12:39:11 2020 +0300 IB/uverbs: Set IOVA on IB MR in uverbs layer Set IOVA on IB MR in uverbs layer to let all drivers have it, this includes both reg/rereg MR flows. As part of this change cleaned-up this setting from the drivers that already did it by themselves in their user flows. Fixes: e6f0330106f4 ("mlx4_ib: set user mr attributes in struct ib_mr") Link: https://lore.kernel.org/r/20200630093916.332097-3-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 263427526f0c00490c20e4940d1fd4277fb5f7b3 Author: Yishai Hadas Date: Tue Jun 30 12:39:10 2020 +0300 IB/uverbs: Enable CQ ioctl commands by default Enable CQ ioctl commands by default, this functionality is fully mature to be used over ioctl, no reason to maintain any more the EXP KCONFIG entry to enable it. Link: https://lore.kernel.org/r/20200630093916.332097-2-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6f3ca6f4f5e05b52bf6851ada21026faa106de76 Author: Maor Gottlieb Date: Mon Jul 6 15:27:16 2020 +0300 RDMA/core: Optimize XRC target lookup Replace the mutex with read write semaphore and use xarray instead of linked list for XRC target QPs. This will give faster XRC target lookup. In addition, when QP is closed, don't insert it back to the xarray if the destroy command failed. Link: https://lore.kernel.org/r/20200706122716.647338-4-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b73efcb26e2c6d66797c57bed8df13c3718c58cb Author: Maor Gottlieb Date: Mon Jul 6 15:27:15 2020 +0300 RDMA/core: Clean ib_alloc_xrcd() and reuse it to allocate XRC domain ib_alloc_xrcd() already does the required initialization, so move the uverbs to call it and save code duplication, while cleaning the function argument lists of that function. Link: https://lore.kernel.org/r/20200706122716.647338-3-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f4375443b7861ca5d93a10dba5ef5a478d5df96a Author: Leon Romanovsky Date: Mon Jul 6 15:27:14 2020 +0300 RDMA/mlx5: Get XRCD number directly for the internal use The mlx5_ib creates XRC domain and uses for creating internal SRQ. However all that is needed is XRCD number and not full blown ib_xrcd objects. Update the code to get and store the number only. Link: https://lore.kernel.org/r/20200706122716.647338-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 42a3b153966c9cd9a90f6a669d1ffed7fef2d325 Author: Gal Pressman Date: Mon Jul 6 15:03:43 2020 +0300 RDMA: Remove the udata parameter from alloc_mr callback Allocating an MR flow can only be initiated by kernel users, and not from userspace so a udata parameter is redundant. Link: https://lore.kernel.org/r/20200706120343.10816-4-galpress@amazon.com Signed-off-by: Gal Pressman Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b64b74b1d51cce8c9496b6a071c1d59786c2144d Author: Gal Pressman Date: Mon Jul 6 15:03:42 2020 +0300 RDMA/core: Remove ib_alloc_mr_user function Allocating an MR flow can only be initiated by kernel users, and not from userspace. As a result, the udata parameter is always being passed as NULL. Rename ib_alloc_mr_user function to ib_alloc_mr and remove the udata parameter. Link: https://lore.kernel.org/r/20200706120343.10816-3-galpress@amazon.com Signed-off-by: Gal Pressman Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c5f42b21051517a2070a67d21be8e423d5fdf0d9 Author: Gal Pressman Date: Mon Jul 6 15:03:41 2020 +0300 RDMA/core: Check for error instead of success in alloc MR function The common kernel pattern is to check for error, not success. Flip the if statement accordingly and keep the main flow unindented. Link: https://lore.kernel.org/r/20200706120343.10816-2-galpress@amazon.com Signed-off-by: Gal Pressman Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit cbf25270933742c4a6d8671bba5c79a4e879cff3 Author: Shuah Khan Date: Mon Jun 29 14:02:23 2020 -0600 cpupower: Fix NULL but dereferenced coccicheck errors Fix NULL but dereferenced coccicheck errors found by: make coccicheck MODE=report M=tools/power/cpupower tools/power/cpupower/lib/cpufreq.c:384:19-23: ERROR: first is NULL but dereferenced. tools/power/cpupower/lib/cpufreq.c:440:19-23: ERROR: first is NULL but dereferenced. tools/power/cpupower/lib/cpufreq.c:308:19-23: ERROR: first is NULL but dereferenced. tools/power/cpupower/lib/cpufreq.c:753:19-23: ERROR: first is NULL but dereferenced. Signed-off-by: Shuah Khan commit 8e022709c41e55b5b4a9d75a3380b7286c3c588c Author: Shuah Khan Date: Mon Jun 29 14:02:22 2020 -0600 cpupower: Fix comparing pointer to 0 coccicheck warns Fix cocciccheck wanrns found by: make coccicheck MODE=report M=tools/power/cpupower/ tools/power/cpupower/utils/helpers/bitmask.c:29:12-13: WARNING comparing pointer to 0, suggest !E tools/power/cpupower/utils/helpers/bitmask.c:29:12-13: WARNING comparing pointer to 0 tools/power/cpupower/utils/helpers/bitmask.c:43:12-13: WARNING comparing pointer to 0 Signed-off-by: Shuah Khan commit 0ef67a888375b0d11930a9811e1152b6ebc385a8 Author: Kees Cook Date: Mon Jun 22 11:16:51 2020 -0700 selftests/harness: Report skip reason Use a share memory segment to pass string information between forked test and the test runner for the skip reason. Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit d088c92802549fc1cf77a12a4e3986160d63662a Author: Kees Cook Date: Mon Jun 22 11:16:50 2020 -0700 selftests/harness: Display signed values correctly Since forever the harness output for signed value tests have reported unsigned values to avoid casting. Instead, actually test the variable types and perform the correct casts and choose the correct format specifiers. Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 9847d24af95c7fa146c9a0e82505a78e29161c10 Author: Kees Cook Date: Mon Jun 22 11:16:49 2020 -0700 selftests/harness: Refactor XFAIL into SKIP Plumb the old XFAIL result into a TAP SKIP. Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit e80068be21824e4d2726eeea41cac6178d212415 Author: Kees Cook Date: Mon Jun 22 11:16:48 2020 -0700 selftests/harness: Switch to TAP output Using the kselftest_harness.h would result in non-TAP test reporting, which didn't make much sense given that all the requirements for using the low-level API were met. Switch to using ksft_*() helpers while retaining as much of a human-readability as possible. Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 245dd6041d0d923fb6563a0704749d3a7de16c56 Author: Kees Cook Date: Mon Jun 22 11:16:47 2020 -0700 selftests: Add header documentation and helpers Add "how to use this API" documentation to kselftest.h, and include some addition helpers and notes to make things easier to use. Additionally removes the incorrect "Bail out!" line from the standard exit path. The TAP13 specification says that "Bail out!" should be used when giving up before all tests have been run. For a "normal" execution run, the selftests should not report "Bail out!". Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit eaa163caa4cc72c4381504562b6021a6ffbadc50 Author: Kees Cook Date: Mon Jun 22 11:16:46 2020 -0700 selftests/binderfs: Fix harness API usage The binderfs test mixed the full harness API and the selftest API. Adjust to use only the harness API so that the harness API can switch to using the selftest API internally in future patches. Acked-by: Christian Brauner Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit ce79097a8f8391fdec835d1deaa112fba4b18362 Author: Kees Cook Date: Mon Jun 22 11:16:45 2020 -0700 selftests: Remove unneeded selftest API headers Remove unused includes of the kselftest.h header. Acked-by: Christian Brauner Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 51ad5b54b61d67f6316795da3696c5163aa805cb Author: Kees Cook Date: Mon Jun 22 11:16:44 2020 -0700 selftests/clone3: Reorder reporting output Selftest output reporting was happening before the TAP headers and plan had been emitted. Move the first test reports later. Acked-by: Christian Brauner Signed-off-by: Kees Cook Signed-off-by: Shuah Khan commit 63aa57f52ce431682206f874a9d39a426e5ce7ea Author: Paolo Bonzini Date: Mon Jun 22 20:15:47 2020 -0400 selftests: sync_test: do not use ksft_exit_skip after ksft_set_plan Calling ksft_exit_skip after ksft_set_plan results in executing fewer tests than planned. Move it before. Signed-off-by: Paolo Bonzini Signed-off-by: Shuah Khan commit 5b0b77ac41e8d97260b35bade6eea21b2d74fdca Author: Paolo Bonzini Date: Mon Jun 22 20:15:46 2020 -0400 selftests: sigaltstack: do not use ksft_exit_skip after ksft_set_plan Calling ksft_exit_skip after ksft_set_plan results in executing fewer tests than planned. Use ksft_test_result_skip when possible, or just bail out if memory corruption is detected. Signed-off-by: Paolo Bonzini Signed-off-by: Shuah Khan commit f000a39c27cc5792f7ac0e8bf2a6cae40de39807 Author: Paolo Bonzini Date: Mon Jun 22 20:15:44 2020 -0400 selftests: breakpoints: do not use ksft_exit_skip after ksft_set_plan Calling ksft_exit_skip after ksft_set_plan results in executing fewer tests than planned. Use ksft_test_result_skip for the individual tests. The call in suspend() is fine, but ksft_set_plan should be after it. Signed-off-by: Paolo Bonzini Signed-off-by: Shuah Khan commit ce32659b3673767cd92c4919d4000aa0dc056c1c Author: Paolo Bonzini Date: Mon Jun 22 20:15:43 2020 -0400 selftests: breakpoints: fix computation of test plan The computation of the test plan uses the available_cpus bitset before calling sched_getaffinity to fill it in. The resulting plan is bogus, fix it. Signed-off-by: Paolo Bonzini Signed-off-by: Shuah Khan commit b85d387c9b091953d5e8ac4c72af6747c1a554e3 Author: Paolo Bonzini Date: Mon Jun 22 20:15:42 2020 -0400 kselftest: fix TAP output for skipped tests According to the TAP specification, a skipped test must be marked as "ok" and annotated with the SKIP directive, for example ok 23 # skip Insufficient flogiston pressure. (https://testanything.org/tap-specification.html) Fix the kselftest infrastructure to match this. For ksft_exit_skip, it is preferrable to emit a dummy plan line that indicates the whole test was skipped, but this is not always possible because of ksft_exit_skip being used as a "shortcut" by the tests. In that case, print the test counts and a normal "ok" line. The format is now the same independent of whether msg is NULL or not (but it is never NULL in any caller right now). Signed-off-by: Paolo Bonzini Signed-off-by: Shuah Khan commit d47a72152097d7be7cfc453d205196c0aa976c33 Author: Davide Caratti Date: Mon Jul 6 21:06:12 2020 +0200 mptcp: fix race in subflow_data_ready() syzkaller was able to make the kernel reach subflow_data_ready() for a server subflow that was closed before subflow_finish_connect() completed. In these cases we can avoid using the path for regular/fallback MPTCP data, and just wake the main socket, to avoid the following warning: WARNING: CPU: 0 PID: 9370 at net/mptcp/subflow.c:885 subflow_data_ready+0x1e6/0x290 net/mptcp/subflow.c:885 Kernel panic - not syncing: panic_on_warn set ... CPU: 0 PID: 9370 Comm: syz-executor.0 Not tainted 5.7.0 #106 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xb7/0xfe lib/dump_stack.c:118 panic+0x29e/0x692 kernel/panic.c:221 __warn.cold+0x2f/0x3d kernel/panic.c:582 report_bug+0x28b/0x2f0 lib/bug.c:195 fixup_bug arch/x86/kernel/traps.c:105 [inline] fixup_bug arch/x86/kernel/traps.c:100 [inline] do_error_trap+0x10f/0x180 arch/x86/kernel/traps.c:197 do_invalid_op+0x32/0x40 arch/x86/kernel/traps.c:216 invalid_op+0x1e/0x30 arch/x86/entry/entry_64.S:1027 RIP: 0010:subflow_data_ready+0x1e6/0x290 net/mptcp/subflow.c:885 Code: 04 02 84 c0 74 06 0f 8e 91 00 00 00 41 0f b6 5e 48 31 ff 83 e3 18 89 de e8 37 ec 3d fe 84 db 0f 85 65 ff ff ff e8 fa ea 3d fe <0f> 0b e9 59 ff ff ff e8 ee ea 3d fe 48 89 ee 4c 89 ef e8 f3 77 ff RSP: 0018:ffff88811b2099b0 EFLAGS: 00010206 RAX: ffff888111197000 RBX: 0000000000000000 RCX: ffffffff82fbc609 RDX: 0000000000000100 RSI: ffffffff82fbc616 RDI: 0000000000000001 RBP: ffff8881111bc800 R08: ffff888111197000 R09: ffffed10222a82af R10: ffff888111541577 R11: ffffed10222a82ae R12: 1ffff11023641336 R13: ffff888111541000 R14: ffff88810fd4ca00 R15: ffff888111541570 tcp_child_process+0x754/0x920 net/ipv4/tcp_minisocks.c:841 tcp_v4_do_rcv+0x749/0x8b0 net/ipv4/tcp_ipv4.c:1642 tcp_v4_rcv+0x2666/0x2e60 net/ipv4/tcp_ipv4.c:1999 ip_protocol_deliver_rcu+0x29/0x1f0 net/ipv4/ip_input.c:204 ip_local_deliver_finish net/ipv4/ip_input.c:231 [inline] NF_HOOK include/linux/netfilter.h:421 [inline] ip_local_deliver+0x2da/0x390 net/ipv4/ip_input.c:252 dst_input include/net/dst.h:441 [inline] ip_rcv_finish net/ipv4/ip_input.c:428 [inline] ip_rcv_finish net/ipv4/ip_input.c:414 [inline] NF_HOOK include/linux/netfilter.h:421 [inline] ip_rcv+0xef/0x140 net/ipv4/ip_input.c:539 __netif_receive_skb_one_core+0x197/0x1e0 net/core/dev.c:5268 __netif_receive_skb+0x27/0x1c0 net/core/dev.c:5382 process_backlog+0x1e5/0x6d0 net/core/dev.c:6226 napi_poll net/core/dev.c:6671 [inline] net_rx_action+0x3e3/0xd70 net/core/dev.c:6739 __do_softirq+0x18c/0x634 kernel/softirq.c:292 do_softirq_own_stack+0x2a/0x40 arch/x86/entry/entry_64.S:1082 do_softirq.part.0+0x26/0x30 kernel/softirq.c:337 do_softirq arch/x86/include/asm/preempt.h:26 [inline] __local_bh_enable_ip+0x46/0x50 kernel/softirq.c:189 local_bh_enable include/linux/bottom_half.h:32 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:723 [inline] ip_finish_output2+0x78a/0x19c0 net/ipv4/ip_output.c:229 __ip_finish_output+0x471/0x720 net/ipv4/ip_output.c:306 dst_output include/net/dst.h:435 [inline] ip_local_out+0x181/0x1e0 net/ipv4/ip_output.c:125 __ip_queue_xmit+0x7a1/0x14e0 net/ipv4/ip_output.c:530 __tcp_transmit_skb+0x19dc/0x35e0 net/ipv4/tcp_output.c:1238 __tcp_send_ack.part.0+0x3c2/0x5b0 net/ipv4/tcp_output.c:3785 __tcp_send_ack net/ipv4/tcp_output.c:3791 [inline] tcp_send_ack+0x7d/0xa0 net/ipv4/tcp_output.c:3791 tcp_rcv_synsent_state_process net/ipv4/tcp_input.c:6040 [inline] tcp_rcv_state_process+0x36a4/0x49c2 net/ipv4/tcp_input.c:6209 tcp_v4_do_rcv+0x343/0x8b0 net/ipv4/tcp_ipv4.c:1651 sk_backlog_rcv include/net/sock.h:996 [inline] __release_sock+0x1ad/0x310 net/core/sock.c:2548 release_sock+0x54/0x1a0 net/core/sock.c:3064 inet_wait_for_connect net/ipv4/af_inet.c:594 [inline] __inet_stream_connect+0x57e/0xd50 net/ipv4/af_inet.c:686 inet_stream_connect+0x53/0xa0 net/ipv4/af_inet.c:725 mptcp_stream_connect+0x171/0x5f0 net/mptcp/protocol.c:1920 __sys_connect_file net/socket.c:1854 [inline] __sys_connect+0x267/0x2f0 net/socket.c:1871 __do_sys_connect net/socket.c:1882 [inline] __se_sys_connect net/socket.c:1879 [inline] __x64_sys_connect+0x6f/0xb0 net/socket.c:1879 do_syscall_64+0xb7/0x3d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fb577d06469 Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 ff 49 2b 00 f7 d8 64 89 01 48 RSP: 002b:00007fb5783d5dd8 EFLAGS: 00000246 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 000000000068bfa0 RCX: 00007fb577d06469 RDX: 000000000000004d RSI: 0000000020000040 RDI: 0000000000000003 RBP: 00000000ffffffff R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000041427c R14: 00007fb5783d65c0 R15: 0000000000000003 Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/39 Reported-by: Christoph Paasch Fixes: e1ff9e82e2ea ("net: mptcp: improve fallback to TCP") Suggested-by: Paolo Abeni Signed-off-by: Davide Caratti Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 4d010d1447a8bb6a079f817aee76876be70e91e5 Author: Puranjay Mohan Date: Tue Jul 7 00:19:56 2020 +0530 Security: Documentation: Replace deprecated :c:func: Usage Replace :c:func: with ``func()`` as the previous usage is deprecated. Remove an extra ')' to fix broken cross reference. Signed-off-by: Puranjay Mohan Link: https://lore.kernel.org/r/20200706184956.6928-1-puranjay12@gmail.com Signed-off-by: Jonathan Corbet commit 7a6498ebcdc0fde4613a20ae405481d49166e8bb Author: Alexander A. Klimov Date: Mon Jul 6 19:38:50 2020 +0200 Replace HTTP links with HTTPS ones: IPv* Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Signed-off-by: David S. Miller commit 1eafa7369f170ac7dbe06a3774e642084051d475 Merge: 9e06e8596bc87 fd0816628a5a6 Author: David S. Miller Date: Mon Jul 6 13:18:56 2020 -0700 Merge branch 'qed-warnings-cleanup' Alexander Lobakin says: ==================== net: qed/qede: W=1 C=1 warnings cleanup This set cleans qed/qede build log under W=1 C=1 with GCC 8 and sparse 0.6.2. The only thing left is "context imbalance -- unexpected unlock" in one of the source files, which will be issued later during the refactoring cycles. The biggest part is handling the endianness warnings. The current code often just assumes that both host and device operate in LE, which is obviously incorrect (despite the fact that it's true for x86 platforms), and makes sparse {s,m}ad. The rest of the series is mostly random non-functional fixes here-and-there. ==================== Signed-off-by: David S. Miller commit fd0816628a5a60a6d3719281d5c14d3aa45eaba1 Author: Alexander Lobakin Date: Mon Jul 6 18:38:21 2020 +0300 net: qede: fix BE vs CPU comparison Flow Dissector's keys are mostly Network / Big Endian. U{16,32}_MAX are the same in either of byteorders, but let's make sparse happy with wrapping them into noops. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 50089be6bf61310a81e622599d13a68f2309c119 Author: Alexander Lobakin Date: Mon Jul 6 18:38:20 2020 +0300 net: qede: fix kernel-doc for qede_ptp_adjfreq() One of the function arguments was renamed some time ago, but this wasn't reflected in its kernel-doc comment. Also add the description for return values. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 5ab903418ad14732131df0af0d63f19b73e377ae Author: Alexander Lobakin Date: Mon Jul 6 18:38:19 2020 +0300 net: qed: sanitize BE/LE data processing Current code assumes that both host and device operates in Little Endian in lots of places. While this is true for x86 platform, this doesn't mean we should not care about this. This commit addresses all parts of the code that were pointed out by sparse checker. All operations with restricted (__be*/__le*) types are now protected with explicit from/to CPU conversions, even if they're noops on common setups. I'm sure there are more such places, but this implies a deeper code investigation, and is a subject for future works. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit a0f3266f4bf966eefd02123d3aacdf7df8d67c1c Author: Alexander Lobakin Date: Mon Jul 6 18:38:18 2020 +0300 net: qed: use ptr shortcuts to dedup field accessing in some parts Use intermediate pointers instead of multiple dereferencing to simplify and beautify parts of code that will be addressed in the next commit. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 1451e467a3a5a26f3133214078d198cc6ade1ae0 Author: Alexander Lobakin Date: Mon Jul 6 18:38:17 2020 +0300 net: qed: improve indentation of some parts of code To not mix functional and stylistic changes, correct indentation of code that will be modified in the subsequent commits. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 71e11a3f5e57ccc4ede64a8bdc578e99e2455c4f Author: Alexander Lobakin Date: Mon Jul 6 18:38:16 2020 +0300 net: qed: address kernel-doc warnings Get rid of the kernel-doc warnings when building with W=1+ by rewriting the problematic doc comments according to the recommended format and style. Note that this only fixes problems found in C source files, headers aren't in scope for now. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 365cd2cee0c9813ccabe3e5b12c1b3bf499f8c27 Author: Alexander Lobakin Date: Mon Jul 6 18:38:15 2020 +0300 net: qed: correct qed_hw_err_notify() prototype Change the prototype of qed_hw_err_notify() with the following: * constify "fmt" argument according to printk() declarations; * anontate it with __cold attribute to move the function out of the line; * annotate it with __printf() attribute; This eliminates W=1+ warning: drivers/net/ethernet/qlogic/qed/qed_hw.c: In function ‘qed_hw_err_notify’: drivers/net/ethernet/qlogic/qed/qed_hw.c:851:3: warning: function ‘qed_hw_err_notify’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] len = vsnprintf(buf, QED_HW_ERR_MAX_STR_SIZE, fmt, vl); ^~~ as well as saves some code size: add/remove: 0/0 grow/shrink: 2/4 up/down: 40/-125 (-85) Function old new delta qed_dmae_execute_command 1680 1711 +31 qed_spq_post 1104 1113 +9 qed_int_sp_dpc 3554 3545 -9 qed_mcp_cmd_and_union 1896 1876 -20 qed_hw_err_notify 395 352 -43 qed_mcp_handle_events 2630 2577 -53 Total: Before=368645, After=368560, chg -0.02% __printf() will also be helpful with catching bad format strings and arguments. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit c6b7314d53874d5d9ea7f43bd774c6d4ee596bdd Author: Alexander Lobakin Date: Mon Jul 6 18:38:14 2020 +0300 net: qed: cleanup global structs declarations Fix several sparse warnings by moving structs declarations into the corresponding header files: drivers/net/ethernet/qlogic/qed/qed_dcbx.c:2402:32: warning: symbol 'qed_dcbnl_ops_pass' was not declared. Should it be static? drivers/net/ethernet/qlogic/qed/qed_ll2.c:2754:26: warning: symbol 'qed_ll2_ops_pass' was not declared. Should it be static? drivers/net/ethernet/qlogic/qed/qed_ptp.c:449:30: warning: symbol 'qed_ptp_ops_pass' was not declared. Should it be static? drivers/net/ethernet/qlogic/qed/qed_sriov.c:5265:29: warning: symbol 'qed_iov_ops_pass' was not declared. Should it be static? (some of them were declared twice in different header files) Also make qed_hw_err_type_descr[] const while at it. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 0dfda108bf3794acc4aeae7b32377dd98fa22a7d Author: Alexander Lobakin Date: Mon Jul 6 18:38:13 2020 +0300 net: qed: move static iro_arr[] out of header file Static variables (and functions, unless they're inline) should not be declared in header files. Move the static array iro_arr[] from "qed_hsi.h" to the sole place where it's used, "qed_init_ops.c". This eliminates lots of warnings (42 of them actually) against W=1+: In file included from drivers/net/ethernet/qlogic/qed/qed.h:51:0, from drivers/net/ethernet/qlogic/qed/qed_ooo.c:40: drivers/net/ethernet/qlogic/qed/qed_hsi.h:4421:18: warning: 'iro_arr' defined but not used [-Wunused-const-variable=] static const u32 iro_arr[] = { ^~~~~~~ Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 9e06e8596bc87cad9dd18869a1b1b42132170dd9 Author: Sabrina Dubroca Date: Mon Jul 6 17:18:08 2020 +0200 geneve: move all configuration under struct geneve_config This patch adds a new structure geneve_config and moves the per-device configuration attributes to it, like we already have in VXLAN with struct vxlan_config. This ends up being pretty invasive since those attributes are used everywhere. This allows us to clean up the argument lists for geneve_configure (4 arguments instead of 8) and geneve_nl2info (5 instead of 9). This also reduces the copy-paste of code setting those attributes between geneve_configure and geneve_changelink to a single memcpy, which would have avoided the bug fixed in commit 56c09de347e4 ("geneve: allow changing DF behavior after creation"). Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller commit 0fe665d42fd0844dbfb60f15b09d71fd0c409b00 Author: Ioana Ciornei Date: Mon Jul 6 17:55:54 2020 +0300 dpaa2-eth: fix draining of S/G cache On link down, the draining of the S/G cache should be done on all _possible_ CPUs not just the ones that are online in that moment. Fix this by changing the iterator. Fixes: d70446ee1f40 ("dpaa2-eth: send a scatter-gather FD instead of realloc-ing") Reported-by: Jakub Kicinski Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit bc0c3ae40a03d47709b5d9d86cc9ed0681691e03 Author: Tang Bin Date: Mon Jul 6 22:47:01 2020 +0800 net/amd: Remove needless assignment and the extra brank lines The variable 'err = -ENODEV;' in au1000_probe() is duplicate, so remove redundant one. And remove the extra blank lines in the file au1000_eth.c Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Signed-off-by: David S. Miller commit 0b8241fe3c4e172332f9fa690db6689e78e8e27f Author: Matthieu Baerts Date: Mon Jul 6 14:44:08 2020 +0200 selftests: mptcp: capture pcap on both sides When investigating performance issues that involve latency / loss / reordering it is useful to have the pcap from the sender-side as it allows to easier infer the state of the sender's congestion-control, loss-recovery, etc. Allow the selftests to capture a pcap on both sender and receiver so that this information is not lost when reproducing. This patch also improves the file names. Instead of: ns4-5ee79a56-X4O6gS-ns3-5ee79a56-X4O6gS-MPTCP-MPTCP-10.0.3.1.pcap We now have something like for the same test: 5ee79a56-X4O6gS-ns3-ns4-MPTCP-MPTCP-10.0.3.1-10030-connector.pcap 5ee79a56-X4O6gS-ns3-ns4-MPTCP-MPTCP-10.0.3.1-10030-listener.pcap It was a connection from ns3 to ns4, better to start with ns3 then. The port is also added, easier to find the trace we want. Co-developed-by: Christoph Paasch Signed-off-by: Christoph Paasch Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 83184b8bbc39584d96ce1ded3e63b309d172a1b7 Merge: 5bd6ff0c6fe6c f193f4ebde3d6 Author: David S. Miller Date: Mon Jul 6 12:24:15 2020 -0700 Merge branch 'ethernet-sun-use-generic-power-management' Vaibhav Gupta says: ==================== ethernet: sun: use generic power management Linux Kernel Mentee: Remove Legacy Power Management. The purpose of this patch series is to remove legacy power management callbacks from sun ethernet drivers. The callbacks performing suspend() and resume() operations are still calling pci_save_state(), pci_set_power_state(), etc. and handling the power management themselves, which is not recommended. The conversion requires the removal of the those function calls and change the callback definition accordingly and make use of dev_pm_ops structure. All patches are compile-tested only. ==================== Signed-off-by: David S. Miller commit f193f4ebde3d61737c93e8091964ef6cd199076b Author: Vaibhav Gupta Date: Mon Jul 6 14:27:46 2020 +0530 sun/cassini: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit b0db0cc2f695b70e36a776e708d5ccfff8add1d6 Author: Vaibhav Gupta Date: Mon Jul 6 14:27:45 2020 +0530 sun/niu: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. The driver was calling pci_save/restore_state() which is no more needed. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit d4ce70b3b6b777e6a76e18b5c4ca9cb50085efb8 Author: Vaibhav Gupta Date: Mon Jul 6 14:27:44 2020 +0530 sun/sungem: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. And they use PCI helper functions to do it. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. In this driver: gem_suspend() calls gem_do_stop() which in turn invokes pci_disable_device(). As the PCI helper function is not called at the end/start of the function body, breaking the function in two parts may change its behavior. The only other function invoking gem_do_stop() is gem_close(). Hence, gem_close() and gem_suspend() can do the required end steps on their own. The same case is with gem_resume(). Both gem_resume() and gem_open() invoke gem_do_start(). Again, make the caller functions do the required steps on their own. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit b037b09b9058d84882fa2c4db3806433e2b0f912 Author: Andy Lutomirski Date: Fri Jul 3 10:02:58 2020 -0700 x86/entry: Rename idtentry_enter/exit_cond_rcu() to idtentry_enter/exit() They were originally called _cond_rcu because they were special versions with conditional RCU handling. Now they're the standard entry and exit path, so the _cond_rcu part is just confusing. Drop it. Also change the signature to make them more extensible and more foolproof. No functional change -- it's pure refactoring. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/247fc67685263e0b673e1d7f808182d28ff80359.1593795633.git.luto@kernel.org commit 86aa1608202250793d54deef66f3909c415c2bcb Merge: 48778464bb7d3 821b67fa46390 Author: Arnd Bergmann Date: Mon Jul 6 21:05:20 2020 +0200 Merge tag 'soc-attr-updates-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers SoC attributes update for v5.9 1. Addition of ARM SMCCC ARCH_SOC_ID support 2. Usage of the custom soc attribute groups already supported in the infrastucture instead of device_create_file which eliminates the need for any cleanup when soc is unregistered 3. Minor clean up switching to use standard DEVICE_ATTR_RO() instead of direct __ATTR * tag 'soc-attr-updates-5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: smccc: Add ARCH_SOC_ID support ARM: OMAP2: Use custom soc attribute group instead of device_create_file ARM: OMAP2: Switch to use DEVICE_ATTR_RO() soc: ux500: Use custom soc attribute group instead of device_create_file soc: ux500: Switch to use DEVICE_ATTR_RO() soc: integrator: Use custom soc attribute group instead of device_create_file soc: integrator: Switch to use DEVICE_ATTR_RO() soc: realview: Use custom soc attribute group instead of device_create_file soc: realview: Switch to use DEVICE_ATTR_RO() Link: https://lore.kernel.org/r/20200706165312.40697-1-sudeep.holla@arm.com Signed-off-by: Arnd Bergmann commit 6f48fd8a4e99118377bdabf3cb38fc95aa097a2f Author: Flavio Suligoi Date: Fri Jul 3 14:50:46 2020 +0200 drm/i915: Fix spelling mistake in i915_reg.h Fix typo: "TRIGER" --> "TRIGGER" The two misplelled macros: 1) OAREPORTTRIG1_EDGE_LEVEL_TRIGER_SELECT_MASK 2) OAREPORTTRIG5_EDGE_LEVEL_TRIGER_SELECT_MASK are not used in any other sources of the kernel, so this change can be consider only a local change for the i915_reg.h file. Signed-off-by: Flavio Suligoi Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200703125046.8395-1-f.suligoi@asem.it commit fcab594a3030d49db933d68bdad398ab8fea265c Author: Michał Winiarski Date: Mon Jul 6 16:41:07 2020 +0200 drm/i915: Don't taint when using fault injection It is not really unexpected to hit wedge on init this way. We're already downgrading error printk when running with fault injection, let's use the same approach for CI tainting. v2: Don't check fault inject in trace dump (Chris) Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Petri Latvala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200706144107.204821-3-michal@hardline.pl commit 65706203d159db3353839fe97561397e8c188aa1 Author: Michał Winiarski Date: Mon Jul 6 16:41:06 2020 +0200 drm/i915: Print caller when tainting for CI We can add taint from multiple places, printing the caller allows us to have a better overview of what exactly caused us to do the tainting. v2: Tweak format and print the device (Chris) v3: Move things around (Chris) Suggested-by: Michal Wajdeczko Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Petri Latvala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200706144107.204821-2-michal@hardline.pl commit 3f04bdce72408eb4ff578f96abe599588fac0bbb Author: Michał Winiarski Date: Mon Jul 6 16:41:05 2020 +0200 drm/i915: Reboot CI if we get wedged during driver init Getting wedged device on driver init is pretty much unrecoverable. Since we're running various scenarios that may potentially hit this in CI (module reload / selftests / hotunplug), and if it happens, it means that we can't trust any subsequent CI results, we should just apply the taint to let the CI know that it should reboot (CI checks taint between test runs). v2: Comment that WEDGED_ON_INIT is non-recoverable, distinguish WEDGED_ON_INIT from WEDGED_ON_FINI (Chris) v3: Appease checkpatch, fixup search-replace logic expression mindbomb in assert (Chris) Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Michal Wajdeczko Cc: Petri Latvala Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200706144107.204821-1-michal@hardline.pl commit c367124e6cb32e548bb7a2823e00889d09d6bc87 Author: Chuck Lever Date: Thu Jul 2 10:19:46 2020 -0400 RDMA/core: Clean up tracepoint headers There's no need for core/trace.c to include rdma/ib_verbs.h twice. Link: https://lore.kernel.org/r/20200702141946.3775.51943.stgit@klimt.1015granger.net Signed-off-by: Chuck Lever Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 856473cd5d17dbbf3055710857c67a4af6d9fcc0 Author: Andreas Gruenbacher Date: Mon Jul 6 10:49:27 2020 -0700 iomap: Make sure iomap_end is called after iomap_begin Make sure iomap_end is always called when iomap_begin succeeds. Without this fix, iomap_end won't be called when a filesystem's iomap_begin operation returns an invalid mapping, bypassing any unlocking done in iomap_end. With this fix, the unlocking will still happen. This bug was found by Bob Peterson during code review. It's unlikely that such iomap_begin bugs will survive to affect users, so backporting this fix seems unnecessary. Fixes: ae259a9c8593 ("fs: introduce iomap infrastructure") Signed-off-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 6f5de1808e3663917b5c682e2d91d95645ce2df2 Author: Dave Chinner Date: Mon Jun 29 14:48:59 2020 -0700 xfs: use direct calls for dquot IO completion Similar to inodes, we can call the dquot IO completion functions directly from the buffer completion code, removing another user of log item callbacks for IO completion processing. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit aac855ab1a98d9c20762047f26af47d391c3ba7a Author: Dave Chinner Date: Mon Jun 29 14:48:48 2020 -0700 xfs: make inode IO completion buffer centric Having different io completion callbacks for different inode states makes things complex. We can detect if the inode is stale via the XFS_ISTALE flag in IO completion, so we don't need a special callback just for this. This means inodes only have a single iodone callback, and inode IO completion is entirely buffer centric at this point. Hence we no longer need to use a log item callback at all as we can just call xfs_iflush_done() directly from the buffer completions and walk the buffer log item list to complete the all inodes under IO. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit a7e134ef37172fd4f13bbb11f8f440c807ba294b Author: Dave Chinner Date: Mon Jun 29 14:48:47 2020 -0700 xfs: clean up whacky buffer log item list reinit When we've emptied the buffer log item list, it does a list_del_init on itself to reset it's pointers to itself. This is unnecessary as the list is already empty at this point - it was a left-over fragment from the list_head conversion of the buffer log item list. Remove them. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit b01d1461ae6d98165cddab6f7219b459e2ac413d Author: Dave Chinner Date: Mon Jun 29 14:48:47 2020 -0700 xfs: call xfs_buf_iodone directly All unmarked dirty buffers should be in the AIL and have log items attached to them. Hence when they are written, we will run a callback to remove the item from the AIL if appropriate. Now that we've handled inode and dquot buffers, all remaining calls are to xfs_buf_iodone() and so we can hard code this rather than use an indirect call. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Amir Goldstein Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 9fe5c77cbe3cacc60d03ae5940033e4173fc1847 Author: Dave Chinner Date: Mon Jun 29 14:48:47 2020 -0700 xfs: mark log recovery buffers for completion Log recovery has it's own buffer write completion handler for buffers that it directly recovers. Convert these to direct calls by flagging these buffers as being log recovery buffers. The flag will get cleared by the log recovery IO completion routine, so it will never leak out of log recovery. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0c7e5afbea9962bc65c54337c30559bf913a97d6 Author: Dave Chinner Date: Mon Jun 29 14:48:46 2020 -0700 xfs: mark dquot buffers in cache dquot buffers always have write IO callbacks, so by marking them directly we can avoid needing to attach ->b_iodone functions to them. This avoids an indirect call, and makes future modifications much simpler. This is largely a rearrangement of the code at this point - no IO completion functionality changes at this point, just how the code is run is modified. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f593bf144c7dfee9715aa787ebbbe5dd8882e8e9 Author: Dave Chinner Date: Mon Jun 29 14:48:46 2020 -0700 xfs: mark inode buffers in cache Inode buffers always have write IO callbacks, so by marking them directly we can avoid needing to attach ->b_iodone functions to them. This avoids an indirect call, and makes future modifications much simpler. While this is largely a refactor of existing functionality, we broaden the scope of the flag to beyond where inodes are explicitly attached because future changes need to know what type of log items are attached to the buffer. Adding this buffer flag may invoke the inode iodone callback in cases where it wouldn't have been previously, but this is not a functional change because the callback is identical to the normal buffer write iodone callback when inodes are not attached. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1319ebefd6ed7a9988b7b4bc9317fbcf61a28bfc Author: Dave Chinner Date: Mon Jun 29 14:48:46 2020 -0700 xfs: add an inode item lock The inode log item is kind of special in that it can be aggregating new changes in memory at the same time time existing changes are being written back to disk. This means there are fields in the log item that are accessed concurrently from contexts that don't share any locking at all. e.g. updating ili_last_fields occurs at flush time under the ILOCK_EXCL and flush lock at flush time, under the flush lock at IO completion time, and is read under the ILOCK_EXCL when the inode is logged. Hence there is no actual serialisation between reading the field during logging of the inode in transactions vs clearing the field in IO completion. We currently get away with this by the fact that we are only clearing fields in IO completion, and nothing bad happens if we accidentally log more of the inode than we actually modify. Worst case is we consume a tiny bit more memory and log bandwidth. However, if we want to do more complex state manipulations on the log item that requires updates at all three of these potential locations, we need to have some mechanism of serialising those operations. To do this, introduce a spinlock into the log item to serialise internal state. This could be done via the xfs_inode i_flags_lock, but this then leads to potential lock inversion issues where inode flag updates need to occur inside locks that best nest inside the inode log item locks (e.g. marking inodes stale during inode cluster freeing). Using a separate spinlock avoids these sorts of problems and simplifies future code. This does not touch the use of ili_fields in the item formatting code - that is entirely protected by the ILOCK_EXCL at this point in time, so it remains untouched. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1dfde687a65fec73e6914c184ecf8e9e54ccfe74 Author: Dave Chinner Date: Mon Jun 29 14:48:45 2020 -0700 xfs: remove logged flag from inode log item This was used to track if the item had logged fields being flushed to disk. We log everything in the inode these days, so this logic is no longer needed. Remove it. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Darrick J. Wong commit 96355d5a1f0ee6dcc182c37db4894ec0c29f1692 Author: Dave Chinner Date: Mon Jun 29 14:48:45 2020 -0700 xfs: Don't allow logging of XFS_ISTALE inodes In tracking down a problem in this patchset, I discovered we are reclaiming dirty stale inodes. This wasn't discovered until inodes were always attached to the cluster buffer and then the rcu callback that freed inodes was assert failing because the inode still had an active pointer to the cluster buffer after it had been reclaimed. Debugging the issue indicated that this was a pre-existing issue resulting from the way the inodes are handled in xfs_inactive_ifree. When we free a cluster buffer from xfs_ifree_cluster, all the inodes in cache are marked XFS_ISTALE. Those that are clean have nothing else done to them and so eventually get cleaned up by background reclaim. i.e. it is assumed we'll never dirty/relog an inode marked XFS_ISTALE. On journal commit dirty stale inodes as are handled by both buffer and inode log items to run though xfs_istale_done() and removed from the AIL (buffer log item commit) or the log item will simply unpin it because the buffer log item will clean it. What happens to any specific inode is entirely dependent on which log item wins the commit race, but the result is the same - stale inodes are clean, not attached to the cluster buffer, and not in the AIL. Hence inode reclaim can just free these inodes without further care. However, if the stale inode is relogged, it gets dirtied again and relogged into the CIL. Most of the time this isn't an issue, because relogging simply changes the inode's location in the current checkpoint. Problems arise, however, when the CIL checkpoints between two transactions in the xfs_inactive_ifree() deferops processing. This results in the XFS_ISTALE inode being redirtied and inserted into the CIL without any of the other stale cluster buffer infrastructure being in place. Hence on journal commit, it simply gets unpinned, so it remains dirty in memory. Everything in inode writeback avoids XFS_ISTALE inodes so it can't be written back, and it is not tracked in the AIL so there's not even a trigger to attempt to clean the inode. Hence the inode just sits dirty in memory until inode reclaim comes along, sees that it is XFS_ISTALE, and goes to reclaim it. This reclaiming of a dirty inode caused use after free, list corruptions and other nasty issues later in this patchset. Hence this patch addresses a violation of the "never log XFS_ISTALE inodes" caused by the deferops processing rolling a transaction and relogging a stale inode in xfs_inactive_free. It also adds a bunch of asserts to catch this problem in debug kernels so that we don't reintroduce this problem in future. Reproducer for this issue was generic/558 on a v4 filesystem. Signed-off-by: Dave Chinner Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0d5a57140b3e942a26352815a2d1defe6eebde35 Author: Yafang Shao Date: Thu Jul 2 08:37:28 2020 -0700 xfs: remove useless definitions in xfs_linux.h Remove current_pid(), current_test_flags() and current_clear_flags_nested(), because they are useless. Signed-off-by: Yafang Shao Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit cd647d5651c0b0deaa26c1acb9e1789437ba9bc7 Author: Dave Chinner Date: Tue Jun 30 11:28:53 2020 -0700 xfs: use MMAPLOCK around filemap_map_pages() The page faultround path ->map_pages is implemented in XFS via filemap_map_pages(). This function checks that pages found in page cache lookups have not raced with truncate based invalidation by checking page->mapping is correct and page->index is within EOF. However, we've known for a long time that this is not sufficient to protect against races with invalidations done by operations that do not change EOF. e.g. hole punching and other fallocate() based direct extent manipulations. The way we protect against these races is we wrap the page fault operations in a XFS_MMAPLOCK_SHARED lock so they serialise against fallocate and truncate before calling into the filemap function that processes the fault. Do the same for XFS's ->map_pages implementation to close this potential data corruption issue. Signed-off-by: Dave Chinner Reviewed-by: Amir Goldstein Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e2aaee9cd34d8396a48abf0b1be81a464c1d51c5 Author: Darrick J. Wong Date: Mon Jun 29 14:47:20 2020 -0700 xfs: move helpers that lock and unlock two inodes against userspace IO Move the double-inode locking helpers to xfs_inode.c since they're not specific to reflink. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 10b4bd6c9cbc1434c9aca523dac9c4313b56f1ae Author: Darrick J. Wong Date: Mon Jun 29 14:47:20 2020 -0700 xfs: refactor locking and unlocking two inodes against userspace IO Refactor the two functions that we use to lock and unlock two inodes to block userspace from initiating IO against a file, whether via system calls or mmap activity. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 451d34ee075023d790213885a947fc7a71f26e6d Author: Darrick J. Wong Date: Mon Jun 29 14:47:20 2020 -0700 xfs: fix xfs_reflink_remap_prep calling conventions Fix the return value of xfs_reflink_remap_prep so that its return value conventions match the rest of xfs. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 168eae803cede459d67ed0ab3ddb19539700a78a Author: Darrick J. Wong Date: Mon Jun 29 14:47:19 2020 -0700 xfs: reflink can skip remap existing mappings If the source and destination map are identical, we can skip the remap step to save some time. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 94b941fd7a98cebd6b77b8925c54ef76bbf7473f Author: Darrick J. Wong Date: Mon Jun 29 14:47:19 2020 -0700 xfs: only reserve quota blocks if we're mapping into a hole When logging quota block count updates during a reflink operation, we only log the /delta/ of the block count changes to the dquot. Since we now know ahead of time the extent type of both dmap and smap (and that they have the same length), we know that we only need to reserve quota blocks for dmap's blockcount if we're mapping it into a hole. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit aa5d0ba0b5dbb5105276214c7f9124855b20f75e Author: Darrick J. Wong Date: Mon Jun 29 14:47:19 2020 -0700 xfs: only reserve quota blocks for bmbt changes if we're changing the data fork Now that we've reworked xfs_reflink_remap_extent to remap only one extent per transaction, we actually know if the extent being removed is an allocated mapping. This means that we now know ahead of time if we're going to be touching the data fork. Since we only need blocks for a bmbt split if we're going to update the data fork, we only need to get quota reservation if we know we're going to touch the data fork. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 00fd1d56dd08a8ceaa9e4ee1a41fefd9f6c6bc7d Author: Darrick J. Wong Date: Mon Jun 29 14:47:18 2020 -0700 xfs: redesign the reflink remap loop to fix blkres depletion crash The existing reflink remapping loop has some structural problems that need addressing: The biggest problem is that we create one transaction for each extent in the source file without accounting for the number of mappings there are for the same range in the destination file. In other words, we don't know the number of remap operations that will be necessary and we therefore cannot guess the block reservation required. On highly fragmented filesystems (e.g. ones with active dedupe) we guess wrong, run out of block reservation, and fail. The second problem is that we don't actually use the bmap intents to their full potential -- instead of calling bunmapi directly and having to deal with its backwards operation, we could call the deferred ops xfs_bmap_unmap_extent and xfs_refcount_decrease_extent instead. This makes the frontend loop much simpler. Solve all of these problems by refactoring the remapping loops so that we only perform one remapping operation per transaction, and each operation only tries to remap a single extent from source to dest. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reported-by: Edwin Török Tested-by: Edwin Török commit 877f58f53684f14ca3202640f70592bf44890924 Author: Darrick J. Wong Date: Mon Jun 29 14:47:18 2020 -0700 xfs: rename xfs_bmap_is_real_extent to is_written_extent The name of this predicate is a little misleading -- it decides if the extent mapping is allocated and written. Change the name to be more direct, as we're going to add a new predicate in the next patch. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 83895227aba1ade33e81f586aa7b6b1e143096a5 Author: Darrick J. Wong Date: Mon Jun 29 14:47:18 2020 -0700 xfs: fix reflink quota reservation accounting error Quota reservations are supposed to account for the blocks that might be allocated due to a bmap btree split. Reflink doesn't do this, so fix this to make the quota accounting more accurate before we start rearranging things. Fixes: 862bb360ef56 ("xfs: reflink extents from one file to another") Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit eb0efe5063bb10bcb653e4f8e92a74719c03a347 Author: Darrick J. Wong Date: Mon Jun 29 14:47:17 2020 -0700 xfs: don't eat an EIO/ENOSPC writeback error when scrubbing data fork The data fork scrubber calls filemap_write_and_wait to flush dirty pages and delalloc reservations out to disk prior to checking the data fork's extent mappings. Unfortunately, this means that scrub can consume the EIO/ENOSPC errors that would otherwise have stayed around in the address space until (we hope) the writer application calls fsync to persist data and collect errors. The end result is that programs that wrote to a file might never see the error code and proceed as if nothing were wrong. xfs_scrub is not in a position to notify file writers about the writeback failure, and it's only here to check metadata, not file contents. Therefore, if writeback fails, we should stuff the error code back into the address space so that an fsync by the writer application can pick that up. Fixes: 99d9d8d05da2 ("xfs: scrub inode block mappings") Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Dave Chinner commit f74681ba2006434be195402e0b15fc5763cddd7e Author: Brian Foster Date: Mon Jun 29 14:44:36 2020 -0700 xfs: preserve rmapbt swapext block reservation from freed blocks The rmapbt extent swap algorithm remaps individual extents between the source inode and the target to trigger reverse mapping metadata updates. If either inode straddles a format or other bmap allocation boundary, the individual unmap and map cycles can trigger repeated bmap block allocations and frees as the extent count bounces back and forth across the boundary. While net block usage is bound across the swap operation, this behavior can prematurely exhaust the transaction block reservation because it continuously drains as the transaction rolls. Each allocation accounts against the reservation and each free returns to global free space on transaction roll. The previous workaround to this problem attempted to detect this boundary condition and provide surplus block reservation to acommodate it. This is insufficient because more remaps can occur than implied by the extent counts; if start offset boundaries are not aligned between the two inodes, for example. To address this problem more generically and dynamically, add a transaction accounting mode that returns freed blocks to the transaction reservation instead of the superblock counters on transaction roll and use it when the rmapbt based algorithm is active. This allows the chain of remap transactions to preserve the block reservation based own its own frees and prevent premature exhaustion regardless of the remap pattern. Note that this is only safe for superblocks with lazy sb accounting, but the latter is required for v5 supers and the rmap feature depends on v5. Fixes: b3fed434822d0 ("xfs: account format bouncing into rmapbt swapext tx reservation") Root-caused-by: Darrick J. Wong Signed-off-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 06734e3c95a34e4d71342f0583f1bb88c61ed9b7 Author: Keyur Patel Date: Mon Jun 29 14:44:35 2020 -0700 xfs: Couple of typo fixes in comments ./xfs/libxfs/xfs_inode_buf.c:56: unnecssary ==> unnecessary ./xfs/libxfs/xfs_inode_buf.c:59: behavour ==> behaviour ./xfs/libxfs/xfs_inode_buf.c:206: unitialized ==> uninitialized Signed-off-by: Keyur Patel Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit f11f3f76c7264ca6a0b7c495800879e9f73d0bf7 Merge: d473f4dc2f95c 87fb5c1ccb856 Author: Jason Gunthorpe Date: Mon Jul 6 14:29:58 2020 -0300 Merge branch 'mlx5_ipoib_qpn' into rdma.git for-next Michael Guralnik says: ==================== This series handles IPoIB child interface creation with setting interface's HW address. In current implementation, lladdr requested by user is ignored and overwritten. Child interface gets the same GID as the parent interface and a QP number which is assigned by the underlying drivers. In this series we fix this behavior so that user's requested address is assigned to the newly created interface. As specific QP number request is not supported for all vendors, QP number requested by user will still be overwritten when this is not supported. Behavior of creation of child interfaces through the sysfs mechanism or without specifying a requested address, stays the same. ==================== Based on the mlx5-next branch at git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux due to dependencies. * branch 'mlx5_ipoib_qpn': RDMA/ipoib: Handle user-supplied address when creating child net/mlx5: Enable QP number request when creating IPoIB underlay QP Signed-off-by: Jason Gunthorpe commit d3913019602e32ef6fbba8eb0167e83250cdab22 Author: Matt Atwood Date: Thu Jul 2 16:09:57 2020 -0700 Revert "drm/i915/dp: Correctly advertise HBR3 for GEN11+" The initial CI results did not include a TGL system which includes a panel that is having issues with patch. Revert while we triage. This reverts commit 680c45c767f63e35f063d3ea04f388a9f7ae7079. Signed-off-by: Matt Atwood Reviewed-by: Manasi Navare Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200702230957.30536-1-matthew.s.atwood@intel.com commit 25c6f3960764b266a609281341f889a06d045039 Author: Maxime Ripard Date: Thu Jun 11 11:23:17 2020 +0200 ARM: dts: bcm2711: Add HDMI DVP Now that we have a driver for the DVP, let's add its DT node. Signed-off-by: Maxime Ripard Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/e22222ca7f41b960e9bb1a31e0dd2de95b8c0cd1.1591867332.git-series.maxime@cerno.tech commit 87fb5c1ccb856838f7f75b1cc85ed0691ee8eb79 Author: Michael Guralnik Date: Tue Jun 23 14:01:05 2020 +0300 RDMA/ipoib: Handle user-supplied address when creating child Use the address supplied by user when creating a child interface. Previously, the address requested by the user was ignored and overridden with parent's GID and the random QP number assigned to the child. Link: https://lore.kernel.org/r/20200623110105.1225750-3-leon@kernel.org Signed-off-by: Michael Guralnik Reviewed-by: Feras Daoud Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f1a0a9948f71703f1920bb63072736e76bd6ccfa Author: Arnd Bergmann Date: Tue Jun 30 13:45:21 2020 +0200 udc: lpc32xx: mark local function static The kernel test robot reports two functions that should be marked static: >> drivers/usb/gadget/udc/lpc32xx_udc.c:1928:6: warning: no previous prototype for 'udc_send_in_zlp' [-Wmissing-prototypes] 1928 | void udc_send_in_zlp(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep) >> drivers/usb/gadget/udc/lpc32xx_udc.c:1942:6: warning: no previous prototype for 'udc_handle_eps' [-Wmissing-prototypes] 1942 | void udc_handle_eps(struct lpc32xx_udc *udc, struct lpc32xx_ep *ep) This showed up after my commit 792e559e94bc ("udc: lpc32xx: fix 64-bit compiler warning") made it possible to build the driver on x86-64. Fix the warning as suggested. Reported-by: kernel test robot Acked-by: Vladimir Zapolskiy Signed-off-by: Arnd Bergmann commit 9f0d16ebe30f0c64f63ee44fbbb83ea376e20589 Merge: 48778464bb7d3 b7f13b9147300 Author: Arnd Bergmann Date: Mon Jul 6 17:41:24 2020 +0200 Merge tag 'renesas-arm-dt-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.9 - Increase support for the Renesas RZ/G1H SoC on the iWave RainboW Qseven board (G21D), and its camera expansion board, - IPMMU support for R-Car M3-W+, - Support for Rev.3.0/4.0 of the HopeRun HiHope RZ/G2M and RZ/G2N boards, - Minor fixes and improvements. * tag 'renesas-arm-dt-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: (36 commits) ARM: dts: r8a7778: Enable IRLM setup via DT arm64: dts: renesas: Add HiHope RZ/G2N Rev2.0/3.0/4.0 board with idk-1110wr display arm64: dts: renesas: Add HiHope RZ/G2N Rev.3.0/4.0 sub board support arm64: dts: renesas: Add HiHope RZ/G2N Rev.3.0/4.0 main board support arm64: dts: renesas: Add HiHope RZ/G2M Rev.3.0/4.0 board with idk-1110wr display arm64: dts: renesas: hihope-rzg2-ex: Separate out lvds specific nodes into common file arm64: dts: renesas: Add HiHope RZ/G2M Rev.3.0/4.0 sub board support arm64: dts: renesas: Add HiHope RZ/G2M Rev.3.0/4.0 main board support arm64: dts: renesas: Add HiHope RZ/G2M[N] Rev.3.0/4.0 specific into common file arm64: dts: renesas: hihope-common: Separate out Rev.2.0 specific into hihope-rev2.dtsi file arm64: dts: renesas: r8a774b1-hihope-rzg2n[-ex]: Rename HiHope RZ/G2N boards arm64: dts: renesas: r8a774a1-hihope-rzg2m[-ex/-ex-idk-1110wr]: Rename HiHope RZ/G2M boards arm64: dts: renesas: r8a77961: Add IPMMU nodes ARM: dts: r8a7742: Add MSIOF[0123] support ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add device tree for camera DB ARM: dts: r8a7742: Add CMT SoC specific support ARM: dts: r8a7742: Add thermal device to DT ARM: dts: r8a7742-iwg21d-q7: Sound DMA support via DVC on DTS ARM: dts: r8a7742-iwg21d-q7: Enable SGTL5000 audio codec ARM: dts: r8a7742: Add audio support ... Link: https://lore.kernel.org/r/20200703120642.5128-3-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 3fcee5a6d5414df8ff4ee22f2477bde76d34527c Author: Pavel Begunkov Date: Mon Jul 6 17:59:31 2020 +0300 io_uring: briefly loose locks while reaping events It's not nice to hold @uring_lock for too long io_iopoll_reap_events(). For instance, the lock is needed to publish requests to @poll_list, and that locks out tasks doing that for no good reason. Loose it occasionally. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit eba0a4dd2aa5c47ca5b0c56ffb6d6665e047ff72 Author: Pavel Begunkov Date: Mon Jul 6 17:59:30 2020 +0300 io_uring: fix stopping iopoll'ing too early Nobody adjusts *nr_events (number of completed requests) before calling io_iopoll_getevents(), so the passed @min shouldn't be adjusted as well. Othewise it can return less than initially asked @min without hitting need_resched(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 3aadc23e6054353ca056bf14e87250c79efbd7ed Author: Pavel Begunkov Date: Mon Jul 6 17:59:29 2020 +0300 io_uring: don't delay iopoll'ed req completion ->iopoll() may have completed current request, but instead of reaping it, io_do_iopoll() just continues with the next request in the list. As a result it can leave just polled and completed request in the list up until next syscall. Even outer loop in io_iopoll_getevents() doesn't help the situation. E.g. poll_list: req0 -> req1 If req0->iopoll() completed both requests, and @min<=1, then @req0 will be left behind. Check whether a req was completed after ->iopoll(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 083986c24b38317c958612c5a7d3f270ae708b32 Merge: 6c814b676e8ba 7ae9e3a6bf3fb Author: Mark Brown Date: Mon Jul 6 15:42:33 2020 +0100 Merge series "Add pca9450 driver" from Robin Gong : Add pca9450 driver for i.mx8mn-evk board. PCA9450A/B/C supported now. Please refer to below link for PCA9450 datasheet: https://www.nxp.com/docs/en/data-sheet/PCA9450DS.pdf v2: 1. rebase with the latest code to use linear_ranges helper instead. 2. address Frieder's comments, such as dulipcated buck4 description, debug info added etc. Robin Gong (4): regulator: pca9450: add pca9450 pmic driver dt-bindings: regulator: add pca9450 regulator yaml arm64: dts: imx8mn-evk: add pca9450 for i.mx8mn-evk board arm64: configs: add pca9450 pmic driver .../bindings/regulator/nxp,pca9450-regulator.yaml | 190 +++++ arch/arm64/boot/dts/freescale/imx8mn-evk.dts | 96 +++ arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi | 6 + arch/arm64/configs/defconfig | 1 + drivers/regulator/Kconfig | 8 + drivers/regulator/Makefile | 1 + drivers/regulator/pca9450-regulator.c | 859 +++++++++++++++++++++ include/linux/regulator/pca9450.h | 219 ++++++ 8 files changed, 1380 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/nxp,pca9450-regulator.yaml create mode 100644 drivers/regulator/pca9450-regulator.c create mode 100644 include/linux/regulator/pca9450.h -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 6c814b676e8bab850b64ab76a035571773c65727 Author: Axel Lin Date: Mon Jul 6 16:09:44 2020 +0800 regulator: fan53880: Add missing .owner field in regulator_desc Add missing .owner field in regulator_desc, which is used for refcounting. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20200706080944.663750-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit b104533aaffc0efb9ea16c45d6020654841ce4a2 Merge: 48778464bb7d3 1d21a0a32f93e Author: Arnd Bergmann Date: Mon Jul 6 16:30:51 2020 +0200 Merge tag 'renesas-arm-defconfig-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM defconfig updates for v5.9 - Refresh shmobile_defconfig for v5.8-rc1 - Enable additional support for Renesas platforms to shmobile_defconfig, multi_v7_defconfig, and the arm64 defconfig. * tag 'renesas-arm-defconfig-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: defconfig: Enable additional support for Renesas platforms ARM: multi_v7_defconfig: Enable additional support for Renesas platforms ARM: shmobile: defconfig: Enable RZ/A1H RTC support ARM: shmobile: defconfig: Enable ADV7612 CEC support ARM: shmobile: defconfig: Enable RZ/A1 CEU support ARM: shmobile: defconfig: Enable RZ/A watchdog support ARM: shmobile: defconfig: Enable CAT9554 support ARM: shmobile: defconfig: Enable DA9063 ONKEY support ARM: shmobile: defconfig: Refresh for v5.8-rc1 Link: https://lore.kernel.org/r/20200703120642.5128-2-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 7ae9e3a6bf3fb1b5a35a15d8a6e78fc42bed0867 Author: Robin Gong Date: Sat Jul 4 00:19:36 2020 +0800 dt-bindings: regulator: add pca9450 regulator yaml Add device binding doc for pca9450 pmic driver. Signed-off-by: Robin Gong Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1593793178-9737-3-git-send-email-yibin.gong@nxp.com Signed-off-by: Mark Brown commit 0935ff5f1f0a44f66a13e075ed49f97ad99d2fdc Author: Robin Gong Date: Sat Jul 4 00:19:35 2020 +0800 regulator: pca9450: add pca9450 pmic driver Add NXP pca9450 pmic driver. Signed-off-by: Robin Gong Reviewed-by: Frieder Schrempf Link: https://lore.kernel.org/r/1593793178-9737-2-git-send-email-yibin.gong@nxp.com Signed-off-by: Mark Brown commit 2cb7802b50a2e3bb68e3960aae3955fef75c009b Author: Pierre-Louis Bossart Date: Thu Jul 2 11:36:33 2020 -0500 ASoC: codecs: wm8400: remove unused variables Fix W=1 warning by removing unused variables Suggested-by: Charles Keepax Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702163633.162508-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9ac2b63791ef63935c71e2a7f5444a1118c4d084 Author: Brian Starkey Date: Fri Jun 26 17:48:00 2020 +0100 drm: drm_fourcc: Add generic alias for 16_16_TILE modifier In cases such as DRM_FORMAT_MOD_SAMSUNG_16_16_TILE, the modifier describes a generic pixel re-ordering which can be applicable to multiple vendors. Define an alias: DRM_FORMAT_MOD_GENERIC_16_16_TILE, which can be used to describe this layout in a vendor-neutral way, and add a comment about the expected usage of such "generic" modifiers. Changes in v2: - Move note about future cases to comment (Daniel) Signed-off-by: Brian Starkey Reviewed-by: Daniel Vetter Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200626164800.11595-1-brian.starkey@arm.com commit 614038d628c02ad6f2439bdf9baa6acceb8ec772 Author: Anson Huang Date: Wed Jun 24 14:24:04 2020 +0800 pinctrl: imx8dxl: Support building as module Change configuration to "tristate", add module device table, author, description and license to support building i.MX8DXL pinctrl driver as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1592979844-18833-10-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit 36d640fa90a58b9e95f709b8eb75778a422ad418 Author: Anson Huang Date: Wed Jun 24 14:24:03 2020 +0800 pinctrl: imx8qm: Support building as module Change configuration to "tristate", add module device table, author, description and license to support building i.MX8QM pinctrl driver as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1592979844-18833-9-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit 3aace899ecd4f584fd93ec5a32625ff33d4cbeca Author: Anson Huang Date: Wed Jun 24 14:24:02 2020 +0800 pinctrl: imx8qxp: Support building as module Change configuration to "tristate", add module device table, author, description and license to support building i.MX8QXP pinctrl driver as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1592979844-18833-8-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit d73080c3938fe7ba8c33e02615ea5e57ba183bcd Author: Anson Huang Date: Wed Jun 24 14:24:01 2020 +0800 pinctrl: imx8mp: Support building as module Change configuration to "tristate", add module device table, author, description and license to support building i.MX8MP pinctrl driver as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1592979844-18833-7-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit e38b6bb211733f08523c1571820a86884635239a Author: Anson Huang Date: Wed Jun 24 14:24:00 2020 +0800 pinctrl: imx8mq: Support building as module Change configuration to "tristate", add module device table, author, description and license to support building i.MX8MQ pinctrl driver as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1592979844-18833-6-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit 4bb63d2166cd2899f138f49c9bc83f25aa571f5b Author: Anson Huang Date: Wed Jun 24 14:23:59 2020 +0800 pinctrl: imx8mn: Support building as module Change configuration to "tristate", add module device table, author, description and license to support building i.MX8MN pinctrl driver as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1592979844-18833-5-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit a302b0e1001a889e5dd64b09ca76892f01b9610e Author: Anson Huang Date: Wed Jun 24 14:23:58 2020 +0800 pinctrl: imx8mm: Support building as module Change configuration to "tristate", add module device table, author, description and license to support building i.MX8MM pinctrl driver as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1592979844-18833-4-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit 0adbfcee61a7c953919baa10e4ab2e66acea407f Author: Anson Huang Date: Wed Jun 24 14:23:57 2020 +0800 pinctrl: imx: scu: Support i.MX8 SCU SoCs pinctrl driver built as module Export necessary APIs to support i.MX8 SCU SoCs pinctrl driver to be built as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1592979844-18833-3-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit b4554dee38b0cf4f15199afc8ad5004dfe133959 Author: Anson Huang Date: Wed Jun 24 14:23:56 2020 +0800 pinctrl: imx: Support i.MX8 SoCs pinctrl driver built as module Export necessary APIs to support i.MX8 SoCs pinctrl driver to be built as module. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Link: https://lore.kernel.org/r/1592979844-18833-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Linus Walleij commit 04630ac058d5d4981e51ec7ff3f7bbfdbf6b99f8 Merge: 435fda26d7037 b2fc9b4eb1d79 Author: Linus Walleij Date: Mon Jul 6 15:45:31 2020 +0200 Merge tag 'sh-pfc-for-v5.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: sh-pfc: Updates for v5.9 - Add RPC (HyperFlash and Octal-SPI Flash) pin groups on R-Car V3H and V3M. commit db33b1f5fd9386c11904a27b4d91a5918dc7d503 Author: Maxime Ripard Date: Sun Jul 5 11:19:04 2020 +0200 ARM: configs: sunxi: Enable Lima Lima is fairly stable now, so let's enable it by default. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200705091904.42795-7-maxime@cerno.tech Acked-by: Chen-Yu Tsai commit c822a3ec1700f392bbb46b8526e2a0bc53d9df49 Author: Maxime Ripard Date: Sun Jul 5 11:19:02 2020 +0200 ARM: configs: sunxi: Add DRM output-related options We're missing a bunch of options related to the DRM driver options (panels, HDMI, CEC) that seems useful. Let's add them in the defconfig. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200705091904.42795-5-maxime@cerno.tech Acked-by: Chen-Yu Tsai commit 373c13c258877734c59a3adb57b7ebb8cae1532f Author: Maxime Ripard Date: Sun Jul 5 11:19:03 2020 +0200 ARM: configs: sunxi: Enable ASoC options Most of our ASoC drivers were left out of the defconfig. Let's add them. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200705091904.42795-6-maxime@cerno.tech Acked-by: Chen-Yu Tsai commit 3db1b796010a535880efc1ef9a321c8ab27b354e Author: Maxime Ripard Date: Sun Jul 5 11:19:01 2020 +0200 ARM: configs: sunxi: Enable Cedrus Let's enable the staging related options and Cedrus in our defconfig. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200705091904.42795-4-maxime@cerno.tech Acked-by: Chen-Yu Tsai commit a40406fa85a70f7ed5cf026df57d339be8a30d25 Author: Maxime Ripard Date: Sun Jul 5 11:19:00 2020 +0200 ARM: configs: sunxi: Enable the deinterlace and rotation engines We've had drivers for the deinterlace and rotation engines for a while now, let's enable them in the defconfig. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200705091904.42795-3-maxime@cerno.tech Acked-by: Chen-Yu Tsai commit 4ac048266b734e1ecad6c32f94ea3741f6357510 Author: Maxime Ripard Date: Sun Jul 5 11:18:59 2020 +0200 ARM: configs: sunxi: Enable the CSI drivers We've had CSI drivers for the older and newer SoCs for a while now, let's enable them in the defconfig. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200705091904.42795-2-maxime@cerno.tech Acked-by: Chen-Yu Tsai commit c73720e04eb10e7c930a37e0427e7a788867193a Author: Maxime Ripard Date: Sun Jul 5 11:18:58 2020 +0200 ARM: configs: sunxi: Run savedefconfig We haven't run savedefconfig for a while and some options have moved around. In order to ease the patch application / conflict resolution, let's run it. Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai Link: https://lore.kernel.org/r/20200705091904.42795-1-maxime@cerno.tech commit 76f09371bc05d6eb8d5a01823c9eaab768d6e934 Author: Bin Meng Date: Fri May 1 21:44:54 2020 -0700 powerpc: Drop CONFIG_MTD_M25P80 in 85xx-hw.config Drop CONFIG_MTD_M25P80 that was removed in commit b35b9a10362d ("mtd: spi-nor: Move m25p80 code in spi-nor.c") Signed-off-by: Bin Meng Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1588394694-517-1-git-send-email-bmeng.cn@gmail.com commit 78194fb486798af1929e21483c5c8142a34258f1 Author: Kajol Jain Date: Fri Jul 3 12:26:58 2020 +0530 perf vendor events power9: Added nest imc metric events Added nest imc metric events. Signed-off-by: Kajol Jain Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Anju T Sudhakar Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Nageswara R Sastry Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Ravi Bangoria Cc: maddy@linux.ibm.com Link: http://lore.kernel.org/lkml/20200703065658.377467-1-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit ea1be1e59b19017e61aa357d524b743ba5602d3c Author: Tiezhu Yang Date: Thu May 7 20:03:35 2020 +0800 serial: Remove duplicated macro definition of port type There exists the same macro definition of port type from 0 to 13 in include/uapi/linux/serial.h, remove these duplicated code in include/uapi/linux/serial_core.h which includes the former header. Acked-by: Jiri Slaby Signed-off-by: Tiezhu Yang Link: https://lore.kernel.org/r/1588853015-28392-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Greg Kroah-Hartman commit e8f331aa91a2cfe53fb8585bc45baac66fb54096 Author: Jan Kiszka Date: Thu Jul 2 14:53:59 2020 -0400 tools lib traceevent: Fix reporting of unknown SVM exit reasons On AMD, exist code -1 is also a possible value, but we use it for terminating the list of known exit reasons. This leads to EXIT_ERR being reported for unkown ones. Fix this by using an NULL string pointer as terminal. Link: http://lkml.kernel.org/r/5741D817.3070902@web.de Link: http://lore.kernel.org/linux-trace-devel/20200702174950.123454-7-tz.stoyanov@gmail.com Signed-off-by: Jan Kiszka [ Ported from trace-cmd.git ] Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185705.759824282@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 4e59ab93e2f4ace864467c946286ea353d8eeeba Author: Steven Rostedt (VMware) Date: Thu Jul 2 14:53:58 2020 -0400 tools lib traceevent: Change to SPDX License format Replaced COPYING with a description of how the SPDX identifiers are used. Added a GPL-2.0 and LGPL-2.1 license file in the new LICENSES directory. Then removed all the license templates from the source files and replaced them with the corresponding SPDX identifier. Link: http://lore.kernel.org/linux-trace-devel/20200702174950.123454-6-tz.stoyanov@gmail.com Signed-off-by: Steven Rostedt (VMware) [ Ported from trace-cmd.git ] Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185705.601167185@goodmis.org Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 9b8179b38ba29c0c8fbfa09b2fe685edca0f6061 Author: Steven Rostedt (VMware) Date: Thu Jul 2 14:53:57 2020 -0400 tools lib traceevent: Add builtin handler for trace_marker_raw When something is written into trace_marker_raw, it goes in as a binary. But the printk_fmt() of the event that is created (raw_data)'s format file only prints the first byte of data: print fmt: "id:%04x %08x", REC->id, (int)REC->buf[0] This is not very useful if we want to see the full data output. Implement the processing of the raw_data event like it is in the kernel. Link: http://lore.kernel.org/linux-trace-devel/20200702174950.123454-5-tz.stoyanov@gmail.com Signed-off-by: Steven Rostedt (VMware) [ Ported from trace-cmd.git ] Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185705.445969275@goodmis.org Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 0dfceeffae187ace521333f2986673690a810fc6 Author: Tzvetomir Stoyanov (VMware) Date: Thu Jul 2 14:53:56 2020 -0400 tools lib traceevent: Move kernel_stack event handler to "function" plugin. The "kernel_stack" event handler does not depend on any trace-cmd context, it can be used aside from the application. The code is moved to libtraceevent "function" plugin. Link: http://lore.kernel.org/linux-trace-devel/20190726124308.18735-2-tz.stoyanov@gmail.com Link: http://lore.kernel.org/linux-trace-devel/20200702174950.123454-4-tz.stoyanov@gmail.com Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185705.284789930@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 5973e6ebc0f5a01b34b7da2e4f0f2fef55534ed3 Author: Julia Cartwright Date: Thu Jul 2 14:53:55 2020 -0400 tools lib traceevent: Add plugin for decoding syscalls/sys_enter_futex The futex syscall is a complicated one. It supports thirteen multiplexed operations, each with different semantics and encodings for the syscalls six arguments. Manually decoding these arguments is tedious and error prone. This plugin provides symbolic names for futex operations, futex flags, and tries to be intelligent about the intent of specific arguments (for example, waking operations use 'val' as an integer count, not just an arbitrary value). It doesn't do a full decode of the FUTEX_WAKE_OP's 'val3' argument, however, this is a good starting point. Link: http://lkml.kernel.org/r/20171207025649.12160-1-julia@ni.com Link: http://lore.kernel.org/linux-trace-devel/20200702174950.123454-3-tz.stoyanov@gmail.com Signed-off-by: Julia Cartwright [ Ported from trace-cmd.git ] Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185705.127175788@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 57863623329c5f01abe64f3feaf9bdb26c31ce6a Author: Steven Rostedt (VMware) Date: Thu Jul 2 14:53:54 2020 -0400 tools lib traceevent: Add offset option for function plugin When the offset option is set for the function plugin enabled, it will display the offset of the functions along with their names. This helps in finding exactly where a function was called by its parent. trace-cmd report -O parent -O offset [..] rcuc/163-1330 [163] 740.653251: function: _raw_spin_lock+0x0 <-- rcu_cpu_kthread+0x4d8 Link: http://lore.kernel.org/linux-trace-devel/20200702174950.123454-2-tz.stoyanov@gmail.com Signed-off-by: Steven Rostedt (VMware) [ Ported from trace-cmd.git ] Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185704.986181512@goodmis.org Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 97b6c5394d5c80be89e558c2dae46582ad25c4d2 Author: Jan Kiszka Date: Thu Jul 2 14:53:53 2020 -0400 tools lib traceevent: Add more SVM exit reasons Exceptions require individual decoding (only feasible intercepts listed), XSETBV was missing and the AVIC brought in two new exit codes. Link: http://lkml.kernel.org/r/5741D822.3030203@web.de Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-10-tz.stoyanov@gmail.com Signed-off-by: Jan Kiszka [ Ported from trace-cmd.git ] Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185704.844582602@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 3e14b100b0ac36bc430a4b9fb3e683dffac8b866 Author: Steven Rostedt (Red Hat) Date: Thu Jul 2 14:53:52 2020 -0400 tools lib traceevent: Add plugin for tlb_flush The tlb_flush tracepoints uses enums that are not yet known by the traceevent library. Add a plugin to handle that. Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-9-tz.stoyanov@gmail.com Signed-off-by: Steven Rostedt (VMware) [ Ported from trace-cmd.git ] Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185704.706977382@goodmis.org Signed-off-by: Tzvetomir Stoyanov (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit e7a90882b05b2669df7a0aa2e87e6283c7edff33 Author: Tzvetomir Stoyanov (VMware) Date: Thu Jul 2 14:53:51 2020 -0400 tools lib traceevent: Optimize pretty_print() function Each time the pretty_print() function is called to print an event, the event's format string is parsed. As this format string does not change, this parsing can be done only once - when the event struct is initialized. Link: https://lore.kernel.org/linux-trace-devel/20200529134929.537110-1-tz.stoyanov@gmail.com Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-8-tz.stoyanov@gmail.com Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185704.559785000@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 487ae1f4a17c197ab77b3ea593049a11187ec9a1 Author: Tzvetomir Stoyanov (VMware) Date: Thu Jul 2 14:53:50 2020 -0400 tools lib traceevent: Add support for more printk format specifiers The printk format specifiers used in event's print format files extend the standard printf formats. There are a lot of new options related to printing pointers and kernel specific structures. Currently trace-cmd does not support many of them. Support for these new printk specifiers is added to the pretty_print() function: - UUID/GUID address: %pU[bBlL] - Raw buffer as a hex string: %*ph[CDN] These are improved: - MAC address: %pMF, %pM and %pmR - IPv4 adderss: %p[Ii]4[hnbl] Function pretty_print() is refactored. The logic for printing pointers %p[...] is moved to its own function. Link: https://lore.kernel.org/linux-trace-devel/20200515053754.3695335-1-tz.stoyanov@gmail.com Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-7-tz.stoyanov@gmail.com Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=207605 Reported-by: Johannes Berg Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185704.401148804@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 4d70caefd05bd847b395e291dd63cc32d38d4d3a Author: Tzvetomir Stoyanov (VMware) Date: Thu Jul 2 14:53:49 2020 -0400 tools lib traceevent: Introduced new traceevent API, for adding new plugins directories. Implement new traceevent plugin API, which can be used to add new plugins directories: enum tep_plugin_load_priority { TEP_PLUGIN_FIRST, TEP_PLUGIN_LAST, }; int tep_add_plugin_path(struct tep_handle *tep, char *path, enum tep_plugin_load_priority prio); It adds the "path" as new plugin directory, in the context of the handler "tep". The tep_load_plugins() API searches for plugins in this new location. Depending of the priority "prio", the plugins from this directory are loaded before (TEP_PLUGIN_FIRST) or after (TEP_PLUGIN_LAST) the ordinary libtraceevent plugin locations. Link: http://lore.kernel.org/linux-trace-devel/20191007114947.17104-2-tz.stoyanov@gmail.com Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-6-tz.stoyanov@gmail.com Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185704.248123446@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 74006289cfedbb2f922fcd6fef7efee232450550 Author: Tzvetomir Stoyanov (VMware) Date: Thu Jul 2 14:53:48 2020 -0400 tools lib traceevent: Add interface for options to plugins Add tep_plugin_add_option() and tep_plugin_print_options() to lib traceevent library that allows plugins to have their own options. For example, the function plugin by default does not print the parent, as it uses the parent to do the indenting. The "parent" option is created by the function plugin that will print the parent of the function like it does in the trace file. The tep_plugin_print_options() will print out the list of options that a Cc: Tzvetomir Stoyanov (VMware) plugin has defined. Link: http://lore.kernel.org/linux-trace-devel/20190802110101.14759-3-tz.stoyanov@gmail.com Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-5-tz.stoyanov@gmail.com Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185704.092654084@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit 662081acfa25edf0d8fabd8021ac26f0d1e2d3a1 Author: Tzvetomir Stoyanov (VMware) Date: Thu Jul 2 14:53:47 2020 -0400 tools lib traceevent: Add tep_load_plugins_hook() API Add the API function tep_load_plugins_hook() to the traceevent API to allow tools a common method to load in the plugins that are part of the lib traceevent library. Link: http://lore.kernel.org/linux-trace-devel/20190802110101.14759-4-tz.stoyanov@gmail.com Link: http://lore.kernel.org/linux-trace-devel/20200625100516.365338-4-tz.stoyanov@gmail.com Signed-off-by: Tzvetomir Stoyanov (VMware) Cc: Andrew Morton Cc: Jiri Olsa Cc: Namhyung Kim Cc: linux-trace-devel@vger.kernel.org Link: http://lore.kernel.org/lkml/20200702185703.946652691@goodmis.org Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Arnaldo Carvalho de Melo commit fa52a4b2d0ab416508538bb47a95167d4c94caac Author: Alexander A. Klimov Date: Sun Jul 5 23:44:57 2020 +0200 tools: hv: change http to https in hv_kvp_daemon.c Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200705214457.28433-1-grandmaster@al2klimov.de [ wei: change subject line to be more specific ] Signed-off-by: Wei Liu commit c7614ff9b73a1e6fb2b1b51396da132ed22fecdb Author: Brant Merryman Date: Fri Jun 26 04:24:20 2020 +0000 USB: serial: cp210x: re-enable auto-RTS on open CP210x hardware disables auto-RTS but leaves auto-CTS when in hardware flow control mode and UART on cp210x hardware is disabled. When re-opening the port, if auto-CTS is enabled on the cp210x, then auto-RTS must be re-enabled in the driver. Signed-off-by: Brant Merryman Co-developed-by: Phu Luu Signed-off-by: Phu Luu Link: https://lore.kernel.org/r/ECCF8E73-91F3-4080-BE17-1714BC8818FB@silabs.com [ johan: fix up tags and problem description ] Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control") Cc: stable # 2.6.12 Signed-off-by: Johan Hovold commit 4387b3dbb079d482d3c2b43a703ceed4dd27ed28 Author: Brant Merryman Date: Fri Jun 26 04:22:58 2020 +0000 USB: serial: cp210x: enable usb generic throttle/unthrottle Assign the .throttle and .unthrottle functions to be generic function in the driver structure to prevent data loss that can otherwise occur if the host does not enable USB throttling. Signed-off-by: Brant Merryman Co-developed-by: Phu Luu Signed-off-by: Phu Luu Link: https://lore.kernel.org/r/57401AF3-9961-461F-95E1-F8AFC2105F5E@silabs.com [ johan: fix up tags ] Fixes: 39a66b8d22a3 ("[PATCH] USB: CP2101 Add support for flow control") Cc: stable # 2.6.12 Signed-off-by: Johan Hovold commit 0580baa46ef67069217bfeabd511ea036e58c1c0 Author: Michael Hanselmann Date: Sat Jul 4 20:25:03 2020 +0200 USB: serial: ch341: simulate break condition if not supported A subset of all CH341 devices don't support a real break condition. This fact is already used in the "ch341_detect_quirks" function. With this change a quirk is implemented to simulate a break condition by temporarily lowering the baud rate and sending a NUL byte. The primary drawbacks of this approach are that the duration of the break can't be controlled by userland and that data incoming during a simulated break is corrupted. The "TTY_DRIVER_HARDWARE_BREAK" serial driver flag was investigated as an alternative. It's a driver-wide flag and would've required significant changes to the serial and USB-serial driver frameworks to expose it for individual USB-serial adapters. Tested by sending a break condition and watching the TX pin using an oscilloscope. Signed-off-by: Michael Hanselmann Link: https://lore.kernel.org/r/f34a9b6e-ec2a-0873-e97b-2d5b2170e2ff@msgid.hansmi.ch [ johan: condense info message ] Signed-off-by: Johan Hovold commit 51f939b11cb1c47ed2a8d56b23f25483b7363f8e Author: Jon Derrick Date: Wed May 27 23:02:40 2020 -0400 PCI: vmd: Use Shadow MEMBAR registers for QEMU/KVM guests VMD device 28C0 natively assists guest passthrough of the VMD endpoint through the use of shadow registers that provide Host Physical Addresses to correctly assign bridge windows. These shadow registers are only available if VMD config space register 0x70, bit 1 is set. In order to support this mode in existing VMD devices which don't natively support the shadow register, it was decided that the hypervisor could offer the shadow registers in a vendor-specific PCI capability. QEMU has been modified to create this vendor-specific capability and supply the shadow membar registers for VMDs which don't natively support this feature. This patch adds this mode and updates the supported device list to allow this feature to be used on these VMDs. Link: https://lore.kernel.org/r/20200528030240.16024-4-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi commit be8c8403f63cf9f55feecbdcf8827197c065ba7d Author: Tian Tao Date: Thu Jul 2 16:54:41 2020 +0800 drm/hisilicon: Code refactoring for hibmc_drv_vdac code refactoring for hibmc_drv_vdac.c, no actual function changes. v2: remove the debug message. v3: embedding connector and encoder in struct hibmc_drm_private. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1593680081-60313-1-git-send-email-tiantao6@hisilicon.com commit c322fa0b3fa948010a278794e60c45ec860e4a1e Author: Rob Herring Date: Fri May 22 17:48:19 2020 -0600 PCI: mvebu: Use struct pci_host_bridge.windows list directly There's no need to create a temporary resource list and then splice it to struct pci_host_bridge.windows list. Just use pci_host_bridge.windows directly. The necessary clean-up is already handled by the PCI core. Link: https://lore.kernel.org/r/20200522234832.954484-3-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Thomas Petazzoni Cc: Jason Cooper commit 24344226f66beda742f233e08dfb3fb33932275b Author: Rob Herring Date: Fri May 22 17:48:18 2020 -0600 PCI: cadence: Use struct pci_host_bridge.windows list directly There's no need to create a temporary resource list and then splice it to struct pci_host_bridge.windows list. Just use pci_host_bridge.windows directly. The necessary clean-up is already handled by the PCI core. Link: https://lore.kernel.org/r/20200522234832.954484-2-robh@kernel.org Signed-off-by: Rob Herring Signed-off-by: Lorenzo Pieralisi Cc: Tom Joseph commit 821b67fa46390baea0ac5139a60eaa48805261b2 Author: Sudeep Holla Date: Thu Jun 25 10:59:39 2020 +0100 firmware: smccc: Add ARCH_SOC_ID support SMCCC v1.2 adds a new optional function SMCCC_ARCH_SOC_ID to obtain a SiP defined SoC identification value. Add support for the same. Also using the SoC bus infrastructure, let us expose the platform specific SoC atrributes under sysfs. There are various ways in which it can be represented in shortened form for efficiency and ease of parsing for userspace. The chosen form is described in the ABI document. Link: https://lore.kernel.org/r/20200625095939.50861-1-sudeep.holla@arm.com Cc: Etienne Carriere Reviewed-by: Steven Price Signed-off-by: Sudeep Holla commit 475d04b48b9e227e1be2396b1499bd36274be40a Author: Sudeep Holla Date: Sat May 23 18:08:59 2020 +0100 ARM: OMAP2: Use custom soc attribute group instead of device_create_file Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs entries") introduced custom soc attribute group in soc_device_attribute structure but there are no users treewide. While trying to understand the motivation and tried to use it, it was found lot of existing custom attributes can moved to use it instead of device_create_file. Though most of these never remove/cleanup the custom attribute as they never call soc_device_unregister, using these custom attribute group eliminate the need for any cleanup as the driver infrastructure will take care of that. Let us remove device_create_file and start using the custom attribute group in soc_device_attribute. Link: https://lore.kernel.org/r/20200523170859.50003-9-sudeep.holla@arm.com Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Acked-by: Tony Lindgren Signed-off-by: Sudeep Holla commit 53d421d29c052baa2c3f8d861781adc5cbcebe57 Author: Sudeep Holla Date: Sat May 23 18:08:58 2020 +0100 ARM: OMAP2: Switch to use DEVICE_ATTR_RO() Move device attributes to DEVICE_ATTR_RO() as that would make things a lot more "obvious" what is happening over the existing __ATTR usage. Link: https://lore.kernel.org/r/20200523170859.50003-8-sudeep.holla@arm.com Cc: Tony Lindgren Cc: linux-omap@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Acked-by: Tony Lindgren Signed-off-by: Sudeep Holla commit d7a1a4f47d804b32b3ca7a98b03425cf90cb9098 Author: Sudeep Holla Date: Sat May 23 18:08:57 2020 +0100 soc: ux500: Use custom soc attribute group instead of device_create_file Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs entries") introduced custom soc attribute group in soc_device_attribute structure but there are no users treewide. While trying to understand the motivation and tried to use it, it was found lot of existing custom attributes can moved to use it instead of device_create_file. Though most of these never remove/cleanup the custom attribute as they never call soc_device_unregister, using these custom attribute group eliminate the need for any cleanup as the driver infrastructure will take care of that. Let us remove device_create_file and start using the custom attribute group in soc_device_attribute. Link: https://lore.kernel.org/r/20200523170859.50003-7-sudeep.holla@arm.com Cc: Linus Walleij Reviewed-by: Greg Kroah-Hartman Reviewed-by: Linus Walleij Signed-off-by: Sudeep Holla commit 208b5899a0317c22d2eeaa25e98109dae8ec9703 Author: Sudeep Holla Date: Sat May 23 18:08:56 2020 +0100 soc: ux500: Switch to use DEVICE_ATTR_RO() Move device attributes to DEVICE_ATTR_RO() as that would make things a lot more "obvious" what is happening over the existing __ATTR usage. Link: https://lore.kernel.org/r/20200523170859.50003-6-sudeep.holla@arm.com Cc: Linus Walleij Reviewed-by: Greg Kroah-Hartman Reviewed-by: Linus Walleij Signed-off-by: Sudeep Holla commit be0db32f131b5641d3c8735bf47c24d37ab8d43c Author: Sudeep Holla Date: Sat May 23 18:08:55 2020 +0100 soc: integrator: Use custom soc attribute group instead of device_create_file Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs entries") introduced custom soc attribute group in soc_device_attribute structure but there are no users treewide. While trying to understand the motivation and tried to use it, it was found lot of existing custom attributes can moved to use it instead of device_create_file. Though most of these never remove/cleanup the custom attribute as they never call soc_device_unregister, using these custom attribute group eliminate the need for any cleanup as the driver infrastructure will take care of that. Let us remove device_create_file and start using the custom attribute group in soc_device_attribute. Link: https://lore.kernel.org/r/20200523170859.50003-5-sudeep.holla@arm.com Cc: Linus Walleij Reviewed-by: Greg Kroah-Hartman Reviewed-by: Linus Walleij Signed-off-by: Sudeep Holla commit 734776eb16e8ca0e76b437b679059765321848ec Author: Sudeep Holla Date: Sat May 23 18:08:54 2020 +0100 soc: integrator: Switch to use DEVICE_ATTR_RO() Move device attributes to DEVICE_ATTR_RO() as that would make things a lot more "obvious" what is happening over the existing __ATTR usage. Link: https://lore.kernel.org/r/20200523170859.50003-4-sudeep.holla@arm.com Cc: Linus Walleij Reviewed-by: Greg Kroah-Hartman Reviewed-by: Linus Walleij Signed-off-by: Sudeep Holla commit 99d50b9b8cfa99317525eb8f0c8cb7bd6db19462 Author: Sudeep Holla Date: Sat May 23 18:08:53 2020 +0100 soc: realview: Use custom soc attribute group instead of device_create_file Commit c31e73121f4c ("base: soc: Handle custom soc information sysfs entries") introduced custom soc attribute group in soc_device_attribute structure but there are no users treewide. While trying to understand the motivation and tried to use it, it was found lot of existing custom attributes can moved to use it instead of device_create_file. Though most of these never remove/cleanup the custom attribute as they never call soc_device_unregister, using these custom attribute group eliminate the need for any cleanup as the driver infrastructure will take care of that. Let us remove device_create_file and start using the custom attribute group in soc_device_attribute. Link: https://lore.kernel.org/r/20200523170859.50003-3-sudeep.holla@arm.com Cc: Linus Walleij Reviewed-by: Greg Kroah-Hartman Reviewed-by: Linus Walleij Signed-off-by: Sudeep Holla commit 5feebc65647088af2a9abb57306324028bf1a2ae Author: Sudeep Holla Date: Sat May 23 18:08:52 2020 +0100 soc: realview: Switch to use DEVICE_ATTR_RO() Move device attributes to DEVICE_ATTR_RO() as that would make things a lot more "obvious" what is happening over the existing __ATTR usage. Link: https://lore.kernel.org/r/20200523170859.50003-2-sudeep.holla@arm.com Cc: Linus Walleij Reviewed-by: Greg Kroah-Hartman Reviewed-by: Linus Walleij Signed-off-by: Sudeep Holla commit ec46855df33973ac6ed646e26cc8977b97cc7cd0 Author: Lee Jones Date: Thu Jun 25 09:39:11 2020 +0100 mfd: sprd-sc27xx-spi: Fix-up bogus IRQ register offset and mask setting 'i / pdata->num_irqs' always equates to 0 and 'BIT(i % pdata->num_irqs)' always ends up being BIT(i) here, so make that clearer in the code. If the code base needs to support more than 32 IRQs in the future, this will have to be reworked, but lets just keep it simple for as long as we can. This fixes the following W=1 warning: drivers/mfd/sprd-sc27xx-spi.c:255 sprd_pmic_probe() debug: sval_binop_unsigned: divide by zero Cc: Orson Zhai Cc: Chunyan Zhang Suggested-by: Baolin Wang Signed-off-by: Lee Jones Reviewed-by: Baolin Wang Signed-off-by: Lee Jones commit 768c1e38dc43b1fc43f73409f58c58344f243892 Author: Lee Jones Date: Wed Jun 24 14:52:27 2020 +0100 mfd: rave-sp: Fix mistake in 'struct rave_sp_deframer's kerneldoc Argument 'received' was incorrectly named by its struct type 'completion' instead of its name. Fixes the following W=1 warning: drivers/mfd/rave-sp.c:107: warning: Function parameter or member 'received' not described in 'rave_sp_reply' Cc: Andrey Vostrikov Cc: Nikita Yushchenko Cc: Andrey Smirnov Signed-off-by: Lee Jones commit 981b1261bfdf7cb3e3c2029ecc4a1510d46eff9e Author: Lee Jones Date: Wed Jun 24 14:29:18 2020 +0100 mfd: si476x-cmd: Add missing documentation for si476x_cmd_fm_rds_status()'s arg 'report' Kerneldoc syntax is used, but not complete. Descriptions are required for all arguments. Fixes the following W=1 build warning: drivers/mfd/si476x-cmd.c:907: warning: Function parameter or member 'report' not described in 'si476x_core_cmd_fm_rds_status' Cc: Andrey Smirnov Signed-off-by: Lee Jones commit 748160e7718d1fb3c90c0df86c4b07e4b5e92621 Author: Lee Jones Date: Wed Jun 24 14:26:16 2020 +0100 mfd: si476x-cmd: Update si476x_cmd_am_rsq_status()'s kerneldoc 4 of the old arguments were grouped and moved into a struct which is now passed as a pointer instead of the arguments themselves. However, whoever carried out this work forgot to update the function's kerneldoc header. Fixes the following W=1 warnings: drivers/mfd/si476x-cmd.c:746: warning: Function parameter or member 'rsqargs' not described in 'si476x_core_cmd_am_rsq_s drivers/mfd/si476x-cmd.c:746: warning: Excess function parameter 'rsqack' description in 'si476x_core_cmd_am_rsq_status' drivers/mfd/si476x-cmd.c:746: warning: Excess function parameter 'attune' description in 'si476x_core_cmd_am_rsq_status' drivers/mfd/si476x-cmd.c:746: warning: Excess function parameter 'cancel' description in 'si476x_core_cmd_am_rsq_status' drivers/mfd/si476x-cmd.c:746: warning: Excess function parameter 'stcack' description in 'si476x_core_cmd_am_rsq_status' Cc: Andrey Smirnov Signed-off-by: Lee Jones commit b1ded80a61f3b7ee5337318f0dc1bada280f0605 Author: Lee Jones Date: Wed Jun 24 14:32:33 2020 +0100 mfd: si476x-i2c: Fix spelling mistake in case() statement's FALLTHROUGH comment 's/FALLTHROUG/FALLTHROUGH' Cc: Andrey Smirnov Signed-off-by: Lee Jones commit c9b55f99fc679b3c7c9c1677b2fd2c86d6ac5e03 Author: Lee Jones Date: Wed Jun 24 14:32:06 2020 +0100 mfd: si476x-i2c: Add description for si476x_core_fwver_to_revision()'s arg 'func' Kerneldoc syntax is used, but not complete. Descriptions are required for all arguments. Fixes the following W=1 build warning: drivers/mfd/si476x-i2c.c:550: warning: Function parameter or member 'func' not described in 'si476x_core_fwver_to_revision' Cc: Andrey Smirnov Signed-off-by: Lee Jones commit 9745ef7dcf86bbad277c4a6575393a4eaabca1b4 Author: Lee Jones Date: Wed Jun 24 13:43:25 2020 +0100 mfd: si476x-cmd: Add missing colon(s) for all documented kerneldoc arguments Kerneldoc validation gets confused if syntax isn't "@.*: ". Adding the missing colons squashes the following W=1 warnings: drivers/mfd/si476x-cmd.c:525: warning: Function parameter or member 'dout' not described in 'si476x_core_cmd_dig_audio_pin_c drivers/mfd/si476x-cmd.c:525: warning: Function parameter or member 'xout' not described in 'si476x_core_cmd_dig_audio_pin_c drivers/mfd/si476x-cmd.c:574: warning: Function parameter or member 'core' not described in 'si476x_core_cmd_zif_pin_cfg' drivers/mfd/si476x-cmd.c:574: warning: Function parameter or member 'iqclk' not described in 'si476x_core_cmd_zif_pin_cfg' drivers/mfd/si476x-cmd.c:574: warning: Function parameter or member 'iqfs' not described in 'si476x_core_cmd_zif_pin_cfg' drivers/mfd/si476x-cmd.c:574: warning: Function parameter or member 'iout' not described in 'si476x_core_cmd_zif_pin_cfg' drivers/mfd/si476x-cmd.c:574: warning: Function parameter or member 'qout' not described in 'si476x_core_cmd_zif_pin_cfg' drivers/mfd/si476x-i2c.c:550: warning: Function parameter or member 'func' not described in 'si476x_core_fwver_to_revision' drivers/mfd/si476x-cmd.c:631: warning: Function parameter or member 'core' not described in 'si476x_core_cmd_ic_link_gpo_ctl drivers/mfd/si476x-cmd.c:631: warning: Function parameter or member 'icin' not described in 'si476x_core_cmd_ic_link_gpo_ctl drivers/mfd/si476x-cmd.c:631: warning: Function parameter or member 'icip' not described in 'si476x_core_cmd_ic_link_gpo_ctl drivers/mfd/si476x-cmd.c:631: warning: Function parameter or member 'icon' not described in 'si476x_core_cmd_ic_link_gpo_ctl drivers/mfd/si476x-cmd.c:631: warning: Function parameter or member 'icop' not described in 'si476x_core_cmd_ic_link_gpo_ctl drivers/mfd/si476x-cmd.c:662: warning: Function parameter or member 'core' not described in 'si476x_core_cmd_ana_audio_pin_c drivers/mfd/si476x-cmd.c:662: warning: Function parameter or member 'lrout' not described in 'si476x_core_cmd_ana_audio_pin_ drivers/mfd/si476x-cmd.c:697: warning: Function parameter or member 'core' not described in 'si476x_core_cmd_intb_pin_cfg_a1 drivers/mfd/si476x-cmd.c:697: warning: Function parameter or member 'intb' not described in 'si476x_core_cmd_intb_pin_cfg_a1 drivers/mfd/si476x-cmd.c:697: warning: Function parameter or member 'a1' not described in 'si476x_core_cmd_intb_pin_cfg_a10' drivers/mfd/si476x-cmd.c:746: warning: Function parameter or member 'core' not described in 'si476x_core_cmd_am_rsq_status' drivers/mfd/si476x-cmd.c:746: warning: Function parameter or member 'rsqargs' not described in 'si476x_core_cmd_am_rsq_statu drivers/mfd/si476x-cmd.c:746: warning: Function parameter or member 'report' not described in 'si476x_core_cmd_am_rsq_status drivers/mfd/si476x-cmd.c:878: warning: Function parameter or member 'core' not described in 'si476x_core_cmd_fm_seek_start' drivers/mfd/si476x-cmd.c:878: warning: Function parameter or member 'seekup' not described in 'si476x_core_cmd_fm_seek_start drivers/mfd/si476x-cmd.c:878: warning: Function parameter or member 'wrap' not described in 'si476x_core_cmd_fm_seek_start' drivers/mfd/si476x-cmd.c:907: warning: Function parameter or member 'core' not described in 'si476x_core_cmd_fm_rds_status' drivers/mfd/si476x-cmd.c:907: warning: Function parameter or member 'status_only' not described in 'si476x_core_cmd_fm_rds_s drivers/mfd/si476x-cmd.c:907: warning: Function parameter or member 'mtfifo' not described in 'si476x_core_cmd_fm_rds_status drivers/mfd/si476x-cmd.c:907: warning: Function parameter or member 'intack' not described in 'si476x_core_cmd_fm_rds_status drivers/mfd/si476x-cmd.c:907: warning: Function parameter or member 'report' not described in 'si476x_core_cmd_fm_rds_status drivers/mfd/si476x-cmd.c:1052: warning: Function parameter or member 'core' not described in 'si476x_core_cmd_am_seek_start' drivers/mfd/si476x-cmd.c:1052: warning: Function parameter or member 'seekup' not described in 'si476x_core_cmd_am_seek_star drivers/mfd/si476x-cmd.c:1052: warning: Function parameter or member 'wrap' not described in 'si476x_core_cmd_am_seek_start' Cc: Andrey Smirnov Signed-off-by: Lee Jones commit 3c719388f6ff505239f8285a423571236abbd3c2 Author: Lee Jones Date: Wed Jun 24 13:36:23 2020 +0100 mfd: si476x-cmd: Repair wrongly described function argument 's/response/resp' si476x_core_send_command()'s 5th argument has never been called response. This change must have occurred prior to the driver being Mainlined. We're also taking the opportunity to bring the first description back into line, making my OCD happy! This fixes the following W=1 warning(s): drivers/mfd/si476x-cmd.c:264: warning: Function parameter or member 'resp' not described in 'si476x_core_send_command drivers/mfd/si476x-cmd.c:264: warning: Excess function parameter 'response' description in 'si476x_core_send_command' Cc: Andrey Smirnov Signed-off-by: Lee Jones commit 2fbd583443905d6f8c6d87aebdef2717ae039f0b Author: Lee Jones Date: Wed Jun 24 13:31:31 2020 +0100 mfd: tps65010: Remove delcared and set, but never used variable 'status' 'status' hasn't been checked since 2008. It's probably safe to remove it. Fixes W=1 warning: drivers/mfd/tps65010.c:407:7: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] 407 | int status; | ^~~~~~ Signed-off-by: Lee Jones commit 20d60f850d2d8b6f9536c1a499fc6d6a5c724a55 Author: Lee Jones Date: Wed Jun 24 13:17:01 2020 +0100 mfd: ab3100-otp: Add missing colon(s) for all documented kerneldoc arguments Kerneldoc validation gets confused if syntax isn't "@.*: ". Adding the missing colons squashes the following W=1 warnings: drivers/mfd/ab3100-otp.c:60: warning: Function parameter or member 'dev' not described in 'ab3100_otp' drivers/mfd/ab3100-otp.c:60: warning: Function parameter or member 'locked' not described in 'ab3100_otp' drivers/mfd/ab3100-otp.c:60: warning: Function parameter or member 'freq' not described in 'ab3100_otp' drivers/mfd/ab3100-otp.c:60: warning: Function parameter or member 'paf' not described in 'ab3100_otp' drivers/mfd/ab3100-otp.c:60: warning: Function parameter or member 'imeich' not described in 'ab3100_otp' drivers/mfd/ab3100-otp.c:60: warning: Function parameter or member 'cid' not described in 'ab3100_otp' drivers/mfd/ab3100-otp.c:60: warning: Function parameter or member 'tac' not described in 'ab3100_otp' drivers/mfd/ab3100-otp.c:60: warning: Function parameter or member 'fac' not described in 'ab3100_otp' drivers/mfd/ab3100-otp.c:60: warning: Function parameter or member 'svn' not described in 'ab3100_otp' drivers/mfd/ab3100-otp.c:60: warning: Function parameter or member 'debugfs' not described in 'ab3100_otp' Cc: Linus Walleij Signed-off-by: Lee Jones commit 4976bfb8d853a246f83da7ccdfb49fa34093ac0d Author: Lee Jones Date: Wed Jun 24 13:14:51 2020 +0100 mfd: tps65217: Repair incorrect function argument name 's/tps65217/tps/' The kerneldocs for both tps65217_reg_write() and tps65217_update_bits() describe their first arguments as 'tps65217', when in reality these are simply called 'tps'. Fixes the following W=1 warnings: drivers/mfd/tps65217.c:215: warning: Function parameter or member 'tps' not described in 'tps65217_reg_write' drivers/mfd/tps65217.c:215: warning: Excess function parameter 'tps65217' description in 'tps65217_reg_write' drivers/mfd/tps65217.c:261: warning: Function parameter or member 'tps' not described in 'tps65217_update_bits' drivers/mfd/tps65217.c:261: warning: Excess function parameter 'tps65217' description in 'tps65217_update_bits' Cc: Tony Lindgren Cc: AnilKumar Ch Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones commit 9c3739ee293bc956739c9a90d357595f41f46d39 Author: Lee Jones Date: Wed Jun 24 13:10:54 2020 +0100 mfd: tps65218: Repair incorrect function argument name 's/tps65218/tps/' The kerneldocs for both tps65218_reg_write() and tps65218_update_bits() describe their first arguments as 'tps65218', when in reality these are simply called 'tps'. Fixes the following W=1 warnings: drivers/mfd/tps65218.c:58: warning: Function parameter or member 'tps' not described in 'tps65218_reg_write' drivers/mfd/tps65218.c:58: warning: Excess function parameter 'tps65218' description in 'tps65218_reg_write' drivers/mfd/tps65218.c:90: warning: Function parameter or member 'tps' not described in 'tps65218_update_bits' drivers/mfd/tps65218.c:90: warning: Excess function parameter 'tps65218' description in 'tps65218_update_bits' Cc: Tony Lindgren Cc: J Keerthy Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones commit 5ae3d1bcea485e3f0056c508d2e12d1a95c453ee Author: Lee Jones Date: Wed Jun 24 13:07:45 2020 +0100 mfd: cros_ec_dev: Fix cros_feature_to_{name,cells} struct descriptions Kerneldoc expects kernel structures to be prefixed with 'struct'. Fixes the following W=1 level warnings: drivers/mfd/cros_ec_dev.c:32: warning: cannot understand function prototype: 'struct cros_feature_to_name ' drivers/mfd/cros_ec_dev.c:44: warning: cannot understand function prototype: 'struct cros_feature_to_cells ' Cc: Benson Leung Cc: Guenter Roeck Cc: Bill Richardson Signed-off-by: Lee Jones Acked-by: Enric Balletbo i Serra Signed-off-by: Lee Jones commit 0824c889e1a4b1ec0edf890689c7852363c4b055 Author: Lee Jones Date: Wed Jun 24 12:56:11 2020 +0100 mfd: altera-sysmgr: Supply descriptions for 'np' and 'property' function args Kerneldoc syntax is used, but not complete. Arg descriptions are required. Fixes the following W=1 build warnings: drivers/mfd/altera-sysmgr.c:95: warning: Function parameter or member 'np' not described in 'altr_sysmgr_regmap_lookup_by_phandle' drivers/mfd/altera-sysmgr.c:95: warning: Function parameter or member 'property' not described in 'altr_sysmgr_regmap_lookup_by_phandle' Cc: Thor Thayer Signed-off-by: Lee Jones commit 1574360a98cef9842d86e208944bb45243150440 Author: Lee Jones Date: Wed Jun 24 12:29:02 2020 +0100 mfd: atmel-smc: Add missing colon(s) for 'conf' arguments Kerneldoc valication gets confused if syntax isn't "@.*: ". Adding the missing colons squashes the following W=1 warnings: drivers/mfd/atmel-smc.c:247: warning: Function parameter or member 'conf' not described in 'atmel_smc_cs_conf_apply' drivers/mfd/atmel-smc.c:268: warning: Function parameter or member 'conf' not described in 'atmel_hsmc_cs_conf_apply' Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: Boris Brezillon Signed-off-by: Lee Jones commit 55bbf5d42ee6c609de56702ae7f766c4e88efbed Author: Lee Jones Date: Wed Jun 24 09:48:17 2020 +0100 mfd: omap-usb-tll: Provide description for 'pdev' argument to .probe() Kerneldoc syntax is used, but not complete. Arg descriptions required. Prevents warnings like: drivers/mfd/omap-usb-tll.c:204: warning: Function parameter or member 'pdev' not described in 'usbtll_omap_probe Cc: Tony Lindgren Cc: Keshava Munegowda Cc: Roger Quadros Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones commit 3fc65627c81c700c2b12eb3b8ca8a47f4cb4dd20 Author: Lee Jones Date: Wed Jun 24 09:45:56 2020 +0100 mfd: omap-usb-host: Provide description for 'pdev' argument to .probe() Kerneldoc syntax is used, but not complete. Arg descriptions required. Prevents warnings like: drivers/mfd/omap-usb-host.c:531: warning: Function parameter or member 'pdev' not described in 'usbhs_omap_probe' Cc: Tony Lindgren Cc: Keshava Munegowda Cc: Roger Quadros Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones commit 5d36df75839d2dc6216f13ed86a60f801c38937f Author: Lee Jones Date: Wed Jun 24 09:42:33 2020 +0100 mfd: omap-usb-host: Remove invalid use of kerneldoc syntax Kerneldoc is for documenting function arguments and return values. Prevents warnings like: drivers/mfd/omap-usb-host.c:128: warning: cannot understand function prototype: 'const char * const port_modes[] = ' Cc: Tony Lindgren Cc: Keshava Munegowda Cc: Roger Quadros Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones commit 07d88c97aef826f1ba8a5026ea30700f85433057 Author: Lee Jones Date: Wed Jun 24 09:35:24 2020 +0100 mfd: db8500-prcmu: Remove incorrect function header from .probe() function Not only is the current header incorrect, the isn't actually a need to document the ubiquitous platform probe call. Cc: Linus Walleij Signed-off-by: Lee Jones commit 3ecbcd20e06f2c1254a85fc208ccc6aa20594314 Author: Lee Jones Date: Wed Jun 24 09:34:00 2020 +0100 mfd: db8500-prcmu: Add description for 'reset_reason' in kerneldoc Each function parameter should be documented in kerneldoc format. Squashes the following W=1 warnings: drivers/mfd/db8500-prcmu.c:2281: warning: Function parameter or member 'reset_code' not described in 'db8500_prcmu_system_reset' drivers/mfd/db8500-prcmu.c:3012: warning: Function parameter or member 'pdev' not described in 'db8500_prcmu_probe' Cc: Linus Walleij Signed-off-by: Lee Jones commit 5a0ffef8b74fda62114d7bfba92f318fcc4b9283 Author: Lee Jones Date: Tue Jun 23 15:51:28 2020 +0100 mfd: mfd-core: Complete kerneldoc header for devm_mfd_add_devices() Each function parameter should be documented in kerneldoc format. Squashes the following W=1 warnings: drivers/mfd/mfd-core.c:326: warning: Function parameter or member 'dev' not described in 'devm_mfd_add_devices' drivers/mfd/mfd-core.c:326: warning: Function parameter or member 'id' not described in 'devm_mfd_add_devices' drivers/mfd/mfd-core.c:326: warning: Function parameter or member 'cells' not described in 'devm_mfd_add_devices' drivers/mfd/mfd-core.c:326: warning: Function parameter or member 'n_devs' not described in 'devm_mfd_add_devices' drivers/mfd/mfd-core.c:326: warning: Function parameter or member 'mem_base' not described in 'devm_mfd_add_devices' drivers/mfd/mfd-core.c:326: warning: Function parameter or member 'irq_base' not described in 'devm_mfd_add_devices' drivers/mfd/mfd-core.c:326: warning: Function parameter or member 'domain' not described in 'devm_mfd_add_devices' Signed-off-by: Lee Jones commit afb718a870ef20efcf18d6fbea45fa6576a54d27 Author: Lee Jones Date: Tue Jun 23 15:44:48 2020 +0100 mfd: wm8350-core: Supply description wm8350_reg_{un}lock args Kerneldoc syntax is used, but not complete. Descriptions required. Prevents warnings like: drivers/mfd/wm8350-core.c:136: warning: Function parameter or member 'wm8350' not described in 'wm8350_reg_lock' drivers/mfd/wm8350-core.c:165: warning: Function parameter or member 'wm8350' not described in 'wm8350_reg_unlock' Cc: patches@opensource.cirrus.com Signed-off-by: Lee Jones commit 38ea9f47317d8e8a74b15b719d5c794a79346be8 Author: Lee Jones Date: Tue Jun 23 15:33:33 2020 +0100 mfd: wm831x-core: Supply description wm831x_reg_{un}lock args Kerneldoc syntax is used, but not complete. Descriptions required. Prevents warnings like: drivers/mfd/wm831x-core.c:119: warning: Function parameter or member 'wm831x' not described in 'wm831x_reg_lock' drivers/mfd/wm831x-core.c:145: warning: Function parameter or member 'wm831x' not described in 'wm831x_reg_unlock' Cc: Mark Brown Cc: patches@opensource.cirrus.com Signed-off-by: Lee Jones Acked-by: Charles Keepax Signed-off-by: Lee Jones commit f139ef70789a6e8ae1692e00cf0a3ef7d68bf6b1 Author: Lee Jones Date: Tue Jun 23 14:06:40 2020 +0100 mfd: wm8400-core: Supply description for wm8400_reset_codec_reg_cache's arg Kerneldoc syntax is used, but not complete. Descriptions required. Prevents warnings like: drivers/mfd/wm8400-core.c:113: warning: Function parameter or member 'wm8400' not described in 'wm8400_reset_codec_reg_cache' Cc: Mark Brown Cc: patches@opensource.cirrus.com Signed-off-by: Lee Jones Acked-by: Charles Keepax Signed-off-by: Lee Jones commit 0dfae4a3205cb73e8ab2aafd4cbd0ff1fb082b5f Author: Lee Jones Date: Tue Jun 23 13:36:30 2020 +0100 mfd: tc3589x: Remove invalid use of kerneldoc syntax Kerneldoc is for documenting function arguments and return values. Prevents warnings like: drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35890' not described in enum 'tc3589x_version' drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35892' not described in enum 'tc3589x_version' drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35893' not described in enum 'tc3589x_version' drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35894' not described in enum 'tc3589x_version' drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35895' not described in enum 'tc3589x_version' drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_TC35896' not described in enum 'tc3589x_version' drivers/mfd/tc3589x.c:32: warning: Enum value 'TC3589X_UNKNOWN' not described in enum 'tc3589x_version' Signed-off-by: Lee Jones commit ddb6b26c4102aab886277b2ca3c027b4976d819b Author: Lee Jones Date: Tue Jun 23 11:05:23 2020 +0100 mfd: ab8500-debugfs: Fix incompatible types in comparison expression issue Smatch reports: drivers/mfd/ab8500-debugfs.c:1804:20: error: incompatible types in comparison expression (different type sizes): drivers/mfd/ab8500-debugfs.c:1804:20: unsigned int * drivers/mfd/ab8500-debugfs.c:1804:20: unsigned long * This is due to mixed types being compared in a min() comparison. Fix this by treating values as signed and casting them to the same type as the receiving variable. Cc: Linus Walleij Signed-off-by: Lee Jones commit 54daa5d47c47662067115a78dd317fba3de9e828 Author: Lee Jones Date: Tue Jun 23 10:26:11 2020 +0100 mfd: ab3100-core: Fix incompatible types in comparison expression warning Smatch reports: drivers/mfd/ab3100-core.c:501:20: error: incompatible types in comparison expression (different type sizes): drivers/mfd/ab3100-core.c:501:20: unsigned int * drivers/mfd/ab3100-core.c:501:20: unsigned long * drivers/mfd/ab8500-debugfs.c:1804:20: error: incompatible types in comparison expression (different type sizes): drivers/mfd/ab8500-debugfs.c:1804:20: unsigned int * drivers/mfd/ab8500-debugfs.c:1804:20: unsigned long * Since the second min() argument can be less than 0 a signed variable is required for assignment. However, the non-sized type size_t is passed in from the userspace handlers. In order to firstly compare, then assign the smallest value, we firstly need to cast them both to the same as the receiving size_t typed variable. Cc: Linus Walleij Signed-off-by: Lee Jones commit 3d4a87576f3762c8c986950af157bc9025808b5c Author: Lee Jones Date: Tue Jun 23 10:08:41 2020 +0100 mfd: sprd-sc27xx-spi: Fix symbol 'sprd_pmic_detect_charger_type' was not declared warning Sparse reports: drivers/mfd/sprd-sc27xx-spi.c:59:23: warning: symbol 'sprd_pmic_detect_charger_type' was not declared. Should it be static? ... due to a missing header file. Cc: Orson Zhai Cc: Chunyan Zhang Signed-off-by: Lee Jones Reviewed-by: Baolin Wang Signed-off-by: Lee Jones commit d9ca7801b6e5ffdfd7a4ed3f287b277895e63e90 Author: Lee Jones Date: Tue Jun 23 09:55:05 2020 +0100 mfd: altera-sysmgr: Fix physical address storing hacks Sparse reports: drivers/mfd/altera-sysmgr.c:150:30: warning: incorrect type in assignment (different address spaces) drivers/mfd/altera-sysmgr.c:150:30: expected unsigned int [usertype] *base drivers/mfd/altera-sysmgr.c:150:30: got void [noderef] * drivers/mfd/altera-sysmgr.c:156:26: warning: incorrect type in argument 3 (different address spaces) drivers/mfd/altera-sysmgr.c:156:26: expected void [noderef] *regs drivers/mfd/altera-sysmgr.c:156:26: got unsigned int [usertype] *base It appears as though the driver data property 'resource_size_t *base' was being used to store 2 different types of addresses (physical and IO-mapped) under a single declared type. Fortunately, no value is recalled from the driver data entry, so it can be easily omitted. Instead we can use the value obtained directly from the platform resource to pass through Regmap into the call-backs to be used for the SMCC call and use a local dedicated __iomem variable for IO-remapping. Cc: Thor Thayer Signed-off-by: Lee Jones commit c504a2486ab67cd9fc38940ad2841075d6a3e9a4 Author: Lee Jones Date: Tue Jun 23 09:15:56 2020 +0100 mfd: tps6586x: Fix cast to restricted __le32 warning Silences Sparse warning(s): drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32 drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32 drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32 drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32 drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32 drivers/mfd/tps6586x.c:323:16: warning: cast to restricted __le32 Cc: Mike Rapoport Cc: Eric Miao Signed-off-by: Lee Jones commit b174015b1ddd0a7009acaf6aa7019e9883b0f75b Author: Lee Jones Date: Tue Jun 23 09:01:07 2020 +0100 mfd: twl4030-irq: Fix cast to restricted __le32 warning Silences Sparse warning(s): drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32 drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32 drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32 drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32 drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32 drivers/mfd/twl4030-irq.c:573:40: warning: cast to restricted __le32 Cc: Tony Lindgren Cc: Kai Svahn Cc: Syed Khasim Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones commit 6fef0d4ea575c0561b38fd9149a05f1acb505bc0 Author: Lee Jones Date: Tue Jun 23 08:55:47 2020 +0100 mfd: twl4030-irq: Fix incorrect type in assignment warning Silences Sparse warning: drivers/mfd/twl4030-irq.c:485:26: warning: incorrect type in assignment (different base types) drivers/mfd/twl4030-irq.c:485:26: expected unsigned int [usertype] word drivers/mfd/twl4030-irq.c:485:26: got restricted __le32 [usertype] Cc: Tony Lindgren Cc: Kai Svahn Cc: Syed Khasim Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones commit e17c7461a28ce7f0cc2c1aec307584dccd04a847 Author: Lee Jones Date: Tue Jun 23 15:47:02 2020 +0100 backlight: qcom-wled: Remove unused configs for LED3 and LED4 Fixes W=1 warnings: drivers/video/backlight/qcom-wled.c:1294:34: warning: ‘wled4_string_cfg’ defined but not used [-Wunused-const-variable=] 1294 | static const struct wled_var_cfg wled4_string_cfg = { | ^~~~~~~~~~~~~~~~ drivers/video/backlight/qcom-wled.c:1290:34: warning: ‘wled3_string_cfg’ defined but not used [-Wunused-const-variable=] 1290 | static const struct wled_var_cfg wled3_string_cfg = { | ^~~~~~~~~~~~~~~~ Cc: Andy Gross Cc: Bjorn Andersson Cc: Bartlomiej Zolnierkiewicz Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Sam Ravnborg Signed-off-by: Lee Jones commit 3e799ccda3651a43ef3b366f70101e16e5054865 Author: Lee Jones Date: Tue Jun 23 15:37:50 2020 +0100 backlight: lm3630a_bl: Remove invalid checks for unsigned int < 0 unsigned ints 'sources' and 'bank' cannot be less than LM3630A_SINK_0 (0) and LM3630A_BANK_0 (0) respecitively, so change the logic to only check for thier two possible valid values. Fixes W=1 warnings: drivers/video/backlight/lm3630a_bl.c: In function ‘lm3630a_parse_led_sources’: drivers/video/backlight/lm3630a_bl.c:394:18: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 394 | if (sources[i] < LM3630A_SINK_0 || sources[i] > LM3630A_SINK_1) | ^ drivers/video/backlight/lm3630a_bl.c: In function ‘lm3630a_parse_bank’: drivers/video/backlight/lm3630a_bl.c:415:11: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 415 | if (bank < LM3630A_BANK_0 || bank > LM3630A_BANK_1) | ^ Cc: Bartlomiej Zolnierkiewicz Cc: Daniel Jeong Cc: LDD MLP Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Sam Ravnborg Signed-off-by: Lee Jones commit 6c05632d6341ced4c2cb431ed0e5f617cc83f5bb Author: Lee Jones Date: Tue Jun 23 15:04:36 2020 +0100 backlight: backlight: Supply description for function args in existing Kerneldocs Kerneldoc syntax is used, but not complete. Descriptions required. Prevents warnings like: drivers/video/backlight/backlight.c:329: warning: Function parameter or member 'reason' not described in 'backlight_force_update' drivers/video/backlight/backlight.c:354: warning: Function parameter or member 'props' not described in 'backlight_device_register' Cc: Bartlomiej Zolnierkiewicz Cc: Jamey Hicks Cc: Andrew Zabolotny Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Sam Ravnborg Signed-off-by: Lee Jones commit 7099c930fa71438f1b46350f693e3e6d7e627482 Author: Lee Jones Date: Tue Jun 23 12:48:41 2020 +0100 backlight: ili922x: Add missing kerneldoc description for ili922x_reg_dump()'s arg Kerneldoc syntax is used, but not complete. Descriptions required. Prevents warnings like: drivers/video/backlight/ili922x.c:298: warning: Function parameter or member 'spi' not described in 'ili922x_reg_dump' Cc: Bartlomiej Zolnierkiewicz Cc: Software Engineering Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Sam Ravnborg Signed-off-by: Lee Jones commit ee555c1dbe69d7de80d11ebbe5c9589726e12ed9 Author: Lee Jones Date: Tue Jun 23 12:44:05 2020 +0100 backlight: ili922x: Remove invalid use of kerneldoc syntax Kerneldoc is for documenting function arguments and return values. Prevents warnings like: drivers/video/backlight/ili922x.c:127: warning: cannot understand function prototype: 'int ili922x_id = 1; ' drivers/video/backlight/ili922x.c:136: warning: cannot understand function prototype: 'struct ili922x ' Cc: Bartlomiej Zolnierkiewicz Cc: Software Engineering Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Sam Ravnborg Signed-off-by: Lee Jones commit 0e0428be20fac07989bdccc4c2836cdfe2ff5ec4 Author: Lee Jones Date: Tue Jun 23 12:41:34 2020 +0100 backlight: ili922x: Add missing kerneldoc descriptions for CHECK_FREQ_REG() args Kerneldoc syntax is used, but not complete. Descriptions required. Prevents warnings like: drivers/video/backlight/ili922x.c:116: warning: Function parameter or member 's' not described in 'CHECK_FREQ_REG' drivers/video/backlight/ili922x.c:116: warning: Function parameter or member 'x' not described in 'CHECK_FREQ_REG' Cc: Bartlomiej Zolnierkiewicz Cc: Software Engineering Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Sam Ravnborg Signed-off-by: Lee Jones commit 4160ebacd3579651c5fd9cb1d27dc2205adb13d7 Author: Lee Jones Date: Tue Jun 23 12:27:10 2020 +0100 backlight: lcd: Add missing kerneldoc entry for 'struct device parent' This has been missing since the conversion to 'struct device' in 2007. Cc: Bartlomiej Zolnierkiewicz Cc: Jamey Hicks Cc: Andrew Zabolotny Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Sam Ravnborg Signed-off-by: Lee Jones commit 81357f818f3e21963aa7630874bfc941330ef4d4 Author: Lee Jones Date: Tue Jun 23 12:16:37 2020 +0100 backlight: lms501kf03: Remove unused const variables W=1 kernel build reports: drivers/video/backlight/lms501kf03.c:96:28: warning: ‘seq_sleep_in’ defined but not used [-Wunused-const-variable=] 96 | static const unsigned char seq_sleep_in[] = { | ^~~~~~~~~~~~ drivers/video/backlight/lms501kf03.c:92:28: warning: ‘seq_up_dn’ defined but not used [-Wunused-const-variable=] 92 | static const unsigned char seq_up_dn[] = { | ^~~~~~~~~ Either 'seq_sleep_in' nor 'seq_up_dn' have been used since the driver first landed in 2013. Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Lee Jones Reviewed-by: Daniel Thompson Reviewed-by: Sam Ravnborg Signed-off-by: Lee Jones commit 86be5c789690eb08656b08c072c50a7b02bf41f1 Author: Ondrej Jirman Date: Fri Jul 3 21:48:42 2020 +0200 arm64: dts: sun50i-pinephone: dldo4 must not be >= 1.8V Some outputs from the RTL8723CS are connected to the PL port (BT_WAKE_AP), which runs at 1.8V. When BT_WAKE_AP is high, the PL pin this signal is connected to is overdriven, and the whole PL port's voltage rises somewhat. This results in changing voltage on the R_PWM pin (PL10), which is the cause for backlight flickering very noticeably when typing on a Bluetooth keyboard, because backlight intensity is highly sensitive to the voltage of the R_PWM pin. Limit the maximum WiFi/BT I/O voltage to 1.8V to avoid overdriving the PL port pins via BT and WiFi IO port signals. WiFi and BT functionality is unaffected by this change. This completely stops the backlight flicker when using bluetooth. Fixes: 91f480d40942 ("arm64: dts: allwinner: Add initial support for Pine64 PinePhone") Signed-off-by: Ondrej Jirman Link: https://lore.kernel.org/r/20200703194842.111845-4-megous@megous.com Signed-off-by: Maxime Ripard commit e53568caa25c530a0fc4e3c2e1c275119fba7f91 Author: Ondrej Jirman Date: Fri Jul 3 21:48:41 2020 +0200 arm64: dts: allwinner: Add support for PinePhone revision 1.2 Revision 1.2 should be the final production version of the PinePhone. It has most of the known HW quirks fixed. Interrupt to the magnetometer is routed correctly, in this revision. The bulk of the changes are in how modem and the USB-C HDMI bridge chip is powered and where the signals from the modem are connected. Also backlight intensity seemingly behaves differently, than on the 1.1 and 1.0 boards, and the PWM duty cycle where backlight starts to work is 10% (as tested on 2 1.2 PinePhones I have access to). Signed-off-by: Ondrej Jirman Link: https://lore.kernel.org/r/20200703194842.111845-3-megous@megous.com Signed-off-by: Maxime Ripard commit 9ae880aad8b94c1e5a20d9206fddcbff1fbff365 Author: Ondrej Jirman Date: Fri Jul 3 21:48:40 2020 +0200 dt-bindings: arm: sunxi: Add PinePhone 1.2 bindings Document board compatible names for Pine64 PinePhone 1.2. Signed-off-by: Ondrej Jirman Link: https://lore.kernel.org/r/20200703194842.111845-2-megous@megous.com Signed-off-by: Maxime Ripard commit 5bd6ff0c6fe6c138aebe8d3bf7163420386c7ca7 Author: Andrew Lunn Date: Sun Jul 5 23:05:08 2020 +0200 net: dsa: vitesse-vsc73xx: Convert to plain comments to avoid kerneldoc warnings The comments before struct vsc73xx_platform and struct vsc73xx_spi use kerneldoc format, but then fail to document the members of these structures. All the structure members are self evident, and the driver has not other kerneldoc comments, so change these to plain comments to avoid warnings. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 9534f1e9084452afb3f8bc0fcdb81a95a6b8392a Author: Andrew Lunn Date: Sun Jul 5 22:55:55 2020 +0200 net: dsa: lan9303: fix variable 'res' set but not used Since lan9303_adjust_link() is a void function, there is no option to return an error. So just remove the variable and lets any errors be discarded. Cc: Egil Hjelmeland Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit da31735cb9db61dccea0bc9eeb581b41106a247a Author: Andrew Lunn Date: Sun Jul 5 22:42:27 2020 +0200 net: dsa: rtl8366: Pass GENMASK() signed bits Oddly, GENMASK() requires signed bit numbers, so that it can compare them for < 0. If passed an unsigned type, we get warnings about the test never being true. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 74dc1d46ee52037b10b7e55a993764baa93f2f18 Merge: 6c67b03b85cd6 c226e2716ee25 Author: David S. Miller Date: Sun Jul 5 15:45:38 2020 -0700 Merge branch 'net-dsa-b53-sf2-warn' Andrew Lunn says: ==================== dsa: b53/sf2 Fixup most of the C=1 W=1 warnings in these drivers. ==================== Signed-off-by: David S. Miller commit c226e2716ee25ab8e6b868559be00a1c30282486 Author: Andrew Lunn Date: Sun Jul 5 22:36:25 2020 +0200 net: dsa: bcm_sf2: Pass GENMASK() signed bits Oddly, GENMASK() requires signed bit numbers, so that it can compare them for < 0. If passed an unsigned type, we get warnings about the test never being true. There is no danger of overflow here, udf is always a u8, so there is plenty of space when expanding to an int. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f76b6ef11c5723e840c1fc49587d267297352e9e Author: Andrew Lunn Date: Sun Jul 5 22:36:24 2020 +0200 net: dsa: bcm_sf2: Initialize __be16 with a __be16 value A __be16 variable should be initialised with a __be16 value. So add a htons(). In this case it is pointless, given the value being assigned is 0xffff, but it stops sparse from warnings. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8caefe7e41b9ea2e1fdc806b45d224fe2ec0d618 Author: Andrew Lunn Date: Sun Jul 5 22:36:23 2020 +0200 net: dsa: b53: Fixup endianness warnings leX_to_cpu() expects to be passed an __leX type. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 6c67b03b85cd6298811a6de0481c44df88bfc807 Merge: 7680b8f15e181 0b5294483c356 Author: David S. Miller Date: Sun Jul 5 15:43:01 2020 -0700 Merge branch 'net--dsa-mv88e6xxx-warn' Andrew Lunn says: ==================== net: dsa: mv88e6xxx: Fixup C=1 W=1 warnings Make the mv88e6xxx driver build cleanly with C=1 W=1. ==================== Signed-off-by: David S. Miller commit 0b5294483c356e87f520d4894d85a961fc1c4a39 Author: Andrew Lunn Date: Sun Jul 5 21:38:10 2020 +0200 net: dsa: mv88e6xxx: scratch: Fixup kerneldoc Correct parameters and add the missing ones. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit b672b35143777658cb8801c16427d797430f53e3 Author: Andrew Lunn Date: Sun Jul 5 21:38:09 2020 +0200 net: dsa: mv88e6xxx: Remove set but unused variable We don't act on any errors reading registers while handling watchdog interrupt. Since this is an interrupt handler, we cannot return such errors. So just remove the variable. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 048442807aba49898a502fa7a87f4b48776359ff Author: Andrew Lunn Date: Sun Jul 5 21:38:08 2020 +0200 net: dsa: mv88e6xxx: vlan_tci is __be16 The flow spec member vlan_tci is in network order. Hence comparisons should be made again network order values. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit f1931164f06fc645382ee6a79cdb456b66747a5d Author: Andrew Lunn Date: Sun Jul 5 21:38:07 2020 +0200 net: dsa: mv88e6xxx: Fix sparse warnings from GENMASK Oddly, GENMASK() requires signed bit numbers, so that it can compare them for < 0. If passed an unsigned type, we get warnings about the test never being true. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 7680b8f15e181cd43dcc771f4779a84643f6b3aa Merge: dbacfd8ca755b 99bac53d069a0 Author: David S. Miller Date: Sun Jul 5 15:31:58 2020 -0700 Merge branch 'net-dsa-warnings' Andrew Lunn says: ==================== net: dsa: Fix C=1 W=1 warnings Mostly not using __be16 when decoding packet contents. ==================== Signed-off-by: David S. Miller commit 99bac53d069a05dc680b3aa82614f964bc12f5f9 Author: Andrew Lunn Date: Sun Jul 5 21:30:08 2020 +0200 net: dsa: tag_qca.c: Fix warning for __be16 vs u16 net/dsa/tag_qca.c:48:15: warning: incorrect type in assignment (different base types) net/dsa/tag_qca.c:48:15: expected unsigned short [usertype] net/dsa/tag_qca.c:48:15: got restricted __be16 [usertype] net/dsa/tag_qca.c:68:13: warning: incorrect type in assignment (different base types) net/dsa/tag_qca.c:68:13: expected restricted __be16 [usertype] hdr net/dsa/tag_qca.c:68:13: got int net/dsa/tag_qca.c:71:16: warning: restricted __be16 degrades to integer net/dsa/tag_qca.c:81:17: warning: restricted __be16 degrades to integer Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 04d63f9d91d018d4ec31832677f4045706defc18 Author: Andrew Lunn Date: Sun Jul 5 21:30:07 2020 +0200 net: dsa: tag_mtk: Fix warnings for __be16 net/dsa/tag_mtk.c:84:13: warning: incorrect type in assignment (different base types) net/dsa/tag_mtk.c:84:13: expected restricted __be16 [usertype] hdr net/dsa/tag_mtk.c:84:13: got int net/dsa/tag_mtk.c:94:17: warning: restricted __be16 degrades to integer The result of a ntohs() is not __be16, but u16. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 802734ad7753294dae69c431c45e0503dc33e97a Author: Andrew Lunn Date: Sun Jul 5 21:30:06 2020 +0200 net: dsa: tag_lan9303: Fix __be16 warnings net/dsa/tag_lan9303.c:76:24: warning: incorrect type in assignment (different base types) net/dsa/tag_lan9303.c:76:24: expected unsigned short [usertype] net/dsa/tag_lan9303.c:76:24: got restricted __be16 [usertype] net/dsa/tag_lan9303.c:80:24: warning: incorrect type in assignment (different base types) net/dsa/tag_lan9303.c:80:24: expected unsigned short [usertype] net/dsa/tag_lan9303.c:80:24: got restricted __be16 [usertype] net/dsa/tag_lan9303.c:106:31: warning: restricted __be16 degrades to integer net/dsa/tag_lan9303.c:111:24: warning: cast to restricted __be16 net/dsa/tag_lan9303.c:111:24: warning: cast to restricted __be16 net/dsa/tag_lan9303.c:111:24: warning: cast to restricted __be16 net/dsa/tag_lan9303.c:111:24: warning: cast to restricted __be16 Make use of __be16 where appropriate to fix these warnings. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ed6444ea03841d6a24093eb25dca2eecc1860ca9 Author: Andrew Lunn Date: Sun Jul 5 21:30:05 2020 +0200 net: dsa: tag_ksz: Fix __be16 warnings cpu_to_be16 returns a __be16 value. So what it is assigned to needs to have the same type to avoid warnings. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a61bf20831d7fc77395d97777a9b511790fff621 Author: Andrew Lunn Date: Sun Jul 5 21:30:04 2020 +0200 net: dsa: Add __percpu property to prevent warnings net/dsa/slave.c:505:13: warning: incorrect type in initializer (different address spaces) net/dsa/slave.c:505:13: expected void const [noderef] *__vpp_verify net/dsa/slave.c:505:13: got struct pcpu_sw_netstats * Add the needed _percpu property to prevent this warning. Signed-off-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit dbacfd8ca755b9f710ab17a1e47572fc4e5dabcc Merge: e1f0467044044 7e14a2dc8c656 Author: David S. Miller Date: Sun Jul 5 15:25:59 2020 -0700 Merge branch 'Phylink-integration-improvements-for-Felix-DSA-driver' Vladimir Oltean says: ==================== Phylink integration improvements for Felix DSA driver This is an overhaul of the Felix switch driver's phylink operations. Patches 1, 3, 4 and 5 are cleanup, patch 2 is adding a new feature and and patch 6 is adaptation to the new format of an existing phylink API (mac_link_up). Changes since v2: - Replaced "PHYLINK" with "phylink". - Rewrote commit message of patch 5/6. Changes since v1: - Now using phy_clear_bits and phy_set_bits instead of plain writes to MII_BMCR. This combines former patches 1/7 and 6/7 into a single new patch 1/6. - Updated commit message of patch 5/6. ==================== Signed-off-by: David S. Miller commit 7e14a2dc8c656acea48729daf3f617aa76d62937 Author: Vladimir Oltean Date: Sun Jul 5 19:16:26 2020 +0300 net: dsa: felix: use resolved link config in mac_link_up() Phylink now requires that parameters established through auto-negotiation be written into the MAC at the time of the mac_link_up() callback. In the case of felix, that means taking the port out of reset, setting the correct timers for PAUSE frames, and enabling/disabling TX flow control. This patch also splits the inband and noinband configuration of the vsc9959 PCS (currently found in a function called "init") into 2 different functions, which have a nomenclature closer to phylink: "config", for inband setup, and "link_up", for noinband (forced) setup. This is necessary as a preparation step for giving up control of the PCS to phylink, which will be done in further patch series. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b4c2354537b41a13805d28f6f5e8a811d8097e8a Author: Vladimir Oltean Date: Sun Jul 5 19:16:25 2020 +0300 net: dsa: felix: delete .phylink_mac_an_restart code Phylink uses the .mac_an_restart method to offer the user an implementation of the "ethtool -r" behavior, when the media-side auto negotiation can be restarted by the local MAC PCS. This is the case for fiber modes 1000Base-X and 2500Base-X (IEEE clause 37) that don't have an Ethernet PHY connected locally, and the media is connected to the MAC PCS directly. On the other hand, the Cisco SGMII and USXGMII standards also have an auto negotiation mechanism based on IEEE 802.3 clause 37 (their respective specs require a MAC PCS and a PHY PCS to implement the same state machine, which is described in IEEE 802.3 "Auto-Negotiation Figure 37-6"), so the ability to restart auto-negotiation is intrinsically symmetrical (the MAC PCS can do it too). However, it appears that not all SGMII/USXGMII PHYs have logic to restart the MDI-side auto-negotiation process when they detect a transition of the SGMII link from data mode to configuration mode. Some do (VSC8234) and some don't (AR8033, MV88E1111). IEEE and/or Cisco specification wordings to not help to prove whether propagating the "AN restart" event from MII side ("mr_restart_an") to MDI side ("mr_restart_negotiation") is required behavior - neither of them specifies any mandatory interaction between the clause 37 AN state machine from Figure 37-6 and the clause 28 AN state machine from Figure 28-18. Therefore, even if a certain behavior could be proven as being required, real-life SGMII/USXGMII PHYs are inconsistent enough that a clause 37 AN restart cannot be used by phylink to reliably trigger a media-side renegotiation, when the user requests it via ethtool. The only remaining use that the .mac_an_restart callback might possibly have, given what we know now, is to implement some silicon quirks, but so far that has proven to not be necessary. So remove this code for now, since it never gets called and we don't foresee any circumstance in which it might be, either. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 151a7cee728a89d909096f552108692905b66aaa Author: Vladimir Oltean Date: Sun Jul 5 19:16:24 2020 +0300 net: dsa: felix: set proper pause frame timers based on link speed state->speed holds a value of 10, 100, 1000 or 2500, but SYS_MAC_FC_CFG_FC_LINK_SPEED expects a value in the range 0, 1, 2 or 3. So set the correct speed encoding into this register. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit da1c4ba1f741ee8f7a7f88d52bc2482fae26200d Author: Vladimir Oltean Date: Sun Jul 5 19:16:23 2020 +0300 net: dsa: felix: unconditionally configure MAC speed to 1000Mbps In VSC9959, the PCS is the one who performs rate adaptation (symbol duplication) to the speed negotiated by the PHY. The MAC is unaware of that and must remain configured for gigabit. If it is configured at OCELOT_SPEED_10 or OCELOT_SPEED_100, it'll start transmitting PAUSE frames out of control and never recover, _even if_ we then reconfigure it at OCELOT_SPEED_1000 afterwards. This patch fixes a bug that luckily did not have any functional impact. We were writing 10, 100, 1000 etc into this 2-bit field in DEV_CLOCK_CFG, but the hardware expects values in the range 0, 1, 2, 3. So all speed values were getting truncated to 0, which is OCELOT_SPEED_2500, and which also appears to be fine. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit b1c7b87443c2c12c4fe095114736b8ad6f963f67 Author: Vladimir Oltean Date: Sun Jul 5 19:16:22 2020 +0300 net: dsa: felix: support half-duplex link modes Ping tested: [ 11.808455] mscc_felix 0000:00:00.5 swp0: Link is Up - 1Gbps/Full - flow control rx/tx [ 11.816497] IPv6: ADDRCONF(NETDEV_CHANGE): swp0: link becomes ready [root@LS1028ARDB ~] # ethtool -s swp0 advertise 0x4 [ 18.844591] mscc_felix 0000:00:00.5 swp0: Link is Down [ 22.048337] mscc_felix 0000:00:00.5 swp0: Link is Up - 100Mbps/Half - flow control off [root@LS1028ARDB ~] # ip addr add 192.168.1.1/24 dev swp0 [root@LS1028ARDB ~] # ping 192.168.1.2 PING 192.168.1.2 (192.168.1.2): 56 data bytes (...) ^C--- 192.168.1.2 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 0.383/0.611/1.051 ms [root@LS1028ARDB ~] # ethtool -s swp0 advertise 0x10 [ 355.637747] mscc_felix 0000:00:00.5 swp0: Link is Down [ 358.788034] mscc_felix 0000:00:00.5 swp0: Link is Up - 1Gbps/Half - flow control off [root@LS1028ARDB ~] # ping 192.168.1.2 PING 192.168.1.2 (192.168.1.2): 56 data bytes (...) ^C --- 192.168.1.2 ping statistics --- 16 packets transmitted, 16 packets received, 0% packet loss round-trip min/avg/max = 0.301/0.384/1.138 ms Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Russell King Signed-off-by: David S. Miller commit 3f2628d62dec9505d5f19044e5f0401989a6b796 Author: Vladimir Oltean Date: Sun Jul 5 19:16:21 2020 +0300 net: dsa: felix: clarify the intention of writes to MII_BMCR The driver appears to write to BMCR_SPEED and BMCR_DUPLEX, fields which are read-only, since they are actually configured through the vendor-specific IF_MODE (0x14) register. But the reason we're writing back the read-only values of MII_BMCR is to alter these writable fields: BMCR_RESET BMCR_LOOPBACK BMCR_ANENABLE BMCR_PDOWN BMCR_ISOLATE BMCR_ANRESTART In particular, the only field which is really relevant to this driver is BMCR_ANENABLE. Clarify that intention by spelling it out, using phy_set_bits and phy_clear_bits. The driver also made a few writes to BMCR_RESET and BMCR_ANRESTART which are unnecessary and may temporarily disrupt the link to the PHY. Remove them. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8b3656af2a37dc538d21e144a5a94bacae05e9f1 Author: Pavel Begunkov Date: Fri Jul 3 22:15:08 2020 +0300 io_uring: fix lost cqe->flags Don't forget to fill cqe->flags properly in io_submit_flush_completions() Fixes: a1d7c393c4711 ("io_uring: enable READ/WRITE to use deferred completions") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 652532ad459524d32c6bf1522e0b88d83b084d1a Author: Pavel Begunkov Date: Fri Jul 3 22:15:07 2020 +0300 io_uring: keep queue_sqe()'s fail path separately A preparation path, extracts error path into a separate block. It looks saner then calling req_set_fail_links() after io_put_req_find_next(), even though it have been working well. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 6df1db6b542436c6d429caa66e1045862fa36155 Author: Pavel Begunkov Date: Fri Jul 3 22:15:06 2020 +0300 io_uring: fix mis-refcounting linked timeouts io_prep_linked_timeout() sets REQ_F_LINK_TIMEOUT altering refcounting of the following linked request. After that someone should call io_queue_linked_timeout(), otherwise a submission reference of the linked timeout won't be ever dropped. That's what happens in io_steal_work() if io-wq decides to postpone linked request with io_wqe_enqueue(). io_queue_linked_timeout() can also be potentially called twice without synchronisation during re-submission, e.g. io_rw_resubmit(). There are the rules, whoever did io_prep_linked_timeout() must also call io_queue_linked_timeout(). To not do it twice, io_prep_linked_timeout() will return non NULL only for the first call. That's controlled by REQ_F_LINK_TIMEOUT flag. Also kill REQ_F_QUEUE_TIMEOUT. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c2c4c83c58cbca23527fee93b49738a5a84272a1 Author: Jens Axboe Date: Wed Jul 1 15:37:11 2020 -0600 io_uring: use new io_req_task_work_add() helper throughout Since we now have that in the 5.9 branch, convert the existing users of task_work_add() to use this new helper. Signed-off-by: Jens Axboe commit 4c6e277c4cc4a6b3b2b9c66a7b014787ae757cc1 Author: Jens Axboe Date: Wed Jul 1 11:29:10 2020 -0600 io_uring: abstract out task work running Provide a helper to run task_work instead of checking and running manually in a bunch of different spots. While doing so, also move the task run state setting where we run the task work. Then we can move it out of the callback helpers. This also helps ensure we only do this once per task_work list run, not per task_work item. Suggested-by: Oleg Nesterov Signed-off-by: Jens Axboe commit 58c6a581decbcdd7f49eb7cab27ee14cef247fd5 Merge: 8eb06d7e8dd85 b7db41c9e03b5 Author: Jens Axboe Date: Sun Jul 5 15:04:17 2020 -0600 Merge branch 'io_uring-5.8' into for-5.9/io_uring Pull in task_work changes from the 5.8 series, as we'll need to apply the same kind of changes to other parts in the 5.9 branch. * io_uring-5.8: io_uring: fix regression with always ignoring signals in io_cqring_wait() io_uring: use signal based task_work running task_work: teach task_work_add() to do signal_wake_up() commit 3a949f4c93548751a377691b2a208063da05e369 Author: Gavin Shan Date: Tue Jun 30 11:57:05 2020 +1000 KVM: arm64: Rename HSR to ESR kvm/arm32 isn't supported since commit 541ad0150ca4 ("arm: Remove 32bit KVM host support"). So HSR isn't meaningful since then. This renames HSR to ESR accordingly. This shouldn't cause any functional changes: * Rename kvm_vcpu_get_hsr() to kvm_vcpu_get_esr() to make the function names self-explanatory. * Rename variables from @hsr to @esr to make them self-explanatory. Note that the renaming on uapi and tracepoint will cause ABI changes, which we should avoid. Specificly, there are 4 related source files in this regard: * arch/arm64/include/uapi/asm/kvm.h (struct kvm_debug_exit_arch::hsr) * arch/arm64/kvm/handle_exit.c (struct kvm_debug_exit_arch::hsr) * arch/arm64/kvm/trace_arm.h (tracepoints) * arch/arm64/kvm/trace_handle_exit.h (tracepoints) Signed-off-by: Gavin Shan Signed-off-by: Marc Zyngier Acked-by: Andrew Scull Link: https://lore.kernel.org/r/20200630015705.103366-1-gshan@redhat.com commit 8286de7c9951168b777570aeb46693ced9178fb6 Author: Randy Dunlap Date: Fri Jul 3 14:43:25 2020 -0700 Documentation: filesystems: vfs: drop doubled words Drop the doubled words "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20200703214325.31036-11-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit f4fd0ba8799880d23a9589a75922580e0cb97abd Author: Randy Dunlap Date: Fri Jul 3 14:43:24 2020 -0700 Documentation: filesystems: sysfs-tagging: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20200703214325.31036-10-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 9b123556b865537bab08a95741172ccfefa4f85a Author: Randy Dunlap Date: Fri Jul 3 14:43:23 2020 -0700 Documentation: filesystems: path-lookup: drop doubled word Drop the doubled word "to". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20200703214325.31036-9-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit f7eb0de7280d73b66ba90f96f9513173c89ee062 Author: Randy Dunlap Date: Fri Jul 3 14:43:22 2020 -0700 Documentation: filesystems: overlayfs: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Miklos Szeredi Cc: linux-unionfs@vger.kernel.org Link: https://lore.kernel.org/r/20200703214325.31036-8-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit d483fa04fd2298c91d22fee13265004c9b883b59 Author: Randy Dunlap Date: Fri Jul 3 14:43:21 2020 -0700 Documentation: filesystems: mount_api: drop doubled word Drop the doubled word "struct". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20200703214325.31036-7-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 59bc120ecd4f991f6c44d43ea3486b2d79644032 Author: Randy Dunlap Date: Fri Jul 3 14:43:20 2020 -0700 Documentation: filesystems: fsverity: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Eric Biggers Cc: Theodore Y. Ts'o Cc: linux-fscrypt@vger.kernel.org Link: https://lore.kernel.org/r/20200703214325.31036-6-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 2f32295ceed714bb51259f34aa8090ecb7174459 Author: Randy Dunlap Date: Fri Jul 3 14:43:19 2020 -0700 Documentation: filesystems: directory-locking: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20200703214325.31036-5-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 58c8e97dac35cd5b67258adf02e2971351ec2bde Author: Randy Dunlap Date: Fri Jul 3 14:43:18 2020 -0700 Documentation: filesystems: configfs: drop doubled word Drop the doubled word "be". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Joel Becker Cc: Christoph Hellwig Link: https://lore.kernel.org/r/20200703214325.31036-4-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 11166459ed08509d735db84fe02f125fef1b0dd7 Author: Randy Dunlap Date: Fri Jul 3 14:43:17 2020 -0700 Documentation: filesystems: caching/operations: drop doubled word Drop the doubled word "be". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: David Howells Cc: linux-cachefs@redhat.com Link: https://lore.kernel.org/r/20200703214325.31036-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 612176a4a2d76a3e885a97b89c1aabac7521dc1e Author: Randy Dunlap Date: Fri Jul 3 14:43:16 2020 -0700 Documentation: filesystems: autofs-mount-control: drop doubled words Drop the doubled words "the" and "and". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Ian Kent Cc: autofs@vger.kernel.org Link: https://lore.kernel.org/r/20200703214325.31036-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit a962eb9a6bdd44aed39c801fd6756f57381bba67 Author: Randy Dunlap Date: Fri Jul 3 14:29:05 2020 -0700 Documentation: virt: kvm/s390-pv: drop doubled words Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Paolo Bonzini Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20200703212906.30655-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 3747c5d3c8f0213508ac323c0f85cc16eeabab71 Author: Randy Dunlap Date: Fri Jul 3 14:29:06 2020 -0700 Documentation: virt: kvm/api: drop doubled words Drop multiple doubled words. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Paolo Bonzini Cc: kvm@vger.kernel.org Link: https://lore.kernel.org/r/20200703212906.30655-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit a13a9956da6066eea922dd3b7af038e69a0685ca Author: Randy Dunlap Date: Fri Jul 3 14:24:53 2020 -0700 Documentation: trace/stm: drop doubled words Change "and and" to "and an". Fix spello of "example". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Steven Rostedt Cc: Ingo Molnar Cc: Alexander Shishkin Link: https://lore.kernel.org/r/20200703212453.30553-4-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 2e171403c57f825fa1ae49ac7da9dfc222677c6d Author: Randy Dunlap Date: Fri Jul 3 14:24:52 2020 -0700 Documentation: trace/histogram-design: drop doubled words Drop the doubled words "to" and "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Steven Rostedt Cc: Ingo Molnar Link: https://lore.kernel.org/r/20200703212453.30553-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 1747db54f8a73e2069c3092a6a17ab30a25a0f0b Author: Randy Dunlap Date: Fri Jul 3 14:24:51 2020 -0700 Documentation: trace/ftrace: drop doubled words Drop the doubled words "for" and "that". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Steven Rostedt Cc: Ingo Molnar Link: https://lore.kernel.org/r/20200703212453.30553-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit abccb9d93a16bd39e002012204481297a18fa4a0 Author: Randy Dunlap Date: Fri Jul 3 14:21:56 2020 -0700 Documentation: PCI: pci.rst: drop doubled words Drop the doubled word "when". Signed-off-by: Randy Dunlap Acked-by: Mike Rapoport Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Link: https://lore.kernel.org/r/20200703212156.30453-5-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 84520c02026174f2db61d40d461b3b0e4a890ea8 Author: Randy Dunlap Date: Fri Jul 3 14:21:55 2020 -0700 Documentation: PCI: pci-error-recovery: drop doubled words Drop the doubled word "the". Signed-off-by: Randy Dunlap Acked-by: Mike Rapoport Acked-by: Linas Vepstas Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Bjorn Helgaas Cc: Linas Vepstas Cc: linux-pci@vger.kernel.org Link: https://lore.kernel.org/r/20200703212156.30453-4-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 4ef7f74e3c15a6aeac8d506c0bc627e959192ff3 Author: Randy Dunlap Date: Fri Jul 3 14:21:54 2020 -0700 Documentation: PCI: pci-endpoint: drop doubled words Drop the doubled word "the". Signed-off-by: Randy Dunlap Acked-by: Mike Rapoport Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Bjorn Helgaas Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: linux-pci@vger.kernel.org Link: https://lore.kernel.org/r/20200703212156.30453-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit e1abd44ea1211beb27190ea872c6f729fe06ee8b Author: Randy Dunlap Date: Fri Jul 3 14:21:53 2020 -0700 Documentation: PCI: pci-endpoint-cfs: drop doubled words Drop the doubled word "and". Signed-off-by: Randy Dunlap Acked-by: Mike Rapoport Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Bjorn Helgaas Cc: Kishon Vijay Abraham I Cc: Lorenzo Pieralisi Cc: linux-pci@vger.kernel.org Link: https://lore.kernel.org/r/20200703212156.30453-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 8c046cdd075d3a38d4122774655e72975a7df3a5 Author: Randy Dunlap Date: Fri Jul 3 13:51:10 2020 -0700 Documentation: arm64/sve: drop duplicate words Drop the doubled word "for". Signed-off-by: Randy Dunlap Acked-by: Mike Rapoport Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: Dave Martin Link: https://lore.kernel.org/r/20200703205110.29873-4-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 47a8b74edc7de6d0d0b7278e1773a0c7940fadb1 Author: Randy Dunlap Date: Fri Jul 3 13:51:09 2020 -0700 Documentation: arm64/acpi_object_usage: drop duplicate words Drop the doubled word "and". Signed-off-by: Randy Dunlap Acked-by: Mike Rapoport Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Lorenzo Pieralisi Cc: Hanjun Guo Cc: Sudeep Holla Cc: linux-acpi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20200703205110.29873-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 66ececcc473e5d82e461529d869dda7c3fc0e59b Author: Randy Dunlap Date: Fri Jul 3 13:51:08 2020 -0700 Documentation: arm64/arm-acpi: drop duplicate words Drop the doubled word "the". Signed-off-by: Randy Dunlap Acked-by: Mike Rapoport Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Lorenzo Pieralisi Cc: Hanjun Guo Cc: Sudeep Holla Cc: linux-acpi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20200703205110.29873-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 1b932b7dce578aba5ea1a91d4a3330917b67080b Author: Eric Sandeen Date: Mon Jun 29 14:08:09 2020 -0500 doc: cgroup: add f2fs and xfs to supported list for writeback f2fs and xfs have both added support for cgroup writeback: 578c647 f2fs: implement cgroup writeback support adfb5fb xfs: implement cgroup aware writeback so add them to the supported list in the docs. Signed-off-by: Eric Sandeen Link: https://lore.kernel.org/r/c8271324-9132-388c-5242-d7699f011892@redhat.com Signed-off-by: Jonathan Corbet commit 1cb3863af6b06fe2b45ce9e5b0491f0ffee54e93 Author: Luc Van Oostenryck Date: Mon Jun 29 18:13:10 2020 +0200 doc: add link to sparse's home page/internal docs Sparse's home page used to be a wiki (sparse.wiki.kernel.org) but this wiki only contained a short intro and the release notes. But nowadays, sparse's main page is sparse.docs.kernel.org, which contains all what was in the wiki but also other documentation, mainly oriented about sparse's internals. So, add a link to this in the kernel documentation. Signed-off-by: Luc Van Oostenryck Acked-by: Mike Rapoport Link: https://lore.kernel.org/r/20200629161310.89783-1-luc.vanoostenryck@gmail.com Signed-off-by: Jonathan Corbet commit 6f3bc22bf5e64d470e1155f1aa8f9893fe37e082 Author: Alexander A. Klimov Date: Sat Jun 27 12:31:38 2020 +0200 Replace HTTP links with HTTPS ones: LVM Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200627103138.71885-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 02030eb73d09bbb9cf81360fcdfbf67050b967ba Author: Jonathan Corbet Date: Sun Jul 5 14:25:46 2020 -0600 docs: CIFS: remove a spam-site URL protocolfreedom.org may have one contained something useful, but now it wants to sell us new credit cards. Take it out. Signed-off-by: Jonathan Corbet commit cba22b1c5945696d01635ffb001443974f98bcd4 Author: Alexander A. Klimov Date: Sat Jun 27 12:31:25 2020 +0200 Replace HTTP links with HTTPS ones: CIFS Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Reviewed-by: Aurelien Aptel Link: https://lore.kernel.org/r/20200627103125.71828-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit c0ad0befed93a6f567edb230954b744d4926cafa Author: Alexander A. Klimov Date: Sat Jun 27 12:31:11 2020 +0200 Replace HTTP links with HTTPS ones: DRBD driver Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200627103111.71771-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 3839a7460721b87501134697b7b90c45dcc7825d Author: Tobias Klauser Date: Sat Jun 27 11:23:00 2020 +0200 Documentation/features: Add kcov Add an arch support status file for kcov (ARCH_HAS_KCOV). Signed-off-by: Tobias Klauser Link: https://lore.kernel.org/r/20200627092300.29438-1-tklauser@distanz.ch Signed-off-by: Jonathan Corbet commit 4641961cff2f4202d3a01e8cd6b38f0a4e04ad36 Author: Tobias Klauser Date: Sat Jun 27 11:15:10 2020 +0200 Documentation/features: Add kmemleak Replace the manually curated list for supported archs in Documentation/dev-tools/kmemleak.rst by a Documentation/features entry. Signed-off-by: Tobias Klauser Link: https://lore.kernel.org/r/20200627091510.28210-1-tklauser@distanz.ch Signed-off-by: Jonathan Corbet commit 6b2484e13a52e9836e67e89cadc6189c40c8ae8c Author: Alexander A. Klimov Date: Sat Jun 27 09:29:35 2020 +0200 Replace HTTP links with HTTPS ones: Documentation/admin-guide Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200627072935.62652-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 3e28c5ca1dc6de5f1735bf87a0634d6fb4357778 Author: Manbing Date: Tue Jun 30 11:53:55 2020 -0700 trace doc: correct names of varous tracing documents Some documents were converted from the plain text documentation to reStructuredText format; update references to match. Signed-off-by: Manbing Link: https://lore.kernel.org/r/20200630185356.3467-1-manbing3@gmail.com Signed-off-by: Jonathan Corbet commit 453a969bfb11a57768d8bd4875f0ae0ca1e54a17 Author: Konstantin Khlebnikov Date: Wed Jul 1 14:58:11 2020 +0300 mailmap: add entry for obsolete email address Map old corporate email address @yandex-team.ru to stable private address. Signed-off-by: Konstantin Khlebnikov Link: https://lore.kernel.org/r/159360469186.24918.10108157093572183535.stgit@zurg Signed-off-by: Jonathan Corbet commit 7d087d02cff184fd340cfdaaf06e3b9c3e54a0dd Author: Randy Dunlap Date: Wed Jul 1 12:17:32 2020 -0700 Documentation: Coccinelle: fix various typos etc. Fix various typos etc. in dev-tools/coccinelle.rst: - punctuation, grammar, wording Signed-off-by: Randy Dunlap Acked-by: Julia Lawall Link: https://lore.kernel.org/r/def28907-18b9-5b7a-e743-79b0418c946c@infradead.org Signed-off-by: Jonathan Corbet commit 7303515ae488ce767d3155358bae505dabd9ebe1 Author: Kees Cook Date: Fri Jul 3 10:44:22 2020 -0700 Documentation: Clarify f_cred vs current_cred() use When making access control choices from a file-based context, f_cred must be used instead of current_cred() to avoid confused deputy attacks where an open file may get passed to a more privileged process. Add a short paragraph to explicitly state the rationale. Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/202007031038.8833A35DE4@keescook Signed-off-by: Jonathan Corbet commit 559394d3045ec31d0812fac3d6d603bfcb30f2ac Author: Randy Dunlap Date: Fri Jul 3 20:20:20 2020 -0700 Documentation/admin-guide: xfs: drop doubled word Drop the doubled word "for". Signed-off-by: Randy Dunlap Reviewed-by: Darrick J. Wong Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Darrick J. Wong Cc: linux-xfs@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-14-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 1943b35e44ee98e470ae08d2ea017283a0c5c24f Author: Randy Dunlap Date: Fri Jul 3 20:20:19 2020 -0700 Documentation/admin-guide: tainted-kernels: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-13-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit ee74db082abf8f4ce2ef534da4ed8950de21ae29 Author: Randy Dunlap Date: Fri Jul 3 20:20:18 2020 -0700 Documentation/admin-guide: sysctl/kernel: drop doubled word Drop the doubled word "set". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-12-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit b45225b41a98e9ad44c9a80886a204aeff34e392 Author: Randy Dunlap Date: Fri Jul 3 20:20:17 2020 -0700 Documentation/admin-guide: intel-speed-select: drop doubled words Drop the doubled words "that" and "and". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Srinivas Pandruvada Cc: platform-driver-x86@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-11-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 4d7e204f7ddccf577992c046d4a36fd0e49b6524 Author: Randy Dunlap Date: Fri Jul 3 20:20:16 2020 -0700 Documentation/admin-guide: intel_pstate: drop doubled word Drop the doubled word "to". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Srinivas Pandruvada Cc: Len Brown Cc: linux-pm@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-10-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 251c99bb399f253e6a8c633299d47aadb09aa110 Author: Randy Dunlap Date: Fri Jul 3 20:20:15 2020 -0700 Documentation/admin-guide: arm-ccn: drop doubled word Drop the doubled word "as". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-9-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit e70cc7122d8ebf919628de6c2d7bb69fff05d176 Author: Randy Dunlap Date: Fri Jul 3 20:20:14 2020 -0700 Documentation/admin-guide: pnfs-scsi-server: drop doubled word Drop the doubled word "with". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-8-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 838f9bc02fee68185c1c6e667d6a7ab0eb5948a1 Author: Randy Dunlap Date: Fri Jul 3 20:20:13 2020 -0700 Documentation/admin-guide: pnfs-block-server: drop doubled word Drop the doubled word "with". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-7-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit b32dae55bc6888eef89845ff96dccf4876ea9c00 Author: Randy Dunlap Date: Fri Jul 3 20:20:12 2020 -0700 Documentation/admin-guide: mm/ksm: drop doubled word Drop the doubled word "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Andrew Morton Cc: linux-mm@kvack.org Link: https://lore.kernel.org/r/20200704032020.21923-6-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 0136405fa4a50cc3b3d613283a1101d6349b7e99 Author: Randy Dunlap Date: Fri Jul 3 20:20:11 2020 -0700 Documentation/admin-guide: media/building: drop doubled words Drop some doubled words. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-5-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 4e578ba60c0cbb03801bf1acdfa6bf2e394a2afa Author: Randy Dunlap Date: Fri Jul 3 20:20:10 2020 -0700 Documentation/admin-guide: dm-integrity: drop doubled words Drop the doubled words "on" and "the". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: dm-devel@redhat.com Link: https://lore.kernel.org/r/20200704032020.21923-4-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 80466139b218d5c862e4a3e304157b183a56f36b Author: Randy Dunlap Date: Fri Jul 3 20:20:09 2020 -0700 Documentation/admin-guide: cgroup-v1/rdma: drop doubled word Drop the doubled word "echo". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: cgroups@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit aefea4668b21d0172919d4b1e54b9c081dd65033 Author: Randy Dunlap Date: Fri Jul 3 20:20:08 2020 -0700 Documentation/admin-guide: cgroup-v2: drop doubled word Drop the doubled word "of". Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: cgroups@vger.kernel.org Link: https://lore.kernel.org/r/20200704032020.21923-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 95fa0ba83e66dea0d3af48ad69842ae8c1dd9af2 Author: Peng Hao Date: Wed Jul 1 08:07:09 2020 -0400 KVM: arm64: Drop long gone function parameter documentation update_vmid() just has one parameter "vmid".The other parameter "kvm" is no longer used. Signed-off-by: Peng Hao Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200701120709.388377-1-richard.peng@oppo.com commit 731532176716e2775a5d21115bb9c5c61e0cb704 Author: Alexander Graf Date: Wed Jul 1 16:02:06 2020 +0200 KVM: arm64: vgic-its: Change default outer cacheability for {PEND, PROP}BASER PENDBASER and PROPBASER define the outer caching mode for LPI tables. The memory backing them may not be outer sharable, so we mark them as nC by default. This however, breaks Windows on ARM which only accepts SameAsInner or RaWaWb as values for outer cachability. We do today already allow the outer mode to be set to SameAsInner explicitly, so the easy fix is to default to that instead of nC for situations when an OS asks for a not fulfillable cachability request. This fixes booting Windows in KVM with vgicv3 and ITS enabled for me. Signed-off-by: Alexander Graf Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200701140206.8664-1-graf@amazon.com commit f9a026e3d38ba81cd274725f1caaf64322a86aa5 Author: David Brazdil Date: Thu Jun 25 14:14:20 2020 +0100 KVM: arm64: Lift instrumentation restrictions on VHE With VHE and nVHE executable code completely separated, remove build config that disabled GCOV/KASAN/UBSAN/KCOV instrumentation for VHE as these now execute under the same memory mappings as the rest of the kernel. No violations are currently being reported by either KASAN or UBSAN. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-16-dbrazdil@google.com commit c50cb04303cb88c517715b078e3e010c024af1a5 Author: David Brazdil Date: Thu Jun 25 14:14:19 2020 +0100 KVM: arm64: Remove __hyp_text macro, use build rules instead With nVHE code now fully separated from the rest of the kernel, the effects of the __hyp_text macro (which had to be applied on all nVHE code) can be achieved with build rules instead. The macro used to: (a) move code to .hyp.text ELF section, now done by renaming .text using `objcopy`, and (b) `notrace` and `__noscs` would negate effects of CC_FLAGS_FTRACE and CC_FLAGS_SCS, respectivelly, now those flags are erased from KBUILD_CFLAGS (same way as in EFI stub). Note that by removing __hyp_text from code shared with VHE, all VHE code is now compiled into .text and without `notrace` and `__noscs`. Use of '.pushsection .hyp.text' removed from assembly files as this is now also covered by the build rules. For MAINTAINERS: if needed to re-run, uses of macro were removed with the following command. Formatting was fixed up manually. find arch/arm64/kvm/hyp -type f -name '*.c' -o -name '*.h' \ -exec sed -i 's/ __hyp_text//g' {} + Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-15-dbrazdil@google.com commit c04dd455eb311d2d289c9d81d080eaf11a06cebf Author: David Brazdil Date: Thu Jun 25 14:14:18 2020 +0100 KVM: arm64: Compile remaining hyp/ files for both VHE/nVHE The following files in hyp/ contain only code shared by VHE/nVHE: vgic-v3-sr.c, aarch32.c, vgic-v2-cpuif-proxy.c, entry.S, fpsimd.S Compile them under both configurations. Deletions in image-vars.h reflect eliminated dependencies of nVHE code on the rest of the kernel. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-14-dbrazdil@google.com commit 9aebdea494b5d2d5fe0ba54d71e9d6c5acfe76b4 Author: David Brazdil Date: Thu Jun 25 14:14:17 2020 +0100 KVM: arm64: Duplicate hyp/timer-sr.c for VHE/nVHE timer-sr.c contains a HVC handler for setting CNTVOFF_EL2 and two helper functions for controlling access to physical counter. The former is used by both VHE/nVHE and is duplicated, the latter are used only by nVHE and moved to nvhe/timer-sr.c. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-13-dbrazdil@google.com commit 13aeb9b400c5d7c5e979fdbbf994c787487f7889 Author: David Brazdil Date: Thu Jun 25 14:14:16 2020 +0100 KVM: arm64: Split hyp/sysreg-sr.c to VHE/nVHE sysreg-sr.c contains KVM's code for saving/restoring system registers, with some code shared between VHE/nVHE. These common routines are moved to a header file, VHE-specific code is moved to vhe/sysreg-sr.c and nVHE-specific code to nvhe/sysreg-sr.c. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-12-dbrazdil@google.com commit d400c5b2025c9aeca76213d6bd4138ec39da5cef Author: David Brazdil Date: Thu Jun 25 14:14:15 2020 +0100 KVM: arm64: Split hyp/debug-sr.c to VHE/nVHE debug-sr.c contains KVM's code for context-switching debug registers, with some code shared between VHE/nVHE. These common routines are moved to a header file, VHE-specific code is moved to vhe/debug-sr.c and nVHE-specific code to nvhe/debug-sr.c. Functions are slightly refactored to move code hidden behind `has_vhe()` checks to the corresponding .c files. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-11-dbrazdil@google.com commit 09cf57eba304246141367b95c89801fd2047ac96 Author: David Brazdil Date: Thu Jun 25 14:14:14 2020 +0100 KVM: arm64: Split hyp/switch.c to VHE/nVHE switch.c implements context-switching for KVM, with large parts shared between VHE/nVHE. These common routines are moved to a header file, VHE-specific code is moved to vhe/switch.c and nVHE-specific code is moved to nvhe/switch.c. Previously __kvm_vcpu_run needed a different symbol name for VHE/nVHE. This is cleaned up and the caller in arm.c simplified. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-10-dbrazdil@google.com commit e03fa29164ec1db1a81dc0168d0017a9e0366c7c Author: David Brazdil Date: Thu Jun 25 14:14:13 2020 +0100 KVM: arm64: Duplicate hyp/tlb.c for VHE/nVHE tlb.c contains code for flushing the TLB, with code shared between VHE/nVHE. Because common code is small, duplicate tlb.c and specialize each copy for VHE/nVHE. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-9-dbrazdil@google.com commit 208243c752a7eeef4236f7b7d67e806ee356e3f8 Author: Andrew Scull Date: Thu Jun 25 14:14:12 2020 +0100 KVM: arm64: Move hyp-init.S to nVHE hyp-init.S contains the identity mapped initialisation code for the non-VHE code that runs at EL2. It is only used for non-VHE. Adjust code that calls into this to use the prefixed symbol name. Signed-off-by: Andrew Scull Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-8-dbrazdil@google.com commit b877e9849d41e7d2100d2933e0a3971d0ddec011 Author: David Brazdil Date: Thu Jun 25 14:14:11 2020 +0100 KVM: arm64: Build hyp-entry.S separately for VHE/nVHE hyp-entry.S contains implementation of KVM hyp vectors. This code is mostly shared between VHE/nVHE, therefore compile it under both VHE and nVHE build rules. nVHE-specific host HVC handler is hidden behind __KVM_NVHE_HYPERVISOR__. Adjust code which selects which KVM hyp vecs to install to choose the correct VHE/nVHE symbol. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-7-dbrazdil@google.com commit f50b6f6ae131b6ee7d5dd738961eda0c00b7f027 Author: Andrew Scull Date: Thu Jun 25 14:14:10 2020 +0100 KVM: arm64: Handle calls to prefixed hyp functions Once hyp functions are moved to a hyp object, they will have prefixed symbols. This change declares and gets the address of the prefixed version for calls to the hyp functions. To aid migration, the hyp functions that have not yet moved have their prefixed versions aliased to their non-prefixed version. This begins with all the hyp functions being listed and will reduce to none of them once the migration is complete. Signed-off-by: Andrew Scull [David: Extracted kvm_call_hyp nVHE branches into own helper macros, added comments around symbol aliases.] Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-6-dbrazdil@google.com commit 53b671128bd7f9ea41ae1a06106d88eb4cf66623 Author: David Brazdil Date: Thu Jun 25 14:14:09 2020 +0100 KVM: arm64: Use build-time defines in has_vhe() Build system compiles hyp code with macros specifying if the code belongs to VHE or nVHE. Use these macros to evaluate has_vhe() at compile time. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-5-dbrazdil@google.com commit 7621712918ad4f5e6356193d9058debf657a6254 Author: David Brazdil Date: Thu Jun 25 14:14:08 2020 +0100 KVM: arm64: Add build rules for separate VHE/nVHE object files Add new folders arch/arm64/kvm/hyp/{vhe,nvhe} and Makefiles for building code that runs in EL2 under VHE/nVHE KVM, repsectivelly. Add an include folder for hyp-specific header files which will include code common to VHE/nVHE. Build nVHE code with -D__KVM_NVHE_HYPERVISOR__, VHE code with -D__KVM_VHE_HYPERVISOR__. Under nVHE compile each source file into a `.hyp.tmp.o` object first, then prefix all its symbols with "__kvm_nvhe_" using `objcopy` and produce a `.hyp.o`. Suffixes were chosen so that it would be possible for VHE and nVHE to share some source files, but compiled with different CFLAGS. The nVHE ELF symbol prefix is added to kallsyms.c as ignored. EL2-only symbols will never appear in EL1 stack traces. Due to symbol prefixing, add a section in image-vars.h for aliases of symbols that are defined in nVHE EL2 and accessed by kernel in EL1 or vice versa. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-4-dbrazdil@google.com commit 7b2399ea5640b2e5f576af08b91091a26f240ea4 Author: David Brazdil Date: Thu Jun 25 14:14:07 2020 +0100 KVM: arm64: Move __smccc_workaround_1_smc to .rodata This snippet of assembly is used by cpu_errata.c to overwrite parts of KVM hyp vector. Move it to its own source file and change its ELF section to .rodata. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-3-dbrazdil@google.com commit b38b298aa4397e2dc74a89b4dd3eac9e59b64c96 Author: David Brazdil Date: Thu Jun 25 14:14:06 2020 +0100 KVM: arm64: Fix symbol dependency in __hyp_call_panic_nvhe __hyp_call_panic_nvhe contains inline assembly which did not declare its dependency on the __hyp_panic_string symbol. The static-declared string has previously been kept alive because of a use in __hyp_call_panic_vhe. Fix this in preparation for separating the source files between VHE and nVHE when the two users land in two different compilation units. The static variable otherwise gets dropped when compiling the nVHE source file, causing an undefined symbol linker error later. Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200625131420.71444-2-dbrazdil@google.com commit 750ed56693803e992ed09ac9c46e07226dd4d350 Author: James Morse Date: Mon Jun 22 11:33:17 2020 +0000 KVM: arm64: Remove the target table Finally, remove the target table. Merge the code that checks the tables into kvm_reset_sys_regs() as there is now only one table. Signed-off-by: James Morse Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200622113317.20477-6-james.morse@arm.com commit dcaffa7bf911578a6d69165d712501996c587fbe Author: James Morse Date: Mon Jun 22 11:33:16 2020 +0000 KVM: arm64: Remove target_table from exit handlers Whenever KVM searches for a register (e.g. due to a guest exit), it works with two tables, as the target table overrides the sys_regs array. Now that everything is in the sys_regs array, and the target table is empty, stop doing that. Remove the second table and its size from all the functions that take it. Signed-off-by: James Morse Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200622113317.20477-5-james.morse@arm.com commit af4738290d9dfe3787f60e40f709a4f78a115943 Author: James Morse Date: Mon Jun 22 11:33:15 2020 +0000 KVM: arm64: Move ACTLR_EL1 emulation to the sys_reg_descs array The only entry in the genericv8_sys_regs arrays is for emulation of ACTLR_EL1. As all targets emulate this in the same way, move it to sys_reg_descs[]. Signed-off-by: James Morse Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200622113317.20477-4-james.morse@arm.com commit 04343ae312ef0d80d601ea1b784b6b039ae9c82a Author: James Morse Date: Mon Jun 22 11:33:14 2020 +0000 KVM: arm64: Tolerate an empty target_table list Before emptying the target_table lists, and then removing their infrastructure, add some tolerance to an empty list. Instead of bugging-out on an empty list, pretend we already reached the end in the two-list-walk. Signed-off-by: James Morse Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200622113317.20477-3-james.morse@arm.com commit 6b33e0d64f8501b51d32069e08d3ed68c58c25b4 Author: James Morse Date: Mon Jun 22 11:33:13 2020 +0000 KVM: arm64: Drop the target_table[] indirection KVM for 32bit arm had a get/set target mechanism to allow for micro-architecture differences that are visible in system registers to be described. KVM's user-space can query the supported targets for a CPU, and create vCPUs for that target. The target can override the handling of system registers to provide different reset or RES0 behaviour. On 32bit arm this was used to provide different ACTLR reset values for A7 and A15. On 64bit arm, the first few CPUs out of the gate used this mechanism, before it was deemed redundant in commit bca556ac468a ("arm64/kvm: Add generic v8 KVM target"). All future CPUs use the KVM_ARM_TARGET_GENERIC_V8 target. The 64bit target_table[] stuff exists to preserve the ABI to user-space. As all targets registers genericv8_target_table, there is no reason to look the target up. Until we can merge genericv8_target_table with the main sys_regs array, kvm_register_target_sys_reg_table() becomes kvm_check_target_sys_reg_table(), which uses BUG_ON() in keeping with the other callers in this file. Signed-off-by: James Morse Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200622113317.20477-2-james.morse@arm.com commit 2da3ffa6e840b9f8fc65a71326c43b716992861d Author: Andrew Scull Date: Thu Jun 18 10:36:16 2020 +0100 arm64: kvm: Remove kern_hyp_va from get_vcpu_ptr get_vcpu_ptr is an assembly accessor for the percpu value kvm_host_data->host_ctxt.__hyp_running_vcpu. kern_hyp_va only applies to nVHE however __hyp_running_vcpu is always assigned a pointer that has already had kern_hyp_va applied in __kvm_vcpu_run_nvhe. kern_hyp_va is currently idempotent as it just masks and inserts the tag, but this could change in future and the second application is unnecessary. Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Reviewed-by: James Morse Link: https://lore.kernel.org/r/20200618093616.164413-1-ascull@google.com commit a47dee5513cd7b6d1e20dfecd458363f24a19cdc Author: Marc Zyngier Date: Mon May 25 09:45:21 2020 +0100 KVM: arm64: Allow in-atomic injection of SPIs On a system that uses SPIs to implement MSIs (as it would be the case on a GICv2 system exposing a GICv2m to its guests), we deny the possibility of injecting SPIs on the in-atomic fast-path. This results in a very large amount of context-switches (roughly equivalent to twice the interrupt rate) on the host, and suboptimal performance for the guest (as measured with a test workload involving a virtio interface backed by vhost-net). Given that GICv2 systems are usually on the low-end of the spectrum performance wise, they could do without the aggravation. We solved this for GICv3+ITS by having a translation cache. But SPIs do not need any extra infrastructure, and can be immediately injected in the virtual distributor as the locking is already heavy enough that we don't need to worry about anything. This halves the number of context switches for the same workload. Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier commit 0a7f99aad259d223ce69c03e792c7e2bfcf8c2c6 Author: Heiko Stuebner Date: Fri Jul 3 17:49:48 2020 +0200 clk: rockchip: use separate compatibles for rk3288w-cru Commit 1627f683636d ("clk: rockchip: Handle clock tree for rk3288w variant") added the check for rk3288w-specific clock-tree changes but in turn would require a double-compatible due to re-using the main rockchip,rk3288-cru compatible as entry point. The binding change actually describes the compatibles as one or the other so adapt the code accordingly and add a real second entry-point for the clock controller. Signed-off-by: Heiko Stuebner Reviewed-by: Ezequiel Garcia Reviewed-by: Jagan Teki Tested-by: Jagan Teki # rock-pi-n8 Link: https://lore.kernel.org/r/20200703154948.260369-1-heiko@sntech.de commit e1f04670440442b6218b391b5f822819fb3b8c6f Merge: b20a6b29a811b 7ada9a5e48e57 Author: David S. Miller Date: Sat Jul 4 18:02:06 2020 -0700 Merge branch 'qlogic-use-generic-power-management' Vaibhav Gupta says: ==================== qlogic: use generic power management Linux Kernel Mentee: Remove Legacy Power Management. The purpose of this patch series is to remove legacy power management callbacks from qlogic ethernet drivers. The callbacks performing suspend() and resume() operations are still calling pci_save_state(), pci_set_power_state(), etc. and handling the power management themselves, which is not recommended. The conversion requires the removal of the those function calls and change the callback definition accordingly and make use of dev_pm_ops structure. All patches are compile-tested only. V2: Fix unused variable warning in v1. ==================== Signed-off-by: David S. Miller commit 7ada9a5e48e57c3c7e5217c19a6719a85b07b0ba Author: Vaibhav Gupta Date: Thu Jul 2 22:31:43 2020 +0530 qlcninc: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and taking care of register states. And they use PCI helper functions to do it. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. .suspend() calls __qlcnic_shutdown, which then calls qlcnic_82xx_shutdown; .resume() calls __qlcnic_resume, which then calls qlcnic_82xx_resume; Both ...82xx..() are define in drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c and are used only in drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c. Hence upgrade them and remove PCI function calls, like pci_save_state() and pci_enable_wake(), inside them Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 063ad9bcc297c1f4cfd3a35a6a709b3fd52031f3 Author: Vaibhav Gupta Date: Thu Jul 2 22:31:42 2020 +0530 netxen_nic: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. And they use PCI helper functions to do it. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. In this driver: netxen_nic_resume() calls netxen_nic_attach_func() which then invokes PCI helper functions like pci_enable_device(), pci_set_power_state() and pci_restore_state(). Other function: - netxen_io_slot_reset() also calls netxen_nic_attach_func(). Also, netxen_io_slot_reset() returns specific value based on the return value of netxen_nic_attach_func() as whole. Thus, cannot simply move some piece of code from netxen_nic_attach_func() to it. Hence, define a new function netxen_nic_attach_late_func() to do the tasks which has to be done after PCI helper functions have done their job. Now, netxen_nic_attach_func() invokes netxen_nic_attach_late_func(), thus netxen_io_slot_reset() behaves normally. And, netxen_nic_resume() calls netxen_nic_attach_late_func() to avoid PCI helper functions calls. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit b20a6b29a811bee0e44b64958d415eb50436154c Author: Codrin Ciubotariu Date: Thu Jul 2 18:17:24 2020 +0300 net: dsa: microchip: remove unused private members Private structure members live_ports, on_ports, rx_ports, tx_ports are initialized but not used anywhere. Let's remove them. Suggested-by: Russell King Signed-off-by: Codrin Ciubotariu Signed-off-by: David S. Miller commit 143a102e3090532a624d25429b79284caa59ce9f Author: Codrin Ciubotariu Date: Thu Jul 2 18:17:23 2020 +0300 net: dsa: microchip: split adjust_link() in phylink_mac_link_{up|down}() The DSA subsystem moved to phylink and adjust_link() became deprecated in the process. This patch removes adjust_link from the KSZ DSA switches and adds phylink_mac_link_up() and phylink_mac_link_down(). Signed-off-by: Codrin Ciubotariu Reviewed-by: Russell King Signed-off-by: David S. Miller commit bdd2ed272151d89f8dc81a5a4046e3f8273b970d Merge: f551e2fdaf81b c9b95a1359875 Author: David S. Miller Date: Sat Jul 4 17:56:22 2020 -0700 Merge branch 'mptcp-add-REUSEADDR-REUSEPORT-V6ONLY-setsockopt-support' Florian Westphal says: ==================== mptcp: add REUSEADDR/REUSEPORT/V6ONLY setsockopt support restarting an mptcp-patched sshd yields following error: sshd: error: Bind to port 22 on 0.0.0.0 failed: Address already in use. sshd: error: setsockopt IPV6_V6ONLY: Operation not supported sshd: error: Bind to port 22 on :: failed: Address already in use. sshd: fatal: Cannot bind any address. This series adds support for the needed setsockopts: First patch skips the generic SOL_SOCKET handler for MPTCP: in mptcp case, the setsockopt needs to alter the tcp socket, not the mptcp parent socket. Second patch adds minimal SOL_SOCKET support: REUSEPORT and REUSEADDR. Rest is still handled by the generic SOL_SOCKET code. Last patch adds IPV6ONLY support. This makes ipv6 work for openssh: It creates two listening sockets, before this patch, binding the ipv6 socket will fail because the port is already bound by the ipv4 one. ==================== Signed-off-by: David S. Miller commit c9b95a13598750e2840d99322f844ec0ff9e6246 Author: Florian Westphal Date: Sun Jul 5 01:30:17 2020 +0200 mptcp: support IPV6_V6ONLY setsockopt Without this, Opensshd fails to open an ipv6 socket listening socket: error: setsockopt IPV6_V6ONLY: Operation not supported error: Bind to port 22 on :: failed: Address already in use. Opensshd opens an ipv4 and and ipv6 listening socket, but because IPV6_V6ONLY setsockopt fails, the port number is already in use. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit fd1452d8ef988d228f5265147fde1017084404e4 Author: Florian Westphal Date: Sun Jul 5 01:30:16 2020 +0200 mptcp: add REUSEADDR/REUSEPORT support This will e.g. make 'sshd restart' work when MPTCP is used, as we will now set this option on the listener socket instead of only the mptcp socket (where it has no effect). We still need to copy the setting to the master socket so that a subsequent getsockopt() returns the expected value. Reported-by: Christoph Paasch Suggested-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit 83f0c10bc36f956102ce4a33c5fe596ae9891297 Author: Florian Westphal Date: Sun Jul 5 01:30:15 2020 +0200 net: use mptcp setsockopt function for SOL_SOCKET on mptcp sockets setsockopt(mptcp_fd, SOL_SOCKET, ...)... appears to work (returns 0), but it has no effect -- this is because the MPTCP layer never has a chance to copy the settings to the subflow socket. Skip the generic handling for the mptcp case and instead call the mptcp specific handler instead for SOL_SOCKET too. Next patch adds more specific handling for SOL_SOCKET to mptcp. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller commit f551e2fdaf81b7b561bb5dc590da13f21c4c1295 Author: Tanner Love Date: Sat Jul 4 16:45:14 2020 -0400 selftests/net: update initializer syntax to use c99 designators Before, clang version 9 threw errors such as: error: use of GNU old-style field designator extension [-Werror,-Wgnu-designator] { tstamp: true, swtstamp: true } ^~~~~~~ .tstamp = Fix these warnings in tools/testing/selftests/net in the same manner as commit 121e357ac728 ("selftests/harness: Update named initializer syntax"). N.B. rxtimestamp.c is the only affected file in the directory. Signed-off-by: Tanner Love Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 565f499c6fad27e143e773758b568d3a3bc9d1ef Merge: f91c031e6528f a46665707144d Author: David S. Miller Date: Sat Jul 4 17:51:07 2020 -0700 Merge branch 'bnx2x-Perform-IdleChk-dump' Sudarsana Reddy Kalluru says: ==================== bnx2x: Perform IdleChk dump. Idlechk test verifies that the chip is in idle state. If there are any errors, Idlechk dump would capture the same. This data will help in debugging the device related issues. The patch series adds driver support for dumping IdleChk data during the debug dump collection. Patch (1) adds register definitions required in this implementation. Patch (2) adds the implementation for Idlechk tests. Patch (3) adds driver changes to invoke Idlechk implementation. Changes from previous version: ------------------------------- v3: Combined the test data creation and implementation to a single patch. v2: Addressed issues reported by kernel test robot. ==================== Signed-off-by: David S. Miller commit a46665707144d768ed4c9d4a6ed51edfd8cd7edf Author: Sudarsana Reddy Kalluru Date: Sat Jul 4 10:13:44 2020 +0530 bnx2x: Perform Idlechk dump during the debug collection. The patch adds driver changes to perform Idlechk dump during the debug data collection. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit cdf711f20b23087a96811e92f9600a9cf5ea23d6 Author: Sudarsana Reddy Kalluru Date: Sat Jul 4 10:13:43 2020 +0530 bnx2x: Add support for idlechk tests. This patch populates a database of idlechk tests (registers and predicates) and performs the idlechk using this data. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: David S. Miller commit 4365f35b12447118a1193b9a20e512da65034110 Author: Sudarsana Reddy Kalluru Date: Sat Jul 4 10:13:42 2020 +0530 bnx2x: Add Idlechk related register definitions. The patch adds register definitions required for Idlechk implementation. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit f91c031e6528f1656e7a1f76c98e3c1d7620820c Merge: 418e787e54a63 9ff79af333127 Author: David S. Miller Date: Sat Jul 4 17:48:34 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2020-07-04 The following pull-request contains BPF updates for your *net-next* tree. We've added 73 non-merge commits during the last 17 day(s) which contain a total of 106 files changed, 5233 insertions(+), 1283 deletions(-). The main changes are: 1) bpftool ability to show PIDs of processes having open file descriptors for BPF map/program/link/BTF objects, relying on BPF iterator progs to extract this info efficiently, from Andrii Nakryiko. 2) Addition of BPF iterator progs for dumping TCP and UDP sockets to seq_files, from Yonghong Song. 3) Support access to BPF map fields in struct bpf_map from programs through BTF struct access, from Andrey Ignatov. 4) Add a bpf_get_task_stack() helper to be able to dump /proc/*/stack via seq_file from BPF iterator progs, from Song Liu. 5) Make SO_KEEPALIVE and related options available to bpf_setsockopt() helper, from Dmitry Yakunin. 6) Optimize BPF sk_storage selection of its caching index, from Martin KaFai Lau. 7) Removal of redundant synchronize_rcu()s from BPF map destruction which has been a historic leftover, from Alexei Starovoitov. 8) Several improvements to test_progs to make it easier to create a shell loop that invokes each test individually which is useful for some CIs, from Jesper Dangaard Brouer. 9) Fix bpftool prog dump segfault when compiled without skeleton code on older clang versions, from John Fastabend. 10) Bunch of cleanups and minor improvements, from various others. ==================== Signed-off-by: David S. Miller commit a9d9fea74be285a2885d8f3395042cc4dde27e6a Author: Enric Balletbo i Serra Date: Mon Jun 15 22:31:08 2020 +0200 drm/mediatek: mtk_dsi: Create connector for bridges Use the drm_bridge_connector helper to create a connector for pipelines that use drm_bridge. This allows splitting connector operations across multiple bridges when necessary, instead of having the last bridge in the chain creating the connector and handling all connector operations internally. Signed-off-by: Enric Balletbo i Serra Acked-by: Sam Ravnborg Signed-off-by: Chun-Kuang Hu commit 2dd8075d21857b838f8223879f4b845e4a171fd4 Author: Enric Balletbo i Serra Date: Mon Jun 15 22:31:07 2020 +0200 drm/mediatek: mtk_dsi: Use the drm_panel_bridge API Replace the manual panel handling code by a drm_panel_bridge. This simplifies the driver and allows all components in the display pipeline to be treated as bridges, paving the way to generic connector handling. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Chun-Kuang Hu commit 45880ff08120dfc15bf1a841c5946dc9eb53240a Author: Enric Balletbo i Serra Date: Mon Jun 15 22:31:06 2020 +0200 drm/mediatek: mtk_dsi: Use simple encoder The mtk_dsi driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Chun-Kuang Hu commit 71e780f1158901a832ae1785f2e83221ab07f9d3 Author: Enric Balletbo i Serra Date: Mon Jun 15 22:31:05 2020 +0200 drm/mediatek: mtk_dsi: Convert to bridge driver Convert mtk_dsi to a bridge driver with built-in encoder support for compatibility with existing component drivers. Signed-off-by: Enric Balletbo i Serra Acked-by: Sam Ravnborg Signed-off-by: Chun-Kuang Hu commit 68a9e11b07f471cb4cdd08e7a8c21a5feb1f3271 Author: Enric Balletbo i Serra Date: Mon Jun 15 22:31:04 2020 +0200 drm/mediatek: mtk_dsi: Rename bridge to next_bridge This is really a cosmetic change just to make a bit more readable the code after convert the driver to drm_bridge. The bridge variable name will be used by the encoder drm_bridge, and the chained bridge will be named next_bridge. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Chun-Kuang Hu commit 714acdbd1c94e7e3ab90f6b6938f1ccb27b662f0 Author: Christian Brauner Date: Thu Jun 11 11:04:15 2020 +0200 arch: rename copy_thread_tls() back to copy_thread() Now that HAVE_COPY_THREAD_TLS has been removed, rename copy_thread_tls() back simply copy_thread(). It's a simpler name, and doesn't imply that only tls is copied here. This finishes an outstanding chunk of internal process creation work since we've added clone3(). Cc: linux-arch@vger.kernel.org Acked-by: Thomas Bogendoerfer A Acked-by: Stafford Horne Acked-by: Greentime Hu Acked-by: Geert Uytterhoeven A Reviewed-by: Kees Cook Signed-off-by: Christian Brauner commit 140c8180eb7c7cbda399f64474788b86db72db32 Author: Christian Brauner Date: Sun May 24 23:34:20 2020 +0200 arch: remove HAVE_COPY_THREAD_TLS All architectures support copy_thread_tls() now, so remove the legacy copy_thread() function and the HAVE_COPY_THREAD_TLS config option. Everyone uses the same process creation calling convention based on copy_thread_tls() and struct kernel_clone_args. This will make it easier to maintain the core process creation code under kernel/, simplifies the callpaths and makes the identical for all architectures. Cc: linux-arch@vger.kernel.org Acked-by: Thomas Bogendoerfer Acked-by: Greentime Hu Acked-by: Geert Uytterhoeven Reviewed-by: Kees Cook Signed-off-by: Christian Brauner commit 8496da092a5350cfcc1d9c518712e7b1b3848f18 Author: Christian Brauner Date: Sun May 24 23:29:27 2020 +0200 unicore: switch to copy_thread_tls() Use the copy_thread_tls() calling convention which passes tls through a register. This is required so we can remove the copy_thread{_tls}() split and remove the HAVE_COPY_THREAD_TLS macro. Cc: Guan Xuetao Signed-off-by: Christian Brauner commit 15350c4226c7a3cdce4f2feb0fb96ed0986cf9a5 Author: Christian Brauner Date: Sun May 24 23:26:47 2020 +0200 sh: switch to copy_thread_tls() Use the copy_thread_tls() calling convention which passes tls through a register. This is required so we can remove the copy_thread{_tls}() split and remove the HAVE_COPY_THREAD_TLS macro. Cc: Rich Felker Cc: Yoshinori Sato Cc: linux-sh@vger.kernel.org Signed-off-by: Christian Brauner commit 1dd966ea63f46b82ae9e367de22e3f8c70450fd5 Author: Christian Brauner Date: Sun May 24 23:20:53 2020 +0200 nds32: switch to copy_thread_tls() Use the copy_thread_tls() calling convention which passes tls through a register. This is required so we can remove the copy_thread{_tls}() split and remove the HAVE_COPY_THREAD_TLS macro. Cc: Greentime Hu Cc: Nick Hu Cc: Vincent Chen Signed-off-by: Christian Brauner commit ad1bb82c057ecebfdb0b619e023c57b425ef7e7e Author: Christian Brauner Date: Sun May 24 23:19:09 2020 +0200 microblaze: switch to copy_thread_tls() Use the copy_thread_tls() calling convention which passes tls through a register. This is required so we can remove the copy_thread{_tls}() split and remove the HAVE_COPY_THREAD_TLS macro. Cc: Michal Simek Signed-off-by: Christian Brauner commit 643d48b8e6e71a77214c8653003f2ecd9bc10f9e Author: Christian Brauner Date: Sun May 24 23:15:53 2020 +0200 hexagon: switch to copy_thread_tls() Use the copy_thread_tls() calling convention which passes tls through a register. This is required so we can remove the copy_thread{_tls}() split and remove the HAVE_COPY_THREAD_TLS macro. Cc: linux-hexagon@vger.kernel.org Acked-by: Brian Cain Signed-off-by: Christian Brauner commit e0daa22c292b5835a946716b9a2092b30c7d9d31 Author: Christian Brauner Date: Sun May 24 23:14:23 2020 +0200 c6x: switch to copy_thread_tls() Use the copy_thread_tls() calling convention which passes tls through a register. This is required so we can remove the copy_thread{_tls}() split and remove the HAVE_COPY_THREAD_TLS macro. CC: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Signed-off-by: Christian Brauner commit 0fdfc53f24cc460e93de57c014bc6e5460755073 Author: Christian Brauner Date: Sun May 24 21:39:53 2020 +0200 alpha: switch to copy_thread_tls() Use the copy_thread_tls() calling convention which passes tls through a register. This is required so we can remove the copy_thread{_tls}() split and remove the HAVE_COPY_THREAD_TLS macro. Cc: linux-alpha@vger.kernel.org Signed-off-by: Christian Brauner commit ff2a91127b374c75ae024b31d22f23ad49d16eb4 Author: Christian Brauner Date: Sun May 24 20:57:00 2020 +0200 fork: remove do_fork() Now that all architectures have been switched to use _do_fork() and the new struct kernel_clone_args calling convention we can remove the legacy do_fork() helper completely. The calling convention used to be brittle and do_fork() didn't buy us anything. The only calling convention accepted should be based on struct kernel_clone_args going forward. It's cleaner and uniform. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Al Viro Cc: "Matthew Wilcox (Oracle)" Cc: "Peter Zijlstra (Intel)" Signed-off-by: Christian Brauner commit adc7092e4c1a1d23fbfcf9b5905ec475c0084794 Author: Christian Brauner Date: Sat May 23 12:21:28 2020 +0200 h8300: select HAVE_COPY_THREAD_TLS, switch to kernel_clone_args This is part of a larger series that aims at getting rid of the copy_thread()/copy_thread_tls() split that makes the process creation codepaths in the kernel more convoluted and error-prone than they need to be. I'm converting all the remaining arches that haven't yet switched and am collecting individual acks. Once I have them, I'll send the whole series removing the copy_thread()/copy_thread_tls() split, the HAVE_COPY_THREAD_TLS define and the legacy do_fork() helper. The only kernel-wide process creation entry point for anything not going directly through the syscall path will then be based on struct kernel_clone_args. No more danger of weird process creation abi quirks between architectures hopefully, and easier to maintain overall. It also unblocks implementing clone3() on architectures not support copy_thread_tls(). Any architecture that wants to implement clone3() will need to select HAVE_COPY_THREAD_TLS and thus need to implement copy_thread_tls(). So both goals are connected but independently beneficial. HAVE_COPY_THREAD_TLS means that a given architecture supports CLONE_SETTLS and not setting it should usually mean that the architectures doesn't implement it but that's not how things are. In fact all architectures support CLONE_TLS it's just that they don't follow the calling convention that HAVE_COPY_THREAD_TLS implies. That means all architectures can be switched over to select HAVE_COPY_THREAD_TLS. Once that is done we can remove that macro (yay, less code), the unnecessary do_fork() export in kernel/fork.c, and also rename copy_thread_tls() back to copy_thread(). At this point copy_thread() becomes the main architecture specific part of process creation but it will be the same layout and calling convention for all architectures. (Once that is done we can probably cleanup each copy_thread() function even more but that's for the future.) Though h8300 doesn't not suppor the CLONE_SETTLS flag there's no reason to not switch to the copy_thread_tls() calling convention. As before CLONE_SETTLS with legacy clone will just be ignored. This brings us one step closer to getting rid of the copy_thread()/copy_thread_tls() split we still have and ultimately the HAVE_COPY_THREAD_TLS define in general. A lot of architectures have already converted and h8300 is one of the few hat haven't yet. This also unblocks implementing the clone3() syscall on h8300. Once that is done we can get of another ARCH_WANTS_* macro. Once Any architecture that supports HAVE_COPY_THREAD_TLS cannot call the do_fork() helper anymore. This is fine and intended since it should be removed in favor of the new, cleaner _do_fork() calling convention based on struct kernel_clone_args. In fact, most architectures have already switched. With this patch, h8300 joins the other arches which can't use the fork(), vfork(), clone(), clone3() syscalls directly and who follow the new process creation calling convention that is based on struct kernel_clone_args which we introduced a while back. This means less custom assembly in the architectures entry path to set up the registers before calling into the process creation helper and it is easier to to support new features without having to adapt calling conventions. It also unifies all process creation paths between fork(), vfork(), clone(), and clone3(). (We can't fix the ABI nightmare that legacy clone() is but we can prevent stuff like this happening in the future.) For some more context, please see: commit 606e9ad20094f6d500166881d301f31a51bc8aa7 Merge: ac61145a725a 457677c70c76 Author: Linus Torvalds Date: Sat Jan 11 15:33:48 2020 -0800 Merge tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread fixes from Christian Brauner: "This contains a series of patches to fix CLONE_SETTLS when used with clone3(). The clone3() syscall passes the tls argument through struct clone_args instead of a register. This means, all architectures that do not implement copy_thread_tls() but still support CLONE_SETTLS via copy_thread() expecting the tls to be located in a register argument based on clone() are currently unfortunately broken. Their tls value will be garbage. The patch series fixes this on all architectures that currently define __ARCH_WANT_SYS_CLONE3. It also adds a compile-time check to ensure that any architecture that enables clone3() in the future is forced to also implement copy_thread_tls(). My ultimate goal is to get rid of the copy_thread()/copy_thread_tls() split and just have copy_thread_tls() at some point in the not too distant future (Maybe even renaming copy_thread_tls() back to simply copy_thread() once the old function is ripped from all arches). This is dependent now on all arches supporting clone3(). While all relevant arches do that now there are still four missing: ia64, m68k, sh and sparc. They have the system call reserved, but not implemented. Once they all implement clone3() we can get rid of ARCH_WANT_SYS_CLONE3 and HAVE_COPY_THREAD_TLS. Note that in the meantime, m68k has already switched to the new calling convention. And I've got sparc patches acked by Dave, patches for ia64, and nios2 have been sent out and are ready too. Cc: Yoshinori Sato Cc: uclinux-h8-devel@lists.sourceforge.jp Signed-off-by: Christian Brauner commit 04bd52fb341da5a8c42a4b4a4dc4a3c9e5ceb865 Author: Christian Brauner Date: Thu May 7 15:14:27 2020 +0200 nios2: enable HAVE_COPY_THREAD_TLS, switch to kernel_clone_args This is part of a larger series that aims at getting rid of the copy_thread()/copy_thread_tls() split that makes the process creation codepaths in the kernel more convoluted and error-prone than they need to be. I'm converting all the remaining arches that haven't yet switched and am collecting individual acks. Once I have them, I'll send the whole series removing the copy_thread()/copy_thread_tls() split, the HAVE_COPY_THREAD_TLS define and the legacy do_fork() helper. The only kernel-wide process creation entry point for anything not going directly through the syscall path will then be based on struct kernel_clone_args. No more danger of weird process creation abi quirks between architectures hopefully, and easier to maintain overall. It also unblocks implementing clone3() on architectures not support copy_thread_tls(). Any architecture that wants to implement clone3() will need to select HAVE_COPY_THREAD_TLS and thus need to implement copy_thread_tls(). So both goals are connected but independently beneficial. HAVE_COPY_THREAD_TLS means that a given architecture supports CLONE_SETTLS and not setting it should usually mean that the architectures doesn't implement it but that's not how things are. In fact all architectures support CLONE_TLS it's just that they don't follow the calling convention that HAVE_COPY_THREAD_TLS implies. That means all architectures can be switched over to select HAVE_COPY_THREAD_TLS. Once that is done we can remove that macro (yay, less code), the unnecessary do_fork() export in kernel/fork.c, and also rename copy_thread_tls() back to copy_thread(). At this point copy_thread() becomes the main architecture specific part of process creation but it will be the same layout and calling convention for all architectures. (Once that is done we can probably cleanup each copy_thread() function even more but that's for the future.) Since nios2 does support CLONE_SETTLS there's no reason to not select HAVE_COPY_THREAD_TLS. This brings us one step closer to getting rid of the copy_thread()/copy_thread_tls() split we still have and ultimately the HAVE_COPY_THREAD_TLS define in general. A lot of architectures have already converted and nios2 is one of the few hat haven't yet. This also unblocks implementing the clone3() syscall on nios2. Once that is done we can get of another ARCH_WANTS_* macro. Once Any architecture that supports HAVE_COPY_THREAD_TLS cannot call the do_fork() helper anymore. This is fine and intended since it should be removed in favor of the new, cleaner _do_fork() calling convention based on struct kernel_clone_args. In fact, most architectures have already switched. With this patch, nios2 joins the other arches which can't use the fork(), vfork(), clone(), clone3() syscalls directly and who follow the new process creation calling convention that is based on struct kernel_clone_args which we introduced a while back. This means less custom assembly in the architectures entry path to set up the registers before calling into the process creation helper and it is easier to to support new features without having to adapt calling conventions. It also unifies all process creation paths between fork(), vfork(), clone(), and clone3(). (We can't fix the ABI nightmare that legacy clone() is but we can prevent stuff like this happening in the future.) For some more context, please see: commit 606e9ad20094f6d500166881d301f31a51bc8aa7 Merge: ac61145a725a 457677c70c76 Author: Linus Torvalds Date: Sat Jan 11 15:33:48 2020 -0800 Merge tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread fixes from Christian Brauner: "This contains a series of patches to fix CLONE_SETTLS when used with clone3(). The clone3() syscall passes the tls argument through struct clone_args instead of a register. This means, all architectures that do not implement copy_thread_tls() but still support CLONE_SETTLS via copy_thread() expecting the tls to be located in a register argument based on clone() are currently unfortunately broken. Their tls value will be garbage. The patch series fixes this on all architectures that currently define __ARCH_WANT_SYS_CLONE3. It also adds a compile-time check to ensure that any architecture that enables clone3() in the future is forced to also implement copy_thread_tls(). My ultimate goal is to get rid of the copy_thread()/copy_thread_tls() split and just have copy_thread_tls() at some point in the not too distant future (Maybe even renaming copy_thread_tls() back to simply copy_thread() once the old function is ripped from all arches). This is dependent now on all arches supporting clone3(). While all relevant arches do that now there are still four missing: ia64, m68k, sh and sparc. They have the system call reserved, but not implemented. Once they all implement clone3() we can get rid of ARCH_WANT_SYS_CLONE3 and HAVE_COPY_THREAD_TLS. Note that in the meantime, m68k has already switched to the new calling convention. And I've got sparc patches acked by Dave and ia64 is already done too. You can find a link to a booting qemu nios2 system with all the changes here at [1]. [1]: https://asciinema.org/a/333353 Cc: linux-kernel@vger.kernel.org Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Acked-by: Ley Foon Tan Signed-off-by: Christian Brauner commit 1c340ead18ee4b4a84357abdef6d4f39ee08328b Author: Eric W. Biederman Date: Thu Jun 25 16:48:26 2020 -0500 umd: Track user space drivers with struct pid Use struct pid instead of user space pid values that are prone to wrap araound. In addition track the entire thread group instead of just the first thread that is started by exec. There are no multi-threaded user mode drivers today but there is nothing preclucing user drivers from being multi-threaded, so it is just a good idea to track the entire process. Take a reference count on the tgid's in question to make it possible to remove exit_umh in a future change. As a struct pid is available directly use kill_pid_info. The prior process signalling code was iffy in using a userspace pid known to be in the initial pid namespace and then looking up it's task in whatever the current pid namespace is. It worked only because kernel threads always run in the initial pid namespace. As the tgid is now refcounted verify the tgid is NULL at the start of fork_usermode_driver to avoid the possibility of silent pid leaks. v1: https://lkml.kernel.org/r/87mu4qdlv2.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/a70l4oy8.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-12-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 0fe3c63148ef5df1b3cb067e4b4d45d45d0c0fdc Author: Eric W. Biederman Date: Thu Jun 25 16:08:46 2020 -0500 bpfilter: Move bpfilter_umh back into init data To allow for restarts 61fbf5933d42 ("net: bpfilter: restart bpfilter_umh when error occurred") moved the blob holding the userspace binary out of the init sections. Now that loading the blob into a filesystem is separate from executing the blob the blob no longer needs to live .rodata to allow for restarting. So move the blob back to .init.rodata. v1: https://lkml.kernel.org/r/87sgeidlvq.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87ftad4ozc.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-11-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 25cf336de51b51a3e440e1893751f9532095eff0 Author: Eric W. Biederman Date: Thu Jun 25 13:56:40 2020 -0500 exec: Remove do_execve_file Now that the last callser has been removed remove this code from exec. For anyone thinking of resurrecing do_execve_file please note that the code was buggy in several fundamental ways. - It did not ensure the file it was passed was read-only and that deny_write_access had been called on it. Which subtlely breaks invaniants in exec. - The caller of do_execve_file was expected to hold and put a reference to the file, but an extra reference for use by exec was not taken so that when exec put it's reference to the file an underflow occured on the file reference count. - The point of the interface was so that a pathname did not need to exist. Which breaks pathname based LSMs. Tetsuo Handa originally reported these issues[1]. While it was clear that deny_write_access was missing the fundamental incompatibility with the passed in O_RDWR filehandle was not immediately recognized. All of these issues were fixed by modifying the usermode driver code to have a path, so it did not need this hack. Reported-by: Tetsuo Handa [1] https://lore.kernel.org/linux-fsdevel/2a8775b4-1dd5-9d5c-aa42-9872445e0942@i-love.sakura.ne.jp/ v1: https://lkml.kernel.org/r/871rm2f0hi.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87lfk54p0m.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-10-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 55e6074e3fa67e1fb9ec140904db7e6cae6eda4b Author: Eric W. Biederman Date: Thu Jun 25 13:52:50 2020 -0500 umh: Stop calling do_execve_file With the user mode driver code changed to not set subprocess_info.file there are no more users of subproces_info.file. Remove this field from struct subprocess_info and remove the only user in call_usermodehelper_exec_async that would call do_execve_file instead of do_execve if file was set. v1: https://lkml.kernel.org/r/877dvuf0i7.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87r1tx4p2a.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-9-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit e2dc9bf3f5275ca372001541e5f26af572976e65 Author: Eric W. Biederman Date: Thu Jun 25 13:12:59 2020 -0500 umd: Transform fork_usermode_blob into fork_usermode_driver Instead of loading a binary blob into a temporary file with shmem_kernel_file_setup load a binary blob into a temporary tmpfs filesystem. This means that the blob can be stored in an init section and discared, and it means the binary blob will have a filename so can be executed normally. The only tricky thing about this code is that in the helper function blob_to_mnt __fput_sync is used. That is because a file can not be executed if it is still open for write, and the ordinary delayed close for kernel threads does not happen soon enough, which causes the following exec to fail. The function umd_load_blob is not called with any locks so this should be safe. Executing the blob normally winds up correcting several problems with the user mode driver code discovered by Tetsuo Handa[1]. By passing an ordinary filename into the exec, it is no longer necessary to figure out how to turn a O_RDWR file descriptor into a properly referende counted O_EXEC file descriptor that forbids all writes. For path based LSMs there are no new special cases. [1] https://lore.kernel.org/linux-fsdevel/2a8775b4-1dd5-9d5c-aa42-9872445e0942@i-love.sakura.ne.jp/ v1: https://lkml.kernel.org/r/87d05mf0j9.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87wo3p4p35.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-8-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 1199c6c3da5197e9924a906b9de71b8d0ac62a01 Author: Eric W. Biederman Date: Thu Jun 25 11:38:08 2020 -0500 umd: Rename umd_info.cmdline umd_info.driver_name The only thing supplied in the cmdline today is the driver name so rename the field to clarify the code. As this value is always supplied stop trying to handle the case of a NULL cmdline. Additionally since we now have a name we can count on use the driver_name any place where the code is looking for a name of the binary. v1: https://lkml.kernel.org/r/87imfef0k3.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87366d63os.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-7-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 74be2d3b80af1bb264c3b9905b52c15efc03c0fe Author: Eric W. Biederman Date: Fri Jun 26 11:16:06 2020 -0500 umd: For clarity rename umh_info umd_info This structure is only used for user mode drivers so change the prefix from umh to umd to make that clear. v1: https://lkml.kernel.org/r/87o8p6f0kw.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/878sg563po.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-6-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 884c5e683b67dbc52892e24c29eed864f330ec08 Author: Eric W. Biederman Date: Fri Jun 26 12:23:00 2020 -0500 umh: Separate the user mode driver and the user mode helper support This makes it clear which code is part of the core user mode helper support and which code is needed to implement user mode drivers. This makes the kernel smaller for everyone who does not use a usermode driver. v1: https://lkml.kernel.org/r/87tuyyf0ln.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87imf963s6.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-5-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 21d598280675c463ea1b264fab06e9614aacd1e1 Author: Eric W. Biederman Date: Wed Jun 24 17:01:18 2020 -0500 umh: Remove call_usermodehelper_setup_file. The only caller of call_usermodehelper_setup_file is fork_usermode_blob. In fork_usermode_blob replace call_usermodehelper_setup_file with call_usermodehelper_setup and delete fork_usermodehelper_setup_file. For this to work the argv_free is moved from umh_clean_and_save_pid to fork_usermode_blob. v1: https://lkml.kernel.org/r/87zh8qf0mp.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87o8p163u1.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-4-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 3a171042aeab8702391c311d84633a6c267d566c Author: Eric W. Biederman Date: Thu Jun 25 10:10:03 2020 -0500 umh: Rename the user mode driver helpers for clarity Now that the functionality of umh_setup_pipe and umh_clean_and_save_pid has changed their names are too specific and don't make much sense. Instead name them umd_setup and umd_cleanup for the functional role in setting up user mode drivers. v1: https://lkml.kernel.org/r/875zbegf82.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87tuyt63x3.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-3-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit b044fa2ae50d52d8c9f9d130055c2aea032e7475 Author: Eric W. Biederman Date: Thu Jun 25 10:04:25 2020 -0500 umh: Move setting PF_UMH into umh_pipe_setup I am separating the code specific to user mode drivers from the code for ordinary user space helpers. Move setting of PF_UMH from call_usermodehelper_exec_async which is core user mode helper code into umh_pipe_setup which is user mode driver code. The code is equally as easy to write in one location as the other and the movement minimizes the impact of the user mode driver code on the core of the user mode helper code. Setting PF_UMH unconditionally is harmless as an action will only happen if it is paired with an entry on umh_list. v1: https://lkml.kernel.org/r/87bll6gf8t.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87zh8l63xs.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-2-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 5fec25f2cb959cb5f189d7f6127bee3efc782530 Author: Eric W. Biederman Date: Wed Jun 24 16:34:57 2020 -0500 umh: Capture the pid in umh_pipe_setup The pid in struct subprocess_info is only used by umh_clean_and_save_pid to write the pid into umh_info. Instead always capture the pid on struct umh_info in umh_pipe_setup, removing code that is specific to user mode drivers from the common user path of user mode helpers. v1: https://lkml.kernel.org/r/87h7uygf9i.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/875zb97iix.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-1-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman Acked-by: Alexei Starovoitov Tested-by: Alexei Starovoitov Signed-off-by: "Eric W. Biederman" commit 6f01dfb760c027d5dd6199d91ee9599f2676b5c6 Author: Dariusz Marcinkiewicz Date: Mon Jun 22 13:46:36 2020 +0200 media: cros-ec-cec: do not bail on device_init_wakeup failure Do not fail probing when device_init_wakeup fails. device_init_wakeup fails when the device is already enabled as wakeup device. Hence, the driver fails to probe the device if: - The device has already been enabled for wakeup (by e.g. sysfs) - The driver has been unloaded and is being loaded again. This goal of the patch is to fix the above cases. Overwhelming majority of the drivers do not check device_init_wakeup return code. Fixes: cd70de2d356ee ("media: platform: Add ChromeOS EC CEC driver") Signed-off-by: Dariusz Marcinkiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0f879bab72f47e8ba2421a984e7acfa763d3e84e Author: Paul Kocialkowski Date: Thu Apr 30 18:42:45 2020 +0200 media: rockchip: rga: Only set output CSC mode for RGB input Setting the output CSC mode is required for a YUV output, but must not be set when the input is also YUV. Doing this (as tested with a YUV420P to YUV420P conversion) results in wrong colors. Adapt the logic to only set the output CSC mode when the output is YUV and the input is RGB. Also add a comment to clarify the rationale. Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") Signed-off-by: Paul Kocialkowski Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ded874ece29d3fe2abd3775810a06056067eb68c Author: Paul Kocialkowski Date: Thu Apr 30 18:42:44 2020 +0200 media: rockchip: rga: Introduce color fmt macros and refactor CSC mode logic This introduces two macros: RGA_COLOR_FMT_IS_YUV and RGA_COLOR_FMT_IS_RGB which allow quick checking of the colorspace familily of a RGA color format. These macros are then used to refactor the logic for CSC mode selection. The two nested tests for input colorspace are simplified into a single one, with a logical and, making the whole more readable. Signed-off-by: Paul Kocialkowski Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 18ffec750578f7447c288647d7282c7d12b1d969 Author: Chuhong Yuan Date: Thu May 28 08:41:47 2020 +0200 media: exynos4-is: Add missed check for pinctrl_lookup_state() fimc_md_get_pinctrl() misses a check for pinctrl_lookup_state(). Add the missed check to fix it. Fixes: 4163851f7b99 ("[media] s5p-fimc: Use pinctrl API for camera ports configuration]") Signed-off-by: Chuhong Yuan Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 875c0d75954f022b2118f8dbfe57b96021de383b Author: Dafna Hirschfeld Date: Fri May 29 16:03:51 2020 +0200 media: staging: rkisp1: set more precise size errors in debugfs When a size error is signaled, it is possible to read a register to see where the error comes from. So, in debugfs the general error 'pic_size_err' can be replaced with 3 more precise errors. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d000e9b5e4a23dd700b3f58a4738c94bb5179ff0 Author: Chuhong Yuan Date: Sat Jun 6 16:39:18 2020 +0200 media: tvp5150: Add missed media_entity_cleanup() This driver does not call media_entity_cleanup() in the error handler of tvp5150_registered() and tvp5150_remove(), while it has called media_entity_pads_init() at first. Add the missed calls to fix it. Fixes: 0556f1d580d4 ("media: tvp5150: add input source selection of_graph support") Signed-off-by: Chuhong Yuan Reviewed-by: Marco Felsch Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 477d4d38b93d457d6391a864dcfcc114a8b44060 Author: Dan Carpenter Date: Wed Jun 10 19:26:15 2020 +0200 media: pxa_camera: remove an impossible condition It's not possible for "pcdev->mclk" to be zero because we check for that earlier and set it to 20000000 in that situation. If it were possible, that would be a problem because it could have lead to an Oops in the error handling when we call v4l2_clk_unregister(pcdev->mclk_clk); Signed-off-by: Dan Carpenter Acked-by: Robert Jarzmik Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ec050e022f8da39c2c9d6f4eb8c7f343fe2664ad Author: Niklas Söderlund Date: Thu Jun 11 21:32:32 2020 +0200 media: rcar-csi2: Rename confirm_start() to phy_post_init() to match its usage Since the driver was picked-up the starting of the PHY have changed quiet a bit. An artifact of these changes is the now poorly named callback confirm_start(). It used to confirm start of the PHY but now performs post PHY start initialization, rename it to phy_post_init() to reflect this. Signed-off-by: Niklas Söderlund Acked-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 874b8055bb3c42fe28dd8a1280a1d93a4f4156fa Author: Stanimir Varbanov Date: Tue Jun 16 16:37:35 2020 +0200 media: docs: dev-decoder: Add one more reason for dynamic change Add bit-depth change as one more reason which could change in the middle of the stream. For the worst case the stream is 8bit at the beginning but later in the bit-stream it changes to 10bit. That change should be propagated to the client so that it can take the appropriate action. In that case it has to stop the streaming on the capture queue, re-negotiate the pixel format, allocate new buffers and start the streaming again. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a32e8adf2fdbd4fd1d046769140a8afd0489fe65 Author: Gustavo A. R. Silva Date: Mon Jun 15 23:40:15 2020 +0200 media: test_drivers: vivid-core: Use array_size() helper The tpg_alloc() and vmalloc() functions have no 2-factor argument form, so multiplication factors need to be wrapped in array_size(). This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 961d3b27a2aff52dda0b97d35085a743a27c2f46 Author: John Cox Date: Wed Jun 17 15:21:52 2020 +0200 media: videobuf2: Fix length check for single plane dmabuf queueing Check against length in v4l2_buffer rather than vb2_buffer when the buffer is a dmabuf. This makes the single plane test the same as the existing multiplanar test. Signed-off-by: John Cox Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 906dceb48dfa1e7c99c32e6b25878d47023e916b Author: Helen Koike Date: Wed Jun 17 20:08:01 2020 +0200 media: staging: rkisp1: rsz: fix resolution limitation on sink pad Resizer sink pad is limited by what the ISP can generate. The configurations describes what the resizer can produce. This was tested on a Scarlet device with ChromiumOs, where the selfpath receives 2592x1944 and produces 1600x1200 (which isn't possible without this fix). Fixes: 56e3b29f9f6b2 ("media: staging: rkisp1: add streaming paths") Signed-off-by: Helen Koike Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f00f3a4916c546582060d114b4b96286ab3451e Author: Krzysztof Kozlowski Date: Wed Jun 17 17:27:09 2020 +0200 media: samsung: Rename Samsung and Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Samsung" and "Exynos" names. "SAMSUNG" and "EXYNOS" are not abbreviations but regular trademarked names. Therefore they should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Although advertisement materials usually use uppercase "SAMSUNG", the lowercase version is used in all legal aspects (e.g. on Wikipedia and in privacy/legal statements on https://www.samsung.com/semiconductor/privacy-global/). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 206003b18bb264521607440752814ccff59f91f3 Author: Dafna Hirschfeld Date: Thu Jun 18 13:35:18 2020 +0200 media: staging: rkisp1: rsz: set default format if the given format is not RKISP1_ISP_SD_SRC When setting the sink format of the 'rkisp1_resizer' the format should be supported by 'rkisp1_isp' on the video source pad. This patch checks this condition and sets the format to default if the condition is false. Fixes: 56e3b29f9f6b "media: staging: rkisp1: add streaming paths" Signed-off-by: Dafna Hirschfeld Reviewed-by: Tomasz Figa Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c247818a873adcb8488021eed38c330ea8b288a3 Author: Dafna Hirschfeld Date: Thu Jun 18 13:35:17 2020 +0200 media: staging: rkisp1: rename macros 'RKISP1_DIR_*' to 'RKISP1_ISP_SD_*' The macros 'RKISP1_DIR_*' are flags that indicate on which pads of the isp subdevice the media bus code is supported. So the prefix RKISP1_ISP_SD_ is better. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b861d139a36a4593498932bfec957bdcc7d98eb3 Author: Dafna Hirschfeld Date: Thu Jun 18 13:35:16 2020 +0200 media: staging: rkisp1: remove macro RKISP1_DIR_SINK_SRC The macro RKISP1_DIR_SINK_SRC is a mask of two flags. The macro hides the fact that it's a mask and the code is actually more clear if we replace it the with bitwise-or explicitly. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7b8ce1f2763b9351a4cb04b802835470e76770a5 Author: Dafna Hirschfeld Date: Thu Jun 18 13:35:15 2020 +0200 media: staging: rkisp1: rsz: supported formats are the isp's src formats, not sink formats The rkisp1_resizer's enum callback 'rkisp1_rsz_enum_mbus_code' calls the enum callback of the 'rkisp1_isp' on it's video sink pad. This is a bug, the resizer should support the same formats supported by the 'rkisp1_isp' on the source pad (not the sink pad). Fixes: 56e3b29f9f6b "media: staging: rkisp1: add streaming paths" Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Reviewed-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d93d45ab716e4107056be54969c8c70e50a8346d Author: Dan Carpenter Date: Fri Jun 19 16:30:07 2020 +0200 media: allegro: Fix some NULL vs IS_ERR() checks in probe The devm_ioremap() function doesn't return error pointers, it returns NULL on error. Fixes: f20387dfd065 ("media: allegro: add Allegro DVT video IP core driver") Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b820935b35479e823eb6ce133cdbe371dced7e95 Author: Laurent Pinchart Date: Sun Jun 21 02:23:43 2020 +0200 media: vb2: Print the queue pointer in debug messages When debugging issues that involve more than one video queue, messages related to multiple queues get interleaved without any easy way to tell which queue they relate to. Fix this by adding a queue name to vb2_queue, and printing it in all debug messages in the vb2 core and V4L2 layers. If the name isn't set by drivers, it is automatically filled with the queue direction and address. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 030b161c4dc8a4d9a3dcecd7101680e3f871748d Author: Benoit Parrot Date: Thu May 28 15:26:05 2020 +0200 media: use v4l2_rect_enclosed helper Several drivers implement the same enclosed_rectangle() function to check if a rectangle is enclosed into another. Replace this with the newly added v4l2_rect_enclosed() helper function. Signed-off-by: Benoit Parrot Acked-by: Andrzej Pietrasiewicz Reviewed-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d3246337d00fcb635e4ade45f748f155e4056b28 Author: Benoit Parrot Date: Thu May 28 15:26:04 2020 +0200 media: v4l2-rect.h: add enclosed rectangle helper Add a helper function to check if one rectangle is enclosed inside another. Signed-off-by: Benoit Parrot Acked-by: Andrzej Pietrasiewicz Reviewed-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 675616554d0a5caff138008ee9bd4623bc4390b2 Author: Lad Prabhakar Date: Wed May 27 14:16:50 2020 +0200 media: rcar-csi2: Add support for MEDIA_BUS_FMT_SRGGB8_1X8 format This patch adds support for MEDIA_BUS_FMT_SRGGB8_1X8 format for CSI2 input. Signed-off-by: Lad Prabhakar Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e87c1a81f158d6fc7b3346eb88c2d76a044f837d Author: Lad Prabhakar Date: Wed May 27 14:16:49 2020 +0200 media: rcar-vin: Add support for MEDIA_BUS_FMT_SRGGB8_1X8 format Add support for MEDIA_BUS_FMT_SRGGB8_1X8 format in rcar-vin by setting format type to RAW8 in VNMC register and appropriately setting the bpp and bytesperline to enable V4L2_PIX_FMT_SRGGB8. Signed-off-by: Lad Prabhakar Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fd22e8eb4145852223b36b0e6c7e308ed5905ad2 Author: Lad Prabhakar Date: Wed May 27 14:16:48 2020 +0200 media: rcar-vin: Invalidate pipeline if conversion is not possible on input formats Up until now the VIN was capable to convert any of its supported input mbus formats to any of it's supported output pixel formats. With the addition of RAW formats this is no longer true. This patch invalidates the pipeline by adding a check if given vin input format can be converted to supported output pixel format. Signed-off-by: Lad Prabhakar Reviewed-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 831b8755fd2f60cf00cbf854c2a2eccb03f2060b Author: Dinghao Liu Date: Sun May 24 06:31:32 2020 +0200 media: venus: venc: Fix runtime PM imbalance in venc_open pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit e0eb34810113dbbf1ace57440cf48d514312a373 Author: Mansur Alisha Shaik Date: Fri May 1 08:28:00 2020 +0200 media: venus: fix multiple encoder crash Currently we are considering the instances which are available in core->inst list for load calculation in min_loaded_core() function, but this is incorrect because by the time we call decide_core() for second instance, the third instance not filled yet codec_freq_data pointer. Solve this by considering the instances whose session has started. Cc: stable@vger.kernel.org # v5.7+ Fixes: 4ebf969375bc ("media: venus: introduce core selection") Tested-by: Douglas Anderson Signed-off-by: Mansur Alisha Shaik Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 3b4cfc6966ecaefdf46a1369923a55e7bdc86d19 Author: Evgeny Novikov Date: Thu Jun 18 15:15:38 2020 +0200 media: rc: return proper error code on error handling path in init If lirc_dev_init() fails during module initialization, rc_core_init() returns 0 denoting success. This can cause different issues during further operation of the module. The patch fixes the return value of rc_core_init() on the corresponding error handling path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 39c2cf7544d63882709236ca2fb801db7cc2bc52 Author: Sean Young Date: Tue Jun 16 12:04:17 2020 +0200 media: cx23888: remove unused functions Found with clang: drivers/media/pci/cx23885/cx23888-ir.c:178:19: warning: unused function 'ns_to_clock_divider' [-Wunused-function] static inline u16 ns_to_clock_divider(unsigned int ns) ^ drivers/media/pci/cx23885/cx23888-ir.c:184:28: warning: unused function 'clock_divider_to_ns' [-Wunused-function] static inline unsigned int clock_divider_to_ns(unsigned int divider) ^ drivers/media/pci/cx23885/cx23888-ir.c:202:19: warning: unused function 'freq_to_clock_divider' [-Wunused-function] static inline u16 freq_to_clock_divider(unsigned int freq, ^ Cc: Andy Walls Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 0390430deffbeb05bf08dfc8168d53f6e693b768 Author: Sean Young Date: Tue Jun 16 11:54:06 2020 +0200 media: fintek-cir: remove unused function fintek_clear_reg_bit Found with clang: drivers/media/rc/fintek-cir.c:55:20: warning: unused function 'fintek_clear_reg_bit' [-Wunused-function] static inline void fintek_clear_reg_bit(struct fintek_dev *fintek, u8 val, u8 reg) Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 3fd63734bca51c6b7bb6615fc10eefa620ca58a0 Author: Sean Young Date: Tue Jun 16 11:49:42 2020 +0200 media: nuvoton-cir: remove setting tx carrier functions Since this driver could never transmit IR, setting the tx carrier makes no sense. Fixes: 87284271b73b8 ("media: rc: nuvoton: remove rudimentary transmit functionality") Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 29af79e17b6b16430f308a6998afc318b5d26888 Author: Sean Young Date: Tue Jun 16 11:45:14 2020 +0200 media: drx-k: remove unused MulDiv32 function This function has never been used. Found with clang: drivers/media/dvb-frontends/drxk_hard.c:159:19: warning: unused function 'MulDiv32' [-Wunused-function] static inline u32 MulDiv32(u32 a, u32 b, u32 c) Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 89316195f7518e565182a3736101a6c34644e564 Author: Hans Verkuil Date: Sat Jun 27 11:35:22 2020 +0200 media: MAINTAINERS: remove SOC-CAMERA entry After the removal of the soc_camera driver and the soc_camera.h header the SOC-CAMERA entry in the MAINTAINERS file can also be removed. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 078336914d6bf4ff9e4ddc3675396d729135ae4d Author: Hans Verkuil Date: Fri Jun 26 15:15:24 2020 +0200 media: arch/sh/configs: remove obsolete CONFIG_SOC_CAMERA* Drop all configs with the CONFIG_SOC_CAMERA prefix since those have been removed. SOC_CAMERA support for the sh architecture was removed a long time ago. Drop it from the configs. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 39bc4e4e1534dceceba1646cd324dcecfaa6379d Author: Hans Verkuil Date: Fri Jun 26 15:11:18 2020 +0200 media: arch/arm/configs: remove obsolete CONFIG_SOC_CAMERA* Drop all configs with the CONFIG_SOC_CAMERA prefix since those have been removed. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 19d1d03ed232242c7d6246179c7c2a83ee3e107f Author: Hans Verkuil Date: Fri Jun 26 13:53:21 2020 +0200 media: soc_camera.h: remove this unused header The soc_camera driver has been removed and all board files that used it have been fixed. This header can now be removed altogether. Signed-off-by: Hans Verkuil Cc: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit e7eab49132ba819632c3bb9cd5b8342f2cdeb939 Author: Hans Verkuil Date: Fri Jun 26 13:53:20 2020 +0200 media: staging/media/soc_camera: remove this driver The soc_camera driver (and related soc_camera-dependent sensor drivers) is obsolete and depends on BROKEN for a long time now. Nobody is using it, so it is time to kill it off. Signed-off-by: Hans Verkuil Cc: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit 63839882c59740c68f16bca45b4f78a7cd5122dd Author: Hans Verkuil Date: Fri Jun 26 13:53:19 2020 +0200 media: mach-pxa: palmz72/pcm990: remove soc_camera dependencies The soc_camera driver is about to be removed, so drop camera support from this board. Note that the soc_camera driver itself has long since been deprecated and can't be compiled anymore (it depends on BROKEN), so camera support on this board has been broken for a long time (at least since 4.9 when the pxa_camera.c was removed from soc_camera). Note that there is a new pxa_camera.c driver that replaced the old soc_camera based driver, but using that would require these boards to be converted to use the device tree. Signed-off-by: Hans Verkuil Cc: Robert Jarzmik Acked-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit ce548396a4334a4c6e9faada8db89dacf35822b2 Author: Hans Verkuil Date: Fri Jun 26 13:53:18 2020 +0200 media: mach-omap1: board-ams-delta.c: remove soc_camera dependencies The soc_camera driver is about to be removed, so drop camera support from this board. Note that the soc_camera driver itself has long since been deprecated and can't be compiled anymore (it depends on BROKEN), so camera support on this board has been broken for a long time (at least since 4.6 when the omap1_camera.c was removed from soc_camera). Signed-off-by: Hans Verkuil Cc: Tony Lindgren Acked-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit c694107ae998af3f2fcc89e72e736c22e30c4b6a Author: Hans Verkuil Date: Fri Jun 26 13:53:17 2020 +0200 media: mach-imx: mach-imx27_visstrim_m10.c: remove soc_camera dependencies The soc_camera.h header driver is about to be removed, so drop camera support from this board. Note that the soc_camera driver itself has long since been deprecated and can't be compiled anymore (it depends on BROKEN), so camera support on this board has been broken for a long time (at least since 4.6 when the mx2_camera.c was removed from soc_camera). Signed-off-by: Hans Verkuil Acked-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit 5a55b647395df9c9afabae82550f9e051cc198d8 Author: Hans Verkuil Date: Fri Jun 26 13:53:16 2020 +0200 media: pxa_camera: update MODULE_DESCRIPTION Remove the confusing SoC Camera reference. Signed-off-by: Hans Verkuil Cc: Robert Jarzmik Signed-off-by: Mauro Carvalho Chehab commit e1db811e5d94cff7fa51398e36b2b6186ab185a0 Author: Hans Verkuil Date: Fri Jun 26 13:53:15 2020 +0200 media: ov9640: update MODULE_DESCRIPTION Remove the confusing SoC Camera reference. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 21b9a47e0ec7997c5a762c102cc316ea0c23243f Author: Jeff Chase Date: Tue Jun 23 01:59:50 2020 +0200 media: cec: i2c: ch7322: Add ch7322 CEC controller driver Add a CEC device driver for the Chrontel ch7322 CEC conroller. This is an I2C device capable of sending and receiving CEC messages. Signed-off-by: Jeff Chase Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 98f803cfa76eb67d0e429ba76a39471f95d83675 Author: Jeff Chase Date: Tue Jun 23 01:59:49 2020 +0200 media: cec: add adap_controls_phys_addr option Use of the cec notifier framework is required to support CEC_CAP_CONNECTOR_INFO but some devices do not want physical address updates from the notifier. This adds an option to allow registering with a cec notifier without getting address updates. [hans: document the new adap_controls_phys_addr bool] Signed-off-by: Jeff Chase Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7f52faabd2e533dd3f59d2d69093756fa25a1b2e Author: Jeff Chase Date: Tue Jun 23 01:59:48 2020 +0200 media: dt-bindings: Add ch7322 media i2c device The ch7322 is a Chrontel CEC controller. Signed-off-by: Jeff Chase Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c92d30e4b78dc331909f8c6056c2792aa14e2166 Author: Eugeniu Rosca Date: Tue Jun 2 21:50:16 2020 +0200 media: vsp1: dl: Fix NULL pointer dereference on unbind In commit f3b98e3c4d2e16 ("media: vsp1: Provide support for extended command pools"), the vsp pointer used for referencing the VSP1 device structure from a command pool during vsp1_dl_ext_cmd_pool_destroy() was not populated. Correctly assign the pointer to prevent the following null-pointer-dereference when removing the device: [*] h3ulcb-kf #> echo fea28000.vsp > /sys/bus/platform/devices/fea28000.vsp/driver/unbind Unable to handle kernel NULL pointer dereference at virtual address 0000000000000028 Mem abort info: ESR = 0x96000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=00000007318be000 [0000000000000028] pgd=00000007333a1003, pud=00000007333a6003, pmd=0000000000000000 Internal error: Oops: 96000006 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 486 Comm: sh Not tainted 5.7.0-rc6-arm64-renesas-00118-ge644645abf47 #185 Hardware name: Renesas H3ULCB Kingfisher board based on r8a77951 (DT) pstate: 40000005 (nZcv daif -PAN -UAO) pc : vsp1_dlm_destroy+0xe4/0x11c lr : vsp1_dlm_destroy+0xc8/0x11c sp : ffff800012963b60 x29: ffff800012963b60 x28: ffff0006f83fc440 x27: 0000000000000000 x26: ffff0006f5e13e80 x25: ffff0006f5e13ed0 x24: ffff0006f5e13ed0 x23: ffff0006f5e13ed0 x22: dead000000000122 x21: ffff0006f5e3a080 x20: ffff0006f5df2938 x19: ffff0006f5df2980 x18: 0000000000000003 x17: 0000000000000000 x16: 0000000000000016 x15: 0000000000000003 x14: 00000000000393c0 x13: ffff800011a5ec18 x12: ffff800011d8d000 x11: ffff0006f83fcc68 x10: ffff800011a53d70 x9 : ffff8000111f3000 x8 : 0000000000000000 x7 : 0000000000210d00 x6 : 0000000000000000 x5 : ffff800010872e60 x4 : 0000000000000004 x3 : 0000000078068000 x2 : ffff800012781000 x1 : 0000000000002c00 x0 : 0000000000000000 Call trace: vsp1_dlm_destroy+0xe4/0x11c vsp1_wpf_destroy+0x10/0x20 vsp1_entity_destroy+0x24/0x4c vsp1_destroy_entities+0x54/0x130 vsp1_remove+0x1c/0x40 platform_drv_remove+0x28/0x50 __device_release_driver+0x178/0x220 device_driver_detach+0x44/0xc0 unbind_store+0xe0/0x104 drv_attr_store+0x20/0x30 sysfs_kf_write+0x48/0x70 kernfs_fop_write+0x148/0x230 __vfs_write+0x18/0x40 vfs_write+0xdc/0x1c4 ksys_write+0x68/0xf0 __arm64_sys_write+0x18/0x20 el0_svc_common.constprop.0+0x70/0x170 do_el0_svc+0x20/0x80 el0_sync_handler+0x134/0x1b0 el0_sync+0x140/0x180 Code: b40000c2 f9403a60 d2800084 a9400663 (f9401400) ---[ end trace 3875369841fb288a ]--- Fixes: f3b98e3c4d2e16 ("media: vsp1: Provide support for extended command pools") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Eugeniu Rosca Reviewed-by: Kieran Bingham Tested-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 414953b4833f2b2024ec46213a75586465acea90 Author: Colin Ian King Date: Fri Apr 24 13:25:54 2020 +0200 media: cx231xx: remove redundant assignment to variable err The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 37e278c801078dcf165983a83f7cbefbae856004 Author: Eizan Miyamoto Date: Thu May 7 12:23:50 2020 +0200 media: mtk-mdp: Remove mtk_mdp_comp.id and supporting functionality Since components are registered in a list, the numeric component id that specified a location in an array is not necessary. Signed-off-by: Eizan Miyamoto Reviewed-by: Enric Balletbo i Serra Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 86698b9505bbc97b1cd6d8e9a2e7b8604a079469 Author: Eizan Miyamoto Date: Thu May 7 12:23:48 2020 +0200 media: mtk-mdp: convert mtk_mdp_dev.comp array to list The functions mtk_mdp_register/unregister_component have been created to add / remove items from the list of components. This will eventually enable us to specify a list of components in the device tree instead of hardcoding them into this driver. The list is modified by a single thread at driver probe time, and will not be traversed by another thread until the call to pm_runtime_enable at the end of probing. Signed-off-by: Eizan Miyamoto Reviewed-by: Enric Balletbo I Serra Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ee18fc7b0b9517ac62711da1b95095f122aead94 Author: Eizan Miyamoto Date: Thu May 7 12:23:46 2020 +0200 media: mtk-mdp: handle vpu_wdt_reg_handler() errors during probe This is a cleanup to better handle errors during MDP probe. Signed-off-by: Eizan Miyamoto Reviewed-by: Enric Balletbo i Serra Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 256a12e1a343e1efff00a9065063f0846d219336 Author: Eizan Miyamoto Date: Thu May 7 12:23:44 2020 +0200 media: mtk-mdp: handle vb2_dma_contig_set_max_seg_size errors during probe This is a cleanup to better handle errors during MDP probe. Signed-off-by: Eizan Miyamoto Reviewed-by: Enric Balletbo i Serra Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 86ef5146fe49bcf0801fba199d98a37151ed3791 Author: Eizan Miyamoto Date: Thu May 7 12:23:42 2020 +0200 media: mtk-mdp: remove mtk_mdp_comp.regs from mtk_mdp_comp.h These fields are not used and can be removed. Signed-off-by: Eizan Miyamoto Reviewed-by: Enric Balletbo I Serra Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0d1e342a17f5b10e2231fc8f98cac7b88b1b6897 Author: Francois Buergisser Date: Wed May 6 07:01:37 2020 +0200 media: mtk-mdp: Remove states for format checks The mtk-mdp driver uses states to check if the formats have been set on the capture and output when turning the streaming on, setting controls or setting the selection rectangles. Those states are reset when 0 buffers are requested like when checking capabilities. This patch removes all format checks and set one by default as queues in V4L2 are expected to always have a format set. https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/vidioc-streamon.html https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/vidioc-g-ctrl.html https://linuxtv.org/downloads/v4l-dvb-apis/uapi/v4l/vidioc-g-selection.html Signed-off-by: Francois Buergisser Signed-off-by: Eizan Miyamoto Reviewed-by: Enric Balletbo I Serra Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2505a210fc126599013aec2be741df20aaacc490 Author: Dan Carpenter Date: Fri May 8 16:40:22 2020 +0200 media: firewire: Using uninitialized values in node_probe() If fw_csr_string() returns -ENOENT, then "name" is uninitialized. So then the "strlen(model_names[i]) <= name_len" is true because strlen() is unsigned and -ENOENT is type promoted to a very high positive value. Then the "strncmp(name, model_names[i], name_len)" uses uninitialized data because "name" is uninitialized. Fixes: 92374e886c75 ("[media] firedtv: drop obsolete backend abstraction") Signed-off-by: Dan Carpenter Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 20171723144ca0d057b72e852536992fd371369a Author: Chen Zhou Date: Sat May 9 04:07:11 2020 +0200 media: coda: jpeg: add NULL check after kmalloc Fixes coccicheck warning: ./drivers/media/platform/coda/coda-jpeg.c:331:3-31: alloc with no test, possible model on line 354 Add NULL check after kmalloc. Signed-off-by: Chen Zhou Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6fce59ac719f9adeeed2556ed74e23a607f931e8 Author: Eugen Hristev Date: Fri Jun 12 12:56:02 2020 +0200 media: atmel: atmel-sama5d2-isc: fix warning in configs without OF All warnings (new ones prefixed by >>, old ones prefixed by <<): >> drivers/media/platform/atmel/atmel-sama5d2-isc.c:323:34: warning: unused variable 'atmel_isc_of_match' [-Wunused-const-variable] static const struct of_device_id atmel_isc_of_match[] = { ^ 1 warning generated. vim +/atmel_isc_of_match +323 drivers/media/platform/atmel/atmel-sama5d2-isc.c 322 > 323 static const struct of_device_id atmel_isc_of_match[] = { 324 { .compatible = "atmel,sama5d2-isc" }, 325 { } 326 }; 327 MODULE_DEVICE_TABLE(of, atmel_isc_of_match); 328 Fixed warning by guarding the atmel_isc_of_match by CONFIG_OF. Reported-by: kernel test robot Signed-off-by: Eugen Hristev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7cd08d6eed2772e5ac759063a0287c5ff4551a91 Author: Gustavo A. R. Silva Date: Thu Mar 19 23:23:52 2020 +0100 media: usb: pwc: pwc.h: Replace zero-length array with flexible-array member The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 50795910160e78c1bee6b27d8d7a3f93e8b7d48d Author: Andrey Konovalov Date: Thu Apr 9 13:24:04 2020 +0200 media: camss: use proper media entity function for subdevices Currently for msm_csiphy, msm_csid, and msm_ispif subdevices the media entity function field is set to MEDIA_ENT_F_IO_V4L. This is incorrect as MEDIA_ENT_F_IO_V4L implies V4L2 video node. Change it to MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER as this is the best fit from the functions defined in include/uapi/linux/media.h. Signed-off-by: Andrey Konovalov Tested-by: Robert Foss Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 372faeb46b91be672fb0f03f7b358759bcd4aed8 Author: Dafna Hirschfeld Date: Fri May 15 16:29:52 2020 +0200 media: staging: rkisp1: cap: remove support of BGR666 format The rkisp1 supports RGB encoding with 6 bits per color with the following format: - - b5 b4 b3 b2 b1 b0 - - g5 g4 g3 g2 g1 g0 - - r5 r4 r3 r2 r1 r0 - - - - - - - - This is not how V4L2_PIX_FMT_BGR666 is defined, so remove this format from the driver's formats list. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8fa88a88d573093868565a1afba43b5ae5b3a316 Author: Valentin Schneider Date: Fri Jul 3 16:56:45 2020 +0100 genirq: Remove preflow handler support That was put in place for sparc64, and blackfin also used it for some time; sparc64 no longer uses those, and blackfin is dead. As there are no more users, remove preflow handlers. Signed-off-by: Valentin Schneider Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200703155645.29703-3-valentin.schneider@arm.com commit 959f53bd90c3ac70e5481199c6159f6314f9f910 Author: Valentin Schneider Date: Fri Jul 3 16:56:44 2020 +0100 sparc64: Deselect IRQ_PREFLOW_FASTEOI sparc64 hasn't needed to select this since commit: ee6a9333fa58 ("sparc64: sparse irq") which got rid of the calls to __irq_set_preflow_handler() first installed by commit: fcd8d4f49869 ("sparc: Use the new genirq functionality") Deselect this option. Signed-off-by: Valentin Schneider Signed-off-by: Thomas Gleixner Tested-by: Anatoly Pugachev Link: https://lkml.kernel.org/r/20200703155645.29703-2-valentin.schneider@arm.com commit f3e2bd713730e6d69e8e021d3ff574f01c39e7e3 Author: John Keeping Date: Tue Jun 23 13:06:46 2020 +0100 i2c: rk3x: support master_xfer_atomic Enable i2c transactions in irq disabled contexts like poweroff where the PMIC is connected via i2c. Signed-off-by: John Keeping Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Signed-off-by: Wolfram Sang commit f80531c8217c5b348058a0280f3be05835abd737 Author: Jarkko Nikula Date: Thu Jun 11 14:05:34 2020 +0300 i2c: Use separate MODULE_AUTHOR() statements for multiple authors Modules with multiple authors should use multiple MODULE_AUTHOR() statements according to comment in include/linux/module.h. Split the i2c modules with multiple authors to use multiple MODULE_AUTHOR() statements. Signed-off-by: Jarkko Nikula Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit c1f79a2eefdcc0aef5d7a911c27a3f75f1936ecd Author: Pablo Neira Ayuso Date: Sat Jul 4 02:51:28 2020 +0200 netfilter: nf_tables: reject unsupported chain flags Bail out if userspace sends unsupported chain flags. Signed-off-by: Pablo Neira Ayuso commit d0e2c7de92c7f2b3d355ad76b0bb9fc43d1beb87 Author: Pablo Neira Ayuso Date: Tue Jun 30 19:21:36 2020 +0200 netfilter: nf_tables: add NFT_CHAIN_BINDING This new chain flag specifies that: * the kernel dynamically allocates the chain name, if no chain name is specified. * If the immediate expression that refers to this chain is removed, then this bound chain (and its content) is destroyed. Signed-off-by: Pablo Neira Ayuso commit 04b7db414490ea9254d0c1d8930ea9571f8ce9f0 Author: Pablo Neira Ayuso Date: Tue Jun 30 19:21:28 2020 +0200 netfilter: nf_tables: add nft_chain_add() This patch adds a helper function to add the chain to the hashtable and the chain list. Signed-off-by: Pablo Neira Ayuso commit 67c49de4ad862c567088c5119cf125e566f56e7f Author: Pablo Neira Ayuso Date: Tue Jun 30 19:21:25 2020 +0200 netfilter: nf_tables: expose enum nft_chain_flags through UAPI This enum definition was never exposed through UAPI. Rename NFT_BASE_CHAIN to NFT_CHAIN_BASE for consistency. Signed-off-by: Pablo Neira Ayuso commit 51d70f181ff4e2c996ddf256af1efecd7d5864e5 Author: Pablo Neira Ayuso Date: Tue Jun 30 19:21:21 2020 +0200 netfilter: nf_tables: add NFTA_VERDICT_CHAIN_ID attribute This netlink attribute allows you to identify the chain to jump/goto by means of the chain ID. Signed-off-by: Pablo Neira Ayuso commit 837830a4b439bfeb86c70b0115c280377c84714b Author: Pablo Neira Ayuso Date: Tue Jun 30 19:21:16 2020 +0200 netfilter: nf_tables: add NFTA_RULE_CHAIN_ID attribute This new netlink attribute allows you to add rules to chains by the chain ID. Signed-off-by: Pablo Neira Ayuso commit 74cccc3d38438b346e40a4f8133cff3f0839ff84 Author: Pablo Neira Ayuso Date: Tue Jun 30 19:21:11 2020 +0200 netfilter: nf_tables: add NFTA_CHAIN_ID attribute This netlink attribute allows you to refer to chains inside a transaction as an alternative to the name and the handle. The chain binding support requires this new chain ID approach. Signed-off-by: Pablo Neira Ayuso commit f0a5e4d7a594e0fe237d3dfafb069bb82f80f42f Author: Julian Anastasov Date: Wed Jul 1 18:17:19 2020 +0300 ipvs: allow connection reuse for unconfirmed conntrack YangYuxi is reporting that connection reuse is causing one-second delay when SYN hits existing connection in TIME_WAIT state. Such delay was added to give time to expire both the IPVS connection and the corresponding conntrack. This was considered a rare case at that time but it is causing problem for some environments such as Kubernetes. As nf_conntrack_tcp_packet() can decide to release the conntrack in TIME_WAIT state and to replace it with a fresh NEW conntrack, we can use this to allow rescheduling just by tuning our check: if the conntrack is confirmed we can not schedule it to different real server and the one-second delay still applies but if new conntrack was created, we are free to select new real server without any delays. YangYuxi lists some of the problem reports: - One second connection delay in masquerading mode: https://marc.info/?t=151683118100004&r=1&w=2 - IPVS low throughput #70747 https://github.com/kubernetes/kubernetes/issues/70747 - Apache Bench can fill up ipvs service proxy in seconds #544 https://github.com/cloudnativelabs/kube-router/issues/544 - Additional 1s latency in `host -> service IP -> pod` https://github.com/kubernetes/kubernetes/issues/90854 Fixes: f719e3754ee2 ("ipvs: drop first packet to redirect conntrack") Co-developed-by: YangYuxi Signed-off-by: YangYuxi Signed-off-by: Julian Anastasov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 418e787e54a638eb2bf09212a323d920229ee5ef Merge: b0d754ef35041 39b963152469f Author: David S. Miller Date: Fri Jul 3 14:46:25 2020 -0700 Merge branch 'mvpp2-XDP-support' Matteo Croce says: ==================== mvpp2: XDP support Add XDP support to mvpp2. This series converts the driver to the page_pool API for RX buffer management, and adds native XDP support. XDP support comes with extack error reporting and statistics as well. These are the performance numbers, as measured by Sven: SKB fwd page pool: Rx bps 390.38 Mbps Rx pps 762.46 Kpps XDP fwd: Rx bps 1.39 Gbps Rx pps 2.72 Mpps XDP Drop: eth0: 12.9 Mpps eth1: 4.1 Mpps ==================== Signed-off-by: David S. Miller commit 39b963152469fa154b3e1c4ef4ceac3651f56731 Author: Sven Auhagen Date: Thu Jul 2 16:12:44 2020 +0200 mvpp2: xdp ethtool stats Add ethtool statistics for XDP. Signed-off-by: Sven Auhagen Signed-off-by: David S. Miller commit c2d6fe6163de80d7f7cf400ee351f56d6cdb7a5a Author: Matteo Croce Date: Thu Jul 2 16:12:43 2020 +0200 mvpp2: XDP TX support Add the transmit part of XDP support, which includes: - support for XDP_TX in mvpp2_xdp() - .ndo_xdp_xmit hook for AF_XDP and XDP_REDIRECT with mvpp2 as destination mvpp2_xdp_submit_frame() is a generic function which is called by mvpp2_xdp_xmit_back() when doing XDP_TX, and by mvpp2_xdp_xmit when doing AF_XDP or XDP_REDIRECT target. The buffer allocation has been reworked to be able to map the buffers as DMA_FROM_DEVICE or DMA_BIDIRECTIONAL depending if native XDP is in use or not. Co-developed-by: Sven Auhagen Signed-off-by: Sven Auhagen Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 07dd0a7aae7f72af7cec18909581c2bb570edddc Author: Matteo Croce Date: Thu Jul 2 16:12:42 2020 +0200 mvpp2: add basic XDP support Add XDP native support. By now only XDP_DROP, XDP_PASS and XDP_REDIRECT verdicts are supported. Co-developed-by: Sven Auhagen Signed-off-by: Sven Auhagen Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit b27db2274ba8a62512603ba874c1e992fb7de1f4 Author: Matteo Croce Date: Thu Jul 2 16:12:41 2020 +0200 mvpp2: use page_pool allocator Use the page_pool API for memory management. This is a prerequisite for native XDP support. Tested-by: Sven Auhagen Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit 136bcd8425b84ce81bbcf0f4cbefa6735b122d03 Author: Matteo Croce Date: Thu Jul 2 16:12:40 2020 +0200 mvpp2: refactor BM pool init percpu code In mvpp2_swf_bm_pool_init_percpu(), a reference to a struct mvpp2_bm_pool is obtained traversing multiple structs, when a local variable already points to the same object. Fix it and, while at it, give the variable a meaningful name. Signed-off-by: Matteo Croce Signed-off-by: David S. Miller commit b0d754ef35041f921a1a03319b570fdfac9a027e Author: tannerlove Date: Fri Jul 3 14:53:06 2020 -0400 selftests/net: add ipv6 test coverage in rxtimestamp test Add the options --ipv4, --ipv6 to specify running over ipv4 and/or ipv6. If neither is specified, then run both. Signed-off-by: Tanner Love Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit a2116491c8bc47810c74768739e8146401cf8359 Merge: cd8700e45e73c f13a8c3189d7e Author: David S. Miller Date: Fri Jul 3 14:37:33 2020 -0700 Merge branch 'net-ipa-fix-HOLB-timer-register-use' Alex Elder says: ==================== net: ipa: fix HOLB timer register use The function ipa_reg_init_hol_block_timer_val() generates the value to write into the HOL_BLOCK_TIMER endpoint configuration register, to represent a given timeout value (in microseconds). It only supports a timer value of 0 though, in part because that's sufficient, but mainly because there was some confusion about how the register is formatted in newer hardware. I got clarification about the register format, so this series fixes ipa_reg_init_hol_block_timer_val() to work for any supported delay value. The delay is based on the IPA core clock, so determining the value to write for a given period requires access to the current core clock rate. So the first patch just creates a new function to provide that. ==================== Signed-off-by: David S. Miller commit f13a8c3189d7e31b6cb70333ee61365d66974399 Author: Alex Elder Date: Fri Jul 3 16:23:35 2020 -0500 net: ipa: fix HOLB timer calculation For IPA v4.2, the exact interpretation of the register that defines the timeout for avoiding head-of-line blocking was a little unclear. We're only assigning a 0 timeout to it right now, so that wasn't very important. But now that I know how it's supposed to work, I'm fixing it. The register represents a tick counter, where each tick is equal to 128 IPA core clock cycles. For IPA v3.5.1, the register contains a simple counter value. But for IPA v4.2, the register contains two fields, base and scale, which approximate the tick counter as: ticks = base << scale The base and scale values to use for a given tick count are computed using clever bit operations, and measures are taken to make the resulting time period as close as possible to that requested. There's no need for ipa_endpoint_init_hol_block_timer() to return an error, so change its return type to void. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 78b348f3f15bc0c84bd3559be59266a54f313f64 Author: Alex Elder Date: Fri Jul 3 16:23:34 2020 -0500 net: ipa: introduce ipa_clock_rate() Create a new function that returns the current rate of the IPA core clock. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit cd8700e45e73c5e5c32260ebc3092e50c1853e5d Author: Willem de Bruijn Date: Fri Jul 3 16:43:08 2020 -0400 ipv6/ping: set skb->mark on icmpv6 sockets IPv6 ping sockets route based on fwmark, but do not yet set skb->mark. Add this. IPv4 ping sockets also do both. Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller commit 9ff79af3331277c69ac61cc75b2392eb3284e305 Author: Song Liu Date: Fri Jul 3 11:17:19 2020 -0700 selftests/bpf: Fix compilation error of bpf_iter_task_stack.c BPF selftests show a compilation error as follows: libbpf: invalid relo for 'entries' in special section 0xfff2; forgot to initialize global var?.. Fix it by initializing 'entries' to zeros. Fixes: c7568114bc56 ("selftests/bpf: Add bpf_iter test with bpf_get_task_stack()") Reported-by: Jesper Dangaard Brouer Signed-off-by: Song Liu Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200703181719.3747072-1-songliubraving@fb.com commit 8ae4121bd89e3dce27b519ed469efbc15423af18 Author: John Fastabend Date: Thu Jul 2 21:31:59 2020 -0700 bpf: Fix bpftool without skeleton code enabled Fix segfault from bpftool by adding emit_obj_refs_plain when skeleton code is disabled. Tested by deleting BUILD_BPF_SKELS in Makefile. We found this doing backports for Cilium when a testing image pulled in latest bpf-next bpftool, but kept using an older clang-7. # ./bpftool prog show Error: bpftool built without PID iterator support 3: cgroup_skb tag 7be49e3934a125ba gpl loaded_at 2020-07-01T08:01:29-0700 uid 0 Segmentation fault Fixes: d53dee3fe013 ("tools/bpftool: Show info for processes holding BPF map/prog/link/btf FDs") Reported-by: Joe Stringer Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/159375071997.14984.17404504293832961401.stgit@john-XPS-13-9370 commit 91ffb9d3823098e8efea7520ad8082a4bfaee739 Author: Daniel Drown Date: Fri Jul 3 01:22:34 2020 -0500 net/xen-netfront: add kernel TX timestamps This adds kernel TX timestamps to the xen-netfront driver. Tested with chrony on an AWS EC2 instance. Signed-off-by: Daniel Drown Signed-off-by: David S. Miller commit 47ff6154fd234eb9efc353f8b71bcc669ddbde93 Author: Florian Fainelli Date: Thu Jul 2 21:57:00 2020 -0700 net: bcmgenet: Allow changing carrier from user-space The GENET driver interfaces with internal MoCA interface as well as external MoCA chips like the BCM6802/6803 through a fixed link interface. It is desirable for the mocad user-space daemon to be able to control the carrier state based upon out of band messages that it receives from the MoCA chip. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit de2afdcaf4073dc4ebe6fa7238bc59b0f55568be Merge: 8c8278a5b1a81 e62055642797a Author: David S. Miller Date: Fri Jul 3 12:33:16 2020 -0700 Merge tag 'mlx5-updates-2020-07-02' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2020-07-02 Rx and Tx devlink health reporters enhancements. 1) Code cleanup 2) devlink output format improvements 3) Print more useful info on devlink health diagnose output 4) TX timeout recovery, on a single SQ recover failure, stop the loop and reset all rings (re-open netdev). ==================== Signed-off-by: David S. Miller commit 114c9604a59de6f9bbd75964582b6550d314956a Author: Krzysztof Kozlowski Date: Thu Jul 2 17:51:44 2020 +0200 arm64: dts: exynos: Remove generic arm,armv8-pmuv3 compatible The ARM PMU node is described enough with first compatible so remove the arm,armv8-pmuv3 to fix dtschema warnings like: arm-pmu: compatible: Additional items are not allowed ('arm,armv8-pmuv3' was unexpected) arm-pmu: compatible: ['arm,cortex-a57-pmu', 'arm,armv8-pmuv3'] is too long Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar Tested-by: Alim Akhtar commit dac95cef46ad73562d8f6e1d1f6b4f77fed98f01 Author: Krzysztof Kozlowski Date: Thu Jul 2 17:51:43 2020 +0200 arm64: dts: exynos: Describe PWM interrupts on Exynos7 Add interrupts property to PWM node on Exynos7 to describe the hardware fully. No functional change as the interrupts are not used by drivers. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar commit 01ff9ff323665c7a4aa13972a337291bf2d8d24b Author: Krzysztof Kozlowski Date: Mon Jun 29 22:59:48 2020 +0200 ARM: dts: exynos: Fix missing empty reg/ranges property regulators on Trats Remove the regulators node entirely because its children do not have any unit addresses. This fixes DTC warning: Warning (simple_bus_reg): /regulators/regulator-0: missing or empty reg/ranges property Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski commit 643ddb618a5fd1819e790e86be85ae50c2c4abc4 Author: Christoph Fritz Date: Thu Jul 2 23:08:46 2020 +0200 dt-bindings: regulator: Document bindings for fan53880 Add device tree binding information for fan53880 regulator driver. Signed-off-by: Christoph Fritz Link: https://lore.kernel.org/r/20200702210846.31659-3-chf.fritz@googlemail.com Signed-off-by: Mark Brown commit e6dea51e2d41679d37a81d0b1247c039092af46b Author: Christoph Fritz Date: Thu Jul 2 23:08:45 2020 +0200 regulator: fan53880: Add initial support This patch adds support for ON Semiconductor FAN53880 regulator. The FAN53880 is an I2C porgrammable power management IC (PMIC) that contains a BUCK (step-down converter), four LDOs (low dropouts) and one BOOST (step-up converter). It is designed for mobile power applications. Signed-off-by: Christoph Fritz Link: https://lore.kernel.org/r/20200702210846.31659-2-chf.fritz@googlemail.com Signed-off-by: Mark Brown commit a1634a542f74309f843742fa849208bb26e279e4 Author: Gavin Shan Date: Tue Jun 30 16:24:28 2020 +1000 arm64/mm: Redefine CONT_{PTE, PMD}_SHIFT Currently, the value of CONT_{PTE, PMD}_SHIFT is off from standard {PAGE, PMD}_SHIFT. In turn, we have to consider adding {PAGE, PMD}_SHIFT when using CONT_{PTE, PMD}_SHIFT in the function hugetlbpage_init(). It's a bit confusing. This redefines CONT_{PTE, PMD}_SHIFT with {PAGE, PMD}_SHIFT included so that the later values needn't be added when using the former ones in function hugetlbpage_init(). Note that the values of CONT_{PTES, PMDS} are unchanged. Suggested-by: Will Deacon Signed-off-by: Gavin Shan Reviewed-by: Anshuman Khandual Link: https://lkml.org/lkml/2020/5/6/190 Link: https://lore.kernel.org/r/20200630062428.194235-1-gshan@redhat.com Signed-off-by: Catalin Marinas commit 2a379716f3d76aebc5574155de247b547a0214cc Author: Bhupesh Sharma Date: Tue Apr 7 04:01:40 2020 +0530 arm64/defconfig: Enable CONFIG_KEXEC_FILE kexec_file_load() syscall interface is now supported for arm64 architecture as well via commits: 3751e728cef2 ("arm64: kexec_file: add crash dump support") and 3ddd9992a590 ("arm64: enable KEXEC_FILE config")]. This patch enables config KEXEC_FILE by default in the arm64 defconfig, so that user-space tools like kexec-tools can use the same as the default interface for kexec/kdump on arm64. Cc: AKASHI Takahiro Cc: James Morse Cc: Mark Rutland Cc: Will Deacon Cc: kexec@lists.infradead.org Signed-off-by: Bhupesh Sharma Acked-by: Mark Rutland Link: https://lore.kernel.org/r/1586212300-30797-1-git-send-email-bhsharma@redhat.com Signed-off-by: Catalin Marinas commit a9b6f702edc55e5063188093d825feaaa577d14d Merge: 4096d0a541bf2 3bae1719b383c Author: Mark Brown Date: Fri Jul 3 17:33:50 2020 +0100 Merge series "ASoC: fsl: fix kernel-doc" from Pierre-Louis Bossart : This cleanup patchset is only about kernel-doc, mostly trivial edits and format correction. v2: added Nicolin Chen's Acked-by tags and included the three suggested edits. Pierre-Louis Bossart (6): ASoC: fsl: fsl_ssi_dbg: remove spurious kernel-doc comment start ASoC: fsl: fsl_ssi: fix kernel-doc ASoC: fsl: fsl-asoc-card: fix kernel-doc ASoC: fsl: fsl_spdif: fix kernel-doc ASoC: fsl: fsl_asrc: fix kernel-doc ASoC: fsl: fsl_esai: fix kernel-doc sound/soc/fsl/fsl-asoc-card.c | 21 +++++------ sound/soc/fsl/fsl_asrc.c | 57 +++++++++++++++++++--------- sound/soc/fsl/fsl_esai.c | 32 +++++++++------- sound/soc/fsl/fsl_spdif.c | 5 ++- sound/soc/fsl/fsl_ssi.c | 70 ++++++++++++++++++++++------------- sound/soc/fsl/fsl_ssi_dbg.c | 4 +- 6 files changed, 115 insertions(+), 74 deletions(-) -- 2.25.1 commit 4096d0a541bf2878ab4a609d135de7d9fbfe9999 Merge: 45e039d9a67ef 883330c11fa6d Author: Mark Brown Date: Fri Jul 3 17:33:49 2020 +0100 Merge series "ASoC: rt5670: 2 small cleanups" from Hans de Goede : Hi All, Here is in essence a resend of my 2 cleanup patches for the rt5670 ASoC codec code, rebased on top of broonie/sound/for-5.9 with broonie/sound/for-5.8 merged in. Regards, Hans p.s. I'll also send out the patch improving the comment in cht_bsw_rt5672.c cht_codec_fixup() which Pierre-Louis requested soon. commit 45e039d9a67ef0cb69e7bc8c947d683bf029d9a1 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:21:40 2020 -0500 ASoC: fsl: fsl_asrc: fix kernel-doc Fix W=1 warnings. fix kernel doc and describe arguments. Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200702192141.168018-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6ababfc06236e05709e51c27f81b38c38660ec6e Author: Pierre-Louis Bossart Date: Thu Jul 2 14:21:37 2020 -0500 ASoC: fsl: fsl_ssi: fix kernel-doc Fix W=1 warnings. The kernel-doc support is partial, add more descriptions and follow proper syntax Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200702192141.168018-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8182fa9afc8bcecb75d9e7c2d84e11d95903c945 Author: Pierre-Louis Bossart Date: Thu Jul 2 12:28:00 2020 -0500 ASoC: soc-ac97: fix kernel-doc Fix W=1 warning. Add missing arguments Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200702172800.164986-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9e0d21e1210ffe27682a5ef71209af57f975b0d3 Author: Vijendar Mukunda Date: Thu Jul 2 22:56:52 2020 +0530 ASoC: amd: add logic to check dmic hardware runtime Add logic to check DMIC hardware exists or not on the platform at runtime. Add module param for overriding DMIC hardware check at runtime. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1593710826-1106-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 59b44649a8f2380dfbf282db9922ef863c8812a6 Author: Wei Yongjun Date: Fri Jul 3 03:09:10 2020 +0000 ASoC: ti: j721e-evm: Fix missing unlock on error in j721e_audio_hw_params() Add the missing unlock before return from function j721e_audio_hw_params() in the error handling case. Fixes: 6748d0559059 ("ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200703030910.75047-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit 8d3154afc10dd474265b62752cd169f66f40ae0d Author: Anshuman Khandual Date: Fri Jul 3 09:21:37 2020 +0530 arm64/cpufeature: Replace all open bits shift encodings with macros There are many open bits shift encodings for various CPU ID registers that are scattered across cpufeature. This replaces them with register specific sensible macro definitions. This should not have any functional change. Signed-off-by: Anshuman Khandual Reviewed-by: Suzuki K Poulose Cc: Will Deacon Cc: Marc Zyngier Cc: Mark Rutland Cc: James Morse Cc: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1593748297-1965-5-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit 356fdfbe8761da55c4100bd543259f349fc1ca3a Author: Anshuman Khandual Date: Fri Jul 3 09:21:36 2020 +0530 arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR2 register Enable EVT, BBM, TTL, IDS, ST, NV and CCIDX features bits in ID_AA64MMFR2 register as per ARM DDI 0487F.a specification. Suggested-by: Will Deacon Signed-off-by: Anshuman Khandual Reviewed-by: Suzuki K Poulose Cc: Will Deacon Cc: Mark Rutland Cc: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1593748297-1965-4-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit 853772ba8023c25b1caae56b6426ca76dae1eaff Author: Anshuman Khandual Date: Fri Jul 3 09:21:35 2020 +0530 arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR1 register Enable ETS, TWED, XNX and SPECSEI features bits in ID_AA64MMFR1 register as per ARM DDI 0487F.a specification. Suggested-by: Will Deacon Signed-off-by: Anshuman Khandual Reviewed-by: Suzuki K Poulose Cc: Will Deacon Cc: Mark Rutland Cc: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1593748297-1965-3-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit bc67f10ad1d76a30e01c539c0043417fa34648d7 Author: Anshuman Khandual Date: Fri Jul 3 09:21:34 2020 +0530 arm64/cpufeature: Add remaining feature bits in ID_AA64MMFR0 register Enable EVC, FGT, EXS features bits in ID_AA64MMFR0 register as per ARM DDI 0487F.a specification. Suggested-by: Will Deacon Signed-off-by: Anshuman Khandual Reviewed-by: Suzuki K Poulose Cc: Will Deacon Cc: Mark Rutland Cc: Suzuki K Poulose Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1593748297-1965-2-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit 4dca650991e4175b8d5bae7ff6f1637a0c42be4a Author: Michael Guralnik Date: Wed May 20 13:59:06 2020 +0300 net/mlx5: Enable QP number request when creating IPoIB underlay QP If in the process of creating the underlay QP for an IPoIB interface the user has set the address and specifically the 1st-3rd bytes representing the QP number, use the requested QP number when creating the underlay QP. For a user to be able to request a QP number on QP creation, the MKEY_BY_NAME NVCONFIG should be set. As mkey_by_name and qp_by_name are coupled in FW. This requires driver to query the mkey_by_name max cap during initialization and set the current cap if it was enabled in FW. Signed-off-by: Michael Guralnik Reviewed-by: Saeed Mahameed Signed-off-by: Leon Romanovsky commit 3bae1719b383cc97bbfb22c79b8caf2a863a8103 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:21:41 2020 -0500 ASoC: fsl: fsl_esai: fix kernel-doc Fix W=1 warnings. Fix kernel-doc syntax and add missing parameters. Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200702192141.168018-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4674bf0622b38ce38313091dc4226c2451df2ffb Author: Pierre-Louis Bossart Date: Thu Jul 2 14:21:40 2020 -0500 ASoC: fsl: fsl_asrc: fix kernel-doc Fix W=1 warnings. fix kernel doc and describe arguments. Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200702192141.168018-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 28fd6ff1586724cc85166ba2aae2127d913b214b Author: Pierre-Louis Bossart Date: Thu Jul 2 14:21:39 2020 -0500 ASoC: fsl: fsl_spdif: fix kernel-doc Fix W=1 warnings. kernel-doc syntax was not followed and missing parameter Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200702192141.168018-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 31deacffcdba10a1e4f23efd243821d15f0b5325 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:21:38 2020 -0500 ASoC: fsl: fsl-asoc-card: fix kernel-doc Fix W=1 warnings. Kernel-doc syntax was not properly used. Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200702192141.168018-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e3b741918f23d46b3c4974cfa57f4634e2fb9131 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:21:37 2020 -0500 ASoC: fsl: fsl_ssi: fix kernel-doc Fix W=1 warnings. The kernel-doc support is partial, add more descriptions and follow proper syntax Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200702192141.168018-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2f981391756f95037a53421100a1634a30684ad1 Author: Pierre-Louis Bossart Date: Thu Jul 2 14:21:36 2020 -0500 ASoC: fsl: fsl_ssi_dbg: remove spurious kernel-doc comment start Fix W=1 warnings. There is no kernel-doc here. Signed-off-by: Pierre-Louis Bossart Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20200702192141.168018-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 883330c11fa6dca55e30f8612398b3e0abc51dc5 Author: Hans de Goede Date: Fri Jul 3 12:08:23 2020 +0200 ASoC: rt5670: Rename dev_gpio to gpio1_is_irq Rename the not really descriptive dev_gpio quirk / setting to gpio1_is_irq, which describes what it actually does. Signed-off-by: Hans de Goede Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200703100823.258033-3-hdegoede@redhat.com Signed-off-by: Mark Brown commit c14f61a89c1335f95d9b37624ee157fb1fd424ee Author: Hans de Goede Date: Fri Jul 3 12:08:22 2020 +0200 ASoC: rt5670: Remove struct rt5670_platform_data platform_data is an obsolete concept, instead device_properties, set through e.g. device-tree, should be used. struct rt5670_platform_data is only used internally by the rt5670 codec driver, so lets remove it before someone starts relying on it. Signed-off-by: Hans de Goede Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200703100823.258033-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit 12b07256c22399e10590c994f3e93970b7600053 Author: Chris Wilson Date: Fri Jul 3 11:25:19 2020 +0100 drm/i915: Export ppgtt_bind_vma Reuse the ppgtt_bind_vma() for aliasing_ppgtt_bind_vma() so we can reduce some code near-duplication. The catch is that we need to then pass along the i915_address_space and not rely on vma->vm, as they differ with the aliasing-ppgtt. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200703102519.26539-1-chris@chris-wilson.co.uk commit d473f4dc2f95c8c856b1659ced3502802b7d2fbe Author: Maor Gottlieb Date: Sun Jun 21 13:41:47 2020 +0300 RDMA/mlx5: Introduce ODP prefetch counter For debugging purpose it will be easier to understand if prefetch works okay if it has its own counter. Introduce ODP prefetch counter and count per MR the total number of prefetched pages. In addition remove comment which is not relevant anymore and anyway not in the correct place. Link: https://lore.kernel.org/r/20200621104147.53795-1-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 60f2de5ffbf0ed7c0d9789bcc196884427e8cff5 Author: Ondrej Jirman Date: Thu Jul 2 10:14:32 2020 +0200 arm64: dts: sun50i-a64-pinephone: Add touchscreen support Pinephone has a Goodix GT917S capacitive touchscreen controller on I2C0 bus. Add support for it. Signed-off-by: Ondrej Jirman Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20200702081432.1727696-3-megous@megous.com [Maxime: Removed the redundant pinctrl nodes] Signed-off-by: Maxime Ripard commit a6a22f82c90dab8966fc07bd7e798a0680803995 Author: Icenowy Zheng Date: Thu Jul 2 10:14:31 2020 +0200 arm64: dts: sun50i-a64-pinephone: Enable LCD support on PinePhone PinePhone uses PWM backlight and a XBD599 LCD panel over DSI for display. Backlight levels curve was optimized by Martijn Braam using a lux meter. Add its device nodes. Signed-off-by: Icenowy Zheng Signed-off-by: Martijn Braam Signed-off-by: Ondrej Jirman Acked-by: Linus Walleij Link: https://lore.kernel.org/r/20200702081432.1727696-2-megous@megous.com Signed-off-by: Maxime Ripard commit 8eda94bde4ff004a942ed95e6348de711b0e6da9 Author: Alexander A. Klimov Date: Thu Jul 2 22:05:36 2020 +0200 Replace HTTP links with HTTPS ones: vsprintf Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Reviewed-by: Petr Mladek Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200702200536.13389-1-grandmaster@al2klimov.de commit 5cecf5070fd83796ee88189bdd60f9545dfb7d35 Author: Ville Syrjälä Date: Thu Jul 2 18:37:23 2020 +0300 drm/i915/fbc: Allow FBC to recompress after a 3D workload on i85x/i865 Normally i85x/i865 3D activity will block FBC until a 2D blit occurs. I suppose this was meant to avoid recompression while 3D activity is still going on but the frame hasn't yet been presented. Unfortunately that also means that a page flipped 3D workload will permanently block FBC even if it only renders a single frame and then does nothing. Since we are using software render tracking anyway we might as well flip the chicken bit so that 3D does not block FBC. This will avoid the permament FBC blockage in the aforemention use case, but thanks to the software tracking the compressor will not disturb 3D rendering activity. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200702153723.24327-5-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit ddf08d320de6f210adb4f17c8cb91b7543dd99db Author: Ville Syrjälä Date: Thu Jul 2 18:37:22 2020 +0300 drm/i915/fbc: Enable fbc on i865 Unlike all the other pre-snb desktop platforms i865 actually supports FBC. Let's enable it. Quote from the spec: "DevSDG provides the same Run-Length Encoded Frame Buffer Compression (RLEFBC) function as exists in DevMGM." As i865 only has the one pipe we want to skip massaging the plane<->pipe assignment aimed at getting FBC+LVDS working on the mobile platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200702153723.24327-4-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 2a4d632cc03e5a881a1e44bbc9e2f0248ea434d5 Author: Ville Syrjälä Date: Thu Jul 2 18:37:21 2020 +0300 drm/i915/fbc: Fix nuke for pre-snb platforms The MSG_FBC_REND_STATE register only exists on snb+. For older platforms (would also work for snb+) we can simply rewite DSPSURF to trigger a flip nuke. While generally RMW is considered harmful we'll use it here for simplicity. And since FBC doesn't exist in i830 we don't have to worry about the DSPSURF double buffering hardware fails present on that platform. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200702153723.24327-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit e5ec1f95486957f9668da4e1f2b1666c085d307f Author: Ville Syrjälä Date: Thu Jul 2 18:37:20 2020 +0300 drm/i915/fbc: Use the correct plane stride Consult the actual plane stride instead of the fb stride. The two will disagree when we remap the gtt. The plane stride is what the hw will be fed so that's what we should look at for the FBC retrictions/cfb allocation. Since we no longer require a fence we are going to attempt using FBC with remapping, and so we should look at correct stride. With 90/270 degree rotation the plane stride is stored in units of pixels, so we need to conver it to bytes for the purposes of calculating the cfb stride. Not entirely sure if this matches the hw behaviour though. Need to reverse engineer that at some point... We also need to reorder the pixel format check vs. stride check to avoid triggering a spurious WARN(stride & 63) with cpp==1 and plane stride==32. v2: Try to deal with rotated stride and related WARN Cc: José Roberto de Souza Fixes: 691f7ba58d52 ("drm/i915/display/fbc: Make fences a nice-to-have for GEN9+") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200702153723.24327-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 3fe4818e5dbcad466d4f70dba8790a9fc978b9c5 Author: Stanislav Lisovskiy Date: Thu Jul 2 12:15:26 2020 +0300 drm/i915/tgl: Clamp min_cdclk to max_cdclk_freq to unblock 8K We still need "Bump up CDCLK" workaround otherwise getting underruns - however currently it blocks 8K as CDCLK = Pixel rate, in 8K case would require CDCLK to be around 1 Ghz which is not possible. v2: - Convert to expression(max(min_cdclk, min(pixel_rate, max_cdclk)) (Ville Syrjälä) - Use type specific min_t, max_t(Ville Syrjälä) Fixes: 46d53e271cea ("Revert "drm/i915: Remove unneeded hack now for CDCLK"") Signed-off-by: Stanislav Lisovskiy Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200702091526.10096-1-stanislav.lisovskiy@intel.com commit 0ee2872f105b997ba5f09f7fdae542e4cbc1d676 Author: Sven Van Asbroeck Date: Mon Jun 29 15:53:06 2020 -0400 mtd: spi-nor: winbond: Add support for w25q64jvm This chip is (nearly) identical to the Winbond w25q64 which is already supported by Linux. Compared to the w25q64, the 'jvm' has a different JEDEC ID. Signed-off-by: Sven Van Asbroeck [tudor.ambarus@microchip.com: Order entry alphabetically, update subject, update Sven's email address] Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200629195306.1030-1-TheSven73@gmail.com commit 482dcb2a04fdf6d4306e40f2b0537a313a466558 Author: Frieder Schrempf Date: Thu Jul 2 14:05:50 2020 +0000 mtd: spi-nor: macronix: Add support for MX25R1635F The MX25R1635F is the smaller sibling of the MX25R3235F that is already supported. It's only half the size (16Mb). It was tested on the Kontron Electronics i.MX8MM SoM (N8010) using raw read and write from and to the mtd device and the 'flash_erase' command. Signed-off-by: Frieder Schrempf [tudor.ambarus@microchip.com: update subject] Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200702140523.6811-1-frieder.schrempf@kontron.de commit 1d21a0a32f93e24711b13af493ac5fe728a7be1f Author: Geert Uytterhoeven Date: Tue Jun 30 19:15:00 2020 +0200 arm64: defconfig: Enable additional support for Renesas platforms Increase build and test coverage by enabling support for more hardware present on Renesas SoCs and boards: - Renesas Gigabit Ethernet Controller on R-Car V3H, as used on the Condor and V3HSK boards, - Sony IMX219 and OmniVision OV5645 cameras, as used on the AISTARVISION MIPI Adapter V2.1, - Analog Devices ADV7511 HDMI audio, as used on various boards (Condor, Draak, Eagle, Ebisu, V3HSK, and V3MSK). All of the above are modular, except for Ethernet support (HDMI Audio support is an optional feature of the modular ADV7511 driver). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200630171500.11438-1-geert+renesas@glider.be commit fbb4092277d6e6d3379f580dd2247371fe2914b2 Author: Geert Uytterhoeven Date: Tue Jun 30 19:12:37 2020 +0200 ARM: multi_v7_defconfig: Enable additional support for Renesas platforms Increase build and test coverage by enabling support for more hardware present on Renesas SoCs and boards: - Dialog DA9063 PMIC "ONKEY", as used on the Stout and Silk boards, - Renesas RZ/A watchdog timer, as used on RZ/A1H and RZ/A2M boards, - Renesas RZ/A1H Capture Engine Unit, as used on the GR-Peach audiocamera shield expansion board, - Analog Devices ADV7612 HDMI receiver (incl. CEC), as used on the Koelsch and Lager boards, - Renesas RZ/A1H Realtime Clock, as used on the Genmai and RSK+RZA1 boards. All of the above are modular (CEC support is an optional feature of the modular ADV7604 driver). Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20200630171237.11077-1-geert+renesas@glider.be commit ba06216d00275f07dc7750bd21e9c3385e1188aa Author: Michał Winiarski Date: Wed Jul 1 16:27:52 2020 +0200 drm/i915/guc: Expand guc_info debugfs with more information The information about platform/driver/user view of GuC firmware usage currently requires user to either go through kernel log or parse the combination of "enable_guc" modparam and various debugfs entries. Let's keep things simple and add a "supported/used/wanted" matrix (already used internally by i915) in guc_info debugfs. Signed-off-by: Michał Winiarski Cc: Daniele Ceraolo Spurio Cc: Lukasz Fiedorowicz Cc: Michal Wajdeczko Reviewed-by: Lukasz Fiedorowicz Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200701142752.419878-1-michal@hardline.pl commit 1fe541ccef9ffaf654a29d1bfd9206a2c350d11b Author: Lucas De Marchi Date: Thu Jul 2 13:07:14 2020 -0700 drm/i915: do not read swizzle info if unavailable Since gen8 we don't use swizzle anymore. Don't dump registers related to it: registers may or may not be there. v2: pull the rest of driver state reporting before the read out (Chris) Cc: Matt Roper Signed-off-by: Lucas De Marchi Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200702200714.1278-1-lucas.demarchi@intel.com commit f7ce8639f6ff7f9445cb18114282371a41ceb840 Author: Chris Wilson Date: Fri Jul 3 01:43:06 2020 +0100 drm/i915/gem: Split the context's obj:vma lut into its own mutex Rather than reuse the common ctx->mutex for locking the execbuffer LUT, split it into its own lock to avoid being taken [as part of ctx->mutex] at inappropriate times. In particular to avoid the inversion from taking the timeline->mutex for the whole execbuf submission in the next patch. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200703004306.11117-1-chris@chris-wilson.co.uk commit 415abcdfd4b8326d679cd0c78bee00b5ceac9718 Author: Thommy Jakobsson Date: Sun Jun 28 16:12:29 2020 +0200 uio: disable lazy irq disable to avoid double fire uio_pdrv_genirq and uio_dmem_genirq interrupts are handled in userspace. So the condition for the interrupt hasn't normally not been cleared when top half returns. disable_irq_nosync is called in top half, but since that normally is lazy the irq isn't actually disabled. For level triggered interrupts this will always result in a spurious additional fire since the level in to the interrupt controller still is active. The actual interrupt handler isn't run though since this spurious irq is just recorded, and later on discared (for level). This commit disables lazy masking for level triggered interrupts. It leaves edge triggered interrupts as before, because they work with the lazy scheme. All other UIO drivers already seem to clear the interrupt cause at driver levels. Example of double fire. First goes all the way up to uio_pdrv_genirq_handler, second is terminated in handle_fasteoi_irq and marked as pending. -0 [000] d... 8.245870: gic_handle_irq: irq 29 -0 [000] d.h. 8.245873: uio_pdrv_genirq_handler: disable irq 29 -0 [000] d... 8.245878: gic_handle_irq: irq 29 -0 [000] d.h. 8.245880: handle_fasteoi_irq: irq 29 PENDING HInt-34 [001] d... 8.245897: uio_pdrv_genirq_irqcontrol: enable irq 29 Tested on 5.7rc2 using uio_pdrv_genirq and a custom Xilinx MPSoC board. Signed-off-by: Thommy Jakobsson Link: https://lore.kernel.org/r/20200628141229.16121-1-thommyj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7aca462b133300c16213e214bb96e516f1f2784e Author: Esben Haabendal Date: Wed Jul 1 16:56:59 2020 +0200 uio_pdrv_genirq: Allow use with non-page-aligned memory resources Similar to the changes made in 270579d95f82 ("uio_mf624: Align memory regions to page size and set correct offsets"), this will allow uio_pdrv_genirq devices to expose memory regions that is not page-aligned, requiring the users to respect the offset sysfs attribute (as implemented in libuio). Signed-off-by: Esben Haabendal Link: https://lore.kernel.org/r/20200701145659.3978-4-esben@geanix.com Signed-off-by: Greg Kroah-Hartman commit a303e88743f6514995c31fe611011935ea7f040c Author: Harald Freudenberger Date: Fri Jun 12 10:13:23 2020 +0200 s390/zcrypt: provide cex4 cca sysfs attributes for cex3 This patch introduces the sysfs attributes serialnr and mkvps for cex2c and cex3c cards. These sysfs attributes are available for cex4c and higher since commit 7c4e91c0959b ("s390/zcrypt: new sysfs attributes serialnr and mkvps")' and this patch now provides the same for the older cex2 and cex3 cards. Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit dc4b6ded3c17ebe1d7532943192b2308c031c43b Author: Harald Freudenberger Date: Tue May 26 10:49:33 2020 +0200 s390/ap: rename and clarify ap state machine related stuff There is a state machine held for each ap queue device. The states and functions related to this where somethimes noted with _sm_ somethimes without. This patch clarifies and renames all the ap queue state machine related functions, enums and defines to have a _sm_ in the name. There is no functional change coming with this patch - it's only beautifying code. Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 7e202acb5c4397b17e275c017f84e4df34314578 Author: Harald Freudenberger Date: Wed May 20 16:07:19 2020 +0200 s390/zcrypt: split ioctl function into smaller code units The zcrpyt_unlocked_ioctl() function has become large. So split away into new static functions the 4 ioctl ICARSAMODEXPO, ICARSACRT, ZSECSENDCPRB and ZSENDEP11CPRB. This makes the code more readable and is a preparation step for further improvements needed on these ioctls. Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 74ecbef7b90800e368809642ecc671ba4a57ab09 Author: Harald Freudenberger Date: Thu Apr 30 12:23:29 2020 +0200 s390/zcrypt: code beautification and struct field renames Some beautifications related to the internal only used struct ap_message and related code. Instead of one int carrying only the special flag now a u32 flags field is used. At struct CPRBX the pointers to additional data are now marked with __user. This caused some changes needed on code, where these structs are also used within the zcrypt misc functions. The ica_rsa_* structs now use the generic types __u8, __u32, ... instead of char, unsigned int. zcrypt_msg6 and zcrypt_msg50 use min_t() instead of min(). Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 47c07bffeb32aa2a8e798d8ce25fa693e1364e11 Author: Harald Freudenberger Date: Tue Jun 30 09:54:50 2020 +0200 s390/zcrypt: fix smatch warnings Fix these smatch warnings: zcrypt_api.c:986 _zcrypt_send_ep11_cprb() error: uninitialized symbol 'pref_weight'. zcrypt_api.c:1008 _zcrypt_send_ep11_cprb() error: uninitialized symbol 'weight'. zcrypt_api.c:676 zcrypt_rsa_modexpo() error: uninitialized symbol 'pref_weight'. zcrypt_api.c:694 zcrypt_rsa_modexpo() error: uninitialized symbol 'weight'. zcrypt_api.c:760 zcrypt_rsa_crt() error: uninitialized symbol 'pref_weight'. zcrypt_api.c:778 zcrypt_rsa_crt() error: uninitialized symbol 'weight'. zcrypt_api.c:824 _zcrypt_send_cprb() warn: always true condition '(tdom >= 0) => (0-u16max >= 0)' zcrypt_api.c:846 _zcrypt_send_cprb() error: uninitialized symbol 'pref_weight'. zcrypt_api.c:867 _zcrypt_send_cprb() error: uninitialized symbol 'weight'. zcrypt_api.c:1065 zcrypt_rng() error: uninitialized symbol 'pref_weight'. zcrypt_api.c:1079 zcrypt_rng() error: uninitialized symbol 'weight'. zcrypt_cex4.c:251 ep11_card_op_modes_show() warn: should '(1 << ep11_op_modes[i]->mode_bit)' be a 64 bit type? zcrypt_cex4.c:346 ep11_queue_op_modes_show() warn: should '(1 << ep11_op_modes[i]->mode_bit)' be a 64 bit type? Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit c6337c6e89a695819d94949a7170e1bd0d131e31 Author: Harald Freudenberger Date: Tue Jun 30 09:42:23 2020 +0200 s390/pkey: fix smatch warning inconsistent indenting Fix smatch warnings: pkey_api.c:1606 pkey_ccacipher_aes_attr_read() warn: inconsistent indenting Reported-by: kernel test robot Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 0ef5d691aae0322cbab0807c184ba534536a4698 Author: David Hildenbrand Date: Tue Jun 30 10:42:40 2020 +0200 s390/extmem: remove stale -ENOSPC comment and handling segment_load() will no longer return -ENOSPC. If a segment overlaps with storage, we now also return -EBUSY. Remove the stale comment from __segment_load() and the stale handling from segment_warning(). Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Andrew Morton Suggested-by: Gerald Schaefer Signed-off-by: David Hildenbrand Message-Id: <20200630084240.8283-1-david@redhat.com> Signed-off-by: Heiko Carstens commit 8e1398f8987851bb266c1d8d911752a18e1d05b4 Author: Heiko Carstens Date: Wed Jul 1 11:17:52 2020 +0200 s390/smp: add missing linebreak Signed-off-by: Heiko Carstens commit 24840e76bf8a679d26d373a0edc44284bfd9dc18 Author: Heiko Carstens Date: Wed Jul 1 11:16:16 2020 +0200 s390/smp: move smp_cpus_done() to header file Saves us a couple of bytes. Signed-off-by: Heiko Carstens commit 14442181d20490945f341644bb8257e334b01447 Author: Jérôme Pouiller Date: Wed Jul 1 17:07:07 2020 +0200 staging: wfx: always enable FastPs in combo with new firmwares When multiple interface on different channels are in use. It is necessary to advertise the AP that the device is no more awake before to switch to the other channel. Until now, PS-Poll was the preferred mechanism for that. However. The new firmwares (>= 3.7) now nicely support FastPS. FastPS improves bandwidth and compatibility with AP. This patch drop the complex and rarely used mechanism introduced in the commit dd5eba1bb5b4f ("staging: wfx: fix support for AP that do not support PS-Poll") and use FastPS as soon as it is possible. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-14-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 01d2ffa4d916d5884c89b1db0d79fd43c08bb708 Author: Jérôme Pouiller Date: Wed Jul 1 17:07:06 2020 +0200 staging: wfx: add a debugfs entry to force ps_timeout In some advanced usage or debug scenarios, it could interesting to change the value of ps_timeout or eventually to force use of PS-Poll frames. The wext API (used by iwconfig) provide a way to change ps_timeout. However, this API is obsolete and it seems a little weird to use (it seems it does apply the change, so the user have to disable then re-enable de power save) On side of nl80211, there is no way to change the ps_timeout. This patch provides a file in debugfs to change the value of ps_timeout. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-13-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit e5da5fbd7741162c51a70ffad4316be12e1bb010 Author: Jérôme Pouiller Date: Wed Jul 1 17:07:05 2020 +0200 staging: wfx: fix CCMP/TKIP replay protection To enable the TKIP/CCMP replay protection, the frames has to be processed in the right order. However, the device is not able to re-order the frames during BlockAck sessions. Mac80211 is able to reorder the frames, but it need the information about the BlockAck sessions start and stop. Unfortunately, since the BlockAck is fully handled by the hardware, these frames were not forwarded to the host. So, if the driver ask to mac80211 to apply the replay protection, it drop all misordered frames. So, until now, the driver explicitly asked to mac80211 to not apply the CCMP/TKIP replay protection. The situation has changed with the API 3.4 of the device firmware. The firmware forward the BlockAck information. Mac80211 is now able to correctly reorder the frames. There is no more reasons to drop cryptographic data. This patch also impact the older firmwares. There will be a performance impact on these firmware (since the misordered frames will dropped). However, we can't keep the replay protection disabled. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-12-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit bbc409e276c948a7acda32cab5d8f26335c34ac0 Author: Jérôme Pouiller Date: Wed Jul 1 17:07:04 2020 +0200 staging: wfx: simplify handling of encrypted frames We don't want mac80211 try to check MMIC and other security mechanisms. So, the driver remove all the data related to the encryption (IV, ICV, MMIC). However, enabling RX_FLAG_PN_VALIDATED is sufficient for that. So, drop the useless function wfx_drop_encrypt_data() and enable RX_FLAG_PN_VALIDATED. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-11-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 6135ad0eeae9a3e9363fbb518c2815f0976fc20b Author: Jérôme Pouiller Date: Wed Jul 1 17:07:03 2020 +0200 staging: wfx: fix handling of frames without RSSI data It seems that in the old days, the RSSI information could be missing. In this case, in order to not pollute the RSSI stats, the frame was dropped (!). It is far better to mark the frame with the flag RX_FLAG_NO_SIGNAL_VAL. In add, the problem seems now fixed in the firmware (at least, it has not been encountered with recent firmwares). Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-10-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b9aa17505f3523b44c037eb44e01c78f277f5ef1 Author: Jérôme Pouiller Date: Wed Jul 1 17:07:02 2020 +0200 staging: wfx: drop counter of buffered frames Since the driver does not call ieee80211_sta_set_buffered() anymore, it is no more necessary to maintain a counter of buffered frames for each stations. This change allows to simplify the processing in multiple places in the driver. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit da0ce565667a997c74240718c44de16257638b23 Author: Jérôme Pouiller Date: Wed Jul 1 17:07:01 2020 +0200 staging: wfx: fix unexpected calls to ieee80211_sta_set_buffered() When a station go to sleep, the driver receive the status REQUEUE and forward this answer to mac80211. So, neither the driver, neither the hardware buffer the frames. So the call to ieee80211_sta_set_buffered is useless. In add, it seems that mac80211 does not expect to receive ieee80211_sta_set_buffered(false) after the station is asleep(). When the device send data to a station, the following sequence can be observed: - Mac80211 call wfx_sta_notify(awake). - The driver calls ieee80211_sta_set_buffered(true). Since the station is awake, its TIM is not set. - Mac80211 receive a power save notification from the station, so it calls wfx_sta_notify(asleep). - Then, since the driver has declared it has buffered some frames, the TIM of the station should be set. This action is delayed by mac80211. - The device also notice the station go to sleep. It replies the REQUEUE status for the buffered frames. The driver forward this status to mac80211. - There is no more frames in queues, so the driver call ieee80211_sta_set_buffered(false). - Mac80211 updates the TIM but since there is no frames buffered by the driver, it set the TIM for the station to 0. Anyway, correctly use the ieee80211_sta_set_buffered() API solves the problem. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-8-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 9b8a9e6c2cb52374fed526e7db1961069fcd55ad Author: Jérôme Pouiller Date: Wed Jul 1 17:07:00 2020 +0200 staging: wfx: improve protection against malformed HIF messages As discussed here[1], if a message was smaller than the size of the message header, it could be incorrectly processed. [1] https://lore.kernel.org/driverdev-devel/2302785.6C7ODC2LYm@pc-42/ Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-7-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit a9408ad79ff3d77542a5cfdd76d21fd12bf8b46a Author: Jérôme Pouiller Date: Wed Jul 1 17:06:59 2020 +0200 staging: wfx: load the firmware faster During the loading of the firmware, the WFX_DCA_GET register provide the number available bytes in the receiving buffer. It is not necessary to access to the WFX_DCA_GET after sent of each firmware fragment. This patch allows to send the firmware: - in 64ms instead of 130ms using SDIO bus - in 78ms instead of 115ms using SPI bus Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-6-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit b64d1054bccbbcb435901e20f564292214373f87 Author: Jérôme Pouiller Date: Wed Jul 1 17:06:58 2020 +0200 staging: wfx: add tracepoint "queues_stats" It is useful to check which queue the driver choose to send to the hardware. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-5-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 70a37a09db9c8187e94108d875513c18000bb8d9 Author: Jérôme Pouiller Date: Wed Jul 1 17:06:57 2020 +0200 staging: wfx: correctly retrieve vif ID from Tx confirmation The device is able to send multiple Tx confirmations in the one reply. In this case, there is only one vif identifier for all the confirmations. Unfortunately, to generate this kind of messages the device squashes all the confirmations whatever their vif ID and use the vif ID of the first confirmation. So, the driver cannot rely on the vif ID mentioned in the header. Fortunately, using the packet_id, the driver can retrieve the Tx request and the associated vif. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-4-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit df6f08d3faec5ce603d531dbe9660f391a50af9d Author: Jérôme Pouiller Date: Wed Jul 1 17:06:56 2020 +0200 staging: wfx: check the vif ID of the Tx confirmations When the driver has sent a frame on a virtual interface (vif), it expects to receive the confirmation on the same vif. This patch add a check for that. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-3-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 2a30cb163449b91eb65b7ad971198550c6a16f97 Author: Jérôme Pouiller Date: Wed Jul 1 17:06:55 2020 +0200 staging: wfx: associate tx_queues to vifs The device handles 4 queues (one per AC) for each virtual interface (and maximum 4 virtual interfaces). Until now the driver unified the queue of all interfaces and handled only 4 queues for whole device. This architecture did not allow to balance the traffic between the vif. So, this patch relocate the queues into the vif and change the API accordingly. Signed-off-by: Jérôme Pouiller Link: https://lore.kernel.org/r/20200701150707.222985-2-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman commit 7566103ea5dd7a4062d604c70b5c180711e80219 Author: Suraj Upadhyay Date: Thu Jul 2 14:10:22 2020 +0530 staging: qlge: qlge_ethtool.c: Proper indentation. Remove extra indentations from if-statement. Signed-off-by: Suraj Upadhyay Link: https://lore.kernel.org/r/20200702084022.GA1586@blackclown Signed-off-by: Greg Kroah-Hartman commit 0f6ba599691fecf898daf445f49c932a1413bb73 Author: Mauro Dreissig Date: Wed Jul 1 18:44:20 2020 -0300 staging: rtl8712: base_types: Remove unused macros Those #define's are not used anywhere, get rid of them. Signed-off-by: Mauro Dreissig Link: https://lore.kernel.org/r/20200701214420.5566-3-mukadr@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2becc421c9f5d161a06869066336b02874533380 Author: Mauro Dreissig Date: Wed Jul 1 18:44:19 2020 -0300 staging: rtl8712: Replace FIELD_OFFSET() with offsetof() Use the existing offsetof() macro instead of duplicating code. Signed-off-by: Mauro Dreissig Link: https://lore.kernel.org/r/20200701214420.5566-2-mukadr@gmail.com Signed-off-by: Greg Kroah-Hartman commit bd7a168a024dcfbc4db7fb79a51c8b574f55b527 Author: Michael Straube Date: Wed Jul 1 18:42:13 2020 +0200 staging: rtl8712: use common ieee80211 constants Many defined constants in wifi.h are unused and/or available from , some with slightly different names. Use the common ones, rename where necessary and remove unused. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200701164213.4205-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit ee53f6dd709ed2c55c3603beeec494b02c5831c3 Author: Simon Fong Date: Thu Jul 2 23:44:20 2020 +0800 staging: rtl8188eu: Fix WARNINGs of Block comments Fixed 5 WARNINGs of Block comments use * on subsequent lines. Signed-off-by: Simon Fong Link: https://lore.kernel.org/r/239f5c7f4761dd2ef0df8ee6966fca8ed2a13a9c.1593703689.git.simon.fodin@gmail.com Signed-off-by: Greg Kroah-Hartman commit d9ff039a29dd36e962c808cded1547ced3beafd6 Author: Simon Fong Date: Thu Jul 2 23:44:19 2020 +0800 staging: rtl8188eu: Fix CHECK of coding style Fixed a CHECK of Lines should not end with a '('. Signed-off-by: Simon Fong Link: https://lore.kernel.org/r/9f1f9d7d4723aa8d9bc2d7149fd01aacc1191860.1593703689.git.simon.fodin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 40c79667166b6eae6f9bcc6b576ca3f24d925b1b Author: Michael Straube Date: Wed Jul 1 20:29:57 2020 +0200 staging: rtl8188eu: use common ieee80211 constants Many defined constants in wifi.h are unused and/or available from , some with slightly different names. Use the common ones, rename where necessary and remove unused. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200701182957.7932-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 69b2e08a8b0a332f0a257864acf52a9c9aebc3c4 Author: Michael Straube Date: Wed Jul 1 18:54:59 2020 +0200 staging: rtl8188eu: remove unused parameter Remove unused parameter 'padapter' from rtw_os_xmit_resource_alloc(). Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200701165459.8904-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 768a0741284315d3a454f5f4e2fa88f62b5abfe9 Author: Lee Jones Date: Thu Jul 2 15:46:05 2020 +0100 usb: dwc2: gadget: Remove assigned but never used 'maxsize' The value of 'maxsize' has not been checked since commit 729cac693eecf ("usb: dwc2: Change ISOC DDMA flow") back in 2018, so remove the set but unused variable, which fixes the following W=1 kernel build warning: drivers/usb/dwc2/gadget.c: In function ‘dwc2_gadget_fill_isoc_desc’: drivers/usb/dwc2/gadget.c:885:6: warning: variable ‘maxsize’ set but not used [-Wunused-but-set-variable] 885 | u32 maxsize = 0; | ^~~~~~~ Cc: Minas Harutyunyan Cc: Ben Dooks Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8c4a09cb1bfb84eb4acc88eb5eb5709b76403f9e Author: Greg Kroah-Hartman Date: Thu Jul 2 09:29:14 2020 +0200 USB: phy: fsl-usb: remove character device usage No idea why this driver is using a char device node, statically allocated, with no dynamic allocation or hook up with devtmpfs, along with a reserverd major number, for "special" operations, not all of which ever were implemented. So just rip it out, as no one must be using it because no modern system will ever actually create the /dev/ node it needs. Cc: Felipe Balbi Reviewed-by: Ran Wang Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20200702072914.1072878-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit cc72a2ca1f2ab075d56fc38ba941c4240968f963 Author: Greg Kroah-Hartman Date: Thu Jul 2 09:29:13 2020 +0200 USB: phy: fsl-usb: remove sysfs abuse This file has a HUGE debugging sysfs file that spews out a lot of information all at once, which violates the one-value-per-file rule for sysfs. If this is really needed, it should go into debugfs, but given the age of this driver, I strongly doubt anyone is using it anymore. So just remove the file entirely, it was never documented, so obviously, no one actually needed it :) Cc: Felipe Balbi Reviewed-by: Ran Wang Link: https://lore.kernel.org/r/20200702072914.1072878-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b83d027ceda10e722a1195974f2995a6a5635332 Author: Peter Chen Date: Fri Jul 3 14:39:24 2020 +0800 MAINTAINERS: add freescale USB PHY driver entry Add freescale USB PHY driver entry Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20200703063924.29799-1-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit 6181aa1bc446e2fa48ed4f2ff97a4e0503c8931b Author: Lee Jones Date: Thu Jul 2 15:46:18 2020 +0100 usb: host: oxu210hp-hcd: Move declaration of 'qtd' into 'ifdef OXU_URB_TRACE' If we assign 'epnum' during the declaration we can also avoid "ISO C90 forbids mixed declarations" issues. So it does looks like we can have our cake and eat it in this scenario. Fixes the following W=1 kernel build warning(s): drivers/usb/host/oxu210hp-hcd.c: In function ‘submit_async’: drivers/usb/host/oxu210hp-hcd.c:2040:19: warning: variable ‘qtd’ set but not used [-Wunused-but-set-variable] 2040 | struct ehci_qtd *qtd; | ^~~ Cc: Masahiro Yamada Cc: Rodolfo Giometti Cc: "Eurotech S.p.A" Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-24-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit aa88cddf4c9e03224db794168fa34501657ec3d6 Author: Lee Jones Date: Thu Jul 2 15:46:25 2020 +0100 usb: c67x00: c67x00-sched: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/c67x00/c67x00-sched.c:35: warning: Function parameter or member 'queue' not described in 'c67x00_ep_data' drivers/usb/c67x00/c67x00-sched.c:35: warning: Function parameter or member 'node' not described in 'c67x00_ep_data' drivers/usb/c67x00/c67x00-sched.c:35: warning: Function parameter or member 'hep' not described in 'c67x00_ep_data' drivers/usb/c67x00/c67x00-sched.c:35: warning: Function parameter or member 'dev' not described in 'c67x00_ep_data' drivers/usb/c67x00/c67x00-sched.c:35: warning: Function parameter or member 'next_frame' not described in 'c67x00_ep_data' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'ly_base_addr' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'port_length' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'pid_ep' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'dev_addr' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'ctrl_reg' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'status' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'retry_cnt' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'residue' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'next_td_addr' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'td_list' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'td_addr' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'data' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'urb' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'privdata' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'ep_data' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:71: warning: Function parameter or member 'pipe' not described in 'c67x00_td' drivers/usb/c67x00/c67x00-sched.c:137: warning: Function parameter or member 'c67x00' not described in 'dbg_td' drivers/usb/c67x00/c67x00-sched.c:137: warning: Function parameter or member 'td' not described in 'dbg_td' drivers/usb/c67x00/c67x00-sched.c:137: warning: Function parameter or member 'msg' not described in 'dbg_td' drivers/usb/c67x00/c67x00-sched.c:169: warning: Function parameter or member 'a' not described in 'frame_add' drivers/usb/c67x00/c67x00-sched.c:169: warning: Function parameter or member 'b' not described in 'frame_add' drivers/usb/c67x00/c67x00-sched.c:177: warning: Function parameter or member 'a' not described in 'frame_after' drivers/usb/c67x00/c67x00-sched.c:177: warning: Function parameter or member 'b' not described in 'frame_after' drivers/usb/c67x00/c67x00-sched.c:186: warning: Function parameter or member 'a' not described in 'frame_after_eq' drivers/usb/c67x00/c67x00-sched.c:186: warning: Function parameter or member 'b' not described in 'frame_after_eq' drivers/usb/c67x00/c67x00-sched.c:199: warning: Function parameter or member 'c67x00' not described in 'c67x00_release_urb' drivers/usb/c67x00/c67x00-sched.c:199: warning: Function parameter or member 'urb' not described in 'c67x00_release_urb' drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'c67x00' not described in 'c67x00_create_td' drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'urb' not described in 'c67x00_create_td' drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'data' not described in 'c67x00_create_td' drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'len' not described in 'c67x00_create_td' drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'pid' not described in 'c67x00_create_td' drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'toggle' not described in 'c67x00_create_td' drivers/usb/c67x00/c67x00-sched.c:566: warning: Function parameter or member 'privdata' not described in 'c67x00_create_td' drivers/usb/c67x00/c67x00-sched.c:692: warning: Function parameter or member 'c67x00' not described in 'c67x00_add_ctrl_urb' drivers/usb/c67x00/c67x00-sched.c:692: warning: Function parameter or member 'urb' not described in 'c67x00_add_ctrl_urb' drivers/usb/c67x00/c67x00-sched.c:830: warning: Function parameter or member 'c67x00' not described in 'c67x00_parse_td' drivers/usb/c67x00/c67x00-sched.c:830: warning: Function parameter or member 'td' not described in 'c67x00_parse_td' drivers/usb/c67x00/c67x00-sched.c:978: warning: Function parameter or member 'c67x00' not described in 'c67x00_check_td_list' drivers/usb/c67x00/c67x00-sched.c:1052: warning: Function parameter or member 'c67x00' not described in 'c67x00_send_td' drivers/usb/c67x00/c67x00-sched.c:1052: warning: Function parameter or member 'td' not described in 'c67x00_send_td' drivers/usb/c67x00/c67x00-sched.c:1088: warning: Function parameter or member 'c67x00' not described in 'c67x00_do_work' Cc: Peter Korsgaard Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-31-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit aa37c246f292b1fe7e5cd3767188ada553a3770f Author: Lee Jones Date: Thu Jul 2 15:46:24 2020 +0100 usb: class: usbtmc: File headers are not good candidates for kerneldoc Demote usbtmc's file header to a standard comment block. Fixes the following W=1 kernel build warning(s): drivers/usb/class/usbtmc.c:11: warning: Function parameter or member 'fmt' not described in 'pr_fmt' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-30-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b5993881e27c01f38ae6f827c59ef8dec4c1bddc Author: Lee Jones Date: Thu Jul 2 15:46:21 2020 +0100 usb: c67x00: c67x00-ll-hpi: Demote obvious misuse of kerneldoc to standard comment blocks No attempt has been made to document any of the functions here. Fixes the following W=1 kernel build warning(s): drivers/usb/c67x00/c67x00-ll-hpi.c:269: warning: Function parameter or member 'sie' not described in 'c67x00_ll_usb_clear_status' drivers/usb/c67x00/c67x00-ll-hpi.c:269: warning: Function parameter or member 'bits' not described in 'c67x00_ll_usb_clear_status' drivers/usb/c67x00/c67x00-ll-hpi.c:404: warning: Function parameter or member 'dev' not described in 'c67x00_ll_write_mem_le16' drivers/usb/c67x00/c67x00-ll-hpi.c:404: warning: Function parameter or member 'addr' not described in 'c67x00_ll_write_mem_le16' drivers/usb/c67x00/c67x00-ll-hpi.c:404: warning: Function parameter or member 'data' not described in 'c67x00_ll_write_mem_le16' drivers/usb/c67x00/c67x00-ll-hpi.c:404: warning: Function parameter or member 'len' not described in 'c67x00_ll_write_mem_le16' drivers/usb/c67x00/c67x00-ll-hpi.c:443: warning: Function parameter or member 'dev' not described in 'c67x00_ll_read_mem_le16' drivers/usb/c67x00/c67x00-ll-hpi.c:443: warning: Function parameter or member 'addr' not described in 'c67x00_ll_read_mem_le16' drivers/usb/c67x00/c67x00-ll-hpi.c:443: warning: Function parameter or member 'data' not described in 'c67x00_ll_read_mem_le16' drivers/usb/c67x00/c67x00-ll-hpi.c:443: warning: Function parameter or member 'len' not described in 'c67x00_ll_read_mem_le16' Cc: Peter Korsgaard Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-27-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8709e36729ef540dc5615c3392667547fe0d1ed5 Author: Lee Jones Date: Thu Jul 2 15:46:20 2020 +0100 usb: mtu3: mtu3_core: Demote obvious misuse of kerneldoc to standard comment block No attempt has been made to document the function. Fixes the following W=1 kernel build warning(s): drivers/usb/mtu3/mtu3_core.c:805: warning: Function parameter or member 'mtu' not described in 'mtu3_set_dma_mask' Cc: Chunfeng Yun Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-26-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit ff5e445e8533ec87fcf01f260ab8ee405efc3a9a Author: Lee Jones Date: Thu Jul 2 15:46:17 2020 +0100 usb: cdns3: ep0: Move 'zlp' description to appropriate function header 'zlp' was documented, but in the wrong place. Fixes the following W=1 kernel build warning(s): drivers/usb/cdns3/ep0.c:36: warning: Function parameter or member 'zlp' not described in 'cdns3_ep0_run_transfer' drivers/usb/cdns3/ep0.c:705: warning: Excess function parameter 'zlp' description in 'cdns3_gadget_ep0_queue' Cc: Pawel Laszczak Cc: Pawel Jez Cc: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-23-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9dac16e448a399b154e4a981be9dc0ad065bdb08 Author: Lee Jones Date: Thu Jul 2 15:46:16 2020 +0100 usb: host: ohci: Mark cc_to_error as __maybe_unused drivers/usb/host/ohci.h in included by a whole much of different sourcefiles. Not all of them make use of cc_to_error. So mark it as __maybe_used to convey that this behaviour is not only acceptable it's expected. Fixes the following kernel build warning(s): In file included from drivers/usb/host/ohci-pci.c:25: drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=] 165 | static const int cc_to_error 1 = { | ^~~~~~~~~~~ In file included from drivers/usb/host/ohci-platform.c:32: drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=] 165 | static const int cc_to_error 1 = { | ^~~~~~~~~~~ In file included from drivers/usb/host/ohci-exynos.c:20: drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=] 165 | static const int cc_to_error 1 = { | ^~~~~~~~~~~ In file included from drivers/usb/host/ohci-spear.c:22: drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=] 165 | static const int cc_to_error 1 = { | ^~~~~~~~~~~ In file included from drivers/usb/host/ohci-st.c:26: drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=] 165 | static const int cc_to_error 1 = { | ^~~~~~~~~~~ In file included from drivers/usb/host/ohci-at91.c:31: drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=] 165 | static const int cc_to_error 1 = { | ^~~~~~~~~~~ In file included from drivers/usb/host/ohci-s3c2410.c:32: drivers/usb/host/ohci.h:165:18: warning: ‘cc_to_error’ defined but not used [-Wunused-const-variable=] 165 | static const int cc_to_error 1 = { | ^~~~~~~~~~~ Cc: Alan Stern Cc: Roman Weissgaerber Cc: David Brownell Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-22-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f73a8db011441654f9ccd97405757cd95405c86f Author: Lee Jones Date: Thu Jul 2 15:46:15 2020 +0100 usb: host: ohci-at91: Demote kerneldoc headers down to basic comment blocks Neither usb_hcd_at91_probe() nor usb_hcd_at91_remove()'s function headers reach the standards required of a kerneldoc entry. Only one attempt at describing an argument was made, as it is not correct (we're removing that too to save confusion). Fixes the following kernel build warning(s): drivers/usb/host/ohci-at91.c:166: warning: Function parameter or member 'driver' not described in 'usb_hcd_at91_probe' drivers/usb/host/ohci-at91.c:166: warning: Function parameter or member 'pdev' not described in 'usb_hcd_at91_probe' drivers/usb/host/ohci-at91.c:259: warning: Function parameter or member 'hcd' not described in 'usb_hcd_at91_remove' drivers/usb/host/ohci-at91.c:259: warning: Function parameter or member 'pdev' not described in 'usb_hcd_at91_remove' drivers/usb/host/ohci-at91.c:259: warning: Excess function parameter 'dev' description in 'usb_hcd_at91_remove' Cc: Alan Stern Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: Thibaut VARENE Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-21-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 048715c070bc3226bbf56c37d1a8ec4aee215ff7 Author: Lee Jones Date: Thu Jul 2 15:46:14 2020 +0100 usb: host: isp1362: Mark the many unused ISP1362_REG entries as __maybe_unused It would seem a shame to strip out all of the unused register entries, since they can act as a fair source of documentation. Instead, mark them all as __maybe_unused to show the build system that this behaviour is known and intentional. Fixes the following kernel build warning(s): In file included from drivers/usb/host/isp1362-hcd.c:96: drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGALTTMR’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:199:1: note: in expansion of macro ‘ISP1362_REG’ 199 | ISP1362_REG(OTGALTTMR, 0x6C, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGTIMER’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:198:1: note: in expansion of macro ‘ISP1362_REG’ 198 | ISP1362_REG(OTGTIMER, 0x6A, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGINTENB’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:197:1: note: in expansion of macro ‘ISP1362_REG’ 197 | ISP1362_REG(OTGINTENB, 0x69, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGINT’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:196:1: note: in expansion of macro ‘ISP1362_REG’ 196 | ISP1362_REG(OTGINT, 0x68, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGSTATUS’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:195:1: note: in expansion of macro ‘ISP1362_REG’ 195 | ISP1362_REG(OTGSTATUS, 0x67, REG_WIDTH_16, REG_ACCESS_R); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_OTGCONTROL’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:194:1: note: in expansion of macro ‘ISP1362_REG’ 194 | ISP1362_REG(OTGCONTROL, 0x62, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCATLPORT’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:183:1: note: in expansion of macro ‘ISP1362_REG’ 183 | ISP1362_REG(HCATLPORT, 0x44, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCINTLPORT’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:175:1: note: in expansion of macro ‘ISP1362_REG’ 175 | ISP1362_REG(HCINTLPORT, 0x43, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCISTL1PORT’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:171:1: note: in expansion of macro ‘ISP1362_REG’ 171 | ISP1362_REG(HCISTL1PORT, 0x42, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCISTL0PORT’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:170:1: note: in expansion of macro ‘ISP1362_REG’ 170 | ISP1362_REG(HCISTL0PORT, 0x40, REG_WIDTH_16, REG_ACCESS_RW); | ^~~~~~~~~~~ drivers/usb/host/isp1362.h:59:22: warning: ‘ISP1362_REG_HCINTDIS’ defined but not used [-Wunused-const-variable=] 59 | static isp1362_reg_t ISP1362_REG_##name = addr | ^~~~~~~~~~~~ drivers/usb/host/isp1362.h:77:1: note: in expansion of macro ‘ISP1362_REG’ 77 | ISP1362_REG(HCINTDIS, 0x05, REG_WIDTH_32, REG_ACCESS_RW); | ^~~~~~~~~~~ Cc: "by L. Wassmann" Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-20-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 26ef796f9306ce82fbd7c7f0142ed4674698a333 Author: Lee Jones Date: Thu Jul 2 15:46:13 2020 +0100 usb: dwc3: dwc3-of-simple: Function headers are not good candidates for kerneldoc Fixes the following kernel build warning(s): drivers/usb/dwc3/dwc3-of-simple.c:25: warning: cannot understand function prototype: 'struct dwc3_of_simple ' Cc: Felipe Balbi Cc: iivanov@mm-sol.com Cc: Sundeep Bhatta Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-19-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4a35aa6d3c626bcc23639a1113e3bf0925788e14 Author: Lee Jones Date: Thu Jul 2 15:46:12 2020 +0100 usb: cdns3: gadget: Fix a bunch of kernel doc issues Mainline misspelled function argument descriptions. Also one formatting issue with a missing '@' identifier. Fixes the following W=1 build warnings: drivers/usb/cdns3/gadget.c:653: warning: Function parameter or member 'priv_ep' not described in 'cdns3_wa2_descmissing_packet' drivers/usb/cdns3/gadget.c:653: warning: Excess function parameter 'priv_dev' description in 'cdns3_wa2_descmissing_packet' drivers/usb/cdns3/gadget.c:1088: warning: Function parameter or member 'request' not described in 'cdns3_ep_run_transfer' drivers/usb/cdns3/gadget.c:2574: warning: Function parameter or member 'priv_ep' not described in '__cdns3_gadget_ep_set_halt' drivers/usb/cdns3/gadget.c:2574: warning: Excess function parameter 'ep' description in '__cdns3_gadget_ep_set_halt' drivers/usb/cdns3/gadget.c:2595: warning: Function parameter or member 'priv_ep' not described in '__cdns3_gadget_ep_clear_halt' drivers/usb/cdns3/gadget.c:2595: warning: Excess function parameter 'ep' description in '__cdns3_gadget_ep_clear_halt' drivers/usb/cdns3/gadget.c:2898: warning: Function parameter or member 'priv_dev' not described in 'cdns3_init_eps' drivers/usb/cdns3/gadget.c:2898: warning: Excess function parameter 'cdns3' description in 'cdns3_init_eps' drivers/usb/cdns3/gadget.c:3210: warning: Function parameter or member 'cdns' not described in 'cdns3_gadget_init' Cc: Pawel Laszczak Cc: Pawel Jez Cc: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-18-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 4d72cf0cb9e23374cedbde9f1ee0ae643a235663 Author: Lee Jones Date: Thu Jul 2 15:46:10 2020 +0100 usb: dwc3: dwc3-haps: Function headers are not suitable for kerneldoc Fixes the following W=1 kernel build warnings: drivers/usb/dwc3/dwc3-haps.c:19: warning: Incorrect use of kernel-doc format: * struct dwc3_haps - Driver private structure drivers/usb/dwc3/dwc3-haps.c:23: warning: cannot understand function prototype: 'struct dwc3_haps ' Cc: Felipe Balbi Cc: Thinh Nguyen Cc: John Youn Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-16-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9293b7db8c33b288cefe439d9e0c1b20cad55a96 Author: Lee Jones Date: Thu Jul 2 15:46:09 2020 +0100 usb: cdns3: ep0: Fix a bunch of kerneldoc issues Add some missing function argument descriptions for 'ep', 'desc' and 'zlp', and correct spelling/bitrot issues surrounding the correct spelling of present args. Fixes the following W=1 warnings: drivers/usb/cdns3/ep0.c:36: warning: Function parameter or member 'zlp' not described in 'cdns3_ep0_run_transfer' drivers/usb/cdns3/ep0.c:236: warning: Function parameter or member 'ctrl' not described in 'cdns3_req_ep0_get_status' drivers/usb/cdns3/ep0.c:236: warning: Excess function parameter 'ctrl_req' description in 'cdns3_req_ep0_get_status' drivers/usb/cdns3/ep0.c:411: warning: Function parameter or member 'ctrl' not described in 'cdns3_req_ep0_handle_feature' drivers/usb/cdns3/ep0.c:411: warning: Excess function parameter 'ctrl_req' description in 'cdns3_req_ep0_handle_feature' drivers/usb/cdns3/ep0.c:661: warning: Function parameter or member 'ep' not described in 'cdns3_gadget_ep0_enable' drivers/usb/cdns3/ep0.c:661: warning: Function parameter or member 'desc' not described in 'cdns3_gadget_ep0_enable' drivers/usb/cdns3/ep0.c:671: warning: Function parameter or member 'ep' not described in 'cdns3_gadget_ep0_disable' drivers/usb/cdns3/ep0.c:867: warning: Function parameter or member 'priv_ep' not described in 'cdns3_init_ep0' drivers/usb/cdns3/ep0.c:867: warning: Excess function parameter 'ep_priv' description in 'cdns3_init_ep0' Cc: Pawel Laszczak Cc: Pawel Jez Cc: Peter Chen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-15-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6e29619fd2558dd5d55ee23f05330d563cdbea73 Author: Lee Jones Date: Thu Jul 2 15:46:08 2020 +0100 usb: cdns3: core: Fix incorrect formatting and misspelled function arg docs There are 3 misspellings and 1 incorrect format used in this file's kerneldoc function headers. Fixing them squashes the following W=1 kernel build warnings: drivers/usb/cdns3/gadget.c:653: warning: Function parameter or member 'priv_ep' not described in 'cdns3_wa2_descmissing_packet' drivers/usb/cdns3/gadget.c:653: warning: Excess function parameter 'priv_dev' description in 'cdns3_wa2_descmissing_packet' drivers/usb/cdns3/gadget.c:1088: warning: Function parameter or member 'request' not described in 'cdns3_ep_run_transfer' drivers/usb/cdns3/gadget.c:2574: warning: Function parameter or member 'priv_ep' not described in '__cdns3_gadget_ep_set_halt' drivers/usb/cdns3/gadget.c:2574: warning: Excess function parameter 'ep' description in '__cdns3_gadget_ep_set_halt' drivers/usb/cdns3/gadget.c:2595: warning: Function parameter or member 'priv_ep' not described in '__cdns3_gadget_ep_clear_halt' drivers/usb/cdns3/gadget.c:2595: warning: Excess function parameter 'ep' description in '__cdns3_gadget_ep_clear_halt' drivers/usb/cdns3/gadget.c:2898: warning: Function parameter or member 'priv_dev' not described in 'cdns3_init_eps' drivers/usb/cdns3/gadget.c:2898: warning: Excess function parameter 'cdns3' description in 'cdns3_init_eps' drivers/usb/cdns3/gadget.c:3210: warning: Function parameter or member 'cdns' not described in 'cdns3_gadget_init' Cc: Pawel Laszczak Cc: Peter Chen Cc: Roger Quadros Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-14-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit ede175a529b112c0fbff02c51a3fcec191d01e30 Author: Lee Jones Date: Thu Jul 2 15:46:07 2020 +0100 usb: host: ehci-omap: Provide documentation for ehci_hcd_omap_probe()'s arg 'pdev' Description for 'pdev' argument was missing from the function header. Fixes the following W=1 warning: drivers/usb/host/ehci-omap.c:87: warning: Function parameter or member 'pdev' not described in 'ehci_hcd_omap_probe' Cc: Alan Stern Cc: Vikram Pandita Cc: Anand Gadiyar Cc: Keshava Munegowda Cc: Roger Quadros Cc: Felipe Balbi Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-13-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit bc84ee948124868e2affaf0492225a365f3943f0 Author: Neil Armstrong Date: Fri Jul 3 10:07:28 2020 +0200 drm/meson: crtc: handle commit of Amlogic FBC frames Since the VD1 Amlogic FBC decoder is now configured by the overlay driver, commit the right registers to decode the Amlogic FBC frame. Signed-off-by: Neil Armstrong Tested-by: Kevin Hilman Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20200703080728.25207-7-narmstrong@baylibre.com commit be26a04bb70b6d4f4fb66ce4ed149153133aaef9 Author: Neil Armstrong Date: Fri Jul 3 10:07:27 2020 +0200 drm/meson: overlay: setup overlay for Amlogic FBC Scatter Memory layout Setup the Amlogic FBC decoder for the VD1 video overlay plane to use read the FBC header as Scatter Memory layout reference. Signed-off-by: Neil Armstrong Tested-by: Kevin Hilman Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20200703080728.25207-6-narmstrong@baylibre.com commit 376b1391d9e99f24b8d9461a08c4735ba9d5495e Author: Neil Armstrong Date: Fri Jul 3 10:07:26 2020 +0200 drm/meson: overlay: setup overlay for Amlogic FBC Memory Saving mode Setup the Amlogic FBC decoder for the VD1 video overlay plane to use a different superblock size for the Memory Saving mode. Signed-off-by: Neil Armstrong Tested-by: Kevin Hilman Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20200703080728.25207-5-narmstrong@baylibre.com commit e860785d5730665e04e0ac301aa14ed3779c4d92 Author: Neil Armstrong Date: Fri Jul 3 10:07:25 2020 +0200 drm/meson: overlay: setup overlay for Amlogic FBC Setup the Amlogic FBC decoder for the VD1 video overlay plane. The VD1 Amlogic FBC decoder is integrated in the pipeline like the YUV pixel reading/formatter but used a direct memory address instead. This adds support for the basic layout, and needs to calculate the content body size since the header is allocated after. Signed-off-by: Neil Armstrong Tested-by: Kevin Hilman Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20200703080728.25207-4-narmstrong@baylibre.com commit 1d4eff87878977fde110f311c4fa123e93ba2b3d Author: Neil Armstrong Date: Fri Jul 3 10:07:24 2020 +0200 drm/meson: add Amlogic Video FBC registers Add the registers of the VPU VD1 Amlogic FBC decoder module, and routing register. Signed-off-by: Neil Armstrong Tested-by: Kevin Hilman Reviewed-by: Kevin Hilman Link: https://patchwork.freedesktop.org/patch/msgid/20200703080728.25207-3-narmstrong@baylibre.com commit d6528ec883096e7ccdb08257bcc45670bc878519 Author: Neil Armstrong Date: Fri Jul 3 10:07:23 2020 +0200 drm/fourcc: Add modifier definitions for describing Amlogic Video Framebuffer Compression Amlogic uses a proprietary lossless image compression protocol and format for their hardware video codec accelerators, either video decoders or video input encoders. It considerably reduces memory bandwidth while writing and reading frames in memory. The underlying storage is considered to be 3 components, 8bit or 10-bit per component, YCbCr 420, single plane : - DRM_FORMAT_YUV420_8BIT - DRM_FORMAT_YUV420_10BIT This modifier will be notably added to DMA-BUF frames imported from the V4L2 Amlogic VDEC decoder. This introduces the basic layout composed of: - a body content organized in 64x32 superblocks with 4096 bytes per superblock in default mode. - a 32 bytes per 128x64 header block This layout is tranferrable between Amlogic SoCs supporting this modifier. The Memory Saving option exist changing the layout superblock size to save memory when using 8bit components pixels size. Finally is also adds the Scatter Memory layout, meaning the header contains IOMMU references to the compressed frames content to optimize memory access and layout. In this mode, only the header memory address is needed, thus the content memory organization is tied to the current producer execution and cannot be saved/dumped neither transferrable between Amlogic SoCs supporting this modifier. Signed-off-by: Neil Armstrong Tested-by: Kevin Hilman Reviewed-by: Kevin Hilman Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200703080728.25207-2-narmstrong@baylibre.com commit 3c373454a9f288d81d5780e4a4ed9cfe245552da Author: Lee Jones Date: Thu Jul 2 15:46:03 2020 +0100 usb: dwc3: dwc3-omap: Do not read DMA status Commit af566a0be6e49 ("usb: dwc3: omap: get rid of dma_status") rendered reading DMA status from the H/W even more redundant. The variable hasn't been read/used since 2016. Remove the set but unused variable and the call which populates it. Fixes the following W=1 warning: drivers/usb/dwc3/dwc3-omap.c: In function ‘dwc3_omap_probe’: drivers/usb/dwc3/dwc3-omap.c:460:8: warning: variable ‘reg’ set but not used [-Wunused-but-set-variable] 460 | u32 reg; | ^~~ Cc: Felipe Balbi Cc: Andrzej Siewior Cc: linux-omap@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-9-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 246d7a1103b3cb00357939a01284679c844ee27d Author: Lee Jones Date: Thu Jul 2 15:46:02 2020 +0100 usb: common: ulpi: Fix a few kerneldoc related issues Firstly, demote function header to standard comment block as they are not suitable for kerneldoc. Then provide description for ulpi_register_driver()'s argument 'module'. Finally rename description for ulpi_unregister_interface()'s 'ulpi' arg. Fixes the following W=1 warnings: drivers/usb/common/ulpi.c:23: warning: Function parameter or member 'ulpi' not described in 'ulpi_read' drivers/usb/common/ulpi.c:23: warning: Function parameter or member 'addr' not described in 'ulpi_read' drivers/usb/common/ulpi.c:150: warning: Function parameter or member 'module' not described in '__ulpi_register_driver' drivers/usb/common/ulpi.c:299: warning: Function parameter or member 'ulpi' not described in 'ulpi_unregister_interface' drivers/usb/common/ulpi.c:299: warning: Excess function parameter 'intrf' description in 'ulpi_unregister_interface' Cc: Felipe Balbi Cc: Heikki Krogerus Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit fb678a5a76a4675e783cdef74b3e7117cf596cb0 Author: Lee Jones Date: Thu Jul 2 15:46:01 2020 +0100 usb: dwc3: ulpi: File headers are not doc headers Demote ulpi.c's file header to a standard comment block. Fixes the following W=1 build warning: drivers/usb/dwc3/ulpi.c:18: warning: Function parameter or member 'a' not described in 'DWC3_ULPI_ADDR' Cc: Felipe Balbi Cc: Heikki Krogerus Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7679defc3e290d4cb8377f8fc2d8b6f3cca32eb2 Author: Lee Jones Date: Thu Jul 2 15:46:00 2020 +0100 usb: dwc3: drd: File headers are not doc headers Demote drd.c's file header to a standard comment block. Fixes the following W=1 build warnings: drivers/usb/dwc3/drd.c:20: warning: Function parameter or member 'dwc' not described in 'dwc3_otg_disable_events' drivers/usb/dwc3/drd.c:20: warning: Function parameter or member 'disable_mask' not described in 'dwc3_otg_disable_events' Cc: Felipe Balbi Cc: Roger Quadros Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 11d96a5912311a60332be62139aec3b1af248f45 Author: Lee Jones Date: Thu Jul 2 15:45:59 2020 +0100 usb: common: usb-conn-gpio: Demote comment block which is clearly not kerneldoc This block lacks a title and argument descriptions. Fixes the following W=1 kernel build warning: drivers/usb/common/usb-conn-gpio.c:44: warning: Cannot understand * "DEVICE" = VBUS and "HOST" = !ID, so we have: on line 44 - I thought it was a doc line Cc: Chunfeng Yun Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3e682e6fcaea3099cf93eeafef150108556b77e9 Author: Lee Jones Date: Thu Jul 2 15:45:58 2020 +0100 usb: common: debug: Demote comment blocks which are obviously not kerneldoc File headers and simple comments are not kerneldoc worthy. Fixes the following W=1 warnings: drivers/usb/common/debug.c:15: warning: Function parameter or member 'bRequestType' not described in 'usb_decode_get_status' drivers/usb/common/debug.c:15: warning: Function parameter or member 'wIndex' not described in 'usb_decode_get_status' drivers/usb/common/debug.c:15: warning: Function parameter or member 'wLength' not described in 'usb_decode_get_status' drivers/usb/common/debug.c:15: warning: Function parameter or member 'str' not described in 'usb_decode_get_status' drivers/usb/common/debug.c:15: warning: Function parameter or member 'size' not described in 'usb_decode_get_status' drivers/usb/common/debug.c:216: warning: Function parameter or member 'str' not described in 'usb_decode_ctrl' drivers/usb/common/debug.c:216: warning: Function parameter or member 'size' not described in 'usb_decode_ctrl' drivers/usb/common/debug.c:216: warning: Function parameter or member 'bRequestType' not described in 'usb_decode_ctrl' drivers/usb/common/debug.c:216: warning: Function parameter or member 'bRequest' not described in 'usb_decode_ctrl' drivers/usb/common/debug.c:216: warning: Function parameter or member 'wValue' not described in 'usb_decode_ctrl' drivers/usb/common/debug.c:216: warning: Function parameter or member 'wIndex' not described in 'usb_decode_ctrl' drivers/usb/common/debug.c:216: warning: Function parameter or member 'wLength' not described in 'usb_decode_ctrl' Cc: Pawel Laszczak Cc: Felipe Balbi Cc: Andrzej Siewior Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 82511e2d99ee79833a56252c2343f4e722db7967 Author: Lee Jones Date: Thu Jul 2 15:45:57 2020 +0100 usb: host: pci-quirks: Demote function header from kerneldoc to comment block quirk_usb_handoff_xhci()'s function header is the only one across the sourcefile which is denoted as a kerneldoc header. Despite no attempt to document its arguments. Drop it down in status from kerneldoc to a standard comment block to match the other headers in the file. Fixes the following W=1 kernel build warning: drivers/usb/host/pci-quirks.c:1145: warning: Function parameter or member 'pdev' not described in 'quirk_usb_handoff_xhci' Cc: Mathias Nyman Cc: Martin Mares Cc: aleksey_gorelov@phoenix.com Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 529427b92879545607460eb2fe9dd7a0ba02ee1a Author: Lee Jones Date: Thu Jul 2 15:45:56 2020 +0100 usb: phy: phy: Fix-up a whole bunch of formatting issues Kerneldoc expects arg descriptions to be in the format '@.*: '. If either the '@' or the ':' is omitted then kerneldoc complains that the description is missing. Add the missing ':'s here. Also provide a new description for 'event'. Fixes the following kernel build W=1 warnings: drivers/usb/phy/phy.c:106: warning: Function parameter or member 'work' not described in 'usb_phy_notify_charger_work' drivers/usb/phy/phy.c:172: warning: Function parameter or member 'nb' not described in 'usb_phy_get_charger_type' drivers/usb/phy/phy.c:172: warning: Function parameter or member 'state' not described in 'usb_phy_get_charger_type' drivers/usb/phy/phy.c:172: warning: Function parameter or member 'data' not described in 'usb_phy_get_charger_type' drivers/usb/phy/phy.c:194: warning: Function parameter or member 'usb_phy' not described in 'usb_phy_set_charger_current' drivers/usb/phy/phy.c:194: warning: Function parameter or member 'mA' not described in 'usb_phy_set_charger_current' drivers/usb/phy/phy.c:244: warning: Function parameter or member 'usb_phy' not described in 'usb_phy_get_charger_current' drivers/usb/phy/phy.c:244: warning: Function parameter or member 'min' not described in 'usb_phy_get_charger_current' drivers/usb/phy/phy.c:244: warning: Function parameter or member 'max' not described in 'usb_phy_get_charger_current' drivers/usb/phy/phy.c:281: warning: Function parameter or member 'usb_phy' not described in 'usb_phy_set_charger_state' drivers/usb/phy/phy.c:281: warning: Function parameter or member 'state' not described in 'usb_phy_set_charger_state' drivers/usb/phy/phy.c:427: warning: Function parameter or member 'dev' not described in 'devm_usb_get_phy' drivers/usb/phy/phy.c:427: warning: Function parameter or member 'type' not described in 'devm_usb_get_phy' drivers/usb/phy/phy.c:456: warning: Function parameter or member 'type' not described in 'usb_get_phy' drivers/usb/phy/phy.c:500: warning: Function parameter or member 'dev' not described in 'devm_usb_get_phy_by_node' drivers/usb/phy/phy.c:500: warning: Function parameter or member 'node' not described in 'devm_usb_get_phy_by_node' drivers/usb/phy/phy.c:500: warning: Function parameter or member 'nb' not described in 'devm_usb_get_phy_by_node' drivers/usb/phy/phy.c:558: warning: Function parameter or member 'dev' not described in 'devm_usb_get_phy_by_phandle' drivers/usb/phy/phy.c:558: warning: Function parameter or member 'phandle' not described in 'devm_usb_get_phy_by_phandle' drivers/usb/phy/phy.c:558: warning: Function parameter or member 'index' not described in 'devm_usb_get_phy_by_phandle' drivers/usb/phy/phy.c:590: warning: Function parameter or member 'dev' not described in 'devm_usb_put_phy' drivers/usb/phy/phy.c:590: warning: Function parameter or member 'phy' not described in 'devm_usb_put_phy' drivers/usb/phy/phy.c:627: warning: Function parameter or member 'type' not described in 'usb_add_phy' drivers/usb/phy/phy.c:721: warning: Function parameter or member 'event' not described in 'usb_phy_set_event' Cc: Felipe Balbi Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200702144625.2533530-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0a2fae2aea4a21b59d4a920b9765aaa696270b16 Author: Wolfram Sang Date: Fri Jul 3 00:20:24 2020 +0200 lib: update DEBUG_SHIRQ docs to match reality There is no extra interrupt when registering a shared interrupt handler since 2011. Update the Kconfig text to make it clear and to avoid wrong assumptions when debugging issues found by it. Fixes: 6d83f94db95c ("genirq: Disable the SHIRQ_DEBUG call in request_threaded_irq for now") Link: https://lore.kernel.org/linux-i2c/859e8211-2c56-8dd5-d6fb-33e4358e4128@pengutronix.de/T/#mf24d7070d7e0c8f17b6be6ceb51df94b7d7613b3 Reviewed-by: Krzysztof Kozlowski Acked-by: Andy Shevchenko Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20200702222024.6915-1-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 2fce60be06ca68b0b97b88b9ceb52ff102b0ea78 Author: Wolfram Sang Date: Fri Jul 3 00:11:07 2020 +0200 firmware: improve description of firmware_request_nowarn The doubled 'however' is confusing. Simplify the comment a little and reformat the paragraph. Signed-off-by: Wolfram Sang Acked-by: Luis Chamberlain Link: https://lore.kernel.org/r/20200702221107.6562-1-wsa+renesas@sang-engineering.com Signed-off-by: Greg Kroah-Hartman commit 57c8aa43b9f272c382c253573c82be5cb68fe22d Author: Tom Lendacky Date: Fri Jun 26 14:09:39 2020 -0500 crypto: ccp - Update CCP driver maintainer information Add John Allen as a new CCP driver maintainer. Additionally, break out the driver SEV support and create a new maintainer entry, with Brijesh Singh and Tom Lendacky as maintainers. Cc: John Allen Cc: Brijesh Singh Signed-off-by: Tom Lendacky Acked-by: John Allen Acked-by: Brijesh Singh Signed-off-by: Herbert Xu commit c41494311920c13d359ead4fb10b420d65238689 Author: Herbert Xu Date: Fri Jun 26 16:06:06 2020 +1000 crypto: cpt - Fix sparse warnings This patch fixes all the sparse warnings in the octeontx driver. Some of these are just trivial type changes. However, some of the changes are non-trivial on little-endian hosts. Obviously the driver appears to be broken on either LE or BE as it was doing different things. I've taken the BE behaviour as the correct one. Signed-off-by: Herbert Xu commit f532ed2a9b9eb49a715b9c8eb7056cca296b2392 Author: Fenghua Yu Date: Thu Jun 25 13:07:12 2020 -0700 crypto: hisilicon/qm - Change type of pasid to u32 PASID is defined as "int" although it's a 20-bit value and shouldn't be negative int. To be consistent with PASID type in iommu, define PASID as "u32". Suggested-by: Thomas Gleixner Signed-off-by: Fenghua Yu Signed-off-by: Herbert Xu commit 44069737ac9625a0f02f0f7f5ab96aae4cd819bc Author: Jian Cai Date: Mon Jun 22 16:24:33 2020 -0700 crypto: aesni - add compatibility with IAS Clang's integrated assembler complains "invalid reassignment of non-absolute variable 'var_ddq_add'" while assembling arch/x86/crypto/aes_ctrby8_avx-x86_64.S. It was because var_ddq_add was reassigned with non-absolute values several times, which IAS did not support. We can avoid the reassignment by replacing the uses of var_ddq_add with its definitions accordingly to have compatilibility with IAS. Link: https://github.com/ClangBuiltLinux/linux/issues/1008 Reported-by: Sedat Dilek Reported-by: Fangrui Song Tested-by: Sedat Dilek # build+boot Linux v5.7.5; clang v11.0.0-git Signed-off-by: Jian Cai Signed-off-by: Herbert Xu commit 8a302808c60d441d9884cb00ea7f2b534f2e3ca5 Author: John Allen Date: Mon Jun 22 15:24:02 2020 -0500 crypto: ccp - Fix use of merged scatterlists Running the crypto manager self tests with CONFIG_CRYPTO_MANAGER_EXTRA_TESTS may result in several types of errors when using the ccp-crypto driver: alg: skcipher: cbc-des3-ccp encryption failed on test vector 0; expected_error=0, actual_error=-5 ... alg: skcipher: ctr-aes-ccp decryption overran dst buffer on test vector 0 ... alg: ahash: sha224-ccp test failed (wrong result) on test vector ... These errors are the result of improper processing of scatterlists mapped for DMA. Given a scatterlist in which entries are merged as part of mapping the scatterlist for DMA, the DMA length of a merged entry will reflect the combined length of the entries that were merged. The subsequent scatterlist entry will contain DMA information for the scatterlist entry after the last merged entry, but the non-DMA information will be that of the first merged entry. The ccp driver does not take this scatterlist merging into account. To address this, add a second scatterlist pointer to track the current position in the DMA mapped representation of the scatterlist. Both the DMA representation and the original representation of the scatterlist must be tracked as while most of the driver can use just the DMA representation, scatterlist_map_and_copy() must use the original representation and expects the scatterlist pointer to be accurate to the original representation. In order to properly walk the original scatterlist, the scatterlist must be walked until the combined lengths of the entries seen is equal to the DMA length of the current entry being processed in the DMA mapped representation. Fixes: 63b945091a070 ("crypto: ccp - CCP device driver and interface support") Signed-off-by: John Allen Cc: stable@vger.kernel.org Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit df12ef60c87b8fffc4d066dc6e553a77feaa6caf Author: Sivaprakash Murugesan Date: Mon Jun 22 11:45:06 2020 +0530 crypto: qce/sha - Do not modify scatterlist passed along with request Crypto test driver's test_ahash_speed calls crypto_ahash_update and crypto_ahash_final APIs repeatedly for all the available test vector buffer lengths. if we mark the end for scatterlist based on the current vector size then the subsequent vectors might fail if the later buffer lengths are higher. To avoid this, in qce do not mark the end of scatterlist in update API, the qce_ahash_async_req_handle API already takes care of this copying right amount of buffer from the request scatter list. Signed-off-by: Sivaprakash Murugesan Signed-off-by: Herbert Xu commit a668ee56ff028139a0926e4d2248c9a573858ba0 Author: Sivaprakash Murugesan Date: Mon Jun 22 11:45:05 2020 +0530 crypto: qce - re-initialize context on import crypto testmgr deliberately corrupts the request context while passing vectors to the import. This is to make sure that drivers do not rely on request but they take all the necessary input from io vec passed to it. qce casts the request context from request parameter, since it is corrupted the sub squent hash request fails and qce hangs. To avoid this re-initialize request context on import. The qce import API alreasy takes care of taking the input vectors from passed io vec. Signed-off-by: Sivaprakash Murugesan Signed-off-by: Herbert Xu commit 8ac1b9ccbfbaeacc0c33433e3e7825593bda366e Author: Sivaprakash Murugesan Date: Mon Jun 22 11:45:04 2020 +0530 crypto: qce - support zero length test vectors crypto test module passes zero length vectors as test input to sha-1 and sha-256. To provide correct output for these vectors, hash zero support has been added as in other crypto drivers. Signed-off-by: Sivaprakash Murugesan Signed-off-by: Herbert Xu commit 5c3a8a661e1bd9d7063485ac2d2ccb512c447129 Author: Dinghao Liu Date: Mon Jun 22 10:40:08 2020 +0800 crypto: sun8i-ce - Fix runtime PM imbalance in sun8i_ce_cipher_init pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a corresponding decrement is needed on the error handling path to keep the counter balanced. Fix this by adding the missed function call. Signed-off-by: Dinghao Liu Signed-off-by: Herbert Xu commit e62055642797a6de80f3576c18e212cbbf5b4361 Author: Aya Levin Date: Mon May 18 12:31:38 2020 +0300 net/mlx5e: Enhance TX timeout recovery Upon a TX timeout handle, if the TX reporter was not able to recover from the error, reopen the channels. If tried to reopen channels, do not loop over TX queues for timeout. With that, the reporters state and separation will better expose the driver's state. Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit b84921129bc85bea22551e98def8e70e2a44c043 Author: Aya Levin Date: Sun May 3 17:02:41 2020 +0300 net/mlx5e: Enhance ICOSQ data on RX reporter's diagnose When the RQ is in striding RQ mode, it uses the ICOSQ as a helper queue. In this mode, RX reporter dumps more info about the ICOSQ and its related CQ. $ devlink health diagnose pci/0000:00:0b.0 reporter rx Common config: RQ: type: 2 stride size: 2048 size: 8 CQ: stride size: 64 size: 1024 RQs: channel ix: 0 rqn: 2413 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 CQ: cqn: 1032 HW status: 0 ci: 0 size: 1024 EQ: eqn: 7 irqn: 42 vecidx: 1 ci: 93 size: 2048 ICOSQ: sqn: 2411 HW state: 1 cc: 74 pc: 74 WQE size: 128 CQ: cqn: 1029 cc: 8 size: 128 channel ix: 1 rqn: 2418 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 CQ: cqn: 1036 HW status: 0 ci: 0 size: 1024 EQ: eqn: 8 irqn: 43 vecidx: 2 ci: 2 size: 2048 ICOSQ: sqn: 2416 HW state: 1 cc: 74 pc: 74 WQE size: 128 CQ: cqn: 1033 cc: 8 size: 128 Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit 56837c2ae1e716fd29972a6314cb064947718454 Author: Aya Levin Date: Thu Apr 30 18:47:39 2020 +0300 net/mlx5e: Add EQ info to TX/RX reporter's diagnose Enhance TX/RX reporter's diagnose to include info about the corresponding EQ. $ devlink health diagnose pci/0000:00:0b.0 reporter rx Common config: RQ: type: 2 stride size: 2048 size: 8 CQ: stride size: 64 size: 1024 RQs: channel ix: 0 rqn: 1713 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1 CQ: cqn: 1032 HW status: 0 ci: 0 size: 1024 EQ: eqn: 7 irqn: 42 vecidx: 1 ci: 93 size: 2048 channel ix: 1 rqn: 1718 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1 CQ: cqn: 1036 HW status: 0 ci: 0 size: 1024 EQ: eqn: 8 irqn: 43 vecidx: 2 ci: 2 size: 2048 $ devlink health diagnose pci/0000:00:0b.0 reporter tx Common Config: SQ: stride size: 64 size: 1024 CQ: stride size: 64 size: 1024 SQs: channel ix: 0 tc: 0 txq ix: 0 sqn: 1712 HW state: 1 stopped: false cc: 91 pc: 91 CQ: cqn: 1030 HW status: 0 ci: 91 size: 1024 EQ: eqn: 7 irqn: 42 vecidx: 1 ci: 93 size: 2048 channel ix: 1 tc: 0 txq ix: 1 sqn: 1717 HW state: 1 stopped: false cc: 0 pc: 0 CQ: cqn: 1034 HW status: 0 ci: 0 size: 1024 EQ: eqn: 8 irqn: 43 vecidx: 2 ci: 2 size: 2048 Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 3c9d1699b8575bbb622ce3e8880b9ae41a905969 Author: Aya Levin Date: Sun May 3 15:04:15 2020 +0300 net/mlx5e: Enhance CQ data on diagnose output Add CQ's consumer index and size to the CQ's diagnose output retruved on RX/TX reporter diadgnose. $ devlink health diagnose pci/0000:00:0b.0 reporter rx Common config: RQ: type: 2 stride size: 2048 size: 8 CQ: stride size: 64 size: 1024 RQs: channel ix: 0 rqn: 2413 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1 CQ: cqn: 1032 HW status: 0 ci: 0 size: 1024 channel ix: 1 rqn: 2418 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1 CQ: cqn: 1036 HW status: 0 ci: 0 size: 1024 $ devlink health diagnose pci/0000:00:0b.0 reporter tx Common Config: SQ: stride size: 64 size: 1024 CQ: stride size: 64 size: 1024 SQs: channel ix: 0 tc: 0 txq ix: 0 sqn: 2412 HW state: 1 stopped: false cc: 0 pc: 0 CQ: cqn: 1030 HW status: 0 ci: 0 size: 1024 channel ix: 1 tc: 0 txq ix: 1 sqn: 2417 HW state: 1 stopped: false cc: 5 pc: 5 CQ: cqn: 1034 HW status: 0 ci: 5 size: 1024 Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit d5cbedd7fcb3f3a102d2b485acb5c09ac8085e49 Author: Aya Levin Date: Mon May 18 09:21:23 2020 +0300 net/mlx5e: Rename reporter's helpers Change prefix to match resident file: %s/mlx5e_reporter_cq_diagnose/mlx5e_health_cq_diag_fmsg %s/mlx5e_reporter_cq_common_diagnose/mlx5e_health_cq_common_diag_fmsg %s/mlx5e_reporter_named_obj_nest_start/mlx5e_health_fmsg_named_obj_nest_start %s/mlx5e_reporter_named_obj_nest_end/mlx5e_health_fmsg_named_obj_nest_end Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit de6c6ab7e8c6431d67d1a87477fee2cfc0fa0845 Author: Aya Levin Date: Thu Apr 30 14:41:13 2020 +0300 net/mlx5e: Add helper to get the RQ WQE counter Add a helper which retrieves the RQ's WQE counter. Use this helper in the RX reporter diagnose callback. $ devlink health diagnose pci/0000:00:0b.0 reporter rx Common config: RQ: type: 2 stride size: 2048 size: 8 CQ: stride size: 64 size: 1024 RQs: channel ix: 0 rqn: 2113 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1 CQ: cqn: 1032 HW status: 0 channel ix: 1 rqn: 2118 HW state: 1 SW state: 5 WQE counter: 7 posted WQEs: 7 cc: 7 ICOSQ HW state: 1 CQ: cqn: 1036 HW status: 0 Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit fc42d0de16debb2c8ba83e1345a55a18ff87e2d9 Author: Aya Levin Date: Thu Apr 30 13:36:26 2020 +0300 net/mlx5e: Add helper to get RQ WQE's head Add helper which retrieves the RQ WQE's head. Use this helper in RX reporter diagnose callback. Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit 5d95c816608cd6e7ccfe3d4c8083465973b9f3d1 Author: Aya Levin Date: Thu Apr 30 13:30:51 2020 +0300 net/mlx5e: Move RQ helpers to txrx.h Use txrx.h to contain helper function regarding TX/RX. In the coming patches, I will add more RQ helpers. Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit 4537f524b4401ae9a741b849c5e0d49c9b2b6803 Author: Aya Levin Date: Thu Apr 30 12:18:22 2020 +0300 net/mlx5e: Align RX/TX reporters diagnose output format Change the hierarchy of the RX reporter 'Common config' in the diagnose output to match the 'Common config' of the TX reporter which reflects that CQ is a helper to the traffic queues. Before: $ devlink health diagnose pci/0000:00:0b.0 reporter rx Common config: RQ: type: 2 stride size: 2048 size: 8 CQ: stride size: 64 size: 1024 RQs: ... After: $ devlink health diagnose pci/0000:00:0b.0 reporter rx Common config: RQ: type: 2 stride size: 2048 size: 8 CQ: stride size: 64 size: 1024 RQs: ... Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit b9961af7b8acf6420845cd1660228fe374710df9 Author: Aya Levin Date: Thu Apr 30 11:24:41 2020 +0300 net/mlx5e: Remove redundant RQ state query When received a CQE error, the driver inspect the syndrome given by the firmware. RQ recovery is initiated only as a result of a fatal syndrome; syndrome which set the RQ into an error state. Hence no need to query the RQ state at the beginning of the recovery process. Add additional debug prints before recovering. Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit e74e28aee1a2382814eae8249651cc4747460d9f Author: Aya Levin Date: Thu Apr 30 18:50:49 2020 +0300 net/mlx5e: Add a flush timeout define During queue's recovery, driver waits for flush. The flush timeout is set to 2 seconds. Add a define for this value for the benefit of RX and TX reporters. Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit b3ea4c4fdc673acbb4d8333b7f4c9bd3a9287730 Author: Eran Ben Elisha Date: Mon Apr 6 16:00:35 2020 +0300 net/mlx5e: Change reporters create functions to return void Creation of devlink health reporters is not fatal for mlx5e instance load. In case of error in reporter's creation, the return value is ignored. Change all reporters creation functions to return void. In addition, with this change, a failure in creating a reporter, will not prevent the driver from trying to create the next reporter in the list. Signed-off-by: Eran Ben Elisha Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed commit 86f2da1112ccf744ad9068b1d5d9843faf8ddee6 Author: Christophe JAILLET Date: Fri Jun 26 06:05:53 2020 +0200 scsi: eesox: Fix different dev_id between request_irq() and free_irq() The dev_id used in request_irq() and free_irq() should match. Use 'info' in both cases. Link: https://lore.kernel.org/r/20200626040553.944352-1-christophe.jaillet@wanadoo.fr Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit d179f7c763241c1dc5077fca88ddc3c47d21b763 Author: Christophe JAILLET Date: Fri Jun 26 05:59:48 2020 +0200 scsi: powertec: Fix different dev_id between request_irq() and free_irq() The dev_id used in request_irq() and free_irq() should match. Use 'info' in both cases. Link: https://lore.kernel.org/r/20200626035948.944148-1-christophe.jaillet@wanadoo.fr Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit 74595c044cb56cb073370c09fefc23eb8ed6d835 Author: Douglas Gilbert Date: Thu Jul 2 10:53:55 2020 -0400 scsi: scsi_debug: Fix in_use bitmap corruption Heavy testing indicates the irqsave() spinlock around the __set_bit() is insufficient to stop following clear_bit() calls being rarely applied out-of-order. Also the nearby failed kzalloc() path leading to SCSI_MLQUEUE_HOST_BUSY does not properly undo the in_use bitmap and num_in_q, fix. Link: https://lore.kernel.org/r/20200702145355.522283-1-dgilbert@interlog.com Signed-off-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 93bf02e5a2c2418bc290a778cd537837d789d9ee Author: Mike Christie Date: Wed Jul 1 14:47:48 2020 -0500 scsi: iscsi: Remove sessdestroylist Just delete the sess from the session list instead of adding it to some list we never use. Link: https://lore.kernel.org/r/1593632868-6808-4-git-send-email-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 1d726aa6ef574afbaa90a2c46286d94e55d864b8 Author: Mike Christie Date: Wed Jul 1 14:47:47 2020 -0500 scsi: iscsi: Optimize work queue flush use There is no need for one session to flush the entire iscsi_eh_timer_workq when removing/unblocking a session. During removal we need to make sure our works are not running anymore. And iscsi_unblock_session only needs to make sure its work is done. The unblock work function will flush/cancel the works it has conflicts with. Link: https://lore.kernel.org/r/1593632868-6808-3-git-send-email-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit e463f96bdc975b780161541877f521da078a8143 Author: Mike Christie Date: Wed Jul 1 14:47:46 2020 -0500 scsi: iscsi: Delay freeing target_id If we are doing async removal of the session, we could be doing a scsi_remove_target from the removal workqueue, and for the offload case we could be doing a new session addition and scan to the same host. The add/scan might then end up trying to use the target_id of the target we are removing. This patch just has a delay the freeing of the target_id until after the scsi_remove_target has completed, so we know it's no longer in use. Link: https://lore.kernel.org/r/1593632868-6808-2-git-send-email-michael.christie@oracle.com Reviewed-by: Lee Duncan Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 046cc3dd9a2507b8e111714807ab8bf15ea5bb70 Author: Song Liu Date: Thu Jul 2 19:45:37 2020 -0700 bpf: Fix build without CONFIG_STACKTRACE Without CONFIG_STACKTRACE stack_trace_save_tsk() is not defined. Let get_callchain_entry_for_task() to always return NULL in such cases. Fixes: fa28dcb82a38 ("bpf: Introduce helper bpf_get_task_stack()") Reported-by: kernel test robot Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200703024537.79971-1-songliubraving@fb.com commit 6292130093c5d102194bfe1eb6edc5563401eeb8 Author: Bob Liu Date: Wed Jul 1 11:07:45 2020 +0800 scsi: core: Register sysfs for SCSI workqueue Permit scsi_wq_xxx and scsi_tmf_xxx to be bound to different CPUs to get better isolation. Use alloc_workqueue with WQ_SYSFS and drop __WQ_ORDERED_EXPLICIT since a __WQ_ORDERED_EXPLICIT workqueue isn't allowed to change the CPU mask. Link: https://lore.kernel.org/r/20200701030745.16897-2-bob.liu@oracle.com Reviewed-by: Mike Christie Signed-off-by: Bob Liu Signed-off-by: Martin K. Petersen commit 3fed58b94e3d7607d30725cc5cb987def7884bd6 Author: Dick Kennedy Date: Tue Jun 30 14:50:01 2020 -0700 scsi: lpfc: Update lpfc version to 12.8.0.2 Update lpfc version to 12.8.0.2 Link: https://lore.kernel.org/r/20200630215001.70793-15-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 372c187b8a705c0b52c230653ac7bc38ef62182f Author: Dick Kennedy Date: Tue Jun 30 14:50:00 2020 -0700 scsi: lpfc: Add an internal trace log buffer The current logging methods typically end up requesting a reproduction with a different logging level set to figure out what happened. This was mainly by design to not clutter the kernel log messages with things that were typically not interesting and the messages themselves could cause other issues. When looking to make a better system, it was seen that in many cases when more data was wanted was when another message, usually at KERN_ERR level, was logged. And in most cases, what the additional logging that was then enabled was typically. Most of these areas fell into the discovery machine. Based on this summary, the following design has been put in place: The driver will maintain an internal log (256 elements of 256 bytes). The "additional logging" messages that are usually enabled in a reproduction will be changed to now log all the time to the internal log. A new logging level is defined - LOG_TRACE_EVENT. When this level is set (it is not by default) and a message marked as KERN_ERR is logged, all the messages in the internal log will be dumped to the kernel log before the KERN_ERR message is logged. There is a timestamp on each message added to the internal log. However, this timestamp is not converted to wall time when logged. The value of the timestamp is solely to give a crude time reference for the messages. Link: https://lore.kernel.org/r/20200630215001.70793-14-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 317aeb83c92b26f8c6a3e318157f20892556c343 Author: Dick Kennedy Date: Tue Jun 30 14:49:59 2020 -0700 scsi: lpfc: Add blk_io_poll support for latency improvment Although the existing implementation is very good at high I/O load, on tests involving light load, especially on only a few hardware queues, latency was a little higher than it can be due to using workqueue scheduling. Other tasks in the system can delay handling. Change the lower level to use irq_poll by default which uses a softirq for I/O completion. This gives better latency as variance in when the cq is processed is reduced over the workqueue interface. However, as high load is better served by not being in softirq when the CPU is loaded, work queues are still used under high I/O load. Link: https://lore.kernel.org/r/20200630215001.70793-13-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit f0020e428af7c7a705a264be21a67b1c89574af0 Author: Dick Kennedy Date: Tue Jun 30 14:49:58 2020 -0700 scsi: lpfc: Add support to display if adapter dumps are available Currently, if there has been an issue whereby an adapter dump was taken, there is nothing displayed to hint that it is present. Utilities must be run and they must query for the status in order to then download the dump. Add a message to the driver to query dump image presence when initializing the SLI Port. Link: https://lore.kernel.org/r/20200630215001.70793-12-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 45bc44270f0c005d6009b5427cf855cff34220b7 Author: Dick Kennedy Date: Tue Jun 30 14:49:57 2020 -0700 scsi: lpfc: Allow applications to issue Common Set Features mailbox command Currently the driver validates command codes received from the application. COMMON_SET_FEATURES is not currently being approved. Add definition of the missing command and allow it to be issued by applications. Link: https://lore.kernel.org/r/20200630215001.70793-11-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 28ed7374401b20915bf980fdf2d3ac80f8c2945d Author: Dick Kennedy Date: Tue Jun 30 14:49:56 2020 -0700 scsi: lpfc: Fix language in 0373 message to reflect non-error message Change vocabulary of 0373 log msg from "error" to "cmpl" The current language of the 0373 message contains the word "error" which caused a number of customers to inquire about the "error" and if it should be a concern. It isn't an error, it's simply an io completion status. Revise the message to replace the word "error" with "cmpl" for completion. Link: https://lore.kernel.org/r/20200630215001.70793-10-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 86ee57a97a1764e86718d5bc37d0a3a22f0c3fd5 Author: Dick Kennedy Date: Tue Jun 30 14:49:55 2020 -0700 scsi: lpfc: Fix kdump hang on PPC When the kdump kernel shuts down lpfc calls flush_work_queue on an interrupt to schedule the cq handler. When there is only one CPU active on the kdump kernel, it is possible for the work_on to get scheduled on a non-active CPU causing it to never be scheduled. When in the kdump environment, per-CPU affinity of cq's to cpus is not necessary. In those cases, use a general queue_work rather than a queue_work_on(). Link: https://lore.kernel.org/r/20200630215001.70793-9-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 03dbfe0668e6692917ac278883e0586cd7f7d753 Author: Dick Kennedy Date: Tue Jun 30 14:49:54 2020 -0700 scsi: lpfc: Fix shost refcount mismatch when deleting vport When vports are deleted, it is observed that there is memory/kthread leakage as the vport isn't fully being released. There is a shost reference taken in scsi_add_host_dma that is not released during scsi_remove_host. It was noticed that other drivers resolve this by doing a scsi_host_put after calling scsi_remove_host. The vport_delete routine is taking two references one that corresponds to an access to the scsi_host in the vport_delete routine and another that is released after the adapter mailbox command completes that destroys the VPI that corresponds to the vport. Remove one of the references taken such that the second reference that is put will complete the missing scsi_add_host_dma reference and the shost will be terminated. Link: https://lore.kernel.org/r/20200630215001.70793-8-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9dace1fa91ca419d44da29e877fe1e9a59ad4248 Author: Dick Kennedy Date: Tue Jun 30 14:49:53 2020 -0700 scsi: lpfc: Fix stack trace seen while setting rrq active Call traces have been observed running different tests that involve aborts and setting the rrq active flag. The lpfc_set_rrq_active routine is doing a mempool_alloc under the soft_irq processing level. When the mempool needs to get a new buffer from the free pool and has to wait for memory to become free it will check the flags passed in on the alloc and dump the stack if the thread is running in interrupt context. Replace the GFP_KERNEL flag with GFP_ATOMIC so that the memory allocation will not attempt to sleep if there is no mem available. Link: https://lore.kernel.org/r/20200630215001.70793-7-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit d91e3abb682b07b04ced3f3d363651abedcb0309 Author: Dick Kennedy Date: Tue Jun 30 14:49:52 2020 -0700 scsi: lpfc: Fix oops due to overrun when reading SLI3 data When using DUMP on SLI3 to read VPD and Port status data (config region 23), the adapter is overruning the kmalloc'd buffer causing havoc on other consumers of the allocation pools. Rework the loops processing the dump data and validate/size memory lengths before performing bcopy. Link: https://lore.kernel.org/r/20200630215001.70793-6-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9806c984d43a292fc331a9735bcecc28455df80a Author: Dick Kennedy Date: Tue Jun 30 14:49:51 2020 -0700 scsi: lpfc: Fix NVMe rport deregister and registration during ADISC During driver unload/reload testing, the NVMe initiator would not re-establish connectivity to NVMe controllers on reload. The failing NVMe array supports concurrent FCP and NVMe operation via different nport_id's. The array was repeatedly sending an ADISC every 2 seconds after PLOGI completed and while NVMe subsystems were executing discovery. The target would continue this state for roughly 45 seconds. The driver's current behavior on ADISC receipt is to validate a the ADISC vs the device and issue a RESUME_RPI to restore transmission. The receipt of the ADISC effectively caused a driver to take actions similar to a logout and login for the remote port, causing the deregistration of the nvme rport and a subsequent re-registration. This caused a constant reset and re-connect of the NVMe controller while this 45s window occurred. There was no need for the state changes as ADISC does not change login state. This patch corrects this behavior by validating if the remoteport is already logged in (MAPPED) and when true, avoids the call to set the ndlp state to MAPPED, which triggers the unreg/re-reg. Thus ADISC does not change the login state of the node. Link: https://lore.kernel.org/r/20200630215001.70793-5-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit c93764a65b4b2aaa1b187f815fc88a26073f758c Author: Dick Kennedy Date: Tue Jun 30 14:49:49 2020 -0700 scsi: lpfc: Fix missing MDS functionality Visual code inspection of the MDS implementation revealed two errors in the driver: - The set features Feature Code had an incorrect value - The routine that classifies command type for cmd completions was missing the Send Frame definition. Send Frame is used for MDS driver loopback. Link: https://lore.kernel.org/r/20200630215001.70793-3-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e5fcb81d40d44d3000e5ff8b6c9d87ea36a26faa Author: Dick Kennedy Date: Tue Jun 30 14:49:48 2020 -0700 scsi: lpfc: Fix unused assignment in lpfc_sli4_bsg_link_diag_test Coverity reported the following error: Assigned value that is never used may represent unnecessary computation. The rc variable was initially assigned a value but in several cases, when an error case is detected, it is reassigned a new value. The initial value had little use. In code-reviewing this routine, it could use some cleanup: - Setting the initialization value to -ENODEV is a much better choice and lessens code in the routine. - The wasn't tracking logic errors vs no error and mailbox failure. Better to resolve by adding a status to track the mailbox failure and merge it with the logic error when the routine returns. Link: https://lore.kernel.org/r/20200630215001.70793-2-jsmart2021@gmail.com Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 1cc4af412f40bfe33f4b7e2b014a8d4b140bd8d3 Merge: 9555152beb114 d524b87f77364 Author: Dave Airlie Date: Fri Jul 3 11:29:00 2020 +1000 Merge tag 'drm-intel-next-2020-07-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 features for v5.9 Highlights: - Rocket Lake (RKL) platform enabling (Matt Roper, Lucas, José, Aditya) Gem/GT: - Numerous selftest fixes and improvements (Chris) - TGL, RKL, EHL workaround updates (Matts Atwood and Roper, Clint, Swathi Dhanavanthri, Chris) - Retry faulthandlers on ENOSPC to avoid oomkiller (Chris) - Numerous refactorings and cleanups (Chris) - Several GT fixes around init/suspend/resume/shutdown (Chris) - Whitelist CTX_TIMESTAMP register on non-RCS (Chris) - Track if an engine requires forcewake w/a (Chris) - Locking improvements (Chris) - Timeslicing improvements (Chris) - Add a safety submission flush in the heartbeat (Chris) - Flush gen3 relocs harder (Chris) - Discard a misplaced GGTT vma (Chris) - Reduce relocation paths to async GPU relocations only (Chris) - It's all build up with no pay off (Chris' own words...) Display: - A plethora of DP MST fixes (Imre) - Implement proper dbuf global state (Ville) - Consider dbuf bandwidth when calculating CDCLK (Stan) - FBC fixes and refactoring (Ville) - PSR fixes and improvements (José, Gwan-gyeong) - Cursor size fixes (Ville) - Overlay color and gamma fixes (Ville) - Fix and improve FSB and HRAWCLK read out (Ville) - Pre allocate and late cleanup of DSB cmd buffer (Animesh) - Stop using mode->private_flags (Ville) - Add plane color encoding support for YCBCR_BT2020 (Kishore Kadiyala) - Update TGL Type-C DP and DKL HBR and HBR+ vswing tables (José) - Fix DSI connector init error path (Vivek) - A plethora of DP vswing/preemph fixes and refactoring (Ville) - Fix TGL DKL vswing sequence selection (Vandita) - Fix ICL hotplug interrupt disabling after storm detection (Imre) - Retry HDCP link integrity check on failure (Oliver Barta) - Fix TBT DPLL fractional divider (Imre) - Fix ICL+ HBR3 source rate (Matt Atwood) - Fix gen2 spurious underruns (Ville) - Fix potential NULL dereference, some spelling fixes (Colin Ian King) - Fix NULL dereference on encoder state probe (Chris) Other: - Backmerge to get mmap locking API (Jani) - Distinguish Comet Lake from Coffee Lake (Chris) - Various compiler warning fixes (Arnd Bergmann, Nathan Chancellor) - WARN* conversions to drm_WARN* (Pankaj) - Switch to device specific parameters with debugfs access (Jani) - Fix agp/intel error path leak (Qiushi Wu) - Forcewake power optimization (Chris) - Irq handler optimization (Chris) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87wo3lkbxt.fsf@intel.com commit 03fca66b7a36b52da8915341eee388267f6d5b73 Author: Chris Wilson Date: Thu Jul 2 22:10:15 2020 +0100 drm/i915: Also drop vm.ref along error paths for vma construction Not only do we need to release the vm.ref we acquired for the vma on the duplicate insert branch, but also for the normal error paths, so roll them all into one. Reported-by: Andi Shyti Suggested-by: Andi Shyti Fixes: 2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex") Signed-off-by: Chris Wilson Cc: Andi Shyti Cc: # v5.5+ Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200702211015.29604-1-chris@chris-wilson.co.uk commit a85f22288d4a338f598c9f3e822a89fe71f891bf Author: Chris Wilson Date: Thu Jul 2 09:32:05 2020 +0100 drm/i915/gem: Drop forced struct_mutex from shrinker_taints_mutex Since we no longer always take struct_mutex around everything, and want the freedom to create GEM objects, actually taking struct_mutex inside the lock creation ends up pulling the mutex inside other looks. Since we don't use generally use struct_mutex, we can relax the tainting. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200702083225.20044-3-chris@chris-wilson.co.uk commit 8c8278a5b1a81e099ba883d8a0f9e3df9bdb1a74 Merge: e44f65fd666c7 b6d02dd2ffd4a Author: David S. Miller Date: Thu Jul 2 14:47:40 2020 -0700 Merge branch 'sfc-prerequisites-for-EF100-driver-part-3' Edward Cree says: ==================== sfc: prerequisites for EF100 driver, part 3 Continuing on from [1] and [2], this series assembles the last pieces of the common codebase that will be used by the forthcoming EF100 driver. Patch #1 also adds a minor feature to EF10 (setting MTU on VFs) since EF10 supports the same MCDI extension which that feature will use on EF100. Patches #5 & #7, while they should have no externally-visible effect on driver functionality, change how that functionality is implemented and how the driver represents TXQ configuration internally, so are not mere cleanup/refactoring like most of these prerequisites have (from the perspective of the existing sfc driver) been. Changes in v2: * Patch #1: use efx_mcdi_set_mtu() directly, instead of as a fallback, in the mtu_only case (Jakub) * Patch #3: fix symbol collision in non-modular builds by renaming interrupt_mode to efx_interrupt_mode (kernel test robot) * Patch #6: check for failure of netif_set_real_num_[tr]x_queues (Jakub) * Patch #12: cleaner solution for ethtool drvinfo (Jakub, David) [1]: https://lore.kernel.org/netdev/20200629.173812.1532344417590172093.davem@davemloft.net/T/ [2]: https://lore.kernel.org/netdev/20200630.130923.402514193016248355.davem@davemloft.net/T/ ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit b6d02dd2ffd4ac9b08a963762eb3d1ee0502ffc6 Author: Edward Cree Date: Thu Jul 2 17:34:43 2020 +0100 sfc_ef100: helper function to set default RSS table of given size Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit b3007dfd5b059cc873a8b4c24a1e337cdcec9011 Author: Edward Cree Date: Thu Jul 2 17:34:27 2020 +0100 sfc_ef100: NVRAM selftest support code We have yet another new scheme for NVRAM, and a corresponding new MCDI. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 39c965f4e663fa53955f77435068748448514da1 Author: Edward Cree Date: Thu Jul 2 17:32:24 2020 +0100 sfc_ef100: populate BUFFER_SIZE_BYTES in INIT_RXQ The QDMA subsystem on EF100 needs this information. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 805d22bf92f1541cbb5b5544f628864610e2c9a2 Author: Edward Cree Date: Thu Jul 2 17:32:04 2020 +0100 sfc_ef100: add EF100 to NIC-revision enumeration Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit bcacac7a8cd9939a991fd20acb1b9f57251363b9 Author: Edward Cree Date: Thu Jul 2 17:31:43 2020 +0100 sfc: get drvinfo driver name from outside the common code Since ethtool_common.o will be built into both sfc and sfc_ef100 drivers, it can't use KBUILD_MODNAME directly. Instead, make it reference a string provided by the individual driver code. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 31f4cbd4014360ec45ddb19fa1bf5ae97e42ec5b Author: Edward Cree Date: Thu Jul 2 17:31:19 2020 +0100 sfc: initialise RSS context ID to 'no RSS context' in efx_init_struct() Previously this was only happening in ef10-specific code. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit d700fe014ec13cf96df8df4de6ee46034008ff85 Author: Edward Cree Date: Thu Jul 2 17:30:56 2020 +0100 sfc: commonise efx_fini_dmaq Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 965470ee76988af234e23d559f5915747fe1b073 Author: Edward Cree Date: Thu Jul 2 17:30:39 2020 +0100 sfc: factor out efx_mcdi_filter_table_down() from _remove() _down() merely removes all our filters and VLANs, it doesn't free efx->filter_state itself. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 79de6e7cb8ac9bd0c98be663d414f85ef90c1196 Author: Edward Cree Date: Thu Jul 2 17:30:23 2020 +0100 sfc: don't call tx_limit_len if NIC type doesn't have one EF100 doesn't need to split up large DMAs. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit a81dcd85a7c1bc548ce8fb635623970fdee5887d Author: Edward Cree Date: Thu Jul 2 17:29:58 2020 +0100 sfc: assign TXQs without gaps Since we only allocate VIs for the number of TXQs we actually need, we cannot naively use "channel * TXQ_TYPES + txq" for the TXQ number, as this has gaps (when efx->tx_queues_per_channel < EFX_TXQ_TYPES) and thus overruns the driver's VI allocations, causing the firmware to reject the MC_CMD_INIT_TXQ based on INSTANCE. Thus, we distinguish INSTANCE (stored in tx_queue->queue) from LABEL (tx_queue->label); the former is allocated starting from 0 in efx_set_channels(), while the latter is simply the txq type (index in channel->tx_queue array). To simplify things, rather than changing tx_queues_per_channel after setting up TXQs, make Siena always probe its HIGHPRI queues at start of day, rather than deferring it until tc mqprio enables them. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 69a704962e8cab43bd62301e104c222e7d23e361 Author: Edward Cree Date: Thu Jul 2 17:29:40 2020 +0100 sfc: commonise netif_set_real_num[tr]x_queues calls While we're at it, also check them for failure. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit f9cac93e5b3eefc5c6340ba4efd3628f2347e1ef Author: Edward Cree Date: Thu Jul 2 17:29:24 2020 +0100 sfc: make tx_queues_per_channel variable at runtime Siena needs four TX queues (csum * highpri), EF10 needs two (csum), and EF100 only needs one (as checksumming is controlled entirely by the transmit descriptor). Rather than having various bits of ad-hoc code to decide which queues to set up etc., put the knowledge of how many TXQs a channel has in one place. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 67e6398e2e058d0ec126f47ac123cca590c7a2ba Author: Edward Cree Date: Thu Jul 2 17:29:09 2020 +0100 sfc: move modparam 'rss_cpus' out of common channel code Instead of exposing this old module parameter on the new driver (thus having to keep it forever after for compatibility), let's confine it to the old one; if we find later that we need the feature, we ought to support it properly, with ethtool set-channels. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit e4ff3232102080e8491f2fecb83446e1cbf5b87c Author: Edward Cree Date: Thu Jul 2 17:28:13 2020 +0100 sfc: move modparam 'interrupt_mode' out of common channel code EF100 only supports MSI-X, so there's no need for the new driver to expose this old module parameter. Since it's now visible to the linker, we have to rename it internally to efx_interrupt_mode to avoid symbol collisions in non-modular builds. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit bc32442176d7289a71a2e940e5e8ea63cd0a23bb Author: Edward Cree Date: Thu Jul 2 17:27:51 2020 +0100 sfc: remove max_interrupt_mode All NICs supported by this driver are capable of MSI-X interrupts (only Falcon A1 wasn't, and that's now hived off into its own driver), so no need for a nic-type parameter. Besides, the code that checked it was buggy anyway (the following assignment that checked min_interrupt_mode overrode it). Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit af3c38d3fb7c3003842974b1de454ecebbd8bc83 Author: Edward Cree Date: Thu Jul 2 17:27:35 2020 +0100 sfc: support setting MTU even if not privileged to configure MAC fully Unprivileged functions (such as VFs) may set their MTU by use of the 'control' field of MC_CMD_SET_MAC_EXT, as used in efx_mcdi_set_mtu(). If calling efx_ef10_mac_reconfigure() from efx_change_mtu(), and the NIC supports the above (SET_MAC_ENHANCED capability), use it rather than efx_mcdi_set_mac(). Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit e44f65fd666c73944d6f2462cea0559ce5508721 Author: Colin Ian King Date: Thu Jul 2 15:22:23 2020 +0100 xen-netfront: remove redundant assignment to variable 'act' The variable act is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit dd2b7a66b6a9c7bdf2c3d62e5d5b1a2abdddb052 Merge: 4e1a69116869b fb57c3ea98519 Author: David S. Miller Date: Thu Jul 2 14:31:21 2020 -0700 Merge branch 'net-ipa-simplify-endpoint-programming' Alex Elder says: ==================== net: ipa: simplify endpoint programming Add tests to functions so they don't update undefined endpoint registers, rather than requiring the caller to avoid calling them. Move the call to a workaround function required when suspending inside the function that puts an endpoint into suspend mode. This requires moving a few functions (which are otherwise unchanged). Then simplify ipa_endpoint_program() to call essentially all endpoint register update functions unconditionally. ==================== Signed-off-by: David S. Miller commit fb57c3ea98519f811b37f299e0ac4988a021fe2a Author: Alex Elder Date: Thu Jul 2 06:25:37 2020 -0500 net: ipa: simplify ipa_endpoint_program() Have functions that write endpoint configuration registers return immediately if they are not valid for the direction of transfer for the endpoint. This allows most of the calls in ipa_endpoint_program() to be made unconditionally. Reorder the register writes to match the order of their definition (based on offset). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit b07f283ef3d0c97f67e5f446bb027c4456d75f1f Author: Alex Elder Date: Thu Jul 2 06:25:36 2020 -0500 net: ipa: move version test inside ipa_endpoint_program_suspend() IPA version 4.0+ does not support endpoint suspend. Put a test at the top of ipa_endpoint_program_suspend() that returns immediately if suspend is not supported rather than making that check in the caller. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit fff899716f88f84afef4c952a3d7b8b48a070c4c Author: Alex Elder Date: Thu Jul 2 06:25:35 2020 -0500 net: ipa: always handle suspend workaround IPA version 3.5.1 has a hardware quirk that requires special handling if an RX endpoint is suspended while aggregation is active. This handling is implemented by ipa_endpoint_suspend_aggr(). Have ipa_endpoint_program_suspend() be responsible for calling ipa_endpoint_suspend_aggr() if suspend mode is being enabled on an endpoint. If the endpoint does not support aggregation, or if aggregation isn't active, this call will continue to have no effect. Move the definition of ipa_endpoint_suspend_aggr() up in the file so its definition precedes the new earlier reference to it. This requires ipa_endpoint_aggr_active() and ipa_endpoint_force_close() to be moved as well. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 66eba76763fd5689a1e2102d13b7da24cb61974f Author: Alex Elder Date: Thu Jul 2 06:25:34 2020 -0500 net: ipa: move version test inside ipa_endpoint_program_delay() IPA version 4.2 has a hardware quirk that affects endpoint delay mode, so it isn't used there. Isolate the test that avoids using delay mode for that version inside ipa_endpoint_program_delay(), rather than making that check in the caller. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 4e1a69116869b26d244c2522bd1631967b62ffce Author: Wei Yongjun Date: Thu Jul 2 17:19:46 2020 +0800 mlx4: Mark PM functions as __maybe_unused In certain configurations without power management support, the following warnings happen: drivers/net/ethernet/mellanox/mlx4/main.c:4388:12: warning: 'mlx4_resume' defined but not used [-Wunused-function] 4388 | static int mlx4_resume(struct device *dev_d) | ^~~~~~~~~~~ drivers/net/ethernet/mellanox/mlx4/main.c:4373:12: warning: 'mlx4_suspend' defined but not used [-Wunused-function] 4373 | static int mlx4_suspend(struct device *dev_d) | ^~~~~~~~~~~~ Mark these functions as __maybe_unused to make it clear to the compiler that this is going to happen based on the configuration, which is the standard for these types of functions. Fixes: 0e3e206a3e12 ("mlx4: use generic power management") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit ffa76e38b71415aa23d6366ab7d715a5c122755f Author: Wei Yongjun Date: Thu Jul 2 17:18:10 2020 +0800 ksz884x: mark pcidev_suspend() as __maybe_unused In certain configurations without power management support, gcc report the following warning: drivers/net/ethernet/micrel/ksz884x.c:7182:12: warning: 'pcidev_suspend' defined but not used [-Wunused-function] 7182 | static int pcidev_suspend(struct device *dev_d) | ^~~~~~~~~~~~~~ Mark pcidev_suspend() as __maybe_unused to make it clear. Fixes: 64120615d140 ("ksz884x: use generic power management") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 44947c0b66b90e82cef61fe083b4e0a5c4408b09 Merge: 9eb6206d137e8 8932b5a533db7 Author: David S. Miller Date: Thu Jul 2 14:22:00 2020 -0700 Merge branch 'net-macb-few-code-cleanups' Claudiu Beznea says: ==================== net: macb: few code cleanups Patches in this series cleanup a bit macb code. Changes in v2: - in patch 2/4 use hweight32() instead of hweight_long() ==================== Signed-off-by: David S. Miller commit 8932b5a533db72317181ab7f9e7290f9dd3f5d1b Author: Claudiu Beznea Date: Thu Jul 2 12:06:01 2020 +0300 net: macb: remove is_udp variable Remove is_udp variable that is used in only one place and use ip_hdr(skb)->protocol == IPPROTO_UDP check instead. Signed-off-by: Claudiu Beznea Signed-off-by: David S. Miller commit 580d395cb9ab60261586bf8ddd5d54de2f29d4fa Author: Claudiu Beznea Date: Thu Jul 2 12:06:00 2020 +0300 net: macb: do not initialize queue variable Do not initialize queue variable. It is already initialized in for loops. Signed-off-by: Claudiu Beznea Signed-off-by: David S. Miller commit b7ab39b35935982d8306e3a97c57d8a232968f86 Author: Claudiu Beznea Date: Thu Jul 2 12:05:59 2020 +0300 net: macb: use hweight32() to count set bits in queue_mask Use hweight32() to count set bits in queue_mask. Signed-off-by: Claudiu Beznea Signed-off-by: David S. Miller commit fec371f624632bfa6ae4374fdb6f885f9961c42d Author: Claudiu Beznea Date: Thu Jul 2 12:05:58 2020 +0300 net: macb: do not set again bit 0 of queue_mask Bit 0 of queue_mask is set at the beginning of macb_probe_queues() function. Do not set it again after reading DGFG6 but instead use "|=" operator. Signed-off-by: Claudiu Beznea Signed-off-by: David S. Miller commit 9eb6206d137e86244df95d3244e47c6ff7e2817e Merge: 23212a7007731 36a8e8e265420 Author: David S. Miller Date: Thu Jul 2 14:19:15 2020 -0700 Merge branch 'bridge-mrp-Add-support-for-getting-the-status' Horatiu Vultur says: ==================== bridge: mrp: Add support for getting the status This patch series extends the MRP netlink interface to allow the userspace daemon to get the status of the MRP instances in the kernel. v3: - remove misleading comment - fix to use correctly the RCU v2: - fix sparse warnings ==================== Signed-off-by: David S. Miller commit 36a8e8e26542056bbd7eb5e047cadee30587d230 Author: Horatiu Vultur Date: Thu Jul 2 10:13:07 2020 +0200 bridge: Extend br_fill_ifinfo to return MPR status This patch extends the function br_fill_ifinfo to return also the MRP status for each instance on a bridge. It also adds a new filter RTEXT_FILTER_MRP to return the MRP status only when this is set, not to interfer with the vlans. The MRP status is return only on the bridge interfaces. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit df42ef227dc4fdb7acc8d755e029ed27a2e814f8 Author: Horatiu Vultur Date: Thu Jul 2 10:13:06 2020 +0200 bridge: mrp: Add br_mrp_fill_info Add the function br_mrp_fill_info which populates the MRP attributes regarding the status of each MRP instance. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit e4266b991fead8eb996688e82ff39f6cc59ef7dd Author: Horatiu Vultur Date: Thu Jul 2 10:13:05 2020 +0200 bridge: uapi: mrp: Extend MRP attributes to get the status Add MRP attribute IFLA_BRIDGE_MRP_INFO to allow the userspace to get the current state of the MRP instances. This is a nested attribute that contains other attributes like, ring id, index of primary and secondary port, priority, ring state, ring role. Signed-off-by: Horatiu Vultur Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit f2230d1313c63b638ff8af782c4c202307c5d6fc Author: Rob Herring Date: Tue Jun 30 14:02:16 2020 -0600 dt-bindings: display: Convert connectors to DT schema Convert the analog TV, DVI, HDMI, and VGA connector bindings to DT schema format. Reviewed-by: Laurent Pinchart Reviewed-by: Maxime Ripard Reviewed-by: Sam Ravnborg Acked-by: Sam Ravnborg Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20200630200216.1172566-1-robh@kernel.org commit c8d141ce1b85d29aba008c8caa1faf174e564843 Author: Greg Kroah-Hartman Date: Wed Jul 1 19:15:55 2020 +0200 USB: Fix up terminology in include files USB is a HOST/DEVICE protocol, as per the specification and all documentation. Fix up terms that are not applicable to make things match up with the terms used through the rest of the USB stack. Acked-by: Felipe Balbi Link: https://lore.kernel.org/r/20200701171555.3198836-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 05513a706b4f8f978c0ecc97b6d99793fbaaaf17 Author: Tales L. da Aparecida Date: Tue Jun 23 22:21:19 2020 -0300 rtc: imxdi: fix trivial typos Fix typos 'pionter' -> 'pointer' and 'softwere' -> 'software' Signed-off-by: Tales L. da Aparecida Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200624012119.54768-1-tales.aparecida@gmail.com commit 3180cfabf6fbf982ca6d1a6eb56334647cc1416b Author: Sebastian Reichel Date: Mon Jun 29 13:41:23 2020 +0200 rtc: cpcap: fix range Unbreak CPCAP driver, which has one more bit in the day counter increasing the max. range from 2014 to 2058. The original commit introducing the range limit was obviously wrong, since the driver has only been written in 2017 (3 years after 14 bits would have run out). Fixes: d2377f8cc5a7 ("rtc: cpcap: set range") Reported-by: Sicelo A. Mhlongo Reported-by: Dev Null Signed-off-by: Sebastian Reichel Signed-off-by: Alexandre Belloni Tested-by: Merlijn Wajer Acked-by: Tony Lindgren Acked-by: Merlijn Wajer Link: https://lore.kernel.org/r/20200629114123.27956-1-sebastian.reichel@collabora.com commit db8337853b834f806ab537200d35f0d1909e6b03 Author: Chris Wilson Date: Thu Jul 2 17:36:23 2020 +0100 drm/i915/gem: Only revoke mmap handlers if active Avoid waking up the device and taking stale locks if we know that the object is not currently mmapped. This is particularly useful as not many object are actually mmapped and so we can destroy them without waking the device up, and gives us a little more freedom of workqueue ordering during shutdown. v2: Pull the release_mmap() into its single user in freeing the objects, where there can not be any race with a concurrent user of the freed object. Or so one hopes! Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin , Reviewed-by: Tvrtko Ursulin , Link: https://patchwork.freedesktop.org/patch/msgid/20200702163623.6402-2-chris@chris-wilson.co.uk commit cb2baf42dcec630acc15f9ff2f8c09c8b70b03da Author: Chris Wilson Date: Thu Jul 2 17:36:22 2020 +0100 drm/i915/gem: Only revoke the GGTT mmappings on aperture detiling changes Only a GGTT mmapping will use the aperture detiling registers, so on a tiling change for an object, we only need to revoke those mmappings and not the CPU mmappings (which are always linear irrespective of the tiling). Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200702163623.6402-1-chris@chris-wilson.co.uk commit 7c792f33c1b3e231cfd50fea589194c593a6ce3c Author: Christoph Hellwig Date: Thu Jul 2 21:21:25 2020 +0200 block: initialize current->bio_list[1] in __submit_bio_noacct_mq bio_alloc_bioset references current->bio_list[1], so we need to initialize it for the blk-mq submission path as well. Fixes: ff93ea0ce763 ("block: shortcut __submit_bio_noacct for blk-mq drivers") Reported-by: Qian Cai Reported-by: Naresh Kamboju Signed-off-by: Christoph Hellwig Tested-by: Naresh Kamboju Signed-off-by: Jens Axboe commit 7801f3b792b0fd171b02f2cb974e758295e68e0f Author: Lucas De Marchi Date: Tue Jun 30 21:50:54 2020 -0700 drm/i915/display: prefer dig_port to reference intel_digital_port We have a mix of dport, intel_dport, intel_dig_port and dig_port to reference a intel_digital_port struct. Numbers are around 5 intel_dport 36 dport 479 intel_dig_port 352 dig_port Since we already removed the intel_ prefix from most of our other structs, do the same here and prefer dig_port. v2: rename everything in i915, not just a few display sources and reword commit message (from Matt Roper) Signed-off-by: Lucas De Marchi Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20200701045054.23357-1-lucas.demarchi@intel.com commit a164347333dde5f7f6aa4e7569c2b550e54f36de Author: Daniel Vetter Date: Fri Jun 12 22:49:40 2020 +0200 drm/vmwgfx: Use __drm_atomic_helper_crtc_reset Now also comes with the added benefit of doing a drm_crtc_vblank_off(), which means vblank state isn't ill-defined and fail-y at driver load before the first modeset on each crtc. v2: Compile fix. Oops. Reviewed-by: Roland Scheidegger Signed-off-by: Daniel Vetter Cc: VMware Graphics Cc: Roland Scheidegger Link: https://patchwork.freedesktop.org/patch/msgid/20200612204940.2134653-1-daniel.vetter@ffwll.ch Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-7-daniel.vetter@ffwll.ch commit e8b383cb7023c7385337f018227c96db494ec44d Author: Daniel Vetter Date: Fri Jun 12 18:00:53 2020 +0200 drm/vc4: Use __drm_atomic_helper_crtc_reset Now also comes with the added benefit of doing a drm_crtc_vblank_off(), which means vblank state isn't ill-defined and fail-y at driver load before the first modeset on each crtc. Reviewed-by: Maxime Ripard Signed-off-by: Daniel Vetter Cc: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-5-daniel.vetter@ffwll.ch commit 2d267b81898eb7ae53b3c8902bdda1176bc4cb0c Author: Daniel Vetter Date: Fri Jun 12 18:00:52 2020 +0200 drm/mtk: Use __drm_atomic_helper_crtc_reset Now also comes with the added benefit of doing a drm_crtc_vblank_off(), which means vblank state isn't ill-defined and fail-y at driver load before the first modeset on each crtc. Acked-by: Chun-Kuang Hu Signed-off-by: Daniel Vetter Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-4-daniel.vetter@ffwll.ch commit 8ed5dcf966dd54085e419c1302c7646b6cdaff97 Author: Daniel Vetter Date: Fri Jun 12 18:00:51 2020 +0200 drm/imx: Use __drm_atomic_helper_crtc_reset Now also comes with the added benefit of doing a drm_crtc_vblank_off(), which means vblank state isn't ill-defined and fail-y at driver load before the first modeset on each crtc. Acked-by: Philipp Zabel Signed-off-by: Daniel Vetter Cc: Philipp Zabel Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Cc: linux-arm-kernel@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-3-daniel.vetter@ffwll.ch commit 1f8a52ece62bfe039982ecd5e363c335c31aae62 Author: Daniel Vetter Date: Fri Jun 12 18:00:50 2020 +0200 drm/amdgpu: Use __drm_atomic_helper_crtc_reset Now also comes with the added benefit of doing a drm_crtc_vblank_off(), which means vblank state isn't ill-defined and fail-y at driver load before the first modeset on each crtc. Reviewed-by: Harry Wentland Signed-off-by: Daniel Vetter Cc: Alex Deucher Cc: Nicholas Kazlauskas Cc: Harry Wentland Cc: Rodrigo Siqueira Cc: Bhawanpreet Lakha Cc: Roman Li Cc: Mikita Lipski Cc: Stylon Wang Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-2-daniel.vetter@ffwll.ch commit 51f644b40b4b794b28b982fdd5d0dd8ee63f9272 Author: Daniel Vetter Date: Fri Jun 12 18:00:49 2020 +0200 drm/atomic-helper: reset vblank on crtc reset Only when vblanks are supported ofc. Some drivers do this already, but most unfortunately missed it. This opens up bugs after driver load, before the crtc is enabled for the first time. syzbot spotted this when loading vkms as a secondary output. Given how many drivers are buggy it's best to solve this once and for all in shared helper code. Aside from moving the few existing calls to drm_crtc_vblank_reset into helpers (i915 doesn't use helpers, so keeps its own) I think the regression risk is minimal: atomic helpers already rely on drivers calling drm_crtc_vblank_on/off correctly in their hooks when they support vblanks. And driver that's failing to handle vblanks after this is missing those calls already, and vblanks could only work by accident when enabling a CRTC for the first time right after boot. Big thanks to Tetsuo for helping track down what's going wrong here. There's only a few drivers which already had the necessary call and needed some updating: - komeda, atmel and tidss also needed to be changed to call __drm_atomic_helper_crtc_reset() intead of open coding it - tegra and msm even had it in the same place already, just code motion, and malidp already uses __drm_atomic_helper_crtc_reset(). - Laurent noticed that rcar-du and omap open-code their crtc reset and hence would actually be broken by this patch now. So fix them up by reusing the helpers, which brings the drm_crtc_vblank_reset() back. Only call left is in i915, which doesn't use drm_mode_config_reset, but has its own fastboot infrastructure. So that's the only case where we actually want this in the driver still. I've also reviewed all other drivers which set up vblank support with drm_vblank_init. After the previous patch fixing mxsfb all atomic drivers do call drm_crtc_vblank_on/off as they should, the remaining drivers are either legacy kms or legacy dri1 drivers, so not affected by this change to atomic helpers. v2: Use the drm_dev_has_vblank() helper. v3: Laurent pointed out that omap and rcar-du used drm_crtc_vblank_off instead of drm_crtc_vblank_reset. Adjust them too. v4: Laurent noticed that rcar-du and omap open-code their crtc reset and hence would actually be broken by this patch now. So fix them up by reusing the helpers, which brings the drm_crtc_vblank_reset() back. v5: also mention rcar-du and ompadrm in the proper commit message above (Laurent). Reviewed-by: Laurent Pinchart Acked-by: Maxime Ripard Cc: Laurent Pinchart Reviewed-by: Boris Brezillon Acked-by: Liviu Dudau Acked-by: Thierry Reding Link: https://syzkaller.appspot.com/bug?id=0ba17d70d062b2595e1f061231474800f076c7cb Reported-by: Tetsuo Handa Reported-by: syzbot+0871b14ca2e2fb64f6e3@syzkaller.appspotmail.com Cc: Tetsuo Handa Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Brian Starkey Cc: Sam Ravnborg Cc: Boris Brezillon Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Thierry Reding Cc: Jonathan Hunter Cc: Jyri Sarha Cc: Tomi Valkeinen Cc: Rob Clark Cc: Sean Paul Cc: Brian Masney Cc: Emil Velikov Cc: zhengbin Cc: Thomas Gleixner Cc: linux-tegra@vger.kernel.org Cc: Kieran Bingham Cc: linux-arm-kernel@lists.infradead.org Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-1-daniel.vetter@ffwll.ch commit d524b87f77364db096855d7eb714ffacec974ddf Author: Jani Nikula Date: Thu Jul 2 21:25:28 2020 +0300 drm/i915: Update DRIVER_DATE to 20200702 Signed-off-by: Jani Nikula commit dd72078466ecd525f4d489e7b0093cd9b5044c8e Author: Mark Brown Date: Thu Jun 25 14:15:07 2020 +0100 arm64: Document sysctls for emulated deprecated instructions We have support for emulating a number of deprecated instructions in the kernel with individual Kconfig options enabling this support per instruction. In addition to the Kconfig options we also provide runtime control via sysctls but this is not currently mentioned in the Kconfig so not very discoverable for users. This is particularly important for SWP/SWPB since this is disabled by default at runtime and must be enabled via the sysctl, causing considerable frustration for users who have enabled the config option and are then confused to find that the instruction is still faulting. Add a reference to the sysctls in the help text for each of the config options, noting that SWP/SWPB is disabled by default, to improve the user experience. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20200625131507.32334-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit 0cb42c0265837fafa2b4f302c8a7fed2631d7869 Author: Jason Gunthorpe Date: Fri Jun 26 14:49:10 2020 -0300 RDMA/core: Fix bogus WARN_ON during ib_unregister_device_queued() ib_unregister_device_queued() can only be used by drivers using the new dealloc_device callback flow, and it has a safety WARN_ON to ensure drivers are using it properly. However, if unregister and register are raced there is a special destruction path that maintains the uniform error handling semantic of 'caller does ib_dealloc_device() on failure'. This requires disabling the dealloc_device callback which triggers the WARN_ON. Instead of using NULL to disable the callback use a special function pointer so the WARN_ON does not trigger. Fixes: d0899892edd0 ("RDMA/device: Provide APIs from the core code to help unregistration") Link: https://lore.kernel.org/r/0-v1-a36d512e0a99+762-syz_dealloc_driver_jgg@nvidia.com Reported-by: syzbot+4088ed905e4ae2b0e13b@syzkaller.appspotmail.com Suggested-by: Hillf Danton Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit bbdbc11804ff0b4130e7550113b452e96a74d16e Author: Bhupesh Sharma Date: Thu May 14 00:22:37 2020 +0530 arm64/crash_core: Export TCR_EL1.T1SZ in vmcoreinfo TCR_EL1.TxSZ, which controls the VA space size, is configured by a single kernel image to support either 48-bit or 52-bit VA space. If the ARMv8.2-LVA optional feature is present and we are running with a 64KB page size, then it is possible to use 52-bits of address space for both userspace and kernel addresses. However, any kernel binary that supports 52-bit must also be able to fall back to 48-bit at early boot time if the hardware feature is not present. Since TCR_EL1.T1SZ indicates the size of the memory region addressed by TTBR1_EL1, export the same in vmcoreinfo. User-space utilities like makedumpfile and crash-utility need to read this value from vmcoreinfo for determining if a virtual address lies in the linear map range. While at it also add documentation for TCR_EL1.T1SZ variable being added to vmcoreinfo. It indicates the size offset of the memory region addressed by TTBR1_EL1. Signed-off-by: Bhupesh Sharma Tested-by: John Donnelly Tested-by: Kamlakant Patel Tested-by: Amit Daniel Kachhap Reviewed-by: James Morse Reviewed-by: Amit Daniel Kachhap Cc: James Morse Cc: Mark Rutland Cc: Will Deacon Cc: Steve Capper Cc: Ard Biesheuvel Cc: Dave Anderson Cc: Kazuhito Hagio Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org Link: https://lore.kernel.org/r/1589395957-24628-3-git-send-email-bhsharma@redhat.com [catalin.marinas@arm.com: removed vabits_actual from the commit log] Signed-off-by: Catalin Marinas commit 1d50e5d0c5052446cb85a3bf11fe8ba4e8d770ca Author: Bhupesh Sharma Date: Thu May 14 00:22:36 2020 +0530 crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo Right now user-space tools like 'makedumpfile' and 'crash' need to rely on a best-guess method of determining value of 'MAX_PHYSMEM_BITS' supported by underlying kernel. This value is used in user-space code to calculate the bit-space required to store a section for SPARESMEM (similar to the existing calculation method used in the kernel implementation): #define SECTIONS_SHIFT (MAX_PHYSMEM_BITS - SECTION_SIZE_BITS) Now, regressions have been reported in user-space utilities like 'makedumpfile' and 'crash' on arm64, with the recently added kernel support for 52-bit physical address space, as there is no clear method of determining this value in user-space (other than reading kernel CONFIG flags). As per suggestion from makedumpfile maintainer (Kazu), it makes more sense to append 'MAX_PHYSMEM_BITS' to vmcoreinfo in the core code itself rather than in arch-specific code, so that the user-space code for other archs can also benefit from this addition to the vmcoreinfo and use it as a standard way of determining 'SECTIONS_SHIFT' value in user-land. A reference 'makedumpfile' implementation which reads the 'MAX_PHYSMEM_BITS' value from vmcoreinfo in a arch-independent fashion is available here: While at it also update vmcoreinfo documentation for 'MAX_PHYSMEM_BITS' variable being added to vmcoreinfo. 'MAX_PHYSMEM_BITS' defines the maximum supported physical address space memory. Signed-off-by: Bhupesh Sharma Tested-by: John Donnelly Acked-by: Dave Young Cc: Boris Petkov Cc: Ingo Molnar Cc: Thomas Gleixner Cc: James Morse Cc: Mark Rutland Cc: Will Deacon Cc: Michael Ellerman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Dave Anderson Cc: Kazuhito Hagio Cc: x86@kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: kexec@lists.infradead.org Link: https://lore.kernel.org/r/1589395957-24628-2-git-send-email-bhsharma@redhat.com Signed-off-by: Catalin Marinas commit c950e9fcc79b8fedd3126ede4dcd70add8ea5339 Author: Colin Ian King Date: Thu Jul 2 12:48:35 2020 +0100 ASoC: Intel: bxt-da7219-max98357a: return -EINVAL on unrecognized speaker amplifier Currently if the ctx->spkamp is not recognized an error message is reported but the code continues to set up the device with uninitialized variables such as the number of widgets. Fix this by returning -EINVAL for unrecognized speaker amplifier types. Fixes: e1435a1feb18 ("ASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp") Signed-off-by: Colin Ian King Acked-by: Pierre-Louis Bossart Addresses-Coverity: ("Uninitialized scalar variable") Link: https://lore.kernel.org/r/20200702114835.37889-1-colin.king@canonical.com Signed-off-by: Mark Brown commit b4237ebafaced79b3ff38259494766849befb30b Author: Colin Ian King Date: Wed Jul 1 15:59:05 2020 +0100 drm/amd/display: remove redundant initialization of variable result The variable result is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 2a80f883988862dc2c52f79291ed38388246cf36 Author: Alex Deucher Date: Wed Jul 1 12:00:08 2020 -0400 drm/amdgpu: use %u rather than %d for sclk/mclk Large clock values may overflow and show up as negative. Reported by prOMiNd on IRC. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 836dab8519032e641d512c7d19cbc4caf8d7f810 Author: Alex Deucher Date: Thu Jun 25 17:51:59 2020 -0400 drm/amdgpu/atomfirmware: update vram info handling for renoir Add support for integrated_system_info table v12. Use the actual v12 structure. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 2fde24e4dc8adc73ba69c5eea347822d5b8a2423 Author: Alex Deucher Date: Thu Jun 25 17:46:46 2020 -0400 drm/amdgpu/atomfirmware: update to latest integratedinfotable Used for renoir. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit fe098a5d6443bebfc0e5a1a567cb0d1f9255a2b3 Author: Alex Deucher Date: Thu Jun 25 17:55:57 2020 -0400 drm/amdgpu/atomfirmware: fix vram_info fetching for renoir Renoir uses integrated_system_info table v12. The table has the same layout as v11 with respect to this data. Just reuse the existing code for v12 for stable. Fixes incorrectly reported vram info in the driver output. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 9822ba2ead1baa3de4860ad9472f652c4cc78c9c Author: Evan Quan Date: Sun Jun 28 19:12:42 2020 +0800 drm/amd/powerplay: fix compile error with ARCH=arc Fix the compile error below: drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c: In function 'smu_v11_0_init_microcode': >> arch/arc/include/asm/bug.h:22:2: error: implicit declaration of function 'pr_warn'; did you mean 'pci_warn'? [-Werror=implicit-function-declaration] 22 | pr_warn("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __func__); \ | ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../powerplay/smu_v11_0.c:176:3: note: in expansion of macro 'BUG' 176 | BUG(); Reported-by: kernel test robot Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 33d63b1f4d3a47f4697f86ab83b1c7221da4236e Author: Nicholas Kazlauskas Date: Mon Jun 29 13:03:52 2020 -0400 drm/amd/display: Only revalidate bandwidth on medium and fast updates [Why] Changes that are fast don't require updating DLG parameters making this call unnecessary. Considering this is an expensive call it should not be done on every flip. DML touches clocks, p-state support, DLG params and a few other DC internal flags and these aren't expected during fast. A hang has been reported with this change when called on every flip which suggests that modifying these fields is not recommended behavior on fast updates. [How] Guard the validation to only happen if update type isn't FAST. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1191 Fixes: a24eaa5c51255b ("drm/amd/display: Revalidate bandwidth before commiting DC updates") Signed-off-by: Nicholas Kazlauskas Acked-by: Alex Deucher Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit ecc874a6e7cb398b363b4e078fca4c097cb286ab Author: Pierre-Loup A. Griffais Date: Thu Sep 12 09:44:04 2019 -0700 drm/amd/display: Create plane rotation property It's otherwise properly supported, just needs exposing to userspace. Reviewed-by: Harry Wentland Signed-off-by: Pierre-Loup A. Griffais Signed-off-by: Alex Deucher commit fea7d919158ab04ddefe2b1cf1b8e21418f4e569 Author: Joseph Greathouse Date: Mon Jun 29 18:05:36 2020 -0500 drm/amdkfd: Add Arcturus GWS support and fix VG10 Add support for GWS in Arcturus, which needs MEC2 firmware #48 or above. Fix the MEC2 version check for Vega 10 GWS support, since Vega 10 firmware adds 0x8000 to the actual firmware revision. We were previously declaring support where it did not exist. Signed-off-by: Joseph Greathouse Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit e78b579d2d607404b544979dcd6878c9a83e78ca Author: Hawking Zhang Date: Tue Jun 30 15:52:27 2020 +0800 Revert "drm/amdgpu: support access regs outside of mmio bar" This reverts commit 2eee0229f65e897134566888e5321bcb3af0df7a. Fallback to a stable base until we have a correct new one Signed-off-by:Hawking Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2c738637bac1aa62fd0066e201d4acd7a7155bfb Author: Monk Liu Date: Mon Jun 29 17:32:16 2020 +0800 drm/amdgpu: make IB test synchronize with init for SRIOV(v2) issue: originally we kickoff IB test asynchronously with driver's init, thus the IB test may still running when the driver loading done (modprobe amdgpu done). if we shutdown VM immediately after amdgpu driver loaded then GPU may hang because the IB test is still running fix: flush the delayed_init routine at the bottom of device_init to avoid driver loading done prior to the IB test completes Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher commit 5d7c6f18d2a9262e6daf5dd8806961d32060c976 Author: Joseph Greathouse Date: Mon Jun 29 16:23:24 2020 -0500 drm/amdkfd: Update hardware scheduling time quanta Update PROCESS_QUANTUM, the time the hardware scheduler allows processes to run before switching to other processes when it becomes over-subscribed. Increase this to 10ms, to allow processes to better amortize their task switch times. Update HQD Quantum, the amount of time that an active queue stays attached to the CP before we forcibly switch it for another active queue for fairness. Setting these so that HQD < PROCESS makes it easier to ensure that we get fairness when we have multiple active queues on the device. Otherwise we may start process-swapping before we get to all the queues in a CP. Signed-off-by: Joseph Greathouse Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 4d765d31625069e355f3ac3bfcc7eb6172bc1ce1 Author: Dmytro Laktyushkin Date: Fri Jun 12 09:35:37 2020 -0400 drm/amd/display: Enable 4 to 1 mpc combine for max detile use In case of certain display configurations we want to allow max detile buffer utilization by using 4 to 1 mpc combine Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 039efec245109b66ab06326e28cd2bf38c10a41f Author: Aric Cyr Date: Mon Jun 22 12:00:51 2020 -0400 drm/amd/display: 3.2.92 Signed-off-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 07c8176e7aee1ad604a754875d4597c51886614e Author: Jing Zhou Date: Sat Jun 20 13:29:43 2020 +0800 drm/amd/display: Add register key and status for edid [Why] Register key for AE or QA do regression test. New edid status for check. [How] Add register key edid_read_retry_times. Add new edid status EDID_FALL_BACK. Signed-off-by: Jing Zhou Reviewed-by: Charlene Liu Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 80eba958fe1c1926f6d3f854e499a5dc0e2ac955 Author: Anthony Koo Date: Fri Jun 19 17:06:40 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.22 [Header Changes] - Add command for notification of active streams to DMUB Signed-off-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit ad339f69114a6a145fc94d44376851c53dee3475 Author: Jaehyun Chung Date: Thu Jun 18 15:27:35 2020 -0400 drm/amd/display: Fix incorrect rounding for 10Hz refresh range [Why] In cases where refresh range is slightly below 10, FreeSync is not active or supported. Need to round values before checking refresh range in order to have FreeSync supported in these cases. [How] Remove redundant values and round values before checking valid refresh range. Signed-off-by: Jaehyun Chung Reviewed-by: Aric Cyr Acked-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 3e84b9c977d7392c0e6a5520c09db36bcb57b743 Author: Anthony Koo Date: Fri Jun 19 16:52:57 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.21 Signed-off-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 5aedc7bc40708fe84695e1584b82c081785fd5a7 Author: jinlong zhang Date: Wed Jun 17 23:20:56 2020 +0800 drm/amd/display: check dpcd read status of DP_DOWNSTREAM_PORT_0 [Why] For special DP convert VGA dongle, core_link_read_dpcd for DP_DOWNSTREAM_PORT_0 always return fail, then dongle_type will be set to DISPLAY_DONGLE_NONE, which will cause desktop resolution abnormal. [How] If dpcd for DP_DOWNSTREAM_PORT_0 read fail, skip set dongle_type = DISPLAY_DONGLE_NONE. Signed-off-by: jinlong zhang Reviewed-by: Wenjing Liu Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 2705297c1a5fa4a5460a119fd103e08efc39db95 Author: Yongqiang Sun Date: Tue Jun 16 14:44:45 2020 -0400 drm/amd/display: Handle SMU msg response [Why] SMU may return error code to driver, but driver only check if response is OK. [How] Check SMU response instead of reg_wait, assert in case of reponse isn't OK. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit ca37b02fba3d7331a934242b5d541395dc9d194d Author: Anthony Koo Date: Tue Jun 16 17:02:10 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.20 Signed-off-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit dd827a489c955254e9f139df29bd8ed970c98d61 Author: Joshua Aberback Date: Mon Jun 15 17:58:00 2020 -0400 drm/amd/display: Preserve gpu memory allocation for life of dc [Why] We want to keep the same buffer allocated for use during multiple hardware initializations. [How] - allocate gpu memory buffer on clock manager construct - free gpu memory buffer on clock manager destruct Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 6bc1242960b1e99a708aacdb7f531e099c5813dd Author: Wyatt Wood Date: Thu Jun 11 09:11:01 2020 -0400 drm/amd/display: Initialize psr debug flags to 0 [Why] Debug flags are not set by default. [How] Set debug flags to 0 Signed-off-by: Wyatt Wood Reviewed-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit f56071d4403b1d1ac02e1d74e1683102f23ba031 Author: Wenhui Sheng Date: Mon Jun 29 13:38:58 2020 +0800 drm/amdgpu: correct discovery_tmr_size init val The legacy way to initialize discovery_tmr_size is using DISCOVERY_TMR_SIZE, while after we reduce DISCOVERY_TMR_SIZE from 64KB to 4KB, variable discovery_tmr_size is also reduced to 4KB, this is not correct, it still should be 64KB, discovery_tmr_size will be used to calculate ip_discovery reserved mem's start address and size. Using DISCOVERY_TMR_OFFSET to init discovery_tmr_size instead. Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d818ed288af8a86d5b3b9e271d11cd9416f9a23f Author: Evan Quan Date: Wed Jun 17 11:54:31 2020 +0800 drm/amd/powerplay: drop unnecessary "@" on OD sysfs output To follow conventional style. And this unnecessary "@" confuses our userspace tool. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f0f3d68e67ea2f737577572e5a164479f4e64740 Author: Likun Gao Date: Wed Jun 24 14:03:48 2020 +0800 drm/amd/powerplay: update driver if file for sienna_cichlid Update sienna_cichlid driver if header file to match pptable changes. Signed-off-by: Likun Gao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 969c8d16a27f07c0930cc31628431adb29c5dd0f Author: Likun Gao Date: Wed Jun 24 13:48:22 2020 +0800 drm/amd/powerplay: change method to set board parameters Copy board parameters directly instead of set each parameter for sienna_cichlid. Signed-off-by: Likun Gao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit d215a2a3a341905f4c5192b158e3af1fbd60a29e Author: Wenhui Sheng Date: Wed Jun 24 17:10:02 2020 +0800 drm/amdgpu: reduce ip discovery data reading size Only read first 4K data instead of whole TMR block, so we can reduce the time in full access mode. Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e3a4d51c767b9cc9dc558334a215b5fd53016954 Author: Wenhui Sheng Date: Tue Jun 23 13:45:58 2020 +0800 drm/amdgpu: merge atombios init block After we move request full access before set ip blocks, we can merge atombios init block of SRIOV and baremetal together. Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 00a979f3d69e0c275e88c741b854dbe0d5238ae0 Author: Wenhui Sheng Date: Tue Jun 23 13:43:49 2020 +0800 drm/amdgpu: invoke req full access early enough From SIENNA_CICHLID, HW introduce a new protection feature which can control the FB, doorbell and MMIO write access for VF, so guest driver should request full access before ip discovery, or we couldn't access ip discovery data in FB. Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d95f09acad3f69f968b26fc973f224e2a66872ca Author: Wenhui Sheng Date: Tue Jun 23 13:42:58 2020 +0800 drm/amdgpu: move reg base init forward for soc15 Init soc15 reg base early enough so we can touch mailbox related registers in request full access for sriov before set_ip_blocks, vi&nv arch doesn't use reg base in virt ops. v2: fix reg_base_init missed in bare metal case. Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c1299461b7d68eed457478ddf3e93bbd89e5c3ca Author: Wenhui Sheng Date: Tue Jun 23 11:35:05 2020 +0800 drm/amdgpu: request init data in virt detection Move request init data to virt detection func, so we can insert request full access between request init data and set ip blocks. Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 81659b2022cbdd7491f9480ab15afd38b91281d5 Author: Felix Kuehling Date: Wed Jun 24 23:08:46 2020 -0400 drm/amdgpu: Let KFD use more VMIDs on Arcturus When there is no graphics support, KFD can use more of the VMIDs. Graphics VMIDs are only used for video decoding/encoding and post processing. With two VCE engines, there is no reason to reserve more than 2 VMIDs for that. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 40111ec2298f442aab299234cd610d90809f58de Author: Felix Kuehling Date: Wed Jun 24 23:05:44 2020 -0400 drm/amdgpu: Clean up KFD VMID assignment The KFD VMID assignment was hard-coded in a few places. Consolidate that in a single variable adev->vm_manager.first_kfd_vmid. The value is still assigned in gmc-ip-version-specific code. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit a71a4f501586c9a1c710c3d5c1db4ff6650e5fc4 Author: Alex Jivin Date: Wed Jun 24 13:37:20 2020 -0400 drm/amdgpu: SI support for UVD and VCE power managment Port functionality from the Radeon driver to support UVD and VCE power management. Signed-off-by: Alex Jivin Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher commit fb40bceb6cdff19809b2a3fb7fa4bed36d2638bb Author: Alex Jivin Date: Wed Jun 24 12:41:14 2020 -0400 drm/amdgpu: SI support for VCE clock control Port functionality from the Radeon driver to support VCE clock control. Signed-off-by: Alex Jivin Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher commit 3b0627a4b69671b2a81c125c3ae0456860764068 Author: Alex Jivin Date: Wed Jun 24 11:45:36 2020 -0400 drm/amdgpu: SI support for UVD clock control Port functionality from the Radeon driver to support UVD clock control. Signed-off-by: Alex Jivin Reviewed-by: Alex Deucher Acked-by: Christian König Signed-off-by: Alex Deucher commit 8cc31dc941e264aaf7201963df4dea1a313b25e8 Merge: c9b5e85aebeb6 347f12d573412 Author: Mark Brown Date: Thu Jul 2 16:45:49 2020 +0100 Merge series "regulator: mt6397: Implement of_map_mode regulator_desc function" from Anand K Mistry : This patchset adds support for being able to change regulator modes for the mt6397 regulator. This is needed to allow the voltage scaling support in the MT8173 SoC to be used on the elm (Acer Chromebook R13) and hana (several Lenovo Chromebooks) devices. Without a of_map_mode implementation, the regulator-allowed-modes devicetree field is skipped, and attempting to change the regulator mode results in an error: [ 1.439165] vpca15: mode operation not allowed Changes in v2: - Introduce constants in dt-bindings - Improve conditional readability Anand K Mistry (4): regulator: mt6397: Move buck modes into header file dt-bindings: regulator: mt6397: Document valid modes regulator: mt6397: Implement of_map_mode arm64: dts: mediatek: Update allowed mt6397 regulator modes for elm boards .../bindings/regulator/mt6397-regulator.txt | 3 +++ arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 +++- drivers/regulator/mt6397-regulator.c | 17 ++++++++++++++--- .../regulator/mediatek,mt6397-regulator.h | 15 +++++++++++++++ 4 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 include/dt-bindings/regulator/mediatek,mt6397-regulator.h -- 2.27.0.212.ge8ba1cc988-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit c9b5e85aebeb66ec0b43e2cd771ea8cd690c11c1 Merge: b3ddc40b61e37 650e5adae0197 Author: Mark Brown Date: Thu Jul 2 16:45:48 2020 +0100 Merge series "regulator: da9211: support changing modes" from Anand K Mistry : This patchset adds support for being able to change regulator modes for the da9211 regulator. This is needed to allow the voltage scaling support in the MT8173 SoC to be used in the elm (Acer Chromebook R13) and hana (several Lenovo Chromebooks) devices. Anand K Mistry (4): regulator: da9211: Move buck modes into header file dt-bindings: regulator: da9211: Document allowed modes regulator: da9211: Implement of_map_mode arm64: dts: mediatek: Update allowed regulator modes for elm boards .../devicetree/bindings/regulator/da9211.txt | 4 +++ arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 4 ++- drivers/regulator/da9211-regulator.c | 30 +++++++++++++++---- .../regulator/dlg,da9211-regulator.h | 16 ++++++++++ 4 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 include/dt-bindings/regulator/dlg,da9211-regulator.h -- 2.27.0.212.ge8ba1cc988-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit b3ddc40b61e37b65247d331b6ba3251362b8e7c3 Merge: e2c6678bd8368 573016266e676 Author: Mark Brown Date: Thu Jul 2 16:45:47 2020 +0100 Merge series "regulator: add support for SY8827N regulator" from Jisheng Zhang : The SY8827N from Silergy Corp is a single output DC/DC converter. The voltage can be controlled via I2C. Jisheng Zhang (2): dt-bindings: regulator: add document bindings for sy8827n regulator: add support for SY8827N regulator .../bindings/regulator/silergy,sy8827n.yaml | 45 +++++ drivers/regulator/Kconfig | 7 + drivers/regulator/Makefile | 1 + drivers/regulator/sy8827n.c | 185 ++++++++++++++++++ 4 files changed, 238 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/silergy,sy8827n.yaml create mode 100644 drivers/regulator/sy8827n.c -- 2.27.0 commit e2c6678bd836861093eecd733610f77b2d87e9f8 Author: Jisheng Zhang Date: Thu Jul 2 10:02:00 2020 +0800 regulator: mp886x: use .probe_new Use the new .probe_new for mp886x. It does not use the const struct i2c_device_id * argument, so convert it to utilise the simplified i2c driver registration. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200702100200.1a4c65d1@xhacker.debian Signed-off-by: Mark Brown commit 94462138f368a5e079d53d578509276e4366d0c1 Author: Colin Ian King Date: Thu Jul 2 12:56:59 2020 +0100 regulator: fix null pointer check on regmap The null pointer check on regmap that checks for a dev_get_regmap failure is currently returning -ENOENT if the regmap succeeded. Fix this by adding in the missing ! operator. Fixes: 4fe66d5a62fb ("regulator: Add support for QCOM PMIC VBUS booster") Signed-off-by: Colin Ian King Addresses-Coverity: ("Dereference after null check") Link: https://lore.kernel.org/r/20200702115659.38208-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 650e5adae0197bb9ecaa48b98b8ada1cc6772fb0 Author: Anand K Mistry Date: Thu Jul 2 13:15:23 2020 +1000 regulator: da9211: Document allowed modes This patch adds a description of how operating modes may be specified. Signed-off-by: Anand K Mistry Link: https://lore.kernel.org/r/20200702131350.2.I6131e251d13f60d8c5347bb4faa9dc2364c87848@changeid Signed-off-by: Mark Brown commit 6f1f1a8039e5f7a61e932d6a9a50708c56e21033 Author: Anand K Mistry Date: Thu Jul 2 13:15:24 2020 +1000 regulator: da9211: Implement of_map_mode Implementing of_map_mode is necessary to be able to specify operating modes in the devicetree using 'regulator-allowed-modes', and to change regulator modes. Signed-off-by: Anand K Mistry Link: https://lore.kernel.org/r/20200702131350.3.I6a0bc18fcdb2fe13e838a31e6d034d0e095368bc@changeid Signed-off-by: Mark Brown commit 6c8b65950b1c75b9e41b5bf314f5d7b81df91272 Author: Anand K Mistry Date: Thu Jul 2 13:15:22 2020 +1000 regulator: da9211: Move buck modes into header file This will allow device trees to make use of these constants. Signed-off-by: Anand K Mistry Link: https://lore.kernel.org/r/20200702131350.1.I96e67ab7b4568287eb939e8a572cbc03e87f1aa0@changeid Signed-off-by: Mark Brown commit 573016266e6767f7917feeda8e1e3b19673f4981 Author: Jisheng Zhang Date: Thu Jul 2 17:13:35 2020 +0800 regulator: add document bindings for sy8827n Add device tree binding information for sy8827n regulator driver. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200702171335.59f5e79b@xhacker.debian Signed-off-by: Mark Brown commit 38fc6f295726366a0135ca87ab98f3ab92afd81f Author: Jisheng Zhang Date: Thu Jul 2 17:14:38 2020 +0800 regulator: add support for SY8827N regulator The SY8827N from Silergy Corp is a single output DC/DC converter. The voltage can be controlled via I2C. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20200702171438.20edc523@xhacker.debian Signed-off-by: Mark Brown commit 638d503130098e234b002942b33a4d886ef6f270 Author: Anshuman Khandual Date: Mon Jun 29 10:08:31 2020 +0530 arm64/panic: Unify all three existing notifier blocks Currently there are three different registered panic notifier blocks. This unifies all of them into a single one i.e arm64_panic_block, hence reducing code duplication and required calling sequence during panic. This preserves the existing dump sequence. While here, just use device_initcall() directly instead of __initcall() which has been a legacy alias for the earlier. This replacement is a pure cleanup with no functional implications. Signed-off-by: Anshuman Khandual Acked-by: Mark Rutland Cc: Will Deacon Cc: Steve Capper Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1593405511-7625-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Catalin Marinas commit 347f12d573412cb7ba4781b58f42f0ca7eecde6d Author: Anand K Mistry Date: Thu Jul 2 16:23:18 2020 +1000 regulator: mt6397: Document valid modes Document valid mode values for BUCK regulators. Signed-off-by: Anand K Mistry Link: https://lore.kernel.org/r/20200702162231.v2.2.I0a814b246cfe47f8dd1e25553ee881cbcfd0d8eb@changeid Signed-off-by: Mark Brown commit 8096236db4349c43a2b19b8ceb11b0b997354223 Author: Anand K Mistry Date: Thu Jul 2 16:23:19 2020 +1000 regulator: mt6397: Implement of_map_mode Implementing of_map_mode is necessary to be able to specify operating modes in the devicetree using 'regulator-allowed-modes', and to change regulator modes. Signed-off-by: Anand K Mistry Link: https://lore.kernel.org/r/20200702162231.v2.3.I7acfb591bfacf3b1b04a3d388385098bfcc9fecd@changeid Signed-off-by: Mark Brown commit 1c537b2d729698717f01fcea13721818be5adde7 Author: Anand K Mistry Date: Thu Jul 2 16:23:17 2020 +1000 regulator: mt6397: Move buck modes into header file This will allow device trees to make use of these constants. Signed-off-by: Anand K Mistry Link: https://lore.kernel.org/r/20200702162231.v2.1.Icf69e2041b1af4548347018186c3ba6310f53e66@changeid Signed-off-by: Mark Brown commit 811d7e375d08312dba23f3b6bf7e58ec14aa5dcb Author: Martin KaFai Lau Date: Wed Jul 1 17:48:58 2020 -0700 bpf: selftests: Restore netns after each test It is common for networking tests creating its netns and making its own setting under this new netns (e.g. changing tcp sysctl). If the test forgot to restore to the original netns, it would affect the result of other tests. This patch saves the original netns at the beginning and then restores it after every test. Since the restore "setns()" is not expensive, it does it on all tests without tracking if a test has created a new netns or not. The new restore_netns() could also be done in test__end_subtest() such that each subtest will get an automatic netns reset. However, the individual test would lose flexibility to have total control on netns for its own subtests. In some cases, forcing a test to do unnecessary netns re-configure for each subtest is time consuming. e.g. In my vm, forcing netns re-configure on each subtest in sk_assign.c increased the runtime from 1s to 8s. On top of that, test_progs.c is also doing per-test (instead of per-subtest) cleanup for cgroup. Thus, this patch also does per-test restore_netns(). The only existing per-subtest cleanup is reset_affinity() and no test is depending on this. Thus, it is removed from test__end_subtest() to give a consistent expectation to the individual tests. test_progs.c only ensures any affinity/netns/cgroup change made by an earlier test does not affect the following tests. Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200702004858.2103728-1-kafai@fb.com commit 99126abec5e5778583b959cb164f1888374917d3 Author: Martin KaFai Lau Date: Wed Jul 1 17:48:52 2020 -0700 bpf: selftests: A few improvements to network_helpers.c This patch makes a few changes to the network_helpers.c 1) Enforce SO_RCVTIMEO and SO_SNDTIMEO This patch enforces timeout to the network fds through setsockopt SO_RCVTIMEO and SO_SNDTIMEO. It will remove the need for SOCK_NONBLOCK that requires a more demanding timeout logic with epoll/select, e.g. epoll_create, epoll_ctrl, and then epoll_wait for timeout. That removes the need for connect_wait() from the cgroup_skb_sk_lookup.c. The needed change is made in cgroup_skb_sk_lookup.c. 2) start_server(): Add optional addr_str and port to start_server(). That removes the need of the start_server_with_port(). The caller can pass addr_str==NULL and/or port==0. I have a future tcp-hdr-opt test that will pass a non-NULL addr_str and it is in general useful for other future tests. "int timeout_ms" is also added to control the timeout on the "accept(listen_fd)". 3) connect_to_fd(): Fully use the server_fd. The server sock address has already been obtained from getsockname(server_fd). The sockaddr includes the family, so the "int family" arg is redundant. Since the server address is obtained from server_fd, there is little reason not to get the server's socket type from the server_fd also. getsockopt(server_fd) can be used to do that, so "int type" arg is also removed. "int timeout_ms" is added. 4) connect_fd_to_fd(): "int timeout_ms" is added. Some code is also refactored to connect_fd_to_addr() which is shared with connect_to_fd(). 5) Preserve errno: Some callers need to check errno, e.g. cgroup_skb_sk_lookup.c. Make changes to do it more consistently in save_errno_close() and log_err(). Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200702004852.2103003-1-kafai@fb.com commit c8e22990d2e962f398207d94a2f1c493f4fa6713 Merge: 8a78439ab1b86 7c4084e112702 Author: Mark Brown Date: Thu Jul 2 14:55:34 2020 +0100 Merge series "ASoC: codecs: wm/cs: fix kernel-doc and W=1 warnings" from Pierre-Louis Bossart : I've been doing a lot of cleanups to get to zero warnings with W=1, here's the first batch for Cirrus/Wolfson codecs. Pierre-Louis Bossart (7): ASoC: codecs: cs4270: fix kernel-doc ASoC: codecs: cs42l42: remove always-true comparisons ASoC: codecs: wm8986: fix missing kernel-doc arguments ASoC: codecs: wm8960: fix kernel-doc ASoC: codecs: wm9713: remove spurious kernel-doc comment start ASoC: codecs: wm8994: fix kernel-doc ASoC: codecs: wm8400: add _maybe_unused as needed sound/soc/codecs/cs4270.c | 4 ++-- sound/soc/codecs/cs42l42.c | 9 +++------ sound/soc/codecs/wm8400.c | 6 +++--- sound/soc/codecs/wm8960.c | 2 +- sound/soc/codecs/wm8994.c | 4 ++++ sound/soc/codecs/wm8996.c | 3 +++ sound/soc/codecs/wm9713.c | 2 +- 7 files changed, 17 insertions(+), 13 deletions(-) base-commit: a2b782d59c57cb6f673dbb4804ffc500336d7a54 -- 2.25.1 commit 7c4084e1127026546b102152cebda297b8237870 Author: Pierre-Louis Bossart Date: Wed Jul 1 13:13:19 2020 -0500 ASoC: codecs: wm8994: fix kernel-doc Fix W=1 warning Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200701181320.80848-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 442950a3dc9ced1e3416e497f97636cc4c955ccf Author: Pierre-Louis Bossart Date: Wed Jul 1 13:13:18 2020 -0500 ASoC: codecs: wm9713: remove spurious kernel-doc comment start Fix W=1 warning Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200701181320.80848-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 419eac3cff69c07bf38902be1b245dee3b309342 Author: Pierre-Louis Bossart Date: Wed Jul 1 13:13:17 2020 -0500 ASoC: codecs: wm8960: fix kernel-doc Fix W=1 warning Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200701181320.80848-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 824186fbf73499adad545a3ae30b0a3feef4f05a Author: Pierre-Louis Bossart Date: Wed Jul 1 13:13:16 2020 -0500 ASoC: codecs: wm8986: fix missing kernel-doc arguments Fix W=1 warning Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200701181320.80848-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5502ce4ea214658c4ed80afc024a6fa6a6837023 Author: Pierre-Louis Bossart Date: Wed Jul 1 13:13:15 2020 -0500 ASoC: codecs: cs42l42: remove always-true comparisons Fix W=1 warnings: cs42l42.c: In function 'cs42l42_handle_device_data': cs42l42.c:1661:12: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 1661 | if ((val >= CS42L42_BTN_DET_INIT_DBNCE_MIN) && | ^~ cs42l42.c:1679:12: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 1679 | if ((val >= CS42L42_BTN_DET_EVENT_DBNCE_MIN) && | ^~ cs42l42.c:1698:23: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 1698 | if ((thresholds[i] >= CS42L42_HS_DET_LEVEL_MIN) && | ^~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200701181320.80848-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7fdc1512096217c2888959bf662ebff9f37021aa Author: Pierre-Louis Bossart Date: Wed Jul 1 13:13:14 2020 -0500 ASoC: codecs: cs4270: fix kernel-doc Fix W=1 warnings cs4270.c:508: warning: Function parameter or member 'component' not described in 'cs4270_probe' cs4270.c:508: warning: Excess function parameter 'pdev' description in 'cs4270_probe' cs4270.c:548: warning: Function parameter or member 'component' not described in 'cs4270_remove' cs4270.c:548: warning: Excess function parameter 'pdev' description in 'cs4270_remove' Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200701181320.80848-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f986900209093f5de887d6c342139df6ebec04ac Author: Steven Rostedt (VMware) Date: Wed Jul 1 18:34:10 2020 -0400 ktest.pl: Add MAIL_MAX_SIZE to limit the amount of log emailed Add the ktest config option MAIL_MAX_SIZE that will limit the size of the log file that is placed into the email on failure. Link: https://lore.kernel.org/r/20200701231756.790637968@goodmis.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Steven Rostedt (VMware) commit 34148b13eec9c738327f8c8f84f468f4694b17a3 Author: Steven Rostedt (VMware) Date: Wed Jul 1 18:15:07 2020 -0400 ktest.pl: Add the log of last test in email on failure If a failure happens and an email is sent, show the contents of the log of the last test that failed in the email. Link: http://lore.kernel.org/r/20200701231756.619246244@goodmis.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Steven Rostedt (VMware) commit 78c2141b654375079e3737f06f19cabfc0fcecd7 Merge: bb42b3d39781d e1ad1ac2deb8f Author: Peter Zijlstra Date: Thu Jul 2 15:51:48 2020 +0200 Merge branch 'perf/vlbr' commit e1ad1ac2deb8f90af9f12ff316989dd5675dec11 Author: Like Xu Date: Sat Jun 13 16:09:50 2020 +0800 perf/x86: Keep LBR records unchanged in host context for guest usage When a guest wants to use the LBR registers, its hypervisor creates a guest LBR event and let host perf schedules it. The LBR records msrs are accessible to the guest when its guest LBR event is scheduled on by the perf subsystem. Before scheduling this event out, we should avoid host changes on IA32_DEBUGCTLMSR or LBR_SELECT. Otherwise, some unexpected branch operations may interfere with guest behavior, pollute LBR records, and even cause host branches leakage. In addition, the read operation on host is also avoidable. To ensure that guest LBR records are not lost during the context switch, the guest LBR event would enable the callstack mode which could save/restore guest unread LBR records with the help of intel_pmu_lbr_sched_task() naturally. However, the guest LBR_SELECT may changes for its own use and the host LBR event doesn't save/restore it. To ensure that we doesn't lost the guest LBR_SELECT value when the guest LBR event is running, the vlbr_constraint is bound up with a new constraint flag PERF_X86_EVENT_LBR_SELECT. Signed-off-by: Like Xu Signed-off-by: Wei Wang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200514083054.62538-6-like.xu@linux.intel.com commit 097e4311cda952dfb047f2a49d35aa5de500d474 Author: Like Xu Date: Sat Jun 13 16:09:49 2020 +0800 perf/x86: Add constraint to create guest LBR event without hw counter The hypervisor may request the perf subsystem to schedule a time window to directly access the LBR records msrs for its own use. Normally, it would create a guest LBR event with callstack mode enabled, which is scheduled along with other ordinary LBR events on the host but in an exclusive way. To avoid wasting a counter for the guest LBR event, the perf tracks its hw->idx via INTEL_PMC_IDX_FIXED_VLBR and assigns it with a fake VLBR counter with the help of new vlbr_constraint. As with the BTS event, there is actually no hardware counter assigned for the guest LBR event. Signed-off-by: Like Xu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200514083054.62538-5-like.xu@linux.intel.com commit b2d6504761a50b9493eb4b20f6e188b673f20c32 Author: Like Xu Date: Sat Jun 13 16:09:48 2020 +0800 perf/x86/lbr: Add interface to get LBR information The LBR records msrs are model specific. The perf subsystem has already obtained the base addresses of LBR records based on the cpu model. Therefore, an interface is added to allow callers outside the perf subsystem to obtain these LBR information. It's useful for hypervisors to emulate the LBR feature for guests with less code. Signed-off-by: Like Xu Signed-off-by: Wei Wang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200613080958.132489-4-like.xu@linux.intel.com commit 027440b5d426a51f33b515bbd236cc479d1e051f Author: Like Xu Date: Sat Jun 13 16:09:47 2020 +0800 perf/x86/core: Refactor hw->idx checks and cleanup For intel_pmu_en/disable_event(), reorder the branches checks for hw->idx and make them sorted by probability: gp,fixed,bts,others. Clean up the x86_assign_hw_event() by converting multiple if-else statements to a switch statement. To skip x86_perf_event_update() and x86_perf_event_set_period(), it's generic to replace "idx == INTEL_PMC_IDX_FIXED_BTS" check with '!hwc->event_base' because that should be 0 for all non-gp/fixed cases. Wrap related bit operations into intel_set/clear_masks() and make the main path more cleaner and readable. No functional changes. Signed-off-by: Like Xu Original-by: Peter Zijlstra (Intel) Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200613080958.132489-3-like.xu@linux.intel.com commit 3cb9d5464c1ceea86f6225089b2f7965989cf316 Author: Wei Wang Date: Sat Jun 13 16:09:46 2020 +0800 perf/x86: Fix variable types for LBR registers The MSR variable type can be 'unsigned int', which uses less memory than the longer 'unsigned long'. Fix 'struct x86_pmu' for that. The lbr_nr won't be a negative number, so make it 'unsigned int' as well. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Wei Wang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200613080958.132489-2-like.xu@linux.intel.com commit 65936bf25f90fe440bb2d11624c7d10fab266639 Author: Jason Gunthorpe Date: Thu Jun 25 20:42:19 2020 +0300 RDMA/ipoib: Fix ABBA deadlock with ipoib_reap_ah() ipoib_mcast_carrier_on_task() insanely open codes a rtnl_lock() such that the only time flush_workqueue() can be called is if it also clears IPOIB_FLAG_OPER_UP. Thus the flush inside ipoib_flush_ah() will deadlock if it gets unlucky enough, and lockdep doesn't help us to find it early: CPU0 CPU1 CPU2 __ipoib_ib_dev_flush() down_read(vlan_rwsem) ipoib_vlan_add() rtnl_trylock() down_write(vlan_rwsem) ipoib_mcast_carrier_on_task() while (!rtnl_trylock()) msleep(20); ipoib_flush_ah() flush_workqueue(priv->wq) Clean up the ah_reaper related functions and lifecycle to make sense: - Start/Stop of the reaper should only be done in open/stop NDOs, not in any other places - cancel and flush of the reaper should only happen in the stop NDO. cancel is only functional when combined with IPOIB_STOP_REAPER. - Non-stop places were flushing the AH's just need to flush out dead AH's synchronously and ignore the background task completely. It is fully locked and harmless to leave running. Which ultimately fixes the ABBA deadlock by removing the unnecessary flush_workqueue() from the problematic place under the vlan_rwsem. Fixes: efc82eeeae4e ("IB/ipoib: No longer use flush as a parameter") Link: https://lore.kernel.org/r/20200625174219.290842-1-kamalheib1@gmail.com Reported-by: Kamal Heib Tested-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 948de84233d32be56e0b7ee5c1c4b2d960efee27 Author: Suraj Upadhyay Date: Thu Jul 2 18:53:32 2020 +0530 drm : Insert blank lines after declarations. Resolve checkpatch issues for missing blank lines after declarations. Issues found in multiple files with checkpatch.pl. Signed-off-by: Suraj Upadhyay Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200702131749.GA25710@blackclown commit 4cca2e641641767593583749dec26bfebd8f6f2d Author: Lionel Landwerlin Date: Thu Jun 25 15:34:43 2020 +0300 dma-buf: fix dma-fence-chain out of order test There was probably a misunderstand on how the dma-fence-chain is supposed to work or what dma_fence_chain_find_seqno() is supposed to return. dma_fence_chain_find_seqno() is here to give us the fence to wait upon for a particular point in the timeline. The timeline progresses only when all the points prior to a given number have completed. Signed-off-by: Lionel Landwerlin Fixes: dc2f7e67a28a5c ("dma-buf: Exercise dma-fence-chain under selftests") Link: https://patchwork.freedesktop.org/patch/372960/ Signed-off-by: Christian König commit 91fac86d8636684fc32ec3ba20e8532484df2308 Author: Lionel Landwerlin Date: Thu Jun 25 15:34:42 2020 +0300 Revert "dma-buf: Report signaled links inside dma-fence-chain" This reverts commit 5de376bb434f80a13138f0ebedc8351ab73d8b0d. This change breaks synchronization of a timeline. dma_fence_chain_find_seqno() might be a bit of a confusing name but this function is not trying to find a particular seqno, is supposed to give a fence to wait on for a particular point in the timeline. In a timeline, a particular value is reached when all the points up to and including that value have signaled. Signed-off-by: Lionel Landwerlin Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/372958/ Signed-off-by: Christian König commit 52f944ee5d39b6b93797480f9181d3d40ed0d07b Author: Richard Gong Date: Wed Jun 3 09:06:52 2020 -0500 firmware: stratix10-rsu: fix warnings Patch fixes sparse warnings: using plain integer as NULL pointer. Replaces equal to with logical not operator. Reported-by: kbuild test robot Signed-off-by: Richard Gong Link: https://lore.kernel.org/r/1591193212-15082-1-git-send-email-richard.gong@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f38018968fd01edbc18adfcf6512ccc397af49ef Author: Richard Gong Date: Mon Jun 15 09:29:08 2020 -0500 firmware: rsu: add device attributes to sysfs interface Add the following device attributes to Intel Stratix10 Remote System Update (RSU) sysfs interface: dcmf0 dcmf1 dcmf2 dcmf3 max_retry Signed-off-by: Richard Gong Link: https://lore.kernel.org/r/1592231348-31334-5-git-send-email-richard.gong@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 75bc73fc0188ef3120365704a3d8ffd865666ae1 Author: Richard Gong Date: Mon Jun 15 09:29:07 2020 -0500 firmware: stratix10-rsu: extend rsu driver for new features Extend Intel Remote System Update (RSU) driver to get decision configuration management firmware (DCMF) versions and max retry parameter value. Signed-off-by: Richard Gong Link: https://lore.kernel.org/r/1592231348-31334-4-git-send-email-richard.gong@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit bf0e5bf68a207b14727caf13da576339590a9504 Author: Richard Gong Date: Mon Jun 15 09:29:06 2020 -0500 firmware: stratix10-svc: extend svc to support new RSU features Extend Intel Stratix10 service layer driver to support new RSU DCMF versions and max retry parameter. DCMF = Decision Configuration Management Firmware. The max retry parameter is the maximum times the images is allowed to reload itself before giving up and starting RSU failover flow. Signed-off-by: Richard Gong Link: https://lore.kernel.org/r/1592231348-31334-3-git-send-email-richard.gong@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 36847f9e3e56c192ef95e7669df38189443530a0 Author: Richard Gong Date: Mon Jun 15 09:29:05 2020 -0500 firmware: stratix10-svc: correct reconfig flag and timeout values Correct the incorrect flag value for COMMAND_RECONFIG_FLAG_PARTIAL and increase FPGA reconfig timeout values so that Intel service layer and FPGA manager drivers can work with all versions of firmware. Signed-off-by: Richard Gong Link: https://lore.kernel.org/r/1592231348-31334-2-git-send-email-richard.gong@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 55dd37e52d122277192e7d0aa5530c59c646426b Author: Christian König Date: Wed Jul 1 13:24:12 2020 +0200 MAINTAINERS: Add myself as DMA-buf maintainer As discussed on the list. Signed-off-by: Christian König Acked-by: Sumit Semwal Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/373539/ commit 2377427cdd2b7514eb4c40241cf5c4dec63c1bec Author: Chris Wilson Date: Thu Jul 2 09:32:03 2020 +0100 drm/i915: Drop vm.ref for duplicate vma on construction As we allow for parallel threads to create the same vma instance concurrently, and we only filter out the duplicates upon reacquiring the spinlock for the rbtree, we have to free the loser of the constructors' race. When freeing, we should also drop any resource references acquired for the redundant vma. Fixes: 2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.5+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200702083225.20044-1-chris@chris-wilson.co.uk commit cad064f1bd5237481d15b72b481809e3f0907dd9 Author: Bartosz Golaszewski Date: Mon Jun 29 08:50:06 2020 +0200 devres: handle zero size in devm_kmalloc() Make devm_kmalloc() behave similarly to non-managed kmalloc(): return ZERO_SIZE_PTR when requested size is 0. Update devm_kfree() to handle this case. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200629065008.27620-5-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 67dd0772396905a108c37202d4a5949ab69131a0 Author: Bartosz Golaszewski Date: Mon Jun 29 08:50:05 2020 +0200 device: remove 'extern' attribute from function prototypes in device.h Functions are declared 'extern' implicitly by the compiler. There's no reason to prepend every prototype with it. Remove the 'extern' keyword from all function declarations in linux/device.h. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200629065008.27620-4-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit dc2a633ccb608a1a8109ad0d488c98cc776bef72 Author: Bartosz Golaszewski Date: Mon Jun 29 08:50:04 2020 +0200 devres: move the size check from alloc_dr() into a separate function We will perform the same size check in devm_krealloc(). Move the relevant code into a separate helper. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200629065008.27620-3-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit 63160c0a7f1df4420607c27793db0bc5f67ef95f Author: Bartosz Golaszewski Date: Mon Jun 29 08:50:03 2020 +0200 devres: remove stray space from devm_kmalloc() definition Use the preferred coding style for functions returning pointers. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200629065008.27620-2-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman commit ef7e12078ab832c72315adcfa05e7a9498a5e109 Author: Wei Yongjun Date: Thu Jul 2 16:07:50 2020 +0800 thunderbolt: Fix old style declaration warning Fix gcc build warning: drivers/thunderbolt/quirks.c:21:1: warning: 'static' is not at beginning of declaration [-Wold-style-declaration] 21 | const static struct tb_quirk tb_quirks[] = { | ^~~~~ Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Mika Westerberg commit 1f16fcad688552d442ddf1c5d3d8d4152d9bf4af Author: Ian Rogers Date: Thu Jun 18 21:33:56 2020 -0700 perf parse-events: Disable a subset of bison warnings Rather than disable all warnings with -w, disable specific warnings. Predicate enabling the warnings on a recent version of bison. Tested with GCC 9.3.0 and clang 9.0.1. Committer testing: The full set of compilers, gcc and clang that this will be tested on will be on the signed tag when this change goes upstream. Had to add -Wno-switch-enum to build on opensuse tumbleweed: /tmp/build/perf/util/parse-events-bison.c: In function 'yydestruct': /tmp/build/perf/util/parse-events-bison.c:1200:3: error: enumeration value 'YYSYMBOL_YYEMPTY' not handled in switch [-Werror=switch-enum] 1200 | switch (yykind) | ^~~~~~ /tmp/build/perf/util/parse-events-bison.c:1200:3: error: enumeration value 'YYSYMBOL_YYEOF' not handled in switch [-Werror=switch-enum] Also replace -Wno-error=implicit-function-declaration with -Wno-implicit-function-declaration. Also needed to check just the first two levels of the bison version, as the patch was assuming that all versions were of the form x.y.z, and there are several cases where it is just x.y, breaking the build. Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200619043356.90024-11-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 304d7a90c43f7471fb481e6b1e2b47fef2a02b8c Author: Ian Rogers Date: Thu Jun 18 21:33:53 2020 -0700 perf parse-events: Disable a subset of flex warnings Rather than disable all warnings with -w, disable specific warnings. Predicate enabling the warnings on more recent flex versions. Tested with GCC 9.3.0 and clang 9.0.1. Committer notes: The full set of compilers, gcc and clang that this will be tested on will be on the signed tag when this change goes upstream. Added -Wno-misleading-indentation to the flex_flags to overcome this on opensuse tumbleweed when building with clang: CC /tmp/build/perf/util/parse-events-flex.o CC /tmp/build/perf/util/pmu.o /tmp/build/perf/util/parse-events-flex.c:5038:13: error: misleading indentation; statement is not part of the previous 'if' [-Werror,-Wmisleading-indentation] if ( ! yyg->yy_state_buf ) ^ /tmp/build/perf/util/parse-events-flex.c:5036:9: note: previous statement is here if ( ! yyg->yy_state_buf ) ^ And we need to use this to redirect stderr to stdin and then grep in a way that is acceptable for BusyBox shell: 2>&1 | Previously I was using: |& Which seems to be bash specific. Added -Wno-sign-compare to overcome this on systems such as centos:7: CC /tmp/build/perf/util/parse-events-flex.o CC /tmp/build/perf/util/pmu.o CC /tmp/build/perf/util/pmu-flex.o util/parse-events.l: In function 'parse_events_lex': /tmp/build/perf/util/parse-events-flex.c:193:36: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] for ( yyl = n; yyl < yyleng; ++yyl )\ ^ /tmp/build/perf/util/parse-events-flex.c:204:9: note: in expansion of macro 'YY_LESS_LINENO' Added -Wno-unused-parameter to overcome this in systems such as centos:7: CC /tmp/build/perf/util/parse-events-flex.o CC /tmp/build/perf/util/pmu.o /tmp/build/perf/util/parse-events-flex.c: In function 'yy_fatal_error': /tmp/build/perf/util/parse-events-flex.c:6265:58: error: unused parameter 'yyscanner' [-Werror=unused-parameter] static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) ^ Added -Wno-missing-declarations to build in systems such as centos:6: /tmp/build/perf/util/parse-events-flex.c:6313: error: no previous prototype for 'parse_events_get_column' /tmp/build/perf/util/parse-events-flex.c:6389: error: no previous prototype for 'parse_events_set_column' And -Wno-missing-prototypes to cover older compilers: -Wmissing-prototypes (C only) Warn if a global function is defined without a previous prototype declaration. This warning is issued even if the definition itself provides a prototype. The aim is to detect global functions that fail to be declared in header files. -Wmissing-declarations (C only) Warn if a global function is defined without a previous declaration. Do so even if the definition itself provides a prototype. Use this option to detect global functions that are not declared in header files. Older C compilers lack -Wno-misleading-indentation, check if it is available before using it. Also needed to check just the first two levels of the flex version, as the patch was assuming that all versions were of the form x.y.z, and there are several cases where it is just x.y, breaking the build. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200619043356.90024-8-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8f125dafb390162723884510af074a3ef0dc667a Author: Chris Wilson Date: Thu Jul 2 10:52:19 2020 +0100 drm/i915/gt: Move the heartbeat into the high priority system wq As we ensure that the heartbeat is reasonably fast (and should not block), move the heartbeat work into the system_highpri_wq to avoid having this essential task be blocked behind other slow work, such as our own retire_work_handler. References: https://gitlab.freedesktop.org/drm/intel/-/issues/2119 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200702095219.963-2-chris@chris-wilson.co.uk commit aab4707fdd754d4c4f0df718f3c7546b6eb40d20 Author: Chris Wilson Date: Thu Jul 2 10:52:18 2020 +0100 drm/i915/gt: Harden the heartbeat against a stuck driver If the driver gets stuck holding the kernel timeline, we cannot issue a heartbeat and so fail to discover that the driver is indeed stuck and do not issue a GPU reset (which would hopefully unstick the driver!). Switch to using a trylock so that we can query if the heartbeat's timeline mutex is locked elsewhere, and then use the timer to probe if it remains stuck at the same spot for consecutive heartbeats, indicating that the mutex has not been released and the engine has not progressed. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200702095219.963-1-chris@chris-wilson.co.uk commit d4e0340919fb9190a57e879fb3125c4acce0d9b2 Author: Saravana Kannan Date: Mon Jun 22 18:18:02 2020 -0700 arm64/module: Optimize module load time by optimizing PLT counting When loading a module, module_frob_arch_sections() tries to figure out the number of PLTs that'll be needed to handle all the RELAs. While doing this, it tries to dedupe PLT allocations for multiple R_AARCH64_CALL26 relocations to the same symbol. It does the same for R_AARCH64_JUMP26 relocations. To make checks for duplicates easier/faster, it sorts the relocation list by type, symbol and addend. That way, to check for a duplicate relocation, it just needs to compare with the previous entry. However, sorting the entire relocation array is unnecessary and expensive (O(n log n)) because there are a lot of other relocation types that don't need deduping or can't be deduped. So this commit partitions the array into entries that need deduping and those that don't. And then sorts just the part that needs deduping. And when CONFIG_RANDOMIZE_BASE is disabled, the sorting is skipped entirely because PLTs are not allocated for R_AARCH64_CALL26 and R_AARCH64_JUMP26 if it's disabled. This gives significant reduction in module load time for modules with large number of relocations with no measurable impact on modules with a small number of relocations. In my test setup with CONFIG_RANDOMIZE_BASE enabled, these were the results for a few downstream modules: Module Size (MB) wlan 14 video codec 3.8 drm 1.8 IPA 2.5 audio 1.2 gpu 1.8 Without this patch: Module Number of entries sorted Module load time (ms) wlan 243739 283 video codec 74029 138 drm 53837 67 IPA 42800 90 audio 21326 27 gpu 20967 32 Total time to load all these module: 637 ms With this patch: Module Number of entries sorted Module load time (ms) wlan 22454 61 video codec 10150 47 drm 13014 40 IPA 8097 63 audio 4606 16 gpu 6527 20 Total time to load all these modules: 247 Time saved during boot for just these 6 modules: 390 ms Signed-off-by: Saravana Kannan Acked-by: Will Deacon Cc: Ard Biesheuvel Link: https://lore.kernel.org/r/20200623011803.91232-1-saravanak@google.com Signed-off-by: Catalin Marinas commit 3a7e4fbbfd1a266ceea33e9b48f77f233ac994ac Author: Viresh Kumar Date: Mon Jun 29 15:34:40 2020 +0530 cpufreq: Remove the weakly defined cpufreq_default_governor() The default cpufreq governor is chosen with the help of a "choice" option in the Kconfig which will always end up selecting one of the governors and so the weakly defined definition of cpufreq_default_governor() will never get called. Moreover, this makes us skip the checking of the return value of that routine as it will always be non NULL. If the Kconfig option changes in future, then we will start getting a link error instead (and it won't go unnoticed as in the case of the weak definition). Suggested-by: Quentin Perret Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit 8412b4563e5910485c7bcd4fdcd8bcc3e728284c Author: Quentin Perret Date: Mon Jun 29 13:55:00 2020 +0530 cpufreq: Specify default governor on command line Currently, the only way to specify the default CPUfreq governor is via Kconfig options, which suits users who can build the kernel themselves perfectly. However, for those who use a distro-like kernel (such as Android, with the Generic Kernel Image project), the only way to use a non-default governor is to boot to userspace, and to then switch using the sysfs interface. Being able to specify the default governor on the command line, like is the case for cpuidle, would allow those users to specify their governor of choice earlier on, and to simplify the userspace boot procedure slighlty. To support this use-case, add a kernel command line parameter allowing the default governor for CPUfreq to be specified, which takes precedence over the built-in default. This implementation has one notable limitation: the default governor must be registered before the driver. This is solved for builtin governors and drivers using appropriate *_initcall() functions. And in the modular case, this must be reflected as a constraint on the module loading order. Signed-off-by: Quentin Perret [ Viresh: Converted 'default_governor' to a string and parsing it only at initcall level, and several updates to cpufreq_init_policy(). ] Signed-off-by: Viresh Kumar [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki commit 10dd8573b09e84b81539d939d55ebdb6a36c5f3a Author: Quentin Perret Date: Mon Jun 29 13:54:59 2020 +0530 cpufreq: Register governors at core_initcall Currently, most CPUFreq governors are registered at the core_initcall time when the given governor is the default one, and the module_init time otherwise. In preparation for letting users specify the default governor on the kernel command line, change all of them to be registered at the core_initcall unconditionally, as it is already the case for the schedutil and performance governors. This will allow us to assume that builtin governors have been registered before the built-in CPUFreq drivers probe. And since all governors have similar init/exit patterns now, introduce two new macros, cpufreq_governor_{init,exit}(), to factorize the code. Acked-by: Viresh Kumar Signed-off-by: Quentin Perret Signed-off-by: Viresh Kumar [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki commit 8cc46ae565c393f77417cb9530b1265eb50f5d2e Author: Viresh Kumar Date: Mon Jun 29 13:54:58 2020 +0530 cpufreq: Fix locking issues with governors The locking around governors handling isn't adequate currently. The list of governors should never be traversed without the locking in place. Also governor modules must not be removed while the code in them is still in use. Reported-by: Quentin Perret Signed-off-by: Viresh Kumar Cc: All applicable [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki commit f473bf398bf1ed42b1bdbc5206a804d8d3140a2d Author: Srinivas Pandruvada Date: Fri Jun 26 11:34:01 2020 -0700 cpufreq: intel_pstate: Allow raw energy performance preference value Currently using attribute "energy_performance_preference", user space can write one of the four per-defined preference string. These preference strings gets mapped to a hard-coded Energy-Performance Preference (EPP) or Energy-Performance Bias (EPB) knob. These four values are supposed to cover broad spectrum of use cases, but are not uniformly distributed in the range. There are number of cases, where this is not enough. For example: Suppose user wants more performance when connected to AC. Instead of using default "balance performance", the "performance" setting can be used. This changes EPP value from 0x80 to 0x00. But setting EPP to 0, results in electrical and thermal issues on some platforms. This results in aggressive throttling, which causes a drop in performance. But some value between 0x80 and 0x00 results in better performance. But that value can't be fixed as the power curve is not linear. In some cases just changing EPP from 0x80 to 0x75 is enough to get significant performance gain. Similarly on battery the default "balance_performance" mode can be aggressive in power consumption. But picking up the next choice "balance power" results in too much loss of performance, which results in bad user experience in use cases like "Google Hangout". It was observed that some value between these two EPP is optimal. This change allows fine grain EPP tuning for platform like Chromebook or for users who wants to fine tune power and performance. Here based on the product and use cases, different EPP values can be set. This change is similar to the change done for: /sys/devices/system/cpu/cpu*/power/energy_perf_bias where user has choice to write a predefined string or raw value. The change itself is trivial. When user preference doesn't match predefined string preferences and value is an unsigned integer and in range, use that value for EPP. When the EPP feature is not present writing raw value is not supported. Suggested-by: Len Brown Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit ed7bde7a6dab521ee9e28fe2264018f83d83c7fa Author: Srinivas Pandruvada Date: Fri Jun 26 11:34:00 2020 -0700 cpufreq: intel_pstate: Allow enable/disable energy efficiency By default intel_pstate the driver disables energy efficiency by setting MSR_IA32_POWER_CTL bit 19 for Kaby Lake desktop CPU model in HWP mode. This CPU model is also shared by Coffee Lake desktop CPUs. This allows these systems to reach maximum possible frequency. But this adds power penalty, which some customers don't want. They want some way to enable/ disable dynamically. So, add an additional attribute "energy_efficiency" under /sys/devices/system/cpu/intel_pstate/ for these CPU models. This allows to read and write bit 19 ("Disable Energy Efficiency Optimization") in the MSR IA32_POWER_CTL. This attribute is present in both HWP and non-HWP mode as this has an effect in both modes. Refer to Intel Software Developer's manual for details. The scope of this bit is package wide. Also these systems are single package systems. So read/write MSR on the current CPU is enough. The energy efficiency (EE) bit setting needs to be preserved during suspend/resume and CPU offline/online operation. To do this: - Restoring the EE setting from the cpufreq resume() callback, if there is change from the system default. - By default, don't disable EE from cpufreq init() callback for matching CPU models. Since the scope is package wide and is a single package system, move the disable EE calls from init() callback to intel_pstate_init() function, which is called only once. Suggested-by: Len Brown Signed-off-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki commit 532e762d51d06291e3c40d5f7be8e42dce3b3d05 Author: Andy Shevchenko Date: Wed Jul 1 18:20:46 2020 +0300 gpio: pch: Move IRQ status message to verbose debug level If one of the devices which share the same IRQ line doesn't care about interrupt GPIO will spam the log with status equal to 0x00. Move IRQ status message to verbose debug level (it still might be useful). Signed-off-by: Andy Shevchenko commit d23c9e06580fb414b7a223a50ac05474cc1414d9 Author: Thomas Bogendoerfer Date: Thu Jul 2 12:05:33 2020 +0200 dt-bindings: MIPS: Fix tabs in Ingenic SoCs binding. While applying commit 9909bc43a2e2 ("dt-bindings: MIPS: Document Ingenic SoCs binding.") I've messed up by "fixing" indentation in a C style, which is wrong for yaml files. Replace tabs back to spaces. Fixes: 9909bc43a2e2 ("dt-bindings: MIPS: Document Ingenic SoCs binding.") Signed-off-by: Thomas Bogendoerfer commit cabe0785ff14e944ab1d828bed64e796e8f96594 Author: Johan Hovold Date: Wed Jul 1 19:37:22 2020 +0200 USB: serial: console: add support for flow control Add support for enabling hardware flow control using the 'r' command line option. This also avoids a W=1 (-Wunused-but-set-variable) warning. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit b83076a94dfa1d804a15d8639f5dff67b50fc265 Author: Johan Hovold Date: Wed Jul 1 18:53:42 2020 +0200 USB: serial: quatech2: drop two stub functions Drop two unused stub functions which only served as documentation. This also avoids a W=1 (-Wunused-but-set-variable) warning. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit c34a917aeff44fb5b2afeef7f5e946e4de405d5a Author: Johan Hovold Date: Wed Jul 1 18:53:41 2020 +0200 USB: serial: kobil_sct: log failure to update line settings Log failure to update the line settings in set_termios(). This also avoids a W=1 (-Wunused-but-set-variable) warning. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 1bf2cda6597f08cef06db7b1804e5ff1d5bc5ee8 Author: Johan Hovold Date: Wed Jul 1 18:53:40 2020 +0200 USB: serial: keyspan_pda: drop unused firmware reset status Drop the unused firmware reset status which would already have been logged. This suppresses the corresponding W=1 (-Wunused-but-set-variable) warning. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 21c2ddc1a91f87aca6465756ee6061158d591b47 Author: Johan Hovold Date: Wed Jul 1 18:53:39 2020 +0200 USB: serial: iuu_phoenix: drop unused URB submission results The driver is submitting URBs in various completion callbacks without bothering to log errors yet still assigned the return value to temporary variables. Let's drop those temporaries. This suppresses the corresponding W=1 (-Wunused-but-set-variable) warnings. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 00b22b61b78fbf159c6b9119e7e79f22b1583d19 Author: Johan Hovold Date: Wed Jul 1 18:53:38 2020 +0200 USB: serial: garmin_gps: don't compile unused packet definitions Don't compile the four unused packet definitions but keep them around for documentation purposes. This avoids the corresponding W=1 (-Wunused-const-variable) warning. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit c3bad0c7e541776d16369d148f164879a72d022b Author: Imre Deak Date: Wed Jul 1 21:00:01 2020 +0300 drm/i915: Fix the old vs. new epoch counter check during hotplug detect The old epoch counter was left uninited, so the function returned a changed state always. While at it debug print the old epoch counter as well. Fixes: 35205ee9ba46 ("drm/i915: Send hotplug event if edid had changed") Cc: Kunal Joshi Cc: Stanislav Lisovskiy Cc: Maarten Lankhorst Signed-off-by: Imre Deak Reviewed-by: Stanislav Lisovskiy Link: https://patchwork.freedesktop.org/patch/msgid/20200701180001.15857-1-imre.deak@intel.com commit cdf01268bc235199791e5ee2489c5c3c31fd7391 Author: Tian Tao Date: Thu Jul 2 15:49:43 2020 +0800 drm/hisilicon: Use drmm_kzalloc() instead of devm_kzalloc() using the new API drmm_kzalloc() instead of devm_kzalloc() v3: still fixed include statements sorted alphabetically. v2: keep the DRM include statements sorted alphabetically. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1593676183-28525-1-git-send-email-tiantao6@hisilicon.com commit 959cc33988436be6cadf86850dab0d8d125f7c43 Author: Greg Kroah-Hartman Date: Thu Jul 2 09:17:40 2020 +0200 staging: wilc1000: remove obsolete TODO file The movement of wilc1000 out of staging left an obsolete TODO file. Remove that as it's no longer needed. Cc: Kalle Valo Cc: Cc: Cc: Cc: Cc: Signed-off-by: Greg Kroah-Hartman commit c90e798c66d9c78079b45d6e05f0bbb704815106 Merge: efa30b82ac755 5625f965d7644 Author: Greg Kroah-Hartman Date: Thu Jul 2 09:12:44 2020 +0200 Merge branch 'wilc1000-move-out-of-staging' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next into staging-next This is the movement of the wilc1000 driver out of staging, pulled in here so that we do not end up doing duplicate work. Signed-off-by: Greg Kroah-Hartman * 'wilc1000-move-out-of-staging' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next: wilc1000: move wilc driver out of staging commit f555abfe2923076315e55c275677cb42e91497c5 Merge: a15a20acc9803 5625f965d7644 Author: Kalle Valo Date: Thu Jul 2 09:49:56 2020 +0300 Merge branch 'wilc1000-move-out-of-staging' This is an immutable branch shared between wireless-drivers-next and staging-next for moving wilc1000 driver out of staging to drivers/net/wireless directory. commit 9555152beb1143c85c03f9b9de59863cbbe89f4b Merge: f75020fcb97a5 7808363154d62 Author: Dave Airlie Date: Thu Jul 2 15:17:31 2020 +1000 Merge tag 'amd-drm-next-5.9-2020-07-01' of git://people.freedesktop.org/~agd5f/linux into drm-next amd-drm-next-5.9-2020-07-01: amdgpu: - DC DMUB updates - HDCP fixes - Thermal interrupt fixes - Add initial support for Sienna Cichlid GPU - Add support for unique id on Arcturus - Major swSMU code cleanup - Skip BAR resizing if the bios already did id - Fixes for DCN bandwidth calculations - Runtime PM reference count fixes - Add initial UVD support for SI - Add support for ASSR on eDP links - Lots of misc fixes and cleanups - Enable runtime PM on vega10 boards that support BACO - RAS fixes - SR-IOV fixes - Use IP discovery table on renoir - DC stream synchronization fixes amdkfd: - Track SDMA usage per process - Fix GCC10 compiler warnings - Locking fix radeon: - Default to on chip GART for AGP boards on all arches - Runtime PM reference count fixes UAPI: - Update comments to clarify MTYPE From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20200701155041.1102829-1-alexander.deucher@amd.com Signed-off-by: Dave Airlie commit 6130068d9bb3e14a30176ab8001496a4447e0745 Author: Gokul Sriram Palanisamy Date: Wed May 13 15:01:03 2020 +0530 dt-bindings: firmware: qcom: Add compatible for IPQ8074 SoC Add compatible for IPQ8074 support. This does not need clocks for scm calls. Signed-off-by: Gokul Sriram Palanisamy Signed-off-by: Sricharan R Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1589362265-22702-9-git-send-email-gokulsri@codeaurora.org Signed-off-by: Bjorn Andersson commit 948f6161c6ab7f66cda77cfcd7b43b4270c9f497 Author: Bjorn Andersson Date: Mon Jun 22 12:19:42 2020 -0700 arm64: dts: qcom: sdm845: Add IMEM and PIL info region Add a simple-mfd representing IMEM on SDM845 and define the PIL relocation info region, so that post mortem tools will be able to locate the loaded remoteprocs. Reviewed-by: Stephen Boyd Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622191942.255460-6-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 809cc579083f63742739bc4ff7415e8720ceac99 Author: Bjorn Andersson Date: Mon Jun 22 12:19:41 2020 -0700 arm64: dts: qcom: qcs404: Add IMEM and PIL info region Add a simple-mfd representing IMEM on QCS404 and define the PIL relocation info region, so that post mortem tools will be able to locate the loaded remoteprocs. Reviewed-by: Stephen Boyd Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622191942.255460-5-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit d4c78d2167913b3f7af0d2189fd3d76f6614a1bf Author: Bjorn Andersson Date: Mon Jun 22 12:19:40 2020 -0700 remoteproc: qcom: Update PIL relocation info on load Update the PIL relocation information in IMEM with information about where the firmware for various remoteprocs are loaded. Reviewed-by: Vinod Koul Reviewed-by: Stephen Boyd Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622191942.255460-4-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 549b67da660d634e3a4a50a325bd1f5609ddb84b Author: Bjorn Andersson Date: Mon Jun 22 12:19:39 2020 -0700 remoteproc: qcom: Introduce helper to store pil info in IMEM A region in IMEM is used to communicate load addresses of remoteproc to post mortem debug tools. Implement a helper function that can be used to store this information in order to enable these tools to process collected ramdumps. Reviewed-by: Mathieu Poirier Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622191942.255460-3-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 87ad854dd76ca3534ef2e368265c3566a59e21e0 Author: Bjorn Andersson Date: Mon Jun 22 12:19:38 2020 -0700 dt-bindings: remoteproc: Add Qualcomm PIL info binding Add a devicetree binding for the Qualcomm peripheral image loader relocation information region found in the IMEM. Reviewed-by: Mathieu Poirier Reviewed-by: Rob Herring Reviewed-by: Stephen Boyd Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622191942.255460-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 4e2f62e566b5bddec00682f36a404e05a3b64b6a Author: Jens Axboe Date: Wed Jul 1 22:58:32 2020 -0600 Revert "blk-mq: put driver tag when this request is completed" This reverts commits the following commits: 37f4a24c2469a10a4c16c641671bd766e276cf9f 723bf178f158abd1ce6069cb049581b3cb003aab 36a3df5a4574d5ddf59804fcd0c4e9654c514d9a The last one is the culprit, but we have to go a bit deeper to get this to revert cleanly. There's been a report that this breaks some MMC setups [1], and also causes an issue with swap [2]. Until this can be figured out, revert the offending commits. [1] https://lore.kernel.org/linux-block/57fb09b1-54ba-f3aa-f82c-d709b0e6b281@samsung.com/ [2] https://lore.kernel.org/linux-block/20200702043721.GA1087@lca.pw/ Reported-by: Marek Szyprowski Reported-by: Qian Cai Signed-off-by: Jens Axboe commit 9f2475fe7406b8ef5f97099c4980021344872d9f Author: Shyam Sundar Date: Tue Jun 30 03:22:29 2020 -0700 scsi: qla2xxx: SAN congestion management implementation * Firmware Initialization with SCM enabled based on NVRAM setting and firmware support (About Firmware). * Enable PUREX and add support for fabric performance impact notification (FPIN) handling. * Allocate a default PUREX item for each vha to handle memory allocation failures in ISR. Link: https://lore.kernel.org/r/20200630102229.29660-3-njavali@marvell.com Reviewed-by: Himanshu Madhani Reviewed-by: James Smart Signed-off-by: Shyam Sundar Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 62e9dd177732843ae6c5b9d2ed61e7c9538fa276 Author: Shyam Sundar Date: Tue Jun 30 03:22:28 2020 -0700 scsi: qla2xxx: Change in PUREX to handle FPIN ELS requests SAN Congestion Management generates ELS pkts whose size can vary and be > 64 bytes. Change the PUREX handling code to support non-standard ELS pkt size. Link: https://lore.kernel.org/r/20200630102229.29660-2-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Shyam Sundar Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 29ce24519c0692ca7d998d7444a9e016a4c44fa7 Author: Steven Rostedt (VMware) Date: Wed Jul 1 13:10:19 2020 -0400 ring-buffer: Do not trigger a WARN if clock going backwards is detected After tweaking the ring buffer to be a bit faster, a warning is triggering on one of my machines, and causing my tests to fail. This warning is caused when the delta (current time stamp minus previous time stamp), is larger than the max time held by the ring buffer (59 bits). If the clock were to go backwards slightly, this would then easily trigger this warning. The machine that it triggered on, the clock did go backwards by around 450 nanoseconds, and this happened after a recalibration of the TSC clock. Now that the ring buffer is faster, it detects this, and the delta that is used larger than the max, the warning is triggered and my test fails. To handle the clock going backwards, look at the saved before and after time stamps. If they are the same, it means that the current event did not interrupt another event, and that those timestamp are of a previous event that was recorded. If the max delta is triggered, look at those time stamps, make sure they are the same, then use them to compare with the current timestamp. If the current timestamp is less than the before/after time stamps, then that means the clock being used went backward. Print out a message that this has happened, but do not warn about it (and only print the message once). Still do the warning if the delta is indeed larger than what can be used. Also remove the unneeded KERN_WARNING from the WARN_ONCE() print. Signed-off-by: Steven Rostedt (VMware) commit bbeba3e58f040a4297a5ba88ebf6e2b16adc3657 Author: Steven Rostedt (VMware) Date: Tue Jun 30 13:05:29 2020 -0400 ring-buffer: Call trace_clock_local() directly for RETPOLINE kernels After doing some benchmarks and examining the code, I found that the ring buffer clock calls were quite expensive, and noticed that it uses retpolines. This is because the ring buffer clock is programmable, and can be set. But in most cases it simply uses the fastest ns unit clock which is the trace_clock_local(). For RETPOLINE builds, checking if the ring buffer clock is set to trace_clock_local() and then calling it directly has brought the time of an event on my i7 box from an average of 93 nanoseconds an event down to 83 nanoseconds an event, and the minimum time from 81 nanoseconds to 68 nanoseconds! Suggested-by: Mathieu Desnoyers Signed-off-by: Steven Rostedt (VMware) commit 74e879373b377f15d4ecb45bf8316b77e8badc49 Author: Steven Rostedt (VMware) Date: Tue Jun 30 12:47:56 2020 -0400 ring-buffer: Move the add_timestamp into its own function Make a helper function rb_add_timestamp() that moves the adding of the extended time stamps into its own function. Also, remove the noinline and inline for the functions it calls, as recent benchmarks appear they do not make a difference (just let gcc decide). Signed-off-by: Steven Rostedt (VMware) commit 58fbc3c63275c6255a10ae151cc3882d9190c4e0 Author: Steven Rostedt (VMware) Date: Tue Jun 30 08:59:26 2020 -0400 ring-buffer: Consolidate add_timestamp to remove some branches Reorganize a little the logic to handle adding the absolute time stamp, extended and forced time stamps, in such a way to remove a branch or two. This is just a micro optimization. Also add before and after time stamps to the rb_event_info structure to display those values in the rb_check_timestamps() code, if something were to go wrong. Suggested-by: Mathieu Desnoyers Signed-off-by: Steven Rostedt (VMware) commit 23212a70077311396cda2823d627317c25e6e5d1 Merge: b97e9d9d67c88 a6b118febbab3 Author: David S. Miller Date: Wed Jul 1 17:47:55 2020 -0700 Merge branch 'mptcp-add-receive-buffer-auto-tuning' Florian Westphal says: ==================== mptcp: add receive buffer auto-tuning First patch extends the test script to allow for reproducible results. Second patch adds receive auto-tuning. Its based on what TCP is doing, only difference is that we use the largest RTT of any of the subflows and that we will update all subflows with the new value. Else, we get spurious packet drops because the mptcp work queue might not be able to move packets from subflow socket to master socket fast enough. Without the adjustment, TCP may drop the packets because the subflow socket is over its rcvbuffer limit. ==================== Signed-off-by: David S. Miller commit a6b118febbab3f6454057612b355d0b667c1fafa Author: Florian Westphal Date: Tue Jun 30 21:24:45 2020 +0200 mptcp: add receive buffer auto-tuning When mptcp is used, userspace doesn't read from the tcp (subflow) socket but from the parent (mptcp) socket receive queue. skbs are moved from the subflow socket to the mptcp rx queue either from 'data_ready' callback (if mptcp socket can be locked), a work queue, or the socket receive function. This means tcp_rcv_space_adjust() is never called and thus no receive buffer size auto-tuning is done. An earlier (not merged) patch added tcp_rcv_space_adjust() calls to the function that moves skbs from subflow to mptcp socket. While this enabled autotuning, it also meant tuning was done even if userspace was reading the mptcp socket very slowly. This adds mptcp_rcv_space_adjust() and calls it after userspace has read data from the mptcp socket rx queue. Its very similar to tcp_rcv_space_adjust, with two differences: 1. The rtt estimate is the largest one observed on a subflow 2. The rcvbuf size and window clamp of all subflows is adjusted to the mptcp-level rcvbuf. Otherwise, we get spurious drops at tcp (subflow) socket level if the skbs are not moved to the mptcp socket fast enough. Before: time mptcp_connect.sh -t -f $((4*1024*1024)) -d 300 -l 0.01% -r 0 -e "" -m mmap [..] ns4 MPTCP -> ns3 (10.0.3.2:10108 ) MPTCP (duration 40823ms) [ OK ] ns4 MPTCP -> ns3 (10.0.3.2:10109 ) TCP (duration 23119ms) [ OK ] ns4 TCP -> ns3 (10.0.3.2:10110 ) MPTCP (duration 5421ms) [ OK ] ns4 MPTCP -> ns3 (dead:beef:3::2:10111) MPTCP (duration 41446ms) [ OK ] ns4 MPTCP -> ns3 (dead:beef:3::2:10112) TCP (duration 23427ms) [ OK ] ns4 TCP -> ns3 (dead:beef:3::2:10113) MPTCP (duration 5426ms) [ OK ] Time: 1396 seconds After: ns4 MPTCP -> ns3 (10.0.3.2:10108 ) MPTCP (duration 5417ms) [ OK ] ns4 MPTCP -> ns3 (10.0.3.2:10109 ) TCP (duration 5427ms) [ OK ] ns4 TCP -> ns3 (10.0.3.2:10110 ) MPTCP (duration 5422ms) [ OK ] ns4 MPTCP -> ns3 (dead:beef:3::2:10111) MPTCP (duration 5415ms) [ OK ] ns4 MPTCP -> ns3 (dead:beef:3::2:10112) TCP (duration 5422ms) [ OK ] ns4 TCP -> ns3 (dead:beef:3::2:10113) MPTCP (duration 5423ms) [ OK ] Time: 296 seconds Signed-off-by: Florian Westphal Reviewed-by: Matthieu Baerts Signed-off-by: David S. Miller commit 767659f65000e6a19fee3b9bf6cda2839968329a Author: Florian Westphal Date: Tue Jun 30 21:24:44 2020 +0200 selftests: mptcp: add option to specify size of file to transfer The script generates two random files that are then sent via tcp and mptcp connections. In order to compare throughput over consecutive runs add an option to provide the file size on the command line: "-f 128000". Also add an option, -t, to enable tcp tests. This is useful to compare throughput of mptcp connections and tcp connections. Example: run tests with a 4mb file size, 300ms delay 0.01% loss, default gso/tso/gro settings and with large write/blocking io: mptcp_connect.sh -t -f $((4 * 1024 * 1024)) -d 300 -l 0.01% -r 0 -e "" -m mmap Signed-off-by: Florian Westphal Reviewed-by: Matthieu Baerts Signed-off-by: David S. Miller commit b97e9d9d67c88bc413a3c27734d45d98d8d52b00 Author: Danny Lin Date: Wed Jul 1 16:01:52 2020 -0700 net: sched: Allow changing default qdisc to FQ-PIE Similar to fq_codel and the other qdiscs that can set as default, fq_pie is also suitable for general use without explicit configuration, which makes it a valid choice for this. This is useful in situations where a painless out-of-the-box solution for reducing bufferbloat is desired but fq_codel is not necessarily the best choice. For example, fq_pie can be better for DASH streaming, but there could be more cases where it's the better choice of the two simple AQMs available in the kernel. Signed-off-by: Danny Lin Signed-off-by: David S. Miller commit d8c8a96ce5ad41ac0993ec3738f07c138f190b43 Merge: 11a20c7152823 a296d665eae1e Author: David S. Miller Date: Wed Jul 1 17:41:56 2020 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2020-07-01 This series contains updates to all Intel drivers, but a majority of the changes are to the i40e driver. Jeff converts 'fall through' comments to the 'fallthrough;' keyword for all Intel drivers. Removed unnecessary delay in the ixgbe ethtool diagnostics test. Arkadiusz implements Total Port Shutdown for i40e. This is the revised patch based on Jakub's feedback from an earlier submission of this patch, where additional code comments and description was needed to describe the functionality. Wei Yongjun fixes return error code for iavf_init_get_resources(). Magnus optimizes XDP code in i40e; starting with AF_XDP zero-copy transmit completion path. Then by only executing a division when necessary in the napi_poll data path. Move the check for transmit ring full outside the send loop to increase performance. Ciara add XDP ring statistics to i40e and the ability to dump these statistics and descriptors. Tony fixes reporting iavf statistics. Radoslaw adds support for 2.5 and 5 Gbps by implementing the newer ethtool ksettings API in ixgbe. ==================== Signed-off-by: David S. Miller commit 11a20c7152823efe17e282e11cdfcc683d5e2a06 Merge: a3b658cfb6649 66486d8943bac Author: David S. Miller Date: Wed Jul 1 17:25:00 2020 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2020-07-01 This series contains updates to the ice driver only. Jacob implements a devlink region for device capabilities. Bruce removes structs containing only one-element arrays that are either unused or only used for indexing. Instead, use pointer arithmetic or other indexing to access the elements. Converts "C struct hack" variable-length types to the preferred C99 flexible array member. ==================== Signed-off-by: David S. Miller commit 66486d8943bac36821f66b7e2d33e4c7c691e113 Author: Bruce Allan Date: Mon Jun 29 17:27:46 2020 -0700 ice: replace single-element array used for C struct hack Convert the pre-C90-extension "C struct hack" method (using a single- element array at the end of a structure for implementing variable-length types) to the preferred use of C99 flexible array member. Additional code cleanups were done near areas affected by this change. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit b3c3890489f6d3794916958d1663ab6aecb0290b Author: Bruce Allan Date: Mon Jun 29 17:27:45 2020 -0700 ice: avoid unnecessary single-member variable-length structs There are a number of structures that consist of a one-element array as the only struct member. Some of those are unused so remove them. Others are used to index into a buffer/array consisting of a variable number of a different data or structure type. Those are unnecessary since we can use simple pointer arithmetic or index directly into the buffer to access individual elements of the buffer/array. Additional code cleanups were done near areas affected by this change. Signed-off-by: Bruce Allan Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 680c45c767f63e35f063d3ea04f388a9f7ae7079 Author: Matt Atwood Date: Tue Jun 30 16:33:10 2020 -0700 drm/i915/dp: Correctly advertise HBR3 for GEN11+ intel_dp_set_source_rates() calls intel_dp_is_edp(), which is unsafe to use before encoder_type is set. This caused GEN11+ to incorrectly strip HBR3 from source rates for edp. Move intel_dp_set_source_rates() to after encoder_type is set. Add comment to intel_dp_is_edp() describing unsafe usages. v2: Alter intel_dp_set_source_rates final position (Ville/Manasi). Remove outdated comment (Ville). Slight optimization of control flow in intel_dp_init_connector. Slight rewording in commit message. Signed-off-by: Matt Atwood Reviewed-by: Ville Syrjälä Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200630233310.10191-1-matthew.s.atwood@intel.com commit 49cff1256879d8622d253b6deac2438d6cd33445 Author: Mathieu Poirier Date: Tue Jun 30 10:31:18 2020 -0600 Revert "remoteproc: Add support for runtime PM" This reverts commit a99a37f6cd5a74d5b22c08544aa6c5890813c8ba. Removing PM runtime operations from the remoteproc core in order to: 1) Keep all power management operations in platform drivers. That way we do not loose flexibility in an area that is very HW specific. 2) Avoid making the support for remote processor managed by external entities more complex that it already is. 3) Fix regression introduced for the Omap remoteproc driver. Acked-by: Suman Anna Tested-by: Suman Anna Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200630163118.3830422-3-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 4605ad8f4581981787ed22b3a755209c8fe5aa24 Author: Mathieu Poirier Date: Tue Jun 30 10:31:17 2020 -0600 remoteproc: ingenic: Move clock handling to prepare/unprepare callbacks This patch moves clock related operations to the remoteproc prepare() and unprepare() callbacks so that the PM runtime framework doesn't have to be involved needlessly. This provides a simpler approach and requires less code. Based on the work from Paul Cercueil published here: https://lore.kernel.org/linux-remoteproc/20191116170846.67220-4-paul@crapouillou.net/ Reviewed-by: Suman Anna Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20200630163118.3830422-2-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit a3b658cfb66497525278cbf852913a04dbaae992 Author: Jarod Wilson Date: Tue Jun 30 14:49:41 2020 -0400 bonding: allow xfrm offload setup post-module-load At the moment, bonding xfrm crypto offload can only be set up if the bonding module is loaded with active-backup mode already set. We need to be able to make this work with bonds set to AB after the bonding driver has already been loaded. So what's done here is: 1) move #define BOND_XFRM_FEATURES to net/bonding.h so it can be used by both bond_main.c and bond_options.c 2) set BOND_XFRM_FEATURES in bond_dev->hw_features universally, rather than only when loading in AB mode 3) wire up xfrmdev_ops universally too 4) disable BOND_XFRM_FEATURES in bond_dev->features if not AB 5) exit early (non-AB case) from bond_ipsec_offload_ok, to prevent a performance hit from traversing into the underlying drivers 5) toggle BOND_XFRM_FEATURES in bond_dev->wanted_features and call netdev_change_features() from bond_option_mode_set() In my local testing, I can change bonding modes back and forth on the fly, have hardware offload work when I'm in AB, and see no performance penalty to non-AB software encryption, despite having xfrm bits all wired up for all modes now. Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Reported-by: Huy Nguyen CC: Saeed Mahameed CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: "David S. Miller" CC: Jeff Kirsher CC: Jakub Kicinski CC: Steffen Klassert CC: Herbert Xu CC: netdev@vger.kernel.org CC: intel-wired-lan@lists.osuosl.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller commit 8d7aab3515fa1f9774939537419fecf5247689a9 Author: Jacob Keller Date: Thu Jun 18 11:46:11 2020 -0700 ice: implement snapshot for device capabilities Add a new devlink region used for capturing a snapshot of the device capabilities buffer which is reported by the firmware over the AdminQ. This information can useful in debugging driver and firmware interactions. Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 651f8bd4da93612a630626faf58fc894ef9443de Merge: 21ddff5c95e1d 547c878854946 Author: David S. Miller Date: Wed Jul 1 15:30:34 2020 -0700 Merge branch 'net-ipa-endpoint-configuration-updates' Alex Elder says: ==================== net: ipa: endpoint configuration updates This series updates code that configures IPA endpoints. The changes made mainly affect access to registers that are valid only for RX, or only for TX endpoints. The first three patches avoid writing endpoint registers if they are not defined to be valid. The fourth patch slightly modifies the parameters for the offset macros used for these endpoint registers, to make it explicit when only some endpoints are valid. The last patch just tweaks one line of code so it uses a convention used everywhere else in the driver. Version 2 of this series eliminates some of the "assert()" comments that Jakub inquired about. The ones removed will actually go away in an upcoming (not-yet-posted) patch series anyway. ==================== Signed-off-by: David S. Miller commit 547c8788549460149f3b9fbacdc6a7f8ccecc27f Author: Alex Elder Date: Tue Jun 30 08:33:04 2020 -0500 net: ipa: HOL_BLOCK_EN_FMASK is a 1-bit mask The convention throughout the IPA driver is to directly use single-bit field mask values, rather than using (for example) u32_encode_bits() to set or clear them. Fix the one place that doesn't follow that convention, which sets HOL_BLOCK_EN_FMASK in ipa_endpoint_init_hol_block_enable(). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8b97bcb7bb2629e0840c2bebdfff050f890caac9 Author: Alex Elder Date: Tue Jun 30 08:33:03 2020 -0500 net: ipa: clarify endpoint register macro constraints A handful of registers are valid only for RX endpoints, and some others are valid only for TX endpoints. For these endpoints, add a comment above their defined offset macro that indicates the endpoints to which they apply. Extend the endpoint parameter naming convention as well, to make these constraints more explicit. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 00b9102afadf08af6cd283400809163f7d4680af Author: Alex Elder Date: Tue Jun 30 08:33:02 2020 -0500 net: ipa: mode register is TX only The INIT_MODE endpoint configuration register is only valid for TX endpoints. Rather than writing a zero to that register for RX endpoints, avoid writing the register at all. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 9b63f09378ff9df220d154a89910a3c0f8e036e6 Author: Alex Elder Date: Tue Jun 30 08:33:01 2020 -0500 net: ipa: metadata_mask register is RX only The INIT_HDR_METADATA_MASK endpoint configuration register is only valid for RX endpoints. Rather than writing a zero to that register for TX endpoints, avoid writing the register at all. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit f8d34dfdf3f32a40a18df3c160cb5ec8394e0fb8 Author: Alex Elder Date: Tue Jun 30 08:33:00 2020 -0500 net: ipa: head-of-line block registers are RX only The INIT_HOL_BLOCK_EN and INIT_HOL_BLOCK_TIMER endpoint registers are only valid for RX endpoints. Have ipa_endpoint_modem_hol_block_clear_all() skip writing these registers for TX endpoints. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 21ddff5c95e1d498e1a0076f43d9ea7cbe64a8ad Merge: 6f6746d7bab1b 722208ea3e2a1 Author: David S. Miller Date: Wed Jul 1 15:29:07 2020 -0700 Merge branch 'net-ipa-small-improvements' Alex Elder says: ==================== net: ipa: small improvements This series contains two patches that improve the error output that's reported when an error occurs while changing the state of a GSI channel or event ring. The first ensures all such error conditions report an error, and the second simplifies the messages a little and ensures they are all consistent. A third (independent) patch gets rid of an unused symbol in the microcontroller code. Version 2 fixes two alignment problems pointed out by checkpatch.pl, as requested by Jakub Kicinski. ==================== Signed-off-by: David S. Miller commit 722208ea3e2a19f927cd507366547b2546444697 Author: Alex Elder Date: Tue Jun 30 07:58:46 2020 -0500 net: ipa: kill IPA_MEM_UC_OFFSET The microcontroller shared memory area is at the beginning of the IPA resident memory. IPA_MEM_UC_OFFSET was defined as the offset within that region where it's found, but it's 0, and it's never actually used. Just get rid of the definition, and move some of the description it had to be above the definition of the ipa_uc_mem_area structure. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8463488af4bebd87cc70270c413b4679cec6e378 Author: Alex Elder Date: Tue Jun 30 07:58:45 2020 -0500 net: ipa: standarize more GSI error messages Make minor updates to error messages reported in "gsi.c": - Use local variables to reduce multi-line function calls - Don't use parentheses in messages - Do some slight rewording in a few cases Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit a442b3c7554898ffafbc77ff49b08ec224caabd8 Author: Alex Elder Date: Tue Jun 30 07:58:44 2020 -0500 net: ipa: always report GSI state errors We check the state of an event ring or channel both before and after any GSI command issued that will change that state. In most--but not all--cases, if the state is something different than expected we report an error message. Add error messages where missing, so that all unexpected states provide information about what went wrong. Drop the parentheses around the state value shown in all cases. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 6f6746d7bab1bb5798b186cb35570d2c2f10201c Merge: 8c96439724f6b 9e88cb5ff713b Author: David S. Miller Date: Wed Jul 1 15:27:09 2020 -0700 Merge branch 'net-ipa-simple-refactorizations' Alex Elder says: ==================== net: ipa: simple refactorizations This series makes three small changes to some endpoint configuration code. The first uses a constant to represent the frequency of an internal clock used for timers in the IPA. The second modifies a limit used so it matches Qualcomm's internal code. And the third reworks a few lines of code, eliminating a multi-line function call. ==================== Signed-off-by: David S. Miller commit 9e88cb5ff713bcacfe216c89d614eb505286ad6d Author: Alex Elder Date: Mon Jun 29 16:55:23 2020 -0500 net: ipa: reuse a local variable in ipa_endpoint_init_aggr() Reuse the "limit" local variable in ipa_endpoint_init_aggr() when setting the aggregation size limit. Simple cleanup. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 1d86652b13e8404ee42b6575d97ed228e92547d6 Author: Alex Elder Date: Mon Jun 29 16:55:22 2020 -0500 net: ipa: reduce aggregation time limit Halve the time limit used when aggregation is enabled on an RX endpoint, to half a millisecond. Use DIV_ROUND_CLOSEST() to compute the value that represents the time period, to get better accuracy in the event the time limit is not an even multiple of the granularity. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 317a5740b70568f71ecdcf0db1aefad2e4b74811 Author: Alex Elder Date: Mon Jun 29 16:55:21 2020 -0500 net: ipa: rework ipa_aggr_granularity_val() The timer used for aggregation makes use of an internal 32 KHz clock. The granularity of the timer is programmed by a field whose value is computed by ipa_aggr_granularity_val(). Redefine the way that value is computed by using a new TIMER_FREQUENCY constant representing the underlying clock frequency. Add two BUILD_BUG_ON() calls to ensure the value used is valid. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8c96439724f6b3a5f537615f294e4f84df30eafb Merge: 6d79dc6765e42 1c9535c701fb2 Author: David S. Miller Date: Wed Jul 1 15:25:14 2020 -0700 Merge branch 'add-XDP-support-to-xen-netfront' Denis Kirjanov says: ==================== xen networking: add XDP support to xen-netfront The first patch adds a new extra type to enable proper synchronization between an RX request/response pair. The second patch implements BFP interface for xen-netfront. The third patch enables extra space for XDP processing. v14: - fixed compilation warnings v13: - fixed compilation due to previous rename v12: - xen-netback: rename netfront_xdp_headroom to xdp_headroom v11: - add the new headroom constant to netif.h - xenbus_scanf check - lock a bulk of puckets in xennet_xdp_xmit() v10: - add a new xen_netif_extra_info type to enable proper synchronization between an RX request/response pair. - order local variable declarations v9: - assign an xdp program before switching to Reconfiguring - minor cleanups - address checkpatch issues v8: - add PAGE_POOL config dependency - keep the state of XDP processing in netfront_xdp_enabled - fixed allocator type in xdp_rxq_info_reg_mem_model() - minor cleanups in xen-netback v7: - use page_pool_dev_alloc_pages() on page allocation - remove the leftover break statement from netback_changed v6: - added the missing SOB line - fixed subject v5: - split netfront/netback changes - added a sync point between backend/frontend on switching to XDP - added pagepool API v4: - added verbose patch descriprion - don't expose the XDP headroom offset to the domU guest - add a modparam to netback to toggle XDP offset - don't process jumbo frames for now v3: - added XDP_TX support (tested with xdping echoserver) - added XDP_REDIRECT support (tested with modified xdp_redirect_kern) - moved xdp negotiation to xen-netback v2: - avoid data copying while passing to XDP - tell xen-netback that we need the headroom space ==================== Signed-off-by: David S. Miller commit 1c9535c701fb287c2f292bc7fb39a07c5f8a25fd Author: Denis Kirjanov Date: Mon Jun 29 16:13:29 2020 +0300 xen networking: add XDP offset adjustment to xen-netback the patch basically adds the offset adjustment and netfront state reading to make XDP work on netfront side. Reviewed-by: Paul Durrant Signed-off-by: Denis Kirjanov Signed-off-by: David S. Miller commit 6c5aa6fc4defc2a0977a2c59e4710d50fa1e834c Author: Denis Kirjanov Date: Mon Jun 29 16:13:28 2020 +0300 xen networking: add basic XDP support for xen-netfront The patch adds a basic XDP processing to xen-netfront driver. We ran an XDP program for an RX response received from netback driver. Also we request xen-netback to adjust data offset for bpf_xdp_adjust_head() header space for custom headers. synchronization between frontend and backend parts is done by using xenbus state switching: Reconfiguring -> Reconfigured- > Connected UDP packets drop rate using xdp program is around 310 kpps using ./pktgen_sample04_many_flows.sh and 160 kpps without the patch. Signed-off-by: Denis Kirjanov Signed-off-by: David S. Miller commit 2cef30d7bd8b8fbddeb74e3753c29d4248c094e0 Author: Denis Kirjanov Date: Mon Jun 29 16:13:27 2020 +0300 xen: netif.h: add a new extra type for XDP The patch adds a new extra type to be able to diffirentiate between RX responses on xen-netfront side with the adjusted offset required for XDP processing. The offset value from a guest is passed via xenstore. Signed-off-by: Denis Kirjanov Signed-off-by: David S. Miller commit 91f77560e4738a9ff090c87f594d771cee254a4e Merge: 17bbf925c6f86 c1f1f3656eee3 Author: Alexei Starovoitov Date: Wed Jul 1 15:18:29 2020 -0700 Merge branch 'test_progs-improvements' Jesper Dangaard Brouer says: ==================== V3: Reorder patches to cause less code churn. The BPF selftest 'test_progs' contains many tests, that cover all the different areas of the kernel where BPF is used. The CI system sees this as one test, which is impractical for identifying what team/engineer is responsible for debugging the problem. This patchset add some options that makes it easier to create a shell for-loop that invoke each (top-level) test avail in test_progs. Then each test FAIL/PASS result can be presented the CI system to have a separate bullet. (For Red Hat use-case in Beaker https://beaker-project.org/) Created a public script[1] that uses these features in an advanced way. Demonstrating howto reduce the number of (top-level) tests by grouping tests together via using the existing test pattern selection feature, and then using the new --list feature combined with exclude (-b) to get a list of remaining test names that was not part of the groups. [1] https://github.com/netoptimizer/prototype-kernel/blob/master/scripts/bpf_selftests_grouping.sh ==================== Signed-off-by: Alexei Starovoitov commit c1f1f3656eee3a59a40e1805699041ec1c14ab83 Author: Jesper Dangaard Brouer Date: Wed Jul 1 23:44:17 2020 +0200 selftests/bpf: Test_progs option for listing test names The program test_progs have some very useful ability to specify a list of test name substrings for selecting which tests to run. This patch add the ability to list the selected test names without running them. This is practical for seeing which tests gets selected with given select arguments (which can also contain a exclude list via --name-blacklist). This output can also be used by shell-scripts in a for-loop: for N in $(./test_progs --list -t xdp); do \ ./test_progs -t $N 2>&1 > result_test_${N}.log & \ done ; wait This features can also be used for looking up a test number and returning a testname. If the selection was empty then a shell EXIT_FAILURE is returned. This is useful for scripting. e.g. like this: n=1; while [ $(./test_progs --list -n $n) ] ; do \ ./test_progs -n $n ; n=$(( n+1 )); \ done Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/159363985751.930467.9610992940793316982.stgit@firesoul commit 643e7233aa948901dce81d4573c91ed99fdd272e Author: Jesper Dangaard Brouer Date: Wed Jul 1 23:44:12 2020 +0200 selftests/bpf: Test_progs option for getting number of tests It can be practial to get the number of tests that test_progs contain. This could for example be used to create a shell for-loop construct that runs the individual tests. Like: for N in $(seq 1 $(./test_progs -c)); do ./test_progs -n $N 2>&1 > result_test_${N}.log & done ; wait V2: Add the ability to return the count for the selected tests. This is useful for getting a count e.g. after excluding some tests with option -b. The current beakers test script like to report the max test count upfront. Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/159363985244.930467.12617117873058936829.stgit@firesoul commit 6c92bd5cd4650c39dd929565ee172984c680fead Author: Jesper Dangaard Brouer Date: Wed Jul 1 23:44:07 2020 +0200 selftests/bpf: Test_progs indicate to shell on non-actions When a user selects a non-existing test the summary is printed with indication 0 for all info types, and shell "success" (EXIT_SUCCESS) is indicated. This can be understood by a human end-user, but for shell scripting is it useful to indicate a shell failure (EXIT_FAILURE). Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/159363984736.930467.17956007131403952343.stgit@firesoul commit d93529962d2aaee599157911894af2a791979e9f Merge: f2d4f106f5206 ca7d8b980b67f Author: Mark Brown Date: Wed Jul 1 23:21:32 2020 +0100 Merge series "Add Renesas RPC-IF support" from Sergei Shtylyov : Hello! Here's a set of 2 patches against Linus' repo. Renesas Reduced Pin Count Interface (RPC-IF) allows a SPI flash or HyperFlash connected to the SoC to be accessed via the external address space read mode or the manual mode. The memory controller driver for RPC-IF registers either SPI or HyperFLash subdevice, depending on the contents of the device tree subnode; it also provides the abstract "back end" API that can be used by the "front end" SPI/MTD drivers to talk to the real hardware... Based on the original patch by Mason Yang . [1/2] dt-bindings: memory: document Renesas RPC-IF bindings [2/2] memory: add Renesas RPC-IF driver MBR, Sergei commit f2d4f106f52068a33c4b65428f53a0b943e1236e Merge: 95f2fd2e52a49 26751de25d255 Author: Mark Brown Date: Wed Jul 1 23:21:31 2020 +0100 Merge series "spi: bcm2835: Interrupt-handling optimisations" from Robin Murphy : Hi all, Although Florian was concerned about a trivial inline check to deal with shared IRQs adding overhead, the reality is that it would be so small as to not be worth even thinking about unless the driver was already tuned to squeeze out every last cycle. And a brief look over the code shows that that clearly isn't the case. This is an example of some of the easy low-hanging fruit that jumps out just from code inspection. Based on disassembly and ARM1176 cycle timings, patch #2 should save the equivalent of 2-3 shared interrupt checks off the critical path in all cases, and patch #3 possibly up to about 100x more. I don't have any means to test these patches, let alone measure performance, so they're only backed by the principle that less code - and in particular fewer memory accesses - is almost always better. There is almost certainly a *lot* more to be had from careful use of relaxed I/O accessors, not doing a read-modify-write of CS at every reset, tweaking the loops further to avoid unnecessary writebacks to variables, and so on. However since I'm not invested in this personally I'm not going to pursue it any further; I'm throwing these patches out as more of a demonstration to back up my original drive-by review comments, so if anyone want to pick them up and run with them then please do so. Robin. Robin Murphy (3): spi: bcm3835: Tidy up bcm2835_spi_reset_hw() spi: bcm2835: Micro-optimise IRQ handler spi: bcm2835: Micro-optimise FIFO loops drivers/spi/spi-bcm2835.c | 45 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 23 deletions(-) -- 2.23.0.dirty _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 95f2fd2e52a49b76f896e03802123567b8a89912 Author: Linus Walleij Date: Thu Jun 25 22:21:49 2020 +0200 spi: lantiq-ssc: Convert to use GPIO descriptors This switches the Lantiq SSC driver over to use GPIO descriptor handling in the core. The driver was already utilizing the core to look up and request GPIOs from the device tree so this is a pretty small change just switching it over to use descriptors directly instead. Signed-off-by: Linus Walleij Cc: Hauke Mehrtens Link: https://lore.kernel.org/r/20200625202149.209276-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 27e23ca806c6fe08613330bb35e1f502ffd2d3a8 Author: Linus Walleij Date: Thu Jun 25 22:14:22 2020 +0200 spi: img-spfi: Convert to use GPIO descriptors This converts the IMG SPFI SPI driver to use GPIO descriptors as obtained from the core instead of GPIO numbers. The driver was already relying on the core code to look up the GPIO numbers from the device tree and allocate memory for storing state etc. By moving to use descriptors handled by the core we can delete the setup/cleanup functions and the device state handler that were only dealing with this. Signed-off-by: Linus Walleij Cc: Ionela Voinescu Cc: Sifan Naeem Link: https://lore.kernel.org/r/20200625201422.208640-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit a2f234fcabd0ab25399741668ea62bc4c3b40191 Author: Linus Walleij Date: Fri Jun 26 00:57:59 2020 +0200 spi: npcm-pspi: Convert to use GPIO descriptors The Nuvoton PSPI driver already uses the core to handle GPIO chip selects but is using the old GPIO number method and retrieveing the GPIOs in the probe() call. Switch it over to using GPIO descriptors saving a bunch of code and modernizing it. Compile tested med ARMv7 multiplatform config augmented with the Nuvoton arch and this driver. Signed-off-by: Linus Walleij Cc: Tomer Maimon Link: https://lore.kernel.org/r/20200625225759.273911-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit d40f0b6f2e21f2400ae8b1b120d11877d9ffd8ec Author: Douglas Anderson Date: Mon Jun 29 16:41:06 2020 -0700 spi: Avoid setting the chip select if we don't need to On some SPI controllers (like spi-geni-qcom) setting the chip select is a heavy operation. For instance on spi-geni-qcom, with the current code, is was measured as taking upwards of 20 us. Even on SPI controllers that aren't as heavy, setting the chip select is at least something like a MMIO operation over some peripheral bus which isn't as fast as a RAM access. While it would be good to find ways to mitigate problems like this in the drivers for those SPI controllers, it can also be noted that the SPI framework could also help out. Specifically, in some situations, we can see the SPI framework calling the driver's set_cs() with the same parameter several times in a row. This is specifically observed when looking at the way the Chrome OS EC SPI driver (cros_ec_spi) works but other drivers likely trip it to some extent. Let's solve this by caching the chip select state in the core and only calling into the controller if there was a change. We check not only the "enable" state but also the chip select mode (active high or active low) since controllers may care about both the mode and the enable flag in their callback. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200629164103.1.Ied8e8ad8bbb2df7f947e3bc5ea1c315e041785a2@changeid Signed-off-by: Mark Brown commit dd67de8c3b421376b4b6dac14263763aa75535fc Author: Luc Van Oostenryck Date: Mon Jun 22 18:26:11 2020 +0200 spi: fsl: add missing __iomem annotation The field mspi->reg_base is annotated as an __iomem pointer. Good. However, this field is often assigned to a temporary variable: before being used. For example: struct fsl_spi_reg *reg_base = mspi->reg_base; But this variable is missing the __iomem annotation. So, add the missing __iomem and make sparse & the bot happier. Reported-by: kernel test robot Signed-off-by: Luc Van Oostenryck Link: https://lore.kernel.org/r/20200622162611.83694-1-luc.vanoostenryck@gmail.com Signed-off-by: Mark Brown commit 17bbf925c6f86be8c08bc473cb5327c173154596 Author: Andrii Nakryiko Date: Wed Jul 1 14:28:16 2020 -0700 tools/bpftool: Turn off -Wnested-externs warning Turn off -Wnested-externs to avoid annoying warnings in BUILD_BUG_ON macro when compiling bpftool: In file included from /data/users/andriin/linux/tools/include/linux/build_bug.h:5, from /data/users/andriin/linux/tools/include/linux/kernel.h:8, from /data/users/andriin/linux/kernel/bpf/disasm.h:10, from /data/users/andriin/linux/kernel/bpf/disasm.c:8: /data/users/andriin/linux/kernel/bpf/disasm.c: In function ‘__func_get_name’: /data/users/andriin/linux/tools/include/linux/compiler.h:37:38: warning: nested extern declaration of ‘__compiletime_assert_0’ [-Wnested-externs] _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^~~~~~~~~~~~~~~~~~~~~ /data/users/andriin/linux/tools/include/linux/compiler.h:16:15: note: in definition of macro ‘__compiletime_assert’ extern void prefix ## suffix(void) __compiletime_error(msg); \ ^~~~~~ /data/users/andriin/linux/tools/include/linux/compiler.h:37:2: note: in expansion of macro ‘_compiletime_assert’ _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^~~~~~~~~~~~~~~~~~~ /data/users/andriin/linux/tools/include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’ #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ^~~~~~~~~~~~~~~~~~ /data/users/andriin/linux/tools/include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’ BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition) ^~~~~~~~~~~~~~~~ /data/users/andriin/linux/kernel/bpf/disasm.c:20:2: note: in expansion of macro ‘BUILD_BUG_ON’ BUILD_BUG_ON(ARRAY_SIZE(func_id_str) != __BPF_FUNC_MAX_ID); ^~~~~~~~~~~~ Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200701212816.2072340-1-andriin@fb.com commit 8d821b5db70723d27ee749b4870de90760606918 Author: Hao Luo Date: Wed Jul 1 10:53:15 2020 -0700 selftests/bpf: Switch test_vmlinux to use hrtimer_range_start_ns. The test_vmlinux test uses hrtimer_nanosleep as hook to test tracing programs. But in a kernel built by clang, which performs more aggresive inlining, that function gets inlined into its caller SyS_nanosleep. Therefore, even though fentry and kprobe do hook on the function, they aren't triggered by the call to nanosleep in the test. A possible fix is switching to use a function that is less likely to be inlined, such as hrtimer_range_start_ns. The EXPORT_SYMBOL functions shouldn't be inlined based on the description of [1], therefore safe to use for this test. Also the arguments of this function include the duration of sleep, therefore suitable for test verification. [1] af3b56289be1 time: don't inline EXPORT_SYMBOL functions Tested: In a clang build kernel, before this change, the test fails: test_vmlinux:PASS:skel_open 0 nsec test_vmlinux:PASS:skel_attach 0 nsec test_vmlinux:PASS:tp 0 nsec test_vmlinux:PASS:raw_tp 0 nsec test_vmlinux:PASS:tp_btf 0 nsec test_vmlinux:FAIL:kprobe not called test_vmlinux:FAIL:fentry not called After switching to hrtimer_range_start_ns, the test passes: test_vmlinux:PASS:skel_open 0 nsec test_vmlinux:PASS:skel_attach 0 nsec test_vmlinux:PASS:tp 0 nsec test_vmlinux:PASS:raw_tp 0 nsec test_vmlinux:PASS:tp_btf 0 nsec test_vmlinux:PASS:kprobe 0 nsec test_vmlinux:PASS:fentry 0 nsec Signed-off-by: Hao Luo Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200701175315.1161242-1-haoluo@google.com commit a296d665eae1e8ec6445683bfb999c884058426a Author: Radoslaw Tyl Date: Fri Jun 26 15:28:14 2020 +0200 ixgbe: Add ethtool support to enable 2.5 and 5.0 Gbps support Added full support for new version Ethtool API. New API allow use 2500Gbase-T and 5000base-T supported and advertised link speed modes. Signed-off-by: Radoslaw Tyl Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit bb0967c04e8bed3428e4c54f925cdd1890f8d2c6 Author: Jeff Kirsher Date: Thu Jun 25 22:21:41 2020 -0700 ixgbe: Cleanup unneeded delay in ethtool test There is a 4 seconds delay in ixgbe_diag_test() that is holding up other ioctls such as SIOCGIFCONF that Oracle database applications use. One of Oracle's product runs "ethtool -t ethX online" periodically for system monitoring and that is impacting database applications that use SIOCGIFCONF at that same time. This 4 second delay was needed in out early 1GbE parts to give the PHY time to recover from a reset. This code was carried forward to the 10 GbE driver even it was not needed for the supported PHYs in the ixgbe driver. CC: Aleksandr Loktionov CC: Jack Vogel Reported-by: Venkat Venkatsubra Signed-off-by: Jeff Kirsher Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 9358076642f14cec8c414850d5a909cafca3a9d6 Author: Tony Nguyen Date: Wed Jun 24 09:04:22 2020 -0700 iavf: Fix updating statistics Commit bac8486116b0 ("iavf: Refactor the watchdog state machine") inverted the logic for when to update statistics. Statistics should be updated when no other commands are pending, instead they were only requested when a command was processed. iavf_request_stats() would see a pending request and not request statistics to be updated. This caused statistics to never be updated; fix the logic. Fixes: bac8486116b0 ("iavf: Refactor the watchdog state machine") Signed-off-by: Tony Nguyen Tested-by: Andrew Bowers commit b53ac8b89157b5ff5d46c07eaa8b12e9d4e63b34 Author: Jens Axboe Date: Wed Jul 1 15:45:19 2020 -0600 dm: remove unused variable Since merging the commit identified in Fixes below, we trigger this compile time warning: drivers/md/dm.c: In function ‘__map_bio’: drivers/md/dm.c:1296:24: warning: unused variable ‘md’ [-Wunused-variable] 1296 | struct mapped_device *md = io->md; | ^~ Remove the 'md' variable. Fixes: 5a6c35f9af41 ("block: remove direct_make_request") Signed-off-by: Jens Axboe commit ca7d8b980b67f133317525c4273e144116ee1ae5 Author: Sergei Shtylyov Date: Tue Jun 16 23:03:48 2020 +0300 memory: add Renesas RPC-IF driver Add the memory driver for Renesas RPC-IF which registers either SPI or HyperFLash device depending on the contents of the device tree subnode. It also provides the absract "back end" device APIs that can be used by the "front end" SPI/MTD drivers to talk to the real hardware. Based on the original patch by Mason Yang . Signed-off-by: Sergei Shtylyov Link: https://lore.kernel.org/r/9a3606ec-d4d0-c63a-4fb6-631ab38e621c@cogentembedded.com Signed-off-by: Mark Brown commit ab1c362061d92556bd96fd2c0b188f8e4223e3e3 Author: Sergei Shtylyov Date: Tue Jun 16 23:01:42 2020 +0300 dt-bindings: memory: document Renesas RPC-IF bindings Renesas Reduced Pin Count Interface (RPC-IF) allows a SPI flash or HyperFlash connected to the SoC to be accessed via the external address space read mode or the manual mode. Document the device tree bindings for the Renesas RPC-IF found in the R-Car gen3 SoCs. Based on the original patch by Mason Yang . Signed-off-by: Sergei Shtylyov Link: https://lore.kernel.org/r/54a84c75-fa17-9976-d9a6-a69ef67c418b@cogentembedded.com Signed-off-by: Mark Brown commit 44ea803e2fa7e12adb5d6260da4e4956e784effb Author: Ciara Loftus Date: Tue Jun 23 13:06:57 2020 +0000 i40e: introduce new dump desc XDP command Interfaces already exist for dumping Rx and Tx descriptor information. Introduce another for doing the same for XDP descriptors. Signed-off-by: Ciara Loftus Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 890c402c7b113137c485367d5651f09a39c7d893 Author: Ciara Loftus Date: Tue Jun 23 13:06:56 2020 +0000 i40e: add XDP ring statistics to dump VSI debug output Prior to this, only the Rx and Tx ring statistics were dumped. The XDP ring statistics are now dumped as well. Signed-off-by: Ciara Loftus Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit e2968260e169e11b5fa13db05792eb3142b78723 Author: Ciara Loftus Date: Tue Jun 23 13:06:55 2020 +0000 i40e: add XDP ring statistics to VSI stats Prior to this, only Rx and Tx ring statistics were accounted for. Signed-off-by: Ciara Loftus Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 1fd972ebe5230eb0585642f2172c9dd2b86ea381 Author: Magnus Karlsson Date: Tue Jun 23 11:44:18 2020 +0200 i40e: move check of full Tx ring to outside of send loop Move the check if the HW Tx ring is full to outside the send loop. Currently it is checked for every single descriptor that we send. Instead, tell the send loop to only process a maximum number of packets equal to the number of available slots in the Tx ring. This way, we can remove the check inside the send loop to and gain some performance. Suggested-by: Sridhar Samudrala Signed-off-by: Magnus Karlsson Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 4b5539c01ddf838ea6f5b67d00ee035231c8248a Author: Magnus Karlsson Date: Tue Jun 23 11:44:17 2020 +0200 i40e: eliminate division in napi_poll data path Eliminate a division in the napi_poll data path. This division is executed even though it is only needed in the rare case when there are not enough interrupt lines so they have to be shared between queue pairs. Instead, just test for this case and only execute the division if needed. The code has been lifted from the ice driver. Signed-off-by: Magnus Karlsson Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 5574ff7b7b3d864556173bf822796593451a6b8c Author: Magnus Karlsson Date: Tue Jun 23 11:44:16 2020 +0200 i40e: optimize AF_XDP Tx completion path Improve the performance of the AF_XDP zero-copy Tx completion path. When there are no XDP buffers being sent using XDP_TX or XDP_REDIRECT, we do not have go through the SW ring to clean up any entries since the AF_XDP path does not use these. In these cases, just fast forward the next-to-use counter and skip going through the SW ring. The limit on the maximum number of entries to complete is also removed since the algorithm is now O(1). To simplify the code path, the maximum number of entries to complete for the XDP path is therefore also increased from 256 to 512 (the default number of Tx HW descriptors). This should be fine since the completion in the XDP path is faster than in the SKB path that has 256 as the maximum number. This patch provides around 4% throughput improvement for the l2fwd application in xdpsock on my machine. Signed-off-by: Magnus Karlsson Reviewed-by: Sridhar Samudrala Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit 26751de25d255eab7132a8024a893609456996e6 Author: Robin Murphy Date: Tue Jun 16 01:09:29 2020 +0100 spi: bcm2835: Micro-optimise FIFO loops The blind and counted loops are always called with nonzero count, so convert them to do-while loops that lead to slightly more efficient code generation. With GCC 8.3 this shaves off 1-2 instructions per iteration in each case. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/9242863077acf9a64e4b3720e479855b88d19e82.1592261248.git.robin.murphy@arm.com Signed-off-by: Mark Brown commit afe7e36360f4c981fc03ef07a81cb4ce3d567325 Author: Robin Murphy Date: Tue Jun 16 01:09:28 2020 +0100 spi: bcm2835: Micro-optimise IRQ handler The IRQ handler only needs the struct spi_controller for the sake of the completion at the end of a transfer. Passing the struct bcm2835_spi directly as the IRQ data allows that level of indirection to be pushed into the completion path for the reverse lookup, and avoided entirely in all other cases. This saves one explicit load in the critical path, plus (for a GCC 8.3 build) two registers worth of stack frame overhead. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/6b401cb521539caffab21f05b4c8cba6c9d27c6e.1592261248.git.robin.murphy@arm.com Signed-off-by: Mark Brown commit ac4648b5d866f98feef4525ae8734972359e4edd Author: Robin Murphy Date: Tue Jun 16 01:09:27 2020 +0100 spi: bcm3835: Tidy up bcm2835_spi_reset_hw() It doesn't need a struct spi_controller, and every callsite has already retrieved the appropriate struct bcm2835_spi, so just pass that directly. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/eca458ae1a0d3934d0627f90e25d294fefd4b13d.1592261248.git.robin.murphy@arm.com Signed-off-by: Mark Brown commit 753f3884f253de6b6d3a516e6651bda0baf4aede Author: Wei Yongjun Date: Thu Jun 18 14:19:53 2020 +0000 iavf: fix error return code in iavf_init_get_resources() Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: b66c7bc1cd4d ("iavf: Refactor init state machine") Signed-off-by: Wei Yongjun Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit d5ec9e2ce41ac198de2ee18e0e529b7ebbc67408 Author: Arkadiusz Kubalewski Date: Wed Jun 17 00:05:55 2020 +0000 i40e: Add support for a new feature Total Port Shutdown After OS requests to down a link on a physical network port, the traffic is no longer being processed but the physical link with a link partner is still established. Currently there is a feature (Link down on close) which allows to physically bring the link down (after OS request). With this patch new feature with similar capability is introduced: TOTAL_PORT_SHUTDOWN Allows to physically disable the link on the NIC's port. If enabled, (after link down request from the OS) no link, traffic or led activity is possible on that port. If I40E_FLAG_TOTAL_PORT_SHUTDOWN is enabled, the I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED must be explicitly forced to true and cannot be disabled at that time. The functionalities are exclusive in terms of configuration, but they also have similar behavior (allowing to disable physical link of the port), with following differences: - LINK_DOWN_ON_CLOSE_ENABLED is configurable at host OS run-time and is supported by whole family of 7xx Intel Ethernet Controllers - TOTAL_PORT_SHUTDOWN may be enabled only before OS loads (in BIOS) only if motherboard's BIOS and NIC's FW has support of it - when LINK_DOWN_ON_CLOSE_ENABLED is used, the link is being brought down by sending phy_type=0 to NIC's FW - when TOTAL_PORT_SHUTDOWN is used, phy_type is not altered, instead the link is being brought down by clearing bit (I40E_AQ_PHY_ENABLE_LINK) in abilities field of i40e_aq_set_phy_config structure Introduced changes: - new private flag I40E_FLAG_TOTAL_PORT_SHUTDOWN for handling the feature - probe of NVM if the feature was enabled at driver's port initialization - special handling on link-down procedure to let FW physically shutdown the port if the feature was enabled Signed-off-by: Arkadiusz Kubalewski Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit d5ff5fb977f0c3d07bdb9f87b490c70481c8666f Merge: d69323ee52045 a824bab7c62d7 Author: Mark Brown Date: Wed Jul 1 21:53:29 2020 +0100 Merge series "Introduce PMIC based USB type C detection" from Wesley Cheng : Changes in v4: - Modified qcom,pmic-typec binding to include the SS mux and the DRD remote endpoint nodes underneath port@1, which is assigned to the SSUSB path according to usb-connector - Added usb-connector reference to the typec dt-binding - Added tags to the usb type c and vbus nodes - Removed "qcom" tags from type c and vbus nodes - Modified Kconfig module name, and removed module alias from the typec driver Changes in v3: - Fix driver reference to match driver name in Kconfig for qcom_usb_vbus-regulator.c - Utilize regulator bitmap helpers for enable, disable and is enabled calls in qcom_usb_vbus-regulator.c - Use of_get_regulator_init_data() to initialize regulator init data, and to set constraints in qcom_usb_vbus-regulator.c - Remove the need for a local device structure in the vbus regulator driver Changes in v2: - Use devm_kzalloc() in qcom_pmic_typec_probe() - Add checks to make sure return value of typec_find_port_power_role() is valid - Added a VBUS output regulator driver, which will be used by the PMIC USB type c driver to enable/disable the source - Added logic to control vbus source from the PMIC type c driver when UFP/DFP is detected - Added dt-binding for this new regulator driver - Fixed Kconfig typec notation to match others - Leave type C block disabled until enabled by a platform DTS Add the required drivers for implementing type C orientation and role detection using the Qualcomm PMIC. Currently, PMICs such as the PM8150B have an integrated type C block, which can be utilized for this. This series adds the dt-binding, PMIC type C driver, and DTS nodes. The PMIC type C driver will register itself as a type C port w/ a registered type C switch for orientation, and will fetch a USB role switch handle for the role notifications. It will also have the ability to enable the VBUS output to any connected devices based on if the device is behaving as a UFP or DFP. Wesley Cheng (6): usb: typec: Add QCOM PMIC typec detection driver dt-bindings: usb: Add Qualcomm PMIC type C controller dt-binding arm64: boot: dts: qcom: pm8150b: Add node for USB type C block regulator: Add support for QCOM PMIC VBUS booster dt-bindings: regulator: Add dt-binding for QCOM PMIC VBUS output regulator arm64: boot: dts: qcom: pm8150b: Add DTS node for PMIC VBUS booster .../regulator/qcom,usb-vbus-regulator.yaml | 41 +++ .../bindings/usb/qcom,pmic-typec.yaml | 113 +++++++ arch/arm64/boot/dts/qcom/pm8150b.dtsi | 13 + arch/arm64/boot/dts/qcom/sm8150-mtp.dts | 4 + drivers/regulator/Kconfig | 10 + drivers/regulator/Makefile | 1 + drivers/regulator/qcom_usb_vbus-regulator.c | 97 ++++++ drivers/usb/typec/Kconfig | 12 + drivers/usb/typec/Makefile | 1 + drivers/usb/typec/qcom-pmic-typec.c | 275 ++++++++++++++++++ 10 files changed, 567 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/qcom,usb-vbus-regulator.yaml create mode 100644 Documentation/devicetree/bindings/usb/qcom,pmic-typec.yaml create mode 100644 drivers/regulator/qcom_usb_vbus-regulator.c create mode 100644 drivers/usb/typec/qcom-pmic-typec.c -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project commit d69323ee52045b17da7008d965e76a703f4ea25d Merge: e5abaf9192d01 3b619e3e2d1a8 Author: Mark Brown Date: Wed Jul 1 21:53:28 2020 +0100 Merge series "regulator/qcom: Constify static structs" from Rikard Falkeborn : Constify some static structs to allow the compiler to put them in read-only memory. Rikard Falkeborn (2): regulator: qcom_rpm: Constify struct regulator_ops regulator: qcom_spmi: Constify struct regulator_ops drivers/regulator/qcom_rpm-regulator.c | 6 +++--- drivers/regulator/qcom_spmi-regulator.c | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) -- 2.27.0 commit e5abaf9192d016a8a6c7ce39c3d72f968594c148 Merge: 81fdcef3a615f 93e39d096d731 Author: Mark Brown Date: Wed Jul 1 21:53:27 2020 +0100 Merge series "Add frequency / voltage scaling support for IPQ6018 SoC" from Kathiravan T : IPQ6018 SoC uses the PMIC MP5496. SMPA2 and LDOA2 regulator of MP5496 controls the APSS and SDCC voltage scaling respectively. Add support for the same. changes since V1: - Moved YAML conversion to the last as per Mark's comments Kathiravan T (6): dt-bindings: soc: qcom: Add IPQ6018 compatible soc: qcom: smd-rpm: Add IPQ6018 compatible dt-bindings: regulator: add MP5496 regulator compatible regulator: qcom_smd: Add MP5496 regulators dt-bindings: soc: qcom: convert the SMD-RPM document to YAML schema dt-bindings: regulator: convert QCOM SMD-RPM regulator document to YAML schema .../bindings/regulator/qcom,smd-rpm-regulator.txt | 320 --------------------- .../bindings/regulator/qcom,smd-rpm-regulator.yaml | 106 +++++++ .../devicetree/bindings/soc/qcom/qcom,smd-rpm.txt | 62 ---- .../devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml | 92 ++++++ drivers/regulator/qcom_smd-regulator.c | 34 +++ drivers/soc/qcom/smd-rpm.c | 1 + 6 files changed, 233 insertions(+), 382 deletions(-) delete mode 100644 Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.txt create mode 100644 Documentation/devicetree/bindings/regulator/qcom,smd-rpm-regulator.yaml delete mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.txt create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smd-rpm.yaml -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation commit 81fdcef3a615f5d4ef2a2bd87a65d46f6816d687 Author: Luca Ceresoli Date: Mon Jun 22 22:43:26 2020 +0200 regulator: lp87565: enable voltage regardless of ENx pin This driver enables outputs by setting bit EN_BUCKn in the BUCKn_CTRL1 register. However, if bit EN_PIN_CTRLn in the same register is set, the output is actually enabled only if EN_BUCKn is set AND an enable pin is active. Since the driver does not touch EN_PIN_CTRLn, the choice is left to the hardware, which in turn gets this bit from OTP memory, and in absence of OTP data it uses a default value that is documented in the datasheet for LP8752x, but not for LP8756x. Thus the driver doesn't really "know" whether it is actually enabling the output or not. In order to make sure activation is always driver-controlled, just clear the EN_PIN_CTRLn bit. Now all activation solely depend on the EN_BUCKn bit. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20200622204329.11147-2-luca@lucaceresoli.net Signed-off-by: Mark Brown commit 5463fce643e8d041f54378b28b35940fd5e5a5a4 Author: Jeff Kirsher Date: Wed Jun 3 20:07:26 2020 -0700 ethernet/intel: Convert fallthrough code comments Convert all the remaining 'fall through" code comments to the newer 'fallthrough;' keyword. Suggested-by: Joe Perches Signed-off-by: Jeff Kirsher Tested-by: Aaron Brown Signed-off-by: Tony Nguyen commit 93e39d096d7312e38cf502be4e516cff7acf34fa Author: Kathiravan T Date: Tue Jun 23 10:47:49 2020 +0530 regulator: add MP5496 regulator compatible IPQ6018 uses the PMIC MP5496. Add the binding for the same. Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1592889472-6843-4-git-send-email-kathirav@codeaurora.org Signed-off-by: Mark Brown commit 47894c859479a9e3472657c7acf2c7ba35778059 Author: Kathiravan T Date: Tue Jun 23 10:47:50 2020 +0530 regulator: qcom_smd: Add MP5496 regulators IPQ6018 SoC uses the PMIC MP5496. SMPA2 and LDOA2 regulator controls the APSS and SDCC voltage scaling respectively. Add support for the same. Signed-off-by: Kathiravan T Link: https://lore.kernel.org/r/1592889472-6843-5-git-send-email-kathirav@codeaurora.org Signed-off-by: Mark Brown commit 8a78439ab1b86cbfd58c233e03825d8df2c2502d Merge: 5635181b712b8 544079abf603b Author: Mark Brown Date: Wed Jul 1 21:14:24 2020 +0100 Merge series "ASoC: Intel: atom: fix kernel-doc and W=1 warnings" from Pierre-Louis Bossart : Yet another series to fix broken kernel-doc and mark unused variables as such. Pierre-Louis Bossart (2): ASoC: Intel: atom: fix kernel-doc ASoC: Intel: atom: fix 'defined but not used' warning sound/soc/intel/atom/sst-atom-controls.c | 65 ++++++++++++++++-------- sound/soc/intel/atom/sst/sst_loader.c | 4 ++ sound/soc/intel/atom/sst/sst_stream.c | 43 +++++++++------- 3 files changed, 74 insertions(+), 38 deletions(-) base-commit: a2b782d59c57cb6f673dbb4804ffc500336d7a54 -- 2.25.1 commit 5635181b712b866700adde2c0b47e8a82059b5e5 Author: Pierre-Louis Bossart Date: Wed Jul 1 13:39:13 2020 -0500 ASoC: SOF: sof-acpi-dev: fix 'defined but unused' warning Fix W=1 warning Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200701183913.83455-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6d79dc6765e4298aeeab4c22785c1c7a1c754188 Merge: 4f195d280347c 40c1b1ee5599e Author: David S. Miller Date: Wed Jul 1 12:58:34 2020 -0700 Merge branch 'net-ethernet-use-generic-power-management' Vaibhav Gupta says: ==================== net: ethernet: use generic power management Linux Kernel Mentee: Remove Legacy Power Management. The purpose of this patch series is to remove legacy power management callbacks from net ethernet drivers. The callbacks performing suspend() and resume() operations are still calling pci_save_state(), pci_set_power_state(), etc. and handling the power management themselves, which is not recommended. The conversion requires the removal of the those function calls and change the callback definition accordingly and make use of dev_pm_ops structure. All patches are compile-tested only. ==================== Signed-off-by: David S. Miller commit 40c1b1ee5599e3f30416563ebe1568b414febd81 Author: Vaibhav Gupta Date: Wed Jul 1 22:20:57 2020 +0530 natsemi: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Thus, there is no need to call the PCI helper functions like pci_enable_device, which is not recommended. Hence, removed. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 4c2ad1263b4dd2bfdc805afdbf9b27cf7f10895e Author: Vaibhav Gupta Date: Wed Jul 1 22:20:56 2020 +0530 vxge: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Use "struct dev_pm_ops" variable to bind the callbacks. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 64120615d140c88d110c6ffc964d9e6cd8bf5395 Author: Vaibhav Gupta Date: Wed Jul 1 22:20:55 2020 +0530 ksz884x: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Thus, there is no need to call the PCI helper functions like pci_enable_wake(), pci_save/restore_sate() and pci_set_power_state(). Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 0e3e206a3e127417d492cb959b3b53522255dfd0 Author: Vaibhav Gupta Date: Wed Jul 1 22:20:54 2020 +0530 mlx4: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Use "struct dev_pm_ops" variable to bind the callbacks. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit e9a7f8c5865d877e96f19dc7e6c457e42d05c030 Author: Vaibhav Gupta Date: Wed Jul 1 22:20:53 2020 +0530 benet: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Thus, there is no need to call the PCI helper functions like pci_enable/disable_device(), pci_save/restore_sate() and pci_set_power_state(). Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 78cad4cec6601d891e9fe6936b56a2571abfecb1 Author: Vaibhav Gupta Date: Wed Jul 1 22:20:52 2020 +0530 sundance: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Thus, there is no need to call the PCI helper functions like pci_enable/disable_device(), pci_save/restore_sate() and pci_set_power_state(). Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 1c2e4839eca20fe0b512cb7014a8a6a1ca83ba99 Author: Vaibhav Gupta Date: Wed Jul 1 22:20:51 2020 +0530 liquidio: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. The driver defined empty-body .suspend() and .resume() callbacks earlier. They can now be define NULL and bind with "struct dev_pm_ops" variable. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 817a89ae10a7fa78449d7f6270550e0d40236924 Author: Vaibhav Gupta Date: Wed Jul 1 22:20:50 2020 +0530 ena_netdev: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit a7c48c721109edf664555d47c67676ee362cde2f Author: Vaibhav Gupta Date: Wed Jul 1 22:20:49 2020 +0530 starfire: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Thus, there is no need to call the PCI helper functions like pci_save/restore_sate() and pci_set_power_state(). Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 33b7a252c8dc66ad4abd01a50f23a0d59d95d06d Author: Vaibhav Gupta Date: Wed Jul 1 22:20:48 2020 +0530 ne2k-pci: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. Thus, there is no need to call the PCI helper functions like pci_enable/disable_device(), pci_save/restore_sate() and pci_set_power_state(). Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 7b46681cf4b24cd686e24ca4a3d456fef20121eb Author: Vaibhav Gupta Date: Wed Jul 1 22:20:47 2020 +0530 typhoon: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. And they use PCI helper functions to do it. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. In this driver: typhoon_resume() calls typhoon_wakeup() which then calls PCI helper functions pci_set_power_state() and pci_restore_state(). The only other function, using typhoon_wakeup() is typhoon_open(). Thus remove the pci_*() calls from tyhpoon_wakeup() and place them in typhoon_open(), maintaining the order, to retain the normal behavior of the function Now, typhoon_suspend() calls typhoon_sleep() which then calls PCI helper functions pci_enable_wake(), pci_disable_device() and pci_set_power_state(). Other functions: - typhoon_open() - typhoon_close() - typhoon_init_one() are also invoking typhoon_sleep(). Thus, in this case, cannot simply move PCI helper functions call. Hence, define a new function typhoon_sleep_early() which will do all the operations, which typhoon_sleep() was doing before calling PCI helper functions. Now typhoon_sleep() will call typhoon_sleep_early() to do those tasks, hence, the behavior for _open(), _close and _init_one() remain unchanged. And typhon_suspend() only requires typhoon_sleep_early(). Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 544079abf603bf7823453748285b7cc048b09a9f Author: Pierre-Louis Bossart Date: Wed Jul 1 13:37:16 2020 -0500 ASoC: Intel: atom: fix 'defined but not used' warning Fix W=1 warning. The VOIP controls were not used in the mainline but in special versions of Android. Keep and use __maybe_used to make warning go away. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200701183716.83314-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 11013884025044374ee6222408f67ec518831353 Author: Pierre-Louis Bossart Date: Wed Jul 1 13:37:15 2020 -0500 ASoC: Intel: atom: fix kernel-doc Fix W=1 warnings. The kernel-doc format was probably never supported, fix information as needed. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20200701183716.83314-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4f195d280347c00bc4e397c8a8cbffb2611ebeed Author: Hulk Robot Date: Wed Jul 1 23:38:03 2020 +0800 qed: Make symbol 'qed_hw_err_type_descr' static Fix sparse build warning: drivers/net/ethernet/qlogic/qed/qed_main.c:2480:6: warning: symbol 'qed_hw_err_type_descr' was not declared. Should it be static? Signed-off-by: Hulk Robot Signed-off-by: David S. Miller commit 2a6d6c31f136c136c05455788579586874a0525c Author: Colin Ian King Date: Wed Jul 1 16:04:33 2020 +0100 net/packet: remove redundant initialization of variable err The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit eefb9d2b8c6a781dd1026b18e37b4bcb50cff440 Author: Steven Rostedt (VMware) Date: Wed Jul 1 15:29:06 2020 -0400 ktest.pl: Turn off buffering to the log file The log file should be up to date to whatever is happening in ktest. Disable buffering to the LOG output file handle. Signed-off-by: Steven Rostedt (VMware) commit d6bc29d987336927ff97219d5f661389f33f8f11 Author: Steven Rostedt (VMware) Date: Wed Jul 1 15:21:15 2020 -0400 ktest.pl: Just open up the log file once Currently, every write to the log file is done by opening the file, writing to it, then closing the file. This rather expensive. Just open it at the beginning and close it at the end. Signed-off-by: Steven Rostedt (VMware) commit e1435a1feb18e198155d16d3d6b500d46e0625c0 Author: Brent Lu Date: Wed Jul 1 17:36:51 2020 +0800 ASoC: Intel: bxt-da7219-max98357a: support MAX98390 speaker amp Support MAX98390 speaker amplifier on cometlake platform. Driver now detects amplifier type in the probe function and installs corresponding controls and DAPM widgets/routes in the late_probe function. Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/1593596211-28344-1-git-send-email-brent.lu@intel.com Signed-off-by: Mark Brown commit 5cdfbdce5de6b5b56e104676409762fc1289a9c2 Author: Oscar Carter Date: Sat Jun 27 14:54:17 2020 +0200 s390/tty3270: remove function callback casts In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, remove all the function callback casts. To do this modify the function prototypes accordingly. Signed-off-by: Oscar Carter Message-Id: <20200627125417.18887-1-oscar.carter@gmx.com> Reviewed-by: Kees Cook [heiko.carstens@de.ibm.com: coding style changes] Signed-off-by: Heiko Carstens commit f05f62d04271faa265c7a4f75638ebc380d182fa Author: David Hildenbrand Date: Thu Jun 25 17:00:29 2020 +0200 s390/vmem: get rid of memory segment list I can't come up with a satisfying reason why we still need the memory segment list. We used to represent in the list: - boot memory - standby memory added via add_memory() - loaded dcss segments When loading/unloading dcss segments, we already track them in a separate list and check for overlaps (arch/s390/mm/extmem.c:segment_overlaps_others()) when loading segments. The overlap check was introduced for some segments in commit b2300b9efe1b ("[S390] dcssblk: add >2G DCSSs support and stacked contiguous DCSSs support.") and was extended to cover all dcss segments in commit ca57114609d1 ("s390/extmem: remove code for 31 bit addressing mode"). Although I doubt that overlaps with boot memory and standby memory are relevant, let's reshuffle the checks in load_segment() to request the resource first. This will bail out in case we have overlaps with other resources (esp. boot memory and standby memory). The order is now different compared to segment_unload() and segment_unload(), but that should not matter. This smells like a leftover from ancient times, let's get rid of it. We can now convert vmem_remove_mapping() into a void function - everybody ignored the return value already. Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Andrew Morton Signed-off-by: David Hildenbrand Message-Id: <20200625150029.45019-1-david@redhat.com> Reviewed-by: Gerald Schaefer Tested-by: Gerald Schaefer [DCSS] Signed-off-by: Heiko Carstens commit 66a049b764a71dc32031b7b533f98fc0299e6e11 Author: Sven Schnelle Date: Thu Jun 25 21:53:17 2020 +0200 s390/stp: allow group and users to read stp sysfs files There are no secrets in these files, so allow all users to read it. Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 9fc54012d7aec4b23f2042dc37b26738f3e68942 Author: Richard Guy Briggs Date: Tue Jun 30 18:17:07 2020 -0400 audit: remove unused !CONFIG_AUDITSYSCALL __audit_inode* stubs Added 14 years ago in commit 73241ccca0f7 ("[PATCH] Collect more inode information during syscall processing.") but never used however needlessly churned no less than 10 times since. Remove the unused __audit_inode* stubs in the !CONFIG_AUDITSYSCALL case. Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 3b619e3e2d1a89f383a0a0c527818dcb2bc66f92 Author: Rikard Falkeborn Date: Mon Jun 29 21:46:32 2020 +0200 regulator: qcom_spmi: Constify struct regulator_ops These are never modified, so make them const to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 20362 2592 152 23106 5a42 drivers/regulator/qcom_spmi-regulator.o After: text data bss dec hex filename 21814 1140 152 23106 5a42 drivers/regulator/qcom_spmi-regulator.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200629194632.8147-3-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 8d41df6469eec8d784137aeeebf87dca7460ce37 Author: Rikard Falkeborn Date: Mon Jun 29 21:46:31 2020 +0200 regulator: qcom_rpm: Constify struct regulator_ops These are never modified, so make them const to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 17485 500 8 17993 4649 drivers/regulator/qcom_rpm-regulator.o After: text data bss dec hex filename 17881 104 8 17993 4649 drivers/regulator/qcom_rpm-regulator.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200629194632.8147-2-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit c8a753484066a6382d2539d3dca1428164a682bf Author: Ondrej Jirman Date: Wed Jul 1 18:29:26 2020 +0200 drm/panel: st7703: Assert reset prior to powering down the regulators The reset pin is inverted, so if we don't assert reset, the actual gpio will be high and may keep driving the IO port of the panel. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij Tested-by: Guido Günther Reviewed-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-12-megous@megous.com commit 43fc6db016a01793a89904ec71793337961ae5b0 Author: Ondrej Jirman Date: Wed Jul 1 18:29:25 2020 +0200 drm/panel: st7703: Enter sleep after display off The datasheet suggests to issue sleep in after display off as a part of the panel's shutdown sequence. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij Tested-by: Guido Günther Reviewed-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-11-megous@megous.com commit 67680f87823e225fe150a7da7b10fc04496c4d76 Author: Ondrej Jirman Date: Wed Jul 1 18:29:24 2020 +0200 drm/panel: st7703: Add support for Xingbangda XBD599 Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel used in PinePhone. Add support for it. Signed-off-by: Icenowy Zheng Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij Tested-by: Guido Günther Reviewed-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-10-megous@megous.com commit e609fb1ea29d47f7d218dd7d53ae9da7c2d5c3d7 Author: Ondrej Jirman Date: Wed Jul 1 18:29:23 2020 +0200 drm/panel: st7703: Move generic part of init sequence to enable callback Calling sleep out and display on is a controller specific part of the initialization process. Move it out of the panel specific initialization function to the enable callback. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij Tested-by: Guido Günther Reviewed-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-9-megous@megous.com commit a14268a6420c4bf048f923f7c8663e6a817a9194 Author: Ondrej Jirman Date: Wed Jul 1 18:29:22 2020 +0200 drm/panel: st7703: Move code specific to jh057n closer together It's better than having it spread around the driver. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij Tested-by: Guido Günther Reviewed-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-8-megous@megous.com commit be6ca3393e863d6e7a70e825f32b987b7eb03794 Author: Ondrej Jirman Date: Wed Jul 1 18:29:21 2020 +0200 drm/panel: st7703: Prepare for supporting multiple panels Parametrize the driver so that it can support more panels based on st7703 controller. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij Tested-by: Guido Günther Reviewed-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-7-megous@megous.com commit 24489ba08c9e254dede3fe87bddd09ee9b6d6e4e Author: Ondrej Jirman Date: Wed Jul 1 18:29:20 2020 +0200 drm/panel: st7703: Rename functions from jh057n prefix to st7703 This is done so that code that's not specific to a particular jh057n panel is named after the controller. Functions specific to the panel are kept named after the panel. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij Tested-by: Guido Günther Reviewed-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-6-megous@megous.com commit a74e81a56405038782351e08050138c6df57d610 Author: Ondrej Jirman Date: Wed Jul 1 18:29:19 2020 +0200 drm/panel: rocktech-jh057n00900: Rename the driver to st7703 This rename is done so that the driver matches the name of the display controller and in preparation for adding support for more panels to the driver. This is just a basic file rename, with no code changes. Signed-off-by: Ondrej Jirman Reviewed-by: Linus Walleij Tested-by: Guido Günther Reviewed-by: Guido Günther Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-5-megous@megous.com commit 3955c0c4a99d95508a4cff4f8f53379e5ed39ddd Author: Ondrej Jirman Date: Wed Jul 1 18:29:18 2020 +0200 dt-bindings: panel: Add compatible for Xingbangda XBD599 panel Xingbangda XBD599 is a 5.99" 720x1440 MIPI-DSI LCD panel. It is based on Sitronix ST7703 LCD controller just like rocktech,jh057n00900. It is used in PinePhone. Add a compatible for it. Signed-off-by: Ondrej Jirman Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-4-megous@megous.com commit 7317f45744922071ddee43b7d46a3cd9758b1157 Author: Ondrej Jirman Date: Wed Jul 1 18:29:17 2020 +0200 dt-bindings: panel: Convert rocktech,jh057n00900 to yaml Convert Rocktech MIPI DSI panel driver from txt to yaml bindings. Signed-off-by: Ondrej Jirman Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-3-megous@megous.com commit 5f5df8b4253f12dbc0b9e328b3334ce28c16fc08 Author: Icenowy Zheng Date: Wed Jul 1 18:29:16 2020 +0200 dt-bindings: vendor-prefixes: Add Xingbangda Shenzhen Xingbangda Display Technology Co., Ltd is a company which produces LCD modules. It supplies the LCD panels for the PinePhone. Add the vendor prefix of it. Signed-off-by: Icenowy Zheng Signed-off-by: Ondrej Jirman Acked-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-2-megous@megous.com commit 3022c6a1b4b76c40aab9dcdf5142c501f3d3ae8c Author: Dan Williams Date: Thu Jun 25 16:51:03 2020 -0700 driver-core: Introduce DEVICE_ATTR_ADMIN_{RO,RW} A common pattern for using plain DEVICE_ATTR() instead of DEVICE_ATTR_RO() and DEVICE_ATTR_RW() is for attributes that want to limit read to only root. I.e. many users of DEVICE_ATTR() are specifying 0400 or 0600 for permissions. Given the expectation that CAP_SYS_ADMIN is needed to access these sensitive attributes and an explicit helper with the _ADMIN_ identifier for DEVICE_ATTR_ADMIN_{RO,RW}. Cc: "Rafael J. Wysocki" Signed-off-by: Dan Williams Link: https://lore.kernel.org/r/159312906372.1850128.11611897078988158727.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Greg Kroah-Hartman commit a824bab7c62d7ecd8ccfe9693da7ccb7e4683760 Author: Wesley Cheng Date: Fri Jun 26 11:55:15 2020 -0700 regulator: Add dt-binding for QCOM PMIC VBUS output regulator This describes how to enable the Qualcomm PMIC VBUS booster used for providing power to connected USB peripherals when the USB role is host mode. The driver itself will register the vbus_usb regulator, so that external drivers can utilize the enable/disable regulator APIs. Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20200626185516.18018-6-wcheng@codeaurora.org Signed-off-by: Mark Brown commit 4fe66d5a62fbe1b050e783e7a01f986632c08c44 Author: Wesley Cheng Date: Fri Jun 26 11:55:14 2020 -0700 regulator: Add support for QCOM PMIC VBUS booster Some Qualcomm PMICs have the capability to source the VBUS output to connected peripherals. This driver will register a regulator to the regulator list to enable or disable this source by an external driver. Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20200626185516.18018-5-wcheng@codeaurora.org Signed-off-by: Mark Brown commit 6bf0eb5504529cdf50a24135e4c4442a093c06d6 Author: John Garry Date: Wed Jul 1 16:06:25 2020 +0800 sbitmap: Consider cleared bits in sbitmap_bitmap_show() sbitmap works by maintaining separate bitmaps of set and cleared bits. The set bits are cleared in a batch, to save the burden of continuously locking the "word" map to unset. sbitmap_bitmap_show() only shows the set bits (in "word"), which is not too much use, so mask out the cleared bits. Fixes: ea86ea2cdced ("sbitmap: ammortize cost of clearing bits") Signed-off-by: John Garry Signed-off-by: Jens Axboe commit a2b782d59c57cb6f673dbb4804ffc500336d7a54 Merge: eb83aa46dcb81 6748d05590594 Author: Mark Brown Date: Wed Jul 1 17:21:09 2020 +0100 Merge series "ASoC: ti: Add support for audio on J721e EVM" from Peter Ujfalusi : Hi, Changes since v3: - Fix the single clock source handling and typo Changes since v2: - DT binding: - use proper (?) patch subject for the binding docuemtn patch - drop pll4 and pll15 from DT - driver should check the rate via clk_get_parent. If it is not available (as it is not currently) then use the match_data provided rates. - add simple explanation for the clocking setup - Use descriptive names for clocks: cpb/ivi-mcasp-auxclk and cpb/ivi-codec-scki - dt_binding_check shows no errors/warnings - ASoC machine driver: - Try to read the PLL4/15 rate with clk API (parent of the two clock divider) if it is not available then use the match_data provided numbers. - Support for single PLL setup Changes since v1: - Fixed DT binding documentation errors - Rebased on ASoC head and updated the driver to compile and work This series adds support for the analog audio setup on the j721e EVM. The audio setup of the EVM is: Common Processor Board (CPB): McASP10 <-> pcm3168a Infotainment Expansion Board (IVI): McASP0 <-> 2x pcm3168a Both CPB and IVI wired in parallel serializer setup. The first patch adds the stream_name for McASP driver as it is needed in multicodec (and would be needed in DPCM) setup for proper DAPM handling. The second patch adds two DT schema, one for the cpb and one for the cpb+ivi card. Regards, Peter --- Peter Ujfalusi (3): ASoC: ti: davinci-mcasp: Specify stream_name for playback/capture ASoC: dt-bindings: Add documentation for TI j721e EVM (CPB and IVI) ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI) .../bindings/sound/ti,j721e-cpb-audio.yaml | 95 ++ .../sound/ti,j721e-cpb-ivi-audio.yaml | 150 +++ sound/soc/ti/Kconfig | 8 + sound/soc/ti/Makefile | 2 + sound/soc/ti/davinci-mcasp.c | 3 + sound/soc/ti/j721e-evm.c | 896 ++++++++++++++++++ 6 files changed, 1154 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/ti,j721e-cpb-audio.yaml create mode 100644 Documentation/devicetree/bindings/sound/ti,j721e-cpb-ivi-audio.yaml create mode 100644 sound/soc/ti/j721e-evm.c -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki commit eb83aa46dcb8198708787b969eee1ba0e5ca0be7 Author: Kuninori Morimoto Date: Fri Jun 19 14:33:36 2020 +0900 ARM: dts: motorola-mapphone-common: remove unneeded "simple-graph-card" Audio Graph Card is using "audio-graph-card" prefix instead of "simple-graph-card", and moreover "widgets / routing" doesn't need it. This patch removes unsupported "simple-graph-card" prefix from motorola-mapphone-common.dtsi and vendor-prefixes.yaml. Signed-off-by: Kuninori Morimoto Reviewed-by: Sebastian Reichel Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/87r1ub39hq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d0250cf4f2abfbea64ed247230f08f5ae23979f0 Author: Shengjiu Wang Date: Tue Jun 30 21:56:07 2020 +0800 ASoC: fsl_asrc: Add an option to select internal ratio mode The ASRC not only supports ideal ratio mode, but also supports internal ratio mode. For internal rato mode, the rate of clock source should be divided with no remainder by sample rate, otherwise there is sound distortion. Add function fsl_asrc_select_clk() to find proper clock source for internal ratio mode, if the clock source is available then internal ratio mode will be selected. With change, the ideal ratio mode is not the only option for user. Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1593525367-23221-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 820d7fcb23c189e87bfe8c95a6e7215d873e5082 Author: Akshu Agrawal Date: Wed Jul 1 00:07:46 2020 +0530 ASoC: amd: Enable interrupt in dma_open Fixes interrupt enable condition check with which now interrupt gets enabled in dma_open. Prior to this patch it was getting enabled in runtime_resume only. Signed-off-by: Akshu Agrawal Link: https://lore.kernel.org/r/20200630183754.20641-1-akshu.agrawal@amd.com Signed-off-by: Mark Brown commit 88ba5f4a642e4fb6ab7058254967f55375ca068d Author: Fabio Estevam Date: Tue Jun 30 19:30:20 2020 -0300 ASoC: dt-bindings: simple-card: Fix 'make dt_binding_check' warnings The following build warnings are seen with 'make dt_binding_check': Documentation/devicetree/bindings/sound/simple-card.example.dts:209.46-211.15: Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@0: node has a unit name, but no reg or ranges property Documentation/devicetree/bindings/sound/simple-card.example.dts:213.37-215.15: Warning (unit_address_vs_reg): /example-4/sound/simple-audio-card,cpu@1: node has a unit name, but no reg or ranges property Documentation/devicetree/bindings/sound/simple-card.example.dts:250.42-261.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@0: node has a unit name, but no reg or ranges property Documentation/devicetree/bindings/sound/simple-card.example.dts:263.42-288.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1: node has a unit name, but no reg or ranges property Documentation/devicetree/bindings/sound/simple-card.example.dts:270.32-272.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@0: node has a unit name, but no reg or ranges property Documentation/devicetree/bindings/sound/simple-card.example.dts:273.23-275.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@1: node has a unit name, but no reg or ranges property Documentation/devicetree/bindings/sound/simple-card.example.dts:276.23-278.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@2: node has a unit name, but no reg or ranges property Documentation/devicetree/bindings/sound/simple-card.example.dts:279.23-281.19: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@1/cpu@3: node has a unit name, but no reg or ranges property Documentation/devicetree/bindings/sound/simple-card.example.dts:290.42-303.15: Warning (unit_address_vs_reg): /example-5/sound/simple-audio-card,dai-link@2: node has a unit name, but no reg or ranges property Fix them all. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20200630223020.25546-1-festevam@gmail.com Signed-off-by: Mark Brown commit 9a7794bd4a28e274f9f247f1ea230f2f0f1077a2 Author: Nathan Chancellor Date: Tue Jun 16 18:02:32 2020 -0700 ASoC: Intel: KeemBay: Fix header guard Clang warns: In file included from sound/soc/intel/keembay/kmb_platform.c:14: sound/soc/intel/keembay/kmb_platform.h:9:9: warning: 'KMB_PLATFORM_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] #ifndef KMB_PLATFORM_H_ ^~~~~~~~~~~~~~~ sound/soc/intel/keembay/kmb_platform.h:10:9: note: 'KMB_PLATFORMP_H_' is defined here; did you mean 'KMB_PLATFORM_H_'? #define KMB_PLATFORMP_H_ ^~~~~~~~~~~~~~~~ KMB_PLATFORM_H_ 1 warning generated. Fix the typo so that the header guard works as intended. Fixes: c5477e966728 ("ASoC: Intel: Add KeemBay platform driver") Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Cc: Sia, Jee Heng ; alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org; clang-built-linux@googlegroups.com; Nathan Chancellor Link: https://github.com/ClangBuiltLinux/linux/issues/1053 To: Rojewski, Cezary ; Pierre-Louis Bossart ; Liam Girdwood ; Jie Yang ; Mark Brown Link: https://lore.kernel.org/r/20200617010232.23222-1-natechancellor@gmail.com Signed-off-by: Mark Brown commit 9308a3c92642cddb9ef89cc4014282cf14f2e2d2 Author: Fabio Estevam Date: Tue Jun 30 19:44:59 2020 -0300 ASoC: dt-bindings: keembay-i2s: Fix reg descriptions intel,keembay-i2s has two register regions: - I2S registers - I2S gen configuration Describe these regions accordingly to fix the following warning seen with 'make dt_binding_check': Documentation/devicetree/bindings/sound/intel,keembay-i2s.example.dt.yaml: example-0: i2s@20140000:reg:0: [538181632, 512, 539623588, 4] is too long Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20200630224459.27174-1-festevam@gmail.com Signed-off-by: Mark Brown commit d8d702e19e997cf3f172487e0659d0e68aa5ede5 Author: Shengjiu Wang Date: Mon Jun 29 14:42:33 2020 +0800 ASoC: fsl_sai: Refine regcache usage with pm runtime When there is dedicated power domain bound with device, after probing the power will be disabled, then registers are not accessible in fsl_sai_dai_probe(), so regcache only need to be enabled in end of probe() and regcache_mark_dirty should be moved to pm runtime resume callback function. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1593412953-10897-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 585dfab3fb80e67b3a54790b3d5ef2991feb3950 Author: Cristian Marussi Date: Wed Jul 1 16:53:48 2020 +0100 firmware: arm_scmi: Add base notifications support Make SCMI base protocol register with the notification core. Link: https://lore.kernel.org/r/20200701155348.52864-10-cristian.marussi@arm.com Reviewed-by: Jonathan Cameron Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 469ca1822d64e4a786935576edb696c52119aa11 Author: Cristian Marussi Date: Wed Jul 1 16:53:47 2020 +0100 firmware: arm_scmi: Add reset notifications support Make SCMI reset protocol register with the notification core. Link: https://lore.kernel.org/r/20200701155348.52864-9-cristian.marussi@arm.com Reviewed-by: Jonathan Cameron Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 128e3e9311a95bab6b267b7a93eb9ebe2347dbda Author: Cristian Marussi Date: Wed Jul 1 16:53:46 2020 +0100 firmware: arm_scmi: Add sensor notifications support Make SCMI sensor protocol register with the notification core. Link: https://lore.kernel.org/r/20200701155348.52864-8-cristian.marussi@arm.com Reviewed-by: Jonathan Cameron Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit fb5086dc4746184a9325fc25411226a750fb252c Author: Cristian Marussi Date: Wed Jul 1 16:53:45 2020 +0100 firmware: arm_scmi: Add perf notifications support Make SCMI perf protocol register with the notification core. Link: https://lore.kernel.org/r/20200701155348.52864-7-cristian.marussi@arm.com Reviewed-by: Jonathan Cameron Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit e27077bc04d5a2e09a0860ca086e1d55adf6a16d Author: Cristian Marussi Date: Wed Jul 1 16:53:44 2020 +0100 firmware: arm_scmi: Add power notifications support Make SCMI power protocol register with the notification core. Link: https://lore.kernel.org/r/20200701155348.52864-6-cristian.marussi@arm.com Reviewed-by: Jonathan Cameron Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 6b8a69131dc63df2eab3fc6f5f91b60bdd5301ff Author: Cristian Marussi Date: Wed Jul 1 16:53:43 2020 +0100 firmware: arm_scmi: Enable notification core Initialize and enable SCMI notifications core support during bus/driver probe phase, so that protocols can start registering their supported events during their initialization. Link: https://lore.kernel.org/r/20200701155348.52864-5-cristian.marussi@arm.com Reviewed-by: Jonathan Cameron Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit bd31b249692e256ab92e1a4339e42af0e4971738 Author: Cristian Marussi Date: Wed Jul 1 16:53:42 2020 +0100 firmware: arm_scmi: Add notification dispatch and delivery Add the core SCMI notifications dispatch and delivery support logic which is able to dispatch well-known received events from the Rx interrupt handler to the dedicated deferred worker. From there, it will deliver the events to the registered users' callbacks. Dispatch and delivery support is just added here, still not enabled. Link: https://lore.kernel.org/r/20200701155348.52864-4-cristian.marussi@arm.com Reviewed-by: Jonathan Cameron Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit e7c215f358a350c4bc326b9cea86763f480a97f9 Author: Cristian Marussi Date: Wed Jul 1 16:53:41 2020 +0100 firmware: arm_scmi: Add notification callbacks-registration Add the core SCMI notifications callbacks-registration support: allow users to register their own callbacks against the desired events. Whenever a registration request is issued against a still non existent event, mark such request as pending for later processing, in order to account for possible late initializations of SCMI Protocols associated to loadable drivers. Link: https://lore.kernel.org/r/20200701155348.52864-3-cristian.marussi@arm.com Reviewed-by: Jonathan Cameron Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 1fc2dd1864c2b18860fb619caeee758504c3aac8 Author: Cristian Marussi Date: Wed Jul 1 16:53:40 2020 +0100 firmware: arm_scmi: Add notification protocol-registration Add the core SCMI notifications protocol-registration support: allow protocols to register their own set of supported events, during their initialization phase. Notification core can track multiple platform instances by their handles. Link: https://lore.kernel.org/r/20200701155348.52864-2-cristian.marussi@arm.com Reviewed-by: Jonathan Cameron Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit fd7a9d8fa1aa4aed276ae3f12db74db9b5b33455 Author: Ville Syrjälä Date: Wed Apr 29 13:10:33 2020 +0300 drm/i915: Fix g4x fbc watermark enable 'level' here means the highest level we can't use, so when checking the fbc watermarks we need a -1 to get at the last enabled level. While at if refactor the code a bit to declutter g4x_compute_pipe_wm(). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200429101034.8208-12-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 6b207d66aa9fad0deed13d5f824e1ea193b0a777 Author: Randy Dunlap Date: Tue Jun 30 10:29:10 2020 -0700 bpf: Fix net/core/filter build errors when INET is not enabled Fix build errors when CONFIG_INET is not set/enabled. (.text+0x2b1b): undefined reference to `tcp_prot' (.text+0x2b3b): undefined reference to `tcp_prot' Signed-off-by: Randy Dunlap Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/b1a858ec-7e04-56bc-248a-62cb9bbee726@infradead.org commit efa30b82ac7553c25405ac56034aecf03c182033 Author: Puranjay Mohan Date: Wed Jul 1 20:24:57 2020 +0530 staging: rtl8188eu: core: Fix coding style issue Use %s and __func__ in place of function names. This solves following checkpatch.pl warning WARNING: Prefer using '"%s...", __func__' to using 'rtw_do_join', this function's name, in a string Signed-off-by: Puranjay Mohan Link: https://lore.kernel.org/r/20200701145457.9562-1-puranjay12@gmail.com Signed-off-by: Greg Kroah-Hartman commit 64f0013c073a0162a6bd31b33def10cb2b2fe6e0 Merge: bba1dc0b55ac4 c7568114bc56c Author: Alexei Starovoitov Date: Wed Jul 1 08:22:09 2020 -0700 Merge branch 'bpf_get_task_stack' Song Liu says: ==================== This set introduces a new helper bpf_get_task_stack(). The primary use case is to dump all /proc/*/stack to seq_file via bpf_iter__task. A few different approaches have been explored and compared: 1. A simple wrapper around stack_trace_save_tsk(), as v1 [1]. This approach introduces new syntax, which is different to existing helper bpf_get_stack(). Therefore, this is not ideal. 2. Extend get_perf_callchain() to support "task" as argument. This approach reuses most of bpf_get_stack(). However, extending get_perf_callchain() requires non-trivial changes to architecture specific code. Which is error prone. 3. Current (v2) approach, leverages most of existing bpf_get_stack(), and uses stack_trace_save_tsk() to handle architecture specific logic. [1] https://lore.kernel.org/netdev/20200623070802.2310018-1-songliubraving@fb.com/ Changes v4 => v5: 1. Rebase and work around git-am issue. (Alexei) 2. Update commit log for 4/4. (Yonghong) Changes v3 => v4: 1. Simplify the selftests with bpf_iter.h. (Yonghong) 2. Add example output to commit log of 4/4. (Yonghong) Changes v2 => v3: 1. Rebase on top of bpf-next. (Yonghong) 2. Sanitize get_callchain_entry(). (Peter) 3. Use has_callchain_buf for bpf_get_task_stack. (Andrii) 4. Other small clean up. (Yonghong, Andrii). Changes v1 => v2: 1. Reuse most of bpf_get_stack() logic. (Andrii) 2. Fix unsigned long vs. u64 mismatch for 32-bit systems. (Yonghong) 3. Add %pB support in bpf_trace_printk(). (Daniel) 4. Fix buffer size to bytes. ==================== Signed-off-by: Alexei Starovoitov commit c7568114bc56cf3ec0bd9eb117bbe7cad3d30e11 Author: Song Liu Date: Mon Jun 29 23:28:46 2020 -0700 selftests/bpf: Add bpf_iter test with bpf_get_task_stack() The new test is similar to other bpf_iter tests. It dumps all /proc//stack to a seq_file. Here is some example output: pid: 2873 num_entries: 3 [<0>] worker_thread+0xc6/0x380 [<0>] kthread+0x135/0x150 [<0>] ret_from_fork+0x22/0x30 pid: 2874 num_entries: 9 [<0>] __bpf_get_stack+0x15e/0x250 [<0>] bpf_prog_22a400774977bb30_dump_task_stack+0x4a/0xb3c [<0>] bpf_iter_run_prog+0x81/0x170 [<0>] __task_seq_show+0x58/0x80 [<0>] bpf_seq_read+0x1c3/0x3b0 [<0>] vfs_read+0x9e/0x170 [<0>] ksys_read+0xa7/0xe0 [<0>] do_syscall_64+0x4c/0xa0 [<0>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Note: bpf_iter test as-is doesn't print the contents of the seq_file. To see the example above, it is necessary to add printf() to do_dummy_read. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200630062846.664389-5-songliubraving@fb.com commit 2df6bb5493f83c7e818f66c384ea337c1b3da228 Author: Song Liu Date: Mon Jun 29 23:28:45 2020 -0700 bpf: Allow %pB in bpf_seq_printf() and bpf_trace_printk() This makes it easy to dump stack trace in text. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200630062846.664389-4-songliubraving@fb.com commit fa28dcb82a38f8e3993b0fae9106b1a80b59e4f0 Author: Song Liu Date: Mon Jun 29 23:28:44 2020 -0700 bpf: Introduce helper bpf_get_task_stack() Introduce helper bpf_get_task_stack(), which dumps stack trace of given task. This is different to bpf_get_stack(), which gets stack track of current task. One potential use case of bpf_get_task_stack() is to call it from bpf_iter__task and dump all /proc//stack to a seq_file. bpf_get_task_stack() uses stack_trace_save_tsk() instead of get_perf_callchain() for kernel stack. The benefit of this choice is that stack_trace_save_tsk() doesn't require changes in arch/. The downside of using stack_trace_save_tsk() is that stack_trace_save_tsk() dumps the stack trace to unsigned long array. For 32-bit systems, we need to translate it to u64 array. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200630062846.664389-3-songliubraving@fb.com commit d141b8bc5773cbbaf5b8530f08f94fc10fff9e8c Author: Song Liu Date: Mon Jun 29 23:28:43 2020 -0700 perf: Expose get/put_callchain_entry() Sanitize and expose get/put_callchain_entry(). This would be used by bpf stack map. Suggested-by: Peter Zijlstra Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200630062846.664389-2-songliubraving@fb.com commit 167234268cf6cb932ffb180586f3874ae3293a55 Author: Steven Rostedt (VMware) Date: Wed Jul 1 11:09:23 2020 -0400 ktest.pl: Add a NOT operator There is a NOT DEFINED operator, but there is not an operator that can negate any other expression. For example: NOT (${FOO} == boot || ${BAR} == run) Add the keyword NOT to allow the ktest.pl config files to negate operators. Signed-off-by: Steven Rostedt (VMware) commit bba1dc0b55ac462d24ed1228ad49800c238cd6d7 Author: Alexei Starovoitov Date: Mon Jun 29 21:33:39 2020 -0700 bpf: Remove redundant synchronize_rcu. bpf_free_used_maps() or close(map_fd) will trigger map_free callback. bpf_free_used_maps() is called after bpf prog is no longer executing: bpf_prog_put->call_rcu->bpf_prog_free->bpf_free_used_maps. Hence there is no need to call synchronize_rcu() to protect map elements. Note that hash_of_maps and array_of_maps update/delete inner maps via sys_bpf() that calls maybe_wait_bpf_programs() and synchronize_rcu(). Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Paul E. McKenney Link: https://lore.kernel.org/bpf/20200630043343.53195-2-alexei.starovoitov@gmail.com commit 1c59c2d95d3160a2af4a8655d19f56648b2dffa3 Author: Tobias Klauser Date: Wed Jul 1 16:10:17 2020 +0200 phy: zynqmp: Fix unused-function compiler warning Mark xpsgtr_suspend and xpsgtr_resume as __maybe_unused to fix the following compiler warning when building with !CONFIG_PM_SLEEP: drivers/phy/xilinx/phy-zynqmp.c:830:12: warning: ‘xpsgtr_resume’ defined but not used [-Wunused-function] 830 | static int xpsgtr_resume(struct device *dev) | ^~~~~~~~~~~~~ drivers/phy/xilinx/phy-zynqmp.c:819:12: warning: ‘xpsgtr_suspend’ defined but not used [-Wunused-function] 819 | static int xpsgtr_suspend(struct device *dev) | ^~~~~~~~~~~~~~ Also drop the existing #ifdef CONFIG_PM so the functions are always compile-checked regardless of CONFIG_PM and/or CONFIG_PM_SLEEP being set. Reviewed-by: Laurent Pinchart Signed-off-by: Tobias Klauser Link: https://lore.kernel.org/r/20200701141017.26931-1-tklauser@distanz.ch Signed-off-by: Vinod Koul commit d53cdda3fda6e737151e091c7d9388c31a73c828 Author: Steven Rostedt (VMware) Date: Wed Jul 1 10:32:28 2020 -0400 ktest.pl: Define PRE_TEST_DIE to kill the test if the PRE_TEST fails Currently, if a PRE_TEST is defined and ran, but fails, there's nothing currently available to make the test fail too. Add a PRE_TEST_DIE option that when set, if a PRE_TEST is defined and fails, the test will die too. Signed-off-by: Steven Rostedt (VMware) commit 2f059db0b8313f8964ac917394e7425d966a6884 Author: Steven Rostedt (VMware) Date: Wed Jul 1 10:28:23 2020 -0400 ktest.pl: Always show log file location if defined even on success If a log file is defined and the test were to error, a print statement is made that shows the user where the log file is to examine it further. But this is not done if the test were to succeed. I find it annoying that it does not show where the log file is on success, as I run several different tests that place their log files in various locations, and even though the test pass, there's things I want to look at in the log file (like warnings). It is much easier to find where the log file is, if it is displayed at the end of a test. Signed-off-by: Steven Rostedt (VMware) commit 6748d05590594837e42dfa975879fb275099f0b2 Author: Peter Ujfalusi Date: Tue Jun 30 15:58:43 2020 +0300 ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI) The audio support on the board is using pcm3168a codec connected to McASP10 serializers in parallel setup. The pcm3168a SCKI clock is coming via the j721e AUDIO_REFCLK2 pin. In order to support 48KHz and 44.1KHz family of sampling rates the parent clock for AUDIO_REFCLK2 needs to be changed between PLL4 (for 48KHz) and PLL15 (for 44.1KHz). The same PLLs are used for McASP10's AUXCLK clock via different HSDIVIDER. Generic card can not be used for the board as we need to switch between clock paths for different sampling rate families and also need to change the slot_width between 16 and 24 bit audio. The audio support on the Infotainment Expansion Board consists of McASP0 connected to two pcm3168a codecs with dedicated set of serializers to each. The SCKI for pcm3168a is sourced from j721e AUDIO_REFCLK0 pin. It is extending the audio support on the CPB. Due to the fact that the same PLL4/15 is used by both domains (CPB/IVI) there are cross restriction on sampling rates. The IVI side is represented as multicodec setup. PCMs available on a plain CPB (no IVI addon): hw:0,0 - cpb playback (8 channels) hw:0,1 - cpb capture (6 channels) When the IVI addon is present, additional two PCMs will be present: hw:0,2 - ivi multicodec playback (16 channels) hw:0,3 - ivi multicodec capture (12 channels) Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200630125843.11561-4-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 8142500e7dc0d214e3c7a22788116f71cd84f07b Author: Peter Ujfalusi Date: Tue Jun 30 15:58:42 2020 +0300 ASoC: dt-bindings: Add documentation for TI j721e EVM (CPB and IVI) The audio support on the Common Processor Board board is using pcm3168a codec connected to McASP10 serializers in parallel setup. The Infotainment board plugs into the Common Processor Board, the support of the extension board is extending the CPB audio support by adding the two codecs on the expansion board. The audio support on the Infotainment Expansion Board consists of McASP0 connected to two pcm3168a codecs with dedicated set of serializers to each. The SCKI for pcm3168a is sourced from j721e AUDIO_REFCLK0 pin. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200630125843.11561-3-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit ef3ab250aad9920fa7fd6280051c92a488109b87 Author: Peter Ujfalusi Date: Tue Jun 30 15:58:41 2020 +0300 ASoC: ti: davinci-mcasp: Specify stream_name for playback/capture In order to dai stream widgets to be created the stream_name must be set. Signed-off-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20200630125843.11561-2-peter.ujfalusi@ti.com Signed-off-by: Mark Brown commit 1008fe6dc36dd87dfd02d4307f49162f0b4f1665 Author: Christoph Hellwig Date: Fri Jun 26 10:01:58 2020 +0200 block: remove the all_bdevs list Instead just iterate over the inodes for the block device superblock. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 47b5e00322a3033851ab304f3c3873aebdfb4979 Author: Christoph Hellwig Date: Fri Jun 26 10:01:57 2020 +0200 block: remove the unused bd_private field from struct block_device Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e556f6ba10f0f3c3484a1597382ceaec1e7bc700 Author: Christoph Hellwig Date: Fri Jun 26 10:01:56 2020 +0200 block: remove the bd_queue field from struct block_device Just use bd_disk->queue instead. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6b7b181b67aa8177e57732723106a0411570a86d Author: Christoph Hellwig Date: Fri Jun 26 10:01:55 2020 +0200 block: remove the bd_block_size field from struct block_device We can trivially calculate the block size from the inodes i_blkbits variable. Use that instead of keeping two redundant copies of the information in slightly different formats. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 5ff9f19231a0e670b3d79c563f1b0b185abeca91 Author: Christoph Hellwig Date: Fri Jun 26 10:01:54 2020 +0200 block: simplify set_init_blocksize The loop to increase the initial block size doesn't really make any sense, as the AND operation won't match for powers of two if it didn't for the initial block size. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 9011495c9466ca0aaee2741f98d50ac2ca8cee11 Author: Christoph Hellwig Date: Fri Jun 26 10:01:53 2020 +0200 dcssblk: don't set bd_block_size in ->open bd_block_size contains a value that matches the logic block size when opening, so the statement is redundant. Even if it wasn't the dumb assignment would cause a a mismatch with bd_inode->i_blkbits. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit fe4ec12e1865a2114056b799e4869bf4c30e47df Author: Christoph Hellwig Date: Fri Jun 26 10:01:52 2020 +0200 floppy: use block_size Use the block_size helper instead of open coding it. Also remove the check for a 0 block size, as that can't happen. Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 574ba3667891b432f92478a02f686bb779a1e593 Author: Laurent Pinchart Date: Wed Jul 1 16:48:53 2020 +0300 dt-bindings: phy: zynqmp-psgtr: Fix example's numbers of cells in reg The DT examples are by default compiled in a parent that has #address-cells and #size-cells both set to 1. Fix the example accordingly, even if it doesn't match the actual hardware, as this is the recommended practice for DT bindings examples. Fixes: cea0f76a483d ("dt-bindings: phy: Add DT bindings for Xilinx ZynqMP PSGTR PHY") Signed-off-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200701134853.30656-1-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit 6e2fa4dd683a22a7697e7ff51dad499406094d28 Author: Hongnan Li Date: Wed Jul 1 16:09:38 2020 +0800 blk-iolatency: only call ktime_get() if needed ktime_to_ns(ktime_get()), which is expensive, does not need to be called if blk_iolatency_enabled() return false in blkcg_iolatency_done_bio(). Postponing ktime_to_ns(ktime_get()) execution reduces the CPU usage when blk_iolatency is disabled. Signed-off-by: Hongnan Li Signed-off-by: Jens Axboe commit 4d3ec936f80dbb2174c8c1f426eb86c032e9f14e Author: Johan Hovold Date: Tue Jun 30 10:39:48 2020 +0200 mfd: lm3533: Expand control-bank accessors Expand the control-bank accessors that were implemented using macros. This allows the definitions of these exported functions to be found more easily and specifically avoids a W=1 compiler warning due to the redundant brightness sanity check: drivers/mfd/lm3533-ctrlbank.c: In function 'lm3533_ctrlbank_set_brightness': drivers/mfd/lm3533-ctrlbank.c:98:10: warning: comparison is always false due to limited range of data type [-Wtype-limits] 98 | if (val > LM3533_##_NAME##_MAX) \ | ^ drivers/mfd/lm3533-ctrlbank.c:125:1: note: in expansion of macro 'lm3533_ctrlbank_set' 125 | lm3533_ctrlbank_set(brightness, BRIGHTNESS); | ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Johan Hovold Signed-off-by: Lee Jones commit c4199169a510db57d0a1fd2c2c295b6b1dcfad84 Author: Simon Fong Date: Tue Jun 30 10:22:28 2020 +0800 staging: rtl8188eu: core: Fix WARNING of Block comments Fixed a WARNING of Block comments use * on subsequent lines. Signed-off-by: Simon Fong Link: https://lore.kernel.org/r/20200630022228.GA580@simon-pc Signed-off-by: Greg Kroah-Hartman commit 2ad4ba07ef1d40a91490ec23c125edd63d68dfda Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:45 2020 +0200 staging: vchiq: Move vchiq.h into include directory To make the separation clear between vchiq's header files and vchiq.h, which is to be used by services and is the 'public' API, move it into a dedicated includes directory. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-48-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 5ada309f4a5f2b317192c469464931be43d10a99 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:44 2020 +0200 staging: vchiq: Move defines into core header Those are only used in the core vchiq code, while present in vchiq's 'public' API header. Move them into the right place. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-47-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit dcfbf457ae70e21bc2e332ee02943f87f79c4ad9 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:43 2020 +0200 staging: vchiq: Use vchiq.h as the main header file for services This used to be vchiq_if.h but vchiq.h is more concise for an include file that will hopefully be in the future in the includes directory. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-46-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 3d212a835ccad24e88a76426f1bef8b1b1836b04 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:42 2020 +0200 staging: vchiq: Move conditional barrier definition into vchiq_core.h The barrier is only used by core code. So keep the barrier definition in the core header. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-45-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 9d52311134e969c9cb7ef95c0a6a91b3199441b8 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:41 2020 +0200 staging: vchiq: Get rid of vchi All the functions that vchi currently provides are a 1:1 mapping to its vchiq counterparts. Get rid of vchi altogether and use vchiq's on all services. In the process also get rid of the vchi directory, as the only remaining file was a TODO file, which now lives in the parent directory. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-44-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 5c01fc5c0084e1cb0742cb2a5b704f929733125a Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:40 2020 +0200 staging: vchi: Move vchi_queue_kernel_message() into vchiq We can't really merge it with vchiq_queue_message() as it has internal users that will not benefit from the retry mechanism vchiq_queue_kernel_message() uses. So, for the sake of getting rid of vchi, move it into vchiq. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-43-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 0bda14fd49a6d0fafa554c87b2167cdd8ee40b6c Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:39 2020 +0200 staging: vchi: Get rid of vchi_bulk_queue_transmit() Its vchiq counterpart, vchiq_bulk_transmit() is only used by vchi. We can then merge both functions by moving vchi_bulk_queue_transmit()'s retry mechanism into vchiq_bulk_transmit() and let services call the later. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-42-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit b2bbe3dc7667b20b5621211eb827f6b1afed76ca Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:38 2020 +0200 staging: vchi: Get rid of vchi_bulk_queue_receive() Its vchiq counterpart, vchiq_bulk_receive() is only used by vchi. We can then merge both functions by moving vchi_bulk_queue_receive()'s retry mechanism into vchiq_bulk_receive() and let services call the later. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-41-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 76dbbe7706f4055ff95fe36901297a1acd7d04f1 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:37 2020 +0200 staging: vchiq: Move definitions only used by core into core header vchiq_if.h is used by service consumers and only the exported API should be present. Move the rest of definitions, which were not exported by the way, to vchiq_core.h where they belong. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-40-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 9f10ddbd6fa41b3151a58eeb8702db8d07f6729e Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:36 2020 +0200 staging: vchiq: Make vchiq_add_service() local The function is being exported although there is no use for it outside of vchiq's core code. Keep it local then. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-39-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit af948db0211dfb1658bd370dd02c4fbb0a627bba Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:35 2020 +0200 staging: vchiq: Get rid of unnecessary definitions in vchiq_if.h Those functions don't actually exist, nor have any use, nor the macros. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-38-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 67a3f7df2195da289d28d2d3d937dce2602f6e47 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:34 2020 +0200 staging: vchi: Don't include vchiq_core.h This file is internal to vchiq. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-37-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 1a883994efb2582481796fdc37879826f7b1bb75 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:33 2020 +0200 staging: vchi: Get rid of struct vchiq_instance forward declaration It's already forward declared in vchiq_if.h. So no need to insist Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-36-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit b06eba5c525aede4ff14dbda1fededc0f71822d6 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:32 2020 +0200 staging: vchiq: Unify fourcc definition mechanisms There is already enough duplication with regard to fourcc generation in the kernel. Let's at least use the same macro all over the vchiq ecosystem. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-35-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit b1d362f408e28220f02d0d73351dc3fa94923c5d Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:31 2020 +0200 staging: vchi: Rework vchi_msg_hold() to match vchiq_msg_hold() The services have access to struct vchiq_header's internals, so we can let them get the data pointer. This pretty much makes both functions exactly the same, which will allow us to make a switch to vchiq_msg_hold() further down the road. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-34-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 7c018ed10c07f5cd16e8ef661514232e111071cf Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:30 2020 +0200 staging: vchiq: Pass vchiq's message when holding a message vchi created an opaque structure to be held by services while they process callback messages. The contents of this opaque structure are the service handle, which all services already maintain, and a pointer to vchiq's message structure, struct vchiq_header. Let's get rid of this opaque structure and directly pass struct vchiq_header, which is what ultimately vchiq consumes when handling callback messages. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-33-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 3a8895a9219f6b58d006546c40c1addb764a7c1d Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:29 2020 +0200 staging: vchi: Get rid of struct vchi_service The structure only contains a single parameter, which is the underlying vchiq handle. Get rid of the struct and directly pass the handle around. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-32-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 65c7536672b9ee82da399eed6f5f4f658012c758 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:28 2020 +0200 staging: vchi: Use struct vchiq_service_params For initialization, vchi has its own params structure, which is then translated to vchiq's params structure. They are essentially the same, so lets directly use vchiq's. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-31-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 47cc5b16b04f337e1b0378ec5c8c8fbf2dd92a6a Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:27 2020 +0200 staging: vchiq: Don't use a typedef for vchiq_callback Linux coding style says to avoid typdefs. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-30-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 3c5da06f9969959f5cd85e8baaef9d96059b3924 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:26 2020 +0200 staging: vchi: Get rid of vchiq_shim's message callback As vchiq_shim's callback does nothing aside from pushing messages into the service's queue, let's bypass it and jump directly to the service's callbacks, letting them choose whether to use the message queue. It turns out most services don't need to use the message queue, which makes for simpler code in the end. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-29-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit b79134e9de28dd6ca7627a9bae2fa4bfb382ad64 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:25 2020 +0200 staging: vchiq: Export vchiq_msg_queue_push vchiq consumer drivers may need to use this function in order to get the benefits of vchiq's per service message queueing mechanism. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-28-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 31eeca20b75bdc2a62f9b2410ca5cf6f173735f4 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:24 2020 +0200 staging: vchiq: Export vchiq_get_service_userdata() This is for service's callbacks to get their private data. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-27-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 823568cf170477ce6f71379193fa95b339757759 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:23 2020 +0200 staging: vchi: Expose struct vchi_service This will make further changes easier. The struct will ultimately disappear. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-26-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 460165c677983ca86a805b2f8b85240f395879cc Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:22 2020 +0200 staging: vchiq: Get rid of vchiq_util.h The header file only provides other includes. Move the relevant includes to their respective C files and delete it for good. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-25-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 77b3f6c49105088f157672c6e16deb0154a1383b Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:21 2020 +0200 staging: vchiq: Move message queue into struct vchiq_service This has historically been handled by vchi, but there is no reason why this couldn't be handled directly in vchiq. The patch tries to avoid altering any behavior, with the exception of the msg_queue size, which is now fixed to VCHIQ_MAX_SLOTS (it was set to VCHIQ_MAX_SLOTS / 2). This is done to match vchiq's user_service message queue, which could be merged with this one in the future. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-24-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit a8f7116b79749ea7f273d7c7e4efcf301a7adfe3 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:20 2020 +0200 staging: vchiq: Introduce vchiq_validate_params() When adding a new service validate the configuration parameters provided, and remove unnecessary checks in vchi, now that we have validated service's config. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-23-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 6c53da0b2ff9df002ff8e8e65ddf9e011e5527a6 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:19 2020 +0200 staging: vchi: Get rid of effect less expression It was probably there to trick compilers into ignoring unused variables, which isn't needed in Linux. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-22-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 469fbb24ced37fa48a25c82da7b9744404f1cf0e Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:18 2020 +0200 staging: vchi: Use vchiq's enum vchiq_reason enum vchi_callback_reason maps 1:1 to enum vchiq_reason, in an effort to simplify things, let's use the later, and get rid of the extra indirection. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-21-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 0abd7412e97008689a8b40e418ad37ab07feee6d Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:17 2020 +0200 staging: vchi: Use enum vchiq_bulk_mode instead of vchi's transmission flags vchi has a set of transfer flags which almost map 1:1 to vchiq's own transfer modes. For the sake of simplicity let's use the later and delete vchi's. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-20-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit a24ac57ef860045cb36db5f6f67aeac931a25e16 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:16 2020 +0200 staging: vchi: Get rid of flags argument in vchi_msg_hold() All users are ignoring the flags argument. So for the sake of simplicity delete it. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-19-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 115588bf775d740a48988c6d84e88d3f249179f9 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:15 2020 +0200 staging: vc04_services: Get rid of vchi_cfg.h Nothing in it is being used. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-18-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 7bfb15ccb3632122c7fbfd310bab0a6cfb1bafe4 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:14 2020 +0200 staging: vchi: Get rid of unnecessary defines Those defines aren't used by anyone. Get rid of them. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-17-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 09c0f0fc3f69a91940a7598153bd45ff7d9a70e3 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:13 2020 +0200 staging: vchi_common: Get rid of all unused definitions There is a series of structures and enums defined but never used. Get rid of them. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-16-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 6cdd7b79539280ff5b45759291ec88d2eb44280a Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:12 2020 +0200 staging: vchi: Get rid of vchi_msg_dequeue() Nobody uses it. Get rid of it. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-15-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit b74a8932dff818f5ff83101c8088a307a8f2eeda Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:11 2020 +0200 staging: vc04_services: bcm2835-audio: Use vchi_msg_hold() vchi_msg_dequeue() provides the same functionality as vchi_msg_hold() except it copies the message data as opposed to the later which provides the data in place. The copying is done on a local variable, so there is no need to keep the message out the function's bounds, so use vchi_msg_hold() instead. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-14-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 5a8e22e3d319ddae77c9fcce31ebc40577a32c6a Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:10 2020 +0200 staging: vchi: Unify struct shim_service and struct vchi_service_handle The idea behind struct vchi_service_handle is to create an opaque handle to struct shim_service. This can be achieved by doing a forward declaration of struct shim_service, which will avoid unwarranted casts and pointer play. Ultimately as a rename is due all over the vchi user space, rename struct shim_service into struvt vchi_service, which is more consistent with the rest of the exposed API. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-13-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit a7983fd9462560884056a91a7ffa346eeb9eb421 Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:09 2020 +0200 staging: vchi: Get rid of struct vchi_instance_handle The idea behind this was to create an opaque handle to struct vchiq_instance. This can be achieved without creating a new type by means of a forward declaration of struct vchiq_instance. This saves us from a lot of useless casting and overall simplifies code. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-12-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit b5f1547b6e3bddbbac263a1c7adfb51427a57a2c Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:08 2020 +0200 staging: vchi: Get rid of vchi_msg_peek() There already is a function that covers most of the functionality vchi_msg_peek() provides: vchi_msg_hold(). The main difference being that the later removes the message from vchu's queue while the other does it later on, while releasing the message. There are no users of this function that can't be trivially converted to vchi_msg_hold(). So, for the sake of removing duplicate code, get rid of vchi_msg_peek(). Note that the opposite change could be performed as well. But vchi_msg_peek()'s implementation was deemed less robust as messages have to be released in order. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-11-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit af22fd658ad5ab952e5ae7a49714456fc75f370c Author: Nicolas Saenz Julienne Date: Mon Jun 29 17:09:07 2020 +0200 staging: vchi: Get rid of all useless callback reasons They are neither produced nor expected, so just delete them. Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-10-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 5d9272e28a9a6117fb63f5f930991304765caa32 Author: Phil Elwell Date: Mon Jun 29 17:09:06 2020 +0200 staging: vchiq_arm: Add a matching unregister call All the registered children of vchiq have a corresponding call to platform_device_unregister except bcm2835_audio. Fix that. Fixes: 25c7597af20d ("staging: vchiq_arm: Register a platform device for audio") Signed-off-by: Phil Elwell Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-9-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 3dad90c53215bb6f0ceeff9b244303067ad47e63 Author: Naushir Patuck Date: Mon Jun 29 17:09:05 2020 +0200 staging: mmal-vchiq: Fix formatting errors in mmal_parameters.h No functional changes in this commit. - Remove erroneous whitespace. - Remove _t postfix label on structs and enums. Signed-off-by: Naushir Patuck Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-8-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 7c71d489bd70263a34db5c7006b46bebab11413d Author: Dave Stevenson Date: Mon Jun 29 17:09:04 2020 +0200 staging: mmal-vchiq: If the VPU returns an error, don't negate it There is an enum for the errors that the VPU can return. port_parameter_get was negating that value, but also using -EINVAL from the Linux error codes. Pass the VPU error code as positive values. Should the function need to pass a Linux failure, then return that as negative. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-7-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 20e006b89856b7e8c1f7c4083a9a5a1a73c78097 Author: Dave Stevenson Date: Mon Jun 29 17:09:03 2020 +0200 staging: mmal-vchiq: Always return the param size from param_get mmal-vchiq is a reimplementation of the userland library for MMAL. When getting a parameter, the client provides the storage and the size of the storage. The VPU then returns the size of the parameter that it wished to return, and as much as possible of that parameter is returned to the client. The implementation previously only returned the size provided by the VPU should it exceed the buffer size. So for parameters such as the supported encodings list the client had no idea how much of the provided storage had been populated. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-6-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 22e64b486adc4785542f8002c3af4c895490f841 Author: Dave Stevenson Date: Mon Jun 29 17:09:02 2020 +0200 staging: mmal-vchiq: Fix client_component for 64 bit kernel The MMAL client_component field is used with the event mechanism to allow the client to identify the component for which the event is generated. The field is only 32bits in size, therefore we can't use a pointer to the component in a 64 bit kernel. Component handles are already held in an array per VCHI instance, so use the array index as the client_component handle to avoid having to create a new IDR for this purpose. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-5-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 4a38e55089b918e5b60210b26e68841d91df46e9 Author: Dave Stevenson Date: Mon Jun 29 17:09:01 2020 +0200 staging: mmal-vchiq: Fixup vchiq-mmal include ordering There were dependencies on including the headers in the correct order. Fix up the headers so that they include the other headers that they depend on themselves. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-4-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 959fc47c53a31409eccd6d28024567aa7931f6de Author: Dave Stevenson Date: Mon Jun 29 17:09:00 2020 +0200 staging: mmal-vchiq: Make a mmal_buf struct for passing parameters The callback from vchi_mmal to the client was growing lots of extra parameters. Consolidate them into a single struct instead of growing the list further. The struct is associated with the client buffer, therefore there are various changes to setup various containers for the struct, and pass the appropriate members. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-3-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 481e5397f5e4b070b45e0b31e0c0cec96bf9bb87 Author: Dave Stevenson Date: Mon Jun 29 17:08:59 2020 +0200 staging: mmal-vchiq: Make timeout a defined parameter The timeout period for VPU communications is a useful thing to extend when debugging. Set it via a define, rather than a magic number buried in the code. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200629150945.10720-2-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 95154990a7ae05cef093459b0dd038f12dcd7034 Author: Souptick Joarder Date: Wed Jul 1 11:47:44 2020 +0530 staging: kpc2000: kpc_dma: Remove additional goto statements As 3 goto level referring to same common code, those can be accomodated with a single goto level and renameing it to unpin_pages. Set the -ERRNO when returning partial mapped pages in more appropriate place. When dma_map_sg() failed, the previously allocated memory was not freed properly. This is corrected now. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter Link: https://lore.kernel.org/r/1593584264-16982-5-git-send-email-jrdr.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit ab7abbcac07e8d040514e0bd93e9ead30ca3a114 Author: Souptick Joarder Date: Wed Jul 1 11:47:43 2020 +0530 staging: kpc2000: kpc_dma: Convert get_user_pages() --> pin_user_pages() In 2019, we introduced pin_user_pages*() and now we are converting get_user_pages*() to the new API as appropriate. [1] & [2] could be referred for more information. This is case 2 as per document [1]. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter Link: https://lore.kernel.org/r/1593584264-16982-4-git-send-email-jrdr.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit b6d13bd9f2c189c7a18bb5c8233078149496837f Author: Souptick Joarder Date: Wed Jul 1 11:47:42 2020 +0530 staging: kpc2000: kpc_dma: Convert set_page_dirty() --> set_page_dirty_lock() First, convert set_page_dirty() to set_page_dirty_lock() Second, there is an interval in there after set_page_dirty() and before put_page(), in which the device could be running and setting pages dirty. Moving set_page_dirty_lock() after dma_unmap_sg(). Signed-off-by: Souptick Joarder Suggested-by: John Hubbard Cc: John Hubbard Cc: Bharath Vedartham Cc: Dan Carpenter Link: https://lore.kernel.org/r/1593584264-16982-3-git-send-email-jrdr.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 63ed1e0287abcac9003e7b122badf546d66c9383 Author: Souptick Joarder Date: Wed Jul 1 11:47:41 2020 +0530 staging: kpc2000: kpc_dma: Unpin partial pinned pages There is a bug, when get_user_pages() failed but partially pinned pages are not unpinned and positive numbers are returned instead of -ERRNO. Fixed it. Also, int is more appropriate type for rv. Changed it. Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Dan Carpenter Cc: Bharath Vedartham Link: https://lore.kernel.org/r/1593584264-16982-2-git-send-email-jrdr.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit f9b468a3bd173ad3627ed99c6ba01eae0046c9be Author: Diego Bienz Date: Tue Jun 30 13:33:24 2020 +0200 staging: qlge: qlge.h: remove unnecessary spaces Spaces aren't necessary before function pointer arguments. Signed-off-by: Diego Bienz Link: https://lore.kernel.org/r/20200630113324.GA10534@diegob-nb Signed-off-by: Greg Kroah-Hartman commit 0a0a66c984b383af3d0943edd3887dd7634e208e Author: David Gow Date: Mon Jun 29 21:45:17 2020 -0700 clk: staging: Specify IOMEM dependency for Xilinx Clocking Wizard driver The Xilinx Clocking Wizard driver uses the devm_ioremap_resource function, but does not specify a dependency on IOMEM in Kconfig. This causes a build failure on architectures without IOMEM, for example, UML (notably with make allyesconfig). Fix this by making CONFIG_COMMON_CLK_XLNX_CLKWZRD depend on CONFIG_IOMEM. Signed-off-by: David Gow Link: https://lore.kernel.org/r/20200630044518.1084468-1-davidgow@google.com Signed-off-by: Greg Kroah-Hartman commit c2532bebba0bb6106e7074f4b127c70d6305f710 Author: Brooke Basile Date: Mon Jun 29 13:37:11 2020 -0400 staging: rtl8188eu: Replace function name with __func__ Fix the following checkpatch warning: WARNING: Prefer using '"%s...", __func__' to using 'rtw_get_bcn_info', this function's name, in a string Signed-off-by: Brooke Basile Link: https://lore.kernel.org/r/20200629173711.5158-1-brookebasile@gmail.com Signed-off-by: Greg Kroah-Hartman commit 24fe73106234903d70e7362f62fb6a5f737f3d81 Author: Michael Straube Date: Mon Jun 29 19:14:05 2020 +0200 staging: rtl8712: remove some ieee80211 constants from wifi.h The constants IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL and IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA are not used in the driver code and, if ever needed, available from 'include/linux/ieee80211.h'. Remove them from wifi.h. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200629171405.7711-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 07795b9afd124b9075367f8cfb9fa581270ae5d5 Author: Michael Straube Date: Mon Jun 29 19:14:04 2020 +0200 staging: rtl8723bs: remove some ieee80211 constants from wifi.h The constants IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL and IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA are not used in the driver code and, if ever needed, available from 'include/linux/ieee80211.h'. Remove them from wifi.h. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200629171405.7711-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8c97f42ca2093e3b6bb50b572247cd299624ae1d Author: Michael Straube Date: Mon Jun 29 19:14:03 2020 +0200 staging: rtl8188eu: remove some ieee80211 constants from wifi.h The constants IEEE80211_BAR_CTRL_ACK_POLICY_NORMAL and IEEE80211_BAR_CTRL_CBMTID_COMPRESSED_BA are not used in the driver code and, if ever needed, available from 'include/linux/ieee80211.h'. Remove them from wifi.h. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200629171405.7711-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit ca003698251c11be0384b34afb76516fb8a55808 Author: Michael Straube Date: Mon Jun 29 18:12:55 2020 +0200 staging: rtl8188eu: add spaces around operators Add spaces around operators to improve readability and clear checkpatch issues. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200629161255.28371-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3a90d8186659b11dba0b19f60cfd866979f8b1be Author: Michael Straube Date: Mon Jun 29 18:12:54 2020 +0200 staging: rtl8188eu: use compound assignment operators Use compound assignment operators to simplify the code and clear missing spaces around operators checkpatch issues. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200629161255.28371-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit be1247782e5ce606ad47220a87bd3d0fbabe3e4c Author: Vaibhav Gupta Date: Mon Jun 29 23:04:56 2020 +0530 staging: qlge/qlge_main.c: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), etc. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use device_wakeup_disable() instead. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200629173459.262075-2-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7a46931ba9a25ce73761f4015f004229df44ef13 Author: Vaibhav Gupta Date: Mon Jun 29 13:58:19 2020 +0530 staging: vt6655/device_main.c: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), etc. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use device_wakeup_disable() instead. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200629082819.216405-5-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit b21204b60d0149859f2d285b8c2371f40e9bb0e7 Author: Vaibhav Gupta Date: Mon Jun 29 13:58:18 2020 +0530 staging: rts5208/rtsx.c: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), etc. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use device_wakeup_disable() instead. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200629082819.216405-4-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0c90789ad0377490a4e5937d96f364f055e1f3c7 Author: Vaibhav Gupta Date: Mon Jun 29 13:58:17 2020 +0530 staging: rtl8192e: use generic power management The structure of working of PM hooks for source files is: drivers/staging/rtl8192e/rtl8192e/rtl_pm.h : callbacks declared drivers/staging/rtl8192e/rtl8192e/rtl_pm.c : callbacks defined drivers/staging/rtl8192e/rtl8192e/rtl_core.c : callbacks used Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), etc. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use device_wakeup_disable() instead. Use device_set_wakeup_enable() where WOL is decided by the value of a variable during runtime. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200629082819.216405-3-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit b98dabc11edd33592822d34e1fb3437a3f5d6814 Author: B K Karthik Date: Mon Jun 29 04:07:48 2020 -0400 staging: rtl8188eu: include: odm.h: fixed a blank space coding style issue. added blank space and enclosed a complex valued macro within parentheses for improved code readability. Signed-off-by: B K Karthik Link: https://lore.kernel.org/r/20200629080748.l4ufcpuk4cg2m725@pesu-pes-edu Signed-off-by: Greg Kroah-Hartman commit 9dce29e65b38591eac0ce6786bdb725aea1eadeb Author: Steven Rostedt (VMware) Date: Wed Jul 1 09:28:39 2020 -0400 ktest.pl: Have config-bisect save each config used in the bisect When performing a automatic config bisect via ktest.pl, it is very useful to have a copy of each of the bisects used. This way, if a bisect were to go wrong, it is possible to retrace the steps and continue at the location before the error was made. The ktest.pl will make a copy of the good and bad configs, labeled as such, as well as a number attached to it that represents the iteration of the bisect. These files are saved in the ktest temp directory where it currently stores the good and bad config files. Signed-off-by: Steven Rostedt (VMware) commit 44c413d9a51752056d606bf6f312003ac1740fab Author: Alexey Kardashevskiy Date: Wed Jun 17 17:04:44 2020 +1000 tty/vt: Do not warn when huge selection requested The tty TIOCL_SETSEL ioctl allocates a memory buffer big enough for text selection area. The maximum allowed console size is VC_RESIZE_MAXCOL * VC_RESIZE_MAXROW == 32767*32767 == ~1GB and typical MAX_ORDER is set to allow allocations lot less than than (circa 16MB). So it is quite possible to trigger huge allocation (and syzkaller just did that) which is going to fail (which is fine) with a backtrace in mm/page_alloc.c at WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN)) and this may trigger panic (if panic_on_warn is enabled) and leak kernel addresses to dmesg. This passes __GFP_NOWARN to kmalloc_array to avoid unnecessary user- triggered WARN_ON. Note that the error is not ignored and the warning is still printed. Signed-off-by: Alexey Kardashevskiy Link: https://lore.kernel.org/r/20200617070444.116704-1-aik@ozlabs.ru Signed-off-by: Greg Kroah-Hartman commit 5a6c35f9af416114588298aa7a90b15bbed15a41 Author: Christoph Hellwig Date: Wed Jul 1 10:59:47 2020 +0200 block: remove direct_make_request Now that submit_bio_noacct has a decent blk-mq fast path there is no more need for this bypass. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit ff93ea0ce7636345df1bf77a2be09dbb59f4517e Author: Christoph Hellwig Date: Wed Jul 1 10:59:46 2020 +0200 block: shortcut __submit_bio_noacct for blk-mq drivers For blk-mq drivers bios can only be inserted for the same queue. So bypass the complicated sorting logic in __submit_bio_noacct with a blk-mq simpler submission helper. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 566acf2daaf2048c692abfc2342ab4a49b59ee40 Author: Christoph Hellwig Date: Wed Jul 1 10:59:45 2020 +0200 block: refator submit_bio_noacct Split out a __submit_bio_noacct helper for the actual de-recursion algorithm, and simplify the loop by using a continue when we can't enter the queue for a bio. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit ed00aabd5eb9fb44d6aff1173234a2e911b9fead Author: Christoph Hellwig Date: Wed Jul 1 10:59:44 2020 +0200 block: rename generic_make_request to submit_bio_noacct generic_make_request has always been very confusingly misnamed, so rename it to submit_bio_noacct to make it clear that it is submit_bio minus accounting and a few checks. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c62b37d96b6eb3ec5ae4cbe00db107bf15aebc93 Author: Christoph Hellwig Date: Wed Jul 1 10:59:43 2020 +0200 block: move ->make_request_fn to struct block_device_operations The make_request_fn is a little weird in that it sits directly in struct request_queue instead of an operation vector. Replace it with a block_device_operations method called submit_bio (which describes much better what it does). Also remove the request_queue argument to it, as the queue can be derived pretty trivially from the bio. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit e439ab710fb0564dccb52b0519b3d354ea2a9c50 Author: Christoph Hellwig Date: Wed Jul 1 10:59:42 2020 +0200 block: remove the nr_sectors variable in generic_make_request_checks The variable is only used once, so just open code the bio_sector() there. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 833f84e2b9b512c02a8d751e63e2b7de4ea2aa82 Author: Christoph Hellwig Date: Wed Jul 1 10:59:41 2020 +0200 block: remove the NULL queue check in generic_make_request_checks All registers disks must have a valid queue pointer, so don't bother to log a warning for that case. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c8178674608679c8146235abb0be4e2c3a86f409 Author: Christoph Hellwig Date: Wed Jul 1 10:59:40 2020 +0200 block: tidy up a warning in bio_check_ro The "generic_make_request: " prefix has no value, and will soon become stale. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit f695ca3886ce72b027af7aa6040cd420cae2088c Author: Christoph Hellwig Date: Wed Jul 1 10:59:39 2020 +0200 block: remove the request_queue argument from blk_queue_split The queue can be trivially derived from the bio, so pass one less argument. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit ed9b3196d2b26b5bd3a7e2cd4aec8e389d991fd8 Author: Christoph Hellwig Date: Wed Jul 1 10:59:38 2020 +0200 fs: remove a weird comment in submit_bh_wbc All bios can get remapped if submitted to partitions. No need to comment on that. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit c4a59c4e5db313b257edcbc83b411c005e3988d4 Author: Christoph Hellwig Date: Wed Jul 1 10:59:37 2020 +0200 dm: stop using ->queuedata Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 987a0ef88bf749f65e891a22c481b2934c6019de Author: Christoph Hellwig Date: Wed Jul 1 10:59:36 2020 +0200 bcache: stop setting ->queuedata Nothing in bcache actually uses the ->queuedata field. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 39ad70b568667c24ea786e6cde3f4a7adf5aa4d7 Author: Christoph Hellwig Date: Wed Jul 1 10:59:35 2020 +0200 zram: stop using ->queuedata Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6c2eddd63b448287e678d8d6099b29bb17e9cd3d Author: Christoph Hellwig Date: Wed Jul 1 10:59:34 2020 +0200 umem: stop using ->queuedata Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit a2f143fc211902f6ba08e62820a24c59f41d918c Author: Christoph Hellwig Date: Wed Jul 1 10:59:33 2020 +0200 rsxx: stop using ->queuedata Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 53042f3cc411adc79811ba3cfbca5d7a42a7b806 Author: Christoph Hellwig Date: Wed Jul 1 10:59:32 2020 +0200 ps3vram: stop using ->queuedata Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6bbae86056f1b7da0fb91450d3593dbce728e5f8 Author: Christoph Hellwig Date: Wed Jul 1 10:59:31 2020 +0200 null_blk: stop using ->queuedata for bio mode Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 84bc83c3baf28c0afda78db2cb721be64c2eb238 Author: Christoph Hellwig Date: Wed Jul 1 10:59:30 2020 +0200 drbd: stop using ->queuedata Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 82bb454d07230e734e15475ae70acb834279c684 Author: Christoph Hellwig Date: Wed Jul 1 10:59:29 2020 +0200 simdisk: stop using ->queuedata Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6d41bb4d466f1695215debc4046d3907e2d7d784 Author: Christoph Hellwig Date: Wed Jul 1 10:59:28 2020 +0200 nfblock: stop using ->queuedata Instead of setting up the queuedata as well just use one private data field. Signed-off-by: Christoph Hellwig Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Jens Axboe commit d029bff60aa6c7eab281d52602b6a7a971615324 Author: Andy Lutomirski Date: Fri Jun 26 10:24:30 2020 -0700 x86/fsgsbase: Fix Xen PV support On Xen PV, SWAPGS doesn't work. Teach __rdfsbase_inactive() and __wrgsbase_inactive() to use rdmsrl()/wrmsrl() on Xen PV. The Xen pvop code will understand this and issue the correct hypercalls. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/f07c08f178fe9711915862b656722a207cd52c28.1593192140.git.luto@kernel.org commit 40c45904f818c1f6555294ca27afc5fda4f09e68 Author: Andy Lutomirski Date: Fri Jun 26 10:24:29 2020 -0700 x86/ptrace: Fix 32-bit PTRACE_SETREGS vs fsbase and gsbase Debuggers expect that doing PTRACE_GETREGS, then poking at a tracee and maybe letting it run for a while, then doing PTRACE_SETREGS will put the tracee back where it was. In the specific case of a 32-bit tracer and tracee, the PTRACE_GETREGS/SETREGS data structure doesn't have fs_base or gs_base fields, so FSBASE and GSBASE fields are never stored anywhere. Everything used to still work because nonzero FS or GS would result full reloads of the segment registers when the tracee resumes, and the bases associated with FS==0 or GS==0 are irrelevant to 32-bit code. Adding FSGSBASE support broke this: when FSGSBASE is enabled, FSBASE and GSBASE are now restored independently of FS and GS for all tasks when context-switched in. This means that, if a 32-bit tracer restores a previous state using PTRACE_SETREGS but the tracee's pre-restore and post-restore bases don't match, then the tracee is resumed with the wrong base. Fix it by explicitly loading the base when a 32-bit tracer pokes FS or GS on a 64-bit kernel. Also add a test case. Fixes: 673903495c85 ("x86/process/64: Use FSBSBASE in switch_to() if available") Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/229cc6a50ecbb701abd50fe4ddaf0eda888898cd.1593192140.git.luto@kernel.org commit 8e259031c67a5ea0666428edb64c89e8c6ebd18e Author: Andy Lutomirski Date: Fri Jun 26 10:24:28 2020 -0700 selftests/x86/fsgsbase: Add a missing memory constraint The manual call to set_thread_area() via int $0x80 was missing any indication that the descriptor was a pointer, causing gcc to occasionally generate wrong code. Add the missing constraint. Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/432968af67259ca92d68b774a731aff468eae610.1593192140.git.luto@kernel.org commit 979c2c4247cafd8a91628a7306b6871efbd12fdb Author: Andy Lutomirski Date: Fri Jun 26 10:24:27 2020 -0700 selftests/x86/fsgsbase: Fix a comment in the ptrace_write_gsbase test A comment was unclear. Fix it. Fixes: 5e7ec8578fa3 ("selftests/x86/fsgsbase: Test ptracer-induced GS base write with FSGSBASE") Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/901034a91a40169ec84f1f699ea86704dff762e4.1593192140.git.luto@kernel.org commit b5fc1e8bedf8ad2c6381e0df6331ad5686aca425 Author: Hou Tao Date: Mon Apr 27 21:12:50 2020 +0800 blk-mq: remove pointless call of list_entry_rq() in hctx_show_busy_rq() Just use rq directly, the usage of list_entry_rq() doesn't make any sense. Signed-off-by: Hou Tao Reviewed-by: Ming Lei Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 6fd9fffb6ff54fdb19b57ecb927fe15e99b0b24d Author: Erwan Le Ray Date: Wed May 20 15:39:32 2020 +0200 serial: stm32: Use generic DT binding for announcing RTS/CTS lines Add support of generic DT binding for annoucing RTS/CTS lines. The initial binding 'st,hw-flow-control' is not needed anymore since generic binding is available, but is kept for backward compatibility. Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20200520133932.30441-3-erwan.leray@st.com Signed-off-by: Greg Kroah-Hartman commit b2cc2b5111db43b35b5de7252127bbc8d6806e34 Author: Erwan Le Ray Date: Wed May 20 15:39:31 2020 +0200 dt-bindings: serial: add generic DT binding for announcing RTS/CTS lines Add support of generic DT binding for annoucing RTS/CTS lines. The initial binding 'st,hw-flow-control' is not needed anymore since generic binding is available, but is kept for backward compatibility. Signed-off-by: Erwan Le Ray Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200520133932.30441-2-erwan.leray@st.com Signed-off-by: Greg Kroah-Hartman commit 182486594a6101abe51629d22a585423ed94a2c8 Author: Lee Jones Date: Wed Jul 1 09:31:17 2020 +0100 misc: ibmvmc: Repair ill-named function argument descriptions Formatting is correct and descriptions are all present, but some of the argument names are not properly represented in the documentation. Fixes the following W=1 build warnings: drivers/misc/ibmvmc.c:780: warning: Function parameter or member 'msg_len' not described in 'ibmvmc_send_msg' drivers/misc/ibmvmc.c:780: warning: Excess function parameter 'msg_length' description in 'ibmvmc_send_msg' drivers/misc/ibmvmc.c:1041: warning: Function parameter or member 'buffer' not described in 'ibmvmc_write' drivers/misc/ibmvmc.c:1041: warning: Excess function parameter 'buf' description in 'ibmvmc_write' drivers/misc/ibmvmc.c:1360: warning: Function parameter or member 'file' not described in 'ibmvmc_ioctl' drivers/misc/ibmvmc.c:1360: warning: Excess function parameter 'session' description in 'ibmvmc_ioctl' Cc: Steven Royer Cc: Adam Reznechek Cc: "Bryant G. Ly" Cc: Dave Engebretsen Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-30-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 28fc491e9be6c665f5af79a8ffa9ff85e7d06cb1 Author: Lee Jones Date: Wed Jul 1 09:31:16 2020 +0100 misc: ocxl: config: Provide correct formatting to function headers A nice attempt was made to provide kerneldoc headers for read_template_version() and read_afu_lpc_memory_info() however, the provided formatting does not match what is expected by kerneldoc. Fixes the following W=1 warnings: drivers/misc/ocxl/config.c:286: warning: Function parameter or member 'dev' not described in 'read_template_version' drivers/misc/ocxl/config.c:286: warning: Function parameter or member 'fn' not described in 'read_template_version' drivers/misc/ocxl/config.c:286: warning: Function parameter or member 'len' not described in 'read_template_version' drivers/misc/ocxl/config.c:286: warning: Function parameter or member 'version' not described in 'read_template_version' drivers/misc/ocxl/config.c:489: warning: Function parameter or member 'dev' not described in 'read_afu_lpc_memory_info' drivers/misc/ocxl/config.c:489: warning: Function parameter or member 'fn' not described in 'read_afu_lpc_memory_info' drivers/misc/ocxl/config.c:489: warning: Function parameter or member 'afu' not described in 'read_afu_lpc_memory_info' Cc: Frederic Barrat Cc: Andrew Donnellan Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-29-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b865c5b3220391ca6b4a0948f91f496242a2e04f Author: Lee Jones Date: Wed Jul 1 09:31:15 2020 +0100 misc: cxl: hcalls: Demote half-assed kerneldoc attempt Function headers will need a lot of work before they reach the standards expected of kerneldoc. Demote them down to basic comments/headers, for now at least. Fixes the following W=1 kernel build warnings: drivers/misc/cxl/hcalls.c:175: warning: Function parameter or member 'unit_address' not described in 'cxl_h_detach_process' drivers/misc/cxl/hcalls.c:175: warning: Function parameter or member 'process_token' not described in 'cxl_h_detach_process' drivers/misc/cxl/hcalls.c:207: warning: Function parameter or member 'unit_address' not described in 'cxl_h_control_function' drivers/misc/cxl/hcalls.c:207: warning: Function parameter or member 'op' not described in 'cxl_h_control_function' drivers/misc/cxl/hcalls.c:207: warning: Function parameter or member 'p1' not described in 'cxl_h_control_function' drivers/misc/cxl/hcalls.c:207: warning: Function parameter or member 'p2' not described in 'cxl_h_control_function' drivers/misc/cxl/hcalls.c:207: warning: Function parameter or member 'p3' not described in 'cxl_h_control_function' drivers/misc/cxl/hcalls.c:207: warning: Function parameter or member 'p4' not described in 'cxl_h_control_function' drivers/misc/cxl/hcalls.c:207: warning: Function parameter or member 'out' not described in 'cxl_h_control_function' drivers/misc/cxl/hcalls.c:245: warning: Function parameter or member 'unit_address' not described in 'cxl_h_reset_afu' drivers/misc/cxl/hcalls.c:258: warning: Function parameter or member 'unit_address' not described in 'cxl_h_suspend_process' drivers/misc/cxl/hcalls.c:258: warning: Function parameter or member 'process_token' not described in 'cxl_h_suspend_process' drivers/misc/cxl/hcalls.c:271: warning: Function parameter or member 'unit_address' not described in 'cxl_h_resume_process' drivers/misc/cxl/hcalls.c:271: warning: Function parameter or member 'process_token' not described in 'cxl_h_resume_process' drivers/misc/cxl/hcalls.c:284: warning: Function parameter or member 'unit_address' not described in 'cxl_h_read_error_state' drivers/misc/cxl/hcalls.c:284: warning: Function parameter or member 'state' not described in 'cxl_h_read_error_state' drivers/misc/cxl/hcalls.c:300: warning: Function parameter or member 'unit_address' not described in 'cxl_h_get_afu_err' drivers/misc/cxl/hcalls.c:300: warning: Function parameter or member 'offset' not described in 'cxl_h_get_afu_err' drivers/misc/cxl/hcalls.c:300: warning: Function parameter or member 'buf_address' not described in 'cxl_h_get_afu_err' drivers/misc/cxl/hcalls.c:300: warning: Function parameter or member 'len' not described in 'cxl_h_get_afu_err' drivers/misc/cxl/hcalls.c:320: warning: Function parameter or member 'unit_address' not described in 'cxl_h_get_config' drivers/misc/cxl/hcalls.c:320: warning: Function parameter or member 'cr_num' not described in 'cxl_h_get_config' drivers/misc/cxl/hcalls.c:320: warning: Function parameter or member 'offset' not described in 'cxl_h_get_config' drivers/misc/cxl/hcalls.c:320: warning: Function parameter or member 'buf_address' not described in 'cxl_h_get_config' drivers/misc/cxl/hcalls.c:320: warning: Function parameter or member 'len' not described in 'cxl_h_get_config' drivers/misc/cxl/hcalls.c:333: warning: Function parameter or member 'unit_address' not described in 'cxl_h_terminate_process' drivers/misc/cxl/hcalls.c:333: warning: Function parameter or member 'process_token' not described in 'cxl_h_terminate_process' drivers/misc/cxl/hcalls.c:351: warning: Function parameter or member 'unit_address' not described in 'cxl_h_collect_vpd' drivers/misc/cxl/hcalls.c:351: warning: Function parameter or member 'record' not described in 'cxl_h_collect_vpd' drivers/misc/cxl/hcalls.c:351: warning: Function parameter or member 'list_address' not described in 'cxl_h_collect_vpd' drivers/misc/cxl/hcalls.c:351: warning: Function parameter or member 'num' not described in 'cxl_h_collect_vpd' drivers/misc/cxl/hcalls.c:351: warning: Function parameter or member 'out' not described in 'cxl_h_collect_vpd' drivers/misc/cxl/hcalls.c:362: warning: Function parameter or member 'unit_address' not described in 'cxl_h_get_fn_error_interrupt' drivers/misc/cxl/hcalls.c:362: warning: Function parameter or member 'reg' not described in 'cxl_h_get_fn_error_interrupt' drivers/misc/cxl/hcalls.c:374: warning: Function parameter or member 'unit_address' not described in 'cxl_h_ack_fn_error_interrupt' drivers/misc/cxl/hcalls.c:374: warning: Function parameter or member 'value' not described in 'cxl_h_ack_fn_error_interrupt' drivers/misc/cxl/hcalls.c:386: warning: Function parameter or member 'unit_address' not described in 'cxl_h_get_error_log' drivers/misc/cxl/hcalls.c:386: warning: Function parameter or member 'value' not described in 'cxl_h_get_error_log' drivers/misc/cxl/hcalls.c:399: warning: Function parameter or member 'unit_address' not described in 'cxl_h_collect_int_info' drivers/misc/cxl/hcalls.c:399: warning: Function parameter or member 'process_token' not described in 'cxl_h_collect_int_info' drivers/misc/cxl/hcalls.c:399: warning: Function parameter or member 'info' not described in 'cxl_h_collect_int_info' drivers/misc/cxl/hcalls.c:440: warning: Function parameter or member 'unit_address' not described in 'cxl_h_control_faults' drivers/misc/cxl/hcalls.c:440: warning: Function parameter or member 'process_token' not described in 'cxl_h_control_faults' drivers/misc/cxl/hcalls.c:440: warning: Function parameter or member 'control_mask' not described in 'cxl_h_control_faults' drivers/misc/cxl/hcalls.c:440: warning: Function parameter or member 'reset_mask' not described in 'cxl_h_control_faults' drivers/misc/cxl/hcalls.c:480: warning: Function parameter or member 'unit_address' not described in 'cxl_h_control_facility' drivers/misc/cxl/hcalls.c:480: warning: Function parameter or member 'op' not described in 'cxl_h_control_facility' drivers/misc/cxl/hcalls.c:480: warning: Function parameter or member 'p1' not described in 'cxl_h_control_facility' drivers/misc/cxl/hcalls.c:480: warning: Function parameter or member 'p2' not described in 'cxl_h_control_facility' drivers/misc/cxl/hcalls.c:480: warning: Function parameter or member 'p3' not described in 'cxl_h_control_facility' drivers/misc/cxl/hcalls.c:480: warning: Function parameter or member 'p4' not described in 'cxl_h_control_facility' drivers/misc/cxl/hcalls.c:480: warning: Function parameter or member 'out' not described in 'cxl_h_control_facility' drivers/misc/cxl/hcalls.c:516: warning: Function parameter or member 'unit_address' not described in 'cxl_h_reset_adapter' drivers/misc/cxl/hcalls.c:532: warning: Function parameter or member 'unit_address' not described in 'cxl_h_collect_vpd_adapter' drivers/misc/cxl/hcalls.c:532: warning: Function parameter or member 'list_address' not described in 'cxl_h_collect_vpd_adapter' drivers/misc/cxl/hcalls.c:532: warning: Function parameter or member 'num' not described in 'cxl_h_collect_vpd_adapter' drivers/misc/cxl/hcalls.c:532: warning: Function parameter or member 'out' not described in 'cxl_h_collect_vpd_adapter' drivers/misc/cxl/hcalls.c:561: warning: Function parameter or member 'unit_address' not described in 'cxl_h_download_facility' drivers/misc/cxl/hcalls.c:561: warning: Function parameter or member 'op' not described in 'cxl_h_download_facility' drivers/misc/cxl/hcalls.c:561: warning: Function parameter or member 'list_address' not described in 'cxl_h_download_facility' drivers/misc/cxl/hcalls.c:561: warning: Function parameter or member 'num' not described in 'cxl_h_download_facility' drivers/misc/cxl/hcalls.c:561: warning: Function parameter or member 'out' not described in 'cxl_h_download_facility' drivers/misc/cxl/hcalls.c:626: warning: Function parameter or member 'unit_address' not described in 'cxl_h_download_adapter_image' drivers/misc/cxl/hcalls.c:626: warning: Function parameter or member 'list_address' not described in 'cxl_h_download_adapter_image' drivers/misc/cxl/hcalls.c:626: warning: Function parameter or member 'num' not described in 'cxl_h_download_adapter_image' drivers/misc/cxl/hcalls.c:626: warning: Function parameter or member 'out' not described in 'cxl_h_download_adapter_image' drivers/misc/cxl/hcalls.c:639: warning: Function parameter or member 'unit_address' not described in 'cxl_h_validate_adapter_image' drivers/misc/cxl/hcalls.c:639: warning: Function parameter or member 'list_address' not described in 'cxl_h_validate_adapter_image' drivers/misc/cxl/hcalls.c:639: warning: Function parameter or member 'num' not described in 'cxl_h_validate_adapter_image' Cc: Frederic Barrat Cc: Andrew Donnellan Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-28-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit ff512a8b79320f4893403f812ae2838226cade32 Author: Lee Jones Date: Wed Jul 1 09:31:13 2020 +0100 misc: mic: scif: scif_rma: Repair a bunch of kerneldoc issues Firstly, for some reason documentation of all 'scifdev' arguments are missing, so apply those. Also remove 2 descriptions of 'ep' which appear to document non-existent function arguments. drivers/misc/mic/scif/scif_rma.c:468: warning: Function parameter or member 'scifdev' not described in 'scif_create_remote_window' drivers/misc/mic/scif/scif_rma.c:468: warning: Excess function parameter 'ep' description in 'scif_create_remote_window' drivers/misc/mic/scif/scif_rma.c:510: warning: Excess function parameter 'ep' description in 'scif_destroy_remote_window' drivers/misc/mic/scif/scif_rma.c:1045: warning: Function parameter or member 'scifdev' not described in 'scif_alloc_req' drivers/misc/mic/scif/scif_rma.c:1080: warning: Function parameter or member 'scifdev' not described in 'scif_alloc_gnt_rej' drivers/misc/mic/scif/scif_rma.c:1104: warning: Function parameter or member 'scifdev' not described in 'scif_free_virt' drivers/misc/mic/scif/scif_rma.c:1142: warning: Function parameter or member 'scifdev' not described in 'scif_recv_reg' drivers/misc/mic/scif/scif_rma.c:1178: warning: Function parameter or member 'scifdev' not described in 'scif_recv_unreg' drivers/misc/mic/scif/scif_rma.c:1243: warning: Function parameter or member 'scifdev' not described in 'scif_recv_reg_ack' drivers/misc/mic/scif/scif_rma.c:1262: warning: Function parameter or member 'scifdev' not described in 'scif_recv_reg_nack' drivers/misc/mic/scif/scif_rma.c:1280: warning: Function parameter or member 'scifdev' not described in 'scif_recv_unreg_ack' drivers/misc/mic/scif/scif_rma.c:1299: warning: Function parameter or member 'scifdev' not described in 'scif_recv_unreg_nack' Cc: Sudeep Dutt Cc: Ashutosh Dixit Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-26-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit bb11b4eb532be83e97a891da47ead7c4f1f83b94 Author: Lee Jones Date: Wed Jul 1 09:31:12 2020 +0100 misc: mic: scif: scif_fence: Fix a bunch of different documentation issues Firstly add missing descriptions for every use of 'scifdev', then correct incorrect formatting of existing function argument descriptions changing to the expected format of '@.*: ', finally add missing description for function argument 'mark'. Fixes the following W=1 warnings: drivers/misc/mic/scif/scif_fence.c:19: warning: Function parameter or member 'scifdev' not described in 'scif_recv_mark' drivers/misc/mic/scif/scif_fence.c:41: warning: Function parameter or member 'scifdev' not described in 'scif_recv_mark_resp' drivers/misc/mic/scif/scif_fence.c:64: warning: Function parameter or member 'scifdev' not described in 'scif_recv_wait' drivers/misc/mic/scif/scif_fence.c:101: warning: Function parameter or member 'scifdev' not described in 'scif_recv_wait_resp' drivers/misc/mic/scif/scif_fence.c:122: warning: Function parameter or member 'scifdev' not described in 'scif_recv_sig_local' drivers/misc/mic/scif/scif_fence.c:143: warning: Function parameter or member 'scifdev' not described in 'scif_recv_sig_remote' drivers/misc/mic/scif/scif_fence.c:164: warning: Function parameter or member 'scifdev' not described in 'scif_recv_sig_resp' drivers/misc/mic/scif/scif_fence.c:515: warning: Function parameter or member 'epd' not described in 'scif_send_fence_signal' drivers/misc/mic/scif/scif_fence.c:515: warning: Function parameter or member 'roff' not described in 'scif_send_fence_signal' drivers/misc/mic/scif/scif_fence.c:515: warning: Function parameter or member 'rval' not described in 'scif_send_fence_signal' drivers/misc/mic/scif/scif_fence.c:515: warning: Function parameter or member 'loff' not described in 'scif_send_fence_signal' drivers/misc/mic/scif/scif_fence.c:515: warning: Function parameter or member 'lval' not described in 'scif_send_fence_signal' drivers/misc/mic/scif/scif_fence.c:515: warning: Function parameter or member 'flags' not described in 'scif_send_fence_signal' Cc: Sudeep Dutt Cc: Ashutosh Dixit Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-25-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 31c68981c53acd40a1e5f4b3afebf1a2b924bad5 Author: Lee Jones Date: Wed Jul 1 09:31:11 2020 +0100 misc: mic: scif: scif_dma: Fix a couple of kerneldoc issues Firstly demote scif_rma_destroy_tcw()'s header to a standard comment as no attempt has been made to document any of the function arguments. Secondly, provide missing description for 'prot' for scif_register_temp(). Fixes the following W=1 kernel build warnings: drivers/misc/mic/scif/scif_dma.c:110: warning: Function parameter or member 'mmn' not described in '__scif_rma_destroy_tcw' drivers/misc/mic/scif/scif_dma.c:110: warning: Function parameter or member 'start' not described in '__scif_rma_destroy_tcw' drivers/misc/mic/scif/scif_dma.c:110: warning: Function parameter or member 'len' not described in '__scif_rma_destroy_tcw' drivers/misc/mic/scif/scif_dma.c:344: warning: Function parameter or member 'prot' not described in 'scif_register_temp' Cc: Sudeep Dutt Cc: Ashutosh Dixit Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-24-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9afe1839e878a0745f8f325628ea445c47e689ab Author: Lee Jones Date: Wed Jul 1 09:31:10 2020 +0100 misc: mic: scif: scif_nm: Supply various kerneldoc fix-ups Includes; missing descriptions for function args, the promotion of obvious kerneldoc headers and the mis-formatting of existing argument descriptions. Fixes the following W=1 kernel build warnings: drivers/misc/mic/scif/scif_nm.c:19: warning: Function parameter or member 'node' not described in 'scif_invalidate_ep' drivers/misc/mic/scif/scif_nm.c:173: warning: Function parameter or member 'node_id' not described in 'scif_disconnect_node' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-23-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5ab3f590c738a193e9d3edd6bc56f50e19fe7eb9 Author: Lee Jones Date: Wed Jul 1 09:31:09 2020 +0100 misc: mic: scif: scif_nodeqp: Fix a bunch of kerneldoc issues Includes; missing function argument documentation, misnamed argument tags, the promotion of obvious kerneldoc header candidates and an ordering issue (functions must follow the kerneldoc which describes them). Fixes the following W=1 kernel build issues: drivers/misc/mic/scif/scif_nodeqp.c:452: warning: Function parameter or member 'scifdev' not described in 'scif_node_connect' drivers/misc/mic/scif/scif_nodeqp.c:730: warning: Function parameter or member 'unused' not described in 'scif_exit' drivers/misc/mic/scif/scif_nodeqp.c:730: warning: Excess function parameter 'msg' description in 'scif_exit' drivers/misc/mic/scif/scif_nodeqp.c:748: warning: Function parameter or member 'unused' not described in 'scif_exit_ack' drivers/misc/mic/scif/scif_nodeqp.c:748: warning: Excess function parameter 'msg' description in 'scif_exit_ack' drivers/misc/mic/scif/scif_nodeqp.c:939: warning: Function parameter or member 'scifdev' not described in 'scif_node_add_nack' drivers/misc/mic/scif/scif_nodeqp.c:988: warning: Function parameter or member 'scifdev' not described in 'scif_get_node_info_resp' drivers/misc/mic/scif/scif_nodeqp.c:1070: warning: cannot understand function prototype: 'int scif_max_msg_id = SCIF_MAX_MSG; ' drivers/misc/mic/scif/scif_nodeqp.c:1129: warning: Function parameter or member 'unused' not described in 'scif_loopb_wq_handler' drivers/misc/mic/scif/scif_nodeqp.c:1129: warning: Excess function parameter 'work' description in 'scif_loopb_wq_handler' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-22-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3e30b9e3b30ef60e2302ee36466bb738eb088729 Author: Lee Jones Date: Wed Jul 1 09:31:08 2020 +0100 misc: mic: scif: scif_epd: Describe missing 'scifdev' argument(s) For some reason (copy 'n' paste error?) the passed in pointers to 'struct scif_dev scifdev' weren't described throughout the source file. Change that. Fixes the following W=1 kernel build warning(s): drivers/misc/mic/scif/scif_epd.c:120: warning: Function parameter or member 'scifdev' not described in 'scif_cnctreq' drivers/misc/mic/scif/scif_epd.c:166: warning: Function parameter or member 'scifdev' not described in 'scif_cnctgnt' drivers/misc/mic/scif/scif_epd.c:191: warning: Function parameter or member 'scifdev' not described in 'scif_cnctgnt_ack' drivers/misc/mic/scif/scif_epd.c:213: warning: Function parameter or member 'scifdev' not described in 'scif_cnctgnt_nack' drivers/misc/mic/scif/scif_epd.c:230: warning: Function parameter or member 'scifdev' not described in 'scif_cnctrej' drivers/misc/mic/scif/scif_epd.c:255: warning: Function parameter or member 'scifdev' not described in 'scif_discnct' drivers/misc/mic/scif/scif_epd.c:309: warning: Function parameter or member 'scifdev' not described in 'scif_discnt_ack' drivers/misc/mic/scif/scif_epd.c:325: warning: Function parameter or member 'scifdev' not described in 'scif_clientsend' drivers/misc/mic/scif/scif_epd.c:341: warning: Function parameter or member 'scifdev' not described in 'scif_clientrcvd' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-21-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5d137a360ac5fc02a4172b823a4293067334553e Author: Lee Jones Date: Wed Jul 1 09:31:07 2020 +0100 misc: mic: scif: scif_api: Demote scif_accept() function header The correct format is not used and no attempt has been made to document the function arguments. Makes sense to just demote the header back down to a simple comment. Fixes the following W=1 warnings: drivers/misc/mic/scif/scif_api.c:739: warning: Function parameter or member 'epd' not described in 'scif_accept' drivers/misc/mic/scif/scif_api.c:739: warning: Function parameter or member 'peer' not described in 'scif_accept' drivers/misc/mic/scif/scif_api.c:739: warning: Function parameter or member 'newepd' not described in 'scif_accept' drivers/misc/mic/scif/scif_api.c:739: warning: Function parameter or member 'flags' not described in 'scif_accept' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-20-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit cf2a06c133ddb07d90af78569f5d3e0551cfde7f Author: Lee Jones Date: Wed Jul 1 09:31:06 2020 +0100 misc: mic: scif: scif_api: Remove set but unused variable 'read_size' 'read_size' appears to have been assigned, but never used since the SCIF messaging and node enumeration APIs were introduced in 2015. Makes sense to simply remove it. Fixes the following W=1 warning: drivers/misc/mic/scif/scif_api.c: In function ‘_scif_recv’: drivers/misc/mic/scif/scif_api.c:1000:6: warning: variable ‘read_size’ set but not used [-Wunused-but-set-variable] 1000 | int read_size; | ^~~~~~~~~ Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-19-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a761b8b00c6cde8f20cdcafdfba685118f2832e3 Author: Lee Jones Date: Wed Jul 1 09:31:05 2020 +0100 misc: mic: cosm: cosm_debugfs: Demote function headers from kerneldoc The correct format is not used and no attempt has been made to document the function arguments. Makes sense to just demote the header back down to a simple comment. Fixes the following W=1 warnings: drivers/misc/mic/cosm/cosm_debugfs.c:25: warning: Function parameter or member 's' not described in 'log_buf_show' drivers/misc/mic/cosm/cosm_debugfs.c:25: warning: Function parameter or member 'unused' not described in 'log_buf_show' drivers/misc/mic/cosm/cosm_debugfs.c:78: warning: Function parameter or member 's' not described in 'force_reset_show' drivers/misc/mic/cosm/cosm_debugfs.c:78: warning: Function parameter or member 'pos' not described in 'force_reset_show' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-18-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 887d670e29fa7d5e046d2607249ffe56fe1e54bc Author: Lee Jones Date: Wed Jul 1 09:31:04 2020 +0100 misc: mic: scif: scif_ports: Fix copy 'n' paste error __scif_get_port() has never taken 'port' as an argument since its inception back in 2015. Probably document the proper arguments expected 'start' and 'end'. Fixes the following W=1 kernel build warnings: drivers/misc/mic/scif/scif_ports.c:36: warning: Function parameter or member 'start' not described in '__scif_get_port drivers/misc/mic/scif/scif_ports.c:36: warning: Function parameter or member 'end' not described in '__scif_get_port' drivers/misc/mic/scif/scif_ports.c:36: warning: Excess function parameter 'port' description in '__scif_get_port' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-17-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0cfbe64c56c329b464c378ba8612e684c8e12809 Author: Lee Jones Date: Wed Jul 1 09:31:03 2020 +0100 misc: mic: cosm: cosm_main: Document 'force' function argument Fixes the following W=1 kernel build warning: drivers/misc/mic/cosm/cosm_main.c:31: warning: Function parameter or member 'force' not described in 'cosm_hw_reset' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-16-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 438ad36850d74ebb43500e26920b792b54f81a5f Author: Lee Jones Date: Wed Jul 1 09:31:02 2020 +0100 misc: mic: host: mic_debugfs: Demote function headers from kerneldoc The correct format is not used and no attempt has been made to document the function arguments. Makes sense to just demote the headers back down to simple comments. Fixes the following W=1 warnings: drivers/misc/mic/host/mic_debugfs.c:108: warning: Function parameter or member 'mdev' not described in 'mic_create_debug_dir' drivers/misc/mic/host/mic_debugfs.c:131: warning: Function parameter or member 'mdev' not described in 'mic_delete_debug_dir' Cc: Sudeep Dutt Cc: Ashutosh Dixit Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-15-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 49f093f4b27ab73b0057e44c723665c0f58f16dd Author: Lee Jones Date: Wed Jul 1 09:31:01 2020 +0100 misc: mic: card: mic_debugfs: Demote function headers from kerneldoc The correct format is not used and no attempt has been made to document the function arguments. Makes sense to just demote the headers back down to simple comments. Fixes the following W=1 warnings: drivers/misc/mic/card/mic_debugfs.c:31: warning: Function parameter or member 's' not described in 'mic_intr_show' drivers/misc/mic/card/mic_debugfs.c:31: warning: Function parameter or member 'unused' not described in 'mic_intr_show' drivers/misc/mic/card/mic_debugfs.c:53: warning: Function parameter or member 'mdrv' not described in 'mic_create_card_debug_dir' drivers/misc/mic/card/mic_debugfs.c:67: warning: Function parameter or member 'mdrv' not described in 'mic_delete_card_debug_dir' Cc: Sudeep Dutt Cc: Ashutosh Dixit Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-14-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 521482b53246139524d9c873b95dfd48f6b1add0 Author: Lee Jones Date: Wed Jul 1 09:31:00 2020 +0100 misc: mic: host: mic_x100: Add missing descriptions to kerneldoc headers Fixes the following W=1 warnings: drivers/misc/mic/host/mic_x100.c:127: warning: Function parameter or member 'doorbell' not described in 'mic_x100_send_sbox_intr' drivers/misc/mic/host/mic_x100.c:148: warning: Function parameter or member 'doorbell' not described in 'mic_x100_send_rdmasr_intr' drivers/misc/mic/host/mic_x100.c:511: warning: Function parameter or member 'dma_addr' not described in 'mic_x100_smpt_set' drivers/misc/mic/host/mic_x100.c:511: warning: Function parameter or member 'index' not described in 'mic_x100_smpt_set' Cc: Sudeep Dutt Cc: Ashutosh Dixit Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-13-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f10957dba54a170f45614ea0f063a666d495b1b5 Author: Lee Jones Date: Wed Jul 1 09:30:59 2020 +0100 misc: mic: host: mic_intr: Properly document function arguments mic_interrupt() and mic_setup_msix() have incomplete documentation. Fixes the following W=1 kernel build warnings: drivers/misc/mic/host/mic_intr.c:42: warning: Function parameter or member 'irq' not described in 'mic_interrupt' drivers/misc/mic/host/mic_intr.c:42: warning: Function parameter or member 'dev' not described in 'mic_interrupt' drivers/misc/mic/host/mic_intr.c:188: warning: Function parameter or member 'pdev' not described in 'mic_setup_msix' Cc: Sudeep Dutt Cc: Ashutosh Dixit Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-12-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 779b961c4d752efb9a1b78e5dedc7936eb426ae0 Author: Lee Jones Date: Wed Jul 1 09:30:58 2020 +0100 misc: ibmasm: dot_command: Demote function headers from kerneldoc The correct format is not used and no attempt has been made to document the function arguments. Makes sense to just demote the header back down to a simple comment. Fixes the following W=1 warnings: drivers/misc/ibmasm/dot_command.c:18: warning: Function parameter or member 'sp' not described in 'ibmasm_receive_message' drivers/misc/ibmasm/dot_command.c:18: warning: Function parameter or member 'message' not described in 'ibmasm_receive_message' drivers/misc/ibmasm/dot_command.c:18: warning: Function parameter or member 'message_size' not described in 'ibmasm_receive_message' drivers/misc/ibmasm/dot_command.c:55: warning: Function parameter or member 'sp' not described in 'ibmasm_send_driver_vpd' drivers/misc/ibmasm/dot_command.c:111: warning: Function parameter or member 'sp' not described in 'ibmasm_send_os_state' drivers/misc/ibmasm/dot_command.c:111: warning: Function parameter or member 'os_state' not described in 'ibmasm_send_os_state' Cc: "Max Asböck" Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9c03520ea0bb92170aca87fb0a8449657a753796 Author: Lee Jones Date: Wed Jul 1 09:30:57 2020 +0100 misc: mic: host: mic_x100: Move declaration of mic_x100_intr_init[] into c-file mic_x100_intr_init[] is only ever used in mic_x100.c, so instead of listing to the compiler complain about unused static arrays simply move it into the c-file for direct consumption. This way it can stay 'static'. Fixes the following W=1 kernel build warning: In file included from drivers/misc/mic/host/mic_main.c:17: drivers/misc/mic/host/mic_x100.h:70:18: warning: ‘mic_x100_intr_init’ defined but not used [-Wunused-const-variable=] 70 | static const u16 mic_x100_intr_init[] = { | ^~~~~~~~~~~~~~~~~~ Cc: Sudeep Dutt Cc: Ashutosh Dixit Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-10-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e0a6ad87d088869181a27c08a131cb891ea3dd68 Author: Lee Jones Date: Wed Jul 1 09:30:56 2020 +0100 misc: ibmasm: r_heartbeat: Demote function headers from kerneldoc The correct format is not used and no attempt has been made to document the function arguments. Makes sense to just demote the header back down to a simple comment. Fixes the following W=1 warnings: drivers/misc/ibmasm/r_heartbeat.c:49: warning: Function parameter or member 'sp' not described in 'ibmasm_start_reverse_heartbeat' drivers/misc/ibmasm/r_heartbeat.c:49: warning: Function parameter or member 'rhb' not described in 'ibmasm_start_reverse_heartbeat' Cc: "Max Asböck" Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-9-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b7df87cfe3d13596820afdda73338d44172a643e Author: Lee Jones Date: Wed Jul 1 09:30:54 2020 +0100 misc: ibmasm: command: Demote function headers from kerneldoc The correct format is not used and no attempt has been made to document the function arguments. Makes sense to just demote the header back down to a simple comment. Fixes the following W=1 warnings: drivers/misc/ibmasm/command.c:106: warning: Function parameter or member 'sp' not described in 'ibmasm_exec_command' drivers/misc/ibmasm/command.c:106: warning: Function parameter or member 'cmd' not described in 'ibmasm_exec_command' drivers/misc/ibmasm/command.c:149: warning: Function parameter or member 'cmd' not described in 'ibmasm_wait_for_response' drivers/misc/ibmasm/command.c:149: warning: Function parameter or member 'timeout' not described in 'ibmasm_wait_for_response' drivers/misc/ibmasm/command.c:162: warning: Function parameter or member 'sp' not described in 'ibmasm_receive_command_response' drivers/misc/ibmasm/command.c:162: warning: Function parameter or member 'response' not described in 'ibmasm_receive_command_response' drivers/misc/ibmasm/command.c:162: warning: Function parameter or member 'size' not described in 'ibmasm_receive_command_response' Cc: "Max Asböck" Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 63969cf28873d6c206fb34f2e4120fe7d7679e1e Author: Lee Jones Date: Wed Jul 1 09:30:53 2020 +0100 misc: ibmasm: event: Demote function headers from kerneldoc The correct format is not used and no attempt has been made to document the function arguments. Makes sense to just demote the header back down to a simple comment. Fixes the following W=1 warnings: drivers/misc/ibmasm/event.c:44: warning: Function parameter or member 'sp' not described in 'ibmasm_receive_event' drivers/misc/ibmasm/event.c:44: warning: Function parameter or member 'data' not described in 'ibmasm_receive_event' drivers/misc/ibmasm/event.c:44: warning: Function parameter or member 'data_size' not described in 'ibmasm_receive_event' drivers/misc/ibmasm/event.c:78: warning: Function parameter or member 'sp' not described in 'ibmasm_get_next_event' drivers/misc/ibmasm/event.c:78: warning: Function parameter or member 'reader' not described in 'ibmasm_get_next_event' Cc: "Max Asböck" Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 95ef32cdef161d8f4085967049a908558aa8797c Author: Lee Jones Date: Wed Jul 1 09:30:52 2020 +0100 misc: sgi-xp: xp_main: Staticify local functions xp_init() and xp_exit() These functions are not exported and no external prototypes exist Fixes W=1 kernel build warning(s): drivers/misc/sgi-xp/xp_main.c:227:1: warning: no previous prototype for ‘xp_init’ [-Wmissing-prototypes] 227 | xp_init(void) | ^~~~~~~ drivers/misc/sgi-xp/xp_main.c:250:1: warning: no previous prototype for ‘xp_exit’ [-Wmissing-prototypes] 250 | xp_exit(void) | ^~~~~~~ Cc: Cliff Whickman Cc: Robin Holt Cc: Dean Nelson Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f5429c2cecfebae0b8ee6ba8e591a9d5b34f612c Author: Lee Jones Date: Wed Jul 1 09:30:51 2020 +0100 misc: genwqe: card_debugfs: Demote file header from kerneldoc Kerneldoc does not understand file headers. There is therefor no reason for them to use the syntax. Fixes the following W=1 kernel build warnings: drivers/misc/genwqe/card_debugfs.c:30: warning: Function parameter or member 's' not described in 'dbg_uidn_show' drivers/misc/genwqe/card_debugfs.c:30: warning: Function parameter or member 'regs' not described in 'dbg_uidn_show' drivers/misc/genwqe/card_debugfs.c:30: warning: Function parameter or member 'entries' not described in 'dbg_uidn_show' Cc: Michael Jung Cc: Michael Ruettger Cc: Frank Haverkamp Cc: Joerg-Stephan Vogt Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit ac36fdb1b92e885a3b523265692c5b1954f8f61f Author: Lee Jones Date: Wed Jul 1 09:30:50 2020 +0100 misc: genwqe: card_sysfs: Demote function/file headers from kerneldoc There has been no attempt to provide documentation for these function's arguments, so align with the remainder of the file and just treat them as standards function headers. Fixes the following W=1 kernel build warnings: drivers/misc/genwqe/card_sysfs.c:32: warning: cannot understand function prototype: 'const char * const genwqe_types[] = ' drivers/misc/genwqe/card_sysfs.c:150: warning: Function parameter or member 'dev' not described in 'curr_bitstream_show' drivers/misc/genwqe/card_sysfs.c:150: warning: Function parameter or member 'attr' not described in 'curr_bitstream_show' drivers/misc/genwqe/card_sysfs.c:150: warning: Function parameter or member 'buf' not described in 'curr_bitstream_show' drivers/misc/genwqe/card_sysfs.c:166: warning: Function parameter or member 'dev' not described in 'next_bitstream_show' drivers/misc/genwqe/card_sysfs.c:166: warning: Function parameter or member 'attr' not described in 'next_bitstream_show' drivers/misc/genwqe/card_sysfs.c:166: warning: Function parameter or member 'buf' not described in 'next_bitstream_show' drivers/misc/genwqe/card_sysfs.c:271: warning: Function parameter or member 'kobj' not described in 'genwqe_is_visible' drivers/misc/genwqe/card_sysfs.c:271: warning: Function parameter or member 'attr' not described in 'genwqe_is_visible' drivers/misc/genwqe/card_sysfs.c:271: warning: Function parameter or member 'n' not described in 'genwqe_is_visible' Cc: Michael Jung Cc: Michael Ruettger Cc: Frank Haverkamp Cc: Joerg-Stephan Vogt Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7adb55bd4ee53f60e026575f80a12749750e4e5c Author: Lee Jones Date: Wed Jul 1 09:30:49 2020 +0100 misc: genwqe: card_ddcb: Fix a variety of kerneldoc issues Including; demoting file header from kerneldoc to standard comment/ header, adding a variety of missing function argument documentation, re-ordering of #defines i.e. not placed between kerneldoc headers and the functions they are documenting and re-documenting of changed/ renamed arguments. Fixes the following W=1 kernel build warnings: drivers/misc/genwqe/card_ddcb.c:83: warning: Function parameter or member 'queue' not described in 'queue_empty' drivers/misc/genwqe/card_ddcb.c:262: warning: Excess function parameter 'cd' description in 'RET_DDCB_APPENDED' drivers/misc/genwqe/card_ddcb.c:262: warning: Excess function parameter 'queue' description in 'RET_DDCB_APPENDED' drivers/misc/genwqe/card_ddcb.c:262: warning: Excess function parameter 'ddcb_no' description in 'RET_DDCB_APPENDED' drivers/misc/genwqe/card_ddcb.c:329: warning: Function parameter or member 'req' not described in 'copy_ddcb_results' drivers/misc/genwqe/card_ddcb.c:329: warning: Function parameter or member 'ddcb_no' not described in 'copy_ddcb_results' drivers/misc/genwqe/card_ddcb.c:364: warning: Function parameter or member 'queue' not described in 'genwqe_check_ddcb_queue' drivers/misc/genwqe/card_ddcb.c:565: warning: Function parameter or member 'queue' not described in 'get_next_ddcb' drivers/misc/genwqe/card_ddcb.c:565: warning: Function parameter or member 'num' not described in 'get_next_ddcb' drivers/misc/genwqe/card_ddcb.c:909: warning: Function parameter or member 'cmd' not described in '__genwqe_execute_raw_ddcb' drivers/misc/genwqe/card_ddcb.c:909: warning: Excess function parameter 'req' description in '__genwqe_execute_raw_ddcb' drivers/misc/genwqe/card_ddcb.c:972: warning: Function parameter or member 'cd' not described in 'genwqe_next_ddcb_ready' drivers/misc/genwqe/card_ddcb.c:1002: warning: Function parameter or member 'cd' not described in 'genwqe_ddcbs_in_flight' drivers/misc/genwqe/card_ddcb.c:1181: warning: Function parameter or member 'data' not described in 'genwqe_card_thread' drivers/misc/genwqe/card_ddcb.c:1308: warning: Function parameter or member 'cd' not described in 'queue_wake_up_all' drivers/misc/genwqe/card_ddcb.c:1333: warning: Function parameter or member 'cd' not described in 'genwqe_finish_queue' Cc: Michael Jung Cc: Michael Ruettger Cc: Frank Haverkamp Cc: Joerg-Stephan Vogt Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701083118.45744-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 364b40c05d9a1f78bcdc08b5ba91afa71ed05185 Author: Lee Jones Date: Wed Jul 1 09:58:53 2020 +0100 misc: genwqe: card_utils: Whole a plethora of documentation issues Including; demoting file header from kerneldoc to standard comment/ header, adding a variety of missing function argument documentation, repairing formatting (kerneldoc does not like blank lines) and the demotion of a kerneldoc header which shows no interest in providing documentation for any of its arguments. Fixes this the following W=1 issues: drivers/misc/genwqe/card_utils.c:37: warning: Incorrect use of kernel-doc format: * __genwqe_writeq() - Write 64-bit register drivers/misc/genwqe/card_utils.c:45: warning: Function parameter or member 'cd' not described in '__genwqe_writeq' drivers/misc/genwqe/card_utils.c:45: warning: Function parameter or member 'byte_offs' not described in '__genwqe_writeq' drivers/misc/genwqe/card_utils.c:45: warning: Function parameter or member 'val' not described in '__genwqe_writeq' drivers/misc/genwqe/card_utils.c:136: warning: Function parameter or member 'cd' not described in 'genwqe_read_app_id' drivers/misc/genwqe/card_utils.c:136: warning: Function parameter or member 'app_name' not described in 'genwqe_read_app_id' drivers/misc/genwqe/card_utils.c:136: warning: Function parameter or member 'len' not described in 'genwqe_read_app_id' drivers/misc/genwqe/card_utils.c:186: warning: bad line: drivers/misc/genwqe/card_utils.c:290: warning: Function parameter or member 'cd' not described in 'genwqe_alloc_sync_sgl' drivers/misc/genwqe/card_utils.c:290: warning: Function parameter or member 'sgl' not described in 'genwqe_alloc_sync_sgl' drivers/misc/genwqe/card_utils.c:290: warning: Function parameter or member 'user_addr' not described in 'genwqe_alloc_sync_sgl' drivers/misc/genwqe/card_utils.c:290: warning: Function parameter or member 'user_size' not described in 'genwqe_alloc_sync_sgl' drivers/misc/genwqe/card_utils.c:290: warning: Function parameter or member 'write' not described in 'genwqe_alloc_sync_sgl' drivers/misc/genwqe/card_utils.c:469: warning: Function parameter or member 'cd' not described in 'genwqe_free_sync_sgl' drivers/misc/genwqe/card_utils.c:469: warning: Function parameter or member 'sgl' not described in 'genwqe_free_sync_sgl' drivers/misc/genwqe/card_utils.c:716: warning: Function parameter or member 'count' not described in 'genwqe_set_interrupt_capability' drivers/misc/genwqe/card_utils.c:747: warning: Function parameter or member 'idx' not described in 'set_reg_idx' drivers/misc/genwqe/card_utils.c:747: warning: Excess function parameter 'index' description in 'set_reg_idx' drivers/misc/genwqe/card_utils.c:823: warning: Function parameter or member 'cd' not described in 'genwqe_ffdc_buff_size' drivers/misc/genwqe/card_utils.c:823: warning: Function parameter or member 'uid' not described in 'genwqe_ffdc_buff_size' drivers/misc/genwqe/card_utils.c:877: warning: Function parameter or member 'cd' not described in 'genwqe_ffdc_buff_read' drivers/misc/genwqe/card_utils.c:877: warning: Function parameter or member 'uid' not described in 'genwqe_ffdc_buff_read' drivers/misc/genwqe/card_utils.c:877: warning: Function parameter or member 'regs' not described in 'genwqe_ffdc_buff_read' drivers/misc/genwqe/card_utils.c:877: warning: Function parameter or member 'max_regs' not described in 'genwqe_ffdc_buff_read' drivers/misc/genwqe/card_utils.c:964: warning: Function parameter or member 'cd' not described in 'genwqe_write_vreg' drivers/misc/genwqe/card_utils.c:964: warning: Function parameter or member 'reg' not described in 'genwqe_write_vreg' drivers/misc/genwqe/card_utils.c:964: warning: Function parameter or member 'val' not described in 'genwqe_write_vreg' drivers/misc/genwqe/card_utils.c:964: warning: Function parameter or member 'func' not described in 'genwqe_write_vreg' drivers/misc/genwqe/card_utils.c:977: warning: Function parameter or member 'cd' not described in 'genwqe_read_vreg' drivers/misc/genwqe/card_utils.c:977: warning: Function parameter or member 'reg' not described in 'genwqe_read_vreg' drivers/misc/genwqe/card_utils.c:977: warning: Function parameter or member 'func' not described in 'genwqe_read_vreg' drivers/misc/genwqe/card_utils.c:995: warning: Function parameter or member 'cd' not described in 'genwqe_base_clock_frequency' drivers/misc/genwqe/card_utils.c:1012: warning: Function parameter or member 'cd' not described in 'genwqe_stop_traps' drivers/misc/genwqe/card_utils.c:1022: warning: Function parameter or member 'cd' not described in 'genwqe_start_traps' Cc: Michael Jung Cc: Michael Ruettger Cc: Frank Haverkamp Cc: Joerg-Stephan Vogt Signed-off-by: Lee Jones Reviewed-by: Frank Haverkamp # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Date: Mon Jun 29 10:30:56 2020 +0100 # # On branch tb-mfd-fix-warnings # Changes to be committed: # modified: drivers/misc/genwqe/card_utils.c # # Untracked files: # qemu-i2c-devs.txt # Link: https://lore.kernel.org/r/20200701085853.164358-21-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 807062fc8b2bb113d0ebc9262d2e1a39121e060d Author: Lee Jones Date: Wed Jul 1 09:58:52 2020 +0100 misc: genwqe: card_dev: Whole host of kerneldoc fixes Including; add missing documentation for function arguments, re-ordering of #defines i.e. not placed between kerneldoc headers and the functions they are documenting, demotion of file header/comment from kerneldoc format and removal of documentation for non-existent args. Fixes the following W=1 kernel build warnings: drivers/misc/genwqe/card_dev.c:33: warning: Function parameter or member 'cd' not described in 'genwqe_open_files' drivers/misc/genwqe/card_dev.c:98: warning: Function parameter or member 'virt_addr' not described in 'genwqe_search_pin' drivers/misc/genwqe/card_dev.c:98: warning: Excess function parameter 'dma_addr' description in 'genwqe_search_pin' drivers/misc/genwqe/card_dev.c:154: warning: Function parameter or member 'virt_addr' not described in '__genwqe_search_mapping' drivers/misc/genwqe/card_dev.c:256: warning: Function parameter or member 'cd' not described in 'genwqe_kill_fasync' drivers/misc/genwqe/card_dev.c:256: warning: Function parameter or member 'sig' not described in 'genwqe_kill_fasync' drivers/misc/genwqe/card_dev.c:387: warning: Function parameter or member 'vma' not described in 'genwqe_vma_close' drivers/misc/genwqe/card_dev.c:430: warning: Function parameter or member 'filp' not described in 'genwqe_mmap' drivers/misc/genwqe/card_dev.c:430: warning: Function parameter or member 'vma' not described in 'genwqe_mmap' drivers/misc/genwqe/card_dev.c:495: warning: Excess function parameter 'cd' description in 'FLASH_BLOCK' drivers/misc/genwqe/card_dev.c:495: warning: Excess function parameter 'load' description in 'FLASH_BLOCK' drivers/misc/genwqe/card_dev.c:827: warning: Function parameter or member 'cfile' not described in 'ddcb_cmd_cleanup' drivers/misc/genwqe/card_dev.c:827: warning: Function parameter or member 'req' not described in 'ddcb_cmd_cleanup' drivers/misc/genwqe/card_dev.c:854: warning: Function parameter or member 'cfile' not described in 'ddcb_cmd_fixups' drivers/misc/genwqe/card_dev.c:854: warning: Function parameter or member 'req' not described in 'ddcb_cmd_fixups' drivers/misc/genwqe/card_dev.c:984: warning: Function parameter or member 'cfile' not described in 'genwqe_execute_ddcb' drivers/misc/genwqe/card_dev.c:984: warning: Function parameter or member 'cmd' not described in 'genwqe_execute_ddcb' drivers/misc/genwqe/card_dev.c:1350: warning: Function parameter or member 'cd' not described in 'genwqe_device_remove' Cc: Michael Jung Cc: Michael Ruettger Cc: Frank Haverkamp Cc: Joerg-Stephan Vogt Signed-off-by: Lee Jones Reviewed-by: Frank Haverkamp Link: https://lore.kernel.org/r/20200701085853.164358-20-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a562c0c3e54a3878421e586fe3ea81a99bc02c84 Author: Lee Jones Date: Wed Jul 1 09:58:51 2020 +0100 misc: genwqe: card_base: Whole host of kerneldoc fixes >From missing documentation for function arguments, to promotion obvious kerneldoc headers and incorrectly named arguments. Fixes the following W=1 warnings: drivers/misc/genwqe/card_base.c:175: warning: Function parameter or member 'cd' not described in 'genwqe_bus_reset' drivers/misc/genwqe/card_base.c:272: warning: Function parameter or member 'cd' not described in 'genwqe_recovery_on_fatal_gfir_required' drivers/misc/genwqe/card_base.c:293: warning: Function parameter or member 'cd' not described in 'genwqe_T_psec' drivers/misc/genwqe/card_base.c:314: warning: Function parameter or member 'cd' not described in 'genwqe_setup_pf_jtimer' drivers/misc/genwqe/card_base.c:334: warning: Function parameter or member 'cd' not described in 'genwqe_setup_vf_jtimer' drivers/misc/genwqe/card_base.c:557: warning: Function parameter or member 'cd' not described in 'genwqe_stop' drivers/misc/genwqe/card_base.c:617: warning: Function parameter or member 'cd' not described in 'genwqe_fir_checking' drivers/misc/genwqe/card_base.c:760: warning: Function parameter or member 'pci_dev' not described in 'genwqe_pci_fundamental_reset' drivers/misc/genwqe/card_base.c:889: warning: Function parameter or member 'data' not described in 'genwqe_health_thread' drivers/misc/genwqe/card_base.c:1046: warning: Function parameter or member 'cd' not described in 'genwqe_pci_setup' drivers/misc/genwqe/card_base.c:1131: warning: Function parameter or member 'cd' not described in 'genwqe_pci_remove' drivers/misc/genwqe/card_base.c:1151: warning: Function parameter or member 'pci_dev' not described in 'genwqe_probe' drivers/misc/genwqe/card_base.c:1151: warning: Function parameter or member 'id' not described in 'genwqe_probe' drivers/misc/genwqe/card_base.c:1151: warning: Excess function parameter 'pdev' description in 'genwqe_probe' drivers/misc/genwqe/card_base.c:1207: warning: Function parameter or member 'pci_dev' not described in 'genwqe_remove' drivers/misc/genwqe/card_base.c:1336: warning: Function parameter or member 'dev' not described in 'genwqe_devnode' drivers/misc/genwqe/card_base.c:1336: warning: Function parameter or member 'mode' not described in 'genwqe_devnode' Cc: Michael Jung Cc: Michael Ruettger Cc: Frank Haverkamp Cc: Joerg-Stephan Vogt Signed-off-by: Lee Jones Reviewed-by: Frank Haverkamp Link: https://lore.kernel.org/r/20200701085853.164358-19-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f5721c7acc4af3cf1d0996f7a8b293a10cad05d4 Author: Lee Jones Date: Wed Jul 1 09:58:50 2020 +0100 misc: genwqe: card_base: Provide documentation for genwqe_recover_card()'s args genwqe_recover_card()'s function arguments were missing from its kerneldoc header. Provide descriptions for 'cd' and 'fatal_err'. Fixes the following kernel build W=1 warning: drivers/misc/genwqe/card_base.c:588: warning: Function parameter or member 'cd' not described in 'genwqe_recover_card' drivers/misc/genwqe/card_base.c:588: warning: Function parameter or member 'fatal_err' not described in 'genwqe_recover_card' Signed-off-by: Lee Jones Reviewed-by: Frank Haverkamp Link: https://lore.kernel.org/r/20200701085853.164358-18-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f33e92e50c82319718a21ec372f3df9eff59bfa9 Author: Lee Jones Date: Wed Jul 1 09:58:49 2020 +0100 misc: genwqe: card_base: Remove set but unused variable 'rc' Variable 'rc' hasn't been checked since the driver's inception in 2013. If it hasn't caused any issues since then, it's unlikely to in the future. Let's take it out for now. Fixes the following W=1 kernel build warning(s): drivers/misc/genwqe/card_base.c: In function ‘genwqe_health_check_stop’: /home/lee/projects/linux/kernel/drivers/misc/genwqe/card_base.c:1046:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] 1046 | int rc; | ^~ Cc: Michael Jung Cc: Michael Ruettger Cc: Frank Haverkamp Cc: Joerg-Stephan Vogt Signed-off-by: Lee Jones Reviewed-by: Frank Haverkamp Link: https://lore.kernel.org/r/20200701085853.164358-17-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6a57251c70a4ab48ed5efa8a55f43d0f6b47d508 Author: Lee Jones Date: Wed Jul 1 09:58:48 2020 +0100 misc: enclosure: Update enclosure_remove_device() documentation to match reality enclosure_remove_device() hasn't taken an 'int component for over a decade. Instead use kerneldoc to describe the 'struct device' actually passed in. Fixes the following W=1 kernel build warning(s): drivers/misc/enclosure.c:400: warning: Function parameter or member 'dev' not described in 'enclosure_remove_device' drivers/misc/enclosure.c:400: warning: Excess function parameter 'num' description in 'enclosure_remove_device' Cc: James Bottomley Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701085853.164358-16-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7b411871220af35722360cd1d1111c7fadfc29fe Author: Lee Jones Date: Wed Jul 1 09:58:47 2020 +0100 misc: pch_phub: Remove superfluous descriptions to non-existent args 'offset_address' Probably a copy 'n' paste error, 'offset_address' has never been part of the pch_phub_{read,write}_gbe_mac_addr() functions. Squashes the following W=1 warnings: drivers/misc/pch_phub.c:450: warning: Excess function parameter 'offset_address' description in 'pch_phub_read_gbe_mac_addr' drivers/misc/pch_phub.c:462: warning: Excess function parameter 'offset_address' description in 'pch_phub_write_gbe_mac_addr' Cc: Masayuki Ohtak Cc: Tomoya MORINAGA Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701085853.164358-15-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0f8ab9bd9e48c90728f4b80672fc58009fa2b071 Author: Lee Jones Date: Wed Jul 1 09:58:46 2020 +0100 misc: pch_phub: Provide descriptions for 'chip' argument For some reason (probably copy 'n' paste) kerneldoc descriptions were missing for all instances of 'chip'. Providing them squashes the following W=1 kernel build warnings: drivers/misc/pch_phub.c:145: warning: Function parameter or member 'chip' not described in 'pch_phub_read_modify_write_reg' drivers/misc/pch_phub.c:282: warning: Function parameter or member 'chip' not described in 'pch_phub_read_serial_rom' drivers/misc/pch_phub.c:296: warning: Function parameter or member 'chip' not described in 'pch_phub_write_serial_rom' drivers/misc/pch_phub.c:334: warning: Function parameter or member 'chip' not described in 'pch_phub_read_serial_rom_val' drivers/misc/pch_phub.c:350: warning: Function parameter or member 'chip' not described in 'pch_phub_write_serial_rom_val' drivers/misc/pch_phub.c:450: warning: Function parameter or member 'chip' not described in 'pch_phub_read_gbe_mac_addr' drivers/misc/pch_phub.c:462: warning: Function parameter or member 'chip' not described in 'pch_phub_write_gbe_mac_addr' Cc: Masayuki Ohtak Cc: Tomoya MORINAGA Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701085853.164358-14-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 8bc056e84a66e37efda30a3a66db9a27f023d9ba Author: Lee Jones Date: Wed Jul 1 09:58:45 2020 +0100 misc: lattice-ecp3-config: Remove set but clearly unused variable 'ret' It's odd for the return value to be assigned to a variable so many times, but never actually checked, but this has been the case since the driver's inception in 2012. If it hasn't caused any issues by now, it's probably unlikely to. Let's take it out, at least until someone finds a reason to start using it. Fixes the following W=1 kernel build warning: drivers/misc/lattice-ecp3-config.c: In function ‘firmware_load’: drivers/misc/lattice-ecp3-config.c:70:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 70 | int ret; | ^~~ Cc: Stefan Roese Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701085853.164358-13-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 82f5b473d91a7f4e687207fb6d53f7c55669fcd0 Author: Lee Jones Date: Wed Jul 1 09:58:44 2020 +0100 misc: enclosure: Fix some kerneldoc anomalies Firstly some missing function argument documentation, then some whch are present, but are incorrectly named. Fixes the following W=1 kernel build warnings: drivers/misc/enclosure.c:115: warning: Function parameter or member 'name' not described in 'enclosure_register' drivers/misc/enclosure.c:115: warning: Function parameter or member 'cb' not described in 'enclosure_register' drivers/misc/enclosure.c:283: warning: Function parameter or member 'number' not described in 'enclosure_component_alloc' drivers/misc/enclosure.c:283: warning: Excess function parameter 'num' description in 'enclosure_component_alloc' drivers/misc/enclosure.c:363: warning: Function parameter or member 'component' not described in 'enclosure_add_device' drivers/misc/enclosure.c:363: warning: Excess function parameter 'num' description in 'enclosure_add_device' drivers/misc/enclosure.c:398: warning: Function parameter or member 'dev' not described in 'enclosure_remove_device' drivers/misc/enclosure.c:398: warning: Excess function parameter 'num' description in 'enclosure_remove_device' Cc: James Bottomley Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701085853.164358-12-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 14395c6fb1350d59bf8fed1f5a224c638af77196 Author: Lee Jones Date: Wed Jul 1 09:58:43 2020 +0100 misc: habanalabs: gaudi: gaudi_security: Repair incorrectly named function arg gaudi_pb_set_block()'s argument 'base' was incorrectly named 'block' in its function header. Fixes the following W=1 kernel build warning(s): drivers/misc/habanalabs/gaudi/gaudi_security.c:454: warning: Function parameter or member 'base' not described in 'gaudi_pb_set_block' drivers/misc/habanalabs/gaudi/gaudi_security.c:454: warning: Excess function parameter 'block' description in 'gaudi_pb_set_block' Cc: Oded Gabbay Cc: Tomer Tayar Signed-off-by: Lee Jones Reviewed-by: Oded Gabbay Link: https://lore.kernel.org/r/20200701085853.164358-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f7d227c306531bca8def3e6e13be977a52554d85 Author: Lee Jones Date: Wed Jul 1 09:58:42 2020 +0100 misc: habanalabs: gaudi: Remove ill placed asterisk from kerneldoc header W=1 kernel builds report a lack of description of gaudi_set_asic_funcs()'s 'hdev' argument. In reality it is documented, but the formatting was not as expected '@.*:'. Instead, there was a misplaced asterisk which was confusing the kerneldoc validator. Squashes the following W=1 warning: drivers/misc/habanalabs/gaudi/gaudi.c:6746: warning: Function parameter or member 'hdev' not described in 'gaudi_set_asic_funcs' Cc: Oded Gabbay Cc: Tomer Tayar Signed-off-by: Lee Jones Reviewed-by: Oded Gabbay Link: https://lore.kernel.org/r/20200701085853.164358-10-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 67db05cea6f66da68fda47a0e38422c3d19479a8 Author: Lee Jones Date: Wed Jul 1 09:58:41 2020 +0100 misc: habanalabs: goya: goya_coresight: Remove set but unused variable 'val' No attempt to check the return value of RREG32() has been made since the call was introduced a year ago. Fixes W=1 kernel build warning: drivers/misc/habanalabs/goya/goya_coresight.c: In function ‘goya_debug_coresight’: drivers/misc/habanalabs/goya/goya_coresight.c:643:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] 643 | u32 val; | ^~~ Cc: Oded Gabbay Cc: Tomer Tayar Signed-off-by: Lee Jones Reviewed-by: Oded Gabbay Link: https://lore.kernel.org/r/20200701085853.164358-9-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e0712c600e7b3e7cf29de9dc0cd178aac5250958 Author: Lee Jones Date: Wed Jul 1 09:58:40 2020 +0100 misc: habanalabs: pci: Scrub documentation for non-present function argument 'dma_mask' is not passed directly into hl_pci_set_dma_mask() as an argument. Instead, it is pulled from struct hl_device *hdev. Fixed the following W=1 warning: drivers/misc/habanalabs/pci.c:328: warning: Excess function parameter 'dma_mask' description in 'hl_pci_set_dma_mask Cc: Oded Gabbay Cc: Tomer Tayar Signed-off-by: Lee Jones Reviewed-by: Oded Gabbay Link: https://lore.kernel.org/r/20200701085853.164358-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2557f27fd4891c3475b764d6ce3c48cc9265d424 Author: Lee Jones Date: Wed Jul 1 09:58:39 2020 +0100 misc: habanalabs: goya: Omit pointless check ensuring addr is >=0 Seeing as 'addr' is unsigned, it would be impossible for the assigned value to be anything other than zero or positive. Squashes the following W=1 warnings: drivers/misc/habanalabs/goya/goya.c: In function ‘goya_debugfs_read32’: drivers/misc/habanalabs/goya/goya.c:3945:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 3945 | } else if ((addr >= DRAM_PHYS_BASE) && | ^~ drivers/misc/habanalabs/goya/goya.c: In function ‘goya_debugfs_write32’: drivers/misc/habanalabs/goya/goya.c:4002:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 4002 | } else if ((addr >= DRAM_PHYS_BASE) && | ^~ drivers/misc/habanalabs/goya/goya.c: In function ‘goya_debugfs_read64’: drivers/misc/habanalabs/goya/goya.c:4047:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 4047 | } else if ((addr >= DRAM_PHYS_BASE) && | ^~ drivers/misc/habanalabs/goya/goya.c: In function ‘goya_debugfs_write64’: drivers/misc/habanalabs/goya/goya.c:4091:19: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] 4091 | } else if ((addr >= DRAM_PHYS_BASE) && | ^~ drivers/misc/habanalabs/pci.c:328: warning: Excess function parameter 'dma_mask' description in 'hl_pci_set_dma_mask' drivers/misc/habanalabs/goya/goya_coresight.c: In function ‘goya_debug_coresight’: drivers/misc/habanalabs/goya/goya_coresight.c:643:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] 643 | u32 val; | ^~~ Cc: Oded Gabbay Cc: Tomer Tayar Signed-off-by: Lee Jones Reviewed-by: Oded Gabbay Link: https://lore.kernel.org/r/20200701085853.164358-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3db99f000b76bbd5d3ffc042e4cf91e934c996ac Author: Lee Jones Date: Wed Jul 1 09:58:38 2020 +0100 misc: habanalabs: irq: Repair kerneldoc formatting issues W=1 kernel builds report a lack of descriptions for various function arguments. In reality they are documented, but the formatting was not as expected '@.*:'. Instead, '-'s were used as separators. While we're here, the headers for functions various functions were written in kerneldoc format, but lack the kerneldoc identifier '/**'. Let's promote them so they can gain access to the checker. This change fixes the following W=1 warnings: drivers/misc/habanalabs/irq.c:24: warning: Function parameter or member 'eq_work' not described in 'hl_eqe_work' drivers/misc/habanalabs/irq.c:24: warning: Function parameter or member 'hdev' not described in 'hl_eqe_work' drivers/misc/habanalabs/irq.c:24: warning: Function parameter or member 'eq_entry' not described in 'hl_eqe_work' Cc: Oded Gabbay Cc: Tomer Tayar Signed-off-by: Lee Jones Reviewed-by: Oded Gabbay Link: https://lore.kernel.org/r/20200701085853.164358-6-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit df123c9dcde7f14a69a276b801b310805d200ada Author: Lee Jones Date: Wed Jul 1 09:58:37 2020 +0100 misc: habanalabs: pci: Fix a variety of kerneldoc issues hl_pci_bars_map() has a miss-typed argument name in the function description. hl_pci_elbi_write() was missing documented arguments. The headers for functions hl_pci_bars_unmap(), hl_pci_elbi_write() and hl_pci_reset_link_through_bridge() were written in kerneldoc format, but lack the kerneldoc identifier '/**'. Let's promote them so they can gain access to the checker. These changes fix the following W=1 kernel build warnings: drivers/misc/habanalabs/pci.c:27: warning: Function parameter or member 'name' not described in 'hl_pci_bars_map' drivers/misc/habanalabs/pci.c:27: warning: Excess function parameter 'bar_name' description in 'hl_pci_bars_map' drivers/misc/habanalabs/pci.c:147: warning: Function parameter or member 'addr' not described in 'hl_pci_iatu_write' drivers/misc/habanalabs/pci.c:147: warning: Function parameter or member 'data' not described in 'hl_pci_iatu_write' drivers/misc/habanalabs/pci.c:324: warning: Excess function parameter 'dma_mask' description in 'hl_pci_set_dma_mask' Cc: Oded Gabbay Cc: Tomer Tayar Signed-off-by: Lee Jones Reviewed-by: Oded Gabbay Link: https://lore.kernel.org/r/20200701085853.164358-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit a0c11b3c91e053128d13d988de8b9bcb76c5adfe Author: Lee Jones Date: Wed Jul 1 09:58:36 2020 +0100 misc: habanalabs: firmware_if: Add missing 'fw_name' and 'dst' entries to function header Looks as though documentation for these function arguments have been missing since the driver's inception last year. Fixes the following W=1 kernel build warnings: drivers/misc/habanalabs/firmware_if.c:26: warning: Function parameter or member 'fw_name' not described in 'hl_fw_load_fw_to_device' drivers/misc/habanalabs/firmware_if.c:26: warning: Function parameter or member 'dst' not described in 'hl_fw_load_fw_to_device' Cc: Oded Gabbay Cc: Tomer Tayar Signed-off-by: Lee Jones Reviewed-by: Oded Gabbay Link: https://lore.kernel.org/r/20200701085853.164358-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6e47fc8a68230c8803db2724b8a22f2725753386 Author: Lee Jones Date: Wed Jul 1 09:58:35 2020 +0100 misc: pti: Remove unparsable empty line in function header The kerneldoc tooling/parsers/validators get confused if non- standard formatting is used. The first line after the kerneldoc identifier '/**' must not be blank else the following warnings will be issued: drivers/misc/pti.c:902: warning: Cannot understand * on line 902 - I thought it was a doc line Cc: J Freyensee Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701085853.164358-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f2e1d306fc7dc0f813bcd3559dc6959272a0aaa9 Author: Lee Jones Date: Wed Jul 1 09:58:34 2020 +0100 misc: pti: Repair kerneldoc formatting issues W=1 kernel builds report a lack of descriptions for various function arguments. In reality they are documented, but the formatting was not as expected '@.*:'. Instead, '-'s were used as separators. This change fixes the following warnings: drivers/misc/pti.c:748: warning: Function parameter or member 'port' not described in 'pti_port_activate' drivers/misc/pti.c:748: warning: Function parameter or member 'tty' not described in 'pti_port_activate' drivers/misc/pti.c:765: warning: Function parameter or member 'port' not described in 'pti_port_shutdown' drivers/misc/pti.c:793: warning: Function parameter or member 'pdev' not described in 'pti_pci_probe' drivers/misc/pti.c:793: warning: Function parameter or member 'ent' not described in 'pti_pci_probe' Cc: J Freyensee Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200701085853.164358-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit fc6200948275383ca214bb30dd175dfd0d61149b Author: Imre Deak Date: Mon Jun 29 21:58:48 2020 +0300 drm/i915/icl+: Simplify combo/TBT PLL calculation call-chain To simplify things, call the combo PHY/TBT PLL calculation functions directly from the corresponding combo/TypeC PLL get functions, instead of calling the same calculation functions after having to recheck if the given PHY is combo or TypeC. Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200629185848.20550-2-imre.deak@intel.com commit 09eac8277262bea10a52159f90dcb55beffe0714 Author: Imre Deak Date: Mon Jun 29 21:58:47 2020 +0300 drm/i915/tgl+: Fix TBT DPLL fractional divider for 38.4MHz ref clock When the reference clock is 38.4MHz, using the current TBT PLL fractional divider value results in a slightly off TBT link frequency. This causes an endless loop of link training success followed by a bad link signaling and retraining at least on a Dell WD19TB TBT dock. The workaround provided by the HW team is to divide the fractional divider value by two. This fixed the link training problem on the ThinkPad dock. The same workaround is needed on some EHL platforms and for combo PHY PLLs, these will be addressed in a follow-up. Bspec: 49204 References: HSDES#22010772725 References: HSDES#14011861142 Reported-and-tested-by: Khaled Almahallawy Signed-off-by: Imre Deak Reviewed-by: Khaled Almahallawy Link: https://patchwork.freedesktop.org/patch/msgid/20200629185848.20550-1-imre.deak@intel.com commit e4bfde13e323f9ee5f2f38aa5cac0676dd656f8e Author: Shunqian Zheng Date: Fri Apr 3 13:15:37 2020 -0300 arm64: dts: rockchip: add rx0 mipi-phy for rk3399 Designware MIPI D-PHY, used for ISP0 in rk3399. Verified with: make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/phy/rockchip-mipi-dphy-rx0.yaml Signed-off-by: Shunqian Zheng Signed-off-by: Jacob Chen Signed-off-by: Helen Koike Link: https://lore.kernel.org/r/20200403161538.1375908-9-helen.koike@collabora.com Signed-off-by: Heiko Stuebner commit f3c1c41ebc67f0954fb47cec512ab23519223634 Author: Heikki Krogerus Date: Wed Jul 1 14:56:18 2020 +0300 usb: typec: intel_pmc_mux: Add support for USB4 The PMC mux-agent can be used also to enter USB4 mode. The mux-agent does not have USB4 specific message, but it can be put into the TBT3 alternate mode also with USB4. That is OK because the controller is in any case the same with TBT3 and USB4. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200701115618.22482-5-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b7404a29cd3db0bf9537addf36b0fa33b58a645a Author: Heikki Krogerus Date: Wed Jul 1 14:56:17 2020 +0300 usb: typec: intel_pmc_mux: Definitions for response status bits Adding definitions for the two status bits that we have in the command response data structure. Also, from now on only considering the second status bit, which tells was the failure fatal or not, if the first bit is set. If the first bit is not set, then the command was successful, and we need to ignore the second bit. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200701115618.22482-4-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ad8db94d6813dc659bd4de0531a8a1150559eafb Author: Heikki Krogerus Date: Wed Jul 1 14:56:16 2020 +0300 usb: typec: Add data structure for Enter_USB message This data structure can be delivered to the mux drivers when Enter_USB Message is used exactly the same way as the Alternate Mode specific data structures are delivered to the mux drivers when Enter Mode Messages are used. The Enter_USB data structure shall have all details related to the Enter_USB Message, most importantly the Enter_USB Date Object that was used. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200701115618.22482-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f470a6554854123f763f6273e8266bd6ee89a97a Author: Heikki Krogerus Date: Wed Jul 1 14:56:15 2020 +0300 usb: typec: Combine the definitions for Accessory and USB modes There is no need to describe them sparately. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20200701115618.22482-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b9b70170db4d682049040608369e5103f43289d3 Author: Greg Kroah-Hartman Date: Tue Jun 30 19:41:23 2020 +0200 USB: Fix up terminology USB is a HOST/DEVICE protocol, as per the specification and all documentation. Fix up terms that are not applicable to make things match up with the terms used through the rest of the USB stack. Signed-off-by: Greg Kroah-Hartman Acked-by: Felipe Balbi Link: https://lore.kernel.org/r/20200630174123.GA1906678@kroah.com Signed-off-by: Greg Kroah-Hartman commit 43ff98695cc01779407d489fd546359c188222b4 Author: Randy Dunlap Date: Sun Jun 28 19:54:45 2020 -0700 usb: fix kernel-doc warnings and formatting in Fix kernel-doc warnings in : ../include/linux/usb.h:713: warning: Function parameter or member 'use_generic_driver' not described in 'usb_device' ../include/linux/usb.h:1253: warning: Function parameter or member 'match' not described in 'usb_device_driver' ../include/linux/usb.h:1253: warning: Function parameter or member 'id_table' not described in 'usb_device_driver' Also drop an extra blank line and fix indentation. Fixes: 77419aa403ca ("USB: Fallback to generic driver when specific driver fails") Fixes: 88b7381a939d ("USB: Select better matching USB drivers when available") Signed-off-by: Randy Dunlap Cc: Bastien Nocera Link: https://lore.kernel.org/r/7014bab2-268c-69f6-7ef5-57fbd45c8b08@infradead.org Signed-off-by: Greg Kroah-Hartman commit 06825ca0182cec9444fb2fd05e759757f30f4b37 Author: Peter Chen Date: Tue Jun 23 11:10:01 2020 +0800 usb: cdns3: gadget: use unsigned int for 32-bit number If it is 'int', it can't stands for the highest bit for 32-bit number, since the largest 'int' is 0x7fffffff. Reviewed-by: Jun Li Signed-off-by: Peter Chen Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20200623031001.8469-4-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit 8685c46d39910a6335cf120d2d2a5295ec0a60a5 Author: Peter Chen Date: Tue Jun 23 11:10:00 2020 +0800 usb: cdns3: gadget: unsigned int is dereferenced as a wider unsigned long It is reported by Coverity scan, and fixed it by declare the reg as unsigned long. Reviewed-by: Jun Li Signed-off-by: Peter Chen Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20200623031001.8469-3-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit 8a58264128d51b8304f800fc34dc184ea9d9bd2a Author: Peter Chen Date: Tue Jun 23 11:09:59 2020 +0800 usb: cdns3: ep0: delete the duplicate code The value '0' is duplicated with USB_DIR_OUT Signed-off-by: Peter Chen Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20200623031001.8469-2-peter.chen@nxp.com Signed-off-by: Greg Kroah-Hartman commit 81148a7ab79e8a5f1e9379d5fcdd7fb73896ec18 Author: Greg Kroah-Hartman Date: Wed Jul 1 13:44:25 2020 +0200 Revert "cardreader/rtsx_pcr.c: use generic power management" This reverts commit 6bf23661d4a7a105001ebb4410c1c0a17752fac4. 0-day reported build problems with it. Reported-by: kernel test robot Cc: Vaibhav Gupta Signed-off-by: Greg Kroah-Hartman commit 096a42dd1998a966c1b9e0cf489103d77d6473a5 Author: Chris Wilson Date: Wed Jul 1 09:44:39 2020 +0100 drm/i915/gem: Move obj->lut_list under its own lock The obj->lut_list is traversed when the object is closed as the file table is destroyed during process termination. As this occurs before we kill any outstanding context if, due to some bug or another, the closure is blocked, then we fail to shootdown any inflight operations potentially leaving the GPU spinning forever. As we only need to guard the list against concurrent closures and insertions, the hold is short and merits being treated as a simple spinlock. Signed-off-by: Chris Wilson Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/msgid/20200701084439.17025-1-chris@chris-wilson.co.uk commit 1cb36293833766e048cba2026dd860687a2851d9 Author: Mario Limonciello Date: Tue Jun 23 11:14:29 2020 -0500 thunderbolt: Add support for authenticate on disconnect Some external devices can support completing thunderbolt authentication when they are unplugged. For this to work though, the link controller must remain operational. The only device known to support this right now is the Dell WD19TB, so add a quirk for this. Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg commit 4b794f8066e84818c172c81024f1d61071f14710 Author: Mario Limonciello Date: Tue Jun 23 11:14:28 2020 -0500 thunderbolt: Add support for separating the flush to SPI and authenticate This allows userspace to have a shorter period of time that the device is unusable and to call it at a more convenient time. For example flushing the image may happen while the user is using the machine and authenticating/rebooting may happen while logging out. Signed-off-by: Mario Limonciello Signed-off-by: Mika Westerberg commit 4c767ce48cf858971545164c4c53d028e6241c07 Author: Colin Ian King Date: Tue Jun 30 15:55:58 2020 +0100 thunderbolt: Ensure left shift of 512 does not overflow a 32 bit int The 32 bit int value 512 is being left shifted and then used in a context that expects the expression to be a larger unsigned long. There may be a potential integer overflow, so make 512 a UL before shift to avoid any such issues. Addresses-Coverity: ("Uninintentional integer overflow") Fixes: 3b1d8d577ca8 ("thunderbolt: Implement USB3 bandwidth negotiation routines") Signed-off-by: Colin Ian King Signed-off-by: Mika Westerberg commit f3528630e2e7b1556b0f150f1e205462c66efe8e Author: Linus Walleij Date: Fri Jun 26 01:25:12 2020 +0200 backlight: lms501kf03: Drop unused include This driver includes but does not use any symbols from that file, drop the include. Signed-off-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit e994734fdca7309234a210169c7a7f2f446e430f Author: Linus Walleij Date: Fri Jun 26 12:25:00 2020 +0200 backlight: Delete the OT200 backlight driver This driver has no in-kernel users. The device can only be populated by board files since it does not support device tree nor ACPI, and nothing in the kernel creates a device named "ot200-backlight". This driver has been in the kernel since 2012. If it is used by out-of-tree code that code should have been upstreamed by now, it's been 8 years. It uses the idiomatic forked GPIO of the CS5535 which combines pin control and GPIO into its private custom interface, which causes me a headache because that is not how we do things these days: we creates separate pin control and GPIO drivers. Delete this unused driver. Cc: Christian Gmeiner Signed-off-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 08bf73a6f056d84fd52a58c5d165523dd84be535 Author: Linus Walleij Date: Fri Jun 26 22:37:42 2020 +0200 backlight: sky81452: Privatize platform data The only way the platform data for the SKY81452 ever gets populated is through the device tree. The MFD device is bothered with this for no reason at all. Just allocate the platform data in the driver and be happy. Cc: Gyungoh Yoo Signed-off-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit e1915eec54a6b4902664eaf6fb7a20de5624c4dd Author: Linus Walleij Date: Fri Jun 26 22:37:41 2020 +0200 backlight: sky81452: Convert to GPIO descriptors The SKY81452 backlight driver just obtains a GPIO (named "gpios" in the device tree) drives it high and leaves it high until the driver is removed. Switch to use GPIO descriptors for this, simple and straight-forward. Cc: Gyungoh Yoo Signed-off-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 3346dd99fb4cd174fdbfb68dc62cd109e4323f0f Author: Mike Rapoport Date: Wed Jun 10 10:24:55 2020 +0300 MAINTAINERS: remove "PKUNITY SOC DRIVERS" entry There no PkUnity drivers left, so remove the MAINTAINERS entry. Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: Guenter Roeck commit fa4b9519f074646252f6aeb33d9329a384439632 Author: Mike Rapoport Date: Wed Jun 10 09:57:50 2020 +0300 rtc: remove fb-puv3 driver The unicore32 port is removed from the kernel. There is no point to keep stale RTC driver for this architecture. Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: Guenter Roeck commit e26e59190ecd0b09a8778bbdc8239d0db78903c9 Author: Mike Rapoport Date: Wed Jun 10 09:57:50 2020 +0300 video: fbdev: remove fb-puv3 driver The unicore32 port is removed from the kernel. There is no point to keep stale fbdev driver for this architecture. Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: Guenter Roeck commit a2022e1cf368c5d8794b75a9b5eb5f078a9bdb76 Author: Mike Rapoport Date: Wed Jun 10 09:57:50 2020 +0300 pwm: remove pwm-puv3 driver The unicore32 port is removed from the kernel. There is no point to keep stale PWM driver for this architecture. Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: Guenter Roeck commit a559063a6865357f5ae2c407a092a75ae9f1c84d Author: Mike Rapoport Date: Wed Jun 10 09:57:50 2020 +0300 input: i8042: remove support for 8042-unicore32io The unicore32 port is removed from the kernel. There is no point to keep stale definitions to support this architecture. Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: Guenter Roeck commit c59e68250c4b317c99f1d1a1e8f990fd8e608afd Author: Mike Rapoport Date: Wed Jun 10 09:57:50 2020 +0300 i2c/buses: remove i2c-puv3 driver The unicore32 port is removed from the kernel. There is no point to keep stale i2c bus driver for this architecture. Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: Guenter Roeck commit 5853d602dc581b891cc591ec5f67024bcaacdfcf Author: Mike Rapoport Date: Wed Jun 10 09:57:50 2020 +0300 cpufreq: remove unicore32 driver The unicore32 port is removed from the kernel. There is no point to keep stale cpufreq driver for this architecture. Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: Guenter Roeck commit fb37409a01b011a664347702f44dbf13fa7c7486 Author: Mike Rapoport Date: Wed Jun 10 09:45:20 2020 +0300 arch: remove unicore32 port The unicore32 port do not seem maintained for a long time now, there is no upstream toolchain that can create unicore32 binaries and all the links to prebuilt toolchains for unicore32 are dead. Even compilers that were available are not supported by the kernel anymore. Guenter Roeck says: I have stopped building unicore32 images since v4.19 since there is no available compiler that is still supported by the kernel. I am surprised that support for it has not been removed from the kernel. Remove unicore32 port. Signed-off-by: Mike Rapoport Acked-by: Arnd Bergmann Acked-by: Guenter Roeck commit 92703c710972ee4db0f585668a597e957c781c45 Author: Sam Ravnborg Date: Tue Jun 30 20:05:45 2020 +0200 drm/drm_connector: use inline comments for drm_bus_flags Use inline comments for the drm_bus_flags enum. This makes it easier to add more description comments in the future should the need arise. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200630180545.1132217-8-sam@ravnborg.org commit aa9d4081deacba0a9697323d0da56c9023fb835a Author: Sam Ravnborg Date: Tue Jun 30 20:05:44 2020 +0200 drm/drm_connector: drop legacy drm_bus_flags values Drop the now unused legacy drm_bus_flags values. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200630180545.1132217-7-sam@ravnborg.org commit f5436f774886540375dde0c6c7ea82053c1e098d Author: Sam Ravnborg Date: Tue Jun 30 20:05:43 2020 +0200 drm/panel: panel-simple: drop use of legacy drm_bus_flags Replace all uses of the legacy drm_bus_flags with their relevant _SAMPLE_ variant. This is a 1:1 replacement, no effort was made to validate the actual bus flags for the panels. Note: DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_NEGEDGE DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE = DRM_BUS_FLAG_PIXDATA_POSEDGE Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200630180545.1132217-6-sam@ravnborg.org commit a4b1e1abea852f9100d42d331003fb85e1d43ddb Author: Sam Ravnborg Date: Tue Jun 30 20:05:42 2020 +0200 drm/panel: novatek-nt39016: drop use of legacy drm_bus_flags Drop use of the legacy drm_bus_flags member and use the more descriptive _SAMPLE_ variant. No functional change. Note: DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_NEGEDGE Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200630180545.1132217-5-sam@ravnborg.org commit 8b0a3f65a7356535b91c8f4df19087c62d78befb Author: Sam Ravnborg Date: Tue Jun 30 20:05:41 2020 +0200 drm/panel: raydium-rm67191: drop use of legacy drm_bus_flags Use the non-legacy drm_bus_flag _SAMPLE_ member. No functional change. Note: DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE = DRM_BUS_FLAG_PIXDATA_NEGEDGE Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Robert Chiras Cc: Thierry Reding Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200630180545.1132217-4-sam@ravnborg.org commit 04f08f8831779e91fc59570dbbd3b7815c229d92 Author: Sam Ravnborg Date: Tue Jun 30 20:05:40 2020 +0200 drm/ingenic-drm: drop use of legacy drm_bus_flags Replace the legacy member with the more descriptive _DRIVE_ variant. No functional change. Signed-off-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Paul Cercueil Link: https://patchwork.freedesktop.org/patch/msgid/20200630180545.1132217-3-sam@ravnborg.org commit 31a5f44161a7e7fa3897ff694a42f4799f073d9c Author: Sam Ravnborg Date: Tue Jun 30 20:05:39 2020 +0200 drm/tidss: drop use of legacy drm_bus_flags Use the more descriptive _DRIVE_ variants thus avoiding the legacy drm_bus_flags values. Signed-off-by: Sam Ravnborg Acked-by: Jyri Sarha Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Jyri Sarha Cc: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200630180545.1132217-2-sam@ravnborg.org commit ea5bc3b15e0f2a245ef1b0093ebe8bc489d49936 Author: Dmitry Osipenko Date: Wed Jul 1 10:42:32 2020 +0300 drm/of: Make drm_of_find_panel_or_bridge() to check graph's presence When graph isn't defined in a device-tree, the of_graph_get_remote_node() prints a noisy error message, telling that port node is not found. This is undesirable behaviour in our case because absence of a panel/bridge graph is a valid case. Let's check the graph's presence in a device-tree before proceeding with parsing of the graph. Reviewed-by: Sam Ravnborg Signed-off-by: Dmitry Osipenko Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701074232.13632-3-digetx@gmail.com commit 4ec0a44ba8d797876ff416fc0317a0169483d240 Author: Dmitry Osipenko Date: Wed Jul 1 10:42:31 2020 +0300 of_graph: add of_graph_is_present() In some cases it's very useful to silently check whether port node exists at all in a device-tree before proceeding with parsing the graph. The DRM bridges code is one example of such case where absence of a graph in a device-tree is a legit condition. This patch adds of_graph_is_present() which returns true if given device-tree node contains OF graph port. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200701074232.13632-2-digetx@gmail.com commit f9200a52eedfe96ae8d9cbf68a363f5409a46117 Author: Julian Anastasov Date: Sat Jun 20 13:03:55 2020 +0300 ipvs: avoid expiring many connections from timer Add new functions ip_vs_conn_del() and ip_vs_conn_del_put() to release many IPVS connections in process context. They are suitable for connections found in table when we do not want to overload the timers. Currently, the change is useful for the dropentry delayed work but it will be used also in following patch when flushing connections to failed destinations. Signed-off-by: Julian Anastasov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 8c18311067d0f0d5f332b9e1f3859eb15e23332d Author: Andrii Nakryiko Date: Tue Jun 30 08:21:25 2020 -0700 selftests/bpf: Add byte swapping selftest Add simple selftest validating byte swap built-ins and compile-time macros. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200630152125.3631920-3-andriin@fb.com commit 30ad688094bcfe8721bfd4003f6a20c9b6ddf964 Author: Andrii Nakryiko Date: Tue Jun 30 08:21:24 2020 -0700 libbpf: Make bpf_endian co-exist with vmlinux.h Make bpf_endian.h compatible with vmlinux.h. It is a frequent request from users wanting to use bpf_endian.h in their BPF applications using CO-RE and vmlinux.h. To achieve that, re-implement byte swap macros and drop all the header includes. This way it can be used both with linux header includes, as well as with a vmlinux.h. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200630152125.3631920-2-andriin@fb.com commit 7808363154d622f9446bf4db97ff0f041dafa30b Author: Ivan Mironov Date: Thu Jun 25 21:50:42 2020 +0500 drm/amd/powerplay: Fix NULL dereference in lock_bus() on Vega20 w/o RAS I updated my system with Radeon VII from kernel 5.6 to kernel 5.7, and following started to happen on each boot: ... BUG: kernel NULL pointer dereference, address: 0000000000000128 ... CPU: 9 PID: 1940 Comm: modprobe Tainted: G E 5.7.2-200.im0.fc32.x86_64 #1 Hardware name: System manufacturer System Product Name/PRIME X570-P, BIOS 1407 04/02/2020 RIP: 0010:lock_bus+0x42/0x60 [amdgpu] ... Call Trace: i2c_smbus_xfer+0x3d/0xf0 i2c_default_probe+0xf3/0x130 i2c_detect.isra.0+0xfe/0x2b0 ? kfree+0xa3/0x200 ? kobject_uevent_env+0x11f/0x6a0 ? i2c_detect.isra.0+0x2b0/0x2b0 __process_new_driver+0x1b/0x20 bus_for_each_dev+0x64/0x90 ? 0xffffffffc0f34000 i2c_register_driver+0x73/0xc0 do_one_initcall+0x46/0x200 ? _cond_resched+0x16/0x40 ? kmem_cache_alloc_trace+0x167/0x220 ? do_init_module+0x23/0x260 do_init_module+0x5c/0x260 __do_sys_init_module+0x14f/0x170 do_syscall_64+0x5b/0xf0 entry_SYSCALL_64_after_hwframe+0x44/0xa9 ... Error appears when some i2c device driver tries to probe for devices using adapter registered by `smu_v11_0_i2c_eeprom_control_init()`. Code supporting this adapter requires `adev->psp.ras.ras` to be not NULL, which is true only when `amdgpu_ras_init()` detects HW support by calling `amdgpu_ras_check_supported()`. Before 9015d60c9ee1, adapter was registered by -> amdgpu_device_ip_init() -> amdgpu_ras_recovery_init() -> amdgpu_ras_eeprom_init() -> smu_v11_0_i2c_eeprom_control_init() after verifying that `adev->psp.ras.ras` is not NULL in `amdgpu_ras_recovery_init()`. Currently it is registered unconditionally by -> amdgpu_device_ip_init() -> pp_sw_init() -> hwmgr_sw_init() -> vega20_smu_init() -> smu_v11_0_i2c_eeprom_control_init() Fix simply adds HW support check (ras == NULL => no support) before calling `smu_v11_0_i2c_eeprom_control_{init,fini}()`. Please note that there is a chance that similar fix is also required for CHIP_ARCTURUS. I do not know whether any actual Arcturus hardware without RAS exist, and whether calling `smu_i2c_eeprom_init()` makes any sense when there is no HW support. Cc: stable@vger.kernel.org Fixes: 9015d60c9ee1 ("drm/amdgpu: Move EEPROM I2C adapter to amdgpu_device") Signed-off-by: Ivan Mironov Tested-by: Bjorn Nostvold Signed-off-by: Alex Deucher commit cd5277809bb8027d7a8f9ef28041dee777e764f7 Author: Alex Deucher Date: Wed Jun 24 14:59:47 2020 -0400 drm/amdgpu: enable runtime pm on vega10 when noretry=0 The failures with ROCm only happen with noretry=1, so enable runtime pm when noretry=0 (the current default). Reviewed-by: Felix Kuehling Acked-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit b38c69688f5a375e2a7274fe557393bcc37c56c1 Author: Alex Deucher Date: Fri Apr 24 10:05:43 2020 -0400 drm/amdgpu: rework runtime pm enablement for BACO Add a switch statement to simplify asic checks. Note that BACO is not supported on APUs, so there is no need to check them. Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 75e1658ea0ea78a534b973aefa6a175277fff664 Author: Nirmoy Das Date: Thu Jun 25 15:35:07 2020 +0200 drm/amdgpu: call release_firmware() without a NULL check The release_firmware() function is NULL tolerant so we do not need to check for NULL param before calling it. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit d69fd951e60ae48c8dd100aa8ceb799ab965f9b3 Author: Mukul Joshi Date: Wed Jun 24 13:47:12 2020 -0400 drm/amdkfd: Fix circular locking dependency warning [ 150.887733] ====================================================== [ 150.893903] WARNING: possible circular locking dependency detected [ 150.905917] ------------------------------------------------------ [ 150.912129] kfdtest/4081 is trying to acquire lock: [ 150.917002] ffff8f7f3762e118 (&mm->mmap_sem#2){++++}, at: __might_fault+0x3e/0x90 [ 150.924490] but task is already holding lock: [ 150.930320] ffff8f7f49d229e8 (&dqm->lock_hidden){+.+.}, at: destroy_queue_cpsch+0x29/0x210 [amdgpu] [ 150.939432] which lock already depends on the new lock. [ 150.947603] the existing dependency chain (in reverse order) is: [ 150.955074] -> #3 (&dqm->lock_hidden){+.+.}: [ 150.960822] __mutex_lock+0xa1/0x9f0 [ 150.964996] evict_process_queues_cpsch+0x22/0x120 [amdgpu] [ 150.971155] kfd_process_evict_queues+0x3b/0xc0 [amdgpu] [ 150.977054] kgd2kfd_quiesce_mm+0x25/0x60 [amdgpu] [ 150.982442] amdgpu_amdkfd_evict_userptr+0x35/0x70 [amdgpu] [ 150.988615] amdgpu_mn_invalidate_hsa+0x41/0x60 [amdgpu] [ 150.994448] __mmu_notifier_invalidate_range_start+0xa4/0x240 [ 151.000714] copy_page_range+0xd70/0xd80 [ 151.005159] dup_mm+0x3ca/0x550 [ 151.008816] copy_process+0x1bdc/0x1c70 [ 151.013183] _do_fork+0x76/0x6c0 [ 151.016929] __x64_sys_clone+0x8c/0xb0 [ 151.021201] do_syscall_64+0x4a/0x1d0 [ 151.025404] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 151.030977] -> #2 (&adev->notifier_lock){+.+.}: [ 151.036993] __mutex_lock+0xa1/0x9f0 [ 151.041168] amdgpu_mn_invalidate_hsa+0x30/0x60 [amdgpu] [ 151.047019] __mmu_notifier_invalidate_range_start+0xa4/0x240 [ 151.053277] copy_page_range+0xd70/0xd80 [ 151.057722] dup_mm+0x3ca/0x550 [ 151.061388] copy_process+0x1bdc/0x1c70 [ 151.065748] _do_fork+0x76/0x6c0 [ 151.069499] __x64_sys_clone+0x8c/0xb0 [ 151.073765] do_syscall_64+0x4a/0x1d0 [ 151.077952] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 151.083523] -> #1 (mmu_notifier_invalidate_range_start){+.+.}: [ 151.090833] change_protection+0x802/0xab0 [ 151.095448] mprotect_fixup+0x187/0x2d0 [ 151.099801] setup_arg_pages+0x124/0x250 [ 151.104251] load_elf_binary+0x3a4/0x1464 [ 151.108781] search_binary_handler+0x6c/0x210 [ 151.113656] __do_execve_file.isra.40+0x7f7/0xa50 [ 151.118875] do_execve+0x21/0x30 [ 151.122632] call_usermodehelper_exec_async+0x17e/0x190 [ 151.128393] ret_from_fork+0x24/0x30 [ 151.132489] -> #0 (&mm->mmap_sem#2){++++}: [ 151.138064] __lock_acquire+0x11a1/0x1490 [ 151.142597] lock_acquire+0x90/0x180 [ 151.146694] __might_fault+0x68/0x90 [ 151.150879] read_sdma_queue_counter+0x5f/0xb0 [amdgpu] [ 151.156693] update_sdma_queue_past_activity_stats+0x3b/0x90 [amdgpu] [ 151.163725] destroy_queue_cpsch+0x1ae/0x210 [amdgpu] [ 151.169373] pqm_destroy_queue+0xf0/0x250 [amdgpu] [ 151.174762] kfd_ioctl_destroy_queue+0x32/0x70 [amdgpu] [ 151.180577] kfd_ioctl+0x223/0x400 [amdgpu] [ 151.185284] ksys_ioctl+0x8f/0xb0 [ 151.189118] __x64_sys_ioctl+0x16/0x20 [ 151.193389] do_syscall_64+0x4a/0x1d0 [ 151.197569] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 151.203141] other info that might help us debug this: [ 151.211140] Chain exists of: &mm->mmap_sem#2 --> &adev->notifier_lock --> &dqm->lock_hidden [ 151.222535] Possible unsafe locking scenario: [ 151.228447] CPU0 CPU1 [ 151.232971] ---- ---- [ 151.237502] lock(&dqm->lock_hidden); [ 151.241254] lock(&adev->notifier_lock); [ 151.247774] lock(&dqm->lock_hidden); [ 151.254038] lock(&mm->mmap_sem#2); This commit fixes the warning by ensuring get_user() is not called while reading SDMA stats with dqm_lock held as get_user() could cause a page fault which leads to the circular locking scenario. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7ee78aff9de13d5dccba133f4a0de5367194b243 Author: Colin Ian King Date: Wed Jun 24 13:07:10 2020 +0100 drm/radeon: fix array out-of-bounds read and write issues There is an off-by-one bounds check on the index into arrays table->mc_reg_address and table->mc_reg_table_entry[k].mc_data[j] that can lead to reads and writes outside of arrays. Fix the bound checking off-by-one error. Addresses-Coverity: ("Out-of-bounds read/write") Fixes: cc8dbbb4f62a ("drm/radeon: add dpm support for CI dGPUs (v2)") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 57f01856645afe4c3d0f9915ee2bb043e8dd7982 Author: Colin Ian King Date: Wed Jun 24 15:54:18 2020 +0100 drm/amdgpu: ensure 0 is returned for success in jpeg_v2_5_wait_for_idle In the cases where adev->jpeg.num_jpeg_inst is zero or the condition adev->jpeg.harvest_config & (1 << i) is always non-zero the variable ret is never set to an error condition and the function returns an uninitialized value in ret. Since the only exit condition at the end if the function is a success then explicitly return 0 rather than a potentially uninitialized value in ret. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 14f43e8f88c5 ("drm/amdgpu: move JPEG2.5 out from VCN2.5") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 6a8987a8667e5b7216fdc386e362c8f99756fa38 Author: Alex Deucher Date: Mon Jun 22 17:40:19 2020 -0400 drm/amdgpu: make sure to reserve tmr region on all asics which support it This includes older APUs like renoir. Acked-by: Nirmoy Das Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8ef51b428e6d935736d5fa7427cc063b6bb5b08a Author: John van der Kamp Date: Tue Jun 23 23:30:54 2020 +0200 drm/amdgpu/display: Unlock mutex on error Make sure we pass through ret label to unlock the mutex. Signed-off-by: John van der Kamp Signed-off-by: Alex Deucher commit dc2f832ecb045dd43793531ae149e1767696f5ad Author: Bernard Zhao Date: Sat Jun 20 17:11:52 2020 +0800 drm/amd: fix potential memleak in err branch The function kobject_init_and_add alloc memory like: kobject_init_and_add->kobject_add_varg->kobject_set_name_vargs ->kvasprintf_const->kstrdup_const->kstrdup->kmalloc_track_caller ->kmalloc_slab, in err branch this memory not free. If use kmemleak, this path maybe catched. These changes are to add kobject_put in kobject_init_and_add failed branch, fix potential memleak. Signed-off-by: Bernard Zhao Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit f29aa08852e1953e461f2d47ab13c34e14bc08b3 Author: Denis Efremov Date: Mon Jun 22 23:31:22 2020 +0300 drm/radeon: fix fb_div check in ni_init_smc_spll_table() clk_s is checked twice in a row in ni_init_smc_spll_table(). fb_div should be checked instead. Fixes: 69e0b57a91ad ("drm/radeon/kms: add dpm support for cayman (v5)") Cc: stable@vger.kernel.org Signed-off-by: Denis Efremov Signed-off-by: Alex Deucher commit 9d09fa6f71946a9a3988cd9354ea8890645deb84 Author: Nirmoy Das Date: Tue Jun 23 11:34:51 2020 +0200 drm/amd/powerplay: return current DCEFCLK on sysfs read (v2) This fixes incorrect output when reading pp_dpm_dcefclk sysfs. Output before this patch: cat /sys/devices/pci0000:/pp_dpm_dcefclk 0: 506Mhz 1: 42949671Mhz * 2: 1266Mhz v2: squash in arcturus fix Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c0732ba1eeec7fe6ea53c949d5ec6f79d56282c7 Author: Nirmoy Das Date: Mon Jun 22 21:50:40 2020 +0200 drm/powerplay: fix compilation warning If (smu)->ppt_funcs->intf is not initialized then smu_send_smc_msg(smu, SMU_MSG_ReadSerialNumBottom32, &bottom32) and smu_send_smc_msg(smu, SMU_MSG_ReadSerialNumTop32, &top32) will not touch bottom32 and top32. Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 6b17afcccc811a77cd2a2003d8417bfb8b946feb Author: Aric Cyr Date: Mon Jun 15 10:21:54 2020 -0400 drm/amd/display: 3.2.91 Signed-off-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4b7da34bd78803d83ebe82a56093c0877e15a243 Author: Stylon Wang Date: Fri Jun 12 19:04:18 2020 +0800 drm/amd/display: Fix ineffective setting of max bpc property [Why] Regression was introduced where setting max bpc property has no effect on the atomic check and final commit. It has the same effect as max bpc being stuck at 8. [How] Correctly propagate max bpc with the new connector state. Signed-off-by: Stylon Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 447f3d0f387b1048295d58832b0e041a3ed67df8 Author: Anthony Koo Date: Fri Jun 12 19:48:56 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.19 [Header Changes] - Add debug flag for psr to use hw locking mgr state machine Signed-off-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c797ede0ec89f1bbf97fc73823c3bc37473854e3 Author: Wenjing Liu Date: Mon Jun 1 12:17:44 2020 -0400 drm/amd/display: DP link layer test 4.2.1.1 fix due to specs update [why] DP link layer CTS specs updated to change the test parameters in test 4.2.1.1. Before it requires source to delay 400us on aux no reply. With the specs updates Errata5, it requires source to delay 3.2ms (based on LTTPR aux timeout) This causes our test to fail after updating with the latest test equipment firmware. [how] the change is to allow LTTPR 3.2ms aux timeout delay by default. And set back to 400us if LTTPR feature is not enabled. We will set 3.2ms and always enable LTTPR non transparent mode if LTTPR feature is enabled and LTTPR is present. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Krunoslav Kovac Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 26b4750d6cf84cb2b3f0a84c9b345e7b71886410 Author: Wenjing Liu Date: Mon Jun 8 15:16:00 2020 -0400 drm/amd/display: allow query ddc data over aux to be read only operation [why] Two issues: 1. Add read only operation support for query ddc data over aux. 2. Fix a bug where if read size is multiple of 16, mot of the last read transaction will not be set to 0. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8582aea20bc5de1fc4f2029e6cde604b2c755c0a Author: David Galiffi Date: Thu Jun 11 17:36:14 2020 -0400 drm/amd/display: Compare v_front_porch when checking if streams are synchronizable [Why] If the front porch of the two timings differ, then there may not be enough time while both streams are in vertical blank to perform a memory clock change. This can hang the system. [How] Check the each streams timing.v_front_porch when determining if the two streams are synchronizable. Signed-off-by: David Galiffi Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 0f782777f05ded1bb9694aed250bc74f25f0c91b Author: Martin Leung Date: Fri May 29 13:51:57 2020 -0400 drm/amd/display: enable seamless boot for dcn30 why: seamless boots requires split of init_hw into hw and pipes to work. This was implemented in dcn10_init_hw but did not apply yet to dcn30. how: Copy over dcn10_init_hw and adapt it to dcn30 using recent changes to dcn3. Behavior will be different in init sequence. Signed-off-by: Martin Leung Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 3c08d625d6c456fa34dd32e2ae14911ccdfa8c85 Author: Peikang Zhang Date: Mon Jun 8 14:28:35 2020 -0400 drm/amd/display: Red screen observed on startup [Why] We try to to change new_clocks->dppclk_khz to 100000 when new_clocks->dppclk_khz is 0 [How] Don't change new_clocks->dppclk_khz value when new_clocks->dppclk_khz is 0 Signed-off-by: Peikang Zhang Reviewed-by: Yongqiang Sun Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5e90801298cc5c7ac7fac7d5fb0705e7bedf1eea Author: Chris Park Date: Tue Jun 9 23:51:36 2020 -0400 drm/amd/display: Allow 4 split on 10K 420 modes [Why] 10K YCbCr420 does not need ODM 4:1, but it requires MPC 4 split indicated on the flags. [How] Make pixel encoding and resolution size specific workaround to enable ODM combine on YCbCr420 high resolution modes. Signed-off-by: Chris Park Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 7715fdf3362fa88f3e3620261a6e546f50713a5e Author: Derek Lai Date: Thu Jun 4 16:29:39 2020 +0800 drm/amd/display: VSC SDP supported for SST [why] If a typeC to HDMI dongle supports YCbCr420 pass through and VSC colorimetry and pixel encoding formats in the Extended Receiver Capability, we shall allow VSC SDP to be used. [How] The Extended Receiver Capability field shall check the EXTENDED_RECEIVER_CAPABILITY_FIELD_PRESENT bit in the TRAINING_AUX_RD_INTERVAL register. Removed DPCD rev checking for VSC SDP. Signed-off-by: Derek Lai Reviewed-by: Wenjing Liu Acked-by: Rodrigo Siqueira Acked-by: Tony Cheng Signed-off-by: Alex Deucher commit dc43d9583f62e31a2bec1e414ec0cdfaa6a0debb Author: Nicholas Kazlauskas Date: Tue Jun 9 13:25:47 2020 -0400 drm/amd/display: Fill in dmub_srv fw_version from firmware metadata [Why] DMCUB firmware version is now available from firmware metadata block. We should be passing this into dmub_srv so we can know when to apply firmware version specific functionality like using CW4 only instead of the REGION4. [How] We don't have the helpers for DM to actually extract out firmware metadata block themselves. We could add that and add helpers in DM to grab this, but not every creation sequence has firmware instruction before dmub_srv_create. Easiest way to handle this is to fill this in automatically per DM in the place we do have it - when calculating the region parameters. But only fill it in if DM already hasn't in case we need to override with a specific version. We aren't do anything firmware version specific in dmub_srv_create today that does require fw_version, so while it's a little unituitive to do it when calculating region parameters it works for now. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 86cf3a6116e0a0bb8910f5c6bded5e8e97b4bde5 Author: Stylon Wang Date: Mon Jun 1 16:12:09 2020 +0800 drm/amd/display: Enable output_bpc property on all outputs [Why] Connector property output_bpc is available on DP/eDP only. New IGT tests would benifit if this property works on HDMI. [How] Enable this read-only property on all types of connectors. Signed-off-by: Stylon Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit f8b9f9a599db5941b580bd570ad2d24a982d9920 Author: Chris Park Date: Tue Jun 9 19:19:08 2020 -0400 drm/amd/display: Force ODM combine on 5K+ 420 modes [Why] All YCbCr420 resolutions 5K and above have tiling and discoloration issues. The issue can be remedied by forcing ODM combine from 5K to 8K. 10K resolution requires ODM 4:1. The mechanism of what the real problem is, that is inherent in ODM combine programming, doesn't seem to be pointed at singular register programming (CLK, MPC, DCSURF, etc.), and needs more in-depth programming sequence review for these new use case scenarios. Until then, workaround to enable ODM combine is proposed. While it is not our policy, HW spreadsheet also recommends turning on ODM for these scenario to lower the voltage. [How] Make pixel encoding and resolution size specific workaround to enable ODM combine on YCbCr420 high resolution modes. Signed-off-by: Chris Park Reviewed-by: Charlene Liu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 2665fded52079d13c59326b0c6c26206cf46abf1 Author: Dmytro Laktyushkin Date: Wed Jun 3 13:33:46 2020 -0400 drm/amd/display: fix 4to1 odm MPC_OUT_FLOW_CONTROL_COUNT Signed-off-by: Dmytro Laktyushkin Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit b4d5ce7a5024094430d3b9a061710fccb49ba884 Author: Brandon Syu Date: Mon Jun 8 14:01:57 2020 +0800 drm/amd/display: use dispclk AVFS for dppclk [Why] There is using pixelclk AVFS for dppclk, that would cause issue. [How] To use dispclk AVFS for both dispclk and dppclk. There would choose dppclk for request voltage when dispclk wouldn't be updated case. If dispclk need to be updated, then it'll choose the bigger one from dppclk and dispclk for request voltage. Signed-off-by: Brandon Syu Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8f95ff284cd2b3be0ee49d2c7b29d408aad3843d Author: Eric Yang Date: Fri May 29 17:13:57 2020 -0400 drm/amd/display: add mechanism to skip DCN init [Why] If optimized init is done in FW. DCN init be skipped in driver. This need to be communicated between driver and fw and maintain backwards compatibility. [How] Use DMUB scratch 0 bit 2 to indicate optimized init done in fw and use DMUB scatch 4 bit 0 to indicate drive supports the optimized flow so FW will perform it. Signed-off-by: Eric Yang Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c04bd16e481663aade0150daf7a91cb87831bb83 Author: Dale Zhao Date: Fri Jun 5 17:55:18 2020 +0800 drm/amd/display: fine tune logic of edid max TMDS clock check [WHY] Check max_tmds_clk_mhz firstly will restrict pixel clock under HDMI 1.4, thus HDMI2.0 port can't correctly support 4K 60Hz. [HOW] Fine tune the logic to check max_forum_tmds_clk_mhz firstly. Signed-off-by: Dale Zhao Reviewed-by: Chris Park Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 3e1974cf02481c464703a33881e20c9711053979 Author: Jake Wang Date: Fri Jun 5 16:16:38 2020 -0400 drm/amd/display: Added local_sink null check before access [Why & How] Need to check if local_sink is NULL before accessing. Signed-off-by: Jake Wang Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8c44515be175a1bc18620284d23efa385daea49f Author: Aurabindo Pillai Date: Thu Jun 4 15:54:39 2020 -0400 drm/amd/display: clip plane rects in DM before passing into DC [Why] DC global validation can fail when userspace requests to draw large plane without performing the clipping themselves. This is observed in the IGT kms_plane panning tests for 4K displays where they draw an 8K plane without any clipping while expecting only the top 4K to be drawn. [How] DRM already has helpers to take care of the clipping necessary and to mark whether a plane is visible or not, so make use of these helpers in DM before passing the plane to DC. Signed-off-by: Aurabindo Pillai Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit f822406cb186b8018554f167fecae43043a90359 Author: Aric Cyr Date: Mon Jun 8 01:00:36 2020 -0400 drm/amd/display: 3.2.90 Signed-off-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 492dd8a8e147e0ba61b30083b530ca1750c44108 Author: Anthony Koo Date: Fri Jun 5 17:09:11 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.18 [Header Changes] - Update scratch information for boot status Signed-off-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4074bc3fca9ff4f1b78b8dc71f1f19bc27d1536e Author: Camille Cho Date: Fri May 29 15:30:32 2020 +0800 drm/amd/display: Correctly respond in psr enablement interface [Why] dc_link_set_psr_allow_active() always returns true, even in the case that PSR is not supported. [How] Hook up the return value of dc_link_set_psr_allow_active(). Signed-off-by: Camille Cho Reviewed-by: Josip Pavic Acked-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d2e0d8263b7ad40b80bf4d6bf9583c200c17f6ab Author: Nicholas Kazlauskas Date: Thu Jun 4 11:07:46 2020 -0400 drm/amd/display: Fix DML failures caused by doubled stereo viewport [Why] Side-by-side and Top-and-bottom stereo configurations fail DML mode validation due to Viewport exceeded. This is because we consider the planes as being pipe split in pipe population so we end up doubling the viewport width, eg. from 4k to 8k. [How] These pipes technically aren't hsplit, so add a check for determining whether is_hsplit should be set. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Dmytro Laktyushkin Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ef9de1876aa774342c57299b70c1b8913ee5436a Author: Bhawanpreet Lakha Date: Mon Jun 1 17:22:41 2020 -0400 drm/amd/display: enable assr [Why] assr is content protection for eDP, in order to use it we need to call psp ta (dtm) [How] We have a enable_assr callback, hook into this and call the correct psp cmd id to enable assr. Signed-off-by: Bhawanpreet Lakha Reviewed-by: Hersen Wu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 0cc722248a8e608f4759f6df46e76f7c2315bfba Author: Michael Strauss Date: Tue May 26 17:09:31 2020 -0400 drm/amd/display: implement edid max TMDS clock check in DC [WHY] Currently DC doesn't check requested pixel clock against an EDID specified TMDS max clock if it exists, passing modes that should fail [HOW] Add max TMDS clk to edid caps and perform check during validation Signed-off-by: Michael Strauss Reviewed-by: Eric Yang Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit a85f148ed325e9470b01196eca383d608a891d46 Author: Anthony Koo Date: Wed Jun 3 18:48:28 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.17 Signed-off-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 75cb89112e948bfcbe93a49f25d3b83519e0d0f2 Author: Yi-Ling Chen Date: Mon Jun 1 10:46:07 2020 +0800 drm/amd/display: Fixed using wrong eDP power sequence function pointer [why] dc->hwss->edp_backlight_control is null, it would casue it only be off main-link of eDP. It is not worng behavior for eDP power sequence off. [how] Must use hwseq->funcs.edp_backlight_control finction pointer for edp backlight. Signed-off-by: Yi-Ling Chen Reviewed-by: Sung Lee Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 03ca960098d227e09e83f09e75e5fdbba48a7187 Author: Mikita Lipski Date: Mon Jun 1 10:26:11 2020 -0400 drm/amd/display: Fix calculation of virtual channel payload [why] The calculation of virtual channel payload would not take link settings in account. As we calculate VCPI slots needed both PBN for stream and also PBN per time slot. Before we would use generic PBN per time slot, which would not change with link settings causing wrong Payload allocation. [how] Provide PBN per time slot for each Virtual channel payload calculation. Signed-off-by: Mikita Lipski Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit de7653fde0e771983a2c9b991255866a39d68473 Author: Anthony Koo Date: Mon Jun 1 17:39:52 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.16 Signed-off-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit dc6e2448558d68a5b87f42ab6df1691be41f5857 Author: Wyatt Wood Date: Wed May 27 09:42:08 2020 -0400 drm/amd/display: Use dmub fw to lock pipe, cursor, dig [Why] Hw lock manager adds the ability to lock pipe, cursor, and dig in fw. [How] Send hw lock command to fw to lock pipe, cursor, and dig. Signed-off-by: Wyatt Wood Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ee2e74f7e1c443e812520bf68d1c58b71e89007a Author: Sonny Jiang Date: Wed Jun 10 16:24:21 2020 -0400 drm amdgpu: SI UVD enabled on Verde, Tahiti, Pitcairn Enable asic Verde, Tahiti and Pitcairn UVD block. Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d375615c24c7033dc3e58586d9d737ecaa5e8ad5 Author: Sonny Jiang Date: Wed Jun 10 16:22:59 2020 -0400 drm amdgpu: SI UVD enable for Oland Enable Oland UVD block. Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 74df08fddf44a7d1a48eeae1dc0a72c60eb9cc4b Author: Sonny Jiang Date: Wed Jun 10 16:19:19 2020 -0400 drm amdgpu: SI UVD add uvd_v3_1 to makefile Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 80533a85093402a05303b01101a0080aa055ff3d Author: Sonny Jiang Date: Wed Jun 10 16:14:57 2020 -0400 drm amdgpu: SI UVD context rreg/wreg Implement SI uvd_ctx_rreg/wreg functions. Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b38f3e80ecec3ea004207b0ec5d0672d7a5b7298 Author: Sonny Jiang Date: Wed Jun 10 16:05:45 2020 -0400 drm amdgpu: SI UVD v3_1 (v2) Implement SI UVD. The SI UVD firmware requires validation. v2: squash in missing brace fix (Colin Ian King) Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2282b4186dee80c89906d0ee10295393582c3afd Author: Sonny Jiang Date: Wed Jun 10 16:02:21 2020 -0400 drm amdgpu: SI UVD registers Add SI UVD registers files. Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b42bbbca08d0a8e879a9ffd9231c1e6e6f7b03ef Author: Sonny Jiang Date: Wed Jun 10 13:41:12 2020 -0400 drm amdgpu: SI UVD PACKET_TYPE0 Fix packet_type0 definition in sid. Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d1af7ac24fd70feeeca1c6b71bd1dc01d1c389e8 Author: Sonny Jiang Date: Wed Jun 10 13:37:49 2020 -0400 drm amdgpu: SI UVD add firmwares For implement UVD on SI asic, add Oland, Pitcairn, Verde, Tahiti firmwares. Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9c39d77c07127b1343995e4753bc4045e89979da Author: Alex Deucher Date: Mon Jun 22 18:10:36 2020 -0400 drm/amdgpu/uvd3.x: fix register definition warnings drop the duplicate register macros from sid.h and use the standard ones in the oss register headers. Acked-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8c823e4ff67c78659ab403d63d071103416f49eb Author: Qingqing Zhuo Date: Thu Jun 18 13:46:18 2020 -0400 drm/amd/display: fix compilation error on allmodconfig when compiled with allmodconfig option, there are error messages as below: ERROR: modpost: "mod_color_is_table_init" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "mod_color_get_table" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: modpost: "mod_color_set_table_init_state" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! To fix the issue, this commits removes CONFIG_DRM_AMD_DC_DCN guard in color/makefile. Signed-off-by: Qingqing Zhuo CC: Lewis Huang CC: Aric Cyr CC: Alexander Deucher CC: Harry Wentland CC: Nicholas Kazlauskas CC: Bhawanpreet Lakha CC: Stephen Rothwell Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 450da2ef41d6551bf5bc2fd50c00ec3bcfe1047a Author: James Zhu Date: Wed Jun 17 23:58:04 2020 -0400 drm/amdgpu: fix unused variable SOC15_WAIT_ON_RREG's return value needn't always been handled by caller. new design is to fix this kind of unused variable. Signed-off-by: James Zhu Reported-by: kernel test robot Acked-by: Leo Liu Signed-off-by: Alex Deucher commit a20ace1b02cc80bab4a47fbb81d68db4b234450a Author: Wenhui Sheng Date: Thu Jun 18 15:37:04 2020 +0800 drm/amdgpu: add fw release for sdma v5_0 sdma fw isn't released when module exit Reviewed-by: Hawking Zhang Signed-off-by: Wenhui Sheng Signed-off-by: Alex Deucher commit d5197bc0acca9891839aa58c2cd58c81a7cf282b Author: Wenhui Sheng Date: Thu Jun 18 13:33:09 2020 +0800 drm/amdgpu: sdma v5_2 ring bo mem leak invoke amdgpu_ring_fini for each sdma instance Reviewed-by: Hawking Zhang Signed-off-by: Wenhui Sheng Signed-off-by: Alex Deucher commit a2e6ad1900124c874b06cde130512721aba695c0 Author: Wenhui Sheng Date: Fri Jun 12 17:18:39 2020 +0800 drm/amdgpu: remove perf level dpm in one-VF On Navi12 platform, node power_dpm_force_performance_level doesn't work correctly in one-VF mode with at least three smu messages not supported: SMU_MSG_SetSoftMaxByFreq SMU_MSG_SetSoftMinByFreq SMU_MSG_TransferTableDram2Smu Reviewed-by: Kevin Wang Signed-off-by: Wenhui Sheng Signed-off-by: Alex Deucher commit fdb8483bd68eff9cf16babe690ec842a7bff3186 Author: John Clements Date: Fri Jun 19 15:01:13 2020 +0800 drm/amdgpu: add XGMI support for sienna cichlid support for setting up XGMI FB address regions Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 5d5bd5e32e6e12ab8d844b4b1a1235eb7f00c668 Author: Kevin Wang Date: Sun Jan 19 17:20:43 2020 +0800 drm/amdgpu: restrict the hw sched jobs number to power of two the module parameter sched_hw_submission is probably from user mode, and the kernel need to check whether it is legal. 1. align hw sched jobs to power of 2 and set minimum number is 2. 2. use kernel api is_power_of_2() to simplify driver code. Signed-off-by: Kevin Wang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2217b2499e6ba341f93cad99662ebdc62d3d400d Author: Alvin Lee Date: Mon Jun 15 13:40:48 2020 -0400 drm/amd/display: Update bounding box states (v2) [Why] We need to update each p-state in the bounding box [How] Update states when assigning values to clocks v2: squash in patch to set min values (Alex) Signed-off-by: Alvin Lee Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit 7c8e0835ebb1682a042aeaec7cef6dc45aebb0cb Author: Colin Ian King Date: Thu Jun 18 11:26:22 2020 +0100 drm/amdgpu: remove redundant initialization of variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 683fc63ddd2cd89b52cf27ee7335e7d0893dca3b Author: Nirmoy Das Date: Thu Jun 18 16:46:17 2020 +0200 drm/amdgpu: remove unused functions Remove unused amdgpu_xgmi_hive_try_lock() and smu7_reset_asic_tasks(). Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4072327a2622af8688b88f5cd0a472136d3bf33d Author: Alex Deucher Date: Wed Jun 17 16:36:05 2020 -0400 drm/amdgpu/display: properly guard the calls to swSMU functions It's only applicable on newer asics. We could end up here when using DC on older asics like SI or KV. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1170 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 376814f5fcf1aadda501d1413d56e8af85d19a97 Author: Alex Deucher Date: Wed Jun 17 16:33:47 2020 -0400 drm/amdgpu/display bail early in dm_pp_get_static_clocks If there are no supported callbacks. We'll fall back to the nominal clocks. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1170 Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 617f90d96931e4208707c064af12488d61aaa60f Author: James Zhu Date: Thu Jun 18 00:24:03 2020 -0400 drm/amdgpu/vcn2.0: fix no previous prototype for functions Include header file vcn_v2_0.h Signed-off-by: James Zhu Reported-by: kernel test robot Signed-off-by: Alex Deucher commit 40214adb804ae05e274e14fbd17bbf021ea96834 Author: James Zhu Date: Thu Jun 18 00:06:51 2020 -0400 drm/amdgpu/vcn1.0: fix no previous prototype for functions Include header file vcn_v1_0.h Signed-off-by: James Zhu Reported-by: kernel test robot Signed-off-by: Alex Deucher commit 66429300e1bd9cdfbe96cfc475e4964db2a36921 Author: Alex Deucher Date: Wed Jun 17 14:43:08 2020 -0400 drm/amdgpu/pm: fix ref count leak when pm_runtime_get_sync fails The call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 9eee152aab56d374edb9ad21b3db05f5cdda2fe6 Author: Alex Deucher Date: Wed Jun 17 14:30:17 2020 -0400 drm/amdgpu/debugfs: fix ref count leak when pm_runtime_get_sync fails The call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit dfd84d902b078faf511e91158ee8db4c2e055e42 Author: Nirmoy Das Date: Thu Jun 18 15:07:13 2020 +0200 drm/amd/display: label internally used symbols as static Used sparse(make C=1) to find these loose ends. Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 38ed7b09833e0c6d954b69b7a1e796ebe66c6073 Author: Nirmoy Das Date: Thu Jun 18 15:06:00 2020 +0200 drm/powerplay: label internally used symbols as static Used sparse(make C=1) to find these loose ends. Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 204d8998ce5997b34d785381fa16d4f900fb0624 Author: Nirmoy Das Date: Thu Jun 18 16:12:34 2020 +0200 drm/amdkfd: label internally used symbols as static Used sparse(make C=1) to find these loose ends. v2: removed unwanted extra line Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f3167919f689c9b547aca82ec1eeb455e4eb120b Author: Nirmoy Das Date: Thu Jun 18 16:09:12 2020 +0200 drm/amdgpu: label internally used symbols as static Used sparse(make C=1) to find these loose ends. v2: removed unwanted extra line Signed-off-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4d1895134f92df15285040c3c49439c6921360b3 Author: James Zhu Date: Wed Jun 17 22:25:40 2020 -0400 drm/amdgpu/jpeg2.0: fix no previous prototype for functions Include header file jpeg_v2_0.h. Signed-off-by: James Zhu Reported-by: kernel test robot Signed-off-by: Alex Deucher commit 232e5d45c7bda044f90bc0f9550780f470696dd6 Author: James Zhu Date: Wed Jun 17 22:15:30 2020 -0400 drm/amdgpu/jpeg1.0: fix no previous prototype for functions Include header file jpeg_v1_0.h. Signed-off-by: James Zhu Reported-by: kernel test robot Signed-off-by: Alex Deucher commit 1c1ada37af6ee6fb9cfc8da6a56cc83208cd8d6f Author: Alex Deucher Date: Wed Jun 17 14:52:07 2020 -0400 drm/amdkfd: fix ref count leak when pm_runtime_get_sync fails The call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Reviewed-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit e520d3e0d2818aafcdf9d8b60916754d8fedc366 Author: Alex Deucher Date: Wed Jun 17 14:50:02 2020 -0400 drm/amdgpu/fence: fix ref count leak when pm_runtime_get_sync fails The call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Reviewed-by: Felix Kuehling Acked-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit 888e32d71115e26b57bdcbc717c68e9c5026bac3 Author: Chen Tao Date: Wed Jun 17 18:51:30 2020 +0800 drm/amdgpu/debugfs: fix memory leak when amdgpu_virt_enable_access_debugfs failed Fix memory leak in amdgpu_debugfs_gpr_read not freeing data when amdgpu_virt_enable_access_debugfs failed. Fixes: 95a2f917387a2 ("drm/amdgpu: restrict debugfs register access under SR-IOV") Signed-off-by: Chen Tao Signed-off-by: Alex Deucher commit 3e4aeff36e9212a939290c0ca70d4931c4ad1950 Author: Chen Tao Date: Wed Jun 17 18:51:29 2020 +0800 drm/amdgpu/debugfs: fix memory leak when pm_runtime_get_sync failed Fix memory leak in amdgpu_debugfs_gpr_read not freeing data when pm_runtime_get_sync failed. Fixes: a9ffe2a983383 ("drm/amdgpu/debugfs: properly handle runtime pm") Signed-off-by: Chen Tao Signed-off-by: Alex Deucher commit db32fec96620b3533fcc534a78ce64bf94cc4245 Author: kernel test robot Date: Thu Jun 18 00:56:18 2020 +0800 drm/amdgpu: vcn_v2_5_mc_resume_dpg_mode() can be static Fixes: c422a628925d ("drm/amdgpu: rename macro for VCN2.0 2.5 and 3.0") Signed-off-by: kernel test robot Signed-off-by: James Zhu Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 2e5238ad107ba779b99d410f7cc601d5b3a504f0 Author: Nirmoy Das Date: Wed Jun 17 13:36:16 2020 +0200 drm/amdgpu: fix compiler warning Fixes below warning: drivers/gpu/drm/amd/amdgpu/df_v3_6.c: In function ‘df_v3_6_reset_perfmon_cntr’: drivers/gpu/drm/amd/amdgpu/df_v3_6.c:571:2: warning: ‘hi_base_addr’ may be used uninitialized in this function [-Wmaybe-uninitialized] 571 | df_v3_6_perfmon_wreg(adev, lo_base_addr, 0, hi_base_addr, 0); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Nirmoy Das Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit e26ffda81bd19dc347ee4fa1aa656146de8dc8bc Author: Kevin Wang Date: Tue Jun 16 13:51:04 2020 +0800 drm/amd/smu: unify smu ppt callback macros v1: add the new macro "smu_ppt_xxx()" to unify smu callback interfaces v2: rename the macro smu_ppt_xxx to smu_ppt_funcs. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 1fc87b4599a7cbab54c988f0cb55d52e4ec121df Author: Kevin Wang Date: Tue Jun 16 13:50:28 2020 +0800 drm/amd/smu: unify pptable_func{} callback interface the pptable_func callback sets should be has unify interface, so use "smu" as the pptable_func interface first parameter. fix interfaces: 1. i2c_eeprom_init 2. i2c_eeprom_fini Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 88e39834afd5ca1c2367a49db3e0db2ae915f269 Author: Alvin Lee Date: Mon Jun 15 13:16:12 2020 -0400 drm/amd/display: Update DCN3 bounding box [Why] We want to update the bounding box to have more granular control of the DCFCLK. [How] Setup DCFCLK to use STA values and also optimal values based on UCLK. Signed-off-by: Alvin Lee Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Hersen Wu Reviewed-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 174b328bc89b5fa9cfec57831670e8100a1e0da0 Author: Christian König Date: Wed May 27 10:31:08 2020 +0200 drm/amdgpu: remove distinction between explicit and implicit sync (v2) According to Marek a pipeline sync should be inserted for implicit syncs well. v2: bump the driver version Signed-off-by: Christian König Tested-by: Marek Olšák Signed-off-by: Marek Olšák Signed-off-by: Alex Deucher commit 614c56111cc73f0a828634dcb2eecd2035c2104b Author: Tom St Denis Date: Tue Jun 16 08:47:04 2020 -0400 drm/amd/amdgpu: Fix offset for SQ_DEBUG_STS_GLOBAL on gfx10 (v2) Despite having different IP offsets the computed address of the register(s) are the same between gfx7..gfx10. This patch fixes the offset relative to the GC block on gfx10. (v2): SQ_DEBUG_STS_GLOBAL2 is 0x10 higher ... Signed-off-by: Tom St Denis Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 9fb10671011143d15b6b40d6d5fa9c52c57e9d63 Author: Aditya Pakki Date: Sat Jun 13 21:21:22 2020 -0500 drm/radeon: Fix reference count leaks caused by pm_runtime_get_sync On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Acked-by: Evan Quan Signed-off-by: Aditya Pakki Signed-off-by: Alex Deucher commit f79f94765f8c39db0b7dec1d335ab046aac03f20 Author: Navid Emamdoost Date: Sun Jun 14 02:05:28 2020 -0500 drm/amdgpu/display: fix ref count leak when pm_runtime_get_sync fails The call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost Signed-off-by: Alex Deucher commit e008fa6fb41544b63973a529b704ef342f47cc65 Author: Navid Emamdoost Date: Sun Jun 14 02:09:44 2020 -0500 drm/amdgpu: fix ref count leak in amdgpu_display_crtc_set_config in amdgpu_display_crtc_set_config, the call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost Signed-off-by: Alex Deucher commit 5509ac65f2fe5aa3c0003237ec629ca55024307c Author: Navid Emamdoost Date: Sun Jun 14 02:14:50 2020 -0500 drm/amd/display: fix ref count leak in amdgpu_drm_ioctl in amdgpu_drm_ioctl the call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost Signed-off-by: Alex Deucher commit 9ba8923cbbe11564dd1bf9f3602add9a9cfbb5c6 Author: Navid Emamdoost Date: Sun Jun 14 02:12:29 2020 -0500 drm/amdgpu: fix ref count leak in amdgpu_driver_open_kms in amdgpu_driver_open_kms the call to pm_runtime_get_sync increments the counter even in case of failure, leading to incorrect ref count. In case of failure, decrement the ref count before returning. Signed-off-by: Navid Emamdoost Signed-off-by: Alex Deucher commit 6f2e8acdb48ed166b65d47837c31b177460491ec Author: Aditya Pakki Date: Sat Jun 13 20:55:39 2020 -0500 drm/radeon: fix multiple reference count leak On calling pm_runtime_get_sync() the reference count of the device is incremented. In case of failure, decrement the reference count before returning the error. Signed-off-by: Aditya Pakki Signed-off-by: Alex Deucher commit 74a353ffa0d49827fe19d71b2d6b18d11325806a Author: Lei Guo Date: Tue Jun 16 10:03:27 2020 -0400 drm/amdgpu/gfx9: Fix incorrect firmware size calculation [WHY] The memcpy() function copies n bytes from memory area src to memory area dest. So specify the firmware size in bytes. [How] Correct the calculation. Acked-by: Evan Quan Signed-off-by: Lei Guo Reviewed-by: Junwei Zhang Signed-off-by: Alex Deucher commit f503fe69ebca2f7a5e1eda1b279609b033b953cd Author: Alex Deucher Date: Mon Jun 15 16:36:49 2020 -0400 drm/amdgpu: fix documentation around busy_percentage Add rename the gpu busy percentage for consistency and add the mem busy percentage documentation. Reviewed-by: Evan Quan Reviewed-by: Nirmoy Das Signed-off-by: Alex Deucher commit bd09331a74cf05f85c85e8fd144e3b35907dfc6d Author: Alex Deucher Date: Mon Jun 15 14:29:55 2020 -0400 drm/amdgpu/pm: update comment to clarify Overdrive interfaces Vega10 and previous asics use one interface, vega20 and newer use another. Reviewed-by: Evan Quan Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 20eca0123a35305e38b344d571cf32768854168c Author: Qiushi Wu Date: Sat Jun 13 14:32:26 2020 -0500 drm/amdkfd: Fix reference count leaks. kobject_init_and_add() takes reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Signed-off-by: Qiushi Wu Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit b205795677c034a1975e75a466ad158950fde4b4 Author: Felix Kuehling Date: Thu Jun 11 23:19:37 2020 -0400 drm/amdkfd: Add eviction debug messages Use WARN to print messages with backtrace when evictions are triggered. This can help determine the root cause of evictions and help spot driver bugs triggering evictions unintentionally, or help with performance tuning by avoiding conditions that cause evictions in a specific workload. The messages are controlled by a new module parameter that can be changed at runtime: echo Y > /sys/module/amdgpu/parameters/debug_evictions echo N > /sys/module/amdgpu/parameters/debug_evictions Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit e3569fab49886123c81f18d675fb1719d73cf27d Author: Tom St Denis Date: Mon Jun 15 12:17:46 2020 -0400 drm/amd/amdgpu: Fix SQ_DEBUG_STS_GLOBAL* registers Forgot to subtract the SOC15 IP offsetand add the BASE_IDX values. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d31bdabbf5b6f5a667aefa2c381f7b534cad4f12 Author: Alvin Lee Date: Thu Jun 11 16:37:13 2020 -0400 drm/amd/display: Get num_chans from VBIOS table Get the values from VBIOS table Signed-off-by: Alvin Lee Signed-off-by: Bhawanpreet Lakha Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit 1ed0b2ddf42db301deaf981c1981da65b6a8f327 Author: Bernard Zhao Date: Fri Jun 12 19:58:48 2020 +0800 drm/amd: add missing fill of the array`s first element In function fill_iram_v_2, the ram_table->bright_neg_gain`s first element [0][0] seems to be missing. This change is just to make the code a bit readable. Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit d4dd336409fddb4346e4ac7857e34c6f18f79658 Author: Joseph Greathouse Date: Wed Jun 10 13:48:56 2020 -0500 drm/amdgpu: Reconfigure ULV for gfx9 server SKUs SDMA ULV can benefit low-power modes, but can sometimes cause latency increases in small SDMA transfers. Server SKUs have a different trade-off space in this domain, so this configures the server SKUs' ULV hysteresis times differently than consumer SKUs'. Signed-off-by: Joseph Greathouse Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7159562a1622806d1f37fa73e83463fa1a240f66 Author: Lorenz Brun Date: Thu Jun 11 22:11:21 2020 +0200 drm/amdkfd: Use correct major in devcgroup check The existing code used the major version number of the DRM driver instead of the device major number of the DRM subsystem for validating access for a devices cgroup. This meant that accesses allowed by the devices cgroup weren't permitted and certain accesses denied by the devices cgroup were permitted (if they matched the wrong major device number). Signed-off-by: Lorenz Brun Fixes: 6b855f7b83d2f ("drm/amdkfd: Check against device cgroup") Reviewed-off-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 54e7ebf9af39e7a8f61a0723af75a5954b82a8cc Author: Aric Cyr Date: Mon Jun 1 11:49:54 2020 -0400 drm/amd/display: 3.2.89 Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 788408b787434662a85e21a3f5f22edbebc5928e Author: Anthony Koo Date: Fri May 29 17:48:12 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.15 [Header Changes] - Add new initialization bits for driver to check firmware status - Add command for HW locking via DMUB Signed-off-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit dfd991794685b1228387214f28630b6e94e56944 Author: Yongqiang Sun Date: Fri May 29 13:05:11 2020 -0400 drm/amd/display: Not doing bios data pack. [Why] dmub FW running abnormal after resume from S0i3 due to data aliagnment issue. [How] Before having a solution for this issue, temparory not doing data pack. Signed-off-by: Yongqiang Sun Reviewed-by: Sung Lee Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ffa2151a8f4dab8670d46abcfacacbe68e394ae6 Author: Yongqiang Sun Date: Wed May 27 13:57:55 2020 -0400 drm/amd/display: not reset dmub in driver. [Why] during S0i3, set power state is toggled a few times, and dmub uC will restart with current reset/hw_init. [How] Remove reset in set power state, and before doing hw_init, check if dmub is enabled, and doing FW autoload check only if dmub is already enabled. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit a0a85ac4eac9b1560d9a40d6636f82f81162de10 Author: Dale Zhao Date: Fri May 29 16:57:02 2020 +0800 drm/amd/display: Disable pipe split for modes with borders [Why] For some special timing with border, like DMT 640*480 72Hz, pipe split can't handle well. Thus, it will be black screen for these special timing. [How] Disable pipe split for these timing with borders as W/A. Signed-off-by: Dale Zhao Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 8ae5b155928c9183c2f37b5c4eec21037d958699 Author: Lewis Huang Date: Wed May 20 18:03:05 2020 +0800 drm/amd/display: change global buffer to local buffer [Why] Multi-adapter calculate regamma table at the same time. Two thread used the same global variable cause race condition. [How] Change global buffer to local buffer Signed-off-by: Lewis Huang Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit eec3303de3378cdfaa0bb86f43546dbbd88f94e2 Author: Aric Cyr Date: Tue May 26 13:56:53 2020 -0400 drm/amd/display: Improve DisplayPort monitor interop [Why] DC is very fast at link training and stream enablement which causes issues such as blackscreens for non-compliant monitors. [How] After debugging with scaler vendors we implement the minimum delays at the necessary locations to ensure the monitor does not hang. Delays are generic due to lack of IEEE OUI information on the failing displays. Signed-off-by: Aric Cyr Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Acked-by: Tony Cheng Signed-off-by: Alex Deucher commit a96562b01815b20d0f8b37890c0316f516a1fb77 Author: Aurabindo Pillai Date: Tue May 26 15:55:06 2020 -0400 drm/amd/display: Enable use of dmub iff dmcu is disabled [Why & How] DMUB command table should be allowed to be used only if dmcu is explicitly disabled. Signed-off-by: Aurabindo Pillai Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit b3ff538cbe9dba6142ede522b796975c6b59a0b7 Author: Dmytro Laktyushkin Date: Wed May 27 10:34:38 2020 -0400 drm/amd/display: make calculate watermarks a function pointer To allow code reuse with minimal duplication watermark calculation needs to be function pointer. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 74a166759d692efe18996076736b61533936892b Author: Rodrigo Siqueira Date: Tue May 26 16:53:38 2020 -0400 drm/amd/display: Add helper to convert DC status During the debugging process related to a hot-plug problem with 4k display, we realized that we had some issues related to the global state validation. This problem was not explicitly highlighted in the dmesg log, for this reason, this commit adds a function that converts `enum dc_status` to a human-readable string and appends the proper warning message in case of failure. Signed-off-by: Rodrigo Siqueira Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 0a25e8eb95cd7bf28857ef671296154c25b1fb44 Author: Jun Lei Date: Tue May 26 11:17:53 2020 -0400 drm/amd/display: add support for per-state dummy-pstate latency [why] Dummy pstate latency actually varies between different UCLK frequencies, when calculating watermark C, if DAL always assumes worst case, then it can lead to dummy pstate not supported scenarios. [how] Rather than statically calculating dummy pstate using worst case, we store the entire table of UCLK to dummy pstate relationships. On a per mode basis, we calculate the actual UCLK lower limit, and use the dynamic worst case dummy pstate latency. This prevents the situation where we don't support full p-state (which will force high DPM), but still use low DPM dummy pstate latency. Signed-off-by: Jun Lei Reviewed-by: Joshua Aberback Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit a1500a62d094544e2a513a2569d38321cbbbee3c Author: Wenjing Liu Date: Mon May 25 13:45:22 2020 -0400 drm/amd/display: Revert "DP link layer test 4.2.1.1 fix due to specs update" [why] The change causes some regression in a common use case. Will need more investigation before fixing the original issue. [how] This reverts commit fb8cf277b16d3f8b16941d217f7bae4ed7e73bea. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ed8ec123a12fb804d3e2aa854434076bea22724c Author: Dmytro Laktyushkin Date: Fri May 22 11:36:27 2020 -0400 drm/amd/display: remove unnecessary mpcc updates We were updating mpcc if there were tree changes which is unnecessary since any mpcc being added or removed will automatically update the tree. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 37ffa7a1e70484dd2634b2f63730c7af56f365d9 Author: Yongqiang Sun Date: Mon May 18 18:36:47 2020 -0400 drm/amd/display: runtime select dmub emulatior. [Why & How] Add emul specific hw function to dmub, in case of emulator is created, we can runtime switch between dmub emulator or dmub uC via is_virtual flag in dmub. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 38da56948d08da6e1b2522af599887fbd2d9ae4e Author: po-tchen Date: Fri May 22 11:46:34 2020 +0800 drm/amd/display: Passing initial SDP deadline to dmub [Why] The SDP deadline indicate the vertical time to send CRC infopacket in PSR. Signed-off-by: po-tchen Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 013cce49f754f14a3c65882b3b377fdd3aee5edd Author: Martin Tsai Date: Fri May 22 15:50:11 2020 +0800 drm/amd/display: Force delay after DP receive power up [Why] Some sprcified monitor scalar cannot recognize timing change on demand. Once the link phy disable and enable during a short period then the Sink protection mechanism could keep the screen in blank and cannot be recoverred. [How] To add 100ms delay between enable link phy and link training. Signed-off-by: Martin Tsai Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit c69553ebdff647457d4c216eac4aff187891197b Author: Aric Cyr Date: Mon May 25 00:02:07 2020 -0400 drm/amd/display: 3.2.88 Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 78ead7715f3f898cb4235fdf95bd4fce4a54ae2b Author: Anthony Koo Date: Fri May 22 17:48:23 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.14 [Header Changes] - Add SDP transmission deadline for PSR config cmd Signed-off-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 2166d9fb6e660fc17d37dc833cd691bc7ee0b4db Author: Charlene Liu Date: Fri May 22 11:29:36 2020 -0400 drm/amd/display: update audio wall clock programming [why] for audio on real TV issue. [how] -add wall clock programming for DPREF based when Pixel clock is done by DP DTO. Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 92bfc4a196977d75da15f7544fd538e71684ca39 Author: Nicholas Kazlauskas Date: Fri May 22 13:24:06 2020 -0400 drm/amd/display: Fix VBA chroma calculation for pipe splitting [Why] DML failures occur for 420 modes with dynamic pipe splitting enabled because the ChromaViewport exceeds the ChromaSurfaceWidth. This is caused by adding the viewport_width instead of the viewport_width_c. This similarly occurs for rotated modes due to the use of viewport_height instead of viewport_height_c. [How] Correct the calculations. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Dmytro Laktyushkin Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit c0838cbee2d05c3eb8a2b5a3d1ce706a73008044 Author: Hugo Hu Date: Wed May 20 12:31:19 2020 +0800 drm/amd/display: Revert "enable plane if plane_status changed" This reverts commmit fd0293dd5b68a67a8731d54a6b334945e4e95757. Signed-off-by: Hugo Hu Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit a4b2903087e054dc2db0e47c3ee9aee9788b9234 Author: Roman Li Date: Wed Apr 29 10:54:21 2020 -0400 drm/amd/display: Remove unused macro from dcn21 [Why] SOC_BOUNDING_BOX_VALID is unused and not required for dcn21. [How] Remove it. Signed-off-by: Roman Li Reviewed-by: Bhawanpreet Lakha Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ca8e2084e54b0c81638d94dfcaae84accb05869d Author: Nicholas Kazlauskas Date: Thu May 21 12:32:45 2020 -0400 drm/amd/display: Use u16 for drm_bpp in DSC calculations [Why] DSC calculations fail because the u16 bits_per_pixel from the DRM struct is being casted to the u8 drm_bpp parameters and locals. Integer wraparound is happening because this value is greater than 255. [How] Use u16 to match what's in the structure instead of u8. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit b7efa4f5cdb4c44311483ffacc1cfe235af28b25 Author: Wesley Chalmers Date: Wed May 20 15:32:31 2020 -0400 drm/amd/display: Move call to disable DPG [WHY] Disabling DPG should happen after setting watermarks and clocks Signed-off-by: Wesley Chalmers Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit d05bfc62f527448ef6f423217429021a502b3774 Author: Anthony Koo Date: Wed May 20 10:38:44 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.13 [Header Changes] - Version bump to 1.0.13 Signed-off-by: Anthony Koo Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 4a673157b8d1e4d2586b26a5786acc1dd7c02f8a Author: Michael Strauss Date: Fri May 8 13:04:23 2020 -0400 drm/amd/display: Fix incorrect dcn1 bandwidth calculations [WHY] Typos cause bandwidth calculation errors, one of which can cause infinite loop on dcn1 with eDP Signed-off-by: Michael Strauss Reviewed-by: Dmytro Laktyushkin Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 1e5d05ec806815582262d6d16842f0cb423fef14 Author: Rodrigo Siqueira Date: Wed Apr 29 10:53:02 2020 -0400 drm/amd/display: Rework dsc to isolate FPU operations When we want to use float point operation on Linux we need to use within special kernel protection (`kernel_fpu_{begin,end}()`.), otherwise the kernel can clobber userspace FPU register state. For detecting these issues we use a tool named objtool (with -Ffa flags) to highlight the FPU problems, all warnings can be summed up as follows: ./tools/objtool/objtool check -Ffa drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.o [..] dc/dsc/rc_calc.o: warning: objtool: get_qp_set()+0x2f8: FPU instruction outside of kernel_fpu_{begin,end}() [..] dc/dsc/rc_calc.o: warning: objtool: dsc_roundf()+0x5: FPU instruction outside of kernel_fpu_{begin,end}() [..] dc/dsc/rc_calc.o: warning: objtool: dsc_ceil()+0x5: FPU instruction outside of kernel_fpu_{begin,end}() [..] dc/dsc/rc_calc.o: warning: objtool: get_ofs_set()+0x3eb: FPU instruction outside of kernel_fpu_{begin,end}() [..] dc/dsc/rc_calc.o: warning: objtool: calc_rc_params()+0x3c: FPU instruction outside of kernel_fpu_{begin,end}() [..] dc/dsc/dc_dsc.o: warning: objtool: get_dsc_bandwidth_range.isra.0()+0x8d: FPU instruction outside of kernel_fpu_{begin,end}() [..] dc/dsc/dc_dsc.o: warning: objtool: setup_dsc_config()+0x2ef: FPU instruction outside of kernel_fpu_{begin,end}() [..] dc/dsc/rc_calc_dpi.o: warning: objtool:copy_pps_fields()+0xbb: FPU instruction outside of kernel_fpu_{begin,end}() [..] dc/dsc/rc_calc_dpi.o: warning: objtool: dscc_compute_dsc_parameters()+0x7b: FPU instruction outside of kernel_fpu_{begin,end}() This commit fixes the above issues by rework DSC as described: 1. Isolate all FPU operations in a single file; 2. Use FPU flags only in the file that handles FPU operations; 3. Isolate all functions that require float point operation in static functions; 4. Add a mid-layer function that does not use any float point operation, and that could be safely invoked in other parts of the code. 5. Keep float point operation under DC_FP_{START/END} macro. CC: Christian König CC: Alexander Deucher CC: Peter Zijlstra CC: Tony Cheng CC: Harry Wentland Signed-off-by: Rodrigo Siqueira Reviewed-by: Mikita Lipski Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 5069202f002424fa18d4a0cb175e9e350c6addf9 Author: Charlene Liu Date: Tue May 19 15:35:58 2020 -0400 drm/amd/display: correct alpha_en programming for new pixel format [why] for following new format, no alpha SURFACE_PIXEL_FORMAT_GRPH_RGB111110_FLOAT/_FIX: SURFACE_PIXEL_FORMAT_GRPH_BGR101111_FLOAT/_FIX same as case SURFACE_PIXEL_FORMAT_GRPH_ARGB1555: Signed-off-by: Charlene Liu Reviewed-by: Chris Park Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 8d7fb7a10a825bd2e2c0fde7979cd8774c332bea Author: Tom St Denis Date: Thu Jun 11 07:54:13 2020 -0400 drm/amd/amdgpu: Add SQ_DEBUG_STS_GLOBAL* registers/bits Even though they are technically MMIO registers I put the bits with the sqind block for organizational purposes. Requested for UMR debugging. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 651a146526a04993c5bebf0e19cd9256f5e6511d Author: James Zhu Date: Wed Jun 10 12:10:20 2020 -0400 drm/amdgpu/jpeg: fix race condition issue for jpeg start Fix race condition issue when multiple jpeg starts are called. Signed-off-by: James Zhu Acked-by: Nirmoy Das Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 7ef869ef6876a511c68da0592209442d16d36f0c Author: Emily Deng Date: Thu Jun 11 14:09:16 2020 +0800 drm/amdgpu/sriov: Need to clear kiq position As will clear vf fw during unload driver, to avoid idle fail. Need to clear KIQ portion also. Signed-off-by: Emily Deng Ack-by: Monk.liu Signed-off-by: Alex Deucher commit ac1af42132d213eaa4b72ac9b5f49feb349fc454 Author: Emily Deng Date: Thu Jun 11 11:40:05 2020 +0800 drm/amdgpu/sriov: Disable pm for multiple vf sriov Signed-off-by: Emily Deng Ack-by: Monk.liu Signed-off-by: Alex Deucher commit 3bda8acd974e362069e291a78c59a10624debc6e Author: Emily Deng Date: Thu Jun 11 11:36:04 2020 +0800 drm/amdgpu/sriov: Add clear vf fw support Guest VM issue the PSP clear_vf_fw command at 2 points: 1.On VF driver loading, after VF message PSP to setup rings, the next command is “clear_vf_fw” 2.On VF driver unload before VF message to destroy rings Signed-off-by: Emily Deng Ack-by: Monk.liu Signed-off-by: Alex Deucher commit b6df946ef4b5ae29183b2fdb2d12c381c757b3fb Author: Prike.Liang Date: Fri Jun 5 17:53:56 2020 +0800 drm/amdgpu: fix the nullptr issue as for PWR IP not existing in discovery table Fixes: c1cf79ca5ced46 ("drm/amdgpu: use IP discovery table for renoir") This nullptr issue should be specific on the Renoir series during try access the PWR_MISC_CNTL_STATUS when PWR IP not been detected by discovery table. Moreover the PWR IP not existing in Renoir series is expected therefore just avoid access PWR register in Renoir series. Signed-off-by: Prike.Liang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 5a84ae87fe6123f9521eea48e405f8ad74e2b8ad Author: Sandeep Raghuraman Date: Thu Jun 11 01:36:26 2020 +0530 drm/amdgpu: Replace invalid device ID with a valid device ID Initializes Powertune data for a specific Hawaii card by fixing what looks like a typo in the code. The device ID 66B1 is not a supported device ID for this driver, and is not mentioned elsewhere. 67B1 is a valid device ID, and is a Hawaii Pro GPU. I have tested on my R9 390 which has device ID 67B1, and it works fine without problems. Signed-off-by: Sandeep Raghuraman Signed-off-by: Alex Deucher commit 8df1a28f41b9593301353c4f419c0fd93c40a26f Author: Dan Carpenter Date: Wed Jun 10 11:56:53 2020 +0300 drm/amdgpu: Fix a buffer overflow handling the serial number The comments say that the serial number is a 16-digit HEX string so the buffer needs to be at least 17 characters to hold the NUL terminator. The other issue is that "size" returned from sprintf() is the number of characters before the NUL terminator so the memcpy() wasn't copying the terminator. The serial number needs to be NUL terminated so that it doesn't lead to a read overflow in amdgpu_device_get_serial_number(). Also it's just cleaner and faster to sprintf() directly to adev->serial[] instead of using a temporary buffer. Fixes: 81a16241114b ("drm/amdgpu: Add unique_id and serial_number for Arcturus v3") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher Reviewed-by: Evan Quan commit 3466a8f0c2fc9e428dc96b270037dfe657521f43 Author: Evan Quan Date: Tue Jun 9 12:25:07 2020 +0800 drm/amd/powerplay: maximum code sharing on sensor reading Move the common code to amdgpu_smu.c instead of having one copy in both smu_v11_0.c and smu_v12_0.c. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5675123d605637abd69a67997915a17a5973f608 Author: Evan Quan Date: Tue Jun 9 12:16:56 2020 +0800 drm/amd/powerplay: revise the calling chain on sensor reading Update the calling chain from "amdgpu_smu.c -> ${asic}_ppt.c -> smu_v11/12_0.c -> amdgpu_smu.c (smu_common_read_sensor())" to " "amdgpu_smu.c -> ${asic}_ppt.c -> smu_v11/12_0.c". This can help to maintain clear code layers. More similar changes will be coming. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b9fe63d2a030d04c876dc801f5953a54d81f527a Author: Evan Quan Date: Tue Jun 9 12:03:58 2020 +0800 drm/amd/powerplay: drop unnecessary SMU_MSG_GetDpmClockFreq check Since SMU_MSG_GetDpmClockFreq is known to be supported for Vega20 and before ASICs only. For those ASICs supporting swSMU, it is not supported. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 947119a3f9c9f9212a89fe864f0c40e903b24af0 Author: Evan Quan Date: Mon Jun 8 19:49:08 2020 +0800 drm/amd/powerplay: drop unnecessary wrapper .populate_smc_tables Since .populate_smc_tables is just a wrapper of .set_default_dpm_table. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ce63d8f8b55d28ca00ab310b0cb3d507cbe4b14a Author: Evan Quan Date: Mon Jun 8 19:31:03 2020 +0800 drm/amd/powerplay: drop redundant .set_min_dcefclk_deep_sleep API (v2) It has exactly the same functionality as .set_deep_sleep_dcefclk. V2: correct the macro name for better trace Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 282fd22b46b86ae480b7256969deaad2d81729fd Author: Colton Lewis Date: Tue Jun 9 00:39:15 2020 +0000 drm/amd: correct trivial kernel-doc inconsistencies Silence documentation warnings by correcting kernel-doc comments. ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3388: warning: Excess function parameter 'suspend' description in 'amdgpu_device_suspend' ./drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3485: warning: Excess function parameter 'resume' description in 'amdgpu_device_resume' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:418: warning: Excess function parameter 'tbo' description in 'amdgpu_vram_mgr_del' ./drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c:418: warning: Excess function parameter 'place' description in 'amdgpu_vram_mgr_del' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:279: warning: Excess function parameter 'tbo' description in 'amdgpu_gtt_mgr_del' ./drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c:279: warning: Excess function parameter 'place' description in 'amdgpu_gtt_mgr_del' ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:332: warning: Function parameter or member 'hdcp_workqueue' not described in 'amdgpu_display_manager' ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:332: warning: Function parameter or member 'cached_dc_state' not described in 'amdgpu_display_manager' Signed-off-by: Colton Lewis Signed-off-by: Alex Deucher commit 055e23e3d9ea1d680977f8e34f9678c17cb3cfc1 Author: Tom St Denis Date: Tue Jun 9 07:49:59 2020 -0400 drm/amd/amdgpu: Add SQ debug registers to GFX9/GFX10 headers (v2) Requested for UMR support. (v2): Also add reg/bits for gfx9 headers Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7504d3bbec7da70516a13e34415b92bf5203399a Author: Liu ChengZhe Date: Tue Jun 9 16:44:43 2020 +0800 drm/amd/amdgpu: handle return value of amdgpu_driver_load_kms if guest driver failed to enter full GPU access, amdgpu_driver_load_kms will unload kms and free dev->dev_private, drm_dev_register would access null pointer. Driver will enter an error state and can't be unloaded. Signed-off-by: Liu ChengZhe Reviewed-by: Madhav Chauhan Signed-off-by: Alex Deucher commit 10eafd3e56fde46869d8f46d19c2dc80bdd23bba Author: Evan Quan Date: Mon Jun 8 18:04:42 2020 +0800 drm/amd/powerplay: move maximum sustainable clock retrieving to .hw_init Since DAL settings come between .hw_init and .late_init of SMU. And DAL needs to know the maximum sustainable clocks. Signed-off-by: Evan Quan Reported-and-Tested-by: Flora Cui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 549db52682cb1282b5ac230626fddfeb4b74b409 Author: Evan Quan Date: Mon Jun 8 18:33:38 2020 +0800 drm/amd/powerplay: add check for power limit OD support Before counting the OD percent into max power limit margin. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e10d1ecf9db13bc1e520596a5b3aee684ddd86a9 Author: Evan Quan Date: Mon Jun 8 17:33:03 2020 +0800 drm/amd/powerplay: correct power limit retrieving based on current power source Instead of hard coding it as SMU_POWER_SOURCE_AC. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4cb738ab7853c66ca563246cc8b74ac7e88e02d2 Author: Evan Quan Date: Mon Jun 8 17:04:04 2020 +0800 drm/amd/powerplay: drop unused code around power limit Drop unused APIs, variables and argument. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5213e49df397e6056c30b368e2f986950f0b4bbb Author: Evan Quan Date: Mon Jun 8 16:47:59 2020 +0800 drm/amd/powerplay: simplify the code around setting power limit Use the cached max/current power limit and move the input check to the top layer. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a141b4e3c722c1c0f72177e258f2cb591949018b Author: Evan Quan Date: Mon Jun 8 16:41:16 2020 +0800 drm/amd/powerplay: simplify the code around retrieving power limit Use the cached max/current power limit for other cases except .late_init. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1e239fdd31cdf1729bc1e8b4538bf590bd28de57 Author: Evan Quan Date: Mon Jun 8 16:29:41 2020 +0800 drm/amd/powerplay: maximize code sharing around power limit Also cache the current and max power limits. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f3bc9aecebbc8f58e13477567afc697dfa6becaf Author: Evan Quan Date: Mon Jun 8 14:34:50 2020 +0800 drm/amd/powerplay: drop unnecessary get_pptable_power_limit wrappers Minor code cleanup. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f6b4b4a1dbf3cc3a48ebc7fec7a11549d89b244d Author: Evan Quan Date: Fri Jun 5 18:28:58 2020 +0800 drm/amd/powerplay: correct the APIs' naming 'UVD' is a HW engine name for Vega20 and before ASICs. For newer ASICs, the similar engine is named as 'VCN'. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7a1105bd65c78a09adf1485d00a7014c5bfe3bf7 Author: Evan Quan Date: Fri Jun 5 18:09:47 2020 +0800 drm/amd/powerplay: drop unnecessary wrappers These APIs are used in amdgpu_smu.c only. Thus these wrappers are unnecessary. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1fdfe8cacb35a060eaf7c65a5e8bcb1d8888300b Author: Evan Quan Date: Fri Jun 5 18:02:31 2020 +0800 drm/amd/powerplay: drop dead vce powergate code This was for Vega20. However Vega20 support is already dropped from current swSMU. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7951e7c036490e996cd07add3d4cf3a6fb86c6f1 Author: Evan Quan Date: Fri Jun 5 17:52:51 2020 +0800 drm/amd/powerplay: add error messages on some critical paths Helpful for error diagnostic. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 55084d7f4022439de3077b239eed1eb7515fe3ed Author: Evan Quan Date: Fri Jun 5 15:37:16 2020 +0800 drm/amd/powerplay: forbid to use pr_err/warn/info/debug Use dev_err/warn/info/dbg instead. They are more MGPU friendly. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d9811cfc0ebdf50e5a3f43ad8397749e880a8960 Author: Evan Quan Date: Fri Jun 5 15:27:57 2020 +0800 drm/amd/powerplay: use MGPU friendly err/warn/info/dbg messages Use dev_err/warn/info/dbg instead of pr_err/warn/info/debug. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 207f0f13574825a700a4ea52d3ac4821cea627c8 Author: Prike.Liang Date: Mon Jun 8 15:20:56 2020 +0800 drm/amdgpu/soc15: fix nullptr issue in soc15_read_register() for reg base accessing The failed case is no SDMA1 IP for Renoir discovery table while in accessing SDMA1 reg base, thus need have nullptr test for soc15_read_register invoked in MMR addres space inquire opt. Signed-off-by: Prike.Liang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d00c3d045cd91b8d45e0a9cdfd91d4ace4e0bbc9 Author: Dan Carpenter Date: Mon Jun 8 17:16:57 2020 +0300 drm/amd/display: Fix indenting in dcn30_set_output_transfer_func() These lines are a part of the if statement and they are supposed to be indented one more tab. Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 1e814d630fd1933308fc89a8aa6072afe88f6386 Author: Denis Efremov Date: Fri Jun 5 20:37:44 2020 +0300 drm/amd/display: Use kfree() to free rgb_user in calculate_user_regamma_ramp() Use kfree() instead of kvfree() to free rgb_user in calculate_user_regamma_ramp() because the memory is allocated with kcalloc(). Signed-off-by: Denis Efremov Signed-off-by: Alex Deucher commit 8425400759749e23aaa831f2482b96211201af33 Author: Denis Efremov Date: Fri Jun 5 20:37:43 2020 +0300 drm/amd/display: Use kvfree() to free coeff in build_regamma() Use kvfree() instead of kfree() to free coeff in build_regamma() because the memory is allocated with kvzalloc(). Fixes: e752058b8671 ("drm/amd/display: Optimize gamma calculations") Cc: stable@vger.kernel.org Signed-off-by: Denis Efremov Signed-off-by: Alex Deucher commit b7221f2b4655bb9a95ed6f86658713c8dd543d41 Author: Alex Deucher Date: Mon Jun 8 15:39:33 2020 -0400 drm/amdgpu: skip BAR resizing if the bios already did it No need to do it again. Acked-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit df06583d1deb32dc67ea6305937ac360280a8474 Author: Evan Quan Date: Thu Jun 4 16:27:13 2020 +0800 drm/amd/powerplay: use the same interval as PMFW on retrieving metrics table Current 100ms interval makes no sense. User gets outdated data due to this. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8c686254291d51c344f033d8642ef3b75f6dd211 Author: Evan Quan Date: Thu Jun 4 18:28:34 2020 +0800 drm/amd/powerplay: update how to use metrics table on Sienna Cichlid Retrieve only those data interested instead of the whole table. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit cf24dd2780c3b58669904a78fe8b549c69282102 Author: Evan Quan Date: Thu Jun 4 15:37:22 2020 +0800 drm/amd/powerplay: update how to use metrics table on Navi10 Retrieve only those data interested instead of the whole table. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 482191262e7b6e8ab7c582e4462d4cbcb601d3d0 Author: Evan Quan Date: Tue Jun 2 17:48:11 2020 +0800 drm/amd/powerplay: update how to use metrics table on Arcturus Retrieve only those interested metrics data instead of the whole metrics table. By this, the memory copy can be dropped. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e8f141f58700e8f6d251fe485972b46ae4119f65 Author: Flora Cui Date: Fri Jun 5 15:12:24 2020 +0800 drm/amd/display: drop duplicated .dsc_pg_control for dcn30 There're 2 .dsc_pg_control, drop the first one. .dsc_pg_control = NULL, .dsc_pg_control = dcn20_dsc_pg_control, Signed-off-by: Flora Cui Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit cf9f579c851a3ecfa677012ee86f918c549894a9 Author: Flora Cui Date: Fri Jun 5 14:13:26 2020 +0800 drm/amd/display: drop duplicated structure struct gpu_info_voltage_scaling_v1_0 & gpu_info_soc_bounding_box_v1_0 is defined in amdgpu_socbb.h Signed-off-by: Flora Cui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit df770a01471f1bc0cc2542700229f13249369f0a Author: Likun Gao Date: Wed Jun 3 12:33:18 2020 +0800 drm/amd/powerplay: update driver if file for sienna_cichlid Update sienna_cichlid driver if header file to match pptable changes. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit e05acd78b8855f5bcf8067486f9787c1ae141e8d Author: Likun Gao Date: Tue Jun 2 17:15:20 2020 +0800 drm/amd/powerplay: update powerplay table for sienna_cichlid Update powerplay table for sienna_cichlid, add set_thermal_range and get_max_power_limit function for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 6fe0c7676bf26be974e7c311acff30d41167dac9 Author: Likun Gao Date: Tue Jun 2 17:11:58 2020 +0800 drm/amd/powerplay: add smu v11_0_7 pptable Add smu_v11_0_7_pptable.h for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 947c127b2629edacc924ed2bda54fb158238560e Author: Likun Gao Date: Tue Jun 2 16:29:08 2020 +0800 drm/amd/powerplay: move powerplay table operation out of smu_v11_0.c move smu_v11_0_get_max_power_limit and smu_v11_0_set_thermal_range function from smu_v11_0.c to asic specific _ppt.c to avoid powerplay table conflict with different ASIC with smu11. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 5278a159cf350142e91788f12659489e33a71a91 Author: Stanley.Yang Date: Thu May 14 16:44:42 2020 +0800 drm/amdgpu: support reserve bad page for virt (v3) v1: rename some functions name, only init ras error handler data for supported asic. v2: fix potential memory leak. Signed-off-by: Stanley.Yang Reviewed-by: Tao Zhou Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 6961750f12c8e768c081b5fa8ced8b524d4a659d Author: Evan Quan Date: Wed Jun 3 11:45:49 2020 +0800 drm/amd/powerplay: use work queue to perform throttling logging As IO operations(access to SMU internals) and possible sleep are involved in throttling logging. Workqueue can handle them well. Otherwise we may hit "scheduling while atomic" error. Signed-off-by: Evan Quan Acked-by: Nirmoy Das Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9b1a6a581e598c7fdd80efca682fc9a061633dde Author: Evan Quan Date: Mon Jun 1 18:31:20 2020 +0800 drm/amd/powerplay: skip BACO feature on DPMs disablement Instead of disabling and reenabling it later. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 6f47116e57d6288e64e4e7a40db537f0d423826d Author: Evan Quan Date: Mon Jun 1 14:03:57 2020 +0800 drm/amd/powerplay: add firmware cleanup on sw_fini To avoid possible memory leak. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit aaddad1f64712250162c921a4694c2a4b7d9007c Author: Evan Quan Date: Mon Jun 1 13:08:56 2020 +0800 drm/amd/powerplay: move amdgpu_irq_src to the smu structure allocation Rather than allocating it dynamically at runtime considering it is only several bytes in size. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit e6f1eb4cbf53269cdab8dd4ae1ad2bba384e6ca6 Author: Evan Quan Date: Thu Jun 4 12:00:11 2020 +0800 drm/amd/powerplay: maximize code sharing between .hw_fini and .suspend Thus redundant code can be dropped. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a35a10d975ba38ce026bbf45977948616cc3383c Author: Evan Quan Date: Thu Jun 4 11:50:39 2020 +0800 drm/amd/powerplay: better namings And some minor changes as dropping unused parameter and label internal used API as static. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 613e51df0bcc6bd46f13f8fcb88b1ba5d494a2e4 Author: Evan Quan Date: Thu Jun 4 11:42:08 2020 +0800 drm/amd/powerplay: sort those operations performed in hw setup Those common operations(for all ASICs) are placed first and followed by ASIC specific ones. While the display related are placed at the last. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 26ef32518a569bc338ae6c42b147bb10046aee49 Author: Evan Quan Date: Thu Jun 4 11:35:45 2020 +0800 drm/amd/powerplay: maximize code sharing between .hw_init and .resume Then redundant code can be dropped. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4e8cb0c011222a7d2cafaca4072a371ad5ecc837 Author: Evan Quan Date: Thu Jun 4 11:25:28 2020 +0800 drm/amd/powerplay: move those operations not needed for resume out Since smu_smc_table_hw_init() is needed for both .hw_init and .resume. By doing this, we can drop unnecessary operations on resume. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 02cf91c113eacd069d58633871a1ccf3b17a33d6 Author: Evan Quan Date: Thu Jun 4 11:15:12 2020 +0800 drm/amd/powerplay: postpone operations not required for hw setup to late_init So that we do not need to perform those unnecessary operations again on resume. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 792f80d19213e9a6679e6c4bf3b2af2ce5ef0965 Author: Evan Quan Date: Fri May 29 14:07:41 2020 +0800 drm/amd/powerplay: clean up the overdrive settings Eliminate the buffer allocation and drop the unnecessary overdrive table uploading. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 4a13b4cefc2149bb62ebf90e8de89d14a2370907 Author: Evan Quan Date: Thu May 28 18:50:00 2020 +0800 drm/amd/powerplay: clean up the APIs for pptable setup Combine and simplify the logics for setup pptable. Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 12ea3449416e66a00270ecc532423ffcc798ad80 Author: Evan Quan Date: Thu May 28 18:41:28 2020 +0800 drm/amd/powerplay: clean up the APIs for bootup clocks Combine and simplify the logics for retrieving bootup clocks. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 78eb4a36155c93dca85acaed8d783604b6372f12 Author: Evan Quan Date: Thu May 28 16:55:08 2020 +0800 drm/amd/powerplay: centralize all buffer allocation in sw_init phase To fit common design. And this can simplify the buffer deallocation. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 61555ccbf92b633765146fdaba2734c3a5e239fa Author: Evan Quan Date: Wed Jun 3 18:09:01 2020 +0800 drm/amd/powerplay: implement a common API for dpms disablement So that code can be shared between .hw_fini and .suspend. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2f55c264439593ba984cb92655f1edd6bff58ac4 Author: Evan Quan Date: Wed Jun 3 18:06:02 2020 +0800 drm/amd/powerplay: drop unused APIs and unnecessary checks Minor code cleanups. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 31157341252a96861fe6e184e845762c0c008827 Author: Evan Quan Date: Mon Jun 8 18:05:34 2020 -0400 drm/amd/powerplay: eliminate asic type check The macros check if the asic has the callback. So no need to explicitly check. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5402eb5ee5c8e828dc101a3cb3cc7674b272eab2 Author: Colin Ian King Date: Thu Jun 4 11:35:44 2020 +0100 drm/amd/display: fix spelling mistake: "propogation" -> "propagation" There is a spelling mistake in a dml_print message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 3a3a720eb3bf75bf144180f6e040d7d7b42775e1 Author: Alex Deucher Date: Tue Jun 2 17:22:48 2020 -0400 drm/amdgpu/display: use blanked rather than plane state for sync groups We may end up with no planes set yet, depending on the ordering, but we should have the proper blanking state which is either handled by either DPG or TG depending on the hardware generation. Check both to determine the proper blanked state. Bug: https://gitlab.freedesktop.org/drm/amd/issues/781 Fixes: 5fc0cbfad45648 ("drm/amd/display: determine if a pipe is synced by plane state") Cc: nicholas.kazlauskas@amd.com Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 4ec6c0a2080bad4aafda0160f4d1ff984cebd452 Author: Nicholas Kazlauskas Date: Tue Jun 2 20:42:33 2020 -0400 drm/amd/display: Revalidate bandwidth before commiting DC updates [Why] Whenever we switch between tiled formats without also switching pixel formats or doing anything else that recreates the DC plane state we can run into underflow or hangs since we're not updating the DML parameters before committing to the hardware. [How] If the update type is FULL then call validate_bandwidth again to update the DML parmeters before committing the state. This is basically just a workaround and protective measure against update types being added DC where we could run into this issue in the future. We can only fully validate the state in advance before applying it to the hardware if we recreate all the plane and stream states since we can't modify what's currently in use. The next step is to update DM to ensure that we're creating the plane and stream states for whatever could potentially be a full update in DC to pre-emptively recreate the state for DC global validation. The workaround can stay until this has been fixed in DM. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit 730c2eb977a0b1cf950a94da1bec064f401fb8b0 Author: Alex Deucher Date: Tue Jun 2 14:51:36 2020 -0400 drm/amdgpu/fence: use the no_scheduler flag Rather than checking the ring type manually. We already set this for MES and KIQ (and a few other special cases). Reviewed-by: Christian König Signed-off-by: Alex Deucher commit eb0b5d6fdb0b000fac3446b6ad7ac744e9114cab Author: Alex Deucher Date: Tue Jun 2 15:08:39 2020 -0400 Revert "drm/[radeon|amdgpu]: Replace one-element array and use struct_size() helper" This reverts commit 4541ea81edde6ce9a1d9be082489aca7e8e7e1dc. This changes structs used by the hardware and breaks dpm on some cards. Acked-by: Christian König Signed-off-by: Alex Deucher commit f86c9b8b56a74b2d0d3543339b2ac52b75b2237e Author: Nicholas Kazlauskas Date: Wed Jun 3 09:32:10 2020 -0400 drm/amd/display: Only actually breakpoint if DEBUG_KERNEL_DC is enabled To match previous behavior and to not hang the kernel if someone accidentally builds with KGDB enabled. Fixes: 1aad7078191116f ("drm/amd/display: Make BREAK_TO_DEBUGGER() a debug print") Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit da483dd1d8d7bdfd64192a1df8e7b6a7a8b2b7f2 Author: Huang Rui Date: Mon Jun 1 10:51:34 2020 +0800 drm/amd/powerplay: use existed smu_dpm_set* interfaces to implement powergate functions Abstract powergate_vcn/jpeg functions, using smu_dpm_set* to implement it. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit cc375d8c5248959319d6b8b4c4388482180ecb42 Author: Tianci.Yin Date: Wed Jun 3 10:05:22 2020 +0800 drm/amdgpu: temporarily read bounding box from gpu_info fw for navi12 The bounding box is still needed by Navi12, temporarily read it from gpu_info firmware. Should be droped when DAL no longer needs it. Reviewed-by: Alex Deucher Reviewed-by: Xiaojie Yuan Reviewed-by: Feifei Xu Signed-off-by: Tianci.Yin Signed-off-by: Alex Deucher commit 96134346bb6ae3f212617dd66a1105250f31a7ef Author: Bhawanpreet Lakha Date: Thu May 21 12:57:54 2020 -0400 drm/amd/display: Add DCN3 to Kconfig Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit e77165bf7b02a3c01819a209c6c569850254c020 Author: Bhawanpreet Lakha Date: Mon May 25 13:18:16 2020 -0400 drm/amd/display: Add DCN3 blocks to Makefile Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit cb8bcc98251b88dbf5ddd6427971d8e7b298ce75 Author: Alex Deucher Date: Wed Jun 3 13:59:16 2020 -0400 drm/amdgpu/display: fix build without CONFIG_DRM_AMD_DC_DCN3_0 Need to guard some new DCN3.0 stuff. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit f0bfa78b0f721b8c2ba60eaa74b784e3f30181f7 Author: Dmytro Laktyushkin Date: Mon Apr 27 14:55:08 2020 -0400 drm/amd/display: fix and simplify pipe split logic for DCN3 This was done already done for other DCN blocks. Signed-off-by: Dmytro Laktyushkin Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 464ab91ac5f1765c758722a1c298873795773a2f Author: Bhawanpreet Lakha Date: Thu May 21 12:57:27 2020 -0400 drm/amdgpu: Enable DM block for DCN3 Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 7f3e2919c9fe0a86292c012f72c8b5d14f2c1a8a Author: Bhawanpreet Lakha Date: Thu May 21 15:35:27 2020 -0400 drm/amd/display: Remove Unused Registers Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit fb625e1b6584daebf2b29d335c9c428e30498d89 Author: Bhawanpreet Lakha Date: Thu May 21 13:00:08 2020 -0400 drm/amd/display: Handle RGBE_ALPHA Pixel Format Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit c5c76abd49b65f9b785c19aa5b2d7d3a621bc57f Author: Bhawanpreet Lakha Date: Mon May 25 12:44:21 2020 -0400 drm/amd/display: Init function tables for DCN3 Initilize function tables for hw programing Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 3c10f4fb90065db534dd3557f08e467164e0a52b Author: Bhawanpreet Lakha Date: Mon May 25 13:15:04 2020 -0400 drm/amd/display: Add DCN3 VPG Video Package generator. used to prepare avi info, DP info etc Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 73de3de5bc83e41dea45c83154126d25f7c632a7 Author: Bhawanpreet Lakha Date: Thu May 21 12:56:17 2020 -0400 drm/amd/display: Add DCN3 AFMT Audio formating Audio related code for setup/control Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 330fa233f8cd027b689862edcba0322fb10177df Author: Bhawanpreet Lakha Date: Thu May 21 12:58:56 2020 -0400 drm/amd/display: Add DCN3 Command Table Helpers -Handle DCN3 cases for bios parser and command tables -Add command function tables for DCN3 Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 5dba4991fd338dc4b2664c0c6b3d80edead4e22c Author: Bhawanpreet Lakha Date: Thu May 21 12:51:51 2020 -0400 drm/amd/display: Add DCN3 Resource Add support for managing resources for DCN3 Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 790373245ee6d7806f3608060529c94fcd525271 Author: Bhawanpreet Lakha Date: Thu May 21 12:48:41 2020 -0400 drm/amd/display: Add DCN3 Support in DM (v2) Handle DCN3 in amdgpu_dm v2: fix num_pkrs handling Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit d99f13878d6f9c286b13860d8bf0b4db9ffb189a Author: Bhawanpreet Lakha Date: Thu May 21 12:45:45 2020 -0400 drm/amd/display: Add DCN3 HWSEQ Add HW sequence programing for DCN3 Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 5baebf61ba0ce14253a513ac92be661b35a19676 Author: Bhawanpreet Lakha Date: Fri May 29 15:06:16 2020 -0400 drm/amd/display: Add DCN3 DMUB DMUB (Display Micro-Controller Unit) Used to read/write regs Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 666ed8bfd1de3b091cf32ca03b651757dd86cfff Author: Bhawanpreet Lakha Date: Thu May 21 12:31:21 2020 -0400 drm/amd/display: Add DCN3 GPIO Add support to program GPIO HW block Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 21f4809ae44374c36c429b7135794d47b6d79ff7 Author: Bhawanpreet Lakha Date: Thu May 21 12:30:35 2020 -0400 drm/amd/display: Add DCN3 IRQ Add IWQ services for DCN3, This allows us to create/init and manage irqs for DCN3 Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 6725a88f88a7e922e91c45bf83d320487810c192 Author: Bhawanpreet Lakha Date: Thu May 21 12:29:44 2020 -0400 drm/amd/display: Add DCN3 DML Add support for DML(Display mode library) for bandwidth calculations Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 8993dee0de2ae9b23c6e254e707a65a0b91cade0 Author: Bhawanpreet Lakha Date: Thu May 21 12:42:30 2020 -0400 drm/amd/display: Add DCN3 DWB Add support to program the DCN3 DWB (Display Writeback) HW Blocks: +--------++------+ +----------+ | HUBBUB || HUBP | <-- | MMHUBBUB | +--------++------+ +----------+ | ^ v | +--------+ +--------+ | DPP | | DWB | +--------+ +--------+ | v ^ +--------+ | | MPC | | +--------+ | | | v | +-------+ | | OPP | | +-------+ | | | v | +--------+ / | OPTC | -------------- +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4898dc4847c2937a5494d70c3f7a59f03d17ccd8 Author: Bhawanpreet Lakha Date: Thu May 21 12:36:30 2020 -0400 drm/amd/display: Add DCN3 MMHUBHUB Add support to program the DCN3 MMHUBBUB (Multimedia HUB interface) HW Blocks: +--------++------+ +----------+ | HUBBUB || HUBP | <-- | MMHUBBUB | +--------++------+ +----------+ | v +--------+ | DPP | +--------+ | v +--------+ | MPC | +--------+ | v +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit db7b0216c4e03bd4cf46edc1b85a7ae159f14703 Author: Bhawanpreet Lakha Date: Thu May 21 12:44:03 2020 -0400 drm/amd/display: Add DCN3 HUBP Add support to program the DCN3 HUBP (Display to data fabric interface pipe) HW Blocks: +--------++------+ | HUBBUB || HUBP | +--------++------+ | v +--------+ | DPP | +--------+ | v +--------+ | MPC | +--------+ | v +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 8f712e3e5e77c6196331e070bc847a5483bc6c10 Author: Bhawanpreet Lakha Date: Thu May 21 12:37:22 2020 -0400 drm/amd/display: Add DCN3 HUBHUB Add support to program the HUBBUB (DCN memory HUB interface) HW Blocks: +--------+ | HUBBUB | +--------+ | v +--------+ | DPP | +--------+ | v +--------+ | MPC | +--------+ | v +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 03f54d7d3448dc1668568d1adb69b43c1d1dc79f Author: Bhawanpreet Lakha Date: Thu May 21 12:35:22 2020 -0400 drm/amd/display: Add DCN3 DPP Add support to program the DCN3 DPP (Multiple pipe and plane combine) HW Blocks: +--------+ | DPP | +--------+ | v +--------+ | MPC | +--------+ | v +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit b708205f08a28994c1dbafb1eff6f6647a495fbd Author: Bhawanpreet Lakha Date: Thu May 21 12:38:55 2020 -0400 drm/amd/display: Add DCN3 MPC Add support to program the DCN3 MPC (Multiple pipe and plane combine) HW Blocks: +--------+ | MPC | +--------+ | v +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 8ea13e52a5c17ba3c9da6c15473c7446b1e85d4b Author: Bhawanpreet Lakha Date: Fri May 22 17:22:00 2020 -0400 drm/amd/display: Add DCN3 OPP header Add support to program the DCN3 OPP (Output Plane Processing) HW Blocks: +-------+ | OPP | +-------+ | v +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 64e7f91e7ac88e94302a213cf61afe70b734fa2a Author: Bhawanpreet Lakha Date: Thu May 21 12:43:28 2020 -0400 drm/amd/display: Add DCN3 OPTC Add support for programming the DCN3 OPTC (Output Timing Controller) HW Blocks: +--------+ | OPTC | +--------+ | v +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 2a3a0d5d7962628684bb5cf4be38747dcbb1f35e Author: Bhawanpreet Lakha Date: Thu May 21 12:38:30 2020 -0400 drm/amd/display: Add DCN3 DCCG Add programming of the DCCG (Display Controller Clock Generator) block: HW Blocks: +--------+ +--------+ | DIO | | DCCG | +--------+ +--------+ Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 4d55b0dd1cdd8535ffd6057f210465575117d807 Author: Bhawanpreet Lakha Date: Thu May 21 12:32:53 2020 -0400 drm/amd/display: Add DCN3 CLK_MGR Adds support for handling of clocking relevant to the DCN3 block Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit be547111d2be16e81dc2d9669cf3caa3675fa55d Author: Bhawanpreet Lakha Date: Fri May 22 14:38:38 2020 -0400 drm/amd/display: Add DCN3 DIO Add support for the DIO (Display IO) block of DCN3, which entails our stream and link encoders. HW Blocks: +--------+ | DIO | +--------+ Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 7c40270be76d0ee33455bba728d508f5dddfc604 Author: Bhawanpreet Lakha Date: Thu May 21 12:28:39 2020 -0400 drm/amd/display: Add DCN3 chip ids Signed-off-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher commit 2c6e83a134b84c2257403ed2e4480b2f09673d3e Author: Likun Gao Date: Tue May 26 16:54:44 2020 +0800 drm/amdgpu: bypass tmr when reserve c2p memory C2P memory reserved should not in tmr memory range. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 72d208c23cbceb496ac59f53b1e1769b6ed6f4d6 Author: Likun Gao Date: Fri May 22 14:42:35 2020 +0800 drm/amdgpu: remove unnecessary check for mem train a.Check whether mem train support when try to reserve related memory. b.Remove ASIC check and atom firmware table version check as the check of firmware capability is enough to achieve that purpose. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0a4fa83c2af093959298ca521443bc70f8da0768 Author: Likun Gao Date: Thu May 21 15:35:46 2020 +0800 drm/amdgpu: support memory training for sienna_cichlid Add memory training support for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 83d7f66a530aa1c54fb9df6235ab73f29a128ce8 Author: Likun Gao Date: Thu May 21 10:33:15 2020 +0800 drm/amdgpu: reserve fb according to return value from vbios Query reserved tmr size through atom firmwareinfo for Sienna_Cichlid and onwards for all the use cases (IP discovery/G6 memory training/profiling/diagnostic data.etc), otherwise, fallback to legacy approach to check and reserve tmr block for ip discovery data and G6 memory training data respectively Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4c301044c785bedc2d6dade5477317429fe8612e Author: Evan Quan Date: Fri May 29 14:38:53 2020 -0400 drm/amd/powerplay: let PMFW to handle the features disablement on BACO in V2 For Sienna_Cichlid, PMFW will handle the features disablement on BACO in. No need to have driver stepped in. V2: limit this for baco really Signed-off-by: Evan Quan Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit e2c14b2cbb11d2911a05142714e7488d1b0aa1b3 Author: Likun Gao Date: Mon May 18 18:44:10 2020 +0800 drm/amd/powerplay: drop sienna_cichlid hardcode of using pptable Drop the hardcode of sienna_cichlid which will force to use softpptable, so that it can use pptable on vbios once the value of pp_table_id get from vbios is 0. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 40d3b8db83be2ea580a32c1364d32250461e4ab6 Author: Likun Gao Date: Wed May 13 20:24:53 2020 +0800 drm/amd/powerplay: update smu function for sienna_cichlid Add function to check whether baco is support for sienna cichlid. Remove fucntion of get clock by type with latency as it will not be called. Signed-off-by: Likun Gao Signed-off-by: Alex Deucher commit 04af75ef38c966db8928781c1da37a22d38fdbab Author: Likun Gao Date: Fri May 8 14:39:27 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7050905773a9fb5bf10e53fbe096e9d7c55be41c Author: Likun Gao Date: Wed May 6 16:19:41 2020 +0800 drm/amdgpu/psp: support for loading PSP SPL fw Add support for loading SPL firmware. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 43a188e0e1e0a08744020dd819f587a317b0f9cc Author: Likun Gao Date: Wed May 6 16:16:08 2020 +0800 drm/amdgpu/psp: initialization PSP SPL fw Support for psp firmware header version v1_3 initialization and information print. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 390d59be11c5c042084b4329220c066b6d161cce Author: Likun Gao Date: Wed May 6 14:57:13 2020 +0800 drm/amdgpu/psp: add structure to support PSP SPL Add support for PSP SPL (Security patch level) table to support anti-rollback of FW loaded by Trusted OS. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ba818620db217b5ed1f8fc65fb14d63772f55836 Author: Kenneth Feng Date: Thu May 7 14:33:06 2020 +0800 drm/amd/powerplay: show gfxclk=0 in gfxoff state The instant retrieved gfxclk value should be 0 in gfxoff state. This can be fetched with gfxoff enabled. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit e0da123a0495e75a7456faaf66e0a334887a80a2 Author: Likun Gao Date: Fri May 29 14:34:15 2020 -0400 drm/amdgpu: enable gfxoff for sienna_cichlid Enable GFXOFF for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 258d290c03ceda6540c4c831ae35669d82b95e15 Author: Likun Gao Date: Mon Apr 20 23:37:07 2020 +0800 drm/amd/amdgpu: disable gfxoff to retrieve gfxclk For Sienna_Cichlid, GFXOFF state puts gfx dpm into standby mode, then the gfxclk can't be retireved. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 9af9fe5bf3e06471666f26fa5dbc271825d04ae4 Author: Likun Gao Date: Tue Apr 28 16:42:30 2020 +0800 drm/amd/powerplay: support mclk socclk limit value set for sienna_cichlid. Add support to force and unforce MCLK or SOCCLK to dpm limit value. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 7cf700478d70cc1235587dbdb9ea00581bf545ac Author: shaoyunl Date: Mon Apr 27 11:53:00 2020 -0400 drm/amdgpu/sriov : Add sriov detection for sienna_cichlid This is a regression due to the rebase , add sienna_cichlid sriov detection back Signed-off-by: shaoyunl Reviewed-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f64668f9aab67136fa537a26d9ad51fdb2b33c3d Author: Likun Gao Date: Fri Apr 17 17:33:35 2020 +0800 drm/amdgpu: only use one gfx pipe for Sienna_Cichlid Only enable one gfx pipe for sienna_cichlid currently. Signed-off-by: Likun Gao Acked-by: Hawking Zhang Signed-off-by: Alex Deucher commit 338d90b613ea3546faeb55a94850d997c9a61689 Author: Likun Gao Date: Tue Apr 21 10:39:12 2020 +0800 drm/amd/powerplay: drop jpeg instance1 dpm setup VCN removed JPEG for instance 1, so drop jpeg instance1 dpm setup. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 9b76e06113d89b2e692471a1ac53e0c388e02075 Author: Likun Gao Date: Thu Apr 16 14:53:08 2020 +0800 drm/amdgpu: disable runtime pm for sienna_cichlid temporarily Disable runtime pm for sienna_cichlid temporarily as BACO regression issue. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 35ed946c6362e73767e718e3abd9e8d43b0be819 Author: Kenneth Feng Date: Thu Apr 16 11:56:50 2020 +0800 drm/amd/powerplay: enable fw ctf fw ctf can be triggered if the temperature can't be throttled below the limit. then the gpu will be powered off and the whole system will hang. Signed-off-by: Kenneth Feng Signed-off-by: Alex Deucher commit 514505014cb84ed463a25d9e6c519d34a683c284 Author: Likun Gao Date: Wed Apr 15 11:33:15 2020 +0800 drm/amdgpu: skip GPU scheduler setup for KIQ and MES ring Fix the coding error to skip GPU scheduler setup for KIQ and MES ring. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit fc17cd3f714d64bd7e10e176bfaa23528cf4a43f Author: Likun Gao Date: Mon Apr 13 13:00:56 2020 +0800 drm/amd/powerplay: enable VDDCI and MVDD for sienna_cichlid Enable VDDCI and MVDD if PP_MCLK_DPM_MASK was enable for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit dccc7c21de9fd56a09aab9a4d89b449565eacf9c Author: Likun Gao Date: Mon Apr 13 14:10:17 2020 +0800 drm/amd/powerplay: append pptable for sienna_cichlid (v2) Add function to append powerplay table from vbios for sienna_cichlid. v2: squash in warning fix Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 44e7139b45a236fe0337b66fbfbdabce3a95dae0 Author: Likun Gao Date: Fri Apr 17 14:03:19 2020 -0400 drm/amd/powerplay: and smc dpm info struct for sienna_cichlid And atom_smc_dpm_info_v4_9 struct for sienna_cichlid use. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 8db1015b99b29f4a77639a217cedba669eccd53b Author: shaoyunl Date: Thu Apr 9 15:53:17 2020 -0400 drm/amdgpu/sriov : Use kiq to do tlb invalidation for gfx10 on sriov On SRIOV run time, driver shouldn't directly access invalidation registers through MMIO. Use kiq to submit wait_reg_mem package for the invalidation Signed-off-by: shaoyunl Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 80c36f8646ebf0018e3e8bb5de35f7e7be664f54 Author: Likun Gao Date: Thu Apr 9 15:33:53 2020 +0800 drm/amd/powerplay: enable ULCK DS for sienna_cichlid Enable uclk deep sleep for sienna_cichlid. Df cstate kicks in first, then df triggers uclk ds with the sideband. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 8606cf794f784978fe5c5087c9f056d27327a18d Author: Alex Deucher Date: Thu Apr 9 16:08:55 2020 -0400 drm/amdgpu/vcn3.0: schedule instance 0 for decode and 1 for encode VCN3 has 2 unsymmetrical instances, i.e there're less codecs on instance 1, we use 0 for decode and 1 for encode for now Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1e09dfd7512271aa8d5ca8c9d58a2b9c7a397c59 Author: Alex Deucher Date: Thu Apr 9 16:03:10 2020 -0400 drm/amdgpu/mes10.1: add no scheduler flag for mes We don't want a gpu scheduler for mes. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d00b0fa90f4e524adb32a8b8d4702a16f671e946 Author: Boyuan Zhang Date: Thu Apr 2 13:28:07 2020 -0400 drm/amdgpu: enable DPG mode for VCN3.0 Enable DPG mode for VCN3.0 by updating related flag. V2: update description. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 7055f4a353bbe0dfe99b0a5488644bbbeefe6a0a Author: Boyuan Zhang Date: Fri Mar 27 13:49:11 2020 -0400 drm/amdgpu: add workaround for issue in DPG for VCN3.0 To workaround an issue in DPG V2: update description. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4d319ed6566e478c7b055c7b0d10f4466e23e1f1 Author: Boyuan Zhang Date: Mon Mar 30 11:05:02 2020 -0400 drm/amdgpu: rename macro for VCN2.0 2.5 and 3.0 Rename SOC15_DPG_MODE_OFFSET_2_0, RREG32_SOC15_DPG_MODE_2_0 and WREG32_SOC15_DPG_MODE_2_0 for VCN2.0, VCN2.5 and VCN3.0. These three macros are used VCN2.0, VCN2.5 and VCN3.0, therefore rename it to be a general name. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 914b5f53d054133f3d372597f11c328fa5ce2f23 Author: Boyuan Zhang Date: Fri Mar 27 14:11:59 2020 -0400 drm/amdgpu: rename macro for VCN1.0 Rename RREG32_SOC15_DPG_MODE and WREG32_SOC15_DPG_MODE for VCN1.0 These two macros are used specifically for VCN1.0, therefore rename it from general name to VCN1.0 specific name. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 14539809bdfc623204e80a3a8540389d6b3b369d Author: Boyuan Zhang Date: Thu Mar 26 19:16:43 2020 -0400 drm/amdgpu: add internal reg offset translation for VCN inst 1 Add range for vcn instance 1 for translation for internal register offset, which is needed for VCN3.0 V2: update description. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit c0f136ee8d7e3d85a5ca2184b1c5fe73c0f819bc Author: Boyuan Zhang Date: Thu Mar 26 19:11:56 2020 -0400 drm/amdgpu: set indirect sram mode for VCN3.0 Use indirect sram for secure DPG mode V2: update description. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit cfcc06cd15bf562176170a9552099f4b38c53dde Author: Boyuan Zhang Date: Fri Mar 27 13:41:54 2020 -0400 drm/amdgpu: add pause DPG mode for VCN3.0 Add vcn_v3_0_pause_dpg_mode to pause/unpause DPG mode for VCN3.0 V2: update description. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 65b17cc89898d5ae4b015cd91c2b317e228d6f75 Author: Boyuan Zhang Date: Fri Mar 27 13:38:54 2020 -0400 drm/amdgpu: add stop DPG mode for VCN3.0 Add vcn_v3_0_stop_dpg_mode to power off in DPG mode for VCN3.0 V2: update description. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit ec2d0577b466c211f2de0fbed177a6f7e0135ce3 Author: Boyuan Zhang Date: Fri Mar 27 13:30:53 2020 -0400 drm/amdgpu: add start DPG mode for VCN3.0 Add vcn_v3_0_start_dpg_mode to setup and start VCN block in DPG mode for VCN3.0 V2: Separate from previous patch-0002, and update description. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 99541f392b4d0584594a2492582b3f262a8f2643 Author: Boyuan Zhang Date: Mon Mar 30 09:42:45 2020 -0400 drm/amdgpu: add mc resume DPG mode for VCN3.0 Add vcn_v3_0_mc_resume_dpg_mode to resume memory controller in DPG mode for VCN3.0 V2: Separate from previous patch-0002, and update description. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 063cabd8b6dcde7835dfafee6657998db5ab7ad3 Author: Boyuan Zhang Date: Fri Mar 27 13:11:16 2020 -0400 drm/amdgpu: add clock gating DPG mode for VCN3.0 Add vcn_v3_0_clock_gating_dpg_mode to enabling clock gating in DPG mode for VCN3.0 V2: Separate from previous patch-0002, and update description. Signed-off-by: Boyuan Zhang Reviewed-by: James Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b971df70c5ef8439fe22876489c0ef6ba6e2bf43 Author: Likun Gao Date: Mon Mar 30 17:07:11 2020 +0800 drm/am/powerplay: enable OUT OF BAND MONITER for sienna_cichlid Enable OUT OF BAND MONITER for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit d28f4aa1744b9fdb6b745842193d52f35c96eb88 Author: Likun Gao Date: Mon Mar 30 15:07:10 2020 +0800 drm/amd/powerplay: enable RSMU SMN PG for sienna_cichlid Enable RSMU SMN PG for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 046c18f4b836a85b8ad7a168d328aa2b6cfd0c6e Author: Likun Gao Date: Mon Mar 30 14:56:53 2020 +0800 drm/amdgpu: update golden setting for sienna_cichlid Update golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit c96721eb903522b3ee960654ccd3f482f9dac053 Author: Kenneth Feng Date: Fri Mar 27 14:44:35 2020 +0800 drm/amd/powerplay: bundle GPO with gfx DPM Bundle GPO with gfx DPM and enable it since gfxclk dpm should work first then GPO works. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 31cb0dd9a29195a9e9bc3030de87887865d6ffc7 Author: Kenneth Feng Date: Fri Mar 27 14:17:41 2020 +0800 drm/amd/powerplay: enable GPO GPO is graphics power optimizer. SMU calculates the 16 gfxclk V/F points according to the CU numbers and memory activity.RLC picks one of them according to the memory speed requirements for the data transmission. Signed-off-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 846938c223dab849d039ec24392190a383077765 Author: Kenneth Feng Date: Fri Mar 27 12:23:14 2020 +0800 drm/amd/powerplay: enable mmhub pg mmhub pg can be obvserved from PCTL_CTRL Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit b794616d1f6cc20459ea162a865084c6ba21ec62 Author: Kenneth Feng Date: Thu Mar 26 12:01:15 2020 +0800 drm/amd/powerplay: enable athub pg enable athub pg and the status can be checked in ATHUB_MISC_CNTL. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit b770f04ba2ee3d1161194d2b563918deac4cd7ab Author: Le Ma Date: Fri Mar 20 19:28:52 2020 +0800 drm/amdgpu: skip VM inv eng assignment for mes ring Statically allocated VM inv eng of gfxhub on sienna_cichlid is used up. Also VM inv eng is no need for mes ring. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7cf609b915f57a2c2b03bf43bb63a2240aeb8d4b Author: Le Ma Date: Fri Mar 20 19:11:36 2020 +0800 drm/amdgpu/mes: allocate memory slots for hw resource setting Pass a piece of memory to MES ucode to fill contents. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ae4e3b62dfe4e7707e1acde9de56d7e08a217c4a Author: Le Ma Date: Fri Mar 20 16:35:50 2020 +0800 drm/amdgpu/mes: add status fence memory definitions Update for new member query_status_fence_gpu_mc_ptr in MESAPI_SET_HW_RESOURCES. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4842b9f3a7adac3996ede280215056522549d08b Author: Le Ma Date: Fri Mar 20 15:22:37 2020 +0800 drm/amdgpu/mes: update mes fw api Update mes_api_def.h to match the latest mes fw. v2: clean up coding style based on kernel standards: - fix indentation and alignment - break long lines - put the opening brace last on the line - remove unnecessary blank line and space - replace uint(32|64) with standard uint(32|64)_t Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3059ec1c3c5cc34505c141c398355132021f5184 Author: Likun Gao Date: Tue Mar 24 15:25:40 2020 +0800 drm/amd/powerplay: add function to get power limit for sienna_cichlid Add function to get pptable power limit for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit cf06331fed5bffa10e04e15f5c26a8836dbc38d5 Author: Likun Gao Date: Tue Mar 24 15:15:10 2020 +0800 drm/amd/powerplay: enable APCC DFLL for sienna_cichlid Enable APCC DFLL for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 3fc006f5512cf8a3751ef961d385dc8da46e5e54 Author: Likun Gao Date: Mon Mar 23 11:29:20 2020 +0800 drm/amd/powerplay: enable BACO for sienna_cichlid Enable BACO for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 38d5bbef5d8fcfe857d18958816b702a409eeeaa Author: shaoyunl Date: Tue Mar 17 11:41:34 2020 -0400 drm/amdgpu: Sienna_Cichlid don't enable SMU for SRIOV SMU firmware already been loaded from host, don't enable it for now. May need to re-work it if we want to enable the SMU for guest in the future. Signed-off-by: shaoyunl Signed-off-by: Alex Deucher commit 6fb176a75574693585fb40b67053a2fde389235b Author: Likun Gao Date: Thu Mar 19 15:21:27 2020 +0800 drm/amd/powerplay: enable MM DPM PG for sienna_cichlid (v2) Enable VCN dpm set for sienna_cichlid. Enable JPEG dpm set for sienna_cichlid. v2: squash in BACO fix (Kenneth) Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit df3183b37a84dca12f6e87fe7034f6f7d885ad3c Author: James Zhu Date: Wed Mar 18 16:59:38 2020 -0400 drm/amdgpu: fix typo for vcn3/jpeg3 idle check fix typo for vcn3/jpeg3 idle check Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 86a9eb3f59ab31f2bcee0e4f4883118d321629a5 Author: Likun Gao Date: Tue Mar 17 13:28:10 2020 +0800 drm/amd/powerplay: enable FCLK DS for sienna_cichlid Enable the feature of FCLK Deep Sleep for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit d0d7197086daed01b00e59df68cd5f248180c469 Author: Likun Gao Date: Tue Mar 17 13:25:12 2020 +0800 drm/amd/powerplay: enable VR0HOT for sienna_cichlid Enable the feature of Voltage Regulator (VR) Hot for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit adab4dadd90e24305feea4502b2fa1012cee7453 Author: shaoyunl Date: Fri Feb 7 18:56:42 2020 -0500 drm/amdkfd: sienna_cichlid virtual function support amdkfd add support for sienna_cichlid virtual function Signed-off-by: shaoyunl Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit 3cefc7189c964d1e93bbaaa9c131195800f84211 Author: Jay Cornwall Date: Thu Nov 21 12:41:11 2019 -0600 drm/amdkfd: Support debugger in Navi1x trap handler - Preserve scalar GPRs ttmp[4:11] and ttmp13 - Add single step exception during context save workaround - Remove incorrect PC adjustment during context save Signed-off-by: Jay Cornwall Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit d0f1a85366bc0fe57c4a21c56568742a174965c1 Author: Jay Cornwall Date: Wed Nov 20 16:13:03 2019 -0600 drm/amdkfd: Support newer assemblers in gfx10 trap handler The contents of macros are parsed by the assembler before conditions have been tested. This causes assembly errors when using IP-specific instructions in the IP-unified trap handler. Add a preprocessing step to filter IP-specific code. Also guard a Navi1x-specific instruction (no effect on Sienna_Cichlid). Signed-off-by: Jay Cornwall Reviewed-by: Yong Zhao Signed-off-by: Alex Deucher commit 80b6cfedd3b71002f0973e8b49c11668f34be236 Author: Jay Cornwall Date: Fri Nov 1 19:05:08 2019 -0500 drm/amdkfd: Add Sienna_Cichlid trap handler support - Replace SQC stores with TCP stores - Synchronize with MSG_SAVEWAVE via lgkmcnt - HW_REG_IB_STS is now read-only Signed-off-by: Jay Cornwall Signed-off-by: Alex Deucher commit 3a2f0c813b42996a8fdb14da2cd828156a6fdd12 Author: Yong Zhao Date: Tue Oct 1 17:42:20 2019 -0400 drm/amdkfd: Support Sienna_Cichlid KFD v4 v4: drop get_tile_config, comment out other callbacks Signed-off-by: Yong Zhao Signed-off-by: Alex Deucher commit 81d9bfb8c52674189191501695d215d2a7b8680d Author: Jerry (Fangzhi) Zuo Date: Mon Jan 20 11:39:18 2020 -0500 drm/amdgpu/dc: Add missing Sienna_Cichlid chip id Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 689dede0a0ee4e9e9aaae9a9e18d5f257845d66b Author: Likun Gao Date: Tue Mar 3 10:40:32 2020 +0800 drm/amdgpu: enable 3D pipe 1 on Sienna_Cichlid Only disable 3D pipe 1 on navi1x, enable 3D pipe 1 on Sienna_Cichlid. Signed-off-by: Likun Gao Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 1f5d9cad08b710d03a7061285bf654c3582e9cb2 Author: Likun Gao Date: Wed Mar 4 16:40:24 2020 +0800 drm/amdgpu: fix SDMA hdp flush engine conflict Each of HDP flush engine should be used by one ring, correct allocate of hdp flush engine to SDMA ring. Correct me value of each SDMA ring, as it was cleared when init microcode. Reviewed-by: Christian König Signed-off-by: Likun Gao Signed-off-by: Alex Deucher commit 98f8ea29ff6dcac18617069c2cccd548dfa0e805 Author: Likun Gao Date: Wed Mar 18 17:33:47 2020 -0400 drm/amdgpu: Enable Multi Media Hub (MMHUB) Clock Gating for sienna_cichlid. Enable mmhub clockgating. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit bcc8367f94704704ce39f738aac6e13014d13cad Author: Kenneth Feng Date: Fri Feb 28 14:14:00 2020 +0800 drm/amd/amdgpu: add athub ls support athub ls is bounded with hdp ls,verified. Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 3a32c25a8ecc9a52466950b261f7d0aaa0966c34 Author: Kenneth Feng Date: Fri Feb 28 14:09:31 2020 +0800 drm/amd/amdgpu: add IH cg support IH cg verified Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit ca36461f42a3524c9f46a570619a3d5fb4dff70d Author: Kenneth Feng Date: Fri Feb 28 11:57:04 2020 +0800 drm/amd/amdgpu: add HDP mgcg and ls support add HDP mgcg and ls support and verified Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 91c6adf873848ac92c6de77635221d4076988a25 Author: Kenneth Feng Date: Fri Feb 28 11:57:04 2020 +0800 drm/amd/amdgpu: fix the HDP LS/DS/SD programming confirmed that IPH_MEM_POWER_CTRL_EN and RC_MEM_POWER_CTRL_EN have to be set for SRAM LS/DS/SD Signed-off-by: Kenneth Feng Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 850e56ba445892b503d3ecab763a3fc8752237fb Author: Likun Gao Date: Fri Feb 14 16:45:56 2020 +0800 drm/amdgpu: update golden setting for gfx10.3 Update gfx golden setting for gfx10.3. Signed-off-by: Likun Gao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d6b0185b8dc738b13f2edb216c0a08f947cd33ca Author: Leo Liu Date: Tue Jan 28 12:21:52 2020 -0500 drm/amdgpu: set the LMI ctrl and reset earlier So the LMI register will be programmed properly Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 07d8e891ffcd71cbea4a6436eac975aa572f3de9 Author: Leo Liu Date: Tue Jan 28 11:50:00 2020 -0500 drm/amdgpu: fix the PSP front door loading VCN firmware for the second instance with correct index Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 14765e9c225eb4416d2584697d443a264fbd4806 Author: Leo Liu Date: Mon Jan 20 10:07:40 2020 -0500 drm/amdgpu: change the offset for VCN FW cache window The signed header is added Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 00194def450d83137d268c495cc8efc5910610b7 Author: Likun Gao Date: Fri Jan 24 03:57:55 2020 +0800 drm/amdgpu: open GFX clock gating for sienna_cichlid Open GFX MGCG, CGCG and 3DCG for sienna_cichlid. Signed-off-by: Likun Gao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 87ba7feafa81ad41238574a06929ec8ffeff3842 Author: Hawking Zhang Date: Fri Jan 24 00:14:32 2020 +0800 drm/amdgpu: switch to query reserved fb size from vbios (v3) For Sienna_Cichlid, query fw_reserved_fb_size from vbios directly. For navi1x, fall back to default 64K TMR size. For pre-navi, no need to reserve tmr region in top LFB. v2: fix TMR define (Alex) v3: partially revert size change Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9a244ebe8128063ca1eaa6597da128b5c1689e3c Author: Hawking Zhang Date: Thu Jan 23 04:13:01 2020 +0800 drm/amdgpu: add atomfirmware helper funciton to query reserved fb size fw_reserved_size_in_kb is introduced for driver to query the TMR region reserved by PSP BL in Sienna_Cichlid and onwards Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 718715e6a484c882a74f9f0e08b3d4c477cd70dd Author: Hawking Zhang Date: Thu Jan 23 04:08:59 2020 +0800 drm/amdgpu: add firmware_info v3_4 structure for Sienna_Cichlid firmware_info v3_4 strucure will be used by kernel driver to query various parameters set by VBIOS for Sienna_Cichlid Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 738c822c7ff513bfe5ebbfc195ec668681a0daf3 Author: Likun Gao Date: Tue Jan 21 03:22:32 2020 +0800 drm/amdgpu: only send one sdma firmware for sienna_cichlid As all four sdma firmware are same, PSP only receive one SDMA fw. Signed-off-by: Likun Gao Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 321b3eeb77fd10d109e868bf4ef1eba175620d7d Author: Hawking Zhang Date: Mon Jan 20 05:16:41 2020 +0800 drm/amdgpu: drop gfx_v10_0_tiling_mode_table_init tiling mode table is not used anymore for gfx10 Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 8b41903a2b18c2a3fc829c2e042f0484cb51ad7e Author: Hawking Zhang Date: Mon Jan 20 04:46:33 2020 +0800 drm/amdgpu: support query vram info for sienna_cichlid support query vram_module v11 and vram_info v2_5 for sienna_cichlid Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 9d3708169f4494bdccc4f8b89a8f866767c563b7 Author: Hawking Zhang Date: Mon Jan 20 04:41:40 2020 +0800 drm/amdgpu: add vram_info v2_5 in atomfirmware header vram_info v2_5 was introduced to support sienna_cichlid Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit f95c20464dd4954b81d860ae548666cd5bfeba2e Author: Likun Gao Date: Mon Jan 20 05:29:06 2020 +0800 drm/amdgpu: disable gfxoff for sienna_cichlid Temporary disable gfxoff for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0f7ee057509787d6d36724f1e1d55249973cc704 Author: Likun Gao Date: Fri Jan 17 04:35:09 2020 +0800 drm/amdgpu: add cp firmware backdoor loading triger Triger CP ucode addr and data to backdoor load CP firmware. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 305401e77bf8961fc92b030234f70bec921cb661 Author: Hawking Zhang Date: Thu Jan 16 11:07:20 2020 +0800 drm/amdgpu: force pa_sc_tile_steering_override to 0 for gfx10.3 pa_sc_tile_steering_override is only programmable for gfx10.0/10.1/10.2 Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 263acd471f506d50ed0027c164e271d93085950e Author: Likun Gao Date: Thu Apr 9 14:19:48 2020 -0400 drm/amdgpu/gfx10: add gc golden setting for sienna_cichlid Add gc golden setting for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4d72dd12f086d1a4dddcb2575d9fc354a886a2d1 Author: Leo Liu Date: Tue Mar 24 16:31:23 2020 -0400 drm/amdgpu: enable JPEG3.0 for Sienna_Cichlid By adding JPEG HW block to Sienna_Cichlid Signed-off-by: Leo Liu Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b467c4f5b4af2fb0111ede041a399fd600615291 Author: Leo Liu Date: Tue Dec 3 09:23:24 2019 -0500 drm/amdgpu: enable JPEG3.0 PG and CG for Sienna_Cichlid By setting up the flags to the ASIC Signed-off-by: Leo Liu Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b52e271e15941b1f74fea2b08ac48711e0c17e7c Author: Leo Liu Date: Fri Nov 29 11:47:55 2019 -0600 drm/amdgpu: add Sienna_Cichlid JPEG PG and CG support This is for static powergating and clockgating Signed-off-by: Leo Liu Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit dfd57dbf44ddc70c90c76f83b2deb46e5dd40ce3 Author: Leo Liu Date: Fri Nov 15 13:23:10 2019 -0500 drm/amdgpu: add JPEG3.0 support for Sienna_Cichlid With basic IP block functions and ring functions Signed-off-by: Leo Liu Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b8f10585cb20e7db98962ecbaff2bea20f3f7799 Author: Leo Liu Date: Tue Mar 24 16:30:24 2020 -0400 drm/amdgpu: enable VCN3.0 for Sienna_Cichlid By adding VCN HW block to Sienna_Cichlid Signed-off-by: Leo Liu Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 265120abc0494fe967ce62c2c04a6faa73b89bd0 Author: Leo Liu Date: Fri Sep 27 11:28:48 2019 -0500 drm/amdgpu: add Sienna_Cichlid VCN to the VCN family By adding Sienna_Cichlid VCN firmware Signed-off-by: Leo Liu Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit e823be13dbc2523663b3b2a13e94863252f6fba9 Author: Leo Liu Date: Tue Dec 3 09:18:51 2019 -0500 drm/amdgpu: enable VCN3.0 PG and CG for Sienna_Cichlid By setting up the flags to the ASIC Signed-off-by: Leo Liu Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit fedac0155a1c28eb17ad75801f915a932c483919 Author: Leo Liu Date: Wed Nov 27 11:03:39 2019 -0500 drm/amdgpu: add Sienna_Cichlid VCN PG and CG support (v2) This is for static powergating and clockgating v2: fix registers (Alex) Signed-off-by: Leo Liu Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit cf14826cdfb5c9fe10f98210d040b9d7486c381d Author: Leo Liu Date: Fri Nov 15 12:45:55 2019 -0500 drm/amdgpu: add VCN3.0 support for Sienna_Cichlid With basic IP block functions and ring functions Signed-off-by: Leo Liu Reviewed-by: James Zhu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 25fc05648f49e083e3cf031626b8ecf86fca5dd1 Author: Likun Gao Date: Wed Nov 20 16:21:22 2019 +0800 drm/amdgpu/mes: correct register offset for sienna_cichlid Correct CP_MES_IC_OP_CNTL register address for sienna_cichlid on mes v10.1. Signed-off-by: Likun Gao Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher commit 83a0c342e04adca17eb89a75889ee295d8b82c3e Author: Likun Gao Date: Thu Oct 24 12:03:08 2019 +0800 drm/amdgpu: update the num of queue per pipe for mec on sienna_cichlid The number of queue per pipe for mec on sienna_cichlid should be 4. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit a346ef86a97f8e1257893999c809ddd18754499b Author: Jack Xiao Date: Tue Mar 24 16:28:43 2020 -0400 drm/amdgpu: add mes block to sienna_cichlid Add mes block support to sienna_cichlid. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9ed60748fb957b76cfab0c4b44b44ad254ac1b0a Author: Jack Xiao Date: Wed Oct 16 11:48:48 2019 +0800 drm/amdgpu/mes10.1: update mes initialization Update mes initialization sequence. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 03195e8063e26f556c6adbe6a9413b36f4b791eb Author: Jack Xiao Date: Mon Oct 21 13:49:38 2019 +0800 drm/amdgpu: no need to set up GPU scheduler for mes ring As mes ring directly submits to hardwared, it's no need to set up GPU scheduler for mes ring. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 93fd978b2b4405bf2c93651b5f6b96cdb1de048b Author: Jack Xiao Date: Thu Jun 6 17:54:15 2019 +0800 drm/amdgpu/psp: convert amdgpu mes ucode type Convert to psp defined ucode item, so that psp can recognize them. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit aa1faaa1fcd8a18420076fde9ec7119276d7e989 Author: Jack Xiao Date: Thu Jun 6 17:52:37 2019 +0800 drm/amdgpu: upload mes firmware to gpu buffer Copy mes firmware to gpu buffer. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6b8199fc1a332179d39d644e8fc2f6a15e528bb4 Author: Jack Xiao Date: Thu Jun 6 17:46:24 2019 +0800 drm/amdgpu/mes10.1: copy mes fw info into global fw array Copy mes firmware info into into global fw array, preparing for fw front door loading. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f85f1864b8041d94da91f82050b26bd95abd0a0e Author: Jack Xiao Date: Wed Oct 16 13:45:11 2019 +0800 drm/amdgpu/mes10.1: add sienna_cichlid mes firmware support Add sienna_cichlid mes firmware support. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7a9b4fd4168fde977ccce756950f3360f8ace191 Author: Jack Xiao Date: Wed Oct 16 11:12:48 2019 +0800 drm/amdgpu/mes10.1: implement setting hardware resources The routine is implemented to generate mes command to assign the hardware resources which can be scheduled to mes. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3e62add5ec2d45512dc6f9d1ba37d6caf2088307 Author: Jack Xiao Date: Tue Oct 15 17:21:01 2019 +0800 drm/amdgpu/mes10.1: implement querying the scheduler status The routine is implemented to generate mes command to query the status of hardware scheduler. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit bc2a28120db2b8822752e246182f2503989705b3 Author: Jack Xiao Date: Tue Oct 15 17:07:42 2019 +0800 drm/amdgpu/mes10.1: implement removing hardware queue The routine is implemented to generate mes command to remove a specified hardware queue. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e8bb73e0e4001fe6c303099a4a8b5df734291c8b Author: Jack Xiao Date: Tue Oct 15 17:05:49 2019 +0800 drm/amdgpu/mes10.1: implement adding hardware queue The routine is implemented to generate mes command to install a hardware queue. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 29ce0f6f3c035187becc0b3bd97703b3692770b4 Author: Jack Xiao Date: Tue Oct 15 16:35:30 2019 +0800 drm/amdgpu/mes10.1: add the helper function for mes command submission The helper function is used to submit mes command and poll waiting for the command completion. v2: replaced with amdgpu_fence_wait_polling to wait. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3f63345d38a604b1aeab518b9c1845e91430baec Author: Jack Xiao Date: Tue Oct 15 17:02:45 2019 +0800 drm/amdgpu/mes10.1: add the mes fw api Add the definitions of mes commands. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e25c0dcd0d581c9dbd2c90a17d7f2f8688e83d3c Author: Jack Xiao Date: Tue Apr 30 11:44:04 2019 +0800 drm/amdgpu/mes10.1: enable the mes ring during initialization Enable the mes ring during mes block initialization. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1c0d96b0d71cccd370e5809b60c607fdc0ee0b62 Author: Jack Xiao Date: Tue Apr 30 11:39:54 2019 +0800 drm/amdgpu/mes10.1: install mes queue via kiq Install mes queue via kiq. Disable it temporarily until it's workable. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit debce56dde724b6be18b0b52fc7c2a8ab2c0c0a7 Author: Jack Xiao Date: Tue Apr 30 11:11:00 2019 +0800 drm/amdgpu/mes10.1: install mes queue by register programming Directly writing mes queue registers to set up it. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 74d250fb1185789d5b2e575e05a5ab1e4f9e1ac9 Author: Jack Xiao Date: Tue Apr 30 11:27:10 2019 +0800 drm/amdgpu/mes10.1: initialize the mqd Initialize the mqd according to mes ring setup. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 52d6bb128eeee595022f1892e6bddde6bd68e45d Author: Jack Xiao Date: Thu Jun 6 11:14:07 2019 +0800 drm/amdgpu/mes10.1: allocate mqd buffer Allocate mqd buffer preparing for mes queue setup. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1513e24aa4b40119de128e0a0171fd0c5d54ea4f Author: Jack Xiao Date: Wed Jun 5 16:57:35 2019 +0800 drm/amdgpu/mes10.1: implement the ring functions of mes specific Implement mes ring functions and set up them. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7b2513a16cb6e222dac24c07b35dc99b80965466 Author: Jack Xiao Date: Fri Apr 26 18:59:35 2019 +0800 drm/amdgpu/mes10.1: initialize the software part of mes ring Do the software initialization on the mes ring. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 11f6f11da03778d68260ab24d63aa991dd003694 Author: Jack Xiao Date: Thu Jun 6 10:55:23 2019 +0800 drm/amdgpu/mes10.1: allocate the eop buffer eop buffer will be used for mes queue setup. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 3bbd31e0f4eb61e20f3f9da0509df8f397e00a3d Author: Jack Xiao Date: Wed Oct 16 11:13:50 2019 +0800 drm/amdgpu/mes: update some mes definitions Update some mes definitions. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 55611b507fd6453d26030c0c0619fdf0c262766d Author: Jack Xiao Date: Wed Jun 5 16:30:13 2019 +0800 drm/amdgpu: avoid dereferencing a NULL pointer Check if irq_src is NULL to avoid dereferencing a NULL pointer, for MES ring is uneccessary to recieve an interrupt notification. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit cdca7979456359a8186459c677d1f4705ebbf72a Author: Jack Xiao Date: Thu Apr 9 14:16:40 2020 -0400 drm/amdgpu: add the ring type definition of MES Add a new ring type definition. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 205192327223742ec2c33ec1b260f9e648a5ea0e Author: Jack Xiao Date: Fri Apr 26 18:58:41 2019 +0800 drm/amdgpu: assign the doorbell index to mes ring MES ring will use the assigned doorbell index for command submission. Signed-off-by: Jack Xiao Acked-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 71ac5c1fac35f74748e7b7b82f732324ba8b3b7d Author: Leo Liu Date: Thu Oct 10 09:43:34 2019 -0400 drm/amdgpu: add 2rd VCN instance doorbell support Sienna_Cichlid have 2 VCN instances, using different register for range Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit 56304e72af66d9ad145ea90a2b82f8f317e825b9 Author: Likun Gao Date: Tue Mar 24 16:27:43 2020 -0400 drm/amdgpu: add psp block load condition for sienna_cichlid Enable PSP block for firmware loading and other security setup only when amdgpu use PSP load type to load ucode. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 920a4cd3f322b5c2b79da61c6d64adae9d5c82bc Author: Likun Gao Date: Sun Sep 29 11:32:24 2019 +0800 drm/amdgpu: add gmc cg support for sienna_cichlid Add gmc clockgating support for sienna_cichlid. The athub version used for sienna_cichlid is v2.1. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 45d76eebd874511f9579dd8917b9385d3f9fa137 Author: Likun Gao Date: Wed Sep 25 16:44:46 2019 +0800 drm/amdgpu: add support for athub v2.1 Add athub v2.1 function and support to compile it. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9822ac8f8506994bf196a5cf5dd3136a6fb980c0 Author: Yong Zhao Date: Thu Sep 19 18:01:06 2019 -0400 drm/amdgpu: Use variable instead of constant for sdma doorbell range Signed-off-by: Yong Zhao Signed-off-by: Alex Deucher commit c399dfcb0e4bc34dcbc979c1bd76680141e6ff5b Author: Likun Gao Date: Wed Aug 28 17:52:54 2019 +0800 drm/amdgpu: update SDMA 5.2 microcode init Removed loading duplicate instances of SDMA FW for Sienna_Cichlid, As sienna_cichlid only use a single image for all instances. Signed-off-by: Likun Gao Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 5aa023506ae6ec9edbd9f3b84b5e56b53f99e10c Author: Likun Gao Date: Tue Mar 24 16:26:17 2020 -0400 drm/amdgpu: enable psp ip block for sienna_cichlid Signed-off-by: Likun Gao Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher commit 64f2d805a1783def6a3abf4c985f6d69c4ebb8ef Author: Likun Gao Date: Mon Aug 5 15:32:40 2019 +0800 drm/amdgpu: skip for reroute ih for sienna_cichlid psp ring init currently Signed-off-by: Likun Gao Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher commit 344fed0b270eaa6b22d769e833bd0988da272e77 Author: Likun Gao Date: Mon Jul 22 16:52:20 2019 +0800 drm/amdgpu/psp: add psp support for sienna_cichlid Signed-off-by: Likun Gao Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher commit bfdb68eca2852e53d6810081b92c4c4f7c1e8821 Author: Likun Gao Date: Thu Apr 23 16:05:21 2020 -0400 drm/amdgpu: skip ASD fw load for sienna_cichlid Skip ASD FW load for sienna_cichlid currently. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b07e5c60e41d485537579739475314ad127d6150 Author: Likun Gao Date: Tue Mar 24 16:24:44 2020 -0400 drm/amdgpu/powerplay: add smu block for sienna_cichlid Add SMU block for sienna_cichlid with psp load type. Signed-off-by: Likun Gao Reviewed-by: Jack Xiao Signed-off-by: Alex Deucher commit 0ba7ffea2d118af7ca0df26cad418f71486b93ad Author: Lucas De Marchi Date: Fri Jun 26 16:48:32 2020 -0700 drm/i915/display: remove alias to dig_port We don't need intel_dig_port and dig_port to refer to the same thing. Prefer the latter. v2: fix coding style Signed-off-by: Lucas De Marchi Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200626234834.26864-2-lucas.demarchi@intel.com commit e7019c95c40daf8e8a9fa1d5f36eabce2eb8ef6b Author: Bart Van Assche Date: Mon Jun 29 15:54:54 2020 -0700 scsi: qla2xxx: Introduce a function for computing the debug message prefix Instead of repeating the code for generating a debug message prefix six times, introduce a function for computing the debug message prefix. Link: https://lore.kernel.org/r/20200629225454.22863-10-bvanassche@acm.org Cc: Nilesh Javali Cc: Quinn Tran Cc: Himanshu Madhani Cc: Martin Wilck Cc: Roman Bolshakov Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit f85a299f5ec55c82403cd2bc4aeaaedebfcf5ef6 Author: Bart Van Assche Date: Mon Jun 29 15:54:53 2020 -0700 scsi: qla2xxx: Make qla2x00_restart_isp() easier to read Instead of using complicated control flow to only have one return statement at the end of qla2x00_restart_isp(), return an error status as soon as it is known that this function will fail. Link: https://lore.kernel.org/r/20200629225454.22863-9-bvanassche@acm.org Cc: Nilesh Javali Cc: Quinn Tran Cc: Himanshu Madhani Cc: Martin Wilck Cc: Roman Bolshakov Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 57fec9f24e580d8fe4219ee89572f49758e62c75 Author: Bart Van Assche Date: Mon Jun 29 15:54:52 2020 -0700 scsi: qla2xxx: Fix a Coverity complaint in qla2100_fw_dump() 'cnt' can exceed the size of the risc_ram[] array. Prevent that Coverity complains by rewriting an address calculation expression. This patch fixes the following Coverity complaint: CID 337803 (#1 of 1): Out-of-bounds read (OVERRUN) 109. overrun-local: Overrunning array of 122880 bytes at byte offset 122880 by dereferencing pointer &fw->risc_ram[cnt]. Link: https://lore.kernel.org/r/20200629225454.22863-8-bvanassche@acm.org Cc: Nilesh Javali Cc: Quinn Tran Cc: Himanshu Madhani Cc: Martin Wilck Cc: Roman Bolshakov Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit f8f12bda53eae87ca2dea42b36d19e48c9851b9f Author: Bart Van Assche Date: Mon Jun 29 15:54:51 2020 -0700 scsi: qla2xxx: Make __qla2x00_alloc_iocbs() initialize 32 bits of request_t.handle The request_t 'handle' member is 32-bits wide, hence use wrt_reg_dword(). Change the cast in the wrt_reg_byte() call to make it clear that a regular pointer is casted to an __iomem pointer. Note: 'pkt' points to I/O memory for the qlafx00 adapter family and to coherent memory for all other adapter families. This patch fixes the following Coverity complaint: CID 358864 (#1 of 1): Reliance on integer endianness (INCOMPATIBLE_CAST) incompatible_cast: Pointer &pkt->handle points to an object whose effective type is unsigned int (32 bits, unsigned) but is dereferenced as a narrower unsigned short (16 bits, unsigned). This may lead to unexpected results depending on machine endianness. Link: https://lore.kernel.org/r/20200629225454.22863-7-bvanassche@acm.org Fixes: 8ae6d9c7eb10 ("[SCSI] qla2xxx: Enhancements to support ISPFx00.") Cc: Nilesh Javali Cc: Quinn Tran Cc: Himanshu Madhani Cc: Martin Wilck Cc: Roman Bolshakov Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 9bb013584a5ea18dfae89e33ded130cae08eb135 Author: Bart Van Assche Date: Mon Jun 29 15:54:50 2020 -0700 scsi: qla2xxx: Remove a superfluous cast Remove an unnecessary cast because it prevents the compiler to perform type checking. Link: https://lore.kernel.org/r/20200629225454.22863-6-bvanassche@acm.org Cc: Nilesh Javali Cc: Quinn Tran Cc: Himanshu Madhani Cc: Martin Wilck Cc: Roman Bolshakov Reviewed-by: Daniel Wagner Reviewed-by: Shyam Sundar Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 67668b5b13c7ba12f212d4b9067e54354ce5360b Author: Bart Van Assche Date: Mon Jun 29 15:54:49 2020 -0700 scsi: qla2xxx: Initialize 'n' before using it The following code: qla82xx_rom_fast_read(ha, 0, &n) only initializes 'n' if it succeeds. Since 'n' may be reported in a debug message even if no ROM reads succeeded, initialize 'n' to zero. This patch fixes the following sparse warning: qla_nx.c:1218: qla82xx_pinit_from_rom() error: uninitialized symbol 'n'. Link: https://lore.kernel.org/r/20200629225454.22863-5-bvanassche@acm.org Cc: Nilesh Javali Cc: Quinn Tran Cc: Himanshu Madhani Cc: Martin Wilck Cc: Roman Bolshakov Reviewed-by: Daniel Wagner Reviewed-by: Shyam Sundar Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 2f91a0a03c2da5140994d7b3d53469d07df9943c Author: Bart Van Assche Date: Mon Jun 29 15:54:48 2020 -0700 scsi: qla2xxx: Make qla82xx_flash_wait_write_finish() easier to read Return early instead of having a single return statement at the end of this function. This patch fixes the following sparse warning: qla_nx.c:1018: qla82xx_flash_wait_write_finish() error: uninitialized symbol 'val'. Link: https://lore.kernel.org/r/20200629225454.22863-4-bvanassche@acm.org Cc: Nilesh Javali Cc: Quinn Tran Cc: Himanshu Madhani Cc: Martin Wilck Cc: Roman Bolshakov Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit f1e12bee55e6eb28a53662765d5d2d96fa0247b1 Author: Bart Van Assche Date: Mon Jun 29 15:54:47 2020 -0700 scsi: qla2xxx: Remove the __packed annotation from struct fcp_hdr and fcp_hdr_le Remove the __packed annotation from struct fcp_hdr* because that annotation is not necessary for these data structures. Link: https://lore.kernel.org/r/20200629225454.22863-3-bvanassche@acm.org Cc: Nilesh Javali Cc: Quinn Tran Cc: Himanshu Madhani Cc: Martin Wilck Cc: Roman Bolshakov Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit a7f474542ea36e32407dadd3849225d21c315bd4 Author: Bart Van Assche Date: Mon Jun 29 15:54:46 2020 -0700 scsi: qla2xxx: Check the size of struct fcp_hdr at compile time Since struct fcp_hdr is used to exchange data with the firmware, check its size at compile time. Link: https://lore.kernel.org/r/20200629225454.22863-2-bvanassche@acm.org Cc: Nilesh Javali Cc: Quinn Tran Cc: Himanshu Madhani Cc: Martin Wilck Cc: Roman Bolshakov Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 2b04a66156159592156a97553057e8c36de2ee70 Merge: 75603a3112664 696c278fdfd8d Author: David S. Miller Date: Tue Jun 30 18:34:34 2020 -0700 Merge branch 'cxgb4-add-mirror-action-support-for-TC-MATCHALL' Rahul Lakkireddy says: ==================== cxgb4: add mirror action support for TC-MATCHALL This series of patches add support to mirror all ingress traffic for TC-MATCHALL ingress offload. Patch 1 adds support to dynamically create a mirror Virtual Interface (VI) that accepts all mirror ingress traffic when mirror action is set in TC-MATCHALL offload. Patch 2 adds support to allocate mirror Rxqs and setup RSS for the mirror VI. Patch 3 adds support to replicate all the main VI configuration to mirror VI. This includes replicating MTU, promiscuous mode, all-multicast mode, and enabled netdev Rx feature offloads. v3: - Replace mirror VI refcount_t with normal u32 variable in all patches. - Add back calling cxgb4_port_mirror_start() in cxgb_open(), which was there in v1, but got missed in v2 during refactoring, in patch 3. v2: - Add mutex to protect all mirror VI data, instead of just mirror Rxqs, in patch 1 and 2. - Remove the un-needed mirror Rxq mutex in patch 2. - Simplify the replication code by refactoring t4_set_rxmode() to handle mirror VI, instead of duplicating the t4_set_rxmode() calls in multiple places in patch 3. ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 696c278fdfd8dd852af286fcebaacc11adbf20f0 Author: Rahul Lakkireddy Date: Tue Jun 30 18:41:30 2020 +0530 cxgb4: add main VI to mirror VI config replication When mirror VI is enabled, replicate various VI config params enabled on main VI to mirror VI. These include replicating MTU, promiscuous mode, all-multicast mode, and enabled netdev Rx feature offloads. v3: - Replace mirror VI refcount_t with normal u32 variable. - Add back calling cxgb4_port_mirror_start() in cxgb_open(), which was there in v1, but got missed in v2 during refactoring. v2: - Simplify the replication code by refactoring t4_set_rxmode() to handle mirror VI, instead of duplicating the t4_set_rxmode() calls in multiple places. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 2b465ed00f7db9c5b2aca95a91671f86282b1822 Author: Rahul Lakkireddy Date: Tue Jun 30 18:41:29 2020 +0530 cxgb4: add support for mirror Rxqs When mirror VI is enabled, allocate the mirror Rxqs and setup the mirror VI RSS table. The mirror Rxqs are allocated/freed when the mirror VI is created/destroyed or when underlying port is brought up/down, respectively. v3: - Replace mirror VI refcount_t with normal u32 variable. v2: - Use mutex to protect all mirror VI data, instead of just mirror Rxqs. - Remove the un-needed mirror Rxq mutex. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit fd2261d8ed6f1375f18341e959d4bbcd94d748a3 Author: Rahul Lakkireddy Date: Tue Jun 30 18:41:28 2020 +0530 cxgb4: add mirror action to TC-MATCHALL offload Add mirror Virtual Interface (VI) support to receive all ingress mirror traffic from the underlying device. The mirror VI is created dynamically, if the TC-MATCHALL rule has a corresponding mirror action. Also request MSI-X vectors needed for the mirror VI Rxqs. If no vectors are available, then disable mirror VI support. v3: - Replace mirror VI refcount_t with normal u32 variable. v2: - Add mutex to protect all mirror VI data, instead of just mirror Rxqs. Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 75603a3112664cb1f6b1508e2b489f16863bf153 Author: Nathan Chancellor Date: Tue Jun 30 14:00:34 2020 -0700 pcnet32: Mark PM functions as __maybe_unused In certain configurations without power management support, the following warnings happen: ../drivers/net/ethernet/amd/pcnet32.c:2928:12: warning: 'pcnet32_pm_resume' defined but not used [-Wunused-function] 2928 | static int pcnet32_pm_resume(struct device *device_d) | ^~~~~~~~~~~~~~~~~ ../drivers/net/ethernet/amd/pcnet32.c:2916:12: warning: 'pcnet32_pm_suspend' defined but not used [-Wunused-function] 2916 | static int pcnet32_pm_suspend(struct device *device_d) | ^~~~~~~~~~~~~~~~~~ Mark these functions as __maybe_unused to make it clear to the compiler that this is going to happen based on the configuration, which is the standard for these types of functions. Fixes: a86688fbef1b ("pcnet32: Convert to generic power management") Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit 0adcd2981ddddba4c1330078ea12e89fd782e79f Author: Nathan Chancellor Date: Tue Jun 30 14:00:33 2020 -0700 amd8111e: Mark PM functions as __maybe_unused In certain configurations without power management support, the following warnings happen: ../drivers/net/ethernet/amd/amd8111e.c:1623:12: warning: 'amd8111e_resume' defined but not used [-Wunused-function] 1623 | static int amd8111e_resume(struct device *dev_d) | ^~~~~~~~~~~~~~~ ../drivers/net/ethernet/amd/amd8111e.c:1584:12: warning: 'amd8111e_suspend' defined but not used [-Wunused-function] 1584 | static int amd8111e_suspend(struct device *dev_d) | ^~~~~~~~~~~~~~~~ Mark these functions as __maybe_unused to make it clear to the compiler that this is going to happen based on the configuration, which is the standard for these types of functions. Fixes: 2caf751fe080 ("amd8111e: Convert to generic power management") Signed-off-by: Nathan Chancellor Signed-off-by: David S. Miller commit a5523e2ff074a5a44b778f7c6483a882c2c88ecc Author: José Roberto de Souza Date: Thu Jun 25 18:01:49 2020 -0700 drm/i915: Add PSR2 selective fetch registers This registers will be used to implement PSR2 manual tracking/selective fetch. v2: - Fixed typo in _PLANE_SEL_FETCH_BASE - Renamed PSR2_MAN_TRK_CTL bits to better match spec names - Renamed _PLANE_SEL_FETCH_* to better match spec names BSpec: 55229 BSpec: 50424 BSpec: 50420 Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20200626010151.221388-3-jose.souza@intel.com commit 19167eb064da81ca7c837ecef61b23921606acd4 Author: José Roberto de Souza Date: Thu Jun 25 18:01:48 2020 -0700 drm/i915: Reorder intel_psr2_config_valid() Future patches will bring PSR2 selective fetch configuration validation but most of the configuration checks will be used for HW tracking and selective fetch so the reoder was necessary. Reviewed-by: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200626010151.221388-2-jose.souza@intel.com commit 093a3a30000926b8bda9eef773e4ed5079053350 Author: José Roberto de Souza Date: Thu Jun 25 18:01:47 2020 -0700 drm/i915: Add plane damage clips property This property will be used by PSR2 software tracking, adding it to GEN12+. Reviewed-by: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200626010151.221388-1-jose.souza@intel.com commit 00e3f891cab410cd7a88289ec811ed863d842ba4 Author: Sibi Sankar Date: Sat Jun 27 00:38:08 2020 +0530 arm64: dts: qcom: sc7180: Add cpu OPP tables Add OPP tables required to scale DDR/L3 per freq-domain on SC7180 SoCs. Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/20200626190808.8716-1-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit 2429ec265d50b4b6270763c4f37db61390adf350 Merge: e0cdac65ba269 9ed0a3fac08bd Author: David S. Miller Date: Tue Jun 30 15:57:34 2020 -0700 Merge branch 'net-improve-devres-helpers' Bartosz Golaszewski says: ==================== net: improve devres helpers So it seems like there's no support for relaxing certain networking devres helpers to not require previously allocated structures to also be managed. However the way mdio devres variants are implemented is still wrong and I modified my series to address it while keeping the functions strict. First two patches modify the ixgbe driver to get rid of the last user of devm_mdiobus_free(). Patches 3, 4, 5 and 6 are mostly cosmetic. Patch 7 fixes the way devm_mdiobus_register() is implemented. Patches 8 & 9 provide a managed variant of of_mdiobus_register() and last patch uses it in mtk-star-emac driver. v1 -> v2: - drop the patch relaxing devm_register_netdev() - require struct mii_bus to be managed in devm_mdiobus_register() and devm_of_mdiobus_register() but don't store that information in the structure itself: use devres_find() instead ==================== Signed-off-by: David S. Miller commit 9ed0a3fac08bddaf104038b6371eaa6494c6fd83 Author: Bartosz Golaszewski Date: Mon Jun 29 14:03:46 2020 +0200 net: ethernet: mtk-star-emac: use devm_of_mdiobus_register() Shrink the code by using the managed variant of of_mdiobus_register(). Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit 14eeb6e086d6b9004c600e5f0f62bacb458ecfba Author: Bartosz Golaszewski Date: Mon Jun 29 14:03:45 2020 +0200 of: mdio: provide devm_of_mdiobus_register() Implement a managed variant of of_mdiobus_register(). We need to make mdio_devres into its own module because otherwise we'd hit circular sumbol dependencies between phylib and of_mdio. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit a0bd96f5aed2108505386733abe76f37362c2f50 Author: Bartosz Golaszewski Date: Mon Jun 29 14:03:44 2020 +0200 of: mdio: remove the 'extern' keyword from function declarations The 'extern' keyword in headers doesn't have any benefit. Remove them all from the of_mdio.h header. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit ac3a68d56651c3dad2c12c7afce065fe15267f44 Author: Bartosz Golaszewski Date: Mon Jun 29 14:03:43 2020 +0200 net: phy: don't abuse devres in devm_mdiobus_register() We currently have two managed helpers for mdiobus - devm_mdiobus_alloc() and devm_mdiobus_register(). The idea behind devres is that the release callback releases whatever resource the devm function allocates. In the mdiobus case however there's no devres associated with the device by devm_mdiobus_register(). Instead the release callback for devm_mdiobus_alloc(): _devm_mdiobus_free() unregisters the device if it is marked as managed. This all seems wrong. The managed structure shouldn't need to know or care about whether it's managed or not - and this is the case now for struct mii_bus. The devres wrapper should be opaque to the managed resource. This changeset makes devm_mdiobus_alloc() and devm_mdiobus_register() conform to common devres standards: devm_mdiobus_alloc() allocates a devres structure and registers a callback that will call mdiobus_free(). __devm_mdiobus_register() allocated another devres and registers a callback that will unregister the bus. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit 6a9a5723cb2ef3cdf3604e9f0c63c8e68cbb08d5 Author: Bartosz Golaszewski Date: Mon Jun 29 14:03:42 2020 +0200 phy: mdio: add kerneldoc for __devm_mdiobus_register() This function is not documented. Add a short kerneldoc description. Signed-off-by: Bartosz Golaszewski Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8b11c20a658de159fcf18ebce4f2acfdf747ff25 Author: Bartosz Golaszewski Date: Mon Jun 29 14:03:41 2020 +0200 phy: un-inline devm_mdiobus_register() Functions should only be static inline if they're very short. This devres helper is already over 10 lines and it will grow soon as we'll be improving upon its approach. Pull it into mdio_devres.c. Signed-off-by: Bartosz Golaszewski Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit bd8ff6de0cf5b05bc7e1822aec79edac05b02a35 Author: Bartosz Golaszewski Date: Mon Jun 29 14:03:40 2020 +0200 Documentation: devres: add missing mdio helper We have a devres variant of mdiobus_register() but it's not listed in devres.rst. Add it under other mdio devm functions. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit fe189519e4d3ce655efa0bc64a6bed3f6f1ad1c2 Author: Bartosz Golaszewski Date: Mon Jun 29 14:03:39 2020 +0200 net: devres: rename the release callback of devm_register_netdev() Make it an explicit counterpart to devm_register_netdev() just like we do with devm_free_netdev() for better clarity. Signed-off-by: Bartosz Golaszewski Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d10d607f504bc7d0a6f69867a8eef0daa453dab7 Author: Bartosz Golaszewski Date: Mon Jun 29 14:03:38 2020 +0200 net: ethernet: ixgbe: don't call devm_mdiobus_free() The idea behind devres is that the release callbacks are called if probe fails. As we now check the return value of ixgbe_mii_bus_init(), we can drop the call devm_mdiobus_free() in error path as the release callback will be called automatically. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit 09ef193fef7efb0175a04634853862d717adbb95 Author: Bartosz Golaszewski Date: Mon Jun 29 14:03:37 2020 +0200 net: ethernet: ixgbe: check the return value of ixgbe_mii_bus_init() This function may fail. Check its return value and propagate the error code. Signed-off-by: Bartosz Golaszewski Signed-off-by: David S. Miller commit e0cdac65ba269767d5531cc40ab7fe858e2650d9 Author: Nirranjan Kirubaharan Date: Mon Jun 29 17:25:13 2020 +0530 cxgb4vf: configure ports accessible by the VF Find ports accessible by the VF, based on the index of the mac address stored for the VF in the adapter. If no mac address is stored for the VF, use the port mask provided by firmware. Signed-off-by: Nirranjan Kirubaharan Signed-off-by: David S. Miller commit b007def80e7399f7b2852a61fdd8b423f4c1b57b Merge: ff91e9292fc5a c4fad2a5323d9 Author: David S. Miller Date: Tue Jun 30 15:51:40 2020 -0700 Merge branch 'net-qed-qede-license-cleanup' Alexander Lobakin says: ==================== net: qed/qede: license cleanup QLogic QED drivers source code is dual licensed under GPL-2.0/BSD-3-Clause. Correct already existing but wrong SPDX tags to match the actual license. Remove the license boilerplates and replace them with the correct SPDX tag. Update copyright years in all source files. ==================== Signed-off-by: David S. Miller commit c4fad2a5323d991eb80fbd1197e9bb57162eb776 Author: Alexander Lobakin Date: Mon Jun 29 14:05:12 2020 +0300 net: qede: update copyright years Set the actual copyright holder and years in all qede source files. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 7268f33e5504c2db337ce5a375b44b70ec85a451 Author: Alexander Lobakin Date: Mon Jun 29 14:05:11 2020 +0300 net: qede: convert to SPDX License Identifiers QLogic QED drivers source code is dual licensed under GPL-2.0/BSD-3-Clause. Remove all the boilerplates in the existing code and replace it with the correct SPDX tag. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 090efe00ab077a669ff65a48b0b749723979b228 Author: Alexander Lobakin Date: Mon Jun 29 14:05:10 2020 +0300 net: qede: correct existing SPDX tags QLogic QED drivers source code is dual licensed under GPL-2.0/BSD-3-Clause. Correct already existing but wrong SPDX tags to match the actual license. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 663eacd899ac131dcfc2279184c1ce3c4fd2815f Author: Alexander Lobakin Date: Mon Jun 29 14:05:09 2020 +0300 net: qed: update copyright years Set the actual copyright holder and years in all qed source files. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 1f4d4ed6acc5b74974fa038e5e9d2e19f3b532f3 Author: Alexander Lobakin Date: Mon Jun 29 14:05:08 2020 +0300 net: qed: convert to SPDX License Identifiers QLogic QED drivers source code is dual licensed under GPL-2.0/BSD-3-Clause. Remove all the boilerplates in the existing code and replace it with the correct SPDX tag. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit ab81e23cf77905896a5e51422eb58e8763507b85 Author: Alexander Lobakin Date: Mon Jun 29 14:05:07 2020 +0300 net: qed: correct existing SPDX tags QLogic QED drivers source code is dual licensed under GPL-2.0/BSD-3-Clause. Correct already existing but wrong SPDX tags to match the actual license. Signed-off-by: Alexander Lobakin Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit ca4db6389d611eee2eb7c1dfe710b62d8ea06772 Author: Andrii Nakryiko Date: Mon Jun 29 17:47:59 2020 -0700 selftests/bpf: Allow substituting custom vmlinux.h for selftests build Similarly to bpftool Makefile, allow to specify custom location of vmlinux.h to be used during the build. This allows simpler testing setups with checked-in pre-generated vmlinux.h. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200630004759.521530-2-andriin@fb.com commit ec23eb705620234421fd48fc2382490fcfbafc37 Author: Andrii Nakryiko Date: Mon Jun 29 17:47:58 2020 -0700 tools/bpftool: Allow substituting custom vmlinux.h for the build In some build contexts (e.g., Travis CI build for outdated kernel), vmlinux.h, generated from available kernel, doesn't contain all the types necessary for BPF program compilation. For such set up, the most maintainable way to deal with this problem is to keep pre-generated (almost up-to-date) vmlinux.h checked in and use it for compilation purposes. bpftool after that can deal with kernel missing some of the features in runtime with no problems. To that effect, allow to specify path to custom vmlinux.h to bpftool's Makefile with VMLINUX_H variable. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20200630004759.521530-1-andriin@fb.com commit 30ff3e8c287455e9f7f85162df10d62819ba42a9 Author: Piotr Stankiewicz Date: Tue Jun 16 09:33:16 2020 +0200 PCI/MSI: Forward MSI-X error code in pci_alloc_irq_vectors_affinity() When debugging an issue where I was asking the PCI machinery to enable a set of MSI-X vectors, without falling back on MSI, I ran across a behaviour which seems odd. The pci_alloc_irq_vectors_affinity() will always return -ENOSPC on failure, when allocating MSI-X vectors only, whereas with MSI fallback it will forward any error returned by __pci_enable_msi_range(). This is a confusing behaviour, so have the pci_alloc_irq_vectors_affinity() forward the error code from __pci_enable_msix_range() when appropriate. Link: https://lore.kernel.org/r/20200616073318.20229-1-piotr.stankiewicz@intel.com Signed-off-by: Piotr Stankiewicz Signed-off-by: Bjorn Helgaas Reviewed-by: Andy Shevchenko Reviewed-by: Logan Gunthorpe Reviewed-by: Christoph Hellwig commit b239e4454e59bc85d466eb5630da46f6a876df77 Merge: 84651e81ee332 ae66eca000cfe Author: Linus Walleij Date: Tue Jun 30 23:53:11 2020 +0200 Merge tag 'gpio-updates-for-v5.9-part1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel gpio updates for v5.9 - use kobj_to_dev() in sysfs interface - kerneldoc and documentation fixes - relax the interrupt flags in gpio-mpc8xxx - support new model in gpio-pca953x - remove a redundant check from gpio-max732x - support a new platform in gpio-zynq (+ some minor fixes) - don't depend on GPIOLIB when already inside the "if GPIOLIB" in Kconfig - support PM ops for suspend in gpio-omap - minor tweaks in gpiolib commit 75b21c6dfa2d816bcabac24a530d9cffc12092b8 Author: Steven Rostedt (VMware) Date: Tue Jun 30 09:04:35 2020 -0400 ring-buffer: Mark the !tail (crossing a page) as unlikely It is the uncommon case where an event crosses a sub buffer boundary (page) mark that check at the end of reserving an event as unlikely. Suggested-by: Mathieu Desnoyers Signed-off-by: Steven Rostedt (VMware) commit b23d7a5f4a07af02343cdd28fe1f7488bac3afda Author: Nicholas Piggin Date: Thu Jun 25 15:34:03 2020 +1000 ring-buffer: speed up buffer resets by avoiding synchronize_rcu for each CPU On a 144 thread system, `perf ftrace` takes about 20 seconds to start up, due to calling synchronize_rcu() for each CPU. cat /proc/108560/stack 0xc0003e7eb336f470 __switch_to+0x2e0/0x480 __wait_rcu_gp+0x20c/0x220 synchronize_rcu+0x9c/0xc0 ring_buffer_reset_cpu+0x88/0x2e0 tracing_reset_online_cpus+0x84/0xe0 tracing_open+0x1d4/0x1f0 On a system with 10x more threads, it starts to become an annoyance. Batch these up so we disable all the per-cpu buffers first, then synchronize_rcu() once, then reset each of the buffers. This brings the time down to about 0.5s. Link: https://lkml.kernel.org/r/20200625053403.2386972-1-npiggin@gmail.com Tested-by: Anton Blanchard Acked-by: Paul E. McKenney Signed-off-by: Nicholas Piggin Signed-off-by: Steven Rostedt (VMware) commit 10464b4aa605ef93c937452f442e74cc0a4a6ceb Author: Steven Rostedt (VMware) Date: Sun Jun 28 22:52:27 2020 -0400 ring-buffer: Add rb_time_t 64 bit operations for speeding up 32 bit After a discussion with the new time algorithm to have nested events still have proper time keeping but required using local64_t atomic operations. Mathieu was concerned about the performance this would have on 32 bit machines, as in most cases, atomic 64 bit operations on them can be expensive. As the ring buffer's timing needs do not require full features of local64_t, a wrapper is made to implement a new rb_time_t operation that uses two longs on 32 bit machines but still uses the local64_t operations on 64 bit machines. There's a switch that can be made in the file to force 64 bit to use the 32 bit version just for testing purposes. All reads do not need to succeed if a read happened while the stamp being read is in the process of being updated. The requirement is that all reads must succed that were done by an interrupting event (where this event was interrupted by another event that did the write). Or if the event itself did the write first. That is: rb_time_set(t, x) followed by rb_time_read(t) will always succeed (even if it gets interrupted by another event that writes to t. The result of the read will be either the previous set, or a set performed by an interrupting event. If the read is done by an event that interrupted another event that was in the process of setting the time stamp, and no other event came along to write to that time stamp, it will fail and the rb_time_read() will return that it failed (the value to read will be undefined). A set will always write to the time stamp and return with a valid time stamp, such that any read after it will be valid. A cmpxchg may fail if it interrupted an event that was in the process of updating the time stamp just like the reads do. Other than that, it will act like a normal cmpxchg. The way this works is that the rb_time_t is made of of three fields. A cnt, that gets updated atomically everyting a modification is made. A top that represents the most significant 30 bits of the time, and a bottom to represent the least significant 30 bits of the time. Notice, that the time values is only 60 bits long (where the ring buffer only uses 59 bits, which gives us 18 years of nanoseconds!). The top two bits of both the top and bottom is a 2 bit counter that gets set by the value of the least two significant bits of the cnt. A read of the top and the bottom where both the top and bottom have the same most significant top 2 bits, are considered a match and a valid 60 bit number can be created from it. If they do not match, then the number is considered invalid, and this must only happen if an event interrupted another event in the midst of updating the time stamp. This is only used for 32 bits machines as 64 bit machines can get better performance out of the local64_t. This has been tested heavily by forcing 64 bit to use this logic. Link: https://lore.kernel.org/r/20200625225345.18cf5881@oasis.local.home Link: http://lkml.kernel.org/r/20200629025259.309232719@goodmis.org Inspired-by: Mathieu Desnoyers Signed-off-by: Steven Rostedt (VMware) commit ff91e9292fc5aafd9ee1dc44c03cff69a3b0f39f Author: Yousuk Seung Date: Tue Jun 30 09:49:33 2020 -0700 tcp: call tcp_ack_tstamp() when not fully acked When skb is coalesced tcp_ack_tstamp() still needs to be called when not fully acked in tcp_clean_rtx_queue(), otherwise SCM_TSTAMP_ACK timestamps may never be fired. Since the original patch series had dependent commits, this patch fixes the issue instead of reverting by restoring calls to tcp_ack_tstamp() when skb is not fully acked. Fixes: fdb7eb21ddd3 ("tcp: stamp SCM_TSTAMP_ACK later in tcp_clean_rtx_queue()") Signed-off-by: Yousuk Seung Signed-off-by: Willem de Bruijn Signed-off-by: Eric Dumazet Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit 5831b33362fdb60d56314a237b764e24ee1a538e Author: Colin Ian King Date: Tue Jun 30 16:16:46 2020 +0100 net/mlx5e: fix memory leak of tls The error return path when create_singlethread_workqueue fails currently does not kfree tls and leads to a memory leak. Fix this by kfree'ing tls before returning -ENOMEM. Addresses-Coverity: ("Resource leak") Fixes: 1182f3659357 ("net/mlx5e: kTLS, Add kTLS RX HW offload support") Signed-off-by: Colin Ian King Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit 6bad912b7e5ab51c23d8fa8362ca2d4ceeebdb74 Author: Paolo Abeni Date: Tue Jun 30 16:38:26 2020 +0200 mptcp: do nonce initialization at subflow creation time This clean-up the code a bit, reduces the number of used hooks and indirect call requested, and allow better error reporting from __mptcp_subflow_connect() Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit a6ed3ebca49b62d7a917287b9986feff4e9fa7b1 Author: Colin Ian King Date: Tue Jun 30 15:27:46 2020 +0100 net/tls: fix sign extension issue when left shifting u16 value Left shifting the u16 value promotes it to a int and then it gets sign extended to a u64. If len << 16 is greater than 0x7fffffff then the upper bits get set to 1 because of the implicit sign extension. Fix this by casting len to u64 before shifting it. Addresses-Coverity: ("integer handling issues") Fixes: ed9b7646b06a ("net/tls: Add asynchronous resync") Signed-off-by: Colin Ian King Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit a37675899cf8465a2f40dfbe656cf6cc0dd2486d Merge: 1d074bee675b9 c72ae701ee343 Author: David S. Miller Date: Tue Jun 30 13:09:10 2020 -0700 Merge branch 'sfc-prerequisites-for-EF100-driver-part-2' Edward Cree says: ==================== sfc: prerequisites for EF100 driver, part 2 Continuing on from [1], this series further prepares the sfc codebase for the introduction of the EF100 driver. [1]: https://lore.kernel.org/netdev/20200629.173812.1532344417590172093.davem@davemloft.net/T/ ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7c4b4a5164fbedc11c23e3671bd90ba0d23a5efd Author: Steven Rostedt (VMware) Date: Sun Jun 28 22:52:26 2020 -0400 ring-buffer: Incorporate absolute timestamp into add_timestamp logic Instead of calling out the absolute test for each time to check if the ring buffer wants absolute time stamps for all its recording, incorporate it with the add_timestamp field and turn it into flags for faster processing between wanting a absolute tag and needing to force one. Link: http://lkml.kernel.org/r/20200629025259.154892368@goodmis.org Signed-off-by: Steven Rostedt (VMware) commit c72ae701ee34385c9d4a17b59d127ca6a428300c Author: Edward Cree Date: Tue Jun 30 13:15:34 2020 +0100 sfc: don't call tx_remove if there isn't one EF100 won't have an efx->type->tx_remove method, because there's nothing for it to do. So make the call conditional. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit f07cb4128abb2bbb69bdc7d37a3d69147cb13dcd Author: Edward Cree Date: Tue Jun 30 13:15:10 2020 +0100 sfc: commonise initialisation of efx->vport_id Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit d4adc5162b9731df8ad95808c088e8ca4a5b1aaa Author: Edward Cree Date: Tue Jun 30 13:14:45 2020 +0100 sfc: commonise efx->[rt]xq_entries initialisation Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 937aa3ae4d14e2184b5ce5a801003723712e96bd Author: Edward Cree Date: Tue Jun 30 13:14:13 2020 +0100 sfc: initialise max_[tx_]channels in efx_init_channels() Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 20e1026cbed4af3fcf15779ec3edecf990ee8d4e Author: Edward Cree Date: Tue Jun 30 13:13:47 2020 +0100 sfc: move definition of EFX_MC_STATS_GENERATION_INVALID Saves a whole #include from nic.c. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit e7a256858f5fb58949c6f03c52e70cc98a4ad542 Author: Edward Cree Date: Tue Jun 30 13:13:15 2020 +0100 sfc: factor out efx_tx_tso_header_length() and understand encapsulation ef100 will need to check this against NIC limits. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 93841000ed9fc86dd9615a1048abb31c07792e0b Author: Edward Cree Date: Tue Jun 30 13:12:49 2020 +0100 sfc: remove duplicate declaration of efx_enqueue_skb_tso() Define it in nic_common.h, even though the ef100 driver will have a different implementation backing it (actually a WARN_ON_ONCE as it should never get called by ef100. But it needs to still exist because common TX path code references it). Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 740acc15c8a52c959111a9fbad974e9b0e5b4eb7 Author: Edward Cree Date: Tue Jun 30 13:12:17 2020 +0100 sfc: commonise TSO fallback code ef100 will need this if it gets GSO skbs it can't handle (e.g. too long header length). Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 80a0074e6aee3657784744ed66ca2c0cc918ecf8 Author: Edward Cree Date: Tue Jun 30 13:11:52 2020 +0100 sfc: commonise efx_sync_rx_buffer() The ef100 RX path will also need to DMA-sync RX buffers. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit f7e55550a38ded95eca13e13b7e76b87e4814260 Author: Edward Cree Date: Tue Jun 30 13:11:35 2020 +0100 sfc: commonise some MAC configuration code Refactor it a little as we go, and introduce efx_mcdi_set_mtu() which we will later use for ef100 to change MTU without touching other MAC settings. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 2d73515a1ce4ef8bc9ee931f2f61f0b2c88bde33 Author: Edward Cree Date: Tue Jun 30 13:03:47 2020 +0100 sfc: commonise miscellaneous efx functions Various left-over bits and pieces from efx.c that are needed by ef100. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 2c6c1e3cfda528f203bf5655760c508a43e0c822 Author: Edward Cree Date: Tue Jun 30 13:03:21 2020 +0100 sfc: add missing licence info to mcdi_filters.c Both the licence notice and the SPDX tag were missing from this file. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 272e53aa5c1648bdb1a11831d4ce96c17d69d99a Author: Edward Cree Date: Tue Jun 30 13:02:56 2020 +0100 sfc: commonise MCDI MAC stats handling Most of it was already declared in mcdi_port_common.h, so just move the implementations to mcdi_port_common.c. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 83d00531cbc837ab354e9ab429d49539797c7f1c Author: Edward Cree Date: Tue Jun 30 13:02:24 2020 +0100 sfc: move NIC-specific mcdi_port declarations out of common header These functions are implemented in mcdi_port.c, which will not be linked into the EF100 driver; thus their prototypes should not be visible in common header files. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 1d074bee675b9129e35b4ff1c94e025861db73a2 Merge: bcd763b714e67 981015ac60dc5 Author: David S. Miller Date: Tue Jun 30 13:05:10 2020 -0700 Merge branch 'Convert-Broadcom-SF2-to-mac_link_up-resolved-state' Russell King says: ==================== Convert Broadcom SF2 to mac_link_up() resolved state Convert Broadcom SF2 DSA support to use the newly provided resolved link state via mac_link_up() rather than using the state in mac_config(). ==================== Signed-off-by: David S. Miller commit 981015ac60dc5e073081e17a46189ebcfffeea19 Author: Russell King Date: Tue Jun 30 11:28:18 2020 +0100 net: dsa/bcm_sf2: move pause mode setting into mac_link_up() bcm_sf2 only appears to support pause modes on RGMII interfaces (the enable bits are in the RGMII control register.) Setup the pause modes for RGMII connections. Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 50cc2020a8055491534929abccda5047731f24b8 Author: Russell King Date: Tue Jun 30 11:28:13 2020 +0100 net: dsa/bcm_sf2: move speed/duplex forcing to mac_link_up() Convert the bcm_sf2 to use the finalised speed and duplex in its mac_link_up() call rather than the parameters in mac_config(). Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 2d1f90f9ba8348ebc85fe57a0034509b21570a85 Author: Russell King Date: Tue Jun 30 11:28:08 2020 +0100 net: dsa/bcm_sf2: fix incorrect usage of state->link state->link has never been valid in mac_config() implementations - while it may be correct in some calls, it is not true that it can be relied upon. Fix bcm_sf2 to use the correct method of handling forced link status. Reviewed-by: Florian Fainelli Tested-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit bcd763b714e6738c1d66e74221d4150c35bf8fc1 Merge: d9b8b9845fab2 ab017b7921d32 Author: David S. Miller Date: Tue Jun 30 13:03:27 2020 -0700 Merge branch 'Convert-Broadcom-B53-to-mac_link_up-resolved-state' Russell King says: ==================== Convert Broadcom B53 to mac_link_up() resolved state These two patches update the Broadcom B53 DSA support to use the newly provided resolved link state via mac_link_up() rather than using the state in mac_config(). ==================== Signed-off-by: David S. Miller commit ab017b7921d3242dd2fb04fce77680e88d97477e Author: Russell King Date: Tue Jun 30 11:25:06 2020 +0100 net: dsa/b53: use resolved link config in mac_link_up() Convert the B53 driver to use the finalised link parameters in mac_link_up() rather than the parameters in mac_config(). This is just a matter of moving the call to b53_force_port_config(). Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 3cad1c8b49e93c62f27f4eb34e0ccfde92f4cdc0 Author: Russell King Date: Tue Jun 30 11:25:00 2020 +0100 net: dsa/b53: change b53_force_port_config() pause argument Replace the b53_force_port_config() pause argument, which is based on phylink's MLO_PAUSE_* definitions, to use a pair of booleans. This will allow us to move b53_force_port_config() from b53_phylink_mac_config() to b53_phylink_mac_link_up(). Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit d9b8b9845fab2f034ca981aa06b69d6a291f46a7 Merge: 65951a9eb65e7 3bda14d09dc57 Author: David S. Miller Date: Tue Jun 30 12:59:15 2020 -0700 Merge tag 'batadv-next-for-davem-20200630' 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 - update mailing list URL, by Sven Eckelmann - fix typos and grammar in documentation, by Sven Eckelmann - introduce a configurable per interface hop penalty, by Linus Luessing ==================== Signed-off-by: David S. Miller commit 65951a9eb65e79b5a056fa6912682d91136507a1 Author: Florian Fainelli Date: Mon Jun 29 21:43:13 2020 -0700 net: dsa: Improve subordinate PHY error message It is not very informative to know the DSA master device when a subordinate network device fails to get its PHY setup. Provide the device name and capitalize PHY while we are it. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9d9f95a94097a21ee7a910db35c9b15ac1426724 Author: Luo bin Date: Tue Jun 30 10:30:34 2020 +0800 hinic: remove unused but set variable remove unused but set variable to avoid auto build test WARNING Signed-off-by: Luo bin Reported-by: kernel test robot Signed-off-by: David S. Miller commit e25974ae9d1106e32ad3f25f01226d6ac37a2b47 Merge: 2dac017dbd7c5 f637471d33a7a Author: David S. Miller Date: Tue Jun 30 12:34:35 2020 -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 2020-06-29 This series contains updates to only the igc driver. Sasha added Energy Efficient Ethernet (EEE) support and Latency Tolerance Reporting (LTR) support for the igc driver. Added Low Power Idle (LPI) counters and cleaned up unused TCP segmentation counters. Removed igc_power_down_link() and call igc_power_down_phy_copper_base() directly. Removed unneeded copper media check. Andre cleaned up timestamping by removing un-supported features and duplicate code for i225. Fixed the timestamp check on the proper flag instead of the skb for pending transmit timestamps. Refactored igc_ptp_set_timestamp_mode() to simply the flow. v2: Removed the log message in patch 1 as suggested by David Miller. Note: The locking issue Jakub Kicinski saw in patch 5, currently exists in the current net-next tree, so Andre will resolve the locking issue in a follow-on patch. ==================== Signed-off-by: David S. Miller commit 0b8cc25d942b50abb0c7ba597bc1621b8929ab75 Author: Colin Ian King Date: Tue Jun 30 16:54:41 2020 +0100 blk-cgroup: clean up indentation There is a statement that is indented one level too deeply, fix it by removing a tab. Signed-off-by: Colin Ian King Signed-off-by: Jens Axboe commit 37f4a24c2469a10a4c16c641671bd766e276cf9f Author: Ming Lei Date: Tue Jun 30 22:03:57 2020 +0800 blk-mq: centralise related handling into blk_mq_get_driver_tag Move .nr_active update and request assignment into blk_mq_get_driver_tag(), all are good to do during getting driver tag. Meantime blk-flush related code is simplified and flush request needn't to update the request table manually any more. Signed-off-by: Ming Lei Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 723bf178f158abd1ce6069cb049581b3cb003aab Author: Ming Lei Date: Tue Jun 30 22:03:56 2020 +0800 blk-mq: move blk_mq_put_driver_tag() into blk-mq.c It is used by blk-mq.c only, so move it to the source file. Suggested-by: Christoph Hellwig Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 570e9b73b0af2e5381ca5343759779b8c1ed20e3 Author: Ming Lei Date: Tue Jun 30 22:03:55 2020 +0800 blk-mq: move blk_mq_get_driver_tag into blk-mq.c blk_mq_get_driver_tag() is only used by blk-mq.c and is supposed to stay in blk-mq.c, so move it and preparing for cleanup code of get/put driver tag. Meantime hctx_may_queue() is moved to header file and it is fine since it is defined as inline always. No functional change. Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 2d798d9f5967a3f134b1c55acbbe026c032e3429 Author: Zhang Rui Date: Mon Jun 29 13:34:50 2020 +0800 powercap: intel_rapl: add support for Sapphire Rapids RAPL on SPR behaves similar to Haswell server, except that SPR uses a fixed energy unit (1 Joule) for the PSYS RAPL domain. Signed-off-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 040e123c0b7305a490adb4168b459c342ae7e9b2 Author: Chris Wilson Date: Fri Jun 19 20:40:38 2020 +0100 drm/i915/gem: Avoid kmalloc under i915->mm_lock Rearrange the allocation of the mm_struct registration to avoid allocating underneath the i915->mm_lock, so that we avoid tainting the lock (and in turn many other locks that may be held as i915->mm_lock is taken, and those locks we may want on the free [shrinker] paths). In doing so, we convert the lookup to be RCU protected by courtesy of converting the free-worker to be an rcu_work. v2: Remember to use hash_rcu variants to protect the list iteration from concurrent add/del. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200619194038.5088-1-chris@chris-wilson.co.uk commit a389d86f7fd0902e4ce4136a5601988dbd371eb1 Author: Steven Rostedt (VMware) Date: Sun Jun 28 22:52:25 2020 -0400 ring-buffer: Have nested events still record running time stamp Up until now, if an event is interrupted while it is recorded by an interrupt, and that interrupt records events, the time of those events will all be the same. This is because events only record the delta of the time since the previous event (or beginning of a page), and to handle updating the time keeping for that of nested events is extremely racy. After years of thinking about this and several failed attempts, I finally have a solution to solve this puzzle. The problem is that you need to atomically calculate the delta and then update the time stamp you made the delta from, as well as then record it into the buffer, all this while at any time an interrupt can come in and do the same thing. This is easy to solve with heavy weight atomics, but that would be detrimental to the performance of the ring buffer. The current state of affairs sacrificed the time deltas for nested events for performance. The reason for previous failed attempts at solving this puzzle was because I was trying to completely avoid slow atomic operations like cmpxchg. I final came to the conclusion to always avoid cmpxchg is not possible, which is why those previous attempts always failed. But it is possible to pick one path (the most common case) and avoid cmpxchg in that path, which is the "fast path". The most common case is that an event will not be interrupted and have other events added into it. An event can detect if it has interrupted another event, and for these cases we can make it the slow path and use the heavy operations like cmpxchg. One more player was added to the game that made this possible, and that is the "absolute timestamp" (by Tom Zanussi) that allows us to inject a full 59 bit time stamp. (Of course this breaks if a machine is running for more than 18 years without a reboot!). There's barrier() placements around for being paranoid, even when they are not needed because of other atomic functions near by. But those should not hurt, as if they are not needed, they basically become a nop. Note, this also makes the race window much smaller, which means there are less slow paths to slow down the performance. The basic idea is that there's two main paths taken. 1) Not being interrupted between time stamps and reserving buffer space. In this case, the time stamps taken are true to the location in the buffer. 2) Was interrupted by another path between taking time stamps and reserving buffer space. The objective is to know what the delta is from the last reserved location in the buffer. As it is possible to detect if an event is interrupting another event before reserving data, space is added to the length to be reserved to inject a full time stamp along with the event being reserved. When an event is not interrupted, the write stamp is always the time of the last event written to the buffer. In path 1, there's two sub paths we care about: a) The event did not interrupt another event. b) The event interrupted another event. In case a, as the write stamp was read and known to be correct, the delta between the current time stamp and the write stamp is the delta between the current event and the previously recorded event. In case b, extra space was reserved to just put the full time stamp into the buffer. Which is done, as stated, in this path the time stamp taken is known to match the location in the buffer. In path 2, there's also two sub paths we care about: a) The event was not interrupted by another event since it reserved space on the buffer and re-reading the write stamp. b) The event was interrupted by another event. In case a, the write stamp is that of the last event that interrupted this event between taking the time stamps and reserving. As no event came in after re-reading the write stamp, that event is known to be the time of the event directly before this event and the delta can be the new time stamp and the write stamp. In case b, one or more events came in between reserving the event and re-reading he write stamp. Since this event's buffer reservation is between other events at this path, there's no way to know what the delta is. But because an event interrupted this event after it started, its fine to just give a zero delta, and take the same time stamp as the events that happened within the event being recorded. Here's the implementation of the design of this solution: All this is per cpu, and only needs to worry about nested events (not parallel events). The players: write_tail: The index in the buffer where new events can be written to. It is incremented via local_add() to reserve space for a new event. before_stamp: A time stamp set by all events before reserving space. write_stamp: A time stamp updated by events after it has successfully reserved space. /* Save the current position of write */ [A] w = local_read(write_tail); barrier(); /* Read both before and write stamps before touching anything */ before = local_read(before_stamp); after = local_read(write_stamp); barrier(); /* * If before and after are the same, then this event is not * interrupting a time update. If it is, then reserve space for adding * a full time stamp (this can turn into a time extend which is * just an extended time delta but fill up the extra space). */ if (after != before) abs = true; ts = clock(); /* Now update the before_stamp (everyone does this!) */ [B] local_set(before_stamp, ts); /* Now reserve space on the buffer */ [C] write = local_add_return(len, write_tail); /* Set tail to be were this event's data is */ tail = write - len; if (w == tail) { /* Nothing interrupted this between A and C */ [D] local_set(write_stamp, ts); barrier(); [E] save_before = local_read(before_stamp); if (!abs) { /* This did not interrupt a time update */ delta = ts - after; } else { delta = ts; /* The full time stamp will be in use */ } if (ts != save_before) { /* slow path - Was interrupted between C and E */ /* The update to write_stamp could have overwritten the update to * it by the interrupting event, but before and after should be * the same for all completed top events */ after = local_read(write_stamp); if (save_before > after) local_cmpxchg(write_stamp, after, save_before); } } else { /* slow path - Interrupted between A and C */ after = local_read(write_stamp); temp_ts = clock(); barrier(); [F] if (write == local_read(write_tail) && after < temp_ts) { /* This was not interrupted since C and F * The last write_stamp is still valid for the previous event * in the buffer. */ delta = temp_ts - after; /* OK to keep this new time stamp */ ts = temp_ts; } else { /* Interrupted between C and F * Well, there's no use to try to know what the time stamp * is for the previous event. Just set delta to zero and * be the same time as that event that interrupted us before * the reservation of the buffer. */ delta = 0; } /* No need to use full timestamps here */ abs = 0; } Link: https://lkml.kernel.org/r/20200625094454.732790f7@oasis.local.home Link: https://lore.kernel.org/r/20200627010041.517736087@goodmis.org Link: http://lkml.kernel.org/r/20200629025258.957440797@goodmis.org Reviewed-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit 7ef282e05132d56b6f6b71e3873f317664bea78b Author: Steven Rostedt (VMware) Date: Mon Jun 29 23:45:56 2020 -0400 tracing: Move pipe reference to trace array instead of current_tracer If a process has the trace_pipe open on a trace_array, the current tracer for that trace array should not be changed. This was original enforced by a global lock, but when instances were introduced, it was moved to the current_trace. But this structure is shared by all instances, and a trace_pipe is for a single instance. There's no reason that a process that has trace_pipe open on one instance should prevent another instance from changing its current tracer. Move the reference counter to the trace_array instead. This is marked as "Fixes" but is more of a clean up than a true fix. Backport if you want, but its not critical. Fixes: cf6ab6d9143b1 ("tracing: Add ref count to tracer for when they are being read by pipe") Signed-off-by: Steven Rostedt (VMware) commit e6bc5b3f423825220a3232ddf08399658c918671 Author: Wei Yang Date: Fri Jun 12 17:28:44 2020 +0800 tracing: not necessary to define DEFINE_EVENT_PRINT to be empty again After the previous cleanup, DEFINE_EVENT_PRINT's definition has no relationship with DEFINE_EVENT. So After we re-define DEFINE_EVENT, it is not necessary to define DEFINE_EVENT_PRINT to be empty again. Link: http://lkml.kernel.org/r/20200612092844.56107-5-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit 61df16fcafad810ea5dcaa640d0fe3e039d8e652 Author: Wei Yang Date: Fri Jun 12 17:28:43 2020 +0800 tracing: define DEFINE_EVENT_PRINT not related to DEFINE_EVENT Current definition define DEFINE_EVENT_PRINT to be DEFINE_EVENT. Actually, at this point DEFINE_EVENT is already an empty macro. Let's cut the relationship between DEFINE_EVENT_PRINT and DEFINE_EVENT. Link: http://lkml.kernel.org/r/20200612092844.56107-4-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit b6f9eb87078b18cea7015e2575234e9b6b296c2f Author: Wei Yang Date: Fri Jun 12 17:28:42 2020 +0800 tracing: not necessary re-define DEFINE_EVENT_PRINT The definition of DEFINE_EVENT_PRINT is not changed after previous one, so not necessary to re-define is as the same form. Link: http://lkml.kernel.org/r/20200612092844.56107-3-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit e8cf9c8c4c18cda752fadce2da4f2a88d1e3d9e2 Author: Wei Yang Date: Fri Jun 12 17:28:41 2020 +0800 tracing: not necessary to undefine DEFINE_EVENT again After un-define DEFINE_EVENT in Stage 2, DEFINE_EVENT is not defined to a specific form. It is not necessary to un-define it again. Let's skip this. Link: http://lkml.kernel.org/r/20200612092844.56107-2-richard.weiyang@linux.alibaba.com Signed-off-by: Wei Yang Signed-off-by: Steven Rostedt (VMware) commit 16bbbc874f7f98e6598784896ed4719f0f1ed844 Author: Bjorn Helgaas Date: Tue Jun 30 12:41:39 2020 -0500 PCI: Replace lkml.org, spinics, gmane with lore.kernel.org The lkml.org, spinics.net, and gmane.org archives are not very reliable and, in some cases, not even easily accessible. Replace links to them with links to lore.kernel.org, the archives hosted by kernel.org. I found the gmane items via the Wayback Machine archive at https://web.archive.org/. Signed-off-by: Bjorn Helgaas commit 7ecd4a8175104b55de120dd8847e0bfabf7d75aa Author: Alexander A. Klimov Date: Sat Jun 27 12:30:50 2020 +0200 PCI: Replace http:// links with https:// Replace http:// links with https:// links. This reduces the likelihood of man-in-the-middle attacks when developers open these links. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. [bhelgaas: also update samsung.com links, drop sourceforge link] Link: https://lore.kernel.org/r/20200627103050.71712-1-grandmaster@al2klimov.de Signed-off-by: Alexander A. Klimov Signed-off-by: Bjorn Helgaas commit 5ff40e6d0f8ae2f711b0e97d4c0a4d081fdd0dc1 Author: Alexander Tsoy Date: Mon Jun 29 06:26:07 2020 +0300 ALSA: usb-audio: Fix some typos Fix the following typos in comments and in the code: - KHz -> kHz - procssed -> processed Signed-off-by: Alexander Tsoy Link: https://lore.kernel.org/r/20200629032607.255419-1-alexander@tsoy.me Signed-off-by: Takashi Iwai commit f6a7d3952cbed2c1e07d945dbb36f5c34200e9c1 Author: Ville Syrjälä Date: Wed Apr 29 13:10:34 2020 +0300 drm/i915: Suppress spurious underruns on gen2 Often we seem to detect an underrun right after modeset on gen2. It seems to be a spurious detection (potentially the pipe is still in a wonky state when we enable the planes). An extra vblank wait seems to cure it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200429101034.8208-13-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 42ae1f88feacc8643bc56dcfa55e0722967e424f Author: Ville Syrjälä Date: Wed Apr 29 13:10:32 2020 +0300 drm/i915/fbc: Reduce fbc1 compression interval to 1 second The default fbc1 compression interval we use is 500 frames. That translates to over 8 seconds typically. That's rather excessive so let's drop it to 1 second. The hardware will not attempt recompression unless at least one line has been modified, so a shorter compression interval should not cause extra bandwidth use in the purely idle scenario. Of course in the mostly idle case we are possibly going to recompress a bit more. Should really try to find some kind of sweet spot to minimize the energy usage... Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200429101034.8208-11-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit a68ce21ba0c44f5504e1e5bb0e5151b239540dc5 Author: Ville Syrjälä Date: Wed Apr 29 13:10:31 2020 +0300 drm/i915/fbc: Store the fbc1 compression interval in the params Avoid the FBC_CONTROL rmw and just store the fbc compression interval in the params/ Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200429101034.8208-10-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit a4c74b297448e64b1ae2b017e4b7efec37ef7592 Author: Ville Syrjälä Date: Wed Apr 29 13:10:30 2020 +0300 drm/i915/fbc: Parametrize FBC_CONTROL Parametrize the FBC_CONTROL bits for neater code. Also add the one missing bit: "stop compression on modification". Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200429101034.8208-9-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit d838962f165c4bdbed9047b0f4d9ecd783e04b71 Author: Ville Syrjälä Date: Wed Apr 29 13:10:28 2020 +0300 drm/i915/fbc: Don't clear busy_bits for origin==GTT The hardware host tracking won't nuke the entire cfb (unless the entire fb is written through the gtt) so don't clear the busy_bits for gtt tracking. Not that it really matters anymore since we've lost ORIGIN_GTT usage everywhere. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200429101034.8208-7-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 5331889b5ffb11d6257953e418291a9f04c02bed Author: Ville Syrjälä Date: Wed Apr 29 13:10:25 2020 +0300 drm/i915/fbc: Fix fence_y_offset handling The current fence_y_offset calculation is broken. I think it more or less used to do the right thing, but then I changed the plane code to put the final x/y source offsets back into the src rectangle so now it's just subtraacting the same value from itself. The code would never have worked if we allowed the framebuffer to have a non-zero offset. Let's do this in a better way by just calculating the fence_y_offset from the final plane surface offset. Note that we don't align the plane surface address to fence rows so with horizontal panning there's often a horizontal offset from the fence start to the surface address as well. We have no way to tell the hardware about that so we just ignore it. Based on some quick tests the invlidation still happens correctly. I presume due to the invalidation nuking at least the full line (or a segment of multiple lines). Fixes: 54d4d719fa11 ("drm/i915: Overcome display engine stride limits via GTT remapping") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200429101034.8208-4-ville.syrjala@linux.intel.com Reviewed-by: Matt Roper commit c1b9fd3d310177b31621d5e661f06885869cae12 Author: Chris Wilson Date: Tue Jun 30 16:27:24 2020 +0100 drm/i915: Skip stale object handle for debugfs per-file-stats As we close a handle GEM object, we update the drm_file's idr with an error^W NULL pointer to indicate the in-progress closure, and finally removing it. If we read the idr directly, we may then see an invalid object pointer, and in our debugfs per_file_stats() we therefore need to protect against the entry being invalid. [ 1016.651637] RIP: 0010:per_file_stats+0xe/0x16e [ 1016.651646] Code: d2 41 0f b6 8e 69 8c 00 00 48 89 df 48 c7 c6 7b 74 8c be 31 c0 e8 0c 89 cf ff eb d2 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 53 <8b> 06 85 c0 0f 84 4d 01 00 00 49 89 d6 48 89 f3 3d ff ff ff 7f 73 [ 1016.651651] RSP: 0018:ffffad3a01337ba0 EFLAGS: 00010293 [ 1016.651656] RAX: 0000000000000018 RBX: ffff96fe040d65e0 RCX: 0000000000000002 [ 1016.651660] RDX: ffffad3a01337c50 RSI: 0000000000000000 RDI: 00000000000001e8 [ 1016.651663] RBP: ffffad3a01337bb8 R08: 0000000000000000 R09: 00000000000001c0 [ 1016.651667] R10: 0000000000000000 R11: ffffffffbdbe5fce R12: 0000000000000000 [ 1016.651671] R13: ffffffffbdbe5fce R14: ffffad3a01337c50 R15: 0000000000000001 [ 1016.651676] FS: 00007a597e2d7480(0000) GS:ffff96ff3bb00000(0000) knlGS:0000000000000000 [ 1016.651680] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1016.651683] CR2: 0000000000000000 CR3: 0000000171fc2001 CR4: 00000000003606e0 [ 1016.651687] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1016.651690] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1016.651693] Call Trace: [ 1016.651693] Call Trace: [ 1016.651703] idr_for_each+0x8a/0xe8 [ 1016.651711] i915_gem_object_info+0x2a3/0x3eb [ 1016.651720] seq_read+0x162/0x3ca [ 1016.651727] full_proxy_read+0x5b/0x8d [ 1016.651733] __vfs_read+0x45/0x1bb [ 1016.651741] vfs_read+0xc9/0x15e [ 1016.651746] ksys_read+0x7e/0xde [ 1016.651752] do_syscall_64+0x54/0x68 [ 1016.651758] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Reported-by: Guenter Roeck Fixes: a8c15954d64a ("drm/i915: Protect debugfs per_file_stats with RCU lock") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Guenter Roeck Cc: stable@vger.kernel.org Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200630152724.3734-1-chris@chris-wilson.co.uk commit 857ca89711de3dbcc674d58a6d7d297ee0bd34e1 Author: Julian Anastasov Date: Sun Jun 21 18:40:30 2020 +0300 ipvs: register hooks only with services Keep the IPVS hooks registered in Netfilter only while there are configured virtual services. This saves CPU cycles while IPVS is loaded but not used. Signed-off-by: Julian Anastasov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit c4334a99d3d6d8e2d1aa97655f44f637f17a3a11 Author: Bolarinwa Olayemi Saheed Date: Mon Jun 15 09:32:19 2020 +0200 IB/hfi1: Convert PCIBIOS_* errors to generic -E* errors pcie_speeds() and restore_pci_variables() returns PCIBIOS_ error codes from PCIe capability accessors. PCIBIOS_ error codes have positive values. Passing on these values is inconsistent with functions which return only a negative value on failure. Before passing on the return value of PCIe capability accessors, call pcibios_err_to_errno() to convert any positive PCIBIOS_ error codes to negative generic error values. Link: https://lore.kernel.org/r/20200615073225.24061-3-refactormyself@gmail.com Suggested-by: Bjorn Helgaas Signed-off-by: Bolarinwa Olayemi Saheed Reviewed-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit d61d2e902aa0561e5f4b6348514fb35de544aa1f Author: Stefano Brivio Date: Sun Jun 14 23:42:07 2020 +0200 netfilter: nft_set_pipapo: Drop useless assignment of scratch map index on insert In nft_pipapo_insert(), we need to reallocate scratch maps that will be used for matching by lookup functions, if they have never been allocated or if the bucket size changes as a result of the insertion. As pipapo_realloc_scratch() provides a pair of fresh, zeroed out maps, there's no need to select a particular one after reallocation. Other than being useless, the existing assignment was also troubled by the fact that the index was set only on the CPU performing the actual insertion, as spotted by Florian. Simply drop the assignment. Reported-by: Florian Westphal Fixes: 3c4287f62044 ("nf_tables: Add set type for arbitrary concatenation of ranges") Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit f53b9b0bdc59c0823679f2e3214e0d538f5951b9 Author: Laura Garcia Liebana Date: Sun May 31 22:26:23 2020 +0200 netfilter: introduce support for reject at prerouting stage REJECT statement can be only used in INPUT, FORWARD and OUTPUT chains. This patch adds support of REJECT, both icmp and tcp reset, at PREROUTING stage. The need for this patch comes from the requirement of some forwarding devices to reject traffic before the natting and routing decisions. The main use case is to be able to send a graceful termination to legitimate clients that, under any circumstances, the NATed endpoints are not available. This option allows clients to decide either to perform a reconnection or manage the error in their side, instead of just dropping the connection and let them die due to timeout. It is supported ipv4, ipv6 and inet families for nft infrastructure. Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso commit 29d158f906907ce8e52ea75ec87b4e35461f2018 Author: Pierre-Louis Bossart Date: Tue Jun 9 04:54:36 2020 +0800 soundwire: bus: initialize bus clock base and scale registers The SoundWire 1.2 specification adds new registers to allow for seamless clock changes while audio transfers are on-going. Program them following the specification. Note that dynamic clock changes are not supported for now, this only adds the register initialization. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200608205436.2402-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit b5924268d6700821fbd8afe815073b05cebaa308 Author: Pierre-Louis Bossart Date: Tue Jun 9 04:54:35 2020 +0800 soundwire: extend SDW_SLAVE_ENTRY The SoundWire 1.2 specification adds new capabilities that were not present in previous version, such as the class ID. To enable support for class drivers, and well as drivers that address a specific version, all fields of the sdw_device_id structure need to be exposed. For SoundWire 1.0 and 1.1 devices, a wildcard is used so class and version information are ignored. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200608205436.2402-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit ee9173db5037cf46aba47161043ec6f0e06cf9d3 Author: Pierre-Louis Bossart Date: Tue Jun 9 04:54:34 2020 +0800 soundwire: bus_type: convert open-coded while() to for() loop No functionality change, just more structured code. Suggested-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200608205436.2402-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e3f88cdb8fdd5876ef3a0373e35ba7f2598fcf17 Author: Pierre-Louis Bossart Date: Tue Jun 9 04:54:33 2020 +0800 soundwire: add definitions for 1.2 spec Add definitions for register offsets and bit fields from the MIPI SoundWire 1.2 specification (available to MIPI members at https://members.mipi.org/wg/All-Members/document/download/78371) Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200608205436.2402-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit ad440432d1f93b387eaf9796afcbc02467a2a841 Author: Rob Herring Date: Wed Jun 10 13:04:18 2020 -0600 dt-bindings: mfd: Ensure 'syscon' has a more specific compatible Using 'syscon' alone should be avoided as compatible strings should be specific enough to identify the exact set of registers contained. Update the schema to ensure at least 2 compatible strings are present. Cc: Lee Jones Cc: Maxime Ripard Signed-off-by: Rob Herring commit 8eb06d7e8dd853d70668617dda57de4f6cebe651 Author: Pavel Begunkov Date: Tue Jun 30 15:20:39 2020 +0300 io_uring: fix missing ->mm on exit There is a fancy bug, where exiting user task may not have ->mm, that makes task_works to try to do kthread_use_mm(ctx->sqo_mm). Don't do that if sqo_mm is NULL. [ 290.460558] WARNING: CPU: 6 PID: 150933 at kernel/kthread.c:1238 kthread_use_mm+0xf3/0x110 [ 290.460579] CPU: 6 PID: 150933 Comm: read-write2 Tainted: G I E 5.8.0-rc2-00066-g9b21720607cf #531 [ 290.460580] RIP: 0010:kthread_use_mm+0xf3/0x110 ... [ 290.460584] Call Trace: [ 290.460584] __io_sq_thread_acquire_mm.isra.0.part.0+0x25/0x30 [ 290.460584] __io_req_task_submit+0x64/0x80 [ 290.460584] io_req_task_submit+0x15/0x20 [ 290.460585] task_work_run+0x67/0xa0 [ 290.460585] do_exit+0x35d/0xb70 [ 290.460585] do_group_exit+0x43/0xa0 [ 290.460585] get_signal+0x140/0x900 [ 290.460586] do_signal+0x37/0x780 [ 290.460586] __prepare_exit_to_usermode+0x126/0x1c0 [ 290.460586] __syscall_return_slowpath+0x3b/0x1c0 [ 290.460587] do_syscall_64+0x5f/0xa0 [ 290.460587] entry_SYSCALL_64_after_hwframe+0x44/0xa9 following with faults. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 3fa5e0f331280237af918ab2e7a160f5a68d3e7d Author: Pavel Begunkov Date: Tue Jun 30 15:20:43 2020 +0300 io_uring: optimise io_req_find_next() fast check gcc 9.2.0 compiles io_req_find_next() as a separate function leaving the first REQ_F_LINK_HEAD fast check not inlined. Help it by splitting out the check from the function. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0be0b0e33b0bfd08264b108512e44b3907fe987b Author: Pavel Begunkov Date: Tue Jun 30 15:20:42 2020 +0300 io_uring: simplify io_async_task_func() Greatly simplify io_async_task_func() removing duplicated functionality of __io_req_task_submit(). This do one extra spin lock/unlock for cancelled poll case, but that shouldn't happen often. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ea1164e574e9af0a15ab730ead0861a4c7724142 Author: Pavel Begunkov Date: Tue Jun 30 15:20:41 2020 +0300 io_uring: fix NULL mm in io_poll_task_func() io_poll_task_func() hand-coded link submission forgetting to set TASK_RUNNING, acquire mm, etc. Call existing helper for that, i.e. __io_req_task_submit(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit cf2f54255d0342cfbd273cbb964ad6bc7674f587 Author: Pavel Begunkov Date: Tue Jun 30 15:20:40 2020 +0300 io_uring: don't fail iopoll requeue without ->mm Actually, io_iopoll_queue() may have NULL ->mm, that's if SQ thread didn't grabbed mm before doing iopoll. Don't fail reqs there, as after recent changes it won't be punted directly but rather through task_work. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ab0b6451db2a8ed630b89ef3826b8ea994149444 Author: Jens Axboe Date: Tue Jun 30 08:43:15 2020 -0600 io_uring: clean up io_kill_linked_timeout() locking Avoid jumping through hoops to silence unused variable warnings, and also fix sparse rightfully complaining about the locking context: fs/io_uring.c:1593:39: warning: context imbalance in 'io_kill_linked_timeout' - unexpected unlock Provide the functional helper as __io_kill_linked_timeout(), and have separate the locking from it. Signed-off-by: Jens Axboe commit cbdcb4357c000861b77369c34e110fa893d23607 Author: Pavel Begunkov Date: Mon Jun 29 19:18:43 2020 +0300 io_uring: do grab_env() just before punting Currently io_steal_work() is disabled, and every linked request should go through task_work for initialisation. Do io_req_work_grab_env() just before io-wq punting and for the whole link, so any request reachable by io_steal_work() is prepared. This is also interesting for another reason -- it localises io_req_work_grab_env() into one place just before io-wq punting, helping to to better manage req->work lifetime and add some neat cleanup/optimisations later. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit debb85f496c9cc70663eac31d3ad9153839c844c Author: Pavel Begunkov Date: Mon Jun 29 19:18:42 2020 +0300 io_uring: factor out grab_env() from defer_prep() Remove io_req_work_grab_env() call from io_req_defer_prep(), just call it when neccessary. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit edcdfcc149a8d0c11d4dd2b23b5338af22e31a5f Author: Pavel Begunkov Date: Mon Jun 29 19:18:41 2020 +0300 io_uring: do init work in grab_env() Place io_req_init_async() in io_req_work_grab_env() so it won't be forgotten. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 351fd53595a3ceb88756a005e3b864f7c8cb86e4 Author: Pavel Begunkov Date: Mon Jun 29 19:18:40 2020 +0300 io_uring: don't pass def into io_req_work_grab_env Remove struct io_op_def *def parameter from io_req_work_grab_env(), it's trivially deducible from req->opcode and fast. The API is cleaner this way, and also helps the complier to understand that it's a real constant and could be register-cached. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ecfc51777487da4da530710e0b13de4c8cb4a6d2 Author: Pavel Begunkov Date: Mon Jun 29 13:13:03 2020 +0300 io_uring: fix potential use after free on fallback request free After __io_free_req() puts a ctx ref, it should be assumed that the ctx may already be gone. However, it can be accessed when putting the fallback req. Free the req first and then put the ctx. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8eb7e2d00763367f345ef0b2a2eb4f8001ae40ce Author: Pavel Begunkov Date: Mon Jun 29 13:13:02 2020 +0300 io_uring: kill REQ_F_TIMEOUT_NOSEQ There are too many useless flags, kill REQ_F_TIMEOUT_NOSEQ, which can be easily infered from req.timeout itself. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit a1a4661691c5f1a3af4c04f56ad68e2d1dbee3af Author: Pavel Begunkov Date: Mon Jun 29 13:13:01 2020 +0300 io_uring: kill REQ_F_TIMEOUT Now REQ_F_TIMEOUT is set but never used, kill it Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9b5f7bd93272689ec8dc2cfd40a812265c23414e Author: Pavel Begunkov Date: Mon Jun 29 13:13:00 2020 +0300 io_uring: replace find_next() out param with ret Generally, it's better to return a value directly than having out parameter. It's cleaner and saves from some kinds of ugly bugs. May also be faster. Return next request from io_req_find_next() and friends directly instead of passing out parameter. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7c86ffeeed303187f266ed17bd87a9b375955709 Author: Pavel Begunkov Date: Mon Jun 29 13:12:59 2020 +0300 io_uring: deduplicate freeing linked timeouts Linked timeout cancellation code is repeated in in io_req_link_next() and io_fail_links(), and they differ in details even though shouldn't. Basing on the fact that there is maximum one armed linked timeout in a link, and it immediately follows the head, extract a function that will check for it and defuse. Justification: - DRY and cleaner - better inlining for io_req_link_next() (just 1 call site now) - isolates linked_timeouts from common path - reduces time under spinlock for failed links - actually less code Signed-off-by: Pavel Begunkov [axboe: fold in locking fix for io_fail_links()] Signed-off-by: Jens Axboe commit e48bc01ed5adec203676c735365373b31c3c7600 Author: Gwendal Grignou Date: Tue Jun 30 00:52:03 2020 -0700 platform/chrome: cros_ec_sensorhub: Fix EC timestamp overflow EC is using 32 bit timestamps (us), and before converting it to 64bit they were not casted, so it would overflow every 4s. Regular overflow every ~70 minutes was not taken into account either. Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra commit 20b736872f7f324438649a277ec711a646ce8e8d Author: Prashant Malani Date: Mon Jun 29 14:13:29 2020 -0700 platform/chrome: cros_ec_typec: Add PM support Define basic suspend resume functions for cros-ec-typec. On suspend, we simply ensure that any pending port update work is completed, and on resume, we re-poll the port state to account for any changes/disconnections that might have occurred during suspend. Signed-off-by: Prashant Malani Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Enric Balletbo i Serra commit 83cbc69df8b8ec598ff8ca7629be34a50274e5b5 Author: Prashant Malani Date: Mon Jun 29 14:13:27 2020 -0700 platform/chrome: cros_ec_typec: Use workqueue for port update Use a work queue to call the port update routines, instead of doing it directly in the PD notifier callback. This will prevent other drivers with PD notifier callbacks from being blocked on the port update routine completing. Signed-off-by: Prashant Malani Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Enric Balletbo i Serra commit 85b565c99eca5305d6f55e7855e27a427a81e6e6 Author: Lee Jones Date: Tue Jun 30 14:33:38 2020 +0100 gpio: gpio-ml-ioh: Fix missing ':' in 'struct ioh_gpio_reg_data 'struct ioh_gpio_reg_data's 'ien_reg' property is missing a ':' which confuses the kerneldoc tooling/parsers/validators. Replacing it squashes the following W=1 warning: drivers/gpio/gpio-ml-ioh.c:63: warning: Function parameter or member 'ien_reg' not described in 'ioh_gpio_reg_data' Cc: Andy Shevchenko Signed-off-by: Lee Jones Signed-off-by: Andy Shevchenko commit f1d8fe2e98d11788cabb2ad5c5becfcc95dd81a9 Author: Fabio Estevam Date: Tue Jun 30 08:44:43 2020 -0300 dt-bindings: mfd: st,stmfx: Remove extra additionalProperties The following build error is seen with 'make dt_binding_check': CHKDT Documentation/devicetree/bindings/mfd/st,stmfx.yaml /home/fabio/linux-next/Documentation/devicetree/bindings/mfd/st,stmfx.yaml: properties:pinctrl:patternProperties: {'enum': ['$ref', 'additionalItems', 'additionalProperties', 'allOf', 'anyOf', 'const', 'contains', 'default', 'dependencies', 'deprecated', 'description', 'else', 'enum', 'if', 'items', 'maxItems', 'maximum', 'minItems', 'minimum', 'multipleOf', 'not', 'oneOf', 'pattern', 'patternProperties', 'properties', 'propertyNames', 'required', 'then', 'unevaluatedProperties']} is not allowed for 'additionalProperties' Remove the extra 'additionalProperties' to pass the build. Signed-off-by: Fabio Estevam Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 1185c406f11a49335253036feaa0169c0d174ef8 Author: Laurent Pinchart Date: Tue Jun 30 02:33:20 2020 +0300 drm: panel: simple: Warn in case of incorrect bus format for LVDS panels Only the MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, MEDIA_BUS_FMT_RGB888_1X7X4_SPWG and MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA bus formats are valid for LVDS panels. Warn at probe time to catch the common mistake of using an incorrect format, as well as discrepancies between the bus format and the reported bpc. Signed-off-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200629233320.8774-5-laurent.pinchart+renesas@ideasonboard.com commit c4715837b023930250c9a754db3309c4b701cc0d Author: Laurent Pinchart Date: Tue Jun 30 02:33:19 2020 +0300 drm: panel: simple: Drop drive/sample bus flags for LVDS panels The DRM bus flags reporting on which clock edge the pixel data and sync signals are sampled or driven don't make sense for LVDS panels, as the bus then uses sub-clock timings to send data. Drop those flags and add a warning in the probe function to make sure the mistake won't be repeated. Signed-off-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200629233320.8774-4-laurent.pinchart+renesas@ideasonboard.com commit 34ca6b535f4fe20a1cec1e6c4c3f279835ce11ed Author: Laurent Pinchart Date: Tue Jun 30 02:33:18 2020 +0300 drm: panel: simple: Correct bus format for Satoz SAT050AT40H12R2 The Satoz SAT050AT40H12R2 panel is an LVDS panel, the MEDIA_BUS_FMT_RGB888_1X24 bus format is thus incorrect. Set it to the correct value MEDIA_BUS_FMT_RGB888_1X7X4_SPWG. Signed-off-by: Laurent Pinchart Reviewed-by: Miquel Raynal Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200629233320.8774-3-laurent.pinchart+renesas@ideasonboard.com commit 41fad307b55fac7c7f3b9f77dfb663d0d3857330 Author: Laurent Pinchart Date: Tue Jun 30 02:33:17 2020 +0300 drm: panel: simple: Correct connector type for Starry KR070PE2T The Starry KR070PE2T panel is a DPI panel, not and LVDS panel. Fix its connector type. Signed-off-by: Laurent Pinchart Reviewed-by: Pascal Roeleven Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200629233320.8774-2-laurent.pinchart+renesas@ideasonboard.com commit 6e6fcbc27e7788af54139c53537395d95560f2ef Author: Ming Lei Date: Tue Jun 30 18:25:01 2020 +0800 blk-mq: support batching dispatch in case of io More and more drivers want to get batching requests queued from block layer, such as mmc, and tcp based storage drivers. Also current in-tree users have virtio-scsi, virtio-blk and nvme. For none, we already support batching dispatch. But for io scheduler, every time we just take one request from scheduler and pass the single request to blk_mq_dispatch_rq_list(). This way makes batching dispatch not possible when io scheduler is applied. One reason is that we don't want to hurt sequential IO performance, becasue IO merge chance is reduced if more requests are dequeued from scheduler queue. Try to support batching dispatch for io scheduler by starting with the following simple approach: 1) still make sure we can get budget before dequeueing request 2) use hctx->dispatch_busy to evaluate if queue is busy, if it is busy we fackback to non-batching dispatch, otherwise dequeue as many as possible requests from scheduler, and pass them to blk_mq_dispatch_rq_list(). Wrt. 2), we use similar policy for none, and turns out that SCSI SSD performance got improved much. In future, maybe we can develop more intelligent algorithem for batching dispatch. Baolin has tested this patch and found that MMC performance is improved[3]. [1] https://lore.kernel.org/linux-block/20200512075501.GF1531898@T590/#r [2] https://lore.kernel.org/linux-block/fe6bd8b9-6ed9-b225-f80c-314746133722@grimberg.me/ [3] https://lore.kernel.org/linux-block/CADBw62o9eTQDJ9RvNgEqSpXmg6Xcq=2TxH0Hfxhp29uF2W=TXA@mail.gmail.com/ Signed-off-by: Ming Lei Tested-by: Baolin Wang Reviewed-by: Christoph Hellwig Cc: Sagi Grimberg Cc: Baolin Wang Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 1fd40b5ea72cf830cfb932bbf791533931c615e9 Author: Ming Lei Date: Tue Jun 30 18:25:00 2020 +0800 blk-mq: pass obtained budget count to blk_mq_dispatch_rq_list Pass obtained budget count to blk_mq_dispatch_rq_list(), and prepare for supporting fully batching submission. With the obtained budget count, it is easier to put extra budgets in case of .queue_rq failure. Meantime remove the old 'got_budget' parameter. Signed-off-by: Ming Lei Tested-by: Baolin Wang Reviewed-by: Christoph Hellwig Cc: Sagi Grimberg Cc: Baolin Wang Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit bbdb3c5d94d079ab4c6eaf9ac0d4f6813f1c0327 Author: Ming Lei Date: Tue Jun 30 18:24:59 2020 +0800 blk-mq: remove dead check from blk_mq_dispatch_rq_list When BLK_STS_RESOURCE or BLK_STS_DEV_RESOURCE is returned from .queue_rq, the 'list' variable always holds this rq which isn't queued to LLD successfully. So blk_mq_dispatch_rq_list() always returns false from the branch of '!list_empty(list)'. No functional change. Signed-off-by: Ming Lei Tested-by: Baolin Wang Reviewed-by: Johannes Thumshirn Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Cc: Sagi Grimberg Cc: Baolin Wang Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 7538352453189abf3a96461e187b1085b0ae0c6c Author: Ming Lei Date: Tue Jun 30 18:24:58 2020 +0800 blk-mq: move getting driver tag and budget into one helper Move code for getting driver tag and budget into one helper, so blk_mq_dispatch_rq_list gets a bit simplified, and easier to read. Meantime move updating of 'no_tag' and 'no_budget_available' into the branch for handling partial dispatch because that is exactly consumer of the two local variables. Also rename the parameter of 'got_budget' as 'ask_budget'. No functional change. Signed-off-by: Ming Lei Tested-by: Baolin Wang Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Cc: Sagi Grimberg Cc: Baolin Wang Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 445874e89f662c8c6a56e6bb820cbe9fbef61428 Author: Ming Lei Date: Tue Jun 30 18:24:57 2020 +0800 blk-mq: pass hctx to blk_mq_dispatch_rq_list All requests in the 'list' of blk_mq_dispatch_rq_list belong to same hctx, so it is better to pass hctx instead of request queue, because blk-mq's dispatch target is hctx instead of request queue. Signed-off-by: Ming Lei Tested-by: Baolin Wang Reviewed-by: Christoph Hellwig Reviewed-by: Sagi Grimberg Reviewed-by: Johannes Thumshirn Cc: Sagi Grimberg Cc: Baolin Wang Cc: Christoph Hellwig Signed-off-by: Jens Axboe commit 65c763694398a2de63803b264dcf906b47f9d4c1 Author: Ming Lei Date: Tue Jun 30 18:24:56 2020 +0800 blk-mq: pass request queue into get/put budget callback blk-mq budget is abstract from scsi's device queue depth, and it is always per-request-queue instead of hctx. It can be quite absurd to get a budget from one hctx, then dequeue a request from scheduler queue, and this request may not belong to this hctx, at least for bfq and deadline. So fix the mess and always pass request queue to get/put budget callback. Signed-off-by: Ming Lei Tested-by: Baolin Wang Reviewed-by: Johannes Thumshirn Reviewed-by: Christoph Hellwig Reviewed-by: Douglas Anderson Reviewed-by: Sagi Grimberg Cc: Sagi Grimberg Cc: Baolin Wang Cc: Christoph Hellwig Cc: Douglas Anderson Signed-off-by: Jens Axboe commit bdc4094591c3809e53eb7792344248bb447768c3 Author: Enric Balletbo i Serra Date: Mon Jun 29 12:32:23 2020 +0200 platform/chrome: cros_ec_typec: Add a dependency on USB_ROLE_SWITCH As reported by the kernel test robot the cros_ec_typec driver fails to build if the USB_ROLE_SWITCH is not selected, to fix that, add a dependency on that symbol. This fixes the following build error: drivers/platform/chrome/cros_ec_typec.c:133: undefined reference to `usb_role_switch_put' ld: drivers/platform/chrome/cros_ec_typec.o: in function `cros_typec_get_switch_handles': drivers/platform/chrome/cros_ec_typec.c:108: undefined reference to `fwnode_usb_role_switch_get' ld: drivers/platform/chrome/cros_ec_typec.c:117: undefined reference to `usb_role_switch_put' Fixes: 7e7def15fa4b ("platform/chrome: cros_ec_typec: Add USB mux control") Reported-by: kernel test robot Acked-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra commit 7999096fa9cfd0253497c8d2ed9a5a1537521d25 Author: Herbert Xu Date: Fri Jun 12 16:57:37 2020 +1000 iov_iter: Move unnecessary inclusion of crypto/hash.h The header file linux/uio.h includes crypto/hash.h which pulls in most of the Crypto API. Since linux/uio.h is used throughout the kernel this means that every tiny bit of change to the Crypto API causes the entire kernel to get rebuilt. This patch fixes this by moving it into lib/iov_iter.c instead where it is actually used. This patch also fixes the ifdef to use CRYPTO_HASH instead of just CRYPTO which does not guarantee the existence of ahash. Unfortunately a number of drivers were relying on linux/uio.h to provide access to linux/slab.h. This patch adds inclusions of linux/slab.h as detected by build failures. Also skbuff.h was relying on this to provide a declaration for ahash_request. This patch adds a forward declaration instead. Signed-off-by: Herbert Xu Signed-off-by: Al Viro commit e0f1a30cf184821499eeb67daedd7a3f21bbcb0b Author: Cristian Marussi Date: Fri Jun 19 23:03:30 2020 +0100 firmware: arm_scmi: Fix SCMI genpd domain probing When, at probe time, an SCMI communication failure inhibits the capacity to query power domains states, such domains should be skipped. Registering partially initialized SCMI power domains with genpd will causes kernel panic. arm-scmi timed out in resp(caller: scmi_power_state_get+0xa4/0xd0) scmi-power-domain scmi_dev.2: failed to get state for domain 9 Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 Mem abort info: ESR = 0x96000006 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 Data abort info: ISV = 0, ISS = 0x00000006 CM = 0, WnR = 0 user pgtable: 4k pages, 48-bit VAs, pgdp=00000009f3691000 [0000000000000000] pgd=00000009f1ca0003, p4d=00000009f1ca0003, pud=00000009f35ea003, pmd=0000000000000000 Internal error: Oops: 96000006 [#1] PREEMPT SMP CPU: 2 PID: 381 Comm: bash Not tainted 5.8.0-rc1-00011-gebd118c2cca8 #2 Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Jan 3 2020 Internal error: Oops: 96000006 [#1] PREEMPT SMP pstate: 80000005 (Nzcv daif -PAN -UAO BTYPE=--) pc : of_genpd_add_provider_onecell+0x98/0x1f8 lr : of_genpd_add_provider_onecell+0x48/0x1f8 Call trace: of_genpd_add_provider_onecell+0x98/0x1f8 scmi_pm_domain_probe+0x174/0x1e8 scmi_dev_probe+0x90/0xe0 really_probe+0xe4/0x448 driver_probe_device+0xfc/0x168 device_driver_attach+0x7c/0x88 bind_store+0xe8/0x128 drv_attr_store+0x2c/0x40 sysfs_kf_write+0x4c/0x60 kernfs_fop_write+0x114/0x230 __vfs_write+0x24/0x50 vfs_write+0xbc/0x1e0 ksys_write+0x70/0xf8 __arm64_sys_write+0x24/0x30 el0_svc_common.constprop.3+0x94/0x160 do_el0_svc+0x2c/0x98 el0_sync_handler+0x148/0x1a8 el0_sync+0x158/0x180 Do not register any power domain that failed to be queried with genpd. Fixes: 898216c97ed2 ("firmware: arm_scmi: add device power domain support using genpd") Link: https://lore.kernel.org/r/20200619220330.12217-1-cristian.marussi@arm.com Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit d76428237784f703da821a5c1162b79d38acfd45 Author: Sudeep Holla Date: Thu Jun 25 11:19:37 2020 +0100 firmware: arm_scmi: Use HAVE_ARM_SMCCC_DISCOVERY instead of ARM_PSCI_FW Commit e5bfb21d98b6 ("firmware: smccc: Add HAVE_ARM_SMCCC_DISCOVERY to identify SMCCC v1.1 and above") introduced new config option to identify the availability of SMCCC discoverability of version and features transparently hiding the indirect dependency on ARM_PSCI_FW. Commit 5a897e3ab429 ("firmware: arm_scmi: fix psci dependency") just worked around the build dependency making SCMI SMC/HVC transport depend on ARM_PSCI_FW at the time. Since it really just relies on SMCCC directly and not on ARM_PSCI_FW, let us move to use CONFIG_HAVE_ARM_SMCCC_DISCOVERY instead of CONFIG_ARM_PSCI_FW. Link: https://lore.kernel.org/r/20200625101937.51939-1-sudeep.holla@arm.com Cc: Peng Fan Cc: Arnd Bergmann Signed-off-by: Sudeep Holla commit fb3571276b970cbe7b45ecdc762e92f3f305ad6d Author: Nicola Mazzucato Date: Wed Jun 17 10:43:32 2020 +0100 cpufreq: arm_scmi: Set fast_switch_possible conditionally Currently the fast_switch_possible flag is set unconditionally to true. Based on this, schedutil does not create a thread for frequency switching and would always use the fast switch path. However, if the platform does not support SCMI fast channel, we use polling mode for SCMI message transfer. This may be possible only if there is dedicated channel for DVFS and all operations are in polling mode. Update this by retrieving the fast_switch capability based on the presence of fast channels in SCMI platform firmware. Link: https://lore.kernel.org/r/20200617094332.8391-2-nicola.mazzucato@arm.com Suggested-by: Lukasz Luba Acked-by: Viresh Kumar Signed-off-by: Nicola Mazzucato Signed-off-by: Sudeep Holla commit 1909872ff20fc378ec6a44ea1a2b2966d834e504 Author: Nicola Mazzucato Date: Wed Jun 17 10:43:31 2020 +0100 firmware: arm_scmi: Add fast_switch_possible() interface Add a new fast_switch_possible interface to the existing perf_ops to export the information of whether or not fast_switch is possible for a given device. This can be used by the cpufreq driver and framework to choose proper mechanism for frequency change. Link: https://lore.kernel.org/r/20200617094332.8391-1-nicola.mazzucato@arm.com Suggested-by: Lukasz Luba Signed-off-by: Nicola Mazzucato Signed-off-by: Sudeep Holla commit bad0d73b657412058c4d7773ff0d50291bfe1905 Author: Sudeep Holla Date: Tue Jun 9 14:45:03 2020 +0100 firmware: arm_scmi: Use signed integer to report transfer status Currently the trace event 'scmi_xfer_end' reports the status of the transfer using the unsigned status field read from the firmware which may not be easy to interpret. It may also miss to emit any timeouts that happen in the driver resulting in emitting garbage in the status field in those scenarios. Let us use signed integer so that error values are emitted out after they are mapped from firmware error formats to standard linux error codes. While at this, also include any timeouts in the driver itself. Link: https://lore.kernel.org/r/20200609134503.55860-1-sudeep.holla@arm.com Cc: Jim Quinlan Cc: Lukasz Luba Reviewed-by: Lukasz Luba Signed-off-by: Sudeep Holla commit 35205ee9ba46dcb2a82dbb981ec5fb242c4d847d Author: Stanislav Lisovskiy Date: Tue Jun 30 05:57:00 2020 +0530 drm/i915: Send hotplug event if edid had changed Added epoch counter checking to intel_encoder_hotplug in order to be able process all the connector changes, besides connection status. Also now any change in connector would result in epoch counter change, so no multiple checks are needed. v2: Renamed change counter to epoch counter. Fixed type name. v3: Fixed rebase conflict v4: Remove duplicate drm_edid_equal checks from hdmi and dp, lets use only once edid property is getting updated and increment epoch counter from there. Also lets now call drm_connector_update_edid_property right after we get edid always to make sure there is a unified way to handle edid change, without having to change tons of source code as currently drm_connector_update_edid_property is called only in certain cases like reprobing and not right after edid is actually updated. v5: Fixed const modifiers, removed blank line v6: Removed drm specific part from this patch, leaving only i915 specific changes here. Signed-off-by: Stanislav Lisovskiy Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200630002700.5451-4-kunal1.joshi@intel.com Acked-by: Jani Nikula commit 5186421cbfe250002308d4d759674214b385752f Author: Stanislav Lisovskiy Date: Tue Jun 30 05:56:59 2020 +0530 drm: Introduce epoch counter to drm_connector This counter will be used by drm_helper_probe_detect caller to determine if anything had changed(including edid, connection status and etc). Hardware specific driver detect hooks are responsible for updating this counter when some change is detected to notify the drm part, which can trigger for example hotplug event. Also now call drm_connector_update_edid_property right after we get edid always to make sure there is a unified way to handle edid change, without having to change tons of source code as currently drm_connector_update_edid_property is called only in certain cases like reprobing and not right after edid is actually updated. v2: Added documentation for the new counter. Rename change_counter to epoch_counter. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105540 Signed-off-by: Stanislav Lisovskiy Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200630002700.5451-3-kunal1.joshi@intel.com commit 536faa450e17f32fddb1a2124e3df71a966122cd Author: Stanislav Lisovskiy Date: Tue Jun 30 05:56:58 2020 +0530 drm: Add helper to compare edids. Many drivers would benefit from using drm helper to compare edid, rather than bothering with own implementation. v2: Added documentation for this function. Signed-off-by: Stanislav Lisovskiy Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20200630002700.5451-2-kunal1.joshi@intel.com commit 607856a835539c465015882328f1e37e95de8ee7 Author: Colin Ian King Date: Tue Jun 16 12:42:21 2020 +0100 drm/i915/display: fix missing null check on allocated dsb object Currently there is no null check for a failed memory allocation on the dsb object and without this a null pointer dereference error can occur. Fix this by adding a null check. Note: added a drm_err message in keeping with the error message style in the function. Addresses-Coverity: ("Dereference null return") Fixes: afeda4f3b1c8 ("drm/i915/dsb: Pre allocate and late cleanup of cmd buffer") Signed-off-by: Colin Ian King Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200616114221.73971-1-colin.king@canonical.com commit ae66eca000cfef3ef0e31842102e17b1b660b1ce Author: Andy Shevchenko Date: Tue Jun 30 12:21:46 2020 +0300 gpiolib: Deduplicate find_first_zero_bit() call bitmap_full() is a shortcut to find_first_zero_bit(). Thus, no need to call it twice. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 557d4bec009330567ce99692918abbe9c77528e0 Author: Jerry Snitselaar Date: Fri Jun 5 00:00:25 2020 -0700 iommu: Add include/uapi/linux/iommu.h to MAINTAINERS file When include/uapi/linux/iommu.h was created it was never added to the file list in MAINTAINERS. Signed-off-by: Jerry Snitselaar Cc: Joerg Roedel Link: https://lore.kernel.org/r/20200605070025.216124-1-jsnitsel@redhat.com Signed-off-by: Joerg Roedel commit ca37faf3d7005b5588f045edfac1d82799c408a7 Author: Marek Szyprowski Date: Tue Jun 30 10:17:56 2020 +0200 iommu: Move sg_table wrapper out of CONFIG_IOMMU_SUPPORT Move the recently added sg_table wrapper out of CONFIG_IOMMU_SUPPORT to let the client code copile also when IOMMU support is disabled. Fixes: 48530d9fab0d ("iommu: add generic helper for mapping sgtable objects") Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200630081756.18526-1-m.szyprowski@samsung.com Signed-off-by: Joerg Roedel commit 86f6da2951db571255ea0b1af7c6115ab870b757 Author: Johan Hovold Date: Tue Jun 30 11:57:56 2020 +0200 USB: serial: ch341: add min and max line-speed macros The line-speed algorithm clamps the requested value to the supported range instead of bailing out on unsupported values. Provide min and max macros and indicate how they are derived instead of hardcoding the limits. Note that the algorithm depends on the minimum rate (45.78 bps) being rounded up (and the maximum rate being rounded down) to avoid special casing. Suggested-by: Michael Hanselmann Link: https://lore.kernel.org/r/20200630095756.GZ3334@localhost Signed-off-by: Johan Hovold commit 6255c8c8d256b38b550b35c6362750f64ce46b8d Author: Joerg Roedel Date: Thu Jun 25 15:08:36 2020 +0200 powerpc/dma: Remove dev->archdata.iommu_domain There are no users left, so remove the pointer and save some memory. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20200625130836.1916-14-joro@8bytes.org commit 5866a75b50b381fa05028e7ff3f2272ed006e321 Author: Joerg Roedel Date: Thu Jun 25 15:08:35 2020 +0200 arm64: Remove dev->archdata.iommu pointer There are no users left, all drivers have been converted to use the per-device private pointer offered by IOMMU core. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200625130836.1916-13-joro@8bytes.org commit fb0fd5f70c1bfc9cdf5406e82d5de0ecdbe1e80c Author: Joerg Roedel Date: Thu Jun 25 15:08:34 2020 +0200 arm: Remove dev->archdata.iommu pointer There are no users left, all drivers have been converted to use the per-device private pointer offered by IOMMU core. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20200625130836.1916-12-joro@8bytes.org commit 0b660afe310855c6eef35f8082594f32e3b05511 Author: Joerg Roedel Date: Thu Jun 25 15:08:33 2020 +0200 ia64: Remove dev->archdata.iommu pointer There are no users left, all drivers have been converted to use the per-device private pointer offered by IOMMU core. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20200625130836.1916-11-joro@8bytes.org commit ad962d864c61a73757085847027a532cbe2c1353 Author: Joerg Roedel Date: Thu Jun 25 15:08:32 2020 +0200 x86: Remove dev->archdata.iommu pointer There are no users left, all drivers have been converted to use the per-device private pointer offered by IOMMU core. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Acked-by: Borislav Petkov Link: https://lore.kernel.org/r/20200625130836.1916-10-joro@8bytes.org commit 589601720d9d0366670eb415a4a62692d7af3713 Author: Joerg Roedel Date: Thu Jun 25 15:08:31 2020 +0200 iommu/mediatek: Do no use dev->archdata.iommu The iommu private pointer is already used in the Mediatek IOMMU v1 driver, so move the dma_iommu_mapping pointer into 'struct mtk_iommu_data' and do not use dev->archdata.iommu anymore. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20200625130836.1916-9-joro@8bytes.org commit 2263d818bceff516254bfce4091632530720505a Author: Joerg Roedel Date: Thu Jun 25 15:08:30 2020 +0200 iommu/pamu: Use dev_iommu_priv_get/set() Remove the use of dev->archdata.iommu_domain and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20200625130836.1916-8-joro@8bytes.org commit a5616e24609a2bb3dc6ea1ab360207fa1198c976 Author: Joerg Roedel Date: Thu Jun 25 15:08:29 2020 +0200 iommu/tegra: Use dev_iommu_priv_get/set() Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20200625130836.1916-7-joro@8bytes.org commit 8b9cc3b71bfda8e7c273b8f0fd80a8860ed077ad Author: Joerg Roedel Date: Thu Jun 25 15:08:28 2020 +0200 iommu/rockchip: Use dev_iommu_priv_get/set() Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20200625130836.1916-6-joro@8bytes.org commit 97ea1202601a7f936c9c9a86f900ec001cb589d3 Author: Joerg Roedel Date: Thu Jun 25 15:08:27 2020 +0200 iommu/omap: Use dev_iommu_priv_get/set() Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20200625130836.1916-5-joro@8bytes.org commit 4bbe0c7ccc431dcf06242860a7900f92800724c0 Author: Joerg Roedel Date: Thu Jun 25 15:08:26 2020 +0200 iommu/msm: Use dev_iommu_priv_get/set() Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Link: https://lore.kernel.org/r/20200625130836.1916-4-joro@8bytes.org commit 01b9d4e21148c89fdbab3d6b3705f9791314b631 Author: Joerg Roedel Date: Thu Jun 25 15:08:25 2020 +0200 iommu/vt-d: Use dev_iommu_priv_get/set() Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Reviewed-by: Lu Baolu Link: https://lore.kernel.org/r/20200625130836.1916-3-joro@8bytes.org commit 0f45b04da18305726c18d4b6169c4083f301d91c Author: Joerg Roedel Date: Thu Jun 25 15:08:24 2020 +0200 iommu/exynos: Use dev_iommu_priv_get/set() Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel Reviewed-by: Jerry Snitselaar Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200625130836.1916-2-joro@8bytes.org commit 70fcd3592b05fde4d95938cd5a20e996b4ef4e15 Author: Joerg Roedel Date: Fri Jun 26 10:05:46 2020 +0200 iommu/amd: Add helper functions to update domain->pt_root Do not call atomic64_set() directly to update the domain page-table root and use two new helper functions. This makes it easier to implement additional work necessary when the page-table is updated. Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20200626080547.24865-2-joro@8bytes.org commit 9a295ff0ffc94e1be60d604fee0cce4fbb3b8964 Author: Paul Menzel Date: Wed Jun 17 00:04:20 2020 +0200 iommu/amd: Print extended features in one line to fix divergent log levels Currently, Linux logs the two messages below. [ 0.979142] pci 0000:00:00.2: AMD-Vi: Extended features (0xf77ef22294ada): [ 0.979546] PPR NX GT IA GA PC GA_vAPIC The log level of these lines differs though. The first one has level *info*, while the second has level *warn*, which is confusing. $ dmesg -T --level=info | grep "Extended features" [Tue Jun 16 21:46:58 2020] pci 0000:00:00.2: AMD-Vi: Extended features (0xf77ef22294ada): $ dmesg -T --level=warn | grep "PPR" [Tue Jun 16 21:46:58 2020] PPR NX GT IA GA PC GA_vAPIC The problem is, that commit 3928aa3f57 ("iommu/amd: Detect and enable guest vAPIC support") introduced a newline, causing `pr_cont()`, used to print the features, to default back to the default log level. /** * pr_cont - Continues a previous log message in the same line. * @fmt: format string * @...: arguments for the format string * * This macro expands to a printk with KERN_CONT loglevel. It should only be * used when continuing a log message with no newline ('\n') enclosed. Otherwise * it defaults back to KERN_DEFAULT loglevel. */ #define pr_cont(fmt, ...) \ printk(KERN_CONT fmt, ##__VA_ARGS__) So, remove the line break, so only one line is logged. Fixes: 3928aa3f57 ("iommu/amd: Detect and enable guest vAPIC support") Signed-off-by: Paul Menzel Reviewed-by: Suravee Suthikulpanit Cc: Suravee Suthikulpanit Cc: iommu@lists.linux-foundation.org Link: https://lore.kernel.org/r/20200616220420.19466-1-pmenzel@molgen.mpg.de Signed-off-by: Joerg Roedel commit 970471914c67b70df24def6b2a30cc42acbebded Author: Jean-Philippe Brucker Date: Tue Jun 16 16:47:14 2020 +0200 iommu: Allow page responses without PASID Some PCIe devices do not expect a PASID value in PRI Page Responses. If the "PRG Response PASID Required" bit in the PRI capability is zero, then the OS should not set the PASID field. Similarly on Arm SMMU, responses to stall events do not have a PASID. Currently iommu_page_response() systematically checks that the PASID in the page response corresponds to the one in the page request. This can't work with virtualization because a page response coming from a guest OS won't have a PASID if the passed-through device does not require one. Add a flag to page requests that declares whether the corresponding response needs to have a PASID. When this flag isn't set, allow page responses without PASID. Reported-by: Shameerali Kolothum Thodi Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20200616144712.748818-1-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit aaa3cbbac326c95308e315f1ab964a3369c4d07d Author: Qiushi Wu Date: Fri May 22 22:16:08 2020 -0500 platform/chrome: cros_ec_ishtp: Fix a double-unlock issue In function cros_ec_ishtp_probe(), "up_write" is already called before function "cros_ec_dev_init". But "up_write" will be called again after the calling of the function "cros_ec_dev_init" failed. Thus add a call of the function “down_write” in this if branch for the completion of the exception handling. Fixes: 26a14267aff2 ("platform/chrome: Add ChromeOS EC ISHTP driver") Signed-off-by: Qiushi Wu Tested-by: Mathew King Signed-off-by: Enric Balletbo i Serra commit 9a876ba58d1e660e7957dd7afd1129b615eb1e04 Author: Enric Balletbo i Serra Date: Thu Jun 25 19:03:00 2020 +0200 platform/chrome: cros_ec_rpmsg: Document missing struct parameters Kerneldoc expects all kernel structure member to be documented. Fixes the following W=1 level warnings: cros_ec_rpmsg.c:49: warning: Function parameter or member 'ept' not described in 'cros_ec_rpmsg' cros_ec_rpmsg.c:49: warning: Function parameter or member 'has_pending_host_event' not described in 'cros_ec_rpmsg' cros_ec_rpmsg.c:49: warning: Function parameter or member 'probe_done' not described in 'cros_ec_rpmsg' Signed-off-by: Enric Balletbo i Serra Reviewed-by: Gwendal Grignou commit 3c5ca501b46b91e68b935b4bd752a0aba5232208 Author: Enric Balletbo i Serra Date: Thu Jun 25 19:02:41 2020 +0200 platform/chrome: cros_ec_spi: Document missing function parameters Kerneldoc expects all kernel function members to be documented. Fixes the following W=1 level warnings: cros_ec_spi.c:153: warning: Function parameter or member 'ec_dev' not described in 'receive_n_bytes' cros_ec_spi.c:153: warning: Function parameter or member 'buf' not described in 'receive_n_bytes' cros_ec_spi.c:153: warning: Function parameter or member 'n' not described in 'receive_n_bytes' Signed-off-by: Enric Balletbo i Serra Reviewed-by: Gwendal Grignou commit 17fe16181639801bfeba647a1e452a75efe651b4 Author: Yoshihiro Shimoda Date: Thu Jun 11 20:10:30 2020 +0900 iommu/renesas: Add support for r8a77961 Add support for r8a77961 (R-Car M3-W+). Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1591873830-10128-3-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Joerg Roedel commit 215c224f4dfa89f1d97500f419092c0110da3c2e Author: Yoshihiro Shimoda Date: Thu Jun 11 20:10:29 2020 +0900 dt-bindings: iommu: renesas,ipmmu-vmsa: add r8a77961 support Add support for r8a77961 (R-Car M3-W+). Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/1591873830-10128-2-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Joerg Roedel commit e725a00a8f2e1ae866c29f956d637a889f561882 Author: Joe Perches Date: Sat Jun 6 12:16:17 2020 -0700 iommu/qcom: Change CONFIG_BIG_ENDIAN to CONFIG_CPU_BIG_ENDIAN CONFIG_BIG_ENDIAN does not exist as a Kconfig symbol. Signed-off-by: Joe Perches Reviewed-by: Rob Clark Link: https://lore.kernel.org/r/5a663096b489b86472fe3bfbd5138c411d669bad.camel@perches.com Signed-off-by: Joerg Roedel commit 77346a704c913268a2dad68d59523fd85dc74088 Merge: 5bc1cf1466f63 9ebcfadb06103 Author: Joerg Roedel Date: Tue Jun 30 11:32:02 2020 +0200 Merge tag 'v5.8-rc3' into arm/qcom Linux 5.8-rc3 commit f02a03985d06c5a39605a0b8a6206af0f9ec7b03 Author: Tony Lindgren Date: Mon Jun 29 09:41:14 2020 -0700 gpio: omap: Add missing PM ops for suspend We've had the legacy platform code take care of suspend for us but this no longer is the case when probed without legacy mode with ti-sysc. We need to configure PM ops like standard Linux device drivers do. As we still have some SoCs booting also the legacy mode, we need to add omap_gpio_suspend() and omap_gpio_resume(), and check for the is_suspended flag to avoid legacy _od_suspend_noirq() calling them on an already suspended GPIO instance. Once we have no SoCs booting in legacy mode, we can just switch to using the standard PM ops with pm_runtime_force_suspend() and pm_runtime_force_resume(). Signed-off-by: Tony Lindgren Signed-off-by: Bartosz Golaszewski commit f5e383ac8b58f421ac0a005f6df4f2e9eefeb93f Author: Denis Efremov Date: Thu Jun 4 15:37:09 2020 +0300 iommu/pamu: Use kzfree() in fsl_pamu_probe() Use kzfree() instead of opencoded memset with 0 followed by kfree(). Null check is not required since kzfree() checks for NULL internally. Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20200604123709.96561-1-efremov@linux.com Signed-off-by: Joerg Roedel commit d3e3d2be688b4b5864538de61e750721a311e4fc Author: Robin Murphy Date: Tue Jun 2 14:08:18 2020 +0100 iommu/iova: Don't BUG on invalid PFNs Unlike the other instances which represent a complete loss of consistency within the rcache mechanism itself, or a fundamental and obvious misconfiguration by an IOMMU driver, the BUG_ON() in iova_magazine_free_pfns() can be provoked at more or less any time in a "spooky action-at-a-distance" manner by any old device driver passing nonsense to dma_unmap_*() which then propagates through to queue_iova(). Not only is this well outside the IOVA layer's control, it's also nowhere near fatal enough to justify panicking anyway - all that really achieves is to make debugging the offending driver more difficult. Let's simply WARN and otherwise ignore bogus PFNs. Reported-by: Prakash Gupta Signed-off-by: Robin Murphy Reviewed-by: Prakash Gupta Link: https://lore.kernel.org/r/acbd2d092b42738a03a21b417ce64e27f8c91c86.1591103298.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 0e2feab51b38fbcd40427254d7e599832e73b797 Author: Colin Ian King Date: Tue Jun 16 09:21:29 2020 +0100 drm/i915: fix a couple of spelling mistakes in kernel parameter help text There are a couple of spelling mistakes in kernel parameter help text, namely "helpfull" and "paramters". Fix them. Signed-off-by: Colin Ian King Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200616082129.65517-1-colin.king@canonical.com commit b08239b2f47190981309c29149e31f111f699aab Author: Oliver Barta Date: Mon May 4 14:35:24 2020 +0200 drm/i915: HDCP: retry link integrity check on failure A single Ri mismatch doesn't automatically mean that the link integrity is broken. Update and check of Ri and Ri' are done asynchronously. In case an update happens just between the read of Ri' and the check against Ri there will be a mismatch even if the link integrity is fine otherwise. Signed-off-by: Oliver Barta Reviewed-by: Sean Paul Reviewed-by: Ramalingam C Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200504123524.7731-1-oliver.barta@aptiv.com commit e9d636ab77ea2d1beeaf2bbb881331318ea5a6eb Author: Maxime Ripard Date: Fri Jun 26 14:11:31 2020 +0200 dt-bindings: display: vc4: dpi: Fix panel warning The example used in the DPI binding before the conversion to YAML had a simple-panel example that got carried over to the YAML binding. However, that example doesn't match the simple-panel binding and results in validation errors. Since it's only marginally helpful, let's remove that part of the example entirely. Fixes: 094536003e06 ("dt-bindings: display: Convert VC4 bindings to schemas") Signed-off-by: Maxime Ripard Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200626121131.127192-1-maxime@cerno.tech commit f375a038daf655933dae0c54542a071388c02880 Author: Matti Vaittinen Date: Thu Jun 18 10:33:31 2020 +0300 MAINTAINERS: Add entry for ROHM Power Management ICs Add entry for maintaining power management IC drivers for ROHM BD71837, BD71847, BD71850, BD71828, BD71878, BD70528 and BD99954. Signed-off-by: Matti Vaittinen Acked-by: Sebastian Reichel Acked-by: Guenter Roeck Acked-by: Stephen Boyd Reviewed-by: Linus Walleij Signed-off-by: Lee Jones commit bb7fcad48d3804d814b97c785514e2d1657e157f Author: Andy Shevchenko Date: Thu Jun 25 16:10:36 2020 +0300 mfd: intel-lpss: Add Intel Tiger Lake PCH-H PCI IDs Intel Tiger Lake PCH-H has the same LPSS than Intel Broxton. Add the new IDs to the list of supported devices. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 1a6922ee0fbbc565dcc231e83bae0eeac5b379db Author: Laurent Pinchart Date: Fri May 15 00:42:11 2020 +0300 dt-bindings: display: bridge: renesas,lvds: Convert binding to YAML Convert the Renesas R-Car LVDS encoder text binding to YAML. Signed-off-by: Laurent Pinchart Acked-by: Maxime Ripard Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200514214211.9036-1-laurent.pinchart+renesas@ideasonboard.com commit 86bc917d2ac117ec922dbf8ed92ca989bf333281 Author: Michael Ellerman Date: Tue Jun 23 23:03:20 2020 +1000 powerpc/boot/dts: Fix dtc "pciex" warnings With CONFIG_OF_ALL_DTBS=y, as set by eg. allmodconfig, we see lots of warnings about our dts files, such as: arch/powerpc/boot/dts/glacier.dts:492.26-532.5: Warning (pci_bridge): /plb/pciex@d00000000: node name is not "pci" or "pcie" The node name should not particularly matter, it's just a name, and AFAICS there's no kernel code that cares whether nodes are *named* "pciex" or "pcie". So shutup these warnings by converting to the name dtc wants. As always there's some risk this could break something obscure that does rely on the name, in which case we can revert. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200623130320.405852-1-mpe@ellerman.id.au commit df4232d96e724d09e54a623362f9f610727f059f Author: Nathan Chancellor Date: Tue Jun 23 20:59:20 2020 -0700 powerpc/boot: Use address-of operator on section symbols Clang warns: arch/powerpc/boot/main.c:107:18: warning: array comparison always evaluates to a constant [-Wtautological-compare] if (_initrd_end > _initrd_start) { ^ arch/powerpc/boot/main.c:155:20: warning: array comparison always evaluates to a constant [-Wtautological-compare] if (_esm_blob_end <= _esm_blob_start) ^ 2 warnings generated. These are not true arrays, they are linker defined symbols, which are just addresses. Using the address of operator silences the warning and does not change the resulting assembly with either clang/ld.lld or gcc/ld (tested with diff + objdump -Dr). Reported-by: Joel Stanley Signed-off-by: Nathan Chancellor Tested-by: Geoff Levand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200624035920.835571-1-natechancellor@gmail.com commit 1addb6444791f9e87fce0eb9882ec96a4a76e615 Author: Sandipan Das Date: Thu Jun 4 18:26:10 2020 +0530 selftests/powerpc: Add test for execute-disabled pkeys Apart from read and write access, memory protection keys can also be used for restricting execute permission of pages on powerpc. This adds a test to verify if the feature works as expected. Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200604125610.649668-4-sandipan@linux.ibm.com commit c405b738daf9d8e8a5aedfeb6be851681e65e54b Author: Sandipan Das Date: Thu Jun 4 18:26:09 2020 +0530 selftests/powerpc: Move Hash MMU check to utilities This moves a function to test if the MMU is in Hash mode under the generic test utilities. Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200604125610.649668-3-sandipan@linux.ibm.com commit 828ca4320d130bbe1d12866152600c49ff6a9f79 Author: Sandipan Das Date: Thu Jun 4 18:26:08 2020 +0530 selftests/powerpc: Fix pkey access right updates The Power ISA mandates that all writes to the Authority Mask Register (AMR) must always be preceded as well as succeeded by a context synchronizing instruction. This makes sure that the tests follow this requirement when attempting to update a pkey's access rights. Signed-off-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200604125610.649668-2-sandipan@linux.ibm.com commit f75020fcb97a54c0d2ade1f4918db82f44d225ad Merge: 0a19b068acc47 41752663b410c Author: Dave Airlie Date: Tue Jun 30 14:03:38 2020 +1000 Merge tag 'drm-misc-next-2020-06-26' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.9: Cross-subsystem Changes: - Improve dma-buf docs. Core Changes: - Add NV15, Q410, Q401 yuv formats. - Add uncompressed AFBC modifier. - Add DP helepr for reading Ignore MSA from DPCD. - Add missing panel type for some panels - Optimize drm/mm hole handling. - Constify connector to infoframe functions. - Add debugfs for VRR monitor range. Driver Changes: - Assorted small bugfixes in panfrost, malidp, panel/otm8009a. - Convert tfp410 dt bindings to yaml, and rework time calculations. - Add support for a few more simple panels. - Cleanups and optimizations for ast. - Allow adv7511 and simple-bridge to be used without connector creation. - Cleanups to dw-hdmi function prototypes. - Remove enabled bool from tiny/repaper and mipi-dbi, atomic handles it. - Remove unused header file from dw-mipi-dsi - Begin removing ttm_bo->offset. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/b1e53620-7937-895c-bfcf-ed208be59c7c@linux.intel.com commit 5a0c256d96f020e4771f6fd5524b80f89a2d3132 Author: Bodo Stroesser Date: Mon Jun 29 11:37:56 2020 +0200 scsi: target: tcmu: Fix crash on ARM during cmd completion If tcmu_handle_completions() has to process a padding shorter than sizeof(struct tcmu_cmd_entry), the current call to tcmu_flush_dcache_range() with sizeof(struct tcmu_cmd_entry) as length param is wrong and causes crashes on e.g. ARM, because tcmu_flush_dcache_range() in this case calls flush_dcache_page(vmalloc_to_page(start)); with start being an invalid address above the end of the vmalloc'ed area. The fix is to use the minimum of remaining ring space and sizeof(struct tcmu_cmd_entry) as the length param. The patch was tested on kernel 4.19.118. See https://bugzilla.kernel.org/show_bug.cgi?id=208045#c10 Link: https://lore.kernel.org/r/20200629093756.8947-1-bstroesser@ts.fujitsu.com Tested-by: JiangYu Acked-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit b7a80dac0f1f16ca5714b89ace8a3fc079686875 Author: Dan Carpenter Date: Fri Jun 26 13:51:33 2020 +0300 scsi: ufs: ufs-exynos: Remove an unnecessary NULL check The "head" pointer can't be NULL because it points to an address in the middle of a ufs_hba struct. Looking at this code, probably someone would wonder if the intent was to check whether "hba" is NULL, but "hba" isn't NULL and the check can just be removed. Link: https://lore.kernel.org/r/20200626105133.GF314359@mwanda Acked-by: Alim Akhtar Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit f637471d33a7a786c455877361e70e0b2da3c56a Author: Sasha Neftin Date: Wed Jun 17 15:01:31 2020 +0300 igc: Remove checking media type during MAC initialization i225 device support only copper mode. There is no point to check media type in the igc_config_fc_after_link_up() method. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 2b374e373807a7c3ce071de1a011acbfa94cf0d7 Author: Sasha Neftin Date: Wed Jun 10 15:43:08 2020 +0300 igc: Remove unneeded check for copper media type PHY of the i225 device support only copper mode. There is no point to check media type in the igc_power_up_link() method. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit a0beb3c1b1acbe80a851a9892f72094ea27504be Author: Sasha Neftin Date: Mon Jun 8 18:49:39 2020 +0300 igc: Refactor the igc_power_down_link() Currently the implementation of igc_power_down_link() method was just calling igc_power_down_phy_copper_base() method. We can just call igc_power_down_phy_copper_base() method directly. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 725fa16d3622a3e9e21f37a4b79ce866afca5ef0 Author: Sasha Neftin Date: Sun Jun 7 11:51:27 2020 +0300 igc: Remove TCP segmentation TX fail counter TCP segmentation TX context fail counter is not applicable for i225 devices. This patch comes to clean up this counter. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 900d1e8b346b6f3f33718f5db8d3ee8b192860ba Author: Sasha Neftin Date: Thu Jun 4 14:25:16 2020 +0300 igc: Add LPI counters Add EEE TX LPI and EEE RX LPI counters. A EEE TX LPI event occurs when the transmitter enters EEE (IEEE 802.3az) LPI state. A EEE RX LPI event occurs when the receiver detect link partner entry into EEE(IEEE 802.3az) LPI state. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 1cbedabffdb1737fc40136de9b72e4c69c3e29ce Author: Andre Guedes Date: Wed Jun 3 17:01:05 2020 -0700 igc: Fix Rx timestamp disabling When Rx timestamping is enabled, we set the timestamp bit in SRRCTL register for each queue, but we don't clear it when disabling. This patch fixes igc_ptp_disable_rx_timestamp() accordingly. Also, this patch gets rid of igc_ptp_enable_tstamp_rxqueue() and igc_ptp_enable_tstamp_all_rxqueues() and move their logic into igc_ptp_enable_rx_timestamp() to keep the enable and disable helpers symmetric. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 3df7fd799b1d70a7d3afeee12784f208b47e97a7 Author: Andre Guedes Date: Wed Jun 3 17:01:04 2020 -0700 igc: Refactor igc_ptp_set_timestamp_mode() Current igc_ptp_set_timestamp_mode() logic is a bit tangled since it handles many different hardware configurations in one single place, making it harder to follow. This patch untangles that code by breaking it into helper functions. Quick note about the hw->mac.type check which was removed in this refactoring: this check it not really needed since igc_i225 is the only type supported by the IGC driver. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 3b44d4c10c798d7d20c46e5364959558b6b2f73b Author: Andre Guedes Date: Wed Jun 3 17:01:03 2020 -0700 igc: Remove UDP filter setup in PTP code As implemented in igc_ethtool_get_ts_info(), igc only supports HWTSTAMP_ FILTER_ALL so any HWTSTAMP_FILTER_* option the user may set falls back to HWTSTAMP_FILTER_ALL. HWTSTAMP_FILTER_ALL is implemented via Rx Time Sync Control (TSYNCRXCTL) configuration which timestamps all incoming packets. Configuring a UDP filter, in addition to TSYNCRXCTL, doesn't add much so this patch removes that code. It also takes this opportunity to remove some non-applicable comments. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 1801f8d9292fdbcf8b0fc6d6455eb05d508845a3 Author: Andre Guedes Date: Wed Jun 3 17:01:02 2020 -0700 igc: Check __IGC_PTP_TX_IN_PROGRESS instead of ptp_tx_skb The __IGC_PTP_TX_IN_PROGRESS flag indicates we have a pending Tx timestamp. In some places, instead of checking that flag, we check adapter->ptp_tx_skb. This patch fixes those places to use the flag. Quick note about igc_ptp_tx_hwtstamp() change: when that function is called, adapter->ptp_tx_skb is expected to be valid always so we WARN_ON_ONCE() in case it is not. Quick note about igc_ptp_suspend() change: when suspending, we don't really need to check if there is a pending timestamp. We can simply clear it unconditionally. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 29b821fe976910bed20e375f9f3a77454dfcf9bc Author: Andre Guedes Date: Wed Jun 3 17:01:01 2020 -0700 igc: Remove duplicate code in Tx timestamp handling The functions igc_ptp_tx_hang() and igc_ptp_tx_work() have duplicate code which handles Tx timestamp timeouts. This patch does a trivial refactoring by moving that code to its own function and reusing it. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 3a66abe903e54b83099df70d1ecc67cab02d8241 Author: Andre Guedes Date: Wed Jun 3 17:01:00 2020 -0700 igc: Clean up Rx timestamping logic Differently from I210, I225 doesn't report Rx timestamps via the TS bit Rx descriptor + RXSTMPL/RXSTMPH registers mechanism. Rx timestamps are reported in the packet buffer only, which is implemented by igc_ptp_rx_ pktstamp(). So this patch removes igc_ptp_rx_rgtstamp() and all code related to it, copied from igb driver. Signed-off-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 707abf0695481ad19b0b74af65f30c71123d6154 Author: Sasha Neftin Date: Tue Jun 2 10:50:47 2020 +0300 igc: Add initial LTR support The LTR message on the PCIe inform the requested latency on which the PCIe must become active to the downstream PCIe port of the system. This patch provide recommended LTR parameters by i225 specification. Signed-off-by: Sasha Neftin Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 2dac017dbd7c59928666a302ae3c51413dafd9a7 Merge: 5fb62372a0207 7d10bcce98cd4 Author: David S. Miller Date: Mon Jun 29 17:45:02 2020 -0700 Merge branch 'Add-ethtool-extended-link-state' Ido Schimmel says: ==================== Add ethtool extended link state Amit says: Currently, device drivers can only indicate to user space if the network link is up or down, without additional information. This patch set provides an infrastructure that allows these drivers to expose more information to user space about the link state. The information can save users' time when trying to understand why a link is not operationally up, for example. The above is achieved by extending the existing ethtool LINKSTATE_GET command with attributes that carry the extended state. For example, no link due to missing cable: $ ethtool ethX ... Link detected: no (No cable) Beside the general extended state, drivers can pass additional information about the link state using the sub-state field. For example: $ ethtool ethX ... Link detected: no (Autoneg, No partner detected) In the future the infrastructure can be extended - for example - to allow PHY drivers to report whether a downshift to a lower speed occurred. Something like: $ ethtool ethX ... Link detected: yes (downshifted) Patch set overview: Patches #1-#3 move mlxsw ethtool code to a separate file Patches #4-#5 add the ethtool infrastructure for extended link state Patches #6-#7 add support of extended link state in the mlxsw driver Patches #8-#10 add test cases Changes since v1: * In documentation, show ETHTOOL_LINK_EXT_STATE_* and ETHTOOL_LINK_EXT_SUBSTATE_* constants instead of user-space strings * Add `_CI_` to cable_issue substates to be consistent with other substates * Keep the commit messages within 75 columns * Use u8 variable for __link_ext_substate * Document the meaning of -ENODATA in get_link_ext_state() callback description * Do not zero data->link_ext_state_provided after getting an error * Use `ret` variable for error value Changes since RFC: * Move documentation patch before ethtool patch * Add nla_total_size() instead of sizeof() directly * Return an error code from linkstate_get_ext_state() * Remove SHORTED_CABLE, add CABLE_TEST_FAILURE instead * Check if the interface is administratively up before setting ext_state * Document all sub-states ==================== Signed-off-by: David S. Miller commit 7d10bcce98cd44ea7c040380397114e0ac94422f Author: Amit Cohen Date: Mon Jun 29 23:46:21 2020 +0300 selftests: forwarding: Add tests for ethtool extended state Add tests to check ethtool report about extended state. The tests configure several states and verify that the correct extended state is reported by ethtool. Check extended state with substate (Autoneg) and extended state without substate (No cable). Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Florian Fainelli Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0433045c27bf9ae71e1c0300c278582407dd0e0b Author: Amit Cohen Date: Mon Jun 29 23:46:20 2020 +0300 selftests: forwarding: forwarding.config.sample: Add port with no cable connected Add NETIF_NO_CABLE port to tests topology. The port can also be declared as an environment variable and tests can be run like that: NETIF_NO_CABLE=eth9 ./test.sh eth{1..8} The NETIF_NO_CABLE port will be used by ethtool_extended_state test. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Florian Fainelli Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit dd9e67ff8086adeaf257a17eee9ee73dcb2c1c13 Author: Amit Cohen Date: Mon Jun 29 23:46:19 2020 +0300 selftests: forwarding: ethtool: Move different_speeds_get() to ethtool_lib Currently different_speeds_get() is used only by ethtool.sh tests. The function can be useful for another tests that check ethtool configurations. Move the function to ethtool_lib in order to allow other tests to use it. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Florian Fainelli Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 60f30cd6c24afc66c3e227af1363a40c07ff0307 Author: Amit Cohen Date: Mon Jun 29 23:46:18 2020 +0300 mlxsw: spectrum_ethtool: Add link extended state Implement .get_down_ext_state() as part of ethtool_ops. Query link down reason from PDDR register and convert it to ethtool link_ext_state. In case that more information than common link_ext_state is provided, fill link_ext_substate also with the appropriate value. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 1bd06938dfccd87420178e7b3ea7bd13b9e11994 Author: Amit Cohen Date: Mon Jun 29 23:46:17 2020 +0300 mlxsw: reg: Port Diagnostics Database Register The PDDR register enables to read the Phy debug database. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ecc31c60240b9808a274befc5db6b8a249a6ade1 Author: Amit Cohen Date: Mon Jun 29 23:46:16 2020 +0300 ethtool: Add link extended state Currently, drivers can only tell whether the link is up/down using LINKSTATE_GET, but no additional information is given. Add attributes to LINKSTATE_GET command in order to allow drivers to expose the user more information in addition to link state to ease the debug process, for example, reason for link down state. Extended state consists of two attributes - link_ext_state and link_ext_substate. The idea is to avoid 'vendor specific' states in order to prevent drivers to use specific link_ext_state that can be in the future common link_ext_state. The substates allows drivers to add more information to the common link_ext_state. For example, vendor can expose 'Autoneg' as link_ext_state and add 'No partner detected during force mode' as link_ext_substate. If a driver cannot pinpoint the extended state with the substate accuracy, it is free to expose only the extended state and omit the substate attribute. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit e120c801b8c93bd9bd5d2a61f43f1a45a9ce4f23 Author: Amit Cohen Date: Mon Jun 29 23:46:15 2020 +0300 Documentation: networking: ethtool-netlink: Add link extended state Add link extended state attributes. Signed-off-by: Amit Cohen Reviewed-by: Jiri Pirko Reviewed-by: Jacob Keller Reviewed-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2be5c8a963192ecfa6c00acd687fc00e4d3b5296 Author: Amit Cohen Date: Mon Jun 29 23:46:14 2020 +0300 mlxsw: spectrum_ethtool: Move mlxsw_sp_port_type_speed_ops structs Move mlxsw_sp1_port_type_speed_ops and mlxsw_sp2_port_type_speed_ops with the relevant code from spectrum.c to spectrum_ethtool.c. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Reviewed-by: Florian Fainelli Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 614d509aa1e7854381465e9645aa5ee565a6c890 Author: Amit Cohen Date: Mon Jun 29 23:46:13 2020 +0300 mlxsw: Move ethtool_ops to spectrum_ethtool.c Add spectrum_ethtool.c file for ethtool code. Move ethtool_ops and the relevant code from spectrum.c to spectrum_ethtool.c. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Reviewed-by: Florian Fainelli Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a2af44b64c8a60f9aba90e72b1ff872ab6a6dd6b Author: Amit Cohen Date: Mon Jun 29 23:46:12 2020 +0300 mlxsw: spectrum_dcb: Rename mlxsw_sp_port_headroom_set() mlxsw_sp_port_headroom_set() is defined twice - in spectrum.c and in spectrum_dcb.c, with different arguments and different implementation but the name is same. Rename mlxsw_sp_port_headroom_set() to mlxsw_sp_port_headroom_ets_set() in order to allow using the second function in several files, and not only as static function in spectrum.c. Signed-off-by: Amit Cohen Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Reviewed-by: Florian Fainelli Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 93ec439abeefe2e205657ae2b98a7fee4fbd4a0b Author: Sasha Neftin Date: Wed May 27 13:51:32 2020 -0700 igc: Add initial EEE support IEEE802.3az-2010 Energy Efficient Ethernet has been approved as standard (September 2010) and the driver can enable and disable it via ethtool. Disable the feature by default on parts which support it. Add enable/disable eee options. tx-lpi, tx-timer and advertise not supported yet. Signed-off-by: Sasha Neftin Reviewed-by: Andre Guedes Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher commit 5fb62372a0207f1514fa6052c51991198c46ffe2 Merge: 17af2c4757c65 4c96c0ac16e04 Author: David S. Miller Date: Mon Jun 29 17:42:48 2020 -0700 Merge branch 'dpaa2-eth-send-a-scatter-gather-FD-instead-of-realloc-ing' Ioana Ciornei says: ==================== dpaa2-eth: send a scatter-gather FD instead of realloc-ing This patch set changes the behaviour in case the Tx path is confroted with an SKB with insufficient headroom for our hardware necessities (SW annotation area). In the first patch, instead of realloc-ing the SKB we now send a S/G frames descriptor while the second one adds a new software held counter to account for for these types of frames. ==================== Signed-off-by: David S. Miller commit 4c96c0ac16e046ad3625d7b7228664ba478541a5 Author: Ioana Ciornei Date: Mon Jun 29 21:47:12 2020 +0300 dpaa2-eth: add software counter for Tx frames converted to S/G With the previous commit, in case of insufficient SKB headroom on the Tx path instead of reallocing the SKB we now send a S/G frame descriptor. Export the number of occurences of this case as a per CPU counter (in debugfs) and a total number in the ethtool statistics - "tx converted sg frames'. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit d70446ee1f406ef4c6dd299a8482dc98ef07ed0e Author: Ioana Ciornei Date: Mon Jun 29 21:47:11 2020 +0300 dpaa2-eth: send a scatter-gather FD instead of realloc-ing Instead of realloc-ing the skb on the Tx path when the provided headroom is smaller than the HW requirements, create a Scatter/Gather frame descriptor with only one entry. Remove the '[drv] tx realloc frames' counter exposed previously through ethtool since it is no longer used. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 17af2c4757c65c2b30c1df0f6fb758c4c2b2d8b8 Merge: 5f035af76e51c 4d9c0a2d64551 Author: David S. Miller Date: Mon Jun 29 17:37:49 2020 -0700 Merge branch 'sfc-prerequisites-for-EF100-driver-part-1' Edward Cree says: ==================== sfc: prerequisites for EF100 driver, part 1 This continues the work started by Alex Maftei in the series "sfc: code refactoring", "sfc: more code refactoring", "sfc: even more code refactoring" and "sfc: refactor mcdi filtering code", to prepare for a new driver which will share much of the code to support the new EF100 family of Solarflare/Xilinx NICs. After this series, there will be approximately two more of these 'prerequisites' series, followed by the sfc_ef100 driver itself. v2: fix reverse xmas tree in patch 5. (Left the cases in patches 7, 9 and 14 alone as those are all in pure movement of existing code.) ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4d9c0a2d64551f33638dd566bb82edb3c3cc782c Author: Edward Cree Date: Mon Jun 29 14:36:56 2020 +0100 sfc: extend common GRO interface to support CHECKSUM_COMPLETE EF100 will use CHECKSUM_COMPLETE, but will also make use of efx_rx_packet_gro(), thus needs to be able to pass the checksum value into that function. Drivers for older NICs pass in a csum of 0 to get the old semantics (use the RX flags for CHECKSUM_UNNECESSARY marking). Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 28abe8251b118116fac85f5169effcede547f26e Author: Edward Cree Date: Mon Jun 29 14:36:33 2020 +0100 sfc: commonise ARFS handling EF100 will use the same approach to ARFS as EF10. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 850b722756d6886b3269e548398934e81a3c7503 Author: Edward Cree Date: Mon Jun 29 14:39:32 2020 +0100 sfc: commonise drain event handling Avoids a call from generic MCDI code into ef10.c. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 21ea21252eddb3cea56845f58f87208062799bef Author: Edward Cree Date: Mon Jun 29 14:35:41 2020 +0100 sfc: commonise PCI error handlers EF100 will use the same mechanisms for PCI error recovery. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 66a65128d4a585aff4baf123d710107cbd31c3a7 Author: Edward Cree Date: Mon Jun 29 14:35:33 2020 +0100 sfc: track which BAR is mapped EF100 needs to map multiple BARs (sequentially, not concurrently) in order to read the Function Control Window during probe. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 53e1f21abd89bde46ed30061c58370b8a079f6f5 Author: Edward Cree Date: Mon Jun 29 14:35:25 2020 +0100 sfc: commonise FC advertising Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 5671dd5565d443185cdc325e8bea0cdd77f3911b Author: Edward Cree Date: Mon Jun 29 14:35:15 2020 +0100 sfc: commonise other ethtool bits A few more ethtool handlers which EF100 will share. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit cdec457b7afe475d1735a5083e68a34f7d766dad Author: Edward Cree Date: Mon Jun 29 14:35:05 2020 +0100 sfc: commonise ethtool NFC and RXFH/RSS functions EF100 will share EF10's model of filtering, hashing and spreading. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit bdccfd2d4ea7a0676045b16e83a1138deff20923 Author: Edward Cree Date: Mon Jun 29 14:34:50 2020 +0100 sfc: commonise ethtool link handling functions Link speeds, FEC, and autonegotiation are all things EF100 will share. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 9043f48fd3e302dd3cee49f911ce0fd1494b479f Author: Edward Cree Date: Mon Jun 29 14:34:39 2020 +0100 sfc: split up nic.h The new nic_common.h contains the inlines for NIC-type function dispatch, declarations for NIC-generic functions in nic.c, and other similar NIC- generic functionality. Retained in nic.h are NIC-specific declarations such as the siena and ef10 nic_data structs and various farch functions. The EF100 driver will thus include nic_common.h but not nic.h. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit d3142c193dca9a2f6878f4128ce1aaf221bb3f99 Author: Edward Cree Date: Mon Jun 29 14:34:20 2020 +0100 sfc: refactor EF10 stats handling Separate the generation-count handling from the format conversion, to make it easier to re-use both for EF100. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit de5f32e2b6301c1f6780b3ae9c2740a5e422e2da Author: Edward Cree Date: Mon Jun 29 14:33:44 2020 +0100 sfc: don't try to create more channels than we can have VIs Calculate efx->max_vis at probe time, and check against it in efx_allocate_msix_channels() when considering whether to create XDP TX channels. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 08f9912ef01e184b6a0512ca062e4f743671dac2 Author: Edward Cree Date: Mon Jun 29 14:33:03 2020 +0100 sfc: extend bitfield macros up to POPULATE_DWORD_13 Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 6d9b5dcd29a50cec8445c66fc8055476f8e2d057 Author: Edward Cree Date: Mon Jun 29 14:32:46 2020 +0100 sfc: determine flag word automatically in efx_has_cap() Now that we have an _OFST definition for each individual flag bit, callers of efx_has_cap() don't need to specify which flag word it's in; we can just use the flag name directly in MCDI_CAPABILITY_OFST. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 0dc95084c30d6323f622f87f7d786f6e69ca118d Author: Edward Cree Date: Mon Jun 29 14:32:31 2020 +0100 sfc: update MCDI protocol headers The script used to generate these now includes _OFST definitions for flags, to identify the containing flag word. Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 5f035af76e51cd622abc6564d5512ffeb9e06917 Author: Po Liu Date: Mon Jun 29 14:54:16 2020 +0800 net:qos: police action offloading parameter 'burst' change to the original value Since 'tcfp_burst' with TICK factor, driver side always need to recover it to the original value, this patch moves the generic calculation and recover to the 'burst' original value before offloading to device driver. Signed-off-by: Po Liu Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit 13f1555c1b4c49b8ab9dd80b7353deec0526ccac Merge: e11703330a5df 8a05661b2b266 Author: David S. Miller Date: Mon Jun 29 17:29:38 2020 -0700 Merge branch 'MPTCP-improve-fallback-to-TCP' Davide Caratti says: ==================== MPTCP: improve fallback to TCP there are situations where MPTCP sockets should fall-back to regular TCP: this series reworks the fallback code to pursue the following goals: 1) cleanup the non fallback code, removing most of 'if ()' in the data path 2) improve performance for non-fallback sockets, avoiding locks in poll() further work will also leverage on this changes to achieve: a) more consistent behavior of gestockopt()/setsockopt() on passive sockets after fallback b) support for "infinite maps" as per RFC8684, section 3.7 the series is made of the following items: - patch 1 lets sendmsg() / recvmsg() / poll() use the main socket also after fallback - patch 2 fixes 'simultaneous connect' scenario after fallback. The problem was present also before the rework, but the fix is much easier to implement after patch 1 - patch 3, 4, 5 are clean-ups for code that is no more needed after the fallback rework - patch 6 fixes a race condition between close() and poll(). The problem was theoretically present before the rework, but it became almost systematic after patch 1 ==================== Signed-off-by: David S. Miller commit 8a05661b2b266b6dc45af255b3037b00ef31d85d Author: Paolo Abeni Date: Mon Jun 29 22:26:25 2020 +0200 mptcp: close poll() races mptcp_poll always return POLLOUT for unblocking connect(), ensure that the socket is a suitable state. The MPTCP_DATA_READY bit is never cleared on accept: ensure we don't leave mptcp_accept() with an empty accept queue and such bit set. Signed-off-by: Paolo Abeni Signed-off-by: Davide Caratti Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 76660afbb7a1ac6bef0be34c4c6e76d7e07b74d7 Author: Paolo Abeni Date: Mon Jun 29 22:26:24 2020 +0200 mptcp: __mptcp_tcp_fallback() returns a struct sock Currently __mptcp_tcp_fallback() always return NULL on incoming connections, because MPTCP does not create the additional socket for the first subflow. Since the previous commit no __mptcp_tcp_fallback() caller needs a struct socket, so let __mptcp_tcp_fallback() return the first subflow sock and cope correctly even with incoming connections. Signed-off-by: Paolo Abeni Signed-off-by: Davide Caratti Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit fa68018dc45e3faee9d866d5dc484d141e8f1093 Author: Paolo Abeni Date: Mon Jun 29 22:26:23 2020 +0200 mptcp: create first subflow at msk creation time This cleans the code a bit and makes the behavior more consistent. Signed-off-by: Paolo Abeni Signed-off-by: Davide Caratti Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit d2f77c53342e3e13ce1fd7f9638ee200026e14f4 Author: Paolo Abeni Date: Mon Jun 29 22:26:22 2020 +0200 mptcp: check for plain TCP sock at accept time This cleanup the code a bit and avoid corrupted states on weird syscall sequence (accept(), connect()). Signed-off-by: Paolo Abeni Signed-off-by: Davide Caratti Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 8fd738049ac3d67a937d36577763b47180aae1ad Author: Davide Caratti Date: Mon Jun 29 22:26:21 2020 +0200 mptcp: fallback in case of simultaneous connect when a MPTCP client tries to connect to itself, tcp_finish_connect() is never reached. Because of this, depending on the socket current state, multiple faulty behaviours can be observed: 1) a WARN_ON() in subflow_data_ready() is hit WARNING: CPU: 2 PID: 882 at net/mptcp/subflow.c:911 subflow_data_ready+0x18b/0x230 [...] CPU: 2 PID: 882 Comm: gh35 Not tainted 5.7.0+ #187 [...] RIP: 0010:subflow_data_ready+0x18b/0x230 [...] Call Trace: tcp_data_queue+0xd2f/0x4250 tcp_rcv_state_process+0xb1c/0x49d3 tcp_v4_do_rcv+0x2bc/0x790 __release_sock+0x153/0x2d0 release_sock+0x4f/0x170 mptcp_shutdown+0x167/0x4e0 __sys_shutdown+0xe6/0x180 __x64_sys_shutdown+0x50/0x70 do_syscall_64+0x9a/0x370 entry_SYSCALL_64_after_hwframe+0x44/0xa9 2) client is stuck forever in mptcp_sendmsg() because the socket is not TCP_ESTABLISHED crash> bt 4847 PID: 4847 TASK: ffff88814b2fb100 CPU: 1 COMMAND: "gh35" #0 [ffff8881376ff680] __schedule at ffffffff97248da4 #1 [ffff8881376ff778] schedule at ffffffff9724a34f #2 [ffff8881376ff7a0] schedule_timeout at ffffffff97252ba0 #3 [ffff8881376ff8a8] wait_woken at ffffffff958ab4ba #4 [ffff8881376ff940] sk_stream_wait_connect at ffffffff96c2d859 #5 [ffff8881376ffa28] mptcp_sendmsg at ffffffff97207fca #6 [ffff8881376ffbc0] sock_sendmsg at ffffffff96be1b5b #7 [ffff8881376ffbe8] sock_write_iter at ffffffff96be1daa #8 [ffff8881376ffce8] new_sync_write at ffffffff95e5cb52 #9 [ffff8881376ffe50] vfs_write at ffffffff95e6547f #10 [ffff8881376ffe90] ksys_write at ffffffff95e65d26 #11 [ffff8881376fff28] do_syscall_64 at ffffffff956088ba #12 [ffff8881376fff50] entry_SYSCALL_64_after_hwframe at ffffffff9740008c RIP: 00007f126f6956ed RSP: 00007ffc2a320278 RFLAGS: 00000217 RAX: ffffffffffffffda RBX: 0000000020000044 RCX: 00007f126f6956ed RDX: 0000000000000004 RSI: 00000000004007b8 RDI: 0000000000000003 RBP: 00007ffc2a3202a0 R8: 0000000000400720 R9: 0000000000400720 R10: 0000000000400720 R11: 0000000000000217 R12: 00000000004004b0 R13: 00007ffc2a320380 R14: 0000000000000000 R15: 0000000000000000 ORIG_RAX: 0000000000000001 CS: 0033 SS: 002b 3) tcpdump captures show that DSS is exchanged even when MP_CAPABLE handshake didn't complete. $ tcpdump -tnnr bad.pcap IP 127.0.0.1.20000 > 127.0.0.1.20000: Flags [S], seq 3208913911, win 65483, options [mss 65495,sackOK,TS val 3291706876 ecr 3291694721,nop,wscale 7,mptcp capable v1], length 0 IP 127.0.0.1.20000 > 127.0.0.1.20000: Flags [S.], seq 3208913911, ack 3208913912, win 65483, options [mss 65495,sackOK,TS val 3291706876 ecr 3291706876,nop,wscale 7,mptcp capable v1], length 0 IP 127.0.0.1.20000 > 127.0.0.1.20000: Flags [.], ack 1, win 512, options [nop,nop,TS val 3291706876 ecr 3291706876], length 0 IP 127.0.0.1.20000 > 127.0.0.1.20000: Flags [F.], seq 1, ack 1, win 512, options [nop,nop,TS val 3291707876 ecr 3291706876,mptcp dss fin seq 0 subseq 0 len 1,nop,nop], length 0 IP 127.0.0.1.20000 > 127.0.0.1.20000: Flags [.], ack 2, win 512, options [nop,nop,TS val 3291707876 ecr 3291707876], length 0 force a fallback to TCP in these cases, and adjust the main socket state to avoid hanging in mptcp_sendmsg(). Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/35 Reported-by: Christoph Paasch Suggested-by: Paolo Abeni Signed-off-by: Davide Caratti Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit e1ff9e82e2ea53d01540692a85c16a77e1089537 Author: Davide Caratti Date: Mon Jun 29 22:26:20 2020 +0200 net: mptcp: improve fallback to TCP Keep using MPTCP sockets and a use "dummy mapping" in case of fallback to regular TCP. When fallback is triggered, skip addition of the MPTCP option on send. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/11 Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/22 Co-developed-by: Paolo Abeni Signed-off-by: Paolo Abeni Signed-off-by: Davide Caratti Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit e11703330a5df48e1fd4167e4d22a102e517253e Author: Baruch Siach Date: Sun Jun 28 10:04:51 2020 +0300 net: phy: marvell10g: support XFI rate matching mode When the hardware MACTYPE hardware configuration pins are set to "XFI with Rate Matching" the PHY interface operate at fixed 10Gbps speed. The MAC buffer packets in both directions to match various wire speeds. Read the MAC Type field in the Port Control register, and set the MAC interface speed accordingly. Signed-off-by: Baruch Siach Signed-off-by: David S. Miller commit 10780291724bc11da5ed9a83be7f755e4ab3c554 Merge: 989d957a8b3e4 a29074367b347 Author: David S. Miller Date: Mon Jun 29 17:18:40 2020 -0700 Merge tag 'mlx5-tls-2020-06-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-tls-2020-06-26 1) Improve hardware layouts and structure for kTLS support 2) Generalize ICOSQ (Internal Channel Operations Send Queue) Due to the asynchronous nature of adding new kTLS flows and handling HW asynchronous kTLS resync requests, the XSK ICOSQ was extended to support generic async operations, such as kTLS add flow and resync, in addition to the existing XSK usages. 3) kTLS hardware flow steering and classification: The driver already has the means to classify TCP ipv4/6 flows to send them to the corresponding RSS HW engine, as reflected in patches 3 through 5, the series will add a steering layer that will hook to the driver's TCP classifiers and will match on well known kTLS connection, in case of a match traffic will be redirected to the kTLS decryption engine, otherwise traffic will continue flowing normally to the TCP RSS engine. 3) kTLS add flow RX HW offload support New offload contexts post their static/progress params WQEs (Work Queue Element) to communicate the newly added kTLS contexts over the per-channel async ICOSQ. The Channel/RQ is selected according to the socket's rxq index. A new TLS-RX workqueue is used to allow asynchronous addition of steering rules, out of the NAPI context. It will be also used in a downstream patch in the resync procedure. Feature is OFF by default. Can be turned on by: $ ethtool -K tls-hw-rx-offload on 4) Added mlx5 kTLS sw stats and new counters are documented in Documentation/networking/tls-offload.rst rx_tls_ctx - number of TLS RX HW offload contexts added to device for decryption. rx_tls_ooo - number of RX packets which were part of a TLS stream but did not arrive in the expected order and triggered the resync procedure. rx_tls_del - number of TLS RX HW offload contexts deleted from device (connection has finished). rx_tls_err - number of RX packets which were part of a TLS stream but were not decrypted due to unexpected error in the state machine. 5) Asynchronous RX resync a. The NIC driver indicates that it would like to resync on some TLS record within the received packet (P), but the driver does not know (yet) which of the TLS records within the packet. At this stage, the NIC driver will query the device to find the exact TCP sequence for resync (tcpsn), however, the driver does not wait for the device to provide the response. b. Eventually, the device responds, and the driver provides the tcpsn within the resync packet to KTLS. Now, KTLS can check the tcpsn against any processed TLS records within packet P, and also against any record that is processed in the future within packet P. The asynchronous resync path simplifies the device driver, as it can save bits on the packet completion (32-bit TCP sequence), and pass this information on an asynchronous command instead. Performance: CPU: Intel(R) Xeon(R) CPU E5-2687W v4 @ 3.00GHz, 24 cores, HT off NIC: ConnectX-6 Dx 100GbE dual port Goodput (app-layer throughput) comparison: +---------------+-------+-------+---------+ | # connections | 1 | 4 | 8 | +---------------+-------+-------+---------+ | SW (Gbps) | 7.26 | 24.70 | 50.30 | +---------------+-------+-------+---------+ | HW (Gbps) | 18.50 | 64.30 | 92.90 | +---------------+-------+-------+---------+ | Speedup | 2.55x | 2.56x | 1.85x * | +---------------+-------+-------+---------+ * After linerate is reached, diff is observed in CPU util ==================== Signed-off-by: David S. Miller commit 989d957a8b3e4442006d9ab68d0215718f57ec56 Merge: 5e701e49b7b40 6cf0291f95172 Author: David S. Miller Date: Mon Jun 29 17:08:28 2020 -0700 Merge branch 'TC-Introduce-qevents' Petr Machata says: ==================== TC: Introduce qevents The Spectrum hardware allows execution of one of several actions as a result of queue management decisions: tail-dropping, early-dropping, marking a packet, or passing a configured latency threshold or buffer size. Such packets can be mirrored, trapped, or sampled. Modeling the action to be taken as simply a TC action is very attractive, but it is not obvious where to put these actions. At least with ECN marking one could imagine a tree of qdiscs and classifiers that effectively accomplishes this task, albeit in an impractically complex manner. But there is just no way to match on dropped-ness of a packet, let alone dropped-ness due to a particular reason. To allow configuring user-defined actions as a result of inner workings of a qdisc, this patch set introduces a concept of qevents. Those are attach points for TC blocks, where filters can be put that are executed as the packet hits well-defined points in the qdisc algorithms. The attached blocks can be shared, in a manner similar to clsact ingress and egress blocks, arbitrary classifiers with arbitrary actions can be put on them, etc. For example: red limit 500K avpkt 1K qevent early_drop block 10 matchall action mirred egress mirror dev eth1 The central patch #2 introduces several helpers to allow easy and uniform addition of qevents to qdiscs: initialization, destruction, qevent block number change validation, and qevent handling, i.e. dispatch of the filters attached to the block bound to a qevent. Patch #1 adds root_lock argument to qdisc enqueue op. The problem this is tackling is that if a qevent filter pushes packets to the same qdisc tree that holds the qevent in the first place, attempt to take qdisc root lock for the second time will lead to a deadlock. To solve the issue, qevent handler needs to unlock and relock the root lock around the filter processing. Passing root_lock around makes it possible to get the lock where it is needed, and visibly so, such that it is obvious the lock will be used when invoking a qevent. The following two patches, #3 and #4, then add two qevents to the RED qdisc: "early_drop" qevent fires when a packet is early-dropped; "mark" qevent, when it is ECN-marked. Patch #5 contains a selftest. I have mentioned this test when pushing the RED ECN nodrop mode and said that "I have no confidence in its portability to [...] different configurations". That still holds. The backlog and packet size are tuned to make the test deterministic. But it is better than nothing, and on the boxes that I ran it on it does work and shows that qevents work the way they are supposed to, and that their addition has not broken the other tested features. This patch set does not deal with offloading. The idea there is that a driver will be able to figure out that a given block is used in qevent context by looking at binder type. A future patch-set will add a qdisc pointer to struct flow_block_offload, which a driver will be able to consult to glean the TC or other relevant attributes. Changes from RFC to v1: - Move a "q = qdisc_priv(sch)" from patch #3 to patch #4 - Fix deadlock caused by mirroring packet back to the same qdisc tree. - Rename "tail" qevent to "tail_drop". - Adapt to the new 100-column standard. - Add a selftest ==================== Signed-off-by: David S. Miller commit 6cf0291f95172db68d8a283854389a1966e43c65 Author: Petr Machata Date: Sat Jun 27 01:45:29 2020 +0300 selftests: forwarding: Add a RED test for SW datapath This test is inspired by the mlxsw RED selftest. It is much simpler to set up (also because there is no point in testing PRIO / RED encapsulation). It tests bare RED, ECN and ECN+nodrop modes of operation. On top of that it tests RED early_drop and mark qevents. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit aee9caa03fc3c8b02f8f31824354d85f30e562e0 Author: Petr Machata Date: Sat Jun 27 01:45:28 2020 +0300 net: sched: sch_red: Add qevents "early_drop" and "mark" In order to allow acting on dropped and/or ECN-marked packets, add two new qevents to the RED qdisc: "early_drop" and "mark". Filters attached at "early_drop" block are executed as packets are early-dropped, those attached at the "mark" block are executed as packets are ECN-marked. Two new attributes are introduced: TCA_RED_EARLY_DROP_BLOCK with the block index for the "early_drop" qevent, and TCA_RED_MARK_BLOCK for the "mark" qevent. Absence of these attributes signifies "don't care": no block is allocated in that case, or the existing blocks are left intact in case of the change callback. For purposes of offloading, blocks attached to these qevents appear with newly-introduced binder types, FLOW_BLOCK_BINDER_TYPE_RED_EARLY_DROP and FLOW_BLOCK_BINDER_TYPE_RED_MARK. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 65545ea24998bb9aab1ce713a67c693dc7a947ec Author: Petr Machata Date: Sat Jun 27 01:45:27 2020 +0300 net: sched: sch_red: Split init and change callbacks In the following patches, RED will get two qevents. The implementation will be clearer if the callback for change is not a pure subset of the callback for init. Split the two and promote attribute parsing to the callbacks themselves from the common code, because it will be handy there. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 3625750f05ecce21a0fce429c1ff85acfffb461b Author: Petr Machata Date: Sat Jun 27 01:45:26 2020 +0300 net: sched: Introduce helpers for qevent blocks Qevents are attach points for TC blocks, where filters can be put that are executed when "interesting events" take place in a qdisc. The data to keep and the functions to invoke to maintain a qevent will be largely the same between qevents. Therefore introduce sched-wide helpers for qevent management. Currently, similarly to ingress and egress blocks of clsact pseudo-qdisc, blocks attachment cannot be changed after the qdisc is created. To that end, add a helper tcf_qevent_validate_change(), which verifies whether block index attribute is not attached, or if it is, whether its value matches the current one (i.e. there is no material change). The function tcf_qevent_handle() should be invoked when qdisc hits the "interesting event" corresponding to a block. This function releases root lock for the duration of executing the attached filters, to allow packets generated through user actions (notably mirred) to be reinserted to the same qdisc tree. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit aebe4426ccaa4838f36ea805cdf7d76503e65117 Author: Petr Machata Date: Sat Jun 27 01:45:25 2020 +0300 net: sched: Pass root lock to Qdisc_ops.enqueue A following patch introduces qevents, points in qdisc algorithm where packet can be processed by user-defined filters. Should this processing lead to a situation where a new packet is to be enqueued on the same port, holding the root lock would lead to deadlocks. To solve the issue, qevent handler needs to unlock and relock the root lock when necessary. To that end, add the root lock argument to the qdisc op enqueue, and propagate throughout. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 5e701e49b7b40166cc56f7b0db205355095cad6b Merge: b8483ecaf72ee 38389aa6ba82b Author: David S. Miller Date: Mon Jun 29 17:06:19 2020 -0700 Merge branch 'net-ethernet-ti-am65-cpsw-update-and-enable-sr2-0-soc' Grygorii Strashko says: ==================== net: ethernet: ti: am65-cpsw: update and enable sr2.0 soc This series contains set of improvements for TI AM654x/J721E CPSW2G driver and adds support for TI AM654x SR2.0 SoC. Patch 1: adds vlans restoration after "if down/up" Patches 2-5: improvments Patch 6: adds support for TI AM654x SR2.0 SoC which allows to disable errata i2027 W/A. By default, errata i2027 W/A (TX csum offload disabled) is enabled on AM654x SoC for backward compatibility, unless SR2.0 SoC is identified using SOC BUS framework. ==================== Signed-off-by: David S. Miller commit 38389aa6ba82b8d598fdb02f8907eca132ec2c1b Author: Grygorii Strashko Date: Fri Jun 26 21:17:09 2020 +0300 net: ethernet: ti: am65-cpsw-nuss: enable am65x sr2.0 support The AM65x SR2.0 MCU CPSW has fixed errata i2027 "CPSW: CPSW Does Not Support CPPI Receive Checksum (Host to Ethernet) Offload Feature". This errata also fixed for J271E SoC. Use SOC bus data for K3 SoC identification and apply i2027 errata w/a only for the AM65x SR1.0 SoC. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 3d0fda901c058844bcd72bc6098c6c86884d1877 Author: Grygorii Strashko Date: Fri Jun 26 21:17:08 2020 +0300 net: ethernet: ti: am65-cpsw-ethtool: configured critical setting only when no running netdevs Ensure that critical setting can only be configured when there are no running netdevs - all ports are down. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 7d58d3ebe445699b610ccc5df432dcef84eb4374 Author: Grygorii Strashko Date: Fri Jun 26 21:17:07 2020 +0300 net: ethernet: ti: am65-cpsw-ethtool: skip hw cfg when change p0-rx-ptype-rrobin Skip HW configuration when p0-rx-ptype-rrobin is changed as it will be done by .ndev_open(), Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit d6d0aeafb3afaca91148691377e021c31760fc6a Author: Grygorii Strashko Date: Fri Jun 26 21:17:06 2020 +0300 net: ethernet: ti: am65-cpsw-nuss: fix ports mac sl initialization The MAC SL has to be initialized for each port otherwise am65_cpsw_nuss_slave_disable_unused() will crash for disabled ports. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 518240480601d8f7f533929e3debe0973e2fad2a Author: Grygorii Strashko Date: Fri Jun 26 21:17:05 2020 +0300 net: ethernet: ti: am65-cpsw: move to pf_p0_rx_ptype_rrobin init in probe The pf_p0_rx_ptype_rrobin is global parameter so move its initialization in probe. Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 7bcffde02152dd3cb180f6f3aef27e8586b2a905 Author: Grygorii Strashko Date: Fri Jun 26 21:17:04 2020 +0300 net: ethernet: ti: am65-cpsw-nuss: restore vlan configuration while down/up The vlan configuration is not restored after interface down/up sequence. Steps to check: # ip link add link eth0 name eth0.100 type vlan id 100 # ifconfig eth0 down # ifconfig eth0 up This patch fixes it, restoring vlan ALE entries on .ndo_open(). Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver") Signed-off-by: Grygorii Strashko Signed-off-by: David S. Miller commit 65d96351b135c2a694814520a6031f3721020ba9 Author: Ethan Edwards Date: Wed Jun 24 12:12:58 2020 -0400 selinux: fixed a checkpatch warning with the sizeof macro `sizeof buf` changed to `sizeof(buf)` Signed-off-by: Ethan Edwards [PM: rewrote the subject line] Signed-off-by: Paul Moore commit 142240398e50e5fe3171bcf2459856603be13a39 Author: Richard Guy Briggs Date: Sat Jun 27 23:24:19 2020 -0400 audit: add gfp parameter to audit_log_nfcfg Fixed an inconsistent use of GFP flags in nft_obj_notify() that used GFP_KERNEL when a GFP flag was passed in to that function. Given this allocated memory was then used in audit_log_nfcfg() it led to an audit of all other GFP allocations in net/netfilter/nf_tables_api.c and a modification of audit_log_nfcfg() to accept a GFP parameter. Reported-by: Dan Carptenter Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 7e4e589db76a3cf4c1f534eb5a09cc6422766b93 Author: Linus Walleij Date: Tue Jun 9 22:04:45 2020 +0200 drm: pl111: Absorb the external register header The PL111 DRM driver is now the sole user of the external CLCD registers header file, so let's absorb that into the pl111_drm.h file and save the external include. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Cc: Russell King Link: https://patchwork.freedesktop.org/patch/msgid/20200609200446.153209-3-linus.walleij@linaro.org commit 0fb8125635e8eb5483fb095f98dcf0651206a7b8 Author: Linus Walleij Date: Tue Jun 9 22:04:44 2020 +0200 video: fbdev: amba-clcd: Retire elder CLCD driver All the functionality in this driver has been reimplemented in the new DRM driver in drivers/gpu/drm/pl111/* and all the boards using it have been migrated to use the DRM driver with all configuration coming from the device tree. I started the work to migrate the CLCD driver to DRM in april 2017 and it took a little more than 3 years to do this properly without leaving any platforms behind. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Cc: Russell King Link: https://patchwork.freedesktop.org/patch/msgid/20200609200446.153209-2-linus.walleij@linaro.org commit bcb142f30394d45e6faa90325459c1110beba56e Author: Anson Huang Date: Thu Jun 18 11:22:56 2020 +0800 dt-bindings: mmc: Convert imx esdhc to json-schema Convert the i.MX ESDHC binding to DT schema format using json-schema Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1592450578-30140-1-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 976b43ba022887cc1660717012255d0d0d45a157 Author: Anson Huang Date: Thu Jun 18 11:22:58 2020 +0800 dt-bindings: clock: Correct example in i.MX8QXP LPCG binding In i.MX8QXP LPCG binding's example, "fsl,imx7d-usdhc" as fallback compatible is incorrect, remove it to avoid below build error: Documentation/devicetree/bindings/clock/imx8qxp-lpcg.example.dt.yaml: mmc@5b010000: compatible: Additional items are not allowed ('fsl,imx7d-usdhc' was unexpected) Documentation/devicetree/bindings/clock/imx8qxp-lpcg.example.dt.yaml: mmc@5b010000: compatible: ['fsl,imx8qxp-usdhc', 'fsl,imx7d-usdhc'] is too long Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1592450578-30140-3-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 5369245e363ba45a9108cd4d36f7c048414d9fe8 Author: Anson Huang Date: Thu Jun 18 11:22:57 2020 +0800 dt-bindings: clock: Correct mmc node name in i.MX35 binding Nodename should be "mmc" instead of "esdhc" in i.MX35 clock binding to avoid below build error: Documentation/devicetree/bindings/clock/imx35-clock.example.dt.yaml: esdhc@53fb4000: $nodename:0: 'esdhc@53fb4000' does not match '^mmc(@.*)?$' Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1592450578-30140-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit a2693fe254e77055cb80571fa2d723021dd3aa1d Author: Greentime Hu Date: Mon Jun 22 16:47:25 2020 -0700 RISC-V: Use a local variable instead of smp_processor_id() Store the smp_processor_id() in a local variable to save some pointer chasing. Signed-off-by: Greentime Hu Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 234e9d7a6200952264002b9ba808e7dfc559b0b2 Author: Chenxi Mao Date: Fri Jun 5 13:15:10 2020 +0800 riscv: Select ARCH_SUPPORTS_ATOMIC_RMW by default Select ARCH_SUPPORTS_ATOMIC_RMW by default to enable osqlocks. Signed-off-by: Chenxi Mao [Palmer: commit text] Signed-off-by: Palmer Dabbelt commit 3f1f6981afed9fa21efa12ce396b35ca684b8a29 Author: Linus Walleij Date: Tue Jun 9 22:04:43 2020 +0200 drm: pl111: Credit where credit is due This moves over some of the credit for the development of this driver from the old fbdev driver that I used as reference when getting this in place. Reviewed-by: Eric Anholt Signed-off-by: Linus Walleij Cc: Russell King Link: https://patchwork.freedesktop.org/patch/msgid/20200609200446.153209-1-linus.walleij@linaro.org commit dbb988b4e7eb924ffceaa2a7da6e794c868cb2f3 Author: Wei Yongjun Date: Sun Jun 28 02:30:55 2020 +0000 clk: qcom: Fix return value check in apss_ipq6018_probe() In case of error, the function dev_get_regmap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 5e77b4ef1b19 ("clk: qcom: Add ipq6018 apss clock controller") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200628023055.50608-1-weiyongjun1@huawei.com Signed-off-by: Stephen Boyd commit 351cf7445f009d7c4edcecdaf7cdee8f33046164 Merge: f10b6c99c0843 3f31f7d9b5404 Author: Mark Brown Date: Mon Jun 29 20:47:01 2020 +0100 Merge branch 'for-5.8' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.9 commit 5ef0a07a7928539d46fdb163acfad28c6d877a89 Author: Akira Yokosawa Date: Wed Jun 24 06:59:26 2020 +0900 Documentation/litmus-tests: Add note on herd7 7.56 in atomic litmus test herdtools 7.56 has enhanced herd7's C parser so that the "(void)expr" construct in Atomic-RMW-ops-are-atomic-WRT-atomic_set.litmus is accepted. This is independent of LKMM's cat model, so mention the required version in the header of the litmus test and its entry in README. CC: Boqun Feng Reported-by: Andrea Parri Acked-by: Andrea Parri Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit 2bfa5c62debe43e3779e03bfc66b75ab72098db1 Author: Akira Yokosawa Date: Wed Jun 24 06:56:43 2020 +0900 tools/memory-model/README: Mention herdtools7 7.56 in compatibility table herdtools7 7.56 is going to be released in the week of 22 Jun 2020. This commit therefore adds the exact version in the compatibility table. Acked-by: Andrea Parri Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit d075a78a5ab19389d5600923d6ad5391d7cd1be8 Author: Akira Yokosawa Date: Sun May 31 20:04:32 2020 +0900 tools/memory-model/README: Expand dependency of klitmus7 klitmus7 is independent of the memory model but depends on the build-target kernel release. It occasionally lost compatibility due to kernel API changes [1, 2, 3]. It was remedied in a backwards-compatible manner respectively [4, 5, 6]. Reflect this fact in README. [1]: b899a850431e ("compiler.h: Remove ACCESS_ONCE()") [2]: 0bb95f80a38f ("Makefile: Globally enable VLA warning") [3]: d56c0d45f0e2 ("proc: decouple proc from VFS with "struct proc_ops"") [4]: https://github.com/herd/herdtools7/commit/e87d7f9287d1 ("klitmus: Use WRITE_ONCE and READ_ONCE in place of deprecated ACCESS_ONCE") [5]: https://github.com/herd/herdtools7/commit/a0cbb10d02be ("klitmus: Avoid variable length array") [6]: https://github.com/herd/herdtools7/commit/46b9412d3a58 ("klitmus: Linux kernel v5.6.x compat") NOTE: [5] was ahead of herdtools7 7.53, which did not make an official release. Code generated by klitmus7 without [5] can still be built targeting Linux 4.20--5.5 if you don't care VLA warnings. Acked-by: Andrea Parri Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit c425fb5f8d2c8d22e7baad6dc077703c2b329d2d Author: Joel Fernandes (Google) Date: Mon May 11 22:06:46 2020 -0400 Documentation/litmus-tests: Cite an RCU litmus test This commit cites a pertinent RCU-related litmus test. Co-developed-by: Joel Fernandes (Google) Co-developed-by: Akira Yokosawa [Alan: grammar nit] [ paulmck: Update commit log and title per Akira feedback. ] Suggested-by: Alan Stern Signed-off-by: Joel Fernandes (Google) Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit cdaac9d6d23d7a7f9edbb568191d05f2b660fff0 Author: Akira Yokosawa Date: Sun May 10 15:12:57 2020 +0900 Documentation/litmus-tests: Merge atomic's README into top-level one Where Documentation/litmus-tests/README lists RCU litmus tests, Documentation/litmus-tests/atomic/README lists atomic litmus tests. For symmetry, merge the latter into former, with some context adjustment in the introduction. Acked-by: Andrea Parri Acked-by: Joel Fernandes (Google) Acked-by: Boqun Feng Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit 9725dd55512772422e195cf0cfbca1eda6778358 Author: Akira Yokosawa Date: Sun May 10 13:37:14 2020 +0900 tools/memory-model: Fix reference to litmus test in recipes.txt The name of litmus test doesn't match the one described below. Fix the name of litmus test. Acked-by: Andrea Parri Acked-by: Joel Fernandes (Google) Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit e30d02355536e9678ab8a4dfcd6e90a86479b10f Author: Boqun Feng Date: Thu Mar 26 10:40:22 2020 +0800 Documentation/litmus-tests/atomic: Add a test for smp_mb__after_atomic() We already use a litmus test in atomic_t.txt to describe atomic RMW + smp_mb__after_atomic() is stronger than acquire (both the read and the write parts are ordered). So make it a litmus test in atomic-tests directory, so that people can access the litmus easily. Additionally, change the processor numbers "P1, P2" to "P0, P1" in atomic_t.txt for the consistency with the processor numbers in the litmus test, which herd can handle. Acked-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Boqun Feng Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 4dcd4d36ddb1fa7fa7257ffe9e711608119b9785 Author: Boqun Feng Date: Thu Mar 26 10:40:21 2020 +0800 Documentation/litmus-tests/atomic: Add a test for atomic_set() We already use a litmus test in atomic_t.txt to describe the behavior of an atomic_set() with the an atomic RMW, so add it into atomic-tests directory to make it easily accessible for anyone who cares about the semantics of our atomic APIs. Besides currently the litmus test "atomic-set" in atomic_t.txt has a few things to be improved: 1) The CPU/Processor numbers "P1,P2" are not only inconsistent with the rest of the document, which uses "CPU0" and "CPU1", but also unacceptable by the herd tool, which requires processors start at "P0". 2) The initialization block uses a "atomic_set()", which is OK, but it's better to use ATOMIC_INIT() to make clear this is an initialization. 3) The return value of atomic_add_unless() is discarded inexplicitly, which is OK for C language, but it will be helpful to the herd tool if we use a void cast to make the discard explicit. 4) The name and the paragraph describing the test need to be more accurate and aligned with our wording in LKMM. Therefore fix these in both atomic_t.txt and the new added litmus test. Acked-by: Andrea Parri Acked-by: Alan Stern Signed-off-by: Boqun Feng Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit efff6150209694a78c8af8c2a7557af682086220 Author: Boqun Feng Date: Thu Mar 26 10:40:20 2020 +0800 Documentation/litmus-tests: Introduce atomic directory Although we have atomic_t.txt and its friends to describe the semantics of atomic APIs and lib/atomic64_test.c for build testing and testing in UP mode, the tests for our atomic APIs in real SMP mode are still missing. Since now we have the LKMM tool in kernel and litmus tests can be used to generate kernel modules for testing purpose with "klitmus" (a tool from the LKMM toolset), it makes sense to put a few typical litmus tests into kernel so that 1) they are the examples to describe the conceptual mode of the semantics of atomic APIs, and 2) they can be used to generate kernel test modules for anyone who is interested to test the atomic APIs implementation (in most cases, is the one who implements the APIs for a new arch) Therefore, introduce the atomic directory for this purpose. The directory is maintained by the LKMM group to make sure the litmus tests are always aligned with our memory model. Acked-by: Alan Stern Acked-by: Andrea Parri Reviewed-by: Joel Fernandes (Google) Signed-off-by: Boqun Feng Signed-off-by: Paul E. McKenney commit 4a9cc65f7a715ba1f4f58529f7bf6f1548d8701f Author: Boqun Feng Date: Thu Mar 26 10:40:19 2020 +0800 tools/memory-model: Add an exception for limitations on _unless() family According to Luc, atomic_add_unless() is directly provided by herd7, therefore it can be used in litmus tests. So change the limitation section in README to unlimit the use of atomic_add_unless(). Cc: Luc Maranget Acked-by: Andrea Parri Reviewed-by: Joel Fernandes (Google) Signed-off-by: Boqun Feng Signed-off-by: Paul E. McKenney commit 7f871338ff939952c4e04a83ae395ff9d57040c2 Author: Joel Fernandes (Google) Date: Sun Mar 22 21:57:35 2020 -0400 MAINTAINERS: Update maintainers for new Documentation/litmus-tests This commit adds Joel Fernandes as official LKMM reviewer. Acked-by: Boqun Feng Acked-by: Andrea Parri Signed-off-by: Joel Fernandes (Google) [ paulmck: Apply Joe Perches alphabetization feedback. ] Signed-off-by: Paul E. McKenney commit a591890c4e91f37ce858a3090b16e0eef2511575 Author: Joel Fernandes (Google) Date: Sun Mar 22 21:57:34 2020 -0400 Documentation: LKMM: Add litmus test for RCU GP guarantee where reader stores This adds an example for the important RCU grace period guarantee, which shows an RCU reader can never span a grace period. Acked-by: Andrea Parri Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit be4a37973cb078fc64d541f396b7d4d80e45fbe2 Author: Joel Fernandes (Google) Date: Sun Mar 22 21:57:33 2020 -0400 Documentation: LKMM: Add litmus test for RCU GP guarantee where updater frees object This adds an example for the important RCU grace period guarantee, which shows an RCU reader can never span a grace period. Acked-by: Andrea Parri Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit c1b14609013a6b4c4b2d73583bde645540ebd9b7 Author: Marco Elver Date: Mon Mar 2 18:21:01 2020 +0100 tools/memory-model: Fix "conflict" definition The definition of "conflict" should not include the type of access nor whether the accesses are concurrent or not, which this patch addresses. The definition of "data race" remains unchanged. The definition of "conflict" as we know it and is cited by various papers on memory consistency models appeared in [1]: "Two accesses to the same variable conflict if at least one is a write; two operations conflict if they execute conflicting accesses." The LKMM as well as the C11 memory model are adaptations of data-race-free, which are based on the work in [2]. Necessarily, we need both conflicting data operations (plain) and synchronization operations (marked). For example, C11's definition is based on [3], which defines a "data race" as: "Two memory operations conflict if they access the same memory location, and at least one of them is a store, atomic store, or atomic read-modify-write operation. In a sequentially consistent execution, two memory operations from different threads form a type 1 data race if they conflict, at least one of them is a data operation, and they are adjacent in Co-developed-by: Alan Stern Signed-off-by: Alan Stern Acked-by: Andrea Parri Signed-off-by: Paul E. McKenney commit 38908de90a8c24c949505958f1d09812bb3b64aa Author: Paul E. McKenney Date: Wed Jan 22 13:38:57 2020 -0800 tools/memory-model: Add recent references This commit updates the list of LKMM-related publications in Documentation/references.txt. Signed-off-by: Paul E. McKenney Acked-by: Andrea Parri commit 61d56d7aa5eca3b909bce51ba8125b0fa44d7e17 Author: Marco Elver Date: Thu Jun 18 11:31:18 2020 +0200 kcsan: Disable branch tracing in core runtime Disable branch tracing in core KCSAN runtime if branches are being traced (TRACE_BRANCH_PROFILING). This it to avoid its performance impact, but also avoid recursion in case KCSAN is enabled for the branch tracing runtime. The latter had already been a problem for KASAN: https://lore.kernel.org/lkml/CANpmjNOeXmD5E3O50Z3MjkiuCYaYOPyi+1rq=GZvEKwBvLR0Ug@mail.gmail.com/ Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 2839a232071f588d334543fb86f5689b43353842 Author: Marco Elver Date: Thu Jun 18 11:31:17 2020 +0200 kcsan: Simplify compiler flags Simplify the set of compiler flags for the runtime by removing cc-option from -fno-stack-protector, because all supported compilers support it. This saves us one compiler invocation during build. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit e68dcd8eac63cf14745df0dc872ea479df8ed4b9 Author: Marco Elver Date: Thu Jun 18 11:31:16 2020 +0200 kcsan: Re-add GCC as a supported compiler GCC version 11 recently implemented all requirements to correctly support KCSAN: 1. Correct no_sanitize-attribute inlining behaviour: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=4089df8ef4a63126b0774c39b6638845244c20d2 2. --param=tsan-distinguish-volatile https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ab2789ec507a94f1a75a6534bca51c7b39037ce0 3. --param=tsan-instrument-func-entry-exit https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=06712fc68dc9843d9af7c7ac10047f49d305ad76 Therefore, we can re-enable GCC for KCSAN, and document the new compiler requirements. Signed-off-by: Marco Elver Cc: Martin Liska Signed-off-by: Paul E. McKenney commit 56b031f0abf55254d47a329010574733fa9a27b8 Author: Marco Elver Date: Tue Jun 16 14:36:25 2020 +0200 kcsan: Add jiffies test to test suite Add a test that KCSAN nor the compiler gets confused about accesses to jiffies on different architectures. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 7e766560e6e2c1cf2782f00e63c31564e4c9f0fe Author: Marco Elver Date: Tue Jun 16 14:36:24 2020 +0200 kcsan: Remove existing special atomic rules Remove existing special atomic rules from kcsan_is_atomic_special() because they are no longer needed. Since we rely on the compiler emitting instrumentation distinguishing volatile accesses, the rules have become redundant. Let's keep kcsan_is_atomic_special() around, so that we have an obvious place to add special rules should the need arise in future. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit acfa087ccf2d2eff46186477f53e4c3ffbdb033d Author: Marco Elver Date: Tue Jun 16 14:36:23 2020 +0200 kcsan: Rename test.c to selftest.c Rename 'test.c' to 'selftest.c' to better reflect its purpose (Kconfig variable and code inside already match this). This is to avoid confusion with the test suite module in 'kcsan-test.c'. No functional change. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 9dd979bae4cf76558ff816abe83283308fb1ae8c Author: Marco Elver Date: Tue Jun 16 14:36:22 2020 +0200 kcsan: Silence -Wmissing-prototypes warning with W=1 The functions here should not be forward declared for explicit use elsewhere in the kernel, as they should only be emitted by the compiler due to sanitizer instrumentation. Add forward declarations a line above their definition to shut up warnings in W=1 builds. Link: https://lkml.kernel.org/r/202006060103.jSCpnV1g%lkp@intel.com Reported-by: kernel test robot Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 2888557f68db334a3839dcc262264a4c436f576b Author: Marco Elver Date: Tue Jun 2 16:36:33 2020 +0200 kcsan: Prefer '__no_kcsan inline' in test Instead of __no_kcsan_or_inline, prefer '__no_kcsan inline' in test -- this is in case we decide to remove __no_kcsan_or_inline. Suggested-by: Peter Zijlstra Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 33190b675ce2eacbeb4e75168c05b41110b506ec Author: Qian Cai Date: Tue Feb 11 08:54:15 2020 -0500 locking/osq_lock: Annotate a data race in osq_lock The prev->next pointer can be accessed concurrently as noticed by KCSAN: write (marked) to 0xffff9d3370dbbe40 of 8 bytes by task 3294 on cpu 107: osq_lock+0x25f/0x350 osq_wait_next at kernel/locking/osq_lock.c:79 (inlined by) osq_lock at kernel/locking/osq_lock.c:185 rwsem_optimistic_spin read to 0xffff9d3370dbbe40 of 8 bytes by task 3398 on cpu 100: osq_lock+0x196/0x350 osq_lock at kernel/locking/osq_lock.c:157 rwsem_optimistic_spin Since the write only stores NULL to prev->next and the read tests if prev->next equals to this_cpu_ptr(&osq_node). Even if the value is shattered, the code is still working correctly. Thus, mark it as an intentional data race using the data_race() macro. Signed-off-by: Qian Cai Signed-off-by: Paul E. McKenney commit 1fe84fd4a4027a17d511a832f89ab14107650ba4 Author: Marco Elver Date: Tue May 5 20:28:21 2020 +0200 kcsan: Add test suite This adds KCSAN test focusing on behaviour of the integrated runtime. Tests various race scenarios, and verifies the reports generated to console. Makes use of KUnit for test organization, and the Torture framework for test thread control. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit c93773c1a3fedf6c3f6fa12833e2b74a9897c3e3 Author: Paul E. McKenney Date: Wed Feb 12 13:29:15 2020 -0800 rculist: Add ASSERT_EXCLUSIVE_ACCESS() to __list_splice_init_rcu() After the sync() in __list_splice_init_rcu(), there should be no readers traversing the old list. This commit therefore enlists the help of KCSAN to verify this condition via a pair of calls to ASSERT_EXCLUSIVE_ACCESS(). Signed-off-by: Paul E. McKenney Cc: Marco Elver commit cb38f82043d1641a27f96b58b402ca4b7a88f52d Author: Qian Cai Date: Mon Feb 10 09:10:16 2020 -0500 x86/mm/pat: Mark an intentional data race cpa_4k_install could be accessed concurrently as noticed by KCSAN, read to 0xffffffffaa59a000 of 8 bytes by interrupt on cpu 7: cpa_inc_4k_install arch/x86/mm/pat/set_memory.c:131 [inline] __change_page_attr+0x10cf/0x1840 arch/x86/mm/pat/set_memory.c:1514 __change_page_attr_set_clr+0xce/0x490 arch/x86/mm/pat/set_memory.c:1636 __set_pages_np+0xc4/0xf0 arch/x86/mm/pat/set_memory.c:2148 __kernel_map_pages+0xb0/0xc8 arch/x86/mm/pat/set_memory.c:2178 kernel_map_pages include/linux/mm.h:2719 [inline] write to 0xffffffffaa59a000 of 8 bytes by task 1 on cpu 6: cpa_inc_4k_install arch/x86/mm/pat/set_memory.c:131 [inline] __change_page_attr+0x10ea/0x1840 arch/x86/mm/pat/set_memory.c:1514 __change_page_attr_set_clr+0xce/0x490 arch/x86/mm/pat/set_memory.c:1636 __set_pages_p+0xc4/0xf0 arch/x86/mm/pat/set_memory.c:2129 __kernel_map_pages+0x2e/0xc8 arch/x86/mm/pat/set_memory.c:2176 kernel_map_pages include/linux/mm.h:2719 [inline] Both accesses are due to the same "cpa_4k_install++" in cpa_inc_4k_install. A data race here could be potentially undesirable: depending on compiler optimizations or how x86 executes a non-LOCK'd increment, it may lose increments, corrupt the counter, etc. Since this counter only seems to be used for printing some stats, this data race itself is unlikely to cause harm to the system though. Thus, mark this intentional data race using the data_race() marco. Suggested-by: Macro Elver Signed-off-by: Qian Cai Acked-by: Borislav Petkov Signed-off-by: Paul E. McKenney commit cda099b37d7165fc73a63961739acf026444cde2 Author: Qian Cai Date: Wed Feb 19 11:00:54 2020 -0800 fork: Annotate a data race in vm_area_dup() struct vm_area_struct could be accessed concurrently as noticed by KCSAN, write to 0xffff9cf8bba08ad8 of 8 bytes by task 14263 on cpu 35: vma_interval_tree_insert+0x101/0x150: rb_insert_augmented_cached at include/linux/rbtree_augmented.h:58 (inlined by) vma_interval_tree_insert at mm/interval_tree.c:23 __vma_link_file+0x6e/0xe0 __vma_link_file at mm/mmap.c:629 vma_link+0xa2/0x120 mmap_region+0x753/0xb90 do_mmap+0x45c/0x710 vm_mmap_pgoff+0xc0/0x130 ksys_mmap_pgoff+0x1d1/0x300 __x64_sys_mmap+0x33/0x40 do_syscall_64+0x91/0xc44 entry_SYSCALL_64_after_hwframe+0x49/0xbe read to 0xffff9cf8bba08a80 of 200 bytes by task 14262 on cpu 122: vm_area_dup+0x6a/0xe0 vm_area_dup at kernel/fork.c:362 __split_vma+0x72/0x2a0 __split_vma at mm/mmap.c:2661 split_vma+0x5a/0x80 mprotect_fixup+0x368/0x3f0 do_mprotect_pkey+0x263/0x420 __x64_sys_mprotect+0x51/0x70 do_syscall_64+0x91/0xc44 entry_SYSCALL_64_after_hwframe+0x49/0xbe vm_area_dup() blindly copies all fields of original VMA to the new one. This includes coping vm_area_struct::shared.rb which is normally protected by i_mmap_lock. But this is fine because the read value will be overwritten on the following __vma_link_file() under proper protection. Thus, mark it as an intentional data race and insert a few assertions for the fields that should not be modified concurrently. Signed-off-by: Qian Cai Signed-off-by: Paul E. McKenney commit 13625c0a4074d3bab61b1dc70a828b574255f339 Merge: d93d97cbe0d43 24692fa22c30c da4fc00abb97c 30d8aa5128f12 f71d8311ec278 bde50d8ff83e4 7a6bbeaa01f71 Author: Paul E. McKenney Date: Mon Jun 29 12:03:15 2020 -0700 Merge branches 'doc.2020.06.29a', 'fixes.2020.06.29a', 'kfree_rcu.2020.06.29a', 'rcu-tasks.2020.06.29a', 'scale.2020.06.29a', 'srcu.2020.06.29a' and 'torture.2020.06.29a' into HEAD doc.2020.06.29a: Documentation updates. fixes.2020.06.29a: Miscellaneous fixes. kfree_rcu.2020.06.29a: kfree_rcu() updates. rcu-tasks.2020.06.29a: RCU Tasks updates. scale.2020.06.29a: Read-side scalability tests. srcu.2020.06.29a: SRCU updates. torture.2020.06.29a: Torture-test updates. commit 7a6bbeaa01f71af2722fd775a4a4ff9593d12838 Author: Paul E. McKenney Date: Tue Jun 16 17:07:15 2020 -0700 torture: Remove obsolete "cd $KVM" In the dim distant past, qemu commands needed to be run from the rcutorture directory, but this is no longer the case. This commit therefore removes the now-useless "cd $KVM" from the kvm-test-1-run.sh script. Signed-off-by: Paul E. McKenney commit 316db5897ee5d7408f2adea4d5992ed380316928 Author: Paul E. McKenney Date: Tue Jun 16 16:34:52 2020 -0700 torture: Avoid duplicate specification of qemu command Currently, the qemu command is constructed twice, once to dump it to the qemu-cmd file and again to execute it. This is of course an accident waiting to happen, but is done to ensure that the remainder of the script has an accurate idea of the running qemu command's PID. This commit therefore places both the qemu command and the PID capture into a new temporary file and sources that temporary file. Thus the single construction of the qemu command into the qemu-cmd file suffices for both purposes. Signed-off-by: Paul E. McKenney commit 2102ad290af06119ccfb56ddc3a0e5011a91537e Author: Paul E. McKenney Date: Tue Jun 16 15:38:24 2020 -0700 torture: Dump ftrace at shutdown only if requested If there is a large number of torture tests running concurrently, all of which are dumping large ftrace buffers at shutdown time, the resulting dumping can take a very long time, particularly on systems with rotating-rust storage. This commit therefore adds a default-off torture.ftrace_dump_at_shutdown module parameter that enables shutdown-time ftrace-buffer dumping. Signed-off-by: Paul E. McKenney commit 06efa9b4b27f926eeb8c935f430f8557eb8b106e Author: Paul E. McKenney Date: Tue Jun 16 14:14:09 2020 -0700 torture: Add kvm-tranform.sh script for qemu-cmd files This commit adds a script that transforms qemu-cmd files to allow them and the corresponding kernels to be run in contexts other than the one that they were created for, including on systems other than the one that they were built on. For example, this allows the build products from a --buildonly run to be transformed to allow distributed rcutorture testing. Signed-off-by: Paul E. McKenney commit 9ccba350bd824ecacbfd8965f4f3ac980b96f951 Author: Paul E. McKenney Date: Tue Jun 16 11:16:18 2020 -0700 torture: Add more tracing crib notes to kvm.sh This commit adds a few more hints about how to use tracing as comments at the end of kvm.sh. Signed-off-by: Paul E. McKenney commit 61b77be09e29e6dc152b1984691e5b1708e8a6ac Author: Paul E. McKenney Date: Tue Jun 16 10:38:57 2020 -0700 torture: Improve diagnostic for KCSAN-incapable compilers Using --kcsan when the compiler does not support KCSAN results in this: :CONFIG_KCSAN=y: improperly set :CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000: improperly set :CONFIG_KCSAN_VERBOSE=y: improperly set :CONFIG_KCSAN_INTERRUPT_WATCHER=y: improperly set Clean KCSAN run in /home/git/linux-rcu/tools/testing/selftests/rcutorture/res/2020.06.16-09.53.16 This is a bit obtuse, so this commit adds checks resulting in this: :CONFIG_KCSAN=y: improperly set :CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000: improperly set :CONFIG_KCSAN_VERBOSE=y: improperly set :CONFIG_KCSAN_INTERRUPT_WATCHER=y: improperly set Compiler or architecture does not support KCSAN! Did you forget to switch your compiler with --kmake-arg CC=? Suggested-by: Marco Elver Signed-off-by: Paul E. McKenney Acked-by: Marco Elver commit 6bcaf2a0876633b6a7c5e70ee88801e16280210a Author: Paul E. McKenney Date: Tue Jun 16 10:02:54 2020 -0700 torture: Correctly summarize build-only runs Currently, kvm-recheck.sh complains that qemu failed for --buildonly runs, which is sort of true given that qemu can hardly succeed if not invoked in the first place. Nevertheless, this commit swaps the order of checks in kvm-recheck.sh so that --buildonly runs will be summarized more straightforwardly. Signed-off-by: Paul E. McKenney commit 603d11ad6976e1289f19c2a19e2f75a83d0dc296 Author: Marco Elver Date: Tue Jun 16 11:49:24 2020 +0200 torture: Pass --kmake-arg to all make invocations We need to pass the arguments provided to --kmake-arg to all make invocations. In particular, the make invocations generating the configs need to see the final make arguments, e.g. if config variables depend on particular variables that are passed to make. For example, when using '--kcsan --kmake-arg CC=clang-11', we would lose CONFIG_KCSAN=y due to 'make oldconfig' not seeing that we want to use a compiler that supports KCSAN. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 775227511843202e65a7f194cbf64f38de01f004 Author: Paul E. McKenney Date: Thu Jun 11 16:43:14 2020 -0700 rcutorture: Check for unwatched readers RCU is supposed to be watching all non-idle kernel code and also all softirq handlers. This commit adds some teeth to this statement by adding a WARN_ON_ONCE(). Signed-off-by: Paul E. McKenney commit bc77a72cd188d44881ee1b9d0a9d65ca8108b508 Author: Paul E. McKenney Date: Wed Jun 10 14:08:19 2020 -0700 torture: Abstract out console-log error detection This commit pulls the simple pattern-based error detection from the console log into a new console-badness.sh file. This will enable future commits to end a run on the first error. Signed-off-by: Paul E. McKenney commit 6387ecbc94bf5ac07239104b84d2304da6e79b51 Author: Paul E. McKenney Date: Tue Jun 9 17:58:30 2020 -0700 torture: Add a stop-run capability When bisecting RCU issues, it is often the case that the first error in an unsuccessful run will happen quickly, but that a successful run must go on for some time in order to obtain a sufficiently low false-negative error rate. In many cases, a bisection requires multiple concurrent runs, in which case the first failure in any run indicates failure, pure and simple. In such cases, it would speed things up greatly if the first failure terminated all runs. This commit therefore adds scripting that checks for a file named "STOP" in the top-level results directory, terminating the run when it appears. Note that in-progress builds will continue until completion, but future builds and all runs will be cut short. Signed-off-by: Paul E. McKenney commit 3e93a51f191aa710760591961240f8910d952b5b Author: Paul E. McKenney Date: Fri Jun 5 10:29:28 2020 -0700 torture: Create qemu-cmd in --buildonly runs One reason to do a --buildonly run is to use the build products elsewhere, for example, to do the actual test on some other system. Part of doing the test is the actual qemu command, which is not currently produced by --buildonly runs. This commit therefore causes --buildonly runs to create this file. Signed-off-by: Paul E. McKenney commit 8f43d5911b38f00dfa46169dcb1feb1e101dd906 Author: Jules Irenge Date: Mon Jun 1 19:45:48 2020 +0100 rcu/rcutorture: Replace 0 with false Coccinelle reports a warning WARNING: Assignment of 0/1 to bool variable The root cause is that the variable lastphase is a bool, but is initialised with integer 0. This commit therefore replaces the 0 with a false. Signed-off-by: Jules Irenge Signed-off-by: Paul E. McKenney commit a3ba4972f2ef8408dcc8a2a3d433621d6c990594 Author: Paul E. McKenney Date: Mon May 4 16:41:53 2020 -0700 torture: Add --allcpus argument to the kvm.sh script Leaving off the kvm.sh script's --cpus argument results in the script testing the scenarios sequentially, which can be quite slow. However, having to specify the actual number of CPUs can be error-prone. This commit therefore adds a --allcpus argument that causes kvm.sh to use all available CPUs. Signed-off-by: Paul E. McKenney commit d3cb26312ecfdb4ee8dedf931e24e60df1d7fbc9 Author: Paul E. McKenney Date: Mon May 4 16:40:53 2020 -0700 torture: Remove whitespace from identify_qemu_vcpus output The identify_qemu_vcpus bash function can return numbers including whitespace characters, which can be a bit annoying in some bash dollar-sign substitutions. This commit therefore strips all spaces and tabs from the value that identify_qemu_vcpus outputs. Signed-off-by: Paul E. McKenney commit cae7cc6ba5bad320c2055ac54f73affd051e76ca Author: Paul E. McKenney Date: Sun Apr 26 19:20:37 2020 -0700 rcutorture: NULL rcu_torture_current earlier in cleanup code Currently, the rcu_torture_current variable remains non-NULL until after all readers have stopped. During this time, rcu_torture_stats_print() will think that the test is still ongoing, which can result in confusing dmesg output. This commit therefore NULLs rcu_torture_current immediately after the rcu_torture_writer() kthread has decided to stop, thus informing rcu_torture_stats_print() much sooner. Signed-off-by: Paul E. McKenney commit 59359e4f2a0906920389ec1e33296ac9a19178ba Author: Paul E. McKenney Date: Sun Apr 26 16:51:56 2020 -0700 rcutorture: Handle non-statistic bang-string error messages The current console parsing assumes that console lines containing "!!!" are statistics lines from which it can parse the number of rcutorture too-short grace-period failures. This prints confusing output for other problems, including memory exhaustion. This commit therefore differentiates between these cases and prints an appropriate error string. Signed-off-by: Paul E. McKenney commit 61251d6899803594a108c3165aeb072c73e09cc8 Author: Paul E. McKenney Date: Sun Apr 26 16:48:46 2020 -0700 torture: Set configfile variable to current scenario The torture-test recheck logic fails to set the configfile variable to the current scenario, so this commit properly initializes this variable. This change isn't critical given that all errors for a given scenario follow that scenario's heading, but it is easier on the eyes to repeat it. And this repetition also prevents confusion as to whether a given message goes with the previous heading or the next one. Signed-off-by: Paul E. McKenney commit 4a5f133c15b77c4018e8d7996541868ac94afb4f Author: Paul E. McKenney Date: Fri Apr 24 11:21:40 2020 -0700 rcutorture: Add races with task-exit processing Several variants of Linux-kernel RCU interact with task-exit processing, including preemptible RCU, Tasks RCU, and Tasks Trace RCU. This commit therefore adds testing of this interaction to rcutorture by adding rcutorture.read_exit_burst and rcutorture.read_exit_delay kernel-boot parameters. These kernel parameters control the frequency and spacing of special read-then-exit kthreads that are spawned. [ paulmck: Apply feedback from Dan Carpenter's static checker. ] [ paulmck: Reduce latency to avoid false-positive shutdown hangs. ] Signed-off-by: Paul E. McKenney commit d02c6b52d12fa30eeabfaf5aefe12078eacb94b2 Author: Zou Wei Date: Mon Apr 13 20:02:59 2020 +0800 locktorture: Use true and false to assign to bool variables This commit fixes the following coccicheck warnings: kernel/locking/locktorture.c:689:6-10: WARNING: Assignment of 0/1 to bool variable kernel/locking/locktorture.c:907:2-20: WARNING: Assignment of 0/1 to bool variable kernel/locking/locktorture.c:938:3-20: WARNING: Assignment of 0/1 to bool variable kernel/locking/locktorture.c:668:2-19: WARNING: Assignment of 0/1 to bool variable kernel/locking/locktorture.c:674:2-19: WARNING: Assignment of 0/1 to bool variable kernel/locking/locktorture.c:634:2-20: WARNING: Assignment of 0/1 to bool variable kernel/locking/locktorture.c:640:2-20: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Paul E. McKenney commit 6582e7f184e49a754ee09c996a886b89113d7354 Author: Paul E. McKenney Date: Mon May 4 15:55:47 2020 -0700 torture: Add script to smoke-test commits in a branch This commit adds a kvm-check-branches.sh script that takes a list of commits and commit ranges and runs a short rcutorture test on all scenarios on each specified commit. A summary is printed at the end, and the script returns success if all rcutorture runs completed without error. Signed-off-by: Paul E. McKenney commit 88513ae533756d10358e406743c21e8cf61fb72a Author: Paul E. McKenney Date: Tue Apr 28 14:41:48 2020 -0700 torture: Remove qemu dependency on EFI firmware On some (probably misconfigured) systems, the torture-test scripting will cause qemu to complain about missing EFI firmware, often because qemu is trying to traverse broken symbolic links to find that firmware. Which is a bit silly given that the default torture-test guest OS has but a single binary for its userspace, and thus is unlikely to do much in the way of networking in any case. This commit therefore avoids such problems by specifying "-net none" to qemu unless the TORTURE_QEMU_INTERACTIVE environment variable is set (for example, by having specified "--interactive" to kvm.sh), in which case "-net nic -net user" is specified to qemu instead. Either choice may be overridden by specifying the "-net" argument of your choice to the kvm.sh "--qemu-args" parameter. Link: https://lore.kernel.org/lkml/20190701141403.GA246562@google.com Reported-by: Joel Fernandes Signed-off-by: Paul E. McKenney Cc: Sebastian Andrzej Siewior commit bde50d8ff83e4ce9e576f7c5ba1edb48a3610a5b Author: Sebastian Andrzej Siewior Date: Tue May 26 15:41:34 2020 +0200 srcu: Avoid local_irq_save() before acquiring spinlock_t SRCU disables interrupts to get a stable per-CPU pointer and then acquires the spinlock which is in the per-CPU data structure. The release uses spin_unlock_irqrestore(). While this is correct on a non-RT kernel, this conflicts with the RT semantics because the spinlock is converted to a 'sleeping' spinlock. Sleeping locks can obviously not be acquired with interrupts disabled. Acquire the per-CPU pointer `ssp->sda' without disabling preemption and then acquire the spinlock_t of the per-CPU data structure. The lock will ensure that the data is consistent. The added call to check_init_srcu_struct() is now needed because a statically defined srcu_struct may remain uninitialized until this point and the newly introduced locking operation requires an initialized spinlock_t. This change was tested for four hours with 8*SRCU-N and 8*SRCU-P without causing any warnings. Cc: Lai Jiangshan Cc: "Paul E. McKenney" Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: rcu@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney commit 7fef6cff8f2814bf8eb632e2bb8f0a987ffd9ece Author: Ethon Paul Date: Sat Apr 18 19:46:47 2020 +0800 srcu: Fix a typo in comment "amoritized"->"amortized" This commit fixes a typo in a comment. Signed-off-by: Ethon Paul Signed-off-by: Paul E. McKenney commit f71d8311ec278525508dac211de700b2b682a15f Author: Paul E. McKenney Date: Wed Jun 17 12:06:47 2020 -0700 refscale: Change --torture type from refperf to refscale This commit renames the rcutorture config/refperf to config/refscale to further avoid conflation with the Linux kernel's perf feature. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney commit 1fbeb3a8c4de29433a8d230ee600b13d369b6c0f Author: Paul E. McKenney Date: Wed Jun 17 11:53:53 2020 -0700 refperf: Rename refperf.c to refscale.c and change internal names This commit further avoids conflation of refperf with the kernel's perf feature by renaming kernel/rcu/refperf.c to kernel/rcu/refscale.c, and also by similarly renaming the functions and variables inside this file. This has the side effect of changing the names of the kernel boot parameters, so kernel-parameters.txt and ver_functions.sh are also updated. The rcutorture --torture type remains refperf, and this will be addressed in a separate commit. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney commit 8e4ec3d02b549a731c94b4bcddff212bb92cdbaf Author: Paul E. McKenney Date: Wed Jun 17 11:33:54 2020 -0700 refperf: Rename RCU_REF_PERF_TEST to RCU_REF_SCALE_TEST The old Kconfig option name is all too easy to conflate with the unrelated "perf" feature, so this commit renames RCU_REF_PERF_TEST to RCU_REF_SCALE_TEST. Reported-by: Ingo Molnar Signed-off-by: Paul E. McKenney commit c7dcf8106f7570b133b05ff68fd4100064965d9d Author: Paul E. McKenney Date: Fri Jun 12 13:11:29 2020 -0700 rcu-tasks: Fix synchronize_rcu_tasks_trace() header comment The synchronize_rcu_tasks_trace() header comment incorrectly claims that any number of things delimit RCU Tasks Trace read-side critical sections, when in fact only rcu_read_lock_trace() and rcu_read_unlock_trace() do so. This commit therefore fixes this comment, and, while in the area, fixes a typo in the rcu_read_lock_trace() header comment. Reported-by: Alexei Starovoitov Signed-off-by: Paul E. McKenney commit e13ef442fe522fa1f604efec8c899a0e1fc3d426 Author: Paul E. McKenney Date: Wed Jun 3 11:56:34 2020 -0700 refperf: Add test for RCU Tasks readers This commit adds testing for RCU Tasks readers to the refperf module. This also applies to RCU Rude readers, as both flavors have empty (as in non-existent) read-side markers. Signed-off-by: Paul E. McKenney commit 72bb749e7048d0a8d7663b59ec1a33bd56c51083 Author: Paul E. McKenney Date: Tue Jun 2 08:34:41 2020 -0700 refperf: Add test for RCU Tasks Trace readers. This commit adds testing for RCU Tasks Trace readers to the refperf module. Signed-off-by: Paul E. McKenney commit 918b351d965560c7902ad482cf87049517843ff2 Author: Paul E. McKenney Date: Sun May 31 18:14:57 2020 -0700 refperf: Change readdelay module parameter to nanoseconds The current units of microseconds are too coarse, so this commit changes the units to nanoseconds. However, ndelay is used only for the nanoseconds with udelay being used for whole microseconds. For example, setting refperf.readdelay=1500 results in a udelay(1) followed by an ndelay(500). Suggested-by: Akira Yokosawa [ paulmck: Abstracted delay per Akira feedback and move from 80 to 100 lines. ] [ paulmck: Fix names as suggested by kbuild test robot. ] Signed-off-by: Paul E. McKenney commit 7c944d7c67daee84e3c756bb74ad2f32b28c41cf Author: Arnd Bergmann Date: Fri May 29 14:36:26 2020 -0700 refperf: Work around 64-bit division A 64-bit division was introduced in refperf, breaking compilation on all 32-bit architectures: kernel/rcu/refperf.o: in function `main_func': refperf.c:(.text+0x57c): undefined reference to `__aeabi_uldivmod' Fix this by using div_u64 to mark the expensive operation. [ paulmck: Update primitive and format per Nathan Chancellor. ] Fixes: bd5b16d6c88d ("refperf: Allow decimal nanoseconds") Reported-by: kbuild test robot Reported-by: Valdis Klētnieks Acked-by: Randy Dunlap # build-tested Signed-off-by: Arnd Bergmann Signed-off-by: Paul E. McKenney commit 847dd70aa971a67b4dfdb8f131428dfb90d88714 Author: Paul E. McKenney Date: Fri May 29 14:24:03 2020 -0700 doc: Document rcuperf's module parameters This commit adds documentation for the rcuperf module parameters. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 4dd72a338a07486823037a6b45334d05192c913a Author: Paul E. McKenney Date: Fri May 29 13:11:26 2020 -0700 refperf: Adjust refperf.loop default value With the various measurement optimizations, 10,000 loops normally suffices. This commit therefore reduces the refperf.loops default value from 10,000,000 to 10,000. Signed-off-by: Paul E. McKenney commit b4d1e34f6502a138e32275baabdb6d593d7ea432 Author: Paul E. McKenney Date: Thu May 28 16:37:35 2020 -0700 refperf: Add read-side delay module parameter This commit adds a refperf.readdelay module parameter that controls the duration of each critical section. This parameter allows gathering data showing how the performance differences between the various primitives vary with critical-section length. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 96af8669591d740a1e2695c4d96e544409dbf896 Author: Paul E. McKenney Date: Wed May 27 16:46:56 2020 -0700 refperf: Simplify initialization-time wakeup protocol This commit moves the reader-launch wait loop from ref_perf_init() to main_func(), removing one layer of wakeup and allowing slightly faster system boot. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 9d1914d34cebe111a23ab1670633900fd770cec3 Author: Paul E. McKenney Date: Tue May 26 15:30:09 2020 -0700 refperf: Output per-experiment data points Currently, it is necessary to manually edit the console output to see anything more than statistics, and sometimes the statistics can indicate outliers that need more investigation. This commit therefore dumps out the per-experiment measurements, sorted in ascending order, just before dumping out the statistics. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 6efb06340846c788336f402e3a472a24fabb431e Author: Paul E. McKenney Date: Tue May 26 14:26:25 2020 -0700 refperf: Label experiment-number column "Runs" The experiment-number column is currently labeled "Threads", which is misleading at best. This commit therefore relabels it as "Runs", and adjusts the scripts accordingly. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 2db0bda38453f472640f4ece1e2a495cbd44f892 Author: Paul E. McKenney Date: Tue May 26 12:34:57 2020 -0700 refperf: Add warmup and cooldown processing phases This commit causes all the readers to start running unmeasured load until all readers have done at least one such run (thus having warmed up), then run the measured load, and then run unmeasured load until all readers have completed their measured load. This approach avoids any thread running measured load while other readers are idle. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 86e0da2bb8ed934d3dce5a337895f1118f59c087 Author: Paul E. McKenney Date: Tue May 26 11:40:52 2020 -0700 refperf: More closely synchronize reader start times Currently, readers are awakened individually. On most systems, this results in significant wakeup delay from one reader to the next, which can result in the first and last reader having sole access to the synchronization primitive in question. If that synchronization primitive involves shared memory, those readers will rack up a huge number of operations in a very short time, causing large perturbations in the results. This commit therefore has the readers busy-wait after being awakened, and uses a new n_started variable to synchronize their start times. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit af2789db13b8dc38d16e969f8c11b9468be42d46 Author: Paul E. McKenney Date: Tue May 26 11:22:03 2020 -0700 refperf: Convert reader_task structure's "start" field to int This commit converts the reader_task structure's "start" field to int in order to demote a full barrier to an smp_load_acquire() and also to simplify the code a bit. While in the area, and to enlist the compiler's help in ensuring that nothing was missed, the field's name was changed to start_reader. Also while in the area, change the main_func() store to use smp_store_release() to further fortify against wait/wake races. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit b864f89ff61492f56b4e8c6713a5efec6540a0e2 Author: Paul E. McKenney Date: Tue May 26 10:57:34 2020 -0700 refperf: Tune reader measurement interval This commit moves a printk() out of the measurement interval, converts a atomic_dec()/atomic_read() pair to atomic_dec_and_test(), and adds a smp_mb__before_atomic() to avoid potential wake/wait hangs. These changes have the added benefit of reducing the number of loops required for amortizing loop overhead for CONFIG_PREEMPT=n RCU measurements from 1,000,000 to 10,000. This reduction in turn shortens the test, reducing the probability of interference. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 2990750bceb05c3cdeae3a6d2683cbc4ae4de15e Author: Paul E. McKenney Date: Tue May 26 09:32:57 2020 -0700 refperf: Make functions static Because the reset_readers() and process_durations() functions are used only within kernel/rcu/refperf.c, this commit makes them static. Reported-by: kbuild test robot Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 2e90de76f226f11fe26c871aa321be28152f565a Author: Paul E. McKenney Date: Mon May 25 17:45:03 2020 -0700 refperf: Dynamically allocate thread-summary output buffer Currently, the buffer used to accumulate the thread-summary output is fixed size, which will cause problems if someone decides to run on a large number of PCUs. This commit therefore dynamically allocates this buffer. [ paulmck: Fix memory allocation as suggested by KASAN. ] Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit f518f154ecef347777db33b7c9b0581f245159f0 Author: Paul E. McKenney Date: Mon May 25 17:32:56 2020 -0700 refperf: Dynamically allocate experiment-summary output buffer Currently, the buffer used to accumulate the experiment-summary output is fixed size, which will cause problems if someone decides to run one hundred experiments. This commit therefore dynamically allocates this buffer. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit dbf28efdae7bb51032eeb0fe1b6bd07d6f0f9b6c Author: Paul E. McKenney Date: Mon May 25 17:22:24 2020 -0700 refperf: Provide module parameter to specify number of experiments The current code uses the number of threads both to limit the number of threads and to specify the number of experiments, but also varies the number of threads as the experiments progress. This commit takes a different approach by adding an refperf.nruns module parameter that specifies the number of experiments, and furthermore uses the same number of threads for each experiment. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 8fc28783a0c3704ea27505a25dbde8333d75380c Author: Paul E. McKenney Date: Mon May 25 15:48:38 2020 -0700 refperf: Convert nreaders to a module parameter This commit converts nreaders to a module parameter, with the default of -1 specifying the old behavior of using 75% of the readers. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 83b88c86da0e5f97faeac5a9bb19fe32f8c0394b Author: Paul E. McKenney Date: Mon May 25 15:31:07 2020 -0700 refperf: Allow decimal nanoseconds The CONFIG_PREEMPT=n rcu_read_lock()/rcu_read_unlock() pair's overhead, even including loop overhead, is far less than one nanosecond. Since logscale plots are not all that happy with zero values, provide picoseconds as decimals. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 75dd8efef56ed5959c398974c785026f84aa0d1a Author: Paul E. McKenney Date: Mon May 25 14:59:06 2020 -0700 refperf: Hoist function-pointer calls out of the loop Current runs show PREEMPT=n rcu_read_lock()/rcu_read_unlock() pairs consuming between 20 and 30 nanoseconds, when in fact the actual value is zero, give or take the barrier() asm's effect on compiler optimizations. The additional overhead is caused by function calls through pointers (especially in these days of Spectre mitigations) and perhaps also needless argument passing, a non-const loop limit, and an upcounting loop. This commit therefore combines the ->readlock() and ->readunlock() function pointers into a single ->readsection() function pointer that takes the loop count as a const parameter and keeps any data passed from the read-lock to the read-unlock internal to this new function. These changes reduce the measured overhead of the aforementioned PREEMPT=n rcu_read_lock()/rcu_read_unlock() pairs from between 20 and 30 nanoseconds to somewhere south of 500 picoseconds. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 777a54c908ec69fa0eccab54068a49ecda38ffde Author: Paul E. McKenney Date: Mon May 25 14:16:44 2020 -0700 refperf: Add holdoff parameter to allow CPUs to come online This commit adds an rcuperf module parameter named "holdoff" that defaults to 10 seconds if refperf is built in and to zero otherwise. The assumption is that all the CPUs are online by the time that the modprobe and insmod commands are going to do anything, and that normal systems will have all the CPUs online within ten seconds. Larger systems may take many tens of seconds or even minutes to get to this point, hence this being a module parameter instead of being a hard-coded constant. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit f8b4bb23ec014a5d16663ad70b45d9f46c456ec4 Author: Paul E. McKenney Date: Mon May 25 14:07:52 2020 -0700 torture: Add refperf to the rcutorture scripting This commit updates the rcutorture scripting to include the new refperf torture-test module. Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 708cda31652c02e64adaeafafe7b996e4e14c3eb Author: Paul E. McKenney Date: Mon May 25 09:22:24 2020 -0700 rcuperf: Add comments explaining the high reader overhead This commit adds comments explaining why the readers have otherwise insane levels of measurement overhead, namely that they are intended as a test load for update-side performance measurements, not as a straight-up read-side performance test. Signed-off-by: Paul E. McKenney commit 653ed64b01dc5989f8f579d0038e987476c2c023 Author: Joel Fernandes (Google) Date: Mon May 25 00:36:48 2020 -0400 refperf: Add a test to measure performance of read-side synchronization Add a test for comparing the performance of RCU with various read-side synchronization mechanisms. The test has proved useful for collecting data and performing these comparisons. Currently RCU, SRCU, reader-writer lock, reader-writer semaphore and reference counting can be measured using refperf.perf_type parameter. Each invocation of the test runs measures performance of a specific mechanism. The maximum number of CPUs to concurrently run readers on is chosen by the test itself and is 75% of the total number of CPUs. So if you had 24 CPUs, the test runs with a maximum of 18 parallel readers. A number of experiments are conducted, and in each experiment, the number of readers is increased by 1, upto the 75% of CPUs mark. During each experiment, all readers execute an empty loop with refperf.loops iterations and time the total loop duration. This is then averaged. Example output: Parameters "refperf.perf_type=srcu refperf.loops=2000000" looks like: [ 3.347133] srcu-ref-perf: [ 3.347133] Threads Time(ns) [ 3.347133] 1 36 [ 3.347133] 2 34 [ 3.347133] 3 34 [ 3.347133] 4 34 [ 3.347133] 5 33 [ 3.347133] 6 33 [ 3.347133] 7 33 [ 3.347133] 8 33 [ 3.347133] 9 33 [ 3.347133] 10 33 [ 3.347133] 11 33 [ 3.347133] 12 33 [ 3.347133] 13 33 [ 3.347133] 14 33 [ 3.347133] 15 32 [ 3.347133] 16 33 [ 3.347133] 17 33 [ 3.347133] 18 34 Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 7e866460cc18797b3a59360f5f8c444598a21729 Author: Joel Fernandes (Google) Date: Mon May 25 00:36:47 2020 -0400 rcuperf: Remove useless while loops around wait_event wait_event() already retries if the condition for the wake up is not satisifed after wake up. Remove them from the rcuperf test. Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 30d8aa5128f12c9d781b67c9694c1abfa4f6ce6a Author: Paul E. McKenney Date: Tue Jun 9 09:24:51 2020 -0700 rcu-tasks: Fix code-style issues This commit declares trc_n_readers_need_end and trc_wait static and replaced a "&" with "&&". The "&" happened to work because the values are bool, but accidents waiting to happen and all that... Reported-by: kbuild test robot Signed-off-by: Paul E. McKenney commit 8344496e8b49c4122c1808d6cd3f8dc71bccb595 Author: Paul E. McKenney Date: Thu May 28 20:03:48 2020 -0700 rcu-tasks: Conditionally compile show_rcu_tasks_gp_kthreads() The show_rcu_tasks_gp_kthreads() function is not invoked by Tiny RCU, but is nevertheless defined in Tiny RCU builds that enable Tasks Trace RCU. This commit therefore conditionally compiles this function so that it is defined only in builds that actually use it. Reported-by: kbuild test robot Signed-off-by: Paul E. McKenney commit 5b3cc99bedf5885055fbaf35fe63d205f06b5be5 Author: Paul E. McKenney Date: Thu May 28 19:33:47 2020 -0700 rcu-tasks: Add #include of rcupdate_trace.h to update.c Although this is in some strict sense unnecessary, it is good to allow the compiler to compare the function declaration with its definition. This commit therefore adds a #include of linux/rcupdate_trace.h to kernel/rcu/update.c. Reported-by: kbuild test robot Signed-off-by: Paul E. McKenney commit 04a3c5aa7a8cb2ce97f9beb627ba742bc8b0fe03 Author: Paul E. McKenney Date: Thu May 28 19:27:06 2020 -0700 rcu-tasks: Make rcu_tasks_postscan() be static The rcu_tasks_postscan() function is not used outside of RCU's tasks.h file, so this commit makes it be static. Reported-by: kbuild test robot Signed-off-by: Paul E. McKenney commit ea6eed9f7d7382c7230202d4c3bf74185f193394 Author: Paul E. McKenney Date: Thu May 7 16:47:13 2020 -0700 rcu-tasks: Convert sleeps to idle priority This commit converts the long-standing schedule_timeout_interruptible() and schedule_timeout_uninterruptible() calls used by the various Tasks RCU's grace-period kthreads to schedule_timeout_idle(). This conversion avoids polluting the load-average with Tasks-RCU-related sleeping. Signed-off-by: Paul E. McKenney commit da4fc00abb97ce1269b0940abe86e25456e28424 Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:48:00 2020 +0200 lib/test_vmalloc.c: Add test cases for kvfree_rcu() Introduce four new test cases for testing the kvfree_rcu() interface. Two of them belong to single argument functionality and another two for 2-argument functionality. The aim is to stress and check how kvfree_rcu() behaves under different load and memory conditions and analyze its performance throughput. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 1835f475e3518ade61e25a57572c78b953778656 Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:59 2020 +0200 rcu: Introduce single argument kvfree_rcu() interface Make kvfree_rcu() capable of freeing objects that will not embed an rcu_head within it. This saves storage overhead in such objects. Reclaiming headless objects this way requires only a single argument (pointer to the object). After this patch, there are two ways to use kvfree_rcu(): a) kvfree_rcu(ptr, rhf); struct X { struct rcu_head rhf; unsigned char data[100]; }; void *ptr = kvmalloc(sizeof(struct X), GFP_KERNEL); if (ptr) kvfree_rcu(ptr, rhf); b) kvfree_rcu(ptr); void *ptr = kvmalloc(some_bytes, GFP_KERNEL); if (ptr) kvfree_rcu(ptr); Note that the headless usage (example b) can only be used in a code that can sleep. This is enforced by the CONFIG_DEBUG_ATOMIC_SLEEP option. Co-developed-by: Joel Fernandes (Google) Reviewed-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 3042f83f19bec2e0cd356f72b39e4d816e8cd5ff Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:58 2020 +0200 rcu: Support reclaim for head-less object Update the kvfree_call_rcu() function with head-less support. This allows RCU to reclaim objects without an embedded rcu_head. tree-RCU: We introduce two chains of arrays to store SLAB-backed and vmalloc pointers, each. Storage in either of these arrays does not require embedding an rcu_head within the object. Maintaining the arrays may become impossible due to high memory pressure. For such cases there is an emergency path. Objects with rcu_head inside are just queued on a backup rcu_head list. Later on that list is drained. As for the head-less variant, as the current context can sleep, the following emergency measures are applied: a) Synchronously wait until a grace period has elapsed. b) Call kvfree(). tiny-RCU: For double argument calls, there are no new changes in behavior. For single argument call, kvfree() is directly inlined on the current stack after a synchronize_rcu() call. Note that for tiny-RCU, any call to synchronize_rcu() is actually a quiescent state, therefore it does nothing. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Joel Fernandes (Google) Co-developed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit ce4dce123fdcb5f209752d13f9f06926be65fc78 Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:57 2020 +0200 rcu: Introduce 2 arg kvfree_rcu() interface kvmalloc() can allocate two types of objects: SLAB backed and vmalloc backed. How it behaves depends on requested object's size and memory pressure. Add a kvfree_rcu() interface that can free memory allocated via kvmalloc(). It is a simple alias to kfree_rcu() which can now handle either type of object. struct test_kvfree_rcu { struct rcu_head rcu; unsigned char array[100]; }; struct test_kvfree_rcu *p; p = kvmalloc(10 * PAGE_SIZE); if (p) kvfree_rcu(p, rcu); Signed-off-by: Uladzislau Rezki (Sony) Co-developed-by: Joel Fernandes (Google) Reviewed-by: Joel Fernandes (Google) Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit e0feed08ab41df0fedc38d35938891ef5715c1d3 Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:56 2020 +0200 mm/list_lru.c: Rename kvfree_rcu() to local variant Rename kvfree_rcu() function to the kvfree_rcu_local() one. The purpose is to prevent a conflict of two same function declarations. The kvfree_rcu() will be globally visible what would lead to a build error. No functional change. Cc: linux-mm@kvack.org Cc: rcu@vger.kernel.org Cc: Andrew Morton Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Joel Fernandes (Google) Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit c408b215f58f7156bb6bafb64c0263ee907033df Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:55 2020 +0200 rcu: Rename *_kfree_callback/*_kfree_rcu_offset/kfree_call_* The following changes are introduced: 1. Rename rcu_invoke_kfree_callback() to rcu_invoke_kvfree_callback(), as well as the associated trace events, so the rcu_kfree_callback(), becomes rcu_kvfree_callback(). The reason is to be aligned with kvfree() notation. 2. Rename __is_kfree_rcu_offset to __is_kvfree_rcu_offset. All RCU paths use kvfree() now instead of kfree(), thus rename it. 3. Rename kfree_call_rcu() to the kvfree_call_rcu(). The reason is, it is capable of freeing vmalloc() memory now. Do the same with __kfree_rcu() macro, it becomes __kvfree_rcu(), the goal is the same. Reviewed-by: Joel Fernandes (Google) Co-developed-by: Joel Fernandes (Google) Signed-off-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 64d1d06ccb1b7de245ccf781b91517f328bebd9f Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:54 2020 +0200 rcu/tiny: support vmalloc in tiny-RCU Replace kfree() with kvfree() in rcu_reclaim_tiny(). This makes it possible to release either SLAB or vmalloc objects after a GP. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 5f3c8d620447d509e534962e23f7edfb85f4e533 Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:53 2020 +0200 rcu/tree: Maintain separate array for vmalloc ptrs To do so, we use an array of kvfree_rcu_bulk_data structures. It consists of two elements: - index number 0 corresponds to slab pointers. - index number 1 corresponds to vmalloc pointers. Keeping vmalloc pointers separated from slab pointers makes it possible to invoke the right freeing API for the right kind of pointer. It also prepares us for future headless support for vmalloc and SLAB objects. Such objects cannot be queued on a linked list and are instead directly into an array. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Joel Fernandes (Google) Reviewed-by: Joel Fernandes (Google) Co-developed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 53c72b590b3a0afd6747d6f7957e6838003e90a4 Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:52 2020 +0200 rcu/tree: cache specified number of objects In order to reduce the dynamic need for pages in kfree_rcu(), pre-allocate a configurable number of pages per CPU and link them in a list. When kfree_rcu() reclaims objects, the object's container page is cached into a list instead of being released to the low-level page allocator. Such an approach provides O(1) access to free pages while also reducing the number of requests to the page allocator. It also makes the kfree_rcu() code to have free pages available during a low memory condition. A read-only sysfs parameter (rcu_min_cached_objs) reflects the minimum number of allowed cached pages per CPU. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 69f08d3999dbef1553a3332b8055282dd3893b6c Author: Sebastian Andrzej Siewior Date: Mon May 25 23:47:51 2020 +0200 rcu/tree: Use static initializer for krc.lock The per-CPU variable is initialized at runtime in kfree_rcu_batch_init(). This function is invoked before 'rcu_scheduler_active' is set to 'RCU_SCHEDULER_RUNNING'. After the initialisation, '->initialized' is to true. The raw_spin_lock is only acquired if '->initialized' is set to true. The worqueue item is only used if 'rcu_scheduler_active' set to RCU_SCHEDULER_RUNNING which happens after initialisation. Use a static initializer for krc.lock and remove the runtime initialisation of the lock. Since the lock can now be always acquired, remove the '->initialized' check. Cc: Sebastian Andrzej Siewior Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 952371d6fc0bc360d1d5780f86bb355836117ca2 Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:50 2020 +0200 rcu/tree: Move kfree_rcu_cpu locking/unlocking to separate functions Introduce helpers to lock and unlock per-cpu "kfree_rcu_cpu" structures. That will make kfree_call_rcu() more readable and prevent programming errors. Reviewed-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 3af84862817403d317dc33312e7a88d76e79401a Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:49 2020 +0200 rcu/tree: Simplify KFREE_BULK_MAX_ENTR macro We can simplify KFREE_BULK_MAX_ENTR macro and get rid of magic numbers which were used to make the structure to be exactly one page. Suggested-by: Boqun Feng Reviewed-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 446044eb9c9c335d3ae1be4665193ab43ebb284e Author: Joel Fernandes (Google) Date: Mon May 25 23:47:48 2020 +0200 rcu/tree: Make debug_objects logic independent of rcu_head kfree_rcu()'s debug_objects logic uses the address of the object's embedded rcu_head to queue/unqueue. Instead of this, make use of the object's address itself as preparation for future headless kfree_rcu() support. Reviewed-by: Uladzislau Rezki Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 594aa5975b9b5cfe9edaec06170e43b8c0607377 Author: Uladzislau Rezki (Sony) Date: Mon May 25 23:47:47 2020 +0200 rcu/tree: Repeat the monitor if any free channel is busy It is possible that one of the channels cannot be detached because its free channel is busy and previously queued data has not been processed yet. On the other hand, another channel can be successfully detached causing the monitor work to stop. Prevent that by rescheduling the monitor work if there are any channels in the pending state after a detach attempt. Fixes: 34c881745549e ("rcu: Support kfree_bulk() interface in kfree_rcu()") Acked-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 4d2919411867848fab78c7cb13139e17ad8b85bc Author: Joel Fernandes (Google) Date: Mon May 25 23:47:46 2020 +0200 rcu/tree: Skip entry into the page allocator for PREEMPT_RT To keep the kfree_rcu() code working in purely atomic sections on RT, such as non-threaded IRQ handlers and raw spinlock sections, avoid calling into the page allocator which uses sleeping locks on RT. In fact, even if the caller is preemptible, the kfree_rcu() code is not, as the krcp->lock is a raw spinlock. Calling into the page allocator is optional and avoiding it should be Ok, especially with the page pre-allocation support in future patches. Such pre-allocation would further avoid the a need for a dynamically allocated page in the first place. Cc: Sebastian Andrzej Siewior Reviewed-by: Uladzislau Rezki Co-developed-by: Uladzislau Rezki Signed-off-by: Uladzislau Rezki Signed-off-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 8ac88f7177c75bf9b7b8c29a8054115e1c712baf Author: Joel Fernandes (Google) Date: Mon May 25 23:47:45 2020 +0200 rcu/tree: Keep kfree_rcu() awake during lock contention On PREEMPT_RT kernels, the krcp spinlock gets converted to an rt-mutex and causes kfree_rcu() callers to sleep. This makes it unusable for callers in purely atomic sections such as non-threaded IRQ handlers and raw spinlock sections. Fix it by converting the spinlock to a raw spinlock. Vetting all code paths, there is no reason to believe that the raw spinlock will hurt RT latencies as it is not held for a long time. Cc: bigeasy@linutronix.de Cc: Uladzislau Rezki Reviewed-by: Uladzislau Rezki Signed-off-by: Joel Fernandes (Google) Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 8e11690d2f5a9823d66f68918c3986b4e9e160ab Author: Mauro Carvalho Chehab Date: Mon May 4 14:35:00 2020 +0200 rcu: Fix a kernel-doc warnings for "count" There are some kernel-doc warnings: ./kernel/rcu/tree.c:2915: warning: Function parameter or member 'count' not described in 'kfree_rcu_cpu' This commit therefore moves the comment for "count" to the kernel-doc markup. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit 24692fa22c30cb8fcfcabdc07a3c82964475b639 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:46:49 2020 +0200 rcu: Fix some kernel-doc warnings The current code provokes some kernel-doc warnings: ./kernel/rcu/tree.c:2915: warning: Function parameter or member 'count' not described in 'kfree_rcu_cpu' ./include/linux/rculist.h:517: warning: bad line: [@right ][node2 ... ] ./include/linux/rculist.h:2: WARNING: Unexpected indentation. This commit therefore moves the comment for "count" to the kernel-doc markup and adds a missing "*" on one kernel-doc continuation line. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit c3cb47a6cc74af0b79579ba167d7124eb669fbaa Author: Randy Dunlap Date: Mon Jun 15 12:28:05 2020 -0700 kernel/rcu/tree.c: Fix kernel-doc warnings Fix kernel-doc warning: ../kernel/rcu/tree.c:959: warning: Excess function parameter 'irq' description in 'rcu_nmi_enter' Fixes: cf7614e13c8f ("rcu: Refactor rcu_{nmi,irq}_{enter,exit}()") Signed-off-by: Randy Dunlap Cc: Byungchul Park Cc: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 7a0c2b0940c13a06573320ab7118375b35feef8b Author: Wei Yang Date: Fri Jun 12 10:07:54 2020 +0800 rcu: grpnum just records group number The ->grpnum field in the rcu_node structure contains the bit position in this structure's parent's bitmasks, which is not the CPU number. This commit therefore adjusts this field's comment accordingly. Signed-off-by: Wei Yang Signed-off-by: Paul E. McKenney commit a2dae43088d51c4869e7fa91ca09bcc890e277fc Author: Wei Yang Date: Fri Jun 12 10:07:53 2020 +0800 rcu: grplo/grphi just records CPU number The ->grplo and ->grphi fields store the lowest and highest CPU number covered by to a rcu_node structure, which is not the group number. This commit therefore adjusts these fields' comments to match reality. Signed-off-by: Wei Yang Signed-off-by: Paul E. McKenney commit 00943a609d7ad0f08e58bc9c214f38b0ba163c88 Author: Wei Yang Date: Fri Jun 12 10:07:52 2020 +0800 rcu: gp_max is protected by root rcu_node's lock Because gp_max is protected by root rcu_node's lock, this commit moves the gp_max definition to the region of the rcu_node structure containing fields protected by this lock. Signed-off-by: Wei Yang Signed-off-by: Paul E. McKenney commit c6dfd72b7a3b70a2054db0f73245ea2f762a8452 Author: Peter Enderborg Date: Thu Jun 4 12:23:20 2020 +0200 rcu: Stop shrinker loop The count and scan can be separated in time, and there is a fair chance that all work is already done when the scan starts, which might in turn result in a needless retry. This commit therefore avoids this retry by returning SHRINK_STOP. Reviewed-by: Uladzislau Rezki (Sony) Signed-off-by: Peter Enderborg Signed-off-by: Paul E. McKenney commit e40bb921119814c6f746891af9cd37eccda616a4 Author: Jules Irenge Date: Mon Jun 1 19:45:49 2020 +0100 rcu: Replace 1 with true Coccinelle reports a warning WARNING: Assignment of 0/1 to bool variable The root cause is that the variable lastphase is a bool, but is initialised with integer 1. This commit therefore replaces the 1 with a true. Signed-off-by: Jules Irenge Signed-off-by: Paul E. McKenney commit d29e0b26b020422cc51b5b51733cc50fcf443965 Author: Paul E. McKenney Date: Thu May 28 08:49:29 2020 -0700 lockdep: Complain only once about RCU in extended quiescent state Currently, lockdep_rcu_suspicious() complains twice about RCU read-side critical sections being invoked from within extended quiescent states, for example: RCU used illegally from idle CPU! rcu_scheduler_active = 2, debug_locks = 1 RCU used illegally from extended quiescent state! This commit therefore saves a couple lines of code and one line of console-log output by eliminating the first of these two complaints. Link: https://lore.kernel.org/lkml/87wo4wnpzb.fsf@nanos.tec.linutronix.de Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Signed-off-by: Paul E. McKenney commit 04b25a495bd68c1dad07263fb91e8b5a31c00a9e Author: Paul E. McKenney Date: Tue May 19 17:00:54 2020 -0700 rcu: Mark rcu_nmi_enter() call to rcu_cleanup_after_idle() noinstr The objtool complains about the call to rcu_cleanup_after_idle() from rcu_nmi_enter(), so this commit adds instrumentation_begin() before that call and instrumentation_end() after it. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Paul E. McKenney commit 55fbe86ef303bc8ab040e579fba34a750c08200e Author: Paul E. McKenney Date: Tue May 19 15:02:02 2020 -0700 rcu: Remove initialized but unused rnp from check_slow_task() This commit removes the variable rnp from check_slow_task(), which is defined, assigned to, but not otherwise used. Reported-by: kbuild test robot Signed-off-by: Paul E. McKenney commit 3c8920e2dbd1a55f72dc14d656df9d0097cf5c72 Author: Frederic Weisbecker Date: Fri May 15 02:34:29 2020 +0200 tick/nohz: Narrow down noise while setting current task's tick dependency Setting a tick dependency on any task, including the case where a task sets that dependency on itself, triggers an IPI to all CPUs. That is of course suboptimal but it had previously not been an issue because it was only used by POSIX CPU timers on nohz_full, which apparently never occurs in latency-sensitive workloads in production. (Or users of such systems are suffering in silence on the one hand or venting their ire on the wrong people on the other.) But RCU now sets a task tick dependency on the current task in order to fix stall issues that can occur during RCU callback processing. Thus, RCU callback processing triggers frequent system-wide IPIs from nohz_full CPUs. This is quite counter-productive, after all, avoiding IPIs is what nohz_full is supposed to be all about. This commit therefore optimizes tasks' self-setting of a task tick dependency by using tick_nohz_full_kick() to avoid the system-wide IPI. Instead, only the execution of the one task is disturbed, which is acceptable given that this disturbance is well down into the noise compared to the degree to which the RCU callback processing itself disturbs execution. Fixes: 6a949b7af82d (rcu: Force on tick when invoking lots of callbacks) Reported-by: Matt Fleming Signed-off-by: Frederic Weisbecker Cc: stable@kernel.org Cc: Paul E. McKenney Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Ingo Molnar Signed-off-by: Paul E. McKenney commit 360fbbb4897c98971e8955b063c01250817a2191 Author: Lihao Liang Date: Thu May 14 21:34:34 2020 +0100 rcu: Update comment from rsp->rcu_gp_seq to rsp->gp_seq Signed-off-by: Lihao Liang Signed-off-by: Paul E. McKenney commit 9f47eb5461aaeb6cb8696f9d11503ae90e4d5cb0 Author: Paul E. McKenney Date: Fri May 8 14:15:37 2020 -0700 fs/btrfs: Add cond_resched() for try_release_extent_mapping() stalls Very large I/Os can cause the following RCU CPU stall warning: RIP: 0010:rb_prev+0x8/0x50 Code: 49 89 c0 49 89 d1 48 89 c2 48 89 f8 e9 e5 fd ff ff 4c 89 48 10 c3 4c = 89 06 c3 4c 89 40 10 c3 0f 1f 00 48 8b 0f 48 39 cf 74 38 <48> 8b 47 10 48 85 c0 74 22 48 8b 50 08 48 85 d2 74 0c 48 89 d0 48 RSP: 0018:ffffc9002212bab0 EFLAGS: 00000287 ORIG_RAX: ffffffffffffff13 RAX: ffff888821f93630 RBX: ffff888821f93630 RCX: ffff888821f937e0 RDX: 0000000000000000 RSI: 0000000000102000 RDI: ffff888821f93630 RBP: 0000000000103000 R08: 000000000006c000 R09: 0000000000000238 R10: 0000000000102fff R11: ffffc9002212bac8 R12: 0000000000000001 R13: ffffffffffffffff R14: 0000000000102000 R15: ffff888821f937e0 __lookup_extent_mapping+0xa0/0x110 try_release_extent_mapping+0xdc/0x220 btrfs_releasepage+0x45/0x70 shrink_page_list+0xa39/0xb30 shrink_inactive_list+0x18f/0x3b0 shrink_lruvec+0x38e/0x6b0 shrink_node+0x14d/0x690 do_try_to_free_pages+0xc6/0x3e0 try_to_free_mem_cgroup_pages+0xe6/0x1e0 reclaim_high.constprop.73+0x87/0xc0 mem_cgroup_handle_over_high+0x66/0x150 exit_to_usermode_loop+0x82/0xd0 do_syscall_64+0xd4/0x100 entry_SYSCALL_64_after_hwframe+0x44/0xa9 On a PREEMPT=n kernel, the try_release_extent_mapping() function's "while" loop might run for a very long time on a large I/O. This commit therefore adds a cond_resched() to this loop, providing RCU any needed quiescent states. Signed-off-by: Paul E. McKenney commit 68c2f27e01f61760e6ae76fff9682e1ffe9bacb6 Author: Paul E. McKenney Date: Thu May 7 16:38:29 2020 -0700 rcu: Expedited grace-period sleeps to idle priority This commit converts the schedule_timeout_uninterruptible() call used by RCU's expedited grace-period processing to schedule_timeout_idle(). This conversion avoids polluting the load-average with RCU-related sleeping. Signed-off-by: Paul E. McKenney commit f5ca34643bbd84f514bdeee194c45dd1fb066ef2 Author: Paul E. McKenney Date: Thu May 7 16:36:10 2020 -0700 rcu: No-CBs-related sleeps to idle priority This commit converts the schedule_timeout_interruptible() call used by RCU's no-CBs grace-period kthreads to schedule_timeout_idle(). This conversion avoids polluting the load-average with RCU-related sleeping. Signed-off-by: Paul E. McKenney commit a9352f72d6a9e8fe4840b9f0d97af8f5a6c52c79 Author: Paul E. McKenney Date: Thu May 7 16:34:38 2020 -0700 rcu: Priority-boost-related sleeps to idle priority This commit converts the long-standing schedule_timeout_interruptible() call used by RCU's priority-boosting kthreads to schedule_timeout_idle(). This conversion avoids polluting the load-average with RCU-related sleeping. Signed-off-by: Paul E. McKenney commit 77865dea25c4f45ce0c5bf61a8470af01fccd944 Author: Paul E. McKenney Date: Thu May 7 15:44:46 2020 -0700 rcu: Grace-period-kthread related sleeps to idle priority This commit converts the long-standing schedule_timeout_interruptible() and schedule_timeout_uninterruptible() calls used by RCU's grace-period kthread to schedule_timeout_idle(). This conversion avoids polluting the load-average with RCU-related sleeping. Signed-off-by: Paul E. McKenney commit 88748e330040ecf4681a2c8f344fd386862bf913 Author: Madhuparna Bhowmik Date: Mon May 4 08:05:05 2020 -0400 trace: events: rcu: Change description of rcu_dyntick trace event The different strings used for describing the polarity are Start, End and StillNonIdle. Since StillIdle is not used in any trace point for rcu_dyntick, it can be removed and StillNonIdle can be added in the description. Because StillNonIdle is used in a few tracepoints for rcu_dyntick. Similarly, USER, IDLE and IRQ are used for describing context in the rcu_dyntick tracepoints. Since, "KERNEL" is not used for any of the rcu_dyntick tracepoints, remove it from the description. Signed-off-by: Madhuparna Bhowmik Signed-off-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit f8466f94685b5bd931384526cf51e090fd2ac706 Author: Paul E. McKenney Date: Sun May 3 19:16:09 2020 -0700 rcu: Add comment documenting rcu_callback_map's purpose The rcu_callback_map lockdep_map structure was added back in 2013, but its purpose has become obscure. This commit therefore documments that the purpose of rcu_callback map is, in the words of commit 24ef659a857 ("rcu: Provide better diagnostics for blocking in RCU callback functions"), to help lockdep to tie an "inappropriate voluntary context switch back to the fact that the function is being invoked from within a callback." Signed-off-by: Paul E. McKenney commit e816d56fad57ba9817cef6606b12f5e14647c3bf Author: Paul E. McKenney Date: Fri May 1 16:49:48 2020 -0700 rcu: Add callbacks-invoked counters This commit adds a count of the callbacks invoked to the per-CPU rcu_data structure. This count is printed by the show_rcu_gp_kthreads() that is invoked by rcutorture and the RCU CPU stall-warning code. It is also intended for use by drgn. Signed-off-by: Paul E. McKenney commit abfce0414814149f716e1d30da1fb3140d1b3473 Author: Wei Yang Date: Sun Apr 19 21:57:15 2020 +0000 rcu: Simplify the calculation of rcu_state.ncpus There is only 1 bit set in mask, which means that the only difference between oldmask and the new one will be at the position where the bit is set in mask. This commit therefore updates rcu_state.ncpus by checking whether the bit in mask is already set in rnp->expmaskinitnext. Signed-off-by: Wei Yang Signed-off-by: Paul E. McKenney commit 0a3b3c253a1eb2c7fe7f34086d46660c909abeb3 Author: Paul E. McKenney Date: Thu Apr 16 16:46:10 2020 -0700 mm/mmap.c: Add cond_resched() for exit_mmap() CPU stalls A large process running on a heavily loaded system can encounter the following RCU CPU stall warning: rcu: INFO: rcu_sched self-detected stall on CPU rcu: 3-....: (20998 ticks this GP) idle=4ea/1/0x4000000000000002 softirq=556558/556558 fqs=5190 (t=21013 jiffies g=1005461 q=132576) NMI backtrace for cpu 3 CPU: 3 PID: 501900 Comm: aio-free-ring-w Kdump: loaded Not tainted 5.2.9-108_fbk12_rc3_3858_gb83b75af7909 #1 Hardware name: Wiwynn HoneyBadger/PantherPlus, BIOS HBM6.71 02/03/2016 Call Trace: dump_stack+0x46/0x60 nmi_cpu_backtrace.cold.3+0x13/0x50 ? lapic_can_unplug_cpu.cold.27+0x34/0x34 nmi_trigger_cpumask_backtrace+0xba/0xca rcu_dump_cpu_stacks+0x99/0xc7 rcu_sched_clock_irq.cold.87+0x1aa/0x397 ? tick_sched_do_timer+0x60/0x60 update_process_times+0x28/0x60 tick_sched_timer+0x37/0x70 __hrtimer_run_queues+0xfe/0x270 hrtimer_interrupt+0xf4/0x210 smp_apic_timer_interrupt+0x5e/0x120 apic_timer_interrupt+0xf/0x20 RIP: 0010:kmem_cache_free+0x223/0x300 Code: 88 00 00 00 0f 85 ca 00 00 00 41 8b 55 18 31 f6 f7 da 41 f6 45 0a 02 40 0f 94 c6 83 c6 05 9c 41 5e fa e8 a0 a7 01 00 41 56 9d <49> 8b 47 08 a8 03 0f 85 87 00 00 00 65 48 ff 08 e9 3d fe ff ff 65 RSP: 0018:ffffc9000e8e3da8 EFLAGS: 00000206 ORIG_RAX: ffffffffffffff13 RAX: 0000000000020000 RBX: ffff88861b9de960 RCX: 0000000000000030 RDX: fffffffffffe41e8 RSI: 000060777fe3a100 RDI: 000000000001be18 RBP: ffffea00186e7780 R08: ffffffffffffffff R09: ffffffffffffffff R10: ffff88861b9dea28 R11: ffff88887ffde000 R12: ffffffff81230a1f R13: ffff888854684dc0 R14: 0000000000000206 R15: ffff8888547dbc00 ? remove_vma+0x4f/0x60 remove_vma+0x4f/0x60 exit_mmap+0xd6/0x160 mmput+0x4a/0x110 do_exit+0x278/0xae0 ? syscall_trace_enter+0x1d3/0x2b0 ? handle_mm_fault+0xaa/0x1c0 do_group_exit+0x3a/0xa0 __x64_sys_exit_group+0x14/0x20 do_syscall_64+0x42/0x100 entry_SYSCALL_64_after_hwframe+0x44/0xa9 And on a PREEMPT=n kernel, the "while (vma)" loop in exit_mmap() can run for a very long time given a large process. This commit therefore adds a cond_resched() to this loop, providing RCU any needed quiescent states. Cc: Andrew Morton Cc: Reviewed-by: Shakeel Butt Reviewed-by: Joel Fernandes (Google) Signed-off-by: Paul E. McKenney commit 7ee880b7bf1dea88d0a472b775aebdb4fb6bf860 Author: Wei Yang Date: Wed Apr 15 22:26:55 2020 +0000 rcu: Initialize and destroy rcu_synchronize only when necessary The __wait_rcu_gp() function unconditionally initializes and cleans up each element of rs_array[], whether used or not. This is slightly wasteful and rather confusing, so this commit skips both initialization and cleanup for duplicate callback functions. Signed-off-by: Wei Yang Signed-off-by: Paul E. McKenney commit d93d97cbe0d4369153fb04954f1481a9f42aa5b6 Author: Paul E. McKenney Date: Mon May 11 19:52:34 2020 -0700 doc: Tasks RCU must protect instructions before trampoline Protecting the code in a trampoline can also require protecting a number of instructions prior to actually entering the trampoline. For example, these earlier instructions might be computing the address of the trampoline. This commit therefore updates RCU's requirements to record this for posterity. Link: https://lore.kernel.org/lkml/20200511154824.09a18c46@gandalf.local.home/ Reported-by: Lai Jiangshan Reported-by: Steven Rostedt Signed-off-by: Paul E. McKenney commit b81898e3d2133715e4475d25757595a3e18502ed Author: Paul E. McKenney Date: Thu Apr 30 12:23:11 2020 -0700 doc: Timer problems can cause RCU CPU stall warnings Over the past few years, there have been several cases where timekeeping bugs have caused RCU CPU stall warnings, particularly during hardware bringup. This commit therefore adds such bugs to the list of things that can result in RCU CPU stall warnings. Signed-off-by: Paul E. McKenney commit 2d9c318bfd15394da014737bee30e7b2e22c5eac Author: Mauro Carvalho Chehab Date: Tue Apr 21 19:04:11 2020 +0200 docs: RCU: Don't duplicate chapter names in rculist_nulls.rst Since changeset 58ad30cf91f0 ("docs: fix reference to core-api/namespaces.rst"), auto-references for chapters are generated. This is a nice feature, but has a drawback: no chapters can have the same sumber. So, we need to add two higher hierarchy chapters on this document, in order to avoid such duplication. Fixes: 58ad30cf91f0 ("docs: fix reference to core-api/namespaces.rst") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit f2286ab99549271f3cec73e305b9ecca95d91394 Author: Mauro Carvalho Chehab Date: Tue Apr 21 19:04:10 2020 +0200 docs: RCU: Convert stallwarn.txt to ReST - Add a SPDX header; - Adjust document and section titles; - Fix list markups; - Some whitespace fixes and new line breaks; - Mark literal blocks as such; - Add it to RCU/index.rst. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit 90c73cb2c65f9e78eb09a8cbcd4bcd4add2d3f4d Author: Mauro Carvalho Chehab Date: Tue Apr 21 19:04:07 2020 +0200 docs: RCU: Convert rcuref.txt to ReST - Add a SPDX header; - Adjust document title; - Some whitespace fixes and new line breaks; - Mark literal blocks as such; - Add it to RCU/index.rst. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit 43cb5451dffe0bc5d59688d4898c9a1f7c40d3b4 Author: Mauro Carvalho Chehab Date: Tue Apr 21 19:04:06 2020 +0200 docs: RCU: Convert torture.txt to ReST - Add a SPDX header; - Adjust document and section titles; - Some whitespace fixes and new line breaks; - Mark literal blocks as such; - Add it to RCU/index.rst. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit 2cdb54c93a7e5beb6f3f8b63575d9fb664dfc603 Author: Mauro Carvalho Chehab Date: Tue Apr 21 19:04:05 2020 +0200 docs: RCU: Convert rculist_nulls.txt to ReST - Add a SPDX header; - Adjust document title; - Some whitespace fixes and new line breaks; - Mark literal blocks as such; - Add it to RCU/index.rst. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit 058cc23bcad08aca62987cc795fe406ac39146d0 Author: Mauro Carvalho Chehab Date: Tue Apr 21 19:04:04 2020 +0200 docs: RCU: Convert lockdep.txt to ReST - Add a SPDX header; - Adjust document title; - Mark literal blocks as such; - Add it to RCU/index.rst. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit a3b0a79f8903f955250505f99d1e37b6c7d7b060 Author: Mauro Carvalho Chehab Date: Tue Apr 21 19:04:03 2020 +0200 docs: RCU: Convert lockdep-splat.txt to ReST - Add a SPDX header; - Add a document title; - Some whitespace fixes and new line breaks; - Mark literal blocks as such; - Add it to RCU/index.rst. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit 6b05dfacd761c6ace11def4b3b42fc6a7583fec3 Author: Mauro Carvalho Chehab Date: Tue Apr 21 19:04:02 2020 +0200 docs: RCU: Convert checklist.txt to ReST - Add a SPDX header; - Adjust document title; - Some whitespace fixes and new line breaks; - Use the right list markups; - Add it to RCU/index.rst. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit ea9dd8f61c8a890843f68e8dc0062ce78365aab8 Author: Marek Szyprowski Date: Mon Jun 29 12:02:18 2020 +0200 ARM: exynos: MCPM: Restore big.LITTLE cpuidle support Call exynos_cpu_power_up(cpunr) unconditionally. This is needed by the big.LITTLE cpuidle driver and has no side-effects on other code paths. The additional soft-reset call during little core power up has been added to properly boot all cores on the Exynos5422-based boards with secure firmware (like Odroid XU3/XU4 family). This however broke big.LITTLE CPUidle driver, which worked only on boards without secure firmware (like Peach-Pit/Pi Chromebooks). Apply the workaround only when board is running under secure firmware. Fixes: 833b5794e330 ("ARM: EXYNOS: reset Little cores when cpu is up") Signed-off-by: Marek Szyprowski Reviewed-by: Lukasz Luba Signed-off-by: Krzysztof Kozlowski commit f5e50bf4d3ef0aba4d5414c9ed51fa4a02e2ed12 Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:25 2020 +0200 thermal: Rename set_mode() to change_mode() set_mode() is only called when tzd's mode is about to change. Actual setting is performed in thermal_core, in thermal_zone_device_set_mode(). The meaning of set_mode() callback is actually to notify the driver about the mode being changed and giving the driver a chance to oppose such change. To better reflect the purpose of the method rename it to change_mode() Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-12-andrzej.p@collabora.com commit 5d7bd8aa7c35873f448d60ffbd996cfa151d2a11 Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:24 2020 +0200 thermal: Simplify or eliminate unnecessary set_mode() methods Setting polling_delay is now done at thermal_core level (by not polling DISABLED devices), so no need to repeat this code. int340x: Checking for an impossible enum value is unnecessary. acpi/thermal: It only prints debug messages. Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-11-andrzej.p@collabora.com commit b56bdff78e0b65fd2b2ed8eba4c645a7f71ba652 Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:23 2020 +0200 thermal: core: Stop polling DISABLED thermal devices Polling DISABLED devices is not desired, as all such "disabled" devices are meant to be handled by userspace. This patch introduces and uses should_stop_polling() to decide whether the device should be polled or not. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-10-andrzej.p@collabora.com commit bbcf90c0646ac797700269fa6645a6a46466c79f Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:22 2020 +0200 thermal: Explicitly enable non-changing thermal zone devices Some thermal zone devices never change their state, so they should be always enabled. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-9-andrzej.p@collabora.com commit 7f4957be0d5b83c8964491863202136c916107ae Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:21 2020 +0200 thermal: Use mode helpers in drivers Use thermal_zone_device_{en|dis}able() and thermal_zone_device_is_enabled(). Consequently, all set_mode() implementations in drivers: - can stop modifying tzd's "mode" member, - shall stop taking tzd's lock, as it is taken in the helpers - shall stop calling thermal_zone_device_update() as it is called in the helpers - can assume they are called when the mode truly changes, so checks to verify that can be dropped Not providing set_mode() by a driver no longer prevents the core from being able to set tzd's mode, so the relevant check in mode_store() is removed. Other comments: - acpi/thermal.c: tz->thermal_zone->mode will be updated only after we return from set_mode(), so use function parameter in thermal_set_mode() instead, no need to call acpi_thermal_check() in set_mode() - thermal/imx_thermal.c: regmap writes and mode assignment are done in thermal_zone_device_{en|dis}able() and set_mode() callback - thermal/intel/intel_quark_dts_thermal.c: soc_dts_{en|dis}able() are a part of set_mode() callback, so they don't need to modify tzd->mode, and don't need to fall back to the opposite mode if unsuccessful, as the return value will be propagated to thermal_zone_device_{en|dis}able() and ultimately tzd's member will not be changed in thermal_zone_device_set_mode(). - thermal/of-thermal.c: no need to set zone->mode to DISABLED in of_parse_thermal_zones() as a tzd is kzalloc'ed so mode is DISABLED anyway Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Amit Kucheria Reviewed-by: Bartlomiej Zolnierkiewicz Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-8-andrzej.p@collabora.com commit ac5d9ecc74d8beee8c87f1441e4adaf4e9fe90c5 Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:20 2020 +0200 thermal: Add mode helpers Prepare for making the drivers not access tzd's private members. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Bartlomiej Zolnierkiewicz [staticize thermal_zone_device_set_mode()] Signed-off-by: kernel test robot Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-7-andrzej.p@collabora.com commit 1ee14820fd8ee79c4fc191155f48c985f28040e2 Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:19 2020 +0200 thermal: remove get_mode() operation of drivers get_mode() is now redundant, as the state is stored in struct thermal_zone_device. Consequently the "mode" attribute in sysfs can always be visible, because it is always possible to get the mode from struct tzd. Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-6-andrzej.p@collabora.com commit 5a3506657f71d7ca124c040aff98639673c5dc97 Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:18 2020 +0200 thermal: Store device mode in struct thermal_zone_device Prepare for eliminating get_mode(). Signed-off-by: Andrzej Pietrasiewicz [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-5-andrzej.p@collabora.com commit cbba1d719534b77b857267890b0f54f0f0a90de4 Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:17 2020 +0200 thermal: Add current mode to thermal zone device Prepare for changing the place where the mode is stored: now it is in drivers, which might or might not implement get_mode()/set_mode() methods. A lot of cleanup can be done thanks to storing it in struct tzd. The get_mode() methods will become redundant. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-4-andrzej.p@collabora.com commit 1595d887afe46b0ad721f27df895a61d4879ede2 Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:16 2020 +0200 thermal: Store thermal mode in a dedicated enum Prepare for storing mode in struct thermal_zone_device. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck [for acerhdf] Acked-by: Peter Kaestle Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-3-andrzej.p@collabora.com commit 172066cc314f104e708f700903739845d343ea39 Author: Andrzej Pietrasiewicz Date: Mon Jun 29 14:29:15 2020 +0200 acpi: thermal: Fix error handling in the register function The acpi_thermal_register_thermal_zone() is missing any error handling. This needs to be fixed. Signed-off-by: Andrzej Pietrasiewicz Reviewed-by: Guenter Roeck Reviewed-by: Bartlomiej Zolnierkiewicz Reviewed-by: Amit Kucheria Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20200629122925.21729-2-andrzej.p@collabora.com commit e14d2c766392ff1f226017fd62f0b6283a53bd0c Author: Drew Fustini Date: Thu Jun 18 20:29:21 2020 +0200 ARM: dts: am335x-pocketbeagle: add gpio-line-names The BeagleBoard.org PocketBeagle has P1 and P2 headers [0] which expose many of the TI AM3358 SoC balls to stacking expansion boards called "capes", or to other external connections like jumper wires connected to a breadboard. Note: the AM3358 die is actually embedded inside of the OSD335x-SM System-in-Package (SiP) [1] but that is irrelevant to the gpio driver. Many of the P1 and P2 header pins can muxed to a GPIO line. The gpio-line-names describe which P1 or P2 pin that line goes to and the default mux for that P1 or P2 pin if it is not GPIO. Some GPIO lines are named "[NC]" as the corresponding balls are not routed to anything on the PCB. The goal for these names is to make it easier for a user viewing the output of gpioinfo to determine which P1 or P2 pin is connected to a GPIO line. The output of gpioinfo on a PocketBeagle would be: gpiochip0 - 32 lines: line 0: "[NC]" unused input active-high line 1: "[NC]" unused input active-high line 2: "P1.08 [SPI0_CLK]" unused input active-high line 3: "P1.10 [SPI0_MISO]" unused input active-high line 4: "P1.12 [SPI0_MOSI]" unused input active-high line 5: "P1.06 [SPI0_CS]" unused input active-high line 6: "[MMC0_CD]" "cd" input active-low [used] line 7: "P2.29 [SPI1_CLK]" unused input active-high line 8: "[SYSBOOT]" unused input active-high line 9: "[SYSBOOT]" unused input active-high line 10: "[SYSBOOT]" unused input active-high line 11: "[SYSBOOT]" unused input active-high line 12: "P1.26 [I2C2_SDA]" unused input active-high line 13: "P1.28 [I2C2_SCL]" unused input active-high line 14: "P2.11 [I2C1_SDA]" unused input active-high line 15: "P2.09 [I2C1_SCL]" unused input active-high line 16: "[NC]" unused input active-high line 17: "[NC]" unused input active-high line 18: "[NC]" unused input active-high line 19: "P2.31 [SPI1_CS]" unused input active-high line 20: "P1.20 [PRU0.16]" unused input active-high line 21: "[NC]" unused input active-high line 22: "[NC]" unused input active-high line 23: "P2.03" unused input active-high line 24: "[NC]" unused input active-high line 25: "[NC]" unused input active-high line 26: "P1.34" unused input active-high line 27: "P2.19" unused input active-high line 28: "[NC]" unused input active-high line 29: "[NC]" unused input active-high line 30: "P2.05 [UART4_RX]" unused input active-high line 31: "P2.07 [UART4_TX]" unused input active-high gpiochip1 - 32 lines: line 0: "[NC]" unused input active-high line 1: "[NC]" unused input active-high line 2: "[NC]" unused input active-high line 3: "[NC]" unused input active-high line 4: "[NC]" unused input active-high line 5: "[NC]" unused input active-high line 6: "[NC]" unused input active-high line 7: "[NC]" unused input active-high line 8: "[NC]" unused input active-high line 9: "P2.25 [SPI1_MOSI]" unused input active-high line 10: "P1.32 [UART0_RX]" unused input active-high line 11: "P1.30 [UART0_TX]" unused input active-high line 12: "P2.24" unused input active-high line 13: "P2.33" unused input active-high line 14: "P2.22" unused input active-high line 15: "P2.18" unused input active-high line 16: "[NC]" unused input active-high line 17: "[NC]" unused input active-high line 18: "P2.01 [PWM1A]" unused input active-high line 19: "[NC]" unused input active-high line 20: "P2.10" unused input active-high line 21: "[USR LED 0]" "beaglebone:green:usr0" output active-high [used] line 22: "[USR LED 1]" "beaglebone:green:usr1" output active-high [used] line 23: "[USR LED 2]" "beaglebone:green:usr2" output active-high [used] line 24: "[USR LED 3]" "beaglebone:green:usr3" output active-high [used] line 25: "P2.06" unused input active-high line 26: "P2.04" unused input active-high line 27: "P2.02" unused input active-high line 28: "P2.08" unused input active-high line 29: "[NC]" unused input active-high line 30: "[NC]" unused input active-high line 31: "[NC]" unused input active-high gpiochip2 - 32 lines: line 0: "P2.20" unused input active-high line 1: "P2.17" unused input active-high line 2: "[NC]" unused input active-high line 3: "[NC]" unused input active-high line 4: "[NC]" unused input active-high line 5: "[EEPROM_WP]" unused input active-high line 6: "[SYSBOOT]" unused input active-high line 7: "[SYSBOOT]" unused input active-high line 8: "[SYSBOOT]" unused input active-high line 9: "[SYSBOOT]" unused input active-high line 10: "[SYSBOOT]" unused input active-high line 11: "[SYSBOOT]" unused input active-high line 12: "[SYSBOOT]" unused input active-high line 13: "[SYSBOOT]" unused input active-high line 14: "[SYSBOOT]" unused input active-high line 15: "[SYSBOOT]" unused input active-high line 16: "[SYSBOOT]" unused input active-high line 17: "[SYSBOOT]" unused input active-high line 18: "[NC]" unused input active-high line 19: "[NC]" unused input active-high line 20: "[NC]" unused input active-high line 21: "[NC]" unused input active-high line 22: "P2.35 [AIN5]" unused input active-high line 23: "P1.02 [AIN6]" unused input active-high line 24: "P1.35 [PRU1.10]" unused input active-high line 25: "P1.04 [PRU1.11]" unused input active-high line 26: "[MMC0_DAT3]" unused input active-high line 27: "[MMC0_DAT2]" unused input active-high line 28: "[MMC0_DAT1]" unused input active-high line 29: "[MMC0_DAT0]" unused input active-high line 30: "[MMC0_CLK]" unused input active-high line 31: "[MMC0_CMD]" unused input active-high gpiochip3 - 32 lines: line 0: "[NC]" unused input active-high line 1: "[NC]" unused input active-high line 2: "[NC]" unused input active-high line 3: "[NC]" unused input active-high line 4: "[NC]" unused input active-high line 5: "[I2C0_SDA]" unused input active-high line 6: "[I2C0_SCL]" unused input active-high line 7: "[JTAG]" unused input active-high line 8: "[JTAG]" unused input active-high line 9: "[NC]" unused input active-high line 10: "[NC]" unused input active-high line 11: "[NC]" unused input active-high line 12: "[NC]" unused input active-high line 13: "P1.03 [USB1]" unused input active-high line 14: "P1.36 [PWM0A]" unused input active-high line 15: "P1.33 [PRU0.1]" unused input active-high line 16: "P2.32 [PRU0.2]" unused input active-high line 17: "P2.30 [PRU0.3]" unused input active-high line 18: "P1.31 [PRU0.4]" unused input active-high line 19: "P2.34 [PRU0.5]" unused input active-high line 20: "P2.28 [PRU0.6]" unused input active-high line 21: "P1.29 [PRU0.7]" unused input active-high line 22: "[NC]" unused input active-high line 23: "[NC]" unused input active-high line 24: "[NC]" unused input active-high line 25: "[NC]" unused input active-high line 26: "[NC]" unused input active-high line 27: "[NC]" unused input active-high line 28: "[NC]" unused input active-high line 29: "[NC]" unused input active-high line 30: "[NC]" unused input active-high line 31: "[NC]" unused input active-high [0] https://github.com/beagleboard/pocketbeagle/wiki/System-Reference-Manual#71_Expansion_Header_Connectors [1] https://octavosystems.com/app_notes/osd335x-family-pin-assignments/ Reviewed-by: Jason Kridner Reviewed-by: Robert Nelson Signed-off-by: Drew Fustini Signed-off-by: Tony Lindgren commit aafd897a5ac4cb7f9b4f99acc5365a7df1f77aa0 Author: Drew Fustini Date: Thu May 21 22:09:26 2020 +0200 ARM: dts: am335x-boneblack: add gpio-line-names The BeagleBone Black has P8 and P9 headers [0] which expose many of the AM3358 ZCZ SoC balls to stacking expansion boards called "capes", or to other external connections like jumper wires connected to a breadboard. BeagleBone users will often refer to the "Cape Exanpsion Headers" pin diagram [1] as it is in the "Bone101" getting started tutorial. [2] Most of the P8 and P9 header pins can muxed to a GPIO line. The gpio-line-names describe which P8 or P9 pin that line goes to and the default mux for that P8 or P9 pin if it is not GPIO. For example, gpiochip 1 line 0 is connected to P8 header pin 25 (P8_25) however the default device tree has the corresponding BGA ball (ZCZ U7) muxed to mmc1_dat0 as it is used for the on-board eMMC chip. For that GPIO line to be used, one would need to modify the device tree to disable the eMMC and change the pin mux for that ball to GPIO mode. Some of the AM3358 ZCZ balls corresponding to GPIO lines are not routed to a P8 or P9 header, but are instead wired to some peripheral device like on-board eMMC, HDMI framer IC, or status LEDs. Those names are in brackets to denote those GPIO lines can not be used. Some GPIO lines are named "[NC]" as the corresponding balls are not routed to anything on the PCB. The goal for these names is to make it easier for a user viewing the output of gpioinfo to determine which P8 or P9 pin is connected to a GPIO line. The output of gpioinfo on a BeagleBone Black would be: gpiochip0 - 32 lines: line 0: "[ethernet]" unused input active-high line 1: "[ethernet]" unused input active-high line 2: "P9_22 [spi0_sclk]" unused input active-high line 3: "P9_21 [spi0_d0]" unused input active-high line 4: "P9_18 [spi0_d1]" unused input active-high line 5: "P9_17 [spi0_cs0]" unused input active-high line 6: "[sd card]" "cd" input active-low [used] line 7: "P9_42A [ecappwm0]" unused input active-high line 8: "P8_35 [hdmi]" unused input active-high line 9: "P8_33 [hdmi]" unused input active-high line 10: "P8_31 [hdmi]" unused input active-high line 11: "P8_32 [hdmi]" unused input active-high line 12: "P9_20 [i2c2_sda]" unused input active-high line 13: "P9_19 [i2c2_scl]" unused input active-high line 14: "P9_26 [uart1_rxd]" unused input active-high line 15: "P9_24 [uart1_txd]" unused input active-high line 16: "[ethernet]" unused input active-high line 17: "[ethernet]" unused input active-high line 18: "[usb]" unused input active-high line 19: "[hdmi]" unused input active-high line 20: "P9_41B" unused input active-high line 21: "[ethernet]" unused input active-high line 22: "P8_19 [ehrpwm2a]" unused input active-high line 23: "P8_13 [ehrpwm2b]" unused input active-high line 24: "[NC]" unused input active-high line 25: "[NC]" unused input active-high line 26: "P8_14" unused input active-high line 27: "P8_17" unused input active-high line 28: "[ethernet]" unused input active-high line 29: "[ethernet]" unused input active-high line 30: "P9_11 [uart4_rxd]" unused input active-high line 31: "P9_13 [uart4_txd]" unused input active-high gpiochip1 - 32 lines: line 0: "P8_25 [emmc]" unused input active-high line 1: "[emmc]" unused input active-high line 2: "P8_5 [emmc]" unused input active-high line 3: "P8_6 [emmc]" unused input active-high line 4: "P8_23 [emmc]" unused input active-high line 5: "P8_22 [emmc]" unused input active-high line 6: "P8_3 [emmc]" unused input active-high line 7: "P8_4 [emmc]" unused input active-high line 8: "[NC]" unused input active-high line 9: "[NC]" unused input active-high line 10: "[NC]" unused input active-high line 11: "[NC]" unused input active-high line 12: "P8_12" unused input active-high line 13: "P8_11" unused input active-high line 14: "P8_16" unused input active-high line 15: "P8_15" unused input active-high line 16: "P9_15A" unused input active-high line 17: "P9_23" unused input active-high line 18: "P9_14 [ehrpwm1a]" unused input active-high line 19: "P9_16 [ehrpwm1b]" unused input active-high line 20: "[emmc]" unused input active-high line 21: "[usr0 led]" "beaglebone:green:heartbeat" output active-high [used] line 22: "[usr1 led]" "beaglebone:green:mmc0" output active-high [used] line 23: "[usr2 led]" "beaglebone:green:usr2" output active-high [used] line 24: "[usr3 led]" "beaglebone:green:usr3" output active-high [used] line 25: "[hdmi]" "interrupt" input active-high [used] line 26: "[usb]" unused input active-high line 27: "[hdmi audio]" "enable" output active-high [used] line 28: "P9_12" unused input active-high line 29: "P8_26" unused input active-high line 30: "P8_21 [emmc]" unused input active-high line 31: "P8_20 [emmc]" unused input active-high gpiochip2 - 32 lines: line 0: "P9_15B" unused input active-high line 1: "P8_18" unused input active-high line 2: "P8_7" unused input active-high line 3: "P8_8" unused input active-high line 4: "P8_10" unused input active-high line 5: "P8_9" unused input active-high line 6: "P8_45 [hdmi]" unused input active-high line 7: "P8_46 [hdmi]" unused input active-high line 8: "P8_43 [hdmi]" unused input active-high line 9: "P8_44 [hdmi]" unused input active-high line 10: "P8_41 [hdmi]" unused input active-high line 11: "P8_42 [hdmi]" unused input active-high line 12: "P8_39 [hdmi]" unused input active-high line 13: "P8_40 [hdmi]" unused input active-high line 14: "P8_37 [hdmi]" unused input active-high line 15: "P8_38 [hdmi]" unused input active-high line 16: "P8_36 [hdmi]" unused input active-high line 17: "P8_34 [hdmi]" unused input active-high line 18: "[ethernet]" unused input active-high line 19: "[ethernet]" unused input active-high line 20: "[ethernet]" unused input active-high line 21: "[ethernet]" unused input active-high line 22: "P8_27 [hdmi]" unused input active-high line 23: "P8_29 [hdmi]" unused input active-high line 24: "P8_28 [hdmi]" unused input active-high line 25: "P8_30 [hdmi]" unused input active-high line 26: "[emmc]" unused input active-high line 27: "[emmc]" unused input active-high line 28: "[emmc]" unused input active-high line 29: "[emmc]" unused input active-high line 30: "[emmc]" unused input active-high line 31: "[emmc]" unused input active-high gpiochip3 - 32 lines: line 0: "[ethernet]" unused input active-high line 1: "[ethernet]" unused input active-high line 2: "[ethernet]" unused input active-high line 3: "[ethernet]" unused input active-high line 4: "[ethernet]" unused input active-high line 5: "[i2c0]" unused input active-high line 6: "[i2c0]" unused input active-high line 7: "[emu]" unused input active-high line 8: "[emu]" unused input active-high line 9: "[ethernet]" unused input active-high line 10: "[ethernet]" unused input active-high line 11: "[NC]" unused input active-high line 12: "[NC]" unused input active-high line 13: "[usb]" unused input active-high line 14: "P9_31 [spi1_sclk]" unused input active-high line 15: "P9_29 [spi1_d0]" unused input active-high line 16: "P9_30 [spi1_d1]" unused input active-high line 17: "P9_28 [spi1_cs0]" unused input active-high line 18: "P9_42B [ecappwm0]" unused input active-high line 19: "P9_27" unused input active-high line 20: "P9_41A" unused input active-high line 21: "P9_25" unused input active-high line 22: "[NC]" unused input active-high line 23: "[NC]" unused input active-high line 24: "[NC]" unused input active-high line 25: "[NC]" unused input active-high line 26: "[NC]" unused input active-high line 27: "[NC]" unused input active-high line 28: "[NC]" unused input active-high line 29: "[NC]" unused input active-high line 30: "[NC]" unused input active-high line 31: "[NC]" unused input active-high [0] https://git.io/JfgOd [1] https://beagleboard.org/capes [1] https://beagleboard.org/Support/bone101 [2] https://beagleboard.org/static/images/cape-headers.png Reviewed-by: Jason Kridner Reviewed-by: Robert Nelson Signed-off-by: Drew Fustini Signed-off-by: Tony Lindgren commit ff82009fcc6ace774570107750f5af91c9081b0a Author: Drew Fustini Date: Wed Jun 10 13:02:58 2020 +0200 ARM: dts: am33xx-l4: add gpio-ranges Add gpio-ranges properties to the gpio controller nodes. These gpio-ranges were created based on "Table 9-10. CONTROL_MODULE REGISTERS" in the "AM335x Technical Reference Manual" [0] and "Table 4-2. Pin Attributes" in the "AM335x Sitara Processor datasheet" [1]. A csv file with this data is available for reference [2]. These mappings are valid for all SoC's that are using am33xx-l4.dtsi. In addition, the only TI AM33xx parts that actually exist are [0]: AM3351, AM3352, AM3354, AM3356, AM3357, AM3358, AM3359 These gpio-ranges properties should be added as they describe the relationship between a gpio line and pin control register that exists in the hardware. For example, GPMC_A0 pin has mode 7 which is labeled gpio1_16. conf_gpmc_a0 register is at offset 840h which makes it pin 16. [0] https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf [1] http://www.ti.com/lit/ds/symlink/am3358.pdf [2] https://gist.github.com/pdp7/6ffaddc8867973c1c3e8612cfaf72020 [3] http://www.ti.com/processors/sitara-arm/am335x-cortex-a8/overview.html Signed-off-by: Drew Fustini Signed-off-by: Tony Lindgren commit 96cafa00c5e000a760fd1e0fe9ac373331a626e3 Author: Suman Anna Date: Thu Jun 11 10:29:45 2020 -0500 ARM: dts: am5729-beaglebone-ai: Disable ununsed mailboxes The IPU and DSP remote processors use sub-mailbox nodes only from a limited set of System Mailboxes 5 and 6 to achieve the Remote Processor Messaging (RPMsg) communication stack between the MPU host processor and the respective remote processor. These are all defined and enabled through the inherited common dra74-ipu-dsp-common.dtsi file. The other System Mailboxes do not define any actual sub-mailboxes, so they serve no purpose and can all be safely dropped. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit 4873b668d63360a84615cf0e603824659b62f155 Author: Suman Anna Date: Thu Jun 11 10:29:44 2020 -0500 ARM: dts: am5729-beaglebone-ai: Enable IPU & DSP rprocs Assign the previously added CMA reserved memory nodes to the respective IPU and DSP rproc device nodes, and enable these rproc nodes so that these remote processors can be booted on the AM5729 BeagleBone AI board. The addresses and sizes of the CMA pools are identical to those used on various other TI AM572x/AM574x based boards. The mailboxes, timers and watchdog-timers for all these remoteprocs are inherited by including the common dra72-ipu-dsp-common.dtsi file. An associated pair of the rproc node and its CMA node can be disabled later on if there is no use-case defined to use that remote processor. Signed-off-by: Suman Anna Signed-off-by: Tony Lindgren commit f27b1dc6412547fac256957e22d6889fb56a5470 Author: Linus Walleij Date: Fri Jun 26 01:12:57 2020 +0200 spi: omap2-mcspi: Convert to use GPIO descriptors The OMAP2 MCSPI has some kind of half-baked GPIO CS support: it includes code like this: if (gpio_is_valid(spi->cs_gpio)) { ret = gpio_request(spi->cs_gpio, dev_name(&spi->dev)); (...) But it doesn't parse the "cs-gpios" attribute in the device tree to count the number of GPIOs or pick out the GPIO numbers and put these in the SPI master's .cs_gpios property. We complete the implementation of supporting CS GPIOs from the device tree and switch it over to use the SPI core for this. Signed-off-by: Linus Walleij Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20200625231257.280615-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 638d8488ae00d2e5dd5033804e82b458d3cf85b1 Author: Douglas Anderson Date: Fri Jun 26 15:19:50 2020 -0700 spi: spi-geni-qcom: Don't set the cs if it was already right Setting the chip select on the Qualcomm geni SPI controller isn't exactly cheap. Let's cache the current setting and avoid setting the chip select if it's already right. Using "flashrom" to read or write the EC firmware on a Chromebook shows roughly a 25% reduction in interrupts and a 15% speedup. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200626151946.1.I06134fd669bf91fd387dc6ecfe21d44c202bd412@changeid Signed-off-by: Mark Brown commit 2d62edd65eee124c57ded7bc3f4ae6bcb01ebc55 Author: Krzysztof Kozlowski Date: Fri Jun 26 10:06:51 2020 +0200 ARM: dts: am: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache-controller@48242000: $nodename:0: 'l2-cache-controller@48242000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren commit 01df6238fa95cd7fc9878f42b2fe63cadbfd3a07 Author: Krzysztof Kozlowski Date: Fri Jun 26 10:06:19 2020 +0200 ARM: dts: omap: Align L2 cache-controller nodename with dtschema Fix dtschema validator warnings like: l2-cache-controller@48242000: $nodename:0: 'l2-cache-controller@48242000' does not match '^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Tony Lindgren commit f10b6c99c08433861d1ed62267fa57ced7dbdf50 Author: Dan Murphy Date: Fri Jun 26 10:41:41 2020 -0500 ASoC: tas2562: Add voltage sense slot property Add a property to configure the slot for the voltage sense monitoring of the device. Vsense data will be sent to the processor via the slot defined by the property Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200626154143.20351-2-dmurphy@ti.com Signed-off-by: Mark Brown commit 09ed395b05feb7d0f77ab52c48d2f77c1b44d2ab Author: Dan Murphy Date: Fri Jun 26 10:41:42 2020 -0500 ASoC: tas2562: Add voltage sense slot configuration Add Vsense slot configuration based on the device tree. Adding this property enables the slot programming to be moved to the tdm_set_slot callback. This in affect sets the slots for the Isense and Vsense and enabling this these modes are now based on whether these features were powered on or not. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200626154143.20351-3-dmurphy@ti.com Signed-off-by: Mark Brown commit d7bd40ae55ce339a3c9be7fc2087c671d3d80894 Author: Dan Murphy Date: Fri Jun 26 10:41:40 2020 -0500 ASoC: tas2562: Add right and left channel slot programming Add programming for the tdm slots for the right and left. This also requires configuring the RX/TX offsets for the DAI format type. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200626154143.20351-1-dmurphy@ti.com Signed-off-by: Mark Brown commit 4946cd45ef665d99074796fdd8ce04ba37ce1bdf Author: Randy Dunlap Date: Sun Jun 28 20:23:33 2020 -0700 ASoC: Documentation: fix reference to renamed source file sound/soc/soc-io.c was merged into sound/soc/soc-component.c, so fixup the Documentation to use the updated file name. Error: Cannot open file ../sound/soc/soc-io.c WARNING: kernel-doc '../scripts/kernel-doc -rst -enable-lineno ../sound/soc/soc-io.c' failed with return code 1 Fixes: 460b42d162e3 ("ASoC: soc-component: merge soc-io.c into soc-component.c") Signed-off-by: Randy Dunlap Acked-by: Kuninori Morimoto Cc: Kuninori Morimoto Cc: Mark Brown Link: https://lore.kernel.org/r/a9f59f30-8cf2-ea82-567c-1706fd64fe62@infradead.org Signed-off-by: Mark Brown commit abc17b2974d634c17d25be7f4472890c8533a005 Author: Rohit kumar Date: Sat Jun 27 19:07:10 2020 +0530 asoc: Update supported rate and format for dummy dai Add support for 384KHz sample rate and S24_3LE bitwidth for dummy dai. Signed-off-by: Rohit kumar Link: https://lore.kernel.org/r/1593265030-1451-1-git-send-email-rohitkr@codeaurora.org Signed-off-by: Mark Brown commit c312f066314e3dfb99fe7db8b8b43c4d8992c90c Author: Adam Ford Date: Wed Jun 17 05:58:40 2020 -0500 ARM: dts: omap3: Migrate AES from hwmods to sysc-omap2 Various OMAP3 boards have two AES blocks, but only one is currently available, because the hwmods are only configured for one. This patch migrates the hwmods for the AES engine to sysc-omap2 which allows the second AES crypto engine to become available. omap-aes 480a6000.aes1: OMAP AES hw accel rev: 2.6 omap-aes 480a6000.aes1: will run requests pump with realtime priority omap-aes 480c5000.aes2: OMAP AES hw accel rev: 2.6 omap-aes 480c5000.aes2: will run requests pump with realtime priority Signed-off-by: Adam Ford [tony@atomide.com: updated to disable both aes_targets on hs boards] Signed-off-by: Tony Lindgren commit ba2104c24aba1fa7e19d53f08c985526a6786d8b Author: Lee Jones Date: Fri Jun 26 14:05:25 2020 +0100 misc: pti: Fix documentation for bit-rotted function pti_tty_driver_write() The API has moved on since the original function header was authored. This changes brings the function's documentation back into line with reality, complete descriptions of the latest arguments to be used. Squashes the following W=1 kernel build warnings: drivers/misc/pti.c:510: warning: Function parameter or member 'tty' not described in 'pti_tty_driver_wr drivers/misc/pti.c:510: warning: Function parameter or member 'buf' not described in 'pti_tty_driver_wr drivers/misc/pti.c:510: warning: Excess function parameter 'filp' description in 'pti_tty_driver_write' drivers/misc/pti.c:510: warning: Excess function parameter 'data' description in 'pti_tty_driver_write' Cc: J Freyensee Acked-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200626130525.389469-11-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9eea2a499fa86b0822d27f3cd34c4554c6a9c2e6 Author: Lee Jones Date: Fri Jun 26 14:05:24 2020 +0100 misc: habanalabs: irq: Add missing struct identifier for 'struct hl_eqe_work' In kerneldoc format, data structures have to start with 'struct' else the kerneldoc tooling/parsers/validators get confused. Squashes the following W=1 warning: drivers/misc/habanalabs/irq.c:19: warning: cannot understand function prototype: 'struct hl_eqe_work ' Cc: Oded Gabbay Reviewed-by: Oded Gabbay Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200626130525.389469-10-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit dfe40cccac190da8076d436290ec3efc21169e68 Author: Lee Jones Date: Fri Jun 26 14:05:23 2020 +0100 misc: cb710: sgbuf2: Add missing documentation for cb710_sg_dwiter_write_next_block()'s 'data' arg An attempt was made to provide a proper kerneldoc header for cb710_sg_dwiter_write_next_block(), but a description for it's 'data' argument was missed. Squashes W=1 kernel build warning: drivers/misc/cb710/sgbuf2.c:131: warning: Function parameter or member 'data' not described in 'cb710_sg_dwiter_write_next_block' Cc: "Michał Mirosław" Acked-by: Arnd Bergmann Acked-by: Michał Mirosław Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200626130525.389469-9-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit e4be4884f3a120091b0fc0d7aa30660da8dac6a9 Author: Lee Jones Date: Fri Jun 26 14:05:22 2020 +0100 misc: mic: vop: vop_main: Remove set but unused variable 'ret' Hasn't been checked since its conception 2 years ago. Squashes W=1 warning: drivers/misc/mic/vop/vop_main.c: In function ‘_vop_scan_devices’: drivers/misc/mic/vop/vop_main.c:617:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 617 | int ret; | ^~~ Cc: Sudeep Dutt Cc: Ashutosh Dixit Cc: Christian Borntraeger Acked-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200626130525.389469-8-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 98e72eb6434baf960dbf090312411b8ebc4f64d0 Author: Lee Jones Date: Fri Jun 26 14:05:21 2020 +0100 misc: eeprom: eeprom_93cx6: Repair function arg descriptions Copy-paste issue. Looks like the kerneldoc style descriptions for these functions were taken from existing functions with slightly different argument names. Fixes the following W=1 warnings: drivers/misc/eeprom/eeprom_93cx6.c:239: warning: Function parameter or member 'byte' not described in 'eeprom_93cx6_readb' drivers/misc/eeprom/eeprom_93cx6.c:239: warning: Excess function parameter 'word' description in 'eeprom_93cx6_readb' drivers/misc/eeprom/eeprom_93cx6.c:280: warning: Function parameter or member 'bytes' not described in 'eeprom_93cx6_multireadb' drivers/misc/eeprom/eeprom_93cx6.c:280: warning: Excess function parameter 'words' description in 'eeprom_93cx6_multireadb' Cc: Wolfram Sang Acked-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200626130525.389469-7-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit f049c545465de225d0ceb036b2dd08c5cfd31344 Author: Lee Jones Date: Fri Jun 26 14:05:19 2020 +0100 misc: lkdtm: bugs: At least try to use popuated variable The result may not be intereresting, but not using a set variable is bad form and causes W=1 kernel builds to complain. Fixes the following W=1 warning(s): drivers/misc/lkdtm/bugs.c: In function ‘lkdtm_STACK_GUARD_PAGE_LEADING’: drivers/misc/lkdtm/bugs.c:331:25: warning: variable ‘byte’ set but not used [-Wunused-but-set-variable] 331 | volatile unsigned char byte; | ^~~~ drivers/misc/lkdtm/bugs.c: In function ‘lkdtm_STACK_GUARD_PAGE_TRAILING’: drivers/misc/lkdtm/bugs.c:345:25: warning: variable ‘byte’ set but not used [-Wunused-but-set-variable] 345 | volatile unsigned char byte; | ^~~~ Cc: Kees Cook Acked-by: Kees Cook Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200626130525.389469-5-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3caf1b48397f2de0dab88d5b2daf002159ed30bd Author: Lee Jones Date: Fri Jun 26 14:05:18 2020 +0100 misc: ti-st: st_kim: Tidy-up bespoke commentry If it's still in use and worth the effort, it sure looks like this driver could do with a good scrub (clean). This patch conserns itself with the non-standard comments located thoughout the file. It also fixes the following W=1 warnings by demoting the kerneldoc function headers to standard comments, since there doesn't appear to be a requirement for the function args to be documented: /drivers/misc/ti-st/st_kim.c:42: warning: Function parameter or member 'id' not described in 'st_get_plat_device' /drivers/misc/ti-st/st_kim.c:53: warning: Function parameter or member 'kim_gdata' not described in 'validate_firmware_response' /drivers/misc/ti-st/st_kim.c:126: warning: Function parameter or member 'kim_gdata' not described in 'kim_int_recv' /drivers/misc/ti-st/st_kim.c:126: warning: Function parameter or member 'data' not described in 'kim_int_recv' /drivers/misc/ti-st/st_kim.c:126: warning: Function parameter or member 'count' not described in 'kim_int_recv' /drivers/misc/ti-st/st_kim.c:272: warning: Function parameter or member 'kim_gdata' not described in 'download_firmware' /drivers/misc/ti-st/st_kim.c:445: warning: Function parameter or member 'kim_data' not described in 'st_kim_start' /drivers/misc/ti-st/st_kim.c:509: warning: Function parameter or member 'kim_data' not described in 'st_kim_stop' /drivers/misc/ti-st/st_kim.c:661: warning: Function parameter or member 'core_data' not described in 'st_kim_ref' /drivers/misc/ti-st/st_kim.c:661: warning: Function parameter or member 'id' not described in 'st_kim_ref' Cc: Pavan Savoy Acked-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200626130525.389469-4-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 7e8eebef1c3afe375623e76b8741d48b1f6eb13e Author: Lee Jones Date: Fri Jun 26 14:05:17 2020 +0100 misc: ti-st: st_core: Tidy-up bespoke commentry If it's still in use and worth the effort, it sure looks like this driver could do with a good scrub (clean). This patch conserns itself with the non-standard comments located thoughout the file. It also fixes the following W=1 warnings by demoting the kerneldoc function headers to standard comments, since there doesn't appear to be a requirement for the function args to be documented: drivers/misc/ti-st/st_core.c:132: warning: Function parameter or member 'st_gdata' not described in 'st_reg_complete' drivers/misc/ti-st/st_core.c:132: warning: Function parameter or member 'err' not described in 'st_reg_complete' drivers/misc/ti-st/st_core.c:197: warning: Function parameter or member 'st_gdata' not described in 'st_wakeup_ack' drivers/misc/ti-st/st_core.c:197: warning: Function parameter or member 'cmd' not described in 'st_wakeup_ack' drivers/misc/ti-st/st_core.c:226: warning: Function parameter or member 'disc_data' not described in 'st_int_recv' drivers/misc/ti-st/st_core.c:226: warning: Function parameter or member 'data' not described in 'st_int_recv' drivers/misc/ti-st/st_core.c:226: warning: Function parameter or member 'count' not described in 'st_int_recv' drivers/misc/ti-st/st_core.c:387: warning: Function parameter or member 'st_gdata' not described in 'st_int_dequeue' drivers/misc/ti-st/st_core.c:409: warning: Function parameter or member 'st_gdata' not described in 'st_int_enqueue' drivers/misc/ti-st/st_core.c:409: warning: Function parameter or member 'skb' not described in 'st_int_enqueue' Cc: Pavan Savoy Cc: Naveen Jain Acked-by: Arnd Bergmann Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200626130525.389469-3-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit b23d5151f301dcbc3c6a69ea80901d9566d910d7 Author: Lee Jones Date: Fri Jun 26 14:05:16 2020 +0100 misc: c2port: core: Ensure source size does not equal destination size in strncpy() We need to ensure there's a place for the NULL terminator. Fixes the following W=1 warning(s): In file included from include/linux/bitmap.h:9, from include/linux/nodemask.h:95, from include/linux/mmzone.h:17, from include/linux/gfp.h:6, from include/linux/umh.h:4, from include/linux/kmod.h:9, from include/linux/module.h:16, from drivers/misc/c2port/core.c:9: In function ‘strncpy’, inlined from ‘c2port_device_register’ at drivers/misc/c2port/core.c:926:2: include/linux/string.h:297:30: warning: ‘__builtin_strncpy’ specified bound 32 equals destination size [-Wstringop-truncation] 297 | #define __underlying_strncpy __builtin_strncpy | ^ include/linux/string.h:307:9: note: in expansion of macro ‘__underlying_strncpy’ 307 | return __underlying_strncpy(p, q, size); | ^~~~~~~~~~~~~~~~~~~~ Cc: Rodolfo Giometti Cc: "Eurotech S.p.A" Acked-by: Rodolfo Giometti Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200626130525.389469-2-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman commit 34afa1d657d4742c9bce4a4c197ebf61b4af1b9e Author: Vaibhav Gupta Date: Mon Jun 29 13:45:31 2020 +0530 misc/pch_phub.c: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), etc. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use device_wakeup_disable() instead. It was also saving device register configuration using pch_phub_save/restore_reg_conf() which is not recommended. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200629081531.214734-6-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6bbf52566bf7cb26546ec9d9aa76a3cb80d4eb18 Author: Vaibhav Gupta Date: Mon Jun 29 13:45:30 2020 +0530 misc/phantom.c: use generic power management With the support of generic PM callbacks, drivers no longer need to use legacy .suspend() and .resume() in which they had to maintain PCI states changes and device's power state themselves. All required operations are done by PCI core. Driver needs to do only device-specific operations. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200629081531.214734-5-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit ff249c1c70a665fc7a64e345aa251bc238616a34 Author: Vaibhav Gupta Date: Mon Jun 29 13:45:29 2020 +0530 misc/tifm_7xx1.c: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), etc. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use device_wakeup_disable() instead. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200629081531.214734-4-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6bf23661d4a7a105001ebb4410c1c0a17752fac4 Author: Vaibhav Gupta Date: Mon Jun 29 13:45:28 2020 +0530 cardreader/rtsx_pcr.c: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), etc. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. The driver was also using pci_enable_wake(...,..., 0) to disable wake. Use device_wakeup_disable() instead. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200629081531.214734-3-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit 69b4bf2be22ed6d03cdb5b53e44eda660ab5df9b Author: Vaibhav Gupta Date: Mon Jun 29 13:45:27 2020 +0530 cb710/core.c: use generic power management Drivers should not use legacy power management as they have to manage power states and related operations, for the device, themselves. This driver was handling them with the help of PCI helper functions like pci_save/restore_state(), pci_enable/disable_device(), etc. With generic PM, all essentials will be handled by the PCI core. Driver needs to do only device-specific operations. Compile-tested only. Signed-off-by: Vaibhav Gupta Link: https://lore.kernel.org/r/20200629081531.214734-2-vaibhavgupta40@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae56942c14740c2963222efdc36c667ab19555ef Author: Kees Cook Date: Thu Jun 25 13:37:04 2020 -0700 lkdtm: Make arch-specific tests always available I'd like arch-specific tests to XFAIL when on a mismatched architecture so that we can more easily compare test coverage across all systems. Lacking kernel configs or CPU features count as a FAIL, not an XFAIL. Additionally fixes a build failure under 32-bit UML. Fixes: b09511c253e5 ("lkdtm: Add a DOUBLE_FAULT crash type on x86") Fixes: cea23efb4de2 ("lkdtm/bugs: Make double-fault test always available") Fixes: 6cb6982f42cb ("lkdtm: arm64: test kernel pointer authentication") Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200625203704.317097-5-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 4fccc8c0ff740e62343b6de38426a48b345b95f4 Author: Kees Cook Date: Thu Jun 25 13:37:03 2020 -0700 selftests/lkdtm: Reset WARN_ONCE to avoid false negatives Since we expect to see warnings every time for many tests, just reset the WARN_ONCE flags each time the script runs. Fixes: 46d1a0f03d66 ("selftests/lkdtm: Add tests for LKDTM targets") Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200625203704.317097-4-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit e12145cf1c3a8077e6d9f575711e38dd7d8a3ebc Author: Kees Cook Date: Thu Jun 25 13:37:02 2020 -0700 lkdtm/heap: Avoid edge and middle of slabs Har har, after I moved the slab freelist pointer into the middle of the slab, now it looks like the contents are getting poisoned. Adjust the test to avoid the freelist pointer again. Fixes: 3202fa62fb43 ("slub: relocate freelist pointer to middle of object") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200625203704.317097-3-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 464e86b4abadfc490f426954b431e2ec6a9d7bd2 Author: Kees Cook Date: Thu Jun 25 13:37:01 2020 -0700 lkdtm: Avoid more compiler optimizations for bad writes It seems at least Clang is able to throw away writes it knows are destined for read-only memory, which makes things like the WRITE_RO test fail, as the write gets elided. Instead, force the variable to be volatile, and make similar changes through-out other tests in an effort to avoid needing to repeat fixing these kinds of problems. Also includes pr_err() calls in failure paths so that kernel logs are more clear in the failure case. Reported-by: Prasad Sodagudi Suggested-by: Sami Tolvanen Fixes: 9ae113ce5faf ("lkdtm: add tests for additional page permissions") Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20200625203704.317097-2-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 4afc339ef0d259d415993d3d96f707a92489d91e Author: Tomas Winkler Date: Fri Jun 19 19:51:20 2020 +0300 mei: me: add MEI device for KBP with ITPS capability Add device ID for Intel Kaby Point PCH (Kabylake) which has Intel Precise Touch & Stylus IPTS (iTouch). Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200619165121.2145330-6-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 372a829862e5f7ca4fd9c816702fb99851740a98 Author: Tomas Winkler Date: Fri Jun 19 19:51:19 2020 +0300 mei: me: add MEI device for SPT with ITPS capability Add device ID for Intel Sunrise Point PCH (Skylake) which has Intel Precise Touch & Stylus IPTS (iTouch). Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200619165121.2145330-5-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 3fbd1dfe2635190e50534e5e3c21901e639a9068 Author: Tomas Winkler Date: Fri Jun 19 19:51:18 2020 +0300 mei: me: add kdoc for mei_me_fw_type_nm() Add kdoc for mei_me_fw_type_nm() function. Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200619165121.2145330-4-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 4d3c6c8eb9816a0a0cb80becd159cf81a9977ed7 Author: Tomas Winkler Date: Fri Jun 19 19:51:17 2020 +0300 mei: me: make mei_me_fw_sku_sps_4() less cryptic Last add mei_me_fw_sku_sps_4() kdoc and add descriptive defines for register name and values. Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200619165121.2145330-3-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 45a2c76283ace79cee5eb7e17a0ee81099700139 Author: Tomas Winkler Date: Fri Jun 19 19:51:16 2020 +0300 mei: me: constify the device parameter to the probe quirk The quirk_probe there is no writing to pci device hence we can constify the passed pci_dev pointer. Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20200619165121.2145330-2-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 0e3a52ba93ffce737c7a2418ce6592152787d148 Author: Rikard Falkeborn Date: Thu Jun 11 00:47:01 2020 +0200 misc: rtsx_usb: Constify struct usb_device_id rtsx_usb_usb_ids is never modified and can therefore be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 21513 4160 128 25801 64c9 drivers/misc/cardreader/rtsx_usb.o After: text data bss dec hex filename 21673 4000 128 25801 64c9 drivers/misc/cardreader/rtsx_usb.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200610224704.27082-2-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit f08387903d949b760ed2abdde85fe6f45961a392 Author: Rikard Falkeborn Date: Thu Jun 11 00:47:02 2020 +0200 misc: genwqe: Constify struct pci_error_handlers genwqe_err_handler is never modified, so it can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 20174 6104 2464 28742 7046 drivers/misc/genwqe/card_base.o After: text data bss dec hex filename 20270 6008 2464 28742 7046 drivers/misc/genwqe/card_base.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200610224704.27082-3-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 50bf73bdce8efc57f563297a6c2fedaedefa849e Author: Rikard Falkeborn Date: Thu Jun 11 00:47:03 2020 +0200 mei: hdcp: Constify struct mei_cl_device_id mei_hdcp_tbl[] is never modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 15844 5416 0 21260 530c drivers/misc/mei/hdcp/mei_hdcp.o After: text data bss dec hex filename 16004 5256 0 21260 530c drivers/misc/mei/hdcp/mei_hdcp.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200610224704.27082-4-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8374680ff2eb01a58314562c895b119c75c53c2a Author: Rikard Falkeborn Date: Thu Jun 11 00:47:04 2020 +0200 mic: vop: Constify static structs vop_vq_config_ops and id_table[] are never modified so make them const to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 14889 4065 192 19146 4aca drivers/misc/mic/vop/vop_main.o After: text data bss dec hex filename 15113 3841 192 19146 4aca drivers/misc/mic/vop/vop_main.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200610224704.27082-5-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman commit 68daf1dffad28f1d12e76358920d7d09d4371b52 Author: Liao Pingfang Date: Sat May 30 15:34:01 2020 +0800 misc: mic: Remove the error message as the call will print it The message should just be dropped as the call will print the failure message anyway. Signed-off-by: Liao Pingfang Link: https://lore.kernel.org/r/1590824041-36500-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Greg Kroah-Hartman commit b7820ae2d2929d4d6e52462a820e760db35fdad6 Author: Andy Shevchenko Date: Fri May 29 16:57:26 2020 +0200 mux: adgs1408: Add mod_devicetable.h and remove of_match_ptr Enables probing via the ACPI PRP0001 route but more is mostly about removing examples of this that might get copied into new drivers. Also fixes drivers/mux/adgs1408.c:112:34: warning: unused variable 'adgs1408_of_match as has been reported recently. Fixes: e9e40543ad5b ("spi: Add generic SPI multiplexer") Reported-by: kbuild test robot Signed-off-by: Andy Shevchenko Signed-off-by: Peter Rosin Link: https://lore.kernel.org/r/20200529145726.5708-1-peda@axentia.se Signed-off-by: Greg Kroah-Hartman commit 85c5cbeba8f4fb28e6b9bfb3e467718385f78f76 Author: Wang Hai Date: Tue Jun 2 20:07:33 2020 +0800 cxl: Fix kobject memleak Currently the error return path from kobject_init_and_add() is not followed by a call to kobject_put() - which means we are leaking the kobject. Fix it by adding a call to kobject_put() in the error path of kobject_init_and_add(). Fixes: b087e6190ddc ("cxl: Export optional AFU configuration record in sysfs") Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Andrew Donnellan Acked-by: Frederic Barrat Link: https://lore.kernel.org/r/20200602120733.5943-1-wanghai38@huawei.com Signed-off-by: Greg Kroah-Hartman commit 4003dac180d059ebd6f39b63dd33df408c1e4914 Author: Ville Syrjälä Date: Thu Jun 25 23:00:03 2020 +0300 drm/i915: Clamp linetime wm to <64usec The linetime watermark is a 9 bit value, which gives us a maximum linetime of just below 64 usec. If the linetime exceeds that value we currently just discard the high bits and program the rest into the register, which angers the state checker. To avoid that let's just clamp the value to the max. I believe it should be perfectly fine to program a smaller linetime wm than strictly required, just means the hardware may fetch data sooner than strictly needed. We are further reassured by the fact that with DRRS the spec tells us to program the smaller of the two linetimes corresponding to the two refresh rates. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200625200003.12436-1-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 42fdc5e49c2be97db112d410d07044e0e2c7d5bb Author: Christoph Hellwig Date: Mon Jun 29 17:08:34 2020 +0200 blk-mq: remove the BLK_MQ_REQ_INTERNAL flag Just check for a non-NULL elevator directly to make the code more clear. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 36a3df5a4574d5ddf59804fcd0c4e9654c514d9a Author: Ming Lei Date: Mon Jun 29 17:47:59 2020 +0800 blk-mq: put driver tag when this request is completed It is natural to release driver tag when this request is completed by LLD or device since its purpose is for LLD use. One big benefit is that the released tag can be re-used quicker since bio_endio() may take too long. Meantime we don't need to release driver tag for flush request. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit 2ddef17678bc2ea1d20517dd2b4ed4aa967ffa8b Author: Christian König Date: Wed Jun 24 15:15:20 2020 +0200 drm/ttm: make TT creation purely optional v3 We only need the page array when the BO is about to be accessed. So not only populate, but also create it on demand. v2: move NULL check into ttm_tt_create() v3: fix the occurrence in ttm_bo_kmap_ttm as well Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/373182/ commit 58e4d686d456c3e356439ae160ff4a0728940b8e Author: Christian König Date: Tue Jun 16 14:33:23 2020 +0200 drm/ttm: cleanup ttm_mem_type_manager_func.get_node interface v3 Instead of signaling failure by setting the node pointer to NULL do so by returning -ENOSPC. v2: add memset() to make sure that mem is always initialized. v3: drop memset() only set mm_node = NULL, move mm_node init in amdgpu Signed-off-by: Christian König Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/373181/ commit fe58acefd5a66d33a8fb94da53c3af4374b6d376 Author: Steven Rostedt (VMware) Date: Wed Apr 22 12:25:42 2020 -0400 x86/ftrace: Do not jump to direct code in created trampolines When creating a trampoline based on the ftrace_regs_caller code, nop out the jnz test that would jmup to the code that would return to a direct caller (stored in the ORIG_RAX field) and not back to the function that called it. Link: http://lkml.kernel.org/r/20200422162750.638839749@goodmis.org Cc: Peter Zijlstra Signed-off-by: Steven Rostedt (VMware) commit 5da7cd11d0811c35a6988d416053b5421bc61521 Author: Steven Rostedt (VMware) Date: Wed Apr 22 12:25:41 2020 -0400 x86/ftrace: Only have the builtin ftrace_regs_caller call direct hooks If a direct hook is attached to a function that ftrace also has a function attached to it, then it is required that the ftrace_ops_list_func() is used to iterate over the registered ftrace callbacks. This will also include the direct ftrace_ops helper, that tells ftrace_regs_caller where to return to (the direct callback and not the function that called it). As this direct helper is only to handle the case of ftrace callbacks attached to the same function as the direct callback, the ftrace callback allocated trampolines (used to only call them), should never be used to return back to a direct callback. Only copy the portion of the ftrace_regs_caller that will return back to what called it, and not the portion that returns back to the direct caller. The direct ftrace_ops must then pick the ftrace_regs_caller builtin function as its own trampoline to ensure that it will never have one allocated for it (which would not include the handling of direct callbacks). Link: http://lkml.kernel.org/r/20200422162750.495903799@goodmis.org Cc: Peter Zijlstra Signed-off-by: Steven Rostedt (VMware) commit 0b4f8ddc0cc235f30431ed5c7d533b24e995d267 Author: Steven Rostedt (VMware) Date: Wed Apr 22 12:25:40 2020 -0400 x86/ftrace: Make non direct case the default in ftrace_regs_caller If a direct function is hooked along with one of the ftrace registered functions, then the ftrace_regs_caller is attached to the function that shares the direct hook as well as the ftrace hook. The ftrace_regs_caller will call ftrace_ops_list_func() that iterates through all the registered ftrace callbacks, and if there's a direct callback attached to that function, the direct ftrace_ops callback is called to notify that ftrace_regs_caller to return to the direct caller instead of going back to the function that called it. But this is a very uncommon case. Currently, the code has it as the default case. Modify ftrace_regs_caller to make the default case (the non jump) to just return normally, and have the jump to the handling of the direct caller. Link: http://lkml.kernel.org/r/20200422162750.350373278@goodmis.org Cc: Peter Zijlstra Signed-off-by: Steven Rostedt (VMware) commit a2e83ef9c3da0602234357bdbfe2ac64e91906e9 Author: Christoph Hellwig Date: Sat Jun 27 09:31:59 2020 +0200 blk-cgroup: remove a dead check in blk_throtl_bio bios must have a valid block group by the time they are submitted. Acked-by: Tejun Heo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit db18a53e5ba840993a3fc908dec648402ed740bd Author: Christoph Hellwig Date: Sat Jun 27 09:31:58 2020 +0200 blk-cgroup: remove blkcg_bio_issue_check blkcg_bio_issue_check is a giant inline function that does three entirely different things. Factor out the blk-cgroup related bio initalization into a new helper, and the open code the sequence in the only caller, relying on the fact that all the actual functionality is stubbed out for non-cgroup builds. Acked-by: Tejun Heo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 93b8063804b62b55248e16499d853e1b20eff905 Author: Christoph Hellwig Date: Sat Jun 27 09:31:57 2020 +0200 blk-cgroup: move rcu locking from blkcg_bio_issue_check to blk_throtl_bio The only thing in blkcg_bio_issue_check that needs to be under rcu_read_lock is blk_throtl_bio, so move the locking there. Acked-by: Tejun Heo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 7582f30cc9fbcdcd630398bea010e5f6a2e2fcab Author: Christoph Hellwig Date: Sat Jun 27 09:31:56 2020 +0200 cgroup: unexport cgroup_rstat_updated cgroup_rstat_updated is only used by core block code, no need to export it. Acked-by: Tejun Heo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 81630e27fff3dc1ccbf64ecb48a70170d7071545 Author: Christoph Hellwig Date: Sat Jun 27 09:31:55 2020 +0200 blk-cgroup: remove the !bio->bi_blkg check in blkcg_bio_issue_check This is purely a sanity check for grave programming errors. Remove it to simplify further work in this area. Acked-by: Tejun Heo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 13c7863d48c160152c42c62700a722293bddeca4 Author: Christoph Hellwig Date: Sat Jun 27 09:31:54 2020 +0200 block: move the initial blkg lookup into blkg_tryget_closest By moving the initial blkg lookup into blkg_tryget_closest we get a nicely self contained routines that does all the RCU locking. Acked-by: Tejun Heo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit a5b97526bf2860fe8306959f19ee428d1f5cc732 Author: Christoph Hellwig Date: Sat Jun 27 09:31:53 2020 +0200 block: bypass blkg_tryget_closest for the root_blkg The root_blkg is only torn down at the very end of removing a queue. So in the I/O submission path is always has a life reference and we can just grab another one using blkg_get instead of doing a tryget and parent walk that won't lead anywhere. Acked-by: Tejun Heo Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8c5462875224a6d81683e733087f501f58fccd4c Author: Christoph Hellwig Date: Sat Jun 27 09:31:52 2020 +0200 block: merge blkg_lookup_create and __blkg_lookup_create No good reason to keep these two functions split. Acked-by: Tejun Heo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 28fc591ff9d64cbc2b780be95ee3fde8f6ade7fd Author: Christoph Hellwig Date: Sat Jun 27 09:31:51 2020 +0200 block: move the bio cgroup associatation helpers to blk-cgroup.c Keep the cgroup code together. Acked-by: Tejun Heo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit a18b9b1590ca64f877588700de32c9ad236f405c Author: Christoph Hellwig Date: Sat Jun 27 09:31:50 2020 +0200 block: move bio_associate_blkg_from_page to mm/page_io.c bio_associate_blkg_from_page is a special purpose helper for swap bios that doesn't need access to bio internals. Move it to the swap code instead of having it in bio.c. Acked-by: Tejun Heo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 2badf06cf906c7af4bdd4bc1da62890c8e686341 Author: Christoph Hellwig Date: Sat Jun 27 09:31:49 2020 +0200 block: merge __bio_associate_blkg into bio_associate_blkg_from_css Merge __bio_associate_blkg into the only caller, which allows to slightly reduce the RCU crticial section and better explain the code flow. Acked-by: Tejun Heo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d92c370a16cbe0276954c761b874bd024a7e4fac Author: Christoph Hellwig Date: Sat Jun 27 09:31:48 2020 +0200 block: really clone the block cgroup in bio_clone_blkg_association bio_clone_blkg_association is supposed to clone the associatation, but actually ends up doing a search with a tryget. As we know we have a reference on the source cgroup just get an unconditional additional reference to it and call it a day. That also removes the need for a RCU critical section. Acked-by: Tejun Heo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit db9819c76c1fd48c30699381c94bba5c95dd467e Author: Christoph Hellwig Date: Sat Jun 27 09:31:47 2020 +0200 block: remove bio_disassociate_blkg bio_disassociate_blkg has two callers, of which one immediately assigns a new value to >bi_blkg. Just open code the function in the two callers. Acked-by: Tejun Heo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 4ef2c5c2462d59024adfa090af763a33dcff2f1a Author: Christoph Hellwig Date: Sat Jun 27 09:31:46 2020 +0200 dm: use bio_uninit instead of bio_disassociate_blkg bio_uninit is the proper API to clean up a BIO that has been allocated on stack or inside a structure that doesn't come from the BIO allocator. Switch dm to use that instead of bio_disassociate_blkg, which really is an implementation detail. Note that the bio_uninit calls are also moved to the two callers of __send_empty_flush, so that they better pair with the bio_init calls used to initialize them. Acked-by: Tejun Heo Reviewed-by: Johannes Thumshirn Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 653d96455e1e30811f4b9ec44d3b9df9bd7a55a3 Author: Mika Westerberg Date: Thu Jun 25 16:20:53 2020 +0300 pinctrl: tigerlake: Add support for Tiger Lake-H Intel Tiger Lake-H has different pin layout than the -LP variant so add support for this to the existing Tiger Lake driver. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit 169efc3bf4dde79a8e15d71f45f1150bec46b663 Author: Andy Shevchenko Date: Thu Jun 4 12:28:07 2020 +0300 pinctrl: merrifield: Add I²S bus 2 pins to groups and functions It is useful to control I²S bus 2 pins if we would like to connect an audio codec. Reported-by: mouse Reported-by: Pierre-Louis Bossart Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 28ccce5f50af2e9484d6b74b22ff9eb54bb775a2 Author: Gustavo A. R. Silva Date: Wed Jun 17 16:29:30 2020 -0500 s390/appldata: use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Message-Id: <20200617212930.GA11728@embeddedor> Signed-off-by: Heiko Carstens commit 6ffb3f6b46d0d02c318946047dc5ce6553495848 Author: Heiko Carstens Date: Thu Jun 18 07:41:18 2020 +0200 s390/debug: remove struct __debug_entry from uapi There is no interface to userspace which exposes anything that would require the struct __debug_entry definition. Therefore remove it from uapi. This allows to change the definition, since it is only kernel internally used. The only exception is the crash utility, however that tool must handle changes all the time anyway. Signed-off-by: Heiko Carstens commit ecb1ff6833c461ea3bcf16396cd4f1eb50b119c2 Author: Heiko Carstens Date: Thu Jun 18 07:09:57 2020 +0200 s390/debug: remove raw view There is not a single user of the debug raw view. Therefore remove it before anybody uses it. If anybody would make use of the view it would expose the struct __debug_entry definition to userspace and really would make it uapi. This wouldn't be good, since the definition is suboptimal and needs to be changed. Right now the structure definition is only defined to be uapi, however there is no user. Signed-off-by: Heiko Carstens commit 7fa0d6ff35cfaae9cc7012d9220cd24400c650f1 Author: Sven Schnelle Date: Tue May 12 09:55:18 2020 +0200 s390/time: remove unused function Signed-off-by: Sven Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 90ce70f06546e646713d036cfdec39427df296f7 Author: Sven Schnelle Date: Tue May 12 09:54:58 2020 +0200 s390/pci: remove unused functions Signed-off-by: Sven Schnelle Acked-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit b39e7724b0c28d569e9bd7e95f1b839f64e154bd Author: Alexander Egorenkov Date: Fri Jun 19 10:38:46 2020 +0200 s390/zcore: remove memmap device Remove unused /sys/kernel/debug/zcore/memmap device. Since at least version 1.24.0 of s390-tools zfcpdump no longer needs it and reads /proc/vmcore instead. Signed-off-by: Alexander Egorenkov Reviewed-by: Philipp Rudo Signed-off-by: Heiko Carstens commit 0188d08a46ffe4a39c6b463451a41d8b503d04d6 Author: Sven Schnelle Date: Fri Jun 12 13:06:07 2020 +0200 s390: convert to msecs_to_jiffies() Instead of using the old 'jiffies + HZ {/,*} something' calculation use msecs_to_jiffies() as that makes the code more readable. Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens commit fb49278624f75e15d36c3c43d322ca8961fb40e9 Author: Pavel Begunkov Date: Mon Jun 29 12:59:48 2020 +0300 io_uring: fix missing wake_up io_rw_reissue() Don't forget to wake up a process to which io_rw_reissue() added task_work. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 4a33bea003144e217d8a3ae666f171dfc2e97bd6 Author: Anurag Kumar Vulisha Date: Mon Jun 29 15:00:53 2020 +0300 phy: zynqmp: Add PHY driver for the Xilinx ZynqMP Gigabit Transceiver Xilinx ZynqMP SoCs have a Gigabit Transceiver with four lanes. All the high speed peripherals such as USB, SATA, PCIE, Display Port and Ethernet SGMII can rely on any of the four GT lanes for PHY layer. This patch adds driver for that ZynqMP GT core. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Laurent Pinchart Link: https://lore.kernel.org/r/20200629120054.29338-3-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit cea0f76a483d1270ac6f6513964e3e75193dda48 Author: Anurag Kumar Vulisha Date: Mon Jun 29 15:00:52 2020 +0300 dt-bindings: phy: Add DT bindings for Xilinx ZynqMP PSGTR PHY Add DT bindings for the Xilinx ZynqMP PHY. ZynqMP SoCs have a High Speed Processing System Gigabit Transceiver which provides PHY capabilities to USB, SATA, PCIE, Display Port and Ehernet SGMII controllers. Signed-off-by: Anurag Kumar Vulisha Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200629120054.29338-2-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit c791cc4b1feb881b3644c059dba5464b076bf592 Author: Steven Rostedt (VMware) Date: Tue Jun 16 14:53:55 2020 -0400 tracing: Only allow trace_array_printk() to be used by instances To prevent default "trace_printks()" from spamming the top level tracing ring buffer, only allow trace instances to use trace_array_printk() (which can be used without the trace_printk() start up warning). Signed-off-by: Steven Rostedt (VMware) commit dab20177b626198603176604c0f85ea1d67044ef Author: Rafael J. Wysocki Date: Mon Jun 29 13:58:28 2020 +0200 intel_idle: Eliminate redundant static variable The value of the lapic_timer_always_reliable static variable in the intel_idle driver reflects the boot_cpu_has(X86_FEATURE_ARAT) value and so it also reflects the static_cpu_has(X86_FEATURE_ARAT) value. Hence, the lapic_timer_always_reliable check in intel_idle() is redundant and apart from this lapic_timer_always_reliable is only used in two places in which boot_cpu_has(X86_FEATURE_ARAT) can be used directly. Eliminate the lapic_timer_always_reliable variable in accordance with the above observations. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit da85a855104d6ee563b8d06601ca3f6b0a13142f Merge: 5ae318f6fd9bb e6d701dca9893 Author: Rafael J. Wysocki Date: Mon Jun 29 13:49:49 2020 +0200 Merge back sysfs-related ACPI material for v5.9. commit 60e9eabf41fa916d2ef68c5bf929197975917578 Merge: 84e543bc9d1dc 0a19b068acc47 Author: Maarten Lankhorst Date: Mon Jun 29 12:15:51 2020 +0200 Backmerge remote-tracking branch 'drm/drm-next' into drm-misc-next Some conflicts with ttm_bo->offset removal, but drm-misc-next needs updating to v5.8. Signed-off-by: Maarten Lankhorst commit 2c509d1cc86dfe8eb70042a055dc039cbe850cf7 Author: Michael Hanselmann Date: Wed May 27 22:59:53 2020 +0200 USB: serial: ch341: name prescaler, divisor registers Add constants for the prescaler and divisor registers. Document and name register 0x25, and put the LCR define to more use. The 0x25 register (CH341_REG_LCR2) is only used by CH341 chips before version 0x30 and is involved in configuring the line control parameters. It's not known to the author whether there any such chips in the wild, and Linux' ch341 driver never supported them. For chip version 0x30 and above the 0x25 register is always set to zero. The alternative would've been to not set the register at all, but that may have unintended effects. Signed-off-by: Michael Hanselmann Link: https://lore.kernel.org/r/2e80916d-1be8-dc0f-abf9-adc0feea1803@msgid.hansmi.ch [ johan: fix up comment ] Signed-off-by: Johan Hovold commit dcbec046507615d7c4b5f6682dc11a1be9a2924c Author: Wesley Cheng Date: Thu Jun 25 12:54:44 2020 -0700 phy: qcom-snps: Add a set mode callback The set mode handler is used to keep track of the current role of the device. This is used for enabling certain resources within the PHY depending on if the device is behaving as a host or device. Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20200625195444.15130-3-wcheng@codeaurora.org Signed-off-by: Vinod Koul commit 0d75f508a9d56133a2834215959cde4605c804d1 Author: Wesley Cheng Date: Thu Jun 25 12:54:43 2020 -0700 phy: qcom-snps: Add runtime suspend and resume handlers Allow for the PHY to be put into a powered down state when possible. Add the required suspend and resume callbacks, which will determine what resources can be turned off depending on the cable status. Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/20200625195444.15130-2-wcheng@codeaurora.org Signed-off-by: Vinod Koul commit 90b65347cfc5c812b4c3fba4c5f55cbb2c19d286 Author: Jonathan Marek Date: Sat May 23 22:14:15 2020 -0400 phy: qcom-qmp: Add QMP V4 USB3 PHY support for sm8250 Add both the DP and UNI PHY for primary/secondary usb controllers. The tables are very similar to sm8150 (serdes_tbl is identical), but there are some differences. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200524021416.17049-4-jonathan@marek.ca Signed-off-by: Vinod Koul commit 7b675ba1d27854abde20c52c47f0957756e04304 Author: Jonathan Marek Date: Sat May 23 22:14:14 2020 -0400 phy: qcom-qmp: Add QMP V4 USB3 UNIPHY Add support for the USB3 PHY used by the secondary usb controller on sm8150 Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200524021416.17049-3-jonathan@marek.ca Signed-off-by: Vinod Koul commit 5dcbc71126e1dc41e32810af3f24b4a318eba5b3 Author: Jonathan Marek Date: Sat May 23 22:14:13 2020 -0400 phy: qcom-qmp: Allow different values for second lane The primary USB PHY on sm8250 sets some values differently for the second lane. This makes it possible to represent that. Signed-off-by: Jonathan Marek Tested-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200524021416.17049-2-jonathan@marek.ca Signed-off-by: Vinod Koul commit 84e543bc9d1dc550132ba25b72df28d40cc44333 Author: Antonio Borneo Date: Fri Jun 26 22:42:52 2020 +0200 drm/connector: fix minor typos in comments Some of these comments are part of the Linux GPU Driver Developer's Guide. Fix some minor typo in the comments and remove a repeated 'the'. Signed-off-by: Antonio Borneo Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200626204252.44565-1-antonio.borneo@st.com commit 6e9ca57e32f29172f02452baed7e2bccfb2c54fd Author: Geert Uytterhoeven Date: Wed Jun 24 15:19:31 2020 +0200 ARM: shmobile: defconfig: Enable RZ/A1H RTC support Enable support for the RZ/A1H Realtime Clock, which is used on the Genmai and RSK+RZA1 boards. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200624131931.3686-8-geert+renesas@glider.be commit 08de207119ec6b563fc153f25681316283f3c733 Author: Geert Uytterhoeven Date: Wed Jun 24 15:19:30 2020 +0200 ARM: shmobile: defconfig: Enable ADV7612 CEC support Enable support for Consumer Electronics Control on the Analog Devices ADV7612 HDMI receiver, which is used on the Koelsch and Lager boards. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200624131931.3686-7-geert+renesas@glider.be commit cf9bb4e374c13c05382c3619b7290eb31f093e57 Author: Geert Uytterhoeven Date: Wed Jun 24 15:19:29 2020 +0200 ARM: shmobile: defconfig: Enable RZ/A1 CEU support Enable support for the RZ/A1H Capture Engine Unit, which is used on the GR-Peach audiocamera shield expansion board. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200624131931.3686-6-geert+renesas@glider.be commit 5139cb0b04d97fdcca24ee66c71e9f2c7d24f461 Author: Geert Uytterhoeven Date: Wed Jun 24 15:19:28 2020 +0200 ARM: shmobile: defconfig: Enable RZ/A watchdog support Enable support for the RZ/A watchdog timer, which is used on RZ/A1H and RZ/A2M boards. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200624131931.3686-5-geert+renesas@glider.be commit f8ca0e17b122a0b0558a636c69bf48102edc8070 Author: Geert Uytterhoeven Date: Wed Jun 24 15:19:27 2020 +0200 ARM: shmobile: defconfig: Enable CAT9554 support Enable support for the ON Semiconductor CAT9554 I2C I/O Expander, which is used on the RSK+RZA1 board. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200624131931.3686-4-geert+renesas@glider.be commit f09a10a9bf584dace59474195e5619ca5bb412ba Author: Geert Uytterhoeven Date: Wed Jun 24 15:19:26 2020 +0200 ARM: shmobile: defconfig: Enable DA9063 ONKEY support Enable support for the "ONKEY" of the Dialog DA9063 PMIC, which is used on the Stout and Silk boards. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200624131931.3686-3-geert+renesas@glider.be commit 835a056da6409ec7a9570324314d8ee0aa404e41 Author: Geert Uytterhoeven Date: Wed Jun 24 15:19:25 2020 +0200 ARM: shmobile: defconfig: Refresh for v5.8-rc1 Refresh the defconfig for Renesas ARM boards: - Drop CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 (no longer needed since commit 39c3e304567a013a ("ARM: 8984/1: Kconfig: set default ZBOOT_ROM_TEXT/BSS value to 0x0")), - Move CONFIG_MEDIA_SUBDRV_AUTOSELECT (moved in commit 1b80d36aeb92a767 ("media: Kconfig: move the position of sub-driver autoselection")), - Drop CONFIG_MEDIA_CONTROLLER=y and CONFIG_VIDEO_V4L2_SUBDEV_API=y (auto-enabled since commit 32a363d0b0b142f3 ("media: Kconfig files: use select for V4L2 subdevs and MC")), - Enable CONFIG_MEDIA_PLATFORM_SUPPORT (needed since commit 06b93644f4d102bd ("media: Kconfig: add an option to filter in/out platform drivers")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20200624131931.3686-2-geert+renesas@glider.be commit b7f13b914730026ca7fdc0d5ef6a791f3c613fe2 Author: Ulrich Hecht Date: Tue Sep 8 17:42:23 2015 +0200 ARM: dts: r8a7778: Enable IRLM setup via DT Make use of the IRLM setup feature in the renesas-intc-irqpin driver. Signed-off-by: Ulrich Hecht Tested-by: Simon Horman Link: https://lore.kernel.org/r/1441726946-30131-3-git-send-email-ulrich.hecht+renesas@gmail.com Signed-off-by: Geert Uytterhoeven commit 4185b3b92792eaec5869266e594338343421ffb0 Author: Petteri Aimonen Date: Thu Jun 18 16:37:37 2020 +0200 selftests/fpu: Add an FPU selftest Add a selftest for the usage of FPU code in kernel mode. Currently only implemented for x86. In the future, kernel FPU testing could be unified between the different architectures supporting it. [ bp: - Split out from a conglomerate patch, put comments over statements. - run the test only on debugfs write. - Add bare-minimum run_test_fpu.sh, run 1000 iterations on all CPUs by default. - Add conditionally -msse2 so that clang doesn't generate library calls. - Use cc-option to detect gcc 7.1 not supporting -mpreferred-stack-boundary=3 (amluto). - Document stuff so that we don't forget. - Fix: ld: lib/test_fpu.o: in function `test_fpu_get': >> test_fpu.c:(.text+0x16e): undefined reference to `__sanitizer_cov_trace_cmpd' >> ld: test_fpu.c:(.text+0x1a7): undefined reference to `__sanitizer_cov_trace_cmpd' ld: test_fpu.c:(.text+0x1e0): undefined reference to `__sanitizer_cov_trace_cmpd' ] Reported-by: kernel test robot Signed-off-by: Petteri Aimonen Signed-off-by: Borislav Petkov Reviewed-by: Nick Desaulniers Link: https://lkml.kernel.org/r/20200624114646.28953-3-bp@alien8.de commit 7a05c3b6d24b8460b3cec436cf1d33fac43c8450 Author: Emil Velikov Date: Tue May 5 17:03:29 2020 +0100 drm/mipi: use dcs write for mipi_dsi_dcs_set_tear_scanline The helper uses the MIPI_DCS_SET_TEAR_SCANLINE, although it's currently using the generic write. This does not look right. Perhaps some platforms don't distinguish between the two writers? Cc: Robert Chiras Cc: Vinay Simha BN Cc: Jani Nikula Cc: Thierry Reding Fixes: e83950816367 ("drm/dsi: Implement set tear scanline") Signed-off-by: Emil Velikov Reviewed-by: Thierry Reding Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200505160329.2976059-3-emil.l.velikov@gmail.com commit 1a5c4fe91de2e81c93c1e249a6a05295295ff3d9 Author: Emil Velikov Date: Tue May 5 17:03:28 2020 +0100 drm/panel: use mipi_dsi_dcs_write_buffer where possible A few of the new panels create a local macro wrapping around mipi_dsi_dcs_write. At the same time, they don't really care about the command/payload split. mipi_dsi_dcs_write does a kmalloc/memcpy/kfree for payload > 7 bytes. Avoid that all together by using the _buffer function. Aside: panel-xinpeng-xpp055c272.c calls its wrapper "generic" although it should be "dcs". But that for another day/patch. Cc: Heiko Stuebner Cc: Heiko Stuebner Cc: Thierry Reding Cc: Sam Ravnborg Signed-off-by: Emil Velikov Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200505160329.2976059-2-emil.l.velikov@gmail.com commit e192fba23ef5ed1439fe699d808c480ca969b0ed Author: Emil Velikov Date: Tue May 5 17:03:27 2020 +0100 drm/dsi: use stack buffer in mipi_dsi_dcs_write() Currently the function heap allocates when we have any payload. Where in many case the payload is 1 byte - ouch. >From casual observation, vast majority of the payloads are smaller than 8 bytes - so use a stack array tx[8] to avoid the senseless kmalloc and kfree dance. Cc: Jani Nikula Cc: Thierry Reding Signed-off-by: Emil Velikov Reviewed-by: Thierry Reding Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200505160329.2976059-1-emil.l.velikov@gmail.com commit 8767c3fc28b2c34170cac2b0691a0f045401e31f Author: Jason Yan Date: Mon May 4 19:32:30 2020 +0800 drm/zte: remove unneeded semicolon Fix the following coccicheck warning: drivers/gpu/drm/zte/zx_vga.c:158:2-3: Unneeded semicolon drivers/gpu/drm/zte/zx_vga.c:171:2-3: Unneeded semicolon drivers/gpu/drm/zte/zx_vga.c:179:2-3: Unneeded semicolon Signed-off-by: Jason Yan Acked-by: Shawn Guo Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200504113230.40588-1-yanaijie@huawei.com commit 41843ff0ece111515fc1913e4e5295fa398c5d00 Author: Luc Van Oostenryck Date: Sun Jun 28 20:39:26 2020 +0200 staging: ks7010: fix ks_wlan_start_xmit()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too and usind 'NETDEV_TX_OK' instead of 0 accordingly. Signed-off-by: Luc Van Oostenryck Link: https://lore.kernel.org/r/20200628183926.74908-1-luc.vanoostenryck@gmail.com Signed-off-by: Greg Kroah-Hartman commit a45f04ba2422f6eab8226cd9ea05251e92b0914f Author: B K Karthik Date: Mon Jun 29 01:34:42 2020 -0400 staging: rtl8188eu: include: hal8188e_rate_adaptive.h: fixed a blank space coding style issue added blank space around arithmetic operators to improve readability Signed-off-by: B K Karthik Link: https://lore.kernel.org/r/20200629053442.eob7oixlxbs5rh33@pesu-pes-edu Signed-off-by: Greg Kroah-Hartman commit 9cf6ffae380061b16b2b4269d4f2e1a50aa2508a Merge: b3a5ce874c261 9ebcfadb06103 Author: Greg Kroah-Hartman Date: Mon Jun 29 08:22:27 2020 +0200 Merge 5.8-rc3 into usb-next We want the USB fixes in here, and this resolves a merge issue found in linux-next. Signed-off-by: Greg Kroah-Hartman commit 347fa58ff5558075eec98725029c443c80ffbf4a Merge: 0107635e15ac0 9ebcfadb06103 Author: Greg Kroah-Hartman Date: Mon Jun 29 08:18:30 2020 +0200 Merge 5.8-rc3 into staging-next We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit b8483ecaf72ee9059dcca5de969781028a550f89 Author: Geliang Tang Date: Sun Jun 28 18:14:13 2020 +0800 liquidio: use list_empty_careful in lio_list_delete_head Use list_empty_careful() instead of open-coding. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit 6fc3e68f5b35c4861b28733fa32f636db7188746 Author: Geliang Tang Date: Sun Jun 28 17:32:25 2020 +0800 sctp: use list_is_singular in sctp_list_single_entry Use list_is_singular() instead of open-coding. Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit ac6a86a5392f123671e309697ec7b8f0c6f01c62 Author: Armin Wolf Date: Sun Jun 28 00:07:47 2020 +0200 8390: Fix coding-style issues Fix some coding-style issues, including one which made the function pointers in the struct ei_device hard to understand. Signed-off-by: Armin Wolf Signed-off-by: David S. Miller commit 836e0e555893bbff8997d666b3e4d508c8a7641b Author: Vladimir Oltean Date: Sat Jun 27 15:03:06 2020 +0300 net: mscc: ocelot: remove EXPORT_SYMBOL from ocelot_net.c Now that all net_device operations are bundled together inside mscc_ocelot.ko and no longer part of the common library, there's no reason to export these symbols. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit cf8a9ab7f7d4b43ef7aa85427fec2458a6709054 Merge: d8a6472f35946 cdafdc29ef75a Author: David S. Miller Date: Sun Jun 28 20:56:38 2020 -0700 Merge branch 'r8169-make-RTL8401-a-separate-chip-version' Heiner Kallweit says: ==================== r8169: make RTL8401 a separate chip version So far RTL8401 was treated like a RTL8101e, means we relied on the BIOS to configure MAC and PHY properly. Make RTL8401 a separate chip version and copy MAC / PHY config from r8101 vendor driver. ==================== Signed-off-by: David S. Miller commit cdafdc29ef75a5bca300cada5fd4a205d5ef29cf Author: Heiner Kallweit Date: Sun Jun 28 23:17:07 2020 +0200 r8169: sync support for RTL8401 with vendor driver So far RTL8401 was treated like a RTL8101e, means we relied on the BIOS to configure MAC and PHY properly. Make RTL8401 a separate chip version and copy MAC / PHY config from r8101 vendor driver. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 93c09ca6b140fcd672bb815624a6682016b005b6 Author: Heiner Kallweit Date: Sun Jun 28 23:15:45 2020 +0200 r8169: merge handling of RTL8101e and RTL8100e Chip versions 13, 14, 15 are treated the same by the driver, therefore let's merge them. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit d8a6472f35946f50a6d3b5c5d595e5e2a90dc749 Merge: fe80536acf839 2a78478439317 Author: David S. Miller Date: Sun Jun 28 20:52:53 2020 -0700 Merge branch 'netdev_tx_t' Luc Van Oostenryck says: ==================== net: always use netdev_tx_t for xmit()'s return type The ndo_start_xmit() methods should return a 'netdev_tx_t', not an int, and so should return NETDEV_TX_OK, not 0. The patches in the series fix most of the remaning drivers and subsystems (those included in allyesconfig on x86). ==================== Signed-off-by: David S. Miller commit 2a78478439317bb18eafb834e10b0dc02c1e53c2 Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:37 2020 +0200 cxgb4vf: fix t4vf_eth_xmit()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit 433f17a93c52478e10d6541fb706fbcd0c6a6124 Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:36 2020 +0200 l2tp: fix l2tp_eth_dev_xmit()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit 42deace2a54cac2ecb0fb3c38d98502942bd1167 Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:35 2020 +0200 net/hsr: fix hsr_dev_xmit()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit 146ba9a3679ff8846e2044886b0dfce4ad03bc08 Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:34 2020 +0200 usbnet: ipheth: fix ipheth_tx()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit a63a3749c4d887981f49367db71d0401505be022 Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:33 2020 +0200 net: plip: fix plip_tx_packet()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit 673d8eb6cfbea0693a49e46775e325c0e651e6b1 Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:32 2020 +0200 net: dwc-xlgmac: fix xlgmac_xmit()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit 4e516a35eb01864b82c7f36fdac94ac9a9b71c3f Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:31 2020 +0200 net: pch_gbe: fix pch_gbe_xmit_frame()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit 737ce1e98668cda4fd2ff64ac4132511a3b09f64 Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:30 2020 +0200 net: nfp: fix nfp_net_tx()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit f649c35551c7e4c0e8797862ff755d2ca0be2e2e Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:29 2020 +0200 net: nb8800: fix nb8800_xmit()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit de37b0a58a3e76f5235ca023e74311060624603e Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:28 2020 +0200 net: arc_emac: fix arc_emac_tx()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit 92c5e1150732ac7cc3f876183db62b08572ec63e Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:27 2020 +0200 net: aquantia: fix aq_ndev_start_xmit()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit b8fc70906b3ba40c84e794124dc19e4320d93dc7 Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:26 2020 +0200 caif: fix cfv_netdev_tx()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit 1d01230bd56e24b3e6b4c09da2c37a70905a51da Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:25 2020 +0200 caif: fix cfspi_xmit()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too and returning NETDEV_TX_OK instead of 0 accordingly. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit 8805464a6e7e27cccca73f785ab3604f6af421cf Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:24 2020 +0200 caif: fix caif_xmit()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit c6ecd475165ef5729031f0d27d29b8862b188cd1 Author: Luc Van Oostenryck Date: Sun Jun 28 21:53:23 2020 +0200 cail,hsi: fix cfhsi_xmit()'s return type 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'. Fix this by returning 'netdev_tx_t' in this driver too and returning NETDEV_TX_OK instead of 0 accordingly. Signed-off-by: Luc Van Oostenryck Signed-off-by: David S. Miller commit fe80536acf8397827be77f9b8ada384b90e790d0 Author: Martin Date: Sun Jun 28 23:18:23 2020 +0530 bareudp: Added attribute to enable & disable rx metadata collection Metadata need not be collected in receive if the packet from bareudp device is not targeted to openvswitch. Signed-off-by: Martin Signed-off-by: David S. Miller commit 8930449628f7f66a0d368ff9eb92146f7f424431 Merge: 491f14db45dc7 2ac84cd160a7d Author: David S. Miller Date: Sun Jun 28 20:40:58 2020 -0700 Merge branch 'hinic-add-some-ethtool-ops-support' Luo bin says: ==================== hinic: add some ethtool ops support patch #1: support to set and get pause params with "ethtool -A/a" cmd patch #2: support to set and get irq coalesce params with "ethtool -C/c" cmd patch #3: support to do self test with "ethtool -t" cmd patch #4: support to identify physical device with "ethtool -p" cmd patch #5: support to get eeprom information with "ethtool -m" cmd ==================== Signed-off-by: David S. Miller commit 2ac84cd160a7d8562ac8ff9acca808edced4c84e Author: Luo bin Date: Sun Jun 28 20:36:24 2020 +0800 hinic: add support to get eeprom information add support to get eeprom information from the plug-in module with ethtool -m cmd. Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 07afcc7ab40e921c90de0392c99c3d25611a94df Author: Luo bin Date: Sun Jun 28 20:36:23 2020 +0800 hinic: add support to identify physical device add support to identify physical device by flashing an LED attached to it with ethtool -p cmd. Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 4aa218a4fe77d57edd068210da4c90dd19523954 Author: Luo bin Date: Sun Jun 28 20:36:22 2020 +0800 hinic: add self test support add support to excute internal and external loopback test with ethtool -t cmd. Signed-off-by: Luo bin Signed-off-by: David S. Miller commit a0337c0dee686acf9b38d50abb923d13e27f7e83 Author: Luo bin Date: Sun Jun 28 20:36:21 2020 +0800 hinic: add support to set and get irq coalesce add support to set TX/RX irq coalesce params with ethtool -C and get these params with ethtool -c. Signed-off-by: Luo bin Signed-off-by: David S. Miller commit ea256222a463858ab034b667486137c2b56e6120 Author: Luo bin Date: Sun Jun 28 20:36:20 2020 +0800 hinic: add support to set and get pause params add support to set pause params with ethtool -A and get pause params with ethtool -a. Also remove set_link_ksettings ops for VF and enable pause by default. Signed-off-by: Luo bin Signed-off-by: David S. Miller commit 322b598be4d9b9090cda560c4caab78704615ab4 Author: Xu Yilun Date: Tue Jun 16 12:08:44 2020 +0800 fpga: dfl: introduce interrupt trigger setting API FPGA user applications may be interested in interrupts generated by DFL features. For example, users can implement their own FPGA logics with interrupts enabled in AFU (Accelerated Function Unit, dynamic region of DFL based FPGA). So user applications need to be notified to handle these interrupts. In order to allow userspace applications to monitor interrupts, driver requires userspace to provide eventfds as interrupt notification channels. Applications then poll/select on the eventfds to get notified. This patch introduces a generic helper functions to do eventfds binding with given interrupts. Sub feature drivers are expected to use XXX_GET_IRQ_NUM to query irq info, and XXX_SET_IRQ to set eventfds for interrupts. This patch also introduces helper functions for these 2 ioctls. Signed-off-by: Luwei Kang Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Signed-off-by: Tom Rix Reviewed-by: Marcelo Tosatti Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit bfef946dbe1bbe6cae97bba27594e8d5b0e01ffa Author: Xu Yilun Date: Tue Jun 16 12:08:43 2020 +0800 fpga: dfl: pci: add irq info for feature devices enumeration Some DFL FPGA PCIe cards (e.g. Intel FPGA Programmable Acceleration Card) support MSI-X based interrupts. This patch allows PCIe driver to prepare and pass interrupt resources to DFL via enumeration API. These interrupt resources could then be assigned to actual features which use them. Signed-off-by: Luwei Kang Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Signed-off-by: Tom Rix Reviewed-by: Marcelo Tosatti Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit 8d021039cbb5e358c7c07c562811253a61c8d551 Author: Xu Yilun Date: Tue Jun 16 12:08:42 2020 +0800 fpga: dfl: parse interrupt info for feature devices on enumeration DFL based FPGA devices could support interrupts for different purposes, but current DFL framework only supports feature device enumeration with given MMIO resources information via common DFL headers. This patch introduces one new API dfl_fpga_enum_info_add_irq for low level bus drivers (e.g. PCIe device driver) to pass its interrupt resources information to DFL framework for enumeration, and also adds interrupt enumeration code in framework to parse and assign interrupt resources for enumerated feature devices and their own sub features. With this patch, DFL framework enumerates interrupt resources for core features, including PORT Error Reporting, FME (FPGA Management Engine) Error Reporting and also AFU User Interrupts. Signed-off-by: Luwei Kang Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Reviewed-by: Marcelo Tosatti Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit afa12644c877d3f627281bb6493d7ca8f9976e3d Merge: 16d37ee3d2b1c 5712174c5c9e3 Author: Alexei Starovoitov Date: Sun Jun 28 10:06:53 2020 -0700 Merge branch 'libbpf_autoload_knob' Andrii Nakryiko says: ==================== Add ability to turn off default auto-loading of each BPF program by libbpf on BPF object load. This is the feature that allows BPF applications to have optional functionality, which is only excercised on kernel that support necessary features, while falling back to reduced/less performant functionality, if kernel is outdated. ==================== Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit 5712174c5c9e3d684ad05d4aaed1e14acda4bb74 Author: Andrii Nakryiko Date: Thu Jun 25 16:26:29 2020 -0700 selftests/bpf: Test auto-load disabling logic for BPF programs Validate that BPF object with broken (in multiple ways) BPF program can still be successfully loaded, if that broken BPF program is disabled. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200625232629.3444003-3-andriin@fb.com commit d929758101fc0674008169dc1de963e3181c587b Author: Andrii Nakryiko Date: Thu Jun 25 16:26:28 2020 -0700 libbpf: Support disabling auto-loading BPF programs Currently, bpf_object__load() (and by induction skeleton's load), will always attempt to prepare, relocate, and load into kernel every single BPF program found inside the BPF object file. This is often convenient and the right thing to do and what users expect. But there are plenty of cases (especially with BPF development constantly picking up the pace), where BPF application is intended to work with old kernels, with potentially reduced set of features. But on kernels supporting extra features, it would like to take a full advantage of them, by employing extra BPF program. This could be a choice of using fentry/fexit over kprobe/kretprobe, if kernel is recent enough and is built with BTF. Or BPF program might be providing optimized bpf_iter-based solution that user-space might want to use, whenever available. And so on. With libbpf and BPF CO-RE in particular, it's advantageous to not have to maintain two separate BPF object files to achieve this. So to enable such use cases, this patch adds ability to request not auto-loading chosen BPF programs. In such case, libbpf won't attempt to perform relocations (which might fail due to old kernel), won't try to resolve BTF types for BTF-aware (tp_btf/fentry/fexit/etc) program types, because BTF might not be present, and so on. Skeleton will also automatically skip auto-attachment step for such not loaded BPF programs. Overall, this feature allows to simplify development and deployment of real-world BPF applications with complicated compatibility requirements. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200625232629.3444003-2-andriin@fb.com commit f3a6fa2267480d7f19fbde8316372be46055e548 Author: Pavel Begunkov Date: Sun Jun 28 12:52:38 2020 +0300 io_uring: fix iopoll -EAGAIN handling req->iopoll() is not necessarily called by a task that submitted a request. Because of that, it's dangerous to grab_env() and punt async on -EGAIN, potentially grabbing another task's mm and corrupting its memory. Do resubmit from the submitter task context. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 3adfecaa647ff8afa4b6f5907193cf751a0f8351 Author: Pavel Begunkov Date: Sun Jun 28 12:52:37 2020 +0300 io_uring: do task_work_run() during iopoll There are a lot of new users of task_work, and some of task_work_add() may happen while we do io polling, thus make iopoll from time to time to do task_work_run(), so it doesn't poll for sitting there reqs. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 826f2f48da8c331ac51e1381998d318012d66550 Author: Guo Xuenan Date: Sun Jun 28 09:56:25 2020 -0400 blk-rq-qos: remove redundant finish_wait to rq_qos_wait. It is no need do finish_wait twice after acquiring inflight. Signed-off-by: Guo Xuenan Signed-off-by: Jens Axboe commit 6795c5aba247653f99d1f336ff496dd74659b322 Author: Pavel Begunkov Date: Sun Jun 28 12:52:35 2020 +0300 io_uring: clean up req->result setting by rw Assign req->result to io_size early in io_{read,write}(), it's enough and makes it more straightforward. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9b0d911acce00b67f7e7336f838b732de7d917d6 Author: Pavel Begunkov Date: Sun Jun 28 12:52:34 2020 +0300 io_uring: kill REQ_F_LINK_NEXT After pulling nxt from a request, it's no more a links head, so clear REQ_F_LINK_HEAD. Absence of this flag also indicates that there are no linked requests, so replacing REQ_F_LINK_NEXT, which can be killed. Linked timeouts also behave leaving the flag intact when necessary. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2d6500d44c1374808040d120e625a22b013c9f0d Author: Pavel Begunkov Date: Sun Jun 28 12:52:33 2020 +0300 io_uring: cosmetic changes for batch free Move all batch free bits close to each other and rename in a consistent way. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c3524383333e4ff2f720ab0c02b3a329f72de78b Author: Pavel Begunkov Date: Sun Jun 28 12:52:32 2020 +0300 io_uring: batch-free linked requests as well There is no reason to not batch deallocation of linked requests. Take away its next req first and handle it as everything else in io_req_multi_free(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2757a23e7f6441eabf605ca59eeb88c34071757d Author: Pavel Begunkov Date: Sun Jun 28 12:52:31 2020 +0300 io_uring: dismantle req early and remove need_iter Every request in io_req_multi_free() is has ->file set. Instead of pointlessly defering and counting reqs with file, dismantle it on place and save for batch dealloc. It also saves us from potentially skipping io_cleanup_req(), put_task(), etc. Never happens though, becacuse ->file is always there. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e6543a816edca00b6b4c48625d142059d7211059 Author: Pavel Begunkov Date: Sun Jun 28 12:52:30 2020 +0300 io_uring: remove inflight batching in free_many() io_free_req_many() is used only for iopoll requests, i.e. reads/writes. Hence no need to batch inflight unhooking. For safety, it'll be done by io_dismantle_req(), which replaces __io_req_aux_free(), and looks more solid and cleaner. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8c9cb6cd9a46ae6fb7cb6c39cf6a48a53440feef Author: Pavel Begunkov Date: Sun Jun 28 12:52:29 2020 +0300 io_uring: fix refs underflow in io_iopoll_queue() Now io_complete_rw_common() puts a ref, extra io_req_put() in io_iopoll_queue() causes undeflow. Remove it. [ 455.998620] refcount_t: underflow; use-after-free. [ 455.998743] WARNING: CPU: 6 PID: 285394 at lib/refcount.c:28 refcount_warn_saturate+0xae/0xf0 [ 455.998772] CPU: 6 PID: 285394 Comm: read-write2 Tainted: G I E 5.8.0-rc2-00048-g1b1aa738f167-dirty #509 [ 455.998772] RIP: 0010:refcount_warn_saturate+0xae/0xf0 ... [ 455.998778] Call Trace: [ 455.998778] io_put_req+0x44/0x50 [ 455.998778] io_iopoll_complete+0x245/0x370 [ 455.998779] io_iopoll_getevents+0x12f/0x1a0 [ 455.998779] io_iopoll_reap_events.part.0+0x5e/0xa0 [ 455.998780] io_ring_ctx_wait_and_kill+0x132/0x1c0 [ 455.998780] io_uring_release+0x20/0x30 [ 455.998780] __fput+0xcd/0x230 [ 455.998781] ____fput+0xe/0x10 [ 455.998781] task_work_run+0x67/0xa0 [ 455.998781] do_exit+0x35d/0xb70 [ 455.998782] do_group_exit+0x43/0xa0 [ 455.998783] get_signal+0x140/0x900 [ 455.998783] do_signal+0x37/0x780 [ 455.998784] __prepare_exit_to_usermode+0x126/0x1c0 [ 455.998785] __syscall_return_slowpath+0x3b/0x1c0 [ 455.998785] do_syscall_64+0x5f/0xa0 [ 455.998785] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: a1d7c393c47 ("io_uring: enable READ/WRITE to use deferred completions") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 710c2bfb66474a186b0196e3342d43db0e6c04e1 Author: Pavel Begunkov Date: Sat Jun 27 14:04:58 2020 +0300 io_uring: fix missing io_grab_files() We won't have valid ring_fd, ring_file in task work. Grab files early. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit a6d45dd0d43e6d1275e002704540688b6768bc22 Author: Pavel Begunkov Date: Sat Jun 27 14:04:57 2020 +0300 io_uring: don't mark link's head for_async No reason to mark a head of a link as for-async in io_req_defer_prep(). grab_env(), etc. That will be done further during submission if neccessary. Mark for_async=false saving extra grab_env() in many cases. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1bcb8c5d65a845e0ecb9e82237c399b29b8d15ea Author: Pavel Begunkov Date: Sat Jun 27 14:04:56 2020 +0300 io_uring: fix feeding io-wq with uninit reqs io_steal_work() can't be sure that @nxt has req->work properly set, so we can't pass it to io-wq as is. A dirty quick fix -- drag it through io_req_task_queue(), and always return NULL from io_steal_work(). e.g. [ 50.770161] BUG: kernel NULL pointer dereference, address: 00000000 [ 50.770164] #PF: supervisor write access in kernel mode [ 50.770164] #PF: error_code(0x0002) - not-present page [ 50.770168] CPU: 1 PID: 1448 Comm: io_wqe_worker-0 Tainted: G I 5.8.0-rc2-00035-g2237d76530eb-dirty #494 [ 50.770172] RIP: 0010:override_creds+0x19/0x30 ... [ 50.770183] io_worker_handle_work+0x25c/0x430 [ 50.770185] io_wqe_worker+0x2a0/0x350 [ 50.770190] kthread+0x136/0x180 [ 50.770194] ret_from_fork+0x22/0x30 Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 906a8c3fdbc367325d4200e39212a2a7715b7b0e Author: Pavel Begunkov Date: Sat Jun 27 14:04:55 2020 +0300 io_uring: fix punting req w/o grabbed env It's not enough to check for REQ_F_WORK_INITIALIZED and punt async assuming that io_req_work_grab_env() was called, it may not have been. E.g. io_close_prep() and personality path set the flag without further async init. As a quick fix, always pass next work through io_req_task_queue(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8ef77766ba8694968ed4ba24311b4bacee14f235 Author: Pavel Begunkov Date: Sat Jun 27 14:04:59 2020 +0300 io_uring: fix req->work corruption req->work and req->task_work are in a union, so io_req_task_queue() screws everything that was in work. De-union them for now. [ 704.367253] BUG: unable to handle page fault for address: ffffffffaf7330d0 [ 704.367256] #PF: supervisor write access in kernel mode [ 704.367256] #PF: error_code(0x0003) - permissions violation [ 704.367261] CPU: 6 PID: 1654 Comm: io_wqe_worker-0 Tainted: G I 5.8.0-rc2-00038-ge28d0bdc4863-dirty #498 [ 704.367265] RIP: 0010:_raw_spin_lock+0x1e/0x36 ... [ 704.367276] __alloc_fd+0x35/0x150 [ 704.367279] __get_unused_fd_flags+0x25/0x30 [ 704.367280] io_openat2+0xcb/0x1b0 [ 704.367283] io_issue_sqe+0x36a/0x1320 [ 704.367294] io_wq_submit_work+0x58/0x160 [ 704.367295] io_worker_handle_work+0x2a3/0x430 [ 704.367296] io_wqe_worker+0x2a0/0x350 [ 704.367301] kthread+0x136/0x180 [ 704.367304] ret_from_fork+0x22/0x30 Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0107635e15ac09f6549a3c5ea179b0a16eb2181f Author: Coiby Xu Date: Sat Jun 27 22:58:57 2020 +0800 staging: qlge: replace pr_err with netdev_err Replace all pr_errs with netdev_err. Suggested-by: Joe Perches Signed-off-by: Coiby Xu Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20200627145857.15926-5-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae7368f9a30b61db7caaf958bf7ff2e1f7e6f715 Author: Coiby Xu Date: Sat Jun 27 22:58:56 2020 +0800 staging: qlge: fix ql_sem_unlock Some functions return without releasing the lock. Replace return with break. Suggested-by Dan Carpenter . Signed-off-by: Coiby Xu Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20200627145857.15926-4-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6e8227155ece996e8887d3e4a0059b7fdcbcd1f0 Author: Michael Straube Date: Sun Jun 28 09:30:58 2020 +0200 staging: rtl8188eu: remove unnecessary comments in hal8188e_phy_cfg.h Remove unnecessary comments in hal8188e_phy_cfg.h to improve readability and clear multiple blank lines checkpatch issues. CHECK: Please don't use multiple blank lines Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200628073058.11228-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 491f14db45dc7fc08ffe00ea6881615638dd159c Merge: b08866f42a875 082d4fa980b07 Author: David S. Miller Date: Sat Jun 27 17:41:27 2020 -0700 Merge branch 'tcp-improve-delivered-counts-in-SCM_TSTAMP_ACK' Yousuk Seung says: ==================== tcp: improve delivered counts in SCM_TSTAMP_ACK Currently delivered and delivered_ce in OPT_STATS of SCM_TSTAMP_ACK do not fully reflect the current ack being timestamped. Also they are not in sync as the delivered count includes packets being sacked and some of cumulatively acked but delivered_ce includes none. This patch series updates tp->delivered and tp->delivered_ce together to keep them in sync. It also moves generating SCM_TSTAMP_ACK to later in tcp_clean_rtx_queue() to reflect packets being cumulatively acked up until the current skb for sack-enabled connections. ==================== Signed-off-by: David S. Miller commit 082d4fa980b07b1cc602305e9cc0815d19663ed3 Author: Yousuk Seung Date: Fri Jun 26 21:05:35 2020 -0700 tcp: update delivered_ce with delivered Currently tp->delivered is updated in various places in tcp_ack() but tp->delivered_ce is updated once at the end. As a result two counts in OPT_STATS of SCM_TSTAMP_ACK timestamps generated in tcp_ack() may not be in sync. This patch updates both counts at the same in tcp_ack(). Signed-off-by: Yousuk Seung Signed-off-by: Yuchung Cheng Acked-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit f00394ce6054e54319aefa51e4c495f9ebeb8669 Author: Yousuk Seung Date: Fri Jun 26 21:05:34 2020 -0700 tcp: count sacked packets in tcp_sacktag_state Add sack_delivered to tcp_sacktag_state and count the number of sacked and dsacked packets. This is pure refactor for future patches to improve tracking delivered counts. Signed-off-by: Yousuk Seung Signed-off-by: Yuchung Cheng Acked-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit c634e34f6ebfb75259e6ce467523fd3adf30d3d2 Author: Yousuk Seung Date: Fri Jun 26 21:05:33 2020 -0700 tcp: add ece_ack flag to reno sack functions Pass a boolean flag that tells the ECE state of the current ack to reno sack functions. This is pure refactor for future patches to improve tracking delivered counts. Signed-off-by: Yousuk Seung Signed-off-by: Yuchung Cheng Acked-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit fdb7eb21ddd3cc07b8120b6f5cc0b279a0ed198e Author: Yousuk Seung Date: Fri Jun 26 21:05:32 2020 -0700 tcp: stamp SCM_TSTAMP_ACK later in tcp_clean_rtx_queue() Currently tp->delivered is updated with sacked packets but not cumulatively acked when SCP_TSTAMP_ACK is timestamped. This patch moves a tcp_ack_tstamp() call in tcp_clean_rtx_queue() to later in the loop so that when a skb is fully acked OPT_STATS of SCM_TSTAMP_ACK will include the current skb in the delivered count. When not fully acked tcp_ack_tstamp() is a no-op and there is no change in behavior. Signed-off-by: Yousuk Seung Signed-off-by: Yuchung Cheng Acked-by: Eric Dumazet Acked-by: Neal Cardwell Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit a29074367b347af9e19d36522f7ad9a7db4b9c28 Author: Tariq Toukan Date: Mon Jun 15 13:02:49 2020 +0300 net/mlx5e: kTLS, Improve rx handler function call Prior to this patch mlx5e tls rx handler was called unconditionally on all rx frames and the decision whether a frame is a valid tls record is done inside that function. A function call can be expensive especially for regular rx packet rate. To avoid this, check the tls validity before jumping into the tls rx handler. While at it, split between kTLS device offload rx handler and FPGA tls rx handler using a similar method. Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan commit ed9a7c53b8781f851bd8406551d6abfb2d826683 Author: Tariq Toukan Date: Mon Jun 22 18:32:36 2020 +0300 net/mlx5e: kTLS, Cleanup redundant capability check All callers of mlx5e_ktls_build_netdev() check capability before the call. Remove the repeated check in the function. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit c5607360ec4ea5d0c955de501b9eeb04fa2465d0 Author: Tariq Toukan Date: Thu Jun 18 12:45:59 2020 +0300 net/mlx5e: Increase Async ICO SQ size Resync communication with HW for kTLS RX is done via the async ICOSQs. kTLS RX resync requests might come in bursts. To improve the success chances for such bursts, use a larger ICOSQ. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 76c1e1ac2aaeddd5505e4ecfafa963885b5551ab Author: Tariq Toukan Date: Mon Jun 15 15:25:23 2020 +0300 net/mlx5e: kTLS, Add kTLS RX stats Add global and per-channel ethtool SW stats for the device offload. Document the new counters in tls-offload.rst. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 0419d8c9d8f8d825576a41b2bb1e6043f34d1ae0 Author: Tariq Toukan Date: Tue Jun 16 15:15:06 2020 +0300 net/mlx5e: kTLS, Add kTLS RX resync support Implement the RX resync procedure, using the TLS async resync API. The HW offload of TLS decryption in RX side might get out-of-sync due to out-of-order reception of packets. This requires SW intervention to update the HW context and get it back in-sync. Performance: CPU: Intel(R) Xeon(R) CPU E5-2687W v4 @ 3.00GHz, 24 cores, HT off NIC: ConnectX-6 Dx 100GbE dual port Goodput (app-layer throughput) comparison: +---------------+-------+-------+---------+ | # connections | 1 | 4 | 8 | +---------------+-------+-------+---------+ | SW (Gbps) | 7.26 | 24.70 | 50.30 | +---------------+-------+-------+---------+ | HW (Gbps) | 18.50 | 64.30 | 92.90 | +---------------+-------+-------+---------+ | Speedup | 2.55x | 2.56x | 1.85x * | +---------------+-------+-------+---------+ * After linerate is reached, diff is observed in CPU util. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit ed9b7646b06a2ed2450dd9437fc7d1ad2783140c Author: Boris Pismenny Date: Mon Jun 8 19:11:38 2020 +0300 net/tls: Add asynchronous resync This patch adds support for asynchronous resynchronization in tls_device. Async resync follows two distinct stages: 1. The NIC driver indicates that it would like to resync on some TLS record within the received packet (P), but the driver does not know (yet) which of the TLS records within the packet. At this stage, the NIC driver will query the device to find the exact TCP sequence for resync (tcpsn), however, the driver does not wait for the device to provide the response. 2. Eventually, the device responds, and the driver provides the tcpsn within the resync packet to KTLS. Now, KTLS can check the tcpsn against any processed TLS records within packet P, and also against any record that is processed in the future within packet P. The asynchronous resync path simplifies the device driver, as it can save bits on the packet completion (32-bit TCP sequence), and pass this information on an asynchronous command instead. Signed-off-by: Boris Pismenny Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit acb5a07aaf2723cd273a4089e62611a414fb1c35 Author: Boris Pismenny Date: Mon Jun 8 12:42:52 2020 +0300 Revert "net/tls: Add force_resync for driver resync" This reverts commit b3ae2459f89773adcbf16fef4b68deaaa3be1929. Revert the force resync API. Not in use. To be replaced by a better async resync API downstream. Signed-off-by: Boris Pismenny Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 1182f36593570e8e9ca53f6fabfc40ccf93c21d7 Author: Tariq Toukan Date: Thu May 28 10:13:00 2020 +0300 net/mlx5e: kTLS, Add kTLS RX HW offload support Implement driver support for the kTLS RX HW offload feature. Resync support is added in a downstream patch. New offload contexts post their static/progress params WQEs over the per-channel async ICOSQ, protected under a spin-lock. The Channel/RQ is selected according to the socket's rxq index. Feature is OFF by default. Can be turned on by: $ ethtool -K tls-hw-rx-offload on A new TLS-RX workqueue is used to allow asynchronous addition of steering rules, out of the NAPI context. It will be also used in a downstream patch in the resync procedure. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit df8d866770f9877dedc864af4346c73694931cab Author: Tariq Toukan Date: Thu May 28 10:04:03 2020 +0300 net/mlx5e: kTLS, Use kernel API to extract private offload context Modify the implementation of the private kTLS TX HW offload context getter and setter, so it uses the kernel API functions, instead of a local shadow structure. A single BUILD_BUG_ON check is sufficient, remove the duplicate. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 7d0d0d86ec6c67d3eb4f49d3bbccc2d8c02799cc Author: Tariq Toukan Date: Tue May 26 13:58:09 2020 +0300 net/mlx5e: kTLS, Improve TLS feature modularity Better separate the code into c/h files, so that kTLS internals are exposed to the corresponding non-accel flow as follows: - Necessary datapath functions are exposed via ktls_txrx.h. - Necessary caps and configuration functions are exposed via ktls.h, which became very small. In addition, kTLS internal code sharing is done via ktls_utils.h, which is not exposed to any non-accel file. Add explicit WQE structures for the TLS static and progress params, breaking the union of the static with UMR, and the progress with PSV. Generalize the API as a preparation for TLS RX offload support. Move kTLS TX-specific code to the proper file. Remove the inline tag for function in C files, let the compiler decide. Use kzalloc/kfree for the priv_tx context. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Reviewed-by: Maxim Mikityanskiy commit 5229a96e59ec32466add5e87b537cc3f244afb06 Author: Tariq Toukan Date: Tue Jun 16 13:29:07 2020 +0300 net/mlx5e: Accel, Expose flow steering API for rules add/del Given a socket, the function extracts the TCP/IP{4,6} ntuple and adds rule to steering. Another function gets the rule and deletes it. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Reviewed-by: Maxim Mikityanskiy commit c062d52ac24ceea0b4a5fbdc70c5cff1e47a0e49 Author: Boris Pismenny Date: Sun Apr 14 16:35:24 2019 +0300 net/mlx5e: Receive flow steering framework for accelerated TCP flows The framework allows creating flow tables to steer incoming traffic of TCP sockets to the acceleration TIRs. This is used in downstream patches for TLS, and will be used in the future for other offloads. Signed-off-by: Boris Pismenny Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit b8922a73ec3e37db8836dbcce2af19d85a8bc9ef Author: Saeed Mahameed Date: Thu Apr 2 02:02:33 2020 -0700 net/mlx5e: API to manipulate TTC rules destinations Store the default destinations of the on-load generated TTC (Traffic Type Classifier) rules in the ttc rules table. Introduce TTC API functions to manipulate/restore and get the TTC rule destination and use these API functions in arfs implementation. This will allow a better decoupling between TTC implementation and its users. Signed-off-by: Saeed Mahameed Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy commit c293ac927fbb0c804b91118535f64d5d9f7a0d8f Author: Tariq Toukan Date: Sat Jun 13 22:53:32 2020 +0300 net/mlx5e: Refactor build channel params Take the CQ params into their respective RQ/SQ params. Split the params build of the different ICOSQs (sync and async), as they require different init values. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 8d94b590f1e4d60e0a1f51a43aded1b0e6fd06f7 Author: Tariq Toukan Date: Tue Nov 26 16:23:23 2019 +0200 net/mlx5e: Turn XSK ICOSQ into a general asynchronous one There is an upcoming demand (in downstream patches) for an ICOSQ to be populated out of the NAPI context, asynchronously. There is already an existing one serving XSK-related use case. In this patch, promote this ICOSQ to serve as general async ICOSQ, to be used for XSK and non-XSK flows. As part of this, the reg_umr bit of the SQ context is now set (if capable), as the general async ICOSQ should support possible posts of UMR WQEs. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit e396eccf0f1a6621d235340260f4d1f292de74f9 Merge: b08866f42a875 2d1b69ed65ee0 Author: Saeed Mahameed Date: Sat Jun 27 14:00:04 2020 -0700 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: kTLS, Improve TLS params layout structures net/mlx5: Avoid eswitch header inclusion in fs core layer net/mlx5: Avoid RDMA file inclusion in core driver net/mlx5: Add support in query QP, CQ and MKEY segments net/mlx5: Export resource dump interface Signed-off-by: Saeed Mahameed commit 2d1b69ed65ee033aa541518cc9f6a815296ac493 Author: Tariq Toukan Date: Thu Jun 25 22:59:43 2020 -0700 net/mlx5: kTLS, Improve TLS params layout structures Add explicit WQE segment structures for the TLS static and progress params. According to the HW spec, TISN is not part of the progress params context, take it out of it. Rename the control segment tisn field as it could hold either a TIS or a TIR number. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 188f0f988bdf27a94208568314e3b0c012d1629c Author: Parav Pandit Date: Thu Jun 25 22:59:42 2020 -0700 net/mlx5: Avoid eswitch header inclusion in fs core layer Flow steering core layer is independent of the eswitch layer. Hence avoid fs_core dependency on eswitch. Fixes: 328edb499f99 ("net/mlx5: Split FDB fast path prio to multiple namespaces") Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 9205d7b1c1cffa827c23bdbf35e04c7cbe1e1f10 Author: Parav Pandit Date: Thu Jun 25 22:59:41 2020 -0700 net/mlx5: Avoid RDMA file inclusion in core driver mlx5 cq.h does not depend on RDMA verbs. Remove RDMA verbs file inclusion. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 8556082963016f29dc4b249393701528422bce4c Author: Dmitry Osipenko Date: Mon Jun 22 01:27:42 2020 +0300 drm/panel-simple: Add missing BUS descriptions for some panels This patch adds missing BUS fields to the display panel descriptions of the panels which are found on NVIDIA Tegra devices: 1. AUO B101AW03 2. Chunghwa CLAA070WP03XG 3. Chunghwa CLAA101WA01A 4. Chunghwa CLAA101WB01 5. Innolux N156BGE L21 6. Samsung LTN101NT05 Suggested-by: Laurent Pinchart Signed-off-by: Dmitry Osipenko Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200621222742.25695-3-digetx@gmail.com commit 75e73224665a20adee9e9e9adbfa2c845664f5a0 Author: Dmitry Osipenko Date: Mon Jun 22 01:27:41 2020 +0300 drm/panel-simple: Correct EDT ET057090DHU connector type The EDT ET057090DHU panel has a DPI connector and not LVDS. This patch corrects the panel's description. Reported-by: Laurent Pinchart Fixes: 94f07917ebe8 ("drm/panel-simple: Add missing connector type for some panels") Signed-off-by: Dmitry Osipenko Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200621222742.25695-2-digetx@gmail.com commit 890814504eeb930c15a1e238c3fff7dfc238b8c9 Author: Flavio Suligoi Date: Tue Jun 9 18:02:49 2020 +0200 tty: fix spelling mistake Fix typo: "tigger" --> "trigger" Signed-off-by: Flavio Suligoi Link: https://lore.kernel.org/r/20200609160249.31329-1-f.suligoi@asem.it Signed-off-by: Greg Kroah-Hartman commit 1b1eef6863cdbf35f1abbe9207da36a8dc71e06e Author: Andy Shevchenko Date: Thu Jun 18 15:29:52 2020 +0300 serial: 8250_mtk: Switch to use platform_get_irq() platform_get_irq() provides an established error code and error message. Also, it's better to use dedicated API to retrieve Linux IRQ resource. Signed-off-by: Andy Shevchenko Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/20200618122952.88265-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 451a73c68014528e2e5f80af6c64bcc477b8864a Author: Andy Shevchenko Date: Thu Jun 18 15:33:20 2020 +0300 serial: 8250_ingenic: Switch to use platform_get_irq() platform_get_irq() provides an established error code and error message. Also, it's better to use dedicated API to retrieve Linux IRQ resource. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200618123320.88612-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e914072cacb60c48f20c240ebe28414b8fbbf135 Author: Andy Shevchenko Date: Thu Jun 18 15:27:44 2020 +0300 serial: 8250_pxa: Switch to use platform_get_irq() platform_get_irq() provides an established error code and error message. Also, it's better to use dedicated API to retrieve Linux IRQ resource. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200618122744.88204-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9167cc78bd3f615f0df03859b2aae668ba8f8cec Author: Andy Shevchenko Date: Thu Jun 18 15:20:24 2020 +0300 serial: 8250_omap: Switch to use platform_get_irq() platform_get_irq() provides an established error code and error message. Also, it's better to use dedicated API to retrieve Linux IRQ resource. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200618122024.87170-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2a1dbd259e631a56784e5f72aebe5d6b2f5c5c87 Author: Andy Shevchenko Date: Thu Jun 18 12:51:44 2020 +0300 serial: 8250_em: Switch to use platform_get_irq() platform_get_irq() provides an established error code and error message. Also, it's better to use dedicated API to retrieve Linux IRQ resource. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200618095144.73852-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5b36146eac22153f57cf28278bbe8c642533a9be Author: Douglas Anderson Date: Tue Jun 2 12:40:48 2020 -0700 serial: kgdboc: Fix bad line wrapping in comment In commit a4912303ac6f ("serial: kgdboc: Allow earlycon initialization to be deferred") it looks like Daniel really took Linus's new suggestion about not needing to wrap at 80 columns to heart and he jammed two full lines of comments into one line. Either that or he just somehow accidentally deleted a carriage return when doing final edits on the patch. In either case let's make it look prettier. Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200602124044.1.Iee31247bc080d42a02e167454b1225a1b4283705@changeid Signed-off-by: Greg Kroah-Hartman commit f1681a9a2a62d7e6232832d6780cc65ce63f5396 Author: Randolph Maaßen Date: Fri Jun 5 16:57:14 2020 +0200 serial: serial-tegra: reduce irq-latency after rx errors Since dev_err() calls can lead to synchronous writes to another serial console these calls can provide significant latency during irq-handling in tegra_uart_isr(). With this latency another interrupt is likely to apper during handling of the first interrupt, which might lock up the kernel completely. These errors are reported to the error counters so converting the dev_err() to dev_dbg() is appropriate. Signed-off-by: Randolph Maaßen Link: https://lore.kernel.org/r/20200605145714.9964-1-gaireg@gaireg.de Signed-off-by: Greg Kroah-Hartman commit 894b867ac9dc6906022c27ace2339418db666002 Author: Pavel Machek Date: Sat Jun 6 17:11:46 2020 +0200 8250-men-mcb: fix signed/unsigned confusion get_num_ports returns -ENODEV, and the result is stored in int, so it should not be unsigned. Zero ports does not seem to make sense, so make that check consistent. Signed-off-by: Pavel Machek (CIP) Link: https://lore.kernel.org/r/20200606151146.GA10940@amd Signed-off-by: Greg Kroah-Hartman commit 167cbce27444be3203081b97ea65178c4088b062 Author: Johan Hovold Date: Wed Jun 10 17:51:21 2020 +0200 serial: core: drop unnecessary gpio include Drop the recently added gpio include from the serial-core header in favour of a forward declaration and instead include the gpio header only where needed. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20200610155121.14014-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit b77652072975e4e766e108699a611a2eaa56634b Author: Tomasz Duszynski Date: Sun Jun 21 21:57:01 2020 +0200 dt-bindings: iio: scd30: add device binding file Add SCD30 sensor binding file. Signed-off-by: Tomasz Duszynski Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit d4553d6ec17aaf98a123ae47682b0fed72f1d4dc Author: Tomasz Duszynski Date: Sun Jun 21 21:57:00 2020 +0200 iio: chemical: scd30: add serial interface driver Add serial interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit e510190e013961b4b21a73c79175a6431b566075 Author: Tomasz Duszynski Date: Sun Jun 21 21:56:59 2020 +0200 iio: chemical: scd30: add I2C interface driver Add I2C interface driver for the SCD30 sensor. Signed-off-by: Tomasz Duszynski Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 64b3d8b1b0f5c16c19045785e4da8391ae35ec99 Author: Tomasz Duszynski Date: Sun Jun 21 21:56:58 2020 +0200 iio: chemical: scd30: add core driver Add Sensirion SCD30 carbon dioxide core driver. Signed-off-by: Tomasz Duszynski Signed-off-by: Jonathan Cameron commit 477c653f0eb8ae294a9a64ba51752315f8542cc2 Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:29 2020 +0200 MAINTAINERS: add entry for inv_icm42600 6-axis imu sensor Add MAINTAINERS entry for InvenSense ICM-426xx IMU device. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 45924b8fd2c9e0e9bc2cc97e64494f91a48c0984 Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:28 2020 +0200 dt-bindings: iio: imu: Add inv_icm42600 documentation Document the ICM-426xxx devices devicetree bindings. Signed-off-by: Jean-Baptiste Maneyrol Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit ec74ae9fd37c4518fa8f7e59cbfcbdc5c7dadb25 Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:27 2020 +0200 iio: imu: inv_icm42600: add accurate timestamping Add a timestamping mechanism for buffer that provides accurate event timestamps when using watermark. This mechanism estimates device internal clock by comparing FIFO interrupts delta time and device elapsed time computed by parsing FIFO data. Take interrupt timestamp in hard irq handler and add IIO device specific timestamp structures in device private allocation. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 7f85e42a6c54c0757f4a2d217ab0d866b4e94697 Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:26 2020 +0200 iio: imu: inv_icm42600: add buffer support in iio devices Add all FIFO parsing and reading functions. Add accel and gyro kfifo buffer and FIFO data parsing. Use device interrupt for reading data FIFO and launching accel and gyro parsing. Support hwfifo watermark by multiplexing gyro and accel settings. Support hwfifo flush. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit e5efa1049b9eb36c4fcf59a78b6f37e45fe5572d Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:25 2020 +0200 iio: imu: inv_icm42600: add device interrupt Add INT1 interrupt support. Support interrupt edge and level, active high or low. Push-pull or open-drain configurations. Interrupt will be used to read data from the FIFO. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 6c1b4524bfd97ddf37c60a90c2c569d8dfca5685 Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:24 2020 +0200 Documentation: ABI: add specific icm42600 documentation Hardware offset available as calibscale sysfs attributes are real physical values exprimed in SI units. calibscale_available sysfs attributes represents the range of acceptable values. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 8237945dbc5513e3776bc0844a2ba36a972f24f5 Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:23 2020 +0200 iio: imu: add Kconfig and Makefile for inv_icm42600 driver Add 3 modules: inv-icm42600, inv-icm42600-i2c, inv-icm42600-spi. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit bc3eb0207fb52b575cf3e4863b43be53291acc3b Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:22 2020 +0200 iio: imu: inv_icm42600: add temperature sensor support Add temperature channel in gyroscope and accelerometer devices. Temperature is available in full 16 bits resolution when reading register and in low 8 bits resolution in the FIFO. Return full precision raw temperature with corresponding scale and offset. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit a47c1cdcb901031cde22fb1261a4a36d55ae66a8 Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:21 2020 +0200 iio: imu: inv_icm42600: add accelerometer IIO device Add IIO device for accelerometer sensor with data polling interface. Attributes: raw, scale, sampling_frequency, calibbias. Accelerometer in low noise mode. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit a095fadb443b20feab5b6e3d8eafe7cfc1efe81e Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:20 2020 +0200 iio: imu: inv_icm42600: add gyroscope IIO device Add IIO device for gyroscope sensor with data polling interface. Attributes: raw, scale, sampling_frequency, calibbias. Gyroscope in low noise mode. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 9f9ff91b775b568128aad3a5c06211a8785bd17c Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:19 2020 +0200 iio: imu: inv_icm42600: add SPI driver for inv_icm42600 driver Add SPI driver for InvenSense ICM-426xxx devices. Configure bus signal slew rates as indicated in the datasheet. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 7297ef1e261672b8c25ea5d4bb7e91806bb5fb18 Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:18 2020 +0200 iio: imu: inv_icm42600: add I2C driver for inv_icm42600 driver Add I2C driver for InvenSense ICM-426xxx devices. Configure bus signal slew rates as indicated in the datasheet. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 31c24c1e93c341069def3c55cc1cf0dca9239d75 Author: Jean-Baptiste Maneyrol Date: Mon Jun 22 17:37:17 2020 +0200 iio: imu: inv_icm42600: add core of new inv_icm42600 driver Core component of a new driver for InvenSense ICM-426xx devices. It includes registers definition, main probe/setup, and device utility functions. ICM-426xx devices are latest generation of 6-axis IMU, gyroscope+accelerometer and temperature sensor. This device includes a 2K FIFO, supports I2C/I3C/SPI, and provides intelligent motion features like pedometer, tilt detection, and tap detection. Signed-off-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit 8f52a15aca1bea116ddb1b984a0630c1a9f69b1e Author: Jishnu Prakash Date: Tue Jun 23 12:59:59 2020 +0530 iio: adc: Combine read functions for PMIC5 and PMIC7 Add a common function used for read_raw callback for both PMIC5 and PMIC7 ADCs. Signed-off-by: Jishnu Prakash Signed-off-by: Jonathan Cameron commit 4e130dc7b41348b13684f0758c26cc6cf72a3449 Author: Simon Xue Date: Wed Jun 24 01:30:11 2020 +0200 iio: adc: rockchip_saradc: Add support iio buffers Add the ability to also support access via (triggered) buffers next to the existing direct mode. Device in question is the Odroid Go Advance that connects a joystick to two of the saradc channels for X and Y axis and the new (and still pending) adc joystick driver of course wants to use triggered buffers from the iio subsystem. Signed-off-by: Simon Xue [some simplifications and added commit description] Signed-off-by: Heiko Stuebner Signed-off-by: Jonathan Cameron commit 71eb7c855bd0cd168541305e3d6dab16bf0b0dfe Author: Heiko Stuebner Date: Wed Jun 24 01:30:10 2020 +0200 iio: adc: rockchip_saradc: better prefix for channel constant As suggested give the current ADC_CHANNEL constant a distinct and consistent prefix. Suggested-by: Peter Meerwald-Stadler Signed-off-by: Heiko Stuebner Signed-off-by: Jonathan Cameron commit d0389d4ed3c5a298939646b5d59bd5ad4ce5491f Author: Heiko Stuebner Date: Wed Jun 24 01:30:09 2020 +0200 iio: adc: rockchip_saradc: move all of probe to devm-functions Parts of the saradc probe rely on devm functions and later parts do not. This makes it more difficult to for example enable triggers via their devm-functions and would need more undo-work in remove. So to make life easier for the driver, move the rest of probe calls also to their devm-equivalents. This includes moving the clk- and regulator-disabling to a devm_action so that they gets disabled both during remove and in the error case in probe, after the action is registered. Signed-off-by: Heiko Stuebner Signed-off-by: Jonathan Cameron commit d10ee1d1917b082f0008a840cde5aeaad11b396b Author: Vabhav Sharma Date: Fri Jun 26 16:50:34 2020 +0530 tty: serial: fsl_lpuart: minimum baud rate support The formula for the baud rate is baud rate = "baud clock / ((OSR+1) × SBR) Algorithm used in function lpuart32_serial_setbrg() only changes the SBR. Even with maxmum value put in, OSR stays at 0x7 and the lowest baud rate would be ~ 2600 bps Update the algorithm to allow driver operation at 1200,2400 or 600 bps Signed-off-by: Vabhav Sharma Link: https://lore.kernel.org/r/1593170434-13524-1-git-send-email-vabhav.sharma@oss.nxp.com Signed-off-by: Greg Kroah-Hartman commit 3550f8979a7bb2f28940aa26aab77314ec8840bd Author: Dan Carpenter Date: Wed Jun 24 16:27:44 2020 +0300 tty: serial: qcom_geni_serial: Clean up an ARRAY_SIZE() vs sizeof() The ARRAY_SIZE() is the number of elements but we want the number of bytes so sizeof() is more appropriate. Fortunately, it's the same thing here because this is an array of u8 so this doesn't change runtime. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200624132744.GD9972@mwanda Signed-off-by: Greg Kroah-Hartman commit c89511f61c34aa8e52055fc704cee09c8e459dee Author: Tamseel Shams Date: Wed Jun 17 16:29:07 2020 +0530 serial: samsung: fix spelling mistake There is a spelling mistake in a comment. Fix it. Signed-off-by: Tamseel Shams Reviewed-by: Alim Akhtar Link: https://lore.kernel.org/r/20200617105907.7143-1-m.shams@samsung.com Signed-off-by: Greg Kroah-Hartman commit 695b847b247cff47be4cc23bc7ed62d527233135 Author: Krzysztof Kozlowski Date: Wed Jun 17 17:28:56 2020 +0200 serial: samsung: Minor whitespace cleanups Make the code slightly more readable by removing unneeded line breaks, adding missing line breaks and white spaces. This also fixes few strict checkpatch suggestions: CHECK: spaces preferred around that '-' (ctx:VxV) CHECK: Unbalanced braces around else statement CHECK: Lines should not end with a '(' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200617152856.18086-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit b3a5ce874c2619c9b8a6c5bbcfefdb95e0227600 Author: Nicolas Boichat Date: Sat Jun 27 15:03:04 2020 +0800 usb: cdns3: gadget: Replace trace_printk by dev_dbg trace_printk should not be used in production code, replace it call with dev_dbg. Signed-off-by: Nicolas Boichat Link: https://lore.kernel.org/r/20200627070307.516803-2-drinkcat@chromium.org Signed-off-by: Greg Kroah-Hartman commit 05026c9a01b56f86b796d134daf57a552526c32f Author: Antonio Borneo Date: Thu Jun 25 15:17:32 2020 +0200 usbip: tools: add in man page how to load the client's module While the man page usbipd.8 already informs the user on which kernel module has to be used on server side, the man page usbip.8 does not provide any equivalent information on client side. Also, it could be hard for a newbie to identify the proper usbip client kernel module, due to the name "vhci-hcd" that has no immediate assonance with usbip. Add in usbip.8 the command to add the module vhci-hcd, similarly as it's already present in usbipd.8 for usbip-host. While there, rephrase the description of the command "usbip list --remote=server". Signed-off-by: Antonio Borneo Acked-by: Shuah Khan -- v1->v2: rephrase the description of command "usbip list ..." fix a typo in commit message Link: https://lore.kernel.org/r/2da8fc9e34440c1fa5f9007baaa3921767cdec50.1593090874.git.borneo.antonio@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5bfb7eadc5874a3a08dd173d66a16a1ed0548444 Author: Michael Straube Date: Sat Jun 27 11:06:00 2020 +0200 staging: rtl8188eu: remove blank lines in header files Remove blank lines in header files to clear checkpatch issues. CHECK: Please don't use multiple blank lines Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200627090600.21354-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit e42f623c3ade190dee08790d9b91b2b0370cb3d9 Author: Coiby Xu Date: Fri Jun 26 05:57:55 2020 +0800 staging: qlge: fix else after return or break Remove unnecessary elses after return or break. Signed-off-by: Coiby Xu Link: https://lore.kernel.org/r/20200625215755.70329-3-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1113c90c48df9742bd4ac86ea4770b1fd2fb0adf Author: Coiby Xu Date: Fri Jun 26 05:57:54 2020 +0800 staging: qlge: fix trailing */ in block comment Remove trailing "*/" in block comments. Signed-off-by: Coiby Xu Link: https://lore.kernel.org/r/20200625215755.70329-2-coiby.xu@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8ebf642f3d809b59f57d0d408189a2218294e269 Author: Oscar Carter Date: Sat May 30 16:34:30 2020 +0200 drivers/acpi: Remove function cast Remove the function cast in the ACPI_DECLARE_PROBE_ENTRY macro to ensure that the functions passed as a last parameter to this macro have the right prototype. This is an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds. Suggested-by: Marc Zyngier Signed-off-by: Oscar Carter Signed-off-by: Marc Zyngier Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20200530143430.5203-4-oscar.carter@gmx.com commit aba3c7ed3fcf74524b7072615028827d5e5750d7 Author: Oscar Carter Date: Sat May 30 16:34:29 2020 +0200 drivers/irqchip: Use new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, there are the need to remove all the function callback casts. To do this, modify the IRQCHIP_ACPI_DECLARE macro to use the new defined macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY instead of the macro ACPI_DECLARE_PROBE_ENTRY. This is necessary to be able to initialize the the acpi_probe_entry struct using the probe_subtbl field instead of the probe_table field and avoid function cast mismatches. Also, modify the prototype of the functions used by the invocation of the IRQCHIP_ACPI_DECLARE macro to match all the parameters. Co-developed-by: Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oscar Carter Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20200530143430.5203-3-oscar.carter@gmx.com commit 89778093d38d547cd80f6097659d1cf1c2dd4d9d Author: Oscar Carter Date: Sat May 30 16:34:28 2020 +0200 drivers/acpi: Add new macro ACPI_DECLARE_SUBTABLE_PROBE_ENTRY In an effort to enable -Wcast-function-type in the top-level Makefile to support Control Flow Integrity builds, there are the need to remove all the function callback casts. To do this, create a new macro called ACPI_DECLARE_SUBTABLE_PROBE_ENTRY to initialize the acpi_probe_entry struct using the probe_subtbl field instead of the probe_table field. This is a previous work to be able to modify the IRQCHIP_ACPI_DECLARE macro to use this new defined macro. Even though these two commented fields are part of a union, this is necessary to avoid function cast mismatches. That is, due to the IRQCHIP_ACPI_DECLARE invocations use as last parameter a function with the protoype "int (*func)(struct acpi_subtable_header *, const unsigned long)" it's necessary that this macro initialize the probe_subtbl field of the acpi_probe_entry struct and not the probe_table field. Co-developed-by: Marc Zyngier Signed-off-by: Marc Zyngier Signed-off-by: Oscar Carter Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20200530143430.5203-2-oscar.carter@gmx.com commit 293953d60e214aa44b3261f5350b83f285a95eb4 Author: Claudiu Beznea Date: Wed Jun 10 12:05:34 2020 +0300 irqchip/atmel-aic5: Add support for sam9x60 rtt fixup Add support for SAM9X60 RTT fixup. Signed-off-by: Claudiu Beznea Signed-off-by: Marc Zyngier Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/1591779936-18577-2-git-send-email-claudiu.beznea@microchip.com commit 2f7a9bda42f74e1169fcd9ef55c8ade989ef8bba Author: Gustavo A. R. Silva Date: Tue Jun 16 18:09:23 2020 -0500 irqchip/imx-intmux: Use struct_size() helper in devm_kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200616230923.GA24937@embeddedor commit 6eeb997ab5075e770a002c51351fa4ec2c6b5c39 Author: Bartosz Golaszewski Date: Mon Jun 15 09:44:45 2020 +0200 irqchip/irq-mtk-sysirq: Replace spinlock with raw_spinlock This driver may take a regular spinlock when a raw spinlock (irq_desc->lock) is already taken which results in the following lockdep splat: ============================= [ BUG: Invalid wait context ] 5.7.0-rc7 #1 Not tainted ----------------------------- swapper/0/0 is trying to lock: ffffff800303b798 (&chip_data->lock){....}-{3:3}, at: mtk_sysirq_set_type+0x48/0xc0 other info that might help us debug this: context-{5:5} 2 locks held by swapper/0/0: #0: ffffff800302ee68 (&desc->request_mutex){....}-{4:4}, at: __setup_irq+0xc4/0x8a0 #1: ffffff800302ecf0 (&irq_desc_lock_class){....}-{2:2}, at: __setup_irq+0xe4/0x8a0 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.7.0-rc7 #1 Hardware name: Pumpkin MT8516 (DT) Call trace: dump_backtrace+0x0/0x180 show_stack+0x14/0x20 dump_stack+0xd0/0x118 __lock_acquire+0x8c8/0x2270 lock_acquire+0xf8/0x470 _raw_spin_lock_irqsave+0x50/0x78 mtk_sysirq_set_type+0x48/0xc0 __irq_set_trigger+0x58/0x170 __setup_irq+0x420/0x8a0 request_threaded_irq+0xd8/0x190 timer_of_init+0x1e8/0x2c4 mtk_gpt_init+0x5c/0x1dc timer_probe+0x74/0xf4 time_init+0x14/0x44 start_kernel+0x394/0x4f0 Replace the spinlock_t with raw_spinlock_t to avoid this warning. Signed-off-by: Bartosz Golaszewski Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200615074445.3579-1-brgl@bgdev.pl commit b0b92ab6a86e59779c2b17c5f611b04120fdfbb6 Author: Linus Walleij Date: Sun Jun 7 23:51:24 2020 +0200 irqchip/vic: Cut down the external API There are registers and functions in the header file that are only used inside the driver. Move these into the driver. Signed-off-by: Linus Walleij Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200607215124.48638-2-linus.walleij@linaro.org commit adf4f9d49c74a812757c5c67879ece0e54b75417 Author: Linus Walleij Date: Sun Jun 7 23:51:23 2020 +0200 irqchip/vic: Drop cascaded intialization call We got rid of the last user of the cascaded intialization from board files so drop this API. Signed-off-by: Linus Walleij Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20200607215124.48638-1-linus.walleij@linaro.org commit ef6b0bf43be5c17790a14a8ed806d7d8fe0a25be Author: Tiezhu Yang Date: Sat Jun 6 17:50:17 2020 +0800 irqchip/ti-sci-inta: Fix typo about MODULE_AUTHOR It should be "ti.com" instead of "ticom". Fixes: 9f1463b86c13 ("irqchip/ti-sci-inta: Add support for Interrupt Aggregator driver") Signed-off-by: Tiezhu Yang Signed-off-by: Marc Zyngier Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/1591437017-5295-3-git-send-email-yangtiezhu@loongson.cn commit 4b127a14cb1385dd355c7673d975258d5d668922 Author: Tiezhu Yang Date: Sat Jun 6 17:50:16 2020 +0800 irqchip/ti-sci-inta: Fix return value about devm_ioremap_resource() When call function devm_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Fixes: 9f1463b86c13 ("irqchip/ti-sci-inta: Add support for Interrupt Aggregator driver") Signed-off-by: Tiezhu Yang Signed-off-by: Marc Zyngier Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/1591437017-5295-2-git-send-email-yangtiezhu@loongson.cn commit 3d21f0b4126650a92f2df531a5f3a2d27aa9a09f Author: Tiezhu Yang Date: Sat Jun 6 17:50:15 2020 +0800 irqchip/ti-sci-inta: Remove dead code in ti_sci_inta_set_type() In the function ti_sci_inta_set_type(), the statement "return -EINVAL;" out of switch case is dead code, remove it. Fixes: 9f1463b86c13 ("irqchip/ti-sci-inta: Add support for Interrupt Aggregator driver") Signed-off-by: Tiezhu Yang Signed-off-by: Marc Zyngier Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/1591437017-5295-1-git-send-email-yangtiezhu@loongson.cn commit a8e773132f131511357d9529c289ed52330e232a Author: Brooke Basile Date: Fri Jun 26 11:36:40 2020 -0400 staging: rtl8188eu: Fix indentation Fix the following checkpatch warning: WARNING: suspect code indent for conditional statements (16, 32) Signed-off-by: Brooke Basile Link: https://lore.kernel.org/r/20200626153639.8097-3-brookebasile@gmail.com Signed-off-by: Greg Kroah-Hartman commit cdc9750e1f6bc94686354dabd236cc590b6f99b1 Author: Brooke Basile Date: Fri Jun 26 11:36:38 2020 -0400 staging: rtl8188eu: Fix strings split across lines Fix the following checkpatch warning: WARNING: quoted string split across lines Signed-off-by: Brooke Basile Link: https://lore.kernel.org/r/20200626153639.8097-2-brookebasile@gmail.com Signed-off-by: Greg Kroah-Hartman commit f00b2a2fcb8c71f0c5f6b38f87370c3dfb7b9477 Author: Brooke Basile Date: Fri Jun 26 11:36:36 2020 -0400 staging: rtl8188eu: Fix comment formatting Fix the following checkpatch warnings: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Brooke Basile Link: https://lore.kernel.org/r/20200626153639.8097-1-brookebasile@gmail.com Signed-off-by: Greg Kroah-Hartman commit fbca7a04dbd8271752a58594727b61307bcc85b6 Author: Flavio Suligoi Date: Wed Jun 24 15:56:00 2020 +0200 scsi: storvsc: Fix spelling mistake Fix typo: "trigerred" --> "triggered" Link: https://lore.kernel.org/r/20200624135600.14274-1-f.suligoi@asem.it Signed-off-by: Flavio Suligoi Signed-off-by: Martin K. Petersen commit a7f1e69d4974666ea40886ee4801aebb2729ea81 Author: Stanley Chu Date: Thu Jun 25 11:04:30 2020 +0800 scsi: ufs: Disable WriteBooster capability for non-supported UFS devices If a UFS device is not qualified to use WriteBooster, either due to wrong UFS version or device-specific quirks, then the capability in host shall be disabled to prevent any WriteBooster operations in the future. Link: https://lore.kernel.org/r/20200625030430.25048-1-stanley.chu@mediatek.com Fixes: 3d17b9b5ab11 ("scsi: ufs: Add write booster feature support") Tested-by: Steev Klimaszewski Reviewed-by: Avri Altman Reviewed-by: Bean Huo Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 37d09067172043d2670c56505fd012f007c7ed20 Author: Javed Hasan Date: Mon Jun 22 02:38:14 2020 -0700 scsi: bnx2fc: Removal of unused variables Removed all the unused variables. Link: https://lore.kernel.org/r/20200622093814.3250-1-jhasan@marvell.com Reported-by: kbuild test robot Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 040ab9c4fd0070cd5fa71ba3a7b95b8470db9b4d Author: Christophe JAILLET Date: Thu Jun 25 22:47:30 2020 +0200 scsi: cumana_2: Fix different dev_id between request_irq() and free_irq() The dev_id used in request_irq() and free_irq() should match. Use 'info' in both cases. Link: https://lore.kernel.org/r/20200625204730.943520-1-christophe.jaillet@wanadoo.fr Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Acked-by: Russell King Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit 6c9b3b2aa2df0d47bd7067ad4b09279cac89e974 Author: Alim Akhtar Date: Thu Jun 25 21:14:05 2020 +0530 scsi: ufs: ufs-exynos: Fix build warning While building for x86_64 allmodconfig, the following warning was reported: WARNING: modpost: missing MODULE_LICENSE() in drivers/scsi/ufs/ufs-exynos.o Add the missing license/author/description tags. Link: https://lore.kernel.org/r/20200625154405.60448-1-alim.akhtar@samsung.com Fixes: 55f4b1f73631 ("scsi: ufs: ufs-exynos: Add UFS host support for Exynos SoCs") Reported-by: Stephen Rothwell Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 1e16c2f917a59d27fb6b540c44d66978c8ad29ef Author: Randy Dunlap Date: Fri Jun 26 16:32:50 2020 -0700 io_uring: fix function args for !CONFIG_NET Fix build errors when CONFIG_NET is not set/enabled: ../fs/io_uring.c:5472:10: error: too many arguments to function ‘io_sendmsg’ ../fs/io_uring.c:5474:10: error: too many arguments to function ‘io_send’ ../fs/io_uring.c:5484:10: error: too many arguments to function ‘io_recvmsg’ ../fs/io_uring.c:5486:10: error: too many arguments to function ‘io_recv’ ../fs/io_uring.c:5510:9: error: too many arguments to function ‘io_accept’ ../fs/io_uring.c:5518:9: error: too many arguments to function ‘io_connect’ Signed-off-by: Randy Dunlap Cc: Jens Axboe Cc: io-uring@vger.kernel.org Signed-off-by: Jens Axboe commit b08866f42a8752ea2b699dd29d653d86b06bc3b2 Merge: e562d0868e04e 4378b882bf03f Author: David S. Miller Date: Fri Jun 26 16:32:51 2020 -0700 Merge branch 'net-atlantic-various-non-functional-changes' Igor Russkikh says: ==================== net: atlantic: various non-functional changes This patchset contains several non-functional changes, which were made in out of tree driver over the time. Mostly typos, checkpatch findings and comment fixes. ==================== Signed-off-by: David S. Miller commit 4378b882bf03f2e0471b7d92fa97a7227ff3a126 Author: Igor Russkikh Date: Fri Jun 26 21:40:38 2020 +0300 net: atlantic: put ptp code under IS_REACHABLE check A1 requires additional processing for both egress and ingress to support PTP. And it makes sense to get rid of this processing altogether (via ifdef), if PTP clock is disabled globally. This patch puts the PTP code under the corresponding IS_REACHABLE check. Signed-off-by: Igor Russkikh Signed-off-by: Mark Starovoytov Signed-off-by: David S. Miller commit 8664240e303827de2d40f38fc397d1912309359c Author: Mark Starovoytov Date: Fri Jun 26 21:40:37 2020 +0300 net: atlantic: add alignment checks in hw_atl2_utils_fw.c This patch adds alignment checks in all the helper macros in hw_atl2_utils_fw.c These alignment checks are compile-time, so runtime is not affected. All these helper macros assume the length to be aligned (multiple of 4). If it's not aligned, then there might be issues, e.g. stack corruption. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 6ec99221d780b3b4b86cf9cdafc18699ff3d06c9 Author: Dmitry Bezrukov Date: Fri Jun 26 21:40:36 2020 +0300 net: atlantic: missing space in a comment in aq_nic.h This patch add a missing space in the comment in aq_nic.h Signed-off-by: Dmitry Bezrukov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 586616cbd4663a51a53f57ad503d7a93416762c0 Author: Mark Starovoytov Date: Fri Jun 26 21:40:35 2020 +0300 net: atlantic: fix typo in aq_ring_tx_clean This patch fixes a typo in aq_ring_tx_clean. stats is a union, so the typo doesn't cause any issues, but it's a typo nonetheless. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit ab3518acac42751f5e85c57d5d14ffcd897e1957 Author: Mark Starovoytov Date: Fri Jun 26 21:40:34 2020 +0300 net: atlantic: make aq_pci_func_init static This patch makes aq_pci_func_init() static, because it's not used anywhere outside the file itself. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit e35df2186580885c59886452c9b33f02f57ab91f Author: Mark Starovoytov Date: Fri Jun 26 21:40:33 2020 +0300 net: atlantic: Replace ENOTSUPP usage to EOPNOTSUPP This patch replaces ENOTSUPP (where it was used by mistake) with EOPNOTSUPP. Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit e39b8ffeb9b9a185438b6dc21bb9997f9fb29cbe Author: Nikita Danilov Date: Fri Jun 26 21:40:32 2020 +0300 net: atlantic: fix variable type in aq_ethtool_get_pauseparam This patch fixes the type for variable which is assigned from enum, as such it should have been int, not u32. Signed-off-by: Nikita Danilov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 3a8b44546979cf682324bd2fd61e539f428911b4 Author: Mark Starovoytov Date: Fri Jun 26 21:40:31 2020 +0300 net: atlantic: MACSec offload statistics checkpatch fix This patch fixes a checkpatch warning. Fixes: aec0f1aac58e ("net: atlantic: MACSec offload statistics implementation") Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit e562d0868e04ee353a24dccb9d76f2489fff8e5f Merge: be7aa9facb203 a8ee9c9b58199 Author: David S. Miller Date: Fri Jun 26 16:21:39 2020 -0700 Merge branch 'mptcp-refactor-token-container' Paolo Abeni says: ==================== mptcp: refactor token container Currently the msk sockets are stored in a single radix tree, protected by a global spin_lock. This series moves to an hash table, allocated at boot time, with per bucker spin_lock - alike inet_hashtables, but using a different key: the token itself. The above improves scalability, as write operations will have a far later chance to compete for lock acquisition, allows lockless lookup, and will allow easier msk traversing - e.g. for diag interface implementation's sake. This also introduces trivial, related, kunit tests and move the existing in kernel's one to kunit. v1 -> v2: - fixed a few extra and sparse warns ==================== Signed-off-by: David S. Miller commit a8ee9c9b58199be2692f7eb761d7a01749f79655 Author: Paolo Abeni Date: Fri Jun 26 19:30:02 2020 +0200 mptcp: introduce token KUNIT self-tests Unit tests for the internal MPTCP token APIs, using KUNIT v1 -> v2: - use the correct RCU annotation when initializing icsk ulp - fix a few checkpatch issues Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit a00a582203dbc43ea311a50e979038fc0c8ee19f Author: Paolo Abeni Date: Fri Jun 26 19:30:01 2020 +0200 mptcp: move crypto test to KUNIT currently MPTCP uses a custom hook to executed unit tests at boot time. Let's use the KUNIT framework instead. Additionally move the relevant code to a separate file and export the function needed by the test when self-tests are build as a module. Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 2c5ebd001d4f0c64a2dfda94eb1d9b31a8863c8d Author: Paolo Abeni Date: Fri Jun 26 19:30:00 2020 +0200 mptcp: refactor token container Replace the radix tree with a hash table allocated at boot time. The radix tree has some shortcoming: a single lock is contented by all the mptcp operation, the lookup currently use such lock, and traversing all the items would require a lock, too. With hash table instead we trade a little memory to address all the above - a per bucket lock is used. To hash the MPTCP sockets, we re-use the msk' sk_node entry: the MPTCP sockets are never hashed by the stack. Replace the existing hash proto callbacks with a dummy implementation, annotating the above constraint. Additionally refactor the token creation to code to: - limit the number of consecutive attempts to a fixed maximum. Hitting a hash bucket with a long chain is considered a failed attempt - accept() no longer can fail to token management. - if token creation fails at connect() time, we do fallback to TCP (before the connection was closed) v1 -> v2: - fix "no newline at end of file" - Jakub Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit d39dceca388ad0e4f748836806349ebe09282283 Author: Paolo Abeni Date: Fri Jun 26 19:29:59 2020 +0200 mptcp: add __init annotation on setup functions Add the missing annotation in some setup-only functions. Signed-off-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit be7aa9facb20305891bc1dfa62c7b3d3e1f58323 Merge: ab696fa70f941 55f35cf79d681 Author: David S. Miller Date: Fri Jun 26 16:08:45 2020 -0700 Merge branch 'net-organize-driver-docs-by-device-type' Jakub Kicinski says: ==================== net: organize driver docs by device type This series finishes off what I started in commit b255e500c8dc ("net: documentation: build a directory structure for drivers"). The objective is to de-clutter our documentation folder so folks have a chance of finding relevant info. I _think_ I got all the driver docs from the main documentation directory this time around. While doing this I realized that many of them are of limited relevance these days, so I went ahead and sliced the drivers directory by technology. Those feeling nostalgic are free to dive into the FDDI, ATM etc. docs, but for most Ethernet is what we care about. v1: - simplify Intel's docs list in MAINTAINERS. ==================== Signed-off-by: David S. Miller commit 55f35cf79d68136ef6a2e39a232a86f4418e7df7 Author: Jakub Kicinski Date: Fri Jun 26 10:27:31 2020 -0700 docs: networking: move FDDI drivers to the hw driver section Move docs for defza and skfp under device_drivers/fddi. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9633a0e959174ecdfb732863e8de8171570d19a8 Author: Jakub Kicinski Date: Fri Jun 26 10:27:30 2020 -0700 docs: networking: move ATM drivers to the hw driver section Move docs for cxacru, fore200e and iphase under device_drivers/atm. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4daedf7abb41aacec8c0f868f64ec2270d577688 Author: Jakub Kicinski Date: Fri Jun 26 10:27:29 2020 -0700 docs: networking: move AppleTalk / LocalTalk drivers to the hw driver section Move docs for cops and ltpc under device_drivers/appletalk. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 95298d63c67673c654c08952672d016212b26054 Author: Jakub Kicinski Date: Fri Jun 26 10:27:28 2020 -0700 docs: networking: move remaining Ethernet driver docs to the hw section Move docs for hinic and altera_tse under device_drivers/ethernet. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 5c3b5da432bcf6db822adee3e40da9b454369d31 Author: Jakub Kicinski Date: Fri Jun 26 10:27:27 2020 -0700 docs: networking: move ray_cs to the hw driver section Move ray_cs into Wi-Fi driver docs subdirectory. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit f05c43e05629742ae75493e213aeb6d8c226654c Author: Jakub Kicinski Date: Fri Jun 26 10:27:26 2020 -0700 docs: networking: move baycom to the hw driver section Move baycom to hamradio. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 14474950252cbb97b79fb1e5e7f4df9b13a8f9a0 Author: Jakub Kicinski Date: Fri Jun 26 10:27:25 2020 -0700 docs: networking: move z8530 to the hw driver section Move z8530 docs to hamradio and wan subdirectories. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 132db93572821ec2fdf81e354cc40f558faf7e4f Author: Jakub Kicinski Date: Fri Jun 26 10:27:24 2020 -0700 docs: networking: reorganize driver documentation again Organize driver documentation by device type. Most documents have fairly verbose yet uninformative names, so let users first select a well defined device type, and then search for a particular driver. While at it rename the section from Vendor drivers to Hardware drivers. This seems more accurate, besides people sometimes refer to out-of-tree drivers as vendor drivers. Signed-off-by: Jakub Kicinski Acked-by: Jeff Kirsher Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit af9e1032ff6ead528f5e7284a4b8e207550e63bc Author: Matt Atwood Date: Wed Jun 24 14:57:23 2020 -0700 drm/i915/gen12: implement Wa_14011508470 Update code to reflect recent bspec changes Bspec: 52890 Bspec: 53508 Signed-off-by: Matt Atwood Reviewed-by: Radhakrishna Sripada Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20200624215723.2316-1-matthew.s.atwood@intel.com commit dd2784c01d93db20252a6416f3007cbbb89e4758 Author: Luca Ceresoli Date: Mon Jun 22 15:37:23 2020 +0200 fpga manager: xilinx-spi: check INIT_B pin during write_init The INIT_B pin reports the status during startup and after the end of the programming process. However the current driver completely ignores it. Check the pin status during startup to make sure programming is never started too early and also to detect any hardware issues in the FPGA connection. This is optional for backward compatibility. If INIT_B is not passed by device tree, just fallback to the old udelays. Signed-off-by: Luca Ceresoli Signed-off-by: Moritz Fischer commit a5d0fbab4e0b42fb61b542b8c8c4c2ba50dc32d8 Author: Luca Ceresoli Date: Mon Jun 22 15:37:22 2020 +0200 dt-bindings: fpga: xilinx-slave-serial: add optional INIT_B GPIO The INIT_B is used by the 6 and 7 series to report the programming status, providing more control and information about programming errors. Signed-off-by: Luca Ceresoli Signed-off-by: Moritz Fischer commit 7651d824125c7a1819e5700246dbb5582ba85c98 Author: Codrin Ciubotariu Date: Thu Jun 18 18:41:47 2020 +0300 ARM: configs: at91: sama5: Enable CLASSD CLASSD is present on SAMA5d2 SoCs. Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200618154147.687878-1-codrin.ciubotariu@microchip.com commit 51139cc82c8d6edec034a6c2401090070195fa13 Author: Codrin Ciubotariu Date: Thu Jun 18 18:28:45 2020 +0300 ARM: dts: at91: sama5d2_xplained: Remove pdmic node The PDMIC needs PDM microphones to work. sama5d2 xplained doesn't have such microphones, so there is no reason to enable PDMIC and take the pins since there is no-one using them. Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200618152845.682723-1-codrin.ciubotariu@microchip.com commit 5f6b33f463468b9595eebfed142756ba13ea2b60 Author: Claudiu Beznea Date: Wed Jun 10 12:05:36 2020 +0300 ARM: dts: sam9x60: add rtt Add RTT. Allong with it enable GBPR as it is requested by RTT. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1591779936-18577-4-git-send-email-claudiu.beznea@microchip.com commit 73554069ded8fc6fa747423522c4295d5bbf6f52 Author: Claudiu Beznea Date: Wed Jun 10 12:05:35 2020 +0300 dt-bindings: rtc: add microchip,sam9x60-rtt Add microchip,sam9x60-rtt to compatible list. Signed-off-by: Claudiu Beznea Signed-off-by: Alexandre Belloni Acked-by: Rob Herring Link: https://lore.kernel.org/r/1591779936-18577-3-git-send-email-claudiu.beznea@microchip.com commit ab696fa70f9411a9869a17c36b4d03d7f8e0c229 Merge: 61b5cc20c877f 96e263592bf12 Author: David S. Miller Date: Fri Jun 26 13:40:18 2020 -0700 Merge branch 'net-phy-relax-PHY-and-MDIO-reset-handling' Bartosz Golaszewski says: ==================== net: phy: relax PHY and MDIO reset handling Previously these patches were submitted as part of a larger series[1] but since the approach in it will have to be reworked I'm resending the ones that were non-controversial and have been reviewed for upstream. Florian suggested a better solution for managing multiple resets. While I will definitely try to implement something at the driver model's bus level (together with regulator support), the 'resets' and 'reset-gpios' DT property is a stable ABI defined in mdio.yaml so improving its support is in order as we'll have to stick with it anyway. Current implementation contains an unnecessary limitation where drivers without probe() can't define resets. Changes from the previous version: - order forward declarations in patch 4 alphabetically - collect review tags [1] https://lkml.org/lkml/2020/6/22/253 ==================== Signed-off-by: David S. Miller commit 96e263592bf12476b100a48ebdeb4b637bf48f9f Author: Bartosz Golaszewski Date: Fri Jun 26 17:53:25 2020 +0200 net: phy: mdio: reset MDIO devices even if probe() is not implemented Similarily to PHY drivers - there's no reason to require probe() to be implemented in order to call mdio_device_reset(). MDIO devices can have resets defined without needing to do anything in probe(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 1dba6995731e1c1a8ea167aea74c0a917b437e6c Author: Bartosz Golaszewski Date: Fri Jun 26 17:53:24 2020 +0200 net: phy: reset the PHY even if probe() is not implemented Currently we only call phy_device_reset() if the PHY driver implements the probe() callback. This is not mandatory and many drivers (e.g. realtek) don't need probe() for most devices but still can have reset GPIOs defined. There's no reason to depend on the presence of probe() here so pull the reset code out of the if clause. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 333740981f94fa80326cc8e5d2da105f17bc1dd5 Author: Bartosz Golaszewski Date: Fri Jun 26 17:53:23 2020 +0200 net: mdio: add a forward declaration for reset_control to mdio.h This header refers to struct reset_control but doesn't include any reset header. The structure definition is probably somehow indirectly pulled in since no warnings are reported but for the sake of correctness add the forward declaration for struct reset_control. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit e42bcd0f7e04e507ba90927598825efd99f948cb Author: Bartosz Golaszewski Date: Fri Jun 26 17:53:22 2020 +0200 net: phy: arrange headers in phy_device.c alphabetically Keeping the headers in alphabetical order is better for readability and allows to easily see if given header is already included. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 1d0018a4306877f7ca4591ca6ea1d0099e2d0ef2 Author: Bartosz Golaszewski Date: Fri Jun 26 17:53:21 2020 +0200 net: phy: arrange headers in mdio_device.c alphabetically Keeping the headers in alphabetical order is better for readability and allows to easily see if given header is already included. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 54e80ded36fc88d3ba2ca7891910baaa08671f8b Author: Bartosz Golaszewski Date: Fri Jun 26 17:53:20 2020 +0200 net: phy: arrange headers in mdio_bus.c alphabetically Keeping the headers in alphabetical order is better for readability and allows to easily see if given header is already included. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 61b5cc20c877f9703fa46b24c273cbb5affb26e9 Author: Daniel González Cabanelas Date: Fri Jun 26 17:18:19 2020 +0200 net: mvneta: speed down the PHY, if WoL used, to save energy Some PHYs connected to this ethernet hardware support the WoL feature. But when WoL is enabled and the machine is powered off, the PHY remains waiting for a magic packet at max speed (i.e. 1Gbps), which is a waste of energy. Slow down the PHY speed before stopping the ethernet if WoL is enabled, and save some energy while the machine is powered off or sleeping. Tested using an Armada 370 based board (LS421DE) equipped with a Marvell 88E1518 PHY. Signed-off-by: Daniel González Cabanelas Signed-off-by: David S. Miller commit 725aca9585956676687c4cb803e88f770b0df2b2 Author: Alan Maguire Date: Fri May 29 22:46:21 2020 +0100 kunit: add support for named resources The kunit resources API allows for custom initialization and cleanup code (init/fini); here a new resource add function sets the "struct kunit_resource" "name" field, and calls the standard add function. Having a simple way to name resources is useful in cases such as multithreaded tests where a set of resources are shared among threads; a pointer to the "struct kunit *" test state then is all that is needed to retrieve and use named resources. Support is provided to add, find and destroy named resources; the latter two are simply wrappers that use a "match-by-name" callback. If an attempt to add a resource with a name that already exists is made kunit_add_named_resource() will return -EEXIST. Signed-off-by: Alan Maguire Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit d4cdd146d0db900b2eb6c2d28cba719b3bf0a928 Author: Alan Maguire Date: Fri May 29 22:46:20 2020 +0100 kunit: generalize kunit_resource API beyond allocated resources In its original form, the kunit resources API - consisting the struct kunit_resource and associated functions - was focused on adding allocated resources during test operation that would be automatically cleaned up on test completion. The recent RFC patch proposing converting KASAN tests to KUnit [1] showed another potential model - where outside of test context, but with a pointer to the test state, we wish to access/update test-related data, but expressly want to avoid allocations. It turns out we can generalize the kunit_resource to support static resources where the struct kunit_resource * is passed in and initialized for us. As part of this work, we also change the "allocation" field to the more general "data" name, as instead of associating an allocation, we can associate a pointer to static data. Static data is distinguished by a NULL free functions. A test is added to cover using kunit_add_resource() with a static resource and data. Finally we also make use of the kernel's krefcount interfaces to manage reference counting of KUnit resources. The motivation for this is simple; if we have kernel threads accessing and using resources (say via kunit_find_resource()) we need to ensure we do not remove said resources (or indeed free them if they were dynamically allocated) until the reference count reaches zero. A new function - kunit_put_resource() - is added to handle this, and it should be called after a thread using kunit_find_resource() is finished with the retrieved resource. We ensure that the functions needed to look up, use and drop reference count are "static inline"-defined so that they can be used by builtin code as well as modules in the case that KUnit is built as a module. A cosmetic change here also; I've tried moving to kunit_[action]_resource() as the format of function names for consistency and readability. [1] https://lkml.org/lkml/2020/2/26/1286 Signed-off-by: Alan Maguire Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 2237d76530ebf8e4fc3a0c6048d74cff808dee8f Merge: f4db7182e0de9 d60b5fbc1ce82 Author: Jens Axboe Date: Fri Jun 26 13:44:16 2020 -0600 Merge branch 'io_uring-5.8' into for-5.9/io_uring Merge in changes that went into 5.8-rc3. GIT will silently do the merge, but we still need a tweak on top of that since io_complete_rw_common() was modified to take a io_comp_state pointer. The auto-merge fails on that, and we end up with something that doesn't compile. * io_uring-5.8: io_uring: fix current->mm NULL dereference on exit io_uring: fix hanging iopoll in case of -EAGAIN io_uring: fix io_sq_thread no schedule when busy Signed-off-by: Jens Axboe commit b0f46a9754e2b4bb2bcbd9c521eb5bf156401f54 Merge: 18c955b730002 37d318d7805f2 Author: David S. Miller Date: Fri Jun 26 12:22:34 2020 -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 2020-06-25 This series contains updates to i40e driver and removes the individual driver versions from all of the Intel wired LAN drivers. Shiraz moves the client header so that it can easily be shared between the i40e LAN driver and i40iw RDMA driver. Jesse cleans up the unused defines, since they are just dead weight. Alek reduces the unreasonably long wait time for a PF reset after reboot by using jiffies to limit the maximum wait time for the PF reset to succeed. Added additional logging to let the user know when the driver transitions into recovery mode. Adds new device support for our 5 Gbps NICs. Todd adds a check to see if MFS is set after warm reboot and notifies the user when MFS is set to anything lower than the default value. Arkadiusz fixes a possible race condition, where were holding a spin-lock while in atomic context. v2: removed code comments that were no longer applicable in patch 2 of the series. Also removed 'inline' from patch 4 and patch 8 of the series. Also re-arranged code to be able to remove the forward function declarations. Dropped patch 9 of the series, while the author works on cleaning up the commit message. v3: Updated patch 8 description to answer Jakub's questions ==================== Signed-off-by: David S. Miller commit 18c955b730002afdb0f86be39c0d202450acbbfc Author: Nathan Chancellor Date: Thu Jun 25 21:10:02 2020 -0700 bonding: Remove extraneous parentheses in bond_setup Clang warns: drivers/net/bonding/bond_main.c:4657:23: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP)) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/bonding/bond_main.c:4681:23: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((BOND_MODE(bond) == BOND_MODE_ACTIVEBACKUP)) ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~ This warning occurs when a comparision has two sets of parentheses, which is usually the convention for doing an assignment within an if statement. Since equality comparisons do not need a second set of parentheses, remove them to fix the warning. Fixes: 18cb261afd7b ("bonding: support hardware encryption offload to slaves") Link: https://github.com/ClangBuiltLinux/linux/issues/1066 Signed-off-by: Nathan Chancellor Reported-by: kernelci.org bot Reviewed-by: Nick Desaulniers Signed-off-by: David S. Miller commit 52660c0ec9e4ec26934ad9eb6f73857ad12fb4e9 Author: Martin Blumenstingl Date: Thu Jun 25 20:21:42 2020 +0200 net: stmmac: dwmac-meson8b: use clk_parent_data for clock registration Simplify meson8b_init_rgmii_tx_clk() by using struct clk_parent_data to initialize the clock parents. No functional changes intended. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller commit 4ced637bd24ac5f824eb8169324712f0bcd50d92 Author: Vaibhav Gupta Date: Wed Jun 24 23:21:17 2020 +0530 bnx2x: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. The driver was also calling bnx2x_set_power_state() to set the power state of the device by changing the device's registers' value. It is no more needed. Compile-tested only. Signed-off-by: Vaibhav Gupta Acked-by: Igor Russkikh Signed-off-by: David S. Miller commit 12ef3933b46f7d2e19088c2c41d0ef9dfac39f11 Merge: 7aae3c161e067 eb46f547a2fa9 Author: Stephen Boyd Date: Fri Jun 26 11:58:51 2020 -0700 Merge branch 'clk-bcm' into clk-next - Make defines for bcm63xx-gate clks to use in DT - Support gate clks on BCM6318 SoCs - Add HDMI clks for BCM2711 SoCs - Support BCM2711 SoC firmware clks * clk-bcm: (42 commits) clk: bcm: dvp: Add missing module informations clk: bcm: rpi: Remove the quirks for the CPU clock clk: bcm2835: Don't cache the PLLB rate clk: bcm2835: Allow custom CCF flags for the PLLs Revert "clk: bcm2835: remove pllb" clk: bcm: rpi: Give firmware clocks a name clk: bcm: rpi: Discover the firmware clocks clk: bcm: rpi: Add an enum for the firmware clocks clk: bcm: rpi: Add DT provider for the clocks clk: bcm: rpi: Make the PLLB registration function return a clk_hw clk: bcm: rpi: Split pllb clock hooks clk: bcm: rpi: Rename is_prepared function clk: bcm: rpi: Pass the clocks data to the firmware function clk: bcm: rpi: Add clock id to data clk: bcm: rpi: Create a data structure for the clocks clk: bcm: rpi: Use CCF boundaries instead of rolling our own clk: bcm: rpi: Make sure the clkdev lookup is removed clk: bcm: rpi: Switch to clk_hw_register_clkdev clk: bcm: rpi: Remove pllb_arm_lookup global pointer clk: bcm: rpi: Make sure pllb_arm is removed ... commit eb46f547a2fa9d5913c76066eab34efbd7f2252c Author: Maxime Ripard Date: Fri Jun 26 13:25:13 2020 +0200 clk: bcm: dvp: Add missing module informations The driver for the DVP controller in the BCM2711 was missing the MODULE_* macros resulting in a modpost warning at compilation. Fixes: 1bc95972715a ("clk: bcm: Add BCM2711 DVP driver") Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20200626112513.90816-1-maxime@cerno.tech Signed-off-by: Stephen Boyd commit b91535812d663acc47952d05386c8a126eae8080 Author: Bolarinwa Olayemi Saheed Date: Mon Jun 15 09:32:25 2020 +0200 PCI: Align PCIe capability and PCI accessor return values The PCI config accessors (pci_read_config_word(), et al) return PCIBIOS_SUCCESSFUL (zero) or positive error values like PCIBIOS_FUNC_NOT_SUPPORTED. The PCIe capability accessors similarly return PCIBIOS errors, but in addition, they can return -EINVAL. This makes it harder than it should be to check for errors. Return PCIBIOS_BAD_REGISTER_NUMBER instead of -EINVAL in all PCIe capability accessors. Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20200615073225.24061-9-refactormyself@gmail.com Signed-off-by: Bolarinwa Olayemi Saheed Signed-off-by: Bjorn Helgaas commit d20df83b66ccb9cc6b1ac448d4013647a0fe4952 Author: Bolarinwa Olayemi Saheed Date: Mon Jun 15 09:32:18 2020 +0200 PCI: Convert PCIe capability PCIBIOS errors to errno The PCI config accessors (pci_read_config_word(), et al) return PCIBIOS_SUCCESSFUL (zero) or positive error values like PCIBIOS_FUNC_NOT_SUPPORTED. The PCIe capability accessors (pcie_capability_read_word(), et al) similarly return PCIBIOS errors, but some callers assume they return generic errno values like -EINVAL. For example, the Myri-10G probe function returns a positive PCIBIOS error if the pcie_capability_clear_and_set_word() in pcie_set_readrq() fails: myri10ge_probe status = pcie_set_readrq return pcie_capability_clear_and_set_word if (status) return status A positive return from a PCI driver probe function would cause a "Driver probe function unexpectedly returned" warning from local_pci_probe() instead of the desired probe failure. Convert PCIBIOS errors to generic errno for all callers of: pcie_capability_read_word pcie_capability_read_dword pcie_capability_write_word pcie_capability_write_dword pcie_capability_set_word pcie_capability_set_dword pcie_capability_clear_word pcie_capability_clear_dword pcie_capability_clear_and_set_word pcie_capability_clear_and_set_dword that check the return code for anything other than zero. [bhelgaas: commit log, squash together] Suggested-by: Bjorn Helgaas Link: https://lore.kernel.org/r/20200615073225.24061-1-refactormyself@gmail.com Signed-off-by: Bolarinwa Olayemi Saheed Signed-off-by: Bjorn Helgaas commit dae68d7fd4930315389117e9da35b763f12238f9 Author: Rafael J. Wysocki Date: Fri Jun 26 19:42:34 2020 +0200 PCI: hotplug: ACPI: Fix context refcounting in acpiphp_grab_context() If context is not NULL in acpiphp_grab_context(), but the is_going_away flag is set for the device's parent, the reference counter of the context needs to be decremented before returning NULL or the context will never be freed, so make that happen. Fixes: edf5bf34d408 ("ACPI / dock: Use callback pointers from devices' ACPI hotplug contexts") Reported-by: Vasily Averin Cc: 3.15+ # 3.15+ Signed-off-by: Rafael J. Wysocki commit 435a77434653faabcdf26c3d08c4fd25602c8613 Merge: 0b227076d509c 4ac250814dfdc Author: Jonathan Corbet Date: Fri Jun 26 11:35:10 2020 -0600 Merge branch 'mauro' into docs-next A big set of fixes and RST conversions from Mauro. He swears that this is the last RST conversion set, which is certainly cause for celebration. commit 4ac250814dfdc8606ac643283f26a63b0d5cbc73 Author: Mauro Carvalho Chehab Date: Tue Jun 23 15:31:40 2020 +0200 docs: staging: use small font for literal includes The normal font is too big to display 80 columns, causing extra breaks to be added at weird places. change to the footnotesize, as this would fit a little bit better. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/fe2cc675ec69bfa50aa7e183dcd911077046b01f.1592918949.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 35e25da7fb1a513f4a7230dd4521277df8bc7f11 Author: Mauro Carvalho Chehab Date: Tue Jun 23 15:31:39 2020 +0200 docs: Add remaining Documentation/*.txt at staging/index.rst There are a few text files that aren't yet at the docs building system. Add those to the staging/index.rst. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/35967d18de8b3ee480194acf68e62d515347c1e5.1592918949.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit c9b54d6f362c0846a11fedea20ec8b8da9b4c93d Author: Mauro Carvalho Chehab Date: Tue Jun 23 15:31:38 2020 +0200 docs: move other kAPI documents to core-api There are a number of random documents that seem to be describing some aspects of the core-api. Move them to such directory, adding them at the core-api/index.rst file. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/86d979ed183adb76af93a92f20189bccf97f0055.1592918949.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit d8451dfc631b9d7f3bb811bc20512e13840f38a1 Author: Mauro Carvalho Chehab Date: Tue Jun 23 15:31:37 2020 +0200 docs: move mailbox.txt to driver-api and rename it This file is already at the ReST format. Move it to driver-api and rename it. Suggested-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/03e40c31b86c1f4fd3597bf4bfb8346901286bab.1592918949.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 800c02f5d03019716a5926b73144be3bf0276923 Author: Mauro Carvalho Chehab Date: Tue Jun 23 15:31:36 2020 +0200 docs: move nommu-mmap.txt to admin-guide and rename to ReST The nommu-mmap.txt file provides description of user visible behaviuour. So, move it to the admin-guide. As it is already at the ReST, also rename it. Suggested-by: Mike Rapoport Suggested-by: Jonathan Corbet Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/3a63d1833b513700755c85bf3bda0a6c4ab56986.1592918949.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit f00c313b50def14e5d4b8423ef67344806b5bd42 Author: Mauro Carvalho Chehab Date: Tue Jun 23 15:31:35 2020 +0200 docs: trace: ring-buffer-design.txt: convert to ReST format - Just like some media documents, this file is dual licensed with GPL and GFDL. As right now the GFDL SPDX definition is bogus (as it doesn't tell anything about invariant parts), let's not use SPDX here. Let's use, instead, the same test as we have on media. - Convert title to ReST format; - use :field: markup; - Proper mark literal blocks as such; - Add it to trace/index.rst file. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d350be9b666ca0de441b684b2282ddd76bd7b397.1592918949.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 691462f209bbf622a557594b0208e1e34beef122 Author: Mauro Carvalho Chehab Date: Tue Jun 23 15:31:34 2020 +0200 docs: dt: convert booting-without-of.txt to ReST format - Add a SPDX header; - Adjust document title; - Adjust document and section titles; - Some whitespace fixes and new line breaks; - Mark literal blocks as such; - Add table markups; - Add it to devicetree/index.rst. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/8dce14af13f66cb8393c21b58f0693e667a7045f.1592918949.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 0b227076d509c2facf177d7cdb67cbbb885cb661 Author: Stephen Kitt Date: Tue Jun 23 13:25:14 2020 +0200 docs: sysctl/kernel: document random This documents the random directory, based on the behaviour seen in drivers/char/random.c. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20200623112514.10650-1-steve@sk2.org Signed-off-by: Jonathan Corbet commit 48d4b96c08b6cb03178d0509e6d7ba121730fb95 Author: Luc Van Oostenryck Date: Sun Jun 21 17:33:30 2020 +0200 doc: update URL for sparse's tarballs The URL given to get sparse's tarballs is sparse.wiki.kernel.org but the wiki will is deprecated in favor of sparse.docs.kernel.org. So, update this URL to the one where the tarballs can directly be found. Signed-off-by: Luc Van Oostenryck Link: https://lore.kernel.org/r/20200621153330.54480-1-luc.vanoostenryck@gmail.com Signed-off-by: Jonathan Corbet commit e7b4311ebcac142be28c9fa1b9f63a9d35fc2a92 Author: Alexander A. Klimov Date: Sun Jun 21 15:36:30 2020 +0200 Replace HTTP links with HTTPS ones: Documentation/process Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20200621133630.46435-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit c69f22f25f1105cb4e629b5c2da61a245b653ce1 Author: Alexander A. Klimov Date: Sun Jun 21 15:35:52 2020 +0200 Replace HTTP links with HTTPS ones: Documentation/filesystems Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200621133552.46371-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit d3603f4c30c24b43f49bf9c1dbc93b06f7a7775d Author: Alexander A. Klimov Date: Sun Jun 21 15:35:12 2020 +0200 Replace HTTP links with HTTPS ones: Documentation/driver-api Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200621133512.46311-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit c5f95886fa9837b0cfc33ebcf4cdb0797018a991 Author: Shuli Zhang Date: Sun Jun 21 20:30:16 2020 +0800 Documentation/features: Add KGDB support on RISC-V As KGDB has been implemented on RISC-V, update the feature list. Signed-off-by: Shuli Zhang Link: https://lore.kernel.org/r/20200621123016.9289-1-zhshuli@aliyun.com Signed-off-by: Jonathan Corbet commit a5989e29acb80583eb476769a7b50d65db83d068 Author: Alexander A. Klimov Date: Sat Jun 20 09:54:02 2020 +0200 Replace HTTP links with HTTPS ones: Documentation/sphinx/parse-headers.pl Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Link: https://lore.kernel.org/r/20200620075402.22347-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit f4db7182e0de981a3f1b356e0cf43c6815423055 Author: Pavel Begunkov Date: Thu Jun 25 18:20:54 2020 +0300 io-wq: return next work from ->do_work() directly It's easier to return next work from ->do_work() than having an in-out argument. Looks nicer and easier to compile. Also, merge io_wq_assign_next() into its only user. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e883a79d8ced8e123f8c4042a29a7524c39935ab Author: Pavel Begunkov Date: Thu Jun 25 18:20:53 2020 +0300 io-wq: compact io-wq flags numbers Renumerate IO_WQ flags, so they take adjacent bits Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c40f63790ec957e9449056fb78d8c2523eff96b5 Author: Jens Axboe Date: Thu Jun 25 15:39:59 2020 -0600 io_uring: use task_work for links if possible Currently links are always done in an async fashion, unless we catch them inline after we successfully complete a request without having to resort to blocking. This isn't necessarily the most efficient approach, it'd be more ideal if we could just use the task_work handling for this. Outside of saving an async jump, we can also do less prep work for these kinds of requests. Running dependent links from the task_work handler yields some nice performance benefits. As an example, examples/link-cp from the liburing repository uses read+write links to implement a copy operation. Without this patch, the a cache fold 4G file read from a VM runs in about 3 seconds: $ time examples/link-cp /data/file /dev/null real 0m2.986s user 0m0.051s sys 0m2.843s and a subsequent cache hot run looks like this: $ time examples/link-cp /data/file /dev/null real 0m0.898s user 0m0.069s sys 0m0.797s With this patch in place, the cold case takes about 2.4 seconds: $ time examples/link-cp /data/file /dev/null real 0m2.400s user 0m0.020s sys 0m2.366s and the cache hot case looks like this: $ time examples/link-cp /data/file /dev/null real 0m0.676s user 0m0.010s sys 0m0.665s As expected, the (mostly) cache hot case yields the biggest improvement, running about 25% faster with this change, while the cache cold case yields about a 20% increase in performance. Outside of the performance increase, we're using less CPU as well, as we're not using the async offload threads at all for this anymore. Signed-off-by: Jens Axboe commit 565dbe723f6a0126aff747194cda6bc373748316 Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:11 2020 +0200 docs: fs: proc.rst: convert a new chapter to ReST A new chapter was added to proc.rst. Adjust the markups to avoid this warning: Documentation/filesystems/proc.rst:2194: WARNING: Inconsistent literal block quoting. And to properly mark the code-blocks there. Fixes: 37e7647a7212 ("docs: proc: add documentation for "hidepid=4" and "subset=pid" options and new mount behavior") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/de67ec04a2e735f4450eb3ce966f7d80b9438244.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 985098a05eee6bf5caca7e997e02a5b15242cfa0 Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:10 2020 +0200 docs: fix references for DMA*.txt files As we moved those files to core-api, fix references to point to their newer locations. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/37b2fd159fbc7655dbf33b3eb1215396a25f6344.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit bbea2aa335c21006b299f5731a80802dc7e8fcca Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:09 2020 +0200 docs: ABI: fix a typo when pointing to w1-generic.rst There's a typo there: w1_generic.rst -> w1-generic.rst Causing the document reference to point to the wrong place. Fixes: e2c94d6f5720 ("w1_therm: adding alarm sysfs entry") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/66b47dd879e8ae38b6db6d2f38780e00a29fc086.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 641febcabed66fa4d1dcf9b56dc2180581e711d3 Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:08 2020 +0200 docs: driver-model: remove a duplicated markup at driver.rst The "::" markup is there twice, causing a warning: Documentation/driver-api/driver-model/driver.rst:233: WARNING: Inline emphasis start-string without end-string. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/52c65b4ebca1262f80d8939e2027358f9b476f00.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit cadcb83f8db9de0ee123917f0e9f96b96bf069a2 Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:07 2020 +0200 docs: powerpc: fix some issues at vas-api.rst There are a few issues on this document, when built via the building with ``make htmldocs``: Documentation/powerpc/vas-api.rst:116: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:116: WARNING: Inline emphasis start-string without end-string. Documentation/powerpc/vas-api.rst:117: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:117: WARNING: Inline emphasis start-string without end-string. Documentation/powerpc/vas-api.rst:120: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:124: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:133: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:135: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:150: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:151: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:161: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:176: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:253: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:253: WARNING: Inline emphasis start-string without end-string. Documentation/powerpc/vas-api.rst:259: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:261: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:266: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:267: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:270: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:271: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:273: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:274: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:277: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:278: WARNING: Definition list ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:280: WARNING: Unexpected indentation. Documentation/powerpc/vas-api.rst:287: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/powerpc/vas-api.rst:289: WARNING: Block quote ends without a blank line; unexpected unindent. Fixes: c12e38b1d52e ("Documentation/powerpc: VAS API") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/fc1138e563bc3a41a9e59b5dd1fe2f6a4bfad253.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 72a3e3e25a5142284c6bc76ecf170c2a18dcdf6e Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:06 2020 +0200 docs: hugetlbpage.rst: fix some warnings Some new command line parameters were added at hugetlbpage.rst. Adjust them in order to properly parse that part of the file, avoiding those warnings: Documentation/admin-guide/mm/hugetlbpage.rst:105: WARNING: Unexpected indentation. Documentation/admin-guide/mm/hugetlbpage.rst:108: WARNING: Unexpected indentation. Documentation/admin-guide/mm/hugetlbpage.rst:109: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/admin-guide/mm/hugetlbpage.rst:112: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/admin-guide/mm/hugetlbpage.rst:120: WARNING: Unexpected indentation. Documentation/admin-guide/mm/hugetlbpage.rst:121: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/admin-guide/mm/hugetlbpage.rst:132: WARNING: Unexpected indentation. Documentation/admin-guide/mm/hugetlbpage.rst:135: WARNING: Block quote ends without a blank line; unexpected unindent. Fixes: cd9fa28b5351 ("hugetlbfs: clean up command line processing") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/86b6796b1a84e18b24314ecd29318951c1479ca2.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 466fb0301175b439edf56979e29e8a938368885a Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:05 2020 +0200 selftests/vm/keys: fix a broken reference at protection_keys.c Changeset 1eecbcdca2bd ("docs: move protection-keys.rst to the core-api book") from Jun 7, 2019 converted protection-keys.txt file to ReST. A recent change at protection_keys.c partially reverted such changeset, causing it to point to a non-existing file: - * Tests x86 Memory Protection Keys (see Documentation/core-api/protection-keys.rst) + * Tests Memory Protection Keys (see Documentation/vm/protection-keys.txt) It sounds to me that the changeset that introduced such change 4645e3563673 ("selftests/vm/pkeys: rename all references to pkru to a generic name") could also have other side effects, as it sounds that it was not generated against uptream code, but, instead, against a version older than Jun 7, 2019. Fixes: 4645e3563673 ("selftests/vm/pkeys: rename all references to pkru to a generic name") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/cf65aa052669f55b9dc976a5c8026aef5840741d.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 15d737f8a14e73fcf25f6f797630279a203ce99c Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:04 2020 +0200 kcsan: fix a kernel-doc warning One of the kernel-doc markups there have two "note" sections: ./include/linux/kcsan-checks.h:346: warning: duplicate section name 'Note' While this is not the case here, duplicated sections can cause build issues on Sphinx. So, let's change the notes section to use, instead, a list for those 2 notes at the same function. Signed-off-by: Mauro Carvalho Chehab Acked-by: Marco Elver Link: https://lore.kernel.org/r/20f7995fab2ba85ce723203e9a7c822a55cca2af.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 21b9cb34385d93d661a9134adf19eae2bd734218 Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:03 2020 +0200 fs: fs.h: fix a kernel-doc parameter description Changeset 3b0311e7ca71 ("vfs: track per-sb writeback errors and report them to syncfs") added a variant of filemap_sample_wb_err(), but it forgot to rename the arguments at the kernel-doc markup. Fix it. Fix those warnings: ./include/linux/fs.h:2845: warning: Function parameter or member 'file' not described in 'file_sample_sb_err' ./include/linux/fs.h:2845: warning: Excess function parameter 'mapping' description in 'file_sample_sb_err' Fixes: 3b0311e7ca71 ("vfs: track per-sb writeback errors and report them to syncfs") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/7b33bbceb29ac80874622a2bc84127bb10103245.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 7ae281b05c0cebef4ef0643e74300fbe84760c3c Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:02 2020 +0200 scripts/kernel-doc: handle function pointer prototypes There are some function pointer prototypes inside the net includes, like this one: int (*pcs_config)(struct phylink_config *config, unsigned int mode, phy_interface_t interface, const unsigned long *advertising); There's nothing wrong using it with kernel-doc, but we need to add a rule for it to parse such kind of prototype. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/fec520dd731a273013ae06b7653a19c7d15b9562.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 5d682f5ec9d1c49e7fe2945e586aa264692859f0 Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:01 2020 +0200 net: pylink.h: add kernel-doc descriptions for new fields at phylink_config Some fields were moved from struct phylink into phylink_config. Update the kernel-doc markups for the config struct accordingly Fixes: 5c05c1dbb177 ("net: phylink, dsa: eliminate phylink_fixed_state_cb()") Reviewed-by: Russell King Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/34970f447ff86415a6cef10a785fbef81c2819a7.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 3556108eb40a35836df1ef8228eca7ffa7dab764 Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:09:00 2020 +0200 scripts/kernel-doc: parse __ETHTOOL_DECLARE_LINK_MODE_MASK The __ETHTOOL_DECLARE_LINK_MODE_MASK macro is a variant of DECLARE_BITMAP(), used by phylink.h. As we have already a parser for DECLARE_BITMAP(), let's add one for this macro, in order to avoid such warnings: ./include/linux/phylink.h:54: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising' not described in 'phylink_link_state' ./include/linux/phylink.h:54: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising' not described in 'phylink_link_state' Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d1d1dea67a28117c0b0c33271b139c4455fef287.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 5c45a918263e4da142b9cf40a1dfcb4134d454a2 Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:08:59 2020 +0200 net: netdevice.h: add a description for napi_defer_hard_irqs Changeset 6f8b12d661d0 ("net: napi: add hard irqs deferral feature") added a new element at struct net_device. Add a description for it, based on what's described at the changeset which added such feature. Fixes: 6f8b12d661d0 ("net: napi: add hard irqs deferral feature") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/807a3840e7bc1562adefadb0535c9f47e6ab52e0.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit a8adb51b6f75a738d8e8e15ebea03c3e0d2414d1 Author: Mauro Carvalho Chehab Date: Tue Jun 23 09:08:58 2020 +0200 net: dev: add a missing kernel-doc annotation The dev argument was not listed at kernel-doc markup: ./net/core/dev.c:7878: warning: Function parameter or member 'dev' not described in 'netdev_get_xmit_slave' Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6e22325bb9bd4cc2249c3768b0e3ad75933445f8.1592895969.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit ee98fac8e06cbdc91b2d76293eda65bd759add6c Merge: 46e906144c3f4 7d9c29bb6c7f4 Author: Jonathan Corbet Date: Fri Jun 26 09:36:23 2020 -0600 Merge branch 'docs-fixes' into docs-next Bring a handful of (relatively) urgent fixes into docs-next as well. commit 7d9c29bb6c7f41e0a9204377e57935a373677572 Author: Jiri Slaby Date: Tue Jun 23 10:09:19 2020 +0200 MAINTAINERS: use my kernel.org address There were enough problems with suse.{com,cz} MTAs recently. I am bored by restoring lost e-mails from public archives. Let's switch (all) my MAINTAINERS addresses to @kernel.org and forward the e-mails there as I wish. And add the whole history to .mailmap. Signed-off-by: Jiri Slaby Cc: Joe Perches Link: https://lore.kernel.org/r/20200623080919.19976-1-jslaby@suse.cz Signed-off-by: Jonathan Corbet commit 9aa1ccb4e588bec4a2d2a4bae704354558953f11 Author: Jonathan Corbet Date: Mon Jun 22 07:35:39 2020 -0600 docs: f2fs: fix a broken table Commit ed318a6cc0b6 ("fscrypt: support test_dummy_encryption=v2") added an entry to the massive option table in Documentation/filesystems/f2fs.txt. The option was too wide for the formatting of the table, though, leading to a verbose and ugly warning starting with: Documentation/filesystems/f2fs.rst:229: WARNING: Malformed table. Text in column margin in table line 126. Fixing this requires formatting the whole table; let's hear it for Emacs query-replace-regexp. Fixes: ed318a6cc0b6 ("fscrypt: support test_dummy_encryption=v2") Signed-off-by: Jonathan Corbet commit 2f444efdaaed82f69d0afc4a7038a8563d8a3fa1 Author: Jonathan Corbet Date: Mon Jun 22 16:31:21 2020 -0600 docs: Don't push Sphinx upgrades quite so readily The sphinx-pre-install script will put out a verbose message recommending an upgrade for anybody running less than 2.4.4 - which was only released in March. So *everybody* will see that warning at this point. Let's only warn if the user is below our generally recommended version (1.7.9 currently). It might be good to put out a warning if people are explicitly making PDF files, but would need to be done in a different place and relatively few people do that. Signed-off-by: Jonathan Corbet commit be82e88895d17c1e69f3506e133dd4a24af1e3d7 Author: Naveen Manohar Date: Thu Jun 25 14:26:20 2020 -0500 ASoC: Intel: sof_sdw: Add MAX98373 support Add max98373-sdw helper function, which configures 2x MAX98373 codecs to Link1. This patch shares code between the I2S and SoundWire modes of MAX98373 and adds the trigger already added for I2S. Signed-off-by: Rander Wang Signed-off-by: Naveen Manohar Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200625192620.4312-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f6de798eca429881ac7938fc31d55b3739c6387f Author: Masanari Iida Date: Fri Jun 26 23:29:58 2020 +0900 ASoC: samsung: Fix a typo in Kconfig This patch fixes a spelling typo in samsung/Kconfig. Signed-off-by: Masanari Iida Link: https://lore.kernel.org/r/20200626142958.253614-1-standby24x7@gmail.com Signed-off-by: Mark Brown commit 55caf37031f4860f4d47dd7c8000d61528e5832c Author: Naveen Manohar Date: Thu Jun 25 14:27:08 2020 -0500 ASoC: Intel: common: add match table for TGL MAX98373 + RT5682 SoundWire driver RT5682 is in Soundwire mode on Link0 & 2x MAX98373 on link1. Signed-off-by: Naveen Manohar Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20200625192708.4416-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ec0d0f6342d460e75e77c41840d1420e3ba1b69d Author: Fred Oh Date: Thu Jun 25 14:24:58 2020 -0500 ASoc: Intel: cml_rt1011_rt5682: explicitly access first codec dailink.codecs is pointer to a codec array. Explicitly access first codec's dai_name. Signed-off-by: Fred Oh Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200625192458.4148-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit bfa29acd18e53ff44135f2eae2b942419a8582cc Author: Lee Jones Date: Fri Jun 26 07:57:38 2020 +0100 regulator: qcom_smd-regulator: Remove unused 'struct regulator_desc pmi8994_boost' This was an upstreaming error. Remove it as it's not to be used. Fixes the following W=1 kernel build warning: drivers/regulator/qcom_smd-regulator.c:477:36: warning: ‘pmi8994_boost’ defined but not used [-Wunused-const-variable=] Signed-off-by: Lee Jones Reviewed-by: Bjorn Andersson Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Link: https://lore.kernel.org/r/20200626065738.93412-10-lee.jones@linaro.org Signed-off-by: Mark Brown commit 0c5261663785b6505bf5d0f210f1ff0e4bd5ef2c Author: Lee Jones Date: Fri Jun 26 07:57:37 2020 +0100 regulator: wm8400-regulator: Repair dodgy kerneldoc header formatting W=1 kernel builds report a lack of descriptions for various function arguments. In reality they are documented, but the formatting was not as expected '@.*:'. Instead, some weird arg identifiers were used. This change fixes the following warnings: drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'dev' not described in 'wm8400_register_regulator' drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'reg' not described in 'wm8400_register_regulator' drivers/regulator/wm8400-regulator.c:243: warning: Function parameter or member 'initdata' not described in 'wm8400_register_regulator' Signed-off-by: Lee Jones Acked-by: Charles Keepax Cc: patches@opensource.cirrus.com Link: https://lore.kernel.org/r/20200626065738.93412-9-lee.jones@linaro.org Signed-off-by: Mark Brown commit 02d88863198c48675ceb2a244e5985c5650e5fe6 Author: Lee Jones Date: Fri Jun 26 07:57:36 2020 +0100 regulator: tps65218-regulator: Remove pointless 'is unsigned int <0' check 'rid' is declared as unsigned int, so there is little point checking for <0. Removing these checks fixes the following W=1 warnings: drivers/regulator/tps65218-regulator.c: In function ‘tps65218_pmic_set_suspend_enable’: drivers/regulator/tps65218-regulator.c:131:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 131 | if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1) | ^ drivers/regulator/tps65218-regulator.c: In function ‘tps65218_pmic_set_suspend_disable’: drivers/regulator/tps65218-regulator.c:144:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 144 | if (rid < TPS65218_DCDC_1 || rid > TPS65218_LDO_1) | ^ Signed-off-by: Lee Jones Cc: Keerthy Cc: Tero Kristo Cc: Dave Gerlach Cc: linux-omap@vger.kernel.org Link: https://lore.kernel.org/r/20200626065738.93412-8-lee.jones@linaro.org Signed-off-by: Mark Brown commit 44455a6d3bcab53ae8330a009d513ade0f12c0c0 Author: Lee Jones Date: Fri Jun 26 07:57:35 2020 +0100 regulator: tps65217-regulator: Use the returned value of tps65217_reg_read() Until now the aforementioned return value has been ignored. Previous and current calls to tps65217_reg_read() return instantly when the value is not 0, so let's do that. Fixes the following W=1 warning: drivers/regulator/tps65217-regulator.c: In function ‘tps65217_regulator_probe’: drivers/regulator/tps65217-regulator.c:227:9: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 227 | int i, ret; | ^~~ Signed-off-by: Lee Jones Cc: Russ Dill Cc: Keerthy Cc: AnilKumar Ch Cc: linux-omap@vger.kernel.org Link: https://lore.kernel.org/r/20200626065738.93412-7-lee.jones@linaro.org Signed-off-by: Mark Brown commit f10a5e499cf3e0978845cd85d8a375bcfa193907 Author: Lee Jones Date: Fri Jun 26 07:57:34 2020 +0100 regulator: tps65217-regulator: Remove pointless 'is unsigned int <0' check 'rid' is declared as unsigned int, so there is little point checking for <0. Removing these checks fixes the following W=1 warnings: drivers/regulator/tps65217-regulator.c: In function ‘tps65217_pmic_set_suspend_enable’: drivers/regulator/tps65217-regulator.c:127:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 127 | if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4) | ^ drivers/regulator/tps65217-regulator.c: In function ‘tps65217_pmic_set_suspend_disable’: drivers/regulator/tps65217-regulator.c:140:10: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 140 | if (rid < TPS65217_DCDC_1 || rid > TPS65217_LDO_4) | ^ Signed-off-by: Lee Jones Cc: Russ Dill Cc: Keerthy Cc: AnilKumar Ch Cc: linux-omap@vger.kernel.org Link: https://lore.kernel.org/r/20200626065738.93412-6-lee.jones@linaro.org Signed-off-by: Mark Brown commit ec84a7dff4474d0af6ef003719509e30aa93071d Author: Lee Jones Date: Fri Jun 26 07:57:33 2020 +0100 regulator: stpmic1_regulator: Properly document 'struct stpmic1_regulator_cfg' In kerneldoc format, data structures have to start with 'struct' else the kerneldoc tooling/parsers/validators get confused. Fixes the following W=1 kernel build warning: drivers/regulator/stpmic1_regulator.c:25: warning: cannot understand function prototype: 'struct stpmic1_regulator_cfg ' Signed-off-by: Lee Jones Cc: Pascal Paillet Link: https://lore.kernel.org/r/20200626065738.93412-5-lee.jones@linaro.org Signed-off-by: Mark Brown commit 4e773e7392fb561eb4ae10deb526aa1ac8c13f61 Author: Lee Jones Date: Fri Jun 26 07:57:32 2020 +0100 regulator: pwm-regulator: Demote kerneldoc header to standard comment This particular comment doesn't have anything to do with documenting functions or data structures. Instead it is used as a section header. Fixes W=1 warning: drivers/regulator/pwm-regulator.c:55: warning: Function parameter or member 'rdev' not described in 'pwm_regulator_init_state' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200626065738.93412-4-lee.jones@linaro.org Signed-off-by: Mark Brown commit 7cb5f692077e3b91dcb706cbf58d495d066439ce Author: Lee Jones Date: Fri Jun 26 07:57:31 2020 +0100 regulator: qcom-rpmh-regulator: Repair dodgy kerneldoc header formatting W=1 kernel builds report a lack of descriptions for various enum properties and function arguments. In reality they are documented, but the formatting was not as expected '@.*:'. Instead, some weird arg identifiers were used or none at all. This change fixes the following warnings: drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'VRM' not described in enum 'rpmh_regulator_type' drivers/regulator/qcom-rpmh-regulator.c:33: warning: Enum value 'XOB' not described in enum 'rpmh_regulator_type' drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'vreg' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'dev' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'node' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'pmic_id' not described in 'rpmh_regulator_init_vreg' drivers/regulator/qcom-rpmh-regulator.c:416: warning: Function parameter or member 'pmic_rpmh_data' not described in 'rpmh_regulator_init_vreg' Signed-off-by: Lee Jones Reviewed-by: Bjorn Andersson Cc: Andy Gross Cc: Bjorn Andersson Cc: linux-arm-msm@vger.kernel.org Link: https://lore.kernel.org/r/20200626065738.93412-3-lee.jones@linaro.org Signed-off-by: Mark Brown commit 36f69fa96a23a054d3aea5793ce2ef3d95907713 Author: Lee Jones Date: Fri Jun 26 07:57:30 2020 +0100 regulator: max8998: Staticify internal function max8998_get_current_limit() max8998_get_current_limit() is only used via the .get_current_limit, so it doesn't need to be publicly supported, or to have its own external prototype. Instead, we'll make it static. Fixes the following W=1 warning: drivers/regulator/max8998.c:418:5: warning: no previous prototype for ‘max8998_get_current_limit’ [-Wmissing-prototypes] 418 | int max8998_get_current_limit(struct regulator_dev *rdev) | ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Cc: Kyungmin Park Cc: Marek Szyprowski Link: https://lore.kernel.org/r/20200626065738.93412-2-lee.jones@linaro.org Signed-off-by: Mark Brown commit b0a31a78a04839184d6cae93b193e6bd8640145b Merge: b6d6e9ea8fb9d bc7477fc2ab48 Author: Mark Brown Date: Fri Jun 26 14:43:48 2020 +0100 Merge series "ASoC: Intel: machine driver updates for 5.9" from Pierre-Louis Bossart : This patchset adds: a) fixes for missing .owner = THIS_MODULE initializations for snd_soc_card structures b) extensions for TigerLake and JasperLake reusing the same machine drivers. c) Max98373 support for SoundWire machine driver. d) cleanups (use-after-free, quirks, etc). Bard Liao (1): ASoC: intel: cml_rt1011_rt5682: use for_each_card_prelinks Dharageswari R (3): ASoC: Intel: Boards: tgl_max98373: add dai_trigger function ASoC: Intel: Boards: tgl_max98373: Fix the comment for max_98373_components ASoC: Intel: Boards: tgl_max98373: Update TDM configuration in hw_params Fred Oh (3): ASoC: Intel: Boards: cml_rt1011_rt5682: reduce log level for printing quirk ASoC: Intel: Boards: cml_rt1011_rt5682: use statically define codec config ASoc: Intel: cml_rt1011_rt5682: explicitly access first codec Naveen Manohar (2): ASoC: Intel: sof_sdw: Add MAX98373 support ASoC: Intel: common: add match table for TGL MAX98373 + RT5682 SoundWire driver Pierre-Louis Bossart (6): ASoC: SOF: nocodec: add missing .owner field ASoC: Intel: cml_rt1011_rt5682: add missing .owner field ASoC: Intel: sof_sdw: add missing .owner field ASoC: Intel: bxt_rt298: add missing .owner field ASoC: Intel: sof_sdw: add quirk override with kernel parameter ASoC: Intel: boards: byt*.c: remove cast in dev_info quirk log Yong Zhi (1): ASoC: intel: sof_rt5682: Add support for jsl-max98360a-rt5682 randerwang (1): ASoC: Intel: sdw_max98373: add card_late_probe support sound/soc/intel/boards/Kconfig | 3 +- sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/bxt_rt298.c | 2 + sound/soc/intel/boards/bytcht_es8316.c | 5 +- sound/soc/intel/boards/bytcr_rt5640.c | 4 +- sound/soc/intel/boards/bytcr_rt5651.c | 4 +- sound/soc/intel/boards/cml_rt1011_rt5682.c | 90 ++++++------------- sound/soc/intel/boards/sof_maxim_common.c | 55 ++++++++++-- sound/soc/intel/boards/sof_maxim_common.h | 3 + sound/soc/intel/boards/sof_rt5682.c | 32 +++++++ sound/soc/intel/boards/sof_sdw.c | 72 ++++++++++++++- sound/soc/intel/boards/sof_sdw_common.h | 15 ++++ sound/soc/intel/boards/sof_sdw_max98373.c | 86 ++++++++++++++++++ .../intel/common/soc-acpi-intel-jsl-match.c | 13 +++ .../intel/common/soc-acpi-intel-tgl-match.c | 25 ++++++ sound/soc/sof/nocodec.c | 1 + 16 files changed, 332 insertions(+), 80 deletions(-) create mode 100644 sound/soc/intel/boards/sof_sdw_max98373.c base-commit: 6f81e520b2906258a063f09b8d1dd9d0cc6a3172 -- 2.20.1 commit b6d6e9ea8fb9d477f07e6e4ad8b8a38a47f6870e Author: Colton Lewis Date: Fri Jun 26 05:40:24 2020 +0000 snd/soc: correct trivial kernel-doc inconsistency Silence documentation build warning by correcting kernel-doc comment for snd_soc_runtime_action. ./sound/soc/soc-pcm.c:220: warning: Function parameter or member 'action' not described in 'snd_soc_runtime_action' Signed-off-by: Colton Lewis Link: https://lore.kernel.org/r/20200626053953.68797-1-colton.w.lewis@protonmail.com Signed-off-by: Mark Brown commit 6407d666c5353d15d9e5c7cc1b8d8ced40e425f0 Author: Nirmoy Das Date: Wed Jun 24 20:26:48 2020 +0200 drm/ttm: do not keep GPU dependent addresses GPU address handling is device specific and should be handle by its device driver. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/372937/ Signed-off-by: Christian König commit bc7477fc2ab4882ee20cc58a514f6991c1dfc636 Author: Dharageswari R Date: Thu Jun 25 14:13:04 2020 -0500 ASoC: Intel: Boards: tgl_max98373: Update TDM configuration in hw_params This patch updates tx_mask, so that (0-3)slots are reserved for Maxim amps to feedback data. V0->slot0, I0->slot1, V1->slot2, I1->slot3. also update slot_width in tdm configuration to 24 as the BE configuration is 24 in topology. Signed-off-by: Dharageswari R Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200625191308.3322-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5ac7c1b293107f43afb515665204587c423227f5 Author: Bard Liao Date: Thu Jun 25 14:13:03 2020 -0500 ASoC: intel: cml_rt1011_rt5682: use for_each_card_prelinks for_each_card_prelinks() is a common API to walk through each prelink in the card. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200625191308.3322-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8a473c39ae54c27e694a131c34a739d0f8aa5300 Author: Fred Oh Date: Thu Jun 25 14:13:02 2020 -0500 ASoC: Intel: Boards: cml_rt1011_rt5682: use statically define codec config When the cml_rt1011_rt5682_dailink[].codecs pointer is overridden by a quirk with a devm allocated structure and the probe is deferred, in the next probe we will see an use-after-free condition (verified with KASAN). This can be avoided by using statically allocated configurations - which simplifies the code quite a bit as well. KASAN issue fixed. [ 23.301373] cml_rt1011_rt5682 cml_rt1011_rt5682: sof_rt1011_quirk = f [ 23.301875] ================================================================== [ 23.302018] BUG: KASAN: use-after-free in snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682] [ 23.302178] Read of size 8 at addr ffff8881ec6acae0 by task kworker/0:2/105 [ 23.302320] CPU: 0 PID: 105 Comm: kworker/0:2 Not tainted 5.7.0-rc7-test+ #3 [ 23.302322] Hardware name: Google Helios/Helios, BIOS 01/21/2020 [ 23.302329] Workqueue: events deferred_probe_work_func [ 23.302331] Call Trace: [ 23.302339] dump_stack+0x76/0xa0 [ 23.302345] print_address_description.constprop.0.cold+0xd3/0x43e [ 23.302351] ? _raw_spin_lock_irqsave+0x7b/0xd0 [ 23.302355] ? _raw_spin_trylock_bh+0xf0/0xf0 [ 23.302362] ? snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682] [ 23.302365] __kasan_report.cold+0x37/0x86 [ 23.302371] ? snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682] [ 23.302375] kasan_report+0x38/0x50 [ 23.302382] snd_cml_rt1011_probe+0x23a/0x3d0 [snd_soc_cml_rt1011_rt5682] [ 23.302389] platform_drv_probe+0x66/0xc0 Fixes: 629ba12e9998 ("ASoC: Intel: boards: split woofer and tweeter support") Suggested-by: Ranjani Sridharan Signed-off-by: Fred Oh Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20200625191308.3322-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e1a31c092f3fae62b1f67aa2dbde604df003c00c Author: Fred Oh Date: Thu Jun 25 14:13:01 2020 -0500 ASoC: Intel: Boards: cml_rt1011_rt5682: reduce log level for printing quirk Change dev_info to dev_dbg to reduce noise during multiple deferred probes. Signed-off-by: Fred Oh Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20200625191308.3322-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 719e8179cef3535755acebeb69656903691d2e93 Author: Yong Zhi Date: Thu Jun 25 14:13:00 2020 -0500 ASoC: intel: sof_rt5682: Add support for jsl-max98360a-rt5682 Add support for max98360a speaker amp on SSP1 and ALC5682 on SSP0 for jsl+ platform. Signed-off-by: Yong Zhi Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200625191308.3322-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c8090048daf8685de7ca8399127d36d08ce26790 Author: Dharageswari R Date: Thu Jun 25 14:12:59 2020 -0500 ASoC: Intel: Boards: tgl_max98373: Fix the comment for max_98373_components MAX_98373_DEV0_NAME is the Right speaker and MAX_98373_DEV1_NAME is the Left speaker, hence updating the comments for max98373 dailink components accordingly. Signed-off-by: Dharageswari R Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200625191308.3322-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 94d2d08974746bd0f469ec5c1e50c613de558bfc Author: Dharageswari R Date: Thu Jun 25 14:12:58 2020 -0500 ASoC: Intel: Boards: tgl_max98373: add dai_trigger function Speaker amplifier feedback is not modeled as being dependent on any active output. Even when there is no playback happening, parts of the graph, specifically the IV sense->speaker protection->output remains active and this prevents the DSP from entering low-power states. This patch suggests a machine driver level approach where the speaker pins are enabled/disabled dynamically depending on stream start/stop events. DPAM graph representations show the feedback loop is indeed disabled and low-power states can be reached. Signed-off-by: Dharageswari R Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20200625191308.3322-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2697f3af42b7a90c460c1d0cfef904dea56230e2 Author: Pierre-Louis Bossart Date: Thu Jun 25 14:12:57 2020 -0500 ASoC: Intel: boards: byt*.c: remove cast in dev_info quirk log We don't need an explicit cast, using the right format is simple enough. Suggested-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200625191308.3322-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2555ebe94df0ee30db56fdf6d3e2ea8205c2ec2d Author: Pierre-Louis Bossart Date: Thu Jun 25 14:12:56 2020 -0500 ASoC: Intel: sof_sdw: add quirk override with kernel parameter During the bring-up of new platforms, or to take care of specific hardware reworks, it's useful to add a kernel parameter to override the default DMI-based quirks. For example, adding the following line in a .conf file in /etc/modprobe.d/ will change the default quirk and log the changes if dynamic debug is enabled. options snd_soc_sof_sdw quirk=0x802 [ 735.025785] sof_sdw sof_sdw: Overriding quirk 0x10 => 0x802 [ 735.025787] sof_sdw sof_sdw: quirk realtek,jack-detect-source 2 [ 735.025790] sof_sdw sof_sdw: quirk SOF_RT715_DAI_ID_FIX enabled Tested on ICL RVP with add-on board instead of default codec. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200625191308.3322-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 88cee34b776f80d2da04afb990c2a28c36799c43 Author: Pierre-Louis Bossart Date: Thu Jun 25 14:12:55 2020 -0500 ASoC: Intel: bxt_rt298: add missing .owner field This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as cat /proc/asound/modules 0 (efault) Fixes: 76016322ec56 ('ASoC: Intel: Add Broxton-P machine driver') Reported-by: Jaroslav Kysela Suggested-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200625191308.3322-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fb4b42f68972d6bc905c8b6e21a43a490dedfca7 Author: Pierre-Louis Bossart Date: Thu Jun 25 14:12:54 2020 -0500 ASoC: Intel: sof_sdw: add missing .owner field This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as cat /proc/asound/modules 0 (efault) Fixes: 52db12d193d4 ('ASoC: Intel: boards: add sof_sdw machine driver') Reported-by: Jaroslav Kysela Suggested-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200625191308.3322-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 299120928897d6cb893c7165df7cd232d835e259 Author: Pierre-Louis Bossart Date: Thu Jun 25 14:12:53 2020 -0500 ASoC: Intel: cml_rt1011_rt5682: add missing .owner field This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as cat /proc/asound/modules 0 (efault) Fixes: 17fe95d6df93 ('ASoC: Intel: boards: Add CML m/c using RT1011 and RT5682') Reported-by: Jaroslav Kysela Suggested-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200625191308.3322-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8753889e2720c1ef7ebf03370e384f5bf5ff4fab Author: Pierre-Louis Bossart Date: Thu Jun 25 14:12:52 2020 -0500 ASoC: SOF: nocodec: add missing .owner field This field is required for ASoC cards. Not setting it will result in a module->name pointer being NULL and generate problems such as cat /proc/asound/modules 0 (efault) Fixes: 8017b8fd37bf ('ASoC: SOF: Add Nocodec machine driver support') Reported-by: Jaroslav Kysela Suggested-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200625191308.3322-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d41a39dda1407ff50c7c4bfbd307c188f1ae364b Author: Nirmoy Das Date: Thu Jun 25 14:07:23 2020 +0200 drm/scheduler: improve job distribution with multiple queues This patch uses score to select a new drm scheduler for better loadbalance between multiple drm schedulers instead of num_jobs. Below are test results after running amdgpu_test for ~10 times. Before this patch: sched_name num of many times it got schedule ========= ================================== sdma0 1463 sdma1 198 comp_1.0.1 280 After this patch: sched_name num of many times it got schedule ========= ================================== sdma0 925 sdma1 928 comp_1.0.1 177 comp_1.1.1 44 comp_1.2.1 43 comp_1.3.1 44 Signed-off-by: Nirmoy Das Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/373000/ Signed-off-by: Christian König commit 0dc9b286b8d2c219a55f6ad05d144aa4da495e97 Author: Nirmoy Das Date: Wed Jun 24 20:26:44 2020 +0200 drm/nouveau: don't use ttm bo->offset v3 Store ttm bo->offset in struct nouveau_bo instead. Signed-off-by: Nirmoy Das Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/372932/ Signed-off-by: Christian König commit 0b17fc08e396d005c65993c7237f05a107473042 Author: Nirmoy Das Date: Wed Jun 24 20:26:43 2020 +0200 drm/vmwgfx: don't use ttm bo->offset Calculate GPU offset within vmwgfx driver itself without depending on bo->offset. Signed-off-by: Nirmoy Das Acked-by: Christian König Link: https://patchwork.freedesktop.org/patch/372933/ Signed-off-by: Christian König commit fbd12537b0173810f95fb6bc24a8bd190b8b500f Author: Harigovindan P Date: Tue Jun 9 17:34:55 2020 +0530 drm/bridge: ti-sn65dsi86: ensure bridge suspend happens during PM sleep ti-sn65dsi86 bridge is enumerated as a runtime device. When suspend is triggered, PM core adds a refcount on all the devices and calls device suspend, since usage count is already incremented, runtime suspend will not be called and it kept the bridge regulators and gpios ON which resulted in platform not entering into XO shutdown. Add changes to force suspend on the runtime device during pm sleep. Signed-off-by: Harigovindan P Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200609120455.20458-1-harigovi@codeaurora.org commit 667175f5029c5f6ec7a72811fc6b14c33d252286 Author: Lad Prabhakar Date: Wed Jun 24 14:12:10 2020 +0100 arm64: dts: renesas: Add HiHope RZ/G2N Rev2.0/3.0/4.0 board with idk-1110wr display The HiHope RZ/G2N variants are advertised as compatible with panel idk-1110wr from Advantech, however the panel isn't sold alongside the board. New dts's, enabling the lvds node to get the panel to work with all the HiHope RZ/G2N variants. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-12-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8fb161447da014417eb43944369e8f35bb4c1b56 Author: Lad Prabhakar Date: Wed Jun 24 14:12:09 2020 +0100 arm64: dts: renesas: Add HiHope RZ/G2N Rev.3.0/4.0 sub board support The HiHope RZ/G2N sub board sits below the HiHope RZ/G2N Rev.3.0/4.0 main board. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-11-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d728a4476a118ff4d075459fd4594f7c46e27fc0 Author: Lad Prabhakar Date: Wed Jun 24 14:12:08 2020 +0100 arm64: dts: renesas: Add HiHope RZ/G2N Rev.3.0/4.0 main board support Add support for HiHope RZ/G2N Rev.3.0/4.0 main board support based on r8a774b1 SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-10-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 51fb6306d0587ab24187f429a703272aab466b1e Author: Lad Prabhakar Date: Wed Jun 24 14:12:07 2020 +0100 arm64: dts: renesas: Add HiHope RZ/G2M Rev.3.0/4.0 board with idk-1110wr display Add support for idk-1110wr display as similarly done for Rev.2.0 Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-9-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b0990638b625f4066396051c60b2f5480823f085 Author: Lad Prabhakar Date: Wed Jun 24 14:12:06 2020 +0100 arm64: dts: renesas: hihope-rzg2-ex: Separate out lvds specific nodes into common file Separate out LVDS specific nodes into common file hihope-rzg2-ex-lvds.dtsi so that this can be re-used by RZ/G2M[N] variants. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-8-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 035329301e633c28601f333f16a73c29e3819fac Author: Lad Prabhakar Date: Wed Jun 24 14:12:05 2020 +0100 arm64: dts: renesas: Add HiHope RZ/G2M Rev.3.0/4.0 sub board support The HiHope RZ/G2M sub board sits below the HiHope RZ/G2M Rev.3.0/4.0 main board. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-7-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8c41b3d7a7abc4af05eda380ddb17b8457a3f3de Author: Lad Prabhakar Date: Wed Jun 24 14:12:04 2020 +0100 arm64: dts: renesas: Add HiHope RZ/G2M Rev.3.0/4.0 main board support Add support for HiHope RZ/G2M Rev.3.0/4.0 main board support based on r8a774a1 SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-6-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit faf1ce7f1ef65af81bd85fe9c70950571cd70b19 Author: Lad Prabhakar Date: Wed Jun 24 14:12:03 2020 +0100 arm64: dts: renesas: Add HiHope RZ/G2M[N] Rev.3.0/4.0 specific into common file Rev.3.0 and Rev.4.0 are identical and can be identified by using GP5_19 and GP5_21. Rev GP5_19 GP5_21 ============================== Rev.3.0 0 0 Rev.4.0 0 1 This patch creates hihope-rev4.dtsi file with Rev.3.0/4.0 specific changes for HopeRun HiHope RZ/G2M[N] boards. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 99167613db6e439d877131e1fbe617e4420b954f Author: Lad Prabhakar Date: Wed Jun 24 14:12:02 2020 +0100 arm64: dts: renesas: hihope-common: Separate out Rev.2.0 specific into hihope-rev2.dtsi file Separate out Rev.2.0 specific hardware changes into hihope-rev2.dtsi file so that hihope-common.dtsi can be used by all the variants for RZ/G2M[N] boards. LED node names have been updated according to Rev.4.0 schematics. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 59d8eee863ab5936e8fbb9b9b6a26e21d5078229 Author: Lad Prabhakar Date: Wed Jun 24 14:12:01 2020 +0100 arm64: dts: renesas: r8a774b1-hihope-rzg2n[-ex]: Rename HiHope RZ/G2N boards The existing DTS files for HiHope RZ/G2N boards are for Rev.2.0 version so reflect the same for the DTS file names so that the existing naming convention can be used for Rev.3.0/4.0 boards. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a80f301ea69e76f10099626986b4674c6f990a15 Author: Lad Prabhakar Date: Wed Jun 24 14:12:00 2020 +0100 arm64: dts: renesas: r8a774a1-hihope-rzg2m[-ex/-ex-idk-1110wr]: Rename HiHope RZ/G2M boards The existing DTS files for HiHope RZ/G2M boards are for Rev.2.0 version so reflect the same for the DTS file names so that the existing naming convention can be used for Rev.3.0/4.0 boards. While at it also added a comment about switch SW43 to be OFF for pciec1 to be activated. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1593004330-5039-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8bd35145975d9f9f92bfd508a6f705f9bf6c50a2 Author: Yoshihiro Shimoda Date: Thu Jun 11 20:13:41 2020 +0900 arm64: dts: renesas: r8a77961: Add IPMMU nodes Add IPMMU nodes for r8a77961 (R-Car M3-W+). Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1591874021-10209-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 4b0ee283de6c525478c98d3b3d15a4aed7d96de6 Author: Lad Prabhakar Date: Tue Jun 9 21:54:14 2020 +0100 ARM: dts: r8a7742: Add MSIOF[0123] support Add the DT nodes needed by MSIOF[0123] interfaces to the SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1591736054-568-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit a0eec15673222ef52655fc6a5da0008c501aebdc Author: Mika Westerberg Date: Wed Jun 24 22:21:03 2020 +0300 mtd: spi-nor: intel-spi: Add support for Intel Tiger Lake-H SPI serial flash Intel Tiger Lake-H has the same SPI serial flash controller as Cannon Lake. Add Tiger Lake-H PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200624192103.78770-1-mika.westerberg@linux.intel.com commit fef95b7211deb80c19ebfcdd5208ec7b80b40cbf Author: Mika Westerberg Date: Mon Jun 15 18:57:48 2020 +0300 mtd: spi-nor: intel-spi: Add support for Intel Emmitsburg SPI serial flash Intel Emmitsburg has the same SPI serial flash controller as Lewisburg. Add Emmitsburg PCI ID to the driver list of supported devices. Signed-off-by: Mika Westerberg Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200615155748.920-1-mika.westerberg@linux.intel.com commit d23bbfd7483732af08441a4c0f3d1dba3e2c1b13 Merge: 48778464bb7d3 31fb632b5d43c Author: Tudor Ambarus Date: Fri Jun 26 11:57:44 2020 +0300 Merge tag 'cadence-mtd-spi-move' into spi-nor/next mtd/spi: Move the cadence-quadspi driver to spi-mem cadence-quadspi has been converted to use the SPIMEM framework, and moved under drivers/spi/. The series was taken through the SPI tree. Merge it also in spi-nor/next to avoid conflicts during the release cycle. commit 3bda14d09dc5789a895ab02b7dcfcec19b0a65b3 Author: Linus Lüssing Date: Mon Jun 1 22:35:22 2020 +0200 batman-adv: Introduce a configurable per interface hop penalty In some setups multiple hard interfaces with similar link qualities or throughput values are available. But people have expressed the desire to consider one of them as a backup only. Some creative solutions are currently in use: Such people are configuring multiple batman-adv mesh/soft interfaces, wire them together with some veth pairs and then tune the hop penalty to achieve an effect similar to a tunable per interface hop penalty. This patch introduces a new, configurable, per hard interface hop penalty to simplify such setups. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit bccb48c89fe3c09f1cbb7c8612e31f5daa1d4541 Author: Sven Eckelmann Date: Mon Jun 1 20:13:21 2020 +0200 batman-adv: Fix typos and grammar in documentation Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 4dd5066a38c939f5cd8faa2a221acb94ff15482f Author: Sven Eckelmann Date: Wed May 27 23:29:27 2020 +0200 batman-adv: Switch mailing list subscription page The mailman installation on lists.open-mesh.org was switched from mailman2 to mailman3. The URL to the subscription webpage changed in this process. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit d528510e6dee7a1954560cb1f23438b60236fada Author: Simon Wunderlich Date: Fri Jun 26 10:35:06 2020 +0200 batman-adv: Start new development cycle Signed-off-by: Simon Wunderlich commit a184ea9f41da3a65150713656cea58dc964af454 Author: Anand Moon Date: Wed Jun 24 11:04:35 2020 +0000 ARM: dts: exynos: Align L2 cache-controller nodename with dtschema Fix dtschema warning message by changing nodename to 'cache-controller': DT_SCHEMA_FILES=Documentation/devicetree/bindings/arm/l2c2x0.yaml arch/arm/boot/dts/exynos4210-i9100.dt.yaml: l2-cache-controller@10502000: $nodename:0: 'l2-cache-controller@10502000' does not match ' ^(cache-controller|cpu)(@[0-9a-f,]+)*$' Signed-off-by: Anand Moon Signed-off-by: Krzysztof Kozlowski commit 91e81150d38842b58133ce1a5d70c88e8f1cf7c1 Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:17:40 2020 +0200 mtd: parsers: bcm63xx: simplify CFE detection Instead of trying to parse CFE version string, which is customized by some vendors, let's just check that "CFE1" was passed on argument 3. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Jonas Gorski Reviewed-by: Florian Fainelli Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200615091740.2958303-1-noltari@gmail.com commit 4551e78ad98add1f16b70cf286d5aad3ce7bcd4c Author: Kamal Dasu Date: Fri Jun 12 17:29:02 2020 -0400 mtd: rawnand: brcmnand: ECC error handling on EDU transfers Implement ECC correctable and uncorrectable error handling for EDU reads. If ECC correctable bitflips are encountered on EDU transfer, read page again using PIO. This is needed due to a NAND controller limitation where corrected data is not transferred to the DMA buffer on ECC error. This applies to ECC correctable errors that are reported by the controller hardware based on set number of bitflips threshold in the controller threshold register, bitflips below the threshold are corrected silently and are not reported by the controller hardware. Fixes: a5d53ad26a8b ("mtd: rawnand: brcmnand: Add support for flash-edu for dma transfers") Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200612212902.21347-3-kdasu.kdev@gmail.com commit bee3ab8bdd3b13faf08e5b6e0218f59b0a49fcc3 Author: Kamal Dasu Date: Fri Jun 12 17:29:01 2020 -0400 mtd: rawnand: brcmnand: Don't default to edu transfer When flash-dma is absent do not default to using flash-edu. Make sure flash-edu is enabled before setting EDU transfer function. Fixes: a5d53ad26a8b ("mtd: rawnand: brcmnand: Add support for flash-edu for dma transfers") Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200612212902.21347-2-kdasu.kdev@gmail.com commit cb272395dceef1652247dad08a50ed4153ffbd43 Author: Sivaprakash Murugesan Date: Fri Jun 12 13:28:16 2020 +0530 mtd: rawnand: qcom: set BAM mode only if not set already BAM is DMA controller on QCOM ipq platforms, BAM mode on NAND driver is set by writing BAM_MODE_EN bit on NAND_CTRL register. NAND_CTRL is an operational register and in BAM mode operational registers are read only. So, before enabling BAM mode by writing the NAND_CTRL register, check if BAM mode was already enabled by the bootloader, and enable BAM mode only if it is not enabled already. Signed-off-by: Sivaprakash Murugesan Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1591948696-16015-3-git-send-email-sivaprak@codeaurora.org commit 443440cc4a901af462239d286cd10721aa1c7dfc Author: Sivaprakash Murugesan Date: Fri Jun 12 13:28:15 2020 +0530 mtd: rawnand: qcom: avoid write to unavailable register SFLASHC_BURST_CFG is only available on older ipq NAND platforms, this register has been removed when the NAND controller got implemented in the qpic controller. Avoid writing this register on devices which are based on qpic NAND controller. Fixes: dce84760b09f ("mtd: nand: qcom: Support for IPQ8074 QPIC NAND controller") Cc: stable@vger.kernel.org Signed-off-by: Sivaprakash Murugesan Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1591948696-16015-2-git-send-email-sivaprak@codeaurora.org commit 735bf220b11fe003d4236d430db0c7131babf468 Author: Kieran Bingham Date: Tue Jun 9 13:45:57 2020 +0100 mtd: rawnand: trivial spelling The word 'descriptor' is misspelled throughout the tree. Fix it up accordingly: decriptors -> descriptors Signed-off-by: Kieran Bingham Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200609124610.3445662-5-kieran.bingham+renesas@ideasonboard.com commit df66c27101ff279dc2e8cc2ced7191029495f194 Author: Boris Brezillon Date: Wed Jun 3 17:07:46 2020 +0200 mtd: rawnand: gpio: Get rid of the legacy interface implementation Now that exec_op() is implemented, we can get rid of the legacy interface implementation. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603150746.1423257-4-boris.brezillon@collabora.com commit 22b27a675d714499848d4f389082eb0d959a7b34 Author: Boris Brezillon Date: Wed Jun 3 17:07:45 2020 +0200 mtd: rawnand: gpio: Implement exec_op() Implement exec_op() so we can get rid of the legacy interface implementation. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603150746.1423257-3-boris.brezillon@collabora.com commit b4c719685491983628155c5c8b677332709c4c6f Author: Boris Brezillon Date: Wed Jun 3 17:07:44 2020 +0200 mtd: rawnand: gpio: Inherit from nand_controller Inherit from nand_controller so we don't rely on the nand_chip.legacy.dummy_controller field. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603150746.1423257-2-boris.brezillon@collabora.com commit 8fac41ebe2895fccf4bc40347f1638fe845d4936 Author: Boris Brezillon Date: Wed Jun 3 15:49:21 2020 +0200 mtd: rawnand: fsl_upm: Get rid of the legacy interface implementation Now that the driver implements exec_op(), we can get rid of the legacy interface implementation. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603134922.1352340-10-boris.brezillon@collabora.com commit 54309d65776755bcdb9dcf3744cd764fc1e254ea Author: Boris Brezillon Date: Wed Jun 3 15:49:20 2020 +0200 mtd: rawnand: fsl_upm: Implement exec_op() Implement exec_op() so we can get rid of the legacy interface implementation. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603134922.1352340-9-boris.brezillon@collabora.com commit abc846afda664b7f229f32b40bbef738c3511801 Author: Boris Brezillon Date: Wed Jun 3 15:49:19 2020 +0200 mtd: rawnand: fsl_upm: Inherit from nand_controller Explicitly inherit from nand_controller instead of relying on the nand_chip.legacy.dummy_controller field. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603134922.1352340-8-boris.brezillon@collabora.com commit a50895bbdbd433173c698c4a2321b0f02ff19ba1 Author: Boris Brezillon Date: Wed Jun 3 15:49:18 2020 +0200 mtd: rawnand: fsl_upm: Use gpio descriptors The integer-based GPIO ids are now deprecated in favor of the GPIO desc API. The PPC platforms have already been converted to GPIOLIB, so let's use gpio descs in the NAND driver too. While at it, we use devm_gpiod_get_index_optional() so we can get rid of the manual gpio desc release done in the init error path and in the remove function. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603134922.1352340-7-boris.brezillon@collabora.com commit 58c5a0e04dfceb1c64c84553bc909d1aa39a3bd5 Author: Boris Brezillon Date: Wed Jun 3 15:49:17 2020 +0200 mtd: rawnand: fsl_upm: Use platform_get_resource() + devm_ioremap_resource() Replace the of_address_to_resource() + devm_ioremap() calls by platform_get_resource() + devm_ioremap_resource() ones which allows us to get rid of one error message since devm_ioremap_resource() already takes care of that. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603134922.1352340-6-boris.brezillon@collabora.com commit 0016648cdc45eea00bd585ccb4b2596784f60615 Author: Boris Brezillon Date: Wed Jun 3 15:49:16 2020 +0200 mtd: rawnand: fsl_upm: Use devm_kasprintf() to allocate the MTD name This simplifies the init() error path and the remove() handler. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603134922.1352340-5-boris.brezillon@collabora.com commit f760bf29f8676b67fda766d3cf1dbc2fe79829e6 Author: Boris Brezillon Date: Wed Jun 3 15:49:15 2020 +0200 mtd: rawnand: fsl_upm: Allocate the fsl_upm_nand object using devm_kzalloc() This simplifies the init error path and remove function. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603134922.1352340-4-boris.brezillon@collabora.com commit 5290833c10b9f997de16f5bd158efcde3f96db54 Author: Boris Brezillon Date: Wed Jun 3 15:49:14 2020 +0200 mtd: rawnand: fsl_upm: Get rid of the unused fsl_upm_nand.parts field fsl_upm_nand.parts is unused, let's get rid of it. Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603134922.1352340-3-boris.brezillon@collabora.com commit ccc49eff77bee2885447a032948959a134029fe3 Author: Boris Brezillon Date: Wed Jun 3 15:49:13 2020 +0200 mtd: rawnand: fsl_upm: Remove unused mtd var The mtd var in fun_wait_rnb() is now unused, let's get rid of it and fix the warning resulting from this unused var. Fixes: 50a487e7719c ("mtd: rawnand: Pass a nand_chip object to chip->dev_ready()") Signed-off-by: Boris Brezillon Reviewed-by: Miquel Raynal Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200603134922.1352340-2-boris.brezillon@collabora.com commit 35b6bcc970f759d4a86d6221d09ca28ea20467c8 Author: Miquel Raynal Date: Fri May 29 13:13:22 2020 +0200 mtd: rawnand: Allocate the interface configurations dynamically Instead of manipulating the statically allocated structure and copy timings around, allocate one at identification time and save it in the nand_chip structure once it has been initialized. All NAND chips using the same interface configuration during reset and startup, we define a helper to retrieve a single reset interface configuration object, shared across all NAND chips. We use a second pointer to always have a reference on the currently applied interface configuration, which may either point to the "best interface configuration" or to the "default reset interface configuration". Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-29-miquel.raynal@bootlin.com commit a69ad11168dca68b3f0adc6882422f4a2e2cb050 Author: Miquel Raynal Date: Fri May 29 13:13:21 2020 +0200 mtd: rawnand: Get rid of the default ONFI timing mode The ->choose_interface() hook is here for manufacturer drivers to provide a better timing interface than the default one, this field is not needed anymore. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-28-miquel.raynal@bootlin.com commit 6d469f863772946e9ebd26068f7c9a609ab128d3 Author: Rickard x Andersson Date: Fri May 29 13:13:20 2020 +0200 mtd: rawnand: toshiba: Choose the interface configuration for TH58NVG2S3HBAI4 The Kioxia/Toshiba TH58NVG2S3HBAI4 NAND memory is not ONFI compliant. The timings of the NAND chip memory are quite close to ONFI mode 4 but is breaking that spec. By providing our own set of timings, erase block read speed is increased from 6910 kiB/s to 13490 kiB/s and erase block write speed is increased from 3350 kiB/s to 4410 kiB/s. Tested on IMX6SX which has a NAND controller supporting EDO mode. Signed-off-by: Rickard x Andersson Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-27-miquel.raynal@bootlin.com commit 246a06ff13277349a09ea4dd46f516185e13d01d Author: Miquel Raynal Date: Fri May 29 13:13:19 2020 +0200 mtd: rawnand: hynix: Implement ->choose_interface_config() for H27UCG8T2ATR-BC This chip supports ONFI SDR timing mode 4, implement the new hook to advertize it. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-26-miquel.raynal@bootlin.com commit 0d0245b99552aa8c5c67d34ab7b4f0fd4d174444 Author: Miquel Raynal Date: Fri May 29 13:13:18 2020 +0200 mtd: rawnand: toshiba: Implement ->choose_interface_config() for TC58NVG0S3E This chip supports ONFI SDR timing mode 2, implement the new hook to advertize it. Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-25-miquel.raynal@bootlin.com commit 2f36bae11234b5a9ca018bc44fff0e847cacc33c Author: Miquel Raynal Date: Fri May 29 13:13:17 2020 +0200 mtd: rawnand: toshiba: Implement ->choose_interface_config() for TC58TEG5DCLTA00 Implement this hook for the tc58teg5dclta00 NAND chip and stop setting ->default_timing_mode. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-24-miquel.raynal@bootlin.com commit 26d014f0400e5ff54cc80c8329e3adbd74db1e04 Author: Miquel Raynal Date: Fri May 29 13:13:16 2020 +0200 mtd: rawnand: Add the ->choose_interface_config() hook This hook can be overloaded by NAND manufacturer drivers to propose alternative timings when not following the main standards. In this case, the manufacturer drivers is responsible for choosing the best interface configuration that fits both the controller and chip capabilities. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-23-miquel.raynal@bootlin.com commit b5b39f640c1f5621ed4ff6418e74ee35ff5d988e Author: Miquel Raynal Date: Fri May 29 13:13:15 2020 +0200 mtd: rawnand: Introduce nand_choose_best_sdr_timings() Extract the logic out of nand_choose_interface_config() to create a public helper that can be reused by manufacturer drivers. Add the possibility to provide a specific set of timings. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-22-miquel.raynal@bootlin.com commit 42a9ad050e6f1f6e909e2117e7a99f54f5336939 Author: Miquel Raynal Date: Fri May 29 13:13:14 2020 +0200 mtd: rawnand: timings: Make onfi_fill_interface_config() a void helper Warn the user if the parameters are wrong but basically it would mean there is a serious issue in the NAND core. So no need to ever check its output, let's make this helper return void. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-21-miquel.raynal@bootlin.com commit 4c46667b3d67253604ee42840917844548c86657 Author: Miquel Raynal Date: Fri May 29 13:13:13 2020 +0200 mtd: rawnand: s/data_interface/interface_config/ The name/suffix data_interface is a bit misleading in that the field or functions actually represent a configuration that can be applied by the controller/chip. Let's rename all fields/functions/hooks that are worth renaming. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal commit e0160cd41fb81fde9ee4612a7ea2dfd631de2638 Author: Miquel Raynal Date: Fri May 29 13:13:12 2020 +0200 mtd: rawnand: Hide the chip->data_interface indirection As a preparation for allocating the data interface structure dynamically (and rename it), let's avoid accessing chip->data_interface directly. Instead, we introduce a helper, nand_get_interface_config(), and use it to retrieve the current data interface configuration out of a nand_chip object. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-19-miquel.raynal@bootlin.com commit d1bfe1e31932822ee90fc6b4cdeae785f70b3650 Author: Miquel Raynal Date: Fri May 29 13:13:11 2020 +0200 mtd: rawnand: timings: Use default values for tPROG_max and tBERS_max The ONFI parameter page of a chip might define more fine grained tPROG_max and tBERS_max. When we do not have this information, we default to the highest possible values (they are maxima anyway). There is no point setting these fields at runtime, so explicitly move these defaults to the main ONFI SDR timings structure. This way, we will also be able to return a pointer to mode 0 directly when we will create a default reset configuration. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-18-miquel.raynal@bootlin.com commit 173d548b64e14d3d1f22191cc0092c47631a18db Author: Miquel Raynal Date: Fri May 29 13:13:10 2020 +0200 mtd: rawnand: timings: Avoid redefining tR_max and tCCS_min These two values are already hardcoded in the default ONFI timing structure, no need to redefine them here. Plus, we want to be able to reference timing mode 0 easily and reliably, without extra computation, so we get rid of the extra assignations. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-17-miquel.raynal@bootlin.com commit 98d6979aa898239ec2faa10467c338a808e1287e Author: Miquel Raynal Date: Fri May 29 13:13:09 2020 +0200 mtd: rawnand: timings: Add a helper to find the closest ONFI mode Vendors are allowed to provide their own set of timings. In this case, we provide a way to derive the "closest" timing mode so that, if the NAND controller does not support tweaking these parameters, it will be able to configure itself anyway. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-16-miquel.raynal@bootlin.com commit fcaab3b26d2534ec9f227810975ad220823ac578 Author: Miquel Raynal Date: Fri May 29 13:13:08 2020 +0200 mtd: rawnand: timings: onfi_fill_data_interface timing mode is unsigned Turn this argument into an unsigned int, as it cannot be signed. This also spares a check. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-15-miquel.raynal@bootlin.com commit 623c0141f560800c4fc7a7502654994633791d36 Author: Miquel Raynal Date: Fri May 29 13:13:07 2020 +0200 mtd: rawnand: timings: Provide onfi_fill_data_interface() with a data interface Right now the core uses onfi_fill_data_interface() to initialize the nand_data_interface object embedded in nand_chip, but we are about to allocate this object dynamically and let manufacturer drivers provide their own interface config. Let's patch the onfi_fill_data_interface() so it can initialize an interface config that's not the one currently attached to the nand_chip. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-14-miquel.raynal@bootlin.com commit 844cc46460095023365345bfe61a0f195f9cb66e Author: Miquel Raynal Date: Fri May 29 13:13:06 2020 +0200 mtd: rawnand: timings: Update onfi_fill_data_interface() kernel doc Describe all parameters and drop the legacy [NAND Interface] prefix. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-13-miquel.raynal@bootlin.com commit 5e179a532a9954883685748b60081e75b33f0d32 Author: Miquel Raynal Date: Fri May 29 13:13:05 2020 +0200 mtd: rawnand: Rename nand_init_data_interface() This name is a bit misleading, what we do in this helper is trying to find the best SDR timings supported by the controller and the chip. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-12-miquel.raynal@bootlin.com commit 8d69a80f541db0f58ebe92801bedbf17199738bd Author: Miquel Raynal Date: Fri May 29 13:13:04 2020 +0200 mtd: rawnand: Fix nand_setup_data_interface() description This is a copy/paste error and belongs to nand_init_data_interface() description. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-11-miquel.raynal@bootlin.com commit adcf98b2d87429dfbc114666a8be6f2b36f5d898 Author: Miquel Raynal Date: Fri May 29 13:13:03 2020 +0200 mtd: rawnand: Rename nand_has_setup_data_iface() This is really a NAND controller hook so call it nand_controller_can_setup_data_iface(), which makes much more sense. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-10-miquel.raynal@bootlin.com commit fe7f7b0846bdcc53a3d3e83fea67f988ab5145d8 Author: Miquel Raynal Date: Fri May 29 13:13:02 2020 +0200 mtd: rawnand: Use the data interface mode entry when relevant The data interface setup does not care about the default timing mode but cares about the actual timing mode at the time of the call of this helper. Use this entry instead and let chip->default_timing_mode only be used at initialization time. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-9-miquel.raynal@bootlin.com commit 6ef10df37e7dd99a5a16228fabcc3a5141585b66 Author: Miquel Raynal Date: Fri May 29 13:13:01 2020 +0200 mtd: rawnand: Compare the actual timing values Avoid relying just on the default timing mode to discriminate if the data interface must be restored. This field should only be used at initialization time by legacy chips statically defined. Do a memcmp() instead. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-8-miquel.raynal@bootlin.com commit a63674c7cfe62221e05ba73107d9e15d73ff8bbd Author: Miquel Raynal Date: Fri May 29 13:13:00 2020 +0200 mtd: rawnand: Reorganize the nand_chip structure Reorder fields in this structure and pack entries by theme: * The main descriptive structures * The data interface details * Bad block information * The device layout * Extra buffers matching the device layout * Internal values * External objects like the ECC controller, the ECC engine and a private data pointer. While at it, adapt the documentation style. I changed on purpose the description of @oob_poi which was weird. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-7-miquel.raynal@bootlin.com commit 36017af430e6b2fad0b2ee5476103706160f1379 Author: Miquel Raynal Date: Fri May 29 13:12:59 2020 +0200 mtd: rawnand: Declare the nand_manufacturer structure out of nand_chip Now that struct nand_manufacturer type is free, use it to store the nand_manufacturer_desc and the manufacturer's private data. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-6-miquel.raynal@bootlin.com commit 271de009b7c0c1c15f63491a352ab08835462977 Author: Miquel Raynal Date: Fri May 29 13:12:58 2020 +0200 mtd: rawnand: Rename the manufacturer structure It is currently called nand_manufacturer but could actually be called nand_manufacturer_desc, like its instances, so that the former name is left unused for now. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-5-miquel.raynal@bootlin.com commit 8e8b2706e15d16443b1ea61a6f994c08ec5b9486 Author: Miquel Raynal Date: Fri May 29 13:12:57 2020 +0200 mtd: rawnand: Create a nand_chip operations structure And move nand_chip hooks there. While moving entries from one structure to the other, adapt the documentation style. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-4-miquel.raynal@bootlin.com commit d1f3837a507d73746f9e2118fad20ee5e57e86cc Author: Miquel Raynal Date: Fri May 29 13:12:56 2020 +0200 mtd: rawnand: Only use u8 instead of uint8_t in nand_chip structure Mechanical change to avoid using old types. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-3-miquel.raynal@bootlin.com commit c4cabc08d09e4b107b685e08bdec8a38a91089d8 Author: Miquel Raynal Date: Fri May 29 13:12:55 2020 +0200 mtd: rawnand: Use unsigned types for nand_chip unsigned values page_shift, phys_erase_shift, bbt_erase_shift, chip_shift, pagemask, subpagesize and badblockbits are all positive values, so declare them as unsigned. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529111322.7184-2-miquel.raynal@bootlin.com commit 85f54c5588885cc3b5be4a07498dd0755de9f5cf Author: Miquel Raynal Date: Fri May 29 02:25:10 2020 +0200 mtd: nand: Rename a core structure Prepare the migration to a generic ECC engine by renaming the nand_ecc_req structure into nand_ecc_props. This structure will be the base of a wider 'nand_ecc' structure. In nand_device, these properties are still named "eccreq" even if "eccprops" might be more descriptive. This is just a transition step, this field is being replaced very soon by a much wider structure. The impact of renaming this field would be huge compared to its interest. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529002517.3546-14-miquel.raynal@bootlin.com commit 6232095cc57cd096f126fa23c227a20a1669cc4f Author: Miquel Raynal Date: Fri May 29 02:25:08 2020 +0200 mtd: nand: Drop useless 'depends on' in Kconfig Both OneNAND and raw NAND bits can't be compiled if MTD is disabled because of the if/endif logic in drivers/mtd/Kconfig. There is no need for an extra "depends on MTD" in their respective Kconfig files. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529002517.3546-12-miquel.raynal@bootlin.com commit deedeb60e812b464c18a9902984eb3f643efcae9 Author: Miquel Raynal Date: Fri May 29 02:25:07 2020 +0200 mtd: nand: Add an extra level in the Kconfig hierarchy Use an extra level in Kconfig for all NAND related entries. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529002517.3546-11-miquel.raynal@bootlin.com commit 33d226f504ed72cba3a2b42bbe2a993b3d6d9548 Author: Miquel Raynal Date: Fri May 29 02:25:06 2020 +0200 mtd: nand: Move nand_device forward declaration to the top This structure might be used earlier in this file, let's move the forward declaration at the top. Signed-off-by: Miquel Raynal Reviewed-by: Boris Brezillon Link: https://lore.kernel.org/linux-mtd/20200529002517.3546-10-miquel.raynal@bootlin.com commit ba9f316986502471b160470e5e27a5e5a2ccadaf Author: Boris Brezillon Date: Wed May 20 01:24:52 2020 +0200 dt-bindings: mtd: nand: Document the generic rb-gpios property A few drivers use this property to describe GPIO pins used to sample the NAND Ready/Busy state. Let's make it part of the generic binding doc. Signed-off-by: Boris Brezillon Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200519232454.374081-2-boris.brezillon@collabora.com commit 90d6bf481a5d0c32112925f3ecc640b9145f77d8 Author: Boris Brezillon Date: Mon May 18 19:09:12 2020 +0200 mtd: rawnand: tango: Convert the driver to exec_op() Let's convert the driver to exec_op() to have one less driver relying on the legacy interface. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200518170912.328988-1-boris.brezillon@collabora.com commit 5625f965d7644b4dc6a71d74021cfe093ad34eea Author: Ajay Singh Date: Thu Jun 25 12:37:23 2020 +0000 wilc1000: move wilc driver out of staging WILC1000 is an IEEE 802.11 b/g/n IoT link controller module. The WILC1000 connects to Microchip AVR/SMART MCUs, SMART MPUs, and other processors with minimal resource requirements with a simple SPI/SDIO-to-Wi-Fi interface. WILC1000 driver has been part of staging for few years. With contributions from the community, it has improved significantly. Full driver review has helped in achieving the current state. The details for those reviews are captured in 1 & 2. [1]. https://lore.kernel.org/linux-wireless/1537957525-11467-1-git-send-email-ajay.kathat@microchip.com/ [2]. https://lore.kernel.org/linux-wireless/1562896697-8002-1-git-send-email-ajay.kathat@microchip.com/ Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo commit 1e8110a6c347afdd8f2629815d691f0505b5023e Author: Matt Roper Date: Wed Jun 17 11:00:06 2020 -0700 drm/i915: Extend Wa_14010685332 to all ICP+ PCH's This workaround now also applies to TGL and RKL, so extend the PCH test to just capture everthing ICP and beyond. Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200617180006.4130501-1-matthew.d.roper@intel.com Reviewed-by: Matt Atwood commit 37d318d7805f25b672bfd74fc694f19a2ee9665d Author: Aleksandr Loktionov Date: Fri May 29 14:10:39 2020 -0700 i40e: Remove scheduling while atomic possibility In some occasions task held spinlock (mac_filter_hash_lock), while being rescheduled due to admin queue mutex_lock. The struct i40e_spinlock asq_spinlock, which later expands to struct mutex spinlock. Moved i40e_aq_set_vsi_multicast_promiscuous(), i40e_aq_set_vsi_unicast_promiscuous(), i40e_aq_set_vsi_mc_promisc_on_vlan(), and i40e_aq_set_vsi_uc_promisc_on_vlan() outside of atomic context. Without this patch there is a race condition, which might result in scheduling while in atomic context. The race condition is between the thread, which holds mac_filter_hash_lock, while trying to acquire an admin queue mutex and a thread, which already has said admin queue mutex. The thread, which holds spinlock, fails to acquire the mutex, which causes this thread to sleep. Signed-off-by: Arkadiusz Kubalewski Signed-off-by: Aleksandr Loktionov Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 3dbdd6c2f70a2efbc28e197e58ccad08bfba7735 Author: Aleksandr Loktionov Date: Fri May 29 13:01:22 2020 -0700 i40e: Add support for 5Gbps cards Make possible for the i40e driver to bind to the new v710 for 5GBASE-T NICs. Signed-off-by: Aleksandr Loktionov Signed-off-by: Arkadiusz Kubalewski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 34a2a3b83e2caf18ab85627f9c6a78bc0a1d1520 Author: Jeff Kirsher Date: Fri May 29 00:18:33 2020 -0700 net/intel: remove driver versions from Intel drivers As with other networking drivers, remove the unnecessary driver version from the Intel drivers. The ethtool driver information and module version will then report the kernel version instead. For ixgbe, i40e and ice drivers, the driver passes the driver version to the firmware to confirm that we are up and running. So we now pass the value of UTS_RELEASE to the firmware. This adminq call is required per the HAS document. The Device then sends an indication to the BMC that the PF driver is present. This is done using Host NC Driver Status Indication in NC-SI Get Link command or via the Host Network Controller Driver Status Change AEN. What the BMC may do with this information is implementation-dependent, but this is a standard NC-SI 1.1 command we honor per the HAS. CC: Bruce Allan CC: Jesse Brandeburg CC: Alek Loktionov CC: Kevin Liedtke CC: Aaron Rowden Signed-off-by: Jeff Kirsher Co-developed-by: Jacob Keller Tested-by: Aaron Brown commit 3a2c6ced90e18326ec64b9c4b5f68a2a127004c0 Author: Todd Fujinaka Date: Thu May 28 22:27:12 2020 -0700 i40e: Add a check to see if MFS is set A customer was chain-booting to provision his systems and one of the steps was setting MFS. MFS isn't cleared by normal warm reboots (clearing requires a GLOBR) and there was no indication of why Jumbo Frame receives were failing. Add a warning if MFS is set to anything lower than the default. Signed-off-by: Todd Fujinaka Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit fffeeddfcf57ebf652e80d27b416de7cb74e3507 Author: Piotr Kwapulinski Date: Wed May 27 14:12:04 2020 -0700 i40e: detect and log info about pre-recovery mode Detect and log information about pre-recovery mode when firmware transitions to a recovery mode. When a firmware transitions to a recovery mode it stores a number of unexpected EMP resets in one of its registers. The number of EMP resets ranging from 0x21 to 0x2A indicates that FW transitions to recovery mode. Use these values to emit log entry about transition process. Previously the pre-recovery mode may not have been detected and there was no log entry when NIC was in pre-recovery mode. Reviewed-by: Aleksandr Loktionov Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 91c534b5e32527573454f73183e479d4f51594b0 Author: Piotr Kwapulinski Date: Tue May 26 12:51:12 2020 +0200 i40e: make PF wait reset loop reliable Use jiffies to limit max waiting time for PF reset to succeed. Previous wait loop was unreliable. It required unreasonably long time to wait for PF reset after reboot when NIC was about to enter recovery mode Reviewed-by: Aleksandr Loktionov Signed-off-by: Piotr Kwapulinski Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit 3c98f9ee6bc280499cbcb6f8e42c001c3bd7caa1 Author: Jesse Brandeburg Date: Mon Jan 6 16:09:33 2020 -0800 i40e: remove unused defines Remove all the unused defines as they are just dead weight. Signed-off-by: Jesse Brandeburg Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit fe21b6c3a65ca74cc4d0909635649bea48b115b3 Author: Shiraz Saleem Date: Mon May 4 09:43:48 2020 -0700 i40e: Move client header location Move i40e_client.h to include/linux/net/intel/* since its shared between i40iw and i40e. Signed-off-by: Shiraz Saleem Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher commit d547175b54fa8104b0e2e5fd4b372cf04fa031ab Author: Al Viro Date: Sat Jun 6 21:19:58 2020 -0400 arm64: sanitize compat_ptrace_write_user() don't bother with copy_regset_from_user() (not to mention set_fs()) Signed-off-by: Al Viro commit b44f384074d09d406b9223d60905e4badadc4741 Author: Al Viro Date: Fri May 15 11:26:08 2020 -0400 arm64: get rid of copy_regset_to_user() in compat_ptrace_read_user() Signed-off-by: Al Viro commit a96dacf98884151f6a738a98aab50f35391455ca Author: Al Viro Date: Fri May 15 11:22:26 2020 -0400 arm64: take fetching compat reg out of pt_regs into a new helper Signed-off-by: Al Viro commit 8f0329211b7001a47f94702380d188295eba8ef2 Author: Al Viro Date: Fri May 22 14:21:59 2020 -0400 sparc64: get rid of odd callers of copy_regset_to_user() same as for sparc32, and that's it - no more caller of ->get() with non-zero pos. Signed-off-by: Al Viro commit 87d805331a69afdd7b3ee3d5c42760b747a4904f Author: Al Viro Date: Fri May 22 13:19:47 2020 -0400 sparc32: get rid of odd callers of copy_regset_to_user() the life is much simpler if copy_regset_to_user() (and ->get()) gets called only with pos == 0; sparc32 PTRACE_GETREGS and PTRACE_GETFPREGS are among the few things that use it to fetch pieces of regset _not_ starting at the beginning. It's actually easier to define a separate regset that would provide what we need, rather than trying to cobble that from the one PTRACE_GETREGSET uses. Extra ->get() instances do not amount to much code and once we get the conversion of ->get() to new API (dependent upon the lack of weird callers of ->get()) they'll shrink a lot, along with the rest of ->get() instances... Signed-off-by: Al Viro commit 030754c99538ef83ba6aaf1cdfe33ec4fbbc0c0f Author: Al Viro Date: Fri May 22 12:51:42 2020 -0400 sparc64: switch genregs32_get() to use of get_from_target() ... for fetching the register window from target's stack, rather than open-coding it. Signed-off-by: Al Viro commit e3fdfa37a3fabea38b01af05893050136a6cd136 Author: Al Viro Date: Sat Jun 6 20:22:32 2020 -0400 [ia64] access_uarea(): don't bother with fpregs_[gs]et() similar to previous commit... Signed-off-by: Al Viro commit 6bc4f16c6c9bed6ce5c3ab77b95397c8c88bdb66 Author: Al Viro Date: Sat Jun 6 18:46:45 2020 -0400 [ia64] access_uarea(): stop bothering with gpregs_[gs]et() We know this won't be called for child == current, so we don't need to bother with callbacks, etc. - just do unw_init_from_blocked_task(), unw_unwind_to_user() and do the payload of gpregs_[gs]et(). For one register. Which is to say, access_elf_reg(). Signed-off-by: Al Viro commit a79ca8e7b9d56c762c3cd53465fde62f8ca41acf Author: Al Viro Date: Sat Jun 6 18:00:56 2020 -0400 [ia64] regularize do_gpregs_[gs]et() now access_elf_reg() does the right thing for everything other than r0, we can simplify do_grepgs_[gs]et() Signed-off-by: Al Viro commit e2115cf3cc57fc4b3f6b0ea4f746e5ab6dc9c2c0 Author: Al Viro Date: Sat Jun 6 17:55:02 2020 -0400 [ia64] teach elf_access_reg() to handle the missing range (r16..r31) Now it's easy to make elf_access_gpreg() handle the rest of global registers (r16..r31). That gets rid of the hole in the registers elf_access_reg() can handle, which will allow to simplify its callers later in the series. Signed-off-by: Al Viro commit 4c35bf3ae948d6232f3d2c6fbf2008c341490683 Author: Al Viro Date: Sat Jun 6 17:55:02 2020 -0400 [ia64] sanitize elf_access_gpreg() The function takes the register number, finds the corresponding field of pt_regs for registers that are saved there or does the unwind for the registers that end up spilled on the kernel stack. Then it reads from or writes to the resulting location. Unfortunately, finding the required pt_regs field is done by rather horrible switch. It's microoptimized in all the wrong places - it even uses the knowledge that fields for r8..r11 follow each other in pt_regs layout, while r12..r13 are not adjacent to those, etc. All of that is to encode the mapping from register numbers to offsets + the information that r4..r7 are not to be found in pt_regs. It's deeply in nasal demon territory, at that - the games it plays with pointer arithmetics on addresses of structure members are undefined behaviour. Valid C ends up with better code in this case: just initialize a constant array with offsets of relevant pt_regs fields and we don't need that switch anymore. Signed-off-by: Al Viro commit 4dfa103e82aefe15ac525c0d4853653a774be494 Author: Al Viro Date: Sun Jun 7 11:48:25 2020 -0400 x86: kill dump_fpu() dead since the removal of aout coredump support... Signed-off-by: Al Viro commit 36c8673f90c8e244b10d1905eb08f4f61c033a25 Author: Al Viro Date: Fri Feb 21 00:11:55 2020 -0500 x86: copy_fpstate_to_sigframe(): have fpregs_soft_get() use kernel buffer ... then copy_to_user() the results Signed-off-by: Al Viro commit f94907085d5f73e87578130deeef4c744ca60ab1 Author: Gilad Ben-Yossef Date: Sun Jun 21 14:19:59 2020 +0300 crypto: ccree - remove unused field Remove yet another unused field left over from times gone by. Signed-off-by: Gilad Ben-Yossef Signed-off-by: Herbert Xu commit 520f325a597b0277dc617691267d47420334cdf4 Author: Gilad Ben-Yossef Date: Sun Jun 21 14:19:58 2020 +0300 crypto: ccree - adapt ccree essiv support to kcapi The ESSIV support in ccree was added before the kernel generic support and using a slightly different API. Brings the ccree essiv interface into compliance with kernel crypto api one. Since CryptoCell only support 256 bit AES key for ESSIV, also use a fallback if requested a smaller key size. Signed-off-by: Gilad Ben-Yossef Cc: Ard Biesheuvel Cc: Libo Wang Cc: Markus Elfring Signed-off-by: Herbert Xu commit 9bc6165d608d676f05d8bf156a2c9923ee38d05b Author: Gilad Ben-Yossef Date: Sun Jun 21 14:19:57 2020 +0300 crypto: ccree - fix resource leak on error path Fix a small resource leak on the error path of cipher processing. Signed-off-by: Gilad Ben-Yossef Fixes: 63ee04c8b491e ("crypto: ccree - add skcipher support") Cc: Markus Elfring Signed-off-by: Herbert Xu commit d095146cae11b89a1e4e531a9ff87731d0f5eadd Author: Horia Geantă Date: Fri Jun 19 16:22:53 2020 +0300 crypto: caam/qi2 - fix return code in ahash_finup_no_ctx() ahash_finup_no_ctx() returns -ENOMEM in most error cases, and this is fine for almost all of them. However, the return code provided by dpaa2_caam_enqueue() (e.g. -EIO or -EBUSY) shouldn't be overridden by -ENOMEM. Signed-off-by: Horia Geantă Signed-off-by: Herbert Xu commit 84d840e1dd90e5fc07dedbd16df0dae7b3b3ef1a Author: Colin Ian King Date: Thu Jun 18 11:16:25 2020 +0100 crypto: img-hash - remove redundant initialization of variable err The variable err is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit 7649d0093086982f3b99810a164cd571519092f1 Author: Colin Ian King Date: Thu Jun 18 11:12:29 2020 +0100 crypto: ccp - remove redundant assignment to variable ret The variable ret is being assigned with a value that is never read and it is being updated later with a new value. The assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Acked-by: Tom Lendacky Signed-off-by: Herbert Xu commit d037cb4ae20407df89491f9c2d521ac0723aa15d Author: Herbert Xu Date: Thu Jun 18 17:00:22 2020 +1000 crypto: api - Prune inclusions in crypto.h We haven't used string.h since the memcpy calls were removed so this patch removes its inclusion. The file uaccess.h isn't needed at all. However, removing it reveals that we do need to add an inclusion for refcount.h. Signed-off-by: Herbert Xu commit 5ead051780404b5cb22147170acadd1994dc3236 Author: Mikulas Patocka Date: Wed Jun 17 09:49:52 2020 -0400 crypto: hisilicon - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified There is this call chain: sec_alg_skcipher_encrypt -> sec_alg_skcipher_crypto -> sec_alg_alloc_and_calc_split_sizes -> kcalloc where we call sleeping allocator function even if CRYPTO_TFM_REQ_MAY_SLEEP was not specified. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org # v4.19+ Fixes: 915e4e8413da ("crypto: hisilicon - SEC security accelerator driver") Acked-by: Jonathan Cameron Signed-off-by: Herbert Xu commit 9e27c99104707f083dccd3b4d79762859b5a0614 Author: Mikulas Patocka Date: Wed Jun 17 09:48:56 2020 -0400 crypto: cpt - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified There is this call chain: cvm_encrypt -> cvm_enc_dec -> cptvf_do_request -> process_request -> kzalloc where we call sleeping allocator function even if CRYPTO_TFM_REQ_MAY_SLEEP was not specified. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org # v4.11+ Fixes: c694b233295b ("crypto: cavium - Add the Virtual Function driver for CPT") Signed-off-by: Herbert Xu commit 758f4879ba717909cae3da5623130199f561ae29 Author: Herbert Xu Date: Mon Jun 15 21:37:38 2020 +1000 crypto: omap-sham - Fix sparse/compiler warnings This patch fixes sparse endianness warnings as well as compiler warnings on 64-bit hosts. Signed-off-by: Herbert Xu Reviewed-by: Tero Kristo Signed-off-by: Herbert Xu commit 3da74a674191d2a5fe9d124d04826d548fb86877 Author: Herbert Xu Date: Mon Jun 15 21:36:20 2020 +1000 crypto: omap-des - Fix sparse/compiler warnings This patch fixes sparse endianness warnings as well as compiler warnings on 64-bit hosts. Signed-off-by: Herbert Xu Reviewed-by: Tero Kristo Signed-off-by: Herbert Xu commit 6ec5e8b5e7148c3ece1850dffd62a493dbfc2d22 Author: Zhangfei Gao Date: Mon Jun 15 11:38:37 2020 +0800 crypto: hisilicon - fix strncpy warning with strscpy Use strscpy to fix the warning warning: 'strncpy' specified bound 64 equals destination size Reported-by: kernel test robot Signed-off-by: Zhangfei Gao Signed-off-by: Herbert Xu commit b980d477de2d8393f289fee982cd86ee44f5e37c Author: Abhishek Pandit-Subedi Date: Thu Jun 25 16:26:27 2020 -0700 Bluetooth: btusb: Comment on unbalanced pm reference Add a comment clarifying that a PM reference in btusb_qca_cmd_timeout is not unbalanced because it results in a device reset. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit f3bdc62fd82ed93dbe4d049eacba310de7eb2a6a Author: Jan Kara Date: Wed Jun 17 15:58:23 2020 +0200 blktrace: Provide event for request merging Currently blk-mq does not report any event when two requests get merged in the elevator. This then results in difficult to understand sequence of events like: ... 8,0 34 1579 0.608765271 2718 I WS 215023504 + 40 [dbench] 8,0 34 1584 0.609184613 2719 A WS 215023544 + 56 <- (8,4) 2160568 8,0 34 1585 0.609184850 2719 Q WS 215023544 + 56 [dbench] 8,0 34 1586 0.609188524 2719 G WS 215023544 + 56 [dbench] 8,0 3 602 0.609684162 773 D WS 215023504 + 96 [kworker/3:1H] 8,0 34 1591 0.609843593 0 C WS 215023504 + 96 [0] and you can only guess (after quite some headscratching since the above excerpt is intermixed with a lot of other IO) that request 215023544+56 got merged to request 215023504+40. Provide proper event for request merging like we used to do in the legacy block layer. Signed-off-by: Jan Kara Signed-off-by: Jens Axboe commit 7bed14551659875e1cd23a7c0266394a29a773b3 Merge: b8392808eb3fc 4a21185cda0fb Author: David S. Miller Date: Thu Jun 25 19:29:51 2020 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Minor overlapping changes in xfrm_device.c, between the double ESP trailing bug fix setting the XFRM_INIT flag and the changes in net-next preparing for bonding encryption support. Signed-off-by: David S. Miller commit b8392808eb3fc28e523e28cb258c81ca246deb9b Author: Kevin Darbyshire-Bryant Date: Thu Jun 25 22:18:00 2020 +0200 sch_cake: add RFC 8622 LE PHB support to CAKE diffserv handling Change tin mapping on diffserv3, 4 & 8 for LE PHB support, in essence making LE a member of the Bulk tin. Bulk has the least priority and minimum of 1/16th total bandwidth in the face of higher priority traffic. NB: Diffserv 3 & 4 swap tin 0 & 1 priorities from the default order as found in diffserv8, in case anyone is wondering why it looks a bit odd. Signed-off-by: Kevin Darbyshire-Bryant [ reword commit message slightly ] Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 7d22bc4530e598899f73e0ab8acc2f6b9a804572 Merge: d0a45b5ca508b b4368d2b5b96f Author: David S. Miller Date: Thu Jun 25 16:22:11 2020 -0700 Merge branch 'net-phy-mscc-multiple-improvements' Antoine Tenart says: ==================== net: phy: mscc: multiple improvements This series contains various improvements to the MSCC PHY driver, fixing sparse and smatch warnings, using functions provided by the PHY core, and improving the driver consistency and maintenance. I don't think any of those improvements and fixes is worth backporting to stable trees. ==================== Signed-off-by: David S. Miller commit b4368d2b5b96f01c9b0780096dc2306d78c3e72f Author: Antoine Tenart Date: Thu Jun 25 17:42:11 2020 +0200 net: phy: mscc: improve vsc8514/8584_config_init consistency All PHY read and write return values are checked for errors in vsc8514_config_init and vsc8584_config_init, except for one. Fix this. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit d4a76dc74dff76c4d7f193806f336899fb8e5016 Author: Antoine Tenart Date: Thu Jun 25 17:42:10 2020 +0200 net: phy: mscc: remove useless page configuration in the config init In the middle of vsc8584_config_init and vsc8514_config_init, the page is set to 'standard'. This is the default value, and the page isn't set to another value before. Those pages configuration can be safely removed. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 6119dda34e5d0821959e37641b287576826b6378 Author: Antoine Tenart Date: Thu Jun 25 17:42:09 2020 +0200 net: phy: mscc: restore the base page in vsc8514/8584_config_init In the vsc8584_config_init and vsc8514_config_init, the base page is set to 'GPIO', configuration is done, and the page is never explicitly restored to the standard page. No bug was triggered as it turns out helpers called in those config_init functions do modify the base page, and set it back to standard. But that is dangerous and any modification to those functions would introduce bugs. This patch fixes this, to improve maintenance, by restoring the base page to 'standard' once 'GPIO' accesses are completed. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit d9608aacd3c0272a5a363e5002c7102ddd4529b6 Author: Antoine Tenart Date: Thu Jun 25 17:42:08 2020 +0200 net: phy: mscc: do not access the MDIO bus lock directly This patch improves the MSCC driver by using the provided phy_lock_mdio_bus and phy_unlock_mdio_bus helpers instead of locking and unlocking the MDIO bus lock directly. The patch is only cosmetic but should improve maintenance and consistency. Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit b9dccf91b34a1d1b3c4e1d36782701288697a2fb Author: Antoine Tenart Date: Thu Jun 25 17:42:07 2020 +0200 net: phy: mscc: ptp: fix a typo in a comment This patch fixes a typo in a comment, s/Ths/This/. The patch is cosmetic only. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit b487032ee683fcff08e070d93080de02a4506695 Author: Antoine Tenart Date: Thu Jun 25 17:42:06 2020 +0200 net: phy: mscc: ptp: fix a smatch error The following error was reported by smatch: vsc85xx_ts_read_csr() error: uninitialized symbol 'blk_hw'. In practice this is very unlikely, as all the block identifiers given to this functions are handled and described in an enum. The smatch error is fixed by doing what is already done in vsc85xx_ts_write_csr: using the "PROCESSOR" block by default. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit b16a213b4d68022011ddaabd583c855d7e5ec5b2 Author: Antoine Tenart Date: Thu Jun 25 17:42:05 2020 +0200 net: phy: mscc: fix a possible double unlock On vsc8584_ptp_init failure we jump to the 'err' label, which unlocks the MDIO bus lock. But vsc8584_ptp_init isn't called with the MDIO bus lock taken, which could result in a double unlock. Fix this. Fixes: ab2bf9339357 ("net: phy: mscc: 1588 block initialization") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 853bede848733dee1ce41ecced775d426fe245fa Author: Antoine Tenart Date: Thu Jun 25 17:42:04 2020 +0200 net: phy: mscc: macsec: fix sparse warnings This patch fixes the following sparse warnings when building MACsec support in the MSCC PHY driver. mscc_macsec.c:393:42: warning: cast from restricted sci_t mscc_macsec.c:395:42: warning: restricted sci_t degrades to integer mscc_macsec.c:402:42: warning: restricted __be16 degrades to integer mscc_macsec.c:608:34: warning: cast from restricted sci_t mscc_macsec.c:610:34: warning: restricted sci_t degrades to integer Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d0a45b5ca508bf7e18155abb2093ec60db995b9a Merge: 17604218c87b3 8095295292b56 Author: David S. Miller Date: Thu Jun 25 16:05:21 2020 -0700 Merge branch 'RGMII-Internal-delay-common-property' Dan Murphy says: ==================== RGMII Internal delay common property The RGMII internal delay is a common setting found in most RGMII capable PHY devices. It was found that many vendor specific device tree properties exist to do the same function. This creates a common property to be used for PHY's that have internal delays for the Rx and Tx paths. If the internal delay is tunable then the caller needs to pass the internal delay array and the return will be the index in the array that was found in the firmware node. If the internal delay is fixed then the caller only needs to indicate which delay to return. There is no need for a fixed delay to add device properties since the value is not configurable. Per the ethernet-controller.yaml the interface type indicates that the PHY should provide the delay. This series contains examples of both a configurable delay and a fixed delay. ==================== Signed-off-by: David S. Miller commit 8095295292b564583bb5bee5ba69924c2fd40434 Author: Dan Murphy Date: Wed Jun 24 07:16:05 2020 -0500 net: phy: DP83822: Add setting the fixed internal delay The DP83822 can be configured to use the RGMII interface. There are independent fixed 3.5ns clock shift (aka internal delay) for the TX and RX paths. This allow either one to be set if the MII interface is RGMII and the value is set in the firmware node. Signed-off-by: Dan Murphy Signed-off-by: David S. Miller commit 736b25afe28447967390a4244c10f156b43c9006 Author: Dan Murphy Date: Wed Jun 24 07:16:04 2020 -0500 net: dp83869: Add RGMII internal delay configuration Add RGMII internal delay configuration for Rx and Tx. Signed-off-by: Dan Murphy Signed-off-by: David S. Miller commit 2fb305c37d5b78ef5d849b260d9ef997ad1d1281 Author: Dan Murphy Date: Wed Jun 24 07:16:03 2020 -0500 dt-bindings: net: Add RGMII internal delay for DP83869 Add the internal delay values into the header and update the binding with the internal delay properties. Signed-off-by: Dan Murphy Signed-off-by: David S. Miller commit 92252eec913b2dd5e7b5de11ea3efa2e64d65cf4 Author: Dan Murphy Date: Wed Jun 24 07:16:02 2020 -0500 net: phy: Add a helper to return the index for of the internal delay Add a helper function that will return the index in the array for the passed in internal delay value. The helper requires the array, size and delay value. The helper will then return the index for the exact match or return the index for the index to the closest smaller value. Signed-off-by: Dan Murphy Signed-off-by: David S. Miller commit 9150069bf5fc0e86cc8b79495bfbb98d2b642ba0 Author: Dan Murphy Date: Wed Jun 24 07:16:01 2020 -0500 dt-bindings: net: Add tx and rx internal delays tx-internal-delays and rx-internal-delays are a common setting for RGMII capable devices. These properties are used when the phy-mode or phy-controller is set to rgmii-id, rgmii-rxid or rgmii-txid. These modes indicate to the controller that the PHY will add the internal delay for the connection. Signed-off-by: Dan Murphy Signed-off-by: David S. Miller commit 17604218c87b30982d6e426b85979652a5cde7ea Merge: 575691b309291 05e190467d82f Author: David S. Miller Date: Thu Jun 25 16:03:39 2020 -0700 Merge branch 'dpaa2-eth-small-updates' Ioana Ciornei says: ==================== dpaa2-eth: small updates This patch set adds some updates to the dpaa2-eth driver: trimming of the frame queue debugfs counters, cleanup of the remaining sparse warnings and some other small fixes such as a recursive header include. ==================== Signed-off-by: David S. Miller commit 05e190467d82fea26531430a15f9f66b4dee29c2 Author: Ioana Ciornei Date: Wed Jun 24 14:34:21 2020 +0300 dpaa2-eth: fix misspelled function parameters in dpni_[set/get]_taildrop Two of the function parameters (qtype and index) were misspelled in the associated descriptions of dpni_[set/get]_taildrop which led to sparse warnings. Fix this by using the exact same names as present in the function definition. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit cef5820b7f911eb9bd6c04bcd7ef6107e671640c Author: Ioana Ciornei Date: Wed Jun 24 14:34:20 2020 +0300 dpaa2-eth: fix recursive header include The dpaa2-eth.h header file includes dpaa2-eth-trace.h which includes back dpaa2-eth leading to a recursion in the include path. Fix this by removing the include of dpaa2-eth.h in the trace header. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 0e5ad75b02d9341eb9ca22627247f9a02cc20d6f Author: Ioana Ciornei Date: Wed Jun 24 14:34:19 2020 +0300 dpaa2-eth: fix condition for number of buffer acquire retries We should keep retrying to acquire buffers through the software portals as long as the function returns -EBUSY and the number of retries is __below__ DPAA2_ETH_SWP_BUSY_RETRIES. Fixes: ef17bd7cc0c8 ("dpaa2-eth: Avoid unbounded while loops") Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 37fbbdda63538f1bcebd566b75fa1865d30b6b19 Author: Ioana Ciornei Date: Wed Jun 24 14:34:18 2020 +0300 dpaa2-eth: check the result of skb_to_sgvec() Before passing the result of skb_to_sgvec() to dma_map_sg() check if any error was returned. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 0da1e28f97352fb8aadde4d66774373bedd50408 Author: Ioana Radulescu Date: Wed Jun 24 14:34:17 2020 +0300 dpaa2-eth: trim debugfs FQ stats With the addition of multiple traffic classes support, the number of available frame queues grew significantly, overly inflating the debugfs FQ statistics entry. Update it to only show the queues which are actually in use (i.e. have a non-zero frame counter). Signed-off-by: Ioana Radulescu Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 575691b309291c5163cca5877ec159120a68774d Author: Russell King Date: Wed Jun 24 12:30:04 2020 +0100 net: phylink: only restart AN if the link mode is using in-band AN If we are not using in-band autonegotiation, there is no point passing the request to restart autonegotiation on to the driver. Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit a5440cbecd99e2564504572b39bc70ea7addfc25 Author: Russell King Date: Wed Jun 24 11:21:32 2020 +0100 net: dsa/ar9331: convert to mac_link_up() Convert the ar9331 DSA driver to use the finalised link parameters in mac_link_up() rather than the parameters in mac_config(). Tested-by: Oleksij Rempel Signed-off-by: Russell King Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 41752663b410c6265e24ff0570350b0b05ecdafe Author: Bhanuprakash Modem Date: Mon Jun 22 19:55:18 2020 +0530 drm/debug: Expose connector VRR monitor range via debugfs [Why] It's useful to know the min and max vrr range for IGT testing. [How] Expose the min and max vfreq for the connector via a debugfs file on the connector, "vrr_range". Example usage: cat /sys/kernel/debug/dri/0/DP-1/vrr_range v2: * Fix the typo in max_vfreq (Manasi) * Change the name of node to i915_vrr_info so we can add other vrr info for more debug info (Manasi) * Change the VRR capable to display Yes or No (Manasi) * Fix indentation checkpatch errors (Manasi) v3: * Remove the unnecessary debug print (Manasi) v4: * Rebase v5: * Rename to vrr_range to match AMD debugfs v6: * Rebase (manasi) v7: * Fix cmpilation due to rebase v8: * Move debugfs node creation logic to DRM (Emil) * Remove AMD specific logic (Emil) v9: * Separate patch for removal of AMD specific logic (Manasi) Signed-off-by: Bhanuprakash Modem Signed-off-by: Manasi Navare Cc: Jani Nikula Cc: Ville Syrjälä Cc: Harry Wentland CC: Emil Velikov Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200622142519.16214-3-bhanuprakash.modem@intel.com commit 3625a1f5bf6ba47fbd903be1d63dade9a48e8e72 Author: Ville Syrjälä Date: Tue May 12 20:41:44 2020 +0300 drm/i915: Fix DP_TRAIN_MAX_{PRE_EMPHASIS,SWING}_REACHED handling The DP spec says: "The transmitter shall support at least three levels of voltage swing (Levels 0, 1, and 2). If only three levels of voltage swing are supported (VOLTAGE SWING SET field (bits 1:0) are programmed to 10 (Level 2)), this bit shall be set to 1, and cleared in all other cases. If all four levels of voltage swing are supported (VOLTAGE SWING SET field (bits 1:0) are programmed to 11 (Level 3)), this bit shall be set to 1,and cleared in all other cases." Let's follow that exactly instead of the current apporach where we can set those also for vswing/preemph levels 0 or 1 (or 2 when the platform max is 3). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200512174145.3186-7-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 6d29302652587001038c8f5ac0e0c7fa6592bbbc Merge: c6d5d843d9b6e efbb974d8ead5 Author: David S. Miller Date: Thu Jun 25 14:04:51 2020 -0700 Merge tag 'mlx5-updates-2020-06-23' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 updates 2020-06-23 This series adds misc cleanup and updates to mlx5 driver. 1) Misc updates and cleanup 2) Use RCU instead of spinlock for vxlan table v1->v2: - Removed unnecessary Fixes Tags v2->v3: - Drop "macro undefine" patch, it has no value v3->v4: - Drop the Relaxed ordering patch. ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit c6d5d843d9b6e8dca3768250970f0d0a1e3d4fb0 Author: Russell King Date: Wed Jun 24 11:06:54 2020 +0100 net: phylink: add phylink_speed_(up|down) interface Add an interface for the phy_speed_(up|down) functions when a driver makes use of phylink. These pass the call through to phylib when we have a normal PHY attached (i.o.w., not a PHY on a SFP module.) Signed-off-by: Russell King Signed-off-by: David S. Miller commit efbb974d8ead5106787144219cb240fdcebccc16 Author: Saeed Mahameed Date: Fri May 15 17:11:29 2020 -0700 net/mlx5e: vxlan: Return bool instead of opaque ptr in port_lookup() struct mlx5_vxlan_port is not exposed to the outside callers, it is redundant to return a pointer to it from mlx5_vxlan_port_lookup(), to be only used as a boolean, so just return a boolean. Signed-off-by: Saeed Mahameed commit 7a64ca862ac96d5e78a59bd57549034134ee0949 Author: Saeed Mahameed Date: Fri May 15 17:09:05 2020 -0700 net/mlx5e: vxlan: Use RCU for vxlan table lookup Remove the spinlock protecting the vxlan table and use RCU instead. This will improve performance as it will eliminate contention on data path cores. Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Saeed Mahameed Reviewed-by: Maxim Mikityanskiy commit 185901ceebbd4f8b11db478fd3a30eb66e5d591d Author: Vlad Buslov Date: Wed Jun 10 18:09:13 2020 +0300 net/mlx5e: Move TC-specific function definitions into MLX5_CLS_ACT en_tc.h header file declares several TC-specific functions in CONFIG_MLX5_ESWITCH block even though those functions are only compiled when CONFIG_MLX5_CLS_ACT is set, which is a recent change. Move them to proper block. Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 8fab0175aabcd28789e51df7e1c9222f9efe1532 Author: Alaa Hleihel Date: Tue Jun 2 12:09:21 2020 +0300 net/mlx5e: Move including net/arp.h from en_rep.c to rep/neigh.c After the cited commit, the header net/arp.h is no longer used in en_rep.c. So, move it to the new file rep/neigh.c that uses it now. Signed-off-by: Alaa Hleihel Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit d39c9885b65740e737db8303ed3d344f2f6ceb35 Author: Maxim Mikityanskiy Date: Thu Jun 11 15:48:45 2020 +0300 net/mlx5e: Remove unused mlx5e_xsk_first_unused_channel mlx5e_xsk_first_unused_channel is a leftover from old versions of the first XSK commit, and it was never used. Remove it. Fixes: db05815b36cb ("net/mlx5e: Add XSK zero-copy support") Signed-off-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 360000b26e37a75b3000bf0585b263809d96ffd3 Author: Denis Efremov Date: Fri Jun 5 22:22:35 2020 +0300 net/mlx5: Use kfree(ft->g) in arfs_create_groups() Use kfree() instead of kvfree() on ft->g in arfs_create_groups() because the memory is allocated with kcalloc(). Signed-off-by: Denis Efremov Signed-off-by: Saeed Mahameed commit 39797f1c53f5323179d61692bdd4c80de21d540e Author: Hu Haowen Date: Fri Apr 3 12:26:59 2020 +0800 net/mlx5: FWTrace: Add missing space Missing space at the end of a comment line, add it. Signed-off-by: Hu Haowen Signed-off-by: Saeed Mahameed commit 04dfa7057bd189780576d73ce360c874ed507e08 Author: Parav Pandit Date: Thu May 28 04:48:27 2020 -0500 net/mlx5: Avoid eswitch header inclusion in fs core layer Flow steering core layer is independent of the eswitch layer. Hence avoid fs_core dependency on eswitch. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 4b88b9ce722f19f8743de531cb3c510f36c6f970 Author: Vaibhav Gupta Date: Thu Jun 25 17:40:43 2020 +0530 ptp_pch: use generic power management With legacy PM, drivers themselves were responsible for managing the device's power states and takes care of register states. After upgrading to the generic structure, PCI core will take care of required tasks and drivers should do only device-specific operations. In the case of ptp_pch, after removing PCI helper functions, .suspend() and .resume() became empty-body functions. Hence, define them NULL and use dev_pm_ops. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 0c32f8aa0711af177248c2cba9cb105f18e0c9bb Author: Lee Jones Date: Thu Jun 25 17:36:14 2020 +0100 regulator: max14577-regulator: Demote kerneldoc header to standard comment Nothing about this comment identifies it as a kerneldoc header. It's missing all of it's function argument descriptions and the correct function header. Fixes the following W=1 warning(s): drivers/regulator/max14577-regulator.c:166: warning: Function parameter or member 'max14577' not described in 'max14577_get_regma drivers/regulator/max14577-regulator.c:166: warning: Function parameter or member 'reg_id' not described in 'max14577_get_regmap' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200625163614.4001403-11-lee.jones@linaro.org Signed-off-by: Mark Brown commit 7b804ce0c2e0bbf77b3a1d4b457520145822c496 Author: Lee Jones Date: Thu Jun 25 17:36:12 2020 +0100 regulator: cpcap-regulator: Demote kerneldoc header to standard comment Nothing about this comment identifies it as a kerneldoc header. They're missing all of their struct's property descriptions and the correct 'struct *' header. Fixes the following W=1 warning(s): drivers/regulator/cpcap-regulator.c:99: warning: cannot understand function prototype: 'struct cpcap_regulator ' drivers/regulator/cpcap-regulator.c:337: warning: cannot understand function prototype: 'const struct cpcap_regulator omap4_regulators[] = ' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200625163614.4001403-9-lee.jones@linaro.org Signed-off-by: Mark Brown commit b89a5effb3345a484584cc2b090af62e1ecb0871 Author: Lee Jones Date: Thu Jun 25 17:36:11 2020 +0100 regulator: cpcap-regulator: Remove declared and set, but never used variable 'ignore' It's okay to not check the return value that you're not conserned about, however it is not okay to assign a variable and not check or use the result. Fixes W=1 warnings(s): drivers/regulator/cpcap-regulator.c:172:13: warning: variable ‘ignore’ set but not used [-Wunused-but-set-variable] 172 | int error, ignore; | ^~~~~~ drivers/regulator/cpcap-regulator.c: In function ‘cpcap_regulator_disable’: drivers/regulator/cpcap-regulator.c:196:13: warning: variable ‘ignore’ set but not used [-Wunused-but-set-variable] 196 | int error, ignore; | ^~~~~~ Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200625163614.4001403-8-lee.jones@linaro.org Signed-off-by: Mark Brown commit 2f5add1e42165c7eb7e4367e1180ae76aa13d394 Author: Lee Jones Date: Thu Jun 25 17:36:10 2020 +0100 regulator: wm8350-regulator: Repair odd formatting in documentation Kerneldoc expects function arguments to be in the format '@.*:'. If this format is not followed the kerneldoc tooling/parsers/validators get confused. Fixes the following W=1 warning(s): drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'wm8350' not described in 'wm8350_register_led' drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'lednum' not described in 'wm8350_register_led' drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'dcdc' not described in 'wm8350_register_led' drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'isink' not described in 'wm8350_register_led' drivers/regulator/wm8350-regulator.c:1234: warning: Function parameter or member 'pdata' not described in 'wm8350_register_led' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200625163614.4001403-7-lee.jones@linaro.org Signed-off-by: Mark Brown commit aeee55b76bfd100d2612f50d2f9526d760ee2e37 Author: Lee Jones Date: Thu Jun 25 17:36:09 2020 +0100 regulator: ab8500: Remove unused embedded struct expand_register Used primarily for the AB8540 which lost support in early 2018. It is now deemed safe to remove this legacy data structure. Also fixes W=1 issue: drivers/regulator/ab8500.c:88: warning: Function parameter or member 'expand_register' not described in 'ab8500_regulator_info' Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200625163614.4001403-6-lee.jones@linaro.org Signed-off-by: Mark Brown commit d3cc3dfcc20e72d537550dbeebbe4a8faa7c2606 Author: Lee Jones Date: Thu Jun 25 17:36:08 2020 +0100 regulator: dbx500-prcmu: Remove unused function dbx500_regulator_testcase() There isn't any code present within the current kernel to override this 'weak' function. Besides returning '0', which is never checked anyway, the whole function appears to be superfluous. Consequently fixes W=1 warning: drivers/regulator/dbx500-prcmu.c:113:27: warning: no previous prototype for ‘dbx500_regulator_testcase’ [-Wmissing-prototypes] 113 | int __attribute__((weak)) dbx500_regulator_testcase( | ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200625163614.4001403-5-lee.jones@linaro.org Signed-off-by: Mark Brown commit da6690767cbd344998f36081815c85f3d467e78c Author: Lee Jones Date: Thu Jun 25 17:36:05 2020 +0100 regulator: consumer: Supply missing prototypes for 3 core functions regulator_suspend_enable(), regulator_suspend_disable() and regulator_set_suspend_voltage() are all exported members of the API, but are all missing prototypes. Fixes the following W=1 warning(s): drivers/regulator/core.c:3805:5: warning: no previous prototype for ‘regulator_suspend_enable’ [-Wmissing-prototypes] 3805 | int regulator_suspend_enable(struct regulator_dev *rdev, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/core.c:3812:5: warning: no previous prototype for ‘regulator_suspend_disable’ [-Wmissing-prototypes] 3812 | int regulator_suspend_disable(struct regulator_dev *rdev, | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/core.c:3851:5: warning: no previous prototype for ‘regulator_set_suspend_voltage’ [-Wmissing-prototypes] 3851 | int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200625163614.4001403-2-lee.jones@linaro.org Signed-off-by: Mark Brown commit 72ac4a4bef48e67bb26bc5a01d68c8163def013d Author: Tzung-Bi Shih Date: Thu Jun 25 23:35:43 2020 +0800 ASoC: rt1015: add missing header inclusion To fix compilation error: error: implicit declaration of function 'ACPI_PTR' [-Werror,-Wimplicit-function-declaration] .acpi_match_table = ACPI_PTR(rt1015_acpi_match), ^ Adds the missing header "acpi.h" inclusion and sorts in alphabetical. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200625153543.85039-4-tzungbi@google.com Signed-off-by: Mark Brown commit 3d62ef4280a377bb2ccaee4e8f6c5093f5b8f9d4 Author: Tzung-Bi Shih Date: Thu Jun 25 23:35:42 2020 +0800 ASoC: dapm: declare missing structure prototypes To fix compilation warnings: - struct 'snd_soc_pcm_runtime' declared inside parameter list will not be visible outside of this definition or declaration - struct 'soc_enum' declared inside parameter list will not be visible outside of this definition or declaration Declares the missing structure prototypes. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200625153543.85039-3-tzungbi@google.com Signed-off-by: Mark Brown commit 10e834099d38dd2c02bf2bd5feaa3997cfcf139f Author: Tzung-Bi Shih Date: Thu Jun 25 23:35:41 2020 +0800 ASoC: core: move definition of enum snd_soc_bias_level To fix compilation error: - error: field 'XXX' has incomplete type Moves definition of enum snd_soc_bias_level from soc.h to soc-dapm.h. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200625153543.85039-2-tzungbi@google.com Signed-off-by: Mark Brown commit 6f81e520b2906258a063f09b8d1dd9d0cc6a3172 Author: Dan Murphy Date: Wed Jun 24 12:49:26 2020 -0500 ASoC: tas2562: Fix shut-down gpio property Fix the shut-down gpio property to be shut-down-gpio and fix the example. Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200624174932.9604-2-dmurphy@ti.com Signed-off-by: Mark Brown commit c8294da2ed0be726bb87019eba3a6367c7f1c922 Author: Dan Murphy Date: Wed Jun 24 12:49:28 2020 -0500 ASoC: tas2562: Fix format issue for extra space before a comma Fix the issue found that there is an extra space before a comma in the volume control. Fixes: bf726b1c86f2c ("ASoC: tas2562: Add support for digital volume control") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200624174932.9604-4-dmurphy@ti.com Signed-off-by: Mark Brown commit bc07b54459cbb3a572a78b5c200ff79ef11b8158 Author: Dan Murphy Date: Wed Jun 24 12:49:27 2020 -0500 ASoC: tas2562: Update shutdown GPIO property Update the shutdown GPIO property to be shutdown from shut-down. Fixes: c173dba44c2d2 ("ASoC: tas2562: Introduce the TAS2562 amplifier") Signed-off-by: Dan Murphy Link: https://lore.kernel.org/r/20200624174932.9604-3-dmurphy@ti.com Signed-off-by: Mark Brown commit 0f69403d2535ffc7200a8414cf3ca66a49b0d741 Merge: 580fbdc513682 0a19b068acc47 Author: Jani Nikula Date: Thu Jun 25 18:05:03 2020 +0300 Merge drm/drm-next into drm-intel-next-queued Catch up with upstream, in particular to get c1e8d7c6a7a6 ("mmap locking API: convert mmap_sem comments"). Signed-off-by: Jani Nikula commit 92cd1b5d65f5c67147c7da39a3c2ad7e6ff81027 Author: Marek Szyprowski Date: Fri Jun 19 12:36:30 2020 +0200 staging: ion: fix common struct sg_table related issues The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_map_sg(). struct sg_table is a common structure used for describing a non-contiguous memory buffer, used commonly in the DRM and graphics subsystems. It consists of a scatterlist with memory pages and DMA addresses (sgl entry), as well as the number of scatterlist entries: CPU pages (orig_nents entry) and DMA mapped pages (nents entry). It turned out that it was a common mistake to misuse nents and orig_nents entries, calling DMA-mapping functions with a wrong number of entries or ignoring the number of mapped entries returned by the dma_map_sg() function. To avoid such issues, lets use a common dma-mapping wrappers operating directly on the struct sg_table objects and use scatterlist page iterators where possible. This, almost always, hides references to the nents and orig_nents entries, making the code robust, easier to follow and copy/paste safe. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200619103636.11974-31-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman commit 8c589e1794a31e9a381916b0280260ab601e4d6e Author: Dave Stevenson Date: Tue Jun 23 18:41:48 2020 +0200 staging: mmal-vchiq: Allocate and free components as required The existing code assumed that there would only ever be 4 components, and never freed the entries once used. Allow arbitrary creation and destruction of components. Signed-off-by: Dave Stevenson Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200623164235.29566-3-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit b18ee53ad297264a79cf4ea566663f20786b6455 Author: Jacopo Mondi Date: Tue Jun 23 18:41:47 2020 +0200 staging: bcm2835: Break MMAL support out from camera The BCM2835 camera host is currently the only component that uses the VCHIQ MMAL interface. This will soon change with the upporting of BCM2835 ISP, which make use of the same interface. Break VCHIQ MMAL interface support out from camera host directory to make it possible for the ISP driver to use it as well. The only modification to the existing mmal code is the introduction of EXPORT_SYMBOL() for symbols required by bcm2835-camera and the addition of the module author and licenses. Signed-off-by: Jacopo Mondi Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20200623164235.29566-2-nsaenzjulienne@suse.de Signed-off-by: Greg Kroah-Hartman commit 9666e8f83e527ded3e9ad4bd5a9dc14e21bdc7a9 Author: Garrit Franke Date: Thu Jun 25 11:32:37 2020 +0200 trivial: staging: vc04_services: replace bitshift with BIT macro Cleans up some bitshifts by using the BIT macro. Signed-off-by: Garrit Franke Reviewed-by: Dan Carpenter Link: https://lore.kernel.org/r/20200625093237.2640-1-garritfranke@gmail.com Signed-off-by: Greg Kroah-Hartman commit 16d37ee3d2b1c30052ba5ebb69556040fc174061 Author: Tobias Klauser Date: Wed Jun 24 16:31:54 2020 +0200 tools, bpftool: Define attach_type_name array only once Define attach_type_name in common.c instead of main.h so it is only defined once. This leads to a slight decrease in the binary size of bpftool. Before: text data bss dec hex filename 399024 11168 1573160 1983352 1e4378 bpftool After: text data bss dec hex filename 398256 10880 1573160 1982296 1e3f58 bpftool Signed-off-by: Tobias Klauser Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200624143154.13145-1-tklauser@distanz.ch commit 9023497d8746d355bac8ddbc65797a4f553726fd Author: Tobias Klauser Date: Wed Jun 24 16:31:24 2020 +0200 tools, bpftool: Define prog_type_name array only once Define prog_type_name in prog.c instead of main.h so it is only defined once. This leads to a slight decrease in the binary size of bpftool. Before: text data bss dec hex filename 401032 11936 1573160 1986128 1e4e50 bpftool After: text data bss dec hex filename 399024 11168 1573160 1983352 1e4378 bpftool Signed-off-by: Tobias Klauser Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200624143124.12914-1-tklauser@distanz.ch commit e4463e49e29f43eecec86e2e2b2e2ab4feb7d867 Author: Colin Ian King Date: Wed Jun 24 17:39:57 2020 +0100 staging: most: avoid null pointer dereference when iface is null In the case where the pointer iface is null then the reporting of this error will dereference iface when printing an error message causing which is not ideal. Since the majority of callers to most_register_interface report an error when -EINVAL is returned a simple fix is to just remove the error message, I doubt it will be missed. Addresses-Coverity: ("Dereference after null check") Fixes: 57562a72414c ("Staging: most: add MOST driver's core module") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200624163957.11676-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 75d0bf8762640728316c3bbce1aba87b1cc3428f Author: Christian Gromm Date: Tue Jun 23 17:07:35 2020 +0200 staging: most: sound: remove overcautious argument checking The interface pointer passed to a component API function cannot be NULL. This patch removes the unnecessary sanity check of this argument. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592924855-25569-6-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 749a14343ecbbe1c8c5d8000301553aa815cce7d Author: Christian Gromm Date: Tue Jun 23 17:07:34 2020 +0200 staging: most: sound: fix white spaces This patch removes unnecessary empty lines. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592924855-25569-5-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit b1abd84d551b39c10ba86ffe8b27aaa659015e08 Author: Christian Gromm Date: Tue Jun 23 17:07:33 2020 +0200 staging: most: sound: fix return values This patch returns the proper values when reporting an error to the caller. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592924855-25569-4-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 36b67efe0cb3b33f6d58e1e86d5b2a02ff5ab387 Author: Christian Gromm Date: Tue Jun 23 17:07:32 2020 +0200 staging: most: sound: fix error path Return error and exit the function in case registering the component with the core is failing. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592924855-25569-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit c0b122a04e1274b6714a3a1176a89fb0c98b82e4 Author: Christian Gromm Date: Tue Jun 23 17:07:31 2020 +0200 staging: most: sound: remove noisy log messages This patch removes unnecessary log messages to avoid noise in the kernel log. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592924855-25569-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 0ae9e4f22d1c046e53ad2eb0a8a8c3d9e441fd3d Author: Christian Gromm Date: Mon Jun 22 10:48:15 2020 +0200 staging: most: cdev: simplify list iteration This patch uses a less confusing list traversing structure to either return an item of the list that meets the prerequisites or NULL otherwise. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592815695-19305-7-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 78aee6516670d1f8f4e74e5982ea8d557f114b2b Author: Christian Gromm Date: Mon Jun 22 10:48:14 2020 +0200 staging: most: cdev: fix return values This patch makes use of the proper return values when reporting an error to the caller. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592815695-19305-6-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit e8e0f7fd7715de745ef522b5ed96e1f947e3fb91 Author: Christian Gromm Date: Mon Jun 22 10:48:13 2020 +0200 staging: most: cdev: fix up parenthesizing This patch removes unnecessary parnthesis. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592815695-19305-5-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 7aed13d1653678137ef291ced45158eaa8c39e96 Author: Christian Gromm Date: Mon Jun 22 10:48:12 2020 +0200 staging: most: cdev: remove overcautious parameter checking The interface pointer passed to a component API function cannot be NULL. This patch removes unnecessary sanity checks of the pointer. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592815695-19305-4-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 08839388d31ba85d550f60e8e4bc3956b0586e86 Author: Christian Gromm Date: Mon Jun 22 10:48:11 2020 +0200 staging: most: cdev: use dev_*() functions to print messages This patch removes the pr_*() functions and uses dev_*() instead. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592815695-19305-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 61fd971eddecdc82586bbdcce26be01c984ae193 Author: Christian Gromm Date: Mon Jun 22 10:48:10 2020 +0200 staging: most: cdev: remove noisy log messages This patch removes unnecessary log messages to avoid noise in the kernel log. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1592815695-19305-2-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit bcb24e6d32ee555b166db660fbdb5b536c4c9f58 Author: Marek Szyprowski Date: Fri Jun 19 12:36:29 2020 +0200 staging: ion: remove dead code ion_heap_pages_zero() function is not used at all, so remove it to simplify the ion_heap_sglist_zero() function later. Signed-off-by: Marek Szyprowski Link: https://lore.kernel.org/r/20200619103636.11974-30-m.szyprowski@samsung.com Signed-off-by: Greg Kroah-Hartman commit 8947979e8dbbc549a65355366b4cddc2c52bbb26 Author: Peilin Ye Date: Wed Jun 24 08:47:25 2020 -0700 Staging: rtl8188eu: Fix alignment coding style issue Fix "Alignment should match open parenthesis" issues reported by checkpatch.pl for all files under drivers/staging/rtl8188eu/core. Line rtw_mlme_ext.c:373 is left overlength for readability. Signed-off-by: Peilin Ye Link: https://lore.kernel.org/r/1593013645-19130-1-git-send-email-yepeilin.cs@gmail.com Signed-off-by: Greg Kroah-Hartman commit 79e88fd45bd26ea2770b79e70cfb824a4e2e7049 Author: Rodolfo C. Villordo Date: Wed Jun 24 10:02:56 2020 +0000 drivers: staging: vt6655: replace CamelCase names on function s_uGetRTSCTSRsvTime Replace function and variables name from CamelCase style to snake_case style. Remove Hungarian notation. Signed-off-by: Rodolfo C. Villordo Link: https://lore.kernel.org/r/20200624100256.GA17118@ip-172-31-24-31.ec2.internal Signed-off-by: Greg Kroah-Hartman commit 11507bf9a8832741db69efd32bf09a2ab26426bf Author: Evgeny Novikov Date: Tue Jun 23 17:12:30 2020 +0300 staging: rts5208: fix memleaks on error handling paths in probe rtsx_probe() allocates host, but does not free it on error handling paths. The patch adds missed scsi_host_put(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Link: https://lore.kernel.org/r/20200623141230.7258-1-novikov@ispras.ru Signed-off-by: Greg Kroah-Hartman commit 8ce8668bfb64f2973cc1276c54619aceede6498a Author: Evgeny Novikov Date: Tue Jun 23 11:29:59 2020 +0300 staging: kpc2000: kpc_dma: set error code in probe If device_create() fails during probing the device, kpc_dma_probe() does not set the error code and returns 0. This can result in various bad issues later. The patch sets the error code on the corresponding error handling path. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Link: https://lore.kernel.org/r/20200623082959.14951-1-novikov@ispras.ru Signed-off-by: Greg Kroah-Hartman commit c8a00029dc70d0c35e84d6f0ff99a534dfe636e6 Author: Michael Straube Date: Fri Jun 19 18:03:28 2020 +0200 staging: rtl8188eu: use common packet header constants The driver replicates the definitions of rfc1042_header and bridge_tunnel_header available from cfg80211.h. Use the common ones from cfg80211.h. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20200619160328.22776-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4b95739222b85696e9cec98efff866ed876541f8 Author: Rodolfo C. Villordo Date: Mon Jun 22 07:36:12 2020 +0000 staging: gasket: replace symbolic permissions WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. + .attr = __ATTR(_name, S_IRUGO, _show_function, NULL), \ warning detected by checkpatch.pl Unable to use __ATTR_RO(). Driver has multiple files using the same show function: $ grep GASKET_SYSFS_RO drivers/staging/gasket/* drivers/staging/gasket/apex_driver.c: GASKET_SYSFS_RO(node_0_page_table_entries, sysfs_show, drivers/staging/gasket/apex_driver.c: GASKET_SYSFS_RO(node_0_simple_page_table_entries, sysfs_show, drivers/staging/gasket/apex_driver.c: GASKET_SYSFS_RO(node_0_num_mapped_pages, sysfs_show, drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(bar_offsets, gasket_sysfs_data_show, ATTR_BAR_OFFSETS), drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(bar_sizes, gasket_sysfs_data_show, ATTR_BAR_SIZES), drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(driver_version, gasket_sysfs_data_show, drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(framework_version, gasket_sysfs_data_show, drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(device_type, gasket_sysfs_data_show, ATTR_DEVICE_TYPE), drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(revision, gasket_sysfs_data_show, drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(pci_address, gasket_sysfs_data_show, ATTR_PCI_ADDRESS), drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(status, gasket_sysfs_data_show, ATTR_STATUS), drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(is_device_owned, gasket_sysfs_data_show, drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(device_owner, gasket_sysfs_data_show, drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(write_open_count, gasket_sysfs_data_show, drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(reset_count, gasket_sysfs_data_show, ATTR_RESET_COUNT), drivers/staging/gasket/gasket_core.c: GASKET_SYSFS_RO(user_mem_ranges, gasket_sysfs_data_show, drivers/staging/gasket/gasket_interrupt.c: GASKET_SYSFS_RO(interrupt_counts, interrupt_sysfs_show, Signed-off-by: Rodolfo C. Villordo Link: https://lore.kernel.org/r/20200622073612.12282-1-rodolfovillordo@gmail.com Signed-off-by: Greg Kroah-Hartman commit a1d7c393c4711a9ce6c239c3ab053a50dc96505a Author: Jens Axboe Date: Mon Jun 22 11:09:46 2020 -0600 io_uring: enable READ/WRITE to use deferred completions A bit more surgery required here, as completions are generally done through the kiocb->ki_complete() callback, even if they complete inline. This enables the regular read/write path to use the io_comp_state logic to batch inline completions. Signed-off-by: Jens Axboe commit 229a7b63507a3e84afb17c3bbb67505a81d28a1d Author: Jens Axboe Date: Mon Jun 22 10:13:11 2020 -0600 io_uring: pass in completion state to appropriate issue side handlers Provide the completion state to the handlers that we know can complete inline, so they can utilize this for batching completions. Cap the max batch count at 32. This should be enough to provide a good amortization of the cost of the lock+commit dance for completions, while still being low enough not to cause any real latency issues for SQPOLL applications. Xuan Zhuo reports that this changes his profile from: 17.97% [kernel] [k] copy_user_generic_unrolled 13.92% [kernel] [k] io_commit_cqring 11.04% [kernel] [k] __io_cqring_fill_event 10.33% [kernel] [k] udp_recvmsg 5.94% [kernel] [k] skb_release_data 4.31% [kernel] [k] udp_rmem_release 2.68% [kernel] [k] __check_object_size 2.24% [kernel] [k] __slab_free 2.22% [kernel] [k] _raw_spin_lock_bh 2.21% [kernel] [k] kmem_cache_free 2.13% [kernel] [k] free_pcppages_bulk 1.83% [kernel] [k] io_submit_sqes 1.38% [kernel] [k] page_frag_free 1.31% [kernel] [k] inet_recvmsg to 19.99% [kernel] [k] copy_user_generic_unrolled 11.63% [kernel] [k] skb_release_data 9.36% [kernel] [k] udp_rmem_release 8.64% [kernel] [k] udp_recvmsg 6.21% [kernel] [k] __slab_free 4.39% [kernel] [k] __check_object_size 3.64% [kernel] [k] free_pcppages_bulk 2.41% [kernel] [k] kmem_cache_free 2.00% [kernel] [k] io_submit_sqes 1.95% [kernel] [k] page_frag_free 1.54% [kernel] [k] io_put_req [...] 0.07% [kernel] [k] io_commit_cqring 0.44% [kernel] [k] __io_cqring_fill_event Signed-off-by: Jens Axboe commit f13fad7ba41cef806358885fbb3f9004f3214b2d Author: Jens Axboe Date: Mon Jun 22 09:34:30 2020 -0600 io_uring: pass down completion state on the issue side No functional changes in this patch, just in preparation for having the completion state be available on the issue side. Later on, this will allow requests that complete inline to be completed in batches. Signed-off-by: Jens Axboe commit 013538bd65fd3cdbf3ca8b0c99b962c70473c803 Author: Jens Axboe Date: Mon Jun 22 09:29:15 2020 -0600 io_uring: add 'io_comp_state' to struct io_submit_state No functional changes in this patch, just in preparation for passing back pending completions to the caller and completing them in a batched fashion. Signed-off-by: Jens Axboe commit e1e16097e265daac918ce355bf1a0d1677adf0c7 Author: Jens Axboe Date: Mon Jun 22 09:17:17 2020 -0600 io_uring: provide generic io_req_complete() helper We have lots of callers of: io_cqring_add_event(req, result); io_put_req(req); Provide a helper that does this for us. It helps clean up the code, and also provides a more convenient location for us to change the completion handling. Signed-off-by: Jens Axboe commit d3cac64c498c4fb2df46b97ee6f4c7d6d75f5e3d Author: Pavel Begunkov Date: Thu Jun 25 12:38:13 2020 +0300 io_uring: fix NULL-mm for linked reqs __io_queue_sqe() tries to handle all request of a link, so it's not enough to grab mm in io_sq_thread_acquire_mm() based just on the head. Don't check req->needs_mm and do it always. Signed-off-by: Pavel Begunkov commit 81033c6b584b44514cbb16fffc26ca29a0fa6270 Author: Takashi Iwai Date: Wed Jun 24 18:03:00 2020 +0200 ALSA: core: Warn on empty module The module argument passed to snd_card_new() must be a valid non-NULL pointer when the module support is enabled. Since ASoC driver passes the argument from each snd_soc_card definition, one may forget to set the owner field and lead to a NULL module easily. For catching such an overlook, add a WARN_ON() in snd_card_new(). Also, put the card->module assignment in the ifdef block for a very minor optimization. Link: https://lore.kernel.org/r/20200624160300.21703-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 6f2fdb298bf8e3207d060d57f2565b13d9300d2f Author: Sergey Senozhatsky Date: Sat Jun 20 02:22:40 2020 +0900 hvc: unify console setup naming Use the 'common' foo_console_setup() naming scheme. There are 71 foo_console_setup() callbacks and only one foo_setup_console(). Signed-off-by: Sergey Senozhatsky Cc: Andy Shevchenko Cc: Steven Rostedt Cc: Greg Kroah-Hartman Cc: Jiri Slaby Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200619172240.754910-1-sergey.senozhatsky@gmail.com commit 504603767ab639c47912be08d62e02b43125e82e Author: Andy Shevchenko Date: Thu Jun 18 19:47:51 2020 +0300 console: Fix trivia typo 'change' -> 'chance' I bet the word 'chance' has to be used in 'had a chance to be called', but, alas, I'm not native speaker... Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Acked-by: Benjamin Herrenschmidt Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618164751.56828-7-andriy.shevchenko@linux.intel.com commit bba18a1af33e0f0a1ad7d028208b306ef3f3df12 Author: Andy Shevchenko Date: Thu Jun 18 19:47:50 2020 +0300 console: Propagate error code from console ->setup() Since console ->setup() hook returns meaningful error codes, propagate it to the caller of try_enable_new_console(). Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Acked-by: Benjamin Herrenschmidt Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618164751.56828-6-andriy.shevchenko@linux.intel.com commit 9f02842759d8fa4444cd494f847cbe283e3b5815 Author: Andy Shevchenko Date: Thu Jun 18 19:47:49 2020 +0300 tty: hvc: Return proper error code from console ->setup() hook For unifying console ->setup() handling, which is poorly documented, return error code, rather than non-zero arbitrary number. Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618164751.56828-5-andriy.shevchenko@linux.intel.com commit 8629d2744d888cc31cb0ad14c9f222c14165f75e Author: Andy Shevchenko Date: Thu Jun 18 19:47:48 2020 +0300 serial: sunzilog: Return proper error code from console ->setup() hook For unifying console ->setup() handling, which is poorly documented, return error code, rather than non-zero arbitrary number. Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Acked-by: David S. Miller Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618164751.56828-4-andriy.shevchenko@linux.intel.com commit f85956b7a29d39745d16ebb6fb81c663018beab1 Author: Andy Shevchenko Date: Thu Jun 18 19:47:47 2020 +0300 serial: sunsab: Return proper error code from console ->setup() hook For unifying console ->setup() handling, which is poorly documented, return error code, rather than non-zero arbitrary number. Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Acked-by: David S. Miller Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618164751.56828-3-andriy.shevchenko@linux.intel.com commit 4fc29e63cc44fe1486b4d8037370a7d74db28999 Author: Andy Shevchenko Date: Thu Jun 18 19:47:46 2020 +0300 mips: Return proper error code from console ->setup() hook For unifying console ->setup() handling, which is poorly documented, return error code, rather than non-zero arbitrary number. Signed-off-by: Andy Shevchenko Reviewed-by: Petr Mladek Acked-by: Thomas Bogendoerfer Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618164751.56828-2-andriy.shevchenko@linux.intel.com commit 01e377c539ca52a6c753d0fdbe93b3b8fcd66a1c Author: Sebastian Andrzej Siewior Date: Thu Jun 18 21:08:10 2020 +0200 sched/core: Remove mmdrop() definition Commit bf2c59fce4074 ("sched/core: Fix illegal RCU from offline CPUs") introduced a definition for mmdrop() but a a few lines above there is already mmdrop() defined as static inline. Remove the newly introduced mmdrop() definition. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200618190810.790211-1-bigeasy@linutronix.de commit 423d02e1463b21109106f52d94f7396b63731f3b Author: Peng Wang Date: Tue Jun 16 14:04:07 2020 +0800 sched/fair: Optimize dequeue_task_fair() While looking at enqueue_task_fair and dequeue_task_fair, it occurred to me that dequeue_task_fair can also be optimized as Vincent described in commit 7d148be69e3a ("sched/fair: Optimize enqueue_task_fair()"). When encountering throttled cfs_rq, dequeue_throttle label can ensure se not to be NULL, and rq->nr_running remains unchanged, so we can also skip the early balance check. Signed-off-by: Peng Wang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/701eef9a40de93dcf5fe7063fd607bca5db38e05.1592287263.git.rocking@linux.alibaba.com commit aa93cd53bc1b91b5f99c7b55e3dcc1ac98e99558 Author: Kirill Tkhai Date: Thu Dec 19 16:44:55 2019 -0500 sched: Micro optimization in pick_next_task() and in check_preempt_curr() This introduces an optimization based on xxx_sched_class addresses in two hot scheduler functions: pick_next_task() and check_preempt_curr(). It is possible to compare pointers to sched classes to check, which of them has a higher priority, instead of current iterations using for_each_class(). One more result of the patch is that size of object file becomes a little less (excluding added BUG_ON(), which goes in __init section): $size kernel/sched/core.o text data bss dec hex filename before: 66446 18957 676 86079 1503f kernel/sched/core.o after: 66398 18957 676 86031 1500f kernel/sched/core.o Signed-off-by: Kirill Tkhai Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/711a9c4b-ff32-1136-b848-17c622d548f3@yandex.ru commit a87e749e8fa1aaef9b4db32e21c2795e69ce67bf Author: Steven Rostedt (VMware) Date: Thu Dec 19 16:44:54 2019 -0500 sched: Remove struct sched_class::next field Now that the sched_class descriptors are defined in order via the linker script vmlinux.lds.h, there's no reason to have a "next" pointer to the previous priroity structure. The order of the sturctures can be aligned as an array, and used to index and find the next sched_class descriptor. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191219214558.845353593@goodmis.org commit c3a340f7e7eadac7662ab104ceb16432e5a4c6b2 Author: Steven Rostedt (VMware) Date: Thu Dec 19 16:44:53 2019 -0500 sched: Have sched_class_highest define by vmlinux.lds.h Now that the sched_class descriptors are defined by the linker script, and this needs to be aware of the existance of stop_sched_class when SMP is enabled or not, as it is used as the "highest" priority when defined. Move the declaration of sched_class_highest to the same location in the linker script that inserts stop_sched_class, and this will also make it easier to see what should be defined as the highest class, as this linker script location defines the priorities as well. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20191219214558.682913590@goodmis.org commit 590d69796346353878b275c5512c664e3f875f24 Author: Steven Rostedt (VMware) Date: Thu Dec 19 16:44:52 2019 -0500 sched: Force the address order of each sched class descriptor In order to make a micro optimization in pick_next_task(), the order of the sched class descriptor address must be in the same order as their priority to each other. That is: &idle_sched_class < &fair_sched_class < &rt_sched_class < &dl_sched_class < &stop_sched_class In order to guarantee this order of the sched class descriptors, add each one into their own data section and force the order in the linker script. Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/157675913272.349305.8936736338884044103.stgit@localhost.localdomain commit 6b86a1224af8b369d34a41b0954d9eeabd6f35ef Author: Nirmoy Das Date: Wed Jun 24 20:26:47 2020 +0200 drm/bochs: use drm_gem_vram_offset to get bo offset v2 Switch over to GEM VRAM's implementation to retrieve bo->offset. Signed-off-by: Nirmoy Das Reviewed-by: Daniel Vetter Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/372931/ commit 46642a7d4d80588c1f50d06885386f0c2e00fe36 Author: Nirmoy Das Date: Wed Jun 24 20:26:46 2020 +0200 drm/vram-helper: don't use ttm bo->offset v4 Calculate GEM VRAM bo's offset within vram-helper without depending on bo->offset. Signed-off-by: Nirmoy Das Reviewed-by: Daniel Vetter Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/372938/ commit 8ef963ba2d568fa72429afb9b077507fcdf1daab Author: Nirmoy Das Date: Wed Jun 24 20:26:45 2020 +0200 drm/qxl: don't use ttm bo->offset This patch removes slot->gpu_offset which is not required as VRAM and PRIV slot are in separate PCI bar. This patch also removes unused qxl_bo_gpu_offset() Signed-off-by: Nirmoy Das Acked-by: Christian König Acked-by: Gerd Hoffmann Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/372934/ commit a0e4a29857b1acca6a4e724a42b9fdb76ae2d560 Author: Nirmoy Das Date: Wed Jun 24 20:26:42 2020 +0200 drm/radeon: don't use ttm bo->offset Calculate GPU offset in radeon_bo_gpu_offset without depending on bo->offset. Signed-off-by: Nirmoy Das Reviewed-and-tested-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/372935/ commit b1a8ef952a25a926869deca08b74874ecfadf7ad Author: Nirmoy Das Date: Wed Jun 24 20:26:41 2020 +0200 drm/amdgpu: move ttm bo->offset to amdgpu_bo GPU address should belong to driver not in memory management. This patch moves ttm bo.offset and gpu_offset calculation to amdgpu driver. Signed-off-by: Nirmoy Das Acked-by: Huang Rui Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/372930/ commit 5ea7c81a4f34e4dbb9c7bfd0fe18e5fba8a7f8f9 Author: Kiran K Date: Thu Jun 25 00:04:32 2020 +0530 Bluetooth: btusb: Refactor of firmware download flow for Intel conrollers Address the scalability to support new generation Intel controller with respect to readability and enhancement to new firmware download sequence Signed-off-by: Kiran K Reviewed-by: Chethan T N Signed-off-by: Marcel Holtmann commit a7e1f67ed29f0c339e2aa7483d13b085127566ab Author: Borislav Petkov Date: Wed Jun 10 21:37:49 2020 +0200 x86/msr: Filter MSR writes Add functionality to disable writing to MSRs from userspace. Writes can still be allowed by supplying the allow_writes=on module parameter. The kernel will be tainted so that it shows in oopses. Having unfettered access to all MSRs on a system is and has always been a disaster waiting to happen. Think performance counter MSRs, MSRs with sticky or locked bits, MSRs making major system changes like loading microcode, MTRRs, PAT configuration, TSC counter, security mitigations MSRs, you name it. This also destroys all the kernel's caching of MSR values for performance, as the recent case with MSR_AMD64_LS_CFG showed. Another example is writing MSRs by mistake by simply typing the wrong MSR address. System freezes have been experienced that way. In general, poking at MSRs under the kernel's feet is a bad bad idea. So log writing to MSRs by default. Longer term, such writes will be disabled by default. If userspace still wants to do that, then proper interfaces should be defined which are under the kernel's control and accesses to those MSRs can be synchronized and sanitized properly. [ Fix sparse warnings. ] Reported-by: kernel test robot Signed-off-by: Borislav Petkov Tested-by: Sean Christopherson Link: https://lkml.kernel.org/r/20200612105026.GA22660@zn.tnic commit ff711d67b1786ec1e3e4019d615287a2e890e9ab Author: Alexander Lobakin Date: Sat Jun 20 09:35:00 2020 +0000 MIPS: checksum: fix sparse flooding on asm/checksum.h csum_fold() in MIPS' asm/checksum.h is another source of sparse flooding when building different networking source code. The thing is that only half of __wsum <--> u32 casts inside the function is forced, which is insufficient. Add all necessary forced typecasting to stop floods and simplify actual bug hunting. Signed-off-by: Alexander Lobakin Signed-off-by: Thomas Bogendoerfer commit 7b5f96949da771e4bc47c6dc6de16c5e738635de Author: Alexander Lobakin Date: Sat Jun 20 09:34:51 2020 +0000 MIPS: io: fix sparse flood on asm/io.h MIPS MMIO macros for byteswapping from/to hardware endianness are a bit tricky because they use cpu_to_le{16,32,64}() in both directions. This generates a lot of questions from sparse as __le{16,32,64} types are 'restricted' and direct cast is forbidden in order to prevent messing up the byteorder. As MMIO ops are used in almost every single driver, this leads to console flooding and complicates bug hunting. We could fix it in a more proper way, i.e. separate from device / to device byteswap macros and expand __BUILD_MEMORY_*(), but this seems redundant and will produce code duplication. Instead, just expand the existing *ioswab*() macros with forced typecasting to stop floods. Signed-off-by: Alexander Lobakin Signed-off-by: Thomas Bogendoerfer commit 3612485bf46e69679716bf55c058cd21b8259fae Author: Alexander Lobakin Date: Sat Jun 20 09:34:43 2020 +0000 MIPS: generic/ip32: io: fix __mem_ioswabq() *readq() family operates with u64 arguments, so they need 64-bit byteswaps. Correct macros for Generic MIPS and IP-32 to match other machines' implementations. Signed-off-by: Alexander Lobakin Signed-off-by: Thomas Bogendoerfer commit 5b30bd35aab4bcea6a06627a1e943659d82a71cb Author: Prashant Malani Date: Wed Jun 24 01:09:24 2020 -0700 platform/chrome: cros_ec_typec: Add TBT compat support Add mux control support for Thunderbolt compatibility mode. Suggested-by: Heikki Krogerus Co-developed-by: Azhar Shaikh Co-developed-by: Casey Bowman Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Signed-off-by: Enric Balletbo i Serra commit 5e48a03bb9bff1728164040d71aa03cdb3cdfca2 Author: Prashant Malani Date: Wed Jun 24 01:09:23 2020 -0700 platform/chrome: cros_ec: Add TBT pd_ctrl fields To support Thunderbolt compatibility mode, synchronize ec_response_usb_pd_control_v2 with the Chrome EC version, so that we get the Thunderbolt related control fields and macros. Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra commit 63e58f2bb9d8e7b56bf2a2ccf607d6bb4340d32a Author: Maxime Ripard Date: Mon Jun 15 10:41:04 2020 +0200 ARM: dts: bcm2711: Add firmware clocks node Now that we have a clock driver for the clocks exposed by the firmware, let's add the device tree nodes for it. Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Signed-off-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/9a6f113140b3115150bfb18ecb248a48d58562cf.1592210452.git-series.maxime@cerno.tech commit ebf93015097367d4de77deea5d4d9b657dbf7a49 Author: Angelo Ribeiro Date: Fri Apr 3 15:30:36 2020 +0200 drm/bridge: dw-mipi-dsi.c: remove unused header file dw-mipi-dsi does not use any definition from drm_probe_helper. Coverity output: Event unnecessary_header: Including .../include/drm/drm_probe_helper.h does not provide any needed symbols. Reviewed-by: Yannick Fertre Cc: Gustavo Pimentel Cc: Joao Pinto Cc: Jose Abreu Signed-off-by: Angelo Ribeiro Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/171ff1fb3918664a570dc8f2f34b446612505f76.1585832665.git.angelo.ribeiro@synopsys.com commit f3de06b4fa7cbdeece84003d74f650abc64729aa Author: Thierry Reding Date: Thu Jun 11 20:02:42 2020 +0200 ARM: tegra: The Tegra30 SDHCI is not backwards-compatible The SDHCI on Tegra30 is in fact not backwards-compatible with the instantiation found on earlier SoCs. Drop the misleading compatible string. Signed-off-by: Thierry Reding commit 06227e3a0baf64fcc60b267db9e68b93e32f477f Author: Thierry Reding Date: Thu Jun 11 20:01:38 2020 +0200 ARM: tegra: The Tegra30 DC is not backwards-compatible The display controller on Tegra30 is in fact not backwards-compatible with the instantiation found on earlier SoCs. Drop the misleading compatible string. Signed-off-by: Thierry Reding commit 2f4998815412a1b2a840679378f13276eca6987d Author: Thierry Reding Date: Thu Jun 11 20:00:12 2020 +0200 ARM: tegra: Remove spurious comma from node name This was probably left there by mistake or perhaps was a typo in the first place. Remove it. Cc: Marcel Ziswiler Cc: Philippe Schenker Signed-off-by: Thierry Reding commit eb6563a681e2fdf5e33a3ede03c8768059d3a8d3 Author: Thierry Reding Date: Thu Jun 11 19:59:25 2020 +0200 ARM: tegra: Add parent clock to DSI output The DSI output needs to specify a parent clock that will be used to drive both the output and the display controller. Signed-off-by: Thierry Reding commit 7fb099528bbe92157a5e2bdc94b6f5e0269f0dd6 Author: Thierry Reding Date: Thu Jun 11 19:58:33 2020 +0200 ARM: tegra: Use standard names for SRAM nodes SRAM nodes should be named sram@ to match the bindings. Signed-off-by: Thierry Reding commit cea37ffc82e7ec2867e3b5cce70e2a0015b1b609 Author: Thierry Reding Date: Thu Jun 11 19:57:32 2020 +0200 ARM: tegra: seaboard: Use standard battery bindings Seaboard uses a non-existing, possibly obsoleted, binding for the battery. Move to the standard binding which seems to be a super- set of the odl binding. Signed-off-by: Thierry Reding commit eb711490c4e9ee7383bd18baf0272ea3c97b832c Author: Thierry Reding Date: Thu Jun 11 19:56:47 2020 +0200 ARM: tegra: Use standard names for LED nodes LED nodes should be named led-* to match the bindings. Signed-off-by: Thierry Reding commit 86b224beea5faf6b18204e5e324bcde472488096 Author: Thierry Reding Date: Thu Jun 11 19:55:48 2020 +0200 ARM: tegra: Use numeric unit-addresses Unit-addresses should be numeric. This fixes a validation failure seen using the json-schema tooling. Signed-off-by: Thierry Reding commit 90b1307ac545e6e7e26f7a6be9e9ef49c4a650b1 Author: Thierry Reding Date: Thu Jun 11 19:54:09 2020 +0200 ARM: tegra: medcom-wide: Remove extra panel power supply Simple panels can only have a single power supply. The second listed supply is not needed because it is also the input supply of the first supply and therefore will always be on at the same time. In retrospect the panel probably doesn't qualify as simple since it apparently does need both of these supplies, even if in the case of the Medcom Wide it isn't necessary to explicitly hook them up. Signed-off-by: Thierry Reding commit 417668bcb07eda2463fc39b6961b53a5fcd87a59 Author: Thierry Reding Date: Thu Jun 11 19:52:56 2020 +0200 ARM: tegra: Use proper unit-addresses for OPPs Use commas rather than underscores to separate the various parts of the unit-address in CPU OPPs to make them properly validate under the json- schema bindings. Signed-off-by: Thierry Reding commit f538588bdbc8d1c4bc79311a5e7f84224ffcda7a Author: Thierry Reding Date: Thu Jun 11 19:52:07 2020 +0200 ARM: tegra: Add missing clock-names for SDHCI controllers The Tegra SDHCI controllers need to have a clock-names property according to the bindings. Signed-off-by: Thierry Reding commit 5b66a2b43f19551c3c6b15594d21a24a13505403 Author: Thierry Reding Date: Thu Jun 11 19:50:22 2020 +0200 ARM: tegra: Fix order of XUSB controller clocks This is purely to make the json-schema validation tools happy because they cannot deal with string arrays that may be in arbitrary order. Signed-off-by: Thierry Reding commit 571c3d37ee99aebcd4f33ec970633489960350bc Author: Thierry Reding Date: Thu Jun 11 19:48:51 2020 +0200 ARM: tegra: Add #reset-cells to Tegra124 memory controller The memory controller exposes a set of memory client resets and needs to specify the #reset-cells property in order to advertise the number of cells needed to describe each of the resets. Signed-off-by: Thierry Reding commit 9061a80566e44809c8aecae8cb75f15adedd2c69 Author: Thierry Reding Date: Thu Jun 11 19:45:25 2020 +0200 ARM: tegra: Add missing panel power supplies Both Nyan boards as well as Venice2 are missing panel power supplies. Add them. Signed-off-by: Thierry Reding commit 839d9bda2f3f67d37d7241bd7132936ead4a55a5 Author: Thierry Reding Date: Thu Jun 11 19:44:43 2020 +0200 ARM: tegra: Add micro-USB A/B port on Jetson TK1 Run the micro-USB A/B port on Jetson TK1 in host mode by default. Signed-off-by: Thierry Reding commit 9482a17008fa98a7a8807ce6a91b8765d75ada68 Author: Thierry Reding Date: Thu Jun 11 19:41:30 2020 +0200 ARM: tegra: Use proper tuple notation Tuple boundaries should be marked by < and > to make it clear which cells are part of the same tuple. This also helps the json-schema based validation tooling to properly parse this data. While at it, also remove the "immovable" bit from PCI addresses. All of these addresses are in fact "movable". Cc: Marcel Ziswiler Cc: Philippe Schenker Signed-off-by: Thierry Reding commit cc761754f463bcb050ed06040c98e42712bce316 Author: Thierry Reding Date: Thu Jun 11 19:36:25 2020 +0200 ARM: tegra: Use standard name for Ethernet devices Ethernet device should be named "ethernet@". Cc: Marcel Ziswiler Cc: Philippe Schenker Signed-off-by: Thierry Reding commit 1bc5af2b364f746e1d3d5ba6f49f30fc54b807b3 Author: Thierry Reding Date: Thu Jun 11 19:31:33 2020 +0200 ARM: tegra: Add missing #sound-dai-cells property to codecs Audio codecs need a #sound-dai-cells property, so add one to the audio codecs on various Tegra-based boards that don't have one. Cc: Marcel Ziswiler Cc: Philippe Schenker Signed-off-by: Thierry Reding commit 4c0bb8caad384da3b598ee2dfe8f8823ccfc3cae Author: Thierry Reding Date: Thu Jun 11 19:28:34 2020 +0200 ARM: tegra: Add missing #phy-cells property to USB PHYs USB PHYs must have a #phy-cells property, so add one to the Tegra USB PHYs which don't have one. Signed-off-by: Thierry Reding commit 704818a1ac1b6d8bdd8259d7ac60811ee708b9f0 Author: Thierry Reding Date: Thu Jun 11 19:25:54 2020 +0200 ARM: tegra: Tegra114 SDHCI is not backwards-compatible The SDHCI controller instantiated on Tegra114 is not backwards- compatible with the version on Tegra30, so remove the corresponding compatible string. Signed-off-by: Thierry Reding commit 32c096c2276acd191f8db5b1a45b3dee9502258a Author: Thierry Reding Date: Thu Jun 11 19:21:17 2020 +0200 ARM: tegra: Rename sdhci nodes to mmc The new json-schema based validation tools require SD/MMC controller nodes to be named mmc. Rename all references to them. Cc: Marcel Ziswiler Cc: Philippe Schenker Signed-off-by: Thierry Reding commit afd92390fcaa784a6d064f3b07c8d8124e43e5d1 Author: Thierry Reding Date: Thu Jun 11 19:09:36 2020 +0200 ARM: tegra: Drop display controller parent clocks on Tegra124 The parent clocks are determined by the output that will be used, not by the display controller that drives the output. On previous generations a simple RGB output used to be part of the display controller and hence an explicit parent clock needed to be assigned to the display controller to drive the RGB output. Starting with Tegra124, that RGB output has been dropped and the parent clock can therefore be removed from the display controller device tree nodes. Signed-off-by: Thierry Reding commit e8da9ed039805a52c32c4ee2f462080aa2315929 Author: Benjamin Gaignard Date: Thu Feb 20 17:22:46 2020 +0100 dt-bindings: mfd: Convert stmfx bindings to json-schema Convert stmfx bindings to json-schema. Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Lee Jones commit c61e165822d57fd317868d14b46151d9c83662d2 Author: Chunyan Zhang Date: Fri Jun 19 17:09:14 2020 +0800 mfd: sprd: Populate sub-devices defined in DT SC27XX-SPI added subdevices according to a pre-defined mfd_cell array, no matter these devices were really included on board. In this patch, switch to use devm_of_platform_populate() for adding sub-devices which are defined in devicetree. Signed-off-by: Chunyan Zhang Signed-off-by: Lee Jones commit bf9367a156fd868b312e8a575c00d57db2bc16bf Author: Neil Armstrong Date: Mon Jun 8 11:17:38 2020 +0200 MAINTAINERS: Add myself as maintainer for Khadas MCU drivers Add the Thermal driver along the MFD drivers and header as Maintained by myself. Signed-off-by: Neil Armstrong Signed-off-by: Lee Jones commit 5772717e59b9fbdc9e97da606dd69a75174f8101 Author: Neil Armstrong Date: Wed Jun 24 18:15:27 2020 +0200 thermal: Add support for the MCU controlled FAN on Khadas boards The new Khadas VIM2 and VIM3 boards controls the cooling fan via the on-board microcontroller. This implements the FAN control as thermal devices and as cell of the Khadas MCU MFD driver. Signed-off-by: Neil Armstrong Reviewed-by: Amit Kucheria Acked-by: Daniel Lezcano Signed-off-by: Lee Jones commit d621d7703d510d222fa674254293ec48ca6ea709 Author: Po Liu Date: Wed Jun 24 17:36:31 2020 +0800 net: enetc add tc flower offload flow metering policing action Flow metering entries in IEEE 802.1Qci is an optional function for a flow filtering module. Flow metering is two rates two buckets and three color marker to policing the frames. This patch only enable one rate one bucket and in color blind mode. Flow metering instance are as specified in the algorithm in MEF 10.3 and in Bandwidth Profile Parameters. They are: a) Flow meter instance identifier. An integer value identifying the flow meter instance. The patch use the police 'index' as thin value. b) Committed Information Rate (CIR), in bits per second. This patch use the 'rate_bytes_ps' represent this value. c) Committed Burst Size (CBS), in octets. This patch use the 'burst' represent this value. d) Excess Information Rate (EIR), in bits per second. e) Excess Burst Size per Bandwidth Profile Flow (EBS), in octets. And plus some other parameters. This patch set EIR/EBS default disable and color blind mode. v1->v2 changes: - Use div_u64() as division replace the '/' report: All errors (new ones prefixed by >>): ld: drivers/net/ethernet/freescale/enetc/enetc_qos.o: in function `enetc_flowmeter_hw_set': >> enetc_qos.c:(.text+0x66): undefined reference to `__udivdi3' Reported-by: kernel test robot Signed-off-by: Po Liu Signed-off-by: David S. Miller commit 627e39b1399e72e53895eec6bbec30199ed43de2 Author: Po Liu Date: Wed Jun 24 17:36:30 2020 +0800 net: qos: police action add index for tc flower offloading Hardware device may include more than one police entry. Specifying the action's index make it possible for several tc filters to share the same police action when installing the filters. Propagate this index to device drivers through the flow offload intermediate representation, so that drivers could share a single hardware policer between multiple filters. v1->v2 changes: - Update the commit message suggest by Ido Schimmel Signed-off-by: Po Liu Signed-off-by: David S. Miller commit 89d1f0966997d5bbe510dbdb10a5c26c0e567b03 Author: Po Liu Date: Wed Jun 24 17:36:29 2020 +0800 net: enetc: add support max frame size for tc flower offload Base on the tc flower offload police action add max frame size by the parameter 'mtu'. Tc flower device driver working by the IEEE 802.1Qci stream filter can implement the max frame size filtering. Add it to the current hardware tc flower stearm filter driver. Signed-off-by: Po Liu Signed-off-by: David S. Miller commit 19e528dc9af29169fa7cdfa61071805fdef504c6 Author: Po Liu Date: Wed Jun 24 17:36:28 2020 +0800 net: qos: add tc police offloading action with max frame size limit Current police offloading support the 'burst'' and 'rate_bytes_ps'. Some hardware own the capability to limit the frame size. If the frame size larger than the setting, the frame would be dropped. For the police action itself already accept the 'mtu' parameter in tc command. But not extend to tc flower offloading. So extend 'mtu' to tc flower offloading. Signed-off-by: Po Liu Signed-off-by: David S. Miller commit 1a9e489e6128c53571247ef216cebfd0dbf8ac5d Author: Rajendra Nayak Date: Mon Jun 15 17:32:40 2020 +0530 spi: spi-geni-qcom: Use OPP API to set clk/perf state geni spi needs to express a perforamnce state requirement on CX depending on the frequency of the clock rates. Use OPP table from DT to register with OPP framework and use dev_pm_opp_set_rate() to set the clk/perf state. Signed-off-by: Rajendra Nayak Reviewed-by: Matthias Kaehlcke Acked-by: Mark Brown Cc: Alok Chauhan Cc: Akash Asthana Cc: linux-spi@vger.kernel.org Link: https://lore.kernel.org/r/1592222564-13556-3-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit a5819b548af0cc0fd0b84fa3e35723c4c36f157c Author: Rajendra Nayak Date: Mon Jun 15 17:32:39 2020 +0530 tty: serial: qcom_geni_serial: Use OPP API to set clk/perf state geni serial needs to express a perforamnce state requirement on CX powerdomain depending on the frequency of the clock rates. Use OPP table from DT to register with OPP framework and use dev_pm_opp_set_rate() to set the clk/perf state. Signed-off-by: Rajendra Nayak Reviewed-by: Matthias Kaehlcke Acked-by: Greg Kroah-Hartman Cc: Akash Asthana Cc: linux-serial@vger.kernel.org Link: https://lore.kernel.org/r/1592222564-13556-2-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit e867f429e670bf3bf2a7fb2ddcc50fb8fc4b6898 Author: Akash Asthana Date: Tue Jun 23 16:08:57 2020 +0530 arm64: dts: sc7180: Add interconnect for QUP and QSPI Add interconnect ports for GENI QUPs and QSPI to set bus capabilities. Signed-off-by: Akash Asthana Link: https://lore.kernel.org/r/1592908737-7068-9-git-send-email-akashast@codeaurora.org Signed-off-by: Bjorn Andersson commit cff80645d6d3134260d2ef007a7decb1edcfd4a6 Author: Akash Asthana Date: Tue Jun 23 16:08:56 2020 +0530 spi: spi-qcom-qspi: Add interconnect support Get the interconnect paths for QSPI device and vote according to the current bus speed of the driver. Acked-by: Mark Brown Signed-off-by: Akash Asthana Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1592908737-7068-8-git-send-email-akashast@codeaurora.org Signed-off-by: Bjorn Andersson commit 0e3b8a81f5dfd6b4695cc9a1272fd643f38c1461 Author: Akash Asthana Date: Tue Jun 23 16:08:55 2020 +0530 spi: spi-geni-qcom: Add interconnect support Get the interconnect paths for SPI based Serial Engine device and vote according to the current bus speed of the driver. Acked-by: Mark Brown Signed-off-by: Akash Asthana Link: https://lore.kernel.org/r/1592908737-7068-7-git-send-email-akashast@codeaurora.org Signed-off-by: Bjorn Andersson commit e68b6624a0f79a24120b427c837a46c8f0e5598f Author: Douglas Anderson Date: Tue Jun 23 16:08:54 2020 +0530 spi: spi-geni-qcom: Combine the clock setting code There is code for adjusting the clock both in setup_fifo_params() (called from prepare_message()) and in setup_fifo_xfer() (called from transfer_one()). The code is the same. Abstract it out to a shared function. This is a no-op cleanup patch. The only change is to the error string if we fail to set the clock. Since the two paths has marginally different error messages I picked the clean one. Acked-by: Mark Brown Signed-off-by: Douglas Anderson Signed-off-by: Akash Asthana Link: https://lore.kernel.org/r/1592908737-7068-6-git-send-email-akashast@codeaurora.org Signed-off-by: Bjorn Andersson commit 7cf563b2c84624face505e7a62dbf2f35e752eb3 Author: Akash Asthana Date: Tue Jun 23 16:08:53 2020 +0530 tty: serial: qcom_geni_serial: Add interconnect support Get the interconnect paths for Uart based Serial Engine device and vote according to the baud rate requirement of the driver. Signed-off-by: Akash Asthana Reviewed-by: Matthias Kaehlcke Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/1592908737-7068-5-git-send-email-akashast@codeaurora.org Signed-off-by: Bjorn Andersson commit bf225ed357c65e788a2996955ef0c78dc015d844 Author: Akash Asthana Date: Tue Jun 23 16:08:52 2020 +0530 i2c: i2c-qcom-geni: Add interconnect support Get the interconnect paths for I2C based Serial Engine device and vote according to the bus speed of the driver. Signed-off-by: Akash Asthana Reviewed-by: Matthias Kaehlcke Acked-by: Wolfram Sang Link: https://lore.kernel.org/r/1592908737-7068-4-git-send-email-akashast@codeaurora.org Signed-off-by: Bjorn Andersson commit 048eb908a1f276ca0346f20a3e6e7d707dcd81f3 Author: Akash Asthana Date: Tue Jun 23 16:08:51 2020 +0530 soc: qcom-geni-se: Add interconnect support to fix earlycon crash QUP core clock is shared among all the SE drivers present on particular QUP wrapper, the system will reset(unclocked access) if earlycon used after QUP core clock is put to 0 from other SE drivers before real console comes up. As earlycon can't vote for it's QUP core need, to fix this add ICC support to common/QUP wrapper driver and put vote for QUP core from probe on behalf of earlycon and remove vote during earlycon exit call. Signed-off-by: Akash Asthana Reported-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1592908737-7068-3-git-send-email-akashast@codeaurora.org Signed-off-by: Bjorn Andersson commit 58ffbba6a39979baa22d2f7e69faeffa2d9c0641 Author: Akash Asthana Date: Tue Jun 23 16:08:50 2020 +0530 soc: qcom: geni: Support for ICC voting Add necessary macros and structure variables to support ICC BW voting from individual SE drivers. Signed-off-by: Akash Asthana Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1592908737-7068-2-git-send-email-akashast@codeaurora.org Signed-off-by: Bjorn Andersson commit 74765da176a0627e34bacf72826ec60c075cb62c Merge: f9bcf96837f15 cfcd75f9bf123 Author: Alexei Starovoitov Date: Wed Jun 24 18:38:00 2020 -0700 Merge branch 'bpf_iter_tcp_udp' Yonghong Song says: ==================== bpf iterator implments traversal of kernel data structures and these data structures are passed to a bpf program for processing. This gives great flexibility for users to examine kernel data structure without using e.g. /proc/net which has limited and fixed format. Commit 138d0be35b14 ("net: bpf: Add netlink and ipv6_route bpf_iter targets") implemented bpf iterators for netlink and ipv6_route. This patch set intends to implement bpf iterators for tcp and udp. Currently, /proc/net/tcp is used to print tcp4 stats and /proc/net/tcp6 is used to print tcp6 stats. /proc/net/udp[6] have similar usage model. In contrast, only one tcp iterator is implemented and it is bpf program resposibility to filter based on socket family. The same is for udp. This will avoid another unnecessary traversal pass if users want to check both tcp4 and tcp6. Several helpers are also implemented in this patch bpf_skc_to_{tcp, tcp6, tcp_timewait, tcp_request, udp6}_sock The argument for these helpers is not a fixed btf_id. For example, bpf_skc_to_tcp(struct sock_common *), or bpf_skc_to_tcp(struct sock *), or bpf_skc_to_tcp(struct inet_sock *), ... are all valid. At runtime, the helper will check whether pointer cast is legal or not. Please see Patch #5 for details. Since btf_id's for both arguments and return value are known at build time, the btf_id's are pre-computed once vmlinux btf becomes valid. Jiri's "adding d_path helper" patch set https://lore.kernel.org/bpf/20200616100512.2168860-1-jolsa@kernel.org/T/ provides a way to pre-compute btf id during vmlinux build time. This can be applied here as well. A followup patch can convert to build time btf id computation after Jiri's patch landed. Changelogs: v4 -> v5: - fix bpf_skc_to_udp6_sock helper as besides sk_protocol, sk_family, sk_type == SOCK_DGRAM is also needed to differentiate from SOCK_RAW (Eric) v3 -> v4: - fix bpf_skc_to_{tcp_timewait, tcp_request}_sock helper implementation as just checking sk->sk_state is not enough (Martin) - fix a few kernel test robot reported failures - move bpf_tracing_net.h from libbpf to selftests (Andrii) - remove __weak attribute from selftests CONFIG_HZ variables (Andrii) v2 -> v3: - change sock_cast*/SOCK_CAST* names to btf_sock* names for generality (Martin) - change gpl_license to false (Martin) - fix helper to cast to tcp timewait/request socket. (Martin) v1 -> v2: - guard init_sock_cast_types() defination properly with CONFIG_NET (Martin) - reuse the btf_ids, computed for new helper argument, for return values (Martin) - using BTF_TYPE_EMIT to express intent of btf type generation (Andrii) - abstract out common net macros into bpf_tracing_net.h (Andrii) ==================== Signed-off-by: Alexei Starovoitov commit cfcd75f9bf12301dfdcfe9ff6dfb240997e7745f Author: Yonghong Song Date: Tue Jun 23 16:08:23 2020 -0700 selftests/bpf: Add tcp/udp iterator programs to selftests Added tcp{4,6} and udp{4,6} bpf programs into test_progs selftest so that they at least can load successfully. $ ./test_progs -n 3 ... #3/7 tcp4:OK #3/8 tcp6:OK #3/9 udp4:OK #3/10 udp6:OK ... #3 bpf_iter:OK Summary: 1/16 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230823.3989372-1-yhs@fb.com commit ace6d6ec9e9e167047b6c8ca462a0830220640c2 Author: Yonghong Song Date: Tue Jun 23 16:08:22 2020 -0700 selftests/bpf: Implement sample udp/udp6 bpf_iter programs On my VM, I got identical results between /proc/net/udp[6] and the udp{4,6} bpf iterator. For udp6: $ cat /sys/fs/bpf/p1 sl local_address remote_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops 1405: 000080FE00000000FF7CC4D0D9EFE4FE:0222 00000000000000000000000000000000:0000 07 00000000:00000000 00:00000000 00000000 193 0 19183 2 0000000029eab111 0 $ cat /proc/net/udp6 sl local_address remote_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops 1405: 000080FE00000000FF7CC4D0D9EFE4FE:0222 00000000000000000000000000000000:0000 07 00000000:00000000 00:00000000 00000000 193 0 19183 2 0000000029eab111 0 For udp4: $ cat /sys/fs/bpf/p4 sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops 2007: 00000000:1F90 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 72540 2 000000004ede477a 0 $ cat /proc/net/udp sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops 2007: 00000000:1F90 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 72540 2 000000004ede477a 0 Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230822.3989299-1-yhs@fb.com commit 2767c97765cb3d9b54c8e62b468e55cc56854a66 Author: Yonghong Song Date: Tue Jun 23 16:08:20 2020 -0700 selftests/bpf: Implement sample tcp/tcp6 bpf_iter programs In my VM, I got identical result compared to /proc/net/{tcp,tcp6}. For tcp6: $ cat /proc/net/tcp6 sl local_address remote_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode 0: 00000000000000000000000000000000:0016 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000001 00000000 0 0 17955 1 000000003eb3102e 100 0 0 10 0 $ cat /sys/fs/bpf/p1 sl local_address remote_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode 0: 00000000000000000000000000000000:0016 00000000000000000000000000000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 17955 1 000000003eb3102e 100 0 0 10 0 For tcp: $ cat /proc/net/tcp sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode 0: 00000000:0016 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 2666 1 000000007152e43f 100 0 0 10 0 $ cat /sys/fs/bpf/p2 sl local_address remote_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode 1: 00000000:0016 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 2666 1 000000007152e43f 100 0 0 10 0 Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230820.3989165-1-yhs@fb.com commit 3982bfaaef7c80ecf6a065cbf9422165a8e36f75 Author: Yonghong Song Date: Tue Jun 23 16:08:19 2020 -0700 selftests/bpf: Add more common macros to bpf_tracing_net.h These newly added macros will be used in subsequent bpf iterator tcp{4,6} and udp{4,6} programs. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230819.3989050-1-yhs@fb.com commit 647b502e3d5456f5c240b1587112b163c69732e9 Author: Yonghong Song Date: Tue Jun 23 16:08:17 2020 -0700 selftests/bpf: Refactor some net macros to bpf_tracing_net.h Refactor bpf_iter_ipv6_route.c and bpf_iter_netlink.c so net macros, originally from various include/linux header files, are moved to a new header file bpf_tracing_net.h. The goal is to improve reuse so networking tracing programs do not need to copy these macros every time they use them. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230817.3988962-1-yhs@fb.com commit 84544f5637ff3501876ba96bd48ca900317e08fb Author: Yonghong Song Date: Tue Jun 23 16:08:16 2020 -0700 selftests/bpf: Move newer bpf_iter_* type redefining to a new header file Commit b9f4c01f3e0b ("selftest/bpf: Make bpf_iter selftest compilable against old vmlinux.h") and Commit dda18a5c0b75 ("selftests/bpf: Convert bpf_iter_test_kern{3, 4}.c to define own bpf_iter_meta") redefined newly introduced types in bpf programs so the bpf program can still compile properly with old kernels although loading may fail. Since this patch set introduced new types and the same workaround is needed, so let us move the workaround to a separate header file so they do not clutter bpf programs. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230816.3988656-1-yhs@fb.com commit 0d4fad3e57df2bf61e8ffc8d12a34b1caf9b8835 Author: Yonghong Song Date: Tue Jun 23 16:08:15 2020 -0700 bpf: Add bpf_skc_to_udp6_sock() helper The helper is used in tracing programs to cast a socket pointer to a udp6_sock pointer. The return value could be NULL if the casting is illegal. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Cc: Eric Dumazet Link: https://lore.kernel.org/bpf/20200623230815.3988481-1-yhs@fb.com commit 5788b3a07fc5863606c3b92fa7b1ffe125e6eb4c Author: Yonghong Song Date: Tue Jun 23 16:08:13 2020 -0700 net: bpf: Implement bpf iterator for udp The bpf iterator for udp is implemented. Both udp4 and udp6 sockets will be traversed. It is up to bpf program to filter for udp4 or udp6 only, or both families of sockets. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230813.3988404-1-yhs@fb.com commit 9e8ca27afab6c92477b459f6a5d2af0cd3197c20 Author: Yonghong Song Date: Tue Jun 23 16:08:12 2020 -0700 net: bpf: Add bpf_seq_afinfo in udp_iter_state Similar to tcp_iter_state, a new field bpf_seq_afinfo is added to udp_iter_state to provide bpf udp iterator afinfo. This does not change /proc/net/{udp, udp6} behavior. But it enables bpf iterator to avoid get afinfo from PDE_DATA and iterate through all udp and udp6 sockets in one pass. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230812.3988347-1-yhs@fb.com commit 478cfbdf5f13dfe09cfd0b1cbac821f5e27f6108 Author: Yonghong Song Date: Tue Jun 23 16:08:11 2020 -0700 bpf: Add bpf_skc_to_{tcp, tcp_timewait, tcp_request}_sock() helpers Three more helpers are added to cast a sock_common pointer to an tcp_sock, tcp_timewait_sock or a tcp_request_sock for tracing programs. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230811.3988277-1-yhs@fb.com commit af7ec13833619e17f03aa73a785a2f871da6d66b Author: Yonghong Song Date: Tue Jun 23 16:08:09 2020 -0700 bpf: Add bpf_skc_to_tcp6_sock() helper The helper is used in tracing programs to cast a socket pointer to a tcp6_sock pointer. The return value could be NULL if the casting is illegal. A new helper return type RET_PTR_TO_BTF_ID_OR_NULL is added so the verifier is able to deduce proper return types for the helper. Different from the previous BTF_ID based helpers, the bpf_skc_to_tcp6_sock() argument can be several possible btf_ids. More specifically, all possible socket data structures with sock_common appearing in the first in the memory layout. This patch only added socket types related to tcp and udp. All possible argument btf_id and return value btf_id for helper bpf_skc_to_tcp6_sock() are pre-calculcated and cached. In the future, it is even possible to precompute these btf_id's at kernel build time. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230809.3988195-1-yhs@fb.com commit 72e2b2b66f9c1225e51fc4a1c1e8512959195b76 Author: Yonghong Song Date: Tue Jun 23 16:08:08 2020 -0700 bpf: Allow tracing programs to use bpf_jiffies64() helper /proc/net/tcp{4,6} uses jiffies for various computations. Let us add bpf_jiffies64() helper to tracing program so bpf_iter and other programs can use it. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230808.3988073-1-yhs@fb.com commit c06b0229579806f5b5e14af64cf9c5dc771445b3 Author: Yonghong Song Date: Tue Jun 23 16:08:07 2020 -0700 bpf: Support 'X' in bpf_seq_printf() helper 'X' tells kernel to print hex with upper case letters. /proc/net/tcp{4,6} seq_file show() used this, and supports it in bpf_seq_printf() helper too. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230807.3988014-1-yhs@fb.com commit 52d87d5f6418ba1b8b449ed5eea1532664896851 Author: Yonghong Song Date: Tue Jun 23 16:08:05 2020 -0700 net: bpf: Implement bpf iterator for tcp The bpf iterator for tcp is implemented. Both tcp4 and tcp6 sockets will be traversed. It is up to bpf program to filter for tcp4 or tcp6 only, or both families of sockets. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230805.3987959-1-yhs@fb.com commit b08d4d3b6c0460306e8a0608413b201705200d33 Author: Yonghong Song Date: Tue Jun 23 16:08:04 2020 -0700 net: bpf: Add bpf_seq_afinfo in tcp_iter_state A new field bpf_seq_afinfo is added to tcp_iter_state to provide bpf tcp iterator afinfo. There are two reasons on why we did this. First, the current way to get afinfo from PDE_DATA does not work for bpf iterator as its seq_file inode does not conform to /proc/net/{tcp,tcp6} inode structures. More specifically, anonymous bpf iterator will use an anonymous inode which is shared in the system and we cannot change inode private data structure at all. Second, bpf iterator for tcp/tcp6 wants to traverse all tcp and tcp6 sockets in one pass and bpf program can control whether they want to skip one sk_family or not. Having a different afinfo with family AF_UNSPEC make it easier to understand in the code. This patch does not change /proc/net/{tcp,tcp6} behavior as the bpf_seq_afinfo will be NULL for these two proc files. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200623230804.3987829-1-yhs@fb.com commit be24c6a71ecfbd9436ea1f496eb518a53e06368c Author: Douglas Anderson Date: Thu May 28 07:48:34 2020 -0700 soc: qcom: rpmh-rsc: Don't use ktime for timeout in write_tcs_reg_sync() The write_tcs_reg_sync() may be called after timekeeping is suspended so it's not OK to use ktime. The readl_poll_timeout_atomic() macro implicitly uses ktime. This was causing a warning at suspend time. Change to just loop 1000000 times with a delay of 1 us between loops. This may give a timeout of more than 1 second but never less and is safe even if timekeeping is suspended. NOTE: I don't have any actual evidence that we need to loop here. It's possibly that all we really need to do is just read the value back to ensure that the pipes are cleaned and the looping/comparing is totally not needed. I never saw the loop being needed in my tests. However, the loop shouldn't hurt. Reviewed-by: Stephen Boyd Reviewed-by: Maulik Shah Fixes: 91160150aba0 ("soc: qcom: rpmh-rsc: Timeout after 1 second in write_tcs_reg_sync()") Reported-by: Maulik Shah Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200528074530.1.Ib86e5b406fe7d16575ae1bb276d650faa144b63c@changeid Signed-off-by: Bjorn Andersson commit 147373d968f1c1b5d6bb71e4e8b7495eeb9cdcae Author: YueHaibing Date: Wed Jun 24 07:18:21 2020 +0000 lan743x: Remove duplicated include from lan743x_main.c Remove duplicated include. Signed-off-by: YueHaibing Signed-off-by: David S. Miller commit 593b03d4c4db46511bbbdbe6ca11d82e544a457a Merge: b430081b0c9ed b5f1d9ec283bd Author: David S. Miller Date: Wed Jun 24 14:36:33 2020 -0700 Merge branch 'net-bridge-fdb-activity-tracking' Nikolay Aleksandrov says: ==================== net: bridge: fdb activity tracking This set adds extensions needed for EVPN multi-homing proper and efficient mac sync. User-space (e.g. FRR) needs to be able to track non-dynamic entry activity on per-fdb basis depending if a tracked fdb is currently peer active or locally active and needs to be able to add new peer active fdb (static + track + inactive) without refreshing it to get real activity tracking. Patch 02 adds a new NDA attribute - NDA_FDB_EXT_ATTRS to avoid future pollution of NDA attributes by bridge or vxlan. New bridge/vxlan specific fdb attributes are embedded in NDA_FDB_EXT_ATTRS, which is used in patch 03 to pass the new NFEA_ACTIVITY_NOTIFY attribute which controls if an fdb should be tracked and also reflects its current state when dumping. It is treated as a bitfield, current valid bits are: 1 - mark an entry for activity tracking 2 - mark an entry as inactive to avoid multiple notifications and reflect state properly Patch 04 adds the ability to avoid refreshing an entry when changing it via the NFEA_DONT_REFRESH flag. That allows user-space to mark a static entry for tracking and keep its real activity unchanged. The set has been extensively tested with FRR and those changes will be upstreamed if/after it gets accepted. ==================== Signed-off-by: David S. Miller commit b5f1d9ec283bd28a452cf61d7e5c2f2b1a9cccda Author: Nikolay Aleksandrov Date: Tue Jun 23 23:47:18 2020 +0300 net: bridge: add a flag to avoid refreshing fdb when changing/adding When we modify or create a new fdb entry sometimes we want to avoid refreshing its activity in order to track it properly. One example is when a mac is received from EVPN multi-homing peer by FRR, which doesn't want to change local activity accounting. It makes it static and sets a flag to track its activity. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 31cbc39b6344916c20452e43a9171009214c409c Author: Nikolay Aleksandrov Date: Tue Jun 23 23:47:17 2020 +0300 net: bridge: add option to allow activity notifications for any fdb entries This patch adds the ability to notify about activity of any entries (static, permanent or ext_learn). EVPN multihoming peers need it to properly and efficiently handle mac sync (peer active/locally active). We add a new NFEA_ACTIVITY_NOTIFY attribute which is used to dump the current activity state and to control if static entries should be monitored at all. We use 2 bits - one to activate fdb entry tracking (disabled by default) and the second to denote that an entry is inactive. We need the second bit in order to avoid multiple notifications of inactivity. Obviously this makes no difference for dynamic entries since at the time of inactivity they get deleted, while the tracked non-dynamic entries get the inactive bit set and get a notification. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 899426b3bdd947541ba4af8c767575889c8b842a Author: Nikolay Aleksandrov Date: Tue Jun 23 23:47:16 2020 +0300 net: neighbor: add fdb extended attribute Add an attribute to NDA which will contain all future fdb-specific attributes in order to avoid polluting the NDA namespace with e.g. bridge or vxlan specific attributes. The attribute is called NDA_FDB_EXT_ATTRS and the structure would look like: [NDA_FDB_EXT_ATTRS] = { [NFEA_xxx] } Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 0592ff88347b5e13e31711a20a21c2ef2397f80b Author: Nikolay Aleksandrov Date: Tue Jun 23 23:47:15 2020 +0300 net: bridge: fdb_add_entry takes ndm as argument We can just pass ndm as an argument instead of its fields separately. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit b430081b0c9ed2065ca5250e8cffc5027261162d Merge: 7b0cc34ac4795 15324652f6128 Author: David S. Miller Date: Wed Jun 24 14:33:17 2020 -0700 Merge branch 'net-phy-mscc-PHC-and-timestamping-support' Antoine Tenart says: ==================== net: phy: mscc: PHC and timestamping support This series aims at adding support for PHC and timestamping operations in the MSCC PHY driver, for the VSC858x and VSC8575. Those PHYs are capable of timestamping in 1-step and 2-step for both L2 and L4 traffic. As of this series, only IPv4 support was implemented when using L4 mode. This is because of an hardware limitation which prevents us for supporting both IPv4 and IPv6 at the same time. Implementing support for IPv6 should be quite easy (I do have the modifications needed for the hardware configuration) but I did not see a way to retrieve this information in hwtstamp(). What would you suggest? Those PHYs are distributed in hardware packages containing multiple times the PHY. The VSC8584 for example is composed of 4 PHYs. With hardware packages, parts of the logic is usually common and one of the PHY has to be used for some parts of the initialization. Following this logic, the 1588 blocks of those PHYs are shared between two PHYs and accessing the registers has to be done using the "base" PHY of the group. This is handled thanks to helpers in the PTP code (and locks). We also need the MDIO bus lock while performing a single read or write to the 1588 registers as the read/write are composed of multiple MDIO transactions (and we don't want other threads updating the page). To get and set the PHC time, a GPIO has to be used and changes are only retrieved or committed when on a rising edge. The same GPIO is shared by all PHYs, so the granularity of the lock protecting it has to be different from the ones protecting the 1588 registers (the VSC8584 PHY has 2 1588 blocks, and a single load/save pin). Patch 1 extends the recently added helpers to share information between PHYs of the same hardware package; to allow having part of the probe to be shared (in addition to the already supported init part). This will be used when adding support for PHC/TS to initialize locks. Patches 2 and 3 are mostly cosmetic. Patch 4 takes into account the 1588 block in the MACsec initialization, to allow having both the MACsec and 1588 blocks initialized on a running system. Patches 5 and 6 add support for PHC and timestamping operations in the MSCC driver. An initialization of the 1588 block (plus all the registers definition; and helpers) is added first; and then comes a patch to implement the PHC and timestamping API. Patches 7 and 8 add the required hardware description for device trees, to be able to use the load/save GPIO pin on the PCB120 board. To use this on a PCB120 board, two other series are needed and have already been sent upstream (one is merged). There are no dependency between all those series. Since v3: - Fixed a SKB leak. - Removed ts_lock from the init, as TS and PHC operations aren't registered at this time. - Refectored the ts_base_addr/phy intialization. - Cleaned up the ingr/egr latencies definitons. - Fixed a comment about locking and the shared GPIO. - A few cosmetic fixes. Since v2: - Removed explicit inlines from .c files. - Fixed three warnings. Since v1: - Removed checks in rxtstamp/txtstamp as skb cannot be NULL here. - Reworked get_ptp_header_rx/get_ptp_header. - Reworked the locking logic between the PHC and timestamping operations. - Fixed a compilation issue on x86 reported by Jakub. ==================== Signed-off-by: David S. Miller commit 15324652f61287e2e640ca47f2a044df6cccf4b3 Author: Quentin Schulz Date: Tue Jun 23 16:30:14 2020 +0200 MIPS: dts: ocelot: describe the load/save GPIO This patch adds a description of the load/save GPIN pin, used in the VSC8584 PHY for timestamping operations. The related pinctrl description is also added. Signed-off-by: Quentin Schulz Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 3461522d00c075705d38eb0833ace7ba8c180345 Author: Antoine Tenart Date: Tue Jun 23 16:30:13 2020 +0200 dt-bindings: net: phy: vsc8531: document the load/save GPIO A new optional property can be used to reference the load/save GPIO, used for PTP hardware clock (PHC) operations. This patch documents it in the binding documentation. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 7d272e63e0979d38a6256108adbe462d621c26c5 Author: Antoine Tenart Date: Tue Jun 23 16:30:12 2020 +0200 net: phy: mscc: timestamping and PHC support This patch adds support for PHC and timestamping operations for the MSCC PHY. PTP 1-step and 2-step modes are supported, over Ethernet and UDP. To get and set the PHC time, a GPIO has to be used and changes are only retrieved or committed when on a rising edge. The same GPIO is shared by all PHYs, so the granularity of the lock protecting it has to be different from the ones protecting the 1588 registers (the VSC8584 PHY has 2 1588 blocks, and a single load/save pin). Co-developed-by: Quentin Schulz Signed-off-by: Quentin Schulz Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit ab2bf933935710ac545f94e49d16b5eab01f846f Author: Quentin Schulz Date: Tue Jun 23 16:30:11 2020 +0200 net: phy: mscc: 1588 block initialization This patch adds the first parts of the 1588 support in the MSCC PHY, with registers definition and the 1588 block initialization. Those PHYs are distributed in hardware packages containing multiple times the PHY. The VSC8584 for example is composed of 4 PHYs. With hardware packages, parts of the logic is usually common and one of the PHY has to be used for some parts of the initialization. Following this logic, the 1588 blocks of those PHYs are shared between two PHYs and accessing the registers has to be done using the "base" PHY of the group. This is handled thanks to helpers in the PTP code (and locks). We also need the MDIO bus lock while performing a single read or write to the 1588 registers as the read/write are composed of multiple MDIO transactions (and we don't want other threads updating the page). Co-developed-by: Antoine Tenart Signed-off-by: Quentin Schulz Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 4c8c5dc57ae8226ceb7e72fb7a5cfa8e743c0a2b Author: Antoine Tenart Date: Tue Jun 23 16:30:10 2020 +0200 net: phy: mscc: take into account the 1588 block in MACsec init This patch takes in account the use of the 1588 block in the MACsec initialization, as a conditional configuration has to be done (when the 1588 block is used). Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 6705b58daf844f219ca85231c69d019fbc30b992 Author: Quentin Schulz Date: Tue Jun 23 16:30:09 2020 +0200 net: phy: mscc: remove the TR CLK disable magic value This patch adds a define for the 0x8000 magic value used to perform enable/disable actions on the "token ring clock". The patch is only cosmetic. Signed-off-by: Quentin Schulz Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c7cd2a6a7b084f3d57ce4d783685e37d16327f9f Author: Antoine Tenart Date: Tue Jun 23 16:30:08 2020 +0200 net: phy: mscc: fix copyright and author information in MACsec All headers in the MSCC PHY driver have been copied and pasted from the original mscc.c file. However the information is not necessarily correct, as in the MACsec support. Fix this. Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0ef44e5cab8dbf0a0327871b48fe7c8425d0d885 Author: Antoine Tenart Date: Tue Jun 23 16:30:07 2020 +0200 net: phy: add support for a common probe between shared PHYs Shared PHYs (PHYs in the same hardware package) may have shared registers and their drivers would usually need to share information. There is currently a way to have a shared (part of the) init, by using phy_package_init_once(). This patch extends the logic to share parts of the probe to allow sharing the initialization of locks or resources retrieval. Signed-off-by: Antoine Tenart Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 14c2b89634a28577a242cb34f339d981da6d3ef6 Author: Leon Romanovsky Date: Wed Jun 24 13:54:21 2020 +0300 RDMA/core: Delete not-used create RWQ table function The RWQ table is used for RSS uverbs and not in used for the kernel consumers, delete ib_create_rwq_ind_table() routine that is not called at all. Link: https://lore.kernel.org/r/20200624105422.1452290-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5611074a20fd17e05cda1f3897fce3528c4b26eb Author: Shay Drory Date: Sun Jun 21 13:47:38 2020 +0300 IB/mad: Delete RMPP_STATE_CANCELING state The cancel_delayed_work can be called under lock since it doesn't sleep. This makes the RMPP_STATE_CANCELING state not needed anymore, remove it. Link: https://lore.kernel.org/r/20200621104738.54850-5-leon@kernel.org Signed-off-by: Shay Drory Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e41c425349bc9fa5399717c21f77bb7cd911084f Author: Shay Drory Date: Sun Jun 21 13:47:37 2020 +0300 IB/mad: Change atomics to refcount API The refcount API provides better safety than atomics API. Therefore, change atomic functions to refcount functions. Link: https://lore.kernel.org/r/20200621104738.54850-4-leon@kernel.org Signed-off-by: Shay Drory Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b9af0e2d5aeab77bef33bd3df073c3c96b69ec79 Author: Shay Drory Date: Sun Jun 21 13:47:36 2020 +0300 IB/mad: Issue complete whenever decrements agent refcount Replace calls of atomic_dec() to mad_agent_priv->refcount with calls to deref_mad_agent() in order to issue complete. Most likely the refcount is > 1 at these points, but it is difficult to prove. Performance is not important on these paths, so be obviously correct. Link: https://lore.kernel.org/r/20200621104738.54850-3-leon@kernel.org Signed-off-by: Shay Drory Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3a0377d993d7c62cbff623bce13eac077490f560 Author: Abhishek Pandit-Subedi Date: Wed Jun 24 11:34:19 2020 -0700 Bluetooth: Don't restart scanning if paused When restarting LE scanning, check if it's currently paused before enabling passive scanning. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 34a68655a1414a34cc950b7fc5478a1b4f0db9b8 Author: Abhishek Pandit-Subedi Date: Wed Jun 24 11:24:30 2020 -0700 Bluetooth: btusb: BTUSB_WAKEUP_DISABLE prevents wake When the BTUSB_WAKEUP_DISABLE flag is set, always return true for prevent wake. This tells the suspend notifier not to prepare the controller for reconnections during suspend. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 6933568aec92dd6432207baaf59378d01f55a14f Author: Abhishek Pandit-Subedi Date: Wed Jun 24 11:11:44 2020 -0700 Bluetooth: btusb: Reset port on cmd timeout QCA_ROME sometimes gets into a state where it is unresponsive to commands. Since it doesn't have support for a reset gpio, reset the usb port when this occurs instead. Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit f9bcf96837f158db6ea982d15cd2c8161ca6bc23 Author: Dmitry Yakunin Date: Sat Jun 20 18:30:52 2020 +0300 bpf: Add SO_KEEPALIVE and related options to bpf_setsockopt This patch adds support of SO_KEEPALIVE flag and TCP related options to bpf_setsockopt() routine. This is helpful if we want to enable or tune TCP keepalive for applications which don't do it in the userspace code. v3: - update kernel-doc in uapi (Nikita Vetoshkin ) v4: - update kernel-doc in tools too (Alexei Starovoitov) - add test to selftests (Alexei Starovoitov) Signed-off-by: Dmitry Yakunin Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200620153052.9439-3-zeil@yandex-team.ru commit aad4a0a9513af962137c4842463d11ed491eec37 Author: Dmitry Yakunin Date: Sat Jun 20 18:30:51 2020 +0300 tcp: Expose tcp_sock_set_keepidle_locked This is preparation for usage in bpf_setsockopt. v2: - remove redundant EXPORT_SYMBOL (Alexei Starovoitov) Signed-off-by: Dmitry Yakunin Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200620153052.9439-2-zeil@yandex-team.ru commit dfde1d7dee9bfd095a4f16c9e0579a10f4092e81 Author: Dmitry Yakunin Date: Sat Jun 20 18:30:50 2020 +0300 sock: Move sock_valbool_flag to header This is preparation for usage in bpf_setsockopt. Signed-off-by: Dmitry Yakunin Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20200620153052.9439-1-zeil@yandex-team.ru commit fea549b030152d5336dbd960b357a4d4b841a851 Author: Alexei Starovoitov Date: Wed Jun 24 11:10:59 2020 -0700 selftests/bpf: Workaround for get_stack_rawtp test. ./test_progs-no_alu32 -t get_stack_raw_tp fails due to: 52: (85) call bpf_get_stack#67 53: (bf) r8 = r0 54: (bf) r1 = r8 55: (67) r1 <<= 32 56: (c7) r1 s>>= 32 ; if (usize < 0) 57: (c5) if r1 s< 0x0 goto pc+26 R0=inv(id=0,smax_value=800) R1_w=inv(id=0,umax_value=800,var_off=(0x0; 0x3ff)) R6=ctx(id=0,off=0,imm=0) R7=map_value(id=0,off=0,ks=4,vs=1600,imm=0) R8_w=inv(id=0,smax_value=800) R9=inv800 ; ksize = bpf_get_stack(ctx, raw_data + usize, max_len - usize, 0); 58: (1f) r9 -= r8 ; ksize = bpf_get_stack(ctx, raw_data + usize, max_len - usize, 0); 59: (bf) r2 = r7 60: (0f) r2 += r1 regs=1 stack=0 before 52: (85) call bpf_get_stack#67 ; ksize = bpf_get_stack(ctx, raw_data + usize, max_len - usize, 0); 61: (bf) r1 = r6 62: (bf) r3 = r9 63: (b7) r4 = 0 64: (85) call bpf_get_stack#67 R0=inv(id=0,smax_value=800) R1_w=ctx(id=0,off=0,imm=0) R2_w=map_value(id=0,off=0,ks=4,vs=1600,umax_value=800,var_off=(0x0; 0x3ff),s32_max_value=1023,u32_max_value=1023) R3_w=inv(id=0,umax_value=9223372036854776608) R3 unbounded memory access, use 'var &= const' or 'if (var < const)' In the C code: usize = bpf_get_stack(ctx, raw_data, max_len, BPF_F_USER_STACK); if (usize < 0) return 0; ksize = bpf_get_stack(ctx, raw_data + usize, max_len - usize, 0); if (ksize < 0) return 0; We used to have problem with pointer arith in R2. Now it's a problem with two integers in R3. 'if (usize < 0)' is comparing R1 and makes it [0,800], but R8 stays [-inf,800]. Both registers represent the same 'usize' variable. Then R9 -= R8 is doing 800 - [-inf, 800] so the result of "max_len - usize" looks unbounded to the verifier while it's obvious in C code that "max_len - usize" should be [0, 800]. To workaround the problem convert ksize and usize variables from int to long. Signed-off-by: Alexei Starovoitov commit 5e09bc51d07b31922b4f6156f3058a9e743c68de Author: Sivaprakash Murugesan Date: Mon Jun 8 19:41:19 2020 +0530 arm64: dts: ipq8074: enable USB support IPQ8074 has two super speed usb ports, add phy and dwc3 nodes to enable them. Signed-off-by: Sivaprakash Murugesan Link: https://lore.kernel.org/r/1591625479-4483-6-git-send-email-sivaprak@codeaurora.org Signed-off-by: Bjorn Andersson commit 1d99d491dc96f4690534c67fd7361e2e74dd4c70 Author: Sivaprakash Murugesan Date: Mon Jun 8 19:41:18 2020 +0530 phy: qcom-qusb2: Add ipq8074 device compatible Add ipq8074 qusb2 device compatible for high speed usb support. Signed-off-by: Sivaprakash Murugesan Tested-by: Sricharan R Reviewed-by: Sricharan R Link: https://lore.kernel.org/r/1591625479-4483-5-git-send-email-sivaprak@codeaurora.org Signed-off-by: Vinod Koul commit 507156f5a99fa03c0dce8281ff3d26fbf473630c Author: Sivaprakash Murugesan Date: Mon Jun 8 19:41:17 2020 +0530 phy: qcom-qmp: Add USB QMP PHY support for IPQ8074 Add QMP USB PHY found in IPQ8074 Co-developed-by: Balaji Prakash J Signed-off-by: Balaji Prakash J Signed-off-by: Sivaprakash Murugesan Tested-by: Sricharan R Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/1591625479-4483-4-git-send-email-sivaprak@codeaurora.org Signed-off-by: Vinod Koul commit ba971c2ff59954c47de8c864adf9fc8f27863208 Author: Sivaprakash Murugesan Date: Mon Jun 8 19:41:16 2020 +0530 dt-bindings: phy: qcom,qusb2: Add ipq8074 device compatible Add ipq8074 compatible in QUSB2 PHY for high speed USB support. Signed-off-by: Sivaprakash Murugesan Tested-by: Sricharan R Acked-by: Rob Herring Link: https://lore.kernel.org/r/1591625479-4483-3-git-send-email-sivaprak@codeaurora.org Signed-off-by: Vinod Koul commit 066571516bea4dd903ae077a00df802a19b71248 Author: Sivaprakash Murugesan Date: Mon Jun 8 19:41:15 2020 +0530 dt-bindings: phy: qcom,qmp: Add ipq8074 usb dt bindings Add ipq8074 qmp phy device compatible for super speed usb support. Signed-off-by: Sivaprakash Murugesan Tested-by: Sricharan R Acked-by: Rob Herring Link: https://lore.kernel.org/r/1591625479-4483-2-git-send-email-sivaprak@codeaurora.org Signed-off-by: Vinod Koul commit c233a2edf80de537d195f80fd46d92a7348d9a33 Author: Krzysztof Kozlowski Date: Wed Jun 17 17:28:03 2020 +0200 phy: exynos: Rename Exynos to lowercase Fix up inconsistent usage of upper and lowercase letters in "Exynos" name. "EXYNOS" is not an abbreviation but a regular trademarked name. Therefore it should be written with lowercase letters starting with capital letter. The lowercase "Exynos" name is promoted by its manufacturer Samsung Electronics Co., Ltd., in advertisement materials and on website. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200617152803.17941-1-krzk@kernel.org Signed-off-by: Vinod Koul commit 2229a12b64a4df7128b6e2d86be2688f8c76efec Author: Ard Biesheuvel Date: Wed Jun 17 10:25:05 2020 +0200 ACPI: tables: avoid relocations for table signature array On architectures that implement KASLR using the ELF native RELA relocation format (such as arm64), every absolute reference in the code incurs an overhead of 24 bytes in the .rela section. So storing a 41 element array of 4 character signature strings using an array of pointer-to-char incurs an 8x overhead (32 bytes per entry => ~1500 bytes), and given the fixed length of the entries, and the fact that the array is only used locally, it is much better to use an array of arrays here, which gets rid of the overhead entirely. While at it, make it __initconst, as it is never referenced except from __init code. Signed-off-by: Ard Biesheuvel Signed-off-by: Rafael J. Wysocki commit 1ac6f21a948b45a49737a5eff6b4dae9f37a8dc0 Author: Xu Yilun Date: Wed Jun 24 09:31:26 2020 +0800 spi: altera: fix module autoload Add the MODULE_DEVICE_TABLE macro for the platform_device_id table to allow proper creation of modalias strings and fix autoloading module for this driver. Signed-off-by: Xu Yilun Signed-off-by: Russ Weight Link: https://lore.kernel.org/r/1592962286-25752-3-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit de5fd9cb6a3f89a1ac8f27883d029f823112243f Author: Xu Yilun Date: Wed Jun 24 09:31:25 2020 +0800 spi: altera: fix driver matching failure of the device ID "spi_altera" The driver is expected to support device ID "spi_altera" for MMIO accessed devices, device ID "subdev_spi_altera" for indirect accessed devices. But the platform bus will not try driver name match anymore if the platform driver has an id_table. So the "spi_altera" should also be added to id_table. Signed-off-by: Xu Yilun Signed-off-by: Russ Weight Link: https://lore.kernel.org/r/1592962286-25752-2-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit 134043cd64c96906c7c04515a745d2073d4d1939 Author: Jason Yan Date: Mon Jun 15 12:00:47 2020 +0800 ACPI: PAD: Eliminate usage of uninitialized_var() macro This is an effort to eliminate the uninitialized_var() macro[1]. The use of this macro is the wrong solution because it forces off ANY analysis by the compiler for a given variable. It even masks "unused variable" warnings. Quoted from Linus[2]: "It's a horrible thing to use, in that it adds extra cruft to the source code, and then shuts up a compiler warning (even the _reliable_ warnings from gcc)." The gcc option "-Wmaybe-uninitialized" has been disabled and this change will not produce any warnnings even with "make W=1". Link: https://github.com/KSPP/linux/issues/81 # [1] Link: https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ # [2] Signed-off-by: Jason Yan Signed-off-by: Rafael J. Wysocki commit 0e0ffa855d1590e54ec0033404a49e2e57e294fe Author: Lukasz Luba Date: Wed May 27 10:58:54 2020 +0100 OPP: refactor dev_pm_opp_of_register_em() and update related drivers The Energy Model framework supports not only CPU devices. Drop the CPU specific interface with cpumask and add struct device. Add also a return value, user might use it. This new interface provides easy way to create a simple Energy Model, which then might be used by e.g. thermal subsystem. Acked-by: Daniel Lezcano Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 7b7570ad0d76410bdefe61d77aa624900e2396ce Author: Lukasz Luba Date: Wed May 27 10:58:53 2020 +0100 Documentation: power: update Energy Model description The Energy Model framework supports also other devices than CPUs. Update related information and add description for the new usage. Acked-by: Daniel Lezcano Acked-by: Quentin Perret Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit f0b5694791ce70dba16758c3b838d5ddc7731b02 Author: Lukasz Luba Date: Wed May 27 10:58:52 2020 +0100 PM / EM: change name of em_pd_energy to em_cpu_energy Energy Model framework now supports other devices than CPUs. Refactor some of the functions in order to prevent wrong usage. The old function em_pd_energy has to generic name. It must not be used without proper cpumask pointer, which is possible only for CPU devices. Thus, rename it and add proper description to warn of potential wrong usage for other devices. Acked-by: Daniel Lezcano Acked-by: Quentin Perret Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 07891f15d91317b2220a0b610a2d7e324a88105d Author: Lukasz Luba Date: Wed May 27 10:58:51 2020 +0100 PM / EM: remove em_register_perf_domain Remove old function em_register_perf_domain which is no longer needed. There is em_dev_register_perf_domain that covers old use cases and new as well. Acked-by: Daniel Lezcano Acked-by: Quentin Perret Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 1bc138c622959979eb547be2d3bbc6442a5c80b0 Author: Lukasz Luba Date: Wed Jun 10 11:12:23 2020 +0100 PM / EM: add support for other devices than CPUs in Energy Model Add support for other devices than CPUs. The registration function does not require a valid cpumask pointer and is ready to handle new devices. Some of the internal structures has been reorganized in order to keep consistent view (like removing per_cpu pd pointers). Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 621c1f42945e76015c3a585e7a9fe6e71665eba0 Author: Christoph Hellwig Date: Sat Jun 20 09:16:44 2020 +0200 block: move struct block_device to blk_types.h Move the struct block_device definition together with most of the block layer definitions, as it has nothing to do with the rest of fs.h. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 1a4dcfa8bc10d6bf4f94ac20adc2b30a1da72cfd Author: Christoph Hellwig Date: Sat Jun 20 09:16:43 2020 +0200 block: reduce ifdef CONFIG_BLOCK madness in headers Large part of bio.h, blkdev.h and genhd.h are under ifdef CONFIG_BLOCK for no good reason. Only stub out function that are called from code that is not dependent on CONFIG_BLOCK and leave the harmless other declarations around. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d2de7ea48d83195ef1310555f1fdd9e8e1bab0d3 Author: Christoph Hellwig Date: Sat Jun 20 09:16:42 2020 +0200 fs: move the buffer_heads_over_limit stub to buffer_head.h Move the !CONFIG_BLOCK stub to the same place as the non-stub declaration. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 3f1266f1f82d7b8c72472a8921e80aa3e611fb62 Author: Christoph Hellwig Date: Sat Jun 20 09:16:41 2020 +0200 block: move block-related definitions out of fs.h Move most of the block related definition out of fs.h into more suitable headers. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit dd0dca223e091bbacdd3c7ce9cf06b373da59816 Author: Christoph Hellwig Date: Sat Jun 20 09:16:40 2020 +0200 block: simplify sb_is_blkdev_sb Just use IS_ENABLED instead of providing a stub for !CONFIG_BLOCK. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 75362a1792d16a61f0277d3610dea2f50a16bf3e Author: Christoph Hellwig Date: Sat Jun 20 09:16:39 2020 +0200 fs: remove the mount_bdev and kill_block_super stubs No one calls these functions without CONFIG_BLOCK, so don't bother stubbing them out. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 4e24566a134ea167441a1ffa3d439a27cf400880 Author: Christoph Hellwig Date: Sat Jun 20 09:16:38 2020 +0200 fs: remove the HAVE_UNLOCKED_IOCTL and HAVE_COMPAT_IOCTL defines These are not defined anywhere, and contrary to the comments we really do not care about out of tree code at all. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 7dbac5baa887facf80373825b8f66c626703621f Author: Christoph Hellwig Date: Sat Jun 20 09:16:37 2020 +0200 fs: remove an unused block_device_operations forward declaration Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit 764b23bd9af8ff8ecc664816e39d4791b6a72bfd Author: Christoph Hellwig Date: Sat Jun 20 09:16:36 2020 +0200 block: mark bd_finish_claiming static Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit b818f09e46f9f6a66471f81bf83094ff0a477d0c Author: Christoph Hellwig Date: Sat Jun 20 09:16:35 2020 +0200 tty/sysrq: emergency_thaw_all does not depend on CONFIG_BLOCK We can also thaw non-block file systems. Remove the CONFIG_BLOCK in sysrq.c after making the prototype available unconditionally. Signed-off-by: Christoph Hellwig Reviewed-by: Bart Van Assche Reviewed-by: Greg Kroah-Hartman Signed-off-by: Jens Axboe commit 7a804c34c2db9e550c6f504f06a6a5cac7a44758 Author: Christoph Hellwig Date: Tue Jun 23 18:22:39 2020 +0200 nvme-rdma: fix a missing completion with remove invalidation Revert and incorret transformation that caused requests using remote invalidation to never complete. Fixes: 421147be863b ("nvme-rdma: factor out a nvme_rdma_end_request helper") Reported-by: Bart Van Assche Signed-off-by: Christoph Hellwig Tested-by: Bart Van Assche Signed-off-by: Jens Axboe commit f61d6e259c7ebb9a134dee5cd0b32c192d726984 Author: Gustavo A. R. Silva Date: Fri Jun 19 18:08:30 2020 -0500 blk-iocost: Use struct_size() in kzalloc_node() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Jens Axboe commit 1f4fe21cf45c799a2fef41ae23dd2a8a8dbb93b7 Author: Gustavo A. R. Silva Date: Fri Jun 19 19:49:49 2020 -0500 block: bio: Use struct_size() in kmalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Jens Axboe commit 85e0cbbb8a79537dbc465e9deb449a08b2b092a6 Author: Luis Chamberlain Date: Fri Jun 19 20:47:30 2020 +0000 block: create the request_queue debugfs_dir on registration We were only creating the request_queue debugfs_dir only for make_request block drivers (multiqueue), but never for request-based block drivers. We did this as we were only creating non-blktrace additional debugfs files on that directory for make_request drivers. However, since blktrace *always* creates that directory anyway, we special-case the use of that directory on blktrace. Other than this being an eye-sore, this exposes request-based block drivers to the same debugfs fragile race that used to exist with make_request block drivers where if we start adding files onto that directory we can later run a race with a double removal of dentries on the directory if we don't deal with this carefully on blktrace. Instead, just simplify things by always creating the request_queue debugfs_dir on request_queue registration. Rename the mutex also to reflect the fact that this is used outside of the blktrace context. Signed-off-by: Luis Chamberlain Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit b431ef837e3374da0db8ff6683170359aaa0859c Author: Luis Chamberlain Date: Fri Jun 19 20:47:29 2020 +0000 blktrace: ensure our debugfs dir exists We make an assumption that a debugfs directory exists, but since this can fail ensure it exists before allowing blktrace setup to complete. Otherwise we end up stuffing blktrace files on the debugfs root directory. In the worst case scenario this *in theory* can create an eventual panic *iff* in the future a similarly named file is created prior on the debugfs root directory. This theoretical crash can happen due to a recursive removal followed by a specific dentry removal. This doesn't fix any known crash, however I have seen the files go into the main debugfs root directory in cases where the debugfs directory was not created due to other internal bugs with blktrace now fixed. blktrace is also completely useless without this directory, so this ensures to userspace we only setup blktrace if the kernel can stuff files where they are supposed to go into. debugfs directory creations typically aren't checked for, and we have maintainers doing sweep removals of these checks, but since we need this check to ensure proper userspace blktrace functionality we make sure to annotate the justification for the check. Signed-off-by: Luis Chamberlain Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit bad8e64fb19d3a0de5e564d9a7271c31bd684369 Author: Luis Chamberlain Date: Fri Jun 19 20:47:28 2020 +0000 blktrace: fix debugfs use after free On commit 6ac93117ab00 ("blktrace: use existing disk debugfs directory") merged on v4.12 Omar fixed the original blktrace code for request-based drivers (multiqueue). This however left in place a possible crash, if you happen to abuse blktrace while racing to remove / add a device. We used to use asynchronous removal of the request_queue, and with that the issue was easier to reproduce. Now that we have reverted to synchronous removal of the request_queue, the issue is still possible to reproduce, its however just a bit more difficult. We essentially run two instances of break-blktrace which add/remove a loop device, and setup a blktrace and just never tear the blktrace down. We do this twice in parallel. This is easily reproduced with the script run_0004.sh from break-blktrace [0]. We can end up with two types of panics each reflecting where we race, one a failed blktrace setup: [ 252.426751] debugfs: Directory 'loop0' with parent 'block' already present! [ 252.432265] BUG: kernel NULL pointer dereference, address: 00000000000000a0 [ 252.436592] #PF: supervisor write access in kernel mode [ 252.439822] #PF: error_code(0x0002) - not-present page [ 252.442967] PGD 0 P4D 0 [ 252.444656] Oops: 0002 [#1] SMP NOPTI [ 252.446972] CPU: 10 PID: 1153 Comm: break-blktrace Tainted: G E 5.7.0-rc2-next-20200420+ #164 [ 252.452673] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1 04/01/2014 [ 252.456343] RIP: 0010:down_write+0x15/0x40 [ 252.458146] Code: eb ca e8 ae 22 8d ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 55 48 89 fd e8 52 db ff ff 31 c0 ba 01 00 00 00 48 0f b1 55 00 75 0f 48 8b 04 25 c0 8b 01 00 48 89 45 08 5d [ 252.463638] RSP: 0018:ffffa626415abcc8 EFLAGS: 00010246 [ 252.464950] RAX: 0000000000000000 RBX: ffff958c25f0f5c0 RCX: ffffff8100000000 [ 252.466727] RDX: 0000000000000001 RSI: ffffff8100000000 RDI: 00000000000000a0 [ 252.468482] RBP: 00000000000000a0 R08: 0000000000000000 R09: 0000000000000001 [ 252.470014] R10: 0000000000000000 R11: ffff958d1f9227ff R12: 0000000000000000 [ 252.471473] R13: ffff958c25ea5380 R14: ffffffff8cce15f1 R15: 00000000000000a0 [ 252.473346] FS: 00007f2e69dee540(0000) GS:ffff958c2fc80000(0000) knlGS:0000000000000000 [ 252.475225] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 252.476267] CR2: 00000000000000a0 CR3: 0000000427d10004 CR4: 0000000000360ee0 [ 252.477526] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 252.478776] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 252.479866] Call Trace: [ 252.480322] simple_recursive_removal+0x4e/0x2e0 [ 252.481078] ? debugfs_remove+0x60/0x60 [ 252.481725] ? relay_destroy_buf+0x77/0xb0 [ 252.482662] debugfs_remove+0x40/0x60 [ 252.483518] blk_remove_buf_file_callback+0x5/0x10 [ 252.484328] relay_close_buf+0x2e/0x60 [ 252.484930] relay_open+0x1ce/0x2c0 [ 252.485520] do_blk_trace_setup+0x14f/0x2b0 [ 252.486187] __blk_trace_setup+0x54/0xb0 [ 252.486803] blk_trace_ioctl+0x90/0x140 [ 252.487423] ? do_sys_openat2+0x1ab/0x2d0 [ 252.488053] blkdev_ioctl+0x4d/0x260 [ 252.488636] block_ioctl+0x39/0x40 [ 252.489139] ksys_ioctl+0x87/0xc0 [ 252.489675] __x64_sys_ioctl+0x16/0x20 [ 252.490380] do_syscall_64+0x52/0x180 [ 252.491032] entry_SYSCALL_64_after_hwframe+0x44/0xa9 And the other on the device removal: [ 128.528940] debugfs: Directory 'loop0' with parent 'block' already present! [ 128.615325] BUG: kernel NULL pointer dereference, address: 00000000000000a0 [ 128.619537] #PF: supervisor write access in kernel mode [ 128.622700] #PF: error_code(0x0002) - not-present page [ 128.625842] PGD 0 P4D 0 [ 128.627585] Oops: 0002 [#1] SMP NOPTI [ 128.629871] CPU: 12 PID: 544 Comm: break-blktrace Tainted: G E 5.7.0-rc2-next-20200420+ #164 [ 128.635595] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1 04/01/2014 [ 128.640471] RIP: 0010:down_write+0x15/0x40 [ 128.643041] Code: eb ca e8 ae 22 8d ff cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 55 48 89 fd e8 52 db ff ff 31 c0 ba 01 00 00 00 48 0f b1 55 00 75 0f 65 48 8b 04 25 c0 8b 01 00 48 89 45 08 5d [ 128.650180] RSP: 0018:ffffa9c3c05ebd78 EFLAGS: 00010246 [ 128.651820] RAX: 0000000000000000 RBX: ffff8ae9a6370240 RCX: ffffff8100000000 [ 128.653942] RDX: 0000000000000001 RSI: ffffff8100000000 RDI: 00000000000000a0 [ 128.655720] RBP: 00000000000000a0 R08: 0000000000000002 R09: ffff8ae9afd2d3d0 [ 128.657400] R10: 0000000000000056 R11: 0000000000000000 R12: 0000000000000000 [ 128.659099] R13: 0000000000000000 R14: 0000000000000003 R15: 00000000000000a0 [ 128.660500] FS: 00007febfd995540(0000) GS:ffff8ae9afd00000(0000) knlGS:0000000000000000 [ 128.662204] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 128.663426] CR2: 00000000000000a0 CR3: 0000000420042003 CR4: 0000000000360ee0 [ 128.664776] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 128.666022] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 128.667282] Call Trace: [ 128.667801] simple_recursive_removal+0x4e/0x2e0 [ 128.668663] ? debugfs_remove+0x60/0x60 [ 128.669368] debugfs_remove+0x40/0x60 [ 128.669985] blk_trace_free+0xd/0x50 [ 128.670593] __blk_trace_remove+0x27/0x40 [ 128.671274] blk_trace_shutdown+0x30/0x40 [ 128.671935] blk_release_queue+0x95/0xf0 [ 128.672589] kobject_put+0xa5/0x1b0 [ 128.673188] disk_release+0xa2/0xc0 [ 128.673786] device_release+0x28/0x80 [ 128.674376] kobject_put+0xa5/0x1b0 [ 128.674915] loop_remove+0x39/0x50 [loop] [ 128.675511] loop_control_ioctl+0x113/0x130 [loop] [ 128.676199] ksys_ioctl+0x87/0xc0 [ 128.676708] __x64_sys_ioctl+0x16/0x20 [ 128.677274] do_syscall_64+0x52/0x180 [ 128.677823] entry_SYSCALL_64_after_hwframe+0x44/0xa9 The common theme here is: debugfs: Directory 'loop0' with parent 'block' already present This crash happens because of how blktrace uses the debugfs directory where it places its files. Upon init we always create the same directory which would be needed by blktrace but we only do this for make_request drivers (multiqueue) block drivers. When you race a removal of these devices with a blktrace setup you end up in a situation where the make_request recursive debugfs removal will sweep away the blktrace files and then later blktrace will also try to remove individual dentries which are already NULL. The inverse is also possible and hence the two types of use after frees. We don't create the block debugfs directory on init for these types of block devices: * request-based block driver block devices * every possible partition * scsi-generic And so, this race should in theory only be possible with make_request drivers. We can fix the UAF by simply re-using the debugfs directory for make_request drivers (multiqueue) and only creating the ephemeral directory for the other type of block devices. The new clarifications on relying on the q->blk_trace_mutex *and* also checking for q->blk_trace *prior* to processing a blktrace ensures the debugfs directories are only created if no possible directory name clashes are possible. This goes tested with: o nvme partitions o ISCSI with tgt, and blktracing against scsi-generic with: o block o tape o cdrom o media changer o blktests This patch is part of the work which disputes the severity of CVE-2019-19770 which shows this issue is not a core debugfs issue, but a misuse of debugfs within blktace. Fixes: 6ac93117ab00 ("blktrace: use existing disk debugfs directory") Reported-by: syzbot+603294af2d01acfdd6da@syzkaller.appspotmail.com Signed-off-by: Luis Chamberlain Reviewed-by: Christoph Hellwig Cc: Bart Van Assche Cc: Omar Sandoval Cc: Hannes Reinecke Cc: Nicolai Stange Cc: Greg Kroah-Hartman Cc: Michal Hocko Cc: "Martin K. Petersen" Cc: "James E.J. Bottomley" Cc: yu kuai Signed-off-by: Jens Axboe commit 200f93377220504c5e56754823e7adfea6037f1a Author: Luis Chamberlain Date: Fri Jun 19 20:47:27 2020 +0000 loop: be paranoid on exit and prevent new additions / removals Be pedantic on removal as well and hold the mutex. This should prevent uses of addition while we exit. Signed-off-by: Luis Chamberlain Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit a67549c8e568627290234e9fbe833cb9dfd36b55 Author: Luis Chamberlain Date: Fri Jun 19 20:47:26 2020 +0000 blktrace: annotate required lock on do_blk_trace_setup() Ensure it is clear which lock is required on do_blk_trace_setup(). Suggested-by: Bart Van Assche Signed-off-by: Luis Chamberlain Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit e8c7d14ac6c37c173ec606907d38802b00302988 Author: Luis Chamberlain Date: Fri Jun 19 20:47:25 2020 +0000 block: revert back to synchronous request_queue removal Commit dc9edc44de6c ("block: Fix a blk_exit_rl() regression") merged on v4.12 moved the work behind blk_release_queue() into a workqueue after a splat floated around which indicated some work on blk_release_queue() could sleep in blk_exit_rl(). This splat would be possible when a driver called blk_put_queue() or blk_cleanup_queue() (which calls blk_put_queue() as its final call) from an atomic context. blk_put_queue() decrements the refcount for the request_queue kobject, and upon reaching 0 blk_release_queue() is called. Although blk_exit_rl() is now removed through commit db6d99523560 ("block: remove request_list code") on v5.0, we reserve the right to be able to sleep within blk_release_queue() context. The last reference for the request_queue must not be called from atomic context. *When* the last reference to the request_queue reaches 0 varies, and so let's take the opportunity to document when that is expected to happen and also document the context of the related calls as best as possible so we can avoid future issues, and with the hopes that the synchronous request_queue removal sticks. We revert back to synchronous request_queue removal because asynchronous removal creates a regression with expected userspace interaction with several drivers. An example is when removing the loopback driver, one uses ioctls from userspace to do so, but upon return and if successful, one expects the device to be removed. Likewise if one races to add another device the new one may not be added as it is still being removed. This was expected behavior before and it now fails as the device is still present and busy still. Moving to asynchronous request_queue removal could have broken many scripts which relied on the removal to have been completed if there was no error. Document this expectation as well so that this doesn't regress userspace again. Using asynchronous request_queue removal however has helped us find other bugs. In the future we can test what could break with this arrangement by enabling CONFIG_DEBUG_KOBJECT_RELEASE. While at it, update the docs with the context expectations for the request_queue / gendisk refcount decrement, and make these expectations explicit by using might_sleep(). Fixes: dc9edc44de6c ("block: Fix a blk_exit_rl() regression") Suggested-by: Nicolai Stange Signed-off-by: Luis Chamberlain Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Cc: Bart Van Assche Cc: Omar Sandoval Cc: Hannes Reinecke Cc: Nicolai Stange Cc: Greg Kroah-Hartman Cc: Michal Hocko Cc: yu kuai Signed-off-by: Jens Axboe commit 763b58923aeb0a06c5a5f7e5fbb4c654c644d91d Author: Luis Chamberlain Date: Fri Jun 19 20:47:24 2020 +0000 block: clarify context for refcount increment helpers Let us clarify the context under which the helpers to increment the refcount for the gendisk and request_queue can be called under. We make this explicit on the places where we may sleep with might_sleep(). We don't address the decrement context yet, as that needs some extra work and fixes, but will be addressed in the next patch. Signed-off-by: Luis Chamberlain Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit b5bd357cf8b65d31e32b1668293cbeedb6c06334 Author: Luis Chamberlain Date: Fri Jun 19 20:47:23 2020 +0000 block: add docs for gendisk / request_queue refcount helpers This adds documentation for the gendisk / request_queue refcount helpers. Signed-off-by: Luis Chamberlain Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Jens Axboe commit ff029451496364eef0d342618dfc9972b78f3392 Author: Christoph Hellwig Date: Thu Jun 11 08:44:52 2020 +0200 nvme: use blk_mq_complete_request_remote to avoid an indirect function call Use the new blk_mq_complete_request_remote helper to avoid an indirect function call in the completion fast path. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 8446546cc21819478542e9d728bce85e39898fc5 Author: Christoph Hellwig Date: Thu Jun 11 08:44:51 2020 +0200 nvme-rdma: factor out a nvme_rdma_end_request helper Factor a small sniplet of duplicated code into a new helper in preparation for making this sniplet a little bit less trivial. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 40d09b53bfc557af7481b9d80f060a7ac9c7d314 Author: Christoph Hellwig Date: Thu Jun 11 08:44:50 2020 +0200 blk-mq: add a new blk_mq_complete_request_remote API This is a variant of blk_mq_complete_request_remote that only completes the request if it needs to be bounced to another CPU or a softirq. If the request can be completed locally the function returns false and lets the driver complete it without requring and indirect function call. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 963395269c758641e1cb7208f3bdce6824ea608d Author: Christoph Hellwig Date: Thu Jun 11 08:44:49 2020 +0200 blk-mq: factor out a blk_mq_complete_need_ipi helper Add a helper to decide if we can complete locally or need an IPI. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 4c8fc19686dc761f600833fc9b8fa390eaf73dd5 Author: Christoph Hellwig Date: Thu Jun 11 08:44:48 2020 +0200 blk-mq: remove the get_cpu/put_cpu pair in blk_mq_complete_request We don't really care if we get migrated during the I/O completion. In the worth case we either perform an IPI that wasn't required, or complete the request on a CPU which we just migrated off. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 15f73f5b3e5958f2d169fe13c420eeeeae07bbf2 Author: Christoph Hellwig Date: Thu Jun 11 08:44:47 2020 +0200 blk-mq: move failure injection out of blk_mq_complete_request Move the call to blk_should_fake_timeout out of blk_mq_complete_request and into the drivers, skipping call sites that are obvious error handlers, and remove the now superflous blk_mq_force_complete_rq helper. This ensures we don't keep injecting errors into completions that just terminate the Linux request after the hardware has been reset or the command has been aborted. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d391a7a399e46315a8adc65eb8fb5d9123b91700 Author: Christoph Hellwig Date: Thu Jun 11 08:44:46 2020 +0200 blk-mq: merge the softirq vs non-softirq IPI logic Both the softirq path for single queue devices and the multi-queue completion handler share the same logic to figure out if we need an IPI for the completion and eventually issue it. Merge the two versions into a single unified code path. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit d6cc464cc58424e137eca5e0a53226291044f5d2 Author: Christoph Hellwig Date: Thu Jun 11 08:44:45 2020 +0200 blk-mq: short cut the IPI path in blk_mq_force_complete_rq for !SMP Let the compile optimize out the entire IPI path, given that we are obviously not going to use it. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 6aab1da603e731383b342dbe612f92cd222fe56b Author: Christoph Hellwig Date: Thu Jun 11 08:44:44 2020 +0200 blk-mq: complete polled requests directly Even for single queue devices there is no point in offloading a polled completion to the softirq, given that blk_mq_force_complete_rq is called from the polling thread in that case and thus there are no starvation issues. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit dea6f3993812c82b4dd5f61acd41c55a311a445f Author: Christoph Hellwig Date: Thu Jun 11 08:44:43 2020 +0200 blk-mq: remove raise_blk_irq By open coding raise_blk_irq in the only caller, and replacing the ifdef CONFIG_SMP with an IS_ENABLED check the flow in the caller can be significantly simplified. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 115243f5534c7b3980cc946e00f79740fdc0e068 Author: Christoph Hellwig Date: Thu Jun 11 08:44:42 2020 +0200 blk-mq: factor out a helper to reise the block softirq Add a helper to deduplicate the logic that raises the block softirq. Signed-off-by: Christoph Hellwig Reviewed-by: Daniel Wagner Signed-off-by: Jens Axboe commit c3077b5d97a39223a2d4b95a21ccff660836170f Author: Christoph Hellwig Date: Thu Jun 11 08:44:41 2020 +0200 blk-mq: merge blk-softirq.c into blk-mq.c __blk_complete_request is only called from the blk-mq code, and duplicates a lot of code from blk-mq.c. Move it there to prepare for better code sharing and simplifications. Signed-off-by: Christoph Hellwig Reviewed-by: Daniel Wagner Signed-off-by: Jens Axboe commit 3b3372fa65bab619f99bcfe272e92fb6faa07219 Author: Shengjiu Wang Date: Tue Jun 23 14:52:47 2020 +0800 ASoC: bindings: fsl-asoc-card: Add compatible string for wm8524 In order to support wm8524 codec with fsl-asoc-card machine driver, add compatible string "fsl,imx-audio-wm8524". Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1592895167-30483-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 3cd990267401fc7d0b222fc81f637e75e46967e0 Author: Shengjiu Wang Date: Tue Jun 23 14:52:46 2020 +0800 ASoC: fsl-asoc-card: Add WM8524 support WM8524 only supports playback mode, and only works at slave mode. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1592895167-30483-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit d0351cc3b0f57214d157e4d589564730af2aedae Author: Lukasz Luba Date: Wed May 27 10:58:49 2020 +0100 PM / EM: update callback structure and add device pointer The Energy Model framework is going to support devices other that CPUs. In order to make this happen change the callback function and add pointer to a device as an argument. Update the related users to use new function and new callback from the Energy Model. Acked-by: Quentin Perret Signed-off-by: Lukasz Luba Acked-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit 7d9895c7fbfc9c70afce7029b7de0f3f974adb88 Author: Lukasz Luba Date: Wed May 27 10:58:48 2020 +0100 PM / EM: introduce em_dev_register_perf_domain function Add now function in the Energy Model framework which is going to support new devices. This function will help in transition and make it smoother. For now it still checks if the cpumask is a valid pointer, which will be removed later when the new structures and infrastructure will be ready. Acked-by: Daniel Lezcano Acked-by: Quentin Perret Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 521b512b157a1315ff2bf11c11ab184c79515aea Author: Lukasz Luba Date: Wed May 27 10:58:47 2020 +0100 PM / EM: change naming convention from 'capacity' to 'performance' The Energy Model uses concept of performance domain and capacity states in order to calculate power used by CPUs. Change naming convention from capacity to performance state would enable wider usage in future, e.g. upcoming support for other devices other than CPUs. Acked-by: Daniel Lezcano Acked-by: Quentin Perret Signed-off-by: Lukasz Luba Signed-off-by: Rafael J. Wysocki commit 5de30b286e7166164f9e45de991bde26f5db8298 Author: Denis Efremov Date: Wed Jun 3 13:28:04 2020 +0300 tty/vt: check allocation size in con_set_unimap() The vmemdup_user() function has no 2-factor argument form. Use array_size() to check for the overflow. Signed-off-by: Denis Efremov Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20200603102804.2110817-1-efremov@linux.com Signed-off-by: Greg Kroah-Hartman commit 5ba1278787225629fb0b58de768e744714215678 Author: Jiri Slaby Date: Mon Jun 15 09:49:10 2020 +0200 vt_ioctl: move perm checks level up Synchronize with others and check perm directly in vt_k_ioctl. We do not need to pass perm to do_fontx_ioctl and do_unimap_ioctl then. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-38-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a4c53c830b2722f7cd30f58740fd9955ea4eed2c Author: Jiri Slaby Date: Mon Jun 15 09:49:09 2020 +0200 vt_ioctl: move vt_kdsetmode out of vt_k_ioctl It's too long to be inlined. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-37-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 7a0ac4b17f15fcd687498380da0ba28945cc6ece Author: Jiri Slaby Date: Mon Jun 15 09:49:08 2020 +0200 vt_ioctl: move vt_io_fontreset out of vt_io_ioctl This also eliminates the ifdeffery by using if and __is_defined. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-36-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 5422337d569eade4e79a98d22bbc757285d8872d Author: Jiri Slaby Date: Mon Jun 15 09:49:07 2020 +0200 vt_ioctl: move vt_resizex out of vt_ioctl It's too long to be inlined. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-35-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 535082d9078d0b161a730696c495043afcabaf8a Author: Jiri Slaby Date: Mon Jun 15 09:49:06 2020 +0200 vt_ioctl: move vt_reldisp out of vt_ioctl It's too long to be inlined. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-34-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ebf1efbb1a7f79bafcde703cf5f74fa55242ea83 Author: Jiri Slaby Date: Mon Jun 15 09:49:05 2020 +0200 vt_ioctl: move vt_setactivate out of vt_ioctl It's too long to be inlined. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-33-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit bfbbdfa4de133ed235359693dae8468c1dc98cf1 Author: Jiri Slaby Date: Mon Jun 15 09:49:04 2020 +0200 vt_ioctl: move io ioctls to a separate function We create a new vt_io_ioctl here and move there all the IO ioctls. This makes vt_ioctl significantly smaller. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-32-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 832a62ab6b7d32243266f1829bfa4ea85c95065a Author: Jiri Slaby Date: Mon Jun 15 09:49:03 2020 +0200 vt_ioctl: move K* ioctls to a separate function We create a new vt_k_ioctl here and move there all the K* ioctls. This makes vt_ioctl significantly smaller. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-31-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit eca734d8f0043e9597c9426f829d48c381dbb388 Author: Jiri Slaby Date: Mon Jun 15 09:49:02 2020 +0200 vt_ioctl: eliminate use of uival and ucval They were used for the first parameter of put_user. But put_user accepts constants in the parameter and also determines the type only by the second parameter. So we can safely drop these helpers and simplify the code a bit. Including the removal of set_int label. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-30-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0ce8179e248023606980823d970252e715f9f504 Author: Jiri Slaby Date: Mon Jun 15 09:49:01 2020 +0200 vt_ioctl: eliminate ret & breaks in vt_ioctl This is still a leftover from BKL, when we locked it around vt_ioctl's code. We can return instead of breaks in the switch loop. And we can return in case of errors too. This allows for sifting of the code to the left in some cases. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-29-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit c5c717e7a593558160b939dba4091e1ebbaf3778 Author: Jiri Slaby Date: Mon Jun 15 09:49:00 2020 +0200 vt: simplify noncolor attributes in build_attr All the attributes are bools, so do a simple shift instead of tests and constants as bool is either 0 or 1. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-28-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit faace51b63ea258e95c2a168f65af193d41279d0 Author: Jiri Slaby Date: Mon Jun 15 09:48:59 2020 +0200 vt: remove superfluous parens in invert_screen and build_attr There were too many parentheses in invert_screen, remove them and align the code in invert_screen a bit. No functional change intended. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-27-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit c0e4b3ad67997a6756ce0d22335b190baaa9914a Author: Jiri Slaby Date: Mon Jun 15 09:48:58 2020 +0200 vt: use newly defined CUR_* macros We defined macros for all the magic constants in the previous patch. So let us use the macro in the code now. No functional change intended. Signed-off-by: Jiri Slaby Cc: Thomas Winischhofer Cc: Bartlomiej Zolnierkiewicz Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-usb@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Cc: linux-parisc@vger.kernel.org Acked-by: Helge Deller Link: https://lore.kernel.org/r/20200615074910.19267-26-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 4dfa3c54f908d7ec20b88671329d6a3205d37d36 Author: Jiri Slaby Date: Mon Jun 15 09:48:57 2020 +0200 vt: redefine world of cursor macros The cursor code used to use magic constants, ANDs, ORs, and some macros. Redefine all this to make some sense. In particular: * Drop CUR_DEFAULT, which is CUR_UNDERLINE. CUR_DEFAULT was used only for cur_default variable initialization, so use CUR_UNDERLINE there to make obvious what's the default. * Drop CUR_HWMASK. Instead, define CUR_SIZE() which explains it more. And use it all over the places. * Define few more masks and bits which will be used in next patches instead of magic constants. * Define CUR_MAKE to build up cursor value. Signed-off-by: Jiri Slaby Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Link: https://lore.kernel.org/r/20200615074910.19267-25-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit dc219db66ada76669b8ca23a1a9fbef703c9f6bd Author: Jiri Slaby Date: Mon Jun 15 09:48:56 2020 +0200 vt: whitespace and paren cleanup in add_softcursor Format add_softcursor according to CodingStyle. Until now, it was a mess of letters. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-24-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit e8548296d27fc5944e4d98f830dc0cb71a9da5e5 Author: Jiri Slaby Date: Mon Jun 15 09:48:55 2020 +0200 vt: synchronize types and use min in csi_X All the types are unsinged ints -- even the vpar passed to the function. So unify them and use min() to compute count instead of explicit comparison. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-23-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit f1bcbe141381a9f715f90d61003d6b47fe084d04 Author: Jiri Slaby Date: Mon Jun 15 09:48:54 2020 +0200 vt: make tc write more obvious in vc_con_write_normal Nested ternary operators spread over 4 lines are really evil for reading. Turn the outer one to proper 'if'. Now, we see, there is a common path, so the code can be simplified. This way, the code is understandable now. Checked using symbolic execution (klee), that the old and new behaviors are the same. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-22-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit f3205b29be7a18a198491004d058f3fc9d6eaf79 Author: Jiri Slaby Date: Mon Jun 15 09:48:53 2020 +0200 vt: simplify vc_attr handling in vc_con_write_normal Invert the attribute on the only place, without the need of checking 'inverse'. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-21-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 6923e2d793213283d808e60c390fe0b5e9090c7e Author: Jiri Slaby Date: Mon Jun 15 09:48:52 2020 +0200 vc: simplify condition in vc_con_write_normal Convert (!(A && !B) || C) into (!A || B || C) to improve readability. No functional changes, as was just proven by objdump. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-20-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 391536ab775bf7d17e20e11c6f24f88d605449b2 Author: Jiri Slaby Date: Mon Jun 15 09:48:51 2020 +0200 vc: move normal char processing from do_con_write vc_con_write_normal now handles the complex normal characters processing. It is no longer a part of do_con_write. So this patch makes do_con_write pretty clean and obvious. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-19-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 754bda9807f2fcc0fe32ebeaef9f6443b2151059 Author: Jiri Slaby Date: Mon Jun 15 09:48:50 2020 +0200 vc: extract detecting control characters from do_con_write Move the control characters detection to a separate function dubbed vc_is_control. It makes the 14 subexpressions a "bit" more readable. And also simplifies next patches. It moves also CTRL_ACTION and CTRL_ALWAYS to this new function, as they are used exclusively here. While at it, these are converted to static const variables. And we use "& BIT()" instead of ">>" and "& 1". Checked using symbolic execution (klee), that the old and new behaviors are the same. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-18-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 917ae1a9907bf33fe41fdfe68c6fcb03dfa07ed2 Author: Jiri Slaby Date: Mon Jun 15 09:48:49 2020 +0200 vc: introduce struct vc_draw_region For passing of draw area among functions. This makes next patches simpler. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-17-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a4236348f4ada19e7f88b631149561bbec275d75 Author: Jiri Slaby Date: Mon Jun 15 09:48:48 2020 +0200 vc: move translation out of do_con_write Now that we reordered the code and the label, we can eliminate the translation into a separate function. We call it vc_translate here. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-16-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0d1ffef5782628aede95d5390c658c2027c53c55 Author: Jiri Slaby Date: Mon Jun 15 09:48:47 2020 +0200 vt: move rescan_last_byte label earlier This removes duplicated initialization of variables (after reordering 'c' initialization). It will also allow for eliminating whole translation into a separate function in the next patch. Note that vc_state, vc_utf etc. are checked with every rescan now. But they are immutable for non-control characters where rescan might be only necessary. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-15-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 881c8783e9608be9f86d67705dc7b5adeb3e4808 Author: Jiri Slaby Date: Mon Jun 15 09:48:46 2020 +0200 vt: extract attribute inversion to vc_invert_attr We continue cleaning up do_con_write. This (hopefully) makes the inversion code obvious. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-14-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ede98d12b6c2bdb34efcd64369ca3ab2af304e16 Author: Jiri Slaby Date: Mon Jun 15 09:48:45 2020 +0200 vt: rearrange vc_translate_unicode The code was too overcomplicated. Extract vc_sanitize_unicode to a separate function and flatten the code. I believe the code is straightforward now. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-13-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 694d8a487c8bc2a0b35b9da951b0635c6a256ea6 Author: Jiri Slaby Date: Mon Jun 15 09:48:44 2020 +0200 vt: separate unicode handling into vc_translate_unicode do_con_write is complicated enough. Extract unicode handling to a separate function. For do_con_write, 249 LOCs lowered to 183 lines. Use diff -w -b to see the difference is neligible -- mostly whitespace and use of 'return's instead of 'continue's. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-12-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit da823b2dc03749f0d1b2d051b37f222e5a3918d7 Author: Jiri Slaby Date: Mon Jun 15 09:48:43 2020 +0200 vt: use modern types in do_con_write Use bools for rescan and inverse. And true/false accordingly. Use u8 for width instead of uint8_t. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-11-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a018180cc3485e71f7912e36bf93caa635e0e4af Author: Jiri Slaby Date: Mon Jun 15 09:48:42 2020 +0200 vt: move vc_translate to vt.c and rename it vc_translate is used only in vt.c, so move the definition from a header there. Also, it used to be a macro, so be modern and make a static inline from it. This makes the code actually readable. And as a preparation for next patches, rename it to vc_translate_ascii. vc_translate will be a wrapper for both unicode and this one. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-10-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9a6f72d9b6c121415bc2867329fe77b0d2a52dc1 Author: Jiri Slaby Date: Mon Jun 15 09:48:41 2020 +0200 vt: get rid of VT10.ID macros VT100ID is unused, but defined twice. Kill it. VT102ID is used only in respond_ID. Define there a variable with proper type and use that instead. Then drop both defines of VT102ID too. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-9-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit de53ce0427cd20886b0d53555dc576702cbb1ff8 Author: Jiri Slaby Date: Mon Jun 15 09:48:40 2020 +0200 vt: use tty_insert_flip_string in respond_string Pass the length of a string to respond_string and use tty_insert_flip_string instead of a loop with tty_insert_flip_char. This simplifies the processing on the tty side. The added strlens are optimized during constant folding and propagation and the result are proper constants in assembly. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 7d4a3112f07878ba9c6bffbcdb2dea2dcfc5c1f9 Author: Jiri Slaby Date: Mon Jun 15 09:48:39 2020 +0200 vt: remove 25 years stale comment vc_cons was made global (non-static) in 1.3.38, almost 25 years ago. Remove a comment which says that it would be a disadvantage to do so :P. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit dbee4cffa1bfe23263edde1d17cdbef0de3a6ac0 Author: Jiri Slaby Date: Mon Jun 15 09:48:38 2020 +0200 vt: convert vc_tab_stop to bitmap vc_tab_stop is used as a bitmap, but defined as an unsigned int array. Switch it to bitmap and convert all users to the bitmap interface. Note the difference in behavior! We no longer mask the top 24 bits away from x, hence we do not wrap tabs at 256th column. Instead, we silently drop attempts to set a tab behind 256 columns. And we will also seek by '\t' to the rightmost column, when behind that boundary. I do not think the original behavior was desired and that someone relies on that. If this turns out to be the case, we can change the added 'if's back to masks here and there instead... (Or we can increase the limit as fb consoles now have 240 chars here. And they could have more with higher than my resolution, of course.) Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b70ec4d97f4cc4f6f804ca57419d070b80a9874e Author: Jiri Slaby Date: Mon Jun 15 09:48:37 2020 +0200 vt: switch G0/1_charset to an array Declare Gx_charset[2] instead of G0_charset and G1_charset. It makes the code simpler (without ternary operators). Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b4d92b6575ac3c2d0ed8310d6b8279968dca10b8 Author: Jiri Slaby Date: Mon Jun 15 09:48:36 2020 +0200 vt: deduplicate setGx code The code for setting G0 and G1 is duplicated -- for each of them. Move the code to a separate function (vc_setGx) and distinguish the two cases by a parameter. Change if-else-if to switch which allows for slightly better optimization (decision tree). Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 77bc14f273c2dfecbf87f41fdc00345d99597e13 Author: Jiri Slaby Date: Mon Jun 15 09:48:35 2020 +0200 vc: switch state to bool The code currently uses bitfields to store true-false values. Switch all of that to bools. Apart from the cleanup, it saves 20B of code as many shifts, ANDs, and ORs became simple movzb's. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b84ae3dc70fedf4bdee2dbfa487fd23b606fbb82 Author: Jiri Slaby Date: Mon Jun 15 09:48:34 2020 +0200 vt: introduce enum vc_intensity for intensity Introduce names (en enum) for 0, 1, and 2 constants. We now have VCI_HALF_BRIGHT, VCI_NORMAL, and VCI_BOLD instead. Apart from the cleanup, 1) the enum allows for better type checking, and 2) this saves some code. No more fiddling with bits is needed in assembly now. (OTOH, the structure is larger.) Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 28bc24fc46f9c9f39ddefb424d6072041805b563 Author: Jiri Slaby Date: Mon Jun 15 09:48:33 2020 +0200 vc: separate state There are two copies of some members of struct vc_data. This is because we need to save them and restore later. Move these memebers to a separate structure called vc_state. So now instead of members like: vc_x, vc_y and vc_saved_x, vc_saved_y we have state and saved_state (of type: struct vc_state) containing state.x, state.y and saved_state.x, saved_state.y This change: * makes clear what is saved & restored * eases save & restore by using memcpy (see save_cur and restore_cur) Finally, we document the newly added struct vc_state using kernel-doc. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20200615074910.19267-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 96564ac680b448b9152a22d1897b55d2cdc41652 Author: Jiri Slaby Date: Mon Jun 15 09:48:56 2020 +0200 um: line, remove put_char um's put_char only calls write. And the tty layer/disciplines do the same if put_char is NULL. So we can safely remove this put_char wrapper. Signed-off-by: Jiri Slaby Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Link: https://lore.kernel.org/r/20200615074856.18949-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 8dd70543f795d1836003754f3c60226f21433c99 Author: Alexander Popov Date: Wed Jun 24 15:33:30 2020 +0300 gcc-plugins/stackleak: Add 'verbose' plugin parameter Add 'verbose' plugin parameter for stackleak gcc plugin. It can be used for printing additional info about the kernel code instrumentation. For using it add the following to scripts/Makefile.gcc-plugins: gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_STACKLEAK) \ += -fplugin-arg-stackleak_plugin-verbose Signed-off-by: Alexander Popov Link: https://lore.kernel.org/r/20200624123330.83226-6-alex.popov@linux.com Signed-off-by: Kees Cook commit feee1b8c490821f29aae416a5422795f5a29263d Author: Alexander Popov Date: Wed Jun 24 15:33:29 2020 +0300 gcc-plugins/stackleak: Use asm instrumentation to avoid useless register saving The kernel code instrumentation in stackleak gcc plugin works in two stages. At first, stack tracking is added to GIMPLE representation of every function (except some special cases). And later, when stack frame size info is available, stack tracking is removed from the RTL representation of the functions with small stack frame. There is an unwanted side-effect for these functions: some of them do useless work with caller-saved registers. As an example of such case, proc_sys_write without() instrumentation: 55 push %rbp 41 b8 01 00 00 00 mov $0x1,%r8d 48 89 e5 mov %rsp,%rbp e8 11 ff ff ff callq ffffffff81284610 5d pop %rbp c3 retq 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 00 00 00 proc_sys_write() with instrumentation: 55 push %rbp 48 89 e5 mov %rsp,%rbp 41 56 push %r14 41 55 push %r13 41 54 push %r12 53 push %rbx 49 89 f4 mov %rsi,%r12 48 89 fb mov %rdi,%rbx 49 89 d5 mov %rdx,%r13 49 89 ce mov %rcx,%r14 4c 89 f1 mov %r14,%rcx 4c 89 ea mov %r13,%rdx 4c 89 e6 mov %r12,%rsi 48 89 df mov %rbx,%rdi 41 b8 01 00 00 00 mov $0x1,%r8d e8 f2 fe ff ff callq ffffffff81298e80 5b pop %rbx 41 5c pop %r12 41 5d pop %r13 41 5e pop %r14 5d pop %rbp c3 retq 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 00 00 Let's improve the instrumentation to avoid this: 1. Make stackleak_track_stack() save all register that it works with. Use no_caller_saved_registers attribute for that function. This attribute is available for x86_64 and i386 starting from gcc-7. 2. Insert calling stackleak_track_stack() in asm: asm volatile("call stackleak_track_stack" :: "r" (current_stack_pointer)) Here we use ASM_CALL_CONSTRAINT trick from arch/x86/include/asm/asm.h. The input constraint is taken into account during gcc shrink-wrapping optimization. It is needed to be sure that stackleak_track_stack() call is inserted after the prologue of the containing function, when the stack frame is prepared. This work is a deep reengineering of the idea described on grsecurity blog https://grsecurity.net/resolving_an_unfortunate_stackleak_interaction Signed-off-by: Alexander Popov Acked-by: Miguel Ojeda Link: https://lore.kernel.org/r/20200624123330.83226-5-alex.popov@linux.com Signed-off-by: Kees Cook commit ddfaf0e43e9bd4341dc2c24d48ac218f2fb1530a Author: Alexander Popov Date: Wed Jun 24 15:33:27 2020 +0300 ARM: vdso: Don't use gcc plugins for building vgettimeofday.c Don't use gcc plugins for building arch/arm/vdso/vgettimeofday.c to avoid unneeded instrumentation. As previously discussed[1]: arm_ssp_per_task_plugin.c 32-bit ARM only (but likely needs disabling for 32-bit ARM vDSO?) cyc_complexity_plugin.c compile-time reporting only latent_entropy_plugin.c this shouldn't get triggered for the vDSO (no __latent_entropy nor __init attributes in vDSO), but perhaps explicitly disabling it would be a sensible thing to do, just for robustness? randomize_layout_plugin.c this shouldn't get triggered (again, lacking attributes), but should likely be disabled too. sancov_plugin.c This should be tracking the KCOV directly (see scripts/Makefile.kcov), which is already disabled here. structleak_plugin.c This should be fine in the vDSO, but there's no security boundary here, so it wouldn't be important to KEEP it enabled. [1] https://lore.kernel.org/lkml/20200610073046.GA15939@willie-the-truck/ Signed-off-by: Alexander Popov Link: https://lore.kernel.org/r/20200624123330.83226-3-alex.popov@linux.com Signed-off-by: Kees Cook commit 005e696df65d0ff90468ecf38a50aa584dc82421 Author: Alexander Popov Date: Wed Jun 24 15:33:26 2020 +0300 gcc-plugins/stackleak: Don't instrument itself There is no need to try instrumenting functions in kernel/stackleak.c. Otherwise that can cause issues if the cleanup pass of stackleak gcc plugin is disabled. Signed-off-by: Alexander Popov Link: https://lore.kernel.org/r/20200624123330.83226-2-alex.popov@linux.com Signed-off-by: Kees Cook commit 102514ec73ed54b2681ff225e78e965e4fbe43ef Author: Daniel Vetter Date: Fri Jun 12 09:05:35 2020 +0200 dma-buf: minor doc touch-ups Just some tiny edits: - fix link to struct dma_fence - give slightly more meaningful title - the polling here is about implicit fences, explicit fences (in sync_file or drm_syncobj) also have their own polling v2: I misplaced the .rst include change corresponding to this patch. Reviewed-by: Thomas Hellstrom Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200612070535.1778368-1-daniel.vetter@ffwll.ch commit 192b6638eea5d40c99964291671fc0371b858f6e Author: Andrii Nakryiko Date: Tue Jun 23 21:38:05 2020 -0700 libbpf: Prevent loading vmlinux BTF twice Prevent loading/parsing vmlinux BTF twice in some cases: for CO-RE relocations and for BTF-aware hooks (tp_btf, fentry/fexit, etc). Fixes: a6ed02cac690 ("libbpf: Load btf_vmlinux only once per object.") Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200624043805.1794620-1-andriin@fb.com commit 135c783f4794fbdeace4a969dea6eabd27f8a501 Author: Colin Ian King Date: Tue Jun 23 09:42:07 2020 +0100 libbpf: Fix spelling mistake "kallasyms" -> "kallsyms" There is a spelling mistake in a pr_warn message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200623084207.149253-1-colin.king@canonical.com commit 54b66c2255fadc8d78e88b5ffd99b19f7f754f5a Author: Quentin Monnet Date: Tue Jun 23 22:36:00 2020 +0100 tools, bpftool: Fix variable shadowing in emit_obj_refs_json() Building bpftool yields the following complaint: pids.c: In function 'emit_obj_refs_json': pids.c:175:80: warning: declaration of 'json_wtr' shadows a global declaration [-Wshadow] 175 | void emit_obj_refs_json(struct obj_refs_table *table, __u32 id, json_writer_t *json_wtr) | ~~~~~~~~~~~~~~~^~~~~~~~ In file included from pids.c:11: main.h:141:23: note: shadowed declaration is here 141 | extern json_writer_t *json_wtr; | ^~~~~~~~ Let's rename the variable. v2: - Rename the variable instead of calling the global json_wtr directly. Signed-off-by: Quentin Monnet Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200623213600.16643-1-quentin@isovalent.com commit fb5746826a0cfc1d5a8d9bbe98c01b194480a765 Author: Antonio Borneo Date: Thu Jun 18 02:08:18 2020 +0200 usbip: tools: fix module name in man page Commit 64e62426f40d ("staging: usbip: edit Kconfig and rename CONFIG options") renamed the module usbip as usbip-host, but the example in the man page still reports the old module name. Fix the module name in usbipd.8 Fixes: 64e62426f40d ("staging: usbip: edit Kconfig and rename CONFIG options") Acked-by: Shuah Khan Signed-off-by: Antonio Borneo Acked-by: matt mooney Link: https://lore.kernel.org/r/20200618000818.1048203-1-borneo.antonio@gmail.com Signed-off-by: Greg Kroah-Hartman commit d5efc2e6b98fe661dbd8dd0d5d5bfb961728e57a Author: Antonio Borneo Date: Thu Jun 18 02:08:44 2020 +0200 usbip: tools: fix build error for multiple definition With GCC 10, building usbip triggers error for multiple definition of 'udev_context', in: - libsrc/vhci_driver.c:18 and - libsrc/usbip_host_common.c:27. Declare as extern the definition in libsrc/usbip_host_common.c. Signed-off-by: Antonio Borneo Acked-by: Shuah Khan Link: https://lore.kernel.org/r/20200618000844.1048309-1-borneo.antonio@gmail.com Signed-off-by: Greg Kroah-Hartman commit 62fb45d317c5fa08e4db093441835bb6f33acbd7 Author: Greg Kroah-Hartman Date: Thu Jun 18 16:42:06 2020 +0200 USB: ch9: add "USB_" prefix in front of TEST defines For some reason, the TEST_ defines in the usb/ch9.h files did not have the USB_ prefix on it, making it a bit confusing when reading the file, as well as not the nicest thing to do in a uapi file. So fix that up and add the USB_ prefix on to them, and fix up all in-kernel usages. This included deleting the duplicate copy in the net2272.h file. Cc: Felipe Balbi Cc: Michal Simek Cc: Mathias Nyman Cc: Pawel Laszczak Cc: YueHaibing Cc: Nathan Chancellor Cc: Jason Yan Cc: Jia-Ju Bai Cc: Stephen Boyd Cc: Christophe JAILLET Cc: Arnd Bergmann Cc: Jules Irenge Cc: Alan Stern Cc: Thinh Nguyen Cc: Rob Gill Cc: Macpaul Lin Acked-by: Minas Harutyunyan Acked-by: Bin Liu Acked-by: Chunfeng Yun Acked-by: Peter Chen Link: https://lore.kernel.org/r/20200618144206.2655890-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 133552bf03edbe3892767a4b64c56e3bed746374 Author: Tiezhu Yang Date: Mon May 25 21:08:58 2020 +0800 phy: Remove CONFIG_ARCH_* check for related subdir in Makefile If CONFIG_ARCH_ROCKCHIP is not set but COMPILE_TEST is set, the file in the subdir rockchip can not be built due to CONFIG_ARCH_ROCKCHIP check in drivers/phy/Makefile. Since the related configs in drivers/phy/rockchip/Kconfig depend on ARCH_ROCKCHIP, so remove CONFIG_ARCH_ROCKCHIP check for subdir rockchip in drivers/phy/Makefile. The other CONFIG_ARCH_* about allwinner, amlogic, mediatek, renesas and tegra have the same situation, so remove them too. Signed-off-by: Tiezhu Yang Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/1590412138-13903-2-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Vinod Koul commit 95a5631f6c9f3045f26245e6045244652204dfdb Author: Kamal Heib Date: Tue Jun 23 13:52:36 2020 +0300 RDMA/ipoib: Return void from ipoib_ib_dev_stop() The return value from ipoib_ib_dev_stop() is always 0 - change it to be void. Link: https://lore.kernel.org/r/20200623105236.18683-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 3506c37dccd1686f2e6607f74c275acb63b47513 Merge: f6b4c11fc527b 28b5fa687f3a5 Author: Jason Gunthorpe Date: Tue Jun 23 11:55:31 2020 -0300 Merge branch 'raw_dumps' into rdma.git for-next Maor Gottlieb says: ==================== The following series adds support to get the RDMA resource data in RAW format. The main motivation for doing this is to enable vendors to return the entire QP/CQ/MR data without a need from the vendor to set each field separately. ==================== Based on the mlx5-next branch at git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux due to dependencies * branch 'raw_dumps': RDMA/mlx5: Add support to get MR resource in RAW format RDMA/mlx5: Add support to get CQ resource in RAW format RDMA/mlx5: Add support to get QP resource in RAW format RDMA: Add support to dump resource tracker in RAW format RDMA: Add dedicated CM_ID resource tracker function RDMA: Add dedicated QP resource tracker function RDMA: Add a dedicated CQ resource tracker function RDMA: Add dedicated MR resource tracker function RDMA/core: Don't call fill_res_entry for PD net/mlx5: Add support in query QP, CQ and MKEY segments net/mlx5: Export resource dump interface Signed-off-by: Jason Gunthorpe commit 28b5fa687f3a55cef1a9144ece9292fe08e57592 Author: Maor Gottlieb Date: Tue Jun 23 14:30:43 2020 +0300 RDMA/mlx5: Add support to get MR resource in RAW format Add support to get MR (mkey) resource dump in RAW format. Link: https://lore.kernel.org/r/20200623113043.1228482-12-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1ccecc88af33f6807b5cb7c227adb46b63582680 Author: Maor Gottlieb Date: Tue Jun 23 14:30:42 2020 +0300 RDMA/mlx5: Add support to get CQ resource in RAW format Add support to get CQ resource dump in RAW format. Link: https://lore.kernel.org/r/20200623113043.1228482-11-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1776dd234a14fbef5f8581f6374c8c6ccd69cb1c Author: Maor Gottlieb Date: Tue Jun 23 14:30:41 2020 +0300 RDMA/mlx5: Add support to get QP resource in RAW format Add a generic function to use the resource dump mechanism to get the QP resource data. Link: https://lore.kernel.org/r/20200623113043.1228482-10-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 65959522f8060659e308977f09f3eb7b7af5e43f Author: Maor Gottlieb Date: Tue Jun 23 14:30:40 2020 +0300 RDMA: Add support to dump resource tracker in RAW format Add support to get resource dump in raw format. It enable drivers to return the entire device specific QP/CQ/MR context without a need from the driver to set each field separately. The raw query returns only the device specific data, general data is still returned by using the existing queries. Example: $ rdma res show mr dev mlx5_1 mrn 2 -r -j [{"ifindex":7,"ifname":"mlx5_1", "data":[0,4,255,254,0,0,0,0,0,0,0,0,16,28,0,216,...]}] Link: https://lore.kernel.org/r/20200623113043.1228482-9-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 29a54910152adf9bba4eefbe5e4cd071291775a4 Author: Misono Tomohiro Date: Wed Jun 24 15:54:04 2020 +0900 ipmi: ssif: Remove finished TODO comment about SMBus alert commit 9162052173d2 ("ipmi: Add alert handling to SSIF") introduces support of SMBus alert. So, just remove TODO comment in order not to confuse future readers. Signed-off-by: Misono Tomohiro Message-Id: <20200624065405.17653-2-misono.tomohiro@jp.fujitsu.com> Signed-off-by: Corey Minyard commit c8e0506f887a3ad257665451ba711dd5d4eef81c Author: Misono Tomohiro Date: Wed Jun 24 15:54:05 2020 +0900 Doc: driver-api: ipmi: Add description of alerts_broken module param Add description about alerts_broken module parameter of ipmi_ssif driver which skips enabling SMBus alert during setup. Signed-off-by: Misono Tomohiro Message-Id: <20200624065405.17653-3-misono.tomohiro@jp.fujitsu.com> Signed-off-by: Corey Minyard commit e4c6a52c64607d825b0e81c82e548d4cc8199e53 Author: Geert Uytterhoeven Date: Tue Jun 23 16:40:01 2020 +0200 gpio: Drop superfluous dependencies on GPIOLIB All config options for GPIO drivers are inside a big "if GPIOLIB ... endif" block, so there is no reason for individual config options to have expicit dependencies on GPIOLIB. Hence remove them. Signed-off-by: Geert Uytterhoeven Signed-off-by: Bartosz Golaszewski commit 0077428118204d934382dcb74569899ac3dd2f58 Author: Shubhrajyoti Datta Date: Wed Jun 17 17:07:27 2020 +0530 gpio: zynq: Remove error prints in EPROBE_DEFER In case of probe is deferred do not print the errors. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Bartosz Golaszewski commit 73c612fe2a5f819bc54598b5babc630528bf29d1 Author: Shubhrajyoti Datta Date: Wed Jun 17 17:07:26 2020 +0530 gpio: zynq: Add pmc gpio support Add PMC gpio support. Only bank 0,1, 3 and 4 are connected to the multiplexed Input output pins. Bank 0 and 1 to mio and bank 3 and 4 to extended multiplexed input output pins. Versal devices are the industry's first adaptive compute acceleration platforms. https://www.xilinx.com/support/documentation/data_sheets/ds950-versal-overview.pdf On the Versal platform, we are using two customized GPIO controllers(IP) which were used in Zynq/ZynqMp platform. One of them present in the Platform Management Controller(PMC) block and other in Processing System(PS) block. In PMC_GPIO only Bank0,1,3 & 4 are enabled and in PS_GPIO only Bank 0 & 3 are enabled. You can find more details of GPIO IP in ZynqMP TRM General Purpose I/O(Chapter-27). https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-trm.pdf Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Bartosz Golaszewski commit 26ebdbf8c2e311759d88c0b0cf26126715e932c6 Author: Shubhrajyoti Datta Date: Wed Jun 17 17:07:25 2020 +0530 gpio: zynq: Disable the irq if it is not a wakeup source If gpio is not set to wake disable the interrupt. ATF set all slaves with enabled interrupts as wakeup sources and if gpio is used in r5 then it wakes up linux. Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Bartosz Golaszewski commit 675002448eee5a9f96bfeb9b057e12a60a004b6c Author: Shubhrajyoti Datta Date: Wed Jun 17 17:07:24 2020 +0530 gpio: zynq: Add Versal support Add Versal support in gpio. Only bank 0 and 3 are connected to the Multiplexed Input output pins. Bank 0 to mio and bank3 to fabric Multiplexed input output pins. Versal devices are the industry's first adaptive compute acceleration platforms. https://www.xilinx.com/support/documentation/data_sheets/ds950-versal-overview.pdf On the Versal platform, we are using two customized GPIO controllers(IP) which were used in Zynq/ZynqMp platform. One of them present in the Platform Management Controller(PMC) block and other in Processing System(PS) block. In PMC_GPIO only Bank0,1,3 & 4 are enabled and in PS_GPIO only Bank 0 & 3 are enabled. You can find more details of GPIO IP in ZynqMP TRM General Purpose I/O(Chapter-27). https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-trm.pdf Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Bartosz Golaszewski commit d4db5721f3c847df43b967d9f02994b15e4a48e6 Author: Martin Blumenstingl Date: Sat Jun 20 18:14:22 2020 +0200 clk: meson: meson8b: Drop CLK_IS_CRITICAL from fclk_div2 Drop CLK_IS_CRITICAL from fclk_div2. This was added because we didn't know the relation between this clock and RGMII Ethernet. It turns out that fclk_div2 is used as "timing adjustment clock" to generate the RX delay on the MAC side - which was enabled by u-boot on Odriod-C1. When using the RX delay on the PHY side or not using a RX delay at all then this clock can be disabled. Signed-off-by: Martin Blumenstingl Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200620161422.24114-1-martin.blumenstingl@googlemail.com commit c0178b8e24b2b1eed8ebfe5b155a36304d42a137 Author: Shubhrajyoti Datta Date: Wed Jun 17 17:07:23 2020 +0530 dt-bindings: gpio: Add pmc gpio node to gpio-zynq Add the pmc gpio node to the device tree. Versal devices are the industry's first adaptive compute acceleration platforms. https://www.xilinx.com/support/documentation/data_sheets/ds950-versal-overview.pdf On the Versal platform, we are using two customized GPIO controllers(IP) which were used in Zynq/ZynqMp platform. One of them present in the Platform Management Controller(PMC) block and other in Processing System(PS) block. In PMC_GPIO only Bank0,1,3 & 4 are enabled and in PS_GPIO only Bank 0 & 3 are enabled. You can find more details of GPIO IP in ZynqMP TRM General Purpose I/O(Chapter-27). https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-trm.pdf Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Bartosz Golaszewski commit 3e1ad2b858dd1c1e795e3817aa31f0a301d6aeba Author: Shubhrajyoti Datta Date: Wed Jun 17 17:07:22 2020 +0530 dt-bindings: gpio: Add binding for Versal gpio Add binding for Versal binding. Versal devices are the industry's first adaptive compute acceleration platforms. https://www.xilinx.com/support/documentation/data_sheets/ds950-versal-overview.pdf On the Versal platform, we are using two customized GPIO controllers(IP) which were used in Zynq/ZynqMp platform. One of them present in the Platform Management Controller(PMC) block and other in Processing System(PS) block. In PMC_GPIO only Bank0,1,3 & 4 are enabled and in PS_GPIO only Bank 0 & 3 are enabled. You can find more details of GPIO IP in ZynqMP TRM General Purpose I/O(Chapter-27). https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-trm.pdf Signed-off-by: Shubhrajyoti Datta Signed-off-by: Michal Simek Signed-off-by: Bartosz Golaszewski commit fdcfec11b215b3bbc9c20240739cf76be921cca1 Author: Glenn Langedock Date: Wed Jun 17 17:07:21 2020 +0530 gpio: zynq: protect direction in/out with a spinlock Fix race condition when changing the direction (in/out) of the GPIO pin. The read-modify-write sequence (as coded in the driver) isn't atomic and requires synchronization (spinlock). Signed-off-by: Glenn Langedock Signed-off-by: Michal Simek Signed-off-by: Srinivas Neeli Signed-off-by: Bartosz Golaszewski commit 580fbdc5136822208f107500682e50a1cb232e94 Author: Imre Deak Date: Tue Jun 23 11:24:11 2020 +0300 drm/i915/dp_mst: Enable VC payload allocation after transcoder is enabled The spec requires enabling the MST Virtual Channel payload allocation - in a separate step - after the transcoder is enabled, follow this. Cc: Ville Syrjälä Cc: José Roberto de Souza Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200623082411.3889-1-imre.deak@intel.com commit d12ea5591eddf625b7707c018b72e46e8674c3c2 Author: Sugar Zhang Date: Thu Jun 4 09:36:38 2020 +0800 dmaengine: pl330: Make sure the debug is idle before doing DMAGO According to the datasheet of pl330: Example 2-1 Using DMAGO with the debug instruction registers 1. Create a program for the DMA channel 2. Store the program in a region of system memory 3. Poll the DBGSTATUS Register to ensure that the debug is idle 4. Write to the DBGINST0 Register 5. Write to the DBGINST1 Register 6. Write zero to the DBGCMD Register so, we should make sure the debug is idle before step 4/5/6, not only step 6. if not, there maybe a risk that fail to write DBGINST0/1. Signed-off-by: Sugar Zhang Link: https://lore.kernel.org/r/1591234598-78919-1-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Vinod Koul commit 0705107fcc80711680b169abc2011686dded6c21 Author: Dave Jiang Date: Mon Jun 15 13:54:26 2020 -0700 dmaengine: idxd: move submission to sbitmap_queue Kill the percpu-rwsem for work submission in favor of an sbitmap_queue. Signed-off-by: Dave Jiang Reviewed-by: Tony Luck Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/159225446631.68253.8860709181621260997.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 77522b2191368ea57720e960fc3c7e6fbfc04533 Author: Dave Jiang Date: Mon Jun 15 13:54:31 2020 -0700 dmaengine: idxd: add leading / for sysfspath in ABI documentation Correct to standard convention. All sysfs paths seem to be missing leading /. Signed-off-by: Dave Jiang Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/159225447176.68253.2922149693913698177.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 7e06886bbfca73717e45a0f20cdb4053793c191b Author: Daniel Vetter Date: Fri Jun 12 18:00:55 2020 +0200 drm/mipi-dbi: Remove ->enabled The atomic helpers try really hard to not lose track of things, duplicating enabled tracking in the driver is at best confusing. Double-enabling or disabling is a bug in atomic helpers. In the fb_dirty function we can just assume that the fb always exists, simple display pipe helpers guarantee that the crtc is only enabled together with the output, so we always have a primary plane around. Now in the update function we need to be a notch more careful, since that can also get called when the crtc is off. And we don't want to upload frames when that's the case, so filter that out too. Reviewed-by: Noralf Trønnes Acked-by: David Lechner Reviewed-by: Emil Velikov Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: David Lechner Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-7-daniel.vetter@ffwll.ch commit e8411b7ede3bd59f45a7ad997536d235e9c71c36 Author: Daniel Vetter Date: Fri Jun 12 18:00:56 2020 +0200 drm/tiny/repaper: Drop edp->enabled Same patch as the mipi-dbi one, atomic tracks this for us already, we just have to check the right thing. Reviewed-by: Noralf Trønnes Reviewed-by: Emil Velikov Signed-off-by: Daniel Vetter Cc: "Noralf Trønnes" Link: https://patchwork.freedesktop.org/patch/msgid/20200612160056.2082681-8-daniel.vetter@ffwll.ch commit 6915ef1cbebb3f66e140ce6b1480bf4a800719da Author: Andy Shevchenko Date: Mon Jun 22 21:13:11 2020 +0300 dmaengine: acpi: Drop double check for ACPI companion device acpi_dev_get_resources() does perform the NULL pointer check against ACPI companion device which is given as function parameter. Thus, there is no need to duplicate this check in the caller. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200622181311.67649-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 999a32efed09d724c426568731c5691233d3a680 Author: Gustavo A. R. Silva Date: Wed Jun 17 16:11:35 2020 -0500 dmaengine: hisilicon: Use struct_size() in devm_kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Zhou Wang Link: https://lore.kernel.org/r/20200617211135.GA8660@embeddedor Signed-off-by: Vinod Koul commit 428d2459cceb77357b81c242ca22462a6a904817 Author: Petr Vaněk Date: Sat May 30 14:39:12 2020 +0200 xfrm: introduce oseq-may-wrap flag RFC 4303 in section 3.3.3 suggests to disable anti-replay for manually distributed ICVs in which case the sender does not need to monitor or reset the counter. However, the sender still increments the counter and when it reaches the maximum value, the counter rolls over back to zero. This patch introduces new extra_flag XFRM_SA_XFLAG_OSEQ_MAY_WRAP which allows sequence number to cycle in outbound packets if set. This flag is used only in legacy and bmp code, because esn should not be negotiated if anti-replay is disabled (see note in 3.3.3 section). Signed-off-by: Petr Vaněk Acked-by: Christophe Gouault Signed-off-by: Steffen Klassert commit 0a19b068acc47d05212f03e494381926dc0381e2 Merge: 48778464bb7d3 114427b8927a4 Author: Dave Airlie Date: Tue Jun 23 10:58:28 2020 +1000 Merge tag 'drm-misc-next-2020-06-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for v5.9: UAPI Changes: - Add DRM_MODE_TYPE_USERDEF for video modes specified in cmdline. Cross-subsystem Changes: - Assorted devicetree binding updates. - Add might_sleep() to dma_fence_wait(). - Fix fbdev's get_user_pages_fast() handling, and use pin_user_pages. - Small cleanup with IS_BUILTIN in video/fbdev drivers. - Fix video/hdmi coding style for infoframe size. Core Changes: - Silence vblank output during init. - Fix DP-MST corruption during send msg timeout. - Clear leak in drm_gem_objecs_lookup(). - Make newlines work with force connector attribute. - Fix module refcounting error in drm_encoder_slave, and use new i2c api. - Header fix for drm_managed.c - More struct_mutex removal for !legacy drivers: - Remove gem_free_object() - Removal of drm_gem_object_put_unlocked(). - Show current->comm alongside pid in debug printfs. - Add drm_client_modeset_check() + drm_client_framebuffer_flush(). - Replace drm_fb_swab16 with drm_fb_swap that also supports 32-bits. - Remove mode->vrefresh, and compactify drm_display_mode. - Use drm_* macros for logging and warnings. - Add WARN when drm_gem_get_pages is used on a private obj. - Handle importing and imported dmabuf better in shmem helpers. - Small fix for drm/mm hole size comparison, and remove invalid entry optimization. - Add a drm/mm selftest. - Set DSI connector type for DSI panels. - Assorted small fixes and documentation updates. - Fix DDI I2C device registration for MST ports, and flushing on destroy. - Fix master_set return type, used by vmwgfx. - Make the drm_set/drop_master ioctl symmetrical. Driver Changes: Allow iommu in the sun4i driver and use it for sun8i. - Simplify backlight lookup for omap, amba-clcd and tilcdc. - Hold reg_lock for rockchip. - Add support for bridge gpio and lane reordering + polarity to ti-sn65dsi86, and fix clock choice. - Small assorted fixes to tilcdc, vc4, i915, omap, fbdev/sm712fb, fbdev/pxafb, console/newport_con, msm, virtio, udl, malidp, hdlcd, bridge/ti-sn65dsi86, panfrost. - Remove hw cursor support for mgag200, and use simple kms helper + shmem helpers. - Add support for KOE Allow iommu in the sun4i driver and use it for sun8i. - Simplify backlight lookup for omap, amba-clcd and tilcdc. - Hold reg_lock for rockchip. - Add support for bridge gpio and lane reordering + polarity to ti-sn65dsi86, and fix clock choice. - Small assorted fixes to tilcdc, vc4 (multiple), i915. - Remove hw cursor support for mgag200, and use simple kms helper + shmem helpers. - Add support for KOE TX26D202VM0BWA panel. - Use GEM CMA functions in arc, arm, atmel-hlcdc, fsi-dcu, hisilicon, imx, ingenic, komeda, malidp, mcde, meson, msxfb, rcar-du, shmobile, stm, sti, tilcdc, tve200, zte. - Remove gem_print_info. - Improve gem_create_object_helper so udl can use shmem helpers. - Convert vc4 dt bindings to schemas, and add clock properties. - Device initialization cleanups for mgag200. - Add a workaround to fix DP-MST short pulses handling on broken hardware in i915. - Allow build test compiling arm drivers. - Use managed pci functions in mgag200 and ast. - Use dev_groups in malidp. - Add per pixel alpha support for PX30 VOP in rockchip. - Silence deferred probe logs in panfrost. Signed-off-by: Dave Airlie From: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/001cd9a6-405d-4e29-43d8-354f53ae4e8b@linux.intel.com commit b2bc2200e89bf6be01da8a9972fee800891725c0 Author: Wei Yongjun Date: Thu Jun 18 13:38:37 2020 +0000 scsi: ufs: ufs-exynos: Fix return value check in exynos_ufs_init() 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(). Link: https://lore.kernel.org/r/20200618133837.127274-1-weiyongjun1@huawei.com Fixes: 55f4b1f73631 ("scsi: ufs: ufs-exynos: Add UFS host support for Exynos SoCs") Reported-by: Hulk Robot Acked-by: Alim Akhtar Signed-off-by: Wei Yongjun Signed-off-by: Martin K. Petersen commit d31503fe395d1d7e17b85eb7b291cc1a4bff2671 Author: Alim Akhtar Date: Sat Jun 20 23:02:32 2020 +0530 scsi: ufs: Allow exynos ufs driver to build as module Allow Exynos UFS driver to build as a module. This patch fixes the followin build issue reported by kernel build robot. drivers/scsi/ufs/ufs-exynos.o: in function `exynos_ufs_probe': drivers/scsi/ufs/ufs-exynos.c:1231: undefined reference to `ufshcd_pltfrm_init' drivers/scsi/ufs/ufs-exynos.o: in function `exynos_ufs_pre_pwr_mode': drivers/scsi/ufs/ufs-exynos.c:635: undefined reference to `ufshcd_get_pwr_dev_param' drivers/scsi/ufs/ufs-exynos.o:undefined reference to `ufshcd_pltfrm_shutdown' drivers/scsi/ufs/ufs-exynos.o:undefined reference to `ufshcd_pltfrm_suspend' drivers/scsi/ufs/ufs-exynos.o:undefined reference to `ufshcd_pltfrm_resume' drivers/scsi/ufs/ufs-exynos.o:undefined reference to `ufshcd_pltfrm_runtime_suspend' drivers/scsi/ufs/ufs-exynos.o:undefined reference to `ufshcd_pltfrm_runtime_resume' drivers/scsi/ufs/ufs-exynos.o:undefined reference to `ufshcd_pltfrm_runtime_idle' Link: https://lore.kernel.org/r/20200620173232.52521-1-alim.akhtar@samsung.com Fixes: 55f4b1f73631 ("scsi: ufs: ufs-exynos: Add UFS host support for Exynos SoCs") Reported-by: kernel test robot Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 7b0cc34ac4795f5e1b7c586f136866f25e9b5ae5 Merge: 0558c39604073 f35d2117e28dc Author: David S. Miller Date: Tue Jun 23 20:55:45 2020 -0700 Merge branch 'cxgb4-fix-more-warnings-reported-by-sparse' Rahul Lakkireddy says: ==================== cxgb4: fix more warnings reported by sparse Patch 1 ensures all callers take on-chip memory lock when flashing PHY firmware to fix lock context imbalance warnings. Patch 2 moves all static arrays in header file to respective C file in device dump collection path. ==================== Signed-off-by: David S. Miller commit f35d2117e28dc381613aa3ebf3755bf9dc4080a1 Author: Rahul Lakkireddy Date: Wed Jun 24 02:03:23 2020 +0530 cxgb4: move device dump arrays in header to C file Move all arrays related to device dump in header file to C file. Also, move the function that shares the arrays to the same C file. Fixes following warnings reported by make W=1 in several places: cudbg_entity.h:513:18: warning: 't6_hma_ireg_array' defined but not used [-Wunused-const-variable=] 513 | static const u32 t6_hma_ireg_array[][IREG_NUM_ELEM] = { Fixes: a7975a2f9a79 ("cxgb4: collect register dump") Fixes: 17b332f48074 ("cxgb4: add support to read serial flash") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 5fff701c838e0e9afeac942d2fe20879d2b260aa Author: Rahul Lakkireddy Date: Wed Jun 24 02:03:22 2020 +0530 cxgb4: always sync access when flashing PHY firmware Access to on-chip memory for flashing PHY firmware must always be synchronized. So, ensure the callers take on-chip memory lock. Also fixes following sparse warning: sge.c:1641:26: warning: context imbalance in 't4_load_phy_fw' - different lock contexts for basic block Fixes: 01b6961410b7 ("cxgb4: Add PHY firmware support for T420-BT cards") Fixes: 4ee339e1e92a ("cxgb4: add support to flash PHY image") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 0558c396040734bc1d361919566a581fd41aa539 Author: tannerlove Date: Mon Jun 22 13:43:24 2020 -0400 selftests/net: plug rxtimestamp test into kselftest framework Run rxtimestamp as part of TEST_PROGS. Analogous to other tests, add new rxtimestamp.sh wrapper script, so that the test runs isolated from background traffic in a private network namespace. Also ignore failures of test case #6 by default. This case verifies that a receive timestamp is not reported if timestamp reporting is enabled for a socket, but generation is disabled. Receive timestamp generation has to be enabled globally, as no associated socket is known yet. A background process that enables rx timestamp generation therefore causes a false positive. Ntpd is one example that does. Add a "--strict" option to cause failure in the event that any test case fails, including test #6. This is useful for environments that are known to not have such background processes. Tested: make -C tools/testing/selftests TARGETS="net" run_tests Signed-off-by: Tanner Love Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 547030c8e663520348557a5c7ed1eacf72e6bf86 Author: Mika Westerberg Date: Mon Jun 22 19:30:22 2020 +0300 net: thunderbolt: Add comment clarifying prtcstns flags ThunderboltIP protocol currently has two flags from which we only support and set match frags ID. The first flag is reserved for full E2E flow control. Add a comment that clarifies them. Suggested-by: Yehezkel Bernat Signed-off-by: Mika Westerberg Reviewed-by: Yehezkel Bernat Signed-off-by: David S. Miller commit b5b2382238d1b926752a74b5ee2d418d57b823d4 Merge: 1c59bb6bcbe88 0f183fd151c8c Author: David S. Miller Date: Tue Jun 23 20:35:15 2020 -0700 Merge branch 'ACPI-support-for-xgmac_mdio-drivers' Calvin Johnson says: ==================== ACPI support for xgmac_mdio drivers. This patch series provides ACPI support for xgmac_mdio driver. Changes in v3: - handle case MDIOBUS_NO_CAP Changes in v2: - Reserve "0" to mean that no mdiobus capabilities have been declared. - bus->id: change to appropriate printk format specifier - clean up xgmac_acpi_match - clariy platform_get_resource() usage with comments ==================== Signed-off-by: David S. Miller commit 0f183fd151c8c7e215385edfbdc5112d743434dc Author: Jeremy Linton Date: Mon Jun 22 20:35:34 2020 +0530 net/fsl: enable extended scanning in xgmac_mdio Since we know the xgmac hardware always has a c45 compliant bus, let's try scanning for c22 capable PHYs first. If we fail to find any, then it will fall back to c45 automatically. Signed-off-by: Jeremy Linton Signed-off-by: Calvin Johnson Signed-off-by: David S. Miller commit 229f4bb47512ece7b8ca0bd1a097fee30886b9b8 Author: Calvin Johnson Date: Mon Jun 22 20:35:33 2020 +0530 net/fsl: acpize xgmac_mdio Add ACPI support for xgmac MDIO bus registration while maintaining the existing DT support. The function mdiobus_register() inside of_mdiobus_register(), brings up all the PHYs on the mdio bus and attach them to the bus. Signed-off-by: Jeremy Linton Signed-off-by: Calvin Johnson Signed-off-by: David S. Miller commit 0cc8fecf041d3e5285380da62cc6662bdc942d8c Author: Jeremy Linton Date: Mon Jun 22 20:35:32 2020 +0530 net: phy: Allow mdio buses to auto-probe c45 devices The mdiobus_scan logic is currently hardcoded to only work with c22 devices. This works fairly well in most cases, but its possible that a c45 device doesn't respond despite being a standard phy. If the parent hardware is capable, it makes sense to scan for c22 devices before falling back to c45. As we want this to reflect the capabilities of the STA, lets add a field to the mii_bus structure to represent the capability. That way devices can opt into the extended scanning. Existing users should continue to default to c22 only scanning as long as they are zero'ing the structure before use. Signed-off-by: Jeremy Linton Signed-off-by: Calvin Johnson Signed-off-by: David S. Miller commit 1c59bb6bcbe88aff1527e8eae396d5d5a706e659 Merge: 39ea5d7014ddd 6c3cb945ed79f Author: David S. Miller Date: Tue Jun 23 20:33:15 2020 -0700 Merge branch 'ethernet-dec-tulip-use-generic-power-management' Vaibhav Gupta says: ==================== ethernet: dec: tulip: use generic power management Linux Kernel Mentee: Remove Legacy Power Management. The purpose of this patch series is to remove legacy power management callbacks and invocation of PCI helper functions, from tulip ethernet drivers. With legacy PM, drivers themselves are responsible for handling the device's power states. And they do this with the help of PCI helper functions like pci_enable/disable_device(), pci_set/restore_state(), pci_set_powr_state(), etc. which is not recommended. In generic PM, all the required tasks are handled by PCI core and drivers need to perform device-specific operations only. All patches are compile-tested only. ==================== Signed-off-by: David S. Miller commit 6c3cb945ed79f4a9a1eede1889e165f326dcf6e9 Author: Vaibhav Gupta Date: Mon Jun 22 17:12:28 2020 +0530 tulip: uli526x: use generic power management With the support of generic PM callbacks, drivers no longer need to use legacy .suspend() and .resume() in which they had to maintain PCI states changes and device's power state themselves. Legacy PM involves usage of PCI helper functions like pci_enable_wake() which is no longer recommended. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 77eb16e9b28754183ffa74ae5dac6e6e6e92c93c Author: Vaibhav Gupta Date: Mon Jun 22 17:12:27 2020 +0530 tulip: tulip_core: use generic power management With the support of generic PM callbacks, drivers no longer need to use legacy .suspend() and .resume() in which they had to maintain PCI states changes and device's power state themselves. Earlier, .suspend() and .resume() were invoking pci_disable_device() and pci_enable_device() respectively to manage the device's power state. driver also invoked pci_save/restore_state() and pci_set_power_sitate(). With generic PM, it is no longer needed. The driver is expected to just implement driver-specific operations and leave power transitions to PCI core. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 8cfa989ae3f2e208bccd4007b82c02e2f3863014 Author: Vaibhav Gupta Date: Mon Jun 22 17:12:26 2020 +0530 tulip: de2104x: use generic power management With the support of generic PM callbacks, drivers no longer need to use legacy .suspend() and .resume() in which they had to maintain PCI states changes and device's power state themselves. Earlier, .suspend() and .resume() were invoking pci_disable_device() and pci_enable_device() respectively to manage the device's power state. With generic PM, it is no longer needed. The driver is expected to just implement driver-specific operations and leave power transitions to PCI core. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit fc9aebfbdb7ea9c854e4efe9f1f0389fef814c44 Author: Vaibhav Gupta Date: Mon Jun 22 17:12:25 2020 +0530 tulip: windbond-840: use generic power management With stable support of generic PM callbacks, drivers no longer need to use legacy .suspend() and .resume() in which they had to maintain PCI states changes and device's power state themselves. Earlier, .resume() was invoking pci_enable_device(). Drivers should not call PCI legacy helper functions, hence, it was removed. This should not change the behavior of the device as this function is called by PCI core if somehow pm_ops is not able to bind with the driver, else, required tasks are managed by the core itself. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit f906d0f9cd43adfce79a84fa0d48702ea7b887d3 Author: Vaibhav Gupta Date: Mon Jun 22 17:12:24 2020 +0530 tulip: dmfe: use generic power management With legacy PM hooks, it was the responsibility of a driver to manage PCI states and also the device's power state. The generic approach is to let the PCI core handle the work. The legacy suspend() and resume() were making use of pci_read/write_config_dword() to enable/disable wol. Driver editing configuration registers of a device is not recommended. Thus replace them all with device_wakeup_enable/disable(). Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 39ea5d7014ddd7f1337ad6c0bfc1b866e2f8817b Merge: f9215d6bb53ae c6f0fb5dfea02 Author: David S. Miller Date: Tue Jun 23 20:31:18 2020 -0700 Merge branch 'ethernet-amd-Convert-to-generic-power-management' Vaibhav Gupta says: ==================== ethernet: amd: Convert to generic power management Linux Kernel Mentee: Remove Legacy Power Management. The purpose of this patch series is to remove legacy power management callbacks from amd ethernet drivers. The callbacks performing suspend() and resume() operations are still calling pci_save_state(), pci_set_power_state(), etc. and handling the power management themselves, which is not recommended. The conversion requires the removal of the those function calls and change the callback definition accordingly and make use of dev_pm_ops structure. All patches are compile-tested only. ==================== Signed-off-by: David S. Miller commit c6f0fb5dfea02024ed8d45784a4f2f231aba9c65 Author: Vaibhav Gupta Date: Mon Jun 22 16:44:00 2020 +0530 amd-xgbe: Convert to generic power management Use dev_pm_ops structure to call generic suspend() and resume() callbacks. Drivers should avoid saving device register and/or change power states using PCI helper functions. With the generic approach, all these are handled by PCI core. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit 2caf751fe080887eab4c94e8a2060e6bebe92e73 Author: Vaibhav Gupta Date: Mon Jun 22 16:43:59 2020 +0530 amd8111e: Convert to generic power management Drivers should not save device registers and/or change the power state of the device. As per the generic PM approach, these are handled by PCI core. The driver should support dev_pm_ops callbacks and bind them to pci_driver. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit a86688fbef1b48395822e90d5273e8abcac95a6c Author: Vaibhav Gupta Date: Mon Jun 22 16:43:58 2020 +0530 pcnet32: Convert to generic power management Remove legacy PM callbacks and use generic operations. With legacy code, drivers were responsible for handling PCI PM operations like pci_save_state(). In generic code, all these are handled by PCI core. The generic suspend() and resume() are called at the same point the legacy ones were called. Thus, it does not affect the normal functioning of the driver. Compile-tested only. Signed-off-by: Vaibhav Gupta Signed-off-by: David S. Miller commit f9215d6bb53ae1bd2268369d77b3f0855a27ba47 Author: Gaurav Singh Date: Mon Jun 22 23:41:19 2020 -0400 dn_route_rcv: remove redundant dev null check dev cannot be NULL here since its already being accessed before. Remove the redundant null check. Signed-off-by: Gaurav Singh Signed-off-by: David S. Miller commit 0cc55e694e851921667dc80972a86feb1ca331ef Author: Gaurav Singh Date: Mon Jun 22 22:50:39 2020 -0400 dcb_doit: remove redundant skb check skb cannot be NULL here since its already being accessed before: sock_net(skb->sk). Remove the redundant null check. Signed-off-by: Gaurav Singh Signed-off-by: David S. Miller commit 6f3934576853a4fa60dea74ac8822f0f016ef9e8 Author: Gustavo A. R. Silva Date: Mon Jun 22 18:07:41 2020 -0500 net: ipv6: Use struct_size() helper and kcalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary function ipv6_rpl_srh_alloc_size() and replace kzalloc() with kcalloc(), which has a 2-factor argument form for multiplication. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 5777cbba79ab041ccc08252abf6ea6bbd1f4c285 Author: Gaurav Singh Date: Tue Jun 23 20:55:45 2020 -0400 xirc2ps_cs: remove dev null check from do_reset(). dev cannot be NULL here since its already being accessed before. Remove the redundant null check. Signed-off-by: Gaurav Singh Signed-off-by: David S. Miller commit 943d01183c156c7cbe8f8eb5366da47838c285ee Merge: 4640338c36af8 6db693285cd10 Author: David S. Miller Date: Tue Jun 23 20:10:15 2020 -0700 Merge branch 'net-address-some-sparse-warnings' Eric Dumazet says: ==================== net: address some sparse warnings This series adds missing declarations and move others to address W=1 C=1 warnings in tcp and udp. ==================== Signed-off-by: David S. Miller commit 6db693285cd109e566c553694002dea769612b24 Author: Eric Dumazet Date: Tue Jun 23 15:31:15 2020 -0700 udp: move gro declarations to net/udp.h This removes following warnings : CC net/ipv4/udp_offload.o net/ipv4/udp_offload.c:504:17: warning: no previous prototype for 'udp4_gro_receive' [-Wmissing-prototypes] 504 | struct sk_buff *udp4_gro_receive(struct list_head *head, struct sk_buff *skb) | ^~~~~~~~~~~~~~~~ net/ipv4/udp_offload.c:584:29: warning: no previous prototype for 'udp4_gro_complete' [-Wmissing-prototypes] 584 | INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff) | ^~~~~~~~~~~~~~~~~ CHECK net/ipv6/udp_offload.c net/ipv6/udp_offload.c:115:16: warning: symbol 'udp6_gro_receive' was not declared. Should it be static? net/ipv6/udp_offload.c:148:29: warning: symbol 'udp6_gro_complete' was not declared. Should it be static? CC net/ipv6/udp_offload.o net/ipv6/udp_offload.c:115:17: warning: no previous prototype for 'udp6_gro_receive' [-Wmissing-prototypes] 115 | struct sk_buff *udp6_gro_receive(struct list_head *head, struct sk_buff *skb) | ^~~~~~~~~~~~~~~~ net/ipv6/udp_offload.c:148:29: warning: no previous prototype for 'udp6_gro_complete' [-Wmissing-prototypes] 148 | INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff) | ^~~~~~~~~~~~~~~~~ Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 5521d95e076238f1615cf1cdb135f318ef798b49 Author: Eric Dumazet Date: Tue Jun 23 15:31:14 2020 -0700 net: move tcp gro declarations to net/tcp.h This patch removes following (C=1 W=1) warnings for CONFIG_RETPOLINE=y : net/ipv4/tcp_offload.c:306:16: warning: symbol 'tcp4_gro_receive' was not declared. Should it be static? net/ipv4/tcp_offload.c:306:17: warning: no previous prototype for 'tcp4_gro_receive' [-Wmissing-prototypes] net/ipv4/tcp_offload.c:319:29: warning: symbol 'tcp4_gro_complete' was not declared. Should it be static? net/ipv4/tcp_offload.c:319:29: warning: no previous prototype for 'tcp4_gro_complete' [-Wmissing-prototypes] CHECK net/ipv6/tcpv6_offload.c net/ipv6/tcpv6_offload.c:16:16: warning: symbol 'tcp6_gro_receive' was not declared. Should it be static? net/ipv6/tcpv6_offload.c:29:29: warning: symbol 'tcp6_gro_complete' was not declared. Should it be static? CC net/ipv6/tcpv6_offload.o net/ipv6/tcpv6_offload.c:16:17: warning: no previous prototype for 'tcp6_gro_receive' [-Wmissing-prototypes] 16 | struct sk_buff *tcp6_gro_receive(struct list_head *head, struct sk_buff *skb) | ^~~~~~~~~~~~~~~~ net/ipv6/tcpv6_offload.c:29:29: warning: no previous prototype for 'tcp6_gro_complete' [-Wmissing-prototypes] 29 | INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff) | ^~~~~~~~~~~~~~~~~ Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 9b9e2f250e3e6f59ad07e6d03838c27a100e0042 Author: Eric Dumazet Date: Tue Jun 23 15:31:13 2020 -0700 tcp: move ipv4_specific to tcp include file Declare ipv4_specific once, in tcp.h were it belongs. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit b03d2142bea8cf7407a0a668ce8f5f115bd226c4 Author: Eric Dumazet Date: Tue Jun 23 15:31:12 2020 -0700 tcp: move ipv6_specific declaration to remove a warning ipv6_specific should be declared in tcp include files, not mptcp. This removes the following warning : CHECK net/ipv6/tcp_ipv6.c net/ipv6/tcp_ipv6.c:78:42: warning: symbol 'ipv6_specific' was not declared. Should it be static? Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 243600ee660531d2b5b5ef3faab90c5f8ff4c2b6 Author: Eric Dumazet Date: Tue Jun 23 15:31:11 2020 -0700 tcp: add declarations to avoid warnings Remove these errors: net/ipv6/tcp_ipv6.c:1550:29: warning: symbol 'tcp_v6_rcv' was not declared. Should it be static? net/ipv6/tcp_ipv6.c:1770:30: warning: symbol 'tcp_v6_early_demux' was not declared. Should it be static? net/ipv6/tcp_ipv6.c:1550:29: warning: no previous prototype for 'tcp_v6_rcv' [-Wmissing-prototypes] 1550 | INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb) | ^~~~~~~~~~ net/ipv6/tcp_ipv6.c:1770:30: warning: no previous prototype for 'tcp_v6_early_demux' [-Wmissing-prototypes] 1770 | INDIRECT_CALLABLE_SCOPE void tcp_v6_early_demux(struct sk_buff *skb) | ^~~~~~~~~~~~~~~~~~ Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 7383c0f94d3c902d5dd68792331e9a1d4a5ad6cb Author: Stephen Smalley Date: Wed Jun 17 15:23:09 2020 -0400 selinux: log error messages on required process class / permissions In general SELinux no longer treats undefined object classes or permissions in the policy as a fatal error, instead handling them in accordance with handle_unknown. However, the process class and process transition and dyntransition permissions are still required to be defined due to dependencies on these definitions for default labeling behaviors, role and range transitions in older policy versions that lack an explicit class field, and role allow checking. Log error messages in these cases since otherwise the policy load will fail silently with no indication to the user as to the underlying cause. While here, fix the checking for process transition / dyntransition so that omitting either permission is handled as an error; both are needed in order to ensure that role allow checking is consistently applied. Reported-by: bauen1 Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit 382c2b5d23b4245f1818f69286db334355488dc4 Author: Stephen Smalley Date: Wed Jun 17 15:22:16 2020 -0400 scripts/selinux/mdp: fix initial SID handling commit e3e0b582c321 ("selinux: remove unused initial SIDs and improve handling") broke scripts/selinux/mdp since the unused initial SID names were removed and the corresponding generation of policy initial SID definitions by mdp was not updated accordingly. Fix it. With latest upstream checkpolicy it is no longer necessary to include the SID context definitions for the unused initial SIDs but retain them for compatibility with older checkpolicy. Fixes: e3e0b582c321 ("selinux: remove unused initial SIDs and improve handling") Signed-off-by: Stephen Smalley Signed-off-by: Paul Moore commit c8e222616c7e98305bdc861db3ccac520bc29921 Author: Jonathan Lebon Date: Thu May 28 10:39:40 2020 -0400 selinux: allow reading labels before policy is loaded This patch does for `getxattr` what commit 3e3e24b42043 ("selinux: allow labeling before policy is loaded") did for `setxattr`; it allows querying the current SELinux label on disk before the policy is loaded. One of the motivations described in that commit message also drives this patch: for Fedora CoreOS (and eventually RHEL CoreOS), we want to be able to move the root filesystem for example, from xfs to ext4 on RAID, on first boot, at initrd time.[1] Because such an operation works at the filesystem level, we need to be able to read the SELinux labels first from the original root, and apply them to the files of the new root. The previous commit enabled the second part of this process; this commit enables the first part. [1] https://github.com/coreos/fedora-coreos-tracker/issues/94 Acked-by: Stephen Smalley Signed-off-by: Jonathan Lebon Signed-off-by: Paul Moore commit 8e6cf365e1d5c70e275a77a3c5ad7e3dc685474c Author: Richard Guy Briggs Date: Thu Jun 4 09:20:49 2020 -0400 audit: log nftables configuration change events iptables, ip6tables, arptables and ebtables table registration, replacement and unregistration configuration events are logged for the native (legacy) iptables setsockopt api, but not for the nftables netlink api which is used by the nft-variant of iptables in addition to nftables itself. Add calls to log the configuration actions in the nftables netlink api. This uses the same NETFILTER_CFG record format but overloads the table field. type=NETFILTER_CFG msg=audit(2020-05-28 17:46:41.878:162) : table=?:0;?:0 family=unspecified entries=2 op=nft_register_gen pid=396 subj=system_u:system_r:firewalld_t:s0 comm=firewalld ... type=NETFILTER_CFG msg=audit(2020-05-28 17:46:41.878:162) : table=firewalld:1;?:0 family=inet entries=0 op=nft_register_table pid=396 subj=system_u:system_r:firewalld_t:s0 comm=firewalld ... type=NETFILTER_CFG msg=audit(2020-05-28 17:46:41.911:163) : table=firewalld:1;filter_FORWARD:85 family=inet entries=8 op=nft_register_chain pid=396 subj=system_u:system_r:firewalld_t:s0 comm=firewalld ... type=NETFILTER_CFG msg=audit(2020-05-28 17:46:41.911:163) : table=firewalld:1;filter_FORWARD:85 family=inet entries=101 op=nft_register_rule pid=396 subj=system_u:system_r:firewalld_t:s0 comm=firewalld ... type=NETFILTER_CFG msg=audit(2020-05-28 17:46:41.911:163) : table=firewalld:1;__set0:87 family=inet entries=87 op=nft_register_setelem pid=396 subj=system_u:system_r:firewalld_t:s0 comm=firewalld ... type=NETFILTER_CFG msg=audit(2020-05-28 17:46:41.911:163) : table=firewalld:1;__set0:87 family=inet entries=0 op=nft_register_set pid=396 subj=system_u:system_r:firewalld_t:s0 comm=firewalld For further information please see issue https://github.com/linux-audit/audit-kernel/issues/124 Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 732c94def0460d31f87d145d96db25f05273719e Author: Konrad Dybcio Date: Wed Jun 24 00:48:09 2020 +0200 arm64: dts: qcom: angler: Add qcom,msm-id and pmic-id Add properties required for the bootloader to select the correct bootloader blob. They have been removed from the SoC device tree as they should be set on a per-device basis. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200623224813.297077-11-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit c21e7c067989bcbe52c8cf7c81cfc4182c06f298 Author: Konrad Dybcio Date: Wed Jun 24 00:48:08 2020 +0200 arm64: dts: qcom: msm8994: Add PSCI node Add PSCI node to enable multi-processor startup. Note that not every 8994 device firmware supports PSCI, and even if, then it can only start the cores and not shut them down. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200623224813.297077-10-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit a1026ca24262f3a934c1ca4b299f04e7d02b3149 Author: Konrad Dybcio Date: Wed Jun 24 00:48:07 2020 +0200 arm64: dts: qcom: msm8994: Add pmu node Add the CPU PMU to get perf support for hardware events. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200623224813.297077-9-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit d3d071a0e5bc829803ca6124e80d7649079dabab Author: Konrad Dybcio Date: Wed Jun 24 00:48:06 2020 +0200 arm64: dts: qcom: msm8994: Add I2C, SPI and BLSP DMA nodes Add support for I2C and SPI buses to enable peripherals such as touchscreens or sensors. Also add DMA nodes, configuration and BLSP2 UART2 interface. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200623224813.297077-8-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 448d9c221672aa34412d5c922426eeb481ae2037 Author: Konrad Dybcio Date: Wed Jun 24 00:48:04 2020 +0200 arm64: dts: qcom: msm8994: Add SDHCI1 node Enable support for SDHCI on msm8994-based devices. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200623224813.297077-6-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 02d8091bbca00baa1ae586e960c02a7c9e062e22 Author: Konrad Dybcio Date: Wed Jun 24 00:48:02 2020 +0200 arm64: dts: qcom: msm8994: Add a proper CPU map Add a proper CPU map to enable the use of all 8 cores. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200623224813.297077-4-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit b0ad598f8ec052682ce785a431335b0fc11672d5 Author: Konrad Dybcio Date: Wed Jun 24 00:48:01 2020 +0200 arm64: dts: qcom: msm8994: Add SPMI PMIC arbiter device Add SPMI PMIC arbiter device to communicate with PMICs attached to SPMI bus. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200623224813.297077-3-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 7c865b09b0a133fb9af47b1df6ba413d66b570a1 Author: Konrad Dybcio Date: Wed Jun 24 00:48:00 2020 +0200 arm64: dts: qcom: msm8994: Modernize the DTS style Following changes have been made: - remove name, compatible and msm-id - wrap clocks in clocks{} - order nodes by name and by address - clock_gcc -> gcc - msmgpio -> tlmm - qcom,smem -> smem - remove unit-address from smem - retire msm8994-pins.dtsi - add some of the missing pins - make comments C-style Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200623224813.297077-2-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit a9541d2e8a2450ca7e97b63256e556e3fa27026d Author: Konrad Dybcio Date: Tue Jun 2 22:04:07 2020 +0200 soc: qcom: smd-rpm: Add msm8994 compatible Add the compatible for the RPM in msm8994. Acked-by: Rob Herring Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200602200407.320908-1-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 4e608675e790b3f61b98bc38b3e8a38613b480ab Merge: 9d9d8cc21e382 02553b91da5de Author: Alexei Starovoitov Date: Tue Jun 23 15:32:42 2020 -0700 Merge up to bpf_probe_read_kernel_str() fix into bpf-next commit 4640338c36af88b74550b995f425921729f0b59f Author: Heiner Kallweit Date: Tue Jun 23 23:04:42 2020 +0200 r8169: rename RTL8125 to RTL8125A Realtek added new members to the RTL8125 chip family, therefore rename RTL8125 to RTL8125a. Then we use the same chip naming as in the r8125 vendor driver. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit bdfd2d1fa79acd03e18d1683419572f3682b39fd Author: Jarod Wilson Date: Tue Jun 23 16:40:01 2020 -0400 bonding/xfrm: use real_dev instead of slave_dev Rather than requiring every hw crypto capable NIC driver to do a check for slave_dev being set, set real_dev in the xfrm layer and xso init time, and then override it in the bonding driver as needed. Then NIC drivers can always use real_dev, and at the same time, we eliminate the use of a variable name that probably shouldn't have been used in the first place, particularly given recent current events. CC: Boris Pismenny CC: Saeed Mahameed CC: Leon Romanovsky CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: "David S. Miller" CC: Jeff Kirsher CC: Jakub Kicinski CC: Steffen Klassert CC: Herbert Xu CC: netdev@vger.kernel.org Suggested-by: Saeed Mahameed Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller commit 2d538c1947c95b60f348040efa2a742ebbdc6601 Merge: 55cced4f813be 34639fa3832f8 Author: David S. Miller Date: Tue Jun 23 15:14:13 2020 -0700 Merge branch 'mlxsw-Bump-firmware-version-to-XX-2007-1168' Ido Schimmel says: ==================== mlxsw: Bump firmware version to XX.2007.1168 Petr says: In patch #1, bump the firmware version required by the driver to XX.2007.1168. This version fixes several issues observed in the offloaded datapath. In patch #2, add support for requiring FW version on Spectrum-3 (so far only Spectrum-1 and Spectrum-2 have had this requirement). Demand the same version as mentioned above. ==================== Signed-off-by: David S. Miller commit 34639fa3832f8a30560581ee65b00a2bc315e467 Author: Petr Machata Date: Tue Jun 23 22:13:46 2020 +0300 mlxsw: Enforce firmware version for Spectrum-3 In a fashion similar to the other Spectrum systems, enforce a specific firmware version for Spectrum-3 so that the driver and firmware are always in sync with regards to new features. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 69c8a8c543949dbfaa86da830bd5c00a546b5b47 Author: Petr Machata Date: Tue Jun 23 22:13:45 2020 +0300 mlxsw: Bump firmware version to XX.2007.1168 This version comes with fixes to the following problems, among others: - Wrong shaper configuration on Spectrum-1 - Bogus temperature reading on Spectrum-2 - Problems in setting egress buffer size after MTU change on Spectrum-2 Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 55cced4f813bece01f96256d96f283b9210d19ee Author: Brian Vazquez Date: Tue Jun 23 09:42:32 2020 -0700 ipv6: fib6: avoid indirect calls from fib6_rule_lookup It was reported that a considerable amount of cycles were spent on the expensive indirect calls on fib6_rule_lookup. This patch introduces an inline helper called pol_route_func that uses the indirect_call_wrappers to avoid the indirect calls. This patch saves around 50ns per call. Performance was measured on the receiver by checking the amount of syncookies that server was able to generate under a synflood load. Traffic was generated using trafgen[1] which was pushing around 1Mpps on a single queue. Receiver was using only one rx queue which help to create a bottle neck and make the experiment rx-bounded. These are the syncookies generated over 10s from the different runs: Whithout the patch: TcpExtSyncookiesSent 3553749 0.0 TcpExtSyncookiesSent 3550895 0.0 TcpExtSyncookiesSent 3553845 0.0 TcpExtSyncookiesSent 3541050 0.0 TcpExtSyncookiesSent 3539921 0.0 TcpExtSyncookiesSent 3557659 0.0 TcpExtSyncookiesSent 3526812 0.0 TcpExtSyncookiesSent 3536121 0.0 TcpExtSyncookiesSent 3529963 0.0 TcpExtSyncookiesSent 3536319 0.0 With the patch: TcpExtSyncookiesSent 3611786 0.0 TcpExtSyncookiesSent 3596682 0.0 TcpExtSyncookiesSent 3606878 0.0 TcpExtSyncookiesSent 3599564 0.0 TcpExtSyncookiesSent 3601304 0.0 TcpExtSyncookiesSent 3609249 0.0 TcpExtSyncookiesSent 3617437 0.0 TcpExtSyncookiesSent 3608765 0.0 TcpExtSyncookiesSent 3620205 0.0 TcpExtSyncookiesSent 3601895 0.0 Without the patch the average is 354263 pkt/s or 2822 ns/pkt and with the patch the average is 360738 pkt/s or 2772 ns/pkt which gives an estimate of 50 ns per packet. [1] http://netsniff-ng.org/ Changelog since v1: - Change ordering in the ICW (Paolo Abeni) Cc: Luigi Rizzo Cc: Paolo Abeni Reported-by: Eric Dumazet Signed-off-by: Brian Vazquez Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit e678e9ddea96590888b034e2a7ad1128bf1ea1ea Author: Brian Vazquez Date: Tue Jun 23 09:42:31 2020 -0700 indirect_call_wrapper: extend indirect wrapper to support up to 4 calls There are many places where 2 annotations are not enough. This patch adds INDIRECT_CALL_3 and INDIRECT_CALL_4 to cover such cases. Signed-off-by: Brian Vazquez Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit 9d9d8cc21e3827b89e414f990016836290de3038 Author: Tobias Klauser Date: Tue Jun 23 12:37:10 2020 +0200 tools, bpftool: Correctly evaluate $(BUILD_BPF_SKELS) in Makefile Currently, if the clang-bpf-co-re feature is not available, the build fails with e.g. CC prog.o prog.c:1462:10: fatal error: profiler.skel.h: No such file or directory 1462 | #include "profiler.skel.h" | ^~~~~~~~~~~~~~~~~ This is due to the fact that the BPFTOOL_WITHOUT_SKELETONS macro is not defined, despite BUILD_BPF_SKELS not being set. Fix this by correctly evaluating $(BUILD_BPF_SKELS) when deciding on whether to add -DBPFTOOL_WITHOUT_SKELETONS to CFLAGS. Fixes: 05aca6da3b5a ("tools/bpftool: Generalize BPF skeleton support and generate vmlinux.h") Signed-off-by: Tobias Klauser Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20200623103710.10370-1-tklauser@distanz.ch commit 2fde1747c986cac28fa66d0cffd7577db042640b Author: John Fastabend Date: Mon Jun 22 20:22:23 2020 -0700 selftests/bpf: Add variable-length data concat pattern less than test Extend original variable-length tests with a case to catch a common existing pattern of testing for < 0 for errors. Note because verifier also tracks upper bounds and we know it can not be greater than MAX_LEN here we can skip upper bound check. In ALU64 enabled compilation converting from long->int return types in probe helpers results in extra instruction pattern, <<= 32, s >>= 32. The trade-off is the non-ALU64 case works. If you really care about every extra insn (XDP case?) then you probably should be using original int type. In addition adding a sext insn to bpf might help the verifier in the general case to avoid these types of tricks. Signed-off-by: John Fastabend Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200623032224.4020118-3-andriin@fb.com commit 5e85c6bb8e74bd9daa4f5815da373d4ac2cb1a35 Author: Andrii Nakryiko Date: Mon Jun 22 20:22:22 2020 -0700 selftests/bpf: Add variable-length data concatenation pattern test Add selftest that validates variable-length data reading and concatentation with one big shared data array. This is a common pattern in production use for monitoring and tracing applications, that potentially can read a lot of data, but overall read much less. Such pattern allows to determine precisely what amount of data needs to be sent over perfbuf/ringbuf and maximize efficiency. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200623032224.4020118-2-andriin@fb.com commit bdb7b79b4ce864a724250e1d35948c46f135de36 Author: Andrii Nakryiko Date: Mon Jun 22 20:22:21 2020 -0700 bpf: Switch most helper return values from 32-bit int to 64-bit long Switch most of BPF helper definitions from returning int to long. These definitions are coming from comments in BPF UAPI header and are used to generate bpf_helper_defs.h (under libbpf) to be later included and used from BPF programs. In actual in-kernel implementation, all the helpers are defined as returning u64, but due to some historical reasons, most of them are actually defined as returning int in UAPI (usually, to return 0 on success, and negative value on error). This actually causes Clang to quite often generate sub-optimal code, because compiler believes that return value is 32-bit, and in a lot of cases has to be up-converted (usually with a pair of 32-bit bit shifts) to 64-bit values, before they can be used further in BPF code. Besides just "polluting" the code, these 32-bit shifts quite often cause problems for cases in which return value matters. This is especially the case for the family of bpf_probe_read_str() functions. There are few other similar helpers (e.g., bpf_read_branch_records()), in which return value is used by BPF program logic to record variable-length data and process it. For such cases, BPF program logic carefully manages offsets within some array or map to read variable-length data. For such uses, it's crucial for BPF verifier to track possible range of register values to prove that all the accesses happen within given memory bounds. Those extraneous zero-extending bit shifts, inserted by Clang (and quite often interleaved with other code, which makes the issues even more challenging and sometimes requires employing extra per-variable compiler barriers), throws off verifier logic and makes it mark registers as having unknown variable offset. We'll study this pattern a bit later below. Another common pattern is to check return of BPF helper for non-zero state to detect error conditions and attempt alternative actions in such case. Even in this simple and straightforward case, this 32-bit vs BPF's native 64-bit mode quite often leads to sub-optimal and unnecessary extra code. We'll look at this pattern as well. Clang's BPF target supports two modes of code generation: ALU32, in which it is capable of using lower 32-bit parts of registers, and no-ALU32, in which only full 64-bit registers are being used. ALU32 mode somewhat mitigates the above described problems, but not in all cases. This patch switches all the cases in which BPF helpers return 0 or negative error from returning int to returning long. It is shown below that such change in definition leads to equivalent or better code. No-ALU32 mode benefits more, but ALU32 mode doesn't degrade or still gets improved code generation. Another class of cases switched from int to long are bpf_probe_read_str()-like helpers, which encode successful case as non-negative values, while still returning negative value for errors. In all of such cases, correctness is preserved due to two's complement encoding of negative values and the fact that all helpers return values with 32-bit absolute value. Two's complement ensures that for negative values higher 32 bits are all ones and when truncated, leave valid negative 32-bit value with the same value. Non-negative values have upper 32 bits set to zero and similarly preserve value when high 32 bits are truncated. This means that just casting to int/u32 is correct and efficient (and in ALU32 mode doesn't require any extra shifts). To minimize the chances of regressions, two code patterns were investigated, as mentioned above. For both patterns, BPF assembly was analyzed in ALU32/NO-ALU32 compiler modes, both with current 32-bit int return type and new 64-bit long return type. Case 1. Variable-length data reading and concatenation. This is quite ubiquitous pattern in tracing/monitoring applications, reading data like process's environment variables, file path, etc. In such case, many pieces of string-like variable-length data are read into a single big buffer, and at the end of the process, only a part of array containing actual data is sent to user-space for further processing. This case is tested in test_varlen.c selftest (in the next patch). Code flow is roughly as follows: void *payload = &sample->payload; u64 len; len = bpf_probe_read_kernel_str(payload, MAX_SZ1, &source_data1); if (len <= MAX_SZ1) { payload += len; sample->len1 = len; } len = bpf_probe_read_kernel_str(payload, MAX_SZ2, &source_data2); if (len <= MAX_SZ2) { payload += len; sample->len2 = len; } /* and so on */ sample->total_len = payload - &sample->payload; /* send over, e.g., perf buffer */ There could be two variations with slightly different code generated: when len is 64-bit integer and when it is 32-bit integer. Both variations were analysed. BPF assembly instructions between two successive invocations of bpf_probe_read_kernel_str() were used to check code regressions. Results are below, followed by short analysis. Left side is using helpers with int return type, the right one is after the switch to long. ALU32 + INT ALU32 + LONG =========== ============ 64-BIT (13 insns): 64-BIT (10 insns): ------------------------------------ ------------------------------------ 17: call 115 17: call 115 18: if w0 > 256 goto +9 18: if r0 > 256 goto +6 19: w1 = w0 19: r1 = 0 ll 20: r1 <<= 32 21: *(u64 *)(r1 + 0) = r0 21: r1 s>>= 32 22: r6 = 0 ll 22: r2 = 0 ll 24: r6 += r0 24: *(u64 *)(r2 + 0) = r1 00000000000000c8 : 25: r6 = 0 ll 25: r1 = r6 27: r6 += r1 26: w2 = 256 00000000000000e0 : 27: r3 = 0 ll 28: r1 = r6 29: call 115 29: w2 = 256 30: r3 = 0 ll 32: call 115 32-BIT (11 insns): 32-BIT (12 insns): ------------------------------------ ------------------------------------ 17: call 115 17: call 115 18: if w0 > 256 goto +7 18: if w0 > 256 goto +8 19: r1 = 0 ll 19: r1 = 0 ll 21: *(u32 *)(r1 + 0) = r0 21: *(u32 *)(r1 + 0) = r0 22: w1 = w0 22: r0 <<= 32 23: r6 = 0 ll 23: r0 >>= 32 25: r6 += r1 24: r6 = 0 ll 00000000000000d0 : 26: r6 += r0 26: r1 = r6 00000000000000d8 : 27: w2 = 256 27: r1 = r6 28: r3 = 0 ll 28: w2 = 256 30: call 115 29: r3 = 0 ll 31: call 115 In ALU32 mode, the variant using 64-bit length variable clearly wins and avoids unnecessary zero-extension bit shifts. In practice, this is even more important and good, because BPF code won't need to do extra checks to "prove" that payload/len are within good bounds. 32-bit len is one instruction longer. Clang decided to do 64-to-32 casting with two bit shifts, instead of equivalent `w1 = w0` assignment. The former uses extra register. The latter might potentially lose some range information, but not for 32-bit value. So in this case, verifier infers that r0 is [0, 256] after check at 18:, and shifting 32 bits left/right keeps that range intact. We should probably look into Clang's logic and see why it chooses bitshifts over sub-register assignments for this. NO-ALU32 + INT NO-ALU32 + LONG ============== =============== 64-BIT (14 insns): 64-BIT (10 insns): ------------------------------------ ------------------------------------ 17: call 115 17: call 115 18: r0 <<= 32 18: if r0 > 256 goto +6 19: r1 = r0 19: r1 = 0 ll 20: r1 >>= 32 21: *(u64 *)(r1 + 0) = r0 21: if r1 > 256 goto +7 22: r6 = 0 ll 22: r0 s>>= 32 24: r6 += r0 23: r1 = 0 ll 00000000000000c8 : 25: *(u64 *)(r1 + 0) = r0 25: r1 = r6 26: r6 = 0 ll 26: r2 = 256 28: r6 += r0 27: r3 = 0 ll 00000000000000e8 : 29: call 115 29: r1 = r6 30: r2 = 256 31: r3 = 0 ll 33: call 115 32-BIT (13 insns): 32-BIT (13 insns): ------------------------------------ ------------------------------------ 17: call 115 17: call 115 18: r1 = r0 18: r1 = r0 19: r1 <<= 32 19: r1 <<= 32 20: r1 >>= 32 20: r1 >>= 32 21: if r1 > 256 goto +6 21: if r1 > 256 goto +6 22: r2 = 0 ll 22: r2 = 0 ll 24: *(u32 *)(r2 + 0) = r0 24: *(u32 *)(r2 + 0) = r0 25: r6 = 0 ll 25: r6 = 0 ll 27: r6 += r1 27: r6 += r1 00000000000000e0 : 00000000000000e0 : 28: r1 = r6 28: r1 = r6 29: r2 = 256 29: r2 = 256 30: r3 = 0 ll 30: r3 = 0 ll 32: call 115 32: call 115 In NO-ALU32 mode, for the case of 64-bit len variable, Clang generates much superior code, as expected, eliminating unnecessary bit shifts. For 32-bit len, code is identical. So overall, only ALU-32 32-bit len case is more-or-less equivalent and the difference stems from internal Clang decision, rather than compiler lacking enough information about types. Case 2. Let's look at the simpler case of checking return result of BPF helper for errors. The code is very simple: long bla; if (bpf_probe_read_kenerl(&bla, sizeof(bla), 0)) return 1; else return 0; ALU32 + CHECK (9 insns) ALU32 + CHECK (9 insns) ==================================== ==================================== 0: r1 = r10 0: r1 = r10 1: r1 += -8 1: r1 += -8 2: w2 = 8 2: w2 = 8 3: r3 = 0 3: r3 = 0 4: call 113 4: call 113 5: w1 = w0 5: r1 = r0 6: w0 = 1 6: w0 = 1 7: if w1 != 0 goto +1 7: if r1 != 0 goto +1 8: w0 = 0 8: w0 = 0 0000000000000048 : 0000000000000048 : 9: exit 9: exit Almost identical code, the only difference is the use of full register assignment (r1 = r0) vs half-registers (w1 = w0) in instruction #5. On 32-bit architectures, new BPF assembly might be slightly less optimal, in theory. But one can argue that's not a big issue, given that use of full registers is still prevalent (e.g., for parameter passing). NO-ALU32 + CHECK (11 insns) NO-ALU32 + CHECK (9 insns) ==================================== ==================================== 0: r1 = r10 0: r1 = r10 1: r1 += -8 1: r1 += -8 2: r2 = 8 2: r2 = 8 3: r3 = 0 3: r3 = 0 4: call 113 4: call 113 5: r1 = r0 5: r1 = r0 6: r1 <<= 32 6: r0 = 1 7: r1 >>= 32 7: if r1 != 0 goto +1 8: r0 = 1 8: r0 = 0 9: if r1 != 0 goto +1 0000000000000048 : 10: r0 = 0 9: exit 0000000000000058 : 11: exit NO-ALU32 is a clear improvement, getting rid of unnecessary zero-extension bit shifts. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200623032224.4020118-1-andriin@fb.com commit 13fdc4193c2f9325cfa11bccd305e9ad40226f27 Author: Masanari Iida Date: Tue Jun 23 23:13:01 2020 +0900 mlxsw: spectrum_dcb: Fix a spelling typo in spectrum_dcb.c This patch fixes a spelling typo in spectrum_dcb.c Signed-off-by: Masanari Iida Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 79a28ddd18e9c653f13f60dfabee15c024e64b9b Author: Alexandre Cassen Date: Tue Jun 23 10:33:45 2020 +0200 rtnetlink: add keepalived rtm_protocol Keepalived can set global static ip routes or virtual ip routes dynamically following VRRP protocol states. Using a dedicated rtm_protocol will help keeping track of it. Changes in v2: - fix tab/space indenting Signed-off-by: Alexandre Cassen Signed-off-by: David S. Miller commit fe860ac25d12ce373db2779d43e0e58ce204228c Author: Bjorn Andersson Date: Mon Jun 22 15:27:47 2020 -0700 arm64: defconfig: Enable Qualcomm IPCC driver The IPCC hardware block provides a mechanism for triggering interrupts between co-processors in recent Qualcomm SoCs. This is used as basis for most form of communication between co-processors, so enable this support. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200622222747.717306-7-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 23a8903785b9dc64abf97540fd6ea1b76944dcb6 Author: Bjorn Andersson Date: Mon Jun 22 15:27:46 2020 -0700 arm64: dts: qcom: sm8250: Add remoteprocs Add remoteproc nodes for the audio, compute and sensor cores, define glink for each one and enable them on the MTP with appropriate firmware defined. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200622222747.717306-6-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 8770a2a84e03cdee613de240c47ac57821357734 Author: Bjorn Andersson Date: Mon Jun 22 15:27:45 2020 -0700 arm64: dts: qcom: sm8250: Add SMP2P nodes SMP2P is used for interrupting and being interrupted about remoteproc state changes related to the audio, compute and sensor subsystems. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200622222747.717306-5-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 087d537aec562a62b855b62cbf6e3c70ed6d7115 Author: Bjorn Andersson Date: Mon Jun 22 15:27:44 2020 -0700 arm64: dts: qcom: sm8250: Add QMP AOSS node Add a node for the QMP AOSS. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200622222747.717306-4-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit e5361e75544f25848ac74b1088b813c47cc70bbe Author: Bjorn Andersson Date: Mon Jun 22 15:27:43 2020 -0700 arm64: dts: qcom: sm8250: Add IPCC Add the IPCC node, used to send and receive IPC signals with remoteprocs. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20200622222747.717306-3-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 877666435dc54d66f2e2d4d4ab60cabf30775506 Author: Bjorn Andersson Date: Mon Jun 22 15:27:42 2020 -0700 arm64: dts: qcom: sm8250-mtp: Drop PM8150 ldo11 PM8150 ldo11 on the MTP is wired to VDD_SSC_CX and controlled in levels, rather than as a regulator. As such it's available from the rpmhpd as the SM8250_LCX power domain. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Vinod Koul Fixes: ec13d5c23a33 ("arm64: dts: qcom: sm8250-mtp: Add pm8150, pm8150l and pm8009") Link: https://lore.kernel.org/r/20200622222747.717306-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 78625f44c3651ea5b4352fbbe982a168593b8452 Author: Bjorn Andersson Date: Mon Jun 22 15:00:48 2020 -0700 arm64: defconfig: Enable Qualcomm SM8250 pinctrl driver The SM8250 pinctrl driver provides pin configuration, pin muxing and GPIO pin control for many pins on the SM8250 SoC. Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200622220048.717073-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 6f7b2249545ab4d079baa1b66b37ec3e63f5bb97 Author: Dmitry Baryshkov Date: Mon May 25 19:48:17 2020 +0300 soc: qcom: socinfo: add SM8250 entry to soc_id array Add an entry for SM8250 SoC. Reviewed-by: Bjorn Andersson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200525164817.2938638-4-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 50f85d16200eee194692f049f6f06b413e5a46ba Author: Dmitry Baryshkov Date: Mon May 25 19:48:16 2020 +0300 soc: qcom: socinfo: add file with SoC info format version To ease debugging socinfo driver for newer chips add debugfs file returning SoC info format version. Reviewed-by: Bjorn Andersson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200525164817.2938638-3-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit e9247e2ce5778678c8d631e26ef79dbccedbe6d0 Author: Dmitry Baryshkov Date: Mon May 25 19:48:15 2020 +0300 soc: qcom: socinfo: fix printing of pmic_model Print sensible string instead of just "(null)" for unknown PMIC models. Also as we are at it, do not let debugfs handler access past pmic_models array. Reviewed-by: Bjorn Andersson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200525164817.2938638-2-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 0f12fe7f1e660ac3b4bb6917c61c88c96f2be127 Author: Dmitry Baryshkov Date: Mon May 25 19:48:14 2020 +0300 soc: qcom: socinfo: add support for newer socinfo data Add support for newer Qualcomm SoC info structures (up to version 0.15). Reviewed-by: Bjorn Andersson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200525164817.2938638-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 7aae3c161e0677018d6b3be2b79c4dbbedda9091 Merge: ef01ab612b527 260249f929e81 Author: Stephen Boyd Date: Tue Jun 23 12:12:43 2020 -0700 Merge branch 'clk-vc5' into clk-next * clk-vc5: clk: vc5: Enable addition output configurations of the Versaclock dt: Add additional option bindings for IDT VersaClock clk: vc5: Allow Versaclock driver to support multiple instances commit ec971aaa6775cff555b4f58777ceab1d9a8370e0 Author: Laurent Pinchart Date: Tue May 26 04:15:00 2020 +0300 drm: bridge: dw-hdmi: Make connector creation optional Implement the drm_bridge_funcs .detect() and .get_edid() operations, and call drm_bridge_hpd_notify() notify to report HPD. This provides the necessary API to support disabling connector creation, do so by accepting DRM_BRIDGE_ATTACH_NO_CONNECTOR in dw_hdmi_bridge_attach(). Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-23-laurent.pinchart+renesas@ideasonboard.com commit 81980037fb275d9db1bbb0239682d707e8dd62a0 Author: Laurent Pinchart Date: Tue May 26 04:14:59 2020 +0300 drm: bridge: dw-hdmi: Pass drm_connector to internal functions as needed To prepare for making connector creation optional in the driver, pass the drm_connector explicitly to the internal functions that require it. The functions that still access the connector from the dw_hdmi structure are dw_hdmi_connector_create() and __dw_hdmi_probe(). The former access is expected, as that's where the internal connector is created. The latter will be addressed separately. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-22-laurent.pinchart+renesas@ideasonboard.com commit ca7b6b7176ffea4d07afbd98ede7a94fb0f68fa1 Author: Laurent Pinchart Date: Tue May 26 04:14:58 2020 +0300 drm: bridge: dw-hdmi: Store current connector in struct dw_hdmi Store the connector that the bridge is currently wired to in the dw_hdmi structure. This is currently identical to the connector field, but will differ once the driver supports disabling connector creation. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-21-laurent.pinchart+renesas@ideasonboard.com commit 3f588fda4b80dbd7dafa08b0e16fd72a42676e3c Author: Laurent Pinchart Date: Tue May 26 04:14:57 2020 +0300 drm: bridge: dw-hdmi: Split connector creation to a separate function Isolate all the code related to connector creation to a new dw_hdmi_connector_create() function, to prepare for making connector creation optional. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-20-laurent.pinchart+renesas@ideasonboard.com commit 7be390d4c0a125266c558c30a3687d931c3b6101 Author: Laurent Pinchart Date: Tue May 26 04:14:56 2020 +0300 drm: bridge: dw-hdmi: Pass drm_display_info to dw_hdmi_support_scdc() To prepare for making connector creation optional in the driver, pass the drm_display_info explicitly to dw_hdmi_support_scdc(). The pointer is passed to the callers where required, particularly to the dw_hdmi_phy_ops .init() function. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-19-laurent.pinchart+renesas@ideasonboard.com commit 9fbfa320b435e6f25499a63f7bb74b4fc5341b30 Author: Laurent Pinchart Date: Tue May 26 04:14:55 2020 +0300 drm: bridge: dw-hdmi: Constify mode argument to internal functions Several internal functions take a drm_display_mode argument to configure the HDMI encoder or the HDMI PHY. They must not modify the mode, make the pointer const to enforce that. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-18-laurent.pinchart+renesas@ideasonboard.com commit 35a395f1134bbbd2984dcca28c04f09fbbb8b0a4 Author: Laurent Pinchart Date: Tue May 26 04:14:54 2020 +0300 drm: bridge: dw-hdmi: Constify mode argument to dw_hdmi_phy_ops .init() The PHY .init() must not modify the mode it receives. Make the pointer const to enfore that. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-17-laurent.pinchart+renesas@ideasonboard.com commit af05bba0fbe2c07fe500f697080d78d050be2fbf Author: Laurent Pinchart Date: Tue May 26 04:14:53 2020 +0300 drm: bridge: dw-hdmi: Pass drm_display_info to .mode_valid() Replace the drm_connector pointer passed to the .mode_valid() function with a const drm_display_info pointer, as that's all the function should need. Use the display info passed to the bridge .mode_valid() operation instead of retrieving it from the connector, to prepare for make connector creation optional. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-16-laurent.pinchart+renesas@ideasonboard.com commit 9bc78d6dc818701e47c5ebd0879877a512f039f0 Author: Laurent Pinchart Date: Tue May 26 04:14:52 2020 +0300 drm: meson: dw-hdmi: Use dw_hdmi context to replace hack The meson-dw-hdmi driver needs to access its own context from the .mode_valid() operation. It currently gets it from the dev_private field of the drm_device retrieved from the connector, which is a hack. Use the private data passed to the .mode_valid() operation instead. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-15-laurent.pinchart+renesas@ideasonboard.com commit 29fc89719d396e81176974ce37e0cc81e23869d8 Author: Laurent Pinchart Date: Tue May 26 04:14:51 2020 +0300 drm: bridge: dw-hdmi: Remove unused field from dw_hdmi_plat_data The input_bus_format field of struct dw_hdmi_plat_data is unused. Remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-14-laurent.pinchart+renesas@ideasonboard.com commit 49da7e5d84e3b520355c0b6148d6dc9e5415a13e Author: Laurent Pinchart Date: Tue May 26 04:14:50 2020 +0300 drm: bridge: dw-hdmi: Pass private data pointer to .configure_phy() The .configure_phy() operation takes a dw_hdmi_plat_data pointer as a context argument. This differs from .mode_valid() that takes a custom private context pointer, causing possible confusion. Make the dw_hdmi_plat_data operations more consistent by passing the private context pointer to .configure_phy() as well. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-13-laurent.pinchart+renesas@ideasonboard.com commit 96591a4b93fb8b335941783dd6e7ded9d6d49f09 Author: Laurent Pinchart Date: Tue May 26 04:14:49 2020 +0300 drm: bridge: dw-hdmi: Pass private data pointer to .mode_valid() Platform glue drivers for dw_hdmi may need to access device-specific data from their .mode_valid() implementation. They currently have no clean way to do so, and one driver hacks around it by accessing the dev_private data of the drm_device retrieved from the connector. Add a priv_data void pointer to the dw_hdmi_plat_data structure, and pass it to the .mode_valid() function. Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-12-laurent.pinchart+renesas@ideasonboard.com commit 12c683e12cd8e2dcf7b7143bebceae484d17727a Author: Laurent Pinchart Date: Tue May 26 04:14:48 2020 +0300 drm: bridge: Pass drm_display_info to drm_bridge_funcs .mode_valid() When validating a mode, bridges may need to do so in the context of a display, as specified by drm_display_info. An example is the meson dw-hdmi bridge that needs to consider the YUV 4:2:0 output format to perform clock calculations. Bridges that need the display info currently retrieve it from the drm_connector created by the bridge. This gets in the way of moving connector creation out of bridge drivers. To make this possible, pass the drm_display_info to drm_bridge_funcs .mode_valid(). Changes to the bridge drivers have been performed with the following coccinelle semantic patch and have been compile-tested. @ rule1 @ identifier funcs; identifier fn; @@ struct drm_bridge_funcs funcs = { ..., .mode_valid = fn }; @ depends on rule1 @ identifier rule1.fn; identifier bridge; identifier mode; @@ enum drm_mode_status fn( struct drm_bridge *bridge, + const struct drm_display_info *info, const struct drm_display_mode *mode ) { ... } Signed-off-by: Laurent Pinchart Reviewed-by: Neil Armstrong Reviewed-by: Boris Brezillon Reviewed-by: Guido Günther # for the nwl-dsi part: Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-11-laurent.pinchart+renesas@ideasonboard.com commit 192a3aa0e4e20e1087baa29183c5d64d48716fa9 Author: Laurent Pinchart Date: Tue May 26 04:14:47 2020 +0300 drm: edid: Constify connector argument to infoframe functions The drm_hdmi_avi_infoframe_from_display_mode(), drm_hdmi_vendor_infoframe_from_display_mode() and drm_hdmi_avi_infoframe_quant_range() functions take a drm_connector that they don't modify. Mark it as const. Signed-off-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-10-laurent.pinchart+renesas@ideasonboard.com commit 567e0d53097ce973a16e9fe115aac7568f892dfb Author: Laurent Pinchart Date: Tue May 26 04:14:45 2020 +0300 drm: bridge: simple-bridge: Make connector creation optional Make the connector creation optional to enable usage of the simple-bridge with the DRM bridge connector helper. Signed-off-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-8-laurent.pinchart+renesas@ideasonboard.com commit 00686ac55d0a2192bb5cdd443272b8a5d60e557f Author: Laurent Pinchart Date: Tue May 26 04:14:44 2020 +0300 drm: bridge: simple-bridge: Delegate operations to next bridge Instead of poking into the DT node of the next bridge for its DDC bus and implementing the .get_modes() and .detect() connector operations manually, retrieve the next bridge in the chain and delegate these operations to it. Signed-off-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-7-laurent.pinchart+renesas@ideasonboard.com commit 11d3cf804591246bb5e09cb03cb30121eafc2f4c Author: Laurent Pinchart Date: Tue May 26 04:14:43 2020 +0300 drm: bridge: Return NULL on error from drm_bridge_get_edid() The drm_bridge_get_edid() function is documented to return an error pointer on error. The underlying .get_edid() operation, however, returns NULL on error, and so do the drm_get_edid() and drm_do_get_edid() functions upon which .get_edid() is usually implemented. Make drm_bridge_get_edid() return NULL on error to be consistent. Signed-off-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-6-laurent.pinchart+renesas@ideasonboard.com commit 0bae6020b800195c944e2d44c8a99c7d78b1c86a Author: Laurent Pinchart Date: Tue May 26 04:14:42 2020 +0300 drm: bridge: adv7511: Make connector creation optional Now that the driver supports all the connector-related bridge operations, make the connector creation optional. This enables usage of the adv7511 with the DRM bridge connector helper. Signed-off-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-5-laurent.pinchart+renesas@ideasonboard.com commit 7c9361578b51ac091fe05117b63ad7423e25f175 Author: Laurent Pinchart Date: Tue May 26 04:14:41 2020 +0300 drm: bridge: adv7511: Implement bridge connector operations Implement the bridge connector-related .get_edid(), .detect() and .hpd_notify() operations, and report the related bridge capabilities. Output status detection is implemented using the same backend as for the DRM connector, but requires making mode retrieval at detection time optional as no pointer to the connector is available to the bridge .detect() operation. The reason for the need to retrieve modes at detection time is unclear to me, and this may benefit from further refactoring of hot plug handling code. Hot plug detection is notified through the bridge HPD notification framework when the bridge is used without creating a connector, and falls back to the existing implementation otherwise. CEC handling of disconnection is handled in the new .hpd_notify() operation in the new code path. Signed-off-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-4-laurent.pinchart+renesas@ideasonboard.com commit c6533015b9b1956b702dfe3bb1f462c0f36a2beb Author: Laurent Pinchart Date: Tue May 26 04:14:40 2020 +0300 drm: bridge: adv7511: Split connector creation to a separate function To prepare for making the connector creation optional, move the related code out of adv7511_bridge_attach() to a separate function. Signed-off-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-3-laurent.pinchart+renesas@ideasonboard.com commit fed9d35d71640cb8dfbfc15cd59fb21073af78ca Author: Laurent Pinchart Date: Tue May 26 04:14:39 2020 +0300 drm: bridge: adv7511: Split EDID read to a separate function To prepare for the implementation of the DRM bridge connector operations, move EDID read out of adv7511_get_modes() to a separate function. Signed-off-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200526011505.31884-2-laurent.pinchart+renesas@ideasonboard.com commit 67bb17f6109eb86fa752f70741e47404357bc7c6 Author: Thierry Reding Date: Thu Jun 11 20:12:59 2020 +0200 arm64: tegra: Rename sdhci nodes to mmc The new json-schema based validation tools require SD/MMC controller nodes to be named mmc. Rename all references to them. Signed-off-by: Thierry Reding commit 772a6a7b856f208120bcaef68c09884fab956170 Author: Thierry Reding Date: Thu Jun 11 20:06:44 2020 +0200 arm64: tegra: Add unit-address to memory node The memory node requires a unit-address. For some boards the bootloader, which is usually locked down, uses a hard-coded name for the memory node without a unit-address, so we can't fix it on those boards. Signed-off-by: Thierry Reding commit e8931a27ffe36fcc57c2d3e41b7445bc7360a09b Author: Thierry Reding Date: Fri Feb 7 18:26:05 2020 +0100 arm64: tegra: Fixup I/O and PLL supply names for HDMI/DP The I/O and PLL supplies used for HDMI/DP have alternative names. Use the names that are given in the hardware documentation for consistency. Signed-off-by: Thierry Reding commit 352092b0d367c6793910128c92914a6e28fb252a Author: Thierry Reding Date: Fri Feb 7 18:17:58 2020 +0100 arm64: tegra: Remove parent clock from display controllers The display controller's parent clock depends on the output that's consuming data from the display controller, so it needs to be specified as the parent of the corresponding output. The device tree bindings do specify this, so just correct the existing device trees that get this wrong. Signed-off-by: Thierry Reding commit 052d3f6523044cd7d6136e743d286a7ca1604c15 Author: Thierry Reding Date: Fri Feb 7 18:02:08 2020 +0100 arm64: tegra: Add interrupt-names for host1x Interrupt names are used to distinguish between the syncpoint and general host1x interrupts. Make sure they are available in the DT so that drivers can use them if necessary. Signed-off-by: Thierry Reding commit 01a9d523017932d526b0e58f877038782b98a03f Author: Thierry Reding Date: Fri Feb 7 17:59:20 2020 +0100 arm64: tegra: Add Tegra132 compatible string for host1x While the host1x controller found on Tegra132 is the same as on Tegra124 it is good practice to also list a SoC-specific compatible string so any SoC-specific quirks can be implemented in drivers if necessary. Signed-off-by: Thierry Reding commit 8613b4c8688412f349243d1fee3060d051adf8e2 Author: Thierry Reding Date: Thu Jan 16 16:58:22 2020 +0100 arm64: tegra: Add interrupt for Tegra194 memory controller This interrupt can be used for the operating system to be interrupted when certain events occur. Signed-off-by: Thierry Reding commit d5237c7c9bbee0e6d56376c9b1ba795e5b50fa65 Author: Thierry Reding Date: Fri Dec 13 11:21:33 2019 +0100 arm64: tegra: Describe interconnect paths on Tegra194 On Tegra194, all clients of the memory subsystem can generally address 40 bits of system memory. However, bit 39 has special meaning and will cause the memory controller to reorder sectors for block-linear buffer formats. This is primarily useful for graphics-related devices. Use of bit 39 must be controlled on a case-by-case basis. Buffers that are used with bit 39 set by one device may be used with bit 39 cleared by other devices. Care must be taken to allocate buffers at addresses that do not require bit 39 to be set. This is normally not an issue for system memory since there are no Tegra-based systems with enough RAM to exhaust the 39-bit physical address space. However, when a device is behind an IOMMU, such as the ARM SMMU on Tegra194, the IOMMUs input address space can cause IOVA allocations to happen in this region. This is for example the case when an operating system implements a top-down allocation policy for IO virtual addresses. To account for this, describe the path that memory accesses take through the system. Memory clients will send requests to the memory controller, which forwards bits [38:0] of the address either to the external memory controller or the SMMU, depending on the stream ID of the access. A good way to describe this is using the interconnects bindings, see: Documentation/devicetree/bindings/interconnect/interconnect.txt The standard "dma-mem" path is used to describe the path towards system memory via the memory controller. A dma-ranges property in the memory controller's device tree node limits the range of DMA addresses that the memory clients can use to bits [38:0], ensuring that bit 39 is not used. Signed-off-by: Thierry Reding --- Changes in v4: - add additional entries for interconnect-names to match interconnects - add EMC as destination for interconnect paths Changes in v3: - add missing interconnect properties for VIC Changes in v2: - use memory client IDs instead of stream IDs (Mikko Perttunen) Signed-off-by: Thierry Reding commit 954490b30cb4dd994b556d355d500ab5c6300946 Author: Thierry Reding Date: Fri Dec 13 14:07:33 2019 +0100 arm64: tegra: Describe interconnect paths on Tegra186 The interface used by clients of the memory controller can be configured in a number of different ways. Describe this path using the interconnect bindings to enable the configuration of these parameters. Signed-off-by: Thierry Reding commit b3fa0e03faa7c6798525ce70d64a19bc7c6aa6ce Author: Thierry Reding Date: Thu Jan 16 13:41:56 2020 +0100 arm64: tegra: Remove extra compatible for Tegra210 SDHCI The SDHCI on Tegra210 is in fact not compatible with the one found on Tegra124. Remove the extra compatible string to reflect that. Signed-off-by: Thierry Reding commit 2c3578b3f3094719dba305c947b89127312781af Author: Thierry Reding Date: Thu Jan 16 13:41:11 2020 +0100 arm64: tegra: Remove extra compatible for Tegra194 SDHCI The SDHCI on Tegra194 is in fact not compatible with the one found on Tegra186. Remove the extra compatible string to reflect that. Signed-off-by: Thierry Reding commit 59a9dd64b7bc296964474071d4591222153274a3 Author: Thierry Reding Date: Thu Jan 16 12:32:07 2020 +0100 arm64: tegra: Use standard notation for interrupts It is customary to use angle brackets around each tuple in the interrupts property. Signed-off-by: Thierry Reding commit aa78032cab9c66a13580e4a564202bec16e6688f Author: Thierry Reding Date: Sun Dec 22 14:59:02 2019 +0100 arm64: tegra: Fix #address-cells/#size-cells for SRAM on Tegra186 The standard mmio-sram bindings require the #address- and #size-cells properties to be 1. Signed-off-by: Thierry Reding commit a10b9a2075dc800563f16f5697aa0c7409c03dd3 Author: Thierry Reding Date: Fri Jun 12 09:46:29 2020 +0200 arm64: tegra: Add missing #phy-cells property on Jetson AGX Xavier PHYs need to have a #phy-cells property that defines how many cells are required in their specifier. The standard Ethernet PHY doesn't require a specifier, so set its #phy-cells to 0. Signed-off-by: Thierry Reding commit 20b091f1360f6546cc04d74184f8f4d2ae186380 Author: Thierry Reding Date: Sun Dec 22 14:54:21 2019 +0100 arm64: tegra: Add missing #phy-cells property on Jetson TX2 PHYs need to have a #phy-cells property that defines how many cells are required in their specifier. The standard Ethernet PHY doesn't require a specifier, so set its #phy-cells to 0. Signed-off-by: Thierry Reding commit 9d304b0721384219941d9f91815658be2e1750fa Author: Thierry Reding Date: Fri Jun 12 12:02:55 2020 +0200 ARM: tegra: The Tegra114 DC is not backwards-compatible The display controller on Tegra114 is in fact not backwards-compatible with the instantiation found on earlier SoCs. Drop the misleading compatible string. Signed-off-by: Thierry Reding commit ff32afae58d2157db07076348ac671c35d3d8f0b Author: Thierry Reding Date: Fri Jun 12 12:01:52 2020 +0200 ARM: tegra: gr3d is not backwards-compatible The instantiation of gr3d in Tegra114 is not backwards-compatible with the version found on earlier chips. Remove the misleading compatible string. Signed-off-by: Thierry Reding commit 46d36c40f525786b5b2793fbd71473992bf21f05 Author: Thierry Reding Date: Fri Jun 12 12:01:21 2020 +0200 ARM: tegra: gr2d is not backwards-compatible The instantiation of gr2d in Tegra114 is not backwards-compatible with the version found on earlier chips. While the hardware IP is identical, the compatible string also describes the integration of the IP, which in the case of Tegra114 is slightly different in that it's part of the HEG power partition, whereas it wasn't previously. Drop the misleading compatible string so that drivers that support the older integrations cannot match on it. Since they wouldn't be able to control the power partition, such driver wouldn't be able to access any of the registers of the IP. Signed-off-by: Thierry Reding commit 6cc05ba2e27a211ef8feef24cb11e554f6559452 Author: Thierry Reding Date: Fri Jun 12 12:00:03 2020 +0200 ARM: tegra: Add missing host1x properties The host1x device tree bindings require the clock- and interrupt-names properties to be present, so add them where missing. Signed-off-by: Thierry Reding commit f0fd20a54f882bb8f1cfc345d5f8e034d528d984 Author: Thierry Reding Date: Fri Jun 12 11:59:09 2020 +0200 ARM: tegra: Do not mark host1x as simple bus The host1x is not a simple bus, so drop the corresponding compatible string. Signed-off-by: Thierry Reding commit 6768e43d614d52e5e64c53c89f5d8d8d5b3f4469 Author: Thierry Reding Date: Thu Jun 11 19:05:12 2020 +0200 ARM: tegra: tn7: Use the correct DSI/CSI supply The correct DSI/CSI supply property is called vdd-dsi-csi-supply, so use that instead of the wrong vdd-supply property. Signed-off-by: Thierry Reding commit da2ebcfd9a0157baa9347869ff378618a5b4bb45 Author: Thierry Reding Date: Thu Jun 11 19:02:50 2020 +0200 ARM: tegra: roth: Use the correct DSI/CSI supply The correct DSI/CSI supply property is called vdd-dsi-csi-supply, so use that instead of the wrong vdd-supply property. Signed-off-by: Thierry Reding commit 19ed4866f8aae9bfe478d59853cc66ad379bd162 Author: Thierry Reding Date: Thu Jun 11 18:59:27 2020 +0200 ARM: tegra: Remove battery-name property This property is not documented and will cause a validation failure. Signed-off-by: Thierry Reding commit 1cf17aa67a87940fda323b4ee252acfb996654bb Author: Thierry Reding Date: Thu Jun 11 19:01:32 2020 +0200 ARM: tegra: Remove simple regulators bus The standard way to do this is to list out the regulators at the top level. Adopt the standard way to fix validation. Signed-off-by: Thierry Reding commit 901c865340f86009c444c43dc8de1bf7b6d6ff89 Author: Thierry Reding Date: Thu Jun 11 19:00:14 2020 +0200 ARM: tegra: Remove simple clocks bus The standard way to do this is to list out the clocks at the top-level. Adopt the standard way to fix validation. Signed-off-by: Thierry Reding commit 578bd8e08fdf4a23c3de5cf78da7a4dd3b025d79 Author: Thierry Reding Date: Fri Jun 12 11:31:59 2020 +0200 ARM: tegra: Add missing clock-names for SDHCI on Tegra114 The Tegra SDHCI controller bindings state that the clock-names property is required, so add the missing properties on Tegra114. Signed-off-by: Thierry Reding commit bb2de0adca217a114ce023489426e24152e4bfcf Author: Smita Koralahalli Date: Tue Jun 23 08:00:59 2020 -0500 x86/mce, EDAC/mce_amd: Print PPIN in machine check records Print the Protected Processor Identification Number (PPIN) on processors which support it. [ bp: Massage. ] Signed-off-by: Smita Koralahalli Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200623130059.8870-1-Smita.KoralahalliChannabasappa@amd.com commit 211cd9459fdabe9f556e539966f50825853bf262 Author: Maor Gottlieb Date: Tue Jun 23 14:30:39 2020 +0300 RDMA: Add dedicated CM_ID resource tracker function In order to avoid double multiplexing of the resource when it is a cm id, add a dedicated callback function. In addition remove fill_res_entry which is not used anymore. Link: https://lore.kernel.org/r/20200623113043.1228482-8-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 5cc34116ccec60032dbaa92768f41e95ce2d8ec7 Author: Maor Gottlieb Date: Tue Jun 23 14:30:38 2020 +0300 RDMA: Add dedicated QP resource tracker function In order to avoid double multiplexing of the resource when it is a QP, add a dedicated callback function. Link: https://lore.kernel.org/r/20200623113043.1228482-7-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 9e2a187a93c395f573ed38b888ba4bd731e70622 Author: Maor Gottlieb Date: Tue Jun 23 14:30:37 2020 +0300 RDMA: Add a dedicated CQ resource tracker function In order to avoid double multiplexing of the resource when it is a CQ, add a dedicated callback function. Link: https://lore.kernel.org/r/20200623113043.1228482-6-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f4434529003522d72b314d26d65b18c06ea9307c Author: Maor Gottlieb Date: Tue Jun 23 14:30:36 2020 +0300 RDMA: Add dedicated MR resource tracker function In order to avoid double multiplexing of the resource when it is a MR, add a dedicated callback function. Link: https://lore.kernel.org/r/20200623113043.1228482-5-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 24fd6d6f85d24b020aaaf01109d368dd15570caf Author: Maor Gottlieb Date: Tue Jun 23 14:30:35 2020 +0300 RDMA/core: Don't call fill_res_entry for PD None of the drivers implement it, remove it. Link: https://lore.kernel.org/r/20200623113043.1228482-4-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 09c16edc5a3dc2bcfa8a93ddbeec59793e3b414d Author: Vinod Koul Date: Tue Jun 23 19:59:15 2020 +0530 MAINTAINERS: switch dmaengine tree to kernel.org I have switched DMAengine tree to kernel.org now, so update in MAINTAINERS file Signed-off-by: Vinod Koul commit 608ca553c9a2008908120e0e45b1cfc4aefcfd49 Author: Maor Gottlieb Date: Wed Apr 8 12:36:20 2020 +0300 net/mlx5: Add support in query QP, CQ and MKEY segments Introduce new resource dump segments - PRM_QUERY_QP, PRM_QUERY_CQ and PRM_QUERY_MKEY. These segments contains the resource dump in PRM query format. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky commit d63cc24933c774ea464090af1998a7b63f11c166 Author: Maor Gottlieb Date: Wed Apr 8 12:42:09 2020 +0300 net/mlx5: Export resource dump interface Export some of the resource dump API. mlx5_ib driver will use it in downstream patches. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky commit c9bb9d6685c0e8318c3a70fcdea319c84c94e5af Author: Nirmoy Das Date: Mon Jun 22 15:45:33 2020 +0200 drm/mm/selftests: fix wrong return type casting Function prepare_igt_frag() and get_insert_time() were casting signed value to unsigned value before returning error. So error check in igt_frag() would not work with unsigned return value from get_insert_time() compared against negative value. Addresses-Coverity: ("Unsigned compared against 0, no effect") Signed-off-by: Nirmoy Das Reported-by: Colin Ian King Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/370636/ commit 5fad79fd66ff90b8c0a95319dad0b099008f8347 Author: Christian König Date: Mon Jun 15 16:16:42 2020 +0200 drm/mm: cleanup and improve next_hole_*_addr() Skipping just one branch of the tree is not the most effective approach. Instead use a macro to define the traversal functions and sort out both branch sides. This improves the performance of the unit tests by a factor of more than 4. Signed-off-by: Christian König Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/370298/ commit 271e7decd707accfe6d4965b2c5e60d2d77c8e35 Author: Christian König Date: Tue Jun 9 14:47:33 2020 +0200 drm/mm: optimize find_hole() as well Abort early if there isn't enough space to allocate from a subtree. Signed-off-by: Christian König Acked-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/370297/ commit 41c0e78aae53099852dab4d1050c06a43c827eb3 Author: Christian König Date: Mon Jun 8 17:27:01 2020 +0200 drm/mm: remove unused rb_hole_size() Just some code cleanup. Signed-off-by: Christian König Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/370296/ commit e30cc79cc80fd919b697a15c5000d9f57487de8e Author: Tuomas Tynkkynen Date: Sun Jun 21 13:30:40 2020 +0200 media: media-request: Fix crash if memory allocation fails Syzbot reports a NULL-ptr deref in the kref_put() call: BUG: KASAN: null-ptr-deref in media_request_put drivers/media/mc/mc-request.c:81 [inline] kref_put include/linux/kref.h:64 [inline] media_request_put drivers/media/mc/mc-request.c:81 [inline] media_request_close+0x4d/0x170 drivers/media/mc/mc-request.c:89 __fput+0x2ed/0x750 fs/file_table.c:281 task_work_run+0x147/0x1d0 kernel/task_work.c:123 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop arch/x86/entry/common.c:165 [inline] prepare_exit_to_usermode+0x48e/0x600 arch/x86/entry/common.c:196 What led to this crash was an injected memory allocation failure in media_request_alloc(): FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 should_failslab+0x5/0x20 kmem_cache_alloc_trace+0x57/0x300 ? anon_inode_getfile+0xe5/0x170 media_request_alloc+0x339/0x440 media_device_request_alloc+0x94/0xc0 media_device_ioctl+0x1fb/0x330 ? do_vfs_ioctl+0x6ea/0x1a00 ? media_ioctl+0x101/0x120 ? __media_device_usb_init+0x430/0x430 ? media_poll+0x110/0x110 __se_sys_ioctl+0xf9/0x160 do_syscall_64+0xf3/0x1b0 When that allocation fails, filp->private_data is left uninitialized which media_request_close() does not expect and crashes. To avoid this, reorder media_request_alloc() such that allocating the struct file happens as the last step thus media_request_close() will no longer get called for a partially created media request. Reported-by: syzbot+6bed2d543cf7e48b822b@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Tuomas Tynkkynen Fixes: 10905d70d788 ("media: media-request: implement media requests") Reviewed-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7b981288285f0e8b816ea7ba8f34d0973ee39e0d Author: Qingwu Zhang Date: Fri Jun 12 11:42:02 2020 +0200 media: ov2740: add NVMEM interface to read customized OTP data ov2740 includes 512bytes of one-time programmable memory and 256 bytes are reserved for customers which can be used to store customized information. This patch provide an NVMEM interface to support read out the customized data in OTP. Signed-off-by: Bingbu Cao Signed-off-by: Qingwu Zhang Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a270675875829b6d46eb9e38960fd6019555ebb8 Author: Andrey Konovalov Date: Fri Jun 12 15:53:55 2020 +0200 media: i2c: imx290: set bus_type before calling v4l2_fwnode_endpoint_alloc_parse() The bus_type field of v4l2_fwnode_endpoint structure passed as the argument to v4l2_fwnode_endpoint_alloc_parse() function must be initiaized. Set it to V4L2_MBUS_CSI2_DPHY, and check for -ENXIO which is returned when the requested media bus type doesn't match the fwnode. Also remove v4l2_fwnode_endpoint field from struct imx290 as it is only needed in the probe function: use the local variable for this purpose. Signed-off-by: Andrey Konovalov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 6544af9b04b4484867c234ba0be1b5008e4a14ee Author: Manivannan Sadhasivam Date: Fri Jun 12 15:53:54 2020 +0200 media: i2c: imx290: Move the settle time delay out of loop The 10ms settle time is needed only at the end of all consecutive register writes. So move the delay to outside of the for loop of imx290_set_register_array(). Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andrey Konovalov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3b867fb641d884b714fba390ae866714ba475f29 Author: Manivannan Sadhasivam Date: Fri Jun 12 15:53:53 2020 +0200 media: i2c: imx290: Add support to enumerate all frame sizes Add support to enumerate all frame sizes supported by IMX290. This is required for using with userspace tools such as libcamera. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andrey Konovalov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c566ac01ceaa02450acc155201772c0623530e76 Author: Manivannan Sadhasivam Date: Fri Jun 12 15:53:52 2020 +0200 media: i2c: imx290: Add RAW12 mode support IMX290 is capable of outputting frames in both Raw Bayer (packed) 10 and 12 bit formats. Since the driver already supports RAW10 mode, let's add the missing RAW12 mode as well. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andrey Konovalov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit a58df1f9e4885eaf3d0663574a217e513821a9f0 Author: Manivannan Sadhasivam Date: Fri Jun 12 15:53:51 2020 +0200 media: i2c: imx290: Add support for test pattern generation Add support for generating following test patterns by IMX290: * Sequence Pattern 1 * Horizontal Color-bar Chart * Vertical Color-bar Chart * Sequence Pattern 2 * Gradation Pattern 1 * Gradation Pattern 2 * 000/555h Toggle Pattern Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andrey Konovalov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 98e0500eadb772e1be32d8e369fcc3b7bcac93ed Author: Manivannan Sadhasivam Date: Fri Jun 12 15:53:50 2020 +0200 media: i2c: imx290: Add configurable link frequency and pixel rate IMX290 operates with multiple link frequency and pixel rate combinations. The initial driver used a single setting for both but since we now have the lane count support in place, let's add configurable link frequency and pixel rate. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andrey Konovalov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 97589ad61c730e0f486635c6c19fa25ab8e8f29d Author: Manivannan Sadhasivam Date: Fri Jun 12 15:53:49 2020 +0200 media: i2c: imx290: Add support for 2 data lanes The IMX290 sensor can output frames with 2/4 CSI2 data lanes. This commit adds support for 2 lane mode in addition to the 4 lane and also configuring the data lane settings in the driver based on system configuration. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Andrey Konovalov Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3909a92d7df622b41b9ceeeea694e641cad7667b Author: Andrey Konovalov Date: Fri Jun 12 15:53:48 2020 +0200 media: i2c: imx290: fix reset GPIO pin handling According to https://www.kernel.org/doc/Documentation/gpio/consumer.txt, - all of the gpiod_set_value_xxx() functions operate with the *logical* value. So in imx290_power_on() the reset signal should be cleared (de-asserted) with gpiod_set_value_cansleep(imx290->rst_gpio, 0), and in imx290_power_off() the value of 1 must be used to apply/assert the reset to the sensor. In the device tree the reset pin is described as GPIO_ACTIVE_LOW, and gpiod_set_value_xxx() functions take this into account, - when devm_gpiod_get_optional() is called with GPIOD_ASIS, the GPIO is not initialized, and the direction must be set later; using a GPIO without setting its direction first is illegal and will result in undefined behavior. Fix this by using GPIOD_OUT_HIGH instead of GPIOD_ASIS (this asserts the reset signal to the sensor initially). Signed-off-by: Andrey Konovalov Reviewed-by: Manivannan Sadhasivam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8d2d1bedb1b9af3e0c039a4444858da7b6da71f8 Author: Andrey Konovalov Date: Fri Jun 12 15:53:47 2020 +0200 media: i2c: imx290: fix the order of the args in SET_RUNTIME_PM_OPS() The macro is defined as SET_RUNTIME_PM_OPS(suspend_fn, resume_fn, idle_fn), so imx290_power_off must be the 1st arg, and imx290_power_on the 2nd. Signed-off-by: Andrey Konovalov Reviewed-by: Manivannan Sadhasivam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d46cfdc86c30d5ec768924f0b1e2683c8d20b671 Author: Andrey Konovalov Date: Fri Jun 12 15:53:46 2020 +0200 media: i2c: imx290: set the format before VIDIOC_SUBDEV_G_FMT is called With the current driver 'media-ctl -p' issued right after the imx290 driver is loaded prints: pad0: Source [fmt:unknown/0x0] The format value of zero is due to the current_format field of the imx290 struct not being initialized yet. As imx290_entity_init_cfg() calls imx290_set_fmt(), the current_mode field is also initialized, so the line which set current_mode to a default value in driver's probe() function is no longer needed. Signed-off-by: Andrey Konovalov Reviewed-by: Manivannan Sadhasivam Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dc7690a73017e1236202022e26a6aa133f239c8c Author: Chuhong Yuan Date: Wed Jun 3 18:41:22 2020 +0200 media: omap3isp: Add missed v4l2_ctrl_handler_free() for preview_init_entities() preview_init_entities() does not call v4l2_ctrl_handler_free() when it fails. Add the missed function to fix it. Fixes: de1135d44f4f ("[media] omap3isp: CCDC, preview engine and resizer") Signed-off-by: Chuhong Yuan Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4603a5b4a87ccd6fb90cbfa10195291cfcf6ba34 Author: Chuhong Yuan Date: Wed Jun 3 18:40:48 2020 +0200 media: marvell-ccic: Add missed v4l2_async_notifier_cleanup() mccic_register() forgets to cleanup the notifier in its error handler. mccic_shutdown() also misses calling v4l2_async_notifier_cleanup(). Add the missed calls to fix them. Fixes: 3eefe36cc00c ("media: marvell-ccic: use async notifier to get the sensor") Signed-off-by: Chuhong Yuan Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 1e8d3bbcdda30973a10d34032401647fc4111747 Author: Bingbu Cao Date: Thu Jun 4 03:25:19 2020 +0200 media: ov2740: make ov2740 driver only work with ACPI As the ACPI id of ov2740 camera sensor was registered as "INT3474", current ov2740 driver is supposed to be working with ACPI only. Signed-off-by: Bingbu Cao Suggested-by: Andy Shevchenko Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c1d7a2c8259c0a65189542d3e5d7a80f9ea012b6 Author: Sakari Ailus Date: Wed Oct 16 13:19:30 2019 +0200 media: smiapp: Use pm_runtime_get_if_active Use the convenience function pm_runtime_get_if_active() instead of a number of calls to runtime PM to figure out if the device was already powered up. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 52db11f38333f90dcdc9a12a09f9ec990516025d Author: Dinghao Liu Date: Mon May 25 10:19:58 2020 +0200 media: smiapp: Fix runtime PM imbalance on error When v4l2_async_register_subdev_sensor_common() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e233f81cfc906e415e5784526d9a6ec7d7cf3c5c Author: Hans Verkuil Date: Sat Jun 20 12:16:41 2020 +0200 media: media/cec.h: document cec_adapter fields Document this core CEC structure. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8dd65ed67e1679830dc8f94169d25ec9452da99d Author: Hans Verkuil Date: Sat Jun 20 12:16:40 2020 +0200 media: cec: remove unused waitq and phys_addrs fields The cec_adapter struct contained a waitq field that isn't used anywhere, so drop this. It also contained a phys_addrs array to store any reported physical addresses. However, this was never actually used, so this field is removed as well. The original idea was to let the core keep track of this information, but nothing was ever done with this. Should this be needed in the future then it is easy enough to resurrect this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ef9894d9667786489f710199628e0bfffccf452a Author: Ian Rogers Date: Thu Jun 18 21:33:52 2020 -0700 perf parse-events: Declare bison header file output Declare bison header file output so that C files can depend upon them. As there are multiple output targets $@ is replaced by the target name. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200619043356.90024-7-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3744ca1e670e6155ead37d9123ff005b07108259 Author: Arnaldo Carvalho de Melo Date: Tue Jun 23 10:09:03 2020 -0300 perf expr: Add missing headers noticed when building with NO_LIBBPF=1 These will break the build as soon as we stop disabling all warnings when building flex and bison generated files, so add them before we do that to keep the tree bisectable. Noticed when building on centos:7 with NO_LIBBPF=1: util/expr.c: In function 'key_equal': util/expr.c:29:2: error: implicit declaration of function 'strcmp' [-Werror=implicit-function-declaration] return !strcmp((const char *)key1, (const char *)key2); ^ util/expr.c: In function 'expr__add_id': util/expr.c:40:3: error: implicit declaration of function 'malloc' [-Werror=implicit-function-declaration] val_ptr = malloc(sizeof(double)); ^ util/expr.c:40:13: error: incompatible implicit declaration of built-in function 'malloc' [-Werror] val_ptr = malloc(sizeof(double)); ^ util/expr.c:42:12: error: 'ENOMEM' undeclared (first use in this function) return -ENOMEM; ^ Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Signed-off-by: Arnaldo Carvalho de Melo commit b16c928c13d103c7c338ae9ff076345c82d819b3 Author: Hans Verkuil Date: Sat Jun 20 11:33:01 2020 +0200 media: cec-ioc-adap-g-caps.rst: document available_log_addrs The CEC_ADAP_G_CAPS documentation of the cec_caps struct was missing the available_log_addrs field. Add this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fc0456458df8b3421dba2a5508cd817fbc20ea71 Author: Chuhong Yuan Date: Fri Jun 5 18:17:28 2020 +0200 media: budget-core: Improve exception handling in budget_register() budget_register() has no error handling after its failure. Add the missed undo functions for error handling to fix it. Signed-off-by: Chuhong Yuan Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6499a0db9b0f1e903d52f8244eacc1d4be00eea2 Author: Jia-Ju Bai Date: Sat May 30 16:42:08 2020 +0200 media: pci: ttpci: av7110: fix possible buffer overflow caused by bad DMA value in debiirq() The value av7110->debi_virt is stored in DMA memory, and it is assigned to data, and thus data[0] can be modified at any time by malicious hardware. In this case, "if (data[0] < 2)" can be passed, but then data[0] can be changed into a large number, which may cause buffer overflow when the code "av7110->ci_slot[data[0]]" is used. To fix this possible bug, data[0] is assigned to a local variable, which replaces the use of data[0]. Signed-off-by: Jia-Ju Bai Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit bc76369b89bbbbd01b2a3852287ea8092b59d012 Author: Jan Pieter van Woerkom Date: Wed Jun 3 05:58:40 2020 +0200 media: dvbsky: MyGica T230* receivers also do DVB-C and DVB-T MyGica T230* receivers also do DVB-C and DVB-T: change their names. Signed-off-by: Jan Pieter van Woerkom Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 1a55caf010c46d4f2073f9e92e97ef65358c16bf Author: Arnd Bergmann Date: Thu May 7 23:33:14 2020 +0200 media: cxusb-analog: fix V4L2 dependency CONFIG_DVB_USB_CXUSB_ANALOG is a 'bool' symbol with a dependency on the tristate CONFIG_VIDEO_V4L2, which means it can be enabled as =y even when its dependency is =m. This leads to a link failure: drivers/media/usb/dvb-usb/cxusb-analog.o: In function `cxusb_medion_analog_init': cxusb-analog.c:(.text+0x92): undefined reference to `v4l2_subdev_call_wrappers' drivers/media/usb/dvb-usb/cxusb-analog.o: In function `cxusb_medion_register_analog': cxusb-analog.c:(.text+0x466): undefined reference to `v4l2_device_register' cxusb-analog.c:(.text+0x4c3): undefined reference to `v4l2_i2c_new_subdev' cxusb-analog.c:(.text+0x4fb): undefined reference to `v4l2_subdev_call_wrappers' ... Change the dependency only disallow the analog portion of the driver in that configuration. Fixes: e478d4054054 ("media: cxusb: add analog mode support for Medion MD95700") Signed-off-by: Arnd Bergmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit e508a9f66332ffae585f68cf005a8310a9a9bc14 Author: Sean Young Date: Wed May 27 11:27:48 2020 +0200 media: MAINTAINERS: rc-core and lirc maintainership This has been maintained for some time, update MAINTAINERS to reflect. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6eeb775a8606a828d235221d84a15eefb05c3978 Author: Sean Young Date: Wed May 27 11:22:16 2020 +0200 media: USB: cdc-acm: blacklist IR Droid / IR Toy device The IR Droid / IR Toy device used custom protocol over serial line, so it is presenting itself as CDC ACM device. Now that we have proper in-kernel driver for it we need to black-list the device in cdc-acm driver. http://dangerousprototypes.com/docs/USB_Infrared_Toy https://www.irdroid.com/irdroid-usb-ir-transceiver/ Acked-by: Greg Kroah-Hartman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 261463dbc34ff0acafe4d84df04535b48a15afea Author: Sean Young Date: Sun May 3 11:27:55 2020 +0200 media: rc: add support for Infrared Toy and IR Droid devices http://dangerousprototypes.com/docs/USB_Infrared_Toy https://www.irdroid.com/irdroid-usb-ir-transceiver/ Reviewed-by: Greg Kroah-Hartman Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 55e34d5bf9fd5ca8f1febb234276f8b6e9e46f06 Author: Mauro Carvalho Chehab Date: Tue Jun 23 14:03:58 2020 +0200 media: dev-encoder.rst: add GFDL-1-1+ to SPDX header The media documents under the uAPI should be GFDL compatible. So, make this one dual-licensed GPL-2.0 or GFDL-1.1+ with no-invariant sections. Signed-off-by: Tomasz Figa Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7a908832ace7543ca996303928bfed7190dd2cdd Author: Robin Gong Date: Wed Jun 17 06:42:09 2020 +0800 spi: imx: add fallback feature Add fallback pio feature in case dma transfer failed before start. Besides, another whole pio transfer including setup_transfer will be issued by spi core, no need to restore jobs like commit bcd8e7761ec9 ("spi: imx: fallback to PIO if dma setup failure"). Signed-off-by: Robin Gong Link: https://lore.kernel.org/r/1592347329-28363-3-git-send-email-yibin.gong@nxp.com Signed-off-by: Mark Brown commit 809b1b04df898b6d182069146231a3cbf5f2d9cc Author: Robin Gong Date: Wed Jun 17 06:42:08 2020 +0800 spi: introduce fallback to pio Add fallback to pio mode in case dma transfer failed with error status SPI_TRANS_FAIL_NO_START. If spi client driver want to enable this feature please set xfer->error in the proper place such as dmaengine_prep_slave_sg() failure detect(but no any data put into spi bus yet). Besides, add master->fallback checking in its can_dma() so that spi core could switch to pio next time. Please refer to spi-imx.c. Signed-off-by: Robin Gong Link: https://lore.kernel.org/r/1592347329-28363-2-git-send-email-yibin.gong@nxp.com Signed-off-by: Mark Brown commit 737cd06072a72e8984e41af8e5919338d0c5bf2b Author: Sean Wang Date: Fri Jun 19 19:52:02 2020 +0000 Bluetooth: btmtksdio: fix up firmware download sequence Data RAM on the device have to be powered on before starting to download the firmware. Fixes: 9aebfd4a2200 ("Bluetooth: mediatek: add support for MediaTek MT7663S and MT7668S SDIO devices") Co-developed-by: Mark Chen Signed-off-by: Mark Chen Signed-off-by: Sean Wang Signed-off-by: Marcel Holtmann commit f645125711c80f9651e4a57403d799070c6ad13b Author: Sean Wang Date: Fri Jun 19 19:52:01 2020 +0000 Bluetooth: btusb: fix up firmware download sequence Data RAM on the device have to be powered on before starting to download the firmware. Fixes: a1c49c434e15 ("Bluetooth: btusb: Add protocol support for MediaTek MT7668U USB devices") Co-developed-by: Mark Chen Signed-off-by: Mark Chen Signed-off-by: Sean Wang Signed-off-by: Marcel Holtmann commit f9c70bdc279b191da8d60777c627702c06e4a37d Author: Lihong Kou Date: Tue Jun 23 20:28:41 2020 +0800 Bluetooth: add a mutex lock to avoid UAF in do_enale_set In the case we set or free the global value listen_chan in different threads, we can encounter the UAF problems because the method is not protected by any lock, add one to avoid this bug. BUG: KASAN: use-after-free in l2cap_chan_close+0x48/0x990 net/bluetooth/l2cap_core.c:730 Read of size 8 at addr ffff888096950000 by task kworker/1:102/2868 CPU: 1 PID: 2868 Comm: kworker/1:102 Not tainted 5.5.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events do_enable_set Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fb/0x318 lib/dump_stack.c:118 print_address_description+0x74/0x5c0 mm/kasan/report.c:374 __kasan_report+0x149/0x1c0 mm/kasan/report.c:506 kasan_report+0x26/0x50 mm/kasan/common.c:641 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 l2cap_chan_close+0x48/0x990 net/bluetooth/l2cap_core.c:730 do_enable_set+0x660/0x900 net/bluetooth/6lowpan.c:1074 process_one_work+0x7f5/0x10f0 kernel/workqueue.c:2264 worker_thread+0xbbc/0x1630 kernel/workqueue.c:2410 kthread+0x332/0x350 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Allocated by task 2870: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc+0x118/0x1c0 mm/kasan/common.c:515 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 kmem_cache_alloc_trace+0x221/0x2f0 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] l2cap_chan_create+0x50/0x320 net/bluetooth/l2cap_core.c:446 chan_create net/bluetooth/6lowpan.c:640 [inline] bt_6lowpan_listen net/bluetooth/6lowpan.c:959 [inline] do_enable_set+0x6a4/0x900 net/bluetooth/6lowpan.c:1078 process_one_work+0x7f5/0x10f0 kernel/workqueue.c:2264 worker_thread+0xbbc/0x1630 kernel/workqueue.c:2410 kthread+0x332/0x350 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Freed by task 2870: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x12e/0x1e0 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10d/0x220 mm/slab.c:3757 l2cap_chan_destroy net/bluetooth/l2cap_core.c:484 [inline] kref_put include/linux/kref.h:65 [inline] l2cap_chan_put+0x170/0x190 net/bluetooth/l2cap_core.c:498 do_enable_set+0x66c/0x900 net/bluetooth/6lowpan.c:1075 process_one_work+0x7f5/0x10f0 kernel/workqueue.c:2264 worker_thread+0xbbc/0x1630 kernel/workqueue.c:2410 kthread+0x332/0x350 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff888096950000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 0 bytes inside of 2048-byte region [ffff888096950000, ffff888096950800) The buggy address belongs to the page: page:ffffea00025a5400 refcount:1 mapcount:0 mapping:ffff8880aa400e00 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00027d1548 ffffea0002397808 ffff8880aa400e00 raw: 0000000000000000 ffff888096950000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809694ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809694ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888096950000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888096950080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888096950100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Reported-by: syzbot+96414aa0033c363d8458@syzkaller.appspotmail.com Signed-off-by: Lihong Kou Signed-off-by: Marcel Holtmann commit a7503a9d8fcfac3fefdb63fc61efedef41635e94 Author: Robin Gong Date: Tue Jun 23 22:01:10 2020 +0800 regulator: pfuze100: add condition check for 'ramp_delay = 0' Checking for 'ramp_delay = 0' to avoid Coverity warning report. Signed-off-by: Robin Gong Link: https://lore.kernel.org/r/1592920870-12693-1-git-send-email-yibin.gong@nxp.com Signed-off-by: Mark Brown commit d09382777e9ad3d6a1b369ff29785250f620b544 Author: Hans Verkuil Date: Tue May 26 11:00:51 2020 +0200 media: dev-encoder.rst: add reference to V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL Setting the stateful encoder capture frame interval is only supported if this flag is set. Document this. Signed-off-by: Hans Verkuil Reviewed-by: Michael Tretter Acked-by: Tomasz Figa Signed-off-by: Mauro Carvalho Chehab commit 286cf7d3a99e1ca8c1d8e674b9a98f2dbe8520dc Author: Hans Verkuil Date: Tue May 26 10:59:53 2020 +0200 media: videodev2.h: add V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL flag Add the V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL flag to signal that the coded frame interval can be set separately from the raw frame interval for stateful encoders. Signed-off-by: Hans Verkuil Reviewed-by: Michael Tretter Acked-by: Tomasz Figa Signed-off-by: Mauro Carvalho Chehab commit eef7a5e7307f8f0da5254305703ac1da14250e77 Author: Hans Verkuil Date: Tue May 26 10:40:01 2020 +0200 media: dev-decoder.rst: small fixes Add missing periods at the end of two sentences. Although mandatory -> Although not mandatory Signed-off-by: Hans Verkuil Reviewed-by: Michael Tretter Acked-by: Tomasz Figa Signed-off-by: Mauro Carvalho Chehab commit aa2e479fd021b975b95409f8a3181b953796aa01 Author: Hans Verkuil Date: Wed May 20 11:42:23 2020 +0200 media: vidioc-g-parm.rst: update the VIDIOC_G/S_PARM documentation This documentation is very outdated. In particular, it is not obvious at all that this is used to change the framerate of sensors. Fix it, and include references to the stateful encoder API where this works slightly different. Signed-off-by: Hans Verkuil Acked-by: Tomasz Figa Reviewed-by: Michael Tretter Signed-off-by: Mauro Carvalho Chehab commit 9ec656cf571edb85de72c21b3ca852289c4788ae Author: Tomasz Figa Date: Tue Nov 19 12:34:57 2019 +0100 media: docs-rst: Document memory-to-memory video encoder interface Due to complexity of the video encoding process, the V4L2 drivers of stateful encoder hardware require specific sequences of V4L2 API calls to be followed. These include capability enumeration, initialization, encoding, encode parameters change, drain and reset. Specifics of the above have been discussed during Media Workshops at LinuxCon Europe 2012 in Barcelona and then later Embedded Linux Conference Europe 2014 in Düsseldorf. The de facto Codec API that originated at those events was later implemented by the drivers we already have merged in mainline, such as s5p-mfc or coda. The only thing missing was the real specification included as a part of Linux Media documentation. Fix it now and document the encoder part of the Codec API. Signed-off-by: Tomasz Figa Signed-off-by: Hans Verkuil Reviewed-by: Michael Tretter Signed-off-by: Mauro Carvalho Chehab commit c3d89fd7a86cd51334bc04547f9ead6058c3932e Merge: ee8a41cd30a99 4fcc922cb3117 Author: Mark Brown Date: Tue Jun 23 12:54:12 2020 +0100 Merge series "ASoC: add dailink .exit() callback" from Pierre-Louis Bossart : While looking at reboot issues and module load/unload tests, I found out some resources allocated in the dailink .init() callback are not properly released - there is no existing mechanism in the soc-core to do so. The addition of a dailink .exit() callback seems to be the simplest solution overall. It can be argued that the existing machine platform device .remove() callback can also perform the necessary cleanups, however as shown in the last two examples this might require a loop to identify components whereas the dailink .exit() already has all the necessary information to revert the actions done in the .init() step. Changes since RFC: Better commit messages and explanations rt5682 cases with snd_soc_component_set_jack() called in the .exit() Fred Oh (2): ASoC: intel: sof_rt5682: move disabling jack to dai link's exit() ASoC: intel: cml_rt1011_rt5682: disable jack in dailink .exit() Pierre-Louis Bossart (3): ASoC: soc-link: introduce exit() callback ASoC: Intel: bdw-rt5677: fix module load/unload issues ASoC: Intel: kbl-rt5660: use .exit() dailink callback to release gpiod include/sound/soc-link.h | 1 + include/sound/soc.h | 3 +++ sound/soc/intel/boards/bdw-rt5677.c | 18 ++++++++++++++-- sound/soc/intel/boards/cml_rt1011_rt5682.c | 8 ++++++++ sound/soc/intel/boards/kbl_rt5660.c | 17 +++++++++++++-- sound/soc/intel/boards/sof_rt5682.c | 24 ++++++++-------------- sound/soc/soc-core.c | 3 +++ sound/soc/soc-link.c | 6 ++++++ 8 files changed, 60 insertions(+), 20 deletions(-) base-commit: 39853b1438bf9b07349c8c44b48f6c2eda6f8840 -- 2.20.1 commit ee8a41cd30a99b39bd5d46280cc778e275cd2390 Author: Fred Oh Date: Mon Jun 22 10:13:48 2020 -0500 ASoC: rt1011: fix KASAN out-of-bounds bug in find_next_bit() KASAN throws the following warning in rt1011.c: [ 170.777603] BUG: KASAN: stack-out-of-bounds in _find_next_bit.constprop.0+0x3e/0xf0 find_next_bit() relies on unsigned long pointer arguments, but this driver uses a type cast that generates the KASAN warning. Replace find_next_bit() and find_last_bit() with __ffs() and __fls() to pass the value and avoid casting pointers to make the warning go away. Signed-off-by: Fred Oh Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200622151348.28063-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b1647f9f4f27824a689f774014bc33728b4fe7ec Author: Tzung-Bi Shih Date: Tue Jun 23 13:51:30 2020 +0800 ASoC: mediatek: mt8183-da7219: set playback and capture constraints Sets playback and capture constraints to S16_LE, stereo, 48kHz. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200623055130.159718-1-tzungbi@google.com Signed-off-by: Mark Brown commit 5748f4eb01a4df7a42024fe8bc7855f05febb7c5 Author: Shengjiu Wang Date: Mon Jun 22 17:03:31 2020 +0800 ASoC: fsl_easrc: Fix uninitialized scalar variable in fsl_easrc_set_ctx_format The "ret" in fsl_easrc_set_ctx_format is not initialized, then the unknown value maybe returned by this function. Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/1592816611-16297-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit f2fe45d503b2d19a83b2b6fd7d69ab85da83232f Author: Anson Huang Date: Thu Jun 11 09:36:53 2020 +0800 arm64: dts: imx8mp: Add fallback compatible to ocotp node Add "fsl,imx8mm-ocotp" as fallback compatible of i.MX8MP ocotp to support SoC serial_number read. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo commit 62a4cd0130f3936e431d5c8495af07edc9e1363d Author: Sergey Senozhatsky Date: Thu May 14 18:01:53 2020 +0200 media: vivid: add cache_hints module param Add a cache_hints module param to control per-queue user space cache hints support. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2ff99ca4bc30895f7e061f1fc0e510f19bd032bb Author: Sergey Senozhatsky Date: Thu May 14 18:01:52 2020 +0200 media: videobuf2: remove redundant if-statement That if-statement seems to be unneeded. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a9a2c823601789e9f59ec75f13d0ef03138c04a4 Author: Sergey Senozhatsky Date: Thu May 14 18:01:51 2020 +0200 media: videobuf2: don't test db_attach in dma-contig prepare and finish We moved cache management decision making to the upper layer and rely on buffer's need_cache_sync flags and videobuf2 core. If the upper layer (core) has decided to invoke ->prepare() or ->finish() then we must sync. For DMABUF ->need_cache_sync_on_prepare and ->need_cache_sync_on_flush are always false so videobuf core does not call ->prepare() and ->finish() on such buffers. Additionally, scratch the DMABUF comment. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d4db5eb57cab049d378fbfb7ee842857009a8679 Author: Sergey Senozhatsky Date: Thu May 14 18:01:50 2020 +0200 media: videobuf2: add begin/end cpu_access callbacks to dma-sg Provide begin_cpu_access() and end_cpu_access() dma_buf_ops callbacks for cache synchronisation on exported buffers. V4L2_FLAG_MEMORY_NON_CONSISTENT has no effect on dma-sg buffers. dma-sg allocates memory using the page allocator directly, so there is no memory consistency guarantee. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d5adf1b0c2a31f8244ded805578188e067baaf5e Author: Sergey Senozhatsky Date: Thu May 14 18:01:49 2020 +0200 media: videobuf2: add begin/end cpu_access callbacks to dma-contig Provide begin_cpu_access() and end_cpu_access() callbacks for cache synchronisation on exported buffers. The patch also adds a new helper function - vb2_dc_buffer_consistent(), which returns true is if the buffer is consistent (DMA_ATTR_NON_CONSISTENT bit cleared), so then we don't need to sync anything. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 093067ed1285d027d1e4a0e3dba72160849fbb84 Author: Sergey Senozhatsky Date: Thu May 14 18:01:48 2020 +0200 media: videobuf2: check ->synced flag in prepare() and finish() This simplifies the code a tiny bit and let's us to avoid unneeded ->prepare()/->finish() calls. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dcf3bfe7c71d8da57cda2e3e06b8c28ed155741b Author: Sergey Senozhatsky Date: Thu May 14 18:01:47 2020 +0200 media: videobuf2: do not sync caches when we are allowed not to Skip ->prepare() or/and ->finish() cache synchronisation if user-space requested us to do so (or when queue dma direction permits us to skip cache syncs). Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 38a417e88aad1e5ad5ff2647d4cd26040b567fc3 Author: Sergey Senozhatsky Date: Thu May 14 18:01:46 2020 +0200 media: videobuf2: factor out planes prepare/finish functions Factor out the code, no functional changes. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1e0b2318fa75d186ee0d2be31843ce867385fcc4 Author: Sergey Senozhatsky Date: Thu May 14 18:01:45 2020 +0200 media: videobuf2: handle V4L2_FLAG_MEMORY_NON_CONSISTENT flag This patch lets user-space to request a non-consistent memory allocation during CREATE_BUFS and REQBUFS ioctl calls. = CREATE_BUFS struct v4l2_create_buffers has seven 4-byte reserved areas, so reserved[0] is renamed to ->flags. The struct, thus, now has six reserved 4-byte regions. = CREATE_BUFS32 struct v4l2_create_buffers32 has seven 4-byte reserved areas, so reserved[0] is renamed to ->flags. The struct, thus, now has six reserved 4-byte regions. = REQBUFS We use one bit of a ->reserved[1] member of struct v4l2_requestbuffers, which is now renamed to ->flags. Unlike v4l2_create_buffers, struct v4l2_requestbuffers does not have enough reserved room. Therefore for backward compatibility ->reserved and ->flags were put into anonymous union. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7b4b45555c79db03dad8192e6ef85cb30236827b Author: Sergey Senozhatsky Date: Thu May 14 18:01:44 2020 +0200 media: videobuf2: add queue memory consistency parameter Preparations for future V4L2_FLAG_MEMORY_NON_CONSISTENT support. Extend vb2_core_reqbufs() parameters list to accept requests' ->flags, which will be used for memory consistency configuration. An attempt to allocate a buffer with consistency requirements which don't match queue's consistency model will fail. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ac53503ee38a1ffbc47c7cca6cbfc48ba9c65c5e Author: Sergey Senozhatsky Date: Thu May 14 18:01:43 2020 +0200 media: videobuf2: add V4L2_FLAG_MEMORY_NON_CONSISTENT flag By setting or clearing V4L2_FLAG_MEMORY_NON_CONSISTENT flag user-space should be able to set or clear queue's NON_CONSISTENT ->dma_attrs. Queue's ->dma_attrs are passed to the underlying allocator in __vb2_buf_mem_alloc(), so thus user-space is able to request vb2 buffer's memory to be either consistent (coherent) or non-consistent. The patch set also adds a corresponding capability flag: fill_buf_caps() reports V4L2_BUF_CAP_SUPPORTS_MMAP_CACHE_HINTS when queue supports user-space cache management hints. Note, however, that MMAP_CACHE_HINTS capability only valid when the queue is used for memory MMAP-ed streaming I/O. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4fcc922cb31179f9bc1e99cd707f2b36138fbcf8 Author: Fred Oh Date: Mon Jun 22 10:42:41 2020 -0500 ASoC: intel: cml_rt1011_rt5682: disable jack in dailink .exit() When removing the machine driver, the rt5682 jack handler will oops if jack detection is not disabled. The jack can be disabled in the dai link's exit(). This is symmetrical change as jack is enabled in init(). Signed-off-by: Fred Oh Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200622154241.29053-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b0c96fc1ab2947e331f817cecc5ca733eaf5619b Author: Fred Oh Date: Mon Jun 22 10:42:40 2020 -0500 ASoC: intel: sof_rt5682: move disabling jack to dai link's exit() Move disabling jack from platform driver's remove() to dai link's exit(). This is symmetrical change as jack is enabled in init(). Signed-off-by: Fred Oh Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20200622154241.29053-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e56054e75325c347f09c1be2f6400ef67bb9662d Author: Pierre-Louis Bossart Date: Mon Jun 22 10:42:39 2020 -0500 ASoC: Intel: kbl-rt5660: use .exit() dailink callback to release gpiod The gpiod handling is inspired from the bdw-rt5677 code. Apply same fix to avoid reference count issue while removing modules for consistency. Suggested-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Curtis Malainey Link: https://lore.kernel.org/r/20200622154241.29053-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit bcb43fdae1c0d08b772b792cf46f323ad0d17968 Author: Pierre-Louis Bossart Date: Mon Jun 22 10:42:38 2020 -0500 ASoC: Intel: bdw-rt5677: fix module load/unload issues The mainline code currently prevents modules from being removed. The BE dailink .init() function calls devm_gpiod_get() using the codec component device as argument. When the machine driver is removed, the references to the gpiod are not released, and it's not possible to remove the codec driver module - which is the only entity which could free the gpiod. This conceptual deadlock can be avoided by invoking gpiod_get() in the .init() callback, and calling gpiod_put() in the exit() callback. Tested on SAMUS Chromebook with SOF driver. Suggested-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Curtis Malainey Link: https://lore.kernel.org/r/20200622154241.29053-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 21a00fb33790f828a34b9ce50ab9f9130bc1ffb4 Author: Pierre-Louis Bossart Date: Mon Jun 22 10:42:37 2020 -0500 ASoC: soc-link: introduce exit() callback Some machine drivers allocate or request resources with snd_soc_link_init() phase of the card probe. These resources need to be properly released when removing a card, and this patch suggests a dual exit() callback. The exit() is invoked in soc_remove_pcm_runtime(), which is not completely symmetric with the init() invoked in soc_init_pcm_runtime(). Alternate solutions were considered, e.g. adding a .remove() callback for the platform driver, but that's not symmetrical at all and would be difficult to handle if there are more than one dailink implementing an .init(). We looked also into using .remove_dai_link() callback, but that would also be imbalanced. Note that because of the error handling in snd_soc_bind_card(), which jumps to probe_end, there is no way to guarantee the exit() is invoked with resources allocated in the init(). Prior to releasing those resources, implementations of the exit() callback shall check the resources are valid. Suggested-by: Andy Shevchenko Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Curtis Malainey Link: https://lore.kernel.org/r/20200622154241.29053-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f5f5fa73fbfb9f346f1b5f37ebf343bae6ef6361 Author: Sergey Senozhatsky Date: Thu May 14 18:01:42 2020 +0200 media: videobuf2: handle V4L2 buffer cache flags Set video buffer cache management flags corresponding to V4L2 cache flags. Both ->prepare() and ->finish() cache management hints should be passed during this stage (buffer preparation), because there is no other way for user-space to tell V4L2 to avoid ->finish() cache flush. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6d2199868a9aede70a4ee5fa32e6ae2800b8b25a Author: Sergey Senozhatsky Date: Thu May 14 18:01:41 2020 +0200 media: videobuf2: add cache management members Extend vb2_buffer and vb2_queue structs with cache management members. V4L2 UAPI already contains two buffer flags which user-space, supposedly, can use to control buffer cache sync: - V4L2_BUF_FLAG_NO_CACHE_INVALIDATE - V4L2_BUF_FLAG_NO_CACHE_CLEAN None of these, however, do anything at the moment. This patch set is intended to change it. Since user-space cache management hints are supposed to be implemented on a per-buffer basis we need to extend vb2_buffer struct with two new members ->need_cache_sync_on_prepare and ->need_cache_sync_on_finish, which will store corresponding user-space hints. In order to preserve the existing behaviour, user-space cache managements flags will be handled only by those drivers that permit user-space cache hints. That's the purpose of vb2_queue ->allow_cache_hints member. Driver must set ->allow_cache_hints during queue initialisation to enable cache management hints mechanism. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 830e87ed15f85765bb7e57f310f95dfd87f11dfa Author: Sergey Senozhatsky Date: Thu May 14 18:01:40 2020 +0200 media: videobuf2: use explicit unsigned int in vb2_queue Switch from 'unsigned' to 'unsigned int' so that checkpatch doesn't complain. Signed-off-by: Sergey Senozhatsky Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f47a468c350a12187eed922b3310e05a307943da Author: Niklas Söderlund Date: Fri May 22 02:50:07 2020 +0200 media: doc-rst: Fix typos in packed Bayer raw14 pixel formats diagram There are two typos in the byte order diagram. On row 1 and 3 the low bits for the 3rd pixel B02 and B22 are labeled as R02 and R22. On row 2 the row index is 0 for all pixels where it should be 1. Signed-off-by: Niklas Söderlund Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e1f60f426f5f57388ddd943f8bc49babc45d760c Author: Colin Ian King Date: Sun May 24 18:25:03 2020 +0200 media: gspca: remove redundant assignment to variable retval The variable retval is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4024d6f601e3c49bae9297930970f68d2621ea1d Author: Dinghao Liu Date: Sat May 23 13:49:17 2020 +0200 media: vpif: Fix runtime PM imbalance in vpif_probe When platform_get_resource() returns an error code, a pairing runtime PM usage counter decrement is needed to keep the counter balanced. Signed-off-by: Dinghao Liu Reviewed-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4f9b5709cc087337bf02f004f0a238ec7ebda25b Author: Dinghao Liu Date: Sun May 24 04:59:02 2020 +0200 media: exynos4-is: Fix runtime PM imbalance in fimc_is_probe pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. For all error paths after pm_runtime_get_sync(), things are the same. Signed-off-by: Dinghao Liu Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 00b0228061fa2dc0536fbf3355fedf2d447df3bd Author: Dinghao Liu Date: Sun May 24 05:34:04 2020 +0200 media: exynos4-is: Fix runtime PM imbalance in isp_video_open pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Reviewed-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 779096916daede26699e75e51b0c3a000410d8ad Author: Dinghao Liu Date: Thu May 21 13:56:07 2020 +0200 media: camss: vfe: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 606578801afe6ec8bb03f5d494a4bae49a684ef3 Author: Dinghao Liu Date: Thu May 21 14:06:21 2020 +0200 media: camss: ispif: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf7b1c794d2f2362610143375b4156111e35aed5 Author: Dinghao Liu Date: Sat May 23 09:36:39 2020 +0200 media: camss: csid: Fix runtime PM imbalance in csid_set_power pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 90361693ad8d13a4311fc671903dcedd6ec06940 Author: Dinghao Liu Date: Thu May 21 12:17:35 2020 +0200 media: coda: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e40a8770fd147e7c0d5bd8c327d88090480242f2 Author: Dinghao Liu Date: Thu May 21 12:22:04 2020 +0200 media: fimc-capture: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 157282a5c6273976b31cf4ba4b1c46663f6519d1 Author: Dinghao Liu Date: Thu May 21 13:07:47 2020 +0200 media: s5k6a3: Fix runtime PM imbalance on error pm_runtime_get() increments the runtime PM usage counter even when it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7dcfb327f8fd7418124fc6d63bdce91b5844f50a Author: Dinghao Liu Date: Thu May 21 08:27:45 2020 +0200 media: staging: tegra-vde: fix runtime pm imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0c8bc934ee304e43daa04492bced568dd0bde594 Author: Dafna Hirschfeld Date: Fri May 22 13:56:33 2020 +0200 media: staging: rkisp1: fix dev param for dev_* debugs In some debug prints a wrong 'dev' argument is used for the dev_(dbg/err/warn), this cause a prefix "(NULL device *)" to the prints. In some prints the 'dev' of the sensor subdevice is used which is also wrong. Signed-off-by: Dafna Hirschfeld Reviewed-by: Laurent Pinchart [hverkuil-cisco@xs4all.nl: s/in subdev/in sensor subdev/ as per Laurent's comment] Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3bee86168657d3d846a12b6687d362d361e0cd35 Author: Dafna Hirschfeld Date: Sat May 9 17:29:04 2020 +0200 media: staging: rkisp1: stats: don't set stats flags in rkisp1_stats_send_measurement The flags that indicate which statistics are read are already set in the functions that read them so there is no need to set them in the function rkisp1_stats_send_measurement. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 445093ff76a0b01628637b5890ac332507d8a197 Author: Dafna Hirschfeld Date: Sat May 9 17:29:03 2020 +0200 media: staging: rkisp1 stats: set a measure flag with '|=' instead of '=' The flag RKISP1_CIF_ISP_STAT_AFM_FIN that indicates a type of statistics is mistakenly set with '=' instead of '|=' this might set off previous flags. Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ba5bf51acf0075b193878a56ea3741982391da9c Author: Vishal Sagar Date: Wed May 27 15:57:19 2020 +0200 media: v4l: xilinx: Add Xilinx MIPI CSI-2 Rx Subsystem driver The Xilinx MIPI CSI-2 Rx Subsystem soft IP is used to capture images from MIPI CSI-2 camera sensors and output AXI4-Stream video data ready for image processing. Please refer to PG232 for details. The CSI2 Rx controller filters out all packets except for the packets with data type fixed in hardware. RAW8 packets are always allowed to pass through. It is also used to setup and handle interrupts and enable the core. It logs all the events in respective counters between streaming on and off. The driver supports only the video format bridge enabled configuration. Some data types like YUV 422 10bpc, RAW16, RAW20 are supported when the CSI v2.0 feature is enabled in design. When the VCX feature is enabled, the maximum number of virtual channels becomes 16 from 4. Signed-off-by: Vishal Sagar Reviewed-by: Hyun Kwon Reviewed-by: Luca Ceresoli Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 9e5eb9a451837946d93e077e0bf02bfcd203e4be Author: Vishal Sagar Date: Wed May 27 15:57:18 2020 +0200 media: dt-bindings: media: xilinx: Add Xilinx MIPI CSI-2 Rx Subsystem Add bindings documentation for Xilinx MIPI CSI-2 Rx Subsystem. The Xilinx MIPI CSI-2 Rx Subsystem consists of a CSI-2 Rx controller, a D-PHY in Rx mode and a Video Format Bridge. [Fix indentation error in if...then...else] [Fix number of cells in reg property] Signed-off-by: Vishal Sagar Reviewed-by: Hyun Kwon Reviewed-by: Rob Herring Reviewed-by: Luca Ceresoli Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 3c8f8d8f6b28ffea1aa69ee222bfd232fdffd93b Author: Peng Fan Date: Tue Jun 23 14:49:54 2020 +0800 arm64: dts: imx8qxp: Add ethernet alias Add ethernet alias, so bootloader code can use this to find the primary ethernet device, and set the MAC address. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 33b8250f1b27e8cef79d3c06fdbbcdb6fa0387e5 Author: Peng Fan Date: Tue Jun 23 14:49:53 2020 +0800 arm64: dts: imx8qxp: add i2c aliases The devices could be enumerated properly with aliases. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 44f45d5cc75c533579061806d14e3c3406abb74f Author: Peng Fan Date: Tue Jun 23 14:49:52 2020 +0800 arm64: dts: imx8qxp: add alias for lsio MU Add lsio mu alias for all lsio MUs that could communicate with SCU, imx_scu_enable_general_irq_channel will parse the alias to get the mu resource id, if using other MU, not MU1, the `mu_resource_id` is not what we expect, so add alias to fix this issue. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit fb091802d793e87b4ed7f83c94e29aadb7fe58b7 Author: Sibi Sankar Date: Mon Jun 22 13:46:46 2020 +0530 cpufreq: blacklist SC7180 in cpufreq-dt-platdev Add SC7180 to cpufreq-dt-platdev blacklist since the actual scaling is handled by the 'qcom-cpufreq-hw' driver. Signed-off-by: Sibi Sankar Reviewed-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Signed-off-by: Viresh Kumar commit 49ef12215f112d442e487903d477831f38ce7cb2 Author: Sibi Sankar Date: Mon Jun 22 13:46:45 2020 +0530 cpufreq: blacklist SDM845 in cpufreq-dt-platdev Add SDM845 to cpufreq-dt-platdev blacklist since the actual scaling is handled by the 'qcom-cpufreq-hw' driver. Signed-off-by: Sibi Sankar Reviewed-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Signed-off-by: Viresh Kumar commit 23a60f834406c8e3805328b630d09d5546b460c1 Author: Collin Walling Date: Mon Jun 22 11:46:36 2020 -0400 s390/kvm: diagnose 0x318 sync and reset DIAGNOSE 0x318 (diag318) sets information regarding the environment the VM is running in (Linux, z/VM, etc) and is observed via firmware/service events. This is a privileged s390x instruction that must be intercepted by SIE. Userspace handles the instruction as well as migration. Data is communicated via VCPU register synchronization. The Control Program Name Code (CPNC) is stored in the SIE block. The CPNC along with the Control Program Version Code (CPVC) are stored in the kvm_vcpu_arch struct. This data is reset on load normal and clear resets. Signed-off-by: Collin Walling Reviewed-by: Janosch Frank Acked-by: Cornelia Huck Reviewed-by: David Hildenbrand Link: https://lore.kernel.org/r/20200622154636.5499-3-walling@linux.ibm.com [borntraeger@de.ibm.com: fix sync_reg position] Signed-off-by: Christian Borntraeger commit ddb815bd5459016ff641c504f42e0d7dd8c45aff Author: Christian Brauner Date: Sun May 17 17:16:35 2020 +0200 ia64: enable HAVE_COPY_THREAD_TLS, switch to kernel_clone_args This is part of a larger series that aims at getting rid of the copy_thread()/copy_thread_tls() split that makes the process creation codepaths in the kernel more convoluted and error-prone than they need to be. I'm converting all the remaining arches that haven't yet switched and am collecting individual acks. Once I have them, I'll send the whole series removing the copy_thread()/copy_thread_tls() split, the HAVE_COPY_THREAD_TLS define and the legacy do_fork() helper. The only kernel-wide process creation entry point for anything not going directly through the syscall path will then be based on struct kernel_clone_args. No more danger of weird process creation abi quirks between architectures hopefully, and easier to maintain overall. It also unblocks implementing clone3() on architectures not support copy_thread_tls(). Any architecture that wants to implement clone3() will need to select HAVE_COPY_THREAD_TLS and thus need to implement copy_thread_tls(). So both goals are connected but independently beneficial. HAVE_COPY_THREAD_TLS means that a given architecture supports CLONE_SETTLS and not setting it should usually mean that the architectures doesn't implement it but that's not how things are. In fact all architectures support CLONE_TLS it's just that they don't follow the calling convention that HAVE_COPY_THREAD_TLS implies. That means all architectures can be switched over to select HAVE_COPY_THREAD_TLS. Once that is done we can remove that macro (yay, less code), the unnecessary do_fork() export in kernel/fork.c, and also rename copy_thread_tls() back to copy_thread(). At this point copy_thread() becomes the main architecture specific part of process creation but it will be the same layout and calling convention for all architectures. (Once that is done we can probably cleanup each copy_thread() function even more but that's for the future.) Since ia64 does support CLONE_SETTLS there's no reason to not select HAVE_COPY_THREAD_TLS. This brings us one step closer to getting rid of the copy_thread()/copy_thread_tls() split we still have and ultimately the HAVE_COPY_THREAD_TLS define in general. A lot of architectures have already converted and ia64 is one of the few hat haven't yet. This also unblocks implementing the clone3() syscall on ia64. Once that is done we can get of another ARCH_WANTS_* macro. Once Any architecture that supports HAVE_COPY_THREAD_TLS cannot call the do_fork() helper anymore. This is fine and intended since it should be removed in favor of the new, cleaner _do_fork() calling convention based on struct kernel_clone_args. In fact, most architectures have already switched. With this patch, ia64 joins the other arches which can't use the fork(), vfork(), clone(), clone3() syscalls directly and who follow the new process creation calling convention that is based on struct kernel_clone_args which we introduced a while back. This means less custom assembly in the architectures entry path to set up the registers before calling into the process creation helper and it is easier to to support new features without having to adapt calling conventions. It also unifies all process creation paths between fork(), vfork(), clone(), and clone3(). (We can't fix the ABI nightmare that legacy clone() is but we can prevent stuff like this happening in the future.) Well, the first version I nothing to test this with. I don't know how to reasonably explain what happened but thanks to Adrian I'm now sitting at home next to a HP Integrity RX2600. I've done some testing and my initial version had a bug that became obvious when I took a closer look. The switch stack logic assumes that ar.pfs is stored in r16 and I changed that to r2. So with that fixed the following test program runs without any problems: #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define IA64_SYSCALL_OFFSET 1024 #ifndef __NR_clone #define __NR_clone (104 + IA64_SYSCALL_OFFSET) #endif #ifndef __NR_clone2 #define __NR_clone2 (189 + IA64_SYSCALL_OFFSET) #endif /* * sys_clone(unsigned long flags, * unsigned long stack, * int *parent_tidptr, * int *child_tidptr, * unsigned long tls) */ static pid_t ia64_raw_clone(void) { return syscall(__NR_clone, SIGCHLD, 0, NULL, NULL, 0); } /* * sys_clone2(unsigned long flags, * unsigned long stack, * unsigned long stack_size, * int *parent_tidptr, * int *child_tidptr, * unsigned long tls) */ static pid_t ia64_raw_clone2(void) { return syscall(__NR_clone2, SIGCHLD, 0, 0, NULL, NULL, 0); } /* * Let's use the "standard stack limit" (i.e. glibc thread size default) for * stack sizes: 8MB. */ #define __STACK_SIZE (8 * 1024 * 1024) /* This is not always defined in sched.h. */ extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base, size_t __child_stack_size, int __flags, void *__arg, ...); pid_t libc_clone2(int (*fn)(void *), void *arg) { pid_t ret; void *stack; stack = malloc(__STACK_SIZE); if (!stack) return -ENOMEM; return __clone2(fn, stack, __STACK_SIZE, SIGCHLD, arg, NULL, NULL, NULL); } static int libc_clone2_child(void *data) { fprintf(stderr, "I'll just see myself out\n"); _exit(EXIT_SUCCESS); } int main(void) { for (int i = 0; i < 1000; i++) { pid_t pid = ia64_raw_clone(); if (pid < 0) _exit(EXIT_FAILURE); if (pid == 0) _exit(EXIT_SUCCESS); if (wait(NULL) != pid) _exit(EXIT_FAILURE); fprintf(stderr, "ia64_raw_clone() passed\n"); pid = ia64_raw_clone2(); if (pid < 0) _exit(EXIT_FAILURE); if (pid == 0) _exit(EXIT_SUCCESS); if (wait(NULL) != pid) _exit(EXIT_FAILURE); fprintf(stderr, "ia64_raw_clone2() passed\n"); pid = libc_clone2(libc_clone2_child, NULL); if (pid < 0) _exit(EXIT_FAILURE); if (wait(NULL) != pid) _exit(EXIT_FAILURE); fprintf(stderr, "libc_clone2() passed\n"); } _exit(EXIT_SUCCESS); } For some more context, please see: commit 606e9ad20094f6d500166881d301f31a51bc8aa7 Merge: ac61145a725a 457677c70c76 Author: Linus Torvalds Date: Sat Jan 11 15:33:48 2020 -0800 Merge tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread fixes from Christian Brauner: "This contains a series of patches to fix CLONE_SETTLS when used with clone3(). The clone3() syscall passes the tls argument through struct clone_args instead of a register. This means, all architectures that do not implement copy_thread_tls() but still support CLONE_SETTLS via copy_thread() expecting the tls to be located in a register argument based on clone() are currently unfortunately broken. Their tls value will be garbage. The patch series fixes this on all architectures that currently define __ARCH_WANT_SYS_CLONE3. It also adds a compile-time check to ensure that any architecture that enables clone3() in the future is forced to also implement copy_thread_tls(). My ultimate goal is to get rid of the copy_thread()/copy_thread_tls() split and just have copy_thread_tls() at some point in the not too distant future (Maybe even renaming copy_thread_tls() back to simply copy_thread() once the old function is ripped from all arches). This is dependent now on all arches supporting clone3(). While all relevant arches do that now there are still four missing: ia64, m68k, sh and sparc. They have the system call reserved, but not implemented. Once they all implement clone3() we can get rid of ARCH_WANT_SYS_CLONE3 and HAVE_COPY_THREAD_TLS. Note that in the meantime, m68k has already switched to the new calling convention. And I've got sparc patches acked by Dave, too. Signed-off-by: Christian Brauner Cc: Tony Luck Cc: Fenghua Yu Cc: John Paul Adrian Glaubitz Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Sebastian Andrzej Siewior Cc: "Peter Zijlstra (Intel)" Cc: Qais Yousef Cc: linux-ia64@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20200517151635.3085756-1-christian.brauner@ubuntu.com commit 7694f5143bbe2e2d08216eaee7c62c9d39252889 Author: Christian Brauner Date: Tue May 12 19:15:27 2020 +0200 sparc: unconditionally enable HAVE_COPY_THREAD_TLS Now that both sparc and sparc64 support copy_thread_tls() and don't rely on do_fork() anymore, turn on HAVE_COPY_THREAD_TLS unconditionally. Once all architectures are switched over this macro will be removed and the old do_fork() calling convention fully abandoned in favor of the cleaner struct kernel_clone_args one. Signed-off-by: Christian Brauner Acked-by: David S. Miller Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Guo Ren Cc: linux-csky@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: sparclinux@vger.kernel.org Link: https://lore.kernel.org/r/20200512171527.570109-4-christian.brauner@ubuntu.com commit a4261d4bb45022e1b8b95df13dbb05abac490165 Author: Christian Brauner Date: Tue May 12 19:15:26 2020 +0200 sparc: share process creation helpers between sparc and sparc64 As promised in the previous patch, this moves the process creation helpers into a common process.c file that is shared between sparc and sparc64. It allows us to get rid of quite a bit custom assembler and the to remove the separe 32bit specific sparc_do_fork() call. One thing to note, is that when clone() was called with a separate stack for the child the assembler would align it. But copy_thread() has always been doing that too so that line wasn't needed and can thus simply be removed. Signed-off-by: Christian Brauner Acked-by: David S. Miller Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Guo Ren Cc: linux-csky@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: sparclinux@vger.kernel.org Link: https://lore.kernel.org/r/20200512171527.570109-3-christian.brauner@ubuntu.com commit dcad2a62bc7948342404217831233957e8f169cc Author: Christian Brauner Date: Tue May 12 19:15:25 2020 +0200 sparc64: enable HAVE_COPY_THREAD_TLS This is part of a larger series that aims at getting rid of the copy_thread()/copy_thread_tls() split that makes the process creation codepaths in the kernel more convoluted and error-prone than they need to be. It also unblocks implementing clone3() on architectures not support copy_thread_tls(). Any architecture that wants to implement clone3() will need to select HAVE_COPY_THREAD_TLS and thus need to implement copy_thread_tls(). So both goals are connected but independently beneficial. HAVE_COPY_THREAD_TLS means that a given architecture supports CLONE_SETTLS and not setting it should usually mean that the architectures doesn't implement it but that's not how things are. In fact all architectures support CLONE_TLS it's just that they don't follow the calling convention that HAVE_COPY_THREAD_TLS implies. That means all architectures can be switched over to select HAVE_COPY_THREAD_TLS. Once that is done we can remove that macro (yay, less code), the unnecessary do_fork() export in kernel/fork.c, and also rename copy_thread_tls() back to copy_thread(). At this point copy_thread() becomes the main architecture specific part of process creation but it will be the same layout and calling convention for all architectures. (Once that is done we can probably cleanup each copy_thread() function even more but that's for the future.) Since sparc does support CLONE_SETTLS there's no reason to not select HAVE_COPY_THREAD_TLS. This brings us one step closer to getting rid of the copy_thread()/copy_thread_tls() split we still have and ultimately the HAVE_COPY_THREAD_TLS define in general. A lot of architectures have already converted and sparc is one of the few hat haven't yet. This also unblocks implementing the clone3() syscall on sparc which I will follow up later (if no one gets there before me). Once that is done we can get of another ARCH_WANTS_* macro. This patch just switches sparc64 over to HAVE_COPY_THREAD_TLS but not sparc32 which will be done in the next patch. Once Any architecture that supports HAVE_COPY_THREAD_TLS cannot call the do_fork() helper anymore. This is fine and intended since it should be removed in favor of the new, cleaner _do_fork() calling convention based on struct kernel_clone_args. In fact, most architectures have already switched. With this patch, sparc joins the other arches which can't use the fork(), vfork(), clone(), clone3() syscalls directly and who follow the new process creation calling convention that is based on struct kernel_clone_args which we introduced a while back. This means less custom assembly in the architectures entry path to set up the registers before calling into the process creation helper and it is easier to to support new features without having to adapt calling conventions. It also unifies all process creation paths between fork(), vfork(), clone(), and clone3(). (We can't fix the ABI nightmare that legacy clone() is but we can prevent stuff like this happening in the future.) Note that sparc can't easily call into the syscalls directly because of its return value conventions when a new process is created which needs to clobber the UREG_I1 register in copy_thread{_tls()} and it needs to restore it if process creation fails. That's not a big deal since the new process creation calling convention makes things simpler. This removes sparc_do_fork() and replaces it with 3 clean helpers, sparc_fork(), sparc_vfork(), and sparc_clone(). That means a little more C code until the next patch unifies sparc 32bit and sparc64. It has the advantage that we can remove quite a bit of assembler and it makes the whole syscall.S process creation bits easier to read. The follow-up patch will remove the custom sparc_do_fork() helper for 32bi sparc and move sparc_fork(), sparc_vfork(), and sparc_clone() into a common process.c file. This allows us to remove quite a bit of custom assembly form 32bit sparc's entry.S file too and allows to remove even more code because now all helpers are shared between 32bit sparc and sparc64 instead of having to maintain two separate sparc_do_fork() implementations. For some more context, please see: commit 606e9ad20094f6d500166881d301f31a51bc8aa7 Merge: ac61145a725a 457677c70c76 Author: Linus Torvalds Date: Sat Jan 11 15:33:48 2020 -0800 Merge tag 'clone3-tls-v5.5-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull thread fixes from Christian Brauner: "This contains a series of patches to fix CLONE_SETTLS when used with clone3(). The clone3() syscall passes the tls argument through struct clone_args instead of a register. This means, all architectures that do not implement copy_thread_tls() but still support CLONE_SETTLS via copy_thread() expecting the tls to be located in a register argument based on clone() are currently unfortunately broken. Their tls value will be garbage. The patch series fixes this on all architectures that currently define __ARCH_WANT_SYS_CLONE3. It also adds a compile-time check to ensure that any architecture that enables clone3() in the future is forced to also implement copy_thread_tls(). My ultimate goal is to get rid of the copy_thread()/copy_thread_tls() split and just have copy_thread_tls() at some point in the not too distant future (Maybe even renaming copy_thread_tls() back to simply copy_thread() once the old function is ripped from all arches). This is dependent now on all arches supporting clone3(). While all relevant arches do that now there are still four missing: ia64, m68k, sh and sparc. They have the system call reserved, but not implemented. Once they all implement clone3() we can get rid of ARCH_WANT_SYS_CLONE3 and HAVE_COPY_THREAD_TLS. Note that in the meantime, m68k has already switched to the new calling convention. Signed-off-by: Christian Brauner Acked-by: David S. Miller Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Guo Ren Cc: linux-csky@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: sparclinux@vger.kernel.org See: d95b56c77ef ("openrisc: Cleanup copy_thread_tls docs and comments") See: 0b9f386c4be ("csky: Implement copy_thread_tls") Link: https://lore.kernel.org/r/20200512171527.570109-2-christian.brauner@ubuntu.com commit cfda066aa86227840faac7673bbdd9ae1c1d259d Author: Peng Fan Date: Fri Jun 5 09:59:32 2020 +0800 firmware: imx: scu-pd: add more cm4 resources Add more cm4 resources, then linux could use cm4's i2c/lpuart and could kick cm4 core. Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 169caf692567897da35382503a5caeb64ab4b8c7 Author: Peng Fan Date: Fri Jun 5 09:59:31 2020 +0800 firmware: imx: add resource management api Add resource management API, when we have multiple partition running together, resources not owned to current partition should not be used. Reviewed-by: Leonard Crestez Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit a8dfca1e714fcc8faf3e45453d6e2687db8da727 Author: Peng Fan Date: Fri Jun 5 09:59:30 2020 +0800 firmware: imx: scu-pd: fix cm40 power domain The postfix needs to be false. Alought compiler use 0 for postfix now, and take start_from as 0, it is better we add explicit false to postfix. Fixes: 705dcca91d0a("firmware: imx: scu-pd: add power domain for I2C and INTMUX in CM40 SS") Signed-off-by: Peng Fan Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit 234d7d6b4cbfab0e900f12658053689bb3376141 Author: Martin Botka Date: Mon Jun 22 21:25:56 2020 +0200 arm64: dts: qcom: Add support for Sony Xperia 10/10 Plus (Ganges platform) Add device tree support for the Sony Xperia 10 and 10 Plus smartphones. They are all based on the Sony Ganges platform (sdm630/636) and share a lot of common code. The differences are really minor, so a Ganges-common DTSI has been created to reduce clutter. 10 - Kirin 10 Plus - Mermaid This platform is based on SoMC Nile, but there are some major differences when it comes to pin configuration and panel setup (among others). The boards currently support: * Screen console * SDHCI * I2C * pstore log dump * GPIO keys * PSCI idle states Signed-off-by: Martin Botka Signed-off-by: Konrad Dybcio Tested-by: Martin Botka Link: https://lore.kernel.org/r/20200622192558.152828-7-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit e781633b6067eee13001faa1175851e91143d738 Author: Konrad Dybcio Date: Mon Jun 22 21:25:55 2020 +0200 arm64: dts: qcom: Add support for Sony Xperia XA2/Plus/Ultra (Nile platform) Add device tree support for the Sony Xperia XA2, XA2 Plus and XA2 Ultra smartphones. They are all based on the Sony Nile platform (sdm630) and share a lot of common code. The differences are really minor, so a Nile-common DTSI has been created to reduce clutter. XA2 - Pioneer XA2 Plus - Voyager XA2 Ultra - Discovery The boards currently support: * Screen console * SDHCI * I2C * pstore log dump * GPIO keys * PSCI idle states Signed-off-by: Konrad Dybcio Tested-by: Łukasz Patron Link: https://lore.kernel.org/r/20200622192558.152828-6-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit b190fb010664c769da16c5240be0e972cb3b267a Author: Konrad Dybcio Date: Mon Jun 22 21:25:54 2020 +0200 arm64: dts: qcom: sdm630: Add sdm630 dts file Add devicetree files for SDM630 SoC and its pin configuration. This commit adds basic nodes like cpu, psci and other required configuration for booting up from eMMC to the serial console. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200622192558.152828-5-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 4870c76c00d178956cf3e1c17aab6b00a61dc30f Author: Konrad Dybcio Date: Mon Jun 22 21:25:53 2020 +0200 arm64: dts: qcom: pm660(l): Add base dts files Add base DTS files for pm660(l) along with GPIOs, power-on and rtc nodes. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200622192558.152828-4-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit a23816f3cdcbffe5dc6e8c331914b3f51b87c2f3 Author: Collin Walling Date: Mon Jun 22 11:46:35 2020 -0400 s390/setup: diag 318: refactor struct The diag 318 struct introduced in include/asm/diag.h can be reused in KVM, so let's condense the version code fields in the diag318_info struct for easier usage and simplify it until we can determine how the data should be formatted. Signed-off-by: Collin Walling Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20200622154636.5499-2-walling@linux.ibm.com Signed-off-by: Christian Borntraeger commit f42f3e7f4d35a2d4e185d101eb84a4ec1e4aac58 Author: Peng Fan Date: Wed Jun 3 17:29:32 2020 +0800 soc: imx: scu: use devm_kasprintf Use devm_kasprintf to simplify code Signed-off-by: Peng Fan Reviewed-by: Daniel Baluta Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit 90d4f99ac56b4aadf4e87871a4e9128474da259b Author: Imre Deak Date: Tue Jun 16 17:18:54 2020 +0300 drm/i915/dp_mst: Clear the ACT sent flag during encoder disabling too During encoder enabling we clear the flag before starting the ACT sequence and wait for the flag, but the clearing is missing during encoder disabling, add it there too. Since nothing cleared the flag automatically we could've run subsequent disabling steps too early. Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200616141855.746-5-imre.deak@intel.com commit 3d289d2578eff2a274fc5e63fca2a611404a3003 Author: Imre Deak Date: Tue Jun 16 17:18:53 2020 +0300 drm/i915/dp_mst: Clear only the ACT sent flag from DP_TP_STATUS It's not clear if the DP_TP_STATUS flags other than the ACT sent flag have some side-effect, so don't clear those; we don't depend on the state of these flags anyway. Suggested-by: Ville Syrjälä Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200616141855.746-4-imre.deak@intel.com commit e60b8672526cc0e1a033380998eff6978b8d3e09 Author: Imre Deak Date: Tue Jun 16 17:18:52 2020 +0300 drm/i915/dp_mst: Move clearing the ACT sent flag closer to its polling During transcoder enabling we'll configure the transcoder in MST mode and enable the VC payload allocation, which will start the ACT sequence. Before waiting for the ACT sequence completion, we need to clear the ACT sent flag, but based on the above we can do this right before enabling the transcoder. For clarity, move the flag clearing closer to where we wait for it. While at it also factor out some common code. Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200616141855.746-3-imre.deak@intel.com commit 80a8cecf62a5917e27c85d13430f7346df57883f Author: Imre Deak Date: Wed Jun 17 00:11:45 2020 +0300 drm/i915/dp_mst: Disable link training fallback on MST links During the initial probing of an MST sink, MST core will determine the sink's link bandwidth based on its own version of the sink link rate/lane count caps it reads from the DPCD. At a later point (after probing and 1 or more modesets) i915 may limit the link parameters wrt. the original source/sink common caps above due to link training failures during a modeset and the resulting link training fallback logic. Based on the above a modeset following another modeset with a link training error will compute the i915 HW specific and DP protocol timing parameters (data/link M/N and MST TU values) taking into account only the unlimited source/sink common caps, but not taking into account the fallback limits. This will also let DRM core oversubscribe the actual link bandwidth during the MST payload allocation. Prevent the above problem by disabling the link training fallback on MST links for now, until the MST probe time initialization and the MST compute config logic can deal with changing link parameters. The misconfigured timings lead at least to a 'Timed out waiting for DP idle patterns' error. v2: (Ville) - Print link training error message on the MST path too. - Clarify the problem in the commit log. Cc: Ville Syrjälä Cc: Manasi Navare Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200616211146.23027-2-imre.deak@intel.com commit f153478de4b259afb0a383de83e817b4c237401b Author: Imre Deak Date: Wed Jun 17 00:11:44 2020 +0300 drm/i915/tgl+: Use the correct DP_TP_* register instances in MST encoders MST encoders must use the master MST transcoder's DP_TP_STATUS and DP_TP_CONTROL registers. Atm, during the HW readout of an MST encoder connected to a slave transcoder we reset these register addresses in intel_dp::regs.dp_tp_* to the slave transcoder's DP_TP_* register addresses incorrectly; fix this. One example where the above overwite happens is the encoder HW state validation after enabling multiple streams; see intel_dp_mst_enc_get_config(). After that during disabling any stream we'll get a 'Timed out waiting for ACT sent when disabling' error, due to reading from the incorrect DP_TP_STATUS register. This change replaces https://patchwork.freedesktop.org/patch/369577/?series=78193&rev=1 which just papered over the problem. v2: - Correct the failure scenario in the commit log. (José) Cc: Ville Syrjälä Cc: José Roberto de Souza Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200616211146.23027-1-imre.deak@intel.com commit 018e4308349dbf32f4d971cbe72f4f3d6b1c217a Author: Andrey Smirnov Date: Mon Jun 1 16:06:07 2020 -0700 clk: imx: vf610: add CAAM clock According to Vybrid Security RM, CCM_CCGR11[CG176] can be used to gate CAAM ipg clock. Signed-off-by: Horia Geantă Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Shawn Guo Cc: Fabio Estevam Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-imx@nxp.com Tested-by: Chris Healy Signed-off-by: Shawn Guo commit 94ae59ac5d12cc938fd2ad651f0041b61c4434fb Author: Peng Fan Date: Mon Jun 1 16:20:02 2020 +0800 clk: imx8mp: add mu root clk Add mu root clk for mu mailbox usage. Reviewed-by: Dong Aisheng Signed-off-by: Peng Fan Acked-by: Stephen Boyd Signed-off-by: Shawn Guo commit da2e14c01831e14f9515b80c953c92cb6802b29d Author: Vincent Knecht Date: Sat Jun 13 09:27:45 2020 +0200 dt-bindings: soc: qcom: Document MSM8936 SMD RPM Acked-by: Rob Herring Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20200613072745.1249003-5-vincent.knecht@mailoo.org Signed-off-by: Bjorn Andersson commit d6e52482f5ab453eb877708dbe04fc50eb6977ed Author: Konrad Dybcio Date: Sat Jun 13 09:27:44 2020 +0200 drivers: soc: Add MSM8936 SMD RPM compatible Signed-off-by: Konrad Dybcio Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20200613072745.1249003-4-vincent.knecht@mailoo.org Signed-off-by: Bjorn Andersson commit bbfc59bec2ad6e68be38232941e2e67fd3dcd1d8 Author: Peng Fan Date: Mon Jun 1 16:20:01 2020 +0800 arm64: dts: imx8m: add mu node Add mu node to let A53 could communicate with M Core. Signed-off-by: Peng Fan Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit 5b17a04addc29201dc142c8d2c077eb7745d2e35 Author: Guillaume Tucker Date: Fri Jun 12 14:58:37 2020 +0100 ARM: exynos: clear L310_AUX_CTRL_FULL_LINE_ZERO in default l2c_aux_val This "alert" error message can be seen on exynos4412-odroidx2: L2C: platform modifies aux control register: 0x02070000 -> 0x3e470001 L2C: platform provided aux values permit register corruption. Followed by this plain error message: L2C-310: enabling full line of zeros but not enabled in Cortex-A9 To fix it, don't set the L310_AUX_CTRL_FULL_LINE_ZERO flag (bit 0) in the default value of l2c_aux_val. It may instead be enabled when applicable by the logic in l2c310_enable() if the attribute "arm,full-line-zero-disable" was set in the device tree. The initial commit that introduced this default value was in v2.6.38 commit 1cf0eb799759 ("ARM: S5PV310: Add L2 cache init function in cpu.c"). However, the code to set the L310_AUX_CTRL_FULL_LINE_ZERO flag and manage that feature was added much later and the default value was not updated then. So this seems to have been a subtle oversight especially since enabling it only in the cache and not in the A9 core doesn't actually prevent the platform from running. According to the TRM, the opposite would be a real issue, if the feature was enabled in the A9 core but not in the cache controller. Reported-by: "kernelci.org bot" Signed-off-by: Guillaume Tucker Signed-off-by: Krzysztof Kozlowski commit 8af7b4525acf5012b2f111a8b168b8647f2c8d60 Merge: 29cb9868fb695 ecab78703f3b8 Author: David S. Miller Date: Mon Jun 22 21:10:22 2020 -0700 Merge branch 'net-atlantic-additional-A2-features' Igor Russkikh says: ==================== net: atlantic: additional A2 features This patchset adds more features to A2: * half duplex rates; * EEE; * flow control; * link partner capabilities reporting; * phy loopback. Feature-wise A2 is almost on-par with A1 save for WoL and filtering, which will be submitted as separate follow-up patchset(s). ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit ecab78703f3b87b3e21160719b08819c7cc0f4e5 Author: Dmitry Bogdanov Date: Mon Jun 22 17:53:09 2020 +0300 net: atlantic: A2: phy loopback support This patch adds the phy loopback support on A2. Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 2b53b04de3b185ada35155e668a24a68f6a753ba Author: Dmitry Bogdanov Date: Mon Jun 22 17:53:08 2020 +0300 net: atlantic: A2: report link partner capabilities This patch adds link partner capabilities reporting support on A2. In particular, the following capabilities are available for reporting: * link rate; * EEE; * flow control. Signed-off-by: Dmitry Bogdanov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 3e168de529b14edd13c6842ff7bd415f25672db8 Author: Igor Russkikh Date: Mon Jun 22 17:53:07 2020 +0300 net: atlantic: A2: flow control support This patch adds flow control support on A2. Co-developed-by: Dmitry Bogdanov Signed-off-by: Dmitry Bogdanov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit ce6a690ccc99a7ece8b061d88d9457ddb556a749 Author: Nikita Danilov Date: Mon Jun 22 17:53:06 2020 +0300 net: atlantic: A2: EEE support This patch adds EEE support on A2. Signed-off-by: Nikita Danilov Co-developed-by: Igor Russkikh Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit e61b28686bae30b824b690c75d011a61f90c52dd Author: Nikita Danilov Date: Mon Jun 22 17:53:05 2020 +0300 net: atlantic: remove baseX usage This patch removes 2.5G baseX wrong usage/reporting, since it shouldn't have been mixed with baseT. Signed-off-by: Nikita Danilov Signed-off-by: Mark Starovoytov Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 071a02046c262f633ef8d9064cf36fd6def6d0a5 Author: Igor Russkikh Date: Mon Jun 22 17:53:04 2020 +0300 net: atlantic: A2: half duplex support This patch adds support for 10M/100M/1G half duplex rates, which are supported by A2 in additional to full duplex rates supported by A1. Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 29cb9868fb69582da3205cf4a5eb5dc8f740ed33 Author: Stephen Rothwell Date: Tue Jun 23 13:43:06 2020 +1000 net/core/devlink.c: remove new uninitialized_var() usage Signed-off-by: Stephen Rothwell Signed-off-by: David S. Miller commit c5efcf17bf84b20dd76ca56de6dd99a40a89c4e3 Author: Gaurav Singh Date: Sun Jun 21 22:24:30 2020 -0400 tcindex_change: Remove redundant null check arg cannot be NULL since its already being dereferenced before. Remove the redundant NULL check. Signed-off-by: Gaurav Singh Signed-off-by: David S. Miller commit 75674e31593ba3b18459816d9b52b3d87dbfadc0 Author: Russell King Date: Sun Jun 21 15:36:39 2020 +0100 net: mtk_eth_soc: use resolved link config in mac_link_up() Convert the mtk_eth_soc driver to use the finalised link parameters in mac_link_up() rather than the parameters in mac_config(). Signed-off-by: Russell King Signed-off-by: David S. Miller commit 864cefeea03f79f68021fcbc9f04db5e11d52c5d Merge: 19430ede90fdd 9403c158b8722 Author: David S. Miller Date: Mon Jun 22 20:41:05 2020 -0700 Merge branch 'Multicast-improvement-in-Ocelot-and-Felix-drivers' Vladimir Oltean says: ==================== Multicast improvement in Ocelot and Felix drivers This series makes some basic multicast forwarding functionality work for Felix DSA and for Ocelot switchdev. IGMP/MLD snooping in Felix is still missing, and there are other improvements to be made in the general area of multicast address filtering towards the CPU, but let's get these hardware-specific fixes out of the way first. ==================== Signed-off-by: David S. Miller commit 9403c158b8722ada99f5dd7b3717c264879aefa8 Author: Vladimir Oltean Date: Sun Jun 21 14:46:03 2020 +0300 net: mscc: ocelot: support IPv4, IPv6 and plain Ethernet mdb entries The current procedure for installing a multicast address is hardcoded for IPv4. But, in the ocelot hardware, there are 3 different procedures for IPv4, IPv6 and for regular L2 multicast. For IPv6 (33-33-xx-xx-xx-xx), it's the same as for IPv4 (01-00-5e-xx-xx-xx), except that the destination port mask is stuffed into first 2 bytes of the MAC address except into first 3 bytes. For plain Ethernet multicast, there's no port-in-address stuffing going on, instead the DEST_IDX (pointer to PGID) is used there, just as for unicast. So we have to use one of the nonreserved multicast PGIDs that the hardware has allocated for this purpose. This patch classifies the type of multicast address based on its first bytes, then redirects to one of the 3 different hardware procedures. Note that this gives us a really better way of redirecting PTP frames sent at 01-1b-19-00-00-00 to the CPU. Previously, Yangbo Lu tried to add a trapping rule for PTP EtherType but got a lot of pushback: https://patchwork.ozlabs.org/project/netdev/patch/20190813025214.18601-5-yangbo.lu@nxp.com/ But right now, that isn't needed at all. The application stack (ptp4l) does this for the PTP multicast addresses it's interested in (which are configurable, and include 01-1b-19-00-00-00): memset(&mreq, 0, sizeof(mreq)); mreq.mr_ifindex = index; mreq.mr_type = PACKET_MR_MULTICAST; mreq.mr_alen = MAC_LEN; memcpy(mreq.mr_address, addr1, MAC_LEN); err1 = setsockopt(fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mreq, sizeof(mreq)); Into the kernel, this translates into a dev_mc_add on the switch network interfaces, and our drivers know that it means they should translate it into a host MDB address (make the CPU port be the destination). Previously, this was broken because all mdb addresses were treated as IPv4 (which 01-1b-19-00-00-00 obviously is not). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 96b029b004942ecdb50e40d3e45cdc8a3aec9135 Author: Vladimir Oltean Date: Sun Jun 21 14:46:02 2020 +0300 net: mscc: ocelot: introduce macros for iterating over PGIDs The current iterators are impossible to understand at first glance without switching back and forth between the definitions and their actual use in the for loops. So introduce some convenience names to help readability. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 209edf95da63a0ad19750769f473f4ea1553d21d Author: Vladimir Oltean Date: Sun Jun 21 14:46:01 2020 +0300 net: dsa: felix: call port mdb operations from ocelot This adds the mdb hooks in felix and exports the mdb functions from ocelot. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 471beb11c4ecdefd1d8502861c5e151fd642dc6e Author: Vladimir Oltean Date: Sun Jun 21 14:46:00 2020 +0300 net: mscc: ocelot: make the NPI port a proper target for FDB and MDB When used in DSA mode (as seen in Felix), the DEST_IDX in the MAC table should point to the PGID for the CPU port (PGID_CPU) and not for the Ethernet port where the CPU queues are redirected to (also known as Node Processor Interface - NPI). Because for Felix this distinction shouldn't really matter (from DSA perspective, the NPI port _is_ the CPU port), make the ocelot library act upon the CPU port when NPI mode is enabled. This has no effect for the mscc_ocelot driver for VSC7514, because that does not use NPI (and ocelot->npi is -1). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 0897ecf7532577bda3dbcb043ce046a96948889d Author: Vladimir Oltean Date: Sun Jun 21 14:45:59 2020 +0300 net: mscc: ocelot: fix encoding destination ports into multicast IPv4 address The ocelot hardware designers have made some hacks to support multicast IPv4 and IPv6 addresses. Normally, the MAC table matches on MAC addresses and the destination ports are selected through the DEST_IDX field of the respective MAC table entry. The DEST_IDX points to a Port Group ID (PGID) which contains the bit mask of ports that frames should be forwarded to. But there aren't a lot of PGIDs (only 80 or so) and there are clearly many more IP multicast addresses than that, so it doesn't scale to use this PGID mechanism, so something else was done. Since the first portion of the MAC address is known, the hack they did was to use a single PGID for _flooding_ unknown IPv4 multicast (PGID_MCIPV4 == 62), but for known IP multicast, embed the destination ports into the first 3 bytes of the MAC address recorded in the MAC table. The VSC7514 datasheet explains it like this: 3.9.1.5 IPv4 Multicast Entries MAC table entries with the ENTRY_TYPE = 2 settings are interpreted as IPv4 multicast entries. IPv4 multicasts entries match IPv4 frames, which are classified to the specified VID, and which have DMAC = 0x01005Exxxxxx, where xxxxxx is the lower 24 bits of the MAC address in the entry. Instead of a lookup in the destination mask table (PGID), the destination set is programmed as part of the entry MAC address. This is shown in the following table. Table 78: IPv4 Multicast Destination Mask Destination Ports Record Bit Field --------------------------------------------- Ports 10-0 MAC[34-24] Example: All IPv4 multicast frames in VLAN 12 with MAC 01005E112233 are to be forwarded to ports 3, 8, and 9. This is done by inserting the following entry in the MAC table entry: VALID = 1 VID = 12 MAC = 0x000308112233 ENTRY_TYPE = 2 DEST_IDX = 0 But this procedure is not at all what's going on in the driver. In fact, the code that embeds the ports into the MAC address looks like it hasn't actually been tested. This patch applies the procedure described in the datasheet. Since there are many other fixes to be made around multicast forwarding until it works properly, there is no real reason for this patch to be backported to stable trees, or considered a real fix of something that should have worked. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 12fa1078efc871604d62e992cb8a038421b82096 Author: Anson Huang Date: Thu May 28 11:12:48 2020 +0800 arm64: dts: imx8m: change ocotp node name on i.MX8M SoCs Change OCOTP node name from ocotp-ctrl to efuse to be compliant with yaml schema, it requires the nodename to be one of "eeprom|efuse|nvram". Signed-off-by: Anson Huang Reviewed-by: Fugang Duan Signed-off-by: Shawn Guo commit 260249f929e81d3d5764117fdd6b9e43eb8fb1d5 Author: Adam Ford Date: Wed Jun 3 10:43:29 2020 -0500 clk: vc5: Enable addition output configurations of the Versaclock The existing driver is expecting the Versaclock to be pre-programmed, and only sets the output frequency. Unfortunately, not all devices are pre-programmed, and the Versaclock chip has more options beyond just the frequency. This patch enables the following additional features: - Programmable voltage: 1.8V, 2.5V, or 3.3V​ - Slew Percentage of normal: 85%, 90%, or 100% - Output Type: LVPECL, CMOS, HCSL, or LVDS Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20200603154329.31579-3-aford173@gmail.com Signed-off-by: Stephen Boyd commit 34662f6e30846ae0f82bbc9605deff67781f6616 Author: Adam Ford Date: Wed Jun 3 10:43:28 2020 -0500 dt: Add additional option bindings for IDT VersaClock The VersaClock driver now supports some additional bindings to support child nodes which can configure optional settings like mode, voltage and slew. This patch updates the binding document to describe what is available in the driver. Signed-off-by: Adam Ford Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200603154329.31579-2-aford173@gmail.com Signed-off-by: Stephen Boyd commit f491276a5168598758ea7fc381195e4ba9af39f8 Author: Adam Ford Date: Wed Jun 3 10:43:27 2020 -0500 clk: vc5: Allow Versaclock driver to support multiple instances Currently, the Versaclock driver is only expecting one instance and uses hard-coded names for the various clock names. Unfortunately, this is a problem when there is more than one instance of the driver, because the subsequent instantiations of the driver use the identical name. Each clock after the fist fails to load, because the clock subsystem cannot handle two clocks with identical name. This patch removes the hard-coded name arrays and uses kasprintf to assign clock names based on names of their respective node and parent node which gives each clock a unique identifying name. For a verasaclock node with a name like: versaclock5: versaclock_som@6a The updated clock names would appear like: versaclock_som.mux versaclock_som.out0_sel_i2cb versaclock_som.pfd versaclock_som.pll versaclock_som.fod3 versaclock_som.out4 versaclock_som.fod2 versaclock_som.out3 versaclock_som.fod1 versaclock_som.out2 versaclock_som.fod0 versaclock_som.out1 Signed-off-by: Adam Ford Link: https://lore.kernel.org/r/20200603154329.31579-1-aford173@gmail.com Signed-off-by: Stephen Boyd commit ef01ab612b527eb8cdec0a5d3c06849ca92bcf90 Merge: 9ebc0617d676e 59390282b7542 Author: Stephen Boyd Date: Mon Jun 22 19:02:18 2020 -0700 Merge branch 'clk-qcom' into clk-next - Enable CPU clks on Qualcomm IPQ6018 SoCs * clk-qcom: clk: qcom: smd: Add support for MSM8936 rpm clocks dt-bindings: clock: rpmcc: Document MSM8936 compatible clk: qcom: smd: Add support for SDM660 rpm clocks clk: qcom: Add ipq6018 apss clock controller clk: qcom: Add DT bindings for ipq6018 apss clock controller clk: qcom: Add ipq apss pll driver dt-bindings: clock: add ipq6018 a53 pll compatible commit 59390282b7542c6050c1deaca0b2949180903175 Author: Vincent Knecht Date: Sat Jun 13 09:27:42 2020 +0200 clk: qcom: smd: Add support for MSM8936 rpm clocks Add missing definition of rpm clk for msm8936 soc (also used by msm8939) Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20200613072745.1249003-2-vincent.knecht@mailoo.org Signed-off-by: Stephen Boyd commit f2de5257dbb4a3437060546fe75551b5538d224b Author: Vincent Knecht Date: Sat Jun 13 09:27:43 2020 +0200 dt-bindings: clock: rpmcc: Document MSM8936 compatible Acked-by: Rob Herring Signed-off-by: Vincent Knecht Link: https://lore.kernel.org/r/20200613072745.1249003-3-vincent.knecht@mailoo.org Signed-off-by: Stephen Boyd commit b3eece09e2e69f528a1ab6104861550dec149083 Merge: 1bdb6c9a1c43f 075c776658190 Author: Alexei Starovoitov Date: Mon Jun 22 17:01:49 2020 -0700 Merge branch 'bpftool-show-pid' Andrii Nakryiko says: ==================== This patch set implements libbpf support for a second kind of special externs, kernel symbols, in addition to existing Kconfig externs. Right now, only untyped (const void) externs are supported, which, in C language, allow only to take their address. In the future, with kernel BTF getting type info about its own global and per-cpu variables, libbpf will extend this support with BTF type info, which will allow to also directly access variable's contents and follow its internal pointers, similarly to how it's possible today in fentry/fexit programs. As a first practical use of this functionality, bpftool gained ability to show PIDs of processes that have open file descriptors for BPF map/program/link/BTF object. It relies on iter/task_file BPF iterator program to extract this information efficiently. There was a bunch of bpftool refactoring (especially Makefile) necessary to generalize bpftool's internal BPF program use. This includes generalization of BPF skeletons support, addition of a vmlinux.h generation, extracting and building minimal subset of bpftool for bootstrapping. v2->v3: - fix sec_btf_id check (Hao); v1->v2: - docs fixes (Quentin); - dual GPL/BSD license for pid_inter.bpf.c (Quentin); - NULL-init kcfg_data (Hao Luo); rfc->v1: - show pids, if supported by kernel, always (Alexei); - switched iter output to binary to support showing process names; - update man pages; - fix few minor bugs in libbpf w.r.t. extern iteration. ==================== Signed-off-by: Alexei Starovoitov commit 075c776658190681d2bf9997306f871d6c8a9b36 Author: Andrii Nakryiko Date: Fri Jun 19 16:17:03 2020 -0700 tools/bpftool: Add documentation and sample output for process info Add statements about bpftool being able to discover process info, holding reference to BPF map, prog, link, or BTF. Show example output as well. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200619231703.738941-10-andriin@fb.com commit d53dee3fe0138610fcce5721bae9414377c41ec3 Author: Andrii Nakryiko Date: Fri Jun 19 16:17:02 2020 -0700 tools/bpftool: Show info for processes holding BPF map/prog/link/btf FDs Add bpf_iter-based way to find all the processes that hold open FDs against BPF object (map, prog, link, btf). bpftool always attempts to discover this, but will silently give up if kernel doesn't yet support bpf_iter BPF programs. Process name and PID are emitted for each process (task group). Sample output for each of 4 BPF objects: $ sudo ./bpftool prog show 2694: cgroup_device tag 8c42dee26e8cd4c2 gpl loaded_at 2020-06-16T15:34:32-0700 uid 0 xlated 648B jited 409B memlock 4096B pids systemd(1) 2907: cgroup_skb name egress tag 9ad187367cf2b9e8 gpl loaded_at 2020-06-16T18:06:54-0700 uid 0 xlated 48B jited 59B memlock 4096B map_ids 2436 btf_id 1202 pids test_progs(2238417), test_progs(2238445) $ sudo ./bpftool map show 2436: array name test_cgr.bss flags 0x400 key 4B value 8B max_entries 1 memlock 8192B btf_id 1202 pids test_progs(2238417), test_progs(2238445) 2445: array name pid_iter.rodata flags 0x480 key 4B value 4B max_entries 1 memlock 8192B btf_id 1214 frozen pids bpftool(2239612) $ sudo ./bpftool link show 61: cgroup prog 2908 cgroup_id 375301 attach_type egress pids test_progs(2238417), test_progs(2238445) 62: cgroup prog 2908 cgroup_id 375344 attach_type egress pids test_progs(2238417), test_progs(2238445) $ sudo ./bpftool btf show 1202: size 1527B prog_ids 2908,2907 map_ids 2436 pids test_progs(2238417), test_progs(2238445) 1242: size 34684B pids bpftool(2258892) Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200619231703.738941-9-andriin@fb.com commit bd9bedf84b87289b9a87eebfe7917e54373e99f9 Author: Andrii Nakryiko Date: Fri Jun 19 16:17:01 2020 -0700 libbpf: Wrap source argument of BPF_CORE_READ macro in parentheses Wrap source argument of BPF_CORE_READ family of macros into parentheses to allow uses like this: BPF_CORE_READ((struct cast_struct *)src, a, b, c); Fixes: 7db3822ab991 ("libbpf: Add BPF_CORE_READ/BPF_CORE_READ_INTO helpers") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200619231703.738941-8-andriin@fb.com commit 05aca6da3b5ab3c5c6003dbbefc9580d9a6a308b Author: Andrii Nakryiko Date: Fri Jun 19 16:17:00 2020 -0700 tools/bpftool: Generalize BPF skeleton support and generate vmlinux.h Adapt Makefile to support BPF skeleton generation beyond single profiler.bpf.c case. Also add vmlinux.h generation and switch profiler.bpf.c to use it. clang-bpf-global-var feature is extended and renamed to clang-bpf-co-re to check for support of preserve_access_index attribute, which, together with BTF for global variables, is the minimum requirement for modern BPF programs. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200619231703.738941-7-andriin@fb.com commit 16e9b187aba60f9014f11a7e95b878850b6c95e5 Author: Andrii Nakryiko Date: Fri Jun 19 16:16:59 2020 -0700 tools/bpftool: Minimize bootstrap bpftool Build minimal "bootstrap mode" bpftool to enable skeleton (and, later, vmlinux.h generation), instead of building almost complete, but slightly different (w/o skeletons, etc) bpftool to bootstrap complete bpftool build. Current approach doesn't scale well (engineering-wise) when adding more BPF programs to bpftool and other complicated functionality, as it requires constant adjusting of the code to work in both bootstrapped mode and normal mode. So it's better to build only minimal bpftool version that supports only BPF skeleton code generation and BTF-to-C conversion. Thankfully, this is quite easy to accomplish due to internal modularity of bpftool commands. This will also allow to keep adding new functionality to bpftool in general, without the need to care about bootstrap mode for those new parts of bpftool. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200619231703.738941-6-andriin@fb.com commit a479b8ce4ed1457f814be6f67a8447a9af38f235 Author: Andrii Nakryiko Date: Fri Jun 19 16:16:58 2020 -0700 tools/bpftool: Move map/prog parsing logic into common Move functions that parse map and prog by id/tag/name/etc outside of map.c/prog.c, respectively. These functions are used outside of those files and are generic enough to be in common. This also makes heavy-weight map.c and prog.c more decoupled from the rest of bpftool files and facilitates more lightweight bootstrap bpftool variant. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20200619231703.738941-5-andriin@fb.com commit b7ddfab20a6af3a0e366000eada63adf6a7683e7 Author: Andrii Nakryiko Date: Fri Jun 19 16:16:57 2020 -0700 selftests/bpf: Add __ksym extern selftest Validate libbpf is able to handle weak and strong kernel symbol externs in BPF code correctly. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Hao Luo Link: https://lore.kernel.org/bpf/20200619231703.738941-4-andriin@fb.com commit 1c0c7074fefd769f62dda155e881ca90c9e3e75a Author: Andrii Nakryiko Date: Fri Jun 19 16:16:56 2020 -0700 libbpf: Add support for extracting kernel symbol addresses Add support for another (in addition to existing Kconfig) special kind of externs in BPF code, kernel symbol externs. Such externs allow BPF code to "know" kernel symbol address and either use it for comparisons with kernel data structures (e.g., struct file's f_op pointer, to distinguish different kinds of file), or, with the help of bpf_probe_user_kernel(), to follow pointers and read data from global variables. Kernel symbol addresses are found through /proc/kallsyms, which should be present in the system. Currently, such kernel symbol variables are typeless: they have to be defined as `extern const void ` and the only operation you can do (in C code) with them is to take its address. Such extern should reside in a special section '.ksyms'. bpf_helpers.h header provides __ksym macro for this. Strong vs weak semantics stays the same as with Kconfig externs. If symbol is not found in /proc/kallsyms, this will be a failure for strong (non-weak) extern, but will be defaulted to 0 for weak externs. If the same symbol is defined multiple times in /proc/kallsyms, then it will be error if any of the associated addresses differs. In that case, address is ambiguous, so libbpf falls on the side of caution, rather than confusing user with randomly chosen address. In the future, once kernel is extended with variables BTF information, such ksym externs will be supported in a typed version, which will allow BPF program to read variable's contents directly, similarly to how it's done for fentry/fexit input arguments. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Hao Luo Link: https://lore.kernel.org/bpf/20200619231703.738941-3-andriin@fb.com commit 2e33efe32e019328916ce653dc1265d637261993 Author: Andrii Nakryiko Date: Fri Jun 19 16:16:55 2020 -0700 libbpf: Generalize libbpf externs support Switch existing Kconfig externs to be just one of few possible kinds of more generic externs. This refactoring is in preparation for ksymbol extern support, added in the follow up patch. There are no functional changes intended. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Hao Luo Link: https://lore.kernel.org/bpf/20200619231703.738941-2-andriin@fb.com commit 19430ede90fdd40efaed4995d98d365623c93072 Merge: 73f782d523ecf 13bd5d025602b Author: David S. Miller Date: Mon Jun 22 16:32:11 2020 -0700 Merge branch 'mlxsw-Offload-TC-action-pedit-munge-tcp-udp-sport-dport' Ido Schimmel says: ==================== mlxsw: Offload TC action pedit munge tcp/udp sport/dport Petr says: On Spectrum-2 and Spectrum-3, it is possible to overwrite L4 port number of a TCP or UDP packet in the ACL engine. That corresponds to the pedit munges of tcp and udp sport resp. dport fields. Offload these munges on the systems where they are supported. The current offloading code assumes that all systems support the same set of fields. This now changes, so in patch #1 first split handling of pedit munges by chip type. The analysis of which packet field a given munge describes is kept generic. Patch #2 introduces the new flexible action fields. Patch #3 then adds the new pedit fields, and dispatches on them on Spectrum>1. Patch #4 adds a forwarding selftest for pedit dsfield, applicable to SW as well as HW datapaths. ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 13bd5d025602bb5374f54e144dec577b74718493 Author: Petr Machata Date: Sun Jun 21 11:34:36 2020 +0300 selftests: forwarding: Add a test for pedit munge tcp, udp sport, dport Add a test that checks that pedit adjusts port numbers of tcp and udp packets. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ce10d7d4ad08396055a38d78b87a144307fc14a9 Author: Petr Machata Date: Sun Jun 21 11:34:35 2020 +0300 mlxsw: spectrum_acl: Support FLOW_ACTION_MANGLE for TCP, UDP ports Spectrum-2 supports an ACL action L4_PORT, which allows TCP and UDP source and destination port number change. Offload suitable mangles to this action. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit faad0525c0f4062d4edcf0eb0663ed9685fc38dc Author: Petr Machata Date: Sun Jun 21 11:34:34 2020 +0300 mlxsw: core_acl_flex_actions: Add L4_PORT_ACTION Add fields related to L4_PORT_ACTION, which is used for changing of TCP and UDP port numbers. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 3cc9a15a0bb1bde93d5430facda3f3e07c2d3d87 Author: Petr Machata Date: Sun Jun 21 11:34:33 2020 +0300 mlxsw: spectrum: Split handling of pedit mangle by chip type Certain ACL actions are only available on some Spectrum revisions. In particular, L4_PORT_ACTION is not available on Spectrum-1. Introduce a new ops struct intended to hold these differences, mlxsw_sp_rulei_ops. Prime it with a sole member, act_mangle_field, meant for handling of pedit mangles. Create two ops structures, one for Spectrum-1, the other for Spectrum-2 and above. Add callbacks for act_mangle_field and dispatch to the common handler. Invoke mlxsw_sp_rulei_ops.act_mangle_field from the field mangler instead of calling the common handler directly. Signed-off-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 73f782d523ecf4a4ba1531266a02c53ab359c85b Merge: 3b87cfefab406 f59babf95ef96 Author: David S. Miller Date: Mon Jun 22 16:28:34 2020 -0700 Merge branch 'Add-Marvell-88E1340S-88E1548P-support' Maxim Kochetkov says: ==================== Add Marvell 88E1340S, 88E1548P support This patch series add new PHY id support. Russell King asked to use single style for referencing functions. ==================== Signed-off-by: David S. Miller commit f59babf95ef969a18744082ee16e4dfd17743c0b Author: Maxim Kochetkov Date: Sun Jun 21 10:59:52 2020 +0300 net: phy: marvell: Add Marvell 88E1548P support Add support for this new phy ID. Signed-off-by: Maxim Kochetkov Signed-off-by: David S. Miller commit a602ea86e9f0d82f5c7ba1d3f7487d4097380b96 Author: Maxim Kochetkov Date: Sun Jun 21 10:59:51 2020 +0300 net: phy: marvell: Add Marvell 88E1340S support Add support for this new phy ID. Signed-off-by: Maxim Kochetkov Signed-off-by: David S. Miller commit ef0f9545cbf160591df2ff245f539bdcff692992 Author: Maxim Kochetkov Date: Sun Jun 21 10:59:50 2020 +0300 net: phy: marvell: use a single style for referencing functions The kernel in general does not use &func referencing format. Signed-off-by: Maxim Kochetkov Signed-off-by: David S. Miller commit 3b87cfefab40604306e5fe6eb4b8c5ec99a865d3 Merge: 8878adba6ab54 288302dab34ec Author: David S. Miller Date: Mon Jun 22 16:26:02 2020 -0700 Merge branch 'r8169-mark-device-as-detached-in-PCI-D3-and-improve-locking' Heiner Kallweit says: ==================== r8169: mark device as detached in PCI D3 and improve locking Mark the netdevice as detached whenever parent is in PCI D3hot and not accessible. This mainly applies to runtime-suspend state. In addition take RTNL lock in suspend calls, this allows to remove the driver-specific mutex and improve PM callbacks in general. ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 288302dab34ece4993ea3dd011299f406b78f237 Author: Heiner Kallweit Date: Sat Jun 20 22:39:35 2020 +0200 r8169: improve rtl8169_runtime_resume Simplify rtl8169_runtime_resume() by calling rtl8169_resume(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 06a14ab852fbd33b237b1bbe6515e9cbd8e3800e Author: Heiner Kallweit Date: Sat Jun 20 22:38:55 2020 +0200 r8169: remove driver-specific mutex Now that the critical sections are protected with RTNL lock, we don't need a separate mutex any longer. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit abe5fc42f9ce942c96d50bf6b44886b70d5759ec Author: Heiner Kallweit Date: Sat Jun 20 22:38:24 2020 +0200 r8169: use RTNL to protect critical sections Most relevant ops (open, close, ethtool ops) are protected with RTNL lock by net core. Make sure that such ops can't be interrupted by e.g. (runtime-)suspending by taking the RTNL lock in suspend ops and the PCI error handler. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 567ca57faa6266da931679fd4c4eb9863855f804 Author: Heiner Kallweit Date: Sat Jun 20 22:37:50 2020 +0200 r8169: add rtl8169_up Factor out bringing device up to a new function rtl8169_up(), similar to rtl8169_down() for bringing the device down. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit ec2f204bddb5f9b7819507b9b5df5ca6197ce912 Author: Heiner Kallweit Date: Sat Jun 20 22:37:01 2020 +0200 r8169: remove no longer needed checks for device being runtime-active Because the netdevice is marked as detached now when parent is not accessible we can remove quite some checks. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 476c4f5de3689a39a097ad20120ca5653a52dad4 Author: Heiner Kallweit Date: Sat Jun 20 22:36:26 2020 +0200 r8169: mark device as not present when in PCI D3 Mark the netdevice as detached whenever we go into PCI D3hot. This allows to remove some checks e.g. from ethtool ops because dev_ethtool() checks for netif_device_present() in the beginning. In this context move waking up the queue out of rtl_reset_work() because in cases where netif_device_attach() is called afterwards the queue should be woken up by the latter function only. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit bd869245a3dcca1c8a77dfade7d3dc69a68365df Author: Heiner Kallweit Date: Sat Jun 20 22:35:42 2020 +0200 net: core: try to runtime-resume detached device in __dev_open A netdevice may be marked as detached because the parent is runtime-suspended and not accessible whilst interface or link is down. An example are PCI network devices that go into PCI D3hot, see e.g. __igc_shutdown() or rtl8169_net_suspend(). If netdevice is down and marked as detached we can only open it if we runtime-resume it before __dev_open() calls netif_device_present(). Therefore, if netdevice is detached, try to runtime-resume the parent and only return with an error if it's still detached. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 8878adba6ab5414c36b693e09fe46c4416072cc7 Merge: 58d844e8604c2 a4f63342d03d2 Author: David S. Miller Date: Mon Jun 22 16:24:10 2020 -0700 Merge branch 'prepare-dwmac-meson8b-for-G12A-specific-initialization' Martin Blumenstingl says: ==================== prepare dwmac-meson8b for G12A specific initialization Some users are reporting that RGMII (and sometimes also RMII) Ethernet is not working for them on G12A/G12B/SM1 boards. Upon closer inspection of the vendor code for these SoCs new register bits are found. It's not clear yet how these registers work. Add a new compatible string as the first preparation step to improve Ethernet support on these SoCs. ==================== Signed-off-by: David S. Miller commit a4f63342d03d2dfb61d9e52f30d084d0780aaddd Author: Martin Blumenstingl Date: Sat Jun 20 21:26:41 2020 +0200 net: stmmac: dwmac-meson8b: add a compatible string for G12A SoCs Amlogic Meson G12A, G12B and SM1 have the same (at least as far as we know at the time of writing) PRG_ETHERNET glue register implementation. This implementation however is slightly different from AXG as it now has an undocument "auto cali idx val" register in PRG_ETH1[17:16] which seems to be related to RGMII Ethernet. Add a new compatible string for G12A SoCs so the logic for this new register can be implemented in the future. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller commit 3efdb92426bf479aa87d38a55b66c81d2a60f41b Author: Martin Blumenstingl Date: Sat Jun 20 21:26:40 2020 +0200 dt-bindings: net: dwmac-meson: Add a compatible string for G12A onwards Amlogic Meson G12A, G12B and SM1 have the same (at least as far as we know at the time of writing) PRG_ETHERNET glue register implementation. This implementation however is slightly different from AXG as it now has an undocument "auto cali idx val" register in PRG_ETH1[17:16] which seems to be related to RGMII Ethernet. Add a compatible string for G12A and newer so the new registers can be used. Signed-off-by: Martin Blumenstingl Signed-off-by: David S. Miller commit 58d844e8604c29369236a6806846e1022995d055 Merge: 406fcb5baeb3f 9bf88b9fc8a4a Author: David S. Miller Date: Mon Jun 22 16:15:22 2020 -0700 Merge branch 'devlink-Add-board-serial_number-field-to-info_get-cb' Vasundhara Volam says: ==================== devlink: Add board.serial_number field to info_get cb. This patchset adds support for board.serial_number to devlink info_get cb and also use it in bnxt_en driver. Sample output: $ devlink dev info pci/0000:af:00.1 pci/0000:af:00.1: driver bnxt_en serial_number 00-10-18-FF-FE-AD-1A-00 board.serial_number 433551F+172300000 versions: fixed: board.id 7339763 Rev 0. asic.id 16D7 asic.rev 1 running: fw 216.1.216.0 fw.psid 0.0.0 fw.mgmt 216.1.192.0 fw.mgmt.api 1.10.1 fw.ncsi 0.0.0.0 fw.roce 216.1.16.0 v2: - Modify board_serial_number to board.serial_number for maintaining consistency. - Combine 2 lines in second patchset as column limit is 100 now ==================== Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9bf88b9fc8a4a8dd38992a7a065e459c645c9545 Author: Vasundhara Volam Date: Sat Jun 20 22:01:57 2020 +0530 bnxt_en: Add board.serial_number field to info_get cb Add board.serial_number field info to info_get cb via devlink, if driver can fetch the information from the device. Cc: Jiri Pirko Cc: Jakub Kicinski Signed-off-by: Vasundhara Volam Reviewed-by: Michael Chan Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit b5872cd0e823e4cb50b3a75cd9522167eeb676a2 Author: Vasundhara Volam Date: Sat Jun 20 22:01:56 2020 +0530 devlink: Add support for board.serial_number to info_get cb. Board serial number is a serial number, often available in PCI *Vital Product Data*. Also, update devlink-info.rst documentation file. Cc: Jiri Pirko Cc: Jakub Kicinski Signed-off-by: Vasundhara Volam Reviewed-by: Michael Chan Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit ccf2ed1e9641bcb12f078241c4ed90e6e250f58a Author: Jeffrey Hugo Date: Thu May 28 11:47:52 2020 -0700 arm64: defconfig: Add CONFIG_QCOM_RPMPD RPMPD provides us the CS/MX power domains needed to boot the modem subsystem on msm8998 for wifi. Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20200528184752.4747-1-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson commit 406fcb5baeb3ffde07230380f17a147eb2c88f84 Merge: 717dd44c5b772 13c832a41df2a Author: David S. Miller Date: Mon Jun 22 16:01:29 2020 -0700 Merge branch 'Cosmetic-cleanup-in-SJA1105-DSA-driver' Vladimir Oltean says: ==================== Cosmetic cleanup in SJA1105 DSA driver This removes the sparse warnings from the sja1105 driver and makes some structures constant. ==================== Signed-off-by: David S. Miller commit 13c832a41df2af7f7c435ab2dac611099b88d97a Author: Vladimir Oltean Date: Sat Jun 20 20:18:32 2020 +0300 net: dsa: sja1105: make the instantiations of struct sja1105_info constant Since struct sja1105_private only holds a const pointer to one of these structures based on device tree compatible string, the structures themselves can be made const. Also add an empty line between each structure definition, to appease checkpatch. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 718e44b6ea1c6abbd7ffc62cc16af5feca5ac528 Author: Vladimir Oltean Date: Sat Jun 20 20:18:31 2020 +0300 net: dsa: sja1105: make config table operation structures constant The per-chip instantiations of struct sja1105_table_ops and struct sja1105_dynamic_table_ops can be made constant, so do that. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit be3fb56d6ad163947f541f9e6210fa37fb3b5e6d Author: Vladimir Oltean Date: Sat Jun 20 20:18:30 2020 +0300 net: dsa: sja1105: remove empty structures from config table ops Sparse is complaining and giving the following warning message: 'Using plain integer as NULL pointer'. This is not what's going on, instead {0} is used as a zero initializer for the structure members, to indicate that the particular chip revision does not support those particular config tables. But since the config tables are declared globally, the unpopulated elements are zero-initialized anyway. So, to make sparse shut up, let's remove the zero initializers. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 717dd44c5b772b879b6fa55e0cd17b31ff010bbb Merge: 2b3445e814570 a997b33701745 Author: David S. Miller Date: Mon Jun 22 15:54:34 2020 -0700 Merge branch 'net-dsa-qca8k-Improve-SGMII-interface-handling' Jonathan McDowell says: ==================== net: dsa: qca8k: Improve SGMII interface handling This 3 patch series migrates the qca8k switch driver over to PHYLINK, and then adds the SGMII clean-ups (i.e. the missing initialisation) on top of that as a second patch. The final patch is a simple spelling fix in a comment. As before, tested with a device where the CPU connection is RGMII (i.e. the common current use case) + one where the CPU connection is SGMII. I don't have any devices where the SGMII interface is brought out to something other than the CPU. v5: - Move spelling fix to separate patch - Use ds directly rather than ds->priv v4: - Enable pcs_poll so we keep phylink updated when doing in-band negotiation - Explicitly check for PHY_INTERFACE_MODE_1000BASEX when setting SGMII port mode. - Address Vladimir's review comments v3: - Move phylink changes to separate patch - Address rmk review comments v2: - Switch to phylink - Avoid need for device tree configuration options ==================== Signed-off-by: David S. Miller commit a997b33701745523981d715fbf80cbc000dc229b Author: Jonathan McDowell Date: Sat Jun 20 11:31:16 2020 +0100 net: dsa: qca8k: Minor comment spelling fix Signed-off-by: Jonathan McDowell Signed-off-by: David S. Miller commit f6dadd559886f8cc12d68e98ad77d1da08bfe978 Author: Jonathan McDowell Date: Sat Jun 20 11:31:05 2020 +0100 net: dsa: qca8k: Improve SGMII interface handling This patch improves the handling of the SGMII interface on the QCA8K devices. Previously the driver did no configuration of the port, even if it was selected. We now configure it up in the appropriate PHY/MAC/Base-X mode depending on what phylink tells us we are connected to and ensure it is enabled. Tested with a device where the CPU connection is RGMII (i.e. the common current use case) + one where the CPU connection is SGMII. I don't have any devices where the SGMII interface is brought out to something other than the CPU. Signed-off-by: Jonathan McDowell Signed-off-by: David S. Miller commit b3591c2a366167b5ae985dc3c88a55db3d770cb8 Author: Jonathan McDowell Date: Sat Jun 20 11:30:32 2020 +0100 net: dsa: qca8k: Switch to PHYLINK instead of PHYLIB Update the driver to use the new PHYLINK callbacks, removing the legacy adjust_link callback. Signed-off-by: Jonathan McDowell Signed-off-by: David S. Miller commit 2b3445e8145700b53530228f332ee40e6d9c916b Merge: 389cc2f326fd0 18cb261afd7bf Author: David S. Miller Date: Mon Jun 22 15:38:57 2020 -0700 Merge branch 'bonding-initial-support-for-hardware-crypto-offload' Jarod Wilson says: ==================== bonding: initial support for hardware crypto offload This is an initial functional implementation for doing pass-through of hardware encryption from bonding device to capable slaves, in active-backup bond setups. This was developed and tested using ixgbe-driven Intel x520 interfaces with libreswan and a transport mode connection, primarily using netperf, with assorted connection failures forced during transmission. The failover works quite well in my testing, and overall performance is right on par with offload when running on a bare interface, no bond involved. Caveats: this is ONLY enabled for active-backup, because I'm not sure how one would manage multiple offload handles for different devices all running at the same time in the same xfrm, and it relies on some minor changes to both the xfrm code and slave device driver code to get things to behave, and I don't have immediate access to any other hardware that could function similarly, but the NIC driver changes are minimal and straight-forward enough that I've included what I think ought to be enough for mlx5 devices too. v2: reordered patches, switched (back) to using CONFIG_XFRM_OFFLOAD to wrap the code additions and wrapped overlooked additions. v3: rebase w/net-next open, add proper cc list to cover letter ==================== Signed-off-by: David S. Miller commit 18cb261afd7bf50134e5ccacc5ec91ea16efadd4 Author: Jarod Wilson Date: Fri Jun 19 10:31:55 2020 -0400 bonding: support hardware encryption offload to slaves Currently, this support is limited to active-backup mode, as I'm not sure about the feasilibity of mapping an xfrm_state's offload handle to multiple hardware devices simultaneously, and we rely on being able to pass some hints to both the xfrm and NIC driver about whether or not they're operating on a slave device. I've tested this atop an Intel x520 device (ixgbe) using libreswan in transport mode, succesfully achieving ~4.3Gbps throughput with netperf (more or less identical to throughput on a bare NIC in this system), as well as successful failover and recovery mid-netperf. v2: just use CONFIG_XFRM_OFFLOAD for wrapping, isolate more code with it CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: "David S. Miller" CC: Jeff Kirsher CC: Jakub Kicinski CC: Steffen Klassert CC: Herbert Xu CC: netdev@vger.kernel.org CC: intel-wired-lan@lists.osuosl.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller commit bf3a058de5728a23237b1649bedba668c2bf3c79 Author: Jarod Wilson Date: Fri Jun 19 10:31:54 2020 -0400 mlx5: become aware of when running as a bonding slave I've been unable to get my hands on suitable supported hardware to date, but I believe this ought to be all that is needed to enable the mlx5 driver to also work with bonding active-backup crypto offload passthru. CC: Boris Pismenny CC: Saeed Mahameed CC: Leon Romanovsky CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: "David S. Miller" CC: Jeff Kirsher CC: Jakub Kicinski CC: Steffen Klassert CC: Herbert Xu CC: netdev@vger.kernel.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller commit 0dea9ea97e4615f7ed2cc129d4caaa6c8102d349 Author: Jarod Wilson Date: Fri Jun 19 10:31:53 2020 -0400 ixgbe_ipsec: become aware of when running as a bonding slave Slave devices in a bond doing hardware encryption also need to be aware that they're slaves, so we operate on the slave instead of the bonding master to do the actual hardware encryption offload bits. CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: "David S. Miller" CC: Jeff Kirsher CC: Jakub Kicinski CC: Steffen Klassert CC: Herbert Xu CC: netdev@vger.kernel.org CC: intel-wired-lan@lists.osuosl.org Acked-by: Jeff Kirsher Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller commit 272c2330adc9c68284cb0066719160c24bfe605f Author: Jarod Wilson Date: Fri Jun 19 10:31:52 2020 -0400 xfrm: bail early on slave pass over skb This is prep work for initial support of bonding hardware encryption pass-through support. The bonding driver will fill in the slave_dev pointer, and we use that to know not to skb_push() again on a given skb that was already processed on the bond device. CC: Jay Vosburgh CC: Veaceslav Falico CC: Andy Gospodarek CC: "David S. Miller" CC: Jeff Kirsher CC: Jakub Kicinski CC: Steffen Klassert CC: Herbert Xu CC: netdev@vger.kernel.org CC: intel-wired-lan@lists.osuosl.org Signed-off-by: Jarod Wilson Signed-off-by: David S. Miller commit 389cc2f326fd095edc1c09d7713ac9f9dd591f8a Merge: 29a720c1042f4 330077d14de12 Author: David S. Miller Date: Mon Jun 22 15:29:19 2020 -0700 Merge branch 'devlink-Support-get-set-mac-address-of-a-port-function' Parav Pandit says: ==================== devlink: Support get,set mac address of a port function Currently, ip link set dev vf has below few limitations. 1. Command is limited to set VF parameters only. It cannot set the default MAC address for the PCI PF. 2. It can be set only on system where PCI SR-IOV capability exists. In smartnic based system, eswitch of a NIC resides on a different embedded cpu which has the VF and PF representors for the SR-IOV functions of a host system in which this smartnic is plugged-in. 3. It cannot setup the function attributes of sub-function described in detail in comprehensive RFC [1] and [2]. This series covers the first small part to let user query and set MAC address (hardware address) of a PCI PF/VF which is represented by devlink port pcipf, pcivf port flavours respectively. Whenever a devlink port manages a function connected to a devlink port, it allows to query and set its hardware address. Driver implements necessary get/set callback functions if it supports port function for a given port type. Patch summary: Patch-1 Prepares devlink port fill routines for extack Patch-2 and 3 extended devlink interface to get/set port function attributes, mainly hardware address to start with. Patch-2 Extended port dump command to query port function hardware address Patch-3 Introduces a command to set the hardware address of a port function Patch-4 to 9 refactors and implement devlink callbacks in mlx5_core driver. Patch-4 Constify the mac address pointer in set routines Patch-5 Introduces eswich check helper to use in devlink facing callbacks Patch-6 Moves port index, port number conversion routine to eswitch header file Patch-7 Implements port function query devlink callback Patch-8 Refactors mac address setting routine to uniformly use state_lock Patch-9 Implements port function set devlink callback [1] https://lore.kernel.org/netdev/20200519092258.GF4655@nanopsycho/ [2] https://marc.info/?l=linux-netdev&m=158555928517777&w=2 ==================== Signed-off-by: David S. Miller commit 330077d14de12df5697ef192a88b11cc2166cd47 Author: Parav Pandit Date: Fri Jun 19 03:32:55 2020 +0000 net/mlx5: E-switch, Supporting setting devlink port function mac address Enable user to set mac address of the PCI PF and VF port function. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 1094795ce49d75e99b0f8853dfd5e622a5743732 Author: Parav Pandit Date: Fri Jun 19 03:32:54 2020 +0000 net/mlx5: Split mac address setting function for using state_lock Refactor mac address setting function to let caller hold the necessary state_lock mutex, so that subsequent patch and use this helper routine. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: David S. Miller commit f099fde16db3d2594a54ba8c94ce9fa3557aa3e1 Author: Parav Pandit Date: Fri Jun 19 03:32:53 2020 +0000 net/mlx5: E-switch, Support querying port function mac address Support querying mac address of the eswitch devlink port function. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 443bf36eb543238cbd6399d658839e2e17c8dab2 Author: Parav Pandit Date: Fri Jun 19 03:32:52 2020 +0000 net/mlx5: Move helper to eswitch layer To use port number to port index conversion at eswitch level, move it to eswitch header. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: David S. Miller commit bd93975353d534175c03a6bc8928a2443a7d8d34 Author: Parav Pandit Date: Fri Jun 19 03:32:51 2020 +0000 net/mlx5: E-switch, Introduce and use eswitch support check helper Introduce an helper routine to get esw from a devlink device and use it at eswitch callbacks and in subsequent patch. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: David S. Miller commit fa997825ebeca820f4001a9e6d285345d3a535ba Author: Parav Pandit Date: Fri Jun 19 03:32:50 2020 +0000 net/mlx5: Constify mac address pointer Since none of the functions need to modify the input mac address, constify them. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: David S. Miller commit a1e8ae907c8d67f57432190bb742802a76516b00 Author: Parav Pandit Date: Fri Jun 19 03:32:49 2020 +0000 net/devlink: Support setting hardware address of port function PCI PF and VF devlink port can manage the function represented by a devlink port. Allow users to set port function's hardware address. Example of a PCI VF port which supports a port function: $ devlink port show pci/0000:06:00.0/2 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 function: hw_addr 00:00:00:00:00:00 $ devlink port function set pci/0000:06:00.0/2 hw_addr 00:11:22:33:44:55 $ devlink port show pci/0000:06:00.0/2 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 function: hw_addr 00:11:22:33:44:55 Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 2a916ecc405686c1d86f632281bc06aa75ebae4e Author: Parav Pandit Date: Fri Jun 19 03:32:48 2020 +0000 net/devlink: Support querying hardware address of port function PCI PF and VF devlink port can manage the function represented by a devlink port. Enable users to query port function's hardware address. Example of a PCI VF port which supports a port function: $ devlink port show pci/0000:06:00.0/2 pci/0000:06:00.0/2: type eth netdev enp6s0pf0vf1 flavour pcivf pfnum 0 vfnum 1 function: hw_addr 00:11:22:33:44:66 $ devlink port show pci/0000:06:00.0/2 -jp { "port": { "pci/0000:06:00.0/2": { "type": "eth", "netdev": "enp6s0pf0vf1", "flavour": "pcivf", "pfnum": 0, "vfnum": 1, "function": { "hw_addr": "00:11:22:33:44:66" } } } } Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit a829eb0d5dc5415bef380cf53e09a0123e716951 Author: Parav Pandit Date: Fri Jun 19 03:32:47 2020 +0000 net/devlink: Prepare devlink port functions to fill extack Prepare devlink port related functions to optionally fill up the extack information which will be used in subsequent patch by port function attribute(s). Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 1bdb6c9a1c43fdf9b83b2331dfc6229bd2e71d9b Author: Andrii Nakryiko Date: Sat Jun 20 23:21:12 2020 -0700 libbpf: Add a bunch of attribute getters/setters for map definitions Add a bunch of getter for various aspects of BPF map. Some of these attribute (e.g., key_size, value_size, type, etc) are available right now in struct bpf_map_def, but this patch adds getter allowing to fetch them individually. bpf_map_def approach isn't very scalable, when ABI stability requirements are taken into account. It's much easier to extend libbpf and add support for new features, when each aspect of BPF map has separate getter/setter. Getters follow the common naming convention of not explicitly having "get" in its name: bpf_map__type() returns map type, bpf_map__key_size() returns key_size. Setters, though, explicitly have set in their name: bpf_map__set_type(), bpf_map__set_key_size(). This patch ensures we now have a getter and a setter for the following map attributes: - type; - max_entries; - map_flags; - numa_node; - key_size; - value_size; - ifindex. bpf_map__resize() enforces unnecessary restriction of max_entries > 0. It is unnecessary, because libbpf actually supports zero max_entries for some cases (e.g., for PERF_EVENT_ARRAY map) and treats it specially during map creation time. To allow setting max_entries=0, new bpf_map__set_max_entries() setter is added. bpf_map__resize()'s behavior is preserved for backwards compatibility reasons. Map ifindex getter is added as well. There is a setter already, but no corresponding getter. Fix this assymetry as well. bpf_map__set_ifindex() itself is converted from void function into error-returning one, similar to other setters. The only error returned right now is -EBUSY, if BPF map is already loaded and has corresponding FD. One lacking attribute with no ability to get/set or even specify it declaratively is numa_node. This patch fixes this gap and both adds programmatic getter/setter, as well as adds support for numa_node field in BTF-defined map. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20200621062112.3006313-1-andriin@fb.com commit 73edcd38d7720bb6a761966ea14c0bc64e95dc26 Author: Maulik Shah Date: Thu Jun 18 18:35:53 2020 +0530 soc: qcom: rpmh: Update rpmh_invalidate function to return void Currently rpmh_invalidate() always returns success. Update its return type to void. Reviewed-by: Lina Iyer Reviewed-by: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Maulik Shah Link: https://lore.kernel.org/r/1592485553-29163-1-git-send-email-mkshah@codeaurora.org Signed-off-by: Bjorn Andersson commit 681b0912384446cc691dd50ef8bb132f5f85ce5c Author: Lina Iyer Date: Fri May 29 16:32:38 2020 +0530 soc: qcom: rpmh: Allow RPMH on ARM SoC Remove config restriction for RPMH on ARM64 platforms only. Signed-off-by: Lina Iyer Link: https://lore.kernel.org/r/1590750158-20661-1-git-send-email-mkshah@codeaurora.org Signed-off-by: Bjorn Andersson commit 8a25c4be583d8a9e38fbadcc49d4de32b1aa8906 Author: Jani Nikula Date: Thu Jun 18 18:04:02 2020 +0300 drm/i915/params: switch to device specific parameters Start using device specific parameters instead of module parameters for most things. The module parameters become the immutable initial values for i915 parameters. The device specific parameters in i915->params start life as a copy of i915_modparams. Any later changes are only reflected in the debugfs. The stragglers are: * i915.force_probe and i915.modeset. Needed before dev_priv is available. This is fine because the parameters are read-only and never modified. * i915.verbose_state_checks. Passing dev_priv to I915_STATE_WARN and I915_STATE_WARN_ON would result in massive and ugly churn. This is handled by not exposing the parameter via debugfs, and leaving the parameter writable in sysfs. This may be fixed up in follow-up work. * i915.inject_probe_failure. Only makes sense in terms of the module, not the device. This is handled by not exposing the parameter via debugfs. v2: Fix uc i915 lookup code (Michał Winiarski) Cc: Juha-Pekka Heikkilä Cc: Venkata Sandeep Dhanalakota Cc: Michał Winiarski Reviewed-by: Rodrigo Vivi Acked-by: Michał Winiarski Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/20200618150402.14022-1-jani.nikula@intel.com commit b1b53d413f16c6b5078edb127e660e67332e4d2f Author: Andrey Ignatov Date: Fri Jun 19 14:11:45 2020 -0700 selftests/bpf: Test access to bpf map pointer Add selftests to test access to map pointers from bpf program for all map types except struct_ops (that one would need additional work). verifier test focuses mostly on scenarios that must be rejected. prog_tests test focuses on accessing multiple fields both scalar and a nested struct from bpf program and verifies that those fields have expected values. Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/139a6a17f8016491e39347849b951525335c6eb4.1592600985.git.rdna@fb.com commit 2872e9ac33a4440173418147351ed4f93177e763 Author: Andrey Ignatov Date: Fri Jun 19 14:11:44 2020 -0700 bpf: Set map_btf_{name, id} for all map types Set map_btf_name and map_btf_id for all map types so that map fields can be accessed by bpf programs. Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/a825f808f22af52b018dbe82f1c7d29dab5fc978.1592600985.git.rdna@fb.com commit 41c48f3a98231738c5ce79f6f2aa6e40ba924d18 Author: Andrey Ignatov Date: Fri Jun 19 14:11:43 2020 -0700 bpf: Support access to bpf map fields There are multiple use-cases when it's convenient to have access to bpf map fields, both `struct bpf_map` and map type specific struct-s such as `struct bpf_array`, `struct bpf_htab`, etc. For example while working with sock arrays it can be necessary to calculate the key based on map->max_entries (some_hash % max_entries). Currently this is solved by communicating max_entries via "out-of-band" channel, e.g. via additional map with known key to get info about target map. That works, but is not very convenient and error-prone while working with many maps. In other cases necessary data is dynamic (i.e. unknown at loading time) and it's impossible to get it at all. For example while working with a hash table it can be convenient to know how much capacity is already used (bpf_htab.count.counter for BPF_F_NO_PREALLOC case). At the same time kernel knows this info and can provide it to bpf program. Fill this gap by adding support to access bpf map fields from bpf program for both `struct bpf_map` and map type specific fields. Support is implemented via btf_struct_access() so that a user can define their own `struct bpf_map` or map type specific struct in their program with only necessary fields and preserve_access_index attribute, cast a map to this struct and use a field. For example: struct bpf_map { __u32 max_entries; } __attribute__((preserve_access_index)); struct bpf_array { struct bpf_map map; __u32 elem_size; } __attribute__((preserve_access_index)); struct { __uint(type, BPF_MAP_TYPE_ARRAY); __uint(max_entries, 4); __type(key, __u32); __type(value, __u32); } m_array SEC(".maps"); SEC("cgroup_skb/egress") int cg_skb(void *ctx) { struct bpf_array *array = (struct bpf_array *)&m_array; struct bpf_map *map = (struct bpf_map *)&m_array; /* .. use map->max_entries or array->map.max_entries .. */ } Similarly to other btf_struct_access() use-cases (e.g. struct tcp_sock in net/ipv4/bpf_tcp_ca.c) the patch allows access to any fields of corresponding struct. Only reading from map fields is supported. For btf_struct_access() to work there should be a way to know btf id of a struct that corresponds to a map type. To get btf id there should be a way to get a stringified name of map-specific struct, such as "bpf_array", "bpf_htab", etc for a map type. Two new fields are added to `struct bpf_map_ops` to handle it: * .map_btf_name keeps a btf name of a struct returned by map_alloc(); * .map_btf_id is used to cache btf id of that struct. To make btf ids calculation cheaper they're calculated once while preparing btf_vmlinux and cached same way as it's done for btf_id field of `struct bpf_func_proto` While calculating btf ids, struct names are NOT checked for collision. Collisions will be checked as a part of the work to prepare btf ids used in verifier in compile time that should land soon. The only known collision for `struct bpf_htab` (kernel/bpf/hashtab.c vs net/core/sock_map.c) was fixed earlier. Both new fields .map_btf_name and .map_btf_id must be set for a map type for the feature to work. If neither is set for a map type, verifier will return ENOTSUPP on a try to access map_ptr of corresponding type. If just one of them set, it's verifier misconfiguration. Only `struct bpf_array` for BPF_MAP_TYPE_ARRAY and `struct bpf_htab` for BPF_MAP_TYPE_HASH are supported by this patch. Other map types will be supported separately. The feature is available only for CONFIG_DEBUG_INFO_BTF=y and gated by perfmon_capable() so that unpriv programs won't have access to bpf map fields. Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/6479686a0cd1e9067993df57b4c3eef0e276fec9.1592600985.git.rdna@fb.com commit 032a6b3565489a26d6841eefa1fc29d95fc80c66 Author: Andrey Ignatov Date: Fri Jun 19 14:11:42 2020 -0700 bpf: Rename bpf_htab to bpf_shtab in sock_map There are two different `struct bpf_htab` in bpf code in the following files: - kernel/bpf/hashtab.c - net/core/sock_map.c It makes it impossible to find proper btf_id by name = "bpf_htab" and kind = BTF_KIND_STRUCT what is needed to support access to map ptr so that bpf program can access `struct bpf_htab` fields. To make it possible one of the struct-s should be renamed, sock_map.c looks like a better candidate for rename since it's specialized version of hashtab. Rename it to bpf_shtab ("sh" stands for Sock Hash). Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/c006a639e03c64ca50fc87c4bb627e0bfba90f4e.1592600985.git.rdna@fb.com commit a2d0d62f4d9e3546134ba08e102ca7decd4ed836 Author: Andrey Ignatov Date: Fri Jun 19 14:11:41 2020 -0700 bpf: Switch btf_parse_vmlinux to btf_find_by_name_kind btf_parse_vmlinux() implements manual search for struct bpf_ctx_convert since at the time of implementing btf_find_by_name_kind() was not available. Later btf_find_by_name_kind() was introduced in 27ae7997a661 ("bpf: Introduce BPF_PROG_TYPE_STRUCT_OPS"). It provides similar search functionality and can be leveraged in btf_parse_vmlinux(). Do it. Signed-off-by: Andrey Ignatov Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: John Fastabend Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/6e12d5c3e8a3d552925913ef73a695dd1bb27800.1592600985.git.rdna@fb.com commit 4b971df992fdf8e0d55ab3cbea9fca4ce62bcefc Author: Ian Rogers Date: Thu Jun 18 21:33:51 2020 -0700 perf parse-events: Declare flex header file output Declare flex header file output so that bison C files can depend upon them. As there are multiple output targets $@ is replaced by the target name. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200619043356.90024-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 970a4a3418e626d0d4220edd4e981ecbf9d87758 Author: Ian Rogers Date: Thu Jun 18 21:33:50 2020 -0700 perf pmu: Add flex debug build flag Allow pmu parser's flex to be debugged as the parse-events and expr currently are. Enabling this requires the C code to call perf_pmu__flex_debug. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200619043356.90024-5-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 5011a52fc53570b816f80b0543cb7260cffca1bd Author: Ian Rogers Date: Thu Jun 18 21:33:49 2020 -0700 perf pmu: Add bison debug build flag Allow pmu parser to be debugged as the parse-events and expr currently are. Enabling this requires the C code to set perf_pmu_debug. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200619043356.90024-4-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit da77a14db3a03562f70dbe4951042ff84f647d7b Author: Ian Rogers Date: Thu Jun 18 21:33:48 2020 -0700 perf parse-events: Use automatic variable for yacc input This reduces the command line size slightly. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200619043356.90024-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 8d54c308c87f1b50ca088b12b89d7c0d96cf7dbf Author: Ian Rogers Date: Thu Jun 18 21:33:47 2020 -0700 perf parse-events: Use automatic variable for flex input This reduces the command line size slightly. Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200619043356.90024-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 92c7d7cdf490b1f906da04b6340ca8f56836f723 Author: Arnaldo Carvalho de Melo Date: Wed Jun 17 09:31:25 2020 -0300 perf evlist: Fix the class prefix for 'struct evlist' branch_type methods To differentiate from libperf's 'struct perf_evlist' methods. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 8cedf3a5c1f232fd8adf60affd040d32c5d9800f Author: Arnaldo Carvalho de Melo Date: Wed Jun 17 09:29:48 2020 -0300 perf evlist: Fix the class prefix for 'struct evlist' sample_id_all methods To differentiate from libperf's 'struct perf_evlist' methods. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit b3c2cc2bd21d1d97b34fcd1a08ca7f8cc29202a0 Author: Arnaldo Carvalho de Melo Date: Wed Jun 17 09:24:21 2020 -0300 perf evlist: Fix the class prefix for 'struct evlist' sample_type methods To differentiate from libperf's 'struct perf_evlist' methods. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit d1f249ecbd8413cb15f3bbad403253a183aa1d81 Author: Arnaldo Carvalho de Melo Date: Wed Jun 17 09:19:46 2020 -0300 perf evlist: Fix the class prefix for 'struct evlist' strerror methods To differentiate from libperf's 'struct perf_evlist' methods. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit e251abee87cf9c49a2ec1b143bd71f92b71557c1 Author: Arnaldo Carvalho de Melo Date: Wed Jun 17 09:16:20 2020 -0300 perf evlist: Fix the class prefix for 'struct evlist' 'add' evsel methods To differentiate from libperf's 'struct perf_evlist' methods. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit ce0dc7d22271fa7eac3875fc9b57772742b8245e Author: John Garry Date: Wed Jun 17 17:01:54 2020 +0800 perf pmu: Improve CPU core PMU HW event list ordering For perf list, the CPU core PMU HW event ordering is such that not all events may will be listed adjacent - consider this example: $ tools/perf/perf list List of pre-defined events (to be used in -e): duration_time [Tool event] branch-instructions OR cpu/branch-instructions/ [Kernel PMU event] branch-misses OR cpu/branch-misses/ [Kernel PMU event] bus-cycles OR cpu/bus-cycles/ [Kernel PMU event] cache-misses OR cpu/cache-misses/ [Kernel PMU event] cache-references OR cpu/cache-references/ [Kernel PMU event] cpu-cycles OR cpu/cpu-cycles/ [Kernel PMU event] cstate_core/c3-residency/ [Kernel PMU event] cstate_core/c6-residency/ [Kernel PMU event] cstate_core/c7-residency/ [Kernel PMU event] cstate_pkg/c2-residency/ [Kernel PMU event] cstate_pkg/c3-residency/ [Kernel PMU event] cstate_pkg/c6-residency/ [Kernel PMU event] cstate_pkg/c7-residency/ [Kernel PMU event] cycles-ct OR cpu/cycles-ct/ [Kernel PMU event] cycles-t OR cpu/cycles-t/ [Kernel PMU event] el-abort OR cpu/el-abort/ [Kernel PMU event] el-capacity OR cpu/el-capacity/ [Kernel PMU event] Notice in the above example how the cstate_core PMU events are mixed in the middle of the CPU core events. For my arm64 platform, all the uncore events get mixed in, making the list very disorganised: page-faults OR faults [Software event] task-clock [Software event] duration_time [Tool event] L1-dcache-load-misses [Hardware cache event] L1-dcache-loads [Hardware cache event] L1-icache-load-misses [Hardware cache event] L1-icache-loads [Hardware cache event] branch-load-misses [Hardware cache event] branch-loads [Hardware cache event] dTLB-load-misses [Hardware cache event] dTLB-loads [Hardware cache event] iTLB-load-misses [Hardware cache event] iTLB-loads [Hardware cache event] br_mis_pred OR armv8_pmuv3_0/br_mis_pred/ [Kernel PMU event] br_mis_pred_retired OR armv8_pmuv3_0/br_mis_pred_retired/ [Kernel PMU event] br_pred OR armv8_pmuv3_0/br_pred/ [Kernel PMU event] br_retired OR armv8_pmuv3_0/br_retired/ [Kernel PMU event] br_return_retired OR armv8_pmuv3_0/br_return_retired/ [Kernel PMU event] bus_access OR armv8_pmuv3_0/bus_access/ [Kernel PMU event] bus_cycles OR armv8_pmuv3_0/bus_cycles/ [Kernel PMU event] cid_write_retired OR armv8_pmuv3_0/cid_write_retired/ [Kernel PMU event] cpu_cycles OR armv8_pmuv3_0/cpu_cycles/ [Kernel PMU event] dtlb_walk OR armv8_pmuv3_0/dtlb_walk/ [Kernel PMU event] exc_return OR armv8_pmuv3_0/exc_return/ [Kernel PMU event] exc_taken OR armv8_pmuv3_0/exc_taken/ [Kernel PMU event] hisi_sccl1_ddrc0/act_cmd/ [Kernel PMU event] hisi_sccl1_ddrc0/flux_rcmd/ [Kernel PMU event] hisi_sccl1_ddrc0/flux_rd/ [Kernel PMU event] hisi_sccl1_ddrc0/flux_wcmd/ [Kernel PMU event] hisi_sccl1_ddrc0/flux_wr/ [Kernel PMU event] hisi_sccl1_ddrc0/pre_cmd/ [Kernel PMU event] hisi_sccl1_ddrc0/rnk_chg/ [Kernel PMU event] ... hisi_sccl7_l3c21/wr_hit_cpipe/ [Kernel PMU event] hisi_sccl7_l3c21/wr_hit_spipe/ [Kernel PMU event] hisi_sccl7_l3c21/wr_spipe/ [Kernel PMU event] inst_retired OR armv8_pmuv3_0/inst_retired/ [Kernel PMU event] inst_spec OR armv8_pmuv3_0/inst_spec/ [Kernel PMU event] itlb_walk OR armv8_pmuv3_0/itlb_walk/ [Kernel PMU event] l1d_cache OR armv8_pmuv3_0/l1d_cache/ [Kernel PMU event] l1d_cache_refill OR armv8_pmuv3_0/l1d_cache_refill/ [Kernel PMU event] l1d_cache_wb OR armv8_pmuv3_0/l1d_cache_wb/ [Kernel PMU event] l1d_tlb OR armv8_pmuv3_0/l1d_tlb/ [Kernel PMU event] l1d_tlb_refill OR armv8_pmuv3_0/l1d_tlb_refill/ [Kernel PMU event] So the events are list alphabetically. However, CPU core event listing is special from commit dc098b35b56f ("perf list: List kernel supplied event aliases"), in that the alias and full event is shown (in that order). As such, the core events may become sparse. Improve this by grouping the CPU core events and ensure that they are listed first for kernel PMU events. For the first example, above, this now looks like: duration_time [Tool event] branch-instructions OR cpu/branch-instructions/ [Kernel PMU event] branch-misses OR cpu/branch-misses/ [Kernel PMU event] bus-cycles OR cpu/bus-cycles/ [Kernel PMU event] cache-misses OR cpu/cache-misses/ [Kernel PMU event] cache-references OR cpu/cache-references/ [Kernel PMU event] cpu-cycles OR cpu/cpu-cycles/ [Kernel PMU event] cycles-ct OR cpu/cycles-ct/ [Kernel PMU event] cycles-t OR cpu/cycles-t/ [Kernel PMU event] el-abort OR cpu/el-abort/ [Kernel PMU event] el-capacity OR cpu/el-capacity/ [Kernel PMU event] el-commit OR cpu/el-commit/ [Kernel PMU event] el-conflict OR cpu/el-conflict/ [Kernel PMU event] el-start OR cpu/el-start/ [Kernel PMU event] instructions OR cpu/instructions/ [Kernel PMU event] mem-loads OR cpu/mem-loads/ [Kernel PMU event] mem-stores OR cpu/mem-stores/ [Kernel PMU event] ref-cycles OR cpu/ref-cycles/ [Kernel PMU event] topdown-fetch-bubbles OR cpu/topdown-fetch-bubbles/ [Kernel PMU event] topdown-recovery-bubbles OR cpu/topdown-recovery-bubbles/ [Kernel PMU event] topdown-slots-issued OR cpu/topdown-slots-issued/ [Kernel PMU event] topdown-slots-retired OR cpu/topdown-slots-retired/ [Kernel PMU event] topdown-total-slots OR cpu/topdown-total-slots/ [Kernel PMU event] tx-abort OR cpu/tx-abort/ [Kernel PMU event] tx-capacity OR cpu/tx-capacity/ [Kernel PMU event] tx-commit OR cpu/tx-commit/ [Kernel PMU event] tx-conflict OR cpu/tx-conflict/ [Kernel PMU event] tx-start OR cpu/tx-start/ [Kernel PMU event] cstate_core/c3-residency/ [Kernel PMU event] cstate_core/c6-residency/ [Kernel PMU event] cstate_core/c7-residency/ [Kernel PMU event] cstate_pkg/c2-residency/ [Kernel PMU event] cstate_pkg/c3-residency/ [Kernel PMU event] cstate_pkg/c6-residency/ [Kernel PMU event] cstate_pkg/c7-residency/ [Kernel PMU event] Signed-off-by: John Garry Acked-by: Jiri Olsa Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1592384514-119954-3-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit c1b4745b48b3c5a29df6ef2b68384e7cccdc3691 Author: John Garry Date: Wed Jun 17 17:01:53 2020 +0800 perf pmu: List kernel supplied event aliases for arm64 In commit dc098b35b56f ("perf list: List kernel supplied event aliases"), the aliases for events are supplied in addition to CPU event in perf list. This relies on the name of the core PMU being "cpu", which is not the case for arm64, so arm64 has always missed this. Use generic is_pmu_core() helper which takes account of arm64 to make this feature work for arm64 (and possibly other archs). Sample, before: armv8_pmuv3_0/br_mis_pred/ [Kernel PMU event] after: br_mis_pred OR armv8_pmuv3_0/br_mis_pred/ [Kernel PMU event] Signed-off-by: John Garry Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: http://lore.kernel.org/lkml/1592384514-119954-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 47446212832871e66f3b5fbf021c148eced2e24c Author: Mike Leach Date: Tue Jun 16 17:40:41 2020 +0100 perf cs-etm: Allow no CoreSight sink to be specified on command line Adjust the handling of the session sink selection to allow no sink to be selected on the command line. This then forwards the sink selection to the CoreSight infrastructure which will attempt to select a sink based on the default sink select priorities. Signed-off-by: Mike Leach Tested-by: Leo Yan Cc: Mathieu Poirier Cc: Peter Zijlstra Cc: Suzuki Poulouse Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Arnaldo Carvalho de Melo commit ff1a12f962dff5b490c5ce1c2c4bcd0bf3bf517d Author: Ian Rogers Date: Wed Jun 10 16:58:23 2020 -0700 perf expr: Add < and > operators These are broadly useful but required to handle TMA metrics. For example encoding Ports_Utilization from: https://download.01.org/perfmon/TMA_Metrics.csv requires '<'. { "BriefDescription": "This metric estimates fraction of cycles the CPU performance was potentially limited due to Core computation issues (non divider-related). Two distinct categories can be attributed into this metric: (1) heavy data-dependency among contiguous instructions would manifest in this metric - such cases are often referred to as low Instruction Level Parallelism (ILP). (2) Contention on some hardware execution unit other than Divider. For example; when there are too many multiply operations.", "MetricExpr": "( ( cpu@EXE_ACTIVITY.EXE_BOUND_0_PORTS@ + cpu@EXE_ACTIVITY.1_PORTS_UTIL@ + ( cpu@EXE_ACTIVITY.2_PORTS_UTIL@ * ( ( ( cpu@UOPS_RETIRED.RETIRE_SLOTS@ ) / ( cpu@CPU_CLK_UNHALTED.THREAD@ ) ) / ( ( 4.000000 ) + 1.000000 ) ) ) ) / ( cpu@CPU_CLK_UNHALTED.THREAD@ ) if ( cpu@ARITH.DIVIDER_ACTIVE\\,cmask\\=1@ < cpu@EXE_ACTIVITY.EXE_BOUND_0_PORTS@ ) else ( ( cpu@EXE_ACTIVITY.EXE_BOUND_0_PORTS@ + cpu@EXE_ACTIVITY.1_PORTS_UTIL@ + ( cpu@EXE_ACTIVITY.2_PORTS_UTIL@ * ( ( ( cpu@UOPS_RETIRED.RETIRE_SLOTS@ ) / ( cpu@CPU_CLK_UNHALTED.THREAD@ ) ) / ( ( 4.000000 ) + 1.000000 ) ) ) ) - cpu@EXE_ACTIVITY.EXE_BOUND_0_PORTS@ ) / ( cpu@CPU_CLK_UNHALTED.THREAD@ ) )", "MetricGroup": "Topdown_Group_Ports_Utilization", "MetricName": "Topdown_Metric_Ports_Utilization" }, Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200610235823.52557-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 3e21a28a01e227726456a51933ed004c2df31850 Author: Ian Rogers Date: Wed Jun 10 16:58:22 2020 -0700 perf expr: Add d_ratio operation d_ratio avoids division by 0 yielding infinity, such as when a counter doesn't get scheduled. An example usage is: { "BriefDescription": "DCache L1 misses", "MetricExpr": "d_ratio(MEM_LOAD_RETIRED.L1_MISS, MEM_LOAD_RETIRED.L1_HIT + MEM_LOAD_RETIRED.L1_MISS + MEM_LOAD_RETIRED.FB_HIT)", "MetricGroup": "DCache;DCache_L1", "MetricName": "DCache_L1_Miss", "ScaleUnit": "100%", } Signed-off-by: Ian Rogers Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: John Garry Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200610235823.52557-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit afdd63f5933b3c970438e8ab6bb0cd9f392f3bf6 Author: Arnaldo Carvalho de Melo Date: Wed Jun 10 11:39:16 2020 -0300 perf script: Fixup some evsel/evlist method names Fixups related to the introduction of libperf, where the perf_{evsel,evlist}__ prefix is reserved for functions operating on struct perf_{evsel,evlist}. Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo commit 218ca91df47712a7b2b5a554e39c4a2c819a9e86 Author: Jiri Olsa Date: Tue Jun 2 23:47:41 2020 +0200 perf tests: Add parse metric test for frontend metric Adding new metric test for frontend metric. It's stolen from x86 pmu events. Committer testing: # perf test "Parse and process metrics" 67: Parse and process metrics : Ok # perf test -v "Parse and process metrics" # 67: Parse and process metrics : --- start --- test child forked, pid 104881 metric expr inst_retired.any / cpu_clk_unhalted.thread for IPC found event inst_retired.any found event cpu_clk_unhalted.thread adding {inst_retired.any,cpu_clk_unhalted.thread}:W metric expr idq_uops_not_delivered.core / (4 * (( ( cpu_clk_unhalted.thread / 2 ) * ( 1 + cpu_clk_unhalted.one_thread_active / cpu_clk_unhalted.ref_xclk ) ))) for Frontend_Bound_SMT found event cpu_clk_unhalted.one_thread_active found event cpu_clk_unhalted.ref_xclk found event idq_uops_not_delivered.core found event cpu_clk_unhalted.thread adding {cpu_clk_unhalted.one_thread_active,cpu_clk_unhalted.ref_xclk,idq_uops_not_delivered.core,cpu_clk_unhalted.thread}:W test child finished with 0 ---- end ---- Parse and process metrics: Ok # Had to fix it to initialize that 'struct value' array sentinel with a named initializer to fix the build with some versions of clang: tests/parse-metric.c:154:7: error: missing field 'val' initializer [-Werror,-Wmissing-field-initializers] { 0 }, Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-14-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0a507af9c681ac2adedc5fe1b2d534e27be85446 Author: Jiri Olsa Date: Tue Jun 2 23:47:40 2020 +0200 perf tests: Add parse metric test for ipc metric Adding new test that process metrics code and checks the expected results. Starting with easy ipc metric. Committer testing: # perf test "Parse and process metrics" 67: Parse and process metrics : Ok # # perf test -v "Parse and process metrics" 67: Parse and process metrics : --- start --- test child forked, pid 103402 metric expr inst_retired.any / cpu_clk_unhalted.thread for IPC found event inst_retired.any found event cpu_clk_unhalted.thread adding {inst_retired.any,cpu_clk_unhalted.thread}:W test child finished with 0 ---- end ---- Parse and process metrics: Ok # Had to fix it to initialize that 'struct value' array sentinel with a named initializer to fix the build with some versions of clang: tests/parse-metric.c:135:7: error: missing field 'val' initializer [-Werror,-Wmissing-field-initializers] { 0 }, Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-13-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6d432c4c8aa5660d8f9f43326db8350b48dcb6f5 Author: Jiri Olsa Date: Tue Jun 2 23:47:39 2020 +0200 perf tools: Add test_generic_metric function Adding test_generic_metric that prepares and runs given metric over the data from struct runtime_stat object. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-12-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9afe5658a6fa89f59f01d2857d78203cc8665f1c Author: Jiri Olsa Date: Tue Jun 2 23:47:38 2020 +0200 perf tools: Release metric_events rblist We don't release metric_events rblist, add the missing delete hook and call the release before leaving cmd_stat. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-11-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2cfaa853d8ead2fe4cd82986163b5cea21e300bd Author: Jiri Olsa Date: Tue Jun 2 23:47:37 2020 +0200 perf tools: Factor out prepare_metric function Factoring out prepare_metric function so it can be used in test interface coming in following changes. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-10-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f78ac00a8c999f4418e69e606485784fc5ff1d09 Author: Jiri Olsa Date: Tue Jun 2 23:47:36 2020 +0200 perf tools: Add metricgroup__parse_groups_test function Add the metricgroup__parse_groups_test function. It will be used as test's interface to metric parsing in following changes. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-9-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 1381396b0b778c918bf191b1960f92fbd563476d Author: Jiri Olsa Date: Tue Jun 9 12:57:47 2020 -0300 perf tools: Add map to parse_groups() function For testing purposes we need to pass our own map of events from parse_groups() through metricgroup__add_metric. Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-8-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 68173bda6ac9d498e450276323f1c10a1d0307ad Author: Jiri Olsa Date: Tue Jun 9 12:50:42 2020 -0300 perf tools: Add fake_pmu to parse_group() function Allow to pass fake_pmu in parse_groups function so it can be used in parse_events call. It's will be passed by the upcoming metricgroup__parse_groups_test function. Committer notes: Made it a 'struct perf_pmu' pointer, in line with the changes at the start of this patchkit to avoid statics deep down in library code. Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8b4468a2107af32b796fa818e5fb76481c39ee5a Author: Jiri Olsa Date: Tue Jun 2 23:47:33 2020 +0200 perf parse: Factor out parse_groups() function Factor out the parse_groups function, it will be used for new test interface coming in following changes. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-6-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e1c92a7fbbc5668510736624df3028accd6af0ea Author: Jiri Olsa Date: Wed Jun 3 12:51:15 2020 -0300 perf tests: Add another metric parsing test The test goes through all metrics compiled for arch within pmu events and try to parse them. This test is different from 'test_parsing' in that we go through all the events in the current arch, not just one defined for current CPU model. Using 'fake_pmu' to parse events which do not have PMUs defined in the system. Say there's bad change in ivybridge metrics file, like: - a/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json + b/tools/perf/pmu-events/arch/x86/ivybridge/ivb-metrics.json @@ -8,7 +8,7 @@ - "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / (4 * (( + "MetricExpr": "IDQ_UOPS_NOT_DELIVERED.CORE / / (4 * the test fails with (on my kabylake laptop): $ perf test 'Parsing of PMU event table metrics with fake PMUs' -v parsing 'idq_uops_not_delivered.core / / (4 * (( ( cpu_clk_unh... syntax error, line 1 expr__parse failed test child finished with -1 ... The test also defines its own list of metrics and tries to parse them. It's handy for developing. Committer notes: Testing it: $ perf test fake 10: PMU events : 10.4: Parsing of PMU event table metrics with fake PMUs : FAILED! $ perf test -v fake |& tail parsing '(unc_p_freq_trans_cycles / unc_p_clockticks) * 100.' parsing '(unc_m_power_channel_ppd / unc_m_clockticks) * 100.' parsing '(unc_m_power_critical_throttle_cycles / unc_m_clockticks) * 100.' parsing '(unc_m_power_self_refresh / unc_m_clockticks) * 100.' parsing 'idq_uops_not_delivered.core / * (4 * cycles)' syntax error expr__parse failed test child finished with -1 ---- end ---- PMU events subtest 4: FAILED! $ And fix this error: tests/pmu-events.c:437:40: error: missing field 'idx' initializer [-Werror,-Wmissing-field-initializers] struct parse_events_error error = { 0 }; Signed-off-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit e46fc8d9dd352c88fec49b140008958d2dc1efe1 Author: Arnaldo Carvalho de Melo Date: Tue Jun 9 13:23:24 2020 -0300 perf pmu: Add a perf_pmu__fake object to use with __parse_events() When wanting to use the support in __parse_events() for fake pmus, just pass it. Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Signed-off-by: Arnaldo Carvalho de Melo commit 3bf91aa5aa493b2ac24ffcfc93ffe861bf03685f Author: Arnaldo Carvalho de Melo Date: Wed Jun 3 12:32:55 2020 -0300 perf parse: Provide a way to pass a fake_pmu to parse_events() This is an alternative patch to what Jiri sent that instead of changing all callers to parse_events() for allowing to pass a fake_pmu, provide another function specifically for that. From Jiri's patch: This way it's possible to parse events from PMUs which are not present in the system. It's available only for testing purposes coming in following changes, so all the current users set fake_pmu argument as false. Based-on-a-patch-by: Jiri Olsa Link: http://lore.kernel.org/lkml/20200602214741.1218986-3-jolsa@kernel.org Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Signed-off-by: Arnaldo Carvalho de Melo commit 34bacc9578de2893ab6301cea89ea001d8e4cf5b Author: Jiri Olsa Date: Tue Jun 2 23:47:31 2020 +0200 perf tests: Factor check_parse_id function Separating the generic part of check_parse_id function, so it can be used in following changes for the new test. Committer notes: Fix this error: tests/pmu-events.c:413:40: error: missing field 'idx' initializer [-Werror,-Wmissing-field-initializers] struct parse_events_error error = { 0 }; Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-4-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 387ad33fe710758a8e1b860819a7452bceb4329a Author: Jiri Olsa Date: Tue Jun 2 23:47:29 2020 +0200 perf tools: Add fake pmu support Add a way to create a pmu event without the actual PMU being in place. This way we can test metrics defined for any processor. The interface is to define fake_pmu in struct parse_events_state data. It will be used only in tests via special interface function added in following changes. Signed-off-by: Jiri Olsa Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20200602214741.1218986-2-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a1f8bc95c33e953e080f72be4b95176dacb423b0 Author: Jason Yan Date: Mon Apr 20 20:35:28 2020 +0800 perf annotate: Remove unneeded conversion to bool The '>' expression itself is bool, no need to convert it to bool again. This fixes the following coccicheck warning: tools/perf/ui/browsers/annotate.c:212:30-35: WARNING: conversion to bool not needed here Signed-off-by: Jason Yan Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20200420123528.11655-1-yanaijie@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 1a53ce9ab4faeb841b33d62d23283dc76c0e7c5a Author: Maulik Shah Date: Mon Jun 22 12:23:25 2020 +0530 soc: qcom: rpmh-rsc: Set suppress_bind_attrs flag rpmh-rsc driver is fairly core to system and should not be removable once its probed. However it allows to unbind driver from sysfs using below command which results into a crash on sc7180. echo 18200000.rsc > /sys/bus/platform/drivers/rpmh/unbind Lets prevent unbind at runtime by setting suppress_bind_attrs flag. Reviewed-by: Stephen Boyd Signed-off-by: Maulik Shah Link: https://lore.kernel.org/r/1592808805-2437-1-git-send-email-mkshah@codeaurora.org Signed-off-by: Bjorn Andersson commit f6b4c11fc527b9ca98c219fb9a465a08278d4c2b Author: Kamal Heib Date: Mon Jun 22 13:07:31 2020 +0300 RDMA/rxe: Remove unused rxe_mem_map_pages This function is not in use - delete it. Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/20200622100731.27359-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit d5fdffe23995895a2141bcc0b89117e8cb867ccf Author: Kamal Heib Date: Mon Jun 22 12:47:09 2020 +0300 RDMA/hfi1: Remove hfi1_create_qp declaration The function isn't implemented - delete the declaration. Link: https://lore.kernel.org/r/20200622094709.12981-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 90cdff90dfb507b36128a4b2bcf4721d441cd697 Author: Kamal Heib Date: Mon Jun 22 12:22:56 2020 +0300 RDMA/ipoib: Return void from ipoib_mcast_stop_thread() The return value from ipoib_mcast_stop_thread() is always 0 - change it to be void. Link: https://lore.kernel.org/r/20200622092256.6931-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit dacb12877d9222e0281b8391e3361fd4c7a7435a Author: Kranthi Kuntala Date: Thu Mar 5 16:39:58 2020 +0200 thunderbolt: Add support for on-board retimers USB4 spec specifies standard access to retimers (both on-board and cable) through USB4 port sideband access. This makes it possible to upgrade their firmware in the same way than we already do with the routers. This enumerates on-board retimers under each USB4 port when the link comes up and adds them to the bus under the router the retimer belongs to. Retimers are exposed in sysfs with name like :. where device is the router the retimer belongs to, port is the USB4 port the retimer is connected to and index is the retimer index under that port (starting from 1). This applies to the upstream USB4 port as well so if there is on-board retimer between the port and the router it is also added accordingly. At this time we do not add cable retimers but there is no techincal restriction to do so in the future if needed. It is not clear whether it makes sense to upgrade their firmwares and at least Thunderbolt 3 cables it has not been done outside of lab environments. The sysfs interface is made to follow the router NVM upgrade to make it easy to extend the existing userspace (fwupd) to handle these as well. Signed-off-by: Kranthi Kuntala Co-developed-by: Mika Westerberg Signed-off-by: Mika Westerberg commit 02d12855f51651cc9cf8e59e6cbb24a5d9e0a054 Author: Rajmohan Mani Date: Thu Mar 5 16:33:46 2020 +0200 thunderbolt: Implement USB4 port sideband operations for retimer access USB4 spec specifies standard set of sideband operations that are send over the low speed link to access either retimers on the link or the link parter (the other router). The USB4 retimer spec extends these and adds operations for retimer NVM upgrade. This implements the retimer access and NVM upgrade USB4 port sideband operations which we need for retimer support in the patch that follows. Signed-off-by: Rajmohan Mani Co-developed-by: Mika Westerberg Signed-off-by: Mika Westerberg commit 6bfe33473eaac9443dfce129b3107cc27abc1e47 Author: Mika Westerberg Date: Fri Feb 14 19:25:34 2020 +0200 thunderbolt: Retry USB4 block read operation Especially when accessing retimers over USB4 sideband operations the possibility to get read errors seems to be higher so make the usb4_do_read_data() retry a couple of times if it sees any other error than -ENODEV (device is gone). We can only do this for read side because it carries the offset as part of metadata (as opposed to writes). Signed-off-by: Mika Westerberg commit 7e72846bb97a86d19a249d230b12a6e33e947026 Author: Mika Westerberg Date: Fri Feb 14 19:23:03 2020 +0200 thunderbolt: Generalize usb4_switch_do_[read|write]_data() Currently these functions operate on struct tb_switch but we are going to need the same functionality with retimers as well so make the two functions work with an arbitrary object that gets passed as parameter to the callbacks. Signed-off-by: Mika Westerberg commit 719a5fe87ecd71d140c3ef76d855c70f82893411 Author: Mika Westerberg Date: Thu Mar 5 11:37:15 2020 +0200 thunderbolt: Split common NVM functionality into a separate file We are going to reuse some of this functionality to implement retimer NVM upgrade so move common NVM functionality into its own file. We also rename the structure from tb_switch_nvm to tb_nvm to make it clear that it is not just for switches. Signed-off-by: Mika Westerberg commit 83d1703634c469e427f8648418105d6521e8f7de Author: Mika Westerberg Date: Fri May 8 11:49:47 2020 +0300 thunderbolt: Add Intel USB-IF ID to the NVM upgrade supported list With USB4 Intel is also using its USB-IF ID (0x8087) with the new devices. The NVM format is the same. Add this to the driver so NVM upgrade is possible with these devices as well. Signed-off-by: Mika Westerberg commit 40c14d9f4f6d3482af00356142c4ef6c8e6dd8fb Author: Mika Westerberg Date: Mon May 4 17:10:40 2020 +0300 thunderbolt: Add KUnit tests for tunneling We can test some parts of tunneling, like path allocation without access to test hardware so add KUnit tests for PCIe, DP and USB3 tunneling. Signed-off-by: Mika Westerberg commit 0bd680cd900cf0ec85c275731262aaa2ead369b7 Author: Mika Westerberg Date: Tue Mar 24 14:44:13 2020 +0200 thunderbolt: Add USB3 bandwidth management USB3 supports both isochronous and non-isochronous traffic. The former requires guaranteed bandwidth and can take up to 90% of the total bandwidth. With USB4 USB3 is tunneled over USB4 fabric which means that we need to make sure there is enough bandwidth allocated for the USB3 tunnels in addition to DisplayPort tunnels. Whereas DisplayPort bandwidth management is static and done before the DP tunnel is established, the USB3 bandwidth management is dynamic and allows increasing and decreasing the allocated bandwidth according to what is currently consumed. This is done through host router USB3 downstream adapter registers. This adds USB3 bandwidth management to the software connection manager so that we always try to allocate maximum bandwidth for DP tunnels and what is left is allocated for USB3. Signed-off-by: Mika Westerberg commit 5b7b8c0af15a376175302fc91c2af06f356821b0 Author: Mika Westerberg Date: Fri May 8 12:41:34 2020 +0300 thunderbolt: Make tb_port_get_link_speed() available to other files We need to call this from tb.c when we improve the bandwidth management to take USB3 into account. Signed-off-by: Mika Westerberg commit 3b1d8d577ca8d0619c88ac76a943aa4ce11a3027 Author: Mika Westerberg Date: Fri Feb 21 23:14:41 2020 +0200 thunderbolt: Implement USB3 bandwidth negotiation routines Each host router USB3 downstream adapter has a set of registers that are used to negotiate bandwidth between the connection manager and the internal xHCI controller. These registers allow dynamic bandwidth management for USB3 isochronous traffic based on what is actually consumed vs. allocated at any given time. Implement these USB3 bandwidth negotiation routines to allow the software connection manager take advantage of these. Signed-off-by: Mika Westerberg commit acf815b86768d591d9ac429e3b40c703d911b6ff Author: Mika Westerberg Date: Sat May 16 12:32:33 2020 +0300 thunderbolt: Increase DP DPRX wait timeout Sometimes it takes longer for DPRX to be set so increase the timeout to cope with this. Signed-off-by: Mika Westerberg commit 7c0ee8fd3bd7b5be6024f1839e9c26d1c9570e82 Author: Mika Westerberg Date: Sat Mar 28 12:52:31 2020 +0200 thunderbolt: Report consumed bandwidth in both directions Whereas DisplayPort bandwidth is consumed only in one direction (from DP IN adapter to DP OUT adapter), USB3 adds separate bandwidth for both upstream and downstream directions. For this reason extend the tunnel consumed bandwidth routines to support both directions and implement this for DP. Signed-off-by: Mika Westerberg commit 9cac51a049dbbca0b078bb9cffa7a8d928cf0f06 Author: Mika Westerberg Date: Wed Mar 11 16:12:50 2020 +0300 thunderbolt: Make usb4_switch_map_pcie_down() also return enabled ports Just for symmetry with the usb4_switch_map_usb3_down() make this one also return ports that are enabled. Signed-off-by: Mika Westerberg commit 77cfa40fcdea9f75255a9785d345fa25e4a3ad0b Author: Mika Westerberg Date: Wed Mar 11 16:00:46 2020 +0300 thunderbolt: Make usb4_switch_map_usb3_down() also return enabled ports We need to call this on enabled ports in order to find the mapping from host router USB4 port to a USB 3.x downstream adapter, so make the function return enabled ports as well. While there fix parameter alignment in tb_find_usb3_down(). Signed-off-by: Mika Westerberg commit bbcf40b3928347d4bff0017246f7fc840405e92f Author: Mika Westerberg Date: Wed Mar 4 17:09:14 2020 +0200 thunderbolt: Do not tunnel USB3 if link is not USB4 USB3 tunneling is possible only over USB4 link so don't create USB3 tunnels if that's not the case. Signed-off-by: Mika Westerberg commit e876f34adc185ee8f66c13bad13b2b9b080b3ba9 Author: Mika Westerberg Date: Thu Apr 2 12:53:14 2020 +0300 thunderbolt: Add DP IN resources for all routers USB4 spec allows DP tunneling from any router that has DP IN adapter, not just from host router. The driver currently only added the DP IN resources for the host router because Thunderbolt 1, 2 and 3 devices do not have DP IN adapters. However, USB4 allows device routers to have DP IN adapter as well so update the driver to add DP IN resources for each device that has one. One example would be an eGPU enclosure where the eGPU output is forwarded to DP IN port and then tunneled over the USB4 fabric. Only limitation we add now is that the DP IN and DP OUT that gets paired for tunnel creation should both be under the same topology starting from host router downstream port. In other words we do not create DP tunnels across host router at this time even though that is possible as well but it complicates the bandwidth management and there is no real use-case for this anyway. Signed-off-by: Mika Westerberg commit 54509f5005caccd8459c9084535802feeb27bb2c Author: Mika Westerberg Date: Wed Apr 29 16:38:39 2020 +0300 thunderbolt: Add KUnit tests for path walking This adds KUnit tests for path walking which is only dependent on software structures, so no hardware is needed to run these. We make these available only when both KUnit and the driver itself are built into the kernel image. The reason for this is that KUnit adds its own module_init() call in kunit_test_suite() which generates linker error because the driver does the same in nhi.c. This should be fine for now because these tests are only meant to run by developers anyway. Signed-off-by: Mika Westerberg commit c738a794e5295ea6668ec9441c8df28c9a3c7502 Author: Mika Westerberg Date: Fri May 8 11:47:00 2020 +0300 thunderbolt: Increase path length in discovery Currently we have only supported paths that follow daisy-chain topology but USB4 also allows to build trees of devices. For this reason increase maximum path length we use for discovery to be from the lowest level to the host router and back to the same level. Signed-off-by: Mika Westerberg commit 75ab3f06a1eb1dc0b45ba4c788cb5086ba138d85 Author: Mika Westerberg Date: Fri May 8 11:55:03 2020 +0300 thunderbolt: Handle incomplete PCIe/USB3 paths correctly in discovery If the path is not complete when we do discovery the number of hops may be less than with the full path. As an example when this can happen is that user unloads the driver, disconnects the topology, and loads the driver back. If there is PCIe or USB3 tunnel involved this may happen. Take this into account in tb_pcie_init_path() and tb_usb3_init_path() and prevent potential access over array limits. Signed-off-by: Mika Westerberg commit 7e897bb7be11983b0ef85be80e55ed6273540101 Author: Mika Westerberg Date: Sun May 17 10:44:31 2020 +0300 thunderbolt: Check that both ports are reachable when allocating path Add sanity check that given src and dst ports are reachable through path walk before allocating a path. If they are not then bail out early. Signed-off-by: Mika Westerberg commit c64c3f3ac63a101a00bd316eaba63d359e9ba215 Author: Mika Westerberg Date: Wed Apr 29 17:07:59 2020 +0300 thunderbolt: Make tb_path_alloc() work with tree topologies With USB4, topologies are not limited to daisy-chains anymore so when calculating how many hops are between two ports we need to walk the whole path instead. Add helper function tb_for_each_port_on_path() that can be used to walk over each port on a path and make tb_path_alloc() to use it. Signed-off-by: Mika Westerberg commit 69eb79f7d294f92696de8010432758dbd3d1ecb3 Author: Mika Westerberg Date: Wed Apr 29 17:00:30 2020 +0300 thunderbolt: Make tb_next_port_on_path() work with tree topologies USB4 makes it possible to have tree topology of devices connected in the same way than USB3. This was actually possible in Thunderbolt 1, 2 and 3 as well but all the available devices only had two ports which allows building only daisy-chains of devices. With USB4 it is possible for example that there is DP IN adapter as part of eGPU device router and that should be tunneled over the tree topology to a DP OUT adapter. This updates the tb_next_port_on_path() to support such topologies. Signed-off-by: Mika Westerberg commit 783735f84fea6aad9b1e5931d6ea632796feaae3 Author: Mika Westerberg Date: Thu Apr 2 12:45:34 2020 +0300 thunderbolt: Fix path indices used in USB3 tunnel discovery The USB3 discovery used wrong indices when tunnel is discovered. It should use TB_USB3_PATH_DOWN for path that flows downstream and TB_USB3_PATH_UP when it flows upstream. This should not affect the functionality but better to fix it. Fixes: e6f818585713 ("thunderbolt: Add support for USB 3.x tunnels") Signed-off-by: Mika Westerberg Cc: stable@vger.kernel.org # v5.6+ commit 53f13319d13197dd1f4c8ce5fc1ef4c32509b4e2 Author: Mika Westerberg Date: Tue Jun 9 18:10:39 2020 +0300 thunderbolt: Get rid of E2E workaround The end-to-end (E2E) workaround is needed for Falcon Ridge (TBT 2) controller when E2E is enabled for both ends of the host-to-host connection. However, we never supported full E2E in the first place so this code is not necessary at the moment. Further this allows us to use all available rings for data except ring 0 which is reserved for the control path. The complete E2E flow control is explained in the USB4 spec so we may add it back later if needed but at least the networking driver seems to work fine without, and the higher level stack, like TCP will retransmit lost packets anyway. Signed-off-by: Mika Westerberg commit 126764236e3557853c4208a70a08f5f69da8d897 Author: Mika Westerberg Date: Mon Jun 1 12:47:07 2020 +0300 thunderbolt: NHI can use HopIDs 1-7 NHI (The host interface adapter) is allowed to use HopIDs 1-7 as well so relax the restriction in tb_port_alloc_hopid() to support this. Signed-off-by: Mika Westerberg commit 177aa362eb92ab8bd350a0642b66252db24b6140 Author: Mika Westerberg Date: Mon Jun 1 12:42:05 2020 +0300 thunderbolt: No need to warn if NHI hop_count != 12 or hop_count != 32 While Intel hardware typically has hop_count (Total Paths in the spec) 12 the USB4 spec allows this to be anything between 1 and 21 so no need to warn about this. Simply log number of paths at debug level. Signed-off-by: Mika Westerberg commit 8a00c67e1c1970d83123476479ba63998df823bd Author: Mika Westerberg Date: Tue May 26 17:26:38 2020 +0300 thunderbolt: Build initial XDomain property block upon first connect On a systems where the Thunderbolt controller is present all the time the kernel nodename may not yet set by the userspace when the driver is loaded. This means when another host is connected it may see the default "(none)" hostname instead of the system real hostname. For this reason build the initial XDomain property block only upon first connect. This should make sure the userspace has had chance to set it up. Signed-off-by: Mika Westerberg commit a5d25e01c8146ad8846da4760422e12242fceafe Author: Andy Lutomirski Date: Wed May 27 16:02:36 2020 -0700 selftests/x86: Add a syscall_arg_fault_64 test for negative GSBASE If the kernel erroneously allows WRGSBASE and user code writes a negative value, paranoid_entry will get confused. Check for this by writing a negative value to GSBASE and doing SYSENTER with TF set. A successful run looks like: [RUN] SYSENTER with TF, invalid state, and GSBASE < 0 [SKIP] Illegal instruction A failed run causes a kernel hang, and I believe it's because we double-fault and then get a never ending series of page faults and, when we exhaust the double fault stack we double fault again, starting the process over. Signed-off-by: Andy Lutomirski Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/f4f71efc91b9eae5e3dae21c9aee1c70cf5f370e.1590620529.git.luto@kernel.org commit 8746f135bb01872ff412d408ea1aa9ebd328c1f5 Author: Luiz Augusto von Dentz Date: Wed May 20 14:20:14 2020 -0700 Bluetooth: Disconnect if E0 is used for Level 4 E0 is not allowed with Level 4: BLUETOOTH CORE SPECIFICATION Version 5.2 | Vol 3, Part C page 1319: '128-bit equivalent strength for link and encryption keys required using FIPS approved algorithms (E0 not allowed, SAFER+ not allowed, and P-192 not allowed; encryption key not shortened' SC enabled: > HCI Event: Read Remote Extended Features (0x23) plen 13 Status: Success (0x00) Handle: 256 Page: 1/2 Features: 0x0b 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Secure Simple Pairing (Host Support) LE Supported (Host) Secure Connections (Host Support) > HCI Event: Encryption Change (0x08) plen 4 Status: Success (0x00) Handle: 256 Encryption: Enabled with AES-CCM (0x02) SC disabled: > HCI Event: Read Remote Extended Features (0x23) plen 13 Status: Success (0x00) Handle: 256 Page: 1/2 Features: 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 Secure Simple Pairing (Host Support) LE Supported (Host) > HCI Event: Encryption Change (0x08) plen 4 Status: Success (0x00) Handle: 256 Encryption: Enabled with E0 (0x01) [May 8 20:23] Bluetooth: hci0: Invalid security: expect AES but E0 was used < HCI Command: Disconnect (0x01|0x0006) plen 3 Handle: 256 Reason: Authentication Failure (0x05) Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit 8346b92ecddfae624b1dd4631e840fb98f5430cd Author: Gaurav Singh Date: Sat Jun 20 18:40:53 2020 -0400 gpio: max732x: remove redundant check from probe() The pdata is already checked for its validity. Remove the redundant check. Signed-off-by: Gaurav Singh Signed-off-by: Bartosz Golaszewski commit 503a02b72d457f18eccf58296f9b50df6666d7fc Author: Andy Shevchenko Date: Mon Jun 22 18:56:15 2020 +0300 pinctrl: merrifield: Update pin names in accordance with official list Some of the pin names were provided officially to the customers in different spelling. We update pin names in accordance with the official list. Signed-off-by: Andy Shevchenko commit 447b4eb6ceeb2d0d83d7f5aa248f2798f167cfda Author: Prashant Malani Date: Fri Jun 19 19:00:37 2020 -0700 platform/chrome: cros_ec_typec: Make configure_mux static Since cros_typec_configure_mux() is only used in cros-ec-typec, it should be marked static. Fixes: 7e7def15fa4b ("platform/chrome: cros_ec_typec: Add USB mux control") Reported-by: kernel test robot Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra commit 2984b3f8c24b87ba4d57e213d593b2f91a4a31dd Author: Lichao Liu Date: Thu Jun 11 17:59:24 2020 +0800 MIPS: Loongson-2EF: disable fix-loongson3-llsc in compiler Firstly, Loongson-2EF support ll/sc instructions, but doesn't need fix-loongson3-llsc compile option. Secondly, fix-loongson3-llsc will cause kernel startup fail at futex_init, because compiler will add 'sync' before 'll', which will affect __ex_table. futex_init will pass NULL uaddr parameter to futex_atomic_cmpxchg_inatomic. futex_atomic_cmpxchg_inatomic will access uaddr directly, which will cause page fault exception, the exception should be handled by __ex_table's nextinsn if the exception insn exsit in __ex_table. Because __ex_table is affected by compiler, the exception can not be handled, and futex_atomic_cmpxchg_inatomic will crash. Error code as below: __ex_table.insn = 1b, which is 'sync' compiled with fix-loongson3-llsc, but the actual exception instrction is ll. So, do_page_fault will not find the correct inst in __ex_table, and can not handle this exception. "1: "user_ll("%1", "%3")" \n" " bne %1, %z4, 3f \n" " .set pop \n" " move $1, %z5 \n" " .set "MIPS_ISA_ARCH_LEVEL" \n" "2: "user_sc("$1", "%2")" \n" " beqz $1, 1b \n" "3: " __SYNC_ELSE(full, loongson3_war, __WEAK_LLSC_MB) "\n" " .insn \n" " .set pop \n" " .section .fixup,\"ax\" \n" "4: li %0, %6 \n" " j 3b \n" " .previous \n" " .section __ex_table,\"a\" \n" " "__UA_ADDR "\t1b, 4b \n" " "__UA_ADDR "\t2b, 4b \n" " .previous Signed-off-by: Lichao Liu Reviewed-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 5ae318f6fd9bbbb57c6b3841817a16fbd7649127 Author: Xiongfeng Wang Date: Tue Jun 16 17:14:09 2020 +0800 ACPI: sysfs: add newlines when printing module parameters Add newlines for several module parameters printed by sysfs. Signed-off-by: Xiongfeng Wang Signed-off-by: Rafael J. Wysocki commit fc293b7a0ede644e003655f1c53b9a97b4472bfa Author: Xiongfeng Wang Date: Tue Jun 16 17:14:08 2020 +0800 ACPI: EC: add newline when printing 'ec_event_clearing' module parameter When I cat acpi module parameter '/sys/module/acpi/parameters/ec_event_clearing', it displays as follows. It is better to add a newline for easy reading. [root@hulk-202 ~]# cat /sys/module/acpi/parameters/ec_event_clearing query[root@hulk-202 ~]# Signed-off-by: Xiongfeng Wang Signed-off-by: Rafael J. Wysocki commit 99e40204e014e06644072c39001a269d9689e0d1 Author: Borislav Petkov Date: Sun Jun 21 12:41:53 2020 +0200 x86/msr: Move the F15h MSRs where they belong 1068ed4547ad ("x86/msr: Lift AMD family 0x15 power-specific MSRs") moved the three F15h power MSRs to the architectural list but that was wrong as they belong in the family 0x15 list. That also caused: In file included from trace/beauty/tracepoints/x86_msr.c:10: perf/trace/beauty/generated/x86_arch_MSRs_array.c:292:45: error: initialized field overwritten [-Werror=override-init] 292 | [0xc0010280 - x86_AMD_V_KVM_MSRs_offset] = "F15H_PTSC", | ^~~~~~~~~~~ perf/trace/beauty/generated/x86_arch_MSRs_array.c:292:45: note: (near initialization for 'x86_AMD_V_KVM_MSRs[640]') due to MSR_F15H_PTSC ending up being defined twice. Move them where they belong and drop the duplicate. Also, drop the respective tools/ changes of the msr-index.h copy the above commit added because perf tool developers prefer to go through those changes themselves in order to figure out whether changes to the kernel headers would need additional handling in perf. Fixes: 1068ed4547ad ("x86/msr: Lift AMD family 0x15 power-specific MSRs") Reported-by: Stephen Rothwell Signed-off-by: Borislav Petkov Acked-by: Arnaldo Carvalho de Melo Link: https://lkml.kernel.org/r/20200621163323.14e8533f@canb.auug.org.au commit cbdd865a94aee4f21e7be330e622d9a8b5ad2db8 Author: Heikki Krogerus Date: Tue Jun 9 16:22:39 2020 +0300 ACPI: property: use cached name in acpi_fwnode_get_named_child_node() There is no need to re-evaluate the object name. Signed-off-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki commit c314360cea42e9481d9f68a73a3a776eba31ba4b Merge: 0d574c6b59c6a 59ab0fa0c8078 Author: Mark Brown Date: Mon Jun 22 15:58:32 2020 +0100 Merge series "Some small spi geni cleanups" from Stephen Boyd : To follow onto Doug's latest spi geni series[1] this simplifies and reduces the code a little more. [1] https://lore.kernel.org/r/20200618150626.237027-1-dianders@chromium.org Stephen Boyd (2): spi: spi-geni-qcom: Simplify setup_fifo_xfer() spi: spi-geni-qcom: Don't set {tx,rx}_rem_bytes unnecessarily drivers/spi/spi-geni-qcom.c | 55 +++++++++++++++++-------------------- 1 file changed, 25 insertions(+), 30 deletions(-) base-commit: 7ba9bdcb91f694b0eaf486a825afd9c2d99532b7 -- Sent by a computer, using git, on the internet commit 59ab0fa0c8078f46e747f03191830385f111b35b Author: Stephen Boyd Date: Fri Jun 19 19:22:33 2020 -0700 spi: spi-geni-qcom: Don't set {tx,rx}_rem_bytes unnecessarily We only need to test for these counters being non-zero when we see the end of a transfer. If we're doing a CS change then they will already be zero. This implies that we don't need to set these to 0 if we're cancelling an in flight transfer too, because we only care to test these counters when the 'DONE' bit is set in the hardware and we've set them to non-zero for a transfer. This is a non-functional change, just cleanup to consolidate code. Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200620022233.64716-3-swboyd@chromium.org Signed-off-by: Mark Brown commit 19ea327544507dbebc1630bc93ea188e4fae94bb Author: Stephen Boyd Date: Fri Jun 19 19:22:32 2020 -0700 spi: spi-geni-qcom: Simplify setup_fifo_xfer() The definition of SPI_FULL_DUPLEX (3) is really SPI_TX_ONLY (1) ORed with SPI_RX_ONLY (2). Let's drop the define and simplify the code here a bit by collapsing the setting of 'm_cmd' into conditions that are the same. This is a non-functional change, just cleanup to consolidate code. Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200620022233.64716-2-swboyd@chromium.org Signed-off-by: Mark Brown commit b2fc9b4eb1d79c03fd78e50b810c2ea27178e1e3 Author: Sergei Shtylyov Date: Fri Jun 19 20:54:32 2020 +0300 pinctrl: sh-pfc: r8a77970: Add RPC pins, groups, and functions Add the RPC pins/groups/functions to the R8A77970 PFC driver. They can be used if an Octal-SPI flash or HyperFlash is connected. Based on the patch by Dmitry Shifrin . Signed-off-by: Sergei Shtylyov Link: https://lore.kernel.org/r/3982785f-4fca-96f9-2b6a-a0d1828cb0ad@cogentembedded.com Signed-off-by: Geert Uytterhoeven commit b3b4f8dffd38c2ec08d7eadaa57147a0ff6e3714 Author: Sergei Shtylyov Date: Fri Jun 5 23:23:14 2020 +0300 pinctrl: sh-pfc: r8a77980: Add RPC pins, groups, and functions Add the RPC pins/groups/functions to the R8A77980 PFC driver. They can be used if an Octal-SPI flash or HyperFlash is connected. Based on the patch by Dmitry Shifrin . Signed-off-by: Sergei Shtylyov Link: https://lore.kernel.org/r/fd089d37-95bb-4ec9-282f-e04d7e5195e4@cogentembedded.com Signed-off-by: Geert Uytterhoeven commit 11708142bc3689d98a959e5da927d002c590be7b Author: Colton Lewis Date: Sun Jun 21 02:07:38 2020 +0000 RDMA: Correct trivial kernel-doc inconsistencies Silence documentation build warnings by correcting kernel-doc comments. ./drivers/infiniband/core/verbs.c:1004: warning: Function parameter or member 'uobject' not described in 'ib_create_srq_user' ./drivers/infiniband/core/verbs.c:1004: warning: Function parameter or member 'udata' not described in 'ib_create_srq_user' ./drivers/infiniband/core/umem_odp.c:161: warning: Function parameter or member 'ops' not described in 'ib_umem_odp_alloc_child' ./drivers/infiniband/core/umem_odp.c:225: warning: Function parameter or member 'ops' not described in 'ib_umem_odp_get' ./drivers/infiniband/sw/rdmavt/ah.c:104: warning: Excess function parameter 'ah_attr' description in 'rvt_create_ah' ./drivers/infiniband/sw/rdmavt/ah.c:104: warning: Excess function parameter 'create_flags' description in 'rvt_create_ah' ./drivers/infiniband/ulp/iser/iscsi_iser.h:363: warning: Function parameter or member 'all_list' not described in 'iser_fr_desc' ./drivers/infiniband/ulp/iser/iscsi_iser.h:377: warning: Function parameter or member 'all_list' not described in 'iser_fr_pool' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:148: warning: Function parameter or member 'rsvd0' not described in 'opa_vesw_info' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:148: warning: Function parameter or member 'rsvd1' not described in 'opa_vesw_info' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:148: warning: Function parameter or member 'rsvd2' not described in 'opa_vesw_info' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:148: warning: Function parameter or member 'rsvd3' not described in 'opa_vesw_info' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:148: warning: Function parameter or member 'rsvd4' not described in 'opa_vesw_info' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:205: warning: Function parameter or member 'rsvd0' not described in 'opa_per_veswport_info' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:205: warning: Function parameter or member 'rsvd1' not described in 'opa_per_veswport_info' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:205: warning: Function parameter or member 'rsvd2' not described in 'opa_per_veswport_info' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:205: warning: Function parameter or member 'rsvd3' not described in 'opa_per_veswport_info' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:342: warning: Function parameter or member 'reserved' not described in 'opa_veswport_summary_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:394: warning: Function parameter or member 'rsvd0' not described in 'opa_veswport_error_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:394: warning: Function parameter or member 'rsvd1' not described in 'opa_veswport_error_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:394: warning: Function parameter or member 'rsvd2' not described in 'opa_veswport_error_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:394: warning: Function parameter or member 'rsvd3' not described in 'opa_veswport_error_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:394: warning: Function parameter or member 'rsvd4' not described in 'opa_veswport_error_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:394: warning: Function parameter or member 'rsvd5' not described in 'opa_veswport_error_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:394: warning: Function parameter or member 'rsvd6' not described in 'opa_veswport_error_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:394: warning: Function parameter or member 'rsvd7' not described in 'opa_veswport_error_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:394: warning: Function parameter or member 'rsvd8' not described in 'opa_veswport_error_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:394: warning: Function parameter or member 'rsvd9' not described in 'opa_veswport_error_counters' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:460: warning: Function parameter or member 'reserved' not described in 'opa_vnic_vema_mad' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:485: warning: Function parameter or member 'reserved' not described in 'opa_vnic_notice_attr' ./drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.h:500: warning: Function parameter or member 'reserved' not described in 'opa_vnic_vema_mad_trap' Link: https://lore.kernel.org/r/5373936.DvuYhMxLoT@laptop.coltonlewis.name Signed-off-by: Colton Lewis Signed-off-by: Jason Gunthorpe commit 8830280a69ddfdbba7fb24d79dce309817783c6a Author: Thomas Renninger Date: Wed May 27 17:33:03 2020 +0200 ACPI: procfs: Remove last dirs after being marked deprecated for a decade This code is outdated and has been deprecated for a long time, so user space is not expected to rely on it any more on any systems that are up to date by any reasonable measure. Remove it. Signed-off-by: Thomas Renninger [ rjw: Subject / changelog ] Signed-off-by: Rafael J. Wysocki commit 52bc5ea6edde35bc65ed6ecd7639534e78002c74 Author: Ulrich Hecht Date: Tue Jun 16 18:26:26 2020 +0200 clk: renesas: rzg2: Mark RWDT clocks as critical Ensures RWDT remains alert throughout the boot process if enabled. This patch applies the change to the following SoCs: r8a774a1, r8a774b1 and r8a774c0. Signed-off-by: Ulrich Hecht Link: https://lore.kernel.org/r/20200616162626.27944-4-uli+renesas@fpond.eu Signed-off-by: Geert Uytterhoeven commit f23f1101ad0ef1acdc219d3364522166e2c711ce Author: Ulrich Hecht Date: Tue Jun 16 18:26:25 2020 +0200 clk: renesas: rcar-gen3: Mark RWDT clocks as critical Ensures RWDT remains alert throughout the boot process if enabled. This patch applies the change to the following SoCs: r8a77950, r8a77951, r8a77960, r8a77961, r8a77965, r8a77970, r8a77980, r8a77990 and r8a77995. Signed-off-by: Ulrich Hecht Link: https://lore.kernel.org/r/20200616162626.27944-3-uli+renesas@fpond.eu Signed-off-by: Geert Uytterhoeven commit ed4a11807d2a35ccfc0d00371f20b826f670b5f2 Author: Ulrich Hecht Date: Tue Jun 16 18:26:24 2020 +0200 clk: renesas: cpg-mssr: Mark clocks as critical only if on at boot This allows us to add the RWDT clock to the list of critical clocks without keeping it enabled needlessly if not used. Changing the semantics of crit_mod_clks in this way is safe for the current user (INTC-AP) because it is never off at boot time. Signed-off-by: Ulrich Hecht Link: https://lore.kernel.org/r/20200616162626.27944-2-uli+renesas@fpond.eu Signed-off-by: Geert Uytterhoeven commit 39853b1438bf9b07349c8c44b48f6c2eda6f8840 Merge: d6fea46e086bb 5b554b0a29ce9 Author: Mark Brown Date: Mon Jun 22 15:36:06 2020 +0100 Merge series "ASoC: merge snd_soc_component_read() and snd_soc_component_read32()" from Kuninori Morimoto : Hi Mark Because we can use "read" function which is using "regmap" or "driver", current ALSA SoC drivers are using both snd_soc_component_read() // for regmap snd_soc_component_read32() // for driver callback These are similar but needs different parameter. This patch aggressively merge snd_soc_component_read() and _read32(), and makes snd_soc_component_read/write() as generally style. New read doesn't return error if it failed, thus, it can't keep compatibility, but assuming it is not a big problem. Because 1) it will indicate error message, 2) it can do nothing anyway if it fails "read". [02/16] patch is not directly connected to read function merging, but need to be apply after [01/16]. Kuninori Morimoto (16): ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32() ASoC: soc-component: use io_mutex correctly ASoC: pxa: rename to snd_soc_component_read() ASoC: atmel: rename to snd_soc_component_read() ASoC: codecs: rename to snd_soc_component_read() ASoC: codecs: wcd*: rename to snd_soc_component_read() ASoC: codecs: tlv*: rename to snd_soc_component_read() ASoC: codecs: max*: rename to snd_soc_component_read() ASoC: codecs: msm*: rename to snd_soc_component_read() ASoC: codecs: alc*: rename to snd_soc_component_read() ASoC: codecs: wm*: rename to snd_soc_component_read() ASoC: codecs: rt*: rename to snd_soc_component_read() ASoC: codecs: da*: rename to snd_soc_component_read() ASoC: codecs: cs*: rename to snd_soc_component_read() ASoC: codecs: ak*: rename to snd_soc_component_read() ASoC: remove snd_soc_component_read32() include/sound/soc-component.h | 4 +- sound/soc/atmel/atmel-pdmic.c | 4 +- sound/soc/codecs/88pm860x-codec.c | 14 ++--- sound/soc/codecs/ab8500-codec.c | 8 +-- sound/soc/codecs/ad1980.c | 4 +- sound/soc/codecs/ak4458.c | 2 +- sound/soc/codecs/ak4535.c | 4 +- sound/soc/codecs/ak4613.c | 4 +- sound/soc/codecs/ak4671.c | 8 +-- sound/soc/codecs/alc5623.c | 6 +- sound/soc/codecs/alc5632.c | 6 +- sound/soc/codecs/arizona.c | 18 +++--- sound/soc/codecs/cs4270.c | 10 +-- sound/soc/codecs/cs42l42.c | 2 +- sound/soc/codecs/cs42l51.c | 8 +-- sound/soc/codecs/cs42l73.c | 4 +- sound/soc/codecs/cs47l35.c | 10 +-- sound/soc/codecs/cs47l85.c | 10 +-- sound/soc/codecs/da7210.c | 24 ++++---- sound/soc/codecs/da7213.c | 24 ++++---- sound/soc/codecs/da7218.c | 34 +++++------ sound/soc/codecs/da7219-aad.c | 16 ++--- sound/soc/codecs/da7219.c | 20 +++--- sound/soc/codecs/da732x.c | 18 +++--- sound/soc/codecs/da9055.c | 14 ++--- sound/soc/codecs/inno_rk3036.c | 6 +- sound/soc/codecs/madera.c | 49 +++------------ sound/soc/codecs/max98088.c | 12 ++-- sound/soc/codecs/max98090.c | 20 +++--- sound/soc/codecs/max98095.c | 16 ++--- sound/soc/codecs/max9850.c | 2 +- sound/soc/codecs/msm8916-wcd-analog.c | 14 ++--- sound/soc/codecs/msm8916-wcd-digital.c | 16 ++--- sound/soc/codecs/nau8822.c | 6 +- sound/soc/codecs/rt1305.c | 2 +- sound/soc/codecs/rt298.c | 2 +- sound/soc/codecs/rt5616.c | 2 +- sound/soc/codecs/rt5631.c | 32 +++++----- sound/soc/codecs/rt5640.c | 10 +-- sound/soc/codecs/rt5645.c | 16 ++--- sound/soc/codecs/rt5651.c | 6 +- sound/soc/codecs/rt5659.c | 14 ++--- sound/soc/codecs/rt5660.c | 2 +- sound/soc/codecs/rt5663.c | 34 +++++------ sound/soc/codecs/rt5665.c | 16 ++--- sound/soc/codecs/rt5668.c | 16 ++--- sound/soc/codecs/rt5670.c | 18 +++--- sound/soc/codecs/rt5682-i2c.c | 2 +- sound/soc/codecs/rt5682.c | 19 +++--- sound/soc/codecs/sgtl5000.c | 16 ++--- sound/soc/codecs/sta32x.c | 4 +- sound/soc/codecs/tas2552.c | 4 +- sound/soc/codecs/tas5720.c | 4 +- sound/soc/codecs/tda7419.c | 9 +-- sound/soc/codecs/tlv320aic23.c | 14 ++--- sound/soc/codecs/tlv320aic26.c | 4 +- sound/soc/codecs/tlv320aic32x4.c | 16 ++--- sound/soc/codecs/tlv320aic3x.c | 14 ++--- sound/soc/codecs/tscs42xx.c | 4 +- sound/soc/codecs/tscs454.c | 24 ++------ sound/soc/codecs/wcd-clsh-v2.c | 2 +- sound/soc/codecs/wcd9335.c | 48 +++++++-------- sound/soc/codecs/wcd934x.c | 52 ++++++++-------- sound/soc/codecs/wm2200.c | 4 +- sound/soc/codecs/wm5100.c | 18 +++--- sound/soc/codecs/wm5110.c | 6 +- sound/soc/codecs/wm8350.c | 32 +++++----- sound/soc/codecs/wm8400.c | 50 +++++++-------- sound/soc/codecs/wm8510.c | 28 ++++----- sound/soc/codecs/wm8523.c | 6 +- sound/soc/codecs/wm8580.c | 12 ++-- sound/soc/codecs/wm8711.c | 8 +-- sound/soc/codecs/wm8728.c | 10 +-- sound/soc/codecs/wm8731.c | 6 +- sound/soc/codecs/wm8750.c | 8 +-- sound/soc/codecs/wm8753.c | 42 ++++++------- sound/soc/codecs/wm8770.c | 2 +- sound/soc/codecs/wm8776.c | 2 +- sound/soc/codecs/wm8804.c | 2 +- sound/soc/codecs/wm8900.c | 22 +++---- sound/soc/codecs/wm8903.c | 20 +++--- sound/soc/codecs/wm8904.c | 16 ++--- sound/soc/codecs/wm8940.c | 32 +++++----- sound/soc/codecs/wm8955.c | 2 +- sound/soc/codecs/wm8958-dsp2.c | 18 +++--- sound/soc/codecs/wm8960.c | 20 +++--- sound/soc/codecs/wm8961.c | 58 +++++++++--------- sound/soc/codecs/wm8962.c | 31 +++++----- sound/soc/codecs/wm8971.c | 8 +-- sound/soc/codecs/wm8974.c | 24 ++++---- sound/soc/codecs/wm8978.c | 12 ++-- sound/soc/codecs/wm8983.c | 8 +-- sound/soc/codecs/wm8985.c | 8 +-- sound/soc/codecs/wm8988.c | 12 ++-- sound/soc/codecs/wm8990.c | 18 +++--- sound/soc/codecs/wm8991.c | 38 ++++++------ sound/soc/codecs/wm8993.c | 28 ++++----- sound/soc/codecs/wm8994.c | 60 +++++++++--------- sound/soc/codecs/wm8995.c | 16 ++--- sound/soc/codecs/wm8996.c | 30 ++++----- sound/soc/codecs/wm8998.c | 8 +-- sound/soc/codecs/wm9081.c | 36 +++++------ sound/soc/codecs/wm9090.c | 4 +- sound/soc/codecs/wm9713.c | 2 +- sound/soc/codecs/wm_hubs.c | 30 ++++----- sound/soc/fsl/fsl_audmix.c | 10 +-- sound/soc/fsl/fsl_easrc.c | 5 +- sound/soc/meson/aiu-encoder-i2s.c | 3 +- sound/soc/meson/aiu-fifo-i2s.c | 3 +- sound/soc/meson/aiu-fifo.c | 3 +- sound/soc/pxa/mioa701_wm9713.c | 8 +-- sound/soc/soc-ac97.c | 7 +-- sound/soc/soc-component.c | 84 ++++++++++++++------------ sound/soc/soc-dapm.c | 31 ++++------ sound/soc/soc-ops.c | 43 +++---------- 115 files changed, 854 insertions(+), 963 deletions(-) -- 2.25.1 commit d6fea46e086bba24640fb78ae992e90518e63580 Author: Vlad Karpovich Date: Fri Jun 19 16:26:51 2020 -0500 ASoC: wm_adsp: Add controls for calibration and diagnostic FW Exposed additional mixer controls to select calibration or diagnostic firmware. 'Calibration' --> chip-dsp-spk-cali.wmfw (.bin) 'Diagnostic' --> chip-dsp-spk-diag.wmfw (.bin) Signed-off-by: Vlad Karpovich Signed-off-by: David Rhodes Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20200619212651.2739-1-david.rhodes@cirrus.com Signed-off-by: Mark Brown commit 5b554b0a29ce9610e3c237c77a1f76db87454b72 Author: Kuninori Morimoto Date: Tue Jun 16 14:21:55 2020 +0900 ASoC: remove snd_soc_component_read32() No driver is using snd_soc_component_read32() anymore. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877dw74mbv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8a6fc33ba64a79c0bdb1eb8f8ebb2632af0ba36a Author: Kuninori Morimoto Date: Tue Jun 16 14:21:50 2020 +0900 ASoC: codecs: ak*: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878sgn4mc0.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a11f8a1c33ed098097ac7876a2e823c589c30b6f Author: Kuninori Morimoto Date: Tue Jun 16 14:21:46 2020 +0900 ASoC: codecs: cs*: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a7134mc4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2925b58209c9acfb89b036a0d0eb5b0ebc3abb3a Author: Kuninori Morimoto Date: Tue Jun 16 14:21:42 2020 +0900 ASoC: codecs: da*: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Acked-by: Adam Thomson Link: https://lore.kernel.org/r/87bllj4mc8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 467a2553dd21c7f0468ed9e651fa4b07fd082b93 Author: Kuninori Morimoto Date: Tue Jun 16 14:21:37 2020 +0900 ASoC: codecs: rt*: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87d05z4mce.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6d75dfc3e86500eda78fc2ddc6e2cdb52b9e2a1a Author: Kuninori Morimoto Date: Tue Jun 16 14:21:29 2020 +0900 ASoC: codecs: wm*: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eeqf4mcl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e896c1ed67ef5a4df301d88ea77835e1eb4cf102 Author: Kuninori Morimoto Date: Tue Jun 16 14:21:05 2020 +0900 ASoC: codecs: alc*: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ftav4md9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a6f80d99b939f576725b1dfd0c2b89808e101e97 Author: Kuninori Morimoto Date: Tue Jun 16 14:20:59 2020 +0900 ASoC: codecs: msm*: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7vb4mdf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1227f601ba34773b43969f46773430788df9e6a9 Author: Kuninori Morimoto Date: Tue Jun 16 14:20:53 2020 +0900 ASoC: codecs: max*: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87imfr4mdl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e348cf543426762d7babea49712534f95d0779b9 Author: Kuninori Morimoto Date: Tue Jun 16 14:20:46 2020 +0900 ASoC: codecs: tlv*: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k1074mds.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit eaf2767cad9311e864e2736e2152d31799b23eda Author: Kuninori Morimoto Date: Tue Jun 16 14:20:40 2020 +0900 ASoC: codecs: wcd*: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/87lfkn4mdy.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 981abdfe99950d6eff2481fb4c19aeeac50d0ca9 Author: Kuninori Morimoto Date: Tue Jun 16 14:20:33 2020 +0900 ASoC: codecs: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mu534me5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f0daed1a49985fed34d7ef96ad5f39534e8a5f92 Author: Kuninori Morimoto Date: Tue Jun 16 14:20:23 2020 +0900 ASoC: atmel: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8pj4mef.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2f86f20bafc3252b4c60152db8d2976414970513 Author: Kuninori Morimoto Date: Tue Jun 16 14:20:15 2020 +0900 ASoC: pxa: rename to snd_soc_component_read() We need to use snd_soc_component_read() instead of snd_soc_component_read32() This patch renames _read32() to _read() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pn9z4men.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e8712315c44d2e7dfc4d29254941831ed2ddcaef Author: Kuninori Morimoto Date: Tue Jun 16 14:19:52 2020 +0900 ASoC: soc-component: use io_mutex correctly component has io_mutex, but it had been used at snd_soc_component_update_bits_legacy() only which does read and write. static int snd_soc_component_update_bits_legacy(...) { ... => mutex_lock(&component->io_mutex); ... old = snd_soc_component_read(...); ... ret = snd_soc_component_write(...); ... => mutex_unlock(&component->io_mutex); ... } It is pointless if it is not used with both read and write functions. This patch uses io_mutex correctly with read/write. Here, xxx_no_lock() is local functions. static int snd_soc_component_read(...) { ... => mutex_lock(&component->io_mutex); val = soc_component_read_no_lock(...); => mutex_unlock(&component->io_mutex); ... } static int snd_soc_component_write(...) { ... => mutex_lock(&component->io_mutex); ret = soc_component_write_no_lock(...); => mutex_unlock(&component->io_mutex); ... } static int snd_soc_component_update_bits_legacy(...) { ... => mutex_lock(&component->io_mutex); ... old = soc_component_read_no_lock(...); ... ret = soc_component_write_no_lock(...); ... => mutex_unlock(&component->io_mutex); ... } Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r1uf4mfa.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit cf6e26c71bfdff823fd40945b07666d75f1e1412 Author: Kuninori Morimoto Date: Tue Jun 16 14:19:41 2020 +0900 ASoC: soc-component: merge snd_soc_component_read() and snd_soc_component_read32() We had read/write function for Codec, Platform, etc, but these has been merged into snd_soc_component_read/write(). Internally, it is using regmap or driver function. In read case, each styles are like below regmap ret = regmap_read(..., reg, &val); driver function val = xxx->read(..., reg); Because of this kind of different style, to keep same read style, when we merged each read function into snd_soc_component_read(), we created snd_soc_component_read32(), like below. commit 738b49efe6c6 ("ASoC: add snd_soc_component_read32") (1) val = snd_soc_component_read32(component, reg); (2) ret = snd_soc_component_read(component, reg, &val); Many drivers are using snd_soc_component_read32(), and some drivers are using snd_soc_component_read() today. In generally, we don't check read function successes, because, we will have many other issues at initial timing if read function didn't work. Now we can use soc_component_err() when error case. This means, it is easy to notice if error occurred. This patch aggressively merge snd_soc_component_read() and _read32(), and makes snd_soc_component_read/write() as generally style. This patch do 1) merge snd_soc_component_read() and snd_soc_component_read32() 2) it uses soc_component_err() when error case (easy to notice) 3) keeps read32 for now by #define 4) update snd_soc_component_read() for all drivers Because _read() user drivers are not too many, this patch changes all user drivers. Signed-off-by: Kuninori Morimoto Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/87sgev4mfl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5cbd3ebde859bd43bd0584c146060638b1a3abb4 Author: Alain Michaud Date: Mon Jun 22 13:30:28 2020 +0000 Bluetooth: use configured params for ext adv When the extended advertisement feature is enabled, a hardcoded min and max interval of 0x8000 is used. This patch fixes this issue by using the configured min/max value. This was validated by setting min/max in main.conf and making sure the right setting is applied: < HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25 #93 [hci0] 10.953011 … Min advertising interval: 181.250 msec (0x0122) Max advertising interval: 181.250 msec (0x0122) … Signed-off-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Daniel Winkler Signed-off-by: Marcel Holtmann commit 0f959e19fadf00638b686fdeb70e24dfcc7bbcac Merge: 17ed808ad2431 e370f886fefc2 Author: Borislav Petkov Date: Mon Jun 22 15:28:01 2020 +0200 Merge branch 'edac-ghes' into edac-for-next commit 46e906144c3f4b0a7b6dcc7713fafad65b1859e0 Author: André Almeida Date: Fri Jun 19 21:20:36 2020 -0300 docs: block: Create blk-mq documentation Create a documentation providing a background and explanation around the operation of the Multi-Queue Block IO Queueing Mechanism (blk-mq). The reference for writing this documentation was the source code and "Linux Block IO: Introducing Multi-queue SSD Access on Multi-core Systems", by Axboe et al. Signed-off-by: André Almeida Reviewed-by: Jens Axboe Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20200620002036.113000-1-andrealmeid@collabora.com Signed-off-by: Jonathan Corbet commit 3af8588c77186bf08e55e7281da83d88373481d7 Author: Christian Brauner Date: Mon Jun 8 17:28:50 2020 +0200 fork: fold legacy_clone_args_valid() into _do_fork() This separate helper only existed to guarantee the mutual exclusivity of CLONE_PIDFD and CLONE_PARENT_SETTID for legacy clone since CLONE_PIDFD abuses the parent_tid field to return the pidfd. But we can actually handle this uniformely thus removing the helper. For legacy clone we can detect that CLONE_PIDFD is specified in conjunction with CLONE_PARENT_SETTID because they will share the same memory which is invalid and for clone3() setting the separate pidfd and parent_tid fields to the same memory is bogus as well. So fold that helper directly into _do_fork() by detecting this case. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Al Viro Cc: Geert Uytterhoeven Cc: "Matthew Wilcox (Oracle)" Cc: "Peter Zijlstra (Intel)" Cc: linux-m68k@lists.linux-m68k.org Cc: x86@kernel.org Signed-off-by: Christian Brauner commit 51fe3881a29b034029f56da107ce0bb06025e041 Author: Rikard Falkeborn Date: Wed Jun 10 01:00:29 2020 +0200 soundwire: qcom: Constify static structs qcom_swrm_port_ops and qcom_swrm_ops are not modified and can be made const to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 18266 3056 256 21578 544a drivers/soundwire/qcom.o After: text data bss dec hex filename 18426 2896 256 21578 544a drivers/soundwire/qcom.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200609230029.69802-1-rikard.falkeborn@gmail.com Signed-off-by: Vinod Koul commit 5a6b5d53833c92f05d9892e96d9034ff05df551d Author: Dan Carpenter Date: Fri May 8 14:42:46 2020 +0300 memory: tegra: Delete some dead code The debugfs_create_dir() function never returns NULL and anyway the correct behavior is to ignore errors in this situation. The debugfs_create_file() will become a no-op if "emc->debugfs.root" is an error pointer. Signed-off-by: Dan Carpenter Signed-off-by: Thierry Reding commit 2de758997e69a5f971716c90a9cdc410133283d7 Author: Arnd Bergmann Date: Wed Apr 8 21:00:30 2020 +0200 memory: tegra: Avoid unused function warnings The suspend/resume functions have no callers depending on configuration, so they must be marked __maybe_unused to avoid these harmless warnings: drivers/memory/tegra/tegra186.c:1578:12: error: 'tegra186_mc_resume' defined but not used [-Werror=unused-function] 1578 | static int tegra186_mc_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~ drivers/memory/tegra/tegra186.c:1573:12: error: 'tegra186_mc_suspend' defined but not used [-Werror=unused-function] 1573 | static int tegra186_mc_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~ Fixes: 177602b00641 ("memory: tegra: Add system sleep support") Signed-off-by: Arnd Bergmann Acked-by: Thierry Reding Signed-off-by: Thierry Reding commit 1b93fadf2a7e40d221513247019925425384d8d1 Author: Geert Uytterhoeven Date: Wed May 6 14:32:36 2020 +0200 memory: tegra: Drop The Tegra EMC scaling support code is not a clock provider, but merely a clock consumer, and thus does not need to include . Fixes: 0bf368c5b2cf ("memory: tegra: Add EMC scaling support code for Tegra210") Signed-off-by: Geert Uytterhoeven Signed-off-by: Thierry Reding commit c3d4eb3bf6ad32466555b31094f33a299444f795 Author: Christophe JAILLET Date: Wed May 6 22:09:07 2020 +0200 memory: tegra: Fix an error handling path in tegra186_emc_probe() The call to tegra_bpmp_get() must be balanced by a call to tegra_bpmp_put() in case of error, as already done in the remove function. Add an error handling path and corresponding goto. Fixes: 52d15dd23f0b ("memory: tegra: Support DVFS on Tegra186 and later") Signed-off-by: Christophe JAILLET Signed-off-by: Thierry Reding commit 930c68180ffb059647d75ee28918bcb87f18d788 Author: Dmitry Osipenko Date: Thu Mar 19 22:36:48 2020 +0300 memory: tegra30-emc: Poll EMC-CaR handshake instead of waiting for interrupt The memory clock-rate change could be running on a non-boot CPU, while the boot CPU handles the EMC interrupt. This introduces an unnecessary latency since boot CPU should handle the interrupt and then notify the sibling CPU about clock-rate change completion. In some rare cases boot CPU could be in uninterruptible state for a significant time (like in a case of KASAN + NFS root), it could get to the point that completion timeouts before boot CPU gets a chance to handle interrupt. The solution is to get rid of the completion and replace it with interrupt-status polling. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit adbcec8862cd7e3737e1488a98239f95dc45688f Author: Dmitry Osipenko Date: Thu Mar 19 22:36:47 2020 +0300 memory: tegra20-emc: Poll EMC-CaR handshake instead of waiting for interrupt The memory clock-rate change could be running on a non-boot CPU, while the boot CPU handles the EMC interrupt. This introduces an unnecessary latency since boot CPU should handle the interrupt and then notify the sibling CPU about clock-rate change completion. In some rare cases boot CPU could be in uninterruptible state for a significant time (like in a case of KASAN + NFS root), it could get to the point that completion timeouts before boot CPU gets a chance to handle interrupt. The solution is to get rid of the completion and replace it with interrupt-status polling. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 0553d7b204ef48091e76753175d21d0c30b7ae2a Author: Thierry Reding Date: Fri Apr 3 20:03:15 2020 +0200 memory: tegra: Support derated timings on Tegra210 Derated timings are used to ensure that the memory chips keep operating correctly at high temperatures. This adds code to support polling of the chip operating state when high temperatures are measured on the chip and change the refresh mode accordingly. Under very high temperatures, the driver will switch to the derated tables to ensure proper operation of the memory chips. Signed-off-by: Thierry Reding commit 9b9d8632f51f3609dfdfe8efc3c1e4e773c6c385 Author: Joseph Lo Date: Wed May 29 16:21:37 2019 +0800 memory: tegra: Add EMC scaling sequence code for Tegra210 This patch includes the sequence for clock tuning and the dynamic training mechanism for the clock above 800MHz. And historically there have been different sequences to change the EMC clock. The sequence to be used is specified in the EMC table. However, for the currently supported upstreaming platform, only the most recent sequence is used. So only support that in this patch. Based on the work of Peter De Schrijver . Signed-off-by: Joseph Lo Signed-off-by: Thierry Reding commit 10de21148f7d28c9e918aaee7cede74a7d506e24 Author: Joseph Lo Date: Wed May 29 16:21:36 2019 +0800 memory: tegra: Add EMC scaling support code for Tegra210 This is the initial patch for Tegra210 EMC frequency scaling. It has the code to program various aspects of the EMC that are standardized, but it does not yet include the specific programming sequence needed for clock scaling. The driver is designed to support LPDDR4 SDRAM. Devices that use LPDDR4 need to perform training of the RAM before it can be used. Firmware will perform this training during early boot and pass a table of supported frequencies to the kernel via device tree. For the frequencies above 800 MHz, periodic retraining is needed to compensate for changes in timing. This periodic training will have to be performed until the frequency drops back to or below 800 MHz. This driver provides helpers used during this runtime retraining that will be used by the sequence specific code in a follow-up patch. Based on work by Peter De Schrijver . Signed-off-by: Joseph Lo Signed-off-by: Thierry Reding commit 6cc8823ad3e85207dfb4c93f31dcdb05297d1b42 Author: Dmitry Osipenko Date: Fri Mar 13 11:57:39 2020 +0300 memory: tegra: Make debugfs permissions human-readable Replace the symbolic permissions with octals in order to make them readable. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 6d2c66695bf30355bacceb2b0635d3ddaf26cce4 Author: Pierre-Louis Bossart Date: Mon Jun 1 02:21:02 2020 +0800 soundwire: intel: transition to 3 steps initialization Rather than a plain-vanilla init/exit, this patch provides 3 steps in the initialization needed for driver selection, machine driver selection and deal with power rail dependencies. - ACPI scan: this step is done at a very early stage to detect the presence of a SoundWire Controller and enabled links at the BIOS level. This step may be called from the legacy HDaudio driver, which will abort its probe to let the Sound Open Firmware (SOF) handle the hardware. - probe: this step allocates all the required memory and will add a sdw_bus, which in turn will result in identifying all possible Slaves listed below the Controller ACPI companion device. All the information is reported to the parent PCI driver which will select the relevant machine driver. - startup: this last step starts the bus reset, which results in Slave devices reporting as ATTACHED and being enumerated. This step is only done during the card creation stage, after the DSP is powered to account for internal power rail dependencies. These 3 steps are already supported in the Sound Open firmware drivers and upstream. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200531182102.27840-7-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 4ab34412fc62fba29ba00d76cf2c46585b3e5ba3 Author: Pierre-Louis Bossart Date: Mon Jun 1 02:21:01 2020 +0800 soundwire: intel_init: pass link information as platform data It's not clear how this code ever worked, the link information is used in intel.c but never passed as platform_data. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200531182102.27840-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit dd906cc615a5c0f7b95c20200963958c1cc0ea74 Author: Pierre-Louis Bossart Date: Mon Jun 1 02:21:00 2020 +0800 soundwire: intel_init: use devm_ allocation Make error handling simpler with devm_ allocation. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200531182102.27840-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 9cd1c5a721d2e1d767d9add0ebf53c93459ba87c Author: Pierre-Louis Bossart Date: Mon Jun 1 02:20:59 2020 +0800 soundwire: intel_init: remove useless test No need to test link_mask twice Suggested-by: Rander Wang Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200531182102.27840-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 83e129afbe5c4a444c034e981b0f8535889380fe Author: Pierre-Louis Bossart Date: Mon Jun 1 02:20:58 2020 +0800 soundwire: intel: clarify drvdata and remove more indirections The use of drvdata mixes two structures. There was no harm the first structure is embedded as the first element of the second, but that's not good. Make sure all drvdata is based on the 'sdw_cdns' structure. While we are at it, remove indirections for 'dev' and 'cdns' to make the code more readable. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200531182102.27840-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit b6109dd6dc9fbc5dfae1106972d728eba0afd098 Author: Pierre-Louis Bossart Date: Mon Jun 1 02:20:57 2020 +0800 soundwire: intel: cleanups for indirections/logs The code can be simplified a bit to have a more consistent use of 'dev' and 'bus', as well as move definitions around. This will help make the major changes in follow-up patches easier to review. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200531182102.27840-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 1a19b4cb162253fb6a3edbe80d954d066189dcee Author: Thomas Zimmermann Date: Wed Jun 17 10:03:40 2020 +0200 drm/ast: Use per-device logging macros Converts the ast driver to drm_info(), drm_err() and drm_WARN_*(). No functional changes are made. v2: * also convert WARN_*() macros Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200617080340.29584-5-tzimmermann@suse.de commit fa7dbd7688849d1d4d3c69da57a1dce7c24b1e45 Author: Thomas Zimmermann Date: Wed Jun 17 10:03:39 2020 +0200 drm/ast: Upcast from DRM device to ast structure via to_ast_private() All upcasting from struct drm_device to struct ast_private is now performed via to_ast_private(). Using struct drm_device.dev_private is deprecated. The ast variable in ast_crtc_helper_atomic_check() is unused, so removed it. v2: * fix typo in commit message Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Emil Velikov Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200617080340.29584-4-tzimmermann@suse.de commit 5534bc8f184020ace49b1dfdcdc07ad6555968ac Author: Thomas Zimmermann Date: Wed Jun 17 10:03:38 2020 +0200 drm/ast: Remove test for device from ast_pm_freeze() The driver cannot suspend before it has loaded completely. So the test for device pointers is not required. Remove it. v3: * s/them/it/ in commit message Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200617080340.29584-3-tzimmermann@suse.de commit 05f13f5b5996d20a9819e0c6fd0cda4956c8aff9 Author: Thomas Zimmermann Date: Wed Jun 17 10:03:37 2020 +0200 drm/ast: Remove unused code paths for AST 1180 The ast driver contains code paths for AST 1180 chips. The chip is not supported and the rsp code has never been tested. Simplify the driver by removing the AST 1180 code. Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200617080340.29584-2-tzimmermann@suse.de commit 929cfee314d155e61ad84a590c4080885afdb214 Author: Bard Liao Date: Sun May 31 23:18:06 2020 +0800 soundwire: bus: clock_stop: don't deal with UNATTACHED Slave devices We don't need to do anything for the slave if it is unattached during clock stop prepare and exit sequences. Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200531151806.25951-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 908442aa67197bce1d76a6c25165bc56e2f55534 Author: Vinod Koul Date: Tue Jun 16 21:51:40 2020 +0530 soundwire: Replace 'objs' by 'y' `-objs` is designed for building host programs, change to `-y`, more straightforward for device drivers. See Documentation/kbuild/makefiles.rst Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20200616162140.2563535-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit 7de796cac48c0f55974cfe9cff683dfb3b7c71b6 Author: Dennis YC Hsieh Date: Sun Jun 21 22:18:35 2020 +0800 soc: mediatek: cmdq: add set event function Add set event function in cmdq helper functions to set specific event. Signed-off-by: Dennis YC Hsieh Link: https://lore.kernel.org/r/1592749115-24158-12-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit 995818588b6deedbed6b2b9d4c67e59b9afd6c60 Author: Dennis YC Hsieh Date: Sun Jun 21 22:18:32 2020 +0800 soc: mediatek: cmdq: export finalize function Export finalize function to client which helps append eoc and jump command to pkt. Let client decide call finalize or not. Signed-off-by: Dennis YC Hsieh Reviewed-by: CK Hu Acked-by: Chun-Kuang Hu Link: https://lore.kernel.org/r/1592749115-24158-9-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit 613c2e2c7e69e574411e2a3609459e18e91ae3fb Author: Dennis YC Hsieh Date: Sun Jun 21 22:18:26 2020 +0800 soc: mediatek: cmdq: add assign function Add assign function in cmdq helper which assign constant value into internal register by index. Signed-off-by: Dennis YC Hsieh Link: https://lore.kernel.org/r/1592749115-24158-3-git-send-email-dennis-yc.hsieh@mediatek.com Signed-off-by: Matthias Brugger commit 156abe2961601d60a8c2a60c6dc8dd6ce7adcdaf Author: Hans de Goede Date: Sat Jun 6 11:31:50 2020 +0200 pinctrl: baytrail: Fix pin being driven low for a while on gpiod_get(..., GPIOD_OUT_HIGH) The pins on the Bay Trail SoC have separate input-buffer and output-buffer enable bits and a read of the level bit of the value register will always return the value from the input-buffer. The BIOS of a device may configure a pin in output-only mode, only enabling the output buffer, and write 1 to the level bit to drive the pin high. This 1 written to the level bit will be stored inside the data-latch of the output buffer. But a subsequent read of the value register will return 0 for the level bit because the input-buffer is disabled. This causes a read-modify-write as done by byt_gpio_set_direction() to write 0 to the level bit, driving the pin low! Before this commit byt_gpio_direction_output() relied on pinctrl_gpio_direction_output() to set the direction, followed by a call to byt_gpio_set() to apply the selected value. This causes the pin to go low between the pinctrl_gpio_direction_output() and byt_gpio_set() calls. Change byt_gpio_direction_output() to directly make the register modifications itself instead. Replacing the 2 subsequent writes to the value register with a single write. Note that the pinctrl code does not keep track internally of the direction, so not going through pinctrl_gpio_direction_output() is not an issue. This issue was noticed on a Trekstor SurfTab Twin 10.1. When the panel is already on at boot (no external monitor connected), then the i915 driver does a gpiod_get(..., GPIOD_OUT_HIGH) for the panel-enable GPIO. The temporarily going low of that GPIO was causing the panel to reset itself after which it would not show an image until it was turned off and back on again (until a full modeset was done on it). This commit fixes this. This commit also updates the byt_gpio_direction_input() to use direct register accesses instead of going through pinctrl_gpio_direction_input(), to keep it consistent with byt_gpio_direction_output(). Note for backporting, this commit depends on: commit e2b74419e5cc ("pinctrl: baytrail: Replace WARN with dev_info_once when setting direct-irq pin to output") Cc: stable@vger.kernel.org Fixes: 86e3ef812fe3 ("pinctrl: baytrail: Update gpio chip operations") Signed-off-by: Hans de Goede Acked-by: Mika Westerberg Signed-off-by: Andy Shevchenko commit e87daf0bd83cb82576940d0a6e0e48b01d18c939 Author: Andy Shevchenko Date: Fri Jun 12 17:50:06 2020 +0300 pinctrl: baytrail: Drop no-op ACPI_PTR() call Since we dependent on ACPI, there is no need to use ACPI_PTR() which is a no-op in this case. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit e359a6f03ba3b35bc573c3993173a273041e4bc1 Author: Andy Shevchenko Date: Fri Jun 12 17:50:05 2020 +0300 pinctrl: lynxpoint: Drop no-op ACPI_PTR() call Since we dependent on ACPI, there is no need to use ACPI_PTR() which is a no-op in this case. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 11ac16a4290b72efa8328cb144b727f3cbbdfa6a Author: Marc Zyngier Date: Mon Jun 15 21:03:30 2020 +0100 KVM: arm64: Simplify PtrAuth alternative patching We currently decide to execute the PtrAuth save/restore code based on a set of branches that evaluate as (ARM64_HAS_ADDRESS_AUTH_ARCH || ARM64_HAS_ADDRESS_AUTH_IMP_DEF). This can be easily replaced by a much simpler test as the ARM64_HAS_ADDRESS_AUTH capability is exactly this expression. Suggested-by: Mark Rutland Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit 655169cec7bbf84f59faa9f824edb581eaecf78d Author: Marc Zyngier Date: Thu Jun 11 11:26:09 2020 +0100 KVM: arm64: Check HCR_EL2 instead of shadow copy to swap PtrAuth registers When save/restoring PtrAuth registers between host and guest, it is pretty useless to fetch the in-memory state, while we have the right state in the HCR_EL2 system register. Use that instead. Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit aff7cce0d337f5468470d614ef83a507dcf4c93f Author: Marc Zyngier Date: Thu Jun 11 13:20:28 2020 +0100 KVM: arm64: Allow PtrAuth to be enabled from userspace on non-VHE systems Now that the scene is set for enabling PtrAuth on non-VHE, drop the restrictions preventing userspace from enabling it. Acked-by: Andrew Scull Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit dfb0589c8fff9dde809b9013335a6b8019b299b8 Author: Marc Zyngier Date: Thu Jun 11 12:18:58 2020 +0100 KVM: arm64: Allow ARM64_PTR_AUTH when ARM64_VHE=n We currently prevent PtrAuth from even being built if KVM is selected, but VHE isn't. It is a bit of a pointless restriction, since we also check this at run time (rejecting the enabling of PtrAuth for the vcpu if we're not running with VHE). Just drop this apparently useless restriction. Acked-by: Andrew Scull Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit 4a95a1b20da31db0c1ca5289a892fef21f691f27 Author: Marc Zyngier Date: Thu Jun 11 11:54:01 2020 +0100 KVM: arm64: Enable Address Authentication at EL2 if available While initializing EL2, enable Address Authentication if detected from EL1. We still use the EL1-provided keys though. Acked-by: Andrew Scull Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit 105fb38124a490f38e9c1e23bb4c4a0b6ba12fdb Author: Christophe Leroy Date: Thu Jun 18 12:07:46 2020 +0000 powerpc/8xx: Modify ptep_get() Move ptep_get() close to pte_update(), in an ifdef section already dedicated to powerpc 8xx. This section contains explanation about the layout of page table entries. Also modify it to return 4 times the pte value instead of padding with zeroes. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9f2df6621fcaf9eba15fadc61c169d0c8e2fb849.1592481938.git.christophe.leroy@csgroup.eu commit 86590e524ee834b629afc55d8e5786091fbf84cc Author: Aneesh Kumar K.V Date: Mon Jun 22 12:10:19 2020 +0530 powerpc/mm/book3s64: Skip 16G page reservation with radix With hash translation, the hypervisor can hint the LPAR about 16GB contiguous range via ibm,expected#pages. The kernel marks the range specified in the device tree as reserved. Avoid doing this when using radix translation. Radix translation only supports 1G gigantic hugepage and kernel can do the 1G gigantic hugepage allocation via early memblock reservation. This can be done because with radix translation pages are not required to be contiguous on the host. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200622064019.16682-1-aneesh.kumar@linux.ibm.com commit b608013ac5b55a2e42d8734f29f9757b75d26165 Author: Konrad Dybcio Date: Mon Jun 22 11:02:52 2020 +0200 clk: qcom: smd: Add support for SDM660 rpm clocks Add rpm smd clocks, PMIC and bus clocks which are required on SDM630/660 (and APQ variants) for clients to vote on. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200622090252.36568-1-konradybcio@gmail.com Signed-off-by: Stephen Boyd commit 9ebc0617d676e801d54b85d89c44abdbf6e25ff8 Merge: 6eb81373434b0 e8c849c2a8e8d Author: Stephen Boyd Date: Mon Jun 22 02:09:43 2020 -0700 Merge branch 'clk-doc' into clk-next * clk-doc: clk: add function documentation for clk_hw_round_rate() commit e8c849c2a8e8d300922399ac02065bebf53393a6 Author: Sarang Mairal Date: Wed Jun 10 21:19:41 2020 -0500 clk: add function documentation for clk_hw_round_rate() Information about usage and prerequisites for this API. Signed-off-by: Sarang Mairal Link: https://lore.kernel.org/r/20200611021941.786-2-sarangmairal@gmail.com Signed-off-by: Stephen Boyd commit e190f57df3c7e7713687905c14e72fbcbd81c5e4 Author: Álvaro Fernández Rojas Date: Thu Jun 4 15:59:05 2020 +0200 leds-bcm6328: support second hw blinking interval Right now the driver uses only 3 LED modes: 0: On 1: HW Blinking (Interval 1) 3: Off However, the controller supports a second HW blinking interval, which results in 4 possible LED modes: 0: On 1: HW Blinking (Interval 1) 2: HW Blinking (Interval 2) 3: Off Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Pavel Machek commit b5684a73d2e9ce13d253ecb824ecd1e327b63773 Author: Johan Hovold Date: Mon Jun 1 15:39:50 2020 +0200 leds: drop redundant struct-device pointer casts Drop the pointless and needlessly confusing casts of struct-device pointers. Signed-off-by: Johan Hovold Signed-off-by: Pavel Machek commit 47a459ecc800a17109d0c496a4e21e478806ee40 Author: Johan Hovold Date: Mon Jun 1 15:39:49 2020 +0200 leds: wm831x-status: fix use-after-free on unbind Several MFD child drivers register their class devices directly under the parent device. This means you cannot blindly do devres conversions so that deregistration ends up being tied to the parent device, something which leads to use-after-free on driver unbind when the class device is released while still being registered. Fixes: 8d3b6a4001ce ("leds: wm831x-status: Use devm_led_classdev_register") Cc: stable # 4.6 Cc: Amitoj Kaur Chawla Signed-off-by: Johan Hovold Signed-off-by: Pavel Machek commit a0972fff09479dd09b731360a3a0b09e4fb4d415 Author: Johan Hovold Date: Mon Jun 1 15:39:48 2020 +0200 leds: lm36274: fix use-after-free on unbind Several MFD child drivers register their class devices directly under the parent device. This means you cannot use devres so that deregistration ends up being tied to the parent device, something which leads to use-after-free on driver unbind when the class device is released while still being registered. Fixes: 11e1bbc116a7 ("leds: lm36274: Introduce the TI LM36274 LED driver") Cc: stable # 5.3 Cc: Dan Murphy Signed-off-by: Johan Hovold Signed-off-by: Pavel Machek commit d584221e683bbd173738603b83a315f27d27d043 Author: Johan Hovold Date: Mon Jun 1 15:39:47 2020 +0200 leds: lm3533: fix use-after-free on unbind Several MFD child drivers register their class devices directly under the parent device. This means you cannot blindly do devres conversions so that deregistration ends up being tied to the parent device, something which leads to use-after-free on driver unbind when the class device is released while still being registered. Fixes: 50154e29e5cc ("leds: lm3533: Use devm_led_classdev_register") Cc: stable # 4.6 Cc: Amitoj Kaur Chawla Signed-off-by: Johan Hovold Signed-off-by: Pavel Machek commit 6f4aa35744f69ed9b0bf5a736c9ca9b44bc1dcea Author: Johan Hovold Date: Mon Jun 1 15:39:46 2020 +0200 leds: da903x: fix use-after-free on unbind Several MFD child drivers register their class devices directly under the parent device. This means you cannot blindly do devres conversions so that deregistration ends up being tied to the parent device, something which leads to use-after-free on driver unbind when the class device is released while still being registered. Fixes: eed16255d66b ("leds: da903x: Use devm_led_classdev_register") Cc: stable # 4.6 Cc: Amitoj Kaur Chawla Signed-off-by: Johan Hovold Signed-off-by: Pavel Machek commit eca21c2d8655387823d695b26e6fe78cf3975c05 Author: Johan Hovold Date: Mon Jun 1 15:39:45 2020 +0200 leds: 88pm860x: fix use-after-free on unbind Several MFD child drivers register their class devices directly under the parent device. This means you cannot blindly do devres conversions so that deregistration ends up being tied to the parent device, something which leads to use-after-free on driver unbind when the class device is released while still being registered. Fixes: 375446df95ee ("leds: 88pm860x: Use devm_led_classdev_register") Cc: stable # 4.6 Cc: Amitoj Kaur Chawla Signed-off-by: Johan Hovold Signed-off-by: Pavel Machek commit 985b1f596f9ed56f42b8c2280005f943e1434c06 Author: Arnd Bergmann Date: Tue May 5 16:19:17 2020 +0200 leds: lm355x: avoid enum conversion warning clang points out that doing arithmetic between diffent enums is usually a mistake: drivers/leds/leds-lm355x.c:167:28: warning: bitwise operation between different enumeration types ('enum lm355x_tx2' and 'enum lm355x_ntc') [-Wenum-enum-conversion] reg_val = pdata->pin_tx2 | pdata->ntc_pin; ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ drivers/leds/leds-lm355x.c:178:28: warning: bitwise operation between different enumeration types ('enum lm355x_tx2' and 'enum lm355x_ntc') [-Wenum-enum-conversion] reg_val = pdata->pin_tx2 | pdata->ntc_pin | pdata->pass_mode; ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ In this driver, it is intentional, so add a cast to hide the false-positive warning. It appears to be the only instance of this warning at the moment. Fixes: b98d13c72592 ("leds: Add new LED driver for lm355x chips") Signed-off-by: Arnd Bergmann Signed-off-by: Pavel Machek commit 528c1d71ec954347fa240837e3c30ead0925dcb3 Author: Flavio Suligoi Date: Wed Jun 3 11:15:16 2020 +0200 dt-bindings: leds: fix macro names for pca955x The documentation reports the wrong macro names related to the pca9532 instead of the pca955x Signed-off-by: Flavio Suligoi Acked-by: Rob Herring Signed-off-by: Pavel Machek commit 30dee220c8502a478477cd503729994e8dc850c2 Author: Konrad Dybcio Date: Mon Jun 22 09:57:41 2020 +0200 soc: qcom: socinfo: Add socinfo entry for SDM630 This patch adds missing soc ID for SDM630. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20200622075749.21925-4-konradybcio@gmail.com Signed-off-by: Bjorn Andersson commit 0472567ba86469eb9faabc917f4c3084c08cf0c2 Author: Andy Shevchenko Date: Mon Jun 15 17:30:15 2020 +0300 pinctrl: lynxpoint: Introduce helpers to enable or disable input Introduce couple of helpers to enable or disable input. i.e. lp_gpio_enable_input() and lp_gpio_disable_input(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit f3e7d2812247342c415c76ba75fd79df57ee2a74 Author: Andy Shevchenko Date: Wed Jun 10 21:14:49 2020 +0300 pinctrl: lynxpoint: Make use of for_each_requested_gpio() Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit d1bfd0229ec4deb53e61f95c050b524152fd0d9e Author: Andy Shevchenko Date: Wed Jun 10 21:14:49 2020 +0300 pinctrl: intel: Make use of for_each_requested_gpio_in_range() Make use of for_each_requested_gpio_in_range() instead of home grown analogue. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit e64fbfa51e8fc4eeca2d2bbf0d31a30a15734229 Author: Andy Shevchenko Date: Fri Jun 12 17:50:00 2020 +0300 pinctrl: intel: Protect IO in few call backs by lock Protect IO in intel_gpio_get_direction(), intel_gpio_community_irq_handler(), intel_config_get_debounce() and intel_config_get_pull() by lock. Even for simple readl() we better serialize IO to avoid potential problems. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 81ab5542d7978f41a2b41c0f325b45980a478c6f Author: Andy Shevchenko Date: Fri Jun 12 17:49:59 2020 +0300 pinctrl: intel: Split intel_config_get() to three functions Split intel_config_get() to three functions, i.e. intel_config_get() and two helpers intel_config_get_pull() and intel_config_get_debounce() to be symmetrical with intel_config_set*(). Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 8fff0427d1b2b47469496dbcf3f846dab0cccc7b Author: Andy Shevchenko Date: Fri Jun 12 17:49:58 2020 +0300 pinctrl: intel: Drop the only label in the code for consistency Drop the only label in the code, i.e. in intel_config_set_debounce(), for consistency with the rest. In entire driver we use multipoint return. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit bb2f43d49b72c8497dba53a44fc41bea03d4ab9e Author: Andy Shevchenko Date: Fri Jun 12 17:49:57 2020 +0300 pinctrl: intel: Get rid of redundant 'else' in intel_config_set_debounce() In a code like if (...) { ... goto label; } else { ... } the 'else' keyword is redundant. Get rid of it for better readability. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 86851bbce1a332b0658519386041fe430f4e9e39 Author: Andy Shevchenko Date: Fri Jun 12 17:49:56 2020 +0300 pinctrl: intel: Make use of IRQ_RETVAL() Instead of using bitwise operations against returned values, which is a bit fragile, convert IRQ handler to count amount of GPIO groups, where at least one interrupt happened, and convert it to returned value by IRQ_RETVAL() macro. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit f62cdde5483957fc28249a9fc691e892e6b38e85 Author: Andy Shevchenko Date: Fri Jun 12 17:49:55 2020 +0300 pinctrl: intel: Reduce scope of the lock In some cases lock covers unneeded calls and operations. Reduce scope of the lock in such cases. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit af7e3eeb84e27fcfd1f46a80f111c8c72c206776 Author: Andy Shevchenko Date: Fri Jun 12 17:49:54 2020 +0300 pinctrl: intel: Disable input and output buffer when switching to GPIO It's possible scenario that pin has been in different mode, while the respective GPIO register has a leftover output buffer enabled. In such case when we request GPIO it will switch to GPIO mode, and thus to output with unknown value, followed by switching to input mode. This can produce a glitch on the pin. Disable input and output buffer when switching to GPIO to avoid potential glitches. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 293428f93260d45f712a2d9f895bc0def0b34a3d Author: Andy Shevchenko Date: Tue Jun 9 21:24:49 2020 +0300 pinctrl: cherryview: Re-use data structures from pinctrl-intel.h (part 3) We have some data structures duplicated across the drivers. Let's deduplicate them by using struct intel_pinctrl_soc_data, struct intel_community and struct intel_pinctrl_context that are being provided by pinctrl-intel.h. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: Mika Westerberg commit c8f8f65ea8ebc50aba7ab9741b3d0343ddf63d7f Author: Andy Shevchenko Date: Tue Jun 9 21:24:48 2020 +0300 pinctrl: intel: Allow drivers to define ACPI address space ID Individual drivers may install ACPI OpRegion handlers based on address space ID which differs from community to community. Add special field in the struct intel_community for that purpose. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: Mika Westerberg commit 42fecd55c772549b88ec10841b7f4ab2330c44b5 Author: Andy Shevchenko Date: Tue Jun 9 21:24:47 2020 +0300 pinctrl: intel: Allow drivers to define total amount of IRQs per community Some of the pin control devices may not be capable to generate IRQ per each pin in the community. Allow individual drivers to define total amount of IRQs per community. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: Mika Westerberg commit bfc8a4baec9377b3fdd2bbeafaf5a7f2c95b1151 Author: Andy Shevchenko Date: Tue Jun 9 21:24:46 2020 +0300 pinctrl: cherryview: Convert chv_writel() to use chv_padreg() chv_writel() is now solely used for cases where we write data to the PAD registers. In order to simplify callers, calculate register address inside chv_writel(). Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: Mika Westerberg commit 99fd6512278e08a0fb264e3b83eccbbf0ff30967 Author: Andy Shevchenko Date: Tue Jun 9 21:24:45 2020 +0300 pinctrl: cherryview: Introduce helpers to IO with common registers Pin control device and effectively the single community in it has a set of common registers. It's good to have a helpers to IO on them. Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: Mika Westerberg commit 4e7293e3a2a367d0935925988acfd941549ce489 Author: Andy Shevchenko Date: Tue Jun 9 21:24:44 2020 +0300 pinctrl: cherryview: Introduce chv_readl() helper There are plenty of places where we call readl(chv_padreg(pctrl, offset, ...)); Replace them with newly introduced chv_readl() helper chv_readl(pctrl, offset, ...); Signed-off-by: Andy Shevchenko Acked-by: Linus Walleij Acked-by: Mika Westerberg commit eac99d38f861893cf818fa1d0c8ebe75916039c1 Author: Faiz Abbas Date: Tue May 19 13:50:27 2020 +0530 arm64: dts: ti: k3-am654-main: Update otap-del-sel values According to the latest AM65x Data Manual[1], a different output tap delay value is optimum for a given speed mode. Update these values. [1] http://www.ti.com/lit/gpn/am6526 Signed-off-by: Faiz Abbas Signed-off-by: Tero Kristo commit 23d160ef6385eb10b8ef0fb9f92798ce2dd4ba23 Author: Grygorii Strashko Date: Sat Jun 13 19:43:46 2020 +0300 arm64: dts: ti: k3-j721e-mcu-wakeup: add k3 platforms chipid module node Add DT node for the Texas Instruments K3 Multicore J721E SoC platforms chipid module. Signed-off-by: Grygorii Strashko Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit 32369aa1f8869736f24143021d976ec77f7c390c Author: Grygorii Strashko Date: Sat Jun 13 19:43:45 2020 +0300 arm64: dts: ti: k3-am65-wakeup: add k3 platforms chipid module node Add DT node for the Texas Instruments K3 Multicore AM65x SoC platforms chipid module. Signed-off-by: Grygorii Strashko Reviewed-by: Lokesh Vutla Signed-off-by: Tero Kristo commit 5e77b4ef1b19a4ce4051ff2afb706ee675e4b412 Author: Sivaprakash Murugesan Date: Mon Jun 22 09:58:12 2020 +0530 clk: qcom: Add ipq6018 apss clock controller The CPU on Qualcomm ipq6018 devices are clocked primarily by a aplha PLL and xo which are connected to a mux and enable block. Add support for the mux and enable block which feeds the CPU on ipq6018 devices. Reviewed-by: Stephen Boyd Signed-off-by: Sivaprakash Murugesan Link: https://lore.kernel.org/r/1592800092-20533-5-git-send-email-sivaprak@codeaurora.org Signed-off-by: Stephen Boyd commit 49bcaef86eba1a8097980f341e243ba01177a685 Author: Sivaprakash Murugesan Date: Mon Jun 22 09:58:11 2020 +0530 clk: qcom: Add DT bindings for ipq6018 apss clock controller Add dt-binding for ipq6018 apss clock controller Acked-by: Rob Herring Signed-off-by: Sivaprakash Murugesan Link: https://lore.kernel.org/r/1592800092-20533-4-git-send-email-sivaprak@codeaurora.org Signed-off-by: Stephen Boyd commit ecd2bacfbbc4d7a2a1beb96fa7836a8ca6e4cf71 Author: Sivaprakash Murugesan Date: Mon Jun 22 09:58:10 2020 +0530 clk: qcom: Add ipq apss pll driver The CPUs on Qualcomm ipq based devices are clocked by an alpha PLL. Add support for the apss pll found on ipq based devices which can support CPU frequencies above 1Ghz. Signed-off-by: Sivaprakash Murugesan Link: https://lore.kernel.org/r/1592800092-20533-3-git-send-email-sivaprak@codeaurora.org Signed-off-by: Stephen Boyd commit 2afc6ec090b29c4014870b0d78334831d6163b9b Author: Sivaprakash Murugesan Date: Mon Jun 22 09:58:09 2020 +0530 dt-bindings: clock: add ipq6018 a53 pll compatible cpus on ipq6018 are clocked by a53 pll, add device compatible for a53 pll found on ipq6018 devices. Reviewed-by: Rob Herring Signed-off-by: Sivaprakash Murugesan Link: https://lore.kernel.org/r/1592800092-20533-2-git-send-email-sivaprak@codeaurora.org Signed-off-by: Stephen Boyd commit 3ca33e3fb4f919b66a72145a87bfeada079e750d Author: Abhishek Pandit-Subedi Date: Fri Jun 19 17:10:24 2020 -0700 Bluetooth: Add hci_dev_lock to get/set device flags Adding hci_dev_lock since hci_conn_params_(lookup|add) require this lock. Suggested-by: Miao-chen Chou Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 548ad77d10f7ad6e5f84a0026978da2ed1df0dae Author: Imre Kaloz Date: Thu Dec 22 09:06:08 2016 +0100 powerpc/4xx: ppc4xx compile flag optimizations This patch splits up the compile flags between ppc40x and ppc44x. Signed-off-by: John Crispin Signed-off-by: Imre Kaloz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1482393968-60623-1-git-send-email-john@phrozen.org commit 03fd42d458fb9cb69e712600bd69ff77ff3a45a8 Author: Christophe Leroy Date: Mon Jun 15 07:48:25 2020 +0000 powerpc/fixmap: Fix FIX_EARLY_DEBUG_BASE when page size is 256k FIX_EARLY_DEBUG_BASE reserves a 128k area for debuging. When page size is 256k, the calculation results in a 0 number of pages, leading to the following failure: CC arch/powerpc/kernel/asm-offsets.s In file included from ./arch/powerpc/include/asm/nohash/32/pgtable.h:77:0, from ./arch/powerpc/include/asm/nohash/pgtable.h:8, from ./arch/powerpc/include/asm/pgtable.h:20, from ./include/linux/pgtable.h:6, from ./arch/powerpc/include/asm/kup.h:42, from ./arch/powerpc/include/asm/uaccess.h:9, from ./include/linux/uaccess.h:11, from ./include/linux/crypto.h:21, from ./include/crypto/hash.h:11, from ./include/linux/uio.h:10, from ./include/linux/socket.h:8, from ./include/linux/compat.h:15, from arch/powerpc/kernel/asm-offsets.c:14: ./arch/powerpc/include/asm/fixmap.h:75:2: error: overflow in enumeration values __end_of_permanent_fixed_addresses, ^ make[2]: *** [arch/powerpc/kernel/asm-offsets.s] Error 1 Ensure the debug area is at least one page. Fixes: b8e8efaa8639 ("powerpc: reserve fixmap entries for early debug") Reported-by: kernel test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ca8c9f8249f523b1fab873e67b81b11989d46553.1592207216.git.christophe.leroy@csgroup.eu commit 620a6473df36f8dc6f70bc85ff3465b2e21d1254 Author: Jordan Niethe Date: Wed May 20 12:11:03 2020 +1000 selftests/powerpc: Add prefixed loads/stores to alignment_handler test Extend the alignment handler selftest to exercise prefixed load store instructions. Add tests for prefixed VSX, floating point and integer instructions. Skip prefix tests if ISA version does not support prefixed instructions. Signed-off-by: Jordan Niethe Tested-by: Alistair Popple [mpe: Fixup PPC_FEATURE2_ARCH_3_1 naming as noted by Alistair] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200520021103.19798-2-jniethe5@gmail.com commit f6b6c7d6a9600bdbf5826f57137630e1670e2d87 Author: Pavel Begunkov Date: Sun Jun 21 13:09:53 2020 +0300 io_uring: kill NULL checks for submit state After recent changes, io_submit_sqes() always passes valid submit state, so kill leftovers checking it for NULL. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b90cd197f9315f968d5ee4e6ee9f4e3067f2c883 Author: Pavel Begunkov Date: Sun Jun 21 13:09:52 2020 +0300 io_uring: set @poll->file after @poll init It's a good practice to modify fields of a struct after but not before it was initialised. Even though io_init_poll_iocb() doesn't touch poll->file, call it first. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 24c74678634b3cbdb325b3b7706366c83811b311 Author: Pavel Begunkov Date: Sun Jun 21 13:09:51 2020 +0300 io_uring: remove REQ_F_MUST_PUNT REQ_F_MUST_PUNT may seem looking good and clear, but it's the same as not having REQ_F_NOWAIT set. That rather creates more confusion. Moreover, it doesn't even affect any behaviour (e.g. see the patch removing it from io_{read,write}). Kill theg flag and update already outdated comments. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 62ef73165091476d31f31e33d9d0d48b088c129d Author: Pavel Begunkov Date: Sun Jun 21 13:09:50 2020 +0300 io_uring: remove setting REQ_F_MUST_PUNT in rw io_{read,write}() { ... copy_iov: // prep async if (!(flags & REQ_F_NOWAIT) && !file_can_poll(file)) flags |= REQ_F_MUST_PUNT; } REQ_F_MUST_PUNT there is pointless, because if it happens then REQ_F_NOWAIT is known to be _not_ set, and the request will go async path in __io_queue_sqe() anyway. file_can_poll() check is also repeated in arm_poll*(), so don't need it. Remove the mentioned assignment REQ_F_MUST_PUNT in preparation for killing the flag. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 895aa7b1a0cc42de985b310478688138719bc293 Merge: 2e0464d48f32a bcf5a06304d69 Author: Jens Axboe Date: Sun Jun 21 20:44:36 2020 -0600 Merge branch 'async-buffered.8' into for-5.9/io_uring Pull in async buffered reads branch. * async-buffered.8: io_uring: support true async buffered reads, if file provides it mm: add kiocb_wait_page_queue_init() helper btrfs: flag files as supporting buffered async reads xfs: flag files as supporting buffered async reads block: flag block devices as supporting IOCB_WAITQ fs: add FMODE_BUF_RASYNC mm: support async buffered reads in generic_file_buffered_read() mm: add support for async page locking mm: abstract out wake_page_match() from wake_page_function() mm: allow read-ahead with IOCB_NOWAIT set io_uring: re-issue block requests that failed because of resources io_uring: catch -EIO from buffered issue request failure io_uring: always plug for any number of IOs block: provide plug based way of signaling forced no-wait semantics commit bcf5a06304d69a3bb194a494d87b532d5e90b01c Author: Jens Axboe Date: Fri May 22 09:24:42 2020 -0600 io_uring: support true async buffered reads, if file provides it If the file is flagged with FMODE_BUF_RASYNC, then we don't have to punt the buffered read to an io-wq worker. Instead we can rely on page unlocking callbacks to support retry based async IO. This is a lot more efficient than doing async thread offload. The retry is done similarly to how we handle poll based retry. From the unlock callback, we simply queue the retry to a task_work based handler. Signed-off-by: Jens Axboe commit d1932dc3dc268f8dd5201c64971324d06ba977cc Author: Jens Axboe Date: Fri May 22 10:18:23 2020 -0600 mm: add kiocb_wait_page_queue_init() helper Checks if the file supports it, and initializes the values that we need. Caller passes in 'data' pointer, if any, and the callback function to be used. Acked-by: Johannes Weiner Signed-off-by: Jens Axboe commit 8730f12b7962b21ea9ad2756abce1e205d22db84 Author: Jens Axboe Date: Fri May 22 10:19:22 2020 -0600 btrfs: flag files as supporting buffered async reads btrfs uses generic_file_read_iter(), which already supports this. Acked-by: Chris Mason Signed-off-by: Jens Axboe commit f89fb730aa02f451fba1f8d5964dfec244d2e2d1 Author: Jens Axboe Date: Fri May 22 09:27:33 2020 -0600 xfs: flag files as supporting buffered async reads XFS uses generic_file_read_iter(), which already supports this. Acked-by: Darrick J. Wong Signed-off-by: Jens Axboe commit a304f0744824fd37d6e1aab4f9715f907724ad11 Author: Jens Axboe Date: Fri May 22 09:14:08 2020 -0600 block: flag block devices as supporting IOCB_WAITQ Signed-off-by: Jens Axboe commit c2a25ec0f1005dde004cd671484f578a9c8ca7de Author: Jens Axboe Date: Fri May 22 09:12:51 2020 -0600 fs: add FMODE_BUF_RASYNC If set, this indicates that the file system supports IOCB_WAITQ for buffered reads. Signed-off-by: Jens Axboe commit 1a0a7853b901c35a742b3bf176cf4701a5c5817c Author: Jens Axboe Date: Fri May 22 09:18:38 2020 -0600 mm: support async buffered reads in generic_file_buffered_read() Use the async page locking infrastructure, if IOCB_WAITQ is set in the passed in iocb. The caller must expect an -EIOCBQUEUED return value, which means that IO is started but not done yet. This is similar to how O_DIRECT signals the same operation. Once the callback is received by the caller for IO completion, the caller must retry the operation. Acked-by: Johannes Weiner Signed-off-by: Jens Axboe commit dd3e6d5039de1cbff4e20e2b34390ff44cdb182f Author: Jens Axboe Date: Fri May 22 09:12:09 2020 -0600 mm: add support for async page locking Normally waiting for a page to become unlocked, or locking the page, requires waiting for IO to complete. Add support for lock_page_async() and wait_on_page_locked_async(), which are callback based instead. This allows a caller to get notified when a page becomes unlocked, rather than wait for it. We add a new iocb field, ki_waitq, to pass in the necessary data for this to happen. We can unionize this with ki_cookie, since that is only used for polled IO. Polled IO can never co-exist with async callbacks, as it is (by definition) polled completions. struct wait_page_key is made public, and we define struct wait_page_async as the interface between the caller and the core. Acked-by: Johannes Weiner Signed-off-by: Jens Axboe commit c7510ab2cf5ccd997fe7f194edfe09cc511abf99 Author: Jens Axboe Date: Sat May 23 08:22:14 2020 -0600 mm: abstract out wake_page_match() from wake_page_function() No functional changes in this patch, just in preparation for allowing more callers. Acked-by: Johannes Weiner Signed-off-by: Jens Axboe commit 2e85abf053b99a6488f1b529d7aa3b8d7478adae Author: Jens Axboe Date: Fri May 22 08:59:42 2020 -0600 mm: allow read-ahead with IOCB_NOWAIT set The read-ahead shouldn't block, so allow it to be done even if IOCB_NOWAIT is set in the kiocb. Acked-by: Johannes Weiner Signed-off-by: Jens Axboe commit b63534c41e20b474483b4ddf47efc858c17352e0 Author: Jens Axboe Date: Thu Jun 4 11:28:00 2020 -0600 io_uring: re-issue block requests that failed because of resources Mark the plug with nowait == true, which will cause requests to avoid blocking on request allocation. If they do, we catch them and reissue them from a task_work based handler. Normally we can catch -EAGAIN directly, but the hard case is for split requests. As an example, the application issues a 512KB request. The block core will split this into 128KB if that's the max size for the device. The first request issues just fine, but we run into -EAGAIN for some latter splits for the same request. As the bio is split, we don't get to see the -EAGAIN until one of the actual reads complete, and hence we cannot handle it inline as part of submission. This does potentially cause re-reads of parts of the range, as the whole request is reissued. There's currently no better way to handle this. Signed-off-by: Jens Axboe commit 4503b7676a2e0abe69c2f2c0d8b03aec53f2f048 Author: Jens Axboe Date: Mon Jun 1 10:00:27 2020 -0600 io_uring: catch -EIO from buffered issue request failure -EIO bubbles up like -EAGAIN if we fail to allocate a request at the lower level. Play it safe and treat it like -EAGAIN in terms of sync retry, to avoid passing back an errant -EIO. Catch some of these early for block based file, as non-mq devices generally do not support NOWAIT. That saves us some overhead by not first trying, then retrying from async context. We can go straight to async punt instead. Signed-off-by: Jens Axboe commit ac8691c415e0ce0b8734cb6d9df2df18608eebed Author: Jens Axboe Date: Mon Jun 1 08:30:41 2020 -0600 io_uring: always plug for any number of IOs Currently we only plug if we're doing more than two request. We're going to be relying on always having the plug there to pass down information, so plug unconditionally. Signed-off-by: Jens Axboe commit 5a473e8311b582a40c10409a0f4bb39f42aa8123 Author: Jens Axboe Date: Thu Jun 4 11:23:39 2020 -0600 block: provide plug based way of signaling forced no-wait semantics Provide a way for the caller to specify that IO should be marked with REQ_NOWAIT to avoid blocking on allocation. Signed-off-by: Jens Axboe commit 2e0464d48f32a9e78e2aa85cbbedc77ecbb6ed60 Author: Bijan Mottahedeh Date: Tue Jun 16 16:36:10 2020 -0700 io_uring: separate reporting of ring pages from registered pages Ring pages are not pinned so it is more appropriate to report them as locked. Signed-off-by: Bijan Mottahedeh Signed-off-by: Jens Axboe commit 309758254ea62e07471abcaeca5b5c2173f4ebc2 Author: Bijan Mottahedeh Date: Tue Jun 16 16:36:09 2020 -0700 io_uring: report pinned memory usage Report pinned memory usage always, regardless of whether locked memory limit is enforced. Signed-off-by: Bijan Mottahedeh Signed-off-by: Jens Axboe commit aad5d8da1b301fe399d65f2dcb84df2ec60caaa3 Author: Bijan Mottahedeh Date: Tue Jun 16 16:36:08 2020 -0700 io_uring: rename ctx->account_mem field Rename account_mem to limit_name to clarify its purpose. Signed-off-by: Bijan Mottahedeh Signed-off-by: Jens Axboe commit a087e2b519929152fdde8299457e32d5a8994a7c Author: Bijan Mottahedeh Date: Tue Jun 16 16:36:07 2020 -0700 io_uring: add wrappers for memory accounting Facilitate separation of locked memory usage reporting vs. limiting for upcoming patches. No functional changes. Signed-off-by: Bijan Mottahedeh [axboe: kill unnecessary () around return in io_account_mem()] Signed-off-by: Jens Axboe commit a31eb4a2f1650fa578082ad9e9845487ecd90abe Author: Jiufei Xue Date: Wed Jun 17 17:53:56 2020 +0800 io_uring: use EPOLLEXCLUSIVE flag to aoid thundering herd type behavior Applications can pass this flag in to avoid accept thundering herd. Signed-off-by: Jiufei Xue Signed-off-by: Jens Axboe commit 5769a351b89cd4d82016f18fa5f6c4077403564d Author: Jiufei Xue Date: Wed Jun 17 17:53:55 2020 +0800 io_uring: change the poll type to be 32-bits poll events should be 32-bits to cover EPOLLEXCLUSIVE. Explicit word-swap the poll32_events for big endian to make sure the ABI is not changed. We call this feature IORING_FEAT_POLL_32BITS, applications who want to use EPOLLEXCLUSIVE should check the feature bit first. Signed-off-by: Jiufei Xue Signed-off-by: Jens Axboe commit 01bd294642841998c76d9e6929597dcb7da9466a Author: Jordan Niethe Date: Wed May 20 12:11:02 2020 +1000 selftests/powerpc: Allow choice of CI memory location in alignment_handler test The alignment handler selftest needs cache-inhibited memory and currently /dev/fb0 is relied on to provided this. This prevents running the test on systems without /dev/fb0 (e.g., mambo). Read the commandline arguments for an optional path to be used instead, as well as an optional offset to be for mmaping this path. Signed-off-by: Jordan Niethe Tested-by: Alistair Popple Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200520021103.19798-1-jniethe5@gmail.com commit 5f202c1a1d429bee3ddab647711f181c72d157da Author: Alexey Kardashevskiy Date: Wed Jun 17 10:38:35 2020 +1000 powerpc/powernv/ioda: Return correct error if TCE level allocation failed The iommu_table_ops::xchg_no_kill() callback updates TCE. It is quite possible that not entire table is allocated if it is huge and multilevel so xchg may also allocate subtables. If failed, it returns H_HARDWARE for failed allocation and H_TOO_HARD if it needs it but cannot do because the alloc parameter is "false" (set when called with MMU=off to force retry with MMU=on). The problem is that having separate errors only matters in real mode (MMU=off) but the only caller with alloc="false" does not check the exact error code and simply returns H_TOO_HARD; and for every other mode alloc is "true". Also, the function is also called from the ioctl() handler of the VFIO SPAPR TCE IOMMU subdriver which does not expect hypervisor error codes (H_xxx) and will expose them to the userspace. This converts wrong error codes to -ENOMEM. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200617003835.48831-1-aik@ozlabs.ru commit 178748b6d14946f080d49bc7dcc47b7cc4437e4d Author: Satheesh Rajendran Date: Fri Jun 12 19:59:53 2020 +0530 powerpc/pseries/svm: Drop unused align argument in alloc_shared_lppaca() function Argument "align" in alloc_shared_lppaca() was unused inside the function. Let's drop it and update code comment for page alignment. Signed-off-by: Satheesh Rajendran Reviewed-by: Thiago Jung Bauermann Reviewed-by: Laurent Dufour [mpe: Massage comment wording/formatting] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612142953.135408-1-sathnaga@linux.vnet.ibm.com commit 7c466b0807960edc13e4b855be85ea765df9a6cd Author: Christophe Leroy Date: Mon Jun 15 13:18:39 2020 +0000 powerpc/ptdump: Fix build failure in hashpagetable.c H_SUCCESS is only defined when CONFIG_PPC_PSERIES is defined. != H_SUCCESS means != 0. Modify the test accordingly. Fixes: 65e701b2d2a8 ("powerpc/ptdump: drop non vital #ifdefs") Cc: stable@vger.kernel.org Reported-by: kernel test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/795158fc1d2b3dff3bf7347881947a887ea9391a.1592227105.git.christophe.leroy@csgroup.eu commit 55bd9ac468397c4f12a33b7ec714b5d0362c3aa2 Author: Joe Perches Date: Fri Jun 5 07:18:06 2020 -0700 powerpc/mm: Fix typo in IS_ENABLED() IS_ENABLED() matches names exactly, so the missing "CONFIG_" prefix means this code would never be built. Also fixes a missing newline in pr_warn(). Fixes: 970d54f99cea ("powerpc/book3s64/hash: Disable 16M linear mapping size if not aligned") Signed-off-by: Joe Perches Signed-off-by: Kees Cook Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/202006050717.A2F9809E@keescook commit f0993c839e95dd6c7f054a1015e693c87e33e4fb Author: Alexey Kardashevskiy Date: Fri Jun 12 14:33:03 2020 +1000 powerpc/xive: Ignore kmemleak false positives xive_native_provision_pages() allocates memory and passes the pointer to OPAL so kmemleak cannot find the pointer usage in the kernel memory and produces a false positive report (below) (even if the kernel did scan OPAL memory, it is unable to deal with __pa() addresses anyway). This silences the warning. unreferenced object 0xc000200350c40000 (size 65536): comm "qemu-system-ppc", pid 2725, jiffies 4294946414 (age 70776.530s) hex dump (first 32 bytes): 02 00 00 00 50 00 00 00 00 00 00 00 00 00 00 00 ....P........... 01 00 08 07 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<0000000081ff046c>] xive_native_alloc_vp_block+0x120/0x250 [<00000000d555d524>] kvmppc_xive_compute_vp_id+0x248/0x350 [kvm] [<00000000d69b9c9f>] kvmppc_xive_connect_vcpu+0xc0/0x520 [kvm] [<000000006acbc81c>] kvm_arch_vcpu_ioctl+0x308/0x580 [kvm] [<0000000089c69580>] kvm_vcpu_ioctl+0x19c/0xae0 [kvm] [<00000000902ae91e>] ksys_ioctl+0x184/0x1b0 [<00000000f3e68bd7>] sys_ioctl+0x48/0xb0 [<0000000001b2c127>] system_call_exception+0x124/0x1f0 [<00000000d2b2ee40>] system_call_common+0xe8/0x214 Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200612043303.84894-1-aik@ozlabs.ru commit 0488d32530ecff973c40f2592a6eab2907d0a5cc Author: Chris Packham Date: Fri Jun 12 10:42:20 2020 +1200 powerpc/configs: Remove CMDLINE_BOOL Regenerate defconfigs to remove CONFIG_CMDLINE_BOOL and the default CONFIG_CMDLINE where applicable. Signed-off-by: Chris Packham Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200611224220.25066-3-chris.packham@alliedtelesis.co.nz commit f134a7cef1d7de45fab028a945b7f34c615718e1 Author: Chris Packham Date: Fri Jun 12 10:42:19 2020 +1200 powerpc: Remove inaccessible CMDLINE default Since commit cbe46bd4f510 ("powerpc: remove CONFIG_CMDLINE #ifdef mess") CONFIG_CMDLINE has always had a value regardless of CONFIG_CMDLINE_BOOL. For example: $ make ARCH=powerpc defconfig $ cat .config # CONFIG_CMDLINE_BOOL is not set CONFIG_CMDLINE="" When enabling CONFIG_CMDLINE_BOOL this value is kept making the 'default "..." if CONFIG_CMDLINE_BOOL' ineffective. $ ./scripts/config --enable CONFIG_CMDLINE_BOOL $ cat .config CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="" Remove CONFIG_CMDLINE_BOOL and the inaccessible default. Signed-off-by: Chris Packham Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200611224220.25066-2-chris.packham@alliedtelesis.co.nz commit 7714394706c0309b3f3fc474b390463d60eb6cb1 Author: Murilo Opsfelder Araujo Date: Wed Jun 10 18:51:14 2020 -0300 powerpc/dt_cpu_ftrs: Make use of macro ISA_V3_1 Macro ISA_V3_1 was defined but never used. Use it instead of literal. Signed-off-by: Murilo Opsfelder Araujo Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200610215114.167544-4-muriloo@linux.ibm.com commit e781f12a60a7bddb50909d42478cca8724c8b113 Author: Murilo Opsfelder Araujo Date: Wed Jun 10 18:51:13 2020 -0300 powerpc/dt_cpu_ftrs: Make use of macro ISA_V3_0B Macro ISA_V3_0B was defined but never used. Use it instead of literal. Signed-off-by: Murilo Opsfelder Araujo Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200610215114.167544-3-muriloo@linux.ibm.com commit f39eb5d8ac707fd59029a06c3f985f29b1aaa26b Author: Murilo Opsfelder Araujo Date: Wed Jun 10 18:51:12 2020 -0300 powerpc/dt_cpu_ftrs: Remove unused macro ISA_V2_07B Macro ISA_V2_07B is defined but not used anywhere else in the code. Signed-off-by: Murilo Opsfelder Araujo Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200610215114.167544-2-muriloo@linux.ibm.com commit 89bbe4c798bc3a43c882179adb5222c1a972ac70 Author: Nicholas Piggin Date: Thu Jun 11 22:11:19 2020 +1000 powerpc/64: indirect function call use bctrl rather than blrl in ret_from_kernel_thread blrl is not recommended to use as an indirect function call, as it may corrupt the link stack predictor. This is not a performance critical path but this should be fixed for consistency. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200611121119.1015740-1-npiggin@gmail.com commit e5813b15763b347ca07d864f4924c545125af30f Author: Dmitry Baryshkov Date: Sat Jun 6 16:13:00 2020 +0300 arm64: dts: qcom: sm8250: add I2C and SPI nodes Much like SDM845 each serial engine has 4 pins attached. Add all possible I2C and SPI nodes for all 20 serial engines. Tested-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200606131300.3874987-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 16951b490b2073d860b30745998f1df621bb8c86 Author: Bjorn Andersson Date: Thu Apr 30 11:17:16 2020 -0700 arm64: dts: qcom: sm8250: Add TLMM pinctrl node Add the TLMM pinctrl node for SM8250 and reserve pins 28-31 and 40-43 on the MTP as firmware does not allow Linux to touch these pins. Reviewed-by: Dmitry Baryshkov Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200430181716.3797842-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 4c5a410d3bad42c37bc85364f926a19934066a72 Author: Dmitry Baryshkov Date: Sun Jun 21 22:28:24 2020 +0300 arm64: dts: qcom: pm8150x: add thermal alarms and thermal zones Add temperature alarm and thermal zone configuration to all three pm8150 instances. Configuration is largely based on the msm-4.19 tree. These alarms use main adc of the pmic. Separate temperature adc is not supported yet. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200621192824.2069145-3-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 6304b5e9605767e5f9f20bd498ef39590c3bb38b Author: Dmitry Baryshkov Date: Sun Jun 21 22:28:23 2020 +0300 arm64: dts: qcom: sm8250-mtp: include pmic files Include files describing used PMIC chips, GPIOs, power on, etc nodes. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200621192824.2069145-2-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 380af2b7d1e2102529b26594083ed198cfb08548 Author: Dmitry Baryshkov Date: Sun Jun 21 22:28:22 2020 +0300 arm64: dts: qcom: pm8009: Add base dts file Add base DTS file for pm8009 along with GPIOs and power-on nodes. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200621192824.2069145-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 285e74ab4f94d921a56fcf66320b3cd65e35b6bc Author: Ezequiel Garcia Date: Tue Apr 14 19:09:43 2020 -0300 hwspinlock: Simplify Kconfig Every hwspinlock driver is expected to depend on the hwspinlock core, so it's possible to simplify the Kconfig, factoring out the HWSPINLOCK dependency. Reviewed-by: Baolin Wang Signed-off-by: Ezequiel Garcia Link: https://lore.kernel.org/r/20200414220943.6203-1-ezequiel@collabora.com Signed-off-by: Bjorn Andersson commit 5de47779cf7cf9584f3a2f45124014480eab950b Author: Jonathan McDowell Date: Tue Jun 16 18:15:54 2020 +0100 ARM: dts: qcom: add qfprom definition to ipq806x Add missing qfprom definition for ipq806x SoC Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/20200616171554.GA5632@earth.li Signed-off-by: Bjorn Andersson commit cbc142c89543eb8c506ae0e0f0a36c82d91b5171 Author: Sivaprakash Murugesan Date: Tue Jun 9 17:05:11 2020 +0530 arm64: dts: ipq8074: enable sdhci node Enable mmc device found on ipq8074 devices Signed-off-by: Sivaprakash Murugesan Link: https://lore.kernel.org/r/1591702511-18571-1-git-send-email-sivaprak@codeaurora.org Signed-off-by: Bjorn Andersson commit b33d2868e8d343e33e847ee979a9719daa2a4eac Author: Jack Pham Date: Fri Apr 10 17:52:42 2020 -0700 arm64: dts: qcom: sm8150: Add USB and PHY device nodes Add device nodes for the USB3 controller, QMP SS PHY and SNPS HS PHY. Signed-off-by: Jack Pham Signed-off-by: Wesley Cheng Reviewed-by: Bjorn Andersson Reviewed-by: Vinod Koul Tested-by: Vinod Koul Link: https://lore.kernel.org/r/1586566362-21450-3-git-send-email-wcheng@codeaurora.org Signed-off-by: Bjorn Andersson commit fedeeb465cf062749ee2a25c7df83d7ae4455b91 Author: Georgi Djakov Date: Tue Jun 16 12:03:24 2020 +0300 arm64: defconfig: Enable the PM8xxx RTC driver Enable the driver for the real time clock found in the PMICs on various Qualcomm platforms. Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20200616090324.6976-1-georgi.djakov@linaro.org Signed-off-by: Bjorn Andersson commit d2fa630cea44df8e391cec5a3fa480668944e873 Author: Amit Kucheria Date: Tue Jun 9 12:14:55 2020 +0530 arm64: dts: qcom: sm8150: Add thermal zones and throttling support sm8150 has 27 thermal sensors split across two tsens controllers. Add the thermal zones to expose them and wireup the cpus to throttle their frequencies on crossing passive temperature thresholds. Signed-off-by: Amit Kucheria Link: https://lore.kernel.org/r/1cdbebe6f7f69ccd8468a4138b56e8a200289d95.1591684754.git.amit.kucheria@linaro.org Signed-off-by: Bjorn Andersson commit cedddb263ed9011dcd222b7675430b78fabe9f6d Author: Amit Kucheria Date: Tue Jun 9 12:14:54 2020 +0530 dt-bindings: thermal: qcom-tsens: Add compatible for sm8150, sm8250 Added tsens bindings for sm8150 and sm8250 Acked-by: Rob Herring Signed-off-by: Amit Kucheria Link: https://lore.kernel.org/r/c3361043e66139812bd4cd85b917659d85e1564f.1591684754.git.amit.kucheria@linaro.org Signed-off-by: Bjorn Andersson commit 366c37978eb842dc1142dd4f9ae7774891db5e0d Author: Georgi Djakov Date: Wed Jun 17 16:45:15 2020 +0300 arm64: dts: msm8916: Add interconnect provider DT nodes Add nodes for the network-on-chip interconnect buses present on MSM8916-based platforms. Tested-by: Stephan Gerhold Signed-off-by: Georgi Djakov Link: https://lore.kernel.org/r/20200617134515.25229-1-georgi.djakov@linaro.org Signed-off-by: Bjorn Andersson commit 1e7594a38f37854ea94bc4e5ecc4e700c0a2e36f Author: Rakesh Pillai Date: Sat Jun 20 21:27:15 2020 +0530 arm64: dts: qcom: sc7180: Add WCN3990 WLAN module device node Add device node for the ath10k SNOC platform driver probe and add resources required for WCN3990 on sc7180 soc. Signed-off-by: Rakesh Pillai Link: https://lore.kernel.org/r/1592668635-10894-1-git-send-email-pillair@codeaurora.org Signed-off-by: Bjorn Andersson commit e0d9accee26e81a5f50928221674eac90b735f4e Author: Dmitry Baryshkov Date: Thu Jun 4 03:43:31 2020 +0300 arm64: dts: qcom: sm8250: add watchdog device Add on-SoC watchdog device node. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20200604004331.669936-7-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 34da47b1cee89ac43c9412acf1850b49e6755bbd Author: Stephan Gerhold Date: Fri Jun 5 20:59:16 2020 +0200 arm64: dts: qcom: apq8016-sbc: Replace spaces with tabs apq8016-sbc.dtsi uses spaces on some lines instead of tabs. Make this consistent by converting them to tabs. Also remove some redundant comments from the DAI link definitions - this is already visible from the comment block before the "sound" node or the device node entries itself. Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200605185916.318494-4-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit e2ee9edc282961783d519c760bbaa20fed4dec38 Author: Stephan Gerhold Date: Fri Jun 5 20:59:15 2020 +0200 arm64: dts: qcom: msm8916: Pull down PDM GPIOs during sleep The original qcom kernel changed the PDM GPIOs to be pull-down during sleep at some point. Reportedly this was done because there was some "leakage at PDM outputs during sleep": https://source.codeaurora.org/quic/la/kernel/msm-3.10/commit/?id=0f87e08c1cd3e6484a6f7fb3e74e37340bdcdee0 I cannot say how effective this is, but everything seems to work fine with this change so let's apply the same to mainline just to be sure. Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200605185916.318494-3-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 1b6a1a162defe649c5599d661b58ac64bb6f31b6 Author: Stephan Gerhold Date: Fri Jun 5 20:59:14 2020 +0200 arm64: dts: qcom: msm8916: Replace invalid bias-pull-none property msm8916-pins.dtsi specifies "bias-pull-none" for most of the audio pin configurations. This was likely copied from the qcom kernel fork where the same property was used for these audio pins. However, "bias-pull-none" actually does not exist at all - not in mainline and not in downstream. I can only guess that the original intention was to configure "no pull", i.e. bias-disable. Change it to that instead. Fixes: 143bb9ad85b7 ("arm64: dts: qcom: add audio pinctrls") Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200605185916.318494-2-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit c00b5c280d552d4e11f62424522a334b9bc39cc1 Author: Stephan Gerhold Date: Fri Jun 5 20:59:13 2020 +0200 arm64: dts: qcom: msm8916: Set #address-cells for lpass As of commit 4ff028f6c108 ("ASoC: qcom: lpass-cpu: Make I2S SD lines configurable"), lpass now supports children nodes to configure the MI2S SD lines to use for one of the I2S ports. For example: lpass@7708000 { dai@3 { reg = ; qcom,playback-sd-lines = <1>; }; }; The "reg" property refers to the DAI number in this case, so we need to set #address-cells and #size-cells appropriately to avoid DTC warnings. Cc: Srinivas Kandagatla Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20200605185916.318494-1-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit 5f7f61e34d17b11865f55ae06b17d9ed10bd4332 Author: Jeffrey Hugo Date: Thu May 28 11:53:41 2020 -0700 arm64: dts: qcom: lenovo630: Add Modem firmware files By specifying the modem firmware files, we can boot the modem subsystem which also gives us wifi. Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20200528185341.4891-1-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson commit 5c29f9e6e7d42e113bd51aeb92a28bf1ae76911c Author: Jeffrey Hugo Date: Thu May 28 07:51:35 2020 -0700 arm64: dts: qcom: msm8998-clamshell: Fix label on l15 regulator The label on the l15 regulator node does not follow the style of the rest of the regulator nodes. Luckily, no one has used the label yet, so lets fix it. Fixes: 2c6d2d3a580a ("arm64: dts: qcom: Add Lenovo Miix 630") Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20200528145135.44269-1-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson commit 41bb1aad5199257bf7684d40656228d66920c331 Author: Jeffrey Hugo Date: Thu May 28 07:48:14 2020 -0700 arm64: dts: qcom: msm8998-mtp: Fix label on l15 regulator The label on the l15 regulator node does not follow the style of the rest of the regulator nodes. Luckily, no one has used the label yet, so lets fix it. Fixes: 31c1f0e33deb ("arm64: dts: qcom: msm8998: Add RPM and regulators for MTP") Signed-off-by: Jeffrey Hugo Link: https://lore.kernel.org/r/20200528144814.44143-1-jeffrey.l.hugo@gmail.com Signed-off-by: Bjorn Andersson commit 39cfcf61008d20e7dc98f99174039b8996f712ae Author: Stephen Boyd Date: Wed May 20 18:03:37 2020 -0700 arm64: dts: qcom: sc7180: Move mss node to the right place The modem node has an address of 4080000 and thus should come after tlmm and before gpu. Move the node to the right place to maintainer proper address sort order. Reviewed-by: Sibi Sankar Reviewed-by: Evan Green Cc: Evan Green Cc: Sibi Sankar Fixes: e14a15eba89a ("arm64: dts: qcom: sc7180: Add Q6V5 MSS node") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200521010337.229177-1-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit b3bfcdf8a3b623aee3fc40a3e6b17d8ec1f14b50 Author: Max Merchel Date: Fri Jun 12 09:22:19 2020 +0200 drm/panel: simple: add Tianma TM070JVHG33 Add support for the Tianma Micro-electronics TM070JVHG33 7.0" WXGA display to panel-simple. Signed-off-by: Max Merchel Signed-off-by: Matthias Schiffer Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200612072219.13669-5-matthias.schiffer@ew.tq-group.com commit 0e3b67f6d7e6c1bc34a0ed1f43d0d95577ae5b09 Author: Michael Krummsdorf Date: Fri Jun 12 09:22:18 2020 +0200 drm/panel: simple: add CDTech S070PWS19HP-FC21 and S070SWV29HG-DC44 Add support for the CDTech Electronics displays S070PWS19HP-FC21 (7.0" WSVGA) and S070SWV29HG-DC44 (7.0" WVGA) to panel-simple. Signed-off-by: Michael Krummsdorf Signed-off-by: Matthias Schiffer Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200612072219.13669-4-matthias.schiffer@ew.tq-group.com commit ac4a36ee277d2930d202d418077b98acb143ed87 Author: Matthias Schiffer Date: Fri Jun 12 09:22:17 2020 +0200 dt-bindings: display: simple: add Tianma TM070JVHG33 Add the Tianma Micro-electronics TM070JVHG33 7.0" WXGA display to the panel-simple compatible list. Signed-off-by: Matthias Schiffer Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200612072219.13669-3-matthias.schiffer@ew.tq-group.com commit 290855d538dc6a800e1b47c8e12a2e8cc810caa2 Author: Matthias Schiffer Date: Fri Jun 12 09:22:16 2020 +0200 dt-bindings: display: simple: add CDTech S070PWS19HP-FC21 and S070SWV29HG-DC44 Add the CDTech Electronics displays S070PWS19HP-FC21 (7.0" WSVGA) and S070SWV29HG-DC44 (7.0" WVGA) to the panel-simple compatible list. Signed-off-by: Matthias Schiffer Reviewed-by: Rob Herring Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200612072219.13669-2-matthias.schiffer@ew.tq-group.com commit 3ac98ea25cd5b5feb3c010cc2d60b79a3344004e Author: Stanimir Varbanov Date: Fri May 22 13:21:09 2020 +0300 arm64: defconfig: Enable SDM845 video clock controller Enable the build of sdm845 video clock controller by default. Signed-off-by: Stanimir Varbanov Link: https://lore.kernel.org/r/20200522102109.3607-1-stanimir.varbanov@linaro.org Signed-off-by: Bjorn Andersson commit 6b9afd8f96c6eba561dabbe4e15052b9ceb6878a Author: Jonathan Marek Date: Sat May 23 13:52:32 2020 -0400 arm64: dts: qcom: sm8250: change ufs node name to ufshc The ufs-qcom driver checks that the name matches the androidboot.bootdevice parameter provided by the bootloader, which uses the name ufshc. Without this change UFS fails to probe. I think this is broken behavior from the ufs-qcom driver, but using the name ufshc is consistent with dts for sdm845/sm8150/etc. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200523175232.13721-1-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit b9ec8cbcc291f80bc1c15e87b14f45a9c0a877fb Author: Jonathan Marek Date: Sat May 23 09:22:22 2020 -0400 arm64: dts: qcom: sm8250: sort nodes by physical address Other dts have nodes sorted by physical address, be consistent with that. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200523132223.31108-1-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit bccc7dd2334dd2f5823987a7172f0f34d3cf1a4e Author: Jonathan Marek Date: Sat May 23 09:21:04 2020 -0400 arm64: dts: qcom: sm8250: rename spmi node to spmi_bus The pm8150 dtsi files refer to it as spmi_bus, so change it. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200523132104.31046-1-jonathan@marek.ca [bjorn: Dropped qcom, from node name while we're poking at it] Signed-off-by: Bjorn Andersson commit fe3dfc25c11de5a4f201d05f475863684aadfdd2 Author: Jonathan Marek Date: Sat May 23 09:12:13 2020 -0400 arm64: dts: qcom: sm8250: use dt-bindings defines for clocks Use the dt-bindings defines for qupv3_id_1 node's clocks. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20200523131213.18653-1-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 29a720c1042f469c8fea317cb5e7f496b116e07d Merge: 8bf1539515920 63d78cc9766d5 Author: David S. Miller Date: Sat Jun 20 21:38:26 2020 -0700 Merge branch 'Marvell-mvpp2-improvements' Russell King says: ==================== Marvell mvpp2 improvements This series primarily cleans up mvpp2, but also fixes a left-over from 91a208f2185a ("net: phylink: propagate resolved link config via mac_link_up()"). Patch 1 introduces some port helpers: mvpp2_port_supports_xlg() - does the port support the XLG MAC mvpp2_port_supports_rgmii() - does the port support RGMII modes Patch 2 introduces mvpp2_phylink_to_port(), rather than having repeated open coding of container_of(). Patch 3 introduces mvpp2_modify(), which reads-modifies-writes a register - I've converted the phylink specific code to use this helper. Patch 4 moves the hardware control of the pause modes from mvpp2_xlg_config() (which is called via the phylink_config method) to mvpp2_mac_link_up() - a change that was missed in the above referenced commit. v2: remove "inline" in patch 2. ==================== Signed-off-by: David S. Miller commit 63d78cc9766d5ee18d2e2d82c2642fa414827a77 Author: Russell King Date: Sat Jun 20 10:21:42 2020 +0100 net: mvpp2: set xlg flow control in mvpp2_mac_link_up() Set the flow control settings in mvpp2_mac_link_up() for 10G links just as we do for 1G and slower links. This is now the preferred location. Signed-off-by: Russell King Signed-off-by: David S. Miller commit bd45f644a8fd65fc2dd26b4817cb4b1ff68e393d Author: Russell King Date: Sat Jun 20 10:21:37 2020 +0100 net: mvpp2: add register modification helper Add a helper to read-modify-write a register, and use it in the phylink helpers. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 6c2b49eb96716e91f202756bfbd3f5fea3b2b172 Author: Russell King Date: Sat Jun 20 10:21:32 2020 +0100 net: mvpp2: add mvpp2_phylink_to_port() helper Add a helper to convert the struct phylink_config pointer passed in from phylink to the drivers internal struct mvpp2_port. Signed-off-by: Russell King Signed-off-by: David S. Miller commit a9a3320227f649435885d95d24e21912dc539928 Author: Russell King Date: Sat Jun 20 10:21:26 2020 +0100 net: mvpp2: add port support helpers The mvpp2 code has tests scattered amongst the code to determine whether the port supports the XLG, and whether the port supports RGMII mode. Rather than having these tests scattered, provide a couple of helper functions, so that future additions can ensure that they get these tests correct. Signed-off-by: Russell King Signed-off-by: David S. Miller commit 8bf1539515920810b86cf1783dc433b1a25d31df Author: Gaurav Singh Date: Fri Jun 19 15:24:13 2020 -0400 Remove redundant skb null check Remove the redundant null check for skb. Signed-off-by: Gaurav Singh Signed-off-by: David S. Miller commit c8f8a9f8e5e51bec320a5c2649e042b40630c564 Merge: 902053f17dbef dd2e0b86fc4ee Author: David S. Miller Date: Sat Jun 20 17:47:53 2020 -0700 Merge branch 'tcp-remove-two-indirect-calls-from-xmit-path' Eric Dumazet says: ==================== tcp: remove two indirect calls from xmit path __tcp_transmit_skb() does two indirect calls per packet, lets get rid of them. ==================== Signed-off-by: David S. Miller commit dd2e0b86fc4ee146ac8f3275833d0187efeb950a Author: Eric Dumazet Date: Fri Jun 19 12:12:35 2020 -0700 tcp: remove indirect calls for icsk->icsk_af_ops->send_check Mitigate RETPOLINE costs in __tcp_transmit_skb() by using INDIRECT_CALL_INET() wrapper. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 05e22e8395058745bd0312bc488b522197852aff Author: Eric Dumazet Date: Fri Jun 19 12:12:34 2020 -0700 tcp: remove indirect calls for icsk->icsk_af_ops->queue_xmit Mitigate RETPOLINE costs in __tcp_transmit_skb() by using INDIRECT_CALL_INET() wrapper. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 902053f17dbeff125926bb07e781f6e63f3efe09 Author: Tao Ren Date: Thu Jun 18 15:04:44 2020 -0700 of: mdio: preserve phy dev_flags in of_phy_connect() Replace assignment "=" with OR "|=" for "phy->dev_flags" so "dev_flags" configured in phy probe() function can be preserved. The idea is similar to commit e7312efbd5de ("net: phy: modify assignment to OR for dev_flags in phy_attach_direct"). Signed-off-by: Tao Ren Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 78e57f152c001eed0321ba4413a07c9e33e753e6 Author: Amritha Nambiar Date: Thu Jun 18 14:22:15 2020 -0700 net: Avoid overwriting valid skb->napi_id This will be useful to allow busy poll for tunneled traffic. In case of busy poll for sessions over tunnels, the underlying physical device's queues need to be polled. Tunnels schedule NAPI either via netif_rx() for backlog queue or schedule the gro_cell_poll(). netif_rx() propagates the valid skb->napi_id to the socket. OTOH, gro_cell_poll() stamps the skb->napi_id again by calling skb_mark_napi_id() with the tunnel NAPI which is not a busy poll candidate. This was preventing tunneled traffic to use busy poll. A valid NAPI ID in the skb indicates it was already marked for busy poll by a NAPI driver and hence needs to be copied into the socket. Signed-off-by: Amritha Nambiar Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 8eaf8d99409009b7ab7853f3ac603928458c2022 Author: Gaurav Singh Date: Thu Jun 18 16:36:31 2020 -0400 Remove redundant condition in qdisc_graft parent cannot be NULL here since its in the else part of the if (parent == NULL) condition. Remove the extra check on parent pointer. Signed-off-by: Gaurav Singh Signed-off-by: David S. Miller commit cd3998385712dc4ee67d927a51d829d74a104426 Merge: 60cb8d3d715ba c73b0ad36ea31 Author: David S. Miller Date: Sat Jun 20 17:25:23 2020 -0700 Merge branch 'Ocelot-Felix-driver-cleanup' Vladimir Oltean says: ==================== Ocelot/Felix driver cleanup Some of the code in the mscc felix and ocelot drivers was added while in a bit of a hurry. Let's take a moment and put things in relative order. First 3 patches are sparse warning fixes. Patches 4-9 perform some further splitting between mscc_felix, mscc_ocelot, and the common hardware library they share. Meaning that some code is being moved from the library into just the mscc_ocelot module. Patches 10-12 refactor the naming conventions in the existing VCAP code (for tc-flower offload), since we're going to be adding some more code for VCAP IS1 (previous tentatives already submitted here: https://patchwork.ozlabs.org/project/netdev/cover/20200602051828.5734-1-xiaoliang.yang_1@nxp.com/), and that code would be confusing to read and maintain using current naming conventions. No functional modification is intended. I checked that the VCAP IS2 code still works by applying a tc ingress filter with an EtherType key and 'drop' action. ==================== Signed-off-by: David S. Miller commit c73b0ad36ea316e71b5b599228c9d5906045c235 Author: Vladimir Oltean Date: Sat Jun 20 18:43:47 2020 +0300 net: mscc: ocelot: unexpose ocelot_vcap_policer_{add,del} Remove the function prototypes from ocelot_police.h and make these functions static. We need to move them above their callers. Note that moving the implementations to ocelot_police.c is not trivially possible due to dependency on is2_entry_set() which is static to ocelot_vcap.c. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit aae4e500e106d2ce48d5bdb21210e36efc7460cb Author: Vladimir Oltean Date: Sat Jun 20 18:43:46 2020 +0300 net: mscc: ocelot: generalize the "ACE/ACL" names Access Control Lists (and their respective Access Control Entries) are specifically entries in the VCAP IS2, the security enforcement block, according to the documentation. Let's rename the structures and functions to something more generic, so that VCAP IS1 structures (which would otherwise have to be called Ingress Classification Entries) can reuse the same code without confusion. Some renaming that was done: struct ocelot_ace_rule -> struct ocelot_vcap_filter struct ocelot_acl_block -> struct ocelot_vcap_block enum ocelot_ace_type -> enum ocelot_vcap_key_type struct ocelot_ace_vlan -> struct ocelot_vcap_key_vlan enum ocelot_ace_action -> enum ocelot_vcap_action struct ocelot_ace_stats -> struct ocelot_vcap_stats enum ocelot_ace_type -> enum ocelot_vcap_key_type struct ocelot_ace_frame_* -> struct ocelot_vcap_key_* No functional change is intended. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3c83654f246b980cc65f72f5c7b1501470082ede Author: Vladimir Oltean Date: Sat Jun 20 18:43:45 2020 +0300 net: mscc: ocelot: rename ocelot_ace.{c, h} to ocelot_vcap.{c,h} Access Control Lists (and their respective Access Control Entries) are specifically entries in the VCAP IS2, the security enforcement block, according to the documentation. Let's rename the files that deal with generic operations on the VCAP TCAM, so that VCAP IS1 and ES0 can reuse the same code without confusion. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 9c90eea310f80460b81a7afe27064c7f0200d1d1 Author: Vladimir Oltean Date: Sat Jun 20 18:43:44 2020 +0300 net: mscc: ocelot: move net_device related functions to ocelot_net.c The ocelot hardware library shouldn't contain too much net_device specific code, since it is shared with DSA which abstracts that structure away. So much as much of this code as possible into the mscc_ocelot driver and outside of the common library. We're making an exception for MDB and LAG code. That is not yet exported to DSA, but when it will, most of the code that's already in ocelot.c will remain there. So, there's no point in moving code to ocelot_net.c just to move it back later. We could have moved all net_device code to ocelot_vsc7514.c directly, but let's operate under the assumption that if a new switchdev ocelot driver gets added, it'll define its SoC-specific stuff in a new ocelot_vsc*.c file and it'll reuse the rest of the code. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d9feb9049973332de0242a08248e069113bf5761 Author: Vladimir Oltean Date: Sat Jun 20 18:43:43 2020 +0300 net: mscc: ocelot: move ocelot_regs.c into ocelot_vsc7514.c ocelot_regs.c actually shouldn't be part of the common library. It describes the register map of the VSC7514 switch. The way ocelot switches work, they'll have highly optimized register maps, so another SoC will likely have the same registers but laid out completely different in memory (so there's little room for reusing this structure). So move it to ocelot_vsc7514.c instead. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 14addfb6356b738269d36eb3204cc4fedd09760a Author: Vladimir Oltean Date: Sat Jun 20 18:43:42 2020 +0300 net: mscc: ocelot: rename MSCC_OCELOT_SWITCH_OCELOT to MSCC_OCELOT_SWITCH Putting 'ocelot' in the config's name twice just to say that 'it's the ocelot driver running on the ocelot SoC' is a bit confusing. Instead, it's just the ocelot driver. Now that we've renamed the previous symbol that was holding the MSCC_OCELOT_SWITCH_OCELOT into *_LIB (because that's what it is), we're free to use this name for the driver. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f4d0323bae4ed24d9f9f5bba3d27def06354fee7 Author: Vladimir Oltean Date: Sat Jun 20 18:43:41 2020 +0300 net: mscc: ocelot: convert MSCC_OCELOT_SWITCH into a library Hide the CONFIG_MSCC_OCELOT_SWITCH option from users. It is meant to be only a hardware library which is selected by the drivers that use it (ocelot, felix). Since it is "selected" from Kconfig, all its dependencies are manually transferred to the driver that selects it. This is because "select" in Kconfig language is a bit of a mess, and doesn't handle dependencies of selected options quite right. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 56583862b87b70dded31b1768efe3d47d6066887 Author: Vladimir Oltean Date: Sat Jun 20 18:43:40 2020 +0300 net: mscc: ocelot: rename module to mscc_ocelot mscc_ocelot is a slightly better name for a module than ocelot_board or ocelot_vsc7514 is, so let's use that. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 589aa6e7c9de322d47eb33a5cee8cc38838319e6 Author: Vladimir Oltean Date: Sat Jun 20 18:43:39 2020 +0300 net: mscc: ocelot: rename ocelot_board.c to ocelot_vsc7514.c To follow the model of felix and seville where we have one platform-specific file, rename this file to the actual SoC it serves. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ff4b0bc62353d6c1fc3b347189464f85f6fa5643 Author: Vladimir Oltean Date: Sat Jun 20 18:43:38 2020 +0300 net: mscc: ocelot: access EtherType using __be16 Get rid of sparse "cast to restricted __be16" warnings. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7eb5c96a7cae01f500b584d21f6db3abf1aad33e Author: Vladimir Oltean Date: Sat Jun 20 18:43:37 2020 +0300 net: mscc: ocelot: use plain int when interacting with TCAM tables sparse is rightfully complaining about the fact that: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] 26 | __builtin_constant_p((l) > (h)), (l) > (h), 0))) | ^ note: in expansion of macro ‘GENMASK_INPUT_CHECK’ 39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) | ^~~~~~~~~~~~~~~~~~~ note: in expansion of macro ‘GENMASK’ 127 | mask = GENMASK(width, 0); | ^~~~~~~ So replace the variables that go into GENMASK with plain, signed integer types. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3ab4ceb6e9639e4e42d473e46ae7976c24187876 Author: Vladimir Oltean Date: Sat Jun 20 18:43:36 2020 +0300 net: dsa: felix: make vcap is2 keys and actions static Get rid of some sparse warnings. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 60cb8d3d715ba9a2c1b1ca0e5d4155be10583f4c Merge: c5eb179edd8a1 8735e6eaa4389 Author: David S. Miller Date: Sat Jun 20 17:22:23 2020 -0700 Merge branch 'Strict-mode-for-VRF' Andrea Mayer says: ==================== Strict mode for VRF This patch set adds the new "strict mode" functionality to the Virtual Routing and Forwarding infrastructure (VRF). Hereafter we discuss the requirements and the main features of the "strict mode" for VRF. On VRF creation, it is necessary to specify the associated routing table used during the lookup operations. Currently, there is no mechanism that avoids creating multiple VRFs sharing the same routing table. In other words, it is not possible to force a one-to-one relationship between a specific VRF and the table associated with it. The "strict mode" imposes that each VRF can be associated to a routing table only if such routing table is not already in use by any other VRF. In particular, the strict mode ensures that: 1) given a specific routing table, the VRF (if exists) is uniquely identified; 2) given a specific VRF, the related table is not shared with any other VRF. Constraints (1) and (2) force a one-to-one relationship between each VRF and the corresponding routing table. The strict mode feature is designed to be network-namespace aware and it can be directly enabled/disabled acting on the "strict_mode" parameter. Read and write operations are carried out through the classic sysctl command on net.vrf.strict_mode path, i.e: sysctl -w net.vrf.strict_mode=1. Only two distinct values {0,1} are accepted by the strict_mode parameter: - with strict_mode=0, multiple VRFs can be associated with the same table. This is the (legacy) default kernel behavior, the same that we experience when the strict mode patch set is not applied; - with strict_mode=1, the one-to-one relationship between the VRFs and the associated tables is guaranteed. In this configuration, the creation of a VRF which refers to a routing table already associated with another VRF fails and the error is returned to the user. The kernel keeps track of the associations between a VRF and the routing table during the VRF setup, in the "management" plane. Therefore, the strict mode does not impact the performance or the intrinsic functionality of the data plane in any way. When the strict mode is active it is always possible to disable the strict mode, while the reverse operation is not always allowed. Setting the strict_mode parameter to 0 is equivalent to removing the one-to-one constraint between any single VRF and its associated routing table. Conversely, if the strict mode is disabled and there are multiple VRFs that refer to the same routing table, then it is prohibited to set the strict_mode parameter to 1. In this configuration, any attempt to perform the operation will lead to an error and it will be reported to the user. To enable strict mode once again (by setting the strict_mode parameter to 1), you must first remove all the VRFs that share common tables. There are several use cases which can take advantage from the introduction of the strict mode feature. In particular, the strict mode allows us to: i) guarantee the proper functioning of some applications which deal with routing protocols; ii) perform some tunneling decap operations which require to use specific routing tables for segregating and forwarding the traffic. Considering (i), the creation of different VRFs that point to the same table leads to the situation where two different routing entities believe they have exclusive access to the same table. This leads to the situation where different routing daemons can conflict for gaining routes control due to overlapping tables. By enabling strict mode it is possible to prevent this situation which often occurs due to incorrect configurations done by the users. The ability to enable/disable the strict mode functionality does not depend on the tool used for configuring the networking. In essence, the strict mode patch solves, at the kernel level, what some other patches [1] had tried to solve at the userspace level (using only iproute2) with all the related problems. Considering (ii), the introduction of the strict mode functionality allows us implementing the SRv6 End.DT4 behavior. Such behavior terminates a SR tunnel and it forwards the IPv4 traffic according to the routes present in the routing table supplied during the configuration. The SRv6 End.DT4 can be realized exploiting the routing capabilities made available by the VRF infrastructure. This behavior could leverage a specific VRF for forcing the traffic to be forwarded in accordance with the routes available in the VRF table. Anyway, in order to make the End.DT4 properly work, it must be guaranteed that the table used for the route lookup operations is bound to one and only one VRF. In this way, it is possible to use the table for uniquely retrieving the associated VRF and for routing packets. I would like to thank David Ahern for his constant and valuable support during the design and development phases of this patch set. Comments, suggestions and improvements are very welcome! ==================== Acked-by: David Ahern Signed-off-by: David S. Miller commit 8735e6eaa43899d20a1a54b40e79bfa6b324b107 Author: Andrea Mayer Date: Sat Jun 20 00:54:47 2020 +0200 selftests: add selftest for the VRF strict mode The new strict mode functionality is tested in different configurations and on different network namespaces. Signed-off-by: Andrea Mayer Signed-off-by: David S. Miller commit a59a8ffd4a1bc413c1e0169cf8a31cf9b4237264 Author: Andrea Mayer Date: Sat Jun 20 00:54:46 2020 +0200 vrf: add l3mdev registration for table to VRF device lookup During the initialization phase of the VRF module, the callback for table to VRF device lookup is registered in l3mdev. Signed-off-by: Andrea Mayer Signed-off-by: David S. Miller commit 33306f1aaf82ba7dd072d4d7b97de63b1033cce3 Author: Andrea Mayer Date: Sat Jun 20 00:54:45 2020 +0200 vrf: add sysctl parameter for strict mode Add net.vrf.strict_mode sysctl parameter. When net.vrf.strict_mode=0 (default) it is possible to associate multiple VRF devices to the same table. Conversely, when net.vrf.strict_mode=1 a table can be associated to a single VRF device. When switching from net.vrf.strict_mode=0 to net.vrf.strict_mode=1, a check is performed to verify that all tables have at most one VRF associated, otherwise the switch is not allowed. The net.vrf.strict_mode parameter is per network namespace. Signed-off-by: Andrea Mayer Signed-off-by: David S. Miller commit c8baec385737074dad2f792267baa2c134d94ba6 Author: Andrea Mayer Date: Sat Jun 20 00:54:44 2020 +0200 vrf: track associations between VRF devices and tables Add the data structures and the processing logic to keep track of the associations between VRF devices and routing tables. When a VRF is instantiated, it needs to refer to a given routing table. For each table, we explicitly keep track of the existing VRFs that refer to the table. Signed-off-by: Andrea Mayer Signed-off-by: David S. Miller commit 49042c220b3a31e25902b36df71b23dc10efa0b8 Author: Andrea Mayer Date: Sat Jun 20 00:54:43 2020 +0200 l3mdev: add infrastructure for table to VRF mapping Add infrastructure to l3mdev (the core code for Layer 3 master devices) in order to find out the corresponding VRF device for a given table id. Therefore, the l3mdev implementations: - can register a callback that returns the device index of the l3mdev associated with a given table id; - can offer the lookup function (table to VRF device). Signed-off-by: Andrea Mayer Signed-off-by: David S. Miller commit 435fda26d70379ccb272b880d2e43bff79fcba27 Merge: b1a05ba9ae8cf 5bae1f08e2853 Author: Linus Walleij Date: Sat Jun 20 23:15:07 2020 +0200 Merge branch 'ib-for-each-requested' of /home/linus/linux-gpio into devel commit 84651e81ee3323c7d544edfa6ac6026425fe5a52 Merge: 925ca36913fc7 5bae1f08e2853 Author: Linus Walleij Date: Sat Jun 20 23:13:49 2020 +0200 Merge branch 'ib-for-each-requested' into devel commit 5bae1f08e2853d17ce2ceeca71fe5a3ee03a0a69 Author: Andy Shevchenko Date: Mon Jun 15 18:05:45 2020 +0300 pinctrl: at91: Make use of for_each_requested_gpio() Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko Cc: Ludovic Desroches Cc: Nicolas Ferre Cc: Alexandre Belloni Link: https://lore.kernel.org/r/20200615150545.87964-6-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 7796cdc911fc584a49ee8cfbe53baa00e57267d3 Author: Andy Shevchenko Date: Mon Jun 15 18:05:44 2020 +0300 gpio: xra1403: Make use of for_each_requested_gpio() Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko Cc: Nandor Han Cc: Semi Malinen Link: https://lore.kernel.org/r/20200615150545.87964-5-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 86661fd7faacbb9a5a4d15755551cec43f6a3a14 Author: Andy Shevchenko Date: Mon Jun 15 18:05:43 2020 +0300 gpio: mvebu: Make use of for_each_requested_gpio() Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko Cc: Thierry Reding Cc: "Uwe Kleine-König" Cc: Lee Jones Link: https://lore.kernel.org/r/20200615150545.87964-4-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit aed8fa12552aed54aebe6946a34d59cf18e91a62 Author: Andy Shevchenko Date: Mon Jun 15 18:05:42 2020 +0300 ARM/orion/gpio: Make use of for_each_requested_gpio() Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko Reviewed-by: Andrew Lunn Cc: Jason Cooper Cc: Andrew Lunn Cc: Sebastian Hesselbarth Cc: Gregory Clement Link: https://lore.kernel.org/r/20200615150545.87964-3-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit b3337eb24831db058231ea87838f316d9eb86253 Author: Andy Shevchenko Date: Mon Jun 15 18:05:41 2020 +0300 gpiolib: Introduce for_each_requested_gpio_in_range() macro Introduce for_each_requested_gpio_in_range() macro which helps to iterate over requested GPIO in a range. There are already potential users of it, which are going to be converted by the following patches. For most of them for_each_requested_gpio() shortcut has been added. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200615150545.87964-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit b1a05ba9ae8cf6592e1d1f3e7b03bf8e5863f75f Author: Alexandre Torgue Date: Mon Jun 15 14:59:51 2020 +0200 pinctrl: stm32: add possibility to configure pins individually Adds the possibility to configure a single pin through the gpiolib (i.e: to set PULL_UP/PULL_DOWN config). Mutex behavior is slightly changed to avoid a deadlock when pin_config_set is called (in this case pctldev->mutex is already taken). Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20200615125951.28008-3-alexandre.torgue@st.com Signed-off-by: Linus Walleij commit d9665bb82269f0f2bc18b73f074754e452bb3767 Author: Alexandre Torgue Date: Mon Jun 15 14:59:50 2020 +0200 pinctrl: stm32: return proper error code in pin_config_set ".pin_config_set" or ".pin_config_group_set" can be called with a configuration not supported (i.e. PIN_CONFIG_PERSIST_STATE). In this case, it is more suitable to return -ENOTSUPP instead of -EINVAL. Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20200615125951.28008-2-alexandre.torgue@st.com Signed-off-by: Linus Walleij commit 2254e77665d5af6186781319d8bc109ba03008c1 Author: Etienne Carriere Date: Mon Jun 15 14:54:07 2020 +0200 pinctrl: stm32: defer probe if reset resource is not yet ready Defer probe when pin controller reset is defined in the system resources but not yet probed. Signed-off-by: Etienne Carriere Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20200615125407.27632-3-alexandre.torgue@st.com Signed-off-by: Linus Walleij commit d888229ef2fbc9557cbf953fa8e2687550f5308b Author: Etienne Carriere Date: Mon Jun 15 14:54:06 2020 +0200 pinctrl: stm32: don't print an error on probe deferral during clock get Change STM32 pinctrl driver to not print an error trace when probe is deferred due to clock resource. Probe defer issue (for clocks) could occur during bank registering when some banks have already been registered. In this case banks already registered should be released. To not waste time in this case, it is better to check first if all clocks are available before registering banks. Signed-off-by: Etienne Carriere Signed-off-by: Alexandre Torgue Link: https://lore.kernel.org/r/20200615125407.27632-2-alexandre.torgue@st.com Signed-off-by: Linus Walleij commit b5fc06a10e7aea88c9a9efd4547a3aee44138e3e Author: Paul Cercueil Date: Fri Jun 12 14:06:09 2020 +0200 pinctrl: ingenic: Add ingenic,jz4725b-gpio compatible string Add a compatible string to support the GPIO chips on the JZ4725B SoC. There was already a compatible string for the pinctrl node, but not for the individual GPIO chip nodes. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200612120609.12730-1-paul@crapouillou.net Signed-off-by: Linus Walleij commit 925ca36913fc7dfee9d0bb7f36d81dd108a7b80f Author: Kent Gibson Date: Tue Jun 16 17:36:15 2020 +0800 gpiolib: split character device into gpiolib-cdev Split the cdev specific functionality out of gpiolib.c and into gpiolib-cdev.c. This improves the readability and maintainability of both the cdev and core gpiolib code. Suggested-by: Bartosz Golaszewski Signed-off-by: Kent Gibson Link: https://lore.kernel.org/r/20200616093615.5167-1-warthog618@gmail.com Signed-off-by: Linus Walleij commit 1f6bd574e9d575bd79bca8312dfd3d9345389940 Author: Gaurav Singh Date: Wed Jun 10 07:36:30 2020 -0400 gpio: max732x: remove redundant check The pdata is already checked for its validity. Remove this redundant check. Signed-off-by: Gaurav Singh Link: https://lore.kernel.org/r/20200610113630.11922-1-gaurav1086@gmail.com Signed-off-by: Linus Walleij commit b9fe86204b06655204534ac5e0562d6a3e503b16 Author: Ricardo Cañuelo Date: Wed Jun 17 11:46:33 2020 +0200 drm/bridge: tfp410: Fix setup and hold time calculation This fixes a bug in the calculation of the setup and hold times based on the deskew configuration. Signed-off-by: Ricardo Cañuelo Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200617094633.19663-5-ricardo.canuelo@collabora.com commit db8f92a5e627ffb11ff2d9f35cf54442f5771a49 Author: Ricardo Cañuelo Date: Wed Jun 17 11:46:32 2020 +0200 drm/bridge: tfp410: fix de-skew value retrieval from DT The tfp410 has a data de-skew feature that allows the user to compensate the skew between IDCK and the pixel data and control signals. In the driver, the setup and hold times are calculated from the de-skew value. This retrieves the deskew value from the DT using the proper datatype and range check as described by the binding (u32 from 0 to 7). This fix results from a change in the ti,tfp410 DT binding. Signed-off-by: Ricardo Cañuelo Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200617094633.19663-4-ricardo.canuelo@collabora.com commit 520a994de09ea2f2d6d93919e6b6e0d2864c52b9 Author: Ricardo Cañuelo Date: Wed Jun 17 11:46:31 2020 +0200 dt-bindings: display: ti, tfp410.yaml: Redefine ti, deskew property This changes how the 'ti,deskew' property is defined. It's now an unsigned value from 0 to 7 instead of a signed value from -4 to 3. Until the dtc carries the integer sign through to the yaml output it's easier to define signed types as unsigned. Signed-off-by: Ricardo Cañuelo Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200617094633.19663-3-ricardo.canuelo@collabora.com commit 1dd8915291d58f8d89b67b24e5f4b52a0fa633bb Author: Ricardo Cañuelo Date: Wed Jun 17 11:46:30 2020 +0200 dt-bindings: display: ti,tfp410.txt: convert to yaml Convert the DT binding documentation for the TI TFP410 DPI-to-DVI encoder to json-schema. Signed-off-by: Ricardo Cañuelo Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200617094633.19663-2-ricardo.canuelo@collabora.com commit f11d59d87b8622d4cf9f856c0b8029fb030d8612 Author: Lars-Peter Clausen Date: Mon May 25 14:38:53 2020 +0300 iio: Move attach/detach of the poll func to the core All devices using a triggered buffer need to attach and detach the trigger to the device in order to properly work. Instead of doing this in each and every driver by hand move this into the core. At this point in time, all drivers should have been resolved to attach/detach the poll-function in the same order. This patch removes all explicit calls of iio_triggered_buffer_postenable() & iio_triggered_buffer_predisable() in all drivers, since the core handles now the pollfunc attach/detach. The more peculiar change is for the 'at91-sama5d2_adc' driver, since it's not immediately obvious that removing the hooks doesn't break anything. Eugen was able to test on at91-sama5d2-adc driver, sama5d2-xplained board. All seems to be fine. Signed-off-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Tested-by: Eugen Hristev #for at91-sama5d2-adc Signed-off-by: Jonathan Cameron commit 044d406a8490ea6a4e1a06ccb94090c8a0951d3c Author: Alexandru Ardelean Date: Mon May 25 13:25:13 2020 +0300 iio: at91_adc: remove usage of iio_priv_to_dev() helper We may want to get rid of the iio_priv_to_dev() helper. The reason is that we will hide some of the members of the iio_dev structure (to prevent drivers from accessing them directly), and that will also mean hiding the implementation of the iio_priv_to_dev() helper inside the IIO core. Hiding the implementation of iio_priv_to_dev() implies that some fast-paths may not be fast anymore, so a general idea is to try to get rid of the iio_priv_to_dev() altogether. The iio_priv() helper won't be affected by the rework, as the iio_dev struct will keep a reference to the private information. For this driver, not using iio_priv_to_dev(), means reworking some paths to pass the iio device and using iio_priv() to access the private information. Signed-off-by: Alexandru Ardelean Tested-by: Eugen Hristev Signed-off-by: Jonathan Cameron commit 07b6c9dc4651831f7184aae25a4a9aa701811afc Author: Alexandru Ardelean Date: Mon May 25 11:26:48 2020 +0300 iio: stm32-dfsdm-adc: remove usage of iio_priv_to_dev() helper We may want to get rid of the iio_priv_to_dev() helper. The reason is that we will hide some of the members of the iio_dev structure (to prevent drivers from accessing them directly), and that will also mean hiding the implementation of the iio_priv_to_dev() helper inside the IIO core. Hiding the implementation of iio_priv_to_dev() implies that some fast-paths may not be fast anymore, so a general idea is to try to get rid of the iio_priv_to_dev() altogether. The iio_priv() helper won't be affected by the rework, as the iio_dev struct will keep a reference to the private information. For this driver, not using iio_priv_to_dev(), means reworking some paths to pass the iio device and using iio_priv() to access the private information. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 94f07917ebe86aa660b739cf54e41d4476acde5b Author: Dmitry Osipenko Date: Thu Jun 18 01:27:03 2020 +0300 drm/panel-simple: Add missing connector type for some panels The DRM panel bridge core requires connector type to be set up properly, otherwise it rejects the panel. The missing connector type problem popped up while I was trying to wrap CLAA070WP03XG panel into a DRM bridge in order to test whether panel's rotation property work properly using panel-simple driver on NVIDIA Tegra30 Nexus 7 tablet device, which uses CLAA070WP03XG display panel. The NVIDIA Tegra DRM driver recently gained DRM bridges support for the RGB output and now driver wraps directly-connected panels into DRM bridge. Hence all panels should have connector type set properly now, otherwise the panel's wrapping fails. This patch adds missing connector types for the LVDS panels that are found on NVIDIA Tegra devices: 1. AUO B101AW03 2. Chunghwa CLAA070WP03XG 3. Chunghwa CLAA101WA01A 4. Chunghwa CLAA101WB01 5. EDT ET057090DHU 6. Innolux N156BGE L21 7. Samsung LTN101NT05 Signed-off-by: Dmitry Osipenko Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200617222703.17080-8-digetx@gmail.com commit b27ff5c187dd18cdc0b78ad5f5a78069d168c860 Author: Wei Yongjun Date: Thu Jun 18 13:46:50 2020 +0000 drm/panel: otm8009a: Drop unnessary backlight_device_unregister() It's not necessary to unregister backlight device which registered with devm_backlight_device_register(). Fixes: 12a6cbd4f3f1 ("drm/panel: otm8009a: Use new backlight API") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200618134650.44311-1-weiyongjun1@huawei.com commit 286d966b21587b6303081b902f5c5e30b691baf5 Author: Jason Andryuk Date: Fri Jun 19 16:51:02 2020 -0400 x86/idt: Make idt_descr static Commit 3e77abda65b1 ("x86/idt: Consolidate idt functionality") states that idt_descr could be made static, but it did not actually make the change. Make it static now. Fixes: 3e77abda65b1 ("x86/idt: Consolidate idt functionality") Signed-off-by: Jason Andryuk Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200619205103.30873-1-jandryuk@gmail.com commit 775f43facfe89af605d77a9669aa311b5b95cd07 Author: Andrea Parri (Microsoft) Date: Wed Jun 17 18:46:42 2020 +0200 Drivers: hv: vmbus: Remove the lock field from the vmbus_channel struct The spinlock is (now) *not used to protect test-and-set accesses to attributes of the structure or sc_list operations. There is, AFAICT, a distinct lack of {WRITE,READ}_ONCE()s in the handling of channel->state, but the changes below do not seem to make things "worse". ;-) Signed-off-by: Andrea Parri (Microsoft) Link: https://lore.kernel.org/r/20200617164642.37393-9-parri.andrea@gmail.com Reviewed-by: Michael Kelley Signed-off-by: Wei Liu commit 21d2052c7afb77e3a600090bb043913042a3102f Author: Andrea Parri (Microsoft) Date: Wed Jun 17 18:46:41 2020 +0200 scsi: storvsc: Introduce the per-storvsc_device spinlock storvsc uses the spinlock of the hv_device's primary channel to serialize modifications of stor_chns[] performed by storvsc_do_io() and storvsc_change_target_cpu(), when it could/should use a (per-) storvsc_device spinlock: this change untangles the synchronization mechanism for the (storvsc-specific) stor_chns[] array from the "generic" VMBus code and data structures, clarifying the scope of this synchronization mechanism. Signed-off-by: Andrea Parri (Microsoft) Link: https://lore.kernel.org/r/20200617164642.37393-8-parri.andrea@gmail.com Acked-by: Martin K. Petersen Reviewed-by: Michael Kelley Signed-off-by: Wei Liu commit cf46143fe2c90d08554031b64529c8c1c0f9cb08 Author: Chris Wilson Date: Sat Jun 20 00:45:43 2020 +0100 drm/i915/gt: Replace manual kmap_atomic() with pin_map for renderstate We only emit the renderstate once now during module load, it is no longer a concern that we are delaying context creation and so do not need to so eagerly optimise. Since the last time we have looked at the renderstate, we have a pin_map / flush_map facility that supports simple single mappings, replacing the open-coded kmap_atomic() and prepare_write. As it should be a single page, of which we only write a small portion, we stick to a simple WB [kmap] and use clflush on !llc platforms, rather than creating a temporary WC vmapping for the single page. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200619234543.17499-2-chris@chris-wilson.co.uk commit 033ef711bbfb671ae58a1acb0f8440889c6000c6 Author: Chris Wilson Date: Sat Jun 20 00:45:42 2020 +0100 drm/i915/gvt: Drop redundant prepare_write/pin_pages Since gvt calls pin_map for the shadow batch buffer, this makes the action of prepare_write [+pin_pages] redundant. We can write into the obj->mm.mapping directory and the flush_map routine knows when it has to flush the cpu cache afterwards. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200619234543.17499-1-chris@chris-wilson.co.uk commit 3145550a7f8b08356c8ff29feaa6c56aca12901d Author: Bodo Stroesser Date: Thu Jun 18 15:16:32 2020 +0200 scsi: target: tcmu: Fix crash in tcmu_flush_dcache_range on ARM This patch fixes the following crash (see https://bugzilla.kernel.org/show_bug.cgi?id=208045) Process iscsi_trx (pid: 7496, stack limit = 0x0000000010dd111a) CPU: 0 PID: 7496 Comm: iscsi_trx Not tainted 4.19.118-0419118-generic #202004230533 Hardware name: Greatwall QingTian DF720/F601, BIOS 601FBE20 Sep 26 2019 pstate: 80400005 (Nzcv daif +PAN -UAO) pc : flush_dcache_page+0x18/0x40 lr : is_ring_space_avail+0x68/0x2f8 [target_core_user] sp : ffff000015123a80 x29: ffff000015123a80 x28: 0000000000000000 x27: 0000000000001000 x26: ffff000023ea5000 x25: ffffcfa25bbe08b8 x24: 0000000000000078 x23: ffff7e0000000000 x22: ffff000023ea5001 x21: ffffcfa24b79c000 x20: 0000000000000fff x19: ffff7e00008fa940 x18: 0000000000000000 x17: 0000000000000000 x16: ffff2d047e709138 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000000 x12: ffff2d047fbd0a40 x11: 0000000000000000 x10: 0000000000000030 x9 : 0000000000000000 x8 : ffffc9a254820a00 x7 : 00000000000013b0 x6 : 000000000000003f x5 : 0000000000000040 x4 : ffffcfa25bbe08e8 x3 : 0000000000001000 x2 : 0000000000000078 x1 : ffffcfa25bbe08b8 x0 : ffff2d040bc88a18 Call trace: flush_dcache_page+0x18/0x40 is_ring_space_avail+0x68/0x2f8 [target_core_user] queue_cmd_ring+0x1f8/0x680 [target_core_user] tcmu_queue_cmd+0xe4/0x158 [target_core_user] __target_execute_cmd+0x30/0xf0 [target_core_mod] target_execute_cmd+0x294/0x390 [target_core_mod] transport_generic_new_cmd+0x1e8/0x358 [target_core_mod] transport_handle_cdb_direct+0x50/0xb0 [target_core_mod] iscsit_execute_cmd+0x2b4/0x350 [iscsi_target_mod] iscsit_sequence_cmd+0xd8/0x1d8 [iscsi_target_mod] iscsit_process_scsi_cmd+0xac/0xf8 [iscsi_target_mod] iscsit_get_rx_pdu+0x404/0xd00 [iscsi_target_mod] iscsi_target_rx_thread+0xb8/0x130 [iscsi_target_mod] kthread+0x130/0x138 ret_from_fork+0x10/0x18 Code: f9000bf3 aa0003f3 aa1e03e0 d503201f (f9400260) ---[ end trace 1e451c73f4266776 ]--- The solution is based on patch: "scsi: target: tcmu: Optimize use of flush_dcache_page" which restricts the use of tcmu_flush_dcache_range() to addresses from vmalloc'ed areas only. This patch now replaces the virt_to_page() call in tcmu_flush_dcache_range() - which is wrong for vmalloced addrs - by vmalloc_to_page(). The patch was tested on ARM with kernel 4.19.118 and 5.7.2 Link: https://lore.kernel.org/r/20200618131632.32748-3-bstroesser@ts.fujitsu.com Tested-by: JiangYu Tested-by: Daniel Meyerholt Acked-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 3c58f737231e2c8cbf543a09d84d8c8e80e05e43 Author: Bodo Stroesser Date: Thu Jun 18 15:16:31 2020 +0200 scsi: target: tcmu: Optimize use of flush_dcache_page (scatter|gather)_data_area() need to flush dcache after writing data to or before reading data from a page in uio data area. The two routines are able to handle data transfer to/from such a page in fragments and flush the cache after each fragment was copied by calling the wrapper tcmu_flush_dcache_range(). That means: 1) flush_dcache_page() can be called multiple times for the same page. 2) Calling flush_dcache_page() indirectly using the wrapper does not make sense, because each call of the wrapper is for one single page only and the calling routine already has the correct page pointer. Change (scatter|gather)_data_area() such that, instead of calling tcmu_flush_dcache_range() before/after each memcpy, it now calls flush_dcache_page() before unmapping a page (when writing is complete for that page) or after mapping a page (when starting to read the page). After this change only calls to tcmu_flush_dcache_range() for addresses in vmalloc'ed command ring are left over. The patch was tested on ARM with kernel 4.19.118 and 5.7.2 Link: https://lore.kernel.org/r/20200618131632.32748-2-bstroesser@ts.fujitsu.com Tested-by: JiangYu Tested-by: Daniel Meyerholt Acked-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit c5eb179edd8a169949b1fb153ecfd04649a71c8d Author: Gustavo A. R. Silva Date: Thu Jun 18 09:53:42 2020 -0500 net/sched: cls_u32: Use struct_size() in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 11a33de2df06b4ed23844181cb5c03eea67bfed1 Author: Gustavo A. R. Silva Date: Thu Jun 18 09:46:48 2020 -0500 taprio: Use struct_size() in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary variable _size_. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 1075a4744a32628b6744a616d5d9b3e7df261d35 Merge: e034c6d23bc43 389a338999875 Author: David S. Miller Date: Fri Jun 19 20:17:15 2020 -0700 Merge branch 'Clause-45-PHY-probing-improvements' Russell King says: ==================== Clause 45 PHY probing improvements Last time this series was posted back in May, Florian reviewed the patches, which was the only feedback I received. I'm now posting them without the RFC tag. This series aims to improve the probing for Clause 45 PHYs. The first four patches clean up get_phy_device() and called functions, updating the kernel doc, adding information about the various error return values. We then provide better kerneldoc for get_phy_device(), describing what is going on, and more importantly what the various return codes mean. Patch 6 adds support for probing MMDs >= 8 to check for their presence. Patch 7 changes get_phy_c45_ids() to only set the returned devices_in_package if we successfully find a PHY. Patch 8 splits the use of "devices in package" from the "mmds present". Patch 9 expands our ID reading to cover the other MMDs. ==================== Signed-off-by: David S. Miller commit 389a338999875b6e7b111096e8b6484434556449 Author: Russell King Date: Thu Jun 18 14:46:13 2020 +0100 net: phy: read MMD ID from all present MMDs Expand the device_ids[] array to allow all MMD IDs to be read rather than just the first 8 MMDs, but only read the ID if the MDIO_STAT2 register reports that a device really is present here for these new devices to maintain compatibility with our current behaviour. Note that only a limited number of devices have MDIO_STAT2. 88X3310 PHY vendor MMDs do are marked as present in the devices_in_package, but do not contain IEE 802.3 compatible register sets in their lower space. This avoids reading incorrect values as MMD identifiers. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 320ed3bf900075614c43499dc01db8d25717b986 Author: Russell King Date: Thu Jun 18 14:46:08 2020 +0100 net: phy: split devices_in_package We have two competing requirements for the devices_in_package field. We want to use it as a bit array indicating which MMDs are present, but we also want to know if the Clause 22 registers are present. Since "devices in package" is a term used in the 802.3 specification, keep this as the as-specified values read from the PHY, and introduce a new member "mmds_present" to indicate which MMDs are actually present in the PHY, derived from the "devices in package" value. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 5ba33cf4839266f059a6e2342c005709cc6cf256 Author: Russell King Date: Thu Jun 18 14:46:03 2020 +0100 net: phy: set devices_in_package only after validation Only set the devices_in_package to a non-zero value if we find a valid value for this field, so we avoid leaving it set to e.g. 0x1fffffff. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit c746053d275c8b6ff1d713addabf049c9c9a58fc Author: Russell King Date: Thu Jun 18 14:45:58 2020 +0100 net: phy: add support for probing MMDs >= 8 for devices-in-package Add support for probing MMDs above 7 for a valid devices-in-package specifier, but only probe the vendor MMDs for this if they also report that there the device is present in status register 2. This avoids issues where the MMD is implemented, but does not provide IEEE 802.3 compliant registers (such as the MV88X3310 PHY.) Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 439625a7726cebe3ba5eb68a6ac74ed30846a384 Author: Russell King Date: Thu Jun 18 14:45:53 2020 +0100 net: phy: reword get_phy_device() kerneldoc Reword the get_phy_device() kerneldoc to be more explicit about how we probe for the PHY, and what the various return conditions signify. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit ee951005e95eb61b3bde893b6c7be1abaf07f59b Author: Russell King Date: Thu Jun 18 14:45:48 2020 +0100 net: phy: clean up get_phy_c22_id() invalid ID handling Move the ID check from get_phy_device() into get_phy_c22_id(), which simplifies get_phy_device(). The ID reading functions are now responsible for indicating whether they found a PHY or not via their return code - they must return -ENODEV when a PHY is not present. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 48c543887bc528451e3a64c503ae82386520c686 Author: Russell King Date: Thu Jun 18 14:45:43 2020 +0100 net: phy: clean up get_phy_c45_ids() failure handling When we decide that a PHY is not present, we do not need to go through the hoops of setting *phy_id to 0xffffffff, and then return zero to make get_phy_device() fail - we can return -ENODEV which will have the same effect. Doing so means we no longer have to pass a pointer to phy_id in, and we can then clean up the clause 22 path in a similar way. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit e63062616df323cee4266ed3f964e20e00092d9a Author: Russell King Date: Thu Jun 18 14:45:37 2020 +0100 net: phy: clean up PHY ID reading Rearrange the code to read the PHY IDs, so we don't call get_phy_id() only to immediately call get_phy_c45_ids(). Move that logic into get_phy_device(), which results in better readability. Reviewed-by: Florian Fainelli Signed-off-by: Russell King Signed-off-by: David S. Miller commit 454a78d17845882aa552dc3ab86605910da9a96d Author: Russell King Date: Thu Jun 18 14:45:32 2020 +0100 net: phy: clean up cortina workaround Move the Cortina PHY workaround out of the "devices in package" loop; it doesn't need to be in there as the control flow will terminate the loop once we enter the workaround irrespective of the workaround's outcome. The workaround is triggered by the ID being mostly 1's, which will in any case terminate the loop. Signed-off-by: Russell King Signed-off-by: David S. Miller commit e034c6d23bc43266af1fa983212218f4aa38f995 Author: Gustavo A. R. Silva Date: Thu Jun 18 08:35:00 2020 -0500 tipc: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit f51853fc0682d445c759047cb0608dc08b37a5af Author: Asutosh Das Date: Tue Jun 9 10:17:46 2020 -0700 scsi: ufs: docs: Add WriteBooster documentation Adds sysfs documentation for WriteBooster entries. Link: https://lore.kernel.org/r/1591723067-22998-1-git-send-email-asutoshd@codeaurora.org Acked-by: Avri Altman Signed-off-by: Asutosh Das Signed-off-by: Martin K. Petersen commit 4c7b4d63273d22c5198c171fbaf93539fbb40ca2 Author: Bean Huo Date: Fri Jun 19 17:41:17 2020 +0200 scsi: core: Fix formatting errors in scsi_lib.c Delete trailing whitespace, multiple blank lines, and make switch/case be at the same indentation. Link: https://lore.kernel.org/r/20200619154117.10262-3-huobean@gmail.com Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 71df6fb976c37a290c0fd15db29288c3499bed4e Author: Bean Huo Date: Fri Jun 19 17:41:16 2020 +0200 scsi: core: Remove scsi_sdb_cache After commit f664a3cc17b7 ("scsi: kill off the legacy IO path"), scsi_sdb_cache is not used anymore. Remove it. Link: https://lore.kernel.org/r/20200619154117.10262-2-huobean@gmail.com Reviewed-by: Bart Van Assche Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit da3f28da1c27fed718d697bcf46bdc491563c274 Author: Bodo Stroesser Date: Fri Jun 19 19:38:06 2020 +0200 scsi: target: tcmu: Remove unnecessary bit TCMU_CMD_BIT_INFLIGHT Since commit 61fb24822166 ("scsi: target: tcmu: Userspace must not complete queued commands") tcmu_cmd bit TCMU_CMD_BIT_INFLIGHT is set but never checked. So we can remove it safely. [mkp: fixed Mike's email address] Link: https://lore.kernel.org/r/20200619173806.5016-1-bstroesser@ts.fujitsu.com Signed-off-by: Bodo Stroesser Acked-by: Mike Christie Signed-off-by: Martin K. Petersen commit 393403efc360a2440c389a3fb3e92a6ec9dbe01c Author: Colin Ian King Date: Wed Jun 17 09:49:11 2020 +0100 scsi: ufs: ufs-exynos: Fix spelling mistake "pa_granularty" -> "pa_granularity" There is a spelling mistake in a dev_warn message. Fix it. Link: https://lore.kernel.org/r/20200617084911.167359-1-colin.king@canonical.com Reviewed-by: Alim Akhtar Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 9a3cd470f8e3d870793c9e72dacc1064228f59fb Author: Stanley Chu Date: Tue Jun 16 17:51:20 2020 +0800 scsi: ufs-mediatek: Make ufs_mtk_wait_link_state static Fix build warning reported by kernel test robot: Warning: >> drivers/scsi/ufs/ufs-mediatek.c:181:5: warning: no previous prototype >> for 'ufs_mtk_wait_link_state' [-Wmissing-prototypes] Link: https://lore.kernel.org/r/20200616095120.14570-1-stanley.chu@mediatek.com Reported-by: kernel test robot Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 6eb81373434b0101ac7ea47e1e09fd3ae22818c8 Merge: b3a9e3b9622ae 44a7f3e8222a7 Author: Stephen Boyd Date: Fri Jun 19 19:38:01 2020 -0700 Merge branch 'clk-socfpga' into clk-next * clk-socfpga: clk: socfpga: agilex: mpu_l2ram_clk should be mpu_ccu_clk clk: socfpga: agilex: add nand_x_clk and nand_ecc_clk dt-bindings: agilex: add NAND_X_CLK and NAND_ECC_CLK commit 44a7f3e8222a7345b72a83a26d6d599bba815cf9 Author: Dinh Nguyen Date: Tue Jun 16 15:24:17 2020 -0500 clk: socfpga: agilex: mpu_l2ram_clk should be mpu_ccu_clk Preliminary documentation documented the mpu_l2ram_clk, but since then, the mpu_l2ram_clk is no longer documented. It's now referred to as mpu_ccu_clk. Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20200616202417.14376-3-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit 6f3bcf56f8eec78e51cac8b3dd67ed7ec67e3e1e Author: Dinh Nguyen Date: Tue Jun 16 15:24:16 2020 -0500 clk: socfpga: agilex: add nand_x_clk and nand_ecc_clk And the nand_x_clk and nand_ecc_clk. Make the nand_x_clk be the main clock that is feeding the NAND IP and correct it's parent to be the l4_mp_clk. Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20200616202417.14376-2-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit c2710fdf935bb1286e8eb6a6b44991bab1fe87af Author: Dinh Nguyen Date: Tue Jun 16 15:24:15 2020 -0500 dt-bindings: agilex: add NAND_X_CLK and NAND_ECC_CLK Add the NAND_X_CLK and NAND_ECC_CLK clocks. Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20200616202417.14376-1-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit 56643d9ad2b4933d55f872f61195c1650f9958e9 Author: Maxime Ripard Date: Mon Jun 15 10:41:07 2020 +0200 clk: bcm: rpi: Remove the quirks for the CPU clock The CPU clock has had so far a bunch of quirks to expose the clock tree properly, but since we reverted to exposing them through the MMIO driver, we can remove that code from the firmware driver. Acked-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/acdf820c2f78a25dd7480a0c018b8b387acd013e.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 0d46fafc0364688c54b4a9d21cee0cb2eabf43bd Author: Maxime Ripard Date: Mon Jun 15 10:41:06 2020 +0200 clk: bcm2835: Don't cache the PLLB rate The PLLB rate will be changed through the firmware clocks drivers and will change behind this drivers' back, so we don't want to cache the rate. Acked-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/9864daba2f584ed49aee5ed1d2f4d48507c58197.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit b2683d069bcae4277332243850d07ac24be05ab2 Author: Maxime Ripard Date: Mon Jun 15 10:41:05 2020 +0200 clk: bcm2835: Allow custom CCF flags for the PLLs While some clock types allow for each clock to specify its own custom flags, the PLLs can't. We will need this for the PLLB, so let's add it. Acked-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/ae8bd505d8851f6646e244cd76b6b289346973c8.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit dbe01b4412914c7ce8fb11ea45bf67fafbffd068 Author: Maxime Ripard Date: Mon Jun 15 10:41:03 2020 +0200 Revert "clk: bcm2835: remove pllb" This reverts commit 2256d89333bd17b8b56b42734a7e1046d52f7fc3. Since we will be expanding the firmware clock driver, we'll need to remove the quirks to deal with the PLLB. However, we still want to expose the clock tree properly, so having that clock in the MMIO driver will allow that. Acked-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/5d26a4c58248f5be7760a7f2f720a1310baea5dd.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 7dad8a613185320093de021ca8abba986bc043cb Author: Maxime Ripard Date: Mon Jun 15 10:41:02 2020 +0200 clk: bcm: rpi: Give firmware clocks a name We've registered the firmware clocks using their ID as name, but it's much more convenient to register them using their proper name. Since the firmware doesn't provide it, we have to duplicate it. Acked-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/a52a5f5768cd33716cdd35237c6613f26ad75013.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 93d2725affd65686792f4b57e49ef660f3c8c0f9 Author: Maxime Ripard Date: Mon Jun 15 10:41:01 2020 +0200 clk: bcm: rpi: Discover the firmware clocks The RaspberryPi4 firmware actually exposes more clocks than are currently handled by the driver and we will need to change some of them directly based on the pixel rate for the display related clocks, or the load for the GPU. Since the firmware implements DVFS, this rate change can have a number of side-effects, including adjusting the various PLL voltages or the PLL parents. The firmware also implements thermal throttling, so even some thermal pressure can change those parameters behind Linux back. DVFS is currently implemented on the arm, core, h264, v3d, isp and hevc clocks, so updating any of them using the MMIO driver (and thus behind the firmware's back) can lead to troubles, the arm clock obviously being the most problematic. In order to make Linux play as nice as possible with those constraints, it makes sense to rely on the firmware clocks as much as possible. However, the firmware doesn't seem to provide some equivalents to their MMIO counterparts, so we can't really replace that driver entirely. Fortunately, the firmware has an interface to discover the clocks it exposes. Let's use it to discover, register the clocks in the clocks framework and then expose them through the device tree for consumers to use them. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/438d73962741a8c5f7c689319b7443b930a87fde.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit be1559f69768da4576f5b4b9073466e82c031153 Author: Maxime Ripard Date: Mon Jun 15 10:41:00 2020 +0200 clk: bcm: rpi: Add an enum for the firmware clocks While the firmware allows us to discover the available clocks, we need to discriminate those clocks to only register the ones meaningful to Linux. The firmware also doesn't provide a clock name, so having a list of the ID will help us to give clocks a proper name later on. Acked-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/4738f77ee7de9b48a3bb1c558ead958d0cc064d9.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit d4b4f1b6b97e56d49a69d6ee734f96f4d3d35762 Author: Maxime Ripard Date: Mon Jun 15 10:40:59 2020 +0200 clk: bcm: rpi: Add DT provider for the clocks For the upcoming registration of the clocks provided by the firmware, make sure it's exposed to the device tree providers. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/4d8dbe4aaae98b3d3812ad7c3dba53d645cadbaf.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 23e114b6b7a03a98d27cf327f0d173ad2d219c13 Author: Maxime Ripard Date: Mon Jun 15 10:40:58 2020 +0200 clk: bcm: rpi: Make the PLLB registration function return a clk_hw The raspberrypi_register_pllb has been returning an integer so far to notify whether the functions has exited successfully or not. However, the OF provider functions in the clock framework require access to the clk_hw structure so that we can expose those clocks to device tree consumers. Since we'll want that for the future clocks, let's return a clk_hw pointer instead of the return code. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/97218559db643e62fdd2b5e3046a2a05b8c2e769.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 3ea59ace7c0f475bf12f13b63a47a6983959d754 Author: Maxime Ripard Date: Mon Jun 15 10:40:57 2020 +0200 clk: bcm: rpi: Split pllb clock hooks The driver only supports the pllb for now and all the clock framework hooks are a mix of the generic firmware interface and the specifics of the pllb. Since we will support more clocks in the future let's split the generic and specific hooks Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/fdc21962fdc7de5c46232f198672d5d5c868ec74.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit c1ce3509eca684e72d0910192d5549d01558b658 Author: Maxime Ripard Date: Mon Jun 15 10:40:56 2020 +0200 clk: bcm: rpi: Rename is_prepared function The raspberrypi_fw_pll_is_on function doesn't only apply to PLL registered in the driver, but any clock exposed by the firmware. Since we also implement the is_prepared hook, make the function consistent with the other function names. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/ac93cc4e245316bb7e7426ac5ab0de8f3d919731.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 81df01518879d9d0ccce40564883ac0ba3299c47 Author: Maxime Ripard Date: Mon Jun 15 10:40:55 2020 +0200 clk: bcm: rpi: Pass the clocks data to the firmware function The raspberry_clock_property only takes the clock ID as an argument, but now that we have a clock data structure it makes more sense to just pass that structure instead. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/d7a3b4df3ca23feb6e0d9c7ae2d232bfb913f926.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 8a1f3ebc38fca949ad69feb1e536b71360e8cbb4 Author: Maxime Ripard Date: Mon Jun 15 10:40:54 2020 +0200 clk: bcm: rpi: Add clock id to data The driver has really only supported one clock so far and has hardcoded the ID used in communications with the firmware in all the functions implementing the clock framework hooks. Let's store that in the clock data structure so that we can support more clocks later on. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/e23c37961b97b027e21efa3b818578970f88527a.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit f922c560c95613f9aa45e135380bb78d3abbdb35 Author: Maxime Ripard Date: Mon Jun 15 10:40:53 2020 +0200 clk: bcm: rpi: Create a data structure for the clocks So far the driver has really only been providing a single clock, and stored both the data associated to that clock in particular with the data associated to the "controller". Since we will change that in the future, let's decouple the clock data from the provider data. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/ee7f508db226214fab4add7f93a351f4137c86a1.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit df4b6a4c3bf5b0bc0fb5c35af9ca6da9c78922ee Author: Maxime Ripard Date: Mon Jun 15 10:40:52 2020 +0200 clk: bcm: rpi: Use CCF boundaries instead of rolling our own The raspberrypi firmware clock driver has a min_rate / max_rate clamping by storing the info it needs in a private structure. However, the CCF already provides such a facility, so we can switch to it to remove the boilerplate. Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/d4c53dab6de5d5f70743d9c139d0117589530e62.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 9bd43a6184c2559032a2a8675c135abf7777a736 Author: Maxime Ripard Date: Mon Jun 15 10:40:51 2020 +0200 clk: bcm: rpi: Make sure the clkdev lookup is removed The clkdev lookup created for the cpufreq device is never removed if there's an issue later in probe or at module removal time. Let's convert to the managed variant of the clk_hw_register_clkdev function to make sure it happens. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/075e2c6d315eccdaf8fb72b320712b86e6c25b22.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 55ee6a992dfe9c477da629b1ddf33a0e1bbd83bc Author: Maxime Ripard Date: Mon Jun 15 10:40:50 2020 +0200 clk: bcm: rpi: Switch to clk_hw_register_clkdev Since we don't care about retrieving the clk_lookup structure pointer returned by clkdev_hw_create, we can just use the clk_hw_register_clkdev function. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/59f6208b6fe3367e735b0cca4f65c2c937639af9.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 8f60112f66bf3a17ef3206e716064aa76011b94d Author: Maxime Ripard Date: Mon Jun 15 10:40:49 2020 +0200 clk: bcm: rpi: Remove pllb_arm_lookup global pointer The pllb_arm_lookup pointer in the struct raspberrypi_clk is not used for anything but to store the returned pointer to clkdev_hw_create, and is not used anywhere else in the driver. Let's remove that global pointer from the structure. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/189407f54906d2b07c91de7a4eeb6d8c8934280f.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 683de1868164ec8d252ec9261a5dfd0f9edd7f52 Author: Maxime Ripard Date: Mon Jun 15 10:40:48 2020 +0200 clk: bcm: rpi: Make sure pllb_arm is removed The pllb_arm clock was created at probe time, but was never removed if something went wrong later in probe, or if the driver was ever removed from the system. Now that we are using clk_hw_register(), we can just use its managed variant to take care of that for us. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/34254ed1556614658e5dad5cca4cf4fe617df7fc.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit c70011a985001e4dec4ce10154b9ff0f00f4140f Author: Maxime Ripard Date: Mon Jun 15 10:40:47 2020 +0200 clk: bcm: rpi: Remove global pllb_arm clock pointer The pllb_arm clk_hw pointer in the raspberry_clk structure isn't used anywhere but in the raspberrypi_register_pllb_arm. Let's remove it, this will make our lives easier in future patches. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/842859cf1a77478620f45049178a588448202858.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 72856a4ed555892c0c793becebba93fc43c50856 Author: Maxime Ripard Date: Mon Jun 15 10:40:46 2020 +0200 clk: bcm: rpi: Use clk_hw_register for pllb_arm The pllb_arm clock is defined as a fixed factor clock with the pllb clock as a parent. However, all its configuration is entirely static, and thus we don't really need to call clk_hw_register_fixed_factor() but can simply call clk_hw_register() with a static clk_fixed_factor structure. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/1146177664999eeda65856d28ce94025021dd85e.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 869bd27541fe4eb1468dd4f0ddf76af6dd9b35ac Author: Maxime Ripard Date: Mon Jun 15 10:40:45 2020 +0200 clk: bcm: rpi: Statically init clk_init_data Instead of declaring the clk_init_data and then calling memset on it, just initialise properly. Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Acked-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/0342572daa561dc1bb4c9fd10641b2016493e32b.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit fbac2e7787ac6fd2226a5935c80c0ff80d607bce Author: Maxime Ripard Date: Mon Jun 15 10:40:44 2020 +0200 clk: bcm: rpi: Allow the driver to be probed by DT The current firmware clock driver for the RaspberryPi can only be probed by manually registering an associated platform_device. While this works fine for cpufreq where the device gets attached a clkdev lookup, it would be tedious to maintain a table of all the devices using one of the clocks exposed by the firmware. Since the DT on the other hand is the perfect place to store those associations, make the firmware clocks driver probe-able through the device tree so that we can represent it as a node. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Reviewed-by: Nicolas Saenz Julienne Reviewed-by: Stephen Boyd Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/cb8203b862e386ac6c3df3eff0bb5a238b6ec97a.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 511aba099cd4c44cb8ad4ca7e2d6ffc034eed743 Author: Maxime Ripard Date: Mon Jun 15 10:40:43 2020 +0200 firmware: rpi: Only create clocks device if we don't have a node for it The firmware clocks driver was previously probed through a platform_device created by the firmware driver. Since we will now have a node for that clocks driver, we need to create the device only in the case where there's no node for it already. Reviewed-by: Nicolas Saenz Julienne Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/72114c4287ebda2dbd952ea238d4489d359897e5.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 74a0caa5ef1c25905c4409b350ed9a8e0d9a3b74 Author: Maxime Ripard Date: Mon Jun 15 10:40:42 2020 +0200 dt-bindings: clock: Add a binding for the RPi Firmware clocks The firmware running on the RPi VideoCore can be used to discover and change the various clocks running in the BCM2711. Since devices will need to use them through the DT, let's add a pretty simple binding. Cc: Michael Turquette Cc: linux-clk@vger.kernel.org Cc: devicetree@vger.kernel.org Reviewed-by: Stephen Boyd Reviewed-by: Rob Herring Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/f6105207e7ef5a5ea8d7a1774faf989d341a25f5.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit d4c708c032df3d95de297232e20041737e99d126 Author: Florian Fainelli Date: Mon Jun 15 10:40:41 2020 +0200 dt-bindings: arm: bcm: Convert BCM2835 firmware binding to YAML Convert the Raspberry Pi BCM2835 firmware binding document to YAML. Verified with dt_binding_check and dtbs_check. Signed-off-by: Florian Fainelli Tested-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/5bc0b9be8544b07300fccab4d4f26e5e5d8e62b2.1592210452.git-series.maxime@cerno.tech Signed-off-by: Stephen Boyd commit 1bc95972715ab81fd3fa9f5b45ace5bb607af1b5 Author: Maxime Ripard Date: Thu Jun 11 11:23:16 2020 +0200 clk: bcm: Add BCM2711 DVP driver The HDMI block has a block that controls clocks and reset signals to the HDMI0 and HDMI1 controllers. Let's expose that through a clock driver implementing a clock and reset provider. Cc: Michael Turquette Cc: Stephen Boyd Cc: Rob Herring Cc: linux-clk@vger.kernel.org Cc: devicetree@vger.kernel.org Reviewed-by: Stephen Boyd Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/bb60d97fc76b61c2eabef5a02ebd664c0f57ede0.1591867332.git-series.maxime@cerno.tech Acked-by: Stefan Wahren Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Stephen Boyd commit 8dda00049093786c9ff8cf9474b96aa60ed961cd Author: Maxime Ripard Date: Thu Jun 11 11:23:15 2020 +0200 dt-bindings: clock: Add BCM2711 DVP binding The BCM2711 has a unit controlling the HDMI0 and HDMI1 clock and reset signals. Let's add a binding for it. Cc: Philipp Zabel Cc: Rob Herring Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/0b8f09baff1ff3c471631e6f523e2b2cd773ec47.1591867332.git-series.maxime@cerno.tech Acked-by: Stefan Wahren Signed-off-by: Stephen Boyd commit f93ac080f5778db2c7f2a6387cd63ddb373d79c9 Merge: e244d2058dcdf a9701376ed0fb Author: Stephen Boyd Date: Fri Jun 19 17:07:55 2020 -0700 Merge branch 'reset/simple' of git://git.pengutronix.de/git/pza/linux into clk-bcm Pull immutable reset branch to get reset-simple header. * 'reset/simple' of git://git.pengutronix.de/git/pza/linux: reset: simple: Add reset callback reset: Move reset-simple header out of drivers/reset commit e244d2058dcdff6c7ac21efefed75eba43525140 Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:02:31 2020 +0200 clk: bcm63xx-gate: switch to dt-bindings definitions Now that there are header files for each SoC, let's use them in the bcm63xx-gate controller driver. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20200615090231.2932696-9-noltari@gmail.com Acked-by: Florian Fainelli Signed-off-by: Stephen Boyd commit f3cd8c96a97ca970a116af092555778f792d0abf Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:02:30 2020 +0200 mips: bmips: add BCM63268 clock definitions Add header with BCM63268 definitions in order to be able to include it from device tree files. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20200615090231.2932696-8-noltari@gmail.com Acked-by: Florian Fainelli Signed-off-by: Stephen Boyd commit ad31e793f246d5276bc24829cb3d1ca95c3c92ff Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:02:29 2020 +0200 mips: bmips: add BCM6368 clock definitions Add header with BCM6368 definitions in order to be able to include it from device tree files. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20200615090231.2932696-7-noltari@gmail.com Acked-by: Florian Fainelli Signed-off-by: Stephen Boyd commit fb8fb3f13f86fda0af72c02691333fdba5164c20 Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:02:28 2020 +0200 mips: bmips: add BCM6362 clock definitions Add header with BCM6362 definitions in order to be able to include it from device tree files. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20200615090231.2932696-6-noltari@gmail.com Acked-by: Florian Fainelli Signed-off-by: Stephen Boyd commit d3499bda4e176de6853c24e5243f3906d9390d54 Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:02:27 2020 +0200 mips: bmips: add BCM6358 clock definitions Add header with BCM6358 definitions in order to be able to include it from device tree files. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20200615090231.2932696-5-noltari@gmail.com Acked-by: Florian Fainelli Signed-off-by: Stephen Boyd commit 92cd8bb27a692d93ba7442ec123e96528f5e992c Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:02:26 2020 +0200 mips: bmips: add BCM6328 clock definitions Add header with BCM6328 definitions in order to be able to include it from device tree files. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20200615090231.2932696-4-noltari@gmail.com Acked-by: Florian Fainelli Signed-off-by: Stephen Boyd commit 020c89c5a981cb6d0424aadab8ae067a3b6bd8e6 Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:02:25 2020 +0200 mips: bmips: add BCM6318 clock definitions Add header with BCM6318 definitions in order to be able to include it from device tree files. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20200615090231.2932696-3-noltari@gmail.com Acked-by: Florian Fainelli Signed-off-by: Stephen Boyd commit c7f03eea07682639ef320aab348b706c330941dd Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:02:24 2020 +0200 mips: bmips: add BCM3368 clock definitions Add header with BCM3368 definitions in order to be able to include it from device tree files. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20200615090231.2932696-2-noltari@gmail.com Acked-by: Florian Fainelli Signed-off-by: Stephen Boyd commit 90741a7268dfe4d4f159c8e10a1c1cb9d4e31dd9 Author: Álvaro Fernández Rojas Date: Wed Jun 10 16:08:58 2020 +0200 clk: bcm63xx-gate: add BCM6318 support Add support for the gated clock controllers found on the BCM6318. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20200610140858.207329-3-noltari@gmail.com Signed-off-by: Stephen Boyd commit 8fc4f427b84b3949db0be2f66955f91a0c29ba66 Author: Álvaro Fernández Rojas Date: Wed Jun 10 16:08:57 2020 +0200 dt-bindings: clock: bcm63xx: add 6318 gated clock bindings Add BCM6318 to the binding documentation for the gated clock controllers found on BCM63xx SoCs. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20200610140858.207329-2-noltari@gmail.com Acked-by: Rob Herring Signed-off-by: Stephen Boyd commit cf8030d7035bd3e89c9e66f7193a7fc8057a9b9a Author: Álvaro Fernández Rojas Date: Tue Jun 9 13:08:46 2020 +0200 clk: bcm63xx-gate: fix last clock availability In order to make the last clock available, maxbit has to be set to the highest bit value plus 1. Fixes: 1c099779c1e2 ("clk: add BCM63XX gated clock controller driver") Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20200609110846.4029620-1-noltari@gmail.com Reviewed-by: Florian Fainelli Signed-off-by: Stephen Boyd commit bb8dc2695a7db4f35c1de94d212f86229bb4a5d2 Author: Andrii Nakryiko Date: Fri Jun 19 15:20:24 2020 -0700 tools/bpftool: Relicense bpftool's BPF profiler prog as dual-license GPL/BSD Relicense it to be compatible with the rest of bpftool files. Suggested-by: Quentin Monnet Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200619222024.519774-1-andriin@fb.com commit d56b74b9e1b8d747171dc6ff60315c00c41562ce Author: Yonghong Song Date: Thu Jun 18 16:46:32 2020 -0700 tools/bpf: Add verifier tests for 32bit pointer/scalar arithmetic Added two test_verifier subtests for 32bit pointer/scalar arithmetic with BPF_SUB operator. They are passing verifier now. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20200618234632.3321367-1-yhs@fb.com commit 6c6935419e2fd8ef1fcde71c4e50b9095e520900 Author: Yonghong Song Date: Thu Jun 18 16:46:31 2020 -0700 bpf: Avoid verifier failure for 32bit pointer arithmetic When do experiments with llvm (disabling instcombine and simplifyCFG), I hit the following error with test_seg6_loop.o. ; R1=pkt(id=0,off=0,r=48,imm=0), R7=pkt(id=0,off=40,r=48,imm=0) w2 = w7 ; R2_w=inv(id=0,umax_value=4294967295,var_off=(0x0; 0xffffffff)) w2 -= w1 R2 32-bit pointer arithmetic prohibited The corresponding source code is: uint32_t srh_off // srh and skb->data are all packet pointers srh_off = (char *)srh - (char *)(long)skb->data; The verifier does not support 32-bit pointer/scalar arithmetic. Without my llvm change, the code looks like ; R3=pkt(id=0,off=40,r=48,imm=0), R8=pkt(id=0,off=0,r=48,imm=0) w3 -= w8 ; R3_w=inv(id=0) This is explicitly allowed in verifier if both registers are pointers and the opcode is BPF_SUB. To fix this problem, I changed the verifier to allow 32-bit pointer/scaler BPF_SUB operations. At the source level, the issue could be workarounded with inline asm or changing "uint32_t srh_off" to "uint64_t srh_off". But I feel that verifier change might be the right thing to do. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200618234631.3321118-1-yhs@fb.com commit 70fc6d9c14e24f9efae968589e5edf584a788e23 Author: Gustavo A. R. Silva Date: Fri Jun 19 13:10:07 2020 -0500 net: dsa: sja1105: Use struct_size() in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit a422d5ff6defb1c86a93f3f320d35eeb545455dd Author: Gustavo A. R. Silva Date: Fri Jun 19 13:01:49 2020 -0500 cxgb4: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit f362b70bd67add130ae4321306b62237356889a4 Author: Gustavo A. R. Silva Date: Fri Jun 19 12:37:15 2020 -0500 ethernet: ti: am65-cpsw-qos: Use struct_size() in devm_kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary variable _size_. This code was detected with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit cc7a21b6fbd945f8d8f61422ccd27203c1fafeb7 Author: Eric Dumazet Date: Fri Jun 19 12:02:59 2020 -0700 ipv6: icmp6: avoid indirect call for icmpv6_send() If IPv6 is builtin, we do not need an expensive indirect call to reach icmp6_send(). v2: put inline keyword before the type to avoid sparse warnings. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit e9f0809fb91015b85d159dbfdc64f705fda08712 Merge: 4b61d3e8d3dae 4dababa232f26 Author: David S. Miller Date: Fri Jun 19 13:17:32 2020 -0700 Merge branch 'cxgb4-add-support-for-ethtool-n-tuple-filters' Vishal Kulkarni says: ==================== cxgb4: add support for ethtool n-tuple filters Patch 1: Adds data structure to maintain list of filters and handles init/dinit of the same. Patch 2: Handles addition of filters via ETHTOOL_SRXCLSRLINS. Patch 3: Handles deletion of filtes via ETHTOOL_SRXCLSRLDEL. Patch 4: Handles viewing of added filters. Patch 5: Adds FLOW_ACTION_QUEUE support. ==================== Signed-off-by: David S. Miller commit 4dababa232f26eda7e827cfc0360c160549d9a84 Author: Vishal Kulkarni Date: Fri Jun 19 19:51:39 2020 +0530 cxgb4: add action to steer flows to specific Rxq Add support for queue action to steer Rx traffic hitting the flows to specified Rxq. Signed-off-by: Rahul Lakkireddy Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller commit 27ee29936443f966547c238a93fd1d9fa4e18c2e Author: Vishal Kulkarni Date: Fri Jun 19 19:51:38 2020 +0530 cxgb4: add support to fetch ethtool n-tuple filters Add support to fetch the requested ethtool n-tuple filters by translating them from hardware spec to ethtool n-tuple spec. Signed-off-by: Rahul Lakkireddy Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller commit db43b30cd89c2549216b9e4ef27c5d2f9dcb964d Author: Vishal Kulkarni Date: Fri Jun 19 19:51:37 2020 +0530 cxgb4: add ethtool n-tuple filter deletion Add support to delete ethtool n-tuple filter. Fetch the appropriate filter region (HPFILTER, HASH, NORMAL) in which the filter exists, and delete it from the respective region, accordingly. Signed-off-by: Rahul Lakkireddy Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller commit c8729cac2a11e4bc170f5d0041d5561bb7fe82a0 Author: Vishal Kulkarni Date: Fri Jun 19 19:51:36 2020 +0530 cxgb4: add ethtool n-tuple filter insertion Add support to parse and insert ethtool n-tuple filters. Translate n-tuple spec to flow spec and use the existing tc-flower offload infra to insert ethtool n-tuple filters. Signed-off-by: Rahul Lakkireddy Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller commit d915c299f1da68a7dbb43895b8741c7b916c9d08 Author: Vishal Kulkarni Date: Fri Jun 19 19:51:35 2020 +0530 cxgb4: add skeleton for ethtool n-tuple filters Allocate and manage resources required for ethtool n-tuple filters. Also fetch the HASH filter region size and calculate nhash entries. Signed-off-by: Rahul Lakkireddy Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller commit b103c607654e55dcb1da40557628a2044b72c936 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:26 2020 +0200 docs: staging: don't use literalinclude Such directive cause troubles with PDF output. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/9a9043face7ace90e3616ba840a8e09cfc8f143f.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 8e2a46a40fa76570e535e5baa2d351510b6e61fa Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:25 2020 +0200 docs: move remaining stuff under Documentation/*.txt to Documentation/staging There are several files that I was unable to find a proper place for them, and 3 ones that are still in plain old text format. Let's place those stuff behind the carpet, as we'd like to keep the root directory clean. We can later discuss and move those into better places. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/11bd0d75e65a874f7c276a0aeab0fe13f3376f5f.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 4fb33953438bf3c67c655a4d187f1645446863fb Author: Chris Wilson Date: Fri Jun 19 20:10:53 2020 +0100 drm/i915/gt: Show the culmative runtime as part of the engine info Since we always enable the busy-stats, the culmulative runtime should be accurate, and might be useful for diagnosing issues with the engine. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200619191053.9654-1-chris@chris-wilson.co.uk commit 781885fdf09f55ff14172749258f7380f859f2ba Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:22 2020 +0200 docs: sh: convert register-banks.txt to ReST - Add a SPDX header; - Adjust document title to follow ReST style; - Add blank lines to make ReST markup happy - Add it to sh/index.rst. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/adf117cf1edd7f43cb839ff2800f4315dfbcce13.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 7539b417626e5d5db132859678284e690771c499 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:21 2020 +0200 docs: sh: convert new-machine.txt to ReST - Add a SPDX header; - Adjust document title to follow ReST style; - Mark literal blocks as such; - Mark a table as such; - Add it to sh/index.rst. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4437d379ccf201cc3a369232f9159a02754ca530.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 599448d8ca9d8d219a2b47d109ee86afb7468490 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:20 2020 +0200 docs: powerpc: convert vcpudispatch_stats.txt to ReST - Add a SPDX header; - Use standard markup for document title; - Adjust identation on lists and add blank lines where needed; - Add it to the powerpc index.rst file. Acked-by: Michael Ellerman # powerpc Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/a88855cc8b3a97b9b918a33e78e9ad000cf64be1.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 86de78d2c5f45481945232c7d4a051aedb1f73a0 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:19 2020 +0200 docs: arm64: convert perf.txt to ReST format This file is almost in ReST. All it needs is a rename and adding a :field: for the two fields at the beginning (author and date). While here, add a proper SPDX header, and use the standard markup for document titles, just for consistency. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/c99bebf166559e9098a9eb78fb2eab2847fffb05.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 7910b136cbb14636986f954a6dbbfb92b39da844 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:18 2020 +0200 docs: pci: endpoint/function/binding/pci-test.txt convert to ReST Convert this file to ReST by adding a proper title to it and use the right markups for a table. While here, add a SPDX header. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6254963b85417e44865dab05e4b99cd485074132.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 9f70e48e1f08e640e276b3818d0b1f971d23fef7 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:17 2020 +0200 docs: misc-devices/apds990x.txt: convert to ReST format - Adjust title markup; - Adjust identation. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/444743782e5c8b8085d8016c8be3baabe4d23b53.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 0e7ade47bb6ecb9eaa8a86222b2257b97be49267 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:16 2020 +0200 docs: misc-devices/bh1770glc.txt: convert to ReST - Adjust document title markup; - use list markups; - Adjust identations to display properly at ReST output. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/58ba712524318d03b3196bba33cb409472b4807d.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 433b1b0d75c717d7a563b42423ce63c9a58a07b5 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:15 2020 +0200 docs: misc-devices/c2port.txt: convert to ReST format - Use copyright symbol; - use title markups; - adjust indentation; - mark literal blocks as such. Signed-off-by: Mauro Carvalho Chehab [jc: reverted |copy| change] Link: https://lore.kernel.org/r/b3b2f3f58a9a33f9e8526d4fa36bee305ea4da38.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 16a60665cfc046cf676f163bbb9ded3ff05a4376 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:14 2020 +0200 docs: misc-devices/pci-endpoint-test.txt: convert to ReST - Use titles markups; - Adjust identation; - use literal markup; - Use the proper notation for footnotes. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d4def59b3e3042208ed44558ddfd96c8753fb88c.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 8a05eb89cb84eba1091bdc6baa9d0e463655779f Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:13 2020 +0200 docs: misc-devices/pci-endpoint-test.txt: convert to ReST - use title markups; - mark literal blocks. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1b1f4e5e57fd2065828cecc9d07afbd247349e94.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 3471b9f7e43d3505fcffc63d0271f13dd9246873 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:12 2020 +0200 docs: misc-devices/spear-pcie-gadget.txt: convert to ReST - Use title/chapter markups; - Use table markups; - Mark literal blocks as such; - Adjust indentation. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4f8e129a93d04426ad7dd51f109725c48158a46d.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 740369c5794b07d1645704cc98731ef22754ef80 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:11 2020 +0200 docs: crypto: descore-readme.txt: convert to ReST format Convert this readme file to ReST file format, preserving its contents as-is as much as possible. The only changes are: - Added chapter and title markups; - Added blank lines where needed; - Added list markups where needed; - Use a table markup; - replace markups like `foo' to ``foo``; - add one extra literal markup to avoid warnings. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/1426be1c7758c0224418352665040220b8a31799.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit ddc92399cc656d4fafc80a92743f8b4473ec9b3f Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:10 2020 +0200 docs: crypto: convert async-tx-api.txt to ReST format - Place the txt index inside a comment; - Use title and chapter markups; - Adjust markups for numbered list; - Mark literal blocks as such; - Use tables markup. - Adjust indentation when needed. Acked-By: Vinod Koul # dmaengine Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/98977242130efe86d1200f7a167299d4c1c205c5.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 5846551bb147d2ae4a47f36de3c4ea46892ba180 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:09 2020 +0200 docs: crypto: convert api-intro.txt to ReST format - Change title markups; - Mark literal blocks; - Use list markups at authors/credits; - Add blank lines when needed; - Remove trailing whitespaces. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/c71e2c73a787ec7814db09bec3c1359779785bfa.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 0efaaa86581c596f9426482c731f262d843807b6 Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:08 2020 +0200 docs: crypto: convert asymmetric-keys.txt to ReST This file is almost compatible with ReST. Just minor changes were needed: - Adjust document and titles markups; - Adjust numbered list markups; - Add a comments markup for the Contents section; - Add markups for literal blocks. Acked-by: Jarkko Sakkinen Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/c2275ea94e0507a01b020ab66dfa824d8b1c2545.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 0c12018e0129a59a4b27c580ab40a8a4f3c5d3db Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:50:07 2020 +0200 docs: thermal: convert cpu-idle-cooling.rst to ReST Despite being named with .rst extension, this file doesn't match the ReST standard. It actually causes a crash at Sphinx: Sphinx parallel build error: docutils.utils.SystemMessage: /devel/v4l/docs/Documentation/driver-api/thermal/cpu-idle-cooling.rst:69: (SEVERE/4) Unexpected section title. Add needed markups for it to be properly parsed. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/7640755514809a7b5fe2756f3702613865877dcb.1592203650.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 24cfbec99647d241c3c31a72d247ee81f9061b5b Author: Manasi Navare Date: Sat Jun 20 02:53:54 2020 +0530 drm/dp: DRM DP helper for reading Ignore MSA from DPCD DP sink device sets the Ignore MSA bit in its DP_DOWNSTREAM_PORT_COUNT register to indicate its ability to ignore the MSA video timing parameters and its ability to support seamless video timing change over a range of timing exposed by DisplayID and EDID. This is required for the sink to indicate that it is Adaptive sync capable. v3: * Fi the typo in commit message (Manasi) v2: * Rename to describe what the function does (Jani Nikula) Cc: Jani Nikula Cc: Ville Syrjälä Cc: Harry Wentland Cc: Nicholas Kazlauskas Signed-off-by: Manasi Navare Reviewed-by: Harry Wentland Link: https://patchwork.freedesktop.org/patch/msgid/20200619212356.19285-2-bhanuprakash.modem@intel.com commit d5ddc6d98d48216ea7d829c06e8a8d7509f1765a Author: Mauro Carvalho Chehab Date: Wed Jun 3 00:38:14 2020 +0200 docs: fs: proc.rst: fix a warning due to a merge conflict Changeset 424037b77519 ("mm: smaps: Report arm64 guarded pages in smaps") added a new parameter to a table. This causes Sphinx warnings, because there's now an extra "-" at the wrong place: /devel/v4l/docs/Documentation/filesystems/proc.rst:548: WARNING: Malformed table. Text in column margin in table line 29. == ======================================= rd readable ... bt - arm64 BTI guarded page == ======================================= Fixes: 424037b77519 ("mm: smaps: Report arm64 guarded pages in smaps") Fixes: c33e97efa9d9 ("docs: filesystems: convert proc.txt to ReST") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/28c4f4c5c66c0fd7cbce83fe11963ea6154f1d47.1591137229.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 4b61d3e8d3daebbde7ec02d593f84248fdf8bec2 Author: Po Liu Date: Fri Jun 19 14:01:07 2020 +0800 net: qos offload add flow status with dropped count This patch adds a drop frames counter to tc flower offloading. Reporting h/w dropped frames is necessary for some actions. Some actions like police action and the coming introduced stream gate action would produce dropped frames which is necessary for user. Status update shows how many filtered packets increasing and how many dropped in those packets. v2: Changes - Update commit comments suggest by Jiri Pirko. Signed-off-by: Po Liu Reviewed-by: Simon Horman Reviewed-by: Vlad Buslov Signed-off-by: David S. Miller commit 2253bd848017098b7729e159cb533e43e87cc154 Author: Sumit Garg Date: Thu Jun 4 12:29:39 2020 +0530 Documentation: tee: Document TEE kernel interface Update documentation with TEE bus infrastructure which provides an interface for kernel client drivers to communicate with corresponding Trusted Application. Signed-off-by: Sumit Garg Reviewed-by: Maxim Uvarov Link: https://lore.kernel.org/r/1591253979-29067-1-git-send-email-sumit.garg@linaro.org Signed-off-by: Jonathan Corbet commit cf37fc4a0ce121fa9acb5ac390787ebc6a6959e9 Author: Alexander A. Klimov Date: Mon Jun 8 20:16:49 2020 +0200 Replace HTTP links with HTTPS ones: Documentation/translations/zh_CN Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20200608181649.74883-1-grandmaster@al2klimov.de Signed-off-by: Jonathan Corbet commit 68e4cd17e218971a2fd60c30fe14078dc0d8a68e Author: Gustavo A. R. Silva Date: Mon Jun 8 16:37:11 2020 -0500 docs: deprecated.rst: Add zero-length and one-element arrays Add zero-length and one-element arrays to the list. While I continue replacing zero-length and one-element arrays with flexible-array members, I need a reference to point people to, so they don't introduce more instances of such arrays. And while here, add a note to the "open-coded arithmetic in allocator arguments" section, on the use of struct_size() and the arrays-to-deprecate mentioned here. Co-developed-by: Kees Cook Signed-off-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Acked-by: Kees Cook Link: https://lore.kernel.org/r/20200608213711.GA22271@embeddedor Signed-off-by: Jonathan Corbet commit 67ee6940ae24163571a859634e100abad728aa38 Author: Chen Zhou Date: Wed Jun 10 10:53:33 2020 +0800 docs/zh_CN: update sysfs.txt about show() usage Update the show() usage according to the English version. Signed-off-by: Chen Zhou Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20200610025333.84010-1-chenzhou10@huawei.com Signed-off-by: Jonathan Corbet commit d8923e96410ce811fc2e772631633841f912d371 Author: Federico Vaga Date: Sun Jun 14 22:10:53 2020 +0200 doc:it_IT: add symbol-namespace translation - add complete translation of symbol-namespaces.rst - fix references to this page within the italian translation - add document to main indexes Signed-off-by: Federico Vaga Link: https://lore.kernel.org/r/20200614201053.59502-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet commit 00674c4f10e9dcde9a89c8ebf972abe86f1ef9de Author: Souptick Joarder Date: Thu Jun 18 00:57:03 2020 +0530 docs: mm/gup: Minor documentation update Now there are 5 cases. Updated the same. Signed-off-by: Souptick Joarder Reviewed-by: John Hubbard Link: https://lore.kernel.org/r/1592422023-7401-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Jonathan Corbet commit e996919b7292d8aa1ff16d90b1e0684e7627fc53 Author: Randy Dunlap Date: Sun Jun 14 21:11:00 2020 -0700 Documentation: fix sysctl/kernel.rst heading format warnings Fix heading format warnings in admin-guide/sysctl/kernel.rst: Documentation/admin-guide/sysctl/kernel.rst:339: WARNING: Title underline too short. hung_task_all_cpu_backtrace: ================ Documentation/admin-guide/sysctl/kernel.rst:650: WARNING: Title underline too short. oops_all_cpu_backtrace: ================ Fixes: 0ec9dc9bcba0 ("kernel/hung_task.c: introduce sysctl to print all traces when a hung task is detected") Fixes: 60c958d8df9c ("panic: add sysctl to dump all CPUs backtraces on oops event") Signed-off-by: Randy Dunlap Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/8af1cb77-4b5a-64b9-da5d-f6a95e537f99@infradead.org Signed-off-by: Jonathan Corbet commit 6cbef2adb730f5adb4c44fe6da8f20653fed9317 Author: Randy Dunlap Date: Sun Jun 14 20:22:19 2020 -0700 Documentation: fix filesystems/locking.rst malformed table warnings Fix Sphinx malformed table warnings in filesystems/locking.rst: lnx-58-rc1/Documentation/filesystems/locking.rst:443: WARNING: Malformed table. Text in column margin in table line 8. lnx-58-rc1/Documentation/filesystems/locking.rst:620: WARNING: Malformed table. Text in column margin in table line 2. Fixes: ec23eb54fbc7 ("docs: fs: convert docs without extension to ReST") Fixes: c1e8d7c6a7a6 ("mmap locking API: convert mmap_sem comments") Signed-off-by: Randy Dunlap Acked-by: Michel Lespinasse Link: https://lore.kernel.org/r/12c2afd1-2dcf-2ea0-02aa-bc2759729c77@infradead.org Signed-off-by: Jonathan Corbet commit 723452918eb55f3cc47079e990ef449f79a1736e Author: Randy Dunlap Date: Sun Jun 14 19:59:07 2020 -0700 Documentation: remove SH-5 index entries Remove SH-5 documentation index entries following the removal of SH-5 source code. Error: Cannot open file ../arch/sh/mm/tlb-sh5.c Error: Cannot open file ../arch/sh/mm/tlb-sh5.c Error: Cannot open file ../arch/sh/include/asm/tlb_64.h Error: Cannot open file ../arch/sh/include/asm/tlb_64.h Signed-off-by: Randy Dunlap Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/71e1f336-ef5c-f5e9-25cf-16bd4439b9f9@infradead.org Signed-off-by: Jonathan Corbet commit 10857a01ab8118ca0f4a6cb1cb7144e08b84e92b Author: Heinrich Schuchardt Date: Mon Jun 15 22:36:45 2020 +0200 doc: x86/speculation: length of underlines The lengths of underlines must match the titles to avoid build warnings. Signed-off-by: Heinrich Schuchardt Reviewed-by: Mark Gross Link: https://lore.kernel.org/r/20200615203645.11545-1-xypron.glpk@gmx.de Signed-off-by: Jonathan Corbet commit c03f739fd023ecfe4615988f4f70b016df4b6d4e Author: Heinrich Schuchardt Date: Tue Jun 16 12:40:12 2020 +0200 doc: add novamap to efi kernel command line parameters Document the efi=novamap kernel command line parameter. Put the efi parameters into alphabetic order. Signed-off-by: Heinrich Schuchardt Link: https://lore.kernel.org/r/20200616104012.4780-1-xypron.glpk@gmx.de Signed-off-by: Jonathan Corbet commit 7ca8e63c8ed352e7ed10e9cc4d229823dded6fa2 Author: Alexander Lobakin Date: Fri Jun 19 09:51:14 2020 +0000 mailmap: add entries for Alexander Lobakin My D-Link and Yandex addresses don't exist anymore, map them to my private box. Signed-off-by: Alexander Lobakin Link: https://lore.kernel.org/r/5YUtoWlS7NX1N6TxI4ddZ9V-Yx8Bn8wzrEVJqfkTuwEzZjAsJg157goV81xPAU76k84Nis2uBwdHWk4JmYHbvGmd_JcBTk-rZDVpFNPNolU=@pm.me Signed-off-by: Jonathan Corbet commit 5a15550e56cc57bb5b953b0f6629c6805f4724fe Author: Chris Wilson Date: Fri Jun 19 16:19:38 2020 +0100 drm/i915/gt: Initialise rps timestamp Smatch warns that we may iterate over an empty array of gt->engines[]. One hopes that this is impossible, but nevertheless we can simply appease smatch by initialising the timestamp to zero before we starting probing the busy-time from the engines. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200619151938.21740-1-chris@chris-wilson.co.uk commit 5d809cb28056221e1b13459f7a2ddfa28305b74f Author: Jonathan Bakker Date: Sat May 16 15:35:44 2020 -0700 power: supply: max8998_charger: Correct ONLINE and add STATUS props The ONLINE prop should be when the charger is present (ie able to charge), however, it was for when it was actually charging or not. Instead, add the STATUS prop to show whether charging is actually going on or not. The magic numbers have been ported from a downstream kernel for the SGH-T959V. Signed-off-by: Jonathan Bakker Signed-off-by: Sebastian Reichel commit eacb0c101a0bdf14de77cc9d107493e2d8d6389c Author: Tom Rini Date: Fri Jun 19 10:30:56 2020 -0400 initrd: Remove erroneous comment Most architectures have been passing the location of an initrd via the initrd= option since their inception. Remove the comment as it's both wrong and unrelated to the commit that introduced it. For a bit more context, I assume there's been some confusion between "initrd" being a keyword in things like extlinux.conf and also that for quite a long time now initrd information is passed via device tree and not the command line on relevant architectures. But it's still true that it's been a valid command line option to the kernel since the 90s. It's just the case that in 2018 the code was consolidated from under arch/ and in to this file. [ bp: Move the context clarification up into the commit message proper. ] Fixes: 694cfd87b0c8 ("x86/setup: Add an initrdmem= option to specify initrd physical address") Signed-off-by: Tom Rini Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200619143056.24538-1-trini@konsulko.com commit 410457b99c7ea3e0cf8de1054e175ba3c2213d33 Author: Prashant Malani Date: Thu May 28 04:36:10 2020 -0700 platform/chrome: cros_ec_typec: Support DP alt mode Handle Chrome EC mux events to configure on-board muxes correctly while entering DP alternate mode. Since we don't surface SVID and VDO information regarding the DP alternate mode, configure the Type C muxes directly from the port driver. Later, when mode discovery information is correctly surfaced to the driver, we can register the DP alternate mode driver and let it handle the mux configuration. Also, modify the struct_typec_state state management to account for the addition of DP alternate mode. Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Signed-off-by: Enric Balletbo i Serra commit 7e7def15fa4bc9d6a2fa3d1d379286591c249381 Author: Prashant Malani Date: Thu May 28 04:36:07 2020 -0700 platform/chrome: cros_ec_typec: Add USB mux control Add support to configure various Type C switches appropriately using the Type C connector class API, when the Chrome OS EC informs the AP that the USB operating mode has been entered. Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Signed-off-by: Enric Balletbo i Serra commit 2ee97377a0d459fb3c484e49fb471ac6add06441 Author: Prashant Malani Date: Thu May 28 04:36:05 2020 -0700 platform/chrome: cros_ec_typec: Register PD CTRL cmd v2 Recognize EC_CMD_USB_PD_CONTROL command version 2. This is necessary in order to process Type C mux information (like DP alt mode pin configuration), which is needed by the Type C Connector class API to configure the Type C muxes correctly While we are here, rename the struct member storing this version number from cmd_ver to pd_ctrl_ver, which more accurately reflects what is being stored. Also, slightly change the logic for calling cros_typec_set_port_params_*(). Now, v0 is called when pd_ctrl_ver is 0, and v1 is called otherwise. Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Signed-off-by: Enric Balletbo i Serra commit e32b16c31339e37d3cdc814f2773b74c1dbf660c Author: Prashant Malani Date: Thu May 28 04:36:03 2020 -0700 platform/chrome: cros_ec: Update mux state bits Sync the EC_CMD_USB_PD_MUX_INFO mux state bit fields with the Chrome EC code base. The newly added bit fields will be used for cros-ec-typec mux control. Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra commit f28adb41dab4a2795fd959750df57adffd2bb0be Author: Prashant Malani Date: Tue May 19 14:46:04 2020 -0700 platform/chrome: cros_ec_typec: Register Type C switches Register Type C mux and switch handles, when provided via firmware bindings. These will allow the cros-ec-typec driver, and also alternate mode drivers to configure connected Muxes correctly, according to PD information retrieved from the Chrome OS EC. Signed-off-by: Prashant Malani Reviewed-by: Heikki Krogerus Signed-off-by: Enric Balletbo i Serra commit d378cdd0113878e3860f954d16dd3e91defb1492 Author: Gwendal Grignou Date: Tue May 26 11:53:28 2020 -0700 platform/chrome: cros_ec_debugfs: Control uptime information request When EC does not support uptime command (EC_CMD_GET_UPTIME_INFO), do not create the uptime sysfs entry point. User space application will not probe the file needlessly. The EC console log will not contain EC_CMD_GET_UPTIME_INFO anymore. Signed-off-by: Gwendal Grignou Signed-off-by: Enric Balletbo i Serra commit 1a37a039711610dd53ec03d8cab9e81875338225 Author: Dinghao Liu Date: Mon May 25 19:05:40 2020 +0800 power: supply: bq24190_charger: Fix runtime PM imbalance on error pm_runtime_get_sync() increments the runtime PM usage counter even it returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu Reviewed-by: Rafael J. Wysocki Signed-off-by: Sebastian Reichel commit 7222bd603dd2fe607794acd0c53025da1dbde21f Author: Sebastian Reichel Date: Sat Jun 6 01:06:25 2020 +0200 power: supply: sbs-battery: add PEC support SBS batteries optionally have support for PEC. This enables PEC handling based on the implemented SBS version as suggested by the standard. The support for PEC is re-evaluated when the battery is hotplugged into the system, since there might be systems supporting batteries from different SBS generations. Tested-by: Marek Szyprowski Signed-off-by: Sebastian Reichel commit 05e0430971543e6aeb328df1226dc52930171445 Author: Sebastian Reichel Date: Sat Jun 6 01:06:24 2020 +0200 power: supply: sbs-battery: use i2c_smbus_read_block_data() The SBS battery implements SMBus block reads. Currently the driver "emulates" this by doing an I2C byte read for the length followed by an I2C block read. The I2C subsystem actually provides a proper API for doing SMBus block reads, which can and should be used instead. The current implementation does not properly handle packet error checking (PEC). Not all upstream systems using sbs-battery have I2C bus drivers supporting I2C_M_RECV_LEN, so old implementation is kept as fallback to keep things working. But this prints a warning, which hopefully results in people implementing support for it. Tested-by: Marek Szyprowski Signed-off-by: Sebastian Reichel commit 1d85f6d1b0c11f15ec2b1a9719da8118f3f94e64 Author: Sebastian Reichel Date: Sat Jun 6 00:43:59 2020 +0200 power: supply: gpio-charger: Make gpios optional While strongly recommended, not all devices have a gpio to detect if the charger is connected. This moves the 'gpios' from required to optional section. This also modifies error handling for the GPIO a bit: We no longer fallback to pdata, if a GPIO is specified using GPIO descriptor tables. This is a bit cleaner and does not have any real impact: There are only two mainline pdata users (arm/mach-sa1100/collie.c, arm/mach-pxa/tosa.c) and none of them specify the GPIO via gpiod descriptor tables. Once both have been converted the driver's support for specifying GPIOs numbers in pdata will be dropped. Reviewed-by: Linus Walleij Acked-by: Rob Herring Signed-off-by: Sebastian Reichel commit dad980f13243281b8231a1a3365ce380f312f825 Author: Sebastian Reichel Date: Sat Jun 6 00:43:58 2020 +0200 dt-bindings: power: supply: gpio-charger: convert to yaml Convert the gpio-charger bindings from text format to new YAML based representation. Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Sebastian Reichel commit 0d574c6b59c6ac0ae5b581a2ffb813d446a50a3d Author: Stephen Boyd Date: Thu Jun 18 16:39:58 2020 -0700 spi: spi-geni-qcom: Simplify setup_fifo_xfer() The definition of SPI_FULL_DUPLEX (3) is really SPI_TX_ONLY (1) ORed with SPI_RX_ONLY (2). Let's drop the define and simplify the code here a bit by collapsing the setting of 'm_cmd' into conditions that are the same. This is a non-functional change, just cleanup to consolidate code. Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Cc: Douglas Anderson Link: https://lore.kernel.org/r/20200618233959.160032-1-swboyd@chromium.org Signed-off-by: Mark Brown commit 8a99e501345489ae30b16a5e519e111220d39a06 Author: Andrea Parri (Microsoft) Date: Wed Jun 17 18:46:40 2020 +0200 Drivers: hv: vmbus: Remove unnecessary channel->lock critical sections (sc_list updaters) None of the readers/updaters of sc_list rely on channel->lock for synchronization. Signed-off-by: Andrea Parri (Microsoft) Link: https://lore.kernel.org/r/20200617164642.37393-7-parri.andrea@gmail.com Reviewed-by: Michael Kelley Signed-off-by: Wei Liu commit 3eb0ac869c66d73a034004b97b3a4abe1c5cb998 Author: Andrea Parri (Microsoft) Date: Wed Jun 17 18:46:39 2020 +0200 Drivers: hv: vmbus: Use channel_mutex in channel_vp_mapping_show() The primitive currently uses channel->lock to protect the loop over sc_list w.r.t. list additions/deletions but it doesn't protect the target_cpu(s) loads w.r.t. a concurrent target_cpu_store(): while the data races on target_cpu are hardly of any concern here, replace the channel->lock critical section with a channel_mutex critical section and extend the latter to include the loads of target_cpu; this same pattern is also used in hv_synic_cleanup(). Signed-off-by: Andrea Parri (Microsoft) Link: https://lore.kernel.org/r/20200617164642.37393-6-parri.andrea@gmail.com Reviewed-by: Michael Kelley Signed-off-by: Wei Liu commit 12d0dd8e728e785e6fb81f5232280678bc69d8dc Author: Andrea Parri (Microsoft) Date: Wed Jun 17 18:46:38 2020 +0200 Drivers: hv: vmbus: Remove unnecessary channel->lock critical sections (sc_list readers) Additions/deletions to/from sc_list (as well as modifications of target_cpu(s)) are protected by channel_mutex, which hv_synic_cleanup() and vmbus_bus_suspend() own for the duration of the channel->lock critical section in question. Signed-off-by: Andrea Parri (Microsoft) Link: https://lore.kernel.org/r/20200617164642.37393-5-parri.andrea@gmail.com Reviewed-by: Michael Kelley Signed-off-by: Wei Liu commit 0a96820929f01ecf4cb1c33afe7044c301a06c2c Author: Andrea Parri (Microsoft) Date: Wed Jun 17 18:46:37 2020 +0200 Drivers: hv: vmbus: Replace cpumask_test_cpu(, cpu_online_mask) with cpu_online() A slight improvement in readability, and this does also remove one memory access when NR_CPUS == 1! ;-) Signed-off-by: Andrea Parri (Microsoft) Link: https://lore.kernel.org/r/20200617164642.37393-4-parri.andrea@gmail.com Reviewed-by: Michael Kelley Signed-off-by: Wei Liu commit 458d090fbad59d1f849ee15e78d0471784d428b6 Author: Andrea Parri (Microsoft) Date: Wed Jun 17 18:46:36 2020 +0200 Drivers: hv: vmbus: Remove the numa_node field from the vmbus_channel struct The field is read only in numa_node_show() and it is already stored twice (after a call to cpu_to_node()) in target_cpu_store() and init_vp_index(); there is no need to "cache" its value in the channel data structure. Signed-off-by: Andrea Parri (Microsoft) Link: https://lore.kernel.org/r/20200617164642.37393-3-parri.andrea@gmail.com Reviewed-by: Michael Kelley Signed-off-by: Wei Liu commit 5bf74682118b3003c8f9b0b0ec596e473fc6eb82 Author: Andrea Parri (Microsoft) Date: Wed Jun 17 18:46:35 2020 +0200 Drivers: hv: vmbus: Remove the target_vp field from the vmbus_channel struct The field is read only in __vmbus_open() and it is already stored twice (after a call to hv_cpu_number_to_vp_number()) in target_cpu_store() and init_vp_index(); there is no need to "cache" its value in the channel data structure. Suggested-by: Michael Kelley Signed-off-by: Andrea Parri (Microsoft) Link: https://lore.kernel.org/r/20200617164642.37393-2-parri.andrea@gmail.com Reviewed-by: Michael Kelley Signed-off-by: Wei Liu commit 2f1efa5340eff9af36c9a7347bb97abd726128a0 Author: Dmitry Shmidt Date: Wed Jun 10 10:30:12 2020 +0200 clk: meson: g12a: Add support for NNA CLK source clocks This adds the Neural Network Accelerator source clocks hierarchy, it's 2 simple composite clocks to feed the AXI interface and the Core of the Neural Network Accelerator IP. This IP is only present on the Amlogic SM1 SoCs family. Signed-off-by: Dmitry Shmidt Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200610083012.5024-3-narmstrong@baylibre.com commit df06230106e95347ec613f1707a704b04737c59b Author: Dmitry Shmidt Date: Wed Jun 10 10:30:11 2020 +0200 dt-bindings: clk: g12a-clkc: Add NNA CLK Source clock IDs This adds the Neural Network Accelerator IP source clocks. Signed-off-by: Dmitry Shmidt Signed-off-by: Neil Armstrong Signed-off-by: Jerome Brunet Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200610083012.5024-2-narmstrong@baylibre.com commit 596f4785f498baf28be2d5dec067695d85457b09 Author: Keyur Patel Date: Tue Jun 9 18:50:35 2020 -0400 power: supply: axp20x_usb_power: fix spelling mistake Fix typo: "triger" --> "trigger" Signed-off-by: Keyur Patel Acked-by: Chen-Yu Tsai Signed-off-by: Sebastian Reichel commit 224941c9424fd840bd54d2df8dbe84d1e4aa35af Author: Wang Qing Date: Fri Jun 12 14:55:54 2020 +0800 power: supply: use kobj_to_dev Use kobj_to_dev() API instead of open-coded container_of(). Signed-off-by: Wang Qing Signed-off-by: Sebastian Reichel commit 0768e6e4934e239f1a7f8ba83150a7c46765bb3e Author: Krzysztof Kozlowski Date: Wed Jun 17 12:23:05 2020 +0200 dt-bindings: power: supply: bq25890: Document required interrupt The driver requires interrupts (fails probe if it is not provided) so document this requirement in bindings. Fixes: 4aeae9cb0dad ("power_supply: Add support for TI BQ25890 charger chip") Cc: Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 307b0d631d133318b9af9a43ea748e46a1a3b1ed Author: Krzysztof Kozlowski Date: Wed Jun 17 12:23:04 2020 +0200 dt-bindings: power: supply: bq25890: Indent example with tabs Fix example indentation to tabs to follow generic Linux coding style. This avoids copying the space indentation to DTS when re-using the example. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit d194a22f504ff366dc2910736c4449dcee57c202 Merge: a3944c88a744f 31fb632b5d43c Author: Mark Brown Date: Fri Jun 19 14:26:55 2020 +0100 Merge series "mtd: spi-nor: Move cadence-qaudspi to spi-mem framework" from Vignesh Raghavendra : This series is a subset of "[PATCH v12 0/4] spi: cadence-quadspi: Add support for the Cadence QSPI controller" by Ramuthevar,Vadivel MuruganX that intended to move cadence-quadspi driver to spi-mem framework Those patches were trying to accomplish too many things in a single set of patches and need to split into smaller patches. This is reduced version of above series. Changes that are intended to make migration easy are split into separate patches. Patches 1 to 3 drop features that cannot be supported under spi-mem at the moment (backward compatibility is maintained). Patch 4-5 are trivial cleanups. Patch 6 does the actual conversion to spi-mem and patch 7 moves the driver to drivers/spi folder. I have tested both INDAC mode (used by non TI platforms like Altera SoCFPGA) and DAC mode (used by TI platforms) on TI EVMs. Patches to move move bindings over to "Documentation/devicetree/bindings/spi/" directory and also conversion of bindig doc to YAML will be posted separately. Support for Intel platform would follow that. Resend v3: Rebased onto v5.7-c1 v3: Split handling of probe deferral into separate patch (out of 5/6) Split dropping of redundant WREN to separate patch (out of 5/6) Fix a possible memleak due to lack of spi_master_put() Parse all SPI slave nodes in cqspi_setup_flash() Address misc comments from Tudor on v2 Rebase onto latest spi-nor/next v2: Rework patch 1/6 to keep "cdns,is-decoded-cs" property supported. Ramuthevar Vadivel Murugan (2): mtd: spi-nor: Convert cadence-quadspi to use spi-mem framework spi: Move cadence-quadspi driver to drivers/spi/ Vignesh Raghavendra (6): mtd: spi-nor: cadence-quadspi: Make driver independent of flash geometry mtd: spi-nor: cadence-quadspi: Provide a way to disable DAC mode mtd: spi-nor: cadence-quadspi: Don't initialize rx_dma_complete on failure mtd: spi-nor: cadence-quadspi: Fix error path on failure to acquire reset lines mtd: spi-nor: cadence-quadspi: Handle probe deferral while requesting DMA channel mtd: spi-nor: cadence-quadspi: Drop redundant WREN in erase path drivers/mtd/spi-nor/controllers/Kconfig | 11 - drivers/mtd/spi-nor/controllers/Makefile | 1 - drivers/spi/Kconfig | 11 + drivers/spi/Makefile | 1 + .../spi-cadence-quadspi.c} | 541 +++++++----------- 5 files changed, 222 insertions(+), 343 deletions(-) rename drivers/{mtd/spi-nor/controllers/cadence-quadspi.c => spi/spi-cadence-quadspi.c} (74%) base-commit: b3a9e3b9622ae10064826dccb4f7a52bd88c7407 -- 2.26.2 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ commit 31fb632b5d43ca16713095b3a4fe17e3d7331e28 Author: Ramuthevar Vadivel Murugan Date: Mon Jun 1 12:34:44 2020 +0530 spi: Move cadence-quadspi driver to drivers/spi/ Now that cadence-quadspi has been converted to use spi-mem framework, move it under drivers/spi/ Update license header to match SPI subsystem style Signed-off-by: Ramuthevar Vadivel Murugan Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Acked-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200601070444.16923-9-vigneshr@ti.com Signed-off-by: Mark Brown commit a314f6367787ee1d767df9a2120f17e4511144d0 Author: Ramuthevar Vadivel Murugan Date: Mon Jun 1 12:34:43 2020 +0530 mtd: spi-nor: Convert cadence-quadspi to use spi-mem framework Move cadence-quadspi driver to use spi-mem framework. This is required to make the driver support for SPI NAND flashes in future. Driver is feature compliant with existing SPI NOR version. Signed-off-by: Ramuthevar Vadivel Murugan Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Acked-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200601070444.16923-8-vigneshr@ti.com Signed-off-by: Mark Brown commit 41b5ed6e677ca73cb031b7657eefb5cf27071be3 Author: Vignesh Raghavendra Date: Mon Jun 1 12:34:42 2020 +0530 mtd: spi-nor: cadence-quadspi: Drop redundant WREN in erase path Drop redundant WREN command in cqspi_erase() as SPI NOR core takes care of sending WREN command before sending erase command. Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Acked-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200601070444.16923-7-vigneshr@ti.com Signed-off-by: Mark Brown commit 935da5e5100f57d843cac4781b21f1c235059aa0 Author: Vignesh Raghavendra Date: Mon Jun 1 12:34:41 2020 +0530 mtd: spi-nor: cadence-quadspi: Handle probe deferral while requesting DMA channel dma_request_chan_by_mask() can throw EPROBE_DEFER if DMA provider is not yet probed. Currently driver just falls back to using PIO mode (which is less efficient) in this case. Instead return probe deferral error as is so that driver will be re probed once DMA provider is available. Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Acked-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200601070444.16923-6-vigneshr@ti.com Signed-off-by: Mark Brown commit c61088d1f9932940af780b674f028140eda09a94 Author: Vignesh Raghavendra Date: Mon Jun 1 12:34:40 2020 +0530 mtd: spi-nor: cadence-quadspi: Fix error path on failure to acquire reset lines Make sure to undo the prior changes done by the driver when exiting due to failure to acquire reset lines. Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Acked-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200601070444.16923-5-vigneshr@ti.com Signed-off-by: Mark Brown commit 48aae57f0f9f57797772bd462b4d64902b1b4ae1 Author: Vignesh Raghavendra Date: Mon Jun 1 12:34:39 2020 +0530 mtd: spi-nor: cadence-quadspi: Don't initialize rx_dma_complete on failure If driver fails to acquire DMA channel then don't initialize rx_dma_complete struct as it won't be used. Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Acked-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200601070444.16923-4-vigneshr@ti.com Signed-off-by: Mark Brown commit a99705079a91e6373122bd0ca2fc129b688fc5b3 Author: Vignesh Raghavendra Date: Mon Jun 1 12:34:38 2020 +0530 mtd: spi-nor: cadence-quadspi: Provide a way to disable DAC mode Currently direct access mode is used on platforms that have AHB window (memory mapped window) larger than flash size. This feature is limited to TI platforms as non TI platforms have < 1MB of AHB window. Therefore introduce a driver quirk to disable DAC mode and set it for non TI compatibles. This is in preparation to move to spi-mem framework where flash geometry cannot be known. Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Acked-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200601070444.16923-3-vigneshr@ti.com Signed-off-by: Mark Brown commit 834b4e8d344139ba64cda22099b2b2ef6c9a542d Author: Vignesh Raghavendra Date: Mon Jun 1 12:34:37 2020 +0530 mtd: spi-nor: cadence-quadspi: Make driver independent of flash geometry Drop configuration of Flash size, erase size and page size configuration. Flash size is needed only if using AHB decoder (BIT 23 of CONFIG_REG) which is not used by the driver. Erase size and page size are needed if IP is configured to send WREN automatically. But since SPI NOR layer takes care of sending WREN, there is no need to configure these fields either. Therefore drop these in preparation to move the driver to spi-mem framework where flash geometry is not visible to controller driver. Signed-off-by: Vignesh Raghavendra Reviewed-by: Tudor Ambarus Acked-by: Tudor Ambarus Link: https://lore.kernel.org/r/20200601070444.16923-2-vigneshr@ti.com Signed-off-by: Mark Brown commit a3944c88a744f5f45c06b13cc80b892966de72aa Merge: d5fcc710a1ddb d9dd0fb0e197a Author: Mark Brown Date: Fri Jun 19 13:43:10 2020 +0100 Merge series "add regmap & indirect access support" from Xu Yilun : Updated the regmap & indirect access support for spi-altera. Patch #1 is an 1:1 replacement of of readl/writel with regmap_read/write Patch #2 introduced a new platform_device_id to support indirect access as a sub device. Patch #3 is a minor fix. Main changes from v1: - Split the regmap supporting patch to 2 patches. - Add a new platform_device_id to support indirect access. - Removed the v1 patch "move driver name string to header file". Now we use driver name string directly. - Add Yilun's Signed-off-by for Patch #3. - Add Tom's Reviewed-by. Matthew Gerlach (1): spi: altera: fix size mismatch on 64 bit processors Xu Yilun (2): spi: altera: use regmap-mmio instead of direct mmio register access spi: altera: support indirect access to the registers drivers/spi/Kconfig | 1 + drivers/spi/spi-altera.c | 127 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 107 insertions(+), 21 deletions(-) -- 2.7.4 commit d5fcc710a1ddb2fc56784ce302182b9be8971ccd Merge: 0ec544ceb1c1f 7ba9bdcb91f69 Author: Mark Brown Date: Fri Jun 19 13:43:09 2020 +0100 Merge series "spi: spi-geni-qcom: Fixes / perf improvements" from Douglas Anderson : This patch series is a new version of the previous patch posted: [PATCH v2] spi: spi-geni-qcom: Speculative fix of "nobody cared" about interrupt https://lore.kernel.org/r/20200317133653.v2.1.I752ebdcfd5e8bf0de06d66e767b8974932b3620e@changeid At this point I've done enough tracing to know that there was a real race in the old code (not just weakly ordered memory problems) and that should be fixed with the locking patches. While looking at this driver, I also noticed we weren't properly noting error interrupts and also weren't actually using our FIFO effectively, so I fixed those. The last patch in the series addresses review feedback about dislike for the "cur_mcmd" state variable. It also could possibly make "abort" work ever-so-slightly more reliably. Changes in v4: - Drop 'controller' in comment. - Use Stephen's diagram to explain the race better. Changes in v3: - ("spi: spi-geni-qcom: No need for irqsave variant...") new for v3 - Split out some lock cleanup to previous patch. - Don't need to read IRQ status register inside spinlock. - Don't check for state CMD_NONE; later patch is removing state var. - Don't hold the lock for all of setup_fifo_xfer(). - Comment about why it's safe to Ack interrupts at the end. - Subject/desc changed since race is definitely there. - ("spi: spi-geni-qcom: Check for error IRQs") new in v3. - ("spi: spi-geni-qcom: Actually use our FIFO") new in v3. - ("spi: spi-geni-qcom: Don't keep a local state variable") new in v3. Changes in v2: - Detect true spurious interrupt. - Still return IRQ_NONE for state machine mismatch, but print warn. Douglas Anderson (5): spi: spi-geni-qcom: No need for irqsave variant of spinlock calls spi: spi-geni-qcom: Mo' betta locking spi: spi-geni-qcom: Check for error IRQs spi: spi-geni-qcom: Actually use our FIFO spi: spi-geni-qcom: Don't keep a local state variable drivers/spi/spi-geni-qcom.c | 120 ++++++++++++++++++++++++------------ 1 file changed, 81 insertions(+), 39 deletions(-) -- 2.27.0.290.gba653c62da-goog commit 0ec544ceb1c1ff65fb5588c6d71bccff2713f0d9 Author: Andy Shevchenko Date: Thu Jun 18 20:01:44 2020 +0300 spi: npcm-fiu: Reuse BITS_PER_BYTE definition No need to redefine already existing definition. So, replace custom by generic one. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200618170144.57433-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 5f368ddea6fec519bdb93b5368f6a844b6ea27a6 Author: Colin Ian King Date: Thu Jun 18 11:04:00 2020 +0100 drm/arm: fix unintentional integer overflow on left shift Shifting the integer value 1 is evaluated using 32-bit arithmetic and then used in an expression that expects a long value leads to a potential integer overflow. Fix this by using the BIT macro to perform the shift to avoid the overflow. Addresses-Coverity: ("Unintentional integer overflow") Fixes: ad49f8602fe8 ("drm/arm: Add support for Mali Display Processors") Signed-off-by: Colin Ian King Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200618100400.11464-1-colin.king@canonical.com commit 79ce058032c391b12af928b1e30abf92482a270f Author: Ben Davis Date: Thu Apr 30 09:32:20 2020 +0100 drm: drm_fourcc: Add uncompressed AFBC modifier AFBC has a mode that guarantees use of AFBC with an uncompressed payloads, we add a new modifier to support this mode. V2: updated modifier comment Signed-off-by: Ben Davis Acked-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200430083220.17347-1-ben.davis@arm.com commit 94b292b277343190175d39172c903c0c5fb814f1 Author: Ben Davis Date: Mon Jun 1 17:28:17 2020 +0100 drm: drm_fourcc: add NV15, Q410, Q401 YUV formats DRM_FORMAT_NV15 is a 2 plane format suitable for linear and 16x16 block-linear memory layouts (DRM_FORMAT_MOD_SAMSUNG_16_16_TILE). The format is similar to P010 with 4:2:0 sub-sampling but has no padding between components. Instead, luminance and chrominance samples are grouped into 4s so that each group is packed into an integer number of bytes: YYYY = UVUV = 4 * 10 bits = 40 bits = 5 bytes The '15' suffix refers to the optimum effective bits per pixel which is achieved when the total number of luminance samples is a multiple of 8. Q410 and Q401 are both 3 plane non-subsampled formats with 16 bits per component, but only 10 bits are used and 6 are padded. 'Q' is chosen as the first letter to denote 3 plane YUV444, (and is the next letter along from P which is usually 2 plane). V2: Updated block_w of NV15 to {4, 2, 0} V3: Updated commit message to include specific modifier name NV15: Tested-by: Jonas Karlman Reviewed-by: Brian Starkey Signed-off-by: Ben Davis Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200601162817.18230-1-ben.davis@arm.com commit 7ba9bdcb91f694b0eaf486a825afd9c2d99532b7 Author: Douglas Anderson Date: Thu Jun 18 08:06:26 2020 -0700 spi: spi-geni-qcom: Don't keep a local state variable The variable "cur_mcmd" kept track of our current state (idle, xfer, cs, cancel). We don't really need it, so get rid of it. Instead: * Use separate condition variables for "chip select done", "cancel done", and "abort done". This is important so that if a "done" comes through (perhaps some previous interrupt finally came through) it can't confuse the cancel/abort function. * Use the "done" interrupt only for when a chip select or transfer is done and we can tell the difference by looking at whether "cur_xfer" is NULL. This is mostly a no-op change. However, it is possible it could fix an issue where a super delayed interrupt for a cancel command could have confused our waiting for an abort command. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200618080459.v4.5.Ib1e6855405fc9c99916ab7c7dee84d73a8bf3d68@changeid Signed-off-by: Mark Brown commit 902481a78ee4173926dc59f060526dee21aeb7a8 Author: Douglas Anderson Date: Thu Jun 18 08:06:25 2020 -0700 spi: spi-geni-qcom: Actually use our FIFO The geni hardware has a FIFO that can hold up to 64 bytes (it has 16 entries that can hold 4 bytes each), at least on the two SoCs I tested (sdm845 and sc7180). We configured our RX Watermark to 0, which basically meant we got an interrupt as soon as the first 4 bytes showed up in the FIFO. Tracing the IRQ handler showed that we often only read 4 or 8 bytes per IRQ handler. I tried setting the RX Watermark to "fifo size - 2" but that just got me a bunch of overrun errors reported. Setting it to "fifo size - 3" seemed to work great, though. This made me worried that we'd start getting overruns if we had long interrupt latency, but that doesn't appear to be the case and delays inserted in the IRQ handler while using "fifo size - 3" didn't cause any errors. Presumably there is some interaction with the poorly-documented RFR (ready for receive) level means that "fifo size - 3" is the max. We are the SPI master, so it makes sense that there would be no problems with overruns, the master should just stop clocking. Despite "fifo size - 3" working, I chose "fifo size / 2" (8 entries = 32 bytes) which gives us a little extra time to get to the interrupt handler and should reduce dead time on the SPI wires. With this setting, I often saw the IRQ handler handle 40 bytes but sometimes up to 56 if we had bad interrupt latency. Testing by running "flashrom -p ec -r" on a Chromebook saw interrupts from the SPI driver cut roughly in half. Time was roughly the same. Fixes: 561de45f72bd ("spi: spi-geni-qcom: Add SPI driver support for GENI based QUP") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200618080459.v4.4.I988281f7c6ee0ed00325559bfce7539f403da69e@changeid Signed-off-by: Mark Brown commit e191a082d764e80a36c198da61fbf2851ebf425a Author: Douglas Anderson Date: Thu Jun 18 08:06:24 2020 -0700 spi: spi-geni-qcom: Check for error IRQs >From reading the #defines it seems like we should shout if we ever see one of these error bits. Let's do so. This doesn't do anything functional except print a yell in the log if the error bits are seen. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200618080459.v4.3.Id8bebdbdb4d2ed9468634343a7e6207d6cffff8a@changeid Signed-off-by: Mark Brown commit 2ee471a1e28ec79fbfcdc8900ed0ed74132b0efe Author: Douglas Anderson Date: Thu Jun 18 08:06:23 2020 -0700 spi: spi-geni-qcom: Mo' betta locking If you added a bit of a delay (like a trace_printk) into the ISR for the spi-geni-qcom driver, you would suddenly start seeing some errors spit out. The problem was that, though the ISR itself held a lock, other parts of the driver didn't always grab the lock. One example race was this: CPU0 CPU1 ---- ---- spi_geni_set_cs() mas->cur_mcmd = CMD_CS; geni_se_setup_m_cmd(...) wait_for_completion_timeout(&xfer_done); geni_spi_isr() complete(&xfer_done); pm_runtime_put(mas->dev); ... // back to SPI core spi_geni_transfer_one() setup_fifo_xfer() mas->cur_mcmd = CMD_XFER; mas->cur_cmd = CMD_NONE; // bad! return IRQ_HANDLED; Let's fix this. Before we start messing with hardware, we'll grab the lock to make sure that the IRQ handler from some previous command has really finished. We don't need to hold the lock unless we're in a state where more interrupts can come in, but we at least need to make sure the previous IRQ is done. This lock is used exclusively to prevent the IRQ handler and non-IRQ from stomping on each other. The SPI core handles all other mutual exclusion. As part of this, we change the way that the IRQ handler detects spurious interrupts. Previously we checked for our state variable being set to IRQ_NONE, but that was done outside the spinlock. We could move it into the spinlock, but instead let's just change it to look for the lack of any IRQ status bits being set. This can be done outside the lock--the hardware certainly isn't grabbing or looking at the spinlock when it updates its status register. It's possible that this will fix real (but very rare) errors seen in the field that look like: irq ...: nobody cared (try booting with the "irqpoll" option) NOTE: an alternate strategy considered here was to always make the complete() / spi_finalize_current_transfer() the very last thing in our IRQ handler. With such a change you could consider that we could be "lockless". In that case, though, we'd have to be very careful w/ memory barriers so we made sure we didn't have any bugs with weakly ordered memory. Using spinlocks makes the driver much easier to understand. Fixes: 561de45f72bd ("spi: spi-geni-qcom: Add SPI driver support for GENI based QUP") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200618080459.v4.2.I752ebdcfd5e8bf0de06d66e767b8974932b3620e@changeid Signed-off-by: Mark Brown commit a8cbf80e9fb175feb40cb56af93b3504f3c68551 Author: Daniel G. Morse Date: Tue May 26 02:55:50 2020 +0100 HID: Wiimote: Treat the d-pad as an analogue stick The controllers from the Super Nintendo Classic Edition (AKA the SNES Mini) appear as a Classic Controller Pro when connected to a Wii Remote. All the buttons work as the same, with the d-pad being mapped the same as the d-pad on the Classic Controller Pro. This differs from the behaviour of most controllers with d-pads and no analogue sticks, where the d-pad maps to ABS_HAT1X for left and right, and ABS_HAT1Y for up and down. This patch adds an option to the hid-wiimote module to make the Super Nintendo Classic Controller behave this way. The patch has been tested with a Super Nintendo Classic Controller plugged into a Wii Remote in both with the option both enabled and disabled. When enabled the d-pad acts as the analogue control, and when disabled it acts as it did before the patch was applied. This patch has not been tested with e Wii Classic Controller (either the original or the pro version) as I do not have one of these controllers. Although I have not tested it with these controllers, I think it is likely this patch will also work with the NES Classic Edition Controllers. Signed-off-by: Daniel G. Morse Reviewed-by: David Rheinsberg Signed-off-by: Jiri Kosina commit d9dd0fb0e197ae766f0f5e06d23f5f5e1888c511 Author: Matthew Gerlach Date: Fri Jun 19 09:43:41 2020 +0800 spi: altera: fix size mismatch on 64 bit processors The spi-altera driver was originally written with a 32 bit processor, where sizeof(unsigned long) is 4. On a 64 bit processor sizeof(unsigned long) is 8. Change the structure member to u32 to match the actual size of the control register. Signed-off-by: Matthew Gerlach Signed-off-by: Xu Yilun Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/1592531021-11412-4-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit 3820061d38156d88443d32a9a6c701d281234746 Author: Xu Yilun Date: Fri Jun 19 09:43:40 2020 +0800 spi: altera: support indirect access to the registers This patch adds support for indirect access to the registers via parent regmap. The use case is, the spi master is a sub device of a Multifunction device, which is connected to host by some indirect bus. To support this device type, a new platform_device_id is introduced, and the driver tries to get parent regmap for register accessing like many MFD sub device drivers do. Signed-off-by: Xu Yilun Signed-off-by: Matthew Gerlach Signed-off-by: Wu Hao Signed-off-by: Russ Weight Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/1592531021-11412-3-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit 3c6519736eefebafdf8c82d46f64b214403b5260 Author: Xu Yilun Date: Fri Jun 19 09:43:39 2020 +0800 spi: altera: use regmap-mmio instead of direct mmio register access This patch adds support for regmap. It makes preparation for supporting different ways to access the registers. Signed-off-by: Matthew Gerlach Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Signed-off-by: Russ Weight Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/1592531021-11412-2-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit 3bd057c8219d4006f2b436cea2ae5ac723067a51 Author: John Stultz Date: Fri Jun 19 03:14:07 2020 +0000 ASoC: qcom: Kconfig: Tweak dependencies on SND_SOC_SDM845 CROS_EC isn't strictly required for audio to work on other SDM845 platforms (like the Dragonboard 845c). So lets remove the dependency and select the related CROS_EC options via imply. Signed-off-by: John Stultz Reviewed-by: Srinivas Kandagatla Cc: Srinivas Kandagatla Cc: Rohit kumar Cc: Patrick Lai Cc: Banajit Goswami Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Link: https://lore.kernel.org/r/20200619031407.116140-1-john.stultz@linaro.org Signed-off-by: Mark Brown commit 9cb2b3796e083169b368a7add19faec1750ad998 Author: Shengjiu Wang Date: Fri Jun 19 15:54:33 2020 +0800 ASoC: fsl_spdif: Add pm runtime function Add pm runtime support and move clock handling there. Close the clocks at suspend to reduce the power consumption. fsl_spdif_suspend is replaced by pm_runtime_force_suspend. fsl_spdif_resume is replaced by pm_runtime_force_resume. Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/579c0d71e976f34f23f40daa9f1aa06c4baca2f1.1592552389.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit c7440acc859778eed74b223fc41f094133aeaaf0 Merge: f34a4c9dd4ca4 c9e272f9e03d4 Author: Takashi Iwai Date: Fri Jun 19 12:14:58 2020 +0200 Merge branch 'topic/hda-micmute-led' into for-next This is a patch set inspired by the recent patch Kai-Heng posted about the HD-audio mic-mute LED control. Currently HD-audio driver deals with the mute and mic-mute LED in several different ways: primarily with the direct callback of vmaster hook and capture sync hook, while another with the LED class device binding. The latter has been used for binding with the platform device LEDs like Thinkpad, Dell, Huawei. And, yet, recently we added our own LED classdev for the mic-mute LED on some HP systems although they are controlled directly with the callback; it's exposed, however, for the DMIC that is governed by a different ASoC driver. This patch set is an attempt to sort out and make them consistent: namely, * All LEDs are now controlled via LED class device * The generic driver provides helper functions to easily build up the LED class dev and the relevant mixer controls * Conversion of the existing framework and clean ups The patches are lightly tested in my side with a couple of machines and also through hda-emu tests. Some devices receive new kcontrols for the mute LED behavior (that have been missing so far), but anything else look good though my tests. Link: https://lore.kernel.org/r/20200618110842.27238-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit f34a4c9dd4ca44b6af82ca078ff949e74c46071d Author: Takashi Iwai Date: Thu Jun 18 16:40:51 2020 +0200 ALSA: hda: Enable sync-write operation as default for all controllers In the end we already enabled the sync-write mode for most of HD-audio controllers including Intel, and it's no big merit to keep the async write mode for the rest. Let's make it as default and drop the superfluous AZX_DCAPS_SYNC_WRITE bit flag. Also, avoid to set the allow_bus_reset flag, which is a quite unstable and hackish behavior that was needed only for some early platforms (decades ago). The straight fallback to the single cmd mode is more robust. Link: https://lore.kernel.org/r/20200618144051.7415-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 114427b8927a4def2942b2b886f7e4aeae289ccb Author: Denis Efremov Date: Mon Jun 8 18:17:28 2020 +0300 drm/panfrost: Use kvfree() to free bo->sgts Use kvfree() to free bo->sgts, because the memory is allocated with kvmalloc_array() in panfrost_mmu_map_fault_addr(). Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Cc: stable@vger.kernel.org Signed-off-by: Denis Efremov Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200608151728.234026-1-efremov@linux.com commit 64092598c4566dc80a71ca57396dc36fdbf3da4b Author: Dinghao Liu Date: Fri May 22 21:41:09 2020 +0800 drm/panfrost: Fix runtime PM imbalance on error The caller expects panfrost_job_hw_submit() to increase runtime PM usage counter. The refcount decrement on the error branch of WARN_ON() will break the counter balance and needs to be removed. Signed-off-by: Dinghao Liu Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200522134109.27204-1-dinghao.liu@zju.edu.cn commit b99773ef258e628bd53cab22d450a755b73b4d55 Author: Steven Price Date: Fri May 22 16:36:53 2020 +0100 drm/panfrost: Fix inbalance of devfreq record_busy/idle() The calls to panfrost_devfreq_record_busy() and panfrost_devfreq_record_idle() must be balanced to ensure that the devfreq utilisation is correctly reported. But there are two cases where this doesn't work correctly. In panfrost_job_hw_submit() if pm_runtime_get_sync() fails or the WARN_ON() fires then no call to panfrost_devfreq_record_busy() is made, but when the job times out the corresponding _record_idle() call is still made in panfrost_job_timedout(). Move the call up to ensure that it always happens. Secondly panfrost_job_timedout() only makes a single call to panfrost_devfreq_record_idle() even if it is cleaning up multiple jobs. Move the call inside the loop to ensure that the number of _record_idle() calls matches the number of _record_busy() calls. Fixes: 9e62b885f715 ("drm/panfrost: Simplify devfreq utilisation tracking") Acked-by: Alyssa Rosenzweig Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200522153653.40754-1-steven.price@arm.com commit bf3c508375069c9e0b57d8453f99ec26e95b6548 Author: Gustavo A. R. Silva Date: Wed Jun 17 17:03:31 2020 -0500 drm/i915/query: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200617220331.GA19550@embeddedor commit 3fd9bd8b7e41a1908bf8bc0cd06606f2b787cd39 Author: Joe Lawrence Date: Thu Jun 18 14:10:40 2020 -0400 selftests/livepatch: add test delimiter to dmesg Make it bit easier to parse the kernel logs during the selftests by adding a "===== TEST: $test =====" delimiter when each individual test begins. Suggested-by: Petr Mladek Signed-off-by: Joe Lawrence Reviewed-by: Kamalesh Babulal Reviewed-by: Yannick Cote Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618181040.21132-4-joe.lawrence@redhat.com commit c401088f0f1887761b8472352fd4f23595a74149 Author: Joe Lawrence Date: Thu Jun 18 14:10:39 2020 -0400 selftests/livepatch: refine dmesg 'taints' in dmesg comparison The livepatch selftests currently grep on "taints" to filter out "tainting kernel with TAINT_LIVEPATCH" messages which may be logged when loading livepatch modules. Further filter the log to drop "loading out-of-tree module taints kernel" in the rare case the klp_test modules have been built out-of-tree. Look for the longer "taints kernel" or "tainting kernel" strings to avoid inadvertent partial matching. Signed-off-by: Joe Lawrence Reviewed-by: Kamalesh Babulal Reviewed-by: Yannick Cote Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618181040.21132-3-joe.lawrence@redhat.com commit 2eeb0d457d13ed7b170e13cd99d15509d0dd832d Author: Joe Lawrence Date: Thu Jun 18 14:10:38 2020 -0400 selftests/livepatch: Don't clear dmesg when running tests Inspired by commit f131d9edc29d ("selftests/lkdtm: Don't clear dmesg when running tests"), keep a reference dmesg copy when beginning each test. This way check_result() can compare against the initial copy rather than relying upon an empty log. Signed-off-by: Joe Lawrence Reviewed-by: Kamalesh Babulal Reviewed-by: Yannick Cote Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200618181040.21132-2-joe.lawrence@redhat.com commit f8f02d5c671f79c4e80acbd0fca324566968cea8 Author: Greg Kroah-Hartman Date: Thu Jun 18 11:43:00 2020 +0200 USB: OTG: rename product list of devices Rename the list of specific devices that an OTG device could support to make it more obvious as to what this list is for and what it is doing. Also rename the configuration option to make it more obvious as well. Cc: Thomas Bogendoerfer Cc: Paul Burton Cc: "Diego Elio Pettenò" Cc: "Martin K. Petersen" Cc: Jens Axboe Cc: Jiaxun Yang Cc: Krzysztof Kozlowski Cc: "Philippe Mathieu-Daudé" Cc: Alan Stern Cc: Eugeniu Rosca Cc: Qi Zhou Cc: Andrey Konovalov Cc: Hardik Gajjar Cc: Harry Pan Cc: David Heinzelmann Cc: Nishad Kamdar Link: https://lore.kernel.org/r/20200618094300.1887727-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 19246d273e580037b1773b3eda4c713d5bf2f69c Author: Greg Kroah-Hartman Date: Thu Jun 18 11:42:59 2020 +0200 USB: storage: scsi: fix up comment to be more specific Fix up the wording in a comment for the scsi driver saying what it does using better terminology. Cc: Alan Stern Link: https://lore.kernel.org/r/20200618094300.1887727-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c83a74ed5f2220f9d5792471eda7d3b8378c9d59 Author: Greg Kroah-Hartman Date: Thu Jun 18 11:42:58 2020 +0200 USB: storage: fix wording in error message Make it obvious that the UAS driver is being ignored for a specific device by fixing up the wording to be more clear. Cc: Alan Stern Link: https://lore.kernel.org/r/20200618094300.1887727-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 66f092ed3b94de867a28f77d39bac53395b872e4 Author: Greg Kroah-Hartman Date: Thu Jun 18 11:42:57 2020 +0200 USB: serial: sierra: unify quirk handling logic The sierra driver had two different functions for trying to determine different quirks that did the same exact thing. Remove one and rename things to make it more obvious exactly what the different lists do. Cc: Johan Hovold Link: https://lore.kernel.org/r/20200618094300.1887727-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4a7375edf29c6e9a095e4fe674b28e536ae590de Author: Greg Kroah-Hartman Date: Thu Jun 18 11:42:56 2020 +0200 USB: serial: qcserial: fix up wording in a comment Better describe what is happening with a list of devices that are being ignored by the driver. Cc: Johan Hovold Link: https://lore.kernel.org/r/20200618094300.1887727-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8adbe334a15014ee69ae6841e599677f8d4253c4 Author: Greg Kroah-Hartman Date: Thu Jun 18 11:42:55 2020 +0200 USB: OHCI: remove obsolete FIXME comment This comment has been present since the start of git. Since no one is going to do anything about it, and all seems to work well, just drop the thing entirely. Cc: Alan Stern Link: https://lore.kernel.org/r/20200618094300.1887727-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 9af54301b643eca4544970037409efc986a47a9c Author: Greg Kroah-Hartman Date: Thu Jun 18 11:42:54 2020 +0200 USB: rename USB OTG hub configuration option The USB OTG code has the ability to disable external hubs, but the configuration option for it is oddly named. Rename it to be more obvious as to what it does. Cc: Thomas Bogendoerfer Cc: Bin Liu Cc: Paul Cercueil Cc: Alan Stern Cc: Eugeniu Rosca Cc: Kai-Heng Feng Cc: David Heinzelmann Cc: "Lee, Chiasheng" Cc: Keiya Nobuta Cc: Hardik Gajjar Link: https://lore.kernel.org/r/20200618094300.1887727-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 91c7eaa686c3b7ae2d5b2aed22a45a02c8baa30e Author: Greg Kroah-Hartman Date: Thu Jun 18 11:42:53 2020 +0200 USB: rename USB quirk to USB_QUIRK_ENDPOINT_IGNORE The USB core has a quirk flag to ignore specific endpoints, so rename it to be more obvious what this quirk does. Cc: Johan Hovold Cc: Alan Stern Cc: Richard Dodd Cc: Hans de Goede Cc: Jonathan Cox Cc: Bastien Nocera Cc: "Thiébaud Weksteen" Cc: Nishad Kamdar Link: https://lore.kernel.org/r/20200618094300.1887727-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7cc373db7ec5c221aa00a8ec3e9bb9e6792c755c Merge: 0fb9fbab40535 17b332f48074e Author: David S. Miller Date: Thu Jun 18 20:49:56 2020 -0700 Merge branch 'cxgb4-add-support-to-read-write-flash' Vishal Kulkarni says: ==================== cxgb4: add support to read/write flash This series of patches adds support to read/write different binary images of serial flash present in Chelsio terminator. V2 changes: Patch 1: No change Patch 2: No change Patch 3: Fix 4 compilation warnings reported by C=1, W=1 flags Patch 4: No change Patch 5: No change ==================== Signed-off-by: David S. Miller commit 17b332f48074e7ee2169ee4268ced6274e1c95c3 Author: Vishal Kulkarni Date: Thu Jun 18 11:35:56 2020 +0530 cxgb4: add support to read serial flash This patch adds support to dump flash memory via ethtool --get-dump Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller commit d5002c9a3d5a475590cf9e2a3e681bcb6b0cdda6 Author: Vishal Kulkarni Date: Thu Jun 18 11:35:55 2020 +0530 cxgb4: add support to flash boot cfg image Update set_flash to flash boot cfg image to flash region Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller commit 550883558f174685c3931bbd963fbde503a6100d Author: Vishal Kulkarni Date: Thu Jun 18 11:35:54 2020 +0530 cxgb4: add support to flash boot image Update set_flash to flash boot image to flash region Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller commit 4ee339e1e92a9cff6ceda5a81622625ffe554163 Author: Vishal Kulkarni Date: Thu Jun 18 11:35:53 2020 +0530 cxgb4: add support to flash PHY image Update set_flash to flash PHY image to flash region Signed-off-by: Vishal Kulkarni Signed-off-by: David S. Miller commit 3893c905b557670e25be62b98f5cf0626096e9d4 Author: Vishal Kulkarni Date: Thu Jun 18 11:35:52 2020 +0530 cxgb4: update set_flash to flash different images Chelsio adapter contains different flash regions and each region is used by different binary files. This patch adds support to flash images like PHY firmware, boot and boot config using ethtool -f N. The N value mapping is as follows. N = 0 : Parse image and decide which region to flash N = 1 : Firmware N = 2 : PHY firmware N = 3 : boot image N = 4 : boot cfg Signed-off-by: Vishal Kulkarni " Signed-off-by: David S. Miller commit 0fb9fbab405351aa0c18973881c4103e4da886b6 Merge: 1b05540900619 3d5b459ba0e37 Author: David S. Miller Date: Thu Jun 18 20:46:23 2020 -0700 Merge branch 'net-tso-expand-to-UDP-support' Eric Dumazet says: ==================== net: tso: expand to UDP support With QUIC getting more attention these days, it is worth implementing UDP direct segmentation, the same we did for TCP. Drivers will need to advertize NETIF_F_GSO_UDP_L4 so that GSO stack does not do the (more expensive) segmentation. Note the two first patches are stable candidates, after tests confirm they do not add regressions. v2: addressed Jakub feedback : 1) Added a prep patch for octeontx2-af 2) calls tso_start() earlier in otx2_sq_append_tso() ==================== Signed-off-by: David S. Miller commit 3d5b459ba0e3788ab471e8cb98eee89964a9c5e8 Author: Eric Dumazet Date: Wed Jun 17 20:53:26 2020 -0700 net: tso: add UDP segmentation support Note that like TCP, we do not support additional encapsulations, and that checksums must be offloaded to the NIC. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 761b331cb6902dc0a08f786e9fa0dbd572059027 Author: Eric Dumazet Date: Wed Jun 17 20:53:25 2020 -0700 net: tso: cache transport header length Add tlen field into struct tso_t, and change tso_start() to return skb_transport_offset(skb) + tso->tlen This removes from callers the need to use tcp_hdrlen(skb) and will ease UDP segmentation offload addition. v2: calls tso_start() earlier in otx2_sq_append_tso() [Jakub] Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 504b912150983a8b2499bbf9e4501336677404c9 Author: Eric Dumazet Date: Wed Jun 17 20:53:24 2020 -0700 net: tso: constify tso_count_descs() and friends skb argument of tso_count_descs(), tso_build_hdr() and tso_build_data() can be const. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 185c3e5860227065dcb6ee884b45e0debe4762dd Author: Eric Dumazet Date: Wed Jun 17 20:53:23 2020 -0700 net: tso: shrink struct tso_t size field can be an int, no need for size_t Removes a 32bit hole on 64bit kernels. And align fields for better readability. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 9c77b803f263573b6019e4828825709845c37d45 Author: Eric Dumazet Date: Wed Jun 17 20:53:22 2020 -0700 net: tso: double TSO_HEADER_SIZE value Transport header size could be 60 bytes, and network header size can also be 60 bytes. Add the Ethernet header and we are above 128 bytes. Since drivers using net/core/tso.c usually allocates one DMA coherent piece of memory per TX queue, this patch might cause issues if a driver was using too many slots. For 1024 slots, we would need 256 KB of physically contiguous memory instead of 128 KB. Alternative fix would be to add checks in the fast path, but this involves more work in all drivers using net/core/tso.c. Fixes: f9cbe9a556af ("net: define the TSO header size in net/tso.h") Signed-off-by: Eric Dumazet Cc: Antoine Tenart Signed-off-by: David S. Miller commit 393415203f5c916b5907e0a7c89f4c2c5a9c5505 Author: Eric Dumazet Date: Wed Jun 17 20:53:21 2020 -0700 octeontx2-af: change (struct qmem)->entry_sz from u8 to u16 We need to increase TSO_HEADER_SIZE from 128 to 256. Since otx2_sq_init() calls qmem_alloc() with TSO_HEADER_SIZE, we need to change (struct qmem)->entry_sz to avoid truncation to 0. Fixes: 7a37245ef23f ("octeontx2-af: NPA block admin queue init") Signed-off-by: Eric Dumazet Cc: Sunil Goutham Signed-off-by: David S. Miller commit 1b055409006195fd076a29ad5ee15f661bdd580b Merge: 9f66a4557e933 c2a2e1270a576 Author: David S. Miller Date: Thu Jun 18 20:43:10 2020 -0700 Merge branch 'hns3-next' Barry Song says: ==================== net: hns3: a bundle of minor cleanup and fixes some minor changes to either improve the readability or make the code align with linux APIs better. ==================== Signed-off-by: David S. Miller commit c2a2e1270a57696827da4ca69f78eb072e37d590 Author: Barry Song Date: Thu Jun 18 13:02:11 2020 +1200 net: hns3: streaming dma buffer sync between cpu and device Right now they are empty functions for our SoC since hardware can keep cache coherent, but it is still good to align with streaming DMA APIs as device drivers should not make an assumption of SoC. Reviewed-by: Yunsheng Lin Signed-off-by: Barry Song Signed-off-by: David S. Miller commit e99a308da3c1518009a740c4d3962f616edeb642 Author: Barry Song Date: Thu Jun 18 13:02:10 2020 +1200 net: hns3: replace disable_irq by IRQ_NOAUTOEN flag disable_irq() after request_irq() is still risk as there is a chance irq can come after request_irq() and before disable_irq(). this should be done by IRQ_NOAUTOEN flag. Signed-off-by: Barry Song Signed-off-by: David S. Miller commit 4d2cad32127e5c83e17b0e1dfd4cd5ef6080301f Author: Barry Song Date: Thu Jun 18 13:02:09 2020 +1200 net: hns3: rename buffer-related functions This is for improving the readability. Signed-off-by: Barry Song Signed-off-by: David S. Miller commit cb0e3e611575a3335ea0521c9e8ba84a6a7e51c6 Author: Barry Song Date: Thu Jun 18 13:02:08 2020 +1200 net: hns3: pointer type of buffer should be void Move the type of buffer address from unsigned char to void Signed-off-by: Barry Song Signed-off-by: David S. Miller commit 674a135746aa7553eff12177d11868367aa102cb Author: Barry Song Date: Thu Jun 18 13:02:07 2020 +1200 net: hns3: remove unnecessary devm_kfree since we are using device-managed function, it is unnecessary to free in probe. Signed-off-by: Barry Song Signed-off-by: David S. Miller commit 9f66a4557e9338eecee4159834c3d1ec4a327158 Author: Gustavo A. R. Silva Date: Wed Jun 17 18:15:57 2020 -0500 mISDN: hfcsusb: Use struct_size() helper Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit c90834cd477a6e406c320c56774999a71a859600 Author: Tim Harvey Date: Wed Jun 17 15:59:10 2020 -0700 lan743x: allow mac address to come from dt If a valid mac address is present in dt, use that before using CSR's or a random mac address. Signed-off-by: Tim Harvey Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d8d8b23844d627a3aafebf8f3bb9c30f9a9002c9 Merge: 1260e772dd184 51f6291b040ad Author: David S. Miller Date: Thu Jun 18 20:38:36 2020 -0700 Merge branch 'r8169-smaller-improvements-again' Heiner Kallweit says: ==================== r8169: smaller improvements again Series includes a number of different smaller improvements. ==================== Signed-off-by: David S. Miller commit 51f6291b040ad9ed475af4fd58bb1db53b737475 Author: Heiner Kallweit Date: Wed Jun 17 22:56:27 2020 +0200 r8169: allow setting irq coalescing if link is down So far we can not configure irq coalescing when link is down. Allow the user to do this, and assume that he wants to configure irq coalescing for highest speed. Otherwise the irq rate is low enough anyway. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 9f0b54cd167219266bd3864570ae8f4987b57520 Author: Heiner Kallweit Date: Wed Jun 17 22:55:40 2020 +0200 r8169: move switching optional clock on/off to pll power functions Relevant chip clocks are disabled in rtl_pll_power_down(), therefore move calling clk_disable_unprepare() there. Similar for enabling the clock. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit a2ee847242b35816f57b0731aab9fd6e8693ae65 Author: Heiner Kallweit Date: Wed Jun 17 22:54:54 2020 +0200 r8169: move updating counters to rtl8169_down Counters are updated whenever we go down, therefore move the call to rtl8169_down(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 0c28a63a47bfa7497e4dce79f6bb53a00d8f6aa0 Author: Heiner Kallweit Date: Wed Jun 17 22:54:18 2020 +0200 r8169: move napi_disable call and rename rtl8169_hw_reset rtl8169_hw_reset() meanwhile does more than a hw reset, therefore rename it to rtl8169_cleanup(). In addition move calling napi_disable() to this function. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 7190aeece918cad9b601789bee58877a6c2eeed8 Author: Heiner Kallweit Date: Wed Jun 17 22:53:21 2020 +0200 r8169: replace synchronize_rcu with synchronize_net rtl8169_hw_reset() may be called under RTNL lock, therefore switch to synchronize_net(). Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit e9882208ae989116b6ea166ef743111ea4a5248f Author: Heiner Kallweit Date: Wed Jun 17 22:52:47 2020 +0200 r8169: improve setting WoL on runtime-resume In the following scenario WoL isn't configured properly: - Driver is loaded, interface isn't brought up within 10s, so driver runtime-suspends. - WoL is set. - Interface is brought up, stored WoL setting isn't applied. It has always been like that, but the scenario seems to be quite theoretical as I haven't seen any bug report yet. Therefore treat the change as an improvement. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 27248d57c88af1eede1619eaa3423b424da06b29 Author: Heiner Kallweit Date: Wed Jun 17 22:51:46 2020 +0200 r8169: remove unused constant RsvdMask Since 9d3679fe0f30 ("r8169: inline rtl8169_make_unusable_by_asic") this constant isn't used any longer, so remove it. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit a38b7fbfeaebe9a11489db3fbcfc29108c62c0df Author: Heiner Kallweit Date: Wed Jun 17 22:51:10 2020 +0200 r8169: add info for DASH being enabled In case of problems it facilitates the bug analysis if we know whether DASH is active. Therefore emit a message in probe if this is the case. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 1260e772dd184b29266b552d90cbf80f6ee4b066 Author: Gustavo A. R. Silva Date: Wed Jun 17 13:53:17 2020 -0500 enetc: Use struct_size() helper in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller commit 427d5838e99632e9218eae752009c873cade89ac Author: Eric Dumazet Date: Wed Jun 17 09:40:51 2020 -0700 net: napi: remove useless stack trace Whenever a buggy NAPI driver returns more than its budget, we emit a stack trace that is of no use, since it does not tell which driver is buggy. Instead, emit a message giving the function name, and a descriptive message. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 4e638025f25652b052ec54cf75e4cfe4f4663ce7 Author: Gustavo A. R. Silva Date: Tue Jun 16 18:03:28 2020 -0500 net: stmmac: selftests: Use struct_size() helper in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit d3fbd739fc8a3cf9418c4a17ba7b2b5be24a3b2c Author: Tom Rix Date: Mon Jun 8 05:54:46 2020 -0700 fpga: Fix dead store in fpga-bridge.c Using clang's scan-build/view this issue was flagged a dead store issue in fpga-bridge.c warning: Value stored to 'ret' is never read [deadcode.DeadStores] ret = id; Signed-off-by: Tom Rix Signed-off-by: Moritz Fischer commit 88aaab9218f87c7c32e5db93554cf110352c3c13 Author: Tom Rix Date: Mon Jun 8 05:54:45 2020 -0700 fpga: Fix dead store fpga-mgr.c Using clang's scan-build/view this issue was flagged in fpga-mgr.c drivers/fpga/fpga-mgr.c:585:3: warning: Value stored to 'ret' is never read [deadcode.DeadStores] ret = id; Signed-off-by: Tom Rix Signed-off-by: Moritz Fischer commit e1d9ec3af3463c1721723f68403ee14214d0d2f6 Author: Gustavo A. R. Silva Date: Wed Jun 17 17:10:39 2020 -0500 fpga: dfl: Use struct_size() in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. Also, remove unnecessary function dfl_feature_platform_data_size(). This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Moritz Fischer commit 23f872b6ece695750667a44016037154b91addef Author: Luca Ceresoli Date: Thu Jun 11 23:11:42 2020 +0200 fpga manager: xilinx-spi: remove unneeded, mistyped variables Using variables does not add readability here: parameters passed to udelay*() are obviously in microseconds and their meaning is clear from the context. The type is also wrong, udelay expects an unsigned long. Signed-off-by: Luca Ceresoli Signed-off-by: Moritz Fischer commit d1ddca78f9f603ab70369e76fa2610d7e385c1b8 Author: Luca Ceresoli Date: Thu Jun 11 23:11:41 2020 +0200 fpga manager: xilinx-spi: valid for the 7 Series too The Xilinx 7-series uses the same protocol, mention that. Signed-off-by: Luca Ceresoli Signed-off-by: Moritz Fischer commit 9d08b9ecbb2c7e0efa124e9a67715336ec0dd174 Author: Luca Ceresoli Date: Thu Jun 11 23:11:40 2020 +0200 dt-bindings: fpga: xilinx-slave-serial: valid for the 7 Series too The Xilinx 7-series uses the same protocol, mention that. Signed-off-by: Luca Ceresoli Acked-by: Moritz Fischer Acked-by: Rob Herring Signed-off-by: Moritz Fischer commit 55dc9b87e4a8e4d0fb1b7169bab7e23d27ba4209 Author: John Hubbard Date: Mon May 25 15:17:54 2020 -0700 fpga: dfl: afu: convert get_user_pages() --> pin_user_pages() This code was using get_user_pages_fast(), in a "Case 2" scenario (DMA/RDMA), using the categorization from [1]. That means that it's time to convert the get_user_pages_fast() + put_page() calls to pin_user_pages_fast() + unpin_user_pages() calls. There is some helpful background in [2]: basically, this is a small part of fixing a long-standing disconnect between pinning pages, and file systems' use of those pages. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Cc: Xu Yilun Cc: Wu Hao Cc: Moritz Fischer Cc: linux-fpga@vger.kernel.org Signed-off-by: John Hubbard Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit 7c7982cbadbb63eb76401ddc4ef090cf7ae274b4 Author: Martin KaFai Lau Date: Wed Jun 17 10:42:26 2020 -0700 bpf: sk_storage: Prefer to get a free cache_idx The cache_idx is currently picked by RR. There is chance that the same cache_idx will be picked by multiple sk_storage_maps while other cache_idx is still unused. e.g. It could happen when the sk_storage_map is recreated during the restart of the user space process. This patch tracks the usage count for each cache_idx. There is 16 of them now (defined in BPF_SK_STORAGE_CACHE_SIZE). It will try to pick the free cache_idx. If none was found, it would pick one with the minimal usage count. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20200617174226.2301909-1-kafai@fb.com commit ba87a45c23d645b25e1265b477e83cc1b73086e4 Author: Wang Xiaojun Date: Wed Jun 17 20:30:12 2020 +0800 f2fs: use kfree() to free variables allocated by match_strdup() Use kfree() instead of kvfree() to free variables allocated by match_strdup(). Because the memory is allocated with kmalloc inside match_strdup(). Signed-off-by: Wang Xiaojun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit da52f8ade40b032eb8111a0fd514c8ac5f8f0f1b Author: Jack Qiu Date: Thu Jun 18 12:37:10 2020 +0800 f2fs: get the right gc victim section when section has several segments Assume each section has 4 segment: .___________________________. |_Segment0_|_..._|_Segment3_| . . . . .__________. |_section0_| Segment 0~2 has 0 valid block, segment 3 has 512 valid blocks. It will fail if we want to gc section0 in this scenes, because all 4 segments in section0 is not dirty. So we should use dirty section bitmap instead of dirty segment bitmap to get right victim section. Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit db5ae363292705d52c5b653d5079a07a6417ef4c Author: Wuyun Zhao Date: Thu Jun 18 10:58:37 2020 +0800 f2fs: fix a race condition between f2fs_write_end_io and f2fs_del_fsync_node_entry Under some condition, the __write_node_page will submit a page which is not f2fs_in_warm_node_list and will not call f2fs_add_fsync_node_entry. f2fs_gc continue to run to invoke f2fs_iget -> do_read_inode to read the same node page and set code node, which make f2fs_in_warm_node_list become true, that will cause f2fs_bug_on in f2fs_del_fsync_node_entry when f2fs_write_end_io called. - f2fs_write_end_io - f2fs_iget - do_read_inode - set_cold_node recover cold node flag - f2fs_in_warm_node_list - is_cold_node if node is cold, assume we have added node to fsync_node_list during writepages() - f2fs_del_fsync_node_entry - f2fs_bug_on() due to node page is not in fsync_node_list [ 34.966133] Call trace: [ 34.969902] f2fs_del_fsync_node_entry+0x100/0x108 [ 34.976071] f2fs_write_end_io+0x1e0/0x288 [ 34.981539] bio_endio+0x248/0x270 [ 34.986289] blk_update_request+0x2b0/0x4d8 [ 34.991841] scsi_end_request+0x40/0x440 [ 34.997126] scsi_io_completion+0xa4/0x748 [ 35.002593] scsi_finish_command+0xdc/0x110 [ 35.008143] scsi_softirq_done+0x118/0x150 [ 35.013610] blk_done_softirq+0x8c/0xe8 [ 35.018811] __do_softirq+0x2e8/0x578 [ 35.023828] irq_exit+0xfc/0x120 [ 35.028398] handle_IPI+0x1d8/0x330 [ 35.033233] gic_handle_irq+0x110/0x1d4 [ 35.038433] el1_irq+0xb4/0x130 [ 35.042917] kmem_cache_alloc+0x3f0/0x418 [ 35.048288] radix_tree_node_alloc+0x50/0xf8 [ 35.053933] __radix_tree_create+0xf8/0x188 [ 35.059484] __radix_tree_insert+0x3c/0x128 [ 35.065035] add_gc_inode+0x90/0x118 [ 35.069967] f2fs_gc+0x1b80/0x2d70 [ 35.074718] f2fs_disable_checkpoint+0x94/0x1d0 [ 35.080621] f2fs_fill_super+0x10c4/0x1b88 [ 35.086088] mount_bdev+0x194/0x1e0 [ 35.090923] f2fs_mount+0x40/0x50 [ 35.095589] mount_fs+0xb4/0x190 [ 35.100159] vfs_kern_mount+0x80/0x1d8 [ 35.105260] do_mount+0x478/0xf18 [ 35.109926] ksys_mount+0x90/0xd0 [ 35.114592] __arm64_sys_mount+0x24/0x38 Signed-off-by: Wuyun Zhao Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 6f6489288ed196a962ef8d33b1b9cf6369ff0807 Author: Wei Fang Date: Mon Jun 15 16:11:38 2020 +0800 f2fs: remove useless truncate in f2fs_collapse_range() Since offset < new_size, no need to do truncate_pagecache() again with new_size. Signed-off-by: Wei Fang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 742532d11d8328231d099f557e6287e75b2d247b Author: Denis Efremov Date: Wed Jun 10 01:14:46 2020 +0300 f2fs: use kfree() instead of kvfree() to free superblock data Use kfree() instead of kvfree() to free super in read_raw_super_block() because the memory is allocated with kzalloc() in the function. Use kfree() instead of kvfree() to free sbi, raw_super in f2fs_fill_super() and f2fs_put_super() because the memory is allocated with kzalloc(). Signed-off-by: Denis Efremov Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 99bbe307013059951368d12f5454d34568de4850 Author: Jaegeuk Kim Date: Tue Jun 16 09:56:51 2020 -0700 f2fs: avoid checkpatch error ERROR:INITIALISED_STATIC: do not initialise statics to NULL Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a7ca4c3ebe6994ba88eb23576b2c3901b08e1dec Author: Jing Xiangfeng Date: Wed Jun 17 22:08:03 2020 +0800 IB/srpt: Remove WARN_ON from srpt_cm_req_recv The callers pass the pointer '&req' or 'private_data' to srpt_cm_req_recv(), and 'private_data' is initialized in srp_send_req(). 'sdev' is allocated and stored in srpt_add_one(). It's easy to show that sdev and req are always valid. So we remove unnecessary WARN_ON. Link: https://lore.kernel.org/r/20200617140803.181333-1-jingxiangfeng@huawei.com Signed-off-by: Jing Xiangfeng Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 56ce93700eb630a8d894f5a578f166888ae8cba6 Author: Benjamin Thiel Date: Sat Jun 6 14:37:43 2020 +0200 x86/mm/32: Fix -Wmissing prototypes warnings for init.c Fix: arch/x86/mm/init.c:503:21: warning: no previous prototype for ‘init_memory_mapping’ [-Wmissing-prototypes] unsigned long __ref init_memory_mapping(unsigned long start, arch/x86/mm/init.c:745:13: warning: no previous prototype for ‘poking_init’ [-Wmissing-prototypes] void __init poking_init(void) Lift init_memory_mapping() and poking_init() out of the ifdef CONFIG_X86_64 to make the functions visible on 32-bit too. Signed-off-by: Benjamin Thiel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200606123743.3277-1-b.thiel@posteo.de commit d832c0051f4e9cc7d26ef3bc6e9b662bc6a90f3a Merge: 14bda4e5293ed 0f1441b44e823 Author: Peter Zijlstra Date: Thu Jun 18 17:55:29 2020 +0200 Merge branch 'objtool/urgent' into objtool/core Conflicts: tools/objtool/elf.c tools/objtool/elf.h tools/objtool/orc_gen.c tools/objtool/check.c Signed-off-by: Peter Zijlstra (Intel) commit 3269c178b7a11dd8629200f594adce44639fd651 Author: Yuantian Tang Date: Mon May 25 15:38:27 2020 +0800 arm64: dts: ls1028a: add one more thermal zone support There are 2 thermal zones in ls1028a soc. Current dts only includes one. This patch adds the other thermal zone node in dts to enable it. Signed-off-by: Yuantian Tang Signed-off-by: Shawn Guo commit 81c7462883b0cc0a4eeef0687f80ad5b5baee5f6 Author: Macpaul Lin Date: Thu Jun 18 17:13:38 2020 +0800 USB: replace hardcode maximum usb string length by definition Replace hardcoded maximum USB string length (126 bytes) by definition "USB_MAX_STRING_LEN". Signed-off-by: Macpaul Lin Acked-by: Alan Stern Link: https://lore.kernel.org/r/1592471618-29428-1-git-send-email-macpaul.lin@mediatek.com Signed-off-by: Greg Kroah-Hartman commit cda37dbbf17a3a49d434bd1c85eff762faebf3ef Author: Colin Ian King Date: Thu Jun 18 10:32:24 2020 +0100 usb: xhci: fix spelling mistake in Kconfig "firwmare" -> "firmware" There are two spelling mistakes in the Kconfig text. Fix these. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200618093224.10179-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 5e7ec8578fa3dada50c50f5b234fa8d154b76349 Author: Chang S. Bae Date: Thu May 28 16:14:02 2020 -0400 selftests/x86/fsgsbase: Test ptracer-induced GS base write with FSGSBASE This validates that GS selector and base are independently preserved in ptrace commands. Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20200528201402.1708239-17-sashal@kernel.org commit 291fd83569e10f3d305cd8adb62f6ec00f759dc6 Author: Chang S. Bae Date: Thu May 28 16:14:01 2020 -0400 selftests/x86/fsgsbase: Test GS selector on ptracer-induced GS base write The test validates that the selector is not changed when a ptracer writes the ptracee's GS base. Originally-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20200528201402.1708239-16-sashal@kernel.org commit 82c0c7d24c1a034d94af4595dbd3910d7336a6dc Author: Thomas Gleixner Date: Thu May 28 16:14:00 2020 -0400 Documentation/x86/64: Add documentation for GS/FS addressing mode Explain how the GS/FS based addressing can be utilized in user space applications along with the differences between the generic prctl() based GS/FS base control and the FSGSBASE version available on newer CPUs. Originally-by: Andi Kleen Signed-off-by: Thomas Gleixner Signed-off-by: Chang S. Bae Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Link: https://lkml.kernel.org/r/20200528201402.1708239-15-sashal@kernel.org commit 742c45c3ecc9255e15eddbbcee44fd8de401cf1c Author: Andi Kleen Date: Thu May 28 16:13:59 2020 -0400 x86/elf: Enumerate kernel FSGSBASE capability in AT_HWCAP2 The kernel needs to explicitly enable FSGSBASE. So, the application needs to know if it can safely use these instructions. Just looking at the CPUID bit is not enough because it may be running in a kernel that does not enable the instructions. One way for the application would be to just try and catch the SIGILL. But that is difficult to do in libraries which may not want to overwrite the signal handlers of the main application. Enumerate the enabled FSGSBASE capability in bit 1 of AT_HWCAP2 in the ELF aux vector. AT_HWCAP2 is already used by PPC for similar purposes. The application can access it open coded or by using the getauxval() function in newer versions of glibc. [ tglx: Massaged changelog ] Signed-off-by: Andi Kleen Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1557309753-24073-18-git-send-email-chang.seok.bae@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-14-sashal@kernel.org commit b745cfba44c152c34363eea9e052367b6b1d652b Author: Andy Lutomirski Date: Thu May 28 16:13:58 2020 -0400 x86/cpu: Enable FSGSBASE on 64bit by default and add a chicken bit Now that FSGSBASE is fully supported, remove unsafe_fsgsbase, enable FSGSBASE by default, and add nofsgsbase to disable it. Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1557309753-24073-17-git-send-email-chang.seok.bae@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-13-sashal@kernel.org commit c82965f9e53005c1c62632c468968293262056cb Author: Chang S. Bae Date: Thu May 28 16:13:57 2020 -0400 x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit Without FSGSBASE, user space cannot change GSBASE other than through a PRCTL. The kernel enforces that the user space GSBASE value is postive as negative values are used for detecting the kernel space GSBASE value in the paranoid entry code. If FSGSBASE is enabled, user space can set arbitrary GSBASE values without kernel intervention, including negative ones, which breaks the paranoid entry assumptions. To avoid this, paranoid entry needs to unconditionally save the current GSBASE value independent of the interrupted context, retrieve and write the kernel GSBASE and unconditionally restore the saved value on exit. The restore happens either in paranoid_exit or in the special exit path of the NMI low level code. All other entry code pathes which use unconditional SWAPGS are not affected as they do not depend on the actual content. [ tglx: Massaged changelogs and comments ] Suggested-by: H. Peter Anvin Suggested-by: Andy Lutomirski Suggested-by: Thomas Gleixner Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1557309753-24073-13-git-send-email-chang.seok.bae@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-12-sashal@kernel.org commit eaad981291ee36efee15a5e515d4598ae94ace07 Author: Chang S. Bae Date: Thu May 28 16:13:56 2020 -0400 x86/entry/64: Introduce the FIND_PERCPU_BASE macro GSBASE is used to find per-CPU data in the kernel. But when GSBASE is unknown, the per-CPU base can be found from the per_cpu_offset table with a CPU NR. The CPU NR is extracted from the limit field of the CPUNODE entry in GDT, or by the RDPID instruction. This is a prerequisite for using FSGSBASE in the low level entry code. Also, add the GAS-compatible RDPID macro as binutils 2.23 do not support it. Support is added in version 2.27. [ tglx: Massaged changelog ] Suggested-by: H. Peter Anvin Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1557309753-24073-12-git-send-email-chang.seok.bae@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-11-sashal@kernel.org commit 96b2371413e8f636a5f25c42a933af21c35a2a41 Author: Chang S. Bae Date: Thu May 28 16:13:55 2020 -0400 x86/entry/64: Switch CR3 before SWAPGS in paranoid entry When FSGSBASE is enabled, the GSBASE handling in paranoid entry will need to retrieve the kernel GSBASE which requires that the kernel page table is active. As the CR3 switch to the kernel page tables (PTI is active) does not depend on kernel GSBASE, move the CR3 switch in front of the GSBASE handling. Comment the EBX content while at it. No functional change. [ tglx: Rewrote changelog and comments ] Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1557309753-24073-11-git-send-email-chang.seok.bae@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-10-sashal@kernel.org commit 978e1342c3c4d7b20808fd5875d9ac0d57db22ee Author: Tony Luck Date: Thu May 28 16:13:54 2020 -0400 x86/speculation/swapgs: Check FSGSBASE in enabling SWAPGS mitigation Before enabling FSGSBASE the kernel could safely assume that the content of GS base was a user address. Thus any speculative access as the result of a mispredicted branch controlling the execution of SWAPGS would be to a user address. So systems with speculation-proof SMAP did not need to add additional LFENCE instructions to mitigate. With FSGSBASE enabled a hostile user can set GS base to a kernel address. So they can make the kernel speculatively access data they wish to leak via a side channel. This means that SMAP provides no protection. Add FSGSBASE as an additional condition to enable the fence-based SWAPGS mitigation. Signed-off-by: Tony Luck Signed-off-by: Chang S. Bae Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200528201402.1708239-9-sashal@kernel.org commit 005f141e5d5e05d3986539567d0bc5aa2f4dc640 Author: Chang S. Bae Date: Thu May 28 16:13:53 2020 -0400 x86/process/64: Use FSGSBASE instructions on thread copy and ptrace When FSGSBASE is enabled, copying threads and reading fsbase and gsbase using ptrace must read the actual values. When copying a thread, use save_fsgs() and copy the saved values. For ptrace, the bases must be read from memory regardless of the selector if FSGSBASE is enabled. [ tglx: Invoke __rdgsbase_inactive() with interrupts disabled ] [ luto: Massage changelog ] Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1557309753-24073-9-git-send-email-chang.seok.bae@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-8-sashal@kernel.org commit 673903495c85137791d5820d690229efe09c8f7b Author: Andy Lutomirski Date: Thu May 28 16:13:51 2020 -0400 x86/process/64: Use FSBSBASE in switch_to() if available With the new FSGSBASE instructions, FS and GSABSE can be efficiently read and writen in __switch_to(). Use that capability to preserve the full state. This will enable user code to do whatever it wants with the new instructions without any kernel-induced gotchas. (There can still be architectural gotchas: movl %gs,%eax; movl %eax,%gs may change GSBASE if WRGSBASE was used, but users are expected to read the CPU manual before doing things like that.) This is a considerable speedup. It seems to save about 100 cycles per context switch compared to the baseline 4.6-rc1 behavior on a Skylake laptop. This is mostly due to avoiding the WRMSR operation. [ chang: 5~10% performance improvements were seen with a context switch benchmark that ran threads with different FS/GSBASE values (to the baseline 4.16). Minor edit on the changelog. ] [ tglx: Masaage changelog ] Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1557309753-24073-8-git-send-email-chang.seok.bae@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-6-sashal@kernel.org commit 6758034e4d6a7f0e26b748789ab1f83f3116d1b9 Author: Thomas Gleixner Date: Thu May 28 16:13:52 2020 -0400 x86/process/64: Make save_fsgs_for_kvm() ready for FSGSBASE save_fsgs_for_kvm() is invoked via vcpu_enter_guest() kvm_x86_ops.prepare_guest_switch(vcpu) vmx_prepare_switch_to_guest() save_fsgs_for_kvm() with preemption disabled, but interrupts enabled. The upcoming FSGSBASE based GS safe needs interrupts to be disabled. This could be done in the helper function, but that function is also called from switch_to() which has interrupts disabled already. Disable interrupts inside save_fsgs_for_kvm() and rename the function to current_save_fsgs() so it can be invoked from other places. Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/20200528201402.1708239-7-sashal@kernel.org commit 58edfd2e0a93c9adc2f29902a0335af0584041a0 Author: Chang S. Bae Date: Thu May 28 16:13:50 2020 -0400 x86/fsgsbase/64: Enable FSGSBASE instructions in helper functions Add cpu feature conditional FSGSBASE access to the relevant helper functions. That allows to accelerate certain FS/GS base operations in subsequent changes. Note, that while possible, the user space entry/exit GSBASE operations are not going to use the new FSGSBASE instructions. The reason is that it would require additional storage for the user space value which adds more complexity to the low level code and experiments have shown marginal benefit. This may be revisited later but for now the SWAPGS based handling in the entry code is preserved except for the paranoid entry/exit code. To preserve the SWAPGS entry mechanism introduce __[rd|wr]gsbase_inactive() helpers. Note, for Xen PV, paravirt hooks can be added later as they might allow a very efficient but different implementation. [ tglx: Massaged changelog, convert it to noinstr and force inline native_swapgs() ] Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/1557309753-24073-7-git-send-email-chang.seok.bae@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-5-sashal@kernel.org commit b15378ca50810c1350086cafad3fe19979262a83 Author: Andi Kleen Date: Thu May 28 16:13:49 2020 -0400 x86/fsgsbase/64: Add intrinsics for FSGSBASE instructions [ luto: Rename the variables from FS and GS to FSBASE and GSBASE and make safe to include on 32-bit kernels. ] Signed-off-by: Andi Kleen Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Reviewed-by: Andy Lutomirski Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1557309753-24073-6-git-send-email-chang.seok.bae@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-4-sashal@kernel.org commit dd649bd0b3aa012740059b1ba31ecad28a408f7f Author: Andy Lutomirski Date: Thu May 28 16:13:48 2020 -0400 x86/cpu: Add 'unsafe_fsgsbase' to enable CR4.FSGSBASE This is temporary. It will allow the next few patches to be tested incrementally. Setting unsafe_fsgsbase is a root hole. Don't do it. Signed-off-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Reviewed-by: Andi Kleen Reviewed-by: Andy Lutomirski Link: https://lkml.kernel.org/r/1557309753-24073-4-git-send-email-chang.seok.bae@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-3-sashal@kernel.org commit fddf8ba1e48860211c9639d00883833b42fcc1e0 Author: Chang S. Bae Date: Thu May 28 16:13:47 2020 -0400 x86/ptrace: Prevent ptrace from clearing the FS/GS selector When a ptracer writes a ptracee's FS/GSBASE with a different value, the selector is also cleared. This behavior is not correct as the selector should be preserved. Update only the base value and leave the selector intact. To simplify the code further remove the conditional checking for the same value as this code is not performance critical. The only recognizable downside of this change is when the selector is already nonzero on write. The base will be reloaded according to the selector. But the case is highly unexpected in real usages. [ tglx: Massage changelog ] Suggested-by: Andy Lutomirski Signed-off-by: Chang S. Bae Signed-off-by: Thomas Gleixner Signed-off-by: Sasha Levin Signed-off-by: Thomas Gleixner Link: https://lkml.kernel.org/r/9040CFCD-74BD-4C17-9A01-B9B713CF6B10@intel.com Link: https://lkml.kernel.org/r/20200528201402.1708239-2-sashal@kernel.org commit 539afdf969d6ad7ded543d9abf14596aec411fe9 Author: Douglas Anderson Date: Tue Jun 16 03:40:46 2020 -0700 spi: spi-geni-qcom: No need for irqsave variant of spinlock calls The driver locks its locks in two places. In the first usage of the lock the function doing the locking already has a sleeping call and thus we know we can't be called from interrupt context. That means we can use the "spin_lock_irq" variant of the function. In the second usage of the lock the function is the interrupt handler and we know interrupt handlers are called with interrupts disabled. That means we can use the "spin_lock" variant of the function. This patch is expected to be a no-op and is just a cleanup / slight optimization. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200616034044.v3.1.Ic50cccdf27d42420a63485082f8b5bf86ed1a2b6@changeid Signed-off-by: Mark Brown commit 9ed84d24de480e81294e00814c142234bc17ce0c Author: Rikard Falkeborn Date: Thu Jun 18 00:32:47 2020 +0200 regulator: max8997: Constify struct regulator_ops These are not modified so make them const to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 13114 8596 0 21710 54ce drivers/regulator/max8997-regulator.o After: text data bss dec hex filename 14038 7672 0 21710 54ce drivers/regulator/max8997-regulator.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200617223247.25566-6-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit b08af72d6e5319e96527816c4b3b08d0b1a6f242 Author: Rikard Falkeborn Date: Thu Jun 18 00:32:46 2020 +0200 regulator: max8907: Constify static structs These are not modified so make them const to allow the compiler to put them in read-only memory. Before: text data bss dec hex filename 2753 7328 0 10081 2761 drivers/regulator/max8907-regulator.o After: text data bss dec hex filename 9405 684 0 10089 2769 drivers/regulator/max8907-regulator.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200617223247.25566-5-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit b37f076d4bfdd29b3aa497480b226759f659e25f Author: Rikard Falkeborn Date: Thu Jun 18 00:32:45 2020 +0200 regulator: ltc3676: Constify ltc3676_regulators ltc3676_regulators is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 4361 2064 8 6433 1921 drivers/regulator/ltc3676.o After: text data bss dec hex filename 6121 304 8 6433 1921 drivers/regulator/ltc3676.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200617223247.25566-4-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit bcf39c1eb1e059ec612bf06f4aa7b3972dcc85e8 Author: Rikard Falkeborn Date: Thu Jun 18 00:32:44 2020 +0200 regulator: cpcap: Constify cpcap_regulator_ops cpcap_regulator_ops is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 14472 236 0 14708 3974 drivers/regulator/cpcap-regulator.o After: text data bss dec hex filename 14604 104 0 14708 3974 drivers/regulator/cpcap-regulator.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200617223247.25566-3-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit cae62a937912bd4b3faf8e268cc0ffcf00ec5850 Author: Rikard Falkeborn Date: Thu Jun 18 00:32:43 2020 +0200 regulator: anatop: Constify anatop_core_rops anatop_core_rops is not modified and can therefore be made const which allows the compiler to put it in read-only memory. Before: text data bss dec hex filename 4502 412 0 4914 1332 drivers/regulator/anatop-regulator.o After: text data bss dec hex filename 4634 280 0 4914 1332 drivers/regulator/anatop-regulator.o Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20200617223247.25566-2-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 6a5ef3b224c63f500cc4a1b9a2cef8a9a3a328da Author: Lubomir Rintel Date: Tue Jun 16 23:21:27 2020 +0200 drm/etnaviv: Simplify clock enable/disable All the NULL checks are pointless, clk_*() routines already deal with NULL just fine. Signed-off-by: Lubomir Rintel Signed-off-by: Lucas Stach commit a59052d2749b678cb7c32ef25d3d47cc451d5f34 Author: Lubomir Rintel Date: Tue Jun 16 23:21:26 2020 +0200 drm/etnaviv: Make the "core" clock mandatory It is always present. It was documented as mandatory prior to commit 90aeca875f8a ("dt-bindings: display: Convert etnaviv to json-schema"). Signed-off-by: Lubomir Rintel Signed-off-by: Lucas Stach commit f76fc5ff9a6533d6eadb8521bf60bf7b1cf293b9 Author: Lubomir Rintel Date: Tue Jun 16 23:21:25 2020 +0200 drm/etnaviv: Don't ignore errors on getting clocks There might be good reasons why the getting a clock failed. To treat the clocks as optional we're specifically only interested in ignoring -ENOENT, and devm_clk_get_optional() does just that. Note that this preserves the original behavior of all clocks being optional. The binding document mandates the "bus" clock while the dove machine only specifies "core". Signed-off-by: Lubomir Rintel Signed-off-by: Lucas Stach commit f8794feaf65cdc97767604cf864775d20b97f397 Author: Lubomir Rintel Date: Tue Jun 16 23:21:24 2020 +0200 drm/etnaviv: Fix error path on failure to enable bus clk Since commit 65f037e8e908 ("drm/etnaviv: add support for slave interface clock") the reg clock is enabled before the bus clock and we need to undo its enablement on error. Fixes: 65f037e8e908 ("drm/etnaviv: add support for slave interface clock") Signed-off-by: Lubomir Rintel Signed-off-by: Lucas Stach commit 86824e60b0b17b68ba0e2c89e5124f9d53d0474f Author: John Hubbard Date: Mon May 25 16:49:46 2020 -0700 drm/etnaviv: convert get_user_pages() --> pin_user_pages() This code was using get_user_pages*(), in a "Case 2" scenario (DMA/RDMA), using the categorization from [1]. That means that it's time to convert the get_user_pages*() + put_page() calls to pin_user_pages*() + unpin_user_pages() calls. There is some helpful background in [2]: basically, this is a small part of fixing a long-standing disconnect between pinning pages, and file systems' use of those pages. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Signed-off-by: John Hubbard Signed-off-by: Lucas Stach commit 3499f9ad5d78375856f692ae86e9f5fc50a08993 Author: Ravulapati Vishnu vardhan rao Date: Thu Jun 18 12:56:10 2020 +0530 ASoC: amd: Removing unnecessary instance initialization In trigger we already get the selected instance details from runtime->private_data.So, removing the local initialization which may corrupt the instance selected details and this leads to corrupt data. Signed-off-by: Ravulapati Vishnu vardhan rao Link: https://lore.kernel.org/r/20200618072624.27047-1-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown commit c9e272f9e03d412073a3ae2c1814efbec10b6278 Author: Takashi Iwai Date: Thu Jun 18 13:08:42 2020 +0200 ALSA: hda: Let LED cdev handling suspend/resume Set LED_CORE_SUSPENDRESUME to LED cdev flags, so that the LED core would store and restore the LED status at suspend/resume. In theory, the codec driver should be responsible for all LED bits, but this might be safer and cover the overlooked cases. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-14-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5ba7821bcf7d82e35582fce8fe65cd160a6954b4 Author: Gustavo A. R. Silva Date: Wed Jun 17 16:17:34 2020 -0500 x86/mce/dev-mcelog: Use struct_size() helper in kzalloc() Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Borislav Petkov Acked-by: Tony Luck Link: https://lkml.kernel.org/r/20200617211734.GA9636@embeddedor commit 766538ac4af8c833990a563ed98a04a6ea5f6407 Author: Takashi Iwai Date: Thu Jun 18 13:08:41 2020 +0200 ALSA: hda/realtek: Unify LED helper code Both mute and mic-mute LED callbacks do almost similar tasks with just different bits. Factor out the common code and use them from the callbacks for simplification. This ended up with covering the forgotten stuff, too; e.g. VREF LED handling required the temporary power up/down that was missing for the mute LED, or some forgotten polarity checks are added. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-13-tiwai@suse.de Signed-off-by: Takashi Iwai commit d1d37c572cf0a10a3046e6df76f65486dc2a8ee8 Author: Takashi Iwai Date: Thu Jun 18 13:08:40 2020 +0200 ALSA: hda/sigmatel: Use the new vmaster mute LED helper Convert the mute LED handling in Sigmatel/IDT codec to the new vmaster mute helper. A point to be cautiously handled is that the value passed to the callback is inverted; the vmaster passes "enabled" (0 = mute), while LED classdev passes "brightness" (1 = mute). A positive side-effect by this change is that the driver gets also the enum controls for the mute behavior like other drivers already had. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit 929f718cb3901ad50f4bc9ddbca73b03345cca48 Author: Takashi Iwai Date: Thu Jun 18 13:08:39 2020 +0200 ALSA: hda/conexant: Use the new vmaster mute LED helper Convert the mute LED handling in Conexant codec to the new vmaster mute helper. A point to be cautiously handled is that the value passed to the callback is inverted; the vmaster passes "enabled" (0 = mute), while LED classdev passes "brightness" (1 = mute). Also the assignment of the default vmaster hook is moved at a later point after the mute hook is set up. This assures no nested hook. Finally, since we enable the mute-LED kcontrols always in the helper side, the extra vmaster_mute_enum flag set up is dropped. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8d3d1ece311837591341544e458b2dd9628fe6e0 Author: Takashi Iwai Date: Thu Jun 18 13:08:38 2020 +0200 ALSA: hda/realtek: Use the new vmaster mute LED helper Convert the mute LED handling in Realtek codec to the new vmaster mute helper. A point to be cautiously handled is that the value passed to the callback is inverted; the vmaster passes "enabled" (0 = mute), while LED classdev passes "brightness" (1 = mute). The code in Thinkpad helper is also converted. In that case, just call the new function and remove the open-code. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit 15509b6344726de22bdbfff88b65341dd0dd33af Author: Takashi Iwai Date: Thu Jun 18 13:08:37 2020 +0200 ALSA: hda: generic: Add vmaster mute LED helper Like mic-mute LED handling, add a new helper to deal with the master mute LED with LED classdev. Unlike the mic-mute case, the playback master mute is hooked on vmaster, and we suppose no nested hooks allowed there. The classdev creation code is factored out to a common function that is called from both mute and mic-mute LED helpers. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit fe1a162191a59cbfd3f917e92cdb2d5de996a8a0 Author: Takashi Iwai Date: Thu Jun 18 13:08:36 2020 +0200 ALSA: hda: generic: Drop the old mic-mute LED hook Now all users of the old snd_hda_gen_add_micmute_led() have been converted to the new LED-classdev variant, and we can make it local, and remove the unused hda_gen_spec.micmute_led.update callback field. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5fc0f6930035c5ef30f1a869e6450854618b29d7 Author: Takashi Iwai Date: Thu Jun 18 13:08:35 2020 +0200 ALSA: hda: generic: Drop unused snd_hda_gen_fixup_micmute_led() The fixup function is no longer used. Let's drop. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit 23a2b46966bde1e54a7b67e4968554905d71cad5 Author: Takashi Iwai Date: Thu Jun 18 13:08:34 2020 +0200 ALSA: hda/sigmatel: Convert to cdev-variant of mic-mute LED controls This patch converts the remaining user of snd_hda_gen_add_micmute_led() in IDT/Sigmatel codec driver into the new snd_hda_gen_add_micmute_led_cdev(). Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit e65a2caf3b05d616adf3bdd83e3581bbdced5d82 Author: Takashi Iwai Date: Thu Jun 18 13:08:33 2020 +0200 ALSA: hda/conexant: Convert to cdev-variant of mic-mute LED controls This patch converts the remaining user of snd_hda_gen_add_micmute_led() in Conexant codec driver into the new snd_hda_gen_add_micmute_led_cdev(). Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8a503555be4647bfa5312db4dd622a357492beb7 Author: Takashi Iwai Date: Thu Jun 18 13:08:32 2020 +0200 ALSA: hda/realtek: Convert to cdev-variant of mic-mute LED controls This patch converts the remaining user of snd_hda_gen_add_micmute_led() in Realtek codec driver into the new snd_hda_gen_add_micmute_led_cdev(). The Thinkpad helper code is updated accordingly, too. Also, the usage of snd_hda_gen_fixup_micmute_led() is replaced with either the local alc_fixup_micmute_led() or the explicit call of snd_hda_gen_add_micmute_led_cdev() with NULL callback. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 7cdf8c49b1df0a385db06c4f9a5ba1b16510fdcc Author: Takashi Iwai Date: Thu Jun 18 13:08:31 2020 +0200 ALSA: hda: generic: Add a helper for mic-mute LED with LED classdev A new helper, snd_hda_gen_add_micmute_led_cdev(), is introduced here for creating a LED classdev and setting up the hook to the capture control for controlling the mic-mute LED to follow the capture switch change. This will replace the existing users of snd_hda_gen_add_micmute_led() in later patches. Also, introduce a new kconfig CONFIG_SND_HDA_GENERIC_LEDS, to indicate the usage of mute / mic-mute LED helpers. It's selected by the codec drivers (Realtek, Conexant and Sigmatel), while it selects the necessary LED class dependencies. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit bf61c42a446f58eb61b7af05e9ff0b79aba348b6 Author: Takashi Iwai Date: Thu Jun 18 13:08:30 2020 +0200 ALSA: hda: generic: Always call led-trigger for mic mute LED Instead of adding a special hook to trigger the mic-mute LED device, call it always from the common callback function. It won't hurt even if no corresponding led cdev is present. This is basically a preliminary change for the later patches to convert the all mic-mute LED handling to LED class cdev. Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20200618110842.27238-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit c9a1ff316bc9b1d1806a4366d0aef6e18833ba52 Author: Brian Gerst Date: Wed Jun 17 18:56:24 2020 -0400 x86/stackprotector: Pre-initialize canary for secondary CPUs The idle tasks created for each secondary CPU already have a random stack canary generated by fork(). Copy the canary to the percpu variable before starting the secondary CPU which removes the need to call boot_init_stack_canary(). Signed-off-by: Brian Gerst Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200617225624.799335-1-brgerst@gmail.com commit 6c27219e34911601955b72c754adfc11c527ba7b Author: Neil Armstrong Date: Mon Jun 8 11:17:36 2020 +0200 mfd: Add support for the Khadas System control Microcontroller This Microcontroller is present on the Khadas VIM1, VIM2, VIM3 and Edge boards. It has multiple boot control features like password check, power-on options, power-off control and system FAN control on recent boards. This implements a very basic MFD driver with the fan control and User NVMEM cells. Signed-off-by: Neil Armstrong Signed-off-by: Lee Jones commit 6bcb330c1f373f314118f772c6e22f1cc36d7683 Author: Neil Armstrong Date: Mon Jun 8 11:17:35 2020 +0200 dt-bindings: mfd: Add Khadas Microcontroller bindings This Microcontroller is present on the Khadas VIM1, VIM2, VIM3 and Edge boards. It has multiple boot control features like password check, power-on options, power-off control and system FAN control on recent boards. Signed-off-by: Neil Armstrong Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit ad738ddd506b68679faf79277280b75522dd84e7 Author: Tim Harvey Date: Tue Jun 9 07:57:19 2020 -0700 dt-bindings: mfd: gateworks-gsc: Add 16bit pre-scaled voltage mode Add a 16-bit pre-scaled voltage mode to ADC and clarify that existing pre-scaled mode is 24bit. Signed-off-by: Tim Harvey Acked-by: Rob Herring Signed-off-by: Lee Jones commit b92735f45f99c9bdcf93ce822fab56231e64a904 Author: Charles Keepax Date: Mon Jun 15 14:53:23 2020 +0100 mfd: madera: Fix minor formatting issues The mfd_cell structures inconsistently use commas on single entries in the table, make this consistent by always using a comma. Also remove an extra blank line. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit 7f8a137f736f7366820c485c5a0d34d65b9d0125 Author: Charles Keepax Date: Mon Jun 15 14:53:22 2020 +0100 mfd: madera: Remove unused forward declaration of madera_codec_pdata This forward declaration is redundant since the header including the full data structure is included. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit ddff6c45b21d0437ce0c85f8ac35d7b5480513d7 Author: Charles Keepax Date: Mon Jun 15 14:53:21 2020 +0100 mfd: arizona: Ensure 32k clock is put on driver unbind and error Whilst it doesn't matter if the internal 32k clock register settings are cleaned up on exit, as the part will be turned off losing any settings, hence the driver hasn't historially bothered. The external clock should however be cleaned up, as it could cause clocks to be left on, and will at best generate a warning on unbind. Add clean up on both the probe error path and unbind for the 32k clock. Fixes: cdd8da8cc66b ("mfd: arizona: Add gating of external MCLKn clocks") Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit 14024cc9fe9478b9948521c0d38fde03ac00cd3d Author: Charles Keepax Date: Mon Jun 15 14:53:20 2020 +0100 mfd: arizona: Remove BUG_ON usage BUG_ON macros are generally frowned upon when the issue isn't super critical, the kernel can certainly carry on with the 32k clock on the CODEC in a bad state so change the BUG_ON to a WARN_ON. Signed-off-by: Charles Keepax Signed-off-by: Lee Jones commit 3ea2e4eab64cefa06055bb0541fcdedad4b48565 Author: Andy Shevchenko Date: Mon Jun 15 19:10:32 2020 +0300 mfd: intel-lpss: Add Intel Emmitsburg PCH PCI IDs Intel Emmitsburg PCH has the same LPSS than Intel Ice Lake. Add the new IDs to the list of supported devices. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 48b41c5e2de6c52c90efa99cfa122a5da7a7f0cd Author: Benjamin Gaignard Date: Wed Jun 3 14:54:38 2020 +0200 clocksource: Add Low Power STM32 timers driver Implement clock event driver using low power STM32 timers. Low power timer counters running even when CPUs are stopped. It could be used as clock event broadcaster to wake up CPUs but not like a clocksource because each it rise an interrupt the counter restart from 0. Low power timers have a 16 bits counter and a prescaler which allow to divide the clock per power of 2 to up 128 to target a 32KHz rate. Signed-off-by: Benjamin Gaignard Signed-off-by: Pascal Paillet Acked-by: Daniel Lezcano Signed-off-by: Lee Jones commit 45d93065c8ec4e671f4b1ff02b5b3a633658a92f Author: Benjamin Gaignard Date: Wed Jun 3 14:54:37 2020 +0200 mfd: stm32: Enable regmap fast_io for stm32-lptimer Because stm32-lptimer need to write in registers in interrupt context enable regmap fast_io to use a spin_lock to protect registers access rather than a mutex. Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones commit e0bcc58d876c6ece9720310509a908b7637e37cf Author: Benjamin Gaignard Date: Wed Jun 3 14:54:36 2020 +0200 mfd: stm32: Add defines to be used for clkevent purpose Add defines to be able to enable/clear irq and configure one shot mode. Signed-off-by: Benjamin Gaignard Signed-off-by: Lee Jones commit cb8ae6e188a2230a2515493918385dd054e14fa1 Author: Benjamin Gaignard Date: Wed Jun 3 14:54:34 2020 +0200 dt-bindings: mfd: Document STM32 low power timer bindings Add a subnode to STM low power timer bindings to support timer driver Signed-off-by: Benjamin Gaignard Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 46605a271114f1243c807a55c607271c81e662d2 Author: Marcel Holtmann Date: Wed Jun 17 16:39:20 2020 +0200 Bluetooth: mgmt: Use command complete on success for set system config The command status reply is only for failure. When completing set system config command, the reply has to be command complete. Signed-off-by: Marcel Holtmann Reviewed-by: Alain Michaud Signed-off-by: Johan Hedberg commit 76b139965575e51224d33ea721d9d00a542b6b39 Author: Manish Mandlik Date: Wed Jun 17 16:39:19 2020 +0200 Bluetooth: Terminate the link if pairing is cancelled If user decides to cancel the ongoing pairing process (e.g. by clicking the cancel button on pairing/passkey window), abort any ongoing pairing and then terminate the link if it was created because of the pair device action. Signed-off-by: Manish Mandlik Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 8208f5a9d435e58ee7f53a24d9ccbe7787944537 Author: Miao-chen Chou Date: Wed Jun 17 16:39:18 2020 +0200 Bluetooth: Update background scan and report device based on advertisement monitors This calls hci_update_background_scan() when there is any update on the advertisement monitors. If there is at least one advertisement monitor, the filtering policy of scan parameters should be 0x00. This also reports device found mgmt events if there is at least one monitor. The following cases were tested with btmgmt advmon-* commands. (1) add a ADV monitor and observe that the passive scanning is triggered. (2) remove the last ADV monitor and observe that the passive scanning is terminated. (3) with a LE peripheral paired, repeat (1) and observe the passive scanning continues. (4) with a LE peripheral paired, repeat (2) and observe the passive scanning continues. (5) with a ADV monitor, suspend/resume the host and observe the passive scanning continues. Signed-off-by: Miao-chen Chou Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit cdde92e230719f77ac3a5f936e25ed4e01ec057f Author: Miao-chen Chou Date: Wed Jun 17 16:39:17 2020 +0200 Bluetooth: Notify adv monitor removed event This notifies management sockets on MGMT_EV_ADV_MONITOR_REMOVED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-remove command on one console and observe a MGMT_EV_ADV_MONITOR_REMOVED event on the other. Signed-off-by: Miao-chen Chou Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit b52729f27b1e3957bef7306d47abf9cd855524e7 Author: Miao-chen Chou Date: Wed Jun 17 16:39:16 2020 +0200 Bluetooth: Notify adv monitor added event This notifies management sockets on MGMT_EV_ADV_MONITOR_ADDED event. The following test was performed. - Start two btmgmt consoles, issue a btmgmt advmon-add command on one console and observe a MGMT_EV_ADV_MONITOR_ADDED event on the other Signed-off-by: Miao-chen Chou Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit bd2fbc6cb815b5171facb42526f6db206d920e13 Author: Miao-chen Chou Date: Wed Jun 17 16:39:15 2020 +0200 Bluetooth: Add handler of MGMT_OP_REMOVE_ADV_MONITOR This adds the request handler of MGMT_OP_REMOVE_ADV_MONITOR command. Note that the controller-based monitoring is not yet in place. This removes the internal monitor(s) without sending HCI traffic, so the request returns immediately. The following test was performed. - Issue btmgmt advmon-remove with valid and invalid handles. Signed-off-by: Miao-chen Chou Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit b139553db5cd940d66095fb97de1727e9a19369f Author: Miao-chen Chou Date: Wed Jun 17 16:39:14 2020 +0200 Bluetooth: Add handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR This adds the request handler of MGMT_OP_ADD_ADV_PATTERNS_MONITOR command. Note that the controller-based monitoring is not yet in place. This tracks the content of the monitor without sending HCI traffic, so the request returns immediately. The following manual test was performed. - Issue btmgmt advmon-add with valid and invalid inputs. - Issue btmgmt advmon-add more the allowed number of monitors. Signed-off-by: Miao-chen Chou Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit e5e1e7fd470ccf2eb38ab7fb5a3ab0fc4792fe53 Author: Miao-chen Chou Date: Wed Jun 17 16:39:13 2020 +0200 Bluetooth: Add handler of MGMT_OP_READ_ADV_MONITOR_FEATURES This adds the request handler of MGMT_OP_READ_ADV_MONITOR_FEATURES command. Since the controller-based monitoring is not yet in place, this report only the supported features but not the enabled features. The following test was performed. - Issuing btmgmt advmon-features. Signed-off-by: Miao-chen Chou Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 7fceb17c6b480e0f2bd0e566a8231039fb8a809e Author: Miao-chen Chou Date: Wed Jun 17 16:39:12 2020 +0200 Bluetooth: Add definitions for advertisement monitor features This adds support for Advertisement Monitor API. Here are the commands and events added. - Read Advertisement Monitor Feature command - Add Advertisement Pattern Monitor command - Remove Advertisement Monitor command - Advertisement Monitor Added event - Advertisement Monitor Removed event Signed-off-by: Miao-chen Chou Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 4c54bf2b093bb2ae95e756342646d868e8101cb4 Author: Abhishek Pandit-Subedi Date: Wed Jun 17 16:39:11 2020 +0200 Bluetooth: Add get/set device flags mgmt op Add the get device flags and set device flags mgmt ops and the device flags changed event. Their behavior is described in detail in mgmt-api.txt in bluez. Sample btmon trace when a HID device is added (trimmed to 75 chars): @ MGMT Command: Unknown (0x0050) plen 11 {0x0001} [hci0] 18:06:14.98 90 c5 13 cd f3 cd 02 01 00 00 00 ........... @ MGMT Event: Unknown (0x002a) plen 15 {0x0004} [hci0] 18:06:14.98 90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00 ............... @ MGMT Event: Unknown (0x002a) plen 15 {0x0003} [hci0] 18:06:14.98 90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00 ............... @ MGMT Event: Unknown (0x002a) plen 15 {0x0002} [hci0] 18:06:14.98 90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00 ............... @ MGMT Event: Command Compl.. (0x0001) plen 10 {0x0001} [hci0] 18:06:14.98 Unknown (0x0050) plen 7 Status: Success (0x00) 90 c5 13 cd f3 cd 02 ....... @ MGMT Command: Add Device (0x0033) plen 8 {0x0001} [hci0] 18:06:14.98 LE Address: CD:F3:CD:13:C5:90 (Static) Action: Auto-connect remote device (0x02) @ MGMT Event: Device Added (0x001a) plen 8 {0x0004} [hci0] 18:06:14.98 LE Address: CD:F3:CD:13:C5:90 (Static) Action: Auto-connect remote device (0x02) @ MGMT Event: Device Added (0x001a) plen 8 {0x0003} [hci0] 18:06:14.98 LE Address: CD:F3:CD:13:C5:90 (Static) Action: Auto-connect remote device (0x02) @ MGMT Event: Device Added (0x001a) plen 8 {0x0002} [hci0] 18:06:14.98 LE Address: CD:F3:CD:13:C5:90 (Static) Action: Auto-connect remote device (0x02) @ MGMT Event: Unknown (0x002a) plen 15 {0x0004} [hci0] 18:06:14.98 90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00 ............... @ MGMT Event: Unknown (0x002a) plen 15 {0x0003} [hci0] 18:06:14.98 90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00 ............... @ MGMT Event: Unknown (0x002a) plen 15 {0x0002} [hci0] 18:06:14.98 90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00 ............... @ MGMT Event: Unknown (0x002a) plen 15 {0x0001} [hci0] 18:06:14.98 90 c5 13 cd f3 cd 02 01 00 00 00 01 00 00 00 ............... Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit a1fc7535ec34a5904abe93dd42a6ed7e31c36717 Author: Abhishek Pandit-Subedi Date: Wed Jun 17 16:39:10 2020 +0200 Bluetooth: Replace wakeable in hci_conn_params Replace the wakeable boolean with flags in hci_conn_params and all users of this boolean. This will be used by the get/set device flags mgmt op. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 7a92906f841db46a91df0179459ad8b2052f2e54 Author: Abhishek Pandit-Subedi Date: Wed Jun 17 16:39:09 2020 +0200 Bluetooth: Replace wakeable list with flag Since the classic device list now supports flags, convert the wakeable list into a flag on the existing device list. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit 8baaa4038edbff67f318574e233e9e7e43808230 Author: Abhishek Pandit-Subedi Date: Wed Jun 17 16:39:08 2020 +0200 Bluetooth: Add bdaddr_list_with_flags for classic whitelist In order to more easily add device flags to classic devices, create a new type of bdaddr_list that supports setting flags. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann Signed-off-by: Johan Hedberg commit aececa645dc79ec004bfed3357c15cbf4b9b5746 Author: Marcel Holtmann Date: Wed Jun 17 16:39:07 2020 +0200 Bluetooth: mgmt: Add commands for runtime configuration This adds the required read/set commands for runtime configuration. Even while currently no parameters are specified, the commands are made available. Signed-off-by: Marcel Holtmann Reviewed-by: Alain Michaud Signed-off-by: Johan Hedberg commit c8fa5b7c7a7e54ec64edc3904ee794b5ccf12b8b Author: Douglas Anderson Date: Fri Jun 12 12:30:50 2020 -0700 drm/bridge: ti-sn65dsi86: Check the regmap return value when setting a GPIO The ti_sn_bridge_gpio_set() got the return value of regmap_update_bits() but didn't check it. The function can't return an error value, but we should at least print a warning if it didn't work. This fixes a compiler warning about setting "ret" but not using it. Fixes: 27ed2b3f22ed ("drm/bridge: ti-sn65dsi86: Export bridge GPIOs to Linux") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200612123003.v2.4.Ia4376fd88cdc6e8f8b43c65548458305f82f1d61@changeid commit c42fb724cdf608ef7234da7281d66de2eb102a73 Author: Douglas Anderson Date: Fri Jun 12 12:30:49 2020 -0700 drm/bridge: ti-sn65dsi86: Fix kernel-doc typo ln_polr => ln_polrs This fixes a kernel doc warning due to a typo: warning: Function parameter or member 'ln_polrs' not described in 'ti_sn_bridge' Fixes: 5bebaeadb30e ("drm/bridge: ti-sn65dsi86: Implement lane reordering + polarity") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200612123003.v2.3.Ib616e311c48cc64b2cef11bd54d4a9cedc874bb1@changeid commit f4946b0a37156a5390444558700eeac1d671fdcb Author: Douglas Anderson Date: Fri Jun 12 12:30:48 2020 -0700 drm/bridge: ti-sn65dsi86: Don't use kernel-doc comment for local array When building we were getting an error: warning: cannot understand function prototype: 'const unsigned int ti_sn_bridge_dp_rate_lut[] = ' Arrays aren't supposed to be marked with "/**" kerneldoc comments. Fix. Fixes: a095f15c00e2 ("drm/bridge: add support for sn65dsi86 bridge driver") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200612123003.v2.2.If3807e4ebf7f0440f64c3069edcfac9a70171940@changeid commit 9e4f358313920d26bf7085002f23bb0f0ac8cf89 Author: Douglas Anderson Date: Fri Jun 12 12:30:47 2020 -0700 drm/bridge: ti-sn65dsi86: Don't compile GPIO bits if not CONFIG_OF_GPIO The kernel test robot noted that if "OF" is defined (which is needed to select DRM_TI_SN65DSI86 at all) but not OF_GPIO that we'd get compile failures because some of the members that we access in "struct gpio_chip" are only defined "#if defined(CONFIG_OF_GPIO)". All the GPIO bits in the driver are all nicely separated out. We'll guard them with the same "#if defined" that the header has and add a little stub function if OF_GPIO is not defined. Fixes: 27ed2b3f22ed ("drm/bridge: ti-sn65dsi86: Export bridge GPIOs to Linux") Reported-by: kernel test robot Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200612123003.v2.1.Ibe95d8f3daef01e5c57d4c8c398f04d6a839492c@changeid commit e63adeccc0bbba34a7b988b8898bebbd5bbb6461 Author: Krzysztof Kozlowski Date: Wed May 27 22:05:44 2020 +0200 drm/panfrost: Reduce the amount of logs on deferred probe There is no point to print deferred probe (and its failures to get resources) as an error. Also there is no need to print regulator errors twice. In case of multiple probe tries this would pollute the dmesg. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20200527200544.7849-1-krzk@kernel.org commit e9ec6cc74e0add3d4f27348fc93ba9d0a705d75e Author: Changming Liu Date: Fri May 29 21:48:15 2020 -0400 USB: sisusbvga: change char to u8 for sisusb_copy_memory sisusb_copy_memory is called in several places. sisusb_copy_memory calls sisusb_write_mem_bulk which is called by sisusb_write and sisusb_send_bulk_msg. change the related parameters from char to u8 accordingly Signed-off-by: Changming Liu Link: https://lore.kernel.org/r/20200530014820.9967-2-liu.changm@northeastern.edu Signed-off-by: Greg Kroah-Hartman commit 810b7ee3008ab2ac94791f75857815484c2f9cce Author: Chris Wilson Date: Wed Jun 17 14:09:16 2020 +0100 drm/i915/gt: Always report the sample time for busy-stats Return the monotonic timestamp (ktime_get()) at the time of sampling the busy-time. This is used in preference to taking ktime_get() separately before or after the read seqlock as there can be some large variance in reported timestamps. For selftests trying to ascertain that we are reporting accurate to within a few microseconds, even a small delay leads to the test failing. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200617130916.15261-2-chris@chris-wilson.co.uk commit 1b90e4a43b7444fc4159c6dd338a44e8808e8718 Author: Chris Wilson Date: Wed Jun 17 14:09:15 2020 +0100 drm/i915/selftests: Enable selftesting of busy-stats A couple of very simple tests to ensure that the basic properties of per-engine busyness accounting [0% and 100% busy] are faithful. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200617130916.15261-1-chris@chris-wilson.co.uk commit 41ecdcfce1772b7781059ebbeaed883206ab9479 Author: Thierry Reding Date: Fri Jun 12 16:02:05 2020 +0200 usb: xhci: tegra: Remove PLL power supplies The Tegra XUSB controller driver doesn't need to control the PLL power supplies directly, but rather uses the pads provided by the XUSB pad controller, which in turn is responsible for supplying power to the PLLs. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20200612140205.2342900-1-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman commit 153de2d66e53b1729a7761b926ca0b89392b3127 Author: Gustavo A. R. Silva Date: Mon Jun 15 18:18:27 2020 -0500 usb: sisusb_con: Use array_size() helper in memcpy() Use array_size() helper instead of the open-coded version in memcpy(). These sorts of multiplication factors need to be wrapped in array_size(). This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200615231827.GA21348@embeddedor Signed-off-by: Greg Kroah-Hartman commit 9ffcc3053f3b6950da6e8b98ab2733d7eee70800 Author: Macpaul Lin Date: Tue Jun 16 13:56:17 2020 +0800 usb: gadget: u_serial.h: increase MAX_U_SERIAL_PORTS to 8 Mediatek's LTE modem needs up to 8 ports to connect to PC for logging and debugging under some scenarios. Hence we suggest to increase the definition of MAX_U_SERIAL_PORTS to 8 for some complex embedded systems. Signed-off-by: Macpaul Lin Link: https://lore.kernel.org/r/1592286977-30483-1-git-send-email-macpaul.lin@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 07d9878fa18f5283182f4c13e708e22c11016efe Author: Jisheng Zhang Date: Tue Jun 16 16:26:17 2020 +0800 usb: dwc2: use well defined macros for power_down Use the well defined macros such as DWC2_POWER_DOWN_PARAM_NONE, DWC2_POWER_DOWN_PARAM_PARTIAL and DWC2_POWER_DOWN_PARAM_HIBERNATION to make code more readable. Signed-off-by: Jisheng Zhang Acked-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20200616162617.38365cc8@xhacker.debian Signed-off-by: Greg Kroah-Hartman commit 9f3aedbe98fe5afaf68b74cc1b242eca77fe3119 Author: Kieran Bingham Date: Tue Jun 9 13:46:00 2020 +0100 drivers: usb: Fix trivial spelling The word 'descriptor' is misspelled throughout the tree. Fix it up accordingly: decriptors -> descriptors Signed-off-by: Kieran Bingham Link: https://lore.kernel.org/r/20200609124610.3445662-8-kieran.bingham+renesas@ideasonboard.com Signed-off-by: Greg Kroah-Hartman commit 03cc8353c2244c8b790c3c81a0f1532d34a9d738 Author: Rob Gill Date: Mon Jun 1 21:17:56 2020 +0000 USB: core: additional Device Classes to debug/usb/devices Several newer USB Device classes are not presently reported individually at /sys/kernel/debug/usb/devices, (reported as "unk."). This patch adds the following classes: 0fh (Personal Healthcare devices), 10h (USB Type-C combined Audio/Video devices) 11h (USB billboard), 12h (USB Type-C Bridge). As defined at [https://www.usb.org/defined-class-codes] Corresponding classes defined in include/linux/usb/ch9.h. Signed-off-by: Rob Gill Link: https://lore.kernel.org/r/20200601211749.6878-1-rrobgill@protonmail.com Signed-off-by: Greg Kroah-Hartman commit 9bea6eb3f59cb2fad8b46d91c666a17d0aa53456 Author: Ivan Safonov Date: Sun May 31 14:05:47 2020 +0300 staging:rtl8712: avoid skb_clone after skb allocation fail The skb allocated when out of memory is likely to be discarded during subsequent processing. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20200531110548.9318-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9e43eed45a48042573a5f3f27ccc15f8f9bb42e0 Author: Gustavo A. R. Silva Date: Tue Jun 16 12:55:43 2020 -0500 staging: rts5208: Use array_size() helper in vmalloc() and memset() The vmalloc() function has no 2-factor argument form, so multiplication factors need to be wrapped in array_size(). Also, while there, use array_size() in memset(). This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200616175543.GA28687@embeddedor Signed-off-by: Greg Kroah-Hartman commit 21b1f2b3fb2e24cdfe8430acc8c8d2dc10f40225 Author: Ivan Safonov Date: Sun May 31 21:17:52 2020 +0300 staging:r8723bs: remove wrappers around skb_clone() and remove unnecessary in_interrupt() call Wrappers around skb_clone() do not simplify the driver code. The skb_clone() is always called from an interrupt handler, so use GFP_ATOMIC allocation only. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20200531181751.41830-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit aeb4ac7916ce6120e764303b50917c7a2b8b0eba Author: Souptick Joarder Date: Wed Jun 3 00:24:17 2020 +0530 staging: vc04_services: Convert get_user_pages*() --> pin_user_pages*() In 2019, we introduced pin_user_pages*() and now we are converting get_user_pages*() to the new API as appropriate. [1] & [2] could be referred for more information. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Cc: John Hubbard Link: https://lore.kernel.org/r/1591124057-27696-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit c5a3b1db6af24b9c9a3ea0b027a1d71c171b545d Author: Jil Rouceau Date: Mon Jun 1 12:44:16 2020 +0200 staging: qlge: qlge_main.c: fixed spaces coding style issues Fixed the missing spaces before and after binary operators. Signed-off-by: Jil Rouceau Link: https://lore.kernel.org/r/20200601104416.102566-1-jilrouceau@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6655a352aca139778f507d50440b4ddcfe90555c Author: Garrit Franke Date: Mon Jun 15 15:55:41 2020 +0200 staging: comedi: fix up missing whitespace in comment I noticed this missing whitespace in a comment inside ni_mio_common.c Signed-off-by: Garrit Franke Link: https://lore.kernel.org/r/20200615135541.46986-1-garritfranke@gmail.com Signed-off-by: Greg Kroah-Hartman commit 76cd0c7cc20f3ca71f1be38bfc0c9d3c0807e7ca Author: Divyansh Kamboj Date: Fri Jun 5 08:51:40 2020 +0530 Staging: comedi: Added blank lines to fix coding style issue Fixed a coding style issue by adding a blank line after declarations Signed-off-by: Divyansh Kamboj Link: https://lore.kernel.org/r/20200605032140.31287-1-kambojdivyansh2000@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5631feed3932b062bd8a576c8deff666ccf1fb74 Author: Souptick Joarder Date: Wed Jun 17 08:15:30 2020 +0530 staging: gasket: Convert get_user_pages*() --> pin_user_pages*() In 2019, we introduced pin_user_pages*() and now we are converting get_user_pages*() to the new API as appropriate. [1] & [2] could be referred for more information. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Signed-off-by: Souptick Joarder Acked-by: Dan Carpenter Cc: John Hubbard Cc: Dan Carpenter Link: https://lore.kernel.org/r/1592361930-3813-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit a05b1c150f5bc0f83313a5e14b94725b5eda5f29 Author: Herbert Xu Date: Fri Jun 12 21:16:22 2020 +1000 crypto: octeontx - Fix sparse warnings This patch fixes all the sparse warnings in the octeontx driver. Some of these are just trivial type changes. However, some of the changes are non-trivial on little-endian hosts. Obviously the driver appears to be broken on either LE or BE as it was doing different things. I've taken the BE behaviour as the correct one. Reported-by: kernel test robot Signed-off-by: Herbert Xu commit 864c2d57d691b5308dbb8beca73f8ccb9e183409 Author: Herbert Xu Date: Fri Jun 12 16:00:23 2020 +1000 crypto: caam - Fix argument type in handle_imx6_err005766 The function handle_imx6_err005766 needs to take an __iomem argument as otherwise sparse will generate two warnings. Fixes: 33d69455e402 ("crypto: caam - limit AXI pipeline to a...") Signed-off-by: Herbert Xu Reviewed-by: Iuliana Prodan Signed-off-by: Herbert Xu commit a79d471c6510db6a69fc2c0f474dbe688bea7641 Author: Wojciech Ziemba Date: Thu Jun 11 22:14:49 2020 +0100 crypto: qat - update timeout logic in put admin msg Replace timeout logic in adf_put_admin_msg_sync() with existing macro readl_poll_timeout(). Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit e4e245ad031f82795a2512cb6d3167c824c6fe81 Author: Wojciech Ziemba Date: Thu Jun 11 22:14:48 2020 +0100 crypto: qat - send admin messages to set of AEs Update the logic that sends admin messages to be able to target a subset of Acceleration Engines (AEs) in the device. In future not all admin messages need to be sent to all the AEs. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 624e62ccb20b011cb5b23c53b3f400c3389ce60d Author: Wojciech Ziemba Date: Thu Jun 11 22:14:47 2020 +0100 crypto: qat - update fw init admin msg This patch tidies up the definition of init/admin request and response messages by removing the icp_qat_fw_init_admin_resp_pars structure and embedding it into icp_qat_fw_init_admin_resp. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit c31b4adee161caa7424febee222d99984008bfa2 Author: Colin Ian King Date: Thu Jun 11 16:39:34 2020 +0100 crypto: caam/qi2 - remove redundant assignment to ret The variable ret is being assigned a value that is never read, the error exit path via label 'unmap' returns -ENOMEM anyhow, so assigning ret with -ENOMEM is redundamt. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit 29195232fa2f722449c1c6850277b4ca9fa5f781 Author: Eric Biggers Date: Tue Jun 9 23:39:43 2020 -0700 crc-t10dif: clean up some more things - Correctly compare the algorithm name in crc_t10dif_notify(). - Use proper NOTIFY_* status codes instead of 0. - Consistently use CRC_T10DIF_STRING instead of "crct10dif" directly. - Use a proper type for the shash_desc context. - Use crypto_shash_driver_name() instead of open-coding it. - Make crc_t10dif_transform_show() use snprintf() rather than sprintf(). This isn't actually necessary since the buffer has size PAGE_SIZE and CRYPTO_MAX_ALG_NAME < PAGE_SIZE, but it's good practice. - Give the "transform" sysfs file mode 0444 rather than 0644, since it doesn't implement a setter method. - Adjust the module description to not be the same as crct10dif-generic. Cc: Martin K. Petersen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit be924e0aaa315a179c25221685e3f1a35a70156e Author: Eric Biggers Date: Tue Jun 9 23:39:42 2020 -0700 crc-t10dif: use fallback in initial state Currently the crc-t10dif module starts out with the fallback disabled and crct10dif_tfm == NULL. crc_t10dif_mod_init() tries to allocate crct10dif_tfm, and if it fails it enables the fallback. This is backwards because it means that any call to crc_t10dif() prior to module_init (which could theoretically happen from built-in code) will crash rather than use the fallback as expected. Also, it means that if the initial tfm allocation fails, then the fallback stays permanently enabled even if a crct10dif implementation is loaded later. Change it to use the more logical solution of starting with the fallback enabled, and disabling the fallback when a tfm gets allocated for the first time. This change also ends up simplifying the code. Also take the opportunity to convert the code to use the new static_key API, which is much less confusing than the old and deprecated one. Cc: Martin K. Petersen Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 57b1aac1b426b7255afa195298ed691ffea204c6 Author: Longfang Liu Date: Mon Jun 8 22:01:11 2020 +0800 crypto: hisilicon - update SEC driver module parameter As stress-ng running SEC engine on the Ubuntu OS, we found that SEC only supports two threads each with one TFM based on the default module parameter 'ctx_q_num'. If running more threads, stress-ng will fail since it cannot get more TFMs. In order to fix this, we adjusted the default values of the module parameters to support more TFMs. Signed-off-by: Longfang Liu Signed-off-by: Zaibo Xu Signed-off-by: Herbert Xu commit 3906f640224dbe7714b52b66d7d68c0812808e19 Author: Herbert Xu Date: Fri Jun 5 16:59:18 2020 +1000 crc-t10dif: Fix potential crypto notify dead-lock The crypto notify call occurs with a read mutex held so you must not do any substantial work directly. In particular, you cannot call crypto_alloc_* as they may trigger further notifications which may dead-lock in the presence of another writer. This patch fixes this by postponing the work into a work queue and taking the same lock in the module init function. While we're at it this patch also ensures that all RCU accesses are marked appropriately (tested with sparse). Finally this also reveals a race condition in module param show function as it may be called prior to the module init function. It's fixed by testing whether crct10dif_tfm is NULL (this is true iff the init function has not completed assuming fallback is false). Fixes: 11dcb1037f40 ("crc-t10dif: Allow current transform to be...") Fixes: b76377543b73 ("crc-t10dif: Pick better transform if one...") Signed-off-by: Herbert Xu Reviewed-by: Martin K. Petersen Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 07b048f41ac1222a781573ac1c18592401e4a2a3 Author: Giovanni Cabiddu Date: Wed Jun 3 18:33:46 2020 +0100 crypto: qat - remove packed attribute in etr structs Remove packed attribute in adf_etr_bank_data and adf_etr_ring_data. Fields in these structures are reordered in order to avoid holes. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 59c14e5e0174a420628356ef6ef07c414c62fdd7 Author: Wojciech Ziemba Date: Wed Jun 3 18:33:45 2020 +0100 crypto: qat - replace user types with kernel ABI __u types Kernel source code should not contain stdint.h types. This patch replaces uintXX_t types with kernel space ABI types. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 2bfd22766d004102e84c0d40793e1c73d73d11a5 Author: Wojciech Ziemba Date: Wed Jun 3 18:33:44 2020 +0100 crypto: qat - replace user types with kernel u types Kernel source code should not include stdint.h types. This patch replaces uintXX_t types with respective ones defined in kernel headers. Signed-off-by: Wojciech Ziemba Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 060ce5037d5fe22fcb2102f4c3a3b942c9edbc9d Author: Andrei Botila Date: Wed Jun 3 11:47:04 2020 +0300 crypto: caam/qi2 - add support for dpseci_reset() Add support for dpseci_reset() command for DPSECI objects. For DPSECI DPAA2 objects with version lower than v5.4 reset command was broken in MC f/w. Signed-off-by: Andrei Botila Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 7f94adf218d8810abe4d46ef97b17070ab6dff61 Author: Dan Carpenter Date: Tue Jun 2 16:54:09 2020 +0300 crypto: hisilicon - allow smaller reads in debugfs Originally this code rejected any read less than 256 bytes. There is no need for this artificial limit. We should just use the normal helper functions to read a string from the kernel. Signed-off-by: Dan Carpenter Signed-off-by: Herbert Xu commit 58e5b0157e58fc0e04a7fc806fed53893ddcc28b Author: Andrey Smirnov Date: Mon Jun 1 16:07:26 2020 -0700 crypto: caam - add clock info for VFxxx SoCs Add a small bit of plumbing necessary to use CAAM on VFxxx SoCs. Signed-off-by: Andrey Smirnov Cc: Chris Healy Cc: Fabio Estevam Cc: linux-imx@nxp.com Cc: linux-kernel@vger.kernel.org Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 0289e9be5dc26d84dda6fc5492f08ca1ff599744 Author: Olivier Sobrie Date: Mon Jun 1 16:27:40 2020 +0200 hwrng: ba431 - add support for BA431 hwrng Silex insight BA431 is an IP designed to generate random numbers that can be integrated in various FPGA. This driver adds support for it through the hwrng interface. This driver is used in Silex Insight Viper OEM boards. Signed-off-by: Olivier Sobrie Signed-off-by: Waleed Ziad Acked-by: Arnd Bergmann Signed-off-by: Herbert Xu commit 50f362b2d9c4c5cd49feffe49fd833a629f59c38 Author: Olivier Sobrie Date: Mon Jun 1 16:27:39 2020 +0200 dt-bindings: rng: document Silex Insight BA431 hwrng This patch documents the device tree bindings of the BA431 hardware random number generator. This IP is for instance present in the Viper OEM boards sold by Silex Insight. Signed-off-by: Olivier Sobrie Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit f3c802a1f30013f8f723b62d7fa49eb9e991da23 Author: Herbert Xu Date: Sat May 30 00:23:49 2020 +1000 crypto: algif_aead - Only wake up when ctx->more is zero AEAD does not support partial requests so we must not wake up while ctx->more is set. In order to distinguish between the case of no data sent yet and a zero-length request, a new init flag has been added to ctx. SKCIPHER has also been modified to ensure that at least a block of data is available if there is more data to come. Fixes: 2d97591ef43d ("crypto: af_alg - consolidation of...") Signed-off-by: Herbert Xu commit 1532e31f5098a220c920303213017b11df777c0b Author: Giovanni Cabiddu Date: Wed May 27 16:21:28 2020 +0100 crypto: qat - convert to SPDX License Identifiers Replace License Headers with SPDX License Identifiers. Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit ac4af2b12bbebd5d088726443e2cccac54e29c4f Author: Peng Fan Date: Wed May 20 10:02:46 2020 +0800 arm64: dts: imx8mp: add i2c aliases The devices could be enumerated properly with aliases. Signed-off-by: Peng Fan Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit 83ae2848520a91fcb9933e1dbb4d1333f44ee473 Author: Peng Fan Date: Wed May 20 10:02:45 2020 +0800 arm64: dts: imx8mm: sort the aliases Sort the aliases alphabetically. Signed-off-by: Peng Fan Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit 614d88460f28cc0e73268ab89c770a909d7004a5 Author: Peng Fan Date: Wed May 20 10:02:44 2020 +0800 arm64: dts: imx8mq: Add ethernet alias Add ethernet alias, so bootloader code can use this to find the primary ethernet device, and set the MAC address. Signed-off-by: Peng Fan Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit e9a8d99639c9eda1f95f6d48b9dc0c24e8d29360 Author: Peng Fan Date: Wed May 20 10:02:43 2020 +0800 arm64: dts: imx8mq: Add mmc aliases Add mmc aliases for kernel usage Signed-off-by: Peng Fan Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit bb278b149df9baceac8deea0f95d73c47b3effa8 Author: Saravana Kannan Date: Tue Jun 9 18:19:34 2020 -0700 of: property: Improve cycle detection when one of the devices is never added Consider this example where -> means LHS device is a consumer of RHS device and indentation represents "child of" of the previous device. Device A -> Device C Device B -> Device A Device C Without this commit: 1. Device A is added. 2. Device A is added to waiting for supplier list (Device C) 3. Device B is added 4. Device B is linked as a consumer to Device A 5. Device A doesn't probe because it's waiting for Device C to be added. 6. Device B doesn't probe because Device A hasn't probed. 7. Device C will never be added because it's parent hasn't probed. So, Device A, B and C will be in a probe/add deadlock. This commit detects this scenario and stops trying to create a device link between Device A and Device C since doing so would create the following cycle: Device A -> Devic C -(parent)-> Device B -> Device A. With this commit: 1. Device A is added. 3. Device B is added 4. Device B is linked as a consumer to Device A 5. Device A probes. 6. Device B probes because Device A has probed. 7. Device C is added and probed. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20200610011934.49795-3-saravanak@google.com Signed-off-by: Rob Herring commit 7d34ca3854845398cb36866d14bbdc43dcec1ad0 Author: Saravana Kannan Date: Tue Jun 9 18:19:33 2020 -0700 driver core: Add device_is_dependent() to linux/device.h DT implementation of fw_devlink needs this function to detect cycles. So make it available. Signed-off-by: Saravana Kannan Tested-by: John Stultz Signed-off-by: Rob Herring commit 3dd1499666f64817173c6390ed4d387471d07df8 Author: Gustavo A. R. Silva Date: Mon Jun 15 18:01:07 2020 -0500 ethtool: ioctl: Use array_size() in copy_to_user() Use array_size() helper instead of the open-coded version in copy_to_user(). These sorts of multiplication factors need to be wrapped in array_size(). This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 682591f7a6fae0cba255af889fae3d6e211d4d25 Author: Gustavo A. R. Silva Date: Mon Jun 15 16:18:55 2020 -0500 liquidio: Replace vmalloc_node + memset with vzalloc_node and use array_size Use vzalloc/vzalloc_node instead of the vmalloc/vzalloc_node and memset. Also, notice that vzalloc_node() function has no 2-factor argument form to calculate the size for the allocation, so multiplication factors need to be wrapped in array_size(). This issue was found with the help of Coccinelle and, audited and fixed manually. Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 008e6fad765e684dc5c828693b7d8014524ec08b Author: Codrin Ciubotariu Date: Mon Jun 15 12:55:24 2020 +0300 ARM: dts: at91: sam9x60ek: classd: pull-down the L1 and L3 lines The L1 and L3 lines drive NMOS transistors that are OFF with a low level. On the SAM9X60 EK board, if the pins corresponding to L1 and L3 have pull-ups enabled, there is an extra 2 x 30uA power consumption. Use pull-downs for these 2 lines to remove the unnecessary power consumption. Fixes: 1e5f532c2737 ("ARM: dts: at91: sam9x60: add device tree for soc and board") Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200615095525.43414-2-codrin.ciubotariu@microchip.com commit 07e324d4dfef7b9df22c950055636b9d0b890af4 Author: Codrin Ciubotariu Date: Mon Jun 15 12:55:23 2020 +0300 ARM: dts: at91: sama5d2_xplained: classd: pull-down the R1 and R3 lines The R1 and R3 lines drive NMOS transistors that are OFF with a low level. On the SAMA5D2 Xplained board, if the pins corresponding to R1 and R3 have pull-ups enabled, there is an extra 2 x 30uA power consumption. Use pull-downs for these 2 lines to remove the unnecessary power consumption. Fixes: b133ca7a653c ("ARM: dts: at91: sama5d2_xplained: add pin muxing and enable classd") Signed-off-by: Codrin Ciubotariu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20200615095525.43414-1-codrin.ciubotariu@microchip.com commit bbccc11bc8848926065915e6193fd4c6e33c85ef Author: Gustavo A. R. Silva Date: Sun May 24 15:52:38 2020 -0500 audit: Use struct_size() helper in alloc_chunk 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 audit_chunk { ... struct node { struct list_head list; struct audit_tree *owner; unsigned index; /* index; upper bit indicates 'will prune' */ } owners[]; }; Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes. So, replace the following form: offsetof(struct audit_chunk, owners) + count * sizeof(struct node); with: struct_size(chunk, owners, count) This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva Signed-off-by: Paul Moore commit 7bd3a33ae6d2b820bc44a206f9b81b96840219fd Author: Andrii Nakryiko Date: Wed Jun 17 11:31:32 2020 -0700 libbpf: Bump version to 0.1.0 Bump libbpf version to 0.1.0, as new development cycle starts. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20200617183132.1970836-1-andriin@fb.com commit a5f610c0fa7ef819ab04a958dcde574c20b2f55b Author: Pierre-Louis Bossart Date: Wed Jun 17 11:56:16 2020 -0500 ASoC: Intel: broadwell: simplify card names for SOF uses Blindly adding an sof- prefix to the card name is not user friendly and causes UCM issues with a driver name truncated to 16 characters. Simplify to use "sof-bdw " pattern for all Broadwell machine drivers. The sof- prefix is added by the core. A generic "SOF" driver name is used, and UCMv2 will detect the configuration for this driver by testing the card name. Legacy uses are unmodified. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20200617165616.18511-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7bfbddfc98414ab52803ffd26d0dc65328d373b1 Author: Pierre-Louis Bossart Date: Wed Jun 17 11:56:15 2020 -0500 ASoC: Intel: cht*: simplify card names for SOF uses Blindly adding an sof- prefix to the card name is not user friendly and causes UCM issues with a driver name truncated to 16 characters. Simplify to use "sof-bytcht " pattern for all cht* machine drivers. The sof- prefix is added by the core. A generic "SOF" driver name is used, and UCMv2 will detect the configuration for this driver by testing the card name. Legacy uses are unmodified. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200617165616.18511-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b4ecd58b01fbd9420bb3d8911c526dc877319df5 Author: Pierre-Louis Bossart Date: Wed Jun 17 11:56:14 2020 -0500 ASoC: Intel: byt*: simplify card names for SOF uses Blindly adding an sof- prefix to the card name is not user friendly and causes UCM issues with a driver name truncated to 16 characters. Simplify to use "sof-bytcht " pattern for all byt* machine drivers. The sof- prefix is added by the core. A generic "SOF" driver name is used, and UCMv2 will detect the configuration for this driver by testing the card name. Legacy uses are unmodified. Suggested-by: Jaroslav Kysela Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Link: https://lore.kernel.org/r/20200617165616.18511-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b8fb642afa0277a0a9072fe119c1fce18437de0d Author: Thierry Reding Date: Mon Jun 15 16:10:16 2020 +0200 pwm: iqs620a: Use lowercase hexadecimal literals for consistency Other drivers use lowercase hexadecimal literals, so convert the IQS620a driver to do the same for consistency. Signed-off-by: Thierry Reding commit a9d887dc1c60ed67f2271d66560cdcf864c4a578 Author: Guru Das Srinagesh Date: Tue Jun 2 15:31:16 2020 -0700 pwm: Convert period and duty cycle to u64 Because period and duty cycle are defined as ints with units of nanoseconds, the maximum time duration that can be set is limited to ~2.147 seconds. Change their definitions to u64 in the structs of the PWM framework so that higher durations may be set. Also use the right format specifiers in debug prints in both core.c, pwm-stm32-lp.c as well as video/fbdev/ssd1307fb.c. Reported-by: kbuild test robot Signed-off-by: Guru Das Srinagesh Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit a6733474ba4bf3150120bacc1d2db446d89d3dbe Author: Guru Das Srinagesh Date: Tue Jun 2 15:31:15 2020 -0700 clk: pwm: Use 64-bit division function Since the PWM framework is switching struct pwm_args.period's datatype to u64, prepare for this transition by using div64_u64() to handle a 64-bit divisor. Also ensure that divide-by-zero (with fixed_rate as denominator) does not happen with an explicit check with probe failure as a consequence. Signed-off-by: Guru Das Srinagesh Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit 134ada17dbad272cdca57f2819a796c87e352274 Author: Guru Das Srinagesh Date: Tue Jun 2 15:31:14 2020 -0700 backlight: pwm_bl: Use 64-bit division function Since the PWM framework is switching struct pwm_state.period's datatype to u64, prepare for this transition by using div_u64 to handle a 64-bit dividend instead of a straight division operation. Signed-off-by: Guru Das Srinagesh Reviewed-by: Daniel Thompson Acked-by: Lee Jones Signed-off-by: Thierry Reding commit c7dcccaec2f7e99f95ad4b7c20f4f9086c6982be Author: Guru Das Srinagesh Date: Tue Jun 2 15:31:13 2020 -0700 pwm: sun4i: Use nsecs_to_jiffies to avoid a division Since the PWM framework is switching struct pwm_state.period's datatype to u64, prepare for this transition by using nsecs_to_jiffies() which does away with the need for a division operation. Signed-off-by: Guru Das Srinagesh Acked-by: Chen-Yu Tsai Signed-off-by: Thierry Reding commit 4cc23430a5361f29999545de34fc05fa7d8e513b Author: Guru Das Srinagesh Date: Tue Jun 2 15:31:12 2020 -0700 pwm: sifive: Use 64-bit division macro Since the PWM framework is switching struct pwm_args.period's datatype to u64, prepare for this transition by using DIV64_U64_ROUND_CLOSEST to handle a 64-bit divisor. Signed-off-by: Guru Das Srinagesh Acked-by: Palmer Dabbelt Signed-off-by: Thierry Reding commit 5bc5d99f1f836858820ad8e9a412bb103bb0d88b Author: Thierry Reding Date: Mon Jun 15 16:08:28 2020 +0200 pwm: iqs620a: Use 64-bit division The PWM framework is going to change the PWM period and duty cycles to be 64-bit unsigned integers. To avoid build errors on platforms that do not natively support 64-bit division, use explicity 64-bit division. Acked-by: Uwe Kleine-König Acked-by: Lee Jones Signed-off-by: Thierry Reding commit e50186e1dae67e070d4725b1f0b35b131969141d Author: Jerome Brunet Date: Wed Jun 17 17:50:47 2020 +0200 ASoC: meson: imply acodec glue on axg sound card When axg card driver support is enabled, lets enable the related internal DAC glue by default. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20200617155047.1187256-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit c935cd62d3fe985d7f0ebea185d2759e8992e96f Author: Herbert Xu Date: Wed Jun 17 17:17:19 2020 +1000 lockdep: Split header file into lockdep and lockdep_types There is a header file inclusion loop between asm-generic/bug.h and linux/kernel.h. This causes potential compile failurs depending on the which file is included first. One way of breaking this loop is to stop spinlock_types.h from including lockdep.h. This patch splits lockdep.h into two files for this purpose. Signed-off-by: Herbert Xu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Sergey Senozhatsky Reviewed-by: Andy Shevchenko Acked-by: Petr Mladek Acked-by: Steven Rostedt (VMware) Link: https://lkml.kernel.org/r/E1jlSJz-0003hE-8g@fornost.hmeau.com commit cad2929dc4321b1f237767e9bd271b61a2eaa752 Author: Hoang Huu Le Date: Wed Jun 17 13:56:05 2020 +0700 tipc: update a binding service via broadcast Currently, updating binding table (add service binding to name table/withdraw a service binding) is being sent over replicast. However, if we are scaling up clusters to > 100 nodes/containers this method is less affection because of looping through nodes in a cluster one by one. It is worth to use broadcast to update a binding service. This way, the binding table can be updated on all peer nodes in one shot. Broadcast is used when all peer nodes, as indicated by a new capability flag TIPC_NAMED_BCAST, support reception of this message type. Four problems need to be considered when introducing this feature. 1) When establishing a link to a new peer node we still update this by a unicast 'bulk' update. This may lead to race conditions, where a later broadcast publication/withdrawal bypass the 'bulk', resulting in disordered publications, or even that a withdrawal may arrive before the corresponding publication. We solve this by adding an 'is_last_bulk' bit in the last bulk messages so that it can be distinguished from all other messages. Only when this message has arrived do we open up for reception of broadcast publications/withdrawals. 2) When a first legacy node is added to the cluster all distribution will switch over to use the legacy 'replicast' method, while the opposite happens when the last legacy node leaves the cluster. This entails another risk of message disordering that has to be handled. We solve this by adding a sequence number to the broadcast/replicast messages, so that disordering can be discovered and corrected. Note however that we don't need to consider potential message loss or duplication at this protocol level. 3) Bulk messages don't contain any sequence numbers, and will always arrive in order. Hence we must exempt those from the sequence number control and deliver them unconditionally. We solve this by adding a new 'is_bulk' bit in those messages so that they can be recognized. 4) Legacy messages, which don't contain any new bits or sequence numbers, but neither can arrive out of order, also need to be exempt from the initial synchronization and sequence number check, and delivered unconditionally. Therefore, we add another 'is_not_legacy' bit to all new messages so that those can be distinguished from legacy messages and the latter delivered directly. v1->v2: - fix warning issue reported by kbuild test robot - add santiy check to drop the publication message with a sequence number that is lower than the agreed synch point Signed-off-by: kernel test robot Signed-off-by: Hoang Huu Le Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 2accfa69050c2a0d6fc6106f609208b3e9622b26 Author: Guenter Roeck Date: Wed Jun 17 07:14:10 2020 -0700 cpu/speculation: Add prototype for cpu_show_srbds() 0-day is not happy that there is no prototype for cpu_show_srbds(): drivers/base/cpu.c:565:16: error: no previous prototype for 'cpu_show_srbds' Fixes: 7e5b3c267d25 ("x86/speculation: Add Special Register Buffer Data Sampling (SRBDS) mitigation") Reported-by: kernel test robot Signed-off-by: Guenter Roeck Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200617141410.93338-1-linux@roeck-us.net commit 47ec7f09bc107720905c96bc37771e4ed1ff0aed Author: Dave Jiang Date: Wed May 13 11:47:49 2020 -0700 dmaengine: cookie bypass for out of order completion The cookie tracking in dmaengine expects all submissions completed in order. Some DMA devices like Intel DSA can complete submissions out of order, especially if configured with a work queue sharing multiple DMA engines. Add a status DMA_OUT_OF_ORDER that tx_status can be returned for those DMA devices. The user should use callbacks to track the completion rather than the DMA cookie. This would address the issue of dmatest complaining that descriptors are "busy" when the cookie count goes backwards due to out of order completion. Add DMA_COMPLETION_NO_ORDER DMA capability to allow the driver to flag the device's ability to complete operations out of order. Reported-by: Swathi Kovvuri Signed-off-by: Dave Jiang Tested-by: Swathi Kovvuri Link: https://lore.kernel.org/r/158939557151.20335.12404113976045569870.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 0caf847975b2d1247a220e8f439c9a54e34429f0 Author: Anson Huang Date: Fri Apr 24 07:07:10 2020 +0800 firmware: imx: make sure MU irq can wake up system from suspend mode IRQF_NO_SUSPEND flag is set for MU IRQ of IPC work, but with this flag set, IRQD_WAKEUP_ARMED flag will NOT be set during suspend_device_irq() phase, then when MU IRQ arrives, it will NOT wake up system from suspend. To fix this issue, pm_system_wakeup() is called in general MU IRQ handler to make sure system can be waked up when MU IRQ arrives. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Shawn Guo commit 17ed808ad243192fb923e4e653c1338d3ba06207 Author: Qiushi Wu Date: Thu May 28 15:22:37 2020 -0500 EDAC: Fix reference count leaks When kobject_init_and_add() returns an error, it should be handled because kobject_init_and_add() takes a reference even when it fails. If this function returns an error, kobject_put() must be called to properly clean up the memory associated with the object. Therefore, replace calling kfree() and call kobject_put() and add a missing kobject_put() in the edac_device_register_sysfs_main_kobj() error path. [ bp: Massage and merge into a single patch. ] Fixes: b2ed215a3338 ("Kobject: change drivers/edac to use kobject_init_and_add") Signed-off-by: Qiushi Wu Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200528202238.18078-1-wu000273@umn.edu Link: https://lkml.kernel.org/r/20200528203526.20908-1-wu000273@umn.edu commit 0eeadddbf09a7a36ef1bc8021df1a770dc4b5370 Author: Álvaro Fernández Rojas Date: Tue Jun 16 19:32:35 2020 +0200 spi: bcm63xx-hsspi: add reset support bcm63xx arch resets the HSSPI controller at early boot. However, bmips arch needs to perform a reset when probing the driver. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Philipp Zabel Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20200616173235.3473149-3-noltari@gmail.com Signed-off-by: Mark Brown commit 38807adeaf1ec0785b27dc18fe4562a375f80de7 Author: Álvaro Fernández Rojas Date: Tue Jun 16 19:32:34 2020 +0200 spi: bcm63xx-spi: add reset support bcm63xx arch resets the SPI controller at early boot. However, bmips arch needs to perform a reset when probing the driver. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Philipp Zabel Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20200616173235.3473149-2-noltari@gmail.com Signed-off-by: Mark Brown commit f61b9273c347980f570d1f9cecb867a7835c613d Author: Shengjiu Wang Date: Wed Jun 17 14:58:01 2020 +0800 ASoC: fsl_spdif: Add support for imx6sx platform The one difference on imx6sx platform is that the root clock is shared with ASRC module, so we add a new flags "shared_root_clock" which means the root clock is not independent, then we will not do the clk_set_rate and clk_round_rate to avoid impact ASRC module usage. As add a new flags, we include the soc specific data struct. Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen Link: https://lore.kernel.org/r/7a343edd5f8487abad248a0b862f45fd95067751.1592376770.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 632108afda6aa1d380e05f1eaa25463047fd00b3 Author: Shengjiu Wang Date: Wed Jun 17 14:58:00 2020 +0800 ASoC: bindings: fsl_spdif: Add new compatible string for imx6sx Add new compatible string "fsl,imx6sx-spdif" in the binding document. And add compatible string "fsl,vf610-spdif" which was missed before. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/feda3bb02296455d43aeebb7575918d9b28e1a3f.1592376770.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 039652a5b965404aee1fa8f61017f822668f41d4 Author: Shengjiu Wang Date: Wed Jun 17 12:48:25 2020 +0800 ASoC: fsl-asoc-card: Add MQS support The MQS codec isn't an i2c device, so use of_find_device_by_node to get platform device pointer. Because MQS only support playback, then add a new audio map. And there maybe "model" property or no "audio-routing" property in devicetree, so add some enhancement for these two property. Signed-off-by: Shengjiu Wang Reviewed-by: Nicolin Chen Link: https://lore.kernel.org/r/918505decb7f757f12c38059c590984f28d2f3a4.1592369271.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 56d6663d41f982542097775a3a8a6a1b867fe608 Author: Shengjiu Wang Date: Wed Jun 17 12:48:24 2020 +0800 ASoC: bindings: fsl-asoc-card: Add compatible string for MQS Add compatible string "fsl,imx-audio-mqs" for MQS, and move "audio-routing" property to be optional for MQS doesn't need such property. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/2185a3ec866bc59f82d93b73d1a732a896fd8f48.1592369271.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit deca195383a6085be62cb453079e03e04d618d6e Author: Qiushi Wu Date: Sat Jun 13 15:44:19 2020 -0500 ASoC: tegra: Fix reference count leaks. Calling pm_runtime_get_sync increments the counter even in case of failure, causing incorrect ref count if pm_runtime_put is not called in error handling paths. Call pm_runtime_put if pm_runtime_get_sync fails. Signed-off-by: Qiushi Wu Reviewed-by: Jon Hunter Link: https://lore.kernel.org/r/20200613204422.24484-1-wu000273@umn.edu Signed-off-by: Mark Brown commit 0ff0fc97d3074c447a40e8b4375ba6a88cd571be Author: Colin Ian King Date: Wed Jun 17 09:52:07 2020 +0100 drm/i915/selftests: fix spelling mistake "submited" -> "submitted" There is a spelling mistake in a pr_err message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200617085207.167552-1-colin.king@canonical.com commit 2aae8ed1f390a42ec752e4403ffca877fb3260e1 Author: Paul Kocialkowski Date: Thu Apr 16 16:05:26 2020 +0200 drm/rockchip: Add per-pixel alpha support for the PX30 VOP Compared to its predecessors, the PX30 VOP has a different register layout for enabling per-pixel alpha. Instead of src_alpha_ctl and dst_alpha_ctl, there is a single alpha control register. This register takes some fields from src_alpha_ctl, but with a different layout. Add support for the required fields to the PX30 VOP window descriptions, which makes per-pixel-alpha formats behave correctly. Signed-off-by: Paul Kocialkowski Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20200416140526.262533-1-paul.kocialkowski@bootlin.com commit 14bda4e5293ed9722f1dc39b543024e37707d6c6 Merge: b3a9e3b9622ae fb414783b65c8 Author: Peter Zijlstra Date: Wed Jun 17 11:39:11 2020 +0200 Merge branch 'objtool/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux into objtool/core commit 00bd404144241155653bb0d0c15be51e4e6983aa Author: Mylène Josserand Date: Tue Jun 2 10:06:44 2020 +0200 dt-bindings: clocks: add rk3288w variant compatible Add the possible compatible "rockchip,rk3288w-cru" that handles the difference between the rk3288 and the new revision rk3288w. This compatible will be added by bootloaders. Signed-off-by: Mylène Josserand Acked-by: Rob Herring Link: https://lore.kernel.org/r/20200602080644.11333-3-mylene.josserand@collabora.com Signed-off-by: Heiko Stuebner commit 1627f683636df70fb25358b0a7b39a24e8fce5bf Author: Mylène Josserand Date: Tue Jun 2 10:06:43 2020 +0200 clk: rockchip: Handle clock tree for rk3288w variant The revision rk3288w has a different clock tree about "hclk_vio" clock, according to the BSP kernel code. This patch handles this difference by detecting which device-tree we are using. If it is a "rockchip,rk3288-cru", let's register the clock tree as it was before. If the device-tree node is "rockchip,rk3288w-cru", we will apply the difference with this version of this SoC. Noticed that this new device-tree compatible must be handled in bootloader such as u-boot. Signed-off-by: Mylène Josserand Link: https://lore.kernel.org/r/20200602080644.11333-2-mylene.josserand@collabora.com Signed-off-by: Heiko Stuebner commit d5249bc7a1a8869da90ba668b331b0b3f8996924 Author: Benjamin Thiel Date: Sat Jun 6 14:26:29 2020 +0200 x86/mm: Fix -Wmissing-prototypes warnings for arch/x86/mm/init.c Fix -Wmissing-prototypes warnings: arch/x86/mm/init.c:81:6: warning: no previous prototype for ‘x86_has_pat_wp’ [-Wmissing-prototypes] bool x86_has_pat_wp(void) arch/x86/mm/init.c:86:22: warning: no previous prototype for ‘pgprot2cachemode’ [-Wmissing-prototypes] enum page_cache_mode pgprot2cachemode(pgprot_t pgprot) by including the respective header containing prototypes. Also fix: arch/x86/mm/init.c:893:13: warning: no previous prototype for ‘mem_encrypt_free_decrypted_mem’ [-Wmissing-prototypes] void __weak mem_encrypt_free_decrypted_mem(void) { } by making it static inline for the !CONFIG_AMD_MEM_ENCRYPT case. This warning happens when CONFIG_AMD_MEM_ENCRYPT is not enabled (defconfig for example): ./arch/x86/include/asm/mem_encrypt.h:80:27: warning: inline function ‘mem_encrypt_free_decrypted_mem’ declared weak [-Wattributes] static inline void __weak mem_encrypt_free_decrypted_mem(void) { } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ It's ok to convert to static inline because the function is used only in x86. Is not shared with other architectures so drop the __weak too. [ bp: Massage and adjust __weak comments while at it. ] Signed-off-by: Benjamin Thiel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200606122629.2720-1-b.thiel@posteo.de commit 6c2b99a2e7a073575b4ee91abf7d16470991c1f4 Author: Abhishek Pandit-Subedi Date: Fri Jun 12 13:02:48 2020 -0700 ARM: dts: rockchip: Add marvell BT irq config Veyron Jaq and Mighty both use the Marvel 8897 WiFi+BT chip. Add wakeup and pinctrl block to devicetree so the btmrvl driver can correctly configure the wakeup interrupt. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20200612130219.v2.1.I66864be898aa835ccb66b6cd5220d0b082338a81@changeid Signed-off-by: Heiko Stuebner commit fff987e7328951f7d6fb2d0545de8635ceafa89f Author: Johan Jonker Date: Sun May 24 18:06:35 2020 +0200 ARM: dts: rockchip: rename label and nodename pinctrl subnodes that end with gpio A test with the command below gives for example this error: arch/arm/boot/dts/rk3288-tinker.dt.yaml: tsadc: otp-gpio: {'phandle': [[54]], 'rockchip,pins': [[0, 10, 0, 118]]} is not of type 'array' 'gpio' is a sort of reserved nodename and should not be used for pinctrl in combination with 'rockchip,pins', so change nodes that end with 'gpio' to end with 'pin' or 'pins'. make ARCH=arm dtbs_check DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/ dtschema/schemas/gpio/gpio.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200524160636.16547-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 6dd5e12c0b9bba40b3947ac1a9fd2f992585b5c6 Author: Johan Jonker Date: Fri May 22 17:46:57 2020 +0200 arm64: dts: rockchip: rename and label gpio-led subnodes part 2 Current dts files with 'gpio-led' nodes were manually verified. In order to automate this process leds-gpio.txt has been converted to yaml. With this conversion a check for pattern properties was added. In part 2 rename and label gpio-led subnodes that passed the regex, but still don't have the preferred form. Any pin subnode that ends with '-gpio' in the pinctrl node generates a warning. Fix with help of the following rules: 1: Add nodename in the preferred form. 2: Always add a label that ends with '_led' to prevent conflicts with other labels such as 'power' and 'mmc' 3: If leds need pinctrl add a label that ends with '_led_pin' also to prevent conflicts with other labels. patternProperties: # The first form is preferred, but fall back to just 'led' # anywhere in the node name to at least catch some child nodes. "(^led-[0-9a-f]$|led)": make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/leds/ leds-gpio.yaml make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/ schemas/gpio/gpio.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200522154657.9472-1-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 2bc65fef4fe424f5f8295175f1b42f8b94c6df01 Author: Johan Jonker Date: Sun May 24 18:06:36 2020 +0200 arm64: dts: rockchip: rename label and nodename pinctrl subnodes that end with gpio A test with the command below gives for example this error: arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dt.yaml: tsadc: tsadc-otp-gpio: {'phandle': [[90]], 'rockchip,pins': [[0, 6, 0, 123]]} is not of type 'array' 'gpio' is a sort of reserved nodename and should not be used for pinctrl in combination with 'rockchip,pins', so change nodes that end with 'gpio' to end with 'pin' or 'pins'. make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/ dtschema/schemas/gpio/gpio.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20200524160636.16547-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 8a445086f8af0b7b9bd8d1901d6f306bb154f70d Author: Heiko Stuebner Date: Wed Jun 3 15:28:36 2020 +0200 arm64: dts: rockchip: fix rk3399-puma gmac reset gpio The puma gmac node currently uses opposite active-values for the gmac phy reset pin. The gpio-declaration uses active-high while the separate snps,reset-active-low property marks the pin as active low. While on the kernel side this works ok, other DT users may get confused - as seen with uboot right now. So bring this in line and make both properties match, similar to the other Rockchip board. Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM") Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200603132836.362519-1-heiko@sntech.de commit 7a7184f6cfa9279f1a1c10a1845d247d7fad54ff Author: Heiko Stuebner Date: Thu Jun 4 11:12:39 2020 +0200 arm64: dts: rockchip: fix rk3399-puma vcc5v0-host gpio The puma vcc5v0_host regulator node currently uses opposite active-values for the enable pin. The gpio-declaration uses active-high while the separate enable-active-low property marks the pin as active low. While on the kernel side this works ok, other DT users may get confused - as seen with uboot right now. So bring this in line and make both properties match, similar to the gmac fix. Fixes: 2c66fc34e945 ("arm64: dts: rockchip: add RK3399-Q7 (Puma) SoM") Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200604091239.424318-1-heiko@sntech.de commit 2300e6dab473e93181cf76e4fe6671aa3d24c57b Author: Heiko Stuebner Date: Sun Jun 7 23:29:09 2020 +0200 arm64: dts: rockchip: fix rk3368-lion gmac reset gpio The lion gmac node currently uses opposite active-values for the gmac phy reset pin. The gpio-declaration uses active-high while the separate snps,reset-active-low property marks the pin as active low. While on the kernel side this works ok, other DT users may get confused - as seen with uboot right now. So bring this in line and make both properties match, similar to the other Rockchip board. Fixes: d99a02bcfa81 ("arm64: dts: rockchip: add RK3368-uQ7 (Lion) SoM") Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20200607212909.920575-1-heiko@sntech.de commit 75152d66315521a48c4997305f4e01c5f139e160 Author: Peter Geis Date: Sun Jun 14 14:29:51 2020 +0000 arm64: dts: rockchip: set rockpro64 usbc dr_mode as host The usb-c port on the rockpro64 does not detect devices reliably when in otg mode. Setting the mode to "host" allows the port to work reliably. This aligns with the pinebook-pro configuration. Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20200614142950.1120694-1-pgwipeout@gmail.com Signed-off-by: Heiko Stuebner commit c32a5fbc180218aa3ec3bf8063e631ff5e24b636 Merge: 675398674c4ed 3ad796cbc36a7 Author: Takashi Iwai Date: Wed Jun 17 10:08:51 2020 +0200 Merge branch 'topic/dma-fix2' into for-next Pull the fix for potential PCM SG-buffer problems. Link: https://lore.kernel.org/r/20200615160045.2703-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit dfdfbd382348d53aeedaeee10eeea9a5958a3977 Author: Chris Wilson Date: Wed Jun 17 00:37:33 2020 +0100 drm/i915/selftests: Check preemption rollback of different ring queue depths Like live_unlite_ring, but instead of simply looking at the impact of intel_ring_direction(), check that preemption more generally works with different depths of queued requests in the ring. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200616233733.18050-1-chris@chris-wilson.co.uk commit ba0cada97656fa963a97b476816c0dc4185e4aa8 Author: Chris Wilson Date: Tue Jun 16 19:55:18 2020 +0100 drm/i915/selftests: Use friendly request names for live_timeslice_rewind Rather than mixing [012] and (A1, A2, B2) for the request indices, use the enums throughout. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200616185518.11948-2-chris@chris-wilson.co.uk commit 9199c070cdde5ef5959c81d76608f992846fe894 Author: Chris Wilson Date: Tue Jun 16 19:55:17 2020 +0100 drm/i915/selftests: Exercise far preemption rollbacks Not too long ago, we realised we had issues with a rolling back a context so far for a preemption request we considered the resubmit not to be a rollback but a forward roll. This means we would issue a lite restore instead of forcing a full restore, continuing execution of the old requests rather than causing a preemption. Add a selftest to exercise such a far rollback, such that if we were to skip the full restore, we would execute invalid instructions in the ring and hang. Note that while I was able to confirm that this causes us to do a lite-restore preemption rollback (with commit e36ba817fa96 ("drm/i915/gt: Incrementally check for rewinding") disabled), it did not trick the HW into rolling past the old RING_TAIL. Myybe on other HW. References: e36ba817fa96 ("drm/i915/gt: Incrementally check for rewinding") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200616185518.11948-1-chris@chris-wilson.co.uk commit a5161eeef97cb0cdc4de966005926db2f5894af4 Author: Christian Brauner Date: Wed Jun 3 21:51:44 2020 +0200 tests: add CLOSE_RANGE_UNSHARE tests Signed-off-by: Christian Brauner commit 60997c3d45d9a67daf01c56d805ae4fec37e0bd8 Author: Christian Brauner Date: Wed Jun 3 21:48:55 2020 +0200 close_range: add CLOSE_RANGE_UNSHARE One of the use-cases of close_range() is to drop file descriptors just before execve(). This would usually be expressed in the sequence: unshare(CLONE_FILES); close_range(3, ~0U); as pointed out by Linus it might be desirable to have this be a part of close_range() itself under a new flag CLOSE_RANGE_UNSHARE. This expands {dup,unshare)_fd() to take a max_fds argument that indicates the maximum number of file descriptors to copy from the old struct files. When the user requests that all file descriptors are supposed to be closed via close_range(min, max) then we can cap via unshare_fd(min) and hence don't need to do any of the heavy fput() work for everything above min. The patch makes it so that if CLOSE_RANGE_UNSHARE is requested and we do in fact currently share our file descriptor table we create a new private copy. We then close all fds in the requested range and finally after we're done we install the new fd table. Suggested-by: Linus Torvalds Signed-off-by: Christian Brauner commit 2c5db60e46ad7f03789fe7e2beedb15496930468 Author: Christian Brauner Date: Mon May 20 16:13:28 2019 +0200 tests: add close_range() tests This adds basic tests for the new close_range() syscall. - test that no invalid flags can be passed - test that a range of file descriptors is correctly closed - test that a range of file descriptors is correctly closed if there there are already closed file descriptors in the range - test that max_fd is correctly capped to the current fdtable maximum Signed-off-by: Christian Brauner Cc: Arnd Bergmann Cc: Jann Horn Cc: David Howells Cc: Dmitry V. Levin Cc: Oleg Nesterov Cc: Linus Torvalds Cc: Florian Weimer Cc: Shuah Khan Cc: linux-api@vger.kernel.org Cc: linux-kselftest@vger.kernel.org commit 9b4feb630e8e9801603f3cab3a36369e3c1cf88d Author: Christian Brauner Date: Fri May 24 11:31:44 2019 +0200 arch: wire-up close_range() This wires up the close_range() syscall into all arches at once. Suggested-by: Arnd Bergmann Signed-off-by: Christian Brauner Reviewed-by: Oleg Nesterov Acked-by: Arnd Bergmann Acked-by: Michael Ellerman (powerpc) Cc: Jann Horn Cc: David Howells Cc: Dmitry V. Levin Cc: Linus Torvalds Cc: Al Viro Cc: Florian Weimer Cc: linux-api@vger.kernel.org Cc: linux-alpha@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-ia64@vger.kernel.org Cc: linux-m68k@lists.linux-m68k.org Cc: linux-mips@vger.kernel.org Cc: linux-parisc@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: linux-s390@vger.kernel.org Cc: linux-sh@vger.kernel.org Cc: sparclinux@vger.kernel.org Cc: linux-xtensa@linux-xtensa.org Cc: linux-arch@vger.kernel.org Cc: x86@kernel.org commit 278a5fbaed89dacd04e9d052f4594ffd0e0585de Author: Christian Brauner Date: Fri May 24 11:30:34 2019 +0200 open: add close_range() This adds the close_range() syscall. It allows to efficiently close a range of file descriptors up to all file descriptors of a calling task. I was contacted by FreeBSD as they wanted to have the same close_range() syscall as we proposed here. We've coordinated this and in the meantime, Kyle was fast enough to merge close_range() into FreeBSD already in April: https://reviews.freebsd.org/D21627 https://svnweb.freebsd.org/base?view=revision&revision=359836 and the current plan is to backport close_range() to FreeBSD 12.2 (cf. [2]) once its merged in Linux too. Python is in the process of switching to close_range() on FreeBSD and they are waiting on us to merge this to switch on Linux as well: https://bugs.python.org/issue38061 The syscall came up in a recent discussion around the new mount API and making new file descriptor types cloexec by default. During this discussion, Al suggested the close_range() syscall (cf. [1]). Note, a syscall in this manner has been requested by various people over time. First, it helps to close all file descriptors of an exec()ing task. This can be done safely via (quoting Al's example from [1] verbatim): /* that exec is sensitive */ unshare(CLONE_FILES); /* we don't want anything past stderr here */ close_range(3, ~0U); execve(....); The code snippet above is one way of working around the problem that file descriptors are not cloexec by default. This is aggravated by the fact that we can't just switch them over without massively regressing userspace. For a whole class of programs having an in-kernel method of closing all file descriptors is very helpful (e.g. demons, service managers, programming language standard libraries, container managers etc.). (Please note, unshare(CLONE_FILES) should only be needed if the calling task is multi-threaded and shares the file descriptor table with another thread in which case two threads could race with one thread allocating file descriptors and the other one closing them via close_range(). For the general case close_range() before the execve() is sufficient.) Second, it allows userspace to avoid implementing closing all file descriptors by parsing through /proc//fd/* and calling close() on each file descriptor. From looking at various large(ish) userspace code bases this or similar patterns are very common in: - service managers (cf. [4]) - libcs (cf. [6]) - container runtimes (cf. [5]) - programming language runtimes/standard libraries - Python (cf. [2]) - Rust (cf. [7], [8]) As Dmitry pointed out there's even a long-standing glibc bug about missing kernel support for this task (cf. [3]). In addition, the syscall will also work for tasks that do not have procfs mounted and on kernels that do not have procfs support compiled in. In such situations the only way to make sure that all file descriptors are closed is to call close() on each file descriptor up to UINT_MAX or RLIMIT_NOFILE, OPEN_MAX trickery (cf. comment [8] on Rust). The performance is striking. For good measure, comparing the following simple close_all_fds() userspace implementation that is essentially just glibc's version in [6]: static int close_all_fds(void) { int dir_fd; DIR *dir; struct dirent *direntp; dir = opendir("/proc/self/fd"); if (!dir) return -1; dir_fd = dirfd(dir); while ((direntp = readdir(dir))) { int fd; if (strcmp(direntp->d_name, ".") == 0) continue; if (strcmp(direntp->d_name, "..") == 0) continue; fd = atoi(direntp->d_name); if (fd == dir_fd || fd == 0 || fd == 1 || fd == 2) continue; close(fd); } closedir(dir); return 0; } to close_range() yields: 1. closing 4 open files: - close_all_fds(): ~280 us - close_range(): ~24 us 2. closing 1000 open files: - close_all_fds(): ~5000 us - close_range(): ~800 us close_range() is designed to allow for some flexibility. Specifically, it does not simply always close all open file descriptors of a task. Instead, callers can specify an upper bound. This is e.g. useful for scenarios where specific file descriptors are created with well-known numbers that are supposed to be excluded from getting closed. For extra paranoia close_range() comes with a flags argument. This can e.g. be used to implement extension. Once can imagine userspace wanting to stop at the first error instead of ignoring errors under certain circumstances. There might be other valid ideas in the future. In any case, a flag argument doesn't hurt and keeps us on the safe side. From an implementation side this is kept rather dumb. It saw some input from David and Jann but all nonsense is obviously my own! - Errors to close file descriptors are currently ignored. (Could be changed by setting a flag in the future if needed.) - __close_range() is a rather simplistic wrapper around __close_fd(). My reasoning behind this is based on the nature of how __close_fd() needs to release an fd. But maybe I misunderstood specifics: We take the files_lock and rcu-dereference the fdtable of the calling task, we find the entry in the fdtable, get the file and need to release files_lock before calling filp_close(). In the meantime the fdtable might have been altered so we can't just retake the spinlock and keep the old rcu-reference of the fdtable around. Instead we need to grab a fresh reference to the fdtable. If my reasoning is correct then there's really no point in fancyfying __close_range(): We just need to rcu-dereference the fdtable of the calling task once to cap the max_fd value correctly and then go on calling __close_fd() in a loop. /* References */ [1]: https://lore.kernel.org/lkml/20190516165021.GD17978@ZenIV.linux.org.uk/ [2]: https://github.com/python/cpython/blob/9e4f2f3a6b8ee995c365e86d976937c141d867f8/Modules/_posixsubprocess.c#L220 [3]: https://sourceware.org/bugzilla/show_bug.cgi?id=10353#c7 [4]: https://github.com/systemd/systemd/blob/5238e9575906297608ff802a27e2ff9effa3b338/src/basic/fd-util.c#L217 [5]: https://github.com/lxc/lxc/blob/ddf4b77e11a4d08f09b7b9cd13e593f8c047edc5/src/lxc/start.c#L236 [6]: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/grantpt.c;h=2030e07fa6e652aac32c775b8c6e005844c3c4eb;hb=HEAD#l17 Note that this is an internal implementation that is not exported. Currently, libc seems to not provide an exported version of this because of missing kernel support to do this. Note, in a recent patch series Florian made grantpt() a nop thereby removing the code referenced here. [7]: https://github.com/rust-lang/rust/issues/12148 [8]: https://github.com/rust-lang/rust/blob/5f47c0613ed4eb46fca3633c1297364c09e5e451/src/libstd/sys/unix/process2.rs#L303-L308 Rust's solution is slightly different but is equally unperformant. Rust calls getdtablesize() which is a glibc library function that simply returns the current RLIMIT_NOFILE or OPEN_MAX values. Rust then goes on to call close() on each fd. That's obviously overkill for most tasks. Rarely, tasks - especially non-demons - hit RLIMIT_NOFILE or OPEN_MAX. Let's be nice and assume an unprivileged user with RLIMIT_NOFILE set to 1024. Even in this case, there's a very high chance that in the common case Rust is calling the close() syscall 1021 times pointlessly if the task just has 0, 1, and 2 open. Suggested-by: Al Viro Signed-off-by: Christian Brauner Cc: Arnd Bergmann Cc: Kyle Evans Cc: Jann Horn Cc: David Howells Cc: Dmitry V. Levin Cc: Oleg Nesterov Cc: Linus Torvalds Cc: Florian Weimer Cc: linux-api@vger.kernel.org commit a5ce9f2bb665d1d2b31f139a02dbaa2dfbb62fa6 Author: Borislav Petkov Date: Mon Jun 15 08:51:25 2020 +0200 x86/speculation: Merge one test in spectre_v2_user_select_mitigation() Merge the test whether the CPU supports STIBP into the test which determines whether STIBP is required. Thus try to simplify what is already an insane logic. Remove a superfluous newline in a comment, while at it. Signed-off-by: Borislav Petkov Cc: Anthony Steinhauser Link: https://lkml.kernel.org/r/20200615065806.GB14668@zn.tnic commit 223128f767102127bf651a509df745fb6d56b3fb Author: Tvrtko Ursulin Date: Mon Jun 15 16:14:49 2020 +0100 drm/i915: Remove redundant i915_request_await_object in blit clears One i915_request_await_object is enough and we keep the one under the object lock so it is final. At the same time move async clflushing setup under the same locked section and consolidate common code into a helper function. v2: * Emit initial breadcrumbs after aways are set up. (Chris) Signed-off-by: Tvrtko Ursulin Cc: Matthew Auld Cc: Chris Wilson Cc: Michael J. Ruhl Reviewed-by: Chris Wilson Reviewed-by: Michael J. Ruhl Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200615151449.32605-1-tvrtko.ursulin@linux.intel.com commit e971fe9128a742537a1d8803b852c69777a885eb Author: Chris Wilson Date: Tue Jun 16 19:31:39 2020 +0100 drm/i915: Mark up inline getters as taking a const i915_request Since these inline routines only return the desired pointer from the i915_request(after checking the preconditions for acquiring said pointer), they can be const. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200616183139.4061-1-chris@chris-wilson.co.uk commit f29e08800b6d4d80906d7d33f3da39e1d05fab38 Author: Gustavo A. R. Silva Date: Tue Jun 16 09:54:52 2020 -0500 drm/i915/selftests: Fix inconsistent IS_ERR and PTR_ERR Fix inconsistent IS_ERR and PTR_ERR in live_timeslice_nopreempt(). The proper pointer to be passed as argument to PTR_ERR() is ce. This bug was detected with the help of Coccinelle. Fixes: b72f02d78e4f ("drm/i915/gt: Prevent timeslicing into unpreemptable requests") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200616145452.GA25291@embeddedor commit 98fe05e21a6e0ca242e974650ed58b64813cb2dc Author: Sebastian Arriola Date: Mon Jun 15 09:51:31 2020 -0600 staging: rtl8712: Remove unnecesary else after return statement. This patch fixes the checkpatch.pl warning: WARNING: else is not generally useful after a break or return 490: FILE: drivers/staging/rtl8712/rtl8712_recv.c:490: return false; else Signed-off-by: Sebastian Arriola Link: https://lore.kernel.org/r/20200615155131.GA4563@sevic69 Signed-off-by: Greg Kroah-Hartman commit 3ee97e220648257e8a89c98c2a5cd5f989956168 Author: Pascal Terjan Date: Tue Jun 9 20:48:48 2020 +0100 staging: rtl8712: switch to common ieee80211 headers This patch switches to and and deletes a lot of duplicate definitions plus many unused ones. Non obvious changes: - struct ieee80211_ht_cap is different enough that I preferred to keep (and rename) it for now. - mcs_rate in translate_scan was not read after being set, so I deleted that part rather than using the renamed struct - WLAN_CAPABILITY_BSS is replaced with WLAN_CAPABILITY_ESS which is the corresponding one with same value Signed-off-by: Pascal Terjan Link: https://lore.kernel.org/r/20200609194848.166130-1-pterjan@google.com Signed-off-by: Greg Kroah-Hartman commit ce59858bbc104ab5afddbd3e00edcdaed134ac68 Author: Julius Hemanth Pitti Date: Tue Jun 9 14:24:14 2020 -0700 staging: wfx: make methods 'wfx_get_ps_timeout' and 'wfx_update_pm' static Add "static" for local methods wfx_get_ps_timeout() and wfx_update_pm() to address following sparse warnings. wfx/sta.c:203:5: warning: symbol 'wfx_get_ps_timeout' was not declared. Should it be static? wfx/sta.c:233:5: warning: symbol 'wfx_update_pm' was not declared. Should it be static? Signed-off-by: Julius Hemanth Pitti Link: https://lore.kernel.org/r/1591737854-11855-1-git-send-email-juliushemanth@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1b2e335ebfa2243517e09f99653c78d1936cb6d2 Author: Borislav Petkov Date: Mon Jun 15 19:49:46 2020 +0200 x86/alternatives: Add pr_fmt() to debug macros ... in order to have debug output prefixed with the pr_fmt text "SMP alternatives:" which allows easy grepping: $ dmesg | grep "SMP alternatives" [ 0.167783] SMP alternatives: alt table ffffffff8272c780, -> ffffffff8272fd6e [ 0.168620] SMP alternatives: feat: 3*32+16, old: (x86_64_start_kernel+0x37/0x73 \ (ffffffff826093f7) len: 5), repl: (ffffffff8272fd6e, len: 5), pad: 0 [ 0.170103] SMP alternatives: ffffffff826093f7: old_insn: e8 54 a8 da fe [ 0.171184] SMP alternatives: ffffffff8272fd6e: rpl_insn: e8 cd 3e c8 fe ... Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200615175315.17301-1-bp@alien8.de commit e370f886fefc23b9ca3011760d9376f1947eb321 Author: Borislav Petkov Date: Tue Jun 16 15:39:25 2020 +0200 EDAC: Remove edac_get_dimm_by_index() It is unused now. Signed-off-by: Borislav Petkov commit b9cae27728d1f9c9ed858adf012adddfcd8d3802 Author: Borislav Petkov Date: Wed Jun 3 21:19:21 2020 +0200 EDAC/ghes: Scan the system once on driver init Change the hardware scanning and figuring out how many DIMMs a machine has to a single, one-time thing which happens once on driver init. After that scanning completes, struct ghes_hw_desc contains a representation of the hardware which the driver can then use for later initialization. Then, copy the DIMM information into the respective EDAC core representation of those. Get rid of ghes_edac_dimm_fill and use a struct dimm_info array directly. This way, hw detection and further driver initialization is nicely and logically split. Further additions should all be added to ghes_scan_system() and the hw representation extended as needed. There should be no functionality change resulting from this patch. Signed-off-by: Borislav Petkov commit cfe28f909ddd6ca854568870a7a9b46454e52b6f Author: Daniel Vetter Date: Tue Jun 16 13:47:23 2020 +0200 drm/shmem-helper: Only dma-buf imports are private obj I broke that in my refactoring: commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca Author: Daniel Vetter Date: Fri May 29 16:05:42 2020 +0200 drm/shmem-helpers: Simplify dma-buf importing I'm not entirely sure of the history here, but I suspect that in one of the rebases or when applying the patch I moved the hunk from drm_gem_shmem_prime_import_sg_table(), where it should be, to drm_gem_shmem_create_with_handle(), which is totally wrong. Remedy this. Thanks for Thomas for the crucial hint in debugging this. Tested-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann Reported-by: Thomas Zimmermann Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing") Cc: Boris Brezillon Cc: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Rob Herring Cc: Noralf Trønnes Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200616114723.2363268-1-daniel.vetter@ffwll.ch commit 5b9f5f11a2b3865fdfdd751fb1af35ffc5e492ba Author: Daniel Vetter Date: Mon Jun 15 17:10:26 2020 +0200 drm/shmem-helper: Fix obj->filp derefence I broke that in my refactoring: commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca Author: Daniel Vetter Date: Fri May 29 16:05:42 2020 +0200 drm/shmem-helpers: Simplify dma-buf importing Tested-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann Reported-by: Thomas Zimmermann Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing") Cc: Boris Brezillon Cc: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Rob Herring Cc: Noralf Trønnes Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200615151026.2339113-1-daniel.vetter@ffwll.ch commit c09a7ce668a666f1e044214647cb594940ba927c Author: Lubomir Rintel Date: Mon Jun 1 21:22:52 2020 +0200 dmaengine: mmp_tdma: share the IRQ line On a MMP2, the DMA interrupt is shared by all channels of the peripheral DMA controller and the audio DMA controller. Both drivers can identify their interrupts, but only the PDMA driver marks the line shared: [ 1.185782] mmp-pdma d4000000.dma: initialized 16 channels [ 1.186808] mmp-tdma d42a0800.adma: IRQ index 1 not found [ 1.194317] genirq: Flags mismatch irq 64. 00000000 (tdma) vs. 00000080 (pdma) [ 1.197894] mmp-tdma: probe of d42a0800.adma failed with error -16 Let's turn on IRQF_SHARED in the ADMA driver as well. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200601192252.172773-1-lkundrak@v3.sk Signed-off-by: Vinod Koul commit 5bc382ec2f94a7c1b2a8938c6ca99c26a6fe5f58 Author: Lubomir Rintel Date: Mon Jun 1 21:23:37 2020 +0200 dmaengine: mmp_pdma: Do not warn when IRQ is shared by all chans When there's a single interrupt for all the DMA channels, the unsuccessful attempt to request separate IRQs emits useless warnings: [ 1.370381] mmp-pdma d4000000.dma: IRQ index 1 not found ... [ 1.412398] mmp-pdma d4000000.dma: IRQ index 15 not found [ 1.418308] mmp-pdma d4000000.dma: initialized 16 channels Avoid that, treating the IRQs as optional. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20200601192337.172869-1-lkundrak@v3.sk Signed-off-by: Vinod Koul commit 0658e5a83a71c7a0c06c92b2259bc62088bf8472 Author: Andy Shevchenko Date: Tue May 26 21:24:16 2020 +0300 dmaengine: dw: Replace 'objs' by 'y' `-objs` is fitted for building host programs, change to `-y`, more straightforward for device drivers. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200526182416.52805-2-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 38e4fb66728f01821f5ac0ed2adb4a3d7f40329c Author: Andy Shevchenko Date: Tue May 26 21:24:15 2020 +0300 dmaengine: dw: Register ACPI DMA controller for PCI that has companion If PCI enumerated controller has a companion device, register it in the ACPI DMA controllers as well. Fixes: f7c799e950f9 ("dmaengine: dw: we do support Merrifield SoC in PCI mode") Depends-on: b685fe26e9af ("dmaengine: dw: platform: Split ACPI helpers to separate module") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20200526182416.52805-1-andriy.shevchenko@linux.intel.com Signed-off-by: Vinod Koul commit 432e8130af88e486c9419fe18fbff2edd64db374 Author: Lad Prabhakar Date: Sun May 24 22:37:53 2020 +0100 dt-bindings: dmaengine: renesas,usb-dmac: Add binding for r8a7742 Document RZ/G1H (R8A7742) SoC bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Link: https://lore.kernel.org/r/1590356277-19993-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Vinod Koul commit 1ad273d6ff2d3af6ce3a4c8bd81a2ba10151ae0e Author: Peter Hutterer Date: Tue Jun 9 16:03:19 2020 +1000 HID: input: do not run GET_REPORT unless there's a Resolution Multiplier hid-multitouch currently runs GET_REPORT for Contact Max and again to retrieve the Win8 blob. If both are within the same report, the Resolution Multiplier code calls GET_FEATURE again and this time, possibly due to timing, it causes the ILITEK-TP device interpret the GET_FEATURE as an instruction to change the mode and effectively stop the device from functioning as expected. Notably: the device doesn't even have a Resolution Multiplier so it shouldn't be affected by any of this at all. Fix this by making sure we only execute GET_REPORT if there is a Resolution Multiplier in the respective report. Where the HID_QUIRK_NO_INIT_REPORTS field is set we just bail out immediately. This shouldn't be triggered by any real device anyway. Signed-off-by: Peter Hutterer Tested-by: Wen He Signed-off-by: Jiri Kosina commit 8e9ddbde9ddbba74c86b0c5f8eefb26192b3242e Author: Colin Ian King Date: Wed Jun 10 13:31:01 2020 +0100 HID: usbhid: remove redundant assignment to variable retval The variable retval is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Jiri Kosina commit d3132792285859253c466354fd8d54d1fe0ba786 Author: Dmitry Torokhov Date: Tue Jun 9 21:38:24 2020 -0700 HID: usbhid: do not sleep when opening device usbhid tries to give the device 50 milliseconds to drain its queues when opening the device, but does it naively by simply sleeping in open handler, which slows down device probing (and thus may affect overall boot time). However we do not need to sleep as we can instead mark a point of time in the future when we should start processing the events. Reported-by: Nicolas Boichat Signed-off-by: Dmitry Torokhov Reviewed-by: Guenter Roeck Signed-off-by: Jiri Kosina commit 36cebead9f47104a4b434e0a852e46143a86ac52 Author: Philipp Zabel Date: Fri Mar 20 14:12:55 2020 +0100 arm64: dts: imx8mq: enable Hantro G1/G2 VPU Add the i.MX8MQ VPU module which comprises Hantro G1 and G2 video decoder cores and a reset/control block. Hook up the bus clock to the VPU power domain to enable handshakes, and configure the core clocks to 600 MHz and the bus clock to 800 MHz by default. Signed-off-by: Philipp Zabel Reviewed-by: Ezequiel Garcia Tested-by: Ezequiel Garcia Signed-off-by: Shawn Guo commit 12a400b016ab955be8e4c569346fa18aaceed9d7 Author: Georgi Djakov Date: Tue Jun 16 16:43:23 2020 +0300 interconnect: Mark all dummy functions as static inline There are a few dummy stub functions that are not marked as static inline yet. Currently this header file is not included in any other file outside of drivers/interconnect/, but that might not be the case in the future. If this file gets included and the framework is disabled, we will be see warnings. Let's fix this in advance. Link: https://lore.kernel.org/r/20200228145945.13579-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 65461e26b1fe73bde4326367ee23cc1a24e6c33e Author: Artur Świgoń Date: Thu May 21 14:28:41 2020 +0200 interconnect: Allow inter-provider pairs to be configured This patch adds support for a new boolean 'inter_set' field in struct icc_provider. Setting it to 'true' enables calling '->set' for inter-provider node pairs. All existing users of the interconnect framework allocate this structure with kzalloc, and are therefore unaffected by this change. This makes it easier for hierarchies like exynos-bus, where every bus is probed separately and registers a separate interconnect provider, to model constraints between buses. Signed-off-by: Artur Świgoń Signed-off-by: Sylwester Nawrocki Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200521122841.8867-4-s.nawrocki@samsung.com Signed-off-by: Georgi Djakov commit 0259a41da3233744f6a3e7848430da13100423d6 Author: Artur Świgoń Date: Thu May 21 14:28:40 2020 +0200 interconnect: Relax requirement in of_icc_get_from_provider() This patch relaxes the condition in of_icc_get_from_provider() so that it is no longer required to set '#interconnect-cells' to <1> in the DT, and therefore it is not required to supply dummy node IDs in the 'interconnects' property when node IDs are dynamically generated rather than hardcoded (statically allocated). In case of the devfreq driver for exynos-bus, node IDs are dynamically allocated and '#interconnect-cells' is always zero. Signed-off-by: Artur Świgoń Acked-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20200521122841.8867-3-s.nawrocki@samsung.com Signed-off-by: Georgi Djakov commit 8a307d3601bcca99723b1a45e785adc3c9d3a476 Author: Artur Świgoń Date: Thu May 21 14:28:39 2020 +0200 interconnect: Export of_icc_get_from_provider() This patch makes the above function public (for use in exynos-bus devfreq driver). Signed-off-by: Artur Świgoń Reviewed-by: Krzysztof Kozlowski Reviewed-by: Chanwoo Choi Signed-off-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20200521122841.8867-2-s.nawrocki@samsung.com Signed-off-by: Georgi Djakov commit b001694d60fe4dafcd0dad2ae9f4d2f33c463ba1 Author: Robert Richter Date: Tue May 19 12:44:39 2020 +0200 EDAC/ghes: Remove unused members of struct ghes_edac_pvt, rename it to ghes_pvt The struct members list and ghes of struct ghes_edac_pvt are unused, remove them. On that occasion, rename it to the shorter name struct ghes_pvt. Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200519104443.15673-2-rrichter@marvell.com commit cb51a371d08e813b0be4253ad9efbc8488b69149 Author: Robert Richter Date: Thu May 28 12:13:06 2020 +0200 EDAC/ghes: Setup DIMM label from DMI and use it in error reports The ghes driver reports errors with 'unknown label' even if the actual DIMM label is known, e.g.: EDAC MC0: 1 CE Single-bit ECC on unknown label (node:0 card:0 module:0 rank:1 bank:0 col:13 bit_pos:16 DIMM location:N0 DIMM_A0 page:0x966a9b3 offset:0x0 grain:1 syndrome:0x0 - APEI location: node:0 card:0 module:0 rank:1 bank:0 col:13 bit_pos:16 DIMM location:N0 DIMM_A0 status(0x0000000000000400): Storage error in DRAM memory) Fix this by using struct dimm_info's label string in error reports: EDAC MC0: 1 CE Single-bit ECC on N0 DIMM_A0 (node:0 card:0 module:0 rank:1 bank:515 col:14 bit_pos:16 DIMM location:N0 DIMM_A0 page:0x99223d8 offset:0x0 grain:1 syndrome:0x0 - APEI location: node:0 card:0 module:0 rank:1 bank:515 col:14 bit_pos:16 DIMM location:N0 DIMM_A0 status(0x0000000000000400): Storage error in DRAM memory) The labels are initialized by reading the bank and device strings from DMI. Now, the label information can also read from sysfs. E.g. a ThunderX2 system will show the following: /sys/devices/system/edac/mc/mc0/dimm0/dimm_label:N0 DIMM_A0 /sys/devices/system/edac/mc/mc0/dimm1/dimm_label:N0 DIMM_B0 /sys/devices/system/edac/mc/mc0/dimm2/dimm_label:N0 DIMM_C0 /sys/devices/system/edac/mc/mc0/dimm3/dimm_label:N0 DIMM_D0 /sys/devices/system/edac/mc/mc0/dimm4/dimm_label:N0 DIMM_E0 /sys/devices/system/edac/mc/mc0/dimm5/dimm_label:N0 DIMM_F0 /sys/devices/system/edac/mc/mc0/dimm6/dimm_label:N0 DIMM_G0 /sys/devices/system/edac/mc/mc0/dimm7/dimm_label:N0 DIMM_H0 /sys/devices/system/edac/mc/mc0/dimm8/dimm_label:N1 DIMM_I0 /sys/devices/system/edac/mc/mc0/dimm9/dimm_label:N1 DIMM_J0 /sys/devices/system/edac/mc/mc0/dimm10/dimm_label:N1 DIMM_K0 /sys/devices/system/edac/mc/mc0/dimm11/dimm_label:N1 DIMM_L0 /sys/devices/system/edac/mc/mc0/dimm12/dimm_label:N1 DIMM_M0 /sys/devices/system/edac/mc/mc0/dimm13/dimm_label:N1 DIMM_N0 /sys/devices/system/edac/mc/mc0/dimm14/dimm_label:N1 DIMM_O0 /sys/devices/system/edac/mc/mc0/dimm15/dimm_label:N1 DIMM_P0 Since dimm_labels can be rewritten, that label will be used in a later error report: # echo foobar >/sys/devices/system/edac/mc/mc0/dimm0/dimm_label # # some error injection here # dmesg | grep foobar [ 751.383533] EDAC MC0: 1 CE Single-bit ECC on foobar (node:0 card:0 module:0 rank:1 bank:259 col:3 bit_pos:16 DIMM location:N0 DIMM_A0 page:0x8c8dc74 offset:0x0 grain:1 syndrome:0x0 - APEI location: node:0 card:0 module:0 rank:1 bank:259 col:3 bit_pos:16 DIMM location:N0 DIMM_A0 status(0x0000000000000400): Storage error in DRAM memory) [ bp: Remove curly brackets around a single if-statement in dimm_setup_label(). ] Signed-off-by: Robert Richter Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200528101307.23245-1-rrichter@marvell.com commit 3b9164c0f173127c8eee98e0e0b969908e3237d5 Author: Anson Huang Date: Mon May 11 19:57:42 2020 +0800 dt-bindings: reset: Convert i.MX7 reset to json-schema Convert the i.MX7 reset binding to DT schema format using json-schema. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Reviewed-by: Rob Herring Signed-off-by: Philipp Zabel commit a9701376ed0fb61a5be4bb438daf26bd9cfa24b5 Author: Maxime Ripard Date: Wed May 27 17:47:32 2020 +0200 reset: simple: Add reset callback The reset-simple code lacks a reset callback that is still pretty easy to implement. The only real thing to consider is the delay needed for a device to be reset, so let's expose that as part of the reset-simple driver data. Reviewed-by: Philipp Zabel Signed-off-by: Maxime Ripard Signed-off-by: Philipp Zabel commit 20c1b6996519caaaac2bd73d9e37d4f8e02a8016 Author: Anson Huang Date: Tue May 19 11:42:27 2020 +0800 dt-bindings: reset: Convert i.MX reset to json-schema Convert the i.MX reset binding to DT schema format using json-schema. Signed-off-by: Anson Huang Reviewed-by: Dong Aisheng Signed-off-by: Philipp Zabel commit 9357b04624013294e4204b1a837d0a611b9048c3 Author: Maxime Ripard Date: Wed May 27 17:47:31 2020 +0200 reset: Move reset-simple header out of drivers/reset The reset-simple code can be useful for drivers outside of drivers/reset that have a few reset controls as part of their features. Let's move it to include/linux/reset. Reviewed-by: Philipp Zabel Signed-off-by: Maxime Ripard Signed-off-by: Philipp Zabel commit e7daa3810f62b66cd2cf77cbc0c7f8b09076f6f5 Author: Masanari Iida Date: Mon Jun 15 21:11:51 2020 +0900 drm/kselftest: fix spellint typo in test-drm_mm.c This patch fix a spelling typo in test-drm_mm.c Signed-off-by: Masanari Iida Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200615121151.1557985-1-standby24x7@gmail.com commit 7cbb93d89838bc65f9763fd93bb4b1e6608a9504 Author: Daniel Vetter Date: Wed Apr 15 09:40:32 2020 +0200 drm/ast: Use managed pci functions Allows us to remove a bit of cleanup code. Reviewed-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: Emil Velikov Cc: "Noralf Trønnes" Cc: Sam Ravnborg Cc: "Christian König" Cc: "Y.C. Chen" Link: https://patchwork.freedesktop.org/patch/msgid/20200415074034.175360-58-daniel.vetter@ffwll.ch commit 668b1508cf9e3dfd1bfad4f4906d1eaeae0a4015 Author: Jack Yu Date: Tue Jun 16 10:36:44 2020 +0800 ASoC: rt1015: Flush DAC data before playback. Flush DAC data before playback. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20200616023644.4523-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit 21a827bf1c9a4ce67938251f3211e5c13eef51bc Author: Diego Rondini Date: Mon Jun 15 15:02:25 2020 +0200 ARM: dts: orange-pi-zero-plus2: add leds configuration Add pwr and status leds configuration and turn on pwr led by default for Orange Pi Zero Plus 2 (both H3 and H5 variants). Signed-off-by: Diego Rondini Link: https://lore.kernel.org/r/20200615130223.34464-2-diego.rondini@kynetics.com Signed-off-by: Maxime Ripard commit 43aad09c792894727d8f6914534f43df23079926 Author: Diego Rondini Date: Mon Jun 15 15:02:23 2020 +0200 ARM: dts: orange-pi-zero-plus2: enable USB OTG port Enable support for USB OTG port on Orange Pi Zero Plus 2 (both H3 and H5 variants). As, according to the board schematics, the USB OTG port cannot provide power to external devices, we set dr_mode to peripheral. Signed-off-by: Diego Rondini Link: https://lore.kernel.org/r/20200615130223.34464-1-diego.rondini@kynetics.com Signed-off-by: Maxime Ripard commit 1689dcd433aaa0d32dec3fdb4bd166a0d38f4bbf Author: Guru Das Srinagesh Date: Tue Jun 2 15:31:11 2020 -0700 pwm: imx27: Use 64-bit division macro Since the PWM framework is switching struct pwm_state.period's datatype to u64, prepare for this transition by using DIV_ROUND_UP_ULL to handle a 64-bit dividend. Signed-off-by: Guru Das Srinagesh Signed-off-by: Thierry Reding commit fcdea6b2a3f6508618e39e061073a18c55993a1b Author: Guru Das Srinagesh Date: Tue Jun 2 15:31:09 2020 -0700 pwm: imx-tpm: Use 64-bit division macro Since the PWM framework is switching struct pwm_state.period's datatype to u64, prepare for this transition by using DIV64_U64_ROUND_CLOSEST to handle a 64-bit divisor. Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Signed-off-by: Guru Das Srinagesh Signed-off-by: Thierry Reding commit 5bd0b9011da836dad1a00d92ebead7eaa87f5fe3 Author: Guru Das Srinagesh Date: Tue Jun 2 15:31:08 2020 -0700 pwm: clps711x: Use 64-bit division macro Since the PWM framework is switching struct pwm_args.period's datatype to u64, prepare for this transition by using DIV64_U64_ROUND_CLOSEST to handle a 64-bit divisor. Cc: Daniel Thompson Signed-off-by: Guru Das Srinagesh Signed-off-by: Thierry Reding commit f3e4b14144a928c097e2d526f6dcd6ba0f5eba8a Author: Guru Das Srinagesh Date: Tue Jun 2 15:31:06 2020 -0700 hwmon: pwm-fan: Use 64-bit division macro Since the PWM framework is switching struct pwm_args.period's datatype to u64, prepare for this transition by using DIV_ROUND_UP_ULL to handle a 64-bit dividend. Signed-off-by: Guru Das Srinagesh Acked-by: Guenter Roeck Signed-off-by: Thierry Reding commit 899c537c25f9547a0f591ed2013be0f9f68f2df3 Author: Guru Das Srinagesh Date: Tue Jun 2 15:31:05 2020 -0700 drm/i915: Use 64-bit division macro Since the PWM framework is switching struct pwm_state.duty_cycle's datatype to u64, prepare for this transition by using DIV_ROUND_UP_ULL to handle a 64-bit dividend. Signed-off-by: Guru Das Srinagesh Reviewed-by: Jani Nikula Acked-by: Jani Nikula Signed-off-by: Thierry Reding commit f0fe00d4972a8cd4b98cc2c29758615e4d51cdfe Author: glider@google.com Date: Tue Jun 16 10:34:35 2020 +0200 security: allow using Clang's zero initialization for stack variables In addition to -ftrivial-auto-var-init=pattern (used by CONFIG_INIT_STACK_ALL now) Clang also supports zero initialization for locals enabled by -ftrivial-auto-var-init=zero. The future of this flag is still being debated (see https://bugs.llvm.org/show_bug.cgi?id=45497). Right now it is guarded by another flag, -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang, which means it may not be supported by future Clang releases. Another possible resolution is that -ftrivial-auto-var-init=zero will persist (as certain users have already started depending on it), but the name of the guard flag will change. In the meantime, zero initialization has proven itself as a good production mitigation measure against uninitialized locals. Unlike pattern initialization, which has a higher chance of triggering existing bugs, zero initialization provides safe defaults for strings, pointers, indexes, and sizes. On the other hand, pattern initialization remains safer for return values. Chrome OS and Android are moving to using zero initialization for production builds. Performance-wise, the difference between pattern and zero initialization is usually negligible, although the generated code for zero initialization is more compact. This patch renames CONFIG_INIT_STACK_ALL to CONFIG_INIT_STACK_ALL_PATTERN and introduces another config option, CONFIG_INIT_STACK_ALL_ZERO, that enables zero initialization for locals if the corresponding flags are supported by Clang. Cc: Kees Cook Cc: Nick Desaulniers Cc: Greg Kroah-Hartman Signed-off-by: Alexander Potapenko Link: https://lore.kernel.org/r/20200616083435.223038-1-glider@google.com Reviewed-by: Maciej Żenczykowski Signed-off-by: Kees Cook commit 3ba3ff5c0966280bfd1d40b05b1d7c089f45cc9b Author: Jan Kiszka Date: Mon Jun 15 15:22:29 2020 +0200 gpio: pca953x: Add support for the PCAL9535 The PCAL9535 is compatible to the PCA9535. Additionally, it comes with interrupt support and input latching. Other features are not supported by the GPIO subsystem. Datasheet: https://www.nxp.com/docs/en/data-sheet/PCAL9535A.pdf Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit ee0f054fb5379e828137e0ff04188477459ce44c Author: Jan Kiszka Date: Mon Jun 15 15:22:28 2020 +0200 dt-bindings: gpio: pca953x: add nxp,pcal9535 The NXP PCAL9535 is an extended variant of the PCA9535. Signed-off-by: Jan Kiszka Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit f46fe79ff1b65692a65266a5bec6dbe2bf7fc70f Author: Drew Fustini Date: Mon Jun 8 14:51:43 2020 +0200 pinctrl-single: fix pcs_parse_pinconf() return value This patch causes pcs_parse_pinconf() to return -ENOTSUPP when no pinctrl_map is added. The current behavior is to return 0 when !PCS_HAS_PINCONF or !nconfs. Thus pcs_parse_one_pinctrl_entry() incorrectly assumes that a map was added and sets num_maps = 2. Analysis: ========= The function pcs_parse_one_pinctrl_entry() calls pcs_parse_pinconf() if PCS_HAS_PINCONF is enabled. The function pcs_parse_pinconf() returns 0 to indicate there was no error and num_maps is then set to 2: 980 static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs, 981 struct device_node *np, 982 struct pinctrl_map **map, 983 unsigned *num_maps, 984 const char **pgnames) 985 { 1053 (*map)->type = PIN_MAP_TYPE_MUX_GROUP; 1054 (*map)->data.mux.group = np->name; 1055 (*map)->data.mux.function = np->name; 1056 1057 if (PCS_HAS_PINCONF && function) { 1058 res = pcs_parse_pinconf(pcs, np, function, map); 1059 if (res) 1060 goto free_pingroups; 1061 *num_maps = 2; 1062 } else { 1063 *num_maps = 1; 1064 } However, pcs_parse_pinconf() will also return 0 if !PCS_HAS_PINCONF or !nconfs. I believe these conditions should indicate that no map was added by returning -ENOTSUPP. Otherwise pcs_parse_one_pinctrl_entry() will set num_maps = 2 even though no maps were successfully added, as it does not reach "m++" on line 940: 895 static int pcs_parse_pinconf(struct pcs_device *pcs, struct device_node *np, 896 struct pcs_function *func, 897 struct pinctrl_map **map) 898 899 { 900 struct pinctrl_map *m = *map; 917 /* If pinconf isn't supported, don't parse properties in below. */ 918 if (!PCS_HAS_PINCONF) 919 return 0; 920 921 /* cacluate how much properties are supported in current node */ 922 for (i = 0; i < ARRAY_SIZE(prop2); i++) { 923 if (of_find_property(np, prop2[i].name, NULL)) 924 nconfs++; 925 } 926 for (i = 0; i < ARRAY_SIZE(prop4); i++) { 927 if (of_find_property(np, prop4[i].name, NULL)) 928 nconfs++; 929 } 930 if (!nconfs) 919 return 0; 932 933 func->conf = devm_kcalloc(pcs->dev, 934 nconfs, sizeof(struct pcs_conf_vals), 935 GFP_KERNEL); 936 if (!func->conf) 937 return -ENOMEM; 938 func->nconfs = nconfs; 939 conf = &(func->conf[0]); 940 m++; This situtation will cause a boot failure [0] on the BeagleBone Black (AM3358) when am33xx_pinmux node in arch/arm/boot/dts/am33xx-l4.dtsi has compatible = "pinconf-single" instead of "pinctrl-single". The patch fixes this issue by returning -ENOSUPP when !PCS_HAS_PINCONF or !nconfs, so that pcs_parse_one_pinctrl_entry() will know that no map was added. Logic is also added to pcs_parse_one_pinctrl_entry() to distinguish between -ENOSUPP and other errors. In the case of -ENOSUPP, num_maps is set to 1 as it is valid for pinconf to be enabled and a given pin group to not any pinconf properties. [0] https://lore.kernel.org/linux-omap/20200529175544.GA3766151@x1/ Fixes: 9dddb4df90d1 ("pinctrl: single: support generic pinconf") Signed-off-by: Drew Fustini Acked-by: Tony Lindgren Link: https://lore.kernel.org/r/20200608125143.GA2789203@x1 Signed-off-by: Linus Walleij commit bcad94d7b7c13b123ed4ded86544667cfbfb1aa7 Author: Paul Cercueil Date: Sun Jun 7 19:42:43 2020 +0200 pinctrl: ingenic: Add NAND FRE/FWE pins for JZ4740 Add the FRE/FWE pins for the JZ4740. These pins must be in function #0 for the NAND to work. The reason it worked before was because the bootloader did set these pins to the correct function beforehand. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20200607174243.2361664-1-paul@crapouillou.net Signed-off-by: Linus Walleij commit a9b9b2af40c717adbc4981acd29c53b92be3a99a Author: Wang Qing Date: Mon Jun 15 16:54:02 2020 +0800 backlight: lm3533_bl: Use kobj_to_dev() instead Use kobj_to_dev() instead of container_of() Signed-off-by: Wang Qing Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit b1bf66d1d5a8fcb54f0e584db5d196ef015b5172 Author: Stanley Chu Date: Thu Jun 11 18:10:43 2020 +0800 scsi: ufs: Fix imprecise load calculation in devfreq window The UFS load calculation is based on "total_time" and "busy_time" in a devfreq window. However, the source of time is different for both parameters: "busy_time" is assigned from "jiffies" thus has different accuracy from "total_time" which is assigned from ktime_get(). In addition, the time of window boundary is not exactly the same as the starting busy time in this window if UFS is actually busy in the beginning of the window. A similar accuracy error may also happen for the end of busy time in current window. To guarantee the precision of load calculation, we need to 1. Align time accuracy of both devfreq_dev_status.total_time and devfreq_dev_status.busy_time. For example, use "ktime_get()" directly. 2. Align the following timelines: - The beginning time of devfreq windows - The beginning of busy time in a new window - The end of busy time in the current window Link: https://lore.kernel.org/r/20200611101043.6379-1-stanley.chu@mediatek.com Fixes: a3cd5ec55f6c ("scsi: ufs: add load based scaling of UFS gear") Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit aa5c697988b4c7e1077de1e2eb2298114d531736 Author: Stanley Chu Date: Mon Jun 15 15:22:35 2020 +0800 scsi: ufs: Add trace event for UIC commands Use the ftrace infrastructure to conditionally trace UFS UIC command events. New trace event "ufshcd_uic_command" is created, which samples the following UFS UIC command data: - Device name - Optional identification string - UIC command opcode - UIC command argument1 - UIC command argument2 - UIC command argement3 Usage: echo 1 > /sys/kernel/debug/tracing/events/ufs/enable cat /sys/kernel/debug/tracing/trace_pipe Link: https://lore.kernel.org/r/20200615072235.23042-3-stanley.chu@mediatek.com Acked-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 7a7df52dbc71d2aa4272664ebc9ad44ab317ae53 Author: Stanley Chu Date: Mon Jun 15 15:22:34 2020 +0800 scsi: ufs: Remove unused field in struct uic_command Remove unused fields "cmd_active" and "result" in struct ufs_command. Link: https://lore.kernel.org/r/20200615072235.23042-2-stanley.chu@mediatek.com Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit ed0b40ffa3642f1e6733fae68a06cf069d1a7e42 Author: Stanley Chu Date: Fri Jun 12 09:26:25 2020 +0800 scsi: ufs: Clean up device vendor name and device quirk table Clean up the following items: - Sort vendor names in alphabetical order - Squash quirks as compact as possible in device table to enhance performance of the lookup - Sort device quirks in alphabetical order Link: https://lore.kernel.org/r/20200612012625.6615-3-stanley.chu@mediatek.com Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit c0a18ee0ce78d7957ec1a53be35b1b3beba80668 Author: Stanley Chu Date: Fri Jun 12 09:26:24 2020 +0800 scsi: ufs: Add DELAY_BEFORE_LPM quirk for Micron devices It is confirmed that Micron device needs DELAY_BEFORE_LPM quirk to have a delay before VCC is powered off. Sdd Micron vendor ID and this quirk for Micron devices. Link: https://lore.kernel.org/r/20200612012625.6615-2-stanley.chu@mediatek.com Reviewed-by: Bean Huo Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 896c9b4907c59c3f24f27ae7f2a57bda0f3476f3 Author: Flavio Suligoi Date: Tue Jun 9 18:13:13 2020 +0200 scsi: mpt3sas: Fix spelling mistake Fix typo: "tigger" --> "trigger" Link: https://lore.kernel.org/r/20200609161313.32098-1-f.suligoi@asem.it Signed-off-by: Flavio Suligoi Signed-off-by: Martin K. Petersen commit 0a19a725c0ede422e8510283c0c08e1a8f5b3486 Author: Kieran Bingham Date: Tue Jun 9 13:45:59 2020 +0100 scsi: Fix trivial spelling The word 'descriptor' is misspelled throughout the tree. Fix it up accordingly: decriptors -> descriptors Link: https://lore.kernel.org/r/20200609124610.3445662-7-kieran.bingham+renesas@ideasonboard.com Signed-off-by: Kieran Bingham Signed-off-by: Martin K. Petersen commit 673511199ac9d1cdd84b91f01413ac8ca30c8914 Author: Bean Huo Date: Fri Jun 5 22:05:19 2020 +0200 scsi: ufs: Add SPDX GPL-2.0 to replace GPL v2 boilerplate Add SPDX GPL-2.0 to UFS driver files that specified the GPL version 2 license, remove the full boilerplate text. Link: https://lore.kernel.org/r/20200605200520.20831-2-huobean@gmail.com Reviewed-by: Tomas Winkler Reviewed-by: Alim Akhtar Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 72fb690eece12a344e6ce5a7c192a304fd37e04e Author: Bean Huo Date: Wed Jun 3 11:19:59 2020 +0200 scsi: ufs: Add compatibility with 3.1 UFS unit descriptor length For UFS 3.1, the normal unit descriptor is 10 bytes larger than the RPMB unit. However, both descriptors share the same desc_idn, to cover both unit descriptors with one length, we choose the normal unit descriptor length by desc_index. Link: https://lore.kernel.org/r/20200603091959.27618-6-huobean@gmail.com Reviewed-by: Avri Altman Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 7a0bf85b5e1859bfd40a07279d20edd847265702 Author: Bean Huo Date: Wed Jun 3 11:19:58 2020 +0200 scsi: ufs: Clean up ufs initialization path At UFS initialization stage, to get the length of the descriptor, ufshcd_read_desc_length() was being called 6 times. Instead, we will capture the descriptor size the first time we'll read it. Delete unnecessary redundant code, remove ufshcd_read_desc_length(), ufshcd_init_desc_sizes(), and boost UFS initialization. Link: https://lore.kernel.org/r/20200603091959.27618-5-huobean@gmail.com Acked-by: Avri Altman Reviewed-by: Bart van Assche Reviewed-by: Stanley Chu Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit cbe193f6f093b79fd1ab998dd95f73f874fb4733 Author: Bean Huo Date: Wed Jun 3 11:19:57 2020 +0200 scsi: ufs: Fix potential NULL pointer access during memcpy If param_offset is not 0, the memcpy length shouldn't be the true descriptor length. Link: https://lore.kernel.org/r/20200603091959.27618-4-huobean@gmail.com Acked-by: Avri Altman Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit c4607a09450d672a78735de14f0108204491f49a Author: Bean Huo Date: Wed Jun 3 11:19:56 2020 +0200 scsi: ufs: Delete ufshcd_read_desc() Delete ufshcd_read_desc(). Instead, let caller directly call ufshcd_read_desc_param(). Link: https://lore.kernel.org/r/20200603091959.27618-3-huobean@gmail.com Reviewed-by: Avri Altman Reviewed-by: Bart van Assche Reviewed-by: Stanley Chu Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit 458a45f5262b294e68c0f3ecb5db76d1be757a33 Author: Bean Huo Date: Wed Jun 3 11:19:55 2020 +0200 scsi: ufs: Remove max_t in ufs_get_device_desc For the UFS device, the maximum descriptor size is 255, max_t called on ufs_get_device_desc() is useless. Link: https://lore.kernel.org/r/20200603091959.27618-2-huobean@gmail.com Reviewed-by: Stanley Chu Acked-by: Avri Altman Signed-off-by: Bart van Assche Signed-off-by: Bean Huo Signed-off-by: Martin K. Petersen commit fc4983018fea1237e027a9fc6530a3e04850fbfa Author: Stanley Chu Date: Mon Jun 1 18:46:46 2020 +0800 scsi: ufs-mediatek: Allow unbound mphy Allow unbound MPHY module since not every MediaTek UFS platform needs specific MPHY control. Link: https://lore.kernel.org/r/20200601104646.15436-6-stanley.chu@mediatek.com Reviewed-by: Peter Wang Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 561e3a8726b2dd94ce75cad6c9cab211551f368a Author: Stanley Chu Date: Mon Jun 1 18:46:45 2020 +0800 scsi: ufs-mediatek: Fix unbalanced clock on/off MediaTek UFS clocks are separated to two parts and controlled by different modules: ufs-mediatek and phy-ufs-mediatek. If both Auto-Hibern8 and clk-gating feature are enabled, mphy power control is not balanced thus unbalanced control also happens to the clocks probed by phy-ufs-mediatek module. Fix this issue by: - Promise usage of phy_power_on/off balanced - Remove phy_power_on/off control in suspend/resume vops since both can be handled in setup_clock vops only Link: https://lore.kernel.org/r/20200601104646.15436-5-stanley.chu@mediatek.com Reviewed-by: Peter Wang Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 488edafb1120f715bebd80b6fe4089f83fb082b2 Author: Stanley Chu Date: Mon Jun 1 18:46:44 2020 +0800 scsi: ufs-mediatek: Introduce low-power mode for device power supply Allow device power supply to enter low-power mode. Link: https://lore.kernel.org/r/20200601104646.15436-4-stanley.chu@mediatek.com Reviewed-by: Pengshun Zhao Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 9006e3986f6689897c2f1ede2671656b1cb41582 Author: Stanley Chu Date: Mon Jun 1 18:46:43 2020 +0800 scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is not entered yet There is a chance that link enters hibern8 via auto-hibern8 scheme during the clock-gating flow. Clocks shall not be gated if link is still active otherwise host or device may hang. Fix this by returning error code to the caller __ufshcd_setup_clocks() to skip gating clocks there if link is not confirmed in hibern8 state yet. Also allow some waiting time for the hibern8 state transition. Link: https://lore.kernel.org/r/20200601104646.15436-3-stanley.chu@mediatek.com Reviewed-by: Andy Teng Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit fb43337cd4cff6639b174e3b6766e6eade523836 Author: Stanley Chu Date: Mon Jun 1 18:46:42 2020 +0800 scsi: ufs-mediatek: Fix imprecise waiting time for ref-clk control Currently ref-clk control timeout is implemented by jiffies. However jiffies is not accurate enough thus "false timeout" may happen. Use more accurate delay mechanism instead, i.e. ktime. Link: https://lore.kernel.org/r/20200601104646.15436-2-stanley.chu@mediatek.com Reviewed-by: Andy Teng Reviewed-by: Avri Altman Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 42fd4f2513843a7273066e6c0cd7e5c4d9834090 Merge: 75bc1138ab2b8 6383b118efaff Author: Mark Brown Date: Tue Jun 16 00:38:42 2020 +0100 Merge series "Add MSIOF support for R8A7742 SOC" from Lad Prabhakar : Hi All, This patch series adds support for MSIOF on R8A7742 SOC. Cheers, Prabhakar Lad Prabhakar (2): dt-bindings: spi: renesas,sh-msiof: Add r8a7742 support ARM: dts: r8a7742: Add MSIOF[0123] support .../devicetree/bindings/spi/renesas,sh-msiof.yaml | 1 + arch/arm/boot/dts/r8a7742.dtsi | 64 ++++++++++++++++++++++ 2 files changed, 65 insertions(+) -- 2.7.4 commit 75bc1138ab2b82ac7351592a81f91b0424654a87 Merge: 731f1e71f2655 ba2137f3dbce5 Author: Mark Brown Date: Tue Jun 16 00:38:41 2020 +0100 Merge series "spi: bcm63xx: add BMIPS support" from Álvaro Fernández Rojas : BCM63xx SPI and HSSPI controller are present on several BMIPS SoCs (BCM6318, BCM6328, BCM6358, BCM6362, BCM6368 and BCM63268). v2: use devm_reset_control_get_exclusive Álvaro Fernández Rojas (4): spi: bcm63xx-spi: add reset support spi: bcm63xx-spi: allow building for BMIPS spi: bcm63xx-hsspi: add reset support spi: bcm63xx-hsspi: allow building for BMIPS drivers/spi/Kconfig | 4 ++-- drivers/spi/spi-bcm63xx-hsspi.c | 17 +++++++++++++++++ drivers/spi/spi-bcm63xx.c | 17 +++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) -- 2.27.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 731f1e71f2655caf611540d43bfee3bb0b481f4e Merge: e8510d43f219b 1fccd182a4694 Author: Mark Brown Date: Tue Jun 16 00:38:40 2020 +0100 Merge series "Add more configuration and regmap support for spi-altera" from Xu Yilun : This patchset adds platform_data for spi-altera, to enable more IP configurations, and creating specific spi client devices. It also adds regmap support, to enable the indirect access to this IP. We have a PCIE based FPGA platform which integrates this IP to communicate with a BMC chip (Intel MAX10) over SPI. The IP is configured as 32bit data width. There is also an indirect access interface in FPGA for host to access the registers of this IP. This patchset enables this use case. Matthew Gerlach (1): spi: altera: fix size mismatch on 64 bit processors Xu Yilun (5): spi: altera: add 32bit data width transfer support. spi: altera: add SPI core parameters support via platform data. spi: altera: add platform data for slave information. spi: altera: use regmap instead of direct mmio register access spi: altera: move driver name string to header file drivers/spi/Kconfig | 1 + drivers/spi/spi-altera.c | 161 +++++++++++++++++++++++++++++++++++++-------- include/linux/spi/altera.h | 37 +++++++++++ 3 files changed, 171 insertions(+), 28 deletions(-) create mode 100644 include/linux/spi/altera.h -- 2.7.4 commit e8510d43f219beff1f426080049a5462148afd2f Author: Tim Harvey Date: Thu May 28 08:46:39 2020 -0700 spi: spi-cavium-thunderx: flag controller as half duplex The OcteonTX (TX1/ThunderX) SPI controller does not support full duplex transactions. Set the appropriate flag such that the spi core will return -EINVAL on such transactions requested by chip drivers. This is an RFC as I need someone from Marvell/Cavium to confirm if this driver is used for other silicon that does support full duplex transfers (in which case we will need to identify that we are running on the ThunderX arch before setting the flag). Signed-off-by: Tim Harvey Cc: Robert Richter Link: https://lore.kernel.org/r/1590680799-5640-1-git-send-email-tharvey@gateworks.com Signed-off-by: Mark Brown commit eb8d6d464a27850498dced21a8450e85d4a02009 Author: Sergei Shtylyov Date: Sat Jun 13 22:18:34 2020 +0300 spi: add Renesas RPC-IF driver Add the SPI driver for the Renesas RPC-IF. It's the "front end" driver using the "back end" APIs in the main driver to talk to the real hardware. We only implement the 'spi-mem' interface -- there's no need to implement the usual SPI driver methods... Based on the original patch by Mason Yang . Signed-off-by: Sergei Shtylyov Link: https://lore.kernel.org/r/1ece0e6c-71af-f0f1-709e-571f4b0b4853@cogentembedded.com Signed-off-by: Mark Brown commit ba2137f3dbce5e530eba0c67d37a758b42eb26f8 Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:09:43 2020 +0200 spi: bcm63xx-hsspi: allow building for BMIPS bcm63xx-hsspi controller is present on several BMIPS SoCs (BCM6318, BCM6328, BCM6362 and BCM63268). Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200615090943.2936839-5-noltari@gmail.com Signed-off-by: Mark Brown commit 3a521450ff218ddac9b2c15fcd2bcadab56ff79d Author: Álvaro Fernández Rojas Date: Mon Jun 15 11:09:41 2020 +0200 spi: bcm63xx-spi: allow building for BMIPS bcm63xx-spi controller is present on several BMIPS SoCs (BCM6358, BCM6362, BCM6368 and BCM63268). Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20200615090943.2936839-3-noltari@gmail.com Signed-off-by: Mark Brown commit 6383b118efafff8cce8fc8fa5b7e893a523b698f Author: Lad Prabhakar Date: Tue Jun 9 21:54:13 2020 +0100 spi: renesas,sh-msiof: Add r8a7742 support Document RZ/G1H (R8A7742) SoC bindings. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1591736054-568-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Mark Brown commit 1fccd182a4694a848f2d6f3b1820d6fc71d9c99d Author: Xu Yilun Date: Thu Jun 11 11:25:08 2020 +0800 spi: altera: add platform data for slave information. This patch introduces platform data for slave information, it allows spi-altera to add new spi devices once master registration is done. Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Signed-off-by: Matthew Gerlach Signed-off-by: Russ Weight Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/1591845911-10197-4-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit 8e04187c1bc7953f6dfad3400c58b1b0b0ad767b Author: Xu Yilun Date: Thu Jun 11 11:25:07 2020 +0800 spi: altera: add SPI core parameters support via platform data. This patch introduced SPI core parameters in platform data, it allows passing these SPI core parameters via platform data. Signed-off-by: Wu Hao Signed-off-by: Xu Yilun Signed-off-by: Matthew Gerlach Signed-off-by: Russ Weight Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/1591845911-10197-3-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit 3011d314751535782508a86bbd8de415ea99909f Author: Xu Yilun Date: Thu Jun 11 11:25:06 2020 +0800 spi: altera: add 32bit data width transfer support. Add support for 32bit width data register, then it supports 32bit data width spi slave device and spi transfers. Signed-off-by: Xu Yilun Signed-off-by: Wu Hao Signed-off-by: Matthew Gerlach Signed-off-by: Russ Weight Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/1591845911-10197-2-git-send-email-yilun.xu@intel.com Signed-off-by: Mark Brown commit 0ac87aed5b5ddf734423505b73ce815d67a20113 Merge: d3f3723387f97 8d9f8d57e0238 Author: Mark Brown Date: Mon Jun 15 23:06:31 2020 +0100 Merge series "Add support for voltage regulator on ChromeOS EC." from Pi-Hsun Shih : Add support for controlling voltage regulator that is connected and controlled by ChromeOS EC. Kernel controls these regulators through newly added EC host commands. Changes from v5: * Move new host command to a separate patch. * Use devm_regulator_register. * Address review comments. Changes from v4: * Change compatible name from regulator-cros-ec to cros-ec-regulator. Changes from v3: * Fix dt bindings file name. * Remove check around CONFIG_OF in driver. * Add new host commands to cros_ec_trace. * Address review comments. Changes from v2: * Add 'depends on OF' to Kconfig. * Add Kconfig description about compiling as module. Changes from v1: * Change compatible string to google,regulator-cros-ec. * Use reg property in device tree. * Change license for dt binding according to checkpatch.pl. * Address comments on code styles. Pi-Hsun Shih (3): dt-bindings: regulator: Add DT binding for cros-ec-regulator platform/chrome: cros_ec: Add command for regulator control. regulator: Add driver for cros-ec-regulator .../regulator/google,cros-ec-regulator.yaml | 51 ++++ drivers/platform/chrome/cros_ec_trace.c | 5 + drivers/regulator/Kconfig | 10 + drivers/regulator/Makefile | 1 + drivers/regulator/cros-ec-regulator.c | 257 ++++++++++++++++++ .../linux/platform_data/cros_ec_commands.h | 82 ++++++ 6 files changed, 406 insertions(+) create mode 100644 Documentation/devicetree/bindings/regulator/google,cros-ec-regulator.yaml create mode 100644 drivers/regulator/cros-ec-regulator.c base-commit: b791d1bdf9212d944d749a5c7ff6febdba241771 -- 2.27.0.290.gba653c62da-goog commit d3f3723387f97118c337689fc73e4199fb4331ce Author: Kieran Bingham Date: Tue Jun 9 13:46:02 2020 +0100 regulator: Fix trivial spelling The word 'descriptor' is misspelled throughout the tree. Fix it up accordingly: decriptors -> descriptors Signed-off-by: Kieran Bingham Link: https://lore.kernel.org/r/20200609124610.3445662-10-kieran.bingham+renesas@ideasonboard.com Signed-off-by: Mark Brown commit 1f0b740004f09d2f1b716fd6c2fdca81004ded05 Author: Kieran Bingham Date: Tue Jun 9 13:46:09 2020 +0100 regulator: gpio: Fix trivial spelling decriptor -> descriptor. Signed-off-by: Kieran Bingham Link: https://lore.kernel.org/r/20200609124610.3445662-17-kieran.bingham+renesas@ideasonboard.com Signed-off-by: Mark Brown commit 8807e15597492331992a0d749a90a291afa1ed7b Author: Qiuxu Zhuo Date: Sat May 9 09:08:22 2020 +0800 EDAC, {skx,i10nm}: Use CPU stepping macro to pass configurations Use the X86_MATCH_INTEL_FAM6_MODEL_STEPPINGS() macro to pass CPU stepping specific configurations to {skx,i10nm}_init(), so can delete the CPU stepping check from 10nm_init(). Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20200509010822.76331-1-qiuxu.zhuo@intel.com commit 8d9f8d57e023893bfa708d83e3a787e77766a378 Author: Pi-Hsun Shih Date: Fri Jun 12 12:05:20 2020 +0800 regulator: Add driver for cros-ec-regulator Add driver for cros-ec-regulator, representing a voltage regulator that is connected and controlled by ChromeOS EC, and is controlled by kernel with EC host commands. Signed-off-by: Pi-Hsun Shih Reviewed-by: Prashant Malani Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200612040526.192878-4-pihsun@chromium.org Signed-off-by: Mark Brown commit dff08caf35ecef4f7647f8b1e40877a254852a2b Author: Pi-Hsun Shih Date: Fri Jun 12 12:05:19 2020 +0800 platform/chrome: cros_ec: Add command for regulator control. Add host commands for voltage regulator control through ChromeOS EC. Signed-off-by: Pi-Hsun Shih Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200612040526.192878-3-pihsun@chromium.org Signed-off-by: Mark Brown commit 54bd53b9c11ed856abeedbf1ce92a19b546f56cf Author: Pi-Hsun Shih Date: Fri Jun 12 12:05:18 2020 +0800 dt-bindings: regulator: Add DT binding for cros-ec-regulator Add DT binding documentation for cros-ec-regulator, a voltage regulator controlled by ChromeOS EC. Signed-off-by: Pi-Hsun Shih Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20200612040526.192878-2-pihsun@chromium.org Signed-off-by: Mark Brown commit 9fb9b7715e5e08b58e70b9fcaf1f3072fbf99a22 Author: Bartosz Golaszewski Date: Mon Jun 15 09:25:07 2020 +0200 regmap: remove stray space There are two spaces between arguments in regmap_fields_update_bits_base() so remove one. Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200615072507.11303-1-brgl@bgdev.pl Signed-off-by: Mark Brown commit 4b9e7edb5afc4e3c27d6623f5008bf53ae96cf1a Author: Bartosz Golaszewski Date: Mon Jun 15 09:23:13 2020 +0200 regmap: convert all regmap_update_bits() and co. macros to static inlines There's no reason to have these as macros. Let's convert them all to static inlines for better readability and stronger typing. Suggested-by: Mark Brown Signed-off-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20200615072313.11106-1-brgl@bgdev.pl Signed-off-by: Mark Brown commit 1cdd255a58e9dabf39c983529fec790c328674d5 Merge: d8bc1b052e8d9 d73d682a9e87f Author: Mark Brown Date: Mon Jun 15 21:43:55 2020 +0100 Merge series "ASoC: fsl_easrc: Fix several warnings" from Shengjiu Wang : Fix several warnings with "make W=1" Shengjiu Wang (3): ASoC: fsl_easrc: Fix -Wmissing-prototypes warning ASoC: fsl_easrc: Fix -Wunused-but-set-variable ASoC: fsl_easrc: Fix "Function parameter not described" warnings sound/soc/fsl/fsl_easrc.c | 42 +++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 24 deletions(-) -- 2.21.0 commit d8bc1b052e8d957a0e81b466d78c39b212445468 Merge: 674b928986688 e16caedf73714 Author: Mark Brown Date: Mon Jun 15 21:43:54 2020 +0100 Merge series "ASoC: Intel: Add KeemBay ASoC platform driver" from Sia Jee Heng : The below series of patches support the KeemBay ASoC platform driver. The platform driver initialize the i2s to capture and playback the pcm data on the ARM. The i2s is running in polling mode. There is no DSP in the KeemBay SoC. Users are rely on the Gstreamer plugin to perform Audio preprocessing. Audio graph card is used to connect the platform driver with the tlv320aic3204 codec. Change History: v5: - Remove OF dependency from Kconfig as OF is shifted to audio graph card. v4: - Reduce if-otology at the tx/rx function. - Fix indentation. - specify .rate directly v3: - Adjusted header format. - Use Audio graph card instead of custom sound card. - Use if-else instead of conditional operator. - Enabled .set_fmt to configure master clock. v2: - Corrected I2S naming for DT binding. v1: - Initial version. Sia Jee Heng (3): ASoC: Intel: Add KeemBay platform driver ASoC: Intel: Add makefiles and kconfig changes for KeemBay dt-bindings: sound: Add documentation for KeemBay i2s .../bindings/sound/intel,keembay-i2s.yaml | 68 +++ sound/soc/intel/Kconfig | 7 + sound/soc/intel/Makefile | 1 + sound/soc/intel/keembay/Makefile | 4 + sound/soc/intel/keembay/kmb_platform.c | 654 +++++++++++++++++++++ sound/soc/intel/keembay/kmb_platform.h | 145 +++++ 6 files changed, 879 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml create mode 100644 sound/soc/intel/keembay/Makefile create mode 100644 sound/soc/intel/keembay/kmb_platform.c create mode 100644 sound/soc/intel/keembay/kmb_platform.h -- 1.9.1 commit 570af07d794fc746c42f0aeaaa82362416f33a54 Author: Chris Wilson Date: Mon Jun 15 19:39:35 2020 +0100 drm/i915/gt: Don't flush the tasklet if not setup If the tasklet is not being used, don't try and flush it. Fixes: 594893870044 ("drm/i915/gt: Add a safety submission flush in the heartbeat") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200615183935.17389-1-chris@chris-wilson.co.uk commit 674b928986688e5076bcab4fbe2175fd7021ea0b Merge: c42d8c17a9523 1d5cd5254f67b Author: Mark Brown Date: Mon Jun 15 20:58:46 2020 +0100 Merge series "ASoC: improve core dmesg logs and verbosity" from Pierre-Louis Bossart : Try to both reduce useless verbosity and keep useful error reports. Pierre-Louis Bossart (3): ASoC: soc-core: reduce verbosity of BE override message ASoC: soc-pcm: improve error messages in soc_pcm_new() ASoC: soc-pcm/compress: reduce verbosity on mapping ok messages sound/soc/soc-compress.c | 4 ++-- sound/soc/soc-core.c | 4 ++-- sound/soc/soc-pcm.c | 13 +++++++------ 3 files changed, 11 insertions(+), 10 deletions(-) -- 2.20.1 commit c42d8c17a9523a4f28b6f6be3920a6674e50c5d3 Merge: ba05f17965573 3e3b803f9e76b Author: Mark Brown Date: Mon Jun 15 20:58:44 2020 +0100 Merge series "ASoC: max98357a: support MAX98360A in OF" from Tzung-Bi Shih : Commit 1a0f2433d738 ("ASoC: max98357a: Add ACPI HID MAX98360A") supports MAX98360A in ACPI world. This series supports MAX98360A in OF world. Tzung-Bi Shih (2): ASoC: max98357a: add compatible string for MAX98360A ASoC: dt-bindings: add compatible string for MAX98360A .../devicetree/bindings/sound/max98357a.txt | 12 +++++++++--- sound/soc/codecs/max98357a.c | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) -- 2.27.0.278.ge193c7cf3a9-goog commit ba05f17965573985b6a709c2cb2264a9807e6b3c Merge: 13919056bf44d 6323f13b4d927 Author: Mark Brown Date: Mon Jun 15 20:58:43 2020 +0100 Merge series "ASoC: mediatek: mt6358: support DMIC one-wire mode" from Jiaxin Yu : v2 changes: 1. Uses a DT property to select DMIC mode instead of a mixer control. v1 changes: 1. Uses a mixer control to select DMIC mode. 2. patchwork list: https://patchwork.kernel.org/patch/11578309 Jiaxin Yu (2): ASoC: mediatek: mt6358: support DMIC one-wire mode ASoC: dt-bindings: mediatek: mt6358: add dmic-mode property Documentation/devicetree/bindings/sound/mt6358.txt | 6 ++++++ sound/soc/codecs/mt6358.c | 23 +++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) -- 1.8.1.1.dirty _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 13919056bf44dc8f70c2301915433fa2b474c1ba Merge: b7a742cff3f61 45108214dbfdb Author: Mark Brown Date: Mon Jun 15 20:58:42 2020 +0100 Merge series "ASoC: soc-component: collect component functions" from Kuninori Morimoto : Hi Mark We have soc-component.c now, but still many component related functions are implemented many place. This patch-set collect these into soc-component.c. v1 -> v2 - remove soc-compress.c exchange (But I have plan to repost it) - fixup loop break issue on some functions - direct return on some functions Link: https://lore.kernel.org/r/87a71nzhy2.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (12): ASoC: soc-component: add soc_component_pin() and share code ASoC: soc-component: move snd_soc_component_xxx_regmap() to soc-component ASoC: soc-component: move snd_soc_component_initialize() to soc-component.c ASoC: soc-component: add soc_component_err() ASoC: soc-component: add snd_soc_pcm_component_prepare() ASoC: soc-component: add snd_soc_pcm_component_hw_params() ASoC: soc-component: add snd_soc_pcm_component_hw_free() ASoC: soc-component: add snd_soc_pcm_component_trigger() ASoC: soc-component: add snd_soc_component_init() ASoC: soc-component: merge soc-io.c into soc-component.c ASoC: soc-component: merge soc_pcm_trigger_start/stop() ASoC: soc-component: tidyup Copyright include/sound/soc-component.h | 29 +- sound/soc/Makefile | 2 +- sound/soc/soc-component.c | 666 ++++++++++++++++++++++++---------- sound/soc/soc-core.c | 102 +----- sound/soc/soc-io.c | 202 ----------- sound/soc/soc-pcm.c | 114 ++---- 6 files changed, 531 insertions(+), 584 deletions(-) delete mode 100644 sound/soc/soc-io.c -- 2.17.1 commit b7a742cff3f618d848e62e5a1ade0ff816e93092 Author: Akshu Agrawal Date: Sat May 30 15:25:06 2020 +0530 ASoC: AMD: Use mixer control to switch between DMICs Having mixer control to switch between DMICs prevents user to initiate capture simultaneously on both the DMIcs. Earlier 2 separate devices, one for each DMIC, gave an option of using them simultaneously, which is not supported. Signed-off-by: Akshu Agrawal Link: https://lore.kernel.org/r/20200530095519.24324-1-akshu.agrawal@amd.com Signed-off-by: Mark Brown commit 9ba4af79c94b184c1a9b3c637511e6ffcb4fa09d Author: Steve Lee Date: Thu Jun 11 18:47:18 2020 +0900 ASoC: max98390: Add Amp init common setting func. Add amp common init function to gather common init setting and finaize. - add max98390_init_regs func - move amp setting to max98390_init_regs func. - removed unneceary setting and finalize common register values. Signed-off-by: Steve Lee Link: https://lore.kernel.org/r/20200611094718.18371-1-steves.lee@maximintegrated.com Signed-off-by: Mark Brown commit 6b76bf3e0ff66eee4b714921fbabd588f90ab1fb Author: Steve Lee Date: Tue Jun 2 17:43:37 2020 +0900 dt-bindings: Added device tree binding for max98390 Add DT binding of max98390 amplifier driver. Signed-off-by: Steve Lee Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20200602084337.22116-1-steves.lee@maximintegrated.com Signed-off-by: Mark Brown commit fde418b61d815684a37d58106d2345bfd7805f13 Author: derek.fang Date: Fri Jun 12 13:15:24 2020 +0800 ASoC: rt5682: DAI wclk supports 44100 Hz output DAI Wclk of rt5682 only supports 48000Hz output so far, this patch lets it support 44100Hz. Signed-off-by: derek.fang Link: https://lore.kernel.org/r/1591938925-1070-4-git-send-email-derek.fang@realtek.com Signed-off-by: Mark Brown commit d54348fbefcd006b2bf1db5c01159f2101b94a3f Author: derek.fang Date: Fri Jun 12 13:15:23 2020 +0800 ASoC: rt5682: Let PLL2 support the freq conversion for 44100Hz sample rate PLL2 of rt5682 only supports the freq conversion for 48000Hz sample rate so far, this patch lets it support 44100Hz. Signed-off-by: derek.fang Link: https://lore.kernel.org/r/1591938925-1070-3-git-send-email-derek.fang@realtek.com Signed-off-by: Mark Brown commit 8d8efecb28b8f622330ea3546cbdcc06e667f6b5 Author: derek.fang Date: Fri Jun 12 13:15:22 2020 +0800 ASoC: rl6231: Add new supports on rl6231 Add pll preset maps for Realtek codecs' PLL2 freq conversions. Signed-off-by: derek.fang Link: https://lore.kernel.org/r/1591938925-1070-2-git-send-email-derek.fang@realtek.com Signed-off-by: Mark Brown commit 6b9fbb073636906eee9fe4d4c05a4f445b9e2a23 Author: Qiushi Wu Date: Sat Jun 13 22:33:43 2020 -0500 ASoC: img-parallel-out: Fix a reference count leak pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Signed-off-by: Qiushi Wu Link: https://lore.kernel.org/r/20200614033344.1814-1-wu000273@umn.edu Signed-off-by: Mark Brown commit c4c59b95b7f7d4cef5071b151be2dadb33f3287b Author: Qiushi Wu Date: Sat Jun 13 22:37:48 2020 -0500 ASoC: img: Fix a reference count leak in img_i2s_in_set_fmt pm_runtime_get_sync() increments the runtime PM usage counter even when it returns an error code, causing incorrect ref count if pm_runtime_put_noidle() is not called in error handling paths. Thus call pm_runtime_put_noidle() if pm_runtime_get_sync() fails. Signed-off-by: Qiushi Wu Link: https://lore.kernel.org/r/20200614033749.2975-1-wu000273@umn.edu Signed-off-by: Mark Brown commit c9015a1723373f2c8f8ac994f59470f4fb852623 Author: Shengjiu Wang Date: Wed Jun 3 18:26:53 2020 +0800 ASoC: wm8960: Support headphone jack detection function Add two platform variables for headphone jack detection. "hp_cfg" is for configuration of heaphone jack detection. "gpio_cfg" is for configuration of gpio, the gpio is used for plug & unplug interrupt on SoC. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1591180013-12416-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 6f1519a0ff5f1281c4c4d325d6f563a3ed208f7e Author: Shengjiu Wang Date: Wed Jun 3 18:26:52 2020 +0800 ASoC: bindings: wm8960: Add property for headphone detection Add two properties for headphone detection. wlf,hp-cfg: A list of headphone jack detect configuration register values wlf,gpio-cfg: A list of GPIO configuration register values Signed-off-by: Shengjiu Wang Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1591180013-12416-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 14ebd62c12dc89a0087bf86e79548ee9a6d93625 Author: Jonathan Bakker Date: Sun Jun 14 13:24:10 2020 -0700 ASoC: Add bindings for Samsung Aries audio complex The audio system on S5PV210 Aries boards have a wm8994 codec connected to the Samsung I2S0 DAI. Jack detection is done via GPIOs, an ADC, and an extcon device (fsa9480). There are two main variants, one with an FM radio and where the wm8994 is the master for the modem audio and the other without FM and the modem is the master. Signed-off-by: Jonathan Bakker Link: https://lore.kernel.org/r/BN6PR04MB0660866A9B5FD4B9E74D7C31A39F0@BN6PR04MB0660.namprd04.prod.outlook.com Signed-off-by: Mark Brown commit 3f2ec71cb8f5c9605b5d45918ceefcde9b97b672 Author: Jonathan Bakker Date: Sun Jun 14 13:24:09 2020 -0700 ASoC: Document wm8994 endpoints The wm8994 exposes several inputs and outputs that can be used by machine drivers in their routing. Add them to the documention so they don't have been duplicated in any machine drivers bindings. Signed-off-by: Jonathan Bakker Link: https://lore.kernel.org/r/BN6PR04MB066019A8783D22F1C4A588B7A39F0@BN6PR04MB0660.namprd04.prod.outlook.com Signed-off-by: Mark Brown commit 7a3a7671fa6c7e90aff5f4242add2a40587b85ef Author: Jonathan Bakker Date: Sun Jun 14 13:24:11 2020 -0700 ASoC: samsung: Add driver for Aries boards Samsung Aries boards have a WM8994 codec connected to the Samsung I2S controller, the BT codec, and the cellular modem. Jack detection is done by a combination of an ADC, GPIOs, and an extcon device for the USB dock. There is also a GPIO for selection between the Mic path and the TV out path on the headphone jack. There are two main variants, one with an FM radio and where the modem is the master and one without a radio and the modem is the slave. Signed-off-by: Jonathan Bakker Link: https://lore.kernel.org/r/BN6PR04MB06608CBF03EF27B70B175978A39F0@BN6PR04MB0660.namprd04.prod.outlook.com Signed-off-by: Mark Brown commit c01db8b00d35d398fa8264d8d0d2031e8d512318 Author: Fuqian Huang Date: Thu Jul 4 00:32:24 2019 +0800 ASoC: wm0010: Use kmemdup rather than duplicating its implementation kmemdup is introduced to duplicate a region of memory in a neat way. Rather than kmalloc/kzalloc + memcpy, which the programmer needs to write the size twice (sometimes lead to mistakes), kmemdup improves readability, leads to smaller code and also reduce the chances of mistakes. Suggestion to use kmemdup rather than using kmalloc/kzalloc + memcpy. Signed-off-by: Fuqian Huang Acked-by: Richard Fitzgerald Link: https://lore.kernel.org/r/20190703163224.1029-1-huangfq.daxian@gmail.com Signed-off-by: Mark Brown commit 5a7eeb8ba143d860050ecea924a8f074f02d8023 Author: Rodrigo Vivi Date: Wed Jun 10 13:18:07 2020 -0700 drm/i915: Include asm sources for {ivb, hsw}_clear_kernel.c Alexandre Oliva has recently removed these files from Linux Libre with concerns that the sources weren't available. The sources are available on IGT repository, and only open source tools are used to generate the {ivb,hsw}_clear_kernel.c files. However, the remaining concern from Alexandre Oliva was around GPL license and the source not been present when distributing the code. So, it looks like 2 alternatives are possible, the use of linux-firmware.git repository to store the blob or making sure that the source is also present in our tree. Since the goal is to limit the i915 firmware to only the micro-controller blobs let's make sure that we do include the asm sources here in our tree. Btw, I tried to have some diligence here and make sure that the asms that these commits are adding are truly the source for the mentioned files: igt$ ./scripts/generate_clear_kernel.sh -g ivb \ -m ~/mesa/build/src/intel/tools/i965_asm Output file not specified - using default file "ivb-cb_assembled" Generating gen7 CB Kernel assembled file "ivb_clear_kernel.c" for i915 driver... igt$ diff ~/i915/drm-tip/drivers/gpu/drm/i915/gt/ivb_clear_kernel.c \ ivb_clear_kernel.c < * Generated by: IGT Gpu Tools on Fri 21 Feb 2020 05:29:32 AM UTC > * Generated by: IGT Gpu Tools on Mon 08 Jun 2020 10:00:54 AM PDT 61c61 < }; > }; \ No newline at end of file igt$ ./scripts/generate_clear_kernel.sh -g hsw \ -m ~/mesa/build/src/intel/tools/i965_asm Output file not specified - using default file "hsw-cb_assembled" Generating gen7.5 CB Kernel assembled file "hsw_clear_kernel.c" for i915 driver... igt$ diff ~/i915/drm-tip/drivers/gpu/drm/i915/gt/hsw_clear_kernel.c \ hsw_clear_kernel.c 5c5 < * Generated by: IGT Gpu Tools on Fri 21 Feb 2020 05:30:13 AM UTC > * Generated by: IGT Gpu Tools on Mon 08 Jun 2020 10:01:42 AM PDT 61c61 < }; > }; \ No newline at end of file Used IGT and Mesa master repositories from Fri Jun 5 2020) IGT: 53e8c878a6fb ("tests/kms_chamelium: Force reprobe after replugging the connector") Mesa: 5d13c7477eb1 ("radv: set keep_statistic_info with RADV_DEBUG=shaderstats") Mesa built with: meson build -D platforms=drm,x11 -D dri-drivers=i965 \ -D gallium-drivers=iris -D prefix=/usr \ -D libdir=/usr/lib64/ -Dtools=intel \ -Dkulkan-drivers=intel && ninja -C build v2: Header clean-up and include build instructions in a readme (Chris) Modified commit message to respect check-patch Reference: http://www.fsfla.org/pipermail/linux-libre/2020-June/003374.html Reference: http://www.fsfla.org/pipermail/linux-libre/2020-June/003375.html Fixes: 47f8253d2b89 ("drm/i915/gen7: Clear all EU/L3 residual contexts") Cc: # v5.7+ Cc: Alexandre Oliva Cc: Prathap Kumar Valsan Cc: Akeem G Abodunrin Cc: Mika Kuoppala Cc: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Signed-off-by: Rodrigo Vivi Reviewed-by: Jon Bloomfield Link: https://patchwork.freedesktop.org/patch/msgid/20200610201807.191440-1-rodrigo.vivi@intel.com commit e16caedf737145f74e34e45205b15695adf66f38 Author: Sia Jee Heng Date: Tue Jun 9 14:06:23 2020 +0800 ASoC: Add documentation for KeemBay i2s Document Intel KeemBay i2s DT bindings. Signed-off-by: Sia Jee Heng Link: https://lore.kernel.org/r/1591682783-1923-4-git-send-email-jee.heng.sia@intel.com Signed-off-by: Mark Brown commit c544912bcc2dc806ba71d9157ccefca4a4a885f0 Author: Sia Jee Heng Date: Tue Jun 9 14:06:22 2020 +0800 ASoC: Intel: Add makefiles and kconfig changes for KeemBay Add makefile and kconfig changes for Intel KeemBay platform driver. Signed-off-by: Michael Sit Wei Hong Signed-off-by: Sia Jee Heng Link: https://lore.kernel.org/r/1591682783-1923-3-git-send-email-jee.heng.sia@intel.com Signed-off-by: Mark Brown commit c5477e966728f8e9d1434543d4ee677d515e1078 Author: Sia Jee Heng Date: Tue Jun 9 14:06:21 2020 +0800 ASoC: Intel: Add KeemBay platform driver Add KeemBay ASoC platform driver which initialize the i2s controller and uses i2s to capture and transmit pcm data to external codec. The i2s is running in polling mode. Signed-off-by: Michael Sit Wei Hong Signed-off-by: Sia Jee Heng Link: https://lore.kernel.org/r/1591682783-1923-2-git-send-email-jee.heng.sia@intel.com Signed-off-by: Mark Brown commit e9ff6636d3f97a764487999754c0bfee9d2c231e Author: Zhenzhong Duan Date: Wed Jun 10 14:58:46 2020 +0800 EDAC/mc: Call edac_inc_ue_error() before panic By calling edac_inc_ue_error() before panic, we get a correct UE error count for core dump analysis. Signed-off-by: Zhenzhong Duan Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20200610065846.3626-2-zhenzhong.duan@gmail.com commit 30bf38e4341bd7b44e8036ad62f00e71c2ed8bb7 Author: Zhenzhong Duan Date: Wed Jun 10 14:58:45 2020 +0800 EDAC, pnd2: Set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier Avoid giving it MCE_PRIO_LOWEST priority by default. Signed-off-by: Zhenzhong Duan Signed-off-by: Tony Luck Link: https://lore.kernel.org/r/20200610065846.3626-1-zhenzhong.duan@gmail.com commit 6323f13b4d927f52f339f7122676de0b0d1da3c3 Author: Jiaxin Yu Date: Fri Jun 5 18:33:42 2020 +0800 ASoC: dt-bindings: mediatek: mt6358: add dmic-mode property Adds dmic-mode property and updates example. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1591353222-18576-3-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit c46fc800948c2d0afb548ca12453b837aa1ac880 Author: Jiaxin Yu Date: Fri Jun 5 18:33:41 2020 +0800 ASoC: mediatek: mt6358: support DMIC one-wire mode Supports DMIC one-wire mode. Uses a DT property "dmic-mode" to select. Signed-off-by: Jiaxin Yu Link: https://lore.kernel.org/r/1591353222-18576-2-git-send-email-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown commit 55f4b1f73631a0817717fe6e98517de51b4c3527 Author: Alim Akhtar Date: Thu May 28 06:46:57 2020 +0530 scsi: ufs: ufs-exynos: Add UFS host support for Exynos SoCs This patch introduces Exynos UFS host controller driver which mainly handles vendor-specific operations including link startup, power mode change and hibernation/unhibernation. [robot: drivers/scsi/ufs/ufs-exynos.c:931:8-10: WARNING: possible condition with no effect (if == else) ] Link: https://lore.kernel.org/r/20200528011658.71590-10-alim.akhtar@samsung.com Reported-by: kbuild test robot Reported-by: Julia Lawall Tested-by: Paweł Chmiel Reviewed-by: Kiwoong Kim Reviewed-by: Avri Altman Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit d779a6e90e189f4883ce6f900da02995fb000df5 Author: Kiwoong Kim Date: Thu May 28 06:46:53 2020 +0530 scsi: ufs: Add quirk to fix abnormal ocs fatal error Some controller like Exynos determines if FATAL ERROR (0x7) in OCS field in UTRD occurs for values other than GOOD (0x0) in STATUS field in response upiu as well as errors that a host controller can't cover. This patch is to prevent from reporting command results in those cases. Link: https://lore.kernel.org/r/20200528011658.71590-6-alim.akhtar@samsung.com Reviewed-by: Avri Altman Signed-off-by: Kiwoong Kim Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 26f968d7de823ba4974a8f25c8bd8ee2df6ab74b Author: Alim Akhtar Date: Thu May 28 06:46:52 2020 +0530 scsi: ufs: Introduce UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk Some UFS host controllers like Exynos uses granularities of PRDT length and offset as bytes, whereas others use actual segment count. Link: https://lore.kernel.org/r/20200528011658.71590-5-alim.akhtar@samsung.com Reviewed-by: Avri Altman Signed-off-by: Kiwoong Kim Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 39bf2d83b54e900675cd7b52737ded695bb60bf1 Author: Alim Akhtar Date: Thu May 28 06:46:51 2020 +0530 scsi: ufs: Add quirk to enable host controller without hce Some host controllers don't support host controller enable via HCE. Link: https://lore.kernel.org/r/20200528011658.71590-4-alim.akhtar@samsung.com Reviewed-by: Can Guo Reviewed-by: Avri Altman Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit b638b5eb624bd5d0766683b6181d578f414585e9 Author: Alim Akhtar Date: Thu May 28 06:46:50 2020 +0530 scsi: ufs: Add quirk to disallow reset of interrupt aggregation Some host controllers support interrupt aggregation but don't allow resetting counter and timer in software. Link: https://lore.kernel.org/r/20200528011658.71590-3-alim.akhtar@samsung.com Reviewed-by: Avri Altman Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit 871838412adf533ffda0b4a0ede0c2984e3511e7 Author: Alim Akhtar Date: Thu May 28 06:46:49 2020 +0530 scsi: ufs: Add quirk to fix mishandling utrlclr/utmrlclr With the correct behavior, setting the bit to '0' indicates clear and '1' indicates no change. If host controller handles this the other way around, UFSHCI_QUIRK_BROKEN_REQ_LIST_CLR can be used. Link: https://lore.kernel.org/r/20200528011658.71590-2-alim.akhtar@samsung.com Reviewed-by: Can Guo Reviewed-by: Avri Altman Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar Signed-off-by: Martin K. Petersen commit d73d682a9e87fa494868e8094fcc5b6a6b505464 Author: Shengjiu Wang Date: Wed Jun 3 11:39:41 2020 +0800 ASoC: fsl_easrc: Fix "Function parameter not described" warnings Obtained with: $ make W=1 sound/soc/fsl/fsl_easrc.c:403: warning: Function parameter or member 'easrc' not described in 'fsl_easrc_normalize_filter' sound/soc/fsl/fsl_easrc.c:403: warning: Function parameter or member 'infilter' not described in 'fsl_easrc_normalize_filter' sound/soc/fsl/fsl_easrc.c:403: warning: Function parameter or member 'outfilter' not described in 'fsl_easrc_normalize_filter' sound/soc/fsl/fsl_easrc.c:403: warning: Function parameter or member 'shift' not described in 'fsl_easrc_normalize_filter' Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Reported-by: kbuild test robot Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/d166b868e6d294de47a89857be03758ec82a0a61.1591155860.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 633a2c7d6e621e748d69423fa85be88c7dcd4f94 Author: Shengjiu Wang Date: Wed Jun 3 11:39:40 2020 +0800 ASoC: fsl_easrc: Fix -Wunused-but-set-variable Obtained with: $ make W=1 unsigned int int_bits; ^ struct device *dev; ^ struct device *dev; ^ Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Reported-by: kbuild test robot Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen sound/soc/fsl/fsl_easrc.c: In function 'fsl_easrc_set_rs_ratio': sound/soc/fsl/fsl_easrc.c:182:15: warning: variable 'int_bits' set but not used [-Wunused-but-set-variable] sound/soc/fsl/fsl_easrc.c: In function 'fsl_easrc_set_ctx_organziation': sound/soc/fsl/fsl_easrc.c:1204:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable] sound/soc/fsl/fsl_easrc.c: In function 'fsl_easrc_release_context': sound/soc/fsl/fsl_easrc.c:1294:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/91ceb59e3bce31c9e93abba06f5156692ff5c71e.1591155860.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit e4cc0aaac390a87f80ae542c75d4c84de08816f9 Author: Shengjiu Wang Date: Wed Jun 3 11:39:39 2020 +0800 ASoC: fsl_easrc: Fix -Wmissing-prototypes warning Obtained with: $ make W=1 sound/soc/fsl/fsl_easrc.c:967:5: warning: no previous prototype for function 'fsl_easrc_config_context' [-Wmissing-prototypes] int fsl_easrc_config_context(struct fsl_asrc *easrc, unsigned int ctx_id) ^ sound/soc/fsl/fsl_easrc.c:967:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int fsl_easrc_config_context(struct fsl_asrc *easrc, unsigned int ctx_id) ^ static sound/soc/fsl/fsl_easrc.c:1128:5: warning: no previous prototype for function 'fsl_easrc_set_ctx_format' [-Wmissing-prototypes] int fsl_easrc_set_ctx_format(struct fsl_asrc_pair *ctx, ^ sound/soc/fsl/fsl_easrc.c:1128:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int fsl_easrc_set_ctx_format(struct fsl_asrc_pair *ctx, ^ static sound/soc/fsl/fsl_easrc.c:1201:5: warning: no previous prototype for function 'fsl_easrc_set_ctx_organziation' [-Wmissing-prototypes] int fsl_easrc_set_ctx_organziation(struct fsl_asrc_pair *ctx) ^ sound/soc/fsl/fsl_easrc.c:1201:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int fsl_easrc_set_ctx_organziation(struct fsl_asrc_pair *ctx) ^ static sound/soc/fsl/fsl_easrc.c:1245:5: warning: no previous prototype for function 'fsl_easrc_request_context' [-Wmissing-prototypes] int fsl_easrc_request_context(int channels, struct fsl_asrc_pair *ctx) ^ sound/soc/fsl/fsl_easrc.c:1245:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int fsl_easrc_request_context(int channels, struct fsl_asrc_pair *ctx) ^ static sound/soc/fsl/fsl_easrc.c:1290:6: warning: no previous prototype for function 'fsl_easrc_release_context' [-Wmissing-prototypes] void fsl_easrc_release_context(struct fsl_asrc_pair *ctx) ^ sound/soc/fsl/fsl_easrc.c:1290:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void fsl_easrc_release_context(struct fsl_asrc_pair *ctx) ^ static sound/soc/fsl/fsl_easrc.c:1317:5: warning: no previous prototype for function 'fsl_easrc_start_context' [-Wmissing-prototypes] int fsl_easrc_start_context(struct fsl_asrc_pair *ctx) ^ sound/soc/fsl/fsl_easrc.c:1317:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int fsl_easrc_start_context(struct fsl_asrc_pair *ctx) ^ static sound/soc/fsl/fsl_easrc.c:1335:5: warning: no previous prototype for function 'fsl_easrc_stop_context' [-Wmissing-prototypes] int fsl_easrc_stop_context(struct fsl_asrc_pair *ctx) ^ sound/soc/fsl/fsl_easrc.c:1335:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int fsl_easrc_stop_context(struct fsl_asrc_pair *ctx) ^ static sound/soc/fsl/fsl_easrc.c:1382:18: warning: no previous prototype for function 'fsl_easrc_get_dma_channel' [-Wmissing-prototypes] struct dma_chan *fsl_easrc_get_dma_channel(struct fsl_asrc_pair *ctx, ^ sound/soc/fsl/fsl_easrc.c:1382:1: note: declare 'static' if the function is not intended to be used outside of this translation unit struct dma_chan *fsl_easrc_get_dma_channel(struct fsl_asrc_pair *ctx, ^ static Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Reported-by: kbuild test robot Signed-off-by: Shengjiu Wang Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/ab1b83a56c71f4159a98e6da5602c2c36fe59f4d.1591155860.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 5948938700446ac0eb21248cb354f602d8d7b237 Author: Chris Wilson Date: Mon Jun 15 17:50:13 2020 +0100 drm/i915/gt: Add a safety submission flush in the heartbeat Just in case everything fails (like for example "missed interrupt syndrome" on Sandybridge), always flush the submission tasklet from the heartbeat. This papers over such issues, but will still appear as a second long glitch, and prevents us from detecting it unless we happen to be performing a timed test. v2: We rely on flush_submission() synchronizing with the tasklet on another CPU. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200615165013.22973-3-chris@chris-wilson.co.uk commit f2e85e57367e8ac3a6106e3919f450354a2cf725 Author: Chris Wilson Date: Mon Jun 15 17:50:12 2020 +0100 drm/i915/selftests: Dump engine state and trace upon hanging after reset If the engine dies after a reset, and so we fail to submit a request but need to be interrupted by the CI runner, dump the engine state. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200615165013.22973-2-chris@chris-wilson.co.uk commit 7102a76043eb520d3e2856697b9407b01d246d8b Author: Chris Wilson Date: Mon Jun 15 17:50:11 2020 +0100 drm/i915/selftests: Disable preemptive heartbeats over preemption tests Since the heartbeat may cause a preemption event, disable it over the preemption suppression tests. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200615165013.22973-1-chris@chris-wilson.co.uk commit 28b60197b573cd0b2d8f0ded56a5441c6147af14 Author: Borislav Petkov Date: Thu Jun 4 12:50:44 2020 +0200 x86/asm: Unify __ASSEMBLY__ blocks Merge the two ifndef __ASSEMBLY__ blocks. No functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200604133204.7636-1-bp@alien8.de commit 418370ff2231b7db5abf59b8faec911e6fc44d96 Author: Danny Lin Date: Wed Jun 3 22:49:00 2020 -0700 of: reserved_mem: Fix typo in the too-many-regions message Minor fix for a missing preposition in the error message that appears when there are too many reserved memory regions for the allocated array to store. Signed-off-by: Danny Lin Link: https://lore.kernel.org/r/20200604054900.200317-1-danny@kdrag0n.dev Signed-off-by: Rob Herring commit fbd5969d1ff2598143d6a6fbc9491a9e40ab9b82 Author: Borislav Petkov Date: Thu Jun 4 12:38:39 2020 +0200 x86/cpufeatures: Mark two free bits in word 3 ... so that they get reused when needed. No functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200604104150.2056-1-bp@alien8.de commit a11bc0e17aa8a6fe988852f7002995e14a41674d Author: Florian Fainelli Date: Wed Jun 3 20:46:53 2020 -0700 dt-bindings: spi: Document bcm2711 and bcm7211 SPI compatible The BCM2711 and BCM7211 chips use the BCM2835 SPI controller, but there are severl instances of those in the system and they all share the same interrupt line. Document specific compatible strings such that the driver can take appropriate actions. Signed-off-by: Florian Fainelli Link: https://lore.kernel.org/r/20200604034655.15930-2-f.fainelli@gmail.com Signed-off-by: Rob Herring commit 1068ed4547adf6123504d9623ebd1ffcdd616101 Author: Borislav Petkov Date: Mon Jun 8 16:19:49 2020 +0200 x86/msr: Lift AMD family 0x15 power-specific MSRs ... into the global msr-index.h header because they're used in multiple compilation units. Sort the MSR list a bit. Update the msr-index.h copy in tools. No functional changes. Signed-off-by: Borislav Petkov Acked-by: Guenter Roeck Link: https://lkml.kernel.org/r/20200608164847.14232-1-bp@alien8.de commit a15a20acc980342c97d804c5fae1cfc0cd7712a9 Merge: f5f58a0b1ebf7 e00c6d8d491b3 Author: Kalle Valo Date: Mon Jun 15 20:23:23 2020 +0300 Merge tag 'iwlwifi-next-for-kalle-2020-06-11' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next First set of patches intended for v5.9 * Fix links to wiki; * Some preparations for gcc-10; * Make FW reconfiguration quieter by not using warn level; * Some other small fixes and clean-up; # gpg: Signature made Thu 11 Jun 2020 12:03:51 PM EEST using RSA key ID 1A3CC5FA # gpg: Good signature from "Luciano Roth Coelho (Luca) " # gpg: aka "Luciano Roth Coelho (Intel) " commit 45108214dbfdba4a07061d2a4db6dc12475049f2 Author: Kuninori Morimoto Date: Thu Jun 4 17:08:24 2020 +0900 ASoC: soc-component: tidyup Copyright This patch add missing company copyright Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87eeqvw8w8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 836367be289d5b130769fd7c46172557e614a148 Author: Kuninori Morimoto Date: Thu Jun 4 17:08:12 2020 +0900 ASoC: soc-component: merge soc_pcm_trigger_start/stop() Now, soc_pcm_trigger_start/stop() are simple enough. Let's merge these into soc_pcm_trigger(). Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87ftbbw8wj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 460b42d162e3cf634586999e6a84e74ca52e626d Author: Kuninori Morimoto Date: Thu Jun 4 17:08:03 2020 +0900 ASoC: soc-component: merge soc-io.c into soc-component.c soc-io.c has snd_soc_component_xxx() functions for I/O. We have soc-componennt.c for it. Let's merge soc-io.c into soc-component.c By this patch, original soc-io.c functions start to use soc_component_err() when error case. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87h7vrw8ws.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 257c4dac8b7877c865e734533b5f62769c64afb6 Author: Kuninori Morimoto Date: Thu Jun 4 17:07:54 2020 +0900 ASoC: soc-component: add snd_soc_component_init() we wantn't to directly access to component related parameter as much as possible to keep encapsulation. This patch adds snd_soc_component_init() for it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87img7w8x2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 32fd120475c1b8a83d28bfedc2b95ec981fbb809 Author: Kuninori Morimoto Date: Thu Jun 4 17:07:40 2020 +0900 ASoC: soc-component: add snd_soc_pcm_component_trigger() We have 2 type of component functions snd_soc_component_xxx() is focusing to component itself, snd_soc_pcm_component_xxx() is focusing to rtd related component. Now we can update snd_soc_component_trigger() to snd_soc_pcm_component_trigger(). This patch do it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87k10nw8xf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 047511198639649bdaacb1a34d9691429ccc5698 Author: Kuninori Morimoto Date: Thu Jun 4 17:07:24 2020 +0900 ASoC: soc-component: add snd_soc_pcm_component_hw_free() We have 2 type of component functions snd_soc_component_xxx() is focusing to component itself, snd_soc_pcm_component_xxx() is focusing to rtd related component. Now we can update snd_soc_component_hw_free() to snd_soc_pcm_component_hw_free(). This patch do it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87lfl3w8xv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e1bafa828e3a0622ac24d238e00937f3059ed585 Author: Kuninori Morimoto Date: Thu Jun 4 17:07:11 2020 +0900 ASoC: soc-component: add snd_soc_pcm_component_hw_params() We have 2 type of component functions snd_soc_component_xxx() is focusing to component itself, snd_soc_pcm_component_xxx() is focusing to rtd related component. Now we can update snd_soc_component_hw_params() to snd_soc_pcm_component_hw_params(). This patch do it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87mu5jw8y8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4f39514f36980a4b20a754a5d51486a5999c8380 Author: Kuninori Morimoto Date: Thu Jun 4 17:06:58 2020 +0900 ASoC: soc-component: add snd_soc_pcm_component_prepare() We have 2 type of component functions snd_soc_component_xxx() is focusing to component itself, snd_soc_pcm_component_xxx() is focusing to rtd related component. Now we can update snd_soc_component_prepare() to snd_soc_pcm_component_prepare(). This patch do it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87o8pzw8yl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e2329eeba45fdad5eeb2bec5c61f8cefbee69cb8 Author: Kuninori Morimoto Date: Thu Jun 4 17:06:41 2020 +0900 ASoC: soc-component: add soc_component_err() At soc-component.c, it is good idea to indicate error function and its component name if there was error. This patch adds soc_component_err() for it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87pnafw8z2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 536aba1dd4939bf647f5d182d4f101ae548e6505 Author: Kuninori Morimoto Date: Thu Jun 4 17:06:32 2020 +0900 ASoC: soc-component: move snd_soc_component_initialize() to soc-component.c snd_soc_component_xxx() should be implemented at soc-component.c Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87r1uvw8zb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c7d75b5938e38a48e5fdac44f88fc5882f1f7bed Author: Kuninori Morimoto Date: Thu Jun 4 17:06:22 2020 +0900 ASoC: soc-component: move snd_soc_component_xxx_regmap() to soc-component soc-component is handling snd_soc_component_xxx(). Move snd_soc_component_xxx_regmap() to it. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87sgfbw8zl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4ca8701ee3106943c84d011c86a7ae41aff72e17 Author: Kuninori Morimoto Date: Thu Jun 4 17:06:11 2020 +0900 ASoC: soc-component: add soc_component_pin() and share code soc-component has too many snd_soc_component_xxx_pin_xxx() functions. The difference between these functions are used function name and enable/disable. This patch adds common soc_component_pin() and share code. Signed-off-by: Kuninori Morimoto Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/87tuzrw8zw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f5f58a0b1ebf7a6a13fcda3911b8d3794763f693 Merge: b3a9e3b9622ae 01e34233c6456 Author: Kalle Valo Date: Mon Jun 15 20:18:39 2020 +0300 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.9. Major changes: ath11k * add 6G band support * add spectral scan support commit c217cf8136c5c36bf2200dd493a900b0b2385b88 Author: Anson Huang Date: Thu Jun 4 09:49:16 2020 +0800 dt-bindings: i2c: Convert imx lpi2c to json-schema Convert the i.MX LPI2C binding to DT schema format using json-schema Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1591235358-15516-2-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 67a69dab73db9fc2c7e5fad4e6ed761180ed535a Author: Anson Huang Date: Thu Jun 4 09:41:26 2020 +0800 dt-bindings: mmc: Convert mxs mmc to json-schema Convert the MXS MMC binding to DT schema format using json-schema Signed-off-by: Anson Huang Link: https://lore.kernel.org/r/1591234886-15351-4-git-send-email-Anson.Huang@nxp.com Signed-off-by: Rob Herring commit 4f35f196eda0180fb95ba8bfe425f19e5f3deaa6 Author: Anson Huang Date: Thu Jun 4 09:41:25 2020 +0800 dt-bindings: mmc: Convert imx mmc to json-schema Convert the i.MX MMC binding to DT schema format using json-schema Signed-off-by: Anson Huang Signed-off-by: Rob Herring commit 51d843ea6761a0570bff1d5f594970841ea785ae Author: Anson Huang Date: Thu Jun 4 09:35:55 2020 +0800 dt-bindings: rtc: Convert imxdi rtc to json-schema Convert the i.MXDI RTC binding to DT schema format using json-schema Signed-off-by: Anson Huang Signed-off-by: Rob Herring commit f652530204205572242c981e14d15f5cde2bb94c Author: Anson Huang Date: Thu Jun 4 09:33:07 2020 +0800 dt-bindings: clock: Convert imx7ulp clock to json-schema Convert the i.MX7ULP clock binding to DT schema format using json-schema, the original binding doc is actually for two clock modules(SCG and PCC), so split it to two binding docs, and the MPLL(mipi PLL) is NOT supposed to be in clock module, so remove it from binding doc as well. Reviewed-by: Dong Aisheng Reviewed-by: Stephen Boyd Signed-off-by: Anson Huang Signed-off-by: Rob Herring commit f700bf652b264f33b54d276e3f25de4e91afb0f7 Author: Anson Huang Date: Thu Jun 4 09:30:16 2020 +0800 dt-bindings: thermal: Convert qoriq to json-schema Convert the qoriq thermal binding to DT schema format using json-schema Signed-off-by: Anson Huang Signed-off-by: Rob Herring commit d954ea4250dcd2e843a951d382f369c60aaa30b9 Author: Dan Murphy Date: Tue Jun 2 11:42:19 2020 -0500 dt-bindings: property-units: Add picoseconds type Add the '-ps' picosecond unit suffix for property names. Signed-off-by: Dan Murphy Signed-off-by: Rob Herring commit 1d5cd5254f67bc65622f4cac04c25d6e082f21b0 Author: Pierre-Louis Bossart Date: Fri Jun 12 15:40:50 2020 -0500 ASoC: soc-pcm/compress: reduce verbosity on mapping ok messages With dynamic debug not enabled, we still get these messages: [ 48.133586] sof_sdw sof_sdw: rt711-aif1 <-> SDW0 Pin2 mapping ok [ 48.133595] sof_sdw sof_sdw: rt711-aif1 <-> SDW0 Pin3 mapping ok [ 48.133650] sof_sdw sof_sdw: sdw:1:25d:1308:0 <-> SDW1 Pin2 mapping ok [ 48.133658] sof_sdw sof_sdw: rt715-aif2 <-> SDW3 Pin2 mapping ok [ 48.133666] sof_sdw sof_sdw: intel-hdmi-hifi1 <-> iDisp1 Pin mapping ok [ 48.133672] sof_sdw sof_sdw: intel-hdmi-hifi2 <-> iDisp2 Pin mapping ok [ 48.133677] sof_sdw sof_sdw: intel-hdmi-hifi3 <-> iDisp3 Pin mapping ok [ 48.133712] sof_sdw sof_sdw: snd-soc-dummy-dai <-> Headphone 0 mapping ok [ 48.133733] sof_sdw sof_sdw: snd-soc-dummy-dai <-> Headset mic 1 mapping ok [ 48.133746] sof_sdw sof_sdw: snd-soc-dummy-dai <-> SDW1-speakers 2 mapping ok [ 48.133762] sof_sdw sof_sdw: snd-soc-dummy-dai <-> Microphones 4 mapping ok [ 48.133774] sof_sdw sof_sdw: snd-soc-dummy-dai <-> HDMI1 5 mapping ok [ 48.133798] sof_sdw sof_sdw: snd-soc-dummy-dai <-> HDMI2 6 mapping ok [ 48.133809] sof_sdw sof_sdw: snd-soc-dummy-dai <-> HDMI3 7 mapping ok This is not really useful for most users, demote to dev_dbg() Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200612204050.25901-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 799827a42045e77a34bd4a90ba8bde372ed8058d Author: Pierre-Louis Bossart Date: Fri Jun 12 15:40:49 2020 -0500 ASoC: soc-pcm: improve error messages in soc_pcm_new() Provide an explicit dmesg trace with the PCM 'new_name', dailink name and error code to help with debug. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200612204050.25901-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1328948fea693679ab81601aa72a9ed6025f81ea Author: Pierre-Louis Bossart Date: Fri Jun 12 15:40:48 2020 -0500 ASoC: soc-core: reduce verbosity of BE override message With dynamic debug not enabled, we still see this sort of messages: [ 47.656671] sof_sdw sof_sdw: info: override BE DAI link SDW0-Playback [ 47.656677] sof_sdw sof_sdw: info: override BE DAI link SDW0-Capture [ 47.656682] sof_sdw sof_sdw: info: override BE DAI link SDW1-Playback [ 47.656686] sof_sdw sof_sdw: info: override BE DAI link SDW3-Capture [ 47.656691] sof_sdw sof_sdw: info: override BE DAI link iDisp1 [ 47.656695] sof_sdw sof_sdw: info: override BE DAI link iDisp2 [ 47.656699] sof_sdw sof_sdw: info: override BE DAI link iDisp3 This is not really helpful for most users, move to dev_dbg. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Link: https://lore.kernel.org/r/20200612204050.25901-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2f6e6e11b23f9ee83eb568e56ef9867ffed950ba Author: Geert Uytterhoeven Date: Thu May 28 15:28:53 2020 +0200 dt-bindings: irqchip: renesas-rza1-irqc: Convert to json-schema Convert the Renesas RZ/A1 Interrupt Controller Device Tree binding documentation to json-schema. Reviewed-by: Niklas Söderlund Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring commit 3ad796cbc36a7bc8bfd4de191d791b9490bc112b Author: Takashi Iwai Date: Mon Jun 15 18:00:45 2020 +0200 ALSA: pcm: Use SG-buffer only when direct DMA is available The DMA-coherent SG-buffer is tricky to use, as it does need the mapping. It used to work stably on x86 over years (and that's why we had enabled SG-buffer on solely x86) with the default mmap handler and vmap(), but our luck seems no forever success. The chance of breakage is high when the special DMA handling is introduced in the arch side. In this patch, we change the buffer allocation to use the SG-buffer only when the device in question is with the direct DMA. It's a bit hackish, but it's currently the only condition that may work (more or less) reliably with the default mmap and vmap() for mapping the pages that are deduced via virt_to_page(). In theory, we can apply the similar hack in the sound/core memory allocation helper, too; but it's used by SOF for allocating SG pages without re-mapping via vmap() or mmap, and it's fine to use it in that way, so let's keep it and adds the workaround in PCM side. Link: https://lore.kernel.org/r/20200615160045.2703-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 2a1f3368bff609504cdc984cdb7cef467bb0b2b0 Author: Takashi Iwai Date: Mon Jun 15 18:00:44 2020 +0200 ALSA: memalloc: Make SG-buffer helper usable for continuous buffer, too We have a few helper functions for making the access to the buffer address easier on SG-buffer. Those are specific to the buffer that is allocated with SG-buffer type, and it makes hard to use both SG and non-SG buffers in the same code. This patch adds a few simple checks and lets the helpers to deal with both SG- and continuous buffers gracefully. It's a preliminary step for the upcoming patch that mimics the buffer type on the fly. Link: https://lore.kernel.org/r/20200615160045.2703-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit 28e60dbb83f76b18acade913dfdb029cd908c9b0 Author: Takashi Iwai Date: Mon Jun 15 18:00:43 2020 +0200 ALSA: memalloc: Initialize all fields of snd_dma_buffer properly Some fields in snd_dma_buffer aren't touched in snd_dma_alloc_pages() and might be left uninitialized. Let's clear all fields properly, so that we can use a NULL check (e.g. dmab->private_data) as conditional in a later patch. Link: https://lore.kernel.org/r/20200615160045.2703-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit d955dab33af4ebff0f6c486da216ebbf590eb7e4 Author: Takashi Iwai Date: Mon Jun 15 18:00:42 2020 +0200 ALSA: pcm: Use dma_mmap_coherent() on x86, too We avoided the explicit use of dma_mmap_coherent() on x86 because of a spurious warning in x86 APT code in the past. However, this blindly assumes that the pages allocated via dma_alloc_coherent() on x86 are the ones convertible via virt_to_page() (that is used in the default mmap handler), and it's no longer true; with the indirect DMA ops, this can be handled differently. The only certain way for doing mmap such pages is the dma_mmap_coherent(), and the warning seems already gone in the recent code, so let's use it consistently. Link: https://lore.kernel.org/r/20200615160045.2703-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3e3b803f9e76b2ec386c0f3f0618fb7d0bca4ffc Author: Tzung-Bi Shih Date: Fri Jun 5 11:49:31 2020 +0800 ASoC: dt-bindings: add compatible string for MAX98360A Maxim MAX98360A audio amplifier is functionally identical to MAX98357A. Adds compatible string "maxim,max98360a" for driver reuse. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200605034931.107713-3-tzungbi@google.com Signed-off-by: Mark Brown commit 3aad07b87ac3fa1c67a75403f7f9c576da8df71d Author: Tzung-Bi Shih Date: Fri Jun 5 11:49:30 2020 +0800 ASoC: max98357a: add compatible string for MAX98360A Maxim MAX98360A audio amplifier is functionally identical to MAX98357A. Adds compatible string "maxim,max98360a" for driver reuse. Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20200605034931.107713-2-tzungbi@google.com Signed-off-by: Mark Brown commit 064e8af7159539fc2310870841e7f215b4f633e9 Merge: b3a9e3b9622ae 27784a256c2a4 Author: Mark Brown Date: Mon Jun 15 16:16:05 2020 +0100 Merge existing fixes from spi/for-5.8 commit 5b8ff89fd72b151d4227b0cc13d1e91698011307 Merge: b3a9e3b9622ae 6f1cf5257acc6 Author: Mark Brown Date: Mon Jun 15 16:15:58 2020 +0100 Merge existing fixes from regulator/for-5.8 commit 6ed50f88485ce84fae775148182e3b424541e0bc Merge: b3a9e3b9622ae e680a4098f640 Author: Mark Brown Date: Mon Jun 15 16:15:51 2020 +0100 Merge existing fixes from regmap/for-5.8 commit 17212e7188783de75d2a1226c32d3fd7af96ad5d Merge: b3a9e3b9622ae 4036d05c38ca2 Author: Mark Brown Date: Mon Jun 15 16:15:44 2020 +0100 Merge existing fixes from asoc/for-5.8 commit 01e34233c6456ff61f2caab450860f1462acf78e Author: Venkateswara Naralasetty Date: Thu Jun 11 08:09:55 2020 +0300 ath11k: fix wmi peer flags in peer assoc command Currently need ptk/gtk wmi peer flags in wmi peer assoc cmd are set based on the rsnie and wpaie of the bss from the bss list. Since this bss list is not updated with current BSSID for AP mode, we may not find bss from the bss list. Which results in ptk/gtk peer flags are not set in the wmi peer assoc cmd. Due to this EAPOL frames are going in data rates instead of management rates. Tested-on: IPQ8074 WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Signed-off-by: Venkateswara Naralasetty Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591771841-25503-1-git-send-email-vnaralas@codeaurora.org commit 71fbc847978f51629856d0ef7d3645d9322fb340 Author: Sriram R Date: Thu Jun 11 08:09:54 2020 +0300 ath11k: Add support for ring backpressure stats Add support for collecting and dumping the ring backpressure stats via debugfs. Stats are dumped only if events are received for the specific ring. Below command can be used to obtain these stats as part of soc dp stats. cat /sys/kernel/debug/ath11k/ipq8074/soc_dp_stats Sample Output - When No stats available: Backpressure Stats ================== No Ring Backpressure stats received Sample Output - When ring bp stats available for specific ring Backpressure Stats ================== Ring: REO2SW1_RING count: 1 hp: 2 tp: 2 seen before: 4ms Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01213-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591768308-32005-3-git-send-email-srirrama@codeaurora.org commit 0dd6392ac2c0eb3e229631744f54b61789139e33 Author: Sriram R Date: Thu Jun 11 08:09:54 2020 +0300 ath11k: Add dp tx err stats Add support for dp tx error stats which logs tx failure reasons due to ring full condition, etc. This stats is added in soc_dp_stats which was earlier used as soc_rx_stats so that all dp related info are logged in same file. Below is an example usage, root@OpenWrt:/# cat /sys/kernel/debug/ath11k/ipq8074/soc_dp_stats SOC RX STATS: err ring pkts: 0 Invalid RBM: 0 SOC TX STATS: Ring Full Failures: ring0: 4 ring1: 3 ring2: 5 Misc Transmit Failures: 2 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01213-QCAHKSWPL_SILICONZ-1 Signed-off-by: Sriram R Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591768308-32005-2-git-send-email-srirrama@codeaurora.org commit 8cacd0389c4f6056250377f44fbfe18a2501dd79 Author: Sowmiya Sree Elavalagan Date: Thu Jun 11 08:09:53 2020 +0300 ath11k: removing redundant reo unlock followed by immediate lock Removed reo cmd lock and unlock which was acquiring the lock immediately after unlock. Done for code clean up. Signed-off-by: Sowmiya Sree Elavalagan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591713432-26426-1-git-send-email-ssreeela@codeaurora.org commit 9d11b7bff9508101d05f06e461ab81b5f0dc90ae Author: Karthikeyan Periyasamy Date: Tue Jun 9 13:03:34 2020 +0530 ath11k: add support for spectral scan spectral scan control interface is exposed through debugfs eentry. Relayfs is used to collect the spectral data. These interfaces are similar to ath10k spectral. spectral debugfs interfaces are below, echo background > /sys/kernel/debug/ieee80211/phy0/ath11k/spectral_scan_ctl echo trigger > /sys/kernel/debug/ieee80211/phy0/ath11k/spectral_scan_ctl iw dev wlan0 scan echo disable > /sys/kernel/debug/ieee80211/phy0/ath11k/spectral_scan_ctl cat /sys/kernel/debug/ieee80211/phy0/ath11k/spectral_scan0 > fft_samples.dump Tested-on: IPQ8074 WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591688014-26441-2-git-send-email-periyasa@codeaurora.org commit bd6478559e27414e7def8247136b0dcb1e1392f8 Author: Karthikeyan Periyasamy Date: Tue Jun 9 13:03:33 2020 +0530 ath11k: Add direct buffer ring support Add direct buffer ring (dbring) with helper API, which is used by the spectral scan. Initialise the direct buffer ring based on the dma ring capability, which get announced in the wmi service ready extended event. This ring is slightly changed from data path rings. Compare to data path ring this ring shares the hp and tp address to firmware though WMI commands. Also the replenish buffer size is derived from firmware announcement. driver receive indication through WMI event WMI_PDEV_DMA_RING_BUF_RELEASE_EVENTID. Tested-on: IPQ8074 WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591688014-26441-1-git-send-email-periyasa@codeaurora.org commit 675398674c4edc2058a1dd632abd5d748b4653c3 Author: Takashi Sakamoto Date: Sun Jun 14 23:12:21 2020 +0900 ALSA: firewire-motu: wait for notification when changing clock configuration for protocol v3 It costs expensive to change clock configuration for models of protocol version 3. In current implementation, speculative strategy is used to finish the operation; just waiting for 4 seconds. As long as I investigate, when accepting and changing clock status actually, the device sends notification with mask. This commit uses wise way to wait for the notification after changing sampling clock rate during 4 seconds. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20200614141221.53527-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit d9d52398b7108a6fa40b66f73830e8042824d817 Merge: b3a9e3b9622ae 8abf41dcd1bcd Author: Takashi Iwai Date: Mon Jun 15 15:58:23 2020 +0200 Merge branch 'for-linus' into for-next Signed-off-by: Takashi Iwai commit 21d456a21030819d92b13fad21fdcc0000f7c030 Author: Emil Velikov Date: Sun May 17 20:36:54 2020 +0100 drm/malidp: convert platform driver to use dev_groups Platform drivers now have the option to have the platform core create and remove any needed sysfs attribute files. So take advantage of that and do not register "by hand" a sysfs file. Cc: Liviu Dudau Cc: Brian Starkey Cc: Mali DP Maintainers Cc: dri-devel@lists.freedesktop.org Signed-off-by: Emil Velikov Tested-by: Liviu Dudau Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200517193655.3895087-2-emil.l.velikov@gmail.com commit 0f53f2da43fab1c9ce5cf0a9fc6f989e7ab29fd3 Author: Emil Velikov Date: Sun May 17 20:36:53 2020 +0100 drm/arm: Kconfig annotate drivers as COMPILE_TEST Add the COMPILE_TEST conditional, so that people can at least build test the drivers. Cc: Liviu Dudau Cc: Brian Starkey Cc: Mali DP Maintainers Cc: dri-devel@lists.freedesktop.org Signed-off-by: Emil Velikov Tested-by: Liviu Dudau Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200517193655.3895087-1-emil.l.velikov@gmail.com commit c32747993871e95ff40ed37a373172b9004e9759 Author: Emil Velikov Date: Wed Jun 3 18:04:34 2020 +0100 drm/todo: Add item about modeset properties Add some information about pre-atomic modeset properties alongside a list of suggestions how to handle the different instances. Signed-off-by: Emil Velikov Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200603170434.2363446-1-emil.l.velikov@gmail.com commit 264ddd077c72092178153fc32d510dcecff32eeb Author: Emil Velikov Date: Sat May 30 13:46:40 2020 +0100 drm/auth: make drm_{set,drop}master_ioctl symmetrical Currently the ret handling is all over the place - with two redundant assignments and another one addressed earlier. Use the exact same flow in both functions. v2: straighten the code flow, instead of just removing the assignments Cc: David Airlie Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Colin Ian King Signed-off-by: Emil Velikov Reviewed-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200530124640.4176323-2-emil.l.velikov@gmail.com commit 907f53200f982cd377e75abbc1b18ed624d7ae66 Author: Emil Velikov Date: Sat May 30 13:46:39 2020 +0100 drm: vmwgfx: remove drm_driver::master_set() return type The function always returns zero (success). Ideally we'll remove it all together - although that's requires a little more work. For now, we can drop the return type and simplify the drm core code surrounding it. v2: remove redundant assignment (Sam) Cc: David Airlie Cc: Daniel Vetter Cc: VMware Graphics Cc: Roland Scheidegger Signed-off-by: Emil Velikov Cc: Sam Ravnborg Reviewed-by: Sam Ravnborg Reviewed-by: Roland Scheidegger Link: https://patchwork.freedesktop.org/patch/msgid/20200530124640.4176323-1-emil.l.velikov@gmail.com commit 8b700983de82f79e05b2c1136d6513ea4c9b22c4 Author: Peter Zijlstra Date: Wed Apr 22 13:10:04 2020 +0200 sched: Remove sched_set_*() return value Ingo suggested that since the new sched_set_*() functions are implemented using the 'nocheck' variants, they really shouldn't ever fail, so remove the return value. Cc: axboe@kernel.dk Cc: daniel.lezcano@linaro.org Cc: sudeep.holla@arm.com Cc: airlied@redhat.com Cc: broonie@kernel.org Cc: paulmck@kernel.org Suggested-by: Ingo Molnar Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit 616d91b68cd56bcb1954b6a5af7d542401fde772 Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched: Remove sched_setscheduler*() EXPORTs Now that nothing (modular) still uses sched_setscheduler(), remove the exports. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit 2cca5426b9c108998bc03230cd6ae440f3e205ed Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,psi: Convert to sched_set_fifo_low() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively no change. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Acked-by: Johannes Weiner commit ce1c8afd3f3119ddaddcdff27579f5723f55c75e Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,rcutorture: Convert to sched_set_fifo_low() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively no change. Cc: paulmck@kernel.org Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Reviewed-by: Paul E. McKenney commit b1433395c4cc078b4382429e6d7dd1721714094f Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,rcuperf: Convert to sched_set_fifo_low() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively no change. Cc: paulmck@kernel.org Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Reviewed-by: Paul E. McKenney commit 93db9129fa4beb78e2227554d237e8db04ca514c Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,locktorture: Convert to sched_set_fifo() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively changes prio from 99 to 50. Cc: paulmck@kernel.org Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Reviewed-by: Paul E. McKenney commit 7a40798c714ff462863352d490b382515daba49e Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,irq: Convert to sched_set_fifo() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively no change. Cc: tglx@linutronix.de Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit 94beddacb53cddb78baab6b4597195bb766d70b0 Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,watchdog: Convert to sched_set_fifo() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively changes prio from 99 to 50. Cc: wim@linux-watchdog.org Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit 28d2f209cd1620afaca6d0a61d1e88a269e9e875 Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,serial: Convert to sched_set_fifo() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively no change. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit a2bee0662f72fcbd248a424a1453dd946dcdaf3d Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,powerclamp: Convert to sched_set_fifo() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively no change. Cc: rafael.j.wysocki@intel.com Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit 9309de08f14f49a29f6cc8a20653731235692b1f Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,ion: Convert to sched_set_normal() In an attempt to take away sched_setscheduler() from modules, change this into sched_set_normal(.nice = 19). Cc: john.stultz@linaro.org Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit c3f47cf940efacaa8fab50973dc98f369c2066ff Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,powercap: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively no change. Cc: daniel.lezcano@linaro.org Cc: rafael.j.wysocki@intel.com Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit 3070da33400c18e0454832425a530d2d0e6a6fcf Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,spi: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. No effective change. Cc: broonie@kernel.org Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Reviewed-by: Douglas Anderson Reviewed-by: Guenter Roeck commit f8ec806be101e9a6482532d19eca4c5be3535b74 Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,mmc: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. In this case, use fifo_low, because it only cares about being above SCHED_NORMAL. Effectively no change in behaviour. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Acked-by: Ulf Hansson commit 73f73cc2432acf2e1c8a1ce0720eaced7b5dda16 Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,ivtv: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively changes from 99 to 50. Cc: awalls@md.metrocast.net Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Acked-by: Hans Verkuil Tested-by: Hans Verkuil commit 7b31e940b17bc47ca2f5e332c166231f01317469 Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,drm/scheduler: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. In this case, use fifo_low, because it only cares about being above SCHED_NORMAL. Effectively no change in behaviour. Cc: alexander.deucher@amd.com Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit 64419ca67622974f46bf053a7e745d2d0d1c43ef Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,msm: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Use sched_set_fifo(); Effectively changes prio from 16 to 50. Cc: airlied@redhat.com Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit 6e6d6efabd2567337f7d97791f7a60aa5fdbcfc2 Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,psci: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Effectively changes prio from 99 to 50. XXX this thing is horrific, it basically open-codes a stop-machine and idle. Cc: daniel.lezcano@linaro.org Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Acked-by: Valentin Schneider Tested-by: Sudeep Holla commit c9ec0524706e580c78c61e38ef5e7761ed2f8485 Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,drbd: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. In this case, use fifo_low, because it only cares about being above SCHED_NORMAL. Effectively changes prio from 2 to 1. Cc: axboe@kernel.dk Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit 4ca6c1a060943161c6c2ce09e02ed58a69669cfe Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,acpi_pad: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. In this case, use fifo_low, because it only cares about being above SCHED_NORMAL. Effectively no change in behaviour. XXX: this driver is still complete crap; why isn't it using proper idle injection or at the very least play_idle() ? Cc: rafael.j.wysocki@intel.com Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar commit dbc6d0d5a5467adb6ea5fb25844e471c7bf8fabf Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,crypto: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. Use sched_set_fifo() to request SCHED_FIFO and delegate actual priority selection to userspace. Effectively no change in behaviour. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Acked-by: Herbert Xu commit 0030c1d4a38757fb54a0c96e5e8b59cc0c4f3f28 Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched,bL_switcher: Convert to sched_set_fifo*() Because SCHED_FIFO is a broken scheduler model (see previous patches) take away the priority field, the kernel can't possibly make an informed decision. In this case, use fifo_low, because it only cares about being above SCHED_NORMAL. Effectively no change in behaviour. Cc: rmk+kernel@arm.linux.org.uk Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Acked-by: Nicolas Pitre commit 7318d4cc14c8c8a5dde2b0b72ea50fd2545f0b7a Author: Peter Zijlstra Date: Tue Apr 21 12:09:13 2020 +0200 sched: Provide sched_set_fifo() SCHED_FIFO (or any static priority scheduler) is a broken scheduler model; it is fundamentally incapable of resource management, the one thing an OS is actually supposed to do. It is impossible to compose static priority workloads. One cannot take two well designed and functional static priority workloads and mash them together and still expect them to work. Therefore it doesn't make sense to expose the priority field; the kernel is fundamentally incapable of setting a sensible value, it needs systems knowledge that it doesn't have. Take away sched_setschedule() / sched_setattr() from modules and replace them with: - sched_set_fifo(p); create a FIFO task (at prio 50) - sched_set_fifo_low(p); create a task higher than NORMAL, which ends up being a FIFO task at prio 1. - sched_set_normal(p, nice); (re)set the task to normal This stops the proliferation of randomly chosen, and irrelevant, FIFO priorities that dont't really mean anything anyway. The system administrator/integrator, whoever has insight into the actual system design and requirements (userspace) can set-up appropriate priorities if and when needed. Cc: airlied@redhat.com Cc: alexander.deucher@amd.com Cc: awalls@md.metrocast.net Cc: axboe@kernel.dk Cc: broonie@kernel.org Cc: daniel.lezcano@linaro.org Cc: gregkh@linuxfoundation.org Cc: hannes@cmpxchg.org Cc: herbert@gondor.apana.org.au Cc: hverkuil@xs4all.nl Cc: john.stultz@linaro.org Cc: nico@fluxnic.net Cc: paulmck@kernel.org Cc: rafael.j.wysocki@intel.com Cc: rmk+kernel@arm.linux.org.uk Cc: sudeep.holla@arm.com Cc: tglx@linutronix.de Cc: ulf.hansson@linaro.org Cc: wim@linux-watchdog.org Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ingo Molnar Tested-by: Paul E. McKenney commit 87e867b4269f29dac8190bca13912d08163a277f Author: Vincent Guittot Date: Fri Jun 12 17:47:03 2020 +0200 sched/pelt: Cleanup PELT divider Factorize in a single place the calculation of the divider to be used to to compute *_avg from *_sum value Suggested-by: Dietmar Eggemann Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200612154703.23555-1-vincent.guittot@linaro.org commit c49694173da004b1b16082f82f28bd625415fbb2 Author: Christophe JAILLET Date: Tue Jun 2 21:50:02 2020 +0200 sched/deadline: Fix a typo in a comment s/deadine/deadline/ Signed-off-by: Christophe JAILLET Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200602195002.677448-1-christophe.jaillet@wanadoo.fr commit 23e71d8ba42933bff12e453858fd68c073bc5258 Author: Luca Abeni Date: Wed May 20 15:42:43 2020 +0200 sched/deadline: Implement fallback mechanism for !fit case When a task has a runtime that cannot be served within the scheduling deadline by any of the idle CPU (later_mask) the task is doomed to miss its deadline. This can happen since the SCHED_DEADLINE admission control guarantees only bounded tardiness and not the hard respect of all deadlines. In this case try to select the idle CPU with the largest CPU capacity to minimize tardiness. Favor task_cpu(p) if it has max capacity of !fitting CPUs so that find_later_rq() can potentially still return it (most likely cache-hot) early. Signed-off-by: Luca Abeni Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juri Lelli Link: https://lkml.kernel.org/r/20200520134243.19352-6-dietmar.eggemann@arm.com commit b4118988fdcb4554ea6687dd8ff68bcab690b8ea Author: Luca Abeni Date: Wed May 20 15:42:42 2020 +0200 sched/deadline: Make DL capacity-aware The current SCHED_DEADLINE (DL) scheduler uses a global EDF scheduling algorithm w/o considering CPU capacity or task utilization. This works well on homogeneous systems where DL tasks are guaranteed to have a bounded tardiness but presents issues on heterogeneous systems. A DL task can migrate to a CPU which does not have enough CPU capacity to correctly serve the task (e.g. a task w/ 70ms runtime and 100ms period on a CPU w/ 512 capacity). Add the DL fitness function dl_task_fits_capacity() for DL admission control on heterogeneous systems. A task fits onto a CPU if: CPU original capacity / 1024 >= task runtime / task deadline Use this function on heterogeneous systems to try to find a CPU which meets this criterion during task wakeup, push and offline migration. On homogeneous systems the original behavior of the DL admission control should be retained. Signed-off-by: Luca Abeni Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juri Lelli Link: https://lkml.kernel.org/r/20200520134243.19352-5-dietmar.eggemann@arm.com commit 60ffd5edc5e4fa69622c125c54ef8e7d5d894af8 Author: Luca Abeni Date: Wed May 20 15:42:41 2020 +0200 sched/deadline: Improve admission control for asymmetric CPU capacities The current SCHED_DEADLINE (DL) admission control ensures that sum of reserved CPU bandwidth < x * M where x = /proc/sys/kernel/sched_rt_{runtime,period}_us M = # CPUs in root domain. DL admission control works well for homogeneous systems where the capacity of all CPUs are equal (1024). I.e. bounded tardiness for DL and non-starvation of non-DL tasks is guaranteed. But on heterogeneous systems where capacity of CPUs are different it could fail by over-allocating CPU time on smaller capacity CPUs. On an Arm big.LITTLE/DynamIQ system DL tasks can easily starve other tasks making it unusable. Fix this by explicitly considering the CPU capacity in the DL admission test by replacing M with the root domain CPU capacity sum. Signed-off-by: Luca Abeni Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juri Lelli Link: https://lkml.kernel.org/r/20200520134243.19352-4-dietmar.eggemann@arm.com commit fc9dc698472aa460a8b3b036d9b1d0b751f12f58 Author: Dietmar Eggemann Date: Wed May 20 15:42:40 2020 +0200 sched/deadline: Add dl_bw_capacity() Capacity-aware SCHED_DEADLINE Admission Control (AC) needs root domain (rd) CPU capacity sum. Introduce dl_bw_capacity() which for a symmetric rd w/ a CPU capacity of SCHED_CAPACITY_SCALE simply relies on dl_bw_cpus() to return #CPUs multiplied by SCHED_CAPACITY_SCALE. For an asymmetric rd or a CPU capacity < SCHED_CAPACITY_SCALE it computes the CPU capacity sum over rd span and cpu_active_mask. A 'XXX Fix:' comment was added to highlight that if 'rq->rd == def_root_domain' AC should be performed against the capacity of the CPU the task is running on rather the rd CPU capacity sum. This issue already exists w/o capacity awareness. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juri Lelli Link: https://lkml.kernel.org/r/20200520134243.19352-3-dietmar.eggemann@arm.com commit c81b89329933c6c0be809d4c0d2cb57c49153ee3 Author: Dietmar Eggemann Date: Wed May 20 15:42:39 2020 +0200 sched/deadline: Optimize dl_bw_cpus() Return the weight of the root domain (rd) span in case it is a subset of the cpu_active_mask. Continue to compute the number of CPUs over rd span and cpu_active_mask when in hotplug. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Juri Lelli Link: https://lkml.kernel.org/r/20200520134243.19352-2-dietmar.eggemann@arm.com commit 9b1b234bb86bcdcdb142e900d39b599185465dbb Author: Peng Liu Date: Tue Jun 9 23:09:36 2020 +0800 sched: correct SD_flags returned by tl->sd_flags() During sched domain init, we check whether non-topological SD_flags are returned by tl->sd_flags(), if found, fire a waning and correct the violation, but the code failed to correct the violation. Correct this. Fixes: 143e1e28cb40 ("sched: Rework sched_domain topology definition") Signed-off-by: Peng Liu Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20200609150936.GA13060@iZj6chx1xj0e0buvshuecpZ commit 3ea2f097b17e13a8280f1f9386c331b326a3dbef Author: Vincent Guittot Date: Tue Jun 9 14:37:48 2020 +0200 sched/fair: Fix NOHZ next idle balance With commit: 'b7031a02ec75 ("sched/fair: Add NOHZ_STATS_KICK")' rebalance_domains of the local cfs_rq happens before others idle cpus have updated nohz.next_balance and its value is overwritten. Move the update of nohz.next_balance for other idles cpus before balancing and updating the next_balance of local cfs_rq. Also, the nohz.next_balance is now updated only if all idle cpus got a chance to rebalance their domains and the idle balance has not been aborted because of new activities on the CPU. In case of need_resched, the idle load balance will be kick the next jiffie in order to address remaining ilb. Fixes: b7031a02ec75 ("sched/fair: Add NOHZ_STATS_KICK") Reported-by: Peng Liu Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Acked-by: Mel Gorman Link: https://lkml.kernel.org/r/20200609123748.18636-1-vincent.guittot@linaro.org commit b4098bfc5efb1fd7ecf40165132a1283aeea3500 Author: Peter Zijlstra Date: Fri Jul 26 16:54:10 2019 +0200 sched/deadline: Impose global limits on sched_attr::sched_period Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20190726161357.397880775@infradead.org commit 9cc5b8656892a72438ee7deb5e80f5be47643b8b Author: Marcelo Tosatti Date: Wed May 27 16:29:09 2020 +0200 isolcpus: Affine unbound kernel threads to housekeeping cpus This is a kernel enhancement that configures the cpu affinity of kernel threads via kernel boot option nohz_full=. When this option is specified, the cpumask is immediately applied upon kthread launch. This does not affect kernel threads that specify cpu and node. This allows CPU isolation (that is not allowing certain threads to execute on certain CPUs) without using the isolcpus=domain parameter, making it possible to enable load balancing on such CPUs during runtime (see kernel-parameters.txt). Note-1: this is based off on Wind River's patch at https://github.com/starlingx-staging/stx-integ/blob/master/kernel/kernel-std/centos/patches/affine-compute-kernel-threads.patch Difference being that this patch is limited to modifying kernel thread cpumask. Behaviour of other threads can be controlled via cgroups or sched_setaffinity. Note-2: Wind River's patch was based off Christoph Lameter's patch at https://lwn.net/Articles/565932/ with the only difference being the kernel parameter changed from kthread to kthread_cpus. Signed-off-by: Frederic Weisbecker Signed-off-by: Marcelo Tosatti Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200527142909.23372-3-frederic@kernel.org commit 043eb8e1051143a24811e6f35c276e35ae8247b6 Author: Marcelo Tosatti Date: Wed May 27 16:29:08 2020 +0200 kthread: Switch to cpu_possible_mask Next patch will switch unbound kernel threads mask to housekeeping_cpumask(), a subset of cpu_possible_mask. So in order to ease bisection, lets first switch kthreads default affinity from cpu_all_mask to cpu_possible_mask. It looks safe to do so as cpu_possible_mask seem to be initialized at setup_arch() time, way before kthreadd is created. Suggested-by: Frederic Weisbecker Signed-off-by: Frederic Weisbecker Signed-off-by: Marcelo Tosatti Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200527142909.23372-2-frederic@kernel.org commit 461daba06bdcb9c7a3f92b9bbd110e1f7d093ffc Author: Suren Baghdasaryan Date: Thu May 28 12:54:42 2020 -0700 psi: eliminate kthread_worker from psi trigger scheduling mechanism Each psi group requires a dedicated kthread_delayed_work and kthread_worker. Since no other work can be performed using psi_group's kthread_worker, the same result can be obtained using a task_struct and a timer directly. This makes psi triggering simpler by removing lists and locks involved with kthread_worker usage and eliminates the need for poll_scheduled atomic use in the hot path. Signed-off-by: Suren Baghdasaryan Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200528195442.190116-1-surenb@google.com commit f4291df103315a696f0b8c4f45ca8ae773c17441 Author: Giovanni Gherdovich Date: Sun May 31 20:24:53 2020 +0200 x86, sched: Bail out of frequency invariance if turbo_freq/base_freq gives 0 Be defensive against the case where the processor reports a base_freq larger than turbo_freq (the ratio would be zero). Fixes: 1567c3e3467c ("x86, sched: Add support for frequency invariance") Signed-off-by: Giovanni Gherdovich Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/20200531182453.15254-4-ggherdovich@suse.cz commit 51beea8862a3095559862df39554f05042e1195b Author: Giovanni Gherdovich Date: Sun May 31 20:24:52 2020 +0200 x86, sched: Bail out of frequency invariance if turbo frequency is unknown There may be CPUs that support turbo boost but don't declare any turbo ratio, i.e. their MSR_TURBO_RATIO_LIMIT is all zeroes. In that condition scale-invariant calculations can't be performed. Fixes: 1567c3e3467c ("x86, sched: Add support for frequency invariance") Suggested-by: Ricardo Neri Signed-off-by: Giovanni Gherdovich Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Rafael J. Wysocki Tested-by: Ricardo Neri Link: https://lkml.kernel.org/r/20200531182453.15254-3-ggherdovich@suse.cz commit e2b0d619b400ae326f954a018a1d65d736c237c5 Author: Giovanni Gherdovich Date: Sun May 31 20:24:51 2020 +0200 x86, sched: check for counters overflow in frequency invariant accounting The product mcnt * arch_max_freq_ratio can overflows u64. For context, a large value for arch_max_freq_ratio would be 5000, corresponding to a turbo_freq/base_freq ratio of 5 (normally it's more like 1500-2000). A large increment frequency for the MPERF counter would be 5GHz (the base clock of all CPUs on the market today is less than that). With these figures, a CPU would need to go without a scheduler tick for around 8 days for the u64 overflow to happen. It is unlikely, but the check is warranted. Under similar conditions, the difference acnt of two consecutive APERF readings can overflow as well. In these circumstances is appropriate to disable frequency invariant accounting: the feature relies on measures of the clock frequency done at every scheduler tick, which need to be "fresh" to be at all meaningful. A note on i386: prior to version 5.1, the GCC compiler didn't have the builtin function __builtin_mul_overflow. In these GCC versions the macro check_mul_overflow needs __udivdi3() to do (u64)a/b, which the kernel doesn't provide. For this reason this change fails to build on i386 if GCC<5.1, and we protect the entire frequency invariant code behind CONFIG_X86_64 (special thanks to "kbuild test robot" ). Fixes: 1567c3e3467c ("x86, sched: Add support for frequency invariance") Signed-off-by: Giovanni Gherdovich Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Rafael J. Wysocki Link: https://lkml.kernel.org/r/20200531182453.15254-2-ggherdovich@suse.cz commit 4581bea8b4ec4de353369775dfef921191e393b3 Author: Vincent Donnefort Date: Wed May 27 17:39:14 2020 +0100 sched/debug: Add new tracepoints to track util_est The util_est signals are key elements for EAS task placement and frequency selection. Having tracepoints to track these signals enables load-tracking and schedutil testing and/or debugging by a toolkit. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/1590597554-370150-1-git-send-email-vincent.donnefort@arm.com commit 1ca2034ed798aea72a68d3904bd39a6cbfbdf405 Author: Dietmar Eggemann Date: Wed Jun 3 10:03:04 2020 +0200 sched/fair: Remove unused 'sd' parameter from scale_rt_capacity() Since commit 8ec59c0f5f49 ("sched/topology: Remove unused 'sd' parameter from arch_scale_cpu_capacity()") it is no longer needed. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20200603080304.16548-5-dietmar.eggemann@arm.com commit e3e76a6a04114ec95b0969cd026e8904c67b431b Author: Dietmar Eggemann Date: Wed Jun 3 10:03:03 2020 +0200 sched/idle,stop: Remove .get_rr_interval from sched_class The idle task and stop task sched_classes return 0 in this function. The single call site in sched_rr_get_interval() calls p->sched_class->get_rr_interval() only conditional in case it is defined. Otherwise time_slice=0 will be used. The deadline sched class does not define it. Commit a57beec5d427 ("sched: Make sched_class::get_rr_interval() optional") introduced the default time-slice=0 for sched classes which do not provide this function. So .get_rr_interval for idle and stop sched_class can be removed to shrink the code a little. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200603080304.16548-4-dietmar.eggemann@arm.com commit 0900acf2d8273f79432a4ded122ad5a265e85783 Author: Dietmar Eggemann Date: Wed Jun 3 10:03:02 2020 +0200 sched/core: Remove redundant 'preempt' param from sched_class->yield_to_task() Commit 6d1cafd8b56e ("sched: Resched proper CPU on yield_to()") moved the code to resched the CPU from yield_to_task_fair() to yield_to() making the preempt parameter in sched_class->yield_to_task() unnecessary. Remove it. No other sched_class implements yield_to_task(). Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200603080304.16548-3-dietmar.eggemann@arm.com commit 844eb6458facb09d4871a480d8bda06550927a80 Author: Dietmar Eggemann Date: Wed Jun 3 10:03:01 2020 +0200 sched/pelt: Remove redundant cap_scale() definition Besides in PELT cap_scale() is used in the Deadline scheduler class for scale-invariant bandwidth enforcement. Remove the cap_scale() definition in kernel/sched/pelt.c and keep the one in kernel/sched/sched.h. Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20200603080304.16548-2-dietmar.eggemann@arm.com commit 3dc167ba5729ddd2d8e3fa1841653792c295d3f1 Author: Oleg Nesterov Date: Tue May 19 19:25:06 2020 +0200 sched/cputime: Improve cputime_adjust() People report that utime and stime from /proc//stat become very wrong when the numbers are big enough, especially if you watch these counters incrementally. Specifically, the current implementation of: stime*rtime/total, results in a saw-tooth function on top of the desired line, where the teeth grow in size the larger the values become. IOW, it has a relative error. The result is that, when watching incrementally as time progresses (for large values), we'll see periods of pure stime or utime increase, irrespective of the actual ratio we're striving for. Replace scale_stime() with a math64.h helper: mul_u64_u64_div_u64() that is far more accurate. This also allows architectures to override the implementation -- for instance they can opt for the old algorithm if this new one turns out to be too expensive for them. Signed-off-by: Oleg Nesterov Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200519172506.GA317395@hirez.programming.kicks-ass.net commit bb42b3d39781d7fcd3be7f9f9bf11b6661b5fdf1 Author: Roman Sudarikov Date: Mon Jun 1 11:35:43 2020 +0300 perf/x86/intel/uncore: Expose an Uncore unit to IIO PMON mapping Current version supports a server line starting Intel® Xeon® Processor Scalable Family and introduces mapping for IIO Uncore units only. Other units can be added on demand. IIO stack to PMON mapping is exposed through: /sys/devices/uncore_iio_/dieX where dieX is file which holds "Segment:Root Bus" for PCIe root port, which can be monitored by that IIO PMON block. Details are explained in Documentation/ABI/testing/sysfs-devices-mapping Reported-by: kbuild test robot Signed-off-by: Alexander Antonov Signed-off-by: Roman Sudarikov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Reviewed-by: Alexander Shishkin Link: https://lkml.kernel.org/r/20200601083543.30011-4-alexander.antonov@linux.intel.com commit 36b533bc5e3ed1039406f3b27e746b4d18f2cac1 Author: Roman Sudarikov Date: Mon Jun 1 11:35:42 2020 +0300 perf/x86/intel/uncore: Wrap the max dies calculation into an accessor The accessor to return number of dies on the platform. Signed-off-by: Alexander Antonov Signed-off-by: Roman Sudarikov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Reviewed-by: Alexander Shishkin Link: https://lkml.kernel.org/r/20200601083543.30011-3-alexander.antonov@linux.intel.com commit 19a39819818dee57e363bd44bd096e2e940a456b Author: Roman Sudarikov Date: Mon Jun 1 11:35:41 2020 +0300 perf/x86/intel/uncore: Expose an Uncore unit to PMON mapping Each Uncore unit type, by its nature, can be mapped to its own context - which platform component each PMON block of that type is supposed to monitor. Intel® Xeon® Scalable processor family (code name Skylake-SP) makes significant changes in the integrated I/O (IIO) architecture. The new solution introduces IIO stacks which are responsible for managing traffic between the PCIe domain and the Mesh domain. Each IIO stack has its own PMON block and can handle either DMI port, x16 PCIe root port, MCP-Link or various built-in accelerators. IIO PMON blocks allow concurrent monitoring of I/O flows up to 4 x4 bifurcation within each IIO stack. Software is supposed to program required perf counters within each IIO stack and gather performance data. The tricky thing here is that IIO PMON reports data per IIO stack but users have no idea what IIO stacks are - they only know devices which are connected to the platform. Understanding IIO stack concept to find which IIO stack that particular IO device is connected to, or to identify an IIO PMON block to program for monitoring specific IIO stack assumes a lot of implicit knowledge about given Intel server platform architecture. Usage example: ls /sys/devices/uncore__/die* Signed-off-by: Alexander Antonov Signed-off-by: Roman Sudarikov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Reviewed-by: Alexander Shishkin Link: https://lkml.kernel.org/r/20200601083543.30011-2-alexander.antonov@linux.intel.com commit f01719730bbe04b90ae60c7e9d2b6d3533308502 Author: Kan Liang Date: Thu May 28 08:19:29 2020 -0700 perf/x86/intel/uncore: Validate MMIO address before accessing An oops will be triggered, if perf tries to access an invalid address which exceeds the mapped area. Check the address before the actual access to MMIO sapce of an uncore unit. Suggested-by: David Laight Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1590679169-61823-3-git-send-email-kan.liang@linux.intel.com commit 1b94d31de422399421422af0e63c9685e7485901 Author: Kan Liang Date: Thu May 28 08:19:28 2020 -0700 perf/x86/intel/uncore: Record the size of mapped area Perf cannot validate an address before the actual access to MMIO space of some uncore units, e.g. IMC on TGL. Accessing an invalid address, which exceeds mapped area, can trigger oops. Perf never records the size of mapped area. Generic functions, e.g. uncore_mmio_read_counter(), cannot get the correct size for address validation. Add mmio_map_size in intel_uncore_type to record the size of mapped area. Print warning message if ioremap fails. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1590679169-61823-2-git-send-email-kan.liang@linux.intel.com commit 2af834f1faab3f1e218fcbcab70a399121620d62 Author: Kan Liang Date: Thu May 28 08:19:27 2020 -0700 perf/x86/intel/uncore: Fix oops when counting IMC uncore events on some TGL When counting IMC uncore events on some TGL machines, an oops will be triggered. [ 393.101262] BUG: unable to handle page fault for address: ffffb45200e15858 [ 393.101269] #PF: supervisor read access in kernel mode [ 393.101271] #PF: error_code(0x0000) - not-present page Current perf uncore driver still use the IMC MAP SIZE inherited from SNB, which is 0x6000. However, the offset of IMC uncore counters is larger than 0x6000, e.g. 0xd8a0. Enlarge the IMC MAP SIZE for TGL to 0xe000. Fixes: fdb64822443e ("perf/x86: Add Intel Tiger Lake uncore support") Reported-by: Ammy Yi Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Tested-by: Ammy Yi Tested-by: Chao Qin Link: https://lkml.kernel.org/r/1590679169-61823-1-git-send-email-kan.liang@linux.intel.com commit 548e1f6c76e1eb80ba29edd4286b9b9f2c37f5bf Author: Adrian Hunter Date: Tue May 12 15:19:15 2020 +0300 ftrace: Add perf text poke events for ftrace trampolines Add perf text poke events for ftrace trampolines when created and when freed. There can be 3 text_poke events for ftrace trampolines: 1. NULL -> trampoline By ftrace_update_trampoline() when !ops->trampoline Trampoline created 2. [e.g. on x86] CALL rel32 -> CALL rel32 By arch_ftrace_update_trampoline() when ops->trampoline and ops->flags & FTRACE_OPS_FL_ALLOC_TRAMP [e.g. on x86] via text_poke_bp() which generates text poke events Trampoline-called function target updated 3. trampoline -> NULL By ftrace_trampoline_free() when ops->trampoline and ops->flags & FTRACE_OPS_FL_ALLOC_TRAMP Trampoline freed Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200512121922.8997-9-adrian.hunter@intel.com commit dd9ddf466ad7a5d2e247925d81ebb0b878bf3b76 Author: Adrian Hunter Date: Tue May 12 15:19:14 2020 +0300 ftrace: Add perf ksymbol events for ftrace trampolines Symbols are needed for tools to describe instruction addresses. Pages allocated for ftrace's purposes need symbols to be created for them. Add such symbols to be visible via perf ksymbol events. Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200512121922.8997-8-adrian.hunter@intel.com commit fc0ea795f53c8d7040fa42471f74fe51d78d0834 Author: Adrian Hunter Date: Tue May 12 15:19:13 2020 +0300 ftrace: Add symbols for ftrace trampolines Symbols are needed for tools to describe instruction addresses. Pages allocated for ftrace's purposes need symbols to be created for them. Add such symbols to be visible via /proc/kallsyms. Example on x86 with CONFIG_DYNAMIC_FTRACE=y # echo function > /sys/kernel/debug/tracing/current_tracer # cat /proc/kallsyms | grep '\[__builtin__ftrace\]' ffffffffc0238000 t ftrace_trampoline [__builtin__ftrace] Note: This patch adds "__builtin__ftrace" as a module name in /proc/kallsyms for symbols for pages allocated for ftrace's purposes, even though "__builtin__ftrace" is not a module. Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200512121922.8997-7-adrian.hunter@intel.com commit 3e46bb40af8c12947c093efb8af56e0e921cd39b Author: Adrian Hunter Date: Tue May 12 15:19:12 2020 +0300 perf/x86: Add perf text poke events for kprobes Add perf text poke events for kprobes. That includes: - the replaced instruction(s) which are executed out-of-line i.e. arch_copy_kprobe() and arch_remove_kprobe() - the INT3 that activates the kprobe i.e. arch_arm_kprobe() and arch_disarm_kprobe() - optimised kprobe function i.e. arch_prepare_optimized_kprobe() and __arch_remove_optimized_kprobe() - optimised kprobe i.e. arch_optimize_kprobes() and arch_unoptimize_kprobe() Resulting in 8 possible text_poke events: 0: NULL -> probe.ainsn.insn (if ainsn.boostable && !kp.post_handler) arch_copy_kprobe() 1: old0 -> INT3 arch_arm_kprobe() // boosted kprobe active 2: NULL -> optprobe_trampoline arch_prepare_optimized_kprobe() 3: INT3,old1,old2,old3,old4 -> JMP32 arch_optimize_kprobes() // optprobe active 4: JMP32 -> INT3,old1,old2,old3,old4 // optprobe disabled and kprobe active (this sometimes goes back to 3) arch_unoptimize_kprobe() 5: optprobe_trampoline -> NULL arch_remove_optimized_kprobe() // boosted kprobe active 6: INT3 -> old0 arch_disarm_kprobe() 7: probe.ainsn.insn -> NULL (if ainsn.boostable && !kp.post_handler) arch_remove_kprobe() Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20200512121922.8997-6-adrian.hunter@intel.com commit 69e49088692899d25dedfa22f00dfb9761e86ed7 Author: Adrian Hunter Date: Tue May 12 15:19:11 2020 +0300 kprobes: Add perf ksymbol events for kprobe insn pages Symbols are needed for tools to describe instruction addresses. Pages allocated for kprobe's purposes need symbols to be created for them. Add such symbols to be visible via perf ksymbol events. Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20200512121922.8997-5-adrian.hunter@intel.com commit d002b8bc6dbc20e9043e279196cff8795dba05fe Author: Adrian Hunter Date: Thu May 28 11:00:58 2020 +0300 kprobes: Add symbols for kprobe insn pages Symbols are needed for tools to describe instruction addresses. Pages allocated for kprobe's purposes need symbols to be created for them. Add such symbols to be visible via /proc/kallsyms. Note: kprobe insn pages are not used if ftrace is configured. To see the effect of this patch, the kernel must be configured with: # CONFIG_FUNCTION_TRACER is not set CONFIG_KPROBES=y and for optimised kprobes: CONFIG_OPTPROBES=y Example on x86: # perf probe __schedule Added new event: probe:__schedule (on __schedule) # cat /proc/kallsyms | grep '\[__builtin__kprobes\]' ffffffffc00d4000 t kprobe_insn_page [__builtin__kprobes] ffffffffc00d6000 t kprobe_optinsn_page [__builtin__kprobes] Note: This patch adds "__builtin__kprobes" as a module name in /proc/kallsyms for symbols for pages allocated for kprobes' purposes, even though "__builtin__kprobes" is not a module. Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20200528080058.20230-1-adrian.hunter@intel.com commit d769811ca93303deb1d8729d20cceaca7051a6f1 Author: Adrian Hunter Date: Tue May 12 15:19:09 2020 +0300 perf/x86: Add support for perf text poke event for text_poke_bp_batch() callers Add support for perf text poke event for text_poke_bp_batch() callers. That includes jump labels. See comments for more details. Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200512121922.8997-3-adrian.hunter@intel.com commit e17d43b93e544f5016c0251d2074c15568d5d963 Author: Adrian Hunter Date: Tue May 12 15:19:08 2020 +0300 perf: Add perf text poke event Record (single instruction) changes to the kernel text (i.e. self-modifying code) in order to support tracers like Intel PT and ARM CoreSight. A copy of the running kernel code is needed as a reference point (e.g. from /proc/kcore). The text poke event records the old bytes and the new bytes so that the event can be processed forwards or backwards. The basic problem is recording the modified instruction in an unambiguous manner given SMP instruction cache (in)coherence. That is, when modifying an instruction concurrently any solution with one or multiple timestamps is not sufficient: CPU0 CPU1 0 1 write insn A 2 execute insn A 3 sync-I$ 4 Due to I$, CPU1 might execute either the old or new A. No matter where we record tracepoints on CPU0, one simply cannot tell what CPU1 will have observed, except that at 0 it must be the old one and at 4 it must be the new one. To solve this, take inspiration from x86 text poking, which has to solve this exact problem due to variable length instruction encoding and I-fetch windows. 1) overwrite the instruction with a breakpoint and sync I$ This guarantees that that code flow will never hit the target instruction anymore, on any CPU (or rather, it will cause an exception). 2) issue the TEXT_POKE event 3) overwrite the breakpoint with the new instruction and sync I$ Now we know that any execution after the TEXT_POKE event will either observe the breakpoint (and hit the exception) or the new instruction. So by guarding the TEXT_POKE event with an exception on either side; we can now tell, without doubt, which instruction another CPU will have observed. Signed-off-by: Adrian Hunter Signed-off-by: Peter Zijlstra (Intel) Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200512121922.8997-2-adrian.hunter@intel.com commit bb85429a9bf2e7d370b8e1afd72f933a88f0629f Author: Kan Liang Date: Tue May 19 12:18:25 2020 -0700 perf/x86/intel/uncore: Add Comet Lake support The uncore subsystem on Comet Lake is similar to Sky Lake. The only difference is the new PCI IDs for IMC. Share the perf code with Sky Lake. Add new PCI IDs in the table. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1589915905-55870-1-git-send-email-kan.liang@linux.intel.com commit b1d405751cd5792856b1b8333aafaca6bf09ccbb Author: Vitaly Kuznetsov Date: Mon May 25 16:41:23 2020 +0200 KVM: x86: Switch KVM guest to using interrupts for page ready APF delivery KVM now supports using interrupt for 'page ready' APF event delivery and legacy mechanism was deprecated. Switch KVM guests to the new one. Signed-off-by: Vitaly Kuznetsov Message-Id: <20200525144125.143875-9-vkuznets@redhat.com> [Use HYPERVISOR_CALLBACK_VECTOR instead of a separate vector. - Paolo] Signed-off-by: Paolo Bonzini commit 5d7f7d1d5e01c22894dee7c9c9266500478dca99 Author: Zhenzhong Duan Date: Thu Jun 11 10:32:38 2020 +0800 x86/mce/inject: Fix a wrong assignment of i_mce.status The original code is a nop as i_mce.status is or'ed with part of itself, fix it. Fixes: a1300e505297 ("x86/ras/mce_amd_inj: Trigger deferred and thresholding errors interrupts") Signed-off-by: Zhenzhong Duan Signed-off-by: Borislav Petkov Acked-by: Yazen Ghannam Link: https://lkml.kernel.org/r/20200611023238.3830-1-zhenzhong.duan@gmail.com commit b7c408a5e5e613d383ed9b02aa2fb9449a776caf Author: Geert Uytterhoeven Date: Tue Jun 2 14:28:15 2020 +0200 thunderbolt: Improve USB4 config symbol help text Fix the spelling of "specification", and add a missing "the" article. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mika Westerberg commit 9909bc43a2e218a5a71a6245c36d86e4f587c74b Author: 周琰杰 (Zhou Yanjie) Date: Wed Jun 3 02:33:54 2020 +0800 dt-bindings: MIPS: Document Ingenic SoCs binding. Document the available properties for the SoC root node and the CPU nodes of the devicetree for the Ingenic XBurst SoCs. Tested-by: H. Nikolaus Schaller Tested-by: Paul Boddie Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit 391e437eedc0dab0a9f2c26997e68e040ae04ea3 Author: Erwan Le Ray Date: Thu May 28 09:40:03 2020 +0200 ARM: dts: stm32: fix uart7_pins_a comments in stm32mp15-pinctrl Fix uart7_pins_a comments to indicate UART7 pins instead of UART4 pins. Fixes: bf4b5f379fed ("ARM: dts: stm32: Add missing pinctrl definitions for STM32MP157") Signed-off-by: Erwan Le Ray Signed-off-by: Alexandre Torgue commit f6b43d89d3b5a31bf4251a26c61e92bf659e74c5 Author: Erwan Le Ray Date: Thu May 28 09:40:02 2020 +0200 ARM: dts: stm32: fix uart nodes ordering in stm32mp15-pinctrl Fix usart and uart nodes ordering. Several usart nodes didn't respect expecting ordering. Fixes: 077e0638fc83 ("ARM: dts: stm32: Add alternate pinmux for USART2 pins on stm32mp15") Signed-off-by: Erwan Le Ray Signed-off-by: Alexandre Torgue commit a5f8a58c6a2da588192392caea16d6988eb94d72 Author: Erwan Le Ray Date: Thu May 28 09:38:53 2020 +0200 ARM: dts: stm32: Update UART4 pin states on stm32mp15xx-dkx Add sleep and idle states to uart4 pin configuration. Signed-off-by: Erwan Le Ray Signed-off-by: Alexandre Torgue commit f3f2604ae9cbfa32d0f5629e5c61a4d79055e7e8 Author: Erwan Le Ray Date: Thu May 28 09:38:52 2020 +0200 ARM: dts: stm32: Update pin states for uart4 on stm32mp157c-ed1 Add sleep and idle states to uart4 pin configuration. Signed-off-by: Erwan Le Ray Signed-off-by: Alexandre Torgue commit 251fe9a53354a55ffc4151f8176b443c6129c384 Author: Erwan Le Ray Date: Thu May 28 09:38:51 2020 +0200 ARM: dts: stm32: update uart4 pin configuration for low power on stm32mp157 Sleep pin configuration is refined for low power modes: - "sleep" (no wakeup & console suspend enabled): put pins in analog state to optimize power - "idle" (wakeup capability): keep Rx pin in alternate function Signed-off-by: Bich Hemon Signed-off-by: Erwan Le Ray Signed-off-by: Alexandre Torgue commit 1a21240dd017d55966e55884e817686720c500bd Author: Benjamin Gaignard Date: Wed May 13 16:59:35 2020 +0200 dt-bindings: usb: dwc2: Fix issues for stm32mp15x SoC Correct the compatible list for stm32mp15x SoC. Fix the name of the stm32mp15x dedicated supply to be aligned with what the driver use. Signed-off-by: Benjamin Gaignard Acked-by: Rob Herring Signed-off-by: Alexandre Torgue commit c425423a075718eac625c78351fa5907d4f3a9de Author: Álvaro Fernández Rojas Date: Mon Jun 8 12:18:28 2020 +0200 MIPS: BCM63xx: add endif comments There are plenty of ifdefs in board_bcm963xx.c without endif comments. Let's make the code easier to follow by adding proper comments. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: Thomas Bogendoerfer commit c8a59a4d8e3c9e609fa915e39c3628c6dd08aeea Author: Herbert Xu Date: Wed Jun 10 21:05:13 2020 +1000 x86/microcode: Do not select FW_LOADER The x86 microcode support works just fine without FW_LOADER. In fact, these days most people load microcode early during boot so FW_LOADER never gets into the picture anyway. As almost everyone on x86 needs to enable MICROCODE, this by extension means that FW_LOADER is always built into the kernel even if nothing uses it. The FW_LOADER system is about two thousand lines long and contains user-space facing interfaces that could potentially provide an entry point into the kernel (or beyond). Remove the unnecessary select of FW_LOADER by MICROCODE. People who need the FW_LOADER capability can still enable it. [ bp: Massage a bit. ] Signed-off-by: Herbert Xu Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200610042911.GA20058@gondor.apana.org.au commit 7f6ffbb885d147557bdca471c37b7b1204005798 Author: Heiko Stuebner Date: Wed Jan 29 17:38:21 2020 +0100 clk: rockchip: convert rk3036 pll type to use internal lock status The rk3036 pll type exposes its lock status in both its pllcon registers as well as the General Register Files. To remove one dependency convert it to the "internal" lock status, similar to how rk3399 handles it. Signed-off-by: Heiko Stuebner Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200129163821.1547295-3-heiko@sntech.de commit 3507df1a4615113ae6509e0f14f6546f0d1c84b4 Author: Heiko Stuebner Date: Wed Jan 29 17:38:20 2020 +0100 clk: rockchip: convert basic pll lock_wait to use regmap_read_poll_timeout Instead of open coding the polling of the lock status, use the handy regmap_read_poll_timeout for this. As the pll locking is normally blazingly fast and we don't want to incur additional delays, we're not doing any sleeps similar to for example the imx clk-pllv4 and define a very safe but still short timeout of 1ms. Suggested-by: Stephen Boyd Signed-off-by: Heiko Stuebner Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200129163821.1547295-2-heiko@sntech.de commit bf4237a188f872e535de8cbfc7903c1387b83b01 Author: Heiko Stuebner Date: Wed Jan 29 17:38:19 2020 +0100 clk: rockchip: convert rk3399 pll type to use readl_relaxed_poll_timeout Instead of open coding the polling of the lock status, use the handy readl_relaxed_poll_timeout for this. As the pll locking is normally blazingly fast and we don't want to incur additional delays, we're not doing any sleeps similar to for example the imx clk-pllv4 and define a very safe but still short timeout of 1ms. Suggested-by: Stephen Boyd Signed-off-by: Heiko Stuebner Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20200129163821.1547295-1-heiko@sntech.de commit c7c4d698cd2882c4d095aeed43bbad6fc990e998 Author: Tobias Schramm Date: Thu May 28 19:25:50 2020 +0200 arm64: dts: rockchip: add fuel gauge to Pinebook Pro dts This commit adds cw2015 fuel gauge and battery to the Pinebook Pro dts. Signed-off-by: Tobias Schramm Link: https://lore.kernel.org/r/20200528172550.2324722-2-t.schramm@manjaro.org Signed-off-by: Heiko Stuebner commit ab349759cd5bc0a8b934b55840bc489f6838ac8f Author: Benjamin Gaignard Date: Wed May 13 16:59:33 2020 +0200 ARM: dts: stm32: update led nodes names for stm32f746-eval Update led nodes names to be aligned with yaml description Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit e810e2d880bf1fc076ae07817b8a30149f72cd10 Author: Benjamin Gaignard Date: Wed May 13 16:59:32 2020 +0200 ARM: dts: stm32: Add missing #address and #size cells on spi node for stm32mp151 Add the missing #address-cells and #size-cells to spi node. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 96f8d30a7cb820d8704c71ef5941b872dd54e710 Author: Benjamin Gaignard Date: Wed May 13 16:59:30 2020 +0200 ARM: dts: stm32: Update nodes names for stm32h743 pinctrl Fix the nodes names to be aligned with yaml description Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 2151761a9221ece341147e40c22807d20edb3c27 Author: Benjamin Gaignard Date: Wed May 13 16:59:29 2020 +0200 ARM: dts: stm32: remove useless interrupt-names property on stm32f743 Driver doesn't use interrupt's name to get it so remove it from the node. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 2c11de97e00e87d5da4ac7a876380a311e94a298 Author: Benjamin Gaignard Date: Wed May 13 16:59:28 2020 +0200 ARM: dts: stm32: update led nodes names for stm32f746-eval Update led nodes names to be aligned with yaml description Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 7cf1acae2279ab1f5d9acf6d1304f0f3519a2beb Author: Benjamin Gaignard Date: Wed May 13 16:59:27 2020 +0200 ARM: dts: stm32: update led nodes names for stm32f769-disco Update led nodes names to be aligned with yaml description Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 5f014cb81e04b2fe2ed94715d89822f25e6c498d Author: Benjamin Gaignard Date: Wed May 13 16:59:26 2020 +0200 ARM: dts: stm32: update led nodes names for stm32f429-eval Update led nodes names to be aligned with yaml description Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit e83b9a4afe49ff8fcb91db24e56dff67816f22a2 Author: Benjamin Gaignard Date: Wed May 13 16:59:25 2020 +0200 ARM: dts: stm32: remove useless interrupt-names property on stm32f746 Driver doesn't use interrupt's name to get it so remove it from the node. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit f85b1b913766a44e06d1b52954329f2b57e8c17c Author: Benjamin Gaignard Date: Wed May 13 16:59:24 2020 +0200 ARM: dts: stm32: update led nodes names for stm32f469-disco Update led nodes names to be aligned with yaml description Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 2a61f1168b54fffdd9e56a9f742c287fa2048b26 Author: Benjamin Gaignard Date: Wed May 13 16:59:23 2020 +0200 ARM: dts: stm32: update led nodes names for stm32f249-disco Update led nodes names to be aligned with yaml description Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 52107e8d6e576a26606516de43cd0d55dfda162e Author: Benjamin Gaignard Date: Wed May 13 16:59:22 2020 +0200 ARM: dts: stm32: update pwm pinctrl node names for stm32f4 Rename pwm pinctrl nodes name to matching with yaml bindings requirements. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 70d4301e1a87ac84b725bb17b0aeef3b046262cb Author: Benjamin Gaignard Date: Wed May 13 16:59:21 2020 +0200 ARM: dts: stm32: remove useless interrupt-names property on stm32f429 Driver doesn't use interrupt's name to get it so remove it from the node. Signed-off-by: Benjamin Gaignard Signed-off-by: Alexandre Torgue commit 1c9aa677623b9579b3d1a6339cc95ffe75a90e25 Author: dillon min Date: Tue Jun 9 21:26:42 2020 +0800 ARM: dts: stm32: enable stmpe811 on stm32429-disco board Enable the stmpe811 touch screen on stm32429-disco board. Signed-off-by: dillon min Reviewed-by: Philippe Schenker Signed-off-by: Alexandre Torgue commit 4409aeae98a297f30fc64a8dd1cd6f9ac8cbdb41 Author: dillon min Date: Tue Jun 9 21:26:41 2020 +0800 ARM: dts: stm32: Add pin map for I2C3 controller on stm32f4 This patch adds the pin configuration for I2C3 controller on stm32f4. Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit 4db36ed45b76a9bf75c3ca60e60ec607831a0f40 Author: dillon min Date: Tue Jun 9 21:26:40 2020 +0800 ARM: dts: stm32: add I2C3 support on STM32F429 SoC This patch adds I2C3 instances of the STM32F429 SoC Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit a726e2f000ec5643749e24145b3851da0850c927 Author: dillon min Date: Wed May 27 15:27:27 2020 +0800 ARM: dts: stm32: enable ltdc binding with ili9341, gyro l3gd20 on stm32429-disco board Enable the ltdc & ili9341, gyro l3gd20 on stm32429-disco board. Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit 27e6b725b429e063ec4adeab45e19f2f0f2f514e Author: dillon min Date: Wed May 27 15:27:26 2020 +0800 ARM: dts: stm32: Add pin map for ltdc & spi5 on stm32f429-disco board This patch adds the pin configuration for ltdc and spi5 controller on stm32f429-disco board. Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit d2fb716a7abd984c1f34335dbb295629da527baf Author: Christian König Date: Mon Jun 8 15:41:58 2020 +0200 drm/mm: remove invalid entry based optimization When the current entry is rejected as candidate for the search it does not mean that we can abort the subtree search. It is perfectly possible that only the alignment, but not the size is the reason for the rejection. Signed-off-by: Christian König Reviewed-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/369394/ commit fd88760b888bb58f3d1e76188ff056c78b717405 Author: dillon min Date: Wed May 27 15:27:25 2020 +0800 ARM: dts: stm32: Add dma config for spi5 on stm32f429 Enable spi5's dma configuration for graphics data output to ilitek ili9341 panel via mipi dbi interface. Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit 91cebe35d1f5a335ef3de80027a34d9fd04a7ae9 Author: Lad Prabhakar Date: Sun Jun 7 18:57:39 2020 +0100 ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add device tree for camera DB Add support for the camera daughter board which is connected to iWave's RZ/G1H Qseven carrier board. Also enable ttySC[0135] and ethernet1 interfaces. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1591552659-21314-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit d9563c972c167e6e8b40c840d476d30af8e5f667 Author: Geert Uytterhoeven Date: Mon May 18 10:16:44 2020 +0200 dt-bindings: clock: renesas: cpg: Convert to json-schema Convert the Renesas Clock Pulse Generator (CPG) Device Tree binding documentation to json-schema, combining support for: - R-Mobile APE6 (R8A73A4) and A1 (R8A7740), - R-Car M1 (R8A7778) and H1 (R8A7779), - RZ/A1 (R7S72100), - SH-Mobile AG5 (SH73A0). Keep the example for R-Mobile A1, which shows most properties. Drop the consumer examples, as they do not belong here. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20200518081644.23683-1-geert+renesas@glider.be commit 5818cc37e7fc72d9f2da255d9648c5f2e1a33b22 Author: Lad Prabhakar Date: Wed May 27 22:18:40 2020 +0100 ARM: dts: r8a7742: Add CMT SoC specific support Add CMT[01] support to r8a7742 SoC DT. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590614320-30160-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 937c9ebddc09284dc947afaae52c76d05ee1dcfd Author: Lad Prabhakar Date: Wed May 27 22:18:38 2020 +0100 ARM: dts: r8a7742: Add thermal device to DT This patch instantiates the thermal sensor module with thermal-zone support. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590614320-30160-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit fc3a1b2763d44ed471169e1dff2c8ce0fb352c1c Author: Lad Prabhakar Date: Wed May 27 21:23:33 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Sound DMA support via DVC on DTS Enable sound with DMA support on carrier board. DMA transfer uses DVC DMA DMApp [MEM] -> [SRC] -> [DVC] -> [SSIU] -> [SSI] DMA DMApp [MEM] <- [DVC] <- [SRC] <- [SSIU] <- [SSI] Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590611013-26029-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 436765010f266a2afd6c9afd15233225448a3e8d Author: Lad Prabhakar Date: Wed May 27 21:23:32 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Enable SGTL5000 audio codec This patch enables SGTL5000 audio codec on the carrier board. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590611013-26029-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 3816124fd0408ec98773409732035f8f8425ff50 Author: Lad Prabhakar Date: Tue May 26 22:01:44 2020 +0100 ARM: dts: r8a7742: Add audio support Add sound support for the RZ/G1H SoC (a.k.a. R8A7742). This work is based on similar work done on the R8A7744 SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/1590526904-13855-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 5a07fe33b8d4db72f825de90f8361a6a8680ba5f Author: Lad Prabhakar Date: Mon May 25 16:22:09 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Add RWDT support Enable RWDT and use 60 seconds as default timeout. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590420129-7531-5-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8a8c81aa605cec4a086bd46a9b9214b9671f8f42 Author: Lad Prabhakar Date: Mon May 25 16:22:08 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Enable Ethernet AVB Enable Ethernet AVB on iWave RZ/G1H carrier board. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590420129-7531-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b3850cd90edc0baad2ec47293f4ec3c929de6f76 Author: Lad Prabhakar Date: Mon May 25 16:22:07 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Enable SDHI2 controller Enable the SDHI2 controller on iWave RZ/G1H carrier board. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590420129-7531-3-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 73e44613f65d55ffd3e767f77580094618f36b27 Author: Lad Prabhakar Date: Mon May 25 16:22:06 2020 +0100 ARM: dts: r8a7742-iwg21d-q7: Enable SCIFB2 node Enable SCIFB2 interface on iWave RZ/G1H carrier board. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590420129-7531-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit ab586be87ed2cc94701b1ae70956ae1fad6ae992 Author: Lad Prabhakar Date: Sun May 24 22:37:57 2020 +0100 ARM: dts: r8a7742: Add XHCI support Add XHCI support to R8A7742 SoC DT. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590356277-19993-9-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b8618745829de50563470cd1e58c7ea10d6481b6 Author: Lad Prabhakar Date: Sun May 24 22:37:56 2020 +0100 ARM: dts: r8a7742: Add USB-DMAC and HSUSB device nodes Add USB DMAC and HSUSB device nodes on RZ/G1H SoC dtsi. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590356277-19993-8-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 4bb19c91d38e36b81e92de3d9b4e61d9b8928b54 Author: Lad Prabhakar Date: Sun May 24 22:37:55 2020 +0100 ARM: dts: r8a7742: Add USB 2.0 host support Describe internal PCI bridge devices, USB phy device and link PCI USB devices to USB phy. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1590356277-19993-7-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 72d1a34e3cedbb48513db50bb651c5ccf53e5a27 Author: Lad Prabhakar Date: Fri May 22 19:37:21 2020 +0100 ARM: dts: r8a7742: Add RWDT node Add a device node for the Watchdog Timer (RWDT) controller on the Renesas RZ/G1H (r8a7742) SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/1590172641-1556-1-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b06424ceec398d998feb2ae2a529b604f3d1e303 Author: Geert Uytterhoeven Date: Tue May 19 11:54:31 2020 +0200 ARM: dts: r9a06g032: Correct GIC compatible value order According to commit 61efb56e30f1c54e ("dt-bindings: arm: gic: Allow combining arm,gic-400 compatible strings"), "arm,gic-400" should be listed first. Signed-off-by: Geert Uytterhoeven Reviewed-by: Andre Przywara Link: https://lore.kernel.org/r/20200519095431.5650-1-geert+renesas@glider.be commit 57e7dad22bdb4bffa158d32a2e9d5b7145ab1e85 Author: Lad Prabhakar Date: Fri May 15 16:08:55 2020 +0100 ARM: dts: r8a7742: Add APMU nodes Add DT nodes for the Advanced Power Management Units (APMU), and use the enable-method to point out that the APMU should be used for SMP support. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/1589555337-5498-16-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 8cbef867e1c56ce57b942b751a033585f70b0547 Author: Lad Prabhakar Date: Fri May 15 16:08:53 2020 +0100 ARM: dts: r8a7742: Add Ether support Define the generic R8A7742 part of the Ether device node. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/1589555337-5498-14-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 9451f394e9cfb30e5a9b66f1022ef7f91717548b Author: Lad Prabhakar Date: Fri May 15 16:08:52 2020 +0100 ARM: dts: r8a7742: Add Ethernet AVB support Add Ethernet AVB support for R8A7742 SoC. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/1589555337-5498-13-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit b9884a16398161bea177f48ddc05884741a8b944 Author: Lad Prabhakar Date: Fri May 15 16:08:49 2020 +0100 ARM: dts: r8a7742: Add SATA nodes Add the SATA device nodes to the R8A7742 device tree. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/1589555337-5498-10-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 9493c8c34cb4b683917a0d2e82cc5df859b1e5a4 Author: Lad Prabhakar Date: Fri May 15 16:08:47 2020 +0100 ARM: dts: r8a7742: Add MMC0 node Describe MMC0 device node in the R8A7742 device tree. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/1589555337-5498-8-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 3ab2ea5fd1ce3c61d67d7b737c361bec2ec6441f Author: Lad Prabhakar Date: Fri May 15 16:08:46 2020 +0100 ARM: dts: r8a7742: Add SDHI nodes Add the SDHI device nodes to the R8A7742 device tree. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Reviewed-by: Wolfram Sang Link: https://lore.kernel.org/r/1589555337-5498-7-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 9af42b81cfc7f48d5384fc6a6c382dc716b45563 Author: Lad Prabhakar Date: Fri May 15 16:08:43 2020 +0100 ARM: dts: r8a7742: Add I2C and IIC support Add the I2C[0-3] and IIC[0-3] device nodes to the R8A7742 device tree. Automatic transmission for PMIC control is not available on IIC3 hence compatible strings "renesas,rcar-gen2-iic" and "renesas,rmobile-iic" are not added to iic3 node. Signed-off-by: Lad Prabhakar Reviewed-by: Marian-Cristian Rotariu Link: https://lore.kernel.org/r/1589555337-5498-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven commit 3abda79aa12aba40964b593459866c312c513c23 Author: Kieran Bingham Date: Tue Jun 9 13:45:56 2020 +0100 drivers: gpio: Fix trivial spelling The word 'descriptor' is misspelled throughout the tree. Fix it up accordingly: decriptors -> descriptors Signed-off-by: Kieran Bingham Signed-off-by: Bartosz Golaszewski commit 3d5bfbd9716318b1ca5c38488aa69f64d38a9aa5 Author: Song Hui Date: Thu Jun 11 18:28:09 2020 +0800 gpio: mpc8xxx: change the gpio interrupt flags. Delete the interrupt IRQF_NO_THREAD flags in order to gpio interrupts can be threaded to allow high-priority processes to preempt. Signed-off-by: Song Hui Signed-off-by: Bartosz Golaszewski commit 5197360f9e09449ac7249a98fbde36a3608e059c Author: Boris Brezillon Date: Mon May 18 19:03:21 2020 +0200 mtd: rawnand: mtk: Convert the driver to exec_op() Let's convert the driver to exec_op() to have one less driver relying on the legacy interface. Signed-off-by: Boris Brezillon Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20200518170321.321697-1-boris.brezillon@collabora.com commit 97cd738c44c85680d6c37f8583409ad2ef0ea17b Author: Wang Qing Date: Fri Jun 12 16:05:45 2020 +0800 gpiolib: sysfs: use kobj_to_dev Use kobj_to_dev() API instead of container_of(). Signed-off-by: Wang Qing Signed-off-by: Bartosz Golaszewski commit e012d15a238f24795081ef1e43ffe2859b6538ed Author: Mauro Carvalho Chehab Date: Mon Jun 15 08:46:47 2020 +0200 gpio: driver.h: fix kernel-doc markup There is one parameter with a wrong name at kernel-doc macro: ./include/linux/gpio/driver.h:499: warning: Function parameter or member 'gc' not described in 'gpiochip_add_data' ./include/linux/gpio/driver.h:499: warning: Excess function parameter 'chip' description in 'gpiochip_add_data' Fix it. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Bartosz Golaszewski commit 5fcd57505c002efc5823a7355e21f48dd02d5a51 Author: Jan Kara Date: Fri May 29 16:24:43 2020 +0200 writeback: Drop I_DIRTY_TIME_EXPIRE The only use of I_DIRTY_TIME_EXPIRE is to detect in __writeback_single_inode() that inode got there because flush worker decided it's time to writeback the dirty inode time stamps (either because we are syncing or because of age). However we can detect this directly in __writeback_single_inode() and there's no need for the strange propagation with I_DIRTY_TIME_EXPIRE flag. Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit f9cae926f35e8230330f28c7b743ad088611a8de Author: Jan Kara Date: Fri May 29 16:08:58 2020 +0200 writeback: Fix sync livelock due to b_dirty_time processing When we are processing writeback for sync(2), move_expired_inodes() didn't set any inode expiry value (older_than_this). This can result in writeback never completing if there's steady stream of inodes added to b_dirty_time list as writeback rechecks dirty lists after each writeback round whether there's more work to be done. Fix the problem by using sync(2) start time is inode expiry value when processing b_dirty_time list similarly as for ordinarily dirtied inodes. This requires some refactoring of older_than_this handling which simplifies the code noticeably as a bonus. Fixes: 0ae45f63d4ef ("vfs: add support for a lazytime mount option") CC: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 5afced3bf28100d81fb2fe7e98918632a08feaf5 Author: Jan Kara Date: Fri May 29 15:05:22 2020 +0200 writeback: Avoid skipping inode writeback Inode's i_io_list list head is used to attach inode to several different lists - wb->{b_dirty, b_dirty_time, b_io, b_more_io}. When flush worker prepares a list of inodes to writeback e.g. for sync(2), it moves inodes to b_io list. Thus it is critical for sync(2) data integrity guarantees that inode is not requeued to any other writeback list when inode is queued for processing by flush worker. That's the reason why writeback_single_inode() does not touch i_io_list (unless the inode is completely clean) and why __mark_inode_dirty() does not touch i_io_list if I_SYNC flag is set. However there are two flaws in the current logic: 1) When inode has only I_DIRTY_TIME set but it is already queued in b_io list due to sync(2), concurrent __mark_inode_dirty(inode, I_DIRTY_SYNC) can still move inode back to b_dirty list resulting in skipping writeback of inode time stamps during sync(2). 2) When inode is on b_dirty_time list and writeback_single_inode() races with __mark_inode_dirty() like: writeback_single_inode() __mark_inode_dirty(inode, I_DIRTY_PAGES) inode->i_state |= I_SYNC __writeback_single_inode() inode->i_state |= I_DIRTY_PAGES; if (inode->i_state & I_SYNC) bail if (!(inode->i_state & I_DIRTY_ALL)) - not true so nothing done We end up with I_DIRTY_PAGES inode on b_dirty_time list and thus standard background writeback will not writeback this inode leading to possible dirty throttling stalls etc. (thanks to Martijn Coenen for this analysis). Fix these problems by tracking whether inode is queued in b_io or b_more_io lists in a new I_SYNC_QUEUED flag. When this flag is set, we know flush worker has queued inode and we should not touch i_io_list. On the other hand we also know that once flush worker is done with the inode it will requeue the inode to appropriate dirty list. When I_SYNC_QUEUED is not set, __mark_inode_dirty() can (and must) move inode to appropriate dirty list. Reported-by: Martijn Coenen Reviewed-by: Martijn Coenen Tested-by: Martijn Coenen Reviewed-by: Christoph Hellwig Fixes: 0ae45f63d4ef ("vfs: add support for a lazytime mount option") CC: stable@vger.kernel.org Signed-off-by: Jan Kara commit b35250c0816c7cf7d0a8de92f5fafb6a7508a708 Author: Jan Kara Date: Wed Jun 10 17:36:03 2020 +0200 writeback: Protect inode->i_io_list with inode->i_lock Currently, operations on inode->i_io_list are protected by wb->list_lock. In the following patches we'll need to maintain consistency between inode->i_state and inode->i_io_list so change the code so that inode->i_lock protects also all inode's i_io_list handling. Reviewed-by: Martijn Coenen Reviewed-by: Christoph Hellwig CC: stable@vger.kernel.org # Prerequisite for "writeback: Avoid skipping inode writeback" Signed-off-by: Jan Kara commit 1c65b6184441bdbdab2fae2984354f2038b8b6f7 Author: Jonathan Bakker Date: Sat Jun 13 11:44:27 2020 -0700 ARM: dts: s5pv210: Correct BCM4329 bluetooth node There are several issues with the bluetooth node - the wrong compatible was used (because the bcm4329 compatible didn't exist when the node was added), the max rate was incorrect (due to limitations in the samsung TTY driver which have now been fixed), the clocks were not assigned properly so some rates didn't work, and the some pinctrl settings weren't explicitly set. Fix all of the above issues. While we're at it, update from the deprecated host-wakeup-gpios property to the host-wake interrupt. Signed-off-by: Jonathan Bakker Signed-off-by: Krzysztof Kozlowski commit c713a4e3e826c07579df9c32b4d10bb5e1857c7d Author: Jonathan Bakker Date: Sat Jun 13 11:44:26 2020 -0700 ARM: dts: s5pv210: Add BMA023 accelerometer support to Aries Aries boards have a BMA023 accelerometer attached over i2c-gpio. Signed-off-by: Jonathan Bakker Signed-off-by: Krzysztof Kozlowski commit 7c558af511d01ef0ab0fe1692517f80d27e17cc3 Author: Jonathan Bakker Date: Sat Jun 13 11:44:25 2020 -0700 ARM: dts: s5pv210: Add support for GP2A light sensor on Aries Aries boards have a GP2A light/proximity sensor attached over i2c-gpio. As the chip outputs a current and the board has no current ADC, a current shunt resistor and a voltage ADC are used. Signed-off-by: Jonathan Bakker Signed-off-by: Krzysztof Kozlowski commit 99bb20321f0e4886c8f7c12f3406828b24f00d9c Author: Jonathan Bakker Date: Sat Jun 13 11:44:24 2020 -0700 ARM: dts: s5pv210: Correct fuelgauge definition on Aries Correct the fuelgauge definition because only the fuelgauge on fascinate4g has interrupt support (and even then it was wrong). Also, assign the GPIO pinctrl so the interrupt is properly configured Signed-off-by: Jonathan Bakker Signed-off-by: Krzysztof Kozlowski commit 5b293570913fad10fe30e79cb981a83d486f8d72 Author: Jonathan Bakker Date: Sat Jun 13 11:44:23 2020 -0700 ARM: dts: s5pv210: Add interrupt-controller property to gph3 The GPH3 pins on s5pv210 have interrupt support and had the interrupt-cells property but was missing the interrupt-controller property. Signed-off-by: Jonathan Bakker Signed-off-by: Krzysztof Kozlowski commit 3fb7fa49979e4ab3d593be21fbf42cd85530ee38 Author: Marek Szyprowski Date: Wed Jun 3 12:46:47 2020 +0200 ARM: dts: exynos: Enable Bluetooth support for Artik5 board Add a node for the BCM4354 Bluetooth chip on the serial bus #0 on the Exynos3250-based Artik5 boards. Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 587a87b9d7e94927edcdea018565bc1939381eb1 Author: Imre Deak Date: Fri Jun 12 15:17:31 2020 +0300 drm/i915/icl+: Fix hotplug interrupt disabling after storm detection Atm, hotplug interrupts on TypeC ports are left enabled after detecting an interrupt storm, fix this. Reported-by: Kunal Joshi References: https://gitlab.freedesktop.org/drm/intel/-/issues/351 Bugzilla: https://gitlab.freedesktop.org/drm/intel/-/issues/1964 Cc: Kunal Joshi Cc: stable@vger.kernel.org Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200612121731.19596-1-imre.deak@intel.com commit 4464005a12b5c79e1a364e6272ee10a83413f928 Author: Alim Akhtar Date: Thu May 28 06:46:58 2020 +0530 arm64: dts: exynos: Add UFS node to Exynos7 Add UFS and UFS-PHY device nods to Exynos7 SoC and Espresso board. Signed-off-by: Alim Akhtar Tested-by: Paweł Chmiel Signed-off-by: Krzysztof Kozlowski commit d644853ff8fcbb7a4e3757f9d8ccc39d930b7e3c Author: Marek Szyprowski Date: Thu May 28 10:15:25 2020 +0200 ARM: dts: exynos: Extend all Exynos5800 A15's OPPs with max voltage data On Exynos5422/5800 the regulator supply for the A15 cores ("vdd_arm") is coupled with the regulator supply for the SoC internal circuits ("vdd_int"), thus all operating points that modify one of those supplies have to specify a triplet of the min/target/max values to properly work with regulator coupling. Fixes: eaffc4de16c6 ("ARM: dts: exynos: Add missing CPU frequencies for Exynos5422/5800") Cc: Signed-off-by: Marek Szyprowski Signed-off-by: Krzysztof Kozlowski commit 33f466eef90694b812c79a26f560502784971d0f Author: Ben Pai Date: Fri Jun 5 18:06:28 2020 +0800 ARM: dts: aspeed: mihawk: Add 8 tmp401 thermal sensors Signed-off-by: Ben Pai Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit f806a23c0dbde50107139368b5085acb5219a4af Author: Ben Pai Date: Fri Jun 5 18:06:14 2020 +0800 ARM: dts: aspeed: mihawk: IO expander uses TCA9554 driver Set smbus_en of IO expander to 1 in order to be able to read sensor. Signed-off-by: Ben Pai Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit 817ef1a456da7ffbc680763180f23af1fc05815f Author: Joel Stanley Date: Thu May 7 08:18:12 2020 +0930 ARM: dts: aspeed: rainier: System has one SPI NOR Remove the second as it doesn't exist. Reviewed-by: Andrew Jeffery Signed-off-by: Joel Stanley commit c71d13f9a868e2ea4d31284bc7975c7ec145167f Author: Fabio Estevam Date: Fri May 29 07:42:34 2020 -0300 Documentation: ABI: usb: chipidea: Update Li Jun's e-mail The freescale.com e-mail domain is no longer active for quite some time. Switch Li Jun's e-mail address to the NXP domain. Signed-off-by: Fabio Estevam Signed-off-by: Peter Chen commit 067c054fb9c90811ae38898ce649f8dafa13354c Author: Al Viro Date: Sun Jun 14 19:04:42 2020 -0400 dlmfs: clean up dlmfs_file_{read,write}() a bit The damn file is constant-sized - 64 bytes. IOW, * i_size_read() is pointless * so's dynamic allocation * so's the 'size' argument of user_dlm_read_lvb() * ... and so's open-coding simple_read_from_buffer(), while we are at it. Signed-off-by: Al Viro commit d18ffd83745a7491ba1057cb382d33a877d51e2a Author: Keyur Patel Date: Tue Jun 9 18:39:52 2020 -0400 iio: cros_ec: fix spelling mistake Fix typo: "tigger" --> "trigger" Signed-off-by: Keyur Patel Signed-off-by: Jonathan Cameron commit 8cb631ccbb1952b6422917f2ed16f760d84a762e Author: Lars-Peter Clausen Date: Sat Jun 13 14:17:15 2020 +0200 iio: Remove superfluous of_node assignments If a driver does not assign an of_node to a IIO device to IIO core will automatically assign the of_node of the parent device. This automatic assignment is done in the iio_device_register() function. There is a fair amount of drivers that currently manually assign the of_node of the IIO device. All but 4 of them can make use of the automatic assignment though. The exceptions are: * mxs-lradc-adc: Which uses the of_node of the parent of the parent. * stm32-dfsdm-adc, stm32-adc and stm32-dac: Which reference the of_node assigned to the IIO device before iio_device_register() is called. All other drivers are updated to use automatic assignment. This reduces the amount of boilerplate code involved in setting up the IIO device. The patch has mostly been auto-generated with the following semantic patch // @exists@ expression indio_dev; expression parent; @@ indio_dev = \(devm_iio_device_alloc\|iio_device_alloc\)(&parent, ...) ... -indio_dev->dev.of_node = parent.of_node; @exists@ expression indio_dev; expression parent; @@ indio_dev = \(devm_iio_device_alloc\|iio_device_alloc\)(parent, ...) ... -indio_dev->dev.of_node = parent->of_node; // Signed-off-by: Lars-Peter Clausen Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 8f73a13f74571941c2ad6d04c65b52d39cbdf90b Author: Alexandru Ardelean Date: Wed Jun 3 14:40:23 2020 +0300 iio: remove left-over parent assignments These were found by doing some shell magic: ------------ for file in $(git grep -w devm_iio_device_alloc | cut -d: -f1 | sort | uniq) ; do if grep 'parent =' $file | grep -v trig | grep -vq devm_; then echo "$file -> $(grep "parent =" $file)" fi done ----------- The output is bearable [after the semantic patch is applied]. There is a mix of trigger assignments with some iio device parent assignments that are removed via this patch. JC: A few more added via inspection of all parent = statements in drivers/iio. Some of these may just have crossed with this series, others were less obvious to scripting due to some cross file / module boundary calls. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 2c9d8e1a6220ec1f0a7356d76926cc9feaf9d352 Author: Alexandru Ardelean Date: Wed Jun 3 14:40:22 2020 +0300 iio: light: lm3533-als: use iio_device_set_parent() to assign parent This assignment is the more peculiar as it assigns the parent of the platform-device's device (i.e. pdev->dev.parent) as the IIO device's parent. Since the devm_iio_device_alloc() [now] assigns the device argument as the default parent (and since this is the more common case), for cases where the parent needs to be different, the iio_device_set_parent helper should be used. That makes things a bit more obvious about the new behavior of devm_iio_device_alloc() and makes it clearer that iio_device_set_parent() should be used. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 2cbd54129fddd6ce943d327eb22895d7ce93ce76 Author: Alexandru Ardelean Date: Wed Jun 3 14:40:21 2020 +0300 iio: remove left-over comments about parent assignment These were obtained by doing a 'git diff | grep \/\*', in the previous diff to find comments. These needed a bit more manual review, as the semantic patch isn't great for catching these. The result is: /* Initialize Counter device and driver data */ /* Initialize IIO device */ /* Establish that the iio_dev is a child of the spi device */ /* Estabilish that the iio_dev is a child of the spi device */ /* Initiate the Industrial I/O device */ /* Establish that the iio_dev is a child of the device */ - /* establish that the iio_dev is a child of the i2c device */ - /* establish that the iio_dev is a child of the i2c device */ /* This is only used for removal purposes */ /* setup the industrialio driver allocated elements */ /* variant specific configuration */ /* Setup for userspace synchronous on demand sampling. */ st->readback_delay_us += 5; /* Add tWAIT */ - /* Establish that the iio_dev is a child of the i2c device */ /* Establish that the iio_dev is a child of the i2c device */ Out of which, 4 are really left-over comments about parent assignment. 3 of them are removed by the semantic patch, as the comment removed (by spatch) would be for an empty line. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit d3be83244c7dfe686d23f1c0bac75915587fc044 Author: Alexandru Ardelean Date: Fri May 22 11:22:05 2020 +0300 iio: remove explicit IIO device parent assignment This patch applies the semantic patch: @@ expression I, P, SP; @@ I = devm_iio_device_alloc(P, SP); ... - I->dev.parent = P; It updates 302 files and does 307 deletions. This semantic patch also removes some comments like '/* Establish that the iio_dev is a child of the i2c device */' But this is is only done in case where the block is left empty. The patch does not seem to cover all cases. It looks like in some cases a different variable is used in some cases to assign the parent, but it points to the same reference. In other cases, the block covered by ... may be just too big to be covered by the semantic patch. However, this looks pretty good as well, as it does cover a big bulk of the drivers that should remove the parent assignment. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit f5d017938e7a6517b85f7fd215213a28e11291fb Author: Alexandru Ardelean Date: Wed Jun 3 14:40:19 2020 +0300 iio: core: add iio_device_set_parent() helper By default, the device allocation will also assign a parent device to the IIO device object. In cases where devm_iio_device_alloc() is used, sometimes the parent device must be different than the device used to manage the allocation. In that case, this helper should be used to change the parent, hence the requirement to call this between allocation & registration. This pattern/requirement is not very common in the IIO space, and it may be cleaned up later. But until then, assigning the parent manually between allocation & registration is slightly easier. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 78289b4a58b58e9a8a76ef43ffbaf04a097e33c6 Author: Alexandru Ardelean Date: Wed Jun 3 14:40:18 2020 +0300 iio: core: pass parent device as parameter during allocation The change passes the parent device to the iio_device_alloc() call. This also updates the devm_iio_device_alloc() call to consider the device object as the parent device by default. Having it passed like this, should ensure that any IIO device object already has a device object as parent, allowing for neater control, like passing the 'indio_dev' object for other stuff [like buffers/triggers/etc], and potentially creating iiom_xxx(indio_dev) functions. With this patch, only the 'drivers/platform/x86/toshiba_acpi.c' needs an update to pass the parent object as a parameter. In the next patch all devm_iio_device_alloc() calls will be handled. Acked-by: Andy Shevchenko Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 9ca39411f9a9c833727750431da8dfd96ff80005 Author: Chuhong Yuan Date: Wed Jun 3 17:26:10 2020 +0800 iio: amplifiers: ad8366: Change devm_gpiod_get() to optional and add the missed check Since if there is no GPIO, nothing happens, replace devm_gpiod_get() with devm_gpiod_get_optional(). Also add IS_ERR() to fix the missing-check warning. Fixes: cee211f4e5a0 ("iio: amplifiers: ad8366: Add support for the ADA4961 DGA") Signed-off-by: Chuhong Yuan Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit df16c33a4028159d1ba8a7061c9fa950b58d1a61 Author: Tomasz Duszynski Date: Mon Jun 1 18:15:52 2020 +0200 iio: improve IIO_CONCENTRATION channel type description IIO_CONCENTRATION together with INFO_RAW specifier is used for reporting raw concentrations of pollutants. Raw value should be meaningless before being properly scaled. Because of that description shouldn't mention raw value unit whatsoever. Fix this by rephrasing existing description so it follows conventions used throughout IIO ABI docs. Fixes: 8ff6b3bc94930 ("iio: chemical: Add IIO_CONCENTRATION channel type") Signed-off-by: Tomasz Duszynski Acked-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit 4027860dcc4cd0c45c36bae21e45bee5a17f2f0f Author: Alexandru Ardelean Date: Mon May 25 13:27:44 2020 +0300 iio: Kconfig: at91_adc: add COMPILE_TEST dependency to driver Since changes can come from all sort of places, it may make sense to have this symbol as a dependency to make sure that the 'make allmodconfig' && 'make allyesconfig' build rules cover this driver as well for a compile-build/test. It seemed useful [recently] when trying to apply a change for this. Signed-off-by: Alexandru Ardelean Acked-by: Ludovic Desroches Signed-off-by: Jonathan Cameron commit 18d563858d97dbefc9a16c8210ef2f97dc264202 Author: Jonathan Cameron Date: Thu May 21 18:53:22 2020 +0100 iio: make iio_device_get_drvdata take a const struct iio_dev *. As this just calls dev_get_drvdata underneath which is happy with a const struct device * we should change and avoid potentially casting away a const in order to then put it back again. Signed-off-by: Jonathan Cameron Reviewed-by: Jean-Baptiste Maneyrol Signed-off-by: Jonathan Cameron commit cd64d3579d58f2aa547c1cff856d24169263f765 Author: Alexandru Ardelean Date: Tue May 26 16:44:48 2020 +0300 iio: stm32-adc: remove usage of iio_priv_to_dev() helper We may want to get rid of the iio_priv_to_dev() helper. The reason is that we will hide some of the members of the iio_dev structure (to prevent drivers from accessing them directly), and that will also mean hiding the implementation of the iio_priv_to_dev() helper inside the IIO core. Hiding the implementation of iio_priv_to_dev() implies that some fast-paths may not be fast anymore, so a general idea is to try to get rid of the iio_priv_to_dev() altogether. The iio_priv() helper won't be affected by the rework, as the iio_dev struct will keep a reference to the private information. For this driver, not using iio_priv_to_dev(), means reworking some paths to pass the iio device and using iio_priv() to access the private information. Signed-off-by: Alexandru Ardelean Acked-by: Fabrice Gasnier Signed-off-by: Jonathan Cameron commit 723151a2401afdcee4f53ae92775902b58ee0469 Author: Alexandru Ardelean Date: Mon May 25 16:10:34 2020 +0300 iio: dac: ad5592r: remove usage of iio_priv_to_dev() helper This was partially removed when the mlock cleanup was done. Only one more call is left in the ad5592r_alloc_channels() function. This one is simple. We just need to pass the iio_dev object and get the state via iio_priv(). Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 812a46b7ff8f77f44ad3d9867b3525b4e0804f70 Author: Jonathan Albrieux Date: Mon May 25 18:46:04 2020 +0200 iio: imu: bmi160: added mount-matrix support Add mount-matrix binding support. As chip could have different orientations a mount matrix support is needed to correctly translate these differences. Signed-off-by: Jonathan Albrieux Signed-off-by: Jonathan Cameron commit 5dea3fb066f015facfc97b0b5cdfd7bb26523785 Author: Jonathan Albrieux Date: Mon May 25 18:46:03 2020 +0200 iio: imu: bmi160: added regulator support Add vdd-supply and vddio-supply support. While working on an msm8916 device and having explicit declarations for regulators, without setting these regulators to regulators-always-on it happened those lines weren't ready because they could have been controlled by other components, causing failure in module's probe. This patch aim is to solve this situation by adding regulators control during bmi160_chip_init() and bmi160_chip_uninit(), assuring power to this component. Signed-off-by: Jonathan Albrieux Signed-off-by: Jonathan Cameron commit fb7749661a7f0b3a172f92860d34ef9a739ff63b Author: Jonathan Albrieux Date: Mon May 25 18:46:02 2020 +0200 iio: imu: bmi160: fix typo Fix a typo in MODULE_AUTHOR() argument. Signed-off-by: Jonathan Albrieux Signed-off-by: Jonathan Cameron commit 6e84d0ccc120db81ae39319e09e757e55de80093 Author: Jonathan Albrieux Date: Mon May 25 18:46:01 2020 +0200 dt-bindings: iio: imu: bmi160: add regulators and mount-matrix Add vdd-supply and vddio-supply support. Add mount-matrix support. Signed-off-by: Jonathan Albrieux Signed-off-by: Jonathan Cameron commit e7e3b9d23f3bc6774cce585ef4fcb02462e04065 Author: Gwendal Grignou Date: Tue May 26 21:35:17 2020 -0700 iio: cros_ec: Reapply range at resume EC does not currently preserve range across sensor reinit. If sensor is powered down at suspend, it will default to the EC default range at resume, not the range set by the host. Save range if modified, and apply at resume. Signed-off-by: Gwendal Grignou Signed-off-by: Jonathan Cameron commit 79846e33aac15f1a1451bcf424b7a1cc22440a88 Author: Christian Oder Date: Fri May 29 22:05:49 2020 +0200 iio: accel: mxc4005: add support for mxc6655 The mxc6655 is fully working with the existing mxc4005 driver. Add support for it. Signed-off-by: Christian Oder Signed-off-by: Jonathan Cameron commit c2c878097b06a481335e322bbb01e2da43e58881 Author: Rikard Falkeborn Date: Tue May 26 23:02:23 2020 +0200 iio: magnetometer: mmc35240: Constify struct reg_default mmc35240_reg_defaults is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 9759 3288 128 13175 3377 drivers/iio/magnetometer/mmc35240.o After: text data bss dec hex filename 9823 3224 128 13175 3377 drivers/iio/magnetometer/mmc35240.o Signed-off-by: Rikard Falkeborn Signed-off-by: Jonathan Cameron commit 893acabffadb45bd70c9eec798db08c89caef9cb Author: Rikard Falkeborn Date: Tue May 26 23:02:22 2020 +0200 iio: light: stk3310: Constify regmap_config stk3310_regmap_config is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 16027 5424 128 21579 544b drivers/iio/light/stk3310.o After: text data bss dec hex filename 16347 5104 128 21579 544b drivers/iio/light/stk3310.o Signed-off-by: Rikard Falkeborn Signed-off-by: Jonathan Cameron commit 6110cdce939c9396032027ff71ce804fa44918aa Author: Rikard Falkeborn Date: Tue May 26 23:02:20 2020 +0200 iio: dac: ad5592r-base: Constify struct iio_chan_spec_ext_info ad5592r_ext_info is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 13293 2088 256 15637 3d15 drivers/iio/dac/ad5592r-base.o After: text data bss dec hex filename 13421 1960 256 15637 3d15 drivers/iio/dac/ad5592r-base.o Signed-off-by: Rikard Falkeborn Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 948e6dd16d53726687ac4859791bd964c06512fc Author: Rikard Falkeborn Date: Tue May 26 23:02:19 2020 +0200 iio: dac: ad5380: Constify struct iio_chan_spec_ext_info ad5380_ext_info is not modified and can be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 12060 3280 192 15532 3cac drivers/iio/dac/ad5380.o After: text data bss dec hex filename 12252 3088 192 15532 3cac drivers/iio/dac/ad5380.o Signed-off-by: Rikard Falkeborn Acked-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit ce6c3736d9b0162478e7d8a1b725399aa5f6038d Author: Rikard Falkeborn Date: Tue May 26 23:02:18 2020 +0200 iio: adc: max11100: Constify struct iio_chan_spec max11100_channels is not modified and can therefore be made const to allow the compiler to put it in read-only memory. Before: text data bss dec hex filename 3776 1168 0 4944 1350 drivers/iio/adc/max11100.o After: text data bss dec hex filename 3968 976 0 4944 1350 drivers/iio/adc/max11100.o Signed-off-by: Rikard Falkeborn Signed-off-by: Jonathan Cameron commit ab4dd0128f637c6af159ab0ea79ea0fb4166fd8f Author: Andy Shevchenko Date: Thu May 28 17:15:52 2020 +0300 iio: imu: inv_mpu6050: Drop double check for ACPI companion device acpi_dev_get_resources() does perform the NULL pointer check against ACPI companion device which is given as function parameter. Thus, there is no need to duplicate this check in the caller. Signed-off-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 9604ed758dd807e749326ae8735f483567d1c35f Author: Jonathan Albrieux Date: Thu May 28 17:01:05 2020 +0200 iio: magnetometer: ak8975: Add gpio reset support According to AK09911 datasheet, if reset gpio is provided then deassert reset on ak8975_power_on() and assert reset on ak8975_power_off(). Without reset's deassertion during ak8975_power_on(), driver's probe fails on ak8975_who_i_am() while checking for device identity for AK09911 chip. AK09911 has an active low reset gpio to handle register's reset. AK09911 datasheet says that, if not used, reset pin should be connected to VID. This patch emulates this situation. Signed-off-by: Jonathan Albrieux Reviewed-by: Andy Shevchenko Reviewed-by: Stephan Gerhold Signed-off-by: Jonathan Cameron commit c2ea1d0cadde4e8e818b9f0bb13d9c457b7f0334 Author: Jonathan Albrieux Date: Thu May 28 17:00:17 2020 +0200 iio: magnetometer: ak8975: Fix typo, uniform measurement unit style Minor comment style edits. Signed-off-by: Jonathan Albrieux Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 94d2adc9c0b24863ccce467b280ac95f2acb83b0 Author: Jonathan Albrieux Date: Thu May 28 16:59:28 2020 +0200 dt-bindings: iio: magnetometer: ak8975: add gpio reset support Add reset-gpio support. Without reset's deassertion during ak8975_power_on(), driver's probe fails on ak8975_who_i_am() while checking for device identity for AK09911 chip. AK09911 has an active low reset gpio to handle register's reset. AK09911 datasheet says that, if not used, reset pin should be connected to VID. This patch emulates this situation. Signed-off-by: Jonathan Albrieux Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 7e000fbff7a0a49887c39af9586a7891654d23cd Author: Jonathan Albrieux Date: Thu May 28 16:58:47 2020 +0200 dt-bindings: iio: magnetometer: ak8975: convert format to yaml, add maintainer Converts documentation from txt format to yaml. Signed-off-by: Jonathan Albrieux Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit ba13993c50f73f2adb9199cf854926a6a4998b1b Author: Jonathan Albrieux Date: Thu May 28 16:56:04 2020 +0200 dt-bindings: iio: magnetometer: ak8975: reword gpios, add interrupts, fix style Reword gpios documentation, add interrupt documentation and fix styles. Update example to use interrupts instead of gpios. Signed-off-by: Jonathan Albrieux Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 603375df11bea12a779e54e4690cd6370f169620 Author: Jishnu Prakash Date: Thu May 28 22:24:28 2020 +0530 iio: adc: Update debug prints Change pr_err/pr_debug statements to dev_err/dev_dbg for increased clarity. Signed-off-by: Jishnu Prakash Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 35fbb7f00d3207612a1eb86ebcbe788b8efc999e Author: Jishnu Prakash Date: Thu May 28 22:24:27 2020 +0530 iio: adc: Update return value checks Clean up some return value checks to make code more compact. Signed-off-by: Jishnu Prakash Signed-off-by: Jonathan Cameron commit 082111e559055de66da41303b15958c494c1b984 Author: Jishnu Prakash Date: Thu May 28 22:24:26 2020 +0530 iio: adc: Add support for PMIC7 ADC The ADC architecture on PMIC7 is changed as compared to PMIC5. The major change from PMIC5 is that all SW communication to ADC goes through PMK8350, which communicates with other PMICs through PBS when the ADC on PMK8350 works in master mode. The SID register is used to identify the PMICs with which the PBS needs to communicate. Add support for the same. Signed-off-by: Jishnu Prakash Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron commit 572e76e3819eaf828b229f984bf3704e560a74e5 Author: Jishnu Prakash Date: Thu May 28 22:24:25 2020 +0530 iio: adc: Add info property under adc_data Add info property under adc_data to support adding ADC variants which may use different iio_info than the one defined for PMIC5. Signed-off-by: Jishnu Prakash Signed-off-by: Jonathan Cameron commit d1492bbd470280c687e6677a355f923435bdb3ac Author: Jishnu Prakash Date: Thu May 28 22:24:24 2020 +0530 iio: adc: Add PMIC7 ADC bindings Add documentation for PMIC7 ADC peripheral. For the PMIC7-type PMICs, ADC peripheral is present in HW for the following PMICs: PMK8350, PM8350, PM8350b, PMR735a and PMR735b. Of these, only the ADC peripheral on PMK8350 is exposed directly to SW. If SW needs to communicate with ADCs on other PMICs, it specifies the PMIC to PMK8350 through the newly added SID register and communication between PMK8350 ADC and other PMIC ADCs is carried out through PBS(Programmable Boot Sequence) at the firmware level. In addition, add definitions for ADC channels and virtual channel definitions (combination of ADC channel number and PMIC SID number) per PMIC, to be used by ADC clients for PMIC7. Signed-off-by: Jishnu Prakash Reviewed-by: Amit Kucheria Reviewed-by: Rob Herring Signed-off-by: Jonathan Cameron commit 5a471662b5d92b5ff79478fee27a6d63ca4e71c9 Author: Jishnu Prakash Date: Thu May 28 22:24:23 2020 +0530 iio: adc: Convert the QCOM SPMI ADC bindings to .yaml format Convert the adc bindings from .txt to .yaml format. Signed-off-by: Jishnu Prakash Reviewed-by: Amit Kucheria Reviewed-by: Rob Herring Acked-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 9bea1064239653239eb7f1bc44f908fcac5a75df Author: Dan Robertson Date: Sat May 30 19:10:10 2020 +0000 iio: accel: bma400: add support for bma400 spi Add basic support for the Bosch Sensortec BMA400 3-axes ultra-low power accelerometer when configured to use SPI. Signed-off-by: Dan Robertson Signed-off-by: Jonathan Cameron commit 68ba6eee8d9a6350711c980b9c7f62b1f134dab6 Author: Matt Ranostay Date: Sun May 31 06:02:08 2020 +0300 iio: chemical: atlas-ezo-sensor: move ret variable scope in atlas_ezo_read_raw() Move ret variable to the IIO_CHAN_INFO_RAW switch since currently only used within that scope. Signed-off-by: Matt Ranostay Signed-off-by: Jonathan Cameron commit 7d17577d49d68310aba991d7954b385478fda6c4 Author: Alexandru Ardelean Date: Fri May 22 09:56:16 2020 +0300 iio: humidity: hts221: remove usage of iio_priv_to_dev() We may want to get rid of the iio_priv_to_dev() helper. That's a bit uncertain at this point. The reason is that we will hide some of the members of the iio_dev structure (to prevent drivers from accessing them directly), and that will also mean hiding the implementation of the iio_priv_to_dev() helper inside the IIO core. Hiding the implementation of iio_priv_to_dev() implies that some fast-paths may not be fast anymore, so a general idea is to try to get rid of the iio_priv_to_dev() altogether. For this driver, removing the iio_priv_to_dev() helper means passing the iio_dev object on hts221_allocate_buffers() & hts221_allocate_trigger(). Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 4de87f45ce0f1359a8220079924fa9d61961d764 Author: Alexandru Ardelean Date: Fri May 22 09:53:22 2020 +0300 iio: position: iqs624: remove usage of iio_priv_to_dev() We may want to get rid of the iio_priv_to_dev() helper. That's a bit uncertain at this point. The reason is that we will hide some of the members of the iio_dev structure (to prevent drivers from accessing them directly), and that will also mean hiding the implementation of the iio_priv_to_dev() helper inside the IIO core. Hiding the implementation of iio_priv_to_dev() implies that some fast-paths may not be fast anymore, so a general idea is to try to get rid of the iio_priv_to_dev() altogether. For this driver, removing iio_priv_to_dev() also means keeping a reference on the state struct. Signed-off-by: Alexandru Ardelean Acked-by: Jeff LaBundy Signed-off-by: Jonathan Cameron commit 6dc855647c992d5e5f893a3680a893776efb2d9e Author: Alexandru Ardelean Date: Fri May 22 09:54:42 2020 +0300 iio: light: iqs621: remove usage of iio_priv_to_dev() We may want to get rid of the iio_priv_to_dev() helper. That's a bit uncertain at this point. The reason is that we will hide some of the members of the iio_dev structure (to prevent drivers from accessing them directly), and that will also mean hiding the implementation of the iio_priv_to_dev() helper inside the IIO core. Hiding the implementation of iio_priv_to_dev() implies that some fast-paths may not be fast anymore, so a general idea is to try to get rid of the iio_priv_to_dev() altogether. For this driver, removing iio_priv_to_dev() means keeping a reference on the state struct. Signed-off-by: Alexandru Ardelean Acked-by: Jeff LaBundy Signed-off-by: Jonathan Cameron commit 70804e560b072df175a3406b45bdeb60f194efc7 Author: Alexandru Ardelean Date: Fri May 22 10:08:01 2020 +0300 iio: light: tsl2563: pass iio device as i2c_client private data We may want to get rid of the iio_priv_to_dev() helper. That's a bit uncertain at this point. The reason is that we will hide some of the members of the iio_dev structure (to prevent drivers from accessing them directly), and that will also mean hiding the implementation of the iio_priv_to_dev() helper inside the IIO core. Hiding the implementation of iio_priv_to_dev() implies that some fast-paths may not be fast anymore, so a general idea is to try to get rid of the iio_priv_to_dev() altogether. For this driver, it implies passing the IIO device on the i2c client private data. The implementation of iio_priv() will not be affected by the rework/hiding of iio_priv_to_dev(). Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron commit 2267f68404d48b99ddda1728ceeedf6157b493fa Author: Chris Wilson Date: Fri Jun 12 13:39:49 2020 +0100 drm/i915/gt: Flush gen3 relocs harder, again gen3 does not fully flush MI stores to memory on MI_FLUSH, such that a subsequent read from e.g. the sampler can bypass the store and read the stale value from memory. This is a serious issue when we are using MI stores to rewrite the batches for relocation, as it means that the batch is reading from random user/kernel memory. While it is particularly sensitive [and detectable] for relocations, reading stale data at any time is a worry. Having started with a small number of delaying stores and doubling until no more incoherency was seen over a few hours (with and without background memory pressure), 32 was the magic number. Note that it definitely doesn't fix the issue, merely adds a long delay between requests, sufficient to mostly hide the problem, enough to raise the mtbf to several hours. This is merely a stop gap. v2: Follow more closer with the gen5 w/a and include some post-invalidate flushes as well. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2018 References: a889580c087a ("drm/i915: Flush GPU relocs harder for gen3") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200612123949.7093-1-chris@chris-wilson.co.uk commit d4b02a4c613e82a4c47bf9dd228c38a2c3c1a6d2 Author: Chris Wilson Date: Sun Jun 7 23:20:45 2020 +0100 drm/i915/selftests: Trim execlists runtime Reduce the smoke depth by trimming the number of contexts, repetitions and wait times. This is in preparation for a less greedy scheduler that tries to be fair across contexts, resulting in a great many more context switches. A thousand context switches may be 50-100ms, causing us to timeout as the HW is not fast enough to complete the deep smoketests. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20200607222108.14401-5-chris@chris-wilson.co.uk commit 3d09677a07f017c42c80d04ba70ef23d7499fc46 Author: Chris Wilson Date: Fri Jun 12 23:11:13 2020 +0100 drm/i915/execlists: Lift opportunistic process_csb to before engine lock Since the process_csb() does not require us to hold the engine->active.lock, we can move the opportunistic flush before direction submission to outside of the lock. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200612221113.9129-1-chris@chris-wilson.co.uk commit 17896406ff3592d47b476ddd29276bf9cf8a26dd Author: Alain Michaud Date: Thu Jun 11 02:01:57 2020 +0000 Bluetooth: implement read/set default system parameters mgmt This patch implements the read default system parameters and the set default system parameters mgmt commands. Signed-off-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 10873f99ced274cbfc119f55e7e57a0f047a0799 Author: Alain Michaud Date: Thu Jun 11 02:01:56 2020 +0000 Bluetooth: centralize default value initialization. This patch centralized the initialization of default parameters. This is required to allow clients to more easily customize the default system parameters. Signed-off-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 7e90de4ac1099d3f4e26023853d4aefd0d2a1dea Author: Alain Michaud Date: Thu Jun 11 02:01:55 2020 +0000 Bluetooth: mgmt: read/set system parameter definitions This patch submits the corresponding kernel definitions to mgmt.h. This is submitted before the implementation to avoid any conflicts in values allocations. Signed-off-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Yu Liu Signed-off-by: Marcel Holtmann commit 201a11246d6018bb4ce648e62ed099950f4b174a Author: Balakrishna Godavarthi Date: Fri Jun 12 17:45:17 2020 +0530 Bluetooth: hci_qca: Request Tx clock vote off only when Tx is pending Tx pending flag is set to true when HOST IBS state is AWAKE or AWAKEING. If IBS state is ASLEEP, then Tx clock is already voted off. To optimize further directly calling serial_clock_vote() instead of qca_wq_serial_tx_clock_vote_off(), at this point of qca_suspend() already data is sent out. No need to wake up hci to send data. Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit 2d68476cfc2afa1a1a2d9007a23264ffc6308e77 Author: Balakrishna Godavarthi Date: Fri Jun 12 17:51:31 2020 +0530 Bluetooth: hci_qca: Increase SoC idle timeout to 200ms In some version of WCN399x, SoC idle timeout is configured as 80ms instead of 20ms or 40ms. To honor all the SoC's supported in the driver increasing SoC idle timeout to 200ms. Fixes: 41d5b25fed0a0 ("Bluetooth: hci_qca: add PM support") Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit 590deccf4c0690597ca69349fe46ee124944d8c5 Author: Balakrishna Godavarthi Date: Fri Jun 12 17:50:28 2020 +0530 Bluetooth: hci_qca: Disable SoC debug logging for WCN3991 By default, WCN3991 sent debug packets to HOST via ACL packet with header 0xDC2E. This logging is not required on commercial devices. With this patch SoC logging is disabled post fw download. Signed-off-by: Balakrishna Godavarthi Signed-off-by: Marcel Holtmann commit 32929e1f4ad9adf71f655028e4dd5d87adb97f52 Author: Alain Michaud Date: Thu Jun 11 14:26:10 2020 +0000 Bluetooth: Use only 8 bits for the HCI CMSG state flags This change implements suggestions from the code review of the SCO CMSG state flag patch. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 00398e1d518309328e8ba7dff00881538ac22c6a Author: Alain Michaud Date: Thu Jun 11 19:50:41 2020 +0000 Bluetooth: Add support for BT_PKT_STATUS CMSG data for SCO connections This change adds support for reporting the BT_PKT_STATUS to the socket CMSG data to allow the implementation of a packet loss correction on erroneous data received on the SCO socket. The patch was partially developed by Marcel Holtmann and validated by Hsin-yu Chao. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 51dc276dd2af20ae9468afbd864fa8b0e1c75827 Author: Chris Wilson Date: Thu Jun 11 19:04:21 2020 +0100 drm/i915: Leave vma intact as they are discarded If we find ourselves trying to reuse a misplaced but active vma, we currently try to discard it to avoid having to wait to unbind it (upsetting the current user fo the vma). An alternative to marking it as a dicarded vma and keeping it in both the obj->vma.list and obj->vma.tree, is to simply remove it from the lookup rbtree. While it remains in the list of vma, it will be unbound under eviction pressure and freed along with the object. We will never reuse it again for new instances. As before, with no pruning, the list may continually grow, but eventually we will have the most constrained version of the ggtt view that meets all requirements -- so the list of vma should not grow without bound. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2012 Fixes: 9bdcaa5e3a2f ("drm/i915: Discard a misplaced GGTT vma") Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200611180421.23262-1-chris@chris-wilson.co.uk commit 94641eb6c69682884abbecf22fe5b7c185af6a06 Author: Vandita Kulkarni Date: Fri Jun 12 13:52:37 2020 +0530 drm/i915/display: Fix the encoder type check For all ddi, encoder->type holds output type as ddi, assigning it to individual o/p types is no more valid. Fixes: 362bfb995b78 ("drm/i915/tgl: Add DKL PHY vswing table for HDMI") v2: Rebase, no functional change. Signed-off-by: Vandita Kulkarni Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20200612082237.11886-1-vandita.kulkarni@intel.com commit e660b3510eb4b3c06ce1188a1d305b6f653106fc Author: Abhishek Pandit-Subedi Date: Wed Jun 10 18:53:55 2020 -0700 Bluetooth: btmrvl_sdio: Refactor irq wakeup Use device_init_wakeup to allow the Bluetooth dev to wake the system from suspend. Currently, the device can wake the system but no power/wakeup entry is created in sysfs to allow userspace to disable wakeup. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Douglas Anderson Signed-off-by: Marcel Holtmann commit 76d4c130ea44404ce6d6b1008f4729a6547c22c9 Author: Abhishek Pandit-Subedi Date: Wed Jun 10 18:53:54 2020 -0700 Bluetooth: btmrvl_sdio: Implement prevent_wake Use the parent device's power/wakeup to control whether we support remote wake. If remote wakeup is disabled, Bluetooth will not enable scanning for incoming connections. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Douglas Anderson Signed-off-by: Marcel Holtmann commit 70a7808b50b119fa5c00e5704e20e27d79b8cf4c Author: Abhishek Pandit-Subedi Date: Wed Jun 10 18:53:53 2020 -0700 Bluetooth: btmrvl_sdio: Set parent dev to hdev Set the correct parent dev when registering hdev. This allows userspace tools to find the parent device (for example, to set the power/wakeup property). Before this change, the path was /sys/devices/virtual/bluetooth/hci0 and after this change, it looks more like: /sys/bus/mmc/devices/mmc1:0001/mmc1:0001:2/bluetooth/hci0 Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Douglas Anderson Signed-off-by: Marcel Holtmann commit 2bcefd0d263ab4a72f0d61921ae6b0dc81606551 Author: Chris Wilson Date: Thu Jun 11 09:01:40 2020 +0100 drm/i915/gt: Move gen4 GT workarounds from init_clock_gating to workarounds Rescue the GT workarounds from being buried inside init_clock_gating so that we remember to apply them after a GT reset, and that they are included in our verification that the workarounds are applied. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200611080140.30228-6-chris@chris-wilson.co.uk commit 806a45c0838d253e306a6384057e851b65d11099 Author: Chris Wilson Date: Thu Jun 11 09:01:39 2020 +0100 drm/i915/gt: Move ilk GT workarounds from init_clock_gating to workarounds Rescue the GT workarounds from being buried inside init_clock_gating so that we remember to apply them after a GT reset, and that they are included in our verification that the workarounds are applied. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200611080140.30228-5-chris@chris-wilson.co.uk commit c3b93a943f2c9ee4a106db100a2fc3b2f126bfc5 Author: Chris Wilson Date: Thu Jun 11 09:01:38 2020 +0100 drm/i915/gt: Move snb GT workarounds from init_clock_gating to workarounds Rescue the GT workarounds from being buried inside init_clock_gating so that we remember to apply them after a GT reset, and that they are included in our verification that the workarounds are applied. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200611080140.30228-4-chris@chris-wilson.co.uk commit 7331c356b6d2d8a01422cacab27478a1dba9fa2a Author: Chris Wilson Date: Thu Jun 11 09:01:37 2020 +0100 drm/i915/gt: Move vlv GT workarounds from init_clock_gating to workarounds Rescue the GT workarounds from being buried inside init_clock_gating so that we remember to apply them after a GT reset, and that they are included in our verification that the workarounds are applied. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200611080140.30228-3-chris@chris-wilson.co.uk commit 19f1f627b33385a2f0855cbc7d33d86d7f4a1e78 Author: Chris Wilson Date: Thu Jun 11 09:01:36 2020 +0100 drm/i915/gt: Move ivb GT workarounds from init_clock_gating to workarounds Rescue the GT workarounds from being buried inside init_clock_gating so that we remember to apply them after a GT reset, and that they are included in our verification that the workarounds are applied. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200611080140.30228-2-chris@chris-wilson.co.uk commit f93ec5fb563779bda4501890b1854526de58e0f1 Author: Chris Wilson Date: Thu Jun 11 10:30:15 2020 +0100 drm/i915/gt: Move hsw GT workarounds from init_clock_gating to workarounds Rescue the GT workarounds from being buried inside init_clock_gating so that we remember to apply them after a GT reset, and that they are included in our verification that the workarounds are applied. v2: Leave HSW_SCRATCH to set an explicit value, not or in our disable bit. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2011 Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20200611093015.11370-1-chris@chris-wilson.co.uk commit ad2ad80e646242bc9b0bb91f72a1dd211b7d8b4c Author: Chris Wilson Date: Sun Jun 7 23:20:44 2020 +0100 drm/i915/selftests: Remove live_suppress_wait_preempt With the removal of the internal wait-priority boosting, we can also remove the selftest to ensure that those waits were being suppressed from causing preemptions. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200607222108.14401-4-chris@chris-wilson.co.uk commit 72822c3bfa8ef7c997692acd580c73c263107592 Author: Imre Deak Date: Wed Jun 10 16:47:04 2020 +0300 drm/dp_mst: Fix flushing the delayed port/mstb destroy work Atm, a pending delayed destroy work during module removal will be canceled, leaving behind MST ports, mstbs. Fix this by using a dedicated workqueue which will be drained of requeued items as well when destroying it. v2: - Check if wq is NULL before calling destroy_workqueue(). Cc: Lyude Paul Cc: Stanislav Lisovskiy Reviewed-by: Stanislav Lisovskiy Reviewed-by: Lyude Paul Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20200610134704.25270-1-imre.deak@intel.com commit d8bd15b37d328a935a4fc695fed8b19157503950 Author: Imre Deak Date: Mon Jun 8 00:25:21 2020 +0300 drm/dp_mst: Fix the DDC I2C device registration of an MST port During the initial MST probing an MST port's I2C device will be registered using the kdev of the DRM device as a parent. Later after MST Connection Status Notifications this I2C device will be re-registered with the kdev of the port's connector. This will also move inconsistently the I2C device's sysfs entry from the DRM device's sysfs dir to the connector's dir. Fix the above by keeping the DRM kdev as the parent of the I2C device. Ideally the connector's kdev would be used as a parent, similarly to non-MST connectors, however that needs some more refactoring to ensure the connector's kdev is already available early enough. So keep the existing (initial) behavior for now. Cc: Signed-off-by: Imre Deak Reviewed-by: Stanislav Lisovskiy Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200607212522.16935-2-imre.deak@intel.com commit 7d11507605a75fcb2159b93d1fe8213b363a2c20 Author: Imre Deak Date: Mon Jun 8 00:25:20 2020 +0300 drm/dp_mst: Fix the DDC I2C device unregistration of an MST port The WARN below triggers during the removal of an MST port. The problem is that the parent device's (the connector's kdev) sysfs directory is removed recursively when the connector is unregistered (even though the I2C device holds a reference on the parent device). To fix this set first the Peer Device Type to none which will remove the I2C device. Note that atm, inconsistently, the parent of the I2C device is initially set to the DRM kdev and after a Connection Status Notification the parent may be reset to be the connector's kdev. This problem is addressed by the next patch. [ 4462.989299] ------------[ cut here ]------------ [ 4463.014940] sysfs group 'power' not found for kobject 'i2c-24' [ 4463.034664] WARNING: CPU: 0 PID: 970 at fs/sysfs/group.c:281 sysfs_remove_group+0x71/0x80 [ 4463.044357] Modules linked in: snd_hda_intel i915 drm_kms_helper(O) drm netconsole snd_hda_codec_hdmi mei_hdcp x86_pkg_temp_thermal coretemp crct10dif_pclmul snd_intel_dspcf g crc32_pclmul snd_hda_codec snd_hwdep ghash_clmulni_intel snd_hda_core asix usbnet kvm_intel mii i2c_algo_bit snd_pcm syscopyarea sysfillrect e1000e sysimgblt fb_sys_fops prim e_numbers ptp pps_core i2c_i801 r8169 mei_me realtek mei [last unloaded: drm] [ 4463.044399] CPU: 0 PID: 970 Comm: kworker/0:2 Tainted: G O 5.7.0+ #172 [ 4463.044402] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP [ 4463.044423] Workqueue: events drm_dp_delayed_destroy_work [drm_kms_helper] [ 4463.044428] RIP: 0010:sysfs_remove_group+0x71/0x80 [ 4463.044431] Code: 48 89 df 5b 5d 41 5c e9 cd b6 ff ff 48 89 df e8 95 b4 ff ff eb cb 49 8b 14 24 48 8b 75 00 48 c7 c7 20 0f 3f 82 e8 9f c5 d7 ff <0f> 0b 5b 5d 41 5c c3 0f 1f 84 00 00 00 00 00 48 85 f6 74 31 41 54 [ 4463.044433] RSP: 0018:ffffc900018bfbf0 EFLAGS: 00010282 [ 4463.044436] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001 [ 4463.044439] RDX: 0000000080000001 RSI: ffff88849e828f38 RDI: 00000000ffffffff [ 4463.052970] [drm:drm_atomic_get_plane_state [drm]] Added [PLANE:100:plane 2B] 00000000c2160caa state to 00000000d172564a [ 4463.070533] RBP: ffffffff820cea20 R08: ffff88847f4b8958 R09: 0000000000000000 [ 4463.070535] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88848a725018 [ 4463.070537] R13: 0000000000000000 R14: ffffffff827090e0 R15: 0000000000000002 [ 4463.070539] FS: 0000000000000000(0000) GS:ffff88849e800000(0000) knlGS:0000000000000000 [ 4463.070541] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4463.070543] CR2: 00007fdf8a756538 CR3: 0000000489684001 CR4: 0000000000760ef0 [ 4463.070545] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 4463.070547] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 4463.070549] PKRU: 55555554 [ 4463.070551] Call Trace: [ 4463.070560] device_del+0x84/0x400 [ 4463.070571] cdev_device_del+0x10/0x30 [ 4463.070578] put_i2c_dev+0x69/0x80 [ 4463.070584] i2cdev_detach_adapter+0x2e/0x60 [ 4463.070591] notifier_call_chain+0x34/0x90 [ 4463.070599] blocking_notifier_call_chain+0x3f/0x60 [ 4463.070606] device_del+0x7c/0x400 [ 4463.087817] ? lockdep_init_map_waits+0x57/0x210 [ 4463.087825] device_unregister+0x11/0x60 [ 4463.087829] i2c_del_adapter+0x249/0x310 [ 4463.087846] drm_dp_port_set_pdt+0x6b/0x2c0 [drm_kms_helper] [ 4463.087862] drm_dp_delayed_destroy_work+0x2af/0x350 [drm_kms_helper] [ 4463.087876] process_one_work+0x268/0x600 [ 4463.105438] ? __schedule+0x30c/0x920 [ 4463.105451] worker_thread+0x37/0x380 [ 4463.105457] ? process_one_work+0x600/0x600 [ 4463.105462] kthread+0x140/0x160 [ 4463.105466] ? kthread_park+0x80/0x80 [ 4463.105474] ret_from_fork+0x24/0x50 Cc: Signed-off-by: Imre Deak Reviewed-by: Stanislav Lisovskiy Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200607212522.16935-1-imre.deak@intel.com commit 471bdd0df0d5048d1e1bb0aa5da44f44f9856fb1 Author: Imre Deak Date: Thu Jun 4 21:45:00 2020 +0300 drm/i915/dp_mst: Work around out-of-spec adapters filtering short pulses Some TypeC -> native DP adapters, at least the Club 3D CAC-1557 adapter, incorrectly filter out HPD short pulses with a duration less than ~540 usec, leading to MST probe failures. According to the DP Standard 2.0 section 5.1.4: - DP sinks should generate short pulses in the 500 usec -> 1 msec range - DP sources should detect short pulses in the 250 usec -> 2 msec range According to the DP Alt Mode on TypeC Standard section 3.9.2, adapters should detect and forward short pulses according to how sources should detect them as specified in the DP Standard (250 usec -> 2 msec). Based on the above filtering out short pulses with a duration less than 540 usec is incorrect. To make such adapters work add support for a driver polling on MST inerrupt flags, and wire this up in the i915 driver. The sink can clear an interrupt it raised after 110 msec if the source doesn't respond, so use a 50 msec poll period to avoid missing an interrupt. Polling of the MST interrupt flags is explicitly allowed by the DP Standard. This fixes MST probe failures I saw using this adapter and a DELL U2515H monitor. v2: - Fix the wait event timeout for the no-poll case. v3 (Ville): - Fix the short pulse duration limits in the commit log prescribed by the DP Standard. - Add code comment explaining why/how polling is used. - Factor out a helper to schedule the port's hpd irq handler and move it to the rest of hotplug handlers. - Document the new MST callback. - s/update_hpd_irq_state/poll_hpd_irq/ Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200604184500.23730-2-imre.deak@intel.com commit 8b9f3437ff5b5d059f70f9ce44d169b0cc5650ee Author: Imre Deak Date: Thu Jun 4 00:10:39 2020 +0300 drm/dp_mst: Sanitize mgr->qlock locking in drm_dp_mst_wait_tx_reply() Make the locking look symmetric with the unlocking. Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20200603211040.8190-2-imre.deak@intel.com commit 8d712a7e01c8a94fb95c23722e383fe758ad586b Author: Imre Deak Date: Fri Jun 5 12:48:01 2020 +0300 drm/i915/dp_mst: Fix disabling MST on a port Currently MST on a port can get enabled/disabled from the hotplug work and get disabled from the short pulse work in a racy way. Fix this by relying on the MST state checking in the hotplug work and just schedule a hotplug work from the short pulse handler if some problem happened during the MST interrupt handling. This removes the explicit MST disabling in case of an AUX failure, but if AUX fails, then probably the detection will also fail during the scheduled hotplug work and it's not guaranteed that we'll see intermittent errors anyway. While at it also simplify the error checking of the MST interrupt handler. v2: - Convert intel_dp_check_mst_status() to return bool. (Ville) - Change the intel_dp->is_mst check to an assert, since after this patch the condition can't change after we checked it previously. - Document the return value from intel_dp_check_mst_status(). v3: - Remove the intel_dp->is_mst check from intel_dp_check_mst_status(). There is no point in checking the same condition twice, even though there is a chance that the hotplug work running concurrently changes it. Cc: José Roberto de Souza Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200605094801.17709-1-imre.deak@intel.com commit f99fb309568dd561ad9c42b94a762247ac80325f Author: Imre Deak Date: Tue Jun 9 21:41:40 2020 +0300 drm/i915: Fix the i915_dsc_fec_support debugfs file for DP MST connectors DSC is not supported on DP MST streams so just don't add this entry for MST connectors. This also fixes an OOPS, caused by the encoder->digport cast, which is not valid for MST encoders. v2: - Check encoder, which is unset for an MST connector, before it gets enabled. v3: - Just don't add this debugfs file for MST connectors. (Ville) Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200609184140.4937-1-imre.deak@intel.com commit c980216dd224c52b5c70172753c209b653d84958 Author: Imre Deak Date: Wed Jun 10 01:06:16 2020 +0300 drm/i915/icl: Disable DIP on MST ports with the transcoder clock still on According to BSpec the Data Island Packet should be disabled after disabling the transcoder, but before the transcoder clock select is set to none. On an ICL RVP, daisy-chained MST config not following this leads to a hang with the following MCE when disabling the output: [ 870.948739] mce: [Hardware Error]: CPU 0: Machine Check Exception: 5 Bank 6: ba00000011000402 [ 871.019212] mce: [Hardware Error]: RIP !INEXACT! 10: {poll_idle+0x92/0xb0} [ 871.019212] mce: [Hardware Error]: TSC 135a261fe61 [ 871.019212] mce: [Hardware Error]: PROCESSOR 0:706e5 TIME 1591739604 SOCKET 0 APIC 0 microcode 20 [ 871.019212] mce: [Hardware Error]: Run the above through 'mcelog --ascii' [ 871.019212] mce: [Hardware Error]: Machine check: Processor context corrupt [ 871.019212] Kernel panic - not syncing: Fatal machine check [ 871.019212] Kernel Offset: disabled Bspec: 4287 Fixes: fa37a213275c ("drm/i915: Stop sending DP SDPs on ddi disable") Cc: Gwan-gyeong Mun Cc: Uma Shankar Signed-off-by: Imre Deak Reviewed-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20200609220616.6015-1-imre.deak@intel.com commit fb7ba0c7cf92000b93b2286b4b55a75549e4a313 Author: Thomas Zimmermann Date: Fri Jun 5 15:58:03 2020 +0200 drm/mgag200: Use managed device initialization The mgag200 driver now uses managed functions for DRM devices. The individual helpers for modesetting and memory managed are already covered, so only device allocation and initialization is left for conversion. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-15-tzimmermann@suse.de commit 832eddf5d8f4d83983b7674faa009b2a5ead1848 Author: Thomas Zimmermann Date: Fri Jun 5 15:58:02 2020 +0200 drm/mgag200: Embed instance of struct drm_device in struct mga_device Following current best practice, the instance of struct drm_device is now embedded in struct mga_device. The respective field has been renamed from 'dev' to 'base' to reflect the relationship. Conversion from DRM device is done via upcast. Using dev_private is no longer possible. The patch also open-codes drm_dev_alloc() and DRM device initialization is now performed by a call to drm_device_init(). Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-14-tzimmermann@suse.de commit 3c8923c3f15e1c7f84b804f218500febf46868a3 Author: Thomas Zimmermann Date: Fri Jun 5 15:58:01 2020 +0200 drm/mgag200: Allocate device structures in mgag200_driver_load() Instances of struct drm_device and struct mga_device are now allocated next to each other in mgag200_driver_load(). Yet another preparation before embedding the DRM device instance in struct mga_device. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-13-tzimmermann@suse.de commit c714dd941dd158500299b2138fcd06709afd2605 Author: Thomas Zimmermann Date: Fri Jun 5 15:58:00 2020 +0200 drm/mgag200: Separate device initialization into allocation Embedding the DRM device instance in struct mga_device will require changes to device allocation. Moving the device initialization into its own functions gets it out of the way. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-12-tzimmermann@suse.de commit ba5b90e883a4db12f2b6f277fa2c06ac82c2ff03 Author: Thomas Zimmermann Date: Fri Jun 5 15:57:59 2020 +0200 drm/mgag200: Move device init and cleanup to mgag200_drv.c Moving the initializer and cleanup functions for device instances to mgag200_drv.c prepares for the conversion to managed code. No functional changes are made. Remove mgag200_main.c, which is now empty. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-11-tzimmermann@suse.de commit fdcb6b1906dc30c621d7157b6dd84bb95782ea99 Author: Thomas Zimmermann Date: Fri Jun 5 15:57:58 2020 +0200 drm/mgag200: Prefix symbol names in mgag200_drv.c with mgag200_ The naming of symbols in mgag200_drv.c is inconsistent. Fix that by prefixing all names with mgag200_. v2: * clarify commit message Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-10-tzimmermann@suse.de commit 0987062118b845092729fc0a4c26f4a7284b8959 Author: Thomas Zimmermann Date: Fri Jun 5 15:57:57 2020 +0200 drm/mgag200: Separate DRM and PCI functionality from each other Moving the DRM driver structures from the middle of the PCI code to the top of the file makes it more readable. Also remove an obsolete comment. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-9-tzimmermann@suse.de commit a71ff21e11d906f0ba85544a8267760459428603 Author: Thomas Zimmermann Date: Fri Jun 5 15:57:56 2020 +0200 drm/mgag200: Switch to managed MM The memory-management code now cleans up automatically as part of device destruction. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-8-tzimmermann@suse.de commit e9f896b76ce6bc85ac352371a9aef5c1a240b1c4 Author: Thomas Zimmermann Date: Fri Jun 5 15:57:55 2020 +0200 drm/mgag200: Merge VRAM setup into MM initialization The VRAM setup in mgag200_drv.c is part of memory management and should be done in the same place. Merge the code into the memory management's init function. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-7-tzimmermann@suse.de commit 0956c329a4ff517672fa484e1b2ad1b36826f3a3 Author: Thomas Zimmermann Date: Fri Jun 5 15:57:54 2020 +0200 drm/mgag200: Lookup VRAM PCI BAR start and length only once The MM setup code on mgag200 reads PCI BAR 0's start and length several times. Reusing these values makes the code more readable. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-6-tzimmermann@suse.de commit e7b9db6a1496476fd96c624a983f4b17c452b273 Author: Thomas Zimmermann Date: Fri Jun 5 15:57:53 2020 +0200 drm/mgag200: Rename mgag200_ttm.c to mgag200_mm.c The mgag200 driver does not use TTM any longer. Rename the related file to mgag200_mm.c (as in 'memory management'). Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-5-tzimmermann@suse.de commit 044e0935559bf2f6ee1cef757d779fdebc87c37b Author: Thomas Zimmermann Date: Fri Jun 5 15:57:52 2020 +0200 drm/mgag200: Use pcim_enable_device() Using the managed function simplifies the error handling. After unloading the driver, the PCI device should now get disabled as well. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-4-tzimmermann@suse.de commit 91c4dc5787739d64f257028973dcd9b41f8e55fb Author: Thomas Zimmermann Date: Fri Jun 5 15:57:51 2020 +0200 drm/mgag200: Remove mgag200_cursor.c Support for HW cursors got remove by commit 5a77e2bfdd4f ("drm/mgag200: Remove HW cursor") Apparently the source file was not deleted. Removed it now. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Fixes: 5a77e2bfdd4f ("drm/mgag200: Remove HW cursor") Cc: Sam Ravnborg Cc: Emil Velikov Cc: Dave Airlie Cc: "Noralf Trønnes" Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: Thomas Gleixner Cc: Kate Stewart Cc: Allison Randal Cc: Andrzej Pietrasiewicz Cc: "José Roberto de Souza" Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-3-tzimmermann@suse.de commit 1d8d42ba365101fa68d210c0e2ed2bc9582fda6c Author: Thomas Zimmermann Date: Fri Jun 5 15:57:50 2020 +0200 drm/mgag200: Remove declaration of mgag200_mmap() from header file Commit 94668ac796a5 ("drm/mgag200: Convert mgag200 driver to VRAM MM") removed the implementation of mgag200_mmap(). Also remove the declaration. Signed-off-by: Thomas Zimmermann Acked-by: Sam Ravnborg Fixes: 94668ac796a5 ("drm/mgag200: Convert mgag200 driver to VRAM MM") Cc: Gerd Hoffmann Cc: Dave Airlie Cc: Krzysztof Kozlowski Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Greg Kroah-Hartman Cc: Thomas Gleixner Cc: "Noralf Trønnes" Cc: Armijn Hemel Cc: Alex Deucher Cc: Emil Velikov Cc: # v5.3+ Link: https://patchwork.freedesktop.org/patch/msgid/20200605135803.19811-2-tzimmermann@suse.de commit f28b7b78aad32bcbec49e77baf140be14c7dd99b Author: Rajkumar Manoharan Date: Tue Jun 9 09:31:05 2020 +0300 ath11k: build HE 6 GHz capability Build 6 GHz band capability from HT and VHT capabilities reported by firmware. Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1591057888-2862-1-git-send-email-rmanohar@codeaurora.org commit 74601ecfef6e46cd8bc98e881e620bfc81bfddfb Author: Pradeep Kumar Chitrapu Date: Tue Jun 9 09:31:04 2020 +0300 ath11k: Add support for 6g scan hint Add support for 6Ghz short ssid and bssid hint mechanism as part of scan command. Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603001724.12161-9-pradeepc@codeaurora.org commit bff621fd113ff782b91795a9b2baac0b226bc069 Author: Pradeep Kumar Chitrapu Date: Tue Jun 9 09:31:04 2020 +0300 ath11k: Send multiple scan_chan_list messages if required With addition of 6Ghz channels, it is possible that wmi buffer size can exceed the maximum wmi buffer size. So iterate over the channel list, and send multiple messages till channel list is empty. Also mark PSC channel flag for 6GHz channels accordingly. Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603001724.12161-8-pradeepc@codeaurora.org commit 194b8ea1ce5a9c15a73e441380ed678fa009d3ed Author: Pradeep Kumar Chitrapu Date: Tue Jun 9 09:31:04 2020 +0300 ath11k: Add 6G scan dwell time parameter in scan request command Add 6G scan active and passive dwell time parameter to scan request. Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603001724.12161-7-pradeepc@codeaurora.org commit d387503df0cd7f7d5a3b1366f6a40664465e090c Author: Pradeep Kumar Chitrapu Date: Tue Jun 9 09:31:03 2020 +0300 ath11k: set psc channel flag when sending channel list to firmware. If 6 ghz channel is a Preferred Scanning Channel(PSC), mark the channel flag accordingly when updating channel list to firmware. This will be used when making scanning decision in 6GHz channels. Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603001724.12161-6-pradeepc@codeaurora.org commit 91270d709b210a1c08d67faa3be3ae3e459a0889 Author: Pradeep Kumar Chitrapu Date: Tue Jun 9 09:31:03 2020 +0300 ath11k: extend peer_assoc_cmd for 6GHz band This adds support required for configuring min_data_rate of 6GHz oper IE and peer_he_caps_6ghz in peer assoc command. The Minimum Rate field indicates the minimum rate, in units of 1 Mb/s, that the non-AP STA is allowed to use for sending PPDUs as defined in IEEE P802.11ax™/D6.0. Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603001724.12161-5-pradeepc@codeaurora.org commit 5dcf42f8b79d1419ad7f6d46d7b5f7dc5bf9cdba Author: Pradeep Kumar Chitrapu Date: Tue Jun 9 09:31:03 2020 +0300 ath11k: Use freq instead of channel number in rx path As 6GHz cahnnel numbers overlap with those of 5GHz and 2GHz bands, it is necessary to use frequency when determining the band info in rx path. Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603001724.12161-4-pradeepc@codeaurora.org commit 22eeadcdeab63e88983401f699f61a0121c03a0d Author: Pradeep Kumar Chitrapu Date: Tue Jun 9 09:31:02 2020 +0300 ath11k: add support for 6GHz radio in driver This patch adds 6GHz band support and mac80211 registration for the 6G phy radio. Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603001724.12161-3-pradeepc@codeaurora.org commit c5625abaf8266307d2237a75143b27be7afafcdf Author: Pradeep Kumar Chitrapu Date: Tue Jun 9 09:31:02 2020 +0300 ath11k: add 6G frequency list supported by driver This patch adds support for 6GHz frequency listing. Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200603001724.12161-2-pradeepc@codeaurora.org commit 3e48e836cf063b815d4ec39dde6e1f78cf401879 Author: Chris Wilson Date: Wed Jun 10 16:40:46 2020 +0100 drm/i915/gt: Include context status in debug dumps This may be useful to identify contexts that are running even though they are supposed to be closed or banned. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200610154046.22449-1-chris@chris-wilson.co.uk commit fedbfcc6f7977d9033ba8dec1c8044f3c1faf3d1 Author: Kieran Bingham Date: Tue Jun 9 13:46:01 2020 +0100 drivers: gpu: drm: Fix trivial spelling The word 'descriptor' is misspelled throughout the tree. Fix it up accordingly: decriptors -> descriptors Signed-off-by: Kieran Bingham Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200609124610.3445662-9-kieran.bingham+renesas@ideasonboard.com commit 174b976d56a8b57983bad43b798a56e7883c276f Author: Chris Wilson Date: Sun Jun 7 23:20:43 2020 +0100 drm/i915/selftests: Teach hang-self to target only itself We have a test case to exercise resetting an engine while the other engines are busy, all the TEST_SELF adds on top is that the target engine also has background activity. In this case it is useful to first test resetting the engine while there is background activity, as a separate flag from exercising all others. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200607222108.14401-3-chris@chris-wilson.co.uk commit e36ba817fa966f81fb1c8d16f3721b5a644b2fa9 Author: Chris Wilson Date: Tue Jun 9 16:17:23 2020 +0100 drm/i915/gt: Incrementally check for rewinding In commit 5ba32c7be81e ("drm/i915/execlists: Always force a context reload when rewinding RING_TAIL"), we placed the check for rewinding a context on actually submitting the next request in that context. This was so that we only had to check once, and could do so with precision avoiding as many forced restores as possible. For example, to ensure that we can resubmit the same request a couple of times, we include a small wa_tail such that on the next submission, the ring->tail will appear to move forwards when resubmitting the same request. This is very common as it will happen for every lite-restore to fill the second port after a context switch. However, intel_ring_direction() is limited in precision to movements of upto half the ring size. The consequence being that if we tried to unwind many requests, we could exceed half the ring and flip the sense of the direction, so missing a force restore. As no request can be greater than half the ring (i.e. 2048 bytes in the smallest case), we can check for rollback incrementally. As we check against the tail that would be submitted, we do not lose any sensitivity and allow lite restores for the simple case. We still need to double check upon submitting the context, to allow for multiple preemptions and resubmissions. Fixes: 5ba32c7be81e ("drm/i915/execlists: Always force a context reload when rewinding RING_TAIL") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: # v5.4+ Reviewed-by: Bruce Chang Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200609151723.12971-1-chris@chris-wilson.co.uk commit e00c6d8d491b3b8b93eeac1aae51c78a5217cde6 Author: Flavio Suligoi Date: Fri Jun 5 17:41:09 2020 +0200 net: wireless: intel: fix wiki website url In some Intel files, the wiki url is still the old "wireless.kernel.org" instead of the new "wireless.wiki.kernel.org" Signed-off-by: Flavio Suligoi Link: https://lore.kernel.org/r/20200605154112.16277-7-f.suligoi@asem.it Signed-off-by: Luca Coelho commit 45c21a0e5ba461b5fe537ac20d6506f63995ce2d Author: Gustavo A. R. Silva Date: Thu May 7 13:55:38 2020 -0500 iwlwifi: Replace zero-length array with flexible-array The current codebase makes use of the zero-length array language extension to the C90 standard, but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. Also, notice that, dynamic memory allocations won't be affected by this change: "Flexible array members have incomplete type, and so the sizeof operator may not be applied. As a quirk of the original implementation of zero-length arrays, sizeof evaluates to zero."[1] sizeof(flexible-array-member) triggers a warning because flexible array members have incomplete type[1]. There are some instances of code in which the sizeof operator is being incorrectly/erroneously applied to zero-length arrays and the result is zero. Such instances may be hiding some bugs. So, this work (flexible-array member conversions) will also help to get completely rid of those sorts of issues. This issue was found with the help of Coccinelle. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20200507185538.GA14674@embeddedor Signed-off-by: Luca Coelho commit 4f72a8ee819d57d7329d88f487a2fc9b45153177 Author: Khaled Almahallawy Date: Mon Jun 8 13:45:37 2020 -0700 drm/i915/tc: fix the reset of ln0 Setting ln0 similar to ln1 Fixes: 3b51be4e4061b ("drm/i915/tc: Update DP_MODE programming") Cc: # v5.5+ Signed-off-by: Khaled Almahallawy Reviewed-by: José Roberto de Souza Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20200608204537.28468-1-khaled.almahallawy@intel.com commit ebd11f706c9d9756edad5b5f3f3310d77d77f60c Author: Maxime Ripard Date: Wed May 27 17:47:58 2020 +0200 drm/vc4: crtc: Restrict HACT_ACT setup to DSI The HACT_ACT field only needs to be written to when using a DSI display. Let's move that setup to our DSI branch to clear a bit the common path. Reviewed-by: Eric Anholt Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/7a93436f97666a2aa025686ef3ff3606de4bec67.1590594512.git-series.maxime@cerno.tech commit e58a5e6f4118e1afe7f346701553940c433000ee Author: Maxime Ripard Date: Wed May 27 17:47:57 2020 +0200 drm/vc4: crtc: Turn static const variable into a define The hvs_latency_pix variable doesn't need to be a variable and can just be defined. Reviewed-by: Eric Anholt Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/8535c679f79af8abaa1b7796261bfeda11f874fd.1590594512.git-series.maxime@cerno.tech commit ae44a52779f1ac08f389a77c0f9a3fc7383330c9 Author: Maxime Ripard Date: Wed May 27 17:47:54 2020 +0200 drm/vc4: crtc: Move crtc state to common header We'll need to access the crtc_state from outside of vc4_crtc.c, so let's move it to vc4_drv.h Reviewed-by: Eric Anholt Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1e6e563f9c75961e2885c9d648a3130d3b46b6d1.1590594512.git-series.maxime@cerno.tech commit 7678142f1d3c9fdc180ad5555878238acc1bc35c Author: Maxime Ripard Date: Wed May 27 17:47:53 2020 +0200 drm/vc4: crtc: Switch to of_device_get_match_data of_device_get_match_data allow to simplify a bit the retrieval of the data associated to the pixelvalve compatible. Let's use it. Reviewed-by: Eric Anholt Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1ff06413a1350d28bc3e88b034ed7ad23834e5bd.1590594512.git-series.maxime@cerno.tech commit debf585ce543331b9567c1084fb056f66934be87 Author: Maxime Ripard Date: Wed May 27 17:47:52 2020 +0200 drm/vc4: crtc: Rename SoC data structures Since we're going to introduce pixelvalve data structures for other SoCs than the BCM2835, let's rename the structures defined in the code to make it obvious which SoC we're targeting. Reviewed-by: Eric Anholt Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/39aed7dd512ce2a4560902974ec26b16b88ec68b.1590594512.git-series.maxime@cerno.tech commit 0c2a50f1a0cd8fcc5c13b11a646b7ced95c6868e Author: Maxime Ripard Date: Thu Feb 6 14:41:41 2020 +0100 drm/vc4: plane: Move additional planes creation to driver So far the plane creation was done when each CRTC was bound, and those planes were only tied to the CRTC that was registering them. This causes two main issues: - The planes in the vc4 hardware are actually not tied to any CRTC, but can be used with every combination - More importantly, so far, we allocate 10 planes per CRTC, with 3 CRTCs. However, the next generation of hardware will have 5 CRTCs, putting us well above the maximum of 32 planes currently allowed by DRM. This patch is the first one in a series of patches that will take down both of these issues so that we can support the next generation of hardware while keeping a good amount of planes. We start by changing the way the planes are registered to first registering the primary planes for each CRTC in the CRTC bind function as we used to, but moving the overlay and cursor creation to the main driver bind function, after all the CRTCs have been bound, and make the planes associated to all CRTCs. This will slightly change the ID order of the planes, since the primary planes of all CRTCs will be first, and then a pattern of 8 overlays, 1 cursor plane for each CRTC. This shouldn't cause any trouble since the ordering between the planes is preserved though. Reviewed-by: Eric Anholt Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/0b85a3fdb20bb4ff85fb62cabd082d5a65e2730b.1590594512.git-series.maxime@cerno.tech commit e10cde4ad0edca3ceffd87ac30a53d8977d06ba5 Author: Maxime Ripard Date: Wed May 27 17:47:47 2020 +0200 drm/vc4: plane: Move planes creation to its own function The planes so far were created as part of the CRTC binding code with each planes created associated only to one CRTC. However, the hardware in the vc4 doesn't really have such constraint and can be used with any CRTC. In order to rework this, let's first move the overlay and cursor planes creation to a function of its own. Reviewed-by: Eric Anholt Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/a378ea56214179f1f25fcd36ecc69511edd1e790.1590594512.git-series.maxime@cerno.tech commit 6a88752c092073da7357e9df67b838d4883a90d4 Author: Maxime Ripard Date: Wed May 27 17:47:41 2020 +0200 drm/vc4: drv: Add include guards vc4_drv.h doesn't have any include guards which prevents it from being included twice. Let's add them. Reviewed-by: Eric Anholt Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/68e89e315c4c35b313efc277c9642eca684e0ade.1590594512.git-series.maxime@cerno.tech commit 408e7e8a3c6d8a79cf6fba9562837eab5830ad62 Author: Maxime Ripard Date: Wed May 27 17:47:39 2020 +0200 dt-bindings: display: vc4: hdmi: Add missing clock-names property While the device tree and the driver expected a clock-names property, it wasn't explicitly documented in the previous binding. The documented order was wrong too, so make sure clock-names is there and in the proper order. Cc: devicetree@vger.kernel.org Reviewed-by: Eric Anholt Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/10ef2821e10886b66af5f8ba3e212aa87e9fd360.1590594512.git-series.maxime@cerno.tech commit fd26eea70e019b5e65b6de196fefba74a5bd5641 Author: Maxime Ripard Date: Wed May 27 17:47:38 2020 +0200 dt-bindings: display: vc4: dsi: Add missing clock properties While the device tree and the driver expected a clock-names and a clock-cells properties, it wasn't explicitly documented in the previous binding. Make sure it is now. Cc: devicetree@vger.kernel.org Reviewed-by: Eric Anholt Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/867813ae6b3e9cff0e9627e6ed09569dee5573bc.1590594512.git-series.maxime@cerno.tech commit 143ea9a3bc6c4d50dbab4f6aae94173542f56b41 Author: Maxime Ripard Date: Wed May 27 17:47:37 2020 +0200 dt-bindings: display: vc4: dpi: Add missing clock-names property While the device tree and the driver expected a clock-names property, it wasn't explicitly documented in the previous binding. Make sure it is now. Cc: devicetree@vger.kernel.org Reviewed-by: Eric Anholt Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/8c7a4a9d85f7d1b23346367acf8d321ddad7cffe.1590594512.git-series.maxime@cerno.tech commit 094536003e06b315105d72ef321f3f87f6780c6b Author: Maxime Ripard Date: Wed May 27 17:47:36 2020 +0200 dt-bindings: display: Convert VC4 bindings to schemas The BCM283x SoCs have a display pipeline composed of several controllers with device tree bindings that are supported by Linux. Now that we have the DT validation in place, let's split into separate files and convert the device tree bindings for those controllers to schemas. This is just a 1:1 conversion though, and some bindings were incomplete so it results in example validation warnings that are going to be addressed in the following patches. Acked-by: Eric Anholt Reviewed: Rob Herring Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/2dc6384c945c7d35ab4f75464d3a77046dc125b3.1590594512.git-series.maxime@cerno.tech commit f12694634153e6698b9ba01ede27e6cdc41e295b Author: YueHaibing Date: Wed May 6 21:42:17 2020 +0800 iwlwifi: mvm: Remove unused inline function iwl_mvm_tid_to_ac_queue commit cfbc6c4c5b91 ("iwlwifi: mvm: support mac80211 TXQs model") left behind this, remove it. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20200506134217.49760-1-yuehaibing@huawei.com Signed-off-by: Luca Coelho commit 99f55c798fcd838915c84fba868d9f7b996a5fbc Author: Thomas Zimmermann Date: Tue Jun 9 11:08:20 2020 +0200 drm/udl: Use GEM vmap/mmap function from SHMEM helpers The udl driver contains an implementation of GEM vmap and mmap operations that is identical to the common SHMEM helper; except that udl's code uses cached pages by default. Convert udl to regular SHMEM helper functions. There's no reason to have udl behave differently from all other SHMEM drivers. The udl driver uses the SHMEM helper to enable caching. v3: * rebased onto Daniel's shmem untangle series v2: * implement .gem_create_object with SHMEM helper Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200609090820.20256-3-tzimmermann@suse.de commit d18ee06b4889bf7da412069ef60baeaaca3ac6f4 Author: Thomas Zimmermann Date: Tue Jun 9 11:08:19 2020 +0200 drm/shmem-helper: Add .gem_create_object helper that sets map_cached flag The helper drm_gem_shmem_create_object_cached() allocates an GEM SHMEM object and sets the map_cached flag. Useful for drivers that want cached mappings. v3: * style fixes Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200609090820.20256-2-tzimmermann@suse.de commit c453b10c2b28580849e382565c2e8a18ecc8bc24 Author: Chethan T N Date: Mon Jun 8 17:57:47 2020 +0530 Bluetooth: btusb: Configure Intel debug feature based on available support This patch shall enable the Intel telemetry exception format based on the supported features Signed-off-by: Chethan T N Signed-off-by: Ps AyappadasX Signed-off-by: Kiran K Signed-off-by: Marcel Holtmann commit ad0f449bebc79b01583c711684fefcdc9620320a Author: Thomas Zimmermann Date: Fri Jun 5 09:32:47 2020 +0200 drm: Remove struct drm_driver.gem_print_info The .gem_print_info callback in struct drm_driver is obsolete and has no users left. Remove it. Signed-off-by: Thomas Zimmermann Suggested-by: Emil Velikov Reviewed-by: Emil Velikov Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-44-tzimmermann@suse.de commit 4a0042e08977f73ffb4272c0ec1d5baecab365e4 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:46 2020 +0200 drm/zte: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-43-tzimmermann@suse.de commit 10f02b264527ca9c370e5fa07275c328360e4b47 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:45 2020 +0200 drm/zte: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-42-tzimmermann@suse.de commit 73daf8a8845a1eca47c72d720bbe9ee915a8bdfd Author: Thomas Zimmermann Date: Fri Jun 5 09:32:44 2020 +0200 drm/tve200: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Linus Walleij Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-41-tzimmermann@suse.de commit d5cfaab4539bda36607e7868806f0b3a92bcb0c9 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:43 2020 +0200 drm/tve200: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Linus Walleij Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-40-tzimmermann@suse.de commit f8e538c2cc2f14d6855b1dcb4ffbc0003aae0476 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:42 2020 +0200 drm/tilcdc: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-39-tzimmermann@suse.de commit d3a560416bf7b96d17e8d33fcd51334471252600 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:41 2020 +0200 drm/tilcdc: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-38-tzimmermann@suse.de commit 9ddf22ad804e429ccaec23100c206148582bdf9d Author: Thomas Zimmermann Date: Fri Jun 5 09:32:40 2020 +0200 drm/sti: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-37-tzimmermann@suse.de commit 3baab5c8101d822e82b846c9092a5b478a40f01c Author: Thomas Zimmermann Date: Fri Jun 5 09:32:39 2020 +0200 drm/sti: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-36-tzimmermann@suse.de commit 6f9746a5c0d95534b20a0a7cac4484965aa34430 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:38 2020 +0200 drm/stm: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE sets the functions in struct drm_driver to their defaults. No functional changes are made. v2: * update for DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE Signed-off-by: Thomas Zimmermann Reviewed-by: Philippe Cornu Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-35-tzimmermann@suse.de commit c614fa22fd1ebb3cce57cf5b5c072e0173a25a26 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:37 2020 +0200 drm/stm: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Philippe Cornu Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-34-tzimmermann@suse.de commit ee3e71e48da5c017cb26f69ba6c69e39213ca327 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:36 2020 +0200 drm/shmobile: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-33-tzimmermann@suse.de commit f267d02c688bde270b74dab73717c9dfbe66fc65 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:35 2020 +0200 drm/shmobile: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-32-tzimmermann@suse.de commit cc479c772ffeb64780b5ba5b54eaf7873d63fae1 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:34 2020 +0200 drm/rcar-du: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE sets the functions in struct drm_driver to their defaults. No functional changes are made. v2: * update for DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE Signed-off-by: Thomas Zimmermann Tested-by: Kieran Bingham Reviewed-by: Laurent Pinchart Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-31-tzimmermann@suse.de commit a2649337d3de1b095221c0354ed073d7206acb43 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:33 2020 +0200 drm/rcar-du: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-30-tzimmermann@suse.de commit 9fbf654250462ff5a4631f2b40100e674be5ca6c Author: Thomas Zimmermann Date: Fri Jun 5 09:32:32 2020 +0200 drm/mxsfb: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-29-tzimmermann@suse.de commit b15c538303318c252e1a1ab86edddbf474b40ca1 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:31 2020 +0200 drm/mxsfb: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-28-tzimmermann@suse.de commit b54d830ccb65a6c19e5605490ee65ff4b911a017 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:30 2020 +0200 drm/meson: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE sets the functions in struct drm_driver to their defaults. No functional changes are made. v2: * update for DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-27-tzimmermann@suse.de commit 48ab4b8f236c4f4f7219c6e16f2c90290c6c5182 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:29 2020 +0200 drm/meson: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-26-tzimmermann@suse.de commit 47d22f25e83dc0a75149d1dd7bf25aba21413d4e Author: Thomas Zimmermann Date: Fri Jun 5 09:32:28 2020 +0200 drm/mcde: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-25-tzimmermann@suse.de commit e172749b7a4ba51ba4b5c1c059e565ab5569cf1b Author: Thomas Zimmermann Date: Fri Jun 5 09:32:27 2020 +0200 drm/mcde: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Reviewed-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-24-tzimmermann@suse.de commit 7c70a1e5005b7227b182e1ae917bb14ff6b12f31 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:26 2020 +0200 drm/malidp: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE sets the functions in struct drm_driver to their defaults. No functional changes are made. v2: * update for DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-23-tzimmermann@suse.de commit ecdd6474644f9b37d0deb44444691a9357d9444b Author: Thomas Zimmermann Date: Fri Jun 5 09:32:25 2020 +0200 drm/malidp: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-22-tzimmermann@suse.de commit fb1f7881a5f7cf500f8365d33bac1e4563b69464 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:24 2020 +0200 drm/komeda: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE sets the functions in struct drm_driver to their defaults. No functional changes are made. v2: * update for DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-21-tzimmermann@suse.de commit 1ea528b0963040273471dc904bf8b0a243741d9f Author: Thomas Zimmermann Date: Fri Jun 5 09:32:23 2020 +0200 drm/komeda: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-20-tzimmermann@suse.de commit c6131162549664de286ca21991b73b968b913de6 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:22 2020 +0200 drm/ingenic: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Tested-by: Paul Cercueil Reviewed-by: Paul Cercueil Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-19-tzimmermann@suse.de commit 5c68507c160784978f8a94c16fbe0c7d17cf8d64 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:21 2020 +0200 drm/ingenic: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Paul Cercueil Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-18-tzimmermann@suse.de commit eeef5a6c0b6fe9e49abfbd50af8dcec9c92b7211 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:20 2020 +0200 drm/imx: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-17-tzimmermann@suse.de commit 6c55a7a5a73efe8ef4e54985bb6176c89f1dfd3e Author: Thomas Zimmermann Date: Fri Jun 5 09:32:19 2020 +0200 drm/imx: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-16-tzimmermann@suse.de commit 491e00fbbc03e354946c48dbf42099fc617cf16f Author: Thomas Zimmermann Date: Fri Jun 5 09:32:18 2020 +0200 drm/hisilicon/kirin: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. v2: * use DRM_GEM_CMA_DRIVER_OPS Signed-off-by: Thomas Zimmermann Tested-by: John Stultz Reviewed-by: Emil Velikov Cc: Xu YiPing Cc: Rongrong Zou Cc: Xinliang Liu Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-15-tzimmermann@suse.de commit 986e670d3123d0470cd73247029661f7a6559099 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:17 2020 +0200 drm/hisilicon/kirin: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Cc: Xu YiPing Cc: Rongrong Zou Cc: Xinliang Liu Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-14-tzimmermann@suse.de commit 69a833767599931d41f6bbc9c91cdfef7fdb0379 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:16 2020 +0200 drm/hisilicon/kirin: Set .dumb_create to drm_gem_cma_dumb_create() The kirin drivers uses drm_gem_cma_dumb_create_internal() for its .dumb_create implementation. The function is meant for internal use only by drivers that require additional buffer setup. Kirin does not do an additional setup, so convert it over to drm_gem_cma_dumb_create(). Signed-off-by: Thomas Zimmermann Tested-by: John Stultz Reviewed-by: Emil Velikov Cc: Xu YiPing Cc: Rongrong Zou Cc: Xinliang Liu Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-13-tzimmermann@suse.de commit 6a32e55d18b34a787f7beaacc912b30b58022646 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:15 2020 +0200 drm/fsl-dcu: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-12-tzimmermann@suse.de commit 929027087f527ef1d9e906e4ebeca7eb3a36042e Author: Thomas Zimmermann Date: Fri Jun 5 09:32:14 2020 +0200 drm/fsl-dcu: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-11-tzimmermann@suse.de commit cd3ac8c9e8cfb0d3d27fd4fd428dfd7b6af6119e Author: Thomas Zimmermann Date: Fri Jun 5 09:32:13 2020 +0200 drm/atmel-hlcdc: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-10-tzimmermann@suse.de commit dc502e21a2c57e78fe0385130981dd19c98290fc Author: Thomas Zimmermann Date: Fri Jun 5 09:32:12 2020 +0200 drm/atmel-hlcdc: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-9-tzimmermann@suse.de commit d9ec1d2c4acfbe8ecac8355a723e09f518b5c70f Author: Thomas Zimmermann Date: Fri Jun 5 09:32:11 2020 +0200 drm/arm: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-8-tzimmermann@suse.de commit 7ca3aa3ef378e9721d6ced9d11019e57b7c6e001 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:10 2020 +0200 drm/arm: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Acked-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-7-tzimmermann@suse.de commit c12fea1cbb69d8bb40ceaac9663077b364f743c4 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:09 2020 +0200 drm/arc: Set GEM CMA functions with DRM_GEM_CMA_DRIVER_OPS DRM_GEM_CMA_DRIVER_OPS sets the functions in struct drm_driver to their defaults. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-6-tzimmermann@suse.de commit 3fb9e537972022cea3f4f3e7e077b3f3127acca2 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:08 2020 +0200 drm/arc: Use GEM CMA object functions Create GEM objects with drm_gem_cma_create_object_default_funcs(), which allocates the object and sets CMA's default object functions. Corresponding callbacks in struct drm_driver are cleared. No functional changes are made. Driver and object-function instances use the same callback functions, with the exception of vunmap. The implementation of vunmap is empty and left out in CMA's default object functions. v3: * convert to DRIVER_OPS macro in a separate patch Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-5-tzimmermann@suse.de commit 654bf12bad116f434c17b7669895ffaab96e16c2 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:07 2020 +0200 drm/cma-helper: Add DRM_GEM_CMA_DRIVER_OPS to set default GEM CMA functions The macro to DRM_GEM_CMA_DRIVER_OPS sets GEM callbacks in struct drm_driver to their defaults for CMA. A variant of the macro is provided for drivers that override the default .dumb_create callback. Adapt drivers to the changes. v4: * remove parenthesis around dumb_create_func * fix grammar in commit message Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-4-tzimmermann@suse.de commit 06d6620164b2989468cd4ea809645e6483623314 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:06 2020 +0200 drm/cma-helper: Rework DRM_GEM_CMA_VMAP_DRIVER_OPS macro Rename the macro to DRM_GEM_CMA_DRIVER_OPS_VMAP to align naming with SHMEM helpers and drm_gem_cma_prime_import_sg_table_vmap(). An variant of the macro is provided for drivers that override the default .dumb_create callback. Adapt drivers to the changes. v3: * rename macro to signal implicit vmap on imported buffers v2: * provide DRM_GEM_CMA_DRIVER_OPS_WITH_DUMB_CREATE Signed-off-by: Thomas Zimmermann Reviewed-by: Sam Ravnborg Reviewed-by: Laurent Pinchart Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-3-tzimmermann@suse.de commit 26eb603b59a2f8babfd36307d302f3e8f387dc98 Author: Thomas Zimmermann Date: Fri Jun 5 09:32:05 2020 +0200 drm/cma-helper: Rename symbols from drm_cma_gem_ to drm_gem_cma_ This fixes the naming of several symbols within CMA helpers. No functional changes are made. Signed-off-by: Thomas Zimmermann Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200605073247.4057-2-tzimmermann@suse.de commit d74abe2138b39ae34c274f5ba5dec47408036c0b Author: Chethan T N Date: Mon Jun 8 17:57:46 2020 +0530 Bluetooth: btusb: Add support to read Intel debug feature The command shall read the Intel controller supported debug feature. Based on the supported features additional debug configuration shall be enabled. Signed-off-by: Chethan T N Signed-off-by: Ps AyappadasX Signed-off-by: Kiran K Signed-off-by: Marcel Holtmann commit f98aa80ff78c34fe328eb9cd3e2cc3058e42bcfd Author: Venkata Lakshmi Narayana Gubba Date: Tue Jun 9 21:27:08 2020 +0530 Bluetooth: hci_qca: Bug fix during SSR timeout Due to race conditions between qca_hw_error and qca_controller_memdump during SSR timeout,the same pointer is freed twice. This results in a double free. Now a lock is acquired before checking the stauts of SSR state. Fixes: d841502c79e3 ("Bluetooth: hci_qca: Collect controller memory dump during SSR") Signed-off-by: Venkata Lakshmi Narayana Gubba Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 38145ed12ed9935377fec40e0c3f50fbdda1e148 Author: Peter Chen Date: Wed Jun 10 11:37:41 2020 +0800 usb: chipidea: udc: fix the ENDIAN issue Fix the ENDIAN issue when assign dTD entry. Reported-by: kbuild test robot Signed-off-by: Peter Chen commit 617458cdc366c1c00e5934b6513f3d2b2c264c14 Author: Aditya Swarup Date: Fri Jun 5 19:57:37 2020 -0700 drm/i915/rkl: Don't try to read out DSI transcoders RKL doesn't have DSI outputs, so we shouldn't try to read out the DSI transcoder registers. v2(MattR): - Just set the 'extra panel mask' to edp | dsi0 | dsi1 and then mask against the platform's cpu_transcoder_mask to filter out the ones that don't exist on a given platform. (Ville) v3(MattR): - Only include DSI transcoders on gen11+ again. (Ville) - Use for_each_cpu_transcoder_masked() for loop. (Ville) Cc: Ville Syrjälä Signed-off-by: Aditya Swarup Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200606025740.3308880-5-matthew.d.roper@intel.com Reviewed-by: Ville Syrjälä commit 2cf122070c5681ea78d384c4e86a7d80f16bd1b7 Author: Matt Roper Date: Fri Jun 5 19:57:36 2020 -0700 drm/i915/rkl: Update TGP's pin mapping when paired with RKL HPD pin handling for RKL+TGP is a special case; we effectively select the HPD pin based on the DDI (A,B,D,E) rather than the PHY (A,B,C,D). This differs from the regular behavior of RKL+CMP (and also TGL+TGP). v2: - Rather than providing a custom hpd_pin mapping table, just assign encoder->hpd_pin in a custom manner for this setup. (Ville) Cc: Ville Syrjälä Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200606025740.3308880-4-matthew.d.roper@intel.com Reviewed-by: Ville Syrjälä commit 62afef2811e4171ddde5bf4985008f06e57a8431 Author: Matt Roper Date: Fri Jun 5 19:57:34 2020 -0700 drm/i915/rkl: RKL uses ABOX0 for pixel transfers Rocket Lake uses the same 'abox0' mechanism to handle pixel data transfers from memory that gen11 platforms used, rather than the abox1/abox2 interfaces used by TGL/DG1. For the most part this is a hardware implementation detail that's transparent to driver software, but we do have to program a couple of tuning registers (MBUS_ABOX_CTL and BW_BUDDY registers) according to which ABOX instances are used by a platform. Let's track the platform's ABOX usage in the device info structure and use that to determine which instances of these registers to program. As an exception to this rule is that even though TGL/DG1 use ABOX1+ABOX2 for data transfers, we're still directed to program the ABOX_CTL register for ABOX0; so we'll handle that as a special case. v2: - Store the mask of platform-specific abox registers in the device info structure. - Add a TLB_REQ_TIMER() helper macro. (Aditya) v3: - Squash ABOX and BW_BUDDY patches together and use a single mask for both of them, plus a special-case for programming the ABOX0 instance on all gen12. (Ville) Bspec: 50096 Bspec: 49218 Cc: Ville Syrjälä Cc: Aditya Swarup Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200606025740.3308880-2-matthew.d.roper@intel.com Reviewed-by: Ville Syrjälä commit 9cec1d547cb739f8bac2de833487116e0fe896d2 Author: Arnd Bergmann Date: Thu Apr 30 23:30:44 2020 +0200 iwlwifi: mvm: fix gcc-10 zero-length-bounds warning gcc-10 complains when a zero-length array is accessed: drivers/net/wireless/intel/iwlwifi/mvm/tx.c: In function 'iwl_mvm_rx_ba_notif': drivers/net/wireless/intel/iwlwifi/mvm/tx.c:1929:17: warning: array subscript 9 is outside the bounds of an interior zero-length array 'struct iwl_mvm_compressed_ba_tfd[0]' [-Wzero-length-bounds] 1929 | &ba_res->tfd[i]; | ~~~~~~~~~~~^~~ In file included from drivers/net/wireless/intel/iwlwifi/mvm/../fw/api/tdls.h:68, from drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h:68, from drivers/net/wireless/intel/iwlwifi/mvm/sta.h:73, from drivers/net/wireless/intel/iwlwifi/mvm/mvm.h:83, from drivers/net/wireless/intel/iwlwifi/mvm/tx.c:72: drivers/net/wireless/intel/iwlwifi/mvm/../fw/api/tx.h:769:35: note: while referencing 'tfd' 769 | struct iwl_mvm_compressed_ba_tfd tfd[0]; | ^~~ Change this structure to use a flexible-array member for 'tfd' instead, along with the various structures using an zero-length ieee80211_hdr array that do not show warnings today but might be affected by similar issues in the future. Fixes: 6f68cc367ab6 ("iwlwifi: api: annotate compressed BA notif array sizes") Fixes: c46e7724bfe9 ("iwlwifi: mvm: support new BA notification response") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20200430213101.135134-3-arnd@arndb.de Signed-off-by: Luca Coelho commit 1141215c745b152da6cb632f3532f7384ced8410 Author: Flavio Suligoi Date: Fri Jun 5 17:41:06 2020 +0200 ath: fix wiki website url In some ath files, the wiki url is still the old "wireless.kernel.org" instead of the new "wireless.wiki.kernel.org" Signed-off-by: Flavio Suligoi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200605154112.16277-4-f.suligoi@asem.it commit a738e766e3ed92c4ee5ec967777276b5ce11dd2c Author: Evan Green Date: Thu Jun 4 10:59:11 2020 -0700 ath10k: Acquire tx_lock in tx error paths ath10k_htt_tx_free_msdu_id() has a lockdep assertion that htt->tx_lock is held. Acquire the lock in a couple of error paths when calling that function to ensure this condition is met. Fixes: 6421969f248fd ("ath10k: refactor tx pending management") Fixes: e62ee5c381c59 ("ath10k: Add support for htt_data_tx_desc_64 descriptor") Signed-off-by: Evan Green Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20200604105901.1.I5b8b0c7ee0d3e51a73248975a9da61401b8f3900@changeid commit 94ed47531d7cd9c60109f52bba582aa85b7c4415 Author: Chris Wilson Date: Sun Jun 7 23:20:42 2020 +0100 drm/i915/selftests: Make the hanging request non-preemptible In some of our hangtests, we try to reset an active engine while it is spinning inside the recursive spinner. However, we also try to flood the engine with requests that preempt the hang, and so should disable the preemption to be sure that we reset the right request. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200607222108.14401-2-chris@chris-wilson.co.uk commit 8733a06323d40ecfb8208ee5f85bf9d39ce6fd34 Author: Tvrtko Ursulin Date: Sun Jun 7 23:20:41 2020 +0100 drm/i915: Adjust the sentinel assert to match implementation Sentinels are supposed to be last requests in the elsp queue, not the only one, so adjust the assert accordingly. Signed-off-by: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200607222108.14401-1-chris@chris-wilson.co.uk Signed-off-by: Chris Wilson commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca Author: Daniel Vetter Date: Fri May 29 16:05:42 2020 +0200 drm/shmem-helpers: Simplify dma-buf importing - Ditch the ->pages array - Make it a private gem bo, which means no shmem object, which means fireworks if anyone calls drm_gem_object_get_pages. But we've just made sure that's all covered. v2: Rebase v3: I forgot to remove the page_count mangling from the free path too. Noticed by Boris while testing. Cc: Boris Brezillon Tested-by: Boris Brezillon Acked-by: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Rob Herring Cc: Noralf Trønnes Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200529140542.2103713-1-daniel.vetter@ffwll.ch commit 5264083573184aba8a0e760f6ebb902326e40162 Author: Daniel Vetter Date: Mon May 11 11:35:53 2020 +0200 drm/shmem-helpers: Ensure get_pages is not called on imported dma-buf Just a bit of light paranoia. Also sprinkle this check over drm_gem_shmem_get_sg_table, which should only be called when exporting, same for the pin/unpin functions, on which it relies to work correctly. Acked-by: Thomas Zimmermann Tested-by: Boris Brezillon Cc: Gerd Hoffmann Cc: Rob Herring Cc: Noralf Trønnes Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200511093554.211493-9-daniel.vetter@ffwll.ch commit 6e60d5ded06baa69cca0b6337053c99b54211624 Author: Nirmoy Das Date: Fri Jun 5 11:14:02 2020 +0200 drm/mm: add ig_frag selftest This patch introduces fragmentation in the address range and measures time taken by 10k and 20k insertions. ig_frag() will fail if the time taken by 20k insertions takes more than 4 times of 10k insertions as we know that insertions should at most scale quadratically. v2: introduce fragmentation by freeing every other node. only test bottom-up and top-down for now. v3: fix incorrect mode check Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/369076/ commit ce475a8fb2229ffdb14ae011625097b3d3a8e39d Author: Colin Ian King Date: Mon Apr 20 23:24:49 2020 +0100 iwlwifi: mvm: remove redundant assignment to variable ret The variable ret is being assigned with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20200420222449.99481-1-colin.king@canonical.com Signed-off-by: Luca Coelho commit 0f736f3bec8db0603f625c8c377a5010a5a1b066 Author: Luca Ceresoli Date: Mon Feb 10 14:58:17 2020 +0100 iwlwifi: fix config variable name in comment The correct variable name was replaced here by mistake by commit ab27926d9e4a ("iwlwifi: fix devices with PCI Device ID 0x34F0 and 11ac RF modules"). Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20200210135817.31994-1-luca@lucaceresoli.net Signed-off-by: Luca Coelho commit 88ad368a84d8df81c7b832a6aba3487c63019b29 Author: Ben Greear Date: Tue Nov 26 13:47:44 2019 -0800 iwlwifi: mvm: Fix avg-power report On AX200, the average power was showing positive instead of negative, but otherwise matched the expected RSSI. Flip the value to negative before giving to mac80211. Signed-off-by: Ben Greear Link: https://lore.kernel.org/r/20191126214744.1283-1-greearb@candelatech.com [removed unnecessary check and some unnecessary parentheses] Signed-off-by: Luca Coelho commit a66da873c424fd9a695ae945d6e0160bb467dcf9 Author: Simon Ser Date: Thu Jun 4 09:20:23 2020 +0000 drm: document how user-space should use link-status Describe what a "BAD" link-status means for user-space and how it should handle it. The logic described has been implemented in igt [1]. v2: - Change wording to avoid "enabled" (Daniel) - Add paragraph about multiple connectors sharing the same CRTC (Pekka) - Add paragraph about performing an atomic commit on a connector without updating the link-status property (Daniel) v3: - Fix description of what happens when link-status isn't reset to "GOOD", and when link-status is reset without ALLOW_MODESET (Daniel, Ville) - Changing link-status to "BAD" is a no-op - Clearly state that "BAD" means black screen (Manasi) [1]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/commit/fbe61f529737191d0920521946a575bd55f00fbe Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Manasi Navare Cc: Ville Syrjala Cc: Pekka Paalanen Reviewed-by: Daniel Vetter Acked-by: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/msgid/kFylMmeRMGJk-oi8f-Td8A7GNa1C-GsK23-vjKg77VhWfwpkLJg7QxFlQ_g9KdVxZiyWl9eJWpUGa5PYasR9YcyvIbuBmHVfKeHb4rH0yTM=@emersion.fr commit 46d53e271cea5740a19384c4365217c9cb86bdfc Author: Stanislav Lisovskiy Date: Mon Jun 8 09:55:52 2020 +0300 Revert "drm/i915: Remove unneeded hack now for CDCLK" This reverts commit 82ea174dc5425d4e85e25d0c4ba961a2e494392a. Unfortunately according to our recent findings there is still some unidentified factor, requiring CDCLK to be set higher - otherwise we still get underruns on some multipipe configurations, despite CDCLK being set according to BSpec formula. So getting again back into debug mode to indentify the cause, meanwhile setting CDCLK=Pixel rate back in order to remove regression in 10% of the cases due to FIFO underruns. Signed-off-by: Stanislav Lisovskiy Fixes: cd1915460861 ("drm/i915: Adjust CDCLK accordingly to our DBuf bw needs") Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200608065552.21728-1-stanislav.lisovskiy@intel.com commit 270f7806d3b91b9c71fa8fe66f7dcc2d6587694e Author: Yannick Cote Date: Wed Jun 3 14:20:58 2020 -0400 selftests/livepatch: fix mem leaks in test-klp-shadow-vars In some cases, when an error occurs during testing and the main test routine returns, a memory leak occurs via leaving previously registered shadow variables allocated in the kernel as well as shadow_ptr list elements. From now on, in case of error, remove all allocated shadow variables and shadow_ptr struct elements. Signed-off-by: Yannick Cote Reviewed-by: Petr Mladek Reviewed-by: Kamalesh Babulal Acked-by: Miroslav Benes Acked-by: Joe Lawrence Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200603182058.109470-5-ycote@redhat.com commit 76efe6da89d8320e9ba65cebe0b3bcb6e5c29b31 Author: Yannick Cote Date: Wed Jun 3 14:20:57 2020 -0400 selftests/livepatch: more verification in test-klp-shadow-vars This change makes the test feel more familiar with narrowing to a typical usage by operating on a number of identical structure instances and populating the same two new shadow variables symmetrically while keeping the same testing and verification criteria for the extra variables. Signed-off-by: Yannick Cote Reviewed-by: Kamalesh Babulal Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Acked-by: Joe Lawrence Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200603182058.109470-4-ycote@redhat.com commit 6a26a9df169d81aba244d6496e4381401d04e281 Author: Yannick Cote Date: Wed Jun 3 14:20:56 2020 -0400 selftests/livepatch: rework test-klp-shadow-vars The initial idea was to make a change to please cppcheck and remove void pointer arithmetics found a few times: portability: 'obj' is of type 'void *'. When using void pointers in calculations, the behaviour is undefined. [arithOperationsOnVoidPointer] The rest of the changes are to help make the test read as an example while continuing to verify the shadow variable code. The logic of the test is unchanged but restructured to use descriptive names. Signed-off-by: Yannick Cote Reviewed-by: Petr Mladek Reviewed-by: Kamalesh Babulal Acked-by: Miroslav Benes Acked-by: Joe Lawrence Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200603182058.109470-3-ycote@redhat.com commit 547840bd5ae52a9d864abddcb91ea491a78d8199 Author: Joe Lawrence Date: Wed Jun 3 14:20:55 2020 -0400 selftests/livepatch: simplify test-klp-callbacks busy target tests The test-klp-callbacks script includes a few tests which rely on kernel task timings that may not always execute as expected under system load. These may generate out of sequence kernel log messages that result in test failure. Instead of using sleep timing windows to orchestrate these tests, add a block_transition module parameter to communicate the test purpose and utilize flush_queue() to serialize the test module's task output. Signed-off-by: Joe Lawrence Reviewed-by: Petr Mladek Acked-by: Miroslav Benes Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20200603182058.109470-2-ycote@redhat.com commit a9ec8423134a54c9f0ae8d4ef59e1e833ca917c2 Author: Abhishek Pandit-Subedi Date: Fri Jun 5 13:50:15 2020 -0700 Bluetooth: Allow suspend even when preparation has failed It is preferable to allow suspend even when Bluetooth has problems preparing for sleep. When Bluetooth fails to finish preparing for suspend, log the error and allow the suspend notifier to continue instead. To also make it clearer why suspend failed, change bt_dev_dbg to bt_dev_err when handling the suspend timeout. Fixes: dd522a7429b07e ("Bluetooth: Handle LE devices during suspend") Reported-by: Len Brown Signed-off-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 4da385f742d485fe3135a2711299cbf28ea24bc9 Author: Matthias Kaehlcke Date: Fri Jun 5 11:46:11 2020 -0700 Bluetooth: hci_qca: Refactor error handling in qca_suspend() If waiting for IBS sleep times out jump to the error handler, this is easier to read than multiple 'if' branches and a fall through to the error handler. Signed-off-by: Matthias Kaehlcke Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit e2a119cd84600f7e2d94d3e8781946b69b6e2376 Author: Matthias Kaehlcke Date: Fri Jun 5 11:46:10 2020 -0700 Bluetooth: hci_qca: Skip serdev wait when no transfer is pending qca_suspend() calls serdev_device_wait_until_sent() regardless of whether a transfer is pending. While it does no active harm since the function should return immediately it makes the code more confusing. Add a flag to track whether a transfer is pending and only call serdev_device_wait_until_sent() is needed. Signed-off-by: Matthias Kaehlcke Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit eff981f6579d5797d68d27afc0eede529ac8778a Author: Matthias Kaehlcke Date: Fri Jun 5 11:46:09 2020 -0700 Bluetooth: hci_qca: Only remove TX clock vote after TX is completed qca_suspend() removes the vote for the UART TX clock after writing an IBS sleep request to the serial buffer. This is not a good idea since there is no guarantee that the request has been sent at this point. Instead remove the vote after successfully entering IBS sleep. This also fixes the issue of the vote being removed in case of an aborted suspend due to a failure of entering IBS sleep. Fixes: 41d5b25fed0a0 ("Bluetooth: hci_qca: add PM support") Signed-off-by: Matthias Kaehlcke Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 7310dd3fbaa5a23f2b4a1c17ece2a0c7434a1d98 Author: Matthias Kaehlcke Date: Sat Jun 6 09:53:06 2020 -0700 Bluetooth: hci_qca: Simplify determination of serial clock on/off state from votes The serial clocks should be on when there is a vote for at least one of the clocks (RX or TX), and off when there is no 'on' vote. The current logic to determine the combined state is a bit redundant in the code paths for different types of votes, use a single statement in the common path instead. Signed-off-by: Matthias Kaehlcke Signed-off-by: Marcel Holtmann commit 66d0a3b57bbe0083080682fe74236174f3cadad7 Author: Chris Down Date: Thu Oct 17 10:48:41 2019 -0400 iwlwifi: Don't IWL_WARN on FW reconfiguration IWL_WARN seems excessive here since this can happen during normal operation. Every time I connect to a new network with 8086:24fd I get this as KERN_WARNING on the console, which mildly distracts from other more pressing messages. For example: % sudo journalctl _TRANSPORT=kernel | grep -c 'FW already configured' 403 Signed-off-by: Chris Down Cc: Shahar S Matityahu Cc: Luca Coelho Cc: linux-kernel@vger.kernel.org Cc: linux-wireless@vger.kernel.org Link: https://lore.kernel.org/r/20191017144841.GA16393@chrisdown.name Signed-off-by: Luca Coelho commit 64cf40a125ffd293a37b0a299372e3602dd62932 Author: Gwan-gyeong Mun Date: Sun Jun 7 17:36:14 2020 +0300 drm/i915/psr: Program default IO buffer Wake and Fast Wake The IO buffer Wake and Fast Wake bit size and value have been changed from Gen12+. It programs the default value of IO buffer Wake and Fast Wake on Gen12+. It adds definitions of IO buffer Wake and Fast Wake for pre Gen12 and Gen12+. And it aligns PSR2 definition macros. v2: Fix macro definitions. (José) v3: Addressed review comments from José - Add missing default values of IO_BUFFER_WAKE and FAST_WAKE for GEN9+ - Change a style of macro naming in order to use lines as input. - Update Todo comments. v4: Add parentheses to macros to avoid precedence issues. Cc: José Roberto de Souza Signed-off-by: Gwan-gyeong Mun Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200607143614.185246-1-gwan-gyeong.mun@intel.com commit 8c1a8f12f4a3b4223348a109f2f5c8d46819a691 Author: Matt Roper Date: Fri Jun 5 20:18:03 2020 -0700 drm/i915: Restore DP-E to VBT mapping table We accidentally dropped matching for DVO_PORT_DPE from the VBT mapping table when we refactored the function. Restore it. Fixes: 4628142aeccc ("drm/i915/rkl: provide port/phy mapping for vbt") Cc: Lucas De Marchi Cc: Matt Roper Cc: Ville Syrjälä Cc: Chris Wilson Signed-off-by: Matt Roper Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200606031803.3309624-1-matthew.d.roper@intel.com commit 7ac2d2536dfa71c275a74813345779b1e7522c91 Author: Chris Wilson Date: Fri Jun 5 21:03:57 2020 +0100 drm/i915/gem: Delete unused code Unused as of commit 9e0f9464e2ab ("drm/i915/gem: Async GPU relocations only"), but left behind. >> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:933:21: error: unused function 'unmask_page' [-Werror,-Wunused-function] static inline void *unmask_page(unsigned long p) ^ >> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:938:28: error: unused function 'unmask_flags' [-Werror,-Wunused-function] static inline unsigned int unmask_flags(unsigned long p) ^ >> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c:945:33: error: unused function 'cache_to_ggtt' [-Werror,-Wunused-function] static inline struct i915_ggtt *cache_to_ggtt(struct reloc_cache *cache) Reported-by: kernel test robot Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200605200357.13069-1-chris@chris-wilson.co.uk commit 84d24cb5247a356a4310a25761f8aa56b8814538 Author: Chris Wilson Date: Fri Jun 5 19:48:44 2020 +0100 drm/i915: Correct discard i915_vma_compare assertion As a last minute addition, I added an assertion to make sure that the new i915_vma view would be equal to the discard. However, the positive encouragement from CI only goes to show that we rarely take this path, and it wasn't until the post-merge run did we hit the assert -- because it compared the wrong view. Fixup the copy'n'paste error and compare against both the old view and the expected new view. Fixes: 9bdcaa5e3a2f ("drm/i915: Discard a misplaced GGTT vma") Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200605184844.24644-1-chris@chris-wilson.co.uk commit 9bdcaa5e3a2fb0a18d8c7a49bd64a52bce105bd2 Author: Chris Wilson Date: Fri Jun 5 17:52:58 2020 +0100 drm/i915: Discard a misplaced GGTT vma Across the many users of the GGTT vma (internal objects, mmapings, display etc), we may end up with conflicting requirements for the placement. Currently, we try to resolve the conflict by unbinding the vma and rebinding it to match the new constraints; over time we will end up with a GGTT that matches the most strict constraints over all concurrent users. However, this causes a problem if the vma is currently in use as we must wait until it is idle before moving it. But there is no restriction on the number of views we may use (apart from the limited size of the GGTT itself), and so if the active vma does not meet our requirements, try and build a new one! Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200605165258.1483-1-chris@chris-wilson.co.uk commit 12b67c2e9c58f6c716efcd5cfc9411d7e5f45930 Author: Chris Wilson Date: Fri Jun 5 13:23:26 2020 +0100 drm/i915/gt: Always check to enable timeslicing if not submitting We may choose not to submit for a number of reasons, yet not fill both ELSP. In which case we must start timeslicing (there will be no ACK event on which to hook the start) if the queue would benefit from the currently active context being evicted. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200605122334.2798-2-chris@chris-wilson.co.uk commit fdd4f9416511d7a1f0a84a75052a3476dd163438 Author: Chris Wilson Date: Fri Jun 5 13:23:25 2020 +0100 drm/i915/gt: Set timeslicing priority from queue If we only submit the first port, leaving the second empty yet have ready requests pending in the queue, use that to set the timeslicing priority (i.e. the priority at which we will decided to enabling timeslicing and evict the currently active context if the queue is of equal priority after its quantum expired). Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200605122334.2798-1-chris@chris-wilson.co.uk commit 8a07052440c2c2e6f3d9a85bf74b5ce349a94672 Author: Liu Ying Date: Mon Jun 1 14:11:20 2020 +0800 drm/panel: simple: Add support for KOE TX26D202VM0BWA panel This patch adds support for Kaohsiung Opto-Electronics Inc. 10.1" TX26D202VM0BWA WUXGA(1920x1200) TFT LCD panel with LVDS interface. The panel has dual LVDS channels. My panel is manufactured by US Micro Products(USMP). There is a tag at the back of the panel, which indicates the panel type is 'TX26D202VM0BWA' and it's made by KOE in Taiwan. The panel spec from USMP can be found at: https://www.usmicroproducts.com/sites/default/files/datasheets/USMP-T101-192120NDU-A0.pdf The below panel spec from KOE is basically the same to the one from USMP. However, the panel type 'TX26D202VM0BAA' is a little bit different. It looks that the two types of panel are compatible with each other. http://www.koe.j-display.com/upload/product/TX26D202VM0BAA.pdf Cc: Thierry Reding Cc: Sam Ravnborg Signed-off-by: Liu Ying Reviewed-by: Emil Velikov Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1590991880-24273-1-git-send-email-victor.liu@nxp.com commit 85be9d713df38448f2b5433d3e23258c922b3003 Author: Liu Ying Date: Mon Jun 1 14:10:43 2020 +0800 dt-bindings: panel-simple: Add koe,tx26d202vm0bwa compatible Add compatible to panel-simple for Kaohsiung Opto-Electronics Inc. 10.1" WUXGA(1920x1200) TX26D202VM0BWA TFT LCD panel with LVDS interface. Cc: Thierry Reding Cc: Sam Ravnborg Cc: Rob Herring Signed-off-by: Liu Ying Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/1590991843-24231-1-git-send-email-victor.liu@nxp.com commit ac4fc5b38d1abc039d61eecd15c12fc6fbeb7f33 Author: Chris Wilson Date: Fri Jun 5 15:47:05 2020 +0100 drm/i915/gt: Include the engine's fw-domains in the debug info Add engine->fw_domain/active to the pretty printer for debug dumps and debugfs. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Venkata Sandeep Dhanalakota Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200605144705.31127-1-chris@chris-wilson.co.uk commit 684f1a1bf92e6d0406fac1007da5ceee4c6960a3 Author: Kees Cook Date: Fri Jun 5 07:19:53 2020 -0700 drm/i915: Fix comments mentioning typo in IS_ENABLED() This has no code changes, but the typo is clearly getting copy/pasted, so better to avoid this now and fix the typo. IS_ENABLED() takes full names, and must have the "CONFIG_" prefix. Reported-by: Joe Perches Link: https://lore.kernel.org/lkml/b08611018fdb6d88757c6008a5c02fa0e07b32fb.camel@perches.com Signed-off-by: Kees Cook Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/202006050718.9D4FCFC2E@keescook commit 33e3fd99ec6cde00e0c04a1395ae535e0c00a844 Author: Alexander Wetzel Date: Mon Aug 19 20:05:40 2019 +0200 iwlwifi: Extended Key ID support for mvm and dvm All iwlwifi cards below the 22000 series are able to handle multiple keyids per STA and allow the selection of the encryption key per MPDU. These are therefore fully compatible with the Extended Key ID support implementation in mac80211. Enable Extended Key ID support for all dvm cards and the mvm cards not using the incompatible new Tx API introduced for the 22000 series. Signed-off-by: Alexander Wetzel Link: https://lore.kernel.org/r/20190819180540.2855-1-alexander@wetzel-home.de Signed-off-by: Luca Coelho commit 9e0f9464e2ab36b864359a59b0e9058fdef0ce47 Author: Chris Wilson Date: Thu Jun 4 22:14:57 2020 +0100 drm/i915/gem: Async GPU relocations only Reduce the 3 relocation paths down to the single path that accommodates all. The primary motivation for this is to guard the relocations with a natural fence (derived from the i915_request used to write the relocation from the GPU). The tradeoff in using async gpu relocations is that it increases latency over using direct CPU relocations, for the cases where the target is idle and accessible by the CPU. The benefit is greatly reduced lock contention and improved concurrency by pipelining. Note that forcing the async gpu relocations does reveal a few issues they have. Firstly, is that they are visible as writes to gem_busy, causing to mark some buffers are being to written to by the GPU even though userspace only reads. Secondly is that, in combination with the cmdparser, they can cause priority inversions. This should be the case where the work is being put into a common workqueue losing our priority information and so being executed in FIFO from the worker, denying us the opportunity to reorder the requests afterwards. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200604211457.19696-1-chris@chris-wilson.co.uk commit 2d3879950f8ac1eb5638958a01ff0abeba5427d9 Author: José Roberto de Souza Date: Wed May 20 14:27:56 2020 -0700 drm/i915: Add psr_safest_params This parameter is meant to be used when PSR issues are found as some issues in the past was due wrong values set in VBT so this would be a quick and easy way to ask users or for us to check if the issue is due VBT values. Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20200520212756.354623-1-jose.souza@intel.com commit 24d2fc3d530e779c0a7a3dc00d58746cba93e5c8 Author: José Roberto de Souza Date: Wed Jun 3 14:15:28 2020 -0700 drm/i915/rkl: Disable PSR2 RKL doesn't have PSR2 HW tracking, it was replaced by software/manual tracking. The driver is required to track the areas that needs update and program hardware to send selective updates. So until the software tracking is implemented, PSR2 needs to be disabled for platforms without PSR2 HW tracking. BSpec: 50422 BSpec: 50424 Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Signed-off-by: José Roberto de Souza Signed-off-by: Matt Roper Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20200603211529.3005059-15-matthew.d.roper@intel.com commit 562ddcb7485432b2526fe6e158f7ef58631e4d99 Author: Matt Roper Date: Wed Jun 3 14:15:23 2020 -0700 drm/i915/rkl: Don't try to access transcoder D There are a couple places in our driver that loop over transcoders A..D for gen11+; since RKL only has three pipes/transcoders, this can lead to unclaimed register reads/writes. We should add checks for transcoder existence where appropriate. v2: Move one transcoder check that wound up in the wrong function after conflict resolution. It belongs in bdw_get_trans_port_sync_config rather than bxt_get_dsi_transcoder_state. v3: Switch loops to use for_each_cpu_transcoder_masked() since this iterator already checks the platform's transcoder mask for us. (Ville) Cc: Aditya Swarup Cc: Ville Syrjälä Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200603211529.3005059-10-matthew.d.roper@intel.com Reviewed-by: Ville Syrjälä commit aefaa1f452ab2bb933265e1fe6ea25337f08c5ce Author: Matt Roper Date: Wed Jun 3 14:15:19 2020 -0700 drm/i915/rkl: Setup ports/phys RKL uses DDI's A, B, TC1, and TC2 which need to map to combo PHY's A-D. Bspec: 49181 Cc: Imre Deak Cc: Aditya Swarup Cc: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200603211529.3005059-6-matthew.d.roper@intel.com Reviewed-by: Ville Syrjälä commit 9fa6769952ee14250bb7107a2ec66062d2ccae1e Author: José Roberto de Souza Date: Tue Jun 2 13:54:24 2020 -0700 drm/i915/tgl: Add HBR and HBR2+ voltage swing table As latest update we have now 2 voltage swing tables for DP over DKL PHY with only one difference in Level 0 pre-emphasis 3. So with 2 tables for DP is time to have one single function to return all DKL voltage swing tables. BSpec: 49292 Cc: Khaled Almahallawy Signed-off-by: José Roberto de Souza Tested-by: Khaled Almahallawy Reviewed-by: Khaled Almahallawy Link: https://patchwork.freedesktop.org/patch/msgid/20200602205424.138143-1-jose.souza@intel.com commit cb62cdec6d48ccd029d144380ce9cc09a54092be Author: Laurent Pinchart Date: Tue Jun 2 20:12:40 2020 +0300 drm/panel: simple: Set connector type for DSI panels None of the DSI panels set the connector_type in their panel_desc descriptor. As they are all guaranteed to be DSI panels, that's an easy fix, set the connector type to DRM_MODE_CONNECTOR_DSI. Signed-off-by: Laurent Pinchart Acked-by: Daniel Vetter Acked-by: Thierry Reding Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200602171240.2785-1-laurent.pinchart+renesas@ideasonboard.com commit 19aefbc778b8b8e87c2d31be9736c634f0ea95a8 Author: Stanislav Lisovskiy Date: Mon Jun 1 20:30:58 2020 +0300 drm/i915: Fix wrong CDCLK adjustment changes Previous patch didn't take into account all pipes but only those in state, which could cause wrong CDCLK conclcusions and calculations. Also there was a severe issue with min_cdclk being assigned to 0 every compare cycle. Too bad this was found by me only after merge. This could be also causing the issues in test, however not clear - anyway marking this as fixing the "Adjust CDCLK accordingly to our DBuf bw needs". v2: - s/pipe/crtc->pipe/ - save a bit of instructions by skipping inactive pipes, without getting 0 DBuf slice mask for it. Signed-off-by: Stanislav Lisovskiy Fixes: cd1915460861 ("drm/i915: Adjust CDCLK accordingly to our DBuf bw needs") Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200601173058.5084-1-stanislav.lisovskiy@intel.com commit b8226d62e77620d372f6eb8c34b51798f3962414 Author: Matt Roper Date: Wed Jun 3 14:15:25 2020 -0700 drm/i915/rkl: Handle comp master/slave relationships for PHYs Certain combo PHYs act as a compensation master to other PHYs and need to be initialized with a special irefgen bit in the PORT_COMP_DW8 register. Previously PHY A was the only compensation master (for PHYs B & C), but RKL adds a fourth PHY which is slaved to PHY C instead. Bspec: 49291 Cc: Lucas De Marchi Cc: José Roberto de Souza Cc: Aditya Swarup Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20200603211529.3005059-12-matthew.d.roper@intel.com commit cd0a89527d06f19e9e6eb7efce81c629c4b76b43 Author: Matt Roper Date: Wed Jun 3 14:15:22 2020 -0700 drm/i915/rkl: Add DDC pin mapping The pin mapping for the final two outputs varies according to which PCH is present on the platform: with TGP the pins are remapped into the TC range, whereas with CMP they stay in the traditional combo output range. Bspec: 49181 Cc: Aditya Swarup Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20200603211529.3005059-9-matthew.d.roper@intel.com commit 4628142aeccca6e37d8c3dfc9ce8be65512a324f Author: Lucas De Marchi Date: Wed Jun 3 14:15:20 2020 -0700 drm/i915/rkl: provide port/phy mapping for vbt RKL uses the DDI A, DDI B, DDI USBC1, DDI USBC2 from the DE point of view, so all DDI/pipe/transcoder register use these indexes to refer to them. Combo phy and IO functions follow another namespace that we keep as "enum phy". The VBT in theory would use the DE point of view, but that does not happen in practice. Provide a table to convert the child devices to the "correct" port numbering we use. Now this is the output we get while reading the VBT: DDIA: [drm:intel_bios_port_aux_ch [i915]] using AUX A for port A (VBT) [drm:intel_dp_init_connector [i915]] Adding DP connector on [ENCODER:275:DDI A] [drm:intel_hdmi_init_connector [i915]] Adding HDMI connector on [ENCODER:275:DDI A] [drm:intel_hdmi_init_connector [i915]] Using DDC pin 0x1 for port A (VBT) DDIB: [drm:intel_bios_port_aux_ch [i915]] using AUX B for port B (platform default) [drm:intel_hdmi_init_connector [i915]] Adding HDMI connector on [ENCODER:291:DDI B] [drm:intel_hdmi_init_connector [i915]] Using DDC pin 0x2 for port B (VBT) DDI USBC1: [drm:intel_bios_port_aux_ch [i915]] using AUX D for port D (VBT) [drm:intel_dp_init_connector [i915]] Adding DP connector on [ENCODER:295:DDI D] [drm:intel_hdmi_init_connector [i915]] Adding HDMI connector on [ENCODER:295:DDI D] [drm:intel_hdmi_init_connector [i915]] Using DDC pin 0x3 for port D (VBT) DDI USBC2: [drm:intel_bios_port_aux_ch [i915]] using AUX E for port E (VBT) [drm:intel_dp_init_connector [i915]] Adding DP connector on [ENCODER:306:DDI E] [drm:intel_hdmi_init_connector [i915]] Adding HDMI connector on [ENCODER:306:DDI E] [drm:intel_hdmi_init_connector [i915]] Using DDC pin 0x9 for port E (VBT) Cc: Clinton Taylor Cc: Aditya Swarup Signed-off-by: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200603211529.3005059-7-matthew.d.roper@intel.com commit e95e79749b32b83b4941f28294204be1be3fa3a8 Author: Matt Roper Date: Wed Jun 3 14:15:15 2020 -0700 drm/i915/rkl: Set transcoder mask properly Although we properly captured RKL's three pipes in the device info structure, we forgot to make the corresponding update to the transcoder mask. Set this field so that our transcoder loops will operate properly. Fixes: 123f62de419f ("drm/i915/rkl: Add RKL platform info and PCI ids") Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20200603211529.3005059-2-matthew.d.roper@intel.com Reviewed-by: Ville Syrjälä commit ac533c56b7ba4a2ce2f6fe83c7a4bb672f452f1f Author: Chris Wilson Date: Thu Jun 4 16:31:45 2020 +0100 drm/i915/gt: Track if an engine requires forcewake w/a Sometimes an engine might need to keep forcewake active while it is busy submitting requests for a particular workaround. Track such nuisance with engine->fw_domain. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Cc: Venkata Sandeep Dhanalakota Link: https://patchwork.freedesktop.org/patch/msgid/20200604153145.21068-1-chris@chris-wilson.co.uk commit f4bb45f727341126aa81d8ac2f3e45c7029fe448 Author: Chris Wilson Date: Thu Jun 4 14:59:38 2020 +0100 drm/i915: Trim set_timer_ms() intervals Use the plain msec_to_jiffies() rather than the _timeout variant so we round down and do not add an extra jiffy to our interval. For example, with timeslicing we do not want to err on the longer side as any fairness depends on catching hogging contexts on the GPU. Bring on CFS. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200604135938.3975-1-chris@chris-wilson.co.uk commit 57a78ca4eceab1ecb0299fba8a10211289329889 Author: Chris Wilson Date: Thu Jun 4 11:37:30 2020 +0100 drm/i915/gem: Mark the buffer pool as active for the cmdparser If the execbuf is interrupted after building the cmdparser pipeline, and before we commit to submitting the request to HW, we would attempt to clean up the cmdparser early. While we held active references to the vma being parsed and constructed, we did not hold an active reference for the buffer pool itself. The result was that an interrupted execbuf could still have run the cmdparser pipeline, but since the buffer pool was idle, its target vma could have been recycled. Note this problem only occurs if the cmdparser is running async due to pipelined waits on busy fences, and the execbuf is interrupted. Fixes: 686c7c35abc2 ("drm/i915/gem: Asynchronous cmdparser") Fixes: 16e87459673a ("drm/i915/gt: Move the batch buffer pool from the engine to the gt") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200604103751.18816-1-chris@chris-wilson.co.uk commit 84f9cbf335809412704f99b5fb9b737ef7cb8e89 Author: Clint Taylor Date: Wed Jun 3 15:11:50 2020 -0700 drm/i915/tgl: Implement WA_16011163337 Set GS Timer to 224. Combine with Wa_1604555607 due to register FF_MODE2 not being able to be read. V2: Math issue fixed Cc: Chris Wilson Cc: Caz Yokoyama Cc: Matt Atwood Signed-off-by: Clint Taylor Acked-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200603221150.14745-1-clinton.a.taylor@intel.com commit d61345f342981f31022f56277cf2826c8d28ae7e Author: Chris Wilson Date: Thu Jun 4 13:36:41 2020 +0100 drm/i915/selftests: Exercise all copy engines with the blt routines Just to remove an obnoxious HAS_ENGINES(), and in the process make the code agnostic to the availabilty of any particular engine by making it exercise any and all such engines declared on the system. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Matthew Auld Cc: Daniele Ceraolo Spurio Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200604123641.767-1-chris@chris-wilson.co.uk commit 34becfdb945a5eb819b7c8e4f0ec5cc5952ec68f Author: Jani Nikula Date: Tue Jun 2 18:11:26 2020 +0300 drm/i915/params: fix i915.reset module param type The reset member in i915_params was previously changed to unsigned, but this failed to change the actual module parameter. Fixes: aae970d8454b ("drm/i915: Mark i915.reset as unsigned") Cc: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Chris Wilson Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200602151126.25626-1-jani.nikula@intel.com commit 18ece75d7d74eb108f6a7325cf247077a666cba8 Author: Nirmoy Das Date: Fri May 29 16:04:01 2020 +0200 drm/mm: fix hole size comparison Fixes: 0cdea4455acd350a ("drm/mm: optimize rb_hole_addr rbtree search") Signed-off-by: Nirmoy Das Reported-by: Christian König Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/367726/ commit 4c07a5d7aeb39f559b29aa58ec9a8a5ab4282cb0 Author: Dan Carpenter Date: Fri May 29 12:59:48 2020 +0300 Bluetooth: hci_qca: Fix an error pointer dereference When a function like devm_clk_get_optional() function returns both error pointers on error and NULL then the NULL return means that the optional feature is deliberately disabled. It is a special sort of success and should not trigger an error message. The surrounding code should be written to check for NULL and not crash. On the other hand, if we encounter an error, then the probe from should clean up and return a failure. In this code, if devm_clk_get_optional() returns an error pointer then the kernel will crash inside the call to: clk_set_rate(qcadev->susclk, SUSCLK_RATE_32KHZ); The error handling must be updated to prevent that. Fixes: 77131dfec6af ("Bluetooth: hci_qca: Replace devm_gpiod_get() with devm_gpiod_get_optional()") Signed-off-by: Dan Carpenter Signed-off-by: Marcel Holtmann commit 30965242268c39eaaa4e845e0559cd2635d016a6 Author: Alain Michaud Date: Mon Jun 1 14:20:59 2020 +0000 Bluetooth: Removing noisy dbg message This patch removes a particularly noisy dbg message. The debug message isn't particularly interesting for debuggability so it was simply removed to reduce noise in dbg logs. Signed-off-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 886c8bc6c13befee1a11fc0fa710ec3d4f3cc882 Author: Likun Gao Date: Fri Mar 13 17:51:13 2020 +0800 drm/amd/powerplay: enable PPT and TDC for sienna_cichlid Enable PPT and TDC for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 1d5ca71345a693d358b2810a64aea784d69fe928 Author: Likun Gao Date: Fri Mar 13 16:36:08 2020 +0800 drm/amd/powerplay: support to get power index for sienna_cichlid Add function to get smu power index for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 1c58d4295be6a9f2983fa2b8ac770bcca7eef66f Author: Likun Gao Date: Fri Mar 13 13:06:49 2020 +0800 drm/amd/powerplay: enable Fan control for sienna_cichlid Support for Advanced Fan Control (AFC+) for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 20d71dcc7cef356638fd6e31e2dcae50a160df77 Author: Likun Gao Date: Tue Mar 10 17:15:56 2020 +0800 drm/amd/powerplay: enable GFX SS for sienna_cichlid Enable Graphics Clock (GFXCLK) Spread Spectrum for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 5cb7435319ab3a31c2a9099c854eb2a7cd12380f Author: Likun Gao Date: Tue Mar 10 12:25:45 2020 +0800 drm/amd/powerplay: enable LCLK DPM for sienna_cichlid Enable LCLK DPM for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit b7d25b5f67faf1019623e0db17a98c445a35362e Author: Likun Gao Date: Tue Mar 10 12:22:34 2020 +0800 drm/amd/powerplay: support to print pcie levels for sienna_cichlid Support to print PCIE clk levels for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 08ccfe084cd04b961723809ac8499fc10426ba25 Author: Likun Gao Date: Tue Mar 10 11:51:49 2020 +0800 drm/amd/powerplay: support pcie value set and update for sienna_cichlid Add support to set default pcie parameters for sienna_cichlid. Add support to update pcie parameters for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 5f338f70605ce3b2ca3a670c4157cdeff14f570c Author: Likun Gao Date: Tue Mar 10 11:22:07 2020 +0800 drm/amd/powerplay: enable DCEFCLK DPM and DS for sienna_cichlid Enable Display Clocks Dynamic Power Management (DPM) for sienna_cichlid. Enable Display Controller Engine Fabric Clock Deep Sleep for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 9aa60213403b12f2ef393a62b52064a2211cc320 Author: Likun Gao Date: Fri Mar 6 17:01:22 2020 +0800 drm/amd/powerplay: Enable SOCCLK ULV for sienna_cichlid Enable FW DSTATE for sienna_cichlid. Enable DF CSTATE for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 02bb391d916aaa80a8d9a0d3a469eeed1baacbfc Author: Likun Gao Date: Thu Feb 27 11:30:14 2020 +0800 drm/amd/powerplay: make gfx ds can be configure for sienna_cichlid Make GFX deep sleep can be configure for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 65297d5017e16c5e831925b390c05543b0068296 Author: Likun Gao Date: Tue Mar 3 14:40:16 2020 +0800 drm/amdgpu/powerplay: set UCLK DPM for sienna_cichlid Enable uclk dpm for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 094cdf15e99574edb9feb127f202e4cf41654327 Author: Likun Gao Date: Wed Feb 26 19:13:29 2020 +0800 drm/amdgpu/powerplay: set Thermal control for sienna_cichlid Enable Auto Thermal Throttling for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 983ab9f2842e800ccdeb91b5acdae785d1bdae5b Author: Likun Gao Date: Wed Mar 18 17:00:27 2020 -0400 drm/amd/powerplay: enable SOC Clock Deep Sleep for sienna_cichlid Enable System On Chip Clock Deep Sleep for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 15dbe18fa634b08bd0bb75e3ac730bc1623dd335 Author: Likun Gao Date: Mon Feb 24 11:31:13 2020 +0800 drm/amd/powerplay: enable Graphics Clock Deep Sleep for sienna_cichlid Enable Graphics Clock Deep Sleep for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 62c1ea6bbab70b518af82ef4fbf64ae178dbd13b Author: Likun Gao Date: Wed Feb 19 16:39:04 2020 +0800 drm/amd/powerplay: enable Ultra Low Voltage for sienna_cichlid Support Ultra Low Voltage for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 4cd4f45b65072d5bec5b9aa9b2f1a4c8e31b588d Author: Likun Gao Date: Fri Feb 14 11:12:34 2020 +0800 drm/amd/powerplay: set FCLK DPM for sienna_cichlid Support for FCLK DPM for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit fea905d471253c5ec7c774ab3eb41db08fab1456 Author: Likun Gao Date: Tue Feb 4 13:58:58 2020 +0800 drm/amd/powerplay: set SOCCLK DPM for sienna_cichlid Support for SOCCLK DPM for sienna_cichlid. Use feature mask to control DPM for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 9ad9c8acc80d8957f1459440fb25ac034dda75c7 Author: Likun Gao Date: Thu Feb 13 12:05:36 2020 +0800 drm/amd/powerplay: add support to set performance level for sienna_cichlid Support for performance level set for sienna_cichlid. Set standard performance level not fully support, will set to auto performance level. Set peak performance level not fully support, will do nothing with it. Force clk level only support for 2 level for fine grained DPM. Signed-off-by: Likun Gao Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit b455159c053130d0658e9e7f8cb61e9bf6603f22 Author: Likun Gao Date: Fri May 29 14:33:08 2020 -0400 drm/amdgpu/powerplay: add initial swSMU support for sienna_cichlid (v2) SMU11 based similar to navi1x. v2: squash in SMU IF updates Signed-off-by: Likun Gao Reviewed-by: Evan Quan Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 9a98676007d2033fc23878c1ff1aa47b8761740c Author: Likun Gao Date: Wed Aug 14 17:39:03 2019 +0800 drm/amdgpu: add virtual display support for sienna_cichlid Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 58139a42dc08651714daa2f027678c58e421fd3b Author: Likun Gao Date: Fri May 29 18:02:26 2020 -0400 drm/amdgpu/gfx10: change register configure for sienna_cichlid Update sienna_cichlid register configuration for sienna_cichlid to match the update of header files. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d682a353f37072632c8b51d2a5cd3f9374d749f4 Author: Likun Gao Date: Fri Aug 23 14:35:45 2019 +0800 drm/amdgpu: correct SDMA3 IH clinet id for sienna_cichlid Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 157e72e831cb8f323108b5df6d0b148aef9507fb Author: Likun Gao Date: Mon Jun 17 13:38:29 2019 +0800 drm/amdgpu: add sdma ip block for sienna_cichlid (v5) Sienna_Cichlid have 4 sdma controllers. v2: add missing license to sdma_common.h (Alex) v3: rebase (Alex) v4: squash in policy fix (Alex) v4: squash in fw_name fix Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 06ff634c0dae791c17ceeeb60c74e14470d76898 Author: Likun Gao Date: Mon Jun 17 13:14:58 2019 +0800 drm/amdgpu: add sdma2 and sdma3 irqsrc header files for sienna_cichlid (v2) Add irq src headers for additional SDMA blocks. v2: Add missing licenses (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 933c8a93e2416c615e45438a0e58a656aec5902f Author: Likun Gao Date: Fri May 1 10:21:23 2020 -0400 drm/amdgpu: add gfx ip block for sienna_cichlid (v3) Add support for GC 10.3. v2: Squash in gb_addr_config fix (Alex) v3: Add num_pkrs support (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 757b3af8ecb42414f39ea7996107e8e2b635d7d0 Author: Likun Gao Date: Sun Jun 16 22:37:56 2019 +0800 drm/amdgpu: add ih ip block for sienna_cichlid Update IH handling for sienna_cichlid Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0b3df16b5abc441e39a1ed087115c879dfe23fdf Author: Likun Gao Date: Sun Jun 16 22:34:59 2019 +0800 drm/amdgpu: add gmc ip block for sienna_cichlid Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit af01d47d3c22cb1b1f7f74e22595beeed956c9b5 Author: Likun Gao Date: Sun Jun 16 22:27:00 2019 +0800 drm/amdgpu: add support gfxhub for sienna_cichlid (v3) GFX10.3 is used for sienna_cichlid. v2: squash in BANK_SELECT and FRAGMENT_SIZE fixes (Alex) v3: squash in smallk update (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ffffb96d1165e8b6493ee368af1a5133ad7764aa Author: Likun Gao Date: Sun Jun 16 22:20:15 2019 +0800 drm/amdgpu: add support on mmhub for sienna_cichlid Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2e1ba10e927154842cd0b2e55761726fa9eb37ac Author: Likun Gao Date: Thu Apr 18 13:49:07 2019 +0800 drm/amdgpu/soc15: add common ip block for sienna_cichlid Add common ip block for sienna_cichlid. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit dccdbf3f969033383ac2fbbb64441d89e2de4113 Author: Likun Gao Date: Thu Nov 7 16:28:14 2019 +0800 drm/amdgpu: initialize IP offset for sienna_cichlid (v2) Add IP offset headers and state. V2: squash in updates (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 117910ed92b3ea5fa41c535fbb418b90e596adc3 Author: Likun Gao Date: Tue Mar 19 11:04:03 2019 +0800 drm/amdgpu/soc15: add support for sienna_cichlid Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2f7f522722ef620af0210ec98718d62c6c3e4de7 Author: Likun Gao Date: Tue Mar 19 11:00:26 2019 +0800 drm/amdgpu/gfx10: add clockgating support for sienna_cichlid Same as navi10. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 57d706026fabde9bf83d6f73f0679b7e48b24e3f Author: Likun Gao Date: Tue Mar 19 10:52:52 2019 +0800 drm/amdgpu/gmc10: add sienna_cichlid support Same as navi10. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6c06333073acf8b5cac4b11ecc7170ee98e9b8e7 Author: Likun Gao Date: Tue Mar 19 10:43:30 2019 +0800 drm/amdgpu/gfx10: add support for sienna_cichlid firmware Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 11e8aef52ef8543ed6c7e1bc391ab29c34736f33 Author: Likun Gao Date: Tue Mar 19 09:57:53 2019 +0800 drm/amdgpu: set asic family and ip blocks for sienna_cichlid Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d4f3c3905b526681daf0caea9d1a20b753a45398 Author: Likun Gao Date: Mon Mar 18 21:44:13 2019 +0800 drm/amdgpu: set fw load type for sienna_cichlid Same as Navi1x. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c0a43457dc1a48beae1e5deab7e82a57a5039516 Author: Likun Gao Date: Mon Mar 18 21:30:50 2019 +0800 drm/amdgpu: add sienna_cichlid gpu info firmware v2 gpu info fw contains chip specific parameters. v2: fix fw_name Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ccaf72d3c252a647e7bdd944d1d4fd0aa9adfe9e Author: Likun Gao Date: Mon Mar 18 21:15:25 2019 +0800 drm/amdgpu: add sienna_cichlid asic type Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 241b2ec9317ec9fdf6e26d2025a4aadb5d74859a Author: Jerry (Fangzhi) Zuo Date: Tue Mar 3 16:50:25 2020 -0500 drm/amd/display: Add dcn30 Headers (v2) DCN 3.0 display controller registers v2: squash in updates from Bhawan. Signed-off-by: Jerry (Fangzhi) Zuo Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher commit a5a2597771c3f53562cd200c67135835f945233c Author: Leo Liu Date: Tue Aug 13 10:01:47 2019 -0400 drm/amdgpu: add VCN3.0 register headers (v2) Sienna_Cichlid VCN headers v2: squash in updates (Alex) Signed-off-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit e54294d665f81da4005a1f616e4f040c0d696552 Author: Yong Zhao Date: Tue Sep 24 16:17:47 2019 -0400 drm/amdgpu: Add ATHUB 2.1 header files (v2) v2: squash in updates (Alex) Signed-off-by: Yong Zhao Signed-off-by: Alex Deucher commit b4ebd8717effe09e149b9f8d14eebd5d5754e163 Author: Likun Gao Date: Tue Mar 19 16:35:51 2019 +0800 drm/amdgpu: add GC 10.3 header files (v2) Add GC10.3 related header files. v2: squash in updates (Alex) Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6fb00d4e94bc28c39fa077b03e6531956de87802 Author: Manish Mandlik Date: Mon Jun 1 18:42:51 2020 -0700 Bluetooth: Check scan state before disabling during suspend Check current scan state by checking HCI_LE_SCAN flag and send scan disable command only if scan is already enabled. Signed-off-by: Manish Mandlik Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 8b80d74bdb2285d3022b349c8451eb16535f7906 Author: Rajneesh Bhardwaj Date: Sat Apr 25 01:01:12 2020 -0400 drm/amdgpu: restrict bo mapping within gpu address limits Have strict check on bo mapping since on some systems, such as A+A or hybrid, the cpu might support 5 level paging or can address memory above 48 bits but gpu might be limited by hardware to just use 48 bits. In general, this applies to all asics where this limitation can be checked against their max_pfn range. This restricts the range to map bo within pratical limits of cpu and gpu for shared virtual memory access. Reviewed-by: Oak Zeng Reviewed-by: Christian König Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit ba931cfd078778879ec51c6483577eb4645b70dd Author: Daniel Vetter Date: Tue Jun 2 11:51:40 2020 +0200 drm/hdlcd: Don't call drm_crtc_vblank_off on unbind This is already taken care of by drm_atomic_helper_shutdown(), and in that case only for the CRTC which are actually on. Only tricky bit here is that we kill the interrupt handling before we shut down crtc, so need to reorder that. Acked-by: Liviu Dudau Signed-off-by: Daniel Vetter Cc: Liviu Dudau Cc: Brian Starkey Link: https://patchwork.freedesktop.org/patch/msgid/20200602095140.36678-3-daniel.vetter@ffwll.ch commit 1c3ef4c5d13a0ba42610ce8c0e67f6909dbb70b3 Author: Daniel Vetter Date: Tue Jun 2 11:55:05 2020 +0200 drm/malidp: Don't call drm_crtc_vblank_off on unbind This is already done as part of the drm_atomic_helper_shutdown(), and in that case only for the crtc which are actually on. v2: I overlooked that malidp also needs to have it's interrupt shut down reordered. Acked-by: Liviu Dudau Signed-off-by: Daniel Vetter Cc: Liviu Dudau Cc: Brian Starkey Link: https://patchwork.freedesktop.org/patch/msgid/20200602095505.37509-1-daniel.vetter@ffwll.ch commit e2db55244e0ff2c03a864a49276754ad840e338f Author: Ville Syrjälä Date: Tue May 12 20:41:45 2020 +0300 drm/i915: Replace some hand rolled max()s Use max() instead of hand rolling it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200512174145.3186-8-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare commit f6adb5f061954f0f859e47117665554504f7ec80 Author: Ville Syrjälä Date: Tue May 12 20:41:43 2020 +0300 drm/i915: Reverse preemph vs. voltage swing preference The DP spec says: "When the combination of the requested pre-emphasis level and voltage swing exceeds the capability of a DPTX, the DPTX shall set the pre-emphasis level according to the request and use the highest voltage swing it can output with the given pre-emphasis level." and "When a DPTX reads a request beyond the limits of this Standard, the DPTX shall set the pre-emphasis level according to the request and set the highest voltage swing level it can output with the given pre-emphasis level. If a DPTX is requested for 9.5dB of pre-emphasis level (may be supported for a DPTX) and cannot support that level, it shall set the pre-emphasis level to the next highest level, 6dB." Ie. we should first validate the pre-emphasis, and then select the appropriate vswing for it. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200512174145.3186-6-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare commit 53de0a20c8cdfa4416a53818c822c68796e5f266 Author: Ville Syrjälä Date: Tue May 12 20:41:42 2020 +0300 drm/i915: Add {preemph,voltage}_max() vfuncs Different platforms have different max vswing/preemph settings. Turn that into a pair vfuncs so we can decouple intel_dp.c and intel_ddi.c further. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200512174145.3186-5-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare commit 33520eae45f1c97670c8de7adec1cb5ab6a94416 Author: Ville Syrjälä Date: Tue May 12 20:41:41 2020 +0300 drm/i915: Fix ivb cpu edp vswing According to the DP spec supporting vswing 1 + preemph 2 is mandatory. We don't have the hw settings for that though. In order to pretend to follow the DP spec let's just select vswing 0 + preemph 2 in this case (the DP spec says to use the requested preemph in preference to the vswing when the requested values aren't supported). Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200512174145.3186-4-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit da882e6bb968b04195c32072376c4206f64037ef Author: Ville Syrjälä Date: Tue May 12 20:41:40 2020 +0300 drm/i915: Fix ibx max vswing/preemph IBX supports vswing level 3 and pre-emphasis level 3. Don't limit it to level 2 for those. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200512174145.3186-3-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit d1d08a4994a8142e1c47ad28949035c507293b03 Author: Ville Syrjälä Date: Tue May 12 20:41:39 2020 +0300 drm/i915: Fix cpt/ppt max pre-emphasis cpt/ppt support pre-emphasis level 3. Let's actually declare support for it, instead of clamping things to level 2. Also tweak the if-ladder in intel_dp_voltage_max() to match intel_dp_pre_emphasis_max() to make it easier to compare them. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200512174145.3186-2-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit 26d3ac3cb04d171a861952e89324e347598a347f Author: Daniel Vetter Date: Mon May 11 11:35:52 2020 +0200 drm/shmem-helpers: Redirect mmap for imported dma-buf Currently this seems to work by converting the sgt into a pages array, and then treating it like a native object. Do the right thing and redirect mmap to the exporter. With this nothing is calling get_pages anymore on imported dma-buf, and we can start to remove the use of the ->pages array for that case. v2: Rebase Tested-by: Boris Brezillon Acked-by: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Rob Herring Cc: Noralf Trønnes Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200511093554.211493-8-daniel.vetter@ffwll.ch commit 0cc5fb4e87216320e5bc42603f735d666e101e43 Author: Daniel Vetter Date: Thu May 14 22:22:56 2020 +0200 drm/shmem-helpers: Don't call get/put_pages on imported dma-buf in vmap There's no direct harm, because for the shmem helpers these are noops on imported buffers. The trouble is in the locks these take - I want to change dma_buf_vmap locking, and so need to make sure that we only ever take certain locks on one side of the dma-buf interface: Either for exporters, or for importers. v2: Change the control flow less compared to what's there (Thomas) Tested-by: Boris Brezillon Cc: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Rob Herring Cc: Noralf Trønnes Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200514202256.490926-1-daniel.vetter@ffwll.ch commit 5a833995364141a3306e234500800277aea52334 Author: Chris Wilson Date: Tue Jun 2 23:09:53 2020 +0100 drm/i915: Drop i915_request.i915 backpointer We infrequently use the direct i915 backpointer from the i915_request, so do we really need to waste the space in the struct for it? 8 bytes from the most frequently allocated struct vs an 3 bytes and pointer chasing in using rq->engine->i915? Signed-off-by: Chris Wilson Reviewed-by: Akeem G Abodunrin Link: https://patchwork.freedesktop.org/patch/msgid/20200602220953.21178-1-chris@chris-wilson.co.uk commit 3a5a5971bc1fe34a9a24b59118db0b3a1f9c2902 Author: Daniel Vetter Date: Mon May 11 11:35:50 2020 +0200 drm/udl: Don't call get/put_pages on imported dma-buf There's no direct harm, because for the shmem helpers these are noops on imported buffers. The trouble is in the locks these take - I want to change dma_buf_vmap locking, and so need to make sure that we only ever take certain locks on one side of the dma-buf interface: Either for exporters, or for importers. Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Sean Paul Cc: Gerd Hoffmann Cc: Thomas Zimmermann Cc: Alex Deucher Cc: Daniel Vetter Cc: Thomas Gleixner Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200511093554.211493-6-daniel.vetter@ffwll.ch commit d323bb44e4d23802eb25d13de1f93f2335bd60d0 Author: Daniel Vetter Date: Mon May 11 11:35:49 2020 +0200 drm/virtio: Call the right shmem helpers drm_gem_shmem_get_sg_table is meant to implement obj->funcs->get_sg_table, for prime exporting. The one we want is drm_gem_shmem_get_pages_sgt, which also handles imported dma-buf, not just native objects. v2: Rebase, this stuff moved around in commit 2f2aa13724d56829d910b2fa8e80c502d388f106 Author: Gerd Hoffmann Date: Fri Feb 7 08:46:38 2020 +0100 drm/virtio: move virtio_gpu_mem_entry initialization to new function Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Cc: David Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Link: https://patchwork.freedesktop.org/patch/msgid/20200511093554.211493-5-daniel.vetter@ffwll.ch commit 0b638559aa1a1964446dbc25e652035469f93cc9 Author: Daniel Vetter Date: Mon May 11 11:35:48 2020 +0200 drm/doc: Some polish for shmem helpers - Move the shmem helper section to the drm-mm.rst file, next to the vram helpers. Makes a lot more sense there with the now wider scope. Also, that's where the all the other backing storage stuff resides. It's just the framebuffer helpers that should be in the kms helper section. - Try to clarify which functiosn are for implementing drm_gem_object_funcs, and which for drivers to call directly. At least one driver screwed that up a bit. Cc: Gerd Hoffmann Cc: Rob Herring Cc: Noralf Trønnes Reviewed-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200511093554.211493-4-daniel.vetter@ffwll.ch commit e0b3d2140ec6f04335eb20f4651ca2b705084268 Author: Daniel Vetter Date: Mon May 11 11:35:47 2020 +0200 drm/gem: WARN if drm_gem_get_pages is called on a private obj No real functional change, since this just converts an annoying Oops into a more harmless WARNING backtrace. It's still a driver bug. Acked-by: Thomas Zimmermann Tested-by: Boris Brezillon Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200511093554.211493-3-daniel.vetter@ffwll.ch commit 8b6b7d84bfce9a2a29e66147d7acafd0be9bb211 Author: Daniel Vetter Date: Thu May 14 22:11:17 2020 +0200 drm/msm: Don't call dma_buf_vunmap without _vmap I honestly don't exactly understand what's going on here, but the current code is wrong for sure: It calls dma_buf_vunmap without ever calling dma_buf_vmap. What I'm not sure about is whether the WARN_ON is correct: - msm imports dma-buf using drm_prime_sg_to_page_addr_arrays. Which is a pretty neat layering violation of how you shouldn't peek behind the curtain of the dma-buf exporter, but par for course. Note that all the nice new helpers don't (and we should probably have a bit a warning about this in the kerneldoc). - but then in the get_vaddr() in msm_gem.c, we seems to happily wrap a vmap() around any object with ->pages set (so including imported dma-buf). - I'm not seeing any guarantees that userspace can't use an imported dma-buf for e.g. MSM_SUBMIT_CMD_BUF in a5xx_submit_in_rb, so no guarantees that an imported dma-buf won't end up with a ->vaddr set. But even if that WARN_ON is wrong, cleaning up a vmap() done by msm by calling dma_buf_vunmap is the wrong thing to do. v2: Rob said in review that we do indeed have a gap in get_vaddr() that needs to be plugged. But the users I've found aren't legit users on imported dma-buf, so we can just reject that. Reviewed-by: Rob Clark Signed-off-by: Daniel Vetter Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20200514201117.465146-1-daniel.vetter@ffwll.ch commit 6783ebda63c53d477ee8707a6e14bb09d48680de Author: Chris Wilson Date: Wed Jun 3 11:46:57 2020 +0100 drm/i915/gt: Suppress the error message for GT init failure on error injection If we injected an error (such as pretending the GuC firmware was broken), then suppress the error message as it is expected and our CI complains if it sees any *ERROR*. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200603104657.25651-1-chris@chris-wilson.co.uk commit dbc7e72897a4e565a69b6d3533c87cfeec4a2831 Author: Chris Wilson Date: Tue Jun 2 16:48:39 2020 +0100 drm/i915/gt: Make the CTX_TIMESTAMP readable on !rcs For reasons that be, the HW only allows usersace to read its own CTX_TIMESTAMP [context local HW runtime] on rcs. Make it available for all by adding it to the whitelists. v2: The change took effect from Cometlake. Signed-off-by: Chris Wilson Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200602154839.6902-1-chris@chris-wilson.co.uk commit 5f4ae2704d59ee02b6e6d1a20e0ecfd273ae758c Author: Chris Wilson Date: Tue Jun 2 15:05:40 2020 +0100 drm/i915: Identify Cometlake platform Cometlake is a small refresh of Coffeelake, but since we have found out a difference in the plaforms, we need to identify them as separate platforms. Since we previously took Coffeelake/Cometlake as identical, update all IS_COFFEELAKE() to also include IS_COMETLAKE(). Signed-off-by: Chris Wilson Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200602140541.5481-1-chris@chris-wilson.co.uk commit c95ebab1c7c4c400bb2922b8e9d443747cd645b5 Author: Chris Wilson Date: Tue Jun 2 16:48:39 2020 +0100 drm/i915/selftests: Ignore autoincrementing timestamp on verfifying whitelists As a timestamp will automatically update itself, it will not hold only contexts we write into it, and will change from the baseline value making us suspect that our writes are landing. As this confuses us and we would need more careful treatment to detect invalid stores into the timestamp, skip it when verifying the whitelists. Signed-off-by: Chris Wilson Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200602154839.6902-1-chris@chris-wilson.co.uk commit 81a16241114ba4e0b188e517e5e8522951dfeb7b Author: Kent Russell Date: Mon Apr 27 09:28:04 2020 -0400 drm/amdgpu: Add unique_id and serial_number for Arcturus v3 Add support for unique_id and serial_number, as these are now the same value, and will be for future ASICs as well. v2: Explicitly create unique_id only for VG10/20/ARC v3: Change set_unique_id to get_unique_id for clarity Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit bce9ff0eacaf308a740206bcb69a9e473daf6ac9 Author: Kent Russell Date: Mon Apr 27 09:27:24 2020 -0400 drm/amdgpu: Add ReadSerial defines for Arcturus Add the ReadSerial definitions for Arcturus to the arcturus_ppsmc.h header for use with unique_id Unrevert: Supported in SMU 54.23, update values to match SMU spec Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9e69b1ee1d9e1d58244279e39f032658df8cead6 Author: Guchun Chen Date: Tue Jun 2 13:53:09 2020 +0800 drm/amdgpu: remove useless code in RAS Module parameter amdgpu_ras_mask has been involved in the calculation of ras support capability, so drop this redundant code. Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit 5e91160ac0b5cfbbaeb62cbff8b069262095f744 Author: Guchun Chen Date: Tue Jun 2 13:46:22 2020 +0800 drm/amdgpu: fix RAS memory leak in error case RAS context memory needs to freed in failure case. Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit fb414783b65c880606fbc1463e6849f017e60d46 Author: Matt Helsley Date: Fri May 29 14:01:14 2020 -0700 objtool: Add support for relocations without addends Currently objtool only collects information about relocations with addends. In recordmcount, which we are about to merge into objtool, some supported architectures do not use rela relocations. Signed-off-by: Matt Helsley Reviewed-by: Julien Thierry Reviewed-by: Kamalesh Babulal Signed-off-by: Josh Poimboeuf commit 5ef159681309621aa8fe06d94397b85b51974d55 Author: yangerkun Date: Mon Jun 1 17:16:16 2020 +0800 locks: add locks_move_blocks in posix_lock_inode We forget to call locks_move_blocks in posix_lock_inode when try to process same owner and different types. Signed-off-by: yangerkun Signed-off-by: Jeff Layton commit d161306161f8cae29e5672c4fd1c42cf7e9ae95a Author: Vivek Kasireddy Date: Fri May 22 13:26:30 2020 -0700 drm/i915/dsi: Dont forget to clean up the connector on error (v2) If an error is encountered during the DSI initialization setup, the drm connector object also needs to be cleaned up along with the encoder. The error can happen due to a missing mode in the VBT or for other reasons. v2: Rephrase the commit message to make it more clear. Cc: Jani Nikula Cc: Vandita Kulkarni Signed-off-by: Vivek Kasireddy Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200522202630.7604-1-vivek.kasireddy@intel.com commit db80066cf33c3a50abb2418beab9b042c6f9a44b Author: Jani Nikula Date: Tue Jun 2 00:55:10 2020 +0300 drm/i915/params: prevent changing module params runtime Only support runtime changes through the debugfs. i915.verbose_state_checks remains an exception, and is not exposed via debugfs. This depends on IGT having been updated to use the debugfs for modifying the parameters. Cc: Juha-Pekka Heikkilä Cc: Venkata Sandeep Dhanalakota Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200601215510.18379-3-jani.nikula@intel.com commit f322e851f20e534cf5305332a9ad5eefadb55d56 Author: Jani Nikula Date: Tue Jun 2 00:55:09 2020 +0300 drm/i915/params: fix i915.fake_lmem_start module param sysfs permissions fake_lmem_start does not need to be mutable via module param sysfs. It's only used during driver probe. Fixes: 1629224324b6 ("drm/i915/lmem: add the fake lmem region") Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson Reviewed-by: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200601215510.18379-2-jani.nikula@intel.com commit dbf4081ffb68c0d9b518a34c715a8d8681658411 Author: Jani Nikula Date: Tue Jun 2 00:55:08 2020 +0300 drm/i915/params: don't expose inject_probe_failure in debugfs The parameter only makes sense as a module parameter only. Fixes: c43c5a8818d4 ("drm/i915/params: add i915 parameters to debugfs") Cc: Juha-Pekka Heikkilä Cc: Venkata Sandeep Dhanalakota Reviewed-by: Juha-Pekka Heikkila Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200601215510.18379-1-jani.nikula@intel.com commit 4e408a720a0530ae880378cb5830e7e812fefa4b Author: Chris Wilson Date: Mon Jun 1 08:24:13 2020 +0100 drm/i915/gt: Move legacy context wa to intel_workarounds Use the central mechanism for recording and verifying that we restore the w/a for the older devices as well. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200601072446.19548-3-chris@chris-wilson.co.uk commit c1f8587870602274e1de97aca89361cf91bc12d2 Author: Chris Wilson Date: Mon Jun 1 08:24:12 2020 +0100 drm/i915/gt: Split low level gen2-7 CS emitters Pull the routines for writing CS packets out of intel_ring_submission into their own files. These are low level operations for building CS instructions, rather than the logic for filling the global ring buffer with requests, and we will want to reuse them outside of this context. Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200601072446.19548-2-chris@chris-wilson.co.uk commit f9496520df11de00fbafc3cbd693b9570d600ab3 Author: Chris Wilson Date: Mon Jun 1 17:19:42 2020 +0100 drm/i915: Whitelist context-local timestamp in the gen9 cmdparser Allow batch buffers to read their own _local_ cumulative HW runtime of their logical context. Fixes: 0f2f39758341 ("drm/i915: Add gen9 BCS cmdparsing") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: # v5.4+ Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200601161942.30854-1-chris@chris-wilson.co.uk commit 250a353cd85f2d0b06ca73bd20accbe58bea8d82 Author: José Roberto de Souza Date: Fri May 29 16:27:57 2020 -0700 drm/i915/tgl: Update TC DP vswing table Small updates in dkl_de_emphasis_control field. BSpec: 49292 Signed-off-by: José Roberto de Souza Reviewed-by: Khaled Almahallawy Link: https://patchwork.freedesktop.org/patch/msgid/20200529232757.37832-1-jose.souza@intel.com commit c48a798a74476877477d7597726308cc2c8e9e07 Author: Chris Wilson Date: Mon Jun 1 15:03:55 2020 +0100 drm/i915: Trim the ironlake+ irq handler Ever noticed that our interrupt handlers are where we spend most of our time on a busy system? In part this is unavoidable as each interrupt requires to poll and reset several registers, but we can try and do so as efficiently as possible. Function old new delta ilk_irq_handler 2317 2156 -161 v2: Restore the irqreturn_t ret Function old new delta ilk_irq_handler.cold 63 72 +9 ilk_irq_handler 2221 2080 -141 A slight improvement in the baseline overnight as well! Signed-off-by: Chris Wilson Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200601140355.20243-1-chris@chris-wilson.co.uk commit f1974222634010486c1692e843af0ab11304dd2c Author: Matt Helsley Date: Fri May 29 14:01:13 2020 -0700 objtool: Rename rela to reloc Before supporting additional relocation types rename the relevant types and functions from "rela" to "reloc". This work be done with the following regex: sed -e 's/struct rela/struct reloc/g' \ -e 's/\([_\*]\)rela\(s\{0,1\}\)/\1reloc\2/g' \ -e 's/tmprela\(s\{0,1\}\)/tmpreloc\1/g' \ -e 's/relasec/relocsec/g' \ -e 's/rela_list/reloc_list/g' \ -e 's/rela_hash/reloc_hash/g' \ -e 's/add_rela/add_reloc/g' \ -e 's/rela->/reloc->/g' \ -e '/rela[,\.]/{ s/\([^\.>]\)rela\([\.,]\)/\1reloc\2/g ; }' \ -e 's/rela =/reloc =/g' \ -e 's/relas =/relocs =/g' \ -e 's/relas\[/relocs[/g' \ -e 's/relaname =/relocname =/g' \ -e 's/= rela\;/= reloc\;/g' \ -e 's/= relas\;/= relocs\;/g' \ -e 's/= relaname\;/= relocname\;/g' \ -e 's/, rela)/, reloc)/g' \ -e 's/\([ @]\)rela\([ "]\)/\1reloc\2/g' \ -e 's/ rela$/ reloc/g' \ -e 's/, relaname/, relocname/g' \ -e 's/sec->rela/sec->reloc/g' \ -e 's/(\(!\{0,1\}\)rela/(\1reloc/g' \ -i \ arch.h \ arch/x86/decode.c \ check.c \ check.h \ elf.c \ elf.h \ orc_gen.c \ special.c Notable exceptions which complicate the regex include gelf_* library calls and standard/expected section names which still use "rela" because they encode the type of relocation expected. Also, keep "rela" in the struct because it encodes a specific type of relocation we currently expect. It will eventually turn into a member of an anonymous union when a susequent patch adds implicit addend, or "rel", relocation support. Signed-off-by: Matt Helsley Signed-off-by: Josh Poimboeuf commit f8c86ffa2800adc80adc679c84c45e0c6b027374 Author: Ville Syrjälä Date: Wed May 27 23:02:45 2020 +0300 drm/i915: Fix global state use-after-frees with a refcount While the current locking/serialization of the global state suffices for protecting the obj->state access and the actual hardware reprogramming, we do have a problem with accessing the old/new states during nonblocking commits. The state computation and swap will be protected by the crtc locks, but the commit_tails can finish out of order, thus also causing the atomic states to be cleaned up out of order. This would mean the commit that started first but finished last has had its new state freed as the no-longer-needed old state by the other commit. To fix this let's just refcount the states. obj->state amounts to one reference, and the intel_atomic_state holds extra references to both its new and old global obj states. Fixes: 0ef1905ecf2e ("drm/i915: Introduce better global state handling") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200527200245.13184-1-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit e954f77f6330028ced7bac4ad22ea69ed64e5725 Author: Simon Ser Date: Thu May 21 11:09:31 2020 +0000 drm: add docs for standard CRTC properties This patch adds docs for the ACTIVE and MODE_ID CRTC properties. Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Ville Syrjala Cc: Pekka Paalanen Cc: Michel Dänzer Cc: Daniel Stone Reviewed-by: Pekka Paalanen Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/k52vYFBQ5ZO18TgZl3W8MgP6f4qu5Ncir7w-On8Dm0V2KTAcVkUoS7-IGPcvDJAXLsyJAUsD0QFJts3Dy0yWyHXVh85axrZkybh3MGGFhQc=@emersion.fr commit 720815247395480ac0d04948fc9ab6282b3291b9 Author: Joe Perches Date: Mon May 4 16:29:00 2020 -0700 video: fbdev: Use IS_BUILTIN IS_BUILTIN can be use to replace various initializations like #if CONFIG_ int val = 1; #else int val = 0; #endif so do so. Signed-off-by: Joe Perches Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/b1cf967015c5beafa475aaa30d8e21a58caff870.camel@perches.com commit f35b1d6c21b414e960ae3a9f1164fc691e1c3ab2 Author: Tiezhu Yang Date: Mon May 25 15:11:45 2020 +0800 video: fbdev: pxafb: Use correct return value for pxafb_probe() When call function devm_platform_ioremap_resource(), we should use IS_ERR() to check the return value and return PTR_ERR() if failed. Signed-off-by: Tiezhu Yang Cc: Xuefeng Li Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/1590390705-22898-1-git-send-email-yangtiezhu@loongson.cn commit 499a2c41b954518c372873202d5e7714e22010c4 Author: Christophe JAILLET Date: Wed Apr 29 10:45:05 2020 +0200 video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call 'dma_alloc_coherent()' must be balanced by a call to 'dma_free_coherent()' not 'dma_free_wc()'. The correct dma_free_ function is already used in the error handling path of the probe function. Fixes: 77e196752bdd ("[ARM] pxafb: allow video memory size to be configurable") Signed-off-by: Christophe JAILLET Cc: Sumit Semwal Cc: Rafael J. Wysocki Cc: Jonathan Corbet Cc: Viresh Kumar Cc: Jani Nikula cc: Mauro Carvalho Chehab Cc: Eric Miao Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200429084505.108897-1-christophe.jaillet@wanadoo.fr commit d43be2554b58621a21cb5f54b32db2263b3008b6 Author: Bernard Zhao Date: Mon Apr 27 01:05:23 2020 -0700 drivers: video: hdmi: cleanup coding style in video a bit Eliminate the magic numbers, add vendor infoframe size macro like other hdmi modules. Signed-off-by: Bernard Zhao Cc: Uma Shankar Cc: Ville Syrjala Cc: Shashank Sharma Cc: Laurent Pinchart Cc: Daniel Vetter Cc: opensource.kernel@vivo.com [b.zolnierkie: add "hdmi" to the patch summary] [b.zolnierkie: fix "vender" -> vendor" typo in the patch description] Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200427080530.3234-1-bernard@vivo.com commit fd4b8243877250c05bb24af7fea5567110c9720b Author: Dejin Zheng Date: Fri Apr 24 00:42:51 2020 +0800 console: newport_con: fix an issue about leak related system resources A call of the function do_take_over_console() can fail here. The corresponding system resources were not released then. Thus add a call of iounmap() and release_mem_region() together with the check of a failure predicate. and also add release_mem_region() on device removal. Fixes: e86bb8acc0fdc ("[PATCH] VT binding: Make newport_con support binding") Suggested-by: Bartlomiej Zolnierkiewicz Signed-off-by: Dejin Zheng Reviewed-by: Andy Shevchenko Cc: Greg Kroah-Hartman cc: Thomas Gleixner Cc: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200423164251.3349-1-zhengdejin5@gmail.com commit 98bd4f72988646c35569e1e838c0ab80d06c77f6 Author: Dejin Zheng Date: Thu Apr 23 00:07:19 2020 +0800 video: fbdev: sm712fb: fix an issue about iounmap for a wrong address the sfb->fb->screen_base is not save the value get by iounmap() when the chip id is 0x720. so iounmap() for address sfb->fb->screen_base is not right. Fixes: 1461d6672864854 ("staging: sm7xxfb: merge sm712fb with fbdev") Cc: Andy Shevchenko Cc: Sudip Mukherjee Cc: Teddy Wang Cc: Greg Kroah-Hartman Signed-off-by: Dejin Zheng Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200422160719.27763-1-zhengdejin5@gmail.com commit 190070ae4c87f68f3d901c9c28985b3a1f9843af Author: Jason Yan Date: Wed Apr 22 15:19:03 2020 +0800 omapfb/dss: fix comparison to bool warning Fix the following coccicheck warning: drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c:461:15-32: WARNING: Comparison to bool drivers/video/fbdev/omap2/omapfb/dss/dispc.c:891:5-35: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Jason Yan Reviewed-by: Tomi Valkeinen Cc: Andrew F. Davis Signed-off-by: Bartlomiej Zolnierkiewicz Link: https://patchwork.freedesktop.org/patch/msgid/20200422071903.637-1-yanaijie@huawei.com commit 03c10f472ae931e0d28c90f70e22aa5efeaa8183 Author: Chris Wilson Date: Mon Jun 1 08:24:23 2020 +0100 drm/i915: Relinquish forcewake immediately after manual grouping Our forcewake utilisation is split into categories: automatic and manual. Around bare register reads, we look up the right forcewake domain and automatically acquire and release [upon a timer] the forcewake domain. For other access, where we know we require the forcewake across a group of register reads, we manually acquire the forcewake domain and release it at the end. Again, this currently arms the domain timer for a later release. However, looking at some energy utilisation profiles, we have tried to avoid using forcewake [and rely on the natural wake up to post register updates] due to that even keep the fw active for a brief period contributes to a significant power draw [i.e. when the gpu is sleeping with rc6 at high clocks]. But as it turns out, not posting the writes immediately also has unintended consequences, such as not reducing the clocks and so conserving power while busy. As a compromise, let us only arm the domain timer for automatic forcewake usage around bare register access, but immediately release the forcewake when manually acquired by intel_uncore_forcewake_get/_put. The corollary to this is that we may instead have to take forcewake more often, and so incur a latency penalty in doing so. For Sandybridge this was significant, and even on the latest machines, taking forcewake at interrupt frequency is a huge impact. [So we don't do that anymore! Hopefully, this will spare us from still needing the mitigation of the timer for steady state execution.] Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200601072446.19548-13-chris@chris-wilson.co.uk commit 0b0b25490a61a510fc0afc8421a3398f78784969 Author: Chris Wilson Date: Mon Jun 1 08:24:11 2020 +0100 drm/i915: Handle very early engine initialisation failure If we fail during engine setup, we may leave some engines not yet setup. During the error cleanup, we have to be careful not to try and use the uninitialise engines before discarding them. [ 16.136152] RIP: 0010:__flush_work+0x198/0x1b0 [ 16.136168] Code: ff ff 8b 0b 48 8b 53 08 83 e1 08 48 0f ba 2b 03 80 c9 f0 e9 63 ff ff ff 0f 0b 48 83 c4 48 44 89 f0 5b 5d 41 5c 41 5d 41 5e c3 <0f> 0b 45 31 f6 e9 62 ff ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 0f [ 16.136186] RSP: 0018:ffffc900003bb928 EFLAGS: 00010246 [ 16.136201] RAX: 0000000000000000 RBX: ffff88844f392168 RCX: 0000000000000000 [ 16.136216] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88844f392168 [ 16.136231] RBP: ffff88844f392130 R08: 0000000000000000 R09: 0000000000000001 [ 16.136246] R10: ffff888441e31e40 R11: ffff88845e329c70 R12: ffff88844f796988 [ 16.136261] R13: ffff888441e4fb80 R14: 0000000000000001 R15: ffff88844f790000 [ 16.136388] FS: 00007fecbd208880(0000) GS:ffff88845e380000(0000) knlGS:0000000000000000 [ 16.136405] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.136420] CR2: 00007ff3ce748f90 CR3: 0000000457a6a001 CR4: 00000000000606e0 [ 16.136437] Call Trace: [ 16.136456] ? try_to_del_timer_sync+0x3a/0x50 [ 16.136529] intel_wakeref_wait_for_idle+0x87/0xb0 [i915] [ 16.136606] ? intel_engines_release+0x68/0xc0 [i915] [ 16.136680] intel_engines_release+0x49/0xc0 [i915] [ 16.136757] intel_gt_init+0x2f4/0x5e0 [i915] Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200601072446.19548-1-chris@chris-wilson.co.uk commit a0196dd686a292248507aaa78e95e6dc5f2eaaaa Author: Kishore Kadiyala Date: Mon Jun 1 13:05:44 2020 +0530 drm/i915: Add Plane color encoding support for YCBCR_BT2020 Currently the plane property doesn't have support for YCBCR_BT2020, which enables the corresponding color conversion mode on plane CSC. Enabling the plane property for the planes for GLK & ICL+ platforms. Also as per spec, update the Plane Color CSC from YUV601_TO_RGB709 to YUV601_TO_RGB601. V2: Enabling support for YCBCT_BT2020 for HDR planes on platforms GLK & ICL V3: Refined the condition check to handle GLK & ICL+ HDR planes Also added BT2020 handling in glk_plane_color_ctl. V4: Combine If-else into single If V5: Drop the checking for HDR planes and enable YCBCR_BT2020 for platforms GLK & ICL+. V6: As per Spec, update PLANE_COLOR_CSC_MODE_YUV601_TO_RGB709 to PLANE_COLOR_CSC_MODE_YUV601_TO_RGB601 as per Ville's feedback. V7: Rebased Cc: Ville Syrjala Cc: Jani Nikula Reviewed-by: Uma Shankar Signed-off-by: Kishore Kadiyala Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20200601073544.11291-1-kishore.kadiyala@intel.com commit 1e3e4cae75cd21bdb8d67ac5a3848ea2d0f84cc6 Author: Simon Ser Date: Mon May 18 14:22:28 2020 +0000 drm: DPMS is no longer the only mutable connector prop There are a bunch of other writable connector properties now. Signed-off-by: Simon Ser Cc: Daniel Vetter Cc: Ville Syrjala Cc: Pekka Paalanen Cc: Michel Dänzer Reviewed-by: Daniel Vetter Reviewed-by: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/msgid/vrfq3PQ_YaPv75xE6-4QeyyLkevKNLpQo8JgnX6EnEcYaFRXxSg98QECUOmHe_eMirwPB0qNRXHE_jzEkXDb3J3YS2OuZXAZgJFnNMLm6W4=@emersion.fr commit 00eb0cb36fad53315047af12e83c643d3a2c2e49 Author: Pali Rohár Date: Wed Jun 3 10:22:29 2020 +0200 btmrvl: Fix firmware filename for sd8997 chipset Firmware for sd8997 chipset is distributed by Marvell package and also as part of the linux-firmware repository in filename sdsd8997_combo_v4.bin. This patch fixes mwifiex driver to load correct firmware file for sd8997. Fixes: f0ef67485f591 ("Bluetooth: btmrvl: add sd8997 chipset support") Signed-off-by: Pali Rohár Acked-by: Ganapathi Bhat Signed-off-by: Marcel Holtmann commit dbec3af5f13b88a96e31f252957ae1a82484a923 Author: Pali Rohár Date: Wed Jun 3 10:22:28 2020 +0200 btmrvl: Fix firmware filename for sd8977 chipset Firmware for sd8977 chipset is distributed by Marvell package and also as part of the linux-firmware repository in filename sdsd8977_combo_v2.bin. This patch fixes mwifiex driver to load correct firmware file for sd8977. Fixes: 8c57983bf7a79 ("Bluetooth: btmrvl: add support for sd8977 chipset") Signed-off-by: Pali Rohár Acked-by: Ganapathi Bhat Signed-off-by: Marcel Holtmann commit 2e1fcac52a9ea53e5a13a585d48a29a0fb4a9daf Author: Pali Rohár Date: Wed Jun 3 10:22:27 2020 +0200 mwifiex: Fix firmware filename for sd8997 chipset Firmware for sd8997 chipset is distributed by Marvell package and also as part of the linux-firmware repository in filename sdsd8997_combo_v4.bin. This patch fixes mwifiex driver to load correct firmware file for sd8997. Fixes: 6d85ef00d9dfe ("mwifiex: add support for 8997 chipset") Signed-off-by: Pali Rohár Acked-by: Ganapathi Bhat Signed-off-by: Marcel Holtmann commit 47fd3ee25e13cc5add48ba2ed71f7ee964b9c3a4 Author: Pali Rohár Date: Wed Jun 3 10:22:26 2020 +0200 mwifiex: Fix firmware filename for sd8977 chipset Firmware for sd8977 chipset is distributed by Marvell package and also as part of the linux-firmware repository in filename sdsd8977_combo_v2.bin. This patch fixes mwifiex driver to load correct firmware file for sd8977. Fixes: 1a0f547831dce ("mwifiex: add support for sd8977 chipset") Signed-off-by: Pali Rohár Acked-by: Ganapathi Bhat Signed-off-by: Marcel Holtmann commit 84be242dae81b36a4c696d8e7734f54d359e5cf3 Author: John Hubbard Date: Thu May 21 21:15:06 2020 -0700 video: fbdev: convert get_user_pages() --> pin_user_pages() This code was using get_user_pages*(), in a "Case 2" scenario (DMA/RDMA), using the categorization from [1]. That means that it's time to convert the get_user_pages*() + put_page() calls to pin_user_pages*() + unpin_user_pages() calls. There is some helpful background in [2]: basically, this is a small part of fixing a long-standing disconnect between pinning pages, and file systems' use of those pages. [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ Cc: Bartlomiej Zolnierkiewicz Cc: Arnd Bergmann Cc: Daniel Vetter Cc: Gustavo A. R. Silva Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: John Hubbard Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200522041506.39638-3-jhubbard@nvidia.com commit e2e1c7bda4445363027a4ceed1cc3a8ccc2472a9 Author: John Hubbard Date: Thu May 21 21:15:05 2020 -0700 video: fbdev: fix error handling for get_user_pages_fast() Dealing with the return value of get_user_pages*() variants has a few classic pitfalls, and this driver found one of them: the return value might be zero, positive, or -errno. And if positive, it might be fewer pages than were requested. And if fewer pages than requested, then the caller should return (via put_page()) the pages that *were* pinned. This driver was doing that *except* that it had a problem with the -errno case, which was being stored in an unsigned int, and which would case an interesting mess if it ever happened: nr_pages would be interpreted as a spectacularly huge unsigned value, rather than a small negative value. Also, it was unnecessarily overriding a potentially informative -errno, with -EINVAL, in some cases. Instead: clamp the nr_pages to zero or positive, so that the error handling works. And return the -errno value from get_user_pages*(), unchanged, if we get one. And explain this with comments, seeing as how it is error-prone. Cc: Bartlomiej Zolnierkiewicz Cc: Arnd Bergmann Cc: Daniel Vetter Cc: Gustavo A. R. Silva Cc: Jani Nikula Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: John Hubbard Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200522041506.39638-2-jhubbard@nvidia.com commit 5a4784f49b2dcfff888f0ac97b981224c57c55fc Author: Sam Ravnborg Date: Sat May 23 09:12:24 2020 +0200 drm/vblank: use drm_WARN for all warnings Replace all the WARN_* variants with their drm_WARN counterparts. Signed-off-by: Sam Ravnborg Reviewed-by: Thomas Zimmermann Cc: Lyude Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200523071224.1716837-3-sam@ravnborg.org commit 02149a76d32bd8f5cbb4a802851724044396d6db Author: Sam Ravnborg Date: Sat May 23 09:12:23 2020 +0200 drm/vblank: use drm_* functions for logging Replace all DRM_* logging functions with their drm_ counterparts. checkpatch emits a few "quoted string split across lines", which is left as is. The strings was already split in the original code base and it would not increase readability to fix them. v2: - added braces to if statement (Thomas) Signed-off-by: Sam Ravnborg Reviewed-by: Thomas Zimmermann Cc: Lyude Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200523071224.1716837-2-sam@ravnborg.org commit 7da156407615eeaf049c175a6bf2aa58e50d34ef Author: Sidong Yang Date: Fri May 29 02:21:59 2020 +0900 Documentation: Fix typo error in todo.rst Change wrong function name drm_modest_lock_all() to drm_modeset_lock_all() Signed-off-by: Sidong Yang Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200528172159.24641-1-realwakka@gmail.com commit 7d192daa73d9f377fadd2f8ac78146b41685b789 Author: Chris Wilson Date: Fri May 29 19:32:04 2020 +0100 drm/i915/gem: Give each object class a friendly name Name the object classes and their offspring for easier lockdep debugging. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200529183204.16850-2-chris@chris-wilson.co.uk commit ee3fab5b32c0ac81f03d5af0f9646d1741169da5 Author: Chris Wilson Date: Fri May 29 19:32:03 2020 +0100 drm/i915/gem: Taint all shrinkable object locks If we declare that an object type is shrinkable (any that we can reclaim to recover system pages), make sure we taint the object mutex so that lockdep expects us to use it within fs_reclaim. lockdep will then complain the first time we try to allocate while holding the plain mutex, as doing so invites potential recursion. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200529183204.16850-1-chris@chris-wilson.co.uk commit 3f03b64981723b61048ea46642bcaa9b518f3ad3 Author: Andy Shevchenko Date: Mon May 18 22:36:17 2020 +0300 auxdisplay: charlcd: Reuse hex_to_bin() instead of custom code hex_to_bin() may be used to convert hexdecimal digit to its binary representation. Signed-off-by: Andy Shevchenko Signed-off-by: Miguel Ojeda commit d43f7ff69c867d943230fe7ac9352ebb9806df35 Author: Alex Deucher Date: Thu May 28 09:43:54 2020 -0400 drm/amdgpu/fru: fix header guard and include header Fix the fru eeprom header guard and include it in the .c file. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 3967ae6d790887e72c55e5281094884c4f38ba88 Author: Alex Deucher Date: Thu May 28 17:28:17 2020 -0400 drm/amdgpu/nv: enable init reset check gpu reset is implemented for navi so we can enable this. Reviewed-by: Hawking Zhang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 337b72444e59775f9656bdd08d82d863ab10ae6c Author: Alex Deucher Date: Thu May 28 17:23:18 2020 -0400 drm/amdgpu/nv: remove some dead code navi never supported the pci config reset. Neither did vega. Reviewed-by: Hawking Zhang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 007026cd733dc987330110e30f69a0ff9aaa8a06 Author: Alex Deucher Date: Thu May 28 17:21:38 2020 -0400 drm/amdgpu/nv: allow access to SDMA status registers For access via ioctl for tools like umr and mesa. Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit c1cf79ca5ced46ea6a7843cbe98836e4d51c6c52 Author: Alex Deucher Date: Thu May 28 17:12:53 2020 -0400 drm/amdgpu: use IP discovery table for renoir Rather than relying on gpu info firmware. Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 4292b0b2026bc10bced32636ea02dd8eed00cea9 Author: Alex Deucher Date: Thu May 28 17:06:59 2020 -0400 drm/amdgpu: clean up discovery testing Rather than checking of the variable is enabled and the chip is the right family check for the presence of the discovery table. Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 258620d0b36f5aae7f32099f05817206bd4ae0d1 Author: Alex Deucher Date: Thu May 28 16:57:27 2020 -0400 drm/amdgpu: skip gpu_info firmware if discovery info is available The GPU info firmware is only applicable at bring up when the IP discovery table is not present. If it's available, use that first and then fallback to parsing the gpu info firmware. Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 22f1e0e8e48757daab52290f762ce4b67de349a0 Author: Evan Quan Date: Tue May 26 17:06:04 2020 +0800 drm/amd/powerplay: give better names for the thermal IRQ related APIs Thermal control is performed by PMFW. What handled in driver is just whether or not to enable the alert(to driver). Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit be80b431fadcc2eb0922921befecb7fdb16020c2 Author: Evan Quan Date: Tue May 26 16:54:22 2020 +0800 drm/amd/powerplay: use the common APIs for IRQ disablement/enablement Also the new logics for MP1 SW IRQs disablement/enablement are added. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4f1fad0e9dbd762497df7c79309697ed8b2b6cfc Author: Evan Quan Date: Tue May 26 16:50:55 2020 +0800 drm/amd/powerplay: stop thermal IRQs on suspend Added missing thermal IRQs disablement on suspend. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b265bdbd9f2811c2a674ea9d1161de821923897c Author: Evan Quan Date: Fri May 22 18:57:11 2020 +0800 drm/amdgpu: added a sysfs interface for thermal throttling related V4 User can check and set the enablement of throttling logging and the interval between each logging. V2: simplify the sysfs interface(no string parsing) V3: add proper lock protection on updating throttling_logging_rs.interval V4: documentation cosmetic per Luben's suggestion Signed-off-by: Evan Quan Reviewed-by: Christian König Reviewed-by: Luben Tuikov Signed-off-by: Alex Deucher commit bcdc7c05bd2dd8fa8afbd725110d5ec3075d4b42 Author: Evan Quan Date: Fri May 22 15:42:40 2020 +0800 drm/amd/powerplay: enable thermal throttling logging support V2 Currently this feature is supported on Arcturus only. PMFW will interrupt driver the first time when thermal throttling happened and every one second afterwards if the throttling continuing. On receiving the 1st interrupt, driver logs it the first time. However, if the throttling continues, the logging will be performed every minute to avoid log flooding. V2: simplify the implemention by ratelimited printk Signed-off-by: Evan Quan Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 8c0bba64795fdfa89299aa160887ef3ff85c77d2 Author: Evan Quan Date: Thu May 21 12:36:44 2020 +0800 drm/amd/powerplay: implement ASIC specific thermal throttling logging Enable this for Arcturus only for now. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit aace2a561f17a8d30b3f02fe81415dcd02cc0f29 Author: Evan Quan Date: Thu May 21 11:50:44 2020 +0800 drm/amd/powerplay: update Arcturus smu-driver headers To fit the latest 54.24.0 PMFW. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit d559aba808171ba6633b600460d96933a3399a39 Author: Evan Quan Date: Tue May 12 19:06:37 2020 +0800 drm/amd/powerplay: ack the SMUToHost interrupt on receive V2 There will be no further interrupt without proper ack for current one. V2: fix typo to really set ACK bit only Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2652bda7b4f732e4b2cef82fa7476a7d4b648409 Author: Colin Ian King Date: Thu May 28 23:24:53 2020 +0100 drm/amdkfd: fix a dereference of pdd before it is null checked Currently pointer pdd is being dereferenced when assigning pointer dpm and then pdd is being null checked. Fix this by checking if pdd is null before the dereference of pdd occurs. Addresses-Coverity: ("Dereference before null check") Fixes: 32cb59f31362 ("drm/amdkfd: Track SDMA utilization per process") Signed-off-by: Colin Ian King Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 48b270bb22dbe27f122ed9b310f23a20d2f39228 Author: Alex Deucher Date: Sun May 24 02:46:53 2020 -0400 drm/amdgpu/pm: return an error during GPU reset or suspend (v2) Return an error for sysfs and debugfs power interfaces during gpu reset and suspend. Prevents access to the hw while it may be in an unusable state. v2: squash in fix to drop suspend check Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit b55230e5e800868961fc271b26d9ce53ae1f691e Author: Chris Wilson Date: Fri May 29 15:39:26 2020 +0100 drm/i915: Check for awaits on still currently executing requests With the advent of preempt-to-busy, a request may still be on the GPU as we unwind. And in the case of a unpreemptible [due to HW] request, that request will remain indefinitely on the GPU even though we have returned it back to our submission queue, and cleared the active bit. We only run the execution callbacks on transferring the request from our submission queue to the execution queue, but if this is a bonded request that the HW is waiting for, we will not submit it (as we wait for a fresh execution) even though it is still being executed. As we know that there are always preemption points between requests, we know that only the currently executing request may be still active even though we have cleared the flag. However, we do not precisely know which request is in ELSP[0] due to a delay in processing events, and furthermore we only store the last request in a context in our state tracker. Fixes: 22b7a426bbe1 ("drm/i915/execlists: Preempt-to-busy") Testcase: igt/gem_exec_balancer/bonded-dual Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200529143926.3245-1-chris@chris-wilson.co.uk commit 98b7067a17ba745fb6dac9669e26bae1960d283c Author: Chris Wilson Date: Fri May 29 09:58:08 2020 +0100 drm/i915: Add a few asserts around handling of i915_request_is_active() Let's assert that we only call the execute callbacks on making the request active, and that we do not execute the request without calling the callbacks. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200529085809.23691-1-chris@chris-wilson.co.uk commit a227569d1f04da3ff4a07fd75c5a86c0ce92a7b9 Author: Ville Syrjälä Date: Wed Apr 29 13:39:36 2020 +0300 drm/i915: Replace I915_MODE_FLAG_INHERITED with a boolean There's no reason for I915_MODE_FLAG_INHERITED to exist as a flag anymore. Just make it a boolean. v2: Deal with sanitize_watermarks() CC: Sam Ravnborg Cc: Daniel Vetter Cc: Emil Velikov Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200429103936.11850-1-ville.syrjala@linux.intel.com commit af157b7611a21a33a5cd5b3065c6776f73ea91f9 Author: Ville Syrjälä Date: Wed Apr 29 13:39:04 2020 +0300 drm/i915: Stop using mode->private_flags Replace the use of mode->private_flags with a truly private bitmaks in our own crtc state. We also need a copy in the crtc itself so the vblank code can get at it. We already have scanline_offset in there for a similar reason, as well as the vblank->hwmode which is assigned via drm_calc_timestamping_constants(). Fortunately we now have a nice place for doing the crtc_state->crtc copy in intel_crtc_update_active_timings() which gets called both for modesets and init/resume readout. The one slightly iffy spot is the INHERITED flag which we want to preserve until userspace/fb_helper does the first proper commit after actually calling .detecti() on the connectors. Otherwise we don't have the full sink capabilities (audio,infoframes,etc.) when .compute_config() gets called and thus we will fail to enable those features when the first userspace commit happens. The only internal commit we do prior to that should be from intel_initial_commit() and there we can simply preserve the INHERITED flag from the readout. v2: Deal with INHERITED in sanitize_watermarks() as well CC: Sam Ravnborg Cc: Daniel Vetter Cc: Emil Velikov Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200429103904.11727-1-ville.syrjala@linux.intel.com commit 6015002ece38dac85a373f041e0302781de7474b Author: Daniel Vetter Date: Wed May 27 13:11:34 2020 +0200 drm: use drm_dev_has_vblank more For historical reasons it's called dev->num_crtcs, which is rather confusing ever since kms was added. But now we have a nice helper, so let's use it for better readability! Only code change is in atomic helpers: vblank support means that dev->irq_enabled must be set too. Another one of these quirky things ... But since it's implied we can simplify that check. Reviewed-by: Thomas Zimmermann Acked-by: Sam Ravnborg Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200527111134.1571781-1-daniel.vetter@ffwll.ch commit 5de14398b6611af89a253f3fa13c20a92d53a513 Author: Jonathan McDowell Date: Mon May 18 19:10:14 2020 +0100 ARM: dts: qcom: Add MikroTik RB3011 This patch adds a DTS file for the MikroTik RouterBoard 3011, which is a 1U rackmount router based on the IPQ8064, supporting the serial UART, dual QCA8337 Gigabit ethernet switches, boot loader NOR and user LED device. Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/75390e66c9e6e36ddd42dc7f54cac28dfd7a24b9.1589824955.git.noodles@earth.li Signed-off-by: Bjorn Andersson commit 6acd6ad562067e6c621c346e0134131bdb3b1080 Author: Jonathan McDowell Date: Mon May 18 19:09:49 2020 +0100 ARM: dts: qcom: add ethernet definitions to ipq8064 Plumb in the 4 IPQ8064 stmmac based ethernet interfaces. Signed-off-by: Jonathan McDowell Link: https://lore.kernel.org/r/723344332357b5eed957443ec4a705a080fcc2da.1589824955.git.noodles@earth.li Signed-off-by: Bjorn Andersson commit 2010b7f0a8521fa7463056c8f077277a33a45c5f Author: Chris Wilson Date: Thu May 28 21:57:27 2020 +0100 drm/i915/gt: Start timeslice on partial submission We may choose to only submit ELSP[0], even though we have sufficient requests to fill the whole ELSP. Normally, we only start timeslicing if we fill more than one port, but in this case we need to start timeslicing for the queue that we choose not to submit. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200528205727.20309-1-chris@chris-wilson.co.uk commit ec6837591f99245b061d82571331160285306b7a Author: Alex Deucher Date: Fri May 22 18:14:32 2020 -0400 drm/amdgpu/gmc10: program the smallK fragment size Explicitly set the smallk size to 0 (4k). This is the hw default, but set it anyway just in case something else changed it. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2a12c4e9f1674432fa06f73026158a7b4698a0b4 Author: Harry Wentland Date: Thu May 28 09:44:44 2020 -0400 Revert "drm/amd/display: disable dcn20 abm feature for bring up" This reverts commit 96cb7cf13d8530099c256c053648ad576588c387. This change was used for DCN2 bringup and is no longer desired. In fact it breaks backlight on DCN2 systems. Cc: Alexander Monakov Cc: Hersen Wu Cc: Anthony Koo Cc: Michael Chiu Signed-off-by: Harry Wentland Acked-by: Alex Deucher Reviewed-by: Nicholas Kazlauskas Reported-and-tested-by: Alexander Monakov Signed-off-by: Alex Deucher commit 83a13ef5902aeedbd84ab282c835059c2cae5783 Author: Felix Kuehling Date: Fri May 22 15:57:51 2020 -0400 drm/amdkfd: Fix GCC 10 compiler warning GCC 10 was complaining about how we append data to a buffer using snprintf: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c: In function ‘perf_show’: drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_topology.c:214:3: warning: ‘snprintf’ argument 4 overlaps destination object ‘buf’ [-Wrestrict] 214 | snprintf(buffer, PAGE_SIZE, "%s"fmt, buffer, __VA_ARGS__) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This patch fixes the warnings and makes the sysfs code more efficient by remembering the offset in the buffer between append operations. Signed-off-by: Felix Kuehling Acked-by: Aaron Liu Tested-by: Aaron Liu Reviewed-by: Amber Lin Signed-off-by: Alex Deucher commit b0f8a6d5ef0e5d37176e4ce8e297bfffb7438503 Author: Gavin Wan Date: Thu May 21 19:35:28 2020 +0000 drm/amd/amdgpu: Fix the CGCG setting is overwritten for SRIOV. For SRIOV, since the CP_INT_CNTL_RING0 is programed on host side. The Guest should not program CP_INT_CNTL_RING0 again. Signed-off-by: Gavin Wan Reviewed-by: Monk Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 49d2a388bf9b9fe6c881e22162e335ce17869f51 Author: Aric Cyr Date: Tue May 19 12:35:07 2020 -0400 drm/amd/display: 3.2.87 Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit d294353e7ea815ad000f755419fd0cec01f01245 Author: Alvin Lee Date: Fri May 15 18:18:20 2020 -0400 drm/amd/display: Don't compare same stream for synchronized vblank [Why] When determining synchronzied vblank we don't need to compare the stream with itself [How] If comparing same stream, continue to next iteration Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 8598a7221e827bda805fbadc7a654447328c1257 Author: Anthony Koo Date: Fri May 15 16:25:02 2020 -0400 drm/amd/display: [FW Promotion] Release 1.0.12 [Header Changes] - Combine all interface dependencies between driver and fw into a single header file - Add FW Versioning to the dmub_cmd.h file Signed-off-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit fd0293dd5b68a67a8731d54a6b334945e4e95757 Author: Hugo Hu Date: Wed May 13 16:36:28 2020 +0800 drm/amd/display: enable plane if container of plane_status changed [why] We hit an issue which driver reallocate a pipe from desktop bottom pipe to video bottom pipe. In this case, driver need to re-enable plane. [how] Enable plane if container of plane status changed. Signed-off-by: Hugo Hu Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 84034ad4c0c0813c1350b43087eed036066edd5a Author: Anthony Koo Date: Fri May 15 15:51:33 2020 -0400 drm/amd/display: combine public interfaces into single header [Why] We want to better encapsulate all driver-fw dependencies into a single file. [How] Combine all the headers under inc folder into a single header Signed-off-by: Anthony Koo Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 1f255112da5d110c5ab36e8d7181be472efa5968 Author: Eric Bernstein Date: Mon May 11 16:48:52 2020 -0400 drm/amd/display: Allow Diagnostics test with eDP not connected [Why] Diagnostics DIO test with eDP not connected is required to run [How] Allow Diagnostics test with eDP not connected to skip link detection but still execute DIO test Signed-off-by: Eric Bernstein Reviewed-by: Dmytro Laktyushkin Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 0976ef315dc3bb04cb709f7d28b0826c0b294889 Author: Paul Hsieh Date: Wed May 13 11:31:42 2020 +0800 drm/amd/display: unit show garbage when do OPTC blank [Why] Unit enter to S4, garbage show on screen when do OPTC blank. [How] Wait for vblank then do OPTC blank Signed-off-by: Paul Hsieh Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 245a022163abd3d67ebc3757199d4d6eb4661bf8 Author: Aric Cyr Date: Tue May 12 23:36:05 2020 -0400 drm/amd/display: Guard against invalid array access [Why] There are scenarios where no OPP is assigned to an OTG so its value is 0xF which is outside the size of the OPP array causing a potential driver crash. [How] Change the assert to an early return to guard against access. If there's no OPP assigned already, then OTG will be blank anyways so no functionality should be lost. Signed-off-by: Aric Cyr Reviewed-by: Zhan Liu Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 15ce104c5a419723f61a186e3711d8e50b131609 Author: Alvin Lee Date: Tue May 12 17:21:54 2020 -0400 drm/amd/display: Disable PG on NV12 [Why] HW team request to disable PG on NV12 (fixing missed cases) [How] Disable dpp and hubp PG Signed-off-by: Alvin Lee Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 891f016d9d3f46ce7751cde72b8837bba709b527 Author: David Galiffi Date: Wed May 13 10:36:06 2020 -0400 drm/amd/display: Increase Default Sizes of FW State and Trace Buffer [WHY] To facilitate DM removing the dependency between dc and the firmware binary. [HOW] Setting the default values to match VBIOS: 64 KB. These values are only used if meta is absent. Signed-off-by: David Galiffi Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 68423dabadaaacdd9383653daa3d9102088b2c08 Author: Aric Cyr Date: Tue May 12 12:53:52 2020 -0400 drm/amd/display: Handle link loss interrupt better [Why] Link loss currently only retrains and re-enables the stream. This can cause issues for some sinks. [How] When link loss occurs, the link and stream(s) should be completely disabled and then reenabled. Signed-off-by: Aric Cyr Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit b236e048ec633a35b2a83d663f74c22ef04b9bab Author: Dmytro Laktyushkin Date: Mon May 11 10:33:58 2020 -0400 drm/amd/display: simplify dml log2 function Current implementation is slightly inaccurate and will often result in truncation/floor operation decrementing an exact integer output by 1. Only rounded down output is ever expected, just extract the fp exponent for this to increase performance and avoid any truncation issues. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 0023b7eec02c1ddd76c184cfa584dfdc37903c94 Author: Bhawanpreet Lakha Date: Mon May 11 17:36:38 2020 -0400 drm/amd/display: Fix incorrect HDCP caps for dongle [Why] Previously we used link signal type to get the caps. We should use the sink signal type [How] Use sink signal type instead of link signal type Signed-off-by: Bhawanpreet Lakha Reviewed-by: Wenjing Liu Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit b56e90ea335e237d47a2612983dba9e0fe24586a Author: Paul Hsieh Date: Fri May 8 14:32:11 2020 +0800 drm/amd/display: link_status not align when power off encoder [Why] The link_status is incorrect cause driver power off eDP when backlight on. Some eDP panels may show garbage on screen. [How] Correct link_status when power off encoder Signed-off-by: Paul Hsieh Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit c821cddf43685b145b90a1cf6e137d1426e9ea54 Author: Aric Cyr Date: Mon May 11 10:33:54 2020 -0400 drm/amd/display: 3.2.86 Signed-off-by: Aric Cyr Reviewed-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 130c88931f6cbdb4513d307b4a13fcfff08a8041 Author: Yong Zhao Date: Tue May 26 20:53:21 2020 -0400 drm/amdgpu: Improve the MTYPE comments Use words insteads of acronyms for better understanding. Signed-off-by: Yong Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 32cb59f3136248c40062f6fe3edfba13c516b30c Author: Mukul Joshi Date: Tue May 26 20:06:04 2020 -0400 drm/amdkfd: Track SDMA utilization per process Track SDMA usage on a per process basis and report it through sysfs. The value in the sysfs file indicates the amount of time SDMA has been in-use by this process since the creation of the process. This value is in microsecond granularity. Signed-off-by: Mukul Joshi Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 2cdc9c200c8ab71d970f15186934b5b4687f2372 Author: Wenhui Sheng Date: Tue May 26 13:27:11 2020 +0800 drm/amd/powerplay: add check before i2c_add_adapter smu_i2c_eeprom_init may be invoked twice or more under sroiv mode, while we don't want to add check if (!amdgpu_sriov_vf) before we invoke smu_i2c_eeprom_init/fini each time, so we check if i2c adapter is already added before we invoke i2c_add_adapter Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 41fb666d5cebddffd1253726f3c191c0353edba5 Author: Wenhui Sheng Date: Fri May 22 12:37:18 2020 +0800 drm/amd/powerplay: remove SRIOV check in SMU11 (v2) We don't need SRIOV check after we enable SMC msg filter in SMU11 v2: squash in unused variable fix, unused ids Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 4ea5081c82c422433e7c6245e0f1cc2b49838451 Author: Wenhui Sheng Date: Fri May 22 12:30:58 2020 +0800 drm/amd/powerplay: enable SMC message filter 1. enable SMC message filter in SRIOV situation 2. return -EACCESS if msg is blocked from smu_msg_get_index 3. if msg is block, always return 0 from smu_v11_0_send_msg_with_param Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit d4f3c0b3325413193ddd996fbb495f1d09250583 Author: Wenhui Sheng Date: Thu May 21 14:11:13 2020 +0800 drm/amd/powerplay: add SMC message filter for SMU11 1. add smu_11_0_msg_mapping definition 2. add valid info for each SMC message in SRIOV Signed-off-by: Wenhui Sheng Reviewed-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 2b7ad277e96577e1349072f7e2bab047917ed10d Author: Evan Quan Date: Mon May 25 14:29:10 2020 +0800 drm/amd/powerplay: check whether SMU IP is enabled before access Since on early phase of bringup, the SMU IP may be not enabled or supported. Without this, we may hit null pointer dereference on accessing smu->adev. Signed-off-by: Evan Quan Reviewed-by: Yong Zhao Tested-by: Yong Zhao Signed-off-by: Alex Deucher commit 1aad7078191116f8a363466fcf461f2325c5def2 Author: Nicholas Kazlauskas Date: Fri May 22 14:03:26 2020 -0400 drm/amd/display: Make BREAK_TO_DEBUGGER() a debug print [Why] Warnings in the kernel are generally treated as errors. The BREAK_TO_DEBUGGER macro is not a critical error or warning, but rather intended for developer use to help investigate behavior and sequences for other issues. We do still make use of DC_ERROR/ASSERT(0) in various places in the code for things that are genuine issues. Since most developers don't actually KGDB while debugging the kernel these essentially would have no value on their own since the KGDB breakpoint wouldn't trigger - ASSERT(0) was used as a shortcut to get a stacktrace. [How] Turn it into a DRM_DEBUG_DRIVER print instead. We unfortunately lose the stacktrace, but we still do retain some of the useful debug information this offers by having at least the function and line number loggable. If KGDB is supported in the kernel this will still trigger a real breakpoint as well. Cc: Harry Wentland Cc: Leo Li Cc: Bhawanpreet Lakha Cc: Rodrigo Siqueira Signed-off-by: Nicholas Kazlauskas Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 4541ea81edde6ce9a1d9be082489aca7e8e7e1dc Author: Gustavo A. R. Silva Date: Fri May 22 12:43:55 2020 -0500 drm/[radeon|amdgpu]: Replace one-element array and use struct_size() helper The current codebase makes use of one-element arrays in the following form: struct something { int length; u8 data[1]; }; struct something *instance; instance = kmalloc(sizeof(*instance) + size, GFP_KERNEL); instance->length = size; memcpy(instance->data, source, size); but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. So, replace the one-element array with a flexible-array member. Also, make use of the new struct_size() helper to properly calculate the size of struct SISLANDS_SMC_SWSTATE. This issue was found with the help of Coccinelle and, audited and fixed _manually_. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 6e20010a3acc41817daf69f801d8e9c34975223e Author: Gustavo A. R. Silva Date: Fri May 22 12:34:19 2020 -0500 drm/radeon/dpm: Replace one-element array and use struct_size() helper The current codebase makes use of one-element arrays in the following form: struct something { int length; u8 data[1]; }; struct something *instance; instance = kmalloc(sizeof(*instance) + size, GFP_KERNEL); instance->length = size; memcpy(instance->data, source, size); but the preferred mechanism to declare variable-length types such as these ones is a flexible array member[1][2], introduced in C99: struct foo { int stuff; struct boo array[]; }; By making use of the mechanism above, we will get a compiler warning in case the flexible array does not occur last in the structure, which will help us prevent some kind of undefined behavior bugs from being inadvertently introduced[3] to the codebase from now on. So, replace the one-element array with a flexible-array member. Also, make use of the new struct_size() helper to properly calculate the size of struct NISLANDS_SMC_SWSTATE. This issue was found with the help of Coccinelle and, audited and fixed _manually_. [1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html [2] https://github.com/KSPP/linux/issues/21 [3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour") Reviewed-by: Christian König Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit da87c30b174e7a4b52454bc73cc28c766447a6b8 Author: Alex Deucher Date: Mon May 18 17:29:09 2020 -0400 drm/amdgpu: put some case statments in family order SI and CIK came before VI and newer asics. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit d0767e0e0f796948cfa4c4e295ebf1edd7ccc722 Author: Alex Deucher Date: Mon May 18 17:14:54 2020 -0400 drm/amdgpu/sdma4: simplify the logic around powering up sdma Just check if it's an APU. The checks for the ppfuncs are pointless because if we don't have them we can't power up sdma anyway so we shouldn't even be in this code in the first place. I'm not sure about the in_gpu_reset check. This probably needs to be double checked. The fini logic doesn't match the init logic however with that in_gpu_reset check in place which seems odd. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit d7aca4f0b2edc6dc904ecab28c59f1e63b9fb46f Author: Alex Deucher Date: Mon May 18 17:09:12 2020 -0400 drm/amdgpu: simplify mec2 fw check Check if mec2 fw exists rather than checking asic types. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit e1ad2d53bc438de70b6313e25fdc7be7bd4706f5 Author: Alex Deucher Date: Mon May 18 17:10:11 2020 -0400 drm/amdgpu: simplify CZ/ST and KV/KB/ML checks Just check for APU. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 70534d1ee89ceadd03292d0c2da4dd4020189678 Author: Alex Deucher Date: Mon May 18 17:01:12 2020 -0400 drm/amdgpu: simplify raven and renoir checks Just check for APU. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit ac4e189a5623579c023c9cf8006422aef2a487b4 Author: Alex Deucher Date: Mon May 18 16:45:13 2020 -0400 drm/amdgpu/gfx10: add navi12 to gfxoff case Looks like it should be handled here as well. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit e27fb8215f8c43ecff5fd7ec486df0dad28e1889 Author: Alex Deucher Date: Mon May 18 16:42:21 2020 -0400 drm/amdgpu/sdma4: add renoir to powergating setup Looks like renoir should be handled here as well. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 97d798b276e94a366dfb03d62bc90d4742ab3a31 Author: Alex Deucher Date: Tue May 5 15:44:57 2020 -0400 drm/amdgpu: simplify ATIF backlight handling Just register the a pointer to the backlight device and use that. Unifies the DC and non-DC handling. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit ba806f98f868ce107aa9c453fef751de9980e4af Author: Christian König Date: Tue May 12 10:55:58 2020 +0200 drm/radeon: disable AGP by default Always use the PCI GART instead. We just have to many cases where AGP still causes problems. This means a performance regression for some GPUs, but also a bug fix for some others. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b0d4783a382297048cb00e3e94078aa301296841 Author: Guchun Chen Date: Fri May 22 15:50:15 2020 +0800 drm/amdgpu: print warning when input address is invalid This will assist debug in error injection case. Signed-off-by: Guchun Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit a16be2fe145517897e4bc558d249d9fb54053085 Author: Hua Zhang Date: Thu May 14 15:47:30 2020 +0800 drm/amd/powerplay: skip smu_i2c_eeprom_init/fini under sriov mode When smu_i2c_eeprom_init is called on the smu resuming process under sroiv mode, there will be a call trace: [ 436.377690] dump_stack+0x63/0x85 [ 436.377695] kobject_init+0x77/0x90 [ 436.377704] device_initialize+0x28/0x110 [ 436.377708] device_register+0x12/0x20 [ 436.377756] i2c_register_adapter+0xeb/0x400 [ 436.377763] i2c_add_adapter+0x5a/0x80 [ 436.377951] arcturus_i2c_eeprom_control_init+0x60/0x80 [amdgpu] [ 436.378123] smu_resume+0xcc/0x110 [amdgpu] [ 436.378247] amdgpu_device_gpu_recover+0xfb1/0xfc0 [amdgpu] [ 436.378401] amdgpu_job_timedout+0xf2/0x150 [amdgpu] [ 436.378414] drm_sched_job_timedout+0x70/0xc0 [amd_sched] [ 436.378420] ? drm_sched_job_timedout+0x70/0xc0 [amd_sched] [ 436.378430] process_one_work+0x1fd/0x3f0 [ 436.378438] worker_thread+0x34/0x410 [ 436.378444] kthread+0x121/0x140 [ 436.378451] ? process_one_work+0x3f0/0x3f0 [ 436.378456] ? kthread_create_worker_on_cpu+0x70/0x70 [ 436.378464] ret_from_fork+0x35/0x40 This is because smu_i2c_eeprom is not released on gpu recovering. Actually, smu_i2c_eeprom_init/fini are only needed under bare mental mode. Signed-off-by: Hua Zhang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit fa3d49f1e904e897af16ba8ab52929dbc468f785 Author: Kevin Wang Date: Wed May 20 11:41:40 2020 +0800 drm/amd/powerplay: remove the support of vega20 from swsmu by default, vega20 will use legacy powerplay driver. in order to maintain the code conveniently in the future, remove the support of vega20 from swsmu. Signed-off-by: Kevin Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d2d0f8f4554da1cdbd90c78bff18cb576176d0a7 Author: Kevin Wang Date: Wed May 20 11:25:23 2020 +0800 drm/amd/powerplay: remove the support of xgmi pstate on vega20 from swsmu the vega20 asic uses legacy powerplay driver by default. 1. cleanup is_support_sw_smu_xgmi() function. (only use for vega20 xgmi pstate check) 2. by default, the vega20 set xgmi pstate by legacy powerplay routine. Signed-off-by: Kevin Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 963cee55971a1c41972518f7e0e581f01e5f8b7b Author: Likun Gao Date: Thu May 21 15:40:41 2020 +0800 drm/amdgpu: change memory training to common function Change memory training init and finit a common function, as it only have software behavior do not relay on the IP version of PSP. Signed-off-by: Likun Gao Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 19822264d6837ae5e495404f4444311897f5776f Author: Anthony Koo Date: Sat May 9 17:32:10 2020 -0400 drm/amd/display: FW Release 1.0.11 Signed-off-by: Anthony Koo Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 429b9db8e10eef6cdfbf2ecf27415bc79e2bee01 Author: Yongqiang Sun Date: Fri May 8 10:43:14 2020 -0400 drm/amd/display: Remove nv12 work around [Why] dal side nv12 wa has a lot of side effects. KMD side wa is used, so this should be remove. [How] Removed wa from dal side. Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4d6939535daf298bb2b3b3a33a49edc50801b117 Author: Dmytro Laktyushkin Date: Wed May 6 15:08:59 2020 -0400 drm/amd/display: fix dml immediate flip input Set the correct value to immediate flip required field. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Samson Tam Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1649bbe01ba950c83ac6f8d83db7dd69ffc7e056 Author: Dmytro Laktyushkin Date: Fri May 1 15:43:09 2020 -0400 drm/amd/display: fix dml log2 function This change removes internal rounding in dml_log2 function. Dml_log2 is expected to return a float output. In case an int is needed dml will floor the output on it's own. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 562c805f83d251201abc776341fa3ba0521d3f13 Author: Nicholas Kazlauskas Date: Thu May 7 13:35:41 2020 -0400 drm/amd/display: Support CW4 for DMUB ringbuffer inbox [Why] Region 4 is non cacheable and slower than using cache window 4. [How] Check the firmware version to determine how we should program the base address and memory windows. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 455802c72faf7524e05295bde564728f10e94d1c Author: Nicholas Kazlauskas Date: Thu May 7 13:09:18 2020 -0400 drm/amd/display: Add DMUB firmware version helpers in DMUB service [Why] In order to switch over the inbox from region4 to cw4 we need to know if the firmware is capable of properly invalidating the cache before reading the commands. Easiest way is to just check the firmware version, but we don't have the helper macros or a way for the dmub_srv to know what version it is. [How] Add a new fw_version field to the creation parameters that driver can optional pass in. Assumes a version of 0x00000000 is invalid. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 2847642a1875bae10aa80e81dd23652acc78ccb2 Author: Jake Wang Date: Tue May 5 10:02:36 2020 -0400 drm/amd/display: vbios data table packing [WHY] Currently we're copying the entire bios image into vbios. Loading time for FW with entire bios(54272 bytes) is 105138us. By copying only the sections of bios we're using(4436 bytes), loading time drops to 104326us which saves us 812us. [HOW] ROM header, master data table, and all data tables will be packed in contiguous manner. The offsets for the data tables are remapped to their newly packed location. Signed-off-by: Jake Wang Reviewed-by: Tony Cheng Acked-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit fb8cf277b16d3f8b16941d217f7bae4ed7e73bea Author: Wenjing Liu Date: Thu Apr 30 14:03:05 2020 -0400 drm/amd/display: DP link layer test 4.2.1.1 fix due to specs update [why] DP link layer CTS specs updated to change the test parameters in test 4.2.1.1. Before it requires source to delay 400us on aux no reply. With the specs updates Errata5, it requires source to delay 3.2ms (based on LTTPR aux timeout) This causes our test to fail after updating with the latest test equipment firmware. [how] the change is to allow LTTPR 3.2ms aux timeout delay by default. And only set to 400us if LTTPR is not present. Before this piece of logic is interwined with LTTPR support. Now we will default to 3.2ms aux timeout even if LTTPR support is not enabled by driver. Signed-off-by: Wenjing Liu Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1c994f2deff1897d530441f62549f7a3a3508cda Author: Dmytro Laktyushkin Date: Wed Apr 22 13:29:08 2020 -0400 drm/amd/display: update dml interfaces and variables Preparation for new asic support. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit fe5932964dffcaa1e6067cf3ea4d7f21cc242c66 Author: Aric Cyr Date: Sun May 3 23:55:10 2020 -0400 drm/amd/display: 3.2.85 Signed-off-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1db14695929f26a8f524f5c7af7d30265374b51d Author: Wyatt Wood Date: Thu Apr 30 20:04:47 2020 -0400 drm/amd/display: Fix ABM memory alignment issue [Why] Due to packing of abm_config_table, memory addresses aren't aligned to 32 bit boundary dmcub prefers. Therefore when using pointers to this structure, it's possible that dmcub will automatically align the data read from that address, yielding incorrect values. [How] Instead of packing 1 byte boundary, explicitly pack values to 4 byte boundary. Since there is a dependency on the existing iram table structure on driver side, we must copy to a second structure, which is aligned correctly, before passing to fw. Signed-off-by: Wyatt Wood Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 7b8a6362fa146b78398d2cb9380cc7f3cb2145d3 Author: Anthony Koo Date: Fri May 1 23:06:03 2020 -0400 drm/amd/display: FW release 1.0.10 Signed-off-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 474ac4a875ca6fea3fc5183d3ad22ef7523dca53 Author: Yongqiang Sun Date: Mon Apr 27 12:49:39 2020 -0400 drm/amd/display: Implement some asic specific abm call backs. [Why & How] Implement abm set_pipe call stacks Have some asics speicifc call stacks for abm. Signed-off-by: Yongqiang Sun Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 569f4f9bf059ee3f08afe4b48fc77513386d2543 Author: Rodrigo Siqueira Date: Fri Apr 24 10:49:38 2020 -0400 drm/amd/display: Add bit swap helper based on endianness Christian Koenig pointed out a code duplication related to bit swap in case of big-endian manipulation. This commit adds a helper for handling this verification and reduces the requirement of replicate some part of the code. Signed-off-by: Rodrigo Siqueira Reviewed-by: Wyatt Wood Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 0922b899f36621126d49c0d86e90fb18d572d8a1 Author: Nicholas Kazlauskas Date: Thu Apr 30 12:24:05 2020 -0400 drm/amd/display: Don't pass invalid fw_bss_data pointer into DMUB srv [Why] If bss_data_size is 0 then we shouldn't be passing down fw_bss_data into the DMUB service since the region isn't really "valid." [How] Pass NULL instead if the size is 0. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Zhan Liu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 08a512d4ab2f32c6b06ea89bb8a707a66c3ec13d Author: Nicholas Kazlauskas Date: Thu Apr 30 12:18:16 2020 -0400 drm/amd/display: Check bss_data_size before going down legacy DMUB load path [Why] New unified firmware binary with only inst const still passes down fw_bss_data != NULL and params->bss_data_size == 0 from DM. This leads it into the legacy path causing firmware state allocation to be too small. [How] Check bss_data_size as well. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Zhan Liu Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 65f9ace4acc1dbfc85e3cecd5aad0fb9ca165ef2 Author: Sung Lee Date: Wed Apr 29 17:24:23 2020 -0400 drm/amd/display: Do not fail if build scaling params fails [WHY] Failing validation when building scaling parameters causes corruption to occur due to pipe splitting with smaller pixel widths than HW supports. This needs to fail silently for now to hide the corruption until the corruption itself can be fixed. [HOW] Do not fail validation if building scaling params fails. Signed-off-by: Sung Lee Reviewed-by: Dmytro Laktyushkin Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 1810f441ae112b0d44fe52ab4147eb768084e978 Author: Jaehyun Chung Date: Tue Apr 28 12:41:54 2020 -0400 drm/amd/display: Handle persistence in DM [Why] Remove dm_write_persistent_data and dm_read_persistent_data as persistence should be handled in DM. [How] Remove functions. Move read/write calls into DM layer while maintaining logic. Signed-off-by: Jaehyun Chung Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ba03a63d76ac8131fad58c34fb793d18b0a8964c Author: Chris Wilson Date: Thu May 28 08:41:00 2020 +0100 drm/i915/gt: Don't declare hangs if engine is stalled If the ring submission is stalled on an external request, nothing can be submitted, not even the heartbeat in the kernel context. Since nothing is running, resetting the engine/device does not unblock the system and is pointless. We can see if the heartbeat is supposed to be running before declaring foul. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200528074109.28235-2-chris@chris-wilson.co.uk commit 1e968bf5caf65eff3f080102879aaa5440c261b6 Author: Sami Tolvanen Date: Tue Apr 21 11:25:01 2020 -0700 objtool: Use sh_info to find the base for .rela sections ELF doesn't require .rela section names to match the base section. Use the section index in sh_info to find the section instead of looking it up by name. LLD, for example, generates a .rela section that doesn't match the base section name when we merge sections in a linker script for a binary compiled with -ffunction-sections. Signed-off-by: Sami Tolvanen Signed-off-by: Josh Poimboeuf Reviewed-by: Kees Cook commit e000acc145928693833f09152244242a678d3cd5 Author: Kristen Carlson Accardi Date: Wed Apr 15 14:04:43 2020 -0700 objtool: Do not assume order of parent/child functions If a .cold function is examined prior to it's parent, the link to the parent/child function can be overwritten when the parent is examined. Only update pfunc and cfunc if they were previously nil to prevent this from happening. This fixes an issue seen when compiling with -ffunction-sections. Signed-off-by: Kristen Carlson Accardi Signed-off-by: Josh Poimboeuf commit bffa18dd0bca90112746bafd333386c71fe55efe Author: Chris Wilson Date: Thu May 28 09:24:27 2020 +0100 drm/i915/gt: Remove local entries from GGTT on suspend Across suspend/resume, we clear the entire GGTT and rebuild from scratch. In particular, we want to only preserve the global entries for use by the HW, and delay reinstating the local binds until required by the user. This means that we can evict any local binds in the global GTT, saving any time in preserving their state, as they will be rebound on demand. References: https://gitlab.freedesktop.org/drm/intel/-/issues/1947 Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200528082427.21402-2-chris@chris-wilson.co.uk commit dc6cd912c7cd83ec9859429c552b2986c0386b90 Author: Chris Wilson Date: Thu May 28 16:04:52 2020 +0100 drm/i915/gt: Restore both GGTT bindings on resume We should be able to skip restoring LOCAL (user) binds within the GGTT on resume and let them be restored upon demand. However, our consistency checks demand that the bind flags match the node state, and we cannot simply clear the flags, we need to evict as well. For now, make sure we restore the bind flags exactly upon resume. Fixes: 0109a16ef391 ("drm/i915/gt: Clear LOCAL_BIND from shared GGTT on resume") Fixes: bf0840cdb304 ("drm/i915/gt: Stop cross-polluting PIN_GLOBAL with PIN_USER with no-ppgtt") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200528150452.7880-1-chris@chris-wilson.co.uk commit b72f02d78e4f257761ed003444ae52083f962076 Author: Chris Wilson Date: Wed May 27 17:24:18 2020 +0100 drm/i915/gt: Prevent timeslicing into unpreemptable requests We have a I915_REQUEST_NOPREEMPT flag that we set when we must prevent the HW from preempting during the course of this request. We need to honour this flag and protect the HW even if we have a heartbeat request, or other maximum priority barrier, pending. As such, restrict the timeslicing check to avoid preempting into the topmost priority band, leaving the unpreemptable requests in blissful peace running uninterrupted on the HW. v2: Set the I915_PRIORITY_BARRIER to be less than I915_PRIORITY_UNPREEMPTABLE so that we never submit a request (heartbeat or barrier) that can legitimately preempt the current non-premptable request. Fixes: 2a98f4e65bba ("drm/i915: add infrastructure to hold off preemption on a request") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200527162418.24755-1-chris@chris-wilson.co.uk commit cc649a9eafc1ef5c40db023084cb94422d08aa84 Author: Arnd Bergmann Date: Wed May 27 16:05:09 2020 +0200 drm/i915: work around false-positive maybe-uninitialized warning gcc-9 gets confused by the code flow in check_dirty_whitelist: drivers/gpu/drm/i915/gt/selftest_workarounds.c: In function 'check_dirty_whitelist': drivers/gpu/drm/i915/gt/selftest_workarounds.c:492:17: error: 'rsvd' may be used uninitialized in this function [-Werror=maybe-uninitialized] I could not figure out a good way to do this in a way that gcc understands better, so initialize the variable to zero, as last resort. Fixes: aee20aaed887 ("drm/i915: Implement read-only support in whitelist selftest") Signed-off-by: Arnd Bergmann Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200527140526.1458215-2-arnd@arndb.de commit 6ec81b82732e2b4a5ac0853fd33919ff1ca94238 Author: Arnd Bergmann Date: Wed May 27 16:05:08 2020 +0200 drm/i915/pmu: avoid an maybe-uninitialized warning Conditional spinlocks make it hard for gcc and for lockdep to follow the code flow. This one causes a warning with at least gcc-9 and higher: In file included from include/linux/irq.h:14, from drivers/gpu/drm/i915/i915_pmu.c:7: drivers/gpu/drm/i915/i915_pmu.c: In function 'i915_sample': include/linux/spinlock.h:289:3: error: 'flags' may be used uninitialized in this function [-Werror=maybe-uninitialized] 289 | _raw_spin_unlock_irqrestore(lock, flags); \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/i915_pmu.c:288:17: note: 'flags' was declared here 288 | unsigned long flags; | ^~~~~ Split out the part between the locks into a separate function for readability and to let the compiler figure out what the logic actually is. Fixes: d79e1bd676f0 ("drm/i915/pmu: Only use exclusive mmio access for gen7") Signed-off-by: Arnd Bergmann Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200527140526.1458215-1-arnd@arndb.de commit 269cb04a40231a9a37e43f67cdfcdd7171c6bbc2 Author: Ville Syrjälä Date: Tue Apr 28 20:19:38 2020 +0300 drm/gma500: Stop using mode->private_flags gma500 only uses mode->private_flags to convey the sdvo pixel multiplier from the encoder .mode_fixup() hook to the encoder .mode_set() hook. Those always seems get called as a pair so let's just stuff the pixel multiplier into the encoder itself as there are no state objects we could use in this non-atomic driver. Paves the way for nuking mode->private_flag. Cc: Patrik Jakobsson CC: Sam Ravnborg Cc: Daniel Vetter Cc: Emil Velikov Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-15-ville.syrjala@linux.intel.com commit 920dd1b1425bdf1c10b04e4f43269e402da9f626 Author: Ville Syrjälä Date: Tue Apr 28 20:19:35 2020 +0300 drm/mcde: Use mode->clock instead of reverse calculating it from the vrefresh htotal*vtotal*vrefresh ~= clock. So just say "clock" when we mean it. Cc: Linus Walleij Cc: Sam Ravnborg Reviewed-by: Daniel Vetter Reviewed-by: Sam Ravnborg Reviewed-by: Linus Walleij Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-12-ville.syrjala@linux.intel.com commit 42acb06b01b12a2205757a46d3ff75e38840968f Author: Ville Syrjälä Date: Tue Apr 28 20:19:34 2020 +0300 drm: pahole struct drm_display_mode Reorganize drm_display_mode to eliminate all the holes. We'll put all the actual timings to the start of the struct and all the extra junk to the end. Gets the size down to 136 bytes on 64bit and 120 bytes on 32bit. With a bit more work we should be able to get this below the two cacheline mark even on 64bit. v2: Rebase due to DRM_MODE_TYPE_USERDEF comment change Reviewed-by: Emil Velikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-11-ville.syrjala@linux.intel.com commit 4ed2101cfa2df160bfe55bebbe60b7efb8522463 Author: Ville Syrjälä Date: Tue Apr 28 20:19:33 2020 +0300 drm: Flatten drm_mode_vrefresh() Remove the pointless whole-function indentation. Also don't need to worry about negative values anymore since we switched everything to u16. Reviewed-by: Sam Ravnborg Reviewed-by: Emil Velikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-10-ville.syrjala@linux.intel.com commit d857e167963f2faf75727764497b51c942ffe2fc Author: Ville Syrjälä Date: Tue Apr 28 20:19:32 2020 +0300 drm: Shrink drm_display_mode timings Store the timings (apart from the clock) as u16. The uapi mode struct already uses u16 for everything so using something bigger internally doesn't really help us. Reviewed-by: Sam Ravnborg Reviewed-by: Emil Velikov Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-9-ville.syrjala@linux.intel.com commit 6a494eab2cf981eaa6a5f814dd65b35b652e123a Author: Ville Syrjälä Date: Tue Apr 28 20:19:31 2020 +0300 drm: Make mode->flags u32 The mode flags are direclty exposed in the uapi as u32. Use the same size type to store them internally. Reviewed-by: Sam Ravnborg Reviewed-by: Emil Velikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-8-ville.syrjala@linux.intel.com commit 3542cc54a1bb17fed85f1503b6978a95107c2ba8 Author: Ville Syrjälä Date: Tue Apr 28 20:19:30 2020 +0300 drm: Shrink mode->type to u8 We only have 7 bits defined for mode->type. Shrink the storage to u8. Reviewed-by: Sam Ravnborg Reviewed-by: Emil Velikov Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-7-ville.syrjala@linux.intel.com commit 2159e4629addf29e310c342801a2cb3fe82cc3b4 Author: Ville Syrjälä Date: Tue Apr 28 20:19:29 2020 +0300 drm: Shrink {width,height}_mm to u16 Instead of supporting ~2000km wide displayes let's limit ourselves to ~65m. That seems plenty big enough to me. Even with EDID_QUIRK_DETAILED_IN_CM EDIDs seem to be limited to 10*0xfff which fits into the 16 bits. Reviewed-by: Sam Ravnborg Reviewed-by: Emil Velikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-6-ville.syrjala@linux.intel.com commit 5dce0c0b92d426b5278b0d6b2ec189115554116a Author: Ville Syrjälä Date: Tue Apr 28 20:19:28 2020 +0300 drm/msm/dpu: Stop copying around mode->private_flags The driver never sets mode->private_flags so copying it back and forth is entirely pointless. Stop doing it. Also drop private_flags from the tracepoint. Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Reviewed-by: Emil Velikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-5-ville.syrjala@linux.intel.com commit 0425662fdf05665235e768e2fbcb4ced12432b43 Author: Ville Syrjälä Date: Tue Apr 28 20:19:27 2020 +0300 drm: Nuke mode->vrefresh Get rid of mode->vrefresh and just calculate it on demand. Saves a bit of space and avoids the cached value getting out of sync with reality. Mostly done with cocci, with the following manual fixups: - Remove the now empty loop in drm_helper_probe_single_connector_modes() - Fix __MODE() macro in ch7006_mode.c - Fix DRM_MODE_ARG() macro in drm_modes.h - Remove leftover comment from samsung_s6d16d0_mode - Drop the TODO @@ @@ struct drm_display_mode { ... - int vrefresh; ... }; @@ identifier N; expression E; @@ struct drm_display_mode N = { - .vrefresh = E }; @@ identifier N; expression E; @@ struct drm_display_mode N[...] = { ..., { - .vrefresh = E } ,... }; @@ expression E; @@ { DRM_MODE(...), - .vrefresh = E, } @@ identifier M, R; @@ int drm_mode_vrefresh(const struct drm_display_mode *M) { ... - if (M->vrefresh > 0) - R = M->vrefresh; - else if (...) { ... } ... } @@ struct drm_display_mode *p; expression E; @@ ( - p->vrefresh = E; | - p->vrefresh + drm_mode_vrefresh(p) ) @@ struct drm_display_mode s; expression E; @@ ( - s.vrefresh = E; | - s.vrefresh + drm_mode_vrefresh(&s) ) @@ expression E; @@ - drm_mode_vrefresh(E) ? drm_mode_vrefresh(E) : drm_mode_vrefresh(E) + drm_mode_vrefresh(E) @find_substruct@ identifier X; identifier S; @@ struct X { ... struct drm_display_mode S; ... }; @@ identifier find_substruct.S; expression E; identifier I; @@ { .S = { - .vrefresh = E } } @@ identifier find_substruct.S; identifier find_substruct.X; expression E; identifier I; @@ struct X I[...] = { ..., .S = { - .vrefresh = E } ,... }; v2: Drop TODO v3: Rebase v4: Rebase Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Linus Walleij Cc: CK Hu Cc: Philipp Zabel Cc: Ben Skeggs Cc: Thierry Reding Cc: Sam Ravnborg Cc: Jerry Han Cc: Icenowy Zheng Cc: Jagan Teki Cc: Stefan Mavrodiev Cc: Robert Chiras Cc: "Guido Günther" Cc: Purism Kernel Team Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: VMware Graphics Cc: Thomas Hellstrom Cc: linux-amlogic@lists.infradead.org Cc: nouveau@lists.freedesktop.org Reviewed-by: Laurent Pinchart Reviewed-by: Emil Velikov Reviewed-by: Sam Ravnborg Acked-by: Linus Walleij Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-4-ville.syrjala@linux.intel.com commit 0109a16ef391b2ebfbfdf08250c1dfb5dbf83d1e Author: Chris Wilson Date: Tue May 26 16:07:39 2020 +0100 drm/i915/gt: Clear LOCAL_BIND from shared GGTT on resume We only restore GLOBAL binds upon resume as we expect these to be pinned for use by HW, whereas the LOCAL binds can be recreated on demand once userspace is resumed. For the LOCAL bind to be recreated in the global GTT (for old systems without ppgtt), we need to clear its presence flag on deciding not to restore the mapping upon resume. Fixes: bf0840cdb304 ("drm/i915/gt: Stop cross-polluting PIN_GLOBAL with PIN_USER with no-ppgtt") Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200526150739.26147-1-chris@chris-wilson.co.uk commit 511b6d9aed417739b6aa49d0b6b4354ad21020f1 Author: Chris Wilson Date: Tue May 26 10:07:53 2020 +0100 drm/i915/gt: Do not schedule normal requests immediately along virtual When we push a virtual request onto the HW, we update the rq->engine to point to the physical engine. A request that is then submitted by the user that waits upon the virtual engine, but along the physical engine in use, will then see that it is due to be submitted to the same engine and take a shortcut (and be queued without waiting for the completion fence). However, the virtual request may be preempted (either by higher priority users, or by timeslicing) and removed from the physical engine to be migrated over to one of its siblings. The dependent normal request however is oblivious to the removal of the virtual request and remains queued to execute on HW, believing that once it reaches the head of its queue all of its predecessors will have completed executing! v2: Beware restriction of signal->execution_mask prior to submission. Fixes: 6d06779e8672 ("drm/i915: Load balancing across a virtual engine") Testcase: igt/gem_exec_balancer/sliced Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: # v5.3+ Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200526090753.11329-2-chris@chris-wilson.co.uk commit ffb0c600c240103f6f34e07892a7e0a75502b243 Author: Chris Wilson Date: Tue May 26 10:07:52 2020 +0100 drm/i915: Reorder await_execution before await_request Reorder the code so that we can reuse the await_execution from a special case in await_request in the next patch. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200526090753.11329-1-chris@chris-wilson.co.uk commit 6770ef332fccd6ad7fdd1ffeee8cd20c8bb10562 Author: Ville Syrjälä Date: Tue Apr 28 20:19:26 2020 +0300 drm/i915: Introduce some local intel_dp variables The drrs code dereferences mode->vrefresh via some really long chain of structures/pointers. Couldn't get coccinelle to see through all that so let's add some local variables to help it. Reviewed-by: Emil Velikov Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-3-ville.syrjala@linux.intel.com commit 22da5d846d54dd13183b57874b9d5611d583d7c8 Author: Chris Wilson Date: Mon May 25 13:49:12 2020 +0100 drm/i915/display: Only query DP state of a DDI encoder Avoid a NULL dereference for a mismatched encoder type, hit when probing state for all encoders. This is a band aid to prevent the OOPS as the right fix is "probably to swap the psr vs infoframes.enable checks, or outright disappear from this function" (Ville). Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1892 Signed-off-by: Chris Wilson Acked-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200525124912.16019-1-chris@chris-wilson.co.uk commit bd34cea2a0e4b0c7a8e73d6cbaf694b233769d9d Author: Noralf Trønnes Date: Sat May 9 16:16:16 2020 +0200 drm/format-helper: Add drm_fb_swab() This replaces drm_fb_swab16() with drm_fb_swab() supporting 16 and 32-bit. Also make pixel line caching optional. v2: - Bail out on cpp != 2 && 4 (Sam) Reviewed-by: Sam Ravnborg Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20200509141619.32970-8-noralf@tronnes.org commit 64593f2a6fc933bb9a410bc3f8c261f3e57a9601 Author: Noralf Trønnes Date: Sat May 9 16:16:13 2020 +0200 drm/client: Add drm_client_modeset_check() Add a way for client to check the configuration before comitting. v2: - Fix docs (Sam) Reviewed-by: Sam Ravnborg Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20200509141619.32970-5-noralf@tronnes.org commit c9c03e3cf07299bf635e6fadad8d09106d26252f Author: Noralf Trønnes Date: Sat May 9 16:16:12 2020 +0200 drm/client: Add drm_client_framebuffer_flush() Some drivers need explicit flushing of buffer changes, add a function that does that. v2: - Put all clip rect stuff inside if statement (Sam) Reviewed-by: Sam Ravnborg Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20200509141619.32970-4-noralf@tronnes.org commit fc0e127022162653195788680973eefe72806595 Author: Chris Wilson Date: Tue May 26 12:20:51 2020 +0100 drm/i915: Improve execute_cb struct packing Reduce the irq_work llist for attaching the callbacks to the signal for both smaller structs (two fewer pointers!) and simpler [debug] code: Function old new delta irq_execute_cb 35 34 -1 __igt_breadcrumbs_smoketest 1684 1682 -2 i915_request_retire 2003 1996 -7 __i915_request_create 1047 1040 -7 __notify_execute_cb 135 126 -9 __i915_request_ctor 188 178 -10 __await_execution.part.constprop 451 440 -11 igt_wait_request 924 714 -210 One minor artifact is that the order of cb exection is reversed. No current use cases are affected by that change. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200526112051.10229-1-chris@chris-wilson.co.uk commit 9ae6c4ef7b62e619f1c49dcc0ceb2b2de2a29f04 Author: Chris Wilson Date: Mon May 25 08:53:39 2020 +0100 drm/i915/execlists: Shortcircuit queue_prio() for no internal levels If there are no internal levels and the user priority-shift is zero, we can help the compiler eliminate some dead code: Function old new delta start_timeslice 169 154 -15 __execlists_submission_tasklet 4696 4659 -37 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200525075347.582-4-chris@chris-wilson.co.uk commit 7c4541a37bbbf83c0f16f779e85eb61d9348ed29 Author: Chris Wilson Date: Mon May 25 16:14:59 2020 +0100 drm/i915/gt: Force the GT reset on shutdown Before we return control to the system, and letting it reuse all the pages being accessed by HW, we must disable the HW. At the moment, we dare not reset the GPU if it will clobber the display, but once we know the display has been disabled, we can proceed with the reset as we shutdown the module. We know the next user must reinitialise the HW for their purpose. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/489 Signed-off-by: Chris Wilson Cc: stable@kernel.org Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200525151459.12083-1-chris@chris-wilson.co.uk commit 6f081dbfdd4e54d50161c437f2cea176384501d9 Author: Chris Wilson Date: Mon May 25 00:39:00 2020 +0100 drm/i915/display: Fix early deref of 'dsb' drivers/gpu/drm/i915/display/intel_dsb.c:177 intel_dsb_reg_write() warn: variable dereferenced before check 'dsb' (see line 175) Fixes: afeda4f3b1c8 ("drm/i915/dsb: Pre allocate and late cleanup of cmd buffer") Signed-off-by: Chris Wilson Cc: Ville Syrjälä Cc: Animesh Manna Cc: Uma Shankar Reviewed-by: Animesh Manna Link: https://patchwork.freedesktop.org/patch/msgid/20200524233900.25598-1-chris@chris-wilson.co.uk commit bf0840cdb3043ebfa40ac28e19be2886efcd5886 Author: Chris Wilson Date: Mon May 25 08:53:36 2020 +0100 drm/i915/gt: Stop cross-polluting PIN_GLOBAL with PIN_USER with no-ppgtt In order to keep userptr distinct from ggtt mmaps in the eyes of lockdep, we need to avoid marking those userptr vma as PIN_GLOBAL. (So long as we comply with only using them as local PIN_USER!) References: https://gitlab.freedesktop.org/drm/intel/-/issues/1880 Signed-off-by: Chris Wilson Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200525075347.582-1-chris@chris-wilson.co.uk commit ea97c4ca54e45c9458f73e9dbef66439c2ae11f8 Author: Chris Wilson Date: Mon May 25 15:19:57 2020 +0100 drm/i915/gem: Suppress some random warnings Leave the error propagation in place, but limit the warnings to only show up in CI if the unlikely errors are hit. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200525141957.3061-2-chris@chris-wilson.co.uk commit 1d93949eb4f870bd189b3e2a435afc327b45dc3a Author: Chris Wilson Date: Mon May 25 15:19:56 2020 +0100 drm/i915/gt: Cancel the flush worker more thoroughly Since the worker may rearm, we currently are only guaranteed to flush the work if we cancel the timer. If the work was running at the time we try and cancel it, we will wait for it to complete, but it may leave items in the pool and requeue the work. If we rearrange the immediate discard of the pool then cancel the work, we know that the work cannot rearm and so our flush will be final. <0> [314.146044] i915_mod-1321 2.... 299799443us : intel_gt_fini_buffer_pool: intel_gt_fini_buffer_pool:227 GEM_BUG_ON(!list_empty(&pool->cache_list[n])) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1920 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200525141957.3061-1-chris@chris-wilson.co.uk commit 8f6f5e00e56f79773807b505b5808aa484fa26f9 Author: James Hilliard Date: Sun May 24 19:28:59 2020 -0600 drm/vc4: hdmi: Silence pixel clock error on -EPROBE_DEFER If the vc4 hdmi driver loads before the pixel clock is available we see a spurious "*ERROR* Failed to get pixel clock" error. Signed-off-by: James Hilliard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200525012859.267433-1-james.hilliard1@gmail.com commit 2217d3bc39b49ad8a64bb3f021e8a6ed253c0d8a Author: Colin Ian King Date: Sun May 24 23:27:15 2020 +0100 drm/auth: remove redundant assignment to variable ret The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200524222715.27305-1-colin.king@canonical.com commit afeda4f3b1c88f9e8721b4d4cf48af6f72c6b732 Author: Animesh Manna Date: Wed May 20 18:37:37 2020 +0530 drm/i915/dsb: Pre allocate and late cleanup of cmd buffer Pre-allocate command buffer in atomic_commit using intel_dsb_prepare function which also includes pinning and map in cpu domain. No functional change is dsb write/commit functions. Now dsb get/put function is removed and ref-count mechanism is not needed. Below dsb api added to do respective job mentioned below. intel_dsb_prepare - Allocate, pin and map the buffer. intel_dsb_cleanup - Unpin and release the gem object. RFC: Initial patch for design review. v2: included _init() part in _prepare(). [Daniel, Ville] v3: dsb_cleanup called after cleanup_planes. [Daniel] v4: dsb structure is moved to intel_crtc_state from intel_crtc. [Maarten] v5: dsb get/put/ref-count mechanism removed. [Maarten] v6: Based on review feedback following changes are added, - replaced intel_dsb structure by pointer in intel_crtc_state. [Maarten] - passing intel_crtc_state to dsp-api to simplify the code. [Maarten] - few dsb functions prototype modified to simplify code. v7: added few cosmetic changes suggested by Jani and null check for crtc_state in dsb_cleanup removed as suggested by Maarten. v8: changed the function parameter to intel_crtc_state* of ivb_load_lut_ext_max() from intel_crtc. [Maarten] v9: error handling improved in _write() and prepare(). [Maarten] Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Jani Nikula Cc: Daniel Vetter Acked-by: Daniel Vetter Reviewed-by: Maarten Lankhorst Signed-off-by: Animesh Manna Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20200520130737.11240-1-animesh.manna@intel.com commit 9d81fe1791180f5debde243b6e08b700e73cb94e Author: Lyude Paul Date: Thu May 21 16:46:47 2020 -0400 drm/vblank: Fix -Wformat compile warnings on some arches On some architectures like ppc64le and aarch64, compiling with -Wformat=1 will throw the following warnings: In file included from drivers/gpu/drm/drm_vblank.c:33: drivers/gpu/drm/drm_vblank.c: In function 'drm_update_vblank_count': drivers/gpu/drm/drm_vblank.c:273:16: warning: format '%llu' expects argument of type 'long long unsigned int', but argument 4 has type 'long int' [-Wformat=] DRM_DEBUG_VBL("updating vblank count on crtc %u:" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/drm/drm_print.h:407:22: note: in definition of macro 'DRM_DEBUG_VBL' drm_dbg(DRM_UT_VBL, fmt, ##__VA_ARGS__) ^~~ drivers/gpu/drm/drm_vblank.c:274:22: note: format string is defined here " current=%llu, diff=%u, hw=%u hw_last=%u\n", ~~~^ %lu So, fix that with a typecast. Signed-off-by: Lyude Paul Co-developed-by: Dave Airlie Signed-off-by: Sam Ravnborg [fixed too long line] Link: https://patchwork.freedesktop.org/patch/msgid/20200521204647.2578479-1-lyude@redhat.com commit 957ad9a02be6faa87594c58ac09460cd3d190d0e Author: Chris Wilson Date: Fri May 22 14:27:06 2020 +0100 drm/i915/gem: Avoid iterating an empty list Our __sgt_iter assumes that the scattergather list has at least one element. But during construction we may fail in allocating the first page, and so mark the first element as the terminator. This is unexpected! [22555.524752] RIP: 0010:shmem_get_pages+0x506/0x710 [i915] [22555.524759] Code: 49 8b 2c 24 31 c0 66 89 44 24 40 48 85 ed 0f 84 62 01 00 00 4c 8b 75 00 8b 5d 08 44 8b 7d 0c 48 8b 0d 7e 34 07 e2 49 83 e6 fc <49> 8b 16 41 01 df 48 89 cf 48 89 d0 48 c1 e8 2d 48 85 c9 0f 84 c8 [22555.524765] RSP: 0018:ffffc9000053f9d0 EFLAGS: 00010246 [22555.524770] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff8881ffffa000 [22555.524774] RDX: fffffffffffffff4 RSI: ffffffffffffffff RDI: ffffffff821efe00 [22555.524778] RBP: ffff8881b099ab00 R08: 0000000000000000 R09: 00000000fffffff4 [22555.524782] R10: 0000000000000002 R11: 00000000ffec0a02 R12: ffff8881cd3c8d60 [22555.524786] R13: 00000000fffffff4 R14: 0000000000000000 R15: 0000000000000000 [22555.524790] FS: 00007f4fbeb9b9c0(0000) GS:ffff8881f8580000(0000) knlGS:0000000000000000 [22555.524795] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [22555.524799] CR2: 0000000000000000 CR3: 00000001ec7f0004 CR4: 00000000001606e0 [22555.524803] Call Trace: [22555.524919] __i915_gem_object_get_pages+0x4f/0x60 [i915] Fixes: 85d1225ec066 ("drm/i915: Introduce & use new lightweight SGL iterators") Signed-off-by: Chris Wilson Cc: Matthew Auld Cc: Tvrtko Ursulin Cc: # v4.8+ Reviewed-by: Matthew Auld Reviewed-by: Maciej Patelczyk Link: https://patchwork.freedesktop.org/patch/msgid/20200522132706.5133-1-chris@chris-wilson.co.uk commit cac91e671ad5dc86ff71e81f5c1ec0ac149c32b9 Author: Stanislav Lisovskiy Date: Fri May 22 16:18:43 2020 +0300 drm/i915: Fix includes and local vars order Removed duplicate include and fixed comment > 80 chars. v2: Added newline after system include and between functions Reviewed-by: Chris Wilson Signed-off-by: Stanislav Lisovskiy Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200522131843.20477-1-stanislav.lisovskiy@intel.com commit b975abbd382fe442713a4c233549abb90e57c22b Author: Qiushi Wu Date: Fri May 22 09:34:51 2020 +0100 agp/intel: Fix a memory leak on module initialisation failure In intel_gtt_setup_scratch_page(), pointer "page" is not released if pci_dma_mapping_error() return an error, leading to a memory leak on module initialisation failure. Simply fix this issue by freeing "page" before return. Fixes: 0e87d2b06cb46 ("intel-gtt: initialize our own scratch page") Signed-off-by: Qiushi Wu Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200522083451.7448-1-chris@chris-wilson.co.uk commit 2992b543b8f4df60a1009dfac9390a141b6fd6c4 Author: Swathi Dhanavanthri Date: Wed May 20 23:44:48 2020 -0700 drm/i915/ehl: Extend w/a 14010685332 to JSP/MCC This is a permanent w/a for JSL/EHL.This is to be applied to the PCH types on JSL/EHL ie JSP/MCC Bspec: 52888 v2: Fixed the wrong usage of logical OR(ville) v3: Removed extra braces, changed the check(jose) Signed-off-by: Swathi Dhanavanthri Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200521064448.29522-1-swathi.dhanavanthri@intel.com commit 82ea174dc5425d4e85e25d0c4ba961a2e494392a Author: Stanislav Lisovskiy Date: Tue May 19 16:11:17 2020 +0300 drm/i915: Remove unneeded hack now for CDCLK No need to bump up CDCLK now, as it is now correctly calculated, accounting for DBuf BW as BSpec says. Reviewed-by: Manasi Navare Signed-off-by: Stanislav Lisovskiy Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200519131117.17190-8-stanislav.lisovskiy@intel.com commit cd19154608610ab4cdd6c039e9214b8dd281845c Author: Stanislav Lisovskiy Date: Wed May 20 18:00:58 2020 +0300 drm/i915: Adjust CDCLK accordingly to our DBuf bw needs According to BSpec max BW per slice is calculated using formula Max BW = CDCLK * 64. Currently when calculating min CDCLK we account only per plane requirements, however in order to avoid FIFO underruns we need to estimate accumulated BW consumed by all planes(ddb entries basically) residing on that particular DBuf slice. This will allow us to put CDCLK lower and save power when we don't need that much bandwidth or gain additional performance once plane consumption grows. v2: - Fix long line warning - Limited new DBuf bw checks to only gens >= 11 v3: - Lets track used Dbuf bw per slice and per crtc in bw state (or may be in DBuf state in future), that way we don't need to have all crtcs in state and those only if we detect if are actually going to change cdclk, just same way as we do with other stuff, i.e intel_atomic_serialize_global_state and co. Just as per Ville's paradigm. - Made dbuf bw calculation procedure look nicer by introducing for_each_dbuf_slice_in_mask - we often will now need to iterate slices using mask. - According to experimental results CDCLK * 64 accounts for overall bandwidth across all dbufs, not per dbuf. v4: - Fixed missing const(Ville) - Removed spurious whitespaces(Ville) - Fixed local variable init(reduced scope where not needed) - Added some comments about data rate for planar formats - Changed struct intel_crtc_bw to intel_dbuf_bw - Moved dbuf bw calculation to intel_compute_min_cdclk(Ville) v5: - Removed unneeded macro v6: - Prevent too frequent CDCLK switching back and forth: Always switch to higher CDCLK when needed to prevent bandwidth issues, however don't switch to lower CDCLK earlier than once in 30 minutes in order to prevent constant modeset blinking. We could of course not switch back at all, however this is bad from power consumption point of view. v7: - Fixed to track cdclk using bw_state, modeset will be now triggered only when CDCLK change is really needed. v8: - Lock global state if bw_state->min_cdclk is changed. - Try getting bw_state only if there are crtcs in the commit (need to have read-locked global state) v9: - Do not do Dbuf bw check for gens < 9 - triggers WARN as ddb_size is 0. v10: - Lock global state for older gens as well. v11: - Define new bw_calc_min_cdclk hook, instead of using a condition(Manasi Navare) v12: - Fixed rebase conflict v13: - Added spaces after declarations to make checkpatch happy. Signed-off-by: Stanislav Lisovskiy Reviewed-by: Manasi Navare Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200520150058.16123-1-stanislav.lisovskiy@intel.com commit 8435576b3f69451127fd6149affb94741a82293e Author: Stanislav Lisovskiy Date: Tue May 19 16:11:15 2020 +0300 drm/i915: Introduce for_each_dbuf_slice_in_mask macro We quite often need now to iterate only particular dbuf slices in mask, whether they are active or related to particular crtc. v2: - Minor code refactoring v3: - Use enum for max slices instead of macro Let's make our life a bit easier and use a macro for that. Reviewed-by: Manasi Navare Signed-off-by: Stanislav Lisovskiy Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200519131117.17190-6-stanislav.lisovskiy@intel.com commit cf129762ba15ae645cbfb4fc916f24e5538b9cee Author: Stanislav Lisovskiy Date: Wed May 20 17:59:45 2020 +0300 drm/i915: Plane configuration affects CDCLK in Gen11+ So lets support it. v2: - Fixed "from" field which got corrupted for some weird reason Reviewed-by: Manasi Navare Signed-off-by: Stanislav Lisovskiy Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200520145945.15997-1-stanislav.lisovskiy@intel.com commit 9877c37e05c8428ed80cc9652d41322ff5fa59ed Author: Stanislav Lisovskiy Date: Wed May 20 17:58:27 2020 +0300 drm/i915: Check plane configuration properly Checking with hweight8 if plane configuration had changed seems to be wrong as different plane configs can result in a same hamming weight. So lets check the bitmask itself. v2: Fixed "from" field which got corrupted for some weird reason Reviewed-by: Manasi Navare Signed-off-by: Stanislav Lisovskiy Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200520145827.15887-1-stanislav.lisovskiy@intel.com commit 4f0b4352bd26eff85f972ccf12bcdf9236a42175 Author: Stanislav Lisovskiy Date: Tue May 19 16:11:12 2020 +0300 drm/i915: Extract cdclk requirements checking to separate function In Gen11+ whenever we might exceed DBuf bandwidth we might need to recalculate CDCLK which DBuf bandwidth is scaled with. Total Dbuf bw used might change based on particular plane needs. Thus to calculate if cdclk needs to be changed it is not enough anymore to check plane configuration and plane min cdclk, per DBuf bw can be calculated only after wm/ddb calculation is done and all required planes are added into the state. In order to keep all min_cdclk related checks in one place let's extract it into separate function, checking and modifying any_ms. Reviewed-by: Manasi Navare Signed-off-by: Stanislav Lisovskiy Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200519131117.17190-3-stanislav.lisovskiy@intel.com commit c93b9b2c79296e7ea0fe31f1eafda20bb288dafd Author: Stanislav Lisovskiy Date: Tue May 19 16:11:11 2020 +0300 drm/i915: Decouple cdclk calculation from modeset checks We need to calculate cdclk after watermarks/ddb has been calculated as with recent hw CDCLK needs to be adjusted accordingly to DBuf requirements, which is not possible with current code organization. Setting CDCLK according to DBuf BW requirements and not just rejecting if it doesn't satisfy BW requirements, will allow us to save power when it is possible and gain additional bandwidth when it's needed - i.e boosting both our power management and perfomance capabilities. This patch is preparation for that, first we now extract modeset calculation from modeset checks, in order to call it after wm/ddb has been calculated. v2: - Extract only intel_modeset_calc_cdclk from intel_modeset_checks (Ville Syrjälä) v3: - Clear plls after intel_modeset_calc_cdclk v4: - Added r-b from previous revision to commit message Reviewed-by: Ville Syrjälä Signed-off-by: Stanislav Lisovskiy Signed-off-by: Manasi Navare Link: https://patchwork.freedesktop.org/patch/msgid/20200519131117.17190-2-stanislav.lisovskiy@intel.com commit aedbe0a1af585edc91221890f3a2a9ea2a319336 Author: Chris Wilson Date: Thu May 21 15:49:49 2020 +0100 drm/i915: Remove PIN_UPDATE for i915_vma_pin As we no longer use PIN_UPDATE (since commit 7d0aa0db4375 ("drm/i915/gem: Unbind all current vma on changing cache-level")) we can remove PIN_UPDATE itself. The benefit is just in simplifing the vma bind. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200521144949.25357-1-chris@chris-wilson.co.uk commit 32a4605b38c30689a6a18f3f4c7d3133ac9d3277 Author: Chris Wilson Date: Thu May 21 15:06:17 2020 +0100 drm/i915: Avoid using rq->engine after free during i915_fence_release In order to be valid to dereference during the i915_fence_release, after retiring the fence and releasing its refererences, we assume that rq->engine can only be a real engine (that stay intact until the device is shutdown after all fences have been flushed). However, due to a quirk of preempt-to-busy, we may retire a request that still belongs to a virtual engine and so eventually free it with rq->engine being invalid. To avoid dereferencing that invalid engine, we look at the execution_mask which if it indicates it may be executed on more than one engine, we know it originated on a virtual engine and may still be on one. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1906 Fixes: 43acd6516ca9 ("drm/i915: Keep a per-engine request pool") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200521140617.30015-2-chris@chris-wilson.co.uk commit 0eb670aac27b1d615004c29efec595616e3e091a Author: Chris Wilson Date: Thu May 21 15:06:16 2020 +0100 drm/i915: Disable semaphore inter-engine sync without timeslicing Since the removal of the no-semaphore boosting, we rely on timeslicing to reorder passed inter-dependency hogs across the engines. However, we require preemption to support timeslicing into user payloads, and not all machine support preemption so we do not universally enable timeslicing, even when it would correctly preempt our own inter-engine semaphores. Since timeslicing and semaphore priority deboosting is now disabled on Broadwell/Braswell, we have to follow suite and not use semaphores. Testcase: igt/gem_exec_schedule/semaphore-codependency # bdw/bsw Fixes: 18e4af04d218 ("drm/i915: Drop no-semaphore boosting") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Mika Kuoppala Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200521140617.30015-1-chris@chris-wilson.co.uk commit 4f44afe85243f5d97db2dd14528870c09b3cd887 Author: Chris Wilson Date: Thu May 21 13:43:04 2020 +0100 drm/i915/selftests: Flush the submission, not cancel it! Use intel_engine_flush_submission() when we want to ensure that the tasklet is run. tasklet_kill(), while it may ensure that an ongoing tasklet is completed, also prevents the tasklet from running if it's already scheduled and hasn't yet been run. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1874 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200521124304.3157692-1-chris@chris-wilson.co.uk commit 1a5392479207a9e514c111ebb881b677bda48c20 Author: Chris Wilson Date: Thu May 21 08:10:59 2020 +0100 drm/i915/selftests: Measure CS_TIMESTAMP Count the number of CS_TIMESTAMP ticks and check that it matches our expectations. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200521071059.31726-1-chris@chris-wilson.co.uk commit 537af0b0caf4b18bf0414ff5ffb4d3d86633403c Author: Matt Atwood Date: Tue May 19 09:25:34 2020 -0700 drm/i915/ehl: Wa_22010271021 Reflect recent Bspec changes. Bspec: 33451 Signed-off-by: Matt Atwood Signed-off-by: José Roberto de Souza Reviewed-by: Swathi Dhanavanthri Link: https://patchwork.freedesktop.org/patch/msgid/20200519162534.10035-1-matthew.s.atwood@intel.com commit 38d6fd406aaa30a1381074b083776cd280479e22 Author: Daniel Vetter Date: Mon May 11 11:11:40 2020 +0200 drm/writeback: don't set fence->ops to default It's the default. Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Michael J. Ruhl Link: https://patchwork.freedesktop.org/patch/msgid/20200511091142.208787-1-daniel.vetter@ffwll.ch commit 0e799e840a07e9cd843149be6811fd895d20a5a0 Author: Chris Wilson Date: Wed May 20 15:23:47 2020 +0100 drm: Restore the NULL check for drm_gem_object_put() Some users want to pass NULL to drm_gem_object_put(), but those using __drm_gem_object_put() did not. Compromise, have both and let the compiler sort it out. drm_gem_fb_destroy() calls drm_gem_object_put() with NULL obj causing: [ 11.584209] BUG: kernel NULL pointer dereference, address: 0000000000000000 [ 11.584213] #PF: supervisor write access in kernel mode [ 11.584215] #PF: error_code(0x0002) - not-present page [ 11.584216] PGD 0 P4D 0 [ 11.584220] Oops: 0002 [#1] SMP NOPTI [ 11.584223] CPU: 7 PID: 1571 Comm: gnome-shell Tainted: G E 5.7.0-rc1-1-default+ #27 [ 11.584225] Hardware name: Micro-Star International Co., Ltd. MS-7A31/X370 XPOWER GAMING TITANIUM (MS-7A31), BIOS 1.MR 12/03/2019 [ 11.584237] RIP: 0010:drm_gem_fb_destroy+0x28/0x70 [drm_kms_helper] [ 11.584256] Call Trace: [ 11.584279] drm_mode_rmfb+0x189/0x1c0 [drm] [ 11.584299] ? drm_mode_rmfb+0x1c0/0x1c0 [drm] [ 11.584314] drm_ioctl_kernel+0xaa/0xf0 [drm] [ 11.584329] drm_ioctl+0x1ff/0x3b0 [drm] [ 11.584347] ? drm_mode_rmfb+0x1c0/0x1c0 [drm] [ 11.584421] amdgpu_drm_ioctl+0x49/0x80 [amdgpu] [ 11.584427] ksys_ioctl+0x87/0xc0 [ 11.584430] __x64_sys_ioctl+0x16/0x20 [ 11.584434] do_syscall_64+0x5f/0x240 [ 11.584438] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 11.584440] RIP: 0033:0x7f0ef80f7227 Reported-by: Nirmoy Das Fixes: b5d250744ccc ("drm/gem: fold drm_gem_object_put_unlocked and __drm_gem_object_put()") Signed-off-by: Chris Wilson Cc: Nirmoy Das Cc: Emil Velikov Cc: Christian König . Acked-by: Nirmoy Das Reviewed-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200520142347.29060-1-chris@chris-wilson.co.uk commit 01f953e78e23d2c48fab96bc6f246af0c33464e8 Author: Matt Roper Date: Mon May 4 15:52:15 2020 -0700 drm/i915/rkl: RKL only uses PHY_MISC for PHY's A and B Since the number of platforms with this restriction are growing, let's separate out the platform logic into a has_phy_misc() function. Bspec: 50107 Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20200504225227.464666-11-matthew.d.roper@intel.com commit 93e2323b5c85a2b7ac4260d720de26ca5d5ad796 Author: Matt Roper Date: Mon May 4 15:52:13 2020 -0700 drm/i915/rkl: Add power well support RKL power wells are similar to TGL power wells, but have some important differences: * PG1 now has pipe A's VDSC (rather than sticking it in PG2) * PG2 no longer exists * DDI-C (aka TC-1) moves from PG1 -> PG3 * PG5 no longer exists due to the lack of a fourth pipe Also note that what we refer to as 'DDI-C' and 'DDI-D' need to actually be programmed as TC-1 and TC-2 even though this platform doesn't have TC outputs. Bspec: 49234 Cc: Imre Deak Cc: Lucas De Marchi Cc: Anshuman Gupta Signed-off-by: Matt Roper Reviewed-by: Anshuman Gupta Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20200504225227.464666-9-matthew.d.roper@intel.com commit 99e2d8bcb88763fe265ca0e99708eb55e1d44455 Author: Matt Roper Date: Mon May 4 15:52:12 2020 -0700 drm/i915/rkl: Limit number of universal planes to 5 RKL only has five universal planes, plus a cursor. Since the bottom-most universal plane is considered the primary plane, set the number of sprites available on this platform to 4. In general, the plane capabilities of the remaining planes stay the same as TGL. However the NV12 Y-plane support moves down to the new top two planes and now only the bottom three planes can be used for NV12 UV. Bspec: 49181 Bspec: 49251 Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20200504225227.464666-8-matthew.d.roper@intel.com commit affd7bb6169ef72985fa657b05c519f730d260f7 Author: Matt Roper Date: Mon May 4 15:52:11 2020 -0700 drm/i915/rkl: Update memory bandwidth parameters The RKL platform has different memory characteristics from past platforms. Update the values used by our memory bandwidth calculations accordingly. Bspec: 53998 Cc: James Ausmus Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20200504225227.464666-7-matthew.d.roper@intel.com commit efbee021ad02f786106c1ef1a5b89fd9045283cc Author: Matt Roper Date: Mon May 4 15:52:07 2020 -0700 x86/gpu: add RKL stolen memory support RKL re-uses the same stolen memory registers as TGL and ICL. Bspec: 52055 Bspec: 49589 Bspec: 49636 Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Acked-by: Borislav Petkov Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20200504225227.464666-3-matthew.d.roper@intel.com commit ef8255506f66825cfaa170bc6b10f34d7462f73b Author: Daniel Vetter Date: Tue May 19 15:27:56 2020 +0200 dma-fence: add might_sleep annotation to _wait() Do it uncontionally, there's a separate peek function with dma_fence_is_signalled() which can be called from atomic context. v2: Consensus calls for an unconditional might_sleep (Chris, Christian) Full audit: - dma-fence.h: Uses MAX_SCHEDULE_TIMOUT, good chance this sleeps - dma-resv.c: Timeout always at least 1 - st-dma-fence.c: Save to sleep in testcases - amdgpu_cs.c: Both callers are for variants of the wait ioctl - amdgpu_device.c: Two callers in vram recover code, both right next to mutex_lock. - amdgpu_vm.c: Use in the vm_wait ioctl, next to _reserve/unreserve - remaining functions in amdgpu: All for test_ib implementations for various engines, caller for that looks all safe (debugfs, driver load, reset) - etnaviv: another wait ioctl - habanalabs: another wait ioctl - nouveau_fence.c: hardcoded 15*HZ ... glorious - nouveau_gem.c: hardcoded 2*HZ ... so not even super consistent, but this one does have a WARN_ON :-/ At least this one is only a fallback path for when kmalloc fails. Maybe this should be put onto some worker list instead, instead of a work per unamp ... - i915/selftests: Hardecoded HZ / 4 or HZ / 8 - i915/gt/selftests: Going up the callchain looks safe looking at nearby callers - i915/gt/intel_gt_requests.c. Wrapped in a mutex_lock - i915/gem_i915_gem_wait.c: The i915-version which is called instead for i915 fences already has a might_sleep() annotation, so all good Cc: Alex Deucher Cc: Lucas Stach Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Ben Skeggs Cc: "VMware Graphics" Cc: Oded Gabbay Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: linux-rdma@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Christian König Reviewed-by: Chris Wilson Reviewed-by: Christian König Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200519132756.682888-1-daniel.vetter@ffwll.ch commit f2c1061a3677b400a945d9238f17bf33d669acff Author: Chris Wilson Date: Wed May 20 08:30:48 2020 +0100 drm/i915/gt: Remove errant assertion in __intel_context_do_pin This assertion was removed in commit b412c63f1cba ("drm/i915/gt: Report context-is-closed prior to pinning"), but accidentally restored by a cherry-pick into drm-next and now has percolated back to drm-intel-next-queued. Fixes: 2e46a2a0b014 ("drm/i915: Use explicit flag to mark unreachable intel_context") Fixes: 2b703bbda271 ("Merge drm/drm-next into drm-intel-next-queued") References: b412c63f1cba ("drm/i915/gt: Report context-is-closed prior to pinning") Signed-off-by: Chris Wilson Cc: Rodrigo Vivi Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20200520073048.2394034-1-chris@chris-wilson.co.uk commit a09e89e9782747f79abc342f3409fef9f23eae9a Author: Matt Roper Date: Mon May 4 15:52:10 2020 -0700 drm/i915/rkl: Add PCH support Rocket Lake can pair with either TGP or CMP. Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20200504225227.464666-6-matthew.d.roper@intel.com commit 3a303a3570d7265f7dba7b8a55bbd364afa6507f Author: Matt Roper Date: Mon May 4 15:52:09 2020 -0700 drm/i915/rkl: Load DMC firmware for Rocket Lake Cc: Anusha Srivatsa Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20200504225227.464666-5-matthew.d.roper@intel.com commit d727e0b5a2fccf7d938f7465620e9f76a732d498 Author: Matt Roper Date: Mon May 4 15:52:08 2020 -0700 drm/i915/rkl: Re-use TGL GuC/HuC firmware RKL uses the same GuC and HuC as TGL and should load the same firmwares. Bspec: 50668 Cc: Anusha Srivatsa Signed-off-by: Matt Roper Reviewed-by: Anusha Srivatsa Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20200504225227.464666-4-matthew.d.roper@intel.com commit 123f62de419f2a49449629ef822ed2c393a4781c Author: Matt Roper Date: Mon May 4 15:52:06 2020 -0700 drm/i915/rkl: Add RKL platform info and PCI ids Introduce the basic platform definition, macros, and PCI IDs. Bspec: 44501 Cc: Lucas De Marchi Cc: Caz Yokoyama Cc: Aditya Swarup Signed-off-by: Matt Roper Acked-by: Caz Yokoyama Reviewed-by: Anusha Srivatsa Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20200504225227.464666-2-matthew.d.roper@intel.com commit 17ee1eb6d884a8d3fa331697ae9b6ffd60380bd5 Author: Emil Velikov Date: Mon May 18 09:34:56 2020 +0100 drm/file: wrap excessively long line Signed-off-by: Emil Velikov Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200518083456.132248-1-emil.l.velikov@gmail.com commit 5a2ba99222fc2897311ed48745562952b8f030ad Author: Emil Velikov Date: Mon May 18 09:33:15 2020 +0100 drm: print the current->comm alongside the pid The question of "what process is this pid" keeps on popping up, so lets print the process name alongside the pid. Cc: Mauro Rossi Cc: Bob Beckett Cc: Pekka Paalanen Signed-off-by: Emil Velikov Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200518083315.129948-1-emil.l.velikov@gmail.com commit ab15d56e27be47b7feebffd6e8319ece01959fbf Author: Emil Velikov Date: Fri May 15 10:51:18 2020 +0100 drm: remove transient drm_gem_object_put_unlocked() As of last commit, all the drivers have been updated away from the _unlocked helper. As such we can now remove the transient #define. v2: keep sed and #define removal separate Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg (v1) Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-39-emil.l.velikov@gmail.com commit 95865e3a959047aa1ae7573d3fefe5cdef1cf2ff Author: Emil Velikov Date: Fri May 15 10:51:17 2020 +0100 drm/xen: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Oleksandr Andrushchenko Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Oleksandr Andrushchenko Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-38-emil.l.velikov@gmail.com commit b7140d4ee52c6d966cc266bf87733d0aabf74809 Author: Emil Velikov Date: Fri May 15 10:51:16 2020 +0100 drm/vkms: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done v2: - Rebase Cc: Rodrigo Siqueira Cc: Haneen Mohammed Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg (v1) Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-37-emil.l.velikov@gmail.com commit 969397eb9a0e9c6220d1653b0645f1655c7bfdad Author: Emil Velikov Date: Fri May 15 10:51:15 2020 +0100 drm/virtio: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: David Airlie Cc: Gerd Hoffmann Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-36-emil.l.velikov@gmail.com commit a71a215a04e5dd82c302563ba3a8102d0b4683f5 Author: Emil Velikov Date: Fri May 15 10:51:14 2020 +0100 drm/vgem: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: David Airlie Cc: Daniel Vetter Cc: Emil Velikov Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-35-emil.l.velikov@gmail.com commit f7a8cd30c8fa4a065d420a698a685672b1021572 Author: Emil Velikov Date: Fri May 15 10:51:13 2020 +0100 drm/vc4: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Eric Anholt Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-34-emil.l.velikov@gmail.com commit 2b86189e4d59c98ce4e2eaf6d102317dd435774d Author: Emil Velikov Date: Fri May 15 10:51:12 2020 +0100 drm/v3d: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Eric Anholt Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-33-emil.l.velikov@gmail.com commit b8912e2950638620614bddb9367924949c304fcd Author: Emil Velikov Date: Fri May 15 10:51:11 2020 +0100 drm/tegra: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Thierry Reding Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thierry Reding Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-32-emil.l.velikov@gmail.com commit b430fe083ec7295dc988d3ce40c0cbfa6b03f117 Author: Emil Velikov Date: Fri May 15 10:51:10 2020 +0100 drm/rockchip: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Sandy Huang Cc: "Heiko Stübner" Cc: David Airlie Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Heiko Stuebner Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-31-emil.l.velikov@gmail.com commit f11fb66ae921935a6eddfcfaf9e45d363cd7ea7c Author: Emil Velikov Date: Fri May 15 10:51:09 2020 +0100 drm/radeon: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-30-emil.l.velikov@gmail.com commit 9c86fb18ad9d3587e5112f096f0d0ec3cbf43a65 Author: Emil Velikov Date: Fri May 15 10:51:08 2020 +0100 drm/qxl: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Dave Airlie Cc: Gerd Hoffmann Cc: David Airlie Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-29-emil.l.velikov@gmail.com commit 496d0cc63f9c075e86f2b1cbdbc8c0e496731a16 Author: Emil Velikov Date: Fri May 15 10:51:07 2020 +0100 drm/panfrost: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Rob Herring Cc: Tomeu Vizoso Cc: Steven Price Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Reviewed-by: Steven Price Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-28-emil.l.velikov@gmail.com commit d742cdd613e6c1db54bbd35f4b8a96dfc0ca77d2 Author: Emil Velikov Date: Fri May 15 10:51:06 2020 +0100 drm/omapdrm: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Tomi Valkeinen Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-27-emil.l.velikov@gmail.com commit cdc194cebd715a42bdb5f9e514581ec41cd9186f Author: Emil Velikov Date: Fri May 15 10:51:05 2020 +0100 drm/nouveau: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Ben Skeggs Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-26-emil.l.velikov@gmail.com commit f7d33950cd6a70a644324967b6a7224a89440698 Author: Emil Velikov Date: Fri May 15 10:51:04 2020 +0100 drm/msm: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Rob Clark Cc: Sean Paul Cc: David Airlie Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-25-emil.l.velikov@gmail.com commit c457b11afff24776e09441cc470fc661f8066ef6 Author: Emil Velikov Date: Fri May 15 10:51:03 2020 +0100 drm/mgag200: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Dave Airlie Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-24-emil.l.velikov@gmail.com commit 556372dfbaf4cb3900ee5337955c6850bee0b2f8 Author: Emil Velikov Date: Fri May 15 10:51:02 2020 +0100 drm/mediatek: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: David Airlie Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Chun-Kuang Hu Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-23-emil.l.velikov@gmail.com commit 4ded85501c40534d2867eecea40d83cf76f05891 Author: Emil Velikov Date: Fri May 15 10:51:01 2020 +0100 drm/lima: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Qiang Yu Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-22-emil.l.velikov@gmail.com commit 1b3cddceb8a14d4d21062a0547ce5289010cc995 Author: Emil Velikov Date: Fri May 15 10:51:00 2020 +0100 drm/i915: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-21-emil.l.velikov@gmail.com commit e19baf704a4b51be4888447dcd2e5f032a27fd9f Author: Emil Velikov Date: Fri May 15 10:50:59 2020 +0100 drm/gma500: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Patrik Jakobsson Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-20-emil.l.velikov@gmail.com commit 1138a5f63ad9c0a5e602d7b72e4803314953e9f9 Author: Emil Velikov Date: Fri May 15 10:50:58 2020 +0100 drm/exynos: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-19-emil.l.velikov@gmail.com commit 6780bf32b2b07e219dad186788b63041c79977a1 Author: Emil Velikov Date: Fri May 15 10:50:57 2020 +0100 drm/etnaviv: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-18-emil.l.velikov@gmail.com commit dda156cf89aa4120e7bb79ffc949cbf9cfbdea50 Author: Emil Velikov Date: Fri May 15 10:50:56 2020 +0100 drm/armada: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Russell King Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-17-emil.l.velikov@gmail.com commit 38e7abf7e91744bcbe9b3a6e86f3c11edc9f478c Author: Emil Velikov Date: Fri May 15 10:50:55 2020 +0100 drm/arm: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Liviu Dudau Cc: Brian Starkey Cc: David Airlie Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Liviu Dudau Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-16-emil.l.velikov@gmail.com commit e07ddb0ce7cde64fdfcd96e96d1dce8538fa0bb0 Author: Emil Velikov Date: Fri May 15 10:50:54 2020 +0100 drm/amd: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Cc: Alex Deucher Cc: "Christian König" Cc: "David (ChunMing) Zhou" Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-15-emil.l.velikov@gmail.com commit be6ee102341bc4d07e050dda119ecb91229bc654 Author: Emil Velikov Date: Fri May 15 10:50:53 2020 +0100 drm: remove _unlocked suffix in drm_gem_object_put_unlocked Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Just drop the suffix. It makes the API cleaner. Done via the following script: __from=drm_gem_object_put_unlocked __to=drm_gem_object_put for __file in $(git grep --name-only $__from); do sed -i "s/$__from/$__to/g" $__file; done Pay special attention to the compat #define v2: keep sed and #define removal separate Cc: David Airlie Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg (v1) Reviewed-by: Steven Price Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-14-emil.l.velikov@gmail.com commit 2f4dd13d4bb8a85f6d5b66a18989509924e4f5e9 Author: Emil Velikov Date: Fri May 15 10:50:52 2020 +0100 drm/gem: add drm_gem_object_put helper Spelling out _unlocked for each and every driver is a annoying. Especially if we consider how many drivers, do not know (or need to) about the horror stories involving struct_mutex. Add helper, which will allow us to transition the drivers one by one, dropping the suffix. v2: add missing space after function name (Jani) Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg (v1) Reviewed-by: Steven Price Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-13-emil.l.velikov@gmail.com commit eecd7fd8bf58d5d59f948d2655e41760d7cf17d9 Author: Emil Velikov Date: Fri May 15 10:50:51 2020 +0100 drm/gem: add _locked suffix to drm_gem_object_put Vast majority of DRM (core and drivers) are struct_mutex free. As such we have only a handful of cases where the locked helper should be used. Make that stand out a little bit better. Done via the following script: __from=drm_gem_object_put __to=drm_gem_object_put_locked for __file in $(git grep --name-only --word-regexp $__from); do sed -i "s/\<$__from\>/$__to/g" $__file; done Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-msm@vger.kernel.org Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Reviewed-by: Steven Price Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-12-emil.l.velikov@gmail.com commit b5d250744cccfb40024de663ea1f4da04e6d959c Author: Emil Velikov Date: Fri May 15 10:50:50 2020 +0100 drm/gem: fold drm_gem_object_put_unlocked and __drm_gem_object_put() With earlier patch we removed the overhead so now we can lift the helper into the header effectively folding it with __drm_object_put. v2: drop struct_mutex references (Daniel) Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg (v1) Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-11-emil.l.velikov@gmail.com commit 1a9458aeb8eb48bfa5f9b3e7682bddc28fd0b85e Author: Emil Velikov Date: Fri May 15 10:50:49 2020 +0100 drm: remove drm_driver::gem_free_object No drivers set the callback, so remove it all together. Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Reviewed-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-10-emil.l.velikov@gmail.com commit 00c47f569d5fc1d7e2b58b2dfda64f3e01233e69 Author: Emil Velikov Date: Fri May 15 10:50:48 2020 +0100 drm/gma500: Use lockless gem BO free callback No dev->struct_mutex anywhere to be seen. Cc: Patrik Jakobsson Cc: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-9-emil.l.velikov@gmail.com commit 1a87f67a66de4ad0c0d79fd86b6c5273143387c3 Author: Emil Velikov Date: Fri May 15 10:50:47 2020 +0100 drm/amdgpu: use the unlocked drm_gem_object_put The driver does not hold struct_mutex, thus using the locked version of the helper is incorrect. Cc: Alex Deucher Cc: Christian König Cc: amd-gfx@lists.freedesktop.org Fixes: a39414716ca0 ("drm/amdgpu: add independent DMA-buf import v9") Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Reviewed-by: Christian König Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-8-emil.l.velikov@gmail.com commit 2891586f323a88f486f734aaf7c6ceb33cec7b27 Author: Emil Velikov Date: Fri May 15 10:50:46 2020 +0100 drm/doc: drop struct_mutex reference for drm_gem_object_free The comment that struct_mutex must be held is misleading. It is only required when .gem_free_object() is used. Since that one is going with the next patches, drop the reference. Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-7-emil.l.velikov@gmail.com commit e33f4234263da26154be0b1e5ffc7a2c5e52c3e3 Author: Emil Velikov Date: Fri May 15 10:50:45 2020 +0100 drm/doc: add WARNING for drm_device::struct_mutex The mutex should be used, only by legacy drivers. Add a big warning to deter people from using it. Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Emil Velikov Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-6-emil.l.velikov@gmail.com commit 5b4231fb62f05457ef5ff283796cfd2df28ea2a1 Author: Emil Velikov Date: Fri May 15 10:50:44 2020 +0100 drm/doc: drop struct_mutex references There's little point in providing partial and ancient information about the struct_mutex. Some drivers are using it, new ones should not. As-it this only provides for confusion. Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-5-emil.l.velikov@gmail.com commit efdff86db7978043af83d2e257c67cf9b921143f Author: Emil Velikov Date: Fri May 15 10:50:43 2020 +0100 drm/todo: mention i915 in the struct_mutex section The i915 driver uses the struct_mutex, eventhough it does not use the locked version of the drm_object_gem API. Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-4-emil.l.velikov@gmail.com commit 2ea8ad42ec8d04c014d04648170ee9c3ad119585 Author: Emil Velikov Date: Fri May 15 10:50:42 2020 +0100 drm/gem: use _unlocked reference in drm_gem_objects_lookup docs Use the drm_gem_object_put_unlocked in the documentation for drm_gem_objects_lookup. The locked version of the helper should be used solely by people who know exactly what they are doing. Should prevent issues like ones adddressed with the next patch. Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-3-emil.l.velikov@gmail.com commit 7951117f97ac81b272caff23dfd497c0e190f388 Author: Emil Velikov Date: Fri May 15 10:50:41 2020 +0100 drm: remove unused drm_gem.h include There's nothing GEM related in the file - the drm_gem.h include is not needed. Signed-off-by: Emil Velikov Acked-by: Sam Ravnborg Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20200515095118.2743122-2-emil.l.velikov@gmail.com commit 6ad249ba59badc7ff157d4db1f835748f0e2c9b6 Author: Chris Wilson Date: Tue May 19 14:20:46 2020 +0100 drm/i915/gt: Incorporate the virtual engine into timeslicing It was quite the oversight to only factor in the normal queue to decide the timeslicing switch priority. By leaving out the next virtual request from the priority decision, we would not timeslice the current engine if there was an available virtual request. Testcase: igt/gem_exec_balancer/sliced Fixes: 3df2deed411e ("drm/i915/execlists: Enable timeslice on partial virtual engine dequeue") Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200519132046.22443-3-chris@chris-wilson.co.uk commit 1ee05f9e6d32a43c029d31958ff91e5ca186ad4d Author: Chris Wilson Date: Tue May 19 14:20:45 2020 +0100 drm/i915/gt: Kick virtual siblings on timeslice out If we decide to timeslice out the current virtual request, we will unsubmit it while it is still busy (ve->context.inflight == sibling[0]). If the virtual tasklet and then the other sibling tasklets run before we completely schedule out the active virtual request for the preemption, those other tasklets will see that the virtul request is still inflight on sibling[0] and leave it be. Therefore when we finally schedule-out the virtual request and if we see that we have passed it back to the virtual engine, reschedule the virtual tasklet so that it may be resubmitted on any of the siblings. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200519132046.22443-2-chris@chris-wilson.co.uk commit 4fe13f28d66ab568bb7303130b79347aa47f7ceb Author: Chris Wilson Date: Tue May 19 14:20:44 2020 +0100 drm/i915/selftests: Add tests for timeslicing virtual engines Make sure that we can execute a virtual request on an already busy engine, and conversely that we can execute a normal request if the engines are already fully occupied by virtual requests. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200519132046.22443-1-chris@chris-wilson.co.uk commit f73fbb5a59a7060f81afe4f924a69ab6bff0c46d Author: Chris Wilson Date: Tue May 19 07:31:15 2020 +0100 drm/i915/selftests: Check for an initial-breadcrumb in wait_for_submit() When we look at i915_request_is_started() we must be careful in case we are using a request that does not have the initial-breadcrumb and instead the is-started is being compared against the end of the previous request. This will make wait_for_submit() declare that a request has been already submitted too early. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200519063123.20673-4-chris@chris-wilson.co.uk commit 3a230a554dbbc6cd5016cf1b56ee77cfcd48c7d8 Author: Chris Wilson Date: Tue May 19 07:31:14 2020 +0100 drm/i915/selftests: Restore to default heartbeat Since we temporarily disable the heartbeat and restore back to the default value, we can use the stored defaults on the engine and avoid using a local. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200519063123.20673-3-chris@chris-wilson.co.uk commit ad6586850b6d718b1245bad6702028c1c773cfb9 Author: Chris Wilson Date: Tue May 19 07:31:13 2020 +0100 drm/i915/selftests: Change priority overflow detection Check for integer overflow in the priority chain, rather than against a type-constricted max-priority check. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200519063123.20673-2-chris@chris-wilson.co.uk commit b86fc6e5e89e5645b43f57171c26740ef38f9f4a Author: Chris Wilson Date: Tue May 19 07:31:12 2020 +0100 drm/i915: Don't set queue-priority hint when supressing the reschedule We recorded the execlists->queue_priority_hint update for the inflight request without kicking the tasklet. The next submitted request then failed to be scheduled as it had a lower priority than the hint, leaving the HW running with only the inflight request. Fixes: 6cebcf746f3f ("drm/i915: Tweak scheduler's kick_submission()") Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200519063123.20673-1-chris@chris-wilson.co.uk commit 25c26f18ea796a56830c2e356f2b3e0c929b0a6f Author: Chris Wilson Date: Tue May 19 14:08:02 2020 +0100 drm/i915/selftests: Measure dispatch latency A useful metric of the system's health is how fast we can tell the GPU to do various actions, so measure our latency. v2: Refactor all the instruction building into emitters. v3: Mark the error handling if not perfect, at least consistent. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200519130802.4067-1-chris@chris-wilson.co.uk commit 649c10ff85b94f7685c3a478e7788018a360f6e6 Author: Pankaj Bharadiya Date: Mon May 4 23:46:00 2020 +0530 drm/i915/runtime_pm: Prefer drm_WARN* over WARN* struct drm_device specific drm_WARN* macros include device information in the backtrace, so we know what device the warnings originate from. Prefer drm_WARN* over WARN*. Conversion is done with below semantic patch: @@ identifier func, T; @@ func(struct intel_runtime_pm *T,...) { + struct drm_i915_private *i915 = container_of(T, struct drm_i915_private, runtime_pm); <+... ( -WARN( +drm_WARN(&i915->drm, ...) | -WARN_ON( +drm_WARN_ON(&i915->drm, ...) | -WARN_ONCE( +drm_WARN_ONCE(&i915->drm, ...) | -WARN_ON_ONCE( +drm_WARN_ON_ONCE(&i915->drm, ...) ) ...+> } Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200504181600.18503-10-pankaj.laxminarayan.bharadiya@intel.com commit 19edeb388e9f5a0ba505bbf53059dc5a856a0c77 Author: Pankaj Bharadiya Date: Mon May 4 23:45:59 2020 +0530 drm/i915/pm: Prefer drm_WARN_ON over WARN_ON struct drm_device specific drm_WARN* macros include device information in the backtrace, so we know what device the warnings originate from. Prefer drm_WARN_ON over WARN_ON. Conversion is done with below sementic patch: @@ identifier func, T; @@ func(...) { ... struct intel_crtc *T = ...; +struct drm_i915_private *dev_priv = to_i915(T->base.dev); <+... -WARN_ON( +drm_WARN_ON(&dev_priv->drm, ...) ...+> } @@ identifier func, T; @@ func(struct intel_crtc_state *T,...) { +struct drm_i915_private *dev_priv = to_i915(T->uapi.crtc->dev); <+... -WARN_ON( +drm_WARN_ON(&dev_priv->drm, ...) ...+> } changes since v1: - Added dev_priv local variable and used it in drm_WARN_ON calls (Jani) Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200504181600.18503-9-pankaj.laxminarayan.bharadiya@intel.com commit bf07f6ebffefce2bbf3c318f9ce2f987774ea983 Author: Pankaj Bharadiya Date: Mon May 4 23:45:58 2020 +0530 drm/i915/pmu: Prefer drm_WARN_ON over WARN_ON struct drm_device specific drm_WARN* macros include device information in the backtrace, so we know what device the warnings originate from. Prefer drm_WARN_ON over WARN_ON. Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200504181600.18503-8-pankaj.laxminarayan.bharadiya@intel.com commit 7bda10095aaa7ab45249812c4f6b8ea55c7a45a2 Author: Pankaj Bharadiya Date: Mon May 4 23:45:57 2020 +0530 drm/i915/i915_drv: Prefer drm_WARN_ON over WARN_ON struct drm_device specific drm_WARN* macros include device information in the backtrace, so we know what device the warnings originate from. Prefer drm_WARN_ON over WARN_ON. changes since v1: - Add parentheses around the dev_priv macro argument (Jani) Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200504181600.18503-7-pankaj.laxminarayan.bharadiya@intel.com commit 6db20e27f6885aa71ed454f0e67cdfbf8637452f Author: Pankaj Bharadiya Date: Mon May 4 23:45:56 2020 +0530 drm/i915/gem: Prefer drm_WARN* over WARN* struct drm_device specific drm_WARN* macros include device information in the backtrace, so we know what device the warnings originate from. Prefer drm_WARN* over WARN* at places where struct drm_device pointer can be extracted. Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200504181600.18503-6-pankaj.laxminarayan.bharadiya@intel.com commit ef3929b64b9a1100a839ef06a68bb931d7303bfb Author: Pankaj Bharadiya Date: Mon May 4 23:45:55 2020 +0530 drm/i915/display/tc: Prefer drm_WARN_ON over WARN_ON struct drm_device specific drm_WARN* macros include device information in the backtrace, so we know what device the warnings originate from. Prefer drm_WARN_ON over WARN_ON. Conversion is done with below sementic patch: @@ identifier func, T; @@ func(...) { ... struct drm_i915_private *T = ...; <+... -WARN_ON( +drm_WARN_ON(&T->drm, ...) ...+> } @@ identifier func, T; @@ func(struct intel_digital_port *T,...) { +struct drm_i915_private *i915 = to_i915(T->base.base.dev); <+... -WARN_ON( +drm_WARN_ON(&i915->drm, ...) ...+> } changes since v1: - Add i915 local variable and use it in drm_WARN_ON (Jani) Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200504181600.18503-5-pankaj.laxminarayan.bharadiya@intel.com commit cb7cbb4b2aeca663f7dfca95649d90f292866dc6 Author: Pankaj Bharadiya Date: Mon May 4 23:45:54 2020 +0530 drm/i915/display/sdvo: Prefer drm_WARN* over WARN* struct drm_device specific drm_WARN* macros include device information in the backtrace, so we know what device the warnings originate from. Prefer drm_WARN* over WARN* calls. changes since v1: - Added dev_priv local variable and used it in drm_WARN* calls (Jani) Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200504181600.18503-4-pankaj.laxminarayan.bharadiya@intel.com commit 4f3604821974a600d493c88ccdd5db0bcc89041d Author: Pankaj Bharadiya Date: Mon May 4 23:45:53 2020 +0530 drm/i915/display/dp: Prefer drm_WARN* over WARN* struct drm_device specific drm_WARN* macros include device information in the backtrace, so we know what device the warnings originate from. Prefer drm_WARN* over WARN* at places where struct intel_dp or struct drm_i915_private pointer is available. Conversion is done with below sementic patch: @rule1@ identifier func, T; @@ func(...) { ... struct drm_i915_private *T = ...; <+... ( -WARN_ON( +drm_WARN_ON(&T->drm, ...) | -WARN_ON_ONCE( +drm_WARN_ON_ONCE(&T->drm, ...) ) ...+> } @rule2@ identifier func, T; @@ func(struct drm_i915_private *T,...) { <+... ( -WARN_ON( +drm_WARN_ON(&T->drm, ...) | -WARN_ON_ONCE( +drm_WARN_ON_ONCE(&T->drm, ...) ) ...+> } @rule3@ identifier func, T; @@ func(struct intel_dp *T,...) { + struct drm_i915_private *i915 = dp_to_i915(T); <+... ( -WARN_ON( +drm_WARN_ON(&i915->drm, ...) | -WARN_ON_ONCE( +drm_WARN_ON_ONCE(&i915->drm, ...) ) ...+> } @rule4@ identifier func, T; @@ func(...) { ... struct intel_dp *T = ...; + struct drm_i915_private *i915 = dp_to_i915(T); <+... ( -WARN_ON( +drm_WARN_ON(&i915->drm, ...) | -WARN_ON_ONCE( +drm_WARN_ON_ONCE(&i915->drm, ...) ) ...+> } Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200504181600.18503-3-pankaj.laxminarayan.bharadiya@intel.com commit 4c1ccdf721128a4e8299786d586d145164d3cfcd Author: Pankaj Bharadiya Date: Mon May 4 23:45:52 2020 +0530 drm/i915/display/display_power: Prefer drm_WARN_ON over WARN_ON struct drm_device specific drm_WARN* macros include device information in the backtrace, so we know what device the warnings originate from. Prefer drm_WARN_ON over WARN_ON at places where struct i915_power_domains struct is available. Conversion is done with below sementic patch: @@ identifier func, T; @@ func(struct i915_power_domains *T,...) { + struct drm_i915_private *i915 = container_of(T, struct drm_i915_private, power_domains); <+... -WARN_ON( +drm_WARN_ON(&i915->drm, ...) ...+> } changes since v1: - Fix commit subject (Jani) Signed-off-by: Pankaj Bharadiya Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200504181600.18503-2-pankaj.laxminarayan.bharadiya@intel.com commit 5bc1cf1466f635682c3e26eb4179541feeefb1be Author: Shawn Guo Date: Mon May 18 22:16:56 2020 +0800 iommu/qcom: add optional 'tbu' clock for TLB invalidate On some SoCs like MSM8939 with A405 adreno, there is a gfx_tbu clock needs to be on while doing TLB invalidate. Otherwise, TLBSYNC status will not be correctly reflected, causing the system to go into a bad state. Add it as an optional clock, so that platforms that have this clock can pass it over DT. While adding the third clock, let's switch to bulk clk API to simplify the enable/disable calls. clk_bulk_get() cannot used because the existing two clocks are required while the new one is optional. Signed-off-by: Shawn Guo Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20200518141656.26284-1-shawn.guo@linaro.org Signed-off-by: Joerg Roedel commit ae9b6cfe1352da25931bce3ea4acfd4dc1ac8a85 Author: Imre Deak Date: Thu May 14 23:45:53 2020 +0300 drm/i915: Fix AUX power domain toggling across TypeC mode resets Make sure to select the port's AUX power domain while holding the TC port lock. The domain depends on the port's current TC mode, which may get changed under us if we're not holding the lock. This was left out from commit 8c10e2262663 ("drm/i915: Keep the TypeC port mode fixed for detect/AUX transfers") Cc: # v5.4+ Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20200514204553.27193-1-imre.deak@intel.com commit 488e017904f9a04d3b771a0bd70be97da57a834d Author: Ville Syrjälä Date: Thu May 14 15:38:38 2020 +0300 drm/i915: Read out hrawclk on all gen3+ platforms I've checked a bunch of gen3/4 machines and all seem to have consistent FSB frequency information in the CLKCFG register. So let's read out hrawclk on all gen3+ machines. Although apart from g4x/pnv aux/pps dividers we only really need this for for i965g/gm cs timestamp increment. The CLKCFG memory clock values seem less consistent but we don't care about those here. For posterity here's a list of CLKCFG vs. FSB dumps from a bunch of machines (only missing lpt for a full set): machine CLKCFG FSB alv1 0x00001411 533 alv2 0x00000420 400 (Chris) gdg1 0x20000022 800 gdg2 0x20000022 800 cst 0x00010043 666 blb 0x00002034 1333 pnv1 0x00000423 666 pnv2 0x00000433 666 965gm 0x00004342 800 946gz 0x00000022 800 965g 0x00000422 800 g35 0x00000430 1066 0x00000434 1333 ctg1 0x00644056 1066 ctg2 0x00644066 1066 elk1 0x00012420 1066 0x00012424 1333 0x00012436 1600 0x00012422 800 elk2 0x00012040 1066 For the mobile parts the chipset docs generally have these documented to some degree (alv being the exception). The two settings w/o any evidence are 0x5=400MHz on desktop and 0x7=1333MHz on mobile. Though the mobile 1333MHz case probably doesn't even exist since ctg is only documented to go up to 1066MHz. v2: Fix 400mhz readout for Chris's alv/celeron machine Do a clean mobile vs. dekstop split since that's really what seems to be going on Cc: Chris Wilson Cc: Lionel Landwerlin Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200514123838.3017-3-ville.syrjala@linux.intel.com Acked-by: Chris Wilson commit 42ab330530b47b44070af592e2f84a2a0b61532e Author: Ville Syrjälä Date: Thu May 14 15:38:37 2020 +0300 drm/i915: Document our lackluster FSB frequency readout Document the fact that we aren't reading out the actual FSB frequency but rather just the state of the FSB straps. Some BIOSen allow you to configure the two independently. So if someone sets the two up in an inconsistent manner we'll get the wrong answer here and thus will end up with incorrect aux/pps clock dividers. Alas, proper docs are no longer around so we can't do any better. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200514123838.3017-2-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 6f62bda1eaa51240cfaba326443e91dfb52fbf2a Author: Ville Syrjälä Date: Thu May 14 15:38:36 2020 +0300 drm/i915: Fix 400 MHz FSB readout on elk Looks like elk redefines some of the CLKCFG FSB values to make room for 400 MHz FSB. The setting overlaps with one of the 266MHz settings (which is even documented in the ctg docs, and cofirmed to be correct on my ctg). So we limit the special case to elk only. Though it might also be that we have some kind of desktop vs. mobile difference going on here as eg. both g35 and elk use 0x0 for the 266 MHz setting, vs. 0x6 used by ctg). The g35 doesn't let me select 400MHz for the FSB strap so can't confirm which way it would go here. But anyways as it seems only elk has the 400MHz option we shouldn't lose anything by limiting the special case to it alone. My earlier experiments on this appear to have been nonsense as the comment I added claims that FSB strap of 400MHz results in a value of 0x4, but I've now retested it and I definitely get a value of 0x6 instead. So let's remove that bogus comment. v2: s/_ELK/_ALT/ in the define in anticipation of a full mobile vs. desktop CLKCFG split Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200514123838.3017-1-ville.syrjala@linux.intel.com Acked-by: Chris Wilson commit 913ec479bb5cc27f99f24d5fd111b3ef29a4deb9 Author: Thomas Zimmermann Date: Fri May 15 10:32:33 2020 +0200 drm/mgag200: Replace VRAM helpers with SHMEM helpers The VRAM helpers managed the framebuffer memory for mgag200. This came with several problems, as some MGA device require the scanout address to be located at VRAM offset 0. It's incompatible with the page-flip semantics of DRM's atomic modesettting. With atomic modesetting, old and new framebuffers have to be located in VRAM at the same time. So at least one of them has to reside at a non-0 offset. This patch replaces VRAM helpers with SHMEM helpers. GEM SHMEM buffers reside in system memory, and are shadow-copied into VRAM during page flips. The shadow copy always starts at VRAM offset 0. v2: * revert dev->pdev changes Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-16-tzimmermann@suse.de commit 88fabb75ea9edf4a3eecf459a50b633bda2fe67f Author: Thomas Zimmermann Date: Fri May 15 10:32:32 2020 +0200 drm/mgag200: Convert to simple KMS helper The mgag200 supports a single pipeline with only a primary plane. It can be converted to simple KMS helpers. This also adds support for atomic modesetting. Wayland compositors, which use pageflip ioctls, can now be used with mgag200. v2: * prepare encoder and CRTC in a separate patch * remove suspend/resume code in a separate patch * don't call set_format_regs() in pipe_update() Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-15-tzimmermann@suse.de commit f05c9e13094f24e299b1cba5bd0363add921be83 Author: Thomas Zimmermann Date: Fri May 15 10:32:31 2020 +0200 drm/mgag200: Use simple-display data structures The MGA CRTC data structure struct mga_crtc contains unused additional fields; so it can removed. The standard DRM CRTC and encoder structures are embedded now in struct drm_simple_display_pipe. Done in preparation of converting mgag200 to simple KMS helpers. v3: * remove now-unused define MGAG200FB_CONN_LIMIT * remove unused define MATROX_DPMS_CLEARED Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-14-tzimmermann@suse.de commit 9413adc089f64626e905662a39a2ce0562289d1e Author: Thomas Zimmermann Date: Fri May 15 10:32:30 2020 +0200 drm/mgag200: Remove out-commented suspend/resume helpers The suspend/resume helpers are unused. Also remove associated state from struct mga_device. Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-13-tzimmermann@suse.de commit 4f710d7ce8deb7e1c7906818c8729c4057c10c77 Author: Thomas Zimmermann Date: Fri May 15 10:32:29 2020 +0200 drm/mgag200: Move register initialization into separate function Registers are initialized with constants. This is now done in mgag200_init_regs(), mgag200_set_dac_regs() and mgag200_set_pci_regs(). Later patches should move these calls from mode setting to device initialization. v2: * replace uint8_t with u8 Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-12-tzimmermann@suse.de commit 7fc1ae567dc693d61af119b8f5425dfe4dce7044 Author: Thomas Zimmermann Date: Fri May 15 10:32:28 2020 +0200 drm/mgag200: Move hiprilvl setting into separate functions The hiprivlvl settings are now updated in mgag200_g200se_set_hiprilvl() and mgag200_g200ev_set_hiprilvl(). v2: * replace uint8_t with u8 Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-11-tzimmermann@suse.de commit 2e5ccbbaeaa47d109407883c16fcbbe84071a943 Author: Thomas Zimmermann Date: Fri May 15 10:32:27 2020 +0200 drm/mgag200: Move TAGFIFO reset into separate function The TAGFIFO state is now reset in mgag200_g200er_reset_tagfifo(). v2: * define MGAREG_SEQ1_SCROFF Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-10-tzimmermann@suse.de commit 836d536881cc8e229dd6d7dfb72a70f5768c57c6 Author: Thomas Zimmermann Date: Fri May 15 10:32:26 2020 +0200 drm/mgag200: Set primary plane's format in separate helper function The primary plane's format registers are now updated in a mgag200_set_format_regs(). v2: * get bpp shift from helper function * replace uint8_t with u8 Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-9-tzimmermann@suse.de commit 72a03a358c1c3d334e16b940448e3b32137e6597 Author: Thomas Zimmermann Date: Fri May 15 10:32:25 2020 +0200 drm/mgag200: Set pitch in a separate helper function The framebuffer's pitch is now set in mgag200_set_offset(). v2: * move offset and bpp-shift calculation into helper functions * use u8 instead of uint8_t * add MGAREG_CRTCEXT0_OFFSET_MASK Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-8-tzimmermann@suse.de commit ddb8d0520bbc6ffdf900fb2a2a21d203199c64b8 Author: Thomas Zimmermann Date: Fri May 15 10:32:24 2020 +0200 drm/mgag200: Update mode registers after plane registers Setting the plane registers first and the mode registers afterwards reproduces the sequence used by atomic helpers. Done in preparation of switching to simple KMS helpers. Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-7-tzimmermann@suse.de commit db05f8d3dc875249a5a11737ca715584b72851e8 Author: Thomas Zimmermann Date: Fri May 15 10:32:23 2020 +0200 drm/mgag200: Split MISC register update into PLL selection, SYNC and I/O Set different fields in MISC in their rsp location in the code. This patch also fixes a bug in the original code where the mode's SYNC flags were never written into the MISC register. v2: * use u8 instead of uint8_t * define MGAREG_MISC_CLK_SEL_MASK Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-6-tzimmermann@suse.de commit a6edae07fd015c1a9af98477e1274cd4d489c1cb Author: Thomas Zimmermann Date: Fri May 15 10:32:22 2020 +0200 drm/mgag200: Move mode-setting code into separate helper function The mode-setting code is now located in mgag200_set_mode_regs(), sans a few flags that will be moved in a later patch for clarity. v2: * replace uint8_t with u8 Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-5-tzimmermann@suse.de commit fb724f1e4bd553dfec027dff86b9a2132f2626c5 Author: Thomas Zimmermann Date: Fri May 15 10:32:21 2020 +0200 drm/mgag200: Clean up mga_crtc_do_set_base() The function now only takes the device structure, and the old and new framebuffers. Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-4-tzimmermann@suse.de commit d6237687e08fec0eb98a505f4d0db08c14a899cf Author: Thomas Zimmermann Date: Fri May 15 10:32:20 2020 +0200 drm/mgag200: Clean up mga_set_start_address() All register names and fields are now named according to the MGA programming manuals. The function doesn't need the CRTC, so callers pass in the device structure directly. The logging now uses device-specific macros. The original implementation busy-waited for the VSYNC flag to go up, to synchronize the page flip with the display's vblank. This code has been moved to mga_crtc_mode_set_base(). It's still present in the non-atomic code paths, but won't be used in atomic commits. With atomic, we should use interrupts to synchronize with vblanks. v3: * clarify commit message wrt. vblank busy-waiting v2: * use to_mga_device() * use MiB instead of MB * replace empty while loop with do-while, fixes checkpatch warning * replace uint{8,32}_t with u{8,32} Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-3-tzimmermann@suse.de commit 5a77e2bfdd4f898289d9746cc9cd97651308ed14 Author: Thomas Zimmermann Date: Fri May 15 10:32:19 2020 +0200 drm/mgag200: Remove HW cursor The HW cursor of Matrox G200 cards only supports a 16-color palette format. Univeral planes require at least ARGB or a similar component- based format, so remove the HW cursor. Alternatively, the driver could dither a cursor image from ARGB to 16 colors. But this does not produce pleasent-looking results in general, so it's useless for modern compositors. Without HW support, compositors will use software rendering. Signed-off-by: Thomas Zimmermann Tested-by: John Donnelly Acked-by: Sam Ravnborg Acked-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200515083233.32036-2-tzimmermann@suse.de commit acfa7fd18bfb2c060a410a088389f8f01cef44f8 Author: Tomi Valkeinen Date: Wed Apr 29 13:42:34 2020 +0300 drm/tilcdc: add missing static for panel_driver struct platform_driver panel_driver is only used from tilcdc_panel.c, so it can be static. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200429104234.18910-3-tomi.valkeinen@ti.com Reviewed-by: Jyri Sarha Acked-by: Sam Ravnborg commit 26c06633f6b1ed03c2b9bb3484e9777e95f03d31 Author: Tomi Valkeinen Date: Wed Apr 29 13:42:33 2020 +0300 drm/tilcdc: remove unnecessary state->fb check tilcdc_plane_atomic_check() exits if state->fb == NULL, so no need to check it again later. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200429104234.18910-2-tomi.valkeinen@ti.com Reviewed-by: Jyri Sarha commit 3f9c1c872cc97875ddc8d63bc9fe6ee13652b933 Author: Tomi Valkeinen Date: Wed Apr 29 13:42:32 2020 +0300 drm/tilcdc: fix leak & null ref in panel_connector_get_modes If videomode_from_timings() returns true, the mode allocated with drm_mode_create will be leaked. Also, the return value of drm_mode_create() is never checked, and thus could cause NULL deref. Fix these two issues. Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200429104234.18910-1-tomi.valkeinen@ti.com Reviewed-by: Jyri Sarha Acked-by: Sam Ravnborg commit 5bebaeadb30e8d1ed694bd9b63d4e424d333fe36 Author: Douglas Anderson Date: Mon May 18 11:47:17 2020 -0700 drm/bridge: ti-sn65dsi86: Implement lane reordering + polarity The ti-sn65dsi86 MIPI DSI to eDP bridge chip supports arbitrary remapping of eDP lanes and also polarity inversion. Both of these features have been described in the device tree bindings for the device since the beginning but were never implemented in the driver. Implement both of them. Part of this change also allows you to (via the same device tree bindings) specify to use fewer than the max number of DP lanes that the panel reports. This could be useful if your display supports more lanes but only a few are hooked up on your board. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Rob Clark Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200518114656.REPOST.v2.1.Ibc8eeddcee94984a608d6900b46f9ffde4045da4@changeid commit fe3d7a35497c807d0dad0642afd87d6ba5b6fc86 Author: Douglas Anderson Date: Mon May 4 21:32:29 2020 -0700 drm/bridge: ti-sn65dsi86: Fix off-by-one error in clock choice If the rate in our table is _equal_ to the rate we want then it's OK to pick it. It doesn't need to be greater than the one we want. Fixes: a095f15c00e2 ("drm/bridge: add support for sn65dsi86 bridge driver") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Rob Clark Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200504213225.1.I21646c7c37ff63f52ae6cdccc9bc829fbc3d9424@changeid commit baef4d56195b6d6e0f681f6eac03d8c6db011d34 Author: Douglas Anderson Date: Fri May 8 16:33:29 2020 -0700 drm/bridge: ti-sn65dsi86: Clear old error bits before AUX transfers The AUX channel transfer error bits in the status register are latched and need to be cleared. Clear them before doing our transfer so we don't see old bits and get confused. Without this patch having a single failure would mean that all future transfers would look like they failed. Fixes: b814ec6d4535 ("drm/bridge: ti-sn65dsi86: Implement AUX channel") Signed-off-by: Douglas Anderson Reviewed-by: Rob Clark Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200508163314.1.Idfa69d5d3fc9623083c0ff78572fea87dccb199c@changeid commit 1dbc979172afcf5380932e8aa76429d6e564a69c Author: Douglas Anderson Date: Thu May 7 14:34:59 2020 -0700 dt-bindings: drm/bridge: ti-sn65dsi86: Document no-hpd The ti-sn65dsi86 MIPI DSI to eDP bridge chip has a dedicated hardware HPD (Hot Plug Detect) pin on it, but it's mostly useless for eDP because of excessive debouncing in hardware. Specifically there is no way to disable the debouncing and for eDP debouncing hurts you because HPD is just used for knowing when the panel is ready, not for detecting physical plug events. Currently the driver in Linux just assumes that nobody has HPD hooked up. It relies on folks setting the "no-hpd" property in the panel node to specify that HPD isn't hooked up and then the panel driver using this to add some worst case delays when turning on the panel. Apparently it's also useful to specify "no-hpd" in the bridge node so that the bridge driver can make sure it's doing the right thing without peeking into the panel [1]. This would be used if anyone ever found it useful to implement support for the HW HPD pin on the bridge. Let's add this property to the bindings. NOTES: - This is somewhat of a backward-incompatible change. All current known users of ti-sn65dsi86 didn't have "no-hpd" specified in the bridge node yet none of them had HPD hooked up. This worked because the current Linux driver just assumed that HPD was never hooked up. We could make it less incompatible by saying that for this bridge it's assumed HPD isn't hooked up _unless_ a property is defined, but "no-hpd" is much more standard and it's unlikely to matter unless someone quickly goes and implements HPD in the driver. - It is sensible to specify "no-hpd" at the bridge chip level and specify "hpd-gpios" at the panel level. That would mean HPD is hooked up to some other GPIO in the system, just not the hardware HPD pin on the bridge chip. [1] https://lore.kernel.org/r/20200417180819.GE5861@pendragon.ideasonboard.com Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Linus Walleij Reviewed-by: Laurent Pinchart Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200507143354.v5.5.I72892d485088e57378a4748c86bc0f6c2494d807@changeid commit 5a2e9b658cdcad5ff5b9c44533a401497441a287 Author: Douglas Anderson Date: Thu May 7 14:34:58 2020 -0700 dt-bindings: drm/bridge: ti-sn65dsi86: Convert to yaml This moves the bindings over, based a lot on toshiba,tc358768.yaml. Unless there's someone known to be better, I've set the maintainer in the yaml as the first person to submit bindings. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200507143354.v5.4.Ifcdc4ecb12742a27862744ee1e8753cb95a38a7f@changeid commit 27ed2b3f22ed60295c74b4ca3e855823d0e7603b Author: Douglas Anderson Date: Thu May 7 14:34:55 2020 -0700 drm/bridge: ti-sn65dsi86: Export bridge GPIOs to Linux The ti-sn65dsi86 MIPI DSI to eDP bridge chip has 4 pins on it that can be used as GPIOs in a system. Each pin can be configured as input, output, or a special function for the bridge chip. These are: - GPIO1: SUSPEND Input - GPIO2: DSIA VSYNC - GPIO3: DSIA HSYNC or VSYNC - GPIO4: PWM Let's expose these pins as GPIOs. A few notes: - Access to ti-sn65dsi86 is via i2c so we set "can_sleep". - These pins can't be configured for IRQ. - There are no programmable pulls or other fancy features. - Keeping the bridge chip powered might be expensive. The driver is setup such that if all used GPIOs are only inputs we'll power the bridge chip on just long enough to read the GPIO and then power it off again. Setting a GPIO as output will keep the bridge powered. - If someone releases a GPIO we'll implicitly switch it to an input so we no longer need to keep the bridge powered for it. Because of all of the above limitations we just need to implement a bare-bones GPIO driver. The device tree bindings already account for this device being a GPIO controller so we only need the driver changes for it. NOTE: Despite the fact that these pins are nominally muxable I don't believe it makes sense to expose them through the pinctrl interface as well as the GPIO interface. The special functions are things that the bridge chip driver itself would care about and it can just configure the pins as needed. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Reviewed-by: Linus Walleij [added pdata->gchip.base = -1;] Cc: Linus Walleij Cc: Bartosz Golaszewski Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200507143354.v5.1.Ia50267a5549392af8b37e67092ca653a59c95886@changeid commit cba597ac45170469a9a60c06d20d64b5af5dc48c Author: Chris Wilson Date: Sat May 16 20:09:40 2020 +0100 drm/i915/display: Return error from dbuf allocation failure drivers/gpu/drm/i915/intel_pm.c:5920 skl_ddb_add_affected_pipes() error: uninitialized symbol 'ret'. Fixes: 3cf43cdc63fb ("drm/i915: Introduce proper dbuf state") Signed-off-by: Chris Wilson Cc: Stanislav Lisovskiy Cc: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200516190940.12675-1-chris@chris-wilson.co.uk commit b6a13a386e288495233245b31e0fb362b9331f17 Author: Ville Syrjälä Date: Mon May 18 15:13:54 2020 +0300 drm/i915: Fix dbuf slice mask when turning off all the pipes The current dbuf slice computation only happens when there are active pipes. If we are turning off all the pipes we just leave the dbuf slice mask at it's previous value, which may be something other that BIT(S1). If runtime PM will kick in it will however turn off everything but S1. Then on the next atomic commit (if the new dbuf slice mask matches the stale value we left behind) the code will not turn on the other slices we now need. This will lead to underruns as the planes are trying to use a dbuf slice that's not powered up. To work around let's just just explicitly set the dbuf slice mask to BIT(S1) when we are turning off all the pipes. Really the code should just calculate this stuff the same way regardless whether the pipes are on or off, but we're not quite there yet (need a bit more work on the dbuf state for that). v2: Let's not put the fix into dead code Cc: Stanislav Lisovskiy Acked-by: Chris Wilson Fixes: 3cf43cdc63fb ("drm/i915: Introduce proper dbuf state") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200518121354.20401-1-ville.syrjala@linux.intel.com commit f5f7e790a53d7982c6224d3dbdcd7f35409a5eae Author: Chris Wilson Date: Mon May 18 09:14:35 2020 +0100 drm/i915/gt: Reuse the tasklet priority for virtual as their siblings In order to keep all the tasklets in the same execution lists and so fifo ordered, be consistent and use the same priority for all. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200518081440.17948-3-chris@chris-wilson.co.uk commit a4292e52106b32111d2c5bc57329d0b0ebbbf0c2 Author: Chris Wilson Date: Sat May 16 22:23:30 2020 +0100 drm: Match drm_dp_send_clear_payload_id_table definition to declaration drivers/gpu/drm/drm_dp_mst_topology.c:2898:6: warning: symbol 'drm_dp_send_clear_payload_id_table' was not declared. Should it be static? drivers/gpu/drm/drm_dp_mst_topology.c:5451:37: warning: missing braces around initializer drivers/gpu/drm/drm_dp_mst_topology.c:5451:37: warning: missing braces around initializer Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200516212330.13633-4-chris@chris-wilson.co.uk commit af69bf55822f30eb768f0e9170b9c35dd46907c4 Author: Chris Wilson Date: Sat May 16 22:23:29 2020 +0100 drm: Describe dp_rev for drm_dp_set_phy_test_pattern drivers/gpu/drm/drm_dp_helper.c:1598: warning: Function parameter or member 'dp_rev' not described in 'drm_dp_set_phy_test_pattern' Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200516212330.13633-3-chris@chris-wilson.co.uk commit 2803aa743fd38f66acca555ae6e5fc677bb71251 Author: Chris Wilson Date: Sat May 16 22:23:28 2020 +0100 drm: Help unconfuse gcc, avoid accidental impossible unsigned comparisons drivers/gpu/drm/drm_client_modeset.c: In function ‘drm_client_firmware_config’: ./include/linux/bits.h:26:28: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] __builtin_constant_p((l) > (h)), (l) > (h), 0))) v2: Add a warning for passing connector_count==0 as this will hit an infinite loop, so document the invalid parameter. Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200516212330.13633-2-chris@chris-wilson.co.uk commit 3df6fad41f13dce63d9110d39175445a20f27395 Author: Chris Wilson Date: Sat May 16 22:23:27 2020 +0100 drm: Include internal header for managed function declarations drivers/gpu/drm/drm_managed.c:61:6: warning: symbol 'drm_managed_release' was not declared. Should it be static? CC drivers/gpu/drm/drm_managed.o drivers/gpu/drm/drm_managed.c:61:6: warning: no previous prototype for ‘drm_managed_release’ [-Wmissing-prototypes] void drm_managed_release(struct drm_device *dev) Fixes: c6603c740e0e ("drm: add managed resources tied to drm_device") Signed-off-by: Chris Wilson Cc: Sam Ravnborg Cc: Daniel Vetter Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200516212330.13633-1-chris@chris-wilson.co.uk commit 67a64e51ba9266e64ae705f4dc9a244ad6da4376 Author: Chris Wilson Date: Mon May 18 11:29:11 2020 +0100 drm/i915/selftests: Refactor sibling selection Tvrtko spotted that some selftests were using 'break' not 'continue', which will fail for discontiguous engine layouts such as on Icelake (which may have vcs0 and vcs2). Reported-by: Tvrtko Ursulin Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20200518102911.3463-1-chris@chris-wilson.co.uk commit 3b5ac8b56064c8dcdfc1c088b32f53d76588b472 Author: Sam Ravnborg Date: Sun May 17 21:01:24 2020 +0200 video: amba-clcd: use devm_of_find_backlight Look up backlight device using devm_of_find_backlight(). This simplifies the code and prevents us from hardcoding the node name in the driver. v2: - Added Cc: Peter Ujfalusi Signed-off-by: Sam Ravnborg Acked-by: Linus Walleij Cc: Russell King Cc: Sam Ravnborg Cc: Bartlomiej Zolnierkiewicz Cc: Peter Ujfalusi Cc: Daniel Vetter Cc: Linus Walleij Cc: Jani Nikula Cc: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20200517190139.740249-2-sam@ravnborg.org commit ebdc02dd4c4b7ef16abfb44acad36010fa31ee0f Author: Hans de Goede Date: Fri Feb 21 18:33:13 2020 +0100 drm: Add DRM_MODE_TYPE_USERDEF flag to probed modes matching a video= argument drm_helper_probe_add_cmdline_mode() prefers using a probed mode matching a video= argument over calculating our own timings for the user specified mode using CVT or GTF. But userspace code which is auto-configuring the mode may want to know that the user has specified that mode on the kernel commandline so that it can pick that mode over the mode which is marked as DRM_MODE_TYPE_PREFERRED. This commit sets the DRM_MODE_TYPE_USERDEF flag on the matching mode, just as we would do on the user-specified mode when no matching probed mode is found. Signed-off-by: Hans de Goede Reviewed-by: Emil Velikov Signed-off-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200221173313.510235-2-hdegoede@redhat.com commit a519f6d03f4c497d02c7915fc33eb2b194ee048d Author: Wolfram Sang Date: Mon Mar 16 17:39:07 2020 +0100 drm: encoder_slave: use new I2C API i2c_new_client() is deprecated, use the replacement i2c_new_client_device(). Also, we have a helper to check if a driver is bound. Use it to simplify the code. Note that this changes the errno for a failed device creation from ENOMEM to ENODEV. No callers currently interpret this errno, though, so we use this condensed error check. Signed-off-by: Wolfram Sang Reviewed-by: Emil Velikov Signed-off-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200316163907.13709-3-wsa+renesas@sang-engineering.com commit 683c09e9a8e1008b72fc23f6e99687eed59cfa49 Author: Wolfram Sang Date: Mon Mar 16 17:39:06 2020 +0100 drm: encoder_slave: fix refcouting error for modules module_put() balances try_module_get(), not request_module(). Fix the error path to match that. Fixes: 2066facca4c7 ("drm/kms: slave encoder interface.") Signed-off-by: Wolfram Sang Reviewed-by: Emil Velikov Signed-off-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200316163907.13709-2-wsa+renesas@sang-engineering.com commit c704b17071c4dc571dca3af4e4151dac51de081a Author: Michael Tretter Date: Thu Aug 17 12:43:07 2017 +0200 drm/debugfs: fix plain echo to connector "force" attribute Using plain echo to set the "force" connector attribute fails with -EINVAL, because echo appends a newline to the output. Replace strcmp with sysfs_streq to also accept strings that end with a newline. v2: use sysfs_streq instead of stripping trailing whitespace Signed-off-by: Michael Tretter Reviewed-by: Jani Nikula Signed-off-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20170817104307.17124-1-m.tretter@pengutronix.de commit ec0bb482de0ad5e4aba2a4537ea53eaeb77d11a6 Author: Dan Carpenter Date: Fri Mar 20 16:23:34 2020 +0300 drm/gem: Fix a leak in drm_gem_objects_lookup() If the "handles" allocation or the copy_from_user() fails then we leak "objs". It's supposed to be freed in panfrost_job_cleanup(). Fixes: c117aa4d8701 ("drm: Add a drm_gem_objects_lookup helper") Signed-off-by: Dan Carpenter Signed-off-by: Emil Velikov Link: https://patchwork.freedesktop.org/patch/msgid/20200320132334.GC95012@mwanda commit 5fa63f0773323b1d028f2da5c94b8f3e38619b69 Author: Emil Velikov Date: Tue May 5 16:16:13 2020 +0100 drm/rockchip: vop: call vop_cfg_done() under reg_lock The function vop_cfg_done() is a simple VOP_REG_SET(). As such it should be done under a reg_lock. A quick look through the driver shows that all other instances (apart from driver init) have the lock. Do the same here Cc: Sandy Huang Cc: Heiko Stübner Signed-off-by: Emil Velikov Reviewed-by: Sandy Huang Link: https://patchwork.freedesktop.org/patch/msgid/20200505151613.2932456-1-emil.l.velikov@gmail.com commit a18dc7401ab5c86de38f64ee6301a6bd3757f017 Author: Sam Ravnborg Date: Thu May 14 21:09:45 2020 +0200 drm/tilcdc: use devm_of_find_backlight Look up backlight device using devm_of_find_backlight(). This simplifies the code and prevents us from hardcoding the node name in the driver. Signed-off-by: Sam Ravnborg Reviewed-by: Tomi Valkeinen Cc: Jyri Sarha Cc: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20200514191001.457441-3-sam@ravnborg.org commit 1efa9eff7b94ed834162a17091db2fedc656763b Author: Sam Ravnborg Date: Thu May 14 21:09:44 2020 +0200 drm/omap: display: use devm_of_find_backlight Look up backlight device using devm_of_find_backlight(). This simplifies the code and prevents us from hardcoding the node name in the driver. Signed-off-by: Sam Ravnborg Reviewed-by: Tomi Valkeinen Cc: Tomi Valkeinen Cc: Zheng Bin Cc: Kate Stewart Cc: Enrico Weigelt Cc: Allison Randal Cc: Laurent Pinchart Cc: Thomas Gleixner Cc: Kefeng Wang Cc: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20200514191001.457441-2-sam@ravnborg.org commit 993fa32eb3d5ffb79e86a770ca982eb9c9f54011 Author: Nathan Chancellor Date: Fri May 15 19:35:45 2020 -0700 drm/i915: Mark check_shadow_context_ppgtt as maybe unused When CONFIG_DRM_I915_DEBUG_GEM is not set, clang warns: drivers/gpu/drm/i915/gvt/scheduler.c:884:1: warning: function 'check_shadow_context_ppgtt' is not needed and will not be emitted [-Wunneeded-internal-declaration] check_shadow_context_ppgtt(struct execlist_ring_context *c, struct intel_vgpu_mm *m) ^ 1 warning generated. This warning is similar to -Wunused-function but rather than warning that the function is completely unused, it warns that it is used in some expression within the file but that expression will be evaluated to a constant or be optimized away in the final assembly, essentially making it appeared used but really isn't. Usually, this happens when a function or variable is only used in sizeof, where it will appear to be used but will be evaluated at compile time and not be required to be emitted. In this case, the function is only used in GEM_BUG_ON, which is defined as BUILD_BUG_ON_INVALID, which intentionally follows this pattern. To fix this warning, add __maybe_unused to make it clear that this is intentional depending on the configuration. Fixes: bec3df930fbd ("drm/i915/gvt: Support PPGTT table load command") Link: https://github.com/ClangBuiltLinux/linux/issues/1027 Signed-off-by: Nathan Chancellor Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200516023545.3332334-1-natechancellor@gmail.com commit 552e01f6639a82acc80eacd4493fff93a2a57256 Author: Chris Wilson Date: Fri May 15 21:00:31 2020 +0100 drm/i915/gem: Retry faulthandlers on ENOSPC As we no longer use the shmemfs allocation directly, we do not expect to receive -ENOSPC from a backing store allocation. The potential sources for -ENOSPC are then our own internal eviction code, so the choice is either to kill the potential application with SIGBUS or to retry the faulthandler. In this patch we retry the fault handler, but since this is a should never happen condition, it is arguable that we gather up copious debug and kill the application. At worst, we cause an interruptible busy-wait, stalling the application -- all causes should be transient and the system should eventually recover. A small stall is hopefully a better outcome than random oomkiller. Signed-off-by: Chris Wilson Cc: Matthew Auld Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20200515200031.12034-1-chris@chris-wilson.co.uk commit 70b1a26f299c729cc1a5099374cc02568b05ec7d Author: Ville Syrjälä Date: Tue Feb 25 19:11:16 2020 +0200 drm/i915: Clean up dbuf debugs during .atomic_check() Combine the two per-pipe dbuf debugs into one, and use the canonical [CRTC:%d:%s] style to identify the crtc. Also use the same style as the plane code uses for the ddb start/end, and prefix bitmask properly with 0x to make it clear they are in fact bitmasks. The "how many total slices we are going to use" debug we move to outside the crtc loop so it gets printed only once at the end. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200225171125.28885-12-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit c7c0e7ebe4d9963573f81399374e4e95f37fd8e3 Author: Ville Syrjälä Date: Tue Feb 25 19:11:15 2020 +0200 drm/i915: Move the dbuf pre/post plane update Encapsulate the dbuf state more by moving the pre/post plane functions out from intel_display.c. We stick them into intel_pm.c since that's where the rest of the code lives for now. Eventually we should add a new file for this stuff at which point we also need to decide if it makes sense to even split the wm code from the ddb code, or to keep them together. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200225171125.28885-11-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 0cde0e0ff5f5ebd27507069250728c763c14ac81 Author: Ville Syrjälä Date: Tue Feb 25 19:11:14 2020 +0200 drm/i915: Nuke skl_ddb_get_hw_state() skl_ddb_get_hw_state() is redundant and kinda called in thw wrong spot anyway. Just kill it. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200225171125.28885-10-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 3cf43cdc63fbc3df19ea8398e9b8717ab44a6304 Author: Ville Syrjälä Date: Tue Feb 25 19:11:13 2020 +0200 drm/i915: Introduce proper dbuf state Add a global state to track the dbuf slices. Gets rid of all the nasty coupling between state->modeset and dbuf recomputation. Also we can now totally nuke state->active_pipe_changes. dev_priv->wm.distrust_bios_wm still remains, but that too will get nuked soon. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200225171125.28885-9-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 56f48c1d44f6b884eed2ef8fdf5172bc295ff973 Author: Ville Syrjälä Date: Tue Feb 25 19:11:12 2020 +0200 drm/i915: Unify the low level dbuf code The low level dbuf slice code is rather inconsitent with its functiona naming and organization. Make it more consistent. Also share the enable/disable functions between all platforms since the same code works just fine for all of them. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200225171125.28885-8-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit b3f1ff5b5bf1fd1fefa917508ea1f2735070df93 Author: Ville Syrjälä Date: Tue Feb 25 19:11:11 2020 +0200 drm/i915: Polish some dbuf debugs Polish some of the dbuf code to give more meaningful debug messages and whatnot. Also we can switch over to the per-device debugs/warns at the same time. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200225171125.28885-7-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 2f9078c34c448372da0bd830cc80caba544a950a Author: Ville Syrjälä Date: Tue Feb 25 19:11:10 2020 +0200 drm/i915: Make skl_compute_dbuf_slices() behave consistently for all platforms Currently skl_compute_dbuf_slices() returns 0 for any inactive pipe on icl+, but returns BIT(S1) on pre-icl for any pipe (whether it's active or not). Let's make the behaviour consistent and always return 0 for any inactive pipe. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200225171125.28885-6-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 794bdcf71f47b98f6e003190069d5064123067ed Author: Arnd Bergmann Date: Tue Apr 28 23:30:50 2020 +0200 drm/i915: avoid unused scale_user_to_hw() warning After the function is no longer marked 'inline', there is now a new warning pointing out that the only caller is inside of an #ifdef: drivers/gpu/drm/i915/display/intel_panel.c:493:12: warning: 'scale_user_to_hw' defined but not used [-Wunused-function] 493 | static u32 scale_user_to_hw(struct intel_connector *connector, | ^~~~~~~~~~~~~~~~ Move the function itself into that #ifdef as well. Fixes: 81b55ef1f47b ("drm/i915: drop a bunch of superfluous inlines") Signed-off-by: Arnd Bergmann Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20200428213106.3139170-1-arnd@arndb.de commit 963f328b9cea33886cc4cd7a833bcd0f66074d31 Author: Ville Syrjälä Date: Mon Oct 28 13:30:36 2019 +0200 drm/i915: Protect overlay colorkey macro arguments Put the customary () around the macro argument in the overlay colorkey macros. And while at switch to using a consistent case for the hex constants. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191028113036.27553-6-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 7cd0f22019feef75197d4b9c4d8eea1914bc0d13 Author: Ville Syrjälä Date: Mon Oct 28 13:30:35 2019 +0200 drm/i915: Enable pipe gamma for the overlay We pass the plane data through the pipe gamma for all the other planes. Can't see why we should treat the overlay differently, so let's enable pipe gamma for it as well. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191028113036.27553-5-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit e0b5d48e555d88d4ebe335469ac953b159915d92 Author: Ville Syrjälä Date: Mon Oct 28 13:30:34 2019 +0200 drm/i915: Configure overlay cc_out precision based on crtc gamma config Put the overlay color conversion unit into 10bit mode if the pipe isn't using the 8bit legacy gamma. Not 100% sure this is what the intention of the bit was but makes at least some sense to me. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191028113036.27553-4-ville.syrjala@linux.intel.com Acked-by: Chris Wilson commit 0e12b4e31f0e34e19327e3958ee2b1c0f0d4d5b9 Author: Ville Syrjälä Date: Mon Oct 28 13:30:33 2019 +0200 drm/i915: Fix overlay colorkey for 30bpp and 8bpp As with the video sprites the colorkey is always specified as 8bpc. For 10bpc primary plane formats we just ignore the two lsbs of each component. For C8 we'll replicate the same key to each chanel, which is what the hardware wants. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191028113036.27553-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 5e9e0a3a3be7cf51f80327c069a8706cb59d0c24 Author: Ville Syrjälä Date: Mon Oct 28 13:30:32 2019 +0200 drm/i915: Fix max cursor size for i915g/gm Apparently the 128x128 and 256x256 ARGB cursor modes were only added on LPT/CST. While the display section of bspec isn't super clear on the subject, it does highlight these two modes in a different color, has a few changlog entries indicating the 256x256 mode was added for a LPT DCN, and that the 128x128 mode was also added later (though no DCN/platform note there). The "device dependencies" bspec section does list the 256x256x32 as a new feature for LPT/CST, and goes on to mention that current hw only has the 64x64x32 mode (which reinforces the notion that the 128x128 mode was also added at the same time). Testing on actual hardware confirms all of this. CI shows all the 128x128 and 256x256 tests failing on GDG, and my ALV definitely doesn't like them. So we shall limit GDG/ALV to 64x64 only. And while at it let's adjust the mobile gen2 case to list the two platforms explicitly so that the if-ladder looks reasonably uniform. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20191028113036.27553-2-ville.syrjala@linux.intel.com Acked-by: Chris Wilson commit b718102dbdfd0285ad559687a30e27cc9124e592 Author: Maxime Ripard Date: Wed May 13 16:07:24 2020 +0200 drm/sun4i: mixer: Call of_dma_configure if there's an IOMMU The main DRM device is actually a virtual device so it doesn't have the iommus property, which is instead on the DMA masters, in this case the mixers. Add a call to of_dma_configure with the mixers DT node but on the DRM virtual device to configure it in the same way than the mixers. Reviewed-by: Paul Kocialkowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/9a4daf438dd3f2fe07afb23688bfb793a0613d7d.1589378833.git-series.maxime@cerno.tech commit e8ade6151905ba392cbbd03074207cacc7414d5d Author: Maxime Ripard Date: Wed May 13 16:07:21 2020 +0200 dt-bindings: display: sun8i-mixer: Allow for an iommu property The H6 mixer is attached to an IOMMU, so let's allow that property to be set in the bindings. Reviewed-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/7941e0c02794e6336da75fcac950ecd43be7fd97.1589378833.git-series.maxime@cerno.tech commit 58c1721787be8a6ff28b4e5b6ce395915476871e Author: Imre Deak Date: Wed May 13 13:31:55 2020 +0300 drm/dp_mst: Fix timeout handling of MST down messages This fixes the following use-after-free problem in case an MST down message times out, while waiting for the response for it: [ 449.022841] [drm:drm_dp_mst_wait_tx_reply.isra.26] timedout msg send 0000000080ba7fa2 2 0 [ 449.022898] ------------[ cut here ]------------ [ 449.022903] list_add corruption. prev->next should be next (ffff88847dae32c0), but was 6b6b6b6b6b6b6b6b. (prev=ffff88847db1c140). [ 449.022931] WARNING: CPU: 2 PID: 22 at lib/list_debug.c:28 __list_add_valid+0x4d/0x70 [ 449.022935] Modules linked in: asix usbnet mii snd_hda_codec_hdmi mei_hdcp i915 x86_pkg_temp_thermal coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep e1000e snd_hda_core ptp snd_pcm pps_core mei_me mei intel_lpss_pci prime_numbers [ 449.022966] CPU: 2 PID: 22 Comm: kworker/2:0 Not tainted 5.7.0-rc3-CI-Patchwork_17536+ #1 [ 449.022970] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake U DDR4 SODIMM RVP, BIOS TGLSFWI1.R00.2457.A16.1912270059 12/27/2019 [ 449.022976] Workqueue: events_long drm_dp_mst_link_probe_work [ 449.022982] RIP: 0010:__list_add_valid+0x4d/0x70 [ 449.022987] Code: c3 48 89 d1 48 c7 c7 f0 e7 32 82 48 89 c2 e8 3a 49 b7 ff 0f 0b 31 c0 c3 48 89 c1 4c 89 c6 48 c7 c7 40 e8 32 82 e8 23 49 b7 ff <0f> 0b 31 c0 c3 48 89 f2 4c 89 c1 48 89 fe 48 c7 c7 90 e8 32 82 e8 [ 449.022991] RSP: 0018:ffffc900001abcb0 EFLAGS: 00010286 [ 449.022995] RAX: 0000000000000000 RBX: ffff88847dae2d58 RCX: 0000000000000001 [ 449.022999] RDX: 0000000080000001 RSI: ffff88849d914978 RDI: 00000000ffffffff [ 449.023002] RBP: ffff88847dae32c0 R08: ffff88849d914978 R09: 0000000000000000 [ 449.023006] R10: ffffc900001abcb8 R11: 0000000000000000 R12: ffff888490d98400 [ 449.023009] R13: ffff88847dae3230 R14: ffff88847db1c140 R15: ffff888490d98540 [ 449.023013] FS: 0000000000000000(0000) GS:ffff88849ff00000(0000) knlGS:0000000000000000 [ 449.023017] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 449.023021] CR2: 00007fb96fafdc63 CR3: 0000000005610004 CR4: 0000000000760ee0 [ 449.023025] PKRU: 55555554 [ 449.023028] Call Trace: [ 449.023034] drm_dp_queue_down_tx+0x59/0x110 [ 449.023041] ? rcu_read_lock_sched_held+0x4d/0x80 [ 449.023050] ? kmem_cache_alloc_trace+0x2a6/0x2d0 [ 449.023060] drm_dp_send_link_address+0x74/0x870 [ 449.023065] ? __slab_free+0x3e1/0x5c0 [ 449.023071] ? lockdep_hardirqs_on+0xe0/0x1c0 [ 449.023078] ? lockdep_hardirqs_on+0xe0/0x1c0 [ 449.023097] drm_dp_check_and_send_link_address+0x9a/0xc0 [ 449.023106] drm_dp_mst_link_probe_work+0x9e/0x160 [ 449.023117] process_one_work+0x268/0x600 [ 449.023124] ? __schedule+0x307/0x8d0 [ 449.023139] worker_thread+0x37/0x380 [ 449.023149] ? process_one_work+0x600/0x600 [ 449.023153] kthread+0x140/0x160 [ 449.023159] ? kthread_park+0x80/0x80 [ 449.023169] ret_from_fork+0x24/0x50 Fixes: d308a881a591 ("drm/dp_mst: Kill the second sideband tx slot, save the world") Cc: Lyude Paul Cc: Sean Paul Cc: Wayne Lin Cc: # v3.17+ Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20200513103155.12336-1-imre.deak@intel.com commit b5850d6ec34cab53fade465a34e170a7065bb980 Author: Wolfram Sang Date: Wed May 13 22:10:16 2020 +0200 drm/vblank: remove outdated and noisy output The R-Car DU driver calls drm_vblank_init via some helper functions in probe(). From what I checked, most drivers do this as well. I have a config now where DU always stays in deferred_probe state because of a missing dependency. This means that every time I rebind another driver like MMC, the vblank init message is displayed again when the DU driver is retried. Because the message doesn't really carry a useful information, I suggest to simply drop it. Signed-off-by: Wolfram Sang Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200513201016.23047-1-wsa+renesas@sang-engineering.com